]> git.neil.brown.name Git - history.git/commitdiff
Import 2.3.51pre3 2.3.51pre3
authorLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:32:41 +0000 (15:32 -0500)
committerLinus Torvalds <torvalds@linuxfoundation.org>
Fri, 23 Nov 2007 20:32:41 +0000 (15:32 -0500)
195 files changed:
CREDITS
Documentation/Configure.help
arch/i386/config.in
arch/i386/defconfig
arch/ia64/Makefile
arch/ia64/config.in
arch/ia64/dig/iosapic.c
arch/ia64/hp/hpsim_irq.c
arch/ia64/ia32/binfmt_elf32.c
arch/ia64/kernel/Makefile
arch/ia64/kernel/acpi.c
arch/ia64/kernel/efi.c
arch/ia64/kernel/entry.S
arch/ia64/kernel/fw-emu.c
arch/ia64/kernel/gate.S
arch/ia64/kernel/irq.c
arch/ia64/kernel/irq_default.c [deleted file]
arch/ia64/kernel/irq_ia64.c [new file with mode: 0644]
arch/ia64/kernel/irq_internal.c
arch/ia64/kernel/irq_lock.c
arch/ia64/kernel/pci.c
arch/ia64/kernel/perfmon.c
arch/ia64/kernel/process.c
arch/ia64/kernel/semaphore.c
arch/ia64/kernel/setup.c
arch/ia64/kernel/time.c
arch/ia64/kernel/traps.c
arch/ia64/lib/copy_page.S
arch/ia64/lib/copy_user.S
arch/ia64/lib/strncpy_from_user.S
arch/ia64/mm/init.c
arch/ia64/mm/tlb.c
arch/sparc64/Makefile
arch/sparc64/kernel/pci_iommu.c
arch/sparc64/kernel/pci_psycho.c
arch/sparc64/kernel/pci_sabre.c
arch/sparc64/kernel/sbus.c
arch/sparc64/solaris/fs.c
drivers/block/ide-pnp.c
drivers/block/nbd.c
drivers/char/Config.in
drivers/char/README.epca
drivers/char/bttv.c
drivers/char/dsp56k.c
drivers/char/epca.c
drivers/char/radio-miropcm20.c
drivers/char/raw.c
drivers/net/aironet4500.h
drivers/net/aironet4500_card.c
drivers/net/aironet4500_core.c
drivers/net/aironet4500_proc.c
drivers/net/aironet4500_rid.c
drivers/net/arlan.c
drivers/net/pcmcia/Config.in
drivers/net/pcmcia/aironet4500_cs.c
drivers/parport/ChangeLog [new file with mode: 0644]
drivers/parport/parport_pc.c
drivers/pcmcia/i82365.c
drivers/pcmcia/yenta.c
drivers/scsi/aic7xxx.c
drivers/scsi/scsi_dma.c
drivers/sound/ad1848.c
drivers/sound/dev_table.c
drivers/sound/dev_table.h
drivers/sound/mad16.c
drivers/sound/miroaci.h [new file with mode: 0644]
drivers/sound/sscape.c
drivers/sound/wavfront.c
drivers/sound/wf_midi.c
drivers/usb/Config.in
drivers/usb/Makefile
drivers/usb/dabusb.c
drivers/usb/dabusb.h
drivers/usb/ftdi_sio.h [deleted file]
drivers/usb/inode.c
drivers/usb/keyspan_pda_fw.h [deleted file]
drivers/usb/mousedev.c
drivers/usb/serial/Makefile [new file with mode: 0644]
drivers/usb/serial/Makefile-keyspan_pda_fw [new file with mode: 0644]
drivers/usb/serial/ezusb_convert.pl [new file with mode: 0644]
drivers/usb/serial/ftdi_sio.h [new file with mode: 0644]
drivers/usb/serial/keyspan_pda_fw.h [new file with mode: 0644]
drivers/usb/serial/usb-serial.c [new file with mode: 0644]
drivers/usb/serial/usb-serial.h [new file with mode: 0644]
drivers/usb/serial/whiteheat.h [new file with mode: 0644]
drivers/usb/uhci.c
drivers/usb/usb-serial.c [deleted file]
drivers/usb/usb-serial.h [deleted file]
drivers/usb/wacom.c
drivers/usb/whiteheat.h [deleted file]
drivers/video/atyfb.c
drivers/video/matrox/i2c-matroxfb.c
drivers/video/matrox/matroxfb_maven.c
drivers/video/matrox/matroxfb_maven.h
fs/adfs/super.c
fs/affs/super.c
fs/autofs/init.c
fs/autofs/inode.c
fs/autofs4/init.c
fs/autofs4/inode.c
fs/bfs/dir.c
fs/bfs/file.c
fs/bfs/inode.c
fs/buffer.c
fs/coda/inode.c
fs/cramfs/inode.c
fs/devfs/base.c
fs/devpts/inode.c
fs/efs/super.c
fs/ext2/balloc.c
fs/ext2/ialloc.c
fs/ext2/super.c
fs/fat/inode.c
fs/filesystems.c
fs/hfs/super.c
fs/hpfs/super.c
fs/iobuf.c
fs/isofs/inode.c
fs/lockd/svcsubs.c
fs/minix/inode.c
fs/msdos/msdosfs_syms.c
fs/msdos/namei.c
fs/ncpfs/inode.c
fs/nfs/inode.c
fs/nfsd/export.c
fs/nfsd/lockd.c
fs/nfsd/nfs3proc.c
fs/nfsd/nfs3xdr.c
fs/nfsd/nfsctl.c
fs/nfsd/nfsfh.c
fs/nfsd/nfsproc.c
fs/nfsd/nfsxdr.c
fs/nfsd/vfs.c
fs/ntfs/fs.c
fs/openpromfs/inode.c
fs/proc/inode.c
fs/proc/procfs_syms.c
fs/qnx4/inode.c
fs/romfs/inode.c
fs/smbfs/inode.c
fs/super.c
fs/sysv/inode.c
fs/udf/super.c
fs/ufs/super.c
fs/umsdos/inode.c
fs/vfat/namei.c
fs/vfat/vfatfs_syms.c
include/asm-ia64/atomic.h
include/asm-ia64/efi.h
include/asm-ia64/hardirq.h
include/asm-ia64/hw_irq.h [new file with mode: 0644]
include/asm-ia64/irq.h
include/asm-ia64/keyboard.h
include/asm-ia64/machvec.h
include/asm-ia64/pal.h
include/asm-ia64/pgtable.h
include/asm-ia64/ptrace_offsets.h
include/asm-ia64/smp.h
include/asm-ia64/socket.h
include/asm-ia64/softirq.h
include/asm-mips64/ide.h
include/asm-sparc/ide.h
include/asm-sparc64/pbm.h
include/linux/adfs_fs.h
include/linux/brlock.h
include/linux/fs.h
include/linux/interrupt.h
include/linux/iobuf.h
include/linux/irq.h
include/linux/kmod.h
include/linux/lockd/bind.h
include/linux/lockd/lockd.h
include/linux/module.h
include/linux/msdos_fs_sb.h
include/linux/nbd.h
include/linux/nfsd/export.h
include/linux/nfsd/nfsd.h
include/linux/nfsd/nfsfh.h
include/linux/nfsd/syscall.h
include/linux/videodev.h
init/main.c
ipc/shm.c
kernel/exit.c
kernel/fork.c
kernel/ksyms.c
kernel/module.c
kernel/signal.c
kernel/sys.c
kernel/sysctl.c
mm/filemap.c
mm/memory.c
net/appletalk/aarp.c
net/appletalk/ddp.c
net/econet/af_econet.c
net/netsyms.c

diff --git a/CREDITS b/CREDITS
index 9c3162b9c554fe0524323eaf4337c9944d796fe5..4e1d57242ec7cb444080ce5978bdacd398eff3d8 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -258,6 +258,11 @@ P: 1024/77D50909 76 99 FD 31 91 E1 96 1C  90 BB 22 80 62 F6 BD 63
 D: Author and maintainer of the QIC-02 tape driver
 S: The Netherlands
 
+N: Tomas Berndtsson
+E: tomas@nocrew.org
+W: http://tomas.nocrew.org/
+D: dsp56k device driver
+
 N: Ross Biro
 E: bir7@leland.Stanford.Edu
 D: Original author of the Linux networking code
@@ -350,6 +355,14 @@ S: 19. Wellington Road
 S: Lancaster, LA1 4DN
 S: UK, England
 
+N: Lars Brinkhoff
+E: lars@nocrew.org
+W: http://lars.nocrew.org/
+D: dsp56k device driver
+S: Kopmansg 2
+S: 411 13  Goteborg
+S: Sweden
+
 N: Andries Brouwer
 E: aeb@cwi.nl
 D: random Linux hacker
@@ -1690,6 +1703,13 @@ S: 35706 Runckel Lane
 S: Fremont, California 94536
 S: USA
 
+N: Sam Mosel
+E: sam.mosel@computer.org
+D: Wacom Intuos USB Support
+S: 22 Seaview St
+S: Fullarton 5063
+S: South Australia
+
 N: Ian A. Murdock
 E: imurdock@gnu.ai.mit.edu
 D: Creator of Debian distribution
@@ -1761,6 +1781,11 @@ S: 2364 Old Trail Drive
 S: Reston, Virginia 20191
 S: USA
 
+N: Fredrik Noring
+E: noring@nocrew.org
+W: http://www.lysator.liu.se/~noring/
+D: dsp56k device driver
+
 N: Michael O'Reilly
 E: michael@iinet.com.au
 E: oreillym@tartarus.uwa.edu.au
index 743160c2b44e4c7a9031e249865d63f48b51d2ec..cee6bef35a1dd3aefa6f3f6bfa36b9879308616a 100644 (file)
@@ -11151,10 +11151,8 @@ CONFIG_MICROCODE
   Intel processors in P6 family, e.g.  Pentium Pro, Pentium II, 
   Pentium III, Xeon etc. You will obviously need the actual microcode
   binary data itself which is not shipped with the Linux kernel. 
-  With this support compiled you can use dd(1) to write microcode,
-  for example:
-
-     # dd if=/etc/microcode of=/dev/cpu/microcode bs=98304 count=1
+  You also need to say Y to "/dev file system support" in 'File systems'
+  section of the kernel configuration menu.
 
   You need to be superuser to do that. For latest news and information
   on obtaining all the required ingredients for this driver, check:
@@ -11446,11 +11444,15 @@ CONFIG_SOUND_SGALAXY
   This module initializes the older non Plug and Play sound galaxy
   cards from Aztech. It supports the Waverider Pro 32 - 3D and the
   Galaxy Washington 16.
+  If you compile the driver into the kernel, you have to add
+  "sgalaxy=<io>,<irq>,<dma>,<dma2>,<sgbase>" to the kernel command line.
 
 Support for AD1816(A) based cards (EXPERIMENTAL)
 CONFIG_SOUND_AD1816
   Say M here if you have a sound card based on the Analog Devices 
   AD1816(A) chip.
+  If you compile the driver into the kernel, you have to add
+  "ad1816=<io>,<irq>,<dma>,<dma2>" to the kernel command line.
 
   NOTE: This driver is still EXPERIMENTAL. 
         See Documentation/sound/AD1816 for further information.
@@ -11460,6 +11462,9 @@ CONFIG_SOUND_OPL3SA1
   Say Y or M if you have a Yamaha OPL3-SA1 sound chip, which is
   usually built into motherboards. Read Documentation/sound/OPL3-SA
   for details.
+  If you compile the driver into the kernel, you have to add
+  "opl3sa=<io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>" to the kernel
+  command line.
 
 ProAudioSpectrum 16 support
 CONFIG_SOUND_PAS
@@ -11467,6 +11472,9 @@ CONFIG_SOUND_PAS
   16 or Logitech SoundMan 16 sound card. Don't answer Y if you have
   some other card made by Media Vision or Logitech since they are not
   PAS16 compatible.
+  If you compile the driver into the kernel, you have to add
+  "pas2=<io>,<irq>,<dma>,<dma2>,<sbio>,<sbirq>,<sbdma>,<sbdma2>
+  to the kernel command line.
 
 100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support
 CONFIG_SOUND_SB
@@ -11484,6 +11492,8 @@ CONFIG_SOUND_SB
   Y here and also to "Additional lowlevel drivers" and to "SB32/AWE
   support" below and read Documentation/sound/INSTALL.awe. If you have
   an IBM Mwave card, say Y here and read Documentation/sound/mwave.
+  If you compile the driver into the kernel and don't want to use isapnp,
+  you have to add "sb=<io>,<irq>,<dma>,<dma2>" to the kernel command line.
   
   You can say M here to compile this driver as a module; the module is
   called sb.o.
@@ -11499,6 +11509,8 @@ CONFIG_SOUND_GUS
   Say Y here for any type of Gravis Ultrasound card, including
   the GUS or GUS MAX. See also Documentation/sound/ultrasound for
   more information on configuring this card with modules.
+  If you compile the driver into the kernel, you have to add
+  "gus=<io>,<irq>,<dma>,<dma2>" to the kernel command line.
 
 MPU-401 support (NOT for SB16)
 CONFIG_SOUND_MPU401
@@ -11510,12 +11522,16 @@ CONFIG_SOUND_MPU401
   was in the list of supported cards, look at the card specific
   instructions in the drivers/sound/Readme.cards file. It's safe to
   answer Y if you have a true MPU401 MIDI interface card.
+  If you compile the driver into the kernel, you have to add
+  "mpu401=<io>,<irq>" to the kernel command line.
 
 6850 UART support
 CONFIG_SOUND_UART6850
   This option enables support for MIDI interfaces based on the 6850
   UART chip. This interface is rarely found on sound cards. It's safe
   to answer N to this question.
+  If you compile the driver into the kernel, you have to add
+  "uart6850=<io>,<irq>" to the kernel command line.
 
 VIDC Sound
 CONFIG_VIDC_SOUND
@@ -11529,6 +11545,9 @@ CONFIG_SOUND_PSS
   ADSP-2115 DSP chip + Echo ESC614 ASIC CHIP). For more information on
   how to compile it into the kernel or as a module see the file
   Documentation/sound/PSS.
+  If you compile the driver into the kernel, you have to add
+  "pss=<io>,<mssio>,<mssirq>,<mssdma>,<mpuio>,<mpuirq>" to the kernel
+  command line.
 
 Enable PSS mixer (Beethoven ADSP-16 and other compatible)
 CONFIG_PSS_MIXER
@@ -11587,6 +11606,8 @@ CONFIG_SOUND_MSS
   specific instructions in drivers/sound/Readme.cards. Some drivers
   have their own MSS support and saying Y to this option will cause a
   conflict.
+  If you compile the driver into the kernel, you have to add
+  "ad1848=<io>,<irq>,<dma>,<dma2>[,<type>]" to the kernel command line.
 
 SGI Visual Workstation on-board audio
 CONFIG_SOUND_VWSND
@@ -11599,11 +11620,16 @@ CONFIG_SOUND_SSCAPE
   Answer Y if you have a sound card based on the Ensoniq SoundScape
   chipset. Such cards are being manufactured at least by Ensoniq, Spea
   and Reveal (Reveal makes also other cards).
+  If you compile the driver into the kernel, you have to add
+  "sscape=<io>,<irq>,<dma>,<mpuio>,<mpuirq>" to the kernel command line.
 
 MediaTriX AudioTriX Pro support
 CONFIG_SOUND_TRIX
   Answer Y if you have the AudioTriX Pro sound card manufactured
   by MediaTrix.
+  If you compile the driver into the kernel, you have to add
+  "trix=<io>,<irq>,<dma>,<dma2>,<sbio>,<sbirq>,<sbdma>,<mpuio>,<mpuirq>"
+  to the kernel command line.
 
 Have TRXPRO.HEX firmware file
 CONFIG_TRIX_HAVE_BOOT
@@ -11628,6 +11654,9 @@ CONFIG_SOUND_MAD16
   and Diamond (latest ones). Note however that the Tropez sound cards
   have their own driver; if you have one of those, say N here and Y or
   M to "Full support for Turtle Beach WaveFront", below. 
+  If you compile the driver into the kernel, you have to add
+  "mad16=<io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>" to the
+  kernel command line.
 
   See also Documentation/sound/Opti and Documentation/sound/MAD16 for
   more information on setting these cards up as modules.
@@ -11647,7 +11676,10 @@ CONFIG_MAD16_OLDCARD
 Support for Crystal CS4232 based (PnP) cards
 CONFIG_SOUND_CS4232
   Say Y here if you have a card based on the Crystal CS4232 chip set,
-  which uses its own Plug and Play protocol. 
+  which uses its own Plug and Play protocol.
+  If you compile the driver into the kernel, you have to add
+  "cs4232=<io>,<irq>,<dma>,<dma2>,<mpuio>,<mpuirq>" to the kernel
+  command line.
 
   See Documentation/sound/CS4232 for more information on configuring
   this card.
@@ -11657,11 +11689,16 @@ CONFIG_SOUND_OPL3SA2
   Say Y or M if you have a card based on one of these Yamaha
   sound chipsets. Read Documentation/sound/OPL3-SA2 for more
   information on configuring these cards.
+  If you compile the driver into the kernel, you have to add
+  "opl3sa2=<io>,<irq>,<dma>,<dma2>,<mssio>,<mpuio>" to the kernel
+  command line.
 
 Support for Turtle Beach Wave Front (Maui, Tropez) synthesizers
 CONFIG_SOUND_MAUI
   Say Y here if you have a Turtle Beach Wave Front, Maui, or Tropez
   sound card.
+  If you compile the driver into the kernel, you have to add
+  "maui=<io>,<irq>" to the kernel command line.
 
 Have OSWF.MOT firmware file
 CONFIG_MAUI_HAVE_BOOT
@@ -11749,18 +11786,6 @@ CONFIG_MSND_FIFOSIZE
   and Pinnacle). Larger values reduce the chance of data overruns at
   the expense of overall latency. If unsure, use the default.
 
-/dev/dsp and /dev/audio support
-CONFIG_SOUND_AUDIO
-  If you say Y here, you will get the /dev/dsp and /dev/audio devices;
-  these are the analog-digital and digital-analog converter devices
-  and are very useful, so say Y.
-
-MIDI interface support
-CONFIG_SOUND_MIDI
-  Answering N disables /dev/midixx devices and access to any MIDI
-  ports using /dev/sequencer and /dev/music. This option also affects
-  any MPU401 and/or General MIDI compatible devices. Answer Y.
-
 FM synthesizer (YM3812/OPL-3) support
 CONFIG_SOUND_YM3812
   Answer Y if your card has a FM chip made by Yamaha (OPL2/OPL3/OPL4).
@@ -11770,6 +11795,8 @@ CONFIG_SOUND_YM3812
   cards, however).
   Please read the file Documentation/sound/OPL3 if your card has an
   OPL3 chip.
+  If you compile the driver into the kernel, you have to add
+  "opl3=<io>" to the kernel command line.
 
   If unsure, say Y.
  
@@ -11778,13 +11805,6 @@ CONFIG_SUN_AUDIO
   This is support for the sound cards on Sun workstations. The code
   does not exist yet, so you might as well say N here.
 
-Additional low level drivers
-CONFIG_LOWLEVEL_SOUND
-  If you need additional low level sound drivers which have not yet
-  appeared, say Y. The answer to this question does not directly
-  affect the kernel; saying Y will simply cause this configure script
-  to present you with more options. If unsure, say Y.
-
 ACI mixer (miroPCM12/PCM20)
 CONFIG_SOUND_ACI_MIXER
   ACI (Audio Command Interface) is a protocol used to communicate with
@@ -11830,6 +11850,9 @@ CONFIG_AEDSP16_SBPRO
   You should then say Y to "100% Sound Blaster compatibles
   (SB16/32/64, ESS, Jazz16) support" and N to "Audio Excel DSP 16 (MSS
   emulation)".
+  If you compile the driver into the kernel, you have to add
+  "aedsp16=<io>,<irq>,<dma>,<mssio>,<mpuio>,<mouirq>" to the kernel
+  command line.
 
 Audio Excel DSP 16 (MSS emulation)
 CONFIG_AEDSP16_MSS
index beb9fa1a8a5915f50377d27277a2bfa0d05b323b..e1ba021e1ec86a6d41c23abf327fbf3aa24d1131 100644 (file)
@@ -50,9 +50,7 @@ if [ "$CONFIG_MK7" = "y" ]; then
    define_bool CONFIG_X86_PGE y
 fi
 
-if [ "$CONFIG_DEVFS_FS" = "y" ]; then
-   tristate '/dev/cpu/microcode - Intel P6 CPU microcode support' CONFIG_MICROCODE
-fi
+tristate '/dev/cpu/microcode - Intel P6 CPU microcode support' CONFIG_MICROCODE
 
 choice 'High Memory Support' \
        "off    CONFIG_NOHIGHMEM \
index e1f011e5dd528ea1d6bc76ea111fc35a7021f8f7..813a2ecea410448a12a1546ebc15856cbff35015 100644 (file)
@@ -27,6 +27,7 @@ CONFIG_X86_POPAD_OK=y
 CONFIG_X86_TSC=y
 CONFIG_X86_GOOD_APIC=y
 CONFIG_X86_PGE=y
+# CONFIG_MICROCODE is not set
 CONFIG_NOHIGHMEM=y
 # CONFIG_HIGHMEM4G is not set
 # CONFIG_HIGHMEM64G is not set
@@ -165,6 +166,7 @@ CONFIG_SKB_LARGE=y
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
+# CONFIG_DECNET is not set
 
 #
 # Telephony Support
@@ -335,7 +337,6 @@ CONFIG_PCMCIA_PCNET=y
 # CONFIG_PCMCIA_NMCLAN is not set
 # CONFIG_PCMCIA_SMC91C92 is not set
 # CONFIG_PCMCIA_XIRC2PS is not set
-# CONFIG_AIRONET4500_CS is not set
 # CONFIG_ARCNET_COM20020_CS is not set
 # CONFIG_PCMCIA_3C575 is not set
 # CONFIG_PCMCIA_TULIP is not set
@@ -343,6 +344,7 @@ CONFIG_NET_PCMCIA_RADIO=y
 CONFIG_PCMCIA_RAYCS=y
 # CONFIG_PCMCIA_NETWAVE is not set
 # CONFIG_PCMCIA_WAVELAN is not set
+# CONFIG_AIRONET4500_CS is not set
 CONFIG_PCMCIA_NETCARD=y
 
 #
index 24e274aa0af739f9c6a59326c03252b3e870951e..3ace288ef4008160dc5a0a97b7d9c494f588325e 100644 (file)
@@ -5,7 +5,7 @@
 # License.  See the file "COPYING" in the main directory of this archive
 # for more details.
 #
-# Copyright (C) 1998, 1999 by David Mosberger-Tang <davidm@hpl.hp.com>
+# Copyright (C) 1998-2000 by David Mosberger-Tang <davidm@hpl.hp.com>
 #
 
 NM := $(CROSS_COMPILE)nm -B
@@ -14,12 +14,12 @@ LINKFLAGS = -static -T arch/$(ARCH)/vmlinux.lds
 # next line is for HP compiler backend:
 #AFLAGS += -DGCC_RETVAL_POINTER_IN_R8
 # The next line is needed when compiling with the July snapshot of the Cygnus compiler:
-#EXTRA = -ma0-bugs -D__GCC_DOESNT_KNOW_IN_REGS__
+#EXTRA = -D__GCC_DOESNT_KNOW_IN_REGS__
 # next two lines are for the September snapshot of the Cygnus compiler:
 AFLAGS += -D__GCC_MULTIREG_RETVALS__
-EXTRA  = -ma0-bugs -D__GCC_MULTIREG_RETVALS__
+EXTRA  = -D__GCC_MULTIREG_RETVALS__
 
-CFLAGS := -g $(CFLAGS) -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f10-f15,f32-f127
+CFLAGS := $(CFLAGS) -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f10-f15,f32-f127
 
 ifdef CONFIG_IA64_GENERIC
        CORE_FILES      :=      arch/$(ARCH)/hp/hp.a    \
index cf2b2c1cf7dc72a13ab820e96828d8a1ee0531f3..3d1dd7e0256a2d1ae40bda9d61a01d3ccb9f5fbe 100644 (file)
@@ -35,7 +35,7 @@ if [ "$CONFIG_IA64_SGI_SN1_SIM" = "y" ]; then
        define_bool CONFIG_IA64_SOFTSDV_HACKS y
 fi
 
-define_bool CONFIG_KCORE_ELF y # On IA-64, we always want an ELF /dev/kcore.
+define_bool CONFIG_KCORE_ELF y # On IA-64, we always want an ELF /proc/kcore.
 
 bool 'SMP support' CONFIG_SMP n
 bool 'Performance monitor support' CONFIG_PERFMON n
index 6a392226ee43b66eab8916ee427951ac8f6e61dc..4861aa2d9ac9b3aa8c8bc8723ad04b97c5c382ba 100644 (file)
@@ -12,6 +12,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/irq.h>
 #include <linux/pci.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
@@ -19,7 +20,6 @@
 
 #include <asm/io.h>
 #include <asm/iosapic.h>
-#include <asm/irq.h>
 #include <asm/ptrace.h>
 #include <asm/system.h>
 #include <asm/delay.h>
@@ -258,6 +258,21 @@ disable_pin (unsigned int pin, unsigned long iosapic_addr)
 
 #define iosapic_shutdown_irq   iosapic_disable_irq
 
+static unsigned int
+iosapic_startup_irq (unsigned int irq)
+{
+       int pin;
+
+       pin = iosapic_pin(irq);
+       if (pin < 0)
+               /* happens during irq auto probing... */
+               return 0;
+       set_rte(iosapic_addr(irq), pin, iosapic_polarity(irq), iosapic_trigger(irq), 
+               iosapic_dmode(irq), (ia64_get_lid() >> 16) & 0xffff, irq);
+       enable_pin(pin, iosapic_addr(irq));
+       return 0;
+}
+
 static void
 iosapic_enable_irq (unsigned int irq)
 {
@@ -295,58 +310,26 @@ iosapic_version(unsigned long base_addr)
        return readl(IO_SAPIC_WINDOW + base_addr);
 }
 
-static int
-iosapic_handle_irq (unsigned int irq, struct pt_regs *regs)
+static void
+iosapic_ack_irq (unsigned int irq)
 {
-       struct irqaction *action = 0;
-       struct irq_desc *id = irq_desc + irq;
-       unsigned int status;
-       int retval;
-
-       spin_lock(&irq_controller_lock);
-       {
-               status = id->status;
-
-               /* do we need to do something IOSAPIC-specific to ACK the irq here??? */
-               /* Yes, but only level-triggered interrupts. We'll do that later */
-               if ((status & IRQ_INPROGRESS) == 0 && (status & IRQ_ENABLED) != 0) {
-                       action = id->action;
-                       status |= IRQ_INPROGRESS;
-               }
-               id->status = status & ~(IRQ_REPLAY | IRQ_WAITING);
-       }
-       spin_unlock(&irq_controller_lock);
-
-       if (!action) {
-               if (!(id->status & IRQ_AUTODETECT))
-                       printk("iosapic_handle_irq: unexpected interrupt %u;"
-                              "disabling it (status=%x)\n", irq, id->status);
-               /*
-                * If we don't have a handler, disable the pin so we
-                * won't get any further interrupts (until
-                * re-enabled).  --davidm 99/12/17
-                */
-               iosapic_disable_irq(irq);
-               return 0;
-       }
-
-       retval = invoke_irq_handlers (irq, regs, action);
+}
 
+static void
+iosapic_end_irq (unsigned int irq)
+{
        if (iosapic_trigger(irq) == IO_SAPIC_LEVEL)     /* ACK Level trigger interrupts */
                writel(irq, iosapic_addr(irq) + IO_SAPIC_EOI);
+}
 
-       spin_lock(&irq_controller_lock);
-       {
-               status = (id->status & ~IRQ_INPROGRESS);
-               id->status = status;
-       }
-       spin_unlock(&irq_controller_lock);
-
-       return retval;
+static void
+iosapic_set_affinity (unsigned int irq, unsigned long mask)
+{
+       printk("iosapic_set_affinity: not implemented yet\n");
 }
 
-void __init
-iosapic_init (unsigned long addr)
+void
+iosapic_init (unsigned long address)
 {
        int     i;
 #ifdef CONFIG_IA64_IRQ_ACPI
@@ -356,19 +339,10 @@ iosapic_init (unsigned long addr)
        int     vector;
 #endif
 
-       /*
-        * Disable all local interrupts
-        */
-
-       ia64_set_itv(0, 1);
-       ia64_set_lrr0(0, 1);    
-       ia64_set_lrr1(0, 1);    
-
        /*
         * Disable the compatibility mode interrupts (8259 style), needs IN/OUT support
         * enabled.
         */
-
        outb(0xff, 0xA1);
        outb(0xff, 0x21);
 
@@ -376,10 +350,13 @@ iosapic_init (unsigned long addr)
        memset(iosapic_vector, 0x0, sizeof(iosapic_vector));
        for (i = 0; i < NR_IRQS; i++) {
                iosapic_pin(i) = 0xff;
-               iosapic_addr(i) = (unsigned long) ioremap(IO_SAPIC_DEFAULT_ADDR, 0);
+               iosapic_addr(i) = (unsigned long) ioremap(address, 0);
        }
        /* XXX this should come from systab or some such: */
+# if 0
+       /* this doesn't look right --davidm 00/03/07 */
        iosapic_pin(TIMER_IRQ) = 5;     /* System Clock Interrupt */
+# endif
        iosapic_pin(0x40) = 3;  /* Keyboard */
        iosapic_pin(0x92) = 9;  /* COM1 Serial Port */
        iosapic_pin(0x80) = 4;  /* Periodic Interrupt */
@@ -396,7 +373,7 @@ iosapic_init (unsigned long addr)
        i = -1;
        while (intr_routing[++i].srcbus != 0xff) {
                if (intr_routing[i].srcbus == BUS_ISA) {
-                       vector = map_legacy_irq(intr_routing[i].srcbusirq);
+                       vector = isa_irq_to_vector(intr_routing[i].srcbusirq);
                } else if (intr_routing[i].srcbus == BUS_PCI) {
                        vector = intr_routing[i].iosapic_pin;
                } else {
@@ -414,7 +391,7 @@ iosapic_init (unsigned long addr)
                       iosapic_trigger(vector));
 # endif
        }
-#else /* !defined(CONFIG_IA64_SOFTSDV_HACKS) && !defined(CONFIG_IA64_IRQ_ACPI) */
+#else /* !defined(CONFIG_IA64_SOFTSDV_HACKS) && defined(CONFIG_IA64_IRQ_ACPI) */
        /* 
         * Map the legacy ISA devices into the IOAPIC data; We'll override these
         * later with data from the ACPI Interrupt Source Override table.
@@ -425,8 +402,8 @@ iosapic_init (unsigned long addr)
         * here, so that this works on BigSur but will go ask Intel. --wfd 2000-Jan-19
         *
         */
-       for (i =0 ; i < IA64_MIN_VECTORED_IRQ; i++) {
-               irq = map_legacy_irq(i);
+       for (i =0 ; i < 16; i++) {
+               irq = isa_irq_to_vector(i);
                iosapic_pin(irq) = i; 
                iosapic_bus(irq) = BUS_ISA;
                iosapic_busdata(irq) = 0;
@@ -445,7 +422,9 @@ iosapic_init (unsigned long addr)
        ia64_boot_param.pci_vectors = (__u64) __va(ia64_boot_param.pci_vectors);
        vectors = (struct pci_vector_struct *) ia64_boot_param.pci_vectors;
        for (i = 0; i < ia64_boot_param.num_pci_vectors; i++) {
-               irq = map_legacy_irq(vectors[i].irq);
+               irq = vectors[i].irq;
+               if (irq < 16)
+                       irq = isa_irq_to_vector(irq);
 
                iosapic_bustype(irq) = BUS_PCI;
                iosapic_pin(irq) = irq - iosapic_baseirq(irq);
@@ -469,34 +448,19 @@ iosapic_init (unsigned long addr)
 #endif /* !CONFIG_IA64_IRQ_ACPI */
 }
 
-static void
-iosapic_startup_irq (unsigned int irq)
-{
-       int pin;
-
-       if (irq == TIMER_IRQ)
-               return;
-       pin = iosapic_pin(irq);
-       if (pin < 0)
-               /* happens during irq auto probing... */
-               return;
-       set_rte(iosapic_addr(irq), pin, iosapic_polarity(irq), iosapic_trigger(irq), 
-               iosapic_dmode(irq), (ia64_get_lid() >> 16) & 0xffff, irq);
-       enable_pin(pin, iosapic_addr(irq));
-}
-
 struct hw_interrupt_type irq_type_iosapic = {
-       "IOSAPIC",
-       iosapic_init,
-       iosapic_startup_irq,
-       iosapic_shutdown_irq,
-       iosapic_handle_irq,
-       iosapic_enable_irq,
-       iosapic_disable_irq
+       typename:       "IOSAPIC",
+       startup:        iosapic_startup_irq,
+       shutdown:       iosapic_shutdown_irq,
+       enable:         iosapic_enable_irq,
+       disable:        iosapic_disable_irq,
+       ack:            iosapic_ack_irq,
+       end:            iosapic_end_irq,
+       set_affinity:   iosapic_set_affinity
 };
 
 void
-dig_irq_init (struct irq_desc desc[NR_IRQS])
+dig_irq_init (void)
 {
        int i;
 
@@ -505,10 +469,20 @@ dig_irq_init (struct irq_desc desc[NR_IRQS])
         * claimed by someone else already (e.g., timer or IPI are
         * handled internally).
         */
+#if 0
        for (i = IA64_MIN_VECTORED_IRQ; i <= IA64_MAX_VECTORED_IRQ; ++i) {
-               if (irq_desc[i].handler == &irq_type_default)
+               if (irq_desc[i].handler == &no_irq_type)
                        irq_desc[i].handler = &irq_type_iosapic;
        }
+#else
+       for (i = 0; i <= IA64_MAX_VECTORED_IRQ; ++i) {
+               if (irq_desc[i].handler == &no_irq_type)
+                       irq_desc[i].handler = &irq_type_iosapic;
+       }
+#endif
+#ifndef CONFIG_IA64_DIG
+       iosapic_init(IO_SAPIC_DEFAULT_ADDR);
+#endif
 }
 
 void
index 72b36d6d6d6220f467cd5ad08b93265911fd309d..00f4d1a5171c5792ee4be25facab431a5a34ba03 100644 (file)
@@ -1,83 +1,42 @@
 /*
  * Platform dependent support for HP simulator.
  *
- * Copyright (C) 1998, 1999 Hewlett-Packard Co
- * Copyright (C) 1998, 1999 David Mosberger-Tang <davidm@hpl.hp.com>
- * Copyright (C) 1999 Vijay Chander <vijay@engr.sgi.com>
+ * Copyright (C) 1998-2000 Hewlett-Packard Co
+ * Copyright (C) 1998-2000 David Mosberger-Tang <davidm@hpl.hp.com>
  */
-#include <linux/init.h>
-#include <linux/kernel.h>
-#include <linux/param.h>
-#include <linux/string.h>
-#include <linux/types.h>
-#include <linux/kdev_t.h>
-#include <linux/console.h>
-
-#include <asm/delay.h>
-#include <asm/irq.h>
-#include <asm/pal.h>
-#include <asm/machvec.h>
-#include <asm/pgtable.h>
-#include <asm/sal.h>
 
+#include <linux/init.h>
+#include <linux/irq.h>
 
-static int
-irq_hp_sim_handle_irq (unsigned int irq, struct pt_regs *regs)
+static unsigned int
+hpsim_irq_startup (unsigned int irq)
 {
-       struct irqaction *action = 0;
-       struct irq_desc *id = irq_desc + irq;
-       unsigned int status;
-       int retval;
-
-       spin_lock(&irq_controller_lock);
-       {
-               status = id->status;
-               if ((status & IRQ_INPROGRESS) == 0 && (status & IRQ_ENABLED) != 0) {
-                       action = id->action;
-                       status |= IRQ_INPROGRESS;
-               }
-               id->status = status & ~(IRQ_REPLAY | IRQ_WAITING);
-       }
-       spin_unlock(&irq_controller_lock);
-
-       if (!action) {
-               if (!(id->status & IRQ_AUTODETECT))
-                       printk("irq_hpsim_handle_irq: unexpected interrupt %u\n", irq);
-               return 0;
-       }
-
-       retval = invoke_irq_handlers(irq, regs, action);
-
-       spin_lock(&irq_controller_lock);
-       {
-               id->status &= ~IRQ_INPROGRESS;
-       }
-       spin_unlock(&irq_controller_lock);
-
-       return retval;
+       return 0;
 }
 
 static void
-irq_hp_sim_noop (unsigned int irq)
+hpsim_irq_noop (unsigned int irq)
 {
 }
 
 static struct hw_interrupt_type irq_type_hp_sim = {
-       "hp_sim",
-       (void (*)(unsigned long)) irq_hp_sim_noop,      /* init */
-       irq_hp_sim_noop,                                /* startup */
-       irq_hp_sim_noop,                                /* shutdown */
-       irq_hp_sim_handle_irq,                          /* handle */
-       irq_hp_sim_noop,                                /* enable */
-       irq_hp_sim_noop,                                /* disable */
+       typename:       "hpsim",
+       startup:        hpsim_irq_startup,
+       shutdown:       hpsim_irq_noop,
+       enable:         hpsim_irq_noop,
+       disable:        hpsim_irq_noop,
+       ack:            hpsim_irq_noop,
+       end:            hpsim_irq_noop,
+       set_affinity:   (void (*)(unsigned int, unsigned long)) hpsim_irq_noop,
 };
 
-void
-hpsim_irq_init (struct irq_desc desc[NR_IRQS])
+void __init
+hpsim_irq_init (void)
 {
        int i;
 
        for (i = IA64_MIN_VECTORED_IRQ; i <= IA64_MAX_VECTORED_IRQ; ++i) {
-               irq_desc[i].handler = &irq_type_hp_sim;
+               if (irq_desc[i].handler == &no_irq_type)
+                       irq_desc[i].handler = &irq_type_hp_sim;
        }
 }
index af51038e565508abf6e26ed2d2756f9e563f8ae9..a99983681ab9bd55c8787cfd1d0ff9e9aa7c22f5 100644 (file)
@@ -50,13 +50,13 @@ put_shared_page(struct task_struct * tsk, struct page *page, unsigned long addre
        pmd = pmd_alloc(pgd, address);
        if (!pmd) {
                __free_page(page);
-               oom(tsk);
+               force_sig(SIGKILL, tsk);
                return 0;
        }
        pte = pte_alloc(pmd, address);
        if (!pte) {
                __free_page(page);
-               oom(tsk);
+               force_sig(SIGKILL, tsk);
                return 0;
        }
        if (!pte_none(*pte)) {
index 7cb47da72f6b8baf9792a52fb88e209b8f9dadd9..7a2fcd21404a3bbe5203244eb214f73e93c1d520 100644 (file)
@@ -15,7 +15,7 @@
 all: kernel.o head.o init_task.o
 
 O_TARGET := kernel.o
-O_OBJS  := acpi.o entry.o gate.o efi.o efi_stub.o irq.o irq_default.o irq_internal.o ivt.o \
+O_OBJS  := acpi.o entry.o gate.o efi.o efi_stub.o irq.o irq_ia64.o irq_internal.o ivt.o \
            pal.o pci-dma.o process.o perfmon.o ptrace.o sal.o sal_stub.o semaphore.o setup.o signal.o \
            sys_ia64.o traps.o time.o unaligned.o unwind.o
 #O_OBJS   := fpreg.o
index e289efab6cc6a0cb3655a1d13d9f96517faaa350..078d908c82ef5eb52fb96b0a50a0f895a2b2dfd6 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/config.h>
 
 #include <linux/init.h>
+#include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/smp.h>
@@ -22,7 +23,6 @@
 #include <asm/efi.h>
 #include <asm/io.h>
 #include <asm/iosapic.h>
-#include <asm/irq.h>
 
 #undef ACPI_DEBUG              /* Guess what this does? */
 
@@ -83,8 +83,8 @@ acpi_iosapic(char *p)
         */
 #ifdef CONFIG_IA64_DIG
        acpi_entry_iosapic_t *iosapic = (acpi_entry_iosapic_t *) p;
-       unsigned int ver;
-       int l, v, pins;
+       unsigned int ver, v;
+       int l, pins;
 
        ver = iosapic_version(iosapic->address);
        pins = (ver >> 16) & 0xff;
@@ -94,9 +94,11 @@ acpi_iosapic(char *p)
               iosapic->irq_base, iosapic->irq_base + pins);
        
        for (l = 0; l < pins; l++) {
-               v = map_legacy_irq(iosapic->irq_base + l);
+               v = iosapic->irq_base + l;
+               if (v < 16)
+                       v = isa_irq_to_vector(v);
                if (v > IA64_MAX_VECTORED_IRQ) {
-                       printk("    !!! IRQ %d > 255\n", v);
+                       printk("    !!! bad IOSAPIC interrupt vector: %u\n", v);
                        continue;
                }
                /* XXX Check for IOSAPIC collisions */
@@ -115,7 +117,7 @@ static void __init
 acpi_legacy_irq(char *p)
 {
        /*
-        * This is not good.  ACPI is not necessarily limited to CONFIG_IA64_SV, yet
+        * This is not good.  ACPI is not necessarily limited to CONFIG_IA64_DIG, yet
         * ACPI does not necessarily imply IOSAPIC either.  Perhaps there should be
         * a means for platform_setup() to register ACPI handlers?
         */
@@ -124,7 +126,7 @@ acpi_legacy_irq(char *p)
        unsigned char vector; 
        int i;
 
-       vector = map_legacy_irq(legacy->isa_irq);
+       vector = isa_irq_to_vector(legacy->isa_irq);
 
        /*
         * Clobber any old pin mapping.  It may be that it gets replaced later on
index 6e0d09ea7f919815ed9ce20a6866da1bf4ac96e4..fc2d50558d0ea20d4f8afe8b5f6493fbb7efad72 100644 (file)
@@ -227,8 +227,8 @@ efi_init (void)
                panic("Woah! Can't find EFI system table.\n");
        if (efi.systab->hdr.signature != EFI_SYSTEM_TABLE_SIGNATURE) 
                panic("Woah! EFI system table signature incorrect\n");
-       if (efi.systab->hdr.revision != EFI_SYSTEM_TABLE_REVISION)
-               printk("Warning: EFI system table version mismatch: "
+       if ((efi.systab->hdr.revision ^ EFI_SYSTEM_TABLE_REVISION) >> 16 != 0)
+               printk("Warning: EFI system table major version mismatch: "
                       "got %d.%02d, expected %d.%02d\n",
                       efi.systab->hdr.revision >> 16, efi.systab->hdr.revision & 0xffff,
                       EFI_SYSTEM_TABLE_REVISION >> 16, EFI_SYSTEM_TABLE_REVISION & 0xffff);
index 47b972cb492f7c522ed7c42392f1a178fe25be15..eb575a39c843f3f529641df4a96704b187a0add9 100644 (file)
@@ -738,7 +738,7 @@ handle_syscall_error:
        st8.spill [r2]=r9       // store errno in pt_regs.r8 and set unat bit
        st8.spill [r3]=r10      // store error indication in pt_regs.r10 and set unat bit
        br.cond.sptk.many ia64_leave_kernel
-       .endp __ret_from_syscall
+       .endp handle_syscall_error
 
 #ifdef CONFIG_SMP
        /*
@@ -767,7 +767,9 @@ invoke_schedule_tail:
 invoke_do_softirq:
        alloc loc0=ar.pfs,8,2,0,0
        mov loc1=rp
+(pEOI) mov cr.eoi=r0
        ;;
+(pEOI) cmp.ne pEOI,p0=r0,r0
        br.call.sptk.few rp=do_softirq
 .ret9:
        mov ar.pfs=loc0
index 212ff299c567c89b7329be99b9cd1cf28bd2d9f1..23ded0730eec945d8f2122b4043ca84c7869e030 100644 (file)
@@ -139,6 +139,24 @@ pal_emulator_static:
        movl r9 =0x100000064            /* proc_ratio (1/100) */
        movl r10=0x100000100            /* bus_ratio<<32 (1/256) */
        movl r11=0x100000064            /* itc_ratio<<32 (1/100) */
+       ;;
+1:     cmp.eq p6,p7=1,r28              /* PAL_CACHE_FLUSH */
+(p7)   br.cond.sptk.few 1f
+       mov r9=ar.lc
+       movl r8=524288                  /* flush 512k million cache lines (16MB) */
+       ;;
+       mov ar.lc=r8
+       movl r8=0xe000000000000000
+       ;;
+.loop: fc r8
+       add r8=32,r8
+       br.cloop.sptk.few .loop
+       sync.i
+       ;;
+       srlz.i
+       ;;
+       mov ar.lc=r9
+       mov r8=r0
 1:     br.cond.sptk.few rp
        .endp pal_emulator_static\n");
 
index 65de8e589712e7ccd472e4232ea5237d1c0c9a8d..a710870c033f1a90f2ea12827e6a39b2a34b4d3a 100644 (file)
@@ -82,7 +82,7 @@ ia64_sigtramp:
        br.call.sptk.many rp=invoke_sighandler
 .ret0: mov r15=__NR_rt_sigreturn
        break __BREAK_SYSCALL
-       .endp ia64_sigramp
+       .endp ia64_sigtramp
 
        .proc invoke_sighandler
 invoke_sighandler:
@@ -167,7 +167,7 @@ back_from_restore_rbs:
        br.ret.sptk.few b6
 cont:  mov ar.pfs=r8                           // ar.pfs = CFM0
        br.ret.sptk.few rp                      // re-establish CFM0
-       .endp invoke_signal_handler
+       .endp invoke_sighandler
 
        .proc setup_rbs
 setup_rbs:
index 6059e41c6b20eaa758f759ba975436fcbe6005bc..0ddfe3f05209e4ef62d083a17e76e4b20416c60b 100644 (file)
 /*
- * linux/arch/ia64/kernel/irq.c
+ *     linux/arch/ia64/kernel/irq.c
  *
- * Copyright (C) 1998-2000 Hewlett-Packard Co
- * Copyright (C) 1998, 1999 Stephane Eranian <eranian@hpl.hp.com>
- * Copyright (C) 1999-2000 David Mosberger-Tang <davidm@hpl.hp.com>
+ *     Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
  *
- *  6/10/99: Updated to bring in sync with x86 version to facilitate
- *          support for SMP and different interrupt controllers.
+ * 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.
  */
 
-#include <linux/config.h>
+/*
+ * (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/sched.h>
+#include <linux/config.h>
+#include <linux/ptrace.h>
 #include <linux/errno.h>
-#include <linux/init.h>
-#include <linux/interrupt.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
 #include <linux/ioport.h>
-#include <linux/kernel_stat.h>
+#include <linux/interrupt.h>
+#include <linux/timex.h>
 #include <linux/malloc.h>
-#include <linux/ptrace.h>
-#include <linux/random.h>      /* for rand_initialize_irq() */
-#include <linux/signal.h>
-#include <linux/smp.h>
+#include <linux/random.h>
 #include <linux/smp_lock.h>
-#include <linux/threads.h>
-
-#ifdef CONFIG_KDB
-# include <linux/kdb.h>
-#endif
+#include <linux/init.h>
+#include <linux/kernel_stat.h>
+#include <linux/irq.h>
+#include <linux/proc_fs.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/io.h>
 #include <asm/irq.h>
-#include <asm/machvec.h>
-#include <asm/pgtable.h>
-#include <asm/system.h>
 
-/* This is used to detect bad usage of probe_irq_on()/probe_irq_off().  */
-#define PROBE_IRQ_COOKIE       0xfeedC0FFEE
 
-struct irq_desc irq_desc[NR_IRQS];
 
 /*
- * Micro-access to controllers is serialized over the whole
- * system. We never hold this lock when we call the actual
- * IRQ handler.
+ * 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.
  */
-spinlock_t irq_controller_lock;
 
-#ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC
-spinlock_t ivr_read_lock;
-#endif
+irq_cpustat_t irq_stat [NR_CPUS];
 
-unsigned int local_bh_count[NR_CPUS];
 /*
- * used in irq_enter()/irq_exit()
+ * Controller mappings for all interrupt sources:
  */
-unsigned int local_irq_count[NR_CPUS];
+irq_desc_t irq_desc[NR_IRQS] __cacheline_aligned =
+       { [0 ... NR_IRQS-1] = { 0, &no_irq_type, NULL, 0, SPIN_LOCK_UNLOCKED}};
 
-static struct irqaction timer_action = { NULL, 0, 0, NULL, NULL, NULL};
+static void register_irq_proc (unsigned int irq);
 
-#ifdef CONFIG_SMP
-static struct irqaction ipi_action = { NULL, 0, 0, NULL, NULL, NULL};
-#endif
+/*
+ * Special irq handlers.
+ */
+
+void no_action(int cpl, void *dev_id, struct pt_regs *regs) { }
 
 /*
- * Legacy IRQ to IA-64 vector translation table.  Any vector not in
- * this table maps to itself (ie: irq 0x30 => IA64 vector 0x30)
+ * Generic no controller code
  */
-__u8 irq_to_vector_map[IA64_MIN_VECTORED_IRQ] = {
-       /* 8259 IRQ translation, first 16 entries */
-       TIMER_IRQ, 0x50, 0x0f, 0x51, 0x52, 0x53, 0x43, 0x54,
-       0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x40, 0x41,
-};
 
+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)
+{
 /*
- * Reverse of the above table.
+ * 'what should we do if we get a hw irq event on an illegal vector'.
+ * each architecture has to answer this themselves, it doesnt deserve
+ * a generic callback i think.
  */
-static __u8 vector_to_legacy_map[256];
+#if CONFIG_X86
+       printk("unexpected IRQ trap at vector %02x\n", irq);
+#ifdef CONFIG_X86_LOCAL_APIC
+       /*
+        * Currently unexpected vectors happen only on SMP and APIC.
+        * We _must_ ack these because every local APIC has only N
+        * irq slots per priority level, and a 'hanging, unacked' IRQ
+        * holds up an irq slot - in excessive cases (when multiple
+        * unexpected vectors occur) that might lock up the APIC
+        * completely.
+        */
+       ack_APIC_irq();
+#endif
+#endif
+#if CONFIG_IA64
+       printk("Unexpected irq vector 0x%x on CPU %u!\n", irq, smp_processor_id());
+#endif
+}
+
+/* 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
+};
+
+volatile unsigned long irq_err_count;
 
 /*
- * used by proc fs (/proc/interrupts)
+ * Generic, controller-independent functions:
  */
-int
-get_irq_list (char *buf)
+
+int get_irq_list(char *buf)
 {
-       int i;
+       int i, j;
        struct irqaction * action;
        char *p = buf;
 
-#ifdef CONFIG_SMP
        p += sprintf(p, "           ");
-       for (i = 0; i < smp_num_cpus; i++)
-               p += sprintf(p, "CPU%d       ", i);
+       for (j=0; j<smp_num_cpus; j++)
+               p += sprintf(p, "CPU%d       ",j);
        *p++ = '\n';
-#endif
-       /*
-        * Simply scans the external vectored interrupts
-        */
-       for (i = 0; i < NR_IRQS; i++) {
+
+       for (i = 0 ; i < NR_IRQS ; i++) {
                action = irq_desc[i].action;
                if (!action) 
                        continue;
@@ -107,356 +148,496 @@ get_irq_list (char *buf)
 #ifndef CONFIG_SMP
                p += sprintf(p, "%10u ", kstat_irqs(i));
 #else
-               {
-                       int j;
-                       for (j = 0; j < smp_num_cpus; j++)
-                               p += sprintf(p, "%10u ",
-                                            kstat.irqs[cpu_logical_map(j)][i]);
-               }
+               for (j = 0; j < smp_num_cpus; j++)
+                       p += sprintf(p, "%10u ",
+                               kstat.irqs[cpu_logical_map(j)][i]);
 #endif
                p += sprintf(p, " %14s", irq_desc[i].handler->typename);
-               p += sprintf(p, "  %c%s", (action->flags & SA_INTERRUPT) ? '+' : ' ',
-                            action->name);
+               p += sprintf(p, "  %s", action->name);
 
-               for (action = action->next; action; action = action->next) {
-                       p += sprintf(p, ", %c%s",
-                                    (action->flags & SA_INTERRUPT)?'+':' ',
-                                    action->name);
-               }
+               for (action=action->next; action; action = action->next)
+                       p += sprintf(p, ", %s", action->name);
                *p++ = '\n';
        }
+       p += sprintf(p, "NMI: ");
+       for (j = 0; j < smp_num_cpus; j++)
+               p += sprintf(p, "%10u ",
+                       atomic_read(&nmi_counter(cpu_logical_map(j))));
+       p += sprintf(p, "\n");
+#if CONFIG_SMP
+       p += sprintf(p, "LOC: ");
+       for (j = 0; j < smp_num_cpus; j++)
+               p += sprintf(p, "%10u ",
+                       apic_timer_irqs[cpu_logical_map(j)]);
+       p += sprintf(p, "\n");
+#endif
+       p += sprintf(p, "ERR: %10lu\n", irq_err_count);
        return p - buf;
 }
 
-int usbfix;
 
-static int __init
-usbfix_option (char *str)
+/*
+ * Global interrupt locks for SMP. Allow interrupts to come in on any
+ * CPU, yet make cli/sti act globally to protect critical regions..
+ */
+
+#ifdef CONFIG_SMP
+unsigned char global_irq_holder = NO_PROC_ID;
+unsigned volatile int global_irq_lock;
+
+extern void show_stack(unsigned long* esp);
+
+static void show(char * str)
 {
-       printk("irq: enabling USB workaround\n");
-       usbfix = 1;
-       return 1;
+       int i;
+       int cpu = smp_processor_id();
+
+       printk("\n%s, CPU %d:\n", str, cpu);
+       printk("irq:  %d [",irqs_running());
+       for(i=0;i < smp_num_cpus;i++)
+               printk(" %d",local_irq_count(i));
+       printk(" ]\nbh:   %d [",spin_is_locked(&global_bh_lock) ? 1 : 0);
+       for(i=0;i < smp_num_cpus;i++)
+               printk(" %d",local_bh_count(i));
+
+       printk(" ]\nStack dumps:");
+       for(i=0;i< smp_num_cpus;i++) {
+               unsigned long esp;
+               if(i==cpu)
+                       continue;
+               printk("\nCPU %d:",i);
+               esp = init_tss[i].esp0;
+               if(esp==NULL) {
+                       /* tss->esp0 is set to NULL in cpu_init(),
+                        * it's initialized when the cpu returns to user
+                        * space. -- manfreds
+                        */
+                       printk(" <unknown> ");
+                       continue;
+               }
+               esp &= ~(THREAD_SIZE-1);
+               esp += sizeof(struct task_struct);
+               show_stack((void*)esp);
+       }
+       printk("\nCPU %d:",cpu);
+       show_stack(NULL);
+       printk("\n");
 }
+       
+#define MAXCOUNT 100000000
 
-__setup("usbfix", usbfix_option);
+/*
+ * I had a lockup scenario where a tight loop doing
+ * spin_unlock()/spin_lock() on CPU#1 was racing with
+ * spin_lock() on CPU#0. CPU#0 should have noticed spin_unlock(), but
+ * apparently the spin_unlock() information did not make it
+ * through to CPU#0 ... nasty, is this by design, do we have to limit
+ * 'memory update oscillation frequency' artificially like here?
+ *
+ * Such 'high frequency update' races can be avoided by careful design, but
+ * some of our major constructs like spinlocks use similar techniques,
+ * it would be nice to clarify this issue. Set this define to 0 if you
+ * want to check whether your system freezes.  I suspect the delay done
+ * by SYNC_OTHER_CORES() is in correlation with 'snooping latency', but
+ * i thought that such things are guaranteed by design, since we use
+ * the 'LOCK' prefix.
+ */
+#define SUSPECTED_CPU_OR_CHIPSET_BUG_WORKAROUND 0
 
+#if SUSPECTED_CPU_OR_CHIPSET_BUG_WORKAROUND
+# define SYNC_OTHER_CORES(x) udelay(x+1)
+#else
 /*
- * That's where the IVT branches when we get an external
- * interrupt. This branches to the correct hardware IRQ handler via
- * function ptr.
+ * We have to allow irqs to arrive between __sti and __cli
  */
-void
-ia64_handle_irq (unsigned long irq, struct pt_regs *regs)
+# define SYNC_OTHER_CORES(x) __asm__ __volatile__ ("nop")
+#endif
+
+static inline void wait_on_irq(int cpu)
 {
-       unsigned long bsp, sp, saved_tpr;
-
-#ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC
-# ifndef CONFIG_SMP
-       static unsigned int max_prio = 0;
-# endif
-       unsigned int prev_prio;
-       unsigned long eoi_ptr;
-# ifdef CONFIG_USB
-       extern void reenable_usb (void);
-       extern void disable_usb (void);
-
-       if (usbfix)
-               disable_usb();
-# endif
-       /*
-        * Stop IPIs by getting the ivr_read_lock
-        */
-       spin_lock(&ivr_read_lock);
+       int count = MAXCOUNT;
+
+       for (;;) {
+
+               /*
+                * Wait until all interrupts are gone. Wait
+                * for bottom half handlers unless we're
+                * already executing in one..
+                */
+               if (!irqs_running())
+                       if (local_bh_count(cpu) || !spin_is_locked(&global_bh_lock))
+                               break;
+
+               /* Duh, we have to loop. Release the lock to avoid deadlocks */
+               clear_bit(0,&global_irq_lock);
+
+               for (;;) {
+                       if (!--count) {
+                               show("wait_on_irq");
+                               count = ~0;
+                       }
+                       __sti();
+                       SYNC_OTHER_CORES(cpu);
+                       __cli();
+                       if (irqs_running())
+                               continue;
+                       if (global_irq_lock)
+                               continue;
+                       if (!local_bh_count(cpu) && spin_is_locked(&global_bh_lock))
+                               continue;
+                       if (!test_and_set_bit(0,&global_irq_lock))
+                               break;
+               }
+       }
+}
 
-       /*
-        * Disable PCI writes
-        */
-       outl(0x80ff81c0, 0xcf8);
-       outl(0x73002188, 0xcfc);
-       eoi_ptr = inl(0xcfc);
+/*
+ * This is called when we want to synchronize with
+ * interrupts. We may for example tell a device to
+ * stop sending interrupts: but to make sure there
+ * are no interrupts that are executing on another
+ * CPU we need to call this function.
+ */
+void synchronize_irq(void)
+{
+       if (irqs_running()) {
+               /* Stupid approach */
+               cli();
+               sti();
+       }
+}
 
-       irq = ia64_get_ivr();
+static inline void get_irqlock(int cpu)
+{
+       if (test_and_set_bit(0,&global_irq_lock)) {
+               /* do we already hold the lock? */
+               if ((unsigned char) cpu == global_irq_holder)
+                       return;
+               /* Uhhuh.. Somebody else got it. Wait.. */
+               do {
+                       do {
+                       } while (test_bit(0,&global_irq_lock));
+               } while (test_and_set_bit(0,&global_irq_lock));         
+       }
+       /* 
+        * We also to make sure that nobody else is running
+        * in an interrupt context. 
+        */
+       wait_on_irq(cpu);
 
        /*
-        * Enable PCI writes
+        * Ok, finally..
         */
-       outl(0x73182188, 0xcfc);
-
-       spin_unlock(&ivr_read_lock);
+       global_irq_holder = cpu;
+}
 
-# ifdef CONFIG_USB
-       if (usbfix)
-               reenable_usb();
-# endif
+#define EFLAGS_IF_SHIFT 9
 
-# ifndef CONFIG_SMP
-       prev_prio = max_prio;
-       if (irq < max_prio) {
-               printk ("ia64_handle_irq: got irq %lu while %u was in progress!\n",
-                       irq, max_prio);
-               
-       } else
-               max_prio = irq;
-# endif /* !CONFIG_SMP */
-#endif /* CONFIG_ITANIUM_ASTEP_SPECIFIC */
-
-       /* Always set TPR to limit maximum interrupt nesting depth to
-        * 16 (without this, it would be ~240, which could easily lead
-        * to kernel stack overflows.
-        */
-       saved_tpr = ia64_get_tpr();
-       ia64_srlz_d();
-       ia64_set_tpr(irq);
-       ia64_srlz_d();
-
-       asm ("mov %0=ar.bsp" : "=r"(bsp));
-       asm ("mov %0=sp" : "=r"(sp));
-
-       if ((sp - bsp) < 1024) {
-               static long last_time;
-               static unsigned char count;
-
-               if (count > 5 && jiffies - last_time > 5*HZ)
-                       count = 0;
-               if (++count < 5) {
-                       last_time = jiffies;
-                       printk("ia64_handle_irq: DANGER: less than 1KB of free stack space!!\n"
-                              "(bsp=0x%lx, sp=%lx)\n", bsp, sp);
-               }
-#ifdef CONFIG_KDB
-               kdb(KDB_REASON_PANIC, 0, regs);
-#endif         
+/*
+ * A global "cli()" while in an interrupt context
+ * turns into just a local cli(). Interrupts
+ * should use spinlocks for the (very unlikely)
+ * case that they ever want to protect against
+ * each other.
+ *
+ * If we already have local interrupts disabled,
+ * this will not turn a local disable into a
+ * global one (problems with spinlocks: this makes
+ * save_flags+cli+sti usable inside a spinlock).
+ */
+void __global_cli(void)
+{
+       unsigned int flags;
+
+       __save_flags(flags);
+       if (flags & (1 << EFLAGS_IF_SHIFT)) {
+               int cpu = smp_processor_id();
+               __cli();
+               if (!local_irq_count(cpu))
+                       get_irqlock(cpu);
        }
+}
 
-       /*
-        * The interrupt is now said to be in service
-        */
-       if (irq >= NR_IRQS) {
-               printk("handle_irq: invalid irq=%lu\n", irq);
-               goto out;
-       }
+void __global_sti(void)
+{
+       int cpu = smp_processor_id();
 
-       ++kstat.irqs[smp_processor_id()][irq];
+       if (!local_irq_count(cpu))
+               release_irqlock(cpu);
+       __sti();
+}
 
-       if (irq == IA64_SPURIOUS_INT) {
-               printk("handle_irq: spurious interrupt\n");
-               goto out;
-       }
+/*
+ * SMP flags value to restore to:
+ * 0 - global cli
+ * 1 - global sti
+ * 2 - local cli
+ * 3 - local sti
+ */
+unsigned long __global_save_flags(void)
+{
+       int retval;
+       int local_enabled;
+       unsigned long flags;
+       int cpu = smp_processor_id();
 
-       /* 
-        * Handle the interrupt by calling the hardware specific handler (IOSAPIC, Internal, etc).
-        */
-       (*irq_desc[irq].handler->handle)(irq, regs);
-  out:
-#ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC
-       {
-               long pEOI;
-
-               asm ("mov %0=0;; (p1) mov %0=1" : "=r"(pEOI));
-               if (!pEOI) {
-                       printk("Yikes: ia64_handle_irq() without pEOI!!\n");
-                       asm volatile ("cmp.eq p1,p0=r0,r0" : "=r"(pEOI));
-# ifdef CONFIG_KDB
-                       kdb(KDB_REASON_PANIC, 0, regs);
-# endif
-               }
+       __save_flags(flags);
+       local_enabled = (flags >> EFLAGS_IF_SHIFT) & 1;
+       /* default to local */
+       retval = 2 + local_enabled;
+
+       /* check for global flags if we're not in an interrupt */
+       if (!local_irq_count(cpu)) {
+               if (local_enabled)
+                       retval = 1;
+               if (global_irq_holder == cpu)
+                       retval = 0;
        }
+       return retval;
+}
 
-       local_irq_disable();
-# ifndef CONFIG_SMP
-       if (max_prio == irq)
-               max_prio = prev_prio;
-# endif /* !CONFIG_SMP */
-#endif /* CONFIG_ITANIUM_ASTEP_SPECIFIC */
-
-       ia64_srlz_d();
-       ia64_set_tpr(saved_tpr);
-       ia64_srlz_d();
+void __global_restore_flags(unsigned long flags)
+{
+       switch (flags) {
+       case 0:
+               __global_cli();
+               break;
+       case 1:
+               __global_sti();
+               break;
+       case 2:
+               __cli();
+               break;
+       case 3:
+               __sti();
+               break;
+       default:
+               printk("global_restore_flags: %08lx (%08lx)\n",
+                       flags, (&flags)[-1]);
+       }
 }
 
+#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.
+ * 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
-invoke_irq_handlers (unsigned int irq, struct pt_regs *regs, struct irqaction *action)
+int handle_IRQ_event(unsigned int irq, struct pt_regs * regs, struct irqaction * action)
 {
-       void (*handler)(int, void *, struct pt_regs *);
-       unsigned long flags, flags_union = 0;
+       int status;
        int cpu = smp_processor_id();
-       unsigned int requested_irq;
-       void *dev_id;
 
        irq_enter(cpu, irq);
 
-       if ((action->flags & SA_INTERRUPT) == 0)
+       status = 1;     /* Force the "do bottom halves" bit */
+
+       if (!(action->flags & SA_INTERRUPT))
                __sti();
 
        do {
-               flags = action->flags;
-               requested_irq = irq;
-               if ((flags & SA_LEGACY) != 0)
-                       requested_irq = vector_to_legacy_map[irq];
-               flags_union |= flags;
-               handler = action->handler;
-               dev_id = action->dev_id;
+               status |= action->flags;
+               action->handler(irq, action->dev_id, regs);
                action = action->next;
-               (*handler)(requested_irq, dev_id, regs);
        } while (action);
-       if ((flags_union & SA_SAMPLE_RANDOM) != 0)
+       if (status & SA_SAMPLE_RANDOM)
                add_interrupt_randomness(irq);
        __cli();
 
        irq_exit(cpu, irq);
-       return flags_union | 1; /* force the "do bottom halves" bit */
+
+       return status;
 }
 
-void
-disable_irq_nosync (unsigned int irq)
+/*
+ * 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. 
+ */
+void inline disable_irq_nosync(unsigned int irq)
 {
+       irq_desc_t *desc = irq_desc + irq;
        unsigned long flags;
 
-       irq = map_legacy_irq(irq);
-
-       spin_lock_irqsave(&irq_controller_lock, flags);
-       if (irq_desc[irq].depth++ > 0) {
-               irq_desc[irq].status &= ~IRQ_ENABLED;
-               irq_desc[irq].handler->disable(irq);
+       spin_lock_irqsave(&desc->lock, flags);
+       if (!desc->depth++) {
+               desc->status |= IRQ_DISABLED;
+               desc->handler->disable(irq);
        }
-       spin_unlock_irqrestore(&irq_controller_lock, flags);
+       spin_unlock_irqrestore(&desc->lock, flags);
 }
 
 /*
  * Synchronous version of the above, making sure the IRQ is
  * no longer running on any other IRQ..
  */
-void
-disable_irq (unsigned int irq)
+void disable_irq(unsigned int irq)
 {
        disable_irq_nosync(irq);
 
-       irq = map_legacy_irq(irq);
-
-       if (!local_irq_count[smp_processor_id()]) {
+       if (!local_irq_count(smp_processor_id())) {
                do {
                        barrier();
-               } while ((irq_desc[irq].status & IRQ_INPROGRESS) != 0);
+               } while (irq_desc[irq].status & IRQ_INPROGRESS);
        }
 }
 
-void
-enable_irq (unsigned int irq)
+void enable_irq(unsigned int irq)
 {
+       irq_desc_t *desc = irq_desc + irq;
        unsigned long flags;
 
-       irq = map_legacy_irq(irq);
-
-       spin_lock_irqsave(&irq_controller_lock, flags);
-       switch (irq_desc[irq].depth) {
-             case 1:
-               irq_desc[irq].status |= IRQ_ENABLED;
-               (*irq_desc[irq].handler->enable)(irq);
-               /* fall through */
-             default:
-               --irq_desc[irq].depth;
+       spin_lock_irqsave(&desc->lock, flags);
+       switch (desc->depth) {
+       case 1: {
+               unsigned int status = desc->status & ~IRQ_DISABLED;
+               desc->status = status;
+               if ((status & (IRQ_PENDING | IRQ_REPLAY)) == IRQ_PENDING) {
+                       desc->status = status | IRQ_REPLAY;
+                       hw_resend_irq(desc->handler,irq);
+               }
+               desc->handler->enable(irq);
+               /* fall-through */
+       }
+       default:
+               desc->depth--;
                break;
-
-             case 0:
-               printk("enable_irq: unbalanced from %p\n", __builtin_return_address(0));
+       case 0:
+               printk("enable_irq() unbalanced from %p\n",
+                      __builtin_return_address(0));
        }
-       spin_unlock_irqrestore(&irq_controller_lock, flags);
+       spin_unlock_irqrestore(&desc->lock, flags);
 }
 
 /*
- * This function encapsulates the initialization that needs to be
- * performed under the protection of lock irq_controller_lock.  The
- * lock must have been acquired by the time this is called.
+ * do_IRQ handles all normal device IRQ's (the special
+ * SMP cross-CPU interrupts have their own specific
+ * handlers).
  */
-static inline int
-setup_irq (unsigned int irq, struct irqaction *new)
-{
-       int shared = 0;
-       struct irqaction *old, **p;
+unsigned int do_IRQ(unsigned long 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)
+        */
+       int cpu = smp_processor_id();
+       irq_desc_t *desc = irq_desc + irq;
+       struct irqaction * action;
+       unsigned int status;
 
-       p = &irq_desc[irq].action;
-       old = *p;
-       if (old) {
-               if (!(old->flags & new->flags & SA_SHIRQ)) {
-                       return -EBUSY;
-               }
-               /* add new interrupt at end of irq queue */
-               do {
-                       p = &old->next;
-                       old = *p;
-               } while (old);
-               shared = 1;
+       kstat.irqs[cpu][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 (!(status & (IRQ_DISABLED | IRQ_INPROGRESS))) {
+               action = desc->action;
+               status &= ~IRQ_PENDING; /* we commit to handling */
+               status |= IRQ_INPROGRESS; /* we are handling it */
        }
-       *p = new;
+       desc->status = status;
 
-       /* when sharing do not unmask */
-       if (!shared) {
-               irq_desc[irq].depth = 0;
-               irq_desc[irq].status |= IRQ_ENABLED;
-               (*irq_desc[irq].handler->startup)(irq);
+       /*
+        * If there is no IRQ handler or it was disabled, exit early.
+          Since we set PENDING, if another processor is handling
+          a different instance of this same irq, the other processor
+          will take care of it.
+        */
+       if (!action)
+{
+       desc->status = status & ~IRQ_INPROGRESS;
+               goto out;
+}
+
+       /*
+        * Edge triggered interrupts need to remember
+        * pending events.
+        * This applies to any hw interrupts that allow a second
+        * instance of the same irq to arrive while we are in do_IRQ
+        * or in the handler. But the code here only handles the _second_
+        * instance of the irq, not the third or fourth. So it is mostly
+        * useful for irq hardware that does not mask cleanly in an
+        * SMP environment.
+        */
+       for (;;) {
+               spin_unlock(&desc->lock);
+               handle_IRQ_event(irq, regs, action);
+               spin_lock(&desc->lock);
+               
+               if (!(desc->status & IRQ_PENDING))
+                       break;
+               desc->status &= ~IRQ_PENDING;
        }
-       return 0;
+       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);
+
+#if 0
+       /*
+        * let kernel exit path take care of this; we want to do the
+        * CPU EOI before doing softirq() so a new interrupt can come
+        * through
+        */
+       if (softirq_state[cpu].active & softirq_state[cpu].mask)
+               do_softirq();
+#endif
+       return 1;
 }
 
-int
-request_irq (unsigned int requested_irq, void (*handler)(int, void *, struct pt_regs *),
-            unsigned long irqflags, const char * devname, void *dev_id)
+int request_irq(unsigned int irq, 
+               void (*handler)(int, void *, struct pt_regs *),
+               unsigned long irqflags, 
+               const char * devname,
+               void *dev_id)
 {
-       int retval, need_kfree = 0;
-       struct irqaction *action;
-       unsigned long flags;
-       unsigned int irq;
+       int retval;
+       struct irqaction * action;
 
-#ifdef IA64_DEBUG
-       printk("request_irq(0x%x) called\n", requested_irq);
-#endif
+#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) && !dev_id)
-               printk("Bad boy: %s (at %p) called us without a dev_id!\n",
-                      devname, current_text_addr());
-
-       irq = map_legacy_irq(requested_irq);
-       if (irq != requested_irq)
-               irqflags |= SA_LEGACY;
+       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;
 
-       /*
-        * The timer_action and ipi_action cannot be allocated
-        * dynamically because its initialization happens really early
-        * on in init/main.c at this point the memory allocator has
-        * not yet been initialized.  So we use a statically reserved
-        * buffer for it. In some sense that's no big deal because we
-        * need one no matter what.
-        */
-       if (irq == TIMER_IRQ)
-               action = &timer_action;
-#ifdef CONFIG_SMP
-       else if (irq == IPI_IRQ)
-               action = &ipi_action;
-#endif
-       else {
-               action = kmalloc(sizeof(struct irqaction), GFP_KERNEL);
-               need_kfree = 1;
-       }
-
+       action = (struct irqaction *)
+                       kmalloc(sizeof(struct irqaction), GFP_KERNEL);
        if (!action)
                return -ENOMEM;
 
@@ -467,208 +648,412 @@ request_irq (unsigned int requested_irq, void (*handler)(int, void *, struct pt_
        action->next = NULL;
        action->dev_id = dev_id;
 
-       if ((irqflags & SA_SAMPLE_RANDOM) != 0)
-               rand_initialize_irq(irq);
-
-       spin_lock_irqsave(&irq_controller_lock, flags);
        retval = setup_irq(irq, action);
-       spin_unlock_irqrestore(&irq_controller_lock, flags);
-
-       if (need_kfree && retval)
+       if (retval)
                kfree(action);
-
        return retval;
 }
                
-void
-free_irq (unsigned int irq, void *dev_id)
+void free_irq(unsigned int irq, void *dev_id)
 {
-       struct irqaction *action, **p;
+       irq_desc_t *desc;
+       struct irqaction **p;
        unsigned long flags;
 
-       /*
-        * some sanity checks first
-        */
-       if (irq >= NR_IRQS) {
-               printk("Trying to free IRQ%d\n",irq);
+       if (irq >= NR_IRQS)
                return;
-       }
 
-       irq = map_legacy_irq(irq);
-
-       /*
-        * Find the corresponding irqaction
-        */
-       spin_lock_irqsave(&irq_controller_lock, flags);
-       for (p = &irq_desc[irq].action; (action = *p) != NULL; p = &action->next) {
-               if (action->dev_id != dev_id)
-                       continue;
-
-               /* Found it - now remove it from the list of entries */
-               *p = action->next;
-               if (!irq_desc[irq].action) {
-                       irq_desc[irq].status &= ~IRQ_ENABLED;
-                       (*irq_desc[irq].handler->shutdown)(irq);
-               }
-
-               spin_unlock_irqrestore(&irq_controller_lock, flags);
+       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);
 
 #ifdef CONFIG_SMP
-               /* Wait to make sure it's not being used on another CPU */
-               while (irq_desc[irq].status & IRQ_INPROGRESS)
-                       barrier();
+                       /* Wait to make sure it's not being used on another CPU */
+                       while (desc->status & IRQ_INPROGRESS)
+                               barrier();
 #endif
-
-               if (action != &timer_action
-#ifdef CONFIG_SMP
-                   && action != &ipi_action
-#endif
-                  )
                        kfree(action);
+                       return;
+               }
+               printk("Trying to free free IRQ%d\n",irq);
+               spin_unlock_irqrestore(&desc->lock,flags);
                return;
        }
-       printk("Trying to free free IRQ%d\n", irq);
 }
 
 /*
- * IRQ autodetection code.  Note that the return value of
- * probe_irq_on() is no longer being used (it's role has been replaced
- * by the IRQ_AUTODETECT flag).
+ * 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.
  */
-unsigned long
-probe_irq_on (void)
+unsigned long probe_irq_on(void)
 {
-       struct irq_desc *id;
+       unsigned int i;
+       irq_desc_t *desc;
+       unsigned long val;
        unsigned long delay;
 
-#ifdef IA64_DEBUG
-       printk("probe_irq_on() called\n");
-#endif
+       /* 
+        * 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(&irq_controller_lock);
-       for (id = irq_desc; id < irq_desc + NR_IRQS; ++id) {
-               if (!id->action) {
-                       id->status |= IRQ_AUTODETECT | IRQ_WAITING;
-                       (*id->handler->startup)(id - irq_desc);
-               }
+               spin_lock_irq(&desc->lock);
+               if (!irq_desc[i].action) 
+                       irq_desc[i].handler->startup(i);
+               spin_unlock_irq(&desc->lock);
        }
-       spin_unlock_irq(&irq_controller_lock);
 
-       /* wait for spurious interrupts to trigger: */
+       /* Wait for longstanding interrupts to trigger. */
+       for (delay = jiffies + HZ/50; time_after(delay, jiffies); )
+               /* about 20ms delay */ synchronize_irq();
 
-       for (delay = jiffies + HZ/10; time_after(delay, jiffies); )
-               /* about 100ms delay */
-               synchronize_irq();
-
-       /* filter out obviously spurious interrupts: */
-       spin_lock_irq(&irq_controller_lock);
-       for (id = irq_desc; id < irq_desc + NR_IRQS; ++id) {
-               unsigned int status = id->status;
+       /*
+        * 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);
+       }
 
-               if (!(status & IRQ_AUTODETECT))
-                       continue;
+       /*
+        * Wait for spurious interrupts to trigger
+        */
+       for (delay = jiffies + HZ/10; time_after(delay, jiffies); )
+               /* about 100ms delay */ synchronize_irq();
 
-               if (!(status & IRQ_WAITING)) {
-                       id->status = status & ~IRQ_AUTODETECT;
-                       (*id->handler->shutdown)(id - irq_desc);
+       /*
+        * 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);
        }
-       spin_unlock_irq(&irq_controller_lock);
-       return PROBE_IRQ_COOKIE;                /* return meaningless return value  */
+
+       return val;
 }
 
-int
-probe_irq_off (unsigned long cookie)
+/*
+ * Return a mask of triggered interrupts (this
+ * can handle only legacy ISA interrupts).
+ */
+unsigned int probe_irq_mask(unsigned long val)
 {
-       int irq_found, nr_irqs;
-       struct irq_desc *id;
+       int i;
+       unsigned int mask;
 
-#ifdef IA64_DEBUG
-       printk("probe_irq_off(cookie=0x%lx) -> ", cookie);
-#endif
+       mask = 0;
+       for (i = 0; i < 16; i++) {
+               irq_desc_t *desc = irq_desc + i;
+               unsigned int status;
 
-       if (cookie != PROBE_IRQ_COOKIE)
-               printk("bad irq probe from %p\n", __builtin_return_address(0));
+               spin_lock_irq(&desc->lock);
+               status = desc->status;
 
-       nr_irqs = 0;
-       irq_found = 0;
-       spin_lock_irq(&irq_controller_lock);
-       for (id = irq_desc + IA64_MIN_VECTORED_IRQ; id < irq_desc + NR_IRQS; ++id) {
-               unsigned int status = id->status;
+               if (status & IRQ_AUTODETECT) {
+                       if (!(status & IRQ_WAITING))
+                               mask |= 1 << i;
 
-               if (!(status & IRQ_AUTODETECT))
-                       continue;
+                       desc->status = status & ~IRQ_AUTODETECT;
+                       desc->handler->shutdown(i);
+               }
+               spin_unlock_irq(&desc->lock);
+       }
+
+       return mask & val;
+}
 
-               if (!(status & IRQ_WAITING)) {
-                       if (!nr_irqs)
-                               irq_found = (id - irq_desc);
-                       ++nr_irqs;
+/*
+ * Return the one interrupt that triggered (this can
+ * handle any interrupt source)
+ */
+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);
                }
-               id->status = status & ~IRQ_AUTODETECT;
-               (*id->handler->shutdown)(id - irq_desc);
+               spin_unlock_irq(&desc->lock);
        }
-       spin_unlock_irq(&irq_controller_lock);
 
        if (nr_irqs > 1)
                irq_found = -irq_found;
-
-#ifdef IA64_DEBUG
-       printk("%d\n", irq_found);
-#endif
        return irq_found;
 }
 
-#ifdef CONFIG_SMP
-
-void __init
-init_IRQ_SMP (void)
+/* this was setup_x86_irq but it seems pretty generic */
+int setup_irq(unsigned int irq, struct irqaction * new)
 {
-       if (request_irq(IPI_IRQ, handle_IPI, 0, "IPI", NULL))
-               panic("Could not allocate IPI Interrupt Handler!");
+       int shared = 0;
+       unsigned long flags;
+       struct irqaction *old, **p;
+       irq_desc_t *desc = irq_desc + irq;
+
+       /*
+        * Some drivers like serial.c use request_irq() heavily,
+        * so we have to be careful not to interfere with a
+        * running system.
+        */
+       if (new->flags & SA_SAMPLE_RANDOM) {
+               /*
+                * This function might sleep, we want to call it first,
+                * outside of the atomic block.
+                * Yes, this might clear the entropy pool if the wrong
+                * driver is attempted to be loaded, without actually
+                * installing a new handler, but is this really a problem,
+                * only the sysadmin is able to do this.
+                */
+               rand_initialize_irq(irq);
+       }
+
+       /*
+        * The following block of code has to be executed atomically
+        */
+       spin_lock_irqsave(&desc->lock,flags);
+       p = &desc->action;
+       if ((old = *p) != NULL) {
+               /* Can't share interrupts unless both agree to */
+               if (!(old->flags & new->flags & SA_SHIRQ)) {
+                       spin_unlock_irqrestore(&desc->lock,flags);
+                       return -EBUSY;
+               }
+
+               /* add new interrupt at end of irq queue */
+               do {
+                       p = &old->next;
+                       old = *p;
+               } while (old);
+               shared = 1;
+       }
+
+       *p = new;
+
+       if (!shared) {
+               desc->depth = 0;
+               desc->status &= ~IRQ_DISABLED;
+               desc->handler->startup(irq);
+       }
+       spin_unlock_irqrestore(&desc->lock,flags);
+
+       register_irq_proc(irq);
+       return 0;
 }
 
-#endif
+static struct proc_dir_entry * root_irq_dir;
+static struct proc_dir_entry * irq_dir [NR_IRQS];
+static struct proc_dir_entry * smp_affinity_entry [NR_IRQS];
+
+static unsigned long irq_affinity [NR_IRQS] = { [0 ... NR_IRQS-1] = ~0UL };
 
-void __init
-init_IRQ (void)
+#define HEX_DIGITS 8
+
+static int irq_affinity_read_proc (char *page, char **start, off_t off,
+                       int count, int *eof, void *data)
 {
+       if (count < HEX_DIGITS+1)
+               return -EINVAL;
+       return sprintf (page, "%08lx\n", irq_affinity[(long)data]);
+}
+
+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;
 
-       for (i = 0; i < IA64_MIN_VECTORED_IRQ; ++i)
-               vector_to_legacy_map[irq_to_vector_map[i]] = 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];
 
-       for (i = 0; i < NR_IRQS; ++i) {
-               irq_desc[i].handler = &irq_type_default;
+               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;
+}
 
-       irq_desc[TIMER_IRQ].handler = &irq_type_ia64_internal;
-#ifdef CONFIG_SMP
-       /* 
-        * Configure the IPI vector and handler
+static int irq_affinity_write_proc (struct file *file, const char *buffer,
+                                       unsigned long count, void *data)
+{
+       int irq = (long) data, full_count = count, err;
+       unsigned long new_value;
+
+       if (!irq_desc[irq].handler->set_affinity)
+               return -EIO;
+
+       err = parse_hex_value(buffer, count, &new_value);
+
+#if CONFIG_SMP
+       /*
+        * 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.
         */
-       irq_desc[IPI_IRQ].handler = &irq_type_ia64_internal;
-       init_IRQ_SMP();
+       if (!(new_value & cpu_online_map))
+               return -EINVAL;
 #endif
 
-       ia64_set_pmv(1 << 16);
-       ia64_set_cmcv(CMC_IRQ);                 /* XXX fix me */
+       irq_affinity[irq] = new_value;
+       irq_desc[irq].handler->set_affinity(irq, new_value);
 
-       platform_irq_init(irq_desc);
+       return full_count;
+}
 
-       /* clear TPR to enable all interrupt classes: */
-       ia64_set_tpr(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);
 }
 
-/* TBD:
- *     Certain IA64 platforms can have inter-processor interrupt support.
- *     This interface is supposed to default to the IA64 IPI block-based
- *     mechanism if the platform doesn't provide a separate mechanism
- *     for IPIs.
- *     Choices : (1) Extend hw_interrupt_type interfaces 
- *               (2) Use machine vector mechanism
- *     For now defining the following interface as a place holder.
- */
-void
-ipi_send (int cpu, int vector, int delivery_mode)
+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;
+
+       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)
+{
+       struct proc_dir_entry *entry;
+       char name [MAX_NAMELEN];
+
+       if (!root_irq_dir || (irq_desc[irq].handler == &no_irq_type))
+               return;
+
+       memset(name, 0, MAX_NAMELEN);
+       sprintf(name, "%d", irq);
+
+       /* create /proc/irq/1234 */
+       irq_dir[irq] = proc_mkdir(name, root_irq_dir);
+
+       /* create /proc/irq/1234/smp_affinity */
+       entry = create_proc_entry("smp_affinity", 0700, irq_dir[irq]);
+
+       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;
+}
+
+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", 0700, root_irq_dir);
+
+       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++) {
+               if (irq_desc[i].handler == &no_irq_type)
+                       continue;
+               register_irq_proc(i);
+       }
+}
+
diff --git a/arch/ia64/kernel/irq_default.c b/arch/ia64/kernel/irq_default.c
deleted file mode 100644 (file)
index bf8c626..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <linux/kernel.h>
-#include <linux/sched.h>
-
-#include <asm/irq.h>
-#include <asm/processor.h>
-#include <asm/ptrace.h>
-
-
-static int
-irq_default_handle_irq (unsigned int irq, struct pt_regs *regs)
-{
-       printk("Unexpected irq vector 0x%x on CPU %u!\n", irq, smp_processor_id());
-       return 0;               /* don't call do_bottom_half() for spurious interrupts */
-}
-
-static void
-irq_default_noop (unsigned int irq)
-{
-       /* nuthing to do... */
-}
-
-struct hw_interrupt_type irq_type_default = {
-       "default",
-       (void (*)(unsigned long)) irq_default_noop,     /* init */
-       irq_default_noop,                               /* startup */
-       irq_default_noop,                               /* shutdown */
-       irq_default_handle_irq,                         /* handle */
-       irq_default_noop,                               /* enable */
-       irq_default_noop                                /* disable */
-};
diff --git a/arch/ia64/kernel/irq_ia64.c b/arch/ia64/kernel/irq_ia64.c
new file mode 100644 (file)
index 0000000..a2c493b
--- /dev/null
@@ -0,0 +1,247 @@
+/*
+ * linux/arch/ia64/kernel/irq.c
+ *
+ * Copyright (C) 1998-2000 Hewlett-Packard Co
+ * Copyright (C) 1998, 1999 Stephane Eranian <eranian@hpl.hp.com>
+ * Copyright (C) 1999-2000 David Mosberger-Tang <davidm@hpl.hp.com>
+ *
+ *  6/10/99: Updated to bring in sync with x86 version to facilitate
+ *          support for SMP and different interrupt controllers.
+ */
+
+#include <linux/config.h>
+
+#include <linux/sched.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <linux/ioport.h>
+#include <linux/kernel_stat.h>
+#include <linux/malloc.h>
+#include <linux/ptrace.h>
+#include <linux/random.h>      /* for rand_initialize_irq() */
+#include <linux/signal.h>
+#include <linux/smp.h>
+#include <linux/smp_lock.h>
+#include <linux/threads.h>
+
+#ifdef CONFIG_KDB
+# include <linux/kdb.h>
+#endif
+
+#include <asm/bitops.h>
+#include <asm/delay.h>
+#include <asm/io.h>
+#include <asm/hw_irq.h>
+#include <asm/machvec.h>
+#include <asm/pgtable.h>
+#include <asm/system.h>
+
+#ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC
+spinlock_t ivr_read_lock;
+#endif
+
+/*
+ * Legacy IRQ to IA-64 vector translation table.  Any vector not in
+ * this table maps to itself (ie: irq 0x30 => IA64 vector 0x30)
+ */
+__u8 isa_irq_to_vector_map[IA64_MIN_VECTORED_IRQ] = {
+       /* 8259 IRQ translation, first 16 entries */
+       0x60, 0x50, 0x0f, 0x51, 0x52, 0x53, 0x43, 0x54,
+       0x55, 0x56, 0x57, 0x58, 0x59, 0x5a, 0x40, 0x41
+};
+
+#ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC
+
+int usbfix;
+
+static int __init
+usbfix_option (char *str)
+{
+       printk("irq: enabling USB workaround\n");
+       usbfix = 1;
+       return 1;
+}
+
+__setup("usbfix", usbfix_option);
+
+#endif /* CONFIG_ITANIUM_ASTEP_SPECIFIC */
+
+/*
+ * That's where the IVT branches when we get an external
+ * interrupt. This branches to the correct hardware IRQ handler via
+ * function ptr.
+ */
+void
+ia64_handle_irq (unsigned long vector, struct pt_regs *regs)
+{
+       unsigned long bsp, sp, saved_tpr;
+
+#ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC
+# ifndef CONFIG_SMP
+       static unsigned int max_prio = 0;
+# endif
+       unsigned int prev_prio;
+       unsigned long eoi_ptr;
+# ifdef CONFIG_USB
+       extern void reenable_usb (void);
+       extern void disable_usb (void);
+
+       if (usbfix)
+               disable_usb();
+# endif
+       /*
+        * Stop IPIs by getting the ivr_read_lock
+        */
+       spin_lock(&ivr_read_lock);
+
+       /*
+        * Disable PCI writes
+        */
+       outl(0x80ff81c0, 0xcf8);
+       outl(0x73002188, 0xcfc);
+       eoi_ptr = inl(0xcfc);
+
+       vector = ia64_get_ivr();
+
+       /*
+        * Enable PCI writes
+        */
+       outl(0x73182188, 0xcfc);
+
+       spin_unlock(&ivr_read_lock);
+
+# ifdef CONFIG_USB
+       if (usbfix)
+               reenable_usb();
+# endif
+
+# ifndef CONFIG_SMP
+       prev_prio = max_prio;
+       if (vector < max_prio) {
+               printk ("ia64_handle_irq: got vector %lu while %u was in progress!\n",
+                       vector, max_prio);
+               
+       } else
+               max_prio = vector;
+# endif /* !CONFIG_SMP */
+#endif /* CONFIG_ITANIUM_ASTEP_SPECIFIC */
+
+       /*
+        * Always set TPR to limit maximum interrupt nesting depth to
+        * 16 (without this, it would be ~240, which could easily lead
+        * to kernel stack overflows.
+        */
+       saved_tpr = ia64_get_tpr();
+       ia64_srlz_d();
+       ia64_set_tpr(vector);
+       ia64_srlz_d();
+
+       asm ("mov %0=ar.bsp" : "=r"(bsp));
+       asm ("mov %0=sp" : "=r"(sp));
+
+       if ((sp - bsp) < 1024) {
+               static long last_time;
+               static unsigned char count;
+
+               if (count > 5 && jiffies - last_time > 5*HZ)
+                       count = 0;
+               if (++count < 5) {
+                       last_time = jiffies;
+                       printk("ia64_handle_irq: DANGER: less than 1KB of free stack space!!\n"
+                              "(bsp=0x%lx, sp=%lx)\n", bsp, sp);
+               }
+#ifdef CONFIG_KDB
+               kdb(KDB_REASON_PANIC, 0, regs);
+#endif         
+       }
+
+       /*
+        * The interrupt is now said to be in service
+        */
+       if (vector >= NR_IRQS) {
+               printk("handle_irq: invalid vector %lu\n", vector);
+               goto out;
+       }
+
+       do_IRQ(vector, regs);
+  out:
+#ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC
+       {
+               long pEOI;
+
+               asm ("mov %0=0;; (p1) mov %0=1" : "=r"(pEOI));
+               if (!pEOI) {
+                       printk("Yikes: ia64_handle_irq() without pEOI!!\n");
+                       asm volatile ("cmp.eq p1,p0=r0,r0" : "=r"(pEOI));
+# ifdef CONFIG_KDB
+                       kdb(KDB_REASON_PANIC, 0, regs);
+# endif
+               }
+       }
+
+       local_irq_disable();
+# ifndef CONFIG_SMP
+       if (max_prio == vector)
+               max_prio = prev_prio;
+# endif /* !CONFIG_SMP */
+#endif /* CONFIG_ITANIUM_ASTEP_SPECIFIC */
+
+       ia64_srlz_d();
+       ia64_set_tpr(saved_tpr);
+       ia64_srlz_d();
+}
+
+#ifdef CONFIG_SMP
+
+void __init
+init_IRQ_SMP (void)
+{
+       if (request_irq(IPI_IRQ, handle_IPI, 0, "IPI", NULL))
+               panic("Could not allocate IPI Interrupt Handler!");
+}
+
+#endif
+
+void __init
+init_IRQ (void)
+{
+       /*
+        * Disable all local interrupts
+        */
+       ia64_set_itv(0, 1);
+       ia64_set_lrr0(0, 1);    
+       ia64_set_lrr1(0, 1);    
+
+       irq_desc[TIMER_IRQ].handler = &irq_type_ia64_internal;
+#ifdef CONFIG_SMP
+       /* 
+        * Configure the IPI vector and handler
+        */
+       irq_desc[IPI_IRQ].handler = &irq_type_ia64_internal;
+       init_IRQ_SMP();
+#endif
+
+       ia64_set_pmv(1 << 16);
+       ia64_set_cmcv(CMC_IRQ);                 /* XXX fix me */
+
+       platform_irq_init();
+
+       /* clear TPR to enable all interrupt classes: */
+       ia64_set_tpr(0);
+}
+
+/* TBD:
+ *     Certain IA64 platforms can have inter-processor interrupt support.
+ *     This interface is supposed to default to the IA64 IPI block-based
+ *     mechanism if the platform doesn't provide a separate mechanism
+ *     for IPIs.
+ *     Choices : (1) Extend hw_interrupt_type interfaces 
+ *               (2) Use machine vector mechanism
+ *     For now defining the following interface as a place holder.
+ */
+void
+ipi_send (int cpu, int vector, int delivery_mode)
+{
+}
index cc59e0c7227d1a6be88b549088db8ff7484b3806..2b768cec19a5dac354ae8fae96a62558fc593c04 100644 (file)
@@ -6,51 +6,16 @@
  *
  * Copyright (C) 1999 VA Linux Systems
  * Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
+ * Copyright (C) 2000 Hewlett-Packard Co
+ * Copyright (C) 2000 David Mosberger-Tang <davidm@hpl.hp.com>
  */
 
-#include <linux/kernel.h>
-#include <linux/sched.h>
+#include <linux/irq.h>
 
-#include <asm/irq.h>
-#include <asm/processor.h>
-#include <asm/ptrace.h>
-
-/*
- * This is identical to IOSAPIC handle_irq.  It may go away . . .
- */
-static int
-internal_handle_irq (unsigned int irq, struct pt_regs *regs)
+static unsigned int
+internal_noop_startup (unsigned int irq)
 {
-       struct irqaction *action = 0;
-       struct irq_desc *id = irq_desc + irq;
-       unsigned int status;
-       int retval;
-
-       spin_lock(&irq_controller_lock);
-       {
-               status = id->status;
-               if ((status & IRQ_ENABLED) != 0)
-                       action = id->action;
-               id->status = status & ~(IRQ_REPLAY | IRQ_WAITING);
-       }
-       spin_unlock(&irq_controller_lock);
-
-       if (!action) {
-               if (!(id->status & IRQ_AUTODETECT))
-                       printk("irq_hpsim_handle_irq: unexpected interrupt %u\n", irq);
-               return 0;
-       }
-
-       retval = invoke_irq_handlers(irq, regs, action);
-
-       spin_lock(&irq_controller_lock);
-       {
-               status = (id->status & ~IRQ_INPROGRESS);
-               id->status = status;
-       }
-       spin_unlock(&irq_controller_lock);
-
-       return retval;
+       return 0;
 }
 
 static void
@@ -60,12 +25,12 @@ internal_noop (unsigned int irq)
 }
 
 struct hw_interrupt_type irq_type_ia64_internal = {
-       "IA64-internal",
-       (void (*)(unsigned long)) internal_noop,        /* init */
-       internal_noop,                                  /* startup */
-       internal_noop,                                  /* shutdown */
-       internal_handle_irq,                            /* handle */
-       internal_noop,                                  /* enable */
-       internal_noop                                   /* disable */
+       typename:       "IA64-internal",
+       startup:        internal_noop_startup,
+       shutdown:       internal_noop,
+       enable:         internal_noop,
+       disable:        internal_noop,
+       ack:            internal_noop,
+       end:            internal_noop,
+       set_affinity:   (void (*)(unsigned int, unsigned long)) internal_noop
 };
-
index 4a2ead673840240309ba16ed283951d7fd64ae10..43afeac602eba7dac70e94506f0e621155d60587 100644 (file)
@@ -281,7 +281,7 @@ __global_restore_flags(unsigned long flags)
                 __sti();
                 break;
         default:
-                printk("global_restore_flags: %08lx (%08lx)\n",
-                        flags, (&flags)[-1]);
+               printk("global_restore_flags: %08lx (%08lx) from %p\n",
+                      flags, (&flags)[-1], __builtin_return_address(0));
         }
 }
index 4acc7f04182d88d3ebf8d11e56c42d320bd00ca8..767cfa5ce82ac06636625a39e524f657d5dabaaa 100644 (file)
@@ -164,13 +164,6 @@ pcibios_fixup_bus(struct pci_bus *b)
        return;
 }
 
-int
-pci_assign_resource (struct pci_dev *dev, int i)
-{
-       printk("pci_assign_resource: not implemented!\n");
-       return -ENODEV;
-}
-
 void __init
 pcibios_update_resource(struct pci_dev *dev, struct resource *root,
                        struct resource *res, int resource)
index 274b68a7307bb45a08c9433d312912c3edd580cf..29291e1f928d2fea37c9716a9136c1084a8784f8 100644 (file)
@@ -1,15 +1,53 @@
-#include <linux/config.h>
+/*
+ * This file contains the code to configure and read/write the ia64 performance
+ * monitoring stuff.
+ *
+ * Originaly Written by Ganesh Venkitachalam, IBM Corp.
+ * Modifications by David Mosberger-Tang, Hewlett-Packard Co.
+ * Copyright (C) 1999 Ganesh Venkitachalam <venkitac@us.ibm.com>
+ * Copyright (C) 1999 David Mosberger-Tang <davidm@hpl.hp.com>
+ */
 
+#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/smp_lock.h>
 
 #include <asm/errno.h>
-#include <asm/irq.h>
+#include <asm/hw_irq.h>
 #include <asm/processor.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
 
+/* Long blurb on how this works: 
+ * We set dcr.pp, psr.pp, and the appropriate pmc control values with
+ * this.  Notice that we go about modifying _each_ task's pt_regs to
+ * set cr_ipsr.pp.  This will start counting when "current" does an
+ * _rfi_. Also, since each task's cr_ipsr.pp, and cr_ipsr is inherited
+ * across forks, we do _not_ need additional code on context
+ * switches. On stopping of the counters we dont need to go about
+ * changing every task's cr_ipsr back to where it wuz, because we can
+ * just set pmc[0]=1. But we do it anyways becuase we will probably
+ * add thread specific accounting later.
+ *
+ * The obvious problem with this is that on SMP systems, it is a bit
+ * of work (when someone wants to do it:-)) - it would be easier if we
+ * just added code to the context-switch path, but if we wanted to support
+ * per-thread accounting, the context-switch path might be long unless 
+ * we introduce a flag in the task_struct. Right now, the following code 
+ * will NOT work correctly on MP (for more than one reason:-)).
+ *
+ * The short answer is that to make this work on SMP,  we would need 
+ * to lock the run queue to ensure no context switches, send 
+ * an IPI to each processor, and in that IPI handler, set processor regs,
+ * and just modify the psr bit of only the _current_ thread, since we have 
+ * modified the psr bit correctly in the kernel stack for every process 
+ * which is not running. Also, we need pmd arrays per-processor, and 
+ * the READ_PMD command will need to get values off of other processors. 
+ * IPIs are the answer, irrespective of what the question is. Might 
+ * crash on SMP systems without the lock_kernel().
+ */
+
 #ifdef CONFIG_PERFMON
 
 #define MAX_PERF_COUNTER       4       /* true for Itanium, at least */
 
 struct perfmon_counter {
         unsigned long data;
-        int counter_num;
+        unsigned long counter_num;
 };
 
 unsigned long pmds[MAX_PERF_COUNTER];
-struct task_struct *perf_owner;
+struct task_struct *perf_owner=NULL;
 
-/*
- * We set dcr.pp, psr.pp, and the appropriate pmc control values with
- * this.  Notice that we go about modifying _each_ task's pt_regs to
- * set cr_ipsr.pp.  This will start counting when "current" does an
- * _rfi_. Also, since each task's cr_ipsr.pp, and cr_ipsr is inherited
- * across forks, we do _not_ need additional code on context
- * switches. On stopping of the counters we dont _need_ to go about
- * changing every task's cr_ipsr back to where it wuz, because we can
- * just set pmc[0]=1. But we do it anyways becuase we will probably
- * add thread specific accounting later.
- *
- * The obvious problem with this is that on SMP systems, it is a bit
- * of work (when someone wants to do it) - it would be easier if we
- * just added code to the context-switch path.  I think we would need
- * to lock the run queue to ensure no context switches, send an IPI to
- * each processor, and in that IPI handler, just modify the psr bit of
- * only the _current_ thread, since we have modified the psr bit
- * correctly in the kernel stack for every process which is not
- * running.  Might crash on SMP systems without the
- * lock_kernel(). Hence the lock..
- */
 asmlinkage unsigned long
 sys_perfmonctl (int cmd1, int cmd2, void *ptr)
 {
@@ -66,7 +83,7 @@ sys_perfmonctl (int cmd1, int cmd2, void *ptr)
                if (!access_ok(VERIFY_READ, cptr, sizeof(struct perf_counter)*cmd2))
                        return -EFAULT;
 
-               if (cmd2 >= MAX_PERF_COUNTER)
+               if (cmd2 > MAX_PERF_COUNTER)
                        return -EFAULT;
 
                if (perf_owner && perf_owner != current)
@@ -91,15 +108,12 @@ sys_perfmonctl (int cmd1, int cmd2, void *ptr)
                        /*
                         * This is a no can do.  It obviously wouldn't
                         * work on SMP where another process may not
-                        * be blocked at all.
-                        *
-                        * Perhaps we need a global predicate in the
-                        * leave_kernel path to control if pp should
-                        * be on or off?
+                        * be blocked at all. We need to put in a  perfmon 
+                        * IPI to take care of MP systems. See blurb above.
                         */
                        lock_kernel();
                        for_each_task(p) {
-                               regs = (struct pt_regs *) (((char *)p) + IA64_STK_OFFSET) - 1;
+                               regs = (struct pt_regs *) (((char *)p) + IA64_STK_OFFSET) -1 ;  
                                ia64_psr(regs)->pp = 1;
                        }
                        unlock_kernel();
@@ -108,12 +122,18 @@ sys_perfmonctl (int cmd1, int cmd2, void *ptr)
                 break;
 
              case READ_PMDS:
-               if (cmd2 >= MAX_PERF_COUNTER)
+               if (cmd2 > MAX_PERF_COUNTER)
                        return -EFAULT;
                if (!access_ok(VERIFY_WRITE, cptr, sizeof(struct perf_counter)*cmd2))
                        return -EFAULT;
+
+               /* This looks shady, but IMHO this will work fine. This is  
+                * the sequence that I could come up with to avoid races
+                * with the interrupt handler. See explanation in the 
+                * following comment.
+                */
+
                local_irq_save(flags);
-               /* XXX this looks wrong */
                __asm__ __volatile__("rsm psr.pp\n");
                dcr = ia64_get_dcr();
                dcr &= ~IA64_DCR_PP;
@@ -121,23 +141,23 @@ sys_perfmonctl (int cmd1, int cmd2, void *ptr)
                local_irq_restore(flags);
 
                /*
-                * We cannot touch pmc[0] to stop counting here, as
+                * We cannot write to pmc[0] to stop counting here, as
                 * that particular instruction might cause an overflow
-                * and the mask in pmc[0] might get lost. I'm not very
+                * and the mask in pmc[0] might get lost. I'm _not_ 
                 * sure of the hardware behavior here. So we stop
                 * counting by psr.pp = 0. And we reset dcr.pp to
                 * prevent an interrupt from mucking up psr.pp in the
                 * meanwhile. Perfmon interrupts are pended, hence the
-                * above code should be ok if one of the above
-                * instructions cause overflows. Is this ok?  When I
-                * muck with dcr, is the cli/sti needed??
+                * above code should be ok if one of the above instructions 
+                * caused overflows, i.e the interrupt should get serviced
+                * when we re-enabled interrupts. When I muck with dcr, 
+                * is the irq_save/restore needed?
                 */
-               for (i = 0, cnum = 4; i < MAX_PERF_COUNTER; i++, cnum++, cptr++) {
+               for (i = 0, cnum = 4;i < MAX_PERF_COUNTER; i++, cnum++, cptr++){
                        pmd = pmds[i] + (ia64_get_pmd(cnum) & PERF_OVFL_VAL);
                        put_user(pmd, &cptr->data);
                }
                local_irq_save(flags);
-               /* XXX this looks wrong */
                __asm__ __volatile__("ssm psr.pp");
                dcr = ia64_get_dcr();
                dcr |= IA64_DCR_PP;
@@ -158,11 +178,8 @@ sys_perfmonctl (int cmd1, int cmd2, void *ptr)
                /*
                 * This is a no can do.  It obviously wouldn't
                 * work on SMP where another process may not
-                * be blocked at all.
-                *
-                * Perhaps we need a global predicate in the
-                * leave_kernel path to control if pp should
-                * be on or off?
+                * be blocked at all. We need to put in a  perfmon 
+                * IPI to take care of MP systems. See blurb above.
                 */
                lock_kernel();
                for_each_task(p) {
@@ -170,7 +187,7 @@ sys_perfmonctl (int cmd1, int cmd2, void *ptr)
                        ia64_psr(regs)->pp = 0;
                }
                unlock_kernel();
-               perf_owner = 0;
+               perf_owner = NULL;
                break;
 
              default:
@@ -184,12 +201,12 @@ update_counters (void)
 {
        unsigned long mask, i, cnum, val;
 
-       mask = ia64_get_pmd(0) >> 4;
+       mask = ia64_get_pmc(0) >> 4;
        for (i = 0, cnum = 4; i < MAX_PERF_COUNTER; cnum++, i++, mask >>= 1) {
                if (mask & 0x1) 
                        val = PERF_OVFL_VAL;
                else
-                       /* since we got an interrupt, might as well clear every pmd. */
+               /* since we got an interrupt, might as well clear every pmd. */
                        val = ia64_get_pmd(cnum) & PERF_OVFL_VAL;
                pmds[i] += val;
                ia64_set_pmd(cnum, 0);
@@ -214,10 +231,10 @@ perfmon_init (void)
        }
        ia64_set_pmv(PERFMON_IRQ);
        ia64_srlz_d();
+       printk("Initialized perfmon vector to %u\n",PERFMON_IRQ);
 }
 
 #else /* !CONFIG_PERFMON */
-
 asmlinkage unsigned long
 sys_perfmonctl (int cmd1, int cmd2, void *ptr)
 {
index cc26b8760b587a4b0ce432b02035778c3464f639..a8c217b9a1994dfb497c9b3e2bf1d9b6cd354853 100644 (file)
@@ -99,7 +99,7 @@ cpu_idle (void *unused)
                        (*pm_idle)();
 #ifdef CONFIG_ITANIUM_ASTEP_SPECIFIC
                if (ia64_get_itm() < ia64_get_itc()) {
-                       extern void ia64_reset_itm();
+                       extern void ia64_reset_itm (void);
 
                        printk("cpu_idle: ITM in past, resetting it...\n");
                        ia64_reset_itm();
@@ -238,7 +238,7 @@ void
 ia64_elf_core_copy_regs (struct pt_regs *pt, elf_gregset_t dst)
 {
        struct switch_stack *sw = ((struct switch_stack *) pt) - 1;
-       unsigned long ar_ec, cfm, ar_bsp, ndirty, *krbs;
+       unsigned long ar_ec, cfm, ar_bsp, ndirty, *krbs, addr;
 
        ar_ec = (sw->ar_pfs >> 52) & 0x3f;
 
@@ -249,8 +249,18 @@ ia64_elf_core_copy_regs (struct pt_regs *pt, elf_gregset_t dst)
        }
 
        krbs = (unsigned long *) current + IA64_RBS_OFFSET/8;
-       ndirty = ia64_rse_num_regs(krbs, krbs + (pt->loadrs >> 16));
-       ar_bsp = (long) ia64_rse_skip_regs((long *) pt->ar_bspstore, ndirty);
+       ndirty = ia64_rse_num_regs(krbs, krbs + (pt->loadrs >> 19));
+       ar_bsp = (unsigned long) ia64_rse_skip_regs((long *) pt->ar_bspstore, ndirty);
+
+       /*
+        * Write portion of RSE backing store living on the kernel
+        * stack to the VM of the process.
+        */
+       for (addr = pt->ar_bspstore; addr < ar_bsp; addr += 8) {
+               long val;
+               if (ia64_peek(pt, current, addr, &val) == 0)
+                       access_process_vm(current, addr, &val, sizeof(val), 1);
+       }
 
        /*      r0-r31
         *      NaT bits (for r0-r31; bit N == 1 iff rN is a NaT)
@@ -310,7 +320,6 @@ sys_execve (char *filename, char **argv, char **envp, struct pt_regs *regs)
 {
        int error;
 
-       lock_kernel();
        filename = getname(filename);
        error = PTR_ERR(filename);
        if (IS_ERR(filename))
@@ -318,7 +327,6 @@ sys_execve (char *filename, char **argv, char **envp, struct pt_regs *regs)
        error = do_execve(filename, argv, envp, regs);
        putname(filename);
 out:
-       unlock_kernel();
        return error;
 }
 
index 84581af2e003ab3e30f9bed0afb3b1498bd23827..980fa4329a943d8109cf5d31791870afdd561b87 100644 (file)
@@ -138,9 +138,10 @@ __down_interruptible (struct semaphore * sem)
 int
 __down_trylock (struct semaphore *sem)
 {
+       unsigned long flags;
        int sleepers;
 
-       spin_lock_irq(&semaphore_lock);
+       spin_lock_irqsave(&semaphore_lock, flags);
        sleepers = sem->sleepers + 1;
        sem->sleepers = 0;
 
@@ -151,7 +152,7 @@ __down_trylock (struct semaphore *sem)
        if (!atomic_add_negative(sleepers, &sem->count))
                wake_up(&sem->wait);
 
-       spin_unlock_irq(&semaphore_lock);
+       spin_unlock_irqrestore(&semaphore_lock, flags);
        return 1;
 }
 
index f3283d535c5441825e2345ac904c00874052a262..58ddb1fb1ca5b64bb6901c7edad19c2b2a973f2f 100644 (file)
@@ -101,6 +101,7 @@ void __init
 setup_arch (char **cmdline_p)
 {
        unsigned long max_pfn, bootmap_start, bootmap_size;
+       u64 progress;
 
        /*
         * The secondary bootstrap loader passes us the boot
@@ -167,6 +168,7 @@ setup_arch (char **cmdline_p)
        conswitchp = &dummy_con;
 # endif
 #endif
+       paging_init();
        platform_setup(cmdline_p);
 }
 
index cfcff3063f399805417382ad1b264985b15884c2..133520b84551873246c96bdfa520c85ffcc8150d 100644 (file)
  */
 #include <linux/config.h>
 #include <linux/init.h>
+#include <linux/interrupt.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/time.h>
 
 #include <asm/delay.h>
 #include <asm/efi.h>
-#include <asm/irq.h>
-#include <asm/machvec.h>
+#include <asm/hw_irq.h>
 #include <asm/ptrace.h>
 #include <asm/sal.h>
 #include <asm/system.h>
-#ifdef CONFIG_KDB
-# include <linux/kdb.h>
-#endif
-
 
 extern rwlock_t xtime_lock;
 extern volatile unsigned long lost_ticks;
@@ -43,8 +39,12 @@ static struct {
 static void
 do_profile (unsigned long ip)
 {
+       extern unsigned long prof_cpu_mask;
        extern char _stext;
 
+       if (!((1UL << smp_processor_id()) & prof_cpu_mask))
+               return;
+
        if (prof_buffer && current->pid) {
                ip -= (unsigned long) &_stext;
                ip >>= prof_shift;
@@ -65,7 +65,7 @@ do_profile (unsigned long ip)
  * update to jiffy.  The xtime_lock must be at least read-locked when
  * calling this routine.
  */
-static /*inline*/ unsigned long
+static inline unsigned long
 gettimeoffset (void)
 {
        unsigned long now = ia64_get_itc();
@@ -198,7 +198,7 @@ ia64_reset_itm (void)
        unsigned long flags;
 
        local_irq_save(flags);
-       timer_interrupt(0, 0, current);
+       timer_interrupt(0, 0, ia64_task_regs(current));
        local_irq_restore(flags);
 }
 
@@ -293,15 +293,19 @@ ia64_init_itm (void)
        ia64_cpu_local_tick();
 }
 
+static struct irqaction timer_irqaction = {
+       handler:        timer_interrupt,
+       flags:          SA_INTERRUPT,
+       name:           "timer"
+};
+
 void __init
 time_init (void)
 {
-       /*
-        * Request the IRQ _before_ doing anything to cause that
-        * interrupt to be posted.
-        */
-       if (request_irq(TIMER_IRQ, timer_interrupt, 0, "timer", NULL)) 
-               panic("Could not allocate timer IRQ!");
+       /* we can't do request_irq() here because the kmalloc() would fail... */
+       irq_desc[TIMER_IRQ].status = IRQ_DISABLED;
+       irq_desc[TIMER_IRQ].handler = &irq_type_ia64_internal;
+       setup_irq(TIMER_IRQ, &timer_irqaction);
 
        efi_gettimeofday(&xtime);
        ia64_init_itm();
index 1f510603645abd64dadd13569c4b4c329d91958e..ddb079f13061647ff67243bdfba0c0dce905b956 100644 (file)
@@ -456,7 +456,7 @@ ia64_fault (unsigned long vector, unsigned long isr, unsigned long ifa,
 
              case 32: /* fp fault */
              case 33: /* fp trap */
-               result = handle_fpu_swa((vector == 32) ? 1 : 0, regs, &isr);
+               result = handle_fpu_swa((vector == 32) ? 1 : 0, regs, isr);
                if (result < 0) {
                        siginfo.si_signo = SIGFPE;
                        siginfo.si_errno = 0;
index 0a956e5a2097339488764e623dd138b3bae17748..7595ac83a54e8d31a6a34a0d9eb02925906bc0dc 100644 (file)
@@ -15,6 +15,9 @@
  */
 #include <asm/page.h>
 
+#define PIPE_DEPTH     6
+#define EPI            p[PIPE_DEPTH-1]
+
 #define lcount         r16
 #define saved_pr       r17
 #define saved_lc       r18
        .proc copy_page
 
 copy_page:
-       alloc saved_pfs=ar.pfs,10,0,0,8 // we need 6 roatating (8 minimum)
-                                       // + 2 input
+       alloc saved_pfs=ar.pfs,3,((2*PIPE_DEPTH+7)&~7),0,((2*PIPE_DEPTH+7)&~7)
 
-       .rotr t1[4], t2[4]      // our 2 pipelines with depth of 4 each
+       .rotr t1[PIPE_DEPTH], t2[PIPE_DEPTH]
+       .rotp p[PIPE_DEPTH]
 
        mov saved_lc=ar.lc      // save ar.lc ahead of time
        mov saved_pr=pr         // rotating predicates are preserved
@@ -53,29 +56,30 @@ copy_page:
        mov pr.rot=1<<16        // pr16=1 & pr[17-63]=0 , 63 not modified
 
        mov ar.lc=lcount        // set loop counter
-       mov ar.ec=4             // ar.ec must match pipeline depth
+       mov ar.ec=PIPE_DEPTH    // ar.ec must match pipeline depth
        ;;
 
        // We need to preload the n-1 stages of the pipeline (n=depth).
        // We do this during the "prolog" of the loop: we execute
        // n-1 times the "load" bundle. Then both loads & stores are
        // enabled until we reach the end of the last word of the page
-       // on the load side. Then, we enter the epilogue (controlled by ec)
-       // where we just do the stores and no loads n-1 times : drain the pipe.
+       // on the load side. Then, we enter the epilog (controlled by ec)
+       // where we just do the stores and no loads n times : drain the pipe
+       // (we exit the loop when ec=1).
        //
        // The initialization of the prolog is done via the predicate registers:
-       // the choice of pr19 DEPENDS on the depth of the pipeline (n).
+       // the choice of EPI DEPENDS on the depth of the pipeline (n).
        // When lc > 0 pr63=1 and it is fed back into pr16 and pr16-pr62 
        // are then shifted right at every iteration,
-       // Thus by initializing pr16=1 and pr17-19=0 (19=16+4-1) before the loop
-       // we get pr19=1 after 4 iterations (n in our case).
+       // Thus by initializing pr16=1 and the rest to 0 before the loop
+       // we get EPI=1 after n iterations.
        //
 1:                             // engage loop now, let the magic happen...
 (p16)  ld8 t1[0]=[src1],16     // new data on top of pipeline in 1st stream
 (p16)  ld8 t2[0]=[src2],16     // new data on top of pipeline in 2nd stream
        nop.i 0x0
-(p19)  st8 [tgt1]=t1[3],16     // store top of  1st pipeline
-(p19)  st8 [tgt2]=t2[3],16     // store top of 2nd pipeline
+(EPI)  st8 [tgt1]=t1[PIPE_DEPTH-1],16  // store top of  1st pipeline
+(EPI)  st8 [tgt2]=t2[PIPE_DEPTH-1],16  // store top of 2nd pipeline
        br.ctop.dptk.few 1b     // once lc==0, ec-- & p16=0
                                // stores but no loads anymore
        ;;
index 58c92876f81dc438be0579e3a56efe4e77aff66b..3743174ba49ab554d2994441de61c39caded6812 100644 (file)
@@ -1,3 +1,34 @@
+/*
+ *
+ * Optimized version of the copy_user() routine.
+ * It is used to copy date across the kernel/user boundary.
+ *
+ * The source and destination are always on opposite side of
+ * the boundary. When reading from user space we must catch
+ * faults on loads. When writing to user space we must catch
+ * errors on stores. Note that because of the nature of the copy
+ * we don't need to worry about overlapping regions.
+ *
+ *
+ * Inputs:
+ *     in0     address of source buffer
+ *     in1     address of destination buffer
+ *     in2     number of bytes to copy
+ *
+ * Outputs: 
+ *     ret0    0 in case of sucess. The number of bytes NOT copied in
+ *             case of error.
+ *
+ * Copyright (C) 2000 Hewlett-Packard Co
+ * Copyright (C) 2000 Stephane Eranian <eranian@hpl.hp.com>
+ *
+ * Fixme:
+ *     - handle the case where we have more than 16 bytes and the alignment
+ *       are different.
+ *     - more benchmarking
+ *     - fix extraneous stop bit introduced by the EX() macro.
+ */
+
 // The label comes first because our store instruction contains a comma
 // and confuse the preprocessor otherwise
 //
index 17f71f1a08270d3cab35785a5946a0e58ff8375d..f2d40984aa73ef20267dd5d9c137a9b61b334490 100644 (file)
@@ -1,6 +1,5 @@
 /*
- * Just like strncpy() except for the return value.  If no fault occurs during
- * the copying, the number of bytes copied is returned.  If a fault occurs,
+ * Just like strncpy() except that if a fault occurs during copying,
  * -EFAULT is returned.
  *
  * Inputs:
@@ -10,8 +9,11 @@
  * Outputs:
  *     r8:     -EFAULT in case of fault or number of bytes copied if no fault
  * 
- * Copyright (C) 1998, 1999 Hewlett-Packard Co
- * Copyright (C) 1998, 1999 David Mosberger-Tang <davidm@hpl.hp.com>
+ * Copyright (C) 1998-2000 Hewlett-Packard Co
+ * Copyright (C) 1998-2000 David Mosberger-Tang <davidm@hpl.hp.com>
+ *
+ * 00/03/06 D. Mosberger Fixed to return proper return value (bug found by
+ *                      by Andreas Schwab <schwab@suse.de>).
  */
 
 #define EX(x...)                               \
        .global __strncpy_from_user
        .proc __strncpy_from_user
 __strncpy_from_user:
-       alloc r11=ar.pfs,3,0,0,0
+       alloc r2=ar.pfs,3,0,0,0
+       mov r8=0
        mov r9=in1
+       ;;
        add r10=in1,in2
+       cmp.eq p6,p0=r0,in2
+(p6)   br.ret.spnt.many rp
 
        // XXX braindead copy loop---this needs to be optimized
 .Loop1:
-       EX(ld1 r8=[in1],1)
+       EX(ld1 r8=[in1],1;; st1 [in0]=r8,1; cmp.ne p6,p7=r8,r0)
        ;;
-       st1 [in0]=r8,1
-       cmp.ltu p6,p0=in1,r10
+(p6)   cmp.ne.unc p8,p0=in1,r10
+(p8)   br.cond.dpnt.few .Loop1
        ;;
-(p6)   cmp.ne.and p6,p0=r8,r0
-       ;;
-(p6)   br.cond.dpnt.few .Loop1
+(p6)   mov r8=in2              // buffer filled up---return buffer length
+(p7)   sub r8=in1,r9,1         // return string length (excluding NUL character)
+       br.ret.sptk.few rp
 
-1:     sub r8=in1,r9           // length of string (including NUL character)
 .Lexit:
-       mov ar.pfs=r11
        br.ret.sptk.few rp
 
        .endp __strncpy_from_user
index 388f1fe0cb1effcc568842031d6b7dbc42dae787..3a630ca8cbb47cb85d5c0cf17d630a09798ba558 100644 (file)
@@ -241,13 +241,13 @@ put_gate_page (struct page *page, unsigned long address)
        pmd = pmd_alloc(pgd, address);
        if (!pmd) {
                __free_page(page);
-               oom(current);
+               panic("Out of memory.");
                return 0;
        }
        pte = pte_alloc(pmd, address);
        if (!pte) {
                __free_page(page);
-               oom(current);
+               panic("Out of memory.");
                return 0;
        }
        if (!pte_none(*pte)) {
index 72ece4147d2f9743befd6d88e119cb2590d3cdff..568f7a3479c7bbb590c924fcfb59a15c32183b93 100644 (file)
@@ -97,7 +97,7 @@ __flush_tlb_all (void)
        stride0 = ia64_ptce_info.stride[0];
        stride1 = ia64_ptce_info.stride[1];
 
-       save_and_cli(flags);
+       __save_and_cli(flags);
        for (i = 0; i < count0; ++i) {
                for (j = 0; j < count1; ++j) {
                        asm volatile ("ptc.e %0" :: "r"(addr));
@@ -105,7 +105,7 @@ __flush_tlb_all (void)
                }
                addr += stride0;
        }
-       restore_flags(flags);
+       __restore_flags(flags);
        ia64_insn_group_barrier();
        ia64_srlz_i();                  /* srlz.i implies srlz.d */
        ia64_insn_group_barrier();
index 4f51537e2aa970c17e1fdc95a49d7a528200c940..868dd685152cb459316efc01f817edcb6b7b9480 100644 (file)
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 1.41 1999/12/21 04:02:23 davem Exp $
+# $Id: Makefile,v 1.42 2000/03/09 05:56:43 jj Exp $
 # sparc64/Makefile
 #
 # Makefile for the architecture dependent flags and dependencies on the
@@ -14,8 +14,9 @@ SHELL  =/bin/bash
 
 CC             := sparc64-linux-gcc
 
-IS_EGCS := $(shell if $(CC) -m64 -mcmodel=medlow -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo y; else echo n; fi; )
+NEW_GCC := $(shell if $(CC) -m64 -mcmodel=medlow -S -o /dev/null -xc /dev/null >/dev/null 2>&1; then echo y; else echo n; fi; )
 NEW_GAS := $(shell if $(LD) --version 2>&1 | grep 'elf64_sparc' > /dev/null; then echo y; else echo n; fi)
+UNDECLARED_REGS := $(shell if $(CC) -c -x assembler /dev/null -Wa,--help | grep undeclared-regs > /dev/null; then echo y; else echo n; fi; )
 
 ifneq ($(NEW_GAS),y)
 AS             = sparc64-linux-as
@@ -28,19 +29,26 @@ AS          := $(AS) -64
 LD             := $(LD) -m elf64_sparc
 endif
 ELFTOAOUT      = elftoaout
+ifneq ($(UNDECLARED_REGS),y)
+CC_UNDECL      =
+else
+CC_UNDECL      = -Wa,--undeclared-regs
+AS             := $(AS) --undeclared-regs
+endif
 
 #
 # Uncomment the first CFLAGS if you are doing kgdb source level
 # debugging of the kernel to get the proper debugging information.
 
 #CFLAGS := $(CFLAGS) -g -pipe -fcall-used-g5 -fcall-used-g7 
-ifneq ($(IS_EGCS),y)
+ifneq ($(NEW_GCC),y)
   CFLAGS := $(CFLAGS) -pipe -mno-fpu -mtune=ultrasparc -mmedlow \
            -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare
 else
   CFLAGS := $(CFLAGS) -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow \
-           -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare
-  AFLAGS += -m64 -mcpu=ultrasparc
+           -ffixed-g4 -fcall-used-g5 -fcall-used-g7 -Wno-sign-compare \
+           $(CC_UNDECL)
+  AFLAGS += -m64 -mcpu=ultrasparc $(CC_UNDECL)
 endif
 
 # Uncomment this to get spinlock/rwlock debugging on SMP.
index 00f635ab300aba9cddff3cf5328ded6d4b3e7b5b..d7267880adf276c5c8d3afd3b77175cdd2d82e37 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: pci_iommu.c,v 1.10 2000/02/18 13:48:54 davem Exp $
+/* $Id: pci_iommu.c,v 1.11 2000/03/10 02:42:15 davem Exp $
  * pci_iommu.c: UltraSparc PCI controller IOM/STC support.
  *
  * Copyright (C) 1999 David S. Miller (davem@redhat.com)
                             : "r" (__val), "r" (__reg), \
                               "i" (ASI_PHYS_BYPASS_EC_E))
 
+/* Must be invoked under the IOMMU lock. */
+static void __iommu_flushall(struct pci_iommu *iommu)
+{
+       unsigned long tag;
+       int entry;
+
+       tag = iommu->iommu_flush + (0xa580UL - 0x0210UL);
+       for (entry = 0; entry < 16; entry++) {
+               pci_iommu_write(tag, 0);
+               tag += 8;
+       }
+
+       /* Ensure completion of previous PIO writes. */
+       (void) pci_iommu_read(iommu->write_complete_reg);
+
+       /* Now update everyone's flush point. */
+       for (entry = 0; entry < PBM_NCLUSTERS; entry++) {
+               iommu->alloc_info[entry].flush =
+                       iommu->alloc_info[entry].next;
+       }
+}
+
 static iopte_t *alloc_streaming_cluster(struct pci_iommu *iommu, unsigned long npages)
 {
-       iopte_t *iopte;
-       unsigned long cnum, ent;
+       iopte_t *iopte, *limit;
+       unsigned long cnum, ent, flush_point;
 
        cnum = 0;
        while ((1UL << cnum) < npages)
                cnum++;
-       iopte  = iommu->page_table + (cnum << (iommu->page_table_sz_bits - PBM_LOGCLUSTERS));
-       iopte += ((ent = iommu->lowest_free[cnum]) << cnum);
+       iopte  = (iommu->page_table +
+                 (cnum << (iommu->page_table_sz_bits - PBM_LOGCLUSTERS)));
 
-       if (iopte_val(iopte[(1UL << cnum)]) == 0UL) {
-               /* Fast path. */
-               iommu->lowest_free[cnum] = ent + 1;
-       } else {
-               unsigned long pte_off = 1;
+       if (cnum == 0)
+               limit = (iommu->page_table +
+                        iommu->lowest_consistent_map);
+       else
+               limit = (iopte +
+                        (1 << (iommu->page_table_sz_bits - PBM_LOGCLUSTERS)));
 
-               ent += 1;
-               do {
-                       pte_off++;
-                       ent++;
-               } while (iopte_val(iopte[(pte_off << cnum)]) != 0UL);
-               iommu->lowest_free[cnum] = ent;
+       iopte += ((ent = iommu->alloc_info[cnum].next) << cnum);
+       flush_point = iommu->alloc_info[cnum].flush;
+       
+       for (;;) {
+               if (iopte_val(*iopte) == 0UL) {
+                       if ((iopte + (1 << cnum)) >= limit)
+                               ent = 0;
+                       else
+                               ent = ent + 1;
+                       iommu->alloc_info[cnum].next = ent;
+                       if (ent == flush_point)
+                               __iommu_flushall(iommu);
+                       break;
+               }
+               iopte += (1 << cnum);
+               ent++;
+               if (iopte >= limit) {
+                       iopte = (iommu->page_table +
+                                (cnum <<
+                                 (iommu->page_table_sz_bits - PBM_LOGCLUSTERS)));
+                       ent = 0;
+               }
+               if (ent == flush_point)
+                       __iommu_flushall(iommu);
        }
 
        /* I've got your streaming cluster right here buddy boy... */
        return iopte;
 }
 
-static inline void free_streaming_cluster(struct pci_iommu *iommu, dma_addr_t base, unsigned long npages)
+static void free_streaming_cluster(struct pci_iommu *iommu, dma_addr_t base,
+                                  unsigned long npages, unsigned long ctx)
 {
        unsigned long cnum, ent;
 
        cnum = 0;
        while ((1UL << cnum) < npages)
                cnum++;
+
        ent = (base << (32 - PAGE_SHIFT + PBM_LOGCLUSTERS - iommu->page_table_sz_bits))
                >> (32 + PBM_LOGCLUSTERS + cnum - iommu->page_table_sz_bits);
-       if (ent < iommu->lowest_free[cnum])
-               iommu->lowest_free[cnum] = ent;
+
+       /* If the global flush might not have caught this entry,
+        * adjust the flush point such that we will flush before
+        * ever trying to reuse it.
+        */
+#define between(X,Y,Z) (((Z) - (Y)) >= ((X) - (Y)))
+       if (between(ent, iommu->alloc_info[cnum].next, iommu->alloc_info[cnum].flush))
+               iommu->alloc_info[cnum].flush = ent;
+#undef between
 }
 
 /* We allocate consistent mappings from the end of cluster zero. */
@@ -92,8 +142,13 @@ static iopte_t *alloc_consistent_cluster(struct pci_iommu *iommu, unsigned long
                                if (iopte_val(*iopte) & IOPTE_VALID)
                                        break;
                        }
-                       if (tmp == 0)
+                       if (tmp == 0) {
+                               u32 entry = (iopte - iommu->page_table);
+
+                               if (entry < iommu->lowest_consistent_map)
+                                       iommu->lowest_consistent_map = entry;
                                return iopte;
+                       }
                }
        }
        return NULL;
@@ -182,7 +237,7 @@ void pci_free_consistent(struct pci_dev *pdev, size_t size, void *cpu, dma_addr_
        struct pcidev_cookie *pcp;
        struct pci_iommu *iommu;
        iopte_t *iopte;
-       unsigned long flags, order, npages, i;
+       unsigned long flags, order, npages, i, ctx;
 
        npages = PAGE_ALIGN(size) >> PAGE_SHIFT;
        pcp = pdev->sysdata;
@@ -192,15 +247,45 @@ void pci_free_consistent(struct pci_dev *pdev, size_t size, void *cpu, dma_addr_
 
        spin_lock_irqsave(&iommu->lock, flags);
 
+       if ((iopte - iommu->page_table) ==
+           iommu->lowest_consistent_map) {
+               iopte_t *walk = iopte + npages;
+               iopte_t *limit;
+
+               limit = (iommu->page_table +
+                        (1 << (iommu->page_table_sz_bits - PBM_LOGCLUSTERS)));
+               while (walk < limit) {
+                       if (iopte_val(*walk) != IOPTE_INVALID)
+                               break;
+                       walk++;
+               }
+               iommu->lowest_consistent_map =
+                       (walk - iommu->page_table);
+       }
+
        /* Data for consistent mappings cannot enter the streaming
-        * buffers, so we only need to update the TSB.  Flush of the
-        * IOTLB is done later when these ioptes are used for a new
-        * allocation.
+        * buffers, so we only need to update the TSB.  We flush
+        * the IOMMU here as well to prevent conflicts with the
+        * streaming mapping deferred tlb flush scheme.
         */
 
+       ctx = 0;
+       if (iommu->iommu_ctxflush)
+               ctx = (iopte_val(*iopte) & IOPTE_CONTEXT) >> 47UL;
+
        for (i = 0; i < npages; i++, iopte++)
                iopte_val(*iopte) = IOPTE_INVALID;
 
+       if (iommu->iommu_ctxflush) {
+               pci_iommu_write(iommu->iommu_ctxflush, ctx);
+       } else {
+               for (i = 0; i < npages; i++) {
+                       u32 daddr = dvma + (i << PAGE_SHIFT);
+
+                       pci_iommu_write(iommu->iommu_flush, daddr);
+               }
+       }
+
        spin_unlock_irqrestore(&iommu->lock, flags);
 
        order = get_order(size);
@@ -253,14 +338,6 @@ dma_addr_t pci_map_single(struct pci_dev *pdev, void *ptr, size_t sz, int direct
        for (i = 0; i < npages; i++, base++, base_paddr += PAGE_SIZE)
                iopte_val(*base) = iopte_protection | base_paddr;
 
-       /* Flush the IOMMU TLB. */
-       if (iommu->iommu_ctxflush) {
-               pci_iommu_write(iommu->iommu_ctxflush, ctx);
-       } else {
-               for (i = 0; i < npages; i++, bus_addr += PAGE_SIZE)
-                       pci_iommu_write(iommu->iommu_flush, bus_addr);
-       }
-
        spin_unlock_irqrestore(&iommu->lock, flags);
 
        return ret;
@@ -294,15 +371,15 @@ void pci_unmap_single(struct pci_dev *pdev, dma_addr_t bus_addr, size_t sz, int
 
        spin_lock_irqsave(&iommu->lock, flags);
 
+       /* Record the context, if any. */
+       ctx = 0;
+       if (iommu->iommu_ctxflush)
+               ctx = (iopte_val(*base) & IOPTE_CONTEXT) >> 47UL;
+
        /* Step 1: Kick data out of streaming buffers if necessary. */
        if (strbuf->strbuf_enabled) {
                u32 vaddr = bus_addr;
 
-               /* Record the context, if any. */
-               ctx = 0;
-               if (iommu->iommu_ctxflush)
-                       ctx = (iopte_val(*base) & IOPTE_CONTEXT) >> 47UL;
-
                PCI_STC_FLUSHFLAG_INIT(strbuf);
                if (strbuf->strbuf_ctxflush &&
                    iommu->iommu_ctxflush) {
@@ -327,10 +404,8 @@ void pci_unmap_single(struct pci_dev *pdev, dma_addr_t bus_addr, size_t sz, int
        /* Step 2: Clear out first TSB entry. */
        iopte_val(*base) = IOPTE_INVALID;
 
-       free_streaming_cluster(iommu, bus_addr - iommu->page_table_map_base, npages);
-
-       /* Step 3: Ensure completion of previous PIO writes. */
-       (void) pci_iommu_read(iommu->write_complete_reg);
+       free_streaming_cluster(iommu, bus_addr - iommu->page_table_map_base,
+                              npages, ctx);
 
        spin_unlock_irqrestore(&iommu->lock, flags);
 }
@@ -415,7 +490,7 @@ int pci_map_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int
        struct pcidev_cookie *pcp;
        struct pci_iommu *iommu;
        struct pci_strbuf *strbuf;
-       unsigned long flags, ctx, i, npages, iopte_protection;
+       unsigned long flags, ctx, npages, iopte_protection;
        iopte_t *base;
        u32 dma_base;
        struct scatterlist *sgtmp;
@@ -474,14 +549,6 @@ int pci_map_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems, int
        verify_sglist(sglist, nelems, base, npages);
 #endif
 
-       /* Step 6: Flush the IOMMU TLB. */
-       if (iommu->iommu_ctxflush) {
-               pci_iommu_write(iommu->iommu_ctxflush, ctx);
-       } else {
-               for (i = 0; i < npages; i++, dma_base += PAGE_SIZE)
-                       pci_iommu_write(iommu->iommu_flush, dma_base);
-       }
-
        spin_unlock_irqrestore(&iommu->lock, flags);
 
        return used;
@@ -522,15 +589,15 @@ void pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems,
 
        spin_lock_irqsave(&iommu->lock, flags);
 
+       /* Record the context, if any. */
+       ctx = 0;
+       if (iommu->iommu_ctxflush)
+               ctx = (iopte_val(*base) & IOPTE_CONTEXT) >> 47UL;
+
        /* Step 1: Kick data out of streaming buffers if necessary. */
        if (strbuf->strbuf_enabled) {
                u32 vaddr = bus_addr;
 
-               /* Record the context, if any. */
-               ctx = 0;
-               if (iommu->iommu_ctxflush)
-                       ctx = (iopte_val(*base) & IOPTE_CONTEXT) >> 47UL;
-
                PCI_STC_FLUSHFLAG_INIT(strbuf);
                if (strbuf->strbuf_ctxflush &&
                    iommu->iommu_ctxflush) {
@@ -555,10 +622,8 @@ void pci_unmap_sg(struct pci_dev *pdev, struct scatterlist *sglist, int nelems,
        /* Step 2: Clear out first TSB entry. */
        iopte_val(*base) = IOPTE_INVALID;
 
-       free_streaming_cluster(iommu, bus_addr - iommu->page_table_map_base, npages);
-
-       /* Step 3: Ensure completion of previous PIO writes. */
-       (void) pci_iommu_read(iommu->write_complete_reg);
+       free_streaming_cluster(iommu, bus_addr - iommu->page_table_map_base,
+                              npages, ctx);
 
        spin_unlock_irqrestore(&iommu->lock, flags);
 }
index b3248de3945cf5983b1d76f00cc9c28893789fdd..1c8f59f3fcf371cd14c9fd4385b1e346f46c5674 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: pci_psycho.c,v 1.13 2000/02/18 13:48:54 davem Exp $
+/* $Id: pci_psycho.c,v 1.14 2000/03/10 02:42:15 davem Exp $
  * pci_psycho.c: PSYCHO/U2P specific PCI controller support.
  *
  * Copyright (C) 1997, 1998, 1999 David S. Miller (davem@caipfs.rutgers.edu)
@@ -1246,11 +1246,14 @@ static void __init psycho_iommu_init(struct pci_controller_info *p)
        control = psycho_read(p->controller_regs + PSYCHO_IOMMU_CONTROL);
        control |= PSYCHO_IOMMU_CTRL_DENAB;
        psycho_write(p->controller_regs + PSYCHO_IOMMU_CONTROL, control);
-       for(i = 0; i < 16; i++)
+       for(i = 0; i < 16; i++) {
+               psycho_write(p->controller_regs + PSYCHO_IOMMU_TAG + (i * 8UL), 0);
                psycho_write(p->controller_regs + PSYCHO_IOMMU_DATA + (i * 8UL), 0);
+       }
 
-       control &= ~(PSYCHO_IOMMU_CTRL_DENAB);
-       psycho_write(p->controller_regs + PSYCHO_IOMMU_CONTROL, control);
+       /* Leave diag mode enabled for full-flushing done
+        * in pci_iommu.c
+        */
 
        /* Using assumed page size 8K with 128K entries we need 1MB iommu page
         * table (128K ioptes * 8 bytes per iopte).  This is
@@ -1267,9 +1270,14 @@ static void __init psycho_iommu_init(struct pci_controller_info *p)
        p->iommu.dma_addr_mask = 0xffffffff;
        memset((char *)tsbbase, 0, PAGE_SIZE << 7);
 
-       /* Make sure DMA address 0 is never returned just to allow catching
-          of buggy drivers.  */
-       p->iommu.lowest_free[0] = 1;
+       /* We start with no consistent mappings. */
+       p->iommu.lowest_consistent_map =
+               1 << (p->iommu.page_table_sz_bits - PBM_LOGCLUSTERS);
+
+       for (i = 0; i < PBM_NCLUSTERS; i++) {
+               p->iommu.alloc_info[i].flush = 0;
+               p->iommu.alloc_info[i].next = 0;
+       }
 
        psycho_write(p->controller_regs + PSYCHO_IOMMU_TSBBASE, __pa(tsbbase));
 
index e96af490d15220d59cde43a4ceb86cb5d391a205..a10f5f072585a26e9475548d9d127ce00e634cbf 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: pci_sabre.c,v 1.14 2000/02/18 13:48:55 davem Exp $
+/* $Id: pci_sabre.c,v 1.15 2000/03/10 02:42:16 davem Exp $
  * pci_sabre.c: Sabre specific PCI controller support.
  *
  * Copyright (C) 1997, 1998, 1999 David S. Miller (davem@caipfs.rutgers.edu)
@@ -1128,11 +1128,14 @@ static void __init sabre_iommu_init(struct pci_controller_info *p,
        control |= SABRE_IOMMUCTRL_DENAB;
        sabre_write(p->controller_regs + SABRE_IOMMU_CONTROL, control);
 
-       for(i = 0; i < 16; i++)
+       for(i = 0; i < 16; i++) {
+               sabre_write(p->controller_regs + SABRE_IOMMU_TAG + (i * 8UL), 0);
                sabre_write(p->controller_regs + SABRE_IOMMU_DATA + (i * 8UL), 0);
+       }
 
-       control &= ~(SABRE_IOMMUCTRL_DENAB);
-       sabre_write(p->controller_regs + SABRE_IOMMU_CONTROL, control);
+       /* Leave diag mode enabled for full-flushing done
+        * in pci_iommu.c
+        */
 
        tsbbase = __get_free_pages(GFP_KERNEL, order = get_order(tsbsize * 1024 * 8));
        if (!tsbbase) {
@@ -1144,10 +1147,6 @@ static void __init sabre_iommu_init(struct pci_controller_info *p,
        p->iommu.dma_addr_mask = dma_mask;
        memset((char *)tsbbase, 0, PAGE_SIZE << order);
 
-       /* Make sure DMA address 0 is never returned just to allow catching
-          of buggy drivers.  */
-       p->iommu.lowest_free[0] = 1;
-
        sabre_write(p->controller_regs + SABRE_IOMMU_TSBBASE, __pa(tsbbase));
 
        control = sabre_read(p->controller_regs + SABRE_IOMMU_CONTROL);
@@ -1168,6 +1167,15 @@ static void __init sabre_iommu_init(struct pci_controller_info *p,
                break;
        }
        sabre_write(p->controller_regs + SABRE_IOMMU_CONTROL, control);
+
+       /* We start with no consistent mappings. */
+       p->iommu.lowest_consistent_map =
+               1 << (p->iommu.page_table_sz_bits - PBM_LOGCLUSTERS);
+
+       for (i = 0; i < PBM_NCLUSTERS; i++) {
+               p->iommu.alloc_info[i].flush = 0;
+               p->iommu.alloc_info[i].next = 0;
+       }
 }
 
 static void __init pbm_register_toplevel_resources(struct pci_controller_info *p,
index 1b454fa2cb76bc6a8d578212bf4c98a7b509e11a..c9a0d4a59b61f83efdf66601e8a0d04cb295f73b 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: sbus.c,v 1.9 2000/02/18 13:48:57 davem Exp $
+/* $Id: sbus.c,v 1.10 2000/03/10 07:52:08 davem Exp $
  * sbus.c: UltraSparc SBUS controller support.
  *
  * Copyright (C) 1999 David S. Miller (davem@redhat.com)
@@ -53,13 +53,18 @@ struct sbus_iommu {
         * you must increase the size of the type of
         * these counters.  You have been duly warned. -DaveM
         */
-/*0x30*/u16                    lowest_free[NCLUSTERS];
+/*0x30*/struct {
+               u16     next;
+               u16     flush;
+       } alloc_info[NCLUSTERS];
+
+       /* The lowest used consistent mapping entry.  Since
+        * we allocate consistent maps out of cluster 0 this
+        * is relative to the beginning of closter 0.
+        */
+/*0x50*/u32            lowest_consistent_map;
 };
 
-/* Flushing heuristics */
-#define IOMMU_DIAG_LIM 16
-#define STRBUF_DIAG_LIM        32
-
 /* Offsets from iommu_regs */
 #define SYSIO_IOMMUREG_BASE    0x2400UL
 #define IOMMU_CONTROL  (0x2400UL - 0x2400UL)   /* IOMMU control register */
@@ -73,49 +78,29 @@ struct sbus_iommu {
 
 #define IOMMU_DRAM_VALID       (1UL << 30UL)
 
-static void __iommu_flush(struct sbus_iommu *iommu, u32 base, unsigned long npages)
+static void __iommu_flushall(struct sbus_iommu *iommu)
 {
-       int hit = 0;
-
-       if (npages <= IOMMU_DIAG_LIM) {
-               while (npages--)
-                       upa_writeq(base + (npages << PAGE_SHIFT),
-                                  iommu->iommu_regs + IOMMU_FLUSH);
-               hit = 1;
-       } else {
-               u32 limit = base + ((npages << PAGE_SHIFT) - 1UL);
-               unsigned long dram = iommu->iommu_regs + IOMMU_DRAMDIAG;
-               unsigned long tag = iommu->iommu_regs + IOMMU_TAGDIAG;
-               int entry;
+       unsigned long tag = iommu->iommu_regs + IOMMU_TAGDIAG;
+       int entry;
 
-               for (entry = 0; entry < 16; entry++, dram += 8, tag += 8) {
-                       u32 addr = ((u32)upa_readq(tag) << PAGE_SHIFT);
-                       if (addr >= base && addr <= limit) {
-                               u64 val = upa_readq(dram);
+       for (entry = 0; entry < 16; entry++) {
+               upa_writeq(0, tag);
+               tag += 8UL;
+       }
+       upa_readq(iommu->sbus_control_reg);
 
-                               if (val & IOMMU_DRAM_VALID) {
-                                       upa_writeq(addr,
-                                                  iommu->iommu_regs + IOMMU_FLUSH);
-                                       hit = 1;
-                               }
-                       }
-               }
+       for (entry = 0; entry < NCLUSTERS; entry++) {
+               iommu->alloc_info[entry].flush =
+                       iommu->alloc_info[entry].next;
        }
-       if (hit != 0)
-               upa_readq(iommu->sbus_control_reg);
 }
 
-/* In an effort to keep latency under control, we special
- * case single page IOMMU flushes.
- */
-static __inline__ void iommu_flush(struct sbus_iommu *iommu,
-                                  u32 base, unsigned long npages)
+static void iommu_flush(struct sbus_iommu *iommu, u32 base, unsigned long npages)
 {
-       if (npages == 1) {
-               upa_writeq(base, iommu->iommu_regs + IOMMU_FLUSH);
-               upa_readq(iommu->sbus_control_reg);
-       } else
-               __iommu_flush(iommu, base, npages);
+       while (npages--)
+               upa_writeq(base + (npages << PAGE_SHIFT),
+                          iommu->iommu_regs + IOMMU_FLUSH);
+       upa_readq(iommu->sbus_control_reg);
 }
 
 /* Offsets from strbuf_regs */
@@ -132,65 +117,57 @@ static __inline__ void iommu_flush(struct sbus_iommu *iommu,
 
 static void strbuf_flush(struct sbus_iommu *iommu, u32 base, unsigned long npages)
 {
-       int hit = 0;
-
        iommu->strbuf_flushflag = 0UL;
-       if (npages <= STRBUF_DIAG_LIM) {
-               while (npages--)
-                       upa_writeq(base + (npages << PAGE_SHIFT),
-                                  iommu->strbuf_regs + STRBUF_PFLUSH);
-               hit = 1;
-       } else {
-               u32 limit = base + ((npages << PAGE_SHIFT) - 1UL);
-               unsigned long tag = iommu->strbuf_regs + STRBUF_PTAGDIAG;
-               int entry;
-
-               for (entry = 0; entry < 16; entry++, tag += 8) {
-                       u64 val = upa_readq(tag);
-
-                       if (val & STRBUF_TAG_VALID) {
-                               u32 addr = ((u32)(val & ~3UL)) << (PAGE_SHIFT - 2UL);
-                               if (addr >= base && addr <= limit) {
-                                       upa_writeq(addr,
-                                                  iommu->strbuf_regs + STRBUF_PFLUSH);
-                                       hit = 1;
-                               }
-                       }
-               }
-       }
-       if (hit != 0) {
-               /* Whoopee cushion! */
-               upa_writeq(__pa(&iommu->strbuf_flushflag),
-                          iommu->strbuf_regs + STRBUF_FSYNC);
-               upa_readq(iommu->sbus_control_reg);
-               while (iommu->strbuf_flushflag == 0UL)
-                       membar("#LoadLoad");
-       }
+       while (npages--)
+               upa_writeq(base + (npages << PAGE_SHIFT),
+                          iommu->strbuf_regs + STRBUF_PFLUSH);
+
+       /* Whoopee cushion! */
+       upa_writeq(__pa(&iommu->strbuf_flushflag),
+                  iommu->strbuf_regs + STRBUF_FSYNC);
+       upa_readq(iommu->sbus_control_reg);
+       while (iommu->strbuf_flushflag == 0UL)
+               membar("#LoadLoad");
 }
 
 static iopte_t *alloc_streaming_cluster(struct sbus_iommu *iommu, unsigned long npages)
 {
-       iopte_t *iopte;
-       unsigned long cnum, ent;
+       iopte_t *iopte, *limit;
+       unsigned long cnum, ent, flush_point;
 
        cnum = 0;
        while ((1UL << cnum) < npages)
                cnum++;
        iopte  = iommu->page_table + (cnum * CLUSTER_NPAGES);
-       iopte += ((ent = iommu->lowest_free[cnum]) << cnum);
-
-       if (iopte_val(iopte[(1UL << cnum)]) == 0UL) {
-               /* Fast path. */
-               iommu->lowest_free[cnum] = ent + 1;
-       } else {
-               unsigned long pte_off = 1;
 
-               ent += 1;
-               do {
-                       pte_off++;
-                       ent++;
-               } while (iopte_val(iopte[(pte_off << cnum)]) != 0UL);
-               iommu->lowest_free[cnum] = ent;
+       if (cnum == 0)
+               limit = (iommu->page_table +
+                        iommu->lowest_consistent_map);
+       else
+               limit = (iopte + CLUSTER_NPAGES);
+
+       iopte += ((ent = iommu->alloc_info[cnum].next) << cnum);
+       flush_point = iommu->alloc_info[cnum].flush;
+
+       for (;;) {
+               if (iopte_val(*iopte) == 0UL) {
+                       if ((iopte + (1 << cnum)) >= limit)
+                               ent = 0;
+                       else
+                               ent = ent + 1;
+                       iommu->alloc_info[cnum].next = ent;
+                       if (ent == flush_point)
+                               __iommu_flushall(iommu);
+                       break;
+               }
+               iopte += (1 << cnum);
+               ent++;
+               if (iopte >= limit) {
+                       iopte = (iommu->page_table + (cnum * CLUSTER_NPAGES));
+                       ent = 0;
+               }
+               if (ent == flush_point)
+                       __iommu_flushall(iommu);
        }
 
        /* I've got your streaming cluster right here buddy boy... */
@@ -208,8 +185,15 @@ static void free_streaming_cluster(struct sbus_iommu *iommu, u32 base, unsigned
        ent = (base & CLUSTER_MASK) >> (PAGE_SHIFT + cnum);
        iopte = iommu->page_table + ((base - MAP_BASE) >> PAGE_SHIFT);
        iopte_val(*iopte) = 0UL;
-       if (ent < iommu->lowest_free[cnum])
-               iommu->lowest_free[cnum] = ent;
+
+       /* If the global flush might not have caught this entry,
+        * adjust the flush point such that we will flush before
+        * ever trying to reuse it.
+        */
+#define between(X,Y,Z) (((Z) - (Y)) >= ((X) - (Y)))
+       if (between(ent, iommu->alloc_info[cnum].next, iommu->alloc_info[cnum].flush))
+               iommu->alloc_info[cnum].flush = ent;
+#undef between
 }
 
 /* We allocate consistent mappings from the end of cluster zero. */
@@ -228,8 +212,13 @@ static iopte_t *alloc_consistent_cluster(struct sbus_iommu *iommu, unsigned long
                                if (iopte_val(*iopte) & IOPTE_VALID)
                                        break;
                        }
-                       if (tmp == 0)
+                       if (tmp == 0) {
+                               u32 entry = (iopte - iommu->page_table);
+
+                               if (entry < iommu->lowest_consistent_map)
+                                       iommu->lowest_consistent_map = entry;
                                return iopte;
+                       }
                }
        }
        return NULL;
@@ -239,6 +228,20 @@ static void free_consistent_cluster(struct sbus_iommu *iommu, u32 base, unsigned
 {
        iopte_t *iopte = iommu->page_table + ((base - MAP_BASE) >> PAGE_SHIFT);
 
+       if ((iopte - iommu->page_table) == iommu->lowest_consistent_map) {
+               iopte_t *walk = iopte + npages;
+               iopte_t *limit;
+
+               limit = iommu->page_table + CLUSTER_NPAGES;
+               while (walk < limit) {
+                       if (iopte_val(*walk) != 0UL)
+                               break;
+                       walk++;
+               }
+               iommu->lowest_consistent_map =
+                       (walk - iommu->page_table);
+       }
+
        while (npages--)
                *iopte++ = __iopte(0UL);
 }
@@ -301,6 +304,7 @@ void sbus_free_consistent(struct sbus_dev *sdev, size_t size, void *cpu, dma_add
 
        spin_lock_irq(&iommu->lock);
        free_consistent_cluster(iommu, dvma, npages);
+       iommu_flush(iommu, dvma, npages);
        spin_unlock_irq(&iommu->lock);
 
        order = get_order(size);
@@ -337,7 +341,6 @@ dma_addr_t sbus_map_single(struct sbus_dev *sdev, void *ptr, size_t size, int di
                phys_base += PAGE_SIZE;
        }
        npages = size >> PAGE_SHIFT;
-       iommu_flush(iommu, dma_base, npages);
        spin_unlock_irqrestore(&iommu->lock, flags);
 
        return (dma_base | offset);
@@ -472,7 +475,6 @@ int sbus_map_sg(struct sbus_dev *sdev, struct scatterlist *sg, int nents, int di
 #ifdef VERIFY_SG
        verify_sglist(sg, nents, iopte, npages);
 #endif
-       iommu_flush(iommu, dma_base, npages);
        spin_unlock_irqrestore(&iommu->lock, flags);
 
        return used;
@@ -1061,9 +1063,13 @@ void __init sbus_iommu_init(int prom_node, struct sbus_bus *sbus)
 
        memset(iommu, 0, sizeof(*iommu));
 
-       /* Make sure DMA address 0 is never returned just to allow catching
-          of buggy drivers.  */
-       iommu->lowest_free[0] = 1;
+       /* We start with no consistent mappings. */
+       iommu->lowest_consistent_map = CLUSTER_NPAGES;
+
+       for (i = 0; i < NCLUSTERS; i++) {
+               iommu->alloc_info[i].flush = 0;
+               iommu->alloc_info[i].next = 0;
+       }
 
        /* Setup spinlock. */
        spin_lock_init(&iommu->lock);
@@ -1110,9 +1116,12 @@ void __init sbus_iommu_init(int prom_node, struct sbus_bus *sbus)
         */
        for (i = 0; i < 16; i++) {
                unsigned long dram = iommu->iommu_regs + IOMMU_DRAMDIAG;
+               unsigned long tag = iommu->iommu_regs + IOMMU_TAGDIAG;
 
                dram += (unsigned long)i * 8UL;
+               tag += (unsigned long)i * 8UL;
                upa_writeq(0, dram);
+               upa_writeq(0, tag);
        }
        upa_readq(iommu->sbus_control_reg);
 
index e0875ad360740be0bafdcad7e0e9cc3dbfd5cbd7..4adaf4077058d681b6bf1078449303d64e980c82 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: fs.c,v 1.16 2000/01/12 02:59:27 davem Exp $
+/* $Id: fs.c,v 1.17 2000/03/10 04:43:30 davem Exp $
  * fs.c: fs related syscall emulation for Solaris
  *
  * Copyright (C) 1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
index a2f41dec1278b9b2039cafffc04715f809c595bb..ffa3ade5600fc151ae98795004d036f647e71218 100644 (file)
@@ -16,7 +16,6 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  
  */
 
-#include <linux/config.h>
 #include <linux/ide.h>
 #include <linux/isapnp.h>
 
index 65e7bfdc48e2c0351d7980e5a28928c1976ce0d3..a0b63a8c8b09d36ae57d6b1e5f13f294d54e8ad2 100644 (file)
@@ -4,7 +4,7 @@
  * Note that you can not swap over this thing, yet. Seems to work but
  * deadlocks sometimes - you can not swap over TCP in general.
  * 
- * Copyright 1997 Pavel Machek <pavel@atrey.karlin.mff.cuni.cz>
+ * Copyright 1997-2000 Pavel Machek <pavel@ucw.cz>
  * 
  * (part of code stolen from loop.c)
  *
@@ -24,6 +24,7 @@
  *          structure with userland
  */
 
+#undef NBD_PLUGGABLE
 #define PARANOIA
 #include <linux/major.h>
 
@@ -62,10 +63,11 @@ static int requests_in;
 static int requests_out;
 #endif
 
+static void nbd_plug_device(request_queue_t *q, kdev_t dev) { }
+
 static int nbd_open(struct inode *inode, struct file *file)
 {
        int dev;
-       struct nbd_device *nbdev;
 
        if (!inode)
                return -EINVAL;
@@ -73,13 +75,7 @@ static int nbd_open(struct inode *inode, struct file *file)
        if (dev >= MAX_NBD)
                return -ENODEV;
 
-       nbdev = &nbd_dev[dev];
        nbd_dev[dev].refcnt++;
-       if (!(nbdev->flags & NBD_INITIALISED)) {
-               init_MUTEX(&nbdev->queue_lock);
-               INIT_LIST_HEAD(&nbdev->queue_head);
-               nbdev->flags |= NBD_INITIALISED;
-       }
        MOD_INC_USE_COUNT;
        return 0;
 }
@@ -216,12 +212,18 @@ struct request *nbd_read_stat(struct nbd_device *lo)
 void nbd_do_it(struct nbd_device *lo)
 {
        struct request *req;
+       int dequeued;
 
        down (&lo->queue_lock);
-       while (!list_empty(&lo->queue_head)) {
+       while (1) {
+               up (&lo->queue_lock);
                req = nbd_read_stat(lo);
-               if (!req)
+               down (&lo->queue_lock);
+
+               if (!req) {
+                       printk(KERN_ALERT "req should never be null\n" );
                        goto out;
+               }
 #ifdef PARANOIA
                if (req != blkdev_entry_prev_request(&lo->queue_head)) {
                        printk(KERN_ALERT "NBD: I have problem...\n");
@@ -238,9 +240,11 @@ void nbd_do_it(struct nbd_device *lo)
                list_del(&req->queue);
                up (&lo->queue_lock);
                
-               nbd_end_request(req);
+               dequeued = nbd_end_request(req);
 
                down (&lo->queue_lock);
+               if (!dequeued)
+                       list_add(&req->queue, &lo->queue_head);
        }
  out:
        up (&lo->queue_lock);
@@ -249,26 +253,36 @@ void nbd_do_it(struct nbd_device *lo)
 void nbd_clear_que(struct nbd_device *lo)
 {
        struct request *req;
+       int dequeued;
+
+#ifdef PARANOIA
+       if (lo->magic != LO_MAGIC) {
+               printk(KERN_ERR "NBD: nbd_dev[] corrupted: Not enough magic when clearing!\n");
+               return;
+       }
+#endif
 
        while (!list_empty(&lo->queue_head)) {
                req = blkdev_entry_prev_request(&lo->queue_head);
 #ifdef PARANOIA
+               if (!req) {
+                       printk( KERN_ALERT "NBD: panic, panic, panic\n" );
+                       break;
+               }
                if (lo != &nbd_dev[MINOR(req->rq_dev)]) {
                        printk(KERN_ALERT "NBD: request corrupted when clearing!\n");
                        continue;
                }
-               if (lo->magic != LO_MAGIC) {
-                       printk(KERN_ERR "NBD: nbd_dev[] corrupted: Not enough magic when clearing!\n");
-                       return;
-               }
 #endif
                req->errors++;
                list_del(&req->queue);
                up(&lo->queue_lock);
 
-               nbd_end_request(req);
+               dequeued = nbd_end_request(req);
 
                down(&lo->queue_lock);
+               if (!dequeued)
+                       list_add(&req->queue, &lo->queue_head);
        }
 }
 
@@ -290,6 +304,10 @@ static void do_nbd_request(request_queue_t * q)
 
        while (!QUEUE_EMPTY) {
                req = CURRENT;
+#ifdef PARANOIA
+               if (!req)
+                       FAIL("que not empty but no request?");
+#endif
                dev = MINOR(req->rq_dev);
 #ifdef PARANOIA
                if (dev >= MAX_NBD)
@@ -470,12 +488,17 @@ int nbd_init(void)
        blksize_size[MAJOR_NR] = nbd_blksizes;
        blk_size[MAJOR_NR] = nbd_sizes;
        blk_init_queue(BLK_DEFAULT_QUEUE(MAJOR_NR), do_nbd_request);
+#ifndef NBD_PLUGGABLE
+       blk_queue_pluggable(BLK_DEFAULT_QUEUE(MAJOR_NR), nbd_plug_device);
+#endif
        blk_queue_headactive(BLK_DEFAULT_QUEUE(MAJOR_NR), 0);
        for (i = 0; i < MAX_NBD; i++) {
                nbd_dev[i].refcnt = 0;
                nbd_dev[i].file = NULL;
                nbd_dev[i].magic = LO_MAGIC;
                nbd_dev[i].flags = 0;
+               INIT_LIST_HEAD(&nbd_dev[i].queue_head);
+               init_MUTEX(&nbd_dev[i].queue_lock);
                nbd_blksizes[i] = 1024;
                nbd_blksize_bits[i] = 10;
                nbd_bytesizes[i] = 0x7ffffc00; /* 2GB */
index 6825b3013dce1d28d4e4abde39192db1cb246f79..18f867c0450be70345689d038eb885a20b4ba1b1 100644 (file)
@@ -209,8 +209,8 @@ if [ "$CONFIG_VIDEO_DEV" != "n" ]; then
         dep_tristate '  QuickCam Colour Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_CQCAM $CONFIG_VIDEO_DEV $CONFIG_PARPORT
       fi
    fi
-   dep_tristate '  SAA5249 Teletext processor' CONFIG_VIDEO_SAA5249 $CONFIG_VIDEO_DEV
-   dep_tristate '  SAB3036 tuner' CONFIG_TUNER_3036 $CONFIG_VIDEO_DEV
+   dep_tristate '  SAA5249 Teletext processor' CONFIG_VIDEO_SAA5249 $CONFIG_VIDEO_DEV $CONFIG_I2C
+   dep_tristate '  SAB3036 tuner' CONFIG_TUNER_3036 $CONFIG_VIDEO_DEV $CONFIG_I2C
    if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
       if [ "$CONFIG_SGI" = "y" ]; then
          dep_tristate '  SGI Vino Video For Linux (EXPERIMENTAL)' CONFIG_VIDEO_VINO $CONFIG_VIDEO_DEV $CONFIG_SGI
index da2e114001aca04dce1ade7575960069dc8352ea..d95ff1fed635fced9b010fb950d5cdd65eed3516 100644 (file)
@@ -523,3 +523,10 @@ Description (Verbose) : Updated driver:
 Files affected        : epca.c
 Release version       : 1.3.0.1-LK
 -----------------------------------------------------------------------
+Programmer            : Arjan van de Ven <adve@oce.nl>
+Date                  : March 10, 2000
+Description (Verbose) : Fixed includes to make it actually compile
+                       for kernel 2.3.51
+Files affected        : epca.c
+Release version       : 1.3.0.2-LK
+-----------------------------------------------------------------------
index 82f545eccf012e6a22cb9eb37dc97eb0c305ceb6..19e252968c2af5207ac225deb048014b496852f9 100644 (file)
@@ -20,7 +20,6 @@
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
-#include <linux/config.h>
 #include <linux/version.h>
 #include <linux/module.h>
 #include <linux/delay.h>
index 8ed17fd712cf519cba1dc4824865b7464086d466..ac27c9e0e9ef0b88887e06d927bf6a9a633163eb 100644 (file)
@@ -1,9 +1,9 @@
 /*
  * The DSP56001 Device Driver, saviour of the Free World(tm)
  *
- * Authors: Fredrik Noring   <noring@lysator.liu.se>
- *          lars brinkhoff   <f93labr@dd.chalmers.se>
- *          Tomas Berndtsson <tobe@lysator.liu.se>
+ * Authors: Fredrik Noring   <noring@nocrew.org>
+ *          lars brinkhoff   <lars@nocrew.org>
+ *          Tomas Berndtsson <tomas@nocrew.org>
  *
  * First version May 1996
  *
index 31cd5546c258857c5a97bfc43662131f591e6f2f..dd94223bc0703e73bb1aacc2905d3d0484f24d0c 100644 (file)
 #include <linux/ctype.h>
 #include <linux/tty.h>
 #include <linux/tty_flip.h>
+#include <linux/slab.h>
+#include <linux/ioport.h>
 #include <asm/uaccess.h>
+#include <asm/io.h>
 
 #ifdef CONFIG_PCI
 #define ENABLE_PCI
index 04beea2d540e8461ea59f782319764f85f38ec86..15985380ba3f14eef4dd56a88af79972d75b3b84 100644 (file)
@@ -10,7 +10,7 @@
 #include <linux/init.h>                        /* Initdata                     */
 #include <asm/uaccess.h>               /* copy to/from user            */
 #include <linux/videodev.h>            /* kernel radio structs         */
-#include "../sound/lowlevel/miroaci.h" /* ACI Control by acimixer      */
+#include "../sound/miroaci.h"          /* ACI Control by acimixer      */
 
 static int users = 0;
 
index 61dfd6e42f68fae3922764b7e7ef1ef50dac075c..a7c1b070332867f0c937ce12274d97af0d28b249 100644 (file)
@@ -197,14 +197,17 @@ int raw_ctl_ioctl(struct inode *inode,
                        raw_device_bindings[minor] = 
                                bdget(kdev_t_to_nr(MKDEV(rq.block_major, rq.block_minor)));
                } else {
+                       struct block_device *bdev;
                        kdev_t dev;
-                       if (!raw_device_bindings[minor]) {
-                               err = -ENODEV;
-                               break;
+
+                       bdev = raw_device_bindings[minor];
+                       if (bdev) {
+                               dev = to_kdev_t(bdev->bd_dev);
+                               rq.block_major = MAJOR(dev);
+                               rq.block_minor = MINOR(dev);
+                       } else {
+                               rq.block_major = rq.block_minor = 0;
                        }
-                       dev = to_kdev_t(raw_device_bindings[minor]->bd_dev);
-                       rq.block_major = MAJOR(dev);
-                       rq.block_minor = MINOR(dev);
                        err = copy_to_user((void *) arg, &rq, sizeof(rq));
                }
                break;
@@ -304,7 +307,12 @@ ssize_t    rw_raw_dev(int rw, struct file *filp, char *buf,
                err = map_user_kiobuf(rw, iobuf, (unsigned long) buf, iosize);
                if (err)
                        break;
-               
+#if 0
+               err = lock_kiovec(1, &iobuf, 1);
+               if (err) 
+                       break;
+#endif
+       
                for (i=0; i < blocks; i++) 
                        b[i] = blocknr++;
                
@@ -316,7 +324,7 @@ ssize_t     rw_raw_dev(int rw, struct file *filp, char *buf,
                        buf += err;
                }
 
-               unmap_kiobuf(iobuf);
+               unmap_kiobuf(iobuf); /* The unlock_kiobuf is implicit here */
 
                if (err != iosize)
                        break;
index 914976a7094a1bc0735441204902175a3b25136e..45e3bc04469a27ca6b31a687fcee4aaa4fb4eebf 100644 (file)
@@ -66,8 +66,8 @@ struct awc_cis {
 };
 
 
-/* timeout for transmit watchdog timer */
-#define TX_TIMEOUT                     (HZ * 3)
+/* timeout for transmit watchdog timer, AP default is 8 sec */
+#define AWC_TX_TIMEOUT                 (HZ * 8) 
 
 
 
@@ -454,7 +454,7 @@ struct awc_fid_queue {
 };
 
 
-extern inline void
+extern  void
 awc_fid_queue_init(struct awc_fid_queue * queue){
 
        unsigned long flags;
@@ -1429,10 +1429,10 @@ extern struct awc_rid_dir  awc_rids[];
 
 
 struct awc_private {
-       dev_node_t node;
-
-
-       int dummy_test;
+       dev_node_t node; // somewhere back in times PCMCIA needed that
+       
+       int dummy_test; // left for cleanup
+       // card rid inmemory copy
        struct awc_config               config; // card RID mirrors
        struct awc_config               general_config; // 
        struct awc_SSIDs                SSIDs;
@@ -1452,6 +1452,7 @@ struct awc_private {
        struct awc_wep_key              wep_nonvolatile;
        struct awc_modulation           modulation;
 
+       // here are just references to rids
        struct awc_rid_dir              rid_dir[AWC_NOF_RIDS];
        int     rids_read;
        
@@ -1493,12 +1494,14 @@ struct awc_private {
        
        // Command serialize stuff
 //changed to spinlock        struct semaphore  command_semaphore;
-       my_spinlock_t           both_bap_spinlock;
+       my_spinlock_t           both_bap_spinlock; // on SMP, card should theorethically live without that
        unsigned long           both_bap_spinlock_flags;
-       my_spinlock_t           bap_setup_spinlock;
+       my_spinlock_t           bap_setup_spinlock; // on SMP, card should theoretically live without that
        unsigned long           bap_setup_spinlock_flags;
        my_spinlock_t           command_issuing_spinlock;
        unsigned long           command_issuing_spinlock_flags;
+       my_spinlock_t           interrupt_spinlock;
+
         volatile int           unlock_command_postponed;
         struct awc_command     cmd;
         long long              async_command_start;
@@ -1511,6 +1514,13 @@ struct awc_private {
        int                     p2p_uc;
        int                     p2p_found;
        int                     p802_11_send;
+       int                     simple_bridge;
+       int                     force_rts_on_shorter;
+       int                     force_tx_rate;
+       int                     ip_tos_reliability_rts;
+       int                     ip_tos_troughput_no_retries;
+       int                     full_stats;
+       int                     debug;
        
        struct enet_statistics  stats;
        
index b271b18f4641825a9e9cb8bf16117f6f5fc1c600..04108ad73ad96cb7870a9aebf9e683d778bae09e 100644 (file)
@@ -188,9 +188,8 @@ static int awc_pci_init(struct net_device * dev, struct pci_dev *pdev,
        dev->base_addr = ioaddr;
        dev->irq = pci_irq_line;
        dev->tx_timeout = &awc_tx_timeout;
-       dev->watchdog_timeo = TX_TIMEOUT;
+       dev->watchdog_timeo = AWC_TX_TIMEOUT;
        
-       netif_start_queue (dev);
 
        request_irq(dev->irq,awc_interrupt, SA_SHIRQ | SA_INTERRUPT ,"Aironet 4X00",dev);
 
@@ -377,7 +376,7 @@ int awc4500_pnp_probe(struct net_device *dev)
                dev->base_addr = isa_ioaddr;
                dev->irq = isa_irq_line;
                dev->tx_timeout = &awc_tx_timeout;
-               dev->watchdog_timeo = TX_TIMEOUT;
+               dev->watchdog_timeo = AWC_TX_TIMEOUT;
                
                netif_start_queue (dev);
                
@@ -498,7 +497,7 @@ int awc4500_isa_probe(struct net_device *dev)
 
        if (! io[0] || ! irq[0]){
        
-               printk("       Both irq and io params must be supplied  for ISA mode !!!\n");
+//             printk("       Both irq and io params must be supplied  for ISA mode !!!\n");
                return -ENODEV;
        }
 
@@ -538,10 +537,8 @@ int awc4500_isa_probe(struct net_device *dev)
                dev->base_addr = isa_ioaddr;
                dev->irq = isa_irq_line;
                dev->tx_timeout = &awc_tx_timeout;
-               dev->watchdog_timeo = TX_TIMEOUT;
+               dev->watchdog_timeo = AWC_TX_TIMEOUT;
                
-               netif_start_queue (dev);
-
                request_irq(dev->irq,awc_interrupt ,SA_INTERRUPT ,"Aironet 4X00",dev);
 
                awc_private_init( dev);
@@ -815,9 +812,8 @@ static int awc_i365_init(struct i365_socket * s) {
        dev->irq = s->irq;
        dev->base_addr = s->io;
        dev->tx_timeout = &awc_tx_timeout;
-       dev->watchdog_timeo = TX_TIMEOUT;
+       dev->watchdog_timeo = AWC_TX_TIMEOUT;
 
-       netif_start_queue (dev);
 
        awc_private_init( dev);
 
@@ -946,37 +942,40 @@ int init_module(void)
                
 #ifdef CONFIG_AIRONET4500_PCI
        if (awc4500_pci_probe(NULL) == -ENODEV){
-               printk("PCI 4X00 aironet cards not found\n");
+//             printk("PCI 4X00 aironet cards not found\n");
        } else {
                found++;
-               printk("PCI 4X00 found some cards \n");
+//             printk("PCI 4X00 found some cards \n");
        }
 #endif
 #ifdef CONFIG_AIRONET4500_PNP
        if (awc4500_pnp_probe(NULL) == -ENODEV){
-               printk("PNP 4X00 aironet cards not found\n");
+//             printk("PNP 4X00 aironet cards not found\n");
        } else {
                found++;
-               printk("PNP 4X00 found some cards \n");
+//             printk("PNP 4X00 found some cards \n");
        }
 #endif
 #ifdef CONFIG_AIRONET4500_365
        if ( awc_i365_probe() == -1) {
-               printk("PCMCIA 4X00 aironet cards not found for i365(without card services) initialization\n");
+//             printk("PCMCIA 4X00 aironet cards not found for i365(without card services) initialization\n");
        } else {
                 found++ ;
-                printk("PCMCIA 4X00 found some cards, take care, this code is not supposed to work yet \n");
+//              printk("PCMCIA 4X00 found some cards, take care, this code is not supposed to work yet \n");
        }
 #endif
 #ifdef CONFIG_AIRONET4500_ISA
        if (awc4500_isa_probe(NULL) == -ENODEV){
-               printk("ISA 4X00 aironet ISA-bus non-PNP-mode cards not found\n");
+//             printk("ISA 4X00 aironet ISA-bus non-PNP-mode cards not found\n");
        } else {
                found++;
-               printk("ISA 4X00 found some cards \n");
+//             printk("ISA 4X00 found some cards \n");
        }
 #endif
-       if (!found) return -1;
+       if (!found) {
+               printk(KERN_ERR "No Aironet 4X00 cards were found. Note that for ISA \n cards you should use either automatic PNP mode or \n ISA mode with both io and irq param \n Aironet is also afraid of: being second PNP controller(by slot), having anything(brandname bios weirdnesses) in range 0x100-0x180 and maybe around  0xd0000\n If you PNP type card does not get found, try non-PNP switch before complainig. \n");
+               return -1;
+       }
        return 0;
        
 
index 36554e46f41bdc90f0ffd6fc9cea80263b96c68f..8c818d46a769332233623abc555884b1bf2a3590 100644 (file)
@@ -15,6 +15,7 @@
        november 99, integration with 2.3
        17.12.99: finally, got SMP near-correct. 
                timing issues remain- on SMP box its 15% slower on tcp  
+       10.03.00 looks like softnet take us back to normal on SMP
  */
 
 #include <linux/module.h>
@@ -36,6 +37,7 @@
 #include <linux/sched.h>
 #include <linux/delay.h>
 #include "aironet4500.h"
+#include <linux/ip.h>
 
 
 int bap_sleep = 10 ;
@@ -371,7 +373,7 @@ final:
 
 /********************************      BAP     *************************/
 
-inline 
+// inline // too long for inline
 int awc_bap_setup(struct awc_command * cmd) {
 
        int status;
@@ -1524,6 +1526,8 @@ awc_802_11_router_rx(struct net_device * dev,struct awc_fid * rx_buff){
        rx_buff->skb = NULL;
        rx_buff->u.rx.payload = NULL;
        priv->stats.rx_packets++;
+       priv->stats.rx_bytes++;
+       
        netif_rx(skb);
        AWC_ENTRY_EXIT_DEBUG("exit\n");
        return ;
@@ -1577,11 +1581,12 @@ awc_802_11_tx_find_path_and_post(struct net_device * dev,
        struct awc_fid * fid = NULL;
 //     u16 saved_fid ;
        u16 p2p_direct =priv->p2p_found;
-//     struct iphdr * ip_hdr;
+       struct iphdr * ip_hdr;
        //buffer = skb->data;
 
        AWC_ENTRY_EXIT_DEBUG("awc_802_11_tx_find_path_and_post");       
 
+       // netif_stop_queue(dev);
        DOWN(&priv->tx_buff_semaphore);
        if (len  > dev->mtu + 16 ) {
                printk(KERN_ERR "%s packet size too large %d \n",dev->name, len);
@@ -1644,28 +1649,33 @@ awc_802_11_tx_find_path_and_post(struct net_device * dev,
                        }       
        };
 
-       if (tx_rate == 2 || tx_rate == 4 || tx_rate== 20 || tx_rate == 22)
-               fid->u.tx.radio_tx.tx_bit_rate  = tx_rate;
+       if (priv->force_tx_rate == 2 || priv->force_tx_rate == 4 || 
+               priv->force_tx_rate== 11 || priv->force_tx_rate == 22){
+                       fid->u.tx.radio_tx.tx_bit_rate  = priv->force_tx_rate;
+       } else if (priv->force_tx_rate != 0 ) {
+               printk(KERN_ERR "wrong force_tx_rate=%d changed to default \n", priv->force_tx_rate);
+               priv->force_tx_rate = 0;
+       };
        fid->u.tx.radio_tx.TX_Control = 
                aironet4500_tx_control_tx_ok_event_enable |
                aironet4500_tx_control_tx_fail_event_enable |
                aironet4500_tx_control_no_release;
 
-/*     if (len < 100){
+       if (len < priv->force_rts_on_shorter){
                fid->u.tx.radio_tx.TX_Control |=
                        aironet4500_tx_control_use_rts;
        };
-*/
-/*     ip_hdr = skb->data + 14;
+
+       ip_hdr = (struct iphdr * ) ((( char * ) skb->data) + 14);
        if (ip_hdr && skb->data[12] == 0x80 ){
-               if (ip_hdr->tos & IPTOS_RELIABILITY)
+               if (ip_hdr->tos & IPTOS_RELIABILITY && priv->ip_tos_reliability_rts)
                        fid->u.tx.radio_tx.TX_Control |=
                            aironet4500_tx_control_use_rts;
-               if (ip_hdr->tos & IPTOS_THROUGHPUT)
+               if (ip_hdr->tos & IPTOS_THROUGHPUT && priv->ip_tos_troughput_no_retries)
                        fid->u.tx.radio_tx.TX_Control |=
                            aironet4500_tx_control_no_retries;
        };
-*/     
+
        if (priv->p802_11_send ||  memcmp(dev->dev_addr, skb->data +6, 6)  ){
                fid->u.tx.radio_tx.TX_Control |=
                        aironet4500_tx_control_header_type_802_11;      
@@ -1683,7 +1693,7 @@ awc_802_11_tx_find_path_and_post(struct net_device * dev,
                        fid->pkt_len = len -12;
                        fid->u.tx.payload = skb->data +12;
 
-                       if (!memcmp(dev->dev_addr, skb->data +6, 6)){   
+                       if (priv->simple_bridge){       
                                memcpy(fid->u.tx.ieee_802_11.mac1,skb->data,6);
                                memcpy(fid->u.tx.ieee_802_11.mac2,skb->data +6,6);
                                memcpy(fid->u.tx.ieee_802_11.mac3,priv->status.CurrentBssid ,6);
@@ -1691,14 +1701,12 @@ awc_802_11_tx_find_path_and_post(struct net_device * dev,
                                fid->u.tx.ieee_802_11.frame_control = 0x8;
                                fid->u.tx.ieee_802_11.gapLen=6;
                        } else {
-
                                memcpy(fid->u.tx.ieee_802_11.mac1,skb->data,6);
                                memcpy(fid->u.tx.ieee_802_11.mac2,dev->dev_addr,6);
                                memcpy(fid->u.tx.ieee_802_11.mac3,skb->data +6 ,6);
                                memset(fid->u.tx.ieee_802_11.mac4,0 ,6);
                                fid->u.tx.ieee_802_11.frame_control = 0x108;
                                fid->u.tx.ieee_802_11.gapLen=6;                 
-
                        }
                } else { // plain old 802.3, with hdr copied
                        fid->u.tx.radio_tx.PayloadLength        = len -12;
@@ -1745,11 +1753,20 @@ awc_802_11_tx_find_path_and_post(struct net_device * dev,
                
        };
        
+       priv->stats.tx_bytes += fid->u.tx.ieee_802_3.payload_length;
+       priv->stats.tx_packets++;
        
        
        awc_fid_queue_push_tail(&priv->tx_in_transmit,fid);
        udelay(1);
        awc_transmit_packet(dev,fid);
+       if (priv->tx_large_ready.size <= 2 || priv->tx_small_ready.size <= 2 ){
+               if (netif_running(dev))
+                       netif_stop_queue(dev);
+       } else {
+               if (netif_running(dev)) 
+                       netif_wake_queue(dev);
+       }
        UP(&priv->tx_buff_semaphore);
        AWC_ENTRY_EXIT_DEBUG("exit\n");
        return 0;
@@ -1768,6 +1785,8 @@ awc_802_11_tx_find_path_and_post(struct net_device * dev,
   final:
        priv->stats.tx_errors++;
        UP(&priv->tx_buff_semaphore);
+       if (!netif_running(dev)) 
+               netif_start_queue(dev);
        dev_kfree_skb(skb);
        AWC_ENTRY_EXIT_DEBUG("BADExit\n");
        return -1;
@@ -1797,7 +1816,6 @@ awc_802_11_after_tx_packet_to_card_write(struct net_device * dev,
                dev_kfree_skb(tx_buff->skb);
                tx_buff->skb = NULL;
        }
-       netif_wake_queue (dev);
 
        AWC_ENTRY_EXIT_DEBUG("exit\n");
 };
@@ -1839,7 +1857,7 @@ awc_802_11_after_failed_tx_packet_to_card_write(struct net_device * dev,
 
 };
                                          
-void 
+inline void 
 awc_802_11_after_tx_complete(struct net_device * dev, struct awc_fid * tx_buff){
 
         struct awc_private * priv = (struct awc_private *)dev->priv;
@@ -1861,7 +1879,7 @@ awc_802_11_after_tx_complete(struct net_device * dev, struct awc_fid * tx_buff){
        }
 
        tx_buff->busy = 0;
-       netif_wake_queue (dev);
+//     netif_wake_queue (dev);
 
        AWC_ENTRY_EXIT_DEBUG("exit\n");
 };
@@ -2294,7 +2312,8 @@ awc_interrupt_process(struct net_device * dev){
 
 //     save_flags(flags);
 //     cli();
-//     disable_irq(dev->irq);
+       // here we need it, because on 2.3 SMP there are truly parallel irqs    
+       disable_irq(dev->irq);
 
        DEBUG(2," entering interrupt handler %s ",dev->name);
 
@@ -2503,14 +2522,14 @@ start:
 
 //end_here:
 
-//     enable_irq(dev->irq);
+       enable_irq(dev->irq);
 //     restore_flags(flags);
 
         return 0;
 
 bad_end:
         AWC_ENTRY_EXIT_DEBUG(" bad_end exit \n");      
-//     enable_irq(dev->irq);
+       enable_irq(dev->irq);
 //     restore_flags(flags);
        return -1;
 
@@ -2528,16 +2547,17 @@ static int p802_11_send  =  0; // 1
 static int awc_process_tx_results = 0;
 int tx_queue_len = 10;
 int tx_rate = 0;
-static int channel = 5;
+int channel = 5;
 //static int tx_full_rate = 0;
-static int max_mtu = 2312;
-static int adhoc = 0;
-static int large_buff_mem = 1700 * 10;
-static int small_buff_no       = 20;
-static int awc_full_stats = 0;
-static char SSID[33] = {0};
-static int master= 0;
-static int slave = 0;
+int max_mtu = 2312;
+int adhoc = 0;
+int large_buff_mem = 1700 * 10;
+int small_buff_no      = 20;
+int awc_full_stats = 0;
+char SSID[33] = {0};
+int master= 0;
+int slave = 0;
+int awc_simple_bridge = 0;
 // int debug =0;
 
 #if LINUX_VERSION_CODE >= 0x20100
@@ -2550,6 +2570,7 @@ MODULE_PARM(tx_full_rate,"i");
 MODULE_PARM(adhoc,"i");
 MODULE_PARM(master,"i");
 MODULE_PARM(slave,"i");
+MODULE_PARM(awc_simple_bridge,"i");
 MODULE_PARM(max_mtu,"i");
 MODULE_PARM(large_buff_mem,"i");
 MODULE_PARM(small_buff_no,"i");
@@ -2572,7 +2593,7 @@ EXPORT_SYMBOL(awc_debug);
 EXPORT_SYMBOL(awc_private_init);
 EXPORT_SYMBOL(awc_tx_timeout);
 EXPORT_SYMBOL(awc_start_xmit);
-EXPORT_SYMBOL(awc_rx);
+//EXPORT_SYMBOL(awc_rx);
 EXPORT_SYMBOL(awc_interrupt);
 EXPORT_SYMBOL(awc_get_stats);
 EXPORT_SYMBOL(awc_change_mtu);
@@ -2674,7 +2695,7 @@ char name[] = "ElmerLinux";
                i++;
        }
        
-       // following MUST be consistent with awc_rids !!!
+       // following MUST be consistent with awc_rids in count and ordrering !!!
        priv->rid_dir[0].buff = &priv->config; // card RID mirrors
        priv->rid_dir[1].buff = &priv->SSIDs;
        priv->rid_dir[2].buff = &priv->fixed_APs;
@@ -2726,6 +2747,7 @@ char name[] = "ElmerLinux";
        if (!adhoc)
                priv->config.OperatingMode = MODE_STA_ESS;
 //        priv->config.OperatingMode = MODE_AP;
+// Setting rates does not work with new hardware, use force_tx_rate via proc
 //     priv->config.Rates[0]   =0x82;
 //     priv->config.Rates[1]   =0x4;
 //     priv->config.Rates[2]   =tx_full_rate;
@@ -2738,7 +2760,9 @@ char name[] = "ElmerLinux";
        if (adhoc && master){
                priv->config.JoinNetTimeout     = 0x1;//0 is facotry default
        } else if (adhoc && slave){
-               priv->config.JoinNetTimeout     = 0xffff;
+               // by spec 0xffff, but, this causes immediate bad behaviour
+               // firmware behvaiour changed somehere around ver 2??
+               priv->config.JoinNetTimeout     = 0x7fff;
        };      
 //     priv->config.AuthenticationType = 1;
        priv->config.Stationary =1;
@@ -2761,6 +2785,7 @@ char name[] = "ElmerLinux";
        // here we go, bad aironet
        memset(&priv->SSIDs,0,sizeof(priv->SSIDs));
 
+       my_spin_lock_init(&priv->queues_lock);
         priv->SSIDs.ridLen             =0;
         if (!SSID) {
                priv->SSIDs.SSID[0].SSID[0]     ='a';
@@ -2839,6 +2864,7 @@ int awc_private_init(struct net_device * dev){
        my_spin_lock_init(&priv->command_issuing_spinlock);
        my_spin_lock_init(&priv->both_bap_spinlock);
        my_spin_lock_init(&priv->bap_setup_spinlock);
+       my_spin_lock_init(&priv->interrupt_spinlock);
        
        priv->command_semaphore_on = 0;
        priv->unlock_command_postponed = 0;
@@ -2877,7 +2903,12 @@ int awc_private_init(struct net_device * dev){
        priv->p2p_found         =0;
 
        priv->p802_11_send      =p802_11_send;
-       
+       priv->full_stats        = awc_full_stats;
+       priv->simple_bridge     = awc_simple_bridge;
+       priv->force_rts_on_shorter = 0;
+       priv->force_tx_rate     = tx_rate;
+       priv->ip_tos_reliability_rts = 0;
+       priv->ip_tos_troughput_no_retries = 0 ; 
 
        priv->ejected           =0;     
        priv->interrupt_count   =0;
@@ -2960,6 +2991,7 @@ void awc_tx_timeout (struct net_device *dev)
        struct awc_private *priv = (struct awc_private *) dev->priv;
        struct awc_fid * fid;
        int cnt;
+       unsigned long flags;
 
        DEBUG (2, "%s: awc_tx_timeout \n", dev->name);
 
@@ -2969,11 +3001,11 @@ void awc_tx_timeout (struct net_device *dev)
                priv->tx_large_ready.size, priv->tx_small_ready.size);
        priv->stats.tx_errors++;
 
-       // save_flags(flags);
-       // cli();
+       save_flags(flags);
+       cli();
        fid = priv->tx_in_transmit.head;
        cnt = 0;
-       while (fid) {
+       while (fid) { // removing all fids older that that
                if (jiffies - fid->transmit_start_time > (HZ)) {
                        //      printk(KERN_ERR "%s staled tx_buff found, age %uld jiffies\n",dev->name,
                        //              jiffies - fid->transmit_start_time );
@@ -2986,14 +3018,12 @@ void awc_tx_timeout (struct net_device *dev)
                fid = fid->next;
                if (cnt++ > 200) {
                        printk ("bbb in awc_fid_queue\n");
-                       //              restore_flags(flags);
+                       restore_flags(flags);
                        return;
                };
 
        }
-       //restore_flags(flags);
-       //debug =0x8;
-
+       restore_flags(flags);
        dev->trans_start = jiffies;
        netif_start_queue (dev);
 }
@@ -3002,7 +3032,7 @@ void awc_tx_timeout (struct net_device *dev)
 long long last_tx_q_hack = 0;
 int direction = 1;
 
- int awc_start_xmit(struct sk_buff *skb, struct net_device *dev) {
+int awc_start_xmit(struct sk_buff *skb, struct net_device *dev) {
 
        struct awc_private *priv = (struct awc_private *)dev->priv;
        int retval = 0;
@@ -3021,10 +3051,10 @@ int direction = 1;
                return -1;
        };
        
-       if (test_and_set_bit( 0, (void *) &priv->tx_chain_active) ) {
-               netif_start_queue (dev);
-               return 1;
-       }
+//     if (test_and_set_bit( 0, (void *) &priv->tx_chain_active) ) {
+//             netif_start_queue (dev);
+//             return 1;
+//     }
 
        dev->trans_start = jiffies;
        retval = awc_802_11_tx_find_path_and_post(dev,skb);
@@ -3035,7 +3065,7 @@ int direction = 1;
        return retval;
 }
 
-int awc_rx(struct net_device *dev, struct awc_fid * rx_fid) {
+inline int awc_rx(struct net_device *dev, struct awc_fid * rx_fid) {
 
 //     struct awc_private *lp = (struct awc_private *)dev->priv;
 
@@ -3062,20 +3092,23 @@ int awc_rx(struct net_device *dev, struct awc_fid * rx_fid) {
  void awc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
        struct net_device *dev = (struct net_device *)dev_id;
-//     struct awc_private *lp;
-//     unsigned long flags;
+       struct awc_private *priv;
+       unsigned long flags;
 
 //     if ((dev == NULL)) return;
 
-//     lp = (struct awc_private *)dev->priv;
+       priv = (struct awc_private *)dev->priv;
 
 
        
 
        DEBUG(2, "%s: awc_interrupt \n",  dev->name);
-       
+       my_spin_lock_irqsave(&priv->interrupt_spinlock, flags);   
+
        awc_interrupt_process(dev);
 
+       my_spin_unlock_irqrestore(&priv->interrupt_spinlock, flags);      
+
        return;
 }
 
@@ -3105,6 +3138,8 @@ int awc_rx(struct net_device *dev, struct awc_fid * rx_fid) {
 
        // the very following is the very wrong very probably
        if (awc_full_stats){
+               priv->stats.rx_bytes            = priv->statistics.HostRxBytes;
+               priv->stats.tx_bytes            = priv->statistics.HostTxBytes;
                priv->stats.rx_fifo_errors      = priv->statistics.RxOverrunErr ;
                priv->stats.rx_crc_errors       = priv->statistics.RxPlcpCrcErr + priv->statistics.RxMacCrcErr ;
                priv->stats.rx_frame_errors     = priv->statistics.RxPlcpFormat ;
@@ -3130,7 +3165,7 @@ int awc_rx(struct net_device *dev, struct awc_fid * rx_fid) {
 int awc_change_mtu(struct net_device *dev, int new_mtu){
 
 //     struct awc_private *priv = (struct awc_private *)dev->priv;
-//        unsigned long flags;
+        unsigned long flags;
 
        if ((new_mtu < 256 ) || (new_mtu > 2312) || (max_mtu && new_mtu > max_mtu) )
                 return -EINVAL;
@@ -3140,14 +3175,17 @@ int awc_change_mtu(struct net_device *dev, int new_mtu){
 
        };
        if (dev->mtu != new_mtu) {
-//             save_flags(flags);
-//             cli();
-               awc_disable_MAC(dev);
+               save_flags(flags);
+               cli();
+                netif_stop_queue(dev);
+                awc_disable_MAC(dev);
+               restore_flags(flags); 
+                               
                awc_tx_dealloc(dev);
                dev->mtu = new_mtu;
                awc_tx_alloc(dev);
                awc_enable_MAC(dev);
-//             restore_flags(flags);
+               netif_start_queue(dev);
 
                printk("%s mtu has been changed to %d \n ",dev->name,dev->mtu);
 
index cefa41b884673f4a7b1a40f6d52c0a22b9a1d672..abfd262b01f626dfe3764c1bde2d28bfab3f2738 100644 (file)
@@ -43,7 +43,7 @@
 #endif
 
 
-
+#include "aironet4500.h"
 #include "aironet4500_rid.c"
 
 
@@ -247,8 +247,9 @@ int awc_proc_format_bits(int write,u32 * buff, size_t* lenp, struct awc_rid_dir
 
        DEBUG(0x20000,"awc proc int data %x \n",val);
        
+// both of them are crazy
 //     *lenp = sizeof(int);
-       *lenp += 1;
+//     *lenp += 1;
        
        AWC_ENTRY_EXIT_DEBUG("exit");
        return 0;
@@ -385,6 +386,18 @@ ctl_table awc_driver_proc_table[] = {
         {0}
 };
 
+ctl_table awc_driver_level_ctable[] = {
+        {1, "force_rts_on_shorter"     , NULL, sizeof(int), 0600,NULL, proc_dointvec},
+        {2, "force_tx_rate"            , NULL, sizeof(int), 0600,NULL, proc_dointvec},
+        {3, "ip_tos_reliability_rts"   , NULL, sizeof(int), 0600,NULL, proc_dointvec},
+        {4, "ip_tos_troughput_no_retries", NULL, sizeof(int), 0600,NULL, proc_dointvec},
+        {5, "debug"                    , NULL, sizeof(int), 0600,NULL, proc_dointvec},
+        {6, "simple_bridge"            , NULL, sizeof(int), 0600,NULL, proc_dointvec},
+        {7, "p802_11_send"             , NULL, sizeof(int), 0600,NULL, proc_dointvec},
+        {8, "full_stats"               , NULL, sizeof(int), 0600,NULL, proc_dointvec},
+        {0}
+};
+
 ctl_table awc_root_table[] = {
         {254, "aironet4500", NULL, 0, 0555, awc_driver_proc_table},
         {0}
@@ -398,12 +411,12 @@ const char awc_procname[]= "awc5";
 int awc_proc_set_device(int device_number){
   int group =0;
   int rid = 0;
-  struct awc_priv * priv;
-
+  struct awc_private * priv;
+  ctl_table * tmp_table_ptr;
  
   AWC_ENTRY_EXIT_DEBUG("awc_proc_set_device");  
   if (!aironet4500_devices[device_number] || (awc_nof_rids <=0 )) return -1 ;
-  priv = (struct awc_priv * )aironet4500_devices[device_number]->priv;
+  priv = (struct awc_private * )aironet4500_devices[device_number]->priv;
 
   awc_rids_setup(aironet4500_devices[device_number]);
 
@@ -413,7 +426,7 @@ int awc_proc_set_device(int device_number){
   awc_proc_priv[device_number].proc_table_device_root[0].ctl_name = device_number+1;
 
   awc_proc_priv[device_number].proc_table_sys_root->child = awc_proc_priv[device_number].proc_table_device_root;
-  memcpy(awc_proc_priv[device_number].proc_name,(struct awc_priv * )aironet4500_devices[device_number]->name,5);
+  memcpy(awc_proc_priv[device_number].proc_name,(struct NET_DEVICE * )aironet4500_devices[device_number]->name,5);
   awc_proc_priv[device_number].proc_name[4]=0;
  // awc_proc_priv[device_number].proc_name[3]=48+device_number;
   awc_proc_priv[device_number].proc_table_device_root[0].procname = &(awc_proc_priv[device_number].proc_name[0]);
@@ -484,6 +497,40 @@ int awc_proc_set_device(int device_number){
        group++;
 
   };
+// here are driver-level params dir  
+       awc_proc_priv[device_number].proc_table[group].ctl_name = group +1;
+       awc_proc_priv[device_number].proc_table[group+1].ctl_name = 0;
+       awc_proc_priv[device_number].proc_table[group].procname = "driver-level";
+       awc_proc_priv[device_number].proc_table[group].data     = awc_proc_buff;
+       awc_proc_priv[device_number].proc_table[group].maxlen  = sizeof(awc_proc_buff) -1;
+       awc_proc_priv[device_number].proc_table[group].mode     = 0600;
+       awc_proc_priv[device_number].proc_table[group].child    = kmalloc(sizeof(awc_driver_level_ctable) , GFP_KERNEL);
+       awc_proc_priv[device_number].proc_table[group].proc_handler = NULL;
+       awc_proc_priv[device_number].proc_table[group].strategy = NULL;
+       awc_proc_priv[device_number].proc_table[group].de       = NULL;
+       awc_proc_priv[device_number].proc_table[group].extra1   = NULL;
+       awc_proc_priv[device_number].proc_table[group].extra2   = NULL;
+       if (!awc_proc_priv[device_number].proc_table[group].child) {
+               awc_proc_priv[device_number].proc_table[group].ctl_name = 0;
+               printk(KERN_CRIT "Out of memory on aironet4500_proc huge table alloc \n");
+               return 0;
+       }
+
+       
+       tmp_table_ptr = awc_proc_priv[device_number].proc_table[group].child;
+       memcpy(tmp_table_ptr,awc_driver_level_ctable,sizeof(awc_driver_level_ctable));
+
+
+        tmp_table_ptr[0].data = 
+         &(priv->force_rts_on_shorter);
+        tmp_table_ptr[1].data =   &priv->force_tx_rate;
+        tmp_table_ptr[2].data = (void *) &priv->ip_tos_reliability_rts;
+        tmp_table_ptr[3].data = (void *) &priv->ip_tos_troughput_no_retries;
+        tmp_table_ptr[4].data = (void *) &priv->debug;
+        tmp_table_ptr[5].data = (void *) &priv->simple_bridge;
+        tmp_table_ptr[6].data = (void *) &priv->p802_11_send;
+        tmp_table_ptr[7].data = (void *) &priv->full_stats;
+
 
        awc_proc_priv[device_number].sysctl_header = 
                register_sysctl_table(awc_proc_priv[device_number].proc_table_sys_root,0);
index 7d52269f99aa3394e5d68c975916fca9b90d4205..ff7550d331ddfb8609415cbc3a32f7535576fce5 100644 (file)
 #define awc_RID_gen_BasicRate_11Mbps                   {&aironet4500_RID_Select_General_Config,0x0010, 8,1,1,0,1,0xff,0x96,"BasicRate 11Mbps"}
 
 
-#define awc_RID_gen_Long_retry_limit                   {&aironet4500_RID_Select_General_Config,0x0018,16, 1,1,0,0,0,0,"Short Retry Limit"}
-#define awc_RID_gen_Short_retry_limit                  {&aironet4500_RID_Select_General_Config,0x001A,16, 1,1,0,0,0,0,"Long Retry Limit"}
-#define awc_RID_gen_Tx_MSDU_lifetime                   {&aironet4500_RID_Select_General_Config,0x001C,16, 1,1000,0,0,0,0,"TX MSDU Lifetime"}
-#define awc_RID_gen_Rx_MSDU_lifetime                   {&aironet4500_RID_Select_General_Config,0x001E,16, 1,1000,0,0,0,0,"RX MSDU Lifetime"}
-#define awc_RID_gen_Stationary                                 {&aironet4500_RID_Select_General_Config,0x0020,16, 1,1,0,0,0,0,"Stationary"}
-#define awc_RID_gen_BC_MC_Ordering                     {&aironet4500_RID_Select_General_Config,0x0022,16, 1,1,0,0,0,0,"Strictly order Bcast and Mcast"}
-#define awc_RID_gen_Device_type                        {&aironet4500_RID_Select_General_Config,0x0024,16, 1,1,1,0,0xffff,0x0065,"Radio Type PC4500"}
-#define awc_RID_gen_Reserved_0x0026                    {&aironet4500_RID_Select_General_Config,0x0026, 8,10,1,0,0,0,0,"Reserved 0x0028"}
+#define awc_RID_gen_Long_retry_limit                   {&aironet4500_RID_Select_General_Config,0x0018,16, 1,1,0,0,0xffff,0,"Short Retry Limit"}
+#define awc_RID_gen_Short_retry_limit                  {&aironet4500_RID_Select_General_Config,0x001A,16, 1,1,0,0,0xffff,0,"Long Retry Limit"}
+#define awc_RID_gen_Tx_MSDU_lifetime                   {&aironet4500_RID_Select_General_Config,0x001C,16, 1,1000,0,0,0xffff,0,"TX MSDU Lifetime"}
+#define awc_RID_gen_Rx_MSDU_lifetime                   {&aironet4500_RID_Select_General_Config,0x001E,16, 1,1000,0,0,0xffff,0,"RX MSDU Lifetime"}
+#define awc_RID_gen_Stationary                                 {&aironet4500_RID_Select_General_Config,0x0020,16, 1,1,0,0,0xffff,0,"Stationary"}
+#define awc_RID_gen_BC_MC_Ordering                     {&aironet4500_RID_Select_General_Config,0x0022,16, 1,1,0,0,0xffff,0,"Strictly order Bcast and Mcast"}
+#define awc_RID_gen_Device_type                        {&aironet4500_RID_Select_General_Config,0x0024,16, 1,1,1,0,0xffff,0x00,"Radio Type"}
+#define awc_RID_gen_Reserved_0x0026                    {&aironet4500_RID_Select_General_Config,0x0026, 8,10,1,0,0,0xff,0,"Reserved0x28"}
 
 
 //SCANNING/ASSOCIATING
 #define awc_RID_gen_FastListenInterval                 awc_def_gen_RID(0x0056,"FastListenInterval",    16,0xffff,0,"msek")     // 0 default    100 kus    The listen interval to be used immediately after
 #define awc_RID_gen_ListenDecay                        awc_def_gen_RID(0x0058,"ListenDecay",           16,0xffff,0,"times")    //      0 default    2Number of times to use the current listen interval
 #define awc_RID_gen_FastListenDelay            awc_def_gen_RID(0x005A,"FastListenDelay",       16,0xffff,0,"msek")     //      0 default    200 kus    Time interval to delay before going to fast listen
-#define awc_RID_gen_Reserved0x005C                     awc_def_gen_RID(0x005C,"Reserved0x005C",        32,0,0,"")      //
+#define awc_RID_gen_Reserved0x005C                     awc_def_gen_RID(0x005C,"Reserved0x005C",        32,0xffffffff,0,"")     //
 //ADHOC (or AP) OPERATION
 #define awc_RID_gen_BeaconPeriod                       awc_def_gen_RID(0x0060,"BeaconPeriod",          16,0xffff,0,"msek")     //      0 default    100        0 selects the factory default of [~100 ms].  (kus)
 #define awc_RID_gen_AtimDuration                       awc_def_gen_RID(0x0062,"AtimDuration",          16,0xffff,0,"msek")     //      0 default    5 kus      The time period reserved for ATIMs immediately after (kus)      the beacon. 0xFFFF will disable the ATIM window; power save mode will not operate.This parameter only applies to adhoc/IBSS.
 #define awc_RID_gen_ARLThreshold                       awc_def_gen_RID(0x0090,"ARLThreshold",          16,0xffff,0,"times")    //       0 default    0xFFFF    0 selects the factory defaults. (which for now is
 #define awc_RID_gen_ARLDecay                   awc_def_gen_RID(0x0092,"ARLDecay",              16,0xffff,0,"times")    //       0 default    0xFFFF    0 selects the factory defaults. (which for now is
 #define awc_RID_gen_ARLDelay                   awc_def_gen_RID(0x0094,"ARLDelay",              16,0xffff,0,"times")    //       0 default    0xFFFF    0 selects the factory defaults. (which for now is
-#define awc_RID_gen_Unused0x0096                       awc_def_gen_RID(0x0096,"Unused",                16,0,0,"")      //
+#define awc_RID_gen_Unused0x0096                       awc_def_gen_RID(0x0096,"Reserved0x96",          16,0xffff,0,"") //
 #define awc_RID_gen_MagicPacketAction          awc_def_gen_RID(0x0098,"MagicPacketAction",     8,0xff,0," hell knows what")    //        0  0         0 selects no action to be taken on a magic packet and"
 #define awc_RID_gen_MagicPacketControl                 awc_def_gen_RID(0x0099,"MagicPacketControl",    8,0xff,0," hell know what")     //        0  0         0 will disable the magic packet mode command"
 
 #define awc_RID_act_BasicRate_11Mbps                   {&aironet4500_RID_Select_Active_Config,0x0010, 8,1,1,0,1,0xff,0x96,"BasicRate 11Mbps"}
 
 
-#define awc_RID_act_Long_retry_limit           {&aironet4500_RID_Select_Active_Config,0x0018,16, 1,1,0,0,0,0,"Short Retry Limit"}
-#define awc_RID_act_Short_retry_limit          {&aironet4500_RID_Select_Active_Config,0x001A,16, 1,1,0,0,0,0,"Long Retry Limit"}
-#define awc_RID_act_Tx_MSDU_lifetime           {&aironet4500_RID_Select_Active_Config,0x001C,16, 1,1000,0,0,0,0,"TX MSDU Lifetime"}
-#define awc_RID_act_Rx_MSDU_lifetime           {&aironet4500_RID_Select_Active_Config,0x001E,16, 1,1000,0,0,0,0,"RX MSDU Lifetime"}
-#define awc_RID_act_Stationary                         {&aironet4500_RID_Select_Active_Config,0x0020,16, 1,1,0,0,0,0,"Stationary"}
-#define awc_RID_act_BC_MC_Ordering                     {&aironet4500_RID_Select_Active_Config,0x0022,16, 1,1,0,0,0,0,"Strictly order Bcast and Mcast"}
+#define awc_RID_act_Long_retry_limit           {&aironet4500_RID_Select_Active_Config,0x0018,16, 1,1,0,0,0xffff,0,"Short Retry Limit"}
+#define awc_RID_act_Short_retry_limit          {&aironet4500_RID_Select_Active_Config,0x001A,16, 1,1,0,0,0xffff,0,"Long Retry Limit"}
+#define awc_RID_act_Tx_MSDU_lifetime           {&aironet4500_RID_Select_Active_Config,0x001C,16, 1,1000,0,0,0xffff,0,"TX MSDU Lifetime"}
+#define awc_RID_act_Rx_MSDU_lifetime           {&aironet4500_RID_Select_Active_Config,0x001E,16, 1,1000,0,0,0xffff,0,"RX MSDU Lifetime"}
+#define awc_RID_act_Stationary                         {&aironet4500_RID_Select_Active_Config,0x0020,16, 1,1,0,0,0xffff,0,"Stationary"}
+#define awc_RID_act_BC_MC_Ordering                     {&aironet4500_RID_Select_Active_Config,0x0022,16, 1,1,0,0,0xffff,0,"Strictly order Bcast and Mcast"}
 #define awc_RID_act_Device_type                        {&aironet4500_RID_Select_Active_Config,0x0024,16, 1,1,1,0,0xffff,0x0065,"Radio Type PC4500"}
-#define awc_RID_act_Reserved_0x0026                    {&aironet4500_RID_Select_Active_Config,0x0026, 8,10,1,0,0,0,0,"Reserved 0x0028"}
+#define awc_RID_act_Reserved_0x0026                    {&aironet4500_RID_Select_Active_Config,0x0026, 8,10,1,0,0,0xff,0,"Reserved0x28"}
 
 
 //SCANNING/ASSOCIATING
 #define awc_RID_act_ARLThreshold               awc_def_act_RID(0x0090,"ARLThreshold",          16,0xffff,0,"times")    //       0 default    0xFFFF    0 selects the factory defaults. (which for now is
 #define awc_RID_act_ARLDecay                   awc_def_act_RID(0x0092,"ARLDecay",              16,0xffff,0,"times")    //       0 default    0xFFFF    0 selects the factory defaults. (which for now is
 #define awc_RID_act_ARLDelay                   awc_def_act_RID(0x0094,"ARLDelay",              16,0xffff,0,"times")    //       0 default    0xFFFF    0 selects the factory defaults. (which for now is
-#define awc_RID_act_Unused0x0096               awc_def_act_RID(0x0096,"Unused",                16,0,0,"")      //
+#define awc_RID_act_Unused0x0096               awc_def_act_RID(0x0096,"Reserved0x96",          16,0xffff,0,"") //
 #define awc_RID_act_MagicPacketAction          awc_def_act_RID(0x0098,"MagicPacketAction",     8,0xff,0," hell knows what")    //        0  0         0 selects no action to be taken on a magic packet and"
 #define awc_RID_act_MagicPacketControl                 awc_def_act_RID(0x0099,"MagicPacketControl",    8,0xff,0," hell know what")     //        0  0         0 will disable the magic packet mode command"
 
 #define awc_RID_SSIDlen1                       awc_def_SSID_RID(0x0002,"SSIDlen1",             16,0xffff,0,"") //      7      The length of the SSID1 byte string.
 #define awc_RID_SSID1                          awc_def_SSID_RID(0x0004,"SSID1",                255,0,0,"")     //    "tsunami"        The identifier uniquely identifying the wireless system.
 #define awc_RID_SSIDlen2                       awc_def_SSID_RID(0x0024,"SSIDlen2",             16,0xffff,0,"") //      0      The length of the SSID2 byte string.
-#define awc_RID_SSID2                          awc_def_SSID_RID(0x0026,"SSID2",                255,0,0,"")     //   0's    The identifier uniquely identifying the wireless system.
+#define awc_RID_SSID2                          awc_def_SSID_RID(0x0026,"SSID2",                255,0,0,"")     //   
 #define awc_RID_SSIDlen3                       awc_def_SSID_RID(0x0046,"SSIDlen3",             16,0xffff,0,"") //      0      The length of the SSID3 byte string.
-#define awc_RID_SSID3                          awc_def_SSID_RID(0x0048,"SSID3",                255,0,0,"")     //    0's    The identifier uniquely identifying the wireless system.
+#define awc_RID_SSID3                          awc_def_SSID_RID(0x0048,"SSID3",                255,0,0,"")     //    
+#define awc_RID_SSID1hex                               awc_def_SSID_RID(0x0004,"SSID1hex",             255,0xff,0,"")  
+#define awc_RID_SSID2hex                               awc_def_SSID_RID(0x0026,"SSID2hex",             255,0xff,0,"")  
+#define awc_RID_SSID3hex                               awc_def_SSID_RID(0x0048,"SSID3hex",             255,0xff,0,"")  
 
 // AP list
 
@@ -1304,6 +1307,9 @@ struct aironet4500_RID awc_SSID_RID[]={
        awc_RID_SSID2,
        awc_RID_SSIDlen3,
        awc_RID_SSID3,
+       awc_RID_SSID1hex,
+       awc_RID_SSID2hex,
+       awc_RID_SSID3hex,
        {0}
 };
 
index 0e3b982fe987d1046fad02246cd0e7c1b6744b02..846db3d8e716a81a8b93d32c3cd5a637afb8996a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright (C) 1997 Cullen Jennings
- *  Copyright (C) 1998 Elmer.Joandi@ut.ee, +37-255-13500        
+ *  Copyright (C) 1998 Elmer Joandiu, elmer@ylenurme.ee
  *  Gnu Public License applies
  * This module provides support for the Arlan 655 card made by Aironet
  */
@@ -638,15 +638,20 @@ static void arlan_registration_timer(unsigned long data)
                priv->registrationLastSeen = jiffies;
                priv->registrationLostCount = 0;
                priv->reRegisterExp = 1;
-               if (!netif_running(dev))
+               if (!netif_running(dev) )
                        netif_wake_queue(dev);
+               if (priv->tx_last_sent > priv->tx_last_cleared &&
+                       jiffies - priv->tx_last_sent > 5*HZ ){
+                       arlan_command(dev, ARLAN_COMMAND_CLEAN_AND_RESET);              
+                       priv->tx_last_cleared = jiffies;
+               };
        }
 
 
        if (!registrationBad(dev) && priv->ReTransmitRequested)
        {
                IFDEBUG(ARLAN_DEBUG_TX_CHAIN)
-                       printk(KERN_ERR "Retranmit from timer \n");
+                       printk(KERN_ERR "Retransmit from timer \n");
                priv->ReTransmitRequested = 0;
                arlan_retransmit_now(dev);
        }
@@ -1335,8 +1340,8 @@ static void arlan_tx_timeout (struct net_device *dev)
        printk(KERN_ERR "%s: arlan transmit timed out, kernel decided\n", dev->name);
        /* Try to restart the adaptor. */
        arlan_command(dev, ARLAN_COMMAND_CLEAN_AND_RESET);
-       dev->trans_start = jiffies;
-       netif_start_queue (dev);
+       // dev->trans_start = jiffies;
+       // netif_start_queue (dev);
 }
 
 
@@ -1348,12 +1353,6 @@ static int arlan_tx(struct sk_buff *skb, struct net_device *dev)
 
        ARLAN_DEBUG_ENTRY("arlan_tx");
        
-       /*
-        * If some higher layer thinks we've missed an tx-done interrupt
-        * we are passed NULL. Caution: dev_tint() handles the cli()/sti()
-        * itself.
-        */
-
        length = ETH_ZLEN < skb->len ? skb->len : ETH_ZLEN;
        buf = skb->data;
 
index 2a3011532230737a3909a46f38ef5f2c90baece8..606d5a606f009dc8a5c052b3378fb41f1e8d913e 100644 (file)
@@ -14,7 +14,6 @@ if [ "$CONFIG_NET_PCMCIA" = "y" ]; then
    dep_tristate '  New Media PCMCIA support' CONFIG_PCMCIA_NMCLAN $CONFIG_PCMCIA
    dep_tristate '  SMC 91Cxx PCMCIA support' CONFIG_PCMCIA_SMC91C92 $CONFIG_PCMCIA
    dep_tristate '  Xircom 16-bit PCMCIA support' CONFIG_PCMCIA_XIRC2PS $CONFIG_PCMCIA
-   dep_tristate '  Aironet 4500/4800 PCMCIA support' CONFIG_AIRONET4500_CS $CONFIG_AIRONET4500 $CONFIG_PCMCIA
    dep_tristate '  COM20020 ARCnet PCMCIA support' CONFIG_ARCNET_COM20020_CS $CONFIG_ARCNET_COM20020 $CONFIG_ARCNET $CONFIG_PCMCIA
 
    if [ "$CONFIG_CARDBUS" = "y" ]; then
@@ -27,6 +26,7 @@ if [ "$CONFIG_NET_PCMCIA" = "y" ]; then
       dep_tristate '  Aviator/Raytheon 2.4MHz wireless support' CONFIG_PCMCIA_RAYCS $CONFIG_PCMCIA
       dep_tristate '  Xircom Netwave AirSurfer wireless support' CONFIG_PCMCIA_NETWAVE $CONFIG_PCMCIA
       dep_tristate '  AT&T/Lucent Wavelan wireless support' CONFIG_PCMCIA_WAVELAN $CONFIG_PCMCIA
+      dep_tristate '  Aironet 4500/4800 PCMCIA support' CONFIG_AIRONET4500_CS $CONFIG_AIRONET4500 $CONFIG_PCMCIA
    fi
 fi
 
index 3ef45a297d45b5d044c293e8cb441ed71a718210..641c6733287b7c804f4152643830b898e8b01f3d 100644 (file)
@@ -230,7 +230,6 @@ static dev_link_t *awc_attach(void)
        dev->init = &awc_pcmcia_init;
        dev->open = &awc_pcmcia_open;
        dev->stop = &awc_pcmcia_close;
-       netif_start_queue (dev);
        
        link->priv = dev;
 #if CS_RELEASE_CODE > 0x2911
diff --git a/drivers/parport/ChangeLog b/drivers/parport/ChangeLog
new file mode 100644 (file)
index 0000000..7429ec3
--- /dev/null
@@ -0,0 +1,10 @@
+2000-03-10    <twaugh@redhat.com>
+
+       * parport_pc.c (decode_winbond): Use correct 83877ATF chip ID.
+       (decode_winbond): Fix typo.
+
+2000-03-09    <twaugh@redhat.com>
+
+       * parport_pc.c: Integrate SuperIO PCI probe with normal PCI card
+       probe, so that the MODULE_DEVICE_TABLE is complete.
+
index 9cfa53b0d02b6548b40a1dfd841d06269a9c9485..86fc6f874088b127ff9748adf74147d0b6df1b7b 100644 (file)
@@ -1175,11 +1175,11 @@ static void decode_winbond(int efer, int key, int devid, int devrev, int oldid)
        else if ((id & ~0x0f) == 0x5210) type="83627";
        else if ((id & ~0x0f) == 0x6010) type="83697HF";
        else if ((oldid &0x0f ) == 0x0c) { type="83877TF"; progif=1;}
-       else if ((oldid &0x0f ) == 0x0c) { type="83877ATF"; progif=1;}
+       else if ((oldid &0x0f ) == 0x0d) { type="83877ATF"; progif=1;}
        else progif=0;
 
        if(type==NULL) 
-               printk("Winbond unkown chip type\n");
+               printk("Winbond unknown chip type\n");
        else    
                printk("Winbond chip type %s\n",type);
 
@@ -2161,9 +2161,9 @@ static int __devinit sio_via_686a_probe (struct pci_dev *pdev)
 
 enum parport_pc_sio_types {
        sio_via_686a = 0,       /* Via VT82C686A motherboard Super I/O */
+       last_sio
 };
 
-
 /* each element directly indexed from enum list, above */
 static struct parport_pc_superio {
        int (*probe) (struct pci_dev *pdev);
@@ -2172,195 +2172,180 @@ static struct parport_pc_superio {
 };
 
 
+enum parport_pc_pci_cards {
+       siig_1s1p_10x_550 = last_sio,
+       siig_1s1p_10x_650,
+       siig_1s1p_10x_850,
+       siig_1p_10x,
+       siig_2p_10x,
+       siig_2s1p_10x_550,
+       siig_2s1p_10x_650,
+       siig_2s1p_10x_850,
+       siig_1p_20x,
+       siig_2p_20x,
+       siig_2p1s_20x_550,
+       siig_2p1s_20x_650,
+       siig_2p1s_20x_850,
+       siig_1s1p_20x_550,
+       siig_1s1p_20x_650,
+       siig_1s1p_20x_850,
+       siig_2s1p_20x_550,
+       siig_2s1p_20x_650,
+       siig_2s1p_20x_850,
+       lava_parallel,
+       lava_parallel_dual_a,
+       lava_parallel_dual_b,
+       boca_ioppar,
+       plx_9050,
+       afavlab_tk9902,
+};
+
+
+/* each element directly indexed from enum list, above 
+ * (but offset by last_sio) */
+static struct parport_pc_pci {
+       int numports;
+       struct {
+               int lo;
+               int hi; /* -ve if not there */
+       } addr[4];
+} cards[] __devinitdata = {
+       /* siig_1s1p_10x_550 */         { 1, { { 3, 4 }, } },
+       /* siig_1s1p_10x_650 */         { 1, { { 3, 4 }, } },
+       /* siig_1s1p_10x_850 */         { 1, { { 3, 4 }, } },
+       /* siig_1p_10x */               { 1, { { 2, 3 }, } },
+       /* siig_2p_10x */               { 2, { { 2, 3 }, { 4, 5 }, } },
+       /* siig_2s1p_10x_550 */         { 1, { { 4, 5 }, } },
+       /* siig_2s1p_10x_650 */         { 1, { { 4, 5 }, } },
+       /* siig_2s1p_10x_850 */         { 1, { { 4, 5 }, } },
+       /* siig_1p_20x */               { 1, { { 0, 1 }, } },
+       /* siig_2p_20x */               { 2, { { 0, 1 }, { 2, 3 }, } },
+       /* siig_2p1s_20x_550 */         { 2, { { 1, 2 }, { 3, 4 }, } },
+       /* siig_2p1s_20x_650 */         { 2, { { 1, 2 }, { 3, 4 }, } },
+       /* siig_2p1s_20x_850 */         { 2, { { 1, 2 }, { 3, 4 }, } },
+       /* siig_1s1p_20x_550 */         { 1, { { 1, 2 }, } },
+       /* siig_1s1p_20x_650 */         { 1, { { 1, 2 }, } },
+       /* siig_1s1p_20x_850 */         { 1, { { 1, 2 }, } },
+       /* siig_2s1p_20x_550 */         { 1, { { 2, 3 }, } },
+       /* siig_2s1p_20x_650 */         { 1, { { 2, 3 }, } },
+       /* siig_2s1p_20x_850 */         { 1, { { 2, 3 }, } },
+       /* lava_parallel */             { 1, { { 0, -1 }, } },
+       /* lava_parallel_dual_a */      { 1, { { 0, -1 }, } },
+       /* lava_parallel_dual_b */      { 1, { { 0, -1 }, } },
+       /* boca_ioppar */               { 1, { { 0, -1 }, } },
+       /* plx_9050 */                  { 2, { { 4, -1 }, { 5, -1 }, } },
+       /* afavlab_tk9902 */            { 1, { { 0, 1 }, } },
+};
+
 static struct pci_device_id parport_pc_pci_tbl[] __devinitdata = {
+       /* Super-IO onboard chips */
        { 0x1106, 0x0686, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sio_via_686a },
+
+       /* PCI cards */
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_550,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_1s1p_10x_550 },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_650,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_1s1p_10x_650 },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_850,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_1s1p_10x_850 },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1P_10x,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_1p_10x },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2P_10x,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2p_10x },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_10x_550,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2s1p_10x_550 },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_10x_650,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2s1p_10x_650 },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_10x_850,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2s1p_10x_850 },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1P_20x,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_1p_20x },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2P_20x,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2p_20x },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2P1S_20x_550,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2p1s_20x_550 },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2P1S_20x_650,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2p1s_20x_650 },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2P1S_20x_850,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2p1s_20x_850 },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_20x_550,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2s1p_20x_550 },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_20x_650,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_1s1p_20x_650 },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_20x_850,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_1s1p_20x_850 },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_20x_550,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2s1p_20x_550 },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_20x_650,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2s1p_20x_650 },
+       { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_20x_850,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, siig_2s1p_20x_850 },
+       { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_PARALLEL,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, lava_parallel },
+       { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_DUAL_PAR_A,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, lava_parallel_dual_a },
+       { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_DUAL_PAR_B,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, lava_parallel_dual_b },
+       { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_BOCA_IOPPAR,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, boca_ioppar },
+       { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
+         PCI_SUBVENDOR_ID_EXSYS, PCI_SUBDEVICE_ID_EXSYS_4014, 0,0, plx_9050 },
+       { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_TK9902,
+         PCI_ANY_ID, PCI_ANY_ID, 0, 0, afavlab_tk9902 },
        { 0, }, /* terminate list */
 };
+MODULE_DEVICE_TABLE(pci,parport_pc_pci_tbl);
+
+static int __devinit parport_pc_pci_probe (struct pci_dev *dev,
+                                          const struct pci_device_id *id)
+{
+       int count, n, i = id->driver_data;
+       if (i < last_sio)
+               /* This is an onboard Super-IO and has already been probed */
+               return 0;
 
+       /* This is a PCI card */
+       i -= last_sio;
+       count = 0;
+       for (n = 0; n < cards[i].numports; n++) {
+               int lo = cards[i].addr[n].lo;
+               int hi = cards[i].addr[n].hi;
+               unsigned long io_lo, io_hi;
+               io_lo = pci_resource_start (dev, lo);
+               io_hi = 0;
+               if (hi >= 0)
+                       io_hi = pci_resource_start (dev, hi);
+               /* TODO: test if sharing interrupts works */
+               if (parport_pc_probe_port (io_lo, io_hi, PARPORT_IRQ_NONE,
+                                          PARPORT_DMA_NONE, dev))
+                       count++;
+       }
 
-static int __devinit parport_pc_init_superio(void)
+       return count;
+}
+
+static struct pci_driver parport_pc_pci_driver = {
+       name:           "parport_pc",
+       id_table:       parport_pc_pci_tbl,
+       probe:          parport_pc_pci_probe,
+};
+
+static int __devinit parport_pc_init_superio (void)
 {
 #ifdef CONFIG_PCI
        const struct pci_device_id *id;
        struct pci_dev *pdev;
-       
+
        pci_for_each_dev(pdev) {
                id = pci_match_device (parport_pc_pci_tbl, pdev);
-               if (id == NULL)
+               if (id == NULL || id->driver_data >= last_sio)
                        continue;
-               
+
                return parport_pc_superio_info[id->driver_data].probe (pdev);
        }
 #endif /* CONFIG_PCI */
-       
-       return 0; /* zero devices found */
-}
-
-/* Look for PCI parallel port cards. */
-static int __init parport_pc_init_pci (int irq, int dma)
-{
-#ifndef PCI_VENDOR_ID_AFAVLAB
-#define PCI_VENDOR_ID_AFAVLAB          0x14db
-#define PCI_DEVICE_ID_AFAVLAB_TK9902   0x2120
-#endif
-
-       struct {
-               unsigned int vendor;
-               unsigned int device;
-               unsigned int subvendor;
-               unsigned int subdevice;
-               unsigned int numports;
-               struct {
-                       unsigned long lo;
-                       unsigned long hi; /* -ve if not there */
-               } addr[4];
-       } cards[] = {
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_550,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 3, 4 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_650,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 3, 4 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_10x_850,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 3, 4 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1P_10x,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 2, 3 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2P_10x,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 2, { { 2, 3 }, { 4, 5 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_10x_550,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 4, 5 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_10x_650,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 4, 5 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_10x_850,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 4, 5 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1P_20x,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 0, 1 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2P_20x,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 2, { { 0, 1 }, { 2, 3 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2P1S_20x_550,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 2, { { 1, 2 }, { 3, 4 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2P1S_20x_650,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 2, { { 1, 2 }, { 3, 4 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2P1S_20x_850,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 2, { { 1, 2 }, { 3, 4 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_20x_550,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 1, 2 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_20x_650,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 1, 2 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_1S1P_20x_850,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 1, 2 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_20x_550,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 2, 3 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_20x_650,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 2, 3 }, } },
-               { PCI_VENDOR_ID_SIIG, PCI_DEVICE_ID_SIIG_2S1P_20x_850,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 2, 3 }, } },
-               { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_PARALLEL,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 0, -1 }, } },
-               { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_DUAL_PAR_A,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 0, -1 }, } },
-               { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_DUAL_PAR_B,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 0, -1 }, } },
-               { PCI_VENDOR_ID_LAVA, PCI_DEVICE_ID_LAVA_BOCA_IOPPAR,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 0, -1 }, } },
-               { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_9050,
-                 PCI_SUBVENDOR_ID_EXSYS, PCI_SUBDEVICE_ID_EXSYS_4014,
-                 2, { { 4, -1 }, { 5, -1 }, } },
-               { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_TK9902,
-                 PCI_ANY_ID, PCI_ANY_ID,
-                 1, { { 0, 1 }, } },
-               { 0, }
-       };
-
-       struct pci_dev *pcidev;
-       int count = 0;
-       int i;
-
-       if (!pci_present ())
-               return 0;
-
-       for (i = 0; cards[i].vendor; i++) {
-               pcidev = NULL;
-               while ((pcidev = pci_find_device (cards[i].vendor,
-                                                 cards[i].device,
-                                                 pcidev)) != NULL) {
-                       int n;
-
-                       if (cards[i].subvendor != PCI_ANY_ID &&
-                           cards[i].subvendor != pcidev->subsystem_vendor)
-                               continue;
-
-                       if (cards[i].subdevice != PCI_ANY_ID &&
-                           cards[i].subdevice != pcidev->subsystem_device)
-                               continue;
-
-                       for (n = 0; n < cards[i].numports; n++) {
-                               unsigned long lo = cards[i].addr[n].lo;
-                               unsigned long hi = cards[i].addr[n].hi;
-                               unsigned long io_lo, io_hi;
-                               io_lo = pcidev->resource[lo].start;
-                               io_hi = ((hi < 0) ? 0 :
-                                        pcidev->resource[hi].start);
-                               if (irq == PARPORT_IRQ_AUTO) {
-                                       if (parport_pc_probe_port (io_lo,
-                                                                  io_hi,
-                                                                  pcidev->irq,
-                                                                  dma,
-                                                                  pcidev))
-                                               count++;
-                               } else if (parport_pc_probe_port (io_lo, io_hi,
-                                                                 irq, dma,
-                                                                 pcidev))
-                                       count++;
-                       }
-               }
-       }
 
-#ifdef CONFIG_PCI
-       /* Look for parallel controllers that we don't know about. */
-       pci_for_each_dev(pcidev) {
-               const int class_noprogif = pcidev->class & ~0xff;
-               if (class_noprogif != (PCI_CLASS_COMMUNICATION_PARALLEL << 8))
-                       continue;
-
-               for (i = 0; cards[i].vendor; i++)
-                       if ((cards[i].vendor == pcidev->vendor) &&
-                           (cards[i].device == pcidev->device))
-                               break;
-               if (cards[i].vendor)
-                       /* We know about this one. */
-                       continue;
-
-               printk (KERN_INFO
-                       "Unknown PCI parallel I/O card (%04x/%04x)\n"
-                       "Please send 'lspci' output to "
-                       "tim@cyberelk.demon.co.uk\n",
-                       pcidev->vendor, pcidev->device);
-       }
-#endif
-
-       return count;
+       return 0; /* zero devices found */
 }
 
 /* Exported symbols. */
@@ -2401,7 +2386,7 @@ int init_module(void)
 {      
        /* Work out how many ports we have, then get parport_share to parse
           the irq values. */
-       unsigned int i;
+       unsigned int i, n;
        if (superio) {
                detect_and_report_winbond ();
                detect_and_report_smsc ();
@@ -2430,12 +2415,18 @@ int init_module(void)
                        }
        }
 
-       return (parport_pc_init(io, io_hi, irqval, dmaval)?0:1);
+       n = parport_pc_init_superio ();
+       n += parport_pc_init (io, io_hi, irqval, dmaval);
+       i = pci_register_driver (&parport_pc_pci_driver);
+
+       if (i > 0) n += i;
+       return !n;
 }
 
 void cleanup_module(void)
 {
        struct parport *p = parport_enumerate(), *tmp;
+       pci_unregister_driver (&parport_pc_pci_driver);
        while (p) {
                tmp = p->next;
                if (p->modes & PARPORT_MODE_PCSPP) { 
index 6ea612b84eee1c3b7f46bee00e7a54f349bfc80d..af89ed1d3fcfc070413ae41930ccbdecc925fb4e 100644 (file)
@@ -1336,7 +1336,6 @@ static int proc_read_exca(char *buf, char **start, off_t pos,
 
 static void pcic_proc_setup(unsigned int sock, struct proc_dir_entry *base)
 {
-#ifdef CONFIG_PROC_FS
     socket_info_t *s = &socket[sock];
 
     if (s->flags & IS_ALIVE)
@@ -1345,7 +1344,6 @@ static void pcic_proc_setup(unsigned int sock, struct proc_dir_entry *base)
     create_proc_read_entry("info", 0, base, proc_read_info, s);
     create_proc_read_entry("exca", 0, base, proc_read_exca, s);
     s->proc = base;
-#endif
 }
 
 static void pcic_proc_remove(u_short sock)
@@ -1356,6 +1354,10 @@ static void pcic_proc_remove(u_short sock)
     remove_proc_entry("exca", base);
 }
 
+#else
+
+#define pcic_proc_setup NULL
+
 #endif /* CONFIG_PROC_FS */
 
 /*====================================================================*/
index abb46572a50795f2e47b508327e1e6275e12b008..e517fbf273ca5d8b3eb1badc210f52c5c95f27e7 100644 (file)
@@ -555,6 +555,30 @@ static void yenta_clear_maps(pci_socket_t *socket)
        }
 }
 
+/*
+ * Many chipsets (all TI chips?) seem to have
+ * problems sensing the power state of the card
+ * that was inserted at chip init time, so force
+ * it if necessary..
+ */
+static void yenta_power_sense(pci_socket_t *socket)
+{
+       u32 status = config_readl(socket, CB_SOCKET_STATE);
+
+       /*
+        * Nothing inserted, nothing to sense..
+        * ..or sense status already available.
+        */
+       if (status & (CB_CDETECT1 | CB_CDETECT2 | CB_5VCARD | CB_3VCARD | CB_XVCARD | CB_YVCARD))
+               return;
+
+       /*
+        * Ho humm. It reports a card, but it doesn't report
+        * any voltages. Need to redo the VS test..
+        */
+       cb_writel(socket, CB_SOCKET_FORCE, CB_CVSTEST);
+}
+
 /* Called at resume and initialization events */
 static int yenta_init(pci_socket_t *socket)
 {
@@ -595,6 +619,8 @@ static int yenta_init(pci_socket_t *socket)
        exca_writeb(socket, I365_GBLCTL, 0x00);
        exca_writeb(socket, I365_GENCTL, 0x00);
 
+       yenta_power_sense(socket);
+
        yenta_clear_maps(socket);
        return 0;
 }
index 6ca7147d54c299a3af7a49e46e40d4c4239eb32b..40ccb2fa8b03c2c5bbbf6318c398dc7cfc25c318 100644 (file)
@@ -956,7 +956,7 @@ typedef struct {
   unsigned char  numscbs;          /* current number of scbs */
   unsigned char  maxhscbs;         /* hardware scbs */
   unsigned char  maxscbs;          /* max scbs including pageable scbs */
-  unsigned int   hscbs_dma;       /* DMA handle to hscbs */
+  dma_addr_t    hscbs_dma;        /* DMA handle to hscbs */
   unsigned int   hscbs_dma_len;    /* length of the above DMA area */
   void          *hscb_kmalloc_ptr;
 } scb_data_type;
index c0eb4baa061d6d4cb7cb585f266ada3e6e68d37c..ccb366593f46fdfcc6fc8abdd3484d07d6fef835 100644 (file)
@@ -147,7 +147,7 @@ int scsi_free(void *obj, unsigned int len)
                        nbits = len >> 9;
                        mask = (1 << nbits) - 1;
 
-                       if ((mask << sector) >= (1 << SECTORS_PER_PAGE))
+                       if (sector + nbits > SECTORS_PER_PAGE)
                                panic("scsi_free:Bad memory alignment");
 
                        if ((dma_malloc_freelist[page] &
index b7ad6f75c8744b1cb65c19a385443f6747f985fa..bce04ef33a843c67904ddda15ddb6c051404882e 100644 (file)
@@ -2502,11 +2502,6 @@ void attach_ms_sound(struct address_info *hw_config)
        int dma = hw_config->dma;
        int dma2 = hw_config->dma2;
 
-       if(hw_config->io_base != -1 || hw_config->irq == -1 || hw_config->dma == -1) {
-               printk(KERN_WARNING "ad1848: must give I/O , IRQ and DMA.\n");
-               return;
-       }
-
        if (hw_config->card_subtype == 1)       /* Has no IRQ/DMA registers */
        {
                hw_config->slots[0] = ad1848_init("MS Sound System", hw_config->io_base + 4,
@@ -2573,9 +2568,6 @@ void attach_ms_sound(struct address_info *hw_config)
                                          dma2, 0,
                                          hw_config->osp);
        request_region(hw_config->io_base, 4, "WSS config");
-
-       SOUND_LOCK;
-       loaded = 1;
 }
 
 void unload_ms_sound(struct address_info *hw_config)
@@ -2710,15 +2702,6 @@ EXPORT_SYMBOL(probe_ms_sound);
 EXPORT_SYMBOL(attach_ms_sound);
 EXPORT_SYMBOL(unload_ms_sound);
 
-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 */
-
 static int __initdata io = -1;
 static int __initdata irq = -1;
 static int __initdata dma = -1;
@@ -2727,21 +2710,41 @@ static int __initdata type = 0;
 
 static struct address_info cfg;
 
+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 */
+
 static int __init init_ad1848(void)
 {
        printk(KERN_INFO "ad1848/cs4248 codec driver Copyright (C) by Hannu Savolainen 1993-1996\n");
 
-       cfg.irq = irq;
-       cfg.io_base = io;
-       cfg.dma = dma;
-       cfg.dma2 = dma2;
-       cfg.card_subtype = type;
+       if(io != -1) {
+               if(irq == -1 || dma == -1) {
+                       printk(KERN_WARNING "ad1848: must give I/O , IRQ and DMA.\n");
+                       return -EINVAL;
+               }
 
-       if(probe_ms_sound(&cfg)) {
+               cfg.irq = irq;
+               cfg.io_base = io;
+               cfg.dma = dma;
+               cfg.dma2 = dma2;
+               cfg.card_subtype = type;
+
+               if(!probe_ms_sound(&cfg))
+                       return -ENODEV;
                attach_ms_sound(&cfg);
-               return 0;
-       } else
-               return -ENODEV;
+               loaded = 1;
+       }
+       
+       SOUND_LOCK;
+       return 0;
 }
 
 static void __exit cleanup_ad1848(void)
index 5be9a1eefd7e232a5a690d68cdb3e3d81a20ed5b..52d4d79f84c768004233e931507d611ee41514e0 100644 (file)
@@ -11,7 +11,6 @@
  * for more info.
  */
 
-#include <linux/config.h>
 #include <linux/init.h>
 
 #define _DEV_TABLE_C_
index b15fd505c2f2c63518f57b153bfb1b25815299ca..db2b141d694b1ca9fcf12b48b1e37d04f80f0f19 100644 (file)
@@ -15,8 +15,6 @@
 #ifndef _DEV_TABLE_H_
 #define _DEV_TABLE_H_
 
-#include <linux/config.h>
-
 /*
  * Sound card numbers 27 to 999. (1 to 26 are defined in soundcard.h)
  * Numbers 1000 to N are reserved for driver's internal use.
index 06b98aec25b5080ef53a13debb40954893f26bf5..bf605dbcabde01a44cc9c21b81b16c6566fcea80 100644 (file)
@@ -1107,7 +1107,7 @@ static void __exit cleanup_mad16(void)
 }
 
 module_init(init_mad16);
-module_exit(exit_mad16);
+module_exit(cleanup_mad16);
 
 #ifndef MODULE
 static int __init setup_mad16(char *str)
diff --git a/drivers/sound/miroaci.h b/drivers/sound/miroaci.h
new file mode 100644 (file)
index 0000000..9fea58a
--- /dev/null
@@ -0,0 +1,6 @@
+#include <linux/config.h>
+extern int aci_implied_cmd(unsigned char opcode);
+extern int aci_write_cmd(unsigned char opcode, unsigned char parameter);
+extern int aci_write_cmd_d(unsigned char opcode, unsigned char parameter, unsigned char parameter2);
+extern int aci_read_cmd(unsigned char opcode, int length, unsigned char *parameter);
+extern int aci_indexed_cmd(unsigned char opcode, unsigned char index, unsigned char *parameter);
index 5efd99dd225a6745047fbe5ab66429c17ef4491f..89470da823a6d788f63a8c704d23dfa49df1db72 100644 (file)
@@ -16,7 +16,6 @@
  * Christoph Hellwig   : adapted to module_init/module_exit
  */
 
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/module.h>
 
index af1f8970d09839df849a8a8eec45a74ef10bce04..4bf595f86afd73975eaf62b8f2f0861f333fd698 100644 (file)
@@ -73,7 +73,6 @@
 
 #include <linux/interrupt.h>
 #include <linux/config.h>
-#include <linux/init.h>
 
 #include <linux/delay.h>
 
index 4b0708ec7f31e6da9790ab5aa45d0ff2e5146ce0..2d7d50fe93954400f9ad3cce3a924c1e51dab552 100644 (file)
@@ -49,7 +49,6 @@
  * for more info.
  */
 
-#include <linux/config.h>
 #include <linux/init.h>
 #include "sound_config.h"
 #include "soundmodule.h"
index 9f0943d3d7e373f416b76996ab3817fcebc01a4e..5f1b61d076d454fb0d61900309dc308045bc92cf 100644 (file)
@@ -12,9 +12,11 @@ comment 'USB Controllers'
    if [ "$CONFIG_USB_UHCI" != "n" -a "$CONFIG_EXPERIMENTAL" = "y" ]; then
       bool '    USB-UHCI High Bandwidth (EXPERIMENTAL)' CONFIG_USB_UHCI_HIGH_BANDWIDTH
    fi
-   dep_tristate '  UHCI Alternate Driver (JE) support' CONFIG_USB_UHCI_ALT $CONFIG_USB
-   if [ "$CONFIG_USB_UHCI_ALT" != "n" -a "$CONFIG_EXPERIMENTAL" = "y" ]; then
-      bool '    UHCI unlink optimizations (EXPERIMENTAL)' CONFIG_USB_UHCI_ALT_UNLINK_OPTIMIZE
+   if [ "$CONFIG_USB_UHCI" != "y" ]; then
+      dep_tristate '  UHCI Alternate Driver (JE) support' CONFIG_USB_UHCI_ALT $CONFIG_USB
+      if [ "$CONFIG_USB_UHCI_ALT" != "n" -a "$CONFIG_EXPERIMENTAL" = "y" ]; then
+         bool '    UHCI unlink optimizations (EXPERIMENTAL)' CONFIG_USB_UHCI_ALT_UNLINK_OPTIMIZE
+      fi
    fi
    dep_tristate '  OHCI (Compaq, iMacs, OPTi, SiS, ALi, ...) support' CONFIG_USB_OHCI $CONFIG_USB
 
index 6f8ebb3f6169f9fe0f90361fbe21f683d0be6da2..7c5b02f211f8e5937af95e15fea445dc7954e478 100644 (file)
@@ -4,7 +4,7 @@
 
 # Subdirs.
 
-SUB_DIRS       :=
+SUB_DIRS       := serial
 MOD_SUB_DIRS   := $(SUB_DIRS)
 ALL_SUB_DIRS   := $(SUB_DIRS)
 
@@ -57,7 +57,6 @@ obj-$(CONFIG_INPUT_EVDEV)     += evdev.o input.o
 obj-$(CONFIG_USB_SCANNER)      += scanner.o
 obj-$(CONFIG_USB_ACM)          += acm.o
 obj-$(CONFIG_USB_PRINTER)      += printer.o
-obj-$(CONFIG_USB_SERIAL)       += usb-serial.o
 obj-$(CONFIG_USB_AUDIO)                += audio.o
 obj-$(CONFIG_USB_CPIA)         += cpia.o
 obj-$(CONFIG_USB_IBMCAM)       += ibmcam.o
index b67d70ac85ebecf88ba146354267589b9b6a5ada..9a326ff5b5cce4adf944ed516cd793c4a4e81037 100644 (file)
@@ -801,6 +801,10 @@ int __init dabusb_init (void)
 {
        unsigned u;
 
+       /* register misc device */
+       if (usb_register(&dabusb_driver))
+               return -1;
+
        /* initialize struct */
        for (u = 0; u < NRDABUSB; u++) {
                pdabusb_t s = &dabusb[u];
@@ -815,11 +819,7 @@ int __init dabusb_init (void)
                INIT_LIST_HEAD (&s->rec_buff_list);
        }
 
-       /* register misc device */
-       usb_register (&dabusb_driver);
-
        dbg("dabusb_init: driver registered");
-
        return 0;
 }
 
index 36db7aaffcbd0b0be9a2fd9110fda97ec449e604..ddb3685a4ac1b80c6d93e89e492febd6a85ac056 100644 (file)
@@ -6,7 +6,7 @@ typedef struct
        unsigned int pipe;
 }bulk_transfer_t,*pbulk_transfer_t;
 
-#define DABUSB_MINOR 64
+#define DABUSB_MINOR 240               /* some unassigned USB minor */
 #define DABUSB_VERSION 0x1000
 #define IOCTL_DAB_BULK              _IOWR('d', 0x30, bulk_transfer_t)
 #define IOCTL_DAB_OVERRUNS         _IOR('d',  0x15, int)
diff --git a/drivers/usb/ftdi_sio.h b/drivers/usb/ftdi_sio.h
deleted file mode 100644 (file)
index 36fa7bb..0000000
+++ /dev/null
@@ -1,380 +0,0 @@
-/* Bill Ryder - bryder@sgi.com - wrote the FTDI_SIO implementation */
-/* The device is based on the FTDI FT8U100AX chip, DB25 on one side, USB on the other */
-/* Thanx to FTDI for so kindly providing details of the protocol required */
-/* http://www.ftdi.co.uk  */
-
-/* The implementation of the device I have is called a USC-1000 */
-/*  which is available from http://www.dse.co.nz - cat no XH4214 */
-/* It looks similar to this: http://www.dansdata.com/usbser.htm but I can't be sure */
-/* There are other USC-1000s which don't look like my device though so beware */
-
-/* Definitions for the FTDI USB Single Port Serial Converter */
-/* known as FTDI_SIO (Serial Input/Output application of the chipset) */
-
-#define FTDI_VID       0x0403  /* Vendor Id */
-#define FTDI_SIO_PID   0x8372  /* Product Id */
-
-/* Vendor Request Interface */
-#define FTDI_SIO_RESET                 0 /* Reset the port */
-#define FTDI_SIO_MODEM_CTRL    1 /* Set the modem control register */
-#define FTDI_SIO_SET_FLOW_CTRL 2 /* Set flow control register */
-#define FTDI_SIO_SET_BAUD_RATE 3 /* Set baud rate */
-#define FTDI_SIO_SET_DATA      4 /* Set the data characteristics of the port */
-#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 */
-
-/* Port Identifier Table */
-#define PIT_DEFAULT            0 /* SIOA */
-#define PIT_SIOA               1 /* SIOA */
-/* The device this is tested with one has one port */
-#define PIT_SIOB               2 /* SIOB */
-#define PIT_PARALLEL           3 /* Parallel */
-
-/* FTDI_SIO_RESET */
-#define FTDI_SIO_RESET_REQUEST FTDI_SIO_RESET
-#define FTDI_SIO_RESET_REQUEST_TYPE 0x40
-#define FTDI_SIO_RESET_SIO 0
-#define FTDI_SIO_RESET_PURGE_RX 1
-#define FTDI_SIO_RESET_PURGE_TX 2
-/* 
-   BmRequestType:  0100 0000B
-   bRequest:       FTDI_SIO_RESET
-   wValue:         Control Value 
-                         0 = Reset SIO
-                         1 = Purge RX buffer
-                         2 = Purge TX buffer
-   wIndex:         Port
-   wLength:        0
-   Data:           None
-
-   */
-
-/* FTDI_SIO_SET_BAUDRATE */
-#define FTDI_SIO_SET_BAUDRATE_REQUEST_TYPE 0x40
-#define FTDI_SIO_SET_BAUDRATE_REQUEST 3
-
-/*
-  BmRequestType:  0100 0000B
-  bRequest:       FTDI_SIO_SET_BAUDRATE
-  wValue:         BaudRate value - see below
-  wIndex:         Port
-  wLength:        0
-  Data:           None
-*/
-
-typedef enum {
- ftdi_sio_b300 = 0, 
- ftdi_sio_b600 = 1, 
- ftdi_sio_b1200 = 2,
- ftdi_sio_b2400 = 3,
- ftdi_sio_b4800 = 4,
- ftdi_sio_b9600 = 5,
- ftdi_sio_b19200 = 6,
- ftdi_sio_b38400 = 7,
- ftdi_sio_b57600 = 8,
- ftdi_sio_b115200 = 9
-} FTDI_SIO_baudrate_t ;
-
-#define FTDI_SIO_SET_DATA_REQUEST FTDI_SIO_SET_DATA
-#define FTDI_SIO_SET_DATA_REQUEST_TYPE 0x40
-#define FTDI_SIO_SET_DATA_PARITY_NONE (0x0 << 8 )
-#define FTDI_SIO_SET_DATA_PARITY_ODD (0x1 << 8 )
-#define FTDI_SIO_SET_DATA_PARITY_EVEN (0x2 << 8 )
-#define FTDI_SIO_SET_DATA_PARITY_MARK (0x3 << 8 )
-#define FTDI_SIO_SET_DATA_PARITY_SPACE (0x4 << 8 )
-#define FTDI_SIO_SET_DATA_STOP_BITS_1 (0x0 << 11 )
-#define FTDI_SIO_SET_DATA_STOP_BITS_15 (0x1 << 11 )
-#define FTDI_SIO_SET_DATA_STOP_BITS_2 (0x2 << 11 )
-
-/* FTDI_SIO_SET_DATA */
-
-/*    BmRequestType:  0100 0000B */
-/*    bRequest:       FTDI_SIO_SET_DATA */
-/*    wValue:         Data characteristics (see below) */
-/*    wIndex:         Port */
-/*    wLength:        0 */
-/*    Data:           None */
-/* 
-  Data characteristics
-
-B0..7   Number of data bits
-B8..10  Parity
-           0 = None
-           1 = Odd
-           2 = Even
-           3 = Mark
-           4 = Space
- B11..13 Stop Bits
-           0 = 1
-           1 = 1.5
-           2 = 2
- B14..15 Reserved
-*/
-
-
-
-/* FTDI_SIO_MODEM_CTRL */
-#define FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE 0x40
-#define FTDI_SIO_SET_MODEM_CTRL_REQUEST FTDI_SIO_MODEM_CTRL
-
-/* 
-  BmRequestType:   0100 0000B
-  bRequest:        FTDI_SIO_MODEM_CTRL
-  wValue:          ControlValue (see below)
-  wIndex:          Port
-  wLength:         0
-  Data:            None
-
-  NOTE: If the device is in RTS/CTS flow control, the RTS set by this
-        command will be IGNORED without an error being returned
-*/
-
-#define FTDI_SIO_SET_DTR_MASK 0x1
-#define FTDI_SIO_SET_DTR_HIGH ( 1 | ( FTDI_SIO_SET_DTR_MASK  << 8))
-#define FTDI_SIO_SET_DTR_LOW  ( 0 | ( FTDI_SIO_SET_DTR_MASK  << 8))
-#define FTDI_SIO_SET_RTS_MASK 0x2
-#define FTDI_SIO_SET_RTS_HIGH ( 2 | ( FTDI_SIO_SET_RTS_MASK << 8 ))
-#define FTDI_SIO_SET_RTS_LOW ( 0 | ( FTDI_SIO_SET_RTS_MASK << 8 ))
-
-/* ControlValue
-   B0    DTR state
-           0 = reset
-           1 = set
-   B1    RTS state
-           0 = reset
-           1 = set
-   B2..7 Reserved
-   B8    DTR state enable
-           0 = ignore
-           1 = use DTR state
-   B9    RTS state enable
-           0 = ignore
-           1 = use RTS state
-   B10..15 Reserved
-*/
-
-/* FTDI_SIO_SET_FLOW_CTRL */
-#define FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE 0x40
-#define FTDI_SIO_SET_FLOW_CTRL_REQUEST FTDI_SIO_SET_FLOW_CTRL
-#define FTDI_SIO_DISABLE_FLOW_CTRL 0x0 
-#define FTDI_SIO_RTS_CTS_HS 0x1
-#define FTDI_SIO_DTR_DSR_HS 0x2
-#define FTDI_SIO_XON_XOFF_HS 0x4
-/* 
-   BmRequestType:  0100 0000b
-   bRequest:       FTDI_SIO_SET_FLOW_CTRL
-   wValue:         Xoff/Xon
-   wIndex:         Protocol/Port - hIndex is protocl / lIndex is port
-   wLength:        0 
-   Data:           None
-
-hIndex - protocol has
- B0 Output handshaking using RTS/CTS
-      0 = disabled
-      1 = enabled
- B1 Output handshaking using DTR/DSR
-      0 = disabled
-      1 = enabled
- B2 Xon/Xoff handshaking
-      0 = disabled
-      1 = enabled
-
-A value of zero in the hIndex field selects no handshaking
-
-If Xon/Xoff handshaking is specified, the hValue field contains the Xoff character 
-and the lValue field contains the Xon character.
-
-*/  
-/* FTDI_SIO_SET_EVENT_CHAR */
-/* Set the special event character for the specified communications port */
-/* If the device sees this character it will immediately return the */
-/* data read so far - rather than wait 40ms or until 62 bytes is read */
-#define  FTDI_SIO_SET_EVENT_CHAR_REQUEST FTDI_SIO_SET_EVENT_CHAR
-#define  FTDI_SIO_SET_EVENT_CHAR_REQUEST_TYPE 0x40
-
-
-/* 
-  BmRequestType:   0100 0000b
-  bRequest:        FTDI_SIO_SET_EVENT_CHAR
-  wValue:          EventChar
-  wIndex:          Port
-  wLength:         0
-  Data:            None
-
-wValue:
-   B0..7   Event Character
-   B8      Event Character Processing
-             0 = disabled
-             1 = enabled
-   B9..15  Reserved
-
-*/
-          
-/* FTDI_SIO_SET_ERROR_CHAR */
-/* Set the parity error replacement character for the specified communications port */
-
-/* 
-  BmRequestType:  0100 0000b
-  bRequest:       FTDI_SIO_SET_EVENT_CHAR
-  wValue:         Error Char
-  wIndex:         Port
-  wLength:        0
-  Data:           None
-
-Error Char
-  B0..7  Error Character
-  B8     Error Character Processing
-           0 = disabled
-           1 = enabled
-  B9..15 Reserved
-
-*/
-
-/* FTDI_SIO_GET_MODEM_STATUS */
-/* Retreive the current value of the modem status register */
-
-#define FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE 0xc0
-#define FTDI_SIO_GET_MODEM_STATUS_REQUEST FTDI_SIO_GET_MODEM_STATUS
-#define FTDI_SIO_CTS_MASK 0x10
-#define FTDI_SIO_DSR_MASK 0x20
-#define FTDI_SIO_RI_MASK  0x40
-#define FTDI_SIO_RLSD_MASK 0x80
-/* 
-  BmRequestType:   1100 0000b
-  bRequest:        FTDI_SIO_GET_MODEM_STATUS
-  wValue:          zero
-  wIndex:          Port
-  wLength:         1
-  Data:            Status
-
-One byte of data is returned 
-B0..3 0
-B4    CTS
-        0 = inactive
-        1 = active
-B5    DSR
-        0 = inactive
-        1 = active
-B6    Ring Indicator (RI)
-        0 = inactive
-        1 = active
-B7    Receive Line Signal Detect (RLSD)
-        0 = inactive
-        1 = active 
-*/
-
-
-
-/* Descriptors returned by the device 
-
- Device Descriptor
-
-Offset Field           Size    Value   Description
-0      bLength         1       0x12    Size of descriptor in bytes
-1      bDescriptorType 1       0x01    DEVICE Descriptor Type
-2      bcdUSB          2       0x0110  USB Spec Release Number
-4      bDeviceClass    1       0x00    Class Code
-5      bDeviceSubClass 1       0x00    SubClass Code
-6      bDeviceProtocol 1       0x00    Protocol Code
-7      bMaxPacketSize0 1       0x08    Maximum packet size for endpoint 0
-8      idVendor        2       0x0403  Vendor ID
-10     idProduct       2       0x8372  Product ID (FTDI_SIO_PID)
-12     bcdDevice       2       0x0001  Device release number
-14     iManufacturer   1       0x01    Index of man. string desc
-15     iProduct        1       0x02    Index of prod string desc
-16     iSerialNumber   1       0x02    Index of serial nmr string desc
-17     bNumConfigurations 1    0x01    Number of possible configurations
-
-Configuration Descriptor
-
-Offset Field                   Size    Value
-0      bLength                 1       0x09    Size of descriptor in bytes
-1      bDescriptorType         1       0x02    CONFIGURATION Descriptor Type
-2      wTotalLength            2       0x0020  Total length of data
-4      bNumInterfaces          1       0x01    Number of interfaces supported
-5      bConfigurationValue     1       0x01    Argument for SetCOnfiguration() req
-6      iConfiguration          1       0x02    Index of config string descriptor
-7      bmAttributes            1       0x20    Config characteristics Remote Wakeup
-8      MaxPower                1       0x1E    Max power consumption
-
-Interface Descriptor
-
-Offset Field                   Size    Value
-0      bLength                 1       0x09    Size of descriptor in bytes
-1      bDescriptorType         1       0x04    INTERFACE Descriptor Type
-2      bInterfaceNumber        1       0x00    Number of interface
-3      bAlternateSetting       1       0x00    Value used to select alternate
-4      bNumEndpoints           1       0x02    Number of endpoints
-5      bInterfaceClass         1       0xFF    Class Code
-6      bInterfaceSubClass      1       0xFF    Subclass Code
-7      bInterfaceProtocol      1       0xFF    Protocol Code
-8      iInterface              1       0x02    Index of interface string description
-
-IN Endpoint Descriptor
-
-Offset Field                   Size    Value
-0      bLength                 1       0x07    Size of descriptor in bytes
-1      bDescriptorType         1       0x05    ENDPOINT descriptor type
-2      bEndpointAddress        1       0x82    Address of endpoint
-3      bmAttributes            1       0x02    Endpoint attributes - Bulk
-4      bNumEndpoints           2       0x0040  maximum packet size
-5      bInterval               1       0x00    Interval for polling endpoint
-
-OUT Endpoint Descriptor
-
-Offset Field                   Size    Value
-0      bLength                 1       0x07    Size of descriptor in bytes
-1      bDescriptorType         1       0x05    ENDPOINT descriptor type
-2      bEndpointAddress        1       0x02    Address of endpoint
-3      bmAttributes            1       0x02    Endpoint attributes - Bulk
-4      bNumEndpoints           2       0x0040  maximum packet size
-5      bInterval               1       0x00    Interval for polling endpoint
-    
-DATA FORMAT
-
-IN Endpoint
-
-The device reserves the first two bytes of data on this endpoint to contain the current
-values of the modem and line status registers. In the absence of data, the device 
-generates a message consisting of these two status bytes every 40 ms
-
-Byte 0: Modem Status
-
-Offset Description
-B0     Reserved - must be 1
-B1     Reserved - must be 0
-B2     Reserved - must be 0
-B3     Reserved - must be 0
-B4     Clear to Send (CTS)
-B5     Data Set Ready (DSR)
-B6     Ring Indicator (RI)
-B7     Receive Line Signal Detect (RLSD)
-
-Byte 1: Line Status
-
-Offset Description
-B0     Data Ready (DR)
-B1     Overrun Error (OE)
-B2     Parity Error (PE)
-B3     Framing Error (FE)
-B4     Break Interrupt (BI)
-B5     Transmitter Holding Register (THRE)
-B6     Transmitter Empty (TEMT)
-B7     Error in RCVR FIFO
-
-OUT Endpoint
-
-This device reserves the first bytes of data on this endpoint contain the length
-and port identifier of the message. For the FTDI USB Serial converter the port 
-identifier is always 1.
-
-Byte 0: Line Status
-
-Offset Description
-B0     Reserved - must be 1
-B1     Reserved - must be 0
-B2..7  Length of message - (not including Byte 0)
-
-*/
index 2c8c041d5cc2651805142d779aa8250d4a94244c..f546c4adb96b52e04119ccfbd39ad40b92405ad1 100644 (file)
@@ -446,7 +446,6 @@ static void usbdevfs_put_super(struct super_block *sb)
        INIT_LIST_HEAD(&sb->u.usbdevfs_sb.slist);
        while (!list_empty(&sb->u.usbdevfs_sb.ilist))
                free_inode(list_entry(sb->u.usbdevfs_sb.ilist.next, struct inode, u.usbdev_i.slist));
-        MOD_DEC_USE_COUNT;
 }
 
 static int usbdevfs_statfs(struct super_block *sb, struct statfs *buf)
@@ -548,8 +547,6 @@ struct super_block *usbdevfs_read_super(struct super_block *s, void *data, int s
                }
        }
        /* fill superblock */
-        MOD_INC_USE_COUNT;
-        lock_super(s);
         s->s_blocksize = 1024;
         s->s_blocksize_bits = 10;
         s->s_magic = USBDEVICE_SUPER_MAGIC;
@@ -569,7 +566,6 @@ struct super_block *usbdevfs_read_super(struct super_block *s, void *data, int s
         if (!s->s_root)
                 goto out_no_root;
        list_add_tail(&s->u.usbdevfs_sb.slist, &superlist);
-       unlock_super(s);
        for (i = 0; i < NRSPECIAL; i++) {
                if (!(inode = iget(s, IROOT+1+i)))
                        continue;
@@ -591,23 +587,14 @@ struct super_block *usbdevfs_read_super(struct super_block *s, void *data, int s
  out_no_root:
         printk("usbdevfs_read_super: get root inode failed\n");
         iput(root_inode);
-        s->s_dev = 0;
-        unlock_super(s);
-       MOD_DEC_USE_COUNT;
         return NULL;
 
  opterr:
         printk(KERN_WARNING "usbdevfs: mount parameter error\n");
-       s->s_dev = 0;
        return NULL;
 }
 
-static struct file_system_type usbdevice_fs_type = {
-        "usbdevfs",
-        0,
-        usbdevfs_read_super,
-        NULL
-};
+static DECLARE_FSTYPE(usbdevice_fs_type, "usbdevfs", usbdevfs_read_super, 0);
 
 /* --------------------------------------------------------------------- */
 
@@ -671,7 +658,9 @@ void usbdevfs_remove_device(struct usb_device *dev)
 
 /* --------------------------------------------------------------------- */
 
+#ifdef CONFIG_PROC_FS          
 static struct proc_dir_entry *usbdir = NULL;
+#endif 
 
 int __init usbdevfs_init(void)
 {
@@ -684,8 +673,10 @@ int __init usbdevfs_init(void)
                return ret;
        if ((ret = register_filesystem(&usbdevice_fs_type)))
                usb_deregister(&usbdevfs_driver);
+#ifdef CONFIG_PROC_FS          
        /* create mount point for usbdevfs */
        usbdir = proc_mkdir("usb", proc_bus);
+#endif 
        return ret;
 }
 
@@ -693,8 +684,10 @@ void __exit usbdevfs_cleanup(void)
 {
        usb_deregister(&usbdevfs_driver);
        unregister_filesystem(&usbdevice_fs_type);
+#ifdef CONFIG_PROC_FS  
         if (usbdir)
                 remove_proc_entry("usb", proc_bus);
+#endif
 }
 
 #if 0
diff --git a/drivers/usb/keyspan_pda_fw.h b/drivers/usb/keyspan_pda_fw.h
deleted file mode 100644 (file)
index 5366c0a..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * keyspan_pda_fw.h
- *
- * Generated from keyspan_pda.s by ezusb_convert.pl
- * This file is presumed to be under the same copyright as the source file
- * from which it was derived.
- */
-
-static const struct ezusb_hex_record keyspan_pda_firmware[] = {
-{ 0x0000,      3,      {0x02, 0x02, 0x00} },
-{ 0x0023,      4,      {0x02, 0x05, 0x5f, 0x00} },
-{ 0x0043,      4,      {0x02, 0x01, 0x00, 0x00} },
-{ 0x0030,      5,      {0x00, 0x00, 0x00, 0x00, 0x00} },
-{ 0x0100,      16,     {0x02, 0x02, 0x96, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00} },
-{ 0x0110,      16,     {0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00} },
-{ 0x0120,      16,     {0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x04, 0x61, 0x00, 0x02, 0x04, 0x89, 0x00} },
-{ 0x0200,      16,     {0x75, 0x81, 0x5e, 0xe4, 0xf5, 0x32, 0xf5, 0x33, 0xf5, 0x30, 0xf5, 0x31, 0xf5, 0x34, 0xc2, 0x00} },
-{ 0x0210,      16,     {0xc2, 0x01, 0xa9, 0x00, 0x74, 0xfe, 0x90, 0x10, 0x00, 0xf0, 0xa3, 0xd9, 0xfc, 0x74, 0xfd, 0x90} },
-{ 0x0220,      16,     {0x11, 0x00, 0xf0, 0xa3, 0xd9, 0xfc, 0x74, 0x02, 0x90, 0x7f, 0x9d, 0xf0, 0x74, 0x00, 0x90, 0x7f} },
-{ 0x0230,      16,     {0x97, 0xf0, 0x74, 0x86, 0x90, 0x7f, 0x9e, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0x03, 0xf0, 0x90, 0x7f} },
-{ 0x0240,      16,     {0xaf, 0xe0, 0xd2, 0xe0, 0xf0, 0x74, 0x01, 0x90, 0x7f, 0xab, 0xf0, 0x90, 0x7f, 0xae, 0xf0, 0x90} },
-{ 0x0250,      16,     {0x7f, 0xac, 0x74, 0x04, 0xf0, 0x90, 0x7f, 0xad, 0x74, 0x04, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x74} },
-{ 0x0260,      16,     {0x84, 0x90, 0x7f, 0x98, 0xf0, 0x74, 0x00, 0xf5, 0x98, 0x75, 0xc8, 0x30, 0x7b, 0x05, 0x91, 0x20} },
-{ 0x0270,      16,     {0xd2, 0xca, 0x75, 0x98, 0x50, 0xd2, 0xe8, 0xd2, 0xaf, 0xd2, 0xac, 0x74, 0x00, 0xf5, 0x86, 0x90} },
-{ 0x0280,      16,     {0x7f, 0xd6, 0x74, 0x02, 0xf0, 0x79, 0x2e, 0x7a, 0x00, 0x7b, 0x00, 0xdb, 0xfe, 0xda, 0xfa, 0xd9} },
-{ 0x0290,      16,     {0xf6, 0x74, 0x06, 0xf0, 0x80, 0xfe, 0xc0, 0x86, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x84, 0xc0, 0x85} },
-{ 0x02a0,      16,     {0xc0, 0xe0, 0xe5, 0x91, 0xc2, 0xe4, 0xf5, 0x91, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0x90, 0x7f} },
-{ 0x02b0,      16,     {0xe8, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb, 0xa3, 0xe0, 0xfc, 0xe9, 0x54, 0x60, 0xb4} },
-{ 0x02c0,      16,     {0x00, 0x03, 0x02, 0x03, 0x39, 0xb4, 0x40, 0x6e, 0xba, 0x00, 0x0b, 0x12, 0x04, 0x20, 0x40, 0x03} },
-{ 0x02d0,      16,     {0x02, 0x04, 0x02, 0x02, 0x04, 0x0a, 0xba, 0x01, 0x03, 0x02, 0x04, 0x0a, 0xba, 0x02, 0x03, 0x02} },
-{ 0x02e0,      16,     {0x04, 0x0a, 0xba, 0x03, 0x03, 0x02, 0x04, 0x44, 0xba, 0x04, 0x1e, 0xbb, 0x00, 0x0a, 0x90, 0x7f} },
-{ 0x02f0,      16,     {0x95, 0xe0, 0x44, 0x02, 0xf0, 0x02, 0x04, 0x02, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfd, 0xf0, 0x90} },
-{ 0x0300,      16,     {0x7f, 0x95, 0xe0, 0x54, 0xfd, 0xf0, 0x02, 0x04, 0x02, 0xba, 0x05, 0x03, 0x02, 0x04, 0x0a, 0xba} },
-{ 0x0310,      16,     {0x06, 0x19, 0xbb, 0x00, 0x08, 0xe5, 0x33, 0xd3, 0x95, 0x32, 0x02, 0x03, 0xde, 0xbb, 0x01, 0x08} },
-{ 0x0320,      16,     {0xe5, 0x32, 0xc3, 0x95, 0x33, 0x02, 0x03, 0xde, 0x02, 0x04, 0x0a, 0xba, 0x07, 0x05, 0x8b, 0x34} },
-{ 0x0330,      16,     {0x02, 0x04, 0x02, 0x02, 0x04, 0x0a, 0x02, 0x04, 0x0a, 0xba, 0x00, 0x20, 0xb9, 0x80, 0x10, 0x90} },
-{ 0x0340,      16,     {0x7f, 0x00, 0xe4, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x04, 0x02, 0xb9} },
-{ 0x0350,      16,     {0x82, 0x02, 0x80, 0xeb, 0xb9, 0x81, 0x02, 0x80, 0xe6, 0x02, 0x04, 0x0a, 0xba, 0x01, 0x0f, 0xbb} },
-{ 0x0360,      16,     {0x00, 0x03, 0x02, 0x04, 0x0a, 0xbb, 0x01, 0x03, 0x02, 0x04, 0x02, 0x02, 0x04, 0x0a, 0xba, 0x03} },
-{ 0x0370,      16,     {0x0f, 0xbb, 0x00, 0x03, 0x02, 0x04, 0x0a, 0xbb, 0x01, 0x03, 0x02, 0x04, 0x02, 0x02, 0x04, 0x0a} },
-{ 0x0380,      16,     {0xba, 0x06, 0x56, 0xbc, 0x01, 0x0f, 0x90, 0x7f, 0xd4, 0x74, 0x06, 0xf0, 0x90, 0x7f, 0xd5, 0x74} },
-{ 0x0390,      16,     {0x12, 0xf0, 0x02, 0x04, 0x02, 0xbc, 0x02, 0x12, 0xbb, 0x00, 0x6f, 0x90, 0x7f, 0xd4, 0x74, 0x06} },
-{ 0x03a0,      16,     {0xf0, 0x90, 0x7f, 0xd5, 0x74, 0x24, 0xf0, 0x02, 0x04, 0x02, 0xbc, 0x03, 0x29, 0x74, 0x04, 0xc3} },
-{ 0x03b0,      16,     {0x9b, 0x40, 0x57, 0x60, 0x55, 0xeb, 0x2b, 0x90, 0x06, 0x44, 0x25, 0x82, 0xf5, 0x82, 0x74, 0x00} },
-{ 0x03c0,      16,     {0x35, 0x83, 0xf5, 0x83, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0x90, 0x7f, 0xd4, 0xe9, 0xf0, 0x90, 0x7f} },
-{ 0x03d0,      16,     {0xd5, 0xea, 0xf0, 0x02, 0x04, 0x02, 0x02, 0x04, 0x0a, 0xba, 0x08, 0x0f, 0x74, 0x01, 0x90, 0x7f} },
-{ 0x03e0,      16,     {0x00, 0xf0, 0x74, 0x01, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x04, 0x02, 0xba, 0x09, 0x03, 0x02, 0x04} },
-{ 0x03f0,      16,     {0x02, 0xba, 0x0a, 0x05, 0x74, 0x00, 0x02, 0x03, 0xde, 0xba, 0x0b, 0x03, 0x02, 0x04, 0x02, 0x02} },
-{ 0x0400,      16,     {0x04, 0x0a, 0x90, 0x7f, 0xb4, 0x74, 0x02, 0xf0, 0x80, 0x09, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01} },
-{ 0x0410,      16,     {0xf0, 0x80, 0x00, 0xd0, 0xe0, 0xd0, 0x85, 0xd0, 0x84, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0x86, 0x32} },
-{ 0x0420,      16,     {0xeb, 0x20, 0xe7, 0x1e, 0xc3, 0x94, 0x0a, 0x50, 0x19, 0xeb, 0x23, 0x24, 0xfe, 0xf5, 0x82, 0x74} },
-{ 0x0430,      16,     {0x05, 0x34, 0x00, 0xf5, 0x83, 0xe0, 0xf5, 0xcb, 0xf5, 0xcd, 0xa3, 0xe0, 0xf5, 0xca, 0xf5, 0xcc} },
-{ 0x0440,      16,     {0xc3, 0x22, 0xd3, 0x22, 0xb9, 0x41, 0x11, 0xeb, 0x64, 0xff, 0x54, 0x84, 0xfb, 0x90, 0x7f, 0x98} },
-{ 0x0450,      16,     {0xe0, 0x54, 0x7b, 0x4b, 0xf0, 0x02, 0x04, 0x02, 0x90, 0x7f, 0x9b, 0xe0, 0x64, 0xff, 0x02, 0x03} },
-{ 0x0460,      16,     {0xde, 0xc0, 0x86, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x84, 0xc0, 0x85, 0xc0, 0xe0, 0xe5, 0x91, 0xc2} },
-{ 0x0470,      16,     {0xe4, 0xf5, 0x91, 0x90, 0x7f, 0xa9, 0x74, 0x04, 0xf0, 0x12, 0x05, 0xa0, 0xd0, 0xe0, 0xd0, 0x85} },
-{ 0x0480,      16,     {0xd0, 0x84, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0x86, 0x32, 0xc0, 0x86, 0xc0, 0x82, 0xc0, 0x83, 0xc0} },
-{ 0x0490,      16,     {0x84, 0xc0, 0x85, 0xc0, 0xe0, 0xe5, 0x91, 0xc2, 0xe4, 0xf5, 0x91, 0x90, 0x7f, 0xaa, 0x74, 0x04} },
-{ 0x04a0,      16,     {0xf0, 0x90, 0x7f, 0xc9, 0xe0, 0xf9, 0xe4, 0xf5, 0x86, 0x90, 0x7d, 0xc0, 0x75, 0x85, 0x10, 0x85} },
-{ 0x04b0,      16,     {0x32, 0x84, 0xe0, 0x05, 0x86, 0x05, 0x84, 0xf0, 0xe5, 0x84, 0xb5, 0x33, 0x02, 0x80, 0x09, 0x05} },
-{ 0x04c0,      16,     {0x32, 0x05, 0x86, 0xa3, 0xd9, 0xec, 0x80, 0x00, 0x90, 0x7f, 0xc9, 0xf0, 0xb1, 0x31, 0xd0, 0xe0} },
-{ 0x04d0,      16,     {0xd0, 0x85, 0xd0, 0x84, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0x86, 0x32, 0xe4, 0xf5, 0x86, 0x90, 0x7f} },
-{ 0x04e0,      16,     {0xbc, 0xe0, 0x20, 0xe1, 0x4b, 0x90, 0x7d, 0x00, 0xe5, 0x32, 0xf0, 0xa3, 0xe5, 0x33, 0xf0, 0xa3} },
-{ 0x04f0,      16,     {0xe5, 0x30, 0xf0, 0xa3, 0xe5, 0x31, 0xf0, 0xa3, 0xe4, 0x30, 0x00, 0x01, 0x04, 0xf0, 0xa3, 0x05} },
-{ 0x0500,      16,     {0x86, 0x90, 0x10, 0x00, 0x79, 0x10, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xd9, 0xf6} },
-{ 0x0510,      16,     {0x05, 0x86, 0x74, 0xfc, 0xf0, 0xa3, 0x05, 0x86, 0x90, 0x11, 0x00, 0x79, 0x10, 0xe0, 0xa3, 0x05} },
-{ 0x0520,      16,     {0x86, 0xf0, 0xa3, 0x05, 0x86, 0xd9, 0xf6, 0xe4, 0xf5, 0x86, 0x90, 0x7f, 0xbd, 0x74, 0x26, 0xf0} },
-{ 0x0530,      16,     {0x22, 0x20, 0x00, 0x13, 0xe5, 0x32, 0xb5, 0x33, 0x01, 0x22, 0x05, 0x33, 0x75, 0x83, 0x10, 0x85} },
-{ 0x0540,      16,     {0x33, 0x82, 0xe0, 0xf5, 0x99, 0xd2, 0x00, 0x74, 0x00, 0xb5, 0x34, 0x01, 0x22, 0xe5, 0x33, 0xd3} },
-{ 0x0550,      16,     {0x95, 0x32, 0xc3, 0x95, 0x34, 0x40, 0xf5, 0x75, 0x34, 0x00, 0xd2, 0x01, 0x02, 0x05, 0xa0, 0xc0} },
-{ 0x0560,      16,     {0x86, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x84, 0xc0, 0x85, 0xc0, 0xe0, 0x30, 0x99, 0x07, 0xc2, 0x99} },
-{ 0x0570,      16,     {0xc2, 0x00, 0x12, 0x05, 0x34, 0x30, 0x98, 0x05, 0x12, 0x05, 0x8a, 0xc2, 0x98, 0xd0, 0xe0, 0xd0} },
-{ 0x0580,      16,     {0x85, 0xd0, 0x84, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0x86, 0x32, 0x75, 0x83, 0x11, 0x85, 0x30, 0x82} },
-{ 0x0590,      16,     {0x05, 0x82, 0xe5, 0x99, 0xf0, 0xe5, 0x82, 0xb5, 0x31, 0x01, 0x22, 0x05, 0x30, 0xb1, 0xa0, 0x22} },
-{ 0x05a0,      16,     {0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x38, 0x20, 0x01, 0x36, 0xe5, 0x30, 0xb5, 0x31, 0x01, 0x22} },
-{ 0x05b0,      16,     {0xe4, 0xf5, 0x86, 0x75, 0x83, 0x11, 0x05, 0x86, 0x90, 0x7e, 0x00, 0xf0, 0xa3, 0x05, 0x86, 0x79} },
-{ 0x05c0,      16,     {0x01, 0xe5, 0x30, 0xb5, 0x31, 0x02, 0x80, 0x10, 0x05, 0x31, 0x85, 0x31, 0x82, 0xe0, 0x05, 0x86} },
-{ 0x05d0,      16,     {0xf0, 0xa3, 0x05, 0x86, 0x09, 0xb9, 0x40, 0xe9, 0x90, 0x7f, 0xb9, 0xe9, 0x60, 0x01, 0xf0, 0x22} },
-{ 0x05e0,      16,     {0xc2, 0x01, 0xe4, 0xf5, 0x86, 0x90, 0x7e, 0x00, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x02, 0xf0, 0x90} },
-{ 0x05f0,      16,     {0x7f, 0xb9, 0xf0, 0x22, 0xc2, 0x99, 0xf5, 0x99, 0x30, 0x99, 0xfd, 0xc2, 0x99, 0x22, 0xe5, 0x5e} },
-{ 0x0600,      16,     {0xf6, 0x3c, 0xfd, 0x8f, 0xfe, 0xc8, 0xff, 0x64, 0xff, 0xb2, 0xff, 0xd9, 0xff, 0xed, 0xff, 0xf3} },
-{ 0x0610,      16,     {0xff, 0xfa, 0x12, 0x01, 0x00, 0x01, 0xff, 0xff, 0xff, 0x40, 0xcd, 0x06, 0x04, 0x01, 0x89, 0xab} },
-{ 0x0620,      16,     {0x01, 0x02, 0x03, 0x01, 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00} },
-{ 0x0630,      16,     {0x00, 0x02, 0xff, 0xff, 0xff, 0x00, 0x07, 0x05, 0x82, 0x03, 0x40, 0x00, 0x01, 0x07, 0x05, 0x02} },
-{ 0x0640,      16,     {0x02, 0x40, 0x00, 0x00, 0x06, 0x4c, 0x06, 0x50, 0x06, 0x72, 0x06, 0xa0, 0x04, 0x03, 0x00, 0x00} },
-{ 0x0650,      16,     {0x22, 0x03, 0x41, 0x00, 0x43, 0x00, 0x4d, 0x00, 0x45, 0x00, 0x20, 0x00, 0x75, 0x00, 0x73, 0x00} },
-{ 0x0660,      16,     {0x62, 0x00, 0x20, 0x00, 0x77, 0x00, 0x69, 0x00, 0x64, 0x00, 0x67, 0x00, 0x65, 0x00, 0x74, 0x00} },
-{ 0x0670,      16,     {0x73, 0x00, 0x2e, 0x03, 0x41, 0x00, 0x43, 0x00, 0x4d, 0x00, 0x45, 0x00, 0x20, 0x00, 0x55, 0x00} },
-{ 0x0680,      16,     {0x53, 0x00, 0x42, 0x00, 0x20, 0x00, 0x73, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00} },
-{ 0x0690,      16,     {0x6c, 0x00, 0x20, 0x00, 0x77, 0x00, 0x69, 0x00, 0x64, 0x00, 0x67, 0x00, 0x65, 0x00, 0x74, 0x00} },
-{ 0x06a0,      6,      {0x06, 0x03, 0x34, 0x00, 0x37, 0x00} },
-{ 0xffff,      0,      {0x00} }
-};
index 0984e48fd26ecfb0ef79a319018001eaf16e3210..607782829ada542a029a8b7a4aedd5e50ee81a8e 100644 (file)
@@ -87,8 +87,6 @@ static void mousedev_event(struct input_handle *handle, unsigned int type, unsig
        while (list) {
                switch (type) {
                        case EV_ABS:
-                               if (test_bit(EV_REL, handle->dev->evbit) && test_bit(REL_X, handle->dev->relbit))
-                                       return;
                                switch (code) {
                                        case ABS_X:     
                                                size = handle->dev->absmax[ABS_X] - handle->dev->absmin[ABS_X];
diff --git a/drivers/usb/serial/Makefile b/drivers/usb/serial/Makefile
new file mode 100644 (file)
index 0000000..d5c245b
--- /dev/null
@@ -0,0 +1,66 @@
+#
+# Makefile for the kernel USB device drivers.
+#
+
+# Subdirs.
+
+SUB_DIRS       :=
+MOD_SUB_DIRS   := $(SUB_DIRS)
+ALL_SUB_DIRS   := $(SUB_DIRS)
+
+# The target object and module list name.
+
+O_TARGET       := usbdrv.o
+M_OBJS         :=
+O_OBJS         :=
+MOD_LIST_NAME  := USB_MODULES
+
+# Objects that export symbols.
+
+# Multipart objects.
+
+# Optional parts of multipart objects.
+
+# Object file lists.
+
+obj-y  :=
+obj-m  :=
+obj-n  :=
+obj-   :=
+
+# Each configuration option enables a list of files.
+
+obj-$(CONFIG_USB_SERIAL)       += usb-serial.o
+
+# Extract lists of the multi-part drivers.
+# The 'int-*' lists are the intermediate files used to build the multi's.
+
+multi-y                := $(filter $(list-multi), $(obj-y))
+multi-m                := $(filter $(list-multi), $(obj-m))
+int-y          := $(sort $(foreach m, $(multi-y), $($(basename $(m))-objs)))
+int-m          := $(sort $(foreach m, $(multi-m), $($(basename $(m))-objs)))
+
+# Files that are both resident and modular: remove from modular.
+
+obj-m          := $(filter-out $(obj-y), $(obj-m))
+int-m          := $(filter-out $(int-y), $(int-m))
+
+# Take multi-part drivers out of obj-y and put components in.
+
+obj-y          := $(filter-out $(list-multi), $(obj-y)) $(int-y)
+
+# Translate to Rules.make lists.
+
+O_OBJS         := $(sort $(filter-out $(export-objs), $(obj-y)))
+OX_OBJS                := $(sort $(filter     $(export-objs), $(obj-y)))
+M_OBJS         := $(sort $(filter-out $(export-objs), $(obj-m)))
+MX_OBJS                := $(sort $(filter     $(export-objs), $(obj-m)))
+MI_OBJS                := $(sort $(filter-out $(export-objs), $(int-m)))
+MIX_OBJS       := $(sort $(filter     $(export-objs), $(int-m)))
+
+# The global Rules.make.
+
+include $(TOPDIR)/Rules.make
+
+# Link rules for multi-part drivers.
+
diff --git a/drivers/usb/serial/Makefile-keyspan_pda_fw b/drivers/usb/serial/Makefile-keyspan_pda_fw
new file mode 100644 (file)
index 0000000..219708e
--- /dev/null
@@ -0,0 +1,16 @@
+
+# some rules to handle the quirks of the 'as31' assembler, like
+# insisting upon fixed suffixes for the input and output files,
+# and its lack of preprocessor support
+
+all: keyspan_pda_fw.h
+
+%.asm: %.s
+       gcc -x assembler-with-cpp -P -E -o $@ $<
+
+%.hex: %.asm
+       as31 -l $<
+       mv $*.obj $@
+
+%_fw.h: %.hex ezusb_convert.pl
+       perl ezusb_convert.pl $* < $< > $@
diff --git a/drivers/usb/serial/ezusb_convert.pl b/drivers/usb/serial/ezusb_convert.pl
new file mode 100644 (file)
index 0000000..b4f08b2
--- /dev/null
@@ -0,0 +1,48 @@
+#! /usr/bin/perl -w
+
+
+# convert an Intel HEX file into a set of C records usable by the firmware
+# loading code in usb-serial.c (or others)
+
+# accepts the .hex file(s) on stdin, a basename (to name the initialized
+# array) as an argument, and prints the .h file to stdout. Typical usage:
+#  perl ezusb_convert.pl foo <foo.hex >fw_foo.h
+
+
+my $basename = $ARGV[0];
+die "no base name specified" unless $basename;
+
+while (<STDIN>) {
+    # ':' <len> <addr> <type> <len-data> <crc> '\r'
+    #  len, type, crc are 2-char hex, addr is 4-char hex. type is 00 for
+    # normal records, 01 for EOF
+    my($lenstring, $addrstring, $typestring, $reststring) =
+      /^:(\w\w)(\w\w\w\w)(\w\w)(\w+)$/;
+    die "malformed line: $_" unless $reststring;
+    last if $typestring eq '01';
+    my($len) = hex($lenstring);
+    my($addr) = hex($addrstring);
+    my(@bytes) = unpack("C*", pack("H".(2*$len), $reststring));
+    #pop(@bytes); # last byte is a CRC
+    push(@records, [$addr, \@bytes]);
+}
+
+print <<"EOF";
+/*
+ * ${basename}_fw.h
+ *
+ * Generated from ${basename}.s by ezusb_convert.pl
+ * This file is presumed to be under the same copyright as the source file
+ * from which it was derived.
+ */
+
+EOF
+
+print "static const struct ezusb_hex_record ${basename}_firmware[] = {\n";
+foreach $r (@records) {
+    printf("{ 0x%04x,\t%d,\t{", $r->[0], scalar(@{$r->[1]}));
+    print join(", ", map {sprintf('0x%02x', $_);} @{$r->[1]});
+    print "} },\n";
+}
+print "{ 0xffff,\t0,\t{0x00} }\n";
+print "};\n";
diff --git a/drivers/usb/serial/ftdi_sio.h b/drivers/usb/serial/ftdi_sio.h
new file mode 100644 (file)
index 0000000..36fa7bb
--- /dev/null
@@ -0,0 +1,380 @@
+/* Bill Ryder - bryder@sgi.com - wrote the FTDI_SIO implementation */
+/* The device is based on the FTDI FT8U100AX chip, DB25 on one side, USB on the other */
+/* Thanx to FTDI for so kindly providing details of the protocol required */
+/* http://www.ftdi.co.uk  */
+
+/* The implementation of the device I have is called a USC-1000 */
+/*  which is available from http://www.dse.co.nz - cat no XH4214 */
+/* It looks similar to this: http://www.dansdata.com/usbser.htm but I can't be sure */
+/* There are other USC-1000s which don't look like my device though so beware */
+
+/* Definitions for the FTDI USB Single Port Serial Converter */
+/* known as FTDI_SIO (Serial Input/Output application of the chipset) */
+
+#define FTDI_VID       0x0403  /* Vendor Id */
+#define FTDI_SIO_PID   0x8372  /* Product Id */
+
+/* Vendor Request Interface */
+#define FTDI_SIO_RESET                 0 /* Reset the port */
+#define FTDI_SIO_MODEM_CTRL    1 /* Set the modem control register */
+#define FTDI_SIO_SET_FLOW_CTRL 2 /* Set flow control register */
+#define FTDI_SIO_SET_BAUD_RATE 3 /* Set baud rate */
+#define FTDI_SIO_SET_DATA      4 /* Set the data characteristics of the port */
+#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 */
+
+/* Port Identifier Table */
+#define PIT_DEFAULT            0 /* SIOA */
+#define PIT_SIOA               1 /* SIOA */
+/* The device this is tested with one has one port */
+#define PIT_SIOB               2 /* SIOB */
+#define PIT_PARALLEL           3 /* Parallel */
+
+/* FTDI_SIO_RESET */
+#define FTDI_SIO_RESET_REQUEST FTDI_SIO_RESET
+#define FTDI_SIO_RESET_REQUEST_TYPE 0x40
+#define FTDI_SIO_RESET_SIO 0
+#define FTDI_SIO_RESET_PURGE_RX 1
+#define FTDI_SIO_RESET_PURGE_TX 2
+/* 
+   BmRequestType:  0100 0000B
+   bRequest:       FTDI_SIO_RESET
+   wValue:         Control Value 
+                         0 = Reset SIO
+                         1 = Purge RX buffer
+                         2 = Purge TX buffer
+   wIndex:         Port
+   wLength:        0
+   Data:           None
+
+   */
+
+/* FTDI_SIO_SET_BAUDRATE */
+#define FTDI_SIO_SET_BAUDRATE_REQUEST_TYPE 0x40
+#define FTDI_SIO_SET_BAUDRATE_REQUEST 3
+
+/*
+  BmRequestType:  0100 0000B
+  bRequest:       FTDI_SIO_SET_BAUDRATE
+  wValue:         BaudRate value - see below
+  wIndex:         Port
+  wLength:        0
+  Data:           None
+*/
+
+typedef enum {
+ ftdi_sio_b300 = 0, 
+ ftdi_sio_b600 = 1, 
+ ftdi_sio_b1200 = 2,
+ ftdi_sio_b2400 = 3,
+ ftdi_sio_b4800 = 4,
+ ftdi_sio_b9600 = 5,
+ ftdi_sio_b19200 = 6,
+ ftdi_sio_b38400 = 7,
+ ftdi_sio_b57600 = 8,
+ ftdi_sio_b115200 = 9
+} FTDI_SIO_baudrate_t ;
+
+#define FTDI_SIO_SET_DATA_REQUEST FTDI_SIO_SET_DATA
+#define FTDI_SIO_SET_DATA_REQUEST_TYPE 0x40
+#define FTDI_SIO_SET_DATA_PARITY_NONE (0x0 << 8 )
+#define FTDI_SIO_SET_DATA_PARITY_ODD (0x1 << 8 )
+#define FTDI_SIO_SET_DATA_PARITY_EVEN (0x2 << 8 )
+#define FTDI_SIO_SET_DATA_PARITY_MARK (0x3 << 8 )
+#define FTDI_SIO_SET_DATA_PARITY_SPACE (0x4 << 8 )
+#define FTDI_SIO_SET_DATA_STOP_BITS_1 (0x0 << 11 )
+#define FTDI_SIO_SET_DATA_STOP_BITS_15 (0x1 << 11 )
+#define FTDI_SIO_SET_DATA_STOP_BITS_2 (0x2 << 11 )
+
+/* FTDI_SIO_SET_DATA */
+
+/*    BmRequestType:  0100 0000B */
+/*    bRequest:       FTDI_SIO_SET_DATA */
+/*    wValue:         Data characteristics (see below) */
+/*    wIndex:         Port */
+/*    wLength:        0 */
+/*    Data:           None */
+/* 
+  Data characteristics
+
+B0..7   Number of data bits
+B8..10  Parity
+           0 = None
+           1 = Odd
+           2 = Even
+           3 = Mark
+           4 = Space
+ B11..13 Stop Bits
+           0 = 1
+           1 = 1.5
+           2 = 2
+ B14..15 Reserved
+*/
+
+
+
+/* FTDI_SIO_MODEM_CTRL */
+#define FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE 0x40
+#define FTDI_SIO_SET_MODEM_CTRL_REQUEST FTDI_SIO_MODEM_CTRL
+
+/* 
+  BmRequestType:   0100 0000B
+  bRequest:        FTDI_SIO_MODEM_CTRL
+  wValue:          ControlValue (see below)
+  wIndex:          Port
+  wLength:         0
+  Data:            None
+
+  NOTE: If the device is in RTS/CTS flow control, the RTS set by this
+        command will be IGNORED without an error being returned
+*/
+
+#define FTDI_SIO_SET_DTR_MASK 0x1
+#define FTDI_SIO_SET_DTR_HIGH ( 1 | ( FTDI_SIO_SET_DTR_MASK  << 8))
+#define FTDI_SIO_SET_DTR_LOW  ( 0 | ( FTDI_SIO_SET_DTR_MASK  << 8))
+#define FTDI_SIO_SET_RTS_MASK 0x2
+#define FTDI_SIO_SET_RTS_HIGH ( 2 | ( FTDI_SIO_SET_RTS_MASK << 8 ))
+#define FTDI_SIO_SET_RTS_LOW ( 0 | ( FTDI_SIO_SET_RTS_MASK << 8 ))
+
+/* ControlValue
+   B0    DTR state
+           0 = reset
+           1 = set
+   B1    RTS state
+           0 = reset
+           1 = set
+   B2..7 Reserved
+   B8    DTR state enable
+           0 = ignore
+           1 = use DTR state
+   B9    RTS state enable
+           0 = ignore
+           1 = use RTS state
+   B10..15 Reserved
+*/
+
+/* FTDI_SIO_SET_FLOW_CTRL */
+#define FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE 0x40
+#define FTDI_SIO_SET_FLOW_CTRL_REQUEST FTDI_SIO_SET_FLOW_CTRL
+#define FTDI_SIO_DISABLE_FLOW_CTRL 0x0 
+#define FTDI_SIO_RTS_CTS_HS 0x1
+#define FTDI_SIO_DTR_DSR_HS 0x2
+#define FTDI_SIO_XON_XOFF_HS 0x4
+/* 
+   BmRequestType:  0100 0000b
+   bRequest:       FTDI_SIO_SET_FLOW_CTRL
+   wValue:         Xoff/Xon
+   wIndex:         Protocol/Port - hIndex is protocl / lIndex is port
+   wLength:        0 
+   Data:           None
+
+hIndex - protocol has
+ B0 Output handshaking using RTS/CTS
+      0 = disabled
+      1 = enabled
+ B1 Output handshaking using DTR/DSR
+      0 = disabled
+      1 = enabled
+ B2 Xon/Xoff handshaking
+      0 = disabled
+      1 = enabled
+
+A value of zero in the hIndex field selects no handshaking
+
+If Xon/Xoff handshaking is specified, the hValue field contains the Xoff character 
+and the lValue field contains the Xon character.
+
+*/  
+/* FTDI_SIO_SET_EVENT_CHAR */
+/* Set the special event character for the specified communications port */
+/* If the device sees this character it will immediately return the */
+/* data read so far - rather than wait 40ms or until 62 bytes is read */
+#define  FTDI_SIO_SET_EVENT_CHAR_REQUEST FTDI_SIO_SET_EVENT_CHAR
+#define  FTDI_SIO_SET_EVENT_CHAR_REQUEST_TYPE 0x40
+
+
+/* 
+  BmRequestType:   0100 0000b
+  bRequest:        FTDI_SIO_SET_EVENT_CHAR
+  wValue:          EventChar
+  wIndex:          Port
+  wLength:         0
+  Data:            None
+
+wValue:
+   B0..7   Event Character
+   B8      Event Character Processing
+             0 = disabled
+             1 = enabled
+   B9..15  Reserved
+
+*/
+          
+/* FTDI_SIO_SET_ERROR_CHAR */
+/* Set the parity error replacement character for the specified communications port */
+
+/* 
+  BmRequestType:  0100 0000b
+  bRequest:       FTDI_SIO_SET_EVENT_CHAR
+  wValue:         Error Char
+  wIndex:         Port
+  wLength:        0
+  Data:           None
+
+Error Char
+  B0..7  Error Character
+  B8     Error Character Processing
+           0 = disabled
+           1 = enabled
+  B9..15 Reserved
+
+*/
+
+/* FTDI_SIO_GET_MODEM_STATUS */
+/* Retreive the current value of the modem status register */
+
+#define FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE 0xc0
+#define FTDI_SIO_GET_MODEM_STATUS_REQUEST FTDI_SIO_GET_MODEM_STATUS
+#define FTDI_SIO_CTS_MASK 0x10
+#define FTDI_SIO_DSR_MASK 0x20
+#define FTDI_SIO_RI_MASK  0x40
+#define FTDI_SIO_RLSD_MASK 0x80
+/* 
+  BmRequestType:   1100 0000b
+  bRequest:        FTDI_SIO_GET_MODEM_STATUS
+  wValue:          zero
+  wIndex:          Port
+  wLength:         1
+  Data:            Status
+
+One byte of data is returned 
+B0..3 0
+B4    CTS
+        0 = inactive
+        1 = active
+B5    DSR
+        0 = inactive
+        1 = active
+B6    Ring Indicator (RI)
+        0 = inactive
+        1 = active
+B7    Receive Line Signal Detect (RLSD)
+        0 = inactive
+        1 = active 
+*/
+
+
+
+/* Descriptors returned by the device 
+
+ Device Descriptor
+
+Offset Field           Size    Value   Description
+0      bLength         1       0x12    Size of descriptor in bytes
+1      bDescriptorType 1       0x01    DEVICE Descriptor Type
+2      bcdUSB          2       0x0110  USB Spec Release Number
+4      bDeviceClass    1       0x00    Class Code
+5      bDeviceSubClass 1       0x00    SubClass Code
+6      bDeviceProtocol 1       0x00    Protocol Code
+7      bMaxPacketSize0 1       0x08    Maximum packet size for endpoint 0
+8      idVendor        2       0x0403  Vendor ID
+10     idProduct       2       0x8372  Product ID (FTDI_SIO_PID)
+12     bcdDevice       2       0x0001  Device release number
+14     iManufacturer   1       0x01    Index of man. string desc
+15     iProduct        1       0x02    Index of prod string desc
+16     iSerialNumber   1       0x02    Index of serial nmr string desc
+17     bNumConfigurations 1    0x01    Number of possible configurations
+
+Configuration Descriptor
+
+Offset Field                   Size    Value
+0      bLength                 1       0x09    Size of descriptor in bytes
+1      bDescriptorType         1       0x02    CONFIGURATION Descriptor Type
+2      wTotalLength            2       0x0020  Total length of data
+4      bNumInterfaces          1       0x01    Number of interfaces supported
+5      bConfigurationValue     1       0x01    Argument for SetCOnfiguration() req
+6      iConfiguration          1       0x02    Index of config string descriptor
+7      bmAttributes            1       0x20    Config characteristics Remote Wakeup
+8      MaxPower                1       0x1E    Max power consumption
+
+Interface Descriptor
+
+Offset Field                   Size    Value
+0      bLength                 1       0x09    Size of descriptor in bytes
+1      bDescriptorType         1       0x04    INTERFACE Descriptor Type
+2      bInterfaceNumber        1       0x00    Number of interface
+3      bAlternateSetting       1       0x00    Value used to select alternate
+4      bNumEndpoints           1       0x02    Number of endpoints
+5      bInterfaceClass         1       0xFF    Class Code
+6      bInterfaceSubClass      1       0xFF    Subclass Code
+7      bInterfaceProtocol      1       0xFF    Protocol Code
+8      iInterface              1       0x02    Index of interface string description
+
+IN Endpoint Descriptor
+
+Offset Field                   Size    Value
+0      bLength                 1       0x07    Size of descriptor in bytes
+1      bDescriptorType         1       0x05    ENDPOINT descriptor type
+2      bEndpointAddress        1       0x82    Address of endpoint
+3      bmAttributes            1       0x02    Endpoint attributes - Bulk
+4      bNumEndpoints           2       0x0040  maximum packet size
+5      bInterval               1       0x00    Interval for polling endpoint
+
+OUT Endpoint Descriptor
+
+Offset Field                   Size    Value
+0      bLength                 1       0x07    Size of descriptor in bytes
+1      bDescriptorType         1       0x05    ENDPOINT descriptor type
+2      bEndpointAddress        1       0x02    Address of endpoint
+3      bmAttributes            1       0x02    Endpoint attributes - Bulk
+4      bNumEndpoints           2       0x0040  maximum packet size
+5      bInterval               1       0x00    Interval for polling endpoint
+    
+DATA FORMAT
+
+IN Endpoint
+
+The device reserves the first two bytes of data on this endpoint to contain the current
+values of the modem and line status registers. In the absence of data, the device 
+generates a message consisting of these two status bytes every 40 ms
+
+Byte 0: Modem Status
+
+Offset Description
+B0     Reserved - must be 1
+B1     Reserved - must be 0
+B2     Reserved - must be 0
+B3     Reserved - must be 0
+B4     Clear to Send (CTS)
+B5     Data Set Ready (DSR)
+B6     Ring Indicator (RI)
+B7     Receive Line Signal Detect (RLSD)
+
+Byte 1: Line Status
+
+Offset Description
+B0     Data Ready (DR)
+B1     Overrun Error (OE)
+B2     Parity Error (PE)
+B3     Framing Error (FE)
+B4     Break Interrupt (BI)
+B5     Transmitter Holding Register (THRE)
+B6     Transmitter Empty (TEMT)
+B7     Error in RCVR FIFO
+
+OUT Endpoint
+
+This device reserves the first bytes of data on this endpoint contain the length
+and port identifier of the message. For the FTDI USB Serial converter the port 
+identifier is always 1.
+
+Byte 0: Line Status
+
+Offset Description
+B0     Reserved - must be 1
+B1     Reserved - must be 0
+B2..7  Length of message - (not including Byte 0)
+
+*/
diff --git a/drivers/usb/serial/keyspan_pda_fw.h b/drivers/usb/serial/keyspan_pda_fw.h
new file mode 100644 (file)
index 0000000..5366c0a
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ * keyspan_pda_fw.h
+ *
+ * Generated from keyspan_pda.s by ezusb_convert.pl
+ * This file is presumed to be under the same copyright as the source file
+ * from which it was derived.
+ */
+
+static const struct ezusb_hex_record keyspan_pda_firmware[] = {
+{ 0x0000,      3,      {0x02, 0x02, 0x00} },
+{ 0x0023,      4,      {0x02, 0x05, 0x5f, 0x00} },
+{ 0x0043,      4,      {0x02, 0x01, 0x00, 0x00} },
+{ 0x0030,      5,      {0x00, 0x00, 0x00, 0x00, 0x00} },
+{ 0x0100,      16,     {0x02, 0x02, 0x96, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00} },
+{ 0x0110,      16,     {0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00} },
+{ 0x0120,      16,     {0x02, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x02, 0x04, 0x61, 0x00, 0x02, 0x04, 0x89, 0x00} },
+{ 0x0200,      16,     {0x75, 0x81, 0x5e, 0xe4, 0xf5, 0x32, 0xf5, 0x33, 0xf5, 0x30, 0xf5, 0x31, 0xf5, 0x34, 0xc2, 0x00} },
+{ 0x0210,      16,     {0xc2, 0x01, 0xa9, 0x00, 0x74, 0xfe, 0x90, 0x10, 0x00, 0xf0, 0xa3, 0xd9, 0xfc, 0x74, 0xfd, 0x90} },
+{ 0x0220,      16,     {0x11, 0x00, 0xf0, 0xa3, 0xd9, 0xfc, 0x74, 0x02, 0x90, 0x7f, 0x9d, 0xf0, 0x74, 0x00, 0x90, 0x7f} },
+{ 0x0230,      16,     {0x97, 0xf0, 0x74, 0x86, 0x90, 0x7f, 0x9e, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0x03, 0xf0, 0x90, 0x7f} },
+{ 0x0240,      16,     {0xaf, 0xe0, 0xd2, 0xe0, 0xf0, 0x74, 0x01, 0x90, 0x7f, 0xab, 0xf0, 0x90, 0x7f, 0xae, 0xf0, 0x90} },
+{ 0x0250,      16,     {0x7f, 0xac, 0x74, 0x04, 0xf0, 0x90, 0x7f, 0xad, 0x74, 0x04, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x74} },
+{ 0x0260,      16,     {0x84, 0x90, 0x7f, 0x98, 0xf0, 0x74, 0x00, 0xf5, 0x98, 0x75, 0xc8, 0x30, 0x7b, 0x05, 0x91, 0x20} },
+{ 0x0270,      16,     {0xd2, 0xca, 0x75, 0x98, 0x50, 0xd2, 0xe8, 0xd2, 0xaf, 0xd2, 0xac, 0x74, 0x00, 0xf5, 0x86, 0x90} },
+{ 0x0280,      16,     {0x7f, 0xd6, 0x74, 0x02, 0xf0, 0x79, 0x2e, 0x7a, 0x00, 0x7b, 0x00, 0xdb, 0xfe, 0xda, 0xfa, 0xd9} },
+{ 0x0290,      16,     {0xf6, 0x74, 0x06, 0xf0, 0x80, 0xfe, 0xc0, 0x86, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x84, 0xc0, 0x85} },
+{ 0x02a0,      16,     {0xc0, 0xe0, 0xe5, 0x91, 0xc2, 0xe4, 0xf5, 0x91, 0x90, 0x7f, 0xab, 0x74, 0x01, 0xf0, 0x90, 0x7f} },
+{ 0x02b0,      16,     {0xe8, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb, 0xa3, 0xe0, 0xfc, 0xe9, 0x54, 0x60, 0xb4} },
+{ 0x02c0,      16,     {0x00, 0x03, 0x02, 0x03, 0x39, 0xb4, 0x40, 0x6e, 0xba, 0x00, 0x0b, 0x12, 0x04, 0x20, 0x40, 0x03} },
+{ 0x02d0,      16,     {0x02, 0x04, 0x02, 0x02, 0x04, 0x0a, 0xba, 0x01, 0x03, 0x02, 0x04, 0x0a, 0xba, 0x02, 0x03, 0x02} },
+{ 0x02e0,      16,     {0x04, 0x0a, 0xba, 0x03, 0x03, 0x02, 0x04, 0x44, 0xba, 0x04, 0x1e, 0xbb, 0x00, 0x0a, 0x90, 0x7f} },
+{ 0x02f0,      16,     {0x95, 0xe0, 0x44, 0x02, 0xf0, 0x02, 0x04, 0x02, 0x90, 0x7f, 0x98, 0xe0, 0x54, 0xfd, 0xf0, 0x90} },
+{ 0x0300,      16,     {0x7f, 0x95, 0xe0, 0x54, 0xfd, 0xf0, 0x02, 0x04, 0x02, 0xba, 0x05, 0x03, 0x02, 0x04, 0x0a, 0xba} },
+{ 0x0310,      16,     {0x06, 0x19, 0xbb, 0x00, 0x08, 0xe5, 0x33, 0xd3, 0x95, 0x32, 0x02, 0x03, 0xde, 0xbb, 0x01, 0x08} },
+{ 0x0320,      16,     {0xe5, 0x32, 0xc3, 0x95, 0x33, 0x02, 0x03, 0xde, 0x02, 0x04, 0x0a, 0xba, 0x07, 0x05, 0x8b, 0x34} },
+{ 0x0330,      16,     {0x02, 0x04, 0x02, 0x02, 0x04, 0x0a, 0x02, 0x04, 0x0a, 0xba, 0x00, 0x20, 0xb9, 0x80, 0x10, 0x90} },
+{ 0x0340,      16,     {0x7f, 0x00, 0xe4, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x04, 0x02, 0xb9} },
+{ 0x0350,      16,     {0x82, 0x02, 0x80, 0xeb, 0xb9, 0x81, 0x02, 0x80, 0xe6, 0x02, 0x04, 0x0a, 0xba, 0x01, 0x0f, 0xbb} },
+{ 0x0360,      16,     {0x00, 0x03, 0x02, 0x04, 0x0a, 0xbb, 0x01, 0x03, 0x02, 0x04, 0x02, 0x02, 0x04, 0x0a, 0xba, 0x03} },
+{ 0x0370,      16,     {0x0f, 0xbb, 0x00, 0x03, 0x02, 0x04, 0x0a, 0xbb, 0x01, 0x03, 0x02, 0x04, 0x02, 0x02, 0x04, 0x0a} },
+{ 0x0380,      16,     {0xba, 0x06, 0x56, 0xbc, 0x01, 0x0f, 0x90, 0x7f, 0xd4, 0x74, 0x06, 0xf0, 0x90, 0x7f, 0xd5, 0x74} },
+{ 0x0390,      16,     {0x12, 0xf0, 0x02, 0x04, 0x02, 0xbc, 0x02, 0x12, 0xbb, 0x00, 0x6f, 0x90, 0x7f, 0xd4, 0x74, 0x06} },
+{ 0x03a0,      16,     {0xf0, 0x90, 0x7f, 0xd5, 0x74, 0x24, 0xf0, 0x02, 0x04, 0x02, 0xbc, 0x03, 0x29, 0x74, 0x04, 0xc3} },
+{ 0x03b0,      16,     {0x9b, 0x40, 0x57, 0x60, 0x55, 0xeb, 0x2b, 0x90, 0x06, 0x44, 0x25, 0x82, 0xf5, 0x82, 0x74, 0x00} },
+{ 0x03c0,      16,     {0x35, 0x83, 0xf5, 0x83, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0x90, 0x7f, 0xd4, 0xe9, 0xf0, 0x90, 0x7f} },
+{ 0x03d0,      16,     {0xd5, 0xea, 0xf0, 0x02, 0x04, 0x02, 0x02, 0x04, 0x0a, 0xba, 0x08, 0x0f, 0x74, 0x01, 0x90, 0x7f} },
+{ 0x03e0,      16,     {0x00, 0xf0, 0x74, 0x01, 0x90, 0x7f, 0xb5, 0xf0, 0x02, 0x04, 0x02, 0xba, 0x09, 0x03, 0x02, 0x04} },
+{ 0x03f0,      16,     {0x02, 0xba, 0x0a, 0x05, 0x74, 0x00, 0x02, 0x03, 0xde, 0xba, 0x0b, 0x03, 0x02, 0x04, 0x02, 0x02} },
+{ 0x0400,      16,     {0x04, 0x0a, 0x90, 0x7f, 0xb4, 0x74, 0x02, 0xf0, 0x80, 0x09, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01} },
+{ 0x0410,      16,     {0xf0, 0x80, 0x00, 0xd0, 0xe0, 0xd0, 0x85, 0xd0, 0x84, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0x86, 0x32} },
+{ 0x0420,      16,     {0xeb, 0x20, 0xe7, 0x1e, 0xc3, 0x94, 0x0a, 0x50, 0x19, 0xeb, 0x23, 0x24, 0xfe, 0xf5, 0x82, 0x74} },
+{ 0x0430,      16,     {0x05, 0x34, 0x00, 0xf5, 0x83, 0xe0, 0xf5, 0xcb, 0xf5, 0xcd, 0xa3, 0xe0, 0xf5, 0xca, 0xf5, 0xcc} },
+{ 0x0440,      16,     {0xc3, 0x22, 0xd3, 0x22, 0xb9, 0x41, 0x11, 0xeb, 0x64, 0xff, 0x54, 0x84, 0xfb, 0x90, 0x7f, 0x98} },
+{ 0x0450,      16,     {0xe0, 0x54, 0x7b, 0x4b, 0xf0, 0x02, 0x04, 0x02, 0x90, 0x7f, 0x9b, 0xe0, 0x64, 0xff, 0x02, 0x03} },
+{ 0x0460,      16,     {0xde, 0xc0, 0x86, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x84, 0xc0, 0x85, 0xc0, 0xe0, 0xe5, 0x91, 0xc2} },
+{ 0x0470,      16,     {0xe4, 0xf5, 0x91, 0x90, 0x7f, 0xa9, 0x74, 0x04, 0xf0, 0x12, 0x05, 0xa0, 0xd0, 0xe0, 0xd0, 0x85} },
+{ 0x0480,      16,     {0xd0, 0x84, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0x86, 0x32, 0xc0, 0x86, 0xc0, 0x82, 0xc0, 0x83, 0xc0} },
+{ 0x0490,      16,     {0x84, 0xc0, 0x85, 0xc0, 0xe0, 0xe5, 0x91, 0xc2, 0xe4, 0xf5, 0x91, 0x90, 0x7f, 0xaa, 0x74, 0x04} },
+{ 0x04a0,      16,     {0xf0, 0x90, 0x7f, 0xc9, 0xe0, 0xf9, 0xe4, 0xf5, 0x86, 0x90, 0x7d, 0xc0, 0x75, 0x85, 0x10, 0x85} },
+{ 0x04b0,      16,     {0x32, 0x84, 0xe0, 0x05, 0x86, 0x05, 0x84, 0xf0, 0xe5, 0x84, 0xb5, 0x33, 0x02, 0x80, 0x09, 0x05} },
+{ 0x04c0,      16,     {0x32, 0x05, 0x86, 0xa3, 0xd9, 0xec, 0x80, 0x00, 0x90, 0x7f, 0xc9, 0xf0, 0xb1, 0x31, 0xd0, 0xe0} },
+{ 0x04d0,      16,     {0xd0, 0x85, 0xd0, 0x84, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0x86, 0x32, 0xe4, 0xf5, 0x86, 0x90, 0x7f} },
+{ 0x04e0,      16,     {0xbc, 0xe0, 0x20, 0xe1, 0x4b, 0x90, 0x7d, 0x00, 0xe5, 0x32, 0xf0, 0xa3, 0xe5, 0x33, 0xf0, 0xa3} },
+{ 0x04f0,      16,     {0xe5, 0x30, 0xf0, 0xa3, 0xe5, 0x31, 0xf0, 0xa3, 0xe4, 0x30, 0x00, 0x01, 0x04, 0xf0, 0xa3, 0x05} },
+{ 0x0500,      16,     {0x86, 0x90, 0x10, 0x00, 0x79, 0x10, 0xe0, 0xa3, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xd9, 0xf6} },
+{ 0x0510,      16,     {0x05, 0x86, 0x74, 0xfc, 0xf0, 0xa3, 0x05, 0x86, 0x90, 0x11, 0x00, 0x79, 0x10, 0xe0, 0xa3, 0x05} },
+{ 0x0520,      16,     {0x86, 0xf0, 0xa3, 0x05, 0x86, 0xd9, 0xf6, 0xe4, 0xf5, 0x86, 0x90, 0x7f, 0xbd, 0x74, 0x26, 0xf0} },
+{ 0x0530,      16,     {0x22, 0x20, 0x00, 0x13, 0xe5, 0x32, 0xb5, 0x33, 0x01, 0x22, 0x05, 0x33, 0x75, 0x83, 0x10, 0x85} },
+{ 0x0540,      16,     {0x33, 0x82, 0xe0, 0xf5, 0x99, 0xd2, 0x00, 0x74, 0x00, 0xb5, 0x34, 0x01, 0x22, 0xe5, 0x33, 0xd3} },
+{ 0x0550,      16,     {0x95, 0x32, 0xc3, 0x95, 0x34, 0x40, 0xf5, 0x75, 0x34, 0x00, 0xd2, 0x01, 0x02, 0x05, 0xa0, 0xc0} },
+{ 0x0560,      16,     {0x86, 0xc0, 0x82, 0xc0, 0x83, 0xc0, 0x84, 0xc0, 0x85, 0xc0, 0xe0, 0x30, 0x99, 0x07, 0xc2, 0x99} },
+{ 0x0570,      16,     {0xc2, 0x00, 0x12, 0x05, 0x34, 0x30, 0x98, 0x05, 0x12, 0x05, 0x8a, 0xc2, 0x98, 0xd0, 0xe0, 0xd0} },
+{ 0x0580,      16,     {0x85, 0xd0, 0x84, 0xd0, 0x83, 0xd0, 0x82, 0xd0, 0x86, 0x32, 0x75, 0x83, 0x11, 0x85, 0x30, 0x82} },
+{ 0x0590,      16,     {0x05, 0x82, 0xe5, 0x99, 0xf0, 0xe5, 0x82, 0xb5, 0x31, 0x01, 0x22, 0x05, 0x30, 0xb1, 0xa0, 0x22} },
+{ 0x05a0,      16,     {0x90, 0x7f, 0xb8, 0xe0, 0x20, 0xe1, 0x38, 0x20, 0x01, 0x36, 0xe5, 0x30, 0xb5, 0x31, 0x01, 0x22} },
+{ 0x05b0,      16,     {0xe4, 0xf5, 0x86, 0x75, 0x83, 0x11, 0x05, 0x86, 0x90, 0x7e, 0x00, 0xf0, 0xa3, 0x05, 0x86, 0x79} },
+{ 0x05c0,      16,     {0x01, 0xe5, 0x30, 0xb5, 0x31, 0x02, 0x80, 0x10, 0x05, 0x31, 0x85, 0x31, 0x82, 0xe0, 0x05, 0x86} },
+{ 0x05d0,      16,     {0xf0, 0xa3, 0x05, 0x86, 0x09, 0xb9, 0x40, 0xe9, 0x90, 0x7f, 0xb9, 0xe9, 0x60, 0x01, 0xf0, 0x22} },
+{ 0x05e0,      16,     {0xc2, 0x01, 0xe4, 0xf5, 0x86, 0x90, 0x7e, 0x00, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x02, 0xf0, 0x90} },
+{ 0x05f0,      16,     {0x7f, 0xb9, 0xf0, 0x22, 0xc2, 0x99, 0xf5, 0x99, 0x30, 0x99, 0xfd, 0xc2, 0x99, 0x22, 0xe5, 0x5e} },
+{ 0x0600,      16,     {0xf6, 0x3c, 0xfd, 0x8f, 0xfe, 0xc8, 0xff, 0x64, 0xff, 0xb2, 0xff, 0xd9, 0xff, 0xed, 0xff, 0xf3} },
+{ 0x0610,      16,     {0xff, 0xfa, 0x12, 0x01, 0x00, 0x01, 0xff, 0xff, 0xff, 0x40, 0xcd, 0x06, 0x04, 0x01, 0x89, 0xab} },
+{ 0x0620,      16,     {0x01, 0x02, 0x03, 0x01, 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x00, 0x80, 0x32, 0x09, 0x04, 0x00} },
+{ 0x0630,      16,     {0x00, 0x02, 0xff, 0xff, 0xff, 0x00, 0x07, 0x05, 0x82, 0x03, 0x40, 0x00, 0x01, 0x07, 0x05, 0x02} },
+{ 0x0640,      16,     {0x02, 0x40, 0x00, 0x00, 0x06, 0x4c, 0x06, 0x50, 0x06, 0x72, 0x06, 0xa0, 0x04, 0x03, 0x00, 0x00} },
+{ 0x0650,      16,     {0x22, 0x03, 0x41, 0x00, 0x43, 0x00, 0x4d, 0x00, 0x45, 0x00, 0x20, 0x00, 0x75, 0x00, 0x73, 0x00} },
+{ 0x0660,      16,     {0x62, 0x00, 0x20, 0x00, 0x77, 0x00, 0x69, 0x00, 0x64, 0x00, 0x67, 0x00, 0x65, 0x00, 0x74, 0x00} },
+{ 0x0670,      16,     {0x73, 0x00, 0x2e, 0x03, 0x41, 0x00, 0x43, 0x00, 0x4d, 0x00, 0x45, 0x00, 0x20, 0x00, 0x55, 0x00} },
+{ 0x0680,      16,     {0x53, 0x00, 0x42, 0x00, 0x20, 0x00, 0x73, 0x00, 0x65, 0x00, 0x72, 0x00, 0x69, 0x00, 0x61, 0x00} },
+{ 0x0690,      16,     {0x6c, 0x00, 0x20, 0x00, 0x77, 0x00, 0x69, 0x00, 0x64, 0x00, 0x67, 0x00, 0x65, 0x00, 0x74, 0x00} },
+{ 0x06a0,      6,      {0x06, 0x03, 0x34, 0x00, 0x37, 0x00} },
+{ 0xffff,      0,      {0x00} }
+};
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
new file mode 100644 (file)
index 0000000..0a534b1
--- /dev/null
@@ -0,0 +1,2551 @@
+/*
+ * USB Serial Converter driver
+ *
+ *     (C) Copyright (C) 1999, 2000
+ *         Greg Kroah-Hartman (greg@kroah.com)
+ *
+ *     This program is free software; you can redistribute it and/or modify
+ *     it under the terms of the GNU General Public License as published by
+ *     the Free Software Foundation; either version 2 of the License, or
+ *     (at your option) any later version.
+ *
+ * This driver was originally based on the ACM driver by Armin Fuerst (which was 
+ * based on a driver by Brad Keryan)
+ *
+ * See Documentation/usb/usb-serial.txt for more information on using this driver
+ * 
+ * (03/06/2000) gkh
+ *     Added the keyspan pda code from Brian Warner <warner@lothar.com>
+ *     Moved a bunch of the port specific stuff into its own structure. This
+ *     is in anticipation of the true multiport devices (there's a bug if you
+ *     try to access more than one port of any multiport device right now)
+ *
+ * (02/21/2000) gkh
+ *     Made it so that any serial devices only have to specify which functions
+ *     they want to overload from the generic function calls (great, 
+ *     inheritance in C, in a driver, just what I wanted...)
+ *     Added support for set_termios and ioctl function calls. No drivers take
+ *     advantage of this yet.
+ *     Removed the #ifdef MODULE, now there is no module specific code.
+ *     Cleaned up a few comments in usb-serial.h that were wrong (thanks again
+ *     to Miles Lott).
+ *     Small fix to get_free_serial.
+ *
+ * (02/14/2000) gkh
+ *     Removed the Belkin and Peracom functionality from the driver due to
+ *     the lack of support from the vendor, and me not wanting people to 
+ *     accidenatly buy the device, expecting it to work with Linux.
+ *     Added read_bulk_callback and write_bulk_callback to the type structure
+ *     for the needs of the FTDI and WhiteHEAT driver.
+ *     Changed all reverences to FTDI to FTDI_SIO at the request of Bill
+ *     Ryder.
+ *     Changed the output urb size back to the max endpoint size to make
+ *     the ftdi_sio driver have it easier, and due to the fact that it didn't
+ *     really increase the speed any.
+ *
+ * (02/11/2000) gkh
+ *     Added VISOR_FUNCTION_CONSOLE to the visor startup function. This was a
+ *     patch from Miles Lott (milos@insync.net).
+ *     Fixed bug with not restoring the minor range that a device grabs, if
+ *     the startup function fails (thanks Miles for finding this).
+ *
+ * (02/05/2000) gkh
+ *     Added initial framework for the Keyspan PDA serial converter so that
+ *     Brian Warner has a place to put his code.
+ *     Made the ezusb specific functions generic enough that different
+ *     devices can use them (whiteheat and keyspan_pda both need them).
+ *     Split out a whole bunch of structure and other stuff to a seperate
+ *     usb-serial.h file.
+ *     Made the Visor connection messages a little more understandable, now
+ *     that Miles Lott (milos@insync.net) has gotten the Generic channel to
+ *     work. Also made them always show up in the log file.
+ * 
+ * (01/25/2000) gkh
+ *     Added initial framework for FTDI serial converter so that Bill Ryder
+ *     has a place to put his code.
+ *     Added the vendor specific info from Handspring. Now we can print out
+ *     informational debug messages as well as understand what is happening.
+ *
+ * (01/23/2000) gkh
+ *     Fixed problem of crash when trying to open a port that didn't have a
+ *     device assigned to it. Made the minor node finding a little smarter,
+ *     now it looks to find a continous space for the new device.
+ *
+ * (01/21/2000) gkh
+ *     Fixed bug in visor_startup with patch from Miles Lott (milos@insync.net)
+ *     Fixed get_serial_by_minor which was all messed up for multi port 
+ *     devices. Fixed multi port problem for generic devices. Now the number
+ *     of ports is determined by the number of bulk out endpoints for the
+ *     generic device.
+ *
+ * (01/19/2000) gkh
+ *     Removed lots of cruft that was around from the old (pre urb) driver 
+ *     interface.
+ *     Made the serial_table dynamic. This should save lots of memory when
+ *     the number of minor nodes goes up to 256.
+ *     Added initial support for devices that have more than one port. 
+ *     Added more debugging comments for the Visor, and added a needed 
+ *     set_configuration call.
+ *
+ * (01/17/2000) gkh
+ *     Fixed the WhiteHEAT firmware (my processing tool had a bug)
+ *     and added new debug loader firmware for it.
+ *     Removed the put_char function as it isn't really needed.
+ *     Added visor startup commands as found by the Win98 dump.
+ * 
+ * (01/13/2000) gkh
+ *     Fixed the vendor id for the generic driver to the one I meant it to be.
+ *
+ * (01/12/2000) gkh
+ *     Forget the version numbering...that's pretty useless...
+ *     Made the driver able to be compiled so that the user can select which
+ *     converter they want to use. This allows people who only want the Visor
+ *     support to not pay the memory size price of the WhiteHEAT.
+ *     Fixed bug where the generic driver (idVendor=0000 and idProduct=0000)
+ *     grabbed the root hub. Not good.
+ * 
+ * version 0.4.0 (01/10/2000) gkh
+ *     Added whiteheat.h containing the firmware for the ConnectTech WhiteHEAT
+ *     device. Added startup function to allow firmware to be downloaded to
+ *     a device if it needs to be.
+ *     Added firmware download logic to the WhiteHEAT device.
+ *     Started to add #defines to split up the different drivers for potential
+ *     configuration option.
+ *     
+ * version 0.3.1 (12/30/99) gkh
+ *      Fixed problems with urb for bulk out.
+ *      Added initial support for multiple sets of endpoints. This enables
+ *      the Handspring Visor to be attached successfully. Only the first
+ *      bulk in / bulk out endpoint pair is being used right now.
+ *
+ * version 0.3.0 (12/27/99) gkh
+ *     Added initial support for the Handspring Visor based on a patch from
+ *     Miles Lott (milos@sneety.insync.net)
+ *     Cleaned up the code a bunch and converted over to using urbs only.
+ *
+ * version 0.2.3 (12/21/99) gkh
+ *     Added initial support for the Connect Tech WhiteHEAT converter.
+ *     Incremented the number of ports in expectation of getting the
+ *     WhiteHEAT to work properly (4 ports per connection).
+ *     Added notification on insertion and removal of what port the
+ *     device is/was connected to (and what kind of device it was).
+ *
+ * version 0.2.2 (12/16/99) gkh
+ *     Changed major number to the new allocated number. We're legal now!
+ *
+ * version 0.2.1 (12/14/99) gkh
+ *     Fixed bug that happens when device node is opened when there isn't a
+ *     device attached to it. Thanks to marek@webdesign.no for noticing this.
+ *
+ * version 0.2.0 (11/10/99) gkh
+ *     Split up internals to make it easier to add different types of serial 
+ *     converters to the code.
+ *     Added a "generic" driver that gets it's vendor and product id
+ *     from when the module is loaded. Thanks to David E. Nelson (dnelson@jump.net)
+ *     for the idea and sample code (from the usb scanner driver.)
+ *     Cleared up any licensing questions by releasing it under the GNU GPL.
+ *
+ * version 0.1.2 (10/25/99) gkh
+ *     Fixed bug in detecting device.
+ *
+ * version 0.1.1 (10/05/99) gkh
+ *     Changed the major number to not conflict with anything else.
+ *
+ * version 0.1 (09/28/99) gkh
+ *     Can recognize the two different devices and start up a read from
+ *     device when asked to. Writes also work. No control signals yet, this
+ *     all is vendor specific data (i.e. no spec), also no control for
+ *     different baud rates or other bit settings.
+ *     Currently we are using the same devid as the acm driver. This needs
+ *     to change.
+ * 
+ */
+
+#include <linux/config.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+#include <linux/signal.h>
+#include <linux/errno.h>
+#include <linux/poll.h>
+#include <linux/init.h>
+#include <linux/malloc.h>
+#include <linux/fcntl.h>
+#include <linux/tty_driver.h>
+#include <linux/tty_flip.h>
+#include <linux/tty.h>
+#include <linux/module.h>
+#include <linux/spinlock.h>
+
+#define DEBUG
+
+#include "../usb.h"
+
+#ifdef CONFIG_USB_SERIAL_WHITEHEAT
+#include "whiteheat.h"         /* firmware for the ConnectTech WhiteHEAT device */
+#endif
+
+#ifdef CONFIG_USB_SERIAL_KEYSPAN_PDA
+struct ezusb_hex_record {
+       __u16 address;
+       __u8 data_size;
+       __u8 data[16];
+};
+#include "keyspan_pda_fw.h"
+#endif
+
+#include "usb-serial.h"
+
+/* parity check flag */
+#define RELEVANT_IFLAG(iflag)  (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
+
+/* local function prototypes */
+static int  serial_open (struct tty_struct *tty, struct file * filp);
+static void serial_close (struct tty_struct *tty, struct file * filp);
+static int  serial_write (struct tty_struct * tty, int from_user, const unsigned char *buf, int count);
+static int  serial_write_room (struct tty_struct *tty);
+static int  serial_chars_in_buffer (struct tty_struct *tty);
+static void serial_throttle (struct tty_struct * tty);
+static void serial_unthrottle (struct tty_struct * tty);
+static int  serial_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg);
+static void serial_set_termios (struct tty_struct *tty, struct termios * old);
+
+static void * usb_serial_probe(struct usb_device *dev, unsigned int ifnum);
+static void usb_serial_disconnect(struct usb_device *dev, void *ptr);
+
+static struct usb_driver usb_serial_driver = {
+       "serial",
+       usb_serial_probe,
+       usb_serial_disconnect,
+       { NULL, NULL }
+};
+
+static int                     serial_refcount;
+static struct tty_struct *     serial_tty[SERIAL_TTY_MINORS];
+static struct termios *                serial_termios[SERIAL_TTY_MINORS];
+static struct termios *                serial_termios_locked[SERIAL_TTY_MINORS];
+static struct usb_serial       *serial_table[SERIAL_TTY_MINORS] = {NULL, };
+
+
+
+static struct usb_serial *get_serial_by_minor (int minor)
+{
+       dbg("get_serial_by_minor %d", minor);
+
+       return serial_table[minor];
+}
+
+
+static struct usb_serial *get_free_serial (int num_ports, int *minor)
+{
+       struct usb_serial *serial = NULL;
+       int i, j;
+       int good_spot;
+
+       dbg("get_free_serial %d", num_ports);
+
+       *minor = 0;
+       for (i = 0; i < SERIAL_TTY_MINORS; ++i) {
+               if (serial_table[i])
+                       continue;
+
+               good_spot = 1;
+               for (j = 1; j <= num_ports-1; ++j)
+                       if (serial_table[i+j])
+                               good_spot = 0;
+               if (good_spot == 0)
+                       continue;
+                       
+               if (!(serial = kmalloc(sizeof(struct usb_serial), GFP_KERNEL))) {
+                       err("Out of memory");
+                       return NULL;
+               }
+               memset(serial, 0, sizeof(struct usb_serial));
+               serial_table[i] = serial;
+               *minor = i;
+               dbg("minor base = %d", *minor);
+               for (i = *minor+1; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i)
+                       serial_table[i] = serial;
+               return serial;
+               }
+       return NULL;
+}
+
+
+static void return_serial (struct usb_serial *serial)
+{
+       int i;
+
+       dbg("return_serial");
+
+       if (serial == NULL)
+               return;
+
+       for (i = 0; i < serial->num_ports; ++i) {
+               serial_table[serial->minor + i] = NULL;
+       }
+
+       return;
+}
+
+
+#ifdef USES_EZUSB_FUNCTIONS
+/* EZ-USB Control and Status Register.  Bit 0 controls 8051 reset */
+#define CPUCS_REG    0x7F92
+
+static int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest)
+{
+       int result;
+       unsigned char *transfer_buffer =  kmalloc (length, GFP_KERNEL);
+
+//     dbg("ezusb_writememory %x, %d", address, length);
+
+       if (!transfer_buffer) {
+               err("ezusb_writememory: kmalloc(%d) failed.", length);
+               return -ENOMEM;
+       }
+       memcpy (transfer_buffer, data, length);
+       result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), bRequest, 0x40, address, 0, transfer_buffer, length, 300);
+       kfree (transfer_buffer);
+       return result;
+}
+
+
+static int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit)
+{
+       int     response;
+       dbg("ezusb_set_reset: %d", reset_bit);
+       response = ezusb_writememory (serial, CPUCS_REG, &reset_bit, 1, 0xa0);
+       if (response < 0) {
+               err("ezusb_set_reset %d failed", reset_bit);
+       }
+       return response;
+}
+
+#endif /* USES_EZUSB_FUNCTIONS */
+
+
+/*****************************************************************************
+ * Driver tty interface functions
+ *****************************************************************************/
+static int serial_open (struct tty_struct *tty, struct file * filp)
+{
+       struct usb_serial *serial;
+       
+       dbg("serial_open");
+
+       /* initialize the pointer incase something fails */
+       tty->driver_data = NULL;
+
+       /* get the serial object associated with this tty pointer */
+       serial = get_serial_by_minor (MINOR(tty->device));
+
+       /* do some sanity checking that we really have a device present */
+       if (!serial) {
+               dbg("serial == NULL!");
+               return (-ENODEV);
+       }
+       if (!serial->type) {
+               dbg("serial->type == NULL!");
+               return (-ENODEV);
+       }
+
+       /* make the tty driver remember our serial object, and us it */
+       tty->driver_data = serial;
+       serial->tty = tty;
+        
+       /* pass on to the driver specific version of this function if it is available */
+       if (serial->type->open) {
+               return (serial->type->open(tty, filp));
+       } else {
+               return (generic_serial_open(tty, filp));
+       }
+}
+
+
+static void serial_close(struct tty_struct *tty, struct file * filp)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int port;       
+
+       dbg("serial_close");
+
+       if (!serial) {
+               dbg("serial == NULL!");
+               return;
+       }
+
+       port = MINOR(tty->device) - serial->minor;
+
+       dbg("serial_close port %d", port);
+       
+       /* do some sanity checking that we really have a device present */
+       if (!serial->type) {
+               dbg("serial->type == NULL!");
+               return;
+       }
+       if (!serial->port[port].active) {
+               dbg ("device not opened");
+               return;
+       }
+
+       /* pass on to the driver specific version of this function if it is available */
+       if (serial->type->close) {
+               serial->type->close(tty, filp);
+       } else {
+               generic_serial_close(tty, filp);
+       }
+}      
+
+
+static int serial_write (struct tty_struct * tty, int from_user, const unsigned char *buf, int count)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int port = MINOR(tty->device) - serial->minor;
+       
+       dbg("serial_write port %d, %d byte(s)", port, count);
+
+       /* do some sanity checking that we really have a device present */
+       if (!serial) {
+               dbg("serial == NULL!");
+               return (-ENODEV);
+       }
+       if (!serial->type) {
+               dbg("serial->type == NULL!");
+               return (-ENODEV);
+       }
+       if (!serial->port[port].active) {
+               dbg ("device not opened");
+               return (-EINVAL);
+       }
+       
+       /* pass on to the driver specific version of this function if it is available */
+       if (serial->type->write) {
+               return (serial->type->write(tty, from_user, buf, count));
+       } else {
+               return (generic_serial_write(tty, from_user, buf, count));
+       }
+}
+
+
+static int serial_write_room (struct tty_struct *tty) 
+{
+       struct usb_serial *serial = (struct usb_serial *)tty->driver_data; 
+       int port = MINOR(tty->device) - serial->minor;
+
+       dbg("serial_write_room port %d", port);
+       
+       /* do some sanity checking that we really have a device present */
+       if (!serial) {
+               dbg("serial == NULL!");
+               return (-ENODEV);
+       }
+       if (!serial->type) {
+               dbg("serial->type == NULL!");
+               return (-ENODEV);
+       }
+       if (!serial->port[port].active) {
+               dbg ("device not open");
+               return (-EINVAL);
+       }
+       
+       /* pass on to the driver specific version of this function if it is available */
+       if (serial->type->write_room) {
+               return (serial->type->write_room(tty));
+       } else {
+               return (generic_write_room(tty));
+       }
+}
+
+
+static int serial_chars_in_buffer (struct tty_struct *tty) 
+{
+       struct usb_serial *serial = (struct usb_serial *)tty->driver_data; 
+       int port = MINOR(tty->device) - serial->minor;
+
+       dbg("serial_chars_in_buffer port %d", port);
+       
+       /* do some sanity checking that we really have a device present */
+       if (!serial) {
+               dbg("serial == NULL!");
+               return (-ENODEV);
+       }
+       if (!serial->type) {
+               dbg("serial->type == NULL!");
+               return (-ENODEV);
+       }
+       if (!serial->port[port].active) {
+               dbg ("device not open");
+               return (-EINVAL);
+       }
+       
+       /* pass on to the driver specific version of this function if it is available */
+       if (serial->type->chars_in_buffer) {
+               return (serial->type->chars_in_buffer(tty));
+       } else {
+               return (generic_chars_in_buffer(tty));
+       }
+}
+
+
+static void serial_throttle (struct tty_struct * tty)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int port = MINOR(tty->device) - serial->minor;
+
+       dbg("serial_throttle port %d", port);
+       
+       /* do some sanity checking that we really have a device present */
+       if (!serial) {
+               dbg("serial == NULL!");
+               return;
+       }
+       if (!serial->type) {
+               dbg("serial->type == NULL!");
+               return;
+       }
+       if (!serial->port[port].active) {
+               dbg ("device not open");
+               return;
+       }
+
+       /* pass on to the driver specific version of this function */
+       if (serial->type->throttle) {
+               serial->type->throttle(tty);
+       } else {
+               generic_throttle(tty);
+       }
+
+       return;
+}
+
+
+static void serial_unthrottle (struct tty_struct * tty)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int port = MINOR(tty->device) - serial->minor;
+
+       dbg("serial_unthrottle port %d", port);
+       
+       /* do some sanity checking that we really have a device present */
+       if (!serial) {
+               dbg("serial == NULL!");
+               return;
+       }
+       if (!serial->type) {
+               dbg("serial->type == NULL!");
+               return;
+       }
+       if (!serial->port[port].active) {
+               dbg ("device not open");
+               return;
+       }
+
+       /* pass on to the driver specific version of this function */
+       if (serial->type->unthrottle) {
+               serial->type->unthrottle(tty);
+       } else {
+               generic_unthrottle(tty);
+       }
+
+       return;
+}
+
+
+static int serial_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int port;       
+
+       dbg("serial_ioctl");
+
+       if (!serial) {
+               dbg("serial == NULL!");
+               return -ENODEV;
+       }
+
+       port = MINOR(tty->device) - serial->minor;
+
+       dbg("serial_ioctl port %d", port);
+       
+       /* do some sanity checking that we really have a device present */
+       if (!serial->type) {
+               dbg("serial->type == NULL!");
+               return -ENODEV;
+       }
+       if (!serial->port[port].active) {
+               dbg ("device not open");
+               return -ENODEV;
+       }
+
+       /* pass on to the driver specific version of this function if it is available */
+       if (serial->type->ioctl) {
+               return (serial->type->ioctl(tty, file, cmd, arg));
+       } else {
+               return (generic_ioctl (tty, file, cmd, arg));
+       }
+}
+
+
+static void serial_set_termios (struct tty_struct *tty, struct termios * old)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int port;       
+
+       dbg("serial_set_termios");
+
+       if (!serial) {
+               dbg("serial == NULL!");
+               return;
+       }
+
+       port = MINOR(tty->device) - serial->minor;
+
+       dbg("serial_set_termios port %d", port);
+       
+       /* do some sanity checking that we really have a device present */
+       if (!serial->type) {
+               dbg("serial->type == NULL!");
+               return;
+       }
+       if (!serial->port[port].active) {
+               dbg ("device not open");
+               return;
+       }
+
+       /* pass on to the driver specific version of this function if it is available */
+       if (serial->type->set_termios) {
+               serial->type->set_termios(tty, old);
+       } else {
+               generic_set_termios (tty, old);
+       }
+       
+       return;
+}
+
+
+static void serial_break (struct tty_struct *tty, int break_state)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int port;       
+
+       if (!serial) {
+               dbg("serial == NULL!");
+               return;
+       }
+
+       port = MINOR(tty->device) - serial->minor;
+
+       dbg("serial_break port %d", port);
+       
+       /* do some sanity checking that we really have a device present */
+       if (!serial->type) {
+               dbg("serial->type == NULL!");
+               return;
+       }
+       if (!serial->port[port].active) {
+               dbg ("device not open");
+               return;
+       }
+
+       /* pass on to the driver specific version of this function if it is
+           available */
+       if (serial->type->break_ctl) {
+               serial->type->break_ctl(tty, break_state);
+       }
+}
+
+
+#ifdef CONFIG_USB_SERIAL_WHITEHEAT
+/*****************************************************************************
+ * Connect Tech's White Heat specific driver functions
+ *****************************************************************************/
+static int whiteheat_serial_open (struct tty_struct *tty, struct file *filp)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int portNumber = MINOR(tty->device) - serial->minor;
+       struct usb_serial_port *port = &serial->port[portNumber];
+
+       dbg("whiteheat_serial_open port %d", portNumber);
+
+       if (port->active) {
+               dbg ("device already open");
+               return -EINVAL;
+       }
+       port->active = 1;
+       /*Start reading from the device*/
+       if (usb_submit_urb(&port->read_urb))
+               dbg("usb_submit_urb(read bulk) failed");
+
+       /* Need to do device specific setup here (control lines, baud rate, etc.) */
+       /* FIXME!!! */
+
+       return (0);
+}
+
+
+static void whiteheat_serial_close(struct tty_struct *tty, struct file * filp)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int portNumber = MINOR(tty->device) - serial->minor;
+       struct usb_serial_port *port = &serial->port[portNumber];
+
+       dbg("whiteheat_serial_close port %d", portNumber);
+       
+       /* Need to change the control lines here */
+       /* FIXME */
+       
+       /* shutdown our bulk reads and writes */
+       usb_unlink_urb (&port->write_urb);
+       usb_unlink_urb (&port->read_urb);
+       port->active = 0;
+}
+
+
+static void whiteheat_set_termios (struct tty_struct *tty, struct termios *old_termios)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int port = MINOR(tty->device) - serial->minor;
+       unsigned int cflag = tty->termios->c_cflag;
+
+       dbg("whiteheat_set_termios port %d", port);
+
+       /* check that they really want us to change something */
+       if (old_termios) {
+               if ((cflag == old_termios->c_cflag) &&
+                   (RELEVANT_IFLAG(tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
+                       dbg("nothing to change...");
+                       return;
+               }
+       }
+
+       /* do the parsing of the cflag to see what to set the line to */
+       /* FIXME!! */
+
+       return;
+}
+
+static void whiteheat_throttle (struct tty_struct * tty)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int port = MINOR(tty->device) - serial->minor;
+
+       dbg("whiteheat_throttle port %d", port);
+
+       /* Change the control signals */
+       /* FIXME!!! */
+
+       return;
+}
+
+
+static void whiteheat_unthrottle (struct tty_struct * tty)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int port = MINOR(tty->device) - serial->minor;
+
+       dbg("whiteheat_unthrottle port %d", port);
+
+       /* Change the control signals */
+       /* FIXME!!! */
+
+       return;
+}
+
+
+/* steps to download the firmware to the WhiteHEAT device:
+ - hold the reset (by writing to the reset bit of the CPUCS register)
+ - download the VEND_AX.HEX file to the chip using VENDOR_REQUEST-ANCHOR_LOAD
+ - release the reset (by writing to the CPUCS register)
+ - download the WH.HEX file for all addresses greater than 0x1b3f using
+   VENDOR_REQUEST-ANCHOR_EXTERNAL_RAM_LOAD
+ - hold the reset
+ - download the WH.HEX file for all addresses less than 0x1b40 using
+   VENDOR_REQUEST_ANCHOR_LOAD
+ - release the reset
+ - device renumerated itself and comes up as new device id with all
+   firmware download completed.
+*/
+static int  whiteheat_startup (struct usb_serial *serial)
+{
+       int response;
+       const struct whiteheat_hex_record *record;
+       
+       dbg("whiteheat_startup");
+       
+       response = ezusb_set_reset (serial, 1);
+
+       record = &whiteheat_loader[0];
+       while (record->address != 0xffff) {
+               response = ezusb_writememory (serial, record->address, 
+                               (unsigned char *)record->data, record->data_size, 0xa0);
+               if (response < 0) {
+                       err("ezusb_writememory failed for loader (%d %04X %p %d)", 
+                               response, record->address, record->data, record->data_size);
+                       break;
+               }
+               ++record;
+       }
+
+       response = ezusb_set_reset (serial, 0);
+
+       record = &whiteheat_firmware[0];
+       while (record->address < 0x1b40) {
+               ++record;
+       }
+       while (record->address != 0xffff) {
+               response = ezusb_writememory (serial, record->address, 
+                               (unsigned char *)record->data, record->data_size, 0xa0);
+               if (response < 0) {
+                       err("ezusb_writememory failed for first firmware step (%d %04X %p %d)", 
+                               response, record->address, record->data, record->data_size);
+                       break;
+               }
+               ++record;
+       }
+       
+       response = ezusb_set_reset (serial, 1);
+
+       record = &whiteheat_firmware[0];
+       while (record->address < 0x1b40) {
+               response = ezusb_writememory (serial, record->address, 
+                               (unsigned char *)record->data, record->data_size, 0xa0);
+               if (response < 0) {
+                       err("ezusb_writememory failed for second firmware step (%d %04X %p %d)", 
+                               response, record->address, record->data, record->data_size);
+                       break;
+               }
+               ++record;
+       }
+
+       response = ezusb_set_reset (serial, 0);
+
+       /* we want this device to fail to have a driver assigned to it. */
+       return (1);
+}
+#endif /* CONFIG_USB_SERIAL_WHITEHEAT */
+
+
+#ifdef CONFIG_USB_SERIAL_VISOR
+/******************************************************************************
+ * Handspring Visor specific driver functions
+ ******************************************************************************/
+static int visor_serial_open (struct tty_struct *tty, struct file *filp)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data;
+       int portNumber = MINOR(tty->device) - serial->minor;
+       struct usb_serial_port *port = &serial->port[portNumber];
+
+       dbg("visor_serial_open port %d", portNumber);
+
+       if (port->active) {
+               dbg ("device already open");
+               return -EINVAL;
+       }
+
+       port->active = 1;
+
+       /*Start reading from the device*/
+       if (usb_submit_urb(&port->read_urb))
+               dbg("usb_submit_urb(read bulk) failed");
+
+       return (0);
+}
+
+static void visor_serial_close(struct tty_struct *tty, struct file * filp)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data;
+       int portNumber = MINOR(tty->device) - serial->minor;
+       struct usb_serial_port *port = &serial->port[portNumber];
+       unsigned char *transfer_buffer =  kmalloc (0x12, GFP_KERNEL);
+       
+       dbg("visor_serial_close port %d", portNumber);
+                        
+       if (!transfer_buffer) {
+               err("visor_serial_close: kmalloc(%d) failed.", 0x12);
+       } else {
+               /* send a shutdown message to the device */
+               usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_CLOSE_NOTIFICATION,
+                               0xc2, 0x0000, 0x0000, transfer_buffer, 0x12, 300);
+       }
+
+       /* shutdown our bulk reads and writes */
+       usb_unlink_urb (&port->write_urb);
+       usb_unlink_urb (&port->read_urb);
+       port->active = 0;
+}
+
+
+static void visor_throttle (struct tty_struct * tty)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data;
+       int port = MINOR(tty->device) - serial->minor;
+
+       dbg("visor_throttle port %d", port);
+
+       usb_unlink_urb (&serial->port[port].read_urb);
+
+       return;
+}
+
+
+static void visor_unthrottle (struct tty_struct * tty)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data;
+       int port = MINOR(tty->device) - serial->minor;
+
+       dbg("visor_unthrottle port %d", port);
+
+       if (usb_unlink_urb (&serial->port[port].read_urb))
+               dbg("usb_submit_urb(read bulk) failed");
+
+       return;
+}
+
+
+static int  visor_startup (struct usb_serial *serial)
+{
+       int response;
+       int i;
+       unsigned char *transfer_buffer =  kmalloc (256, GFP_KERNEL);
+
+       if (!transfer_buffer) {
+               err("visor_startup: kmalloc(%d) failed.", 256);
+               return -ENOMEM;
+       }
+
+       dbg("visor_startup");
+
+       dbg("visor_setup: Set config to 1");
+       usb_set_configuration (serial->dev, 1);
+
+       /* send a get connection info request */
+       response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_GET_CONNECTION_INFORMATION,
+                                       0xc2, 0x0000, 0x0000, transfer_buffer, 0x12, 300);
+       if (response < 0) {
+               err("visor_startup: error getting connection information");
+       } else {
+               struct visor_connection_info *connection_info = (struct visor_connection_info *)transfer_buffer;
+               char *string;
+               info("%s: Number of ports: %d", serial->type->name, connection_info->num_ports);
+               for (i = 0; i < connection_info->num_ports; ++i) {
+                       switch (connection_info->connections[i].port_function_id) {
+                               case VISOR_FUNCTION_GENERIC:
+                                       string = "Generic";
+                                       break;
+                               case VISOR_FUNCTION_DEBUGGER:
+                                       string = "Debugger";
+                                       break;
+                               case VISOR_FUNCTION_HOTSYNC:
+                                       string = "HotSync";
+                                       break;
+                               case VISOR_FUNCTION_CONSOLE:
+                                       string = "Console";
+                                       break;
+                               case VISOR_FUNCTION_REMOTE_FILE_SYS:
+                                       string = "Remote File System";
+                                       break;
+                               default:
+                                       string = "unknown";
+                                       break;  
+                       }
+                       info("%s: port %d, is for %s use and is bound to ttyUSB%d", serial->type->name, connection_info->connections[i].port, string, serial->minor + i);
+               }
+       }
+
+       /* ask for the number of bytes available, but ignore the response as it is broken */
+       response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_REQUEST_BYTES_AVAILABLE,
+                                       0xc2, 0x0000, 0x0005, transfer_buffer, 0x02, 300);
+       if (response < 0) {
+               err("visor_startup: error getting bytes available request");
+       }
+
+       kfree (transfer_buffer);
+
+       /* continue on with initialization */
+       return (0);
+}
+
+
+#endif /* CONFIG_USB_SERIAL_VISOR*/
+
+
+#ifdef CONFIG_USB_SERIAL_FTDI_SIO
+/******************************************************************************
+ * FTDI SIO Serial Converter specific driver functions
+ ******************************************************************************/
+
+/* Bill Ryder - bryder@sgi.com - wrote the FTDI_SIO implementation */
+/* Thanx to FTDI for so kindly providing details of the protocol required */
+/*   to talk to the device */
+
+#include "ftdi_sio.h"
+
+static int  ftdi_sio_serial_open (struct tty_struct *tty, struct file *filp)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int portNumber = MINOR(tty->device) - serial->minor;
+       struct usb_serial_port *port = &serial->port[portNumber];
+       char buf[1]; /* Needed for the usb_control_msg I think */
+
+       dbg("ftdi_sio_serial_open port %d", portNumber);
+
+       if (port->active) {
+               dbg ("device already open");
+               return -EINVAL;
+       }
+       port->active = 1;
+
+       usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                       FTDI_SIO_RESET_REQUEST, FTDI_SIO_RESET_REQUEST_TYPE, 
+                       FTDI_SIO_RESET_SIO, 
+                       0, buf, 0, HZ * 5);
+
+       /* FIXME - Should I really purge the buffers? */
+       usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                       FTDI_SIO_RESET_REQUEST, FTDI_SIO_RESET_REQUEST_TYPE, 
+                       FTDI_SIO_RESET_PURGE_RX, 
+                       0, buf, 0, HZ * 5);
+
+       usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                       FTDI_SIO_RESET_REQUEST, FTDI_SIO_RESET_REQUEST_TYPE, 
+                       FTDI_SIO_RESET_PURGE_TX, 
+                       0, buf, 0, HZ * 5);     
+
+
+       /* As per usb_serial_init s/be CS8, B9600, 1 STOP BIT */
+       if ( usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                            FTDI_SIO_SET_BAUDRATE_REQUEST,
+                            FTDI_SIO_SET_BAUDRATE_REQUEST_TYPE,
+                            ftdi_sio_b9600, 0, 
+                            buf, 0, HZ * 5) < 0){
+               dbg("Error from baudrate urb");
+               return(-EINVAL);
+       }
+
+       if ( usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                            FTDI_SIO_SET_DATA_REQUEST, 
+                            FTDI_SIO_SET_DATA_REQUEST_TYPE,
+                            8 | FTDI_SIO_SET_DATA_PARITY_NONE | 
+                            FTDI_SIO_SET_DATA_STOP_BITS_1, 0,
+                            buf, 0, HZ * 5) < 0){
+               dbg("Error from cs8/noparity/1 stopbit urb");
+               return(-EINVAL);
+       }
+
+       /* Disable flow control */
+       if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                           FTDI_SIO_SET_FLOW_CTRL_REQUEST, 
+                           FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
+                           0, 0, 
+                           buf, 0, HZ * 5) < 0) {
+               dbg("error from flowcontrol urb");
+               return(-EINVAL);
+       }           
+
+       /* Turn on RTS and DTR since we are not flow controlling*/
+       /* FIXME - check for correct behaviour clocal vs non clocal */
+       /* FIXME - might be able to do both simultaneously */
+       if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                           FTDI_SIO_SET_MODEM_CTRL_REQUEST, 
+                           FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE,
+                           (unsigned)FTDI_SIO_SET_DTR_HIGH, 0, 
+                           buf, 0, HZ * 5) < 0) {
+               dbg("Error from DTR HIGH urb");
+       }
+       if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                           FTDI_SIO_SET_MODEM_CTRL_REQUEST, 
+                           FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE,
+                           (unsigned)FTDI_SIO_SET_RTS_HIGH, 0, 
+                           buf, 0, HZ * 5) < 0) {
+               dbg("Error from RTS HIGH urb");
+       }
+       
+       /*Start reading from the device*/
+       if (usb_submit_urb(&port->read_urb))
+               dbg("usb_submit_urb(read bulk) failed");
+
+       return (0);
+}
+
+
+static void ftdi_sio_serial_close (struct tty_struct *tty, struct file *filp)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int portNumber = MINOR(tty->device) - serial->minor;
+       struct usb_serial_port *port = &serial->port[portNumber];
+       char buf[1];
+
+       dbg("ftdi_sio_serial_close port %d", portNumber);
+       
+       /* FIXME - might be able to do both simultaneously */
+       if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                           FTDI_SIO_SET_MODEM_CTRL_REQUEST, 
+                           FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE,
+                           (unsigned)FTDI_SIO_SET_DTR_LOW, 0, 
+                           buf, 0, HZ * 5) < 0) {
+               dbg("Error from DTR LOW urb");
+       }
+       if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                           FTDI_SIO_SET_MODEM_CTRL_REQUEST, 
+                           FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE,
+                           (unsigned)FTDI_SIO_SET_RTS_LOW, 0, 
+                           buf, 0, HZ * 5) < 0) {
+               dbg("Error from RTS LOW urb");
+       }       
+
+       /* FIXME Should I flush the device here? - not doing it for now */
+
+       /* shutdown our bulk reads and writes */
+       usb_unlink_urb (&port->write_urb);
+       usb_unlink_urb (&port->read_urb);
+       port->active = 0;
+}
+
+
+  
+/* The ftdi_sio requires the first byte to have:
+   B0 1
+   B1 0
+   B2..7 length of message excluding byte 0
+*/
+static int ftdi_sio_serial_write (struct tty_struct * tty, int from_user, 
+                                 const unsigned char *buf, int count)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int portNumber = MINOR(tty->device) - serial->minor;
+       struct usb_serial_port *port = &serial->port[portNumber];
+       const int data_offset = 1;
+
+       dbg("ftdi_sio_serial_write port %d, %d bytes", portNumber, count);
+
+       if (count == 0) {
+               dbg("write request of 0 bytes");
+               return 0;
+       }
+
+       /* only do something if we have a bulk out endpoint */
+       if (serial->num_bulk_out) {
+               unsigned char *first_byte = port->write_urb.transfer_buffer;
+
+               if (port->write_urb.status == -EINPROGRESS) {
+                       dbg ("already writing");
+                       return 0;
+               }
+
+               count += data_offset;
+               count = (count > port->bulk_out_size) ? port->bulk_out_size : count;
+               if (count == 0) {
+                       return 0;
+               }
+
+               /* Copy in the data to send */
+               if (from_user) {
+                       copy_from_user(port->write_urb.transfer_buffer + data_offset , 
+                                      buf, count - data_offset );
+               }
+               else {
+                       memcpy(port->write_urb.transfer_buffer + data_offset,
+                              buf, count - data_offset );
+               }  
+
+               /* Write the control byte at the front of the packet*/
+               first_byte = port->write_urb.transfer_buffer;
+               *first_byte = 1 | ((count-data_offset) << 2) ; 
+
+#ifdef DEBUG
+               dbg("Bytes: %d, Control Byte: 0o%03o",count, first_byte[0]);
+
+               if (count) {
+                       int i;
+                       printk (KERN_DEBUG __FILE__ ": data written - length = %d, data = ", count);
+                       for (i = 0; i < count; ++i) {
+                               printk ("0x%02x ", first_byte[i]);
+                               if (first_byte[i] > ' ' && first_byte[i] < '~') {
+                                       printk("%c ", first_byte[i]);
+                               } else {
+                                       printk("  ");
+                               }
+                       }
+
+                    
+                       printk ("\n");
+               }
+
+#endif
+               /* send the data out the bulk port */
+               port->write_urb.transfer_buffer_length = count;
+
+               if (usb_submit_urb(&port->write_urb))
+                       dbg("usb_submit_urb(write bulk) failed");
+
+               dbg("write returning: %d", count - data_offset);
+               return (count - data_offset);
+       }
+       
+       /* no bulk out, so return 0 bytes written */
+       return 0;
+} 
+
+
+static void ftdi_sio_read_bulk_callback (struct urb *urb)
+{ /* ftdi_sio_serial_buld_callback */
+       struct usb_serial *serial = (struct usb_serial *)urb->context;
+               struct tty_struct *tty = serial->tty; 
+               unsigned char *data = urb->transfer_buffer;
+       const int data_offset = 2;
+       int i;
+
+       dbg("ftdi_sio_read_bulk_callback");
+
+       if (urb->status) {
+               dbg("nonzero read bulk status received: %d", urb->status);
+               return;
+       }
+
+#ifdef DEBUG
+       if (urb->actual_length > 2) {
+               printk (KERN_DEBUG __FILE__ ": data read - length = %d, data = ", urb->actual_length);
+               for (i = 0; i < urb->actual_length; ++i) {
+                       printk ("0x%.2x ", data[i]);
+                       if (data[i] > ' ' && data[i] < '~') {
+                               printk("%c ", data[i]);
+                       } else {
+                               printk("  ");
+                       }
+               }
+               printk ("\n");
+       }
+#endif
+       
+
+       if (urb->actual_length > data_offset) {
+               for (i = data_offset ; i < urb->actual_length ; ++i) {
+                       tty_insert_flip_char(tty, data[i], 0);
+               }
+               tty_flip_buffer_push(tty);
+       }
+
+       /* Continue trying to always read  */
+       if (usb_submit_urb(urb))
+               dbg("failed resubmitting read urb");
+
+       return;
+} /* ftdi_sio_serial_read_bulk_callback */
+
+
+static void ftdi_sio_set_termios (struct tty_struct *tty, struct termios *old_termios)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int port = MINOR(tty->device) - serial->minor;
+       unsigned int cflag = tty->termios->c_cflag;
+       __u16 urb_value; /* Will hold the new flags */
+       char buf[1]; /* Perhaps I should dynamically alloc this? */
+       dbg("ftdi_sio_set_termios port %d", port);
+
+       /* FIXME - we should keep the old termios really */
+       /* FIXME -For this cut I don't care if the line is really changing or 
+          not  - so just do the change regardless */
+       
+       /* Set number of data bits, parity, stop bits */
+       
+       urb_value = 0;
+       urb_value |= (cflag & CSTOPB ? FTDI_SIO_SET_DATA_STOP_BITS_2 :
+                     FTDI_SIO_SET_DATA_STOP_BITS_1);
+       urb_value |= (cflag & PARENB ? 
+                     (cflag & PARODD ? FTDI_SIO_SET_DATA_PARITY_ODD : 
+                      FTDI_SIO_SET_DATA_PARITY_EVEN) :
+                     FTDI_SIO_SET_DATA_PARITY_NONE);
+       if (cflag & CSIZE) {
+               switch (cflag & CSIZE) {
+               case CS5: urb_value |= 5; dbg("Setting CS5"); break;
+               case CS6: urb_value |= 6; dbg("Setting CS6"); break;
+               case CS7: urb_value |= 7; dbg("Setting CS7"); break;
+               case CS8: urb_value |= 8; dbg("Setting CS8"); break;
+               default:
+                       dbg("CSIZE was set but not CS5-CS8");
+               }
+       }
+       if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                           FTDI_SIO_SET_DATA_REQUEST, 
+                           FTDI_SIO_SET_DATA_REQUEST_TYPE,
+                           urb_value , 0,
+                           buf, 0, 100) < 0) {
+               dbg("FAILED to set databits/stopbits/parity");
+       }          
+
+       /* Now do the baudrate */
+       /* FIXME - should drop lines on B0 */
+       /* FIXME Should also handle CLOCAL here  */
+     
+       switch(cflag & CBAUD){
+       case B300: urb_value = ftdi_sio_b300; dbg("Set to 300"); break;
+       case B600: urb_value = ftdi_sio_b600; dbg("Set to 600") ; break;
+       case B1200: urb_value = ftdi_sio_b1200; dbg("Set to 1200") ; break;
+       case B2400: urb_value = ftdi_sio_b2400; dbg("Set to 2400") ; break;
+       case B4800: urb_value = ftdi_sio_b4800; dbg("Set to 4800") ; break;
+       case B9600: urb_value = ftdi_sio_b9600; dbg("Set to 9600") ; break;
+       case B19200: urb_value = ftdi_sio_b19200; dbg("Set to 19200") ; break;
+       case B38400: urb_value = ftdi_sio_b38400; dbg("Set to 38400") ; break;
+       case B57600: urb_value = ftdi_sio_b57600; dbg("Set to 57600") ; break;
+       case B115200: urb_value = ftdi_sio_b115200; dbg("Set to 115200") ; break;
+       default: dbg("FTDI_SIO does not support the baudrate requested"); 
+               /* FIXME - how to return an error for this? */ break;
+       }
+       /* Send the URB */
+       if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                           FTDI_SIO_SET_BAUDRATE_REQUEST, 
+                           FTDI_SIO_SET_BAUDRATE_REQUEST_TYPE,
+                           urb_value, 0, 
+                           buf, 0, 100) < 0) {
+               dbg("urb failed to set baurdrate");
+       }
+       return;
+}
+
+
+/*FIXME - the beginnings of this implementation - not even hooked into the driver yet */
+static int ftdi_sio_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int port = MINOR(tty->device) - serial->minor;
+       __u16 urb_value=0; /* Will hold the new flags */
+       char buf[1];
+       int  ret, mask;
+       dbg("ftdi_sio_ioctl port %d", port);
+
+       /* Based on code from acm.c */
+       switch (cmd) {
+
+               case TIOCMGET:
+                       /* Request the status from the device */
+                       if ((ret = usb_control_msg(serial->dev, 
+                                           usb_sndctrlpipe(serial->dev, 0),
+                                           FTDI_SIO_GET_MODEM_STATUS_REQUEST, 
+                                           FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
+                                           0, 0, 
+                                           buf, 1, HZ * 5)) < 0 ) {
+                               dbg("Get not get modem status of device");
+                               return(ret);
+                       }
+
+                       return put_user((buf[0] & FTDI_SIO_DSR_MASK ? TIOCM_DSR : 0) |
+                                       (buf[0] & FTDI_SIO_CTS_MASK ? TIOCM_CTS : 0) |
+                                       (buf[0]  & FTDI_SIO_RI_MASK  ? TIOCM_RI  : 0) |
+                                       (buf[0]  & FTDI_SIO_RLSD_MASK ? TIOCM_CD  : 0),
+                                       (unsigned long *) arg);
+                       break;
+
+               case TIOCMSET:
+               case TIOCMBIS:
+               case TIOCMBIC:
+                       if ((ret = get_user(mask, (unsigned long *) arg))) return ret;
+
+                       /* FIXME Need to remember if we have set DTR or RTS since we
+                          can't ask the device  */
+                       /* FIXME - also need to find the meaning of TIOCMBIS/BIC/SET */
+                       if (mask & TIOCM_DTR) {
+                               switch(cmd) {
+                               case TIOCMSET:
+                                       urb_value = FTDI_SIO_SET_DTR_HIGH | FTDI_SIO_SET_RTS_LOW;
+                                       break;
+
+                               case TIOCMBIS:
+                                       /* Will leave RTS alone and set DTR */
+                                       urb_value =  FTDI_SIO_SET_DTR_HIGH;
+                                       break;
+                                       
+                               case TIOCMBIC:
+                                       urb_value = FTDI_SIO_SET_DTR_LOW;
+                                       break;
+                               }
+                       }
+
+                       if (mask & TIOCM_RTS) {
+                               switch(cmd) {
+                               case TIOCMSET:
+                                       urb_value = FTDI_SIO_SET_DTR_LOW | FTDI_SIO_SET_RTS_HIGH;
+                                       break;
+
+                               case TIOCMBIS:
+                                       /* Will leave DTR and set RTS */
+                                       urb_value = FTDI_SIO_SET_RTS_HIGH;
+                                       break;
+
+                               case TIOCMBIC:
+                                       /* Will unset RTS */
+                                       urb_value = FTDI_SIO_SET_RTS_LOW;
+                                       break;
+                               }
+                       }       
+
+                       
+                       return(usb_control_msg(serial->dev, 
+                                              usb_sndctrlpipe(serial->dev, 0),
+                                              FTDI_SIO_SET_MODEM_CTRL_REQUEST, 
+                                              FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE,
+                                              urb_value , 0,
+                                              buf, 0, HZ * 5));
+       }
+
+       return -ENOIOCTLCMD;
+}
+
+#endif /* CONFIG_USB_SERIAL_FTDI_SIO */
+
+
+#ifdef CONFIG_USB_SERIAL_KEYSPAN_PDA
+/*****************************************************************************
+ * Keyspan PDA specific driver functions
+ *****************************************************************************/
+
+static void keyspan_pda_rx_interrupt (struct urb *urb)
+{
+       struct usb_serial *serial = (struct usb_serial *) urb->context;
+       struct tty_struct *tty = serial->tty;
+       unsigned char *data = urb->transfer_buffer;
+       int i;
+
+       /* the urb might have been killed. */
+       if (urb->status)
+               return;
+       
+       /* see if the message is data or a status interrupt */
+       switch (data[0]) {
+       case 0:
+               /* rest of message is rx data */
+               if (urb->actual_length) {
+                       for (i = 1; i < urb->actual_length ; ++i) {
+                               tty_insert_flip_char(tty, data[i], 0);
+                       }
+                       tty_flip_buffer_push(tty);
+               }
+               break;
+       case 1:
+               /* status interrupt */
+               dbg(" rx int, d1=%d, d2=%d", data[1], data[2]);
+               switch (data[1]) {
+               case 1: /* modemline change */
+                       break;
+               case 2: /* tx unthrottle interrupt */
+                       serial->tx_throttled = 0;
+                       wake_up(&serial->write_wait); /* wake up writer */
+                       break;
+               default:
+                       break;
+               }
+               break;
+       default:
+               break;
+       }
+
+       /* INT urbs are automatically re-submitted */
+}
+
+
+static void keyspan_pda_rx_throttle (struct tty_struct *tty)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int port = MINOR(tty->device) - serial->minor;
+
+       /* stop receiving characters. We just turn off the URB request, and
+          let chars pile up in the device. If we're doing hardware
+          flowcontrol, the device will signal the other end when its buffer
+          fills up. If we're doing XON/XOFF, this would be a good time to
+          send an XOFF, although it might make sense to foist that off
+          upon the device too. */
+
+       dbg("keyspan_pda_rx_throttle port %d", port);
+       usb_unlink_urb(&serial->port[port].read_urb);
+}
+
+
+static void keyspan_pda_rx_unthrottle (struct tty_struct *tty)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int port = MINOR(tty->device) - serial->minor;
+
+       /* just restart the receive interrupt URB */
+       dbg("keyspan_pda_rx_unthrottle port %d", port);
+       if (usb_submit_urb(&serial->port[port].read_urb))
+               dbg(" usb_submit_urb(read urb) failed");
+       return;
+}
+
+
+static int keyspan_pda_setbaud (struct usb_serial *serial, int baud)
+{
+       int rc;
+       int bindex;
+
+       switch(baud) {
+               case 110: bindex = 0; break;
+               case 300: bindex = 1; break;
+               case 1200: bindex = 2; break;
+               case 2400: bindex = 3; break;
+               case 4800: bindex = 4; break;
+               case 9600: bindex = 5; break;
+               case 19200: bindex = 6; break;
+               case 38400: bindex = 7; break;
+               case 57600: bindex = 8; break;
+               case 115200: bindex = 9; break;
+               default: return -EINVAL;
+       }
+
+       /* rather than figure out how to sleep while waiting for this
+          to complete, I just use the "legacy" API. */
+       rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                            0, /* set baud */
+                            USB_TYPE_VENDOR 
+                            | USB_RECIP_INTERFACE
+                            | USB_DIR_OUT, /* type */
+                            bindex, /* value */
+                            0, /* index */
+                            NULL, /* &data */
+                            0, /* size */
+                            2*HZ); /* timeout */
+       return(rc);
+}
+
+
+static void keyspan_pda_break_ctl (struct tty_struct *tty, int break_state)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data;
+       int value;
+       if (break_state == -1)
+               value = 1; /* start break */
+       else
+               value = 0; /* clear break */
+       usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                       4, /* set break */
+                       USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
+                       value, 0, NULL, 0, 2*HZ);
+       /* there is something funky about this.. the TCSBRK that 'cu' performs
+          ought to translate into a break_ctl(-1),break_ctl(0) pair HZ/4
+          seconds apart, but it feels like the break sent isn't as long as it
+          is on /dev/ttyS0 */
+}
+
+
+static void keyspan_pda_set_termios (struct tty_struct *tty,
+                                    struct termios *old_termios)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       unsigned int cflag = tty->termios->c_cflag;
+
+       /* cflag specifies lots of stuff: number of stop bits, parity, number
+          of data bits, baud. What can the device actually handle?:
+          CSTOPB (1 stop bit or 2)
+          PARENB (parity)
+          CSIZE (5bit .. 8bit)
+          There is minimal hw support for parity (a PSW bit seems to hold the
+          parity of whatever is in the accumulator). The UART either deals
+          with 10 bits (start, 8 data, stop) or 11 bits (start, 8 data,
+          1 special, stop). So, with firmware changes, we could do:
+          8N1: 10 bit
+          8N2: 11 bit, extra bit always (mark?)
+          8[EOMS]1: 11 bit, extra bit is parity
+          7[EOMS]1: 10 bit, b0/b7 is parity
+          7[EOMS]2: 11 bit, b0/b7 is parity, extra bit always (mark?)
+
+          HW flow control is dictated by the tty->termios->c_cflags & CRTSCTS
+          bit.
+
+          For now, just do baud. */
+
+       switch (cflag & CBAUD) {
+               /* we could support more values here, just need to calculate
+                  the necessary divisors in the firmware. <asm/termbits.h>
+                  has the Bnnn constants. */
+               case B110: keyspan_pda_setbaud(serial, 110); break;
+               case B300: keyspan_pda_setbaud(serial, 300); break;
+               case B1200: keyspan_pda_setbaud(serial, 1200); break;
+               case B2400: keyspan_pda_setbaud(serial, 2400); break;
+               case B4800: keyspan_pda_setbaud(serial, 4800); break;
+               case B9600: keyspan_pda_setbaud(serial, 9600); break;
+               case B19200: keyspan_pda_setbaud(serial, 19200); break;
+               case B38400: keyspan_pda_setbaud(serial, 38400); break;
+               case B57600: keyspan_pda_setbaud(serial, 57600); break;
+               case B115200: keyspan_pda_setbaud(serial, 115200); break;
+               default: dbg("can't handle requested baud rate"); break;
+       }
+}
+
+
+/* modem control pins: DTR and RTS are outputs and can be controlled.
+   DCD, RI, DSR, CTS are inputs and can be read. All outputs can also be
+   read. The byte passed is: DTR(b7) DCD RI DSR CTS RTS(b2) unused unused */
+
+static int keyspan_pda_get_modem_info(struct usb_serial *serial,
+                                     unsigned char *value)
+{
+       int rc;
+       unsigned char data;
+       rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
+                            3, /* get pins */
+                            USB_TYPE_VENDOR|USB_RECIP_INTERFACE|USB_DIR_IN,
+                            0, 0, &data, 1, 2*HZ);
+       if (rc > 0)
+               *value = data;
+       return rc;
+}
+
+
+static int keyspan_pda_set_modem_info(struct usb_serial *serial,
+                                     unsigned char value)
+{
+       int rc;
+       rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
+                            3, /* set pins */
+                            USB_TYPE_VENDOR|USB_RECIP_INTERFACE|USB_DIR_OUT,
+                            value, 0, NULL, 0, 2*HZ);
+       return rc;
+}
+
+
+static int keyspan_pda_ioctl(struct tty_struct *tty, struct file *file,
+                            unsigned int cmd, unsigned long arg)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data;
+       int rc;
+       unsigned int value;
+       unsigned char status, mask;
+
+       switch (cmd) {
+       case TIOCMGET: /* get modem pins state */
+               rc = keyspan_pda_get_modem_info(serial, &status);
+               if (rc < 0)
+                       return rc;
+               value =
+                       ((status & (1<<7)) ? TIOCM_DTR : 0) |
+                       ((status & (1<<6)) ? TIOCM_CAR : 0) |
+                       ((status & (1<<5)) ? TIOCM_RNG : 0) |
+                       ((status & (1<<4)) ? TIOCM_DSR : 0) |
+                       ((status & (1<<3)) ? TIOCM_CTS : 0) |
+                       ((status & (1<<2)) ? TIOCM_RTS : 0);
+               if (copy_to_user((unsigned int *)arg, &value, sizeof(int)))
+                       return -EFAULT;
+               return 0;
+       case TIOCMSET: /* set a state as returned by MGET */
+               if (copy_from_user(&value, (unsigned int *)arg, sizeof(int)))
+                       return -EFAULT;
+               status =
+                       ((value & TIOCM_DTR) ? (1<<7) : 0) |
+                       ((value & TIOCM_CAR) ? (1<<6) : 0) |
+                       ((value & TIOCM_RNG) ? (1<<5) : 0) |
+                       ((value & TIOCM_DSR) ? (1<<4) : 0) |
+                       ((value & TIOCM_CTS) ? (1<<3) : 0) |
+                       ((value & TIOCM_RTS) ? (1<<2) : 0);
+               rc = keyspan_pda_set_modem_info(serial, status);
+               if (rc < 0)
+                       return rc;
+               return 0;
+       case TIOCMBIS: /* set bits in bitmask <arg> */
+       case TIOCMBIC: /* clear bits from bitmask <arg> */
+               if (copy_from_user(&value, (unsigned int *)arg, sizeof(int)))
+                       return -EFAULT;
+               rc = keyspan_pda_get_modem_info(serial, &status);
+               if (rc < 0)
+                       return rc;
+               mask =
+                       ((value & TIOCM_RTS) ? (1<<2) : 0) |
+                       ((value & TIOCM_DTR) ? (1<<7) : 0);
+               if (cmd == TIOCMBIS)
+                       status |= mask;
+               else
+                       status &= ~mask;
+               rc = keyspan_pda_set_modem_info(serial, status);
+               if (rc < 0)
+                       return rc;
+               return 0;
+       case TIOCMIWAIT:
+               /* wait for any of the 4 modem inputs (DCD,RI,DSR,CTS)*/
+               /* TODO */
+       case TIOCGICOUNT:
+               /* return count of modemline transitions */
+               return 0; /* TODO */
+       }
+       
+       return -ENOIOCTLCMD;
+}
+
+static int keyspan_pda_write(struct tty_struct * tty, int from_user, 
+                            const unsigned char *buf, int count)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int port = MINOR(tty->device) - serial->minor;
+       int request_unthrottle = 0;
+       int rc = 0;
+       DECLARE_WAITQUEUE(wait, current);
+
+       /* guess how much room is left in the device's ring buffer, and if we
+          want to send more than that, check first, updating our notion of
+          what is left. If our write will result in no room left, ask the
+          device to give us an interrupt when the room available rises above
+          a threshold, and hold off all writers (eventually, those using
+          select() or poll() too) until we receive that unthrottle interrupt.
+          Block if we can't write anything at all, otherwise write as much as
+          we can. */
+
+       if (count == 0) {
+               dbg(" write request of 0 bytes");
+               return (0);
+       }
+
+       /* we might block because of:
+          the TX urb is in-flight (wait until it completes)
+          the device is full (wait until it says there is room)
+       */
+       while (serial->port[port].write_urb.status == -EINPROGRESS) {
+               if (0 /* file->f_flags & O_NONBLOCK */) {
+                       rc = -EAGAIN;
+                       goto err;
+               }
+               interruptible_sleep_on(&serial->write_wait);
+               if (signal_pending(current)) {
+                       rc = -ERESTARTSYS;
+                       goto err;
+               }
+       }
+
+       /* at this point the URB is in our control, nobody else can submit it
+          again (the only sudden transition was the one from EINPROGRESS to
+          finished) */
+
+       /* the next potential block is that our TX process might be throttled.
+          The transition from throttled->not happens because of an Rx
+          interrupt, and the wake_up occurs during the same interrupt, so we
+          have to be careful to avoid a race that would cause us to sleep
+          forever. */
+
+       add_wait_queue(&serial->write_wait, &wait);
+       set_current_state(TASK_INTERRUPTIBLE);
+       while (serial->tx_throttled) {
+               /* device can't accomodate any more characters. Sleep until it
+                  can. Woken up by an Rx interrupt message, which clears
+                  tx_throttled first. */
+               dbg(" tx_throttled, going to sleep");
+               if (signal_pending(current)) {
+                       current->state = TASK_RUNNING;
+                       remove_wait_queue(&serial->write_wait, &wait);
+                       dbg(" woke up because of signal");
+                       rc = -ERESTARTSYS;
+                       goto err;
+               }
+               schedule();
+               dbg(" woke up");
+       }
+       remove_wait_queue(&serial->write_wait, &wait);
+       set_current_state(TASK_RUNNING);
+
+       count = (count > serial->port[port].bulk_out_size) ? 
+               serial->port[port].bulk_out_size : count;
+       if (count > serial->tx_room) {
+               unsigned char room;
+               /* Looks like we might overrun the Tx buffer. Ask the device
+                  how much room it really has */
+               rc = usb_control_msg(serial->dev, 
+                                    usb_rcvctrlpipe(serial->dev, 0),
+                                    6, /* write_room */
+                                    USB_TYPE_VENDOR | USB_RECIP_INTERFACE
+                                    | USB_DIR_IN,
+                                    0, /* value: 0 means "remaining room" */
+                                    0, /* index */
+                                    &room,
+                                    1,
+                                    2*HZ);
+               if (rc < 0) {
+                       dbg(" roomquery failed");
+                       return rc; /* failed */
+               }
+               if (rc == 0) {
+                       dbg(" roomquery returned 0 bytes");
+                       return -EIO; /* device didn't return any data */
+               }
+               dbg(" roomquery says %d", room);
+               serial->tx_room = room;
+               if (count > serial->tx_room) {
+                       /* we're about to completely fill the Tx buffer, so
+                          we'll be throttled afterwards. */
+                       count = serial->tx_room;
+                       request_unthrottle = 1;
+               }
+       }
+       serial->tx_room -= count;
+
+       if (count) {
+               /* now transfer data */
+               if (from_user) {
+                       copy_from_user(serial->port[port].write_urb.transfer_buffer,
+                                      buf, count);
+               }
+               else {
+                       memcpy (serial->port[port].write_urb.transfer_buffer, 
+                               buf, count);
+               }  
+               /* send the data out the bulk port */
+               serial->port[port].write_urb.transfer_buffer_length = count;
+               
+               if (usb_submit_urb(&serial->port[port].write_urb))
+                       dbg(" usb_submit_urb(write bulk) failed");
+       }
+       else {
+               /* There wasn't any room left, so we are throttled until
+                  the buffer empties a bit */
+               request_unthrottle = 1;
+       }
+
+       if (request_unthrottle) {
+               dbg(" request_unthrottle");
+               /* ask the device to tell us when the tx buffer becomes
+                  sufficiently empty */
+               serial->tx_throttled = 1; /* block writers */
+               rc = usb_control_msg(serial->dev, 
+                                    usb_sndctrlpipe(serial->dev, 0),
+                                    7, /* request_unthrottle */
+                                    USB_TYPE_VENDOR | USB_RECIP_INTERFACE
+                                    | USB_DIR_OUT,
+                                    16, /* value: threshold */
+                                    0, /* index */
+                                    NULL,
+                                    0,
+                                    2*HZ);
+       }
+
+       return (count);
+ err:
+       return (rc);
+}
+
+
+static void keyspan_pda_write_bulk_callback (struct urb *urb)
+{
+       struct usb_serial *serial = (struct usb_serial *) urb->context;
+       struct tty_struct *tty = serial->tty; 
+
+       wake_up_interruptible(&serial->write_wait);
+
+       if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && 
+           tty->ldisc.write_wakeup)
+               (tty->ldisc.write_wakeup)(tty);
+
+       wake_up_interruptible(&tty->write_wait);
+}
+
+
+static int keyspan_pda_write_room (struct tty_struct *tty)
+{
+       struct usb_serial *serial = (struct usb_serial *)tty->driver_data; 
+
+       /* used by n_tty.c for processing of tabs and such. Giving it our
+          conservative guess is probably good enough, but needs testing by
+          running a console through the device. */
+
+       return (serial->tx_room);
+}
+
+
+static int keyspan_pda_chars_in_buffer (struct tty_struct *tty) 
+{
+       struct usb_serial *serial = (struct usb_serial *)tty->driver_data; 
+       unsigned char count;
+       int rc;
+
+       /* used by tty stuff to wait for output to drain. Go ask the
+          device how much is still queued in the tx ring */
+       rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
+                            6, /* write_room */
+                            USB_TYPE_VENDOR | USB_RECIP_INTERFACE
+                            | USB_DIR_IN,
+                            1, /* value: 1 means chars_in_buffer */
+                            0, /* index */
+                            &count,
+                            1,
+                            2*HZ);
+       if (rc < 0)
+               return rc; /* failed */
+       if (rc == 0)
+               return -EIO; /* device didn't return any data */
+       return (count);
+}
+
+
+static int keyspan_pda_serial_open (struct tty_struct *tty, struct file *filp)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int portNumber = MINOR(tty->device) - serial->minor;
+       struct usb_serial_port *port = &serial->port[portNumber];
+       unsigned char room;
+       int rc;
+
+       if (port->active) {
+               return -EINVAL;
+       }
+       port->active = 1;
+       /* find out how much room is in the Tx ring */
+       rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
+                            6, /* write_room */
+                            USB_TYPE_VENDOR | USB_RECIP_INTERFACE
+                            | USB_DIR_IN,
+                            0, /* value */
+                            0, /* index */
+                            &room,
+                            1,
+                            2*HZ);
+       if (rc < 0) {
+               dbg(" roomquery failed");
+               return rc; /* failed */
+       }
+       if (rc == 0) {
+               dbg(" roomquery returned 0 bytes");
+               return -EIO; /* device didn't return any data */
+       }
+       serial->tx_room = room;
+       serial->tx_throttled = room ? 0 : 1;
+
+       /* the normal serial device seems to always turn on DTR and RTS here,
+          so do the same */
+       if (tty->termios->c_cflag & CBAUD)
+               keyspan_pda_set_modem_info(serial, (1<<7) | (1<<2) );
+       else
+               keyspan_pda_set_modem_info(serial, 0);
+
+       /*Start reading from the device*/
+       if (usb_submit_urb(&port->read_urb))
+               dbg(" usb_submit_urb(read int) failed");
+
+       return (0);
+}
+
+
+static void keyspan_pda_serial_close(struct tty_struct *tty, 
+                                    struct file *filp)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int portNumber = MINOR(tty->device) - serial->minor;
+       struct usb_serial_port *port = &serial->port[portNumber];
+
+       /* the normal serial device seems to always shut off DTR and RTS now */
+       if (tty->termios->c_cflag & HUPCL)
+               keyspan_pda_set_modem_info(serial, 0);
+
+       /* shutdown our bulk reads and writes */
+       usb_unlink_urb (&port->write_urb);
+       usb_unlink_urb (&port->read_urb);
+       port->active = 0;
+}
+
+
+/* download the firmware to a "fake" device (pre-renumeration) */
+static int keyspan_pda_fake_startup (struct usb_serial *serial)
+{
+       int response;
+       const struct ezusb_hex_record *record;
+
+       /* download the firmware here ... */
+       response = ezusb_set_reset(serial, 1);
+
+       record = &keyspan_pda_firmware[0];
+       while(record->address != 0xffff) {
+               response = ezusb_writememory(serial, record->address,
+                                            (unsigned char *)record->data,
+                                            record->data_size, 0xa0);
+               if (response < 0) {
+                       err("ezusb_writememory failed for Keyspan PDA "
+                           "firmware (%d %04X %p %d)",
+                           response, 
+                           record->address, record->data, record->data_size);
+                       break;
+               }
+               record++;
+       }
+       /* bring device out of reset. Renumeration will occur in a moment
+          and the new device will bind to the real driver */
+       response = ezusb_set_reset(serial, 0);
+
+       /* we want this device to fail to have a driver assigned to it. */
+       return (1);
+}
+
+
+/* do some startup allocations not currently performed by usb_serial_probe() */
+static int keyspan_pda_startup (struct usb_serial *serial)
+{
+       struct usb_endpoint_descriptor *intin;
+       intin = serial->port[0].interrupt_in_endpoint;
+
+       /* set up the receive interrupt urb */
+       FILL_INT_URB(&serial->port[0].read_urb, serial->dev,
+                    usb_rcvintpipe(serial->dev, intin->bEndpointAddress),
+                    serial->port[0].interrupt_in_buffer,
+                    intin->wMaxPacketSize,
+                    keyspan_pda_rx_interrupt,
+                    serial,
+                    intin->bInterval);
+
+       init_waitqueue_head(&serial->write_wait);
+       
+       return (0);
+}
+
+#endif /* CONFIG_USB_SERIAL_KEYSPAN_PDA */
+
+
+/*****************************************************************************
+ * generic devices specific driver functions
+ *****************************************************************************/
+static int generic_serial_open (struct tty_struct *tty, struct file *filp)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int portNumber = MINOR(tty->device) - serial->minor;
+       struct usb_serial_port *port = &serial->port[portNumber];
+
+       dbg("generic_serial_open port %d", portNumber);
+
+       if (port->active) {
+               dbg ("device already open");
+               return -EINVAL;
+       }
+       port->active = 1;
+       /* if we have a bulk interrupt, start reading from it */
+       if (serial->num_bulk_in) {
+               /*Start reading from the device*/
+               if (usb_submit_urb(&port->read_urb))
+                       dbg("usb_submit_urb(read bulk) failed");
+       }
+
+       return (0);
+}
+
+
+static void generic_serial_close(struct tty_struct *tty, struct file * filp)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int portNumber = MINOR(tty->device) - serial->minor;
+       struct usb_serial_port *port = &serial->port[portNumber];
+
+       dbg("generic_serial_close port %d", portNumber);
+       
+       /* shutdown any bulk reads that might be going on */
+       if (serial->num_bulk_out) {
+               usb_unlink_urb (&port->write_urb);
+       }
+       if (serial->num_bulk_in) {
+               usb_unlink_urb (&port->read_urb);
+       }
+
+       port->active = 0;
+}
+
+
+static int generic_serial_write (struct tty_struct * tty, int from_user, const unsigned char *buf, int count)
+{
+       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
+       int portNumber = MINOR(tty->device) - serial->minor;
+       struct usb_serial_port *port = &serial->port[portNumber];
+
+       dbg("generic_serial_write port %d", portNumber);
+
+       if (count == 0) {
+               dbg("write request of 0 bytes");
+               return (0);
+       }
+
+       /* only do something if we have a bulk out endpoint */
+       if (serial->num_bulk_out) {
+               if (port->write_urb.status == -EINPROGRESS) {
+                       dbg ("already writing");
+                       return (0);
+               }
+
+               count = (count > port->bulk_out_size) ? port->bulk_out_size : count;
+
+               if (from_user) {
+                       copy_from_user(port->write_urb.transfer_buffer, buf, count);
+               }
+               else {
+                       memcpy (port->write_urb.transfer_buffer, buf, count);
+               }  
+
+               /* send the data out the bulk port */
+               port->write_urb.transfer_buffer_length = count;
+
+               if (usb_submit_urb(&port->write_urb))
+                       dbg("usb_submit_urb(write bulk) failed");
+
+               return (count);
+       }
+       
+       /* no bulk out, so return 0 bytes written */
+       return (0);
+} 
+
+
+static int generic_write_room (struct tty_struct *tty) 
+{
+       struct usb_serial *serial = (struct usb_serial *)tty->driver_data; 
+       int portNumber = MINOR(tty->device) - serial->minor;
+       struct usb_serial_port *port = &serial->port[portNumber];
+       int room;
+
+       dbg("generic_write_room port %d", portNumber);
+       
+       if (serial->num_bulk_out) {
+               if (port->write_urb.status == -EINPROGRESS)
+                       room = 0;
+               else
+                       room = port->bulk_out_size;
+               dbg("generic_write_room returns %d", room);
+               return (room);
+       }
+       
+       return (0);
+}
+
+
+static int generic_chars_in_buffer (struct tty_struct *tty) 
+{
+       struct usb_serial *serial = (struct usb_serial *)tty->driver_data; 
+       int portNumber = MINOR(tty->device) - serial->minor;
+       struct usb_serial_port *port = &serial->port[portNumber];
+
+       dbg("generic_chars_in_buffer port %d", portNumber);
+       
+       if (serial->num_bulk_out) {
+               if (port->write_urb.status == -EINPROGRESS) {
+                       return (port->bulk_out_size);
+               }
+       }
+
+       return (0);
+}
+
+
+static void generic_throttle (struct tty_struct *tty) 
+{
+       /* do nothing for the generic device */
+       return;
+}
+
+
+static void generic_unthrottle (struct tty_struct *tty) 
+{
+       /* do nothing for the generic device */
+       return;
+}
+
+
+static int generic_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg)
+{
+       /* generic driver doesn't support any ioctls yet */
+       return -ENOIOCTLCMD;
+}
+
+
+static void generic_set_termios (struct tty_struct *tty, struct termios * old)
+{
+       /* generic driver doesn't really care about setting any line settings */
+       return;
+}
+
+
+static void generic_read_bulk_callback (struct urb *urb)
+{
+       struct usb_serial *serial = (struct usb_serial *)urb->context;
+               struct tty_struct *tty = serial->tty; 
+               unsigned char *data = urb->transfer_buffer;
+       int i;
+
+       dbg("generic_read_bulk_callback");
+
+       if (urb->status) {
+               dbg("nonzero read bulk status received: %d", urb->status);
+               return;
+       }
+
+#ifdef DEBUG
+       if (urb->actual_length) {
+               printk (KERN_DEBUG __FILE__ ": data read - length = %d, data = ", urb->actual_length);
+               for (i = 0; i < urb->actual_length; ++i) {
+                       printk ("%.2x ", data[i]);
+               }
+               printk ("\n");
+       }
+#endif
+       
+       if (urb->actual_length) {
+               for (i = 0; i < urb->actual_length ; ++i) {
+                        tty_insert_flip_char(tty, data[i], 0);
+               }
+               tty_flip_buffer_push(tty);
+       }
+
+       /* Continue trying to always read  */
+       if (usb_submit_urb(urb))
+               dbg("failed resubmitting read urb");
+
+       return;
+}
+
+
+static void generic_write_bulk_callback (struct urb *urb)
+{
+       struct usb_serial *serial = (struct usb_serial *) urb->context; 
+               struct tty_struct *tty = serial->tty; 
+
+       dbg("generic_write_bulk_callback");
+
+       if (urb->status) {
+               dbg("nonzero write bulk status received: %d", urb->status);
+               return;
+       }
+
+       if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup)
+               (tty->ldisc.write_wakeup)(tty);
+
+       wake_up_interruptible(&tty->write_wait);
+       
+       return;
+}
+
+
+
+static void * usb_serial_probe(struct usb_device *dev, unsigned int ifnum)
+{
+       struct usb_serial *serial = NULL;
+       struct usb_serial_port *port;
+       struct usb_interface_descriptor *interface;
+       struct usb_endpoint_descriptor *endpoint;
+       struct usb_endpoint_descriptor *interrupt_in_endpoint[MAX_NUM_PORTS];
+       struct usb_endpoint_descriptor *bulk_in_endpoint[MAX_NUM_PORTS];
+       struct usb_endpoint_descriptor *bulk_out_endpoint[MAX_NUM_PORTS];
+       struct usb_serial_device_type *type;
+       int device_num;
+       int minor;
+       int buffer_size;
+       int i;
+       char interrupt_pipe;
+       char bulk_in_pipe;
+       char bulk_out_pipe;
+       int num_interrupt_in = 0;
+       int num_bulk_in = 0;
+       int num_bulk_out = 0;
+       int num_ports;
+       
+       /* loop through our list of known serial converters, and see if this device matches */
+       device_num = 0;
+       while (usb_serial_devices[device_num] != NULL) {
+               type = usb_serial_devices[device_num];
+               dbg ("Looking at %s Vendor id=%.4x Product id=%.4x", type->name, *(type->idVendor), *(type->idProduct));
+
+               /* look at the device descriptor */
+               if ((dev->descriptor.idVendor == *(type->idVendor)) &&
+                   (dev->descriptor.idProduct == *(type->idProduct))) {
+
+                       dbg("descriptor matches...looking at the endpoints");
+
+                       /* descriptor matches, let's try to find the endpoints needed */
+                       interrupt_pipe = bulk_in_pipe = bulk_out_pipe = HAS_NOT;
+                       
+                       /* check out the endpoints */
+                       interface = &dev->actconfig->interface[ifnum].altsetting[0];
+                       for (i = 0; i < interface->bNumEndpoints; ++i) {
+                               endpoint = &interface->endpoint[i];
+               
+                               if ((endpoint->bEndpointAddress & 0x80) &&
+                                   ((endpoint->bmAttributes & 3) == 0x02)) {
+                                       /* we found a bulk in endpoint */
+                                       dbg("found bulk in");
+                                       bulk_in_pipe = HAS;
+                                       bulk_in_endpoint[num_bulk_in] = endpoint;
+                                       ++num_bulk_in;
+                               }
+
+                               if (((endpoint->bEndpointAddress & 0x80) == 0x00) &&
+                                   ((endpoint->bmAttributes & 3) == 0x02)) {
+                                       /* we found a bulk out endpoint */
+                                       dbg("found bulk out");
+                                       bulk_out_pipe = HAS;
+                                       bulk_out_endpoint[num_bulk_out] = endpoint;
+                                       ++num_bulk_out;
+                               }
+               
+                               if ((endpoint->bEndpointAddress & 0x80) &&
+                                   ((endpoint->bmAttributes & 3) == 0x03)) {
+                                       /* we found a interrupt in endpoint */
+                                       dbg("found interrupt in");
+                                       interrupt_pipe = HAS;
+                                       interrupt_in_endpoint[num_interrupt_in] = endpoint;
+                                       ++num_interrupt_in;
+                               }
+
+                       }
+       
+                       /* verify that we found all of the endpoints that we need */
+                       if ((interrupt_pipe & type->needs_interrupt_in) &&
+                           (bulk_in_pipe & type->needs_bulk_in) &&
+                           (bulk_out_pipe & type->needs_bulk_out)) {
+                               /* found all that we need */
+                               info("%s converter detected", type->name);
+
+#ifdef CONFIG_USB_SERIAL_GENERIC
+                               if (type == &generic_device)
+                                       num_ports = num_bulk_out;
+                               else
+#endif
+                                       num_ports = type->num_ports;
+
+                               serial = get_free_serial (num_ports, &minor);
+                               if (serial == NULL) {
+                                       err("No more free serial devices");
+                                       return NULL;
+                               }
+       
+                               serial->dev = dev;
+                               serial->type = type;
+                               serial->minor = minor;
+                               serial->num_ports = num_ports;
+                               serial->num_bulk_in = num_bulk_in;
+                               serial->num_bulk_out = num_bulk_out;
+                               serial->num_interrupt_in = num_interrupt_in;
+
+                               /* collect interrupt_in endpoints now, because
+                                  the keyspan_pda startup function needs
+                                  to know about them */
+                               for (i = 0; i < num_interrupt_in; ++i) {
+                                       port = &serial->port[i];
+                                       buffer_size = interrupt_in_endpoint[i]->wMaxPacketSize;
+                                       port->interrupt_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
+                                       if (!port->interrupt_in_buffer) {
+                                               err("Couldn't allocate interrupt_in_buffer");
+                                               goto probe_error;
+                                       }
+                                       port->interrupt_in_endpoint = interrupt_in_endpoint[i];
+                               }
+
+                               /* if this device type has a startup function, call it */
+                               if (type->startup) {
+                                       if (type->startup (serial)) {
+                                               return_serial (serial);
+                                               return NULL;
+                                       }
+                               }
+
+                               /* set up the endpoint information */
+                               for (i = 0; i < num_bulk_in; ++i) {
+                                       port = &serial->port[i];
+                                       buffer_size = bulk_in_endpoint[i]->wMaxPacketSize;
+                                       port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
+                                       if (!port->bulk_in_buffer) {
+                                               err("Couldn't allocate bulk_in_buffer");
+                                               goto probe_error;
+                                       }
+                                       if (serial->type->read_bulk_callback) {
+                                               FILL_BULK_URB(&port->read_urb, dev, usb_rcvbulkpipe (dev, bulk_in_endpoint[i]->bEndpointAddress),
+                                                               port->bulk_in_buffer, buffer_size, serial->type->read_bulk_callback, serial);
+                                       } else {
+                                               FILL_BULK_URB(&port->read_urb, dev, usb_rcvbulkpipe (dev, bulk_in_endpoint[i]->bEndpointAddress),
+                                                               port->bulk_in_buffer, buffer_size, generic_read_bulk_callback, serial);
+                                       }
+                               }
+
+                               for (i = 0; i < num_bulk_out; ++i) {
+                                       port = &serial->port[i];
+                                       port->bulk_out_size = bulk_out_endpoint[i]->wMaxPacketSize;
+                                       port->bulk_out_buffer = kmalloc (port->bulk_out_size, GFP_KERNEL);
+                                       if (!port->bulk_out_buffer) {
+                                               err("Couldn't allocate bulk_out_buffer");
+                                               goto probe_error;
+                                       }
+                                       if (serial->type->write_bulk_callback) {
+                                               FILL_BULK_URB(&port->write_urb, dev, usb_sndbulkpipe (dev, bulk_out_endpoint[i]->bEndpointAddress),
+                                                               port->bulk_out_buffer, port->bulk_out_size, serial->type->write_bulk_callback, serial);
+                                       } else {
+                                               FILL_BULK_URB(&port->write_urb, dev, usb_sndbulkpipe (dev, bulk_out_endpoint[i]->bEndpointAddress),
+                                                               port->bulk_out_buffer, port->bulk_out_size, generic_write_bulk_callback, serial);
+                                       }
+                               }
+
+#if 0 /* use this code when WhiteHEAT is up and running */
+                               for (i = 0; i < num_interrupt_in; ++i) {
+                                       buffer_size = interrupt_in_endpoint[i]->wMaxPacketSize;
+                                       serial->interrupt_in_buffer[i] = kmalloc (buffer_size, GFP_KERNEL);
+                                       if (!serial->interrupt_in_buffer[i]) {
+                                               err("Couldn't allocate interrupt_in_buffer");
+                                               goto probe_error;
+                                       }
+                                       FILL_INT_URB(&serial->control_urb[i], dev, usb_rcvintpipe (dev, interrupt_in_endpoint[i]->bEndpointAddress),
+                                                       serial->interrupt_in_buffer[i], buffer_size, serial_control_irq,
+                                                       serial, interrupt_in_endpoint[i]->bInterval);
+                               }
+#endif
+
+                               for (i = 0; i < serial->num_ports; ++i) {
+                                       info("%s converter now attached to ttyUSB%d", type->name, serial->minor + i);
+                               }
+
+                               MOD_INC_USE_COUNT;
+
+                               return serial;
+                       } else {
+                               info("descriptors matched, but endpoints did not");
+                       }
+               }
+
+               /* look at the next type in our list */
+               ++device_num;
+       }
+
+probe_error:
+       if (serial) {
+               for (i = 0; i < num_bulk_in; ++i)
+                       if (serial->port[i].bulk_in_buffer[i])
+                               kfree (serial->port[i].bulk_in_buffer);
+               for (i = 0; i < num_bulk_out; ++i)
+                       if (serial->port[i].bulk_out_buffer)
+                               kfree (serial->port[i].bulk_out_buffer);
+               for (i = 0; i < num_interrupt_in; ++i)
+                       if (serial->port[i].interrupt_in_buffer)
+                               kfree (serial->port[i].interrupt_in_buffer);
+               
+               /* return the minor range that this device had */
+               return_serial (serial);
+
+               /* free up any memory that we allocated */
+               kfree (serial);
+       }
+       return NULL;
+}
+
+
+static void usb_serial_disconnect(struct usb_device *dev, void *ptr)
+{
+       struct usb_serial *serial = (struct usb_serial *) ptr;
+       struct usb_serial_port *port;
+       int i;
+
+       if (serial) {
+               /* need to stop any transfers...*/
+               for (i = 0; i < serial->num_ports; ++i) {
+                       port = &serial->port[i];
+                       usb_unlink_urb (&port->write_urb);
+                       usb_unlink_urb (&port->read_urb);
+                       port->active = 0;
+               }
+
+               /* free up any memory that we allocated */
+               for (i = 0; i < serial->num_bulk_in; ++i) {
+                       port = &serial->port[i];
+                       if (port->bulk_in_buffer)
+                               kfree (port->bulk_in_buffer);
+               }
+               for (i = 0; i < serial->num_bulk_out; ++i) {
+                       port = &serial->port[i];
+                       if (port->bulk_out_buffer)
+                               kfree (port->bulk_out_buffer);
+               }
+               for (i = 0; i < serial->num_interrupt_in; ++i) {
+                       port = &serial->port[i];
+                       if (port->interrupt_in_buffer)
+                               kfree (port->interrupt_in_buffer);
+               }
+
+               for (i = 0; i < serial->num_ports; ++i) {
+                       info("%s converter now disconnected from ttyUSB%d", serial->type->name, serial->minor + i);
+               }
+
+               /* return the minor range that this device had */
+               return_serial (serial);
+
+               /* free up any memory that we allocated */
+               kfree (serial);
+
+       } else {
+               info("device disconnected");
+       }
+       
+       MOD_DEC_USE_COUNT;
+}
+
+
+static struct tty_driver serial_tty_driver = {
+       magic:                  TTY_DRIVER_MAGIC,
+       driver_name:            "usb",
+       name:                   "ttyUSB",
+       major:                  SERIAL_TTY_MAJOR,
+       minor_start:            0,
+       num:                    SERIAL_TTY_MINORS,
+       type:                   TTY_DRIVER_TYPE_SERIAL,
+       subtype:                SERIAL_TYPE_NORMAL,
+       flags:                  TTY_DRIVER_REAL_RAW,
+       refcount:               &serial_refcount,
+       table:                  serial_tty,
+       proc_entry:             NULL,
+       other:                  NULL,
+       termios:                serial_termios,
+       termios_locked:         serial_termios_locked,
+       
+       open:                   serial_open,
+       close:                  serial_close,
+       write:                  serial_write,
+       put_char:               NULL,
+       flush_chars:            NULL,
+       write_room:             serial_write_room,
+       ioctl:                  serial_ioctl,
+       set_termios:            serial_set_termios,
+       set_ldisc:              NULL, 
+       throttle:               serial_throttle,
+       unthrottle:             serial_unthrottle,
+       stop:                   NULL,
+       start:                  NULL,
+       hangup:                 NULL,
+       break_ctl:              serial_break,
+       wait_until_sent:        NULL,
+       send_xchar:             NULL,
+       read_proc:              NULL,
+       chars_in_buffer:        serial_chars_in_buffer,
+       flush_buffer:           NULL
+};
+
+
+int usb_serial_init(void)
+{
+       int i;
+
+       /* Initalize our global data */
+       for (i = 0; i < SERIAL_TTY_MINORS; ++i) {
+               serial_table[i] = NULL;
+       }
+
+       /* register the tty driver */
+       serial_tty_driver.init_termios          = tty_std_termios;
+       serial_tty_driver.init_termios.c_cflag  = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
+       if (tty_register_driver (&serial_tty_driver)) {
+               err("failed to register tty driver");
+               return -EPERM;
+       }
+       
+       /* register the USB driver */
+       if (usb_register(&usb_serial_driver) < 0) {
+               tty_unregister_driver(&serial_tty_driver);
+               return -1;
+       }
+
+       info("support registered");
+       return 0;
+}
+
+
+void usb_serial_exit(void)
+{
+       tty_unregister_driver(&serial_tty_driver);
+       usb_deregister(&usb_serial_driver);
+}
+
+
+module_init(usb_serial_init);
+module_exit(usb_serial_exit);
+
+
diff --git a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
new file mode 100644 (file)
index 0000000..f02eeed
--- /dev/null
@@ -0,0 +1,436 @@
+/*
+ * USB Serial Converter driver
+ *
+ *     (C) Copyright (C) 1999, 2000
+ *         Greg Kroah-Hartman (greg@kroah.com)
+ *
+ *     This program is free software; you can redistribute it and/or modify
+ *     it under the terms of the GNU General Public License as published by
+ *     the Free Software Foundation; either version 2 of the License, or
+ *     (at your option) any later version.
+ *
+ * See Documentation/usb/usb-serial.txt for more information on using this driver
+ * 
+ */
+
+
+#ifndef __LINUX_USB_SERIAL_H
+#define __LINUX_USB_SERIAL_H
+
+#include <linux/config.h>
+
+/* Module information */
+MODULE_AUTHOR("Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux-usb/");
+MODULE_DESCRIPTION("USB Serial Driver");
+
+#ifdef CONFIG_USB_SERIAL_GENERIC
+static __u16   vendor  = 0x05f9;
+static __u16   product = 0xffff;
+MODULE_PARM(vendor, "i");
+MODULE_PARM_DESC(vendor, "User specified USB idVendor");
+
+MODULE_PARM(product, "i");
+MODULE_PARM_DESC(product, "User specified USB idProduct");
+#endif
+
+
+/* USB Serial devices vendor ids and device ids that this driver supports */
+#define CONNECT_TECH_VENDOR_ID         0x0710
+#define CONNECT_TECH_FAKE_WHITE_HEAT_ID        0x0001
+#define CONNECT_TECH_WHITE_HEAT_ID     0x8001
+#define HANDSPRING_VENDOR_ID           0x082d
+#define HANDSPRING_VISOR_ID            0x0100
+#define FTDI_VENDOR_ID                 0x0403
+#define FTDI_SIO_SERIAL_CONVERTER_ID   0x8372
+#define KEYSPAN_VENDOR_ID              0x06cd
+#define KEYSPAN_PDA_FAKE_ID            0x0103
+#define KEYSPAN_PDA_ID                 0x0104 /* no clue */
+
+#define SERIAL_TTY_MAJOR       188     /* Nice legal number now */
+#define SERIAL_TTY_MINORS      16      /* Actually we are allowed 255, but this is good for now */
+
+
+#define MAX_NUM_PORTS  8       /* The maximum number of ports one device can grab at once */
+
+
+struct usb_serial_port {
+       struct usb_serial       *serial;        /* pointer back to the owner of this port */
+       struct tty_struct *     tty;            /* the coresponding tty for this device */
+       unsigned char           minor;
+       unsigned char           number;
+       char                    active;         /* someone has this device open */
+
+       struct usb_endpoint_descriptor * interrupt_in_endpoint;
+       __u8                    interrupt_in_interval;
+       unsigned char *         interrupt_in_buffer;
+       struct urb              control_urb;
+
+       unsigned char *         bulk_in_buffer;
+       struct urb              read_urb;
+
+       unsigned char *         bulk_out_buffer;
+       int                     bulk_out_size;
+       struct urb              write_urb;
+       void *                  private;        /* data private to the specific driver */
+};
+
+struct usb_serial {
+       struct usb_device *             dev;
+       struct usb_serial_device_type * type;
+       struct tty_struct *             tty;                    /* the coresponding tty for this device */
+       unsigned char                   minor;
+       unsigned char                   num_ports;              /* the number of ports this device has */
+       char                            num_interrupt_in;       /* number of interrupt in endpoints we have */
+       char                            num_bulk_in;            /* number of bulk in endpoints we have */
+       char                            num_bulk_out;           /* number of bulk out endpoints we have */
+       struct usb_serial_port          port[MAX_NUM_PORTS];
+
+       /* FIXME! These should move to the private area of the keyspan driver */
+       int                     tx_room;
+       int                     tx_throttled;
+       wait_queue_head_t       write_wait;
+
+       void *                  private;                /* data private to the specific driver */
+};
+
+
+#define MUST_HAVE_NOT  0x01
+#define MUST_HAVE      0x02
+#define DONT_CARE      0x03
+
+#define        HAS             0x02
+#define HAS_NOT                0x01
+
+#define NUM_DONT_CARE  (-1)
+
+
+/* This structure defines the individual serial converter. */
+struct usb_serial_device_type {
+       char    *name;
+       __u16   *idVendor;
+       __u16   *idProduct;
+       char    needs_interrupt_in;
+       char    needs_bulk_in;
+       char    needs_bulk_out;
+       char    num_interrupt_in;
+       char    num_bulk_in;
+       char    num_bulk_out;
+       char    num_ports;              /* number of serial ports this device has */
+
+       /* function call to make before accepting driver */
+       int (*startup) (struct usb_serial *serial);     /* return 0 to continue initialization, anything else to abort */
+       
+       /* serial function calls */
+       int  (*open)(struct tty_struct * tty, struct file * filp);
+       void (*close)(struct tty_struct * tty, struct file * filp);
+       int  (*write)(struct tty_struct * tty, int from_user,const unsigned char *buf, int count);
+       int  (*write_room)(struct tty_struct *tty);
+       int  (*ioctl)(struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg);
+       void (*set_termios)(struct tty_struct *tty, struct termios * old);
+       void (*break_ctl)(struct tty_struct *tty, int break_state);
+       int  (*chars_in_buffer)(struct tty_struct *tty);
+       void (*throttle)(struct tty_struct * tty);
+       void (*unthrottle)(struct tty_struct * tty);
+       
+       void (*read_bulk_callback)(struct urb *urb);
+       void (*write_bulk_callback)(struct urb *urb);
+};
+
+
+/* function prototypes for a "generic" type serial converter (no flow control, not all endpoints needed) */
+/* need to always compile these in, as some of the other devices use these functions as their own. */
+/* if a driver does not provide a function pointer, the generic function will be called. */
+static int  generic_serial_open                (struct tty_struct *tty, struct file *filp);
+static void generic_serial_close       (struct tty_struct *tty, struct file *filp);
+static int  generic_serial_write       (struct tty_struct *tty, int from_user, const unsigned char *buf, int count);
+static int  generic_write_room         (struct tty_struct *tty);
+static int  generic_ioctl              (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg);
+static void generic_set_termios                (struct tty_struct *tty, struct termios * old);
+static int  generic_chars_in_buffer    (struct tty_struct *tty);
+static void generic_throttle           (struct tty_struct *tty);
+static void generic_unthrottle         (struct tty_struct *tty);
+static void generic_read_bulk_callback (struct urb *urb);
+static void generic_write_bulk_callback        (struct urb *urb);
+
+
+#ifdef CONFIG_USB_SERIAL_GENERIC
+/* All of the device info needed for the Generic Serial Converter */
+static struct usb_serial_device_type generic_device = {
+       name:                   "Generic",
+       idVendor:               &vendor,                /* use the user specified vendor id */
+       idProduct:              &product,               /* use the user specified product id */
+       needs_interrupt_in:     DONT_CARE,              /* don't have to have an interrupt in endpoint */
+       needs_bulk_in:          DONT_CARE,              /* don't have to have a bulk in endpoint */
+       needs_bulk_out:         DONT_CARE,              /* don't have to have a bulk out endpoint */
+       num_interrupt_in:       NUM_DONT_CARE,
+       num_bulk_in:            NUM_DONT_CARE,
+       num_bulk_out:           NUM_DONT_CARE,
+       num_ports:              1,
+};
+#endif
+
+
+#ifdef CONFIG_USB_SERIAL_WHITEHEAT
+/* function prototypes for the Connect Tech WhiteHEAT serial converter */
+static int  whiteheat_serial_open      (struct tty_struct *tty, struct file *filp);
+static void whiteheat_serial_close     (struct tty_struct *tty, struct file *filp);
+static void whiteheat_set_termios      (struct tty_struct *tty, struct termios * old);
+static void whiteheat_throttle         (struct tty_struct *tty);
+static void whiteheat_unthrottle       (struct tty_struct *tty);
+static int  whiteheat_startup          (struct usb_serial *serial);
+
+/* All of the device info needed for the Connect Tech WhiteHEAT */
+static __u16   connecttech_vendor_id                   = CONNECT_TECH_VENDOR_ID;
+static __u16   connecttech_whiteheat_fake_product_id   = CONNECT_TECH_FAKE_WHITE_HEAT_ID;
+static __u16   connecttech_whiteheat_product_id        = CONNECT_TECH_WHITE_HEAT_ID;
+static struct usb_serial_device_type whiteheat_fake_device = {
+       name:                   "Connect Tech - WhiteHEAT - (prerenumeration)",
+       idVendor:               &connecttech_vendor_id,                 /* the Connect Tech vendor id */
+       idProduct:              &connecttech_whiteheat_fake_product_id, /* the White Heat initial product id */
+       needs_interrupt_in:     DONT_CARE,                              /* don't have to have an interrupt in endpoint */
+       needs_bulk_in:          DONT_CARE,                              /* don't have to have a bulk in endpoint */
+       needs_bulk_out:         DONT_CARE,                              /* don't have to have a bulk out endpoint */
+       num_interrupt_in:       NUM_DONT_CARE,
+       num_bulk_in:            NUM_DONT_CARE,
+       num_bulk_out:           NUM_DONT_CARE,
+       startup:                whiteheat_startup       
+};
+static struct usb_serial_device_type whiteheat_device = {
+       name:                   "Connect Tech - WhiteHEAT",
+       idVendor:               &connecttech_vendor_id,                 /* the Connect Tech vendor id */
+       idProduct:              &connecttech_whiteheat_product_id,      /* the White Heat real product id */
+       needs_interrupt_in:     DONT_CARE,                              /* don't have to have an interrupt in endpoint */
+       needs_bulk_in:          DONT_CARE,                              /* don't have to have a bulk in endpoint */
+       needs_bulk_out:         DONT_CARE,                              /* don't have to have a bulk out endpoint */
+       num_interrupt_in:       NUM_DONT_CARE,
+       num_bulk_in:            NUM_DONT_CARE,
+       num_bulk_out:           NUM_DONT_CARE,
+       num_ports:              4,
+       open:                   whiteheat_serial_open,
+       close:                  whiteheat_serial_close,
+       throttle:               whiteheat_throttle,
+       unthrottle:             whiteheat_unthrottle,
+       set_termios:            whiteheat_set_termios,
+};
+#endif
+
+
+#ifdef CONFIG_USB_SERIAL_VISOR
+
+/****************************************************************************
+ * Handspring Visor Vendor specific request codes (bRequest values)
+ * A big thank you to Handspring for providing the following information.
+ * If anyone wants the original file where these values and structures came
+ * from, send email to <greg@kroah.com>.
+ ****************************************************************************/
+
+/****************************************************************************
+ * VISOR_REQUEST_BYTES_AVAILABLE asks the visor for the number of bytes that
+ * are available to be transfered to the host for the specified endpoint.
+ * Currently this is not used, and always returns 0x0001
+ ****************************************************************************/
+#define VISOR_REQUEST_BYTES_AVAILABLE          0x01
+
+/****************************************************************************
+ * VISOR_CLOSE_NOTIFICATION is set to the device to notify it that the host
+ * is now closing the pipe. An empty packet is sent in response.
+ ****************************************************************************/
+#define VISOR_CLOSE_NOTIFICATION               0x02
+
+/****************************************************************************
+ * VISOR_GET_CONNECTION_INFORMATION is sent by the host during enumeration to
+ * get the endpoints used by the connection.
+ ****************************************************************************/
+#define VISOR_GET_CONNECTION_INFORMATION       0x03
+
+
+/****************************************************************************
+ * VISOR_GET_CONNECTION_INFORMATION returns data in the following format
+ ****************************************************************************/
+struct visor_connection_info {
+       __u16   num_ports;
+       struct {
+               __u8    port_function_id;
+               __u8    port;
+       } connections[2];
+};
+
+
+/* struct visor_connection_info.connection[x].port defines: */
+#define VISOR_ENDPOINT_1               0x01
+#define VISOR_ENDPOINT_2               0x02
+
+/* struct visor_connection_info.connection[x].port_function_id defines: */
+#define VISOR_FUNCTION_GENERIC         0x00
+#define VISOR_FUNCTION_DEBUGGER                0x01
+#define VISOR_FUNCTION_HOTSYNC         0x02
+#define VISOR_FUNCTION_CONSOLE         0x03
+#define VISOR_FUNCTION_REMOTE_FILE_SYS 0x04
+
+
+/* function prototypes for a handspring visor */
+static int  visor_serial_open          (struct tty_struct *tty, struct file *filp);
+static void visor_serial_close         (struct tty_struct *tty, struct file *filp);
+static void visor_throttle             (struct tty_struct *tty);
+static void visor_unthrottle           (struct tty_struct *tty);
+static int  visor_startup              (struct usb_serial *serial);
+
+/* All of the device info needed for the Handspring Visor */
+static __u16   handspring_vendor_id    = HANDSPRING_VENDOR_ID;
+static __u16   handspring_product_id   = HANDSPRING_VISOR_ID;
+static struct usb_serial_device_type handspring_device = {
+       name:                   "Handspring Visor",
+       idVendor:               &handspring_vendor_id,  /* the Handspring vendor ID */
+       idProduct:              &handspring_product_id, /* the Handspring Visor product id */
+       needs_interrupt_in:     MUST_HAVE_NOT,          /* this device must not have an interrupt in endpoint */
+       needs_bulk_in:          MUST_HAVE,              /* this device must have a bulk in endpoint */
+       needs_bulk_out:         MUST_HAVE,              /* this device must have a bulk out endpoint */
+       num_interrupt_in:       0,
+       num_bulk_in:            2,
+       num_bulk_out:           2,
+       num_ports:              2,
+       open:                   visor_serial_open,
+       close:                  visor_serial_close,
+       throttle:               visor_throttle,
+       unthrottle:             visor_unthrottle,
+       startup:                visor_startup,
+};
+#endif
+
+
+#ifdef CONFIG_USB_SERIAL_FTDI_SIO
+/* function prototypes for a FTDI serial converter */
+static int  ftdi_sio_serial_open       (struct tty_struct *tty, struct file *filp);
+static void ftdi_sio_serial_close      (struct tty_struct *tty, struct file *filp);
+static int  ftdi_sio_serial_write      (struct tty_struct *tty, int from_user, const unsigned char *buf, int count);
+static void ftdi_sio_read_bulk_callback        (struct urb *urb);
+static void ftdi_sio_set_termios               (struct tty_struct *tty, struct termios * old);
+static int ftdi_sio_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg);
+
+/* All of the device info needed for the FTDI SIO serial converter */
+static __u16   ftdi_vendor_id          = FTDI_VENDOR_ID;
+static __u16   ftdi_sio_product_id     = FTDI_SIO_SERIAL_CONVERTER_ID;
+static struct usb_serial_device_type ftdi_sio_device = {
+       name:                   "FTDI SIO",
+       idVendor:               &ftdi_vendor_id,        /* the FTDI vendor ID */
+       idProduct:              &ftdi_sio_product_id,   /* the FTDI SIO product id */
+       needs_interrupt_in:     MUST_HAVE_NOT,          /* this device must not have an interrupt in endpoint */
+       needs_bulk_in:          MUST_HAVE,              /* this device must have a bulk in endpoint */
+       needs_bulk_out:         MUST_HAVE,              /* this device must have a bulk out endpoint */
+       num_interrupt_in:       0,
+       num_bulk_in:            1,
+       num_bulk_out:           1,
+       num_ports:              1,
+       open:                   ftdi_sio_serial_open,
+       close:                  ftdi_sio_serial_close,
+       write:                  ftdi_sio_serial_write,
+       read_bulk_callback:     ftdi_sio_read_bulk_callback,
+       set_termios:            ftdi_sio_set_termios
+};
+#endif
+
+
+#ifdef CONFIG_USB_SERIAL_KEYSPAN_PDA
+/* function prototypes for a Keyspan PDA serial converter */
+static int  keyspan_pda_serial_open    (struct tty_struct *tty, 
+                                        struct file *filp);
+static void keyspan_pda_serial_close   (struct tty_struct *tty, 
+                                        struct file *filp);
+static int  keyspan_pda_startup                (struct usb_serial *serial);
+static void keyspan_pda_rx_throttle    (struct tty_struct *tty);
+static void keyspan_pda_rx_unthrottle  (struct tty_struct *tty);
+static int  keyspan_pda_setbaud                (struct usb_serial *serial, int baud);
+static int  keyspan_pda_write_room     (struct tty_struct *tty);
+static int  keyspan_pda_write          (struct tty_struct *tty,
+                                        int from_user,
+                                        const unsigned char *buf,
+                                        int count);
+static void keyspan_pda_write_bulk_callback (struct urb *urb);
+static int  keyspan_pda_chars_in_buffer (struct tty_struct *tty);
+static int  keyspan_pda_ioctl          (struct tty_struct *tty,
+                                        struct file *file,
+                                        unsigned int cmd,
+                                        unsigned long arg);
+static void keyspan_pda_set_termios    (struct tty_struct *tty,
+                                        struct termios *old);
+static void keyspan_pda_break_ctl      (struct tty_struct *tty,
+                                        int break_state);
+static int  keyspan_pda_fake_startup   (struct usb_serial *serial);
+
+/* All of the device info needed for the Keyspan PDA serial converter */
+static __u16   keyspan_vendor_id               = KEYSPAN_VENDOR_ID;
+static __u16   keyspan_pda_fake_product_id     = KEYSPAN_PDA_FAKE_ID;
+static __u16   keyspan_pda_product_id          = KEYSPAN_PDA_ID;
+static struct usb_serial_device_type keyspan_pda_fake_device = {
+       name:                   "Keyspan PDA - (prerenumeration)",
+       idVendor:               &keyspan_vendor_id,             /* the Keyspan PDA vendor ID */
+       idProduct:              &keyspan_pda_fake_product_id,   /* the Keyspan PDA initial product id */
+       needs_interrupt_in:     DONT_CARE,                      /* don't have to have an interrupt in endpoint */
+       needs_bulk_in:          DONT_CARE,                      /* don't have to have a bulk in endpoint */
+       needs_bulk_out:         DONT_CARE,                      /* don't have to have a bulk out endpoint */
+       num_interrupt_in:       NUM_DONT_CARE,
+       num_bulk_in:            NUM_DONT_CARE,
+       num_bulk_out:           NUM_DONT_CARE,
+       startup:                keyspan_pda_fake_startup
+};
+static struct usb_serial_device_type keyspan_pda_device = {
+       name:                   "Keyspan PDA",
+       idVendor:               &keyspan_vendor_id,             /* the Keyspan PDA vendor ID */
+       idProduct:              &keyspan_pda_product_id,        /* the Keyspan PDA product id */
+       needs_interrupt_in:     MUST_HAVE,
+       needs_bulk_in:          DONT_CARE,
+       needs_bulk_out:         MUST_HAVE,
+       num_interrupt_in:       1,
+       num_bulk_in:            0,
+       num_bulk_out:           1,
+       num_ports:              1,
+       open:                   keyspan_pda_serial_open,
+       close:                  keyspan_pda_serial_close,
+       write:                  keyspan_pda_write,
+       write_room:             keyspan_pda_write_room,
+       write_bulk_callback:    keyspan_pda_write_bulk_callback,
+       chars_in_buffer:        keyspan_pda_chars_in_buffer,
+       throttle:               keyspan_pda_rx_throttle,
+       unthrottle:             keyspan_pda_rx_unthrottle,
+       startup:                keyspan_pda_startup,
+       ioctl:                  keyspan_pda_ioctl,
+       set_termios:            keyspan_pda_set_termios,
+       break_ctl:              keyspan_pda_break_ctl,
+};
+#endif
+
+
+/* To add support for another serial converter, create a usb_serial_device_type
+   structure for that device, and add it to this list, making sure that the
+   last  entry is NULL. */
+static struct usb_serial_device_type *usb_serial_devices[] = {
+#ifdef CONFIG_USB_SERIAL_GENERIC
+       &generic_device,
+#endif
+#ifdef CONFIG_USB_SERIAL_WHITEHEAT
+       &whiteheat_fake_device,
+       &whiteheat_device,
+#endif
+#ifdef CONFIG_USB_SERIAL_VISOR
+       &handspring_device,
+#endif
+#ifdef CONFIG_USB_SERIAL_FTDI_SIO
+       &ftdi_sio_device,
+#endif
+#ifdef CONFIG_USB_SERIAL_KEYSPAN_PDA
+       &keyspan_pda_fake_device,
+       &keyspan_pda_device,
+#endif
+       NULL
+};
+
+
+/* determine if we should include the EzUSB loader functions */
+#if defined(CONFIG_USB_SERIAL_KEYSPAN_PDA) || defined(CONFIG_USB_SERIAL_WHITEHEAT)
+       #define USES_EZUSB_FUNCTIONS
+#else
+       #undef  USES_EZUSB_FUNCTIONS
+#endif
+
+#endif /* ifdef __LINUX_USB_SERIAL_H */
+
diff --git a/drivers/usb/serial/whiteheat.h b/drivers/usb/serial/whiteheat.h
new file mode 100644 (file)
index 0000000..d7053e3
--- /dev/null
@@ -0,0 +1,1542 @@
+/*****************************************************************************
+ *
+ *      whiteheat.h  --  ConnectTech WhiteHEAT Firmware.
+ *
+ *      Copyright (C) 2000  ConnectTech Inc (http://www.connecttech.com/)
+ *
+ *      This program is free software; you can redistribute it and/or modify
+ *      it under the terms of the GNU General Public License as published by
+ *      the Free Software Foundation; either version 2 of the License, or
+ *      (at your option) any later version.
+ *
+ *      This program is distributed in the hope that it will be useful,
+ *      but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *      GNU General Public License for more details.
+ *
+ *      You should have received a copy of the GNU General Public License
+ *      along with this program; if not, write to the Free Software
+ *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * (01/16/2000) gkh
+ *     Fixed my intel hex processing tool, so now the firmware actually
+ *     matches the original file (this was causing a few problems...)
+ *
+ * (01/15/2000) gkh
+ *     Added debug loader firmware if DEBUG is #defined:
+ *             Port 1 LED flashes when the vend_ax program is running
+ *             Port 2 LED flashes when any SETUP command arrives
+ *             Port 3 LED flashes when any valid VENDOR request occurs
+ *             Port 4 LED flashes when the EXTERNAL RAM DOWNLOAD request occurs
+ *
+ * version 1.0 (01/09/2000) gkh
+ *     Original firmware from ConnectTech massaged a little to be program
+ *     readable.
+ *
+ *****************************************************************************/
+
+#define whiteheat_DATE "20000106"
+
+struct whiteheat_hex_record {
+       __u16   address;
+       __u8    data_size;
+       __u8    data[16];
+};
+
+static const struct whiteheat_hex_record whiteheat_firmware[] = {
+{ 0x0000,      3,      {0x02, 0x91, 0xc9} },
+{ 0x0003,      3,      {0x02, 0x13, 0x12} },
+{ 0x000b,      3,      {0x02, 0x0a, 0x8d} },
+{ 0x0033,      3,      {0x02, 0x07, 0x84} },
+{ 0x0043,      3,      {0x02, 0x09, 0x00} },
+{ 0x0053,      3,      {0x02, 0x0f, 0x6e} },
+{ 0x005b,      3,      {0x02, 0x11, 0xb9} },
+{ 0x0300,      16,     {0x90, 0x7f, 0xe9, 0xe0, 0x70, 0x03, 0x02, 0x04, 0x03, 0x14, 0x70, 0x03, 0x02, 0x04, 0x77, 0x24} },
+{ 0x0310,      16,     {0xfe, 0x70, 0x03, 0x02, 0x04, 0xca, 0x24, 0xfb, 0x70, 0x03, 0x02, 0x03, 0xf4, 0x14, 0x70, 0x03} },
+{ 0x0320,      16,     {0x02, 0x03, 0xe2, 0x14, 0x70, 0x03, 0x02, 0x03, 0xca, 0x14, 0x70, 0x03, 0x02, 0x03, 0xd9, 0x24} },
+{ 0x0330,      16,     {0x05, 0x60, 0x03, 0x02, 0x05, 0x19, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60} },
+{ 0x0340,      16,     {0x36, 0x24, 0x02, 0x70, 0x7b, 0x74, 0x12, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5} },
+{ 0x0350,      16,     {0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x09, 0x58, 0xea, 0x49, 0x60, 0x0d} },
+{ 0x0360,      16,     {0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xb4} },
+{ 0x0370,      16,     {0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x08, 0xa9, 0xea} },
+{ 0x0380,      16,     {0x49, 0x60, 0x33, 0x12, 0x9a, 0x48, 0xf5, 0x5e, 0x90, 0x7f, 0xee, 0xe0, 0xff, 0xe5, 0x5e, 0xd3} },
+{ 0x0390,      16,     {0x9f, 0x40, 0x03, 0xe0, 0xf5, 0x5e, 0xe5, 0x5e, 0xd3, 0x94, 0x40, 0x40, 0x03, 0x75, 0x5e, 0x40} },
+{ 0x03a0,      16,     {0xae, 0x02, 0xaf, 0x01, 0x7c, 0x7f, 0x7d, 0x00, 0xab, 0x5e, 0x12, 0x1b, 0x0c, 0x90, 0x7f, 0xb5} },
+{ 0x03b0,      16,     {0xe5, 0x5e, 0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x20} },
+{ 0x03c0,      16,     {0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0x00, 0xe5, 0x21, 0xf0} },
+{ 0x03d0,      16,     {0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x21, 0x02} },
+{ 0x03e0,      16,     {0x05, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x31, 0xd2, 0x02, 0x43, 0x88, 0x10, 0xd2, 0xeb, 0xd2} },
+{ 0x03f0,      16,     {0xa8, 0x02, 0x05, 0x20, 0x90, 0x7f, 0x00, 0xe5, 0x31, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0} },
+{ 0x0400,      16,     {0x02, 0x05, 0x20, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02} },
+{ 0x0410,      16,     {0x70, 0x5b, 0xa2, 0x00, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x05, 0xe4, 0x33, 0x4f, 0x90} },
+{ 0x0420,      16,     {0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0x20, 0xe4} },
+{ 0x0430,      16,     {0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0x20, 0x90} },
+{ 0x0440,      16,     {0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25} },
+{ 0x0450,      16,     {0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0x01, 0x90, 0x7f, 0x00} },
+{ 0x0460,      16,     {0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xb4} },
+{ 0x0470,      16,     {0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24} },
+{ 0x0480,      16,     {0x02, 0x60, 0x03, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x00, 0x02} },
+{ 0x0490,      16,     {0x05, 0x20, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xea, 0xe0} },
+{ 0x04a0,      16,     {0x70, 0x1f, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54} },
+{ 0x04b0,      16,     {0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x80} },
+{ 0x04c0,      16,     {0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe} },
+{ 0x04d0,      16,     {0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x00, 0x80} },
+{ 0x04e0,      16,     {0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20} },
+{ 0x04f0,      16,     {0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f} },
+{ 0x0500,      16,     {0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10} },
+{ 0x0510,      16,     {0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0} },
+{ 0x0520,      7,      {0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0} },
+{ 0x0527,      1,      {0x22} },
+{ 0x0528,      16,     {0x75, 0x5a, 0xff, 0x75, 0x59, 0xff, 0x75, 0x58, 0x0f, 0x75, 0x57, 0x00, 0xd2, 0x03, 0xc2, 0x06} },
+{ 0x0538,      16,     {0xc2, 0x02, 0xc2, 0x00, 0xc2, 0x05, 0xc2, 0x01, 0x90, 0x02, 0x9e, 0x74, 0x19, 0xf0, 0xe4, 0x90} },
+{ 0x0548,      16,     {0x01, 0x5b, 0xf0, 0xc2, 0x04, 0x90, 0x01, 0x5e, 0xf0, 0xa3, 0xf0, 0xc2, 0xaf, 0xc2, 0xa8, 0x12} },
+{ 0x0558,      16,     {0x0a, 0xfa, 0xe4, 0x90, 0x02, 0x4d, 0xf0, 0x90, 0x01, 0x00, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3} },
+{ 0x0568,      16,     {0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x08, 0xf0, 0x7e} },
+{ 0x0578,      16,     {0x01, 0x7f, 0x00, 0x12, 0x19, 0xc1, 0x75, 0x5c, 0x12, 0x75, 0x5d, 0x0a, 0x90, 0x01, 0x0b, 0xe0} },
+{ 0x0588,      16,     {0xff, 0x05, 0x5d, 0xe5, 0x5d, 0xac, 0x5c, 0x70, 0x02, 0x05, 0x5c, 0x14, 0xf5, 0x82, 0x8c, 0x83} },
+{ 0x0598,      16,     {0xef, 0xf0, 0x90, 0x01, 0x0c, 0xe0, 0x44, 0x80, 0xff, 0x05, 0x5d, 0xe5, 0x5d, 0xac, 0x5c, 0x70} },
+{ 0x05a8,      16,     {0x02, 0x05, 0x5c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0d, 0xe0, 0xff, 0x05} },
+{ 0x05b8,      16,     {0x5d, 0xe5, 0x5d, 0xac, 0x5c, 0x70, 0x02, 0x05, 0x5c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
+{ 0x05c8,      16,     {0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x5d, 0xe5, 0x5d, 0xac, 0x5c, 0x70, 0x02, 0x05, 0x5c, 0x14} },
+{ 0x05d8,      16,     {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x12, 0x0a, 0xe4, 0x93, 0xff, 0x74, 0x01, 0x93, 0x90} },
+{ 0x05e8,      16,     {0x01, 0x1c, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0xff, 0xa3, 0xe0, 0xfe, 0xef} },
+{ 0x05f8,      16,     {0x6e, 0xff, 0x90, 0x01, 0x1c, 0xf0, 0xa3, 0xe0, 0x6f, 0xff, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0x6f} },
+{ 0x0608,      16,     {0xf0, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xe4, 0xfc, 0xfd, 0x75, 0x62, 0x10, 0x75, 0x63, 0x02, 0x75} },
+{ 0x0618,      16,     {0x64, 0x12, 0x75, 0x65, 0xac, 0x12, 0x8e, 0x35, 0x75, 0x5c, 0x12, 0x75, 0x5d, 0xb2, 0x90, 0x01} },
+{ 0x0628,      16,     {0x0d, 0xe0, 0xff, 0x05, 0x5d, 0xe5, 0x5d, 0xac, 0x5c, 0x70, 0x02, 0x05, 0x5c, 0x14, 0xf5, 0x82} },
+{ 0x0638,      16,     {0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x5d, 0xe5, 0x5d, 0xac, 0x5c, 0x70} },
+{ 0x0648,      16,     {0x02, 0x05, 0x5c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4} },
+{ 0x0658,      16,     {0x54, 0x0f, 0x24, 0x41, 0xff, 0x05, 0x5d, 0xe5, 0x5d, 0xac, 0x5c, 0x70, 0x02, 0x05, 0x5c, 0x14} },
+{ 0x0668,      16,     {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x05, 0x5d, 0xe5, 0x5d, 0xae, 0x5c, 0x70, 0x02, 0x05, 0x5c} },
+{ 0x0678,      16,     {0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x75, 0x82, 0x10, 0x75, 0x83, 0x01, 0xe0, 0xfc, 0xa3} },
+{ 0x0688,      16,     {0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x90, 0x01, 0x18, 0x12, 0x9b, 0xfb, 0x7e, 0x01} },
+{ 0x0698,      16,     {0x7f, 0x18, 0x12, 0x84, 0x61, 0x90, 0x01, 0x18, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} },
+{ 0x06a8,      16,     {0xa3, 0xe0, 0xff, 0x75, 0x62, 0x0a, 0x75, 0x63, 0x06, 0x75, 0x64, 0x12, 0x75, 0x65, 0xb8, 0x12} },
+{ 0x06b8,      16,     {0x8e, 0x35, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x53, 0x91, 0xef} },
+{ 0x06c8,      16,     {0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x1f, 0xf0, 0xd2, 0xaf} },
+{ 0x06d8,      16,     {0x20, 0x01, 0x2e, 0x20, 0x01, 0x2b, 0xa2, 0x03, 0x92, 0x07, 0x12, 0x09, 0xa7, 0x75, 0x56, 0x50} },
+{ 0x06e8,      16,     {0x75, 0x55, 0x6d, 0x75, 0x54, 0x33, 0x75, 0x53, 0x00, 0x20, 0x01, 0xe4, 0x7f, 0xff, 0x7e, 0xff} },
+{ 0x06f8,      16,     {0x7d, 0xff, 0x7c, 0xff, 0x78, 0x53, 0x12, 0x9b, 0xe4, 0xec, 0x4d, 0x4e, 0x4f, 0x60, 0xd1, 0x80} },
+{ 0x0708,      16,     {0xe8, 0x30, 0x01, 0x05, 0x12, 0x03, 0x00, 0xc2, 0x01, 0x30, 0x06, 0x0d, 0x12, 0x08, 0xfb, 0x50} },
+{ 0x0718,      16,     {0x06, 0x12, 0x0a, 0x00, 0x12, 0x09, 0xf4, 0xc2, 0x06, 0x12, 0x90, 0x58, 0x12, 0x98, 0x7d, 0xe4} },
+{ 0x0728,      16,     {0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x90, 0x01, 0x5b} },
+{ 0x0738,      16,     {0xe0, 0x5e, 0x60, 0x14, 0x74, 0x27, 0x2f, 0xf8, 0xe6, 0xd3, 0x94, 0x0a, 0x40, 0x04, 0x7e, 0x01} },
+{ 0x0748,      16,     {0x80, 0x02, 0x7e, 0x00, 0x8e, 0x5b, 0x80, 0x03, 0x75, 0x5b, 0x01, 0x74, 0x68, 0x2f, 0xf5, 0x82} },
+{ 0x0758,      16,     {0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe5, 0x5b, 0xf0, 0x0f, 0xbf, 0x04, 0xc5, 0xe5, 0x2b, 0xd3, 0x94} },
+{ 0x0768,      16,     {0x0a, 0x40, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x90, 0x20, 0x6c, 0xef, 0xf0, 0x90, 0x02} },
+{ 0x0778,      11,     {0x4d, 0xe0, 0x64, 0x0f, 0x70, 0x8b, 0x12, 0x93, 0x50, 0x80, 0x86} },
+{ 0x0783,      1,      {0x22} },
+{ 0x0784,      4,      {0x53, 0xd8, 0xef, 0x32} },
+{ 0x0788,      16,     {0xe4, 0x90, 0x7f, 0x9c, 0xf0, 0x7f, 0x0a, 0xfe, 0x12, 0x08, 0x92, 0x90, 0x7f, 0x96, 0x74, 0x89} },
+{ 0x0798,      16,     {0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xcf, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x08, 0x92, 0x90, 0x7f} },
+{ 0x07a8,      16,     {0x96, 0xe0, 0x54, 0xfe, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x7f, 0x02, 0x7d, 0xff} },
+{ 0x07b8,      16,     {0x12, 0x11, 0x4b, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x02} },
+{ 0x07c8,      16,     {0xf0, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x90, 0x7f, 0x96, 0xe0} },
+{ 0x07d8,      16,     {0x44, 0x40, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf} },
+{ 0x07e8,      16,     {0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f} },
+{ 0x07f8,      7,      {0x32, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x22} },
+{ 0x07ff,      16,     {0x90, 0x7f, 0x96, 0xe0, 0x54, 0xfd, 0xf0, 0xe0, 0x44, 0x80, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12} },
+{ 0x080f,      16,     {0x08, 0x92, 0x7f, 0x02, 0xe4, 0xfd, 0x12, 0x11, 0x4b, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92} },
+{ 0x081f,      16,     {0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x90, 0x7f} },
+{ 0x082f,      16,     {0x96, 0xe0, 0x44, 0x04, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x90, 0x7f, 0x96, 0xe0} },
+{ 0x083f,      16,     {0x54, 0xf7, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x01} },
+{ 0x084f,      12,     {0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x12, 0x0a, 0x00, 0x22} },
+{ 0x085b,      16,     {0x90, 0x11, 0xef, 0xe4, 0x93, 0x70, 0x2f, 0x90, 0x7f, 0x93, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x94} },
+{ 0x086b,      16,     {0x74, 0x3c, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc6, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90, 0x7f} },
+{ 0x087b,      16,     {0x9d, 0x74, 0x02, 0xf0, 0x90, 0x7f, 0xe2, 0x74, 0x12, 0xf0, 0x12, 0x07, 0x88, 0x75, 0x82, 0xef} },
+{ 0x088b,      7,      {0x75, 0x83, 0x11, 0x74, 0xff, 0xf0, 0x22} },
+{ 0x0892,      16,     {0x8e, 0x6d, 0x8f, 0x6e, 0xe5, 0x6e, 0x15, 0x6e, 0xae, 0x6d, 0x70, 0x02, 0x15, 0x6d, 0x4e, 0x60} },
+{ 0x08a2,      7,      {0x05, 0x12, 0x08, 0xea, 0x80, 0xee, 0x22} },
+{ 0x08a9,      2,      {0x8f, 0x5f} },
+{ 0x08ab,      16,     {0xe4, 0xf5, 0x60, 0x75, 0x61, 0xff, 0x75, 0x62, 0x12, 0x75, 0x63, 0x6a, 0xab, 0x61, 0xaa, 0x62} },
+{ 0x08bb,      16,     {0xa9, 0x63, 0x90, 0x00, 0x01, 0x12, 0x9a, 0x61, 0xb4, 0x03, 0x1d, 0xaf, 0x60, 0x05, 0x60, 0xef} },
+{ 0x08cb,      16,     {0xb5, 0x5f, 0x01, 0x22, 0x12, 0x9a, 0x48, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75} },
+{ 0x08db,      14,     {0x61, 0xff, 0xf5, 0x62, 0x89, 0x63, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
+{ 0x08e9,      1,      {0x22} },
+{ 0x08ea,      16,     {0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9} },
+{ 0x08fa,      1,      {0x22} },
+{ 0x08fb,      5,      {0x12, 0x07, 0xff, 0xd3, 0x22} },
+{ 0x0900,      16,     {0x02, 0x0b, 0x17, 0x00, 0x02, 0x0b, 0x4a, 0x00, 0x02, 0x0b, 0x2f, 0x00, 0x02, 0x0b, 0x89, 0x00} },
+{ 0x0910,      16,     {0x02, 0x0b, 0x73, 0x00, 0x02, 0x09, 0xf9, 0x00, 0x02, 0x09, 0xfa, 0x00, 0x02, 0x09, 0xfb, 0x00} },
+{ 0x0920,      16,     {0x02, 0x0b, 0xa4, 0x00, 0x02, 0x0c, 0x78, 0x00, 0x02, 0x0b, 0xd9, 0x00, 0x02, 0x0c, 0xc5, 0x00} },
+{ 0x0930,      16,     {0x02, 0x0c, 0x0e, 0x00, 0x02, 0x0d, 0x12, 0x00, 0x02, 0x0c, 0x43, 0x00, 0x02, 0x0d, 0x5f, 0x00} },
+{ 0x0940,      16,     {0x02, 0x09, 0xfc, 0x00, 0x02, 0x09, 0xfe, 0x00, 0x02, 0x09, 0xfd, 0x00, 0x02, 0x09, 0xff, 0x00} },
+{ 0x0950,      8,      {0x02, 0x0d, 0xac, 0x00, 0x02, 0x0d, 0xc2, 0x00} },
+{ 0x0958,      16,     {0xe4, 0xfe, 0x75, 0x61, 0xff, 0x75, 0x62, 0x12, 0x75, 0x63, 0x12, 0xab, 0x61, 0xaa, 0x62, 0xa9} },
+{ 0x0968,      16,     {0x63, 0x90, 0x00, 0x01, 0x12, 0x9a, 0x61, 0x64, 0x02, 0x70, 0x2d, 0xad, 0x06, 0x0e, 0xed, 0xb5} },
+{ 0x0978,      16,     {0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x9a, 0xba, 0x85, 0xf0, 0x5f, 0xf5, 0x60, 0x62, 0x5f} },
+{ 0x0988,      16,     {0xe5, 0x5f, 0x62, 0x60, 0xe5, 0x60, 0x62, 0x5f, 0x29, 0xfd, 0xe5, 0x5f, 0x3a, 0xa9, 0x05, 0x75} },
+{ 0x0998,      14,     {0x61, 0xff, 0xf5, 0x62, 0x89, 0x63, 0x80, 0xc3, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
+{ 0x09a6,      1,      {0x22} },
+{ 0x09a7,      16,     {0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x07, 0x04, 0xe0, 0x44} },
+{ 0x09b7,      16,     {0x02, 0xf0, 0x7f, 0xd0, 0x7e, 0x07, 0x12, 0x08, 0x92, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0} },
+{ 0x09c7,      5,      {0xe0, 0x44, 0x04, 0xf0, 0x22} },
+{ 0x09cc,      16,     {0x53, 0x8e, 0xf7, 0xe5, 0x89, 0x54, 0xf1, 0x44, 0x01, 0xf5, 0x89, 0x75, 0x8c, 0xb1, 0xd2, 0xa9} },
+{ 0x09dc,      16,     {0x75, 0x98, 0x40, 0x75, 0xcb, 0xff, 0x75, 0xca, 0xf3, 0x75, 0xc8, 0x34, 0xe4, 0xff, 0x7f, 0x05} },
+{ 0x09ec,      7,      {0x78, 0x27, 0xe4, 0xf6, 0x08, 0xdf, 0xfc} },
+{ 0x09f3,      1,      {0x22} },
+{ 0x09f4,      5,      {0x12, 0x07, 0x88, 0xd3, 0x22} },
+{ 0x09f9,      1,      {0x32} },
+{ 0x09fa,      1,      {0x32} },
+{ 0x09fb,      1,      {0x32} },
+{ 0x09fc,      1,      {0x32} },
+{ 0x09fd,      1,      {0x32} },
+{ 0x09fe,      1,      {0x32} },
+{ 0x09ff,      1,      {0x32} },
+{ 0x0a00,      9,      {0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x74} },
+{ 0x0a7d,      16,     {0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22} },
+{ 0x0a8d,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x00, 0xc0, 0x00, 0xc0, 0x06, 0xc0} },
+{ 0x0a9d,      1,      {0x07} },
+{ 0x0a9e,      16,     {0x30, 0x04, 0x16, 0x75, 0x8c, 0xf8, 0x75, 0x8a, 0x30, 0x7f, 0x2f, 0xae, 0x07, 0x1f, 0xee, 0x60} },
+{ 0x0aae,      16,     {0x3c, 0x90, 0x20, 0x00, 0x74, 0x55, 0xf0, 0x80, 0xf2, 0x75, 0x8c, 0xb1, 0x7f, 0x27, 0xef, 0xd3} },
+{ 0x0abe,      16,     {0x94, 0x2b, 0x50, 0x09, 0xa8, 0x07, 0xe6, 0x60, 0x01, 0x16, 0x0f, 0x80, 0xf1, 0x90, 0x02, 0x9e} },
+{ 0x0ace,      16,     {0xe0, 0x60, 0x02, 0x14, 0xf0, 0x90, 0x01, 0x5e, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x0e, 0x90} },
+{ 0x0ade,      13,     {0x01, 0x5f, 0xe0, 0x24, 0xff, 0xf0, 0x90, 0x01, 0x5e, 0xe0, 0x34, 0xff, 0xf0} },
+{ 0x0aeb,      15,     {0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x00, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0afa,      16,     {0xd2, 0x00, 0x75, 0x8e, 0x10, 0xe4, 0x90, 0x7f, 0x92, 0xf0, 0x12, 0x0f, 0x72, 0x12, 0x08, 0x5b} },
+{ 0x0b0a,      13,     {0x12, 0x0e, 0x0f, 0x12, 0x8f, 0x06, 0x12, 0x11, 0x9c, 0x12, 0x09, 0xcc, 0x22} },
+{ 0x0b17,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x01, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01} },
+{ 0x0b27,      8,      {0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0b2f,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f} },
+{ 0x0b3f,      11,     {0xab, 0x74, 0x04, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0b4a,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x02, 0xf0, 0x90} },
+{ 0x0b5a,      16,     {0x7f, 0xd8, 0xe0, 0x70, 0x0d, 0x90, 0x7f, 0xd9, 0xe0, 0x70, 0x07, 0xe5, 0x2b, 0x70, 0x03, 0x75} },
+{ 0x0b6a,      9,      {0x2b, 0x14, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0b73,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x10, 0xf0, 0xd0} },
+{ 0x0b83,      6,      {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0b89,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x30, 0x02, 0x02, 0xd2, 0x06, 0x53, 0x91, 0xef, 0x90, 0x7f} },
+{ 0x0b99,      11,     {0xab, 0x74, 0x08, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0ba4,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x02, 0xf0, 0xe5} },
+{ 0x0bb4,      16,     {0x30, 0x30, 0xe0, 0x13, 0xe5, 0x3b, 0x30, 0xe0, 0x07, 0x90, 0x20, 0x04, 0xe0, 0x44, 0x01, 0xf0} },
+{ 0x0bc4,      16,     {0x90, 0x20, 0x01, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0x82} },
+{ 0x0bd4,      5,      {0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0bd9,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x04, 0xf0, 0xe5} },
+{ 0x0be9,      16,     {0x30, 0x30, 0xe1, 0x13, 0xe5, 0x3b, 0x30, 0xe1, 0x07, 0x90, 0x20, 0x0c, 0xe0, 0x44, 0x01, 0xf0} },
+{ 0x0bf9,      16,     {0x90, 0x20, 0x09, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0x82} },
+{ 0x0c09,      5,      {0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0c0e,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x08, 0xf0, 0xe5} },
+{ 0x0c1e,      16,     {0x30, 0x30, 0xe2, 0x13, 0xe5, 0x3b, 0x30, 0xe2, 0x07, 0x90, 0x20, 0x14, 0xe0, 0x44, 0x01, 0xf0} },
+{ 0x0c2e,      16,     {0x90, 0x20, 0x11, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0x82} },
+{ 0x0c3e,      5,      {0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0c43,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x10, 0xf0, 0xe5} },
+{ 0x0c53,      16,     {0x30, 0x30, 0xe3, 0x13, 0xe5, 0x3b, 0x30, 0xe3, 0x07, 0x90, 0x20, 0x1c, 0xe0, 0x44, 0x01, 0xf0} },
+{ 0x0c63,      16,     {0x90, 0x20, 0x19, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0x82} },
+{ 0x0c73,      5,      {0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0c78,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x53} },
+{ 0x0c88,      16,     {0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x02, 0xf0, 0xe5, 0x30, 0x20, 0xe0, 0x06, 0x90, 0x7f, 0xc7} },
+{ 0x0c98,      16,     {0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe0, 0x0a, 0x90, 0x7f, 0xc7, 0xe0, 0x90, 0x02, 0x96, 0xf0} },
+{ 0x0ca8,      16,     {0x80, 0x07, 0x90, 0x20, 0x01, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b, 0x70, 0x03, 0x75, 0x2b, 0x14} },
+{ 0x0cb8,      13,     {0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0cc5,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x53} },
+{ 0x0cd5,      16,     {0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x04, 0xf0, 0xe5, 0x30, 0x20, 0xe1, 0x06, 0x90, 0x7f, 0xc9} },
+{ 0x0ce5,      16,     {0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe1, 0x0a, 0x90, 0x7f, 0xc9, 0xe0, 0x90, 0x02, 0x97, 0xf0} },
+{ 0x0cf5,      16,     {0x80, 0x07, 0x90, 0x20, 0x09, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b, 0x70, 0x03, 0x75, 0x2b, 0x14} },
+{ 0x0d05,      13,     {0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0d12,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x53} },
+{ 0x0d22,      16,     {0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x08, 0xf0, 0xe5, 0x30, 0x20, 0xe2, 0x06, 0x90, 0x7f, 0xcb} },
+{ 0x0d32,      16,     {0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe2, 0x0a, 0x90, 0x7f, 0xcb, 0xe0, 0x90, 0x02, 0x98, 0xf0} },
+{ 0x0d42,      16,     {0x80, 0x07, 0x90, 0x20, 0x11, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b, 0x70, 0x03, 0x75, 0x2b, 0x14} },
+{ 0x0d52,      13,     {0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0d5f,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x53} },
+{ 0x0d6f,      16,     {0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x10, 0xf0, 0xe5, 0x30, 0x20, 0xe3, 0x06, 0x90, 0x7f, 0xcd} },
+{ 0x0d7f,      16,     {0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe3, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x90, 0x02, 0x99, 0xf0} },
+{ 0x0d8f,      16,     {0x80, 0x07, 0x90, 0x20, 0x19, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b, 0x70, 0x03, 0x75, 0x2b, 0x14} },
+{ 0x0d9f,      13,     {0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0dac,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x80, 0xf0, 0xd0} },
+{ 0x0dbc,      6,      {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0dc2,      16,     {0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x00, 0xc0, 0x00, 0xc0} },
+{ 0x0dd2,      16,     {0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0x53, 0x91, 0xef} },
+{ 0x0de2,      16,     {0x90, 0x7f, 0xaa, 0x74, 0x80, 0xf0, 0x7e, 0x7b, 0x7f, 0x40, 0x12, 0x8c, 0xfb, 0x90, 0x7f, 0xd3} },
+{ 0x0df2,      16,     {0xe4, 0xf0, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01} },
+{ 0x0e02,      13,     {0xd0, 0x00, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32} },
+{ 0x0e0f,      16,     {0x90, 0x01, 0x20, 0x12, 0x9c, 0x07, 0x00, 0x00, 0x25, 0x80, 0x90, 0x01, 0x24, 0x74, 0x08, 0xf0} },
+{ 0x0e1f,      16,     {0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x6e, 0xf0, 0xa3, 0xf0, 0xe4, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3} },
+{ 0x0e2f,      16,     {0xf0, 0xa3, 0xf0, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0xc3, 0x94, 0x04, 0x50} },
+{ 0x0e3f,      16,     {0x13, 0xef, 0x04, 0xa3, 0xf0, 0x7e, 0x01, 0x7f, 0x1f, 0x12, 0x84, 0xf4, 0x90, 0x01, 0x1e, 0xe0} },
+{ 0x0e4f,      16,     {0x04, 0xf0, 0x80, 0xe3, 0xe4, 0xf5, 0x26, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff} },
+{ 0x0e5f,      16,     {0xc3, 0x94, 0x04, 0x50, 0x1a, 0x74, 0x96, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4} },
+{ 0x0e6f,      16,     {0xf0, 0x74, 0x22, 0x2f, 0xf8, 0xe4, 0xf6, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xdc, 0xe4} },
+{ 0x0e7f,      16,     {0xf5, 0x30, 0xe5, 0xc0, 0x60, 0x2f, 0x90, 0x01, 0x1e, 0x74, 0x01, 0xf0, 0x90, 0x01, 0x1e, 0xe0} },
+{ 0x0e8f,      16,     {0xff, 0xd3, 0x94, 0x04, 0x50, 0x1f, 0xef, 0x14, 0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02} },
+{ 0x0e9f,      16,     {0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x30, 0x7e, 0x01, 0x7f, 0x1e, 0x12, 0x82, 0xea, 0x90, 0x01, 0x1e} },
+{ 0x0eaf,      16,     {0xe0, 0x04, 0xf0, 0x80, 0xd7, 0xe4, 0xf5, 0x3a, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0} },
+{ 0x0ebf,      16,     {0xff, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x54} },
+{ 0x0ecf,      16,     {0xf0, 0xfe, 0x74, 0x63, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83, 0xee, 0xf0, 0x74, 0x36} },
+{ 0x0edf,      16,     {0x2f, 0xf8, 0xa6, 0x06, 0x74, 0x32, 0x2f, 0xf8, 0xe4, 0xf6, 0x74, 0x2c, 0x2f, 0xf8, 0xe4, 0xf6} },
+{ 0x0eef,      16,     {0x74, 0x9a, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x01, 0x1e, 0xe0} },
+{ 0x0eff,      16,     {0x04, 0xf0, 0xe0, 0xb4, 0x04, 0xb6, 0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xf5, 0x5e, 0x60, 0x5e} },
+{ 0x0f0f,      16,     {0xe4, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0xc3, 0x94, 0x04, 0x50, 0xe7, 0x74} },
+{ 0x0f1f,      16,     {0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x55, 0x5e, 0x60, 0x38, 0x90, 0x01} },
+{ 0x0f2f,      1,      {0x1e} },
+{ 0x0f30,      16,     {0xe0, 0xff, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0} },
+{ 0x0f40,      16,     {0xfe, 0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0} },
+{ 0x0f50,      16,     {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0xfe} },
+{ 0x0f60,      14,     {0x7d, 0x06, 0x12, 0x82, 0x60, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xa7, 0x22} },
+{ 0x0f6e,      4,      {0x53, 0x91, 0xbf, 0x32} },
+{ 0x0f72,      16,     {0x7b, 0xff, 0x7a, 0x12, 0x79, 0x1b, 0x90, 0x00, 0x04, 0x12, 0x9a, 0x61, 0xfd, 0x8b, 0x60, 0x75} },
+{ 0x0f82,      16,     {0x61, 0x12, 0x75, 0x62, 0x24, 0xe4, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x7f, 0xe0, 0xf0, 0xf5, 0x5e} },
+{ 0x0f92,      16,     {0xf5, 0x5f, 0x90, 0x02, 0x4c, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f} },
+{ 0x0fa2,      16,     {0xa9, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0xe4, 0xfc, 0xec, 0x25, 0xe0, 0x24, 0xb4, 0xf5} },
+{ 0x0fb2,      16,     {0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x0c, 0xbc, 0x10, 0xee, 0xe4, 0x90, 0x7f, 0xdd} },
+{ 0x0fc2,      16,     {0xf0, 0xaf, 0x05, 0x1d, 0xef, 0x70, 0x03, 0x02, 0x11, 0x38, 0xab, 0x60, 0xaa, 0x61, 0xa9, 0x62} },
+{ 0x0fd2,      16,     {0x90, 0x00, 0x01, 0x12, 0x9a, 0x61, 0x64, 0x05, 0x60, 0x03, 0x02, 0x11, 0x27, 0x90, 0x00, 0x03} },
+{ 0x0fe2,      16,     {0x12, 0x9a, 0x61, 0x64, 0x01, 0x60, 0x03, 0x02, 0x10, 0xae, 0x90, 0x00, 0x02, 0x12, 0x9a, 0x61} },
+{ 0x0ff2,      16,     {0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50, 0x03, 0x02, 0x10, 0x88, 0xec, 0xc3, 0x94, 0x10} },
+{ 0x1002,      16,     {0x40, 0x03, 0x02, 0x10, 0x88, 0xef, 0x30, 0xe7, 0x42, 0xe5, 0x5f, 0xae, 0x5e, 0x78, 0x02, 0xce} },
+{ 0x1012,      16,     {0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xf0, 0x2c, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5} },
+{ 0x1022,      16,     {0x83, 0xef, 0xf0, 0x90, 0x7f, 0xe0, 0xe0, 0xff, 0xec, 0x24, 0xf8, 0xfe, 0x74, 0x01, 0xa8, 0x06} },
+{ 0x1032,      16,     {0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x4f, 0x90, 0x7f, 0xe0, 0xf0, 0x90, 0x02, 0x4c, 0xe0} },
+{ 0x1042,      16,     {0x04, 0xf0, 0x90, 0x7f, 0xdd, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x3e, 0xe5, 0x5f, 0xae, 0x5e, 0x78} },
+{ 0x1052,      16,     {0x02, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xe8, 0x2c, 0xf5, 0x82, 0xe4, 0x34} },
+{ 0x1062,      16,     {0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0xe1, 0xe0, 0xff, 0xec, 0x24, 0xf8, 0xfe, 0x74, 0x01} },
+{ 0x1072,      16,     {0xa8, 0x06, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x4f, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x02} },
+{ 0x1082,      16,     {0x4c, 0xe0, 0x04, 0xf0, 0x80, 0x03, 0x7f, 0xff, 0x22, 0x90, 0x00, 0x04, 0x12, 0x9a, 0x61, 0x25} },
+{ 0x1092,      16,     {0x5f, 0xf5, 0x5f, 0xe4, 0x35, 0x5e, 0xf5, 0x5e, 0x90, 0x00, 0x05, 0x12, 0x9a, 0x61, 0xfe, 0xe4} },
+{ 0x10a2,      16,     {0x25, 0x5f, 0xf5, 0x5f, 0xee, 0x35, 0x5e, 0xf5, 0x5e, 0x02, 0x11, 0x2a, 0xab, 0x60, 0xaa, 0x61} },
+{ 0x10b2,      16,     {0xa9, 0x62, 0x90, 0x00, 0x03, 0x12, 0x9a, 0x61, 0xff, 0x64, 0x02, 0x60, 0x05, 0xef, 0x64, 0x03} },
+{ 0x10c2,      16,     {0x70, 0x60, 0x90, 0x00, 0x02, 0x12, 0x9a, 0x61, 0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50} },
+{ 0x10d2,      16,     {0x4e, 0xef, 0x30, 0xe7, 0x1e, 0x90, 0x7f, 0xde, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80} },
+{ 0x10e2,      16,     {0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x4f, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f, 0xac, 0xe0, 0x4e} },
+{ 0x10f2,      16,     {0xf0, 0x80, 0x35, 0x90, 0x7f, 0xdf, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80, 0x02, 0xc3} },
+{ 0x1102,      16,     {0x33, 0xd8, 0xfc, 0xfe, 0x4f, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xad, 0xe0, 0x4e, 0xf0, 0xec} },
+{ 0x1112,      16,     {0x25, 0xe0, 0x24, 0xc5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xec, 0xf0, 0x80, 0x09, 0x7f} },
+{ 0x1122,      16,     {0xff, 0x22, 0x7f, 0xff, 0x22, 0x7f, 0xff, 0x22, 0x74, 0x07, 0x25, 0x62, 0xf5, 0x62, 0xe4, 0x35} },
+{ 0x1132,      16,     {0x61, 0xf5, 0x61, 0x02, 0x0f, 0xc3, 0x20, 0x03, 0x0d, 0x90, 0x02, 0x4c, 0xe0, 0x60, 0x07, 0x90} },
+{ 0x1142,      8,      {0x7f, 0xae, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0x00} },
+{ 0x114a,      1,      {0x22} },
+{ 0x114b,      2,      {0xae, 0x07} },
+{ 0x114d,      16,     {0x7c, 0x02, 0xec, 0x14, 0x60, 0x15, 0x14, 0x70, 0x1e, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0} },
+{ 0x115d,      16,     {0xee, 0x25, 0xe0, 0x44, 0x40, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xa6, 0xed, 0xf0} },
+{ 0x116d,      16,     {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xfb, 0x30, 0xe0, 0xf8, 0xbc} },
+{ 0x117d,      16,     {0x02, 0x0a, 0x20, 0xe1, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22, 0xeb, 0x30, 0xe2, 0x0a} },
+{ 0x118d,      14,     {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xdc, 0xb6, 0x7f, 0x08} },
+{ 0x119b,      1,      {0x22} },
+{ 0x119c,      16,     {0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x7f, 0x02, 0x7d, 0xff, 0x12, 0x11, 0x4b, 0x7f, 0x05} },
+{ 0x11ac,      13,     {0x7e, 0x00, 0x12, 0x08, 0x92, 0x7f, 0x03, 0x7d, 0xff, 0x12, 0x11, 0x4b, 0x22} },
+{ 0x11b9,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc2, 0xa9, 0x90, 0x02, 0x9e, 0x74, 0x19, 0xf0, 0xd2, 0xa9} },
+{ 0x11c9,      15,     {0x53, 0x91, 0x7f, 0x90, 0x01, 0x62, 0xe4, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x11d8,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33} },
+{ 0x11e8,      7,      {0xd8, 0xfc, 0x42, 0x3a, 0x7f, 0x00, 0x22} },
+{ 0x11ef,      3,      {0x00, 0x02, 0x28} },
+{ 0x1200,      16,     {0x12, 0x01, 0x00, 0x01, 0xff, 0xff, 0xff, 0x40, 0x10, 0x07, 0x01, 0x80, 0x42, 0x00, 0x01, 0x02} },
+{ 0x1210,      16,     {0x03, 0x01, 0x09, 0x02, 0x58, 0x00, 0x01, 0x01, 0x04, 0x80, 0x3c, 0x09, 0x04, 0x00, 0x00, 0x0a} },
+{ 0x1220,      16,     {0xff, 0xff, 0xff, 0x05, 0x07, 0x05, 0x81, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x01, 0x02, 0x40} },
+{ 0x1230,      16,     {0x00, 0x00, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00} },
+{ 0x1240,      16,     {0x07, 0x05, 0x83, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05} },
+{ 0x1250,      16,     {0x84, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x87, 0x02} },
+{ 0x1260,      16,     {0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x04, 0x03, 0x09, 0x04, 0x24, 0x03} },
+{ 0x1270,      16,     {0x43, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x20, 0x00} },
+{ 0x1280,      16,     {0x54, 0x00, 0x65, 0x00, 0x63, 0x00, 0x68, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00} },
+{ 0x1290,      16,     {0x2e, 0x00, 0x18, 0x03, 0x57, 0x00, 0x68, 0x00, 0x69, 0x00, 0x74, 0x00, 0x65, 0x00, 0x48, 0x00} },
+{ 0x12a0,      16,     {0x45, 0x00, 0x41, 0x00, 0x54, 0x00, 0x2d, 0x00, 0x34, 0x00, 0x1a, 0x03, 0x58, 0x00, 0x58, 0x00} },
+{ 0x12b0,      16,     {0x2d, 0x00, 0x58, 0x00, 0x58, 0x00, 0x2d, 0x00, 0x58, 0x00, 0x58, 0x00, 0x58, 0x00, 0x58, 0x00} },
+{ 0x12c0,      16,     {0x58, 0x00, 0x58, 0x00, 0x2a, 0x03, 0x43, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x66, 0x00, 0x69, 0x00} },
+{ 0x12d0,      16,     {0x67, 0x00, 0x75, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00} },
+{ 0x12e0,      16,     {0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x22, 0x03} },
+{ 0x12f0,      16,     {0x49, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x66, 0x00, 0x61, 0x00, 0x63, 0x00} },
+{ 0x1300,      16,     {0x65, 0x00, 0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00} },
+{ 0x1310,      2,      {0x00, 0x00} },
+{ 0x1312,      16,     {0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0xc0, 0xd0} },
+{ 0x1322,      16,     {0x75, 0x86, 0x00, 0x75, 0xd0, 0x18, 0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xf5, 0xf0, 0x70, 0x11} },
+{ 0x1332,      16,     {0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0} },
+{ 0x1342,      16,     {0x32, 0x75, 0x86, 0x00, 0x10, 0xf0, 0x0b, 0x10, 0xf1, 0x12, 0x10, 0xf2, 0x19, 0x10, 0xf3, 0x20} },
+{ 0x1352,      16,     {0x80, 0xd4, 0xe5, 0x27, 0x70, 0x03, 0x75, 0x27, 0x14, 0x02, 0x13, 0x7c, 0xe5, 0x28, 0x70, 0x03} },
+{ 0x1362,      16,     {0x75, 0x28, 0x14, 0x02, 0x15, 0x0d, 0xe5, 0x29, 0x70, 0x03, 0x75, 0x29, 0x14, 0x02, 0x16, 0x9e} },
+{ 0x1372,      16,     {0xe5, 0x2a, 0x70, 0x03, 0x75, 0x2a, 0x14, 0x02, 0x18, 0x2f, 0x90, 0x20, 0x02, 0xe0, 0x54, 0x3f} },
+{ 0x1382,      16,     {0x20, 0xe2, 0x3a, 0x20, 0xe1, 0x0b, 0x20, 0xe4, 0x0b, 0x20, 0xe5, 0x14, 0x60, 0x09, 0x02, 0x13} },
+{ 0x1392,      16,     {0x43, 0x02, 0x14, 0x65, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0xf5, 0x36, 0x02, 0x13, 0x43} },
+{ 0x13a2,      16,     {0x43, 0x82, 0x04, 0xe0, 0x43, 0x2c, 0x01, 0x02, 0x13, 0x43, 0x53, 0x82, 0xf8, 0x43, 0x82, 0x05} },
+{ 0x13b2,      16,     {0xe0, 0x42, 0x32, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02, 0x13, 0x43, 0x30, 0xe1, 0x02} },
+{ 0x13c2,      16,     {0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x3b, 0x30, 0xe0, 0x0a, 0x53, 0x82, 0xf8, 0x43, 0x82, 0x04, 0xe0} },
+{ 0x13d2,      16,     {0x54, 0xfe, 0xf0, 0xe5, 0x85, 0x20, 0xe3, 0x56, 0x90, 0x20, 0x50, 0x74, 0x00, 0xf0, 0x90, 0x20} },
+{ 0x13e2,      16,     {0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xe3, 0x05, 0x86} },
+{ 0x13f2,      16,     {0x90, 0x7e, 0x80, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84, 0xf0, 0x05, 0x86, 0x90, 0x7f} },
+{ 0x1402,      16,     {0xe5, 0xe5, 0x3c, 0xfd, 0x03, 0x03, 0x03, 0xfe, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0} },
+{ 0x1412,      16,     {0xde, 0xf6, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0, 0x90} },
+{ 0x1422,      16,     {0x7f, 0xb7, 0xed, 0xf0, 0x90, 0x20, 0x01, 0xe0, 0x54, 0xfe, 0xf0, 0x02, 0x13, 0x43, 0x7f, 0x40} },
+{ 0x1432,      16,     {0x90, 0x7e, 0x80, 0x05, 0x86, 0x90, 0x20, 0x00, 0xe5, 0x84, 0xfe, 0x24, 0x05, 0xfd, 0x8d, 0x84} },
+{ 0x1442,      16,     {0xe0, 0x8e, 0x84, 0x30, 0xe0, 0x09, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xef, 0x05} },
+{ 0x1452,      16,     {0x86, 0xc3, 0x74, 0x40, 0x9f, 0x90, 0x7f, 0xb7, 0xf0, 0x05, 0x86, 0xa3, 0xe0, 0x54, 0xfe, 0xf0} },
+{ 0x1462,      16,     {0x02, 0x13, 0x43, 0x53, 0x2c, 0xfa, 0xe5, 0x22, 0x60, 0x08, 0x75, 0x22, 0x00, 0xd2, 0xe7, 0xfe} },
+{ 0x1472,      16,     {0x80, 0x0a, 0x90, 0x7f, 0xc7, 0xe0, 0xfe, 0x70, 0x03, 0x02, 0x14, 0xff, 0x90, 0x20, 0x50, 0x74} },
+{ 0x1482,      16,     {0x00, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0, 0x90} },
+{ 0x1492,      16,     {0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7e, 0x40, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84, 0xf0} },
+{ 0x14a2,      16,     {0x05, 0x86, 0x90, 0x7f, 0xe5, 0xee, 0x30, 0xe7, 0x08, 0x05, 0x86, 0xe0, 0x24, 0x38, 0xf0, 0x05} },
+{ 0x14b2,      16,     {0x86, 0xee, 0x54, 0x7f, 0xfe, 0x54, 0x07, 0xfb, 0xee, 0x54, 0x78, 0x60, 0x30, 0x03, 0x03, 0x03} },
+{ 0x14c2,      16,     {0x30, 0xe3, 0x04, 0x74, 0x07, 0x7b, 0x08, 0xfd, 0xfc, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0} },
+{ 0x14d2,      16,     {0xe0, 0xdd, 0xf6, 0xeb, 0xfe, 0x60, 0x19, 0xec, 0x64, 0x07, 0x70, 0x11, 0x8b, 0x22, 0x90, 0x7f} },
+{ 0x14e2,      16,     {0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0, 0x80, 0x1b, 0xe0, 0xde, 0xfd} },
+{ 0x14f2,      16,     {0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0, 0x90, 0x20, 0x01} },
+{ 0x1502,      16,     {0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xc7, 0xf0, 0x02, 0x13, 0x43, 0x90, 0x20, 0x0a, 0xe0, 0x54} },
+{ 0x1512,      16,     {0x3f, 0x20, 0xe2, 0x3a, 0x20, 0xe1, 0x0b, 0x20, 0xe4, 0x0b, 0x20, 0xe5, 0x14, 0x60, 0x09, 0x02} },
+{ 0x1522,      16,     {0x13, 0x43, 0x02, 0x15, 0xf6, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0xf5, 0x37, 0x02, 0x13} },
+{ 0x1532,      16,     {0x43, 0x43, 0x82, 0x04, 0xe0, 0x43, 0x2d, 0x01, 0x02, 0x13, 0x43, 0x53, 0x82, 0xf8, 0x43, 0x82} },
+{ 0x1542,      16,     {0x05, 0xe0, 0x42, 0x33, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02, 0x13, 0x43, 0x30, 0xe1} },
+{ 0x1552,      16,     {0x02, 0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x3b, 0x30, 0xe1, 0x0a, 0x53, 0x82, 0xf8, 0x43, 0x82, 0x04} },
+{ 0x1562,      16,     {0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x85, 0x20, 0xe3, 0x56, 0x90, 0x20, 0x50, 0x74, 0x01, 0xf0, 0x90} },
+{ 0x1572,      16,     {0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xe3, 0x05} },
+{ 0x1582,      16,     {0x86, 0x90, 0x7e, 0x00, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84, 0xf0, 0x05, 0x86, 0x90} },
+{ 0x1592,      16,     {0x7f, 0xe5, 0xe5, 0x3d, 0xfd, 0x03, 0x03, 0x03, 0xfe, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0} },
+{ 0x15a2,      16,     {0xf0, 0xde, 0xf6, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0} },
+{ 0x15b2,      16,     {0x90, 0x7f, 0xb9, 0xed, 0xf0, 0x90, 0x20, 0x09, 0xe0, 0x54, 0xfe, 0xf0, 0x02, 0x13, 0x43, 0x7f} },
+{ 0x15c2,      16,     {0x40, 0x90, 0x7e, 0x00, 0x05, 0x86, 0x90, 0x20, 0x08, 0xe5, 0x84, 0xfe, 0x24, 0x05, 0xfd, 0x8d} },
+{ 0x15d2,      16,     {0x84, 0xe0, 0x8e, 0x84, 0x30, 0xe0, 0x09, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xef} },
+{ 0x15e2,      16,     {0x05, 0x86, 0xc3, 0x74, 0x40, 0x9f, 0x90, 0x7f, 0xb9, 0xf0, 0x05, 0x86, 0xa3, 0xe0, 0x54, 0xfe} },
+{ 0x15f2,      16,     {0xf0, 0x02, 0x13, 0x43, 0x53, 0x2d, 0xfa, 0xe5, 0x23, 0x60, 0x08, 0x75, 0x23, 0x00, 0xd2, 0xe7} },
+{ 0x1602,      16,     {0xfe, 0x80, 0x0a, 0x90, 0x7f, 0xc9, 0xe0, 0xfe, 0x70, 0x03, 0x02, 0x16, 0x90, 0x90, 0x20, 0x50} },
+{ 0x1612,      16,     {0x74, 0x01, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0} },
+{ 0x1622,      16,     {0x90, 0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7d, 0xc0, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84} },
+{ 0x1632,      16,     {0xf0, 0x05, 0x86, 0x90, 0x7f, 0xe5, 0xee, 0x30, 0xe7, 0x08, 0x05, 0x86, 0xe0, 0x24, 0x38, 0xf0} },
+{ 0x1642,      16,     {0x05, 0x86, 0xee, 0x54, 0x7f, 0xfe, 0x54, 0x07, 0xfb, 0xee, 0x54, 0x78, 0x60, 0x30, 0x03, 0x03} },
+{ 0x1652,      16,     {0x03, 0x30, 0xe3, 0x04, 0x74, 0x07, 0x7b, 0x08, 0xfd, 0xfc, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0} },
+{ 0x1662,      16,     {0xe0, 0xe0, 0xdd, 0xf6, 0xeb, 0xfe, 0x60, 0x19, 0xec, 0x64, 0x07, 0x70, 0x11, 0x8b, 0x23, 0x90} },
+{ 0x1672,      16,     {0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0, 0x80, 0x1b, 0xe0, 0xde} },
+{ 0x1682,      14,     {0xfd, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0} },
+{ 0x1690,      16,     {0x90, 0x20, 0x09, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x02, 0x13, 0x43, 0x90, 0x20} },
+{ 0x16a0,      16,     {0x12, 0xe0, 0x54, 0x3f, 0x20, 0xe2, 0x3a, 0x20, 0xe1, 0x0b, 0x20, 0xe4, 0x0b, 0x20, 0xe5, 0x14} },
+{ 0x16b0,      16,     {0x60, 0x09, 0x02, 0x13, 0x43, 0x02, 0x17, 0x87, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0xf5} },
+{ 0x16c0,      16,     {0x38, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0x43, 0x2e, 0x01, 0x02, 0x13, 0x43, 0x53, 0x82} },
+{ 0x16d0,      16,     {0xf8, 0x43, 0x82, 0x05, 0xe0, 0x42, 0x34, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02, 0x13} },
+{ 0x16e0,      16,     {0x43, 0x30, 0xe1, 0x02, 0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x3b, 0x30, 0xe2, 0x0a, 0x53, 0x82, 0xf8} },
+{ 0x16f0,      16,     {0x43, 0x82, 0x04, 0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x85, 0x20, 0xe3, 0x56, 0x90, 0x20, 0x50, 0x74} },
+{ 0x1700,      16,     {0x02, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0, 0x90} },
+{ 0x1710,      16,     {0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7d, 0x80, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84, 0xf0} },
+{ 0x1720,      16,     {0x05, 0x86, 0x90, 0x7f, 0xe5, 0xe5, 0x3e, 0xfd, 0x03, 0x03, 0x03, 0xfe, 0xf0, 0xf0, 0xf0, 0xf0} },
+{ 0x1730,      16,     {0xf0, 0xf0, 0xf0, 0xf0, 0xde, 0xf6, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58} },
+{ 0x1740,      16,     {0x74, 0x00, 0xf0, 0x90, 0x7f, 0xbb, 0xed, 0xf0, 0x90, 0x20, 0x11, 0xe0, 0x54, 0xfe, 0xf0, 0x02} },
+{ 0x1750,      16,     {0x13, 0x43, 0x7f, 0x40, 0x90, 0x7d, 0x80, 0x05, 0x86, 0x90, 0x20, 0x10, 0xe5, 0x84, 0xfe, 0x24} },
+{ 0x1760,      16,     {0x05, 0xfd, 0x8d, 0x84, 0xe0, 0x8e, 0x84, 0x30, 0xe0, 0x09, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05} },
+{ 0x1770,      16,     {0x86, 0xdf, 0xef, 0x05, 0x86, 0xc3, 0x74, 0x40, 0x9f, 0x90, 0x7f, 0xbb, 0xf0, 0x05, 0x86, 0xa3} },
+{ 0x1780,      16,     {0xe0, 0x54, 0xfe, 0xf0, 0x02, 0x13, 0x43, 0x53, 0x2e, 0xfa, 0xe5, 0x24, 0x60, 0x08, 0x75, 0x24} },
+{ 0x1790,      16,     {0x00, 0xd2, 0xe7, 0xfe, 0x80, 0x0a, 0x90, 0x7f, 0xcb, 0xe0, 0xfe, 0x70, 0x03, 0x02, 0x18, 0x21} },
+{ 0x17a0,      16,     {0x90, 0x20, 0x50, 0x74, 0x02, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0} },
+{ 0x17b0,      16,     {0x44, 0x40, 0xf0, 0x90, 0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7d, 0x40, 0x05, 0x86, 0xe5, 0x85, 0xf0} },
+{ 0x17c0,      16,     {0xa3, 0xe5, 0x84, 0xf0, 0x05, 0x86, 0x90, 0x7f, 0xe5, 0xee, 0x30, 0xe7, 0x08, 0x05, 0x86, 0xe0} },
+{ 0x17d0,      16,     {0x24, 0x38, 0xf0, 0x05, 0x86, 0xee, 0x54, 0x7f, 0xfe, 0x54, 0x07, 0xfb, 0xee, 0x54, 0x78, 0x60} },
+{ 0x17e0,      16,     {0x30, 0x03, 0x03, 0x03, 0x30, 0xe3, 0x04, 0x74, 0x07, 0x7b, 0x08, 0xfd, 0xfc, 0xe0, 0xe0, 0xe0} },
+{ 0x17f0,      16,     {0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xdd, 0xf6, 0xeb, 0xfe, 0x60, 0x19, 0xec, 0x64, 0x07, 0x70, 0x11} },
+{ 0x1800,      16,     {0x8b, 0x24, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0, 0x80} },
+{ 0x1810,      16,     {0x1b, 0xe0, 0xde, 0xfd, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00} },
+{ 0x1820,      16,     {0xf0, 0x90, 0x20, 0x11, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xcb, 0xf0, 0x02, 0x13, 0x43, 0x90} },
+{ 0x1830,      16,     {0x20, 0x1a, 0xe0, 0x54, 0x3f, 0x20, 0xe2, 0x3a, 0x20, 0xe1, 0x0b, 0x20, 0xe4, 0x0b, 0x20, 0xe5} },
+{ 0x1840,      16,     {0x14, 0x60, 0x09, 0x02, 0x13, 0x43, 0x02, 0x19, 0x18, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0} },
+{ 0x1850,      16,     {0xf5, 0x39, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0x43, 0x2f, 0x01, 0x02, 0x13, 0x43, 0x53} },
+{ 0x1860,      16,     {0x82, 0xf8, 0x43, 0x82, 0x05, 0xe0, 0x42, 0x35, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02} },
+{ 0x1870,      16,     {0x13, 0x43, 0x30, 0xe1, 0x02, 0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x3b, 0x30, 0xe3, 0x0a, 0x53, 0x82} },
+{ 0x1880,      16,     {0xf8, 0x43, 0x82, 0x04, 0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x85, 0x20, 0xe3, 0x56, 0x90, 0x20, 0x50} },
+{ 0x1890,      16,     {0x74, 0x03, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0} },
+{ 0x18a0,      16,     {0x90, 0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7d, 0x00, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84} },
+{ 0x18b0,      16,     {0xf0, 0x05, 0x86, 0x90, 0x7f, 0xe5, 0xe5, 0x3f, 0xfd, 0x03, 0x03, 0x03, 0xfe, 0xf0, 0xf0, 0xf0} },
+{ 0x18c0,      16,     {0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xde, 0xf6, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20} },
+{ 0x18d0,      16,     {0x58, 0x74, 0x00, 0xf0, 0x90, 0x7f, 0xbd, 0xed, 0xf0, 0x90, 0x20, 0x19, 0xe0, 0x54, 0xfe, 0xf0} },
+{ 0x18e0,      16,     {0x02, 0x13, 0x43, 0x7f, 0x40, 0x90, 0x7d, 0x00, 0x05, 0x86, 0x90, 0x20, 0x18, 0xe5, 0x84, 0xfe} },
+{ 0x18f0,      16,     {0x24, 0x05, 0xfd, 0x8d, 0x84, 0xe0, 0x8e, 0x84, 0x30, 0xe0, 0x09, 0xe0, 0x05, 0x86, 0xf0, 0xa3} },
+{ 0x1900,      16,     {0x05, 0x86, 0xdf, 0xef, 0x05, 0x86, 0xc3, 0x74, 0x40, 0x9f, 0x90, 0x7f, 0xbd, 0xf0, 0x05, 0x86} },
+{ 0x1910,      16,     {0xa3, 0xe0, 0x54, 0xfe, 0xf0, 0x02, 0x13, 0x43, 0x53, 0x2f, 0xfa, 0xe5, 0x25, 0x60, 0x08, 0x75} },
+{ 0x1920,      16,     {0x25, 0x00, 0xd2, 0xe7, 0xfe, 0x80, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0xfe, 0x70, 0x03, 0x02, 0x19} },
+{ 0x1930,      16,     {0xb2, 0x90, 0x20, 0x50, 0x74, 0x03, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2} },
+{ 0x1940,      16,     {0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7c, 0xc0, 0x05, 0x86, 0xe5, 0x85} },
+{ 0x1950,      16,     {0xf0, 0xa3, 0xe5, 0x84, 0xf0, 0x05, 0x86, 0x90, 0x7f, 0xe5, 0xee, 0x30, 0xe7, 0x08, 0x05, 0x86} },
+{ 0x1960,      16,     {0xe0, 0x24, 0x38, 0xf0, 0x05, 0x86, 0xee, 0x54, 0x7f, 0xfe, 0x54, 0x07, 0xfb, 0xee, 0x54, 0x78} },
+{ 0x1970,      16,     {0x60, 0x30, 0x03, 0x03, 0x03, 0x30, 0xe3, 0x04, 0x74, 0x07, 0x7b, 0x08, 0xfd, 0xfc, 0xe0, 0xe0} },
+{ 0x1980,      16,     {0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xdd, 0xf6, 0xeb, 0xfe, 0x60, 0x19, 0xec, 0x64, 0x07, 0x70} },
+{ 0x1990,      16,     {0x11, 0x8b, 0x25, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0} },
+{ 0x19a0,      16,     {0x80, 0x1b, 0xe0, 0xde, 0xfd, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74} },
+{ 0x19b0,      16,     {0x00, 0xf0, 0x90, 0x20, 0x19, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xcd, 0xf0, 0x02, 0x13, 0x43} },
+{ 0x19c0,      1,      {0x32} },
+{ 0x19c1,      4,      {0xad, 0x07, 0xac, 0x06} },
+{ 0x19c5,      16,     {0x79, 0x06, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb} },
+{ 0x19d5,      16,     {0x4a, 0x70, 0x03, 0x02, 0x1b, 0x09, 0xe9, 0xb4, 0x07, 0x00, 0x40, 0x03, 0x02, 0x1a, 0xdb, 0x90} },
+{ 0x19e5,      16,     {0x19, 0xeb, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x1a, 0xb9, 0x02, 0x1a, 0x71, 0x02, 0x1a, 0x5a, 0x02} },
+{ 0x19f5,      16,     {0x1a, 0x40, 0x02, 0x1a, 0x2f, 0x02, 0x1a, 0x1a, 0x02, 0x1a, 0x00, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
+{ 0x1a05,      16,     {0x80, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90, 0x7f, 0xa6} },
+{ 0x1a15,      16,     {0xf0, 0x19, 0x02, 0x1a, 0xdb, 0x19, 0x8d, 0x82, 0x8c, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x0a} },
+{ 0x1a25,      16,     {0xa3, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x02, 0x1a, 0xdb, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} },
+{ 0x1a35,      16,     {0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x19, 0x02, 0x1a, 0xdb, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
+{ 0x1a45,      16,     {0x80, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa1, 0x90, 0x7f, 0xa6} },
+{ 0x1a55,      16,     {0xf0, 0x19, 0x02, 0x1a, 0xdb, 0xeb, 0x64, 0x01, 0x4a, 0x70, 0x08, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
+{ 0x1a65,      16,     {0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xf5, 0x69, 0x19, 0x80, 0x6a, 0xed, 0x24, 0x04, 0xf5} },
+{ 0x1a75,      16,     {0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfe, 0xa3, 0xe0, 0x64, 0x02, 0x4e, 0x70, 0x08, 0x90, 0x7f} },
+{ 0x1a85,      16,     {0xa5, 0xe0, 0x44, 0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xff, 0xed, 0x24, 0x06, 0xf5, 0x82} },
+{ 0x1a95,      16,     {0xe4, 0x3c, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83} },
+{ 0x1aa5,      16,     {0xef, 0xf0, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12} },
+{ 0x1ab5,      16,     {0x9a, 0x8e, 0x80, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xff} },
+{ 0x1ac5,      16,     {0xed, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xf5, 0x82, 0x8a} },
+{ 0x1ad5,      16,     {0x83, 0xef, 0xf0, 0x7f, 0x08, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x69, 0x30, 0xe0, 0xf7, 0x30} },
+{ 0x1ae5,      16,     {0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xe9, 0xd3, 0x94, 0x02, 0x50, 0x03, 0x02} },
+{ 0x1af5,      16,     {0x19, 0xc7, 0xe5, 0x69, 0x30, 0xe1, 0x03, 0x02, 0x19, 0xc7, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40} },
+{ 0x1b05,      6,      {0xf0, 0x7f, 0x07, 0x22, 0x7f, 0x08} },
+{ 0x1b0b,      1,      {0x22} },
+{ 0x1b0c,      16,     {0x8e, 0x5f, 0x8f, 0x60, 0x8c, 0x61, 0x8d, 0x62, 0xaf, 0x03, 0x1b, 0xef, 0x60, 0x24, 0x05, 0x60} },
+{ 0x1b1c,      16,     {0xe5, 0x60, 0xae, 0x5f, 0x70, 0x02, 0x05, 0x5f, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05} },
+{ 0x1b2c,      16,     {0x62, 0xe5, 0x62, 0xac, 0x61, 0x70, 0x02, 0x05, 0x61, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
+{ 0x1b3c,      3,      {0x80, 0xd6, 0x22} },
+{ 0x8000,      4,      {0x8e, 0x69, 0x8f, 0x6a} },
+{ 0x8004,      16,     {0x75, 0x6b, 0x03, 0xe5, 0x6a, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x69, 0xf5, 0x83, 0xe0, 0xfe} },
+{ 0x8014,      16,     {0xa3, 0xe0, 0x4e, 0x70, 0x03, 0x02, 0x81, 0x0e, 0xe5, 0x6b, 0x60, 0x4e, 0x14, 0x60, 0x38, 0x14} },
+{ 0x8024,      16,     {0x60, 0x20, 0x14, 0x60, 0x03, 0x02, 0x80, 0xb2, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0x85} },
+{ 0x8034,      16,     {0x6a, 0x82, 0x85, 0x69, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90, 0x7f, 0xa6, 0xf0} },
+{ 0x8044,      16,     {0x80, 0x6c, 0x85, 0x6a, 0x82, 0x85, 0x69, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x09, 0xa3, 0xa3} },
+{ 0x8054,      16,     {0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x57, 0x15, 0x6b, 0x85, 0x6a, 0x82, 0x85, 0x69, 0x83, 0xa3} },
+{ 0x8064,      16,     {0xa3, 0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x44, 0xe5, 0x6a, 0x24, 0x06, 0xf5, 0x82} },
+{ 0x8074,      16,     {0xe4, 0x35, 0x69, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a, 0xa4, 0x85, 0xf0, 0x82, 0xf5} },
+{ 0x8084,      16,     {0x83, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe5, 0x6a, 0x24} },
+{ 0x8094,      16,     {0x04, 0xf5, 0x82, 0xe4, 0x35, 0x69, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12, 0x9a, 0x8e, 0x85} },
+{ 0x80a4,      16,     {0x6a, 0x82, 0x85, 0x69, 0x83, 0xa3, 0xa3, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a, 0x8e, 0x90, 0x7f} },
+{ 0x80b4,      16,     {0xa5, 0xe0, 0xf5, 0x6c, 0x30, 0xe0, 0xf7, 0x30, 0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06} },
+{ 0x80c4,      16,     {0x22, 0xe5, 0x6c, 0x20, 0xe1, 0x0a, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22} },
+{ 0x80d4,      16,     {0xe5, 0x6b, 0x70, 0x31, 0x7f, 0x01, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
+{ 0x80e4,      16,     {0x80, 0xf0, 0x85, 0x6a, 0x82, 0x85, 0x69, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90} },
+{ 0x80f4,      16,     {0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x6c, 0x30, 0xe0, 0xf7, 0x30, 0xe1, 0xd5, 0x75} },
+{ 0x8104,      12,     {0x6b, 0x03, 0x02, 0x80, 0x07, 0x15, 0x6b, 0x02, 0x80, 0x07, 0x7f, 0x08} },
+{ 0x8110,      1,      {0x22} },
+{ 0x8111,      2,      {0xac, 0x07} },
+{ 0x8113,      16,     {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xec, 0x25, 0xe0, 0x44, 0x41, 0x90, 0x7f, 0xa6, 0xf0} },
+{ 0x8123,      16,     {0x7b, 0x3c, 0xaf, 0x03, 0x1b, 0xef, 0x70, 0x16, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90} },
+{ 0x8133,      16,     {0x7f, 0xa6, 0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x60, 0xd4, 0x80, 0xf8, 0x90, 0x7f} },
+{ 0x8143,      16,     {0xa5, 0xe0, 0xfd, 0x30, 0xe0, 0xdc, 0x20, 0xe1, 0x09, 0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f} },
+{ 0x8153,      16,     {0xf9, 0x22, 0xed, 0x30, 0xe2, 0x0c, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f} },
+{ 0x8163,      16,     {0xfa, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0x7b, 0x1e} },
+{ 0x8173,      16,     {0xaf, 0x03, 0x1b, 0xef, 0x70, 0x16, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6} },
+{ 0x8183,      16,     {0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x60, 0x86, 0x80, 0xf8, 0x90, 0x7f, 0xa5, 0xe0} },
+{ 0x8193,      16,     {0xfd, 0x20, 0xe0, 0xdc, 0x7b, 0x3c, 0xaf, 0x03, 0x1b, 0xef, 0x70, 0x19, 0x90, 0x7f, 0xa5, 0xe0} },
+{ 0x81a3,      16,     {0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x70, 0x03} },
+{ 0x81b3,      16,     {0x02, 0x81, 0x13, 0x80, 0xf5, 0x90, 0x7f, 0xa5, 0xe0, 0xfd, 0x30, 0xe0, 0xd9, 0x30, 0xe2, 0x09} },
+{ 0x81c3,      16,     {0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f, 0xfa, 0x22, 0xc2, 0xaf, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
+{ 0x81d3,      12,     {0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0xd2, 0xaf, 0xff, 0x7e, 0x00} },
+{ 0x81df,      1,      {0x22} },
+{ 0x81e0,      16,     {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xf5} },
+{ 0x81f0,      16,     {0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xf9, 0x74, 0xbf, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0} },
+{ 0x8200,      16,     {0x44, 0x10, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0xe4, 0xf0, 0x8b, 0x82, 0x8a, 0x83} },
+{ 0x8210,      16,     {0xa3, 0xf0, 0xed, 0x60, 0x29, 0x74, 0x01, 0x7e, 0x00, 0xa8, 0x07, 0x08, 0x80, 0x05, 0xc3, 0x33} },
+{ 0x8220,      16,     {0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4, 0xef, 0x55, 0x3b, 0x60, 0x0a, 0x8b, 0x82, 0x8a, 0x83} },
+{ 0x8230,      16,     {0xa3, 0x74, 0x01, 0xf0, 0x80, 0x08, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0x74, 0xad, 0xf0, 0x8b, 0x82} },
+{ 0x8240,      16,     {0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0x74, 0xbf, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0, 0x54} },
+{ 0x8250,      15,     {0xef, 0xf0, 0xae, 0x02, 0xaf, 0x03, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe9, 0xf0} },
+{ 0x825f,      1,      {0x22} },
+{ 0x8260,      4,      {0x8f, 0x68, 0x8d, 0x69} },
+{ 0x8264,      16,     {0xe4, 0xf5, 0x6a, 0x74, 0x3c, 0x2f, 0xf8, 0x76, 0x08, 0xe5, 0x68, 0x75, 0xf0, 0x0d, 0xa4, 0x24} },
+{ 0x8274,      16,     {0xa0, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} },
+{ 0x8284,      16,     {0xa3, 0xe0, 0xff, 0x7b, 0x80, 0x7a, 0x25, 0x79, 0x00, 0x78, 0x00, 0xc3, 0x12, 0x9b, 0xc0, 0x50} },
+{ 0x8294,      16,     {0x3c, 0xe5, 0x68, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0xa0, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83} },
+{ 0x82a4,      16,     {0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x00, 0x7a, 0x96, 0x78} },
+{ 0x82b4,      16,     {0x00, 0xc3, 0x12, 0x9b, 0xc0, 0x40, 0x0c, 0x75, 0x6a, 0x40, 0x74, 0x3c, 0x25, 0x68, 0xf8, 0x76} },
+{ 0x82c4,      16,     {0x10, 0x80, 0x0a, 0x75, 0x6a, 0x80, 0x74, 0x3c, 0x25, 0x68, 0xf8, 0x76, 0x38, 0xe5, 0x6a, 0x45} },
+{ 0x82d4,      16,     {0x69, 0x44, 0x01, 0xff, 0xe5, 0x68, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34} },
+{ 0x82e4,      5,      {0x20, 0xf5, 0x83, 0xef, 0xf0} },
+{ 0x82e9,      1,      {0x22} },
+{ 0x82ea,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x5f, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82} },
+{ 0x82fa,      16,     {0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x61, 0x8f, 0x62, 0xf5, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5} },
+{ 0x830a,      16,     {0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x44, 0x03, 0xf0, 0xaf, 0x5f, 0x7d, 0x06, 0x12, 0x82} },
+{ 0x831a,      16,     {0x60, 0xaf, 0x5f, 0x7d, 0x01, 0x12, 0x81, 0xe0, 0x85, 0x62, 0x82, 0x85, 0x61, 0x83, 0xa3, 0xa3} },
+{ 0x832a,      16,     {0xe0, 0x20, 0xe0, 0x28, 0xe0, 0xf5, 0x60, 0xe5, 0x62, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x61} },
+{ 0x833a,      16,     {0xf5, 0x83, 0xe0, 0xf5, 0x60, 0xe5, 0x62, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x61, 0xf5, 0x83} },
+{ 0x834a,      16,     {0xe0, 0xf5, 0x60, 0xaf, 0x5f, 0x7d, 0x06, 0x12, 0x82, 0x60, 0x80, 0xcc, 0x74, 0x96, 0x25, 0x5f} },
+{ 0x835a,      16,     {0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x5f, 0x25, 0xe0, 0xff, 0xc3, 0x74} },
+{ 0x836a,      16,     {0x0c, 0x9f, 0x75, 0xf0, 0x40, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xaf, 0x82} },
+{ 0x837a,      16,     {0xfe, 0xe5, 0x5f, 0x25, 0xe0, 0x24, 0x8d, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xee, 0xf0} },
+{ 0x838a,      16,     {0xa3, 0xef, 0xf0, 0xaf, 0x5f, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc} },
+{ 0x839a,      4,      {0x42, 0x30, 0x7f, 0x00} },
+{ 0x839e,      1,      {0x22} },
+{ 0x839f,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x47, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82} },
+{ 0x83af,      16,     {0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x49, 0x8f, 0x4a, 0x74, 0x96, 0x25, 0x47, 0xf5, 0x82, 0xe4} },
+{ 0x83bf,      16,     {0x34, 0x02, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x4a, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x49, 0xf5} },
+{ 0x83cf,      16,     {0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xaf, 0x47, 0xe4, 0xfd, 0x12, 0x81, 0xe0, 0xaf, 0x47, 0x7d, 0x06} },
+{ 0x83df,      16,     {0x12, 0x82, 0x60, 0xe5, 0x4a, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x49, 0xf5, 0x83, 0xe0, 0x30} },
+{ 0x83ef,      16,     {0xe0, 0x0b, 0x85, 0x4a, 0x82, 0x85, 0x49, 0x83, 0xe0, 0xf5, 0x48, 0x80, 0xe6, 0xaf, 0x47, 0x74} },
+{ 0x83ff,      16,     {0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x30, 0xe5, 0x47, 0x25} },
+{ 0x840f,      13,     {0xe0, 0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0xff} },
+{ 0x841c,      1,      {0x22} },
+{ 0x841d,      4,      {0x8e, 0x47, 0x8f, 0x48} },
+{ 0x8421,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x49, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82} },
+{ 0x8431,      16,     {0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x54, 0x03, 0x70, 0x23, 0x85, 0x48, 0x82, 0x8e, 0x83, 0xa3} },
+{ 0x8441,      16,     {0xe0, 0x30, 0xe0, 0x07, 0xaf, 0x49, 0x7d, 0x02, 0x12, 0x82, 0x60, 0x85, 0x48, 0x82, 0x85, 0x47} },
+{ 0x8451,      15,     {0x83, 0xa3, 0xe0, 0x30, 0xe1, 0x07, 0xaf, 0x49, 0x7d, 0x04, 0x12, 0x82, 0x60, 0x7f, 0x00} },
+{ 0x8460,      1,      {0x22} },
+{ 0x8461,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0xa3, 0xa3, 0xa3, 0xe0, 0xfc, 0xed} },
+{ 0x8471,      16,     {0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xc0, 0x83, 0xc0} },
+{ 0x8481,      16,     {0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0} },
+{ 0x8491,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0xe0, 0xfd, 0xec, 0x6d, 0xd0} },
+{ 0x84a1,      16,     {0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f} },
+{ 0x84b1,      16,     {0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82} },
+{ 0x84c1,      16,     {0x8e, 0x83, 0xa3, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0} },
+{ 0x84d1,      16,     {0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0} },
+{ 0x84e1,      16,     {0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xff, 0xed, 0x6f, 0xd0, 0x82, 0xd0} },
+{ 0x84f1,      3,      {0x83, 0xf0, 0x22} },
+{ 0x84f4,      4,      {0x8e, 0x5f, 0x8f, 0x60} },
+{ 0x84f8,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xff, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34} },
+{ 0x8508,      16,     {0x1f, 0xad, 0x82, 0xf5, 0x66, 0x8d, 0x67, 0xaa, 0x5f, 0xa9, 0x60, 0x7b, 0x01, 0xc0, 0x03, 0xc0} },
+{ 0x8518,      16,     {0x01, 0xef, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x92, 0xf9, 0x74, 0x02, 0x35, 0xf0, 0xa8, 0x01, 0xfc} },
+{ 0x8528,      16,     {0xad, 0x03, 0xd0, 0x01, 0xd0, 0x03, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0x9a, 0x1f, 0x85, 0x60, 0x82} },
+{ 0x8538,      16,     {0x85, 0x5f, 0x83, 0xa3, 0xe0, 0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb, 0x7f} },
+{ 0x8548,      16,     {0x00, 0x7e, 0x08, 0x7d, 0x07, 0x7c, 0x00, 0x12, 0x9b, 0x2e, 0x8f, 0x64, 0x8e, 0x63, 0x8d, 0x62} },
+{ 0x8558,      16,     {0x8c, 0x61, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0xc3, 0x12, 0x9b, 0xc0, 0x70, 0x09} },
+{ 0x8568,      16,     {0x75, 0x64, 0x01, 0xf5, 0x63, 0xf5, 0x62, 0xf5, 0x61, 0x7f, 0xff, 0x7e, 0xff, 0x7d, 0x00, 0x7c} },
+{ 0x8578,      16,     {0x00, 0xab, 0x64, 0xaa, 0x63, 0xa9, 0x62, 0xa8, 0x61, 0xd3, 0x12, 0x9b, 0xc0, 0x40, 0x0c, 0x75} },
+{ 0x8588,      16,     {0x64, 0xff, 0x75, 0x63, 0xff, 0x75, 0x62, 0x00, 0x75, 0x61, 0x00, 0x85, 0x67, 0x82, 0x85, 0x66} },
+{ 0x8598,      16,     {0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x80, 0xf0, 0x85, 0x67, 0x82, 0x85, 0x66, 0x83, 0xe5, 0x64} },
+{ 0x85a8,      16,     {0xf0, 0xaf, 0x64, 0xae, 0x63, 0xad, 0x62, 0xac, 0x61, 0x78, 0x08, 0x12, 0x9b, 0xd1, 0x85, 0x67} },
+{ 0x85b8,      16,     {0x82, 0x85, 0x66, 0x83, 0xa3, 0xef, 0xf0, 0x85, 0x67, 0x82, 0x85, 0x66, 0x83, 0xa3, 0xa3, 0xa3} },
+{ 0x85c8,      16,     {0xe0, 0x54, 0x7f, 0xf0, 0xe4, 0xf5, 0x65, 0xe5, 0x60, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x35, 0x5f} },
+{ 0x85d8,      16,     {0xf5, 0x83, 0xe0, 0xff, 0xb4, 0x62, 0x05, 0x43, 0x65, 0x0a, 0x80, 0x10, 0xef, 0xb4, 0x72, 0x05} },
+{ 0x85e8,      16,     {0x43, 0x65, 0x08, 0x80, 0x07, 0xef, 0xb4, 0x74, 0x03, 0x43, 0x65, 0x02, 0xe5, 0x60, 0x24, 0x0b} },
+{ 0x85f8,      16,     {0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe3, 0x03, 0x43, 0x65, 0x80, 0xef} },
+{ 0x8608,      16,     {0x30, 0xe7, 0x12, 0x43, 0x65, 0x40, 0xe5, 0x67, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x66, 0xf5} },
+{ 0x8618,      16,     {0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x60, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83} },
+{ 0x8628,      16,     {0xe0, 0xff, 0x20, 0xe1, 0x03, 0x30, 0xe4, 0x27, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xe0, 0x14} },
+{ 0x8638,      16,     {0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x3b, 0xe5, 0x67} },
+{ 0x8648,      16,     {0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x66, 0xf5, 0x83, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x17, 0x85} },
+{ 0x8658,      16,     {0x60, 0x82, 0x85, 0x5f, 0x83, 0xe0, 0x14, 0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3} },
+{ 0x8668,      16,     {0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x3b, 0x85, 0x67, 0x82, 0x85, 0x66, 0x83, 0xa3, 0xa3, 0xa3, 0x74} },
+{ 0x8678,      16,     {0xbf, 0xf0, 0x85, 0x67, 0x82, 0x85, 0x66, 0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0xe5, 0x65, 0xf0, 0xe5} },
+{ 0x8688,      16,     {0x60, 0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x67, 0x24, 0x04} },
+{ 0x8698,      16,     {0xf5, 0x82, 0xe4, 0x35, 0x66, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x60, 0x24, 0x0a, 0xf5, 0x82, 0xe4} },
+{ 0x86a8,      16,     {0x35, 0x5f, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x67, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x66, 0xf5} },
+{ 0x86b8,      16,     {0x83, 0xef, 0xf0, 0xe5, 0x60, 0x24, 0x09, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0xff} },
+{ 0x86c8,      16,     {0xe5, 0x67, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x66, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x60, 0x24} },
+{ 0x86d8,      16,     {0x09, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x67, 0x24, 0x07, 0xf5, 0x82} },
+{ 0x86e8,      16,     {0xe4, 0x35, 0x66, 0xf5, 0x83, 0xef, 0xf0, 0x85, 0x67, 0x82, 0x85, 0x66, 0x83, 0xa3, 0xa3, 0xa3} },
+{ 0x86f8,      16,     {0xe4, 0xf0, 0x85, 0x67, 0x82, 0x85, 0x66, 0x83, 0xa3, 0xa3, 0xf0, 0x85, 0x60, 0x82, 0x85, 0x5f} },
+{ 0x8708,      16,     {0x83, 0xe0, 0x14, 0xff, 0x7d, 0x06, 0x12, 0x82, 0x60, 0x75, 0x65, 0x08, 0xe5, 0x60, 0x24, 0x0c} },
+{ 0x8718,      16,     {0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0x60, 0x03, 0x43, 0x65, 0x10, 0xe5, 0x67, 0x24} },
+{ 0x8728,      16,     {0x04, 0xf5, 0x82, 0xe4, 0x35, 0x66, 0xf5, 0x83, 0xe0, 0x54, 0x03, 0x45, 0x65, 0xf0, 0xe5, 0x60} },
+{ 0x8738,      16,     {0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0x14, 0xff, 0x25, 0xe0, 0x25, 0xe0} },
+{ 0x8748,      16,     {0xff, 0xe5, 0x60, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0x24, 0xfb, 0x4f} },
+{ 0x8758,      16,     {0xf5, 0x65, 0xe5, 0x60, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0x24, 0xd0} },
+{ 0x8768,      16,     {0x60, 0x15, 0x14, 0x60, 0x17, 0x24, 0xc2, 0x60, 0x09, 0x24, 0x0a, 0x70, 0x12, 0x43, 0x65, 0x18} },
+{ 0x8778,      16,     {0x80, 0x0d, 0x43, 0x65, 0x08, 0x80, 0x08, 0x43, 0x65, 0x38, 0x80, 0x03, 0x43, 0x65, 0x28, 0x85} },
+{ 0x8788,      13,     {0x67, 0x82, 0x85, 0x66, 0x83, 0xa3, 0xa3, 0xa3, 0xe5, 0x65, 0xf0, 0x7f, 0x00} },
+{ 0x8795,      1,      {0x22} },
+{ 0x8796,      4,      {0x8e, 0x47, 0x8f, 0x48} },
+{ 0x879a,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x4a, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82} },
+{ 0x87aa,      16,     {0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x4d, 0x8f, 0x4e, 0x7e, 0x7b, 0x7f, 0x80, 0xef, 0x24, 0x01} },
+{ 0x87ba,      16,     {0xf5, 0x4c, 0xe4, 0x3e, 0xf5, 0x4b, 0x8f, 0x82, 0x8e, 0x83, 0x74, 0x08, 0xf0, 0xe5, 0x4a, 0x04} },
+{ 0x87ca,      16,     {0x85, 0x4c, 0x82, 0x85, 0x4b, 0x83, 0xf0, 0xa3, 0xe4, 0xf0, 0xe5, 0x4e, 0x24, 0x06, 0xf5, 0x82} },
+{ 0x87da,      16,     {0xe4, 0x35, 0x4d, 0xf5, 0x83, 0xe0, 0x85, 0x4c, 0x82, 0x85, 0x4b, 0x83, 0xa3, 0xa3, 0xf0, 0xe5} },
+{ 0x87ea,      16,     {0x4e, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x4d, 0xf5, 0x83, 0xe0, 0x54, 0x1e, 0x85, 0x4c, 0x82} },
+{ 0x87fa,      16,     {0x85, 0x4b, 0x83, 0xa3, 0xa3, 0xa3, 0xf0, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xe0, 0x24, 0x2b} },
+{ 0x880a,      16,     {0xf8, 0xe6, 0xff, 0xe5, 0x4c, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x4b, 0xf5, 0x83, 0xef, 0xf0} },
+{ 0x881a,      16,     {0xaf, 0x4a, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x49, 0x7f} },
+{ 0x882a,      16,     {0x02, 0x12, 0x81, 0x11, 0xc3, 0xee, 0x64, 0x80, 0x94, 0x80, 0x40, 0xf3, 0xe5, 0x49, 0x5f, 0xff} },
+{ 0x883a,      16,     {0xe5, 0x4c, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x4b, 0xf5, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0xc3} },
+{ 0x884a,      5,      {0x74, 0x07, 0xf0, 0x7f, 0x00} },
+{ 0x884f,      1,      {0x22} },
+{ 0x8850,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34, 0x1f} },
+{ 0x8860,      16,     {0xaf, 0x82, 0xf5, 0x47, 0x8f, 0x48, 0x7e, 0x7b, 0x7f, 0x80, 0xef, 0x24, 0x01, 0xfd, 0xe4, 0x3e} },
+{ 0x8870,      16,     {0xfc, 0x8f, 0x82, 0x8e, 0x83, 0x74, 0x0a, 0xf0, 0xe5, 0x48, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35} },
+{ 0x8880,      16,     {0x47, 0xf5, 0x83, 0xe0, 0x8d, 0x82, 0x8c, 0x83, 0xf0, 0x90, 0x7f, 0xc3, 0x74, 0x02, 0xf0, 0x7f} },
+{ 0x8890,      1,      {0x00} },
+{ 0x8891,      1,      {0x22} },
+{ 0x8892,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34, 0x1f} },
+{ 0x88a2,      16,     {0xad, 0x82, 0xfc, 0x8f, 0x82, 0xa3, 0xe0, 0x60, 0x0f, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c} },
+{ 0x88b2,      16,     {0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x11, 0xae, 0x04, 0xaf, 0x05, 0xef, 0x24, 0x04, 0xf5} },
+{ 0x88c2,      11,     {0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xf0, 0x7f, 0x00} },
+{ 0x88cd,      1,      {0x22} },
+{ 0x88ce,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34, 0x1f} },
+{ 0x88de,      16,     {0xad, 0x82, 0xfc, 0x8f, 0x82, 0xa3, 0xe0, 0x60, 0x0f, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c} },
+{ 0x88ee,      16,     {0xf5, 0x83, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x11, 0xae, 0x04, 0xaf, 0x05, 0xef, 0x24, 0x04, 0xf5} },
+{ 0x88fe,      11,     {0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54, 0xfe, 0xf0, 0x7f, 0x00} },
+{ 0x8909,      1,      {0x22} },
+{ 0x890a,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34, 0x1f} },
+{ 0x891a,      16,     {0xad, 0x82, 0xfc, 0x8f, 0x82, 0xa3, 0xe0, 0x60, 0x0d, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3, 0xa3} },
+{ 0x892a,      16,     {0xe0, 0x44, 0x40, 0xf0, 0x80, 0x0f, 0xae, 0x04, 0xaf, 0x05, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3} },
+{ 0x893a,      7,      {0xa3, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x00} },
+{ 0x8941,      1,      {0x22} },
+{ 0x8942,      4,      {0x8e, 0x47, 0x8f, 0x48} },
+{ 0x8946,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0, 0xf5, 0x4b, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x24, 0xfe, 0x60} },
+{ 0x8956,      16,     {0x16, 0x14, 0x60, 0x1f, 0x14, 0x60, 0x28, 0x24, 0x03, 0x70, 0x2e, 0x7e, 0x7e, 0x7f, 0x80, 0x75} },
+{ 0x8966,      16,     {0x49, 0x7e, 0x75, 0x4a, 0x80, 0x80, 0x22, 0x7e, 0x7e, 0x7f, 0x00, 0x75, 0x49, 0x7e, 0x75, 0x4a} },
+{ 0x8976,      16,     {0x00, 0x80, 0x16, 0x7e, 0x7d, 0x7f, 0x80, 0x75, 0x49, 0x7d, 0x75, 0x4a, 0x80, 0x80, 0x0a, 0x7e} },
+{ 0x8986,      16,     {0x7d, 0x7f, 0x00, 0x75, 0x49, 0x7d, 0x75, 0x4a, 0x00, 0xe5, 0x4b, 0x70, 0x20, 0x85, 0x4a, 0x82} },
+{ 0x8996,      16,     {0x85, 0x49, 0x83, 0x74, 0xff, 0xf0, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xe0, 0x25, 0xe0, 0x24} },
+{ 0x89a6,      16,     {0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x3a, 0xe5, 0x48, 0x24} },
+{ 0x89b6,      16,     {0x02, 0xff, 0xe4, 0x35, 0x47, 0xfe, 0xe5, 0x4b, 0x60, 0x10, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x85} },
+{ 0x89c6,      16,     {0x4a, 0x82, 0x85, 0x49, 0x83, 0xf0, 0x15, 0x4b, 0x80, 0xec, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83} },
+{ 0x89d6,      16,     {0xa3, 0xe0, 0xff, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xe0, 0x25, 0xe0, 0x24, 0xb5, 0xf5, 0x82} },
+{ 0x89e6,      9,      {0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x7f, 0x00} },
+{ 0x89ef,      1,      {0x22} },
+{ 0x89f0,      16,     {0xef, 0x24, 0x01, 0xf5, 0x48, 0xe4, 0x3e, 0xf5, 0x47, 0x7c, 0x7b, 0x7d, 0x80, 0x7e, 0x7b, 0x7f} },
+{ 0x8a00,      16,     {0x80, 0x8f, 0x82, 0x8e, 0x83, 0x74, 0x07, 0xf0, 0xef, 0x24, 0x01, 0xff, 0xe4, 0x3e, 0x90, 0x01} },
+{ 0x8a10,      16,     {0x31, 0xf0, 0xa3, 0xef, 0xf0, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xfe} },
+{ 0x8a20,      16,     {0xa3, 0xe0, 0x8e, 0x49, 0xf5, 0x4a, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xe0, 0x24, 0x9e, 0x60} },
+{ 0x8a30,      16,     {0x61, 0x24, 0xf9, 0x60, 0x0e, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8a, 0xdd, 0x24, 0x14, 0x60, 0x03} },
+{ 0x8a40,      16,     {0x02, 0x8b, 0x30, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3} },
+{ 0x8a50,      16,     {0xe4, 0x9f, 0xf5, 0x4c, 0x74, 0x01, 0x9e, 0xf5, 0x4b, 0xd3, 0xe5, 0x4c, 0x94, 0x40, 0xe5, 0x4b} },
+{ 0x8a60,      16,     {0x94, 0x00, 0x40, 0x06, 0x75, 0x4b, 0x00, 0x75, 0x4c, 0x40, 0xd3, 0xe5, 0x4a, 0x95, 0x4c, 0xe5} },
+{ 0x8a70,      16,     {0x49, 0x95, 0x4b, 0x50, 0x03, 0x02, 0x8b, 0x30, 0xae, 0x4b, 0xaf, 0x4c, 0x85, 0x48, 0x82, 0x85} },
+{ 0x8a80,      16,     {0x47, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x49, 0xf5, 0x4a, 0x02} },
+{ 0x8a90,      16,     {0x8b, 0x30, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x74} },
+{ 0x8aa0,      16,     {0x30, 0x9f, 0xf5, 0x4c, 0xe4, 0x9e, 0xf5, 0x4b, 0xd3, 0xe5, 0x4c, 0x94, 0x40, 0xe5, 0x4b, 0x94} },
+{ 0x8ab0,      16,     {0x00, 0x40, 0x06, 0x75, 0x4b, 0x00, 0x75, 0x4c, 0x40, 0xd3, 0xe5, 0x4a, 0x95, 0x4c, 0xe5, 0x49} },
+{ 0x8ac0,      16,     {0x95, 0x4b, 0x40, 0x6c, 0xae, 0x4b, 0xaf, 0x4c, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xa3, 0xa3} },
+{ 0x8ad0,      16,     {0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x49, 0xf5, 0x4a, 0x80, 0x53, 0x85, 0x48, 0x82} },
+{ 0x8ae0,      16,     {0x85, 0x47, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f, 0xf5, 0x4c, 0xe4, 0x9e} },
+{ 0x8af0,      16,     {0xf5, 0x4b, 0x45, 0x4c, 0x70, 0x07, 0xf5, 0x4b, 0x75, 0x4c, 0x40, 0x80, 0x11, 0xd3, 0xe5, 0x4c} },
+{ 0x8b00,      16,     {0x94, 0x40, 0xe5, 0x4b, 0x94, 0x00, 0x40, 0x06, 0x75, 0x4b, 0x00, 0x75, 0x4c, 0x40, 0xd3, 0xe5} },
+{ 0x8b10,      16,     {0x4a, 0x95, 0x4c, 0xe5, 0x49, 0x95, 0x4b, 0x40, 0x17, 0xae, 0x4b, 0xaf, 0x4c, 0x85, 0x48, 0x82} },
+{ 0x8b20,      16,     {0x85, 0x47, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x49, 0xf5, 0x4a} },
+{ 0x8b30,      16,     {0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xe0, 0x24, 0x9e, 0x70, 0x03, 0x02, 0x8b, 0xf0, 0x24, 0xf9} },
+{ 0x8b40,      16,     {0x60, 0x58, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8c, 0x40, 0x24, 0x14, 0x60, 0x03, 0x02, 0x8c, 0x84} },
+{ 0x8b50,      16,     {0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xd3, 0x94, 0xff, 0xee} },
+{ 0x8b60,      16,     {0x94, 0x00, 0x40, 0x03, 0x02, 0x8c, 0x84, 0x90, 0x01, 0x2c, 0xef, 0xf0, 0xe5, 0x4a, 0x15, 0x4a} },
+{ 0x8b70,      16,     {0xae, 0x49, 0x70, 0x02, 0x15, 0x49, 0x4e, 0x70, 0x03, 0x02, 0x8c, 0x84, 0x90, 0x01, 0x2c, 0xe0} },
+{ 0x8b80,      16,     {0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x31, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a} },
+{ 0x8b90,      16,     {0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83} },
+{ 0x8ba0,      16,     {0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x80, 0xee, 0x94, 0x00, 0x50, 0x03, 0x02, 0x8c} },
+{ 0x8bb0,      16,     {0x84, 0xd3, 0xef, 0x94, 0xff, 0xee, 0x94, 0x00, 0x40, 0x03, 0x02, 0x8c, 0x84, 0x90, 0x01, 0x2d} },
+{ 0x8bc0,      16,     {0xef, 0xf0, 0xe5, 0x4a, 0x15, 0x4a, 0xae, 0x49, 0x70, 0x02, 0x15, 0x49, 0x4e, 0x70, 0x03, 0x02} },
+{ 0x8bd0,      16,     {0x8c, 0x84, 0x90, 0x01, 0x2d, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x31} },
+{ 0x8be0,      16,     {0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2} },
+{ 0x8bf0,      16,     {0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x20, 0xee} },
+{ 0x8c00,      16,     {0x94, 0x00, 0x50, 0x03, 0x02, 0x8c, 0x84, 0xd3, 0xef, 0x94, 0x2f, 0xee, 0x94, 0x00, 0x50, 0x74} },
+{ 0x8c10,      16,     {0x90, 0x01, 0x2e, 0xef, 0xf0, 0xe5, 0x4a, 0x15, 0x4a, 0xae, 0x49, 0x70, 0x02, 0x15, 0x49, 0x4e} },
+{ 0x8c20,      16,     {0x60, 0x62, 0x90, 0x01, 0x2e, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x31} },
+{ 0x8c30,      16,     {0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd5} },
+{ 0x8c40,      16,     {0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xa3, 0xe0, 0xff, 0xa3, 0xe0, 0x90, 0x01, 0x2f, 0xcf, 0xf0} },
+{ 0x8c50,      16,     {0xa3, 0xef, 0xf0, 0xe5, 0x4a, 0x15, 0x4a, 0xae, 0x49, 0x70, 0x02, 0x15, 0x49, 0x4e, 0x60, 0x24} },
+{ 0x8c60,      16,     {0x90, 0x01, 0x2f, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0} },
+{ 0x8c70,      16,     {0xff, 0x90, 0x01, 0x31, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83} },
+{ 0x8c80,      16,     {0xef, 0xf0, 0x80, 0xcf, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xa3, 0xe0} },
+{ 0x8c90,      6,      {0x90, 0x7f, 0xc3, 0xf0, 0x7f, 0x00} },
+{ 0x8c96,      1,      {0x22} },
+{ 0x8c97,      16,     {0x7e, 0x7b, 0x7f, 0x80, 0xef, 0x24, 0x01, 0xfd, 0xe4, 0x3e, 0xfc, 0x8f, 0x82, 0x8e, 0x83, 0x74} },
+{ 0x8ca7,      16,     {0x0b, 0xf0, 0x90, 0x20, 0x70, 0xe0, 0x54, 0xf0, 0xff, 0xc4, 0x54, 0x0f, 0x8d, 0x82, 0x8c, 0x83} },
+{ 0x8cb7,      16,     {0xf0, 0x90, 0x11, 0xf0, 0xe4, 0x93, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xf0, 0x90, 0x11, 0xf1, 0xe4} },
+{ 0x8cc7,      16,     {0x93, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3, 0xf0, 0xe4, 0x90, 0x01, 0x33, 0xf0, 0xa3, 0xf0, 0xa3} },
+{ 0x8cd7,      16,     {0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xed, 0x24, 0x03, 0xfe, 0xe4, 0x3c, 0xa3} },
+{ 0x8ce7,      16,     {0xf0, 0xa3, 0xce, 0xf0, 0x7e, 0x01, 0x7f, 0x33, 0x12, 0x19, 0xc1, 0x90, 0x7f, 0xc3, 0x74, 0x14} },
+{ 0x8cf7,      3,      {0xf0, 0x7f, 0x00} },
+{ 0x8cfa,      1,      {0x22} },
+{ 0x8cfb,      4,      {0x8e, 0x40, 0x8f, 0x41} },
+{ 0x8cff,      16,     {0x85, 0x40, 0x43, 0x85, 0x41, 0x44, 0x85, 0x44, 0x82, 0x85, 0x43, 0x83, 0xe0, 0x14, 0xb4, 0x0f} },
+{ 0x8d0f,      16,     {0x00, 0x40, 0x03, 0x02, 0x8e, 0x32, 0x90, 0x8d, 0x1c, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x8d, 0x49} },
+{ 0x8d1f,      16,     {0x02, 0x8d, 0x5a, 0x02, 0x8d, 0x6b, 0x02, 0x8d, 0x8e, 0x02, 0x8d, 0x9f, 0x02, 0x8d, 0xb0, 0x02} },
+{ 0x8d2f,      16,     {0x8d, 0xc0, 0x02, 0x8d, 0xcb, 0x02, 0x8d, 0xdb, 0x02, 0x8d, 0xeb, 0x02, 0x8d, 0xfb, 0x02, 0x8e} },
+{ 0x8d3f,      16,     {0x02, 0x02, 0x8e, 0x32, 0x02, 0x8e, 0x12, 0x02, 0x8e, 0x22, 0xe5, 0x44, 0x24, 0x01, 0xff, 0xe4} },
+{ 0x8d4f,      16,     {0x35, 0x43, 0xfe, 0x12, 0x82, 0xea, 0x8f, 0x42, 0x02, 0x8e, 0x32, 0xe5, 0x44, 0x24, 0x01, 0xff} },
+{ 0x8d5f,      16,     {0xe4, 0x35, 0x43, 0xfe, 0x12, 0x83, 0x9f, 0x8f, 0x42, 0x02, 0x8e, 0x32, 0xe5, 0x44, 0x24, 0x01} },
+{ 0x8d6f,      16,     {0xf5, 0x46, 0xe4, 0x35, 0x43, 0xf5, 0x45, 0xe5, 0x46, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x45, 0xfe} },
+{ 0x8d7f,      16,     {0x12, 0x84, 0x61, 0xaf, 0x46, 0xae, 0x45, 0x12, 0x84, 0xf4, 0x8f, 0x42, 0x02, 0x8e, 0x32, 0xe5} },
+{ 0x8d8f,      16,     {0x44, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x43, 0xfe, 0x12, 0x88, 0x92, 0x8f, 0x42, 0x02, 0x8e, 0x32} },
+{ 0x8d9f,      16,     {0xe5, 0x44, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x43, 0xfe, 0x12, 0x88, 0xce, 0x8f, 0x42, 0x02, 0x8e} },
+{ 0x8daf,      16,     {0x32, 0xe5, 0x44, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x43, 0xfe, 0x12, 0x89, 0x0a, 0x8f, 0x42, 0x80} },
+{ 0x8dbf,      16,     {0x72, 0xaf, 0x41, 0xae, 0x40, 0x12, 0x89, 0xf0, 0x8f, 0x42, 0x80, 0x67, 0xe5, 0x44, 0x24, 0x01} },
+{ 0x8dcf,      16,     {0xff, 0xe4, 0x35, 0x43, 0xfe, 0x12, 0x87, 0x96, 0x8f, 0x42, 0x80, 0x57, 0xe5, 0x44, 0x24, 0x01} },
+{ 0x8ddf,      16,     {0xff, 0xe4, 0x35, 0x43, 0xfe, 0x12, 0x84, 0x1d, 0x8f, 0x42, 0x80, 0x47, 0xe5, 0x44, 0x24, 0x01} },
+{ 0x8def,      16,     {0xff, 0xe4, 0x35, 0x43, 0xfe, 0x12, 0x88, 0x50, 0x8f, 0x42, 0x80, 0x37, 0x12, 0x8c, 0x97, 0x8f} },
+{ 0x8dff,      16,     {0x42, 0x80, 0x30, 0xe5, 0x44, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x43, 0xfe, 0x12, 0x11, 0xd8, 0x8f} },
+{ 0x8e0f,      16,     {0x42, 0x80, 0x20, 0xe5, 0x44, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x43, 0xfe, 0x12, 0x89, 0x42, 0x8f} },
+{ 0x8e1f,      16,     {0x42, 0x80, 0x10, 0xaf, 0x41, 0xae, 0x40, 0x7c, 0x02, 0x7d, 0x4d, 0x7b, 0x40, 0x12, 0x1b, 0x0c} },
+{ 0x8e2f,      5,      {0xe4, 0xf5, 0x42, 0xaf, 0x42} },
+{ 0x8e34,      1,      {0x22} },
+{ 0x8e35,      8,      {0x8f, 0x61, 0x8e, 0x60, 0x8d, 0x5f, 0x8c, 0x5e} },
+{ 0x8e3d,      16,     {0x75, 0x68, 0x01, 0x75, 0x69, 0x3b, 0xe4, 0xf5, 0x67, 0xaf, 0x63, 0x15, 0x63, 0xef, 0x70, 0x03} },
+{ 0x8e4d,      16,     {0x02, 0x8e, 0xd3, 0xaf, 0x62, 0xe4, 0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xaf, 0x61} },
+{ 0x8e5d,      16,     {0xae, 0x60, 0xad, 0x5f, 0xac, 0x5e, 0x12, 0x9b, 0x2e, 0xaf, 0x03, 0x8f, 0x66, 0xaf, 0x61, 0xae} },
+{ 0x8e6d,      16,     {0x60, 0xad, 0x5f, 0xac, 0x5e, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0xaf, 0x62, 0xe4} },
+{ 0x8e7d,      16,     {0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04} },
+{ 0x8e8d,      16,     {0x12, 0x9b, 0x2e, 0x8f, 0x61, 0x8e, 0x60, 0x8d, 0x5f, 0x8c, 0x5e, 0xe5, 0x66, 0x24, 0x30, 0xf5} },
+{ 0x8e9d,      16,     {0x66, 0xd3, 0x94, 0x39, 0x40, 0x06, 0x74, 0x07, 0x25, 0x66, 0xf5, 0x66, 0x05, 0x69, 0xe5, 0x69} },
+{ 0x8ead,      16,     {0xae, 0x68, 0x70, 0x02, 0x05, 0x68, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x05, 0x69, 0xe5} },
+{ 0x8ebd,      16,     {0x69, 0xae, 0x68, 0x70, 0x02, 0x05, 0x68, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x66, 0xf0, 0x05} },
+{ 0x8ecd,      16,     {0x67, 0x05, 0x67, 0x02, 0x8e, 0x46, 0xe5, 0x69, 0x15, 0x69, 0x70, 0x02, 0x15, 0x68, 0xaf, 0x67} },
+{ 0x8edd,      16,     {0x15, 0x67, 0xef, 0x60, 0x23, 0xe5, 0x69, 0x15, 0x69, 0xae, 0x68, 0x70, 0x02, 0x15, 0x68, 0xf5} },
+{ 0x8eed,      16,     {0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05, 0x65, 0xe5, 0x65, 0xac, 0x64, 0x70, 0x02, 0x05, 0x64, 0x14} },
+{ 0x8efd,      8,      {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x80, 0xd6} },
+{ 0x8f05,      1,      {0x22} },
+{ 0x8f06,      16,     {0xe4, 0x90, 0x01, 0x67, 0xf0, 0x7e, 0x01, 0x7f, 0x68, 0x90, 0x01, 0x5c, 0xee, 0xf0, 0xa3, 0xef} },
+{ 0x8f16,      10,     {0xf0, 0x90, 0x01, 0x60, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
+{ 0x8f20,      16,     {0xaa, 0x07, 0xa9, 0x05, 0x90, 0x01, 0x67, 0xe0, 0xc3, 0x94, 0x40, 0x50, 0x61, 0xac, 0x02, 0x74} },
+{ 0x8f30,      16,     {0x01, 0x7e, 0x00, 0xa8, 0x04, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff} },
+{ 0x8f40,      16,     {0xe4, 0xef, 0x55, 0x30, 0x60, 0x45, 0xea, 0x04, 0xff, 0x90, 0x01, 0x60, 0xe0, 0xfc, 0xa3, 0xe0} },
+{ 0x8f50,      16,     {0xfd, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0xa3, 0xe9, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} },
+{ 0x8f60,      16,     {0xeb, 0xf0, 0x90, 0x01, 0x60, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x9a, 0x8e, 0xfc, 0xd3, 0xe5, 0xf0} },
+{ 0x8f70,      16,     {0x94, 0x25, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0x60, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x68} },
+{ 0x8f80,      16,     {0xf0, 0xc2, 0xaf, 0x90, 0x01, 0x67, 0xe0, 0x04, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
+{ 0x8f90,      1,      {0x22} },
+{ 0x8f91,      16,     {0x90, 0x01, 0x67, 0xe0, 0xd3, 0x94, 0x00, 0x40, 0x55, 0x90, 0x01, 0x5c, 0xe0, 0xfc, 0xa3, 0xe0} },
+{ 0x8fa1,      16,     {0xaa, 0x04, 0xf9, 0x7b, 0x01, 0xc0, 0x03, 0xc0, 0x02, 0xc0, 0x01, 0xaa, 0x06, 0xa9, 0x07, 0xa8} },
+{ 0x8fb1,      16,     {0x01, 0xac, 0x02, 0xad, 0x03, 0xd0, 0x01, 0xd0, 0x02, 0xd0, 0x03, 0x7e, 0x00, 0x7f, 0x03, 0x12} },
+{ 0x8fc1,      16,     {0x9a, 0x1f, 0x90, 0x01, 0x5c, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x9a, 0x8e, 0xfc, 0xd3, 0xe5, 0xf0} },
+{ 0x8fd1,      16,     {0x94, 0x25, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0x5c, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x68} },
+{ 0x8fe1,      16,     {0xf0, 0xc2, 0xaf, 0x90, 0x01, 0x67, 0xe0, 0x14, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
+{ 0x8ff1,      1,      {0x22} },
+{ 0x8ff2,      16,     {0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x5e, 0x7e, 0x7b, 0x7f, 0x80, 0x75, 0x63, 0x7b, 0x75, 0x64} },
+{ 0x9002,      16,     {0x80, 0xe5, 0x64, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x63, 0xa9, 0x07, 0x7b, 0x01, 0x8b, 0x65, 0xf5} },
+{ 0x9012,      16,     {0x66, 0x89, 0x67, 0xfe, 0x12, 0x8f, 0x91, 0xef, 0x60, 0x3b, 0xab, 0x65, 0xaa, 0x66, 0xa9, 0x67} },
+{ 0x9022,      16,     {0x12, 0x9a, 0x48, 0x14, 0xff, 0x90, 0x00, 0x01, 0x12, 0x9a, 0x61, 0xb4, 0x02, 0x16, 0xc2, 0xaf} },
+{ 0x9032,      16,     {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x44} },
+{ 0x9042,      16,     {0x04, 0xf0, 0xd2, 0xaf, 0x85, 0x64, 0x82, 0x85, 0x63, 0x83, 0x74, 0x0d, 0xf0, 0x90, 0x7f, 0xc3} },
+{ 0x9052,      5,      {0x74, 0x04, 0xf0, 0xd2, 0xaf} },
+{ 0x9057,      1,      {0x22} },
+{ 0x9058,      16,     {0x12, 0x8f, 0xf2, 0xe4, 0xf5, 0x5e, 0x74, 0x36, 0x25, 0x5e, 0xf8, 0xe6, 0x54, 0xf0, 0xf5, 0x5f} },
+{ 0x9068,      16,     {0x74, 0x63, 0x25, 0x5e, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83, 0xe0, 0x65, 0x5f, 0xff, 0xc4} },
+{ 0x9078,      16,     {0x54, 0x0f, 0xf5, 0x60, 0x60, 0x22, 0x74, 0x63, 0x25, 0x5e, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5} },
+{ 0x9088,      16,     {0x83, 0xe5, 0x5f, 0xf0, 0xaf, 0x5e, 0x7d, 0x01, 0xe5, 0x5f, 0x45, 0x60, 0xfb, 0x12, 0x8f, 0x20} },
+{ 0x9098,      16,     {0xef, 0x70, 0x05, 0x12, 0x8f, 0xf2, 0x80, 0xec, 0x05, 0x5e, 0xe5, 0x5e, 0xc3, 0x94, 0x04, 0x40} },
+{ 0x90a8,      16,     {0xb5, 0x12, 0x8f, 0xf2, 0xe5, 0x3a, 0x60, 0x48, 0xe4, 0xf5, 0x5e, 0xaf, 0x5e, 0x74, 0x01, 0xa8} },
+{ 0x90b8,      16,     {0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x5f, 0x55, 0x3a, 0x60, 0x29, 0xe5, 0x5e} },
+{ 0x90c8,      16,     {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x30, 0xe6} },
+{ 0x90d8,      16,     {0x16, 0xaf, 0x5e, 0x7d, 0x04, 0x7b, 0x80, 0x12, 0x8f, 0x20, 0xef, 0x70, 0x05, 0x12, 0x8f, 0xf2} },
+{ 0x90e8,      16,     {0x80, 0xef, 0xe5, 0x5f, 0xf4, 0x52, 0x3a, 0x05, 0x5e, 0xe5, 0x5e, 0xc3, 0x94, 0x04, 0x40, 0xbb} },
+{ 0x90f8,      16,     {0x90, 0x02, 0x9e, 0xe0, 0x60, 0x03, 0x02, 0x91, 0xc5, 0x74, 0x19, 0xf0, 0x7f, 0x02, 0x12, 0x81} },
+{ 0x9108,      16,     {0x11, 0x8e, 0x61, 0x8f, 0x62, 0xc3, 0xe5, 0x61, 0x64, 0x80, 0x94, 0x80, 0x40, 0xee, 0x90, 0x01} },
+{ 0x9118,      16,     {0x5b, 0xe0, 0x65, 0x62, 0xf0, 0x60, 0x37, 0xe4, 0xf5, 0x5e, 0xaf, 0x5e, 0x74, 0x01, 0xa8, 0x07} },
+{ 0x9128,      16,     {0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x5f, 0x90, 0x01, 0x5b, 0xe0, 0x55, 0x5f, 0x60} },
+{ 0x9138,      16,     {0x14, 0xaf, 0x5e, 0x7d, 0x08, 0xe5, 0x5f, 0x55, 0x62, 0xfb, 0x12, 0x8f, 0x20, 0xef, 0x70, 0x05} },
+{ 0x9148,      16,     {0x12, 0x8f, 0xf2, 0x80, 0xec, 0x05, 0x5e, 0xe5, 0x5e, 0xc3, 0x94, 0x04, 0x40, 0xcc, 0x90, 0x01} },
+{ 0x9158,      16,     {0x5b, 0xe5, 0x62, 0xf0, 0xe4, 0xf5, 0x5e, 0xc2, 0xaf, 0x74, 0x32, 0x25, 0x5e, 0xf8, 0xe6, 0xf5} },
+{ 0x9168,      16,     {0x5f, 0xe4, 0xf6, 0xd2, 0xaf, 0x53, 0x5f, 0x1e, 0xe5, 0x5f, 0x60, 0x11, 0xaf, 0x5e, 0x7d, 0x02} },
+{ 0x9178,      16,     {0xab, 0x5f, 0x12, 0x8f, 0x20, 0xef, 0x70, 0x05, 0x12, 0x8f, 0xf2, 0x80, 0xef, 0x74, 0x2c, 0x25} },
+{ 0x9188,      16,     {0x5e, 0xf8, 0xe6, 0xf5, 0x5f, 0x74, 0x9a, 0x25, 0x5e, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83} },
+{ 0x9198,      16,     {0xe0, 0x65, 0x5f, 0x60, 0x11, 0xaf, 0x5e, 0x7d, 0x04, 0xab, 0x5f, 0x12, 0x8f, 0x20, 0xef, 0x70} },
+{ 0x91a8,      16,     {0x05, 0x12, 0x8f, 0xf2, 0x80, 0xef, 0x74, 0x9a, 0x25, 0x5e, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5} },
+{ 0x91b8,      16,     {0x83, 0xe5, 0x5f, 0xf0, 0x05, 0x5e, 0xe5, 0x5e, 0xc3, 0x94, 0x04, 0x40, 0x9a, 0x12, 0x8f, 0xf2} },
+{ 0x91c8,      1,      {0x22} },
+{ 0x91c9,      12,     {0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x6e, 0x02, 0x92, 0x10} },
+{ 0x91d5,      16,     {0x02, 0x05, 0x28, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2} },
+{ 0x91e5,      16,     {0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33} },
+{ 0x91f5,      16,     {0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf} },
+{ 0x9205,      16,     {0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x92, 0x55, 0xe4, 0x7e} },
+{ 0x9215,      16,     {0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93} },
+{ 0x9225,      16,     {0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3} },
+{ 0x9235,      16,     {0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca} },
+{ 0x9245,      16,     {0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe} },
+{ 0x9255,      16,     {0x60, 0x24, 0x02, 0x28, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x81, 0x82, 0x84, 0x88} },
+{ 0x9265,      16,     {0x90, 0xa0, 0xc0, 0xc1, 0xc2, 0xc4, 0xc8, 0xd0, 0xe0, 0xe1, 0xe2, 0xe4, 0xe8, 0xf0, 0xf1, 0xf2} },
+{ 0x9275,      8,      {0xf4, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xfe, 0xff} },
+{ 0x927d,      1,      {0x00} },
+{ 0x927e,      11,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x18} },
+{ 0x9289,      16,     {0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xfe, 0x30, 0xe0, 0x05, 0x90, 0x20, 0x02, 0xe0, 0xff, 0xee} },
+{ 0x9299,      16,     {0x30, 0xe1, 0x05, 0x90, 0x20, 0x0a, 0xe0, 0xff, 0xee, 0x30, 0xe2, 0x05, 0x90, 0x20, 0x12, 0xe0} },
+{ 0x92a9,      16,     {0xff, 0xee, 0x30, 0xe3, 0x05, 0x90, 0x20, 0x1a, 0xe0, 0xff, 0x90, 0x01, 0x62, 0xe0, 0xb5, 0x1e} },
+{ 0x92b9,      10,     {0x04, 0xe4, 0xf0, 0x80, 0x05, 0x90, 0x01, 0x62, 0xee, 0xf0} },
+{ 0x92c3,      9,      {0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x92cc,      2,      {0xa9, 0x03} },
+{ 0x92ce,      16,     {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xe5} },
+{ 0x92de,      16,     {0x6c, 0x45, 0x6d, 0xf5, 0x6e, 0xe9, 0x60, 0x14, 0x8a, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82} },
+{ 0x92ee,      16,     {0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x4d, 0xf0, 0xe4, 0xfe, 0x80, 0x13, 0xeb, 0x24, 0x04, 0xf5} },
+{ 0x92fe,      16,     {0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0xff, 0xed, 0xf4, 0xfc, 0xef, 0x5c, 0xf0, 0xae, 0x6e, 0xeb} },
+{ 0x930e,      16,     {0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0x55, 0x6e, 0xfc, 0xb5, 0x06, 0x03, 0xaf} },
+{ 0x931e,      16,     {0x05, 0x22, 0xe5, 0x6c, 0x5c, 0xfe, 0xe5, 0x6d, 0x5c, 0xfd, 0xe9, 0x60, 0x16, 0xee, 0x70, 0x04} },
+{ 0x932e,      16,     {0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xae, 0x07, 0xed, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f} },
+{ 0x933e,      16,     {0x00, 0xad, 0x07, 0xee, 0x60, 0x03, 0xaf, 0x6c, 0x22, 0xed, 0x60, 0x03, 0xaf, 0x6d, 0x22, 0x7f} },
+{ 0x934e,      1,      {0x00} },
+{ 0x934f,      1,      {0x22} },
+{ 0x9350,      16,     {0x7e, 0x7b, 0x7f, 0x80, 0xef, 0x24, 0x01, 0xf5, 0x66, 0xe4, 0x3e, 0xf5, 0x65, 0x75, 0x63, 0x02} },
+{ 0x9360,      16,     {0x75, 0x64, 0x4e, 0x8f, 0x82, 0x8e, 0x83, 0x74, 0x0f, 0xf0, 0x85, 0x64, 0x82, 0x85, 0x63, 0x83} },
+{ 0x9370,      16,     {0xe0, 0x85, 0x66, 0x82, 0x85, 0x65, 0x83, 0xf0, 0x85, 0x64, 0x82, 0x85, 0x63, 0x83, 0xa3, 0xe0} },
+{ 0x9380,      16,     {0x85, 0x66, 0x82, 0x85, 0x65, 0x83, 0xa3, 0xf0, 0x85, 0x66, 0x82, 0x85, 0x65, 0x83, 0xa3, 0xa3} },
+{ 0x9390,      16,     {0x74, 0xff, 0xf0, 0xe5, 0x66, 0x24, 0x03, 0xf5, 0x68, 0xe4, 0x35, 0x65, 0xf5, 0x67, 0x85, 0x64} },
+{ 0x93a0,      16,     {0x82, 0x85, 0x63, 0x83, 0xe0, 0x14, 0xb4, 0x0b, 0x00, 0x40, 0x03, 0x02, 0x98, 0x43, 0x90, 0x93} },
+{ 0x93b0,      16,     {0xb5, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x93, 0xd6, 0x02, 0x94, 0x7c, 0x02, 0x95, 0xba, 0x02, 0x95} },
+{ 0x93c0,      16,     {0xda, 0x02, 0x95, 0xda, 0x02, 0x96, 0x7f, 0x02, 0x96, 0xbd, 0x02, 0x96, 0xe4, 0x02, 0x97, 0xa6} },
+{ 0x93d0,      16,     {0x02, 0x97, 0xda, 0x02, 0x98, 0x0b, 0xe4, 0xf5, 0x5e, 0xe5, 0x5e, 0x75, 0xf0, 0x08, 0xa4, 0x24} },
+{ 0x93e0,      16,     {0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x61, 0x8f, 0x62, 0xe4, 0xff, 0xe4, 0xfe} },
+{ 0x93f0,      16,     {0xef, 0x60, 0x10, 0x74, 0x28, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf4, 0xf5} },
+{ 0x9400,      16,     {0x5f, 0x80, 0x0d, 0x74, 0x28, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf5, 0x5f} },
+{ 0x9410,      16,     {0xe5, 0x62, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x61, 0xf5, 0x83, 0xe5, 0x5f, 0xf0, 0xe0, 0xf5} },
+{ 0x9420,      16,     {0x60, 0x65, 0x5f, 0x60, 0x3d, 0x85, 0x66, 0x82, 0x85, 0x65, 0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0xe5} },
+{ 0x9430,      16,     {0x5e, 0x04, 0xfd, 0x05, 0x68, 0xe5, 0x68, 0xaa, 0x67, 0x70, 0x02, 0x05, 0x67, 0x14, 0xf5, 0x82} },
+{ 0x9440,      16,     {0x8a, 0x83, 0xed, 0xf0, 0x05, 0x68, 0xe5, 0x68, 0xac, 0x67, 0x70, 0x02, 0x05, 0x67, 0x14, 0xf5} },
+{ 0x9450,      16,     {0x82, 0x8c, 0x83, 0xe5, 0x5f, 0xf0, 0x85, 0x68, 0x82, 0x85, 0x67, 0x83, 0xe5, 0x60, 0xf0, 0x02} },
+{ 0x9460,      16,     {0x98, 0x4e, 0x0e, 0xee, 0x64, 0x24, 0x70, 0x88, 0x0f, 0xef, 0x64, 0x02, 0x70, 0x80, 0x05, 0x5e} },
+{ 0x9470,      16,     {0xe5, 0x5e, 0x64, 0x04, 0x60, 0x03, 0x02, 0x93, 0xd9, 0x02, 0x98, 0x4e, 0x7e, 0x20, 0x7f, 0x00} },
+{ 0x9480,      16,     {0x75, 0x61, 0x20, 0x75, 0x62, 0x00, 0xe4, 0xf5, 0x5e, 0xaf, 0x62, 0xae, 0x61, 0xe4, 0xfd, 0x12} },
+{ 0x9490,      16,     {0x81, 0xe0, 0x74, 0x08, 0x25, 0x62, 0xf5, 0x62, 0xe4, 0x35, 0x61, 0xf5, 0x61, 0x05, 0x5e, 0xe5} },
+{ 0x94a0,      16,     {0x5e, 0xd3, 0x94, 0x03, 0x40, 0xe3, 0x90, 0x00, 0x04, 0x74, 0x92, 0xf0, 0xa3, 0x74, 0x7e, 0xf0} },
+{ 0x94b0,      16,     {0xe4, 0xf5, 0x60, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x61, 0x20, 0x75, 0x62, 0x00, 0xf5, 0x5e, 0xaf} },
+{ 0x94c0,      16,     {0x5e, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x5f, 0x90, 0x01} },
+{ 0x94d0,      16,     {0x62, 0xf0, 0x90, 0x01, 0x5e, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x85, 0x62, 0x82, 0x85, 0x61} },
+{ 0x94e0,      16,     {0x83, 0xa3, 0x74, 0x02, 0xf0, 0x90, 0x01, 0x62, 0xe0, 0x65, 0x5f, 0x70, 0x39, 0x90, 0x01, 0x5e} },
+{ 0x94f0,      16,     {0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xee, 0x85, 0x66, 0x82, 0x85, 0x65, 0x83, 0xa3, 0xa3, 0xf0} },
+{ 0x9500,      16,     {0xe5, 0x5e, 0x04, 0xff, 0x05, 0x68, 0xe5, 0x68, 0xac, 0x67, 0x70, 0x02, 0x05, 0x67, 0x14, 0xf5} },
+{ 0x9510,      16,     {0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x68, 0x82, 0x85, 0x67, 0x83, 0x74, 0xff, 0xf0, 0xe4, 0x90} },
+{ 0x9520,      16,     {0x01, 0x62, 0xf0, 0x75, 0x60, 0xff, 0x90, 0x01, 0x62, 0xe0, 0xff, 0x60, 0x3c, 0x85, 0x66, 0x82} },
+{ 0x9530,      16,     {0x85, 0x65, 0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0xe5, 0x5e, 0x04, 0xfe, 0x05, 0x68, 0xe5, 0x68, 0xac} },
+{ 0x9540,      16,     {0x67, 0x70, 0x02, 0x05, 0x67, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xee, 0xf0, 0x05, 0x68, 0xe5, 0x68} },
+{ 0x9550,      16,     {0xac, 0x67, 0x70, 0x02, 0x05, 0x67, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x68, 0x82} },
+{ 0x9560,      16,     {0x85, 0x67, 0x83, 0xe5, 0x5f, 0xf0, 0x75, 0x60, 0xff, 0xe5, 0x60, 0x70, 0x16, 0x74, 0x08, 0x25} },
+{ 0x9570,      16,     {0x62, 0xf5, 0x62, 0xe4, 0x35, 0x61, 0xf5, 0x61, 0x05, 0x5e, 0xe5, 0x5e, 0x64, 0x04, 0x60, 0x03} },
+{ 0x9580,      16,     {0x02, 0x94, 0xbf, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x61, 0x20, 0x75, 0x62, 0x00, 0xe4, 0xf5, 0x5e} },
+{ 0x9590,      16,     {0xaf, 0x62, 0xae, 0x61, 0x7d, 0x01, 0x12, 0x81, 0xe0, 0x74, 0x08, 0x25, 0x62, 0xf5, 0x62, 0xe4} },
+{ 0x95a0,      16,     {0x35, 0x61, 0xf5, 0x61, 0x05, 0x5e, 0xe5, 0x5e, 0xd3, 0x94, 0x03, 0x40, 0xe3, 0x90, 0x00, 0x04} },
+{ 0x95b0,      16,     {0x74, 0x13, 0xf0, 0xa3, 0x74, 0x12, 0xf0, 0x02, 0x98, 0x4e, 0x85, 0x64, 0x82, 0x85, 0x63, 0x83} },
+{ 0x95c0,      16,     {0xa3, 0xe0, 0x14, 0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x90} },
+{ 0x95d0,      16,     {0x02, 0x95, 0xf0, 0x90, 0x01, 0x62, 0xf0, 0x02, 0x98, 0x4e, 0x90, 0x01, 0x5e, 0x74, 0x03, 0xf0} },
+{ 0x95e0,      16,     {0xa3, 0x74, 0xe8, 0xf0, 0xe4, 0xf5, 0x60, 0x90, 0x02, 0x95, 0xe0, 0xff, 0x90, 0x01, 0x62, 0xe0} },
+{ 0x95f0,      16,     {0xb5, 0x07, 0x1e, 0x90, 0x01, 0x5e, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xea, 0x85, 0x66, 0x82} },
+{ 0x9600,      16,     {0x85, 0x65, 0x83, 0xa3, 0xa3, 0xf0, 0x85, 0x68, 0x82, 0x85, 0x67, 0x83, 0x74, 0xff, 0xf0, 0xf5} },
+{ 0x9610,      16,     {0x60, 0xe5, 0x60, 0x60, 0x03, 0x02, 0x98, 0x4e, 0x90, 0x01, 0x5e, 0xf0, 0xa3, 0x74, 0x96, 0xf0} },
+{ 0x9620,      16,     {0x90, 0x01, 0x5e, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xf6, 0x7f, 0x02, 0x12, 0x81, 0x11, 0xc3} },
+{ 0x9630,      16,     {0xee, 0x64, 0x80, 0x94, 0x80, 0x40, 0xf3, 0xef, 0x54, 0x0f, 0xf5, 0x60, 0x90, 0x02, 0x95, 0xe0} },
+{ 0x9640,      16,     {0x55, 0x60, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x8f, 0x5f, 0x85, 0x64, 0x82, 0x85} },
+{ 0x9650,      16,     {0x63, 0x83, 0xe0, 0xb4, 0x05, 0x0c, 0xe5, 0x5f, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00} },
+{ 0x9660,      16,     {0x8f, 0x5f, 0xe5, 0x5f, 0x70, 0x03, 0x02, 0x98, 0x4e, 0x85, 0x66, 0x82, 0x85, 0x65, 0x83, 0xa3} },
+{ 0x9670,      16,     {0xa3, 0xe4, 0xf0, 0x85, 0x68, 0x82, 0x85, 0x67, 0x83, 0xe5, 0x60, 0xf0, 0x02, 0x98, 0x4e, 0x7e} },
+{ 0x9680,      16,     {0x20, 0x7f, 0x00, 0x75, 0x61, 0x20, 0x75, 0x62, 0x00, 0xaf, 0x62, 0xae, 0x61, 0xe4, 0xfd, 0x12} },
+{ 0x9690,      16,     {0x81, 0xe0, 0x85, 0x62, 0x82, 0x85, 0x61, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x80, 0xf0, 0x85} },
+{ 0x96a0,      16,     {0x62, 0x82, 0x85, 0x61, 0x83, 0x74, 0x01, 0xf0, 0xa3, 0xe4, 0xf0, 0x85, 0x62, 0x82, 0x85, 0x61} },
+{ 0x96b0,      16,     {0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0xd2, 0x04, 0x02, 0x98, 0x4e, 0xc2, 0x04, 0x7e} },
+{ 0x96c0,      16,     {0x20, 0x7f, 0x00, 0x75, 0x61, 0x20, 0x75, 0x62, 0x00, 0xe5, 0x62, 0x24, 0x05, 0xf5, 0x82, 0xe4} },
+{ 0x96d0,      16,     {0x35, 0x61, 0xf5, 0x83, 0xe0, 0x30, 0xe6, 0xf1, 0xaf, 0x62, 0xae, 0x61, 0x7d, 0x01, 0x12, 0x81} },
+{ 0x96e0,      16,     {0xe0, 0x02, 0x98, 0x4e, 0xe4, 0xf5, 0x60, 0xf5, 0x5e, 0xe5, 0x5e, 0x75, 0xf0, 0x08, 0xa4, 0x24} },
+{ 0x96f0,      16,     {0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x61, 0x8f, 0x62, 0xfe, 0xe4, 0xfd, 0x12} },
+{ 0x9700,      16,     {0x81, 0xe0, 0xe5, 0x62, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x61, 0xf5, 0x83, 0xe0, 0x54, 0xfc} },
+{ 0x9710,      16,     {0xf0, 0xaf, 0x5e, 0x7d, 0x01, 0x7b, 0x01, 0x75, 0x6c, 0x80, 0x75, 0x6d, 0x40, 0x12, 0x92, 0xcc} },
+{ 0x9720,      16,     {0x8f, 0x60, 0xe5, 0x60, 0x70, 0x11, 0xaf, 0x5e, 0x7d, 0x02, 0x7b, 0x01, 0x75, 0x6c, 0x10, 0x75} },
+{ 0x9730,      16,     {0x6d, 0x20, 0x12, 0x92, 0xcc, 0x8f, 0x60, 0xe5, 0x60, 0x70, 0x10, 0xaf, 0x5e, 0x7d, 0x01, 0xfb} },
+{ 0x9740,      16,     {0x75, 0x6c, 0x80, 0x75, 0x6d, 0x40, 0x12, 0x92, 0xcc, 0x8f, 0x60, 0xe5, 0x60, 0x70, 0x10, 0xaf} },
+{ 0x9750,      16,     {0x5e, 0x7d, 0x02, 0xfb, 0x75, 0x6c, 0x10, 0x75, 0x6d, 0x20, 0x12, 0x92, 0xcc, 0x8f, 0x60, 0xaf} },
+{ 0x9760,      16,     {0x62, 0xae, 0x61, 0x7d, 0x01, 0x12, 0x81, 0xe0, 0xe5, 0x60, 0x60, 0x2b, 0x85, 0x66, 0x82, 0x85} },
+{ 0x9770,      16,     {0x65, 0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0xe5, 0x5e, 0x04, 0xff, 0x05, 0x68, 0xe5, 0x68, 0xac, 0x67} },
+{ 0x9780,      16,     {0x70, 0x02, 0x05, 0x67, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x68, 0x82, 0x85, 0x67} },
+{ 0x9790,      16,     {0x83, 0xe5, 0x60, 0xf0, 0x02, 0x98, 0x4e, 0x05, 0x5e, 0xe5, 0x5e, 0xd3, 0x94, 0x03, 0x50, 0x03} },
+{ 0x97a0,      16,     {0x02, 0x96, 0xe9, 0x02, 0x98, 0x4e, 0xe4, 0x90, 0x02, 0xd3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3} },
+{ 0x97b0,      16,     {0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x98, 0xf0, 0xa3, 0x74, 0x6d, 0xf0, 0x7e} },
+{ 0x97c0,      16,     {0x02, 0x7f, 0xd3, 0x12, 0x80, 0x00, 0xef, 0x64, 0x08, 0x70, 0x03, 0x02, 0x98, 0x4e, 0x85, 0x66} },
+{ 0x97d0,      16,     {0x82, 0x85, 0x65, 0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0x80, 0x74, 0xe4, 0x90, 0x02, 0xd3, 0xf0, 0xa3} },
+{ 0x97e0,      16,     {0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0xe5, 0x67, 0xf0, 0xa3} },
+{ 0x97f0,      16,     {0xe5, 0x68, 0xf0, 0x7e, 0x02, 0x7f, 0xd3, 0x12, 0x19, 0xc1, 0xef, 0x64, 0x08, 0x60, 0x4f, 0x85} },
+{ 0x9800,      16,     {0x66, 0x82, 0x85, 0x65, 0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0x80, 0x43, 0xe4, 0x90, 0x02, 0xd3, 0xf0} },
+{ 0x9810,      16,     {0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xe5, 0x64, 0x24, 0x02} },
+{ 0x9820,      16,     {0x90, 0x02, 0xda, 0xf0, 0xe4, 0x35, 0x63, 0x90, 0x02, 0xd9, 0xf0, 0x7e, 0x02, 0x7f, 0xd3, 0x12} },
+{ 0x9830,      16,     {0x80, 0x00, 0xef, 0x64, 0x08, 0x60, 0x17, 0x85, 0x66, 0x82, 0x85, 0x65, 0x83, 0xa3, 0xa3, 0xe4} },
+{ 0x9840,      16,     {0xf0, 0x80, 0x0b, 0x85, 0x66, 0x82, 0x85, 0x65, 0x83, 0xa3, 0xa3, 0x74, 0x01, 0xf0, 0x90, 0x01} },
+{ 0x9850,      16,     {0x5e, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x90, 0x01, 0x5e, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70} },
+{ 0x9860,      12,     {0xf6, 0x90, 0x7f, 0xc3, 0x74, 0x24, 0xf0, 0xe4, 0x90, 0x02, 0x4d, 0xf0} },
+{ 0x986c,      1,      {0x22} },
+{ 0x986d,      16,     {0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0} },
+{ 0x987d,      16,     {0xe4, 0xfd, 0x74, 0x01, 0x7e, 0x00, 0xa8, 0x05, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce} },
+{ 0x988d,      16,     {0xd8, 0xf9, 0xff, 0xe5, 0x3b, 0xfb, 0xe4, 0xef, 0x5b, 0x70, 0x03, 0x02, 0x99, 0x45, 0xed, 0x75} },
+{ 0x989d,      16,     {0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0xf5, 0x83, 0xe5} },
+{ 0x98ad,      16,     {0x82, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0x60, 0x64, 0x60, 0x60} },
+{ 0x98bd,      16,     {0x03, 0x02, 0x99, 0x45, 0xef, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0xfc, 0x74} },
+{ 0x98cd,      16,     {0x36, 0x2d, 0xf8, 0xec, 0xf6, 0x30, 0xe5, 0x70, 0x74, 0x96, 0x2d, 0xf5, 0x82, 0xe4, 0x34, 0x02} },
+{ 0x98dd,      16,     {0xf5, 0x83, 0xe0, 0x60, 0x63, 0xed, 0x25, 0xe0, 0x24, 0x8d, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5} },
+{ 0x98ed,      16,     {0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0, 0x8f, 0x82} },
+{ 0x98fd,      16,     {0x8e, 0x83, 0xf0, 0x74, 0x96, 0x2d, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x14, 0xf0} },
+{ 0x990d,      16,     {0x70, 0x36, 0xed, 0x25, 0xe0, 0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0} },
+{ 0x991d,      16,     {0xed, 0x25, 0xe0, 0xff, 0xc3, 0x74, 0x0c, 0x9f, 0x75, 0xf0, 0x40, 0xa4, 0x24, 0x40, 0xf5, 0x82} },
+{ 0x992d,      16,     {0xe5, 0xf0, 0x34, 0x7b, 0xaf, 0x82, 0xfe, 0xed, 0x25, 0xe0, 0x24, 0x8d, 0xf5, 0x82, 0xe4, 0x34} },
+{ 0x993d,      16,     {0x02, 0xf5, 0x83, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x0d, 0xed, 0x64, 0x04, 0x60, 0x03, 0x02, 0x98} },
+{ 0x994d,      1,      {0x7f} },
+{ 0x994e,      1,      {0x22} },
+{ 0x994f,      16,     {0xe7, 0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e} },
+{ 0x995f,      16,     {0x88, 0x82, 0x8c, 0x83, 0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08} },
+{ 0x996f,      16,     {0xdf, 0xfa, 0x80, 0x78, 0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83} },
+{ 0x997f,      16,     {0xe3, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08} },
+{ 0x998f,      16,     {0xdf, 0xfa, 0x80, 0x58, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x4c} },
+{ 0x999f,      16,     {0x80, 0xd2, 0x80, 0xfa, 0x80, 0xc6, 0x80, 0xd4, 0x80, 0x69, 0x80, 0xf2, 0x80, 0x33, 0x80, 0x10} },
+{ 0x99af,      16,     {0x80, 0xa6, 0x80, 0xea, 0x80, 0x9a, 0x80, 0xa8, 0x80, 0xda, 0x80, 0xe2, 0x80, 0xca, 0x80, 0x33} },
+{ 0x99bf,      16,     {0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83} },
+{ 0x99cf,      16,     {0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xe9, 0xde, 0xe7, 0x80} },
+{ 0x99df,      16,     {0x0d, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf6, 0x08, 0xdf, 0xf9, 0xec, 0xfa, 0xa9, 0xf0} },
+{ 0x99ef,      16,     {0xed, 0xfb, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc} },
+{ 0x99ff,      16,     {0xc5, 0x83, 0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xea, 0xde} },
+{ 0x9a0f,      16,     {0xe8, 0x80, 0xdb, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf2, 0x08, 0xdf, 0xf9, 0x80, 0xcc} },
+{ 0x9a1f,      16,     {0x88, 0xf0, 0xed, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xc2, 0xf5, 0x82, 0xeb, 0x24, 0x02, 0xb4} },
+{ 0x9a2f,      16,     {0x04, 0x00, 0x50, 0xb8, 0x23, 0x23, 0x45, 0x82, 0xf5, 0x82, 0xef, 0x4e, 0x60, 0xae, 0xef, 0x60} },
+{ 0x9a3f,      9,      {0x01, 0x0e, 0xe5, 0x82, 0x23, 0x90, 0x99, 0x9f, 0x73} },
+{ 0x9a48,      16,     {0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02} },
+{ 0x9a58,      9,      {0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22} },
+{ 0x9a61,      16,     {0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50} },
+{ 0x9a71,      16,     {0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22} },
+{ 0x9a81,      13,     {0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22} },
+{ 0x9a8e,      16,     {0xc5, 0xf0, 0xf8, 0xa3, 0xe0, 0x28, 0xf0, 0xc5, 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02} },
+{ 0x9a9e,      6,      {0x15, 0x83, 0xe0, 0x38, 0xf0, 0x22} },
+{ 0x9aa4,      16,     {0xa3, 0xf8, 0xe0, 0xc5, 0xf0, 0x25, 0xf0, 0xf0, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, 0x15, 0x83} },
+{ 0x9ab4,      6,      {0xe0, 0xc8, 0x38, 0xf0, 0xe8, 0x22} },
+{ 0x9aba,      16,     {0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0} },
+{ 0x9aca,      16,     {0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe} },
+{ 0x9ada,      16,     {0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83} },
+{ 0x9aea,      8,      {0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22} },
+{ 0x9af2,      16,     {0x75, 0xf0, 0x08, 0x75, 0x82, 0x00, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xcd, 0x33, 0xcd, 0xcc} },
+{ 0x9b02,      16,     {0x33, 0xcc, 0xc5, 0x82, 0x33, 0xc5, 0x82, 0x9b, 0xed, 0x9a, 0xec, 0x99, 0xe5, 0x82, 0x98, 0x40} },
+{ 0x9b12,      16,     {0x0c, 0xf5, 0x82, 0xee, 0x9b, 0xfe, 0xed, 0x9a, 0xfd, 0xec, 0x99, 0xfc, 0x0f, 0xd5, 0xf0, 0xd6} },
+{ 0x9b22,      16,     {0xe4, 0xce, 0xfb, 0xe4, 0xcd, 0xfa, 0xe4, 0xcc, 0xf9, 0xa8, 0x82, 0x22, 0xb8, 0x00, 0xc1, 0xb9} },
+{ 0x9b32,      16,     {0x00, 0x59, 0xba, 0x00, 0x2d, 0xec, 0x8b, 0xf0, 0x84, 0xcf, 0xce, 0xcd, 0xfc, 0xe5, 0xf0, 0xcb} },
+{ 0x9b42,      16,     {0xf9, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc, 0xeb} },
+{ 0x9b52,      16,     {0x33, 0xfb, 0x10, 0xd7, 0x03, 0x99, 0x40, 0x04, 0xeb, 0x99, 0xfb, 0x0f, 0xd8, 0xe5, 0xe4, 0xf9} },
+{ 0x9b62,      16,     {0xfa, 0x22, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc} },
+{ 0x9b72,      16,     {0xc9, 0x33, 0xc9, 0x10, 0xd7, 0x05, 0x9b, 0xe9, 0x9a, 0x40, 0x07, 0xec, 0x9b, 0xfc, 0xe9, 0x9a} },
+{ 0x9b82,      16,     {0xf9, 0x0f, 0xd8, 0xe0, 0xe4, 0xc9, 0xfa, 0xe4, 0xcc, 0xfb, 0x22, 0x75, 0xf0, 0x10, 0xef, 0x2f} },
+{ 0x9b92,      16,     {0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xcc, 0x33, 0xcc, 0xc8, 0x33, 0xc8, 0x10, 0xd7, 0x07} },
+{ 0x9ba2,      16,     {0x9b, 0xec, 0x9a, 0xe8, 0x99, 0x40, 0x0a, 0xed, 0x9b, 0xfd, 0xec, 0x9a, 0xfc, 0xe8, 0x99, 0xf8} },
+{ 0x9bb2,      14,     {0x0f, 0xd5, 0xf0, 0xda, 0xe4, 0xcd, 0xfb, 0xe4, 0xcc, 0xfa, 0xe4, 0xc8, 0xf9, 0x22} },
+{ 0x9bc0,      16,     {0xeb, 0x9f, 0xf5, 0xf0, 0xea, 0x9e, 0x42, 0xf0, 0xe9, 0x9d, 0x42, 0xf0, 0xe8, 0x9c, 0x45, 0xf0} },
+{ 0x9bd0,      1,      {0x22} },
+{ 0x9bd1,      16,     {0xe8, 0x60, 0x0f, 0xec, 0xc3, 0x13, 0xfc, 0xed, 0x13, 0xfd, 0xee, 0x13, 0xfe, 0xef, 0x13, 0xff} },
+{ 0x9be1,      3,      {0xd8, 0xf1, 0x22} },
+{ 0x9be4,      16,     {0x08, 0x08, 0x08, 0xe6, 0xcf, 0x2f, 0xf6, 0x18, 0xe6, 0xce, 0x3e, 0xf6, 0x18, 0xe6, 0xcd, 0x3d} },
+{ 0x9bf4,      7,      {0xf6, 0x18, 0xe6, 0xcc, 0x3c, 0xf6, 0x22} },
+{ 0x9bfb,      12,     {0xec, 0xf0, 0xa3, 0xed, 0xf0, 0xa3, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
+{ 0x9c07,      16,     {0xa8, 0x82, 0x85, 0x83, 0xf0, 0xd0, 0x83, 0xd0, 0x82, 0x12, 0x9c, 0x1e, 0x12, 0x9c, 0x1e, 0x12} },
+{ 0x9c17,      16,     {0x9c, 0x1e, 0x12, 0x9c, 0x1e, 0xe4, 0x73, 0xe4, 0x93, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83} },
+{ 0x9c27,      16,     {0xc8, 0xc5, 0x82, 0xc8, 0xf0, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83, 0xc8, 0xc5, 0x82, 0xc8} },
+{ 0x9c37,      1,      {0x22} },
+{ 0xffff,      0,      {0x00} }
+};
+
+#ifdef DEBUG
+static const struct whiteheat_hex_record whiteheat_loader[] = {
+{ 0x0000,      3,      {0x02, 0x09, 0x8d} },
+{ 0x0033,      3,      {0x02, 0x0e, 0x70} },
+{ 0x0043,      3,      {0x02, 0x0b, 0x00} },
+{ 0x004b,      3,      {0x02, 0x05, 0xb3} },
+{ 0x0100,      16,     {0x90, 0x7f, 0xa5, 0xe0, 0x54, 0x10, 0xff, 0xc4, 0x54, 0x0f, 0x44, 0x50, 0xf5, 0x0f, 0x13, 0xe4} },
+{ 0x0110,      16,     {0x33, 0xf5, 0x11, 0x90, 0x7f, 0xe9, 0xe0, 0x24, 0x5e, 0xb4, 0x07, 0x00, 0x40, 0x03, 0x02, 0x03} },
+{ 0x0120,      16,     {0x7c, 0x90, 0x01, 0x28, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x01, 0xbc, 0x02, 0x01, 0xbc, 0x02, 0x01} },
+{ 0x0130,      16,     {0x91, 0x02, 0x01, 0x3d, 0x02, 0x01, 0x53, 0x02, 0x01, 0x6f, 0x02, 0x01, 0x9a, 0x90, 0x7f, 0x00} },
+{ 0x0140,      16,     {0xe5, 0x11, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0} },
+{ 0x0150,      16,     {0x02, 0x03, 0x7c, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4, 0x54, 0x0f, 0x90, 0x7f, 0x00, 0xf0, 0x90} },
+{ 0x0160,      16,     {0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x02, 0x03, 0x7c, 0x12} },
+{ 0x0170,      16,     {0x0a, 0x89, 0x50, 0x07, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0x80, 0x06, 0x90, 0x7f, 0x00, 0x74, 0x0f} },
+{ 0x0180,      16,     {0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x02, 0x03} },
+{ 0x0190,      16,     {0x7c, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x0f, 0x02, 0x03, 0x7c, 0x90, 0x7f, 0x00, 0x74, 0x07, 0xf0} },
+{ 0x01a0,      16,     {0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xe8, 0x7e} },
+{ 0x01b0,      16,     {0x03, 0x12, 0x0d, 0xd5, 0xd2, 0x06, 0x12, 0x0d, 0x0d, 0x02, 0x03, 0x7c, 0x90, 0x7f, 0xea, 0xe0} },
+{ 0x01c0,      16,     {0x75, 0x29, 0x00, 0xf5, 0x2a, 0xa3, 0xe0, 0xfe, 0xe4, 0xee, 0x42, 0x29, 0x90, 0x7f, 0xee, 0xe0} },
+{ 0x01d0,      16,     {0x75, 0x2b, 0x00, 0xf5, 0x2c, 0xa3, 0xe0, 0xfe, 0xe4, 0xee, 0x42, 0x2b, 0x90, 0x7f, 0xe8, 0xe0} },
+{ 0x01e0,      16,     {0x64, 0xc0, 0x60, 0x03, 0x02, 0x02, 0xc9, 0xe5, 0x2c, 0x45, 0x2b, 0x70, 0x03, 0x02, 0x03, 0x7c} },
+{ 0x01f0,      16,     {0xc3, 0xe5, 0x2c, 0x94, 0x40, 0xe5, 0x2b, 0x94, 0x00, 0x50, 0x08, 0x85, 0x2b, 0x2d, 0x85, 0x2c} },
+{ 0x0200,      16,     {0x2e, 0x80, 0x06, 0x75, 0x2d, 0x00, 0x75, 0x2e, 0x40, 0x90, 0x7f, 0xe9, 0xe0, 0x64, 0xa3, 0x70} },
+{ 0x0210,      16,     {0x34, 0xf5, 0x31, 0xf5, 0x32, 0xc3, 0xe5, 0x32, 0x95, 0x2e, 0xe5, 0x31, 0x95, 0x2d, 0x50, 0x5c} },
+{ 0x0220,      16,     {0xe5, 0x2a, 0x25, 0x32, 0xf5, 0x82, 0xe5, 0x31, 0x35, 0x29, 0xf5, 0x83, 0xe0, 0xff, 0x74, 0x00} },
+{ 0x0230,      16,     {0x25, 0x32, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x32, 0xe5, 0x32, 0x70} },
+{ 0x0240,      16,     {0x02, 0x05, 0x31, 0x80, 0xd0, 0xe4, 0xf5, 0x31, 0xf5, 0x32, 0xc3, 0xe5, 0x32, 0x95, 0x2e, 0xe5} },
+{ 0x0250,      16,     {0x31, 0x95, 0x2d, 0x50, 0x18, 0x74, 0x00, 0x25, 0x32, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83} },
+{ 0x0260,      16,     {0x74, 0xcd, 0xf0, 0x05, 0x32, 0xe5, 0x32, 0x70, 0x02, 0x05, 0x31, 0x80, 0xdd, 0xaf, 0x2a, 0xae} },
+{ 0x0270,      16,     {0x29, 0xad, 0x2e, 0x7a, 0x7f, 0x79, 0x00, 0x7b, 0x00, 0x12, 0x0b, 0xf4, 0x90, 0x7f, 0xb5, 0xe5} },
+{ 0x0280,      16,     {0x2e, 0xf0, 0xe5, 0x2e, 0x25, 0x2a, 0xf5, 0x2a, 0xe5, 0x2d, 0x35, 0x29, 0xf5, 0x29, 0xc3, 0xe5} },
+{ 0x0290,      16,     {0x2c, 0x95, 0x2e, 0xf5, 0x2c, 0xe5, 0x2b, 0x95, 0x2d, 0xf5, 0x2b, 0x90, 0x7f, 0x92, 0xe0, 0xff} },
+{ 0x02a0,      16,     {0xc4, 0x54, 0x0f, 0x75, 0x2f, 0x00, 0xf5, 0x30, 0xd3, 0x94, 0x00, 0xe5, 0x2f, 0x94, 0x00, 0x50} },
+{ 0x02b0,      16,     {0x0c, 0x90, 0x7f, 0xb4, 0xe0, 0x20, 0xe1, 0x03, 0x02, 0x01, 0xe7, 0x80, 0xf4, 0x90, 0x7f, 0xb4} },
+{ 0x02c0,      16,     {0xe0, 0x20, 0xe2, 0x03, 0x02, 0x01, 0xe7, 0x80, 0xf4, 0x90, 0x7f, 0xe8, 0xe0, 0x64, 0x40, 0x60} },
+{ 0x02d0,      16,     {0x03, 0x02, 0x03, 0x7c, 0xe5, 0x2c, 0x45, 0x2b, 0x70, 0x03, 0x02, 0x03, 0x7c, 0xe4, 0x90, 0x7f} },
+{ 0x02e0,      16,     {0xc5, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4, 0x54, 0x0f, 0x75, 0x2f, 0x00, 0xf5, 0x30, 0xd3} },
+{ 0x02f0,      16,     {0x94, 0x00, 0xe5, 0x2f, 0x94, 0x00, 0x50, 0x09, 0x90, 0x7f, 0xc4, 0xe0, 0x30, 0xe1, 0x09, 0x80} },
+{ 0x0300,      16,     {0xf7, 0x90, 0x7f, 0xb4, 0xe0, 0x20, 0xe3, 0xf9, 0x90, 0x7f, 0xc5, 0xe0, 0x75, 0x2d, 0x00, 0xf5} },
+{ 0x0310,      16,     {0x2e, 0x90, 0x7f, 0xe9, 0xe0, 0x64, 0xa3, 0x70, 0x38, 0x90, 0x20, 0x6b, 0xf0, 0xf5, 0x31, 0xf5} },
+{ 0x0320,      16,     {0x32, 0xc3, 0xe5, 0x32, 0x95, 0x2e, 0xe5, 0x31, 0x95, 0x2d, 0x50, 0x34, 0x74, 0xc0, 0x25, 0x32} },
+{ 0x0330,      16,     {0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x2a, 0x25, 0x32, 0xf5, 0x82, 0xe5} },
+{ 0x0340,      16,     {0x31, 0x35, 0x29, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x32, 0xe5, 0x32, 0x70, 0x02, 0x05, 0x31, 0x80} },
+{ 0x0350,      16,     {0xd0, 0xaf, 0x2a, 0xae, 0x29, 0xad, 0x2e, 0x7a, 0x7e, 0x79, 0xc0, 0x7b, 0xc0, 0x12, 0x0c, 0x80} },
+{ 0x0360,      16,     {0xe5, 0x2e, 0x25, 0x2a, 0xf5, 0x2a, 0xe5, 0x2d, 0x35, 0x29, 0xf5, 0x29, 0xc3, 0xe5, 0x2c, 0x95} },
+{ 0x0370,      13,     {0x2e, 0xf5, 0x2c, 0xe5, 0x2b, 0x95, 0x2d, 0xf5, 0x2b, 0x02, 0x02, 0xd4, 0xc3} },
+{ 0x037d,      1,      {0x22} },
+{ 0x037e,      16,     {0x90, 0x7f, 0xe9, 0xe0, 0x70, 0x03, 0x02, 0x04, 0x56, 0x14, 0x70, 0x03, 0x02, 0x04, 0xd2, 0x24} },
+{ 0x038e,      16,     {0xfe, 0x70, 0x03, 0x02, 0x05, 0x46, 0x24, 0xfb, 0x70, 0x03, 0x02, 0x04, 0x50, 0x14, 0x70, 0x03} },
+{ 0x039e,      16,     {0x02, 0x04, 0x4a, 0x14, 0x70, 0x03, 0x02, 0x04, 0x3e, 0x14, 0x70, 0x03, 0x02, 0x04, 0x44, 0x24} },
+{ 0x03ae,      16,     {0x05, 0x60, 0x03, 0x02, 0x05, 0x9a, 0x12, 0x0e, 0x7b, 0x40, 0x03, 0x02, 0x05, 0xab, 0x90, 0x7f} },
+{ 0x03be,      16,     {0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x40, 0x24, 0x02, 0x70, 0x69, 0x74, 0x11, 0x90} },
+{ 0x03ce,      16,     {0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xea, 0xe0} },
+{ 0x03de,      16,     {0xff, 0x12, 0x0b, 0x58, 0x8b, 0x26, 0x8a, 0x27, 0x89, 0x28, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02} },
+{ 0x03ee,      16,     {0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xab, 0x90} },
+{ 0x03fe,      16,     {0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0c} },
+{ 0x040e,      16,     {0x3f, 0x8b, 0x26, 0x8a, 0x27, 0x89, 0x28, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02, 0xee, 0x90, 0x7f} },
+{ 0x041e,      16,     {0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xb4, 0xe0} },
+{ 0x042e,      16,     {0x44, 0x01, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xab} },
+{ 0x043e,      16,     {0x12, 0x0e, 0x52, 0x02, 0x05, 0xab, 0x12, 0x0e, 0x60, 0x02, 0x05, 0xab, 0x12, 0x0a, 0xf7, 0x02} },
+{ 0x044e,      16,     {0x05, 0xab, 0x12, 0x08, 0xf1, 0x02, 0x05, 0xab, 0x12, 0x0e, 0x7d, 0x40, 0x03, 0x02, 0x05, 0xab} },
+{ 0x045e,      16,     {0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2} },
+{ 0x046e,      16,     {0x00, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x02, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0} },
+{ 0x047e,      16,     {0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xab, 0xe4, 0x90, 0x7f, 0x00} },
+{ 0x048e,      16,     {0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xec, 0xe0} },
+{ 0x049e,      16,     {0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4} },
+{ 0x04ae,      16,     {0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3} },
+{ 0x04be,      16,     {0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01} },
+{ 0x04ce,      16,     {0xf0, 0x02, 0x05, 0xab, 0x12, 0x0e, 0x7f, 0x40, 0x03, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xe8, 0xe0} },
+{ 0x04de,      16,     {0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xea, 0xe0, 0xb4} },
+{ 0x04ee,      16,     {0x01, 0x05, 0xc2, 0x00, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05} },
+{ 0x04fe,      16,     {0xab, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4} },
+{ 0x050e,      16,     {0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f} },
+{ 0x051e,      16,     {0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f} },
+{ 0x052e,      16,     {0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x6e, 0x90} },
+{ 0x053e,      16,     {0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x65, 0x12, 0x0e, 0x81, 0x50, 0x60, 0x90, 0x7f, 0xe8} },
+{ 0x054e,      16,     {0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x54, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04} },
+{ 0x055e,      16,     {0xd2, 0x00, 0x80, 0x49, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x40, 0x90, 0x7f, 0xea} },
+{ 0x056e,      16,     {0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0} },
+{ 0x057e,      16,     {0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01} },
+{ 0x058e,      16,     {0xf0, 0x80, 0x1a, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x11, 0xe4, 0x90, 0x20, 0x6a} },
+{ 0x059e,      16,     {0xf0, 0x12, 0x01, 0x00, 0x50, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4} },
+{ 0x05ae,      4,      {0xe0, 0x44, 0x02, 0xf0} },
+{ 0x05b2,      1,      {0x22} },
+{ 0x05b3,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
+{ 0x05c3,      16,     {0xd0, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x06, 0xc0, 0x07, 0x90, 0x7f, 0xa5} },
+{ 0x05d3,      16,     {0xe0, 0x30, 0xe2, 0x06, 0x75, 0x0d, 0x06, 0x02, 0x06, 0x7f, 0x90, 0x7f, 0xa5, 0xe0, 0x20, 0xe1} },
+{ 0x05e3,      16,     {0x0c, 0xe5, 0x0d, 0x64, 0x02, 0x60, 0x06, 0x75, 0x0d, 0x07, 0x02, 0x06, 0x7f, 0xaf, 0x0d, 0xef} },
+{ 0x05f3,      16,     {0x24, 0xfe, 0x60, 0x48, 0x14, 0x60, 0x2c, 0x24, 0xfe, 0x60, 0x77, 0x24, 0x04, 0x60, 0x03, 0x02} },
+{ 0x0603,      16,     {0x06, 0x7f, 0xab, 0x09, 0xaa, 0x0a, 0xa9, 0x0b, 0xaf, 0x0c, 0x05, 0x0c, 0x8f, 0x82, 0x75, 0x83} },
+{ 0x0613,      16,     {0x00, 0x12, 0x07, 0x85, 0x90, 0x7f, 0xa6, 0xf0, 0xe5, 0x0c, 0x65, 0x08, 0x70, 0x5e, 0x75, 0x0d} },
+{ 0x0623,      16,     {0x05, 0x80, 0x59, 0x90, 0x7f, 0xa6, 0xe0, 0xab, 0x09, 0xaa, 0x0a, 0xa9, 0x0b, 0xae, 0x0c, 0x8e} },
+{ 0x0633,      16,     {0x82, 0x75, 0x83, 0x00, 0x12, 0x07, 0xb2, 0x75, 0x0d, 0x02, 0x80, 0x40, 0xe5, 0x08, 0x24, 0xfe} },
+{ 0x0643,      16,     {0xb5, 0x0c, 0x07, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x20, 0xf0, 0xe5, 0x08, 0x14, 0xb5, 0x0c, 0x0a} },
+{ 0x0653,      16,     {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe4, 0xf5, 0x0d, 0x90, 0x7f, 0xa6, 0xe0, 0xab, 0x09} },
+{ 0x0663,      16,     {0xaa, 0x0a, 0xa9, 0x0b, 0xae, 0x0c, 0x8e, 0x82, 0x75, 0x83, 0x00, 0x12, 0x07, 0xb2, 0x05, 0x0c} },
+{ 0x0673,      16,     {0x80, 0x0a, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe4, 0xf5, 0x0d, 0x53, 0x91, 0xdf, 0xd0} },
+{ 0x0683,      16,     {0x07, 0xd0, 0x06, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0xd0, 0xd0, 0xd0, 0x86, 0xd0} },
+{ 0x0693,      10,     {0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x069d,      16,     {0xc2, 0x04, 0xd2, 0x05, 0xe4, 0xf5, 0x25, 0xc2, 0x03, 0xc2, 0x00, 0xc2, 0x02, 0xc2, 0x01, 0x12} },
+{ 0x06ad,      16,     {0x0e, 0x74, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9} },
+{ 0x06bd,      16,     {0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0xc0, 0xf0, 0x90} },
+{ 0x06cd,      16,     {0x7f, 0x93, 0x74, 0x30, 0xf0, 0x12, 0x0a, 0x19, 0x75, 0x24, 0x48, 0x75, 0x23, 0x92, 0x75, 0x22} },
+{ 0x06dd,      16,     {0x00, 0x75, 0x21, 0x00, 0xe4, 0xff, 0xfe, 0x7e, 0x05, 0x90, 0x20, 0x68, 0x74, 0x01, 0xf0, 0xa3} },
+{ 0x06ed,      16,     {0xde, 0xfc, 0x7e, 0x00, 0x7f, 0x05, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae} },
+{ 0x06fd,      16,     {0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0x12, 0x0e, 0x68, 0x30, 0x01, 0x0a, 0xe4, 0x90, 0x20, 0x69} },
+{ 0x070d,      16,     {0xf0, 0x12, 0x03, 0x7e, 0xc2, 0x01, 0x30, 0x04, 0x1a, 0x12, 0x0e, 0x77, 0x50, 0x13, 0x12, 0x09} },
+{ 0x071d,      16,     {0x00, 0x30, 0x00, 0x07, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0xf3, 0x12, 0x0d, 0x8b, 0x12, 0x0e} },
+{ 0x072d,      16,     {0x79, 0xc2, 0x03, 0x7f, 0xff, 0x7e, 0xff, 0x7d, 0xff, 0x7c, 0xff, 0x78, 0x21, 0x12, 0x08, 0x1d} },
+{ 0x073d,      16,     {0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0xc3, 0x12, 0x08, 0x0c, 0x70, 0x1b, 0x75, 0x24} },
+{ 0x074d,      16,     {0x48, 0x75, 0x23, 0x92, 0xf5, 0x22, 0xf5, 0x21, 0x63, 0x25, 0xff, 0x90, 0x20, 0x68, 0xe5, 0x25} },
+{ 0x075d,      14,     {0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0x12, 0x08, 0xff, 0x80, 0x9b} },
+{ 0x076b,      1,      {0x22} },
+{ 0x076c,      16,     {0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02} },
+{ 0x077c,      9,      {0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22} },
+{ 0x0785,      16,     {0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50} },
+{ 0x0795,      16,     {0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22} },
+{ 0x07a5,      13,     {0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22} },
+{ 0x07b2,      16,     {0xf8, 0xbb, 0x01, 0x0d, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe8, 0xf0} },
+{ 0x07c2,      16,     {0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xc8, 0xf6, 0x22, 0xbb, 0xfe, 0x05, 0xe9, 0x25, 0x82, 0xc8} },
+{ 0x07d2,      2,      {0xf2, 0x22} },
+{ 0x07d4,      16,     {0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0} },
+{ 0x07e4,      16,     {0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe} },
+{ 0x07f4,      16,     {0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83} },
+{ 0x0804,      8,      {0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22} },
+{ 0x080c,      16,     {0xeb, 0x9f, 0xf5, 0xf0, 0xea, 0x9e, 0x42, 0xf0, 0xe9, 0x9d, 0x42, 0xf0, 0xe8, 0x9c, 0x45, 0xf0} },
+{ 0x081c,      1,      {0x22} },
+{ 0x081d,      16,     {0x08, 0x08, 0x08, 0xe6, 0x2f, 0xff, 0xf6, 0x18, 0xe6, 0x3e, 0xfe, 0xf6, 0x18, 0xe6, 0x3d, 0xfd} },
+{ 0x082d,      7,      {0xf6, 0x18, 0xe6, 0x3c, 0xfc, 0xf6, 0x22} },
+{ 0x0834,      4,      {0x8c, 0x34, 0x8d, 0x35} },
+{ 0x0838,      16,     {0x90, 0x7f, 0x95, 0xe0, 0x44, 0xc0, 0xf0, 0xe4, 0xf5, 0x36, 0xf5, 0x37, 0xc3, 0xe5, 0x37, 0x95} },
+{ 0x0848,      16,     {0x35, 0xe5, 0x36, 0x95, 0x34, 0x50, 0x69, 0xef, 0x25, 0x37, 0xf5, 0x82, 0xe5, 0x36, 0x3e, 0xf5} },
+{ 0x0858,      16,     {0x83, 0x74, 0xff, 0xf0, 0xf4, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x37, 0xf5, 0x82, 0xe5, 0x36} },
+{ 0x0868,      16,     {0x3e, 0xf5, 0x83, 0xe4, 0xf0, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x37, 0xf5, 0x82, 0xe5, 0x36} },
+{ 0x0878,      16,     {0x3e, 0xf5, 0x83, 0x74, 0xaa, 0xf0, 0x64, 0xaa, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x37, 0xf5} },
+{ 0x0888,      16,     {0x82, 0xe5, 0x36, 0x3e, 0xf5, 0x83, 0x74, 0x55, 0xf0, 0x64, 0x55, 0x60, 0x02, 0xc3, 0x22, 0xad} },
+{ 0x0898,      16,     {0x37, 0xe5, 0x37, 0x2f, 0xf5, 0x82, 0xe5, 0x36, 0x3e, 0xf5, 0x83, 0xed, 0xf0, 0xfc, 0xac, 0x05} },
+{ 0x08a8,      16,     {0xed, 0x6c, 0x60, 0x02, 0xc3, 0x22, 0x05, 0x37, 0xe5, 0x37, 0x70, 0x02, 0x05, 0x36, 0x80, 0x8c} },
+{ 0x08b8,      16,     {0xe4, 0xf5, 0x36, 0xf5, 0x37, 0xc3, 0xe5, 0x37, 0x95, 0x35, 0xe5, 0x36, 0x95, 0x34, 0x50, 0x27} },
+{ 0x08c8,      16,     {0xef, 0x25, 0x37, 0xf5, 0x82, 0xe5, 0x36, 0x3e, 0xf5, 0x83, 0xe0, 0x65, 0x37, 0x60, 0x02, 0xc3} },
+{ 0x08d8,      16,     {0x22, 0xef, 0x25, 0x37, 0xf5, 0x82, 0xe5, 0x36, 0x3e, 0xf5, 0x83, 0xe4, 0xf0, 0x05, 0x37, 0xe5} },
+{ 0x08e8,      8,      {0x37, 0x70, 0x02, 0x05, 0x36, 0x80, 0xce, 0xd3} },
+{ 0x08f0,      1,      {0x22} },
+{ 0x08f1,      14,     {0x90, 0x7f, 0x00, 0xe5, 0x10, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0xd3, 0x22} },
+{ 0x08ff,      1,      {0x22} },
+{ 0x0900,      9,      {0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x74} },
+{ 0x097d,      16,     {0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22} },
+{ 0x098d,      12,     {0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x3a, 0x02, 0x09, 0xd4} },
+{ 0x0999,      16,     {0x02, 0x06, 0x9d, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2} },
+{ 0x09a9,      16,     {0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33} },
+{ 0x09b9,      16,     {0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf} },
+{ 0x09c9,      16,     {0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0e, 0x2d, 0xe4, 0x7e} },
+{ 0x09d9,      16,     {0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93} },
+{ 0x09e9,      16,     {0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3} },
+{ 0x09f9,      16,     {0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca} },
+{ 0x0a09,      16,     {0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe} },
+{ 0x0a19,      16,     {0xe4, 0x90, 0x7f, 0x9c, 0xf0, 0x7f, 0x0a, 0xfe, 0x12, 0x0d, 0xd5, 0x90, 0x7f, 0x96, 0x74, 0x89} },
+{ 0x0a29,      16,     {0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xcf, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x0d, 0xd5, 0x90, 0x7f} },
+{ 0x0a39,      16,     {0x96, 0xe0, 0x54, 0xfe, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x0d, 0xd5, 0x7f, 0x05, 0x7e, 0x00} },
+{ 0x0a49,      16,     {0x12, 0x0d, 0xd5, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x02, 0xf0, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0x05} },
+{ 0x0a59,      16,     {0x7e, 0x00, 0x12, 0x0d, 0xd5, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x05, 0x7e, 0x00} },
+{ 0x0a69,      16,     {0x12, 0x0d, 0xd5, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x0d} },
+{ 0x0a79,      16,     {0xd5, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x0d, 0xd5, 0x22} },
+{ 0x0a89,      16,     {0x75, 0x33, 0x01, 0xe5, 0x33, 0x60, 0x1b, 0x7f, 0x01, 0x12, 0x0e, 0x18, 0x7f, 0x00, 0x7e, 0x0e} },
+{ 0x0a99,      16,     {0x7d, 0x00, 0x7c, 0x01, 0x12, 0x08, 0x34, 0xe4, 0x33, 0xf5, 0x33, 0x70, 0x05, 0x7f, 0x0f, 0x12} },
+{ 0x0aa9,      16,     {0x0e, 0x18, 0xe5, 0x33, 0x60, 0x1b, 0x7f, 0x02, 0x12, 0x0e, 0x18, 0x7f, 0x00, 0x7e, 0x80, 0x7d} },
+{ 0x0ab9,      16,     {0x00, 0x7c, 0x80, 0x12, 0x08, 0x34, 0xe4, 0x33, 0xf5, 0x33, 0x70, 0x05, 0x7f, 0x0f, 0x12, 0x0e} },
+{ 0x0ac9,      16,     {0x18, 0xe5, 0x33, 0x60, 0x1b, 0x7f, 0x03, 0x12, 0x0e, 0x18, 0x7f, 0x00, 0x7e, 0x20, 0x7d, 0x40} },
+{ 0x0ad9,      16,     {0x7c, 0x5b, 0x12, 0x08, 0x34, 0xe4, 0x33, 0xf5, 0x33, 0x70, 0x05, 0x7f, 0x0f, 0x12, 0x0e, 0x18} },
+{ 0x0ae9,      13,     {0xe5, 0x33, 0x60, 0x05, 0xe4, 0xff, 0x12, 0x0e, 0x18, 0xe5, 0x33, 0x24, 0xff} },
+{ 0x0af6,      1,      {0x22} },
+{ 0x0af7,      8,      {0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x10, 0xd3, 0x22} },
+{ 0x0aff,      1,      {0x32} },
+{ 0x0b00,      16,     {0x02, 0x0d, 0xa5, 0x00, 0x02, 0x0d, 0xec, 0x00, 0x02, 0x0d, 0x70, 0x00, 0x02, 0x0d, 0xbd, 0x00} },
+{ 0x0b10,      16,     {0x02, 0x0e, 0x02, 0x00, 0x02, 0x0a, 0xff, 0x00, 0x02, 0x0e, 0x83, 0x00, 0x02, 0x0e, 0x84, 0x00} },
+{ 0x0b20,      16,     {0x02, 0x0e, 0x85, 0x00, 0x02, 0x0e, 0x86, 0x00, 0x02, 0x0e, 0x87, 0x00, 0x02, 0x0e, 0x88, 0x00} },
+{ 0x0b30,      16,     {0x02, 0x0e, 0x89, 0x00, 0x02, 0x0e, 0x8a, 0x00, 0x02, 0x0e, 0x8b, 0x00, 0x02, 0x0e, 0x8c, 0x00} },
+{ 0x0b40,      16,     {0x02, 0x0e, 0x8d, 0x00, 0x02, 0x0e, 0x8e, 0x00, 0x02, 0x0e, 0x8f, 0x00, 0x02, 0x0e, 0x90, 0x00} },
+{ 0x0b50,      8,      {0x02, 0x0e, 0x91, 0x00, 0x02, 0x0e, 0x92, 0x00} },
+{ 0x0b58,      16,     {0xe4, 0xfe, 0x75, 0x2b, 0xff, 0x75, 0x2c, 0x11, 0x75, 0x2d, 0x12, 0xab, 0x2b, 0xaa, 0x2c, 0xa9} },
+{ 0x0b68,      16,     {0x2d, 0x90, 0x00, 0x01, 0x12, 0x07, 0x85, 0x64, 0x02, 0x70, 0x2d, 0xad, 0x06, 0x0e, 0xed, 0xb5} },
+{ 0x0b78,      16,     {0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x07, 0xd4, 0x85, 0xf0, 0x29, 0xf5, 0x2a, 0x62, 0x29} },
+{ 0x0b88,      16,     {0xe5, 0x29, 0x62, 0x2a, 0xe5, 0x2a, 0x62, 0x29, 0x29, 0xfd, 0xe5, 0x29, 0x3a, 0xa9, 0x05, 0x75} },
+{ 0x0b98,      14,     {0x2b, 0xff, 0xf5, 0x2c, 0x89, 0x2d, 0x80, 0xc3, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
+{ 0x0ba6,      1,      {0x22} },
+{ 0x0ba7,      6,      {0xab, 0x07, 0xaa, 0x06, 0xac, 0x05} },
+{ 0x0bad,      16,     {0xe4, 0xfd, 0xe5, 0x11, 0x60, 0x11, 0xea, 0xff, 0xae, 0x05, 0x0d, 0xee, 0x24, 0x10, 0xf5, 0x82} },
+{ 0x0bbd,      16,     {0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xef, 0xf0, 0xeb, 0xae, 0x05, 0x0d, 0x74, 0x10, 0x2e, 0xf5, 0x82} },
+{ 0x0bcd,      16,     {0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xeb, 0xf0, 0xaf, 0x05, 0x0d, 0x74, 0x10, 0x2f, 0xf5, 0x82, 0xe4} },
+{ 0x0bdd,      16,     {0x34, 0x0f, 0xf5, 0x83, 0xec, 0xf0, 0xaf, 0x0f, 0x7a, 0x0f, 0x7b, 0x10, 0x12, 0x0d, 0x51, 0x7f} },
+{ 0x0bed,      6,      {0x0a, 0x7e, 0x00, 0x12, 0x0d, 0xd5} },
+{ 0x0bf3,      1,      {0x22} },
+{ 0x0bf4,      10,     {0x8e, 0x33, 0x8f, 0x34, 0x8d, 0x35, 0x8a, 0x36, 0x8b, 0x37} },
+{ 0x0bfe,      16,     {0xe4, 0xfd, 0xf5, 0x38, 0xe5, 0x11, 0x60, 0x12, 0xe5, 0x33, 0xff, 0xae, 0x05, 0x0d, 0xee, 0x24} },
+{ 0x0c0e,      16,     {0x13, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x34, 0xae, 0x05, 0x0d, 0x74} },
+{ 0x0c1e,      16,     {0x13, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xe5, 0x34, 0xf0, 0xaf, 0x0f, 0x7a, 0x0f} },
+{ 0x0c2e,      16,     {0x7b, 0x13, 0x12, 0x0d, 0x51, 0xaf, 0x0f, 0xad, 0x35, 0xab, 0x37, 0xaa, 0x36, 0x12, 0x0d, 0x32} },
+{ 0x0c3e,      1,      {0x22} },
+{ 0x0c3f,      2,      {0x8f, 0x29} },
+{ 0x0c41,      16,     {0xe4, 0xf5, 0x2a, 0x75, 0x2b, 0xff, 0x75, 0x2c, 0x11, 0x75, 0x2d, 0x32, 0xab, 0x2b, 0xaa, 0x2c} },
+{ 0x0c51,      16,     {0xa9, 0x2d, 0x90, 0x00, 0x01, 0x12, 0x07, 0x85, 0xb4, 0x03, 0x1d, 0xaf, 0x2a, 0x05, 0x2a, 0xef} },
+{ 0x0c61,      16,     {0xb5, 0x29, 0x01, 0x22, 0x12, 0x07, 0x6c, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75} },
+{ 0x0c71,      14,     {0x2b, 0xff, 0xf5, 0x2c, 0x89, 0x2d, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
+{ 0x0c7f,      1,      {0x22} },
+{ 0x0c80,      10,     {0x8e, 0x33, 0x8f, 0x34, 0x8d, 0x35, 0x8a, 0x36, 0x8b, 0x37} },
+{ 0x0c8a,      16,     {0xe4, 0xf5, 0x38, 0xe5, 0x38, 0xc3, 0x95, 0x35, 0x50, 0x20, 0x05, 0x34, 0xe5, 0x34, 0xae, 0x33} },
+{ 0x0c9a,      16,     {0x70, 0x02, 0x05, 0x33, 0x14, 0xff, 0xe5, 0x37, 0x25, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x36, 0xf5} },
+{ 0x0caa,      10,     {0x83, 0xe0, 0xfd, 0x12, 0x0b, 0xa7, 0x05, 0x38, 0x80, 0xd9} },
+{ 0x0cb4,      1,      {0x22} },
+{ 0x0cb5,      16,     {0xa9, 0x07, 0xe5, 0x0d, 0x70, 0x25, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xe9, 0x25, 0xe0} },
+{ 0x0cc5,      16,     {0x44, 0x01, 0x90, 0x7f, 0xa6, 0xf0, 0x8d, 0x08, 0xaf, 0x03, 0xa9, 0x07, 0x75, 0x09, 0x01, 0x8a} },
+{ 0x0cd5,      13,     {0x0a, 0x89, 0x0b, 0xe4, 0xf5, 0x0c, 0x75, 0x0d, 0x03, 0xd3, 0x22, 0xc3, 0x22} },
+{ 0x0ce2,      16,     {0xa9, 0x07, 0xe5, 0x0d, 0x70, 0x23, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xe9, 0x25, 0xe0} },
+{ 0x0cf2,      16,     {0x90, 0x7f, 0xa6, 0xf0, 0x8d, 0x08, 0xaf, 0x03, 0xa9, 0x07, 0x75, 0x09, 0x01, 0x8a, 0x0a, 0x89} },
+{ 0x0d02,      11,     {0x0b, 0xe4, 0xf5, 0x0c, 0x75, 0x0d, 0x01, 0xd3, 0x22, 0xc3, 0x22} },
+{ 0x0d0d,      16,     {0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x06, 0x04, 0xe0, 0x44} },
+{ 0x0d1d,      16,     {0x02, 0xf0, 0x7f, 0xd0, 0x7e, 0x07, 0x12, 0x0d, 0xd5, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0} },
+{ 0x0d2d,      5,      {0xe0, 0x44, 0x04, 0xf0, 0x22} },
+{ 0x0d32,      16,     {0x12, 0x0c, 0xb5, 0xe5, 0x0d, 0x24, 0xfa, 0x60, 0x10, 0x14, 0x60, 0x07, 0x24, 0x07, 0x70, 0xf3} },
+{ 0x0d42,      15,     {0x7f, 0x08, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x07, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x06, 0x22} },
+{ 0x0d51,      16,     {0x12, 0x0c, 0xe2, 0xe5, 0x0d, 0x24, 0xfa, 0x60, 0x10, 0x14, 0x60, 0x07, 0x24, 0x07, 0x70, 0xf3} },
+{ 0x0d61,      15,     {0x7f, 0x08, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x07, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x06, 0x22} },
+{ 0x0d70,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f} },
+{ 0x0d80,      11,     {0xab, 0x74, 0x04, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0d8b,      16,     {0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x12, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x14, 0x7e, 0x00, 0x12} },
+{ 0x0d9b,      10,     {0x0d, 0xd5, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22} },
+{ 0x0da5,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x01, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01} },
+{ 0x0db5,      8,      {0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0dbd,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x03, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08} },
+{ 0x0dcd,      8,      {0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0dd5,      16,     {0x8e, 0x39, 0x8f, 0x3a, 0xe5, 0x3a, 0x15, 0x3a, 0xae, 0x39, 0x70, 0x02, 0x15, 0x39, 0x4e, 0x60} },
+{ 0x0de5,      7,      {0x05, 0x12, 0x0e, 0x41, 0x80, 0xee, 0x22} },
+{ 0x0dec,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x02, 0xf0, 0xd0} },
+{ 0x0dfc,      6,      {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0e02,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x10, 0xf0, 0xd0} },
+{ 0x0e12,      6,      {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0e18,      16,     {0xae, 0x07, 0x7f, 0x21, 0x7d, 0x01, 0x74, 0x00, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xab, 0x82} },
+{ 0x0e28,      5,      {0xfa, 0x12, 0x0d, 0x51, 0x22} },
+{ 0x0e2d,      16,     {0x50, 0x0f, 0x00, 0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, 0x80, 0x98, 0x88, 0x83, 0xc6} },
+{ 0x0e3d,      3,      {0xa1, 0x86, 0x8e} },
+{ 0x0e40,      1,      {0x00} },
+{ 0x0e41,      16,     {0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9} },
+{ 0x0e51,      1,      {0x22} },
+{ 0x0e52,      14,     {0x90, 0x7f, 0x00, 0xe5, 0x0e, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0xd3, 0x22} },
+{ 0x0e60,      8,      {0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x0e, 0xd3, 0x22} },
+{ 0x0e68,      8,      {0xe4, 0xf5, 0x0d, 0xd2, 0xe9, 0xd2, 0xaf, 0x22} },
+{ 0x0e70,      4,      {0x53, 0xd8, 0xef, 0x32} },
+{ 0x0e74,      3,      {0xd2, 0x00, 0x22} },
+{ 0x0e77,      2,      {0xd3, 0x22} },
+{ 0x0e79,      2,      {0xd3, 0x22} },
+{ 0x0e7b,      2,      {0xd3, 0x22} },
+{ 0x0e7d,      2,      {0xd3, 0x22} },
+{ 0x0e7f,      2,      {0xd3, 0x22} },
+{ 0x0e81,      2,      {0xd3, 0x22} },
+{ 0x0e83,      1,      {0x32} },
+{ 0x0e84,      1,      {0x32} },
+{ 0x0e85,      1,      {0x32} },
+{ 0x0e86,      1,      {0x32} },
+{ 0x0e87,      1,      {0x32} },
+{ 0x0e88,      1,      {0x32} },
+{ 0x0e89,      1,      {0x32} },
+{ 0x0e8a,      1,      {0x32} },
+{ 0x0e8b,      1,      {0x32} },
+{ 0x0e8c,      1,      {0x32} },
+{ 0x0e8d,      1,      {0x32} },
+{ 0x0e8e,      1,      {0x32} },
+{ 0x0e8f,      1,      {0x32} },
+{ 0x0e90,      1,      {0x32} },
+{ 0x0e91,      1,      {0x32} },
+{ 0x0e92,      1,      {0x32} },
+{ 0x1100,      16,     {0x12, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x40, 0x47, 0x05, 0x10, 0x27, 0x01, 0x00, 0x01, 0x02} },
+{ 0x1110,      16,     {0x00, 0x01, 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x03, 0xa0, 0x00, 0x09, 0x04, 0x00, 0x00, 0x02} },
+{ 0x1120,      16,     {0xff, 0x00, 0x00, 0x04, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40} },
+{ 0x1130,      16,     {0x00, 0x00, 0x04, 0x03, 0x09, 0x04, 0x26, 0x03, 0x41, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x68, 0x00} },
+{ 0x1140,      16,     {0x6f, 0x00, 0x72, 0x00, 0x20, 0x00, 0x43, 0x00, 0x68, 0x00, 0x69, 0x00, 0x70, 0x00, 0x73, 0x00} },
+{ 0x1150,      16,     {0x2c, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x2e, 0x00, 0x28, 0x03, 0x46, 0x00} },
+{ 0x1160,      16,     {0x69, 0x00, 0x72, 0x00, 0x6d, 0x00, 0x77, 0x00, 0x61, 0x00, 0x72, 0x00, 0x65, 0x00, 0x20, 0x00} },
+{ 0x1170,      16,     {0x46, 0x00, 0x72, 0x00, 0x61, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x57, 0x00, 0x6f, 0x00, 0x72, 0x00} },
+{ 0x1180,      16,     {0x6b, 0x00, 0x73, 0x00, 0x2a, 0x03, 0x43, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x66, 0x00, 0x69, 0x00} },
+{ 0x1190,      16,     {0x67, 0x00, 0x75, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00} },
+{ 0x11a0,      16,     {0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x22, 0x03} },
+{ 0x11b0,      16,     {0x49, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x66, 0x00, 0x61, 0x00, 0x63, 0x00} },
+{ 0x11c0,      16,     {0x65, 0x00, 0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00} },
+{ 0x11d0,      2,      {0x00, 0x00} },
+{ 0xffff,      0,      {0x00} }
+};
+
+#else
+
+static const struct whiteheat_hex_record whiteheat_loader[] = {
+{ 0x0000,      3,      {0x02, 0x09, 0x8d} },
+{ 0x0033,      3,      {0x02, 0x08, 0xfb} },
+{ 0x0043,      3,      {0x02, 0x0b, 0x00} },
+{ 0x004b,      3,      {0x02, 0x05, 0xaa} },
+{ 0x0100,      16,     {0x90, 0x7f, 0xa5, 0xe0, 0x54, 0x10, 0xff, 0xc4, 0x54, 0x0f, 0x44, 0x50, 0xf5, 0x0f, 0x13, 0xe4} },
+{ 0x0110,      16,     {0x33, 0xf5, 0x11, 0x90, 0x7f, 0xe9, 0xe0, 0x24, 0x5e, 0xb4, 0x07, 0x00, 0x40, 0x03, 0x02, 0x03} },
+{ 0x0120,      16,     {0x78, 0x90, 0x01, 0x28, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x01, 0xbc, 0x02, 0x01, 0xbc, 0x02, 0x01} },
+{ 0x0130,      16,     {0x91, 0x02, 0x01, 0x3d, 0x02, 0x01, 0x53, 0x02, 0x01, 0x6f, 0x02, 0x01, 0x9a, 0x90, 0x7f, 0x00} },
+{ 0x0140,      16,     {0xe5, 0x11, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0} },
+{ 0x0150,      16,     {0x02, 0x03, 0x78, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4, 0x54, 0x0f, 0x90, 0x7f, 0x00, 0xf0, 0x90} },
+{ 0x0160,      16,     {0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x02, 0x03, 0x78, 0x12} },
+{ 0x0170,      16,     {0x0a, 0x89, 0x50, 0x07, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0x80, 0x06, 0x90, 0x7f, 0x00, 0x74, 0x0f} },
+{ 0x0180,      16,     {0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x02, 0x03} },
+{ 0x0190,      16,     {0x78, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x0f, 0x02, 0x03, 0x78, 0x90, 0x7f, 0x00, 0x74, 0x07, 0xf0} },
+{ 0x01a0,      16,     {0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xe8, 0x7e} },
+{ 0x01b0,      16,     {0x03, 0x12, 0x0d, 0x94, 0xd2, 0x06, 0x12, 0x0c, 0xcc, 0x02, 0x03, 0x78, 0x90, 0x7f, 0xea, 0xe0} },
+{ 0x01c0,      16,     {0x75, 0x28, 0x00, 0xf5, 0x29, 0xa3, 0xe0, 0xfe, 0xe4, 0xee, 0x42, 0x28, 0x90, 0x7f, 0xee, 0xe0} },
+{ 0x01d0,      16,     {0x75, 0x2a, 0x00, 0xf5, 0x2b, 0xa3, 0xe0, 0xfe, 0xe4, 0xee, 0x42, 0x2a, 0x90, 0x7f, 0xe8, 0xe0} },
+{ 0x01e0,      16,     {0x64, 0xc0, 0x60, 0x03, 0x02, 0x02, 0xc9, 0xe5, 0x2b, 0x45, 0x2a, 0x70, 0x03, 0x02, 0x03, 0x78} },
+{ 0x01f0,      16,     {0xc3, 0xe5, 0x2b, 0x94, 0x40, 0xe5, 0x2a, 0x94, 0x00, 0x50, 0x08, 0x85, 0x2a, 0x2c, 0x85, 0x2b} },
+{ 0x0200,      16,     {0x2d, 0x80, 0x06, 0x75, 0x2c, 0x00, 0x75, 0x2d, 0x40, 0x90, 0x7f, 0xe9, 0xe0, 0x64, 0xa3, 0x70} },
+{ 0x0210,      16,     {0x34, 0xf5, 0x30, 0xf5, 0x31, 0xc3, 0xe5, 0x31, 0x95, 0x2d, 0xe5, 0x30, 0x95, 0x2c, 0x50, 0x5c} },
+{ 0x0220,      16,     {0xe5, 0x29, 0x25, 0x31, 0xf5, 0x82, 0xe5, 0x30, 0x35, 0x28, 0xf5, 0x83, 0xe0, 0xff, 0x74, 0x00} },
+{ 0x0230,      16,     {0x25, 0x31, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x31, 0xe5, 0x31, 0x70} },
+{ 0x0240,      16,     {0x02, 0x05, 0x30, 0x80, 0xd0, 0xe4, 0xf5, 0x30, 0xf5, 0x31, 0xc3, 0xe5, 0x31, 0x95, 0x2d, 0xe5} },
+{ 0x0250,      16,     {0x30, 0x95, 0x2c, 0x50, 0x18, 0x74, 0x00, 0x25, 0x31, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83} },
+{ 0x0260,      16,     {0x74, 0xcd, 0xf0, 0x05, 0x31, 0xe5, 0x31, 0x70, 0x02, 0x05, 0x30, 0x80, 0xdd, 0xaf, 0x29, 0xae} },
+{ 0x0270,      16,     {0x28, 0xad, 0x2d, 0x7a, 0x7f, 0x79, 0x00, 0x7b, 0x00, 0x12, 0x0b, 0xf4, 0x90, 0x7f, 0xb5, 0xe5} },
+{ 0x0280,      16,     {0x2d, 0xf0, 0xe5, 0x2d, 0x25, 0x29, 0xf5, 0x29, 0xe5, 0x2c, 0x35, 0x28, 0xf5, 0x28, 0xc3, 0xe5} },
+{ 0x0290,      16,     {0x2b, 0x95, 0x2d, 0xf5, 0x2b, 0xe5, 0x2a, 0x95, 0x2c, 0xf5, 0x2a, 0x90, 0x7f, 0x92, 0xe0, 0xff} },
+{ 0x02a0,      16,     {0xc4, 0x54, 0x0f, 0x75, 0x2e, 0x00, 0xf5, 0x2f, 0xd3, 0x94, 0x00, 0xe5, 0x2e, 0x94, 0x00, 0x50} },
+{ 0x02b0,      16,     {0x0c, 0x90, 0x7f, 0xb4, 0xe0, 0x20, 0xe1, 0x03, 0x02, 0x01, 0xe7, 0x80, 0xf4, 0x90, 0x7f, 0xb4} },
+{ 0x02c0,      16,     {0xe0, 0x20, 0xe2, 0x03, 0x02, 0x01, 0xe7, 0x80, 0xf4, 0x90, 0x7f, 0xe8, 0xe0, 0x64, 0x40, 0x60} },
+{ 0x02d0,      16,     {0x03, 0x02, 0x03, 0x78, 0xe5, 0x2b, 0x45, 0x2a, 0x70, 0x03, 0x02, 0x03, 0x78, 0xe4, 0x90, 0x7f} },
+{ 0x02e0,      16,     {0xc5, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4, 0x54, 0x0f, 0x75, 0x2e, 0x00, 0xf5, 0x2f, 0xd3} },
+{ 0x02f0,      16,     {0x94, 0x00, 0xe5, 0x2e, 0x94, 0x00, 0x50, 0x09, 0x90, 0x7f, 0xc4, 0xe0, 0x30, 0xe1, 0x09, 0x80} },
+{ 0x0300,      16,     {0xf7, 0x90, 0x7f, 0xb4, 0xe0, 0x20, 0xe3, 0xf9, 0x90, 0x7f, 0xc5, 0xe0, 0x75, 0x2c, 0x00, 0xf5} },
+{ 0x0310,      16,     {0x2d, 0x90, 0x7f, 0xe9, 0xe0, 0x64, 0xa3, 0x70, 0x34, 0xf5, 0x30, 0xf5, 0x31, 0xc3, 0xe5, 0x31} },
+{ 0x0320,      16,     {0x95, 0x2d, 0xe5, 0x30, 0x95, 0x2c, 0x50, 0x34, 0x74, 0xc0, 0x25, 0x31, 0xf5, 0x82, 0xe4, 0x34} },
+{ 0x0330,      1,      {0x7e} },
+{ 0x0331,      16,     {0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x29, 0x25, 0x31, 0xf5, 0x82, 0xe5, 0x30, 0x35, 0x28, 0xf5, 0x83} },
+{ 0x0341,      16,     {0xef, 0xf0, 0x05, 0x31, 0xe5, 0x31, 0x70, 0x02, 0x05, 0x30, 0x80, 0xd0, 0xaf, 0x29, 0xae, 0x28} },
+{ 0x0351,      16,     {0xad, 0x2d, 0x7a, 0x7e, 0x79, 0xc0, 0x7b, 0xc0, 0x12, 0x0c, 0x3f, 0xe5, 0x2d, 0x25, 0x29, 0xf5} },
+{ 0x0361,      16,     {0x29, 0xe5, 0x2c, 0x35, 0x28, 0xf5, 0x28, 0xc3, 0xe5, 0x2b, 0x95, 0x2d, 0xf5, 0x2b, 0xe5, 0x2a} },
+{ 0x0371,      9,      {0x95, 0x2c, 0xf5, 0x2a, 0x02, 0x02, 0xd4, 0xc3, 0x22} },
+{ 0x037a,      16,     {0x90, 0x7f, 0xe9, 0xe0, 0x70, 0x03, 0x02, 0x04, 0x52, 0x14, 0x70, 0x03, 0x02, 0x04, 0xce, 0x24} },
+{ 0x038a,      16,     {0xfe, 0x70, 0x03, 0x02, 0x05, 0x42, 0x24, 0xfb, 0x70, 0x03, 0x02, 0x04, 0x4c, 0x14, 0x70, 0x03} },
+{ 0x039a,      16,     {0x02, 0x04, 0x46, 0x14, 0x70, 0x03, 0x02, 0x04, 0x3a, 0x14, 0x70, 0x03, 0x02, 0x04, 0x40, 0x24} },
+{ 0x03aa,      16,     {0x05, 0x60, 0x03, 0x02, 0x05, 0x96, 0x12, 0x0e, 0x44, 0x40, 0x03, 0x02, 0x05, 0xa2, 0x90, 0x7f} },
+{ 0x03ba,      16,     {0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x40, 0x24, 0x02, 0x70, 0x69, 0x74, 0x11, 0x90} },
+{ 0x03ca,      16,     {0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xea, 0xe0} },
+{ 0x03da,      16,     {0xff, 0x12, 0x0b, 0x58, 0x8b, 0x25, 0x8a, 0x26, 0x89, 0x27, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02} },
+{ 0x03ea,      16,     {0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xa2, 0x90} },
+{ 0x03fa,      16,     {0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x08} },
+{ 0x040a,      16,     {0xba, 0x8b, 0x25, 0x8a, 0x26, 0x89, 0x27, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02, 0xee, 0x90, 0x7f} },
+{ 0x041a,      16,     {0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xb4, 0xe0} },
+{ 0x042a,      16,     {0x44, 0x01, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa2} },
+{ 0x043a,      16,     {0x12, 0x0e, 0x1f, 0x02, 0x05, 0xa2, 0x12, 0x0e, 0x2d, 0x02, 0x05, 0xa2, 0x12, 0x0a, 0xf7, 0x02} },
+{ 0x044a,      16,     {0x05, 0xa2, 0x12, 0x0e, 0x11, 0x02, 0x05, 0xa2, 0x12, 0x0e, 0x46, 0x40, 0x03, 0x02, 0x05, 0xa2} },
+{ 0x045a,      16,     {0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2} },
+{ 0x046a,      16,     {0x00, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x02, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0} },
+{ 0x047a,      16,     {0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa2, 0xe4, 0x90, 0x7f, 0x00} },
+{ 0x048a,      16,     {0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xec, 0xe0} },
+{ 0x049a,      16,     {0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4} },
+{ 0x04aa,      16,     {0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3} },
+{ 0x04ba,      16,     {0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01} },
+{ 0x04ca,      16,     {0xf0, 0x02, 0x05, 0xa2, 0x12, 0x0e, 0x48, 0x40, 0x03, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xe8, 0xe0} },
+{ 0x04da,      16,     {0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xea, 0xe0, 0xb4} },
+{ 0x04ea,      16,     {0x01, 0x05, 0xc2, 0x00, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05} },
+{ 0x04fa,      16,     {0xa2, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4} },
+{ 0x050a,      16,     {0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f} },
+{ 0x051a,      16,     {0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f} },
+{ 0x052a,      16,     {0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x69, 0x90} },
+{ 0x053a,      16,     {0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x60, 0x12, 0x0e, 0x4a, 0x50, 0x5b, 0x90, 0x7f, 0xe8} },
+{ 0x054a,      16,     {0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4f, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04} },
+{ 0x055a,      16,     {0xd2, 0x00, 0x80, 0x44, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x3b, 0x90, 0x7f, 0xea} },
+{ 0x056a,      16,     {0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0} },
+{ 0x057a,      16,     {0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01} },
+{ 0x058a,      16,     {0xf0, 0x80, 0x15, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x0c, 0x12, 0x01, 0x00, 0x50} },
+{ 0x059a,      16,     {0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22} },
+{ 0x05aa,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
+{ 0x05ba,      16,     {0xd0, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x06, 0xc0, 0x07, 0x90, 0x7f, 0xa5} },
+{ 0x05ca,      16,     {0xe0, 0x30, 0xe2, 0x06, 0x75, 0x0d, 0x06, 0x02, 0x06, 0x76, 0x90, 0x7f, 0xa5, 0xe0, 0x20, 0xe1} },
+{ 0x05da,      16,     {0x0c, 0xe5, 0x0d, 0x64, 0x02, 0x60, 0x06, 0x75, 0x0d, 0x07, 0x02, 0x06, 0x76, 0xaf, 0x0d, 0xef} },
+{ 0x05ea,      16,     {0x24, 0xfe, 0x60, 0x48, 0x14, 0x60, 0x2c, 0x24, 0xfe, 0x60, 0x77, 0x24, 0x04, 0x60, 0x03, 0x02} },
+{ 0x05fa,      16,     {0x06, 0x76, 0xab, 0x09, 0xaa, 0x0a, 0xa9, 0x0b, 0xaf, 0x0c, 0x05, 0x0c, 0x8f, 0x82, 0x75, 0x83} },
+{ 0x060a,      16,     {0x00, 0x12, 0x08, 0x22, 0x90, 0x7f, 0xa6, 0xf0, 0xe5, 0x0c, 0x65, 0x08, 0x70, 0x5e, 0x75, 0x0d} },
+{ 0x061a,      16,     {0x05, 0x80, 0x59, 0x90, 0x7f, 0xa6, 0xe0, 0xab, 0x09, 0xaa, 0x0a, 0xa9, 0x0b, 0xae, 0x0c, 0x8e} },
+{ 0x062a,      16,     {0x82, 0x75, 0x83, 0x00, 0x12, 0x08, 0x4f, 0x75, 0x0d, 0x02, 0x80, 0x40, 0xe5, 0x08, 0x24, 0xfe} },
+{ 0x063a,      16,     {0xb5, 0x0c, 0x07, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x20, 0xf0, 0xe5, 0x08, 0x14, 0xb5, 0x0c, 0x0a} },
+{ 0x064a,      16,     {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe4, 0xf5, 0x0d, 0x90, 0x7f, 0xa6, 0xe0, 0xab, 0x09} },
+{ 0x065a,      16,     {0xaa, 0x0a, 0xa9, 0x0b, 0xae, 0x0c, 0x8e, 0x82, 0x75, 0x83, 0x00, 0x12, 0x08, 0x4f, 0x05, 0x0c} },
+{ 0x066a,      16,     {0x80, 0x0a, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe4, 0xf5, 0x0d, 0x53, 0x91, 0xdf, 0xd0} },
+{ 0x067a,      16,     {0x07, 0xd0, 0x06, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0xd0, 0xd0, 0xd0, 0x86, 0xd0} },
+{ 0x068a,      10,     {0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0694,      16,     {0x8c, 0x33, 0x8d, 0x34, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0xc0, 0xf0, 0xe4, 0xf5, 0x35, 0xf5, 0x36} },
+{ 0x06a4,      16,     {0xc3, 0xe5, 0x36, 0x95, 0x34, 0xe5, 0x35, 0x95, 0x33, 0x50, 0x69, 0xef, 0x25, 0x36, 0xf5, 0x82} },
+{ 0x06b4,      16,     {0xe5, 0x35, 0x3e, 0xf5, 0x83, 0x74, 0xff, 0xf0, 0xf4, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x36} },
+{ 0x06c4,      16,     {0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0xe4, 0xf0, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x36} },
+{ 0x06d4,      16,     {0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0x74, 0xaa, 0xf0, 0x64, 0xaa, 0x60, 0x02, 0xc3, 0x22} },
+{ 0x06e4,      16,     {0xef, 0x25, 0x36, 0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0x74, 0x55, 0xf0, 0x64, 0x55, 0x60} },
+{ 0x06f4,      16,     {0x02, 0xc3, 0x22, 0xad, 0x36, 0xe5, 0x36, 0x2f, 0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0xed} },
+{ 0x0704,      16,     {0xf0, 0xfc, 0xac, 0x05, 0xed, 0x6c, 0x60, 0x02, 0xc3, 0x22, 0x05, 0x36, 0xe5, 0x36, 0x70, 0x02} },
+{ 0x0714,      16,     {0x05, 0x35, 0x80, 0x8c, 0xe4, 0xf5, 0x35, 0xf5, 0x36, 0xc3, 0xe5, 0x36, 0x95, 0x34, 0xe5, 0x35} },
+{ 0x0724,      16,     {0x95, 0x33, 0x50, 0x27, 0xef, 0x25, 0x36, 0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0xe0, 0x65} },
+{ 0x0734,      16,     {0x36, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x36, 0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0xe4} },
+{ 0x0744,      13,     {0xf0, 0x05, 0x36, 0xe5, 0x36, 0x70, 0x02, 0x05, 0x35, 0x80, 0xce, 0xd3, 0x22} },
+{ 0x0751,      16,     {0xc2, 0x04, 0xd2, 0x05, 0xc2, 0x03, 0xc2, 0x00, 0xc2, 0x02, 0xc2, 0x01, 0x12, 0x0e, 0x3d, 0xd2} },
+{ 0x0761,      16,     {0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f} },
+{ 0x0771,      16,     {0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0xc0, 0xf0, 0x90, 0x7f, 0x93, 0x74} },
+{ 0x0781,      16,     {0x30, 0xf0, 0x12, 0x0a, 0x19, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0} },
+{ 0x0791,      16,     {0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0x12, 0x0e, 0x35, 0x20, 0x01, 0x42, 0x75, 0x24, 0x00, 0x75, 0x23} },
+{ 0x07a1,      16,     {0x00, 0x75, 0x22, 0x00, 0x75, 0x21, 0x00, 0x7f, 0x48, 0x7e, 0x92, 0x7d, 0x00, 0x7c, 0x00, 0xab} },
+{ 0x07b1,      16,     {0x24, 0xaa, 0x23, 0xa9, 0x22, 0xa8, 0x21, 0xc3, 0x12, 0x08, 0xa9, 0x50, 0xdb, 0x20, 0x01, 0xd8} },
+{ 0x07c1,      16,     {0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0xe5, 0x24, 0x24, 0x01, 0xf5, 0x24, 0xea, 0x35, 0x23, 0xf5} },
+{ 0x07d1,      16,     {0x23, 0xe9, 0x35, 0x22, 0xf5, 0x22, 0xe8, 0x35, 0x21, 0xf5, 0x21, 0x80, 0xca, 0x30, 0x01, 0x05} },
+{ 0x07e1,      16,     {0x12, 0x03, 0x7a, 0xc2, 0x01, 0x30, 0x04, 0x1a, 0x12, 0x0e, 0x40, 0x50, 0x13, 0x12, 0x09, 0x00} },
+{ 0x07f1,      16,     {0x30, 0x00, 0x07, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0xf3, 0x12, 0x0d, 0x4a, 0x12, 0x0e, 0x42} },
+{ 0x0801,      8,      {0xc2, 0x03, 0x12, 0x08, 0xff, 0x80, 0xd6, 0x22} },
+{ 0x0809,      16,     {0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02} },
+{ 0x0819,      9,      {0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22} },
+{ 0x0822,      16,     {0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50} },
+{ 0x0832,      16,     {0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22} },
+{ 0x0842,      13,     {0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22} },
+{ 0x084f,      16,     {0xf8, 0xbb, 0x01, 0x0d, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe8, 0xf0} },
+{ 0x085f,      16,     {0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xc8, 0xf6, 0x22, 0xbb, 0xfe, 0x05, 0xe9, 0x25, 0x82, 0xc8} },
+{ 0x086f,      2,      {0xf2, 0x22} },
+{ 0x0871,      16,     {0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0} },
+{ 0x0881,      16,     {0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe} },
+{ 0x0891,      16,     {0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83} },
+{ 0x08a1,      8,      {0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22} },
+{ 0x08a9,      16,     {0xeb, 0x9f, 0xf5, 0xf0, 0xea, 0x9e, 0x42, 0xf0, 0xe9, 0x9d, 0x42, 0xf0, 0xe8, 0x9c, 0x45, 0xf0} },
+{ 0x08b9,      1,      {0x22} },
+{ 0x08ba,      2,      {0x8f, 0x28} },
+{ 0x08bc,      16,     {0xe4, 0xf5, 0x29, 0x75, 0x2a, 0xff, 0x75, 0x2b, 0x11, 0x75, 0x2c, 0x32, 0xab, 0x2a, 0xaa, 0x2b} },
+{ 0x08cc,      16,     {0xa9, 0x2c, 0x90, 0x00, 0x01, 0x12, 0x08, 0x22, 0xb4, 0x03, 0x1d, 0xaf, 0x29, 0x05, 0x29, 0xef} },
+{ 0x08dc,      16,     {0xb5, 0x28, 0x01, 0x22, 0x12, 0x08, 0x09, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75} },
+{ 0x08ec,      14,     {0x2a, 0xff, 0xf5, 0x2b, 0x89, 0x2c, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
+{ 0x08fa,      1,      {0x22} },
+{ 0x08fb,      4,      {0x53, 0xd8, 0xef, 0x32} },
+{ 0x08ff,      1,      {0x22} },
+{ 0x0900,      9,      {0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x74} },
+{ 0x097d,      16,     {0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22} },
+{ 0x098d,      12,     {0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x39, 0x02, 0x09, 0xd4} },
+{ 0x0999,      16,     {0x02, 0x07, 0x51, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2} },
+{ 0x09a9,      16,     {0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33} },
+{ 0x09b9,      16,     {0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf} },
+{ 0x09c9,      16,     {0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0d, 0xec, 0xe4, 0x7e} },
+{ 0x09d9,      16,     {0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93} },
+{ 0x09e9,      16,     {0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3} },
+{ 0x09f9,      16,     {0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca} },
+{ 0x0a09,      16,     {0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe} },
+{ 0x0a19,      16,     {0xe4, 0x90, 0x7f, 0x9c, 0xf0, 0x7f, 0x0a, 0xfe, 0x12, 0x0d, 0x94, 0x90, 0x7f, 0x96, 0x74, 0x89} },
+{ 0x0a29,      16,     {0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xcf, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x0d, 0x94, 0x90, 0x7f} },
+{ 0x0a39,      16,     {0x96, 0xe0, 0x54, 0xfe, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x0d, 0x94, 0x7f, 0x05, 0x7e, 0x00} },
+{ 0x0a49,      16,     {0x12, 0x0d, 0x94, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x02, 0xf0, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0x05} },
+{ 0x0a59,      16,     {0x7e, 0x00, 0x12, 0x0d, 0x94, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x05, 0x7e, 0x00} },
+{ 0x0a69,      16,     {0x12, 0x0d, 0x94, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x0d} },
+{ 0x0a79,      16,     {0x94, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x0d, 0x94, 0x22} },
+{ 0x0a89,      16,     {0x75, 0x32, 0x01, 0xe5, 0x32, 0x60, 0x1b, 0x7f, 0x01, 0x12, 0x0d, 0xd7, 0x7f, 0x00, 0x7e, 0x0e} },
+{ 0x0a99,      16,     {0x7d, 0x00, 0x7c, 0x01, 0x12, 0x06, 0x94, 0xe4, 0x33, 0xf5, 0x32, 0x70, 0x05, 0x7f, 0x0f, 0x12} },
+{ 0x0aa9,      16,     {0x0d, 0xd7, 0xe5, 0x32, 0x60, 0x1b, 0x7f, 0x02, 0x12, 0x0d, 0xd7, 0x7f, 0x00, 0x7e, 0x80, 0x7d} },
+{ 0x0ab9,      16,     {0x00, 0x7c, 0x80, 0x12, 0x06, 0x94, 0xe4, 0x33, 0xf5, 0x32, 0x70, 0x05, 0x7f, 0x0f, 0x12, 0x0d} },
+{ 0x0ac9,      16,     {0xd7, 0xe5, 0x32, 0x60, 0x1b, 0x7f, 0x03, 0x12, 0x0d, 0xd7, 0x7f, 0x00, 0x7e, 0x20, 0x7d, 0x40} },
+{ 0x0ad9,      16,     {0x7c, 0x5b, 0x12, 0x06, 0x94, 0xe4, 0x33, 0xf5, 0x32, 0x70, 0x05, 0x7f, 0x0f, 0x12, 0x0d, 0xd7} },
+{ 0x0ae9,      14,     {0xe5, 0x32, 0x60, 0x05, 0xe4, 0xff, 0x12, 0x0d, 0xd7, 0xe5, 0x32, 0x24, 0xff, 0x22} },
+{ 0x0af7,      8,      {0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x10, 0xd3, 0x22} },
+{ 0x0aff,      1,      {0x32} },
+{ 0x0b00,      16,     {0x02, 0x0d, 0x64, 0x00, 0x02, 0x0d, 0xab, 0x00, 0x02, 0x0d, 0x2f, 0x00, 0x02, 0x0d, 0x7c, 0x00} },
+{ 0x0b10,      16,     {0x02, 0x0d, 0xc1, 0x00, 0x02, 0x0a, 0xff, 0x00, 0x02, 0x0e, 0x4c, 0x00, 0x02, 0x0e, 0x4d, 0x00} },
+{ 0x0b20,      16,     {0x02, 0x0e, 0x4e, 0x00, 0x02, 0x0e, 0x4f, 0x00, 0x02, 0x0e, 0x50, 0x00, 0x02, 0x0e, 0x51, 0x00} },
+{ 0x0b30,      16,     {0x02, 0x0e, 0x52, 0x00, 0x02, 0x0e, 0x53, 0x00, 0x02, 0x0e, 0x54, 0x00, 0x02, 0x0e, 0x55, 0x00} },
+{ 0x0b40,      16,     {0x02, 0x0e, 0x56, 0x00, 0x02, 0x0e, 0x57, 0x00, 0x02, 0x0e, 0x58, 0x00, 0x02, 0x0e, 0x59, 0x00} },
+{ 0x0b50,      8,      {0x02, 0x0e, 0x5a, 0x00, 0x02, 0x0e, 0x5b, 0x00} },
+{ 0x0b58,      16,     {0xe4, 0xfe, 0x75, 0x2a, 0xff, 0x75, 0x2b, 0x11, 0x75, 0x2c, 0x12, 0xab, 0x2a, 0xaa, 0x2b, 0xa9} },
+{ 0x0b68,      16,     {0x2c, 0x90, 0x00, 0x01, 0x12, 0x08, 0x22, 0x64, 0x02, 0x70, 0x2d, 0xad, 0x06, 0x0e, 0xed, 0xb5} },
+{ 0x0b78,      16,     {0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x08, 0x71, 0x85, 0xf0, 0x28, 0xf5, 0x29, 0x62, 0x28} },
+{ 0x0b88,      16,     {0xe5, 0x28, 0x62, 0x29, 0xe5, 0x29, 0x62, 0x28, 0x29, 0xfd, 0xe5, 0x28, 0x3a, 0xa9, 0x05, 0x75} },
+{ 0x0b98,      14,     {0x2a, 0xff, 0xf5, 0x2b, 0x89, 0x2c, 0x80, 0xc3, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
+{ 0x0ba6,      1,      {0x22} },
+{ 0x0ba7,      16,     {0xab, 0x07, 0xaa, 0x06, 0xac, 0x05, 0xe4, 0xfd, 0xe5, 0x11, 0x60, 0x11, 0xea, 0xff, 0xae, 0x05} },
+{ 0x0bb7,      16,     {0x0d, 0xee, 0x24, 0x10, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xef, 0xf0, 0xeb, 0xae, 0x05} },
+{ 0x0bc7,      16,     {0x0d, 0x74, 0x10, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xeb, 0xf0, 0xaf, 0x05, 0x0d} },
+{ 0x0bd7,      16,     {0x74, 0x10, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xec, 0xf0, 0xaf, 0x0f, 0x7a, 0x0f} },
+{ 0x0be7,      13,     {0x7b, 0x10, 0x12, 0x0d, 0x10, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x0d, 0x94, 0x22} },
+{ 0x0bf4,      16,     {0x8e, 0x32, 0x8f, 0x33, 0x8d, 0x34, 0x8a, 0x35, 0x8b, 0x36, 0xe4, 0xfd, 0xf5, 0x37, 0xe5, 0x11} },
+{ 0x0c04,      16,     {0x60, 0x12, 0xe5, 0x32, 0xff, 0xae, 0x05, 0x0d, 0xee, 0x24, 0x13, 0xf5, 0x82, 0xe4, 0x34, 0x0f} },
+{ 0x0c14,      16,     {0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x33, 0xae, 0x05, 0x0d, 0x74, 0x13, 0x2e, 0xf5, 0x82, 0xe4, 0x34} },
+{ 0x0c24,      16,     {0x0f, 0xf5, 0x83, 0xe5, 0x33, 0xf0, 0xaf, 0x0f, 0x7a, 0x0f, 0x7b, 0x13, 0x12, 0x0d, 0x10, 0xaf} },
+{ 0x0c34,      11,     {0x0f, 0xad, 0x34, 0xab, 0x36, 0xaa, 0x35, 0x12, 0x0c, 0xf1, 0x22} },
+{ 0x0c3f,      16,     {0x8e, 0x32, 0x8f, 0x33, 0x8d, 0x34, 0x8a, 0x35, 0x8b, 0x36, 0xe4, 0xf5, 0x37, 0xe5, 0x37, 0xc3} },
+{ 0x0c4f,      16,     {0x95, 0x34, 0x50, 0x20, 0x05, 0x33, 0xe5, 0x33, 0xae, 0x32, 0x70, 0x02, 0x05, 0x32, 0x14, 0xff} },
+{ 0x0c5f,      16,     {0xe5, 0x36, 0x25, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x35, 0xf5, 0x83, 0xe0, 0xfd, 0x12, 0x0b, 0xa7} },
+{ 0x0c6f,      5,      {0x05, 0x37, 0x80, 0xd9, 0x22} },
+{ 0x0c74,      16,     {0xa9, 0x07, 0xe5, 0x0d, 0x70, 0x25, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xe9, 0x25, 0xe0} },
+{ 0x0c84,      16,     {0x44, 0x01, 0x90, 0x7f, 0xa6, 0xf0, 0x8d, 0x08, 0xaf, 0x03, 0xa9, 0x07, 0x75, 0x09, 0x01, 0x8a} },
+{ 0x0c94,      13,     {0x0a, 0x89, 0x0b, 0xe4, 0xf5, 0x0c, 0x75, 0x0d, 0x03, 0xd3, 0x22, 0xc3, 0x22} },
+{ 0x0ca1,      16,     {0xa9, 0x07, 0xe5, 0x0d, 0x70, 0x23, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xe9, 0x25, 0xe0} },
+{ 0x0cb1,      16,     {0x90, 0x7f, 0xa6, 0xf0, 0x8d, 0x08, 0xaf, 0x03, 0xa9, 0x07, 0x75, 0x09, 0x01, 0x8a, 0x0a, 0x89} },
+{ 0x0cc1,      11,     {0x0b, 0xe4, 0xf5, 0x0c, 0x75, 0x0d, 0x01, 0xd3, 0x22, 0xc3, 0x22} },
+{ 0x0ccc,      16,     {0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x06, 0x04, 0xe0, 0x44} },
+{ 0x0cdc,      16,     {0x02, 0xf0, 0x7f, 0xd0, 0x7e, 0x07, 0x12, 0x0d, 0x94, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0} },
+{ 0x0cec,      5,      {0xe0, 0x44, 0x04, 0xf0, 0x22} },
+{ 0x0cf1,      16,     {0x12, 0x0c, 0x74, 0xe5, 0x0d, 0x24, 0xfa, 0x60, 0x10, 0x14, 0x60, 0x07, 0x24, 0x07, 0x70, 0xf3} },
+{ 0x0d01,      15,     {0x7f, 0x08, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x07, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x06, 0x22} },
+{ 0x0d10,      16,     {0x12, 0x0c, 0xa1, 0xe5, 0x0d, 0x24, 0xfa, 0x60, 0x10, 0x14, 0x60, 0x07, 0x24, 0x07, 0x70, 0xf3} },
+{ 0x0d20,      15,     {0x7f, 0x08, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x07, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x06, 0x22} },
+{ 0x0d2f,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f} },
+{ 0x0d3f,      11,     {0xab, 0x74, 0x04, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0d4a,      16,     {0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x12, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x14, 0x7e, 0x00, 0x12} },
+{ 0x0d5a,      10,     {0x0d, 0x94, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22} },
+{ 0x0d64,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x01, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01} },
+{ 0x0d74,      8,      {0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0d7c,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x03, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08} },
+{ 0x0d8c,      8,      {0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0d94,      16,     {0x8e, 0x38, 0x8f, 0x39, 0xe5, 0x39, 0x15, 0x39, 0xae, 0x38, 0x70, 0x02, 0x15, 0x38, 0x4e, 0x60} },
+{ 0x0da4,      7,      {0x05, 0x12, 0x0e, 0x00, 0x80, 0xee, 0x22} },
+{ 0x0dab,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x02, 0xf0, 0xd0} },
+{ 0x0dbb,      6,      {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0dc1,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x10, 0xf0, 0xd0} },
+{ 0x0dd1,      6,      {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
+{ 0x0dd7,      16,     {0xae, 0x07, 0x7f, 0x21, 0x7d, 0x01, 0x74, 0x00, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xab, 0x82} },
+{ 0x0de7,      5,      {0xfa, 0x12, 0x0d, 0x10, 0x22} },
+{ 0x0dec,      16,     {0x50, 0x0f, 0x00, 0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, 0x80, 0x98, 0x88, 0x83, 0xc6} },
+{ 0x0dfc,      3,      {0xa1, 0x86, 0x8e} },
+{ 0x0dff,      1,      {0x00} },
+{ 0x0e00,      16,     {0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9} },
+{ 0x0e10,      1,      {0x22} },
+{ 0x0e11,      14,     {0x90, 0x7f, 0x00, 0xe5, 0x10, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0xd3, 0x22} },
+{ 0x0e1f,      14,     {0x90, 0x7f, 0x00, 0xe5, 0x0e, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0xd3, 0x22} },
+{ 0x0e2d,      8,      {0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x0e, 0xd3, 0x22} },
+{ 0x0e35,      8,      {0xe4, 0xf5, 0x0d, 0xd2, 0xe9, 0xd2, 0xaf, 0x22} },
+{ 0x0e3d,      3,      {0xd2, 0x00, 0x22} },
+{ 0x0e40,      2,      {0xd3, 0x22} },
+{ 0x0e42,      2,      {0xd3, 0x22} },
+{ 0x0e44,      2,      {0xd3, 0x22} },
+{ 0x0e46,      2,      {0xd3, 0x22} },
+{ 0x0e48,      2,      {0xd3, 0x22} },
+{ 0x0e4a,      2,      {0xd3, 0x22} },
+{ 0x0e4c,      1,      {0x32} },
+{ 0x0e4d,      1,      {0x32} },
+{ 0x0e4e,      1,      {0x32} },
+{ 0x0e4f,      1,      {0x32} },
+{ 0x0e50,      1,      {0x32} },
+{ 0x0e51,      1,      {0x32} },
+{ 0x0e52,      1,      {0x32} },
+{ 0x0e53,      1,      {0x32} },
+{ 0x0e54,      1,      {0x32} },
+{ 0x0e55,      1,      {0x32} },
+{ 0x0e56,      1,      {0x32} },
+{ 0x0e57,      1,      {0x32} },
+{ 0x0e58,      1,      {0x32} },
+{ 0x0e59,      1,      {0x32} },
+{ 0x0e5a,      1,      {0x32} },
+{ 0x0e5b,      1,      {0x32} },
+{ 0x1100,      16,     {0x12, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x40, 0x47, 0x05, 0x10, 0x27, 0x01, 0x00, 0x01, 0x02} },
+{ 0x1110,      16,     {0x00, 0x01, 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x03, 0xa0, 0x00, 0x09, 0x04, 0x00, 0x00, 0x02} },
+{ 0x1120,      16,     {0xff, 0x00, 0x00, 0x04, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40} },
+{ 0x1130,      16,     {0x00, 0x00, 0x04, 0x03, 0x09, 0x04, 0x26, 0x03, 0x41, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x68, 0x00} },
+{ 0x1140,      16,     {0x6f, 0x00, 0x72, 0x00, 0x20, 0x00, 0x43, 0x00, 0x68, 0x00, 0x69, 0x00, 0x70, 0x00, 0x73, 0x00} },
+{ 0x1150,      16,     {0x2c, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x2e, 0x00, 0x28, 0x03, 0x46, 0x00} },
+{ 0x1160,      16,     {0x69, 0x00, 0x72, 0x00, 0x6d, 0x00, 0x77, 0x00, 0x61, 0x00, 0x72, 0x00, 0x65, 0x00, 0x20, 0x00} },
+{ 0x1170,      16,     {0x46, 0x00, 0x72, 0x00, 0x61, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x57, 0x00, 0x6f, 0x00, 0x72, 0x00} },
+{ 0x1180,      16,     {0x6b, 0x00, 0x73, 0x00, 0x2a, 0x03, 0x43, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x66, 0x00, 0x69, 0x00} },
+{ 0x1190,      16,     {0x67, 0x00, 0x75, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00} },
+{ 0x11a0,      16,     {0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x22, 0x03} },
+{ 0x11b0,      16,     {0x49, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x66, 0x00, 0x61, 0x00, 0x63, 0x00} },
+{ 0x11c0,      16,     {0x65, 0x00, 0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00} },
+{ 0x11d0,      2,      {0x00, 0x00} },
+{ 0xffff,      0,      {0x00} }
+};
+#endif
index bf6fe6571d19d39a6e8d96d9e5559ebf9fadbaac..1d42736fff70d56861334f28baa2f25ce437a944 100644 (file)
@@ -21,7 +21,6 @@
  *  - working around the horridness of the rest
  */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/kernel.h>
diff --git a/drivers/usb/usb-serial.c b/drivers/usb/usb-serial.c
deleted file mode 100644 (file)
index 4af9932..0000000
+++ /dev/null
@@ -1,2551 +0,0 @@
-/*
- * USB Serial Converter driver
- *
- *     (C) Copyright (C) 1999, 2000
- *         Greg Kroah-Hartman (greg@kroah.com)
- *
- *     This program is free software; you can redistribute it and/or modify
- *     it under the terms of the GNU General Public License as published by
- *     the Free Software Foundation; either version 2 of the License, or
- *     (at your option) any later version.
- *
- * This driver was originally based on the ACM driver by Armin Fuerst (which was 
- * based on a driver by Brad Keryan)
- *
- * See Documentation/usb/usb-serial.txt for more information on using this driver
- * 
- * (03/06/2000) gkh
- *     Added the keyspan pda code from Brian Warner <warner@lothar.com>
- *     Moved a bunch of the port specific stuff into its own structure. This
- *     is in anticipation of the true multiport devices (there's a bug if you
- *     try to access more than one port of any multiport device right now)
- *
- * (02/21/2000) gkh
- *     Made it so that any serial devices only have to specify which functions
- *     they want to overload from the generic function calls (great, 
- *     inheritance in C, in a driver, just what I wanted...)
- *     Added support for set_termios and ioctl function calls. No drivers take
- *     advantage of this yet.
- *     Removed the #ifdef MODULE, now there is no module specific code.
- *     Cleaned up a few comments in usb-serial.h that were wrong (thanks again
- *     to Miles Lott).
- *     Small fix to get_free_serial.
- *
- * (02/14/2000) gkh
- *     Removed the Belkin and Peracom functionality from the driver due to
- *     the lack of support from the vendor, and me not wanting people to 
- *     accidenatly buy the device, expecting it to work with Linux.
- *     Added read_bulk_callback and write_bulk_callback to the type structure
- *     for the needs of the FTDI and WhiteHEAT driver.
- *     Changed all reverences to FTDI to FTDI_SIO at the request of Bill
- *     Ryder.
- *     Changed the output urb size back to the max endpoint size to make
- *     the ftdi_sio driver have it easier, and due to the fact that it didn't
- *     really increase the speed any.
- *
- * (02/11/2000) gkh
- *     Added VISOR_FUNCTION_CONSOLE to the visor startup function. This was a
- *     patch from Miles Lott (milos@insync.net).
- *     Fixed bug with not restoring the minor range that a device grabs, if
- *     the startup function fails (thanks Miles for finding this).
- *
- * (02/05/2000) gkh
- *     Added initial framework for the Keyspan PDA serial converter so that
- *     Brian Warner has a place to put his code.
- *     Made the ezusb specific functions generic enough that different
- *     devices can use them (whiteheat and keyspan_pda both need them).
- *     Split out a whole bunch of structure and other stuff to a seperate
- *     usb-serial.h file.
- *     Made the Visor connection messages a little more understandable, now
- *     that Miles Lott (milos@insync.net) has gotten the Generic channel to
- *     work. Also made them always show up in the log file.
- * 
- * (01/25/2000) gkh
- *     Added initial framework for FTDI serial converter so that Bill Ryder
- *     has a place to put his code.
- *     Added the vendor specific info from Handspring. Now we can print out
- *     informational debug messages as well as understand what is happening.
- *
- * (01/23/2000) gkh
- *     Fixed problem of crash when trying to open a port that didn't have a
- *     device assigned to it. Made the minor node finding a little smarter,
- *     now it looks to find a continous space for the new device.
- *
- * (01/21/2000) gkh
- *     Fixed bug in visor_startup with patch from Miles Lott (milos@insync.net)
- *     Fixed get_serial_by_minor which was all messed up for multi port 
- *     devices. Fixed multi port problem for generic devices. Now the number
- *     of ports is determined by the number of bulk out endpoints for the
- *     generic device.
- *
- * (01/19/2000) gkh
- *     Removed lots of cruft that was around from the old (pre urb) driver 
- *     interface.
- *     Made the serial_table dynamic. This should save lots of memory when
- *     the number of minor nodes goes up to 256.
- *     Added initial support for devices that have more than one port. 
- *     Added more debugging comments for the Visor, and added a needed 
- *     set_configuration call.
- *
- * (01/17/2000) gkh
- *     Fixed the WhiteHEAT firmware (my processing tool had a bug)
- *     and added new debug loader firmware for it.
- *     Removed the put_char function as it isn't really needed.
- *     Added visor startup commands as found by the Win98 dump.
- * 
- * (01/13/2000) gkh
- *     Fixed the vendor id for the generic driver to the one I meant it to be.
- *
- * (01/12/2000) gkh
- *     Forget the version numbering...that's pretty useless...
- *     Made the driver able to be compiled so that the user can select which
- *     converter they want to use. This allows people who only want the Visor
- *     support to not pay the memory size price of the WhiteHEAT.
- *     Fixed bug where the generic driver (idVendor=0000 and idProduct=0000)
- *     grabbed the root hub. Not good.
- * 
- * version 0.4.0 (01/10/2000) gkh
- *     Added whiteheat.h containing the firmware for the ConnectTech WhiteHEAT
- *     device. Added startup function to allow firmware to be downloaded to
- *     a device if it needs to be.
- *     Added firmware download logic to the WhiteHEAT device.
- *     Started to add #defines to split up the different drivers for potential
- *     configuration option.
- *     
- * version 0.3.1 (12/30/99) gkh
- *      Fixed problems with urb for bulk out.
- *      Added initial support for multiple sets of endpoints. This enables
- *      the Handspring Visor to be attached successfully. Only the first
- *      bulk in / bulk out endpoint pair is being used right now.
- *
- * version 0.3.0 (12/27/99) gkh
- *     Added initial support for the Handspring Visor based on a patch from
- *     Miles Lott (milos@sneety.insync.net)
- *     Cleaned up the code a bunch and converted over to using urbs only.
- *
- * version 0.2.3 (12/21/99) gkh
- *     Added initial support for the Connect Tech WhiteHEAT converter.
- *     Incremented the number of ports in expectation of getting the
- *     WhiteHEAT to work properly (4 ports per connection).
- *     Added notification on insertion and removal of what port the
- *     device is/was connected to (and what kind of device it was).
- *
- * version 0.2.2 (12/16/99) gkh
- *     Changed major number to the new allocated number. We're legal now!
- *
- * version 0.2.1 (12/14/99) gkh
- *     Fixed bug that happens when device node is opened when there isn't a
- *     device attached to it. Thanks to marek@webdesign.no for noticing this.
- *
- * version 0.2.0 (11/10/99) gkh
- *     Split up internals to make it easier to add different types of serial 
- *     converters to the code.
- *     Added a "generic" driver that gets it's vendor and product id
- *     from when the module is loaded. Thanks to David E. Nelson (dnelson@jump.net)
- *     for the idea and sample code (from the usb scanner driver.)
- *     Cleared up any licensing questions by releasing it under the GNU GPL.
- *
- * version 0.1.2 (10/25/99) gkh
- *     Fixed bug in detecting device.
- *
- * version 0.1.1 (10/05/99) gkh
- *     Changed the major number to not conflict with anything else.
- *
- * version 0.1 (09/28/99) gkh
- *     Can recognize the two different devices and start up a read from
- *     device when asked to. Writes also work. No control signals yet, this
- *     all is vendor specific data (i.e. no spec), also no control for
- *     different baud rates or other bit settings.
- *     Currently we are using the same devid as the acm driver. This needs
- *     to change.
- * 
- */
-
-#include <linux/config.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/signal.h>
-#include <linux/errno.h>
-#include <linux/poll.h>
-#include <linux/init.h>
-#include <linux/malloc.h>
-#include <linux/fcntl.h>
-#include <linux/tty_driver.h>
-#include <linux/tty_flip.h>
-#include <linux/tty.h>
-#include <linux/module.h>
-#include <linux/spinlock.h>
-
-#define DEBUG
-
-#include "usb.h"
-
-#ifdef CONFIG_USB_SERIAL_WHITEHEAT
-#include "whiteheat.h"         /* firmware for the ConnectTech WhiteHEAT device */
-#endif
-
-#ifdef CONFIG_USB_SERIAL_KEYSPAN_PDA
-struct ezusb_hex_record {
-       __u16 address;
-       __u8 data_size;
-       __u8 data[16];
-};
-#include "keyspan_pda_fw.h"
-#endif
-
-#include "usb-serial.h"
-
-/* parity check flag */
-#define RELEVANT_IFLAG(iflag)  (iflag & (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK))
-
-/* local function prototypes */
-static int  serial_open (struct tty_struct *tty, struct file * filp);
-static void serial_close (struct tty_struct *tty, struct file * filp);
-static int  serial_write (struct tty_struct * tty, int from_user, const unsigned char *buf, int count);
-static int  serial_write_room (struct tty_struct *tty);
-static int  serial_chars_in_buffer (struct tty_struct *tty);
-static void serial_throttle (struct tty_struct * tty);
-static void serial_unthrottle (struct tty_struct * tty);
-static int  serial_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg);
-static void serial_set_termios (struct tty_struct *tty, struct termios * old);
-
-static void * usb_serial_probe(struct usb_device *dev, unsigned int ifnum);
-static void usb_serial_disconnect(struct usb_device *dev, void *ptr);
-
-static struct usb_driver usb_serial_driver = {
-       "serial",
-       usb_serial_probe,
-       usb_serial_disconnect,
-       { NULL, NULL }
-};
-
-static int                     serial_refcount;
-static struct tty_struct *     serial_tty[SERIAL_TTY_MINORS];
-static struct termios *                serial_termios[SERIAL_TTY_MINORS];
-static struct termios *                serial_termios_locked[SERIAL_TTY_MINORS];
-static struct usb_serial       *serial_table[SERIAL_TTY_MINORS] = {NULL, };
-
-
-
-static struct usb_serial *get_serial_by_minor (int minor)
-{
-       dbg("get_serial_by_minor %d", minor);
-
-       return serial_table[minor];
-}
-
-
-static struct usb_serial *get_free_serial (int num_ports, int *minor)
-{
-       struct usb_serial *serial = NULL;
-       int i, j;
-       int good_spot;
-
-       dbg("get_free_serial %d", num_ports);
-
-       *minor = 0;
-       for (i = 0; i < SERIAL_TTY_MINORS; ++i) {
-               if (serial_table[i])
-                       continue;
-
-               good_spot = 1;
-               for (j = 1; j <= num_ports-1; ++j)
-                       if (serial_table[i+j])
-                               good_spot = 0;
-               if (good_spot == 0)
-                       continue;
-                       
-               if (!(serial = kmalloc(sizeof(struct usb_serial), GFP_KERNEL))) {
-                       err("Out of memory");
-                       return NULL;
-               }
-               memset(serial, 0, sizeof(struct usb_serial));
-               serial_table[i] = serial;
-               *minor = i;
-               dbg("minor base = %d", *minor);
-               for (i = *minor+1; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i)
-                       serial_table[i] = serial;
-               return serial;
-               }
-       return NULL;
-}
-
-
-static void return_serial (struct usb_serial *serial)
-{
-       int i;
-
-       dbg("return_serial");
-
-       if (serial == NULL)
-               return;
-
-       for (i = 0; i < serial->num_ports; ++i) {
-               serial_table[serial->minor + i] = NULL;
-       }
-
-       return;
-}
-
-
-#ifdef USES_EZUSB_FUNCTIONS
-/* EZ-USB Control and Status Register.  Bit 0 controls 8051 reset */
-#define CPUCS_REG    0x7F92
-
-static int ezusb_writememory (struct usb_serial *serial, int address, unsigned char *data, int length, __u8 bRequest)
-{
-       int result;
-       unsigned char *transfer_buffer =  kmalloc (length, GFP_KERNEL);
-
-//     dbg("ezusb_writememory %x, %d", address, length);
-
-       if (!transfer_buffer) {
-               err("ezusb_writememory: kmalloc(%d) failed.", length);
-               return -ENOMEM;
-       }
-       memcpy (transfer_buffer, data, length);
-       result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), bRequest, 0x40, address, 0, transfer_buffer, length, 300);
-       kfree (transfer_buffer);
-       return result;
-}
-
-
-static int ezusb_set_reset (struct usb_serial *serial, unsigned char reset_bit)
-{
-       int     response;
-       dbg("ezusb_set_reset: %d", reset_bit);
-       response = ezusb_writememory (serial, CPUCS_REG, &reset_bit, 1, 0xa0);
-       if (response < 0) {
-               err("ezusb_set_reset %d failed", reset_bit);
-       }
-       return response;
-}
-
-#endif /* USES_EZUSB_FUNCTIONS */
-
-
-/*****************************************************************************
- * Driver tty interface functions
- *****************************************************************************/
-static int serial_open (struct tty_struct *tty, struct file * filp)
-{
-       struct usb_serial *serial;
-       
-       dbg("serial_open");
-
-       /* initialize the pointer incase something fails */
-       tty->driver_data = NULL;
-
-       /* get the serial object associated with this tty pointer */
-       serial = get_serial_by_minor (MINOR(tty->device));
-
-       /* do some sanity checking that we really have a device present */
-       if (!serial) {
-               dbg("serial == NULL!");
-               return (-ENODEV);
-       }
-       if (!serial->type) {
-               dbg("serial->type == NULL!");
-               return (-ENODEV);
-       }
-
-       /* make the tty driver remember our serial object, and us it */
-       tty->driver_data = serial;
-       serial->tty = tty;
-        
-       /* pass on to the driver specific version of this function if it is available */
-       if (serial->type->open) {
-               return (serial->type->open(tty, filp));
-       } else {
-               return (generic_serial_open(tty, filp));
-       }
-}
-
-
-static void serial_close(struct tty_struct *tty, struct file * filp)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int port;       
-
-       dbg("serial_close");
-
-       if (!serial) {
-               dbg("serial == NULL!");
-               return;
-       }
-
-       port = MINOR(tty->device) - serial->minor;
-
-       dbg("serial_close port %d", port);
-       
-       /* do some sanity checking that we really have a device present */
-       if (!serial->type) {
-               dbg("serial->type == NULL!");
-               return;
-       }
-       if (!serial->port[port].active) {
-               dbg ("device not opened");
-               return;
-       }
-
-       /* pass on to the driver specific version of this function if it is available */
-       if (serial->type->close) {
-               serial->type->close(tty, filp);
-       } else {
-               generic_serial_close(tty, filp);
-       }
-}      
-
-
-static int serial_write (struct tty_struct * tty, int from_user, const unsigned char *buf, int count)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int port = MINOR(tty->device) - serial->minor;
-       
-       dbg("serial_write port %d, %d byte(s)", port, count);
-
-       /* do some sanity checking that we really have a device present */
-       if (!serial) {
-               dbg("serial == NULL!");
-               return (-ENODEV);
-       }
-       if (!serial->type) {
-               dbg("serial->type == NULL!");
-               return (-ENODEV);
-       }
-       if (!serial->port[port].active) {
-               dbg ("device not opened");
-               return (-EINVAL);
-       }
-       
-       /* pass on to the driver specific version of this function if it is available */
-       if (serial->type->write) {
-               return (serial->type->write(tty, from_user, buf, count));
-       } else {
-               return (generic_serial_write(tty, from_user, buf, count));
-       }
-}
-
-
-static int serial_write_room (struct tty_struct *tty) 
-{
-       struct usb_serial *serial = (struct usb_serial *)tty->driver_data; 
-       int port = MINOR(tty->device) - serial->minor;
-
-       dbg("serial_write_room port %d", port);
-       
-       /* do some sanity checking that we really have a device present */
-       if (!serial) {
-               dbg("serial == NULL!");
-               return (-ENODEV);
-       }
-       if (!serial->type) {
-               dbg("serial->type == NULL!");
-               return (-ENODEV);
-       }
-       if (!serial->port[port].active) {
-               dbg ("device not open");
-               return (-EINVAL);
-       }
-       
-       /* pass on to the driver specific version of this function if it is available */
-       if (serial->type->write_room) {
-               return (serial->type->write_room(tty));
-       } else {
-               return (generic_write_room(tty));
-       }
-}
-
-
-static int serial_chars_in_buffer (struct tty_struct *tty) 
-{
-       struct usb_serial *serial = (struct usb_serial *)tty->driver_data; 
-       int port = MINOR(tty->device) - serial->minor;
-
-       dbg("serial_chars_in_buffer port %d", port);
-       
-       /* do some sanity checking that we really have a device present */
-       if (!serial) {
-               dbg("serial == NULL!");
-               return (-ENODEV);
-       }
-       if (!serial->type) {
-               dbg("serial->type == NULL!");
-               return (-ENODEV);
-       }
-       if (!serial->port[port].active) {
-               dbg ("device not open");
-               return (-EINVAL);
-       }
-       
-       /* pass on to the driver specific version of this function if it is available */
-       if (serial->type->chars_in_buffer) {
-               return (serial->type->chars_in_buffer(tty));
-       } else {
-               return (generic_chars_in_buffer(tty));
-       }
-}
-
-
-static void serial_throttle (struct tty_struct * tty)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int port = MINOR(tty->device) - serial->minor;
-
-       dbg("serial_throttle port %d", port);
-       
-       /* do some sanity checking that we really have a device present */
-       if (!serial) {
-               dbg("serial == NULL!");
-               return;
-       }
-       if (!serial->type) {
-               dbg("serial->type == NULL!");
-               return;
-       }
-       if (!serial->port[port].active) {
-               dbg ("device not open");
-               return;
-       }
-
-       /* pass on to the driver specific version of this function */
-       if (serial->type->throttle) {
-               serial->type->throttle(tty);
-       } else {
-               generic_throttle(tty);
-       }
-
-       return;
-}
-
-
-static void serial_unthrottle (struct tty_struct * tty)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int port = MINOR(tty->device) - serial->minor;
-
-       dbg("serial_unthrottle port %d", port);
-       
-       /* do some sanity checking that we really have a device present */
-       if (!serial) {
-               dbg("serial == NULL!");
-               return;
-       }
-       if (!serial->type) {
-               dbg("serial->type == NULL!");
-               return;
-       }
-       if (!serial->port[port].active) {
-               dbg ("device not open");
-               return;
-       }
-
-       /* pass on to the driver specific version of this function */
-       if (serial->type->unthrottle) {
-               serial->type->unthrottle(tty);
-       } else {
-               generic_unthrottle(tty);
-       }
-
-       return;
-}
-
-
-static int serial_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int port;       
-
-       dbg("serial_ioctl");
-
-       if (!serial) {
-               dbg("serial == NULL!");
-               return -ENODEV;
-       }
-
-       port = MINOR(tty->device) - serial->minor;
-
-       dbg("serial_ioctl port %d", port);
-       
-       /* do some sanity checking that we really have a device present */
-       if (!serial->type) {
-               dbg("serial->type == NULL!");
-               return -ENODEV;
-       }
-       if (!serial->port[port].active) {
-               dbg ("device not open");
-               return -ENODEV;
-       }
-
-       /* pass on to the driver specific version of this function if it is available */
-       if (serial->type->ioctl) {
-               return (serial->type->ioctl(tty, file, cmd, arg));
-       } else {
-               return (generic_ioctl (tty, file, cmd, arg));
-       }
-}
-
-
-static void serial_set_termios (struct tty_struct *tty, struct termios * old)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int port;       
-
-       dbg("serial_set_termios");
-
-       if (!serial) {
-               dbg("serial == NULL!");
-               return;
-       }
-
-       port = MINOR(tty->device) - serial->minor;
-
-       dbg("serial_set_termios port %d", port);
-       
-       /* do some sanity checking that we really have a device present */
-       if (!serial->type) {
-               dbg("serial->type == NULL!");
-               return;
-       }
-       if (!serial->port[port].active) {
-               dbg ("device not open");
-               return;
-       }
-
-       /* pass on to the driver specific version of this function if it is available */
-       if (serial->type->set_termios) {
-               serial->type->set_termios(tty, old);
-       } else {
-               generic_set_termios (tty, old);
-       }
-       
-       return;
-}
-
-
-static void serial_break (struct tty_struct *tty, int break_state)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int port;       
-
-       if (!serial) {
-               dbg("serial == NULL!");
-               return;
-       }
-
-       port = MINOR(tty->device) - serial->minor;
-
-       dbg("serial_break port %d", port);
-       
-       /* do some sanity checking that we really have a device present */
-       if (!serial->type) {
-               dbg("serial->type == NULL!");
-               return;
-       }
-       if (!serial->port[port].active) {
-               dbg ("device not open");
-               return;
-       }
-
-       /* pass on to the driver specific version of this function if it is
-           available */
-       if (serial->type->break_ctl) {
-               serial->type->break_ctl(tty, break_state);
-       }
-}
-
-
-#ifdef CONFIG_USB_SERIAL_WHITEHEAT
-/*****************************************************************************
- * Connect Tech's White Heat specific driver functions
- *****************************************************************************/
-static int whiteheat_serial_open (struct tty_struct *tty, struct file *filp)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int portNumber = MINOR(tty->device) - serial->minor;
-       struct usb_serial_port *port = &serial->port[portNumber];
-
-       dbg("whiteheat_serial_open port %d", portNumber);
-
-       if (port->active) {
-               dbg ("device already open");
-               return -EINVAL;
-       }
-       port->active = 1;
-       /*Start reading from the device*/
-       if (usb_submit_urb(&port->read_urb))
-               dbg("usb_submit_urb(read bulk) failed");
-
-       /* Need to do device specific setup here (control lines, baud rate, etc.) */
-       /* FIXME!!! */
-
-       return (0);
-}
-
-
-static void whiteheat_serial_close(struct tty_struct *tty, struct file * filp)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int portNumber = MINOR(tty->device) - serial->minor;
-       struct usb_serial_port *port = &serial->port[portNumber];
-
-       dbg("whiteheat_serial_close port %d", portNumber);
-       
-       /* Need to change the control lines here */
-       /* FIXME */
-       
-       /* shutdown our bulk reads and writes */
-       usb_unlink_urb (&port->write_urb);
-       usb_unlink_urb (&port->read_urb);
-       port->active = 0;
-}
-
-
-static void whiteheat_set_termios (struct tty_struct *tty, struct termios *old_termios)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int port = MINOR(tty->device) - serial->minor;
-       unsigned int cflag = tty->termios->c_cflag;
-
-       dbg("whiteheat_set_termios port %d", port);
-
-       /* check that they really want us to change something */
-       if (old_termios) {
-               if ((cflag == old_termios->c_cflag) &&
-                   (RELEVANT_IFLAG(tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) {
-                       dbg("nothing to change...");
-                       return;
-               }
-       }
-
-       /* do the parsing of the cflag to see what to set the line to */
-       /* FIXME!! */
-
-       return;
-}
-
-static void whiteheat_throttle (struct tty_struct * tty)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int port = MINOR(tty->device) - serial->minor;
-
-       dbg("whiteheat_throttle port %d", port);
-
-       /* Change the control signals */
-       /* FIXME!!! */
-
-       return;
-}
-
-
-static void whiteheat_unthrottle (struct tty_struct * tty)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int port = MINOR(tty->device) - serial->minor;
-
-       dbg("whiteheat_unthrottle port %d", port);
-
-       /* Change the control signals */
-       /* FIXME!!! */
-
-       return;
-}
-
-
-/* steps to download the firmware to the WhiteHEAT device:
- - hold the reset (by writing to the reset bit of the CPUCS register)
- - download the VEND_AX.HEX file to the chip using VENDOR_REQUEST-ANCHOR_LOAD
- - release the reset (by writing to the CPUCS register)
- - download the WH.HEX file for all addresses greater than 0x1b3f using
-   VENDOR_REQUEST-ANCHOR_EXTERNAL_RAM_LOAD
- - hold the reset
- - download the WH.HEX file for all addresses less than 0x1b40 using
-   VENDOR_REQUEST_ANCHOR_LOAD
- - release the reset
- - device renumerated itself and comes up as new device id with all
-   firmware download completed.
-*/
-static int  whiteheat_startup (struct usb_serial *serial)
-{
-       int response;
-       const struct whiteheat_hex_record *record;
-       
-       dbg("whiteheat_startup");
-       
-       response = ezusb_set_reset (serial, 1);
-
-       record = &whiteheat_loader[0];
-       while (record->address != 0xffff) {
-               response = ezusb_writememory (serial, record->address, 
-                               (unsigned char *)record->data, record->data_size, 0xa0);
-               if (response < 0) {
-                       err("ezusb_writememory failed for loader (%d %04X %p %d)", 
-                               response, record->address, record->data, record->data_size);
-                       break;
-               }
-               ++record;
-       }
-
-       response = ezusb_set_reset (serial, 0);
-
-       record = &whiteheat_firmware[0];
-       while (record->address < 0x1b40) {
-               ++record;
-       }
-       while (record->address != 0xffff) {
-               response = ezusb_writememory (serial, record->address, 
-                               (unsigned char *)record->data, record->data_size, 0xa0);
-               if (response < 0) {
-                       err("ezusb_writememory failed for first firmware step (%d %04X %p %d)", 
-                               response, record->address, record->data, record->data_size);
-                       break;
-               }
-               ++record;
-       }
-       
-       response = ezusb_set_reset (serial, 1);
-
-       record = &whiteheat_firmware[0];
-       while (record->address < 0x1b40) {
-               response = ezusb_writememory (serial, record->address, 
-                               (unsigned char *)record->data, record->data_size, 0xa0);
-               if (response < 0) {
-                       err("ezusb_writememory failed for second firmware step (%d %04X %p %d)", 
-                               response, record->address, record->data, record->data_size);
-                       break;
-               }
-               ++record;
-       }
-
-       response = ezusb_set_reset (serial, 0);
-
-       /* we want this device to fail to have a driver assigned to it. */
-       return (1);
-}
-#endif /* CONFIG_USB_SERIAL_WHITEHEAT */
-
-
-#ifdef CONFIG_USB_SERIAL_VISOR
-/******************************************************************************
- * Handspring Visor specific driver functions
- ******************************************************************************/
-static int visor_serial_open (struct tty_struct *tty, struct file *filp)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data;
-       int portNumber = MINOR(tty->device) - serial->minor;
-       struct usb_serial_port *port = &serial->port[portNumber];
-
-       dbg("visor_serial_open port %d", portNumber);
-
-       if (port->active) {
-               dbg ("device already open");
-               return -EINVAL;
-       }
-
-       port->active = 1;
-
-       /*Start reading from the device*/
-       if (usb_submit_urb(&port->read_urb))
-               dbg("usb_submit_urb(read bulk) failed");
-
-       return (0);
-}
-
-static void visor_serial_close(struct tty_struct *tty, struct file * filp)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data;
-       int portNumber = MINOR(tty->device) - serial->minor;
-       struct usb_serial_port *port = &serial->port[portNumber];
-       unsigned char *transfer_buffer =  kmalloc (0x12, GFP_KERNEL);
-       
-       dbg("visor_serial_close port %d", portNumber);
-                        
-       if (!transfer_buffer) {
-               err("visor_serial_close: kmalloc(%d) failed.", 0x12);
-       } else {
-               /* send a shutdown message to the device */
-               usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_CLOSE_NOTIFICATION,
-                               0xc2, 0x0000, 0x0000, transfer_buffer, 0x12, 300);
-       }
-
-       /* shutdown our bulk reads and writes */
-       usb_unlink_urb (&port->write_urb);
-       usb_unlink_urb (&port->read_urb);
-       port->active = 0;
-}
-
-
-static void visor_throttle (struct tty_struct * tty)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data;
-       int port = MINOR(tty->device) - serial->minor;
-
-       dbg("visor_throttle port %d", port);
-
-       usb_unlink_urb (&serial->port[port].read_urb);
-
-       return;
-}
-
-
-static void visor_unthrottle (struct tty_struct * tty)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data;
-       int port = MINOR(tty->device) - serial->minor;
-
-       dbg("visor_unthrottle port %d", port);
-
-       if (usb_unlink_urb (&serial->port[port].read_urb))
-               dbg("usb_submit_urb(read bulk) failed");
-
-       return;
-}
-
-
-static int  visor_startup (struct usb_serial *serial)
-{
-       int response;
-       int i;
-       unsigned char *transfer_buffer =  kmalloc (256, GFP_KERNEL);
-
-       if (!transfer_buffer) {
-               err("visor_startup: kmalloc(%d) failed.", 256);
-               return -ENOMEM;
-       }
-
-       dbg("visor_startup");
-
-       dbg("visor_setup: Set config to 1");
-       usb_set_configuration (serial->dev, 1);
-
-       /* send a get connection info request */
-       response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_GET_CONNECTION_INFORMATION,
-                                       0xc2, 0x0000, 0x0000, transfer_buffer, 0x12, 300);
-       if (response < 0) {
-               err("visor_startup: error getting connection information");
-       } else {
-               struct visor_connection_info *connection_info = (struct visor_connection_info *)transfer_buffer;
-               char *string;
-               info("%s: Number of ports: %d", serial->type->name, connection_info->num_ports);
-               for (i = 0; i < connection_info->num_ports; ++i) {
-                       switch (connection_info->connections[i].port_function_id) {
-                               case VISOR_FUNCTION_GENERIC:
-                                       string = "Generic";
-                                       break;
-                               case VISOR_FUNCTION_DEBUGGER:
-                                       string = "Debugger";
-                                       break;
-                               case VISOR_FUNCTION_HOTSYNC:
-                                       string = "HotSync";
-                                       break;
-                               case VISOR_FUNCTION_CONSOLE:
-                                       string = "Console";
-                                       break;
-                               case VISOR_FUNCTION_REMOTE_FILE_SYS:
-                                       string = "Remote File System";
-                                       break;
-                               default:
-                                       string = "unknown";
-                                       break;  
-                       }
-                       info("%s: port %d, is for %s use and is bound to ttyUSB%d", serial->type->name, connection_info->connections[i].port, string, serial->minor + i);
-               }
-       }
-
-       /* ask for the number of bytes available, but ignore the response as it is broken */
-       response = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), VISOR_REQUEST_BYTES_AVAILABLE,
-                                       0xc2, 0x0000, 0x0005, transfer_buffer, 0x02, 300);
-       if (response < 0) {
-               err("visor_startup: error getting bytes available request");
-       }
-
-       kfree (transfer_buffer);
-
-       /* continue on with initialization */
-       return (0);
-}
-
-
-#endif /* CONFIG_USB_SERIAL_VISOR*/
-
-
-#ifdef CONFIG_USB_SERIAL_FTDI_SIO
-/******************************************************************************
- * FTDI SIO Serial Converter specific driver functions
- ******************************************************************************/
-
-/* Bill Ryder - bryder@sgi.com - wrote the FTDI_SIO implementation */
-/* Thanx to FTDI for so kindly providing details of the protocol required */
-/*   to talk to the device */
-
-#include "ftdi_sio.h"
-
-static int  ftdi_sio_serial_open (struct tty_struct *tty, struct file *filp)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int portNumber = MINOR(tty->device) - serial->minor;
-       struct usb_serial_port *port = &serial->port[portNumber];
-       char buf[1]; /* Needed for the usb_control_msg I think */
-
-       dbg("ftdi_sio_serial_open port %d", portNumber);
-
-       if (port->active) {
-               dbg ("device already open");
-               return -EINVAL;
-       }
-       port->active = 1;
-
-       usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                       FTDI_SIO_RESET_REQUEST, FTDI_SIO_RESET_REQUEST_TYPE, 
-                       FTDI_SIO_RESET_SIO, 
-                       0, buf, 0, HZ * 5);
-
-       /* FIXME - Should I really purge the buffers? */
-       usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                       FTDI_SIO_RESET_REQUEST, FTDI_SIO_RESET_REQUEST_TYPE, 
-                       FTDI_SIO_RESET_PURGE_RX, 
-                       0, buf, 0, HZ * 5);
-
-       usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                       FTDI_SIO_RESET_REQUEST, FTDI_SIO_RESET_REQUEST_TYPE, 
-                       FTDI_SIO_RESET_PURGE_TX, 
-                       0, buf, 0, HZ * 5);     
-
-
-       /* As per usb_serial_init s/be CS8, B9600, 1 STOP BIT */
-       if ( usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                            FTDI_SIO_SET_BAUDRATE_REQUEST,
-                            FTDI_SIO_SET_BAUDRATE_REQUEST_TYPE,
-                            ftdi_sio_b9600, 0, 
-                            buf, 0, HZ * 5) < 0){
-               dbg("Error from baudrate urb");
-               return(-EINVAL);
-       }
-
-       if ( usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                            FTDI_SIO_SET_DATA_REQUEST, 
-                            FTDI_SIO_SET_DATA_REQUEST_TYPE,
-                            8 | FTDI_SIO_SET_DATA_PARITY_NONE | 
-                            FTDI_SIO_SET_DATA_STOP_BITS_1, 0,
-                            buf, 0, HZ * 5) < 0){
-               dbg("Error from cs8/noparity/1 stopbit urb");
-               return(-EINVAL);
-       }
-
-       /* Disable flow control */
-       if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                           FTDI_SIO_SET_FLOW_CTRL_REQUEST, 
-                           FTDI_SIO_SET_FLOW_CTRL_REQUEST_TYPE,
-                           0, 0, 
-                           buf, 0, HZ * 5) < 0) {
-               dbg("error from flowcontrol urb");
-               return(-EINVAL);
-       }           
-
-       /* Turn on RTS and DTR since we are not flow controlling*/
-       /* FIXME - check for correct behaviour clocal vs non clocal */
-       /* FIXME - might be able to do both simultaneously */
-       if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                           FTDI_SIO_SET_MODEM_CTRL_REQUEST, 
-                           FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE,
-                           (unsigned)FTDI_SIO_SET_DTR_HIGH, 0, 
-                           buf, 0, HZ * 5) < 0) {
-               dbg("Error from DTR HIGH urb");
-       }
-       if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                           FTDI_SIO_SET_MODEM_CTRL_REQUEST, 
-                           FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE,
-                           (unsigned)FTDI_SIO_SET_RTS_HIGH, 0, 
-                           buf, 0, HZ * 5) < 0) {
-               dbg("Error from RTS HIGH urb");
-       }
-       
-       /*Start reading from the device*/
-       if (usb_submit_urb(&port->read_urb))
-               dbg("usb_submit_urb(read bulk) failed");
-
-       return (0);
-}
-
-
-static void ftdi_sio_serial_close (struct tty_struct *tty, struct file *filp)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int portNumber = MINOR(tty->device) - serial->minor;
-       struct usb_serial_port *port = &serial->port[portNumber];
-       char buf[1];
-
-       dbg("ftdi_sio_serial_close port %d", portNumber);
-       
-       /* FIXME - might be able to do both simultaneously */
-       if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                           FTDI_SIO_SET_MODEM_CTRL_REQUEST, 
-                           FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE,
-                           (unsigned)FTDI_SIO_SET_DTR_LOW, 0, 
-                           buf, 0, HZ * 5) < 0) {
-               dbg("Error from DTR LOW urb");
-       }
-       if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                           FTDI_SIO_SET_MODEM_CTRL_REQUEST, 
-                           FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE,
-                           (unsigned)FTDI_SIO_SET_RTS_LOW, 0, 
-                           buf, 0, HZ * 5) < 0) {
-               dbg("Error from RTS LOW urb");
-       }       
-
-       /* FIXME Should I flush the device here? - not doing it for now */
-
-       /* shutdown our bulk reads and writes */
-       usb_unlink_urb (&port->write_urb);
-       usb_unlink_urb (&port->read_urb);
-       port->active = 0;
-}
-
-
-  
-/* The ftdi_sio requires the first byte to have:
-   B0 1
-   B1 0
-   B2..7 length of message excluding byte 0
-*/
-static int ftdi_sio_serial_write (struct tty_struct * tty, int from_user, 
-                                 const unsigned char *buf, int count)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int portNumber = MINOR(tty->device) - serial->minor;
-       struct usb_serial_port *port = &serial->port[portNumber];
-       const int data_offset = 1;
-
-       dbg("ftdi_sio_serial_write port %d, %d bytes", portNumber, count);
-
-       if (count == 0) {
-               dbg("write request of 0 bytes");
-               return 0;
-       }
-
-       /* only do something if we have a bulk out endpoint */
-       if (serial->num_bulk_out) {
-               unsigned char *first_byte = port->write_urb.transfer_buffer;
-
-               if (port->write_urb.status == -EINPROGRESS) {
-                       dbg ("already writing");
-                       return 0;
-               }
-
-               count += data_offset;
-               count = (count > port->bulk_out_size) ? port->bulk_out_size : count;
-               if (count == 0) {
-                       return 0;
-               }
-
-               /* Copy in the data to send */
-               if (from_user) {
-                       copy_from_user(port->write_urb.transfer_buffer + data_offset , 
-                                      buf, count - data_offset );
-               }
-               else {
-                       memcpy(port->write_urb.transfer_buffer + data_offset,
-                              buf, count - data_offset );
-               }  
-
-               /* Write the control byte at the front of the packet*/
-               first_byte = port->write_urb.transfer_buffer;
-               *first_byte = 1 | ((count-data_offset) << 2) ; 
-
-#ifdef DEBUG
-               dbg("Bytes: %d, Control Byte: 0o%03o",count, first_byte[0]);
-
-               if (count) {
-                       int i;
-                       printk (KERN_DEBUG __FILE__ ": data written - length = %d, data = ", count);
-                       for (i = 0; i < count; ++i) {
-                               printk ("0x%02x ", first_byte[i]);
-                               if (first_byte[i] > ' ' && first_byte[i] < '~') {
-                                       printk("%c ", first_byte[i]);
-                               } else {
-                                       printk("  ");
-                               }
-                       }
-
-                    
-                       printk ("\n");
-               }
-
-#endif
-               /* send the data out the bulk port */
-               port->write_urb.transfer_buffer_length = count;
-
-               if (usb_submit_urb(&port->write_urb))
-                       dbg("usb_submit_urb(write bulk) failed");
-
-               dbg("write returning: %d", count - data_offset);
-               return (count - data_offset);
-       }
-       
-       /* no bulk out, so return 0 bytes written */
-       return 0;
-} 
-
-
-static void ftdi_sio_read_bulk_callback (struct urb *urb)
-{ /* ftdi_sio_serial_buld_callback */
-       struct usb_serial *serial = (struct usb_serial *)urb->context;
-               struct tty_struct *tty = serial->tty; 
-               unsigned char *data = urb->transfer_buffer;
-       const int data_offset = 2;
-       int i;
-
-       dbg("ftdi_sio_read_bulk_callback");
-
-       if (urb->status) {
-               dbg("nonzero read bulk status received: %d", urb->status);
-               return;
-       }
-
-#ifdef DEBUG
-       if (urb->actual_length > 2) {
-               printk (KERN_DEBUG __FILE__ ": data read - length = %d, data = ", urb->actual_length);
-               for (i = 0; i < urb->actual_length; ++i) {
-                       printk ("0x%.2x ", data[i]);
-                       if (data[i] > ' ' && data[i] < '~') {
-                               printk("%c ", data[i]);
-                       } else {
-                               printk("  ");
-                       }
-               }
-               printk ("\n");
-       }
-#endif
-       
-
-       if (urb->actual_length > data_offset) {
-               for (i = data_offset ; i < urb->actual_length ; ++i) {
-                       tty_insert_flip_char(tty, data[i], 0);
-               }
-               tty_flip_buffer_push(tty);
-       }
-
-       /* Continue trying to always read  */
-       if (usb_submit_urb(urb))
-               dbg("failed resubmitting read urb");
-
-       return;
-} /* ftdi_sio_serial_read_bulk_callback */
-
-
-static void ftdi_sio_set_termios (struct tty_struct *tty, struct termios *old_termios)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int port = MINOR(tty->device) - serial->minor;
-       unsigned int cflag = tty->termios->c_cflag;
-       __u16 urb_value; /* Will hold the new flags */
-       char buf[1]; /* Perhaps I should dynamically alloc this? */
-       dbg("ftdi_sio_set_termios port %d", port);
-
-       /* FIXME - we should keep the old termios really */
-       /* FIXME -For this cut I don't care if the line is really changing or 
-          not  - so just do the change regardless */
-       
-       /* Set number of data bits, parity, stop bits */
-       
-       urb_value = 0;
-       urb_value |= (cflag & CSTOPB ? FTDI_SIO_SET_DATA_STOP_BITS_2 :
-                     FTDI_SIO_SET_DATA_STOP_BITS_1);
-       urb_value |= (cflag & PARENB ? 
-                     (cflag & PARODD ? FTDI_SIO_SET_DATA_PARITY_ODD : 
-                      FTDI_SIO_SET_DATA_PARITY_EVEN) :
-                     FTDI_SIO_SET_DATA_PARITY_NONE);
-       if (cflag & CSIZE) {
-               switch (cflag & CSIZE) {
-               case CS5: urb_value |= 5; dbg("Setting CS5"); break;
-               case CS6: urb_value |= 6; dbg("Setting CS6"); break;
-               case CS7: urb_value |= 7; dbg("Setting CS7"); break;
-               case CS8: urb_value |= 8; dbg("Setting CS8"); break;
-               default:
-                       dbg("CSIZE was set but not CS5-CS8");
-               }
-       }
-       if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                           FTDI_SIO_SET_DATA_REQUEST, 
-                           FTDI_SIO_SET_DATA_REQUEST_TYPE,
-                           urb_value , 0,
-                           buf, 0, 100) < 0) {
-               dbg("FAILED to set databits/stopbits/parity");
-       }          
-
-       /* Now do the baudrate */
-       /* FIXME - should drop lines on B0 */
-       /* FIXME Should also handle CLOCAL here  */
-     
-       switch(cflag & CBAUD){
-       case B300: urb_value = ftdi_sio_b300; dbg("Set to 300"); break;
-       case B600: urb_value = ftdi_sio_b600; dbg("Set to 600") ; break;
-       case B1200: urb_value = ftdi_sio_b1200; dbg("Set to 1200") ; break;
-       case B2400: urb_value = ftdi_sio_b2400; dbg("Set to 2400") ; break;
-       case B4800: urb_value = ftdi_sio_b4800; dbg("Set to 4800") ; break;
-       case B9600: urb_value = ftdi_sio_b9600; dbg("Set to 9600") ; break;
-       case B19200: urb_value = ftdi_sio_b19200; dbg("Set to 19200") ; break;
-       case B38400: urb_value = ftdi_sio_b38400; dbg("Set to 38400") ; break;
-       case B57600: urb_value = ftdi_sio_b57600; dbg("Set to 57600") ; break;
-       case B115200: urb_value = ftdi_sio_b115200; dbg("Set to 115200") ; break;
-       default: dbg("FTDI_SIO does not support the baudrate requested"); 
-               /* FIXME - how to return an error for this? */ break;
-       }
-       /* Send the URB */
-       if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                           FTDI_SIO_SET_BAUDRATE_REQUEST, 
-                           FTDI_SIO_SET_BAUDRATE_REQUEST_TYPE,
-                           urb_value, 0, 
-                           buf, 0, 100) < 0) {
-               dbg("urb failed to set baurdrate");
-       }
-       return;
-}
-
-
-/*FIXME - the beginnings of this implementation - not even hooked into the driver yet */
-static int ftdi_sio_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int port = MINOR(tty->device) - serial->minor;
-       __u16 urb_value=0; /* Will hold the new flags */
-       char buf[1];
-       int  ret, mask;
-       dbg("ftdi_sio_ioctl port %d", port);
-
-       /* Based on code from acm.c */
-       switch (cmd) {
-
-               case TIOCMGET:
-                       /* Request the status from the device */
-                       if ((ret = usb_control_msg(serial->dev, 
-                                           usb_sndctrlpipe(serial->dev, 0),
-                                           FTDI_SIO_GET_MODEM_STATUS_REQUEST, 
-                                           FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE,
-                                           0, 0, 
-                                           buf, 1, HZ * 5)) < 0 ) {
-                               dbg("Get not get modem status of device");
-                               return(ret);
-                       }
-
-                       return put_user((buf[0] & FTDI_SIO_DSR_MASK ? TIOCM_DSR : 0) |
-                                       (buf[0] & FTDI_SIO_CTS_MASK ? TIOCM_CTS : 0) |
-                                       (buf[0]  & FTDI_SIO_RI_MASK  ? TIOCM_RI  : 0) |
-                                       (buf[0]  & FTDI_SIO_RLSD_MASK ? TIOCM_CD  : 0),
-                                       (unsigned long *) arg);
-                       break;
-
-               case TIOCMSET:
-               case TIOCMBIS:
-               case TIOCMBIC:
-                       if ((ret = get_user(mask, (unsigned long *) arg))) return ret;
-
-                       /* FIXME Need to remember if we have set DTR or RTS since we
-                          can't ask the device  */
-                       /* FIXME - also need to find the meaning of TIOCMBIS/BIC/SET */
-                       if (mask & TIOCM_DTR) {
-                               switch(cmd) {
-                               case TIOCMSET:
-                                       urb_value = FTDI_SIO_SET_DTR_HIGH | FTDI_SIO_SET_RTS_LOW;
-                                       break;
-
-                               case TIOCMBIS:
-                                       /* Will leave RTS alone and set DTR */
-                                       urb_value =  FTDI_SIO_SET_DTR_HIGH;
-                                       break;
-                                       
-                               case TIOCMBIC:
-                                       urb_value = FTDI_SIO_SET_DTR_LOW;
-                                       break;
-                               }
-                       }
-
-                       if (mask & TIOCM_RTS) {
-                               switch(cmd) {
-                               case TIOCMSET:
-                                       urb_value = FTDI_SIO_SET_DTR_LOW | FTDI_SIO_SET_RTS_HIGH;
-                                       break;
-
-                               case TIOCMBIS:
-                                       /* Will leave DTR and set RTS */
-                                       urb_value = FTDI_SIO_SET_RTS_HIGH;
-                                       break;
-
-                               case TIOCMBIC:
-                                       /* Will unset RTS */
-                                       urb_value = FTDI_SIO_SET_RTS_LOW;
-                                       break;
-                               }
-                       }       
-
-                       
-                       return(usb_control_msg(serial->dev, 
-                                              usb_sndctrlpipe(serial->dev, 0),
-                                              FTDI_SIO_SET_MODEM_CTRL_REQUEST, 
-                                              FTDI_SIO_SET_MODEM_CTRL_REQUEST_TYPE,
-                                              urb_value , 0,
-                                              buf, 0, HZ * 5));
-       }
-
-       return -ENOIOCTLCMD;
-}
-
-#endif /* CONFIG_USB_SERIAL_FTDI_SIO */
-
-
-#ifdef CONFIG_USB_SERIAL_KEYSPAN_PDA
-/*****************************************************************************
- * Keyspan PDA specific driver functions
- *****************************************************************************/
-
-static void keyspan_pda_rx_interrupt (struct urb *urb)
-{
-       struct usb_serial *serial = (struct usb_serial *) urb->context;
-       struct tty_struct *tty = serial->tty;
-       unsigned char *data = urb->transfer_buffer;
-       int i;
-
-       /* the urb might have been killed. */
-       if (urb->status)
-               return;
-       
-       /* see if the message is data or a status interrupt */
-       switch (data[0]) {
-       case 0:
-               /* rest of message is rx data */
-               if (urb->actual_length) {
-                       for (i = 1; i < urb->actual_length ; ++i) {
-                               tty_insert_flip_char(tty, data[i], 0);
-                       }
-                       tty_flip_buffer_push(tty);
-               }
-               break;
-       case 1:
-               /* status interrupt */
-               dbg(" rx int, d1=%d, d2=%d", data[1], data[2]);
-               switch (data[1]) {
-               case 1: /* modemline change */
-                       break;
-               case 2: /* tx unthrottle interrupt */
-                       serial->tx_throttled = 0;
-                       wake_up(&serial->write_wait); /* wake up writer */
-                       break;
-               default:
-                       break;
-               }
-               break;
-       default:
-               break;
-       }
-
-       /* INT urbs are automatically re-submitted */
-}
-
-
-static void keyspan_pda_rx_throttle (struct tty_struct *tty)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int port = MINOR(tty->device) - serial->minor;
-
-       /* stop receiving characters. We just turn off the URB request, and
-          let chars pile up in the device. If we're doing hardware
-          flowcontrol, the device will signal the other end when its buffer
-          fills up. If we're doing XON/XOFF, this would be a good time to
-          send an XOFF, although it might make sense to foist that off
-          upon the device too. */
-
-       dbg("keyspan_pda_rx_throttle port %d", port);
-       usb_unlink_urb(&serial->port[port].read_urb);
-}
-
-
-static void keyspan_pda_rx_unthrottle (struct tty_struct *tty)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int port = MINOR(tty->device) - serial->minor;
-
-       /* just restart the receive interrupt URB */
-       dbg("keyspan_pda_rx_unthrottle port %d", port);
-       if (usb_submit_urb(&serial->port[port].read_urb))
-               dbg(" usb_submit_urb(read urb) failed");
-       return;
-}
-
-
-static int keyspan_pda_setbaud (struct usb_serial *serial, int baud)
-{
-       int rc;
-       int bindex;
-
-       switch(baud) {
-               case 110: bindex = 0; break;
-               case 300: bindex = 1; break;
-               case 1200: bindex = 2; break;
-               case 2400: bindex = 3; break;
-               case 4800: bindex = 4; break;
-               case 9600: bindex = 5; break;
-               case 19200: bindex = 6; break;
-               case 38400: bindex = 7; break;
-               case 57600: bindex = 8; break;
-               case 115200: bindex = 9; break;
-               default: return -EINVAL;
-       }
-
-       /* rather than figure out how to sleep while waiting for this
-          to complete, I just use the "legacy" API. */
-       rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                            0, /* set baud */
-                            USB_TYPE_VENDOR 
-                            | USB_RECIP_INTERFACE
-                            | USB_DIR_OUT, /* type */
-                            bindex, /* value */
-                            0, /* index */
-                            NULL, /* &data */
-                            0, /* size */
-                            2*HZ); /* timeout */
-       return(rc);
-}
-
-
-static void keyspan_pda_break_ctl (struct tty_struct *tty, int break_state)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data;
-       int value;
-       if (break_state == -1)
-               value = 1; /* start break */
-       else
-               value = 0; /* clear break */
-       usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                       4, /* set break */
-                       USB_TYPE_VENDOR | USB_RECIP_INTERFACE | USB_DIR_OUT,
-                       value, 0, NULL, 0, 2*HZ);
-       /* there is something funky about this.. the TCSBRK that 'cu' performs
-          ought to translate into a break_ctl(-1),break_ctl(0) pair HZ/4
-          seconds apart, but it feels like the break sent isn't as long as it
-          is on /dev/ttyS0 */
-}
-
-
-static void keyspan_pda_set_termios (struct tty_struct *tty,
-                                    struct termios *old_termios)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       unsigned int cflag = tty->termios->c_cflag;
-
-       /* cflag specifies lots of stuff: number of stop bits, parity, number
-          of data bits, baud. What can the device actually handle?:
-          CSTOPB (1 stop bit or 2)
-          PARENB (parity)
-          CSIZE (5bit .. 8bit)
-          There is minimal hw support for parity (a PSW bit seems to hold the
-          parity of whatever is in the accumulator). The UART either deals
-          with 10 bits (start, 8 data, stop) or 11 bits (start, 8 data,
-          1 special, stop). So, with firmware changes, we could do:
-          8N1: 10 bit
-          8N2: 11 bit, extra bit always (mark?)
-          8[EOMS]1: 11 bit, extra bit is parity
-          7[EOMS]1: 10 bit, b0/b7 is parity
-          7[EOMS]2: 11 bit, b0/b7 is parity, extra bit always (mark?)
-
-          HW flow control is dictated by the tty->termios->c_cflags & CRTSCTS
-          bit.
-
-          For now, just do baud. */
-
-       switch (cflag & CBAUD) {
-               /* we could support more values here, just need to calculate
-                  the necessary divisors in the firmware. <asm/termbits.h>
-                  has the Bnnn constants. */
-               case B110: keyspan_pda_setbaud(serial, 110); break;
-               case B300: keyspan_pda_setbaud(serial, 300); break;
-               case B1200: keyspan_pda_setbaud(serial, 1200); break;
-               case B2400: keyspan_pda_setbaud(serial, 2400); break;
-               case B4800: keyspan_pda_setbaud(serial, 4800); break;
-               case B9600: keyspan_pda_setbaud(serial, 9600); break;
-               case B19200: keyspan_pda_setbaud(serial, 19200); break;
-               case B38400: keyspan_pda_setbaud(serial, 38400); break;
-               case B57600: keyspan_pda_setbaud(serial, 57600); break;
-               case B115200: keyspan_pda_setbaud(serial, 115200); break;
-               default: dbg("can't handle requested baud rate"); break;
-       }
-}
-
-
-/* modem control pins: DTR and RTS are outputs and can be controlled.
-   DCD, RI, DSR, CTS are inputs and can be read. All outputs can also be
-   read. The byte passed is: DTR(b7) DCD RI DSR CTS RTS(b2) unused unused */
-
-static int keyspan_pda_get_modem_info(struct usb_serial *serial,
-                                     unsigned char *value)
-{
-       int rc;
-       unsigned char data;
-       rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
-                            3, /* get pins */
-                            USB_TYPE_VENDOR|USB_RECIP_INTERFACE|USB_DIR_IN,
-                            0, 0, &data, 1, 2*HZ);
-       if (rc > 0)
-               *value = data;
-       return rc;
-}
-
-
-static int keyspan_pda_set_modem_info(struct usb_serial *serial,
-                                     unsigned char value)
-{
-       int rc;
-       rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                            3, /* set pins */
-                            USB_TYPE_VENDOR|USB_RECIP_INTERFACE|USB_DIR_OUT,
-                            value, 0, NULL, 0, 2*HZ);
-       return rc;
-}
-
-
-static int keyspan_pda_ioctl(struct tty_struct *tty, struct file *file,
-                            unsigned int cmd, unsigned long arg)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data;
-       int rc;
-       unsigned int value;
-       unsigned char status, mask;
-
-       switch (cmd) {
-       case TIOCMGET: /* get modem pins state */
-               rc = keyspan_pda_get_modem_info(serial, &status);
-               if (rc < 0)
-                       return rc;
-               value =
-                       ((status & (1<<7)) ? TIOCM_DTR : 0) |
-                       ((status & (1<<6)) ? TIOCM_CAR : 0) |
-                       ((status & (1<<5)) ? TIOCM_RNG : 0) |
-                       ((status & (1<<4)) ? TIOCM_DSR : 0) |
-                       ((status & (1<<3)) ? TIOCM_CTS : 0) |
-                       ((status & (1<<2)) ? TIOCM_RTS : 0);
-               if (copy_to_user((unsigned int *)arg, &value, sizeof(int)))
-                       return -EFAULT;
-               return 0;
-       case TIOCMSET: /* set a state as returned by MGET */
-               if (copy_from_user(&value, (unsigned int *)arg, sizeof(int)))
-                       return -EFAULT;
-               status =
-                       ((value & TIOCM_DTR) ? (1<<7) : 0) |
-                       ((value & TIOCM_CAR) ? (1<<6) : 0) |
-                       ((value & TIOCM_RNG) ? (1<<5) : 0) |
-                       ((value & TIOCM_DSR) ? (1<<4) : 0) |
-                       ((value & TIOCM_CTS) ? (1<<3) : 0) |
-                       ((value & TIOCM_RTS) ? (1<<2) : 0);
-               rc = keyspan_pda_set_modem_info(serial, status);
-               if (rc < 0)
-                       return rc;
-               return 0;
-       case TIOCMBIS: /* set bits in bitmask <arg> */
-       case TIOCMBIC: /* clear bits from bitmask <arg> */
-               if (copy_from_user(&value, (unsigned int *)arg, sizeof(int)))
-                       return -EFAULT;
-               rc = keyspan_pda_get_modem_info(serial, &status);
-               if (rc < 0)
-                       return rc;
-               mask =
-                       ((value & TIOCM_RTS) ? (1<<2) : 0) |
-                       ((value & TIOCM_DTR) ? (1<<7) : 0);
-               if (cmd == TIOCMBIS)
-                       status |= mask;
-               else
-                       status &= ~mask;
-               rc = keyspan_pda_set_modem_info(serial, status);
-               if (rc < 0)
-                       return rc;
-               return 0;
-       case TIOCMIWAIT:
-               /* wait for any of the 4 modem inputs (DCD,RI,DSR,CTS)*/
-               /* TODO */
-       case TIOCGICOUNT:
-               /* return count of modemline transitions */
-               return 0; /* TODO */
-       }
-       
-       return -ENOIOCTLCMD;
-}
-
-static int keyspan_pda_write(struct tty_struct * tty, int from_user, 
-                            const unsigned char *buf, int count)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int port = MINOR(tty->device) - serial->minor;
-       int request_unthrottle = 0;
-       int rc = 0;
-       DECLARE_WAITQUEUE(wait, current);
-
-       /* guess how much room is left in the device's ring buffer, and if we
-          want to send more than that, check first, updating our notion of
-          what is left. If our write will result in no room left, ask the
-          device to give us an interrupt when the room available rises above
-          a threshold, and hold off all writers (eventually, those using
-          select() or poll() too) until we receive that unthrottle interrupt.
-          Block if we can't write anything at all, otherwise write as much as
-          we can. */
-
-       if (count == 0) {
-               dbg(" write request of 0 bytes");
-               return (0);
-       }
-
-       /* we might block because of:
-          the TX urb is in-flight (wait until it completes)
-          the device is full (wait until it says there is room)
-       */
-       while (serial->port[port].write_urb.status == -EINPROGRESS) {
-               if (0 /* file->f_flags & O_NONBLOCK */) {
-                       rc = -EAGAIN;
-                       goto err;
-               }
-               interruptible_sleep_on(&serial->write_wait);
-               if (signal_pending(current)) {
-                       rc = -ERESTARTSYS;
-                       goto err;
-               }
-       }
-
-       /* at this point the URB is in our control, nobody else can submit it
-          again (the only sudden transition was the one from EINPROGRESS to
-          finished) */
-
-       /* the next potential block is that our TX process might be throttled.
-          The transition from throttled->not happens because of an Rx
-          interrupt, and the wake_up occurs during the same interrupt, so we
-          have to be careful to avoid a race that would cause us to sleep
-          forever. */
-
-       add_wait_queue(&serial->write_wait, &wait);
-       set_current_state(TASK_INTERRUPTIBLE);
-       while (serial->tx_throttled) {
-               /* device can't accomodate any more characters. Sleep until it
-                  can. Woken up by an Rx interrupt message, which clears
-                  tx_throttled first. */
-               dbg(" tx_throttled, going to sleep");
-               if (signal_pending(current)) {
-                       current->state = TASK_RUNNING;
-                       remove_wait_queue(&serial->write_wait, &wait);
-                       dbg(" woke up because of signal");
-                       rc = -ERESTARTSYS;
-                       goto err;
-               }
-               schedule();
-               dbg(" woke up");
-       }
-       remove_wait_queue(&serial->write_wait, &wait);
-       set_current_state(TASK_RUNNING);
-
-       count = (count > serial->port[port].bulk_out_size) ? 
-               serial->port[port].bulk_out_size : count;
-       if (count > serial->tx_room) {
-               unsigned char room;
-               /* Looks like we might overrun the Tx buffer. Ask the device
-                  how much room it really has */
-               rc = usb_control_msg(serial->dev, 
-                                    usb_rcvctrlpipe(serial->dev, 0),
-                                    6, /* write_room */
-                                    USB_TYPE_VENDOR | USB_RECIP_INTERFACE
-                                    | USB_DIR_IN,
-                                    0, /* value: 0 means "remaining room" */
-                                    0, /* index */
-                                    &room,
-                                    1,
-                                    2*HZ);
-               if (rc < 0) {
-                       dbg(" roomquery failed");
-                       return rc; /* failed */
-               }
-               if (rc == 0) {
-                       dbg(" roomquery returned 0 bytes");
-                       return -EIO; /* device didn't return any data */
-               }
-               dbg(" roomquery says %d", room);
-               serial->tx_room = room;
-               if (count > serial->tx_room) {
-                       /* we're about to completely fill the Tx buffer, so
-                          we'll be throttled afterwards. */
-                       count = serial->tx_room;
-                       request_unthrottle = 1;
-               }
-       }
-       serial->tx_room -= count;
-
-       if (count) {
-               /* now transfer data */
-               if (from_user) {
-                       copy_from_user(serial->port[port].write_urb.transfer_buffer,
-                                      buf, count);
-               }
-               else {
-                       memcpy (serial->port[port].write_urb.transfer_buffer, 
-                               buf, count);
-               }  
-               /* send the data out the bulk port */
-               serial->port[port].write_urb.transfer_buffer_length = count;
-               
-               if (usb_submit_urb(&serial->port[port].write_urb))
-                       dbg(" usb_submit_urb(write bulk) failed");
-       }
-       else {
-               /* There wasn't any room left, so we are throttled until
-                  the buffer empties a bit */
-               request_unthrottle = 1;
-       }
-
-       if (request_unthrottle) {
-               dbg(" request_unthrottle");
-               /* ask the device to tell us when the tx buffer becomes
-                  sufficiently empty */
-               serial->tx_throttled = 1; /* block writers */
-               rc = usb_control_msg(serial->dev, 
-                                    usb_sndctrlpipe(serial->dev, 0),
-                                    7, /* request_unthrottle */
-                                    USB_TYPE_VENDOR | USB_RECIP_INTERFACE
-                                    | USB_DIR_OUT,
-                                    16, /* value: threshold */
-                                    0, /* index */
-                                    NULL,
-                                    0,
-                                    2*HZ);
-       }
-
-       return (count);
- err:
-       return (rc);
-}
-
-
-static void keyspan_pda_write_bulk_callback (struct urb *urb)
-{
-       struct usb_serial *serial = (struct usb_serial *) urb->context;
-       struct tty_struct *tty = serial->tty; 
-
-       wake_up_interruptible(&serial->write_wait);
-
-       if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && 
-           tty->ldisc.write_wakeup)
-               (tty->ldisc.write_wakeup)(tty);
-
-       wake_up_interruptible(&tty->write_wait);
-}
-
-
-static int keyspan_pda_write_room (struct tty_struct *tty)
-{
-       struct usb_serial *serial = (struct usb_serial *)tty->driver_data; 
-
-       /* used by n_tty.c for processing of tabs and such. Giving it our
-          conservative guess is probably good enough, but needs testing by
-          running a console through the device. */
-
-       return (serial->tx_room);
-}
-
-
-static int keyspan_pda_chars_in_buffer (struct tty_struct *tty) 
-{
-       struct usb_serial *serial = (struct usb_serial *)tty->driver_data; 
-       unsigned char count;
-       int rc;
-
-       /* used by tty stuff to wait for output to drain. Go ask the
-          device how much is still queued in the tx ring */
-       rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
-                            6, /* write_room */
-                            USB_TYPE_VENDOR | USB_RECIP_INTERFACE
-                            | USB_DIR_IN,
-                            1, /* value: 1 means chars_in_buffer */
-                            0, /* index */
-                            &count,
-                            1,
-                            2*HZ);
-       if (rc < 0)
-               return rc; /* failed */
-       if (rc == 0)
-               return -EIO; /* device didn't return any data */
-       return (count);
-}
-
-
-static int keyspan_pda_serial_open (struct tty_struct *tty, struct file *filp)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int portNumber = MINOR(tty->device) - serial->minor;
-       struct usb_serial_port *port = &serial->port[portNumber];
-       unsigned char room;
-       int rc;
-
-       if (port->active) {
-               return -EINVAL;
-       }
-       port->active = 1;
-       /* find out how much room is in the Tx ring */
-       rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
-                            6, /* write_room */
-                            USB_TYPE_VENDOR | USB_RECIP_INTERFACE
-                            | USB_DIR_IN,
-                            0, /* value */
-                            0, /* index */
-                            &room,
-                            1,
-                            2*HZ);
-       if (rc < 0) {
-               dbg(" roomquery failed");
-               return rc; /* failed */
-       }
-       if (rc == 0) {
-               dbg(" roomquery returned 0 bytes");
-               return -EIO; /* device didn't return any data */
-       }
-       serial->tx_room = room;
-       serial->tx_throttled = room ? 0 : 1;
-
-       /* the normal serial device seems to always turn on DTR and RTS here,
-          so do the same */
-       if (tty->termios->c_cflag & CBAUD)
-               keyspan_pda_set_modem_info(serial, (1<<7) | (1<<2) );
-       else
-               keyspan_pda_set_modem_info(serial, 0);
-
-       /*Start reading from the device*/
-       if (usb_submit_urb(&port->read_urb))
-               dbg(" usb_submit_urb(read int) failed");
-
-       return (0);
-}
-
-
-static void keyspan_pda_serial_close(struct tty_struct *tty, 
-                                    struct file *filp)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int portNumber = MINOR(tty->device) - serial->minor;
-       struct usb_serial_port *port = &serial->port[portNumber];
-
-       /* the normal serial device seems to always shut off DTR and RTS now */
-       if (tty->termios->c_cflag & HUPCL)
-               keyspan_pda_set_modem_info(serial, 0);
-
-       /* shutdown our bulk reads and writes */
-       usb_unlink_urb (&port->write_urb);
-       usb_unlink_urb (&port->read_urb);
-       port->active = 0;
-}
-
-
-/* download the firmware to a "fake" device (pre-renumeration) */
-static int keyspan_pda_fake_startup (struct usb_serial *serial)
-{
-       int response;
-       const struct ezusb_hex_record *record;
-
-       /* download the firmware here ... */
-       response = ezusb_set_reset(serial, 1);
-
-       record = &keyspan_pda_firmware[0];
-       while(record->address != 0xffff) {
-               response = ezusb_writememory(serial, record->address,
-                                            (unsigned char *)record->data,
-                                            record->data_size, 0xa0);
-               if (response < 0) {
-                       err("ezusb_writememory failed for Keyspan PDA "
-                           "firmware (%d %04X %p %d)",
-                           response, 
-                           record->address, record->data, record->data_size);
-                       break;
-               }
-               record++;
-       }
-       /* bring device out of reset. Renumeration will occur in a moment
-          and the new device will bind to the real driver */
-       response = ezusb_set_reset(serial, 0);
-
-       /* we want this device to fail to have a driver assigned to it. */
-       return (1);
-}
-
-
-/* do some startup allocations not currently performed by usb_serial_probe() */
-static int keyspan_pda_startup (struct usb_serial *serial)
-{
-       struct usb_endpoint_descriptor *intin;
-       intin = serial->port[0].interrupt_in_endpoint;
-
-       /* set up the receive interrupt urb */
-       FILL_INT_URB(&serial->port[0].read_urb, serial->dev,
-                    usb_rcvintpipe(serial->dev, intin->bEndpointAddress),
-                    serial->port[0].interrupt_in_buffer,
-                    intin->wMaxPacketSize,
-                    keyspan_pda_rx_interrupt,
-                    serial,
-                    intin->bInterval);
-
-       init_waitqueue_head(&serial->write_wait);
-       
-       return (0);
-}
-
-#endif /* CONFIG_USB_SERIAL_KEYSPAN_PDA */
-
-
-/*****************************************************************************
- * generic devices specific driver functions
- *****************************************************************************/
-static int generic_serial_open (struct tty_struct *tty, struct file *filp)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int portNumber = MINOR(tty->device) - serial->minor;
-       struct usb_serial_port *port = &serial->port[portNumber];
-
-       dbg("generic_serial_open port %d", portNumber);
-
-       if (port->active) {
-               dbg ("device already open");
-               return -EINVAL;
-       }
-       port->active = 1;
-       /* if we have a bulk interrupt, start reading from it */
-       if (serial->num_bulk_in) {
-               /*Start reading from the device*/
-               if (usb_submit_urb(&port->read_urb))
-                       dbg("usb_submit_urb(read bulk) failed");
-       }
-
-       return (0);
-}
-
-
-static void generic_serial_close(struct tty_struct *tty, struct file * filp)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int portNumber = MINOR(tty->device) - serial->minor;
-       struct usb_serial_port *port = &serial->port[portNumber];
-
-       dbg("generic_serial_close port %d", portNumber);
-       
-       /* shutdown any bulk reads that might be going on */
-       if (serial->num_bulk_out) {
-               usb_unlink_urb (&port->write_urb);
-       }
-       if (serial->num_bulk_in) {
-               usb_unlink_urb (&port->read_urb);
-       }
-
-       port->active = 0;
-}
-
-
-static int generic_serial_write (struct tty_struct * tty, int from_user, const unsigned char *buf, int count)
-{
-       struct usb_serial *serial = (struct usb_serial *) tty->driver_data; 
-       int portNumber = MINOR(tty->device) - serial->minor;
-       struct usb_serial_port *port = &serial->port[portNumber];
-
-       dbg("generic_serial_write port %d", portNumber);
-
-       if (count == 0) {
-               dbg("write request of 0 bytes");
-               return (0);
-       }
-
-       /* only do something if we have a bulk out endpoint */
-       if (serial->num_bulk_out) {
-               if (port->write_urb.status == -EINPROGRESS) {
-                       dbg ("already writing");
-                       return (0);
-               }
-
-               count = (count > port->bulk_out_size) ? port->bulk_out_size : count;
-
-               if (from_user) {
-                       copy_from_user(port->write_urb.transfer_buffer, buf, count);
-               }
-               else {
-                       memcpy (port->write_urb.transfer_buffer, buf, count);
-               }  
-
-               /* send the data out the bulk port */
-               port->write_urb.transfer_buffer_length = count;
-
-               if (usb_submit_urb(&port->write_urb))
-                       dbg("usb_submit_urb(write bulk) failed");
-
-               return (count);
-       }
-       
-       /* no bulk out, so return 0 bytes written */
-       return (0);
-} 
-
-
-static int generic_write_room (struct tty_struct *tty) 
-{
-       struct usb_serial *serial = (struct usb_serial *)tty->driver_data; 
-       int portNumber = MINOR(tty->device) - serial->minor;
-       struct usb_serial_port *port = &serial->port[portNumber];
-       int room;
-
-       dbg("generic_write_room port %d", portNumber);
-       
-       if (serial->num_bulk_out) {
-               if (port->write_urb.status == -EINPROGRESS)
-                       room = 0;
-               else
-                       room = port->bulk_out_size;
-               dbg("generic_write_room returns %d", room);
-               return (room);
-       }
-       
-       return (0);
-}
-
-
-static int generic_chars_in_buffer (struct tty_struct *tty) 
-{
-       struct usb_serial *serial = (struct usb_serial *)tty->driver_data; 
-       int portNumber = MINOR(tty->device) - serial->minor;
-       struct usb_serial_port *port = &serial->port[portNumber];
-
-       dbg("generic_chars_in_buffer port %d", portNumber);
-       
-       if (serial->num_bulk_out) {
-               if (port->write_urb.status == -EINPROGRESS) {
-                       return (port->bulk_out_size);
-               }
-       }
-
-       return (0);
-}
-
-
-static void generic_throttle (struct tty_struct *tty) 
-{
-       /* do nothing for the generic device */
-       return;
-}
-
-
-static void generic_unthrottle (struct tty_struct *tty) 
-{
-       /* do nothing for the generic device */
-       return;
-}
-
-
-static int generic_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg)
-{
-       /* generic driver doesn't support any ioctls yet */
-       return -ENOIOCTLCMD;
-}
-
-
-static void generic_set_termios (struct tty_struct *tty, struct termios * old)
-{
-       /* generic driver doesn't really care about setting any line settings */
-       return;
-}
-
-
-static void generic_read_bulk_callback (struct urb *urb)
-{
-       struct usb_serial *serial = (struct usb_serial *)urb->context;
-               struct tty_struct *tty = serial->tty; 
-               unsigned char *data = urb->transfer_buffer;
-       int i;
-
-       dbg("generic_read_bulk_callback");
-
-       if (urb->status) {
-               dbg("nonzero read bulk status received: %d", urb->status);
-               return;
-       }
-
-#ifdef DEBUG
-       if (urb->actual_length) {
-               printk (KERN_DEBUG __FILE__ ": data read - length = %d, data = ", urb->actual_length);
-               for (i = 0; i < urb->actual_length; ++i) {
-                       printk ("%.2x ", data[i]);
-               }
-               printk ("\n");
-       }
-#endif
-       
-       if (urb->actual_length) {
-               for (i = 0; i < urb->actual_length ; ++i) {
-                        tty_insert_flip_char(tty, data[i], 0);
-               }
-               tty_flip_buffer_push(tty);
-       }
-
-       /* Continue trying to always read  */
-       if (usb_submit_urb(urb))
-               dbg("failed resubmitting read urb");
-
-       return;
-}
-
-
-static void generic_write_bulk_callback (struct urb *urb)
-{
-       struct usb_serial *serial = (struct usb_serial *) urb->context; 
-               struct tty_struct *tty = serial->tty; 
-
-       dbg("generic_write_bulk_callback");
-
-       if (urb->status) {
-               dbg("nonzero write bulk status received: %d", urb->status);
-               return;
-       }
-
-       if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup)
-               (tty->ldisc.write_wakeup)(tty);
-
-       wake_up_interruptible(&tty->write_wait);
-       
-       return;
-}
-
-
-
-static void * usb_serial_probe(struct usb_device *dev, unsigned int ifnum)
-{
-       struct usb_serial *serial = NULL;
-       struct usb_serial_port *port;
-       struct usb_interface_descriptor *interface;
-       struct usb_endpoint_descriptor *endpoint;
-       struct usb_endpoint_descriptor *interrupt_in_endpoint[MAX_NUM_PORTS];
-       struct usb_endpoint_descriptor *bulk_in_endpoint[MAX_NUM_PORTS];
-       struct usb_endpoint_descriptor *bulk_out_endpoint[MAX_NUM_PORTS];
-       struct usb_serial_device_type *type;
-       int device_num;
-       int minor;
-       int buffer_size;
-       int i;
-       char interrupt_pipe;
-       char bulk_in_pipe;
-       char bulk_out_pipe;
-       int num_interrupt_in = 0;
-       int num_bulk_in = 0;
-       int num_bulk_out = 0;
-       int num_ports;
-       
-       /* loop through our list of known serial converters, and see if this device matches */
-       device_num = 0;
-       while (usb_serial_devices[device_num] != NULL) {
-               type = usb_serial_devices[device_num];
-               dbg ("Looking at %s Vendor id=%.4x Product id=%.4x", type->name, *(type->idVendor), *(type->idProduct));
-
-               /* look at the device descriptor */
-               if ((dev->descriptor.idVendor == *(type->idVendor)) &&
-                   (dev->descriptor.idProduct == *(type->idProduct))) {
-
-                       dbg("descriptor matches...looking at the endpoints");
-
-                       /* descriptor matches, let's try to find the endpoints needed */
-                       interrupt_pipe = bulk_in_pipe = bulk_out_pipe = HAS_NOT;
-                       
-                       /* check out the endpoints */
-                       interface = &dev->actconfig->interface[ifnum].altsetting[0];
-                       for (i = 0; i < interface->bNumEndpoints; ++i) {
-                               endpoint = &interface->endpoint[i];
-               
-                               if ((endpoint->bEndpointAddress & 0x80) &&
-                                   ((endpoint->bmAttributes & 3) == 0x02)) {
-                                       /* we found a bulk in endpoint */
-                                       dbg("found bulk in");
-                                       bulk_in_pipe = HAS;
-                                       bulk_in_endpoint[num_bulk_in] = endpoint;
-                                       ++num_bulk_in;
-                               }
-
-                               if (((endpoint->bEndpointAddress & 0x80) == 0x00) &&
-                                   ((endpoint->bmAttributes & 3) == 0x02)) {
-                                       /* we found a bulk out endpoint */
-                                       dbg("found bulk out");
-                                       bulk_out_pipe = HAS;
-                                       bulk_out_endpoint[num_bulk_out] = endpoint;
-                                       ++num_bulk_out;
-                               }
-               
-                               if ((endpoint->bEndpointAddress & 0x80) &&
-                                   ((endpoint->bmAttributes & 3) == 0x03)) {
-                                       /* we found a interrupt in endpoint */
-                                       dbg("found interrupt in");
-                                       interrupt_pipe = HAS;
-                                       interrupt_in_endpoint[num_interrupt_in] = endpoint;
-                                       ++num_interrupt_in;
-                               }
-
-                       }
-       
-                       /* verify that we found all of the endpoints that we need */
-                       if ((interrupt_pipe & type->needs_interrupt_in) &&
-                           (bulk_in_pipe & type->needs_bulk_in) &&
-                           (bulk_out_pipe & type->needs_bulk_out)) {
-                               /* found all that we need */
-                               info("%s converter detected", type->name);
-
-#ifdef CONFIG_USB_SERIAL_GENERIC
-                               if (type == &generic_device)
-                                       num_ports = num_bulk_out;
-                               else
-#endif
-                                       num_ports = type->num_ports;
-
-                               serial = get_free_serial (num_ports, &minor);
-                               if (serial == NULL) {
-                                       err("No more free serial devices");
-                                       return NULL;
-                               }
-       
-                               serial->dev = dev;
-                               serial->type = type;
-                               serial->minor = minor;
-                               serial->num_ports = num_ports;
-                               serial->num_bulk_in = num_bulk_in;
-                               serial->num_bulk_out = num_bulk_out;
-                               serial->num_interrupt_in = num_interrupt_in;
-
-                               /* collect interrupt_in endpoints now, because
-                                  the keyspan_pda startup function needs
-                                  to know about them */
-                               for (i = 0; i < num_interrupt_in; ++i) {
-                                       port = &serial->port[i];
-                                       buffer_size = interrupt_in_endpoint[i]->wMaxPacketSize;
-                                       port->interrupt_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
-                                       if (!port->interrupt_in_buffer) {
-                                               err("Couldn't allocate interrupt_in_buffer");
-                                               goto probe_error;
-                                       }
-                                       port->interrupt_in_endpoint = interrupt_in_endpoint[i];
-                               }
-
-                               /* if this device type has a startup function, call it */
-                               if (type->startup) {
-                                       if (type->startup (serial)) {
-                                               return_serial (serial);
-                                               return NULL;
-                                       }
-                               }
-
-                               /* set up the endpoint information */
-                               for (i = 0; i < num_bulk_in; ++i) {
-                                       port = &serial->port[i];
-                                       buffer_size = bulk_in_endpoint[i]->wMaxPacketSize;
-                                       port->bulk_in_buffer = kmalloc (buffer_size, GFP_KERNEL);
-                                       if (!port->bulk_in_buffer) {
-                                               err("Couldn't allocate bulk_in_buffer");
-                                               goto probe_error;
-                                       }
-                                       if (serial->type->read_bulk_callback) {
-                                               FILL_BULK_URB(&port->read_urb, dev, usb_rcvbulkpipe (dev, bulk_in_endpoint[i]->bEndpointAddress),
-                                                               port->bulk_in_buffer, buffer_size, serial->type->read_bulk_callback, serial);
-                                       } else {
-                                               FILL_BULK_URB(&port->read_urb, dev, usb_rcvbulkpipe (dev, bulk_in_endpoint[i]->bEndpointAddress),
-                                                               port->bulk_in_buffer, buffer_size, generic_read_bulk_callback, serial);
-                                       }
-                               }
-
-                               for (i = 0; i < num_bulk_out; ++i) {
-                                       port = &serial->port[i];
-                                       port->bulk_out_size = bulk_out_endpoint[i]->wMaxPacketSize;
-                                       port->bulk_out_buffer = kmalloc (port->bulk_out_size, GFP_KERNEL);
-                                       if (!port->bulk_out_buffer) {
-                                               err("Couldn't allocate bulk_out_buffer");
-                                               goto probe_error;
-                                       }
-                                       if (serial->type->write_bulk_callback) {
-                                               FILL_BULK_URB(&port->write_urb, dev, usb_sndbulkpipe (dev, bulk_out_endpoint[i]->bEndpointAddress),
-                                                               port->bulk_out_buffer, port->bulk_out_size, serial->type->write_bulk_callback, serial);
-                                       } else {
-                                               FILL_BULK_URB(&port->write_urb, dev, usb_sndbulkpipe (dev, bulk_out_endpoint[i]->bEndpointAddress),
-                                                               port->bulk_out_buffer, port->bulk_out_size, generic_write_bulk_callback, serial);
-                                       }
-                               }
-
-#if 0 /* use this code when WhiteHEAT is up and running */
-                               for (i = 0; i < num_interrupt_in; ++i) {
-                                       buffer_size = interrupt_in_endpoint[i]->wMaxPacketSize;
-                                       serial->interrupt_in_buffer[i] = kmalloc (buffer_size, GFP_KERNEL);
-                                       if (!serial->interrupt_in_buffer[i]) {
-                                               err("Couldn't allocate interrupt_in_buffer");
-                                               goto probe_error;
-                                       }
-                                       FILL_INT_URB(&serial->control_urb[i], dev, usb_rcvintpipe (dev, interrupt_in_endpoint[i]->bEndpointAddress),
-                                                       serial->interrupt_in_buffer[i], buffer_size, serial_control_irq,
-                                                       serial, interrupt_in_endpoint[i]->bInterval);
-                               }
-#endif
-
-                               for (i = 0; i < serial->num_ports; ++i) {
-                                       info("%s converter now attached to ttyUSB%d", type->name, serial->minor + i);
-                               }
-
-                               MOD_INC_USE_COUNT;
-
-                               return serial;
-                       } else {
-                               info("descriptors matched, but endpoints did not");
-                       }
-               }
-
-               /* look at the next type in our list */
-               ++device_num;
-       }
-
-probe_error:
-       if (serial) {
-               for (i = 0; i < num_bulk_in; ++i)
-                       if (serial->port[i].bulk_in_buffer[i])
-                               kfree (serial->port[i].bulk_in_buffer);
-               for (i = 0; i < num_bulk_out; ++i)
-                       if (serial->port[i].bulk_out_buffer)
-                               kfree (serial->port[i].bulk_out_buffer);
-               for (i = 0; i < num_interrupt_in; ++i)
-                       if (serial->port[i].interrupt_in_buffer)
-                               kfree (serial->port[i].interrupt_in_buffer);
-               
-               /* return the minor range that this device had */
-               return_serial (serial);
-
-               /* free up any memory that we allocated */
-               kfree (serial);
-       }
-       return NULL;
-}
-
-
-static void usb_serial_disconnect(struct usb_device *dev, void *ptr)
-{
-       struct usb_serial *serial = (struct usb_serial *) ptr;
-       struct usb_serial_port *port;
-       int i;
-
-       if (serial) {
-               /* need to stop any transfers...*/
-               for (i = 0; i < serial->num_ports; ++i) {
-                       port = &serial->port[i];
-                       usb_unlink_urb (&port->write_urb);
-                       usb_unlink_urb (&port->read_urb);
-                       port->active = 0;
-               }
-
-               /* free up any memory that we allocated */
-               for (i = 0; i < serial->num_bulk_in; ++i) {
-                       port = &serial->port[i];
-                       if (port->bulk_in_buffer)
-                               kfree (port->bulk_in_buffer);
-               }
-               for (i = 0; i < serial->num_bulk_out; ++i) {
-                       port = &serial->port[i];
-                       if (port->bulk_out_buffer)
-                               kfree (port->bulk_out_buffer);
-               }
-               for (i = 0; i < serial->num_interrupt_in; ++i) {
-                       port = &serial->port[i];
-                       if (port->interrupt_in_buffer)
-                               kfree (port->interrupt_in_buffer);
-               }
-
-               for (i = 0; i < serial->num_ports; ++i) {
-                       info("%s converter now disconnected from ttyUSB%d", serial->type->name, serial->minor + i);
-               }
-
-               /* return the minor range that this device had */
-               return_serial (serial);
-
-               /* free up any memory that we allocated */
-               kfree (serial);
-
-       } else {
-               info("device disconnected");
-       }
-       
-       MOD_DEC_USE_COUNT;
-}
-
-
-static struct tty_driver serial_tty_driver = {
-       magic:                  TTY_DRIVER_MAGIC,
-       driver_name:            "usb",
-       name:                   "ttyUSB",
-       major:                  SERIAL_TTY_MAJOR,
-       minor_start:            0,
-       num:                    SERIAL_TTY_MINORS,
-       type:                   TTY_DRIVER_TYPE_SERIAL,
-       subtype:                SERIAL_TYPE_NORMAL,
-       flags:                  TTY_DRIVER_REAL_RAW,
-       refcount:               &serial_refcount,
-       table:                  serial_tty,
-       proc_entry:             NULL,
-       other:                  NULL,
-       termios:                serial_termios,
-       termios_locked:         serial_termios_locked,
-       
-       open:                   serial_open,
-       close:                  serial_close,
-       write:                  serial_write,
-       put_char:               NULL,
-       flush_chars:            NULL,
-       write_room:             serial_write_room,
-       ioctl:                  serial_ioctl,
-       set_termios:            serial_set_termios,
-       set_ldisc:              NULL, 
-       throttle:               serial_throttle,
-       unthrottle:             serial_unthrottle,
-       stop:                   NULL,
-       start:                  NULL,
-       hangup:                 NULL,
-       break_ctl:              serial_break,
-       wait_until_sent:        NULL,
-       send_xchar:             NULL,
-       read_proc:              NULL,
-       chars_in_buffer:        serial_chars_in_buffer,
-       flush_buffer:           NULL
-};
-
-
-int usb_serial_init(void)
-{
-       int i;
-
-       /* Initalize our global data */
-       for (i = 0; i < SERIAL_TTY_MINORS; ++i) {
-               serial_table[i] = NULL;
-       }
-
-       /* register the tty driver */
-       serial_tty_driver.init_termios          = tty_std_termios;
-       serial_tty_driver.init_termios.c_cflag  = B9600 | CS8 | CREAD | HUPCL | CLOCAL;
-       if (tty_register_driver (&serial_tty_driver)) {
-               err("failed to register tty driver");
-               return -EPERM;
-       }
-       
-       /* register the USB driver */
-       if (usb_register(&usb_serial_driver) < 0) {
-               tty_unregister_driver(&serial_tty_driver);
-               return -1;
-       }
-
-       info("support registered");
-       return 0;
-}
-
-
-void usb_serial_exit(void)
-{
-       tty_unregister_driver(&serial_tty_driver);
-       usb_deregister(&usb_serial_driver);
-}
-
-
-module_init(usb_serial_init);
-module_exit(usb_serial_exit);
-
-
diff --git a/drivers/usb/usb-serial.h b/drivers/usb/usb-serial.h
deleted file mode 100644 (file)
index f02eeed..0000000
+++ /dev/null
@@ -1,436 +0,0 @@
-/*
- * USB Serial Converter driver
- *
- *     (C) Copyright (C) 1999, 2000
- *         Greg Kroah-Hartman (greg@kroah.com)
- *
- *     This program is free software; you can redistribute it and/or modify
- *     it under the terms of the GNU General Public License as published by
- *     the Free Software Foundation; either version 2 of the License, or
- *     (at your option) any later version.
- *
- * See Documentation/usb/usb-serial.txt for more information on using this driver
- * 
- */
-
-
-#ifndef __LINUX_USB_SERIAL_H
-#define __LINUX_USB_SERIAL_H
-
-#include <linux/config.h>
-
-/* Module information */
-MODULE_AUTHOR("Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux-usb/");
-MODULE_DESCRIPTION("USB Serial Driver");
-
-#ifdef CONFIG_USB_SERIAL_GENERIC
-static __u16   vendor  = 0x05f9;
-static __u16   product = 0xffff;
-MODULE_PARM(vendor, "i");
-MODULE_PARM_DESC(vendor, "User specified USB idVendor");
-
-MODULE_PARM(product, "i");
-MODULE_PARM_DESC(product, "User specified USB idProduct");
-#endif
-
-
-/* USB Serial devices vendor ids and device ids that this driver supports */
-#define CONNECT_TECH_VENDOR_ID         0x0710
-#define CONNECT_TECH_FAKE_WHITE_HEAT_ID        0x0001
-#define CONNECT_TECH_WHITE_HEAT_ID     0x8001
-#define HANDSPRING_VENDOR_ID           0x082d
-#define HANDSPRING_VISOR_ID            0x0100
-#define FTDI_VENDOR_ID                 0x0403
-#define FTDI_SIO_SERIAL_CONVERTER_ID   0x8372
-#define KEYSPAN_VENDOR_ID              0x06cd
-#define KEYSPAN_PDA_FAKE_ID            0x0103
-#define KEYSPAN_PDA_ID                 0x0104 /* no clue */
-
-#define SERIAL_TTY_MAJOR       188     /* Nice legal number now */
-#define SERIAL_TTY_MINORS      16      /* Actually we are allowed 255, but this is good for now */
-
-
-#define MAX_NUM_PORTS  8       /* The maximum number of ports one device can grab at once */
-
-
-struct usb_serial_port {
-       struct usb_serial       *serial;        /* pointer back to the owner of this port */
-       struct tty_struct *     tty;            /* the coresponding tty for this device */
-       unsigned char           minor;
-       unsigned char           number;
-       char                    active;         /* someone has this device open */
-
-       struct usb_endpoint_descriptor * interrupt_in_endpoint;
-       __u8                    interrupt_in_interval;
-       unsigned char *         interrupt_in_buffer;
-       struct urb              control_urb;
-
-       unsigned char *         bulk_in_buffer;
-       struct urb              read_urb;
-
-       unsigned char *         bulk_out_buffer;
-       int                     bulk_out_size;
-       struct urb              write_urb;
-       void *                  private;        /* data private to the specific driver */
-};
-
-struct usb_serial {
-       struct usb_device *             dev;
-       struct usb_serial_device_type * type;
-       struct tty_struct *             tty;                    /* the coresponding tty for this device */
-       unsigned char                   minor;
-       unsigned char                   num_ports;              /* the number of ports this device has */
-       char                            num_interrupt_in;       /* number of interrupt in endpoints we have */
-       char                            num_bulk_in;            /* number of bulk in endpoints we have */
-       char                            num_bulk_out;           /* number of bulk out endpoints we have */
-       struct usb_serial_port          port[MAX_NUM_PORTS];
-
-       /* FIXME! These should move to the private area of the keyspan driver */
-       int                     tx_room;
-       int                     tx_throttled;
-       wait_queue_head_t       write_wait;
-
-       void *                  private;                /* data private to the specific driver */
-};
-
-
-#define MUST_HAVE_NOT  0x01
-#define MUST_HAVE      0x02
-#define DONT_CARE      0x03
-
-#define        HAS             0x02
-#define HAS_NOT                0x01
-
-#define NUM_DONT_CARE  (-1)
-
-
-/* This structure defines the individual serial converter. */
-struct usb_serial_device_type {
-       char    *name;
-       __u16   *idVendor;
-       __u16   *idProduct;
-       char    needs_interrupt_in;
-       char    needs_bulk_in;
-       char    needs_bulk_out;
-       char    num_interrupt_in;
-       char    num_bulk_in;
-       char    num_bulk_out;
-       char    num_ports;              /* number of serial ports this device has */
-
-       /* function call to make before accepting driver */
-       int (*startup) (struct usb_serial *serial);     /* return 0 to continue initialization, anything else to abort */
-       
-       /* serial function calls */
-       int  (*open)(struct tty_struct * tty, struct file * filp);
-       void (*close)(struct tty_struct * tty, struct file * filp);
-       int  (*write)(struct tty_struct * tty, int from_user,const unsigned char *buf, int count);
-       int  (*write_room)(struct tty_struct *tty);
-       int  (*ioctl)(struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg);
-       void (*set_termios)(struct tty_struct *tty, struct termios * old);
-       void (*break_ctl)(struct tty_struct *tty, int break_state);
-       int  (*chars_in_buffer)(struct tty_struct *tty);
-       void (*throttle)(struct tty_struct * tty);
-       void (*unthrottle)(struct tty_struct * tty);
-       
-       void (*read_bulk_callback)(struct urb *urb);
-       void (*write_bulk_callback)(struct urb *urb);
-};
-
-
-/* function prototypes for a "generic" type serial converter (no flow control, not all endpoints needed) */
-/* need to always compile these in, as some of the other devices use these functions as their own. */
-/* if a driver does not provide a function pointer, the generic function will be called. */
-static int  generic_serial_open                (struct tty_struct *tty, struct file *filp);
-static void generic_serial_close       (struct tty_struct *tty, struct file *filp);
-static int  generic_serial_write       (struct tty_struct *tty, int from_user, const unsigned char *buf, int count);
-static int  generic_write_room         (struct tty_struct *tty);
-static int  generic_ioctl              (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg);
-static void generic_set_termios                (struct tty_struct *tty, struct termios * old);
-static int  generic_chars_in_buffer    (struct tty_struct *tty);
-static void generic_throttle           (struct tty_struct *tty);
-static void generic_unthrottle         (struct tty_struct *tty);
-static void generic_read_bulk_callback (struct urb *urb);
-static void generic_write_bulk_callback        (struct urb *urb);
-
-
-#ifdef CONFIG_USB_SERIAL_GENERIC
-/* All of the device info needed for the Generic Serial Converter */
-static struct usb_serial_device_type generic_device = {
-       name:                   "Generic",
-       idVendor:               &vendor,                /* use the user specified vendor id */
-       idProduct:              &product,               /* use the user specified product id */
-       needs_interrupt_in:     DONT_CARE,              /* don't have to have an interrupt in endpoint */
-       needs_bulk_in:          DONT_CARE,              /* don't have to have a bulk in endpoint */
-       needs_bulk_out:         DONT_CARE,              /* don't have to have a bulk out endpoint */
-       num_interrupt_in:       NUM_DONT_CARE,
-       num_bulk_in:            NUM_DONT_CARE,
-       num_bulk_out:           NUM_DONT_CARE,
-       num_ports:              1,
-};
-#endif
-
-
-#ifdef CONFIG_USB_SERIAL_WHITEHEAT
-/* function prototypes for the Connect Tech WhiteHEAT serial converter */
-static int  whiteheat_serial_open      (struct tty_struct *tty, struct file *filp);
-static void whiteheat_serial_close     (struct tty_struct *tty, struct file *filp);
-static void whiteheat_set_termios      (struct tty_struct *tty, struct termios * old);
-static void whiteheat_throttle         (struct tty_struct *tty);
-static void whiteheat_unthrottle       (struct tty_struct *tty);
-static int  whiteheat_startup          (struct usb_serial *serial);
-
-/* All of the device info needed for the Connect Tech WhiteHEAT */
-static __u16   connecttech_vendor_id                   = CONNECT_TECH_VENDOR_ID;
-static __u16   connecttech_whiteheat_fake_product_id   = CONNECT_TECH_FAKE_WHITE_HEAT_ID;
-static __u16   connecttech_whiteheat_product_id        = CONNECT_TECH_WHITE_HEAT_ID;
-static struct usb_serial_device_type whiteheat_fake_device = {
-       name:                   "Connect Tech - WhiteHEAT - (prerenumeration)",
-       idVendor:               &connecttech_vendor_id,                 /* the Connect Tech vendor id */
-       idProduct:              &connecttech_whiteheat_fake_product_id, /* the White Heat initial product id */
-       needs_interrupt_in:     DONT_CARE,                              /* don't have to have an interrupt in endpoint */
-       needs_bulk_in:          DONT_CARE,                              /* don't have to have a bulk in endpoint */
-       needs_bulk_out:         DONT_CARE,                              /* don't have to have a bulk out endpoint */
-       num_interrupt_in:       NUM_DONT_CARE,
-       num_bulk_in:            NUM_DONT_CARE,
-       num_bulk_out:           NUM_DONT_CARE,
-       startup:                whiteheat_startup       
-};
-static struct usb_serial_device_type whiteheat_device = {
-       name:                   "Connect Tech - WhiteHEAT",
-       idVendor:               &connecttech_vendor_id,                 /* the Connect Tech vendor id */
-       idProduct:              &connecttech_whiteheat_product_id,      /* the White Heat real product id */
-       needs_interrupt_in:     DONT_CARE,                              /* don't have to have an interrupt in endpoint */
-       needs_bulk_in:          DONT_CARE,                              /* don't have to have a bulk in endpoint */
-       needs_bulk_out:         DONT_CARE,                              /* don't have to have a bulk out endpoint */
-       num_interrupt_in:       NUM_DONT_CARE,
-       num_bulk_in:            NUM_DONT_CARE,
-       num_bulk_out:           NUM_DONT_CARE,
-       num_ports:              4,
-       open:                   whiteheat_serial_open,
-       close:                  whiteheat_serial_close,
-       throttle:               whiteheat_throttle,
-       unthrottle:             whiteheat_unthrottle,
-       set_termios:            whiteheat_set_termios,
-};
-#endif
-
-
-#ifdef CONFIG_USB_SERIAL_VISOR
-
-/****************************************************************************
- * Handspring Visor Vendor specific request codes (bRequest values)
- * A big thank you to Handspring for providing the following information.
- * If anyone wants the original file where these values and structures came
- * from, send email to <greg@kroah.com>.
- ****************************************************************************/
-
-/****************************************************************************
- * VISOR_REQUEST_BYTES_AVAILABLE asks the visor for the number of bytes that
- * are available to be transfered to the host for the specified endpoint.
- * Currently this is not used, and always returns 0x0001
- ****************************************************************************/
-#define VISOR_REQUEST_BYTES_AVAILABLE          0x01
-
-/****************************************************************************
- * VISOR_CLOSE_NOTIFICATION is set to the device to notify it that the host
- * is now closing the pipe. An empty packet is sent in response.
- ****************************************************************************/
-#define VISOR_CLOSE_NOTIFICATION               0x02
-
-/****************************************************************************
- * VISOR_GET_CONNECTION_INFORMATION is sent by the host during enumeration to
- * get the endpoints used by the connection.
- ****************************************************************************/
-#define VISOR_GET_CONNECTION_INFORMATION       0x03
-
-
-/****************************************************************************
- * VISOR_GET_CONNECTION_INFORMATION returns data in the following format
- ****************************************************************************/
-struct visor_connection_info {
-       __u16   num_ports;
-       struct {
-               __u8    port_function_id;
-               __u8    port;
-       } connections[2];
-};
-
-
-/* struct visor_connection_info.connection[x].port defines: */
-#define VISOR_ENDPOINT_1               0x01
-#define VISOR_ENDPOINT_2               0x02
-
-/* struct visor_connection_info.connection[x].port_function_id defines: */
-#define VISOR_FUNCTION_GENERIC         0x00
-#define VISOR_FUNCTION_DEBUGGER                0x01
-#define VISOR_FUNCTION_HOTSYNC         0x02
-#define VISOR_FUNCTION_CONSOLE         0x03
-#define VISOR_FUNCTION_REMOTE_FILE_SYS 0x04
-
-
-/* function prototypes for a handspring visor */
-static int  visor_serial_open          (struct tty_struct *tty, struct file *filp);
-static void visor_serial_close         (struct tty_struct *tty, struct file *filp);
-static void visor_throttle             (struct tty_struct *tty);
-static void visor_unthrottle           (struct tty_struct *tty);
-static int  visor_startup              (struct usb_serial *serial);
-
-/* All of the device info needed for the Handspring Visor */
-static __u16   handspring_vendor_id    = HANDSPRING_VENDOR_ID;
-static __u16   handspring_product_id   = HANDSPRING_VISOR_ID;
-static struct usb_serial_device_type handspring_device = {
-       name:                   "Handspring Visor",
-       idVendor:               &handspring_vendor_id,  /* the Handspring vendor ID */
-       idProduct:              &handspring_product_id, /* the Handspring Visor product id */
-       needs_interrupt_in:     MUST_HAVE_NOT,          /* this device must not have an interrupt in endpoint */
-       needs_bulk_in:          MUST_HAVE,              /* this device must have a bulk in endpoint */
-       needs_bulk_out:         MUST_HAVE,              /* this device must have a bulk out endpoint */
-       num_interrupt_in:       0,
-       num_bulk_in:            2,
-       num_bulk_out:           2,
-       num_ports:              2,
-       open:                   visor_serial_open,
-       close:                  visor_serial_close,
-       throttle:               visor_throttle,
-       unthrottle:             visor_unthrottle,
-       startup:                visor_startup,
-};
-#endif
-
-
-#ifdef CONFIG_USB_SERIAL_FTDI_SIO
-/* function prototypes for a FTDI serial converter */
-static int  ftdi_sio_serial_open       (struct tty_struct *tty, struct file *filp);
-static void ftdi_sio_serial_close      (struct tty_struct *tty, struct file *filp);
-static int  ftdi_sio_serial_write      (struct tty_struct *tty, int from_user, const unsigned char *buf, int count);
-static void ftdi_sio_read_bulk_callback        (struct urb *urb);
-static void ftdi_sio_set_termios               (struct tty_struct *tty, struct termios * old);
-static int ftdi_sio_ioctl (struct tty_struct *tty, struct file * file, unsigned int cmd, unsigned long arg);
-
-/* All of the device info needed for the FTDI SIO serial converter */
-static __u16   ftdi_vendor_id          = FTDI_VENDOR_ID;
-static __u16   ftdi_sio_product_id     = FTDI_SIO_SERIAL_CONVERTER_ID;
-static struct usb_serial_device_type ftdi_sio_device = {
-       name:                   "FTDI SIO",
-       idVendor:               &ftdi_vendor_id,        /* the FTDI vendor ID */
-       idProduct:              &ftdi_sio_product_id,   /* the FTDI SIO product id */
-       needs_interrupt_in:     MUST_HAVE_NOT,          /* this device must not have an interrupt in endpoint */
-       needs_bulk_in:          MUST_HAVE,              /* this device must have a bulk in endpoint */
-       needs_bulk_out:         MUST_HAVE,              /* this device must have a bulk out endpoint */
-       num_interrupt_in:       0,
-       num_bulk_in:            1,
-       num_bulk_out:           1,
-       num_ports:              1,
-       open:                   ftdi_sio_serial_open,
-       close:                  ftdi_sio_serial_close,
-       write:                  ftdi_sio_serial_write,
-       read_bulk_callback:     ftdi_sio_read_bulk_callback,
-       set_termios:            ftdi_sio_set_termios
-};
-#endif
-
-
-#ifdef CONFIG_USB_SERIAL_KEYSPAN_PDA
-/* function prototypes for a Keyspan PDA serial converter */
-static int  keyspan_pda_serial_open    (struct tty_struct *tty, 
-                                        struct file *filp);
-static void keyspan_pda_serial_close   (struct tty_struct *tty, 
-                                        struct file *filp);
-static int  keyspan_pda_startup                (struct usb_serial *serial);
-static void keyspan_pda_rx_throttle    (struct tty_struct *tty);
-static void keyspan_pda_rx_unthrottle  (struct tty_struct *tty);
-static int  keyspan_pda_setbaud                (struct usb_serial *serial, int baud);
-static int  keyspan_pda_write_room     (struct tty_struct *tty);
-static int  keyspan_pda_write          (struct tty_struct *tty,
-                                        int from_user,
-                                        const unsigned char *buf,
-                                        int count);
-static void keyspan_pda_write_bulk_callback (struct urb *urb);
-static int  keyspan_pda_chars_in_buffer (struct tty_struct *tty);
-static int  keyspan_pda_ioctl          (struct tty_struct *tty,
-                                        struct file *file,
-                                        unsigned int cmd,
-                                        unsigned long arg);
-static void keyspan_pda_set_termios    (struct tty_struct *tty,
-                                        struct termios *old);
-static void keyspan_pda_break_ctl      (struct tty_struct *tty,
-                                        int break_state);
-static int  keyspan_pda_fake_startup   (struct usb_serial *serial);
-
-/* All of the device info needed for the Keyspan PDA serial converter */
-static __u16   keyspan_vendor_id               = KEYSPAN_VENDOR_ID;
-static __u16   keyspan_pda_fake_product_id     = KEYSPAN_PDA_FAKE_ID;
-static __u16   keyspan_pda_product_id          = KEYSPAN_PDA_ID;
-static struct usb_serial_device_type keyspan_pda_fake_device = {
-       name:                   "Keyspan PDA - (prerenumeration)",
-       idVendor:               &keyspan_vendor_id,             /* the Keyspan PDA vendor ID */
-       idProduct:              &keyspan_pda_fake_product_id,   /* the Keyspan PDA initial product id */
-       needs_interrupt_in:     DONT_CARE,                      /* don't have to have an interrupt in endpoint */
-       needs_bulk_in:          DONT_CARE,                      /* don't have to have a bulk in endpoint */
-       needs_bulk_out:         DONT_CARE,                      /* don't have to have a bulk out endpoint */
-       num_interrupt_in:       NUM_DONT_CARE,
-       num_bulk_in:            NUM_DONT_CARE,
-       num_bulk_out:           NUM_DONT_CARE,
-       startup:                keyspan_pda_fake_startup
-};
-static struct usb_serial_device_type keyspan_pda_device = {
-       name:                   "Keyspan PDA",
-       idVendor:               &keyspan_vendor_id,             /* the Keyspan PDA vendor ID */
-       idProduct:              &keyspan_pda_product_id,        /* the Keyspan PDA product id */
-       needs_interrupt_in:     MUST_HAVE,
-       needs_bulk_in:          DONT_CARE,
-       needs_bulk_out:         MUST_HAVE,
-       num_interrupt_in:       1,
-       num_bulk_in:            0,
-       num_bulk_out:           1,
-       num_ports:              1,
-       open:                   keyspan_pda_serial_open,
-       close:                  keyspan_pda_serial_close,
-       write:                  keyspan_pda_write,
-       write_room:             keyspan_pda_write_room,
-       write_bulk_callback:    keyspan_pda_write_bulk_callback,
-       chars_in_buffer:        keyspan_pda_chars_in_buffer,
-       throttle:               keyspan_pda_rx_throttle,
-       unthrottle:             keyspan_pda_rx_unthrottle,
-       startup:                keyspan_pda_startup,
-       ioctl:                  keyspan_pda_ioctl,
-       set_termios:            keyspan_pda_set_termios,
-       break_ctl:              keyspan_pda_break_ctl,
-};
-#endif
-
-
-/* To add support for another serial converter, create a usb_serial_device_type
-   structure for that device, and add it to this list, making sure that the
-   last  entry is NULL. */
-static struct usb_serial_device_type *usb_serial_devices[] = {
-#ifdef CONFIG_USB_SERIAL_GENERIC
-       &generic_device,
-#endif
-#ifdef CONFIG_USB_SERIAL_WHITEHEAT
-       &whiteheat_fake_device,
-       &whiteheat_device,
-#endif
-#ifdef CONFIG_USB_SERIAL_VISOR
-       &handspring_device,
-#endif
-#ifdef CONFIG_USB_SERIAL_FTDI_SIO
-       &ftdi_sio_device,
-#endif
-#ifdef CONFIG_USB_SERIAL_KEYSPAN_PDA
-       &keyspan_pda_fake_device,
-       &keyspan_pda_device,
-#endif
-       NULL
-};
-
-
-/* determine if we should include the EzUSB loader functions */
-#if defined(CONFIG_USB_SERIAL_KEYSPAN_PDA) || defined(CONFIG_USB_SERIAL_WHITEHEAT)
-       #define USES_EZUSB_FUNCTIONS
-#else
-       #undef  USES_EZUSB_FUNCTIONS
-#endif
-
-#endif /* ifdef __LINUX_USB_SERIAL_H */
-
index c67d30a602b351b2fb00c1292f8cd32f6890a12b..6d833a0cf3896f8e3b9a99318bad11e211c259f5 100644 (file)
@@ -1,9 +1,10 @@
 /*
- *  wacom.c  Version 0.3
+ *  wacom.c  Version 0.4
  *
  *  Copyright (c) 2000 Vojtech Pavlik          <vojtech@suse.cz>
  *  Copyright (c) 2000 Andreas Bach Aaen       <abach@stofanet.dk>
  *  Copyright (c) 2000 Clifford Wolf           <clifford@clifford.at>
+ *  Copyright (c) 2000 Sam Mosel               <sam.mosel@computer.org>
  *
  *  USB Wacom Graphire and Wacom Intuos tablet support
  *
@@ -13,6 +14,8 @@
  *      v0.1 (vp)  - Initial release
  *      v0.2 (aba) - Support for all buttons / combinations
  *      v0.3 (vp)  - Support for Intuos added
+ *      v0.4 (sm)  - Support for more Intuos models, menustrip,
+ *                   relative mode, proximity.
  */
 
 /*
@@ -72,16 +75,16 @@ MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
  * 
  * (0,0) is upper left corner
  *
- * Wacom Intuos packet:
+ * Wacom Intuos Status packet:
  *
  *  byte 0: report ID (2)
- *  byte 1: bit7       1 ?
- *          bit6       tilt (pressure?) data valid
- *          bit5       near
+ *  byte 1: bit7       1 (Sync Byte)
+ *          bit6       Pointer Near
+ *          bit5       0 - first proximity report
  *          bit4       0 ?
  *          bit3       0 ?
- *          bit2       pen button
- *          bit1       first packet (contains other infos)
+ *          bit2       pen button2
+ *          bit1       pen button1
  *          bit0       0 ?
  *  byte 2: X high bits
  *  byte 3: X low bits
@@ -92,22 +95,89 @@ MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
  *  byte 7: bits 0-5:  X tilt  (bits 1-6)
  *  byte 8: bit    7:  X tilt  (bit  0)
  *  byte 8: bits 0-6:  Y tilt  (bits 0-6)
- *  byte 9: ?
+ *  byte 9: bits 4-7:  Proximity
  */
 
 #define USB_VENDOR_ID_WACOM            0x056a
 #define USB_DEVICE_ID_WACOM_GRAPHIRE   0x0010
-#define USB_DEVICE_ID_WACOM_INTUOS     0x0021
+#define USB_DEVICE_ID_WACOM_INTUOS45   0x0020 /* Guess */
+#define USB_DEVICE_ID_WACOM_INTUOS68   0x0021
+#define USB_DEVICE_ID_WACOM_INTUOS912  0x0022 /* Guess */
+#define USB_DEVICE_ID_WACOM_INTUOS1212 0x0023
+#define USB_DEVICE_ID_WACOM_INTUOS1218 0x0024 /* Guess */
+
+#define USB_TOOL_ID_WACOM_PEN          0x0022
+#define USB_TOOL_ID_WACOM_ERASER        0x00fa
+#define USB_TOOL_ID_WACOM_STROKE_PEN    0x0032
+#define USB_TOOL_ID_WACOM_INKING_PEN    0x0012
+#define USB_TOOL_ID_WACOM_AIRBRUSH      0x0112
+#define USB_TOOL_ID_WACOM_MOUSE4D       0x0094
+#define USB_TOOL_ID_WACOM_LENS_CURSOR   0x0096
+
+#define INTUOS_PEN_MODE_ABS             0x00
+#define INTUOS_PEN_MODE_REL             0x01
+#define INTUOS_PEN_MODE_QUICKPOINT      0x02
+
+#define INTUOS_PRESSURE_MODE_SOFT       0x00
+#define INTUOS_PRESSURE_MODE_MED        0x01
+#define INTUOS_PRESSURE_MODE_FIRM       0x02
+
+#define INTUOS_MENUSTRIP_Y_ZONE         1400
+#define INTUOS_MENUSTRIP_BTN_YMIN        270
+#define INTUOS_MENUSTRIP_BTN_YMAX       1070
+#define INTUOS_MENUSTRIP_F1_XMIN          40
+#define INTUOS_MENUSTRIP_F7_XMIN        8340
+#define INTUOS_MENUSTRIP_F12_XMIN      15300
+
+#define INTUOS_MENUSTRIP_BTN_WIDTH      1300
+
+#define INTUOS_MENUSTRIP_F7_IX_OFFSET      6 /* offset into wacom_fkeys */
+#define INTUOS_MENUSTRIP_F12_IX_OFFSET    11
 
 struct wacom {
-       signed char data[12];
+        signed char data[10];
        struct input_dev dev;
        struct urb irq;
+
+        int last_x, last_y;
+       unsigned int tool, device;
+       unsigned int ymax, menustrip_touch;
+       unsigned int pen_mode;
+       unsigned int pressure_mode;
 };
 
+static int wacom_fkeys[16] = { KEY_F1,  KEY_F2,  KEY_F3,  KEY_F4,
+                              KEY_F5,  KEY_F6,  KEY_F7,  KEY_F8,
+                              KEY_F9,  KEY_F10, KEY_F11, KEY_F12,
+                              KEY_F13, KEY_F14, KEY_F15, KEY_F16};
+
+#define INTUOS_EXTENTS_MAX_X              0x00
+#define INTUOS_EXTENTS_MAX_Y              0x01
+#define INTUOS_EXTENTS_HAS_F7             0x02
+#define INTUOS_EXTENTS_HAS_F12            0x03
+#define INTUOS_EXTENTS_PEN_MODE           0x04
+#define INTUOS_EXTENTS_HAS_QUICKPOINT     0x05
+#define INTUOS_EXTENTS_HAS_PRESSURE_MODE  0x06
+#define INTUOS_EXTENTS_PRESSURE_MODE      0x07
+
+#define WACOM_TRUE   1
+#define WACOM_FALSE  0
+
+static int intuos_extents[5][8] = {
+       { 12700, 10360, WACOM_FALSE, WACOM_FALSE,  8340, WACOM_FALSE, WACOM_FALSE,     0},  /* Intuos 4x5   */
+       { 20320, 15040,  WACOM_TRUE, WACOM_FALSE, 15300, WACOM_FALSE,  WACOM_TRUE, 18360},  /* Intuos 6x8   */
+       { 30480, 23060,  WACOM_TRUE,  WACOM_TRUE, 22280,  WACOM_TRUE,  WACOM_TRUE, 26640},  /* Intuos 9x12  */
+       { 30480, 30480,  WACOM_TRUE,  WACOM_TRUE, 22280,  WACOM_TRUE,  WACOM_TRUE, 26640},  /* Intuos 12x12 */
+       { 47720, 30480,  WACOM_TRUE,  WACOM_TRUE, 29260,  WACOM_TRUE,  WACOM_TRUE, 33620}}; /* Intuos 12x18 */
+
+static char intuos_names[5][12] = {
+       {"Intuos 4x5  "}, {"Intuos 6x8  "},
+       {"Intuos 9x12 "}, {"Intuos 12x12"},
+       {"Intuos 12x18"}};
+
 static void wacom_graphire_irq(struct urb *urb)
 {
-       struct wacom *wacom = urb->context;
+        struct wacom *wacom = urb->context;
        unsigned char *data = wacom->data;
        struct input_dev *dev = &wacom->dev;
 
@@ -123,65 +193,204 @@ static void wacom_graphire_irq(struct urb *urb)
 
        switch ((data[1] >> 5) & 3) {
 
-               case 0: /* Pen */
-                       input_report_btn(dev, BTN_TOOL_PEN, data[1] & 0x80);
-                       input_report_btn(dev, BTN_TOUCH, data[1] & 0x01);
-                       input_report_btn(dev, BTN_STYLUS, data[1] & 0x02);
-                       input_report_btn(dev, BTN_STYLUS2, data[1] & 0x04);
-                       input_report_abs(dev, ABS_PRESSURE, data[6] | ((__u32)data[7] << 8));
-                       break;
+       case 0: /* Pen */
+               input_report_btn(dev, BTN_TOOL_PEN, data[1] & 0x80);
+               input_report_btn(dev, BTN_TOUCH, data[1] & 0x01);
+               input_report_btn(dev, BTN_STYLUS, data[1] & 0x02);
+               input_report_btn(dev, BTN_STYLUS2, data[1] & 0x04);
+               input_report_abs(dev, ABS_PRESSURE, data[6] | ((__u32)data[7] << 8));
+               break;
+
+       case 1: /* Rubber */
+               input_report_btn(dev, BTN_TOOL_RUBBER, data[1] & 0x80);
+               input_report_btn(dev, BTN_TOUCH, data[1] & 0x01);
+               input_report_btn(dev, BTN_STYLUS, data[1] & 0x02);
+               input_report_btn(dev, BTN_STYLUS2, data[1] & 0x04);
+               input_report_abs(dev, ABS_PRESSURE, data[6] | ((__u32)data[7] << 8));
+               break;
+
+       case 2: /* Mouse */
+               input_report_btn(dev, BTN_TOOL_MOUSE, data[7] > 24);
+               input_report_btn(dev, BTN_LEFT, data[1] & 0x01);
+               input_report_btn(dev, BTN_RIGHT, data[1] & 0x02);
+               input_report_btn(dev, BTN_MIDDLE, data[1] & 0x04);
+               input_report_abs(dev, ABS_DISTANCE, data[7]);
+               input_report_rel(dev, REL_WHEEL, (signed char) data[6]);
+               break;
+       }
+}
 
-               case 1: /* Rubber */
-                       input_report_btn(dev, BTN_TOOL_RUBBER, data[1] & 0x80);
-                       input_report_btn(dev, BTN_TOUCH, data[1] & 0x01);
-                       input_report_btn(dev, BTN_STYLUS, data[1] & 0x02);
-                       input_report_btn(dev, BTN_STYLUS2, data[1] & 0x04);
-                       input_report_abs(dev, ABS_PRESSURE, data[6] | ((__u32)data[7] << 8));
-                       break;
+static void intuos_menustrip( unsigned int x, unsigned int y, struct wacom *wacom )
+{
+       struct input_dev *dev = &wacom->dev;
+       unsigned int local_x = x;
+       unsigned int local_y = y - ( wacom->ymax - INTUOS_MENUSTRIP_Y_ZONE );
+       unsigned int fkey_index ;
+
+       /* Ensure we are in the vertical strip for the buttons */
+       if ( (local_y > INTUOS_MENUSTRIP_BTN_YMIN) && (local_y < INTUOS_MENUSTRIP_BTN_YMAX) ) {
+
+               /* Handle Pressure Mode */
+               if ( intuos_extents[wacom->device][INTUOS_EXTENTS_HAS_PRESSURE_MODE] ) {
+                       int pressure_mode = ( (local_x - intuos_extents[wacom->device][INTUOS_EXTENTS_PRESSURE_MODE])
+                                             / INTUOS_MENUSTRIP_BTN_WIDTH );
+                       if ( ( pressure_mode >= INTUOS_PRESSURE_MODE_SOFT ) &&
+                            ( pressure_mode <= INTUOS_PRESSURE_MODE_FIRM ) ) {
+                               wacom->pressure_mode = pressure_mode;
+                               return;
+                       }
+               }
+
+               /* Handle Pen Mode */
+               {
+                       int pen_mode = ( (local_x - intuos_extents[wacom->device][INTUOS_EXTENTS_PEN_MODE])
+                                        / INTUOS_MENUSTRIP_BTN_WIDTH );
+                       if ( ( pen_mode == INTUOS_PEN_MODE_ABS ) ||
+                            ( pen_mode == INTUOS_PEN_MODE_REL ) ||
+                            ( ( pen_mode == INTUOS_PEN_MODE_QUICKPOINT ) &&
+                              ( intuos_extents[wacom->device][INTUOS_EXTENTS_HAS_QUICKPOINT] ) ) ) {
+                               wacom->pen_mode = pen_mode;
+                               return;
+                       }
+               }
+
+               /* Handle Function Keys */
+               if ( local_x > INTUOS_MENUSTRIP_F12_XMIN ) {
+                       fkey_index = INTUOS_MENUSTRIP_F12_IX_OFFSET
+                               + ( (local_x - INTUOS_MENUSTRIP_F12_XMIN) / INTUOS_MENUSTRIP_BTN_WIDTH );
+                       fkey_index = ( fkey_index > 16 ) ? 16 : fkey_index; /* Ensure in range */
+               }
+               else if ( local_x > INTUOS_MENUSTRIP_F7_XMIN ) {
+                       fkey_index = INTUOS_MENUSTRIP_F7_IX_OFFSET
+                               + ( (local_x - INTUOS_MENUSTRIP_F7_XMIN) / INTUOS_MENUSTRIP_BTN_WIDTH );
+                       fkey_index = ( fkey_index > 11 ) ? 11 : fkey_index;
+               }
+               else {
+                       fkey_index = ( (local_x - INTUOS_MENUSTRIP_F1_XMIN) / INTUOS_MENUSTRIP_BTN_WIDTH );
+                       fkey_index = ( fkey_index > 6 ) ? 6 : fkey_index;
+               }
+               input_report_key(dev, wacom_fkeys[fkey_index], 1);
+               input_report_key(dev, wacom_fkeys[fkey_index], 0);
 
-               case 2: /* Mouse */
-                       input_report_btn(dev, BTN_TOOL_MOUSE, data[7] > 24);
-                       input_report_btn(dev, BTN_LEFT, data[1] & 0x01);
-                       input_report_btn(dev, BTN_RIGHT, data[1] & 0x02);
-                       input_report_btn(dev, BTN_MIDDLE, data[1] & 0x04);
-                       input_report_abs(dev, ABS_DISTANCE, data[7]);
-                       input_report_rel(dev, REL_WHEEL, (signed char) data[6]);
-                       break;
+               return;
        }
 }
-
+               
 static void wacom_intuos_irq(struct urb *urb)
 {
-       struct wacom *wacom = urb->context;
+        struct wacom *wacom = urb->context;
        unsigned char *data = wacom->data;
        struct input_dev *dev = &wacom->dev;
        unsigned int t;
+       int x, y;
 
        if (urb->status) return;
 
        if (data[0] != 2)
                dbg("received unknown report #%d", data[0]);
 
-       if (data[1] & 0x02) /* First record, weird data */
+       if ( ((data[1] >> 5) & 0x3) == 0x2 ) /* First record, feature report */
+               {
+                       wacom->tool = (((char)data[2] << 4) | (char)data[3] >> 4) & 0xff ;
+                       /* Report tool type */
+                       switch ( wacom->tool )  {
+                       case USB_TOOL_ID_WACOM_PEN: 
+                               input_report_btn(dev, BTN_TOOL_PEN, 1);
+                               break;
+                       case USB_TOOL_ID_WACOM_ERASER: 
+                               input_report_btn(dev, BTN_TOOL_RUBBER, 1);
+                               break;
+                       case USB_TOOL_ID_WACOM_STROKE_PEN: 
+                               input_report_btn(dev, BTN_TOOL_BRUSH, 1);
+                               break;
+                       case USB_TOOL_ID_WACOM_INKING_PEN: 
+                               input_report_btn(dev, BTN_TOOL_PENCIL, 1);
+                               break;
+                       case USB_TOOL_ID_WACOM_AIRBRUSH: 
+                               input_report_btn(dev, BTN_TOOL_AIRBRUSH, 1);
+                               break;
+                       case USB_TOOL_ID_WACOM_MOUSE4D: 
+                       case USB_TOOL_ID_WACOM_LENS_CURSOR: 
+                               input_report_btn(dev, BTN_TOOL_MOUSE, 1);
+                               break;
+                       default:
+                               break;
+                       }                       
+                       return;
+               }
+
+       if ( ( data[1] | data[2] | data[3] | data[4] | data[5] | data[6]
+              | data[7] | data[8] | data[9] ) == 0x80 ) { /* exit report */
+               switch ( wacom->tool ) {
+               case USB_TOOL_ID_WACOM_PEN: 
+                       input_report_btn(dev, BTN_TOOL_PEN, 0);
+                       break;
+               case USB_TOOL_ID_WACOM_ERASER: 
+                       input_report_btn(dev, BTN_TOOL_RUBBER, 0);
+                       break;
+               case USB_TOOL_ID_WACOM_STROKE_PEN: 
+                       input_report_btn(dev, BTN_TOOL_BRUSH, 0);
+                       break;
+               case USB_TOOL_ID_WACOM_INKING_PEN: 
+                       input_report_btn(dev, BTN_TOOL_PENCIL, 0);
+                       break;
+               case USB_TOOL_ID_WACOM_AIRBRUSH: 
+                       input_report_btn(dev, BTN_TOOL_AIRBRUSH, 0);
+                       break;
+               case USB_TOOL_ID_WACOM_MOUSE4D: 
+               case USB_TOOL_ID_WACOM_LENS_CURSOR: 
+                       input_report_btn(dev, BTN_TOOL_MOUSE, 0);
+                       break;
+               default:
+                       break;
+               }                       
                return;
-       
-       if (data[1] & 0x20) { /* Near */
-               input_report_abs(dev, ABS_X, (((unsigned int) data[2]) << 8) | data[3]);
-               input_report_abs(dev, ABS_Y, 16240 - ((((unsigned int) data[4]) << 8) | data[5]));
        }
 
-       input_report_btn(dev, BTN_TOOL_PEN, data[1] & 0x20);
-       input_report_btn(dev, BTN_STYLUS, data[1] & 0x04);
+       x = (((unsigned int) data[2]) << 8) | data[3] ;
+       y = wacom->dev.absmax[ABS_Y] - ((((unsigned int) data[4]) << 8) | data[5]);
 
        t = (((unsigned int) data[6]) << 2) | ((data[7] & 0xC0) >> 6);
 
+       /* Handle touch near menustrip */
+       if ( y > ( wacom->dev.absmax[ABS_Y] - INTUOS_MENUSTRIP_Y_ZONE ) ) {
+               if ( t > 10 ) /* Touch */
+                       wacom->menustrip_touch = 1;
+               if ( (wacom->menustrip_touch) && (t <= 10) ) { /* Pen Up */
+                       intuos_menustrip( x, y, wacom );
+                       wacom->menustrip_touch = 0;
+               }
+               return;
+       }
+       else
+               wacom->menustrip_touch = 0;
+
+       switch ( wacom->pen_mode ) {
+       case INTUOS_PEN_MODE_ABS:
+               input_report_abs(dev, ABS_X, x);
+               input_report_abs(dev, ABS_Y, y);
+               break;
+       case INTUOS_PEN_MODE_REL:
+               input_report_rel(dev, REL_X, ( x - wacom->last_x) / 8 );
+               input_report_rel(dev, REL_Y, - ( y - wacom->last_y) / 8 );
+               break;
+       default: break;
+       }
+
+       wacom->last_x = x;
+       wacom->last_y = y;
+
+       input_report_btn(dev, BTN_STYLUS, data[1] & 0x02);
+       input_report_btn(dev, BTN_STYLUS2, data[1] & 0x04);
+
        input_report_btn(dev, BTN_TOUCH, t > 10);
        input_report_abs(dev, ABS_PRESSURE, t);
 
-       if (data[1] & 0x40) { /* Tilt data */
-               input_report_abs(dev, ABS_TILT_X, ((((unsigned int) data[7]) & 0x3f) << 1) | ((data[8] & 0x80) >> 7));
-               input_report_abs(dev, ABS_TILT_Y, data[8] & 0x7f);
-       }
+       input_report_abs(dev, ABS_DISTANCE, ( data[9] & 0xf0 ) >> 4 );
+
+       input_report_abs(dev, ABS_TILT_X, ((((unsigned int) data[7]) & 0x3f) << 1) | ((data[8] & 0x80) >> 7));
+       input_report_abs(dev, ABS_TILT_Y, data[8] & 0x7f);
+
 }
 
 static void *wacom_probe(struct usb_device *dev, unsigned int ifnum)
@@ -191,8 +400,12 @@ static void *wacom_probe(struct usb_device *dev, unsigned int ifnum)
        char *name;
 
        if (dev->descriptor.idVendor != USB_VENDOR_ID_WACOM ||
-          (dev->descriptor.idProduct != USB_DEVICE_ID_WACOM_GRAPHIRE &&
-           dev->descriptor.idProduct != USB_DEVICE_ID_WACOM_INTUOS))
+           (dev->descriptor.idProduct != USB_DEVICE_ID_WACOM_GRAPHIRE &&
+            dev->descriptor.idProduct != USB_DEVICE_ID_WACOM_INTUOS45 &&
+            dev->descriptor.idProduct != USB_DEVICE_ID_WACOM_INTUOS68 &&
+            dev->descriptor.idProduct != USB_DEVICE_ID_WACOM_INTUOS912 &&
+            dev->descriptor.idProduct != USB_DEVICE_ID_WACOM_INTUOS1212 &&
+            dev->descriptor.idProduct != USB_DEVICE_ID_WACOM_INTUOS1218))
                return NULL;
 
        endpoint = dev->config[0].interface[ifnum].altsetting[0].endpoint + 0;
@@ -200,49 +413,57 @@ static void *wacom_probe(struct usb_device *dev, unsigned int ifnum)
        if (!(wacom = kmalloc(sizeof(struct wacom), GFP_KERNEL))) return NULL;
        memset(wacom, 0, sizeof(struct wacom));
 
-       switch (dev->descriptor.idProduct) {
+       if ( dev->descriptor.idProduct == USB_DEVICE_ID_WACOM_GRAPHIRE ) {
+               wacom->dev.evbit[0] |= BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS);
+               wacom->dev.keybit[LONG(BTN_MOUSE)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
+               wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE);
+               wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOUCH) | BIT(BTN_STYLUS) | BIT(BTN_STYLUS2);
+               wacom->dev.relbit[0] |= BIT(REL_WHEEL);
+               wacom->dev.absbit[0] |= BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE) | BIT(ABS_DISTANCE);
 
-               case USB_DEVICE_ID_WACOM_GRAPHIRE:
+               wacom->dev.absmax[ABS_X] = 10206;
+               wacom->dev.absmax[ABS_Y] = 7422;
+               wacom->dev.absmax[ABS_PRESSURE] = 511;
+               wacom->dev.absmax[ABS_DISTANCE] = 32;
 
-                       wacom->dev.evbit[0] |= BIT(EV_KEY) | BIT(EV_REL) | BIT(EV_ABS);
-                       wacom->dev.keybit[LONG(BTN_MOUSE)] |= BIT(BTN_LEFT) | BIT(BTN_RIGHT) | BIT(BTN_MIDDLE);
-                       wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_MOUSE);
-                       wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOUCH) | BIT(BTN_STYLUS) | BIT(BTN_STYLUS2);
-                       wacom->dev.relbit[0] |= BIT(REL_WHEEL);
-                       wacom->dev.absbit[0] |= BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE) | BIT(ABS_DISTANCE);
+               FILL_INT_URB(&wacom->irq, dev, usb_rcvintpipe(dev, endpoint->bEndpointAddress),
+                            wacom->data, 8, wacom_graphire_irq, wacom, endpoint->bInterval);
 
-                       wacom->dev.absmax[ABS_X] = 10206;
-                       wacom->dev.absmax[ABS_Y] = 7422;
-                       wacom->dev.absmax[ABS_PRESSURE] = 511;
-                       wacom->dev.absmax[ABS_DISTANCE] = 32;
+               name = "Graphire";
+       }
+       else { /* Intuos */
 
-                       FILL_INT_URB(&wacom->irq, dev, usb_rcvintpipe(dev, endpoint->bEndpointAddress),
-                                       wacom->data, 8, wacom_graphire_irq, wacom, endpoint->bInterval);
+               wacom->dev.evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS) | BIT(EV_REL);
+               wacom->dev.keybit[LONG(KEY_F1)]  |= BIT(KEY_F1)  | BIT(KEY_F2)  | BIT(KEY_F3)  | BIT(KEY_F4) | BIT(KEY_F5);
+               wacom->dev.keybit[LONG(KEY_F6)]  |= BIT(KEY_F6)  | BIT(KEY_F7)  | BIT(KEY_F8);
+               wacom->dev.keybit[LONG(KEY_F9)]  |= BIT(KEY_F9)  | BIT(KEY_F10) | BIT(KEY_F11) | BIT(KEY_F12);
+               wacom->dev.keybit[LONG(KEY_F13)] |= BIT(KEY_F13) | BIT(KEY_F14) | BIT(KEY_F15) | BIT(KEY_F16);
+               wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOUCH) | BIT(BTN_STYLUS) | BIT(BTN_STYLUS2);
+               wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOOL_RUBBER) | BIT(BTN_TOOL_BRUSH);
+               wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PENCIL) | BIT(BTN_TOOL_AIRBRUSH) | BIT(BTN_TOOL_MOUSE);
+               wacom->dev.absbit[0] |= BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE) | BIT(ABS_DISTANCE);
+               wacom->dev.absbit[0] |= BIT(ABS_TILT_X) | BIT(ABS_TILT_Y);
+               wacom->dev.relbit[0] |= BIT(REL_X) | BIT(REL_Y);
 
-                       name = "Graphire";
-                       break;
+               wacom->dev.absmax[ABS_PRESSURE] = 1023;
+               wacom->dev.absmax[ABS_DISTANCE] = 15;
+               wacom->dev.absmax[ABS_TILT_X] = 127;
+               wacom->dev.absmax[ABS_TILT_Y] = 127;
 
-               case USB_DEVICE_ID_WACOM_INTUOS:
+               wacom->device = dev->descriptor.idProduct - USB_DEVICE_ID_WACOM_INTUOS45;
 
-                       wacom->dev.evbit[0] |= BIT(EV_KEY) | BIT(EV_ABS);
-                       wacom->dev.keybit[LONG(BTN_DIGI)] |= BIT(BTN_TOOL_PEN) | BIT(BTN_TOUCH) | BIT(BTN_STYLUS);
-                       wacom->dev.absbit[0] |= BIT(ABS_X) | BIT(ABS_Y) | BIT(ABS_PRESSURE);
-                       wacom->dev.absbit[0] |= BIT(ABS_TILT_X) | BIT(ABS_TILT_Y);
+               wacom->dev.absmax[ABS_X] = intuos_extents[wacom->device][INTUOS_EXTENTS_MAX_X];
+               wacom->dev.absmax[ABS_Y] = intuos_extents[wacom->device][INTUOS_EXTENTS_MAX_Y];
 
-                       wacom->dev.absmax[ABS_X] = 20320;
-                       wacom->dev.absmax[ABS_Y] = 16240;
-                       wacom->dev.absmax[ABS_PRESSURE] = 1024;
-                       wacom->dev.absmax[ABS_TILT_X] = 127;
-                       wacom->dev.absmax[ABS_TILT_Y] = 127;
+               wacom->ymax = intuos_extents[wacom->device][INTUOS_EXTENTS_MAX_Y];
+               wacom->pen_mode = INTUOS_PEN_MODE_ABS;
+               wacom->pressure_mode = INTUOS_PRESSURE_MODE_SOFT;
 
-                       FILL_INT_URB(&wacom->irq, dev, usb_rcvintpipe(dev, endpoint->bEndpointAddress),
-                                       wacom->data, 8, wacom_intuos_irq, wacom, endpoint->bInterval);
+               name = intuos_names[wacom->device];
 
-                       name = "Intuos";
-                       break;
+               FILL_INT_URB(&wacom->irq, dev, usb_rcvintpipe(dev, endpoint->bEndpointAddress),
+                            wacom->data, 10, wacom_intuos_irq, wacom, endpoint->bInterval);
 
-               default:
-                       return NULL;
        }
 
        if (usb_submit_urb(&wacom->irq)) {
diff --git a/drivers/usb/whiteheat.h b/drivers/usb/whiteheat.h
deleted file mode 100644 (file)
index d7053e3..0000000
+++ /dev/null
@@ -1,1542 +0,0 @@
-/*****************************************************************************
- *
- *      whiteheat.h  --  ConnectTech WhiteHEAT Firmware.
- *
- *      Copyright (C) 2000  ConnectTech Inc (http://www.connecttech.com/)
- *
- *      This program is free software; you can redistribute it and/or modify
- *      it under the terms of the GNU General Public License as published by
- *      the Free Software Foundation; either version 2 of the License, or
- *      (at your option) any later version.
- *
- *      This program is distributed in the hope that it will be useful,
- *      but WITHOUT ANY WARRANTY; without even the implied warranty of
- *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *      GNU General Public License for more details.
- *
- *      You should have received a copy of the GNU General Public License
- *      along with this program; if not, write to the Free Software
- *      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * (01/16/2000) gkh
- *     Fixed my intel hex processing tool, so now the firmware actually
- *     matches the original file (this was causing a few problems...)
- *
- * (01/15/2000) gkh
- *     Added debug loader firmware if DEBUG is #defined:
- *             Port 1 LED flashes when the vend_ax program is running
- *             Port 2 LED flashes when any SETUP command arrives
- *             Port 3 LED flashes when any valid VENDOR request occurs
- *             Port 4 LED flashes when the EXTERNAL RAM DOWNLOAD request occurs
- *
- * version 1.0 (01/09/2000) gkh
- *     Original firmware from ConnectTech massaged a little to be program
- *     readable.
- *
- *****************************************************************************/
-
-#define whiteheat_DATE "20000106"
-
-struct whiteheat_hex_record {
-       __u16   address;
-       __u8    data_size;
-       __u8    data[16];
-};
-
-static const struct whiteheat_hex_record whiteheat_firmware[] = {
-{ 0x0000,      3,      {0x02, 0x91, 0xc9} },
-{ 0x0003,      3,      {0x02, 0x13, 0x12} },
-{ 0x000b,      3,      {0x02, 0x0a, 0x8d} },
-{ 0x0033,      3,      {0x02, 0x07, 0x84} },
-{ 0x0043,      3,      {0x02, 0x09, 0x00} },
-{ 0x0053,      3,      {0x02, 0x0f, 0x6e} },
-{ 0x005b,      3,      {0x02, 0x11, 0xb9} },
-{ 0x0300,      16,     {0x90, 0x7f, 0xe9, 0xe0, 0x70, 0x03, 0x02, 0x04, 0x03, 0x14, 0x70, 0x03, 0x02, 0x04, 0x77, 0x24} },
-{ 0x0310,      16,     {0xfe, 0x70, 0x03, 0x02, 0x04, 0xca, 0x24, 0xfb, 0x70, 0x03, 0x02, 0x03, 0xf4, 0x14, 0x70, 0x03} },
-{ 0x0320,      16,     {0x02, 0x03, 0xe2, 0x14, 0x70, 0x03, 0x02, 0x03, 0xca, 0x14, 0x70, 0x03, 0x02, 0x03, 0xd9, 0x24} },
-{ 0x0330,      16,     {0x05, 0x60, 0x03, 0x02, 0x05, 0x19, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60} },
-{ 0x0340,      16,     {0x36, 0x24, 0x02, 0x70, 0x7b, 0x74, 0x12, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5} },
-{ 0x0350,      16,     {0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x09, 0x58, 0xea, 0x49, 0x60, 0x0d} },
-{ 0x0360,      16,     {0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xb4} },
-{ 0x0370,      16,     {0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x08, 0xa9, 0xea} },
-{ 0x0380,      16,     {0x49, 0x60, 0x33, 0x12, 0x9a, 0x48, 0xf5, 0x5e, 0x90, 0x7f, 0xee, 0xe0, 0xff, 0xe5, 0x5e, 0xd3} },
-{ 0x0390,      16,     {0x9f, 0x40, 0x03, 0xe0, 0xf5, 0x5e, 0xe5, 0x5e, 0xd3, 0x94, 0x40, 0x40, 0x03, 0x75, 0x5e, 0x40} },
-{ 0x03a0,      16,     {0xae, 0x02, 0xaf, 0x01, 0x7c, 0x7f, 0x7d, 0x00, 0xab, 0x5e, 0x12, 0x1b, 0x0c, 0x90, 0x7f, 0xb5} },
-{ 0x03b0,      16,     {0xe5, 0x5e, 0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x20} },
-{ 0x03c0,      16,     {0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0x00, 0xe5, 0x21, 0xf0} },
-{ 0x03d0,      16,     {0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x21, 0x02} },
-{ 0x03e0,      16,     {0x05, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x31, 0xd2, 0x02, 0x43, 0x88, 0x10, 0xd2, 0xeb, 0xd2} },
-{ 0x03f0,      16,     {0xa8, 0x02, 0x05, 0x20, 0x90, 0x7f, 0x00, 0xe5, 0x31, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0} },
-{ 0x0400,      16,     {0x02, 0x05, 0x20, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02} },
-{ 0x0410,      16,     {0x70, 0x5b, 0xa2, 0x00, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x05, 0xe4, 0x33, 0x4f, 0x90} },
-{ 0x0420,      16,     {0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0x20, 0xe4} },
-{ 0x0430,      16,     {0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0x20, 0x90} },
-{ 0x0440,      16,     {0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25} },
-{ 0x0450,      16,     {0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0x01, 0x90, 0x7f, 0x00} },
-{ 0x0460,      16,     {0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xb4} },
-{ 0x0470,      16,     {0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24} },
-{ 0x0480,      16,     {0x02, 0x60, 0x03, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x00, 0x02} },
-{ 0x0490,      16,     {0x05, 0x20, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x20, 0x90, 0x7f, 0xea, 0xe0} },
-{ 0x04a0,      16,     {0x70, 0x1f, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54} },
-{ 0x04b0,      16,     {0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x80} },
-{ 0x04c0,      16,     {0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe} },
-{ 0x04d0,      16,     {0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x00, 0x80} },
-{ 0x04e0,      16,     {0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20} },
-{ 0x04f0,      16,     {0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f} },
-{ 0x0500,      16,     {0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10} },
-{ 0x0510,      16,     {0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0} },
-{ 0x0520,      7,      {0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0} },
-{ 0x0527,      1,      {0x22} },
-{ 0x0528,      16,     {0x75, 0x5a, 0xff, 0x75, 0x59, 0xff, 0x75, 0x58, 0x0f, 0x75, 0x57, 0x00, 0xd2, 0x03, 0xc2, 0x06} },
-{ 0x0538,      16,     {0xc2, 0x02, 0xc2, 0x00, 0xc2, 0x05, 0xc2, 0x01, 0x90, 0x02, 0x9e, 0x74, 0x19, 0xf0, 0xe4, 0x90} },
-{ 0x0548,      16,     {0x01, 0x5b, 0xf0, 0xc2, 0x04, 0x90, 0x01, 0x5e, 0xf0, 0xa3, 0xf0, 0xc2, 0xaf, 0xc2, 0xa8, 0x12} },
-{ 0x0558,      16,     {0x0a, 0xfa, 0xe4, 0x90, 0x02, 0x4d, 0xf0, 0x90, 0x01, 0x00, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3} },
-{ 0x0568,      16,     {0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x08, 0xf0, 0x7e} },
-{ 0x0578,      16,     {0x01, 0x7f, 0x00, 0x12, 0x19, 0xc1, 0x75, 0x5c, 0x12, 0x75, 0x5d, 0x0a, 0x90, 0x01, 0x0b, 0xe0} },
-{ 0x0588,      16,     {0xff, 0x05, 0x5d, 0xe5, 0x5d, 0xac, 0x5c, 0x70, 0x02, 0x05, 0x5c, 0x14, 0xf5, 0x82, 0x8c, 0x83} },
-{ 0x0598,      16,     {0xef, 0xf0, 0x90, 0x01, 0x0c, 0xe0, 0x44, 0x80, 0xff, 0x05, 0x5d, 0xe5, 0x5d, 0xac, 0x5c, 0x70} },
-{ 0x05a8,      16,     {0x02, 0x05, 0x5c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0d, 0xe0, 0xff, 0x05} },
-{ 0x05b8,      16,     {0x5d, 0xe5, 0x5d, 0xac, 0x5c, 0x70, 0x02, 0x05, 0x5c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
-{ 0x05c8,      16,     {0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x5d, 0xe5, 0x5d, 0xac, 0x5c, 0x70, 0x02, 0x05, 0x5c, 0x14} },
-{ 0x05d8,      16,     {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x12, 0x0a, 0xe4, 0x93, 0xff, 0x74, 0x01, 0x93, 0x90} },
-{ 0x05e8,      16,     {0x01, 0x1c, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0xff, 0xa3, 0xe0, 0xfe, 0xef} },
-{ 0x05f8,      16,     {0x6e, 0xff, 0x90, 0x01, 0x1c, 0xf0, 0xa3, 0xe0, 0x6f, 0xff, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0x6f} },
-{ 0x0608,      16,     {0xf0, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xe4, 0xfc, 0xfd, 0x75, 0x62, 0x10, 0x75, 0x63, 0x02, 0x75} },
-{ 0x0618,      16,     {0x64, 0x12, 0x75, 0x65, 0xac, 0x12, 0x8e, 0x35, 0x75, 0x5c, 0x12, 0x75, 0x5d, 0xb2, 0x90, 0x01} },
-{ 0x0628,      16,     {0x0d, 0xe0, 0xff, 0x05, 0x5d, 0xe5, 0x5d, 0xac, 0x5c, 0x70, 0x02, 0x05, 0x5c, 0x14, 0xf5, 0x82} },
-{ 0x0638,      16,     {0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x5d, 0xe5, 0x5d, 0xac, 0x5c, 0x70} },
-{ 0x0648,      16,     {0x02, 0x05, 0x5c, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4} },
-{ 0x0658,      16,     {0x54, 0x0f, 0x24, 0x41, 0xff, 0x05, 0x5d, 0xe5, 0x5d, 0xac, 0x5c, 0x70, 0x02, 0x05, 0x5c, 0x14} },
-{ 0x0668,      16,     {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x05, 0x5d, 0xe5, 0x5d, 0xae, 0x5c, 0x70, 0x02, 0x05, 0x5c} },
-{ 0x0678,      16,     {0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x75, 0x82, 0x10, 0x75, 0x83, 0x01, 0xe0, 0xfc, 0xa3} },
-{ 0x0688,      16,     {0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x90, 0x01, 0x18, 0x12, 0x9b, 0xfb, 0x7e, 0x01} },
-{ 0x0698,      16,     {0x7f, 0x18, 0x12, 0x84, 0x61, 0x90, 0x01, 0x18, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} },
-{ 0x06a8,      16,     {0xa3, 0xe0, 0xff, 0x75, 0x62, 0x0a, 0x75, 0x63, 0x06, 0x75, 0x64, 0x12, 0x75, 0x65, 0xb8, 0x12} },
-{ 0x06b8,      16,     {0x8e, 0x35, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x53, 0x91, 0xef} },
-{ 0x06c8,      16,     {0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x1f, 0xf0, 0xd2, 0xaf} },
-{ 0x06d8,      16,     {0x20, 0x01, 0x2e, 0x20, 0x01, 0x2b, 0xa2, 0x03, 0x92, 0x07, 0x12, 0x09, 0xa7, 0x75, 0x56, 0x50} },
-{ 0x06e8,      16,     {0x75, 0x55, 0x6d, 0x75, 0x54, 0x33, 0x75, 0x53, 0x00, 0x20, 0x01, 0xe4, 0x7f, 0xff, 0x7e, 0xff} },
-{ 0x06f8,      16,     {0x7d, 0xff, 0x7c, 0xff, 0x78, 0x53, 0x12, 0x9b, 0xe4, 0xec, 0x4d, 0x4e, 0x4f, 0x60, 0xd1, 0x80} },
-{ 0x0708,      16,     {0xe8, 0x30, 0x01, 0x05, 0x12, 0x03, 0x00, 0xc2, 0x01, 0x30, 0x06, 0x0d, 0x12, 0x08, 0xfb, 0x50} },
-{ 0x0718,      16,     {0x06, 0x12, 0x0a, 0x00, 0x12, 0x09, 0xf4, 0xc2, 0x06, 0x12, 0x90, 0x58, 0x12, 0x98, 0x7d, 0xe4} },
-{ 0x0728,      16,     {0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x90, 0x01, 0x5b} },
-{ 0x0738,      16,     {0xe0, 0x5e, 0x60, 0x14, 0x74, 0x27, 0x2f, 0xf8, 0xe6, 0xd3, 0x94, 0x0a, 0x40, 0x04, 0x7e, 0x01} },
-{ 0x0748,      16,     {0x80, 0x02, 0x7e, 0x00, 0x8e, 0x5b, 0x80, 0x03, 0x75, 0x5b, 0x01, 0x74, 0x68, 0x2f, 0xf5, 0x82} },
-{ 0x0758,      16,     {0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe5, 0x5b, 0xf0, 0x0f, 0xbf, 0x04, 0xc5, 0xe5, 0x2b, 0xd3, 0x94} },
-{ 0x0768,      16,     {0x0a, 0x40, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x90, 0x20, 0x6c, 0xef, 0xf0, 0x90, 0x02} },
-{ 0x0778,      11,     {0x4d, 0xe0, 0x64, 0x0f, 0x70, 0x8b, 0x12, 0x93, 0x50, 0x80, 0x86} },
-{ 0x0783,      1,      {0x22} },
-{ 0x0784,      4,      {0x53, 0xd8, 0xef, 0x32} },
-{ 0x0788,      16,     {0xe4, 0x90, 0x7f, 0x9c, 0xf0, 0x7f, 0x0a, 0xfe, 0x12, 0x08, 0x92, 0x90, 0x7f, 0x96, 0x74, 0x89} },
-{ 0x0798,      16,     {0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xcf, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x08, 0x92, 0x90, 0x7f} },
-{ 0x07a8,      16,     {0x96, 0xe0, 0x54, 0xfe, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x7f, 0x02, 0x7d, 0xff} },
-{ 0x07b8,      16,     {0x12, 0x11, 0x4b, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x02} },
-{ 0x07c8,      16,     {0xf0, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x90, 0x7f, 0x96, 0xe0} },
-{ 0x07d8,      16,     {0x44, 0x40, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf} },
-{ 0x07e8,      16,     {0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f} },
-{ 0x07f8,      7,      {0x32, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x22} },
-{ 0x07ff,      16,     {0x90, 0x7f, 0x96, 0xe0, 0x54, 0xfd, 0xf0, 0xe0, 0x44, 0x80, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12} },
-{ 0x080f,      16,     {0x08, 0x92, 0x7f, 0x02, 0xe4, 0xfd, 0x12, 0x11, 0x4b, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92} },
-{ 0x081f,      16,     {0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x90, 0x7f} },
-{ 0x082f,      16,     {0x96, 0xe0, 0x44, 0x04, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x90, 0x7f, 0x96, 0xe0} },
-{ 0x083f,      16,     {0x54, 0xf7, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x01} },
-{ 0x084f,      12,     {0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x12, 0x0a, 0x00, 0x22} },
-{ 0x085b,      16,     {0x90, 0x11, 0xef, 0xe4, 0x93, 0x70, 0x2f, 0x90, 0x7f, 0x93, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x94} },
-{ 0x086b,      16,     {0x74, 0x3c, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc6, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90, 0x7f} },
-{ 0x087b,      16,     {0x9d, 0x74, 0x02, 0xf0, 0x90, 0x7f, 0xe2, 0x74, 0x12, 0xf0, 0x12, 0x07, 0x88, 0x75, 0x82, 0xef} },
-{ 0x088b,      7,      {0x75, 0x83, 0x11, 0x74, 0xff, 0xf0, 0x22} },
-{ 0x0892,      16,     {0x8e, 0x6d, 0x8f, 0x6e, 0xe5, 0x6e, 0x15, 0x6e, 0xae, 0x6d, 0x70, 0x02, 0x15, 0x6d, 0x4e, 0x60} },
-{ 0x08a2,      7,      {0x05, 0x12, 0x08, 0xea, 0x80, 0xee, 0x22} },
-{ 0x08a9,      2,      {0x8f, 0x5f} },
-{ 0x08ab,      16,     {0xe4, 0xf5, 0x60, 0x75, 0x61, 0xff, 0x75, 0x62, 0x12, 0x75, 0x63, 0x6a, 0xab, 0x61, 0xaa, 0x62} },
-{ 0x08bb,      16,     {0xa9, 0x63, 0x90, 0x00, 0x01, 0x12, 0x9a, 0x61, 0xb4, 0x03, 0x1d, 0xaf, 0x60, 0x05, 0x60, 0xef} },
-{ 0x08cb,      16,     {0xb5, 0x5f, 0x01, 0x22, 0x12, 0x9a, 0x48, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75} },
-{ 0x08db,      14,     {0x61, 0xff, 0xf5, 0x62, 0x89, 0x63, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
-{ 0x08e9,      1,      {0x22} },
-{ 0x08ea,      16,     {0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9} },
-{ 0x08fa,      1,      {0x22} },
-{ 0x08fb,      5,      {0x12, 0x07, 0xff, 0xd3, 0x22} },
-{ 0x0900,      16,     {0x02, 0x0b, 0x17, 0x00, 0x02, 0x0b, 0x4a, 0x00, 0x02, 0x0b, 0x2f, 0x00, 0x02, 0x0b, 0x89, 0x00} },
-{ 0x0910,      16,     {0x02, 0x0b, 0x73, 0x00, 0x02, 0x09, 0xf9, 0x00, 0x02, 0x09, 0xfa, 0x00, 0x02, 0x09, 0xfb, 0x00} },
-{ 0x0920,      16,     {0x02, 0x0b, 0xa4, 0x00, 0x02, 0x0c, 0x78, 0x00, 0x02, 0x0b, 0xd9, 0x00, 0x02, 0x0c, 0xc5, 0x00} },
-{ 0x0930,      16,     {0x02, 0x0c, 0x0e, 0x00, 0x02, 0x0d, 0x12, 0x00, 0x02, 0x0c, 0x43, 0x00, 0x02, 0x0d, 0x5f, 0x00} },
-{ 0x0940,      16,     {0x02, 0x09, 0xfc, 0x00, 0x02, 0x09, 0xfe, 0x00, 0x02, 0x09, 0xfd, 0x00, 0x02, 0x09, 0xff, 0x00} },
-{ 0x0950,      8,      {0x02, 0x0d, 0xac, 0x00, 0x02, 0x0d, 0xc2, 0x00} },
-{ 0x0958,      16,     {0xe4, 0xfe, 0x75, 0x61, 0xff, 0x75, 0x62, 0x12, 0x75, 0x63, 0x12, 0xab, 0x61, 0xaa, 0x62, 0xa9} },
-{ 0x0968,      16,     {0x63, 0x90, 0x00, 0x01, 0x12, 0x9a, 0x61, 0x64, 0x02, 0x70, 0x2d, 0xad, 0x06, 0x0e, 0xed, 0xb5} },
-{ 0x0978,      16,     {0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x9a, 0xba, 0x85, 0xf0, 0x5f, 0xf5, 0x60, 0x62, 0x5f} },
-{ 0x0988,      16,     {0xe5, 0x5f, 0x62, 0x60, 0xe5, 0x60, 0x62, 0x5f, 0x29, 0xfd, 0xe5, 0x5f, 0x3a, 0xa9, 0x05, 0x75} },
-{ 0x0998,      14,     {0x61, 0xff, 0xf5, 0x62, 0x89, 0x63, 0x80, 0xc3, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
-{ 0x09a6,      1,      {0x22} },
-{ 0x09a7,      16,     {0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x07, 0x04, 0xe0, 0x44} },
-{ 0x09b7,      16,     {0x02, 0xf0, 0x7f, 0xd0, 0x7e, 0x07, 0x12, 0x08, 0x92, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0} },
-{ 0x09c7,      5,      {0xe0, 0x44, 0x04, 0xf0, 0x22} },
-{ 0x09cc,      16,     {0x53, 0x8e, 0xf7, 0xe5, 0x89, 0x54, 0xf1, 0x44, 0x01, 0xf5, 0x89, 0x75, 0x8c, 0xb1, 0xd2, 0xa9} },
-{ 0x09dc,      16,     {0x75, 0x98, 0x40, 0x75, 0xcb, 0xff, 0x75, 0xca, 0xf3, 0x75, 0xc8, 0x34, 0xe4, 0xff, 0x7f, 0x05} },
-{ 0x09ec,      7,      {0x78, 0x27, 0xe4, 0xf6, 0x08, 0xdf, 0xfc} },
-{ 0x09f3,      1,      {0x22} },
-{ 0x09f4,      5,      {0x12, 0x07, 0x88, 0xd3, 0x22} },
-{ 0x09f9,      1,      {0x32} },
-{ 0x09fa,      1,      {0x32} },
-{ 0x09fb,      1,      {0x32} },
-{ 0x09fc,      1,      {0x32} },
-{ 0x09fd,      1,      {0x32} },
-{ 0x09fe,      1,      {0x32} },
-{ 0x09ff,      1,      {0x32} },
-{ 0x0a00,      9,      {0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x74} },
-{ 0x0a7d,      16,     {0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22} },
-{ 0x0a8d,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x00, 0xc0, 0x00, 0xc0, 0x06, 0xc0} },
-{ 0x0a9d,      1,      {0x07} },
-{ 0x0a9e,      16,     {0x30, 0x04, 0x16, 0x75, 0x8c, 0xf8, 0x75, 0x8a, 0x30, 0x7f, 0x2f, 0xae, 0x07, 0x1f, 0xee, 0x60} },
-{ 0x0aae,      16,     {0x3c, 0x90, 0x20, 0x00, 0x74, 0x55, 0xf0, 0x80, 0xf2, 0x75, 0x8c, 0xb1, 0x7f, 0x27, 0xef, 0xd3} },
-{ 0x0abe,      16,     {0x94, 0x2b, 0x50, 0x09, 0xa8, 0x07, 0xe6, 0x60, 0x01, 0x16, 0x0f, 0x80, 0xf1, 0x90, 0x02, 0x9e} },
-{ 0x0ace,      16,     {0xe0, 0x60, 0x02, 0x14, 0xf0, 0x90, 0x01, 0x5e, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x0e, 0x90} },
-{ 0x0ade,      13,     {0x01, 0x5f, 0xe0, 0x24, 0xff, 0xf0, 0x90, 0x01, 0x5e, 0xe0, 0x34, 0xff, 0xf0} },
-{ 0x0aeb,      15,     {0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x00, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0afa,      16,     {0xd2, 0x00, 0x75, 0x8e, 0x10, 0xe4, 0x90, 0x7f, 0x92, 0xf0, 0x12, 0x0f, 0x72, 0x12, 0x08, 0x5b} },
-{ 0x0b0a,      13,     {0x12, 0x0e, 0x0f, 0x12, 0x8f, 0x06, 0x12, 0x11, 0x9c, 0x12, 0x09, 0xcc, 0x22} },
-{ 0x0b17,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x01, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01} },
-{ 0x0b27,      8,      {0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0b2f,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f} },
-{ 0x0b3f,      11,     {0xab, 0x74, 0x04, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0b4a,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x02, 0xf0, 0x90} },
-{ 0x0b5a,      16,     {0x7f, 0xd8, 0xe0, 0x70, 0x0d, 0x90, 0x7f, 0xd9, 0xe0, 0x70, 0x07, 0xe5, 0x2b, 0x70, 0x03, 0x75} },
-{ 0x0b6a,      9,      {0x2b, 0x14, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0b73,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x10, 0xf0, 0xd0} },
-{ 0x0b83,      6,      {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0b89,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x30, 0x02, 0x02, 0xd2, 0x06, 0x53, 0x91, 0xef, 0x90, 0x7f} },
-{ 0x0b99,      11,     {0xab, 0x74, 0x08, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0ba4,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x02, 0xf0, 0xe5} },
-{ 0x0bb4,      16,     {0x30, 0x30, 0xe0, 0x13, 0xe5, 0x3b, 0x30, 0xe0, 0x07, 0x90, 0x20, 0x04, 0xe0, 0x44, 0x01, 0xf0} },
-{ 0x0bc4,      16,     {0x90, 0x20, 0x01, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0x82} },
-{ 0x0bd4,      5,      {0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0bd9,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x04, 0xf0, 0xe5} },
-{ 0x0be9,      16,     {0x30, 0x30, 0xe1, 0x13, 0xe5, 0x3b, 0x30, 0xe1, 0x07, 0x90, 0x20, 0x0c, 0xe0, 0x44, 0x01, 0xf0} },
-{ 0x0bf9,      16,     {0x90, 0x20, 0x09, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0x82} },
-{ 0x0c09,      5,      {0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0c0e,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x08, 0xf0, 0xe5} },
-{ 0x0c1e,      16,     {0x30, 0x30, 0xe2, 0x13, 0xe5, 0x3b, 0x30, 0xe2, 0x07, 0x90, 0x20, 0x14, 0xe0, 0x44, 0x01, 0xf0} },
-{ 0x0c2e,      16,     {0x90, 0x20, 0x11, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0x82} },
-{ 0x0c3e,      5,      {0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0c43,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x10, 0xf0, 0xe5} },
-{ 0x0c53,      16,     {0x30, 0x30, 0xe3, 0x13, 0xe5, 0x3b, 0x30, 0xe3, 0x07, 0x90, 0x20, 0x1c, 0xe0, 0x44, 0x01, 0xf0} },
-{ 0x0c63,      16,     {0x90, 0x20, 0x19, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0x82} },
-{ 0x0c73,      5,      {0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0c78,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x53} },
-{ 0x0c88,      16,     {0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x02, 0xf0, 0xe5, 0x30, 0x20, 0xe0, 0x06, 0x90, 0x7f, 0xc7} },
-{ 0x0c98,      16,     {0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe0, 0x0a, 0x90, 0x7f, 0xc7, 0xe0, 0x90, 0x02, 0x96, 0xf0} },
-{ 0x0ca8,      16,     {0x80, 0x07, 0x90, 0x20, 0x01, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b, 0x70, 0x03, 0x75, 0x2b, 0x14} },
-{ 0x0cb8,      13,     {0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0cc5,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x53} },
-{ 0x0cd5,      16,     {0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x04, 0xf0, 0xe5, 0x30, 0x20, 0xe1, 0x06, 0x90, 0x7f, 0xc9} },
-{ 0x0ce5,      16,     {0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe1, 0x0a, 0x90, 0x7f, 0xc9, 0xe0, 0x90, 0x02, 0x97, 0xf0} },
-{ 0x0cf5,      16,     {0x80, 0x07, 0x90, 0x20, 0x09, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b, 0x70, 0x03, 0x75, 0x2b, 0x14} },
-{ 0x0d05,      13,     {0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0d12,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x53} },
-{ 0x0d22,      16,     {0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x08, 0xf0, 0xe5, 0x30, 0x20, 0xe2, 0x06, 0x90, 0x7f, 0xcb} },
-{ 0x0d32,      16,     {0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe2, 0x0a, 0x90, 0x7f, 0xcb, 0xe0, 0x90, 0x02, 0x98, 0xf0} },
-{ 0x0d42,      16,     {0x80, 0x07, 0x90, 0x20, 0x11, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b, 0x70, 0x03, 0x75, 0x2b, 0x14} },
-{ 0x0d52,      13,     {0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0d5f,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0x53} },
-{ 0x0d6f,      16,     {0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x10, 0xf0, 0xe5, 0x30, 0x20, 0xe3, 0x06, 0x90, 0x7f, 0xcd} },
-{ 0x0d7f,      16,     {0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe3, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0x90, 0x02, 0x99, 0xf0} },
-{ 0x0d8f,      16,     {0x80, 0x07, 0x90, 0x20, 0x19, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b, 0x70, 0x03, 0x75, 0x2b, 0x14} },
-{ 0x0d9f,      13,     {0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0dac,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x80, 0xf0, 0xd0} },
-{ 0x0dbc,      6,      {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0dc2,      16,     {0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x00, 0xc0, 0x00, 0xc0} },
-{ 0x0dd2,      16,     {0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0x53, 0x91, 0xef} },
-{ 0x0de2,      16,     {0x90, 0x7f, 0xaa, 0x74, 0x80, 0xf0, 0x7e, 0x7b, 0x7f, 0x40, 0x12, 0x8c, 0xfb, 0x90, 0x7f, 0xd3} },
-{ 0x0df2,      16,     {0xe4, 0xf0, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01} },
-{ 0x0e02,      13,     {0xd0, 0x00, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0, 0x32} },
-{ 0x0e0f,      16,     {0x90, 0x01, 0x20, 0x12, 0x9c, 0x07, 0x00, 0x00, 0x25, 0x80, 0x90, 0x01, 0x24, 0x74, 0x08, 0xf0} },
-{ 0x0e1f,      16,     {0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x6e, 0xf0, 0xa3, 0xf0, 0xe4, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3} },
-{ 0x0e2f,      16,     {0xf0, 0xa3, 0xf0, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0xc3, 0x94, 0x04, 0x50} },
-{ 0x0e3f,      16,     {0x13, 0xef, 0x04, 0xa3, 0xf0, 0x7e, 0x01, 0x7f, 0x1f, 0x12, 0x84, 0xf4, 0x90, 0x01, 0x1e, 0xe0} },
-{ 0x0e4f,      16,     {0x04, 0xf0, 0x80, 0xe3, 0xe4, 0xf5, 0x26, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff} },
-{ 0x0e5f,      16,     {0xc3, 0x94, 0x04, 0x50, 0x1a, 0x74, 0x96, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4} },
-{ 0x0e6f,      16,     {0xf0, 0x74, 0x22, 0x2f, 0xf8, 0xe4, 0xf6, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xdc, 0xe4} },
-{ 0x0e7f,      16,     {0xf5, 0x30, 0xe5, 0xc0, 0x60, 0x2f, 0x90, 0x01, 0x1e, 0x74, 0x01, 0xf0, 0x90, 0x01, 0x1e, 0xe0} },
-{ 0x0e8f,      16,     {0xff, 0xd3, 0x94, 0x04, 0x50, 0x1f, 0xef, 0x14, 0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02} },
-{ 0x0e9f,      16,     {0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x30, 0x7e, 0x01, 0x7f, 0x1e, 0x12, 0x82, 0xea, 0x90, 0x01, 0x1e} },
-{ 0x0eaf,      16,     {0xe0, 0x04, 0xf0, 0x80, 0xd7, 0xe4, 0xf5, 0x3a, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0} },
-{ 0x0ebf,      16,     {0xff, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x54} },
-{ 0x0ecf,      16,     {0xf0, 0xfe, 0x74, 0x63, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83, 0xee, 0xf0, 0x74, 0x36} },
-{ 0x0edf,      16,     {0x2f, 0xf8, 0xa6, 0x06, 0x74, 0x32, 0x2f, 0xf8, 0xe4, 0xf6, 0x74, 0x2c, 0x2f, 0xf8, 0xe4, 0xf6} },
-{ 0x0eef,      16,     {0x74, 0x9a, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x01, 0x1e, 0xe0} },
-{ 0x0eff,      16,     {0x04, 0xf0, 0xe0, 0xb4, 0x04, 0xb6, 0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xf5, 0x5e, 0x60, 0x5e} },
-{ 0x0f0f,      16,     {0xe4, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0xc3, 0x94, 0x04, 0x50, 0xe7, 0x74} },
-{ 0x0f1f,      16,     {0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x55, 0x5e, 0x60, 0x38, 0x90, 0x01} },
-{ 0x0f2f,      1,      {0x1e} },
-{ 0x0f30,      16,     {0xe0, 0xff, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0} },
-{ 0x0f40,      16,     {0xfe, 0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0} },
-{ 0x0f50,      16,     {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0xfe} },
-{ 0x0f60,      14,     {0x7d, 0x06, 0x12, 0x82, 0x60, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xa7, 0x22} },
-{ 0x0f6e,      4,      {0x53, 0x91, 0xbf, 0x32} },
-{ 0x0f72,      16,     {0x7b, 0xff, 0x7a, 0x12, 0x79, 0x1b, 0x90, 0x00, 0x04, 0x12, 0x9a, 0x61, 0xfd, 0x8b, 0x60, 0x75} },
-{ 0x0f82,      16,     {0x61, 0x12, 0x75, 0x62, 0x24, 0xe4, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x7f, 0xe0, 0xf0, 0xf5, 0x5e} },
-{ 0x0f92,      16,     {0xf5, 0x5f, 0x90, 0x02, 0x4c, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f} },
-{ 0x0fa2,      16,     {0xa9, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0xe4, 0xfc, 0xec, 0x25, 0xe0, 0x24, 0xb4, 0xf5} },
-{ 0x0fb2,      16,     {0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x0c, 0xbc, 0x10, 0xee, 0xe4, 0x90, 0x7f, 0xdd} },
-{ 0x0fc2,      16,     {0xf0, 0xaf, 0x05, 0x1d, 0xef, 0x70, 0x03, 0x02, 0x11, 0x38, 0xab, 0x60, 0xaa, 0x61, 0xa9, 0x62} },
-{ 0x0fd2,      16,     {0x90, 0x00, 0x01, 0x12, 0x9a, 0x61, 0x64, 0x05, 0x60, 0x03, 0x02, 0x11, 0x27, 0x90, 0x00, 0x03} },
-{ 0x0fe2,      16,     {0x12, 0x9a, 0x61, 0x64, 0x01, 0x60, 0x03, 0x02, 0x10, 0xae, 0x90, 0x00, 0x02, 0x12, 0x9a, 0x61} },
-{ 0x0ff2,      16,     {0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50, 0x03, 0x02, 0x10, 0x88, 0xec, 0xc3, 0x94, 0x10} },
-{ 0x1002,      16,     {0x40, 0x03, 0x02, 0x10, 0x88, 0xef, 0x30, 0xe7, 0x42, 0xe5, 0x5f, 0xae, 0x5e, 0x78, 0x02, 0xce} },
-{ 0x1012,      16,     {0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xf0, 0x2c, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5} },
-{ 0x1022,      16,     {0x83, 0xef, 0xf0, 0x90, 0x7f, 0xe0, 0xe0, 0xff, 0xec, 0x24, 0xf8, 0xfe, 0x74, 0x01, 0xa8, 0x06} },
-{ 0x1032,      16,     {0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x4f, 0x90, 0x7f, 0xe0, 0xf0, 0x90, 0x02, 0x4c, 0xe0} },
-{ 0x1042,      16,     {0x04, 0xf0, 0x90, 0x7f, 0xdd, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x3e, 0xe5, 0x5f, 0xae, 0x5e, 0x78} },
-{ 0x1052,      16,     {0x02, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xe8, 0x2c, 0xf5, 0x82, 0xe4, 0x34} },
-{ 0x1062,      16,     {0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0xe1, 0xe0, 0xff, 0xec, 0x24, 0xf8, 0xfe, 0x74, 0x01} },
-{ 0x1072,      16,     {0xa8, 0x06, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x4f, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x02} },
-{ 0x1082,      16,     {0x4c, 0xe0, 0x04, 0xf0, 0x80, 0x03, 0x7f, 0xff, 0x22, 0x90, 0x00, 0x04, 0x12, 0x9a, 0x61, 0x25} },
-{ 0x1092,      16,     {0x5f, 0xf5, 0x5f, 0xe4, 0x35, 0x5e, 0xf5, 0x5e, 0x90, 0x00, 0x05, 0x12, 0x9a, 0x61, 0xfe, 0xe4} },
-{ 0x10a2,      16,     {0x25, 0x5f, 0xf5, 0x5f, 0xee, 0x35, 0x5e, 0xf5, 0x5e, 0x02, 0x11, 0x2a, 0xab, 0x60, 0xaa, 0x61} },
-{ 0x10b2,      16,     {0xa9, 0x62, 0x90, 0x00, 0x03, 0x12, 0x9a, 0x61, 0xff, 0x64, 0x02, 0x60, 0x05, 0xef, 0x64, 0x03} },
-{ 0x10c2,      16,     {0x70, 0x60, 0x90, 0x00, 0x02, 0x12, 0x9a, 0x61, 0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50} },
-{ 0x10d2,      16,     {0x4e, 0xef, 0x30, 0xe7, 0x1e, 0x90, 0x7f, 0xde, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80} },
-{ 0x10e2,      16,     {0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x4f, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f, 0xac, 0xe0, 0x4e} },
-{ 0x10f2,      16,     {0xf0, 0x80, 0x35, 0x90, 0x7f, 0xdf, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80, 0x02, 0xc3} },
-{ 0x1102,      16,     {0x33, 0xd8, 0xfc, 0xfe, 0x4f, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xad, 0xe0, 0x4e, 0xf0, 0xec} },
-{ 0x1112,      16,     {0x25, 0xe0, 0x24, 0xc5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xec, 0xf0, 0x80, 0x09, 0x7f} },
-{ 0x1122,      16,     {0xff, 0x22, 0x7f, 0xff, 0x22, 0x7f, 0xff, 0x22, 0x74, 0x07, 0x25, 0x62, 0xf5, 0x62, 0xe4, 0x35} },
-{ 0x1132,      16,     {0x61, 0xf5, 0x61, 0x02, 0x0f, 0xc3, 0x20, 0x03, 0x0d, 0x90, 0x02, 0x4c, 0xe0, 0x60, 0x07, 0x90} },
-{ 0x1142,      8,      {0x7f, 0xae, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0x00} },
-{ 0x114a,      1,      {0x22} },
-{ 0x114b,      2,      {0xae, 0x07} },
-{ 0x114d,      16,     {0x7c, 0x02, 0xec, 0x14, 0x60, 0x15, 0x14, 0x70, 0x1e, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0} },
-{ 0x115d,      16,     {0xee, 0x25, 0xe0, 0x44, 0x40, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xa6, 0xed, 0xf0} },
-{ 0x116d,      16,     {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xfb, 0x30, 0xe0, 0xf8, 0xbc} },
-{ 0x117d,      16,     {0x02, 0x0a, 0x20, 0xe1, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22, 0xeb, 0x30, 0xe2, 0x0a} },
-{ 0x118d,      14,     {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xdc, 0xb6, 0x7f, 0x08} },
-{ 0x119b,      1,      {0x22} },
-{ 0x119c,      16,     {0x7f, 0x05, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x7f, 0x02, 0x7d, 0xff, 0x12, 0x11, 0x4b, 0x7f, 0x05} },
-{ 0x11ac,      13,     {0x7e, 0x00, 0x12, 0x08, 0x92, 0x7f, 0x03, 0x7d, 0xff, 0x12, 0x11, 0x4b, 0x22} },
-{ 0x11b9,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc2, 0xa9, 0x90, 0x02, 0x9e, 0x74, 0x19, 0xf0, 0xd2, 0xa9} },
-{ 0x11c9,      15,     {0x53, 0x91, 0x7f, 0x90, 0x01, 0x62, 0xe4, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x11d8,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33} },
-{ 0x11e8,      7,      {0xd8, 0xfc, 0x42, 0x3a, 0x7f, 0x00, 0x22} },
-{ 0x11ef,      3,      {0x00, 0x02, 0x28} },
-{ 0x1200,      16,     {0x12, 0x01, 0x00, 0x01, 0xff, 0xff, 0xff, 0x40, 0x10, 0x07, 0x01, 0x80, 0x42, 0x00, 0x01, 0x02} },
-{ 0x1210,      16,     {0x03, 0x01, 0x09, 0x02, 0x58, 0x00, 0x01, 0x01, 0x04, 0x80, 0x3c, 0x09, 0x04, 0x00, 0x00, 0x0a} },
-{ 0x1220,      16,     {0xff, 0xff, 0xff, 0x05, 0x07, 0x05, 0x81, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x01, 0x02, 0x40} },
-{ 0x1230,      16,     {0x00, 0x00, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00} },
-{ 0x1240,      16,     {0x07, 0x05, 0x83, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x03, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05} },
-{ 0x1250,      16,     {0x84, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x04, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x87, 0x02} },
-{ 0x1260,      16,     {0x40, 0x00, 0x00, 0x07, 0x05, 0x07, 0x02, 0x40, 0x00, 0x00, 0x04, 0x03, 0x09, 0x04, 0x24, 0x03} },
-{ 0x1270,      16,     {0x43, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x6e, 0x00, 0x65, 0x00, 0x63, 0x00, 0x74, 0x00, 0x20, 0x00} },
-{ 0x1280,      16,     {0x54, 0x00, 0x65, 0x00, 0x63, 0x00, 0x68, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00} },
-{ 0x1290,      16,     {0x2e, 0x00, 0x18, 0x03, 0x57, 0x00, 0x68, 0x00, 0x69, 0x00, 0x74, 0x00, 0x65, 0x00, 0x48, 0x00} },
-{ 0x12a0,      16,     {0x45, 0x00, 0x41, 0x00, 0x54, 0x00, 0x2d, 0x00, 0x34, 0x00, 0x1a, 0x03, 0x58, 0x00, 0x58, 0x00} },
-{ 0x12b0,      16,     {0x2d, 0x00, 0x58, 0x00, 0x58, 0x00, 0x2d, 0x00, 0x58, 0x00, 0x58, 0x00, 0x58, 0x00, 0x58, 0x00} },
-{ 0x12c0,      16,     {0x58, 0x00, 0x58, 0x00, 0x2a, 0x03, 0x43, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x66, 0x00, 0x69, 0x00} },
-{ 0x12d0,      16,     {0x67, 0x00, 0x75, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00} },
-{ 0x12e0,      16,     {0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x22, 0x03} },
-{ 0x12f0,      16,     {0x49, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x66, 0x00, 0x61, 0x00, 0x63, 0x00} },
-{ 0x1300,      16,     {0x65, 0x00, 0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00} },
-{ 0x1310,      2,      {0x00, 0x00} },
-{ 0x1312,      16,     {0xc0, 0xe0, 0xc0, 0xf0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0xc0, 0xd0} },
-{ 0x1322,      16,     {0x75, 0x86, 0x00, 0x75, 0xd0, 0x18, 0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xf5, 0xf0, 0x70, 0x11} },
-{ 0x1332,      16,     {0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xf0, 0xd0, 0xe0} },
-{ 0x1342,      16,     {0x32, 0x75, 0x86, 0x00, 0x10, 0xf0, 0x0b, 0x10, 0xf1, 0x12, 0x10, 0xf2, 0x19, 0x10, 0xf3, 0x20} },
-{ 0x1352,      16,     {0x80, 0xd4, 0xe5, 0x27, 0x70, 0x03, 0x75, 0x27, 0x14, 0x02, 0x13, 0x7c, 0xe5, 0x28, 0x70, 0x03} },
-{ 0x1362,      16,     {0x75, 0x28, 0x14, 0x02, 0x15, 0x0d, 0xe5, 0x29, 0x70, 0x03, 0x75, 0x29, 0x14, 0x02, 0x16, 0x9e} },
-{ 0x1372,      16,     {0xe5, 0x2a, 0x70, 0x03, 0x75, 0x2a, 0x14, 0x02, 0x18, 0x2f, 0x90, 0x20, 0x02, 0xe0, 0x54, 0x3f} },
-{ 0x1382,      16,     {0x20, 0xe2, 0x3a, 0x20, 0xe1, 0x0b, 0x20, 0xe4, 0x0b, 0x20, 0xe5, 0x14, 0x60, 0x09, 0x02, 0x13} },
-{ 0x1392,      16,     {0x43, 0x02, 0x14, 0x65, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0xf5, 0x36, 0x02, 0x13, 0x43} },
-{ 0x13a2,      16,     {0x43, 0x82, 0x04, 0xe0, 0x43, 0x2c, 0x01, 0x02, 0x13, 0x43, 0x53, 0x82, 0xf8, 0x43, 0x82, 0x05} },
-{ 0x13b2,      16,     {0xe0, 0x42, 0x32, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02, 0x13, 0x43, 0x30, 0xe1, 0x02} },
-{ 0x13c2,      16,     {0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x3b, 0x30, 0xe0, 0x0a, 0x53, 0x82, 0xf8, 0x43, 0x82, 0x04, 0xe0} },
-{ 0x13d2,      16,     {0x54, 0xfe, 0xf0, 0xe5, 0x85, 0x20, 0xe3, 0x56, 0x90, 0x20, 0x50, 0x74, 0x00, 0xf0, 0x90, 0x20} },
-{ 0x13e2,      16,     {0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xe3, 0x05, 0x86} },
-{ 0x13f2,      16,     {0x90, 0x7e, 0x80, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84, 0xf0, 0x05, 0x86, 0x90, 0x7f} },
-{ 0x1402,      16,     {0xe5, 0xe5, 0x3c, 0xfd, 0x03, 0x03, 0x03, 0xfe, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0} },
-{ 0x1412,      16,     {0xde, 0xf6, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0, 0x90} },
-{ 0x1422,      16,     {0x7f, 0xb7, 0xed, 0xf0, 0x90, 0x20, 0x01, 0xe0, 0x54, 0xfe, 0xf0, 0x02, 0x13, 0x43, 0x7f, 0x40} },
-{ 0x1432,      16,     {0x90, 0x7e, 0x80, 0x05, 0x86, 0x90, 0x20, 0x00, 0xe5, 0x84, 0xfe, 0x24, 0x05, 0xfd, 0x8d, 0x84} },
-{ 0x1442,      16,     {0xe0, 0x8e, 0x84, 0x30, 0xe0, 0x09, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xef, 0x05} },
-{ 0x1452,      16,     {0x86, 0xc3, 0x74, 0x40, 0x9f, 0x90, 0x7f, 0xb7, 0xf0, 0x05, 0x86, 0xa3, 0xe0, 0x54, 0xfe, 0xf0} },
-{ 0x1462,      16,     {0x02, 0x13, 0x43, 0x53, 0x2c, 0xfa, 0xe5, 0x22, 0x60, 0x08, 0x75, 0x22, 0x00, 0xd2, 0xe7, 0xfe} },
-{ 0x1472,      16,     {0x80, 0x0a, 0x90, 0x7f, 0xc7, 0xe0, 0xfe, 0x70, 0x03, 0x02, 0x14, 0xff, 0x90, 0x20, 0x50, 0x74} },
-{ 0x1482,      16,     {0x00, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0, 0x90} },
-{ 0x1492,      16,     {0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7e, 0x40, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84, 0xf0} },
-{ 0x14a2,      16,     {0x05, 0x86, 0x90, 0x7f, 0xe5, 0xee, 0x30, 0xe7, 0x08, 0x05, 0x86, 0xe0, 0x24, 0x38, 0xf0, 0x05} },
-{ 0x14b2,      16,     {0x86, 0xee, 0x54, 0x7f, 0xfe, 0x54, 0x07, 0xfb, 0xee, 0x54, 0x78, 0x60, 0x30, 0x03, 0x03, 0x03} },
-{ 0x14c2,      16,     {0x30, 0xe3, 0x04, 0x74, 0x07, 0x7b, 0x08, 0xfd, 0xfc, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0} },
-{ 0x14d2,      16,     {0xe0, 0xdd, 0xf6, 0xeb, 0xfe, 0x60, 0x19, 0xec, 0x64, 0x07, 0x70, 0x11, 0x8b, 0x22, 0x90, 0x7f} },
-{ 0x14e2,      16,     {0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0, 0x80, 0x1b, 0xe0, 0xde, 0xfd} },
-{ 0x14f2,      16,     {0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0, 0x90, 0x20, 0x01} },
-{ 0x1502,      16,     {0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xc7, 0xf0, 0x02, 0x13, 0x43, 0x90, 0x20, 0x0a, 0xe0, 0x54} },
-{ 0x1512,      16,     {0x3f, 0x20, 0xe2, 0x3a, 0x20, 0xe1, 0x0b, 0x20, 0xe4, 0x0b, 0x20, 0xe5, 0x14, 0x60, 0x09, 0x02} },
-{ 0x1522,      16,     {0x13, 0x43, 0x02, 0x15, 0xf6, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0xf5, 0x37, 0x02, 0x13} },
-{ 0x1532,      16,     {0x43, 0x43, 0x82, 0x04, 0xe0, 0x43, 0x2d, 0x01, 0x02, 0x13, 0x43, 0x53, 0x82, 0xf8, 0x43, 0x82} },
-{ 0x1542,      16,     {0x05, 0xe0, 0x42, 0x33, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02, 0x13, 0x43, 0x30, 0xe1} },
-{ 0x1552,      16,     {0x02, 0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x3b, 0x30, 0xe1, 0x0a, 0x53, 0x82, 0xf8, 0x43, 0x82, 0x04} },
-{ 0x1562,      16,     {0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x85, 0x20, 0xe3, 0x56, 0x90, 0x20, 0x50, 0x74, 0x01, 0xf0, 0x90} },
-{ 0x1572,      16,     {0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xe3, 0x05} },
-{ 0x1582,      16,     {0x86, 0x90, 0x7e, 0x00, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84, 0xf0, 0x05, 0x86, 0x90} },
-{ 0x1592,      16,     {0x7f, 0xe5, 0xe5, 0x3d, 0xfd, 0x03, 0x03, 0x03, 0xfe, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0} },
-{ 0x15a2,      16,     {0xf0, 0xde, 0xf6, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0} },
-{ 0x15b2,      16,     {0x90, 0x7f, 0xb9, 0xed, 0xf0, 0x90, 0x20, 0x09, 0xe0, 0x54, 0xfe, 0xf0, 0x02, 0x13, 0x43, 0x7f} },
-{ 0x15c2,      16,     {0x40, 0x90, 0x7e, 0x00, 0x05, 0x86, 0x90, 0x20, 0x08, 0xe5, 0x84, 0xfe, 0x24, 0x05, 0xfd, 0x8d} },
-{ 0x15d2,      16,     {0x84, 0xe0, 0x8e, 0x84, 0x30, 0xe0, 0x09, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05, 0x86, 0xdf, 0xef} },
-{ 0x15e2,      16,     {0x05, 0x86, 0xc3, 0x74, 0x40, 0x9f, 0x90, 0x7f, 0xb9, 0xf0, 0x05, 0x86, 0xa3, 0xe0, 0x54, 0xfe} },
-{ 0x15f2,      16,     {0xf0, 0x02, 0x13, 0x43, 0x53, 0x2d, 0xfa, 0xe5, 0x23, 0x60, 0x08, 0x75, 0x23, 0x00, 0xd2, 0xe7} },
-{ 0x1602,      16,     {0xfe, 0x80, 0x0a, 0x90, 0x7f, 0xc9, 0xe0, 0xfe, 0x70, 0x03, 0x02, 0x16, 0x90, 0x90, 0x20, 0x50} },
-{ 0x1612,      16,     {0x74, 0x01, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0} },
-{ 0x1622,      16,     {0x90, 0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7d, 0xc0, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84} },
-{ 0x1632,      16,     {0xf0, 0x05, 0x86, 0x90, 0x7f, 0xe5, 0xee, 0x30, 0xe7, 0x08, 0x05, 0x86, 0xe0, 0x24, 0x38, 0xf0} },
-{ 0x1642,      16,     {0x05, 0x86, 0xee, 0x54, 0x7f, 0xfe, 0x54, 0x07, 0xfb, 0xee, 0x54, 0x78, 0x60, 0x30, 0x03, 0x03} },
-{ 0x1652,      16,     {0x03, 0x30, 0xe3, 0x04, 0x74, 0x07, 0x7b, 0x08, 0xfd, 0xfc, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0} },
-{ 0x1662,      16,     {0xe0, 0xe0, 0xdd, 0xf6, 0xeb, 0xfe, 0x60, 0x19, 0xec, 0x64, 0x07, 0x70, 0x11, 0x8b, 0x23, 0x90} },
-{ 0x1672,      16,     {0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0, 0x80, 0x1b, 0xe0, 0xde} },
-{ 0x1682,      14,     {0xfd, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0} },
-{ 0x1690,      16,     {0x90, 0x20, 0x09, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xc9, 0xf0, 0x02, 0x13, 0x43, 0x90, 0x20} },
-{ 0x16a0,      16,     {0x12, 0xe0, 0x54, 0x3f, 0x20, 0xe2, 0x3a, 0x20, 0xe1, 0x0b, 0x20, 0xe4, 0x0b, 0x20, 0xe5, 0x14} },
-{ 0x16b0,      16,     {0x60, 0x09, 0x02, 0x13, 0x43, 0x02, 0x17, 0x87, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0xf5} },
-{ 0x16c0,      16,     {0x38, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0x43, 0x2e, 0x01, 0x02, 0x13, 0x43, 0x53, 0x82} },
-{ 0x16d0,      16,     {0xf8, 0x43, 0x82, 0x05, 0xe0, 0x42, 0x34, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02, 0x13} },
-{ 0x16e0,      16,     {0x43, 0x30, 0xe1, 0x02, 0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x3b, 0x30, 0xe2, 0x0a, 0x53, 0x82, 0xf8} },
-{ 0x16f0,      16,     {0x43, 0x82, 0x04, 0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x85, 0x20, 0xe3, 0x56, 0x90, 0x20, 0x50, 0x74} },
-{ 0x1700,      16,     {0x02, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0, 0x90} },
-{ 0x1710,      16,     {0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7d, 0x80, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84, 0xf0} },
-{ 0x1720,      16,     {0x05, 0x86, 0x90, 0x7f, 0xe5, 0xe5, 0x3e, 0xfd, 0x03, 0x03, 0x03, 0xfe, 0xf0, 0xf0, 0xf0, 0xf0} },
-{ 0x1730,      16,     {0xf0, 0xf0, 0xf0, 0xf0, 0xde, 0xf6, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58} },
-{ 0x1740,      16,     {0x74, 0x00, 0xf0, 0x90, 0x7f, 0xbb, 0xed, 0xf0, 0x90, 0x20, 0x11, 0xe0, 0x54, 0xfe, 0xf0, 0x02} },
-{ 0x1750,      16,     {0x13, 0x43, 0x7f, 0x40, 0x90, 0x7d, 0x80, 0x05, 0x86, 0x90, 0x20, 0x10, 0xe5, 0x84, 0xfe, 0x24} },
-{ 0x1760,      16,     {0x05, 0xfd, 0x8d, 0x84, 0xe0, 0x8e, 0x84, 0x30, 0xe0, 0x09, 0xe0, 0x05, 0x86, 0xf0, 0xa3, 0x05} },
-{ 0x1770,      16,     {0x86, 0xdf, 0xef, 0x05, 0x86, 0xc3, 0x74, 0x40, 0x9f, 0x90, 0x7f, 0xbb, 0xf0, 0x05, 0x86, 0xa3} },
-{ 0x1780,      16,     {0xe0, 0x54, 0xfe, 0xf0, 0x02, 0x13, 0x43, 0x53, 0x2e, 0xfa, 0xe5, 0x24, 0x60, 0x08, 0x75, 0x24} },
-{ 0x1790,      16,     {0x00, 0xd2, 0xe7, 0xfe, 0x80, 0x0a, 0x90, 0x7f, 0xcb, 0xe0, 0xfe, 0x70, 0x03, 0x02, 0x18, 0x21} },
-{ 0x17a0,      16,     {0x90, 0x20, 0x50, 0x74, 0x02, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0} },
-{ 0x17b0,      16,     {0x44, 0x40, 0xf0, 0x90, 0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7d, 0x40, 0x05, 0x86, 0xe5, 0x85, 0xf0} },
-{ 0x17c0,      16,     {0xa3, 0xe5, 0x84, 0xf0, 0x05, 0x86, 0x90, 0x7f, 0xe5, 0xee, 0x30, 0xe7, 0x08, 0x05, 0x86, 0xe0} },
-{ 0x17d0,      16,     {0x24, 0x38, 0xf0, 0x05, 0x86, 0xee, 0x54, 0x7f, 0xfe, 0x54, 0x07, 0xfb, 0xee, 0x54, 0x78, 0x60} },
-{ 0x17e0,      16,     {0x30, 0x03, 0x03, 0x03, 0x30, 0xe3, 0x04, 0x74, 0x07, 0x7b, 0x08, 0xfd, 0xfc, 0xe0, 0xe0, 0xe0} },
-{ 0x17f0,      16,     {0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xdd, 0xf6, 0xeb, 0xfe, 0x60, 0x19, 0xec, 0x64, 0x07, 0x70, 0x11} },
-{ 0x1800,      16,     {0x8b, 0x24, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0, 0x80} },
-{ 0x1810,      16,     {0x1b, 0xe0, 0xde, 0xfd, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00} },
-{ 0x1820,      16,     {0xf0, 0x90, 0x20, 0x11, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xcb, 0xf0, 0x02, 0x13, 0x43, 0x90} },
-{ 0x1830,      16,     {0x20, 0x1a, 0xe0, 0x54, 0x3f, 0x20, 0xe2, 0x3a, 0x20, 0xe1, 0x0b, 0x20, 0xe4, 0x0b, 0x20, 0xe5} },
-{ 0x1840,      16,     {0x14, 0x60, 0x09, 0x02, 0x13, 0x43, 0x02, 0x19, 0x18, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0} },
-{ 0x1850,      16,     {0xf5, 0x39, 0x02, 0x13, 0x43, 0x43, 0x82, 0x04, 0xe0, 0x43, 0x2f, 0x01, 0x02, 0x13, 0x43, 0x53} },
-{ 0x1860,      16,     {0x82, 0xf8, 0x43, 0x82, 0x05, 0xe0, 0x42, 0x35, 0x53, 0x82, 0xfb, 0xe0, 0x54, 0xfb, 0xf0, 0x02} },
-{ 0x1870,      16,     {0x13, 0x43, 0x30, 0xe1, 0x02, 0x80, 0xe8, 0xf5, 0x85, 0xe5, 0x3b, 0x30, 0xe3, 0x0a, 0x53, 0x82} },
-{ 0x1880,      16,     {0xf8, 0x43, 0x82, 0x04, 0xe0, 0x54, 0xfe, 0xf0, 0xe5, 0x85, 0x20, 0xe3, 0x56, 0x90, 0x20, 0x50} },
-{ 0x1890,      16,     {0x74, 0x03, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2, 0xe0, 0x44, 0x40, 0xf0} },
-{ 0x18a0,      16,     {0x90, 0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7d, 0x00, 0x05, 0x86, 0xe5, 0x85, 0xf0, 0xa3, 0xe5, 0x84} },
-{ 0x18b0,      16,     {0xf0, 0x05, 0x86, 0x90, 0x7f, 0xe5, 0xe5, 0x3f, 0xfd, 0x03, 0x03, 0x03, 0xfe, 0xf0, 0xf0, 0xf0} },
-{ 0x18c0,      16,     {0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xde, 0xf6, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20} },
-{ 0x18d0,      16,     {0x58, 0x74, 0x00, 0xf0, 0x90, 0x7f, 0xbd, 0xed, 0xf0, 0x90, 0x20, 0x19, 0xe0, 0x54, 0xfe, 0xf0} },
-{ 0x18e0,      16,     {0x02, 0x13, 0x43, 0x7f, 0x40, 0x90, 0x7d, 0x00, 0x05, 0x86, 0x90, 0x20, 0x18, 0xe5, 0x84, 0xfe} },
-{ 0x18f0,      16,     {0x24, 0x05, 0xfd, 0x8d, 0x84, 0xe0, 0x8e, 0x84, 0x30, 0xe0, 0x09, 0xe0, 0x05, 0x86, 0xf0, 0xa3} },
-{ 0x1900,      16,     {0x05, 0x86, 0xdf, 0xef, 0x05, 0x86, 0xc3, 0x74, 0x40, 0x9f, 0x90, 0x7f, 0xbd, 0xf0, 0x05, 0x86} },
-{ 0x1910,      16,     {0xa3, 0xe0, 0x54, 0xfe, 0xf0, 0x02, 0x13, 0x43, 0x53, 0x2f, 0xfa, 0xe5, 0x25, 0x60, 0x08, 0x75} },
-{ 0x1920,      16,     {0x25, 0x00, 0xd2, 0xe7, 0xfe, 0x80, 0x0a, 0x90, 0x7f, 0xcd, 0xe0, 0xfe, 0x70, 0x03, 0x02, 0x19} },
-{ 0x1930,      16,     {0xb2, 0x90, 0x20, 0x50, 0x74, 0x03, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xe2} },
-{ 0x1940,      16,     {0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xe3, 0x05, 0x86, 0x90, 0x7c, 0xc0, 0x05, 0x86, 0xe5, 0x85} },
-{ 0x1950,      16,     {0xf0, 0xa3, 0xe5, 0x84, 0xf0, 0x05, 0x86, 0x90, 0x7f, 0xe5, 0xee, 0x30, 0xe7, 0x08, 0x05, 0x86} },
-{ 0x1960,      16,     {0xe0, 0x24, 0x38, 0xf0, 0x05, 0x86, 0xee, 0x54, 0x7f, 0xfe, 0x54, 0x07, 0xfb, 0xee, 0x54, 0x78} },
-{ 0x1970,      16,     {0x60, 0x30, 0x03, 0x03, 0x03, 0x30, 0xe3, 0x04, 0x74, 0x07, 0x7b, 0x08, 0xfd, 0xfc, 0xe0, 0xe0} },
-{ 0x1980,      16,     {0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xe0, 0xdd, 0xf6, 0xeb, 0xfe, 0x60, 0x19, 0xec, 0x64, 0x07, 0x70} },
-{ 0x1990,      16,     {0x11, 0x8b, 0x25, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74, 0x00, 0xf0} },
-{ 0x19a0,      16,     {0x80, 0x1b, 0xe0, 0xde, 0xfd, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74} },
-{ 0x19b0,      16,     {0x00, 0xf0, 0x90, 0x20, 0x19, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xcd, 0xf0, 0x02, 0x13, 0x43} },
-{ 0x19c0,      1,      {0x32} },
-{ 0x19c1,      4,      {0xad, 0x07, 0xac, 0x06} },
-{ 0x19c5,      16,     {0x79, 0x06, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb} },
-{ 0x19d5,      16,     {0x4a, 0x70, 0x03, 0x02, 0x1b, 0x09, 0xe9, 0xb4, 0x07, 0x00, 0x40, 0x03, 0x02, 0x1a, 0xdb, 0x90} },
-{ 0x19e5,      16,     {0x19, 0xeb, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x1a, 0xb9, 0x02, 0x1a, 0x71, 0x02, 0x1a, 0x5a, 0x02} },
-{ 0x19f5,      16,     {0x1a, 0x40, 0x02, 0x1a, 0x2f, 0x02, 0x1a, 0x1a, 0x02, 0x1a, 0x00, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
-{ 0x1a05,      16,     {0x80, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90, 0x7f, 0xa6} },
-{ 0x1a15,      16,     {0xf0, 0x19, 0x02, 0x1a, 0xdb, 0x19, 0x8d, 0x82, 0x8c, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x0a} },
-{ 0x1a25,      16,     {0xa3, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x02, 0x1a, 0xdb, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} },
-{ 0x1a35,      16,     {0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x19, 0x02, 0x1a, 0xdb, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
-{ 0x1a45,      16,     {0x80, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa1, 0x90, 0x7f, 0xa6} },
-{ 0x1a55,      16,     {0xf0, 0x19, 0x02, 0x1a, 0xdb, 0xeb, 0x64, 0x01, 0x4a, 0x70, 0x08, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
-{ 0x1a65,      16,     {0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xf5, 0x69, 0x19, 0x80, 0x6a, 0xed, 0x24, 0x04, 0xf5} },
-{ 0x1a75,      16,     {0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfe, 0xa3, 0xe0, 0x64, 0x02, 0x4e, 0x70, 0x08, 0x90, 0x7f} },
-{ 0x1a85,      16,     {0xa5, 0xe0, 0x44, 0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xff, 0xed, 0x24, 0x06, 0xf5, 0x82} },
-{ 0x1a95,      16,     {0xe4, 0x3c, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83} },
-{ 0x1aa5,      16,     {0xef, 0xf0, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12} },
-{ 0x1ab5,      16,     {0x9a, 0x8e, 0x80, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xff} },
-{ 0x1ac5,      16,     {0xed, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xf5, 0x82, 0x8a} },
-{ 0x1ad5,      16,     {0x83, 0xef, 0xf0, 0x7f, 0x08, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x69, 0x30, 0xe0, 0xf7, 0x30} },
-{ 0x1ae5,      16,     {0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xe9, 0xd3, 0x94, 0x02, 0x50, 0x03, 0x02} },
-{ 0x1af5,      16,     {0x19, 0xc7, 0xe5, 0x69, 0x30, 0xe1, 0x03, 0x02, 0x19, 0xc7, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40} },
-{ 0x1b05,      6,      {0xf0, 0x7f, 0x07, 0x22, 0x7f, 0x08} },
-{ 0x1b0b,      1,      {0x22} },
-{ 0x1b0c,      16,     {0x8e, 0x5f, 0x8f, 0x60, 0x8c, 0x61, 0x8d, 0x62, 0xaf, 0x03, 0x1b, 0xef, 0x60, 0x24, 0x05, 0x60} },
-{ 0x1b1c,      16,     {0xe5, 0x60, 0xae, 0x5f, 0x70, 0x02, 0x05, 0x5f, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05} },
-{ 0x1b2c,      16,     {0x62, 0xe5, 0x62, 0xac, 0x61, 0x70, 0x02, 0x05, 0x61, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} },
-{ 0x1b3c,      3,      {0x80, 0xd6, 0x22} },
-{ 0x8000,      4,      {0x8e, 0x69, 0x8f, 0x6a} },
-{ 0x8004,      16,     {0x75, 0x6b, 0x03, 0xe5, 0x6a, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x69, 0xf5, 0x83, 0xe0, 0xfe} },
-{ 0x8014,      16,     {0xa3, 0xe0, 0x4e, 0x70, 0x03, 0x02, 0x81, 0x0e, 0xe5, 0x6b, 0x60, 0x4e, 0x14, 0x60, 0x38, 0x14} },
-{ 0x8024,      16,     {0x60, 0x20, 0x14, 0x60, 0x03, 0x02, 0x80, 0xb2, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0x85} },
-{ 0x8034,      16,     {0x6a, 0x82, 0x85, 0x69, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90, 0x7f, 0xa6, 0xf0} },
-{ 0x8044,      16,     {0x80, 0x6c, 0x85, 0x6a, 0x82, 0x85, 0x69, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x09, 0xa3, 0xa3} },
-{ 0x8054,      16,     {0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x57, 0x15, 0x6b, 0x85, 0x6a, 0x82, 0x85, 0x69, 0x83, 0xa3} },
-{ 0x8064,      16,     {0xa3, 0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x44, 0xe5, 0x6a, 0x24, 0x06, 0xf5, 0x82} },
-{ 0x8074,      16,     {0xe4, 0x35, 0x69, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a, 0xa4, 0x85, 0xf0, 0x82, 0xf5} },
-{ 0x8084,      16,     {0x83, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe5, 0x6a, 0x24} },
-{ 0x8094,      16,     {0x04, 0xf5, 0x82, 0xe4, 0x35, 0x69, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12, 0x9a, 0x8e, 0x85} },
-{ 0x80a4,      16,     {0x6a, 0x82, 0x85, 0x69, 0x83, 0xa3, 0xa3, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a, 0x8e, 0x90, 0x7f} },
-{ 0x80b4,      16,     {0xa5, 0xe0, 0xf5, 0x6c, 0x30, 0xe0, 0xf7, 0x30, 0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06} },
-{ 0x80c4,      16,     {0x22, 0xe5, 0x6c, 0x20, 0xe1, 0x0a, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22} },
-{ 0x80d4,      16,     {0xe5, 0x6b, 0x70, 0x31, 0x7f, 0x01, 0x7e, 0x00, 0x12, 0x08, 0x92, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
-{ 0x80e4,      16,     {0x80, 0xf0, 0x85, 0x6a, 0x82, 0x85, 0x69, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90} },
-{ 0x80f4,      16,     {0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x6c, 0x30, 0xe0, 0xf7, 0x30, 0xe1, 0xd5, 0x75} },
-{ 0x8104,      12,     {0x6b, 0x03, 0x02, 0x80, 0x07, 0x15, 0x6b, 0x02, 0x80, 0x07, 0x7f, 0x08} },
-{ 0x8110,      1,      {0x22} },
-{ 0x8111,      2,      {0xac, 0x07} },
-{ 0x8113,      16,     {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xec, 0x25, 0xe0, 0x44, 0x41, 0x90, 0x7f, 0xa6, 0xf0} },
-{ 0x8123,      16,     {0x7b, 0x3c, 0xaf, 0x03, 0x1b, 0xef, 0x70, 0x16, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90} },
-{ 0x8133,      16,     {0x7f, 0xa6, 0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x60, 0xd4, 0x80, 0xf8, 0x90, 0x7f} },
-{ 0x8143,      16,     {0xa5, 0xe0, 0xfd, 0x30, 0xe0, 0xdc, 0x20, 0xe1, 0x09, 0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f} },
-{ 0x8153,      16,     {0xf9, 0x22, 0xed, 0x30, 0xe2, 0x0c, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f} },
-{ 0x8163,      16,     {0xfa, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0x7b, 0x1e} },
-{ 0x8173,      16,     {0xaf, 0x03, 0x1b, 0xef, 0x70, 0x16, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6} },
-{ 0x8183,      16,     {0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x60, 0x86, 0x80, 0xf8, 0x90, 0x7f, 0xa5, 0xe0} },
-{ 0x8193,      16,     {0xfd, 0x20, 0xe0, 0xdc, 0x7b, 0x3c, 0xaf, 0x03, 0x1b, 0xef, 0x70, 0x19, 0x90, 0x7f, 0xa5, 0xe0} },
-{ 0x81a3,      16,     {0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x70, 0x03} },
-{ 0x81b3,      16,     {0x02, 0x81, 0x13, 0x80, 0xf5, 0x90, 0x7f, 0xa5, 0xe0, 0xfd, 0x30, 0xe0, 0xd9, 0x30, 0xe2, 0x09} },
-{ 0x81c3,      16,     {0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f, 0xfa, 0x22, 0xc2, 0xaf, 0x90, 0x7f, 0xa5, 0xe0, 0x44} },
-{ 0x81d3,      12,     {0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0xd2, 0xaf, 0xff, 0x7e, 0x00} },
-{ 0x81df,      1,      {0x22} },
-{ 0x81e0,      16,     {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xf5} },
-{ 0x81f0,      16,     {0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xf9, 0x74, 0xbf, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0} },
-{ 0x8200,      16,     {0x44, 0x10, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0xe4, 0xf0, 0x8b, 0x82, 0x8a, 0x83} },
-{ 0x8210,      16,     {0xa3, 0xf0, 0xed, 0x60, 0x29, 0x74, 0x01, 0x7e, 0x00, 0xa8, 0x07, 0x08, 0x80, 0x05, 0xc3, 0x33} },
-{ 0x8220,      16,     {0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4, 0xef, 0x55, 0x3b, 0x60, 0x0a, 0x8b, 0x82, 0x8a, 0x83} },
-{ 0x8230,      16,     {0xa3, 0x74, 0x01, 0xf0, 0x80, 0x08, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0x74, 0xad, 0xf0, 0x8b, 0x82} },
-{ 0x8240,      16,     {0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0x74, 0xbf, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0, 0x54} },
-{ 0x8250,      15,     {0xef, 0xf0, 0xae, 0x02, 0xaf, 0x03, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe9, 0xf0} },
-{ 0x825f,      1,      {0x22} },
-{ 0x8260,      4,      {0x8f, 0x68, 0x8d, 0x69} },
-{ 0x8264,      16,     {0xe4, 0xf5, 0x6a, 0x74, 0x3c, 0x2f, 0xf8, 0x76, 0x08, 0xe5, 0x68, 0x75, 0xf0, 0x0d, 0xa4, 0x24} },
-{ 0x8274,      16,     {0xa0, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} },
-{ 0x8284,      16,     {0xa3, 0xe0, 0xff, 0x7b, 0x80, 0x7a, 0x25, 0x79, 0x00, 0x78, 0x00, 0xc3, 0x12, 0x9b, 0xc0, 0x50} },
-{ 0x8294,      16,     {0x3c, 0xe5, 0x68, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0xa0, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83} },
-{ 0x82a4,      16,     {0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x00, 0x7a, 0x96, 0x78} },
-{ 0x82b4,      16,     {0x00, 0xc3, 0x12, 0x9b, 0xc0, 0x40, 0x0c, 0x75, 0x6a, 0x40, 0x74, 0x3c, 0x25, 0x68, 0xf8, 0x76} },
-{ 0x82c4,      16,     {0x10, 0x80, 0x0a, 0x75, 0x6a, 0x80, 0x74, 0x3c, 0x25, 0x68, 0xf8, 0x76, 0x38, 0xe5, 0x6a, 0x45} },
-{ 0x82d4,      16,     {0x69, 0x44, 0x01, 0xff, 0xe5, 0x68, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34} },
-{ 0x82e4,      5,      {0x20, 0xf5, 0x83, 0xef, 0xf0} },
-{ 0x82e9,      1,      {0x22} },
-{ 0x82ea,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x5f, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82} },
-{ 0x82fa,      16,     {0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x61, 0x8f, 0x62, 0xf5, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5} },
-{ 0x830a,      16,     {0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x44, 0x03, 0xf0, 0xaf, 0x5f, 0x7d, 0x06, 0x12, 0x82} },
-{ 0x831a,      16,     {0x60, 0xaf, 0x5f, 0x7d, 0x01, 0x12, 0x81, 0xe0, 0x85, 0x62, 0x82, 0x85, 0x61, 0x83, 0xa3, 0xa3} },
-{ 0x832a,      16,     {0xe0, 0x20, 0xe0, 0x28, 0xe0, 0xf5, 0x60, 0xe5, 0x62, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x61} },
-{ 0x833a,      16,     {0xf5, 0x83, 0xe0, 0xf5, 0x60, 0xe5, 0x62, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x61, 0xf5, 0x83} },
-{ 0x834a,      16,     {0xe0, 0xf5, 0x60, 0xaf, 0x5f, 0x7d, 0x06, 0x12, 0x82, 0x60, 0x80, 0xcc, 0x74, 0x96, 0x25, 0x5f} },
-{ 0x835a,      16,     {0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x5f, 0x25, 0xe0, 0xff, 0xc3, 0x74} },
-{ 0x836a,      16,     {0x0c, 0x9f, 0x75, 0xf0, 0x40, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xaf, 0x82} },
-{ 0x837a,      16,     {0xfe, 0xe5, 0x5f, 0x25, 0xe0, 0x24, 0x8d, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xee, 0xf0} },
-{ 0x838a,      16,     {0xa3, 0xef, 0xf0, 0xaf, 0x5f, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc} },
-{ 0x839a,      4,      {0x42, 0x30, 0x7f, 0x00} },
-{ 0x839e,      1,      {0x22} },
-{ 0x839f,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x47, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82} },
-{ 0x83af,      16,     {0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x49, 0x8f, 0x4a, 0x74, 0x96, 0x25, 0x47, 0xf5, 0x82, 0xe4} },
-{ 0x83bf,      16,     {0x34, 0x02, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x4a, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x49, 0xf5} },
-{ 0x83cf,      16,     {0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xaf, 0x47, 0xe4, 0xfd, 0x12, 0x81, 0xe0, 0xaf, 0x47, 0x7d, 0x06} },
-{ 0x83df,      16,     {0x12, 0x82, 0x60, 0xe5, 0x4a, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x49, 0xf5, 0x83, 0xe0, 0x30} },
-{ 0x83ef,      16,     {0xe0, 0x0b, 0x85, 0x4a, 0x82, 0x85, 0x49, 0x83, 0xe0, 0xf5, 0x48, 0x80, 0xe6, 0xaf, 0x47, 0x74} },
-{ 0x83ff,      16,     {0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x30, 0xe5, 0x47, 0x25} },
-{ 0x840f,      13,     {0xe0, 0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0xff} },
-{ 0x841c,      1,      {0x22} },
-{ 0x841d,      4,      {0x8e, 0x47, 0x8f, 0x48} },
-{ 0x8421,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x49, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82} },
-{ 0x8431,      16,     {0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x54, 0x03, 0x70, 0x23, 0x85, 0x48, 0x82, 0x8e, 0x83, 0xa3} },
-{ 0x8441,      16,     {0xe0, 0x30, 0xe0, 0x07, 0xaf, 0x49, 0x7d, 0x02, 0x12, 0x82, 0x60, 0x85, 0x48, 0x82, 0x85, 0x47} },
-{ 0x8451,      15,     {0x83, 0xa3, 0xe0, 0x30, 0xe1, 0x07, 0xaf, 0x49, 0x7d, 0x04, 0x12, 0x82, 0x60, 0x7f, 0x00} },
-{ 0x8460,      1,      {0x22} },
-{ 0x8461,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0xa3, 0xa3, 0xa3, 0xe0, 0xfc, 0xed} },
-{ 0x8471,      16,     {0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xc0, 0x83, 0xc0} },
-{ 0x8481,      16,     {0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0} },
-{ 0x8491,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0xe0, 0xfd, 0xec, 0x6d, 0xd0} },
-{ 0x84a1,      16,     {0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f} },
-{ 0x84b1,      16,     {0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82} },
-{ 0x84c1,      16,     {0x8e, 0x83, 0xa3, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0} },
-{ 0x84d1,      16,     {0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0} },
-{ 0x84e1,      16,     {0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xff, 0xed, 0x6f, 0xd0, 0x82, 0xd0} },
-{ 0x84f1,      3,      {0x83, 0xf0, 0x22} },
-{ 0x84f4,      4,      {0x8e, 0x5f, 0x8f, 0x60} },
-{ 0x84f8,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xff, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34} },
-{ 0x8508,      16,     {0x1f, 0xad, 0x82, 0xf5, 0x66, 0x8d, 0x67, 0xaa, 0x5f, 0xa9, 0x60, 0x7b, 0x01, 0xc0, 0x03, 0xc0} },
-{ 0x8518,      16,     {0x01, 0xef, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x92, 0xf9, 0x74, 0x02, 0x35, 0xf0, 0xa8, 0x01, 0xfc} },
-{ 0x8528,      16,     {0xad, 0x03, 0xd0, 0x01, 0xd0, 0x03, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0x9a, 0x1f, 0x85, 0x60, 0x82} },
-{ 0x8538,      16,     {0x85, 0x5f, 0x83, 0xa3, 0xe0, 0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb, 0x7f} },
-{ 0x8548,      16,     {0x00, 0x7e, 0x08, 0x7d, 0x07, 0x7c, 0x00, 0x12, 0x9b, 0x2e, 0x8f, 0x64, 0x8e, 0x63, 0x8d, 0x62} },
-{ 0x8558,      16,     {0x8c, 0x61, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0xc3, 0x12, 0x9b, 0xc0, 0x70, 0x09} },
-{ 0x8568,      16,     {0x75, 0x64, 0x01, 0xf5, 0x63, 0xf5, 0x62, 0xf5, 0x61, 0x7f, 0xff, 0x7e, 0xff, 0x7d, 0x00, 0x7c} },
-{ 0x8578,      16,     {0x00, 0xab, 0x64, 0xaa, 0x63, 0xa9, 0x62, 0xa8, 0x61, 0xd3, 0x12, 0x9b, 0xc0, 0x40, 0x0c, 0x75} },
-{ 0x8588,      16,     {0x64, 0xff, 0x75, 0x63, 0xff, 0x75, 0x62, 0x00, 0x75, 0x61, 0x00, 0x85, 0x67, 0x82, 0x85, 0x66} },
-{ 0x8598,      16,     {0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x80, 0xf0, 0x85, 0x67, 0x82, 0x85, 0x66, 0x83, 0xe5, 0x64} },
-{ 0x85a8,      16,     {0xf0, 0xaf, 0x64, 0xae, 0x63, 0xad, 0x62, 0xac, 0x61, 0x78, 0x08, 0x12, 0x9b, 0xd1, 0x85, 0x67} },
-{ 0x85b8,      16,     {0x82, 0x85, 0x66, 0x83, 0xa3, 0xef, 0xf0, 0x85, 0x67, 0x82, 0x85, 0x66, 0x83, 0xa3, 0xa3, 0xa3} },
-{ 0x85c8,      16,     {0xe0, 0x54, 0x7f, 0xf0, 0xe4, 0xf5, 0x65, 0xe5, 0x60, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x35, 0x5f} },
-{ 0x85d8,      16,     {0xf5, 0x83, 0xe0, 0xff, 0xb4, 0x62, 0x05, 0x43, 0x65, 0x0a, 0x80, 0x10, 0xef, 0xb4, 0x72, 0x05} },
-{ 0x85e8,      16,     {0x43, 0x65, 0x08, 0x80, 0x07, 0xef, 0xb4, 0x74, 0x03, 0x43, 0x65, 0x02, 0xe5, 0x60, 0x24, 0x0b} },
-{ 0x85f8,      16,     {0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe3, 0x03, 0x43, 0x65, 0x80, 0xef} },
-{ 0x8608,      16,     {0x30, 0xe7, 0x12, 0x43, 0x65, 0x40, 0xe5, 0x67, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x66, 0xf5} },
-{ 0x8618,      16,     {0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x60, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83} },
-{ 0x8628,      16,     {0xe0, 0xff, 0x20, 0xe1, 0x03, 0x30, 0xe4, 0x27, 0x85, 0x60, 0x82, 0x85, 0x5f, 0x83, 0xe0, 0x14} },
-{ 0x8638,      16,     {0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x3b, 0xe5, 0x67} },
-{ 0x8648,      16,     {0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x66, 0xf5, 0x83, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x17, 0x85} },
-{ 0x8658,      16,     {0x60, 0x82, 0x85, 0x5f, 0x83, 0xe0, 0x14, 0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3} },
-{ 0x8668,      16,     {0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x3b, 0x85, 0x67, 0x82, 0x85, 0x66, 0x83, 0xa3, 0xa3, 0xa3, 0x74} },
-{ 0x8678,      16,     {0xbf, 0xf0, 0x85, 0x67, 0x82, 0x85, 0x66, 0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0xe5, 0x65, 0xf0, 0xe5} },
-{ 0x8688,      16,     {0x60, 0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x67, 0x24, 0x04} },
-{ 0x8698,      16,     {0xf5, 0x82, 0xe4, 0x35, 0x66, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x60, 0x24, 0x0a, 0xf5, 0x82, 0xe4} },
-{ 0x86a8,      16,     {0x35, 0x5f, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x67, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x66, 0xf5} },
-{ 0x86b8,      16,     {0x83, 0xef, 0xf0, 0xe5, 0x60, 0x24, 0x09, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0xff} },
-{ 0x86c8,      16,     {0xe5, 0x67, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x66, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x60, 0x24} },
-{ 0x86d8,      16,     {0x09, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x67, 0x24, 0x07, 0xf5, 0x82} },
-{ 0x86e8,      16,     {0xe4, 0x35, 0x66, 0xf5, 0x83, 0xef, 0xf0, 0x85, 0x67, 0x82, 0x85, 0x66, 0x83, 0xa3, 0xa3, 0xa3} },
-{ 0x86f8,      16,     {0xe4, 0xf0, 0x85, 0x67, 0x82, 0x85, 0x66, 0x83, 0xa3, 0xa3, 0xf0, 0x85, 0x60, 0x82, 0x85, 0x5f} },
-{ 0x8708,      16,     {0x83, 0xe0, 0x14, 0xff, 0x7d, 0x06, 0x12, 0x82, 0x60, 0x75, 0x65, 0x08, 0xe5, 0x60, 0x24, 0x0c} },
-{ 0x8718,      16,     {0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0x60, 0x03, 0x43, 0x65, 0x10, 0xe5, 0x67, 0x24} },
-{ 0x8728,      16,     {0x04, 0xf5, 0x82, 0xe4, 0x35, 0x66, 0xf5, 0x83, 0xe0, 0x54, 0x03, 0x45, 0x65, 0xf0, 0xe5, 0x60} },
-{ 0x8738,      16,     {0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0x14, 0xff, 0x25, 0xe0, 0x25, 0xe0} },
-{ 0x8748,      16,     {0xff, 0xe5, 0x60, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0x24, 0xfb, 0x4f} },
-{ 0x8758,      16,     {0xf5, 0x65, 0xe5, 0x60, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x5f, 0xf5, 0x83, 0xe0, 0x24, 0xd0} },
-{ 0x8768,      16,     {0x60, 0x15, 0x14, 0x60, 0x17, 0x24, 0xc2, 0x60, 0x09, 0x24, 0x0a, 0x70, 0x12, 0x43, 0x65, 0x18} },
-{ 0x8778,      16,     {0x80, 0x0d, 0x43, 0x65, 0x08, 0x80, 0x08, 0x43, 0x65, 0x38, 0x80, 0x03, 0x43, 0x65, 0x28, 0x85} },
-{ 0x8788,      13,     {0x67, 0x82, 0x85, 0x66, 0x83, 0xa3, 0xa3, 0xa3, 0xe5, 0x65, 0xf0, 0x7f, 0x00} },
-{ 0x8795,      1,      {0x22} },
-{ 0x8796,      4,      {0x8e, 0x47, 0x8f, 0x48} },
-{ 0x879a,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x4a, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82} },
-{ 0x87aa,      16,     {0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x4d, 0x8f, 0x4e, 0x7e, 0x7b, 0x7f, 0x80, 0xef, 0x24, 0x01} },
-{ 0x87ba,      16,     {0xf5, 0x4c, 0xe4, 0x3e, 0xf5, 0x4b, 0x8f, 0x82, 0x8e, 0x83, 0x74, 0x08, 0xf0, 0xe5, 0x4a, 0x04} },
-{ 0x87ca,      16,     {0x85, 0x4c, 0x82, 0x85, 0x4b, 0x83, 0xf0, 0xa3, 0xe4, 0xf0, 0xe5, 0x4e, 0x24, 0x06, 0xf5, 0x82} },
-{ 0x87da,      16,     {0xe4, 0x35, 0x4d, 0xf5, 0x83, 0xe0, 0x85, 0x4c, 0x82, 0x85, 0x4b, 0x83, 0xa3, 0xa3, 0xf0, 0xe5} },
-{ 0x87ea,      16,     {0x4e, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x4d, 0xf5, 0x83, 0xe0, 0x54, 0x1e, 0x85, 0x4c, 0x82} },
-{ 0x87fa,      16,     {0x85, 0x4b, 0x83, 0xa3, 0xa3, 0xa3, 0xf0, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xe0, 0x24, 0x2b} },
-{ 0x880a,      16,     {0xf8, 0xe6, 0xff, 0xe5, 0x4c, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x4b, 0xf5, 0x83, 0xef, 0xf0} },
-{ 0x881a,      16,     {0xaf, 0x4a, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x49, 0x7f} },
-{ 0x882a,      16,     {0x02, 0x12, 0x81, 0x11, 0xc3, 0xee, 0x64, 0x80, 0x94, 0x80, 0x40, 0xf3, 0xe5, 0x49, 0x5f, 0xff} },
-{ 0x883a,      16,     {0xe5, 0x4c, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x4b, 0xf5, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0xc3} },
-{ 0x884a,      5,      {0x74, 0x07, 0xf0, 0x7f, 0x00} },
-{ 0x884f,      1,      {0x22} },
-{ 0x8850,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34, 0x1f} },
-{ 0x8860,      16,     {0xaf, 0x82, 0xf5, 0x47, 0x8f, 0x48, 0x7e, 0x7b, 0x7f, 0x80, 0xef, 0x24, 0x01, 0xfd, 0xe4, 0x3e} },
-{ 0x8870,      16,     {0xfc, 0x8f, 0x82, 0x8e, 0x83, 0x74, 0x0a, 0xf0, 0xe5, 0x48, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35} },
-{ 0x8880,      16,     {0x47, 0xf5, 0x83, 0xe0, 0x8d, 0x82, 0x8c, 0x83, 0xf0, 0x90, 0x7f, 0xc3, 0x74, 0x02, 0xf0, 0x7f} },
-{ 0x8890,      1,      {0x00} },
-{ 0x8891,      1,      {0x22} },
-{ 0x8892,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34, 0x1f} },
-{ 0x88a2,      16,     {0xad, 0x82, 0xfc, 0x8f, 0x82, 0xa3, 0xe0, 0x60, 0x0f, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c} },
-{ 0x88b2,      16,     {0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x11, 0xae, 0x04, 0xaf, 0x05, 0xef, 0x24, 0x04, 0xf5} },
-{ 0x88c2,      11,     {0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xf0, 0x7f, 0x00} },
-{ 0x88cd,      1,      {0x22} },
-{ 0x88ce,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34, 0x1f} },
-{ 0x88de,      16,     {0xad, 0x82, 0xfc, 0x8f, 0x82, 0xa3, 0xe0, 0x60, 0x0f, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c} },
-{ 0x88ee,      16,     {0xf5, 0x83, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x11, 0xae, 0x04, 0xaf, 0x05, 0xef, 0x24, 0x04, 0xf5} },
-{ 0x88fe,      11,     {0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54, 0xfe, 0xf0, 0x7f, 0x00} },
-{ 0x8909,      1,      {0x22} },
-{ 0x890a,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34, 0x1f} },
-{ 0x891a,      16,     {0xad, 0x82, 0xfc, 0x8f, 0x82, 0xa3, 0xe0, 0x60, 0x0d, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3, 0xa3} },
-{ 0x892a,      16,     {0xe0, 0x44, 0x40, 0xf0, 0x80, 0x0f, 0xae, 0x04, 0xaf, 0x05, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3} },
-{ 0x893a,      7,      {0xa3, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x00} },
-{ 0x8941,      1,      {0x22} },
-{ 0x8942,      4,      {0x8e, 0x47, 0x8f, 0x48} },
-{ 0x8946,      16,     {0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0, 0xf5, 0x4b, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x24, 0xfe, 0x60} },
-{ 0x8956,      16,     {0x16, 0x14, 0x60, 0x1f, 0x14, 0x60, 0x28, 0x24, 0x03, 0x70, 0x2e, 0x7e, 0x7e, 0x7f, 0x80, 0x75} },
-{ 0x8966,      16,     {0x49, 0x7e, 0x75, 0x4a, 0x80, 0x80, 0x22, 0x7e, 0x7e, 0x7f, 0x00, 0x75, 0x49, 0x7e, 0x75, 0x4a} },
-{ 0x8976,      16,     {0x00, 0x80, 0x16, 0x7e, 0x7d, 0x7f, 0x80, 0x75, 0x49, 0x7d, 0x75, 0x4a, 0x80, 0x80, 0x0a, 0x7e} },
-{ 0x8986,      16,     {0x7d, 0x7f, 0x00, 0x75, 0x49, 0x7d, 0x75, 0x4a, 0x00, 0xe5, 0x4b, 0x70, 0x20, 0x85, 0x4a, 0x82} },
-{ 0x8996,      16,     {0x85, 0x49, 0x83, 0x74, 0xff, 0xf0, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xe0, 0x25, 0xe0, 0x24} },
-{ 0x89a6,      16,     {0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x3a, 0xe5, 0x48, 0x24} },
-{ 0x89b6,      16,     {0x02, 0xff, 0xe4, 0x35, 0x47, 0xfe, 0xe5, 0x4b, 0x60, 0x10, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x85} },
-{ 0x89c6,      16,     {0x4a, 0x82, 0x85, 0x49, 0x83, 0xf0, 0x15, 0x4b, 0x80, 0xec, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83} },
-{ 0x89d6,      16,     {0xa3, 0xe0, 0xff, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xe0, 0x25, 0xe0, 0x24, 0xb5, 0xf5, 0x82} },
-{ 0x89e6,      9,      {0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x7f, 0x00} },
-{ 0x89ef,      1,      {0x22} },
-{ 0x89f0,      16,     {0xef, 0x24, 0x01, 0xf5, 0x48, 0xe4, 0x3e, 0xf5, 0x47, 0x7c, 0x7b, 0x7d, 0x80, 0x7e, 0x7b, 0x7f} },
-{ 0x8a00,      16,     {0x80, 0x8f, 0x82, 0x8e, 0x83, 0x74, 0x07, 0xf0, 0xef, 0x24, 0x01, 0xff, 0xe4, 0x3e, 0x90, 0x01} },
-{ 0x8a10,      16,     {0x31, 0xf0, 0xa3, 0xef, 0xf0, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xfe} },
-{ 0x8a20,      16,     {0xa3, 0xe0, 0x8e, 0x49, 0xf5, 0x4a, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xe0, 0x24, 0x9e, 0x60} },
-{ 0x8a30,      16,     {0x61, 0x24, 0xf9, 0x60, 0x0e, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8a, 0xdd, 0x24, 0x14, 0x60, 0x03} },
-{ 0x8a40,      16,     {0x02, 0x8b, 0x30, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3} },
-{ 0x8a50,      16,     {0xe4, 0x9f, 0xf5, 0x4c, 0x74, 0x01, 0x9e, 0xf5, 0x4b, 0xd3, 0xe5, 0x4c, 0x94, 0x40, 0xe5, 0x4b} },
-{ 0x8a60,      16,     {0x94, 0x00, 0x40, 0x06, 0x75, 0x4b, 0x00, 0x75, 0x4c, 0x40, 0xd3, 0xe5, 0x4a, 0x95, 0x4c, 0xe5} },
-{ 0x8a70,      16,     {0x49, 0x95, 0x4b, 0x50, 0x03, 0x02, 0x8b, 0x30, 0xae, 0x4b, 0xaf, 0x4c, 0x85, 0x48, 0x82, 0x85} },
-{ 0x8a80,      16,     {0x47, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x49, 0xf5, 0x4a, 0x02} },
-{ 0x8a90,      16,     {0x8b, 0x30, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x74} },
-{ 0x8aa0,      16,     {0x30, 0x9f, 0xf5, 0x4c, 0xe4, 0x9e, 0xf5, 0x4b, 0xd3, 0xe5, 0x4c, 0x94, 0x40, 0xe5, 0x4b, 0x94} },
-{ 0x8ab0,      16,     {0x00, 0x40, 0x06, 0x75, 0x4b, 0x00, 0x75, 0x4c, 0x40, 0xd3, 0xe5, 0x4a, 0x95, 0x4c, 0xe5, 0x49} },
-{ 0x8ac0,      16,     {0x95, 0x4b, 0x40, 0x6c, 0xae, 0x4b, 0xaf, 0x4c, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xa3, 0xa3} },
-{ 0x8ad0,      16,     {0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x49, 0xf5, 0x4a, 0x80, 0x53, 0x85, 0x48, 0x82} },
-{ 0x8ae0,      16,     {0x85, 0x47, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f, 0xf5, 0x4c, 0xe4, 0x9e} },
-{ 0x8af0,      16,     {0xf5, 0x4b, 0x45, 0x4c, 0x70, 0x07, 0xf5, 0x4b, 0x75, 0x4c, 0x40, 0x80, 0x11, 0xd3, 0xe5, 0x4c} },
-{ 0x8b00,      16,     {0x94, 0x40, 0xe5, 0x4b, 0x94, 0x00, 0x40, 0x06, 0x75, 0x4b, 0x00, 0x75, 0x4c, 0x40, 0xd3, 0xe5} },
-{ 0x8b10,      16,     {0x4a, 0x95, 0x4c, 0xe5, 0x49, 0x95, 0x4b, 0x40, 0x17, 0xae, 0x4b, 0xaf, 0x4c, 0x85, 0x48, 0x82} },
-{ 0x8b20,      16,     {0x85, 0x47, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x49, 0xf5, 0x4a} },
-{ 0x8b30,      16,     {0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xe0, 0x24, 0x9e, 0x70, 0x03, 0x02, 0x8b, 0xf0, 0x24, 0xf9} },
-{ 0x8b40,      16,     {0x60, 0x58, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8c, 0x40, 0x24, 0x14, 0x60, 0x03, 0x02, 0x8c, 0x84} },
-{ 0x8b50,      16,     {0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xd3, 0x94, 0xff, 0xee} },
-{ 0x8b60,      16,     {0x94, 0x00, 0x40, 0x03, 0x02, 0x8c, 0x84, 0x90, 0x01, 0x2c, 0xef, 0xf0, 0xe5, 0x4a, 0x15, 0x4a} },
-{ 0x8b70,      16,     {0xae, 0x49, 0x70, 0x02, 0x15, 0x49, 0x4e, 0x70, 0x03, 0x02, 0x8c, 0x84, 0x90, 0x01, 0x2c, 0xe0} },
-{ 0x8b80,      16,     {0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x31, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a} },
-{ 0x8b90,      16,     {0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83} },
-{ 0x8ba0,      16,     {0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x80, 0xee, 0x94, 0x00, 0x50, 0x03, 0x02, 0x8c} },
-{ 0x8bb0,      16,     {0x84, 0xd3, 0xef, 0x94, 0xff, 0xee, 0x94, 0x00, 0x40, 0x03, 0x02, 0x8c, 0x84, 0x90, 0x01, 0x2d} },
-{ 0x8bc0,      16,     {0xef, 0xf0, 0xe5, 0x4a, 0x15, 0x4a, 0xae, 0x49, 0x70, 0x02, 0x15, 0x49, 0x4e, 0x70, 0x03, 0x02} },
-{ 0x8bd0,      16,     {0x8c, 0x84, 0x90, 0x01, 0x2d, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x31} },
-{ 0x8be0,      16,     {0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2} },
-{ 0x8bf0,      16,     {0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x20, 0xee} },
-{ 0x8c00,      16,     {0x94, 0x00, 0x50, 0x03, 0x02, 0x8c, 0x84, 0xd3, 0xef, 0x94, 0x2f, 0xee, 0x94, 0x00, 0x50, 0x74} },
-{ 0x8c10,      16,     {0x90, 0x01, 0x2e, 0xef, 0xf0, 0xe5, 0x4a, 0x15, 0x4a, 0xae, 0x49, 0x70, 0x02, 0x15, 0x49, 0x4e} },
-{ 0x8c20,      16,     {0x60, 0x62, 0x90, 0x01, 0x2e, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x31} },
-{ 0x8c30,      16,     {0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd5} },
-{ 0x8c40,      16,     {0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xa3, 0xe0, 0xff, 0xa3, 0xe0, 0x90, 0x01, 0x2f, 0xcf, 0xf0} },
-{ 0x8c50,      16,     {0xa3, 0xef, 0xf0, 0xe5, 0x4a, 0x15, 0x4a, 0xae, 0x49, 0x70, 0x02, 0x15, 0x49, 0x4e, 0x60, 0x24} },
-{ 0x8c60,      16,     {0x90, 0x01, 0x2f, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0} },
-{ 0x8c70,      16,     {0xff, 0x90, 0x01, 0x31, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83} },
-{ 0x8c80,      16,     {0xef, 0xf0, 0x80, 0xcf, 0x85, 0x48, 0x82, 0x85, 0x47, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xa3, 0xe0} },
-{ 0x8c90,      6,      {0x90, 0x7f, 0xc3, 0xf0, 0x7f, 0x00} },
-{ 0x8c96,      1,      {0x22} },
-{ 0x8c97,      16,     {0x7e, 0x7b, 0x7f, 0x80, 0xef, 0x24, 0x01, 0xfd, 0xe4, 0x3e, 0xfc, 0x8f, 0x82, 0x8e, 0x83, 0x74} },
-{ 0x8ca7,      16,     {0x0b, 0xf0, 0x90, 0x20, 0x70, 0xe0, 0x54, 0xf0, 0xff, 0xc4, 0x54, 0x0f, 0x8d, 0x82, 0x8c, 0x83} },
-{ 0x8cb7,      16,     {0xf0, 0x90, 0x11, 0xf0, 0xe4, 0x93, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xf0, 0x90, 0x11, 0xf1, 0xe4} },
-{ 0x8cc7,      16,     {0x93, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3, 0xf0, 0xe4, 0x90, 0x01, 0x33, 0xf0, 0xa3, 0xf0, 0xa3} },
-{ 0x8cd7,      16,     {0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xed, 0x24, 0x03, 0xfe, 0xe4, 0x3c, 0xa3} },
-{ 0x8ce7,      16,     {0xf0, 0xa3, 0xce, 0xf0, 0x7e, 0x01, 0x7f, 0x33, 0x12, 0x19, 0xc1, 0x90, 0x7f, 0xc3, 0x74, 0x14} },
-{ 0x8cf7,      3,      {0xf0, 0x7f, 0x00} },
-{ 0x8cfa,      1,      {0x22} },
-{ 0x8cfb,      4,      {0x8e, 0x40, 0x8f, 0x41} },
-{ 0x8cff,      16,     {0x85, 0x40, 0x43, 0x85, 0x41, 0x44, 0x85, 0x44, 0x82, 0x85, 0x43, 0x83, 0xe0, 0x14, 0xb4, 0x0f} },
-{ 0x8d0f,      16,     {0x00, 0x40, 0x03, 0x02, 0x8e, 0x32, 0x90, 0x8d, 0x1c, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x8d, 0x49} },
-{ 0x8d1f,      16,     {0x02, 0x8d, 0x5a, 0x02, 0x8d, 0x6b, 0x02, 0x8d, 0x8e, 0x02, 0x8d, 0x9f, 0x02, 0x8d, 0xb0, 0x02} },
-{ 0x8d2f,      16,     {0x8d, 0xc0, 0x02, 0x8d, 0xcb, 0x02, 0x8d, 0xdb, 0x02, 0x8d, 0xeb, 0x02, 0x8d, 0xfb, 0x02, 0x8e} },
-{ 0x8d3f,      16,     {0x02, 0x02, 0x8e, 0x32, 0x02, 0x8e, 0x12, 0x02, 0x8e, 0x22, 0xe5, 0x44, 0x24, 0x01, 0xff, 0xe4} },
-{ 0x8d4f,      16,     {0x35, 0x43, 0xfe, 0x12, 0x82, 0xea, 0x8f, 0x42, 0x02, 0x8e, 0x32, 0xe5, 0x44, 0x24, 0x01, 0xff} },
-{ 0x8d5f,      16,     {0xe4, 0x35, 0x43, 0xfe, 0x12, 0x83, 0x9f, 0x8f, 0x42, 0x02, 0x8e, 0x32, 0xe5, 0x44, 0x24, 0x01} },
-{ 0x8d6f,      16,     {0xf5, 0x46, 0xe4, 0x35, 0x43, 0xf5, 0x45, 0xe5, 0x46, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x45, 0xfe} },
-{ 0x8d7f,      16,     {0x12, 0x84, 0x61, 0xaf, 0x46, 0xae, 0x45, 0x12, 0x84, 0xf4, 0x8f, 0x42, 0x02, 0x8e, 0x32, 0xe5} },
-{ 0x8d8f,      16,     {0x44, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x43, 0xfe, 0x12, 0x88, 0x92, 0x8f, 0x42, 0x02, 0x8e, 0x32} },
-{ 0x8d9f,      16,     {0xe5, 0x44, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x43, 0xfe, 0x12, 0x88, 0xce, 0x8f, 0x42, 0x02, 0x8e} },
-{ 0x8daf,      16,     {0x32, 0xe5, 0x44, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x43, 0xfe, 0x12, 0x89, 0x0a, 0x8f, 0x42, 0x80} },
-{ 0x8dbf,      16,     {0x72, 0xaf, 0x41, 0xae, 0x40, 0x12, 0x89, 0xf0, 0x8f, 0x42, 0x80, 0x67, 0xe5, 0x44, 0x24, 0x01} },
-{ 0x8dcf,      16,     {0xff, 0xe4, 0x35, 0x43, 0xfe, 0x12, 0x87, 0x96, 0x8f, 0x42, 0x80, 0x57, 0xe5, 0x44, 0x24, 0x01} },
-{ 0x8ddf,      16,     {0xff, 0xe4, 0x35, 0x43, 0xfe, 0x12, 0x84, 0x1d, 0x8f, 0x42, 0x80, 0x47, 0xe5, 0x44, 0x24, 0x01} },
-{ 0x8def,      16,     {0xff, 0xe4, 0x35, 0x43, 0xfe, 0x12, 0x88, 0x50, 0x8f, 0x42, 0x80, 0x37, 0x12, 0x8c, 0x97, 0x8f} },
-{ 0x8dff,      16,     {0x42, 0x80, 0x30, 0xe5, 0x44, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x43, 0xfe, 0x12, 0x11, 0xd8, 0x8f} },
-{ 0x8e0f,      16,     {0x42, 0x80, 0x20, 0xe5, 0x44, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x43, 0xfe, 0x12, 0x89, 0x42, 0x8f} },
-{ 0x8e1f,      16,     {0x42, 0x80, 0x10, 0xaf, 0x41, 0xae, 0x40, 0x7c, 0x02, 0x7d, 0x4d, 0x7b, 0x40, 0x12, 0x1b, 0x0c} },
-{ 0x8e2f,      5,      {0xe4, 0xf5, 0x42, 0xaf, 0x42} },
-{ 0x8e34,      1,      {0x22} },
-{ 0x8e35,      8,      {0x8f, 0x61, 0x8e, 0x60, 0x8d, 0x5f, 0x8c, 0x5e} },
-{ 0x8e3d,      16,     {0x75, 0x68, 0x01, 0x75, 0x69, 0x3b, 0xe4, 0xf5, 0x67, 0xaf, 0x63, 0x15, 0x63, 0xef, 0x70, 0x03} },
-{ 0x8e4d,      16,     {0x02, 0x8e, 0xd3, 0xaf, 0x62, 0xe4, 0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xaf, 0x61} },
-{ 0x8e5d,      16,     {0xae, 0x60, 0xad, 0x5f, 0xac, 0x5e, 0x12, 0x9b, 0x2e, 0xaf, 0x03, 0x8f, 0x66, 0xaf, 0x61, 0xae} },
-{ 0x8e6d,      16,     {0x60, 0xad, 0x5f, 0xac, 0x5e, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0xaf, 0x62, 0xe4} },
-{ 0x8e7d,      16,     {0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04} },
-{ 0x8e8d,      16,     {0x12, 0x9b, 0x2e, 0x8f, 0x61, 0x8e, 0x60, 0x8d, 0x5f, 0x8c, 0x5e, 0xe5, 0x66, 0x24, 0x30, 0xf5} },
-{ 0x8e9d,      16,     {0x66, 0xd3, 0x94, 0x39, 0x40, 0x06, 0x74, 0x07, 0x25, 0x66, 0xf5, 0x66, 0x05, 0x69, 0xe5, 0x69} },
-{ 0x8ead,      16,     {0xae, 0x68, 0x70, 0x02, 0x05, 0x68, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x05, 0x69, 0xe5} },
-{ 0x8ebd,      16,     {0x69, 0xae, 0x68, 0x70, 0x02, 0x05, 0x68, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x66, 0xf0, 0x05} },
-{ 0x8ecd,      16,     {0x67, 0x05, 0x67, 0x02, 0x8e, 0x46, 0xe5, 0x69, 0x15, 0x69, 0x70, 0x02, 0x15, 0x68, 0xaf, 0x67} },
-{ 0x8edd,      16,     {0x15, 0x67, 0xef, 0x60, 0x23, 0xe5, 0x69, 0x15, 0x69, 0xae, 0x68, 0x70, 0x02, 0x15, 0x68, 0xf5} },
-{ 0x8eed,      16,     {0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05, 0x65, 0xe5, 0x65, 0xac, 0x64, 0x70, 0x02, 0x05, 0x64, 0x14} },
-{ 0x8efd,      8,      {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x80, 0xd6} },
-{ 0x8f05,      1,      {0x22} },
-{ 0x8f06,      16,     {0xe4, 0x90, 0x01, 0x67, 0xf0, 0x7e, 0x01, 0x7f, 0x68, 0x90, 0x01, 0x5c, 0xee, 0xf0, 0xa3, 0xef} },
-{ 0x8f16,      10,     {0xf0, 0x90, 0x01, 0x60, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
-{ 0x8f20,      16,     {0xaa, 0x07, 0xa9, 0x05, 0x90, 0x01, 0x67, 0xe0, 0xc3, 0x94, 0x40, 0x50, 0x61, 0xac, 0x02, 0x74} },
-{ 0x8f30,      16,     {0x01, 0x7e, 0x00, 0xa8, 0x04, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff} },
-{ 0x8f40,      16,     {0xe4, 0xef, 0x55, 0x30, 0x60, 0x45, 0xea, 0x04, 0xff, 0x90, 0x01, 0x60, 0xe0, 0xfc, 0xa3, 0xe0} },
-{ 0x8f50,      16,     {0xfd, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0xa3, 0xe9, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} },
-{ 0x8f60,      16,     {0xeb, 0xf0, 0x90, 0x01, 0x60, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x9a, 0x8e, 0xfc, 0xd3, 0xe5, 0xf0} },
-{ 0x8f70,      16,     {0x94, 0x25, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0x60, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x68} },
-{ 0x8f80,      16,     {0xf0, 0xc2, 0xaf, 0x90, 0x01, 0x67, 0xe0, 0x04, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
-{ 0x8f90,      1,      {0x22} },
-{ 0x8f91,      16,     {0x90, 0x01, 0x67, 0xe0, 0xd3, 0x94, 0x00, 0x40, 0x55, 0x90, 0x01, 0x5c, 0xe0, 0xfc, 0xa3, 0xe0} },
-{ 0x8fa1,      16,     {0xaa, 0x04, 0xf9, 0x7b, 0x01, 0xc0, 0x03, 0xc0, 0x02, 0xc0, 0x01, 0xaa, 0x06, 0xa9, 0x07, 0xa8} },
-{ 0x8fb1,      16,     {0x01, 0xac, 0x02, 0xad, 0x03, 0xd0, 0x01, 0xd0, 0x02, 0xd0, 0x03, 0x7e, 0x00, 0x7f, 0x03, 0x12} },
-{ 0x8fc1,      16,     {0x9a, 0x1f, 0x90, 0x01, 0x5c, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x9a, 0x8e, 0xfc, 0xd3, 0xe5, 0xf0} },
-{ 0x8fd1,      16,     {0x94, 0x25, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0x5c, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x68} },
-{ 0x8fe1,      16,     {0xf0, 0xc2, 0xaf, 0x90, 0x01, 0x67, 0xe0, 0x14, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} },
-{ 0x8ff1,      1,      {0x22} },
-{ 0x8ff2,      16,     {0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x5e, 0x7e, 0x7b, 0x7f, 0x80, 0x75, 0x63, 0x7b, 0x75, 0x64} },
-{ 0x9002,      16,     {0x80, 0xe5, 0x64, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x63, 0xa9, 0x07, 0x7b, 0x01, 0x8b, 0x65, 0xf5} },
-{ 0x9012,      16,     {0x66, 0x89, 0x67, 0xfe, 0x12, 0x8f, 0x91, 0xef, 0x60, 0x3b, 0xab, 0x65, 0xaa, 0x66, 0xa9, 0x67} },
-{ 0x9022,      16,     {0x12, 0x9a, 0x48, 0x14, 0xff, 0x90, 0x00, 0x01, 0x12, 0x9a, 0x61, 0xb4, 0x02, 0x16, 0xc2, 0xaf} },
-{ 0x9032,      16,     {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x44} },
-{ 0x9042,      16,     {0x04, 0xf0, 0xd2, 0xaf, 0x85, 0x64, 0x82, 0x85, 0x63, 0x83, 0x74, 0x0d, 0xf0, 0x90, 0x7f, 0xc3} },
-{ 0x9052,      5,      {0x74, 0x04, 0xf0, 0xd2, 0xaf} },
-{ 0x9057,      1,      {0x22} },
-{ 0x9058,      16,     {0x12, 0x8f, 0xf2, 0xe4, 0xf5, 0x5e, 0x74, 0x36, 0x25, 0x5e, 0xf8, 0xe6, 0x54, 0xf0, 0xf5, 0x5f} },
-{ 0x9068,      16,     {0x74, 0x63, 0x25, 0x5e, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83, 0xe0, 0x65, 0x5f, 0xff, 0xc4} },
-{ 0x9078,      16,     {0x54, 0x0f, 0xf5, 0x60, 0x60, 0x22, 0x74, 0x63, 0x25, 0x5e, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5} },
-{ 0x9088,      16,     {0x83, 0xe5, 0x5f, 0xf0, 0xaf, 0x5e, 0x7d, 0x01, 0xe5, 0x5f, 0x45, 0x60, 0xfb, 0x12, 0x8f, 0x20} },
-{ 0x9098,      16,     {0xef, 0x70, 0x05, 0x12, 0x8f, 0xf2, 0x80, 0xec, 0x05, 0x5e, 0xe5, 0x5e, 0xc3, 0x94, 0x04, 0x40} },
-{ 0x90a8,      16,     {0xb5, 0x12, 0x8f, 0xf2, 0xe5, 0x3a, 0x60, 0x48, 0xe4, 0xf5, 0x5e, 0xaf, 0x5e, 0x74, 0x01, 0xa8} },
-{ 0x90b8,      16,     {0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x5f, 0x55, 0x3a, 0x60, 0x29, 0xe5, 0x5e} },
-{ 0x90c8,      16,     {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x30, 0xe6} },
-{ 0x90d8,      16,     {0x16, 0xaf, 0x5e, 0x7d, 0x04, 0x7b, 0x80, 0x12, 0x8f, 0x20, 0xef, 0x70, 0x05, 0x12, 0x8f, 0xf2} },
-{ 0x90e8,      16,     {0x80, 0xef, 0xe5, 0x5f, 0xf4, 0x52, 0x3a, 0x05, 0x5e, 0xe5, 0x5e, 0xc3, 0x94, 0x04, 0x40, 0xbb} },
-{ 0x90f8,      16,     {0x90, 0x02, 0x9e, 0xe0, 0x60, 0x03, 0x02, 0x91, 0xc5, 0x74, 0x19, 0xf0, 0x7f, 0x02, 0x12, 0x81} },
-{ 0x9108,      16,     {0x11, 0x8e, 0x61, 0x8f, 0x62, 0xc3, 0xe5, 0x61, 0x64, 0x80, 0x94, 0x80, 0x40, 0xee, 0x90, 0x01} },
-{ 0x9118,      16,     {0x5b, 0xe0, 0x65, 0x62, 0xf0, 0x60, 0x37, 0xe4, 0xf5, 0x5e, 0xaf, 0x5e, 0x74, 0x01, 0xa8, 0x07} },
-{ 0x9128,      16,     {0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x5f, 0x90, 0x01, 0x5b, 0xe0, 0x55, 0x5f, 0x60} },
-{ 0x9138,      16,     {0x14, 0xaf, 0x5e, 0x7d, 0x08, 0xe5, 0x5f, 0x55, 0x62, 0xfb, 0x12, 0x8f, 0x20, 0xef, 0x70, 0x05} },
-{ 0x9148,      16,     {0x12, 0x8f, 0xf2, 0x80, 0xec, 0x05, 0x5e, 0xe5, 0x5e, 0xc3, 0x94, 0x04, 0x40, 0xcc, 0x90, 0x01} },
-{ 0x9158,      16,     {0x5b, 0xe5, 0x62, 0xf0, 0xe4, 0xf5, 0x5e, 0xc2, 0xaf, 0x74, 0x32, 0x25, 0x5e, 0xf8, 0xe6, 0xf5} },
-{ 0x9168,      16,     {0x5f, 0xe4, 0xf6, 0xd2, 0xaf, 0x53, 0x5f, 0x1e, 0xe5, 0x5f, 0x60, 0x11, 0xaf, 0x5e, 0x7d, 0x02} },
-{ 0x9178,      16,     {0xab, 0x5f, 0x12, 0x8f, 0x20, 0xef, 0x70, 0x05, 0x12, 0x8f, 0xf2, 0x80, 0xef, 0x74, 0x2c, 0x25} },
-{ 0x9188,      16,     {0x5e, 0xf8, 0xe6, 0xf5, 0x5f, 0x74, 0x9a, 0x25, 0x5e, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83} },
-{ 0x9198,      16,     {0xe0, 0x65, 0x5f, 0x60, 0x11, 0xaf, 0x5e, 0x7d, 0x04, 0xab, 0x5f, 0x12, 0x8f, 0x20, 0xef, 0x70} },
-{ 0x91a8,      16,     {0x05, 0x12, 0x8f, 0xf2, 0x80, 0xef, 0x74, 0x9a, 0x25, 0x5e, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5} },
-{ 0x91b8,      16,     {0x83, 0xe5, 0x5f, 0xf0, 0x05, 0x5e, 0xe5, 0x5e, 0xc3, 0x94, 0x04, 0x40, 0x9a, 0x12, 0x8f, 0xf2} },
-{ 0x91c8,      1,      {0x22} },
-{ 0x91c9,      12,     {0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x6e, 0x02, 0x92, 0x10} },
-{ 0x91d5,      16,     {0x02, 0x05, 0x28, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2} },
-{ 0x91e5,      16,     {0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33} },
-{ 0x91f5,      16,     {0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf} },
-{ 0x9205,      16,     {0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x92, 0x55, 0xe4, 0x7e} },
-{ 0x9215,      16,     {0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93} },
-{ 0x9225,      16,     {0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3} },
-{ 0x9235,      16,     {0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca} },
-{ 0x9245,      16,     {0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe} },
-{ 0x9255,      16,     {0x60, 0x24, 0x02, 0x28, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x81, 0x82, 0x84, 0x88} },
-{ 0x9265,      16,     {0x90, 0xa0, 0xc0, 0xc1, 0xc2, 0xc4, 0xc8, 0xd0, 0xe0, 0xe1, 0xe2, 0xe4, 0xe8, 0xf0, 0xf1, 0xf2} },
-{ 0x9275,      8,      {0xf4, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xfe, 0xff} },
-{ 0x927d,      1,      {0x00} },
-{ 0x927e,      11,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x18} },
-{ 0x9289,      16,     {0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xfe, 0x30, 0xe0, 0x05, 0x90, 0x20, 0x02, 0xe0, 0xff, 0xee} },
-{ 0x9299,      16,     {0x30, 0xe1, 0x05, 0x90, 0x20, 0x0a, 0xe0, 0xff, 0xee, 0x30, 0xe2, 0x05, 0x90, 0x20, 0x12, 0xe0} },
-{ 0x92a9,      16,     {0xff, 0xee, 0x30, 0xe3, 0x05, 0x90, 0x20, 0x1a, 0xe0, 0xff, 0x90, 0x01, 0x62, 0xe0, 0xb5, 0x1e} },
-{ 0x92b9,      10,     {0x04, 0xe4, 0xf0, 0x80, 0x05, 0x90, 0x01, 0x62, 0xee, 0xf0} },
-{ 0x92c3,      9,      {0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x92cc,      2,      {0xa9, 0x03} },
-{ 0x92ce,      16,     {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xe5} },
-{ 0x92de,      16,     {0x6c, 0x45, 0x6d, 0xf5, 0x6e, 0xe9, 0x60, 0x14, 0x8a, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82} },
-{ 0x92ee,      16,     {0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x4d, 0xf0, 0xe4, 0xfe, 0x80, 0x13, 0xeb, 0x24, 0x04, 0xf5} },
-{ 0x92fe,      16,     {0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0xff, 0xed, 0xf4, 0xfc, 0xef, 0x5c, 0xf0, 0xae, 0x6e, 0xeb} },
-{ 0x930e,      16,     {0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0x55, 0x6e, 0xfc, 0xb5, 0x06, 0x03, 0xaf} },
-{ 0x931e,      16,     {0x05, 0x22, 0xe5, 0x6c, 0x5c, 0xfe, 0xe5, 0x6d, 0x5c, 0xfd, 0xe9, 0x60, 0x16, 0xee, 0x70, 0x04} },
-{ 0x932e,      16,     {0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xae, 0x07, 0xed, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f} },
-{ 0x933e,      16,     {0x00, 0xad, 0x07, 0xee, 0x60, 0x03, 0xaf, 0x6c, 0x22, 0xed, 0x60, 0x03, 0xaf, 0x6d, 0x22, 0x7f} },
-{ 0x934e,      1,      {0x00} },
-{ 0x934f,      1,      {0x22} },
-{ 0x9350,      16,     {0x7e, 0x7b, 0x7f, 0x80, 0xef, 0x24, 0x01, 0xf5, 0x66, 0xe4, 0x3e, 0xf5, 0x65, 0x75, 0x63, 0x02} },
-{ 0x9360,      16,     {0x75, 0x64, 0x4e, 0x8f, 0x82, 0x8e, 0x83, 0x74, 0x0f, 0xf0, 0x85, 0x64, 0x82, 0x85, 0x63, 0x83} },
-{ 0x9370,      16,     {0xe0, 0x85, 0x66, 0x82, 0x85, 0x65, 0x83, 0xf0, 0x85, 0x64, 0x82, 0x85, 0x63, 0x83, 0xa3, 0xe0} },
-{ 0x9380,      16,     {0x85, 0x66, 0x82, 0x85, 0x65, 0x83, 0xa3, 0xf0, 0x85, 0x66, 0x82, 0x85, 0x65, 0x83, 0xa3, 0xa3} },
-{ 0x9390,      16,     {0x74, 0xff, 0xf0, 0xe5, 0x66, 0x24, 0x03, 0xf5, 0x68, 0xe4, 0x35, 0x65, 0xf5, 0x67, 0x85, 0x64} },
-{ 0x93a0,      16,     {0x82, 0x85, 0x63, 0x83, 0xe0, 0x14, 0xb4, 0x0b, 0x00, 0x40, 0x03, 0x02, 0x98, 0x43, 0x90, 0x93} },
-{ 0x93b0,      16,     {0xb5, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x93, 0xd6, 0x02, 0x94, 0x7c, 0x02, 0x95, 0xba, 0x02, 0x95} },
-{ 0x93c0,      16,     {0xda, 0x02, 0x95, 0xda, 0x02, 0x96, 0x7f, 0x02, 0x96, 0xbd, 0x02, 0x96, 0xe4, 0x02, 0x97, 0xa6} },
-{ 0x93d0,      16,     {0x02, 0x97, 0xda, 0x02, 0x98, 0x0b, 0xe4, 0xf5, 0x5e, 0xe5, 0x5e, 0x75, 0xf0, 0x08, 0xa4, 0x24} },
-{ 0x93e0,      16,     {0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x61, 0x8f, 0x62, 0xe4, 0xff, 0xe4, 0xfe} },
-{ 0x93f0,      16,     {0xef, 0x60, 0x10, 0x74, 0x28, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf4, 0xf5} },
-{ 0x9400,      16,     {0x5f, 0x80, 0x0d, 0x74, 0x28, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf5, 0x5f} },
-{ 0x9410,      16,     {0xe5, 0x62, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x61, 0xf5, 0x83, 0xe5, 0x5f, 0xf0, 0xe0, 0xf5} },
-{ 0x9420,      16,     {0x60, 0x65, 0x5f, 0x60, 0x3d, 0x85, 0x66, 0x82, 0x85, 0x65, 0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0xe5} },
-{ 0x9430,      16,     {0x5e, 0x04, 0xfd, 0x05, 0x68, 0xe5, 0x68, 0xaa, 0x67, 0x70, 0x02, 0x05, 0x67, 0x14, 0xf5, 0x82} },
-{ 0x9440,      16,     {0x8a, 0x83, 0xed, 0xf0, 0x05, 0x68, 0xe5, 0x68, 0xac, 0x67, 0x70, 0x02, 0x05, 0x67, 0x14, 0xf5} },
-{ 0x9450,      16,     {0x82, 0x8c, 0x83, 0xe5, 0x5f, 0xf0, 0x85, 0x68, 0x82, 0x85, 0x67, 0x83, 0xe5, 0x60, 0xf0, 0x02} },
-{ 0x9460,      16,     {0x98, 0x4e, 0x0e, 0xee, 0x64, 0x24, 0x70, 0x88, 0x0f, 0xef, 0x64, 0x02, 0x70, 0x80, 0x05, 0x5e} },
-{ 0x9470,      16,     {0xe5, 0x5e, 0x64, 0x04, 0x60, 0x03, 0x02, 0x93, 0xd9, 0x02, 0x98, 0x4e, 0x7e, 0x20, 0x7f, 0x00} },
-{ 0x9480,      16,     {0x75, 0x61, 0x20, 0x75, 0x62, 0x00, 0xe4, 0xf5, 0x5e, 0xaf, 0x62, 0xae, 0x61, 0xe4, 0xfd, 0x12} },
-{ 0x9490,      16,     {0x81, 0xe0, 0x74, 0x08, 0x25, 0x62, 0xf5, 0x62, 0xe4, 0x35, 0x61, 0xf5, 0x61, 0x05, 0x5e, 0xe5} },
-{ 0x94a0,      16,     {0x5e, 0xd3, 0x94, 0x03, 0x40, 0xe3, 0x90, 0x00, 0x04, 0x74, 0x92, 0xf0, 0xa3, 0x74, 0x7e, 0xf0} },
-{ 0x94b0,      16,     {0xe4, 0xf5, 0x60, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x61, 0x20, 0x75, 0x62, 0x00, 0xf5, 0x5e, 0xaf} },
-{ 0x94c0,      16,     {0x5e, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x5f, 0x90, 0x01} },
-{ 0x94d0,      16,     {0x62, 0xf0, 0x90, 0x01, 0x5e, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x85, 0x62, 0x82, 0x85, 0x61} },
-{ 0x94e0,      16,     {0x83, 0xa3, 0x74, 0x02, 0xf0, 0x90, 0x01, 0x62, 0xe0, 0x65, 0x5f, 0x70, 0x39, 0x90, 0x01, 0x5e} },
-{ 0x94f0,      16,     {0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xee, 0x85, 0x66, 0x82, 0x85, 0x65, 0x83, 0xa3, 0xa3, 0xf0} },
-{ 0x9500,      16,     {0xe5, 0x5e, 0x04, 0xff, 0x05, 0x68, 0xe5, 0x68, 0xac, 0x67, 0x70, 0x02, 0x05, 0x67, 0x14, 0xf5} },
-{ 0x9510,      16,     {0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x68, 0x82, 0x85, 0x67, 0x83, 0x74, 0xff, 0xf0, 0xe4, 0x90} },
-{ 0x9520,      16,     {0x01, 0x62, 0xf0, 0x75, 0x60, 0xff, 0x90, 0x01, 0x62, 0xe0, 0xff, 0x60, 0x3c, 0x85, 0x66, 0x82} },
-{ 0x9530,      16,     {0x85, 0x65, 0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0xe5, 0x5e, 0x04, 0xfe, 0x05, 0x68, 0xe5, 0x68, 0xac} },
-{ 0x9540,      16,     {0x67, 0x70, 0x02, 0x05, 0x67, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xee, 0xf0, 0x05, 0x68, 0xe5, 0x68} },
-{ 0x9550,      16,     {0xac, 0x67, 0x70, 0x02, 0x05, 0x67, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x68, 0x82} },
-{ 0x9560,      16,     {0x85, 0x67, 0x83, 0xe5, 0x5f, 0xf0, 0x75, 0x60, 0xff, 0xe5, 0x60, 0x70, 0x16, 0x74, 0x08, 0x25} },
-{ 0x9570,      16,     {0x62, 0xf5, 0x62, 0xe4, 0x35, 0x61, 0xf5, 0x61, 0x05, 0x5e, 0xe5, 0x5e, 0x64, 0x04, 0x60, 0x03} },
-{ 0x9580,      16,     {0x02, 0x94, 0xbf, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x61, 0x20, 0x75, 0x62, 0x00, 0xe4, 0xf5, 0x5e} },
-{ 0x9590,      16,     {0xaf, 0x62, 0xae, 0x61, 0x7d, 0x01, 0x12, 0x81, 0xe0, 0x74, 0x08, 0x25, 0x62, 0xf5, 0x62, 0xe4} },
-{ 0x95a0,      16,     {0x35, 0x61, 0xf5, 0x61, 0x05, 0x5e, 0xe5, 0x5e, 0xd3, 0x94, 0x03, 0x40, 0xe3, 0x90, 0x00, 0x04} },
-{ 0x95b0,      16,     {0x74, 0x13, 0xf0, 0xa3, 0x74, 0x12, 0xf0, 0x02, 0x98, 0x4e, 0x85, 0x64, 0x82, 0x85, 0x63, 0x83} },
-{ 0x95c0,      16,     {0xa3, 0xe0, 0x14, 0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x90} },
-{ 0x95d0,      16,     {0x02, 0x95, 0xf0, 0x90, 0x01, 0x62, 0xf0, 0x02, 0x98, 0x4e, 0x90, 0x01, 0x5e, 0x74, 0x03, 0xf0} },
-{ 0x95e0,      16,     {0xa3, 0x74, 0xe8, 0xf0, 0xe4, 0xf5, 0x60, 0x90, 0x02, 0x95, 0xe0, 0xff, 0x90, 0x01, 0x62, 0xe0} },
-{ 0x95f0,      16,     {0xb5, 0x07, 0x1e, 0x90, 0x01, 0x5e, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xea, 0x85, 0x66, 0x82} },
-{ 0x9600,      16,     {0x85, 0x65, 0x83, 0xa3, 0xa3, 0xf0, 0x85, 0x68, 0x82, 0x85, 0x67, 0x83, 0x74, 0xff, 0xf0, 0xf5} },
-{ 0x9610,      16,     {0x60, 0xe5, 0x60, 0x60, 0x03, 0x02, 0x98, 0x4e, 0x90, 0x01, 0x5e, 0xf0, 0xa3, 0x74, 0x96, 0xf0} },
-{ 0x9620,      16,     {0x90, 0x01, 0x5e, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xf6, 0x7f, 0x02, 0x12, 0x81, 0x11, 0xc3} },
-{ 0x9630,      16,     {0xee, 0x64, 0x80, 0x94, 0x80, 0x40, 0xf3, 0xef, 0x54, 0x0f, 0xf5, 0x60, 0x90, 0x02, 0x95, 0xe0} },
-{ 0x9640,      16,     {0x55, 0x60, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x8f, 0x5f, 0x85, 0x64, 0x82, 0x85} },
-{ 0x9650,      16,     {0x63, 0x83, 0xe0, 0xb4, 0x05, 0x0c, 0xe5, 0x5f, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00} },
-{ 0x9660,      16,     {0x8f, 0x5f, 0xe5, 0x5f, 0x70, 0x03, 0x02, 0x98, 0x4e, 0x85, 0x66, 0x82, 0x85, 0x65, 0x83, 0xa3} },
-{ 0x9670,      16,     {0xa3, 0xe4, 0xf0, 0x85, 0x68, 0x82, 0x85, 0x67, 0x83, 0xe5, 0x60, 0xf0, 0x02, 0x98, 0x4e, 0x7e} },
-{ 0x9680,      16,     {0x20, 0x7f, 0x00, 0x75, 0x61, 0x20, 0x75, 0x62, 0x00, 0xaf, 0x62, 0xae, 0x61, 0xe4, 0xfd, 0x12} },
-{ 0x9690,      16,     {0x81, 0xe0, 0x85, 0x62, 0x82, 0x85, 0x61, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x80, 0xf0, 0x85} },
-{ 0x96a0,      16,     {0x62, 0x82, 0x85, 0x61, 0x83, 0x74, 0x01, 0xf0, 0xa3, 0xe4, 0xf0, 0x85, 0x62, 0x82, 0x85, 0x61} },
-{ 0x96b0,      16,     {0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0xd2, 0x04, 0x02, 0x98, 0x4e, 0xc2, 0x04, 0x7e} },
-{ 0x96c0,      16,     {0x20, 0x7f, 0x00, 0x75, 0x61, 0x20, 0x75, 0x62, 0x00, 0xe5, 0x62, 0x24, 0x05, 0xf5, 0x82, 0xe4} },
-{ 0x96d0,      16,     {0x35, 0x61, 0xf5, 0x83, 0xe0, 0x30, 0xe6, 0xf1, 0xaf, 0x62, 0xae, 0x61, 0x7d, 0x01, 0x12, 0x81} },
-{ 0x96e0,      16,     {0xe0, 0x02, 0x98, 0x4e, 0xe4, 0xf5, 0x60, 0xf5, 0x5e, 0xe5, 0x5e, 0x75, 0xf0, 0x08, 0xa4, 0x24} },
-{ 0x96f0,      16,     {0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x61, 0x8f, 0x62, 0xfe, 0xe4, 0xfd, 0x12} },
-{ 0x9700,      16,     {0x81, 0xe0, 0xe5, 0x62, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x61, 0xf5, 0x83, 0xe0, 0x54, 0xfc} },
-{ 0x9710,      16,     {0xf0, 0xaf, 0x5e, 0x7d, 0x01, 0x7b, 0x01, 0x75, 0x6c, 0x80, 0x75, 0x6d, 0x40, 0x12, 0x92, 0xcc} },
-{ 0x9720,      16,     {0x8f, 0x60, 0xe5, 0x60, 0x70, 0x11, 0xaf, 0x5e, 0x7d, 0x02, 0x7b, 0x01, 0x75, 0x6c, 0x10, 0x75} },
-{ 0x9730,      16,     {0x6d, 0x20, 0x12, 0x92, 0xcc, 0x8f, 0x60, 0xe5, 0x60, 0x70, 0x10, 0xaf, 0x5e, 0x7d, 0x01, 0xfb} },
-{ 0x9740,      16,     {0x75, 0x6c, 0x80, 0x75, 0x6d, 0x40, 0x12, 0x92, 0xcc, 0x8f, 0x60, 0xe5, 0x60, 0x70, 0x10, 0xaf} },
-{ 0x9750,      16,     {0x5e, 0x7d, 0x02, 0xfb, 0x75, 0x6c, 0x10, 0x75, 0x6d, 0x20, 0x12, 0x92, 0xcc, 0x8f, 0x60, 0xaf} },
-{ 0x9760,      16,     {0x62, 0xae, 0x61, 0x7d, 0x01, 0x12, 0x81, 0xe0, 0xe5, 0x60, 0x60, 0x2b, 0x85, 0x66, 0x82, 0x85} },
-{ 0x9770,      16,     {0x65, 0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0xe5, 0x5e, 0x04, 0xff, 0x05, 0x68, 0xe5, 0x68, 0xac, 0x67} },
-{ 0x9780,      16,     {0x70, 0x02, 0x05, 0x67, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x68, 0x82, 0x85, 0x67} },
-{ 0x9790,      16,     {0x83, 0xe5, 0x60, 0xf0, 0x02, 0x98, 0x4e, 0x05, 0x5e, 0xe5, 0x5e, 0xd3, 0x94, 0x03, 0x50, 0x03} },
-{ 0x97a0,      16,     {0x02, 0x96, 0xe9, 0x02, 0x98, 0x4e, 0xe4, 0x90, 0x02, 0xd3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3} },
-{ 0x97b0,      16,     {0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x98, 0xf0, 0xa3, 0x74, 0x6d, 0xf0, 0x7e} },
-{ 0x97c0,      16,     {0x02, 0x7f, 0xd3, 0x12, 0x80, 0x00, 0xef, 0x64, 0x08, 0x70, 0x03, 0x02, 0x98, 0x4e, 0x85, 0x66} },
-{ 0x97d0,      16,     {0x82, 0x85, 0x65, 0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0x80, 0x74, 0xe4, 0x90, 0x02, 0xd3, 0xf0, 0xa3} },
-{ 0x97e0,      16,     {0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0xe5, 0x67, 0xf0, 0xa3} },
-{ 0x97f0,      16,     {0xe5, 0x68, 0xf0, 0x7e, 0x02, 0x7f, 0xd3, 0x12, 0x19, 0xc1, 0xef, 0x64, 0x08, 0x60, 0x4f, 0x85} },
-{ 0x9800,      16,     {0x66, 0x82, 0x85, 0x65, 0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0x80, 0x43, 0xe4, 0x90, 0x02, 0xd3, 0xf0} },
-{ 0x9810,      16,     {0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xe5, 0x64, 0x24, 0x02} },
-{ 0x9820,      16,     {0x90, 0x02, 0xda, 0xf0, 0xe4, 0x35, 0x63, 0x90, 0x02, 0xd9, 0xf0, 0x7e, 0x02, 0x7f, 0xd3, 0x12} },
-{ 0x9830,      16,     {0x80, 0x00, 0xef, 0x64, 0x08, 0x60, 0x17, 0x85, 0x66, 0x82, 0x85, 0x65, 0x83, 0xa3, 0xa3, 0xe4} },
-{ 0x9840,      16,     {0xf0, 0x80, 0x0b, 0x85, 0x66, 0x82, 0x85, 0x65, 0x83, 0xa3, 0xa3, 0x74, 0x01, 0xf0, 0x90, 0x01} },
-{ 0x9850,      16,     {0x5e, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x90, 0x01, 0x5e, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70} },
-{ 0x9860,      12,     {0xf6, 0x90, 0x7f, 0xc3, 0x74, 0x24, 0xf0, 0xe4, 0x90, 0x02, 0x4d, 0xf0} },
-{ 0x986c,      1,      {0x22} },
-{ 0x986d,      16,     {0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0} },
-{ 0x987d,      16,     {0xe4, 0xfd, 0x74, 0x01, 0x7e, 0x00, 0xa8, 0x05, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce} },
-{ 0x988d,      16,     {0xd8, 0xf9, 0xff, 0xe5, 0x3b, 0xfb, 0xe4, 0xef, 0x5b, 0x70, 0x03, 0x02, 0x99, 0x45, 0xed, 0x75} },
-{ 0x989d,      16,     {0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0xf5, 0x83, 0xe5} },
-{ 0x98ad,      16,     {0x82, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0x60, 0x64, 0x60, 0x60} },
-{ 0x98bd,      16,     {0x03, 0x02, 0x99, 0x45, 0xef, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0xfc, 0x74} },
-{ 0x98cd,      16,     {0x36, 0x2d, 0xf8, 0xec, 0xf6, 0x30, 0xe5, 0x70, 0x74, 0x96, 0x2d, 0xf5, 0x82, 0xe4, 0x34, 0x02} },
-{ 0x98dd,      16,     {0xf5, 0x83, 0xe0, 0x60, 0x63, 0xed, 0x25, 0xe0, 0x24, 0x8d, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5} },
-{ 0x98ed,      16,     {0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9a, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0, 0x8f, 0x82} },
-{ 0x98fd,      16,     {0x8e, 0x83, 0xf0, 0x74, 0x96, 0x2d, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x14, 0xf0} },
-{ 0x990d,      16,     {0x70, 0x36, 0xed, 0x25, 0xe0, 0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0} },
-{ 0x991d,      16,     {0xed, 0x25, 0xe0, 0xff, 0xc3, 0x74, 0x0c, 0x9f, 0x75, 0xf0, 0x40, 0xa4, 0x24, 0x40, 0xf5, 0x82} },
-{ 0x992d,      16,     {0xe5, 0xf0, 0x34, 0x7b, 0xaf, 0x82, 0xfe, 0xed, 0x25, 0xe0, 0x24, 0x8d, 0xf5, 0x82, 0xe4, 0x34} },
-{ 0x993d,      16,     {0x02, 0xf5, 0x83, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x0d, 0xed, 0x64, 0x04, 0x60, 0x03, 0x02, 0x98} },
-{ 0x994d,      1,      {0x7f} },
-{ 0x994e,      1,      {0x22} },
-{ 0x994f,      16,     {0xe7, 0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e} },
-{ 0x995f,      16,     {0x88, 0x82, 0x8c, 0x83, 0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08} },
-{ 0x996f,      16,     {0xdf, 0xfa, 0x80, 0x78, 0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83} },
-{ 0x997f,      16,     {0xe3, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08} },
-{ 0x998f,      16,     {0xdf, 0xfa, 0x80, 0x58, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x4c} },
-{ 0x999f,      16,     {0x80, 0xd2, 0x80, 0xfa, 0x80, 0xc6, 0x80, 0xd4, 0x80, 0x69, 0x80, 0xf2, 0x80, 0x33, 0x80, 0x10} },
-{ 0x99af,      16,     {0x80, 0xa6, 0x80, 0xea, 0x80, 0x9a, 0x80, 0xa8, 0x80, 0xda, 0x80, 0xe2, 0x80, 0xca, 0x80, 0x33} },
-{ 0x99bf,      16,     {0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83} },
-{ 0x99cf,      16,     {0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xe9, 0xde, 0xe7, 0x80} },
-{ 0x99df,      16,     {0x0d, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf6, 0x08, 0xdf, 0xf9, 0xec, 0xfa, 0xa9, 0xf0} },
-{ 0x99ef,      16,     {0xed, 0xfb, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc} },
-{ 0x99ff,      16,     {0xc5, 0x83, 0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xea, 0xde} },
-{ 0x9a0f,      16,     {0xe8, 0x80, 0xdb, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf2, 0x08, 0xdf, 0xf9, 0x80, 0xcc} },
-{ 0x9a1f,      16,     {0x88, 0xf0, 0xed, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xc2, 0xf5, 0x82, 0xeb, 0x24, 0x02, 0xb4} },
-{ 0x9a2f,      16,     {0x04, 0x00, 0x50, 0xb8, 0x23, 0x23, 0x45, 0x82, 0xf5, 0x82, 0xef, 0x4e, 0x60, 0xae, 0xef, 0x60} },
-{ 0x9a3f,      9,      {0x01, 0x0e, 0xe5, 0x82, 0x23, 0x90, 0x99, 0x9f, 0x73} },
-{ 0x9a48,      16,     {0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02} },
-{ 0x9a58,      9,      {0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22} },
-{ 0x9a61,      16,     {0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50} },
-{ 0x9a71,      16,     {0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22} },
-{ 0x9a81,      13,     {0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22} },
-{ 0x9a8e,      16,     {0xc5, 0xf0, 0xf8, 0xa3, 0xe0, 0x28, 0xf0, 0xc5, 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02} },
-{ 0x9a9e,      6,      {0x15, 0x83, 0xe0, 0x38, 0xf0, 0x22} },
-{ 0x9aa4,      16,     {0xa3, 0xf8, 0xe0, 0xc5, 0xf0, 0x25, 0xf0, 0xf0, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, 0x15, 0x83} },
-{ 0x9ab4,      6,      {0xe0, 0xc8, 0x38, 0xf0, 0xe8, 0x22} },
-{ 0x9aba,      16,     {0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0} },
-{ 0x9aca,      16,     {0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe} },
-{ 0x9ada,      16,     {0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83} },
-{ 0x9aea,      8,      {0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22} },
-{ 0x9af2,      16,     {0x75, 0xf0, 0x08, 0x75, 0x82, 0x00, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xcd, 0x33, 0xcd, 0xcc} },
-{ 0x9b02,      16,     {0x33, 0xcc, 0xc5, 0x82, 0x33, 0xc5, 0x82, 0x9b, 0xed, 0x9a, 0xec, 0x99, 0xe5, 0x82, 0x98, 0x40} },
-{ 0x9b12,      16,     {0x0c, 0xf5, 0x82, 0xee, 0x9b, 0xfe, 0xed, 0x9a, 0xfd, 0xec, 0x99, 0xfc, 0x0f, 0xd5, 0xf0, 0xd6} },
-{ 0x9b22,      16,     {0xe4, 0xce, 0xfb, 0xe4, 0xcd, 0xfa, 0xe4, 0xcc, 0xf9, 0xa8, 0x82, 0x22, 0xb8, 0x00, 0xc1, 0xb9} },
-{ 0x9b32,      16,     {0x00, 0x59, 0xba, 0x00, 0x2d, 0xec, 0x8b, 0xf0, 0x84, 0xcf, 0xce, 0xcd, 0xfc, 0xe5, 0xf0, 0xcb} },
-{ 0x9b42,      16,     {0xf9, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc, 0xeb} },
-{ 0x9b52,      16,     {0x33, 0xfb, 0x10, 0xd7, 0x03, 0x99, 0x40, 0x04, 0xeb, 0x99, 0xfb, 0x0f, 0xd8, 0xe5, 0xe4, 0xf9} },
-{ 0x9b62,      16,     {0xfa, 0x22, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc} },
-{ 0x9b72,      16,     {0xc9, 0x33, 0xc9, 0x10, 0xd7, 0x05, 0x9b, 0xe9, 0x9a, 0x40, 0x07, 0xec, 0x9b, 0xfc, 0xe9, 0x9a} },
-{ 0x9b82,      16,     {0xf9, 0x0f, 0xd8, 0xe0, 0xe4, 0xc9, 0xfa, 0xe4, 0xcc, 0xfb, 0x22, 0x75, 0xf0, 0x10, 0xef, 0x2f} },
-{ 0x9b92,      16,     {0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xcc, 0x33, 0xcc, 0xc8, 0x33, 0xc8, 0x10, 0xd7, 0x07} },
-{ 0x9ba2,      16,     {0x9b, 0xec, 0x9a, 0xe8, 0x99, 0x40, 0x0a, 0xed, 0x9b, 0xfd, 0xec, 0x9a, 0xfc, 0xe8, 0x99, 0xf8} },
-{ 0x9bb2,      14,     {0x0f, 0xd5, 0xf0, 0xda, 0xe4, 0xcd, 0xfb, 0xe4, 0xcc, 0xfa, 0xe4, 0xc8, 0xf9, 0x22} },
-{ 0x9bc0,      16,     {0xeb, 0x9f, 0xf5, 0xf0, 0xea, 0x9e, 0x42, 0xf0, 0xe9, 0x9d, 0x42, 0xf0, 0xe8, 0x9c, 0x45, 0xf0} },
-{ 0x9bd0,      1,      {0x22} },
-{ 0x9bd1,      16,     {0xe8, 0x60, 0x0f, 0xec, 0xc3, 0x13, 0xfc, 0xed, 0x13, 0xfd, 0xee, 0x13, 0xfe, 0xef, 0x13, 0xff} },
-{ 0x9be1,      3,      {0xd8, 0xf1, 0x22} },
-{ 0x9be4,      16,     {0x08, 0x08, 0x08, 0xe6, 0xcf, 0x2f, 0xf6, 0x18, 0xe6, 0xce, 0x3e, 0xf6, 0x18, 0xe6, 0xcd, 0x3d} },
-{ 0x9bf4,      7,      {0xf6, 0x18, 0xe6, 0xcc, 0x3c, 0xf6, 0x22} },
-{ 0x9bfb,      12,     {0xec, 0xf0, 0xa3, 0xed, 0xf0, 0xa3, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} },
-{ 0x9c07,      16,     {0xa8, 0x82, 0x85, 0x83, 0xf0, 0xd0, 0x83, 0xd0, 0x82, 0x12, 0x9c, 0x1e, 0x12, 0x9c, 0x1e, 0x12} },
-{ 0x9c17,      16,     {0x9c, 0x1e, 0x12, 0x9c, 0x1e, 0xe4, 0x73, 0xe4, 0x93, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83} },
-{ 0x9c27,      16,     {0xc8, 0xc5, 0x82, 0xc8, 0xf0, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83, 0xc8, 0xc5, 0x82, 0xc8} },
-{ 0x9c37,      1,      {0x22} },
-{ 0xffff,      0,      {0x00} }
-};
-
-#ifdef DEBUG
-static const struct whiteheat_hex_record whiteheat_loader[] = {
-{ 0x0000,      3,      {0x02, 0x09, 0x8d} },
-{ 0x0033,      3,      {0x02, 0x0e, 0x70} },
-{ 0x0043,      3,      {0x02, 0x0b, 0x00} },
-{ 0x004b,      3,      {0x02, 0x05, 0xb3} },
-{ 0x0100,      16,     {0x90, 0x7f, 0xa5, 0xe0, 0x54, 0x10, 0xff, 0xc4, 0x54, 0x0f, 0x44, 0x50, 0xf5, 0x0f, 0x13, 0xe4} },
-{ 0x0110,      16,     {0x33, 0xf5, 0x11, 0x90, 0x7f, 0xe9, 0xe0, 0x24, 0x5e, 0xb4, 0x07, 0x00, 0x40, 0x03, 0x02, 0x03} },
-{ 0x0120,      16,     {0x7c, 0x90, 0x01, 0x28, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x01, 0xbc, 0x02, 0x01, 0xbc, 0x02, 0x01} },
-{ 0x0130,      16,     {0x91, 0x02, 0x01, 0x3d, 0x02, 0x01, 0x53, 0x02, 0x01, 0x6f, 0x02, 0x01, 0x9a, 0x90, 0x7f, 0x00} },
-{ 0x0140,      16,     {0xe5, 0x11, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0} },
-{ 0x0150,      16,     {0x02, 0x03, 0x7c, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4, 0x54, 0x0f, 0x90, 0x7f, 0x00, 0xf0, 0x90} },
-{ 0x0160,      16,     {0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x02, 0x03, 0x7c, 0x12} },
-{ 0x0170,      16,     {0x0a, 0x89, 0x50, 0x07, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0x80, 0x06, 0x90, 0x7f, 0x00, 0x74, 0x0f} },
-{ 0x0180,      16,     {0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x02, 0x03} },
-{ 0x0190,      16,     {0x7c, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x0f, 0x02, 0x03, 0x7c, 0x90, 0x7f, 0x00, 0x74, 0x07, 0xf0} },
-{ 0x01a0,      16,     {0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xe8, 0x7e} },
-{ 0x01b0,      16,     {0x03, 0x12, 0x0d, 0xd5, 0xd2, 0x06, 0x12, 0x0d, 0x0d, 0x02, 0x03, 0x7c, 0x90, 0x7f, 0xea, 0xe0} },
-{ 0x01c0,      16,     {0x75, 0x29, 0x00, 0xf5, 0x2a, 0xa3, 0xe0, 0xfe, 0xe4, 0xee, 0x42, 0x29, 0x90, 0x7f, 0xee, 0xe0} },
-{ 0x01d0,      16,     {0x75, 0x2b, 0x00, 0xf5, 0x2c, 0xa3, 0xe0, 0xfe, 0xe4, 0xee, 0x42, 0x2b, 0x90, 0x7f, 0xe8, 0xe0} },
-{ 0x01e0,      16,     {0x64, 0xc0, 0x60, 0x03, 0x02, 0x02, 0xc9, 0xe5, 0x2c, 0x45, 0x2b, 0x70, 0x03, 0x02, 0x03, 0x7c} },
-{ 0x01f0,      16,     {0xc3, 0xe5, 0x2c, 0x94, 0x40, 0xe5, 0x2b, 0x94, 0x00, 0x50, 0x08, 0x85, 0x2b, 0x2d, 0x85, 0x2c} },
-{ 0x0200,      16,     {0x2e, 0x80, 0x06, 0x75, 0x2d, 0x00, 0x75, 0x2e, 0x40, 0x90, 0x7f, 0xe9, 0xe0, 0x64, 0xa3, 0x70} },
-{ 0x0210,      16,     {0x34, 0xf5, 0x31, 0xf5, 0x32, 0xc3, 0xe5, 0x32, 0x95, 0x2e, 0xe5, 0x31, 0x95, 0x2d, 0x50, 0x5c} },
-{ 0x0220,      16,     {0xe5, 0x2a, 0x25, 0x32, 0xf5, 0x82, 0xe5, 0x31, 0x35, 0x29, 0xf5, 0x83, 0xe0, 0xff, 0x74, 0x00} },
-{ 0x0230,      16,     {0x25, 0x32, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x32, 0xe5, 0x32, 0x70} },
-{ 0x0240,      16,     {0x02, 0x05, 0x31, 0x80, 0xd0, 0xe4, 0xf5, 0x31, 0xf5, 0x32, 0xc3, 0xe5, 0x32, 0x95, 0x2e, 0xe5} },
-{ 0x0250,      16,     {0x31, 0x95, 0x2d, 0x50, 0x18, 0x74, 0x00, 0x25, 0x32, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83} },
-{ 0x0260,      16,     {0x74, 0xcd, 0xf0, 0x05, 0x32, 0xe5, 0x32, 0x70, 0x02, 0x05, 0x31, 0x80, 0xdd, 0xaf, 0x2a, 0xae} },
-{ 0x0270,      16,     {0x29, 0xad, 0x2e, 0x7a, 0x7f, 0x79, 0x00, 0x7b, 0x00, 0x12, 0x0b, 0xf4, 0x90, 0x7f, 0xb5, 0xe5} },
-{ 0x0280,      16,     {0x2e, 0xf0, 0xe5, 0x2e, 0x25, 0x2a, 0xf5, 0x2a, 0xe5, 0x2d, 0x35, 0x29, 0xf5, 0x29, 0xc3, 0xe5} },
-{ 0x0290,      16,     {0x2c, 0x95, 0x2e, 0xf5, 0x2c, 0xe5, 0x2b, 0x95, 0x2d, 0xf5, 0x2b, 0x90, 0x7f, 0x92, 0xe0, 0xff} },
-{ 0x02a0,      16,     {0xc4, 0x54, 0x0f, 0x75, 0x2f, 0x00, 0xf5, 0x30, 0xd3, 0x94, 0x00, 0xe5, 0x2f, 0x94, 0x00, 0x50} },
-{ 0x02b0,      16,     {0x0c, 0x90, 0x7f, 0xb4, 0xe0, 0x20, 0xe1, 0x03, 0x02, 0x01, 0xe7, 0x80, 0xf4, 0x90, 0x7f, 0xb4} },
-{ 0x02c0,      16,     {0xe0, 0x20, 0xe2, 0x03, 0x02, 0x01, 0xe7, 0x80, 0xf4, 0x90, 0x7f, 0xe8, 0xe0, 0x64, 0x40, 0x60} },
-{ 0x02d0,      16,     {0x03, 0x02, 0x03, 0x7c, 0xe5, 0x2c, 0x45, 0x2b, 0x70, 0x03, 0x02, 0x03, 0x7c, 0xe4, 0x90, 0x7f} },
-{ 0x02e0,      16,     {0xc5, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4, 0x54, 0x0f, 0x75, 0x2f, 0x00, 0xf5, 0x30, 0xd3} },
-{ 0x02f0,      16,     {0x94, 0x00, 0xe5, 0x2f, 0x94, 0x00, 0x50, 0x09, 0x90, 0x7f, 0xc4, 0xe0, 0x30, 0xe1, 0x09, 0x80} },
-{ 0x0300,      16,     {0xf7, 0x90, 0x7f, 0xb4, 0xe0, 0x20, 0xe3, 0xf9, 0x90, 0x7f, 0xc5, 0xe0, 0x75, 0x2d, 0x00, 0xf5} },
-{ 0x0310,      16,     {0x2e, 0x90, 0x7f, 0xe9, 0xe0, 0x64, 0xa3, 0x70, 0x38, 0x90, 0x20, 0x6b, 0xf0, 0xf5, 0x31, 0xf5} },
-{ 0x0320,      16,     {0x32, 0xc3, 0xe5, 0x32, 0x95, 0x2e, 0xe5, 0x31, 0x95, 0x2d, 0x50, 0x34, 0x74, 0xc0, 0x25, 0x32} },
-{ 0x0330,      16,     {0xf5, 0x82, 0xe4, 0x34, 0x7e, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x2a, 0x25, 0x32, 0xf5, 0x82, 0xe5} },
-{ 0x0340,      16,     {0x31, 0x35, 0x29, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x32, 0xe5, 0x32, 0x70, 0x02, 0x05, 0x31, 0x80} },
-{ 0x0350,      16,     {0xd0, 0xaf, 0x2a, 0xae, 0x29, 0xad, 0x2e, 0x7a, 0x7e, 0x79, 0xc0, 0x7b, 0xc0, 0x12, 0x0c, 0x80} },
-{ 0x0360,      16,     {0xe5, 0x2e, 0x25, 0x2a, 0xf5, 0x2a, 0xe5, 0x2d, 0x35, 0x29, 0xf5, 0x29, 0xc3, 0xe5, 0x2c, 0x95} },
-{ 0x0370,      13,     {0x2e, 0xf5, 0x2c, 0xe5, 0x2b, 0x95, 0x2d, 0xf5, 0x2b, 0x02, 0x02, 0xd4, 0xc3} },
-{ 0x037d,      1,      {0x22} },
-{ 0x037e,      16,     {0x90, 0x7f, 0xe9, 0xe0, 0x70, 0x03, 0x02, 0x04, 0x56, 0x14, 0x70, 0x03, 0x02, 0x04, 0xd2, 0x24} },
-{ 0x038e,      16,     {0xfe, 0x70, 0x03, 0x02, 0x05, 0x46, 0x24, 0xfb, 0x70, 0x03, 0x02, 0x04, 0x50, 0x14, 0x70, 0x03} },
-{ 0x039e,      16,     {0x02, 0x04, 0x4a, 0x14, 0x70, 0x03, 0x02, 0x04, 0x3e, 0x14, 0x70, 0x03, 0x02, 0x04, 0x44, 0x24} },
-{ 0x03ae,      16,     {0x05, 0x60, 0x03, 0x02, 0x05, 0x9a, 0x12, 0x0e, 0x7b, 0x40, 0x03, 0x02, 0x05, 0xab, 0x90, 0x7f} },
-{ 0x03be,      16,     {0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x40, 0x24, 0x02, 0x70, 0x69, 0x74, 0x11, 0x90} },
-{ 0x03ce,      16,     {0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xea, 0xe0} },
-{ 0x03de,      16,     {0xff, 0x12, 0x0b, 0x58, 0x8b, 0x26, 0x8a, 0x27, 0x89, 0x28, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02} },
-{ 0x03ee,      16,     {0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xab, 0x90} },
-{ 0x03fe,      16,     {0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x0c} },
-{ 0x040e,      16,     {0x3f, 0x8b, 0x26, 0x8a, 0x27, 0x89, 0x28, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02, 0xee, 0x90, 0x7f} },
-{ 0x041e,      16,     {0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xb4, 0xe0} },
-{ 0x042e,      16,     {0x44, 0x01, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xab} },
-{ 0x043e,      16,     {0x12, 0x0e, 0x52, 0x02, 0x05, 0xab, 0x12, 0x0e, 0x60, 0x02, 0x05, 0xab, 0x12, 0x0a, 0xf7, 0x02} },
-{ 0x044e,      16,     {0x05, 0xab, 0x12, 0x08, 0xf1, 0x02, 0x05, 0xab, 0x12, 0x0e, 0x7d, 0x40, 0x03, 0x02, 0x05, 0xab} },
-{ 0x045e,      16,     {0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2} },
-{ 0x046e,      16,     {0x00, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x02, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0} },
-{ 0x047e,      16,     {0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xab, 0xe4, 0x90, 0x7f, 0x00} },
-{ 0x048e,      16,     {0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xec, 0xe0} },
-{ 0x049e,      16,     {0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4} },
-{ 0x04ae,      16,     {0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3} },
-{ 0x04be,      16,     {0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01} },
-{ 0x04ce,      16,     {0xf0, 0x02, 0x05, 0xab, 0x12, 0x0e, 0x7f, 0x40, 0x03, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xe8, 0xe0} },
-{ 0x04de,      16,     {0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xea, 0xe0, 0xb4} },
-{ 0x04ee,      16,     {0x01, 0x05, 0xc2, 0x00, 0x02, 0x05, 0xab, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05} },
-{ 0x04fe,      16,     {0xab, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4} },
-{ 0x050e,      16,     {0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f} },
-{ 0x051e,      16,     {0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f} },
-{ 0x052e,      16,     {0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x6e, 0x90} },
-{ 0x053e,      16,     {0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x65, 0x12, 0x0e, 0x81, 0x50, 0x60, 0x90, 0x7f, 0xe8} },
-{ 0x054e,      16,     {0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x54, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04} },
-{ 0x055e,      16,     {0xd2, 0x00, 0x80, 0x49, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x40, 0x90, 0x7f, 0xea} },
-{ 0x056e,      16,     {0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0} },
-{ 0x057e,      16,     {0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01} },
-{ 0x058e,      16,     {0xf0, 0x80, 0x1a, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x11, 0xe4, 0x90, 0x20, 0x6a} },
-{ 0x059e,      16,     {0xf0, 0x12, 0x01, 0x00, 0x50, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4} },
-{ 0x05ae,      4,      {0xe0, 0x44, 0x02, 0xf0} },
-{ 0x05b2,      1,      {0x22} },
-{ 0x05b3,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
-{ 0x05c3,      16,     {0xd0, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x06, 0xc0, 0x07, 0x90, 0x7f, 0xa5} },
-{ 0x05d3,      16,     {0xe0, 0x30, 0xe2, 0x06, 0x75, 0x0d, 0x06, 0x02, 0x06, 0x7f, 0x90, 0x7f, 0xa5, 0xe0, 0x20, 0xe1} },
-{ 0x05e3,      16,     {0x0c, 0xe5, 0x0d, 0x64, 0x02, 0x60, 0x06, 0x75, 0x0d, 0x07, 0x02, 0x06, 0x7f, 0xaf, 0x0d, 0xef} },
-{ 0x05f3,      16,     {0x24, 0xfe, 0x60, 0x48, 0x14, 0x60, 0x2c, 0x24, 0xfe, 0x60, 0x77, 0x24, 0x04, 0x60, 0x03, 0x02} },
-{ 0x0603,      16,     {0x06, 0x7f, 0xab, 0x09, 0xaa, 0x0a, 0xa9, 0x0b, 0xaf, 0x0c, 0x05, 0x0c, 0x8f, 0x82, 0x75, 0x83} },
-{ 0x0613,      16,     {0x00, 0x12, 0x07, 0x85, 0x90, 0x7f, 0xa6, 0xf0, 0xe5, 0x0c, 0x65, 0x08, 0x70, 0x5e, 0x75, 0x0d} },
-{ 0x0623,      16,     {0x05, 0x80, 0x59, 0x90, 0x7f, 0xa6, 0xe0, 0xab, 0x09, 0xaa, 0x0a, 0xa9, 0x0b, 0xae, 0x0c, 0x8e} },
-{ 0x0633,      16,     {0x82, 0x75, 0x83, 0x00, 0x12, 0x07, 0xb2, 0x75, 0x0d, 0x02, 0x80, 0x40, 0xe5, 0x08, 0x24, 0xfe} },
-{ 0x0643,      16,     {0xb5, 0x0c, 0x07, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x20, 0xf0, 0xe5, 0x08, 0x14, 0xb5, 0x0c, 0x0a} },
-{ 0x0653,      16,     {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe4, 0xf5, 0x0d, 0x90, 0x7f, 0xa6, 0xe0, 0xab, 0x09} },
-{ 0x0663,      16,     {0xaa, 0x0a, 0xa9, 0x0b, 0xae, 0x0c, 0x8e, 0x82, 0x75, 0x83, 0x00, 0x12, 0x07, 0xb2, 0x05, 0x0c} },
-{ 0x0673,      16,     {0x80, 0x0a, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe4, 0xf5, 0x0d, 0x53, 0x91, 0xdf, 0xd0} },
-{ 0x0683,      16,     {0x07, 0xd0, 0x06, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0xd0, 0xd0, 0xd0, 0x86, 0xd0} },
-{ 0x0693,      10,     {0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x069d,      16,     {0xc2, 0x04, 0xd2, 0x05, 0xe4, 0xf5, 0x25, 0xc2, 0x03, 0xc2, 0x00, 0xc2, 0x02, 0xc2, 0x01, 0x12} },
-{ 0x06ad,      16,     {0x0e, 0x74, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9} },
-{ 0x06bd,      16,     {0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0xc0, 0xf0, 0x90} },
-{ 0x06cd,      16,     {0x7f, 0x93, 0x74, 0x30, 0xf0, 0x12, 0x0a, 0x19, 0x75, 0x24, 0x48, 0x75, 0x23, 0x92, 0x75, 0x22} },
-{ 0x06dd,      16,     {0x00, 0x75, 0x21, 0x00, 0xe4, 0xff, 0xfe, 0x7e, 0x05, 0x90, 0x20, 0x68, 0x74, 0x01, 0xf0, 0xa3} },
-{ 0x06ed,      16,     {0xde, 0xfc, 0x7e, 0x00, 0x7f, 0x05, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae} },
-{ 0x06fd,      16,     {0xe0, 0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0x12, 0x0e, 0x68, 0x30, 0x01, 0x0a, 0xe4, 0x90, 0x20, 0x69} },
-{ 0x070d,      16,     {0xf0, 0x12, 0x03, 0x7e, 0xc2, 0x01, 0x30, 0x04, 0x1a, 0x12, 0x0e, 0x77, 0x50, 0x13, 0x12, 0x09} },
-{ 0x071d,      16,     {0x00, 0x30, 0x00, 0x07, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0xf3, 0x12, 0x0d, 0x8b, 0x12, 0x0e} },
-{ 0x072d,      16,     {0x79, 0xc2, 0x03, 0x7f, 0xff, 0x7e, 0xff, 0x7d, 0xff, 0x7c, 0xff, 0x78, 0x21, 0x12, 0x08, 0x1d} },
-{ 0x073d,      16,     {0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0xc3, 0x12, 0x08, 0x0c, 0x70, 0x1b, 0x75, 0x24} },
-{ 0x074d,      16,     {0x48, 0x75, 0x23, 0x92, 0xf5, 0x22, 0xf5, 0x21, 0x63, 0x25, 0xff, 0x90, 0x20, 0x68, 0xe5, 0x25} },
-{ 0x075d,      14,     {0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0x12, 0x08, 0xff, 0x80, 0x9b} },
-{ 0x076b,      1,      {0x22} },
-{ 0x076c,      16,     {0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02} },
-{ 0x077c,      9,      {0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22} },
-{ 0x0785,      16,     {0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50} },
-{ 0x0795,      16,     {0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22} },
-{ 0x07a5,      13,     {0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22} },
-{ 0x07b2,      16,     {0xf8, 0xbb, 0x01, 0x0d, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe8, 0xf0} },
-{ 0x07c2,      16,     {0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xc8, 0xf6, 0x22, 0xbb, 0xfe, 0x05, 0xe9, 0x25, 0x82, 0xc8} },
-{ 0x07d2,      2,      {0xf2, 0x22} },
-{ 0x07d4,      16,     {0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0} },
-{ 0x07e4,      16,     {0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe} },
-{ 0x07f4,      16,     {0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83} },
-{ 0x0804,      8,      {0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22} },
-{ 0x080c,      16,     {0xeb, 0x9f, 0xf5, 0xf0, 0xea, 0x9e, 0x42, 0xf0, 0xe9, 0x9d, 0x42, 0xf0, 0xe8, 0x9c, 0x45, 0xf0} },
-{ 0x081c,      1,      {0x22} },
-{ 0x081d,      16,     {0x08, 0x08, 0x08, 0xe6, 0x2f, 0xff, 0xf6, 0x18, 0xe6, 0x3e, 0xfe, 0xf6, 0x18, 0xe6, 0x3d, 0xfd} },
-{ 0x082d,      7,      {0xf6, 0x18, 0xe6, 0x3c, 0xfc, 0xf6, 0x22} },
-{ 0x0834,      4,      {0x8c, 0x34, 0x8d, 0x35} },
-{ 0x0838,      16,     {0x90, 0x7f, 0x95, 0xe0, 0x44, 0xc0, 0xf0, 0xe4, 0xf5, 0x36, 0xf5, 0x37, 0xc3, 0xe5, 0x37, 0x95} },
-{ 0x0848,      16,     {0x35, 0xe5, 0x36, 0x95, 0x34, 0x50, 0x69, 0xef, 0x25, 0x37, 0xf5, 0x82, 0xe5, 0x36, 0x3e, 0xf5} },
-{ 0x0858,      16,     {0x83, 0x74, 0xff, 0xf0, 0xf4, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x37, 0xf5, 0x82, 0xe5, 0x36} },
-{ 0x0868,      16,     {0x3e, 0xf5, 0x83, 0xe4, 0xf0, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x37, 0xf5, 0x82, 0xe5, 0x36} },
-{ 0x0878,      16,     {0x3e, 0xf5, 0x83, 0x74, 0xaa, 0xf0, 0x64, 0xaa, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x37, 0xf5} },
-{ 0x0888,      16,     {0x82, 0xe5, 0x36, 0x3e, 0xf5, 0x83, 0x74, 0x55, 0xf0, 0x64, 0x55, 0x60, 0x02, 0xc3, 0x22, 0xad} },
-{ 0x0898,      16,     {0x37, 0xe5, 0x37, 0x2f, 0xf5, 0x82, 0xe5, 0x36, 0x3e, 0xf5, 0x83, 0xed, 0xf0, 0xfc, 0xac, 0x05} },
-{ 0x08a8,      16,     {0xed, 0x6c, 0x60, 0x02, 0xc3, 0x22, 0x05, 0x37, 0xe5, 0x37, 0x70, 0x02, 0x05, 0x36, 0x80, 0x8c} },
-{ 0x08b8,      16,     {0xe4, 0xf5, 0x36, 0xf5, 0x37, 0xc3, 0xe5, 0x37, 0x95, 0x35, 0xe5, 0x36, 0x95, 0x34, 0x50, 0x27} },
-{ 0x08c8,      16,     {0xef, 0x25, 0x37, 0xf5, 0x82, 0xe5, 0x36, 0x3e, 0xf5, 0x83, 0xe0, 0x65, 0x37, 0x60, 0x02, 0xc3} },
-{ 0x08d8,      16,     {0x22, 0xef, 0x25, 0x37, 0xf5, 0x82, 0xe5, 0x36, 0x3e, 0xf5, 0x83, 0xe4, 0xf0, 0x05, 0x37, 0xe5} },
-{ 0x08e8,      8,      {0x37, 0x70, 0x02, 0x05, 0x36, 0x80, 0xce, 0xd3} },
-{ 0x08f0,      1,      {0x22} },
-{ 0x08f1,      14,     {0x90, 0x7f, 0x00, 0xe5, 0x10, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0xd3, 0x22} },
-{ 0x08ff,      1,      {0x22} },
-{ 0x0900,      9,      {0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x74} },
-{ 0x097d,      16,     {0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22} },
-{ 0x098d,      12,     {0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x3a, 0x02, 0x09, 0xd4} },
-{ 0x0999,      16,     {0x02, 0x06, 0x9d, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2} },
-{ 0x09a9,      16,     {0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33} },
-{ 0x09b9,      16,     {0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf} },
-{ 0x09c9,      16,     {0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0e, 0x2d, 0xe4, 0x7e} },
-{ 0x09d9,      16,     {0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93} },
-{ 0x09e9,      16,     {0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3} },
-{ 0x09f9,      16,     {0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca} },
-{ 0x0a09,      16,     {0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe} },
-{ 0x0a19,      16,     {0xe4, 0x90, 0x7f, 0x9c, 0xf0, 0x7f, 0x0a, 0xfe, 0x12, 0x0d, 0xd5, 0x90, 0x7f, 0x96, 0x74, 0x89} },
-{ 0x0a29,      16,     {0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xcf, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x0d, 0xd5, 0x90, 0x7f} },
-{ 0x0a39,      16,     {0x96, 0xe0, 0x54, 0xfe, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x0d, 0xd5, 0x7f, 0x05, 0x7e, 0x00} },
-{ 0x0a49,      16,     {0x12, 0x0d, 0xd5, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x02, 0xf0, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0x05} },
-{ 0x0a59,      16,     {0x7e, 0x00, 0x12, 0x0d, 0xd5, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x05, 0x7e, 0x00} },
-{ 0x0a69,      16,     {0x12, 0x0d, 0xd5, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x0d} },
-{ 0x0a79,      16,     {0xd5, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x0d, 0xd5, 0x22} },
-{ 0x0a89,      16,     {0x75, 0x33, 0x01, 0xe5, 0x33, 0x60, 0x1b, 0x7f, 0x01, 0x12, 0x0e, 0x18, 0x7f, 0x00, 0x7e, 0x0e} },
-{ 0x0a99,      16,     {0x7d, 0x00, 0x7c, 0x01, 0x12, 0x08, 0x34, 0xe4, 0x33, 0xf5, 0x33, 0x70, 0x05, 0x7f, 0x0f, 0x12} },
-{ 0x0aa9,      16,     {0x0e, 0x18, 0xe5, 0x33, 0x60, 0x1b, 0x7f, 0x02, 0x12, 0x0e, 0x18, 0x7f, 0x00, 0x7e, 0x80, 0x7d} },
-{ 0x0ab9,      16,     {0x00, 0x7c, 0x80, 0x12, 0x08, 0x34, 0xe4, 0x33, 0xf5, 0x33, 0x70, 0x05, 0x7f, 0x0f, 0x12, 0x0e} },
-{ 0x0ac9,      16,     {0x18, 0xe5, 0x33, 0x60, 0x1b, 0x7f, 0x03, 0x12, 0x0e, 0x18, 0x7f, 0x00, 0x7e, 0x20, 0x7d, 0x40} },
-{ 0x0ad9,      16,     {0x7c, 0x5b, 0x12, 0x08, 0x34, 0xe4, 0x33, 0xf5, 0x33, 0x70, 0x05, 0x7f, 0x0f, 0x12, 0x0e, 0x18} },
-{ 0x0ae9,      13,     {0xe5, 0x33, 0x60, 0x05, 0xe4, 0xff, 0x12, 0x0e, 0x18, 0xe5, 0x33, 0x24, 0xff} },
-{ 0x0af6,      1,      {0x22} },
-{ 0x0af7,      8,      {0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x10, 0xd3, 0x22} },
-{ 0x0aff,      1,      {0x32} },
-{ 0x0b00,      16,     {0x02, 0x0d, 0xa5, 0x00, 0x02, 0x0d, 0xec, 0x00, 0x02, 0x0d, 0x70, 0x00, 0x02, 0x0d, 0xbd, 0x00} },
-{ 0x0b10,      16,     {0x02, 0x0e, 0x02, 0x00, 0x02, 0x0a, 0xff, 0x00, 0x02, 0x0e, 0x83, 0x00, 0x02, 0x0e, 0x84, 0x00} },
-{ 0x0b20,      16,     {0x02, 0x0e, 0x85, 0x00, 0x02, 0x0e, 0x86, 0x00, 0x02, 0x0e, 0x87, 0x00, 0x02, 0x0e, 0x88, 0x00} },
-{ 0x0b30,      16,     {0x02, 0x0e, 0x89, 0x00, 0x02, 0x0e, 0x8a, 0x00, 0x02, 0x0e, 0x8b, 0x00, 0x02, 0x0e, 0x8c, 0x00} },
-{ 0x0b40,      16,     {0x02, 0x0e, 0x8d, 0x00, 0x02, 0x0e, 0x8e, 0x00, 0x02, 0x0e, 0x8f, 0x00, 0x02, 0x0e, 0x90, 0x00} },
-{ 0x0b50,      8,      {0x02, 0x0e, 0x91, 0x00, 0x02, 0x0e, 0x92, 0x00} },
-{ 0x0b58,      16,     {0xe4, 0xfe, 0x75, 0x2b, 0xff, 0x75, 0x2c, 0x11, 0x75, 0x2d, 0x12, 0xab, 0x2b, 0xaa, 0x2c, 0xa9} },
-{ 0x0b68,      16,     {0x2d, 0x90, 0x00, 0x01, 0x12, 0x07, 0x85, 0x64, 0x02, 0x70, 0x2d, 0xad, 0x06, 0x0e, 0xed, 0xb5} },
-{ 0x0b78,      16,     {0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x07, 0xd4, 0x85, 0xf0, 0x29, 0xf5, 0x2a, 0x62, 0x29} },
-{ 0x0b88,      16,     {0xe5, 0x29, 0x62, 0x2a, 0xe5, 0x2a, 0x62, 0x29, 0x29, 0xfd, 0xe5, 0x29, 0x3a, 0xa9, 0x05, 0x75} },
-{ 0x0b98,      14,     {0x2b, 0xff, 0xf5, 0x2c, 0x89, 0x2d, 0x80, 0xc3, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
-{ 0x0ba6,      1,      {0x22} },
-{ 0x0ba7,      6,      {0xab, 0x07, 0xaa, 0x06, 0xac, 0x05} },
-{ 0x0bad,      16,     {0xe4, 0xfd, 0xe5, 0x11, 0x60, 0x11, 0xea, 0xff, 0xae, 0x05, 0x0d, 0xee, 0x24, 0x10, 0xf5, 0x82} },
-{ 0x0bbd,      16,     {0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xef, 0xf0, 0xeb, 0xae, 0x05, 0x0d, 0x74, 0x10, 0x2e, 0xf5, 0x82} },
-{ 0x0bcd,      16,     {0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xeb, 0xf0, 0xaf, 0x05, 0x0d, 0x74, 0x10, 0x2f, 0xf5, 0x82, 0xe4} },
-{ 0x0bdd,      16,     {0x34, 0x0f, 0xf5, 0x83, 0xec, 0xf0, 0xaf, 0x0f, 0x7a, 0x0f, 0x7b, 0x10, 0x12, 0x0d, 0x51, 0x7f} },
-{ 0x0bed,      6,      {0x0a, 0x7e, 0x00, 0x12, 0x0d, 0xd5} },
-{ 0x0bf3,      1,      {0x22} },
-{ 0x0bf4,      10,     {0x8e, 0x33, 0x8f, 0x34, 0x8d, 0x35, 0x8a, 0x36, 0x8b, 0x37} },
-{ 0x0bfe,      16,     {0xe4, 0xfd, 0xf5, 0x38, 0xe5, 0x11, 0x60, 0x12, 0xe5, 0x33, 0xff, 0xae, 0x05, 0x0d, 0xee, 0x24} },
-{ 0x0c0e,      16,     {0x13, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x34, 0xae, 0x05, 0x0d, 0x74} },
-{ 0x0c1e,      16,     {0x13, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xe5, 0x34, 0xf0, 0xaf, 0x0f, 0x7a, 0x0f} },
-{ 0x0c2e,      16,     {0x7b, 0x13, 0x12, 0x0d, 0x51, 0xaf, 0x0f, 0xad, 0x35, 0xab, 0x37, 0xaa, 0x36, 0x12, 0x0d, 0x32} },
-{ 0x0c3e,      1,      {0x22} },
-{ 0x0c3f,      2,      {0x8f, 0x29} },
-{ 0x0c41,      16,     {0xe4, 0xf5, 0x2a, 0x75, 0x2b, 0xff, 0x75, 0x2c, 0x11, 0x75, 0x2d, 0x32, 0xab, 0x2b, 0xaa, 0x2c} },
-{ 0x0c51,      16,     {0xa9, 0x2d, 0x90, 0x00, 0x01, 0x12, 0x07, 0x85, 0xb4, 0x03, 0x1d, 0xaf, 0x2a, 0x05, 0x2a, 0xef} },
-{ 0x0c61,      16,     {0xb5, 0x29, 0x01, 0x22, 0x12, 0x07, 0x6c, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75} },
-{ 0x0c71,      14,     {0x2b, 0xff, 0xf5, 0x2c, 0x89, 0x2d, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
-{ 0x0c7f,      1,      {0x22} },
-{ 0x0c80,      10,     {0x8e, 0x33, 0x8f, 0x34, 0x8d, 0x35, 0x8a, 0x36, 0x8b, 0x37} },
-{ 0x0c8a,      16,     {0xe4, 0xf5, 0x38, 0xe5, 0x38, 0xc3, 0x95, 0x35, 0x50, 0x20, 0x05, 0x34, 0xe5, 0x34, 0xae, 0x33} },
-{ 0x0c9a,      16,     {0x70, 0x02, 0x05, 0x33, 0x14, 0xff, 0xe5, 0x37, 0x25, 0x38, 0xf5, 0x82, 0xe4, 0x35, 0x36, 0xf5} },
-{ 0x0caa,      10,     {0x83, 0xe0, 0xfd, 0x12, 0x0b, 0xa7, 0x05, 0x38, 0x80, 0xd9} },
-{ 0x0cb4,      1,      {0x22} },
-{ 0x0cb5,      16,     {0xa9, 0x07, 0xe5, 0x0d, 0x70, 0x25, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xe9, 0x25, 0xe0} },
-{ 0x0cc5,      16,     {0x44, 0x01, 0x90, 0x7f, 0xa6, 0xf0, 0x8d, 0x08, 0xaf, 0x03, 0xa9, 0x07, 0x75, 0x09, 0x01, 0x8a} },
-{ 0x0cd5,      13,     {0x0a, 0x89, 0x0b, 0xe4, 0xf5, 0x0c, 0x75, 0x0d, 0x03, 0xd3, 0x22, 0xc3, 0x22} },
-{ 0x0ce2,      16,     {0xa9, 0x07, 0xe5, 0x0d, 0x70, 0x23, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xe9, 0x25, 0xe0} },
-{ 0x0cf2,      16,     {0x90, 0x7f, 0xa6, 0xf0, 0x8d, 0x08, 0xaf, 0x03, 0xa9, 0x07, 0x75, 0x09, 0x01, 0x8a, 0x0a, 0x89} },
-{ 0x0d02,      11,     {0x0b, 0xe4, 0xf5, 0x0c, 0x75, 0x0d, 0x01, 0xd3, 0x22, 0xc3, 0x22} },
-{ 0x0d0d,      16,     {0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x06, 0x04, 0xe0, 0x44} },
-{ 0x0d1d,      16,     {0x02, 0xf0, 0x7f, 0xd0, 0x7e, 0x07, 0x12, 0x0d, 0xd5, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0} },
-{ 0x0d2d,      5,      {0xe0, 0x44, 0x04, 0xf0, 0x22} },
-{ 0x0d32,      16,     {0x12, 0x0c, 0xb5, 0xe5, 0x0d, 0x24, 0xfa, 0x60, 0x10, 0x14, 0x60, 0x07, 0x24, 0x07, 0x70, 0xf3} },
-{ 0x0d42,      15,     {0x7f, 0x08, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x07, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x06, 0x22} },
-{ 0x0d51,      16,     {0x12, 0x0c, 0xe2, 0xe5, 0x0d, 0x24, 0xfa, 0x60, 0x10, 0x14, 0x60, 0x07, 0x24, 0x07, 0x70, 0xf3} },
-{ 0x0d61,      15,     {0x7f, 0x08, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x07, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x06, 0x22} },
-{ 0x0d70,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f} },
-{ 0x0d80,      11,     {0xab, 0x74, 0x04, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0d8b,      16,     {0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x12, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x14, 0x7e, 0x00, 0x12} },
-{ 0x0d9b,      10,     {0x0d, 0xd5, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22} },
-{ 0x0da5,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x01, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01} },
-{ 0x0db5,      8,      {0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0dbd,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x03, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08} },
-{ 0x0dcd,      8,      {0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0dd5,      16,     {0x8e, 0x39, 0x8f, 0x3a, 0xe5, 0x3a, 0x15, 0x3a, 0xae, 0x39, 0x70, 0x02, 0x15, 0x39, 0x4e, 0x60} },
-{ 0x0de5,      7,      {0x05, 0x12, 0x0e, 0x41, 0x80, 0xee, 0x22} },
-{ 0x0dec,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x02, 0xf0, 0xd0} },
-{ 0x0dfc,      6,      {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0e02,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x10, 0xf0, 0xd0} },
-{ 0x0e12,      6,      {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0e18,      16,     {0xae, 0x07, 0x7f, 0x21, 0x7d, 0x01, 0x74, 0x00, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xab, 0x82} },
-{ 0x0e28,      5,      {0xfa, 0x12, 0x0d, 0x51, 0x22} },
-{ 0x0e2d,      16,     {0x50, 0x0f, 0x00, 0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, 0x80, 0x98, 0x88, 0x83, 0xc6} },
-{ 0x0e3d,      3,      {0xa1, 0x86, 0x8e} },
-{ 0x0e40,      1,      {0x00} },
-{ 0x0e41,      16,     {0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9} },
-{ 0x0e51,      1,      {0x22} },
-{ 0x0e52,      14,     {0x90, 0x7f, 0x00, 0xe5, 0x0e, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0xd3, 0x22} },
-{ 0x0e60,      8,      {0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x0e, 0xd3, 0x22} },
-{ 0x0e68,      8,      {0xe4, 0xf5, 0x0d, 0xd2, 0xe9, 0xd2, 0xaf, 0x22} },
-{ 0x0e70,      4,      {0x53, 0xd8, 0xef, 0x32} },
-{ 0x0e74,      3,      {0xd2, 0x00, 0x22} },
-{ 0x0e77,      2,      {0xd3, 0x22} },
-{ 0x0e79,      2,      {0xd3, 0x22} },
-{ 0x0e7b,      2,      {0xd3, 0x22} },
-{ 0x0e7d,      2,      {0xd3, 0x22} },
-{ 0x0e7f,      2,      {0xd3, 0x22} },
-{ 0x0e81,      2,      {0xd3, 0x22} },
-{ 0x0e83,      1,      {0x32} },
-{ 0x0e84,      1,      {0x32} },
-{ 0x0e85,      1,      {0x32} },
-{ 0x0e86,      1,      {0x32} },
-{ 0x0e87,      1,      {0x32} },
-{ 0x0e88,      1,      {0x32} },
-{ 0x0e89,      1,      {0x32} },
-{ 0x0e8a,      1,      {0x32} },
-{ 0x0e8b,      1,      {0x32} },
-{ 0x0e8c,      1,      {0x32} },
-{ 0x0e8d,      1,      {0x32} },
-{ 0x0e8e,      1,      {0x32} },
-{ 0x0e8f,      1,      {0x32} },
-{ 0x0e90,      1,      {0x32} },
-{ 0x0e91,      1,      {0x32} },
-{ 0x0e92,      1,      {0x32} },
-{ 0x1100,      16,     {0x12, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x40, 0x47, 0x05, 0x10, 0x27, 0x01, 0x00, 0x01, 0x02} },
-{ 0x1110,      16,     {0x00, 0x01, 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x03, 0xa0, 0x00, 0x09, 0x04, 0x00, 0x00, 0x02} },
-{ 0x1120,      16,     {0xff, 0x00, 0x00, 0x04, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40} },
-{ 0x1130,      16,     {0x00, 0x00, 0x04, 0x03, 0x09, 0x04, 0x26, 0x03, 0x41, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x68, 0x00} },
-{ 0x1140,      16,     {0x6f, 0x00, 0x72, 0x00, 0x20, 0x00, 0x43, 0x00, 0x68, 0x00, 0x69, 0x00, 0x70, 0x00, 0x73, 0x00} },
-{ 0x1150,      16,     {0x2c, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x2e, 0x00, 0x28, 0x03, 0x46, 0x00} },
-{ 0x1160,      16,     {0x69, 0x00, 0x72, 0x00, 0x6d, 0x00, 0x77, 0x00, 0x61, 0x00, 0x72, 0x00, 0x65, 0x00, 0x20, 0x00} },
-{ 0x1170,      16,     {0x46, 0x00, 0x72, 0x00, 0x61, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x57, 0x00, 0x6f, 0x00, 0x72, 0x00} },
-{ 0x1180,      16,     {0x6b, 0x00, 0x73, 0x00, 0x2a, 0x03, 0x43, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x66, 0x00, 0x69, 0x00} },
-{ 0x1190,      16,     {0x67, 0x00, 0x75, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00} },
-{ 0x11a0,      16,     {0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x22, 0x03} },
-{ 0x11b0,      16,     {0x49, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x66, 0x00, 0x61, 0x00, 0x63, 0x00} },
-{ 0x11c0,      16,     {0x65, 0x00, 0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00} },
-{ 0x11d0,      2,      {0x00, 0x00} },
-{ 0xffff,      0,      {0x00} }
-};
-
-#else
-
-static const struct whiteheat_hex_record whiteheat_loader[] = {
-{ 0x0000,      3,      {0x02, 0x09, 0x8d} },
-{ 0x0033,      3,      {0x02, 0x08, 0xfb} },
-{ 0x0043,      3,      {0x02, 0x0b, 0x00} },
-{ 0x004b,      3,      {0x02, 0x05, 0xaa} },
-{ 0x0100,      16,     {0x90, 0x7f, 0xa5, 0xe0, 0x54, 0x10, 0xff, 0xc4, 0x54, 0x0f, 0x44, 0x50, 0xf5, 0x0f, 0x13, 0xe4} },
-{ 0x0110,      16,     {0x33, 0xf5, 0x11, 0x90, 0x7f, 0xe9, 0xe0, 0x24, 0x5e, 0xb4, 0x07, 0x00, 0x40, 0x03, 0x02, 0x03} },
-{ 0x0120,      16,     {0x78, 0x90, 0x01, 0x28, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x01, 0xbc, 0x02, 0x01, 0xbc, 0x02, 0x01} },
-{ 0x0130,      16,     {0x91, 0x02, 0x01, 0x3d, 0x02, 0x01, 0x53, 0x02, 0x01, 0x6f, 0x02, 0x01, 0x9a, 0x90, 0x7f, 0x00} },
-{ 0x0140,      16,     {0xe5, 0x11, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0} },
-{ 0x0150,      16,     {0x02, 0x03, 0x78, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4, 0x54, 0x0f, 0x90, 0x7f, 0x00, 0xf0, 0x90} },
-{ 0x0160,      16,     {0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x02, 0x03, 0x78, 0x12} },
-{ 0x0170,      16,     {0x0a, 0x89, 0x50, 0x07, 0xe4, 0x90, 0x7f, 0x00, 0xf0, 0x80, 0x06, 0x90, 0x7f, 0x00, 0x74, 0x0f} },
-{ 0x0180,      16,     {0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x02, 0x03} },
-{ 0x0190,      16,     {0x78, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x0f, 0x02, 0x03, 0x78, 0x90, 0x7f, 0x00, 0x74, 0x07, 0xf0} },
-{ 0x01a0,      16,     {0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0xe8, 0x7e} },
-{ 0x01b0,      16,     {0x03, 0x12, 0x0d, 0x94, 0xd2, 0x06, 0x12, 0x0c, 0xcc, 0x02, 0x03, 0x78, 0x90, 0x7f, 0xea, 0xe0} },
-{ 0x01c0,      16,     {0x75, 0x28, 0x00, 0xf5, 0x29, 0xa3, 0xe0, 0xfe, 0xe4, 0xee, 0x42, 0x28, 0x90, 0x7f, 0xee, 0xe0} },
-{ 0x01d0,      16,     {0x75, 0x2a, 0x00, 0xf5, 0x2b, 0xa3, 0xe0, 0xfe, 0xe4, 0xee, 0x42, 0x2a, 0x90, 0x7f, 0xe8, 0xe0} },
-{ 0x01e0,      16,     {0x64, 0xc0, 0x60, 0x03, 0x02, 0x02, 0xc9, 0xe5, 0x2b, 0x45, 0x2a, 0x70, 0x03, 0x02, 0x03, 0x78} },
-{ 0x01f0,      16,     {0xc3, 0xe5, 0x2b, 0x94, 0x40, 0xe5, 0x2a, 0x94, 0x00, 0x50, 0x08, 0x85, 0x2a, 0x2c, 0x85, 0x2b} },
-{ 0x0200,      16,     {0x2d, 0x80, 0x06, 0x75, 0x2c, 0x00, 0x75, 0x2d, 0x40, 0x90, 0x7f, 0xe9, 0xe0, 0x64, 0xa3, 0x70} },
-{ 0x0210,      16,     {0x34, 0xf5, 0x30, 0xf5, 0x31, 0xc3, 0xe5, 0x31, 0x95, 0x2d, 0xe5, 0x30, 0x95, 0x2c, 0x50, 0x5c} },
-{ 0x0220,      16,     {0xe5, 0x29, 0x25, 0x31, 0xf5, 0x82, 0xe5, 0x30, 0x35, 0x28, 0xf5, 0x83, 0xe0, 0xff, 0x74, 0x00} },
-{ 0x0230,      16,     {0x25, 0x31, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x05, 0x31, 0xe5, 0x31, 0x70} },
-{ 0x0240,      16,     {0x02, 0x05, 0x30, 0x80, 0xd0, 0xe4, 0xf5, 0x30, 0xf5, 0x31, 0xc3, 0xe5, 0x31, 0x95, 0x2d, 0xe5} },
-{ 0x0250,      16,     {0x30, 0x95, 0x2c, 0x50, 0x18, 0x74, 0x00, 0x25, 0x31, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83} },
-{ 0x0260,      16,     {0x74, 0xcd, 0xf0, 0x05, 0x31, 0xe5, 0x31, 0x70, 0x02, 0x05, 0x30, 0x80, 0xdd, 0xaf, 0x29, 0xae} },
-{ 0x0270,      16,     {0x28, 0xad, 0x2d, 0x7a, 0x7f, 0x79, 0x00, 0x7b, 0x00, 0x12, 0x0b, 0xf4, 0x90, 0x7f, 0xb5, 0xe5} },
-{ 0x0280,      16,     {0x2d, 0xf0, 0xe5, 0x2d, 0x25, 0x29, 0xf5, 0x29, 0xe5, 0x2c, 0x35, 0x28, 0xf5, 0x28, 0xc3, 0xe5} },
-{ 0x0290,      16,     {0x2b, 0x95, 0x2d, 0xf5, 0x2b, 0xe5, 0x2a, 0x95, 0x2c, 0xf5, 0x2a, 0x90, 0x7f, 0x92, 0xe0, 0xff} },
-{ 0x02a0,      16,     {0xc4, 0x54, 0x0f, 0x75, 0x2e, 0x00, 0xf5, 0x2f, 0xd3, 0x94, 0x00, 0xe5, 0x2e, 0x94, 0x00, 0x50} },
-{ 0x02b0,      16,     {0x0c, 0x90, 0x7f, 0xb4, 0xe0, 0x20, 0xe1, 0x03, 0x02, 0x01, 0xe7, 0x80, 0xf4, 0x90, 0x7f, 0xb4} },
-{ 0x02c0,      16,     {0xe0, 0x20, 0xe2, 0x03, 0x02, 0x01, 0xe7, 0x80, 0xf4, 0x90, 0x7f, 0xe8, 0xe0, 0x64, 0x40, 0x60} },
-{ 0x02d0,      16,     {0x03, 0x02, 0x03, 0x78, 0xe5, 0x2b, 0x45, 0x2a, 0x70, 0x03, 0x02, 0x03, 0x78, 0xe4, 0x90, 0x7f} },
-{ 0x02e0,      16,     {0xc5, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4, 0x54, 0x0f, 0x75, 0x2e, 0x00, 0xf5, 0x2f, 0xd3} },
-{ 0x02f0,      16,     {0x94, 0x00, 0xe5, 0x2e, 0x94, 0x00, 0x50, 0x09, 0x90, 0x7f, 0xc4, 0xe0, 0x30, 0xe1, 0x09, 0x80} },
-{ 0x0300,      16,     {0xf7, 0x90, 0x7f, 0xb4, 0xe0, 0x20, 0xe3, 0xf9, 0x90, 0x7f, 0xc5, 0xe0, 0x75, 0x2c, 0x00, 0xf5} },
-{ 0x0310,      16,     {0x2d, 0x90, 0x7f, 0xe9, 0xe0, 0x64, 0xa3, 0x70, 0x34, 0xf5, 0x30, 0xf5, 0x31, 0xc3, 0xe5, 0x31} },
-{ 0x0320,      16,     {0x95, 0x2d, 0xe5, 0x30, 0x95, 0x2c, 0x50, 0x34, 0x74, 0xc0, 0x25, 0x31, 0xf5, 0x82, 0xe4, 0x34} },
-{ 0x0330,      1,      {0x7e} },
-{ 0x0331,      16,     {0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x29, 0x25, 0x31, 0xf5, 0x82, 0xe5, 0x30, 0x35, 0x28, 0xf5, 0x83} },
-{ 0x0341,      16,     {0xef, 0xf0, 0x05, 0x31, 0xe5, 0x31, 0x70, 0x02, 0x05, 0x30, 0x80, 0xd0, 0xaf, 0x29, 0xae, 0x28} },
-{ 0x0351,      16,     {0xad, 0x2d, 0x7a, 0x7e, 0x79, 0xc0, 0x7b, 0xc0, 0x12, 0x0c, 0x3f, 0xe5, 0x2d, 0x25, 0x29, 0xf5} },
-{ 0x0361,      16,     {0x29, 0xe5, 0x2c, 0x35, 0x28, 0xf5, 0x28, 0xc3, 0xe5, 0x2b, 0x95, 0x2d, 0xf5, 0x2b, 0xe5, 0x2a} },
-{ 0x0371,      9,      {0x95, 0x2c, 0xf5, 0x2a, 0x02, 0x02, 0xd4, 0xc3, 0x22} },
-{ 0x037a,      16,     {0x90, 0x7f, 0xe9, 0xe0, 0x70, 0x03, 0x02, 0x04, 0x52, 0x14, 0x70, 0x03, 0x02, 0x04, 0xce, 0x24} },
-{ 0x038a,      16,     {0xfe, 0x70, 0x03, 0x02, 0x05, 0x42, 0x24, 0xfb, 0x70, 0x03, 0x02, 0x04, 0x4c, 0x14, 0x70, 0x03} },
-{ 0x039a,      16,     {0x02, 0x04, 0x46, 0x14, 0x70, 0x03, 0x02, 0x04, 0x3a, 0x14, 0x70, 0x03, 0x02, 0x04, 0x40, 0x24} },
-{ 0x03aa,      16,     {0x05, 0x60, 0x03, 0x02, 0x05, 0x96, 0x12, 0x0e, 0x44, 0x40, 0x03, 0x02, 0x05, 0xa2, 0x90, 0x7f} },
-{ 0x03ba,      16,     {0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x40, 0x24, 0x02, 0x70, 0x69, 0x74, 0x11, 0x90} },
-{ 0x03ca,      16,     {0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xea, 0xe0} },
-{ 0x03da,      16,     {0xff, 0x12, 0x0b, 0x58, 0x8b, 0x25, 0x8a, 0x26, 0x89, 0x27, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02} },
-{ 0x03ea,      16,     {0xee, 0x90, 0x7f, 0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xa2, 0x90} },
-{ 0x03fa,      16,     {0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x08} },
-{ 0x040a,      16,     {0xba, 0x8b, 0x25, 0x8a, 0x26, 0x89, 0x27, 0xea, 0x49, 0x60, 0x11, 0xae, 0x02, 0xee, 0x90, 0x7f} },
-{ 0x041a,      16,     {0xd4, 0xf0, 0xaf, 0x01, 0xef, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xb4, 0xe0} },
-{ 0x042a,      16,     {0x44, 0x01, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa2} },
-{ 0x043a,      16,     {0x12, 0x0e, 0x1f, 0x02, 0x05, 0xa2, 0x12, 0x0e, 0x2d, 0x02, 0x05, 0xa2, 0x12, 0x0a, 0xf7, 0x02} },
-{ 0x044a,      16,     {0x05, 0xa2, 0x12, 0x0e, 0x11, 0x02, 0x05, 0xa2, 0x12, 0x0e, 0x46, 0x40, 0x03, 0x02, 0x05, 0xa2} },
-{ 0x045a,      16,     {0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02, 0x70, 0x5b, 0xa2} },
-{ 0x046a,      16,     {0x00, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x02, 0xe4, 0x33, 0x4f, 0x90, 0x7f, 0x00, 0xf0} },
-{ 0x047a,      16,     {0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa2, 0xe4, 0x90, 0x7f, 0x00} },
-{ 0x048a,      16,     {0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xec, 0xe0} },
-{ 0x049a,      16,     {0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4} },
-{ 0x04aa,      16,     {0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0x90, 0x7f, 0x00, 0xf0, 0xe4, 0xa3} },
-{ 0x04ba,      16,     {0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01} },
-{ 0x04ca,      16,     {0xf0, 0x02, 0x05, 0xa2, 0x12, 0x0e, 0x48, 0x40, 0x03, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xe8, 0xe0} },
-{ 0x04da,      16,     {0x24, 0xfe, 0x60, 0x1d, 0x24, 0x02, 0x60, 0x03, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xea, 0xe0, 0xb4} },
-{ 0x04ea,      16,     {0x01, 0x05, 0xc2, 0x00, 0x02, 0x05, 0xa2, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05} },
-{ 0x04fa,      16,     {0xa2, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x38, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4} },
-{ 0x050a,      16,     {0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f} },
-{ 0x051a,      16,     {0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x7f, 0xec, 0xe0, 0x54, 0x80, 0xff, 0x13, 0x13, 0x13, 0x54, 0x1f} },
-{ 0x052a,      16,     {0xff, 0xe0, 0x54, 0x07, 0x2f, 0x90, 0x7f, 0xd7, 0xf0, 0xe0, 0x44, 0x20, 0xf0, 0x80, 0x69, 0x90} },
-{ 0x053a,      16,     {0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x60, 0x12, 0x0e, 0x4a, 0x50, 0x5b, 0x90, 0x7f, 0xe8} },
-{ 0x054a,      16,     {0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4f, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04} },
-{ 0x055a,      16,     {0xd2, 0x00, 0x80, 0x44, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x3b, 0x90, 0x7f, 0xea} },
-{ 0x056a,      16,     {0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0} },
-{ 0x057a,      16,     {0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01} },
-{ 0x058a,      16,     {0xf0, 0x80, 0x15, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x0c, 0x12, 0x01, 0x00, 0x50} },
-{ 0x059a,      16,     {0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0, 0x22} },
-{ 0x05aa,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} },
-{ 0x05ba,      16,     {0xd0, 0xc0, 0x00, 0xc0, 0x01, 0xc0, 0x02, 0xc0, 0x03, 0xc0, 0x06, 0xc0, 0x07, 0x90, 0x7f, 0xa5} },
-{ 0x05ca,      16,     {0xe0, 0x30, 0xe2, 0x06, 0x75, 0x0d, 0x06, 0x02, 0x06, 0x76, 0x90, 0x7f, 0xa5, 0xe0, 0x20, 0xe1} },
-{ 0x05da,      16,     {0x0c, 0xe5, 0x0d, 0x64, 0x02, 0x60, 0x06, 0x75, 0x0d, 0x07, 0x02, 0x06, 0x76, 0xaf, 0x0d, 0xef} },
-{ 0x05ea,      16,     {0x24, 0xfe, 0x60, 0x48, 0x14, 0x60, 0x2c, 0x24, 0xfe, 0x60, 0x77, 0x24, 0x04, 0x60, 0x03, 0x02} },
-{ 0x05fa,      16,     {0x06, 0x76, 0xab, 0x09, 0xaa, 0x0a, 0xa9, 0x0b, 0xaf, 0x0c, 0x05, 0x0c, 0x8f, 0x82, 0x75, 0x83} },
-{ 0x060a,      16,     {0x00, 0x12, 0x08, 0x22, 0x90, 0x7f, 0xa6, 0xf0, 0xe5, 0x0c, 0x65, 0x08, 0x70, 0x5e, 0x75, 0x0d} },
-{ 0x061a,      16,     {0x05, 0x80, 0x59, 0x90, 0x7f, 0xa6, 0xe0, 0xab, 0x09, 0xaa, 0x0a, 0xa9, 0x0b, 0xae, 0x0c, 0x8e} },
-{ 0x062a,      16,     {0x82, 0x75, 0x83, 0x00, 0x12, 0x08, 0x4f, 0x75, 0x0d, 0x02, 0x80, 0x40, 0xe5, 0x08, 0x24, 0xfe} },
-{ 0x063a,      16,     {0xb5, 0x0c, 0x07, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x20, 0xf0, 0xe5, 0x08, 0x14, 0xb5, 0x0c, 0x0a} },
-{ 0x064a,      16,     {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe4, 0xf5, 0x0d, 0x90, 0x7f, 0xa6, 0xe0, 0xab, 0x09} },
-{ 0x065a,      16,     {0xaa, 0x0a, 0xa9, 0x0b, 0xae, 0x0c, 0x8e, 0x82, 0x75, 0x83, 0x00, 0x12, 0x08, 0x4f, 0x05, 0x0c} },
-{ 0x066a,      16,     {0x80, 0x0a, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe4, 0xf5, 0x0d, 0x53, 0x91, 0xdf, 0xd0} },
-{ 0x067a,      16,     {0x07, 0xd0, 0x06, 0xd0, 0x03, 0xd0, 0x02, 0xd0, 0x01, 0xd0, 0x00, 0xd0, 0xd0, 0xd0, 0x86, 0xd0} },
-{ 0x068a,      10,     {0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0694,      16,     {0x8c, 0x33, 0x8d, 0x34, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0xc0, 0xf0, 0xe4, 0xf5, 0x35, 0xf5, 0x36} },
-{ 0x06a4,      16,     {0xc3, 0xe5, 0x36, 0x95, 0x34, 0xe5, 0x35, 0x95, 0x33, 0x50, 0x69, 0xef, 0x25, 0x36, 0xf5, 0x82} },
-{ 0x06b4,      16,     {0xe5, 0x35, 0x3e, 0xf5, 0x83, 0x74, 0xff, 0xf0, 0xf4, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x36} },
-{ 0x06c4,      16,     {0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0xe4, 0xf0, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x36} },
-{ 0x06d4,      16,     {0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0x74, 0xaa, 0xf0, 0x64, 0xaa, 0x60, 0x02, 0xc3, 0x22} },
-{ 0x06e4,      16,     {0xef, 0x25, 0x36, 0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0x74, 0x55, 0xf0, 0x64, 0x55, 0x60} },
-{ 0x06f4,      16,     {0x02, 0xc3, 0x22, 0xad, 0x36, 0xe5, 0x36, 0x2f, 0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0xed} },
-{ 0x0704,      16,     {0xf0, 0xfc, 0xac, 0x05, 0xed, 0x6c, 0x60, 0x02, 0xc3, 0x22, 0x05, 0x36, 0xe5, 0x36, 0x70, 0x02} },
-{ 0x0714,      16,     {0x05, 0x35, 0x80, 0x8c, 0xe4, 0xf5, 0x35, 0xf5, 0x36, 0xc3, 0xe5, 0x36, 0x95, 0x34, 0xe5, 0x35} },
-{ 0x0724,      16,     {0x95, 0x33, 0x50, 0x27, 0xef, 0x25, 0x36, 0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0xe0, 0x65} },
-{ 0x0734,      16,     {0x36, 0x60, 0x02, 0xc3, 0x22, 0xef, 0x25, 0x36, 0xf5, 0x82, 0xe5, 0x35, 0x3e, 0xf5, 0x83, 0xe4} },
-{ 0x0744,      13,     {0xf0, 0x05, 0x36, 0xe5, 0x36, 0x70, 0x02, 0x05, 0x35, 0x80, 0xce, 0xd3, 0x22} },
-{ 0x0751,      16,     {0xc2, 0x04, 0xd2, 0x05, 0xc2, 0x03, 0xc2, 0x00, 0xc2, 0x02, 0xc2, 0x01, 0x12, 0x0e, 0x3d, 0xd2} },
-{ 0x0761,      16,     {0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xa9, 0xf0, 0x90, 0x7f} },
-{ 0x0771,      16,     {0xaa, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f, 0x95, 0xe0, 0x44, 0xc0, 0xf0, 0x90, 0x7f, 0x93, 0x74} },
-{ 0x0781,      16,     {0x30, 0xf0, 0x12, 0x0a, 0x19, 0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0} },
-{ 0x0791,      16,     {0x44, 0x0d, 0xf0, 0xd2, 0xaf, 0x12, 0x0e, 0x35, 0x20, 0x01, 0x42, 0x75, 0x24, 0x00, 0x75, 0x23} },
-{ 0x07a1,      16,     {0x00, 0x75, 0x22, 0x00, 0x75, 0x21, 0x00, 0x7f, 0x48, 0x7e, 0x92, 0x7d, 0x00, 0x7c, 0x00, 0xab} },
-{ 0x07b1,      16,     {0x24, 0xaa, 0x23, 0xa9, 0x22, 0xa8, 0x21, 0xc3, 0x12, 0x08, 0xa9, 0x50, 0xdb, 0x20, 0x01, 0xd8} },
-{ 0x07c1,      16,     {0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0xe5, 0x24, 0x24, 0x01, 0xf5, 0x24, 0xea, 0x35, 0x23, 0xf5} },
-{ 0x07d1,      16,     {0x23, 0xe9, 0x35, 0x22, 0xf5, 0x22, 0xe8, 0x35, 0x21, 0xf5, 0x21, 0x80, 0xca, 0x30, 0x01, 0x05} },
-{ 0x07e1,      16,     {0x12, 0x03, 0x7a, 0xc2, 0x01, 0x30, 0x04, 0x1a, 0x12, 0x0e, 0x40, 0x50, 0x13, 0x12, 0x09, 0x00} },
-{ 0x07f1,      16,     {0x30, 0x00, 0x07, 0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0xf3, 0x12, 0x0d, 0x4a, 0x12, 0x0e, 0x42} },
-{ 0x0801,      8,      {0xc2, 0x03, 0x12, 0x08, 0xff, 0x80, 0xd6, 0x22} },
-{ 0x0809,      16,     {0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02} },
-{ 0x0819,      9,      {0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22} },
-{ 0x0822,      16,     {0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50} },
-{ 0x0832,      16,     {0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22} },
-{ 0x0842,      13,     {0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22} },
-{ 0x084f,      16,     {0xf8, 0xbb, 0x01, 0x0d, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe8, 0xf0} },
-{ 0x085f,      16,     {0x22, 0x50, 0x06, 0xe9, 0x25, 0x82, 0xc8, 0xf6, 0x22, 0xbb, 0xfe, 0x05, 0xe9, 0x25, 0x82, 0xc8} },
-{ 0x086f,      2,      {0xf2, 0x22} },
-{ 0x0871,      16,     {0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0} },
-{ 0x0881,      16,     {0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe} },
-{ 0x0891,      16,     {0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83} },
-{ 0x08a1,      8,      {0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22} },
-{ 0x08a9,      16,     {0xeb, 0x9f, 0xf5, 0xf0, 0xea, 0x9e, 0x42, 0xf0, 0xe9, 0x9d, 0x42, 0xf0, 0xe8, 0x9c, 0x45, 0xf0} },
-{ 0x08b9,      1,      {0x22} },
-{ 0x08ba,      2,      {0x8f, 0x28} },
-{ 0x08bc,      16,     {0xe4, 0xf5, 0x29, 0x75, 0x2a, 0xff, 0x75, 0x2b, 0x11, 0x75, 0x2c, 0x32, 0xab, 0x2a, 0xaa, 0x2b} },
-{ 0x08cc,      16,     {0xa9, 0x2c, 0x90, 0x00, 0x01, 0x12, 0x08, 0x22, 0xb4, 0x03, 0x1d, 0xaf, 0x29, 0x05, 0x29, 0xef} },
-{ 0x08dc,      16,     {0xb5, 0x28, 0x01, 0x22, 0x12, 0x08, 0x09, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75} },
-{ 0x08ec,      14,     {0x2a, 0xff, 0xf5, 0x2b, 0x89, 0x2c, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
-{ 0x08fa,      1,      {0x22} },
-{ 0x08fb,      4,      {0x53, 0xd8, 0xef, 0x32} },
-{ 0x08ff,      1,      {0x22} },
-{ 0x0900,      9,      {0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x74} },
-{ 0x097d,      16,     {0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22} },
-{ 0x098d,      12,     {0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x39, 0x02, 0x09, 0xd4} },
-{ 0x0999,      16,     {0x02, 0x07, 0x51, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2} },
-{ 0x09a9,      16,     {0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33} },
-{ 0x09b9,      16,     {0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf} },
-{ 0x09c9,      16,     {0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x0d, 0xec, 0xe4, 0x7e} },
-{ 0x09d9,      16,     {0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93} },
-{ 0x09e9,      16,     {0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3} },
-{ 0x09f9,      16,     {0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca} },
-{ 0x0a09,      16,     {0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe} },
-{ 0x0a19,      16,     {0xe4, 0x90, 0x7f, 0x9c, 0xf0, 0x7f, 0x0a, 0xfe, 0x12, 0x0d, 0x94, 0x90, 0x7f, 0x96, 0x74, 0x89} },
-{ 0x0a29,      16,     {0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xcf, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x0d, 0x94, 0x90, 0x7f} },
-{ 0x0a39,      16,     {0x96, 0xe0, 0x54, 0xfe, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x0d, 0x94, 0x7f, 0x05, 0x7e, 0x00} },
-{ 0x0a49,      16,     {0x12, 0x0d, 0x94, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x02, 0xf0, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0x05} },
-{ 0x0a59,      16,     {0x7e, 0x00, 0x12, 0x0d, 0x94, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x05, 0x7e, 0x00} },
-{ 0x0a69,      16,     {0x12, 0x0d, 0x94, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x0d} },
-{ 0x0a79,      16,     {0x94, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x0d, 0x94, 0x22} },
-{ 0x0a89,      16,     {0x75, 0x32, 0x01, 0xe5, 0x32, 0x60, 0x1b, 0x7f, 0x01, 0x12, 0x0d, 0xd7, 0x7f, 0x00, 0x7e, 0x0e} },
-{ 0x0a99,      16,     {0x7d, 0x00, 0x7c, 0x01, 0x12, 0x06, 0x94, 0xe4, 0x33, 0xf5, 0x32, 0x70, 0x05, 0x7f, 0x0f, 0x12} },
-{ 0x0aa9,      16,     {0x0d, 0xd7, 0xe5, 0x32, 0x60, 0x1b, 0x7f, 0x02, 0x12, 0x0d, 0xd7, 0x7f, 0x00, 0x7e, 0x80, 0x7d} },
-{ 0x0ab9,      16,     {0x00, 0x7c, 0x80, 0x12, 0x06, 0x94, 0xe4, 0x33, 0xf5, 0x32, 0x70, 0x05, 0x7f, 0x0f, 0x12, 0x0d} },
-{ 0x0ac9,      16,     {0xd7, 0xe5, 0x32, 0x60, 0x1b, 0x7f, 0x03, 0x12, 0x0d, 0xd7, 0x7f, 0x00, 0x7e, 0x20, 0x7d, 0x40} },
-{ 0x0ad9,      16,     {0x7c, 0x5b, 0x12, 0x06, 0x94, 0xe4, 0x33, 0xf5, 0x32, 0x70, 0x05, 0x7f, 0x0f, 0x12, 0x0d, 0xd7} },
-{ 0x0ae9,      14,     {0xe5, 0x32, 0x60, 0x05, 0xe4, 0xff, 0x12, 0x0d, 0xd7, 0xe5, 0x32, 0x24, 0xff, 0x22} },
-{ 0x0af7,      8,      {0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x10, 0xd3, 0x22} },
-{ 0x0aff,      1,      {0x32} },
-{ 0x0b00,      16,     {0x02, 0x0d, 0x64, 0x00, 0x02, 0x0d, 0xab, 0x00, 0x02, 0x0d, 0x2f, 0x00, 0x02, 0x0d, 0x7c, 0x00} },
-{ 0x0b10,      16,     {0x02, 0x0d, 0xc1, 0x00, 0x02, 0x0a, 0xff, 0x00, 0x02, 0x0e, 0x4c, 0x00, 0x02, 0x0e, 0x4d, 0x00} },
-{ 0x0b20,      16,     {0x02, 0x0e, 0x4e, 0x00, 0x02, 0x0e, 0x4f, 0x00, 0x02, 0x0e, 0x50, 0x00, 0x02, 0x0e, 0x51, 0x00} },
-{ 0x0b30,      16,     {0x02, 0x0e, 0x52, 0x00, 0x02, 0x0e, 0x53, 0x00, 0x02, 0x0e, 0x54, 0x00, 0x02, 0x0e, 0x55, 0x00} },
-{ 0x0b40,      16,     {0x02, 0x0e, 0x56, 0x00, 0x02, 0x0e, 0x57, 0x00, 0x02, 0x0e, 0x58, 0x00, 0x02, 0x0e, 0x59, 0x00} },
-{ 0x0b50,      8,      {0x02, 0x0e, 0x5a, 0x00, 0x02, 0x0e, 0x5b, 0x00} },
-{ 0x0b58,      16,     {0xe4, 0xfe, 0x75, 0x2a, 0xff, 0x75, 0x2b, 0x11, 0x75, 0x2c, 0x12, 0xab, 0x2a, 0xaa, 0x2b, 0xa9} },
-{ 0x0b68,      16,     {0x2c, 0x90, 0x00, 0x01, 0x12, 0x08, 0x22, 0x64, 0x02, 0x70, 0x2d, 0xad, 0x06, 0x0e, 0xed, 0xb5} },
-{ 0x0b78,      16,     {0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x08, 0x71, 0x85, 0xf0, 0x28, 0xf5, 0x29, 0x62, 0x28} },
-{ 0x0b88,      16,     {0xe5, 0x28, 0x62, 0x29, 0xe5, 0x29, 0x62, 0x28, 0x29, 0xfd, 0xe5, 0x28, 0x3a, 0xa9, 0x05, 0x75} },
-{ 0x0b98,      14,     {0x2a, 0xff, 0xf5, 0x2b, 0x89, 0x2c, 0x80, 0xc3, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} },
-{ 0x0ba6,      1,      {0x22} },
-{ 0x0ba7,      16,     {0xab, 0x07, 0xaa, 0x06, 0xac, 0x05, 0xe4, 0xfd, 0xe5, 0x11, 0x60, 0x11, 0xea, 0xff, 0xae, 0x05} },
-{ 0x0bb7,      16,     {0x0d, 0xee, 0x24, 0x10, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xef, 0xf0, 0xeb, 0xae, 0x05} },
-{ 0x0bc7,      16,     {0x0d, 0x74, 0x10, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xeb, 0xf0, 0xaf, 0x05, 0x0d} },
-{ 0x0bd7,      16,     {0x74, 0x10, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xf5, 0x83, 0xec, 0xf0, 0xaf, 0x0f, 0x7a, 0x0f} },
-{ 0x0be7,      13,     {0x7b, 0x10, 0x12, 0x0d, 0x10, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x0d, 0x94, 0x22} },
-{ 0x0bf4,      16,     {0x8e, 0x32, 0x8f, 0x33, 0x8d, 0x34, 0x8a, 0x35, 0x8b, 0x36, 0xe4, 0xfd, 0xf5, 0x37, 0xe5, 0x11} },
-{ 0x0c04,      16,     {0x60, 0x12, 0xe5, 0x32, 0xff, 0xae, 0x05, 0x0d, 0xee, 0x24, 0x13, 0xf5, 0x82, 0xe4, 0x34, 0x0f} },
-{ 0x0c14,      16,     {0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x33, 0xae, 0x05, 0x0d, 0x74, 0x13, 0x2e, 0xf5, 0x82, 0xe4, 0x34} },
-{ 0x0c24,      16,     {0x0f, 0xf5, 0x83, 0xe5, 0x33, 0xf0, 0xaf, 0x0f, 0x7a, 0x0f, 0x7b, 0x13, 0x12, 0x0d, 0x10, 0xaf} },
-{ 0x0c34,      11,     {0x0f, 0xad, 0x34, 0xab, 0x36, 0xaa, 0x35, 0x12, 0x0c, 0xf1, 0x22} },
-{ 0x0c3f,      16,     {0x8e, 0x32, 0x8f, 0x33, 0x8d, 0x34, 0x8a, 0x35, 0x8b, 0x36, 0xe4, 0xf5, 0x37, 0xe5, 0x37, 0xc3} },
-{ 0x0c4f,      16,     {0x95, 0x34, 0x50, 0x20, 0x05, 0x33, 0xe5, 0x33, 0xae, 0x32, 0x70, 0x02, 0x05, 0x32, 0x14, 0xff} },
-{ 0x0c5f,      16,     {0xe5, 0x36, 0x25, 0x37, 0xf5, 0x82, 0xe4, 0x35, 0x35, 0xf5, 0x83, 0xe0, 0xfd, 0x12, 0x0b, 0xa7} },
-{ 0x0c6f,      5,      {0x05, 0x37, 0x80, 0xd9, 0x22} },
-{ 0x0c74,      16,     {0xa9, 0x07, 0xe5, 0x0d, 0x70, 0x25, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xe9, 0x25, 0xe0} },
-{ 0x0c84,      16,     {0x44, 0x01, 0x90, 0x7f, 0xa6, 0xf0, 0x8d, 0x08, 0xaf, 0x03, 0xa9, 0x07, 0x75, 0x09, 0x01, 0x8a} },
-{ 0x0c94,      13,     {0x0a, 0x89, 0x0b, 0xe4, 0xf5, 0x0c, 0x75, 0x0d, 0x03, 0xd3, 0x22, 0xc3, 0x22} },
-{ 0x0ca1,      16,     {0xa9, 0x07, 0xe5, 0x0d, 0x70, 0x23, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xe9, 0x25, 0xe0} },
-{ 0x0cb1,      16,     {0x90, 0x7f, 0xa6, 0xf0, 0x8d, 0x08, 0xaf, 0x03, 0xa9, 0x07, 0x75, 0x09, 0x01, 0x8a, 0x0a, 0x89} },
-{ 0x0cc1,      11,     {0x0b, 0xe4, 0xf5, 0x0c, 0x75, 0x0d, 0x01, 0xd3, 0x22, 0xc3, 0x22} },
-{ 0x0ccc,      16,     {0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x06, 0x04, 0xe0, 0x44} },
-{ 0x0cdc,      16,     {0x02, 0xf0, 0x7f, 0xd0, 0x7e, 0x07, 0x12, 0x0d, 0x94, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0} },
-{ 0x0cec,      5,      {0xe0, 0x44, 0x04, 0xf0, 0x22} },
-{ 0x0cf1,      16,     {0x12, 0x0c, 0x74, 0xe5, 0x0d, 0x24, 0xfa, 0x60, 0x10, 0x14, 0x60, 0x07, 0x24, 0x07, 0x70, 0xf3} },
-{ 0x0d01,      15,     {0x7f, 0x08, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x07, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x06, 0x22} },
-{ 0x0d10,      16,     {0x12, 0x0c, 0xa1, 0xe5, 0x0d, 0x24, 0xfa, 0x60, 0x10, 0x14, 0x60, 0x07, 0x24, 0x07, 0x70, 0xf3} },
-{ 0x0d20,      15,     {0x7f, 0x08, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x07, 0x22, 0xe4, 0xf5, 0x0d, 0x7f, 0x06, 0x22} },
-{ 0x0d2f,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f} },
-{ 0x0d3f,      11,     {0xab, 0x74, 0x04, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0d4a,      16,     {0x90, 0x7f, 0xd6, 0xe0, 0x30, 0xe7, 0x12, 0xe0, 0x44, 0x01, 0xf0, 0x7f, 0x14, 0x7e, 0x00, 0x12} },
-{ 0x0d5a,      10,     {0x0d, 0x94, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfe, 0xf0, 0x22} },
-{ 0x0d64,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x01, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01} },
-{ 0x0d74,      8,      {0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0d7c,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x03, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x08} },
-{ 0x0d8c,      8,      {0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0d94,      16,     {0x8e, 0x38, 0x8f, 0x39, 0xe5, 0x39, 0x15, 0x39, 0xae, 0x38, 0x70, 0x02, 0x15, 0x38, 0x4e, 0x60} },
-{ 0x0da4,      7,      {0x05, 0x12, 0x0e, 0x00, 0x80, 0xee, 0x22} },
-{ 0x0dab,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x02, 0xf0, 0xd0} },
-{ 0x0dbb,      6,      {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0dc1,      16,     {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x10, 0xf0, 0xd0} },
-{ 0x0dd1,      6,      {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} },
-{ 0x0dd7,      16,     {0xae, 0x07, 0x7f, 0x21, 0x7d, 0x01, 0x74, 0x00, 0x2e, 0xf5, 0x82, 0xe4, 0x34, 0x0f, 0xab, 0x82} },
-{ 0x0de7,      5,      {0xfa, 0x12, 0x0d, 0x10, 0x22} },
-{ 0x0dec,      16,     {0x50, 0x0f, 0x00, 0xc0, 0xf9, 0xa4, 0xb0, 0x99, 0x92, 0x82, 0xf8, 0x80, 0x98, 0x88, 0x83, 0xc6} },
-{ 0x0dfc,      3,      {0xa1, 0x86, 0x8e} },
-{ 0x0dff,      1,      {0x00} },
-{ 0x0e00,      16,     {0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9} },
-{ 0x0e10,      1,      {0x22} },
-{ 0x0e11,      14,     {0x90, 0x7f, 0x00, 0xe5, 0x10, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0xd3, 0x22} },
-{ 0x0e1f,      14,     {0x90, 0x7f, 0x00, 0xe5, 0x0e, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0xd3, 0x22} },
-{ 0x0e2d,      8,      {0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x0e, 0xd3, 0x22} },
-{ 0x0e35,      8,      {0xe4, 0xf5, 0x0d, 0xd2, 0xe9, 0xd2, 0xaf, 0x22} },
-{ 0x0e3d,      3,      {0xd2, 0x00, 0x22} },
-{ 0x0e40,      2,      {0xd3, 0x22} },
-{ 0x0e42,      2,      {0xd3, 0x22} },
-{ 0x0e44,      2,      {0xd3, 0x22} },
-{ 0x0e46,      2,      {0xd3, 0x22} },
-{ 0x0e48,      2,      {0xd3, 0x22} },
-{ 0x0e4a,      2,      {0xd3, 0x22} },
-{ 0x0e4c,      1,      {0x32} },
-{ 0x0e4d,      1,      {0x32} },
-{ 0x0e4e,      1,      {0x32} },
-{ 0x0e4f,      1,      {0x32} },
-{ 0x0e50,      1,      {0x32} },
-{ 0x0e51,      1,      {0x32} },
-{ 0x0e52,      1,      {0x32} },
-{ 0x0e53,      1,      {0x32} },
-{ 0x0e54,      1,      {0x32} },
-{ 0x0e55,      1,      {0x32} },
-{ 0x0e56,      1,      {0x32} },
-{ 0x0e57,      1,      {0x32} },
-{ 0x0e58,      1,      {0x32} },
-{ 0x0e59,      1,      {0x32} },
-{ 0x0e5a,      1,      {0x32} },
-{ 0x0e5b,      1,      {0x32} },
-{ 0x1100,      16,     {0x12, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x40, 0x47, 0x05, 0x10, 0x27, 0x01, 0x00, 0x01, 0x02} },
-{ 0x1110,      16,     {0x00, 0x01, 0x09, 0x02, 0x20, 0x00, 0x01, 0x01, 0x03, 0xa0, 0x00, 0x09, 0x04, 0x00, 0x00, 0x02} },
-{ 0x1120,      16,     {0xff, 0x00, 0x00, 0x04, 0x07, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x02, 0x02, 0x40} },
-{ 0x1130,      16,     {0x00, 0x00, 0x04, 0x03, 0x09, 0x04, 0x26, 0x03, 0x41, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x68, 0x00} },
-{ 0x1140,      16,     {0x6f, 0x00, 0x72, 0x00, 0x20, 0x00, 0x43, 0x00, 0x68, 0x00, 0x69, 0x00, 0x70, 0x00, 0x73, 0x00} },
-{ 0x1150,      16,     {0x2c, 0x00, 0x20, 0x00, 0x49, 0x00, 0x6e, 0x00, 0x63, 0x00, 0x2e, 0x00, 0x28, 0x03, 0x46, 0x00} },
-{ 0x1160,      16,     {0x69, 0x00, 0x72, 0x00, 0x6d, 0x00, 0x77, 0x00, 0x61, 0x00, 0x72, 0x00, 0x65, 0x00, 0x20, 0x00} },
-{ 0x1170,      16,     {0x46, 0x00, 0x72, 0x00, 0x61, 0x00, 0x6d, 0x00, 0x65, 0x00, 0x57, 0x00, 0x6f, 0x00, 0x72, 0x00} },
-{ 0x1180,      16,     {0x6b, 0x00, 0x73, 0x00, 0x2a, 0x03, 0x43, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x66, 0x00, 0x69, 0x00} },
-{ 0x1190,      16,     {0x67, 0x00, 0x75, 0x00, 0x72, 0x00, 0x61, 0x00, 0x74, 0x00, 0x69, 0x00, 0x6f, 0x00, 0x6e, 0x00} },
-{ 0x11a0,      16,     {0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00, 0x22, 0x03} },
-{ 0x11b0,      16,     {0x49, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x65, 0x00, 0x72, 0x00, 0x66, 0x00, 0x61, 0x00, 0x63, 0x00} },
-{ 0x11c0,      16,     {0x65, 0x00, 0x20, 0x00, 0x53, 0x00, 0x74, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x67, 0x00} },
-{ 0x11d0,      2,      {0x00, 0x00} },
-{ 0xffff,      0,      {0x00} }
-};
-#endif
index 5b78c939c2770078412ea96e2dff906de8d0cc97..f7fe199654256c0110d13d7cc234d617e7cd15ca 100644 (file)
@@ -2689,15 +2689,6 @@ static int encode_fix(struct fb_fix_screeninfo *fix,
     fix->smem_start = info->frame_buffer_phys;
     fix->smem_len = (u32)info->total_vram;
 
-#ifdef __LITTLE_ENDIAN
-    /*
-     *  Last page of 8 MB little-endian aperture is MMIO
-     *  FIXME: we should use the auxiliary aperture instead so we can acces the
-     *  full 8 MB of video RAM on 8 MB boards
-     */
-    if (fix->smem_len > 0x800000-GUI_RESERVE)
-       fix->smem_len = 0x800000-GUI_RESERVE;
-#endif
     /*
      *  Reg Block 0 (CT-compatible block) is at ati_regbase_phys
      *  Reg Block 1 (multimedia extensions) is at ati_regbase_phys-0x400
@@ -3501,14 +3492,17 @@ static int __init aty_init(struct fb_info_aty *info, const char *name)
     }
 #endif
 
-    if (info->bus_type == ISA)
-       if ((info->total_vram == 0x400000) || (info->total_vram == 0x800000)) {
-           /* protect GUI-regs if complete Aperture is VRAM */
+    /*
+     *  Last page of 8 MB (4 MB on ISA) aperture is MMIO
+     *  FIXME: we should use the auxiliary aperture instead so we can acces the
+     *  full 8 MB of video RAM on 8 MB boards
+     */
+    if (info->total_vram == 0x800000 ||
+       (info->bus_type == ISA && info->total_vram == 0x400000))
            info->total_vram -= GUI_RESERVE;
-       }
 
     /* Clear the video memory */
-    memset_io(info->frame_buffer, 0, info->total_vram);
+    fb_memset((void *)info->frame_buffer, 0, info->total_vram);
 
     disp = &info->disp;
 
@@ -3634,14 +3628,14 @@ int __init atyfb_init(void)
     struct pci_dev *pdev = NULL;
     struct fb_info_aty *info;
     unsigned long addr, res_start, res_size;
+    int i;
 #ifdef __sparc__
     extern void (*prom_palette) (int);
     extern int con_is_present(void);
     struct pcidev_cookie *pcp;
     char prop[128];
-    int node, len;
+    int node, len, j;
     u32 mem, chip_id;
-    int i, j;
 
     /* Do not attach when we have a serial console. */
     if (!con_is_present())
@@ -3654,6 +3648,12 @@ int __init atyfb_init(void)
        if ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY) {
            struct resource *rp;
 
+           for (i = sizeof(aty_features)/sizeof(*aty_features)-1; i >= 0; i--)
+               if (pdev->device == aty_features[i].pci_id)
+                   break;
+           if (i < 0)
+               continue;
+           
            info = kmalloc(sizeof(struct fb_info_aty), GFP_ATOMIC);
            if (!info) {
                printk("atyfb_init: can't alloc fb_info_aty\n");
index bbb695223dc36b59d6107284e2eaf91177bce3f6..b92ce4055918f66ffce3792da09ea35b169ce0fb 100644 (file)
@@ -287,6 +287,9 @@ static void* i2c_matroxfb_probe(struct matrox_fb_info* minfo) {
        matroxfb_DAC_unlock_irqrestore(flags);
 
        memset(m2info, 0, sizeof(*m2info));
+       m2info->maven.minfo = m2info;
+       m2info->ddc1.minfo = m2info;
+       m2info->ddc2.minfo = m2info;
        m2info->primary_dev = minfo;
 
        if (ACCESS_FBINFO(devflags.accelerator) == FB_ACCEL_MATROX_MGA2064W ||
index 978dba15616601966e64a0ec3242eca58a3aff94..e7d515ec2dbe63098b3c4fe75e11a118435c045e 100644 (file)
@@ -892,11 +892,8 @@ static struct matrox_altout maven_altout = {
 
 static int maven_init_client(struct i2c_client* clnt) {
        struct i2c_adapter* a = clnt->adapter;
-       /* data are set to primary head... maybe I should change it */
-       struct matroxfb_dh_maven_info* m2info =
-               (struct matroxfb_dh_maven_info*)(((u_int8_t*)a) - offsetof(struct matroxfb_dh_maven_info, maven.adapter));
+       struct matroxfb_dh_maven_info* m2info = ((struct i2c_bit_adapter*)a)->minfo;
        struct maven_data* md = clnt->data;
-       /* add some checks that m2info is matroxfb_dh_fb_info here... */
        struct matrox_fb_info* minfo = m2info->primary_dev;
 
        md->mode = MODE_MONITOR;
index cbf340e0aadd6f3c507eccf57f52c73d478a16db..060aa0b818641f36a77ccb2168d5266367571b78 100644 (file)
@@ -6,10 +6,13 @@
 #include <linux/i2c-algo-bit.h>
 #include "matroxfb_base.h"
 
+struct matroxfb_dh_maven_info;
+
 struct i2c_bit_adapter {
        struct i2c_adapter              adapter;
        int                             initialized;
        struct i2c_algo_bit_data        bac;
+       struct matroxfb_dh_maven_info  *minfo;
 };
 
 struct matroxfb_dh_maven_info {
index 5320478b01e718a2b7eb6a64a21993a28a24affa..da2cc0788d47f0c126ff0aff0a79fe4fc4fbe1f6 100644 (file)
@@ -158,7 +158,6 @@ static void adfs_put_super(struct super_block *sb)
        for (i = 0; i < sb->u.adfs_sb.s_map_size; i++)
                brelse(sb->u.adfs_sb.s_map[i].dm_bh);
        kfree(sb->u.adfs_sb.s_map);
-       MOD_DEC_USE_COUNT;
 }
 
 static int parse_options(struct super_block *sb, char *options)
@@ -316,8 +315,6 @@ struct super_block *adfs_read_super(struct super_block *sb, void *data, int sile
        if (parse_options(sb, data))
                goto error;
 
-       MOD_INC_USE_COUNT;
-       lock_super(sb);
        set_blocksize(dev, BLOCK_SIZE);
        if (!(bh = bread(dev, ADFS_DISCRECORD / BLOCK_SIZE, BLOCK_SIZE))) {
                adfs_error(sb, "unable to read superblock");
@@ -395,7 +392,6 @@ struct super_block *adfs_read_super(struct super_block *sb, void *data, int sile
         * set up enough so that we can read an inode
         */
        sb->s_op = &adfs_sops;
-       unlock_super(sb);
 
        dr = (struct adfs_discrecord *)(sb->u.adfs_sb.s_map[0].dm_bh->b_data + 4);
 
@@ -439,31 +435,24 @@ struct super_block *adfs_read_super(struct super_block *sb, void *data, int sile
 error_free_bh:
        brelse(bh);
 error_unlock:
-       unlock_super(sb);
 error_dec_use:
-       MOD_DEC_USE_COUNT;
 error:
-       sb->s_dev = 0;
        return NULL;
 }
 
-static struct file_system_type adfs_fs_type = {
-       "adfs", FS_REQUIRES_DEV, adfs_read_super, NULL
-};
+static DECLARE_FSTYPE_DEV(adfs_fs_type, "adfs", adfs_read_super);
 
-int __init init_adfs_fs(void)
+static int __init init_adfs_fs(void)
 {
        return register_filesystem(&adfs_fs_type);
 }
 
-#ifdef MODULE
-int init_module(void)
-{
-       return init_adfs_fs();
-}
-
-void cleanup_module(void)
+static void __exit exit_adfs_fs(void)
 {
        unregister_filesystem(&adfs_fs_type);
 }
-#endif
+
+EXPORT_NO_SYMBOLS;
+
+module_init(init_adfs_fs)
+module_exit(exit_adfs_fs)
index b74504c063c954c59eb721adff1ee6ffb179ffcc..5f2387bdecf39f5e9f8ee3452c3c232e49bb37df 100644 (file)
@@ -65,7 +65,6 @@ affs_put_super(struct super_block *sb)
         */
        set_blocksize(sb->s_dev, sb->u.affs_sb.s_blksize);
 
-       MOD_DEC_USE_COUNT;
        return;
 }
 
@@ -262,8 +261,6 @@ affs_read_super(struct super_block *s, void *data, int silent)
 
        pr_debug("AFFS: read_super(%s)\n",data ? (const char *)data : "no options");
 
-       MOD_INC_USE_COUNT;
-       lock_super(s);
        s->s_magic             = AFFS_SUPER_MAGIC;
        s->s_op                = &affs_sops;
        s->u.affs_sb.s_bitmap  = NULL;
@@ -547,7 +544,6 @@ nobitmap:
                goto out_no_root;
        s->s_root->d_op = &affs_dentry_operations;
 
-       unlock_super(s);
        /* Record date of last change if the bitmap was truncated and
         * create data zones if the volume is writable.
         */
@@ -615,9 +611,6 @@ out_free_prefix:
        if (s->u.affs_sb.s_prefix)
                kfree(s->u.affs_sb.s_prefix);
 out_fail:
-       s->s_dev = 0;
-       unlock_super(s);
-       MOD_DEC_USE_COUNT;
        return NULL;
 }
 
@@ -677,12 +670,7 @@ affs_statfs(struct super_block *sb, struct statfs *buf)
        return 0;
 }
 
-static struct file_system_type affs_fs_type = {
-       "affs",
-       FS_REQUIRES_DEV,
-       affs_read_super,
-       NULL
-};
+static DECLARE_FSTYPE_DEV(affs_fs_type, "affs", affs_read_super);
 
 int __init init_affs_fs(void)
 {
index 4c9e8fe76ac2037e04d4309bc2d370b0d8b40a80..0aaa8134a8675b352cf1512e908ef5473e7825c0 100644 (file)
 #include <linux/init.h>
 #include "autofs_i.h"
 
-static struct file_system_type autofs_fs_type = {
-       "autofs",
-       0,
-       autofs_read_super,
-       NULL
-};
+static DECLARE_FSTYPE(autofs_fs_type, "autofs", autofs_read_super, 0);
 
 static int __init init_autofs_fs(void)
 {
index 9fcf7dd4e8099d7daea44478857b5d47a1522b69..1aa665d1c8d956728f3f3ef696d7f5e30e2f5d60 100644 (file)
@@ -49,10 +49,6 @@ static void autofs_put_super(struct super_block *sb)
        kfree(sb->u.generic_sbp);
 
        DPRINTK(("autofs: shutting down\n"));
-       
-#ifdef MODULE
-       MOD_DEC_USE_COUNT;
-#endif
 }
 
 static int autofs_statfs(struct super_block *sb, struct statfs *buf);
@@ -141,9 +137,6 @@ struct super_block *autofs_read_super(struct super_block *s, void *data,
        struct autofs_sb_info *sbi;
        int minproto, maxproto;
 
-       MOD_INC_USE_COUNT;
-
-       lock_super(s);
        /* Super block already completed? */
        if (s->s_root)
                goto out_unlock;
@@ -167,7 +160,6 @@ struct super_block *autofs_read_super(struct super_block *s, void *data,
        s->s_magic = AUTOFS_SUPER_MAGIC;
        s->s_op = &autofs_sops;
        s->s_root = NULL;
-       unlock_super(s); /* shouldn't we keep it locked a while longer? */
 
        /*
         * Get the root inode and dentry, but defer checking for errors.
@@ -224,7 +216,6 @@ struct super_block *autofs_read_super(struct super_block *s, void *data,
         * Success ... somebody else completed the super block for us. 
         */ 
 out_unlock:
-       unlock_super(s);
        goto out_dec;
 out_fput:
        if (pipe)
@@ -235,7 +226,6 @@ out_dput:
        else
                iput(root_inode);
 out_dec:
-       MOD_DEC_USE_COUNT;
        return s;
        
        /*
@@ -246,14 +236,12 @@ fail_fput:
        /*
         * fput() can block, so we clear the super block first.
         */
-       s->s_dev = 0;
        fput(pipe);
        /* fall through */
 fail_dput:
        /*
         * dput() can block, so we clear the super block first.
         */
-       s->s_dev = 0;
        dput(root);
        goto fail_free;
 fail_iput:
@@ -261,16 +249,11 @@ fail_iput:
        /*
         * iput() can block, so we clear the super block first.
         */
-       s->s_dev = 0;
        iput(root_inode);
 fail_free:
        kfree(sbi);
-       goto fail_dec;
 fail_unlock:
-       unlock_super(s);
 fail_dec:
-       s->s_dev = 0;
-       MOD_DEC_USE_COUNT;
        return NULL;
 }
 
index 48bf60b5faa982d29560899b47e2c38d2e854a2f..baf12d9133d17341db3259d0d40bca51055fa872 100644 (file)
 #include <linux/init.h>
 #include "autofs_i.h"
 
-static struct file_system_type autofs_fs_type = {
-       "autofs",
-       0,
-       autofs4_read_super,
-       NULL
-};
+static DECLARE_FSTYPE(autofs_fs_type, "autofs", autofs4_read_super, 0);
 
 static int __init init_autofs4_fs(void)
 {
index cfb2b1180654b830fb37a239146b93a6d181ca96..b4ea73fdb8c30d1641b2bc15077cb2663a1f8e50 100644 (file)
@@ -103,10 +103,6 @@ static void autofs4_put_super(struct super_block *sb)
        kfree(sbi);
 
        DPRINTK(("autofs: shutting down\n"));
-       
-#ifdef MODULE
-       MOD_DEC_USE_COUNT;
-#endif
 }
 
 static void autofs4_umount_begin(struct super_block *sb)
@@ -219,9 +215,6 @@ struct super_block *autofs4_read_super(struct super_block *s, void *data,
        struct autofs_sb_info *sbi;
        int minproto, maxproto;
 
-       MOD_INC_USE_COUNT;
-
-       lock_super(s);
        /* Super block already completed? */
        if (s->s_root)
                goto out_unlock;
@@ -248,7 +241,6 @@ struct super_block *autofs4_read_super(struct super_block *s, void *data,
        s->s_magic = AUTOFS_SUPER_MAGIC;
        s->s_op = &autofs4_sops;
        s->s_root = NULL;
-       unlock_super(s); /* shouldn't we keep it locked a while longer? */
 
        /*
         * Get the root inode and dentry, but defer checking for errors.
@@ -315,7 +307,6 @@ struct super_block *autofs4_read_super(struct super_block *s, void *data,
         * Success ... somebody else completed the super block for us. 
         */ 
 out_unlock:
-       unlock_super(s);
        goto out_dec;
 out_fput:
        if (pipe)
@@ -326,7 +317,6 @@ out_dput:
        else
                iput(root_inode);
 out_dec:
-       MOD_DEC_USE_COUNT;
        return s;
        
        /*
@@ -337,14 +327,12 @@ fail_fput:
        /*
         * fput() can block, so we clear the super block first.
         */
-       s->s_dev = 0;
        fput(pipe);
        /* fall through */
 fail_dput:
        /*
         * dput() can block, so we clear the super block first.
         */
-       s->s_dev = 0;
        dput(root);
        goto fail_free;
 fail_iput:
@@ -352,16 +340,10 @@ fail_iput:
        /*
         * iput() can block, so we clear the super block first.
         */
-       s->s_dev = 0;
        iput(root_inode);
 fail_free:
        kfree(sbi);
-       goto fail_dec;
 fail_unlock:
-       unlock_super(s);
-fail_dec:
-       s->s_dev = 0;
-       MOD_DEC_USE_COUNT;
        return NULL;
 }
 
index 44e96e101127ba7387ad1a8252669f94d18a9971..38881a1b666e4ac16d4d0ec5d49aebfeffc24678 100644 (file)
@@ -182,7 +182,7 @@ static int bfs_unlink(struct inode * dir, struct dentry * dentry)
        }
        de->ino = 0;
        dir->i_version = ++event;
-       mark_buffer_dirty(bh, 1);
+       mark_buffer_dirty(bh, 0);
        dir->i_ctime = dir->i_mtime = CURRENT_TIME;
        mark_inode_dirty(dir);
        inode->i_nlink--;
@@ -242,7 +242,7 @@ static int bfs_rename(struct inode * old_dir, struct dentry * old_dentry,
                new_inode->i_ctime = CURRENT_TIME;
                mark_inode_dirty(new_inode);
        }
-       mark_buffer_dirty(old_bh, 1);
+       mark_buffer_dirty(old_bh, 0);
        error = 0;
 
 end_rename:
@@ -294,7 +294,7 @@ static int bfs_add_entry(struct inode * dir, const char * name, int namelen, int
                                de->ino = ino;
                                for (i=0; i<BFS_NAMELEN; i++)
                                        de->name[i] = (i < namelen) ? name[i] : 0;
-                               mark_buffer_dirty(bh, 1);
+                               mark_buffer_dirty(bh, 0);
                                brelse(bh);
                                return 0;
                        }
index aba9cefd1d57bdd3caad2727ebd128610e3aad1e..f5ef5e652a77858293af30a76540cfeb2815d1a7 100644 (file)
@@ -33,7 +33,7 @@ static int bfs_move_block(unsigned long from, unsigned long to, kdev_t dev)
                return -EIO;
        new = getblk(dev, to, BFS_BSIZE);
        memcpy(new->b_data, bh->b_data, bh->b_size);
-       mark_buffer_dirty(new, 1);
+       mark_buffer_dirty(new, 0);
        bforget(bh);
        brelse(new);
        return 0;
index affac9e13a4c810411d7470ff1dc2f01c0e51402..2c38ccafe5976d52afef6c8a08ee19d8367472e4 100644 (file)
@@ -124,7 +124,7 @@ static void bfs_write_inode(struct inode * inode)
        di->i_eblock = inode->iu_eblock;
        di->i_eoffset = di->i_sblock * BFS_BSIZE + inode->i_size - 1;
 
-       mark_buffer_dirty(bh, 1);
+       mark_buffer_dirty(bh, 0);
        brelse(bh);
 }
 
@@ -165,7 +165,7 @@ static void bfs_delete_inode(struct inode * inode)
        }
        di->i_ino = 0;
        di->i_sblock = 0;
-       mark_buffer_dirty(bh, 1);
+       mark_buffer_dirty(bh, 0);
        brelse(bh);
 
        /* if this was the last file, make the previous 
@@ -182,7 +182,6 @@ static void bfs_put_super(struct super_block *s)
 {
        brelse(s->su_sbh);
        kfree(s->su_imap);
-       MOD_DEC_USE_COUNT;
 }
 
 static int bfs_statfs(struct super_block *s, struct statfs *buf)
@@ -243,8 +242,6 @@ static struct super_block * bfs_read_super(struct super_block * s,
        struct inode * inode;
        int i, imap_len;
 
-       MOD_INC_USE_COUNT;
-       lock_super(s);
        dev = s->s_dev;
        set_blocksize(dev, BFS_BSIZE);
        s->s_blocksize = BFS_BSIZE;
@@ -316,22 +313,14 @@ static struct super_block * bfs_read_super(struct super_block * s,
                s->s_dirt = 1;
        } 
        dump_imap("read_super", s);
-       unlock_super(s);
        return s;
 
 out:
        brelse(bh);
-       s->s_dev = 0;
-       unlock_super(s);
-       MOD_DEC_USE_COUNT;
        return NULL;
 }
 
-static struct file_system_type bfs_fs_type = {
-       name:           "bfs",
-       fs_flags:       FS_REQUIRES_DEV,
-       read_super:     bfs_read_super,
-};
+static DECLARE_FSTYPE_DEV( bfs_fs_type, "bfs", bfs_read_super);
 
 #ifdef MODULE
 #define init_bfs_fs init_module
index 4e79483e408a08ad63cc1d85a08ddfa64468b265..dabf1d39cc6f290a4ce32e2a4a14ef649f04a8f7 100644 (file)
@@ -1754,10 +1754,10 @@ static void end_buffer_io_kiobuf(struct buffer_head *bh, int uptodate)
        mark_buffer_uptodate(bh, uptodate);
 
        kiobuf = bh->b_kiobuf;
-       if (!uptodate)
-               kiobuf->errno = -EIO;
-       if (atomic_dec_and_test(&kiobuf->io_count))
-               kiobuf->end_io(kiobuf);
+       unlock_buffer(bh);
+       
+       kiobuf = bh->b_kiobuf;
+       end_kio_request(kiobuf, uptodate);
 }
 
 
@@ -1766,8 +1766,7 @@ static void end_buffer_io_kiobuf(struct buffer_head *bh, int uptodate)
  * for them to complete.  Clean up the buffer_heads afterwards.  
  */
 
-static int do_kio(struct kiobuf *kiobuf,
-                 int rw, int nr, struct buffer_head *bh[], int size)
+static int do_kio(int rw, int nr, struct buffer_head *bh[], int size)
 {
        int iosize;
        int i;
@@ -1778,18 +1777,20 @@ static int do_kio(struct kiobuf *kiobuf,
 
        if (rw == WRITE)
                rw = WRITERAW;
-       atomic_add(nr, &kiobuf->io_count);
-       kiobuf->errno = 0;
        ll_rw_block(rw, nr, bh);
 
-       kiobuf_wait_for_io(kiobuf);
-       
-       spin_lock(&unused_list_lock);
-       
        iosize = 0;
+       spin_lock(&unused_list_lock);
+
        for (i = nr; --i >= 0; ) {
                iosize += size;
                tmp = bh[i];
+               if (buffer_locked(tmp)) {
+                       spin_unlock(&unused_list_lock);
+                       wait_on_buffer(tmp);
+                       spin_lock(&unused_list_lock);
+               }
+               
                if (!buffer_uptodate(tmp)) {
                        /* We are traversing bh'es in reverse order so
                            clearing iosize on error calculates the
@@ -1801,11 +1802,7 @@ static int do_kio(struct kiobuf *kiobuf,
        
        spin_unlock(&unused_list_lock);
 
-       if (iosize)
-               return iosize;
-       if (kiobuf->errno)
-               return kiobuf->errno;
-       return -EIO;
+       return iosize;
 }
 
 /*
@@ -1847,8 +1844,6 @@ int brw_kiovec(int rw, int nr, struct kiobuf *iovec[],
                if ((iobuf->offset & (size-1)) ||
                    (iobuf->length & (size-1)))
                        return -EINVAL;
-               if (!iobuf->locked)
-                       panic("brw_kiovec: iobuf not locked for I/O");
                if (!iobuf->nr_pages)
                        panic("brw_kiovec: iobuf not initialised");
        }
@@ -1861,10 +1856,15 @@ int brw_kiovec(int rw, int nr, struct kiobuf *iovec[],
                iobuf = iovec[i];
                offset = iobuf->offset;
                length = iobuf->length;
-
+               iobuf->errno = 0;
+               
                for (pageind = 0; pageind < iobuf->nr_pages; pageind++) {
                        map  = iobuf->maplist[pageind];
-
+                       if (!map) {
+                               err = -EFAULT;
+                               goto error;
+                       }
+                       
                        while (length > 0) {
                                blocknr = b[bufind++];
                                tmp = get_unused_buffer_head(0);
@@ -1893,11 +1893,13 @@ int brw_kiovec(int rw, int nr, struct kiobuf *iovec[],
                                length -= size;
                                offset += size;
 
+                               atomic_inc(&iobuf->io_count);
+       
                                /* 
                                 * Start the IO if we have got too much 
                                 */
                                if (bhind >= KIO_MAX_SECTORS) {
-                                       err = do_kio(iobuf, rw, bhind, bh, size);
+                                       err = do_kio(rw, bhind, bh, size);
                                        if (err >= 0)
                                                transferred += err;
                                        else
@@ -1915,7 +1917,7 @@ int brw_kiovec(int rw, int nr, struct kiobuf *iovec[],
 
        /* Is there any IO still left to submit? */
        if (bhind) {
-               err = do_kio(iobuf, rw, bhind, bh, size);
+               err = do_kio(rw, bhind, bh, size);
                if (err >= 0)
                        transferred += err;
                else
index 3757983be695a00729864d46667cab2760265bd9..7f163acf95c169d2bb9d7ce4d91c06bbf2fe34fc 100644 (file)
@@ -60,16 +60,13 @@ static struct super_block * coda_read_super(struct super_block *sb,
         int error;
 
        ENTRY;
-        MOD_INC_USE_COUNT; 
 
         vc = &coda_upc_comm;
        sbi = &coda_super_info;
 
         if ( sbi->sbi_sb ) {
                printk("Already mounted\n");
-               unlock_super(sb);
                EXIT;  
-               MOD_DEC_USE_COUNT;
                return NULL;
        }
 
@@ -79,7 +76,6 @@ static struct super_block * coda_read_super(struct super_block *sb,
        INIT_LIST_HEAD(&(sbi->sbi_cchead));
        INIT_LIST_HEAD(&(sbi->sbi_volroothead));
 
-        lock_super(sb);
         sb->u.generic_sbp = sbi;
         sb->s_blocksize = 1024;        /* XXXXX  what do we put here?? */
         sb->s_blocksize_bits = 10;
@@ -92,7 +88,6 @@ static struct super_block * coda_read_super(struct super_block *sb,
        if ( error ) {
                printk("coda_read_super: coda_get_rootfid failed with %d\n",
                       error);
-               sb->s_dev = 0;
                goto error;
        }         
        printk("coda_read_super: rootfid is %s\n", coda_f2s(&fid));
@@ -101,7 +96,6 @@ static struct super_block * coda_read_super(struct super_block *sb,
         error = coda_cnode_make(&root, &fid, sb);
         if ( error || !root ) {
            printk("Failure of coda_cnode_make for root: error %d\n", error);
-           sb->s_dev = 0;
            goto error;
        } 
 
@@ -109,14 +103,11 @@ static struct super_block * coda_read_super(struct super_block *sb,
               root->i_ino, root->i_dev);
        sbi->sbi_root = root;
        sb->s_root = d_alloc_root(root);
-       unlock_super(sb);
        EXIT;  
         return sb;
 
  error:
-       unlock_super(sb);
        EXIT;  
-       MOD_DEC_USE_COUNT;
        if (sbi) {
                sbi->sbi_vcomm = NULL;
                sbi->sbi_root = NULL;
@@ -125,7 +116,6 @@ static struct super_block * coda_read_super(struct super_block *sb,
         if (root) {
                 iput(root);
         }
-        sb->s_dev = 0;
         return NULL;
 }
 
@@ -135,15 +125,12 @@ static void coda_put_super(struct super_block *sb)
 
         ENTRY;
 
-
-        sb->s_dev = 0;
        coda_cache_clear_all(sb);
        sb_info = coda_sbp(sb);
        coda_super_info.sbi_sb = NULL;
        printk("Coda: Bye bye.\n");
        memset(sb_info, 0, sizeof(* sb_info));
 
-        MOD_DEC_USE_COUNT;
        EXIT;
 }
 
@@ -260,9 +247,7 @@ static int coda_statfs(struct super_block *sb, struct statfs *buf)
 
 /* init_coda: used by filesystems.c to register coda */
 
-struct file_system_type coda_fs_type = {
-   "coda", 0, coda_read_super, NULL
-};
+DECLARE_FSTYPE( coda_fs_type, "coda", coda_read_super, 0);
 
 int init_coda_fs(void)
 {
index 5cb068e2b6924df5186cd2e716f2c12e33759cd7..237c7d9aa665eef16f2ceafeaa90e18123c292f6 100644 (file)
@@ -153,7 +153,6 @@ static struct super_block * cramfs_read_super(struct super_block *sb, void *data
        unsigned long root_offset;
        struct super_block * retval = NULL;
 
-       lock_super(sb);
        set_blocksize(sb->s_dev, PAGE_CACHE_SIZE);
        sb->s_blocksize = PAGE_CACHE_SIZE;
        sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
@@ -198,7 +197,6 @@ static struct super_block * cramfs_read_super(struct super_block *sb, void *data
        retval = sb;
 
 out:
-       unlock_super(sb);
        return retval;
 }
 
@@ -367,12 +365,7 @@ static struct super_operations cramfs_ops = {
        statfs:         cramfs_statfs,
 };
 
-static struct file_system_type cramfs_fs_type = {
-       "cramfs",
-       FS_REQUIRES_DEV,
-       cramfs_read_super,
-       NULL
-};
+static DECLARE_FSTYPE_DEV(cramfs_fs_type, "cramfs", cramfs_read_super);
 
 static int __init init_cramfs_fs(void)
 {
index 88d7248754a4d093bcb10ec7cb3c565cb2ce51d4..ab1e9ee83f7d71d26d7eca712f162e84acea72b8 100644 (file)
@@ -2305,12 +2305,10 @@ static void devfs_put_super (struct super_block *sb)
     if (devfs_debug & DEBUG_S_PUT)
        printk ("%s: put_super(): devfs ptr: %p\n", DEVFS_NAME, fs_info);
 #endif
-    sb->s_dev = 0;
 #ifdef CONFIG_DEVFS_TUNNEL
     dput (fs_info->table[0]->covered);
 #endif
     delete_fs (fs_info);
-    MOD_DEC_USE_COUNT;
 }   /*  End Function devfs_put_super  */
 
 static int devfs_statfs (struct super_block *sb, struct statfs *buf)
@@ -3148,7 +3146,6 @@ static struct super_block *devfs_read_super (struct super_block *sb,
     {
        if (strcmp (aopt, "explicit") == 0) fs_info->require_explicit = TRUE;
     }
-    lock_super (sb);
     sb->u.generic_sbp = fs_info;
     sb->s_blocksize = 1024;
     sb->s_blocksize_bits = 10;
@@ -3169,32 +3166,22 @@ static struct super_block *devfs_read_super (struct super_block *sb,
 #ifdef CONFIG_DEVFS_TUNNEL
     di->covered = dget (sb->s_root->d_covered);
 #endif
-    unlock_super (sb);
 #ifdef CONFIG_DEVFS_DEBUG
     if (devfs_debug & DEBUG_DISABLED)
        printk ("%s: read super, made devfs ptr: %p\n",
                DEVFS_NAME, sb->u.generic_sbp);
 #endif
-    MOD_INC_USE_COUNT;
     return sb;
 
 out_no_root:
     printk ("devfs_read_super: get root inode failed\n");
     delete_fs (fs_info);
     if (root_inode) iput (root_inode);
-    sb->s_dev = 0;
-    unlock_super (sb);
     return NULL;
 }   /*  End Function devfs_read_super  */
 
 
-static struct file_system_type devfs_fs_type =
-{
-    DEVFS_NAME, 
-    0,
-    devfs_read_super, 
-    NULL,
-};
+static DECLARE_FSTYPE(devfs_fs_type, DEVFS_NAME, devfs_read_super, 0);
 
 
 /*  File operations for devfsd follow  */
index e43a56a606e5487cdfa19c71864cc702b1a59df1..67cc1c7b1c1371ca9db638ece277c310f20cb811 100644 (file)
@@ -51,19 +51,13 @@ static void devpts_put_super(struct super_block *sb)
 
        kfree(sbi->inodes);
        kfree(sbi);
-
-#ifdef MODULE
-       MOD_DEC_USE_COUNT;
-#endif
 }
 
 static int devpts_statfs(struct super_block *sb, struct statfs *buf);
 static void devpts_read_inode(struct inode *inode);
-static void devpts_write_inode(struct inode *inode);
 
 static struct super_operations devpts_sops = {
        read_inode:     devpts_read_inode,
-       write_inode:    devpts_write_inode,
        put_super:      devpts_put_super,
        statfs:         devpts_statfs,
 };
@@ -125,9 +119,6 @@ struct super_block *devpts_read_super(struct super_block *s, void *data,
        struct dentry * root;
        struct devpts_sb_info *sbi;
 
-       MOD_INC_USE_COUNT;
-
-       lock_super(s);
        /* Super block already completed? */
        if (s->s_root)
                goto out_unlock;
@@ -151,7 +142,6 @@ struct super_block *devpts_read_super(struct super_block *s, void *data,
        s->s_magic = DEVPTS_SUPER_MAGIC;
        s->s_op = &devpts_sops;
        s->s_root = NULL;
-       unlock_super(s); /* shouldn't we keep it locked a while longer? */
 
        /*
         * Get the root inode and dentry, but defer checking for errors.
@@ -183,7 +173,6 @@ struct super_block *devpts_read_super(struct super_block *s, void *data,
        /*
         * Success! Install the root dentry now to indicate completion.
         */
-       lock_super(s);
        s->s_root = root;
 
        sbi->next = mounts;
@@ -192,14 +181,12 @@ struct super_block *devpts_read_super(struct super_block *s, void *data,
        sbi->back = &mounts;
        mounts = s;
 
-       unlock_super(s);
        return s;
 
        /*
         * Success ... somebody else completed the super block for us. 
         */ 
 out_unlock:
-       unlock_super(s);
        goto out_dec;
 out_dput:
        if (root)
@@ -207,7 +194,6 @@ out_dput:
        else
                iput(root_inode);
 out_dec:
-       MOD_DEC_USE_COUNT;
        return s;
        
        /*
@@ -217,7 +203,6 @@ fail_dput:
        /*
         * dput() can block, so we clear the super block first.
         */
-       s->s_dev = 0;
        dput(root);
        goto fail_free;
 fail_iput:
@@ -225,16 +210,10 @@ fail_iput:
        /*
         * iput() can block, so we clear the super block first.
         */
-       s->s_dev = 0;
        iput(root_inode);
 fail_free:
        kfree(sbi);
-       goto fail_dec;
 fail_unlock:
-       unlock_super(s);
-fail_dec:
-       s->s_dev = 0;
-       MOD_DEC_USE_COUNT;
        return NULL;
 }
 
@@ -280,16 +259,7 @@ static void devpts_read_inode(struct inode *inode)
        return;
 }
 
-static void devpts_write_inode(struct inode *inode)
-{
-}
-
-static struct file_system_type devpts_fs_type = {
-       "devpts",
-       0,
-       devpts_read_super,
-       NULL
-};
+static DECLARE_FSTYPE(devpts_fs_type, "devpts", devpts_read_super, 0);
 
 void devpts_pty_new(int number, kdev_t device)
 {
index febda295f30d99ddf7741ea515049d61d39fedc2..092c2f0a7d2fac5f38a161417cd3d3b656b629ae 100644 (file)
 #include <linux/efs_vh.h>
 #include <linux/efs_fs_sb.h>
 
-static struct file_system_type efs_fs_type = {
-       "efs",                  /* filesystem name */
-       FS_REQUIRES_DEV,        /* fs_flags */
-       efs_read_super,         /* entry function pointer */
-       NULL                    /* next */
-};
+static DECLARE_FSTYPE_DEV(efs_fs_type, "efs", efs_read_super);
 
 static struct super_operations efs_superblock_operations = {
        read_inode:     efs_read_inode,
@@ -145,9 +140,6 @@ struct super_block *efs_read_super(struct super_block *s, void *d, int silent) {
        struct efs_sb_info *sb;
        struct buffer_head *bh;
 
-       MOD_INC_USE_COUNT;
-       lock_super(s);
-  
        sb = SUPER_INFO(s);
 
        set_blocksize(dev, EFS_BLOCKSIZE);
@@ -199,7 +191,6 @@ struct super_block *efs_read_super(struct super_block *s, void *d, int silent) {
        s->s_op   = &efs_superblock_operations;
        s->s_dev  = dev;
        s->s_root = d_alloc_root(iget(s, EFS_ROOTINODE));
-       unlock_super(s);
  
        if (!(s->s_root)) {
                printk(KERN_ERR "EFS: get root inode failed\n");
@@ -214,15 +205,11 @@ struct super_block *efs_read_super(struct super_block *s, void *d, int silent) {
        return(s);
 
 out_no_fs_ul:
-       unlock_super(s);
 out_no_fs:
-       s->s_dev = 0;
-       MOD_DEC_USE_COUNT;
        return(NULL);
 }
 
 void efs_put_super(struct super_block *s) {
-       MOD_DEC_USE_COUNT;
 }
 
 int efs_statfs(struct super_block *s, struct statfs *buf) {
index 43a425bbb148d193f9250efc4bae33110b38b574..904f5cb8f363a11b54fd70ce5056e1a6a5be8ae5 100644 (file)
@@ -679,6 +679,7 @@ int ext2_group_sparse(int group)
                test_root(group, 7));
 }
 
+/* Called at mount-time, super-block is locked */
 void ext2_check_blocks_bitmap (struct super_block * sb)
 {
        struct buffer_head * bh;
@@ -689,7 +690,6 @@ void ext2_check_blocks_bitmap (struct super_block * sb)
        struct ext2_group_desc * gdp;
        int i, j;
 
-       lock_super (sb);
        es = sb->u.ext2_sb.s_es;
        desc_count = 0;
        bitmap_count = 0;
@@ -752,5 +752,4 @@ void ext2_check_blocks_bitmap (struct super_block * sb)
                            "Wrong free blocks count in super block, "
                            "stored = %lu, counted = %lu",
                            (unsigned long) le32_to_cpu(es->s_free_blocks_count), bitmap_count);
-       unlock_super (sb);
 }
index 72437bb897b7d9156727151019bb7436c0821a13..3a3e4a69cbb02673e458eb2bd1e897f1b1b63402 100644 (file)
@@ -527,6 +527,7 @@ unsigned long ext2_count_free_inodes (struct super_block * sb)
 #endif
 }
 
+/* Called at mount-time, super-block is locked */
 void ext2_check_inodes_bitmap (struct super_block * sb)
 {
        struct ext2_super_block * es;
@@ -535,7 +536,6 @@ void ext2_check_inodes_bitmap (struct super_block * sb)
        struct ext2_group_desc * gdp;
        int i;
 
-       lock_super (sb);
        es = sb->u.ext2_sb.s_es;
        desc_count = 0;
        bitmap_count = 0;
@@ -564,5 +564,4 @@ void ext2_check_inodes_bitmap (struct super_block * sb)
                            "stored = %lu, counted = %lu",
                            (unsigned long) le32_to_cpu(es->s_free_inodes_count),
                            bitmap_count);
-       unlock_super (sb);
 }
index 4369e5a5aaa29ca05feed4b9a0a66b312afceb50..73be71e61be037d6f7bf57c9eb1d895f66de417f 100644 (file)
@@ -116,7 +116,6 @@ void ext2_put_super (struct super_block * sb)
                        brelse (sb->u.ext2_sb.s_block_bitmap[i]);
        brelse (sb->u.ext2_sb.s_sbh);
 
-       MOD_DEC_USE_COUNT;
        return;
 }
 
@@ -402,12 +401,9 @@ struct super_block * ext2_read_super (struct super_block * sb, void * data,
        set_opt (sb->u.ext2_sb.s_mount_opt, CHECK_NORMAL);
        if (!parse_options ((char *) data, &sb_block, &resuid, &resgid,
            &sb->u.ext2_sb.s_mount_opt)) {
-               sb->s_dev = 0;
                return NULL;
        }
 
-       MOD_INC_USE_COUNT;
-       lock_super (sb);
        set_blocksize (dev, blocksize);
 
        /*
@@ -421,10 +417,7 @@ struct super_block * ext2_read_super (struct super_block * sb, void * data,
        }
 
        if (!(bh = bread (dev, logic_sb_block, blocksize))) {
-               sb->s_dev = 0;
-               unlock_super (sb);
                printk ("EXT2-fs: unable to read superblock\n");
-               MOD_DEC_USE_COUNT;
                return NULL;
        }
        /*
@@ -439,11 +432,8 @@ struct super_block * ext2_read_super (struct super_block * sb, void * data,
                        printk ("VFS: Can't find an ext2 filesystem on dev "
                                "%s.\n", bdevname(dev));
        failed_mount:
-               sb->s_dev = 0;
-               unlock_super (sb);
                if (bh)
                        brelse(bh);
-               MOD_DEC_USE_COUNT;
                return NULL;
        }
        if (le32_to_cpu(es->s_rev_level) > EXT2_GOOD_OLD_REV) {
@@ -616,7 +606,6 @@ struct super_block * ext2_read_super (struct super_block * sb, void * data,
        sb->u.ext2_sb.s_loaded_inode_bitmaps = 0;
        sb->u.ext2_sb.s_loaded_block_bitmaps = 0;
        sb->u.ext2_sb.s_db_per_group = db_count;
-       unlock_super (sb);
        /*
         * set up enough so that it can read an inode
         */
@@ -624,7 +613,6 @@ struct super_block * ext2_read_super (struct super_block * sb, void * data,
        sb->s_op = &ext2_sops;
        sb->s_root = d_alloc_root(iget(sb, EXT2_ROOT_INO));
        if (!sb->s_root) {
-               sb->s_dev = 0;
                for (i = 0; i < db_count; i++)
                        if (sb->u.ext2_sb.s_group_desc[i])
                                brelse (sb->u.ext2_sb.s_group_desc[i]);
@@ -632,7 +620,6 @@ struct super_block * ext2_read_super (struct super_block * sb, void * data,
                         db_count * sizeof (struct buffer_head *));
                brelse (bh);
                printk ("EXT2-fs: get root inode failed\n");
-               MOD_DEC_USE_COUNT;
                return NULL;
        }
        ext2_setup_super (sb, es);
@@ -780,12 +767,7 @@ int ext2_statfs (struct super_block * sb, struct statfs * buf)
        return 0;
 }
 
-static struct file_system_type ext2_fs_type = {
-       "ext2", 
-       FS_REQUIRES_DEV /* | FS_IBASKET */,     /* ibaskets have unresolved bugs */
-        ext2_read_super, 
-       NULL
-};
+static DECLARE_FSTYPE_DEV(ext2_fs_type, "ext2", ext2_read_super);
 
 static int __init init_ext2_fs(void)
 {
index c486732b9cba777226b5f53a24c575e9428f6704..f95adc0fdcd8014617e66d9fbb48d469e544e39e 100644 (file)
@@ -194,11 +194,6 @@ void fat_put_super(struct super_block *sb)
                kfree(MSDOS_SB(sb)->options.iocharset);
                MSDOS_SB(sb)->options.iocharset = NULL;
        }
-
-       if (MSDOS_SB(sb)->put_super_callback)
-               MSDOS_SB(sb)->put_super_callback(sb);
-       MOD_DEC_USE_COUNT;
-       return;
 }
 
 
@@ -444,9 +439,7 @@ fat_read_super(struct super_block *sb, void *data, int silent,
        sbi->cvf_format = NULL;
        sbi->private_data = NULL;
 
-       MOD_INC_USE_COUNT;
        sbi->dir_ops = fs_dir_inode_ops;
-       sbi->put_super_callback = NULL;
        sb->s_op = &fat_sops;
        if (hardsect_size[MAJOR(sb->s_dev)] != NULL){
                blksize = hardsect_size[MAJOR(sb->s_dev)][MINOR(sb->s_dev)];
@@ -465,7 +458,6 @@ fat_read_super(struct super_block *sb, void *data, int silent,
        memcpy(&(sbi->options), &opts, sizeof(struct fat_mount_options));
 
        fat_cache_init();
-       lock_super(sb);
        if( blksize > 1024 )
          {
            /* Force the superblock to a larger size here. */
@@ -479,7 +471,6 @@ fat_read_super(struct super_block *sb, void *data, int silent,
            set_blocksize(sb->s_dev, 1024);
          }
        bh = bread(sb->s_dev, 0, sb->s_blocksize);
-       unlock_super(sb);
        if (bh == NULL || !buffer_uptodate(bh)) {
                brelse (bh);
                goto out_no_bread;
@@ -693,12 +684,10 @@ out_fail:
                printk("VFS: freeing iocharset=%s\n", opts.iocharset);
                kfree(opts.iocharset);
        }
-       sb->s_dev = 0;
        if(sbi->private_data)
                kfree(sbi->private_data);
        sbi->private_data=NULL;
  
-       MOD_DEC_USE_COUNT;
        return NULL;
 }
 
index f039806a536b6b64593231a41fdfae6e0f75e2be..807f8306d3bf090c9d1b9bdc5719319ef8189534 100644 (file)
@@ -32,7 +32,6 @@
 #include <linux/hfs_fs.h>
 #include <linux/devpts_fs.h>
 #include <linux/bfs_fs.h>
-#include <linux/adfs_fs.h>
 #include <linux/openprom_fs.h>
 #include <linux/major.h>
 #include <linux/smp.h>
@@ -137,10 +136,6 @@ void __init filesystem_setup(void)
        init_efs_fs();
 #endif
 
-#ifdef CONFIG_ADFS_FS
-       init_adfs_fs();
-#endif
-
 #ifdef CONFIG_DEVPTS_FS
        init_devpts_fs();
 #endif
index 8bb61dac56efe5bc747163ed7bc8261f64e02c46..251690dc8e7c699127c87041a76deaf22edc89e0 100644 (file)
@@ -51,11 +51,7 @@ static struct super_operations hfs_super_operations = {
 
 /*================ File-local variables ================*/
 
-static struct file_system_type hfs_fs = {
-        "hfs",
-       FS_REQUIRES_DEV,
-       hfs_read_super, 
-       NULL};
+static DECLARE_FSTYPE_DEV(hfs_fs, "hfs", hfs_read_super);
 
 /*================ File-local functions ================*/
 
@@ -126,8 +122,6 @@ static void hfs_put_super(struct super_block *sb)
 
        /* restore default blocksize for the device */
        set_blocksize(sb->s_dev, BLOCK_SIZE);
-
-       MOD_DEC_USE_COUNT;
 }
 
 /*
@@ -406,11 +400,6 @@ struct super_block *hfs_read_super(struct super_block *s, void *data,
                goto bail3;
        }
 
-       /* in case someone tries to unload the module while we wait on I/O */
-       MOD_INC_USE_COUNT;
-
-       lock_super(s);
-
        /* set the device driver to 512-byte blocks */
        set_blocksize(dev, HFS_SECTOR_SIZE);
 
@@ -470,7 +459,6 @@ struct super_block *hfs_read_super(struct super_block *s, void *data,
        s->s_root->d_op = &hfs_dentry_operations;
 
        /* everything's okay */
-       unlock_super(s);
        return s;
 
 bail_no_root: 
@@ -480,10 +468,7 @@ bail1:
        hfs_mdb_put(mdb, s->s_flags & MS_RDONLY);
 bail2:
        set_blocksize(dev, BLOCK_SIZE);
-       unlock_super(s);
-       MOD_DEC_USE_COUNT;
 bail3:
-       s->s_dev = 0;
        return NULL;    
 }
 
index 37c816aa49169b3c082668ed50f4c25d4ea09795..d29f6e57415f21a1136ac516abe8f0fafb978e3c 100644 (file)
@@ -102,8 +102,6 @@ void hpfs_put_super(struct super_block *s)
        if (s->s_hpfs_cp_table) kfree(s->s_hpfs_cp_table);
        if (s->s_hpfs_bmp_dir) kfree(s->s_hpfs_bmp_dir);
        unmark_dirty(s);
-       s->s_dev = 0;
-       MOD_DEC_USE_COUNT;
 }
 
 unsigned hpfs_count_one_bitmap(struct super_block *s, secno secno)
@@ -368,8 +366,6 @@ struct super_block *hpfs_read_super(struct super_block *s, void *options,
 
        int o;
 
-       MOD_INC_USE_COUNT;
-
        s->s_hpfs_bmp_dir = NULL;
        s->s_hpfs_cp_table = NULL;
 
@@ -399,7 +395,6 @@ struct super_block *hpfs_read_super(struct super_block *s, void *options,
        }
 
        /*s->s_hpfs_mounting = 1;*/
-       lock_super(s);
        dev = s->s_dev;
        set_blocksize(dev, 512);
        s->s_hpfs_fs_size = -1;
@@ -523,7 +518,6 @@ struct super_block *hpfs_read_super(struct super_block *s, void *options,
        hpfs_lock_iget(s, 1);
        s->s_root = d_alloc_root(iget(s, s->s_hpfs_root));
        hpfs_unlock_iget(s);
-       unlock_super(s);
        if (!s->s_root || !s->s_root->d_inode) {
                printk("HPFS: iget failed. Why???\n");
                goto bail0;
@@ -554,17 +548,14 @@ struct super_block *hpfs_read_super(struct super_block *s, void *options,
 bail4: brelse(bh2);
 bail3: brelse(bh1);
 bail2: brelse(bh0);
-bail1: unlock_super(s);
-bail0: s->s_dev = 0;
+bail1:
+bail0:
        if (s->s_hpfs_bmp_dir) kfree(s->s_hpfs_bmp_dir);
        if (s->s_hpfs_cp_table) kfree(s->s_hpfs_cp_table);
-       MOD_DEC_USE_COUNT;
        return NULL;
 }
 
-struct file_system_type hpfs_fs_type = {
-       "hpfs", FS_REQUIRES_DEV, hpfs_read_super, NULL
-};
+DECLARE_FSTYPE_DEV(hpfs_fs_type, "hpfs", hpfs_read_super);
 
 int init_hpfs_fs(void)
 {
index 4eaefe723f427b37f1eda48f63f54d61f7ff0d2a..4be2258702d36611da3ffed34d29b3763a8d4daa 100644 (file)
 
 static kmem_cache_t *kiobuf_cachep;
 
-/*
- * The default IO completion routine for kiobufs: just wake up
- * the kiobuf, nothing more.  
- */
 
-void simple_wakeup_kiobuf(struct kiobuf *kiobuf)
+void end_kio_request(struct kiobuf *kiobuf, int uptodate)
 {
-       wake_up(&kiobuf->wait_queue);
+       if ((!uptodate) && !kiobuf->errno)
+               kiobuf->errno = -EIO;
+
+       if (atomic_dec_and_test(&kiobuf->io_count)) {
+               if (kiobuf->end_io)
+                       kiobuf->end_io(kiobuf);
+               wake_up(&kiobuf->wait_queue);
+       }
 }
 
 
-void __init kiobuf_init(void)
+void __init kiobuf_setup(void)
 {
        kiobuf_cachep =  kmem_cache_create("kiobuf",
                                           sizeof(struct kiobuf),
@@ -33,6 +36,13 @@ void __init kiobuf_init(void)
                panic("Cannot create kernel iobuf cache\n");
 }
 
+void kiobuf_init(struct kiobuf *iobuf)
+{
+       memset(iobuf, 0, sizeof(*iobuf));
+       init_waitqueue_head(&iobuf->wait_queue);
+       iobuf->array_len = KIO_STATIC_PAGES;
+       iobuf->maplist   = iobuf->map_array;
+}
 
 int alloc_kiovec(int nr, struct kiobuf **bufp)
 {
@@ -45,12 +55,7 @@ int alloc_kiovec(int nr, struct kiobuf **bufp)
                        free_kiovec(i, bufp);
                        return -ENOMEM;
                }
-               
-               memset(iobuf, 0, sizeof(*iobuf));
-               init_waitqueue_head(&iobuf->wait_queue);
-               iobuf->end_io = simple_wakeup_kiobuf;
-               iobuf->array_len = KIO_STATIC_PAGES;
-               iobuf->maplist   = iobuf->map_array;
+               kiobuf_init(iobuf);
                *bufp++ = iobuf;
        }
        
@@ -64,6 +69,8 @@ void free_kiovec(int nr, struct kiobuf **bufp)
        
        for (i = 0; i < nr; i++) {
                iobuf = bufp[i];
+               if (iobuf->locked)
+                       unlock_kiovec(1, &iobuf);
                if (iobuf->array_len > KIO_STATIC_PAGES)
                        kfree (iobuf->maplist);
                kmem_cache_free(kiobuf_cachep, bufp[i]);
@@ -104,6 +111,9 @@ void kiobuf_wait_for_io(struct kiobuf *kiobuf)
        struct task_struct *tsk = current;
        DECLARE_WAITQUEUE(wait, tsk);
 
+       if (atomic_read(&kiobuf->io_count) == 0)
+               return;
+
        add_wait_queue(&kiobuf->wait_queue, &wait);
 repeat:
        run_task_queue(&tq_disk);
index d2148320cba640330e3a07931ba2bc617749f9ab..b13ee0285ff15dd421923297ba9390fdbe7d7f1c 100644 (file)
@@ -69,7 +69,6 @@ static void isofs_put_super(struct super_block *sb)
               check_malloc, check_bread);
 #endif
 
-       MOD_DEC_USE_COUNT;
        return;
 }
 
@@ -487,10 +486,6 @@ static struct super_block *isofs_read_super(struct super_block *s, void *data,
        struct inode                  * inode;
        struct iso9660_options          opt;
 
-       MOD_INC_USE_COUNT;
-       /* lock before any blocking operations */
-       lock_super(s);
-
        if (!parse_options((char *) data, &opt))
                goto out_unlock;
 
@@ -825,7 +820,6 @@ root_found:
        if (opt.check == 'r') table++;
        s->s_root->d_op = &isofs_dentry_ops[table];
 
-       unlock_super(s);
        return s;
 
        /*
@@ -868,9 +862,6 @@ out_unknown_format:
 out_freebh:
        brelse(bh);
 out_unlock:
-       s->s_dev = 0;
-       unlock_super(s);
-       MOD_DEC_USE_COUNT;
        return NULL;
 }
 
@@ -1438,12 +1429,7 @@ void leak_check_brelse(struct buffer_head * bh){
 
 #endif
 
-static struct file_system_type iso9660_fs_type = {
-       "iso9660",
-       FS_REQUIRES_DEV,
-       isofs_read_super, 
-       NULL
-};
+static DECLARE_FSTYPE_DEV(iso9660_fs_type, "iso9660", isofs_read_super);
 
 int __init init_iso9660_fs(void)
 {
index b3489a88dfb241560e88148d87aeee7ae09f1ed9..c6395a54f28eba6b88105f7e88917d72737a3d89 100644 (file)
 /*
  * Global file hash table
  */
-#define FILE_NRHASH            32
 #define FILE_HASH_BITS         5
+#define FILE_NRHASH            (1<<FILE_HASH_BITS)
 static struct nlm_file *       nlm_files[FILE_NRHASH];
 static DECLARE_MUTEX(nlm_file_sema);
 
-static unsigned int file_hash(dev_t dev, ino_t ino)
+static inline unsigned int file_hash(struct nfs_fh *f)
 {
-       unsigned long tmp = (unsigned long) ino | (unsigned long) dev;
-       tmp = tmp + (tmp >> FILE_HASH_BITS) + (tmp >> FILE_HASH_BITS*2);
+       unsigned int tmp=0;
+       int i;
+       for (i=0; i<NFS_FHSIZE;i++)
+               tmp += f->data[i];
        return tmp & (FILE_NRHASH - 1);
 }
 
@@ -50,34 +52,35 @@ u32
 nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result,
                                        struct nfs_fh *f)
 {
-       struct knfs_fh  *fh = (struct knfs_fh *) f;
        struct nlm_file *file;
        unsigned int    hash;
        u32             nfserr;
+       u32             *fhp = (u32*)f->data;
 
-       dprintk("lockd: nlm_file_lookup(%s/%u)\n",
-               kdevname(u32_to_kdev_t(fh->fh_dev)), fh->fh_ino);
+       dprintk("lockd: nlm_file_lookup(%08x %08x %08x %08x %08x %08x)\n",
+               fhp[0], fhp[1], fhp[2], fhp[3], fhp[4], fhp[5]);
 
-       hash = file_hash(u32_to_kdev_t(fh->fh_dev), u32_to_ino_t(fh->fh_ino));
+
+       hash = file_hash(f);
 
        /* Lock file table */
        down(&nlm_file_sema);
 
-       for (file = nlm_files[hash]; file; file = file->f_next) {
-               if (file->f_handle.fh_dcookie == fh->fh_dcookie &&
-                   !memcmp(&file->f_handle, fh, sizeof(*fh)))
+       for (file = nlm_files[hash]; file; file = file->f_next)
+               if (!memcmp(&file->f_handle, f, sizeof(*f)))
                        goto found;
-       }
 
-       dprintk("lockd: creating file for %s/%u\n",
-               kdevname(u32_to_kdev_t(fh->fh_dev)), fh->fh_ino);
+       dprintk("lockd: creating file for (%08x %08x %08x %08x %08x %08x)\n",
+               fhp[0], fhp[1], fhp[2], fhp[3], fhp[4], fhp[5]);
+
        nfserr = nlm_lck_denied_nolocks;
        file = (struct nlm_file *) kmalloc(sizeof(*file), GFP_KERNEL);
        if (!file)
                goto out_unlock;
 
        memset(file, 0, sizeof(*file));
-       file->f_handle = *fh;
+       file->f_handle = *f;
+       file->f_hash = hash;
        init_MUTEX(&file->f_sema);
 
        /* Open the file. Note that this must not sleep for too long, else
@@ -86,7 +89,7 @@ nlm_lookup_file(struct svc_rqst *rqstp, struct nlm_file **result,
         * We have to make sure we have the right credential to open
         * the file.
         */
-       if ((nfserr = nlmsvc_ops->fopen(rqstp, fh, &file->f_file)) != 0) {
+       if ((nfserr = nlmsvc_ops->fopen(rqstp, f, &file->f_file)) != 0) {
                dprintk("lockd: open failed (nfserr %d)\n", ntohl(nfserr));
                goto out_free;
        }
@@ -126,7 +129,7 @@ nlm_delete_file(struct nlm_file *file)
 
        dprintk("lockd: closing file %s/%ld\n",
                kdevname(inode->i_dev), inode->i_ino);
-       fp = nlm_files + file_hash(inode->i_dev, inode->i_ino);
+       fp = nlm_files + file->f_hash;
        while ((f = *fp) != NULL) {
                if (f == file) {
                        *fp = file->f_next;
index 935f5a4296da034e3062a4ed8c778bb3cc9b3c63..31d4c99c7e39b5486daf41f8d42457a64e9f3419 100644 (file)
@@ -79,7 +79,6 @@ static void minix_put_super(struct super_block *sb)
        brelse (sb->u.minix_sb.s_sbh);
        kfree(sb->u.minix_sb.s_imap);
 
-       MOD_DEC_USE_COUNT;
        return;
 }
 
@@ -188,13 +187,10 @@ static struct super_block *minix_read_super(struct super_block *s, void *data,
        if (64 != sizeof(struct minix2_inode))
                panic("bad V2 i-node size");
 
-       MOD_INC_USE_COUNT;
-
        hblock = get_hardblocksize(dev);
        if (hblock && hblock > BLOCK_SIZE)
                goto out_bad_hblock;
 
-       lock_super(s);
        set_blocksize(dev, BLOCK_SIZE);
        if (!(bh = bread(dev,1,BLOCK_SIZE)))
                goto out_bad_sb;
@@ -286,7 +282,6 @@ static struct super_block *minix_read_super(struct super_block *s, void *data,
                mark_buffer_dirty(bh, 1);
                s->s_dirt = 1;
        }
-       unlock_super(s);
        if (!(s->u.minix_sb.s_mount_state & MINIX_VALID_FS))
                printk ("MINIX-fs: mounting unchecked file system, "
                        "running fsck is recommended.\n");
@@ -328,7 +323,7 @@ out_no_fs:
                       "%s.\n", kdevname(dev));
     out_release:
        brelse(bh);
-       goto out_unlock;
+       goto out;
 
 out_bad_hblock:
        printk("MINIX-fs: blocksize too small for device.\n");
@@ -336,11 +331,7 @@ out_bad_hblock:
 
 out_bad_sb:
        printk("MINIX-fs: unable to read superblock\n");
-    out_unlock:
-       unlock_super(s);
  out:
-       s->s_dev = 0;
-       MOD_DEC_USE_COUNT;
        return NULL;
 }
 
@@ -1274,12 +1265,7 @@ int minix_sync_inode(struct inode * inode)
        return err;
 }
 
-static struct file_system_type minix_fs_type = {
-       "minix",
-       FS_REQUIRES_DEV,
-       minix_read_super,
-       NULL
-};
+static DECLARE_FSTYPE_DEV(minix_fs_type,"minix",minix_read_super);
 
 int __init init_minix_fs(void)
 {
index df865b48253f0a660eeb991c7c2b920262d340ad..8e9897f2f4fa6d4a75cd38c31397e94fa05186ea 100644 (file)
@@ -27,12 +27,7 @@ EXPORT_SYMBOL(msdos_read_super);
 EXPORT_SYMBOL(msdos_put_super);
 
 
-struct file_system_type msdos_fs_type = {
-       "msdos",
-       FS_REQUIRES_DEV,
-       msdos_read_super, 
-       NULL
-};
+DECLARE_FSTYPE_DEV(msdos_fs_type, "msdos", msdos_read_super);
 
 int __init init_msdos_fs(void)
 {
index 679ac558181a1295bb0724abf498990dccc13192..7febeaa8b453df042a94b2842802ad6496a347d1 100644 (file)
@@ -593,28 +593,18 @@ struct inode_operations msdos_dir_inode_operations = {
        setattr:        fat_notify_change,
 };
 
-static void msdos_put_super_callback(struct super_block *sb)
-{
-       MOD_DEC_USE_COUNT;
-}
-
 struct super_block *msdos_read_super(struct super_block *sb,void *data, int silent)
 {
        struct super_block *res;
 
-       MOD_INC_USE_COUNT;
-
        MSDOS_SB(sb)->options.isvfat = 0;
        res = fat_read_super(sb, data, silent, &msdos_dir_inode_operations);
        if (res == NULL)
                goto out_fail;
-       MSDOS_SB(sb)->put_super_callback=msdos_put_super_callback;
        sb->s_root->d_op = &msdos_dentry_operations;
        return res;
 
 out_fail:
-       sb->s_dev = 0;
-       MOD_DEC_USE_COUNT;
        return NULL;
 }
 
index fceffc04cc17fd5ef928bc8fa1fbc4d058d11242..349eec58925f6fd670c41e672ddbc35b824c4598 100644 (file)
@@ -273,7 +273,6 @@ ncp_read_super(struct super_block *sb, void *raw_data, int silent)
 #endif
        struct ncp_entry_info finfo;
 
-       MOD_INC_USE_COUNT;
        if (raw_data == NULL)
                goto out_no_data;
        switch (*(int*)raw_data) {
@@ -323,8 +322,6 @@ ncp_read_super(struct super_block *sb, void *raw_data, int silent)
        if (!S_ISSOCK(ncp_filp->f_dentry->d_inode->i_mode))
                goto out_bad_file2;
 
-       lock_super(sb);
-
        sb->s_blocksize = 1024; /* Eh...  Is this correct? */
        sb->s_blocksize_bits = 10;
        sb->s_magic = NCP_SUPER_MAGIC;
@@ -441,7 +438,6 @@ ncp_read_super(struct super_block *sb, void *raw_data, int silent)
         if (!sb->s_root)
                goto out_no_root;
        sb->s_root->d_op = &ncp_dentry_operations;
-       unlock_super(sb);
        return sb;
 
 out_no_root:
@@ -473,7 +469,6 @@ out_free_server:
         * it doesn't proper unlocking.
         */
        fput(ncp_filp);
-       unlock_super(sb);
        goto out;
 
 out_bad_file2:
@@ -488,8 +483,6 @@ out_bad_mount:
 out_no_data:
        printk(KERN_ERR "ncp_read_super: missing data argument\n");
 out:
-       sb->s_dev = 0;
-       MOD_DEC_USE_COUNT;
        return NULL;
 }
 
@@ -524,7 +517,6 @@ static void ncp_put_super(struct super_block *sb)
                ncp_kfree_s(server->auth.object_name, server->auth.object_name_len);
        ncp_kfree_s(server->packet, server->packet_size);
 
-       MOD_DEC_USE_COUNT;
 }
 
 static int ncp_statfs(struct super_block *sb, struct statfs *buf)
@@ -704,12 +696,7 @@ int ncp_malloced;
 int ncp_current_malloced;
 #endif
 
-static struct file_system_type ncp_fs_type = {
-       "ncpfs",
-       0 /* FS_NO_DCACHE doesn't work correctly */,
-        ncp_read_super,
-       NULL
-};
+static DECLARE_FSTYPE(ncp_fs_type, "ncpfs", ncp_read_super, 0);
 
 int __init init_ncp_fs(void)
 {
index 3b391094241560ed5b5b76f849626ee1805d9abd..441d62edceb3653f8f108a35005de5e08149f4cd 100644 (file)
@@ -143,8 +143,6 @@ nfs_put_super(struct super_block *sb)
        rpciod_down();          /* release rpciod */
 
        kfree(server->hostname);
-
-       MOD_DEC_USE_COUNT;
 }
 
 void
@@ -209,7 +207,6 @@ nfs_read_super(struct super_block *sb, void *raw_data, int silent)
        struct rpc_timeout      timeparms;
        struct nfs_fattr        fattr;
 
-       MOD_INC_USE_COUNT;
        if (!data)
                goto out_miss_args;
 
@@ -227,8 +224,6 @@ nfs_read_super(struct super_block *sb, void *raw_data, int silent)
        if (srvaddr.sin_addr.s_addr == INADDR_ANY)
                goto out_no_remote;
 
-       lock_super(sb);
-
        sb->s_flags |= MS_ODD_RENAME; /* This should go away */
 
        sb->s_magic      = NFS_SUPER_MAGIC;
@@ -312,7 +307,6 @@ nfs_read_super(struct super_block *sb, void *raw_data, int silent)
        sb->s_root->d_fsdata = root_fh;
 
        /* We're airborne */
-       unlock_super(sb);
 
        /* Check whether to start the lockd process */
        if (!(server->flags & NFS_MOUNT_NONLM))
@@ -350,7 +344,6 @@ out_no_xprt:
 out_free_host:
        kfree(server->hostname);
 out_unlock:
-       unlock_super(sb);
        goto out_fail;
 
 out_no_remote:
@@ -361,8 +354,6 @@ out_miss_args:
        printk("nfs_read_super: missing data argument\n");
 
 out_fail:
-       sb->s_dev = 0;
-       MOD_DEC_USE_COUNT;
        return NULL;
 }
 
@@ -931,12 +922,7 @@ printk("nfs_refresh_inode: invalidating %ld pages\n", inode->i_nrpages);
 /*
  * File system information
  */
-static struct file_system_type nfs_fs_type = {
-       "nfs",
-       0 /* FS_NO_DCACHE - this doesn't work right now*/,
-       nfs_read_super,
-       NULL
-};
+static DECLARE_FSTYPE(nfs_fs_type, "nfs", nfs_read_super, 0);
 
 extern int nfs_init_fhcache(void);
 extern int nfs_init_wreqcache(void);
index 22bded69d2740fe90f75af201bbb53948303afcd..8d2b610a825f49a44fa86abce26ee45ee09e156c 100644 (file)
@@ -433,7 +433,7 @@ out:
  */
 int
 exp_rootfh(struct svc_client *clp, kdev_t dev, ino_t ino,
-          char *path, struct knfs_fh *f)
+          char *path, struct knfsd_fh *f, int maxsize)
 {
        struct svc_export       *exp;
        struct dentry           *dentry = NULL;
@@ -482,11 +482,11 @@ exp_rootfh(struct svc_client *clp, kdev_t dev, ino_t ino,
        /*
         * fh must be initialized before calling fh_compose
         */
-       fh_init(&fh);
-       fh_compose(&fh, exp, dentry);
-       memcpy(f, &fh.fh_handle, sizeof(struct knfs_fh));
+       fh_init(&fh, maxsize);
+       err = fh_compose(&fh, exp, dentry);
+       memcpy(f, &fh.fh_handle, sizeof(struct knfsd_fh));
        fh_put(&fh);
-       return 0;
+       return err;
 
 out:
        dput(dentry);
index 62dc72ad5f66b3cfd8ebe0011346039a63975b81..c45d494ba4d7fa54d4539c5a7e30f808ac8c7bf6 100644 (file)
  * Note: we hold the dentry use count while the file is open.
  */
 static u32
-nlm_fopen(struct svc_rqst *rqstp, struct knfs_fh *f, struct file *filp)
+nlm_fopen(struct svc_rqst *rqstp, struct nfs_fh *f, struct file *filp)
 {
        u32             nfserr;
        struct svc_fh   fh;
 
-       /* must initialize before using! */
-       fh_init(&fh);
-       fh.fh_handle = *f;
+       /* must initialize before using! but maxsize doesn't matter */
+       fh_init(&fh,0);
+       memcpy((char*)&fh.fh_handle.fh_base, (char*)f, NFS_FHSIZE);
        fh.fh_export = NULL;
 
        nfserr = nfsd_open(rqstp, &fh, S_IFREG, MAY_LOCK, filp);
index c9430ae0344cc2d57260e3d6ecfe6531b3ad74a5..8f69cb53e3bd91b6e0c90696dc29a3f1b5620284 100644 (file)
@@ -69,9 +69,8 @@ nfsd3_proc_getattr(struct svc_rqst *rqstp, struct nfsd_fhandle  *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: GETATTR(3)  %x/%ld\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh));
+       dprintk("nfsd: GETATTR(3)  %s\n",
+                               SVCFH_fmt(&argp->fh));
 
        fh_copy(&resp->fh, &argp->fh);
        nfserr = fh_verify(rqstp, &resp->fh, 0, MAY_NOP);
@@ -87,9 +86,8 @@ nfsd3_proc_setattr(struct svc_rqst *rqstp, struct nfsd3_sattrargs *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: SETATTR(3)  %x/%ld\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh));
+       dprintk("nfsd: SETATTR(3)  %s\n",
+                               SVCFH_fmt(&argp->fh));
 
        fh_copy(&resp->fh, &argp->fh);
        nfserr = nfsd_setattr(rqstp, &resp->fh, &argp->attrs);
@@ -105,12 +103,13 @@ nfsd3_proc_lookup(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: LOOKUP(3)   %x/%ld %s\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh),
+       dprintk("nfsd: LOOKUP(3)   %s %s\n",
+                               SVCFH_fmt(&argp->fh),
                                argp->name);
 
        fh_copy(&resp->dirfh, &argp->fh);
+       fh_init(&resp->fh, NFS3_FHSIZE);
+
        nfserr = nfsd_lookup(rqstp, &resp->dirfh,
                                    argp->name,
                                    argp->len,
@@ -127,9 +126,8 @@ nfsd3_proc_access(struct svc_rqst *rqstp, struct nfsd3_accessargs *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: ACCESS(3)   %x/%ld 0x%x\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh),
+       dprintk("nfsd: ACCESS(3)   %s 0x%x\n",
+                               SVCFH_fmt(&argp->fh),
                                argp->access);
 
        fh_copy(&resp->fh, &argp->fh);
@@ -148,9 +146,7 @@ nfsd3_proc_readlink(struct svc_rqst *rqstp, struct nfsd_fhandle     *argp,
        u32             *path;
        int             dummy, nfserr;
 
-       dprintk("nfsd: READLINK(3) %x/%ld\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh));
+       dprintk("nfsd: READLINK(3) %s\n", SVCFH_fmt(&argp->fh));
 
        /* Reserve room for status, post_op_attr, and path length */
        svcbuf_reserve(&rqstp->rq_resbuf, &path, &dummy,
@@ -173,9 +169,8 @@ nfsd3_proc_read(struct svc_rqst *rqstp, struct nfsd3_readargs *argp,
        u32 *   buffer;
        int     nfserr, avail;
 
-       dprintk("nfsd: READ(3) %x/%ld %lu bytes at %lu\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh),
+       dprintk("nfsd: READ(3) %s %lu bytes at %lu\n",
+                               SVCFH_fmt(&argp->fh),
                                (unsigned long) argp->count,
                                (unsigned long) argp->offset);
 
@@ -213,9 +208,8 @@ nfsd3_proc_write(struct svc_rqst *rqstp, struct nfsd3_writeargs *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: WRITE(3)    %x/%ld %d bytes at %ld%s\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh),
+       dprintk("nfsd: WRITE(3)    %s %d bytes at %ld%s\n",
+                               SVCFH_fmt(&argp->fh),
                                argp->len,
                                (unsigned long) argp->offset,
                                argp->stable? " stable" : "");
@@ -244,13 +238,12 @@ nfsd3_proc_create(struct svc_rqst *rqstp, struct nfsd3_createargs *argp,
        struct iattr    *attr;
        u32             nfserr;
 
-       dprintk("nfsd: CREATE(3)   %x/%ld %s\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh),
+       dprintk("nfsd: CREATE(3)   %s %s\n",
+                               SVCFH_fmt(&argp->fh),
                                argp->name);
 
        dirfhp = fh_copy(&resp->dirfh, &argp->fh);
-       newfhp = fh_init(&resp->fh);
+       newfhp = fh_init(&resp->fh, NFS3_FHSIZE);
        attr   = &argp->attrs;
 
        /* Get the directory inode */
@@ -284,14 +277,13 @@ nfsd3_proc_mkdir(struct svc_rqst *rqstp, struct nfsd3_createargs *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: MKDIR(3)    %x/%ld %s\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh),
+       dprintk("nfsd: MKDIR(3)    %s %s\n",
+                               SVCFH_fmt(&argp->fh),
                                argp->name);
 
        argp->attrs.ia_valid &= ~ATTR_SIZE;
        fh_copy(&resp->dirfh, &argp->fh);
-       fh_init(&resp->fh);
+       fh_init(&resp->fh, NFS3_FHSIZE);
        nfserr = nfsd_create(rqstp, &resp->dirfh, argp->name, argp->len,
                                    &argp->attrs, S_IFDIR, 0, &resp->fh);
 
@@ -304,13 +296,12 @@ nfsd3_proc_symlink(struct svc_rqst *rqstp, struct nfsd3_symlinkargs *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: SYMLINK(3)  %x/%ld %s -> %s\n",
-                               SVCFH_DEV(&argp->ffh),
-                               (long)SVCFH_INO(&argp->ffh),
+       dprintk("nfsd: SYMLINK(3)  %s %s -> %s\n",
+                               SVCFH_fmt(&argp->ffh),
                                argp->fname, argp->tname);
 
        fh_copy(&resp->dirfh, &argp->ffh);
-       fh_init(&resp->fh);
+       fh_init(&resp->fh, NFS3_FHSIZE);
        nfserr = nfsd_symlink(rqstp, &resp->dirfh, argp->fname, argp->flen,
                                                   argp->tname, argp->tlen,
                                                   &resp->fh, &argp->attrs);
@@ -327,13 +318,12 @@ nfsd3_proc_mknod(struct svc_rqst *rqstp, struct nfsd3_mknodargs *argp,
        int     nfserr, type;
        dev_t   rdev = 0;
 
-       dprintk("nfsd: MKNOD(3)    %x/%ld %s\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh),
+       dprintk("nfsd: MKNOD(3)    %s %s\n",
+                               SVCFH_fmt(&argp->fh),
                                argp->name);
 
        fh_copy(&resp->dirfh, &argp->fh);
-       fh_init(&resp->fh);
+       fh_init(&resp->fh, NFS3_FHSIZE);
 
        if (argp->ftype == 0 || argp->ftype >= NF3BAD)
                RETURN_STATUS(nfserr_inval);
@@ -363,9 +353,8 @@ nfsd3_proc_remove(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: REMOVE(3)   %x/%ld %s\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh),
+       dprintk("nfsd: REMOVE(3)   %s %s\n",
+                               SVCFH_fmt(&argp->fh),
                                argp->name);
 
        /* Unlink. -S_IFDIR means file must not be a directory */
@@ -383,9 +372,8 @@ nfsd3_proc_rmdir(struct svc_rqst *rqstp, struct nfsd3_diropargs *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: RMDIR(3)    %x/%ld %s\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh),
+       dprintk("nfsd: RMDIR(3)    %s %s\n",
+                               SVCFH_fmt(&argp->fh),
                                argp->name);
 
        fh_copy(&resp->fh, &argp->fh);
@@ -399,12 +387,11 @@ nfsd3_proc_rename(struct svc_rqst *rqstp, struct nfsd3_renameargs *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: RENAME(3)   %x/%ld %s -> %x/%ld %s\n",
-                               SVCFH_DEV(&argp->ffh),
-                               (long)SVCFH_INO(&argp->ffh),
-                               argp->fname,
-                               SVCFH_DEV(&argp->tfh),
-                               (long)SVCFH_INO(&argp->tfh),
+       dprintk("nfsd: RENAME(3)   %s %s ->\n",
+                               SVCFH_fmt(&argp->ffh),
+                               argp->fname);
+       dprintk("nfsd: -> %s %s\n",
+                               SVCFH_fmt(&argp->tfh),
                                argp->tname);
 
        fh_copy(&resp->ffh, &argp->ffh);
@@ -420,11 +407,10 @@ nfsd3_proc_link(struct svc_rqst *rqstp, struct nfsd3_linkargs *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: LINK(3)     %x/%ld -> %x/%ld %s\n",
-                               SVCFH_DEV(&argp->ffh),
-                               (long)SVCFH_INO(&argp->ffh),
-                               SVCFH_DEV(&argp->tfh),
-                               (long)SVCFH_INO(&argp->tfh),
+       dprintk("nfsd: LINK(3)     %s ->\n",
+                               SVCFH_fmt(&argp->ffh));
+       dprintk("nfsd:   -> %s %s\n",
+                               SVCFH_fmt(&argp->tfh),
                                argp->tname);
 
        fh_copy(&resp->fh,  &argp->ffh);
@@ -445,9 +431,8 @@ nfsd3_proc_readdir(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp,
        int             nfserr, count;
        unsigned int    want;
 
-       dprintk("nfsd: READDIR(3)  %x/%ld %d bytes at %d\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh),
+       dprintk("nfsd: READDIR(3)  %s %d bytes at %d\n",
+                               SVCFH_fmt(&argp->fh),
                                argp->count, (u32) argp->cookie);
 
        /* Reserve buffer space for status, attributes and verifier */
@@ -481,9 +466,8 @@ nfsd3_proc_readdirplus(struct svc_rqst *rqstp, struct nfsd3_readdirargs *argp,
        u32 *   buffer;
        int     nfserr, count, want;
 
-       dprintk("nfsd: READDIR+(3) %x/%ld %d bytes at %d\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh),
+       dprintk("nfsd: READDIR+(3) %s %d bytes at %d\n",
+                               SVCFH_fmt(&argp->fh),
                                argp->count, (u32) argp->cookie);
 
        /* Reserve buffer space for status, attributes and verifier */
@@ -515,9 +499,8 @@ nfsd3_proc_fsstat(struct svc_rqst * rqstp, struct nfsd_fhandle    *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: FSSTAT(3)   %x/%ld\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh));
+       dprintk("nfsd: FSSTAT(3)   %s\n",
+                               SVCFH_fmt(&argp->fh));
 
        nfserr = nfsd_statfs(rqstp, &argp->fh, &resp->stats);
        fh_put(&argp->fh);
@@ -533,9 +516,8 @@ nfsd3_proc_fsinfo(struct svc_rqst * rqstp, struct nfsd_fhandle    *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: FSINFO(3)   %x/%ld\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh));
+       dprintk("nfsd: FSINFO(3)   %s\n",
+                               SVCFH_fmt(&argp->fh));
 
        resp->f_rtmax  = NFSSVC_MAXBLKSIZE;
        resp->f_rtpref = NFSSVC_MAXBLKSIZE;
@@ -574,9 +556,8 @@ nfsd3_proc_pathconf(struct svc_rqst * rqstp, struct nfsd_fhandle      *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: PATHCONF(3) %x/%ld\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh));
+       dprintk("nfsd: PATHCONF(3) %s\n",
+                               SVCFH_fmt(&argp->fh));
 
        /* Set default pathconf */
        resp->p_link_max = 255;         /* at least */
@@ -618,9 +599,8 @@ nfsd3_proc_commit(struct svc_rqst * rqstp, struct nfsd3_commitargs *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: COMMIT(3)   %x/%ld %d@%ld\n",
-                               SVCFH_DEV(&argp->fh),
-                               (long)SVCFH_INO(&argp->fh),
+       dprintk("nfsd: COMMIT(3)   %s %d@%ld\n",
+                               SVCFH_fmt(&argp->fh),
                                argp->count,
                                (unsigned long) argp->offset);
 
index 84ef13dedd1ec6f03a00fecd66c3ed829c4c1208..7dc5739eb64e37d8c3a69fe4d884b7dff9a2b980 100644 (file)
 # define inline
 #endif
 
-/*
- * Size of encoded NFS3 file handle, in words
- */
-#define NFS3_FHANDLE_WORDS     (1 + XDR_QUADLEN(sizeof(struct knfs_fh)))
 
 /*
  * Mapping of S_IF* types to NFS file types
@@ -64,19 +60,36 @@ decode_time3(u32 *p, time_t *secp)
 static inline u32 *
 decode_fh(u32 *p, struct svc_fh *fhp)
 {
-       if (ntohl(*p++) != sizeof(struct knfs_fh))
+       int size;
+       fh_init(fhp, NFS3_FHSIZE);
+       size = ntohl(*p++);
+       if (size > NFS3_FHSIZE)
                return NULL;
 
-       memcpy(&fhp->fh_handle, p, sizeof(struct knfs_fh));
-       return p + (sizeof(struct knfs_fh) >> 2);
+       memcpy(&fhp->fh_handle.fh_base, p, size);
+       fhp->fh_handle.fh_size = size;
+       return p + XDR_QUADLEN(size);
 }
 
 static inline u32 *
 encode_fh(u32 *p, struct svc_fh *fhp)
 {
-       *p++ = htonl(sizeof(struct knfs_fh));
-       memcpy(p, &fhp->fh_handle, sizeof(struct knfs_fh));
-       return p + (sizeof(struct knfs_fh) >> 2);
+#if 0
+       int size = fhp->fh_handle.fh_size;
+       *p++ = htonl(size);
+       if (size) p[XDR_QUADLEN(size)-1]=0;
+       memcpy(p, &fhp->fh_handle.fh_base, size);
+       return p + XDR_QUADLEN(size);
+#else
+       /* until locked knows about var-length file handles,
+        * we always return NFS_FHSIZE handles
+        */
+       int size = fhp->fh_handle.fh_size;
+       *p++ = htonl(NFS_FHSIZE);
+       memset(p, 0, NFS_FHSIZE);
+       memcpy(p, &fhp->fh_handle.fh_base, size);
+       return p + XDR_QUADLEN(NFS_FHSIZE);
+#endif
 }
 
 /*
@@ -698,6 +711,7 @@ encode_entry(struct readdir_cd *cd, const char *name,
        }
        *p++ = xdr_one;                            /* mark entry present */
        p    = xdr_encode_hyper(p, ino);                           /* file id */
+       p[slen - 1] = 0;                /* don't leak kernel data */
 #ifdef XDR_ENCODE_STRING_TAKES_LENGTH
        p    = xdr_encode_string(p, name, namlen); /* name length & name */
 #else
@@ -706,7 +720,6 @@ encode_entry(struct readdir_cd *cd, const char *name,
        memcpy(p, name, namlen);
        p += slen;
 #endif
-       p[slen - 1] = 0;                /* don't leak kernel data */
 
        cd->offset = p;                 /* remember pointer */
        p = xdr_encode_hyper(p, NFS_OFFSET_MAX);        /* offset of next entry */
@@ -715,7 +728,7 @@ encode_entry(struct readdir_cd *cd, const char *name,
        if (plus) {
                struct svc_fh   fh;
 
-               fh_init(&fh);
+               fh_init(&fh, NFS3_FHSIZE);
                /* Disabled for now because of lock-up */
                if (0 && nfsd_lookup(cd->rqstp, cd->dirfh, name, namlen, &fh) == 0) {
                        p = encode_post_op_attr(cd->rqstp, p, fh.fh_dentry);
index 634ca7cbf610944d2ba1efc28c22cd859bc82065..815208e09a098df4b06fa3b2ad12a8a595a74caa 100644 (file)
@@ -40,8 +40,9 @@ static int    nfsctl_addclient(struct nfsctl_client *data);
 static int     nfsctl_delclient(struct nfsctl_client *data);
 static int     nfsctl_export(struct nfsctl_export *data);
 static int     nfsctl_unexport(struct nfsctl_export *data);
-static int     nfsctl_getfh(struct nfsctl_fhparm *, struct knfs_fh *);
-static int     nfsctl_getfd(struct nfsctl_fdparm *, struct knfs_fh *);
+static int     nfsctl_getfh(struct nfsctl_fhparm *, __u8 *);
+static int     nfsctl_getfd(struct nfsctl_fdparm *, __u8 *);
+static int     nfsctl_getfs(struct nfsctl_fsparm *, struct knfsd_fh *);
 /* static int  nfsctl_ugidupdate(struct nfsctl_ugidmap *data); */
 
 static int     initialized = 0;
@@ -109,12 +110,37 @@ nfsctl_ugidupdate(nfs_ugidmap *data)
 }
 #endif
 
+#ifdef notyet
+static inline int
+nfsctl_getfs(struct nfsctl_fsparm *data, struct knfsd_fh *res)
+{
+       struct sockaddr_in      *sin;
+       struct svc_client       *clp;
+       int                     err = 0;
+
+       if (data->gd_addr.sa_family != AF_INET)
+               return -EPROTONOSUPPORT;
+       sin = (struct sockaddr_in *)&data->gd_addr;
+       if (data->gd_maxlen > NFS3_FHSIZE)
+               data->gd_maxlen = NFS3_FHSIZE;
+       exp_readlock();
+       if (!(clp = exp_getclient(sin)))
+               err = -EPERM;
+       else
+               err = exp_rootfh(clp, 0, 0, data->gd_path, res, data->gd_maxlen);
+       exp_unlock();
+
+       return err;
+}
+#endif
+
 static inline int
-nfsctl_getfd(struct nfsctl_fdparm *data, struct knfs_fh *res)
+nfsctl_getfd(struct nfsctl_fdparm *data, __u8 *res)
 {
        struct sockaddr_in      *sin;
        struct svc_client       *clp;
        int                     err = 0;
+       struct  knfsd_fh        fh;
 
        if (data->gd_addr.sa_family != AF_INET)
                return -EPROTONOSUPPORT;
@@ -126,18 +152,28 @@ nfsctl_getfd(struct nfsctl_fdparm *data, struct knfs_fh *res)
        if (!(clp = exp_getclient(sin)))
                err = -EPERM;
        else
-               err = exp_rootfh(clp, 0, 0, data->gd_path, res);
+               err = exp_rootfh(clp, 0, 0, data->gd_path, &fh, NFS_FHSIZE);
        exp_unlock();
 
+       if (err == 0) {
+               if (fh.fh_size > NFS_FHSIZE)
+                       err = -EINVAL;
+               else {
+                       memset(res,0, NFS_FHSIZE);
+                       memcpy(res, fh.fh_base.fh_pad, fh.fh_size);
+               }
+       }
+
        return err;
 }
 
 static inline int
-nfsctl_getfh(struct nfsctl_fhparm *data, struct knfs_fh *res)
+nfsctl_getfh(struct nfsctl_fhparm *data, __u8 *res)
 {
        struct sockaddr_in      *sin;
        struct svc_client       *clp;
        int                     err = 0;
+       struct knfsd_fh         fh;
 
        if (data->gf_addr.sa_family != AF_INET)
                return -EPROTONOSUPPORT;
@@ -149,9 +185,18 @@ nfsctl_getfh(struct nfsctl_fhparm *data, struct knfs_fh *res)
        if (!(clp = exp_getclient(sin)))
                err = -EPERM;
        else
-               err = exp_rootfh(clp, to_kdev_t(data->gf_dev), data->gf_ino, NULL, res);
+               err = exp_rootfh(clp, to_kdev_t(data->gf_dev), data->gf_ino, NULL, &fh, NFS_FHSIZE);
        exp_unlock();
 
+       if (err == 0) {
+               if (fh.fh_size > NFS_FHSIZE)
+                       err = -EINVAL;
+               else {
+                       memset(res,0, NFS_FHSIZE);
+                       memcpy(res, fh.fh_base.fh_pad, fh.fh_size);
+               }
+       }
+
        return err;
 }
 
@@ -217,11 +262,15 @@ asmlinkage handle_sys_nfsservctl(int cmd, void *opaque_argp, void *opaque_resp)
                break;
 #endif
        case NFSCTL_GETFH:
-               err = nfsctl_getfh(&arg->ca_getfh, &res->cr_getfh);
+               err = nfsctl_getfh(&arg->ca_getfh, res->cr_getfh);
                break;
        case NFSCTL_GETFD:
-               err = nfsctl_getfd(&arg->ca_getfd, &res->cr_getfh);
+               err = nfsctl_getfd(&arg->ca_getfd, res->cr_getfh);
                break;
+#ifdef notyet
+       case NFSCTL_GETFS:
+               err = nfsctl_getfs(&arg->ca_getfs, &res->cr_getfs);
+#endif
        default:
                err = -EINVAL;
        }
index 9a26419aa801cdf4412e5d545764ac976a8e3cff..4a7e63dcbb882c5dba3bdd2820cd9c9707ba7ed4 100644 (file)
@@ -328,7 +328,7 @@ static struct dentry *splice(struct dentry *child, struct dentry *parent)
  * connection if made.
  */
 static struct dentry *
-find_fh_dentry(struct super_block *sb, struct knfs_fh *fh, int needpath)
+find_fh_dentry(struct super_block *sb, ino_t ino, int generation, ino_t dirino, int needpath)
 {
        struct dentry *dentry, *result = NULL;
        struct dentry *tmp;
@@ -347,7 +347,7 @@ find_fh_dentry(struct super_block *sb, struct knfs_fh *fh, int needpath)
         * Attempt to find the inode.
         */
  retry:
-       result = nfsd_iget(sb, fh->fh_ino, fh->fh_generation);
+       result = nfsd_iget(sb, ino, generation);
        err = PTR_ERR(result);
        if (IS_ERR(result))
                goto err_out;
@@ -370,10 +370,10 @@ find_fh_dentry(struct super_block *sb, struct knfs_fh *fh, int needpath)
        /* It's a directory, or we are required to confirm the file's
         * location in the tree.
         */
-       dprintk("nfs_fh: need to look harder for %d/%d\n",sb->s_dev,fh->fh_ino);
+       dprintk("nfs_fh: need to look harder for %d/%ld\n",sb->s_dev,ino);
        down(&sb->s_nfsd_free_path_sem);
 
-       /* claiming the semaphore might have allow things to get fixed up */
+       /* claiming the semaphore might have allowed things to get fixed up */
        if (! (result->d_flags & DCACHE_NFSD_DISCONNECTED)) {
                up(&sb->s_nfsd_free_path_sem);
                return result;
@@ -383,11 +383,11 @@ find_fh_dentry(struct super_block *sb, struct knfs_fh *fh, int needpath)
        found = 0;
        if (!S_ISDIR(result->d_inode->i_mode)) {
                nfsdstats.fh_nocache_nondir++;
-               if (fh->fh_dirino == 0)
+               if (dirino == 0)
                        goto err_result; /* don't know how to find parent */
                else {
-                       /* need to iget fh->fh_dirino and make sure this inode is in that directory */
-                       dentry = nfsd_iget(sb, fh->fh_dirino, 0);
+                       /* need to iget dirino and make sure this inode is in that directory */
+                       dentry = nfsd_iget(sb, dirino, 0);
                        err = PTR_ERR(dentry);
                        if (IS_ERR(dentry))
                                goto err_result;
@@ -490,38 +490,58 @@ err_out:
 u32
 fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access)
 {
-       struct knfs_fh  *fh = &fhp->fh_handle;
+       struct knfsd_fh *fh = &fhp->fh_handle;
        struct svc_export *exp;
        struct dentry   *dentry;
        struct inode    *inode;
        u32             error = 0;
 
-       dprintk("nfsd: fh_verify(exp %s/%u file (%s/%u dir %u)\n",
-               kdevname(fh->fh_xdev),
-               fh->fh_xino,
-               kdevname(fh->fh_dev),
-               fh->fh_ino,
-               fh->fh_dirino);
+       dprintk("nfsd: fh_verify(%s)\n", SVCFH_fmt(fhp));
 
        if (!fhp->fh_dverified) {
-               /*
-                * Security: Check that the fh is internally consistant (from <gam3@acm.org>)
-                */
-               if (fh->fh_dev != fh->fh_xdev) {
-                       printk("fh_verify: Security: export on other device (%s, %s).\n",
-                              kdevname(fh->fh_dev), kdevname(fh->fh_xdev));
-                       error = nfserr_stale;
-                       nfsdstats.fh_stale++;
-                       goto out;
+               kdev_t xdev;
+               ino_t xino;
+               __u32 *datap=NULL;
+               int data_left = fh->fh_size/4;
+               int nfsdev;
+               error = nfserr_stale;
+#if CONFIG_NFSD_V3             
+               if (rqstp->rq_vers == 3)
+                       error = nfserr_badhandle;
+#endif
+               if (fh->fh_version == 1) {
+                       
+                       datap = fh->fh_auth;
+                       if (--data_left<0) goto out;
+                       switch (fh->fh_auth_type) {
+                       case 0: break;
+                       default: goto out;
+                       }
+
+                       switch (fh->fh_fsid_type) {
+                       case 0:
+                               if ((data_left-=2)<0) goto out;
+                               nfsdev = ntohl(*datap++);
+                               xdev = MKDEV(nfsdev>>16, nfsdev&0xFFFF);
+                               xino = *datap++;
+                               break;
+                       default:
+                               goto out;
+                       }
+               } else {
+                       if (fh->fh_size != NFS_FHSIZE)
+                               goto out;
+                       /* assume old filehandle format */
+                       xdev = u32_to_kdev_t(fh->ofh_xdev);
+                       xino = u32_to_ino_t(fh->ofh_xino);
                }
 
                /*
                 * Look up the export entry.
                 */
                error = nfserr_stale; 
-               exp = exp_get(rqstp->rq_client,
-                             u32_to_kdev_t(fh->fh_xdev),
-                             u32_to_ino_t(fh->fh_xino));
+               exp = exp_get(rqstp->rq_client, xdev, xino);
+
                if (!exp) {
                        /* export entry revoked */
                        nfsdstats.fh_stale++;
@@ -544,11 +564,42 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, int type, int access)
                /*
                 * Look up the dentry using the NFS file handle.
                 */
+               error = nfserr_stale;
+#if CONFIG_NFSD_V3             
+               if (rqstp->rq_vers == 3)
+                       error = nfserr_badhandle;
+#endif
 
-               dentry = find_fh_dentry(exp->ex_dentry->d_inode->i_sb,
-                                       fh,
-                                       !(exp->ex_flags & NFSEXP_NOSUBTREECHECK));
+               if (fh->fh_version == 1) {
+                       /* if fileid_type != 0, and super_operations provide fh_to_dentry lookup,
+                        *  then should use that */
+                       switch (fh->fh_fileid_type) {
+                       case 0:
+                               dentry = dget(exp->ex_dentry);
+                               break;
+                       case 1:
+                               if ((data_left-=2)<0) goto out;
+                               dentry = find_fh_dentry(exp->ex_dentry->d_inode->i_sb,
+                                                       datap[0], datap[1],
+                                                       0,
+                                                       !(exp->ex_flags & NFSEXP_NOSUBTREECHECK));
+                               break;
+                       case 2:
+                               if ((data_left-=3)<0) goto out;
+                               dentry = find_fh_dentry(exp->ex_dentry->d_inode->i_sb,
+                                                       datap[0], datap[1],
+                                                       datap[2],
+                                                       !(exp->ex_flags & NFSEXP_NOSUBTREECHECK));
+                               break;
+                       default: goto out;
+                       }
+               } else {
 
+                       dentry = find_fh_dentry(exp->ex_dentry->d_inode->i_sb,
+                                               fh->ofh_ino, fh->ofh_generation,
+                                               fh->ofh_dirino,
+                                               !(exp->ex_flags & NFSEXP_NOSUBTREECHECK));
+               }
                if (IS_ERR(dentry)) {
                        error = nfserrno(PTR_ERR(dentry));
                        goto out;
@@ -652,72 +703,96 @@ out:
  * an inode.  In this case a call to fh_update should be made
  * before the fh goes out on the wire ...
  */
-void
+inline int _fh_update(struct dentry *dentry, struct svc_export *exp,
+                     __u32 **datapp, int maxsize)
+{
+       __u32 *datap= *datapp;
+       if (dentry == exp->ex_dentry)
+               return 0;
+       /* if super_operations provides dentry_to_fh lookup, should use that */
+       
+       *datap++ = ino_t_to_u32(dentry->d_inode->i_ino);
+       *datap++ = dentry->d_inode->i_generation;
+       if (S_ISDIR(dentry->d_inode->i_mode) || (exp->ex_flags & NFSEXP_NOSUBTREECHECK)){
+               *datapp = datap;
+               return 1;
+       }
+       *datap++ = ino_t_to_u32(dentry->d_parent->d_inode->i_ino);
+       *datapp = datap;
+       return 2;
+}
+
+int
 fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry)
 {
        struct inode * inode = dentry->d_inode;
        struct dentry *parent = dentry->d_parent;
+       __u32 *datap;
 
        dprintk("nfsd: fh_compose(exp %x/%ld %s/%s, ino=%ld)\n",
                exp->ex_dev, (long) exp->ex_ino,
                parent->d_name.name, dentry->d_name.name,
                (inode ? inode->i_ino : 0));
 
-       /*
-        * N.B. We shouldn't need to init the fh -- the call to fh_compose
-        * may not be done on error paths, but the cleanup must call fh_put.
-        * Fix this soon!
-        */
        if (fhp->fh_dverified || fhp->fh_locked || fhp->fh_dentry) {
                printk(KERN_ERR "fh_compose: fh %s/%s not initialized!\n",
                        parent->d_name.name, dentry->d_name.name);
        }
-       fh_init(fhp);
-
-       fhp->fh_handle.fh_dirino = ino_t_to_u32(parent->d_inode->i_ino);
-       fhp->fh_handle.fh_dev    = kdev_t_to_u32(parent->d_inode->i_dev);
-       fhp->fh_handle.fh_xdev   = kdev_t_to_u32(exp->ex_dev);
-       fhp->fh_handle.fh_xino   = ino_t_to_u32(exp->ex_ino);
-       fhp->fh_handle.fh_dcookie = (struct dentry *)0xfeebbaca;
-       if (inode) {
-               fhp->fh_handle.fh_ino = ino_t_to_u32(inode->i_ino);
-               fhp->fh_handle.fh_generation = inode->i_generation;
-               if (S_ISDIR(inode->i_mode) || (exp->ex_flags & NFSEXP_NOSUBTREECHECK))
-                       fhp->fh_handle.fh_dirino = 0;
-       }
+       if (fhp->fh_maxsize < NFS_FHSIZE)
+               printk(KERN_ERR "fh_compose: called with maxsize %d! %s/%s\n",
+                      fhp->fh_maxsize, parent->d_name.name, dentry->d_name.name);
 
        fhp->fh_dentry = dentry; /* our internal copy */
        fhp->fh_export = exp;
 
+       fhp->fh_handle.fh_version = 1;
+       fhp->fh_handle.fh_auth_type = 0;
+       fhp->fh_handle.fh_fsid_type = 0;
+       datap = fhp->fh_handle.fh_auth+0;
+       /* fsid_type 0 == 2byte major, 2byte minor, 4byte inode */
+       *datap++ = htonl((MAJOR(exp->ex_dev)<<16)| MINOR(exp->ex_dev));
+       *datap++ = ino_t_to_u32(exp->ex_ino);
+
+       if (inode)
+               fhp->fh_handle.fh_fileid_type =
+                       _fh_update(dentry, exp, &datap, fhp->fh_maxsize-3);
+
+       fhp->fh_handle.fh_size = (datap-fhp->fh_handle.fh_auth+1)*4;
+
+
        /* We stuck it there, we know it's good. */
        fhp->fh_dverified = 1;
        nfsd_nr_verified++;
+       if (fhp->fh_handle.fh_fileid_type == 255)
+               return nfserr_opnotsupp;
+       return 0;
 }
 
 /*
  * Update file handle information after changing a dentry.
- * This is only called by nfsd_create
+ * This is only called by nfsd_create, nfsd_create_v3 and nfsd_proc_create
  */
-void
+int
 fh_update(struct svc_fh *fhp)
 {
        struct dentry *dentry;
-       struct inode *inode;
-
+       __u32 *datap;
+       
        if (!fhp->fh_dverified)
                goto out_bad;
 
        dentry = fhp->fh_dentry;
-       inode = dentry->d_inode;
-       if (!inode)
+       if (!dentry->d_inode)
                goto out_negative;
-       fhp->fh_handle.fh_ino = ino_t_to_u32(inode->i_ino);
-       fhp->fh_handle.fh_generation = inode->i_generation;
-       if (S_ISDIR(inode->i_mode) || (fhp->fh_export->ex_flags & NFSEXP_NOSUBTREECHECK))
-               fhp->fh_handle.fh_dirino = 0;
-
+       if (fhp->fh_handle.fh_fileid_type != 0)
+               goto out_uptodate;
+       datap = fhp->fh_handle.fh_auth+
+                         fhp->fh_handle.fh_size/4 -1;
+       fhp->fh_handle.fh_fileid_type =
+               _fh_update(dentry, fhp->fh_export, &datap, fhp->fh_maxsize-fhp->fh_handle.fh_size);
+       fhp->fh_handle.fh_size = (datap-fhp->fh_handle.fh_auth+1)*4;
 out:
-       return;
+       return 0;
 
 out_bad:
        printk(KERN_ERR "fh_update: fh not verified!\n");
@@ -726,6 +801,10 @@ out_negative:
        printk(KERN_ERR "fh_update: %s/%s still negative!\n",
                dentry->d_parent->d_name.name, dentry->d_name.name);
        goto out;
+out_uptodate:
+       printk(KERN_ERR "fh_update: %s/%s already up-to-date!\n",
+               dentry->d_parent->d_name.name, dentry->d_name.name);
+       goto out;
 }
 
 /*
index 20a68228b9e5194f14c5490a4d614c9b0ce82f6c..7d570299f2a4ebdf34b0fdc9c0907bb660819ac4 100644 (file)
@@ -52,8 +52,7 @@ static int
 nfsd_proc_getattr(struct svc_rqst *rqstp, struct nfsd_fhandle  *argp,
                                          struct nfsd_attrstat *resp)
 {
-       dprintk("nfsd: GETATTR  %d/%d\n",
-               SVCFH_DEV(&argp->fh), SVCFH_INO(&argp->fh));
+       dprintk("nfsd: GETATTR  %s\n", SVCFH_fmt(&argp->fh));
 
        fh_copy(&resp->fh, &argp->fh);
        return fh_verify(rqstp, &resp->fh, 0, MAY_NOP);
@@ -67,8 +66,8 @@ static int
 nfsd_proc_setattr(struct svc_rqst *rqstp, struct nfsd_sattrargs *argp,
                                          struct nfsd_attrstat  *resp)
 {
-       dprintk("nfsd: SETATTR  %d/%d, valid=%x, size=%ld\n",
-               SVCFH_DEV(&argp->fh), SVCFH_INO(&argp->fh),
+       dprintk("nfsd: SETATTR  %s, valid=%x, size=%ld\n",
+               SVCFH_fmt(&argp->fh),
                argp->attrs.ia_valid, (long) argp->attrs.ia_size);
 
        fh_copy(&resp->fh, &argp->fh);
@@ -87,9 +86,10 @@ nfsd_proc_lookup(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: LOOKUP   %d/%d %s\n",
-               SVCFH_DEV(&argp->fh), SVCFH_INO(&argp->fh), argp->name);
+       dprintk("nfsd: LOOKUP   %s %s\n",
+               SVCFH_fmt(&argp->fh), argp->name);
 
+       fh_init(&resp->fh, NFS_FHSIZE);
        nfserr = nfsd_lookup(rqstp, &argp->fh, argp->name, argp->len,
                                 &resp->fh);
 
@@ -107,7 +107,7 @@ nfsd_proc_readlink(struct svc_rqst *rqstp, struct nfsd_fhandle     *argp,
        u32             *path;
        int             dummy, nfserr;
 
-       dprintk("nfsd: READLINK %p\n", SVCFH_DENTRY(&argp->fh));
+       dprintk("nfsd: READLINK %s\n", SVCFH_fmt(&argp->fh));
 
        /* Reserve room for status and path length */
        svcbuf_reserve(&rqstp->rq_resbuf, &path, &dummy, 2);
@@ -131,8 +131,8 @@ nfsd_proc_read(struct svc_rqst *rqstp, struct nfsd_readargs *argp,
        u32 *   buffer;
        int     nfserr, avail;
 
-       dprintk("nfsd: READ    %d/%d %d bytes at %d\n",
-               SVCFH_DEV(&argp->fh), SVCFH_INO(&argp->fh),
+       dprintk("nfsd: READ    %s %d bytes at %d\n",
+               SVCFH_fmt(&argp->fh),
                argp->count, argp->offset);
 
        /* Obtain buffer pointer for payload. 19 is 1 word for
@@ -169,8 +169,8 @@ nfsd_proc_write(struct svc_rqst *rqstp, struct nfsd_writeargs *argp,
        int     nfserr;
        int     stable = 1;
 
-       dprintk("nfsd: WRITE    %d/%d %d bytes at %d\n",
-               SVCFH_DEV(&argp->fh), SVCFH_INO(&argp->fh),
+       dprintk("nfsd: WRITE    %s %d bytes at %d\n",
+               SVCFH_fmt(&argp->fh),
                argp->len, argp->offset);
 
        nfserr = nfsd_write(rqstp, fh_copy(&resp->fh, &argp->fh),
@@ -198,8 +198,8 @@ nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
        int             nfserr, type, mode, rdonly = 0;
        dev_t           rdev = NODEV;
 
-       dprintk("nfsd: CREATE   %d/%d %s\n",
-               SVCFH_DEV(dirfhp), SVCFH_INO(dirfhp), argp->name);
+       dprintk("nfsd: CREATE   %s %s\n",
+               SVCFH_fmt(dirfhp), argp->name);
 
        /* First verify the parent file handle */
        nfserr = fh_verify(rqstp, dirfhp, S_IFDIR, MAY_EXEC);
@@ -217,6 +217,7 @@ nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
        /*
         * Do a lookup to verify the new file handle.
         */
+       fh_init(newfhp, NFS_FHSIZE);
        nfserr = nfsd_lookup(rqstp, dirfhp, argp->name, argp->len, newfhp);
        if (nfserr) {
                if (nfserr != nfserr_noent)
@@ -240,9 +241,11 @@ nfsd_proc_create(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
        if (nfserr)
                goto done;
        inode = newfhp->fh_dentry->d_inode;
-       if (inode && newfhp->fh_handle.fh_ino == 0)
+       if (inode && newfhp->fh_handle.fh_fileid_type == 0)
                 /* inode might have been instantiated while we slept */
-                fh_update(newfhp);
+               nfserr = fh_update(newfhp);
+       if (nfserr)
+               goto done;
 
        /* Unfudge the mode bits */
        if (attr->ia_valid & ATTR_MODE) { 
@@ -330,7 +333,7 @@ nfsd_proc_remove(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: REMOVE   %p %s\n", SVCFH_DENTRY(&argp->fh), argp->name);
+       dprintk("nfsd: REMOVE   %s %s\n", SVCFH_fmt(&argp->fh), argp->name);
 
        /* Unlink. -SIFDIR means file must not be a directory */
        nfserr = nfsd_unlink(rqstp, &argp->fh, -S_IFDIR, argp->name, argp->len);
@@ -344,9 +347,10 @@ nfsd_proc_rename(struct svc_rqst *rqstp, struct nfsd_renameargs *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: RENAME   %p %s -> %p %s\n",
-               SVCFH_DENTRY(&argp->ffh), argp->fname,
-               SVCFH_DENTRY(&argp->tfh), argp->tname);
+       dprintk("nfsd: RENAME   %s %s -> \n",
+               SVCFH_fmt(&argp->ffh), argp->fname);
+       dprintk("nfsd:        ->  %s %s\n",
+               SVCFH_fmt(&argp->tfh), argp->tname);
 
        nfserr = nfsd_rename(rqstp, &argp->ffh, argp->fname, argp->flen,
                                    &argp->tfh, argp->tname, argp->tlen);
@@ -361,9 +365,10 @@ nfsd_proc_link(struct svc_rqst *rqstp, struct nfsd_linkargs *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: LINK     %p -> %p %s\n",
-               SVCFH_DENTRY(&argp->ffh),
-               SVCFH_DENTRY(&argp->tfh),
+       dprintk("nfsd: LINK     %s ->\n",
+               SVCFH_fmt(&argp->ffh));
+       dprintk("nfsd:    %s %s\n",
+               SVCFH_fmt(&argp->tfh),
                argp->tname);
 
        nfserr = nfsd_link(rqstp, &argp->tfh, argp->tname, argp->tlen,
@@ -380,10 +385,10 @@ nfsd_proc_symlink(struct svc_rqst *rqstp, struct nfsd_symlinkargs *argp,
        struct svc_fh   newfh;
        int             nfserr;
 
-       dprintk("nfsd: SYMLINK  %p %s -> %s\n",
-               SVCFH_DENTRY(&argp->ffh), argp->fname, argp->tname);
+       dprintk("nfsd: SYMLINK  %s %s -> %s\n",
+               SVCFH_fmt(&argp->ffh), argp->fname, argp->tname);
 
-       memset(&newfh, 0, sizeof(struct svc_fh));
+       fh_init(&newfh, NFS_FHSIZE);
        /*
         * Create the link, look up new file and set attrs.
         */
@@ -407,7 +412,7 @@ nfsd_proc_mkdir(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: MKDIR    %p %s\n", SVCFH_DENTRY(&argp->fh), argp->name);
+       dprintk("nfsd: MKDIR    %s %s\n", SVCFH_fmt(&argp->fh), argp->name);
 
        if (resp->fh.fh_dverified) {
                printk(KERN_WARNING
@@ -415,6 +420,7 @@ nfsd_proc_mkdir(struct svc_rqst *rqstp, struct nfsd_createargs *argp,
        }
 
        argp->attrs.ia_valid &= ~ATTR_SIZE;
+       fh_init(&resp->fh, NFS_FHSIZE);
        nfserr = nfsd_create(rqstp, &argp->fh, argp->name, argp->len,
                                    &argp->attrs, S_IFDIR, 0, &resp->fh);
        fh_put(&argp->fh);
@@ -430,7 +436,7 @@ nfsd_proc_rmdir(struct svc_rqst *rqstp, struct nfsd_diropargs *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: RMDIR    %p %s\n", SVCFH_DENTRY(&argp->fh), argp->name);
+       dprintk("nfsd: RMDIR    %s %s\n", SVCFH_fmt(&argp->fh), argp->name);
 
        nfserr = nfsd_unlink(rqstp, &argp->fh, S_IFDIR, argp->name, argp->len);
        fh_put(&argp->fh);
@@ -447,8 +453,8 @@ nfsd_proc_readdir(struct svc_rqst *rqstp, struct nfsd_readdirargs *argp,
        u32 *           buffer;
        int             nfserr, count;
 
-       dprintk("nfsd: READDIR  %d/%d %d bytes at %d\n",
-               SVCFH_DEV(&argp->fh), SVCFH_INO(&argp->fh),
+       dprintk("nfsd: READDIR  %s %d bytes at %d\n",
+               SVCFH_fmt(&argp->fh),           
                argp->count, argp->cookie);
 
        /* Reserve buffer space for status */
@@ -482,7 +488,7 @@ nfsd_proc_statfs(struct svc_rqst * rqstp, struct nfsd_fhandle   *argp,
 {
        int     nfserr;
 
-       dprintk("nfsd: STATFS   %p\n", SVCFH_DENTRY(&argp->fh));
+       dprintk("nfsd: STATFS   %s\n", SVCFH_fmt(&argp->fh));
 
        nfserr = nfsd_statfs(rqstp, &argp->fh, &resp->stats);
        fh_put(&argp->fh);
index b5ad1c07704fe2a6c81d2c0462e60679b597715b..2984f03306ede089bed26d3612b390700f1cdbb7 100644 (file)
@@ -39,19 +39,20 @@ static u32  nfs_ftypes[] = {
 static inline u32 *
 decode_fh(u32 *p, struct svc_fh *fhp)
 {
-       fh_init(fhp);
-       memcpy(&fhp->fh_handle, p, sizeof(struct knfs_fh));
+       fh_init(fhp, NFS_FHSIZE);
+       memcpy(&fhp->fh_handle.fh_base, p, NFS_FHSIZE);
+       fhp->fh_handle.fh_size = NFS_FHSIZE;
 
        /* FIXME: Look up export pointer here and verify
         * Sun Secure RPC if requested */
-       return p + (sizeof(struct knfs_fh) >> 2);
+       return p + (NFS_FHSIZE >> 2);
 }
 
 static inline u32 *
 encode_fh(u32 *p, struct svc_fh *fhp)
 {
-       memcpy(p, &fhp->fh_handle, sizeof(struct knfs_fh));
-       return p + (sizeof(struct knfs_fh) >> 2);
+       memcpy(p, &fhp->fh_handle.fh_base, NFS_FHSIZE);
+       return p + (NFS_FHSIZE>> 2);
 }
 
 /*
index 7cb4e4bc3de0145013ebea901dee50122ad84393..06a795841241f2ac920346f38d945de1cc86beb5 100644 (file)
@@ -138,7 +138,7 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name,
        struct dentry           *dparent, *dchild;
        int                     err;
 
-       dprintk("nfsd: nfsd_lookup(fh %p, %s)\n", SVCFH_DENTRY(fhp), name);
+       dprintk("nfsd: nfsd_lookup(fh %s, %s)\n", SVCFH_fmt(fhp), name);
 
        /* Obtain dentry and export. */
        err = fh_verify(rqstp, fhp, S_IFDIR, MAY_EXEC);
@@ -156,7 +156,10 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name,
        err = nfserr_acces;
 
        /* Lookup the name, but don't follow links */
-       dchild = lookup_dentry(name, dget(dparent), 0);
+       if (strcmp(name,"..")==0 && dparent->d_covers != dparent)
+               dchild = dget(dparent);
+       else
+               dchild = lookup_dentry(name, dget(dparent), 0);
        if (IS_ERR(dchild))
                goto out_nfserr;
        /*
@@ -188,10 +191,9 @@ nfsd_lookup(struct svc_rqst *rqstp, struct svc_fh *fhp, const char *name,
         * Note: we compose the file handle now, but as the
         * dentry may be negative, it may need to be updated.
         */
-       fh_compose(resfh, exp, dchild);
-       err = nfserr_noent;
-       if (dchild->d_inode)
-               err = 0;
+       err = fh_compose(resfh, exp, dchild);
+       if (!err && !dchild->d_inode)
+               err = nfserr_noent;
 out:
        return err;
 
@@ -587,7 +589,7 @@ nfsd_read(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t offset,
                goto out_close;
 
        /* Get readahead parameters */
-       ra = nfsd_get_raparms(fhp->fh_handle.fh_dev, fhp->fh_handle.fh_ino);
+       ra = nfsd_get_raparms(fhp->fh_export->ex_dev, fhp->fh_dentry->d_inode->i_ino);
        if (ra) {
                file.f_reada = ra->p_reada;
                file.f_ramax = ra->p_ramax;
@@ -831,11 +833,13 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
                err = PTR_ERR(dchild);
                if (IS_ERR(dchild))
                        goto out_nfserr;
-               fh_compose(resfhp, fhp->fh_export, dchild);
                /* Lock the parent and check for errors ... */
                err = fh_lock_parent(fhp, dchild);
                if (err)
                        goto out;
+               err = fh_compose(resfhp, fhp->fh_export, dchild);
+               if (err)
+                       goto out;
        } else {
                /* called from nfsd_proc_create */
                dchild = resfhp->fh_dentry;
@@ -892,10 +896,6 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
                write_inode_now(dchild->d_inode);
        }
 
-       /*
-        * Update the file handle to get the new inode info.
-        */
-       fh_update(resfhp);
 
        /* Set file attributes. Mode has already been set and
         * setting uid/gid works only for root. Irix appears to
@@ -905,6 +905,11 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
        err = 0;
        if ((iap->ia_valid &= ~(ATTR_UID|ATTR_GID|ATTR_MODE)) != 0)
                err = nfsd_setattr(rqstp, resfhp, iap);
+       /*
+        * Update the file handle to get the new inode info.
+        */
+       if (!err)
+               err = fh_update(resfhp);
 out:
        return err;
 
@@ -951,22 +956,20 @@ nfsd_create_v3(struct svc_rqst *rqstp, struct svc_fh *fhp,
        err = PTR_ERR(dchild);
        if(IS_ERR(dchild))
                goto out_nfserr;
-       fh_compose(resfhp, fhp->fh_export, dchild);
 
        /*
         * We must lock the directory before we check for the inode.
         */
        err = fh_lock_parent(fhp, dchild);
        if (err)
-           goto out;
+               goto out;
+       err = fh_compose(resfhp, fhp->fh_export, dchild);
+       if (err)
+               goto out;
 
        if (dchild->d_inode) {
                err = 0;
 
-               if (resfhp->fh_handle.fh_ino == 0)
-                    /* inode might have been instantiated while we slept */
-                   fh_update(resfhp);
-               
                switch (createmode) {
                case NFS3_CREATE_UNCHECKED:
                        if (! S_ISREG(dchild->d_inode->i_mode))
@@ -1001,8 +1004,9 @@ nfsd_create_v3(struct svc_rqst *rqstp, struct svc_fh *fhp,
        /*
         * Update the filehandle to get the new inode info.
         */
-       fh_update(resfhp);
-       err = 0;
+       err = fh_update(resfhp);
+       if (err)
+               goto out;
 
        if (createmode == NFS3_CREATE_EXCLUSIVE) {
                /* Cram the verifier into atime/mtime */
@@ -1087,7 +1091,7 @@ nfsd_symlink(struct svc_rqst *rqstp, struct svc_fh *fhp,
                                struct iattr *iap)
 {
        struct dentry   *dentry, *dnew;
-       int             err;
+       int             err, cerr;
 
        err = nfserr_noent;
        if (!flen || !plen)
@@ -1131,7 +1135,8 @@ nfsd_symlink(struct svc_rqst *rqstp, struct svc_fh *fhp,
 
        /* Compose the fh so the dentry will be freed ... */
 out_compose:
-       fh_compose(resfhp, fhp->fh_export, dnew);
+       cerr = fh_compose(resfhp, fhp->fh_export, dnew);
+       if (err==0) err = cerr;
 out:
        return err;
 
@@ -1361,8 +1366,10 @@ nfsd_unlink(struct svc_rqst *rqstp, struct svc_fh *fhp, int type,
        }
 
        err = fh_lock_parent(fhp, rdentry);
-       if (err)
+       if (err) {
+               dput(rdentry);
                goto out;
+       }
 
        if (type != S_IFDIR) { /* It's UNLINK */
                err = vfs_unlink(dirp, rdentry);
index 7eef467363324414e69d3ee6d43042935f070e51..a24faac65d894310ce07c735bde6d30f7a086cde 100644 (file)
@@ -746,7 +746,6 @@ static void ntfs_put_super(struct super_block *sb)
        ntfs_free(vol);
 #endif
        ntfs_debug(DEBUG_OTHER, "ntfs_put_super: done\n");
-       MOD_DEC_USE_COUNT;
 }
 
 /* Called by the kernel when asking for stats */
@@ -818,14 +817,6 @@ struct super_block * ntfs_read_super(struct super_block *sb,
        struct buffer_head *bh;
        int i;
 
-       /* When the driver is compiled as a module, kmod must know when it
-        * can safely remove it from memory. To do this, each module owns a
-        * reference counter.
-        */
-       MOD_INC_USE_COUNT;
-       /* Don't put ntfs_debug() before MOD_INC_USE_COUNT, printk() can block
-        * so this could lead to a race condition with kmod.
-        */
        ntfs_debug(DEBUG_OTHER, "ntfs_read_super\n");
 
 #ifdef NTFS_IN_LINUX_KERNEL
@@ -839,9 +830,6 @@ struct super_block * ntfs_read_super(struct super_block *sb,
        if(!parse_options(vol,(char*)options))
                goto ntfs_read_super_vol;
 
-       /* Ensure that the super block won't be used until it is completed */
-       lock_super(sb);
-       ntfs_debug(DEBUG_OTHER, "lock_super\n");
 #if 0
        /* Set to read only, user option might reset it */
        sb->s_flags |= MS_RDONLY;
@@ -914,48 +902,24 @@ struct super_block * ntfs_read_super(struct super_block *sb,
                ntfs_error("Could not get root dir inode\n");
                goto ntfs_read_super_mft;
        }
-       unlock_super(sb);
-       ntfs_debug(DEBUG_OTHER, "unlock_super\n");
        ntfs_debug(DEBUG_OTHER, "read_super: done\n");
        return sb;
 
 ntfs_read_super_mft:
        ntfs_free(vol->mft);
 ntfs_read_super_unl:
-       sb->s_dev = 0;
-       unlock_super(sb);
-       ntfs_debug(DEBUG_OTHER, "unlock_super\n");
 ntfs_read_super_vol:
        #ifndef NTFS_IN_LINUX_KERNEL
        ntfs_free(vol);
 ntfs_read_super_dec:
        #endif
        ntfs_debug(DEBUG_OTHER, "read_super: done\n");
-       MOD_DEC_USE_COUNT;
        return NULL;
 }
 
 /* Define the filesystem
- *
- * Define SECOND if you cannot unload ntfs, and want to avoid rebooting
- * for just one more test
  */
-static struct file_system_type ntfs_fs_type = {
-/* Filesystem name, as used after mount -t */
-#ifndef SECOND
-       "ntfs",
-#else
-       "ntfs2",
-#endif
-/* This filesystem requires a device (a hard disk)
- * May want to add FS_IBASKET when it works
- */
-       FS_REQUIRES_DEV,
-/* Entry point of the filesystem */
-       ntfs_read_super,
-/* Will point to the next filesystem in the kernel table */
-       NULL
-};
+static DECLARE_FSTYPE_DEV(ntfs_fs_type, "ntfs", ntfs_read_super);
 
 /* When this code is not compiled as a module, this is the main entry point,
  * called by do_sys_setup() in fs/filesystems.c
index 87576a4dbd73ab5b0068df491dadee12d6b9786a..a95ad1acd9d0da9881fe6310a5d4126a2e728da3 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: inode.c,v 1.6 2000/02/27 08:19:47 davem Exp $
+/* $Id: inode.c,v 1.7 2000/03/10 04:45:50 davem Exp $
  * openpromfs.c: /proc/openprom handling routines
  *
  * Copyright (C) 1996-1999 Jakub Jelinek  (jakub@redhat.com)
@@ -982,7 +982,6 @@ static void openprom_read_inode(struct inode * inode)
 
 static void openprom_put_super(struct super_block *sb)
 {
-       MOD_DEC_USE_COUNT;
 }
 
 static int openprom_statfs(struct super_block *sb, struct statfs *buf)
@@ -1007,8 +1006,6 @@ struct super_block *openprom_read_super(struct super_block *s,void *data,
 {
        struct inode * root_inode;
 
-       MOD_INC_USE_COUNT;
-       lock_super(s);
        s->s_blocksize = 1024;
        s->s_blocksize_bits = 10;
        s->s_magic = OPENPROM_SUPER_MAGIC;
@@ -1019,24 +1016,15 @@ struct super_block *openprom_read_super(struct super_block *s,void *data,
        s->s_root = d_alloc_root(root_inode);
        if (!s->s_root)
                goto out_no_root;
-       unlock_super(s);
        return s;
 
 out_no_root:
        printk("openprom_read_super: get root inode failed\n");
        iput(root_inode);
-       s->s_dev = 0;
-       unlock_super(s);
-       MOD_DEC_USE_COUNT;
        return NULL;
 }
 
-static struct file_system_type openprom_fs_type = {
-       "openpromfs",
-       0,
-       openprom_read_super,
-       NULL
-};
+static DECLARE_FSTYPE(openprom_fs_type, "openpromfs", openprom_read_super, 0);
 
 int init_openprom_fs(void)
 {
index 12bfd46112e8d18d705033c7ba7cfc2a9a287ecd..90ed410b714c009881126867ec978615cda8e9cd 100644 (file)
@@ -205,7 +205,6 @@ struct super_block *proc_read_super(struct super_block *s,void *data,
        struct inode * root_inode;
        struct task_struct *p;
 
-       lock_super(s);
        s->s_blocksize = 1024;
        s->s_blocksize_bits = 10;
        s->s_magic = PROC_SUPER_MAGIC;
@@ -225,13 +224,10 @@ struct super_block *proc_read_super(struct super_block *s,void *data,
        parse_options(data, &root_inode->i_uid, &root_inode->i_gid);
        s->u.generic_sbp = (void*) proc_super_blocks;
        proc_super_blocks = s;
-       unlock_super(s);
        return s;
 
 out_no_root:
        printk("proc_read_super: get root inode failed\n");
        iput(root_inode);
-       s->s_dev = 0;
-       unlock_super(s);
        return NULL;
 }
index cc1ae7d962287d01571e1331b3d074fca24c0ba0..0203b9776e1ac4fbf494e662c08437d36448a745 100644 (file)
@@ -20,12 +20,7 @@ EXPORT_SYMBOL(proc_net);
 EXPORT_SYMBOL(proc_bus);
 EXPORT_SYMBOL(proc_root_driver);
 
-static struct file_system_type proc_fs_type = {
-       "proc", 
-       0 /* FS_NO_DCACHE doesn't work correctly */,
-       proc_read_super, 
-       NULL
-};
+static DECLARE_FSTYPE(proc_fs_type, "proc", proc_read_super, 0);
 
 int __init init_proc_fs(void)
 {
index 3fe876e96f39dd11272cd97f2df4544efc031077..b85483d3d0aec88d0d0f7d94988ca6ee443037fb 100644 (file)
@@ -337,8 +337,6 @@ static struct super_block *qnx4_read_super(struct super_block *s,
        struct inode *root;
        const char *errmsg;
 
-       MOD_INC_USE_COUNT;
-       lock_super(s);
        set_blocksize(dev, QNX4_BLOCK_SIZE);
        s->s_blocksize = QNX4_BLOCK_SIZE;
        s->s_blocksize_bits = QNX4_BLOCK_SIZE_BITS;
@@ -393,7 +391,6 @@ static struct super_block *qnx4_read_super(struct super_block *s,
                goto outi;
 
        brelse(bh);
-       unlock_super(s);
        s->s_dirt = 1;
 
        return s;
@@ -403,9 +400,6 @@ static struct super_block *qnx4_read_super(struct super_block *s,
       out:
        brelse(bh);
       outnobh:
-       s->s_dev = 0;
-       unlock_super(s);
-       MOD_DEC_USE_COUNT;
 
        return NULL;
 }
@@ -413,7 +407,6 @@ static struct super_block *qnx4_read_super(struct super_block *s,
 static void qnx4_put_super(struct super_block *sb)
 {
        kfree_s( sb->u.qnx4_sb.BitMap, sizeof( struct qnx4_inode_entry ) );
-       MOD_DEC_USE_COUNT;
        return;
 }
 
@@ -496,13 +489,7 @@ static void qnx4_read_inode(struct inode *inode)
        brelse(bh);
 }
 
-static struct file_system_type qnx4_fs_type =
-{
-       "qnx4",
-       FS_REQUIRES_DEV,
-       qnx4_read_super,
-       NULL
-};
+static DECLARE_FSTYPE_DEV(qnx4_fs_type, "qnx4", qnx4_read_super);
 
 int __init init_qnx4_fs(void)
 {
index 1180e0912e323d7f982ca752b38de8a8cfe1c663..15e80519fba5dd3bcaf70ccc61029ec0804ed2dd 100644 (file)
@@ -105,11 +105,8 @@ romfs_read_super(struct super_block *s, void *data, int silent)
        struct romfs_super_block *rsb;
        int sz;
 
-       MOD_INC_USE_COUNT;
-
        /* I would parse the options here, but there are none.. :) */
 
-       lock_super(s);
        set_blocksize(dev, ROMBSIZE);
        s->s_blocksize = ROMBSIZE;
        s->s_blocksize_bits = ROMBSBITS;
@@ -153,16 +150,11 @@ romfs_read_super(struct super_block *s, void *data, int silent)
        if (!s->s_root)
                goto outnobh;
 
-       unlock_super(s);
-
        /* Ehrhm; sorry.. :)  And thanks to Hans-Joachim Widmaier  :) */
        if (0) {
 out:
                brelse(bh);
 outnobh:
-               s->s_dev = 0;
-               unlock_super(s);
-               MOD_DEC_USE_COUNT;
                s = NULL;
        }
 
@@ -174,7 +166,6 @@ outnobh:
 static void
 romfs_put_super(struct super_block *sb)
 {
-       MOD_DEC_USE_COUNT;
        return;
 }
 
@@ -539,12 +530,7 @@ static struct super_operations romfs_ops = {
        statfs:         romfs_statfs,
 };
 
-static struct file_system_type romfs_fs_type = {
-       "romfs",
-       FS_REQUIRES_DEV,
-       romfs_read_super,
-       NULL
-};
+static DECLARE_FSTYPE_DEV(romfs_fs_type, "romfs", romfs_read_super);
 
 int __init init_romfs_fs(void)
 {
index c3a7b58480b888d356c24c1b3b0fcdd3aec921bc..94923fbad7d292af132b1bf5840cdb1963d2027f 100644 (file)
@@ -315,8 +315,6 @@ smb_put_super(struct super_block *sb)
        kfree(sb->u.smbfs_sb.temp_buf);
        if (server->packet)
                smb_vfree(server->packet);
-
-       MOD_DEC_USE_COUNT;
 }
 
 struct super_block *
@@ -326,15 +324,11 @@ smb_read_super(struct super_block *sb, void *raw_data, int silent)
        struct inode *root_inode;
        struct smb_fattr root;
 
-       MOD_INC_USE_COUNT;
-
        if (!raw_data)
                goto out_no_data;
        if (((struct smb_mount_data *) raw_data)->version != SMB_MOUNT_VERSION)
                goto out_wrong_data;
 
-       lock_super(sb);
-
        sb->s_blocksize = 1024; /* Eh...  Is this correct? */
        sb->s_blocksize_bits = 10;
        sb->s_magic = SMB_SUPER_MAGIC;
@@ -389,7 +383,6 @@ smb_read_super(struct super_block *sb, void *raw_data, int silent)
        if (!sb->s_root)
                goto out_no_root;
 
-       unlock_super(sb);
        return sb;
 
 out_no_root:
@@ -401,7 +394,6 @@ out_no_temp:
        smb_vfree(sb->u.smbfs_sb.packet);
 out_no_mem:
        printk(KERN_ERR "smb_read_super: allocation failure\n");
-       unlock_super(sb);
        goto out_fail;
 out_wrong_data:
        printk(KERN_ERR "SMBFS: need mount version %d\n", SMB_MOUNT_VERSION);
@@ -409,8 +401,6 @@ out_wrong_data:
 out_no_data:
        printk("smb_read_super: missing data argument\n");
 out_fail:
-       sb->s_dev = 0;
-       MOD_DEC_USE_COUNT;
        return NULL;
 }
 
@@ -544,12 +534,7 @@ int smb_current_kmalloced;
 int smb_current_vmalloced;
 #endif
 
-static struct file_system_type smb_fs_type = {
-       "smbfs",
-       0 /* FS_NO_DCACHE doesn't work correctly */,
-       smb_read_super,
-       NULL
-};
+static DECLARE_FSTYPE( smb_fs_type, "smbfs", smb_read_super, 0);
 
 int __init init_smb_fs(void)
 {
index 10ac19f2dc3020a7aaeeea239886295a877e6034..c365c556c8d238bee5c48a90058c02ec0e812588 100644 (file)
@@ -35,9 +35,9 @@
 #include <linux/nfs_fs_sb.h>
 #include <linux/nfs_mount.h>
 
-#ifdef CONFIG_KMOD
 #include <linux/kmod.h>
-#endif
+#define __NO_VERSION__
+#include <linux/module.h>
 
 /*
  * We use a semaphore to synchronize all mount/umount
@@ -60,7 +60,194 @@ int nr_super_blocks = 0;
 int max_super_blocks = NR_SUPER;
 LIST_HEAD(super_blocks);
 
+/*
+ * Handling of filesystem drivers list.
+ * Rules:
+ *     Inclusion to/removals from/scanning of list are protected by spinlock.
+ *     During the unload module must call unregister_filesystem().
+ *     We can access the fields of list element if:
+ *             1) spinlock is held or
+ *             2) we hold the reference to the module.
+ *     The latter can be guaranteed by call of try_inc_mod_count(); if it
+ *     returned 0 we must skip the element, otherwise we got the reference.
+ *     Once the reference is obtained we can drop the spinlock.
+ */
+
 static struct file_system_type *file_systems = NULL;
+static spinlock_t file_systems_lock = SPIN_LOCK_UNLOCKED;
+
+static void put_filesystem(struct file_system_type *fs)
+{
+       if (fs->owner)
+               __MOD_DEC_USE_COUNT(fs->owner);
+}
+
+static struct file_system_type **find_filesystem(const char *name)
+{
+       struct file_system_type **p;
+       for (p=&file_systems; *p; p=&(*p)->next)
+               if (strcmp((*p)->name,name) == 0)
+                       break;
+       return p;
+}
+
+int register_filesystem(struct file_system_type * fs)
+{
+       int res = 0;
+       struct file_system_type ** p;
+
+       if (!fs)
+               return -EINVAL;
+       if (fs->next)
+               return -EBUSY;
+       spin_lock(&file_systems_lock);
+       p = find_filesystem(fs->name);
+       if (*p)
+               res = -EBUSY;
+       else
+               *p = fs;
+       spin_unlock(&file_systems_lock);
+       return res;
+}
+
+int unregister_filesystem(struct file_system_type * fs)
+{
+       struct file_system_type ** tmp;
+
+       spin_lock(&file_systems_lock);
+       tmp = &file_systems;
+       while (*tmp) {
+               if (fs == *tmp) {
+                       *tmp = fs->next;
+                       fs->next = NULL;
+                       spin_unlock(&file_systems_lock);
+                       return 0;
+               }
+               tmp = &(*tmp)->next;
+       }
+       spin_unlock(&file_systems_lock);
+       return -EINVAL;
+}
+
+static int fs_index(const char * __name)
+{
+       struct file_system_type * tmp;
+       char * name;
+       int err, index;
+
+       name = getname(__name);
+       err = PTR_ERR(name);
+       if (IS_ERR(name))
+               return err;
+
+       err = -EINVAL;
+       spin_lock(&file_systems_lock);
+       for (tmp=file_systems, index=0 ; tmp ; tmp=tmp->next, index++) {
+               if (strcmp(tmp->name,name) == 0) {
+                       err = index;
+                       break;
+               }
+               index++;
+       }
+       spin_unlock(&file_systems_lock);
+       putname(name);
+       return err;
+}
+
+static int fs_name(unsigned int index, char * buf)
+{
+       struct file_system_type * tmp;
+       int len, res;
+
+       spin_lock(&file_systems_lock);
+       for (tmp = file_systems; tmp; tmp = tmp->next, index--)
+               if (index <= 0 && try_inc_mod_count(tmp->owner))
+                               break;
+       spin_unlock(&file_systems_lock);
+       if (!tmp)
+               return -EINVAL;
+
+       /* OK, we got the reference, so we can safely block */
+       len = strlen(tmp->name) + 1;
+       res = copy_to_user(buf, tmp->name, len) ? -EFAULT : 0;
+       put_filesystem(tmp);
+       return res;
+}
+
+static int fs_maxindex(void)
+{
+       struct file_system_type * tmp;
+       int index;
+
+       spin_lock(&file_systems_lock);
+       for (tmp = file_systems, index = 0 ; tmp ; tmp = tmp->next, index++)
+               ;
+       spin_unlock(&file_systems_lock);
+       return index;
+}
+
+/*
+ * Whee.. Weird sysv syscall. 
+ */
+asmlinkage long sys_sysfs(int option, unsigned long arg1, unsigned long arg2)
+{
+       int retval = -EINVAL;
+
+       lock_kernel();
+       switch (option) {
+               case 1:
+                       retval = fs_index((const char *) arg1);
+                       break;
+
+               case 2:
+                       retval = fs_name(arg1, (char *) arg2);
+                       break;
+
+               case 3:
+                       retval = fs_maxindex();
+                       break;
+       }
+       unlock_kernel();
+       return retval;
+}
+
+int get_filesystem_list(char * buf)
+{
+       int len = 0;
+       struct file_system_type * tmp;
+
+       spin_lock(&file_systems_lock);
+       tmp = file_systems;
+       while (tmp && len < PAGE_SIZE - 80) {
+               len += sprintf(buf+len, "%s\t%s\n",
+                       (tmp->fs_flags & FS_REQUIRES_DEV) ? "" : "nodev",
+                       tmp->name);
+               tmp = tmp->next;
+       }
+       spin_unlock(&file_systems_lock);
+       return len;
+}
+
+static struct file_system_type *get_fs_type(const char *name)
+{
+       struct file_system_type *fs;
+       
+       spin_lock(&file_systems_lock);
+       fs = *(find_filesystem(name));
+       if (fs && !try_inc_mod_count(fs->owner))
+               fs = NULL;
+       spin_unlock(&file_systems_lock);
+       if (!fs && (request_module(name) == 0)) {
+               spin_lock(&file_systems_lock);
+               fs = *(find_filesystem(name));
+               if (fs && !try_inc_mod_count(fs->owner))
+                       fs = NULL;
+               spin_unlock(&file_systems_lock);
+       }
+       return fs;
+}
+
+
 struct vfsmount *vfsmntlist = NULL;
 static struct vfsmount *vfsmnttail = NULL, *mru_vfsmnt = NULL;
 
@@ -165,115 +352,6 @@ void remove_vfsmnt(kdev_t dev)
        kfree_s(tofree, sizeof(struct vfsmount));
 }
 
-int register_filesystem(struct file_system_type * fs)
-{
-       struct file_system_type ** tmp;
-
-       if (!fs)
-               return -EINVAL;
-       if (fs->next)
-               return -EBUSY;
-       tmp = &file_systems;
-       while (*tmp) {
-               if (strcmp((*tmp)->name, fs->name) == 0)
-                       return -EBUSY;
-               tmp = &(*tmp)->next;
-       }
-       *tmp = fs;
-       return 0;
-}
-
-int unregister_filesystem(struct file_system_type * fs)
-{
-       struct file_system_type ** tmp;
-
-       tmp = &file_systems;
-       while (*tmp) {
-               if (fs == *tmp) {
-                       *tmp = fs->next;
-                       fs->next = NULL;
-                       return 0;
-               }
-               tmp = &(*tmp)->next;
-       }
-       return -EINVAL;
-}
-
-static int fs_index(const char * __name)
-{
-       struct file_system_type * tmp;
-       char * name;
-       int err, index;
-
-       name = getname(__name);
-       err = PTR_ERR(name);
-       if (IS_ERR(name))
-               return err;
-
-       index = 0;
-       for (tmp = file_systems ; tmp ; tmp = tmp->next) {
-               if (strcmp(tmp->name, name) == 0) {
-                       putname(name);
-                       return index;
-               }
-               index++;
-       }
-       putname(name);
-       return -EINVAL;
-}
-
-static int fs_name(unsigned int index, char * buf)
-{
-       struct file_system_type * tmp;
-       int len;
-
-       tmp = file_systems;
-       while (tmp && index > 0) {
-               tmp = tmp->next;
-               index--;
-       }
-       if (!tmp)
-               return -EINVAL;
-       len = strlen(tmp->name) + 1;
-       return copy_to_user(buf, tmp->name, len) ? -EFAULT : 0;
-}
-
-static int fs_maxindex(void)
-{
-       struct file_system_type * tmp;
-       int index;
-
-       index = 0;
-       for (tmp = file_systems ; tmp ; tmp = tmp->next)
-               index++;
-       return index;
-}
-
-/*
- * Whee.. Weird sysv syscall. 
- */
-asmlinkage long sys_sysfs(int option, unsigned long arg1, unsigned long arg2)
-{
-       int retval = -EINVAL;
-
-       lock_kernel();
-       switch (option) {
-               case 1:
-                       retval = fs_index((const char *) arg1);
-                       break;
-
-               case 2:
-                       retval = fs_name(arg1, (char *) arg2);
-                       break;
-
-               case 3:
-                       retval = fs_maxindex();
-                       break;
-       }
-       unlock_kernel();
-       return retval;
-}
-
 static struct proc_fs_info {
        int flag;
        char *str;
@@ -380,39 +458,6 @@ int get_filesystem_info( char *buf )
        return len;
 }
 
-int get_filesystem_list(char * buf)
-{
-       int len = 0;
-       struct file_system_type * tmp;
-
-       tmp = file_systems;
-       while (tmp && len < PAGE_SIZE - 80) {
-               len += sprintf(buf+len, "%s\t%s\n",
-                       (tmp->fs_flags & FS_REQUIRES_DEV) ? "" : "nodev",
-                       tmp->name);
-               tmp = tmp->next;
-       }
-       return len;
-}
-
-struct file_system_type *get_fs_type(const char *name)
-{
-       struct file_system_type * fs = file_systems;
-       
-       if (!name)
-               return fs;
-       for (fs = file_systems; fs && strcmp(fs->name, name); fs = fs->next)
-               ;
-#ifdef CONFIG_KMOD
-       if (!fs && (request_module(name) == 0)) {
-               for (fs = file_systems; fs && strcmp(fs->name, name); fs = fs->next)
-                       ;
-       }
-#endif
-
-       return fs;
-}
-
 void __wait_on_super(struct super_block * sb)
 {
        DECLARE_WAITQUEUE(wait, current);
@@ -533,25 +578,10 @@ struct super_block *get_empty_super(void)
 }
 
 static struct super_block * read_super(kdev_t dev, struct block_device *bdev,
-                                      const char *name, int flags,
+                                      struct file_system_type *type, int flags,
                                       void *data, int silent)
 {
        struct super_block * s;
-       struct file_system_type *type;
-
-       if (!dev)
-               goto out_null;
-       check_disk_change(dev);
-       s = get_super(dev);
-       if (s)
-               goto found;     /* ought to set ->s_bdev */
-
-       type = get_fs_type(name);
-       if (!type) {
-               printk("VFS: on device %s: get_fs_type(%s) failed\n",
-                      kdevname(dev), name);
-               goto out;
-       }
        s = get_empty_super();
        if (!s)
                goto out;
@@ -561,11 +591,11 @@ static struct super_block * read_super(kdev_t dev, struct block_device *bdev,
        s->s_dirt = 0;
        sema_init(&s->s_vfs_rename_sem,1);
        sema_init(&s->s_nfsd_free_path_sem,1);
-       /* N.B. Should lock superblock now ... */
+       s->s_type = type;
+       lock_super(s);
        if (!type->read_super(s, data, silent))
                goto out_fail;
-       s->s_type = type;
-bd_get:
+       unlock_super(s);
        /* tell bdcache that we are going to keep this one */
        if (bdev)
                atomic_inc(&bdev->bd_count);
@@ -575,12 +605,10 @@ out:
 out_fail:
        s->s_dev = 0;
        s->s_bdev = 0;
-out_null:
-       s = NULL;
-       goto out;
-found:
-       s->s_bdev = bdev;
-       goto bd_get;
+       s->s_type = NULL;
+       put_filesystem(type);
+       unlock_super(s);
+       return NULL;
 }
 
 /*
@@ -720,6 +748,8 @@ static struct block_device *do_umount(kdev_t dev, int unmount_root, int flags)
        sb->s_dev = 0;          /* Free the superblock */
        bdev = sb->s_bdev;
        sb->s_bdev = NULL;
+       put_filesystem(sb->s_type);
+       sb->s_type = NULL;
        unlock_super(sb);
 
        remove_vfsmnt(dev);
@@ -854,6 +884,7 @@ int do_mount(struct block_device *bdev, const char *dev_name,
        struct dentry * dir_d;
        struct super_block * sb;
        struct vfsmount *vfsmnt;
+       struct file_system_type *fs_type;
        int error;
 
        if (bdev) {
@@ -891,14 +922,27 @@ int do_mount(struct block_device *bdev, const char *dev_name,
        if (dir_d->d_covers != dir_d)
                goto dput_and_out;
 
-       /*
-        * Note: If the superblock already exists,
-        * read_super just does a get_super().
-        */
        error = -EINVAL;
-       sb = read_super(dev, bdev, type, flags, data, 0);
-       if (!sb)
+       if (!dev)
                goto dput_and_out;
+       check_disk_change(dev);
+       sb = get_super(dev);
+       if (sb) {
+               /* Already mounted */
+               error = -EBUSY;
+               goto dput_and_out;
+       }
+
+       fs_type = get_fs_type(type);
+       if (!fs_type) {
+               printk("VFS: on device %s: get_fs_type(%s) failed\n",
+                      kdevname(dev), type);
+               goto dput_and_out;
+       }
+
+       sb = read_super(dev, bdev, fs_type, flags, data, 0);
+       if (!sb)
+               goto fsput_and_out;
 
        /*
         * We may have slept while reading the super block, 
@@ -918,7 +962,12 @@ int do_mount(struct block_device *bdev, const char *dev_name,
        }
 
 bdput_and_out:
+       /* FIXME: ->put_super() is needed here */
        sb->s_bdev = NULL;
+       sb->s_dev = 0;
+       sb->s_type = NULL;
+fsput_and_out:
+       put_filesystem(fs_type);
        if (bdev)
                bdput(bdev);
 dput_and_out:
@@ -951,7 +1000,9 @@ static int do_remount_sb(struct super_block *sb, int flags, char *data)
                if (!fs_may_remount_ro(sb))
                        return -EBUSY;
        if (sb->s_op && sb->s_op->remount_fs) {
+               lock_super(sb);
                retval = sb->s_op->remount_fs(sb, &flags, data);
+               unlock_super(sb);
                if (retval)
                        return retval;
        }
@@ -1154,6 +1205,7 @@ void __init mount_root(void)
                        }
                        put_unnamed_dev(sb->s_dev);
                        sb->s_dev = 0;
+                       put_filesystem(fs_type);
                }
                if (!ROOT_DEV) {
                        printk(KERN_ERR "VFS: Unable to mount root fs via NFS, trying floppy.\n");
@@ -1195,6 +1247,14 @@ void __init mount_root(void)
            devfs_get_maj_min (handle, &major, &minor);
            ROOT_DEV = MKDEV (major, minor);
        }
+
+       /*
+        * Probably pure paranoia, but I'm less than happy about delving into
+        * devfs crap and checking it right now. Later.
+        */
+       if (!ROOT_DEV)
+               panic("I have no root and I want to sream");
+
        bdev = bdget(kdev_t_to_nr(ROOT_DEV));
        if (!bdev)
                panic(__FUNCTION__ ": unable to allocate root device");
@@ -1216,37 +1276,57 @@ void __init mount_root(void)
                printk ("VFS: Cannot open root device \"%s\" or %s\n",
                        root_device_name, kdevname (ROOT_DEV));
                printk ("Please append a correct \"root=\" boot option\n");
+               panic("VFS: Unable to mount root fs on %s",
+                       kdevname(ROOT_DEV));
        }
-       else for (fs_type = file_systems ; fs_type ; fs_type = fs_type->next) {
+
+       check_disk_change(ROOT_DEV);
+
+       spin_lock(&file_systems_lock);
+       for (fs_type = file_systems ; fs_type ; fs_type = fs_type->next) {
                if (!(fs_type->fs_flags & FS_REQUIRES_DEV))
                        continue;
-               sb = read_super(ROOT_DEV,bdev,fs_type->name,root_mountflags,NULL,1);
+               if (!try_inc_mod_count(fs_type->owner))
+                       continue;
+               spin_unlock(&file_systems_lock);
+               sb = get_super(ROOT_DEV);
                if (sb) {
-                       sb->s_flags = root_mountflags;
-                       current->fs->root = dget(sb->s_root);
-                       current->fs->pwd = dget(sb->s_root);
-                       printk ("VFS: Mounted root (%s filesystem)%s.\n",
-                               fs_type->name,
-                               (sb->s_flags & MS_RDONLY) ? " readonly" : "");
-                       if (path_start >= 0) {
-                               devfs_mk_symlink (NULL,
-                                                 "root", 0, DEVFS_FL_DEFAULT,
-                                                 path + 5 + path_start, 0,
-                                                 NULL, NULL);
-                               memcpy (path + path_start, "/dev/", 5);
-                               vfsmnt = add_vfsmnt (sb, path + path_start,
-                                                    "/");
-                       }
-                       else vfsmnt = add_vfsmnt (sb, "/dev/root", "/");
-                       if (vfsmnt) {
-                               bdput(bdev); /* sb holds a reference */
-                               return;
-                       }
-                       panic("VFS: add_vfsmnt failed for root fs");
+                       /* Shouldn't we fail here? Oh, well... */
+                       sb->s_bdev = bdev;
+                       goto mount_it;
                }
+               sb = read_super(ROOT_DEV,bdev,fs_type,root_mountflags,NULL,1);
+               if (sb) 
+                       goto mount_it;
+               spin_lock(&file_systems_lock);
+               put_filesystem(fs_type);
        }
+       spin_unlock(&file_systems_lock);
        panic("VFS: Unable to mount root fs on %s",
                kdevname(ROOT_DEV));
+
+mount_it:
+       sb->s_flags = root_mountflags;
+       current->fs->root = dget(sb->s_root);
+       current->fs->pwd = dget(sb->s_root);
+       printk ("VFS: Mounted root (%s filesystem)%s.\n",
+               fs_type->name,
+               (sb->s_flags & MS_RDONLY) ? " readonly" : "");
+       if (path_start >= 0) {
+               devfs_mk_symlink (NULL,
+                                 "root", 0, DEVFS_FL_DEFAULT,
+                                 path + 5 + path_start, 0,
+                                 NULL, NULL);
+               memcpy (path + path_start, "/dev/", 5);
+               vfsmnt = add_vfsmnt (sb, path + path_start,
+                                    "/");
+       }
+       else vfsmnt = add_vfsmnt (sb, "/dev/root", "/");
+       if (vfsmnt) {
+               bdput(bdev); /* sb holds a reference */
+               return;
+       }
+       panic("VFS: add_vfsmnt failed for root fs");
 }
 
 
index 2b52600cf8dcd7b52ba354011e241603370e5daf..c1b95f28dfaf3b5a49401d3a61f7fdeb81ee2a23 100644 (file)
@@ -360,8 +360,6 @@ static struct super_block *sysv_read_super(struct super_block *sb,
                panic("Coherent FS: bad super-block size");
        if (64 != sizeof (struct sysv_inode))
                panic("sysv fs: bad i-node size");
-       MOD_INC_USE_COUNT;
-       lock_super(sb);
        set_blocksize(dev,BLOCK_SIZE);
        sb->sv_block_base = 0;
 
@@ -407,13 +405,10 @@ static struct super_block *sysv_read_super(struct super_block *sb,
                        }
        }
        bad_shift:
-       sb->s_dev = 0;
-       unlock_super(sb);
        if (!silent)
                printk("VFS: unable to read Xenix/SystemV/Coherent superblock on device "
                       "%s\n", kdevname(dev));
        failed:
-       MOD_DEC_USE_COUNT;
        return NULL;
 
        ok:
@@ -442,8 +437,6 @@ static struct super_block *sysv_read_super(struct super_block *sb,
                goto superblock_ok;
                bad_superblock:
                        brelse(bh);
-                       sb->s_dev = 0;
-                       unlock_super(sb);
                        printk("SysV FS: cannot read superblock in %d byte mode\n", sb->sv_block_size);
                        goto failed;
                superblock_ok:
@@ -489,8 +482,6 @@ static struct super_block *sysv_read_super(struct super_block *sb,
                                brelse(bh1);
                                brelse(bh2);
                                set_blocksize(sb->s_dev,BLOCK_SIZE);
-                               sb->s_dev = 0;
-                               unlock_super(sb);
                                printk("SysV FS: cannot read superblock in 512 byte mode\n");
                                goto failed;
                }
@@ -511,14 +502,11 @@ static struct super_block *sysv_read_super(struct super_block *sb,
        if (!sb->s_root) {
                printk("SysV FS: get root inode failed\n");
                sysv_put_super(sb);
-               sb->s_dev = 0;
-               unlock_super(sb);
                return NULL;
        }
 #ifndef CONFIG_SYSV_FS_WRITE
        sb->s_flags |= MS_RDONLY;
 #endif
-       unlock_super(sb);
        sb->s_dirt = 1;
        /* brelse(bh);  resp.  brelse(bh1); brelse(bh2);
           occurs when the disk is unmounted. */
@@ -558,8 +546,6 @@ static void sysv_put_super(struct super_block *sb)
        /* switch back to default block size */
        if (sb->s_blocksize != BLOCK_SIZE)
                set_blocksize(sb->s_dev,BLOCK_SIZE);
-
-       MOD_DEC_USE_COUNT;
 }
 
 static int sysv_statfs(struct super_block *sb, struct statfs *buf)
@@ -1200,20 +1186,11 @@ int sysv_sync_inode(struct inode * inode)
 
 /* Every kernel module contains stuff like this. */
 
-static struct file_system_type sysv_fs_type[] = {
-       {"sysv",     FS_REQUIRES_DEV, sysv_read_super, NULL}
-};
+static DECLARE_FSTYPE_DEV(sysv_fs_type, "sysv", sysv_read_super);
 
 int __init init_sysv_fs(void)
 {
-       int i;
-       int ouch = 0;
-
-       for (i = 0; i < sizeof(sysv_fs_type)/sizeof(sysv_fs_type[0]); i++) {
-               if ((ouch = register_filesystem(&sysv_fs_type[i])) != 0)
-                       break;
-       }
-        return ouch;
+       return register_filesystem(&sysv_fs_type);
 }
 
 #ifdef MODULE
@@ -1226,11 +1203,7 @@ int init_module(void)
 
 void cleanup_module(void)
 {
-       int i;
-
-       for (i = 0; i < sizeof(sysv_fs_type)/sizeof(sysv_fs_type[0]); i++)
-               /* No error message if this breaks... that's OK... */
-               unregister_filesystem(&sysv_fs_type[i]);
+       unregister_filesystem(&sysv_fs_type);
 }
 
 #endif
index 488e99ef6f6376f94eeda42fa9aab247f9b72895..761cdcb6c4af3ca51c41d9abc6c9f0a09eae76e5 100644 (file)
@@ -96,22 +96,18 @@ static unsigned int udf_count_free(struct super_block *);
 static int udf_statfs(struct super_block *, struct statfs *);
 
 /* UDF filesystem type */
-static struct file_system_type udf_fstype = {
-       name:                           "udf",
-       fs_flags:                       FS_REQUIRES_DEV,
-       read_super:                     udf_read_super,
-};
+static DECLARE_FSTYPE_DEV(udf_fstype, "udf", udf_read_super);
 
 /* Superblock operations */
 static struct super_operations udf_sb_ops = {
-       read_inode:                     udf_read_inode,
+       read_inode:             udf_read_inode,
        write_inode:            udf_write_inode,
-       put_inode:                      udf_put_inode,
+       put_inode:              udf_put_inode,
        delete_inode:           udf_delete_inode,
-       put_super:                      udf_put_super,
+       put_super:              udf_put_super,
        write_super:            udf_write_super,
-       statfs:                         udf_statfs,
-       remount_fs:                     udf_remount_fs,
+       statfs:                 udf_statfs,
+       remount_fs:             udf_remount_fs,
 };
 
 struct udf_options
@@ -1326,10 +1322,6 @@ udf_read_super(struct super_block *sb, void *options, int silent)
        uopt.gid = -1;
        uopt.umask = 0;
 
-       /* Lock the module in memory (if applicable) */
-       MOD_INC_USE_COUNT;
-
-       lock_super(sb);
        memset(UDF_SB(sb), 0x00, sizeof(struct udf_sb_info));
 
 #if CONFIG_UDF_RW != 1
@@ -1438,7 +1430,6 @@ udf_read_super(struct super_block *sb, void *options, int silent)
        }
        if (!(sb->s_flags & MS_RDONLY))
                udf_open_lvid(sb);
-       unlock_super(sb);
 
        /* Assign the root inode */
        /* assign inodes by physical block number */
@@ -1470,8 +1461,6 @@ error_out:
                udf_close_lvid(sb);
        udf_release_data(UDF_SB_LVIDBH(sb));
        UDF_SB_FREE(sb);
-       unlock_super(sb);
-       MOD_DEC_USE_COUNT;
        return NULL;
 }
 
@@ -1530,8 +1519,6 @@ udf_put_super(struct super_block *sb)
        for (i=0; i<UDF_MAX_BLOCK_LOADED; i++)
                udf_release_data(UDF_SB_BLOCK_BITMAP(sb, i));
        UDF_SB_FREE(sb);
-
-       MOD_DEC_USE_COUNT;
 }
 
 /*
index 1aa7eac730eeea52aea14454ad3a2cf63deb8d87..1fe9de9bd3993030d175c59a0e333dc4e356c298 100644 (file)
@@ -451,9 +451,6 @@ struct super_block * ufs_read_super (struct super_block * sb, void * data,
        
        UFSD(("ENTER\n"))
                
-       MOD_INC_USE_COUNT;
-       lock_super (sb);
-
        UFSD(("flag %u\n", (int)(sb->s_flags & MS_RDONLY)))
        
 #ifndef CONFIG_UFS_FS_WRITE
@@ -790,16 +787,12 @@ magic_found:
                if (!ufs_read_cylinder_structures(sb))
                        goto failed;
 
-       unlock_super(sb);
        UFSD(("EXIT\n"))
        return(sb);
 
 failed:
        if (ubh) ubh_brelse_uspi (uspi);
        if (uspi) kfree (uspi);
-       sb->s_dev = 0;
-       unlock_super (sb);
-       MOD_DEC_USE_COUNT;
        UFSD(("EXIT (FAILED)\n"))
        return(NULL);
 }
@@ -843,8 +836,6 @@ void ufs_put_super (struct super_block * sb)
        
        ubh_brelse_uspi (uspi);
        kfree (sb->u.ufs_sb.s_uspi);
-       sb->s_dev = 0;
-       MOD_DEC_USE_COUNT;
        return;
 }
 
@@ -958,12 +949,7 @@ static struct super_operations ufs_super_ops = {
        remount_fs:     ufs_remount,
 };
 
-static struct file_system_type ufs_fs_type = {
-       "ufs", 
-       FS_REQUIRES_DEV,
-       ufs_read_super,
-       NULL
-};
+static DECLARE_FSTYPE_DEV(ufs_fs_type, "ufs", ufs_read_super);
 
 int __init init_ufs_fs(void)
 {
index 7908144d7a50f71510609c1972387add8ce45e80..61c832ed4cb18a50c8f92d51c8722562946ffd9f 100644 (file)
@@ -75,7 +75,6 @@ saved_root->d_count);
                pseudo_root = NULL;
        }
        msdos_put_super (sb);
-       MOD_DEC_USE_COUNT;
 }
 
 
@@ -334,7 +333,6 @@ struct super_block *UMSDOS_read_super (struct super_block *sb, void *data,
        struct super_block *res;
        struct dentry *new_root;
 
-       MOD_INC_USE_COUNT;
        MSDOS_SB(sb)->options.isvfat = 0;
        /*
         * Call msdos-fs to mount the disk.
@@ -381,8 +379,6 @@ struct super_block *UMSDOS_read_super (struct super_block *sb, void *data,
 
 out_fail:
        printk(KERN_INFO "UMSDOS: msdos_read_super failed, mount aborted.\n");
-       sb->s_dev = 0;
-       MOD_DEC_USE_COUNT;
        return NULL;
 }
 
@@ -437,13 +433,7 @@ out_noroot:
 }
 
 
-static struct file_system_type umsdos_fs_type =
-{
-       "umsdos",
-       FS_REQUIRES_DEV,
-       UMSDOS_read_super,
-       NULL
-};
+static DECLARE_FSTYPE_DEV(umsdos_fs_type, "umsdos", UMSDOS_read_super);
 
 int __init init_umsdos_fs (void)
 {
index 87d9694cf707fd538017212aa30ecd3277203268..2124941424329675bdba1ff3c9ac8823980d335f 100644 (file)
@@ -78,11 +78,6 @@ static struct dentry_operations vfat_dentry_ops[4] = {
        }
 };
 
-static void vfat_put_super_callback(struct super_block *sb)
-{
-       MOD_DEC_USE_COUNT;
-}
-
 static int vfat_revalidate(struct dentry *dentry, int flags)
 {
        PRINTK1(("vfat_revalidate: %s\n", dentry->d_name.name));
@@ -1277,21 +1272,13 @@ struct super_block *vfat_read_super(struct super_block *sb,void *data,
 {
        struct super_block *res;
   
-       MOD_INC_USE_COUNT;
-       
        MSDOS_SB(sb)->options.isvfat = 1;
 
        res = fat_read_super(sb, data, silent, &vfat_dir_inode_operations);
-       if (res == NULL) {
-               sb->s_dev = 0;
-               MOD_DEC_USE_COUNT;
+       if (res == NULL)
                return NULL;
-       }
 
-       if (!parse_options((char *) data, &(MSDOS_SB(sb)->options))) {
-               MOD_DEC_USE_COUNT;
-       } else {
-               MSDOS_SB(sb)->put_super_callback=vfat_put_super_callback;
+       if (parse_options((char *) data, &(MSDOS_SB(sb)->options))) {
                MSDOS_SB(sb)->options.dotsOK = 0;
                if (MSDOS_SB(sb)->options.posixfs) {
                        MSDOS_SB(sb)->options.name_check = 's';
index bccd300e75dda749e5f3b13f2773f1509d76a6af..d57d153edf297bf1f5f224c517b639ea4e9ab2d7 100644 (file)
 #include <linux/mm.h>
 #include <linux/msdos_fs.h>
 
-struct file_system_type vfat_fs_type = {
-       "vfat",
-       FS_REQUIRES_DEV,
-       vfat_read_super,
-       NULL
-};
+DECLARE_FSTYPE_DEV(vfat_fs_type, "vfat", vfat_read_super);
 
 EXPORT_SYMBOL(vfat_create);
 EXPORT_SYMBOL(vfat_unlink);
index a1ec41e3bd69fe93fd3f4cae1bccb5bcce40ead6..5230bcc15ac4686f0f379fb29801f356a8d1a081 100644 (file)
@@ -91,6 +91,7 @@ atomic_add_negative (int i, atomic_t *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)
 
 #define atomic_add(i,v)                        atomic_add_return((i), (v))
 #define atomic_sub(i,v)                        atomic_sub_return((i), (v))
index a3549e0c46ea267d6f2880f0835c6f234209f5f1..54313248629d74c24760aecc38186cfec438c2ce 100644 (file)
@@ -180,7 +180,7 @@ typedef struct {
 } efi_config_table_t;
 
 #define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249
-#define EFI_SYSTEM_TABLE_REVISION  ((0 << 16) | (91))
+#define EFI_SYSTEM_TABLE_REVISION  ((0 << 16) | (92))
 
 typedef struct {
        efi_table_hdr_t hdr;
index 56724365024372809bde5d8a020b16b713988a00..cd256f403524bef98df93ee84a535a3702c88709 100644 (file)
 #define _ASM_IA64_HARDIRQ_H
 
 /*
- * Copyright (C) 1998, 1999 Hewlett-Packard Co
- * Copyright (C) 1998, 1999 David Mosberger-Tang <davidm@hpl.hp.com>
+ * Copyright (C) 1998-2000 Hewlett-Packard Co
+ * Copyright (C) 1998-2000 David Mosberger-Tang <davidm@hpl.hp.com>
  */
 
 #include <linux/config.h>
+
 #include <linux/threads.h>
+#include <linux/irq.h>
+
+typedef struct {
+       unsigned int __local_irq_count;
+       unsigned int __local_bh_count;
+       atomic_t __nmi_counter;
+# if NR_CPUS > 1
+       unsigned int __pad[13];         /* this assumes 64-byte cache-lines... */
+# endif
+} ____cacheline_aligned irq_cpustat_t;
 
-extern unsigned int local_irq_count[NR_CPUS];
-extern unsigned long hardirq_no[NR_CPUS];
+extern irq_cpustat_t irq_stat[NR_CPUS];
+
+/*
+ * Simple wrappers reducing source bloat
+ */
+#define local_irq_count(cpu)   (irq_stat[(cpu)].__local_irq_count)
+#define local_bh_count(cpu)    (irq_stat[(cpu)].__local_bh_count)
+#define nmi_counter(cpu)       (irq_stat[(cpu)].__nmi_counter)
 
 /*
  * Are we in an interrupt context? Either doing bottom half
  * or hardware interrupt processing?
  */
-
-#define in_irq() (local_irq_count[smp_processor_id()] != 0)
-
 #define in_interrupt()                                         \
 ({                                                             \
        int __cpu = smp_processor_id();                         \
-       (local_irq_count[__cpu] + local_bh_count[__cpu]) != 0;  \
+       (local_irq_count(__cpu) + local_bh_count(__cpu)) != 0;  \
 })
 
-
+#define in_irq() (local_irq_count(smp_processor_id()) != 0)
 
 #ifndef CONFIG_SMP
-# define hardirq_trylock(cpu)          (local_irq_count[cpu] == 0)
-# define hardirq_endlock(cpu)          ((void) 0)
+# define hardirq_trylock(cpu)          (local_irq_count(cpu) == 0)
+# define hardirq_endlock(cpu)          do { } while (0)
 
-# define hardirq_enter(cpu, irq)       (local_irq_count[cpu]++)
-# define hardirq_exit(cpu, irq)                (local_irq_count[cpu]--)
+# define irq_enter(cpu, irq)           (++local_irq_count(cpu))
+# define irq_exit(cpu, irq)            (--local_irq_count(cpu))
 
 # define synchronize_irq()             barrier()
 #else
 
-#include <linux/spinlock.h>
-
 #include <asm/atomic.h>
 #include <asm/smp.h>
 
-extern int global_irq_holder;
-extern spinlock_t global_irq_lock;
-extern atomic_t global_irq_count;
+extern unsigned char global_irq_holder;
+extern unsigned volatile int global_irq_lock;
+
+static inline int irqs_running (void)
+{
+       int i;
+
+       for (i = 0; i < smp_num_cpus; i++)
+               if (local_irq_count(i))
+                       return 1;
+       return 0;
+}
 
 static inline void release_irqlock(int cpu)
 {
        /* if we didn't own the irq lock, just ignore.. */
        if (global_irq_holder == cpu) {
                global_irq_holder = NO_PROC_ID;
-               spin_unlock(&global_irq_lock);
+               clear_bit(0,&global_irq_lock);
         }
 }
 
-static inline void hardirq_enter(int cpu, int irq)
+static inline void irq_enter(int cpu, int irq)
 {
-       ++local_irq_count[cpu];
-        atomic_inc(&global_irq_count);
+       ++local_irq_count(cpu);
+
+       while (test_bit(0,&global_irq_lock)) {
+               /* nothing */;
+       }
 }
 
-static inline void hardirq_exit(int cpu, int irq)
+static inline void irq_exit(int cpu, int irq)
 {
-       atomic_dec(&global_irq_count);
-        --local_irq_count[cpu];
+       --local_irq_count(cpu);
 }
 
 static inline int hardirq_trylock(int cpu)
 {
-       return !local_irq_count[cpu] && !test_bit(0,&global_irq_lock);
+       return !local_irq_count(cpu) && !test_bit(0,&global_irq_lock);
 }
 
-#define hardirq_endlock(cpu)  ((void)0)
+#define hardirq_endlock(cpu)   do { } while (0)
 
 extern void synchronize_irq(void);
 
diff --git a/include/asm-ia64/hw_irq.h b/include/asm-ia64/hw_irq.h
new file mode 100644 (file)
index 0000000..b897bea
--- /dev/null
@@ -0,0 +1,76 @@
+#ifndef _ASM_IA64_HW_IRQ_H
+#define _ASM_IA64_HW_IRQ_H
+
+/*
+ * Copyright (C) 2000 Hewlett-Packard Co
+ * Copyright (C) 2000 David Mosberger-Tang <davidm@hpl.hp.com>
+ */
+
+#include <linux/config.h>
+
+#include <linux/types.h>
+
+#include <asm/ptrace.h>
+
+#define NR_ISA_IRQS     16
+
+/*
+ * 0 special
+ *
+ * 1,3-14 are reserved from firmware
+ *
+ * 16-255 (vectored external interrupts) are available
+ *
+ * 15 spurious interrupt (see IVR)
+ *
+ * 16 lowest priority, 255 highest priority
+ *
+ * 15 classes of 16 interrupts each.
+ */
+#define IA64_MIN_VECTORED_IRQ   16
+#define IA64_MAX_VECTORED_IRQ  255
+
+#define IA64_SPURIOUS_INT      0x0f
+
+#define IA64_MIN_VECTORED_IRQ   16
+#define IA64_MAX_VECTORED_IRQ  255
+
+#define PERFMON_IRQ            0x28    /* performanc monitor interrupt vector */
+#define TIMER_IRQ              0xef    /* use highest-prio group 15 interrupt for timer */
+#define IPI_IRQ                        0xfe    /* inter-processor interrupt vector */
+#define CMC_IRQ                        0xff    /* correctable machine-check interrupt vector */
+
+/* IA64 inter-cpu interrupt related definitions */
+
+/* Delivery modes for inter-cpu interrupts */
+enum {
+        IA64_IPI_DM_INT =       0x0,    /* pend an external interrupt */
+        IA64_IPI_DM_PMI =       0x2,    /* pend a PMI */
+        IA64_IPI_DM_NMI =       0x4,    /* pend an NMI (vector 2) */
+        IA64_IPI_DM_INIT =      0x5,    /* pend an INIT interrupt */
+        IA64_IPI_DM_EXTINT =    0x7,    /* pend an 8259-compatible interrupt. */
+};
+
+#define IA64_BUS_ID(cpu)        (cpu >> 8)
+#define IA64_LOCAL_ID(cpu)      (cpu & 0xff)
+
+extern __u8 isa_irq_to_vector_map[16];
+#define isa_irq_to_vector(x)   isa_irq_to_vector_map[(x)]
+
+extern struct hw_interrupt_type irq_type_ia64_internal;        /* CPU-internal interrupt controller */
+
+extern void ipi_send (int cpu, int vector, int delivery_mode);
+
+#ifdef CONFIG_SMP
+extern void handle_IPI(int irq, void *dev_id, struct pt_regs *regs);
+
+static inline void
+hw_resend_irq (struct hw_interrupt_type *h, unsigned int i)
+{
+       send_IPI_self(i);
+}
+#else
+# define hw_resend_irq(h,i)
+#endif
+
+#endif /* _ASM_IA64_HW_IRQ_H */
index 137670219b5034fa8702302afeb1c29446651d18..61bb7aedb75ef7a3082e4d0c3a7d51525d9c7825 100644 (file)
  *
  * 11/24/98    S.Eranian       updated TIMER_IRQ and irq_cannonicalize
  * 01/20/99    S.Eranian       added keyboard interrupt
+ * 02/29/00     D.Mosberger    moved most things into hw_irq.h
  */
 
-#include <linux/config.h>
-#include <linux/spinlock.h>
-
-#include <asm/ptrace.h>
-
 #define NR_IRQS                256
-#define NR_ISA_IRQS     16
-
-/*
- * 0 special
- *
- * 1,3-14 are reserved from firmware
- *
- * 16-255 (vectored external interrupts) are available
- *
- * 15 spurious interrupt (see IVR)
- *
- * 16 lowest priority, 255 highest priority
- *
- * 15 classes of 16 interrupts each.
- */
-#define IA64_MIN_VECTORED_IRQ   16
-#define IA64_MAX_VECTORED_IRQ  255
-
-#define IA64_SPURIOUS_INT      0x0f
-#define PERFMON_IRQ            0x28    /* performanc monitor interrupt vector */
-#define TIMER_IRQ              0xef    /* use highest-prio group 15 interrupt for timer */
-#define IPI_IRQ                        0xfe    /* inter-processor interrupt vector */
-#define CMC_IRQ                        0xff    /* correctable machine-check interrupt vector */
-
-#define IA64_MIN_VECTORED_IRQ   16
-#define IA64_MAX_VECTORED_IRQ  255
-
-extern __u8 irq_to_vector_map[IA64_MIN_VECTORED_IRQ];
-#define map_legacy_irq(x) (((x) < IA64_MIN_VECTORED_IRQ) ? irq_to_vector_map[(x)] : (x))
-
-#define IRQ_INPROGRESS (1 << 0)        /* irq handler active */
-#define IRQ_ENABLED    (1 << 1)        /* irq enabled */
-#define IRQ_PENDING    (1 << 2)        /* irq pending */
-#define IRQ_REPLAY     (1 << 3)        /* irq has been replayed but not acked yet */
-#define IRQ_AUTODETECT (1 << 4)        /* irq is being autodetected */
-#define IRQ_WAITING    (1 << 5)        /* used for autodetection: irq not yet seen yet */
-
-struct hw_interrupt_type {
-       const char *typename;
-       void (*init) (unsigned long addr);
-       void (*startup) (unsigned int irq);
-       void (*shutdown) (unsigned int irq);
-       int (*handle) (unsigned int irq, struct pt_regs *regs);
-       void (*enable) (unsigned int irq);
-       void (*disable) (unsigned int irq);
-};
-
-extern struct hw_interrupt_type irq_type_default;      /* dummy interrupt controller */
-extern struct hw_interrupt_type irq_type_ia64_internal;        /* CPU-internal interrupt controller */
-
-struct irq_desc {
-       unsigned int type;              /* type of interrupt (level vs. edge triggered) */
-       unsigned int status;            /* see above */
-       unsigned int depth;             /* disable depth for nested irq disables */
-       struct hw_interrupt_type *handler;
-       struct irqaction *action;       /* irq action list */
-};
-
-extern struct irq_desc irq_desc[NR_IRQS];
-
-extern spinlock_t irq_controller_lock;
-
-/* IA64 inter-cpu interrupt related definitions */
-
-/* Delivery modes for inter-cpu interrupts */
-enum {
-        IA64_IPI_DM_INT =       0x0,    /* pend an external interrupt */
-        IA64_IPI_DM_PMI =       0x2,    /* pend a PMI */
-        IA64_IPI_DM_NMI =       0x4,    /* pend an NMI (vector 2) */
-        IA64_IPI_DM_INIT =      0x5,    /* pend an INIT interrupt */
-        IA64_IPI_DM_EXTINT =    0x7,    /* pend an 8259-compatible interrupt. */
-};
-
-#define IA64_BUS_ID(cpu)        (cpu >> 8)
-#define IA64_LOCAL_ID(cpu)      (cpu & 0xff)
 
 static __inline__ int
 irq_cannonicalize (int irq)
 {
        /*
         * We do the legacy thing here of pretending that irqs < 16
-        * are 8259 irqs.
+        * are 8259 irqs.  This really shouldn't be necessary at all,
+        * but we keep it here as serial.c still uses it...
         */
        return ((irq == 2) ? 9 : irq);
 }
 
-extern int invoke_irq_handlers (unsigned int irq, struct pt_regs *regs, struct irqaction *action);
 extern void disable_irq (unsigned int);
 extern void disable_irq_nosync (unsigned int);
 extern void enable_irq (unsigned int);
-extern void ipi_send (int cpu, int vector, int delivery_mode);
-
-#ifdef CONFIG_SMP
-  extern void irq_enter(int cpu, int irq);
-  extern void irq_exit(int cpu, int irq);
-  extern void handle_IPI(int irq, void *dev_id, struct pt_regs *regs);
-#else
-# define irq_enter(cpu, irq)   (++local_irq_count[cpu])
-# define irq_exit(cpu, irq)    (--local_irq_count[cpu])
-#endif
 
 #endif /* _ASM_IA64_IRQ_H */
index c77324377b48b31750ed01fbfb089b00c46594ab..38dbbc7bbebbc2b2fcbe30c9c07150d30882e2e1 100644 (file)
@@ -13,7 +13,7 @@
 
 #include <linux/config.h>
 
-#define KEYBOARD_IRQ                   1
+#define KEYBOARD_IRQ                   isa_irq_to_vector(1)
 #define DISABLE_KBD_DURING_INTERRUPTS  0
 
 extern int pckbd_setkeycode(unsigned int scancode, unsigned int keycode);
@@ -59,7 +59,7 @@ extern unsigned char pckbd_sysrq_xlate[128];
  * Machine specific bits for the PS/2 driver
  */
 
-#define AUX_IRQ 12
+#define AUX_IRQ                                isa_irq_to_vector(12)
 
 #define aux_request_irq(hand, dev_id)                                  \
        request_irq(AUX_IRQ, hand, SA_SHIRQ, "PS/2 Mouse", dev_id)
index 4b369dc4cc4a634f70056d1db3e1bf5ce517b13b..890224329d48e3835159c1fd031d91e84e21a675 100644 (file)
@@ -23,7 +23,7 @@ struct timeval;
 struct vm_area_struct;
 
 typedef void ia64_mv_setup_t (char **);
-typedef void ia64_mv_irq_init_t (struct irq_desc *);
+typedef void ia64_mv_irq_init_t (void);
 typedef void ia64_mv_pci_fixup_t (void);
 typedef unsigned long ia64_mv_map_nr_t (unsigned long);
 typedef void ia64_mv_mca_init_t (void);
index 1ebcba0f4ba7499b2862b2f9cfd51a5111f2f1bd..1289930fcbd2b0ebf9d5d0b3be0abe9315dd3e45 100644 (file)
@@ -7,13 +7,14 @@
  * This is based on version 2.4 of the manual "Enhanced Mode Processor
  * Abstraction Layer".
  *
- * Copyright (C) 1998, 1999 Hewlett-Packard Co
- * Copyright (C) 1998, 1999 David Mosberger-Tang <davidm@hpl.hp.com>
+ * Copyright (C) 1998-2000 Hewlett-Packard Co
+ * Copyright (C) 1998-2000 David Mosberger-Tang <davidm@hpl.hp.com>
  * Copyright (C) 1999 VA Linux Systems
  * Copyright (C) 1999 Walt Drummond <drummond@valinux.com>
  * Copyright (C) 1999 Srinivasa Prasad Thirumalachar <sprasad@sprasad.engr.sgi.com>
  *
  * 99/10/01    davidm  Make sure we pass zero for reserved parameters.
+ * 00/03/07    davidm  Updated pal_cache_flush() to be in sync with PAL v2.6.
  */
 
 /*
@@ -105,8 +106,8 @@ typedef u64                         pal_cache_type_t;
 #define PAL_CACHE_TYPE_INSTRUCTION_DATA        3       /* Both Data & Instruction */
 
 
-#define PAL_CACHE_FLUSH_NO_INVALIDATE  0       /* Don't invalidate clean lines */
 #define PAL_CACHE_FLUSH_INVALIDATE     1       /* Invalidate clean lines */
+#define PAL_CACHE_FLUSH_CHK_INTRS      2       /* check for interrupts/mc while flushing */
 
 /* Processor cache line size in bytes  */
 typedef int                            pal_cache_line_size_t;
@@ -723,12 +724,16 @@ ia64_pal_bus_set_features (pal_bus_features_u_t feature_select)
        return iprv.status;
 }
 
-/* Flush the processor instruction or data caches */
+/*
+ * Flush the processor instruction or data caches.  *PROGRESS must be
+ * initialized to zero before calling this for the first time..
+ */
 extern inline s64 
-ia64_pal_cache_flush (u64 cache_type, u64 invalidate, u64 plat_ack
+ia64_pal_cache_flush (u64 cache_type, u64 invalidate, u64 *progress
 {      
        struct ia64_pal_retval iprv;
-       PAL_CALL(iprv, PAL_CACHE_FLUSH, cache_type, invalidate, plat_ack); 
+       PAL_CALL(iprv, PAL_CACHE_FLUSH, cache_type, invalidate, *progress); 
+       *progress = iprv.v1;
        return iprv.status; 
 }
 
index a076bca9f728a0e5f29c13eb9a4f8787a8d7d695..7c3fbdd9556819bf6c295fb5e9610824905d1bb4 100644 (file)
@@ -343,6 +343,7 @@ extern void __handle_bad_pmd (pmd_t *pmd);
 
 
 extern pgd_t swapper_pg_dir[PTRS_PER_PGD];
+extern void paging_init (void);
 
 /*
  * IA-64 doesn't have any external MMU info: the page tables contain
index 5965e826d7bd805e9e928c80d4098e951667d86a..46e8bccb17a60898e7febfa4e3f3808128d4225b 100644 (file)
 #define PT_CR_IIP              0x0838
 #define PT_CR_IFS              0x0840
 #define PT_AR_UNAT             0x0848
-#define PT_AR_PFS              0x0858
+#define PT_AR_PFS              0x0850
 #define PT_AR_RSC              0x0858
-#define PT_AR_RNAT             0x0868
+#define PT_AR_RNAT             0x0860
 #define PT_AR_BSPSTORE         0x0868
 #define PT_PR                  0x0870
 #define PT_B6                  0x0878
index a6ea5c17d293ec1527c9c37fe1f9cfc56436734f..0fd1372678b5189196b547febf972a72ae458193 100644 (file)
@@ -9,12 +9,13 @@
 
 #include <linux/config.h>
 
+#ifdef CONFIG_SMP
+
 #include <linux/init.h>
 #include <linux/threads.h>
 #include <linux/kernel.h>
 
 #include <asm/ptrace.h>
-#include <asm/spinlock.h>
 #include <asm/io.h>
 
 #define IPI_DEFAULT_BASE_ADDR  0xfee00000
@@ -99,4 +100,5 @@ hard_smp_processor_id(void)
 extern void __init init_smp_config (void);
 extern void smp_do_timer (struct pt_regs *regs);
 
+#endif /* CONFIG_SMP */
 #endif /* _ASM_IA64_SMP_H */
index 8c1f4d80aa130fb515a2bcd0a7bd1cafd41f9f75..69e4c877481cdcaf9c61341209d7408d49778050 100644 (file)
@@ -4,8 +4,8 @@
 /*
  * Socket related defines.  This mostly mirrors the Linux/x86 version.
  *
- * Copyright (C) 1998, 1999 Hewlett-Packard Co
- * Copyright (C) 1998, 1999 David Mosberger-Tang <davidm@hpl.hp.com>
+ * Copyright (C) 1998-2000 Hewlett-Packard Co
+ * Copyright (C) 1998-2000 David Mosberger-Tang <davidm@hpl.hp.com>
  */
 
 #include <asm/sockios.h>
 #define SO_SECURITY_ENCRYPTION_TRANSPORT       23
 #define SO_SECURITY_ENCRYPTION_NETWORK         24
 
-#define SO_BINDTODEVICE        25
+#define SO_BINDTODEVICE                25
 
 /* Socket filtering */
-#define SO_ATTACH_FILTER        26
-#define SO_DETACH_FILTER        27
+#define SO_ATTACH_FILTER       26
+#define SO_DETACH_FILTER       27
+
+#define SO_PEERNAME            28
 
 #define SO_PEERNAME             28
 
index fb40999e244ef08649c4ea49a6fb44a36ce90ee5..b67776edb0b2e338828a6620d8bceb7f98d93d02 100644 (file)
@@ -7,14 +7,12 @@
  */
 #include <asm/hardirq.h>
 
-extern unsigned int local_bh_count[NR_CPUS];
-
-#define cpu_bh_disable(cpu)    do { local_bh_count[(cpu)]++; barrier(); } while (0)
-#define cpu_bh_enable(cpu)     do { barrier(); local_bh_count[(cpu)]--; } while (0)
+#define cpu_bh_disable(cpu)    do { local_bh_count(cpu)++; barrier(); } while (0)
+#define cpu_bh_enable(cpu)     do { barrier(); local_bh_count(cpu)--; } while (0)
 
 #define local_bh_disable()     cpu_bh_disable(smp_processor_id())
 #define local_bh_enable()      cpu_bh_enable(smp_processor_id())
 
-#define in_softirq()           (local_bh_count[smp_processor_id()] != 0)
+#define in_softirq()           (local_bh_count(smp_processor_id()) != 0)
 
 #endif /* _ASM_IA64_SOFTIRQ_H */
index 78c21958fa1bb9fffef58400840a35f14cb967ad..38781d2b2db38b22325c2f8b1bbe2c069e19cc3f 100644 (file)
@@ -14,6 +14,8 @@
 
 #ifdef __KERNEL__
 
+#include <linux/config.h>
+
 #ifndef MAX_HWIFS
 #define MAX_HWIFS      6
 #endif
index 98e131739fa7255db6eba75fd67cf9a2139e44b9..3a4ac776ab395a712415e22bbc7e239bba49147e 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: ide.h,v 1.2 2000/01/21 04:56:27 zaitcev Exp $
+/* $Id: ide.h,v 1.3 2000/03/10 04:46:47 davem Exp $
  * ide.h: SPARC PCI specific IDE glue.
  *
  * Copyright (C) 1997  David S. Miller (davem@caip.rutgers.edu)
@@ -11,6 +11,7 @@
 
 #ifdef __KERNEL__
 
+#include <linux/config.h>
 #include <asm/pgtable.h>
 #include <asm/io.h>
 #include <asm/hdreg.h>
index 22281b176dfe8db964d662ba2e105ce57cffcfa6..d1141d105d72b8657fcadd4ac5c3f9f7f2a3445c 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: pbm.h,v 1.20 2000/02/18 13:50:55 davem Exp $
+/* $Id: pbm.h,v 1.21 2000/03/10 02:42:17 davem Exp $
  * pbm.h: UltraSparc PCI controller software state.
  *
  * Copyright (C) 1997, 1998, 1999 David S. Miller (davem@redhat.com)
@@ -63,12 +63,21 @@ struct pci_iommu {
         */
        unsigned long   write_complete_reg;
 
+       /* The lowest used consistent mapping entry.  Since
+        * we allocate consistent maps out of cluster 0 this
+        * is relative to the beginning of closter 0.
+        */
+       u32             lowest_consistent_map;
+
        /* If PBM_NCLUSTERS is ever decreased to 4 or lower,
         * or if largest supported page_table_sz * 8K goes above
         * 2GB, you must increase the size of the type of
         * these counters.  You have been duly warned. -DaveM
         */
-       u16             lowest_free[PBM_NCLUSTERS];
+       struct {
+               u16     next;
+               u16     flush;
+       } alloc_info[PBM_NCLUSTERS];
 
        /* Here a PCI controller driver describes the areas of
         * PCI memory space where DMA to/from physical memory
index ae1e69173f81fe3f1f24fd9e43cdd376076d30f9..c881f0fd61cbfadf2e13b0a9d036f575437d63fc 100644 (file)
@@ -61,6 +61,4 @@ extern inline int adfs_checkbblk(unsigned char *ptr)
 
 #endif
 
-extern int init_adfs_fs (void);
-
 #endif
index f28ac1eb776ab54043105cecce000d3ddd34c41f..e68940b0f91351a7ea78946b2716999cd6225fa1 100644 (file)
@@ -45,7 +45,7 @@ enum brlock_indices {
 #include <linux/cache.h>
 #include <linux/spinlock.h>
 
-#if defined(__i386__)
+#if defined(__i386__) || defined(__ia64__)
 #define __BRLOCK_USE_ATOMICS
 #else
 #undef __BRLOCK_USE_ATOMICS
index c481f5436c7b2fccb26a18857a92579bf35032e1..0d472ec6eaac7c659610bf47c9c9c40335395394 100644 (file)
@@ -20,6 +20,7 @@
 #include <linux/stat.h>
 #include <linux/cache.h>
 #include <linux/stddef.h>
+#include <linux/string.h>
 
 #include <asm/atomic.h>
 #include <asm/bitops.h>
@@ -181,8 +182,6 @@ extern void inode_init(void);
 extern void file_table_init(void);
 extern void dcache_init(void);
 
-typedef char buffer_block[BLOCK_SIZE];
-
 /* bh state bits */
 #define BH_Uptodate    0       /* 1 if the buffer contains valid data */
 #define BH_Dirty       1       /* 1 if the buffer is dirty */
@@ -725,9 +724,30 @@ struct file_system_type {
        const char *name;
        int fs_flags;
        struct super_block *(*read_super) (struct super_block *, void *, int);
+       struct module *owner;
        struct file_system_type * next;
 };
 
+#ifdef MODULE
+#define DECLARE_FSTYPE(var,type,read,flags) \
+struct file_system_type var = { \
+       name:           type, \
+       read_super:     read, \
+       fs_flags:       flags, \
+       owner:          THIS_MODULE, \
+}
+#else
+#define DECLARE_FSTYPE(var,type,read,flags) \
+struct file_system_type var = { \
+       name:           type, \
+       read_super:     read, \
+       fs_flags:       flags, \
+}
+#endif
+
+#define DECLARE_FSTYPE_DEV(var,type,read) \
+       DECLARE_FSTYPE(var,type,read,FS_REQUIRES_DEV)
+
 extern int register_filesystem(struct file_system_type *);
 extern int unregister_filesystem(struct file_system_type *);
 
@@ -841,8 +861,6 @@ extern struct file_operations read_pipe_fops;
 extern struct file_operations write_pipe_fops;
 extern struct file_operations rdwr_pipe_fops;
 
-extern struct file_system_type *get_fs_type(const char *);
-
 extern int fs_may_remount_ro(struct super_block *);
 extern int fs_may_mount(kdev_t);
 
index 8e33913d39f781acab0b8aa0909c03983cacbbf3..96974638a89526b2a26187d1f28cfeb4f6d7945e 100644 (file)
@@ -5,8 +5,10 @@
 #include <linux/kernel.h>
 #include <linux/smp.h>
 #include <linux/cache.h>
+
 #include <asm/bitops.h>
 #include <asm/atomic.h>
+#include <asm/ptrace.h>
 
 struct irqaction {
        void (*handler)(int, void *, struct pt_regs *);
index 420285faf62f02bd2c93d0f50fa476103b0a52ff..3de43c924039b731a281799ea912fa2bc3dd2fe3 100644 (file)
@@ -29,6 +29,8 @@
 #define KIO_STATIC_PAGES       (KIO_MAX_ATOMIC_IO / (PAGE_SIZE >> 10) + 1)
 #define KIO_MAX_SECTORS                (KIO_MAX_ATOMIC_IO * 2)
 
+/* The main kiobuf struct used for all our IO! */
+
 struct kiobuf 
 {
        int             nr_pages;       /* Pages actually referenced */
@@ -46,7 +48,6 @@ struct kiobuf
        unsigned int    locked : 1;     /* If set, pages has been locked */
        
        /* Always embed enough struct pages for 64k of IO */
-       unsigned long   page_array[KIO_STATIC_PAGES];
        struct page *   map_array[KIO_STATIC_PAGES];
 
        /* Dynamic state for IO completion: */
@@ -61,10 +62,14 @@ struct kiobuf
 
 int    map_user_kiobuf(int rw, struct kiobuf *, unsigned long va, size_t len);
 void   unmap_kiobuf(struct kiobuf *iobuf);
+int    lock_kiovec(int nr, struct kiobuf *iovec[], int wait);
+int    unlock_kiovec(int nr, struct kiobuf *iovec[]);
 
 /* fs/iobuf.c */
 
-void __init kiobuf_init(void);
+void __init kiobuf_setup(void);
+void   kiobuf_init(struct kiobuf *);
+void   end_kio_request(struct kiobuf *, int);
 void   simple_wakeup_kiobuf(struct kiobuf *);
 int    alloc_kiovec(int nr, struct kiobuf **);
 void   free_kiovec(int nr, struct kiobuf **);
index 7407d39dbe85bbb582be836d2302d51e3d627254..69040207e0b6b71b09f2db95faf58270e804bf81 100644 (file)
@@ -1,7 +1,12 @@
 #ifndef __irq_h
 #define __irq_h
 
+#include <linux/cache.h>
+#include <linux/spinlock.h>
+
 #include <asm/irq.h>
+#include <asm/ptrace.h>
+
 /*
  * IRQ line status.
  */
index 83abfcf92fb4927d93a4ad5006455142d3a974f5..f425666962e40feb5c2a1ec57bf330a2bd1454b4 100644 (file)
@@ -9,7 +9,7 @@
 extern int request_module(const char * name);
 extern int exec_usermodehelper(char *program_path, char *argv[], char *envp[]);
 #else
-#define request_module(x) do {} while(0)
+static inline int request_module(const char * name) { return -ENOSYS; }
 extern inline int exec_usermodehelper(char *program_path, char *argv[], char *envp[])
 {
        return -EACCES;
index 4e0aebedbdb9d9212d0e1ec1893d098ae7c4c875..40dd931940899488181e711be4b16b8a2c0f93e9 100644 (file)
@@ -13,7 +13,6 @@
 
 /* Dummy declarations */
 struct svc_rqst;
-struct knfs_fh;
 struct svc_client;             /* opaque type */
 
 /*
@@ -24,7 +23,7 @@ struct nlmsvc_binding {
        void                    (*exp_unlock)(void);
        struct svc_client *     (*exp_getclient)(struct sockaddr_in *);
        u32                     (*fopen)(struct svc_rqst *,
-                                               struct knfs_fh *,
+                                               struct nfs_fh *,
                                                struct file *);
        void                    (*fclose)(struct file *);
        void                    (*detach)(void);
index cb2c148f1ab14b56ec65a0d9d3b71578c85ad82c..d949bd6493349f4a1cc4c9013d3ebbec34f209f9 100644 (file)
@@ -75,13 +75,14 @@ struct nlm_rqst {
  */
 struct nlm_file {
        struct nlm_file *       f_next;         /* linked list */
-       struct knfs_fh          f_handle;       /* NFS file handle */
+       struct nfs_fh           f_handle;       /* NFS file handle */
        struct file             f_file;         /* VFS file pointer */
        struct nlm_share *      f_shares;       /* DOS shares */
        struct nlm_block *      f_blocks;       /* blocked locks */
        unsigned int            f_locks;        /* guesstimate # of locks */
        unsigned int            f_count;        /* reference count */
        struct semaphore        f_sema;         /* avoid concurrent access */
+       int                     f_hash;         /* hash of f_handle */
 };
 
 /*
index 56d29ce627274d850cd38301293449ec220b8cba..915342edddbc7894b750e9948a4e606a8c8496a0 100644 (file)
@@ -145,6 +145,8 @@ struct module_info
 /* Find a symbol exported by the kernel or another module */
 extern unsigned long get_module_symbol(char *, char *);
 
+extern int try_inc_mod_count(struct module *mod);
+
 #if defined(MODULE) && !defined(__GENKSYMS__)
 
 /* Embedded module documentation macros.  */
index 93053c6b65c2800cf09ae6a46997b9db38c075f2..de8913cd38205af4738431d91882bc6c34797b88 100644 (file)
@@ -53,7 +53,6 @@ struct msdos_sb_info {
        struct nls_table *nls_io;    /* Charset used for input and display */
        struct cvf_format* cvf_format;
        void *dir_ops;               /* Opaque; default directory operations */
-       void (*put_super_callback)(struct super_block *);
        void *private_data;     
 };
 
index e5194b28f84f9719085e8ff9cdd25444563f851e..cdd77e9325ee251227ca474cb74acbcfc569e81c 100644 (file)
@@ -30,22 +30,35 @@ extern int requests_in;
 extern int requests_out;
 #endif
 
-static void 
+static int 
 nbd_end_request(struct request *req)
 {
        unsigned long flags;
+       int ret = 0;
 
 #ifdef PARANOIA
        requests_out++;
 #endif
+       /*
+        * This is a very dirty hack that we have to do to handle
+        * merged requests because end_request stuff is a bit
+        * broken. The fact we have to do this only if there
+        * aren't errors looks even more silly.
+        */
+       if (!req->errors) {
+               req->sector += req->current_nr_sectors;
+               req->nr_sectors -= req->current_nr_sectors;
+       }
+
        spin_lock_irqsave(&io_request_lock, flags);
        if (end_that_request_first( req, !req->errors, "nbd" ))
                goto out;
+       ret = 1;
        end_that_request_last( req );
 
 out:
        spin_unlock_irqrestore(&io_request_lock, flags);
-       return;
+       return ret;
 }
 
 #define MAX_NBD 128
@@ -56,7 +69,6 @@ struct nbd_device {
        int harderror;          /* Code of hard error                   */
 #define NBD_READ_ONLY 0x0001
 #define NBD_WRITE_NOCHK 0x0002
-#define NBD_INITIALISED 0x0004
        struct socket * sock;
        struct file * file;             /* If == NULL, device is not ready, yet */
        int magic;                      /* FIXME: not if debugging is off       */
index 0704c88e1ce569b2f03f8b6f07b98ba834e374bb..45f6dd0e0099225435713660957aa9cc52d7791b 100644 (file)
@@ -89,7 +89,7 @@ struct svc_client *   exp_getclient(struct sockaddr_in *sin);
 void                   exp_putclient(struct svc_client *clp);
 struct svc_export *    exp_get(struct svc_client *clp, kdev_t dev, ino_t ino);
 int                    exp_rootfh(struct svc_client *, kdev_t, ino_t,
-                                       char *path, struct knfs_fh *);
+                                       char *path, struct knfsd_fh *, int maxsize);
 int                    nfserrno(int errno);
 void                   exp_nlmdetach(void);
 
index d73229c7e87d0da6afc388c2f7b2cfa2cdba7670..a2f4897fc6f31b096537fde1375af94b7febf1fb 100644 (file)
@@ -129,8 +129,6 @@ int         nfsd_commit(struct svc_rqst *, struct svc_fh *,
 int            nfsd_notify_change(struct inode *, struct iattr *);
 int            nfsd_permission(struct svc_export *, struct dentry *, int);
 
-/* nfsd/nfsctl.c */
-void           nfsd_modcount(struct inode *, int);
 
 /*
  * lockd binding
@@ -159,6 +157,7 @@ void                nfsd_lockd_unexport(struct svc_client *);
 #define        nfserr_nospc            __constant_htonl(NFSERR_NOSPC)
 #define        nfserr_rofs             __constant_htonl(NFSERR_ROFS)
 #define        nfserr_mlink            __constant_htonl(NFSERR_MLINK)
+#define        nfserr_opnotsupp        __constant_htonl(NFSERR_OPNOTSUPP)
 #define        nfserr_nametoolong      __constant_htonl(NFSERR_NAMETOOLONG)
 #define        nfserr_notempty         __constant_htonl(NFSERR_NOTEMPTY)
 #define        nfserr_dquot            __constant_htonl(NFSERR_DQUOT)
index 20e850ec54d48448cbd7dc122d59cd65c6e8fdad..83320b810e4dd6fde8a1d10394ce2efdce40ab7b 100644 (file)
 #include <linux/nfsd/debug.h>
 
 /*
- * This is the new "dentry style" Linux NFSv2 file handle.
+ * This is the old "dentry style" Linux NFSv2 file handle.
  *
  * The xino and xdev fields are currently used to transport the
  * ino/dev of the exported inode.
  */
-struct nfs_fhbase {
-       struct dentry * fb_dentry;      /* dentry cookie */
+struct nfs_fhbase_old {
+       struct dentry * fb_dentry;      /* dentry cookie - always 0xfeebbaca */
        __u32           fb_ino;         /* our inode number */
-       __u32           fb_dirino;      /* dir inode number */
+       __u32           fb_dirino;      /* dir inode number, 0 for directories */
        __u32           fb_dev;         /* our device */
        __u32           fb_xdev;
        __u32           fb_xino;
        __u32           fb_generation;
 };
 
-#define NFS_FH_PADDING         (NFS_FHSIZE - sizeof(struct nfs_fhbase))
-struct knfs_fh {
-       struct nfs_fhbase       fh_base;
-       __u8                    fh_cookie[NFS_FH_PADDING];
+/*
+ * This is the new flexible, extensible style NFSv2/v3 file handle.
+ * by Neil Brown <neilb@cse.unsw.edu.au> - March 2000
+ *
+ * The file handle is seens as a list of 4byte words.
+ * The first word contains a version number (1) and four descriptor bytes
+ * that tell how the remaining 3 variable length fields should be handled.
+ * These three bytes are auth_type, fsid_type and fileid_type.
+ *
+ * All 4byte values are in host-byte-order.
+ *
+ * The auth_type field specifies how the filehandle can be authenticated
+ * This might allow a file to be confirmed to be in a writable part of a
+ * filetree without checking the path from it upto the root.
+ * Current values:
+ *     0  - No authentication.  fb_auth is 0 bytes long
+ * Possible future values:
+ *     1  - 4 bytes taken from MD5 hash of the remainer of the file handle
+ *          prefixed by a secret and with the important export flags.
+ *
+ * The fsid_type identifies how the filesystem (or export point) is
+ *    encoded.
+ *  Current values:
+ *     0  - 4 byte device id (ms-2-bytes major, ls-2-bytes minor), 4byte inode number
+ *        NOTE: we cannot use the kdev_t device id value, because kdev_t.h
+ *              says we mustn't.  We must break it up and reassemble.
+ *  Possible future encodings:
+ *     1  - 4 byte user specified identifier
+ *
+ * The fileid_type identified how the file within the filesystem is encoded.
+ * This is (will be) passed to, and set by, the underlying filesystem if it supports
+ * filehandle operations.  The filesystem must not use the value '0' or '0xff' and may
+ * only use the values 1 and 2 as defined below:
+ *  Current values:
+ *    0   - The root, or export point, of the filesystem.  fb_fileid is 0 bytes.
+ *    1   - 32bit inode number, 32 bit generation number.
+ *    2   - 32bit inode number, 32 bit generation number, 32 bit parent directory inode number.
+ *
+ */
+struct nfs_fhbase_new {
+       __u8            fb_version;     /* == 1, even => nfs_fhbase_old */
+       __u8            fb_auth_type;
+       __u8            fb_fsid_type;
+       __u8            fb_fileid_type;
+       __u32           fb_auth[1];
+/*     __u32           fb_fsid[0]; floating */
+/*     __u32           fb_fileid[0]; floating */
+};
+
+struct knfsd_fh {
+       int             fh_size;        /* significant for NFSv3.
+                                        * Points to the current size while building
+                                        * a new file handle
+                                        */
+       union {
+               struct nfs_fhbase_old   fh_old;
+               __u32                   fh_pad[NFS3_FHSIZE/4];
+               struct nfs_fhbase_new   fh_new;
+       } fh_base;
 };
 
-#define fh_dcookie             fh_base.fb_dentry
-#define fh_ino                 fh_base.fb_ino
-#define fh_dirino              fh_base.fb_dirino
-#define fh_dev                 fh_base.fb_dev
-#define fh_xdev                        fh_base.fb_xdev
-#define fh_xino                        fh_base.fb_xino
-#define fh_generation          fh_base.fb_generation
+#define ofh_dcookie            fh_base.fh_old.fb_dentry
+#define ofh_ino                        fh_base.fh_old.fb_ino
+#define ofh_dirino             fh_base.fh_old.fb_dirino
+#define ofh_dev                        fh_base.fh_old.fb_dev
+#define ofh_xdev               fh_base.fh_old.fb_xdev
+#define ofh_xino               fh_base.fh_old.fb_xino
+#define ofh_generation         fh_base.fh_old.fb_generation
+
+#define        fh_version              fh_base.fh_new.fb_version
+#define        fh_fsid_type            fh_base.fh_new.fb_fsid_type
+#define        fh_auth_type            fh_base.fh_new.fb_auth_type
+#define        fh_fileid_type          fh_base.fh_new.fb_fileid_type
+#define        fh_auth                 fh_base.fh_new.fb_auth
 
 #ifdef __KERNEL__
 
@@ -84,9 +145,10 @@ extern inline ino_t u32_to_ino_t(__u32 uino)
  * pre_mtime/post_version will be used to support wcc_attr's in NFSv3.
  */
 typedef struct svc_fh {
-       struct knfs_fh          fh_handle;      /* FH data */
+       struct knfsd_fh         fh_handle;      /* FH data */
        struct dentry *         fh_dentry;      /* validated dentry */
        struct svc_export *     fh_export;      /* export pointer */
+       int                     fh_maxsize;     /* max size for fh_handle */
 #ifdef CONFIG_NFSD_V3
        unsigned char           fh_post_saved;  /* post-op attrs saved */
        unsigned char           fh_pre_saved;   /* pre-op attrs saved */
@@ -119,20 +181,28 @@ typedef struct svc_fh {
 /*
  * Shorthand for dprintk()'s
  */
-#define SVCFH_DENTRY(f)                ((f)->fh_dentry)
-#define SVCFH_INO(f)           ((f)->fh_handle.fh_ino)
-#define SVCFH_DEV(f)           ((f)->fh_handle.fh_dev)
-
+inline static char * SVCFH_fmt(struct svc_fh *fhp)
+{
+       struct knfsd_fh *fh = &fhp->fh_handle;
+       
+       static char buf[80];
+       sprintf(buf, "%d: %08x %08x %08x %08x %08x %08x",
+               fh->fh_size,
+               fh->fh_base.fh_pad[0],
+               fh->fh_base.fh_pad[1],
+               fh->fh_base.fh_pad[2],
+               fh->fh_base.fh_pad[3],
+               fh->fh_base.fh_pad[4],
+               fh->fh_base.fh_pad[5]);
+       return buf;
+}
 /*
  * Function prototypes
  */
 u32    fh_verify(struct svc_rqst *, struct svc_fh *, int, int);
-void   fh_compose(struct svc_fh *, struct svc_export *, struct dentry *);
-void   fh_update(struct svc_fh *);
+int    fh_compose(struct svc_fh *, struct svc_export *, struct dentry *);
+int    fh_update(struct svc_fh *);
 void   fh_put(struct svc_fh *);
-void   nfsd_fh_flush(kdev_t);
-void   nfsd_fh_init(void);
-void   nfsd_fh_free(void);
 
 static __inline__ struct svc_fh *
 fh_copy(struct svc_fh *dst, struct svc_fh *src)
@@ -148,9 +218,10 @@ fh_copy(struct svc_fh *dst, struct svc_fh *src)
 }
 
 static __inline__ struct svc_fh *
-fh_init(struct svc_fh *fhp)
+fh_init(struct svc_fh *fhp, int maxsize)
 {
        memset(fhp, 0, sizeof(*fhp));
+       fhp->fh_maxsize = maxsize;
        return fhp;
 }
 
@@ -216,8 +287,8 @@ fh_lock(struct svc_fh *fhp)
        struct dentry   *dentry = fhp->fh_dentry;
        struct inode    *inode;
 
-       dfprintk(FILEOP, "nfsd: fh_lock(%x/%ld) locked = %d\n",
-                       SVCFH_DEV(fhp), (long)SVCFH_INO(fhp), fhp->fh_locked);
+       dfprintk(FILEOP, "nfsd: fh_lock(%s) locked = %d\n",
+                       SVCFH_fmt(fhp), fhp->fh_locked);
 
        if (!fhp->fh_dverified) {
                printk(KERN_ERR "fh_lock: fh not verified!\n");
index 1d42ec550e2f055e1023f693bcd56b29a50c5c5e..af723ced8fd49afff1529abbde8f2e0e6b4b5d02 100644 (file)
@@ -37,6 +37,7 @@
 #define NFSCTL_UGIDUPDATE      5       /* update a client's uid/gid map. */
 #define NFSCTL_GETFH           6       /* get an fh by ino (used by mountd) */
 #define NFSCTL_GETFD           7       /* get an fh by path (used by mountd) */
+#define        NFSCTL_GETFS            8       /* get an fh by path with max FH len */
 
 /* SVC */
 struct nfsctl_svc {
@@ -91,6 +92,13 @@ struct nfsctl_fdparm {
        int                     gd_version;
 };
 
+/* GETFS - GET Filehandle with Size */
+struct nfsctl_fsparm {
+       struct sockaddr         gd_addr;
+       char                    gd_path[NFS_MAXPATHLEN+1];
+       int                     gd_maxlen;
+};
+
 /*
  * This is the argument union.
  */
@@ -103,6 +111,9 @@ struct nfsctl_arg {
                struct nfsctl_uidmap    u_umap;
                struct nfsctl_fhparm    u_getfh;
                struct nfsctl_fdparm    u_getfd;
+#ifdef notyet
+               struct nfsctl_fsparm    u_getfs;
+#endif
                unsigned int            u_debug;
        } u;
 #define ca_svc         u.u_svc
@@ -111,12 +122,16 @@ struct nfsctl_arg {
 #define ca_umap                u.u_umap
 #define ca_getfh       u.u_getfh
 #define ca_getfd       u.u_getfd
+#define        ca_getfs        u.u_getfs
 #define ca_authd       u.u_authd
 #define ca_debug       u.u_debug
 };
 
 union nfsctl_res {
-       struct knfs_fh          cr_getfh;
+       __u8                    cr_getfh[NFS_FHSIZE];
+#ifdef notyet
+       struct knfsd_fh         cr_getfs;
+#endif
        unsigned int            cr_debug;
 };
 
index 5919a894e68544f11f1e00055f2a3d4279ea2a80..682620995c7d9601dd5ca2daf88c36e41cb63e1a 100644 (file)
@@ -286,7 +286,7 @@ struct video_code
 #define VIDIOCGPICT            _IOR('v',6,struct video_picture)        /* Get picture properties */
 #define VIDIOCSPICT            _IOW('v',7,struct video_picture)        /* Set picture properties */
 #define VIDIOCCAPTURE          _IOW('v',8,int)                         /* Start, end capture */
-#define VIDIOCGWIN             _IOR('v',9, struct video_window)        /* Set the video overlay window */
+#define VIDIOCGWIN             _IOR('v',9, struct video_window)        /* Get the video overlay window */
 #define VIDIOCSWIN             _IOW('v',10, struct video_window)       /* Set the video overlay window - passes clip list for hardware smarts , chromakey etc */
 #define VIDIOCGFBUF            _IOR('v',11, struct video_buffer)       /* Get frame buffer */
 #define VIDIOCSFBUF            _IOW('v',12, struct video_buffer)       /* Set frame buffer - root only */
index 1cdf086d8b4c56279c5b039bb6401d7c22f64c96..c4abcacbbb7a1a527b192898f95ec159109a9349 100644 (file)
@@ -533,7 +533,7 @@ asmlinkage void __init start_kernel(void)
        vma_init();
        buffer_init(mempages);
        page_cache_init(mempages);
-       kiobuf_init();
+       kiobuf_setup();
        signals_init();
        bdev_init();
        inode_init();
index a36abec5ad94f1a1bccd318e759353c67e63f1cb..d614d3f2f3555c09148f1bb3416cf0b0ddcb57b0 100644 (file)
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -48,7 +48,7 @@ static void         shm_put_super  (struct super_block *);
 static int           shm_remount_fs (struct super_block *, int *, char *);
 static void          shm_read_inode (struct inode *);
 static void          shm_write_inode(struct inode *);
-static int           shm_statfs (struct super_block *, struct statfs *, int);
+static int           shm_statfs (struct super_block *, struct statfs *);
 static int           shm_create   (struct inode *,struct dentry *,int);
 static struct dentry *shm_lookup   (struct inode *,struct dentry *);
 static int           shm_unlink   (struct inode *,struct dentry *);
@@ -134,12 +134,7 @@ static struct dentry *zdent;
 
 static struct super_block * shm_sb;
 
-static struct file_system_type shm_fs_type = {
-       "shm",
-       0,
-       shm_read_super,
-       NULL
-};
+static DECLARE_FSTYPE(shm_fs_type, "shm", shm_read_super, 0);
 
 static struct super_operations shm_sops = {
        read_inode:     shm_read_inode,
@@ -275,7 +270,6 @@ static struct super_block *shm_read_super(struct super_block *s,void *data,
                return NULL;
        }
 
-       lock_super(s);
        shm_ctlall = SHMALL;
        shm_ctlmni = SHMMNI;
        shm_mode   = S_IRWXUGO | S_ISVTX;
@@ -300,15 +294,12 @@ static struct super_block *shm_read_super(struct super_block *s,void *data,
                goto out_no_root;
        s->u.generic_sbp = (void*) shm_sb;
        shm_sb = s;
-       unlock_super(s);
        return s;
 
 out_no_root:
        printk("proc_read_super: get root inode failed\n");
        iput(root_inode);
 out_unlock:
-       s->s_dev = 0;
-       unlock_super(s);
        return NULL;
 }
 
@@ -347,18 +338,16 @@ static void shm_put_super(struct super_block *sb)
        up(&shm_ids.sem);
 }
 
-static int shm_statfs(struct super_block *sb, struct statfs *buf, int bufsiz)
+static int shm_statfs(struct super_block *sb, struct statfs *buf)
 {
-       struct statfs tmp;
-
-       tmp.f_type = 0;
-       tmp.f_bsize = PAGE_SIZE;
-       tmp.f_blocks = shm_ctlall;
-       tmp.f_bavail = tmp.f_bfree = shm_ctlall - shm_tot;
-       tmp.f_files = shm_ctlmni;
-       tmp.f_ffree = shm_ctlmni - used_segs;
-       tmp.f_namelen = SHM_NAME_LEN;
-       return copy_to_user(buf, &tmp, bufsiz) ? -EFAULT : 0;
+       buf->f_type = 0;
+       buf->f_bsize = PAGE_SIZE;
+       buf->f_blocks = shm_ctlall;
+       buf->f_bavail = buf->f_bfree = shm_ctlall - shm_tot;
+       buf->f_files = shm_ctlmni;
+       buf->f_ffree = shm_ctlmni - used_segs;
+       buf->f_namelen = SHM_NAME_LEN;
+       return 0;
 }
 
 static void shm_write_inode(struct inode * inode)
index c7a618e98e92366aa10d9e0743379dc810efa711..4deb499b71a4f43fc609875e9c7c0e7d0cf55d26 100644 (file)
@@ -45,6 +45,18 @@ static void release(struct task_struct * p)
                current->cmin_flt += p->min_flt + p->cmin_flt;
                current->cmaj_flt += p->maj_flt + p->cmaj_flt;
                current->cnswap += p->nswap + p->cnswap;
+               /*
+                * Potentially available timeslices are retrieved
+                * here - this way the parent does not get penalized
+                * for creating too many processes.
+                *
+                * (this cannot be used to artificially 'generate'
+                * timeslices, because any timeslice recovered here
+                * was given away by the parent in the first place.)
+                */
+               current->counter += p->counter;
+               if (current->counter > current->priority)
+                       current->counter = current->priority;
                free_task_struct(p);
        } else {
                printk("task releasing itself\n");
index 71989b3f734245969e161aae08c8cf8cbcdf9c8d..f30adb90878c2e3c66f58166976679251705e19f 100644 (file)
@@ -713,8 +713,10 @@ int do_fork(unsigned long clone_flags, unsigned long usp, struct pt_regs *regs)
         * more scheduling fairness. This is only important in the first
         * timeslice, on the long run the scheduling behaviour is unchanged.
         */
+       p->counter = (current->counter + 1) >> 1;
        current->counter >>= 1;
-       p->counter = current->counter;
+       if (!current->counter)
+               current->need_resched = 1;
 
        /*
         * Ok, add it to the run-queues and make it
index c578e0d2f9a9a046ecef07d059e9fbb6edd55054..0a22f820abf64b1d69aed380cd9298f065829040 100644 (file)
@@ -131,7 +131,6 @@ EXPORT_SYMBOL(def_blk_fops);
 EXPORT_SYMBOL(in_group_p);
 EXPORT_SYMBOL(update_atime);
 EXPORT_SYMBOL(get_super);
-EXPORT_SYMBOL(get_fs_type);
 EXPORT_SYMBOL(get_empty_super);
 EXPORT_SYMBOL(remove_vfsmnt);
 EXPORT_SYMBOL(getname);
@@ -157,11 +156,6 @@ EXPORT_SYMBOL(d_path);
 EXPORT_SYMBOL(mark_buffer_dirty);
 EXPORT_SYMBOL(__mark_buffer_dirty);
 EXPORT_SYMBOL(__mark_inode_dirty);
-EXPORT_SYMBOL(free_kiovec);
-EXPORT_SYMBOL(brw_kiovec);
-EXPORT_SYMBOL(alloc_kiovec);
-EXPORT_SYMBOL(expand_kiobuf);
-EXPORT_SYMBOL(unmap_kiobuf);
 EXPORT_SYMBOL(get_empty_filp);
 EXPORT_SYMBOL(init_private_file);
 EXPORT_SYMBOL(filp_open);
@@ -358,6 +352,18 @@ EXPORT_SYMBOL(__br_write_lock);
 EXPORT_SYMBOL(__br_write_unlock);
 #endif
 
+/* Kiobufs */
+EXPORT_SYMBOL(kiobuf_init);
+
+EXPORT_SYMBOL(alloc_kiovec);
+EXPORT_SYMBOL(free_kiovec);
+EXPORT_SYMBOL(expand_kiobuf);
+
+EXPORT_SYMBOL(map_user_kiobuf);
+EXPORT_SYMBOL(lock_kiovec);
+EXPORT_SYMBOL(unlock_kiovec);
+EXPORT_SYMBOL(brw_kiovec);
+
 /* autoirq from  drivers/net/auto_irq.c */
 EXPORT_SYMBOL(autoirq_setup);
 EXPORT_SYMBOL(autoirq_report);
index fb9d4ef8d0ce019f88329e4dc06f95582923064e..c3696402259df3caa32d22d16a787a9470128916 100644 (file)
@@ -350,6 +350,21 @@ err0:
        return error;
 }
 
+static spinlock_t unload_lock = SPIN_LOCK_UNLOCKED;
+int try_inc_mod_count(struct module *mod)
+{
+       int res = 1;
+       if (mod) {
+               spin_lock(&unload_lock);
+               if (mod->flags & MOD_DELETED)
+                       res = 0;
+               else
+                       __MOD_INC_USE_COUNT(mod);
+               spin_unlock(&unload_lock);
+       }
+       return res;
+}
+
 asmlinkage long
 sys_delete_module(const char *name_user)
 {
@@ -377,11 +392,18 @@ sys_delete_module(const char *name_user)
                }
                put_mod_name(name);
                error = -EBUSY;
-               if (mod->refs != NULL || __MOD_IN_USE(mod))
+               if (mod->refs != NULL)
                        goto out;
 
-               free_module(mod, 0);
-               error = 0;
+               spin_lock(&unload_lock);
+               if (!__MOD_IN_USE(mod)) {
+                       mod->flags |= MOD_DELETED;
+                       spin_unlock(&unload_lock);
+                       free_module(mod, 0);
+                       error = 0;
+               } else {
+                       spin_unlock(&unload_lock);
+               }
                goto out;
        }
 
@@ -390,6 +412,7 @@ restart:
        something_changed = 0;
        for (mod = module_list; mod != &kernel_module; mod = next) {
                next = mod->next;
+               spin_lock(&unload_lock);
                if (mod->refs == NULL
                    && (mod->flags & MOD_AUTOCLEAN)
                    && (mod->flags & MOD_RUNNING)
@@ -398,11 +421,16 @@ restart:
                    && !__MOD_IN_USE(mod)) {
                        if ((mod->flags & MOD_VISITED)
                            && !(mod->flags & MOD_JUST_FREED)) {
+                               spin_unlock(&unload_lock);
                                mod->flags &= ~MOD_VISITED;
                        } else {
+                               mod->flags |= MOD_DELETED;
+                               spin_unlock(&unload_lock);
                                free_module(mod, 1);
                                something_changed = 1;
                        }
+               } else {
+                       spin_unlock(&unload_lock);
                }
        }
        if (something_changed)
@@ -775,7 +803,6 @@ free_module(struct module *mod, int tag_freed)
 
        /* Let the module clean up.  */
 
-       mod->flags |= MOD_DELETED;
        if (mod->flags & MOD_RUNNING) 
        {
                if(mod->cleanup)
index b190669a11020ef0b41de35f969302742777d2dc..f4199cc49bbac504c8cb0a9814c34ed17837ab53 100644 (file)
@@ -39,6 +39,8 @@ void __init signals_init(void)
                                  sizeof(struct signal_queue),
                                  __alignof__(struct signal_queue),
                                  SIG_SLAB_DEBUG, NULL, NULL);
+       if (!signal_queue_cachep)
+               panic("signals_init(): cannot create signal_queue SLAB cache");
 }
 
 
index 2934eaf8e96c2353f23554e188f6842dbd29fac4..2ba0d224a5b2fb07ef2ac69641ffc502f051a8c4 100644 (file)
@@ -801,23 +801,39 @@ asmlinkage long sys_setgroups(int gidsetsize, gid_t *grouplist)
        return 0;
 }
 
-int in_group_p(gid_t grp)
+static int supplemental_group_member(gid_t grp)
 {
-       if (grp != current->fsgid) {
-               int i = current->ngroups;
-               if (i) {
-                       gid_t *groups = current->groups;
-                       do {
-                               if (*groups == grp)
-                                       goto out;
-                               groups++;
-                               i--;
-                       } while (i);
-               }
-               return 0;
+       int i = current->ngroups;
+
+       if (i) {
+               gid_t *groups = current->groups;
+               do {
+                       if (*groups == grp)
+                               return 1;
+                       groups++;
+                       i--;
+               } while (i);
        }
-out:
-       return 1;
+       return 0;
+}
+
+/*
+ * Check whether we're fsgid/egid or in the supplemental group..
+ */
+int in_group_p(gid_t grp)
+{
+       int retval = 1;
+       if (grp != current->fsgid)
+               retval = supplemental_group_member(grp);
+       return retval;
+}
+
+int in_egroup_p(gid_t grp)
+{
+       int retval = 1;
+       if (grp != current->egid)
+               retval = supplemental_group_member(grp);
+       return retval;
 }
 
 DECLARE_RWSEM(uts_sem);
index c49f1eb05aa314ec4d0d2d96280cf859c9da8ef9..0001a14730ba72e7479be0ee3dfabeb97ff5123e 100644 (file)
@@ -348,25 +348,6 @@ extern asmlinkage long sys_sysctl(struct __sysctl_args *args)
        return error;
 }
 
-/* Like in_group_p, but testing against egid, not fsgid */
-int in_egroup_p(gid_t grp)
-{
-       if (grp != current->egid) {
-               int i = current->ngroups;
-               if (i) {
-                       gid_t *groups = current->groups;
-                       do {
-                               if (*groups == grp)
-                                       goto out;
-                               groups++;
-                               i--;
-                       } while (i);
-               }
-               return 0;
-       }
-out:
-       return 1;
-}
 
 /* ctl_perm does NOT grant the superuser all rights automatically, because
    some sysctl variables are readonly even to root. */
index 6756c70a06a60f58bd425e1bd0b80238a4b9b98e..b5febc2e5edc446da37f496695c8f107eb58e19d 100644 (file)
@@ -954,8 +954,7 @@ static void generic_file_readahead(int reada_ok,
  */
 void do_generic_file_read(struct file * filp, loff_t *ppos, read_descriptor_t * desc, read_actor_t actor)
 {
-       struct dentry *dentry = filp->f_dentry;
-       struct inode *inode = dentry->d_inode;
+       struct inode *inode = filp->f_dentry->d_inode;
        struct address_space *mapping = inode->i_mapping;
        unsigned long index, offset;
        struct page *cached_page;
@@ -1307,8 +1306,7 @@ struct page * filemap_nopage(struct vm_area_struct * area,
 {
        int error;
        struct file *file = area->vm_file;
-       struct dentry *dentry = file->f_dentry;
-       struct inode *inode = dentry->d_inode;
+       struct inode *inode = file->f_dentry->d_inode;
        struct address_space *mapping = inode->i_mapping;
        struct page *page, **hash, *old_page;
        unsigned long size = (inode->i_size + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
index 1232bd928c76c9757c8d824d4a635c56e83aa4b2..dbcdd005268718a2089e261f685d2822ab7a5641 100644 (file)
@@ -398,28 +398,25 @@ static struct page * follow_page(unsigned long address)
                        return pte_page(*pte);
        }
        
-       printk(KERN_ERR "Missing page in follow_page\n");
        return NULL;
 }
 
 /* 
- * Given a physical address, is there a useful struct page pointing to it?
+ * 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
+ * with IO-aperture pages in kiobufs.
  */
 
-struct page * get_page_map(struct page *page, unsigned long vaddr)
+static inline struct page * get_page_map(struct page *page)
 {
-       if (MAP_NR(vaddr) >= max_mapnr)
-               return 0;
-       if (page == ZERO_PAGE(vaddr))
-               return 0;
-       if (PageReserved(page))
+       if (page > (mem_map + max_mapnr))
                return 0;
        return page;
 }
 
 /*
  * Force in an entire range of pages from the current process's user VA,
- * and pin and lock the pages for IO.  
+ * and pin them in physical memory.  
  */
 
 #define dprintk(x...)
@@ -430,8 +427,6 @@ int map_user_kiobuf(int rw, struct kiobuf *iobuf, unsigned long va, size_t len)
        struct mm_struct *      mm;
        struct vm_area_struct * vma = 0;
        struct page *           map;
-       int                     doublepage = 0;
-       int                     repeat = 0;
        int                     i;
        
        /* Make sure the iobuf is not already mapped somewhere. */
@@ -447,11 +442,10 @@ int map_user_kiobuf(int rw, struct kiobuf *iobuf, unsigned long va, size_t len)
        if (err)
                return err;
 
- repeat:
        down(&mm->mmap_sem);
 
        err = -EFAULT;
-       iobuf->locked = 1;
+       iobuf->locked = 0;
        iobuf->offset = va & ~PAGE_MASK;
        iobuf->length = len;
        
@@ -471,16 +465,15 @@ int map_user_kiobuf(int rw, struct kiobuf *iobuf, unsigned long va, size_t len)
                spin_lock(&mm->page_table_lock);
                map = follow_page(ptr);
                if (!map) {
+                       spin_unlock(&mm->page_table_lock);
                        dprintk (KERN_ERR "Missing page in map_user_kiobuf\n");
-                       goto retry;
+                       goto out_unlock;
                }
-               map = get_page_map(map, ptr);
-               if (map) {
-                       if (TryLockPage(map)) {
-                               goto retry;
-                       }
+               map = get_page_map(map);
+               if (map)
                        atomic_inc(&map->count);
-               }
+               else
+                       printk (KERN_INFO "Mapped page missing [%d]\n", i);
                spin_unlock(&mm->page_table_lock);
                iobuf->maplist[i] = map;
                iobuf->nr_pages = ++i;
@@ -497,66 +490,133 @@ int map_user_kiobuf(int rw, struct kiobuf *iobuf, unsigned long va, size_t len)
        unmap_kiobuf(iobuf);
        dprintk ("map_user_kiobuf: end %d\n", err);
        return err;
+}
 
- retry:
 
+/*
+ * Unmap all of the pages referenced by a kiobuf.  We release the pages,
+ * and unlock them if they were locked. 
+ */
+
+void unmap_kiobuf (struct kiobuf *iobuf) 
+{
+       int i;
+       struct page *map;
+       
+       for (i = 0; i < iobuf->nr_pages; i++) {
+               map = iobuf->maplist[i];
+               if (map) {
+                       if (iobuf->locked)
+                               UnlockPage(map);
+                       __free_page(map);
+               }
+       }
+       
+       iobuf->nr_pages = 0;
+       iobuf->locked = 0;
+}
+
+
+/*
+ * Lock down all of the pages of a kiovec for IO.
+ *
+ * If any page is mapped twice in the kiovec, we return the error -EINVAL.
+ *
+ * The optional wait parameter causes the lock call to block until all
+ * pages can be locked if set.  If wait==0, the lock operation is
+ * aborted if any locked pages are found and -EAGAIN is returned.
+ */
+
+int lock_kiovec(int nr, struct kiobuf *iovec[], int wait)
+{
+       struct kiobuf *iobuf;
+       int i, j;
+       struct page *page, **ppage;
+       int doublepage = 0;
+       int repeat = 0;
+       
+ repeat:
+       
+       for (i = 0; i < nr; i++) {
+               iobuf = iovec[i];
+
+               if (iobuf->locked)
+                       continue;
+               iobuf->locked = 1;
+
+               ppage = iobuf->maplist;
+               for (j = 0; j < iobuf->nr_pages; ppage++, j++) {
+                       page = *ppage;
+                       if (!page)
+                               continue;
+                       
+                       if (TryLockPage(page))
+                               goto retry;
+               }
+       }
+
+       return 0;
+       
+ retry:
+       
        /* 
-        * Undo the locking so far, wait on the page we got to, and try again.
+        * We couldn't lock one of the pages.  Undo the locking so far,
+        * wait on the page we got to, and try again.  
         */
-       spin_unlock(&mm->page_table_lock);
-       unmap_kiobuf(iobuf);
-       up(&mm->mmap_sem);
-
+       
+       unlock_kiovec(nr, iovec);
+       if (!wait)
+               return -EAGAIN;
+       
        /* 
         * Did the release also unlock the page we got stuck on?
         */
-       if (map) {
-               if (!PageLocked(map)) {
-                       /* If so, we may well have the page mapped twice
-                        * in the IO address range.  Bad news.  Of
-                        * course, it _might_ * just be a coincidence,
-                        * but if it happens more than * once, chances
-                        * are we have a double-mapped page. */
-                       if (++doublepage >= 3) {
-                               return -EINVAL;
-                       }
-               }
-       
-               /*
-                * Try again...
+       if (!PageLocked(page)) {
+               /* 
+                * If so, we may well have the page mapped twice
+                * in the IO address range.  Bad news.  Of
+                * course, it _might_ just be a coincidence,
+                * but if it happens more than once, chances
+                * are we have a double-mapped page. 
                 */
-               wait_on_page(map);
+               if (++doublepage >= 3) 
+                       return -EINVAL;
+               
+               /* Try again...  */
+               wait_on_page(page);
        }
        
-       if (++repeat < 16) {
-               ptr = va & PAGE_MASK;
+       if (++repeat < 16)
                goto repeat;
-       }
        return -EAGAIN;
 }
 
-
 /*
- * Unmap all of the pages referenced by a kiobuf.  We release the pages,
- * and unlock them if they were locked. 
+ * Unlock all of the pages of a kiovec after IO.
  */
 
-void unmap_kiobuf (struct kiobuf *iobuf) 
+int unlock_kiovec(int nr, struct kiobuf *iovec[])
 {
-       int i;
-       struct page *map;
+       struct kiobuf *iobuf;
+       int i, j;
+       struct page *page, **ppage;
        
-       for (i = 0; i < iobuf->nr_pages; i++) {
-               map = iobuf->maplist[i];
+       for (i = 0; i < nr; i++) {
+               iobuf = iovec[i];
+
+               if (!iobuf->locked)
+                       continue;
+               iobuf->locked = 0;
                
-               if (map && iobuf->locked) {
-                       UnlockPage(map);
-                       __free_page(map);
+               ppage = iobuf->maplist;
+               for (j = 0; j < iobuf->nr_pages; ppage++, j++) {
+                       page = *ppage;
+                       if (!page)
+                               continue;
+                       UnlockPage(page);
                }
        }
-       
-       iobuf->nr_pages = 0;
-       iobuf->locked = 0;
+       return 0;
 }
 
 static inline void zeromap_pte_range(pte_t * pte, unsigned long address,
index 6590ff316957e46930b0e46c0d89b935ab367b5e..37aae3e6c94808e126396681e5eb044dfef0a978 100644 (file)
@@ -50,6 +50,7 @@
 #include <linux/etherdevice.h>
 #include <linux/if_arp.h>
 #include <linux/skbuff.h>
+#include <linux/spinlock.h>
 #include <net/sock.h>
 #include <net/datalink.h>
 #include <net/psnap.h>
@@ -67,8 +68,7 @@ int sysctl_aarp_resolve_time = AARP_RESOLVE_TIME;
  *     Lists of aarp entries
  */
  
-struct aarp_entry
-{
+struct aarp_entry {
        /* These first two are only used for unresolved entries */
        unsigned long last_sent;                /* Last time we xmitted the aarp request */
        struct sk_buff_head packet_queue;       /* Queue of frames wait for resolution */
@@ -85,8 +85,13 @@ struct aarp_entry
  *     Hashed list of resolved, unresolved and proxy entries
  */
 
-static struct aarp_entry *resolved[AARP_HASH_SIZE], *unresolved[AARP_HASH_SIZE], *proxies[AARP_HASH_SIZE];
-static int unresolved_count=0;
+static struct aarp_entry *resolved[AARP_HASH_SIZE];
+static struct aarp_entry *unresolved[AARP_HASH_SIZE];
+static struct aarp_entry *proxies[AARP_HASH_SIZE];
+static int unresolved_count = 0;
+
+/* One lock protects it all. */
+static spinlock_t aarp_lock = SPIN_LOCK_UNLOCKED;
 
 /*
  *     Used to walk the list and purge/kick entries.
@@ -96,38 +101,49 @@ static struct timer_list aarp_timer;
 
 /*
  *     Delete an aarp queue
+ *
+ *     Must run under aarp_lock.
  */
-static void aarp_expire(struct aarp_entry *a)
+static void __aarp_expire(struct aarp_entry *a)
 {
        struct sk_buff *skb;
        
-       while((skb=skb_dequeue(&a->packet_queue))!=NULL)
+       while ((skb=skb_dequeue(&a->packet_queue)) != NULL)
                kfree_skb(skb);
-       kfree_s(a,sizeof(*a));
+
+       kfree_s(a, sizeof(*a));
 }
 
 /*
  *     Send an aarp queue entry request
+ *
+ *     Must run under aarp_lock.
  */
  
-static void aarp_send_query(struct aarp_entry *a)
+static void __aarp_send_query(struct aarp_entry *a)
 {
-       static char aarp_eth_multicast[ETH_ALEN]={ 0x09, 0x00, 0x07, 0xFF, 0xFF, 0xFF };
-       struct net_device *dev=a->dev;
-       int len=dev->hard_header_len+sizeof(struct elapaarp)+aarp_dl->header_length;
-       struct sk_buff *skb=alloc_skb(len, GFP_ATOMIC);
+       static char aarp_eth_multicast[ETH_ALEN] =
+               { 0x09, 0x00, 0x07, 0xFF, 0xFF, 0xFF };
+       struct net_device *dev = a->dev;
+       int len = dev->hard_header_len + sizeof(struct elapaarp) + aarp_dl->header_length;
+       struct sk_buff *skb = alloc_skb(len, GFP_ATOMIC);
        struct elapaarp *eah;
-       struct at_addr *sat=atalk_find_dev_addr(dev);
+       struct at_addr *sat = atalk_find_dev_addr(dev);
        
-       if(skb==NULL || sat==NULL)
+       if (skb == NULL)
                return;
+
+       if (sat == NULL) {
+               kfree_skb(skb);
+               return;
+       }
        
        /*
         *      Set up the buffer.
         */             
 
-       skb_reserve(skb,dev->hard_header_len+aarp_dl->header_length);
-       eah             =       (struct elapaarp *)skb_put(skb,sizeof(struct elapaarp));
+       skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length);
+       eah             =       (struct elapaarp *)skb_put(skb, sizeof(struct elapaarp));
        skb->protocol   =       htons(ETH_P_ATALK);
        skb->nh.raw     =       skb->h.raw = (void *) eah;
        skb->dev        =       dev;
@@ -173,21 +189,25 @@ static void aarp_send_query(struct aarp_entry *a)
        a->xmit_count++;
 }
 
-static void aarp_send_reply(struct net_device *dev, struct at_addr *us, struct at_addr *them, unsigned char *sha)
+/* This runs under aarp_lock and in softint context, so only
+ * atomic memory allocations can be used.
+ */
+static void aarp_send_reply(struct net_device *dev, struct at_addr *us,
+                           struct at_addr *them, unsigned char *sha)
 {
-       int len=dev->hard_header_len+sizeof(struct elapaarp)+aarp_dl->header_length;
-       struct sk_buff *skb=alloc_skb(len, GFP_ATOMIC);
+       int len = dev->hard_header_len + sizeof(struct elapaarp) + aarp_dl->header_length;
+       struct sk_buff *skb = alloc_skb(len, GFP_ATOMIC);
        struct elapaarp *eah;
        
-       if(skb==NULL)
+       if (skb == NULL)
                return;
        
        /*
         *      Set up the buffer.
         */             
 
-       skb_reserve(skb,dev->hard_header_len+aarp_dl->header_length);
-       eah             =       (struct elapaarp *)skb_put(skb,sizeof(struct elapaarp));         
+       skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length);
+       eah             =       (struct elapaarp *)skb_put(skb, sizeof(struct elapaarp));        
        skb->protocol   =       htons(ETH_P_ATALK);
        skb->nh.raw     =       skb->h.raw = (void *) eah;
        skb->dev        =       dev;
@@ -208,7 +228,7 @@ static void aarp_send_reply(struct net_device *dev, struct at_addr *us, struct a
        eah->pa_src_net =       us->s_net;
        eah->pa_src_node=       us->s_node;
        
-       if(sha==NULL)
+       if (sha == NULL)
                memset(eah->hw_dst, '\0', ETH_ALEN);
        else
                memcpy(eah->hw_dst, sha, ETH_ALEN);
@@ -227,110 +247,110 @@ static void aarp_send_reply(struct net_device *dev, struct at_addr *us, struct a
         *      Send it.
         */     
        dev_queue_xmit(skb);
-       
 }
 
 /*
  *     Send probe frames. Called from aarp_probe_network and aarp_proxy_probe_network.
  */
+
 void aarp_send_probe(struct net_device *dev, struct at_addr *us)
 {
-       int len=dev->hard_header_len+sizeof(struct elapaarp)+aarp_dl->header_length;
-       struct sk_buff *skb=alloc_skb(len, GFP_ATOMIC);
+       int len = dev->hard_header_len + sizeof(struct elapaarp) + aarp_dl->header_length;
+       struct sk_buff *skb = alloc_skb(len, GFP_ATOMIC);
        struct elapaarp *eah;
-       static char aarp_eth_multicast[ETH_ALEN]={ 0x09, 0x00, 0x07, 0xFF, 0xFF, 0xFF };
-       
-       if(skb==NULL)
+       static char aarp_eth_multicast[ETH_ALEN] =
+               { 0x09, 0x00, 0x07, 0xFF, 0xFF, 0xFF };
+
+       if (skb == NULL)
                return;
-       
+
        /*
         *      Set up the buffer.
-        */             
+        */
 
-       skb_reserve(skb,dev->hard_header_len+aarp_dl->header_length);
-       eah             =       (struct elapaarp *)skb_put(skb,sizeof(struct elapaarp));
+       skb_reserve(skb, dev->hard_header_len + aarp_dl->header_length);
+       eah             =       (struct elapaarp *)skb_put(skb, sizeof(struct elapaarp));
        skb->protocol   =       htons(ETH_P_ATALK);
        skb->nh.raw     =       skb->h.raw = (void *) eah;
        skb->dev        =       dev;
-       
+
        /*
         *      Set up the ARP.
         */
-        
+
        eah->hw_type    =       htons(AARP_HW_TYPE_ETHERNET);
        eah->pa_type    =       htons(ETH_P_ATALK);
-       eah->hw_len     =       ETH_ALEN;       
+       eah->hw_len     =       ETH_ALEN;
        eah->pa_len     =       AARP_PA_ALEN;
        eah->function   =       htons(AARP_PROBE);
-       
+
        memcpy(eah->hw_src, dev->dev_addr, ETH_ALEN);
-       
+
        eah->pa_src_zero=       0;
        eah->pa_src_net =       us->s_net;
        eah->pa_src_node=       us->s_node;
-       
+
        memset(eah->hw_dst, '\0', ETH_ALEN);
-       
+
        eah->pa_dst_zero=       0;
        eah->pa_dst_net =       us->s_net;
        eah->pa_dst_node=       us->s_node;
-       
+
        /*
         *      Add ELAP headers and set target to the AARP multicast.
         */
-        
-       aarp_dl->datalink_header(aarp_dl, skb, aarp_eth_multicast);     
+
+       aarp_dl->datalink_header(aarp_dl, skb, aarp_eth_multicast);
 
        /*
         *      Send it.
-        */     
+        */
        dev_queue_xmit(skb);
-       
 }
        
 /*
  *     Handle an aarp timer expire
+ *
+ *     Must run under the aarp_lock.
  */
 
-static void aarp_expire_timer(struct aarp_entry **n)
+static void __aarp_expire_timer(struct aarp_entry **n)
 {
        struct aarp_entry *t;
-       while((*n)!=NULL)
-       {
+
+       while ((*n) != NULL) {
                /* Expired ? */
-               if(time_after(jiffies, (*n)->expires_at))
-               {
-                       t= *n;
-                       *n=(*n)->next;
-                       aarp_expire(t);
+               if(time_after(jiffies, (*n)->expires_at)) {
+                       t = *n;
+                       *n = (*n)->next;
+                       __aarp_expire(t);
+               } else {
+                       n = &((*n)->next);
                }
-               else
-                       n=&((*n)->next);
        }
 }
 
 /*
  *     Kick all pending requests 5 times a second.
+ *
+ *     Must run under the aarp_lock.
  */
  
-static void aarp_kick(struct aarp_entry **n)
+static void __aarp_kick(struct aarp_entry **n)
 {
        struct aarp_entry *t;
-       while((*n)!=NULL)
-       {
+
+       while ((*n) != NULL) {
                /* Expired - if this will be the 11th transmit, we delete
-                  instead */
-               if((*n)->xmit_count>=sysctl_aarp_retransmit_limit)
-               {
-                       t= *n;
-                       *n=(*n)->next;
-                       aarp_expire(t);
-               }
-               else
-               {
-                       aarp_send_query(*n);
-                       n=&((*n)->next);
+                * instead.
+                */
+               if ((*n)->xmit_count >= sysctl_aarp_retransmit_limit) {
+                       t = *n;
+                       *n = (*n)->next;
+                       __aarp_expire(t);
+               } else {
+                       __aarp_send_query(*n);
+                       n = &((*n)->next);
                }
        }
 }
@@ -338,21 +358,22 @@ static void aarp_kick(struct aarp_entry **n)
 /*
  *     A device has gone down. Take all entries referring to the device
  *     and remove them.
+ *
+ *     Must run under the aarp_lock.
  */
  
-static void aarp_expire_device(struct aarp_entry **n, struct net_device *dev)
+static void __aarp_expire_device(struct aarp_entry **n, struct net_device *dev)
 {
        struct aarp_entry *t;
-       while((*n)!=NULL)
-       {
-               if((*n)->dev==dev)
-               {
-                       t= *n;
-                       *n=(*n)->next;
-                       aarp_expire(t);
+
+       while ((*n) != NULL) {
+               if ((*n)->dev == dev) {
+                       t = *n;
+                       *n = (*n)->next;
+                       __aarp_expire(t);
+               } else {
+                       n = &((*n)->next);
                }
-               else
-                       n=&((*n)->next);
        }
 }
                
@@ -362,15 +383,19 @@ static void aarp_expire_device(struct aarp_entry **n, struct net_device *dev)
  
 static void aarp_expire_timeout(unsigned long unused)
 {
-       int ct=0;
-       for(ct=0;ct<AARP_HASH_SIZE;ct++)
-       {
-               aarp_expire_timer(&resolved[ct]);
-               aarp_kick(&unresolved[ct]);
-               aarp_expire_timer(&unresolved[ct]);
-               aarp_expire_timer(&proxies[ct]);
+       int ct;
+
+       spin_lock_bh(&aarp_lock);
+
+       for (ct = 0; ct < AARP_HASH_SIZE; ct++) {
+               __aarp_expire_timer(&resolved[ct]);
+               __aarp_kick(&unresolved[ct]);
+               __aarp_expire_timer(&unresolved[ct]);
+               __aarp_expire_timer(&proxies[ct]);
        }
 
+       spin_unlock_bh(&aarp_lock);
+
        mod_timer(&aarp_timer, jiffies + 
                  (unresolved_count ? sysctl_aarp_tick_time:
                   sysctl_aarp_expiry_time));
@@ -382,77 +407,92 @@ static void aarp_expire_timeout(unsigned long unused)
  
 static int aarp_device_event(struct notifier_block *this, unsigned long event, void *ptr)
 {
-       int ct=0;
-       if(event==NETDEV_DOWN)
-       {
-               for(ct=0;ct<AARP_HASH_SIZE;ct++)
-               {
-                       aarp_expire_device(&resolved[ct],ptr);
-                       aarp_expire_device(&unresolved[ct],ptr);
-                       aarp_expire_device(&proxies[ct],ptr);
+       int ct;
+
+       if (event == NETDEV_DOWN) {
+               spin_lock_bh(&aarp_lock);
+
+               for (ct = 0; ct < AARP_HASH_SIZE; ct++) {
+                       __aarp_expire_device(&resolved[ct], ptr);
+                       __aarp_expire_device(&unresolved[ct], ptr);
+                       __aarp_expire_device(&proxies[ct], ptr);
                }
+
+               spin_unlock_bh(&aarp_lock);
        }
        return NOTIFY_DONE;
 }
 
 /*
- *     Create a new aarp entry.
+ *     Create a new aarp entry.  This must use GFP_ATOMIC because it
+ *     runs while holding spinlocks.
  */
  
 static struct aarp_entry *aarp_alloc(void)
 {
-       struct aarp_entry *a=kmalloc(sizeof(struct aarp_entry), GFP_ATOMIC);
-       if(a==NULL)
+       struct aarp_entry *a = kmalloc(sizeof(struct aarp_entry), GFP_ATOMIC);
+
+       if (a == NULL)
                return NULL;
+
        skb_queue_head_init(&a->packet_queue);
+
        return a;
 }
 
 /*
  * Find an entry. We might return an expired but not yet purged entry. We
  * don't care as it will do no harm.
+ *
+ * This must run under the aarp_lock.
  */
-static struct aarp_entry *aarp_find_entry(struct aarp_entry *list, struct net_device *dev, struct at_addr *sat)
+static struct aarp_entry *__aarp_find_entry(struct aarp_entry *list,
+                                           struct net_device *dev,
+                                           struct at_addr *sat)
 {
-       unsigned long flags;
-       save_flags(flags);
-       cli();
-       while(list)
-       {
-               if(list->target_addr.s_net==sat->s_net &&
-                  list->target_addr.s_node==sat->s_node && list->dev==dev)
+       while (list) {
+               if (list->target_addr.s_net == sat->s_net &&
+                   list->target_addr.s_node == sat->s_node &&
+                   list->dev == dev)
                        break;
-               list=list->next;
+               list = list->next;
        }
-       restore_flags(flags);
+
        return list;
 }
 
+/* Called from the DDP code, and thus must be exported. */
 void aarp_proxy_remove(struct net_device *dev, struct at_addr *sa)
 {
        struct aarp_entry *a;
        int hash;
        
        hash =  sa->s_node % (AARP_HASH_SIZE-1);
-       a = aarp_find_entry(proxies[hash], dev, sa);
+
+       spin_lock_bh(&aarp_lock);
+
+       a = __aarp_find_entry(proxies[hash], dev, sa);
        if (a)
-       {
-               a->expires_at = 0;
-               
-       }
+               a->expires_at = jiffies - 1;
+
+       spin_unlock_bh(&aarp_lock);
 }
 
-struct at_addr* aarp_proxy_find(struct net_device *dev, struct at_addr *sa)
+/* This must run under aarp_lock. */
+static struct at_addr *__aarp_proxy_find(struct net_device *dev, struct at_addr *sa)
 {
+       struct at_addr *retval;
        struct aarp_entry *a;
        int hash;
 
        hash =  sa->s_node % (AARP_HASH_SIZE-1);
-       a = aarp_find_entry(proxies[hash], dev, sa);
+
+       retval = NULL;
+       a = __aarp_find_entry(proxies[hash], dev, sa);
        if (a != NULL)
-               return sa;
-       
-       return NULL;
+               retval = sa;
+
+       return retval;
 }
 
        
@@ -468,31 +508,27 @@ void aarp_send_probe_phase1(struct atalk_iface *iface)
     sa->sat_addr.s_node = iface->address.s_node;
     sa->sat_addr.s_net  = ntohs(iface->address.s_net);
 
-       /* We pass the Net:Node to the drivers/cards by a Device ioctl. */
-       if(!(iface->dev->do_ioctl(iface->dev, &atreq, SIOCSIFADDR)))
-    {
-       (void)iface->dev->do_ioctl(iface->dev, &atreq, SIOCGIFADDR);
-       if((iface->address.s_net != htons(sa->sat_addr.s_net))
-                               || (iface->address.s_node != sa->sat_addr.s_node))
-                       iface->status |= ATIF_PROBE_FAIL;
-
-               iface->address.s_net  = htons(sa->sat_addr.s_net);
-               iface->address.s_node = sa->sat_addr.s_node;
-       }
+    /* We pass the Net:Node to the drivers/cards by a Device ioctl. */
+    if (!(iface->dev->do_ioctl(iface->dev, &atreq, SIOCSIFADDR))) {
+           (void)iface->dev->do_ioctl(iface->dev, &atreq, SIOCGIFADDR);
+           if ((iface->address.s_net != htons(sa->sat_addr.s_net)) ||
+               (iface->address.s_node != sa->sat_addr.s_node))
+                   iface->status |= ATIF_PROBE_FAIL;
 
-       return;
+           iface->address.s_net  = htons(sa->sat_addr.s_net);
+           iface->address.s_node = sa->sat_addr.s_node;
+    }
 }
 
 
 void aarp_probe_network(struct atalk_iface *atif)
 {
-       if(atif->dev->type == ARPHRD_LOCALTLK || atif->dev->type == ARPHRD_PPP)
+       if(atif->dev->type == ARPHRD_LOCALTLK || atif->dev->type == ARPHRD_PPP) {
                aarp_send_probe_phase1(atif);
-       else
-       {
+       } else {
                unsigned int count;
-               for (count = 0; count < AARP_RETRANSMIT_LIMIT; count++)
-               {
+
+               for (count = 0; count < AARP_RETRANSMIT_LIMIT; count++) {
                        aarp_send_probe(atif->dev, &atif->address);
 
                        /*
@@ -511,17 +547,17 @@ int aarp_proxy_probe_network(struct atalk_iface *atif, struct at_addr *sa)
 {
        struct  aarp_entry      *entry;
        unsigned int count;
-       int     hash;
+       int     hash, retval;
        
        /*
         * we don't currently support LocalTalk or PPP for proxy AARP;
         * if someone wants to try and add it, have fun
         */
        if (atif->dev->type == ARPHRD_LOCALTLK)
-               return (-EPROTONOSUPPORT);
+               return -EPROTONOSUPPORT;
                
        if (atif->dev->type == ARPHRD_PPP)
-               return (-EPROTONOSUPPORT);
+               return -EPROTONOSUPPORT;
                
        /* 
         * create a new AARP entry with the flags set to be published -- 
@@ -529,7 +565,7 @@ int aarp_proxy_probe_network(struct atalk_iface *atif, struct at_addr *sa)
         */
        entry = aarp_alloc();
        if (entry == NULL)
-               return (-ENOMEM);
+               return -ENOMEM;
        
        entry->expires_at = -1;
        entry->status = ATIF_PROBE;
@@ -537,44 +573,46 @@ int aarp_proxy_probe_network(struct atalk_iface *atif, struct at_addr *sa)
        entry->target_addr.s_net = sa->s_net;
        entry->dev = atif->dev;
 
-       hash = sa->s_node % (AARP_HASH_SIZE-1);
+       spin_lock_bh(&aarp_lock);
+
+       hash = sa->s_node % (AARP_HASH_SIZE - 1);
        entry->next = proxies[hash];
        proxies[hash] = entry;
        
-       for(count = 0; count < AARP_RETRANSMIT_LIMIT; count++)
-       {
+       for (count = 0; count < AARP_RETRANSMIT_LIMIT; count++) {
                aarp_send_probe(atif->dev, sa);
 
                /*
                 * Defer 1/10th
                 */
                current->state = TASK_INTERRUPTIBLE;
+
+               spin_unlock_bh(&aarp_lock);
+
                schedule_timeout(HZ/10);
                                                
+               spin_lock_bh(&aarp_lock);
+
                if (entry->status & ATIF_PROBE_FAIL)
                        break;
        }
        
-       /*
-        * FIX ME: I think we need exclusive access to the status flags,
-        *              in case some one fails the probe while we're removing
-        *              the probe flag.
-        */
-       if (entry->status & ATIF_PROBE_FAIL)
-       {
+       retval = 1;
+
+       if (entry->status & ATIF_PROBE_FAIL) {
                /* free the entry */
-               entry->expires_at = 0;
+               entry->expires_at = jiffies - 1;
                
                /* return network full */
-               return (-EADDRINUSE);
-       }
-       else
-       {
+               retval = -EADDRINUSE;
+       } else {
                /* clear the probing flag */
                entry->status &= ~ATIF_PROBE;
        }
 
-       return 1;       
+       spin_unlock_bh(&aarp_lock);
+
+       return retval;
 }
 
 
@@ -583,23 +621,21 @@ int aarp_proxy_probe_network(struct atalk_iface *atif, struct at_addr *sa)
  */
 int aarp_send_ddp(struct net_device *dev,struct sk_buff *skb, struct at_addr *sa, void *hwaddr)
 {
-       static char ddp_eth_multicast[ETH_ALEN]={ 0x09, 0x00, 0x07, 0xFF, 0xFF, 0xFF };
+       static char ddp_eth_multicast[ETH_ALEN] = { 0x09, 0x00, 0x07, 0xFF, 0xFF, 0xFF };
        int hash;
        struct aarp_entry *a;
-       unsigned long flags;
        
-       skb->nh.raw=skb->data;
+       skb->nh.raw = skb->data;
        
        /*
         *      Check for LocalTalk first
         */
         
         
-       if(dev->type==ARPHRD_LOCALTLK)
-       {
-               struct at_addr *at=atalk_find_dev_addr(dev);
-               struct ddpehdr *ddp=(struct ddpehdr *)skb->data;
-               int ft=2;
+       if (dev->type == ARPHRD_LOCALTLK) {
+               struct at_addr *at = atalk_find_dev_addr(dev);
+               struct ddpehdr *ddp = (struct ddpehdr *)skb->data;
+               int ft = 2;
                
                /*
                 *      Compressible ?
@@ -608,29 +644,29 @@ int aarp_send_ddp(struct net_device *dev,struct sk_buff *skb, struct at_addr *sa
                 *      (zero matches anything)
                 */
                 
-               if( ( ddp->deh_snet==0 || at->s_net==ddp->deh_snet)
-                 &&( ddp->deh_dnet==0 || at->s_net==ddp->deh_dnet) )
-               {
-                       skb_pull(skb,sizeof(struct ddpehdr)-4);
+               if( ( ddp->deh_snet==0 || at->s_net==ddp->deh_snet) &&
+                   ( ddp->deh_dnet==0 || at->s_net==ddp->deh_dnet) ) {
+                       skb_pull(skb, sizeof(struct ddpehdr) - 4);
+
                        /*
                         *      The upper two remaining bytes are the port 
                         *      numbers we just happen to need. Now put the 
                         *      length in the lower two.
                         */
-                       *((__u16 *)skb->data)=htons(skb->len);
-                       ft=1;
+                       *((__u16 *)skb->data) = htons(skb->len);
+                       ft = 1;
                }
                /*
                 *      Nice and easy. No AARP type protocols occur here
                 *      so we can just shovel it out with a 3 byte LLAP header
                 */
                 
-               skb_push(skb,3);
-               skb->data[0]=sa->s_node;
-               skb->data[1]=at->s_node;
-               skb->data[2]=ft;
+               skb_push(skb, 3);
+               skb->data[0] = sa->s_node;
+               skb->data[1] = at->s_node;
+               skb->data[2] = ft;
                 
-               if(skb->sk)
+               if (skb->sk)
                        skb->priority = skb->sk->priority;
                skb->dev = dev;
                dev_queue_xmit(skb);
@@ -640,10 +676,9 @@ int aarp_send_ddp(struct net_device *dev,struct sk_buff *skb, struct at_addr *sa
        /*
         *      On a PPP link we neither compress nor aarp.
         */
-       if(dev->type==ARPHRD_PPP)
-       {
+       if (dev->type == ARPHRD_PPP) {
                skb->protocol = htons(ETH_P_PPPTALK);
-               if(skb->sk)
+               if (skb->sk)
                        skb->priority = skb->sk->priority;
                skb->dev = dev;
                dev_queue_xmit(skb);
@@ -654,44 +689,43 @@ int aarp_send_ddp(struct net_device *dev,struct sk_buff *skb, struct at_addr *sa
         *      Non ELAP we cannot do.
         */
 
-       if(dev->type!=ARPHRD_ETHER)
-       {
+       if (dev->type != ARPHRD_ETHER)
                return -1;
-       }
 
        skb->dev = dev;
        skb->protocol = htons(ETH_P_ATALK);
                        
-       hash=sa->s_node%(AARP_HASH_SIZE-1);
-       save_flags(flags);
-       cli();
+       hash = sa->s_node % (AARP_HASH_SIZE - 1);
        
        /*
         *      Do we have a resolved entry ?
         */
         
-       if(sa->s_node==ATADDR_BCAST)
-       {
+       if (sa->s_node == ATADDR_BCAST) {
                ddp_dl->datalink_header(ddp_dl, skb, ddp_eth_multicast);
-               if(skb->sk)
+
+               if (skb->sk)
                        skb->priority = skb->sk->priority;
                dev_queue_xmit(skb);
-               restore_flags(flags);
                return 1;
        }
-       a=aarp_find_entry(resolved[hash],dev,sa);
-       if(a!=NULL)
-       {
+
+       spin_lock_bh(&aarp_lock);
+
+       a = __aarp_find_entry(resolved[hash], dev, sa);
+
+       if (a != NULL) {
                /*
                 *      Return 1 and fill in the address
                 */
 
-               a->expires_at=jiffies+sysctl_aarp_expiry_time*10;
+               a->expires_at = jiffies + (sysctl_aarp_expiry_time * 10);
                ddp_dl->datalink_header(ddp_dl, skb, a->hwaddr);
                if(skb->sk)
                        skb->priority = skb->sk->priority;
                dev_queue_xmit(skb);
-               restore_flags(flags);
+
+               spin_unlock_bh(&aarp_lock);
                return 1;
        }
 
@@ -699,15 +733,15 @@ int aarp_send_ddp(struct net_device *dev,struct sk_buff *skb, struct at_addr *sa
         *      Do we have an unresolved entry: This is the less common path
         */
 
-       a=aarp_find_entry(unresolved[hash],dev,sa);
-       if(a!=NULL)
-       {
+       a = __aarp_find_entry(unresolved[hash], dev, sa);
+       if (a != NULL) {
                /*
                 *      Queue onto the unresolved queue
                 */
 
                skb_queue_tail(&a->packet_queue, skb);
-               restore_flags(flags);
+
+               spin_unlock_bh(&aarp_lock);
                return 0;
        }
 
@@ -715,14 +749,13 @@ int aarp_send_ddp(struct net_device *dev,struct sk_buff *skb, struct at_addr *sa
         *      Allocate a new entry
         */
 
-       a=aarp_alloc();
-       if(a==NULL)
-       {
+       a = aarp_alloc();
+       if (a == NULL) {
                /*
                 *      Whoops slipped... good job it's an unreliable 
                 *      protocol 8)     
                 */
-               restore_flags(flags);
+               spin_unlock_bh(&aarp_lock);
                return -1;
        }
 
@@ -731,30 +764,34 @@ int aarp_send_ddp(struct net_device *dev,struct sk_buff *skb, struct at_addr *sa
         */
 
        skb_queue_tail(&a->packet_queue, skb);
-       a->expires_at=jiffies+sysctl_aarp_resolve_time;
-       a->dev=dev;
-       a->next=unresolved[hash];
-       a->target_addr= *sa;
-       a->xmit_count=0;
-       unresolved[hash]=a;
+       a->expires_at = jiffies + sysctl_aarp_resolve_time;
+       a->dev = dev;
+       a->next = unresolved[hash];
+       a->target_addr = *sa;
+       a->xmit_count = 0;
+       unresolved[hash] = a;
        unresolved_count++;
-       restore_flags(flags);
 
        /*
         *      Send an initial request for the address
         */
 
-       aarp_send_query(a);
+       __aarp_send_query(a);
 
        /*
         *      Switch to fast timer if needed (That is if this is the
         *      first unresolved entry to get added)
         */
 
-       if(unresolved_count==1)
-       {
+       if (unresolved_count == 1)
                mod_timer(&aarp_timer, jiffies + sysctl_aarp_tick_time);
-       }
+
+
+       /*
+        *      Now finally, it is safe to drop the lock.
+        */
+
+       spin_unlock_bh(&aarp_lock);
 
        /*
         *      Tell the ddp layer we have taken over for this frame.
@@ -766,39 +803,40 @@ int aarp_send_ddp(struct net_device *dev,struct sk_buff *skb, struct at_addr *sa
 /*
  *     An entry in the aarp unresolved queue has become resolved. Send
  *     all the frames queued under it.
+ *
+ *     Must run under aarp_lock.
  */
-static void aarp_resolved(struct aarp_entry **list, struct aarp_entry *a, int hash)
+static void __aarp_resolved(struct aarp_entry **list, struct aarp_entry *a, int hash)
 {
        struct sk_buff *skb;
-       while(*list!=NULL)
-       {
-               if(*list==a)
-               {
+
+       while (*list != NULL) {
+               if (*list == a) {
                        unresolved_count--;
-                       *list=a->next;
-                       
+
+                       *list = a->next;
+
                        /* 
                         *      Move into the resolved list 
                         */
-                        
-                       a->next=resolved[hash];
-                       resolved[hash]=a;
-                       
+
+                       a->next = resolved[hash];
+                       resolved[hash] = a;
+
                        /*
                         *      Kick frames off 
                         */
-                        
-                       while((skb=skb_dequeue(&a->packet_queue))!=NULL)
-                       {
-                               a->expires_at=jiffies+sysctl_aarp_expiry_time*10;
-                               ddp_dl->datalink_header(ddp_dl,skb,a->hwaddr);
-                               if(skb->sk)
+
+                       while ((skb = skb_dequeue(&a->packet_queue)) != NULL) {
+                               a->expires_at = jiffies + (sysctl_aarp_expiry_time*10);
+                               ddp_dl->datalink_header(ddp_dl, skb, a->hwaddr);
+                               if (skb->sk)
                                        skb->priority = skb->sk->priority;
                                dev_queue_xmit(skb);
                        }
+               } else {
+                       list = &((*list)->next);
                }
-               else
-                       list=&((*list)->next);
        }
 }
 
@@ -811,138 +849,129 @@ static int aarp_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_t
        struct elapaarp *ea=(struct elapaarp *)skb->h.raw;
        struct aarp_entry *a;
        struct at_addr sa, *ma, da;
-       unsigned long flags;
        int hash;
        struct atalk_iface *ifa;
-       
-       
+
        /*
-        *      We only do Ethernet SNAP AARP
+        *      We only do Ethernet SNAP AARP.
         */
-        
-       if(dev->type!=ARPHRD_ETHER)
-       {
+
+       if (dev->type != ARPHRD_ETHER) {
                kfree_skb(skb);
                return 0;
        }
-       
+
        /*
         *      Frame size ok ?
         */
-        
-       if(!skb_pull(skb,sizeof(*ea)))
-       {
+
+       if (!skb_pull(skb, sizeof(*ea))) {
                kfree_skb(skb);
                return 0;
        }
 
-       ea->function=ntohs(ea->function);
-       
+       ea->function = ntohs(ea->function);
+
        /*
         *      Sanity check fields.
         */
-        
-       if(ea->function<AARP_REQUEST || ea->function > AARP_PROBE || ea->hw_len != ETH_ALEN || ea->pa_len != AARP_PA_ALEN ||
-               ea->pa_src_zero != 0 || ea->pa_dst_zero != 0)
-       {
+
+       if (ea->function < AARP_REQUEST ||
+           ea->function > AARP_PROBE ||
+           ea->hw_len != ETH_ALEN ||
+           ea->pa_len != AARP_PA_ALEN ||
+           ea->pa_src_zero != 0 ||
+           ea->pa_dst_zero != 0) {
                kfree_skb(skb);
                return 0;
        }
-       
-       /*
-        *      Looks good
-        */
-       
-       hash=ea->pa_src_node%(AARP_HASH_SIZE-1);
 
        /*
-        *      Build an address
+        *      Looks good.
         */
-        
-       sa.s_node=ea->pa_src_node;
-       sa.s_net=ea->pa_src_net;
-       
+
+       hash = ea->pa_src_node % (AARP_HASH_SIZE - 1);
+
        /*
-        *      Process the packet
+        *      Build an address.
         */
-        
-       save_flags(flags);
+
+       sa.s_node = ea->pa_src_node;
+       sa.s_net = ea->pa_src_net;
 
        /*
-        *      Check for replies of me
+        *      Process the packet.
+        *      Check for replies of me.
         */
-                       
-       ifa=atalk_find_dev(dev);
-       if(ifa==NULL)
-       {
-               restore_flags(flags);
+
+       ifa = atalk_find_dev(dev);
+       if (ifa == NULL) {
                kfree_skb(skb);
-               return 1;               
+               return 1;
        }
-       if(ifa->status&ATIF_PROBE)
-       {                       
-               if(ifa->address.s_node==ea->pa_dst_node && ifa->address.s_net==ea->pa_dst_net)
-               {
+
+       if (ifa->status & ATIF_PROBE) {
+               if (ifa->address.s_node == ea->pa_dst_node &&
+                   ifa->address.s_net == ea->pa_dst_net) {
                        /*
                         *      Fail the probe (in use)
                         */
-                        
-                       ifa->status|=ATIF_PROBE_FAIL;
-                       restore_flags(flags);
+
+                       ifa->status |= ATIF_PROBE_FAIL;
                        kfree_skb(skb);
-                       return 1;               
+                       return 1;
                }
        }
-       
+
        /*
         * Check for replies of proxy AARP entries
         */
 
-       /*
-        * FIX ME: do we need a cli() here? 
-        * aarp_find_entry does one on its own, between saving and restoring flags, so
-        * I don't think it is necessary, but I could be wrong -- it's happened before
-        */
        da.s_node = ea->pa_dst_node;
        da.s_net = ea->pa_dst_net;
-       a = aarp_find_entry(proxies[hash], dev, &da);
-       if (a != NULL)
-               if (a->status & ATIF_PROBE)
-               {
+
+       spin_lock_bh(&aarp_lock);
+
+       a = __aarp_find_entry(proxies[hash], dev, &da);
+
+       if (a != NULL) {
+               if (a->status & ATIF_PROBE) {
                        a->status |= ATIF_PROBE_FAIL;
-                       
+
+                       spin_unlock_bh(&aarp_lock);
+
                        /*
-                        * we do not respond to probe or request packets for 
+                        * we do not respond to probe or request packets for
                         * this address while we are probing this address
                         */
-                       restore_flags(flags);
                        kfree_skb(skb);
+
                        return 1;
                }
+       }
 
-       switch(ea->function)
-       {
+       switch (ea->function) {
                case AARP_REPLY:        
-                       if(unresolved_count==0) /* Speed up */
+                       if (unresolved_count == 0)      /* Speed up */
                                break;
+
                        /*
-                        *      Find the entry  
+                        *      Find the entry.
                         */
                         
-                       cli();  /* FIX ME: is this cli() necessary? aarp_find_entry does one on its own... */
-                       if((a=aarp_find_entry(unresolved[hash],dev,&sa))==NULL || dev != a->dev)
+                       if ((a = __aarp_find_entry(unresolved[hash],dev,&sa)) == NULL ||
+                           (dev != a->dev))
                                break;
+
                        /*
-                        *      We can fill one in - this is good
+                        *      We can fill one in - this is good.
                         */
                         
                        memcpy(a->hwaddr,ea->hw_src,ETH_ALEN);
-                       aarp_resolved(&unresolved[hash],a,hash);
-                       if(unresolved_count==0)
-                       {
-                               mod_timer(&aarp_timer, jiffies +
-                                         sysctl_aarp_expiry_time);
-                       }
+                       __aarp_resolved(&unresolved[hash],a,hash);
+                       if (unresolved_count == 0)
+                               mod_timer(&aarp_timer,
+                                         jiffies + sysctl_aarp_expiry_time);
                        break;
                        
                case AARP_REQUEST:
@@ -956,100 +985,101 @@ static int aarp_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_t
                         *      of our proxies before we toss the packet out.
                         */
                         
-                       sa.s_node=ea->pa_dst_node;
-                       sa.s_net=ea->pa_dst_net;
+                       sa.s_node = ea->pa_dst_node;
+                       sa.s_net = ea->pa_dst_net;
 
                        /*
-                        * see if we have a matching proxy
+                        * See if we have a matching proxy.
                         */
-                       ma = aarp_proxy_find(dev, &sa);
-                       if (!ma)
-                       {
-                               ma=&ifa->address;
-                       }
-                       else
-                       {
+                       ma = __aarp_proxy_find(dev, &sa);
+                       if (!ma) {
+                               ma = &ifa->address;
+                       } else {
                                /*
-                                * we need to make a copy of the entry
+                                * We need to make a copy of the entry.
                                 */
                                da.s_node = sa.s_node;
                                da.s_net = da.s_net;
                                ma = &da;
                        }
 
-                       if(ea->function==AARP_PROBE)
-                       {
+                       if (ea->function == AARP_PROBE) {
                                /* A probe implies someone trying to get an
-                                  address. So as a precaution flush any
-                                  entries we have for this address */
-                               struct aarp_entry *a=aarp_find_entry(
+                                * address. So as a precaution flush any
+                                * entries we have for this address.
+                                */
+                               struct aarp_entry *a = __aarp_find_entry(
                                                resolved[sa.s_node%(AARP_HASH_SIZE-1)],
                                                skb->dev,
                                                &sa);
                                /* Make it expire next tick - that avoids us
-                                  getting into a probe/flush/learn/probe/flush/learn
-                                  cycle during probing of a slow to respond host addr */
-                               if(a!=NULL)
-                                       a->expires_at=jiffies-1;
+                                * getting into a probe/flush/learn/probe/flush/learn
+                                * cycle during probing of a slow to respond host addr.
+                                */
+                               if (a != NULL)
+                                       a->expires_at = jiffies - 1;
                        }
-                       if(sa.s_node!=ma->s_node)
+
+                       if (sa.s_node != ma->s_node)
                                break;
-                       if(sa.s_net && ma->s_net && sa.s_net!=ma->s_net)
+
+                       if (sa.s_net && ma->s_net && sa.s_net != ma->s_net)
                                break;
 
-                       sa.s_node=ea->pa_src_node;
-                       sa.s_net=ea->pa_src_net;
+                       sa.s_node = ea->pa_src_node;
+                       sa.s_net = ea->pa_src_net;
                        
                        /*
                         *      aarp_my_address has found the address to use for us.
                         */
                         
-                       aarp_send_reply(dev,ma,&sa,ea->hw_src);
+                       aarp_send_reply(dev, ma, &sa, ea->hw_src);
                        break;
-       }
-       restore_flags(flags);
+       };
+
+       spin_unlock_bh(&aarp_lock);
+
        kfree_skb(skb);
-       return 1;               
+       return 1;
 }
 
-static struct notifier_block aarp_notifier={
+static struct notifier_block aarp_notifier = {
        aarp_device_event,
        NULL,
        0
 };
 
-static char aarp_snap_id[]={0x00,0x00,0x00,0x80,0xF3};
+static char aarp_snap_id[] = { 0x00, 0x00, 0x00, 0x80, 0xF3 };
 
 
 void __init aarp_proto_init(void)
 {
-       if((aarp_dl=register_snap_client(aarp_snap_id, aarp_rcv))==NULL)
+       if ((aarp_dl = register_snap_client(aarp_snap_id, aarp_rcv)) == NULL)
                printk(KERN_CRIT "Unable to register AARP with SNAP.\n");
        init_timer(&aarp_timer);
-       aarp_timer.function=aarp_expire_timeout;
-       aarp_timer.data=0;
-       aarp_timer.expires=jiffies+sysctl_aarp_expiry_time;
+       aarp_timer.function = aarp_expire_timeout;
+       aarp_timer.data = 0;
+       aarp_timer.expires = jiffies + sysctl_aarp_expiry_time;
        add_timer(&aarp_timer);
        register_netdevice_notifier(&aarp_notifier);
 }
 
-
-
 /*
  * Remove the AARP entries associated with a device.
  */
 void aarp_device_down(struct net_device *dev)
 {
-       int ct = 0;
+       int ct;
+
+       spin_lock_bh(&aarp_lock);
 
-       for(ct = 0; ct < AARP_HASH_SIZE; ct++)
-       {
-               aarp_expire_device(&resolved[ct], dev);
-               aarp_expire_device(&unresolved[ct], dev);
-               aarp_expire_device(&proxies[ct], dev);
+       for (ct = 0; ct < AARP_HASH_SIZE; ct++) {
+               __aarp_expire_device(&resolved[ct], dev);
+               __aarp_expire_device(&unresolved[ct], dev);
+               __aarp_expire_device(&proxies[ct], dev);
        }
 
-       return;
+       spin_unlock_bh(&aarp_lock);
 }
 
 /*
@@ -1064,10 +1094,11 @@ static int aarp_get_info(char *buffer, char **start, off_t offset, int length)
        len = sprintf(buffer,
                "%-10.10s  ""%-10.10s""%-18.18s""%12.12s""%12.12s"" xmit_count  status\n",
                "address","device","hw addr","last_sent", "expires");
-       for (ct = 0; ct < AARP_HASH_SIZE; ct++)
-       {
-               for (entry = resolved[ct]; entry; entry = entry->next)
-               {
+
+       spin_lock_bh(&aarp_lock);
+
+       for (ct = 0; ct < AARP_HASH_SIZE; ct++) {
+               for (entry = resolved[ct]; entry; entry = entry->next) {
                        len+= sprintf(buffer+len,"%6u:%-3u  ",
                                (unsigned int)ntohs(entry->target_addr.s_net),
                                (unsigned int)(entry->target_addr.s_node));
@@ -1090,10 +1121,8 @@ static int aarp_get_info(char *buffer, char **start, off_t offset, int length)
                }
        }
 
-       for (ct = 0; ct < AARP_HASH_SIZE; ct++)
-       {
-               for (entry = unresolved[ct]; entry; entry = entry->next)
-               {
+       for (ct = 0; ct < AARP_HASH_SIZE; ct++) {
+               for (entry = unresolved[ct]; entry; entry = entry->next) {
                        len+= sprintf(buffer+len,"%6u:%-3u  ",
                                (unsigned int)ntohs(entry->target_addr.s_net),
                                (unsigned int)(entry->target_addr.s_node));
@@ -1115,10 +1144,8 @@ static int aarp_get_info(char *buffer, char **start, off_t offset, int length)
                }
        }
 
-       for (ct = 0; ct < AARP_HASH_SIZE; ct++)
-       {
-               for (entry = proxies[ct]; entry; entry = entry->next)
-               {
+       for (ct = 0; ct < AARP_HASH_SIZE; ct++) {
+               for (entry = proxies[ct]; entry; entry = entry->next) {
                        len+= sprintf(buffer+len,"%6u:%-3u  ",
                                (unsigned int)ntohs(entry->target_addr.s_net),
                                (unsigned int)(entry->target_addr.s_node));
@@ -1140,6 +1167,7 @@ static int aarp_get_info(char *buffer, char **start, off_t offset, int length)
                }
        }
 
+       spin_unlock_bh(&aarp_lock);
 
        return len;
 }
index 2c576f4629722f41d25514191eae52febe136f2c..80fc635f27f4b26d4aebfea65d635b4bd7c0e0b3 100644 (file)
@@ -71,6 +71,7 @@
 #include <linux/etherdevice.h>
 #include <linux/if_arp.h>
 #include <linux/skbuff.h>
+#include <linux/spinlock.h>
 #include <linux/termios.h>     /* For TIOCOUTQ/INQ */
 #include <net/datalink.h>
 #include <net/p8022.h>
@@ -118,49 +119,50 @@ static struct proto_ops atalk_dgram_ops;
 *                                                                          *
 \**************************************************************************/
 
-static struct sock *atalk_socket_list = NULL;
+static struct sock *atalk_sockets = NULL;
+static spinlock_t atalk_sockets_lock = SPIN_LOCK_UNLOCKED;
 
-/*
- * Note: Sockets may not be removed _during_ an interrupt or inet_bh
- * handler using this technique. They can be added although we do not
- * use this facility.
- */
-
-extern inline void atalk_remove_socket(struct sock *sk)
+extern inline void atalk_insert_socket(struct sock *sk)
 {
-       sklist_remove_socket(&atalk_socket_list,sk);
+       spin_lock_bh(&atalk_sockets_lock);
+       if ((sk->next = atalk_sockets) != NULL)
+               atalk_sockets->pprev = &sk->next;
+       atalk_sockets = sk;
+       sk->pprev = &atalk_sockets;
+       spin_unlock_bh(&atalk_sockets_lock);
 }
 
-extern inline void atalk_insert_socket(struct sock *sk)
+extern inline void atalk_remove_socket(struct sock *sk)
 {
-       sklist_insert_socket(&atalk_socket_list,sk);
+       spin_lock_bh(&atalk_sockets_lock);
+       if (sk->pprev != NULL) {
+               if (sk->next)
+                       sk->next->pprev = sk->pprev;
+               *sk->pprev = sk->next;
+               sk->pprev = NULL;
+       }
+       spin_unlock_bh(&atalk_sockets_lock);
 }
 
 static struct sock *atalk_search_socket(struct sockaddr_at *to, struct atalk_iface *atif)
 {
        struct sock *s;
 
-       for(s = atalk_socket_list; s != NULL; s = s->next)
-       {
-               if(to->sat_port != s->protinfo.af_at.src_port)
-               {
+       spin_lock_bh(&atalk_sockets_lock);
+       for (s = atalk_sockets; s != NULL; s = s->next) {
+               if (to->sat_port != s->protinfo.af_at.src_port)
                        continue;
-               }
 
-               if(to->sat_addr.s_net == ATADDR_ANYNET
-                       && to->sat_addr.s_node == ATADDR_BCAST
-                       && s->protinfo.af_at.src_net == atif->address.s_net)
-               {
+               if (to->sat_addr.s_net == ATADDR_ANYNET &&
+                   to->sat_addr.s_node == ATADDR_BCAST &&
+                   s->protinfo.af_at.src_net == atif->address.s_net)
                        break;
-               }
 
-               if(to->sat_addr.s_net == s->protinfo.af_at.src_net
-                       && (to->sat_addr.s_node == s->protinfo.af_at.src_node
-                       || to->sat_addr.s_node == ATADDR_BCAST
-                       || to->sat_addr.s_node == ATADDR_ANYNODE))
-               {
+               if (to->sat_addr.s_net == s->protinfo.af_at.src_net &&
+                   (to->sat_addr.s_node == s->protinfo.af_at.src_node ||
+                    to->sat_addr.s_node == ATADDR_BCAST ||
+                    to->sat_addr.s_node == ATADDR_ANYNODE))
                        break;
-               }
 
                /* XXXX.0 -- we got a request for this router. make sure
                 * that the node is appropriately set. */
@@ -171,44 +173,80 @@ static struct sock *atalk_search_socket(struct sockaddr_at *to, struct atalk_ifa
                        break; 
                }
        }
+       spin_unlock_bh(&atalk_sockets_lock);
 
-       return (s);
+       return s;
 }
 
 /*
- * Find a socket in the list.
+ * Try to find a socket matching ADDR in the socket list,
+ * if found then return it.  If not, insert SK into the
+ * socket list.
+ *
+ * This entire operation must execute atomically.
  */
-static struct sock *atalk_find_socket(struct sockaddr_at *sat)
+static struct sock *atalk_find_or_insert_socket(struct sock *sk, struct sockaddr_at *sat)
 {
        struct sock *s;
 
-       for(s = atalk_socket_list; s != NULL; s = s->next)
-       {
-               if(s->protinfo.af_at.src_net != sat->sat_addr.s_net)
-               {
-                       continue;
-               }
-
-               if(s->protinfo.af_at.src_node != sat->sat_addr.s_node)
-               {
-                       continue;
-               }
+       spin_lock_bh(&atalk_sockets_lock);
 
-               if(s->protinfo.af_at.src_port != sat->sat_port)
-               {
-                       continue;
-               }
+       for (s = atalk_sockets; s != NULL; s = s->next) {
+               if (s->protinfo.af_at.src_net == sat->sat_addr.s_net &&
+                   s->protinfo.af_at.src_node == sat->sat_addr.s_node &&
+                   s->protinfo.af_at.src_port == sat->sat_port)
+                       break;
+       }
 
-               break;
+       if (!s) {
+               /* Wheee, it's free, assign and insert. */
+               if ((sk->next = atalk_sockets) != NULL)
+                       atalk_sockets->pprev = &sk->next;
+               atalk_sockets = sk;
+               sk->pprev = &atalk_sockets;
        }
 
-       return (s);
+       spin_unlock_bh(&atalk_sockets_lock);
+
+       return s;
+}
+
+static void atalk_destroy_timer(unsigned long data)
+{
+       struct sock *sk = (struct sock *) data;
+
+       if (atomic_read(&sk->wmem_alloc) == 0 &&
+           atomic_read(&sk->rmem_alloc) == 0 &&
+           sk->dead) {
+               sock_put(sk);
+               MOD_DEC_USE_COUNT;
+       } else {
+               sk->timer.expires = jiffies + SOCK_DESTROY_TIME;
+               add_timer(&sk->timer);
+       }
 }
 
 extern inline void atalk_destroy_socket(struct sock *sk)
 {
-       sklist_destroy_socket(&atalk_socket_list, sk);
-       MOD_DEC_USE_COUNT;
+       struct sk_buff *skb;
+
+       atalk_remove_socket(sk);
+
+       while ((skb = skb_dequeue(&sk->receive_queue)) != NULL)
+               kfree_skb(skb);
+
+       if (atomic_read(&sk->wmem_alloc) == 0 &&
+           atomic_read(&sk->rmem_alloc) == 0 &&
+           sk->dead) {
+               sock_put(sk);
+               MOD_DEC_USE_COUNT;
+       } else {
+               init_timer(&sk->timer);
+               sk->timer.expires = jiffies + SOCK_DESTROY_TIME;
+               sk->timer.function = atalk_destroy_timer;
+               sk->timer.data = (unsigned long) sk;
+               add_timer(&sk->timer);
+       }
 }
 
 /*
@@ -217,51 +255,52 @@ extern inline void atalk_destroy_socket(struct sock *sk)
 static int atalk_get_info(char *buffer, char **start, off_t offset, int length)
 {
        struct sock *s;
-       int len=0;
-       off_t pos=0;
-       off_t begin=0;
+       int len = 0;
+       off_t pos = 0;
+       off_t begin = 0;
 
        /*
         * Output the AppleTalk data for the /proc filesystem.
         */
 
        len += sprintf(buffer,"Type local_addr  remote_addr tx_queue rx_queue st uid\n");
-       for(s = atalk_socket_list; s != NULL; s = s->next)
-       {
+
+       spin_lock_bh(&atalk_sockets_lock);
+       for (s = atalk_sockets; s != NULL; s = s->next) {
                len += sprintf(buffer+len,"%02X   ", s->type);
                len += sprintf(buffer+len,"%04X:%02X:%02X  ",
-                       ntohs(s->protinfo.af_at.src_net),
-                       s->protinfo.af_at.src_node,
-                       s->protinfo.af_at.src_port);
+                              ntohs(s->protinfo.af_at.src_net),
+                              s->protinfo.af_at.src_node,
+                              s->protinfo.af_at.src_port);
                len += sprintf(buffer+len,"%04X:%02X:%02X  ",
-                       ntohs(s->protinfo.af_at.dest_net),
-                       s->protinfo.af_at.dest_node,
-                       s->protinfo.af_at.dest_port);
+                              ntohs(s->protinfo.af_at.dest_net),
+                              s->protinfo.af_at.dest_node,
+                              s->protinfo.af_at.dest_port);
                len += sprintf(buffer+len,"%08X:%08X ",
-                       atomic_read(&s->wmem_alloc),
-                       atomic_read(&s->rmem_alloc));
+                              atomic_read(&s->wmem_alloc),
+                              atomic_read(&s->rmem_alloc));
                len += sprintf(buffer+len,"%02X %d\n", s->state, 
-                       SOCK_INODE(s->socket)->i_uid);
+                              SOCK_INODE(s->socket)->i_uid);
 
                /* Are we still dumping unwanted data then discard the record */
                pos = begin + len;
 
-               if(pos < offset)
-               {
+               if (pos < offset) {
                        len = 0;        /* Keep dumping into the buffer start */
                        begin = pos;
                }
-               if(pos > offset + length)       /* We have dumped enough */
+               if (pos > offset + length)      /* We have dumped enough */
                        break;
        }
+       spin_lock_bh(&atalk_sockets_lock);
 
        /* The data in question runs from begin to begin+len */
        *start = buffer + (offset - begin);     /* Start of wanted data */
        len -= (offset - begin);   /* Remove unwanted header data from length */
-       if(len > length)
+       if (len > length)
                len = length;      /* Remove unwanted tail data from length */
 
-       return (len);
+       return len;
 }
 
 /**************************************************************************\
@@ -270,8 +309,13 @@ static int atalk_get_info(char *buffer, char **start, off_t offset, int length)
 *                                                                          *
 \**************************************************************************/
 
+/* Anti-deadlock ordering is router_lock --> iface_lock -DaveM */
 static struct atalk_route *atalk_router_list = NULL;
+static rwlock_t atalk_router_lock = RW_LOCK_UNLOCKED;
+
 static struct atalk_iface *atalk_iface_list  = NULL;
+static spinlock_t atalk_iface_lock = SPIN_LOCK_UNLOCKED;
+
 static struct atalk_route atrtr_default; /* For probing devices or in a routerless network */
 
 /*
@@ -287,43 +331,40 @@ static void atif_drop_device(struct net_device *dev)
        struct atalk_iface **iface = &atalk_iface_list;
        struct atalk_iface *tmp;
 
-       while((tmp = *iface) != NULL)
-       {
-               if(tmp->dev == dev)
-               {
+       spin_lock_bh(&atalk_iface_lock);
+       while ((tmp = *iface) != NULL) {
+               if (tmp->dev == dev) {
                        *iface = tmp->next;
                        kfree_s(tmp, sizeof(struct atalk_iface));
-                       dev->atalk_ptr=NULL;
+                       dev->atalk_ptr = NULL;
                        MOD_DEC_USE_COUNT;
-               }
-               else
+               } else
                        iface = &tmp->next;
        }
-
+       spin_unlock_bh(&atalk_iface_lock);
 }
 
 static struct atalk_iface *atif_add_device(struct net_device *dev, struct at_addr *sa)
 {
        struct atalk_iface *iface = (struct atalk_iface *)
                kmalloc(sizeof(*iface), GFP_KERNEL);
-       unsigned long flags;
 
-       if(iface==NULL)
-               return (NULL);
+       if (iface == NULL)
+               return NULL;
+
+       iface->dev = dev;
+       dev->atalk_ptr = iface;
+       iface->address = *sa;
+       iface->status = 0;
 
-       iface->dev=dev;
-       dev->atalk_ptr=iface;
-       iface->address= *sa;
-       iface->status=0;
-       save_flags(flags);
-       cli();
-       iface->next=atalk_iface_list;
-       atalk_iface_list=iface;
-       restore_flags(flags);
+       spin_lock_bh(&atalk_iface_lock);
+       iface->next = atalk_iface_list;
+       atalk_iface_list = iface;
+       spin_unlock_bh(&atalk_iface_lock);
 
        MOD_INC_USE_COUNT;
 
-       return (iface);
+       return iface;
 }
 
 
@@ -332,60 +373,57 @@ static struct atalk_iface *atif_add_device(struct net_device *dev, struct at_add
  */
 static int atif_probe_device(struct atalk_iface *atif)
 {
-       int netrange=ntohs(atif->nets.nr_lastnet)-ntohs(atif->nets.nr_firstnet)+1;
-       int probe_net=ntohs(atif->address.s_net);
-       int probe_node=atif->address.s_node;
+       int netrange = ntohs(atif->nets.nr_lastnet) - ntohs(atif->nets.nr_firstnet) + 1;
+       int probe_net = ntohs(atif->address.s_net);
+       int probe_node = atif->address.s_node;
        int netct, nodect;
 
        /*
         * Offset the network we start probing with.
         */
 
-       if(probe_net == ATADDR_ANYNET)
-       {
-               if(!netrange)
+       if (probe_net == ATADDR_ANYNET) {
+               if (!netrange)
                        probe_net = ntohs(atif->nets.nr_firstnet);
                else
-                       probe_net = ntohs(atif->nets.nr_firstnet) + (jiffies%netrange);
+                       probe_net = ntohs(atif->nets.nr_firstnet) + (jiffies % netrange);
        }
 
-       if(probe_node == ATADDR_ANYNODE)
-               probe_node = jiffies&0xFF;
+       if (probe_node == ATADDR_ANYNODE)
+               probe_node = jiffies & 0xFF;
 
        /*
         * Scan the networks.
         */
        atif->status |= ATIF_PROBE;
-       for(netct = 0; netct <= netrange; netct++)
-       {
+       for (netct = 0; netct <= netrange; netct++) {
                /*
                 * Sweep the available nodes from a given start.
                 */
 
                atif->address.s_net = htons(probe_net);
-               for(nodect = 0; nodect < 256; nodect++)
-               {
+               for (nodect = 0; nodect < 256; nodect++) {
                        atif->address.s_node = ((nodect+probe_node) & 0xFF);
-                       if(atif->address.s_node > 0 && atif->address.s_node<254)
-                       {
+                       if (atif->address.s_node > 0 && atif->address.s_node < 254) {
                                /*
                                 * Probe a proposed address.
                                 */
                                aarp_probe_network(atif);
 
-                               if(!(atif->status & ATIF_PROBE_FAIL)) {
+                               if (!(atif->status & ATIF_PROBE_FAIL)) {
                                        atif->status &= ~ATIF_PROBE;
-                                       return (0);
+                                       return 0;
                                }
                        }
                        atif->status &= ~ATIF_PROBE_FAIL;
                }
                probe_net++;
-               if(probe_net > ntohs(atif->nets.nr_lastnet))
+               if (probe_net > ntohs(atif->nets.nr_lastnet))
                        probe_net = ntohs(atif->nets.nr_firstnet);
        }
        atif->status &= ~ATIF_PROBE;
-       return (-EADDRINUSE);   /* Network is full... */
+
+       return -EADDRINUSE;     /* Network is full... */
 }
 
 
@@ -394,46 +432,43 @@ static int atif_probe_device(struct atalk_iface *atif)
  */
 static int atif_proxy_probe_device(struct atalk_iface *atif, struct at_addr* proxy_addr)
 {
-       int netrange=ntohs(atif->nets.nr_lastnet)-ntohs(atif->nets.nr_firstnet)+1;
-       int probe_net=ntohs(atif->address.s_net);       // we probe the interface's network
-       int probe_node=ATADDR_ANYNODE;                          // we'll take anything
+       int netrange = ntohs(atif->nets.nr_lastnet) - ntohs(atif->nets.nr_firstnet) + 1;
+       int probe_net = ntohs(atif->address.s_net); /* we probe the interface's network */
+       int probe_node = ATADDR_ANYNODE;            /* we'll take anything */
        int netct, nodect;
 
        /*
         * Offset the network we start probing with.
         */
 
-       if(probe_net == ATADDR_ANYNET)
-       {
-               if(!netrange)
+       if (probe_net == ATADDR_ANYNET) {
+               if (!netrange)
                        probe_net = ntohs(atif->nets.nr_firstnet);
                else
-                       probe_net = ntohs(atif->nets.nr_firstnet) + (jiffies%netrange);
+                       probe_net = ntohs(atif->nets.nr_firstnet) + (jiffies % netrange);
        }
 
-       if(probe_node == ATADDR_ANYNODE)
-               probe_node = jiffies&0xFF;
+       if (probe_node == ATADDR_ANYNODE)
+               probe_node = jiffies & 0xFF;
                
        /*
         * Scan the networks.
         */
 
-       for(netct = 0; netct <= netrange; netct++)
-       {
+       for (netct = 0; netct <= netrange; netct++) {
                /*
                 * Sweep the available nodes from a given start.
                 */
 
                proxy_addr->s_net = htons(probe_net);
-               for(nodect = 0; nodect < 256; nodect++)
-               {
-                       proxy_addr->s_node = ((nodect+probe_node) & 0xFF);
-                       if((proxy_addr->s_node>0) && (proxy_addr->s_node<254))
-                       {
+               for (nodect = 0; nodect < 256; nodect++) {
+                       proxy_addr->s_node = ((nodect + probe_node) & 0xFF);
+                       if ((proxy_addr->s_node > 0) && (proxy_addr->s_node < 254)) {
                                /*
                                 * Tell AARP to probe a proposed address.
                                 */
-                               int probe_result = aarp_proxy_probe_network(atif, proxy_addr);
+                               int probe_result = aarp_proxy_probe_network(atif,
+                                                                           proxy_addr);
 
                                if (probe_result == 0)
                                        return 0;
@@ -447,22 +482,23 @@ static int atif_proxy_probe_device(struct atalk_iface *atif, struct at_addr* pro
                        probe_net = ntohs(atif->nets.nr_firstnet);
        }
 
-       return (-EADDRINUSE);   /* Network is full... */
+       return -EADDRINUSE;     /* Network is full... */
 }
 
 
 struct at_addr *atalk_find_dev_addr(struct net_device *dev)
 {
-       struct atalk_iface *iface=dev->atalk_ptr;
+       struct atalk_iface *iface = dev->atalk_ptr;
 
        if(iface)
-               return (&iface->address);
+               return &iface->address;
 
-       return (NULL);
+       return NULL;
 }
 
 static struct at_addr *atalk_find_primary(void)
 {
+       struct at_addr *retval;
        struct atalk_iface *iface;
        struct atalk_iface *fiface = NULL;
 
@@ -470,20 +506,27 @@ static struct at_addr *atalk_find_primary(void)
         * Return a point-to-point interface only if
         * there is no non-ptp interface available.
         */
-       for(iface=atalk_iface_list; iface != NULL; iface=iface->next)
-       {
-               if(!fiface && !(iface->dev->flags & IFF_LOOPBACK))
-                       fiface=iface;
-               if(!(iface->dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT)))
-                       return (&iface->address);
+       spin_lock_bh(&atalk_iface_lock);
+       for (iface = atalk_iface_list; iface != NULL; iface = iface->next) {
+               if (!fiface && !(iface->dev->flags & IFF_LOOPBACK))
+                       fiface = iface;
+               if (!(iface->dev->flags & (IFF_LOOPBACK | IFF_POINTOPOINT))) {
+                       retval = &iface->address;
+                       goto out;
+               }
        }
 
-       if(fiface)
-               return (&fiface->address);
-       if(atalk_iface_list != NULL)
-               return (&atalk_iface_list->address);
-       else
-               return (NULL);
+       if (fiface) {
+               retval = &fiface->address;
+       } else if (atalk_iface_list != NULL) {
+               retval = &atalk_iface_list->address;
+       } else {
+               retval = NULL;
+       }
+out:
+       spin_unlock_bh(&atalk_iface_lock);
+
+       return retval;
 }
 
 /*
@@ -494,13 +537,15 @@ static struct atalk_iface *atalk_find_anynet(int node, struct net_device *dev)
 {
        struct atalk_iface *iface=dev->atalk_ptr;
 
-       if(iface==NULL || (iface->status & ATIF_PROBE))
-               return (NULL);
-       if(node == ATADDR_BCAST || iface->address.s_node == node
-               || node == ATADDR_ANYNODE)
-               return (iface);
+       if (iface==NULL || (iface->status & ATIF_PROBE))
+               return NULL;
+
+       if (node == ATADDR_BCAST ||
+           iface->address.s_node == node ||
+           node == ATADDR_ANYNODE)
+               return iface;
 
-       return (NULL);
+       return NULL;
 }
 
 /*
@@ -510,22 +555,24 @@ static struct atalk_iface *atalk_find_interface(int net, int node)
 {
        struct atalk_iface *iface;
 
-       for(iface=atalk_iface_list; iface != NULL; iface=iface->next)
-       {
-               if((node==ATADDR_BCAST || node==ATADDR_ANYNODE 
-                       || iface->address.s_node==node)
-                       && iface->address.s_net==net 
-                       && !(iface->status & ATIF_PROBE))
-                       return (iface);
+       spin_lock_bh(&atalk_iface_lock);
+       for (iface = atalk_iface_list; iface != NULL; iface = iface->next) {
+               if ((node == ATADDR_BCAST ||
+                    node == ATADDR_ANYNODE ||
+                    iface->address.s_node == node) &&
+                   iface->address.s_net == net &&
+                   !(iface->status & ATIF_PROBE))
+                       break;
 
                /* XXXX.0 -- net.0 returns the iface associated with net */
-               if ((node==ATADDR_ANYNODE) && (net != ATADDR_ANYNET) &&
+               if ((node == ATADDR_ANYNODE) && (net != ATADDR_ANYNET) &&
                    (ntohs(iface->nets.nr_firstnet) <= ntohs(net)) &&
                    (ntohs(net) <= ntohs(iface->nets.nr_lastnet)))
-                       return (iface);
+                       break;
        }
+       spin_unlock_bh(&atalk_iface_lock);
 
-       return (NULL);
+       return iface;
 }
 
 
@@ -544,23 +591,20 @@ static struct atalk_route *atrtr_find(struct at_addr *target)
        struct atalk_route *r;
        struct atalk_route *net_route = NULL;
        
-       for(r=atalk_router_list; r != NULL; r=r->next)
-       {
-               if(!(r->flags & RTF_UP))
+       read_lock_bh(&atalk_router_lock);
+       for (r = atalk_router_list; r != NULL; r = r->next) {
+               if (!(r->flags & RTF_UP))
                        continue;
-               if(r->target.s_net == target->s_net)
-               {
-                       if (r->flags & RTF_HOST)
-                       {
+
+               if (r->target.s_net == target->s_net) {
+                       if (r->flags & RTF_HOST) {
                                /*
                                 * if this host route is for the target,
                                 * the we're done
                                 */
                                if (r->target.s_node == target->s_node)
-                                       return (r);
-                       }
-                       else
-                       {
+                                       goto out;
+                       } else {
                                /*
                                 * this route will work if there isn't a
                                 * direct host route, so cache it
@@ -574,13 +618,20 @@ static struct atalk_route *atrtr_find(struct at_addr *target)
         * if we found a network route but not a direct host
         * route, then return it
         */
-       if (net_route != NULL)
-               return (net_route);
-
-       if(atrtr_default.dev)
-               return (&atrtr_default);
+       if (net_route != NULL) {
+               r = net_route;
+       } else if (atrtr_default.dev) {
+               r = &atrtr_default;
+       } else {
+               /*
+                * No route can be found.
+                */
+               r = NULL;
+       }
 
-       return (NULL);
+out:
+       read_unlock_bh(&atalk_router_lock);
+       return r;
 }
 
 
@@ -590,12 +641,12 @@ static struct atalk_route *atrtr_find(struct at_addr *target)
  */
 struct net_device *atrtr_get_dev(struct at_addr *sa)
 {
-       struct atalk_route *atr=atrtr_find(sa);
+       struct atalk_route *atr = atrtr_find(sa);
 
-       if(atr == NULL)
-               return (NULL);
+       if (atr == NULL)
+               return NULL;
        else
-               return (atr->dev);
+               return atr->dev;
 }
 
 /*
@@ -616,13 +667,11 @@ static void atrtr_set_default(struct net_device *dev)
  */
 static int atrtr_create(struct rtentry *r, struct net_device *devhint)
 {
-       struct sockaddr_at *ta=(struct sockaddr_at *)&r->rt_dst;
-       struct sockaddr_at *ga=(struct sockaddr_at *)&r->rt_gateway;
+       struct sockaddr_at *ta = (struct sockaddr_at *)&r->rt_dst;
+       struct sockaddr_at *ga = (struct sockaddr_at *)&r->rt_gateway;
        struct atalk_route *rt;
        struct atalk_iface *iface, *riface;
-       unsigned long flags;
-
-       save_flags(flags);
+       int retval;
 
        /*
         * Fixme: Raise/Lower a routing change semaphore for these
@@ -632,53 +681,59 @@ static int atrtr_create(struct rtentry *r, struct net_device *devhint)
        /*
         * Validate the request
         */
-       if(ta->sat_family != AF_APPLETALK)
-               return (-EINVAL);
-       if(devhint == NULL && ga->sat_family != AF_APPLETALK)
-               return (-EINVAL);
+       if (ta->sat_family != AF_APPLETALK)
+               return -EINVAL;
+
+       if (devhint == NULL && ga->sat_family != AF_APPLETALK)
+               return -EINVAL;
 
        /*
         * Now walk the routing table and make our decisions.
         */
-       for(rt=atalk_router_list; rt!=NULL; rt=rt->next)
-       {
-               if(r->rt_flags != rt->flags)
+       write_lock_bh(&atalk_router_lock);
+       for (rt = atalk_router_list; rt != NULL; rt = rt->next) {
+               if (r->rt_flags != rt->flags)
                        continue;
 
-               if(ta->sat_addr.s_net == rt->target.s_net)
-               {
-                       if(!(rt->flags & RTF_HOST))
+               if (ta->sat_addr.s_net == rt->target.s_net) {
+                       if (!(rt->flags & RTF_HOST))
                                break;
-                       if(ta->sat_addr.s_node == rt->target.s_node)
+                       if (ta->sat_addr.s_node == rt->target.s_node)
                                break;
                }
        }
 
-       if(devhint == NULL)
-       {
-               for(riface = NULL, iface = atalk_iface_list; iface; iface = iface->next)
-               {
-                       if(riface == NULL && ntohs(ga->sat_addr.s_net) >= ntohs(iface->nets.nr_firstnet) &&
-                               ntohs(ga->sat_addr.s_net) <= ntohs(iface->nets.nr_lastnet))
-                       {
+       if(devhint == NULL) {
+               riface = NULL;
+
+               spin_lock_bh(&atalk_iface_lock);
+               for (iface = atalk_iface_list; iface; iface = iface->next) {
+                       if (riface == NULL &&
+                           ntohs(ga->sat_addr.s_net) >= ntohs(iface->nets.nr_firstnet) &&
+                           ntohs(ga->sat_addr.s_net) <= ntohs(iface->nets.nr_lastnet))
                                riface = iface;
-                       }
-                       if(ga->sat_addr.s_net == iface->address.s_net 
-                               && ga->sat_addr.s_node == iface->address.s_node)
+
+                       if (ga->sat_addr.s_net == iface->address.s_net  &&
+                           ga->sat_addr.s_node == iface->address.s_node)
                                riface = iface;
-               }
+               }               
+               spin_unlock_bh(&atalk_iface_lock);
+
+               retval = -ENETUNREACH;
+               if (riface == NULL)
+                       goto out;
 
-               if(riface == NULL)
-                       return (-ENETUNREACH);
                devhint = riface->dev;
        }
 
-       if(rt == NULL)
-       {
-               rt = (struct atalk_route *)kmalloc(sizeof(struct atalk_route), GFP_KERNEL);
-               if(rt == NULL)
-                       return (-ENOBUFS);
-               cli();
+       if (rt == NULL) {
+               rt = (struct atalk_route *)
+                       kmalloc(sizeof(struct atalk_route), GFP_ATOMIC);
+
+               retval = -ENOBUFS;
+               if (rt == NULL)
+                       goto out;
+
                rt->next = atalk_router_list;
                atalk_router_list = rt;
        }
@@ -691,33 +746,38 @@ static int atrtr_create(struct rtentry *r, struct net_device *devhint)
        rt->flags   = r->rt_flags;
        rt->gateway = ga->sat_addr;
 
-       restore_flags(flags);
+       retval = 0;
 
-       return (0);
+out:
+       write_unlock_bh(&atalk_router_lock);
+
+       return retval;
 }
 
 /*
  * Delete a route. Find it and discard it.
  */
-static int atrtr_delete( struct at_addr *addr )
+static int atrtr_delete(struct at_addr * addr)
 {
        struct atalk_route **r = &atalk_router_list;
        struct atalk_route *tmp;
+       int retval = 0;
 
-       while((tmp = *r) != NULL)
-       {
-               if(tmp->target.s_net == addr->s_net
-                       && (!(tmp->flags&RTF_GATEWAY)
-                       || tmp->target.s_node == addr->s_node))
-               {
+       write_lock_bh(&atalk_router_lock);
+       while ((tmp = *r) != NULL) {
+               if (tmp->target.s_net == addr->s_net &&
+                   (!(tmp->flags&RTF_GATEWAY) ||
+                    tmp->target.s_node == addr->s_node)) {
                        *r = tmp->next;
                        kfree_s(tmp, sizeof(struct atalk_route));
-                       return (0);
+                       goto out;
                }
                r = &tmp->next;
        }
-
-       return (-ENOENT);
+       retval = -ENOENT;
+out:
+       write_unlock_bh(&atalk_router_lock);
+       return retval;
 }
 
 /*
@@ -729,18 +789,18 @@ void atrtr_device_down(struct net_device *dev)
        struct atalk_route **r = &atalk_router_list;
        struct atalk_route *tmp;
 
-       while((tmp = *r) != NULL)
-       {
-               if(tmp->dev == dev)
-               {
+       write_lock_bh(&atalk_router_lock);
+       while ((tmp = *r) != NULL) {
+               if (tmp->dev == dev) {
                        *r = tmp->next;
                        kfree_s(tmp, sizeof(struct atalk_route));
-               }
-               else
+               } else {
                        r = &tmp->next;
+               }
        }
+       write_unlock_bh(&atalk_router_lock);
 
-       if(atrtr_default.dev == dev)
+       if (atrtr_default.dev == dev)
                atrtr_set_default(NULL);
 }
 
@@ -760,13 +820,12 @@ static inline void atalk_dev_down(struct net_device *dev)
  */
 static int ddp_device_event(struct notifier_block *this, unsigned long event, void *ptr)
 {
-       if(event == NETDEV_DOWN)
-       {
+       if (event == NETDEV_DOWN) {
                /* Discard any use of this */
                atalk_dev_down((struct net_device *) ptr);
        }
 
-       return (NOTIFY_DONE);
+       return NOTIFY_DONE;
 }
 
 /*
@@ -789,29 +848,28 @@ int atif_ioctl(int cmd, void *arg)
        struct rtentry rtdef;
        int     add_route;
 
-       if(copy_from_user(&atreq,arg,sizeof(atreq)))
-               return (-EFAULT);
+       if (copy_from_user(&atreq, arg, sizeof(atreq)))
+               return -EFAULT;
 
-       if((dev = __dev_get_by_name(atreq.ifr_name)) == NULL)
-               return (-ENODEV);
+       if ((dev = __dev_get_by_name(atreq.ifr_name)) == NULL)
+               return -ENODEV;
 
-       sa=(struct sockaddr_at*)&atreq.ifr_addr;
-       atif=atalk_find_dev(dev);
+       sa = (struct sockaddr_at*) &atreq.ifr_addr;
+       atif = atalk_find_dev(dev);
 
-       switch(cmd)
-       {
+       switch (cmd) {
                case SIOCSIFADDR:
-                       if(!capable(CAP_NET_ADMIN))
-                               return (-EPERM);
-                       if(sa->sat_family != AF_APPLETALK)
-                               return (-EINVAL);
-                       if(dev->type != ARPHRD_ETHER
-                               && dev->type != ARPHRD_LOOPBACK
-                               && dev->type != ARPHRD_LOCALTLK
-                               && dev->type != ARPHRD_PPP)
-                               return (-EPROTONOSUPPORT);
+                       if (!capable(CAP_NET_ADMIN))
+                               return -EPERM;
+                       if (sa->sat_family != AF_APPLETALK)
+                               return -EINVAL;
+                       if (dev->type != ARPHRD_ETHER &&
+                           dev->type != ARPHRD_LOOPBACK &&
+                           dev->type != ARPHRD_LOCALTLK &&
+                           dev->type != ARPHRD_PPP)
+                               return -EPROTONOSUPPORT;
 
-                       nr=(struct netrange *)&sa->sat_zero[0];
+                       nr = (struct netrange *) &sa->sat_zero[0];
 
                        add_route = 1;
 
@@ -819,8 +877,8 @@ int atif_ioctl(int cmd, void *arg)
                         * if this is a point-to-point iface, and we already have an 
                         * iface for this AppleTalk address, then we should not add a route
                         */
-                       if (dev->flags & IFF_POINTOPOINT && atalk_find_interface(sa->sat_addr.s_net, sa->sat_addr.s_node))
-                       {
+                       if ((dev->flags & IFF_POINTOPOINT) &&
+                           atalk_find_interface(sa->sat_addr.s_net, sa->sat_addr.s_node)) {
                                printk(KERN_DEBUG "AppleTalk: point-to-point interface added with existing address\n");
                                add_route = 0;
                        }
@@ -829,123 +887,123 @@ int atif_ioctl(int cmd, void *arg)
                         * Phase 1 is fine on LocalTalk but we don't do
                         * EtherTalk phase 1. Anyone wanting to add it go ahead.
                         */
-                       if(dev->type == ARPHRD_ETHER && nr->nr_phase != 2)
-                               return (-EPROTONOSUPPORT);
-                       if(sa->sat_addr.s_node == ATADDR_BCAST 
-                               || sa->sat_addr.s_node == 254)
-                               return (-EINVAL);
-                       if(atif)
-                       {
+                       if (dev->type == ARPHRD_ETHER && nr->nr_phase != 2)
+                               return -EPROTONOSUPPORT;
+                       if (sa->sat_addr.s_node == ATADDR_BCAST  ||
+                           sa->sat_addr.s_node == 254)
+                               return -EINVAL;
+                       if (atif) {
                                /*
                                 * Already setting address.
                                 */
-                               if(atif->status&ATIF_PROBE)
-                                       return (-EBUSY);
+                               if (atif->status & ATIF_PROBE)
+                                       return -EBUSY;
 
                                atif->address.s_net  = sa->sat_addr.s_net;
                                atif->address.s_node = sa->sat_addr.s_node;
                                atrtr_device_down(dev); /* Flush old routes */
-                       }
-                       else
-                       {
-                               atif=atif_add_device(dev, &sa->sat_addr);
+                       } else {
+                               atif = atif_add_device(dev, &sa->sat_addr);
                                if (atif == NULL)
-                                       return (-ENOMEM);
+                                       return -ENOMEM;
                        }
-                       atif->nets= *nr;
+                       atif->nets = *nr;
 
                        /*
                         * Check if the chosen address is used. If so we
                         * error and atalkd will try another.
                         */
 
-                       if(!(dev->flags & IFF_LOOPBACK) && !(dev->flags & IFF_POINTOPOINT) && atif_probe_device(atif) < 0)
-                       {
+                       if (!(dev->flags & IFF_LOOPBACK) &&
+                           !(dev->flags & IFF_POINTOPOINT) &&
+                           atif_probe_device(atif) < 0) {
                                atif_drop_device(dev);
-                               return (-EADDRINUSE);
+                               return -EADDRINUSE;
                        }
 
                        /*
                         * Hey it worked - add the direct routes.
                         */
 
-                       sa = (struct sockaddr_at *)&rtdef.rt_gateway;
+                       sa = (struct sockaddr_at *) &rtdef.rt_gateway;
                        sa->sat_family = AF_APPLETALK;
                        sa->sat_addr.s_net  = atif->address.s_net;
                        sa->sat_addr.s_node = atif->address.s_node;
-                       sa = (struct sockaddr_at *)&rtdef.rt_dst;
+                       sa = (struct sockaddr_at *) &rtdef.rt_dst;
                        rtdef.rt_flags = RTF_UP;
                        sa->sat_family = AF_APPLETALK;
                        sa->sat_addr.s_node = ATADDR_ANYNODE;
-                       if((dev->flags & IFF_LOOPBACK) || (dev->flags & IFF_POINTOPOINT))
+                       if ((dev->flags & IFF_LOOPBACK) ||
+                           (dev->flags & IFF_POINTOPOINT))
                                rtdef.rt_flags |= RTF_HOST;
 
                        /*
                         * Routerless initial state.
                         */
-                       if(nr->nr_firstnet == htons(0)
-                               && nr->nr_lastnet == htons(0xFFFE))
-                       {
+                       if (nr->nr_firstnet == htons(0) &&
+                           nr->nr_lastnet == htons(0xFFFE)) {
                                sa->sat_addr.s_net = atif->address.s_net;
                                atrtr_create(&rtdef, dev);
                                atrtr_set_default(dev);
-                       }
-                       else
-                       {
+                       } else {
                                limit = ntohs(nr->nr_lastnet);
-                               if(limit - ntohs(nr->nr_firstnet) > 4096)
-                               {
+                               if (limit - ntohs(nr->nr_firstnet) > 4096) {
                                        printk(KERN_WARNING "Too many routes/iface.\n");
-                                       return (-EINVAL);
+                                       return -EINVAL;
                                }
-                               if (add_route)
-                                       for(ct=ntohs(nr->nr_firstnet);ct<=limit;ct++)
-                                       {
+                               if (add_route) {
+                                       for(ct = ntohs(nr->nr_firstnet);ct <= limit; ct++) {
                                                sa->sat_addr.s_net = htons(ct);
                                                atrtr_create(&rtdef, dev);
                                        }
+                               }
                        }
                        dev_mc_add(dev, aarp_mcast, 6, 1);
-                       return (0);
+                       return 0;
 
                case SIOCGIFADDR:
-                       if(atif == NULL)
-                               return (-EADDRNOTAVAIL);
-                       ((struct sockaddr_at *)(&atreq.ifr_addr))->sat_family=AF_APPLETALK;
-                       ((struct sockaddr_at *)(&atreq.ifr_addr))->sat_addr=atif->address;
+                       if (atif == NULL)
+                               return -EADDRNOTAVAIL;
+                       ((struct sockaddr_at *)(&atreq.ifr_addr))->sat_family =
+                               AF_APPLETALK;
+                       ((struct sockaddr_at *)(&atreq.ifr_addr))->sat_addr =
+                               atif->address;
                        break;
 
                case SIOCGIFBRDADDR:
-                       if(atif == NULL)
-                               return (-EADDRNOTAVAIL);
-                       ((struct sockaddr_at *)(&atreq.ifr_addr))->sat_family=AF_APPLETALK;
-                       ((struct sockaddr_at *)(&atreq.ifr_addr))->sat_addr.s_net=atif->address.s_net;
-                       ((struct sockaddr_at *)(&atreq.ifr_addr))->sat_addr.s_node=ATADDR_BCAST;
+                       if (atif == NULL)
+                               return -EADDRNOTAVAIL;
+                       ((struct sockaddr_at *)(&atreq.ifr_addr))->sat_family =
+                               AF_APPLETALK;
+                       ((struct sockaddr_at *)(&atreq.ifr_addr))->sat_addr.s_net =
+                               atif->address.s_net;
+                       ((struct sockaddr_at *)(&atreq.ifr_addr))->sat_addr.s_node =
+                               ATADDR_BCAST;
                        break;
 
                case SIOCATALKDIFADDR:
                case SIOCDIFADDR:
-                       if(!capable(CAP_NET_ADMIN))
-                               return (-EPERM);
-                       if(sa->sat_family != AF_APPLETALK)
-                               return (-EINVAL);
+                       if (!capable(CAP_NET_ADMIN))
+                               return -EPERM;
+                       if (sa->sat_family != AF_APPLETALK)
+                               return -EINVAL;
                        atalk_dev_down(dev);
                        break;                  
 
                case SIOCSARP:
-                       if(!capable(CAP_NET_ADMIN))
-                                return (-EPERM);
-                        if(sa->sat_family != AF_APPLETALK)
-                                return (-EINVAL);
+                       if (!capable(CAP_NET_ADMIN))
+                                return -EPERM;
+                        if (sa->sat_family != AF_APPLETALK)
+                                return -EINVAL;
                         if (atif == NULL)
-                                return (-EADDRNOTAVAIL);
+                                return -EADDRNOTAVAIL;
 
                         /*
                          * for now, we only support proxy AARP on ELAP;
                          * we should be able to do it for LocalTalk, too.
                          */
-                        if(dev->type != ARPHRD_ETHER)
-                                return (-EPROTONOSUPPORT);
+                        if (dev->type != ARPHRD_ETHER)
+                                return -EPROTONOSUPPORT;
 
                         /*
                          * atif points to the current interface on this network;
@@ -954,28 +1012,28 @@ int atif_ioctl(int cmd, void *arg)
                          * to probe.  consequently, it must exist.
                          */
                         if (!atif)
-                                return (-EADDRNOTAVAIL);
+                                return -EADDRNOTAVAIL;
 
-                        nr=(struct netrange *)&(atif->nets);
+                        nr = (struct netrange *) &(atif->nets);
                         /*
                          * Phase 1 is fine on Localtalk but we don't do
                          * Ethertalk phase 1. Anyone wanting to add it go ahead.
                          */
-                        if(dev->type == ARPHRD_ETHER && nr->nr_phase != 2)
-                                return (-EPROTONOSUPPORT);
+                        if (dev->type == ARPHRD_ETHER && nr->nr_phase != 2)
+                                return -EPROTONOSUPPORT;
 
-                        if(sa->sat_addr.s_node == ATADDR_BCAST
-                                || sa->sat_addr.s_node == 254)
-                                return (-EINVAL);
+                        if (sa->sat_addr.s_node == ATADDR_BCAST ||
+                           sa->sat_addr.s_node == 254)
+                                return -EINVAL;
 
                         /*
                          * Check if the chosen address is used. If so we
                          * error and ATCP will try another.
                          */
                        if (atif_proxy_probe_device(atif, &(sa->sat_addr)) < 0)
-                               return (-EADDRINUSE);
+                               return -EADDRINUSE;
                        
-                       /*
+                       /*
                          * We now have an address on the local network, and the AARP
                          * code will defend it for us until we take it down.
                          * We don't set up any routes right now, because ATCP will
@@ -984,25 +1042,25 @@ int atif_ioctl(int cmd, void *arg)
                         break;
 
                 case SIOCDARP:
-                        if(!capable(CAP_NET_ADMIN))
-                                return (-EPERM);
-                        if(sa->sat_family != AF_APPLETALK)
-                                return (-EINVAL);
+                        if (!capable(CAP_NET_ADMIN))
+                                return -EPERM;
+                        if (sa->sat_family != AF_APPLETALK)
+                                return -EINVAL;
                         if (atif == NULL)
-                                return (-EADDRNOTAVAIL);
+                                return -EADDRNOTAVAIL;
 
                         /*
                          * give to aarp module to remove proxy entry
                          */
                         aarp_proxy_remove(atif->dev, &(sa->sat_addr));
 
-                        return (0);
-       }
+                        return 0;
+       };
 
-       if(copy_to_user(arg, &atreq, sizeof(atreq)))
-               return (-EFAULT);
+       if (copy_to_user(arg, &atreq, sizeof(atreq)))
+               return -EFAULT;
 
-       return (0);
+       return 0;
 }
 
 /*
@@ -1013,27 +1071,26 @@ static int atrtr_ioctl(unsigned int cmd, void *arg)
        struct rtentry rt;
        struct net_device *dev = NULL;
 
-       if(copy_from_user(&rt, arg, sizeof(rt)))
-               return (-EFAULT);
+       if (copy_from_user(&rt, arg, sizeof(rt)))
+               return -EFAULT;
 
-       switch(cmd)
-       {
+       switch (cmd) {
                case SIOCDELRT:
-                       if(rt.rt_dst.sa_family != AF_APPLETALK)
-                               return (-EINVAL);
-                       return (atrtr_delete(&((struct sockaddr_at *)&rt.rt_dst)->sat_addr));
+                       if (rt.rt_dst.sa_family != AF_APPLETALK)
+                               return -EINVAL;
+                       return atrtr_delete(&((struct sockaddr_at *)&rt.rt_dst)->sat_addr);
 
                case SIOCADDRT:
                        /* FIX ME: the name of the device is still in user space, isn't it? */
-                       if (rt.rt_dev != NULL)
+                       if (rt.rt_dev != NULL) {
                                if ((dev = __dev_get_by_name(rt.rt_dev)) == NULL)
-                                       return -(ENODEV);
-                       
-                       return (atrtr_create(&rt, dev));
+                                       return -ENODEV;
+                       }                       
+                       return atrtr_create(&rt, dev);
 
                default:
-                       return (-EINVAL);
-       }
+                       return -EINVAL;
+       };
 }
 
 /* Called from proc fs - just make it print the ifaces neatly */
@@ -1041,29 +1098,31 @@ static int atrtr_ioctl(unsigned int cmd, void *arg)
 static int atalk_if_get_info(char *buffer, char **start, off_t offset, int length)
 {
        struct atalk_iface *iface;
-       int len=0;
-       off_t pos=0;
-       off_t begin=0;
+       int len = 0;
+       off_t pos = 0;
+       off_t begin = 0;
 
        len += sprintf(buffer,"Interface          Address   Networks   Status\n");
-       for(iface = atalk_iface_list; iface != NULL; iface = iface->next)
-       {
+
+       spin_lock_bh(&atalk_iface_lock);
+       for (iface = atalk_iface_list; iface != NULL; iface = iface->next) {
                len += sprintf(buffer+len,"%-16s %04X:%02X  %04X-%04X  %d\n",
-                       iface->dev->name, ntohs(iface->address.s_net),
-                       iface->address.s_node, ntohs(iface->nets.nr_firstnet),
-                       ntohs(iface->nets.nr_lastnet), iface->status);
+                              iface->dev->name, ntohs(iface->address.s_net),
+                              iface->address.s_node, ntohs(iface->nets.nr_firstnet),
+                              ntohs(iface->nets.nr_lastnet), iface->status);
                pos = begin + len;
-               if(pos < offset)
-               {
+               if (pos < offset) {
                        len   = 0;
                        begin = pos;
                }
-               if(pos > offset + length)
+               if (pos > offset + length)
                        break;
        }
+       spin_unlock_bh(&atalk_iface_lock);
+
        *start = buffer + (offset - begin);
        len -= (offset - begin);
-       if(len > length)
+       if (len > length)
                len = length;
 
        return (len);
@@ -1074,41 +1133,40 @@ static int atalk_if_get_info(char *buffer, char **start, off_t offset, int lengt
 static int atalk_rt_get_info(char *buffer, char **start, off_t offset, int length)
 {
        struct atalk_route *rt;
-       int len=0;
-       off_t pos=0;
-       off_t begin=0;
+       int len = 0;
+       off_t pos = 0;
+       off_t begin = 0;
 
        len += sprintf(buffer,"Target        Router  Flags Dev\n");
-       if(atrtr_default.dev)
-       {
+       if (atrtr_default.dev) {
                rt = &atrtr_default;
                len += sprintf(buffer+len,"Default     %04X:%02X  %-4d  %s\n",
-                       ntohs(rt->gateway.s_net), rt->gateway.s_node, rt->flags,
-                       rt->dev->name);
+                              ntohs(rt->gateway.s_net), rt->gateway.s_node,
+                              rt->flags, rt->dev->name);
        }
 
-       for(rt = atalk_router_list; rt != NULL; rt = rt->next)
-       {
+       read_lock_bh(&atalk_router_lock);
+       for (rt = atalk_router_list; rt != NULL; rt = rt->next) {
                len += sprintf(buffer+len,"%04X:%02X     %04X:%02X  %-4d  %s\n",
-                       ntohs(rt->target.s_net),rt->target.s_node,
-                       ntohs(rt->gateway.s_net), rt->gateway.s_node, rt->flags,
-                       rt->dev->name);
+                              ntohs(rt->target.s_net), rt->target.s_node,
+                              ntohs(rt->gateway.s_net), rt->gateway.s_node, rt->flags,
+                              rt->dev->name);
                pos = begin + len;
-               if(pos < offset)
-               {
+               if (pos < offset) {
                        len = 0;
                        begin = pos;
                }
-               if(pos > offset + length)
+               if (pos > offset + length)
                        break;
        }
+       read_unlock_bh(&atalk_router_lock);
 
        *start = buffer + (offset - begin);
        len -= (offset - begin);
-       if(len > length)
+       if (len > length)
                len = length;
 
-       return (len);
+       return len;
 }
 
 /**************************************************************************\
@@ -1124,27 +1182,25 @@ static int atalk_rt_get_info(char *buffer, char **start, off_t offset, int lengt
  */
 unsigned short atalk_checksum(struct ddpehdr *ddp, int len)
 {
-       unsigned long sum=0;    /* Assume unsigned long is >16 bits */
-       unsigned char *data=(unsigned char *)ddp;
+       unsigned long sum = 0;  /* Assume unsigned long is >16 bits */
+       unsigned char *data = (unsigned char *) ddp;
 
        len  -= 4;              /* skip header 4 bytes */
        data += 4;
 
        /* This ought to be unwrapped neatly. I'll trust gcc for now */
-       while(len--)
-       {
+       while (len--) {
                sum += *data;
                sum <<= 1;
-               if(sum & 0x10000)
-               {
+               if (sum & 0x10000) {
                        sum++;
                        sum &= 0xFFFF;
                }
                data++;
        }
 
-       if(sum)
-               return htons((unsigned short)sum);
+       if (sum)
+               return htons((unsigned short) sum);
 
        return 0xFFFF;          /* Use 0xFFFF for 0. 0 itself means none */
 }
@@ -1158,11 +1214,10 @@ static int atalk_create(struct socket *sock, int protocol)
        struct sock *sk;
 
        sk = sk_alloc(PF_APPLETALK, GFP_KERNEL, 1);
-       if(sk == NULL)
-               return (-ENOMEM);
+       if (sk == NULL)
+               return -ENOMEM;
 
-       switch(sock->type)
-       {
+       switch (sock->type) {
                /*
                 * We permit SOCK_DGRAM and RAW is an extension. It is
                 * trivial to do and gives you the full ELAP frame.
@@ -1182,19 +1237,19 @@ static int atalk_create(struct socket *sock, int protocol)
                        break;
                        */
                default:
-                       sk_free((void *)sk);
-                       return (-ESOCKTNOSUPPORT);
-       }
+                       sk_free((void *) sk);
+                       return -ESOCKTNOSUPPORT;
+       };
 
        MOD_INC_USE_COUNT;
 
-       sock_init_data(sock,sk);
+       sock_init_data(sock, sk);
 
        sk->destruct = NULL;
        /* Checksums on by default */
        sk->zapped = 1;
 
-       return (0);
+       return 0;
 }
 
 /*
@@ -1204,32 +1259,63 @@ static int atalk_release(struct socket *sock)
 {
        struct sock *sk=sock->sk;
 
-       if(sk == NULL)
-               return (0);
+       if (sk == NULL)
+               return 0;
 
-       if(!sk->dead)
+       if (!sk->dead)
                sk->state_change(sk);
 
        sk->dead = 1;
        sock->sk = NULL;
        atalk_destroy_socket(sk);
 
-       return (0);
+       return 0;
 }
 
 /*
- * Pick a source address if one is not given. Just return
- * an error if not supportable.
+ * Pick a source port when one is not given. If we can
+ * find a suitable free one, we insert the socket into
+ * the tables using it.
+ *
+ * This whole operation must be atomic.
  */
-static int atalk_pick_port(struct sockaddr_at *sat)
+static int atalk_pick_and_bind_port(struct sock *sk, struct sockaddr_at *sat)
 {
-       for(sat->sat_port = ATPORT_RESERVED; sat->sat_port < ATPORT_LAST; sat->sat_port++)
-       {
-               if(atalk_find_socket(sat) == NULL)
-                       return sat->sat_port;
+       struct sock *s;
+       int retval;
+
+       spin_lock_bh(&atalk_sockets_lock);
+
+       for (sat->sat_port = ATPORT_RESERVED;
+            sat->sat_port < ATPORT_LAST;
+            sat->sat_port++) {
+               for (s = atalk_sockets; s != NULL; s = s->next) {
+                       if (s->protinfo.af_at.src_net == sat->sat_addr.s_net &&
+                           s->protinfo.af_at.src_node == sat->sat_addr.s_node &&
+                           s->protinfo.af_at.src_port == sat->sat_port)
+                               goto try_next_port;
+               }
+
+               /* Wheee, it's free, assign and insert. */
+               if ((sk->next = atalk_sockets) != NULL)
+                       atalk_sockets->pprev = &sk->next;
+               atalk_sockets = sk;
+               sk->pprev = &atalk_sockets;
+
+               sk->protinfo.af_at.src_port = sat->sat_port;
+
+               retval = 0;
+               goto out;
+
+       try_next_port:
+               ;
        }
 
-       return (-EBUSY);
+       retval = -EBUSY;
+out:
+       spin_unlock_bh(&atalk_sockets_lock);
+
+       return retval;
 }
 
 static int atalk_autobind(struct sock *sk)
@@ -1238,20 +1324,18 @@ static int atalk_autobind(struct sock *sk)
        struct sockaddr_at sat;
        int n;
 
-       if(ap == NULL || ap->s_net == htons(ATADDR_ANYNET))
-               return (-EADDRNOTAVAIL);
+       if (ap == NULL || ap->s_net == htons(ATADDR_ANYNET))
+               return -EADDRNOTAVAIL;
 
        sk->protinfo.af_at.src_net  = sat.sat_addr.s_net  = ap->s_net;
        sk->protinfo.af_at.src_node = sat.sat_addr.s_node = ap->s_node;
 
-       if((n = atalk_pick_port(&sat)) < 0)
-               return (n);
+       if ((n = atalk_pick_and_bind_port(sk, &sat)) < 0)
+               return n;
 
-       sk->protinfo.af_at.src_port = n;
-       atalk_insert_socket(sk);
        sk->zapped = 0;
 
-       return (0);
+       return 0;
 }
 
 /*
@@ -1260,95 +1344,87 @@ static int atalk_autobind(struct sock *sk)
 static int atalk_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
 {
        struct sock *sk;
-       struct sockaddr_at *addr=(struct sockaddr_at *)uaddr;
+       struct sockaddr_at *addr = (struct sockaddr_at *)uaddr;
 
        sk = sock->sk;
 
        if(sk->zapped == 0)
-               return (-EINVAL);
+               return -EINVAL;
 
        if(addr_len != sizeof(struct sockaddr_at))
-               return (-EINVAL);
+               return -EINVAL;
 
        if(addr->sat_family != AF_APPLETALK)
-               return (-EAFNOSUPPORT);
+               return -EAFNOSUPPORT;
 
-       if(addr->sat_addr.s_net == htons(ATADDR_ANYNET))
-       {
-               struct at_addr *ap=atalk_find_primary();
+       if(addr->sat_addr.s_net == htons(ATADDR_ANYNET)) {
+               struct at_addr *ap = atalk_find_primary();
 
                if(ap == NULL)
-                       return (-EADDRNOTAVAIL);
+                       return -EADDRNOTAVAIL;
 
                sk->protinfo.af_at.src_net  = addr->sat_addr.s_net = ap->s_net;
                sk->protinfo.af_at.src_node = addr->sat_addr.s_node= ap->s_node;
-       }
-       else
-       {
-               if(atalk_find_interface(addr->sat_addr.s_net, addr->sat_addr.s_node) == NULL)
-                       return (-EADDRNOTAVAIL);
+       } else {
+               if (atalk_find_interface(addr->sat_addr.s_net, addr->sat_addr.s_node) == NULL)
+                       return -EADDRNOTAVAIL;
 
                sk->protinfo.af_at.src_net  = addr->sat_addr.s_net;
                sk->protinfo.af_at.src_node = addr->sat_addr.s_node;
        }
 
-       if(addr->sat_port == ATADDR_ANYPORT)
-       {
-               int n = atalk_pick_port(addr);
-               if(n < 0)
-                       return (n);
+       if (addr->sat_port == ATADDR_ANYPORT) {
+               int n = atalk_pick_and_bind_port(sk, addr);
 
-               sk->protinfo.af_at.src_port = addr->sat_port = n;
-       }
-       else
+               if (n < 0)
+                       return n;
+       else
                sk->protinfo.af_at.src_port = addr->sat_port;
 
-       if(atalk_find_socket(addr) != NULL)
-               return (-EADDRINUSE);
+       if (atalk_find_or_insert_socket(sk, addr) != NULL)
+               return -EADDRINUSE;
 
-       atalk_insert_socket(sk);
        sk->zapped = 0;
 
-       return (0);
+       return 0;
 }
 
 /*
  * Set the address we talk to.
  */
 static int atalk_connect(struct socket *sock, struct sockaddr *uaddr,
-       int addr_len, int flags)
+                        int addr_len, int flags)
 {
-       struct sock *sk=sock->sk;
+       struct sock *sk = sock->sk;
        struct sockaddr_at *addr;
 
        sk->state   = TCP_CLOSE;
        sock->state = SS_UNCONNECTED;
 
-       if(addr_len != sizeof(*addr))
-               return (-EINVAL);
+       if (addr_len != sizeof(*addr))
+               return -EINVAL;
+
        addr = (struct sockaddr_at *)uaddr;
 
-       if(addr->sat_family != AF_APPLETALK)
-               return (-EAFNOSUPPORT);
+       if (addr->sat_family != AF_APPLETALK)
+               return -EAFNOSUPPORT;
 
-       if(addr->sat_addr.s_node == ATADDR_BCAST && !sk->broadcast)
-       {
+       if (addr->sat_addr.s_node == ATADDR_BCAST && !sk->broadcast) {
 #if 1  
                printk(KERN_WARNING "%s is broken and did not set SO_BROADCAST. It will break when 2.2 is released.\n",
                        current->comm);
 #else
-               return (-EACCES);
+               return -EACCES;
 #endif                 
        }
 
-       if(sk->zapped)
-       {
-               if(atalk_autobind(sk) < 0)
-                       return (-EBUSY);
+       if (sk->zapped) {
+               if (atalk_autobind(sk) < 0)
+                       return -EBUSY;
        }
 
-       if(atrtr_get_dev(&addr->sat_addr) == NULL)
-               return (-ENETUNREACH);
+       if (atrtr_get_dev(&addr->sat_addr) == NULL)
+               return -ENETUNREACH;
 
        sk->protinfo.af_at.dest_port = addr->sat_port;
        sk->protinfo.af_at.dest_net  = addr->sat_addr.s_net;
@@ -1357,7 +1433,7 @@ static int atalk_connect(struct socket *sock, struct sockaddr *uaddr,
        sock->state = SS_CONNECTED;
        sk->state   = TCP_ESTABLISHED;
 
-       return (0);
+       return 0;
 }
 
 
@@ -1366,30 +1442,27 @@ static int atalk_connect(struct socket *sock, struct sockaddr *uaddr,
  * fields into the sockaddr.
  */
 static int atalk_getname(struct socket *sock, struct sockaddr *uaddr,
-       int *uaddr_len, int peer)
+                        int *uaddr_len, int peer)
 {
        struct sockaddr_at sat;
        struct sock *sk;
 
        sk = sock->sk;
-       if(sk->zapped)
-       {
-               if(atalk_autobind(sk) < 0)
-                       return (-ENOBUFS);
+       if (sk->zapped) {
+               if (atalk_autobind(sk) < 0)
+                       return -ENOBUFS;
        }
 
        *uaddr_len = sizeof(struct sockaddr_at);
 
-       if(peer)
-       {
-               if(sk->state != TCP_ESTABLISHED)
-                       return (-ENOTCONN);
+       if (peer) {
+               if (sk->state != TCP_ESTABLISHED)
+                       return -ENOTCONN;
+
                sat.sat_addr.s_net  = sk->protinfo.af_at.dest_net;
                sat.sat_addr.s_node = sk->protinfo.af_at.dest_node;
                sat.sat_port = sk->protinfo.af_at.dest_port;
-       }
-       else
-       {
+       } else {
                sat.sat_addr.s_net  = sk->protinfo.af_at.src_net;
                sat.sat_addr.s_node = sk->protinfo.af_at.src_node;
                sat.sat_port = sk->protinfo.af_at.src_port;
@@ -1398,7 +1471,7 @@ static int atalk_getname(struct socket *sock, struct sockaddr *uaddr,
        sat.sat_family = AF_APPLETALK;
        memcpy(uaddr, &sat, sizeof(sat));
 
-       return (0);
+       return 0;
 }
 
 /*
@@ -1411,17 +1484,16 @@ static int atalk_getname(struct socket *sock, struct sockaddr *uaddr,
 static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt)
 {
        struct sock *sock;
-       struct ddpehdr *ddp=(void *)skb->h.raw;
+       struct ddpehdr *ddp = (void *) skb->h.raw;
        struct atalk_iface *atif;
        struct sockaddr_at tosat;
         int origlen;
         struct ddpebits ddphv;
 
        /* Size check */
-       if(skb->len < sizeof(*ddp))
-       {
+       if (skb->len < sizeof(*ddp)) {
                kfree_skb(skb);
-               return (0);
+               return 0;
        }
 
        /*
@@ -1449,26 +1521,24 @@ static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_
         * (Otherwise we'll detonate most spectacularly
         * in the middle of recvmsg()).
         */
-       if(skb->len < sizeof(*ddp))
-       {
+       if (skb->len < sizeof(*ddp)) {
                kfree_skb(skb);
-               return (0);
+               return 0;
        }
 
        /*
         * Any checksums. Note we don't do htons() on this == is assumed to be
         * valid for net byte orders all over the networking code...
         */
-       if(ddp->deh_sum && atalk_checksum(ddp, ddphv.deh_len) != ddp->deh_sum)
-       {
+       if (ddp->deh_sum && atalk_checksum(ddp, ddphv.deh_len) != ddp->deh_sum) {
                /* Not a valid AppleTalk frame - dustbin time */
                kfree_skb(skb);
-               return (0);
+               return 0;
        }
 
        /* Check the packet is aimed at us */
 
-       if(ddp->deh_dnet == 0)  /* Net 0 is 'this network' */
+       if (ddp->deh_dnet == 0) /* Net 0 is 'this network' */
                atif = atalk_find_anynet(ddp->deh_dnode, dev);
        else
                atif = atalk_find_interface(ddp->deh_dnet, ddp->deh_dnode);
@@ -1476,8 +1546,7 @@ static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_
        /* 
         * Not ours, so we route the packet via the correct AppleTalk interface.
         */
-       if(atif == NULL)
-       {
+       if (atif == NULL) {
                struct atalk_route *rt;
                struct at_addr ta;
 
@@ -1485,8 +1554,7 @@ static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_
                 * Don't route multicast, etc., packets, or packets
                 * sent to "this network" 
                 */
-               if (skb->pkt_type != PACKET_HOST || ddp->deh_dnet == 0)
-               {
+               if (skb->pkt_type != PACKET_HOST || ddp->deh_dnet == 0) {
                        /*
                         * FIX ME:
                         * Can it ever happen that a packet is from a PPP iface and needs to be broadcast onto the default network?
@@ -1495,7 +1563,7 @@ static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_
                                printk(KERN_DEBUG "AppleTalk: didn't forward broadcast packet received from PPP iface\n");
                        
                        kfree_skb(skb);
-                       return (0);
+                       return 0;
                }
 
                ta.s_net  = ddp->deh_dnet;
@@ -1503,10 +1571,9 @@ static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_
 
                /* Route the packet */
                rt = atrtr_find(&ta);
-               if(rt == NULL || ddphv.deh_hops == DDP_MAXHOPS)
-               {
+               if (rt == NULL || ddphv.deh_hops == DDP_MAXHOPS) {
                        kfree_skb(skb);
-                       return (0);
+                       return 0;
                }
                ddphv.deh_hops++;
 
@@ -1514,8 +1581,7 @@ static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_
                 * Route goes through another gateway, so
                 * set the target to the gateway instead.
                 */
-               if(rt->flags & RTF_GATEWAY)
-               {
+               if (rt->flags & RTF_GATEWAY) {
                        ta.s_net  = rt->gateway.s_net;
                        ta.s_node = rt->gateway.s_node;
                }
@@ -1539,7 +1605,7 @@ static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_
                 *
                 * Note. ddp-> becomes invalid at the realloc.
                 */
-               if(skb_headroom(skb) < 22)
+               if (skb_headroom(skb) < 22)
                        /* 22 bytes - 12 ether, 2 len, 3 802.2 5 snap */
                        skb = skb_realloc_headroom(skb, 32);
                else
@@ -1549,26 +1615,24 @@ static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_
                 * If the buffer didn't vanish into the lack of
                 * space bitbucket we can send it.
                 */
-               if(skb)
-               {
-                       if(aarp_send_ddp(rt->dev, skb, &ta, NULL) == -1)
+               if (skb) {
+                       if (aarp_send_ddp(rt->dev, skb, &ta, NULL) == -1)
                                kfree_skb(skb);
                }
 
-               return (0);
+               return 0;
        }
 
 #if defined(CONFIG_IPDDP) || defined(CONFIG_IPDDP_MODULE)
         /*
          *      Check if IP-over-DDP
          */
-        if(skb->data[12] == 22)
-        {
+        if (skb->data[12] == 22) {
                 struct net_device *dev;
 
                /* This needs to be able to handle ipddp"N" devices */
-                if((dev = __dev_get_by_name("ipddp0")) == NULL)
-                        return (-ENODEV);
+                if ((dev = __dev_get_by_name("ipddp0")) == NULL)
+                        return -ENODEV;
 
                 skb->protocol = htons(ETH_P_IP);
                 skb_pull(skb, 13);
@@ -1576,10 +1640,10 @@ static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_
                 skb->h.raw = skb->data;
 
                 ((struct net_device_stats *)dev->priv)->rx_packets++;
-                ((struct net_device_stats *)dev->priv)->rx_bytes += skb->len+13;
+                ((struct net_device_stats *)dev->priv)->rx_bytes += skb->len + 13;
                 netif_rx(skb);  /* Send the SKB up to a higher place. */
 
-                return (0);
+                return 0;
         }
 #endif
 
@@ -1593,10 +1657,10 @@ static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_
 
        sock = atalk_search_socket(&tosat, atif);
        
-       if(sock == NULL)        /* But not one of our sockets */
-       {
+       if (sock == NULL) {
+               /* But not one of our sockets */
                kfree_skb(skb);
-               return (0);
+               return 0;
        }
 
        /*
@@ -1605,10 +1669,10 @@ static int atalk_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_
         
        skb->sk = sock;
 
-       if(sock_queue_rcv_skb(sock, skb) < 0)
+       if (sock_queue_rcv_skb(sock, skb) < 0)
                kfree_skb(skb);
 
-       return (0);
+       return 0;
 }
 
 /*
@@ -1624,17 +1688,15 @@ static int ltalk_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_
        /*
         * Expand any short form frames.
         */
-       if(skb->mac.raw[2] == 1)
-       {
+       if (skb->mac.raw[2] == 1) {
                /*
                 * Find our address.
                 */
 
                ap = atalk_find_dev_addr(dev);
-               if(ap == NULL || skb->len < sizeof(struct ddpshdr))
-               {
+               if (ap == NULL || skb->len < sizeof(struct ddpshdr)) {
                        kfree_skb(skb);
-                       return (0);
+                       return 0;
                }
 
                /*
@@ -1673,57 +1735,51 @@ static int ltalk_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_
        }
        skb->h.raw = skb->data;
 
-       return (atalk_rcv(skb, dev, pt));
+       return atalk_rcv(skb, dev, pt);
 }
 
-static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, int len,
-       struct scm_cookie *scm)
+static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, int len, struct scm_cookie *scm)
 {
-       struct sock *sk=sock->sk;
-       struct sockaddr_at *usat=(struct sockaddr_at *)msg->msg_name;
+       struct sock *sk = sock->sk;
+       struct sockaddr_at *usat = (struct sockaddr_at *)msg->msg_name;
        struct sockaddr_at local_satalk, gsat;
        struct sk_buff *skb;
        struct net_device *dev;
        struct ddpehdr *ddp;
        int size;
        struct atalk_route *rt;
-       int loopback=0;
+       int loopback = 0;
        int err;
        int flags = msg->msg_flags;
 
-       if(flags & ~MSG_DONTWAIT)
-               return (-EINVAL);
+       if (flags & ~MSG_DONTWAIT)
+               return -EINVAL;
 
-       if(len > DDP_MAXSZ)
-               return (-EMSGSIZE);
+       if (len > DDP_MAXSZ)
+               return -EMSGSIZE;
 
-       if(usat)
-       {
-               if(sk->zapped)
-               {
-                       if(atalk_autobind(sk) < 0)
-                               return (-EBUSY);
+       if (usat) {
+               if(sk->zapped) {
+                       if (atalk_autobind(sk) < 0)
+                               return -EBUSY;
                }
 
-               if(msg->msg_namelen < sizeof(*usat))
-                       return (-EINVAL);
-               if(usat->sat_family != AF_APPLETALK)
-                       return (-EINVAL);
+               if (msg->msg_namelen < sizeof(*usat))
+                       return -EINVAL;
+               if (usat->sat_family != AF_APPLETALK)
+                       return -EINVAL;
 
                /* netatalk doesn't implement this check */
-               if(usat->sat_addr.s_node == ATADDR_BCAST && !sk->broadcast)
-               {
+               if (usat->sat_addr.s_node == ATADDR_BCAST && !sk->broadcast) {
                        printk(KERN_INFO "SO_BROADCAST: Fix your netatalk as it will break before 2.2\n");
 #if 0
-                       return (-EPERM);
+                       return -EPERM;
 #endif
                }
-       }
-       else
-       {
-               if(sk->state != TCP_ESTABLISHED)
-                       return (-ENOTCONN);
-               usat =& local_satalk;
+       } else {
+               if (sk->state != TCP_ESTABLISHED)
+                       return -ENOTCONN;
+               usat = &local_satalk;
                usat->sat_family = AF_APPLETALK;
                usat->sat_port   = sk->protinfo.af_at.dest_port;
                usat->sat_addr.s_node = sk->protinfo.af_at.dest_node;
@@ -1732,26 +1788,27 @@ static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, int len,
 
        /* Build a packet */
 
-       SOCK_DEBUG(sk, "SK %p: Got address.\n",sk);
+       SOCK_DEBUG(sk, "SK %p: Got address.\n", sk);
 
        /* For headers */
        size = sizeof(struct ddpehdr) + len + ddp_dl->header_length;
 
-       if(usat->sat_addr.s_net != 0 || usat->sat_addr.s_node == ATADDR_ANYNODE)
-       {
+       if (usat->sat_addr.s_net != 0 || usat->sat_addr.s_node == ATADDR_ANYNODE) {
                rt = atrtr_find(&usat->sat_addr);
-               if(rt == NULL)
-                       return (-ENETUNREACH);
+               if (rt == NULL)
+                       return -ENETUNREACH;
+
                dev = rt->dev;
-       }
-       else
-       {
+       } else {
                struct at_addr at_hint;
+
                at_hint.s_node = 0;
                at_hint.s_net  = sk->protinfo.af_at.src_net;
+
                rt = atrtr_find(&at_hint);
-               if(rt == NULL)
-                       return (-ENETUNREACH);
+               if (rt == NULL)
+                       return -ENETUNREACH;
+
                dev = rt->dev;
        }
 
@@ -1759,9 +1816,9 @@ static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, int len,
 
        size += dev->hard_header_len;
 
-       skb = sock_alloc_send_skb(sk, size, 0, flags&MSG_DONTWAIT, &err);
-       if(skb == NULL)
-               return (err);
+       skb = sock_alloc_send_skb(sk, size, 0, (flags & MSG_DONTWAIT), &err);
+       if (skb == NULL)
+               return err;
        
        skb->sk = sk;
        skb_reserve(skb, ddp_dl->header_length);
@@ -1771,7 +1828,7 @@ static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, int len,
 
        SOCK_DEBUG(sk, "SK %p: Begin build.\n", sk);
 
-       ddp = (struct ddpehdr *)skb_put(skb,sizeof(struct ddpehdr));
+       ddp = (struct ddpehdr *)skb_put(skb, sizeof(struct ddpehdr));
        ddp->deh_pad  = 0;
        ddp->deh_hops = 0;
        ddp->deh_len  = len + sizeof(*ddp);
@@ -1791,14 +1848,13 @@ static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, int len,
 
        SOCK_DEBUG(sk, "SK %p: Copy user data (%d bytes).\n", sk, len);
 
-       err = memcpy_fromiovec(skb_put(skb,len), msg->msg_iov, len);
-       if(err)
-       {
+       err = memcpy_fromiovec(skb_put(skb, len), msg->msg_iov, len);
+       if (err) {
                kfree_skb(skb);
-               return (-EFAULT);
+               return -EFAULT;
        }
 
-       if(sk->no_check == 1)
+       if (sk->no_check == 1)
                ddp->deh_sum = 0;
        else
                ddp->deh_sum = atalk_checksum(ddp, len + sizeof(*ddp));
@@ -1807,24 +1863,20 @@ static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, int len,
         * Loopback broadcast packets to non gateway targets (ie routes
         * to group we are in)
         */
-       if(ddp->deh_dnode == ATADDR_BCAST)
-       {
-               if((!(rt->flags&RTF_GATEWAY)) && (!(dev->flags&IFF_LOOPBACK)))
-               {
+       if (ddp->deh_dnode == ATADDR_BCAST) {
+               if ((!(rt->flags&RTF_GATEWAY)) && (!(dev->flags&IFF_LOOPBACK))) {
                        struct sk_buff *skb2 = skb_copy(skb, GFP_KERNEL);
-                       if(skb2)
-                       {
+                       if (skb2) {
                                loopback = 1;
                                SOCK_DEBUG(sk, "SK %p: send out(copy).\n", sk);
-                               if(aarp_send_ddp(dev, skb2, &usat->sat_addr, NULL) == -1)
+                               if (aarp_send_ddp(dev, skb2, &usat->sat_addr, NULL) == -1)
                                        kfree_skb(skb2);
                                /* else queued/sent above in the aarp queue */
                        }
                }
        }
 
-       if((dev->flags & IFF_LOOPBACK) || loopback)
-       {
+       if ((dev->flags & IFF_LOOPBACK) || loopback) {
                SOCK_DEBUG(sk, "SK %p: Loop back.\n", sk);
                /* loop back */
                skb_orphan(skb);
@@ -1834,70 +1886,60 @@ static int atalk_sendmsg(struct socket *sock, struct msghdr *msg, int len,
                skb_pull(skb,dev->hard_header_len);
                skb_pull(skb,ddp_dl->header_length);
                atalk_rcv(skb, dev, NULL);
-       }
-       else
-       {
+       } else {
                SOCK_DEBUG(sk, "SK %p: send out.\n", sk);
-               if (rt->flags & RTF_GATEWAY)
-               {
+               if (rt->flags & RTF_GATEWAY) {
                    gsat.sat_addr = rt->gateway;
                    usat = &gsat;
                }
 
-               if(aarp_send_ddp(dev, skb, &usat->sat_addr, NULL) == -1)
+               if (aarp_send_ddp(dev, skb, &usat->sat_addr, NULL) == -1)
                        kfree_skb(skb);
                /* else queued/sent above in the aarp queue */
        }
        SOCK_DEBUG(sk, "SK %p: Done write (%d).\n", sk, len);
 
-       return (len);
+       return len;
 }
 
 static int atalk_recvmsg(struct socket *sock, struct msghdr *msg, int size,
-               int flags, struct scm_cookie *scm)
+                        int flags, struct scm_cookie *scm)
 {
-       struct sock *sk=sock->sk;
-       struct sockaddr_at *sat=(struct sockaddr_at *)msg->msg_name;
+       struct sock *sk = sock->sk;
+       struct sockaddr_at *sat = (struct sockaddr_at *)msg->msg_name;
        struct ddpehdr  *ddp = NULL;
         struct ddpebits ddphv;
        int copied = 0;
        struct sk_buff *skb;
        int err = 0;
 
-
-       skb = skb_recv_datagram(sk,flags&~MSG_DONTWAIT,flags&MSG_DONTWAIT,&err);
-       if(skb == NULL)
-               return (err);
+       skb = skb_recv_datagram(sk, (flags & ~MSG_DONTWAIT),
+                               (flags & MSG_DONTWAIT), &err);
+       if (skb == NULL)
+               return err;
 
        ddp = (struct ddpehdr *)(skb->h.raw);
        *((__u16 *)&ddphv) = ntohs(*((__u16 *)ddp));
 
-       if(sk->type == SOCK_RAW)
-       {
+       if (sk->type == SOCK_RAW) {
                copied = ddphv.deh_len;
-               if(copied > size)
-               {
+               if (copied > size) {
                        copied = size;
                        msg->msg_flags |= MSG_TRUNC;
                }
 
                err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
-       }
-       else
-       {
+       } else {
                copied = ddphv.deh_len - sizeof(*ddp);
-               if(copied > size)
-               {
+               if (copied > size) {
                        copied = size;
                        msg->msg_flags |= MSG_TRUNC;
                }
-               err = skb_copy_datagram_iovec(skb,sizeof(*ddp),msg->msg_iov,copied);
+               err = skb_copy_datagram_iovec(skb, sizeof(*ddp), msg->msg_iov, copied);
        }
 
-       if(!err)
-       {
-               if(sat)
-               {
+       if (!err) {
+               if (sat) {
                        sat->sat_family      = AF_APPLETALK;
                        sat->sat_port        = ddp->deh_sport;
                        sat->sat_addr.s_node = ddp->deh_snode;
@@ -1908,7 +1950,7 @@ static int atalk_recvmsg(struct socket *sock, struct msghdr *msg, int size,
 
        skb_free_datagram(sk, skb);     /* Free the datagram. */
 
-       return (err ? err : (copied));
+       return err ? err : copied;
 }
 
 
index a24bb5053cdeb6e0a773a1f2b624f308e4d933e5..09115507697ccfea035faa691bfc557e0010cea1 100644 (file)
@@ -38,7 +38,6 @@
 #include <linux/if_ec.h>
 #include <net/udp.h>
 #include <net/ip.h>
-#include <linux/inetdevice.h>
 #include <linux/spinlock.h>
 
 #include <asm/uaccess.h>
index d99e539579cee691fb59281c1bebeb15e240ae7d..5860bc446db4f1015e1991e9e321058bfa0d3797 100644 (file)
@@ -216,8 +216,10 @@ EXPORT_SYMBOL(scm_detach_fds);
 
 #if defined(CONFIG_BRIDGE) || defined(CONFIG_BRIDGE_MODULE)
 EXPORT_SYMBOL(br_handle_frame_hook);
+#ifdef CONFIG_INET
 EXPORT_SYMBOL(br_ioctl_hook);
 #endif
+#endif
 
 #ifdef CONFIG_INET
 /* Internet layer registration */