patch-2.4.4 linux/drivers/scsi/advansys.c

Next file: linux/drivers/scsi/advansys.h
Previous file: linux/drivers/scsi/AM53C974.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.3/linux/drivers/scsi/advansys.c linux/drivers/scsi/advansys.c
@@ -1,10 +1,10 @@
-/* $Id: advansys.c,v 1.69 1999/11/29 18:37:53 bobf Exp bobf $ */
-#define ASC_VERSION "3.2M"    /* AdvanSys Driver Version */
+#define ASC_VERSION "3.3G"    /* AdvanSys Driver Version */
 
 /*
  * advansys.c - Linux Host Driver for AdvanSys SCSI Adapters
- * 
- * Copyright (c) 1995-1999 Advanced System Products, Inc.
+ *
+ * Copyright (c) 1995-2000 Advanced System Products, Inc.
+ * Copyright (c) 2000-2001 ConnectCom Solutions, Inc.
  * All Rights Reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -12,52 +12,51 @@
  * code retain the above copyright notice and this comment without
  * modification.
  *
+ * As of March 8, 2000 Advanced System Products, Inc. (AdvanSys)
+ * changed its name to ConnectCom Solutions, Inc.
+ *
  * There is an AdvanSys Linux WWW page at:
+ *  http://www.connectcom.net/downloads/software/os/linux.html
  *  http://www.advansys.com/linux.html
  *
- * The latest version of the AdvanSys driver is available at:
+ * The latest released version of the AdvanSys driver is available at:
  *  ftp://ftp.advansys.com/pub/linux/linux.tgz
+ *  ftp://ftp.connectcom.net/pub/linux/linux.tgz
  *
  * Please send questions, comments, bug reports to:
- *  linux@advansys.com
+ *  support@connectcom.net
  */
 
 /*
 
   Documentation for the AdvanSys Driver
 
-  A. Linux Kernel Testing
+  A. Linux Kernels Supported by this Driver
   B. Adapters Supported by this Driver
-  C. Linux v1.2.X - Directions for Adding the AdvanSys Driver
-  D. Linux v1.3.1 - v1.3.57 - Directions for Adding the AdvanSys Driver
-  E. Linux v1.3.58 and Newer - Upgrading the AdvanSys Driver
-  F. Source Comments
-  G. Driver Compile Time Options and Debugging
-  H. Driver LILO Option
-  I. Release History
-  J. Known Problems/Fix List
-  K. Credits
-  L. AdvanSys Contact Information
-
-  A. Linux Kernel Testing
-
-     This driver has been tested in the following Linux kernels: v1.2.13,
-     v1.3.57, v2.0.38, v2.2.13, and v2.3.28. These kernel versions are major
-     releases of Linux or the latest Linux kernel versions available when
-     this version of the driver was released. The driver should also work
-     in earlier versions of the Linux kernel. Beginning with v1.3.58 the
-     AdvanSys driver is included with all Linux kernels. Please refer to
-     sections C, D, and E for instructions on adding or upgrading the
-     AdvanSys driver. The driver is supported for x86 and alpha systems.
+  C. Linux source files modified by AdvanSys Driver
+  D. Source Comments
+  E. Driver Compile Time Options and Debugging
+  F. Driver LILO Option
+  G. Tests to run before releasing new driver
+  H. Release History
+  I. Known Problems/Fix List
+  J. Credits (Chronological Order)
+  K. ConnectCom (AdvanSys) Contact Information
+
+  A. Linux Kernels Supported by this Driver
+
+     This driver has been tested in the following Linux kernels: v2.2.18
+     v2.4.0. The driver is supported on v2.2 and v2.4 kernels and on x86,
+     alpha, and PowerPC platforms.
 
   B. Adapters Supported by this Driver
- 
+
      AdvanSys (Advanced System Products, Inc.) manufactures the following
      RISC-based, Bus-Mastering, Fast (10 Mhz) and Ultra (20 Mhz) Narrow
      (8-bit transfer) SCSI Host Adapters for the ISA, EISA, VL, and PCI
      buses and RISC-based, Bus-Mastering, Ultra (20 Mhz) Wide (16-bit
      transfer) SCSI Host Adapters for the PCI bus.
-     
+
      The CDB counts below indicate the number of SCSI CDB (Command
      Descriptor Block) requests that can be stored in the RISC chip
      cache and board LRAM. A CDB is a single SCSI command. The driver
@@ -65,6 +64,9 @@
      adapter detected. The number of CDBs used by the driver can be
      lowered in the BIOS by changing the 'Host Queue Size' adapter setting.
 
+     Laptop Products:
+        ABP-480 - Bus-Master CardBus (16 CDB) (2.4 kernel and greater)
+
      Connectivity Products:
         ABP510/5150 - Bus-Master ISA (240 CDB)
         ABP5140 - Bus-Master ISA PnP (16 CDB)
@@ -80,7 +82,7 @@
         ABP930UA - Bus-Master PCI Ultra (16 CDB)
         ABP960 - Bus-Master PCI MAC/PC (16 CDB)
         ABP960U - Bus-Master PCI MAC/PC Ultra (16 CDB)
-     
+
      Single Channel Products:
         ABP542 - Bus-Master ISA with floppy (240 CDB)
         ABP742 - Bus-Master EISA (240 CDB)
@@ -94,7 +96,7 @@
         ABP940UW/3940UW - Bus-Master PCI Ultra-Wide (253 CDB)
         ABP970UW - Bus-Master PCI MAC/PC Ultra-Wide (253 CDB)
         ABP3940U2W - Bus-Master PCI LVD/Ultra2-Wide (253 CDB)
-     
+
      Multi-Channel Products:
         ABP752 - Dual Channel Bus-Master EISA (240 CDB Per Channel)
         ABP852 - Dual Channel Bus-Master VL (240 CDB Per Channel)
@@ -104,37 +106,33 @@
         ABP980U - Four Channel Bus-Master PCI Ultra (240 CDB Per Channel)
         ABP980UA/3980UA - Four Channel Bus-Master PCI Ultra (16 CDB Per Chan.)
         ABP3950U2W - Bus-Master PCI LVD/Ultra2-Wide and Ultra-Wide (253 CDB)
-     
-  C. Linux v1.2.X - Directions for Adding the AdvanSys Driver
+        ABP3950U3W - Bus-Master PCI Dual LVD2/Ultra3-Wide (253 CDB)
+
+  C. Linux source files modified by AdvanSys Driver
+
+     This section for historical purposes documents the changes
+     originally made to the Linux kernel source to add the advansys
+     driver. As Linux has changed some of these files have also
+     been modified.
+
+     1. linux/arch/i386/config.in:
 
-     These directions apply to v1.2.13. For versions that follow v1.2.13.
-     but precede v1.3.57 some of the changes for Linux v1.3.X listed
-     below may need to be modified or included. A patch is available
-     for v1.2.13 from the AdvanSys WWW and FTP sites.
- 
-     There are two source files: advansys.h and advansys.c. Copy
-     both of these files to the directory /usr/src/linux/drivers/scsi.
-    
-     1. Add the following line to /usr/src/linux/arch/i386/config.in
-        after "comment 'SCSI low-level drivers'":
-    
           bool 'AdvanSys SCSI support' CONFIG_SCSI_ADVANSYS y
-    
-     2. Add the following lines to /usr/src/linux/drivers/scsi/hosts.c
-        after "#include "hosts.h"":
-    
+
+     2. linux/drivers/scsi/hosts.c:
+
           #ifdef CONFIG_SCSI_ADVANSYS
           #include "advansys.h"
           #endif
-    
+
         and after "static Scsi_Host_Template builtin_scsi_hosts[] =":
-    
+
           #ifdef CONFIG_SCSI_ADVANSYS
           ADVANSYS,
           #endif
-    
-     3. Add the following lines to /usr/src/linux/drivers/scsi/Makefile:
-    
+
+     3. linux/drivers/scsi/Makefile:
+
           ifdef CONFIG_SCSI_ADVANSYS
           SCSI_SRCS := $(SCSI_SRCS) advansys.c
           SCSI_OBJS := $(SCSI_OBJS) advansys.o
@@ -142,12 +140,7 @@
           SCSI_MODULE_OBJS := $(SCSI_MODULE_OBJS) advansys.o
           endif
 
-     4. (Optional) If you would like to enable the LILO command line
-        and /etc/lilo.conf 'advansys' option, make the following changes.
-        This option can be used to disable I/O port scanning or to limit
-        I/O port scanning to specific addresses. Refer to the 'Driver
-        LILO Option' section below. Add the following lines to
-        /usr/src/linux/init/main.c in the prototype section:
+     4. linux/init/main.c:
 
           extern void advansys_setup(char *str, int *ints);
 
@@ -157,118 +150,19 @@
              { "advansys=", advansys_setup },
           #endif
 
-     5. If you have the HP 4020i CD-R driver and Linux v1.2.X you should
-        add a fix to the CD-ROM target driver. This fix will allow
-        you to mount CDs with the iso9660 file system. Linux v1.3.X
-        already has this fix. In the file /usr/src/linux/drivers/scsi/sr.c
-        and function get_sectorsize() after the line:
-
-        if(scsi_CDs[i].sector_size == 0) scsi_CDs[i].sector_size = 2048;
-
-        add the following line:
-
-        if(scsi_CDs[i].sector_size == 2340) scsi_CDs[i].sector_size = 2048;
-
-     6. In the directory /usr/src/linux run 'make config' to configure
-        the AdvanSys driver, then run 'make vmlinux' or 'make zlilo' to
-        make the kernel. If the AdvanSys driver is not configured, then
-        a loadable module can be built by running 'make modules' and
-        'make modules_install'. Use 'insmod' and 'rmmod' to install
-        and remove advansys.o.
- 
-  D. Linux v1.3.1 - v1.3.57 - Directions for Adding the AdvanSys Driver
-
-     These directions apply to v1.3.57. For versions that precede v1.3.57
-     some of these changes may need to be modified or eliminated. A patch
-     is available for v1.3.57 from the AdvanSys WWW and FTP sites.
-     Beginning with v1.3.58 this driver is included with the Linux
-     distribution eliminating the need for making any changes.
-
-     There are two source files: advansys.h and advansys.c. Copy
-     both of these files to the directory /usr/src/linux/drivers/scsi.
-   
-     1. Add the following line to /usr/src/linux/drivers/scsi/Config.in
-        after "comment 'SCSI low-level drivers'":
-   
-          dep_tristate 'AdvanSys SCSI support' CONFIG_SCSI_ADVANSYS $CONFIG_SCSI
-   
-     2. Add the following lines to /usr/src/linux/drivers/scsi/hosts.c
-        after "#include "hosts.h"":
-   
-          #ifdef CONFIG_SCSI_ADVANSYS
-          #include "advansys.h"
-          #endif
-   
-        and after "static Scsi_Host_Template builtin_scsi_hosts[] =":
-   
-          #ifdef CONFIG_SCSI_ADVANSYS
-          ADVANSYS,
-          #endif
-   
-     3. Add the following lines to /usr/src/linux/drivers/scsi/Makefile:
-   
-          ifeq ($(CONFIG_SCSI_ADVANSYS),y)
-          L_OBJS += advansys.o
-          else
-            ifeq ($(CONFIG_SCSI_ADVANSYS),m)
-            M_OBJS += advansys.o
-            endif
-          endif
-   
-     4. Add the following line to /usr/src/linux/include/linux/proc_fs.h
-        in the enum scsi_directory_inos array:
-   
-          PROC_SCSI_ADVANSYS,
-   
-     5. (Optional) If you would like to enable the LILO command line
-        and /etc/lilo.conf 'advansys' option, make the following changes.
-        This option can be used to disable I/O port scanning or to limit
-        I/O port scanning to specific addresses. Refer to the 'Driver
-        LILO Option' section below. Add the following lines to
-        /usr/src/linux/init/main.c in the prototype section:
-   
-          extern void advansys_setup(char *str, int *ints);
-   
-        and add the following lines to the bootsetups[] array.
-   
-          #ifdef CONFIG_SCSI_ADVANSYS
-             { "advansys=", advansys_setup },
-          #endif
-   
-     6. In the directory /usr/src/linux run 'make config' to configure
-        the AdvanSys driver, then run 'make vmlinux' or 'make zlilo' to
-        make the kernel. If the AdvanSys driver is not configured, then
-        a loadable module can be built by running 'make modules' and
-        'make modules_install'. Use 'insmod' and 'rmmod' to install
-        and remove advansys.o.
-
-  E. Linux v1.3.58 and Newer - Upgrading the AdvanSys Driver
-
-     To upgrade the AdvanSys driver in a Linux v1.3.58 and newer
-     kernel, first check the version of the current driver. The
-     version is defined by the manifest constant ASC_VERSION at
-     the beginning of advansys.c. The new driver should have a
-     ASC_VERSION value greater than the current version. To install
-     the new driver rename advansys.c and advansys.h in the Linux
-     kernel source tree drivers/scsi directory to different names
-     or save them to a different directory in case you want to revert
-     to the old version of the driver. After the old driver is saved
-     copy the new advansys.c and advansys.h to drivers/scsi, rebuild
-     the kernel, and install the new kernel. No other changes are needed.
+  D. Source Comments
 
-  F. Source Comments
- 
      1. Use tab stops set to 4 for the source files. For vi use 'se tabstops=4'.
- 
+
      2. This driver should be maintained in multiple files. But to make
         it easier to include with Linux and to follow Linux conventions,
         the whole driver is maintained in the source files advansys.h and
         advansys.c. In this file logical sections of the driver begin with
         a comment that contains '---'. The following are the logical sections
         of the driver below.
- 
+
            --- Linux Version
-           --- Linux Include Files 
+           --- Linux Include File
            --- Driver Options
            --- Debugging Header
            --- Asc Library Constants and Macros
@@ -285,27 +179,27 @@
            --- Tracing and Debugging Functions
            --- Asc Library Functions
            --- Adv Library Functions
- 
+
      3. The string 'XXX' is used to flag code that needs to be re-written
         or that contains a problem that needs to be addressed.
- 
+
      4. I have stripped comments from and reformatted the source for the
         Asc Library and Adv Library to reduce the size of this file. This
         source can be found under the following headings. The Asc Library
         is used to support Narrow Boards. The Adv Library is used to
         support Wide Boards.
- 
+
            --- Asc Library Constants and Macros
            --- Adv Library Constants and Macros
            --- Asc Library Functions
            --- Adv Library Functions
- 
-  G. Driver Compile Time Options and Debugging
- 
+
+  E. Driver Compile Time Options and Debugging
+
      In this source file the following constants can be defined. They are
      defined in the source below. Both of these options are enabled by
      default.
- 
+
      1. ADVANSYS_ASSERT - Enable driver assertions (Def: Enabled)
 
         Enabling this option adds assertion logic statements to the
@@ -325,11 +219,11 @@
         the kernel name space. This option is very useful for debugging
         the driver, but it will add to the size of the driver execution
         image and add overhead to the execution of the driver.
- 
+
         The amount of debugging output can be controlled with the global
         variable 'asc_dbglvl'. The higher the number the more output. By
         default the debug level is 0.
-        
+
         If the driver is loaded at boot time and the LILO Driver Option
         is included in the system, the debug level can be changed by
         specifying a 5th (ASC_NUM_IOPORT_PROBE + 1) I/O Port. The
@@ -343,28 +237,44 @@
         If the driver is built as a loadable module this variable can be
         defined when the driver is loaded. The following insmod command
         will set the debug level to one.
-  
+
            insmod advansys.o asc_dbglvl=1
- 
+
         Debugging Message Levels:
            0: Errors Only
            1: High-Level Tracing
            2-N: Verbose Tracing
- 
-        I don't know the approved way for turning on printk()s to the
-        console. Here's a program I use to do this. Debug output is
-        logged in /var/adm/messages.
- 
+
+        To enable debug output to console, please make sure that:
+
+        a. System and kernel logging is enabled (syslogd, klogd running).
+        b. Kernel messages are routed to console output. Check
+           /etc/syslog.conf for an entry similar to this:
+
+                kern.*                  /dev/console
+
+        c. klogd is started with the appropriate -c parameter
+           (e.g. klogd -c 8)
+
+        This will cause printk() messages to be be displayed on the
+        current console. Refer to the klogd(8) and syslogd(8) man pages
+        for details.
+
+        Alternatively you can enable printk() to console with this
+        program. However, this is not the 'official' way to do this.
+        Debug output is logged in /var/log/messages.
+
           main()
           {
                   syscall(103, 7, 0, 0);
           }
- 
-        I found that increasing LOG_BUF_LEN to 40960 in kernel/printk.c
-        prevents most level 1 debug messages from being lost.
+
+        Increasing LOG_BUF_LEN in kernel/printk.c to something like
+        40960 allows more debug messages to be buffered in the kernel
+        and written to the console or log file.
 
      3. ADVANSYS_STATS - Enable statistics (Def: Enabled >= v1.3.0)
- 
+
         Enabling this option adds statistics collection and display
         through /proc to the driver. The information is useful for
         monitoring driver and device performance. It will add to the
@@ -387,8 +297,8 @@
         When ADVANSYS_STATS is not defined the AdvanSys /proc files only
         contain adapter and device configuration information.
 
-  H. Driver LILO Option
- 
+  F. Driver LILO Option
+
      If init/main.c is modified as described in the 'Directions for Adding
      the AdvanSys Driver to Linux' section (B.4.) above, the driver will
      recognize the 'advansys' LILO command line and /etc/lilo.conf option.
@@ -418,9 +328,24 @@
      the 'Driver Compile Time Options and Debugging' section above for
      more information.
 
-  I. Release History
+  G. Tests to run before releasing new driver
+
+     1. In the supported kernels verify there are no warning or compile
+        errors when the kernel is built as both a driver and as a module
+        and with the following options:
+
+        ADVANSYS_DEBUG - enabled and disabled
+        CONFIG_SMP - enabled and disabled
+        CONFIG_PROC_FS - enabled and disabled
+
+     2. Run tests on an x86, alpha, and PowerPC with at least one narrow
+        card and one wide card attached to a hard disk and CD-ROM drive:
+        fdisk, mkfs, fsck, bonnie, copy/compare test from the
+        CD-ROM to the hard drive.
+
+  H. Release History
 
-     BETA-1.0 (12/23/95): 
+     BETA-1.0 (12/23/95):
          First Release
 
      BETA-1.1 (12/28/95):
@@ -454,7 +379,7 @@
          4. Remove reset request loop problem from the "Known Problems or
             Issues" section. This problem was isolated and fixed in the
             mid-level SCSI driver.
-        
+
      1.5 (8/8/96):
          1. Add support for ABP-940U (PCI Ultra) adapter.
          2. Add support for IRQ sharing by setting the SA_SHIRQ flag for
@@ -677,7 +602,75 @@
          1. Really fix bug in adv_get_sglist().
          2. Incorporate v2.3.29 changes into driver.
 
-  J. Known Problems/Fix List (XXX)
+     3.2N (4/1/00):
+         1. Add CONFIG_ISA ifdef code.
+         2. Include advansys_interrupts_enabled name change patch.
+         3. For >= v2.3.28 use new SCSI error handling with new function
+            advansys_eh_bus_reset(). Don't include an abort function
+            because of base library limitations.
+         4. For >= v2.3.28 use per board lock instead of io_request_lock.
+         5. For >= v2.3.28 eliminate advansys_command() and
+            advansys_command_done().
+         6. Add some changes for PowerPC (Big Endian) support, but it isn't
+            working yet.
+         7. Fix "nonexistent resource free" problem that occurred on a module
+            unload for boards with an I/O space >= 255. The 'n_io_port' field
+            is only one byte and can not be used to hold an ioport length more
+            than 255.
+
+     3.3A (4/4/00):
+         1. Update to Adv Library 5.8.
+         2. For wide cards add support for CDBs up to 16 bytes.
+         3. Eliminate warnings when CONFIG_PROC_FS is not defined.
+
+     3.3B (5/1/00):
+         1. Support for PowerPC (Big Endian) wide cards. Narrow cards
+            still need work.
+         2. Change bitfields to shift and mask access for endian
+            portability.
+
+     3.3C (10/13/00):
+         1. Update for latest 2.4 kernel.
+         2. Test ABP-480 CardBus support in 2.4 kernel - works!
+         3. Update to Asc Library S123.
+         4. Update to Adv Library 5.12.
+
+     3.3D (11/22/00):
+         1. Update for latest 2.4 kernel.
+         2. Create patches for 2.2 and 2.4 kernels.
+
+     3.3E (1/9/01):
+         1. Now that 2.4 is released remove ifdef code for kernel versions
+            less than 2.2. The driver is now only supported in kernels 2.2,
+            2.4, and greater.
+         2. Add code to release and acquire the io_request_lock in
+            the driver entrypoint functions: advansys_detect and
+            advansys_queuecommand. In kernel 2.4 the SCSI mid-level driver
+            still holds the io_request_lock on entry to SCSI low-level drivers.
+            This was supposed to be removed before 2.4 was released but never
+            happened. When the mid-level SCSI driver is changed all references
+            to the io_request_lock should be removed from the driver.
+         3. Simplify error handling by removing advansys_abort(),
+            AscAbortSRB(), AscResetDevice(). SCSI bus reset requests are
+            now handled by resetting the SCSI bus and fully re-initializing
+            the chip. This simple method of error recovery has proven to work
+            most reliably after attempts at different methods. Also now only
+            support the "new" error handling method and remove the obsolete
+            error handling interface.
+         4. Fix debug build errors.
+
+     3.3F (1/24/01):
+         1. Merge with ConnectCom version from Andy Kellner which
+            updates Adv Library to 5.14.
+         2. Make PowerPC (Big Endian) work for narrow cards and
+            fix problems writing EEPROM for wide cards.
+         3. Remove interrupts_enabled assertion function.
+
+     3.3G (2/16/01):
+         1. Return an error from narrow boards if passed a 16 byte
+            CDB. The wide board can already handle 16 byte CDBs.
+
+  I. Known Problems/Fix List (XXX)
 
      1. Need to add memory mapping workaround. Test the memory mapping.
         If it doesn't work revert to I/O port access. Can a test be done
@@ -687,12 +680,12 @@
         has not occurred then print a message and run in polled mode.
      3. Allow bus type scanning order to be changed.
      4. Need to add support for target mode commands, cf. CAM XPT.
-     5  Need to add support for new Linux SCSI error handling method.
-     6. Need to fix sti/cli code in Asc Library.
-     7. Need to fix abort code in Adv Library.
-     8. Reduce io_request_lock hold time.
 
-  K. Credits
+  J. Credits (Chronological Order)
+
+     Bob Frey <bfrey@turbolinux.com.cn> wrote the AdvanSys SCSI driver
+     and maintained it up to 3.3F. He continues to answer questions
+     and help maintain the driver.
 
      Nathan Hartwell <mage@cdc3.cdc.net> provided the directions and
      basis for the Linux v1.3.X changes which were included in the
@@ -712,22 +705,47 @@
      support in the 3.1A driver.
 
      Doug Gilbert <dgilbert@interlog.com> has made changes and
-     suggestions to improve the driver and done testing.
+     suggestions to improve the driver and done a lot of testing.
 
      Ken Mort <ken@mort.net> reported a DEBUG compile bug fixed
      in 3.2K.
 
-  L. AdvanSys Contact Information
- 
-     Mail:                   Advanced System Products, Inc.
+     Tom Rini <trini@kernel.crashing.org> provided the CONFIG_ISA
+     patch and helped with PowerPC wide and narrow board support.
+
+     Philip Blundell <philip.blundell@pobox.com> provided an
+     advansys_interrupts_enabled patch.
+
+     Dave Jones <dave@denial.force9.co.uk> reported the compiler
+     warnings generated when CONFIG_PROC_FS was not defined in
+     the 3.2M driver.
+
+     Jerry Quinn <jlquinn@us.ibm.com> fixed PowerPC support (endian
+     problems) for wide cards.
+
+     Bryan Henderson <bryanh@giraffe-data.com> helped debug narrow
+     card error handling.
+
+     Manuel Veloso <veloso@pobox.com> worked hard on PowerPC narrow
+     board support and fixed a bug in AscGetEEPConfig().
+
+     Arnaldo Carvalho de Melo <acme@conectiva.com.br> made
+     save_flags/restore_flags changes.
+
+     Andy Kellner <AKellner@connectcom.net> continues the Advansys SCSI
+     driver development for ConnectCom (Version > 3.3F).
+
+  K. ConnectCom (AdvanSys) Contact Information
+
+     Mail:                   ConnectCom Solutions, Inc.
                              1150 Ringwood Court
                              San Jose, CA 95131
      Operator/Sales:         1-408-383-9400
      FAX:                    1-408-383-9612
      Tech Support:           1-408-467-2930
-     Tech Support E-Mail:    support@advansys.com
-     FTP Site:               ftp.advansys.com (login: anonymous)
-     Web Site:               http://www.advansys.com
+     Tech Support E-Mail:    linux@connectcom.net
+     FTP Site:               ftp.connectcom.net (login: anonymous)
+     Web Site:               http://www.connectcom.net
 
 */
 
@@ -736,78 +754,62 @@
  * --- Linux Version
  */
 
-/* Convert Linux Version, Patch-level, Sub-level to LINUX_VERSION_CODE. */
-#define ASC_LINUX_VERSION(V, P, S)    (((V) * 65536) + ((P) * 256) + (S))
-
 #ifndef LINUX_VERSION_CODE
 #include <linux/version.h>
 #endif /* LINUX_VERSION_CODE */
 
+/* Convert Linux Version, Patch-level, Sub-level to LINUX_VERSION_CODE. */
+#define ASC_LINUX_VERSION(V, P, S)    (((V) * 65536) + ((P) * 256) + (S))
+#define ASC_LINUX_KERNEL22 (LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0))
+#define ASC_LINUX_KERNEL24 (LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,4,0))
+
+/* Driver supported only in version 2.2 and version >= 2.4. */
+#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,2,0) || \
+    (LINUX_VERSION_CODE > ASC_LINUX_VERSION(2,3,0) && \
+     LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0))
+#error "AdvanSys driver supported only in 2.2 and 2.4 or greater kernels."
+#endif
 
 /*
- * --- Linux Include Files 
+ * --- Linux Include Files
  */
 
 #include <linux/config.h>
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
 #ifdef MODULE
 #include <linux/module.h>
 #endif /* MODULE */
-#endif /* version >= v1.3.0 */
+
+#if defined(CONFIG_X86) && !defined(CONFIG_ISA)
+#define CONFIG_ISA
+#endif /* CONFIG_X86 && !CONFIG_ISA */
+
 #include <linux/string.h>
 #include <linux/sched.h>
 #include <linux/kernel.h>
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,0)
-#include <linux/head.h>
-#endif /* verions < v2.1.0 */
 #include <linux/types.h>
 #include <linux/ioport.h>
 #include <linux/delay.h>
-#include <linux/slab.h>
+#include <linux/malloc.h>
 #include <linux/mm.h>
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
 #include <linux/proc_fs.h>
-#endif /* version >= v1.3.0 */
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,23)
 #include <linux/init.h>
-#endif /* version >= v2.1.23 */
 #include <asm/io.h>
 #include <asm/system.h>
 #include <asm/dma.h>
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
-#include "../block/blk.h"
-#else /* version >= v1.3.0 */
 #include <linux/blk.h>
 #include <linux/stat.h>
-#endif /* version >= v1.3.0 */
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,18)
+#if ASC_LINUX_KERNEL24
 #include <linux/spinlock.h>
-#elif LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,95)
+#elif ASC_LINUX_KERNEL22
 #include <asm/spinlock.h>
-#endif /* version >= 2.1.95 */
+#endif
 #include "scsi.h"
 #include "hosts.h"
 #include "sd.h"
 #include "advansys.h"
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,93)
 #ifdef CONFIG_PCI
 #include <linux/pci.h>
 #endif /* CONFIG_PCI */
-#else /* version < v2.1.93 */
-/*
- * For earlier than v2.1.93 the driver has its own PCI configuration.
- * If PCI is not needed in a kernel before v2.1.93 this define can be
- * turned-off to make the driver object smaller.
- */
-#define ASC_CONFIG_PCI
-#endif /* version < v2.1.93 */
-
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,0)
-#define cpu_to_le16(word)       (word)
-#define le16_to_cpu(word)       (word)
-#define cpu_to_le32(dword)      (dword)
-#define le32_to_cpu(dword)      (dword)
-#endif /* version < v2.1.0 */
 
 
 /*
@@ -817,19 +819,12 @@
 /* Enable driver assertions. */
 #define ADVANSYS_ASSERT
 
+/* Enable driver /proc statistics. */
+#define ADVANSYS_STATS
+
 /* Enable driver tracing. */
 /* #define ADVANSYS_DEBUG */
 
-/*
- * Because of no /proc to display them, statistics are disabled
- * for versions prior to v1.3.0.
- */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
-#undef ADVANSYS_STATS /* Disable statistics */
-#else /* version >= v1.3.0 */
-#define ADVANSYS_STATS /* Enable statistics. */
-#endif /* version >= v1.3.0 */
-
 
 /*
  * --- Debugging Header
@@ -848,7 +843,7 @@
 
 #define ASC_LIB_VERSION_MAJOR  1
 #define ASC_LIB_VERSION_MINOR  24
-#define ASC_LIB_SERIAL_NUMBER  121
+#define ASC_LIB_SERIAL_NUMBER  123
 
 /*
  * Portable Data Types
@@ -858,7 +853,7 @@
  * types must be used. In Linux the char, short, and int types
  * are all consistent at 8, 16, and 32 bits respectively. Pointers
  * and long types are 64 bits on Alpha and UltraSPARC.
- */ 
+ */
 #define ASC_PADDR __u32         /* Physical/Bus address data type. */
 #define ASC_VADDR __u32         /* Virtual address data type. */
 #define ASC_DCNT  __u32         /* Unsigned Data count type. */
@@ -907,7 +902,7 @@
 #define ASC_PCI_VENDORID                  0x10CD
 #define ASC_PCI_DEVICEID_1200A            0x1100
 #define ASC_PCI_DEVICEID_1200B            0x1200
-#define ASC_PCI_DEVICEID_ULTRA            0x1300 
+#define ASC_PCI_DEVICEID_ULTRA            0x1300
 #define ASC_PCI_REVISION_3150             0x02
 #define ASC_PCI_REVISION_3050             0x03
 
@@ -924,13 +919,13 @@
 #define CC_VERY_LONG_SG_LIST 0
 #define ASC_SRB2SCSIQ(srb_ptr)  (srb_ptr)
 
-#define PortAddr            unsigned short    /* port address size  */
-#define inp(port)           inb(port)
-#define inpw(port)          inw(port)
-#define inpl(port)          inl(port)
-#define outp(port, byte)    outb((byte), (port))
-#define outpw(port, word)   outw((word), (port))
-#define outpl(port, dword) outl((dword), (port))
+#define PortAddr                 unsigned short    /* port address size  */
+#define inp(port)                inb(port)
+#define outp(port, byte)         outb((byte), (port))
+
+#define inpw(port)               inw(port)
+#define outpw(port, word)        outw((word), (port))
+
 #define ASC_MAX_SG_QUEUE    7
 #define ASC_MAX_SG_LIST     255
 
@@ -977,12 +972,7 @@
 #define ASC_MAX_ISA_DMA_COUNT   (0x00FFFFFFL)
 #define ASC_MAX_EISA_DMA_ADDR   (0x07FFFFFFL)
 #define ASC_MAX_EISA_DMA_COUNT  (0x07FFFFFFL)
-#ifndef inpw_noswap
-#define inpw_noswap(port)         inpw(port)
-#endif
-#ifndef outpw_noswap
-#define outpw_noswap(port, data)  outpw(port, data)
-#endif
+
 #define ASC_SCSI_ID_BITS  3
 #define ASC_SCSI_TIX_TYPE     uchar
 #define ASC_ALL_DEVICE_BIT_SET  0xFF
@@ -1024,6 +1014,8 @@
 #define SCSICMD_ReadHeader        0x44
 #define SCSICMD_ModeSelect10      0x55
 #define SCSICMD_ModeSense10       0x5A
+
+/* Inquiry Data Peripheral Device Types */
 #define SCSI_TYPE_DASD     0x00
 #define SCSI_TYPE_SASD     0x01
 #define SCSI_TYPE_PRN      0x02
@@ -1035,10 +1027,20 @@
 #define SCSI_TYPE_MED_CHG  0x08
 #define SCSI_TYPE_COMM     0x09
 #define SCSI_TYPE_UNKNOWN  0x1F
-#define SCSI_TYPE_NO_DVC   0xFF
-#define INQ_CLOCKING_ST_ONLY    0x0
-#define INQ_CLOCKING_DT_ONLY    0x1
-#define INQ_CLOCKING_ST_AND_DT  0x3
+
+#define ADV_INQ_CLOCKING_ST_ONLY    0x0
+#define ADV_INQ_CLOCKING_DT_ONLY    0x1
+#define ADV_INQ_CLOCKING_ST_AND_DT  0x3
+
+/*
+ * Inquiry SPC-2 SPI Byte 1 EVPD (Enable Vital Product Data)
+ * and CmdDt (Command Support Data) field bit definitions.
+ */
+#define ADV_INQ_RTN_VPD_AND_CMDDT           0x3
+#define ADV_INQ_RTN_CMDDT_FOR_OP_CODE       0x2
+#define ADV_INQ_RTN_VPD_FOR_PG_CODE         0x1
+#define ADV_INQ_RTN_STD_INQUIRY_DATA        0x0
+
 #define ASC_SCSIDIR_NOCHK    0x00
 #define ASC_SCSIDIR_T2H      0x08
 #define ASC_SCSIDIR_H2T      0x10
@@ -1102,77 +1104,49 @@
 #define M2_QTAG_MSG_ORDERED     0x22
 #define M2_IGNORE_WIDE_RESIDUE  0x23
 
-typedef struct {
-    uchar               peri_dvc_type:5;
-    uchar               peri_qualifier:3;
-} ASC_SCSI_INQ0;
-
-typedef struct {
-    uchar               dvc_type_modifier:7;
-    uchar               rmb:1;
-} ASC_SCSI_INQ1;
-
-typedef struct {
-    uchar               ansi_apr_ver:3;
-    uchar               ecma_ver:3;
-    uchar               iso_ver:2;
-} ASC_SCSI_INQ2;
-
-typedef struct {
-    uchar               rsp_data_fmt:4;
-    uchar               res:2;
-    uchar               TemIOP:1;
-    uchar               aenc:1;
-} ASC_SCSI_INQ3;
-
-typedef struct {
-    uchar               StfRe:1;
-    uchar               CmdQue:1;
-    uchar               Reserved:1;
-    uchar               Linked:1;
-    uchar               Sync:1;
-    uchar               WBus16:1;
-    uchar               WBus32:1;
-    uchar               RelAdr:1;
-} ASC_SCSI_INQ7;
+/*
+ * Inquiry data structure and bitfield macros
+ *
+ * Only quantities of more than 1 bit are shifted, since the others are
+ * just tested for true or false. C bitfields aren't portable between big
+ * and little-endian platforms so they are not used.
+ */
+
+#define ASC_INQ_DVC_TYPE(inq)       ((inq)->periph & 0x1f)
+#define ASC_INQ_QUALIFIER(inq)      (((inq)->periph & 0xe0) >> 5)
+#define ASC_INQ_DVC_TYPE_MOD(inq)   ((inq)->devtype & 0x7f)
+#define ASC_INQ_REMOVABLE(inq)      ((inq)->devtype & 0x80)
+#define ASC_INQ_ANSI_VER(inq)       ((inq)->ver & 0x07)
+#define ASC_INQ_ECMA_VER(inq)       (((inq)->ver & 0x38) >> 3)
+#define ASC_INQ_ISO_VER(inq)        (((inq)->ver & 0xc0) >> 6)
+#define ASC_INQ_RESPONSE_FMT(inq)   ((inq)->byte3 & 0x0f)
+#define ASC_INQ_TERM_IO(inq)        ((inq)->byte3 & 0x40)
+#define ASC_INQ_ASYNC_NOTIF(inq)    ((inq)->byte3 & 0x80)
+#define ASC_INQ_SOFT_RESET(inq)     ((inq)->flags & 0x01)
+#define ASC_INQ_CMD_QUEUE(inq)      ((inq)->flags & 0x02)
+#define ASC_INQ_LINK_CMD(inq)       ((inq)->flags & 0x08)
+#define ASC_INQ_SYNC(inq)           ((inq)->flags & 0x10)
+#define ASC_INQ_WIDE16(inq)         ((inq)->flags & 0x20)
+#define ASC_INQ_WIDE32(inq)         ((inq)->flags & 0x40)
+#define ASC_INQ_REL_ADDR(inq)       ((inq)->flags & 0x80)
+#define ASC_INQ_INFO_UNIT(inq)      ((inq)->info & 0x01)
+#define ASC_INQ_QUICK_ARB(inq)      ((inq)->info & 0x02)
+#define ASC_INQ_CLOCKING(inq)       (((inq)->info & 0x0c) >> 2)
 
 typedef struct {
-    ASC_SCSI_INQ0       byte0;
-    ASC_SCSI_INQ1       byte1;
-    ASC_SCSI_INQ2       byte2;
-    ASC_SCSI_INQ3       byte3;
+    uchar               periph;
+    uchar               devtype;
+    uchar               ver;
+    uchar               byte3;
     uchar               add_len;
     uchar               res1;
     uchar               res2;
-    ASC_SCSI_INQ7       byte7;
+    uchar               flags;
     uchar               vendor_id[8];
     uchar               product_id[16];
     uchar               product_rev_level[4];
 } ASC_SCSI_INQUIRY;
 
-typedef struct asc_req_sense {
-    uchar               err_code:7;
-    uchar               info_valid:1;
-    uchar               segment_no;
-    uchar               sense_key:4;
-    uchar               reserved_bit:1;
-    uchar               sense_ILI:1;
-    uchar               sense_EOM:1;
-    uchar               file_mark:1;
-    uchar               info1[4];
-    uchar               add_sense_len;
-    uchar               cmd_sp_info[4];
-    uchar               asc;
-    uchar               ascq;
-    uchar               fruc;
-    uchar               sks_byte0:7;
-    uchar               sks_valid:1;
-    uchar               sks_bytes[2];
-    uchar               notused[2];
-    uchar               ex_sense_code;
-    uchar               info2[4];
-} ASC_REQ_SENSE;
-
 #define ASC_SG_LIST_PER_Q   7
 #define QS_FREE        0x00
 #define QS_READY       0x01
@@ -1286,7 +1260,7 @@
 #define ASC_TIX_TO_LUN(tix)         (((tix) >> ASC_SCSI_ID_BITS) & ASC_MAX_LUN)
 #define ASC_QNO_TO_QADDR(q_no)      ((ASC_QADR_BEG)+((int)(q_no) << 6))
 
-typedef struct asc_scisq_1 {
+typedef struct asc_scsiq_1 {
     uchar               status;
     uchar               q_no;
     uchar               cntl;
@@ -1300,7 +1274,7 @@
     uchar               extra_bytes;
 } ASC_SCSIQ_1;
 
-typedef struct asc_scisq_2 {
+typedef struct asc_scsiq_2 {
     ASC_VADDR           srb_ptr;
     uchar               target_ix;
     uchar               flag;
@@ -1378,8 +1352,8 @@
 typedef struct asc_scsi_req_q {
     ASC_SCSIQ_1         r1;
     ASC_SCSIQ_2         r2;
-    uchar       *cdbptr;
-    ASC_SG_HEAD *sg_head;
+    uchar               *cdbptr;
+    ASC_SG_HEAD         *sg_head;
     uchar               *sense_ptr;
     ASC_SCSIQ_3         r3;
     uchar               cdb[ASC_MAX_CDB_LEN];
@@ -1461,6 +1435,10 @@
 #define ASCQ_ERR_SEND_SCSI_Q          0x22
 #define ASCQ_ERR_HOST_REQ_RISC_HALT   0x23
 #define ASCQ_ERR_RESET_SDTR           0x24
+
+/*
+ * Warning code values are set in ASC_DVC_VAR  'warn_code'.
+ */
 #define ASC_WARN_NO_ERROR             0x0000
 #define ASC_WARN_IO_PORT_ROTATE       0x0001
 #define ASC_WARN_EEPROM_CHKSUM        0x0002
@@ -1470,6 +1448,10 @@
 #define ASC_WARN_EEPROM_RECOVER       0x0020
 #define ASC_WARN_CFG_MSW_RECOVER      0x0040
 #define ASC_WARN_SET_PCI_CONFIG_SPACE 0x0080
+
+/*
+ * Error code values are set in ASC_DVC_VAR  'err_code'.
+ */
 #define ASC_IERR_WRITE_EEPROM         0x0001
 #define ASC_IERR_MCODE_CHKSUM         0x0002
 #define ASC_IERR_SET_PC_ADDR          0x0004
@@ -1484,6 +1466,7 @@
 #define ASC_IERR_SCAM                 0x0800
 #define ASC_IERR_SET_SDTR             0x1000
 #define ASC_IERR_RW_LRAM              0x8000
+
 #define ASC_DEF_IRQ_NO  10
 #define ASC_MAX_IRQ_NO  15
 #define ASC_MIN_IRQ_NO  10
@@ -1578,8 +1561,8 @@
     ASC_SCSI_BIT_ID_TYPE cmd_qng_enabled;
     ASC_SCSI_BIT_ID_TYPE disc_enable;
     ASC_SCSI_BIT_ID_TYPE sdtr_enable;
-    uchar               chip_scsi_id:4;
-    uchar               isa_dma_speed:4;
+    uchar               chip_scsi_id;
+    uchar               isa_dma_speed;
     uchar               isa_dma_channel;
     uchar               chip_version;
     ushort              pci_device_id;
@@ -1703,6 +1686,20 @@
 #define ASC_MAX_INIT_BUSY_RETRY   8
 #define ASC_EEP_ISA_PNP_WSIZE    16
 
+/*
+ * These macros keep the chip SCSI id and ISA DMA speed
+ * bitfields in board order. C bitfields aren't portable
+ * between big and little-endian platforms so they are
+ * not used.
+ */
+
+#define ASC_EEP_GET_CHIP_ID(cfg)    ((cfg)->id_speed & 0x0f)
+#define ASC_EEP_GET_DMA_SPD(cfg)    (((cfg)->id_speed & 0xf0) >> 4)
+#define ASC_EEP_SET_CHIP_ID(cfg, sid) \
+   ((cfg)->id_speed = ((cfg)->id_speed & 0xf0) | ((sid) & ASC_MAX_TID))
+#define ASC_EEP_SET_DMA_SPD(cfg, spd) \
+   ((cfg)->id_speed = ((cfg)->id_speed & 0x0f) | ((spd) & 0x0f) << 4)
+
 typedef struct asceep_config {
     ushort              cfg_lsw;
     ushort              cfg_msw;
@@ -1715,8 +1712,8 @@
     uchar               bios_scan;
     uchar               power_up_wait;
     uchar               no_scam;
-    uchar               chip_scsi_id:4;
-    uchar               isa_dma_speed:4;
+    uchar               id_speed; /* low order 4 bits is chip scsi id */
+                                  /* high order 4 bits is isa dma speed */
     uchar               dos_int13_table[ASC_MAX_TID + 1];
     uchar               adapter_info[6];
     ushort              cntl;
@@ -1962,8 +1959,6 @@
 #define AscSetChipLramAddr(port, addr)    outpw((PortAddr)((port)+IOP_RAM_ADDR), addr)
 #define AscGetChipLramData(port)          (ushort)inpw((port)+IOP_RAM_DATA)
 #define AscSetChipLramData(port, data)    outpw((port)+IOP_RAM_DATA, data)
-#define AscGetChipLramDataNoSwap(port)         (ushort)inpw_noswap((port)+IOP_RAM_DATA)
-#define AscSetChipLramDataNoSwap(port, data)   outpw_noswap((port)+IOP_RAM_DATA, data)
 #define AscGetChipIFC(port)               (uchar)inp((port)+IOP_REG_IFC)
 #define AscSetChipIFC(port, data)          outp((port)+IOP_REG_IFC, data)
 #define AscGetChipStatus(port)            (ASC_CS_TYPE)inpw((port)+IOP_STATUS)
@@ -2021,21 +2016,24 @@
 STATIC void      AscEnableInterrupt(PortAddr);
 STATIC void      AscSetBank(PortAddr, uchar);
 STATIC int       AscResetChipAndScsiBus(ASC_DVC_VAR *);
+#ifdef CONFIG_ISA
 STATIC ushort    AscGetIsaDmaChannel(PortAddr);
 STATIC ushort    AscSetIsaDmaChannel(PortAddr, ushort);
 STATIC uchar     AscSetIsaDmaSpeed(PortAddr, uchar);
 STATIC uchar     AscGetIsaDmaSpeed(PortAddr);
+#endif /* CONFIG_ISA */
 STATIC uchar     AscReadLramByte(PortAddr, ushort);
 STATIC ushort    AscReadLramWord(PortAddr, ushort);
+#if CC_VERY_LONG_SG_LIST
 STATIC ASC_DCNT  AscReadLramDWord(PortAddr, ushort);
+#endif /* CC_VERY_LONG_SG_LIST */
 STATIC void      AscWriteLramWord(PortAddr, ushort, ushort);
-STATIC void      AscWriteLramDWord(PortAddr, ushort, ASC_DCNT);
 STATIC void      AscWriteLramByte(PortAddr, ushort, uchar);
 STATIC ASC_DCNT  AscMemSumLramWord(PortAddr, ushort, int);
 STATIC void      AscMemWordSetLram(PortAddr, ushort, ushort, int);
-STATIC void      AscMemWordCopyToLram(PortAddr, ushort, ushort *, int);
-STATIC void      AscMemDWordCopyToLram(PortAddr, ushort, ASC_DCNT *, int);
-STATIC void      AscMemWordCopyFromLram(PortAddr, ushort, ushort *, int);
+STATIC void      AscMemWordCopyPtrToLram(PortAddr, ushort, uchar *, int);
+STATIC void      AscMemDWordCopyPtrToLram(PortAddr, ushort, uchar *, int);
+STATIC void      AscMemWordCopyPtrFromLram(PortAddr, ushort, uchar *, int);
 STATIC ushort    AscInitAscDvcVar(ASC_DVC_VAR *);
 STATIC ushort    AscInitFromEEP(ASC_DVC_VAR *);
 STATIC ushort    AscInitFromAscDvcVar(ASC_DVC_VAR *);
@@ -2047,21 +2045,8 @@
 STATIC uchar     AscGetSynPeriodIndex(ASC_DVC_VAR *, uchar);
 STATIC uchar     AscAllocFreeQueue(PortAddr, uchar);
 STATIC uchar     AscAllocMultipleFreeQueue(PortAddr, uchar, uchar);
-STATIC int       AscRiscHaltedAbortSRB(ASC_DVC_VAR *, ASC_DCNT);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-STATIC int       AscRiscHaltedAbortTIX(ASC_DVC_VAR *, uchar);
-#endif /* version >= v1.3.89 */
 STATIC int       AscHostReqRiscHalt(PortAddr);
 STATIC int       AscStopQueueExe(PortAddr);
-STATIC int       AscStartQueueExe(PortAddr);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-STATIC int       AscCleanUpDiscQueue(PortAddr);
-#endif /* version >= v1.3.89 */
-STATIC int       AscCleanUpBusyQueue(PortAddr);
-STATIC int       AscWaitTixISRDone(ASC_DVC_VAR *, uchar);
-STATIC int       AscWaitISRDone(ASC_DVC_VAR *);
-STATIC ASC_PADDR AscGetOnePhyAddr(ASC_DVC_VAR *, uchar *,
-                    ASC_DCNT);
 STATIC int       AscSendScsiQueue(ASC_DVC_VAR *,
                     ASC_SCSI_Q * scsiq,
                     uchar n_q_required);
@@ -2072,48 +2057,43 @@
 STATIC int       AscSetChipSynRegAtID(PortAddr, uchar, uchar);
 STATIC int       AscSetRunChipSynRegAtID(PortAddr, uchar, uchar);
 STATIC ushort    AscInitLram(ASC_DVC_VAR *);
-STATIC int       AscReInitLram(ASC_DVC_VAR *);
 STATIC ushort    AscInitQLinkVar(ASC_DVC_VAR *);
 STATIC int       AscSetLibErrorCode(ASC_DVC_VAR *, ushort);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-STATIC int       _AscWaitQDone(PortAddr, ASC_SCSI_Q *);
-#endif /* version >= v1.3.89 */
 STATIC int       AscIsrChipHalted(ASC_DVC_VAR *);
 STATIC uchar     _AscCopyLramScsiDoneQ(PortAddr, ushort,
                     ASC_QDONE_INFO *, ASC_DCNT);
 STATIC int       AscIsrQDone(ASC_DVC_VAR *);
 STATIC int       AscCompareString(uchar *, uchar *, int);
+#ifdef CONFIG_ISA
 STATIC ushort    AscGetEisaChipCfg(PortAddr);
 STATIC ASC_DCNT  AscGetEisaProductID(PortAddr);
 STATIC PortAddr  AscSearchIOPortAddrEISA(PortAddr);
+STATIC PortAddr  AscSearchIOPortAddr11(PortAddr);
+STATIC PortAddr  AscSearchIOPortAddr(PortAddr, ushort);
+STATIC void      AscSetISAPNPWaitForKey(void);
+#endif /* CONFIG_ISA */
 STATIC uchar     AscGetChipScsiCtrl(PortAddr);
 STATIC uchar     AscSetChipScsiID(PortAddr, uchar);
 STATIC uchar     AscGetChipVersion(PortAddr, ushort);
 STATIC ushort    AscGetChipBusType(PortAddr);
-STATIC ASC_DCNT  AscLoadMicroCode(PortAddr, ushort, ushort *, ushort);
+STATIC ASC_DCNT  AscLoadMicroCode(PortAddr, ushort, uchar *, ushort);
 STATIC int       AscFindSignature(PortAddr);
-STATIC PortAddr  AscSearchIOPortAddr11(PortAddr);
 STATIC void      AscToggleIRQAct(PortAddr);
-STATIC void      AscSetISAPNPWaitForKey(void);
 STATIC uchar     AscGetChipIRQ(PortAddr, ushort);
 STATIC uchar     AscSetChipIRQ(PortAddr, uchar, ushort);
 STATIC ushort    AscGetChipBiosAddress(PortAddr, ushort);
-STATIC int       DvcEnterCritical(void);
-STATIC void      DvcLeaveCritical(int);
-STATIC void      DvcInPortWords(PortAddr, ushort *, int);
-STATIC void      DvcOutPortWords(PortAddr, ushort *, int);
-STATIC void      DvcOutPortDWords(PortAddr, ASC_DCNT *, int);
+STATIC inline ulong DvcEnterCritical(void);
+STATIC inline void DvcLeaveCritical(ulong);
+#ifdef CONFIG_PCI
 STATIC uchar     DvcReadPCIConfigByte(ASC_DVC_VAR *, ushort);
 STATIC void      DvcWritePCIConfigByte(ASC_DVC_VAR *,
                     ushort, uchar);
+#endif /* CONFIG_PCI */
 STATIC ushort      AscGetChipBiosAddress(PortAddr, ushort);
 STATIC void      DvcSleepMilliSecond(ASC_DCNT);
 STATIC void      DvcDelayNanoSecond(ASC_DVC_VAR *, ASC_DCNT);
-STATIC ASC_DCNT  DvcGetSGList(ASC_DVC_VAR *, uchar *,
-                    ASC_DCNT, ASC_SG_HEAD *);
-STATIC void      DvcPutScsiQ(PortAddr, ushort, ushort *, int);
-STATIC void      DvcGetQinfo(PortAddr, ushort, ushort *, int);
-STATIC PortAddr  AscSearchIOPortAddr(PortAddr, ushort);
+STATIC void      DvcPutScsiQ(PortAddr, ushort, uchar *, int);
+STATIC void      DvcGetQinfo(PortAddr, ushort, uchar *, int);
 STATIC ushort    AscInitGetConfig(ASC_DVC_VAR *);
 STATIC ushort    AscInitSetConfig(ASC_DVC_VAR *);
 STATIC ushort    AscInitAsc1000Driver(ASC_DVC_VAR *);
@@ -2127,12 +2107,9 @@
 STATIC uint      AscGetNumOfFreeQueue(ASC_DVC_VAR *, uchar,
                     uchar);
 STATIC int       AscSgListToQueue(int);
-STATIC int       AscAbortSRB(ASC_DVC_VAR *, ASC_VADDR);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-STATIC int       AscResetDevice(ASC_DVC_VAR *, uchar);
-#endif /* version >= v1.3.89 */
-STATIC int       AscResetSB(ASC_DVC_VAR *);
+#ifdef CONFIG_ISA
 STATIC void      AscEnableIsaDma(uchar);
+#endif /* CONFIG_ISA */
 STATIC ASC_DCNT  AscGetMaxDmaCount(ushort);
 
 
@@ -2141,7 +2118,7 @@
  */
 
 #define ADV_LIB_VERSION_MAJOR  5
-#define ADV_LIB_VERSION_MINOR  5
+#define ADV_LIB_VERSION_MINOR  14
 
 /* d_os_dep.h */
 #define ADV_OS_LINUX
@@ -2158,7 +2135,7 @@
  * types must be used. In Linux the char, short, and int types
  * are all consistent at 8, 16, and 32 bits respectively. Pointers
  * and long types are 64 bits on Alpha and UltraSPARC.
- */ 
+ */
 #define ADV_PADDR __u32         /* Physical address data type. */
 #define ADV_VADDR __u32         /* Virtual address data type. */
 #define ADV_DCNT  __u32         /* Unsigned Data count type. */
@@ -2175,11 +2152,7 @@
 #define ADV_VADDR_TO_U32   virt_to_bus
 #define ADV_U32_TO_VADDR   bus_to_virt
 
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
-#define AdvPortAddr  unsigned short     /* I/O Port address size */
-#else /* version >= v1,3,0 */
 #define AdvPortAddr  ulong              /* Virtual memory address size */
-#endif /* version >= v1,3,0 */
 
 /*
  * Define Adv Library required memory access macros.
@@ -2188,16 +2161,15 @@
 #define ADV_MEM_READW(addr) readw(addr)
 #define ADV_MEM_WRITEB(addr, byte) writeb(byte, addr)
 #define ADV_MEM_WRITEW(addr, word) writew(word, addr)
+#define ADV_MEM_WRITEDW(addr, dword) writel(dword, addr)
+
+#define ADV_CARRIER_COUNT (ASC_DEF_MAX_HOST_QNG + 15)
 
 /*
- * The I/O memory mapping function names changed in 2.1.X.
+ * For wide  boards a CDB length maximum of 16 bytes
+ * is supported.
  */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,0)
-#define ioremap vremap
-#define iounmap vfree
-#endif /* version < v2.1.0 */
-
-#define ADV_CARRIER_COUNT (ASC_DEF_MAX_HOST_QNG + 15)
+#define ADV_MAX_CDB_LEN     16
 
 /*
  * Define total number of simultaneous maximum element scatter-gather
@@ -2207,7 +2179,7 @@
  * elements. Allow each command to have at least one ADV_SG_BLOCK structure.
  * This allows about 15 commands to have the maximum 17 ADV_SG_BLOCK
  * structures or 255 scatter-gather elements.
- * 
+ *
  */
 #define ADV_TOT_SG_BLOCK        ASC_DEF_MAX_HOST_QNG
 
@@ -2225,10 +2197,10 @@
 #define ADV_SG_TOTAL_MEM_SIZE \
     (sizeof(ADV_SG_BLOCK) *  ADV_NUM_SG_BLOCK)
 
-#define ASC_PAGE_SIZE PAGE_SIZE
+#define ADV_PAGE_SIZE PAGE_SIZE
 
 #define ADV_NUM_PAGE_CROSSING \
-    ((ADV_SG_TOTAL_MEM_SIZE + (ASC_PAGE_SIZE - 1))/ASC_PAGE_SIZE)
+    ((ADV_SG_TOTAL_MEM_SIZE + (ADV_PAGE_SIZE - 1))/ADV_PAGE_SIZE)
 
 /* a_condor.h */
 #define ADV_PCI_VENDOR_ID               0x10CD
@@ -2236,12 +2208,12 @@
 #define ADV_PCI_DEVID_38C0800_REV1      0x2500
 #define ADV_PCI_DEVID_38C1600_REV1      0x2700
 
-#define ASC_EEP_DVC_CFG_BEGIN           (0x00)
-#define ASC_EEP_DVC_CFG_END             (0x15)
-#define ASC_EEP_DVC_CTL_BEGIN           (0x16)  /* location of OEM name */
-#define ASC_EEP_MAX_WORD_ADDR           (0x1E)
+#define ADV_EEP_DVC_CFG_BEGIN           (0x00)
+#define ADV_EEP_DVC_CFG_END             (0x15)
+#define ADV_EEP_DVC_CTL_BEGIN           (0x16)  /* location of OEM name */
+#define ADV_EEP_MAX_WORD_ADDR           (0x1E)
 
-#define ASC_EEP_DELAY_MS                100
+#define ADV_EEP_DELAY_MS                100
 
 #define ADV_EEPROM_BIG_ENDIAN          0x8000   /* EEPROM Bit 15 */
 #define ADV_EEPROM_BIOS_ENABLE         0x4000   /* EEPROM Bit 14 */
@@ -2252,6 +2224,18 @@
  */
 #define ADV_EEPROM_TERM_POL            0x2000   /* EEPROM Bit 13 */
 #define ADV_EEPROM_CIS_LD              0x2000   /* EEPROM Bit 13 */
+/*
+ * ASC38C1600 Bit 11
+ *
+ * If EEPROM Bit 11 is 0 for Function 0, then Function 0 will specify
+ * INT A in the PCI Configuration Space Int Pin field. If it is 1, then
+ * Function 0 will specify INT B.
+ *
+ * If EEPROM Bit 11 is 0 for Function 1, then Function 1 will specify
+ * INT B in the PCI Configuration Space Int Pin field. If it is 1, then
+ * Function 1 will specify INT A.
+ */
+#define ADV_EEPROM_INTAB               0x0800   /* EEPROM Bit 11 */
 
 typedef struct adveep_3550_config
 {
@@ -2262,20 +2246,20 @@
                                 /*  bit 14 set - BIOS Enable */
                                 /*  bit 15 set - Big Endian Mode */
   ushort cfg_msw;               /* 01 unused      */
-  ushort disc_enable;           /* 02 disconnect enable */         
+  ushort disc_enable;           /* 02 disconnect enable */
   ushort wdtr_able;             /* 03 Wide DTR able */
   ushort sdtr_able;             /* 04 Synchronous DTR able */
-  ushort start_motor;           /* 05 send start up motor */      
+  ushort start_motor;           /* 05 send start up motor */
   ushort tagqng_able;           /* 06 tag queuing able */
-  ushort bios_scan;             /* 07 BIOS device control */   
-  ushort scam_tolerant;         /* 08 no scam */  
- 
+  ushort bios_scan;             /* 07 BIOS device control */
+  ushort scam_tolerant;         /* 08 no scam */
+
   uchar  adapter_scsi_id;       /* 09 Host Adapter ID */
   uchar  bios_boot_delay;       /*    power up wait */
- 
+
   uchar  scsi_reset_delay;      /* 10 reset delay */
   uchar  bios_id_lun;           /*    first boot device scsi id & lun */
-                                /*    high nibble is lun */  
+                                /*    high nibble is lun */
                                 /*    low nibble is scsi id */
 
   uchar  termination;           /* 11 0 - automatic */
@@ -2284,33 +2268,33 @@
                                 /*    3 - low on  / high on */
                                 /*    There is no low on  / high off */
 
-  uchar  reserved1;             /*    reserved byte (not used) */                                  
+  uchar  reserved1;             /*    reserved byte (not used) */
 
   ushort bios_ctrl;             /* 12 BIOS control bits */
-                                /*  bit 0  set: BIOS don't act as initiator. */
-                                /*  bit 1  set: BIOS > 1 GB support */
-                                /*  bit 2  set: BIOS > 2 Disk Support */
-                                /*  bit 3  set: BIOS don't support removables */
-                                /*  bit 4  set: BIOS support bootable CD */
-                                /*  bit 5  set: */
-                                /*  bit 6  set: BIOS support multiple LUNs */
-                                /*  bit 7  set: BIOS display of message */
-                                /*  bit 8  set: */
-                                /*  bit 9  set: Reset SCSI bus during init. */
-                                /*  bit 10 set: */
-                                /*  bit 11 set: No verbose initialization. */
-                                /*  bit 12 set: SCSI parity enabled */
-                                /*  bit 13 set: */
-                                /*  bit 14 set: */
-                                /*  bit 15 set: */
-  ushort  ultra_able;           /* 13 ULTRA speed able */ 
+                                /*  bit 0  BIOS don't act as initiator. */
+                                /*  bit 1  BIOS > 1 GB support */
+                                /*  bit 2  BIOS > 2 Disk Support */
+                                /*  bit 3  BIOS don't support removables */
+                                /*  bit 4  BIOS support bootable CD */
+                                /*  bit 5  BIOS scan enabled */
+                                /*  bit 6  BIOS support multiple LUNs */
+                                /*  bit 7  BIOS display of message */
+                                /*  bit 8  SCAM disabled */
+                                /*  bit 9  Reset SCSI bus during init. */
+                                /*  bit 10 */
+                                /*  bit 11 No verbose initialization. */
+                                /*  bit 12 SCSI parity enabled */
+                                /*  bit 13 */
+                                /*  bit 14 */
+                                /*  bit 15 */
+  ushort  ultra_able;           /* 13 ULTRA speed able */
   ushort  reserved2;            /* 14 reserved */
   uchar   max_host_qng;         /* 15 maximum host queuing */
   uchar   max_dvc_qng;          /*    maximum per device queuing */
   ushort  dvc_cntl;             /* 16 control bit for driver */
   ushort  bug_fix;              /* 17 control bit for bug fix */
-  ushort  serial_number_word1;  /* 18 Board serial number word 1 */  
-  ushort  serial_number_word2;  /* 19 Board serial number word 2 */  
+  ushort  serial_number_word1;  /* 18 Board serial number word 1 */
+  ushort  serial_number_word2;  /* 19 Board serial number word 2 */
   ushort  serial_number_word3;  /* 20 Board serial number word 3 */
   ushort  check_sum;            /* 21 EEP check sum */
   uchar   oem_name[16];         /* 22 OEM name */
@@ -2319,9 +2303,9 @@
   ushort  adv_err_addr;         /* 32 last uc error address */
   ushort  saved_dvc_err_code;   /* 33 saved last dev. driver error code   */
   ushort  saved_adv_err_code;   /* 34 saved last uc and Adv Lib error code */
-  ushort  saved_adv_err_addr;   /* 35 saved last uc error address         */  
+  ushort  saved_adv_err_addr;   /* 35 saved last uc error address         */
   ushort  num_of_err;           /* 36 number of error */
-} ADVEEP_3550_CONFIG; 
+} ADVEEP_3550_CONFIG;
 
 typedef struct adveep_38C0800_config
 {
@@ -2361,22 +2345,22 @@
                                 /*    There is no low on  / high off */
 
   ushort bios_ctrl;             /* 12 BIOS control bits */
-                                /*  bit 0  set: BIOS don't act as initiator. */
-                                /*  bit 1  set: BIOS > 1 GB support */
-                                /*  bit 2  set: BIOS > 2 Disk Support */
-                                /*  bit 3  set: BIOS don't support removables */
-                                /*  bit 4  set: BIOS support bootable CD */
-                                /*  bit 5  set: BIOS scan enabled */
-                                /*  bit 6  set: BIOS support multiple LUNs */
-                                /*  bit 7  set: BIOS display of message */
-                                /*  bit 8  set: */
-                                /*  bit 9  set: Reset SCSI bus during init. */
-                                /*  bit 10 set: */
-                                /*  bit 11 set: No verbose initialization. */
-                                /*  bit 12 set: SCSI parity enabled */
-                                /*  bit 13 set: */
-                                /*  bit 14 set: */
-                                /*  bit 15 set: */
+                                /*  bit 0  BIOS don't act as initiator. */
+                                /*  bit 1  BIOS > 1 GB support */
+                                /*  bit 2  BIOS > 2 Disk Support */
+                                /*  bit 3  BIOS don't support removables */
+                                /*  bit 4  BIOS support bootable CD */
+                                /*  bit 5  BIOS scan enabled */
+                                /*  bit 6  BIOS support multiple LUNs */
+                                /*  bit 7  BIOS display of message */
+                                /*  bit 8  SCAM disabled */
+                                /*  bit 9  Reset SCSI bus during init. */
+                                /*  bit 10 */
+                                /*  bit 11 No verbose initialization. */
+                                /*  bit 12 SCSI parity enabled */
+                                /*  bit 13 */
+                                /*  bit 14 */
+                                /*  bit 15 */
   ushort  sdtr_speed2;          /* 13 SDTR speed TID 4-7 */
   ushort  sdtr_speed3;          /* 14 SDTR speed TID 8-11 */
   uchar   max_host_qng;         /* 15 maximum host queueing */
@@ -2424,6 +2408,109 @@
   ushort  reserved63;           /* 63 reserved */
 } ADVEEP_38C0800_CONFIG;
 
+typedef struct adveep_38C1600_config
+{
+                                /* Word Offset, Description */
+
+  ushort cfg_lsw;               /* 00 power up initialization */
+                                /*  bit 11 set - Func. 0 INTB, Func. 1 INTA */
+                                /*       clear - Func. 0 INTA, Func. 1 INTB */
+                                /*  bit 13 set - Load CIS */
+                                /*  bit 14 set - BIOS Enable */
+                                /*  bit 15 set - Big Endian Mode */
+  ushort cfg_msw;               /* 01 unused */
+  ushort disc_enable;           /* 02 disconnect enable */
+  ushort wdtr_able;             /* 03 Wide DTR able */
+  ushort sdtr_speed1;           /* 04 SDTR Speed TID 0-3 */
+  ushort start_motor;           /* 05 send start up motor */
+  ushort tagqng_able;           /* 06 tag queuing able */
+  ushort bios_scan;             /* 07 BIOS device control */
+  ushort scam_tolerant;         /* 08 no scam */
+
+  uchar  adapter_scsi_id;       /* 09 Host Adapter ID */
+  uchar  bios_boot_delay;       /*    power up wait */
+
+  uchar  scsi_reset_delay;      /* 10 reset delay */
+  uchar  bios_id_lun;           /*    first boot device scsi id & lun */
+                                /*    high nibble is lun */
+                                /*    low nibble is scsi id */
+
+  uchar  termination_se;        /* 11 0 - automatic */
+                                /*    1 - low off / high off */
+                                /*    2 - low off / high on */
+                                /*    3 - low on  / high on */
+                                /*    There is no low on  / high off */
+
+  uchar  termination_lvd;       /* 11 0 - automatic */
+                                /*    1 - low off / high off */
+                                /*    2 - low off / high on */
+                                /*    3 - low on  / high on */
+                                /*    There is no low on  / high off */
+
+  ushort bios_ctrl;             /* 12 BIOS control bits */
+                                /*  bit 0  BIOS don't act as initiator. */
+                                /*  bit 1  BIOS > 1 GB support */
+                                /*  bit 2  BIOS > 2 Disk Support */
+                                /*  bit 3  BIOS don't support removables */
+                                /*  bit 4  BIOS support bootable CD */
+                                /*  bit 5  BIOS scan enabled */
+                                /*  bit 6  BIOS support multiple LUNs */
+                                /*  bit 7  BIOS display of message */
+                                /*  bit 8  SCAM disabled */
+                                /*  bit 9  Reset SCSI bus during init. */
+                                /*  bit 10 Basic Integrity Checking disabled */
+                                /*  bit 11 No verbose initialization. */
+                                /*  bit 12 SCSI parity enabled */
+                                /*  bit 13 AIPP (Asyn. Info. Ph. Prot.) dis. */
+                                /*  bit 14 */
+                                /*  bit 15 */
+  ushort  sdtr_speed2;          /* 13 SDTR speed TID 4-7 */
+  ushort  sdtr_speed3;          /* 14 SDTR speed TID 8-11 */
+  uchar   max_host_qng;         /* 15 maximum host queueing */
+  uchar   max_dvc_qng;          /*    maximum per device queuing */
+  ushort  dvc_cntl;             /* 16 control bit for driver */
+  ushort  sdtr_speed4;          /* 17 SDTR speed 4 TID 12-15 */
+  ushort  serial_number_word1;  /* 18 Board serial number word 1 */
+  ushort  serial_number_word2;  /* 19 Board serial number word 2 */
+  ushort  serial_number_word3;  /* 20 Board serial number word 3 */
+  ushort  check_sum;            /* 21 EEP check sum */
+  uchar   oem_name[16];         /* 22 OEM name */
+  ushort  dvc_err_code;         /* 30 last device driver error code */
+  ushort  adv_err_code;         /* 31 last uc and Adv Lib error code */
+  ushort  adv_err_addr;         /* 32 last uc error address */
+  ushort  saved_dvc_err_code;   /* 33 saved last dev. driver error code   */
+  ushort  saved_adv_err_code;   /* 34 saved last uc and Adv Lib error code */
+  ushort  saved_adv_err_addr;   /* 35 saved last uc error address         */
+  ushort  reserved36;           /* 36 reserved */
+  ushort  reserved37;           /* 37 reserved */
+  ushort  reserved38;           /* 38 reserved */
+  ushort  reserved39;           /* 39 reserved */
+  ushort  reserved40;           /* 40 reserved */
+  ushort  reserved41;           /* 41 reserved */
+  ushort  reserved42;           /* 42 reserved */
+  ushort  reserved43;           /* 43 reserved */
+  ushort  reserved44;           /* 44 reserved */
+  ushort  reserved45;           /* 45 reserved */
+  ushort  reserved46;           /* 46 reserved */
+  ushort  reserved47;           /* 47 reserved */
+  ushort  reserved48;           /* 48 reserved */
+  ushort  reserved49;           /* 49 reserved */
+  ushort  reserved50;           /* 50 reserved */
+  ushort  reserved51;           /* 51 reserved */
+  ushort  reserved52;           /* 52 reserved */
+  ushort  reserved53;           /* 53 reserved */
+  ushort  reserved54;           /* 54 reserved */
+  ushort  reserved55;           /* 55 reserved */
+  ushort  cisptr_lsw;           /* 56 CIS PTR LSW */
+  ushort  cisprt_msw;           /* 57 CIS PTR MSW */
+  ushort  subsysvid;            /* 58 SubSystem Vendor ID */
+  ushort  subsysid;             /* 59 SubSystem ID */
+  ushort  reserved60;           /* 60 reserved */
+  ushort  reserved61;           /* 61 reserved */
+  ushort  reserved62;           /* 62 reserved */
+  ushort  reserved63;           /* 63 reserved */
+} ADVEEP_38C1600_CONFIG;
+
 /*
  * EEPROM Commands
  */
@@ -2445,6 +2532,7 @@
 #define BIOS_CTRL_RESET_SCSI_BUS     0x0200
 #define BIOS_CTRL_INIT_VERBOSE       0x0800
 #define BIOS_CTRL_SCSI_PARITY        0x1000
+#define BIOS_CTRL_AIPP_DIS           0x2000
 
 #define ADV_3550_MEMSIZE   0x2000       /* 8 KB Internal Memory */
 #define ADV_3550_IOLEN     0x40         /* I/O Port Range in bytes */
@@ -2452,7 +2540,14 @@
 #define ADV_38C0800_MEMSIZE  0x4000     /* 16 KB Internal Memory */
 #define ADV_38C0800_IOLEN    0x100      /* I/O Port Range in bytes */
 
-#define ADV_38C1600_MEMSIZE  0x4000    /* 16 KB Internal Memory */
+/*
+ * XXX - Since ASC38C1600 Rev.3 has a local RAM failure issue, there is
+ * a special 16K Adv Library and Microcode version. After the issue is
+ * resolved, should restore 32K support.
+ *
+ * #define ADV_38C1600_MEMSIZE  0x8000L   * 32 KB Internal Memory *
+ */
+#define ADV_38C1600_MEMSIZE  0x4000   /* 16 KB Internal Memory */
 #define ADV_38C1600_IOLEN    0x100     /* I/O Port Range 256 bytes */
 #define ADV_38C1600_MEMLEN   0x1000    /* Memory Range 4KB bytes */
 
@@ -2653,8 +2748,8 @@
 #define SLEW_RATE       0x1000  /* SCSI output buffer slew rate */
 #define FILTER_SEL      0x0C00  /* Filter Period Selection */
 #define  FLTR_DISABLE    0x0000  /* Input Filtering Disabled */
-#define  FLTR_11_TO_20NS 0x0800  /* Input Filtering 11ns to 20ns */          
-#define  FLTR_21_TO_39NS 0x0C00  /* Input Filtering 21ns to 39ns */          
+#define  FLTR_11_TO_20NS 0x0800  /* Input Filtering 11ns to 20ns */
+#define  FLTR_21_TO_39NS 0x0C00  /* Input Filtering 21ns to 39ns */
 #define ACTIVE_DBL      0x0200  /* Disable Active Negation */
 #define DIFF_MODE       0x0100  /* SCSI differential Mode (Read-Only) */
 #define DIFF_SENSE      0x0080  /* 1: No SE cables, 0: SE cable (Read-Only) */
@@ -2666,6 +2761,14 @@
 
 /*
  * Addendum for ASC-38C0800 Chip
+ *
+ * The ASC-38C1600 Chip uses the same definitions except that the
+ * bus mode override bits [12:10] have been moved to byte register
+ * offset 0xE (IOPB_SOFT_OVER_WR) bits [12:10]. The [12:10] bits in
+ * SCSI_CFG1 are read-only and always available. Bit 14 (DIS_TERM_DRV)
+ * is not needed. The [12:10] bits in IOPB_SOFT_OVER_WR are write-only.
+ * Also each ASC-38C1600 function or channel uses only cable bits [5:4]
+ * and [1:0]. Bits [14], [7:6], [3:2] are unused.
  */
 #define DIS_TERM_DRV    0x4000  /* 1: Read c_det[3:0], 0: cannot read */
 #define HVD_LVD_SE      0x1C00  /* Device Detect Bits */
@@ -2745,6 +2848,33 @@
 #define PRE_TEST_VALUE        0x05
 #define NORMAL_VALUE          0x00
 
+/*
+ * ASC38C1600 Definitions
+ *
+ * IOPB_PCI_INT_CFG Bit Field Definitions
+ */
+
+#define INTAB_LD        0x80    /* Value loaded from EEPROM Bit 11. */
+
+/*
+ * Bit 1 can be set to change the interrupt for the Function to operate in
+ * Totem Pole mode. By default Bit 1 is 0 and the interrupt operates in
+ * Open Drain mode. Both functions of the ASC38C1600 must be set to the same
+ * mode, otherwise the operating mode is undefined.
+ */
+#define TOTEMPOLE       0x02
+
+/*
+ * Bit 0 can be used to change the Int Pin for the Function. The value is
+ * 0 by default for both Functions with Function 0 using INT A and Function
+ * B using INT B. For Function 0 if set, INT B is used. For Function 1 if set,
+ * INT A is used.
+ *
+ * EEPROM Word 0 Bit 11 for each Function may change the initial Int Pin
+ * value specified in the PCI Configuration Space.
+ */
+#define INTAB           0x01
+
 /* a_advlib.h */
 
 /*
@@ -2759,7 +2889,7 @@
 
 
 /*
- * ASC_DVC_VAR 'warn_code' values
+ * ADV_DVC_VAR 'warn_code' values
  */
 #define ASC_WARN_BUSRESET_ERROR         0x0001 /* SCSI Bus Reset error */
 #define ASC_WARN_EEPROM_CHKSUM          0x0002 /* EEP check sum error */
@@ -2770,11 +2900,8 @@
 #define ADV_MAX_TID                     15 /* max. target identifier */
 #define ADV_MAX_LUN                     7  /* max. logical unit number */
 
-
 /*
- * AscInitGetConfig() and AscInitAsc1000Driver() Definitions
- *
- * Error code values are set in ASC_DVC_VAR 'err_code'.
+ * Error code values are set in ADV_DVC_VAR 'err_code'.
  */
 #define ASC_IERR_WRITE_EEPROM       0x0001 /* write EEPROM error */
 #define ASC_IERR_MCODE_CHKSUM       0x0002 /* micro code check sum error */
@@ -2829,6 +2956,7 @@
 #define ASC_MC_CAM_MODE_MASK            0x015E /* CAM mode TID bitmask. */
 #define ASC_MC_ICQ                      0x0160
 #define ASC_MC_IRQ                      0x0164
+#define ASC_MC_PPR_ABLE                 0x017A
 
 /*
  * BIOS LRAM variable absolute offsets.
@@ -2845,6 +2973,7 @@
  * and handled by the microcode.
  */
 #define CONTROL_FLAG_IGNORE_PERR        0x0001 /* Ignore DMA Parity Errors */
+#define CONTROL_FLAG_ENABLE_AIPP        0x0002 /* Enabled AIPP checking. */
 
 /*
  * ASC_MC_DEVICE_HSHK_CFG_TABLE microcode table or HSHK_CFG register format
@@ -2876,6 +3005,10 @@
 #define ASC_QSC_HEAD_TAG    0x40 /* Use Head Tag Message (0x21). */
 #define ASC_QSC_ORDERED_TAG 0x80 /* Use Ordered Tag Message (0x22). */
 
+/*
+ * All fields here are accessed by the board microcode and need to be
+ * little-endian.
+ */
 typedef struct adv_carr_t
 {
     ADV_VADDR   carr_va;       /* Carrier Virtual Address */
@@ -2896,12 +3029,11 @@
 #define ASC_NEXT_VPA_MASK       0xFFFFFFF0
 
 #define ASC_RQ_DONE             0x00000001
+#define ASC_RQ_GOOD             0x00000002
 #define ASC_CQ_STOPPER          0x00000000
 
 #define ASC_GET_CARRP(carrp) ((carrp) & ASC_NEXT_VPA_MASK)
 
-#define ADV_PAGE_SIZE   4096    /* Assume 4KB page size. */
-
 #define ADV_CARRIER_NUM_PAGE_CROSSING \
     (((ADV_CARRIER_COUNT * sizeof(ADV_CARR_T)) + \
         (ADV_PAGE_SIZE - 1))/ADV_PAGE_SIZE)
@@ -2929,7 +3061,7 @@
  * This structure can be discarded after initialization. Don't add
  * fields here needed after initialization.
  *
- * Field naming convention: 
+ * Field naming convention:
  *
  *  *_enable indicates the field enables or disables a feature. The
  *  value of the field is never reset.
@@ -2949,7 +3081,7 @@
   ushort serial1;           /* EEPROM serial number word 1 */
   ushort serial2;           /* EEPROM serial number word 2 */
   ushort serial3;           /* EEPROM serial number word 3 */
-} ADV_DVC_CFG; 
+} ADV_DVC_CFG;
 
 struct adv_dvc_var;
 struct adv_scsi_req_q;
@@ -2965,7 +3097,7 @@
  *
  * One structure is required per host adapter.
  *
- * Field naming convention: 
+ * Field naming convention:
  *
  *  *_able indicates both whether a feature should be enabled or disabled
  *  and whether a device isi capable of the feature. At initialization
@@ -2986,6 +3118,7 @@
   ushort sdtr_speed3;     /* EEPROM SDTR Speed for TID 8-11  */
   ushort sdtr_speed4;     /* EEPROM SDTR Speed for TID 12-15 */
   ushort tagqng_able;     /* try tagged queuing with a device */
+  ushort ppr_able;        /* PPR message capable per TID bitmask. */
   uchar  max_dvc_qng;     /* maximum number of tagged commands per device */
   ushort start_motor;     /* start motor command allowed */
   uchar  scsi_reset_wait; /* delay in seconds after scsi bus reset */
@@ -3007,13 +3140,13 @@
   * driver may discard the buffer after initialization is done.
   */
   ADV_DVC_CFG *cfg; /* temporary configuration structure  */
-} ADV_DVC_VAR; 
+} ADV_DVC_VAR;
 
 #define NO_OF_SG_PER_BLOCK              15
 
 typedef struct asc_sg_block {
-    uchar reserved1; 
-    uchar reserved2; 
+    uchar reserved1;
+    uchar reserved2;
     uchar reserved3;
     uchar sg_cnt;                     /* Valid entries in block. */
     ADV_PADDR sg_ptr;                 /* Pointer to next sg block. */
@@ -3030,6 +3163,9 @@
  * The microcode makes assumptions about the size and ordering of fields
  * in this structure. Do not change the structure definition here without
  * coordinating the change with the microcode.
+ *
+ * All fields accessed by microcode must be maintained in little_endian
+ * order.
  */
 typedef struct adv_scsi_req_q {
     uchar       cntl;           /* Ucode flags and state (ASC_MC_QC_*). */
@@ -3042,16 +3178,16 @@
     ADV_PADDR   carr_pa;
     uchar       mflag;
     uchar       sense_len;
-    uchar       cdb_len;        /* SCSI CDB length. */
+    uchar       cdb_len;        /* SCSI CDB length. Must <= 16 bytes. */
     uchar       scsi_cntl;
     uchar       done_status;    /* Completion status. */
     uchar       scsi_status;    /* SCSI status byte. */
     uchar       host_status;    /* Ucode host status. */
     uchar       sg_working_ix;
-    uchar       cdb[12];        /* SCSI command block. */
+    uchar       cdb[12];        /* SCSI CDB bytes 0-11. */
     ADV_PADDR   sg_real_addr;   /* SG list physical address. */
     ADV_PADDR   scsiq_rptr;
-    ADV_DCNT    sg_working_data_cnt;
+    uchar       cdb16[4];       /* SCSI CDB bytes 12-15. */
     ADV_VADDR   scsiq_ptr;
     ADV_VADDR   carr_va;
     /*
@@ -3062,6 +3198,7 @@
     ADV_SG_BLOCK *sg_list_ptr; /* SG list virtual address. */
     char        *vdata_addr;   /* Data buffer virtual address. */
     uchar       a_flag;
+    uchar       pad[2];        /* Pad out to a word boundary. */
 } ADV_SCSI_REQ_Q;
 
 /*
@@ -3097,14 +3234,16 @@
 #define ADV_ASYNC_RDMA_FAILURE          0x01 /* Fatal RDMA failure. */
 #define ADV_ASYNC_SCSI_BUS_RESET_DET    0x02 /* Detected SCSI Bus Reset. */
 #define ADV_ASYNC_CARRIER_READY_FAILURE 0x03 /* Carrier Ready failure. */
+#define ADV_RDMA_IN_CARR_AND_Q_INVALID  0x04 /* RDMAed-in data invalid. */
+
 
 #define ADV_HOST_SCSI_BUS_RESET      0x80 /* Host Initiated SCSI Bus Reset. */
 
 /*
  * Device drivers must define the following functions.
  */
-STATIC int   DvcEnterCritical(void);
-STATIC void  DvcLeaveCritical(int);
+STATIC inline ulong DvcEnterCritical(void);
+STATIC inline void  DvcLeaveCritical(ulong);
 STATIC void  DvcSleepMilliSecond(ADV_DCNT);
 STATIC uchar DvcAdvReadPCIConfigByte(ADV_DVC_VAR *, ushort);
 STATIC void  DvcAdvWritePCIConfigByte(ADV_DVC_VAR *, ushort, uchar);
@@ -3120,6 +3259,7 @@
 STATIC int     AdvInitGetConfig(ADV_DVC_VAR *);
 STATIC int     AdvInitAsc3550Driver(ADV_DVC_VAR *);
 STATIC int     AdvInitAsc38C0800Driver(ADV_DVC_VAR *);
+STATIC int     AdvInitAsc38C1600Driver(ADV_DVC_VAR *);
 STATIC int     AdvResetChipAndSB(ADV_DVC_VAR *);
 STATIC int     AdvResetSB(ADV_DVC_VAR *asc_dvc);
 
@@ -3130,10 +3270,13 @@
 STATIC void   AdvInquiryHandling(ADV_DVC_VAR *, ADV_SCSI_REQ_Q *);
 STATIC int    AdvInitFrom3550EEP(ADV_DVC_VAR *);
 STATIC int    AdvInitFrom38C0800EEP(ADV_DVC_VAR *);
+STATIC int    AdvInitFrom38C1600EEP(ADV_DVC_VAR *);
 STATIC ushort AdvGet3550EEPConfig(AdvPortAddr, ADVEEP_3550_CONFIG *);
 STATIC void   AdvSet3550EEPConfig(AdvPortAddr, ADVEEP_3550_CONFIG *);
 STATIC ushort AdvGet38C0800EEPConfig(AdvPortAddr, ADVEEP_38C0800_CONFIG *);
 STATIC void   AdvSet38C0800EEPConfig(AdvPortAddr, ADVEEP_38C0800_CONFIG *);
+STATIC ushort AdvGet38C1600EEPConfig(AdvPortAddr, ADVEEP_38C1600_CONFIG *);
+STATIC void   AdvSet38C1600EEPConfig(AdvPortAddr, ADVEEP_38C1600_CONFIG *);
 STATIC void   AdvWaitEEPCmd(AdvPortAddr);
 STATIC ushort AdvReadEEPWord(AdvPortAddr, int);
 
@@ -3143,71 +3286,9 @@
 #define AscPCICmdRegBits_BusMastering     0x0007
 #define AscPCICmdRegBits_ParErrRespCtrl   0x0040
 
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
-
 /* Read byte from a register. */
 #define AdvReadByteRegister(iop_base, reg_off) \
-    (inp((iop_base) + (reg_off)))
-
-/* Write byte to a register. */
-#define AdvWriteByteRegister(iop_base, reg_off, byte) \
-    (outp((iop_base) + (reg_off), (byte)))
-
-/* Read word (2 bytes) from a register. */
-#define AdvReadWordRegister(iop_base, reg_off) \
-    (le16_to_cpu(inpw((iop_base) + (reg_off))))
-
-/* Write word (2 bytes) to a register. */
-#define AdvWriteWordRegister(iop_base, reg_off, word) \
-    (outpw((iop_base) + (reg_off), cpu_to_le16(word)))
-
-/* Read byte from LRAM. */
-#define AdvReadByteLram(iop_base, addr, byte) \
-do { \
-    outpw((iop_base) + IOPW_RAM_ADDR, (addr)); \
-    (byte) = inp((iop_base) + IOPB_RAM_DATA); \
-} while (0)
-
-/* Write byte to LRAM. */
-#define AdvWriteByteLram(iop_base, addr, byte) \
-    (outpw((iop_base) + IOPW_RAM_ADDR, (addr)), \
-     outp((iop_base) + IOPB_RAM_DATA, (byte)))
-
-/* Read word (2 bytes) from LRAM. */
-#define AdvReadWordLram(iop_base, addr, word) \
-do { \
-    outpw((iop_base) + IOPW_RAM_ADDR, (addr));  \
-    (word) = le16_to_cpu(inpw((iop_base) + IOPW_RAM_DATA)); \
-} while (0)
-
-/* Write word (2 bytes) to LRAM. */
-#define AdvWriteWordLram(iop_base, addr, word) \
-    (outpw((iop_base) + IOPW_RAM_ADDR, (addr)), \
-     outpw((iop_base) + IOPW_RAM_DATA, cpu_to_le16(word)))
-
-/* Write double word (4 bytes) to LRAM */
-/* Because of unspecified C language ordering don't use auto-increment. */
-#define AdvWriteDWordLram(iop_base, addr, dword) \
-    ((outpw((iop_base) + IOPW_RAM_ADDR, (addr)), \
-      outpw((iop_base) + IOPW_RAM_DATA, \
-        cpu_to_le16((ushort) ((dword) & 0xFFFF)))), \
-     (outpw((iop_base) + IOPW_RAM_ADDR, (addr) + 2), \
-      outpw((iop_base) + IOPW_RAM_DATA, \
-        cpu_to_le16((ushort) ((dword >> 16) & 0xFFFF)))))
-
-/* Read word (2 bytes) from LRAM assuming that the address is already set. */
-#define AdvReadWordAutoIncLram(iop_base) \
-     (le16_to_cpu(inpw((iop_base) + IOPW_RAM_DATA)))
-
-/* Write word (2 bytes) to LRAM assuming that the address is already set. */
-#define AdvWriteWordAutoIncLram(iop_base, word) \
-     (outpw((iop_base) + IOPW_RAM_DATA, cpu_to_le16(word)))
-
-#else /* version >= v1,3,0 */
-
-/* Read byte from a register. */
-#define AdvReadByteRegister(iop_base, reg_off) \
-     (ADV_MEM_READB((iop_base) + (reg_off)))
+     (ADV_MEM_READB((iop_base) + (reg_off)))
 
 /* Write byte to a register. */
 #define AdvWriteByteRegister(iop_base, reg_off, byte) \
@@ -3215,11 +3296,15 @@
 
 /* Read word (2 bytes) from a register. */
 #define AdvReadWordRegister(iop_base, reg_off) \
-     le16_to_cpu(ADV_MEM_READW((iop_base) + (reg_off)))
+     (ADV_MEM_READW((iop_base) + (reg_off)))
 
 /* Write word (2 bytes) to a register. */
 #define AdvWriteWordRegister(iop_base, reg_off, word) \
-     (ADV_MEM_WRITEW((iop_base) + (reg_off), cpu_to_le16(word)))
+     (ADV_MEM_WRITEW((iop_base) + (reg_off), (word)))
+
+/* Write dword (4 bytes) to a register. */
+#define AdvWriteDWordRegister(iop_base, reg_off, dword) \
+     (ADV_MEM_WRITEDW((iop_base) + (reg_off), (dword)))
 
 /* Read byte from LRAM. */
 #define AdvReadByteLram(iop_base, addr, byte) \
@@ -3237,17 +3322,17 @@
 #define AdvReadWordLram(iop_base, addr, word) \
 do { \
     ADV_MEM_WRITEW((iop_base) + IOPW_RAM_ADDR, (addr)); \
-    (word) = le16_to_cpu(ADV_MEM_READW((iop_base) + IOPW_RAM_DATA)); \
+    (word) = (ADV_MEM_READW((iop_base) + IOPW_RAM_DATA)); \
 } while (0)
 
 /* Write word (2 bytes) to LRAM. */
 #define AdvWriteWordLram(iop_base, addr, word) \
     (ADV_MEM_WRITEW((iop_base) + IOPW_RAM_ADDR, (addr)), \
-     ADV_MEM_WRITEW((iop_base) + IOPW_RAM_DATA, cpu_to_le16(word)))
+     ADV_MEM_WRITEW((iop_base) + IOPW_RAM_DATA, (word)))
 
-/* Write double word (4 bytes) to LRAM */
+/* Write little-endian double word (4 bytes) to LRAM */
 /* Because of unspecified C language ordering don't use auto-increment. */
-#define AdvWriteDWordLram(iop_base, addr, dword) \
+#define AdvWriteDWordLramNoSwap(iop_base, addr, dword) \
     ((ADV_MEM_WRITEW((iop_base) + IOPW_RAM_ADDR, (addr)), \
       ADV_MEM_WRITEW((iop_base) + IOPW_RAM_DATA, \
                      cpu_to_le16((ushort) ((dword) & 0xFFFF)))), \
@@ -3257,13 +3342,12 @@
 
 /* Read word (2 bytes) from LRAM assuming that the address is already set. */
 #define AdvReadWordAutoIncLram(iop_base) \
-     le16_to_cpu(ADV_MEM_READW((iop_base) + IOPW_RAM_DATA))
+     (ADV_MEM_READW((iop_base) + IOPW_RAM_DATA))
 
 /* Write word (2 bytes) to LRAM assuming that the address is already set. */
 #define AdvWriteWordAutoIncLram(iop_base, word) \
-     (ADV_MEM_WRITEW((iop_base) + IOPW_RAM_DATA, cpu_to_le16(word)))
+     (ADV_MEM_WRITEW((iop_base) + IOPW_RAM_DATA, (word)))
 
-#endif /* version >= v1,3,0 */
 
 /*
  * Define macro to check for Condor signature.
@@ -3288,7 +3372,7 @@
 /*
  * Abort an SRB in the chip's RISC Memory. The 'srb_ptr' argument must
  * match the ASC_SCSI_REQ_Q 'srb_ptr' field.
- * 
+ *
  * If the request has not yet been sent to the device it will simply be
  * aborted from RISC memory. If the request is disconnected it will be
  * aborted on reselection by sending an Abort Message to the target ID.
@@ -3376,6 +3460,7 @@
  */
 extern ADVEEP_3550_CONFIG Default_3550_EEPROM_Config;
 extern ADVEEP_38C0800_CONFIG Default_38C0800_EEPROM_Config;
+extern ADVEEP_38C1600_CONFIG Default_38C1600_EEPROM_Config;
 
 /*
  * DvcGetPhyAddr() flag arguments
@@ -3388,8 +3473,9 @@
 #define ADV_IS_CARRIER_FLAG     0x20 /* 'addr' is ADV_CARR_T pointer */
 
 /* Return the address that is aligned at the next doubleword >= to 'addr'. */
-#define ADV_DWALIGN(addr)       (((ulong) (addr) + 0x3) & ~0x3)
+#define ADV_8BALIGN(addr)      (((ulong) (addr) + 0x7) & ~0x7)
 #define ADV_16BALIGN(addr)     (((ulong) (addr) + 0xF) & ~0xF)
+#define ADV_32BALIGN(addr)     (((ulong) (addr) + 0x1F) & ~0x1F)
 
 /*
  * Total contiguous memory needed for driver SG blocks.
@@ -3399,50 +3485,76 @@
  * single request.
  */
 
-#ifndef ADV_MAX_SG_LIST
-Forced Error: Driver must define ADV_MAX_SG_LIST.
-#endif /* ADV_MAX_SG_LIST */
-
 #define ADV_SG_LIST_MAX_BYTE_SIZE \
          (sizeof(ADV_SG_BLOCK) * \
           ((ADV_MAX_SG_LIST + (NO_OF_SG_PER_BLOCK - 1))/NO_OF_SG_PER_BLOCK))
 
+/*
+ * Inquiry data structure and bitfield macros
+ *
+ * Using bitfields to access the subchar data isn't portable across
+ * endianness, so instead mask and shift. Only quantities of more
+ * than 1 bit are shifted, since the others are just tested for true
+ * or false.
+ */
+
+#define ADV_INQ_DVC_TYPE(inq)       ((inq)->periph & 0x1f)
+#define ADV_INQ_QUALIFIER(inq)      (((inq)->periph & 0xe0) >> 5)
+#define ADV_INQ_DVC_TYPE_MOD(inq)   ((inq)->devtype & 0x7f)
+#define ADV_INQ_REMOVABLE(inq)      ((inq)->devtype & 0x80)
+#define ADV_INQ_ANSI_VER(inq)       ((inq)->ver & 0x07)
+#define ADV_INQ_ECMA_VER(inq)       (((inq)->ver & 0x38) >> 3)
+#define ADV_INQ_ISO_VER(inq)        (((inq)->ver & 0xc0) >> 6)
+#define ADV_INQ_RESPONSE_FMT(inq)   ((inq)->byte3 & 0x0f)
+#define ADV_INQ_TERM_IO(inq)        ((inq)->byte3 & 0x40)
+#define ADV_INQ_ASYNC_NOTIF(inq)    ((inq)->byte3 & 0x80)
+#define ADV_INQ_SOFT_RESET(inq)     ((inq)->flags & 0x01)
+#define ADV_INQ_CMD_QUEUE(inq)      ((inq)->flags & 0x02)
+#define ADV_INQ_LINK_CMD(inq)       ((inq)->flags & 0x08)
+#define ADV_INQ_SYNC(inq)           ((inq)->flags & 0x10)
+#define ADV_INQ_WIDE16(inq)         ((inq)->flags & 0x20)
+#define ADV_INQ_WIDE32(inq)         ((inq)->flags & 0x40)
+#define ADV_INQ_REL_ADDR(inq)       ((inq)->flags & 0x80)
+#define ADV_INQ_INFO_UNIT(inq)      ((inq)->info & 0x01)
+#define ADV_INQ_QUICK_ARB(inq)      ((inq)->info & 0x02)
+#define ADV_INQ_CLOCKING(inq)       (((inq)->info & 0x0c) >> 2)
+
 typedef struct {
-  uchar peri_dvc_type   : 5;    /* peripheral device type */
-  uchar peri_qualifier  : 3;    /* peripheral qualifier */
-  uchar dvc_type_modifier : 7;  /* device type modifier (for SCSI I) */
-  uchar rmb      : 1;           /* RMB - removable medium bit */
-  uchar ansi_apr_ver : 3;       /* ANSI approved version */
-  uchar ecma_ver : 3;           /* ECMA version */
-  uchar iso_ver  : 2;           /* ISO version */
-  uchar rsp_data_fmt : 4;       /* response data format */
+  uchar periph;                 /* peripheral device type [0:4] */
+                                /* peripheral qualifier [5:7] */
+  uchar devtype;                /* device type modifier (for SCSI I) [0:6] */
+                                /* RMB - removable medium bit [7] */
+  uchar ver;                    /* ANSI approved version [0:2] */
+                                /* ECMA version [3:5] */
+                                /* ISO version [6:7] */
+  uchar byte3;                  /* response data format [0:3] */
                                 /* 0 SCSI 1 */
                                 /* 1 CCS */
                                 /* 2 SCSI-2 */
                                 /* 3-F reserved */
-  uchar res1     : 2;           /* reserved */
-  uchar TemIOP   : 1;           /* terminate I/O process bit (see 5.6.22) */
-  uchar aenc     : 1;           /* asynch. event notification (processor) */
+                                /* reserved [4:5] */
+                                /* terminate I/O process bit (see 5.6.22) [6] */
+                                /* asynch. event notification (processor) [7] */
   uchar add_len;                /* additional length */
+  uchar res1;                   /* reserved */
   uchar res2;                   /* reserved */
-  uchar res3;                   /* reserved */
-  uchar StfRe   : 1;            /* soft reset implemented */
-  uchar CmdQue  : 1;            /* command queuing */
-  uchar res4    : 1;            /* reserved */
-  uchar Linked  : 1;            /* linked command for this logical unit */
-  uchar Sync    : 1;            /* synchronous data transfer */
-  uchar WBus16  : 1;            /* wide bus 16 bit data transfer */
-  uchar WBus32  : 1;            /* wide bus 32 bit data transfer */
-  uchar RelAdr  : 1;            /* relative addressing mode */
+  uchar flags;                  /* soft reset implemented [0] */
+                                /* command queuing [1] */
+                                /* reserved [2] */
+                                /* linked command for this logical unit [3] */
+                                /* synchronous data transfer [4] */
+                                /* wide bus 16 bit data transfer [5] */
+                                /* wide bus 32 bit data transfer [6] */
+                                /* relative addressing mode [7] */
   uchar vendor_id[8];           /* vendor identification */
   uchar product_id[16];         /* product identification */
   uchar product_rev_level[4];   /* product revision level */
   uchar vendor_specific[20];    /* vendor specific */
-  uchar IUS      : 1;           /* information unit supported */
-  uchar QAS      : 1;           /* quick arbitrate supported */
-  uchar Clocking : 2;           /* clocking field */
-  uchar res5     : 4;           /* reserved */
-  uchar res6;                   /* reserved */
+  uchar info;                   /* information unit supported [0] */
+                                /* quick arbitrate supported [1] */
+                                /* clocking field [2:3] */
+                                /* reserved [4:7] */
+  uchar res3;                   /* reserved */
 } ADV_SCSI_INQUIRY; /* 58 bytes */
 
 
@@ -3459,7 +3571,6 @@
 
 /* asc_board_t flags */
 #define ASC_HOST_IN_RESET       0x01
-#define ASC_HOST_IN_ABORT       0x02
 #define ASC_IS_WIDE_BOARD       0x04    /* AdvanSys Wide Board */
 #define ASC_SELECT_QUEUE_DEPTHS 0x08
 
@@ -3473,22 +3584,17 @@
  * and data after loading, define macros for this purpose. These macros
  * are not used when the driver is built as a module, cf. linux/init.h.
  */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,23)
-#define ASC_INITFUNC(type, func)        type func
-#define ASC_INITDATA
-#define ASC_INIT
-#else /* version >= v2.1.23 */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,16)
-#define ASC_INITFUNC(type, func)        __initfunc(type func)
-#else /* version >= v2.3.16 */
+#if ASC_LINUX_KERNEL24
 #define ASC_INITFUNC(type, func)        type __init func
-#endif /* version >= v2.3.16 */
+#elif ASC_LINUX_KERNEL22
+#define ASC_INITFUNC(type, func)        __initfunc(type func)
+#endif
 #define ASC_INITDATA                    __initdata
 #define ASC_INIT                        __init
-#endif /* version >= v2.1.23 */
 
 #define ASC_INFO_SIZE           128            /* advansys_info() line size */
 
+#ifdef CONFIG_PROC_FS
 /* /proc/scsi/advansys/[0...] related definitions */
 #define ASC_PRTBUF_SIZE         2048
 #define ASC_PRTLINE_SIZE        160
@@ -3504,6 +3610,37 @@
     }
 
 #define ASC_MIN(a, b) (((a) < (b)) ? (a) : (b))
+#endif /* CONFIG_PROC_FS */
+
+/*
+ * XXX - Release and acquire the io_request_lock. These macros are needed
+ * because the 2.4 kernel SCSI mid-level driver holds the 'io_request_lock'
+ * on entry to SCSI low-level drivers.
+ *
+ * These definitions and all code that uses code should be removed when the
+ * SCSI mid-level driver no longer holds the 'io_request_lock' on entry to
+ * SCSI low-level driver detect, queuecommand, and reset entrypoints.
+ *
+ * The interrupt flags values doesn't matter in the macros because the
+ * SCSI mid-level will save and restore the flags values before and after
+ * calling advansys_detect, advansys_queuecommand, and advansys_reset where
+ * these macros are used. We do want interrupts enabled after the lock is
+ * released so an explicit sti() is done. The driver only needs interrupts
+ * disabled when it acquires the per board lock.
+ */
+#define ASC_UNLOCK_IO_REQUEST_LOCK \
+    { \
+        ulong flags; /* flags value not needed, cf. comment above. */ \
+        save_flags(flags); \
+        spin_unlock_irqrestore(&io_request_lock, flags); \
+        sti(); /* enable interrupts */ \
+    }
+
+#define ASC_LOCK_IO_REQUEST_LOCK \
+    { \
+        ulong flags; /* flags value not needed, cf. comment above. */ \
+        spin_lock_irqsave(&io_request_lock, flags); \
+    }
 
 /* Asc Library return codes */
 #define ASC_TRUE        1
@@ -3627,12 +3764,13 @@
 #define PCI_MAX_BUS             0xFF
 #define PCI_IOADDRESS_MASK      0xFFFE
 #define ASC_PCI_VENDORID        0x10CD
-#define ASC_PCI_DEVICE_ID_CNT   5       /* PCI Device ID count. */
+#define ASC_PCI_DEVICE_ID_CNT   6       /* PCI Device ID count. */
 #define ASC_PCI_DEVICE_ID_1100  0x1100
 #define ASC_PCI_DEVICE_ID_1200  0x1200
 #define ASC_PCI_DEVICE_ID_1300  0x1300
 #define ASC_PCI_DEVICE_ID_2300  0x2300  /* ASC-3550 */
 #define ASC_PCI_DEVICE_ID_2500  0x2500  /* ASC-38C0800 */
+#define ASC_PCI_DEVICE_ID_2700  0x2700  /* ASC-38C1600 */
 
 /* PCI IO Port Addresses to generate special cycle */
 
@@ -3843,10 +3981,8 @@
 /* Per board statistics structure */
 struct asc_stats {
     /* Driver Entrypoint Statistics */
-    ADV_DCNT command;         /* # calls to advansys_command() */
     ADV_DCNT queuecommand;    /* # calls to advansys_queuecommand() */
-    ADV_DCNT abort;           /* # calls to advansys_abort() */
-    ADV_DCNT reset;           /* # calls to advansys_reset() */
+    ADV_DCNT reset;           /* # calls to advansys_eh_bus_reset() */
     ADV_DCNT biosparam;       /* # calls to advansys_biosparam() */
     ADV_DCNT interrupt;       /* # advansys_interrupt() calls */
     ADV_DCNT callback;        /* # calls to asc/adv_isr_callback() */
@@ -3899,16 +4035,18 @@
  * ADV_SG_BLOCK structure holds 15 scatter-gather elements. Under Linux
  * up to 255 scatter-gather elements may be used per request or
  * ADV_SCSI_REQ_Q.
+ *
+ * Both structures must be 32 byte aligned.
  */
 typedef struct adv_sgblk {
-    ADV_SG_BLOCK        sg_block;        /* Sgblock structure. */
-    uchar               align2[4];       /* Sgblock structure padding. */
-    struct adv_sgblk    *next_sgblkp;    /* Next scatter-gather structure. */
+    ADV_SG_BLOCK        sg_block;     /* Sgblock structure. */
+    uchar               align[32];    /* Sgblock structure padding. */
+    struct adv_sgblk    *next_sgblkp; /* Next scatter-gather structure. */
 } adv_sgblk_t;
 
 typedef struct adv_req {
     ADV_SCSI_REQ_Q      scsi_req_q;   /* Adv Library request structure. */
-    uchar               align1[4];    /* Request structure padding. */
+    uchar               align[32];    /* Request structure padding. */
     Scsi_Cmnd           *cmndp;       /* Mid-Level SCSI command pointer. */
     adv_sgblk_t         *sgblkp;      /* Adv Library scatter-gather pointer. */
     struct adv_req      *next_reqp;   /* Next Request Structure. */
@@ -3932,6 +4070,7 @@
         ASC_DVC_CFG      asc_dvc_cfg;           /* Narrow board */
         ADV_DVC_CFG      adv_dvc_cfg;           /* Wide board */
     } dvc_cfg;
+    ushort               asc_n_io_port;         /* Number I/O ports. */
     asc_queue_t          active;                /* Active command queue */
     asc_queue_t          waiting;               /* Waiting command queue */
     asc_queue_t          done;                  /* Done command queue */
@@ -3944,12 +4083,14 @@
         ASCEEP_CONFIG         asc_eep;          /* Narrow EEPROM config. */
         ADVEEP_3550_CONFIG    adv_3550_eep;     /* 3550 EEPROM config. */
         ADVEEP_38C0800_CONFIG adv_38C0800_eep;  /* 38C0800 EEPROM config. */
+        ADVEEP_38C1600_CONFIG adv_38C1600_eep;  /* 38C1600 EEPROM config. */
     } eep_config;
     ulong                last_reset;            /* Saved last reset time */
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+    spinlock_t lock;                            /* Board spinlock */
+#ifdef CONFIG_PROC_FS
     /* /proc/scsi/advansys/[0...] */
-    char                 *prtbuf;               /* Statistics Print Buffer */
-#endif /* version >= v1.3.0 */
+    char                 *prtbuf;               /* /proc print buffer */
+#endif /* CONFIG_PROC_FS */
 #ifdef ADVANSYS_STATS
     struct asc_stats     asc_stats;             /* Board statistics */
 #endif /* ADVANSYS_STATS */
@@ -4032,8 +4173,8 @@
 
 /* Note: All driver global data should be initialized. */
 
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) && \
-    LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#if ASC_LINUX_KERNEL22
+#ifdef CONFIG_PROC_FS
 struct proc_dir_entry proc_scsi_advansys =
 {
     PROC_SCSI_ADVANSYS,              /* unsigned short low_ino */
@@ -4042,13 +4183,14 @@
     S_IFDIR | S_IRUGO | S_IXUGO,     /* mode_t mode */
     2                                /* nlink_t nlink */
 };
-#endif /* v2.3.28 > version >= v1.3.0 */
+#endif /* CONFIG_PROC_FS */
+#endif /* ASC_LINUX_KERNEL22 */
 
 /* Number of boards detected in system. */
 STATIC int asc_board_count = 0;
 STATIC struct Scsi_Host    *asc_host[ASC_NUM_BOARD_SUPPORTED] = { 0 };
 
-/* Overrun buffer shared between all boards. */
+/* Overrun buffer used by all narrow boards. */
 STATIC uchar overrun_buf[ASC_OVERRUN_BSIZE] = { 0 };
 
 /*
@@ -4065,12 +4207,6 @@
     ASC_IS_PCI,
 };
 
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
-STATIC int pci_scan_method ASC_INITDATA = -1;
-#endif /* ASC_CONFIG_PCI */
-#endif /* version < v2.1.93 */
-
 /*
  * Used with the LILO 'advansys' option to eliminate or
  * limit I/O port probing at boot time, cf. advansys_setup().
@@ -4078,19 +4214,6 @@
 STATIC int asc_iopflag = ASC_FALSE;
 STATIC int asc_ioport[ASC_NUM_IOPORT_PROBE] = { 0, 0, 0, 0 };
 
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
-/*
- * In kernels earlier than v1.3.0, kmalloc() does not work
- * during driver initialization. Therefore statically declare
- * 16 elements of each structure. v1.3.0 kernels will probably
- * not need any more than this number.
- */
-uchar adv_carr_buf[20 * sizeof(ADV_CARR_T)] = { 0 };
-uchar adv_req_buf[16 * sizeof(adv_req_t)] = { 0 };
-#define ADV_SGBLK_BUF_CNT       32
-uchar adv_sgblk_buf[ADV_SGBLK_BUF_CNT * sizeof(adv_sgblk_t)] = { 0 };
-#endif /* version >= v1,3,0 */
-
 #ifdef ADVANSYS_DEBUG
 STATIC char *
 asc_bus_name[ASC_NUM_BUS] = {
@@ -4100,7 +4223,7 @@
     "ASC_IS_PCI",
 };
 
-STATIC int          asc_dbglvl = 2;
+STATIC int          asc_dbglvl = 3;
 #endif /* ADVANSYS_DEBUG */
 
 /* Declaration for Asc Library internal data referenced by driver. */
@@ -4113,19 +4236,9 @@
  * advansys.h contains function prototypes for functions global to Linux.
  */
 
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
-STATIC int          asc_proc_copy(off_t, off_t, char *, int , char *, int);
-#endif /* version >= v1.3.0 */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,70)
-STATIC void         advansys_interrupt(int, struct pt_regs *);
-#else /* version >= v1.3.70 */
-STATIC void         advansys_interrupt(int, void *, struct pt_regs *);
-#endif /* version >= v1.3.70 */
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-STATIC void         advansys_select_queue_depths(struct Scsi_Host *,
-                                                Scsi_Device *);
-#endif /* version >= v1.3.89 */
-STATIC void       advansys_command_done(Scsi_Cmnd *);
+STATIC void       advansys_interrupt(int, void *, struct pt_regs *);
+STATIC void       advansys_select_queue_depths(struct Scsi_Host *,
+                                               Scsi_Device *);
 STATIC void       asc_scsi_done_list(Scsi_Cmnd *);
 STATIC int        asc_execute_scsi_cmnd(Scsi_Cmnd *);
 STATIC int        asc_build_req(asc_board_t *, Scsi_Cmnd *);
@@ -4134,24 +4247,13 @@
 STATIC void       asc_isr_callback(ASC_DVC_VAR *, ASC_QDONE_INFO *);
 STATIC void       adv_isr_callback(ADV_DVC_VAR *, ADV_SCSI_REQ_Q *);
 STATIC void       adv_async_callback(ADV_DVC_VAR *, uchar);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
-STATIC int        asc_srch_pci_dev(PCI_DEVICE *);
-STATIC uchar      asc_scan_method(void);
-STATIC int        asc_pci_find_dev(PCI_DEVICE *);
-STATIC void       asc_get_pci_cfg(PCI_DEVICE *, PCI_CONFIG_SPACE *);
-STATIC ushort     asc_get_cfg_word(PCI_DATA *);
-STATIC uchar      asc_get_cfg_byte(PCI_DATA *);
-STATIC void       asc_put_cfg_byte(PCI_DATA *, uchar);
-#endif /* ASC_CONFIG_PCI */
-#endif /* version < v2.1.93 */
 STATIC void       asc_enqueue(asc_queue_t *, REQP, int);
 STATIC REQP       asc_dequeue(asc_queue_t *, int);
 STATIC REQP       asc_dequeue_list(asc_queue_t *, REQP *, int);
 STATIC int        asc_rmqueue(asc_queue_t *, REQP);
-STATIC int        asc_isqueued(asc_queue_t *, REQP);
 STATIC void       asc_execute_queue(asc_queue_t *);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#ifdef CONFIG_PROC_FS
+STATIC int        asc_proc_copy(off_t, off_t, char *, int , char *, int);
 STATIC int        asc_prt_board_devices(struct Scsi_Host *, char *, int);
 STATIC int        asc_prt_adv_bios(struct Scsi_Host *, char *, int);
 STATIC int        asc_get_eeprom_string(ushort *serialnum, uchar *cp);
@@ -4161,16 +4263,21 @@
 STATIC int        asc_prt_asc_board_info(struct Scsi_Host *, char *, int);
 STATIC int        asc_prt_adv_board_info(struct Scsi_Host *, char *, int);
 STATIC int        asc_prt_line(char *, int, char *fmt, ...);
-#endif /* version >= v1.3.0 */
+#endif /* CONFIG_PROC_FS */
 
 /* Declaration for Asc Library internal functions referenced by driver. */
 STATIC int          AscFindSignature(PortAddr);
 STATIC ushort       AscGetEEPConfig(PortAddr, ASCEEP_CONFIG *, ushort);
 
+/* Statistics function prototypes. */
 #ifdef ADVANSYS_STATS
+#ifdef CONFIG_PROC_FS
 STATIC int          asc_prt_board_stats(struct Scsi_Host *, char *, int);
+STATIC int          asc_prt_target_stats(struct Scsi_Host *, int, char *, int);
+#endif /* CONFIG_PROC_FS */
 #endif /* ADVANSYS_STATS */
 
+/* Debug function prototypes. */
 #ifdef ADVANSYS_DEBUG
 STATIC void         asc_prt_scsi_host(struct Scsi_Host *);
 STATIC void         asc_prt_scsi_cmnd(Scsi_Cmnd *);
@@ -4185,16 +4292,12 @@
 STATIC void         asc_prt_hex(char *f, uchar *, int);
 #endif /* ADVANSYS_DEBUG */
 
-#ifdef ADVANSYS_ASSERT
-STATIC int             advansys_interrupts_enabled(void);
-#endif /* ADVANSYS_ASSERT */
-
 
 /*
  * --- Linux 'Scsi_Host_Template' and advansys_setup() Functions
  */
 
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#ifdef CONFIG_PROC_FS
 /*
  * advansys_proc_info() - /proc/scsi/advansys/[0-(ASC_NUM_BOARD_SUPPORTED-1)]
  *
@@ -4216,10 +4319,9 @@
  * user just won't get all the available statistics.
  */
 int
-advansys_proc_info(char *buffer, char **start, off_t offset, int length, 
+advansys_proc_info(char *buffer, char **start, off_t offset, int length,
                    int hostno, int inout)
 {
-#ifdef CONFIG_PROC_FS
     struct Scsi_Host    *shp;
     asc_board_t         *boardp;
     int                 i;
@@ -4231,6 +4333,9 @@
     char                *curbuf;
     off_t               advoffset;
     Scsi_Device         *scd;
+#ifdef ADVANSYS_STATS
+    int                 tgt_id;
+#endif /* ADVANSYS_STATS */
 
     ASC_DBG(1, "advansys_proc_info: begin\n");
 
@@ -4322,11 +4427,7 @@
      * Display target driver information for each device attached
      * to the board.
      */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,75)
-    for (scd = scsi_devices; scd; scd = scd->next)
-#else /* version >= v2.1.75 */
     for (scd = shp->host_queue; scd; scd = scd->next)
-#endif /* version >= v2.1.75 */
     {
         if (scd->host == shp) {
             cp = boardp->prtbuf;
@@ -4347,7 +4448,7 @@
             curbuf += cnt;
         }
     }
-    
+
     /*
      * Display EEPROM configuration for the board.
      */
@@ -4390,7 +4491,7 @@
      */
     cp = boardp->prtbuf;
     cplen = asc_prt_board_stats(shp, cp, ASC_PRTBUF_SIZE);
-    ASC_ASSERT(cplen < ASC_PRTBUF_SIZE);
+    ASC_ASSERT(cplen <= ASC_PRTBUF_SIZE);
     cnt = asc_proc_copy(advoffset, offset, curbuf, leftlen, cp, cplen);
     totcnt += cnt;
     leftlen -= cnt;
@@ -4400,6 +4501,24 @@
     }
     advoffset += cplen;
     curbuf += cnt;
+
+    /*
+     * Display driver statistics for each target.
+     */
+    for (tgt_id = 0; tgt_id <= ADV_MAX_TID; tgt_id++) {
+      cp = boardp->prtbuf;
+      cplen = asc_prt_target_stats(shp, tgt_id, cp, ASC_PRTBUF_SIZE);
+      ASC_ASSERT(cplen <= ASC_PRTBUF_SIZE);
+      cnt = asc_proc_copy(advoffset, offset, curbuf, leftlen, cp, cplen);
+      totcnt += cnt;
+      leftlen -= cnt;
+      if (leftlen == 0) {
+        ASC_DBG1(1, "advansys_proc_info: totcnt %d\n", totcnt);
+        return totcnt;
+      }
+      advoffset += cplen;
+      curbuf += cnt;
+    }
 #endif /* ADVANSYS_STATS */
 
     /*
@@ -4426,11 +4545,8 @@
     ASC_DBG1(1, "advansys_proc_info: totcnt %d\n", totcnt);
 
     return totcnt;
-#else /* CONFIG_PROC_FS */
-    return 0;
-#endif /* CONFIG_PROC_FS */
 }
-#endif /* version >= v1.3.0 */
+#endif /* CONFIG_PROC_FS */
 
 /*
  * advansys_detect()
@@ -4461,19 +4577,6 @@
     int                 ioport = 0;
     int                 share_irq = FALSE;
     int                 iolen = 0;
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
-    int                 pci_init_search = 0;
-    PCI_DEVICE          pci_device[ASC_NUM_BOARD_SUPPORTED];
-    int                 pci_card_cnt_max = 0;
-    int                 pci_card_cnt = 0;
-    PCI_DEVICE          pciDevice;
-    PCI_CONFIG_SPACE    pciConfig;
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
-    ADV_PADDR           pci_memory_address;
-#endif /* version >= v1,3,0 */
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */ 
 #ifdef CONFIG_PCI
     int                 pci_init_search = 0;
     struct pci_dev      *pci_devicep[ASC_NUM_BOARD_SUPPORTED];
@@ -4486,11 +4589,11 @@
                                     ASC_PCI_DEVICE_ID_1200,
                                     ASC_PCI_DEVICE_ID_1300,
                                     ASC_PCI_DEVICE_ID_2300,
-                                    ASC_PCI_DEVICE_ID_2500
+                                    ASC_PCI_DEVICE_ID_2500,
+                                    ASC_PCI_DEVICE_ID_2700
                         };
     ADV_PADDR           pci_memory_address;
 #endif /* CONFIG_PCI */
-#endif /* version >= v2.1.93 */ 
     int                 warn_code, err_code;
     int                 ret;
 
@@ -4503,11 +4606,18 @@
 
     ASC_DBG(1, "advansys_detect: begin\n");
 
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,28)
+    /*
+     * XXX - Remove this comment and the next line when SCSI mid-level
+     * no longer acquires 'io_request_lock' before calling the SCSI
+     * low-level detect entrypoint.
+     */
+    ASC_UNLOCK_IO_REQUEST_LOCK
+
+#if ASC_LINUX_KERNEL24
     tpnt->proc_name = "advansys";
-#elif LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#elif ASC_LINUX_KERNEL22
     tpnt->proc_dir = &proc_scsi_advansys;
-#endif /* version >= v1.3.0 */
+#endif
 
     asc_board_count = 0;
 
@@ -4517,7 +4627,7 @@
      */
     if (asc_iopflag == ASC_TRUE) {
         for (ioport = 0; ioport < ASC_NUM_IOPORT_PROBE; ioport++) {
-            ASC_DBG2(1, "advansys_detect: asc_ioport[%d] %x\n",
+            ASC_DBG2(1, "advansys_detect: asc_ioport[%d] 0x%x\n",
                 ioport, asc_ioport[ioport]);
             if (asc_ioport[ioport] != 0) {
                 for (iop = 0; iop < ASC_IOADR_TABLE_MAX_IX; iop++) {
@@ -4536,15 +4646,6 @@
         ioport = 0;
     }
 
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
-    memset(&pciDevice, 0, sizeof(PCI_DEVICE));
-    memset(&pciConfig, 0, sizeof(PCI_CONFIG_SPACE));
-    pciDevice.maxBusNumber = PCI_MAX_BUS;
-    pciDevice.endSlot = PCI_MAX_SLOT;
-#endif /* ASC_CONFIG_PCI */
-#endif /* version < v2.1.93 */ 
-
     for (bus = 0; bus < ASC_NUM_BUS; bus++) {
 
         ASC_DBG2(1, "advansys_detect: bus search type %d (%s)\n",
@@ -4559,6 +4660,7 @@
             switch (asc_bus[bus]) {
             case ASC_IS_ISA:
             case ASC_IS_VL:
+#ifdef CONFIG_ISA
                 if (asc_iopflag == ASC_FALSE) {
                     iop = AscSearchIOPortAddr(iop, asc_bus[bus]);
                 } else {
@@ -4577,7 +4679,8 @@
                         }
                     }
                     if (iop) {
-                        ASC_DBG1(1, "advansys_detect: probing I/O port %x...\n",
+                        ASC_DBG1(1,
+                                "advansys_detect: probing I/O port 0x%x...\n",
                             iop);
                         if (check_region(iop, ASC_IOADR_GAP) != 0) {
                             printk(
@@ -4618,74 +4721,16 @@
                         asc_ioport[ioport++] = 0;
                     }
                 }
+#endif /* CONFIG_ISA */
                 break;
 
             case ASC_IS_EISA:
+#ifdef CONFIG_ISA
                 iop = AscSearchIOPortAddr(iop, asc_bus[bus]);
+#endif /* CONFIG_ISA */
                 break;
 
             case ASC_IS_PCI:
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
-                if (pci_init_search == 0) {
-                    int i, j;
-
-                    pci_init_search = 1;
-
-                    /* Find all PCI cards. */
-                    while (asc_srch_pci_dev(&pciDevice) == PCI_DEVICE_FOUND) {
-                        pci_device[pci_card_cnt_max++] = pciDevice;
-                    }
-
-                    /*
-                     * Sort PCI cards in ascending order by PCI Bus, Slot,
-                     * and Device Number.
-                     */
-                    for (i = 0; i < pci_card_cnt_max - 1; i++)
-                    {
-                        for (j = i + 1; j < pci_card_cnt_max; j++) {
-                            if ((pci_device[j].busNumber <
-                                 pci_device[i].busNumber) ||
-                                ((pci_device[j].busNumber ==
-                                  pci_device[i].busNumber) &&
-                                  (pci_device[j].slotNumber <
-                                   pci_device[i].slotNumber)) ||
-                                ((pci_device[j].busNumber ==
-                                  pci_device[i].busNumber) &&
-                                  (pci_device[j].slotNumber ==
-                                   pci_device[i].slotNumber) &&
-                                  (pci_device[j].devFunc <
-                                   pci_device[i].devFunc))) {
-                                pciDevice = pci_device[i];
-                                pci_device[i] = pci_device[j];
-                                pci_device[j] = pciDevice;
-                            }
-                        }
-                    }
-
-                    pci_card_cnt = 0;
-                } else {
-                    pci_card_cnt++;
-                }
-
-                if (pci_card_cnt == pci_card_cnt_max) {
-                    iop = 0;
-                } else {
-                    pciDevice = pci_device[pci_card_cnt];
-                    ASC_DBG2(2,
-                        "advansys_detect: slotFound %d, busNumber %d\n",
-                        pciDevice.slotFound, pciDevice.busNumber);
-                    asc_get_pci_cfg(&pciDevice, &pciConfig);
-                    iop = pciConfig.baseAddress[0] & PCI_IOADDRESS_MASK;
-                    ASC_DBG2(1,
-                        "advansys_detect: vendorID %X, deviceID %X\n",
-                        pciConfig.vendorID, pciConfig.deviceID);
-                    ASC_DBG2(2, "advansys_detect: iop %X, irqLine %d\n",
-                        iop, pciConfig.irqLine);
-                }
-                break;
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */ 
 #ifdef CONFIG_PCI
                 if (pci_init_search == 0) {
                     int i, j;
@@ -4699,8 +4744,13 @@
                             NULL) {
                             pci_device_id_cnt++;
                         } else {
-			    if (pci_enable_device(pci_devp) == 0)
-                            	pci_devicep[pci_card_cnt_max++] = pci_devp;
+#if ASC_LINUX_KERNEL24
+                            if (pci_enable_device(pci_devp) == 0) {
+                                pci_devicep[pci_card_cnt_max++] = pci_devp;
+                            }
+#elif ASC_LINUX_KERNEL22
+                            pci_devicep[pci_card_cnt_max++] = pci_devp;
+#endif
                         }
                     }
 
@@ -4737,11 +4787,11 @@
                     ASC_DBG2(2,
                         "advansys_detect: devfn %d, bus number %d\n",
                         pci_devp->devfn, pci_devp->bus->number);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,13)
-                    iop = pci_devp->base_address[0] & PCI_IOADDRESS_MASK;
-#else /* version >= v2.3.13 */ 
+#if ASC_LINUX_KERNEL24
                     iop = pci_resource_start(pci_devp, 0);
-#endif /* version >= v2.3.13 */ 
+#elif ASC_LINUX_KERNEL22
+                    iop = pci_devp->base_address[0] & PCI_IOADDRESS_MASK;
+#endif
                     ASC_DBG2(1,
                         "advansys_detect: vendorID %X, deviceID %X\n",
                         pci_devp->vendor, pci_devp->device);
@@ -4749,7 +4799,6 @@
                         iop, pci_devp->irq);
                 }
 #endif /* CONFIG_PCI */
-#endif /* version >= v2.1.93 */ 
                 break;
 
             default:
@@ -4757,7 +4806,7 @@
                     asc_bus[bus]);
                 break;
             }
-            ASC_DBG1(1, "advansys_detect: iop %x\n", iop);
+            ASC_DBG1(1, "advansys_detect: iop 0x%x\n", iop);
 
             /*
              * Adapter not found, try next bus type.
@@ -4774,9 +4823,13 @@
              */
             ASC_DBG(2, "advansys_detect: scsi_register()\n");
             shp = scsi_register(tpnt, sizeof(asc_board_t));
-            
-            if(shp==NULL)
-            	continue;
+
+            if (shp == NULL) {
+                continue;
+            }
+#ifdef CONFIG_PCI
+	    scsi_set_pci_device(shp, pci_devp);
+#endif
 
             /* Save a pointer to the Scsi_host of each board found. */
             asc_host[asc_board_count++] = shp;
@@ -4786,6 +4839,9 @@
             memset(boardp, 0, sizeof(asc_board_t));
             boardp->id = asc_board_count - 1;
 
+            /* Initialize spinlock. */
+            boardp->lock = SPIN_LOCK_UNLOCKED;
+
             /*
              * Handle both narrow and wide boards.
              *
@@ -4793,25 +4849,15 @@
              * wide board flag. Set-up the board structure based on
              * the board type.
              */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
-            if (asc_bus[bus] == ASC_IS_PCI &&
-                (pciConfig.deviceID == ASC_PCI_DEVICE_ID_2300 ||
-                 pciConfig.deviceID == ASC_PCI_DEVICE_ID_2500))
-            {
-                boardp->flags |= ASC_IS_WIDE_BOARD;
-            }
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */ 
 #ifdef CONFIG_PCI
             if (asc_bus[bus] == ASC_IS_PCI &&
                 (pci_devp->device == ASC_PCI_DEVICE_ID_2300 ||
-                 pci_devp->device == ASC_PCI_DEVICE_ID_2500))
+                 pci_devp->device == ASC_PCI_DEVICE_ID_2500 ||
+                 pci_devp->device == ASC_PCI_DEVICE_ID_2700))
             {
                 boardp->flags |= ASC_IS_WIDE_BOARD;
             }
 #endif /* CONFIG_PCI */
-#endif /* version >= v2.1.93 */ 
 
             if (ASC_NARROW_BOARD(boardp)) {
                 ASC_DBG(1, "advansys_detect: narrow board\n");
@@ -4829,36 +4875,22 @@
                 adv_dvc_varp->cfg = &boardp->dvc_cfg.adv_dvc_cfg;
                 adv_dvc_varp->isr_callback = adv_isr_callback;
                 adv_dvc_varp->async_callback = adv_async_callback;
-
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
-                if (pciConfig.deviceID == ASC_PCI_DEVICE_ID_2300)
-                {
-                    ASC_DBG(1, "advansys_detect: ASC-3550\n");
-                    adv_dvc_varp->chip_type = ADV_CHIP_ASC3550;
-                } else
-                {
-                    ASC_DBG(1, "advansys_detect: ASC-38C0800\n");
-                    adv_dvc_varp->chip_type = ADV_CHIP_ASC38C0800;
-                }
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */ 
 #ifdef CONFIG_PCI
                 if (pci_devp->device == ASC_PCI_DEVICE_ID_2300)
                 {
                     ASC_DBG(1, "advansys_detect: ASC-3550\n");
                     adv_dvc_varp->chip_type = ADV_CHIP_ASC3550;
-                } else
+                } else if (pci_devp->device == ASC_PCI_DEVICE_ID_2500)
                 {
                     ASC_DBG(1, "advansys_detect: ASC-38C0800\n");
                     adv_dvc_varp->chip_type = ADV_CHIP_ASC38C0800;
+                } else
+                {
+                    ASC_DBG(1, "advansys_detect: ASC-38C1600\n");
+                    adv_dvc_varp->chip_type = ADV_CHIP_ASC38C1600;
                 }
 #endif /* CONFIG_PCI */
-#endif /* version >= v2.1.93 */ 
 
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
-                adv_dvc_varp->iop_base = iop;
-#else /* version >= v1,3,0 */
                 /*
                  * Map the board's registers into virtual memory for
                  * PCI slave access. Only memory accesses are used to
@@ -4873,76 +4905,53 @@
                 if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550)
                 {
                     iolen = ADV_3550_IOLEN;
-                } else {
+                } else if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800)
+                {
                     iolen = ADV_38C0800_IOLEN;
+                } else
+                {
+                    iolen = ADV_38C1600_IOLEN;
                 }
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
-                pci_memory_address = pciConfig.baseAddress[1];
-                ASC_DBG1(1, "advansys_detect: pci_memory_address: %lu\n",
-                    (ulong) pci_memory_address);
-                if ((boardp->ioremap_addr =
-                    ioremap(pci_memory_address & PAGE_MASK,
-                         PAGE_SIZE)) == 0) {
-                   ASC_PRINT3(
-"advansys_detect: board %d: ioremap(%lu, %x) returned NULL\n",
-                   boardp->id, (ulong) pci_memory_address, iolen);
-                   scsi_unregister(shp);
-                   asc_board_count--;
-                   continue;
-                }
-                ASC_DBG1(1, "advansys_detect: ioremap_addr: %lx\n",
-                    (ulong) boardp->ioremap_addr);
-                adv_dvc_varp->iop_base = (AdvPortAddr)
-                    (boardp->ioremap_addr +
-                     (pci_memory_address - (pci_memory_address & PAGE_MASK)));
-                ASC_DBG1(1, "advansys_detect: iop_base: %lx\n",
-                    adv_dvc_varp->iop_base);
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */ 
 #ifdef CONFIG_PCI
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,13)
-                pci_memory_address = pci_devp->base_address[1];
-#else /* version >= v2.3.13 */ 
+#if ASC_LINUX_KERNEL24
                 pci_memory_address = pci_resource_start(pci_devp, 1);
-#endif /* version >= v2.3.13 */ 
-                ASC_DBG1(1, "advansys_detect: pci_memory_address: %x\n",
-                    pci_memory_address);
+#elif ASC_LINUX_KERNEL22
+                pci_memory_address = pci_devp->base_address[1];
+#endif
+                ASC_DBG1(1, "advansys_detect: pci_memory_address: 0x%lx\n",
+                    (ulong) pci_memory_address);
                 if ((boardp->ioremap_addr =
                     ioremap(pci_memory_address & PAGE_MASK,
                          PAGE_SIZE)) == 0) {
                    ASC_PRINT3(
 "advansys_detect: board %d: ioremap(%x, %d) returned NULL\n",
-                   boardp->id, pci_memory_address, iolen);
+                       boardp->id, pci_memory_address, iolen);
                    scsi_unregister(shp);
                    asc_board_count--;
                    continue;
                 }
-                ASC_DBG1(1, "advansys_detect: ioremap_addr: %lx\n",
+                ASC_DBG1(1, "advansys_detect: ioremap_addr: 0x%lx\n",
                     (ulong) boardp->ioremap_addr);
                 adv_dvc_varp->iop_base = (AdvPortAddr)
                     (boardp->ioremap_addr +
                      (pci_memory_address - (pci_memory_address & PAGE_MASK)));
-                ASC_DBG1(1, "advansys_detect: iop_base: %lx\n",
+                ASC_DBG1(1, "advansys_detect: iop_base: 0x%lx\n",
                     adv_dvc_varp->iop_base);
 #endif /* CONFIG_PCI */
-#endif /* version >= v2.1.93 */ 
-#endif /* version >= v1,3,0 */
 
                 /*
-                 * Even though it isn't used to access the board in
-                 * kernels greater than or equal to v1.3.0, save
-                 * the I/O Port address so that it can be reported and
-                 * displayed.
+                 * Even though it isn't used to access wide boards, other
+                 * than for the debug line below, save I/O Port address so
+                 * that it can be reported.
                  */
                 boardp->ioport = iop;
 
                 ASC_DBG2(1,
-                    "advansys_detect: iopb_chip_id_1 %x, iopw_chip_id_0 %x\n",
+"advansys_detect: iopb_chip_id_1 0x%x, iopw_chip_id_0 0x%x\n",
                     (ushort) inp(iop + 1), (ushort) inpw(iop));
             }
 
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#ifdef CONFIG_PROC_FS
             /*
              * Allocate buffer for printing information from
              * /proc/scsi/advansys/[0...].
@@ -4956,7 +4965,7 @@
                 asc_board_count--;
                 continue;
             }
-#endif /* version >= v1.3.0 */
+#endif /* CONFIG_PROC_FS */
 
             if (ASC_NARROW_BOARD(boardp)) {
                 /*
@@ -4964,6 +4973,7 @@
                  * calling AscInitGetConfig().
                  */
                 switch (asc_dvc_varp->bus_type) {
+#ifdef CONFIG_ISA
                 case ASC_IS_ISA:
                     shp->unchecked_isa_dma = TRUE;
                     share_irq = FALSE;
@@ -4976,20 +4986,7 @@
                     shp->unchecked_isa_dma = FALSE;
                     share_irq = TRUE;
                     break;
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
-                case ASC_IS_PCI:
-                    shp->irq = asc_dvc_varp->irq_no = pciConfig.irqLine;
-                    asc_dvc_varp->cfg->pci_device_id = pciConfig.deviceID;
-                    asc_dvc_varp->cfg->pci_slot_info =
-                        ASC_PCI_MKID(pciDevice.busNumber,
-                            pciDevice.slotFound,
-                            pciDevice.devFunc);
-                    shp->unchecked_isa_dma = FALSE;
-                    share_irq = TRUE;
-                    break;
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */ 
+#endif /* CONFIG_ISA */
 #ifdef CONFIG_PCI
                 case ASC_IS_PCI:
                     shp->irq = asc_dvc_varp->irq_no = pci_devp->irq;
@@ -5002,7 +4999,6 @@
                     share_irq = TRUE;
                     break;
 #endif /* CONFIG_PCI */
-#endif /* version >= v2.1.93 */ 
                 default:
                     ASC_PRINT2(
 "advansys_detect: board %d: unknown adapter type: %d\n",
@@ -5016,18 +5012,6 @@
                  * For Wide boards set PCI information before calling
                  * AdvInitGetConfig().
                  */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
-                shp->irq = adv_dvc_varp->irq_no = pciConfig.irqLine;
-                adv_dvc_varp->cfg->pci_device_id = pciConfig.deviceID;
-                adv_dvc_varp->cfg->pci_slot_info =
-                    ASC_PCI_MKID(pciDevice.busNumber,
-                        pciDevice.slotFound,
-                        pciDevice.devFunc);
-                shp->unchecked_isa_dma = FALSE;
-                share_irq = TRUE;
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */ 
 #ifdef CONFIG_PCI
                 shp->irq = adv_dvc_varp->irq_no = pci_devp->irq;
                 adv_dvc_varp->cfg->pci_device_id = pci_devp->device;
@@ -5038,7 +5022,6 @@
                 shp->unchecked_isa_dma = FALSE;
                 share_irq = TRUE;
 #endif /* CONFIG_PCI */
-#endif /* version >= v2.1.93 */ 
             }
 
             /*
@@ -5082,33 +5065,33 @@
                     break;
                 default:
                     ASC_PRINT2(
-"AscInitGetConfig: board %d: unknown warning: %x\n",
+"AscInitGetConfig: board %d: unknown warning: 0x%x\n",
                         boardp->id, ret);
                     break;
                 }
                 if ((err_code = asc_dvc_varp->err_code) != 0) {
                     ASC_PRINT3(
-"AscInitGetConfig: board %d error: init_state %x, err_code %x\n",
+"AscInitGetConfig: board %d error: init_state 0x%x, err_code 0x%x\n",
                         boardp->id, asc_dvc_varp->init_state,
                         asc_dvc_varp->err_code);
                 }
             } else {
                 ASC_DBG(2, "advansys_detect: AdvInitGetConfig()\n");
                 if ((ret = AdvInitGetConfig(adv_dvc_varp)) != 0) {
-                    ASC_PRINT2("AdvInitGetConfig: board %d: warning: %x\n",
+                    ASC_PRINT2("AdvInitGetConfig: board %d: warning: 0x%x\n",
                         boardp->id, ret);
                 }
                 if ((err_code = adv_dvc_varp->err_code) != 0) {
                     ASC_PRINT2(
-"AdvInitGetConfig: board %d error: err_code %x\n",
+"AdvInitGetConfig: board %d error: err_code 0x%x\n",
                         boardp->id, adv_dvc_varp->err_code);
                 }
             }
-        
+
             if (err_code != 0) {
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#ifdef CONFIG_PROC_FS
                 kfree(boardp->prtbuf);
-#endif /* version >= v1.3.0 */
+#endif /* CONFIG_PROC_FS */
                 scsi_unregister(shp);
                 asc_board_count--;
                 continue;
@@ -5136,12 +5119,12 @@
                 ep->init_sdtr = asc_dvc_varp->cfg->sdtr_enable;
                 ep->disc_enable = asc_dvc_varp->cfg->disc_enable;
                 ep->use_cmd_qng = asc_dvc_varp->cfg->cmd_qng_enabled;
-                ep->isa_dma_speed = asc_dvc_varp->cfg->isa_dma_speed;
+                ASC_EEP_SET_DMA_SPD(ep, asc_dvc_varp->cfg->isa_dma_speed);
                 ep->start_motor = asc_dvc_varp->start_motor;
                 ep->cntl = asc_dvc_varp->dvc_cntl;
                 ep->no_scam = asc_dvc_varp->no_scam;
                 ep->max_total_qng = asc_dvc_varp->max_total_qng;
-                ep->chip_scsi_id = asc_dvc_varp->cfg->chip_scsi_id;
+                ASC_EEP_SET_CHIP_ID(ep, asc_dvc_varp->cfg->chip_scsi_id);
                 /* 'max_tag_qng' is set to the same value for every device. */
                 ep->max_tag_qng = asc_dvc_varp->cfg->max_tag_qng[0];
                 ep->adapter_info[0] = asc_dvc_varp->cfg->adapter_info[0];
@@ -5186,18 +5169,18 @@
                     break;
                 default:
                     ASC_PRINT2(
-"AscInitSetConfig: board %d: unknown warning: %x\n",
+"AscInitSetConfig: board %d: unknown warning: 0x%x\n",
                         boardp->id, ret);
                     break;
                 }
                 if (asc_dvc_varp->err_code != 0) {
                     ASC_PRINT3(
-"AscInitSetConfig: board %d error: init_state %x, err_code %x\n",
+"AscInitSetConfig: board %d error: init_state 0x%x, err_code 0x%x\n",
                         boardp->id, asc_dvc_varp->init_state,
                         asc_dvc_varp->err_code);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#ifdef CONFIG_PROC_FS
                     kfree(boardp->prtbuf);
-#endif /* version >= v1.3.0 */
+#endif /* CONFIG_PROC_FS */
                     scsi_unregister(shp);
                     asc_board_count--;
                     continue;
@@ -5213,6 +5196,7 @@
             } else {
                 ADVEEP_3550_CONFIG      *ep_3550;
                 ADVEEP_38C0800_CONFIG   *ep_38C0800;
+                ADVEEP_38C1600_CONFIG   *ep_38C1600;
 
                 /*
                  * Save Wide EEP Configuration Information.
@@ -5239,7 +5223,7 @@
                         adv_dvc_varp->cfg->serial2;
                     ep_3550->serial_number_word3 =
                         adv_dvc_varp->cfg->serial3;
-                } else
+                } else if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800)
                 {
                     ep_38C0800 = &boardp->eep_config.adv_38C0800_eep;
 
@@ -5266,6 +5250,33 @@
                         adv_dvc_varp->cfg->serial2;
                     ep_38C0800->serial_number_word3 =
                         adv_dvc_varp->cfg->serial3;
+                } else
+                {
+                    ep_38C1600 = &boardp->eep_config.adv_38C1600_eep;
+
+                    ep_38C1600->adapter_scsi_id = adv_dvc_varp->chip_scsi_id;
+                    ep_38C1600->max_host_qng = adv_dvc_varp->max_host_qng;
+                    ep_38C1600->max_dvc_qng = adv_dvc_varp->max_dvc_qng;
+                    ep_38C1600->termination_lvd =
+                        adv_dvc_varp->cfg->termination;
+                    ep_38C1600->disc_enable = adv_dvc_varp->cfg->disc_enable;
+                    ep_38C1600->bios_ctrl = adv_dvc_varp->bios_ctrl;
+                    ep_38C1600->wdtr_able = adv_dvc_varp->wdtr_able;
+                    ep_38C1600->tagqng_able = adv_dvc_varp->tagqng_able;
+                    ep_38C1600->sdtr_speed1 = adv_dvc_varp->sdtr_speed1;
+                    ep_38C1600->sdtr_speed2 = adv_dvc_varp->sdtr_speed2;
+                    ep_38C1600->sdtr_speed3 = adv_dvc_varp->sdtr_speed3;
+                    ep_38C1600->sdtr_speed4 = adv_dvc_varp->sdtr_speed4;
+                    ep_38C1600->tagqng_able = adv_dvc_varp->tagqng_able;
+                    ep_38C1600->start_motor = adv_dvc_varp->start_motor;
+                    ep_38C1600->scsi_reset_delay =
+                        adv_dvc_varp->scsi_reset_wait;
+                    ep_38C1600->serial_number_word1 =
+                        adv_dvc_varp->cfg->serial1;
+                    ep_38C1600->serial_number_word2 =
+                        adv_dvc_varp->cfg->serial2;
+                    ep_38C1600->serial_number_word3 =
+                        adv_dvc_varp->cfg->serial3;
                 }
 
                 /*
@@ -5280,20 +5291,18 @@
                 shp->irq = adv_dvc_varp->irq_no;
             }
 
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
             /*
-             * Channels are numbered beginning with 0. For AdvanSys One host
+             * Channels are numbered beginning with 0. For AdvanSys one host
              * structure supports one channel. Multi-channel boards have a
-             * separate host structure for each channel. 
+             * separate host structure for each channel.
              */
             shp->max_channel = 0;
-#endif /* version >= v1.3.89 */
             if (ASC_NARROW_BOARD(boardp)) {
                 shp->max_id = ASC_MAX_TID + 1;
                 shp->max_lun = ASC_MAX_LUN + 1;
 
                 shp->io_port = asc_dvc_varp->iop_base;
-                shp->n_io_port = ASC_IOADR_GAP;
+                boardp->asc_n_io_port = ASC_IOADR_GAP;
                 shp->this_id = asc_dvc_varp->cfg->chip_scsi_id;
 
                 /* Set maximum number of queues the adapter can handle. */
@@ -5303,13 +5312,13 @@
                 shp->max_lun = ADV_MAX_LUN + 1;
 
                 /*
-                 * Save the I/O Port address and length even though the
-                 * in v1.3.0 and greater kernels the region is not used
-                 * by a Wide board. Instead the board is accessed with
-                 * Memory Mapped I/O.
+                 * Save the I/O Port address and length even though
+                 * I/O ports are not used to access Wide boards.
+                 * Instead the Wide boards are accessed with
+                 * PCI Memory Mapped I/O.
                  */
                 shp->io_port = iop;
-                shp->n_io_port = iolen;
+                boardp->asc_n_io_port = iolen;
 
                 shp->this_id = adv_dvc_varp->chip_scsi_id;
 
@@ -5317,18 +5326,15 @@
                 shp->can_queue = adv_dvc_varp->max_host_qng;
             }
 
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,89)
             /*
-             * In old kernels without tag queuing support and with memory
-             * allocation problems set a conservative 'cmd_per_lun' value.
+             * 'n_io_port' currently is one byte.
+             *
+             * Set a value to 'n_io_port', but never referenced it because
+             * it may be truncated.
              */
-#ifdef MODULE
-            shp->cmd_per_lun = 1;
-#else /* MODULE */
-            shp->cmd_per_lun = 4;
-#endif /* MODULE */
-            ASC_DBG1(1, "advansys_detect: cmd_per_lun: %d\n", shp->cmd_per_lun);
-#else /* version >= v1.3.89 */
+            shp->n_io_port = boardp->asc_n_io_port <= 255 ?
+                boardp->asc_n_io_port : 255;
+
             /*
              * Following v1.3.89, 'cmd_per_lun' is no longer needed
              * and should be set to zero.
@@ -5348,7 +5354,6 @@
              * the number of commands to queue per device.
              */
             shp->select_queue_depths = advansys_select_queue_depths;
-#endif /* version >= v1.3.89 */
 
             /*
              * Set the maximum number of scatter-gather elements the
@@ -5368,20 +5373,6 @@
                 shp->sg_tablesize = ADV_MAX_SG_LIST;
             }
 
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
-#ifdef MODULE
-            /*
-             * If the driver is compiled as a module, set a limit on the
-             * 'sg_tablesize' value to prevent memory allocation failures.
-             * Memory allocation errors are more likely to occur at module
-             * load time, then at driver initialization time.
-             */
-            if (shp->sg_tablesize > 64) {
-                shp->sg_tablesize = 64;
-            }
-#endif /* MODULE */
-#endif /* version < v2.0.0 */
-
             /*
              * The value of 'sg_tablesize' can not exceed the SCSI
              * mid-level driver definition of SG_ALL. SG_ALL also
@@ -5397,11 +5388,11 @@
 
             /* BIOS start address. */
             if (ASC_NARROW_BOARD(boardp)) {
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,29)
+#if ASC_LINUX_KERNEL24
                 shp->base =
-#else /* version >= v2.3.29 */
+#elif ASC_LINUX_KERNEL22
                 shp->base = (char *)
-#endif /* version < v2.3.29 */
+#endif
                         ((ulong) AscGetChipBiosAddress(
                             asc_dvc_varp->iop_base,
                             asc_dvc_varp->bus_type));
@@ -5420,11 +5411,11 @@
                     boardp->bios_codelen);
 
                 ASC_DBG2(1,
-                    "advansys_detect: bios_signature %x, bios_version %x\n",
+                    "advansys_detect: bios_signature 0x%x, bios_version 0x%x\n",
                     boardp->bios_signature, boardp->bios_version);
 
                 ASC_DBG2(1,
-                    "advansys_detect: bios_codeseg %x, bios_codelen %x\n",
+                    "advansys_detect: bios_codeseg 0x%x, bios_codelen 0x%x\n",
                     boardp->bios_codeseg, boardp->bios_codelen);
 
                 /*
@@ -5436,11 +5427,10 @@
                      * Convert x86 realmode code segment to a linear
                      * address by shifting left 4.
                      */
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,29)
                     shp->base =
-#else /* version >= v2.3.29 */
-                    shp->base = (char *)
-#endif /* version < v2.3.29 */
+#if ASC_LINUX_KERNEL22
+                        (char *)
+#endif
                         ((ulong) boardp->bios_codeseg << 4);
                 } else {
                     shp->base = 0;
@@ -5451,12 +5441,37 @@
              * Register Board Resources - I/O Port, DMA, IRQ
              */
 
-            /* Register I/O port range. */
-            ASC_DBG(2, "advansys_detect: request_region()\n");
-            request_region(shp->io_port, shp->n_io_port, "advansys");
+            /*
+             * Register I/O port range.
+             *
+             * For Wide boards the I/O ports are not used to access
+             * the board, but request the region anyway.
+             *
+             * 'shp->n_io_port' is not referenced, because it may be truncated.
+             */
+            ASC_DBG2(2,
+                "advansys_detect: request_region port 0x%lx, len 0x%x\n",
+                (ulong) shp->io_port, boardp->asc_n_io_port);
+#if ASC_LINUX_KERNEL24
+            if (request_region(shp->io_port, boardp->asc_n_io_port,
+                               "advansys") == NULL) {
+                ASC_PRINT3(
+"advansys_detect: board %d: request_region() failed, port 0x%lx, len 0x%x\n",
+                    boardp->id, (ulong) shp->io_port, boardp->asc_n_io_port);
+#ifdef CONFIG_PROC_FS
+                kfree(boardp->prtbuf);
+#endif /* CONFIG_PROC_FS */
+                scsi_unregister(shp);
+                asc_board_count--;
+                continue;
+            }
+#elif ASC_LINUX_KERNEL22
+            request_region(shp->io_port, boardp->asc_n_io_port, "advansys");
+#endif
 
             /* Register DMA Channel for Narrow boards. */
             shp->dma_channel = NO_ISA_DMA; /* Default to no ISA DMA. */
+#ifdef CONFIG_ISA
             if (ASC_NARROW_BOARD(boardp)) {
                 /* Register DMA channel for ISA bus. */
                 if (asc_dvc_varp->bus_type & ASC_IS_ISA) {
@@ -5466,10 +5481,10 @@
                         ASC_PRINT3(
 "advansys_detect: board %d: request_dma() %d failed %d\n",
                             boardp->id, shp->dma_channel, ret);
-                        release_region(shp->io_port, shp->n_io_port);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+                        release_region(shp->io_port, boardp->asc_n_io_port);
+#ifdef CONFIG_PROC_FS
                         kfree(boardp->prtbuf);
-#endif /* version >= v1.3.0 */
+#endif /* CONFIG_PROC_FS */
                         scsi_unregister(shp);
                         asc_board_count--;
                         continue;
@@ -5477,13 +5492,10 @@
                     AscEnableIsaDma(shp->dma_channel);
                 }
             }
+#endif /* CONFIG_ISA */
 
             /* Register IRQ Number. */
             ASC_DBG1(2, "advansys_detect: request_irq() %d\n", shp->irq);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,70)
-            if ((ret = request_irq(shp->irq, advansys_interrupt,
-                            SA_INTERRUPT, "advansys")) != 0)
-#else /* version >= v1.3.70 */
            /*
             * If request_irq() fails with the SA_INTERRUPT flag set,
             * then try again without the SA_INTERRUPT flag set. This
@@ -5499,31 +5511,28 @@
                 ((ret = request_irq(shp->irq, advansys_interrupt,
                             (share_irq == TRUE ? SA_SHIRQ : 0),
                             "advansys", boardp)) != 0))
-#endif /* version >= v1.3.70 */
             {
                 if (ret == -EBUSY) {
                     ASC_PRINT2(
-"advansys_detect: board %d: request_irq(): IRQ %d already in use.\n",
+"advansys_detect: board %d: request_irq(): IRQ 0x%x already in use.\n",
                         boardp->id, shp->irq);
                 } else if (ret == -EINVAL) {
                     ASC_PRINT2(
-"advansys_detect: board %d: request_irq(): IRQ %d not valid.\n",
+"advansys_detect: board %d: request_irq(): IRQ 0x%x not valid.\n",
                         boardp->id, shp->irq);
                 } else {
                     ASC_PRINT3(
-"advansys_detect: board %d: request_irq(): IRQ %d failed with %d\n",
+"advansys_detect: board %d: request_irq(): IRQ 0x%x failed with %d\n",
                         boardp->id, shp->irq, ret);
                 }
-                release_region(shp->io_port, shp->n_io_port);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+                release_region(shp->io_port, boardp->asc_n_io_port);
                 iounmap(boardp->ioremap_addr);
-#endif /* version >= v1,3,0 */
                 if (shp->dma_channel != NO_ISA_DMA) {
                     free_dma(shp->dma_channel);
                 }
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#ifdef CONFIG_PROC_FS
                 kfree(boardp->prtbuf);
-#endif /* version >= v1.3.0 */
+#endif /* CONFIG_PROC_FS */
                 scsi_unregister(shp);
                 asc_board_count--;
                 continue;
@@ -5539,7 +5548,7 @@
 
                 if (warn_code || err_code) {
                     ASC_PRINT4(
-"AscInitAsc1000Driver: board %d: error: init_state %x, warn %x error %x\n",
+"advansys_detect: board %d error: init_state 0x%x, warn 0x%x, error 0x%x\n",
                         boardp->id, asc_dvc_varp->init_state,
                         warn_code, err_code);
                 }
@@ -5549,25 +5558,13 @@
                 adv_req_t       *reqp = NULL;
                 int             sg_cnt = 0;
 
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
-                carrp = (ADV_CARR_T *) &adv_carr_buf[0];
-                req_cnt = sizeof(adv_req_buf)/sizeof(adv_req_t);
-                sg_cnt = sizeof(adv_sgblk_buf)/sizeof(adv_sgblk_t);
-                reqp = (adv_req_t *) &adv_req_buf[0];
-                boardp->adv_sgblkp = NULL;
-                for (sg_cnt = 0; sg_cnt < ADV_SGBLK_BUF_CNT; sg_cnt++) {
-                    sgp = (adv_sgblk_t *) &adv_sgblk_buf[sg_cnt];
-                    sgp->next_sgblkp = boardp->adv_sgblkp;
-                    boardp->adv_sgblkp = sgp;
-                }
-#else /* version >= v1.3.0 */
                 /*
                  * Allocate buffer carrier structures. The total size
                  * is about 4 KB, so allocate all at once.
                  */
                 carrp =
                     (ADV_CARR_T *) kmalloc(ADV_CARRIER_BUFSIZE, GFP_ATOMIC);
-                ASC_DBG1(1, "advansys_detect: carrp %lx\n", (ulong) carrp);
+                ASC_DBG1(1, "advansys_detect: carrp 0x%lx\n", (ulong) carrp);
 
                 if (carrp == NULL) {
                     goto kmalloc_error;
@@ -5586,7 +5583,7 @@
                         kmalloc(sizeof(adv_req_t) * req_cnt, GFP_ATOMIC);
 
                     ASC_DBG3(1,
-                        "advansys_detect: reqp %lx, req_cnt %d, bytes %lu\n",
+                        "advansys_detect: reqp 0x%lx, req_cnt %d, bytes %lu\n",
                         (ulong) reqp, req_cnt,
                         (ulong) sizeof(adv_req_t) * req_cnt);
 
@@ -5631,24 +5628,24 @@
                 if (carrp == NULL)
                 {
                     ASC_PRINT1(
-"advansys_detect: board %d: error: failed to kmalloc() carrier buffer.\n",
+"advansys_detect: board %d error: failed to kmalloc() carrier buffer.\n",
                         boardp->id);
                     err_code = ADV_ERROR;
                 } else if (reqp == NULL) {
                     kfree(carrp);
                     ASC_PRINT1(
-"advansys_detect: board %d: error: failed to kmalloc() adv_req_t buffer.\n",
+"advansys_detect: board %d error: failed to kmalloc() adv_req_t buffer.\n",
                         boardp->id);
                     err_code = ADV_ERROR;
                 } else if (boardp->adv_sgblkp == NULL) {
                     kfree(carrp);
                     kfree(reqp);
                     ASC_PRINT1(
-"advansys_detect: board %d: error: failed to kmalloc() adv_sgblk_t buffers.\n",
+"advansys_detect: board %d error: failed to kmalloc() adv_sgblk_t buffers.\n",
                         boardp->id);
                     err_code = ADV_ERROR;
                 } else {
-                    
+
                     /* Save carrier buffer pointer. */
                     boardp->orig_carrp = carrp;
 
@@ -5657,7 +5654,6 @@
                      * driver is built as a module and can be unloaded.
                      */
                     boardp->orig_reqp = reqp;
-#endif /* version >= v1.3.0 */
 
                     adv_dvc_varp->carrier_buf = carrp;
 
@@ -5677,26 +5673,27 @@
                         ASC_DBG(2,
                             "advansys_detect: AdvInitAsc3550Driver()\n");
                         warn_code = AdvInitAsc3550Driver(adv_dvc_varp);
-                    } else {
+                    } else if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800) {
                         ASC_DBG(2,
                             "advansys_detect: AdvInitAsc38C0800Driver()\n");
                         warn_code = AdvInitAsc38C0800Driver(adv_dvc_varp);
+                    } else {
+                        ASC_DBG(2,
+                            "advansys_detect: AdvInitAsc38C1600Driver()\n");
+                        warn_code = AdvInitAsc38C1600Driver(adv_dvc_varp);
                     }
                     err_code = adv_dvc_varp->err_code;
 
                     if (warn_code || err_code) {
                         ASC_PRINT3(
-"AdvInitAsc3550/38C0800Driver: board %d: error: warn %x, error %x\n",
+"advansys_detect: board %d error: warn 0x%x, error 0x%x\n",
                             boardp->id, warn_code, err_code);
                     }
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
                 }
-#endif /* version >= v1,3,0 */
             }
 
             if (err_code != 0) {
-                release_region(shp->io_port, shp->n_io_port);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+                release_region(shp->io_port, boardp->asc_n_io_port);
                 if (ASC_WIDE_BOARD(boardp)) {
                     iounmap(boardp->ioremap_addr);
                     if (boardp->orig_carrp) {
@@ -5713,18 +5710,13 @@
                         kfree(sgp);
                     }
                 }
-#endif /* version >= v1,3,0 */
                 if (shp->dma_channel != NO_ISA_DMA) {
                     free_dma(shp->dma_channel);
                 }
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#ifdef CONFIG_PROC_FS
                 kfree(boardp->prtbuf);
-#endif /* version >= v1.3.0 */
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,70)
-                free_irq(shp->irq);
-#else /* version >= v1.3.70 */
+#endif /* CONFIG_PROC_FS */
                 free_irq(shp->irq, boardp);
-#endif /* version >= v1.3.70 */
                 scsi_unregister(shp);
                 asc_board_count--;
                 continue;
@@ -5732,6 +5724,14 @@
             ASC_DBG_PRT_SCSI_HOST(2, shp);
         }
     }
+
+    /*
+     * XXX - Remove this comment and the next line when SCSI mid-level
+     * no longer acquires 'io_request_lock' before calling the SCSI
+     * low-level detect entrypoint.
+     */
+    ASC_LOCK_IO_REQUEST_LOCK
+
     ASC_DBG1(1, "advansys_detect: done: asc_board_count %d\n", asc_board_count);
     return asc_board_count;
 }
@@ -5748,17 +5748,12 @@
 
     ASC_DBG(1, "advansys_release: begin\n");
     boardp = ASC_BOARDP(shp);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,70)
-    free_irq(shp->irq);
-#else /* version >= v1.3.70 */
     free_irq(shp->irq, boardp);
-#endif /* version >= v1.3.70 */
     if (shp->dma_channel != NO_ISA_DMA) {
         ASC_DBG(1, "advansys_release: free_dma()\n");
         free_dma(shp->dma_channel);
     }
-    release_region(shp->io_port, shp->n_io_port);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+    release_region(shp->io_port, boardp->asc_n_io_port);
     if (ASC_WIDE_BOARD(boardp)) {
         adv_sgblk_t    *sgp = NULL;
 
@@ -5777,9 +5772,10 @@
             kfree(sgp);
         }
     }
+#ifdef CONFIG_PROC_FS
     ASC_ASSERT(boardp->prtbuf != NULL);
     kfree(boardp->prtbuf);
-#endif /* version >= v1.3.0 */
+#endif /* CONFIG_PROC_FS */
     scsi_unregister(shp);
     ASC_DBG(1, "advansys_release: end\n");
     return 0;
@@ -5815,51 +5811,37 @@
             } else {
                 busname = "ISA";
             }
+            /* Don't reference 'shp->n_io_port'; It may be truncated. */
             sprintf(info,
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,92)
-"AdvanSys SCSI %s: %s %u CDB: BIOS %lX, IO %lX/%X, IRQ %u, DMA %u",
-#else /* version >= v2.1.92 */ 
-"AdvanSys SCSI %s: %s %u CDB: BIOS %lX, IO %lX/%X, IRQ %u, DMA %u",
-#endif /* version >= v2.1.92 */ 
-                ASC_VERSION, busname, asc_dvc_varp->max_total_qng,
-                (ulong) shp->base,
-                (ulong) shp->io_port, shp->n_io_port - 1,
+"AdvanSys SCSI %s: %s: IO 0x%lX-0x%lX, IRQ 0x%X, DMA 0x%X",
+                ASC_VERSION, busname,
+                (ulong) shp->io_port,
+                (ulong) shp->io_port + boardp->asc_n_io_port - 1,
                 shp->irq, shp->dma_channel);
-        } else if (asc_dvc_varp->bus_type & ASC_IS_PCI) {
-            if ((asc_dvc_varp->bus_type & ASC_IS_PCI_ULTRA)
-                == ASC_IS_PCI_ULTRA) {
-                busname = "PCI Ultra";
-            } else {
-                busname = "PCI";
-            }
-            sprintf(info,
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,92)
-                "AdvanSys SCSI %s: %s %u CDB: IO %X/%X, IRQ %u",
-#else /* version >= v2.1.92 */ 
-                "AdvanSys SCSI %s: %s %u CDB: IO %lX/%X, IRQ %u",
-#endif /* version >= v2.1.92 */ 
-                ASC_VERSION, busname, asc_dvc_varp->max_total_qng,
-                shp->io_port, shp->n_io_port - 1, shp->irq);
         } else {
             if (asc_dvc_varp->bus_type & ASC_IS_VL) {
                 busname = "VL";
             } else if (asc_dvc_varp->bus_type & ASC_IS_EISA) {
                 busname = "EISA";
+            } else if (asc_dvc_varp->bus_type & ASC_IS_PCI) {
+                if ((asc_dvc_varp->bus_type & ASC_IS_PCI_ULTRA)
+                    == ASC_IS_PCI_ULTRA) {
+                    busname = "PCI Ultra";
+                } else {
+                    busname = "PCI";
+                }
             } else {
                 busname = "?";
-                ASC_PRINT2(
-    "advansys_info: board %d: unknown bus type %d\n",
+                ASC_PRINT2( "advansys_info: board %d: unknown bus type %d\n",
                     boardp->id, asc_dvc_varp->bus_type);
             }
+            /* Don't reference 'shp->n_io_port'; It may be truncated. */
             sprintf(info,
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,92)
-                "AdvanSys SCSI %s: %s %u CDB: BIOS %lX, IO %X/%X, IRQ %u",
-#else /* version >= v2.1.92 */ 
-                "AdvanSys SCSI %s: %s %u CDB: BIOS %lX, IO %lX/%X, IRQ %u",
-#endif /* version >= v2.1.92 */ 
-                ASC_VERSION, busname, asc_dvc_varp->max_total_qng,
-                (ulong) shp->base, shp->io_port - 1,
-                shp->n_io_port, shp->irq);
+                "AdvanSys SCSI %s: %s: IO 0x%lX-0x%lX, IRQ 0x%X",
+                ASC_VERSION, busname,
+                (ulong) shp->io_port,
+                (ulong) shp->io_port + boardp->asc_n_io_port - 1,
+                shp->irq);
         }
     } else {
         /*
@@ -5874,29 +5856,21 @@
         {
             iolen = ADV_3550_IOLEN;
             widename = "Ultra-Wide";
-        } else {
+        } else if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800)
+        {
             iolen = ADV_38C0800_IOLEN;
             widename = "Ultra2-Wide";
+        } else
+        {
+            iolen = ADV_38C1600_IOLEN;
+            widename = "Ultra3-Wide";
         }
-        if (boardp->bios_signature == 0x55AA) {
-            sprintf(info,
-"AdvanSys SCSI %s: PCI %s: BIOS %X/%X, IO %X/%X, IRQ %u",
-                ASC_VERSION,
-                widename,
-                boardp->bios_codeseg << 4,
-                boardp->bios_codelen > 0 ?
-                (boardp->bios_codelen << 9) - 1 : 0,
-                (unsigned) boardp->ioport, iolen - 1,
-                shp->irq);
-        } else {
-            sprintf(info,
-"AdvanSys SCSI %s: PCI %s: IO %X/%X, IRQ %u",
-                ASC_VERSION,
-                widename,
-                (unsigned) boardp->ioport,
-                (iolen - 1),
-                shp->irq);
-        }
+        sprintf(info, "AdvanSys SCSI %s: PCI %s: PCIMEM 0x%lX-0x%lX, IRQ 0x%X",
+            ASC_VERSION,
+            widename,
+            (ulong) adv_dvc_varp->iop_base,
+            (ulong) adv_dvc_varp->iop_base + iolen - 1,
+            shp->irq);
     }
     ASC_ASSERT(strlen(info) < ASC_INFO_SIZE);
     ASC_DBG(1, "advansys_info: end\n");
@@ -5904,30 +5878,6 @@
 }
 
 /*
- * advansys_command() - polled I/O entrypoint.
- *
- * Apparently host drivers shouldn't return until the command
- * is finished.
- *
- * Note: This is an old interface that is no longer used by the SCSI
- * mid-level driver. The new interface, advansys_queuecommand(),
- * currently handles all requests.
- */
-int
-advansys_command(Scsi_Cmnd *scp)
-{
-    ASC_DBG1(1, "advansys_command: scp %lx\n", (ulong) scp);
-    ASC_STATS(scp->host, command);
-    scp->SCp.Status = 0; /* Set to a known state */
-    advansys_queuecommand(scp, advansys_command_done);
-    while (scp->SCp.Status == 0) {
-        continue;
-    }
-    ASC_DBG1(1, "advansys_command: result %x\n", scp->result);
-    return scp->result;
-}
-
-/*
  * advansys_queuecommand() - interrupt-driven I/O entrypoint.
  *
  * This function always returns 0. Command return status is saved
@@ -5938,7 +5888,7 @@
 {
     struct Scsi_Host    *shp;
     asc_board_t         *boardp;
-    int                 flags;
+    ulong               flags;
     Scsi_Cmnd           *done_scp;
 
     shp = scp->host;
@@ -5946,28 +5896,22 @@
     ASC_STATS(shp, queuecommand);
 
     /*
-     * Disable interrupts to preserve request ordering and provide
-     * mutually exclusive access to global structures used to initiate
-     * a request.
+     * XXX - Remove this comment and the next line when SCSI mid-level
+     * no longer acquires 'io_request_lock' before calling the SCSI
+     * low-level queuecommand entrypoint.
      */
-    save_flags(flags);
-    cli();
+    ASC_UNLOCK_IO_REQUEST_LOCK
+
+    spin_lock_irqsave(&boardp->lock, flags);
 
     /*
      * Block new commands while handling a reset or abort request.
      */
-    if (boardp->flags & (ASC_HOST_IN_RESET | ASC_HOST_IN_ABORT)) {
-        if (boardp->flags & ASC_HOST_IN_RESET) {
-            ASC_DBG1(1,
-                "advansys_queuecommand: scp %lx blocked for reset request\n",
-                (ulong) scp);
-            scp->result = HOST_BYTE(DID_RESET);
-        } else {
-            ASC_DBG1(1,
-                "advansys_queuecommand: scp %lx blocked for abort request\n",
-                (ulong) scp);
-            scp->result = HOST_BYTE(DID_ABORT);
-        }
+    if (boardp->flags & ASC_HOST_IN_RESET) {
+        ASC_DBG1(1,
+            "advansys_queuecommand: scp 0x%lx blocked for reset request\n",
+            (ulong) scp);
+        scp->result = HOST_BYTE(DID_RESET);
 
         /*
          * Add blocked requests to the board's 'done' queue. The queued
@@ -5975,7 +5919,7 @@
          * handling.
          */
         asc_enqueue(&boardp->done, scp, ASC_BACK);
-        restore_flags(flags);
+        spin_unlock_irqrestore(&boardp->lock, flags);
         return 0;
     }
 
@@ -5992,13 +5936,15 @@
      * Save the function pointer to Linux mid-level 'done' function
      * and attempt to execute the command.
      *
-     * If ASC_ERROR is returned the request has been added to the
+     * If ASC_NOERROR is returned the request has been added to the
      * board's 'active' queue and will be completed by the interrupt
      * handler.
      *
      * If ASC_BUSY is returned add the request to the board's per
-     * target waiting list.
-     * 
+     * target waiting list. This is the first time the request has
+     * been tried. Add it to the back of the waiting list. It will be
+     * retried later.
+     *
      * If an error occurred, the request will have been placed on the
      * board's 'done' queue and must be completed before returning.
      */
@@ -6017,645 +5963,223 @@
         break;
     }
 
-    restore_flags(flags);
-    return 0;
-}
-
-/*
- * advansys_abort()
- *
- * Abort the command specified by 'scp'.
- */
-int
-advansys_abort(Scsi_Cmnd *scp)
-{
-    struct Scsi_Host    *shp;
-    asc_board_t         *boardp;
-    ASC_DVC_VAR         *asc_dvc_varp;
-    ADV_DVC_VAR         *adv_dvc_varp;
-    int                 flags;
-    int                 do_scsi_done;
-    int                 scp_found;
-    Scsi_Cmnd           *done_scp = NULL;
-    int                 ret;
-
-    /* Save current flags and disable interrupts. */
-    save_flags(flags);
-    cli();
-
-    ASC_DBG1(1, "advansys_abort: scp %lx\n", (ulong) scp);
-
-#ifdef ADVANSYS_STATS
-    if (scp->host != NULL) {
-        ASC_STATS(scp->host, abort);
-    }    
-#endif /* ADVANSYS_STATS */
-
-#ifdef ADVANSYS_ASSERT
-    do_scsi_done = ASC_ERROR;
-    scp_found = ASC_ERROR;
-    ret = ASC_ERROR;
-#endif /* ADVANSYS_ASSERT */
-
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-    if (scp->serial_number != scp->serial_number_at_timeout) {
-        ASC_PRINT1(
-"advansys_abort: timeout serial number changed for request %lx\n",
-            (ulong) scp);
-        do_scsi_done = ASC_FALSE;
-        scp_found = ASC_FALSE;
-        ret = SCSI_ABORT_NOT_RUNNING;
-    } else
-#endif /* version >= v1.3.89 */
-    if ((shp = scp->host) == NULL) {
-        scp->result = HOST_BYTE(DID_ERROR);
-        do_scsi_done = ASC_TRUE;
-        scp_found = ASC_FALSE;
-        ret = SCSI_ABORT_ERROR;
-    } else if ((boardp = ASC_BOARDP(shp))->flags & 
-                (ASC_HOST_IN_RESET | ASC_HOST_IN_ABORT)) {
-        ASC_PRINT2(
-"advansys_abort: board %d: Nested host reset or abort, flags 0x%x\n",
-            boardp->id, boardp->flags);
-        do_scsi_done = ASC_TRUE;
-        if ((asc_rmqueue(&boardp->active, scp) == ASC_TRUE) ||
-            (asc_rmqueue(&boardp->waiting, scp) == ASC_TRUE)) {
-            scp_found = ASC_TRUE;
-        } else {
-            scp_found = ASC_FALSE;
-        }
-        scp->result = HOST_BYTE(DID_ERROR);
-        ret = SCSI_ABORT_ERROR;
-    } else {
-        /* Set abort flag to avoid nested reset or abort requests. */
-        boardp->flags |= ASC_HOST_IN_ABORT;
-
-        do_scsi_done = ASC_TRUE;
-        if (asc_rmqueue(&boardp->waiting, scp) == ASC_TRUE) {
-            /*
-             * If asc_rmqueue() found the command on the waiting
-             * queue, it had not been sent to the device. After
-             * the queue is removed, no other handling is required.
-             */
-            ASC_DBG1(1, "advansys_abort: scp %lx found on waiting queue\n",
-                (ulong) scp);
-            scp_found = ASC_TRUE;
-            scp->result = HOST_BYTE(DID_ABORT);
-            ret = SCSI_ABORT_SUCCESS;
-        } else if (asc_isqueued(&boardp->active, scp) == ASC_TRUE) {
-            /*
-             * If asc_isqueued() found the command on the active
-             * queue, it has been sent to the device. The command
-             * will be returned through the interrupt handler after
-             * it has been aborted.
-             */
-
-            if (ASC_NARROW_BOARD(boardp)) {
-                /*
-                 * Narrow Board
-                 */
-                asc_dvc_varp = &boardp->dvc_var.asc_dvc_var;
-                scp->result = HOST_BYTE(DID_ABORT);
-
-                /* sti(); XXX */ /* Enable interrupts for AscAbortSRB(). */
-                ASC_DBG1(1, "advansys_abort: before AscAbortSRB(), scp %lx\n",
-                    (ulong) scp);
-                /* XXX */
-                switch (AscAbortSRB(asc_dvc_varp, ASC_VADDR_TO_U32(scp))) {
-                case ASC_TRUE:
-                    /* asc_isr_callback() will be called */
-                    ASC_DBG(1, "advansys_abort: AscAbortSRB() TRUE\n");
-                    ret = SCSI_ABORT_PENDING;
-                    break;
-                case ASC_FALSE:
-                    /* Request has apparently already completed. */
-                    ASC_DBG(1, "advansys_abort: AscAbortSRB() FALSE\n");
-                    ret = SCSI_ABORT_NOT_RUNNING;
-                    break;
-                case ASC_ERROR:
-                default:
-                    ASC_DBG(1, "advansys_abort: AscAbortSRB() ERROR\n");
-                    ret = SCSI_ABORT_ERROR;
-                    break;
-                }
-                cli();
-            } else {
-                /*
-                 * Wide Board
-                 */
-                adv_dvc_varp = &boardp->dvc_var.adv_dvc_var;
-                scp->result = HOST_BYTE(DID_ABORT);
-
-                ASC_DBG1(1,
-                    "advansys_abort: before AdvAbortQueue(), scp %lx\n",
-                    (ulong) scp);
-#if 0 /* XXX */
-                switch (AdvAbortQueue(adv_dvc_varp, (ADV_VADDR) XXX)) {
-                case ASC_TRUE:
-                    /* asc_isr_callback() will be called */
-                    ASC_DBG(1, "advansys_abort: AdvAbortQueue() TRUE\n");
-                    ret = SCSI_ABORT_PENDING;
-                    break;
-                case ASC_FALSE:
-                    /* Request has apparently already completed. */
-                    ASC_DBG(1, "advansys_abort: AdvAbortQueue() FALSE\n");
-                    ret = SCSI_ABORT_NOT_RUNNING;
-                    break;
-                case ASC_ERROR:
-                default:
-                    ASC_DBG(1, "advansys_abort: AdvAbortQueue() ERROR\n");
-                    ret = SCSI_ABORT_ERROR;
-                    break;
-                }
-                /*
-                 * Ensure all requests completed by the microcode have
-                 * been processed by calling AdvISR().
-                 */
-                (void) AdvISR(adv_dvc_varp);
-#else /* XXX */
-                (void) AdvResetChipAndSB(adv_dvc_varp);
-                ret = SCSI_ABORT_SUCCESS;
-#endif /* XXX */
-            }
-
-            /*
-             * The request will either still be on the active queue
-             * or have been added to the board's done queue.
-             */
-            if (asc_rmqueue(&boardp->active, scp) == ASC_TRUE) {
-                scp->result = HOST_BYTE(DID_ABORT);
-                scp_found = ASC_TRUE;
-            } else {
-                scp_found = asc_rmqueue(&boardp->done, scp);
-                ASC_ASSERT(scp_found == ASC_TRUE);
-            }
-        } else {
-            /*
-             * The command was not found on the active or waiting queues.
-             */
-            do_scsi_done = ASC_TRUE;
-            scp_found = ASC_FALSE;
-            ret = SCSI_ABORT_NOT_RUNNING;
-        }
-
-        /* Clear abort flag. */
-        boardp->flags &= ~ASC_HOST_IN_ABORT;
-
-        /*
-         * Because the ASC_HOST_IN_ABORT flag causes both
-         * 'advansys_interrupt' and 'asc_isr_callback' to
-         * queue requests to the board's 'done' queue and
-         * prevents waiting commands from being executed,
-         * these queued requests must be handled here.
-         */
-        done_scp = asc_dequeue_list(&boardp->done, NULL, ASC_TID_ALL);
-
-        /*
-         * Start any waiting commands for the board.
-         */
-        if (!ASC_QUEUE_EMPTY(&boardp->waiting)) {
-            ASC_DBG(1, "advansys_interrupt: before asc_execute_queue()\n");
-            asc_execute_queue(&boardp->waiting);
-        }
-    }
-
-    /* Interrupts could be enabled here. */
-
-    /*
-     * Complete the request to be aborted, unless it has been
-     * restarted as detected above, even if it was not found on
-     * the device active or waiting queues.
-     */
-    ASC_ASSERT(do_scsi_done != ASC_ERROR);
-    ASC_ASSERT(scp_found != ASC_ERROR);
-    if (do_scsi_done == ASC_TRUE) {
-        if (scp->scsi_done == NULL) {
-            ASC_PRINT1(
-"advansys_abort: aborted request scsi_done() is NULL, %lx\n",
-                (ulong) scp);
-        } else {
-            if (scp_found == ASC_FALSE) {
-                ASC_PRINT1(
-"advansys_abort: abort request not active or waiting, completing anyway %lx\n",
-                    (ulong) scp);
-            }
-            ASC_STATS(scp->host, done);
-            scp->scsi_done(scp);
-        }
-    }
+    spin_unlock_irqrestore(&boardp->lock, flags);
 
     /*
-     * It is possible for the request done function to re-enable
-     * interrupts without confusing the driver. But here interrupts
-     * aren't enabled until all requests have been completed.
+     * XXX - Remove this comment and the next line when SCSI mid-level
+     * no longer acquires 'io_request_lock' before calling the SCSI
+     * low-level queuecommand entrypoint.
      */
-    if (done_scp != NULL) {
-        asc_scsi_done_list(done_scp);
-    }
+    ASC_LOCK_IO_REQUEST_LOCK
 
-    ASC_DBG1(1, "advansys_abort: ret %d\n", ret);
-
-    /* Re-enable interrupts, if they were enabled on entry. */
-    restore_flags(flags);
-
-    ASC_ASSERT(ret != ASC_ERROR);
-    return ret;
+    return 0;
 }
 
 /*
  * advansys_reset()
  *
- * Reset the device associated with the command 'scp'.
+ * Reset the bus associated with the command 'scp'.
+ *
+ * This function runs its own thread. Interrupts must be blocked but
+ * sleeping is allowed and no locking other than for host structures is
+ * required. Returns SUCCESS or FAILED.
  */
 int
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,89)
 advansys_reset(Scsi_Cmnd *scp)
-#else /* version >= v1.3.89 */
-advansys_reset(Scsi_Cmnd *scp, unsigned int reset_flags)
-#endif /* version >= v1.3.89 */
 {
     struct Scsi_Host     *shp;
     asc_board_t          *boardp;
     ASC_DVC_VAR          *asc_dvc_varp;
     ADV_DVC_VAR          *adv_dvc_varp;
-    int                  flags;
+    ulong                flags;
     Scsi_Cmnd            *done_scp = NULL, *last_scp = NULL;
     Scsi_Cmnd            *tscp, *new_last_scp;
-    int                  do_scsi_done;
-    int                  scp_found;
     int                  status;
-    int                  target;
-    int                  ret;
-    int                  device_reset = ASC_FALSE;
-
-    /* Save current flags and disable interrupts. */
-    save_flags(flags);
-    cli();
+    int                  ret = SUCCESS;
 
-    ASC_DBG1(1, "advansys_reset: %lx\n", (ulong) scp);
+    ASC_DBG1(1, "advansys_reset: 0x%lx\n", (ulong) scp);
 
 #ifdef ADVANSYS_STATS
     if (scp->host != NULL) {
         ASC_STATS(scp->host, reset);
-    }    
+    }
 #endif /* ADVANSYS_STATS */
 
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-    if ((reset_flags & SCSI_RESET_ASYNCHRONOUS) &&
-        (scp->serial_number != scp->serial_number_at_timeout)) {
-        ASC_PRINT1(
-"advansys_reset: timeout serial number changed for request %lx\n",
-            (ulong) scp);
-        do_scsi_done = ASC_FALSE;
-        scp_found = ASC_FALSE;
-        ret = SCSI_RESET_NOT_RUNNING;
-    } else
-#endif /* version >= v1.3.89 */
     if ((shp = scp->host) == NULL) {
         scp->result = HOST_BYTE(DID_ERROR);
-        do_scsi_done = ASC_TRUE;
-        scp_found = ASC_FALSE;
-        ret = SCSI_RESET_ERROR;
-    } else if ((boardp = ASC_BOARDP(shp))->flags & 
-                (ASC_HOST_IN_RESET | ASC_HOST_IN_ABORT)) {
-        ASC_PRINT2(
-"advansys_reset: board %d: Nested host reset or abort, flags 0x%x\n",
-            boardp->id, boardp->flags);
-        do_scsi_done = ASC_TRUE;
-        if ((asc_rmqueue(&boardp->active, scp) == ASC_TRUE) ||
-            (asc_rmqueue(&boardp->waiting, scp) == ASC_TRUE)) {
-            scp_found = ASC_TRUE;
-        } else {
-            scp_found = ASC_FALSE;
-        }
-        scp->result = HOST_BYTE(DID_ERROR);
-        ret = SCSI_RESET_ERROR;
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,0)
-    } else if (time_after_eq(jiffies, boardp->last_reset) &&
-               time_before(jiffies, boardp->last_reset + (10 * HZ))) {
-#else /* version < v2.1.0 */
-    } else if (jiffies >= boardp->last_reset &&
-               jiffies < (boardp->last_reset + (10 * HZ))) {
-#endif /* version < v2.1.0 */
-        /*
-         * Don't allow a reset to be attempted within 10 seconds
-         * of the last reset.
-         *
-         * If 'jiffies' wrapping occurs, the reset request will go
-         * through, because a wrapped 'jiffies' would not pass the
-         * test above.
-         */
-        ASC_DBG(1,
-            "advansys_reset: reset within 10 sec of last reset ignored\n");
-        do_scsi_done = ASC_TRUE;
-        if ((asc_rmqueue(&boardp->active, scp) == ASC_TRUE) ||
-            (asc_rmqueue(&boardp->waiting, scp) == ASC_TRUE)) {
-            scp_found = ASC_TRUE;
-        } else {
-            scp_found = ASC_FALSE;
-        }
-        scp->result = HOST_BYTE(DID_ERROR);
-        ret = SCSI_RESET_ERROR;
-    } else {
-        do_scsi_done = ASC_TRUE;
-
-        /* Set reset flag to avoid nested reset or abort requests. */
-        boardp->flags |= ASC_HOST_IN_RESET;
+        return FAILED;
+    }
 
-        /*
-          * If the request is on the target waiting or active queue
-         * or the board done queue, then remove it and note that it
-         * was found.
-         */
-        if (asc_rmqueue(&boardp->active, scp) == ASC_TRUE) {
-            ASC_DBG(1, "advansys_reset: active scp_found = TRUE\n");
-            scp_found = ASC_TRUE;
-        } else if (asc_rmqueue(&boardp->waiting, scp) == ASC_TRUE) {
-            ASC_DBG(1, "advansys_reset: waiting scp_found = TRUE\n");
-            scp_found = ASC_TRUE;
-        } else if (asc_rmqueue(&boardp->done, scp) == ASC_TRUE) {
-            scp_found = ASC_TRUE;
-        } else {
-            scp_found = ASC_FALSE;
-        }
+    boardp = ASC_BOARDP(shp);
 
+    ASC_PRINT1("advansys_reset: board %d: SCSI bus reset started...\n",
+        boardp->id);
+    /*
+     * Check for re-entrancy.
+     */
+    spin_lock_irqsave(&boardp->lock, flags);
+    if (boardp->flags & ASC_HOST_IN_RESET) {
+        spin_unlock_irqrestore(&boardp->lock, flags);
+        return FAILED;
+    }
+    boardp->flags |= ASC_HOST_IN_RESET;
+    spin_unlock_irqrestore(&boardp->lock, flags);
 
-        if (ASC_NARROW_BOARD(boardp)) {
-            /*
-             * Narrow Board
-             *
-             * If the suggest reset bus flags are set, then reset the bus.
-             * Otherwise only reset the device.
-             */
-            asc_dvc_varp = &boardp->dvc_var.asc_dvc_var;
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-            if (reset_flags &
-                (SCSI_RESET_SUGGEST_BUS_RESET |
-                 SCSI_RESET_SUGGEST_HOST_RESET)) {
-#endif /* version >= v1.3.89 */
+    /*
+     * XXX - Remove this comment and the next line when SCSI mid-level
+     * no longer acquires 'io_request_lock' before calling the SCSI
+     * low-level reset entrypoint.
+     */
+    ASC_UNLOCK_IO_REQUEST_LOCK
 
-                /*
-                 * Reset the target's SCSI bus.
-                 */
-                ASC_DBG(1, "advansys_reset: before AscResetSB()\n");
-                /* sti(); XXX */ /* Enable interrupts for AscResetSB(). */
-                status = AscResetSB(asc_dvc_varp);
-                /* cli(); XXX */
-                switch (status) {
-                case ASC_TRUE:
-                    ASC_DBG(1, "advansys_reset: AscResetSB() success\n");
-                    ret = SCSI_RESET_SUCCESS;
-                    break;
-                case ASC_ERROR:
-                default:
-                    ASC_DBG(1, "advansys_reset: AscResetSB() failed\n");
-                    ret = SCSI_RESET_ERROR;
-                    break;
-                }
+    if (ASC_NARROW_BOARD(boardp)) {
+        /*
+         * Narrow Board
+         */
+        asc_dvc_varp = &boardp->dvc_var.asc_dvc_var;
 
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-            } else {
-                /*
-                 * Reset the specified device. If the device reset fails,
-                 * then reset the SCSI bus.
-                 */
+        /*
+         * Reset the chip and SCSI bus.
+         */
+        ASC_DBG(1, "advansys_reset: before AscInitAsc1000Driver()\n");
+        status = AscInitAsc1000Driver(asc_dvc_varp);
 
-                ASC_DBG1(1,
-                    "advansys_reset: before AscResetDevice(), target %d\n",
-                    scp->target);
-                /* sti(); XXX */ /* Enable interrupts for AscResetDevice(). */
-                status = AscResetDevice(asc_dvc_varp, scp->target);
-                /* cli(); XXX */
-
-                switch (status) {
-                case ASC_TRUE:
-                    ASC_DBG(1, "advansys_reset: AscResetDevice() success\n");
-                    device_reset = ASC_TRUE;
-                    ret = SCSI_RESET_SUCCESS;
-                    break;
-                case ASC_ERROR:
-                default:
-                    ASC_DBG(1,
-"advansys_reset: AscResetDevice() failed; Calling AscResetSB()\n");
-                    /* sti(); XXX */ /* Enable interrupts for AscResetSB(). */
-                    status = AscResetSB(asc_dvc_varp);
-                    /* cli(); XXX */
-                    switch (status) {
-                    case ASC_TRUE:
-                        ASC_DBG(1, "advansys_reset: AscResetSB() TRUE\n");
-                        ret = SCSI_RESET_SUCCESS;
-                        break;
-                    case ASC_ERROR:
-                    default:
-                        ASC_DBG(1, "advansys_reset: AscResetSB() ERROR\n");
-                        ret = SCSI_RESET_ERROR;
-                        break;
-                    }
-                    break;
-                }
-            }
-#endif /* version >= v1.3.89 */
+        /* Refer to ASC_IERR_* defintions for meaning of 'err_code'. */
+        if (asc_dvc_varp->err_code) {
+            ASC_PRINT2(
+                "advansys_reset: board %d: SCSI bus reset error: 0x%x\n",
+                boardp->id, asc_dvc_varp->err_code);
+            ret = FAILED;
+        } else if (status) {
+            ASC_PRINT2(
+                "advansys_reset: board %d: SCSI bus reset warning: 0x%x\n",
+                boardp->id, status);
         } else {
-            /*
-             * Wide Board
-             *
-             * If the suggest reset bus flags are set, then reset the bus.
-             * Otherwise only reset the device.
-             */
-            adv_dvc_varp = &boardp->dvc_var.adv_dvc_var;
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-            if (reset_flags &
-                (SCSI_RESET_SUGGEST_BUS_RESET |
-                 SCSI_RESET_SUGGEST_HOST_RESET)) {
-#endif /* version >= v1.3.89 */
-
-                /*
-                 * Reset the target's SCSI bus.
-                 */
-                ASC_DBG(1, "advansys_reset: before AdvResetChipAndSB()\n");
-                switch (AdvResetChipAndSB(adv_dvc_varp)) {
-                case ASC_TRUE:
-                    ASC_DBG(1,
-                        "advansys_reset: AdvResetChipAndSB() success\n");
-                    ret = SCSI_RESET_SUCCESS;
-                    break;
-                case ASC_FALSE:
-                default:
-                    ASC_DBG(1, "advansys_reset: AdvResetChipAndSB() failed\n");
-                    ret = SCSI_RESET_ERROR;
-                    break;
-                }
-                /*
-                 * Ensure all requests completed by the microcode have
-                 * been processed by calling AdvISR().
-                 */
-                (void) AdvISR(adv_dvc_varp);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-            } else {
-                /*
-                 * Reset the specified device. If the device reset fails,
-                 * then reset the SCSI bus.
-                 */
-
-                ASC_DBG1(1,
-                    "advansys_reset: before AdvResetDevice(), target %d\n",
-                    scp->target);
-                
-                switch (AdvResetDevice(adv_dvc_varp, scp->target)) {
-                case ASC_TRUE:
-                    ASC_DBG(1, "advansys_reset: AdvResetDevice() success\n");
-                    device_reset = ASC_TRUE;
-                    ret = SCSI_RESET_SUCCESS;
-                    break;
-                case ASC_FALSE:
-                default:
-                    ASC_DBG(1,
-"advansys_reset: AdvResetDevice() failed; Calling AdvResetChipAndSB()\n");
-                    
-                    switch (AdvResetChipAndSB(adv_dvc_varp)) {
-                    case ASC_TRUE:
-                        ASC_DBG(1,
-                            "advansys_reset: AdvResetChipAndSB() TRUE\n");
-                        ret = SCSI_RESET_SUCCESS;
-                        break;
-                    case ASC_FALSE:
-                    default:
-                        ASC_DBG(1,
-                            "advansys_reset: AdvResetChipAndSB() ERROR\n");
-                        ret = SCSI_RESET_ERROR;
-                        break;
-                    }
-                    break;
-                }
-                /*
-                 * Ensure all requests completed by the microcode have
-                 * been processed by calling AdvISR().
-                 */
-                (void) AdvISR(adv_dvc_varp);
-            }
-#endif /* version >= v1.3.89 */
+            ASC_PRINT1(
+                "advansys_reset: board %d: SCSI bus reset successful.\n",
+                boardp->id);
         }
 
+        ASC_DBG(1, "advansys_reset: after AscInitAsc1000Driver()\n");
+
         /*
-         * Because the ASC_HOST_IN_RESET flag causes both
-         * 'advansys_interrupt' and 'asc_isr_callback' to
-         * queue requests to the board's 'done' queue and
-         * prevents waiting commands from being executed,
-         * these queued requests must be handled here.
+         * Acquire the board lock.
          */
-        done_scp = asc_dequeue_list(&boardp->done, &last_scp,
-                                    ASC_TID_ALL);
+        spin_lock_irqsave(&boardp->lock, flags);
 
+    } else {
         /*
-         * If a device reset was performed dequeue all waiting
-         * and active requests for the device and set the request
-         * status to DID_RESET.
+         * Wide Board
          *
-         * If a SCSI bus reset was performed dequeue all waiting
-         * and active requests for all devices and set the request
-         * status to DID_RESET.
+         * If the suggest reset bus flags are set, then reset the bus.
+         * Otherwise only reset the device.
          */
-        if (device_reset == ASC_TRUE) {
-            target = scp->target;
-        } else {
-            target = ASC_TID_ALL;
-        }
+        adv_dvc_varp = &boardp->dvc_var.adv_dvc_var;
 
         /*
-         * Add active requests to 'done_scp' and set the request status
-         * to DID_RESET.
+         * Reset the target's SCSI bus.
          */
-        if (done_scp == NULL) {
-            done_scp = asc_dequeue_list(&boardp->active, &last_scp, target);
-            for (tscp = done_scp; tscp; tscp = REQPNEXT(tscp)) {
-                tscp->result = HOST_BYTE(DID_RESET);
-            }
-        } else {
-            ASC_ASSERT(last_scp != NULL);
-            REQPNEXT(last_scp) = asc_dequeue_list(&boardp->active,
-                &new_last_scp, target);
-            if (new_last_scp != NULL) {
-                ASC_ASSERT(REQPNEXT(last_scp) != NULL);
-                for (tscp = REQPNEXT(last_scp); tscp; tscp = REQPNEXT(tscp)) {
-                    tscp->result = HOST_BYTE(DID_RESET);
-                }
-                last_scp = new_last_scp;
-            }
+        ASC_DBG(1, "advansys_reset: before AdvResetChipAndSB()\n");
+        switch (AdvResetChipAndSB(adv_dvc_varp)) {
+        case ASC_TRUE:
+            ASC_PRINT1("advansys_reset: board %d: SCSI bus reset successful.\n",
+                boardp->id);
+            break;
+        case ASC_FALSE:
+        default:
+            ASC_PRINT1("advansys_reset: board %d: SCSI bus reset error.\n",
+                boardp->id);
+            ret = FAILED;
+            break;
         }
-
         /*
-         * Add waiting requests to 'done_scp' and set the request status
-         * to DID_RESET.
+         * Acquire the board lock and ensure all requests completed by the
+         * microcode have been processed by calling AdvISR().
          */
-        if (done_scp == NULL) {
-            done_scp = asc_dequeue_list(&boardp->waiting, &last_scp, target);
-            for (tscp = done_scp; tscp; tscp = REQPNEXT(tscp)) {
-                tscp->result = HOST_BYTE(DID_RESET);
-            }
-        } else {
-            ASC_ASSERT(last_scp != NULL);
-            REQPNEXT(last_scp) = asc_dequeue_list(&boardp->waiting,
-                &new_last_scp, target);
-            if (new_last_scp != NULL) {
-                ASC_ASSERT(REQPNEXT(last_scp) != NULL);
-                for (tscp = REQPNEXT(last_scp); tscp; tscp = REQPNEXT(tscp)) {
-                    tscp->result = HOST_BYTE(DID_RESET);
-                }
-                last_scp = new_last_scp;
-            }
-        }
+        spin_lock_irqsave(&boardp->lock, flags);
+        (void) AdvISR(adv_dvc_varp);
+    }
 
-        /* Save the time of the most recently completed reset. */
-        boardp->last_reset = jiffies;
+    /* Board lock is held. */
 
-        /* Clear reset flag. */
-        boardp->flags &= ~ASC_HOST_IN_RESET;
+    /*
+     * Dequeue all board 'done' requests. A pointer to the last request
+     * is returned in 'last_scp'.
+     */
+    done_scp = asc_dequeue_list(&boardp->done, &last_scp, ASC_TID_ALL);
 
-        /*
-         * Start any waiting commands for the board.
-         */
-        if (!ASC_QUEUE_EMPTY(&boardp->waiting)) {
-            ASC_DBG(1, "advansys_interrupt: before asc_execute_queue()\n");
-            asc_execute_queue(&boardp->waiting);
+    /*
+     * Dequeue all board 'active' requests for all devices and set
+     * the request status to DID_RESET. A pointer to the last request
+     * is returned in 'last_scp'.
+     */
+    if (done_scp == NULL) {
+        done_scp = asc_dequeue_list(&boardp->active, &last_scp, ASC_TID_ALL);
+        for (tscp = done_scp; tscp; tscp = REQPNEXT(tscp)) {
+            tscp->result = HOST_BYTE(DID_RESET);
+        }
+    } else {
+        /* Append to 'done_scp' at the end with 'last_scp'. */
+        ASC_ASSERT(last_scp != NULL);
+        REQPNEXT(last_scp) = asc_dequeue_list(&boardp->active,
+            &new_last_scp, ASC_TID_ALL);
+        if (new_last_scp != NULL) {
+            ASC_ASSERT(REQPNEXT(last_scp) != NULL);
+            for (tscp = REQPNEXT(last_scp); tscp; tscp = REQPNEXT(tscp)) {
+                tscp->result = HOST_BYTE(DID_RESET);
+            }
+            last_scp = new_last_scp;
         }
-        ret = SCSI_RESET_SUCCESS;
     }
 
-    /* Interrupts could be enabled here. */
-
-    ASC_ASSERT(do_scsi_done != ASC_ERROR);
-    ASC_ASSERT(scp_found != ASC_ERROR);
-    if (do_scsi_done == ASC_TRUE) {
-        if (scp->scsi_done == NULL) {
-            ASC_PRINT1(
-"advansys_reset: reset request scsi_done() is NULL, %lx\n",
-                (ulong) scp);
-        } else {
-            if (scp_found == ASC_FALSE) {
-                ASC_PRINT1(
-"advansys_reset: reset request not active or waiting, completing anyway %lx\n",
-                    (ulong) scp);
+    /*
+     * Dequeue all 'waiting' requests and set the request status
+     * to DID_RESET.
+     */
+    if (done_scp == NULL) {
+        done_scp = asc_dequeue_list(&boardp->waiting, &last_scp, ASC_TID_ALL);
+        for (tscp = done_scp; tscp; tscp = REQPNEXT(tscp)) {
+            tscp->result = HOST_BYTE(DID_RESET);
+        }
+    } else {
+        /* Append to 'done_scp' at the end with 'last_scp'. */
+        ASC_ASSERT(last_scp != NULL);
+        REQPNEXT(last_scp) = asc_dequeue_list(&boardp->waiting,
+            &new_last_scp, ASC_TID_ALL);
+        if (new_last_scp != NULL) {
+            ASC_ASSERT(REQPNEXT(last_scp) != NULL);
+            for (tscp = REQPNEXT(last_scp); tscp; tscp = REQPNEXT(tscp)) {
+                tscp->result = HOST_BYTE(DID_RESET);
             }
-            ASC_STATS(scp->host, done);
-            scp->scsi_done(scp);
+            last_scp = new_last_scp;
         }
     }
 
+    /* Save the time of the most recently completed reset. */
+    boardp->last_reset = jiffies;
+
+    /* Clear reset flag. */
+    boardp->flags &= ~ASC_HOST_IN_RESET;
+
+    /* Release the board. */
+    spin_unlock_irqrestore(&boardp->lock, flags);
+
     /*
-     * It is possible for the request done function to re-enable
-     * interrupts without confusing the driver. But here interrupts
-     * aren't enabled until requests have been completed.
+     * Complete all the 'done_scp' requests.
      */
     if (done_scp != NULL) {
         asc_scsi_done_list(done_scp);
     }
 
-    ASC_DBG1(1, "advansys_reset: ret %d\n", ret);
+    /*
+     * XXX - Remove this comment and the next line when SCSI mid-level
+     * no longer acquires 'io_request_lock' before calling the SCSI
+     * low-level reset entrypoint.
+     */
+    ASC_LOCK_IO_REQUEST_LOCK
 
-    /* Re-enable interrupts, if they were enabled on entry. */
-    restore_flags(flags);
+    ASC_DBG1(1, "advansys_reset: ret %d\n", ret);
 
-    ASC_ASSERT(ret != ASC_ERROR);
     return ret;
 }
 
@@ -6671,11 +6195,7 @@
  * ip[2]: cylinders
  */
 int
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
-advansys_biosparam(Disk *dp, int dep, int ip[])
-#else /* version >= v1.3.0 */
 advansys_biosparam(Disk *dp, kdev_t dep, int ip[])
-#endif /* version >= v1.3.0 */
 {
     asc_board_t     *boardp;
 
@@ -6771,14 +6291,14 @@
 #ifdef ADVANSYS_DEBUG
     ASC_DBG1(1, "advansys_setup: ints[0] %d\n", ints[0]);
     for (i = 1; i < ints[0]; i++) {
-        ASC_DBG2(1, " ints[%d] %x", i, ints[i]);
+        ASC_DBG2(1, " ints[%d] 0x%x", i, ints[i]);
     }
     ASC_DBG(1, "\n");
 #endif /* ADVANSYS_DEBUG */
 
     for (i = 1; i <= ints[0] && i <= ASC_NUM_IOPORT_PROBE; i++) {
         asc_ioport[i-1] = ints[i];
-        ASC_DBG2(1, "advansys_setup: asc_ioport[%d] %x\n",
+        ASC_DBG2(1, "advansys_setup: asc_ioport[%d] 0x%x\n",
             i - 1, asc_ioport[i-1]);
     }
 }
@@ -6788,8 +6308,13 @@
  * --- Loadable Driver Support
  */
 
-static Scsi_Host_Template driver_template = ADVANSYS;
+#if ASC_LINUX_KERNEL24
+static
+#endif
+#if ASC_LINUX_KERNEL24 || (ASC_LINUX_KERNEL22 && defined(MODULE))
+Scsi_Host_Template driver_template = ADVANSYS;
 # include "scsi_module.c"
+#endif
 
 
 /*
@@ -6799,41 +6324,21 @@
 /*
  * First-level interrupt handler.
  *
- * For versions > v1.3.70, 'dev_id' is a pointer to the interrupting
- * adapter's asc_board_t. Because all boards are currently checked
- * for interrupts on each interrupt, 'dev_id' is not referenced. 'dev_id'
- * could be used to identify an interrupt passed to the AdvanSys driver,
- * which is for a device sharing an interrupt with an AdvanSys adapter.
+ * 'dev_id' is a pointer to the interrupting adapter's asc_board_t. Because
+ * all boards are currently checked for interrupts on each interrupt, 'dev_id'
+ * is not referenced. 'dev_id' could be used to identify an interrupt passed
+ * to the AdvanSys driver which is for a device sharing an interrupt with
+ * an AdvanSys adapter.
  */
 STATIC void
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,70)
-advansys_interrupt(int irq, struct pt_regs *regs)
-#else /* version >= v1.3.70 */
 advansys_interrupt(int irq, void *dev_id, struct pt_regs *regs)
-#endif /* version >= v1.3.70 */
 {
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,95)
-    int             flags;
-#else /* version >= v2.1.95 */
-    unsigned long   flags;
-#endif /* version >= v2.1.95 */
+    ulong           flags;
     int             i;
     asc_board_t     *boardp;
     Scsi_Cmnd       *done_scp = NULL, *last_scp = NULL;
     Scsi_Cmnd       *new_last_scp;
 
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,95)
-    /* Disable interrupts, if they aren't already disabled. */
-    save_flags(flags);
-    cli();
-#else /* version >= v2.1.95 */
-    /*
-     * Disable interrupts, if they aren't already disabled and acquire
-     * the I/O spinlock.
-     */
-    spin_lock_irqsave(&io_request_lock, flags);
-#endif /* version >= v2.1.95 */
-
     ASC_DBG(1, "advansys_interrupt: begin\n");
 
     /*
@@ -6842,8 +6347,9 @@
      */
     for (i = 0; i < asc_board_count; i++) {
         boardp = ASC_BOARDP(asc_host[i]);
-        ASC_DBG2(2, "advansys_interrupt: i %d, boardp %lx\n",
-            i, (ulong) boardp)            
+        ASC_DBG2(2, "advansys_interrupt: i %d, boardp 0x%lx\n",
+            i, (ulong) boardp);
+        spin_lock_irqsave(&boardp->lock, flags);
         if (ASC_NARROW_BOARD(boardp)) {
             /*
              * Narrow Board
@@ -6865,13 +6371,12 @@
 
         /*
          * Start waiting requests and create a list of completed requests.
-         * 
-         * If a reset or abort request is being performed for the board,
-         * the reset or abort handler will complete pending requests after
-         * it has completed.
+         *
+         * If a reset request is being performed for the board, the reset
+         * handler will complete pending requests after it has completed.
          */
-        if ((boardp->flags & (ASC_HOST_IN_RESET | ASC_HOST_IN_ABORT)) == 0) {
-            ASC_DBG2(1, "advansys_interrupt: done_scp %lx, last_scp %lx\n",
+        if ((boardp->flags & ASC_HOST_IN_RESET) == 0) {
+            ASC_DBG2(1, "advansys_interrupt: done_scp 0x%lx, last_scp 0x%lx\n",
                 (ulong) done_scp, (ulong) last_scp);
 
             /* Start any waiting commands for the board. */
@@ -6900,38 +6405,21 @@
                 }
             }
         }
+        spin_unlock_irqrestore(&boardp->lock, flags);
     }
 
-    /* Interrupts could be enabled here. */
-
     /*
-     * It is possible for the request done function to re-enable
-     * interrupts without confusing the driver. But here the
-     * original flags aren't restored until all requests have been
-     * completed.
+     * If interrupts were enabled on entry, then they
+     * are now enabled here.
+     *
+     * Complete all requests on the done list.
      */
     asc_scsi_done_list(done_scp);
 
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,95)
-    /*
-     * Restore the original flags which will enable interrupts
-     * if and only if they were enabled on entry.
-     */
-    restore_flags(flags);
-#else /* version >= v2.1.95 */
-    /*
-     * Release the I/O spinlock and restore the original flags
-     * which will enable interrupts if and only if they were
-     * enabled on entry.
-     */
-    spin_unlock_irqrestore(&io_request_lock, flags);
-#endif /* version >= v2.1.95 */
-
     ASC_DBG(1, "advansys_interrupt: end\n");
     return;
 }
 
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
 /*
  * Set the number of commands to queue per device for the
  * specified host adapter.
@@ -6960,22 +6448,11 @@
             device->queue_depth =
                 boardp->dvc_var.adv_dvc_var.max_dvc_qng;
         }
-        ASC_DBG3(1, "advansys_select_queue_depths: shp %lx, id %d, depth %d\n",
+        ASC_DBG3(1,
+            "advansys_select_queue_depths: shp 0x%lx, id %d, depth %d\n",
             (ulong) shp, device->id, device->queue_depth);
     }
 }
-#endif /* version >= v1.3.89 */
-
-/*
- * Function used only with polled I/O requests that are initiated by
- * advansys_command().
- */
-STATIC void
-advansys_command_done(Scsi_Cmnd *scp)
-{
-    ASC_DBG1(1, "advansys_command_done: scp %lx\n", (ulong) scp);
-    scp->SCp.Status = 1;
-}
 
 /*
  * Complete all requests on the singly linked list pointed
@@ -6990,7 +6467,7 @@
 
     ASC_DBG(2, "asc_scsi_done_list: begin\n");
     while (scp != NULL) {
-        ASC_DBG1(3, "asc_scsi_done_list: scp %lx\n", (ulong) scp);
+        ASC_DBG1(3, "asc_scsi_done_list: scp 0x%lx\n", (ulong) scp);
         tscp = REQPNEXT(scp);
         REQPNEXT(scp) = NULL;
         ASC_STATS(scp->host, done);
@@ -7038,12 +6515,15 @@
  *    scsi_done - used to save caller's done function
  *    host_scribble - used for pointer to another Scsi_Cmnd
  *
- * If this function returns ASC_NOERROR or ASC_ERROR the request
- * has been enqueued on the board's 'done' queue and must be
- * completed by the caller.
+ * If this function returns ASC_NOERROR the request has been enqueued
+ * on the board's 'active' queue and will be completed from the
+ * interrupt handler.
+ *
+ * If this function returns ASC_NOERROR the request has been enqueued
+ * on the board's 'done' queue and must be completed by the caller.
  *
- * If ASC_BUSY is returned the request must be enqueued by the
- * caller and re-tried later.
+ * If ASC_BUSY is returned the request will be enqueued by the
+ * caller on the target's waiting queue and re-tried later.
  */
 STATIC int
 asc_execute_scsi_cmnd(Scsi_Cmnd *scp)
@@ -7055,8 +6535,7 @@
     Scsi_Device        *device;
     int                ret;
 
-    ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
-    ASC_DBG2(1, "asc_execute_scsi_cmnd: scp %lx, done %lx\n",
+    ASC_DBG2(1, "asc_execute_scsi_cmnd: scp 0x%lx, done 0x%lx\n",
         (ulong) scp, (ulong) scp->scsi_done);
 
     boardp = ASC_BOARDP(scp->host);
@@ -7073,6 +6552,10 @@
          * Build Asc Library request structure using the
          * global structures 'asc_scsi_req' and 'asc_sg_head'.
          *
+         * If an error is returned, then the request has been
+         * queued on the board done queue. It will be completed
+         * by the caller.
+         *
          * asc_build_req() can not return ASC_BUSY.
          */
         if (asc_build_req(boardp, scp) == ASC_ERROR) {
@@ -7092,18 +6575,20 @@
              * request counter. Wrapping doesn't matter.
              */
             boardp->reqcnt[scp->target]++;
-
             asc_enqueue(&boardp->active, scp, ASC_BACK);
             ASC_DBG(1,
                 "asc_execute_scsi_cmnd: AscExeScsiQueue(), ASC_NOERROR\n");
             break;
         case ASC_BUSY:
-            /* Caller must enqueue request and retry later. */
+            /*
+             * Caller will enqueue request on the target's waiting queue
+             * and retry later.
+             */
             ASC_STATS(scp->host, exe_busy);
             break;
         case ASC_ERROR:
             ASC_PRINT2(
-"asc_execute_scsi_cmnd: board %d: AscExeScsiQueue() ASC_ERROR, err_code %x\n",
+"asc_execute_scsi_cmnd: board %d: AscExeScsiQueue() ASC_ERROR, err_code 0x%x\n",
                 boardp->id, asc_dvc_varp->err_code);
             ASC_STATS(scp->host, exe_error);
             scp->result = HOST_BYTE(DID_ERROR);
@@ -7111,7 +6596,7 @@
             break;
         default:
             ASC_PRINT2(
-"asc_execute_scsi_cmnd: board %d: AscExeScsiQueue() unknown, err_code %x\n",
+"asc_execute_scsi_cmnd: board %d: AscExeScsiQueue() unknown, err_code 0x%x\n",
                 boardp->id, asc_dvc_varp->err_code);
             ASC_STATS(scp->host, exe_unknown);
             scp->result = HOST_BYTE(DID_ERROR);
@@ -7127,7 +6612,7 @@
         /*
          * Build and get a pointer to an Adv Library request structure.
          *
-         * If the request is successfully built then send  it below,
+         * If the request is successfully built then send it below,
          * otherwise return with an error.
          */
         switch (adv_build_req(boardp, scp, &adv_scsiqp)) {
@@ -7136,14 +6621,28 @@
             break;
         case ASC_BUSY:
             ASC_DBG(1, "asc_execute_scsi_cmnd: adv_build_req ASC_BUSY\n");
+            /*
+             * If busy is returned the request has not been enqueued.
+             * It will be enqueued by the caller on the target's waiting
+             * queue and retried later.
+             *
+             * The asc_stats fields 'adv_build_noreq' and 'adv_build_nosg'
+             * count wide board busy conditions. They are updated in
+             * adv_build_req and adv_get_sglist, respectively.
+             */
             return ASC_BUSY;
         case ASC_ERROR:
+             /* 
+              * If an error is returned, then the request has been
+              * queued on the board done queue. It will be completed
+              * by the caller.
+              */
         default:
             ASC_DBG(1, "asc_execute_scsi_cmnd: adv_build_req ASC_ERROR\n");
             ASC_STATS(scp->host, build_error);
             return ASC_ERROR;
         }
-    
+
         /*
          * Execute the command. If there is no error, add the command
          * to the active queue.
@@ -7161,12 +6660,15 @@
                 "asc_execute_scsi_cmnd: AdvExeScsiQueue(), ASC_NOERROR\n");
             break;
         case ASC_BUSY:
-            /* Caller must enqueue request and retry later. */
+            /*
+             * Caller will enqueue request on the target's waiting queue
+             * and retry later.
+             */
             ASC_STATS(scp->host, exe_busy);
             break;
         case ASC_ERROR:
             ASC_PRINT2(
-"asc_execute_scsi_cmnd: board %d: AdvExeScsiQueue() ASC_ERROR, err_code %x\n",
+"asc_execute_scsi_cmnd: board %d: AdvExeScsiQueue() ASC_ERROR, err_code 0x%x\n",
                 boardp->id, adv_dvc_varp->err_code);
             ASC_STATS(scp->host, exe_error);
             scp->result = HOST_BYTE(DID_ERROR);
@@ -7174,7 +6676,7 @@
             break;
         default:
             ASC_PRINT2(
-"asc_execute_scsi_cmnd: board %d: AdvExeScsiQueue() unknown, err_code %x\n",
+"asc_execute_scsi_cmnd: board %d: AdvExeScsiQueue() unknown, err_code 0x%x\n",
                 boardp->id, adv_dvc_varp->err_code);
             ASC_STATS(scp->host, exe_unknown);
             scp->result = HOST_BYTE(DID_ERROR);
@@ -7184,7 +6686,6 @@
     }
 
     ASC_DBG(1, "asc_execute_scsi_cmnd: end\n");
-    ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
     return ret;
 }
 
@@ -7194,7 +6695,8 @@
  * The global structures 'asc_scsi_q' and 'asc_sg_head' are
  * used to build the request.
  *
- * If an error occurs, then return ASC_ERROR.
+ * If an error occurs, then queue the request on the board done
+ * queue and return ASC_ERROR.
  */
 STATIC int
 asc_build_req(asc_board_t *boardp, Scsi_Cmnd *scp)
@@ -7212,21 +6714,24 @@
 
     /*
      * Build the ASC_SCSI_Q request.
+     *
+     * For narrow boards a CDB length maximum of 12 bytes
+     * is supported.
      */
-    ASC_ASSERT(scp->cmd_len <= ASC_MAX_CDB_LEN);
     if (scp->cmd_len > ASC_MAX_CDB_LEN) {
-        scp->cmd_len = ASC_MAX_CDB_LEN;
+        ASC_PRINT3(
+"asc_build_req: board %d: cmd_len %d > ASC_MAX_CDB_LEN  %d\n",
+            boardp->id, scp->cmd_len, ASC_MAX_CDB_LEN);
+        scp->result = HOST_BYTE(DID_ERROR);
+        asc_enqueue(&boardp->done, scp, ASC_BACK);
+        return ASC_ERROR;
     }
     asc_scsi_q.cdbptr = &scp->cmnd[0];
     asc_scsi_q.q2.cdb_len = scp->cmd_len;
     asc_scsi_q.q1.target_id = ASC_TID_TO_TARGET_ID(scp->target);
     asc_scsi_q.q1.target_lun = scp->lun;
     asc_scsi_q.q2.target_ix = ASC_TIDLUN_TO_IX(scp->target, scp->lun);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
-    asc_scsi_q.q1.sense_addr = (ADV_PADDR) &scp->sense_buffer[0];
-#else /* version >= v2.0.0 */
     asc_scsi_q.q1.sense_addr = cpu_to_le32(virt_to_bus(&scp->sense_buffer[0]));
-#endif /* version >= v2.0.0 */
     asc_scsi_q.q1.sense_len = sizeof(scp->sense_buffer);
 
     /*
@@ -7238,7 +6743,7 @@
      *
      * The request count is incremented below for every successfully
      * started request.
-     * 
+     *
      */
     if ((boardp->dvc_var.asc_dvc_var.cur_dvc_qng[scp->target] > 0) &&
         (boardp->reqcnt[scp->target] % 255) == 0) {
@@ -7256,13 +6761,9 @@
          * CDB request of single contiguous buffer.
          */
         ASC_STATS(scp->host, cont_cnt);
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
-        asc_scsi_q.q1.data_addr = (ADV_PADDR) scp->request_buffer;
-#else /* version >= v2.0.0 */
         asc_scsi_q.q1.data_addr =
             cpu_to_le32(virt_to_bus(scp->request_buffer));
-#endif /* version >= v2.0.0 */
-        asc_scsi_q.q1.data_cnt = scp->request_bufflen;
+        asc_scsi_q.q1.data_cnt = cpu_to_le32(scp->request_bufflen);
         ASC_STATS_ADD(scp->host, cont_xfer,
                       ASC_CEILING(scp->request_bufflen, 512));
         asc_scsi_q.q1.sg_queue_cnt = 0;
@@ -7295,6 +6796,7 @@
         asc_scsi_q.sg_head = &asc_sg_head;
         asc_scsi_q.q1.data_cnt = 0;
         asc_scsi_q.q1.data_addr = 0;
+        /* This is a byte value, otherwise it would need to be swapped. */
         asc_sg_head.entry_cnt = asc_scsi_q.q1.sg_queue_cnt = scp->use_sg;
         ASC_STATS_ADD(scp->host, sg_elem, asc_sg_head.entry_cnt);
 
@@ -7303,12 +6805,8 @@
          */
         slp = (struct scatterlist *) scp->request_buffer;
         for (sgcnt = 0; sgcnt < scp->use_sg; sgcnt++, slp++) {
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
-            asc_sg_head.sg_list[sgcnt].addr = (ADV_PADDR) slp->address;
-#else /* version >= v2.0.0 */
             asc_sg_head.sg_list[sgcnt].addr =
                 cpu_to_le32(virt_to_bus(slp->address));
-#endif /* version >= v2.0.0 */
             asc_sg_head.sg_list[sgcnt].bytes = cpu_to_le32(slp->length);
             ASC_STATS_ADD(scp->host, sg_xfer, ASC_CEILING(slp->length, 512));
         }
@@ -7354,9 +6852,9 @@
     }
 
     /*
-     * Get 4-byte aligned ADV_SCSI_REQ_Q and ADV_SG_BLOCK pointers.
+     * Get 32-byte aligned ADV_SCSI_REQ_Q and ADV_SG_BLOCK pointers.
      */
-    scsiqp = (ADV_SCSI_REQ_Q *) ADV_DWALIGN(&reqp->scsi_req_q);
+    scsiqp = (ADV_SCSI_REQ_Q *) ADV_32BALIGN(&reqp->scsi_req_q);
 
     /*
      * Initialize the structure.
@@ -7379,24 +6877,31 @@
 
     /*
      * Set CDB length and copy it to the request structure.
+     * For wide  boards a CDB length maximum of 16 bytes
+     * is supported.
      */
-    ASC_ASSERT(scp->cmd_len <= ASC_MAX_CDB_LEN);
-    if (scp->cmd_len > ASC_MAX_CDB_LEN) {
-        scp->cmd_len = ASC_MAX_CDB_LEN;
+    if (scp->cmd_len > ADV_MAX_CDB_LEN) {
+        ASC_PRINT3(
+"adv_build_req: board %d: cmd_len %d > ADV_MAX_CDB_LEN  %d\n",
+            boardp->id, scp->cmd_len, ADV_MAX_CDB_LEN);
+        scp->result = HOST_BYTE(DID_ERROR);
+        asc_enqueue(&boardp->done, scp, ASC_BACK);
+        return ASC_ERROR;
     }
     scsiqp->cdb_len = scp->cmd_len;
-    for (i = 0; i < scp->cmd_len; i++) {
+    /* Copy first 12 CDB bytes to cdb[]. */
+    for (i = 0; i < scp->cmd_len && i < 12; i++) {
         scsiqp->cdb[i] = scp->cmnd[i];
     }
+    /* Copy last 4 CDB bytes, if present, to cdb16[]. */
+    for (; i < scp->cmd_len; i++) {
+        scsiqp->cdb16[i - 12] = scp->cmnd[i];
+    }
 
     scsiqp->target_id = scp->target;
     scsiqp->target_lun = scp->lun;
 
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
-    scsiqp->sense_addr = (ADV_PADDR) &scp->sense_buffer[0];
-#else /* version >= v2.0.0 */
     scsiqp->sense_addr = cpu_to_le32(virt_to_bus(&scp->sense_buffer[0]));
-#endif /* version >= v2.0.0 */
     scsiqp->sense_len = sizeof(scp->sense_buffer);
 
     /*
@@ -7405,11 +6910,7 @@
      */
     scsiqp->data_cnt = cpu_to_le32(scp->request_bufflen);
     scsiqp->vdata_addr = scp->request_buffer;
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
-    scsiqp->data_addr = (ADV_PADDR) scp->request_buffer;
-#else /* version >= v2.0.0 */
     scsiqp->data_addr = cpu_to_le32(virt_to_bus(scp->request_buffer));
-#endif /* version >= v2.0.0 */
 
     if (scp->use_sg == 0) {
         /*
@@ -7488,7 +6989,7 @@
     ADV_PADDR           sg_block_paddr;
     int                 i;
 
-    scsiqp = (ADV_SCSI_REQ_Q *) ADV_DWALIGN(&reqp->scsi_req_q);
+    scsiqp = (ADV_SCSI_REQ_Q *) ADV_32BALIGN(&reqp->scsi_req_q);
     slp = (struct scatterlist *) scp->request_buffer;
     sg_elem_cnt = scp->use_sg;
     prev_sg_block = NULL;
@@ -7525,16 +7026,11 @@
             sgblkp->next_sgblkp = NULL;
 
             /*
-             * Get 4 byte aligned virtual and physical addresses for
+             * Get 8 byte aligned virtual and physical addresses for
              * the allocated ADV_SG_BLOCK structure.
              */
-            sg_block = (ADV_SG_BLOCK *) ADV_DWALIGN(&sgblkp->sg_block);
-            sg_block_paddr =
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
-                (ADV_PADDR) sg_block;
-#else /* version >= v2.0.0 */
-                virt_to_bus(sg_block);
-#endif /* version >= v2.0.0 */
+            sg_block = (ADV_SG_BLOCK *) ADV_8BALIGN(&sgblkp->sg_block);
+            sg_block_paddr = virt_to_bus(sg_block);
 
             /*
              * Check if this is the first 'adv_sgblk_t' for the request.
@@ -7568,11 +7064,7 @@
         for (i = 0; i < NO_OF_SG_PER_BLOCK; i++)
         {
             sg_block->sg_list[i].sg_addr =
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
-                (ADV_PADDR) slp->address;
-#else /* version >= v2.0.0 */
                 cpu_to_le32(virt_to_bus(slp->address));
-#endif /* version >= v2.0.0 */
             sg_block->sg_list[i].sg_count = cpu_to_le32(slp->length);
             ASC_STATS_ADD(scp->host, sg_xfer, ASC_CEILING(slp->length, 512));
 
@@ -7604,8 +7096,7 @@
     struct Scsi_Host    *shp;
     int                 i;
 
-    ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
-    ASC_DBG2(1, "asc_isr_callback: asc_dvc_varp %lx, qdonep %lx\n",
+    ASC_DBG2(1, "asc_isr_callback: asc_dvc_varp 0x%lx, qdonep 0x%lx\n",
         (ulong) asc_dvc_varp, (ulong) qdonep);
     ASC_DBG_PRT_ASC_QDONE_INFO(2, qdonep);
 
@@ -7614,7 +7105,7 @@
      * command that has been completed.
      */
     scp = (Scsi_Cmnd *) ASC_U32_TO_VADDR(qdonep->d2.srb_ptr);
-    ASC_DBG1(1, "asc_isr_callback: scp %lx\n", (ulong) scp);
+    ASC_DBG1(1, "asc_isr_callback: scp 0x%lx\n", (ulong) scp);
 
     if (scp == NULL) {
         ASC_PRINT("asc_isr_callback: scp is NULL\n");
@@ -7634,24 +7125,24 @@
     }
     if (i == asc_board_count) {
         ASC_PRINT2(
-            "asc_isr_callback: scp %lx has bad host pointer, host %lx\n",
+            "asc_isr_callback: scp 0x%lx has bad host pointer, host 0x%lx\n",
             (ulong) scp, (ulong) shp);
         return;
     }
 
     ASC_STATS(shp, callback);
-    ASC_DBG1(1, "asc_isr_callback: shp %lx\n", (ulong) shp);
+    ASC_DBG1(1, "asc_isr_callback: shp 0x%lx\n", (ulong) shp);
 
     /*
      * If the request isn't found on the active queue, it may
-     * have been removed to handle a reset or abort request.
+     * have been removed to handle a reset request.
      * Display a message and return.
      */
     boardp = ASC_BOARDP(shp);
     ASC_ASSERT(asc_dvc_varp == &boardp->dvc_var.asc_dvc_var);
     if (asc_rmqueue(&boardp->active, scp) == ASC_FALSE) {
         ASC_PRINT2(
-            "asc_isr_callback: board %d: scp %lx not on active queue\n",
+            "asc_isr_callback: board %d: scp 0x%lx not on active queue\n",
             boardp->id, (ulong) scp);
         return;
     }
@@ -7675,20 +7166,20 @@
                 (ASC_SCSI_INQUIRY *) scp->request_buffer);
         }
 
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,19)
+#if ASC_LINUX_KERNEL24
         /*
          * Check for an underrun condition.
          *
          * If there was no error and an underrun condition, then
          * then return the number of underrun bytes.
          */
-        if (scp->request_bufflen != 0 && qdonep->remain_bytes != 0 && 
+        if (scp->request_bufflen != 0 && qdonep->remain_bytes != 0 &&
             qdonep->remain_bytes <= scp->request_bufflen != 0) {
             ASC_DBG1(1, "asc_isr_callback: underrun condition %u bytes\n",
             (unsigned) qdonep->remain_bytes);
             scp->resid = qdonep->remain_bytes;
         }
-#endif /* version >= v2.3.19 */
+#endif
         break;
 
     case QD_WITH_ERROR:
@@ -7710,15 +7201,15 @@
                  * byte as it is defined by SCSI.
                  */
                 scp->result = DRIVER_BYTE(DRIVER_SENSE) |
-                    STATUS_BYTE(qdonep->d3.scsi_stat); 
+                    STATUS_BYTE(qdonep->d3.scsi_stat);
             } else {
-                scp->result = STATUS_BYTE(qdonep->d3.scsi_stat); 
+                scp->result = STATUS_BYTE(qdonep->d3.scsi_stat);
             }
             break;
 
         default:
             /* QHSTA error occurred */
-            ASC_DBG1(1, "asc_isr_callback: host_stat %x\n",
+            ASC_DBG1(1, "asc_isr_callback: host_stat 0x%x\n",
                 qdonep->d3.host_stat);
             scp->result = HOST_BYTE(DID_BAD_TARGET);
             break;
@@ -7732,7 +7223,7 @@
         break;
 
     default:
-        ASC_DBG1(1, "asc_isr_callback: done_stat %x\n", qdonep->d3.done_stat);
+        ASC_DBG1(1, "asc_isr_callback: done_stat 0x%x\n", qdonep->d3.done_stat);
         scp->result = HOST_BYTE(DID_ERROR) | MSG_BYTE(qdonep->d3.scsi_msg) |
                 STATUS_BYTE(qdonep->d3.scsi_stat);
         break;
@@ -7749,7 +7240,7 @@
         boardp->init_tidmask |= ADV_TID_TO_TIDMASK(scp->target);
     }
 
-    /* 
+    /*
      * Because interrupts may be enabled by the 'Scsi_Cmnd' done
      * function, add the command to the end of the board's done queue.
      * The done function for the command will be called from
@@ -7774,9 +7265,12 @@
     Scsi_Cmnd           *scp;
     struct Scsi_Host    *shp;
     int                 i;
+#if ASC_LINUX_KERNEL24
+    ADV_DCNT            resid_cnt;
+#endif
 
-    ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
-    ASC_DBG2(1, "adv_isr_callback: adv_dvc_varp %lx, scsiqp %lx\n",
+
+    ASC_DBG2(1, "adv_isr_callback: adv_dvc_varp 0x%lx, scsiqp 0x%lx\n",
         (ulong) adv_dvc_varp, (ulong) scsiqp);
     ASC_DBG_PRT_ADV_SCSI_REQ_Q(2, scsiqp);
 
@@ -7786,7 +7280,7 @@
      * completed ADV_SCSI_REQ_Q structure.
      */
     reqp = (adv_req_t *) ADV_U32_TO_VADDR(scsiqp->srb_ptr);
-    ASC_DBG1(1, "adv_isr_callback: reqp %lx\n", (ulong) reqp);
+    ASC_DBG1(1, "adv_isr_callback: reqp 0x%lx\n", (ulong) reqp);
     if (reqp == NULL) {
         ASC_PRINT("adv_isr_callback: reqp is NULL\n");
         return;
@@ -7801,7 +7295,7 @@
      * determined.
      */
     scp = reqp->cmndp;
-    ASC_DBG1(1, "adv_isr_callback: scp %lx\n", (ulong) scp);
+    ASC_DBG1(1, "adv_isr_callback: scp 0x%lx\n", (ulong) scp);
     if (scp == NULL) {
         ASC_PRINT("adv_isr_callback: scp is NULL; adv_req_t dropped.\n");
         return;
@@ -7824,18 +7318,17 @@
      */
     if (i == asc_board_count) {
         ASC_PRINT2(
-            "adv_isr_callback: scp %lx has bad host pointer, host %lx\n",
+            "adv_isr_callback: scp 0x%lx has bad host pointer, host 0x%lx\n",
             (ulong) scp, (ulong) shp);
         return;
     }
 
     ASC_STATS(shp, callback);
-    ASC_DBG1(1, "adv_isr_callback: shp %lx\n", (ulong) shp);
+    ASC_DBG1(1, "adv_isr_callback: shp 0x%lx\n", (ulong) shp);
 
     /*
      * If the request isn't found on the active queue, it may have been
-     * removed to handle a reset or abort request. Display a message and
-     * return.
+     * removed to handle a reset request. Display a message and return.
      *
      * Note: Because the structure may still be in use don't attempt
      * to free the adv_req_t and adv_sgblk_t, if any, structures.
@@ -7844,7 +7337,7 @@
     ASC_ASSERT(adv_dvc_varp == &boardp->dvc_var.adv_dvc_var);
     if (asc_rmqueue(&boardp->active, scp) == ASC_FALSE) {
         ASC_PRINT2(
-            "adv_isr_callback: board %d: scp %lx not on active queue\n",
+            "adv_isr_callback: board %d: scp 0x%lx not on active queue\n",
             boardp->id, (ulong) scp);
         return;
     }
@@ -7857,20 +7350,21 @@
         ASC_DBG(2, "adv_isr_callback: QD_NO_ERROR\n");
         scp->result = 0;
 
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,19)
+#if ASC_LINUX_KERNEL24
         /*
          * Check for an underrun condition.
          *
          * If there was no error and an underrun condition, then
          * then return the number of underrun bytes.
          */
-        if (scp->request_bufflen != 0 && scsiqp->data_cnt != 0 &&
-            scsiqp->data_cnt <= scp->request_bufflen) {
+        resid_cnt = le32_to_cpu(scsiqp->data_cnt);
+        if (scp->request_bufflen != 0 && resid_cnt != 0 &&
+            resid_cnt <= scp->request_bufflen) {
             ASC_DBG1(1, "adv_isr_callback: underrun condition %lu bytes\n",
-            (ulong) scsiqp->data_cnt);
-            scp->resid = scsiqp->data_cnt;
+                (ulong) resid_cnt);
+            scp->resid = resid_cnt;
         }
-#endif /* version >= v2.3.19 */
+#endif
         break;
 
     case QD_WITH_ERROR:
@@ -7900,7 +7394,7 @@
 
         default:
             /* Some other QHSTA error occurred. */
-            ASC_DBG1(1, "adv_isr_callback: host_status %x\n",
+            ASC_DBG1(1, "adv_isr_callback: host_status 0x%x\n",
                 scsiqp->host_status);
             scp->result = HOST_BYTE(DID_BAD_TARGET);
             break;
@@ -7913,7 +7407,7 @@
         break;
 
     default:
-        ASC_DBG1(1, "adv_isr_callback: done_status %x\n", scsiqp->done_status);
+        ASC_DBG1(1, "adv_isr_callback: done_status 0x%x\n", scsiqp->done_status);
         scp->result = HOST_BYTE(DID_ERROR) | STATUS_BYTE(scsiqp->scsi_status);
         break;
     }
@@ -7929,7 +7423,7 @@
         boardp->init_tidmask |= ADV_TID_TO_TIDMASK(scp->target);
     }
 
-    /* 
+    /*
      * Because interrupts may be enabled by the 'Scsi_Cmnd' done
      * function, add the command to the end of the board's done queue.
      * The done function for the command will be called from
@@ -8000,415 +7494,6 @@
     }
 }
 
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
-/*
- * Search for an AdvanSys PCI device in the PCI configuration space.
- */
-ASC_INITFUNC(
-STATIC int,
-asc_srch_pci_dev(PCI_DEVICE *pciDevice)
-)
-{
-    int                        ret = PCI_DEVICE_NOT_FOUND;
-
-    ASC_DBG(2, "asc_srch_pci_dev: begin\n");
-
-    if (pci_scan_method == -1) {
-        pci_scan_method = asc_scan_method();
-    }
-    pciDevice->type = pci_scan_method;
-    ASC_DBG1(2, "asc_srch_pci_dev: type %d\n", pciDevice->type);
-
-    ret = asc_pci_find_dev(pciDevice);
-    ASC_DBG1(2, "asc_srch_pci_dev: asc_pci_find_dev() return %d\n", ret);
-    if (ret == PCI_DEVICE_FOUND) {
-        pciDevice->slotNumber = pciDevice->slotFound + 1;
-        pciDevice->startSlot = pciDevice->slotFound + 1;
-    } else {
-        if (pciDevice->bridge > pciDevice->busNumber) {
-            ASC_DBG2(2, "asc_srch_pci_dev: bridge %x, busNumber %x\n",
-                pciDevice->bridge, pciDevice->busNumber);
-            pciDevice->busNumber++;
-            pciDevice->slotNumber = 0;
-            pciDevice->startSlot = 0;
-            pciDevice->endSlot = 0x0f;
-            ret = asc_srch_pci_dev(pciDevice);
-            ASC_DBG1(2, "asc_srch_pci_dev: recursive call return %d\n", ret);
-        }
-    }
-
-    ASC_DBG1(2, "asc_srch_pci_dev: return %d\n", ret);
-    return ret;
-}
-
-/*
- * Determine the access method to be used for 'pciDevice'.
- */
-ASC_INITFUNC(
-STATIC uchar,
-asc_scan_method(void)
-)
-{
-    ushort      data;
-    PCI_DATA    pciData;
-    uchar       type;
-    uchar       slot;
-
-    ASC_DBG(2, "asc_scan_method: begin\n");
-    memset(&pciData, 0, sizeof(pciData));
-    for (type = 1; type < 3; type++) {
-        pciData.type = type;
-        for (slot = 0; slot < PCI_MAX_SLOT; slot++) {
-            pciData.slot = slot;
-            data = asc_get_cfg_word(&pciData);
-            if ((data != 0xFFFF) && (data != 0x0000)) {
-                ASC_DBG2(4, "asc_scan_method: data %x, type %d\n", data, type);
-                return (type);
-            }
-        }
-    }
-    ASC_DBG1(4, "asc_scan_method: type %d\n", type);
-    return (type);
-}
-
-/*
- * Check for an AdvanSys PCI device in 'pciDevice'.
- *
- * Return PCI_DEVICE_FOUND if found, otherwise return PCI_DEVICE_NOT_FOUND.
- */
-ASC_INITFUNC(
-STATIC int,
-asc_pci_find_dev(PCI_DEVICE *pciDevice)
-)
-{
-    PCI_DATA    pciData;
-    ushort      vendorid, deviceid;
-    uchar       classcode, subclass;
-    uchar       lslot;
-
-    ASC_DBG(3, "asc_pci_find_dev: begin\n");
-    pciData.type = pciDevice->type;
-    pciData.bus = pciDevice->busNumber;
-    pciData.func = pciDevice->devFunc;
-    lslot = pciDevice->startSlot;
-    for (; lslot < pciDevice->endSlot; lslot++) {
-        pciData.slot = lslot;
-        pciData.offset = VENDORID_OFFSET;
-        vendorid = asc_get_cfg_word(&pciData);
-        ASC_DBG1(3, "asc_pci_find_dev: vendorid %x\n", vendorid);
-        if (vendorid != 0xffff) {
-            pciData.offset = DEVICEID_OFFSET;
-            deviceid = asc_get_cfg_word(&pciData);
-            ASC_DBG1(3, "asc_pci_find_dev: deviceid %x\n", deviceid);
-            if ((vendorid == ASC_PCI_VENDORID) &&
-                ((deviceid == ASC_PCI_DEVICE_ID_1100) ||
-                 (deviceid == ASC_PCI_DEVICE_ID_1200) ||
-                 (deviceid == ASC_PCI_DEVICE_ID_1300) ||
-                 (deviceid == ASC_PCI_DEVICE_ID_2300) ||
-                 (deviceid == ASC_PCI_DEVICE_ID_2500))) {
-                pciDevice->slotFound = lslot;
-                ASC_DBG(3, "asc_pci_find_dev: PCI_DEVICE_FOUND\n");
-                return PCI_DEVICE_FOUND;
-            } else {
-                pciData.offset = SUBCLASS_OFFSET;
-                subclass = asc_get_cfg_byte(&pciData);
-                pciData.offset = CLASSCODE_OFFSET;
-                classcode = asc_get_cfg_byte(&pciData);
-                if ((classcode & PCI_BASE_CLASS_BRIDGE_DEVICE) &&
-                    (subclass & PCI_SUB_CLASS_PCI_TO_PCI_BRIDGE_CONTROLLER)) {
-                    pciDevice->bridge++;
-                }
-                ASC_DBG2(3, "asc_pci_find_dev: subclass %x, classcode %x\n",
-                    subclass, classcode);
-            }
-        }
-    }
-    return PCI_DEVICE_NOT_FOUND;
-}
-
-/*
- * Read PCI configuration data into 'pciConfig'.
- */
-ASC_INITFUNC(
-STATIC void,
-asc_get_pci_cfg(PCI_DEVICE *pciDevice, PCI_CONFIG_SPACE *pciConfig)
-)
-{
-    PCI_DATA    pciData;
-    uchar       counter;
-    uchar       *localConfig;
-
-    ASC_DBG1(4, "asc_get_pci_cfg: slotFound %d\n ",
-        pciDevice->slotFound);
-
-    pciData.type = pciDevice->type;
-    pciData.bus = pciDevice->busNumber;
-    pciData.slot = pciDevice->slotFound;
-    pciData.func = pciDevice->devFunc;
-    localConfig = (uchar *) pciConfig;
-
-    for (counter = 0; counter < sizeof(PCI_CONFIG_SPACE); counter++) {
-        pciData.offset = counter;
-        *localConfig = asc_get_cfg_byte(&pciData);
-        ASC_DBG1(4, "asc_get_pci_cfg: byte %x\n", *localConfig);
-        localConfig++;
-    }
-    ASC_DBG1(4, "asc_get_pci_cfg: counter %d\n", counter);
-}
-
-/*
- * Read a word (16 bits) from the PCI configuration space.
- *
- * The configuration mechanism is checked for the correct access method.
- */
-ASC_INITFUNC(
-STATIC ushort,
-asc_get_cfg_word(PCI_DATA *pciData)
-)
-{
-    ushort   tmp;
-    ADV_DCNT address;
-    ADV_DCNT lbus = pciData->bus;
-    ADV_DCNT lslot = pciData->slot;
-    ADV_DCNT lfunc = pciData->func;
-    uchar    t2CFA, t2CF8;
-    ADV_DCNT t1CF8, t1CFC;
-
-    ASC_DBG4(4, "asc_get_cfg_word: type %d, bus %u, slot %u, func %u\n",
-        pciData->type, (unsigned) lbus, (unsigned) lslot, (unsigned) lfunc);
-
-    /*
-     * Check type of configuration mechanism.
-     */
-    if (pciData->type == 2) {
-        /*
-         * Save registers to be restored later.
-         */
-        t2CFA = inp(0xCFA);    /* save PCI bus register */
-        t2CF8 = inp(0xCF8);    /* save config space enable register */
-
-        /*
-         * Write the bus and enable registers.
-         */
-        /* set for type 1 cycle, if needed */
-        outp(0xCFA, pciData->bus);
-        /* set the function number */
-        outp(0xCF8, 0x10 | (pciData->func << 1));
-
-        /*
-         * Read the configuration space type 2 locations.
-         */
-        tmp = (ushort) inpw(0xC000 | ((pciData->slot << 8) + pciData->offset));
-
-        outp(0xCFA, t2CFA);    /* save PCI bus register */
-        outp(0xCF8, t2CF8);    /* save config space enable register */
-    } else {
-        /*
-         * Type 1 or 3 configuration mechanism.
-         *
-         * Save the CONFIG_ADDRESS and CONFIG_DATA register values.
-         */
-        t1CF8 = inpl(0xCF8);
-        t1CFC = inpl(0xCFC);
-
-        /*
-         * enable <31>, bus = <23:16>, slot = <15:11>,
-         * func = <10:8>, reg = <7:2>
-         */
-        address = (ADV_DCNT) ((lbus << 16) | (lslot << 11) |
-            (lfunc << 8) | (pciData->offset & 0xFC) | 0x80000000L);
-
-        /*
-         * Write out the address to CONFIG_ADDRESS.
-         */
-        outpl(0xCF8, address);
-
-        /*
-         * Read in word from CONFIG_DATA.
-         */
-        tmp = (ushort) ((inpl(0xCFC) >>
-                 ((pciData->offset & 2) * 8)) & 0xFFFF);
-
-        /*
-         * Restore registers.
-         */
-        outpl(0xCF8, t1CF8);
-        outpl(0xCFC, t1CFC);
-    }
-    ASC_DBG1(4, "asc_get_cfg_word: config data: %x\n", tmp);
-    return tmp;
-}
-
-/*
- * Reads a byte from the PCI configuration space.
- *
- * The configuration mechanism is checked for the correct access method.
- */
-ASC_INITFUNC(
-STATIC uchar,
-asc_get_cfg_byte(PCI_DATA *pciData)
-)
-{
-    uchar    tmp;
-    ADV_DCNT address;
-    ADV_DCNT lbus = pciData->bus, lslot = pciData->slot, lfunc = pciData->func;
-    ADV_DCNT t2CFA, t2CF8;
-    ADV_DCNT t1CF8, t1CFC;
-
-    ASC_DBG1(4, "asc_get_cfg_byte: type: %d\n", pciData->type);
-
-    /*
-     * Check type of configuration mechanism.
-     */
-    if (pciData->type == 2) {
-        /*
-         * Save registers to be restored later.
-         */
-        t2CFA = inp(0xCFA);    /* save PCI bus register */
-        t2CF8 = inp(0xCF8);    /* save config space enable register */
-
-        /*
-         * Write the bus and enable registers.
-         */
-        /* set for type 1 cycle, if needed */
-        outp(0xCFA, pciData->bus);
-        /* set the function number */
-        outp(0xCF8, 0x10 | (pciData->func << 1));
-
-        /*
-         * Read configuration space type 2 locations.
-         */
-        tmp = inp(0xC000 | ((pciData->slot << 8) + pciData->offset));
-
-        /*
-         * Restore registers.
-         */
-        outp(0xCF8, t2CF8);    /* restore the enable register */
-        outp(0xCFA, t2CFA);    /* restore PCI bus register */
-    } else {
-        /*
-         * Type 1 or 3 configuration mechanism.
-         *
-         * Save CONFIG_ADDRESS and CONFIG_DATA register values.
-         */
-        t1CF8 = inpl(0xCF8);
-        t1CFC = inpl(0xCFC);
-
-        /*
-         * enable <31>, bus = <23:16>, slot = <15:11>, func = <10:8>,
-         * reg = <7:2>
-         */
-        address = (ADV_DCNT) ((lbus << 16) | (lslot << 11) |
-            (lfunc << 8) | (pciData->offset & 0xFC) | 0x80000000L);
-
-        /*
-         * Write out address to CONFIG_ADDRESS.
-         */
-        outpl(0xCF8, address);
-
-        /*
-         * Read in word from CONFIG_DATA.
-         */
-        tmp = (uchar) ((inpl(0xCFC) >> ((pciData->offset & 3) * 8)) & 0xFF);
-
-        /*
-         * Restore registers.
-         */
-        outpl(0xCF8, t1CF8);
-        outpl(0xCFC, t1CFC);
-    }
-    ASC_DBG1(4, "asc_get_cfg_byte: config data: %x\n", tmp);
-    return tmp;
-}
-
-/*
- * Write a byte to the PCI configuration space.
- */
-ASC_INITFUNC(
-STATIC void,
-asc_put_cfg_byte(PCI_DATA *pciData, uchar byte_data)
-)
-{
-    ADV_DCNT tmpl;
-    ADV_DCNT address;
-    ADV_DCNT lbus = pciData->bus, lslot = pciData->slot, lfunc = pciData->func;
-    uchar    t2CFA, t2CF8;
-    ADV_DCNT t1CF8, t1CFC;
-
-    ASC_DBG2(4, "asc_put_cfg_byte: type: %d, byte_data %x\n",
-        pciData->type, byte_data);
-
-    /*
-     * Check type of configuration mechanism.
-     */
-    if (pciData->type == 2) {
-
-        /*
-         * Save registers to be restored later.
-         */
-        t2CFA = inp(0xCFA);    /* save PCI bus register */
-        t2CF8 = inp(0xCF8);    /* save config space enable register */
-
-        /*
-         * Write bus and enable registers.
-         */
-        outp(0xCFA, pciData->bus);
-
-        /*
-         * Set the function number.
-         */
-        outp(0xCF8, 0x10 | (pciData->func << 1));
-
-        /*
-         * Write the configuration space type 2 locations.
-         */
-        outp(0xC000 | ((pciData->slot << 8) + pciData->offset), byte_data);
-
-        /*
-         * Restore registers.
-         */
-        outp(0xCF8, t2CF8);    /* restore the enable register */
-        outp(0xCFA, t2CFA);    /* restore PCI bus register    */
-    } else {
-
-        /*
-         * Type 1 or 3 configuration mechanism.
-         *
-         * Save the CONFIG_ADDRESS and CONFIG_DATA register values.
-         */
-        t1CF8 = inpl(0xCF8);
-        t1CFC = inpl(0xCFC);
-
-        /*
-         * enable <31>, bus = <23:16>, slot = <15:11>, func = <10:8>,
-         * reg = <7:2>
-         */
-        address = (ADV_DCNT) ((lbus << 16) | (lslot << 11) | (lfunc << 8) |
-                (pciData->offset & 0xFC) | 0x80000000L);
-        /*
-         * Write out address to CONFIG_ADDRESS.
-         */
-        outpl(0xCF8, address);
-
-        /*
-         * Write double word to CONFIG_DATA preserving the bytes
-         * in the double not written.
-         */
-        tmpl = inpl(0xCFC) & ~(0xFF << ((pciData->offset & 3) * 8));
-        outpl(0xCFC, tmpl | (byte_data << ((pciData->offset & 3) * 8)));
-
-        /*
-         * Restore registers.
-         */
-        outpl(0xCF8, t1CF8);
-        outpl(0xCFC, t1CFC);
-    }
-    ASC_DBG(4, "asc_put_cfg_byte: end\n");
-}
-#endif /* ASC_CONFIG_PCI */
-#endif /* version < v2.1.93 */
-
 /*
  * Add a 'REQP' to the end of specified queue. Set 'tidmask'
  * to indicate a command is queued for the device.
@@ -8422,9 +7507,8 @@
 {
     int        tid;
 
-    ASC_DBG3(3, "asc_enqueue: ascq %lx, reqp %lx, flag %d\n",
+    ASC_DBG3(3, "asc_enqueue: ascq 0x%lx, reqp 0x%lx, flag %d\n",
         (ulong) ascq, (ulong) reqp, flag);
-    ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
     ASC_ASSERT(reqp != NULL);
     ASC_ASSERT(flag == ASC_FRONT || flag == ASC_BACK);
     tid = REQPTID(reqp);
@@ -8460,7 +7544,7 @@
     }
     REQPTIME(reqp) = REQTIMESTAMP();
 #endif /* ADVANSYS_STATS */
-    ASC_DBG1(3, "asc_enqueue: reqp %lx\n", (ulong) reqp);
+    ASC_DBG1(3, "asc_enqueue: reqp 0x%lx\n", (ulong) reqp);
     return;
 }
 
@@ -8476,8 +7560,7 @@
 {
     REQP    reqp;
 
-    ASC_DBG2(3, "asc_dequeue: ascq %lx, tid %d\n", (ulong) ascq, tid);
-    ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
+    ASC_DBG2(3, "asc_dequeue: ascq 0x%lx, tid %d\n", (ulong) ascq, tid);
     ASC_ASSERT(tid >= 0 && tid <= ADV_MAX_TID);
     if ((reqp = ascq->q_first[tid]) != NULL) {
         ASC_ASSERT(ascq->q_tidmask & ADV_TID_TO_TIDMASK(tid));
@@ -8495,7 +7578,7 @@
         REQTIMESTAT("asc_dequeue", ascq, reqp, tid);
 #endif /* ADVANSYS_STATS */
     }
-    ASC_DBG1(3, "asc_dequeue: reqp %lx\n", (ulong) reqp);
+    ASC_DBG1(3, "asc_dequeue: reqp 0x%lx\n", (ulong) reqp);
     return reqp;
 }
 
@@ -8503,7 +7586,7 @@
  * Return a pointer to a singly linked list of all the requests queued
  * for 'tid' on the 'asc_queue_t' pointed to by 'ascq'.
  *
- * If 'lastpp' is not NULL, '*lastpp' will be set to point to the 
+ * If 'lastpp' is not NULL, '*lastpp' will be set to point to the
  * the last request returned in the singly linked list.
  *
  * 'tid' should either be a valid target id or if it is ASC_TID_ALL,
@@ -8525,8 +7608,7 @@
     REQP    firstp, lastp;
     int     i;
 
-    ASC_DBG2(3, "asc_dequeue_list: ascq %lx, tid %d\n", (ulong) ascq, tid);
-    ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
+    ASC_DBG2(3, "asc_dequeue_list: ascq 0x%lx, tid %d\n", (ulong) ascq, tid);
     ASC_ASSERT((tid == ASC_TID_ALL) || (tid >= 0 && tid <= ADV_MAX_TID));
 
     /*
@@ -8586,7 +7668,7 @@
     if (lastpp) {
         *lastpp = lastp;
     }
-    ASC_DBG1(3, "asc_dequeue_list: firstp %lx\n", (ulong) firstp);
+    ASC_DBG1(3, "asc_dequeue_list: firstp 0x%lx\n", (ulong) firstp);
     return firstp;
 }
 
@@ -8607,9 +7689,8 @@
     int         tid;
     int         ret = ASC_FALSE;
 
-    ASC_DBG2(3, "asc_rmqueue: ascq %lx, reqp %lx\n",
+    ASC_DBG2(3, "asc_rmqueue: ascq 0x%lx, reqp 0x%lx\n",
         (ulong) ascq, (ulong) reqp);
-    ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
     ASC_ASSERT(reqp != NULL);
 
     tid = REQPTID(reqp);
@@ -8660,37 +7741,7 @@
     }
     ASC_ASSERT(ascq->q_cur_cnt[tid] >= 0);
 #endif /* ADVANSYS_STATS */
-    ASC_DBG2(3, "asc_rmqueue: reqp %lx, ret %d\n", (ulong) reqp, ret);
-    return ret;
-}
-
-/*
- * If the specified 'REQP' is queued on the specified queue for
- * the specified target device, return ASC_TRUE.
- */
-STATIC int
-asc_isqueued(asc_queue_t *ascq, REQP reqp)
-{
-    REQP        treqp;
-    int            tid;
-    int            ret = ASC_FALSE;
-
-    ASC_DBG2(3, "asc_isqueued: ascq %lx, reqp %lx\n",
-        (ulong) ascq, (ulong) reqp);
-    ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
-    ASC_ASSERT(reqp != NULL);
-
-    tid = REQPTID(reqp);
-    ASC_ASSERT(tid >= 0 && tid <= ADV_MAX_TID);
-
-    for (treqp = ascq->q_first[tid]; treqp; treqp = REQPNEXT(treqp)) {
-        ASC_ASSERT(ascq->q_tidmask & ADV_TID_TO_TIDMASK(tid));
-        if (treqp == reqp) {
-            ret = ASC_TRUE;
-            break;
-        }
-    }
-    ASC_DBG1(3, "asc_isqueued: ret %x\n", ret);
+    ASC_DBG2(3, "asc_rmqueue: reqp 0x%lx, ret %d\n", (ulong) reqp, ret);
     return ret;
 }
 
@@ -8706,8 +7757,7 @@
     REQP                    reqp;
     int                     i;
 
-    ASC_DBG1(1, "asc_execute_queue: ascq %lx\n", (ulong) ascq);
-    ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE);
+    ASC_DBG1(1, "asc_execute_queue: ascq 0x%lx\n", (ulong) ascq);
     /*
      * Execute queued commands for devices attached to
      * the current board in round-robin fashion.
@@ -8721,7 +7771,10 @@
                 } else if (asc_execute_scsi_cmnd((Scsi_Cmnd *) reqp)
                             == ASC_BUSY) {
                     scan_tidmask &= ~ADV_TID_TO_TIDMASK(i);
-                    /* Put the request back at front of the list. */
+                    /*
+                     * The request returned ASC_BUSY. Enqueue at the front of
+                     * target's waiting list to maintain correct ordering.
+                     */
                     asc_enqueue(ascq, reqp, ASC_FRONT);
                 }
             }
@@ -8730,7 +7783,7 @@
     return;
 }
 
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0)
+#ifdef CONFIG_PROC_FS
 /*
  * asc_prt_board_devices()
  *
@@ -8810,7 +7863,7 @@
 "BIOS either disabled or Pre-3.1. If it is pre-3.1, then a newer version\n");
         ASC_PRT_NEXT();
         len = asc_prt_line(cp, leftlen,
-"can be found at the AdvanSys FTP site: ftp://ftp.advansys.com/pub\n");
+"can be found at the ConnectCom FTP site: ftp://ftp.connectcom.net/pub\n");
         ASC_PRT_NEXT();
     } else {
         major = (boardp->bios_version >> 12) & 0xF;
@@ -8829,10 +7882,10 @@
         if (major < 3 || (major <= 3 && minor < 1) ||
             (major <= 3 && minor <= 1 && letter < ('I'- 'A'))) {
             len = asc_prt_line(cp, leftlen,
-"Newer version of ROM BIOS is available at the AdvanSys FTP site:\n");
+"Newer version of ROM BIOS is available at the ConnectCom FTP site:\n");
             ASC_PRT_NEXT();
             len = asc_prt_line(cp, leftlen,
-"ftp://ftp.advansys.com/pub\n");
+"ftp://ftp.connectcom.net/pub\n");
             ASC_PRT_NEXT();
         }
     }
@@ -8960,7 +8013,9 @@
     int                len;
     ASCEEP_CONFIG      *ep;
     int                i;
+#ifdef CONFIG_ISA
     int                isa_dma_speed[] = { 10, 8, 7, 6, 5, 4, 3, 2 };
+#endif /* CONFIG_ISA */
     uchar              serialstr[13];
 
     boardp = ASC_BOARDP(shp);
@@ -8992,11 +8047,11 @@
 
     len = asc_prt_line(cp, leftlen,
 " Host SCSI ID: %u, Host Queue Size: %u, Device Queue Size: %u\n",
-        ep->chip_scsi_id, ep->max_total_qng, ep->max_tag_qng);
+        ASC_EEP_GET_CHIP_ID(ep), ep->max_total_qng, ep->max_tag_qng);
     ASC_PRT_NEXT();
 
     len = asc_prt_line(cp, leftlen,
-" cntl %x, no_scam %x\n",
+" cntl 0x%x, no_scam 0x%x\n",
         ep->cntl, ep->no_scam);
     ASC_PRT_NEXT();
 
@@ -9054,12 +8109,14 @@
     len = asc_prt_line(cp, leftlen, "\n");
     ASC_PRT_NEXT();
 
+#ifdef CONFIG_ISA
     if (asc_dvc_varp->bus_type & ASC_IS_ISA) {
         len = asc_prt_line(cp, leftlen,
 " Host ISA DMA speed:   %d MB/S\n",
-            isa_dma_speed[ep->isa_dma_speed]);
+            isa_dma_speed[ASC_EEP_GET_DMA_SPD(ep)]);
         ASC_PRT_NEXT();
     }
+#endif /* CONFIG_ISA */
 
      return totlen;
 }
@@ -9088,6 +8145,7 @@
     uchar                       serialstr[13];
     ADVEEP_3550_CONFIG          *ep_3550 = NULL;
     ADVEEP_38C0800_CONFIG       *ep_38C0800 = NULL;
+    ADVEEP_38C1600_CONFIG       *ep_38C1600 = NULL;
     ushort                      word;
     ushort                      *wordp;
     ushort                      sdtr_speed = 0;
@@ -9097,9 +8155,12 @@
     if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550)
     {
         ep_3550 = &boardp->eep_config.adv_3550_eep;
-    } else
+    } else if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800)
     {
         ep_38C0800 = &boardp->eep_config.adv_38C0800_eep;
+    } else
+    {
+        ep_38C1600 = &boardp->eep_config.adv_38C1600_eep;
     }
 
     leftlen = cplen;
@@ -9112,9 +8173,12 @@
     if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550)
     {
         wordp = &ep_3550->serial_number_word1;
-    } else
+    } else if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800)
     {
         wordp = &ep_38C0800->serial_number_word1;
+    } else
+    {
+        wordp = &ep_38C1600->serial_number_word1;
     }
 
     if (asc_get_eeprom_string(wordp, serialstr) == ASC_TRUE) {
@@ -9133,20 +8197,30 @@
             ep_3550->adapter_scsi_id, ep_3550->max_host_qng,
             ep_3550->max_dvc_qng);
         ASC_PRT_NEXT();
-    } else
+    } else if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800)
     {
         len = asc_prt_line(cp, leftlen,
 " Host SCSI ID: %u, Host Queue Size: %u, Device Queue Size: %u\n",
             ep_38C0800->adapter_scsi_id, ep_38C0800->max_host_qng,
             ep_38C0800->max_dvc_qng);
         ASC_PRT_NEXT();
+    } else
+    {
+        len = asc_prt_line(cp, leftlen,
+" Host SCSI ID: %u, Host Queue Size: %u, Device Queue Size: %u\n",
+            ep_38C1600->adapter_scsi_id, ep_38C1600->max_host_qng,
+            ep_38C1600->max_dvc_qng);
+        ASC_PRT_NEXT();
     }
     if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550)
     {
         word = ep_3550->termination;
-    } else
+    } else if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800)
     {
         word = ep_38C0800->termination_lvd;
+    } else
+    {
+        word = ep_38C1600->termination_lvd;
     }
     switch (word) {
         case 1:
@@ -9167,15 +8241,21 @@
     if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550)
     {
         len = asc_prt_line(cp, leftlen,
-" termination: %u (%s), bios_ctrl: %x\n",
+" termination: %u (%s), bios_ctrl: 0x%x\n",
             ep_3550->termination, termstr, ep_3550->bios_ctrl);
         ASC_PRT_NEXT();
-    } else
+    } else if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800)
     {
         len = asc_prt_line(cp, leftlen,
-" termination: %u (%s), bios_ctrl: %x\n",
+" termination: %u (%s), bios_ctrl: 0x%x\n",
             ep_38C0800->termination_lvd, termstr, ep_38C0800->bios_ctrl);
         ASC_PRT_NEXT();
+    } else
+    {
+        len = asc_prt_line(cp, leftlen,
+" termination: %u (%s), bios_ctrl: 0x%x\n",
+            ep_38C1600->termination_lvd, termstr, ep_38C1600->bios_ctrl);
+        ASC_PRT_NEXT();
     }
 
     len = asc_prt_line(cp, leftlen,
@@ -9191,9 +8271,12 @@
     if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550)
     {
         word = ep_3550->disc_enable;
-    } else
+    } else if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800)
     {
         word = ep_38C0800->disc_enable;
+    } else
+    {
+        word = ep_38C1600->disc_enable;
     }
     len = asc_prt_line(cp, leftlen,
 " Disconnects:         ");
@@ -9209,9 +8292,12 @@
     if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550)
     {
         word = ep_3550->tagqng_able;
-    } else
+    } else if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800)
     {
         word = ep_38C0800->tagqng_able;
+    } else
+    {
+        word = ep_38C1600->tagqng_able;
     }
     len = asc_prt_line(cp, leftlen,
 " Command Queuing:     ");
@@ -9227,9 +8313,12 @@
     if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550)
     {
         word = ep_3550->start_motor;
-    } else
+    } else if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800)
     {
         word = ep_38C0800->start_motor;
+    } else
+    {
+        word = ep_38C1600->start_motor;
     }
     len = asc_prt_line(cp, leftlen,
 " Start Motor:         ");
@@ -9273,9 +8362,12 @@
     if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550)
     {
         word = ep_3550->wdtr_able;
-    } else
+    } else if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800)
     {
         word = ep_38C0800->wdtr_able;
+    } else
+    {
+        word = ep_38C1600->wdtr_able;
     }
     len = asc_prt_line(cp, leftlen,
 " Wide Transfer:       ");
@@ -9288,7 +8380,8 @@
     len = asc_prt_line(cp, leftlen, "\n");
     ASC_PRT_NEXT();
 
-    if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800)
+    if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800 ||
+        adv_dvc_varp->chip_type == ADV_CHIP_ASC38C1600)
     {
         len = asc_prt_line(cp, leftlen,
 " Synchronous Transfer Speed (Mhz):\n  ");
@@ -9352,9 +8445,7 @@
     int                    totlen;
     int                    len;
     int                    chip_scsi_id;
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
     int                    i;
-#endif /* version >= v1.3.89 */
 
     boardp = ASC_BOARDP(shp);
 
@@ -9367,39 +8458,31 @@
     ASC_PRT_NEXT();
 
     len = asc_prt_line(cp, leftlen,
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,89)
-" host_busy %u, last_reset %u, max_id %u, max_lun %u\n",
-        shp->host_busy, shp->last_reset, shp->max_id, shp->max_lun);
-#else /* version >= v1.3.89 */
 " host_busy %u, last_reset %u, max_id %u, max_lun %u, max_channel %u\n",
         shp->host_busy, shp->last_reset, shp->max_id, shp->max_lun,
         shp->max_channel);
-#endif /* version >= v1.3.89 */
     ASC_PRT_NEXT();
-    
+
     len = asc_prt_line(cp, leftlen,
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,57)
-" can_queue %d, this_id %d, sg_tablesize %u, cmd_per_lun %u\n",
-        shp->can_queue, shp->this_id, shp->sg_tablesize, shp->cmd_per_lun);
-#else /* version >= v1.3.57 */
 " unique_id %d, can_queue %d, this_id %d, sg_tablesize %u, cmd_per_lun %u\n",
         shp->unique_id, shp->can_queue, shp->this_id, shp->sg_tablesize,
         shp->cmd_per_lun);
-#endif /* version >= v1.3.57 */
     ASC_PRT_NEXT();
 
     len = asc_prt_line(cp, leftlen,
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,57)
-" unchecked_isa_dma %d, loaded_as_module %d\n",
-        shp->unchecked_isa_dma, shp->loaded_as_module);
-#else /* version >= v1.3.57 */
 " unchecked_isa_dma %d, use_clustering %d, loaded_as_module %d\n",
         shp->unchecked_isa_dma, shp->use_clustering, shp->loaded_as_module);
-#endif /* version >= v1.3.57 */
     ASC_PRT_NEXT();
 
-    len = asc_prt_line(cp, leftlen, " flags %x, last_reset %x, jiffies %x\n",
-        boardp->flags, boardp->last_reset, jiffies);
+    len = asc_prt_line(cp, leftlen,
+" flags 0x%x, last_reset 0x%x, jiffies 0x%x, asc_n_io_port 0x%x\n",
+        boardp->flags, boardp->last_reset, jiffies, boardp->asc_n_io_port);
+    ASC_PRT_NEXT();
+
+     /* 'shp->n_io_port' may be truncated because it is only one byte. */
+    len = asc_prt_line(cp, leftlen,
+" io_port 0x%x, n_io_port 0x%x\n",
+        shp->io_port, shp->n_io_port);
     ASC_PRT_NEXT();
 
     if (ASC_NARROW_BOARD(boardp)) {
@@ -9408,7 +8491,6 @@
         chip_scsi_id = boardp->dvc_var.adv_dvc_var.chip_scsi_id;
     }
 
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
     if (boardp->flags & ASC_SELECT_QUEUE_DEPTHS) {
         len = asc_prt_line(cp, leftlen, " queue_depth:");
         ASC_PRT_NEXT();
@@ -9427,7 +8509,6 @@
         len = asc_prt_line(cp, leftlen, "\n");
         ASC_PRT_NEXT();
     }
-#endif /* version >= v1.3.89 */
 
     return totlen;
 }
@@ -9470,12 +8551,12 @@
     ASC_PRT_NEXT();
 
     len = asc_prt_line(cp, leftlen,
-" chip_version %u, lib_version %x, lib_serial_no %u, mcode_date %x\n",
+" chip_version %u, lib_version 0x%x, lib_serial_no %u, mcode_date 0x%x\n",
         c->chip_version, c->lib_version, c->lib_serial_no, c->mcode_date);
     ASC_PRT_NEXT();
 
     len = asc_prt_line(cp, leftlen,
-" mcode_version %x, err_code %u\n",
+" mcode_version 0x%x, err_code %u\n",
          c->mcode_version, v->err_code);
     ASC_PRT_NEXT();
 
@@ -9663,14 +8744,14 @@
     ASC_PRT_NEXT();
 
     len = asc_prt_line(cp, leftlen,
-" iop_base %lx, cable_detect: %X, err_code %u\n",
+" iop_base 0x%lx, cable_detect: %X, err_code %u\n",
          v->iop_base,
          AdvReadWordRegister(iop_base, IOPW_SCSI_CFG1) & CABLE_DETECT,
          v->err_code);
     ASC_PRT_NEXT();
 
     len = asc_prt_line(cp, leftlen,
-" chip_version %u, lib_version %x, mcode_date %x, mcode_version %x\n",
+" chip_version %u, lib_version 0x%x, mcode_date 0x%x, mcode_version 0x%x\n",
         c->chip_version, c->lib_version, c->mcode_date, c->mcode_version);
     ASC_PRT_NEXT();
 
@@ -9862,7 +8943,7 @@
 }
 
 /*
- * asc_proc_copy() 
+ * asc_proc_copy()
  *
  * Copy proc information to a read buffer taking into account the current
  * read offset in the file and the remaining space in the read buffer.
@@ -9872,13 +8953,13 @@
               char *cp, int cplen)
 {
     int cnt = 0;
-    
+
     ASC_DBG3(2, "asc_proc_copy: offset %d, advoffset %d, cplen %d\n",
             (unsigned) offset, (unsigned) advoffset, cplen);
     if (offset <= advoffset) {
         /* Read offset below current offset, copy everything. */
         cnt = ASC_MIN(cplen, leftlen);
-        ASC_DBG3(2, "asc_proc_copy: curbuf %lx, cp %lx, cnt %d\n",
+        ASC_DBG3(2, "asc_proc_copy: curbuf 0x%lx, cp 0x%lx, cnt %d\n",
                 (ulong) curbuf, (ulong) cp, cnt);
         memcpy(curbuf, cp, cnt);
     } else if (offset < advoffset + cplen) {
@@ -9886,7 +8967,7 @@
         cnt = (advoffset + cplen) - offset;
         cp = (cp + cplen) - cnt;
         cnt = ASC_MIN(cnt, leftlen);
-        ASC_DBG3(2, "asc_proc_copy: curbuf %lx, cp %lx, cnt %d\n",
+        ASC_DBG3(2, "asc_proc_copy: curbuf 0x%lx, cp 0x%lx, cnt %d\n",
                 (ulong) curbuf, (ulong) cp, cnt);
         memcpy(curbuf, cp, cnt);
     }
@@ -9924,7 +9005,7 @@
     va_end(args);
     return ret;
 }
-#endif /* version >= v1.3.0 */
+#endif /* CONFIG_PROC_FS */
 
 
 /*
@@ -9940,56 +9021,33 @@
 STATIC void
 DvcSleepMilliSecond(ADV_DCNT n)
 {
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,0)
-    ADV_DCNT i;
-#endif /* version < v2.1.0 */ 
-
     ASC_DBG1(4, "DvcSleepMilliSecond: %lu\n", (ulong) n);
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,0)
     mdelay(n);
-#else /* version < v2.1.0 */ 
-    for (i = 0; i < n; i++) {
-        udelay(1000);
-    }
-#endif /* version < v2.1.0 */ 
 }
 
-STATIC int
+/*
+ * Currently and inline noop but leave as a placeholder.
+ * Leave DvcEnterCritical() as a noop placeholder.
+ */
+STATIC inline ulong
 DvcEnterCritical(void)
 {
-    int    flags;
-
-    save_flags(flags);
-    cli();
-    return flags;
+    return 0;
 }
 
-STATIC void
-DvcLeaveCritical(int flags)
+/*
+ * Critical sections are all protected by the board spinlock.
+ * Leave DvcLeaveCritical() as a noop placeholder.
+ */
+STATIC inline void
+DvcLeaveCritical(ulong flags)
 {
-    restore_flags(flags);
-}
-
-STATIC ADV_DCNT
-DvcGetSGList(ASC_DVC_VAR *asc_dvc_sg, uchar *buf_addr, ADV_DCNT buf_len,
-             ASC_SG_HEAD *asc_sg_head_ptr)
-{
-    ADV_DCNT buf_size;
-
-    buf_size = buf_len;
-    asc_sg_head_ptr->entry_cnt = 1;
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
-    asc_sg_head_ptr->sg_list[0].addr = (ADV_PADDR) buf_addr;
-#else /* version >= v2.0.0 */
-    asc_sg_head_ptr->sg_list[0].addr = virt_to_bus(buf_addr);
-#endif /* version >= v2.0.0 */
-    asc_sg_head_ptr->sg_list[0].bytes = buf_size;
-    return buf_size;
+    return;
 }
 
 /*
  * void
- * DvcPutScsiQ(PortAddr iop_base, ushort s_addr, ushort *outbuf, int words)
+ * DvcPutScsiQ(PortAddr iop_base, ushort s_addr, uchar *outbuf, int words)
  *
  * Calling/Exit State:
  *    none
@@ -9998,23 +9056,24 @@
  *     Output an ASC_SCSI_Q structure to the chip
  */
 STATIC void
-DvcPutScsiQ(PortAddr iop_base, ushort s_addr, ushort *outbuf, int words)
+DvcPutScsiQ(PortAddr iop_base, ushort s_addr, uchar *outbuf, int words)
 {
     int    i;
 
-    ASC_DBG_PRT_HEX(2, "DvcPutScsiQ", (uchar *) outbuf, 2 * words);
+    ASC_DBG_PRT_HEX(2, "DvcPutScsiQ", outbuf, 2 * words);
     AscSetChipLramAddr(iop_base, s_addr);
-    for (i = 0; i < words; i++, outbuf++) {
-        if (i == 2 || i == 10) {
+    for (i = 0; i < 2 * words; i += 2) {
+        if (i == 4 || i == 20) {
             continue;
         }
-        AscSetChipLramDataNoSwap(iop_base, *outbuf);
+        outpw(iop_base + IOP_RAM_DATA,
+            ((ushort) outbuf[i + 1] << 8) | outbuf[i]);
     }
 }
 
 /*
  * void
- * DvcGetQinfo(PortAddr iop_base, ushort s_addr, ushort *inbuf, int words)
+ * DvcGetQinfo(PortAddr iop_base, ushort s_addr, uchar *inbuf, int words)
  *
  * Calling/Exit State:
  *    none
@@ -10023,79 +9082,21 @@
  *     Input an ASC_QDONE_INFO structure from the chip
  */
 STATIC void
-DvcGetQinfo(PortAddr iop_base, ushort s_addr, ushort *inbuf, int words)
+DvcGetQinfo(PortAddr iop_base, ushort s_addr, uchar *inbuf, int words)
 {
     int    i;
+    ushort word;
 
     AscSetChipLramAddr(iop_base, s_addr);
-    for (i = 0; i < words; i++, inbuf++) {
-        if (i == 5) {
+    for (i = 0; i < 2 * words; i += 2) {
+        if (i == 10) {
             continue;
         }
-        *inbuf = AscGetChipLramDataNoSwap(iop_base);
-    }
-    ASC_DBG_PRT_HEX(2, "DvcGetQinfo", (uchar *) inbuf, 2 * words);
-}
-
-/*
- * void    DvcOutPortWords(ushort iop_base, ushort &outbuf, int words)
- *
- * Calling/Exit State:
- *    none
- *
- * Description:
- *     output a buffer to an i/o port address
- */
-STATIC void
-DvcOutPortWords(ushort iop_base, ushort *outbuf, int words)
-{
-    int    i;
-
-    for (i = 0; i < words; i++, outbuf++)
-        outpw(iop_base, *outbuf);
-}
-
-/*
- * void    DvcInPortWords(ushort iop_base, ushort &outbuf, int words)
- *
- * Calling/Exit State:
- *    none
- *
- * Description:
- *     input a buffer from an i/o port address
- */
-STATIC void
-DvcInPortWords(ushort iop_base, ushort *inbuf, int words)
-{
-    int    i;
-
-    for (i = 0; i < words; i++, inbuf++)
-        *inbuf = inpw(iop_base);
-}
-
-/*
- * void DvcOutPortDWords(PortAddr port, ADV_DCNT *pdw, int dwords)
- *
- * Calling/Exit State:
- *    none
- *
- * Description:
- *     output a buffer of 32-bit integers to an i/o port address in
- *  16 bit integer units
- */
-STATIC void  
-DvcOutPortDWords(PortAddr port, ADV_DCNT *pdw, int dwords)
-{
-    int       i;
-    int       words;
-    ushort    *pw;
-
-    pw = (ushort *) pdw;
-    words = dwords << 1;
-    for(i = 0; i < words; i++, pw++) {
-        outpw(port, *pw);
+        word = inpw(iop_base + IOP_RAM_DATA);
+        inbuf[i] = word & 0xff;
+        inbuf[i + 1] = (word >> 8) & 0xff;
     }
-    return;
+    ASC_DBG_PRT_HEX(2, "DvcGetQinfo", inbuf, 2 * words);
 }
 
 /*
@@ -10104,24 +9105,10 @@
 ASC_INITFUNC(
 STATIC uchar,
 DvcReadPCIConfigByte(
-        ASC_DVC_VAR *asc_dvc, 
+        ASC_DVC_VAR *asc_dvc,
         ushort offset)
 )
 {
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
-    PCI_DATA    pciData;
-
-    pciData.bus = ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info);
-    pciData.slot = ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info);
-    pciData.func = ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info);
-    pciData.offset = offset;
-    pciData.type = pci_scan_method;
-    return asc_get_cfg_byte(&pciData);
-#else /* ASC_CONFIG_PCI */
-    return 0;
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */ 
 #ifdef CONFIG_PCI
     uchar byte_data;
     pcibios_read_config_byte(ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info),
@@ -10129,10 +9116,9 @@
             ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info)),
         offset, &byte_data);
     return byte_data;
-#else /* CONFIG_PCI */
+#else /* !defined(CONFIG_PCI) */
     return 0;
-#endif /* CONFIG_PCI */
-#endif /* version >= v2.1.93 */ 
+#endif /* !defined(CONFIG_PCI) */
 }
 
 /*
@@ -10141,30 +9127,17 @@
 ASC_INITFUNC(
 STATIC void,
 DvcWritePCIConfigByte(
-        ASC_DVC_VAR *asc_dvc, 
-        ushort offset, 
+        ASC_DVC_VAR *asc_dvc,
+        ushort offset,
         uchar  byte_data)
 )
 {
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
-    PCI_DATA    pciData;
-
-    pciData.bus = ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info);
-    pciData.slot = ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info);
-    pciData.func = ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info);
-    pciData.offset = offset;
-    pciData.type = pci_scan_method;
-    asc_put_cfg_byte(&pciData, byte_data);
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */ 
 #ifdef CONFIG_PCI
     pcibios_write_config_byte(ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info),
         PCI_DEVFN(ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info),
             ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info)),
         offset, byte_data);
 #endif /* CONFIG_PCI */
-#endif /* version >= v2.1.93 */ 
 }
 
 /*
@@ -10192,6 +9165,7 @@
         return(0);
     }
 
+#ifdef CONFIG_ISA
     if((bus_type & ASC_IS_EISA) != 0)
     {
         cfg_lsw = AscGetEisaChipCfg(iop_base);
@@ -10200,6 +9174,7 @@
                                 (cfg_lsw * ASC_BIOS_BANK_SIZE));
         return(bios_addr);
     }/* if */
+#endif /* CONFIG_ISA */
 
     cfg_lsw = AscGetChipCfgLsw(iop_base);
 
@@ -10238,14 +9213,10 @@
 {
     ADV_PADDR           paddr;
 
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0)
-    paddr = (ADV_PADDR) vaddr;
-#else /* version >= v2.0.0 */
     paddr = virt_to_bus(vaddr);
-#endif /* version >= v2.0.0 */
 
     ASC_DBG4(4,
-        "DvcGetPhyAddr: vaddr 0x%lx, lenp 0x%lx *lenp %lu, paddr 0x%lx\n", 
+        "DvcGetPhyAddr: vaddr 0x%lx, lenp 0x%lx *lenp %lu, paddr 0x%lx\n",
         (ulong) vaddr, (ulong) lenp, (ulong) *((ulong *) lenp), (ulong) paddr);
 
     return paddr;
@@ -10257,24 +9228,10 @@
 ASC_INITFUNC(
 STATIC uchar,
 DvcAdvReadPCIConfigByte(
-        ADV_DVC_VAR *asc_dvc, 
+        ADV_DVC_VAR *asc_dvc,
         ushort offset)
 )
 {
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
-    PCI_DATA    pciData;
-
-    pciData.bus = ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info);
-    pciData.slot = ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info);
-    pciData.func = ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info);
-    pciData.offset = offset;
-    pciData.type = pci_scan_method;
-    return asc_get_cfg_byte(&pciData);
-#else /* ASC_CONFIG_PCI */
-    return 0;
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */ 
 #ifdef CONFIG_PCI
     uchar byte_data;
     pcibios_read_config_byte(ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info),
@@ -10285,7 +9242,6 @@
 #else /* CONFIG_PCI */
     return 0;
 #endif /* CONFIG_PCI */
-#endif /* version >= v2.1.93 */ 
 }
 
 /*
@@ -10294,30 +9250,19 @@
 ASC_INITFUNC(
 STATIC void,
 DvcAdvWritePCIConfigByte(
-        ADV_DVC_VAR *asc_dvc, 
-        ushort offset, 
+        ADV_DVC_VAR *asc_dvc,
+        ushort offset,
         uchar  byte_data)
 )
 {
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93)
-#ifdef ASC_CONFIG_PCI
-    PCI_DATA    pciData;
-
-    pciData.bus = ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info);
-    pciData.slot = ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info);
-    pciData.func = ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info);
-    pciData.offset = offset;
-    pciData.type = pci_scan_method;
-    asc_put_cfg_byte(&pciData, byte_data);
-#endif /* ASC_CONFIG_PCI */
-#else /* version >= v2.1.93 */ 
 #ifdef CONFIG_PCI
     pcibios_write_config_byte(ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info),
         PCI_DEVFN(ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info),
             ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info)),
         offset, byte_data);
+#else /* CONFIG_PCI */
+    return 0;
 #endif /* CONFIG_PCI */
-#endif /* version >= v2.1.93 */ 
 }
 
 /*
@@ -10325,6 +9270,7 @@
  */
 
 #ifdef ADVANSYS_STATS
+#ifdef CONFIG_PROC_FS
 /*
  * asc_prt_board_stats()
  *
@@ -10341,11 +9287,7 @@
     int                    totlen;
     int                    len;
     struct asc_stats       *s;
-    int                    i;
-    ushort                 chip_scsi_id;
     asc_board_t            *boardp;
-    asc_queue_t            *active;
-    asc_queue_t            *waiting;
 
     leftlen = cplen;
     totlen = len = 0;
@@ -10356,15 +9298,16 @@
     len = asc_prt_line(cp, leftlen,
 "\nLinux Driver Statistics for AdvanSys SCSI Host %d:\n", shp->host_no);
     ASC_PRT_NEXT();
-    
+
     len = asc_prt_line(cp, leftlen,
-" command %lu, queuecommand %lu, abort %lu, reset %lu, biosparam %lu\n",
-        s->command, s->queuecommand, s->abort, s->reset, s->biosparam);
+" queuecommand %lu, reset %lu, biosparam %lu, interrupt %lu\n",
+        s->queuecommand, s->reset, s->biosparam, s->interrupt);
     ASC_PRT_NEXT();
 
     len = asc_prt_line(cp, leftlen,
-" interrupt %lu, callback %lu, done %lu\n",
-        s->interrupt, s->callback, s->done);
+" callback %lu, done %lu, build_error %lu, build_noreq %lu, build_nosg %lu\n",
+        s->callback, s->done, s->build_error, s->adv_build_noreq,
+        s->adv_build_nosg);
     ASC_PRT_NEXT();
 
     len = asc_prt_line(cp, leftlen,
@@ -10372,17 +9315,6 @@
         s->exe_noerror, s->exe_busy, s->exe_error, s->exe_unknown);
     ASC_PRT_NEXT();
 
-    if (ASC_NARROW_BOARD(boardp)) {
-        len = asc_prt_line(cp, leftlen,
-" build_error %lu\n",
-         s->build_error);
-    } else {
-        len = asc_prt_line(cp, leftlen,
-" build_error %lu, build_noreq %lu, build_nosg %lu\n",
-         s->build_error, s->adv_build_noreq, s->adv_build_nosg);
-    }
-    ASC_PRT_NEXT();
-
     /*
      * Display data transfer statistics.
      */
@@ -10437,6 +9369,40 @@
 " Active and Waiting Request Queues (Time Unit: %d HZ):\n", HZ);
     ASC_PRT_NEXT();
 
+
+     return totlen;
+}
+
+/*
+ * asc_prt_target_stats()
+ *
+ * Note: no single line should be greater than ASC_PRTLINE_SIZE,
+ * cf. asc_prt_line().
+ *
+ * This is separated from asc_prt_board_stats because a full set
+ * of targets will overflow ASC_PRTBUF_SIZE.
+ *
+ * Return the number of characters copied into 'cp'. No more than
+ * 'cplen' characters will be copied to 'cp'.
+ */
+STATIC int
+asc_prt_target_stats(struct Scsi_Host *shp, int tgt_id, char *cp, int cplen)
+{
+    int                    leftlen;
+    int                    totlen;
+    int                    len;
+    struct asc_stats       *s;
+    ushort                 chip_scsi_id;
+    asc_board_t            *boardp;
+    asc_queue_t            *active;
+    asc_queue_t            *waiting;
+
+    leftlen = cplen;
+    totlen = len = 0;
+
+    boardp = ASC_BOARDP(shp);
+    s = &boardp->asc_stats;
+
     active = &ASC_BOARDP(shp)->active;
     waiting = &ASC_BOARDP(shp)->waiting;
 
@@ -10446,70 +9412,77 @@
         chip_scsi_id = boardp->dvc_var.adv_dvc_var.chip_scsi_id;
     }
 
-    for (i = 0; i <= ADV_MAX_TID; i++) {
-
-        if ((chip_scsi_id == i) ||
-            ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(i)) == 0)) {
-            continue;
-        }
+    if ((chip_scsi_id == tgt_id) ||
+        ((boardp->init_tidmask & ADV_TID_TO_TIDMASK(tgt_id)) == 0)) {
+        return 0;
+    }
 
-        if (active->q_tot_cnt[i] > 0 || waiting->q_tot_cnt[i] > 0) {
-            len = asc_prt_line(cp, leftlen, " target %d\n", i);
+    do {
+        if (active->q_tot_cnt[tgt_id] > 0 || waiting->q_tot_cnt[tgt_id] > 0) {
+            len = asc_prt_line(cp, leftlen, " target %d\n", tgt_id);
             ASC_PRT_NEXT();
 
             len = asc_prt_line(cp, leftlen,
 "   active: cnt [cur %d, max %d, tot %u], time [min %d, max %d, avg %lu.%01lu]\n",
-                active->q_cur_cnt[i], active->q_max_cnt[i],
-                active->q_tot_cnt[i],
-                active->q_min_tim[i], active->q_max_tim[i],
-                (active->q_tot_cnt[i] == 0) ? 0 :
-                (active->q_tot_tim[i]/active->q_tot_cnt[i]),
-                (active->q_tot_cnt[i] == 0) ? 0 :
-                ASC_TENTHS(active->q_tot_tim[i], active->q_tot_cnt[i]));
-            ASC_PRT_NEXT();
+                active->q_cur_cnt[tgt_id], active->q_max_cnt[tgt_id],
+                active->q_tot_cnt[tgt_id],
+                active->q_min_tim[tgt_id], active->q_max_tim[tgt_id],
+                (active->q_tot_cnt[tgt_id] == 0) ? 0 :
+                (active->q_tot_tim[tgt_id]/active->q_tot_cnt[tgt_id]),
+                (active->q_tot_cnt[tgt_id] == 0) ? 0 :
+                ASC_TENTHS(active->q_tot_tim[tgt_id],
+                active->q_tot_cnt[tgt_id]));
+             ASC_PRT_NEXT();
 
-            len = asc_prt_line(cp, leftlen,
+             len = asc_prt_line(cp, leftlen,
 "   waiting: cnt [cur %d, max %d, tot %u], time [min %u, max %u, avg %lu.%01lu]\n",
-                waiting->q_cur_cnt[i], waiting->q_max_cnt[i],
-                waiting->q_tot_cnt[i],
-                waiting->q_min_tim[i], waiting->q_max_tim[i],
-                (waiting->q_tot_cnt[i] == 0) ? 0 :
-                (waiting->q_tot_tim[i]/waiting->q_tot_cnt[i]),
-                (waiting->q_tot_cnt[i] == 0) ? 0 :
-                ASC_TENTHS(waiting->q_tot_tim[i], waiting->q_tot_cnt[i]));
-            ASC_PRT_NEXT();
+                waiting->q_cur_cnt[tgt_id], waiting->q_max_cnt[tgt_id],
+                waiting->q_tot_cnt[tgt_id],
+                waiting->q_min_tim[tgt_id], waiting->q_max_tim[tgt_id],
+                (waiting->q_tot_cnt[tgt_id] == 0) ? 0 :
+                (waiting->q_tot_tim[tgt_id]/waiting->q_tot_cnt[tgt_id]),
+                (waiting->q_tot_cnt[tgt_id] == 0) ? 0 :
+                ASC_TENTHS(waiting->q_tot_tim[tgt_id],
+                waiting->q_tot_cnt[tgt_id]));
+             ASC_PRT_NEXT();
         }
-    }
+    } while (0);
 
      return totlen;
 }
+#endif /* CONFIG_PROC_FS */
 #endif /* ADVANSYS_STATS */
 
 #ifdef ADVANSYS_DEBUG
 /*
  * asc_prt_scsi_host()
  */
-STATIC void 
+STATIC void
 asc_prt_scsi_host(struct Scsi_Host *s)
 {
     asc_board_t         *boardp;
 
     boardp = ASC_BOARDP(s);
 
-    printk("Scsi_Host at addr %lx\n", (ulong) s);
+    printk("Scsi_Host at addr 0x%lx\n", (ulong) s);
     printk(
-" next %lx, extra_bytes %u, host_busy %u, host_no %d, last_reset %d,\n",
+" next 0x%lx, extra_bytes %u, host_busy %u, host_no %d, last_reset %d,\n",
         (ulong) s->next, s->extra_bytes, s->host_busy, s->host_no,
         (unsigned) s->last_reset);
 
+#if ASC_LINUX_KERNEL24
+    printk(
+" host_queue 0x%lx, hostt 0x%lx\n",
+        (ulong) s->host_queue, (ulong) s->hostt);
+#elif ASC_LINUX_KERNEL22
     printk(
-" host_queue %lx, hostt %lx, block %lx,\n",
+" host_queue 0x%lx, hostt 0x%lx, block 0x%lx,\n",
         (ulong) s->host_queue, (ulong) s->hostt, (ulong) s->block);
+#endif
 
     printk(
-" base %lu, io_port %lu, n_io_port %u, irq %d,\n",
-	(ulong) s->base, (ulong) s->io_port, s->n_io_port,
-        s->irq);
+" base 0x%lx, io_port 0x%lx, n_io_port %u, irq 0x%x,\n",
+        (ulong) s->base, (ulong) s->io_port, s->n_io_port, s->irq);
 
     printk(
 " dma_channel %d, this_id %d, can_queue %d,\n",
@@ -10532,49 +9505,49 @@
 /*
  * asc_prt_scsi_cmnd()
  */
-STATIC void 
+STATIC void
 asc_prt_scsi_cmnd(Scsi_Cmnd *s)
 {
-    printk("Scsi_Cmnd at addr %lx\n", (ulong) s);
+    printk("Scsi_Cmnd at addr 0x%lx\n", (ulong) s);
 
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0)
     printk(
-" host %x, device %x, target %u, lun %u\n",
-        (unsigned) s->host, (unsigned) s->device, s->target, s->lun);
-#else /* version >= v1.3.0 */
-    printk(
-" host %lx, device %lx, target %u, lun %u, channel %u,\n",
+" host 0x%lx, device 0x%lx, target %u, lun %u, channel %u,\n",
         (ulong) s->host, (ulong) s->device, s->target, s->lun,
         s->channel);
-#endif /* version >= v1.3.0 */
 
     asc_prt_hex(" CDB", s->cmnd, s->cmd_len);
 
+#if ASC_LINUX_KERNEL24
+    printk (
+"sc_data_direction %u, resid %d\n",
+        s->sc_data_direction, s->resid);
+#endif
+
     printk(
-" use_sg %u, sglist_len %u, abort_reason %x\n",
+" use_sg %u, sglist_len %u, abort_reason 0x%x\n",
         s->use_sg, s->sglist_len, s->abort_reason);
 
-#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,89)
-    printk(
-" retries %d, allowed %d\n",
-         s->retries, s->allowed);
-#else /* version >= v1.3.89 */
     printk(
-" serial_number %x, serial_number_at_timeout %x, retries %d, allowed %d\n",
+" serial_number 0x%x, serial_number_at_timeout 0x%x, retries %d, allowed %d\n",
         (unsigned) s->serial_number, (unsigned) s->serial_number_at_timeout,
          s->retries, s->allowed);
-#endif /* version >= v1.3.89 */
 
     printk(
 " timeout_per_command %d, timeout_total %d, timeout %d\n",
         s->timeout_per_command, s->timeout_total, s->timeout);
 
+#if ASC_LINUX_KERNEL24
+    printk(
+" internal_timeout %u, flags %u\n",
+        s->internal_timeout, s->flags);
+#elif ASC_LINUX_KERNEL22
     printk(
 " internal_timeout %u, flags %u, this_count %d\n",
-        s->internal_timeout, s->flags, s->this_count);
+        s->internal_timeout, s->flags,s->this_count);
+#endif
 
     printk(
-" scsi_done %lx, done %lx, host_scribble %lx, result %x\n",
+" scsi_done 0x%lx, done 0x%lx, host_scribble 0x%lx, result 0x%x\n",
         (ulong) s->scsi_done, (ulong) s->done,
         (ulong) s->host_scribble, s->result);
 
@@ -10586,57 +9559,59 @@
 /*
  * asc_prt_asc_dvc_var()
  */
-STATIC void 
+STATIC void
 asc_prt_asc_dvc_var(ASC_DVC_VAR *h)
 {
-    printk("ASC_DVC_VAR at addr %lx\n", (ulong) h);
+    printk("ASC_DVC_VAR at addr 0x%lx\n", (ulong) h);
 
     printk(
-" iop_base %x, err_code %x, dvc_cntl %x, bug_fix_cntl %d,\n",
+" iop_base 0x%x, err_code 0x%x, dvc_cntl 0x%x, bug_fix_cntl %d,\n",
         h->iop_base, h->err_code, h->dvc_cntl, h->bug_fix_cntl);
 
     printk(
-" bus_type %d, isr_callback %lx, exe_callback %lx, init_sdtr %x,\n",
+" bus_type %d, isr_callback 0x%lx, exe_callback 0x%lx, init_sdtr 0x%x,\n",
         h->bus_type, (ulong) h->isr_callback, (ulong) h->exe_callback,
         (unsigned) h->init_sdtr);
 
     printk(
-" sdtr_done %x, use_tagged_qng %x, unit_not_ready %x, chip_no %x,\n",
+" sdtr_done 0x%x, use_tagged_qng 0x%x, unit_not_ready 0x%x, chip_no 0x%x,\n",
         (unsigned) h->sdtr_done, (unsigned) h->use_tagged_qng,
         (unsigned) h->unit_not_ready, (unsigned) h->chip_no);
-        
+
     printk(
-" queue_full_or_busy %x, start_motor %x, scsi_reset_wait %x, irq_no %x,\n",
+" queue_full_or_busy 0x%x, start_motor 0x%x, scsi_reset_wait %u,\n",
         (unsigned) h->queue_full_or_busy, (unsigned) h->start_motor,
-        (unsigned) h->scsi_reset_wait, (unsigned) h->irq_no);
+        (unsigned) h->scsi_reset_wait);
 
     printk(
-" is_in_int %x, max_total_qng %x, cur_total_qng %x, in_critical_cnt %x,\n",
+" is_in_int %u, max_total_qng %u, cur_total_qng %u, in_critical_cnt %u,\n",
         (unsigned) h->is_in_int, (unsigned) h->max_total_qng,
         (unsigned) h->cur_total_qng, (unsigned) h->in_critical_cnt);
 
     printk(
-" last_q_shortage %x, init_state %x, no_scam %x, pci_fix_asyn_xfer %x,\n",
+" last_q_shortage %u, init_state 0x%x, no_scam 0x%x, pci_fix_asyn_xfer 0x%x,\n",
         (unsigned) h->last_q_shortage, (unsigned) h->init_state,
         (unsigned) h->no_scam, (unsigned) h->pci_fix_asyn_xfer);
 
     printk(
-" cfg %lx\n",
-        (ulong) h->cfg);
+" cfg 0x%lx, irq_no 0x%x\n",
+        (ulong) h->cfg, (unsigned) h->irq_no);
 }
 
 /*
  * asc_prt_asc_dvc_cfg()
  */
-STATIC void 
+STATIC void
 asc_prt_asc_dvc_cfg(ASC_DVC_CFG *h)
 {
-    printk("ASC_DVC_CFG at addr %lx\n", (ulong) h);
+    printk("ASC_DVC_CFG at addr 0x%lx\n", (ulong) h);
 
     printk(
-" can_tagged_qng %x, cmd_qng_enabled %x, disc_enable %x, sdtr_enable %x,\n",
-            h->can_tagged_qng, h->cmd_qng_enabled, h->disc_enable,
-            h->sdtr_enable);
+" can_tagged_qng 0x%x, cmd_qng_enabled 0x%x,\n",
+            h->can_tagged_qng, h->cmd_qng_enabled);
+    printk(
+" disc_enable 0x%x, sdtr_enable 0x%x,\n",
+            h->disc_enable, h->sdtr_enable);
 
     printk(
 " chip_scsi_id %d, isa_dma_speed %d, isa_dma_channel %d, chip_version %d,\n",
@@ -10644,48 +9619,49 @@
              h->chip_version);
 
     printk(
-" pci_device_id %d, lib_serial_no %x, lib_version %x, mcode_date %x,\n",
+" pci_device_id %d, lib_serial_no %u, lib_version %u, mcode_date 0x%x,\n",
           h->pci_device_id, h->lib_serial_no, h->lib_version, h->mcode_date);
 
     printk(
-" mcode_version %d, overrun_buf %lx\n",
+" mcode_version %d, overrun_buf 0x%lx\n",
             h->mcode_version, (ulong) h->overrun_buf);
 }
 
 /*
  * asc_prt_asc_scsi_q()
  */
-STATIC void 
+STATIC void
 asc_prt_asc_scsi_q(ASC_SCSI_Q *q)
 {
     ASC_SG_HEAD    *sgp;
     int i;
 
-    printk("ASC_SCSI_Q at addr %lx\n", (ulong) q);
+    printk("ASC_SCSI_Q at addr 0x%lx\n", (ulong) q);
 
     printk(
-" target_ix %u, target_lun %u, srb_ptr %x, tag_code %u,\n",
+" target_ix 0x%x, target_lun %u, srb_ptr 0x%lx, tag_code 0x%x,\n",
             q->q2.target_ix, q->q1.target_lun,
-            (unsigned) q->q2.srb_ptr, q->q2.tag_code);
+            (ulong) q->q2.srb_ptr, q->q2.tag_code);
 
     printk(
-" data_addr %lx, data_cnt %lu, sense_addr %lx, sense_len %u,\n",
-            (ulong) q->q1.data_addr, (ulong) q->q1.data_cnt,
-            (ulong) q->q1.sense_addr, q->q1.sense_len);
+" data_addr 0x%lx, data_cnt %lu, sense_addr 0x%lx, sense_len %u,\n",
+            (ulong) le32_to_cpu(q->q1.data_addr),
+            (ulong) le32_to_cpu(q->q1.data_cnt),
+            (ulong) le32_to_cpu(q->q1.sense_addr), q->q1.sense_len);
 
     printk(
-" cdbptr %lx, cdb_len %u, sg_head %lx, sg_queue_cnt %u\n",
+" cdbptr 0x%lx, cdb_len %u, sg_head 0x%lx, sg_queue_cnt %u\n",
             (ulong) q->cdbptr, q->q2.cdb_len,
             (ulong) q->sg_head, q->q1.sg_queue_cnt);
 
     if (q->sg_head) {
         sgp = q->sg_head;
-        printk("ASC_SG_HEAD at addr %lx\n", (ulong) sgp);
+        printk("ASC_SG_HEAD at addr 0x%lx\n", (ulong) sgp);
         printk(" entry_cnt %u, queue_cnt %u\n", sgp->entry_cnt, sgp->queue_cnt);
         for (i = 0; i < sgp->entry_cnt; i++) {
-            printk(" [%u]: addr %lx, bytes %lu\n",
-                i, (ulong) sgp->sg_list[i].addr,
-                (ulong) sgp->sg_list[i].bytes);
+            printk(" [%u]: addr 0x%lx, bytes %lu\n",
+                i, (ulong) le32_to_cpu(sgp->sg_list[i].addr),
+                (ulong) le32_to_cpu(sgp->sg_list[i].bytes));
         }
 
     }
@@ -10694,17 +9670,17 @@
 /*
  * asc_prt_asc_qdone_info()
  */
-STATIC void 
+STATIC void
 asc_prt_asc_qdone_info(ASC_QDONE_INFO *q)
 {
-    printk("ASC_QDONE_INFO at addr %lx\n", (ulong) q);
+    printk("ASC_QDONE_INFO at addr 0x%lx\n", (ulong) q);
     printk(
-" srb_ptr %x, target_ix %u, cdb_len %u, tag_code %u, done_stat %x\n",
-            (unsigned) q->d2.srb_ptr, q->d2.target_ix, q->d2.cdb_len,
-            q->d2.tag_code, q->d3.done_stat);
+" srb_ptr 0x%lx, target_ix %u, cdb_len %u, tag_code %u,\n",
+            (ulong) q->d2.srb_ptr, q->d2.target_ix, q->d2.cdb_len,
+            q->d2.tag_code);
     printk(
-" host_stat %x, scsi_stat %x, scsi_msg %x\n",
-            q->d3.host_stat, q->d3.scsi_stat, q->d3.scsi_msg);
+" done_stat 0x%x, host_stat 0x%x, scsi_stat 0x%x, scsi_msg 0x%x\n",
+            q->d3.done_stat, q->d3.host_stat, q->d3.scsi_stat, q->d3.scsi_msg);
 }
 
 /*
@@ -10712,7 +9688,7 @@
  *
  * Display an ADV_DVC_VAR structure.
  */
-STATIC void 
+STATIC void
 asc_prt_adv_dvc_var(ADV_DVC_VAR *h)
 {
     printk(" ADV_DVC_VAR at addr 0x%lx\n", (ulong) h);
@@ -10723,8 +9699,8 @@
 
     printk(
 "  isr_callback 0x%lx, sdtr_able 0x%x, wdtr_able 0x%x\n",
-        (ulong) h->isr_callback, (unsigned) h->wdtr_able,
-        (unsigned) h->sdtr_able);
+        (ulong) h->isr_callback, (unsigned) h->sdtr_able,
+        (unsigned) h->wdtr_able);
 
     printk(
 "  start_motor 0x%x, scsi_reset_wait 0x%x, irq_no 0x%x,\n",
@@ -10732,12 +9708,12 @@
         (unsigned) h->scsi_reset_wait, (unsigned) h->irq_no);
 
     printk(
-"  max_host_qng %x, max_dvc_qng %x, carr_freelist %lxn\n",
+"  max_host_qng %u, max_dvc_qng %u, carr_freelist 0x%lxn\n",
         (unsigned) h->max_host_qng, (unsigned) h->max_dvc_qng,
         (ulong) h->carr_freelist);
 
     printk(
-"  icq_sp %lx, irq_sp %lx\n",
+"  icq_sp 0x%lx, irq_sp 0x%lx\n",
         (ulong) h->icq_sp, (ulong) h->irq_sp);
 
     printk(
@@ -10745,7 +9721,7 @@
         (unsigned) h->no_scam, (unsigned) h->tagqng_able);
 
     printk(
-"  chip_scsi_id 0x%x, cfg %lx\n",
+"  chip_scsi_id 0x%x, cfg 0x%lx\n",
         (unsigned) h->chip_scsi_id, (ulong) h->cfg);
 }
 
@@ -10754,7 +9730,7 @@
  *
  * Display an ADV_DVC_CFG structure.
  */
-STATIC void 
+STATIC void
 asc_prt_adv_dvc_cfg(ADV_DVC_CFG *h)
 {
     printk(" ADV_DVC_CFG at addr 0x%lx\n", (ulong) h);
@@ -10768,7 +9744,7 @@
         h->chip_version, h->mcode_date);
 
     printk(
-"  mcode_version 0x%x, pci_device_id 0x%x, lib_version 0x%x\n",
+"  mcode_version 0x%x, pci_device_id 0x%x, lib_version %u\n",
        h->mcode_version, h->pci_device_id, h->lib_version);
 
     printk(
@@ -10781,37 +9757,38 @@
  *
  * Display an ADV_SCSI_REQ_Q structure.
  */
-STATIC void 
+STATIC void
 asc_prt_adv_scsi_req_q(ADV_SCSI_REQ_Q *q)
 {
     int                 sg_blk_cnt;
     struct asc_sg_block *sg_ptr;
 
-    printk("ADV_SCSI_REQ_Q at addr %lx\n", (ulong) q);
+    printk("ADV_SCSI_REQ_Q at addr 0x%lx\n", (ulong) q);
 
     printk(
 "  target_id %u, target_lun %u, srb_ptr 0x%lx, a_flag 0x%x\n",
             q->target_id, q->target_lun, (ulong) q->srb_ptr, q->a_flag);
 
     printk("  cntl 0x%x, data_addr 0x%lx, vdata_addr 0x%lx\n",
-            q->cntl, (ulong) q->data_addr, (ulong) q->vdata_addr);
+            q->cntl, (ulong) le32_to_cpu(q->data_addr), (ulong) q->vdata_addr);
 
     printk(
 "  data_cnt %lu, sense_addr 0x%lx, sense_len %u,\n",
-            (ulong) q->data_cnt, (ulong) q->sense_addr, q->sense_len);
+            (ulong) le32_to_cpu(q->data_cnt),
+            (ulong) le32_to_cpu(q->sense_addr), q->sense_len);
 
     printk(
 "  cdb_len %u, done_status 0x%x, host_status 0x%x, scsi_status 0x%x\n",
             q->cdb_len, q->done_status, q->host_status, q->scsi_status);
 
     printk(
-"  sg_working_ix %x, sg_working_data_cnt %lx, target_cmd %u\n",
-            q->sg_working_ix, (ulong) q->sg_working_data_cnt, q->target_cmd);
+"  sg_working_ix 0x%x, target_cmd %u\n",
+            q->sg_working_ix, q->target_cmd);
 
     printk(
-"  scsiq_rptr %lx, sg_real_addr %lx, sg_list_ptr %lx\n",
-            (ulong) q->scsiq_rptr, (ulong) q->sg_real_addr,
-            (ulong) q->sg_list_ptr);
+"  scsiq_rptr 0x%lx, sg_real_addr 0x%lx, sg_list_ptr 0x%lx\n",
+            (ulong) le32_to_cpu(q->scsiq_rptr),
+            (ulong) le32_to_cpu(q->sg_real_addr), (ulong) q->sg_list_ptr);
 
     /* Display the request's ADV_SG_BLOCK structures. */
     if (q->sg_list_ptr != NULL)
@@ -10846,17 +9823,17 @@
 {
     int i;
 
-    printk(" ASC_SG_BLOCK at addr %lx (sgblockno %d)\n",
+    printk(" ASC_SG_BLOCK at addr 0x%lx (sgblockno %d)\n",
         (ulong) b, sgblockno);
-    printk("  sg_cnt %u, sg_ptr %lx\n",
-        b->sg_cnt, (ulong) b->sg_ptr);
+    printk("  sg_cnt %u, sg_ptr 0x%lx\n",
+        b->sg_cnt, (ulong) le32_to_cpu(b->sg_ptr));
     ASC_ASSERT(b->sg_cnt <= NO_OF_SG_PER_BLOCK);
     if (b->sg_ptr != 0)
     {
         ASC_ASSERT(b->sg_cnt == NO_OF_SG_PER_BLOCK);
     }
     for (i = 0; i < b->sg_cnt; i++) {
-        printk("  [%u]: sg_addr %lx, sg_count %lx\n",
+        printk("  [%u]: sg_addr 0x%lx, sg_count 0x%lx\n",
             i, (ulong) b->sg_list[i].sg_addr, (ulong) b->sg_list[i].sg_count);
     }
 }
@@ -10864,10 +9841,10 @@
 /*
  * asc_prt_hex()
  *
- * Print hexadecimal output in 4 byte groupings 32 bytes 
+ * Print hexadecimal output in 4 byte groupings 32 bytes
  * or 8 double-words per line.
  */
-STATIC void 
+STATIC void
 asc_prt_hex(char *f, uchar *s, int l)
 {
     int            i;
@@ -10878,7 +9855,7 @@
     printk("%s: (%d bytes)\n", f, l);
 
     for (i = 0; i < l; i += 32) {
-        
+
         /* Display a maximum of 8 double-words per line. */
         if ((k = (l - i) / 4) >= 8) {
             k = 8;
@@ -10919,27 +9896,6 @@
 }
 #endif /* ADVANSYS_DEBUG */
 
-#ifdef ADVANSYS_ASSERT
-/*
- * advansys_interrupts_enabled()
- *
- * Return 1 if interrupts are enabled, otherwise return 0.
- */
-STATIC int
-advansys_interrupts_enabled(void)
-{
-    int flags;
-
-    save_flags(flags);
-    if (flags & 0x0200) {
-        return ASC_TRUE;
-    } else {
-        return ASC_FALSE;
-    }
-}
-#endif /* ADVANSYS_ASSERT */
-
-
 /*
  * --- Asc Library Functions
  */
@@ -11047,42 +10003,47 @@
     return (0);
 }
 
-ASC_INITFUNC(
-STATIC ASC_DCNT,
+STATIC ASC_DCNT
 AscLoadMicroCode(
                     PortAddr iop_base,
                     ushort s_addr,
-                    ushort *mcode_buf,
+                    uchar *mcode_buf,
                     ushort mcode_size
 )
-)
 {
     ASC_DCNT            chksum;
     ushort              mcode_word_size;
     ushort              mcode_chksum;
 
+    /* Write the microcode buffer starting at LRAM address 0. */
     mcode_word_size = (ushort) (mcode_size >> 1);
     AscMemWordSetLram(iop_base, s_addr, 0, mcode_word_size);
-    AscMemWordCopyToLram(iop_base, s_addr, mcode_buf, mcode_word_size);
+    AscMemWordCopyPtrToLram(iop_base, s_addr, mcode_buf, mcode_word_size);
+
     chksum = AscMemSumLramWord(iop_base, s_addr, mcode_word_size);
+    ASC_DBG1(1, "AscLoadMicroCode: chksum 0x%lx\n", (ulong) chksum);
     mcode_chksum = (ushort) AscMemSumLramWord(iop_base,
-                                              (ushort) ASC_CODE_SEC_BEG,
+          (ushort) ASC_CODE_SEC_BEG,
           (ushort) ((mcode_size - s_addr - (ushort) ASC_CODE_SEC_BEG) / 2));
+    ASC_DBG1(1, "AscLoadMicroCode: mcode_chksum 0x%lx\n",
+        (ulong) mcode_chksum);
     AscWriteLramWord(iop_base, ASCV_MCODE_CHKSUM_W, mcode_chksum);
     AscWriteLramWord(iop_base, ASCV_MCODE_SIZE_W, mcode_size);
     return (chksum);
 }
 
-ASC_INITFUNC(
-STATIC int,
+STATIC int
 AscFindSignature(
                     PortAddr iop_base
 )
-)
 {
     ushort              sig_word;
 
+    ASC_DBG2(1, "AscFindSignature: AscGetChipSignatureByte(0x%x) 0x%x\n",
+        iop_base, AscGetChipSignatureByte(iop_base));
     if (AscGetChipSignatureByte(iop_base) == (uchar) ASC_1000_ID1B) {
+        ASC_DBG2(1, "AscFindSignature: AscGetChipSignatureWord(0x%x) 0x%x\n",
+            iop_base, AscGetChipSignatureWord(iop_base));
         sig_word = AscGetChipSignatureWord(iop_base);
         if ((sig_word == (ushort) ASC_1000_ID0W) ||
             (sig_word == (ushort) ASC_1000_ID0W_FIX)) {
@@ -11092,13 +10053,15 @@
     return (0);
 }
 
-STATIC uchar _isa_pnp_inited ASC_INITDATA = 0;
 STATIC PortAddr _asc_def_iop_base[ASC_IOADR_TABLE_MAX_IX] ASC_INITDATA =
 {
     0x100, ASC_IOADR_1, 0x120, ASC_IOADR_2, 0x140, ASC_IOADR_3, ASC_IOADR_4,
     ASC_IOADR_5, ASC_IOADR_6, ASC_IOADR_7, ASC_IOADR_8
 };
 
+#ifdef CONFIG_ISA
+STATIC uchar _isa_pnp_inited ASC_INITDATA = 0;
+
 ASC_INITFUNC(
 STATIC PortAddr,
 AscSearchIOPortAddr(
@@ -11155,11 +10118,11 @@
         iop_base = _asc_def_iop_base[i];
         if (check_region(iop_base, ASC_IOADR_GAP) != 0) {
             ASC_DBG1(1,
-               "AscSearchIOPortAddr11: check_region() failed I/O port %x\n",
+               "AscSearchIOPortAddr11: check_region() failed I/O port 0x%x\n",
                      iop_base);
             continue;
         }
-        ASC_DBG1(1, "AscSearchIOPortAddr11: probing I/O port %x\n", iop_base);
+        ASC_DBG1(1, "AscSearchIOPortAddr11: probing I/O port 0x%x\n", iop_base);
         if (AscFindSignature(iop_base)) {
             return (iop_base);
         }
@@ -11169,24 +10132,25 @@
 
 ASC_INITFUNC(
 STATIC void,
-AscToggleIRQAct(
-                   PortAddr iop_base
-)
+AscSetISAPNPWaitForKey(
+    void)
 )
 {
-    AscSetChipStatus(iop_base, CIW_IRQ_ACT);
-    AscSetChipStatus(iop_base, 0);
+    outp(ASC_ISA_PNP_PORT_ADDR, 0x02);
+    outp(ASC_ISA_PNP_PORT_WRITE, 0x02);
     return;
 }
+#endif /* CONFIG_ISA */
 
 ASC_INITFUNC(
 STATIC void,
-AscSetISAPNPWaitForKey(
-    void)
+AscToggleIRQAct(
+                   PortAddr iop_base
+)
 )
 {
-    outp(ASC_ISA_PNP_PORT_ADDR, 0x02);
-    outp(ASC_ISA_PNP_PORT_WRITE, 0x02);
+    AscSetChipStatus(iop_base, CIW_IRQ_ACT);
+    AscSetChipStatus(iop_base, 0);
     return;
 }
 
@@ -11267,6 +10231,7 @@
     return (0);
 }
 
+#ifdef CONFIG_ISA
 ASC_INITFUNC(
 STATIC void,
 AscEnableIsaDma(
@@ -11283,8 +10248,9 @@
     }
     return;
 }
+#endif /* CONFIG_ISA */
 
-STATIC int 
+STATIC int
 AscIsrChipHalted(
                     ASC_DVC_VAR *asc_dvc
 )
@@ -11343,10 +10309,10 @@
         return (0);
     } else if (int_halt_code == ASC_HALT_EXTMSG_IN) {
 
-        AscMemWordCopyFromLram(iop_base,
+        AscMemWordCopyPtrFromLram(iop_base,
                                ASCV_MSGIN_BEG,
-                               (ushort *) & ext_msg,
-                               (ushort) (sizeof (EXT_MSG) >> 1));
+                               (uchar *) &ext_msg,
+                               sizeof(EXT_MSG) >> 1);
 
         if (ext_msg.msg_type == MS_EXTEND &&
             ext_msg.msg_req == MS_SDTR_CODE &&
@@ -11420,10 +10386,10 @@
                    ext_msg.msg_len == MS_WDTR_LEN) {
 
             ext_msg.wdtr_width = 0;
-            AscMemWordCopyToLram(iop_base,
+            AscMemWordCopyPtrToLram(iop_base,
                                  ASCV_MSGOUT_BEG,
-                                 (ushort *) & ext_msg,
-                                 (ushort) (sizeof (EXT_MSG) >> 1));
+                                 (uchar *) &ext_msg,
+                                 sizeof(EXT_MSG) >> 1);
             q_cntl |= QC_MSG_OUT;
             AscWriteLramByte(iop_base,
                          (ushort) (halt_q_addr + (ushort) ASC_SCSIQ_B_CNTL),
@@ -11433,10 +10399,10 @@
         } else {
 
             ext_msg.msg_type = M1_MSG_REJECT;
-            AscMemWordCopyToLram(iop_base,
+            AscMemWordCopyPtrToLram(iop_base,
                                  ASCV_MSGOUT_BEG,
-                                 (ushort *) & ext_msg,
-                                 (ushort) (sizeof (EXT_MSG) >> 1));
+                                 (uchar *) &ext_msg,
+                                 sizeof(EXT_MSG) >> 1);
             q_cntl |= QC_MSG_OUT;
             AscWriteLramByte(iop_base,
                          (ushort) (halt_q_addr + (ushort) ASC_SCSIQ_B_CNTL),
@@ -11496,10 +10462,10 @@
         return (0);
     } else if (int_halt_code == ASC_HALT_SDTR_REJECTED) {
 
-        AscMemWordCopyFromLram(iop_base,
+        AscMemWordCopyPtrFromLram(iop_base,
                                ASCV_MSGOUT_BEG,
-                               (ushort *) & out_msg,
-                               (ushort) (sizeof (EXT_MSG) >> 1));
+                               (uchar *) &out_msg,
+                               sizeof(EXT_MSG) >> 1);
 
         if ((out_msg.msg_type == MS_EXTEND) &&
             (out_msg.msg_len == MS_SDTR_LEN) &&
@@ -11554,7 +10520,9 @@
         }
         AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0);
         return (0);
-    } else if (int_halt_code == ASC_HALT_HOST_COPY_SG_LIST_TO_RISC)
+    }
+#if CC_VERY_LONG_SG_LIST
+    else if (int_halt_code == ASC_HALT_HOST_COPY_SG_LIST_TO_RISC)
     {
         uchar              q_no;
         ushort             q_addr;
@@ -11678,16 +10646,15 @@
              }
 
              scsi_sg_q.q_no = next_qp;
-             AscMemWordCopyToLram(iop_base,
-                          (ushort) (q_addr+ASC_SCSIQ_SGHD_CPY_BEG),
-                          (ushort *) &scsi_sg_q,
-                          (ushort) (sizeof(ASC_SG_LIST_Q) >> 1));
-
-             AscMemDWordCopyToLram( iop_base,
-                          (ushort) (q_addr+ASC_SGQ_LIST_BEG ),
-                          (ADV_PADDR *)
-                               &sg_head->sg_list[scsiq->next_sg_index],
-                          (ushort) sg_list_dwords);
+             AscMemWordCopyPtrToLram(iop_base,
+                          q_addr + ASC_SCSIQ_SGHD_CPY_BEG,
+                          (uchar *) &scsi_sg_q,
+                          sizeof(ASC_SG_LIST_Q) >> 1);
+
+             AscMemDWordCopyPtrToLram(iop_base,
+                          q_addr + ASC_SGQ_LIST_BEG,
+                          (uchar *) &sg_head->sg_list[scsiq->next_sg_index],
+                          sg_list_dwords);
 
              scsiq->next_sg_index += ASC_SG_LIST_PER_Q;
 
@@ -11713,6 +10680,7 @@
         AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0);
         return(0);
     }
+#endif /* CC_VERY_LONG_SG_LIST */
     return (0);
 }
 
@@ -11728,9 +10696,10 @@
     uchar               sg_queue_cnt;
 
     DvcGetQinfo(iop_base,
-                (ushort) (q_addr + (ushort) ASC_SCSIQ_DONE_INFO_BEG),
-                (ushort *) scsiq,
-              (ushort) ((sizeof (ASC_SCSIQ_2) + sizeof (ASC_SCSIQ_3)) / 2));
+                q_addr + ASC_SCSIQ_DONE_INFO_BEG,
+                (uchar *) scsiq,
+                (sizeof (ASC_SCSIQ_2) + sizeof (ASC_SCSIQ_3)) / 2);
+
     _val = AscReadLramWord(iop_base,
                            (ushort) (q_addr + (ushort) ASC_SCSIQ_B_STATUS));
     scsiq->q_status = (uchar) _val;
@@ -11994,7 +10963,8 @@
     return (int_pending);
 }
 
-STATIC uchar _asc_mcode_buf[] ASC_INITDATA =
+/* Microcode buffer is kept after initialization for error recovery. */
+STATIC uchar _asc_mcode_buf[] =
 {
   0x01,  0x03,  0x01,  0x19,  0x0F,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
   0x0F,  0x0F,  0x0F,  0x0F,  0x0F,  0x0F,  0x0F,  0x0F,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,  0x00,
@@ -12142,8 +11112,8 @@
   0xF1,  0xC7,  0x41,  0x23,  0xF8,  0x88,  0x11,  0x23,  0xA1,  0x01,  0x04,  0x23,  0xA0,  0x01,  0xE6,  0x84,
 };
 
-STATIC ushort _asc_mcode_size ASC_INITDATA = sizeof(_asc_mcode_buf);
-STATIC ADV_DCNT _asc_mcode_chksum ASC_INITDATA = 0x012C453FUL;
+STATIC ushort _asc_mcode_size = sizeof(_asc_mcode_buf);
+STATIC ADV_DCNT _asc_mcode_chksum = 0x012C453FUL;
 
 #define ASC_SYN_OFFSET_ONE_DISABLE_LIST  16
 STATIC uchar _syn_offset_one_disable_cmd[ASC_SYN_OFFSET_ONE_DISABLE_LIST] =
@@ -12173,7 +11143,7 @@
 )
 {
     PortAddr            iop_base;
-    int                 last_int_level;
+    ulong               last_int_level;
     int                 sta;
     int                 n_q_required;
     int                 disable_syn_offset_one_fix;
@@ -12235,6 +11205,8 @@
 #if !CC_VERY_LONG_SG_LIST
         if (sg_entry_cnt > ASC_MAX_SG_LIST)
         {
+            asc_dvc->in_critical_cnt--;
+            DvcLeaveCritical(last_int_level);
             return(ERR);
         }
 #endif /* !CC_VERY_LONG_SG_LIST */
@@ -12252,10 +11224,10 @@
         if (scsiq->q1.cntl & QC_SG_HEAD) {
             data_cnt = 0;
             for (i = 0; i < sg_entry_cnt; i++) {
-                data_cnt += (ADV_DCNT) sg_head->sg_list[i].bytes;
+                data_cnt += (ADV_DCNT) le32_to_cpu(sg_head->sg_list[i].bytes);
             }
         } else {
-            data_cnt = scsiq->q1.data_cnt;
+            data_cnt = le32_to_cpu(scsiq->q1.data_cnt);
         }
         if (data_cnt != 0UL) {
             if (data_cnt < 512UL) {
@@ -12279,7 +11251,7 @@
         scsiq->q2.tag_code |= (ASC_TAG_FLAG_DISABLE_ASYN_USE_SYN_FIX |
                                ASC_TAG_FLAG_DISABLE_DISCONNECT);
     } else {
-        scsiq->q2.tag_code &= 0x23;
+        scsiq->q2.tag_code &= 0x27;
     }
     if ((scsiq->q1.cntl & QC_SG_HEAD) != 0) {
         if (asc_dvc->bug_fix_cntl) {
@@ -12287,23 +11259,27 @@
                 if ((scsi_cmd == SCSICMD_Read6) ||
                     (scsi_cmd == SCSICMD_Read10)) {
                     addr =
-                        (ADV_PADDR)
-                            sg_head->sg_list[sg_entry_cnt_minus_one].addr +
-                        (ADV_DCNT)
-                            sg_head->sg_list[sg_entry_cnt_minus_one].bytes;
+                        (ADV_PADDR) le32_to_cpu(
+                            sg_head->sg_list[sg_entry_cnt_minus_one].addr) +
+                        (ADV_DCNT) le32_to_cpu(
+                            sg_head->sg_list[sg_entry_cnt_minus_one].bytes);
                     extra_bytes = (uchar) ((ushort) addr & 0x0003);
                     if ((extra_bytes != 0) &&
                         ((scsiq->q2.tag_code & ASC_TAG_FLAG_EXTRA_BYTES)
                          == 0)) {
                         scsiq->q2.tag_code |= ASC_TAG_FLAG_EXTRA_BYTES;
                         scsiq->q1.extra_bytes = extra_bytes;
-                        sg_head->sg_list[sg_entry_cnt_minus_one].bytes -=
-                            (ASC_DCNT) extra_bytes;
+                        data_cnt = le32_to_cpu(
+                            sg_head->sg_list[sg_entry_cnt_minus_one].bytes);
+                        data_cnt -= (ASC_DCNT) extra_bytes;
+                        sg_head->sg_list[sg_entry_cnt_minus_one].bytes =
+                            cpu_to_le32(data_cnt);
                     }
                 }
             }
         }
         sg_head->entry_to_copy = sg_head->entry_cnt;
+#if CC_VERY_LONG_SG_LIST
         /*
          * Set the sg_entry_cnt to the maximum possible. The rest of
          * the SG elements will be copied when the RISC completes the
@@ -12313,6 +11289,7 @@
         {
              sg_entry_cnt = ASC_MAX_SG_LIST;
         }
+#endif /* CC_VERY_LONG_SG_LIST */
         n_q_required = AscSgListToQueue(sg_entry_cnt);
         if ((AscGetNumOfFreeQueue(asc_dvc, target_ix, n_q_required) >=
             (uint) n_q_required) || ((scsiq->q1.cntl & QC_URGENT) != 0)) {
@@ -12331,14 +11308,17 @@
             if (asc_dvc->bug_fix_cntl & ASC_BUG_FIX_IF_NOT_DWB) {
                 if ((scsi_cmd == SCSICMD_Read6) ||
                     (scsi_cmd == SCSICMD_Read10)) {
-                    addr = scsiq->q1.data_addr + scsiq->q1.data_cnt;
+                    addr = le32_to_cpu(scsiq->q1.data_addr) +
+                        le32_to_cpu(scsiq->q1.data_cnt);
                     extra_bytes = (uchar) ((ushort) addr & 0x0003);
                     if ((extra_bytes != 0) &&
                         ((scsiq->q2.tag_code & ASC_TAG_FLAG_EXTRA_BYTES)
                           == 0)) {
-                        if (((ushort) scsiq->q1.data_cnt & 0x01FF) == 0) {
+                        data_cnt = le32_to_cpu(scsiq->q1.data_cnt);
+                        if (((ushort) data_cnt & 0x01FF) == 0) {
                             scsiq->q2.tag_code |= ASC_TAG_FLAG_EXTRA_BYTES;
-                            scsiq->q1.data_cnt -= (ASC_DCNT) extra_bytes;
+                            data_cnt -= (ASC_DCNT) extra_bytes;
+                            scsiq->q1.data_cnt = cpu_to_le32(data_cnt);
                             scsiq->q1.extra_bytes = extra_bytes;
                         }
                     }
@@ -12501,14 +11481,15 @@
         scsiq->q2.tag_code &= ~M2_QTAG_MSG_SIMPLE;
     }
     scsiq->q1.status = QS_FREE;
-    AscMemWordCopyToLram(iop_base,
-                         (ushort) (q_addr + (ushort) ASC_SCSIQ_CDB_BEG),
-                         (ushort *) scsiq->cdbptr,
-                         (ushort) ((ushort) scsiq->q2.cdb_len >> 1));
+    AscMemWordCopyPtrToLram(iop_base,
+                         q_addr + ASC_SCSIQ_CDB_BEG,
+                         (uchar *) scsiq->cdbptr,
+                         scsiq->q2.cdb_len >> 1);
+
     DvcPutScsiQ(iop_base,
-                (ushort) (q_addr + (ushort) ASC_SCSIQ_CPY_BEG),
-                (ushort *) & scsiq->q1.cntl,
-      (ushort) ((((sizeof (ASC_SCSIQ_1) + sizeof (ASC_SCSIQ_2)) / 2) - 1)));
+                q_addr + ASC_SCSIQ_CPY_BEG,
+                (uchar *) &scsiq->q1.cntl,
+                ((sizeof(ASC_SCSIQ_1) + sizeof(ASC_SCSIQ_2)) / 2) - 1);
     AscWriteLramWord(iop_base,
                      (ushort) (q_addr + (ushort) ASC_SCSIQ_B_STATUS),
              (ushort) (((ushort) scsiq->q1.q_no << 8) | (ushort) QS_READY));
@@ -12541,6 +11522,7 @@
     saved_data_cnt = scsiq->q1.data_cnt;
     scsiq->q1.data_addr = (ASC_PADDR) sg_head->sg_list[0].addr;
     scsiq->q1.data_cnt = (ASC_DCNT) sg_head->sg_list[0].bytes;
+#if CC_VERY_LONG_SG_LIST
     /*
      * If sg_head->entry_cnt is greater than ASC_MAX_SG_LIST
      * then not all SG elements will fit in the allocated queues.
@@ -12551,10 +11533,10 @@
     {
          /*
           * Set sg_entry_cnt to be the number of SG elements that
-          * will fit in the allocated SG queues. It is minus 1 because
-          * first SG element handled above. ASC_MAX_SG_LIST is already
-          * inflated by 1 to account for this. For example it may
-          * be 50 which is 1 + 7 queues * 7 SG elements.
+          * will fit in the allocated SG queues. It is minus 1, because
+          * the first SG element is handled above. ASC_MAX_SG_LIST is
+          * already inflated by 1 to account for this. For example it
+          * may be 50 which is 1 + 7 queues * 7 SG elements.
           */
          sg_entry_cnt = ASC_MAX_SG_LIST - 1;
 
@@ -12565,13 +11547,16 @@
          scsiq->remain_sg_entry_cnt = sg_head->entry_cnt - ASC_MAX_SG_LIST;
     } else
     {
+#endif /* CC_VERY_LONG_SG_LIST */
          /*
           * Set sg_entry_cnt to be the number of SG elements that
-          * will fit in the allocated SG queues. Refer to comment
-          * above regarding why it is - 1.
+          * will fit in the allocated SG queues. It is minus 1, because
+          * the first SG element is handled above.
           */
          sg_entry_cnt = sg_head->entry_cnt - 1;
+#if CC_VERY_LONG_SG_LIST
     }
+#endif /* CC_VERY_LONG_SG_LIST */
     if (sg_entry_cnt != 0) {
         scsiq->q1.cntl |= QC_SG_HEAD;
         q_addr = ASC_QNO_TO_QADDR(q_no);
@@ -12592,6 +11577,7 @@
                     scsi_sg_q.sg_cur_list_cnt = ASC_SG_LIST_PER_Q - 1;
                 }
             } else {
+#if CC_VERY_LONG_SG_LIST
                 /*
                  * This is the last SG queue in the list of
                  * allocated SG queues. If there are more
@@ -12603,8 +11589,11 @@
                     scsi_sg_q.cntl |= QCSG_SG_XFER_MORE;
                 } else
                 {
+#endif /* CC_VERY_LONG_SG_LIST */
                     scsi_sg_q.cntl |= QCSG_SG_XFER_END;
+#if CC_VERY_LONG_SG_LIST
                 }
+#endif /* CC_VERY_LONG_SG_LIST */
                 sg_list_dwords = sg_entry_cnt << 1;
                 if (i == 0) {
                     scsi_sg_q.sg_list_cnt = sg_entry_cnt;
@@ -12619,14 +11608,14 @@
                                       (ushort) (q_addr + ASC_SCSIQ_B_FWD));
             scsi_sg_q.q_no = next_qp;
             q_addr = ASC_QNO_TO_QADDR(next_qp);
-            AscMemWordCopyToLram(iop_base,
-                                 (ushort) (q_addr + ASC_SCSIQ_SGHD_CPY_BEG),
-                                 (ushort *) & scsi_sg_q,
-                                 (ushort) (sizeof (ASC_SG_LIST_Q) >> 1));
-            AscMemDWordCopyToLram(iop_base,
-                                  (ushort) (q_addr + ASC_SGQ_LIST_BEG),
-                                  (ADV_PADDR *) &sg_head->sg_list[sg_index],
-                                  (ushort) sg_list_dwords);
+            AscMemWordCopyPtrToLram(iop_base,
+                                q_addr + ASC_SCSIQ_SGHD_CPY_BEG,
+                                (uchar *) &scsi_sg_q,
+                                sizeof(ASC_SG_LIST_Q) >> 1);
+            AscMemDWordCopyPtrToLram(iop_base,
+                                q_addr + ASC_SGQ_LIST_BEG,
+                                (uchar *) &sg_head->sg_list[sg_index],
+                                sg_list_dwords);
             sg_index += ASC_SG_LIST_PER_Q;
             scsiq->next_sg_index = sg_index;
         }
@@ -12640,173 +11629,32 @@
 }
 
 STATIC int
-AscAbortSRB(
-               ASC_DVC_VAR *asc_dvc,
-               ADV_VADDR srb_ptr
+AscSetRunChipSynRegAtID(
+                           PortAddr iop_base,
+                           uchar tid_no,
+                           uchar sdtr_data
 )
 {
-    int                 sta;
-    ASC_SCSI_BIT_ID_TYPE saved_unit_not_ready;
-    PortAddr            iop_base;
+    int                 sta = FALSE;
 
-    iop_base = asc_dvc->iop_base;
-    sta = ERR;
-    saved_unit_not_ready = asc_dvc->unit_not_ready;
-    asc_dvc->unit_not_ready = 0xFF;
-    AscWaitISRDone(asc_dvc);
-    if (AscStopQueueExe(iop_base) == 1) {
-        if (AscRiscHaltedAbortSRB(asc_dvc, srb_ptr) == 1) {
-            sta = 1;
-            AscCleanUpBusyQueue(iop_base);
-            AscStartQueueExe(iop_base);
-        } else {
-            sta = 0;
-            AscStartQueueExe(iop_base);
-        }
+    if (AscHostReqRiscHalt(iop_base)) {
+        sta = AscSetChipSynRegAtID(iop_base, tid_no, sdtr_data);
+        AscStartChip(iop_base);
+        return (sta);
     }
-    asc_dvc->unit_not_ready = saved_unit_not_ready;
     return (sta);
 }
 
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
 STATIC int
-AscResetDevice(
-                  ASC_DVC_VAR *asc_dvc,
-                  uchar target_ix
+AscSetChipSynRegAtID(
+                        PortAddr iop_base,
+                        uchar id,
+                        uchar sdtr_data
 )
 {
-    PortAddr            iop_base;
-    int                 sta;
-    uchar               tid_no;
-
-    ASC_SCSI_BIT_ID_TYPE target_id;
+    ASC_SCSI_BIT_ID_TYPE org_id;
     int                 i;
-    ASC_SCSI_REQ_Q      scsiq_buf;
-    ASC_SCSI_REQ_Q *scsiq;
-    uchar       *buf;
-    ASC_SCSI_BIT_ID_TYPE saved_unit_not_ready;
-    iop_base = asc_dvc->iop_base;
-    tid_no = ASC_TIX_TO_TID(target_ix);
-    target_id = ASC_TID_TO_TARGET_ID(tid_no);
-    saved_unit_not_ready = asc_dvc->unit_not_ready;
-    asc_dvc->unit_not_ready = target_id;
-    sta = ERR;
-    AscWaitTixISRDone(asc_dvc, target_ix);
-    if (AscStopQueueExe(iop_base) == 1) {
-        if (AscRiscHaltedAbortTIX(asc_dvc, target_ix) == 1) {
-            AscCleanUpBusyQueue(iop_base);
-            AscStartQueueExe(iop_base);
-            AscWaitTixISRDone(asc_dvc, target_ix);
-            sta = TRUE;
-            scsiq = (ASC_SCSI_REQ_Q *) & scsiq_buf;
-            buf = (uchar *) & scsiq_buf;
-            for (i = 0; i < sizeof (ASC_SCSI_REQ_Q); i++) {
-                *buf++ = 0x00;
-            }
-            scsiq->r1.status = (uchar) QS_READY;
-            scsiq->r2.cdb_len = 6;
-            scsiq->r2.tag_code = M2_QTAG_MSG_SIMPLE;
-            scsiq->r1.target_id = target_id;
-            scsiq->r2.target_ix = ASC_TIDLUN_TO_IX(tid_no, 0);
-            scsiq->cdbptr = (uchar *) scsiq->cdb;
-            scsiq->r1.cntl = QC_NO_CALLBACK | QC_MSG_OUT | QC_URGENT;
-            AscWriteLramByte(asc_dvc->iop_base, ASCV_MSGOUT_BEG,
-                             M1_BUS_DVC_RESET);
-            asc_dvc->unit_not_ready &= ~target_id;
-            asc_dvc->sdtr_done |= target_id;
-            if (AscExeScsiQueue(asc_dvc, (ASC_SCSI_Q *) scsiq)
-                == 1) {
-                asc_dvc->unit_not_ready = target_id;
-                DvcSleepMilliSecond(1000);
-                _AscWaitQDone(iop_base, (ASC_SCSI_Q *) scsiq);
-                if (AscStopQueueExe(iop_base) == 1) {
-                    AscCleanUpDiscQueue(iop_base);
-                    AscStartQueueExe(iop_base);
-                    if (asc_dvc->pci_fix_asyn_xfer & target_id) {
-                        AscSetRunChipSynRegAtID(iop_base, tid_no,
-                                             ASYN_SDTR_DATA_FIX_PCI_REV_AB);
-                    }
-                    AscWaitTixISRDone(asc_dvc, target_ix);
-                }
-            } else {
-                sta = 0;
-            }
-            asc_dvc->sdtr_done &= ~target_id;
-        } else {
-            sta = ERR;
-            AscStartQueueExe(iop_base);
-        }
-    }
-    asc_dvc->unit_not_ready = saved_unit_not_ready;
-    return (sta);
-}
-#endif /* version >= v1.3.89 */
-
-STATIC int
-AscResetSB(
-              ASC_DVC_VAR *asc_dvc
-)
-{
-    int                 sta;
-    int                 i;
-    PortAddr            iop_base;
-
-    iop_base = asc_dvc->iop_base;
-    asc_dvc->unit_not_ready = 0xFF;
-    sta = TRUE;
-    AscWaitISRDone(asc_dvc);
-    AscStopQueueExe(iop_base);
-    asc_dvc->sdtr_done = 0;
-    AscResetChipAndScsiBus(asc_dvc);
-    DvcSleepMilliSecond((ASC_DCNT) ((ushort) asc_dvc->scsi_reset_wait * 1000));
-    AscReInitLram(asc_dvc);
-    for (i = 0; i <= ASC_MAX_TID; i++) {
-        asc_dvc->cur_dvc_qng[i] = 0;
-        if (asc_dvc->pci_fix_asyn_xfer & (ASC_SCSI_BIT_ID_TYPE) (0x01 << i)) {
-            AscSetChipSynRegAtID(iop_base, i, ASYN_SDTR_DATA_FIX_PCI_REV_AB);
-        }
-    }
-    asc_dvc->err_code = 0;
-    AscSetPCAddr(iop_base, ASC_MCODE_START_ADDR);
-    if (AscGetPCAddr(iop_base) != ASC_MCODE_START_ADDR) {
-        sta = ERR;
-    }
-    if (AscStartChip(iop_base) == 0) {
-        sta = ERR;
-    }
-    AscStartQueueExe(iop_base);
-    asc_dvc->unit_not_ready = 0;
-    asc_dvc->queue_full_or_busy = 0;
-    return (sta);
-}
-
-STATIC int
-AscSetRunChipSynRegAtID(
-                           PortAddr iop_base,
-                           uchar tid_no,
-                           uchar sdtr_data
-)
-{
-    int                 sta = FALSE;
-
-    if (AscHostReqRiscHalt(iop_base)) {
-        sta = AscSetChipSynRegAtID(iop_base, tid_no, sdtr_data);
-        AscStartChip(iop_base);
-        return (sta);
-    }
-    return (sta);
-}
-
-STATIC int
-AscSetChipSynRegAtID(
-                        PortAddr iop_base,
-                        uchar id,
-                        uchar sdtr_data
-)
-{
-    ASC_SCSI_BIT_ID_TYPE org_id;
-    int                 i;
-    int                 sta = TRUE;
+    int                 sta = TRUE;
 
     AscSetBank(iop_base, 1);
     org_id = AscReadChipDvcID(iop_base);
@@ -12831,16 +11679,6 @@
     return (sta);
 }
 
-STATIC int
-AscReInitLram(
-                 ASC_DVC_VAR *asc_dvc
-)
-{
-    AscInitLram(asc_dvc);
-    AscInitQLinkVar(asc_dvc);
-    return (0);
-}
-
 STATIC ushort
 AscInitLram(
                ASC_DVC_VAR *asc_dvc
@@ -12942,31 +11780,7 @@
 }
 
 
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-STATIC int
-_AscWaitQDone(
-                 PortAddr iop_base,
-                 ASC_SCSI_Q * scsiq
-)
-{
-    ushort              q_addr;
-    uchar               q_status;
-    int                 count = 0;
-
-    while (scsiq->q1.q_no == 0);
-    q_addr = ASC_QNO_TO_QADDR(scsiq->q1.q_no);
-    do {
-        q_status = AscReadLramByte(iop_base, q_addr + ASC_SCSIQ_B_STATUS);
-        DvcSleepMilliSecond(100L);
-        if (count++ > 30) {
-            return (0);
-        }
-    } while ((q_status & QS_READY) != 0);
-    return (1);
-}
-#endif /* version >= v1.3.89 */
-
-STATIC uchar 
+STATIC uchar
 AscMsgOutSDTR(
                  ASC_DVC_VAR *asc_dvc,
                  uchar sdtr_period,
@@ -12987,18 +11801,18 @@
     if ((sdtr_period_index =
          AscGetSynPeriodIndex(asc_dvc, sdtr_period)) <=
         asc_dvc->max_sdtr_index) {
-        AscMemWordCopyToLram(iop_base,
+        AscMemWordCopyPtrToLram(iop_base,
                              ASCV_MSGOUT_BEG,
-                             (ushort *) & sdtr_buf,
-                             (ushort) (sizeof (EXT_MSG) >> 1));
+                             (uchar *) &sdtr_buf,
+                             sizeof (EXT_MSG) >> 1);
         return ((sdtr_period_index << 4) | sdtr_offset);
     } else {
 
         sdtr_buf.req_ack_offset = 0;
-        AscMemWordCopyToLram(iop_base,
+        AscMemWordCopyPtrToLram(iop_base,
                              ASCV_MSGOUT_BEG,
-                             (ushort *) & sdtr_buf,
-                             (ushort) (sizeof (EXT_MSG) >> 1));
+                             (uchar *) &sdtr_buf,
+                             sizeof (EXT_MSG) >> 1);
         return (0);
     }
 }
@@ -13101,95 +11915,6 @@
 }
 
 STATIC int
-AscRiscHaltedAbortSRB(
-                         ASC_DVC_VAR *asc_dvc,
-                         ASC_VADDR srb_ptr
-)
-{
-    PortAddr            iop_base;
-    ushort              q_addr;
-    uchar               q_no;
-    ASC_QDONE_INFO      scsiq_buf;
-    ASC_QDONE_INFO *scsiq;
-    ASC_ISR_CALLBACK    asc_isr_callback;
-    int                 last_int_level;
-
-    iop_base = asc_dvc->iop_base;
-    asc_isr_callback = asc_dvc->isr_callback;
-    last_int_level = DvcEnterCritical();
-    scsiq = (ASC_QDONE_INFO *) & scsiq_buf;
-    for (q_no = ASC_MIN_ACTIVE_QNO; q_no <= asc_dvc->max_total_qng;
-         q_no++) {
-        q_addr = ASC_QNO_TO_QADDR(q_no);
-        scsiq->d2.srb_ptr = AscReadLramDWord(iop_base,
-                           (ushort) (q_addr + (ushort) ASC_SCSIQ_D_SRBPTR));
-        if (scsiq->d2.srb_ptr == srb_ptr) {
-            _AscCopyLramScsiDoneQ(iop_base, q_addr, scsiq, asc_dvc->max_dma_count);
-            if (((scsiq->q_status & QS_READY) != 0)
-                 && ((scsiq->q_status & QS_ABORTED) == 0)
-                 && ((scsiq->cntl & QCSG_SG_XFER_LIST) == 0)) {
-                scsiq->q_status |= QS_ABORTED;
-                scsiq->d3.done_stat = QD_ABORTED_BY_HOST;
-                AscWriteLramDWord(iop_base,
-                            (ushort) (q_addr + (ushort) ASC_SCSIQ_D_SRBPTR),
-                                  0L);
-                AscWriteLramByte(iop_base,
-                            (ushort) (q_addr + (ushort) ASC_SCSIQ_B_STATUS),
-                                 scsiq->q_status);
-                (*asc_isr_callback) (asc_dvc, scsiq);
-                return (1);
-            }
-        }
-    }
-    DvcLeaveCritical(last_int_level);
-    return (0);
-}
-
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-STATIC int
-AscRiscHaltedAbortTIX(
-                         ASC_DVC_VAR *asc_dvc,
-                         uchar target_ix
-)
-{
-    PortAddr            iop_base;
-    ushort              q_addr;
-    uchar               q_no;
-    ASC_QDONE_INFO      scsiq_buf;
-    ASC_QDONE_INFO *scsiq;
-    ASC_ISR_CALLBACK    asc_isr_callback;
-    int                 last_int_level;
-
-    iop_base = asc_dvc->iop_base;
-    asc_isr_callback = asc_dvc->isr_callback;
-    last_int_level = DvcEnterCritical();
-    scsiq = (ASC_QDONE_INFO *) & scsiq_buf;
-    for (q_no = ASC_MIN_ACTIVE_QNO; q_no <= asc_dvc->max_total_qng;
-         q_no++) {
-        q_addr = ASC_QNO_TO_QADDR(q_no);
-        _AscCopyLramScsiDoneQ(iop_base, q_addr, scsiq, asc_dvc->max_dma_count);
-        if (((scsiq->q_status & QS_READY) != 0) &&
-            ((scsiq->q_status & QS_ABORTED) == 0) &&
-            ((scsiq->cntl & QCSG_SG_XFER_LIST) == 0)) {
-            if (scsiq->d2.target_ix == target_ix) {
-                scsiq->q_status |= QS_ABORTED;
-                scsiq->d3.done_stat = QD_ABORTED_BY_HOST;
-                AscWriteLramDWord(iop_base,
-                            (ushort) (q_addr + (ushort) ASC_SCSIQ_D_SRBPTR),
-                                  0L);
-                AscWriteLramByte(iop_base,
-                            (ushort) (q_addr + (ushort) ASC_SCSIQ_B_STATUS),
-                                 scsiq->q_status);
-                (*asc_isr_callback) (asc_dvc, scsiq);
-            }
-        }
-    }
-    DvcLeaveCritical(last_int_level);
-    return (1);
-}
-#endif /* version >= v1.3.89 */
-
-STATIC int
 AscHostReqRiscHalt(
                       PortAddr iop_base
 )
@@ -13237,119 +11962,6 @@
     return (0);
 }
 
-STATIC int
-AscStartQueueExe(
-                    PortAddr iop_base
-)
-{
-    if (AscReadLramByte(iop_base, ASCV_STOP_CODE_B) != 0) {
-        AscWriteLramByte(iop_base, ASCV_STOP_CODE_B, 0);
-    }
-    return (1);
-}
-
-STATIC int
-AscCleanUpBusyQueue(
-                       PortAddr iop_base
-)
-{
-    int                 count;
-    uchar               stop_code;
-
-    count = 0;
-    if (AscReadLramByte(iop_base, ASCV_STOP_CODE_B) != 0) {
-        AscWriteLramByte(iop_base, ASCV_STOP_CODE_B,
-                         ASC_STOP_CLEAN_UP_BUSY_Q);
-        do {
-            stop_code = AscReadLramByte(iop_base, ASCV_STOP_CODE_B);
-            if ((stop_code & ASC_STOP_CLEAN_UP_BUSY_Q) == 0)
-                break;
-            DvcSleepMilliSecond(100);
-        } while (count++ < 20);
-    }
-    return (1);
-}
-
-#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89)
-STATIC int
-AscCleanUpDiscQueue(
-                       PortAddr iop_base
-)
-{
-    int                 count;
-    uchar               stop_code;
-
-    count = 0;
-    if (AscReadLramByte(iop_base, ASCV_STOP_CODE_B) != 0) {
-        AscWriteLramByte(iop_base, ASCV_STOP_CODE_B,
-                         ASC_STOP_CLEAN_UP_DISC_Q);
-        do {
-            stop_code = AscReadLramByte(iop_base, ASCV_STOP_CODE_B);
-            if ((stop_code & ASC_STOP_CLEAN_UP_DISC_Q) == 0)
-                break;
-            DvcSleepMilliSecond(100);
-        } while (count++ < 20);
-    }
-    return (1);
-}
-#endif /* version >= v1.3.89 */
-
-STATIC int
-AscWaitTixISRDone(
-                     ASC_DVC_VAR *asc_dvc,
-                     uchar target_ix
-)
-{
-    uchar               cur_req;
-    uchar               tid_no;
-    int                 i = 0;
-
-    tid_no = ASC_TIX_TO_TID(target_ix);
-    while (i++ < 10) {
-        if ((cur_req = asc_dvc->cur_dvc_qng[tid_no]) == 0) {
-            break;
-        }
-        DvcSleepMilliSecond(1000L);
-        if (asc_dvc->cur_dvc_qng[tid_no] == cur_req) {
-            break;
-        }
-    }
-    return (1);
-}
-
-STATIC int
-AscWaitISRDone(
-                  ASC_DVC_VAR *asc_dvc
-)
-{
-    int                 tid;
-
-    for (tid = 0; tid <= ASC_MAX_TID; tid++) {
-        AscWaitTixISRDone(asc_dvc, ASC_TID_TO_TIX(tid));
-    }
-    return (1);
-}
-
-STATIC ASC_PADDR
-AscGetOnePhyAddr(
-                    ASC_DVC_VAR *asc_dvc,
-                    uchar * buf_addr,
-                    ASC_DCNT buf_size
-)
-{
-    ASC_MIN_SG_HEAD     sg_head;
-
-    sg_head.entry_cnt = ASC_MIN_SG_LIST;
-    if (DvcGetSGList(asc_dvc, (uchar *) buf_addr,
-                  buf_size, (ASC_SG_HEAD *) &sg_head) != buf_size) {
-        return (0L);
-    }
-    if (sg_head.entry_cnt > 1) {
-        return (0L);
-    }
-    return ((ASC_PADDR) sg_head.sg_list[0].addr);
-}
-
 STATIC void
 DvcDelayMicroSecond(ADV_DVC_VAR *asc_dvc, ushort micro_sec)
 {
@@ -13362,6 +11974,7 @@
     udelay((nano_sec + 999)/1000);
 }
 
+#ifdef CONFIG_ISA
 ASC_INITFUNC(
 STATIC ASC_DCNT,
 AscGetEisaProductID(
@@ -13420,6 +12033,7 @@
     }
     return (0);
 }
+#endif /* CONFIG_ISA */
 
 STATIC int
 AscStartChip(
@@ -13593,6 +12207,7 @@
     return (ASC_MAX_PCI_DMA_COUNT);
 }
 
+#ifdef CONFIG_ISA
 ASC_INITFUNC(
 STATIC ushort,
 AscGetIsaDmaChannel(
@@ -13664,6 +12279,7 @@
     AscSetBank(iop_base, 0);
     return (speed_value);
 }
+#endif /* CONFIG_ISA */
 
 ASC_INITFUNC(
 STATIC ushort,
@@ -13841,19 +12457,19 @@
         asc_dvc->cfg->chip_scsi_id) {
         asc_dvc->err_code |= ASC_IERR_SET_SCSI_ID;
     }
+#ifdef CONFIG_ISA
     if (asc_dvc->bus_type & ASC_IS_ISA) {
         AscSetIsaDmaChannel(iop_base, asc_dvc->cfg->isa_dma_channel);
         AscSetIsaDmaSpeed(iop_base, asc_dvc->cfg->isa_dma_speed);
     }
+#endif /* CONFIG_ISA */
     return (warn_code);
 }
 
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort
 AscInitAsc1000Driver(
                         ASC_DVC_VAR *asc_dvc
 )
-)
 {
     ushort              warn_code;
     PortAddr            iop_base;
@@ -13877,7 +12493,9 @@
     warn_code |= AscInitLram(asc_dvc);
     if (asc_dvc->err_code != 0)
         return (UW_ERR);
-    if (AscLoadMicroCode(iop_base, 0, (ushort *) _asc_mcode_buf,
+    ASC_DBG1(1, "AscInitAsc1000Driver: _asc_mcode_chksum 0x%lx\n",
+        (ulong) _asc_mcode_chksum);
+    if (AscLoadMicroCode(iop_base, 0, _asc_mcode_buf,
                          _asc_mcode_size) != _asc_mcode_chksum) {
         asc_dvc->err_code |= ASC_IERR_MCODE_CHKSUM;
         return (warn_code);
@@ -13912,7 +12530,7 @@
     asc_dvc->bug_fix_cntl = 0;
     asc_dvc->pci_fix_asyn_xfer = 0;
     asc_dvc->pci_fix_asyn_xfer_always = 0;
-    asc_dvc->init_state = 0;
+    /* asc_dvc->init_state initalized in AscInitGetConfig(). */
     asc_dvc->sdtr_done = 0;
     asc_dvc->cur_total_qng = 0;
     asc_dvc->is_in_int = 0;
@@ -13988,9 +12606,11 @@
         AscSetChipIFC(iop_base, IFC_INIT_DEFAULT);
         asc_dvc->bus_type = ASC_IS_ISAPNP;
     }
+#ifdef CONFIG_ISA
     if ((asc_dvc->bus_type & ASC_IS_ISA) != 0) {
         asc_dvc->cfg->isa_dma_channel = (uchar) AscGetIsaDmaChannel(iop_base);
     }
+#endif /* CONFIG_ISA */
     for (i = 0; i <= ASC_MAX_TID; i++) {
         asc_dvc->cur_dvc_qng[i] = 0;
         asc_dvc->max_dvc_qng[i] = ASC_MAX_SCSI1_QNG;
@@ -14037,7 +12657,7 @@
         asc_dvc->err_code |= ASC_IERR_SET_PC_ADDR;
         return (warn_code);
     }
-    eep_config = (ASCEEP_CONFIG *) & eep_config_buf;
+    eep_config = (ASCEEP_CONFIG *) &eep_config_buf;
     cfg_msw = AscGetChipCfgMsw(iop_base);
     cfg_lsw = AscGetChipCfgLsw(iop_base);
     if ((cfg_msw & ASC_CFG_MSW_CLR_MASK) != 0) {
@@ -14046,6 +12666,7 @@
         AscSetChipCfgMsw(iop_base, cfg_msw);
     }
     chksum = AscGetEEPConfig(iop_base, eep_config, asc_dvc->bus_type);
+    ASC_DBG1(1, "AscInitFromEEP: chksum 0x%x\n", chksum);
     if (chksum == 0) {
         chksum = 0xaa55;
     }
@@ -14064,10 +12685,14 @@
     }
     eep_config->cfg_msw &= ~ASC_CFG_MSW_CLR_MASK;
     eep_config->cfg_lsw |= ASC_CFG0_HOST_INT_ON;
+    ASC_DBG1(1, "AscInitFromEEP: eep_config->chksum 0x%x\n",
+        eep_config->chksum);
     if (chksum != eep_config->chksum) {
             if (AscGetChipVersion(iop_base, asc_dvc->bus_type) ==
                     ASC_CHIP_VER_PCI_ULTRA_3050 )
             {
+                ASC_DBG(1,
+"AscInitFromEEP: chksum error ignored; EEPROM-less board\n");
                 eep_config->init_sdtr = 0xFF;
                 eep_config->disc_enable = 0xFF;
                 eep_config->start_motor = 0xFF;
@@ -14075,7 +12700,7 @@
                 eep_config->max_total_qng = 0xF0;
                 eep_config->max_tag_qng = 0x20;
                 eep_config->cntl = 0xBFFF;
-                eep_config->chip_scsi_id = 7;
+                ASC_EEP_SET_CHIP_ID(eep_config, 7);
                 eep_config->no_scam = 0;
                 eep_config->adapter_info[0] = 0;
                 eep_config->adapter_info[1] = 0;
@@ -14085,6 +12710,8 @@
                 /* Indicate EEPROM-less board. */
                 eep_config->adapter_info[5] = 0xBB;
             } else {
+                ASC_PRINT(
+"AscInitFromEEP: EEPROM checksum error; Will try to re-write EEPROM.\n");
                 write_eep = 1;
                 warn_code |= ASC_WARN_EEPROM_CHKSUM;
             }
@@ -14092,7 +12719,7 @@
     asc_dvc->cfg->sdtr_enable = eep_config->init_sdtr;
     asc_dvc->cfg->disc_enable = eep_config->disc_enable;
     asc_dvc->cfg->cmd_qng_enabled = eep_config->use_cmd_qng;
-    asc_dvc->cfg->isa_dma_speed = eep_config->isa_dma_speed;
+    asc_dvc->cfg->isa_dma_speed = ASC_EEP_GET_DMA_SPD(eep_config);
     asc_dvc->start_motor = eep_config->start_motor;
     asc_dvc->dvc_cntl = eep_config->cntl;
     asc_dvc->no_scam = eep_config->no_scam;
@@ -14136,8 +12763,8 @@
     if (asc_dvc->bus_type & (ASC_IS_ISA | ASC_IS_VL | ASC_IS_EISA)) {
         asc_dvc->irq_no = AscGetChipIRQ(iop_base, asc_dvc->bus_type);
     }
-    eep_config->chip_scsi_id &= ASC_MAX_TID;
-    asc_dvc->cfg->chip_scsi_id = eep_config->chip_scsi_id;
+    ASC_EEP_SET_CHIP_ID(eep_config, ASC_EEP_GET_CHIP_ID(eep_config) & ASC_MAX_TID);
+    asc_dvc->cfg->chip_scsi_id = ASC_EEP_GET_CHIP_ID(eep_config);
     if (((asc_dvc->bus_type & ASC_IS_PCI_ULTRA) == ASC_IS_PCI_ULTRA) &&
         !(asc_dvc->dvc_cntl & ASC_CNTL_SDTR_ENABLE_ULTRA)) {
         asc_dvc->host_init_sdtr_index = ASC_SDTR_ULTRA_PCI_10MB_INDEX;
@@ -14152,22 +12779,27 @@
     }
     eep_config->cfg_msw = AscGetChipCfgMsw(iop_base);
     if (write_eep) {
-        (void) AscSetEEPConfig(iop_base, eep_config, asc_dvc->bus_type);
+        if ((i = AscSetEEPConfig(iop_base, eep_config, asc_dvc->bus_type)) !=
+             0) {
+                ASC_PRINT1(
+"AscInitFromEEP: Failed to re-write EEPROM with %d errors.\n", i);
+        } else {
+                ASC_PRINT("AscInitFromEEP: Succesfully re-wrote EEPROM.");
+        }
     }
     return (warn_code);
 }
 
-ASC_INITFUNC(
-STATIC ushort,
+STATIC ushort
 AscInitMicroCodeVar(
                        ASC_DVC_VAR *asc_dvc
 )
-)
 {
     int                 i;
     ushort              warn_code;
     PortAddr            iop_base;
     ASC_PADDR           phy_addr;
+    ASC_DCNT            phy_size;
 
     iop_base = asc_dvc->iop_base;
     warn_code = 0;
@@ -14176,26 +12808,27 @@
                                 asc_dvc->cfg->sdtr_period_offset[i]
 );
     }
+
     AscInitQLinkVar(asc_dvc);
     AscWriteLramByte(iop_base, ASCV_DISC_ENABLE_B,
                      asc_dvc->cfg->disc_enable);
     AscWriteLramByte(iop_base, ASCV_HOSTSCSI_ID_B,
                      ASC_TID_TO_TARGET_ID(asc_dvc->cfg->chip_scsi_id));
-    if ((phy_addr = AscGetOnePhyAddr(asc_dvc,
-                                 (uchar *) asc_dvc->cfg->overrun_buf,
-                                     ASC_OVERRUN_BSIZE)) == 0L) {
-        asc_dvc->err_code |= ASC_IERR_GET_PHY_ADDR;
-    } else {
-        /* Align on an 8 byte boundary. */
-        phy_addr = cpu_to_le32((phy_addr + 7) & ~0x7);
-        AscWriteLramDWord(iop_base, ASCV_OVERRUN_PADDR_D, phy_addr);
-        AscWriteLramDWord(iop_base, ASCV_OVERRUN_BSIZE_D,
-                          ASC_OVERRUN_BSIZE - 8);
-    }
-    asc_dvc->cfg->mcode_date = AscReadLramWord(iop_base,
-                                               (ushort) ASCV_MC_DATE_W);
-    asc_dvc->cfg->mcode_version = AscReadLramWord(iop_base,
-                                                  (ushort) ASCV_MC_VER_W);
+
+    /* Align overrun buffer on an 8 byte boundary. */
+    phy_addr = virt_to_bus(asc_dvc->cfg->overrun_buf);
+    phy_addr = cpu_to_le32((phy_addr + 7) & ~0x7);
+    AscMemDWordCopyPtrToLram(iop_base, ASCV_OVERRUN_PADDR_D,
+        (uchar *) &phy_addr, 1);
+    phy_size = cpu_to_le32(ASC_OVERRUN_BSIZE - 8);
+    AscMemDWordCopyPtrToLram(iop_base, ASCV_OVERRUN_BSIZE_D,
+        (uchar *) &phy_size, 1);
+
+    asc_dvc->cfg->mcode_date =
+        AscReadLramWord(iop_base, (ushort) ASCV_MC_DATE_W);
+    asc_dvc->cfg->mcode_version =
+        AscReadLramWord(iop_base, (ushort) ASCV_MC_VER_W);
+
     AscSetPCAddr(iop_base, ASC_MCODE_START_ADDR);
     if (AscGetPCAddr(iop_base) != ASC_MCODE_START_ADDR) {
         asc_dvc->err_code |= ASC_IERR_SET_PC_ADDR;
@@ -14205,6 +12838,7 @@
         asc_dvc->err_code |= ASC_IERR_START_STOP_CHIP;
         return (warn_code);
     }
+
     return (warn_code);
 }
 
@@ -14368,16 +13002,15 @@
     ushort              *wbuf;
     int                 cfg_beg;
     int                 cfg_end;
+    int                 uchar_end_in_config = ASC_EEP_MAX_DVC_ADDR - 2;
     int                 s_addr;
-    int                 isa_pnp_wsize;
 
     wbuf = (ushort *) cfg_buf;
     sum = 0;
-    isa_pnp_wsize = 0;
-    for (s_addr = 0; s_addr < (2 + isa_pnp_wsize); s_addr++, wbuf++) {
-        wval = AscReadEEPWord(iop_base, (uchar) s_addr);
-        sum += wval;
-        *wbuf = wval;
+    /* Read two config words; Byte-swapping done by AscReadEEPWord(). */
+    for (s_addr = 0; s_addr < 2; s_addr++, wbuf++) {
+        *wbuf = AscReadEEPWord(iop_base, (uchar) s_addr);
+        sum += *wbuf;
     }
     if (bus_type & ASC_IS_VL) {
         cfg_beg = ASC_EEP_DVC_CFG_BEG_VL;
@@ -14386,12 +13019,24 @@
         cfg_beg = ASC_EEP_DVC_CFG_BEG;
         cfg_end = ASC_EEP_MAX_DVC_ADDR;
     }
-    for (s_addr = cfg_beg; s_addr <= (cfg_end - 1);
-         s_addr++, wbuf++) {
-        wval = AscReadEEPWord(iop_base, (uchar) s_addr);
-        sum += wval;
-        *wbuf = wval;
+    for (s_addr = cfg_beg; s_addr <= (cfg_end - 1); s_addr++, wbuf++) {
+        wval = AscReadEEPWord( iop_base, ( uchar )s_addr ) ;
+        if (s_addr <= uchar_end_in_config) {
+            /*
+             * Swap all char fields - must unswap bytes already swapped
+             * by AscReadEEPWord().
+             */
+            *wbuf = le16_to_cpu(wval);
+        } else {
+            /* Don't swap word field at the end - cntl field. */
+            *wbuf = wval;
+        }
+        sum += wval; /* Checksum treats all EEPROM data as words. */
     }
+    /*
+     * Read the checksum word which will be compared against 'sum'
+     * by the caller. Word field already swapped.
+     */
     *wbuf = AscReadEEPWord(iop_base, (uchar) s_addr);
     return (sum);
 }
@@ -14405,15 +13050,19 @@
 )
 {
     int                 n_error;
-    ushort      *wbuf;
+    ushort              *wbuf;
+    ushort              word;
     ushort              sum;
     int                 s_addr;
     int                 cfg_beg;
     int                 cfg_end;
+    int                 uchar_end_in_config = ASC_EEP_MAX_DVC_ADDR - 2;
+
 
     wbuf = (ushort *) cfg_buf;
     n_error = 0;
     sum = 0;
+    /* Write two config words; AscWriteEEPWord() will swap bytes. */
     for (s_addr = 0; s_addr < 2; s_addr++, wbuf++) {
         sum += *wbuf;
         if (*wbuf != AscWriteEEPWord(iop_base, (uchar) s_addr, *wbuf)) {
@@ -14427,29 +13076,66 @@
         cfg_beg = ASC_EEP_DVC_CFG_BEG;
         cfg_end = ASC_EEP_MAX_DVC_ADDR;
     }
-    for (s_addr = cfg_beg; s_addr <= (cfg_end - 1);
-         s_addr++, wbuf++) {
-        sum += *wbuf;
-        if (*wbuf != AscWriteEEPWord(iop_base, (uchar) s_addr, *wbuf)) {
-            n_error++;
+    for (s_addr = cfg_beg; s_addr <= (cfg_end - 1); s_addr++, wbuf++) {
+        if (s_addr <= uchar_end_in_config) {
+            /*
+             * This is a char field. Swap char fields before they are
+             * swapped again by AscWriteEEPWord().
+             */
+            word = cpu_to_le16(*wbuf);
+            if (word != AscWriteEEPWord( iop_base, (uchar) s_addr, word)) {
+                n_error++;
+            }
+        } else {
+            /* Don't swap word field at the end - cntl field. */
+            if (*wbuf != AscWriteEEPWord(iop_base, (uchar) s_addr, *wbuf)) {
+                n_error++;
+            }
         }
+        sum += *wbuf; /* Checksum calculated from word values. */
     }
+    /* Write checksum word. It will be swapped by AscWriteEEPWord(). */
     *wbuf = sum;
     if (sum != AscWriteEEPWord(iop_base, (uchar) s_addr, sum)) {
         n_error++;
     }
+
+    /* Read EEPROM back again. */
     wbuf = (ushort *) cfg_buf;
+    /*
+     * Read two config words; Byte-swapping done by AscReadEEPWord().
+     */
     for (s_addr = 0; s_addr < 2; s_addr++, wbuf++) {
         if (*wbuf != AscReadEEPWord(iop_base, (uchar) s_addr)) {
             n_error++;
         }
     }
-    for (s_addr = cfg_beg; s_addr <= cfg_end;
-         s_addr++, wbuf++) {
-        if (*wbuf != AscReadEEPWord(iop_base, (uchar) s_addr)) {
+    if (bus_type & ASC_IS_VL) {
+        cfg_beg = ASC_EEP_DVC_CFG_BEG_VL;
+        cfg_end = ASC_EEP_MAX_DVC_ADDR_VL;
+    } else {
+        cfg_beg = ASC_EEP_DVC_CFG_BEG;
+        cfg_end = ASC_EEP_MAX_DVC_ADDR;
+    }
+    for (s_addr = cfg_beg; s_addr <= (cfg_end - 1); s_addr++, wbuf++) {
+        if (s_addr <= uchar_end_in_config) {
+            /*
+             * Swap all char fields. Must unswap bytes already swapped
+             * by AscReadEEPWord().
+             */
+            word = le16_to_cpu(AscReadEEPWord(iop_base, (uchar) s_addr));
+        } else {
+            /* Don't swap word field at the end - cntl field. */
+            word = AscReadEEPWord(iop_base, (uchar) s_addr);
+        }
+        if (*wbuf != word) {
             n_error++;
         }
     }
+    /* Read checksum; Byte swapping not needed. */
+    if (AscReadEEPWord(iop_base, (uchar) s_addr) != sum) {
+        n_error++;
+    }
     return (n_error);
 }
 
@@ -14486,7 +13172,7 @@
     uchar                       dvc_type;
     ASC_SCSI_BIT_ID_TYPE        tid_bits;
 
-    dvc_type = inq->byte0.peri_dvc_type;
+    dvc_type = ASC_INQ_DVC_TYPE(inq);
     tid_bits = ASC_TIX_TO_TARGET_ID(tid_no);
 
     if (asc_dvc->bug_fix_cntl & ASC_BUG_FIX_ASYN_USE_SYN)
@@ -14546,11 +13232,12 @@
     asc_dvc->cfg->can_tagged_qng &= ~tid_bit;
     asc_dvc->use_tagged_qng &= ~tid_bit;
 
-    if (inq->byte3.rsp_data_fmt >= 2 || inq->byte2.ansi_apr_ver >= 2) {
-        if ((asc_dvc->cfg->sdtr_enable & tid_bit) && inq->byte7.Sync) {
+    if (ASC_INQ_RESPONSE_FMT(inq) >= 2 || ASC_INQ_ANSI_VER(inq) >= 2) {
+        if ((asc_dvc->cfg->sdtr_enable & tid_bit) && ASC_INQ_SYNC(inq)) {
             asc_dvc->init_sdtr |= tid_bit;
         }
-        if ((asc_dvc->cfg->cmd_qng_enabled & tid_bit) && inq->byte7.CmdQue) {
+        if ((asc_dvc->cfg->cmd_qng_enabled & tid_bit) &&
+             ASC_INQ_CMD_QUEUE(inq)) {
             if (AscTagQueuingSafe(inq)) {
                 asc_dvc->use_tagged_qng |= tid_bit;
                 asc_dvc->cfg->can_tagged_qng |= tid_bit;
@@ -14615,7 +13302,6 @@
     }
     return (byte_data);
 }
-
 STATIC ushort
 AscReadLramWord(
                    PortAddr iop_base,
@@ -14629,6 +13315,7 @@
     return (word_data);
 }
 
+#if CC_VERY_LONG_SG_LIST
 STATIC ASC_DCNT
 AscReadLramDWord(
                     PortAddr iop_base,
@@ -14644,6 +13331,7 @@
     dword_data = ((ASC_DCNT) val_high << 16) | (ASC_DCNT) val_low;
     return (dword_data);
 }
+#endif /* CC_VERY_LONG_SG_LIST */
 
 STATIC void
 AscWriteLramWord(
@@ -14658,23 +13346,6 @@
 }
 
 STATIC void
-AscWriteLramDWord(
-                     PortAddr iop_base,
-                     ushort addr,
-                     ASC_DCNT dword_val
-)
-{
-    ushort              word_val;
-
-    AscSetChipLramAddr(iop_base, addr);
-    word_val = (ushort) dword_val;
-    AscSetChipLramData(iop_base, word_val);
-    word_val = (ushort) (dword_val >> 16);
-    AscSetChipLramData(iop_base, word_val);
-    return;
-}
-
-STATIC void
 AscWriteLramByte(
                     PortAddr iop_base,
                     ushort addr,
@@ -14697,42 +13368,87 @@
     return;
 }
 
+/*
+ * Copy 2 bytes to LRAM.
+ *
+ * The source data is assumed to be in little-endian order in memory
+ * and is maintained in little-endian order when written to LRAM.
+ */
 STATIC void
-AscMemWordCopyToLram(
+AscMemWordCopyPtrToLram(
                         PortAddr iop_base,
                         ushort s_addr,
-                        ushort * s_buffer,
+                        uchar *s_buffer,
                         int words
 )
 {
-    AscSetChipLramAddr(iop_base, s_addr);
-    DvcOutPortWords(iop_base + IOP_RAM_DATA, s_buffer, words);
+    int    i;
+
+    AscSetChipLramAddr(iop_base, s_addr);
+    for (i = 0; i < 2 * words; i += 2) {
+        /*
+         * On a little-endian system the second argument below
+         * produces a little-endian ushort which is written to
+         * LRAM in little-endian order. On a big-endian system
+         * the second argument produces a big-endian ushort which
+         * is "transparently" byte-swapped by outpw() and written
+         * in little-endian order to LRAM.
+         */
+        outpw(iop_base + IOP_RAM_DATA,
+            ((ushort) s_buffer[i + 1] << 8) | s_buffer[i]);
+    }
     return;
 }
 
+/*
+ * Copy 4 bytes to LRAM.
+ *
+ * The source data is assumed to be in little-endian order in memory
+ * and is maintained in little-endian order when writen to LRAM.
+ */
 STATIC void
-AscMemDWordCopyToLram(
+AscMemDWordCopyPtrToLram(
                          PortAddr iop_base,
                          ushort s_addr,
-                         ASC_DCNT *s_buffer,
+                         uchar *s_buffer,
                          int dwords
 )
 {
+    int       i;
+
     AscSetChipLramAddr(iop_base, s_addr);
-    DvcOutPortDWords(iop_base + IOP_RAM_DATA, s_buffer, dwords);
+    for (i = 0; i < 4 * dwords; i += 4) {
+        outpw(iop_base + IOP_RAM_DATA,
+            ((ushort) s_buffer[i + 1] << 8) | s_buffer[i]); /* LSW */
+        outpw(iop_base + IOP_RAM_DATA,
+            ((ushort) s_buffer[i + 3] << 8) | s_buffer[i + 2]); /* MSW */
+    }
     return;
 }
 
+/*
+ * Copy 2 bytes from LRAM.
+ *
+ * The source data is assumed to be in little-endian order in LRAM
+ * and is maintained in little-endian order when written to memory.
+ */
 STATIC void
-AscMemWordCopyFromLram(
+AscMemWordCopyPtrFromLram(
                           PortAddr iop_base,
                           ushort s_addr,
-                          ushort * d_buffer,
+                          uchar *d_buffer,
                           int words
 )
 {
+    int i;
+    ushort word;
+
     AscSetChipLramAddr(iop_base, s_addr);
-    DvcInPortWords(iop_base + IOP_RAM_DATA, d_buffer, words);
+    for (i = 0; i < 2 * words; i += 2) {
+        word = inpw(iop_base + IOP_RAM_DATA);
+        d_buffer[i] = word & 0xff;
+        d_buffer[i + 1] = (word >> 8) & 0xff;
+    }
     return;
 }
 
@@ -14776,676 +13492,1078 @@
  */
 
 /* a_mcode.h */
+
+/* Microcode buffer is kept after initialization for error recovery. */
 STATIC unsigned char _adv_asc3550_buf[] = {
-  0x00,  0x00,  0x00,  0xf2,  0x00,  0xf0,  0x00,  0x16,  0x00,  0xfc,  0x48,  0xe4,  0x01,  0x00,  0x18,  0xe4,
-  0x00,  0xf6,  0x01,  0xf6,  0x18,  0x80,  0x48,  0x19,  0x02,  0x00,  0xff,  0xff,  0x03,  0xf6,  0x00,  0xfa,
-  0xff,  0x00,  0x82,  0xe7,  0x01,  0xfa,  0x9e,  0xe7,  0x09,  0xe7,  0x3a,  0x0e,  0x00,  0xea,  0x01,  0xe6,
-  0x55,  0xf0,  0x03,  0x00,  0x08,  0x00,  0x18,  0xf4,  0x3e,  0x01,  0x3e,  0x57,  0x04,  0x00,  0x85,  0xf0,
-  0x00,  0xe6,  0x00,  0xec,  0x1e,  0xf0,  0x32,  0xf0,  0x34,  0x19,  0x86,  0xf0,  0xd0,  0x01,  0xd5,  0xf0,
-  0xde,  0x0c,  0x98,  0x57,  0xbc,  0x00,  0x0c,  0x1c,  0x0e,  0x13,  0x38,  0x54,  0xb1,  0xf0,  0xb4,  0x00,
-  0x01,  0xfc,  0x03,  0xfc,  0xd8,  0x0c,  0x00,  0x57,  0x01,  0xf0,  0x02,  0x13,  0x03,  0xe6,  0x10,  0x00,
-  0x18,  0x40,  0x3e,  0x1c,  0x6c,  0x01,  0x6e,  0x01,  0xbd,  0x00,  0xe0,  0x00,  0x02,  0x48,  0x02,  0x80,
-  0x08,  0x12,  0x30,  0xe4,  0x3c,  0x00,  0x4e,  0x01,  0x64,  0x12,  0x80,  0x00,  0x9c,  0x15,  0xbb,  0x00,
-  0x00,  0x4e,  0x01,  0x01,  0x01,  0xea,  0x04,  0x12,  0x9e,  0x0f,  0xb6,  0x00,  0xb9,  0x54,  0xe2,  0x0f,
-  0x00,  0x80,  0x06,  0xf7,  0x10,  0x44,  0x24,  0x01,  0x28,  0x01,  0x32,  0x00,  0x3c,  0x01,  0x3c,  0x56,
-  0x3e,  0x00,  0x4b,  0xe4,  0x4c,  0x1c,  0x68,  0x01,  0x6a,  0x01,  0x70,  0x01,  0x72,  0x01,  0x74,  0x01,
-  0x76,  0x01,  0x78,  0x01,  0xe2,  0x0c,  0x00,  0x01,  0x02,  0xee,  0x02,  0xfc,  0x03,  0x58,  0x03,  0xf7,
-  0x04,  0x80,  0x05,  0xfc,  0x08,  0x44,  0x09,  0xf0,  0x0f,  0x00,  0x1b,  0x80,  0x20,  0x01,  0x38,  0x1c,
-  0x40,  0x00,  0x40,  0x15,  0x4b,  0xf4,  0x4e,  0x1c,  0x5b,  0xf0,  0x5d,  0xf0,  0xaa,  0x00,  0xbb,  0x55,
-  0xbe,  0x00,  0xc0,  0x00,  0xe0,  0x08,  0xe0,  0x14,  0xec,  0x0f,  0x00,  0x4c,  0x00,  0xdc,  0x02,  0x4a,
-  0x05,  0x00,  0x05,  0xf0,  0x05,  0xf8,  0x06,  0x13,  0x08,  0x13,  0x0c,  0x00,  0x0e,  0x47,  0x0e,  0xf7,
-  0x19,  0x00,  0x20,  0x00,  0x2a,  0x01,  0x30,  0x0e,  0x32,  0x1c,  0x36,  0x00,  0x45,  0x5a,  0x59,  0xf0,
-  0x62,  0x0a,  0x69,  0x08,  0x72,  0x0b,  0x83,  0x59,  0xb8,  0xf0,  0xbd,  0x56,  0xcc,  0x12,  0xec,  0x17,
-  0xee,  0x0f,  0xf0,  0x00,  0xf8,  0x17,  0x01,  0x48,  0x02,  0xfa,  0x03,  0xfa,  0x04,  0x10,  0x04,  0xea,
-  0x04,  0xf6,  0x04,  0xfc,  0x05,  0x80,  0x05,  0xe6,  0x06,  0x00,  0x06,  0x12,  0x0a,  0x10,  0x0b,  0xf0,
-  0x0c,  0x10,  0x0c,  0xf0,  0x12,  0x10,  0x26,  0x0e,  0x30,  0x1c,  0x33,  0x00,  0x34,  0x00,  0x38,  0x44,
-  0x40,  0x5c,  0x4a,  0xe4,  0x62,  0x1a,  0x68,  0x08,  0x68,  0x54,  0x83,  0x55,  0x83,  0x5a,  0x8c,  0x14,
-  0x8e,  0x0a,  0x90,  0x14,  0x91,  0x44,  0xa4,  0x00,  0xb0,  0x57,  0xb5,  0x00,  0xba,  0x00,  0xce,  0x45,
-  0xd0,  0x00,  0xd8,  0x16,  0xe1,  0x00,  0xe7,  0x00,  0x00,  0x54,  0x01,  0x58,  0x02,  0x10,  0x02,  0xe6,
-  0x03,  0xa1,  0x04,  0x13,  0x06,  0x83,  0x06,  0xf0,  0x07,  0x00,  0x0a,  0x00,  0x0a,  0x12,  0x0a,  0xf0,
-  0x0c,  0x04,  0x0c,  0x12,  0x0c,  0x90,  0x10,  0x10,  0x10,  0x13,  0x12,  0x1c,  0x17,  0x00,  0x19,  0xe4,
-  0x1a,  0x10,  0x1c,  0x00,  0x1c,  0x12,  0x1d,  0xf7,  0x1e,  0x13,  0x20,  0x1c,  0x20,  0xe7,  0x22,  0x01,
-  0x26,  0x01,  0x2a,  0x12,  0x30,  0xe7,  0x34,  0x1c,  0x36,  0x1c,  0x38,  0x12,  0x41,  0x58,  0x43,  0x48,
-  0x44,  0x55,  0x46,  0x1c,  0x4c,  0x0e,  0x4e,  0xe4,  0x52,  0x14,  0x5c,  0xf0,  0x72,  0x02,  0x74,  0x03,
-  0x77,  0x57,  0x89,  0x48,  0x8e,  0x90,  0x99,  0x00,  0x9b,  0x00,  0x9c,  0x32,  0x9e,  0x00,  0xa8,  0x00,
-  0xb9,  0x00,  0xba,  0x06,  0xbc,  0x12,  0xbf,  0x57,  0xc0,  0x01,  0xfe,  0x9c,  0xf0,  0x26,  0x02,  0xfe,
-  0x00,  0x0d,  0xff,  0x10,  0x00,  0x00,  0xfe,  0xc2,  0x01,  0xfe,  0x56,  0x19,  0x00,  0xfc,  0xfe,  0x80,
-  0x01,  0xff,  0x03,  0x00,  0x00,  0xfe,  0x6a,  0x13,  0xfe,  0x05,  0x05,  0xff,  0x40,  0x00,  0x00,  0x0d,
-  0xff,  0x09,  0x00,  0x00,  0xff,  0x08,  0x01,  0x01,  0xff,  0x10,  0xff,  0xff,  0xff,  0x1f,  0x00,  0x00,
-  0xff,  0x10,  0xff,  0xff,  0xff,  0x0f,  0x00,  0x00,  0xfe,  0x78,  0x56,  0xfe,  0x34,  0x12,  0xff,  0x21,
-  0x00,  0x00,  0xfe,  0x04,  0xf7,  0xfc,  0x2b,  0x51,  0x0c,  0x01,  0xfe,  0xea,  0x0e,  0xfe,  0x04,  0xf7,
-  0xfc,  0x51,  0x0c,  0x1d,  0x2b,  0xfe,  0x3d,  0xf0,  0xfe,  0xf8,  0x01,  0xfe,  0x20,  0xf0,  0xd0,  0x04,
-  0x56,  0x4b,  0x02,  0xfe,  0x1c,  0x0d,  0x01,  0xfe,  0x7c,  0x0d,  0xfe,  0xe9,  0x12,  0x02,  0xfe,  0x04,
-  0x03,  0xfe,  0x28,  0x1c,  0x04,  0xfe,  0xa6,  0x00,  0xfe,  0xdd,  0x12,  0x4e,  0x12,  0xfe,  0xa6,  0x00,
-  0xc5,  0xfe,  0x48,  0xf0,  0xfe,  0x7c,  0x02,  0xfe,  0x49,  0xf0,  0xfe,  0x96,  0x02,  0xfe,  0x4a,  0xf0,
-  0xfe,  0xb4,  0x02,  0xfe,  0x46,  0xf0,  0xfe,  0x46,  0x02,  0xfe,  0x47,  0xf0,  0xfe,  0x4c,  0x02,  0xfe,
-  0x43,  0xf0,  0xfe,  0x3a,  0x02,  0xfe,  0x44,  0xf0,  0xfe,  0x3e,  0x02,  0xfe,  0x45,  0xf0,  0xfe,  0x42,
-  0x02,  0x09,  0x0c,  0x9e,  0x09,  0x06,  0x12,  0xbb,  0x02,  0x26,  0xfe,  0x00,  0x1c,  0xfe,  0xf1,  0x10,
-  0xfe,  0x02,  0x1c,  0xfe,  0xed,  0x10,  0xfe,  0x1e,  0x1c,  0xfe,  0xe9,  0x10,  0x01,  0xfe,  0x4c,  0x17,
-  0xfe,  0xe7,  0x10,  0xfe,  0x06,  0xfc,  0xf7,  0x0e,  0x78,  0x01,  0xab,  0x02,  0x26,  0x17,  0x55,  0x4a,
-  0xbd,  0x01,  0xfe,  0x60,  0x0f,  0x0e,  0x78,  0x01,  0x8b,  0xfe,  0xbd,  0x10,  0x0e,  0x78,  0x01,  0x8b,
-  0xfe,  0xad,  0x10,  0xfe,  0x16,  0x1c,  0xfe,  0x58,  0x1c,  0x09,  0x06,  0x12,  0xbb,  0x2b,  0x22,  0x26,
-  0xfe,  0x3d,  0xf0,  0xfe,  0xf8,  0x01,  0x27,  0xfe,  0x8a,  0x02,  0xfe,  0x5a,  0x1c,  0xd5,  0xfe,  0x14,
-  0x1c,  0x17,  0xfe,  0x30,  0x00,  0x4a,  0xbd,  0x01,  0xfe,  0x50,  0x0f,  0x09,  0x06,  0x12,  0xbb,  0x02,
-  0xfe,  0xc2,  0x01,  0x21,  0x2a,  0x05,  0x10,  0x35,  0xfe,  0x69,  0x10,  0x09,  0x06,  0x12,  0xbb,  0xfe,
-  0x04,  0xec,  0x2a,  0x08,  0x2a,  0x09,  0x3c,  0x1d,  0x01,  0x46,  0x7f,  0xfe,  0x05,  0xf6,  0xf7,  0x01,
-  0xfe,  0x76,  0x16,  0x0a,  0x41,  0x89,  0x38,  0x11,  0x47,  0x1d,  0xca,  0x08,  0x1c,  0x09,  0x43,  0x01,
-  0x71,  0x02,  0x26,  0x0e,  0x3d,  0x01,  0x15,  0x05,  0x10,  0x2c,  0x08,  0x1c,  0x09,  0x43,  0x01,  0x7b,
-  0xfe,  0x28,  0x10,  0x0e,  0xc0,  0x01,  0x15,  0xe6,  0x0e,  0x79,  0x01,  0x15,  0xfe,  0x49,  0x54,  0x74,
-  0xfe,  0x12,  0x03,  0x08,  0x1c,  0x09,  0x43,  0x01,  0x71,  0x02,  0x26,  0x2b,  0x7f,  0xfe,  0x02,  0xe8,
-  0x2f,  0xfb,  0xfe,  0x9e,  0x43,  0xf0,  0xfe,  0x07,  0x4b,  0xfe,  0x20,  0xf0,  0xd0,  0xfe,  0x40,  0x1c,
-  0x22,  0xef,  0xfe,  0x26,  0xf0,  0xfe,  0x70,  0x03,  0xfe,  0xa0,  0xf0,  0xfe,  0x5e,  0x03,  0xfe,  0x11,
-  0xf0,  0xd0,  0xfe,  0x0e,  0x10,  0xfe,  0x9f,  0xf0,  0xfe,  0x7e,  0x03,  0xe9,  0x13,  0xfe,  0x11,  0x00,
-  0x02,  0x62,  0x2b,  0xfe,  0x48,  0x1c,  0xe9,  0x22,  0xef,  0x34,  0xef,  0xfe,  0x82,  0xf0,  0xfe,  0x84,
-  0x03,  0x2d,  0x21,  0xbe,  0x6a,  0x16,  0xbe,  0x0e,  0x79,  0x01,  0x15,  0x6a,  0x7d,  0x08,  0x1c,  0x09,
-  0x43,  0x01,  0x46,  0x11,  0x3d,  0x08,  0x3d,  0x09,  0x99,  0x01,  0x71,  0xf5,  0x11,  0xfe,  0xe4,  0x00,
-  0x2e,  0xfe,  0xca,  0x03,  0x22,  0x32,  0x1f,  0xfe,  0xda,  0x03,  0x01,  0x4c,  0xcb,  0xfe,  0xea,  0x03,
-  0x6b,  0x92,  0xcf,  0xfe,  0xaa,  0x06,  0x02,  0x28,  0x04,  0x78,  0x29,  0x18,  0xfe,  0x1c,  0x05,  0x17,
-  0x85,  0x01,  0x44,  0x01,  0x97,  0x01,  0x9a,  0x34,  0xfe,  0x5c,  0x02,  0x02,  0xee,  0xe9,  0x2b,  0x51,
-  0x19,  0xfe,  0x67,  0x1b,  0xfb,  0xf0,  0xfe,  0x48,  0x1c,  0x8c,  0x01,  0xfa,  0xac,  0xfe,  0x96,  0xf0,
-  0xfe,  0x24,  0x04,  0x2e,  0xfe,  0x28,  0x04,  0x34,  0x26,  0x0e,  0x3d,  0x01,  0x15,  0x05,  0x10,  0x18,
-  0xfe,  0x08,  0x05,  0x3e,  0x90,  0x9f,  0x2f,  0x82,  0x6e,  0x22,  0x32,  0x1f,  0x28,  0x04,  0x78,  0x29,
-  0xfe,  0x10,  0x12,  0x17,  0x85,  0x01,  0x44,  0x34,  0xfe,  0x5c,  0x02,  0x02,  0xee,  0x31,  0xfe,  0xa0,
-  0x00,  0xfe,  0x9b,  0x57,  0xfe,  0x5e,  0x12,  0x0a,  0x07,  0x06,  0xfe,  0x56,  0x12,  0x23,  0x24,  0x91,
-  0x01,  0x0b,  0x82,  0x6e,  0x1f,  0xfe,  0xd8,  0x04,  0x23,  0x24,  0x91,  0x01,  0x0b,  0x1f,  0x28,  0x23,
-  0x24,  0xb3,  0xfe,  0x4c,  0x44,  0xfe,  0x32,  0x12,  0x57,  0xfe,  0x44,  0x48,  0x08,  0xd6,  0xfe,  0x4c,
-  0x54,  0x74,  0xfe,  0x08,  0x05,  0x7f,  0x9f,  0x2f,  0xfe,  0x06,  0x80,  0xfe,  0x48,  0x47,  0xfe,  0x48,
-  0x13,  0x3f,  0x05,  0xfe,  0xcc,  0x00,  0xfe,  0x40,  0x13,  0x0a,  0x07,  0x06,  0xe5,  0xfe,  0x06,  0x10,
-  0x23,  0x24,  0xb3,  0x0a,  0x07,  0x37,  0xda,  0x17,  0xa4,  0x0a,  0x07,  0x06,  0x4b,  0x17,  0xfe,  0x0d,
-  0x00,  0x01,  0x44,  0x34,  0xfe,  0xc0,  0x0c,  0x02,  0x28,  0x39,  0x11,  0xfe,  0xe6,  0x00,  0xfe,  0x1c,
-  0x90,  0xb0,  0x03,  0x17,  0xa4,  0x01,  0x44,  0x34,  0x26,  0x22,  0x26,  0x02,  0xfe,  0x10,  0x05,  0xfe,
-  0x42,  0x5b,  0x51,  0x19,  0xfe,  0x46,  0x59,  0xfb,  0xf0,  0x17,  0x45,  0xfe,  0x07,  0x80,  0xfe,  0x31,
-  0x44,  0x0a,  0x07,  0x0c,  0xfe,  0x78,  0x13,  0xfe,  0x20,  0x80,  0x05,  0x19,  0xfe,  0x70,  0x12,  0x6d,
-  0x07,  0x06,  0xfe,  0x60,  0x13,  0x04,  0xfe,  0xa2,  0x00,  0x29,  0x18,  0xfe,  0xa8,  0x05,  0xfe,  0x31,
-  0xe4,  0x70,  0x6d,  0x07,  0x0c,  0xfe,  0x4a,  0x13,  0x04,  0xfe,  0xa0,  0x00,  0x29,  0xfe,  0x42,  0x12,
-  0x5a,  0x2e,  0xfe,  0x68,  0x05,  0x22,  0x32,  0xf1,  0x01,  0x0b,  0x25,  0xfe,  0xc0,  0x05,  0x11,  0xfe,
-  0xe3,  0x00,  0x2d,  0x6d,  0xfe,  0x4a,  0xf0,  0xfe,  0x92,  0x05,  0xfe,  0x49,  0xf0,  0xfe,  0x8c,  0x05,
-  0xa8,  0x20,  0xfe,  0x21,  0x00,  0xa6,  0x20,  0xfe,  0x22,  0x00,  0x9e,  0x20,  0x89,  0xfe,  0x09,  0x48,
-  0x01,  0x0b,  0x25,  0xfe,  0xc0,  0x05,  0xfe,  0xe2,  0x08,  0x6d,  0x07,  0xd9,  0x4b,  0x01,  0x96,  0x20,
-  0x06,  0x16,  0xe0,  0x4a,  0xfe,  0x27,  0x01,  0x0a,  0x07,  0x37,  0xe1,  0x4e,  0x01,  0xb9,  0x17,  0xa4,
-  0x0a,  0x07,  0x06,  0x4b,  0x17,  0xfe,  0x0d,  0x00,  0x01,  0x44,  0x01,  0x97,  0x01,  0x9a,  0x34,  0xfe,
-  0xc0,  0x0c,  0x02,  0x28,  0x04,  0xfe,  0x9c,  0x00,  0x29,  0xfe,  0x3e,  0x12,  0x04,  0x53,  0x29,  0xfe,
-  0x36,  0x13,  0x4e,  0x01,  0xb9,  0x25,  0xfe,  0x38,  0x06,  0x0e,  0x06,  0x6d,  0x07,  0x1a,  0xfe,  0x02,
-  0x12,  0x77,  0x01,  0xfe,  0x26,  0x14,  0x1f,  0xfe,  0x2e,  0x06,  0x11,  0xc2,  0x01,  0x4c,  0x11,  0xfe,
-  0xe5,  0x00,  0x04,  0x53,  0xbc,  0x0f,  0x53,  0x04,  0xf6,  0x29,  0xfe,  0x62,  0x12,  0x04,  0x4d,  0x29,
-  0xfe,  0x5a,  0x13,  0x01,  0xfe,  0x9e,  0x18,  0x01,  0xfe,  0xf0,  0x18,  0xe7,  0xa3,  0x1a,  0x08,  0x63,
-  0xff,  0x02,  0x00,  0x57,  0x66,  0x7e,  0x1b,  0x50,  0xc9,  0xa3,  0x6c,  0x4e,  0x01,  0xb9,  0x25,  0xfe,
-  0xa2,  0x06,  0x6d,  0x07,  0x1e,  0xa5,  0x95,  0x0e,  0x55,  0x01,  0xfe,  0x54,  0x14,  0x1f,  0xfe,  0x98,
-  0x06,  0x11,  0xc2,  0x01,  0x4c,  0x11,  0xfe,  0xe5,  0x00,  0x04,  0x4d,  0xbc,  0x0f,  0x4d,  0x09,  0x06,
-  0x01,  0xb9,  0xf5,  0x73,  0x8c,  0x01,  0xfa,  0xac,  0x11,  0xfe,  0xe2,  0x00,  0x2e,  0xf9,  0x22,  0x32,
-  0xcf,  0xfe,  0xd6,  0x06,  0x81,  0xfe,  0x74,  0x07,  0xcb,  0xfe,  0x7c,  0x07,  0x6b,  0x92,  0x02,  0x28,
-  0x0a,  0x07,  0x0c,  0xfe,  0x2e,  0x12,  0x14,  0x19,  0x01,  0x0b,  0x14,  0x00,  0x01,  0x0b,  0x14,  0x00,
-  0x01,  0x0b,  0x14,  0x00,  0x01,  0x0b,  0xfe,  0x99,  0xa4,  0x01,  0x0b,  0x14,  0x00,  0x02,  0xfe,  0x4c,
-  0x08,  0x68,  0x07,  0x1e,  0xe5,  0x0a,  0x07,  0x1e,  0xfe,  0x30,  0x13,  0x14,  0xfe,  0x1b,  0x00,  0x01,
-  0x0b,  0x14,  0x00,  0x01,  0x0b,  0x14,  0x00,  0x01,  0x0b,  0x14,  0x00,  0x01,  0x0b,  0x14,  0x06,  0x01,
-  0x0b,  0x14,  0x00,  0x02,  0xfe,  0x2a,  0x0b,  0x77,  0xfe,  0x9a,  0x81,  0x67,  0x89,  0xfe,  0x09,  0x6f,
-  0xfe,  0x93,  0x45,  0x18,  0xfe,  0x84,  0x07,  0x2e,  0xfe,  0x5c,  0x07,  0x22,  0x32,  0xcf,  0xfe,  0x54,
-  0x07,  0x6b,  0x92,  0x81,  0xfe,  0x74,  0x07,  0x02,  0x28,  0x01,  0x4c,  0x02,  0xf9,  0x14,  0x1a,  0x02,
-  0xf9,  0xfe,  0x9c,  0xf7,  0xfe,  0xec,  0x07,  0xfe,  0x2c,  0x90,  0xfe,  0xae,  0x90,  0x75,  0xfe,  0xd2,
-  0x07,  0x0f,  0x5d,  0x12,  0x5e,  0x0a,  0x41,  0x70,  0x38,  0x01,  0xfe,  0x34,  0x18,  0x05,  0x10,  0x83,
-  0xfe,  0x83,  0xe7,  0x88,  0xa6,  0xfe,  0x03,  0x40,  0x0a,  0x41,  0x45,  0x38,  0x01,  0xc1,  0xaf,  0xfe,
-  0x1f,  0x40,  0x16,  0x61,  0x01,  0xfe,  0xde,  0x12,  0xfe,  0x08,  0x50,  0xfe,  0x8a,  0x50,  0xfe,  0x34,
-  0x51,  0xfe,  0xb6,  0x51,  0xfe,  0x08,  0x90,  0xfe,  0x8a,  0x90,  0x0f,  0x5b,  0x12,  0x5c,  0xd2,  0xf2,
-  0x0f,  0x3a,  0x12,  0x3b,  0xfe,  0x60,  0x10,  0x0a,  0x07,  0x70,  0xe1,  0xfe,  0x2c,  0x90,  0xfe,  0xae,
-  0x90,  0x0f,  0x5d,  0x12,  0x5e,  0x0a,  0x07,  0x45,  0xc9,  0x01,  0xc1,  0xfe,  0x1f,  0x80,  0x16,  0x61,
-  0xfe,  0x34,  0x90,  0xfe,  0xb6,  0x90,  0x0f,  0x5f,  0x12,  0x60,  0xfe,  0x08,  0x90,  0xfe,  0x8a,  0x90,
-  0x0f,  0x5b,  0x12,  0x5c,  0xa2,  0x07,  0x45,  0x2c,  0xd2,  0xf2,  0x0f,  0x3a,  0x12,  0x3b,  0xa8,  0xfe,
-  0x28,  0x90,  0xfe,  0xaa,  0x90,  0x0f,  0x3a,  0x12,  0x3b,  0x0f,  0x42,  0x12,  0x58,  0x0a,  0x41,  0x1a,
-  0x38,  0x2b,  0x08,  0x80,  0x2e,  0xfe,  0x62,  0x08,  0xfe,  0x9e,  0xf0,  0xfe,  0x76,  0x08,  0x9b,  0x18,
-  0x32,  0x2b,  0x52,  0xfe,  0xed,  0x10,  0xa7,  0xfe,  0x9a,  0x08,  0xa9,  0xfe,  0xb6,  0x08,  0x81,  0xfe,
-  0x8e,  0x08,  0xcb,  0xfe,  0x94,  0x08,  0x6b,  0x92,  0x02,  0x28,  0x01,  0x4c,  0xfe,  0xc9,  0x10,  0x14,
-  0x1a,  0xfe,  0xc9,  0x10,  0x68,  0x07,  0x06,  0xfe,  0x10,  0x12,  0x68,  0x07,  0x0c,  0x40,  0x0a,  0x07,
-  0x0c,  0xfe,  0x7e,  0x12,  0xfe,  0x2e,  0x1c,  0xaa,  0x68,  0x07,  0x06,  0x40,  0x68,  0x07,  0x0c,  0xfe,
-  0x6a,  0x12,  0xfe,  0x2c,  0x1c,  0xa2,  0x07,  0x45,  0xd4,  0xa2,  0x41,  0x45,  0xfe,  0x05,  0x40,  0xd2,
-  0xf2,  0xfe,  0x28,  0x50,  0xfe,  0xaa,  0x50,  0xfe,  0xaa,  0xf0,  0xfe,  0x4e,  0x09,  0xfe,  0xac,  0xf0,
-  0xfe,  0xee,  0x08,  0xfe,  0x92,  0x10,  0xe3,  0xfe,  0xf3,  0x10,  0xfe,  0xad,  0xf0,  0xfe,  0xfa,  0x08,
-  0x02,  0xfe,  0x5c,  0x0a,  0xe4,  0xfe,  0xe7,  0x10,  0xfe,  0x2b,  0xf0,  0xb8,  0xfe,  0x6b,  0x18,  0x1b,
-  0xfe,  0x00,  0xfe,  0xda,  0xc5,  0xfe,  0xd2,  0xf0,  0xb8,  0xfe,  0x76,  0x18,  0x1b,  0x19,  0x18,  0xb8,
-  0x04,  0xdf,  0x1b,  0x06,  0x18,  0xb8,  0xa7,  0x7a,  0xa9,  0x7a,  0xe3,  0xe4,  0xfe,  0xb1,  0x10,  0x8c,
-  0x5a,  0x39,  0x17,  0xa4,  0x01,  0x44,  0x13,  0xfe,  0x35,  0x00,  0x34,  0x62,  0x13,  0x8d,  0x02,  0x62,
-  0xfe,  0x74,  0x18,  0x1b,  0xfe,  0x00,  0xf8,  0x18,  0x7a,  0x51,  0x1e,  0x01,  0xfe,  0x7c,  0x0d,  0xd1,
-  0x08,  0x1c,  0x09,  0x43,  0x01,  0x71,  0x21,  0x2f,  0x3e,  0x51,  0x19,  0x02,  0x7a,  0xfe,  0x98,  0x80,
-  0xd7,  0x0c,  0x27,  0xfe,  0x3e,  0x0a,  0x0a,  0x07,  0x70,  0xfe,  0x82,  0x12,  0x0a,  0x07,  0x1a,  0xfe,
-  0x66,  0x13,  0x21,  0x61,  0x6a,  0xc8,  0xfe,  0x83,  0x80,  0xfe,  0xc8,  0x44,  0xfe,  0x2e,  0x13,  0xfe,
-  0x04,  0x91,  0xfe,  0x86,  0x91,  0x64,  0x2f,  0xfe,  0x40,  0x59,  0xfe,  0xc1,  0x59,  0x75,  0xfe,  0xea,
-  0x08,  0x04,  0x5d,  0x30,  0x5e,  0x0f,  0xae,  0x12,  0x8d,  0x9c,  0x5d,  0x9d,  0x5e,  0x01,  0xc1,  0xaf,
-  0x64,  0x2f,  0x16,  0x61,  0xa1,  0x42,  0x69,  0x58,  0x65,  0x5f,  0x31,  0x60,  0xe8,  0xfe,  0xe5,  0x55,
-  0xfe,  0x04,  0xfa,  0x42,  0xfe,  0x05,  0xfa,  0x58,  0x01,  0xfe,  0xde,  0x12,  0xfe,  0x36,  0x10,  0x2d,
-  0x0f,  0xae,  0x0f,  0x8d,  0x65,  0x5f,  0x31,  0x60,  0xaa,  0x0a,  0x07,  0x1a,  0x18,  0xfe,  0xea,  0x08,
-  0x65,  0x3a,  0x31,  0x3b,  0x0a,  0x07,  0xfe,  0xf7,  0x00,  0x38,  0x04,  0x5b,  0x30,  0x5c,  0xfe,  0x10,
-  0x58,  0xfe,  0x91,  0x58,  0xfe,  0x14,  0x59,  0xfe,  0x95,  0x59,  0x02,  0x7a,  0x0a,  0x07,  0x1a,  0x18,
-  0xfe,  0xea,  0x08,  0x0a,  0x07,  0xfe,  0xf7,  0x00,  0x38,  0xfe,  0x3a,  0x55,  0xfe,  0x19,  0x81,  0x77,
-  0xfe,  0x10,  0x90,  0xfe,  0x92,  0x90,  0xfe,  0xd7,  0x10,  0x3f,  0x05,  0xc3,  0x18,  0xfe,  0xf6,  0x08,
-  0x11,  0xc3,  0xfe,  0x98,  0x80,  0xd7,  0x0c,  0xfe,  0x14,  0x13,  0x04,  0x3a,  0x30,  0x3b,  0x75,  0xfe,
-  0xf6,  0x08,  0xfe,  0x0c,  0x58,  0xfe,  0x8d,  0x58,  0x02,  0x7a,  0x2d,  0x4e,  0xfe,  0x19,  0x80,  0xfe,
-  0xf1,  0x10,  0x0a,  0x07,  0x0c,  0xa5,  0xfe,  0x6c,  0x19,  0xfe,  0x19,  0x41,  0xfe,  0x8e,  0x10,  0xfe,
-  0x6c,  0x19,  0x9c,  0x3a,  0xfe,  0xed,  0x19,  0x9d,  0x3b,  0xfe,  0x0c,  0x51,  0xfe,  0x8e,  0x51,  0xfe,
-  0x6b,  0x18,  0x1b,  0xfe,  0x00,  0xff,  0x35,  0xfe,  0x74,  0x10,  0xc5,  0xfe,  0xd2,  0xf0,  0xfe,  0xd6,
-  0x0a,  0xfe,  0x76,  0x18,  0x1b,  0x19,  0xce,  0x04,  0xdf,  0x1b,  0x06,  0x84,  0x13,  0xfe,  0x16,  0x00,
-  0x02,  0x62,  0xfe,  0xd1,  0xf0,  0xfe,  0xe8,  0x0a,  0x17,  0x80,  0x01,  0x44,  0x13,  0xd6,  0xfe,  0x42,
-  0x10,  0xfe,  0xce,  0xf0,  0xfe,  0xee,  0x0a,  0xfe,  0x3c,  0x10,  0xfe,  0xcd,  0xf0,  0xfe,  0xfa,  0x0a,
-  0x13,  0xfe,  0x22,  0x00,  0x02,  0x62,  0xfe,  0xcb,  0xf0,  0xfe,  0x06,  0x0b,  0x13,  0xfe,  0x24,  0x00,
-  0x02,  0x62,  0xfe,  0xd0,  0xf0,  0xfe,  0x10,  0x0b,  0x13,  0x88,  0xd8,  0xfe,  0xcf,  0xf0,  0xfe,  0x1a,
-  0x0b,  0x13,  0x89,  0xd3,  0xfe,  0xcc,  0xf0,  0xfe,  0x2a,  0x0b,  0xfe,  0x84,  0x80,  0xd7,  0x1a,  0x4b,
-  0x13,  0xfe,  0x12,  0x00,  0x2b,  0x08,  0x80,  0x2e,  0xfe,  0x30,  0x0b,  0xfe,  0x9e,  0xf0,  0xfe,  0x44,
-  0x0b,  0x9b,  0x18,  0x32,  0x2b,  0x52,  0xfe,  0xed,  0x10,  0xa7,  0x28,  0xa9,  0x28,  0x2b,  0xf5,  0x2e,
-  0xfe,  0x50,  0x0b,  0x22,  0x32,  0x81,  0xfe,  0x6c,  0x0b,  0x6b,  0x92,  0xa7,  0xfe,  0xec,  0x07,  0xa9,
-  0xfe,  0xec,  0x07,  0x02,  0x28,  0x01,  0x4c,  0xfe,  0xdb,  0x10,  0x11,  0xfe,  0xe8,  0x00,  0xe3,  0xe4,
-  0x8c,  0x82,  0x6e,  0xfe,  0x89,  0xf0,  0x28,  0x23,  0x24,  0xfe,  0xe9,  0x09,  0x01,  0x0b,  0x82,  0x6e,
-  0x1f,  0x28,  0x23,  0x24,  0x91,  0x34,  0xfe,  0xa8,  0x0b,  0x22,  0x32,  0x02,  0xfe,  0x9c,  0x0b,  0x9b,
-  0x40,  0x13,  0xfe,  0x42,  0x00,  0x02,  0x62,  0xa0,  0x06,  0xfe,  0x81,  0x49,  0x96,  0x0a,  0x07,  0x0c,
-  0xfe,  0x5a,  0x13,  0x13,  0x00,  0x59,  0x0c,  0xfe,  0x6a,  0x12,  0x59,  0xfe,  0x28,  0x00,  0x27,  0xfe,
-  0xee,  0x0c,  0x0e,  0x79,  0x01,  0x15,  0x05,  0x00,  0x84,  0x36,  0xfe,  0x28,  0x00,  0x02,  0xfe,  0xee,
-  0x0c,  0x01,  0x97,  0x01,  0x9a,  0x0e,  0xc0,  0x01,  0xfe,  0x44,  0x0e,  0xb2,  0x08,  0x3d,  0x09,  0x99,
-  0x01,  0x46,  0x11,  0x47,  0x08,  0x1c,  0x09,  0x43,  0x01,  0x7b,  0x02,  0x26,  0x13,  0xfe,  0x44,  0x00,
-  0x59,  0x0c,  0xa5,  0x36,  0x0c,  0xfe,  0xc0,  0x10,  0x01,  0x96,  0x36,  0x0c,  0xfe,  0xb6,  0x10,  0x01,
-  0x96,  0xfe,  0x19,  0x82,  0xfe,  0x34,  0x46,  0xfe,  0x0a,  0x13,  0x36,  0x0c,  0x13,  0xfe,  0x43,  0x00,
-  0xfe,  0xa2,  0x10,  0x0a,  0x41,  0x0c,  0x38,  0x01,  0x97,  0x01,  0x9a,  0xb2,  0x08,  0x3d,  0x09,  0x99,
-  0x01,  0x46,  0x11,  0x47,  0x08,  0x1c,  0x09,  0x43,  0x01,  0x7b,  0x51,  0x0c,  0xb2,  0x1d,  0xca,  0x02,
-  0xfe,  0x48,  0x03,  0x0a,  0x07,  0x0c,  0xce,  0x36,  0x0c,  0x13,  0x00,  0xfe,  0x54,  0x10,  0x68,  0x07,
-  0x1e,  0xfe,  0x50,  0x12,  0x0a,  0x07,  0x1e,  0xfe,  0x48,  0x13,  0xfe,  0x1c,  0x1c,  0xfe,  0x9d,  0xf0,
-  0xfe,  0xac,  0x0c,  0xfe,  0x1c,  0x1c,  0xfe,  0x9d,  0xf0,  0xfe,  0xb2,  0x0c,  0x0a,  0x41,  0x1e,  0x38,
-  0xfe,  0x95,  0x10,  0x13,  0xfe,  0x15,  0x00,  0xfe,  0x04,  0xe6,  0x0c,  0x77,  0xfe,  0x26,  0x10,  0x13,
-  0xfe,  0x13,  0x00,  0xd3,  0x13,  0xfe,  0x47,  0x00,  0xa6,  0x13,  0xfe,  0x41,  0x00,  0x9e,  0x13,  0xfe,
-  0x24,  0x00,  0x04,  0x78,  0x29,  0x27,  0xee,  0x77,  0xfe,  0x04,  0xe6,  0x1e,  0xfe,  0x9d,  0x41,  0xfe,
-  0x1c,  0x42,  0xb2,  0x01,  0xea,  0x02,  0x26,  0xd5,  0x17,  0x0c,  0x4a,  0xf4,  0xdd,  0x17,  0xfe,  0x31,
-  0x00,  0x4a,  0xbd,  0x01,  0xfe,  0x50,  0x0f,  0x02,  0xfe,  0xc2,  0x01,  0x1d,  0xfe,  0x06,  0xec,  0xf8,
-  0x86,  0x36,  0x37,  0xbf,  0x35,  0x1d,  0xfe,  0x06,  0xea,  0xf8,  0xfe,  0x47,  0x4b,  0x95,  0xfe,  0x75,
-  0x57,  0x04,  0x56,  0xfe,  0x98,  0x56,  0xfe,  0x28,  0x12,  0x0e,  0x79,  0xfe,  0xf4,  0x14,  0x4e,  0xe6,
-  0x0e,  0xc0,  0xfe,  0xea,  0x14,  0xfe,  0x49,  0x54,  0x8f,  0xfe,  0x62,  0x0d,  0x0e,  0x1c,  0xfe,  0xde,
-  0x14,  0xfe,  0x44,  0x48,  0x02,  0xfe,  0x48,  0x03,  0x0e,  0x56,  0xfe,  0xc8,  0x14,  0x86,  0x36,  0x37,
-  0xbf,  0x35,  0x1d,  0xfe,  0xce,  0x47,  0xfe,  0xbd,  0x13,  0x02,  0x26,  0x21,  0x2a,  0x05,  0x10,  0xfe,
-  0x78,  0x12,  0x2d,  0x16,  0x55,  0x16,  0xad,  0x21,  0x47,  0x4e,  0x4a,  0x47,  0x9b,  0xfe,  0x0c,  0x13,
-  0xfe,  0xbc,  0xf0,  0xfe,  0xfe,  0x0d,  0x08,  0x06,  0x16,  0x55,  0x01,  0xfe,  0x06,  0x16,  0x04,  0xfe,
-  0x38,  0x01,  0x30,  0xfe,  0x3a,  0x01,  0x75,  0xfe,  0x02,  0x0e,  0x04,  0xfe,  0x38,  0x01,  0x1b,  0xfe,
-  0xf0,  0xff,  0x0f,  0xfe,  0x60,  0x01,  0x04,  0xfe,  0x3a,  0x01,  0x0f,  0xfe,  0x62,  0x01,  0x20,  0x06,
-  0x16,  0x47,  0xfe,  0x04,  0xec,  0x2a,  0x08,  0x2a,  0x09,  0x3c,  0x1d,  0x01,  0x46,  0x7f,  0xfe,  0x05,
-  0xf6,  0xfe,  0x34,  0x01,  0x01,  0xfe,  0x76,  0x16,  0x11,  0x47,  0xca,  0x08,  0x06,  0x03,  0x2d,  0x03,
-  0x21,  0x55,  0xfe,  0xf7,  0x12,  0x21,  0xad,  0x6a,  0x16,  0xad,  0x05,  0x80,  0xfe,  0x93,  0x13,  0xfe,
-  0x24,  0x1c,  0x17,  0x19,  0x4a,  0xf4,  0xdd,  0xfe,  0xd9,  0x10,  0x93,  0xfe,  0x03,  0xdc,  0xfe,  0x73,
-  0x57,  0xfe,  0x80,  0x5d,  0x03,  0x93,  0xfe,  0x03,  0xdc,  0xfe,  0x5b,  0x57,  0xfe,  0x80,  0x5d,  0x03,
-  0xfe,  0x03,  0x57,  0x93,  0x2d,  0xfe,  0x00,  0xcc,  0x03,  0xfe,  0x03,  0x57,  0x93,  0x7d,  0x03,  0x01,
-  0xfe,  0xae,  0x16,  0x3f,  0x05,  0x47,  0xfe,  0x0a,  0x13,  0x08,  0x1c,  0x09,  0x43,  0xd3,  0x01,  0x97,
-  0x01,  0x9a,  0x08,  0x3d,  0x09,  0x99,  0x01,  0x46,  0x11,  0xfe,  0xe9,  0x00,  0x0a,  0x07,  0x89,  0xfe,
-  0x52,  0x13,  0x01,  0xfe,  0x38,  0x16,  0xfe,  0x1e,  0x1c,  0xfe,  0x14,  0x90,  0x0f,  0xfe,  0x64,  0x01,
-  0xfe,  0x16,  0x90,  0x0f,  0xfe,  0x66,  0x01,  0x0a,  0x07,  0x45,  0xe5,  0xfe,  0x03,  0x80,  0x52,  0x3e,
-  0x11,  0x76,  0x08,  0x2a,  0x09,  0x3c,  0x1d,  0x90,  0x01,  0x71,  0xfe,  0x62,  0x08,  0x6a,  0x3e,  0x11,
-  0x76,  0x08,  0x2a,  0x09,  0x3c,  0x1d,  0x90,  0x01,  0x71,  0x64,  0x2f,  0x11,  0x76,  0x08,  0x2a,  0x09,
-  0x3c,  0x1d,  0x90,  0x01,  0x7b,  0x03,  0xfe,  0x08,  0x1c,  0x04,  0xfe,  0xac,  0x00,  0xfe,  0x06,  0x58,
-  0x04,  0xfe,  0xae,  0x00,  0xfe,  0x07,  0x58,  0x04,  0xfe,  0xb0,  0x00,  0xfe,  0x08,  0x58,  0x04,  0xfe,
-  0xb2,  0x00,  0xfe,  0x09,  0x58,  0xfe,  0x0a,  0x1c,  0x20,  0x6c,  0x16,  0xf8,  0x2d,  0x0f,  0x53,  0x0f,
-  0x4d,  0x20,  0x10,  0x16,  0x2a,  0x16,  0x3c,  0x57,  0xa0,  0xd6,  0x08,  0x2a,  0x09,  0x3c,  0x1d,  0x01,
-  0x7b,  0x7f,  0x11,  0x76,  0xfe,  0x14,  0x56,  0xfe,  0xd6,  0xf0,  0xfe,  0x2a,  0x0f,  0xd5,  0x8c,  0xfe,
-  0x14,  0x1c,  0xfe,  0x10,  0x1c,  0xfe,  0x18,  0x1c,  0x03,  0x1d,  0xfe,  0x0c,  0x14,  0x86,  0xfe,  0x07,
-  0xe6,  0x37,  0xfe,  0xce,  0x47,  0xfe,  0xf5,  0x13,  0x03,  0x01,  0x96,  0x0e,  0x3d,  0x01,  0x15,  0x05,
-  0x10,  0x2c,  0x0e,  0x1c,  0x01,  0x15,  0x05,  0x10,  0xda,  0xfe,  0x44,  0x58,  0x3e,  0xfe,  0x01,  0xec,
-  0xbd,  0xfe,  0x9e,  0x40,  0xfe,  0x9d,  0xe7,  0x00,  0xfe,  0x9c,  0xe7,  0x1e,  0x9f,  0x2f,  0x01,  0xea,
-  0xfe,  0xc9,  0x10,  0x03,  0x2b,  0x82,  0x6e,  0x23,  0x24,  0xb3,  0x05,  0x1e,  0xfe,  0x48,  0x12,  0x05,
-  0x0c,  0xfe,  0x4c,  0x12,  0x05,  0x19,  0xfe,  0x30,  0x12,  0x05,  0xcc,  0x18,  0xfe,  0xf4,  0x10,  0x05,
-  0xfe,  0x23,  0x00,  0x18,  0xfe,  0x00,  0x11,  0x05,  0x06,  0x18,  0xfe,  0x5e,  0x11,  0x05,  0x1a,  0xfe,
-  0x12,  0x12,  0x05,  0x00,  0x18,  0x28,  0x17,  0xcc,  0x01,  0x44,  0xc6,  0x39,  0x01,  0x0b,  0x81,  0x4c,
-  0x03,  0x39,  0x11,  0xfe,  0xcc,  0x00,  0x02,  0x26,  0x39,  0x3f,  0x05,  0xc3,  0xfe,  0xe3,  0x13,  0x65,
-  0x3a,  0x31,  0x3b,  0x75,  0xfe,  0xb2,  0x10,  0x0a,  0x07,  0x70,  0xfe,  0x72,  0x12,  0xa1,  0x42,  0x69,
-  0x58,  0xe8,  0xfe,  0xe5,  0x55,  0x8f,  0xfe,  0x7c,  0x10,  0x21,  0x61,  0xfe,  0x26,  0x13,  0x04,  0xae,
-  0x30,  0x8d,  0x75,  0xfe,  0xd2,  0x0c,  0x0f,  0x5d,  0x12,  0x5e,  0x2d,  0x0f,  0xae,  0x0f,  0x8d,  0x01,
-  0xc1,  0x20,  0x6c,  0x52,  0x16,  0x61,  0x01,  0xfe,  0xde,  0x12,  0xa1,  0x42,  0x69,  0x58,  0xfe,  0x04,
-  0x55,  0xfe,  0xa5,  0x55,  0xfe,  0x04,  0xfa,  0x42,  0xfe,  0x05,  0xfa,  0x58,  0xfe,  0x91,  0x10,  0x04,
-  0x5f,  0x30,  0x60,  0xfe,  0x40,  0x56,  0xfe,  0xe1,  0x56,  0x0f,  0x5f,  0x12,  0x60,  0xa8,  0xa1,  0x42,
-  0x69,  0x58,  0xe8,  0xfe,  0xe5,  0x55,  0x04,  0x5b,  0x30,  0x5c,  0xfe,  0x00,  0x56,  0xfe,  0xa1,  0x56,
-  0x0f,  0x5b,  0x12,  0x5c,  0x0a,  0x07,  0x70,  0xfe,  0x1e,  0x12,  0x21,  0x61,  0xfe,  0x1f,  0x40,  0x04,
-  0x5d,  0x30,  0x5e,  0xfe,  0x2c,  0x50,  0xfe,  0xae,  0x50,  0x04,  0x5f,  0x30,  0x60,  0xfe,  0x34,  0x50,
-  0xfe,  0xb6,  0x50,  0x04,  0x5b,  0x30,  0x5c,  0xfe,  0x08,  0x50,  0xfe,  0x8a,  0x50,  0x04,  0x3a,  0x30,
-  0x3b,  0xfe,  0x28,  0x50,  0xfe,  0xaa,  0x50,  0x02,  0x98,  0x20,  0x06,  0x16,  0xf3,  0x02,  0x7c,  0x39,
-  0x01,  0x0b,  0x1f,  0x4f,  0x23,  0x24,  0xb3,  0x05,  0x06,  0x27,  0x4f,  0x3f,  0x05,  0xc3,  0x27,  0x7c,
-  0x01,  0xfa,  0x1b,  0x50,  0x18,  0x4f,  0x0a,  0x07,  0x0c,  0xdc,  0x65,  0x3a,  0x31,  0x3b,  0xfe,  0x0a,
-  0x55,  0x35,  0xfe,  0x8b,  0x55,  0x9c,  0x3a,  0x9d,  0x3b,  0xfe,  0x0c,  0x51,  0xfe,  0x8e,  0x51,  0x02,
-  0x7c,  0xfe,  0x19,  0x81,  0xfe,  0x0a,  0x45,  0xfe,  0x19,  0x41,  0x02,  0x7c,  0x39,  0x01,  0x0b,  0x1f,
-  0xfe,  0xf6,  0x0f,  0x23,  0x24,  0xfe,  0xe9,  0x09,  0x59,  0x19,  0xfe,  0x94,  0x12,  0x59,  0x0c,  0x4b,
-  0x02,  0x4f,  0x2e,  0xfe,  0x7e,  0x11,  0x22,  0x32,  0x1f,  0xfe,  0xf6,  0x0f,  0x23,  0x24,  0x91,  0x05,
-  0x19,  0x27,  0x4f,  0x01,  0x0b,  0x1f,  0xfe,  0xf6,  0x0f,  0x23,  0x24,  0xfe,  0xe8,  0x09,  0x57,  0x04,
-  0xfe,  0x9c,  0x00,  0x29,  0x35,  0xfe,  0xbb,  0x45,  0x59,  0x00,  0x40,  0x36,  0x06,  0xa0,  0x50,  0xfe,
-  0xc0,  0x14,  0xfe,  0xf8,  0x14,  0xac,  0x3f,  0x05,  0xc2,  0xfe,  0x16,  0x13,  0x04,  0xf6,  0x29,  0xce,
-  0x04,  0x4d,  0x29,  0x35,  0x5a,  0x02,  0x7c,  0xfe,  0xc0,  0x5d,  0xfe,  0xe4,  0x14,  0xfe,  0x03,  0x17,
-  0x04,  0x53,  0xbc,  0x0f,  0x53,  0x5a,  0x39,  0x01,  0x0b,  0x25,  0x98,  0x01,  0xfe,  0x26,  0x14,  0x02,
-  0x98,  0x2e,  0x40,  0x22,  0x32,  0x1f,  0x4f,  0x23,  0x24,  0x91,  0x05,  0x06,  0x27,  0x4f,  0xfe,  0xf6,
-  0x14,  0xfe,  0x42,  0x58,  0xfe,  0x70,  0x14,  0xfe,  0x92,  0x14,  0xac,  0xfe,  0x4a,  0xf4,  0x0c,  0x18,
-  0x4f,  0xfe,  0x4a,  0xf4,  0x06,  0xd1,  0x3f,  0x05,  0xc2,  0xc9,  0x02,  0x7c,  0x04,  0x4d,  0xbc,  0x0f,
-  0x4d,  0x5a,  0x39,  0x01,  0x0b,  0x25,  0x98,  0x01,  0xfe,  0x54,  0x14,  0x02,  0x98,  0x25,  0xfe,  0x70,
-  0x12,  0x73,  0xf1,  0x73,  0x03,  0x34,  0xfe,  0x6c,  0x12,  0x6b,  0xfe,  0x6c,  0x12,  0x5a,  0x39,  0x01,
-  0x0b,  0xfe,  0xe3,  0x10,  0x08,  0x63,  0xff,  0x02,  0x00,  0x57,  0x66,  0x7e,  0x1b,  0xfe,  0xff,  0x7f,
-  0xfe,  0x30,  0x56,  0xfe,  0x00,  0x5c,  0x03,  0x08,  0x63,  0xff,  0x02,  0x00,  0x57,  0x66,  0x7e,  0x1b,
-  0x50,  0xfe,  0x30,  0x56,  0xfe,  0x00,  0x5c,  0x03,  0x08,  0x63,  0xff,  0x02,  0x00,  0x57,  0x66,  0x7e,
-  0x03,  0x08,  0x63,  0xff,  0x02,  0x00,  0x57,  0x66,  0x7e,  0xfe,  0x0b,  0x58,  0x03,  0x0e,  0x53,  0x01,
-  0x8b,  0x0e,  0x4d,  0x01,  0x8b,  0x03,  0xc8,  0x1b,  0x10,  0xff,  0x03,  0x00,  0x54,  0xfe,  0x00,  0xf4,
-  0x1a,  0x66,  0xfe,  0x00,  0x7d,  0xfe,  0x01,  0x7d,  0xfe,  0x02,  0x7d,  0xfe,  0x03,  0x7c,  0x64,  0x2f,
-  0x0f,  0x5b,  0x12,  0x5c,  0x9c,  0x5f,  0x9d,  0x60,  0x03,  0xfe,  0x62,  0x18,  0xfe,  0x82,  0x5a,  0xfe,
-  0xe1,  0x1a,  0xb6,  0xfe,  0x02,  0x58,  0x03,  0x01,  0xfe,  0x9e,  0x18,  0xfe,  0x42,  0x48,  0x77,  0x57,
-  0x95,  0x01,  0x0b,  0x1f,  0xfe,  0x1e,  0x14,  0x23,  0x24,  0xfe,  0xe9,  0x09,  0xfe,  0xc1,  0x59,  0x01,
-  0x0b,  0x1f,  0xfe,  0x1e,  0x14,  0x23,  0x24,  0xfe,  0xe8,  0x0a,  0x04,  0xf6,  0x29,  0xfe,  0xc4,  0x12,
-  0x2d,  0xb1,  0x1e,  0xdc,  0x59,  0xcd,  0x74,  0xfe,  0x6c,  0x13,  0x4b,  0x08,  0x06,  0x09,  0xcd,  0xa0,
-  0xfe,  0x00,  0x10,  0xfe,  0x78,  0x10,  0xff,  0x02,  0x83,  0x55,  0xa6,  0xff,  0x02,  0x83,  0x55,  0xb1,
-  0x19,  0xfe,  0x12,  0x13,  0x72,  0xfe,  0x30,  0x00,  0x8f,  0xfe,  0xc6,  0x13,  0x09,  0x85,  0x08,  0x06,
-  0xfe,  0x56,  0x10,  0xb1,  0x0c,  0xfe,  0x16,  0x13,  0x72,  0xfe,  0x64,  0x00,  0x8f,  0xfe,  0xc6,  0x13,
-  0x0e,  0xfe,  0x64,  0x00,  0x09,  0x88,  0x08,  0x06,  0xfe,  0x28,  0x10,  0xb1,  0x06,  0xfe,  0x60,  0x13,
-  0x72,  0xfe,  0xc8,  0x00,  0x8f,  0xfe,  0xc6,  0x13,  0x0e,  0xfe,  0xc8,  0x00,  0x09,  0x55,  0x08,  0x06,
-  0xa8,  0x72,  0xfe,  0x90,  0x01,  0xed,  0xfe,  0xd2,  0x13,  0x95,  0xaa,  0xfe,  0x43,  0xf4,  0xad,  0xfe,
-  0x56,  0xf0,  0xfe,  0xe4,  0x13,  0xfe,  0x04,  0xf4,  0x63,  0xfe,  0x43,  0xf4,  0x88,  0xfe,  0xf3,  0x10,
-  0xb0,  0x01,  0xfe,  0xae,  0x12,  0x1b,  0x50,  0xd4,  0xfe,  0x00,  0x17,  0xfe,  0x4d,  0xe4,  0x6c,  0xed,
-  0xfe,  0x18,  0x14,  0xa3,  0x6c,  0xfe,  0x14,  0x10,  0xfe,  0x00,  0x17,  0xfe,  0x4d,  0xe4,  0x1a,  0xed,
-  0xfe,  0x18,  0x14,  0xa3,  0x1a,  0x9e,  0x57,  0x95,  0x08,  0x06,  0xfe,  0xb4,  0x56,  0xfe,  0xc3,  0x58,
-  0x03,  0x57,  0x08,  0x0c,  0x03,  0x14,  0x06,  0x01,  0x0b,  0x25,  0xec,  0x14,  0x0c,  0x01,  0x0b,  0x25,
-  0xec,  0x14,  0x19,  0x01,  0x0b,  0x25,  0xec,  0x73,  0xfe,  0x89,  0x49,  0x01,  0x0b,  0x03,  0x14,  0x06,
-  0x01,  0x0b,  0x25,  0xb7,  0x14,  0x19,  0x01,  0x0b,  0x25,  0xb7,  0x14,  0x06,  0x01,  0x0b,  0x25,  0xb7,
-  0xfe,  0x89,  0x49,  0x01,  0x0b,  0x25,  0xb7,  0x73,  0xfe,  0x89,  0x4a,  0x01,  0x0b,  0x03,  0x57,  0x03,
-  0x21,  0xe0,  0x05,  0x06,  0xfe,  0x44,  0x13,  0xaf,  0x16,  0xe0,  0xfe,  0x49,  0xf4,  0x00,  0x4b,  0x73,
-  0xc6,  0x5a,  0xfe,  0x01,  0xec,  0xfe,  0x27,  0x01,  0xf1,  0x01,  0x0b,  0x3f,  0x05,  0xfe,  0xe3,  0x00,
-  0xfe,  0x20,  0x13,  0x1f,  0xfe,  0xd6,  0x14,  0x2d,  0x16,  0xf3,  0x01,  0x4c,  0x21,  0xf3,  0x05,  0x06,
-  0x40,  0x0a,  0x41,  0x06,  0x38,  0x03,  0x0f,  0x54,  0x12,  0x8a,  0xfe,  0x43,  0x58,  0x01,  0x15,  0x05,
-  0x10,  0xfe,  0x1e,  0x12,  0x48,  0xe7,  0x8e,  0x01,  0x2c,  0xfe,  0x90,  0x4d,  0xde,  0x10,  0xfe,  0xc5,
-  0x59,  0x01,  0x2c,  0xfe,  0x8d,  0x56,  0xb6,  0x48,  0x03,  0x48,  0x31,  0x8a,  0x01,  0x15,  0x48,  0x8e,
-  0x01,  0x2c,  0xe2,  0x10,  0xde,  0x10,  0x31,  0x54,  0x72,  0x1c,  0x84,  0x0e,  0x56,  0x01,  0xab,  0x03,
-  0x0f,  0x54,  0x12,  0x8a,  0xfe,  0xc3,  0x58,  0x01,  0x15,  0x05,  0x10,  0xfe,  0x1a,  0x12,  0x48,  0xe7,
-  0x8e,  0x01,  0x2c,  0xe2,  0x10,  0xfe,  0x80,  0x4d,  0xfe,  0xc5,  0x59,  0x01,  0x2c,  0x48,  0x03,  0x48,
-  0x31,  0x54,  0x01,  0x15,  0x48,  0x8e,  0x01,  0x2c,  0xe2,  0x10,  0xde,  0x10,  0x31,  0x54,  0x72,  0x1c,
-  0x84,  0x0e,  0x56,  0x01,  0xab,  0x03,  0x0f,  0x54,  0x12,  0x8a,  0xfe,  0x43,  0x58,  0x01,  0x15,  0xfe,
-  0x42,  0x48,  0x8e,  0x01,  0x2c,  0xfe,  0xc0,  0x5a,  0xb0,  0xfe,  0x00,  0xcd,  0xfe,  0x01,  0xcc,  0xfe,
-  0x4a,  0x46,  0xdc,  0x93,  0x7d,  0x05,  0x10,  0xfe,  0x2e,  0x13,  0x69,  0x54,  0xfe,  0x4d,  0xf4,  0x1c,
-  0xfe,  0x1c,  0x13,  0x0e,  0x56,  0x01,  0x8b,  0xaa,  0xfe,  0x40,  0x4c,  0xfe,  0xc5,  0x58,  0x01,  0x2c,
-  0xfe,  0x00,  0x07,  0x7d,  0x05,  0x10,  0x84,  0x69,  0x8a,  0xfe,  0x05,  0x57,  0xfe,  0x08,  0x10,  0xfe,
-  0x45,  0x58,  0x01,  0x2c,  0xfe,  0x8d,  0x56,  0xb6,  0xfe,  0x80,  0x4c,  0xfe,  0x05,  0x17,  0x03,  0x09,
-  0x10,  0x6f,  0x67,  0xfe,  0x60,  0x01,  0xfe,  0x18,  0xdf,  0xfe,  0x19,  0xde,  0xfe,  0x24,  0x1c,  0xdb,
-  0x37,  0x94,  0xfe,  0x1a,  0x16,  0x01,  0xfe,  0x28,  0x17,  0xfe,  0x0c,  0x13,  0x87,  0x37,  0x67,  0xfe,
-  0x2c,  0x01,  0xfe,  0x2f,  0x19,  0x03,  0xba,  0x27,  0xfe,  0x0a,  0x16,  0xfe,  0xe2,  0x10,  0x09,  0x10,
-  0x6f,  0x04,  0xfe,  0x64,  0x01,  0xfe,  0x00,  0xf4,  0x1a,  0xfe,  0x18,  0x58,  0x04,  0xfe,  0x66,  0x01,
-  0xfe,  0x19,  0x58,  0x87,  0x1a,  0xfe,  0x3c,  0x90,  0xfe,  0x30,  0xf4,  0x06,  0xfe,  0x3c,  0x50,  0x67,
-  0xfe,  0x38,  0x00,  0xfe,  0x0f,  0x79,  0xfe,  0x1c,  0xf7,  0x1a,  0x94,  0xfe,  0x64,  0x16,  0xfe,  0xbe,
-  0x14,  0x35,  0x03,  0xba,  0x27,  0xfe,  0x3c,  0x16,  0xfe,  0xa4,  0x10,  0x09,  0x10,  0x6f,  0xb6,  0xfe,
-  0x18,  0xdf,  0xfe,  0x19,  0xdf,  0xdb,  0x42,  0x94,  0xfe,  0x86,  0x16,  0xfe,  0x9c,  0x14,  0xfe,  0x18,
-  0x13,  0x87,  0x42,  0x67,  0x1e,  0xfe,  0xaf,  0x19,  0xfe,  0x98,  0xe7,  0x00,  0xa2,  0x07,  0xfe,  0x7f,
-  0x00,  0xfe,  0x05,  0x40,  0x03,  0xba,  0x27,  0xfe,  0x7a,  0x16,  0xfe,  0x6c,  0x10,  0x09,  0x10,  0x6f,
-  0xfe,  0x30,  0xbc,  0xfe,  0xb2,  0xbc,  0x87,  0xd9,  0x67,  0x1e,  0xfe,  0x0f,  0x79,  0xfe,  0x1c,  0xf7,
-  0xd9,  0x94,  0xfe,  0xc6,  0x16,  0xfe,  0x5c,  0x14,  0x35,  0x03,  0xba,  0x27,  0xfe,  0xb2,  0x16,  0xfe,
-  0x42,  0x10,  0xfe,  0x02,  0xf6,  0x10,  0x6f,  0xfe,  0x18,  0xfe,  0x5d,  0xfe,  0x19,  0xfe,  0x5e,  0xc8,
-  0xdb,  0x45,  0x94,  0xfe,  0xec,  0x16,  0xfe,  0x36,  0x14,  0xfe,  0x1c,  0x13,  0x87,  0x45,  0x4e,  0xfe,
-  0x83,  0x58,  0xfe,  0xaf,  0x19,  0xfe,  0x80,  0xe7,  0x10,  0xfe,  0x81,  0xe7,  0x10,  0x11,  0xfe,  0xdd,
-  0x00,  0x64,  0x2f,  0x03,  0x64,  0x2f,  0xfe,  0x12,  0x45,  0x27,  0xfe,  0xdc,  0x16,  0x17,  0x06,  0x4a,
-  0xf4,  0xdd,  0x02,  0x26,  0xfe,  0x39,  0xf0,  0xfe,  0x30,  0x17,  0x2d,  0x03,  0xfe,  0x7e,  0x18,  0x1b,
-  0x19,  0x83,  0x08,  0x0d,  0x03,  0x6f,  0x04,  0xdf,  0x1b,  0x06,  0xfe,  0xef,  0x12,  0xfe,  0xe1,  0x10,
-  0x1d,  0x0e,  0x1c,  0x01,  0x15,  0x05,  0x10,  0x40,  0x3e,  0xfe,  0x78,  0x14,  0xfe,  0x34,  0x12,  0x50,
-  0x86,  0x36,  0x37,  0xbf,  0xfe,  0xe9,  0x13,  0x1d,  0x0e,  0x3d,  0x01,  0x15,  0x05,  0x10,  0x40,  0x3e,
-  0xfe,  0x56,  0x14,  0xe1,  0x50,  0x86,  0x36,  0x37,  0xbf,  0xfe,  0xe9,  0x13,  0x09,  0x0c,  0x03,  0xfe,
-  0x9c,  0xe7,  0x0c,  0x13,  0xfe,  0x15,  0x00,  0x90,  0x9f,  0x2f,  0x01,  0xea,  0x09,  0x06,  0x03,  0x0a,
-  0x41,  0x37,  0x38,  0x08,  0x3d,  0x09,  0x99,  0x01,  0x46,  0x11,  0x47,  0x08,  0x1c,  0x09,  0x43,  0x01,
-  0x7b,  0x09,  0x06,  0x03,  0xfe,  0x38,  0x90,  0xfe,  0xba,  0x90,  0x65,  0xf7,  0x31,  0x76,  0xfe,  0x48,
-  0x55,  0x35,  0xfe,  0xc9,  0x55,  0x03,  0x21,  0xbe,  0x52,  0x16,  0xbe,  0x03,  0x0e,  0xc0,  0x01,  0x15,
-  0xe6,  0x0e,  0x79,  0x01,  0x15,  0xfe,  0x49,  0x44,  0x27,  0xfe,  0x26,  0x18,  0x0e,  0x1c,  0x01,  0x15,
-  0x05,  0x10,  0x40,  0x0e,  0x56,  0x01,  0xab,  0x0e,  0x79,  0x01,  0x15,  0x52,  0x7d,  0x03,  0xfe,  0x40,
-  0x5e,  0xfe,  0xe2,  0x08,  0xfe,  0xc0,  0x4c,  0x21,  0x3c,  0x05,  0x10,  0xfe,  0x52,  0x12,  0x3e,  0x05,
-  0x00,  0xfe,  0x18,  0x12,  0xfe,  0xe1,  0x18,  0xfe,  0x19,  0xf4,  0xfe,  0x7f,  0x00,  0xd4,  0xfe,  0xe2,
-  0x08,  0x52,  0x3e,  0x3f,  0x05,  0x76,  0xa5,  0xfe,  0x82,  0x48,  0xfe,  0x01,  0x80,  0xfe,  0xd7,  0x10,
-  0xfe,  0xc4,  0x48,  0x08,  0x2a,  0x09,  0x3c,  0xfe,  0x40,  0x5f,  0x1d,  0x01,  0x46,  0x11,  0xfe,  0xdd,
-  0x00,  0xfe,  0x14,  0x46,  0x08,  0x2a,  0x09,  0x3c,  0x01,  0x46,  0x11,  0xfe,  0xdd,  0x00,  0xfe,  0x40,
-  0x4a,  0x6a,  0xfe,  0x06,  0x17,  0xfe,  0x01,  0x07,  0xfe,  0x82,  0x48,  0xfe,  0x04,  0x17,  0x03,  0xeb,
-  0x19,  0x74,  0xfe,  0xae,  0x18,  0x04,  0xfe,  0x90,  0x00,  0xfe,  0x3a,  0x45,  0xfe,  0x2c,  0x10,  0xeb,
-  0xcc,  0x74,  0xfe,  0xc0,  0x18,  0x04,  0xfe,  0x92,  0x00,  0xc7,  0x1e,  0xd8,  0xeb,  0xfe,  0x0b,  0x00,
-  0x74,  0xfe,  0xd2,  0x18,  0x04,  0xfe,  0x94,  0x00,  0xc7,  0x1a,  0xfe,  0x08,  0x10,  0x04,  0xfe,  0x96,
-  0x00,  0xc7,  0x85,  0xfe,  0x4e,  0x45,  0xd1,  0xfe,  0x0a,  0x45,  0xff,  0x04,  0x68,  0x54,  0xfe,  0xf1,
-  0x10,  0x1b,  0x6c,  0x03,  0x05,  0x80,  0xfe,  0x5a,  0xf0,  0xfe,  0xfe,  0x18,  0x20,  0xfe,  0x09,  0x00,
-  0xfe,  0x34,  0x10,  0x05,  0x1e,  0xfe,  0x5a,  0xf0,  0xfe,  0x0c,  0x19,  0x20,  0xcd,  0xfe,  0x26,  0x10,
-  0x05,  0x19,  0x83,  0x20,  0x85,  0xd8,  0x05,  0x0c,  0x83,  0x20,  0x88,  0xfe,  0x0e,  0x10,  0x05,  0x06,
-  0x83,  0x20,  0x55,  0xc6,  0xaf,  0x03,  0x17,  0xfe,  0x09,  0x00,  0x01,  0x44,  0x2e,  0xfe,  0x3c,  0x19,
-  0x04,  0x6e,  0xb0,  0x03,  0x22,  0xfe,  0x54,  0x19,  0xfe,  0x14,  0xf0,  0x0b,  0x2e,  0xfe,  0x50,  0x19,
-  0x03,  0xff,  0x15,  0x00,  0x00,
+  0x00,  0x00,  0x00,  0xf2,  0x00,  0xf0,  0x00,  0x16,  0x18,  0xe4,  0x00,  0xfc,  0x01,  0x00,  0x48,  0xe4,
+  0xbe,  0x18,  0x18,  0x80,  0x03,  0xf6,  0x02,  0x00,  0x00,  0xfa,  0xff,  0xff,  0x28,  0x0e,  0x9e,  0xe7,
+  0xff,  0x00,  0x82,  0xe7,  0x00,  0xea,  0x00,  0xf6,  0x01,  0xe6,  0x09,  0xe7,  0x55,  0xf0,  0x01,  0xf6,
+  0x01,  0xfa,  0x08,  0x00,  0x03,  0x00,  0x04,  0x00,  0x18,  0xf4,  0x10,  0x00,  0x00,  0xec,  0x85,  0xf0,
+  0xbc,  0x00,  0xd5,  0xf0,  0x8e,  0x0c,  0x38,  0x54,  0x00,  0xe6,  0x1e,  0xf0,  0x86,  0xf0,  0xb4,  0x00,
+  0x98,  0x57,  0xd0,  0x01,  0x0c,  0x1c,  0x3e,  0x1c,  0x0c,  0x00,  0xbb,  0x00,  0xaa,  0x18,  0x02,  0x80,
+  0x32,  0xf0,  0x01,  0xfc,  0x88,  0x0c,  0xc6,  0x12,  0x02,  0x13,  0x18,  0x40,  0x00,  0x57,  0x01,  0xea,
+  0x3c,  0x00,  0x6c,  0x01,  0x6e,  0x01,  0x04,  0x12,  0x3e,  0x57,  0x00,  0x80,  0x03,  0xe6,  0xb6,  0x00,
+  0xc0,  0x00,  0x01,  0x01,  0x3e,  0x01,  0xda,  0x0f,  0x22,  0x10,  0x08,  0x12,  0x02,  0x4a,  0xb9,  0x54,
+  0x03,  0x58,  0x1b,  0x80,  0x30,  0xe4,  0x4b,  0xe4,  0x20,  0x00,  0x32,  0x00,  0x3e,  0x00,  0x80,  0x00,
+  0x24,  0x01,  0x3c,  0x01,  0x68,  0x01,  0x6a,  0x01,  0x70,  0x01,  0x72,  0x01,  0x74,  0x01,  0x76,  0x01,
+  0x78,  0x01,  0x62,  0x0a,  0x92,  0x0c,  0x2c,  0x10,  0x2e,  0x10,  0x06,  0x13,  0x4c,  0x1c,  0xbb,  0x55,
+  0x3c,  0x56,  0x04,  0x80,  0x4a,  0xe4,  0x02,  0xee,  0x5b,  0xf0,  0xb1,  0xf0,  0x03,  0xf7,  0x06,  0xf7,
+  0x03,  0xfc,  0x0f,  0x00,  0x40,  0x00,  0xbe,  0x00,  0x00,  0x01,  0xb0,  0x08,  0x30,  0x13,  0x64,  0x15,
+  0x32,  0x1c,  0x38,  0x1c,  0x4e,  0x1c,  0x10,  0x44,  0x02,  0x48,  0x00,  0x4c,  0x04,  0xea,  0x5d,  0xf0,
+  0x04,  0xf6,  0x02,  0xfc,  0x05,  0x00,  0x34,  0x00,  0x36,  0x00,  0x98,  0x00,  0xcc,  0x00,  0x20,  0x01,
+  0x4e,  0x01,  0x4e,  0x0b,  0x1e,  0x0e,  0x0c,  0x10,  0x0a,  0x12,  0x04,  0x13,  0x40,  0x13,  0x30,  0x1c,
+  0x00,  0x4e,  0xbd,  0x56,  0x06,  0x83,  0x00,  0xdc,  0x05,  0xf0,  0x09,  0xf0,  0x59,  0xf0,  0xa7,  0xf0,
+  0xb8,  0xf0,  0x0e,  0xf7,  0x06,  0x00,  0x19,  0x00,  0x33,  0x00,  0x9b,  0x00,  0xa4,  0x00,  0xb5,  0x00,
+  0xba,  0x00,  0xd0,  0x00,  0xe1,  0x00,  0xe7,  0x00,  0xde,  0x03,  0x56,  0x0a,  0x14,  0x0e,  0x02,  0x10,
+  0x04,  0x10,  0x0a,  0x10,  0x36,  0x10,  0x0a,  0x13,  0x12,  0x13,  0x52,  0x13,  0x10,  0x15,  0x14,  0x15,
+  0xac,  0x16,  0x20,  0x1c,  0x34,  0x1c,  0x36,  0x1c,  0x08,  0x44,  0x38,  0x44,  0x91,  0x44,  0x0a,  0x45,
+  0x48,  0x46,  0x01,  0x48,  0x68,  0x54,  0x83,  0x55,  0xb0,  0x57,  0x01,  0x58,  0x83,  0x59,  0x05,  0xe6,
+  0x0b,  0xf0,  0x0c,  0xf0,  0x5c,  0xf0,  0x4b,  0xf4,  0x04,  0xf8,  0x05,  0xf8,  0x02,  0xfa,  0x03,  0xfa,
+  0x04,  0xfc,  0x05,  0xfc,  0x07,  0x00,  0x0a,  0x00,  0x0d,  0x00,  0x1c,  0x00,  0x9e,  0x00,  0xa8,  0x00,
+  0xaa,  0x00,  0xb9,  0x00,  0xe0,  0x00,  0x22,  0x01,  0x26,  0x01,  0x79,  0x01,  0x7a,  0x01,  0xc0,  0x01,
+  0xc2,  0x01,  0x7c,  0x02,  0x5a,  0x03,  0xea,  0x04,  0xe8,  0x07,  0x68,  0x08,  0x69,  0x08,  0xba,  0x08,
+  0xe9,  0x09,  0x06,  0x0b,  0x3a,  0x0e,  0x00,  0x10,  0x1a,  0x10,  0xed,  0x10,  0xf1,  0x10,  0x06,  0x12,
+  0x0c,  0x13,  0x16,  0x13,  0x1e,  0x13,  0x82,  0x13,  0x42,  0x14,  0xd6,  0x14,  0x8a,  0x15,  0xc6,  0x17,
+  0xd2,  0x17,  0x6b,  0x18,  0x12,  0x1c,  0x46,  0x1c,  0x9c,  0x32,  0x00,  0x40,  0x0e,  0x47,  0x48,  0x47,
+  0x41,  0x48,  0x89,  0x48,  0x80,  0x4c,  0x00,  0x54,  0x44,  0x55,  0xe5,  0x55,  0x14,  0x56,  0x77,  0x57,
+  0xbf,  0x57,  0x40,  0x5c,  0x06,  0x80,  0x08,  0x90,  0x03,  0xa1,  0xfe,  0x9c,  0xf0,  0x29,  0x02,  0xfe,
+  0xb8,  0x0c,  0xff,  0x10,  0x00,  0x00,  0xd0,  0xfe,  0xcc,  0x18,  0x00,  0xcf,  0xfe,  0x80,  0x01,  0xff,
+  0x03,  0x00,  0x00,  0xfe,  0x93,  0x15,  0xfe,  0x0f,  0x05,  0xff,  0x38,  0x00,  0x00,  0xfe,  0x57,  0x24,
+  0x00,  0xfe,  0x48,  0x00,  0x4f,  0xff,  0x04,  0x00,  0x00,  0x10,  0xff,  0x09,  0x00,  0x00,  0xff,  0x08,
+  0x01,  0x01,  0xff,  0x08,  0xff,  0xff,  0xff,  0x27,  0x00,  0x00,  0xff,  0x10,  0xff,  0xff,  0xff,  0x0f,
+  0x00,  0x00,  0xfe,  0x78,  0x56,  0xfe,  0x34,  0x12,  0xff,  0x21,  0x00,  0x00,  0xfe,  0x04,  0xf7,  0xcf,
+  0x2a,  0x67,  0x0b,  0x01,  0xfe,  0xce,  0x0e,  0xfe,  0x04,  0xf7,  0xcf,  0x67,  0x0b,  0x3c,  0x2a,  0xfe,
+  0x3d,  0xf0,  0xfe,  0x02,  0x02,  0xfe,  0x20,  0xf0,  0x9c,  0xfe,  0x91,  0xf0,  0xfe,  0xf0,  0x01,  0xfe,
+  0x90,  0xf0,  0xfe,  0xf0,  0x01,  0xfe,  0x8f,  0xf0,  0x9c,  0x05,  0x51,  0x3b,  0x02,  0xfe,  0xd4,  0x0c,
+  0x01,  0xfe,  0x44,  0x0d,  0xfe,  0xdd,  0x12,  0xfe,  0xfc,  0x10,  0xfe,  0x28,  0x1c,  0x05,  0xfe,  0xa6,
+  0x00,  0xfe,  0xd3,  0x12,  0x47,  0x18,  0xfe,  0xa6,  0x00,  0xb5,  0xfe,  0x48,  0xf0,  0xfe,  0x86,  0x02,
+  0xfe,  0x49,  0xf0,  0xfe,  0xa0,  0x02,  0xfe,  0x4a,  0xf0,  0xfe,  0xbe,  0x02,  0xfe,  0x46,  0xf0,  0xfe,
+  0x50,  0x02,  0xfe,  0x47,  0xf0,  0xfe,  0x56,  0x02,  0xfe,  0x43,  0xf0,  0xfe,  0x44,  0x02,  0xfe,  0x44,
+  0xf0,  0xfe,  0x48,  0x02,  0xfe,  0x45,  0xf0,  0xfe,  0x4c,  0x02,  0x17,  0x0b,  0xa0,  0x17,  0x06,  0x18,
+  0x96,  0x02,  0x29,  0xfe,  0x00,  0x1c,  0xde,  0xfe,  0x02,  0x1c,  0xdd,  0xfe,  0x1e,  0x1c,  0xfe,  0xe9,
+  0x10,  0x01,  0xfe,  0x20,  0x17,  0xfe,  0xe7,  0x10,  0xfe,  0x06,  0xfc,  0xc7,  0x0a,  0x6b,  0x01,  0x9e,
+  0x02,  0x29,  0x14,  0x4d,  0x37,  0x97,  0x01,  0xfe,  0x64,  0x0f,  0x0a,  0x6b,  0x01,  0x82,  0xfe,  0xbd,
+  0x10,  0x0a,  0x6b,  0x01,  0x82,  0xfe,  0xad,  0x10,  0xfe,  0x16,  0x1c,  0xfe,  0x58,  0x1c,  0x17,  0x06,
+  0x18,  0x96,  0x2a,  0x25,  0x29,  0xfe,  0x3d,  0xf0,  0xfe,  0x02,  0x02,  0x21,  0xfe,  0x94,  0x02,  0xfe,
+  0x5a,  0x1c,  0xea,  0xfe,  0x14,  0x1c,  0x14,  0xfe,  0x30,  0x00,  0x37,  0x97,  0x01,  0xfe,  0x54,  0x0f,
+  0x17,  0x06,  0x18,  0x96,  0x02,  0xd0,  0x1e,  0x20,  0x07,  0x10,  0x34,  0xfe,  0x69,  0x10,  0x17,  0x06,
+  0x18,  0x96,  0xfe,  0x04,  0xec,  0x20,  0x46,  0x3d,  0x12,  0x20,  0xfe,  0x05,  0xf6,  0xc7,  0x01,  0xfe,
+  0x52,  0x16,  0x09,  0x4a,  0x4c,  0x35,  0x11,  0x2d,  0x3c,  0x8a,  0x01,  0xe6,  0x02,  0x29,  0x0a,  0x40,
+  0x01,  0x0e,  0x07,  0x00,  0x5d,  0x01,  0x6f,  0xfe,  0x18,  0x10,  0xfe,  0x41,  0x58,  0x0a,  0x99,  0x01,
+  0x0e,  0xfe,  0xc8,  0x54,  0x64,  0xfe,  0x0c,  0x03,  0x01,  0xe6,  0x02,  0x29,  0x2a,  0x46,  0xfe,  0x02,
+  0xe8,  0x27,  0xf8,  0xfe,  0x9e,  0x43,  0xf7,  0xfe,  0x27,  0xf0,  0xfe,  0xdc,  0x01,  0xfe,  0x07,  0x4b,
+  0xfe,  0x20,  0xf0,  0x9c,  0xfe,  0x40,  0x1c,  0x25,  0xd2,  0xfe,  0x26,  0xf0,  0xfe,  0x56,  0x03,  0xfe,
+  0xa0,  0xf0,  0xfe,  0x44,  0x03,  0xfe,  0x11,  0xf0,  0x9c,  0xfe,  0xef,  0x10,  0xfe,  0x9f,  0xf0,  0xfe,
+  0x64,  0x03,  0xeb,  0x0f,  0xfe,  0x11,  0x00,  0x02,  0x5a,  0x2a,  0xfe,  0x48,  0x1c,  0xeb,  0x09,  0x04,
+  0x1d,  0xfe,  0x18,  0x13,  0x23,  0x1e,  0x98,  0xac,  0x12,  0x98,  0x0a,  0x40,  0x01,  0x0e,  0xac,  0x75,
+  0x01,  0xfe,  0xbc,  0x15,  0x11,  0xca,  0x25,  0xd2,  0xfe,  0x01,  0xf0,  0xd2,  0xfe,  0x82,  0xf0,  0xfe,
+  0x92,  0x03,  0xec,  0x11,  0xfe,  0xe4,  0x00,  0x65,  0xfe,  0xa4,  0x03,  0x25,  0x32,  0x1f,  0xfe,  0xb4,
+  0x03,  0x01,  0x43,  0xfe,  0x06,  0xf0,  0xfe,  0xc4,  0x03,  0x8d,  0x81,  0xfe,  0x0a,  0xf0,  0xfe,  0x7a,
+  0x06,  0x02,  0x22,  0x05,  0x6b,  0x28,  0x16,  0xfe,  0xf6,  0x04,  0x14,  0x2c,  0x01,  0x33,  0x8f,  0xfe,
+  0x66,  0x02,  0x02,  0xd1,  0xeb,  0x2a,  0x67,  0x1a,  0xfe,  0x67,  0x1b,  0xf8,  0xf7,  0xfe,  0x48,  0x1c,
+  0x70,  0x01,  0x6e,  0x87,  0x0a,  0x40,  0x01,  0x0e,  0x07,  0x00,  0x16,  0xd3,  0x0a,  0xca,  0x01,  0x0e,
+  0x74,  0x60,  0x59,  0x76,  0x27,  0x05,  0x6b,  0x28,  0xfe,  0x10,  0x12,  0x14,  0x2c,  0x01,  0x33,  0x8f,
+  0xfe,  0x66,  0x02,  0x02,  0xd1,  0xbc,  0x7d,  0xbd,  0x7f,  0x25,  0x22,  0x65,  0xfe,  0x3c,  0x04,  0x1f,
+  0xfe,  0x38,  0x04,  0x68,  0xfe,  0xa0,  0x00,  0xfe,  0x9b,  0x57,  0xfe,  0x4e,  0x12,  0x2b,  0xff,  0x02,
+  0x00,  0x10,  0x01,  0x08,  0x1f,  0xfe,  0xe0,  0x04,  0x2b,  0x01,  0x08,  0x1f,  0x22,  0x30,  0x2e,  0xd5,
+  0xfe,  0x4c,  0x44,  0xfe,  0x4c,  0x12,  0x60,  0xfe,  0x44,  0x48,  0x13,  0x2c,  0xfe,  0x4c,  0x54,  0x64,
+  0xd3,  0x46,  0x76,  0x27,  0xfa,  0xef,  0xfe,  0x62,  0x13,  0x09,  0x04,  0x1d,  0xfe,  0x2a,  0x13,  0x2f,
+  0x07,  0x7e,  0xa5,  0xfe,  0x20,  0x10,  0x13,  0x2c,  0xfe,  0x4c,  0x54,  0x64,  0xd3,  0xfa,  0xef,  0x86,
+  0x09,  0x04,  0x1d,  0xfe,  0x08,  0x13,  0x2f,  0x07,  0x7e,  0x6e,  0x09,  0x04,  0x1d,  0xfe,  0x1c,  0x12,
+  0x14,  0x92,  0x09,  0x04,  0x06,  0x3b,  0x14,  0xc4,  0x01,  0x33,  0x8f,  0xfe,  0x70,  0x0c,  0x02,  0x22,
+  0x2b,  0x11,  0xfe,  0xe6,  0x00,  0xfe,  0x1c,  0x90,  0xf9,  0x03,  0x14,  0x92,  0x01,  0x33,  0x02,  0x29,
+  0xfe,  0x42,  0x5b,  0x67,  0x1a,  0xfe,  0x46,  0x59,  0xf8,  0xf7,  0xfe,  0x87,  0x80,  0xfe,  0x31,  0xe4,
+  0x4f,  0x09,  0x04,  0x0b,  0xfe,  0x78,  0x13,  0xfe,  0x20,  0x80,  0x07,  0x1a,  0xfe,  0x70,  0x12,  0x49,
+  0x04,  0x06,  0xfe,  0x60,  0x13,  0x05,  0xfe,  0xa2,  0x00,  0x28,  0x16,  0xfe,  0x80,  0x05,  0xfe,  0x31,
+  0xe4,  0x6a,  0x49,  0x04,  0x0b,  0xfe,  0x4a,  0x13,  0x05,  0xfe,  0xa0,  0x00,  0x28,  0xfe,  0x42,  0x12,
+  0x5e,  0x01,  0x08,  0x25,  0x32,  0xf1,  0x01,  0x08,  0x26,  0xfe,  0x98,  0x05,  0x11,  0xfe,  0xe3,  0x00,
+  0x23,  0x49,  0xfe,  0x4a,  0xf0,  0xfe,  0x6a,  0x05,  0xfe,  0x49,  0xf0,  0xfe,  0x64,  0x05,  0x83,  0x24,
+  0xfe,  0x21,  0x00,  0xa1,  0x24,  0xfe,  0x22,  0x00,  0xa0,  0x24,  0x4c,  0xfe,  0x09,  0x48,  0x01,  0x08,
+  0x26,  0xfe,  0x98,  0x05,  0xfe,  0xe2,  0x08,  0x49,  0x04,  0xc5,  0x3b,  0x01,  0x86,  0x24,  0x06,  0x12,
+  0xcc,  0x37,  0xfe,  0x27,  0x01,  0x09,  0x04,  0x1d,  0xfe,  0x22,  0x12,  0x47,  0x01,  0xa7,  0x14,  0x92,
+  0x09,  0x04,  0x06,  0x3b,  0x14,  0xc4,  0x01,  0x33,  0x8f,  0xfe,  0x70,  0x0c,  0x02,  0x22,  0x05,  0xfe,
+  0x9c,  0x00,  0x28,  0xfe,  0x3e,  0x12,  0x05,  0x50,  0x28,  0xfe,  0x36,  0x13,  0x47,  0x01,  0xa7,  0x26,
+  0xfe,  0x08,  0x06,  0x0a,  0x06,  0x49,  0x04,  0x19,  0xfe,  0x02,  0x12,  0x5f,  0x01,  0xfe,  0xaa,  0x14,
+  0x1f,  0xfe,  0xfe,  0x05,  0x11,  0x9a,  0x01,  0x43,  0x11,  0xfe,  0xe5,  0x00,  0x05,  0x50,  0xb4,  0x0c,
+  0x50,  0x05,  0xc6,  0x28,  0xfe,  0x62,  0x12,  0x05,  0x3f,  0x28,  0xfe,  0x5a,  0x13,  0x01,  0xfe,  0x14,
+  0x18,  0x01,  0xfe,  0x66,  0x18,  0xfe,  0x43,  0x48,  0xb7,  0x19,  0x13,  0x6c,  0xff,  0x02,  0x00,  0x57,
+  0x48,  0x8b,  0x1c,  0x3d,  0x85,  0xb7,  0x69,  0x47,  0x01,  0xa7,  0x26,  0xfe,  0x72,  0x06,  0x49,  0x04,
+  0x1b,  0xdf,  0x89,  0x0a,  0x4d,  0x01,  0xfe,  0xd8,  0x14,  0x1f,  0xfe,  0x68,  0x06,  0x11,  0x9a,  0x01,
+  0x43,  0x11,  0xfe,  0xe5,  0x00,  0x05,  0x3f,  0xb4,  0x0c,  0x3f,  0x17,  0x06,  0x01,  0xa7,  0xec,  0x72,
+  0x70,  0x01,  0x6e,  0x87,  0x11,  0xfe,  0xe2,  0x00,  0x01,  0x08,  0x25,  0x32,  0xfe,  0x0a,  0xf0,  0xfe,
+  0xa6,  0x06,  0x8c,  0xfe,  0x5c,  0x07,  0xfe,  0x06,  0xf0,  0xfe,  0x64,  0x07,  0x8d,  0x81,  0x02,  0x22,
+  0x09,  0x04,  0x0b,  0xfe,  0x2e,  0x12,  0x15,  0x1a,  0x01,  0x08,  0x15,  0x00,  0x01,  0x08,  0x15,  0x00,
+  0x01,  0x08,  0x15,  0x00,  0x01,  0x08,  0xfe,  0x99,  0xa4,  0x01,  0x08,  0x15,  0x00,  0x02,  0xfe,  0x32,
+  0x08,  0x61,  0x04,  0x1b,  0xfe,  0x38,  0x12,  0x09,  0x04,  0x1b,  0x6e,  0x15,  0xfe,  0x1b,  0x00,  0x01,
+  0x08,  0x15,  0x00,  0x01,  0x08,  0x15,  0x00,  0x01,  0x08,  0x15,  0x00,  0x01,  0x08,  0x15,  0x06,  0x01,
+  0x08,  0x15,  0x00,  0x02,  0xd9,  0x66,  0x4c,  0xfe,  0x3a,  0x55,  0x5f,  0xfe,  0x9a,  0x81,  0x4b,  0x1d,
+  0xba,  0xfe,  0x32,  0x07,  0x0a,  0x1d,  0xfe,  0x09,  0x6f,  0xaf,  0xfe,  0xca,  0x45,  0xfe,  0x32,  0x12,
+  0x62,  0x2c,  0x85,  0x66,  0x7b,  0x01,  0x08,  0x25,  0x32,  0xfe,  0x0a,  0xf0,  0xfe,  0x32,  0x07,  0x8d,
+  0x81,  0x8c,  0xfe,  0x5c,  0x07,  0x02,  0x22,  0x01,  0x43,  0x02,  0xfe,  0x8a,  0x06,  0x15,  0x19,  0x02,
+  0xfe,  0x8a,  0x06,  0xfe,  0x9c,  0xf7,  0xd4,  0xfe,  0x2c,  0x90,  0xfe,  0xae,  0x90,  0x77,  0xfe,  0xca,
+  0x07,  0x0c,  0x54,  0x18,  0x55,  0x09,  0x4a,  0x6a,  0x35,  0x1e,  0x20,  0x07,  0x10,  0xfe,  0x0e,  0x12,
+  0x74,  0xfe,  0x80,  0x80,  0x37,  0x20,  0x63,  0x27,  0xfe,  0x06,  0x10,  0xfe,  0x83,  0xe7,  0xc4,  0xa1,
+  0xfe,  0x03,  0x40,  0x09,  0x4a,  0x4f,  0x35,  0x01,  0xa8,  0xad,  0xfe,  0x1f,  0x40,  0x12,  0x58,  0x01,
+  0xa5,  0xfe,  0x08,  0x50,  0xfe,  0x8a,  0x50,  0xfe,  0x44,  0x51,  0xfe,  0xc6,  0x51,  0x83,  0xfb,  0xfe,
+  0x8a,  0x90,  0x0c,  0x52,  0x18,  0x53,  0xfe,  0x0c,  0x90,  0xfe,  0x8e,  0x90,  0xfe,  0x40,  0x50,  0xfe,
+  0xc2,  0x50,  0x0c,  0x39,  0x18,  0x3a,  0xfe,  0x4a,  0x10,  0x09,  0x04,  0x6a,  0xfe,  0x2a,  0x12,  0xfe,
+  0x2c,  0x90,  0xfe,  0xae,  0x90,  0x0c,  0x54,  0x18,  0x55,  0x09,  0x04,  0x4f,  0x85,  0x01,  0xa8,  0xfe,
+  0x1f,  0x80,  0x12,  0x58,  0xfe,  0x44,  0x90,  0xfe,  0xc6,  0x90,  0x0c,  0x56,  0x18,  0x57,  0xfb,  0xfe,
+  0x8a,  0x90,  0x0c,  0x52,  0x18,  0x53,  0xfe,  0x40,  0x90,  0xfe,  0xc2,  0x90,  0x0c,  0x39,  0x18,  0x3a,
+  0x0c,  0x38,  0x18,  0x4e,  0x09,  0x4a,  0x19,  0x35,  0x2a,  0x13,  0xfe,  0x4e,  0x11,  0x65,  0xfe,  0x48,
+  0x08,  0xfe,  0x9e,  0xf0,  0xfe,  0x5c,  0x08,  0xb1,  0x16,  0x32,  0x2a,  0x73,  0xdd,  0xb8,  0xfe,  0x80,
+  0x08,  0xb9,  0xfe,  0x9e,  0x08,  0x8c,  0xfe,  0x74,  0x08,  0xfe,  0x06,  0xf0,  0xfe,  0x7a,  0x08,  0x8d,
+  0x81,  0x02,  0x22,  0x01,  0x43,  0xfe,  0xc9,  0x10,  0x15,  0x19,  0xfe,  0xc9,  0x10,  0x61,  0x04,  0x06,
+  0xfe,  0x10,  0x12,  0x61,  0x04,  0x0b,  0x45,  0x09,  0x04,  0x0b,  0xfe,  0x68,  0x12,  0xfe,  0x2e,  0x1c,
+  0x02,  0xfe,  0x24,  0x0a,  0x61,  0x04,  0x06,  0x45,  0x61,  0x04,  0x0b,  0xfe,  0x52,  0x12,  0xfe,  0x2c,
+  0x1c,  0xfe,  0xaa,  0xf0,  0xfe,  0x1e,  0x09,  0xfe,  0xac,  0xf0,  0xfe,  0xbe,  0x08,  0xfe,  0x8a,  0x10,
+  0xaa,  0xfe,  0xf3,  0x10,  0xfe,  0xad,  0xf0,  0xfe,  0xca,  0x08,  0x02,  0xfe,  0x24,  0x0a,  0xab,  0xfe,
+  0xe7,  0x10,  0xfe,  0x2b,  0xf0,  0x9d,  0xe9,  0x1c,  0xfe,  0x00,  0xfe,  0xfe,  0x1c,  0x12,  0xb5,  0xfe,
+  0xd2,  0xf0,  0x9d,  0xfe,  0x76,  0x18,  0x1c,  0x1a,  0x16,  0x9d,  0x05,  0xcb,  0x1c,  0x06,  0x16,  0x9d,
+  0xb8,  0x6d,  0xb9,  0x6d,  0xaa,  0xab,  0xfe,  0xb1,  0x10,  0x70,  0x5e,  0x2b,  0x14,  0x92,  0x01,  0x33,
+  0x0f,  0xfe,  0x35,  0x00,  0xfe,  0x01,  0xf0,  0x5a,  0x0f,  0x7c,  0x02,  0x5a,  0xfe,  0x74,  0x18,  0x1c,
+  0xfe,  0x00,  0xf8,  0x16,  0x6d,  0x67,  0x1b,  0x01,  0xfe,  0x44,  0x0d,  0x3b,  0x01,  0xe6,  0x1e,  0x27,
+  0x74,  0x67,  0x1a,  0x02,  0x6d,  0x09,  0x04,  0x0b,  0x21,  0xfe,  0x06,  0x0a,  0x09,  0x04,  0x6a,  0xfe,
+  0x82,  0x12,  0x09,  0x04,  0x19,  0xfe,  0x66,  0x13,  0x1e,  0x58,  0xac,  0xfc,  0xfe,  0x83,  0x80,  0xfe,
+  0xc8,  0x44,  0xfe,  0x2e,  0x13,  0xfe,  0x04,  0x91,  0xfe,  0x86,  0x91,  0x63,  0x27,  0xfe,  0x40,  0x59,
+  0xfe,  0xc1,  0x59,  0x77,  0xd7,  0x05,  0x54,  0x31,  0x55,  0x0c,  0x7b,  0x18,  0x7c,  0xbe,  0x54,  0xbf,
+  0x55,  0x01,  0xa8,  0xad,  0x63,  0x27,  0x12,  0x58,  0xc0,  0x38,  0xc1,  0x4e,  0x79,  0x56,  0x68,  0x57,
+  0xf4,  0xf5,  0xfe,  0x04,  0xfa,  0x38,  0xfe,  0x05,  0xfa,  0x4e,  0x01,  0xa5,  0xa2,  0x23,  0x0c,  0x7b,
+  0x0c,  0x7c,  0x79,  0x56,  0x68,  0x57,  0xfe,  0x12,  0x10,  0x09,  0x04,  0x19,  0x16,  0xd7,  0x79,  0x39,
+  0x68,  0x3a,  0x09,  0x04,  0xfe,  0xf7,  0x00,  0x35,  0x05,  0x52,  0x31,  0x53,  0xfe,  0x10,  0x58,  0xfe,
+  0x91,  0x58,  0xfe,  0x14,  0x59,  0xfe,  0x95,  0x59,  0x02,  0x6d,  0x09,  0x04,  0x19,  0x16,  0xd7,  0x09,
+  0x04,  0xfe,  0xf7,  0x00,  0x35,  0xfe,  0x3a,  0x55,  0xfe,  0x19,  0x81,  0x5f,  0xfe,  0x10,  0x90,  0xfe,
+  0x92,  0x90,  0xfe,  0xd7,  0x10,  0x2f,  0x07,  0x9b,  0x16,  0xfe,  0xc6,  0x08,  0x11,  0x9b,  0x09,  0x04,
+  0x0b,  0xfe,  0x14,  0x13,  0x05,  0x39,  0x31,  0x3a,  0x77,  0xfe,  0xc6,  0x08,  0xfe,  0x0c,  0x58,  0xfe,
+  0x8d,  0x58,  0x02,  0x6d,  0x23,  0x47,  0xfe,  0x19,  0x80,  0xde,  0x09,  0x04,  0x0b,  0xfe,  0x1a,  0x12,
+  0xfe,  0x6c,  0x19,  0xfe,  0x19,  0x41,  0xe9,  0xb5,  0xfe,  0xd1,  0xf0,  0xd9,  0x14,  0x7a,  0x01,  0x33,
+  0x0f,  0xfe,  0x44,  0x00,  0xfe,  0x8e,  0x10,  0xfe,  0x6c,  0x19,  0xbe,  0x39,  0xfe,  0xed,  0x19,  0xbf,
+  0x3a,  0xfe,  0x0c,  0x51,  0xfe,  0x8e,  0x51,  0xe9,  0x1c,  0xfe,  0x00,  0xff,  0x34,  0xfe,  0x74,  0x10,
+  0xb5,  0xfe,  0xd2,  0xf0,  0xfe,  0xb2,  0x0a,  0xfe,  0x76,  0x18,  0x1c,  0x1a,  0x84,  0x05,  0xcb,  0x1c,
+  0x06,  0xfe,  0x08,  0x13,  0x0f,  0xfe,  0x16,  0x00,  0x02,  0x5a,  0xfe,  0xd1,  0xf0,  0xfe,  0xc4,  0x0a,
+  0x14,  0x7a,  0x01,  0x33,  0x0f,  0xfe,  0x17,  0x00,  0xfe,  0x42,  0x10,  0xfe,  0xce,  0xf0,  0xfe,  0xca,
+  0x0a,  0xfe,  0x3c,  0x10,  0xfe,  0xcd,  0xf0,  0xfe,  0xd6,  0x0a,  0x0f,  0xfe,  0x22,  0x00,  0x02,  0x5a,
+  0xfe,  0xcb,  0xf0,  0xfe,  0xe2,  0x0a,  0x0f,  0xfe,  0x24,  0x00,  0x02,  0x5a,  0xfe,  0xd0,  0xf0,  0xfe,
+  0xec,  0x0a,  0x0f,  0x93,  0xdc,  0xfe,  0xcf,  0xf0,  0xfe,  0xf6,  0x0a,  0x0f,  0x4c,  0xfe,  0x10,  0x10,
+  0xfe,  0xcc,  0xf0,  0xd9,  0x61,  0x04,  0x19,  0x3b,  0x0f,  0xfe,  0x12,  0x00,  0x2a,  0x13,  0xfe,  0x4e,
+  0x11,  0x65,  0xfe,  0x0c,  0x0b,  0xfe,  0x9e,  0xf0,  0xfe,  0x20,  0x0b,  0xb1,  0x16,  0x32,  0x2a,  0x73,
+  0xdd,  0xb8,  0x22,  0xb9,  0x22,  0x2a,  0xec,  0x65,  0xfe,  0x2c,  0x0b,  0x25,  0x32,  0x8c,  0xfe,  0x48,
+  0x0b,  0x8d,  0x81,  0xb8,  0xd4,  0xb9,  0xd4,  0x02,  0x22,  0x01,  0x43,  0xfe,  0xdb,  0x10,  0x11,  0xfe,
+  0xe8,  0x00,  0xaa,  0xab,  0x70,  0xbc,  0x7d,  0xbd,  0x7f,  0xfe,  0x89,  0xf0,  0x22,  0x30,  0x2e,  0xd8,
+  0xbc,  0x7d,  0xbd,  0x7f,  0x01,  0x08,  0x1f,  0x22,  0x30,  0x2e,  0xd6,  0xb1,  0x45,  0x0f,  0xfe,  0x42,
+  0x00,  0x02,  0x5a,  0x78,  0x06,  0xfe,  0x81,  0x49,  0x16,  0xfe,  0x38,  0x0c,  0x09,  0x04,  0x0b,  0xfe,
+  0x44,  0x13,  0x0f,  0x00,  0x4b,  0x0b,  0xfe,  0x54,  0x12,  0x4b,  0xfe,  0x28,  0x00,  0x21,  0xfe,  0xa6,
+  0x0c,  0x0a,  0x40,  0x01,  0x0e,  0x07,  0x00,  0x5d,  0x3e,  0xfe,  0x28,  0x00,  0xfe,  0xe2,  0x10,  0x01,
+  0xe7,  0x01,  0xe8,  0x0a,  0x99,  0x01,  0xfe,  0x32,  0x0e,  0x59,  0x11,  0x2d,  0x01,  0x6f,  0x02,  0x29,
+  0x0f,  0xfe,  0x44,  0x00,  0x4b,  0x0b,  0xdf,  0x3e,  0x0b,  0xfe,  0xb4,  0x10,  0x01,  0x86,  0x3e,  0x0b,
+  0xfe,  0xaa,  0x10,  0x01,  0x86,  0xfe,  0x19,  0x82,  0xfe,  0x34,  0x46,  0xa3,  0x3e,  0x0b,  0x0f,  0xfe,
+  0x43,  0x00,  0xfe,  0x96,  0x10,  0x09,  0x4a,  0x0b,  0x35,  0x01,  0xe7,  0x01,  0xe8,  0x59,  0x11,  0x2d,
+  0x01,  0x6f,  0x67,  0x0b,  0x59,  0x3c,  0x8a,  0x02,  0xfe,  0x2a,  0x03,  0x09,  0x04,  0x0b,  0x84,  0x3e,
+  0x0b,  0x0f,  0x00,  0xfe,  0x5c,  0x10,  0x61,  0x04,  0x1b,  0xfe,  0x58,  0x12,  0x09,  0x04,  0x1b,  0xfe,
+  0x50,  0x13,  0xfe,  0x1c,  0x1c,  0xfe,  0x9d,  0xf0,  0xfe,  0x5c,  0x0c,  0xfe,  0x1c,  0x1c,  0xfe,  0x9d,
+  0xf0,  0xfe,  0x62,  0x0c,  0x09,  0x4a,  0x1b,  0x35,  0xfe,  0xa9,  0x10,  0x0f,  0xfe,  0x15,  0x00,  0xfe,
+  0x04,  0xe6,  0x0b,  0x5f,  0x5c,  0x0f,  0xfe,  0x13,  0x00,  0xfe,  0x10,  0x10,  0x0f,  0xfe,  0x47,  0x00,
+  0xa1,  0x0f,  0xfe,  0x41,  0x00,  0xa0,  0x0f,  0xfe,  0x24,  0x00,  0x87,  0xaa,  0xab,  0x70,  0x05,  0x6b,
+  0x28,  0x21,  0xd1,  0x5f,  0xfe,  0x04,  0xe6,  0x1b,  0xfe,  0x9d,  0x41,  0xfe,  0x1c,  0x42,  0x59,  0x01,
+  0xda,  0x02,  0x29,  0xea,  0x14,  0x0b,  0x37,  0x95,  0xa9,  0x14,  0xfe,  0x31,  0x00,  0x37,  0x97,  0x01,
+  0xfe,  0x54,  0x0f,  0x02,  0xd0,  0x3c,  0xfe,  0x06,  0xec,  0xc9,  0xee,  0x3e,  0x1d,  0xfe,  0xce,  0x45,
+  0x34,  0x3c,  0xfe,  0x06,  0xea,  0xc9,  0xfe,  0x47,  0x4b,  0x89,  0xfe,  0x75,  0x57,  0x05,  0x51,  0xfe,
+  0x98,  0x56,  0xfe,  0x38,  0x12,  0x0a,  0x42,  0x01,  0x0e,  0xfe,  0x44,  0x48,  0x46,  0x09,  0x04,  0x1d,
+  0xfe,  0x1a,  0x13,  0x0a,  0x40,  0x01,  0x0e,  0x47,  0xfe,  0x41,  0x58,  0x0a,  0x99,  0x01,  0x0e,  0xfe,
+  0x49,  0x54,  0x8e,  0xfe,  0x2a,  0x0d,  0x02,  0xfe,  0x2a,  0x03,  0x0a,  0x51,  0xfe,  0xee,  0x14,  0xee,
+  0x3e,  0x1d,  0xfe,  0xce,  0x45,  0x34,  0x3c,  0xfe,  0xce,  0x47,  0xfe,  0xad,  0x13,  0x02,  0x29,  0x1e,
+  0x20,  0x07,  0x10,  0xfe,  0x9e,  0x12,  0x23,  0x12,  0x4d,  0x12,  0x94,  0x12,  0xce,  0x1e,  0x2d,  0x47,
+  0x37,  0x2d,  0xb1,  0xe0,  0xfe,  0xbc,  0xf0,  0xfe,  0xec,  0x0d,  0x13,  0x06,  0x12,  0x4d,  0x01,  0xfe,
+  0xe2,  0x15,  0x05,  0xfe,  0x38,  0x01,  0x31,  0xfe,  0x3a,  0x01,  0x77,  0xfe,  0xf0,  0x0d,  0xfe,  0x02,
+  0xec,  0xce,  0x62,  0x00,  0x5d,  0xfe,  0x04,  0xec,  0x20,  0x46,  0xfe,  0x05,  0xf6,  0xfe,  0x34,  0x01,
+  0x01,  0xfe,  0x52,  0x16,  0xfb,  0xfe,  0x48,  0xf4,  0x0d,  0xfe,  0x18,  0x13,  0xaf,  0xfe,  0x02,  0xea,
+  0xce,  0x62,  0x7a,  0xfe,  0xc5,  0x13,  0x14,  0x1b,  0x37,  0x95,  0xa9,  0x5c,  0x05,  0xfe,  0x38,  0x01,
+  0x1c,  0xfe,  0xf0,  0xff,  0x0c,  0xfe,  0x60,  0x01,  0x05,  0xfe,  0x3a,  0x01,  0x0c,  0xfe,  0x62,  0x01,
+  0x3d,  0x12,  0x20,  0x24,  0x06,  0x12,  0x2d,  0x11,  0x2d,  0x8a,  0x13,  0x06,  0x03,  0x23,  0x03,  0x1e,
+  0x4d,  0xfe,  0xf7,  0x12,  0x1e,  0x94,  0xac,  0x12,  0x94,  0x07,  0x7a,  0xfe,  0x71,  0x13,  0xfe,  0x24,
+  0x1c,  0x14,  0x1a,  0x37,  0x95,  0xa9,  0xfe,  0xd9,  0x10,  0xb6,  0xfe,  0x03,  0xdc,  0xfe,  0x73,  0x57,
+  0xfe,  0x80,  0x5d,  0x03,  0xb6,  0xfe,  0x03,  0xdc,  0xfe,  0x5b,  0x57,  0xfe,  0x80,  0x5d,  0x03,  0xfe,
+  0x03,  0x57,  0xb6,  0x23,  0xfe,  0x00,  0xcc,  0x03,  0xfe,  0x03,  0x57,  0xb6,  0x75,  0x03,  0x09,  0x04,
+  0x4c,  0xfe,  0x22,  0x13,  0xfe,  0x1c,  0x80,  0x07,  0x06,  0xfe,  0x1a,  0x13,  0xfe,  0x1e,  0x80,  0xe1,
+  0xfe,  0x1d,  0x80,  0xa4,  0xfe,  0x0c,  0x90,  0xfe,  0x0e,  0x13,  0xfe,  0x0e,  0x90,  0xa3,  0xfe,  0x3c,
+  0x90,  0xfe,  0x30,  0xf4,  0x0b,  0xfe,  0x3c,  0x50,  0xa0,  0x01,  0xfe,  0x82,  0x16,  0x2f,  0x07,  0x2d,
+  0xe0,  0x01,  0xfe,  0xbc,  0x15,  0x09,  0x04,  0x1d,  0x45,  0x01,  0xe7,  0x01,  0xe8,  0x11,  0xfe,  0xe9,
+  0x00,  0x09,  0x04,  0x4c,  0xfe,  0x2c,  0x13,  0x01,  0xfe,  0x14,  0x16,  0xfe,  0x1e,  0x1c,  0xfe,  0x14,
+  0x90,  0xfe,  0x96,  0x90,  0x0c,  0xfe,  0x64,  0x01,  0x18,  0xfe,  0x66,  0x01,  0x09,  0x04,  0x4f,  0xfe,
+  0x12,  0x12,  0xfe,  0x03,  0x80,  0x74,  0xfe,  0x01,  0xec,  0x20,  0xfe,  0x80,  0x40,  0x12,  0x20,  0x63,
+  0x27,  0x11,  0xc8,  0x59,  0x1e,  0x20,  0xed,  0x76,  0x20,  0x03,  0xfe,  0x08,  0x1c,  0x05,  0xfe,  0xac,
+  0x00,  0xfe,  0x06,  0x58,  0x05,  0xfe,  0xae,  0x00,  0xfe,  0x07,  0x58,  0x05,  0xfe,  0xb0,  0x00,  0xfe,
+  0x08,  0x58,  0x05,  0xfe,  0xb2,  0x00,  0xfe,  0x09,  0x58,  0xfe,  0x0a,  0x1c,  0x24,  0x69,  0x12,  0xc9,
+  0x23,  0x0c,  0x50,  0x0c,  0x3f,  0x13,  0x40,  0x48,  0x5f,  0x17,  0x1d,  0xfe,  0x90,  0x4d,  0xfe,  0x91,
+  0x54,  0x21,  0xfe,  0x08,  0x0f,  0x3e,  0x10,  0x13,  0x42,  0x48,  0x17,  0x4c,  0xfe,  0x90,  0x4d,  0xfe,
+  0x91,  0x54,  0x21,  0xfe,  0x1e,  0x0f,  0x24,  0x10,  0x12,  0x20,  0x78,  0x2c,  0x46,  0x1e,  0x20,  0xed,
+  0x76,  0x20,  0x11,  0xc8,  0xf6,  0xfe,  0xd6,  0xf0,  0xfe,  0x32,  0x0f,  0xea,  0x70,  0xfe,  0x14,  0x1c,
+  0xfe,  0x10,  0x1c,  0xfe,  0x18,  0x1c,  0x03,  0x3c,  0xfe,  0x0c,  0x14,  0xee,  0xfe,  0x07,  0xe6,  0x1d,
+  0xfe,  0xce,  0x47,  0xfe,  0xf5,  0x13,  0x03,  0x01,  0x86,  0x78,  0x2c,  0x46,  0xfa,  0xef,  0xfe,  0x42,
+  0x13,  0x2f,  0x07,  0x2d,  0xfe,  0x34,  0x13,  0x0a,  0x42,  0x01,  0x0e,  0xb0,  0xfe,  0x36,  0x12,  0xf0,
+  0xfe,  0x45,  0x48,  0x01,  0xe3,  0xfe,  0x00,  0xcc,  0xb0,  0xfe,  0xf3,  0x13,  0x3d,  0x75,  0x07,  0x10,
+  0xa3,  0x0a,  0x80,  0x01,  0x0e,  0xfe,  0x80,  0x5c,  0x01,  0x6f,  0xfe,  0x0e,  0x10,  0x07,  0x7e,  0x45,
+  0xf6,  0xfe,  0xd6,  0xf0,  0xfe,  0x6c,  0x0f,  0x03,  0xfe,  0x44,  0x58,  0x74,  0xfe,  0x01,  0xec,  0x97,
+  0xfe,  0x9e,  0x40,  0xfe,  0x9d,  0xe7,  0x00,  0xfe,  0x9c,  0xe7,  0x1b,  0x76,  0x27,  0x01,  0xda,  0xfe,
+  0xdd,  0x10,  0x2a,  0xbc,  0x7d,  0xbd,  0x7f,  0x30,  0x2e,  0xd5,  0x07,  0x1b,  0xfe,  0x48,  0x12,  0x07,
+  0x0b,  0xfe,  0x56,  0x12,  0x07,  0x1a,  0xfe,  0x30,  0x12,  0x07,  0xc2,  0x16,  0xfe,  0x3e,  0x11,  0x07,
+  0xfe,  0x23,  0x00,  0x16,  0xfe,  0x4a,  0x11,  0x07,  0x06,  0x16,  0xfe,  0xa8,  0x11,  0x07,  0x19,  0xfe,
+  0x12,  0x12,  0x07,  0x00,  0x16,  0x22,  0x14,  0xc2,  0x01,  0x33,  0x9f,  0x2b,  0x01,  0x08,  0x8c,  0x43,
+  0x03,  0x2b,  0xfe,  0x62,  0x08,  0x0a,  0xca,  0x01,  0xfe,  0x32,  0x0e,  0x11,  0x7e,  0x02,  0x29,  0x2b,
+  0x2f,  0x07,  0x9b,  0xfe,  0xd9,  0x13,  0x79,  0x39,  0x68,  0x3a,  0x77,  0xfe,  0xfc,  0x10,  0x09,  0x04,
+  0x6a,  0xfe,  0x72,  0x12,  0xc0,  0x38,  0xc1,  0x4e,  0xf4,  0xf5,  0x8e,  0xfe,  0xc6,  0x10,  0x1e,  0x58,
+  0xfe,  0x26,  0x13,  0x05,  0x7b,  0x31,  0x7c,  0x77,  0xfe,  0x82,  0x0c,  0x0c,  0x54,  0x18,  0x55,  0x23,
+  0x0c,  0x7b,  0x0c,  0x7c,  0x01,  0xa8,  0x24,  0x69,  0x73,  0x12,  0x58,  0x01,  0xa5,  0xc0,  0x38,  0xc1,
+  0x4e,  0xfe,  0x04,  0x55,  0xfe,  0xa5,  0x55,  0xfe,  0x04,  0xfa,  0x38,  0xfe,  0x05,  0xfa,  0x4e,  0xfe,
+  0x91,  0x10,  0x05,  0x56,  0x31,  0x57,  0xfe,  0x40,  0x56,  0xfe,  0xe1,  0x56,  0x0c,  0x56,  0x18,  0x57,
+  0x83,  0xc0,  0x38,  0xc1,  0x4e,  0xf4,  0xf5,  0x05,  0x52,  0x31,  0x53,  0xfe,  0x00,  0x56,  0xfe,  0xa1,
+  0x56,  0x0c,  0x52,  0x18,  0x53,  0x09,  0x04,  0x6a,  0xfe,  0x1e,  0x12,  0x1e,  0x58,  0xfe,  0x1f,  0x40,
+  0x05,  0x54,  0x31,  0x55,  0xfe,  0x2c,  0x50,  0xfe,  0xae,  0x50,  0x05,  0x56,  0x31,  0x57,  0xfe,  0x44,
+  0x50,  0xfe,  0xc6,  0x50,  0x05,  0x52,  0x31,  0x53,  0xfe,  0x08,  0x50,  0xfe,  0x8a,  0x50,  0x05,  0x39,
+  0x31,  0x3a,  0xfe,  0x40,  0x50,  0xfe,  0xc2,  0x50,  0x02,  0x5c,  0x24,  0x06,  0x12,  0xcd,  0x02,  0x5b,
+  0x2b,  0x01,  0x08,  0x1f,  0x44,  0x30,  0x2e,  0xd5,  0x07,  0x06,  0x21,  0x44,  0x2f,  0x07,  0x9b,  0x21,
+  0x5b,  0x01,  0x6e,  0x1c,  0x3d,  0x16,  0x44,  0x09,  0x04,  0x0b,  0xe2,  0x79,  0x39,  0x68,  0x3a,  0xfe,
+  0x0a,  0x55,  0x34,  0xfe,  0x8b,  0x55,  0xbe,  0x39,  0xbf,  0x3a,  0xfe,  0x0c,  0x51,  0xfe,  0x8e,  0x51,
+  0x02,  0x5b,  0xfe,  0x19,  0x81,  0xaf,  0xfe,  0x19,  0x41,  0x02,  0x5b,  0x2b,  0x01,  0x08,  0x25,  0x32,
+  0x1f,  0xa2,  0x30,  0x2e,  0xd8,  0x4b,  0x1a,  0xfe,  0xa6,  0x12,  0x4b,  0x0b,  0x3b,  0x02,  0x44,  0x01,
+  0x08,  0x25,  0x32,  0x1f,  0xa2,  0x30,  0x2e,  0xd6,  0x07,  0x1a,  0x21,  0x44,  0x01,  0x08,  0x1f,  0xa2,
+  0x30,  0x2e,  0xfe,  0xe8,  0x09,  0xfe,  0xc2,  0x49,  0x60,  0x05,  0xfe,  0x9c,  0x00,  0x28,  0x84,  0x49,
+  0x04,  0x19,  0x34,  0x9f,  0xfe,  0xbb,  0x45,  0x4b,  0x00,  0x45,  0x3e,  0x06,  0x78,  0x3d,  0xfe,  0xda,
+  0x14,  0x01,  0x6e,  0x87,  0xfe,  0x4b,  0x45,  0xe2,  0x2f,  0x07,  0x9a,  0xe1,  0x05,  0xc6,  0x28,  0x84,
+  0x05,  0x3f,  0x28,  0x34,  0x5e,  0x02,  0x5b,  0xfe,  0xc0,  0x5d,  0xfe,  0xf8,  0x14,  0xfe,  0x03,  0x17,
+  0x05,  0x50,  0xb4,  0x0c,  0x50,  0x5e,  0x2b,  0x01,  0x08,  0x26,  0x5c,  0x01,  0xfe,  0xaa,  0x14,  0x02,
+  0x5c,  0x01,  0x08,  0x25,  0x32,  0x1f,  0x44,  0x30,  0x2e,  0xd6,  0x07,  0x06,  0x21,  0x44,  0x01,  0xfe,
+  0x8e,  0x13,  0xfe,  0x42,  0x58,  0xfe,  0x82,  0x14,  0xfe,  0xa4,  0x14,  0x87,  0xfe,  0x4a,  0xf4,  0x0b,
+  0x16,  0x44,  0xfe,  0x4a,  0xf4,  0x06,  0xfe,  0x0c,  0x12,  0x2f,  0x07,  0x9a,  0x85,  0x02,  0x5b,  0x05,
+  0x3f,  0xb4,  0x0c,  0x3f,  0x5e,  0x2b,  0x01,  0x08,  0x26,  0x5c,  0x01,  0xfe,  0xd8,  0x14,  0x02,  0x5c,
+  0x13,  0x06,  0x65,  0xfe,  0xca,  0x12,  0x26,  0xfe,  0xe0,  0x12,  0x72,  0xf1,  0x01,  0x08,  0x23,  0x72,
+  0x03,  0x8f,  0xfe,  0xdc,  0x12,  0x25,  0xfe,  0xdc,  0x12,  0x1f,  0xfe,  0xca,  0x12,  0x5e,  0x2b,  0x01,
+  0x08,  0xfe,  0xd5,  0x10,  0x13,  0x6c,  0xff,  0x02,  0x00,  0x57,  0x48,  0x8b,  0x1c,  0xfe,  0xff,  0x7f,
+  0xfe,  0x30,  0x56,  0xfe,  0x00,  0x5c,  0x03,  0x13,  0x6c,  0xff,  0x02,  0x00,  0x57,  0x48,  0x8b,  0x1c,
+  0x3d,  0xfe,  0x30,  0x56,  0xfe,  0x00,  0x5c,  0x03,  0x13,  0x6c,  0xff,  0x02,  0x00,  0x57,  0x48,  0x8b,
+  0x03,  0x13,  0x6c,  0xff,  0x02,  0x00,  0x57,  0x48,  0x8b,  0xfe,  0x0b,  0x58,  0x03,  0x0a,  0x50,  0x01,
+  0x82,  0x0a,  0x3f,  0x01,  0x82,  0x03,  0xfc,  0x1c,  0x10,  0xff,  0x03,  0x00,  0x54,  0xfe,  0x00,  0xf4,
+  0x19,  0x48,  0xfe,  0x00,  0x7d,  0xfe,  0x01,  0x7d,  0xfe,  0x02,  0x7d,  0xfe,  0x03,  0x7c,  0x63,  0x27,
+  0x0c,  0x52,  0x18,  0x53,  0xbe,  0x56,  0xbf,  0x57,  0x03,  0xfe,  0x62,  0x08,  0xfe,  0x82,  0x4a,  0xfe,
+  0xe1,  0x1a,  0xfe,  0x83,  0x5a,  0x74,  0x03,  0x01,  0xfe,  0x14,  0x18,  0xfe,  0x42,  0x48,  0x5f,  0x60,
+  0x89,  0x01,  0x08,  0x1f,  0xfe,  0xa2,  0x14,  0x30,  0x2e,  0xd8,  0x01,  0x08,  0x1f,  0xfe,  0xa2,  0x14,
+  0x30,  0x2e,  0xfe,  0xe8,  0x0a,  0xfe,  0xc1,  0x59,  0x05,  0xc6,  0x28,  0xfe,  0xcc,  0x12,  0x49,  0x04,
+  0x1b,  0xfe,  0xc4,  0x13,  0x23,  0x62,  0x1b,  0xe2,  0x4b,  0xc3,  0x64,  0xfe,  0xe8,  0x13,  0x3b,  0x13,
+  0x06,  0x17,  0xc3,  0x78,  0xdb,  0xfe,  0x78,  0x10,  0xff,  0x02,  0x83,  0x55,  0xa1,  0xff,  0x02,  0x83,
+  0x55,  0x62,  0x1a,  0xa4,  0xbb,  0xfe,  0x30,  0x00,  0x8e,  0xe4,  0x17,  0x2c,  0x13,  0x06,  0xfe,  0x56,
+  0x10,  0x62,  0x0b,  0xe1,  0xbb,  0xfe,  0x64,  0x00,  0x8e,  0xe4,  0x0a,  0xfe,  0x64,  0x00,  0x17,  0x93,
+  0x13,  0x06,  0xfe,  0x28,  0x10,  0x62,  0x06,  0xfe,  0x60,  0x13,  0xbb,  0xfe,  0xc8,  0x00,  0x8e,  0xe4,
+  0x0a,  0xfe,  0xc8,  0x00,  0x17,  0x4d,  0x13,  0x06,  0x83,  0xbb,  0xfe,  0x90,  0x01,  0xba,  0xfe,  0x4e,
+  0x14,  0x89,  0xfe,  0x12,  0x10,  0xfe,  0x43,  0xf4,  0x94,  0xfe,  0x56,  0xf0,  0xfe,  0x60,  0x14,  0xfe,
+  0x04,  0xf4,  0x6c,  0xfe,  0x43,  0xf4,  0x93,  0xfe,  0xf3,  0x10,  0xf9,  0x01,  0xfe,  0x22,  0x13,  0x1c,
+  0x3d,  0xfe,  0x10,  0x13,  0xfe,  0x00,  0x17,  0xfe,  0x4d,  0xe4,  0x69,  0xba,  0xfe,  0x9c,  0x14,  0xb7,
+  0x69,  0xfe,  0x1c,  0x10,  0xfe,  0x00,  0x17,  0xfe,  0x4d,  0xe4,  0x19,  0xba,  0xfe,  0x9c,  0x14,  0xb7,
+  0x19,  0x83,  0x60,  0x23,  0xfe,  0x4d,  0xf4,  0x00,  0xdf,  0x89,  0x13,  0x06,  0xfe,  0xb4,  0x56,  0xfe,
+  0xc3,  0x58,  0x03,  0x60,  0x13,  0x0b,  0x03,  0x15,  0x06,  0x01,  0x08,  0x26,  0xe5,  0x15,  0x0b,  0x01,
+  0x08,  0x26,  0xe5,  0x15,  0x1a,  0x01,  0x08,  0x26,  0xe5,  0x72,  0xfe,  0x89,  0x49,  0x01,  0x08,  0x03,
+  0x15,  0x06,  0x01,  0x08,  0x26,  0xa6,  0x15,  0x1a,  0x01,  0x08,  0x26,  0xa6,  0x15,  0x06,  0x01,  0x08,
+  0x26,  0xa6,  0xfe,  0x89,  0x49,  0x01,  0x08,  0x26,  0xa6,  0x72,  0xfe,  0x89,  0x4a,  0x01,  0x08,  0x03,
+  0x60,  0x03,  0x1e,  0xcc,  0x07,  0x06,  0xfe,  0x44,  0x13,  0xad,  0x12,  0xcc,  0xfe,  0x49,  0xf4,  0x00,
+  0x3b,  0x72,  0x9f,  0x5e,  0xfe,  0x01,  0xec,  0xfe,  0x27,  0x01,  0xf1,  0x01,  0x08,  0x2f,  0x07,  0xfe,
+  0xe3,  0x00,  0xfe,  0x20,  0x13,  0x1f,  0xfe,  0x5a,  0x15,  0x23,  0x12,  0xcd,  0x01,  0x43,  0x1e,  0xcd,
+  0x07,  0x06,  0x45,  0x09,  0x4a,  0x06,  0x35,  0x03,  0x0a,  0x42,  0x01,  0x0e,  0xed,  0x88,  0x07,  0x10,
+  0xa4,  0x0a,  0x80,  0x01,  0x0e,  0x88,  0x0a,  0x51,  0x01,  0x9e,  0x03,  0x0a,  0x80,  0x01,  0x0e,  0x88,
+  0xfe,  0x80,  0xe7,  0x10,  0x07,  0x10,  0x84,  0xfe,  0x45,  0x58,  0x01,  0xe3,  0x88,  0x03,  0x0a,  0x42,
+  0x01,  0x0e,  0x88,  0x0a,  0x51,  0x01,  0x9e,  0x03,  0x0a,  0x42,  0x01,  0x0e,  0xfe,  0x80,  0x80,  0xf2,
+  0xfe,  0x49,  0xe4,  0x10,  0xa4,  0x0a,  0x80,  0x01,  0x0e,  0xf2,  0x0a,  0x51,  0x01,  0x82,  0x03,  0x17,
+  0x10,  0x71,  0x66,  0xfe,  0x60,  0x01,  0xfe,  0x18,  0xdf,  0xfe,  0x19,  0xde,  0xfe,  0x24,  0x1c,  0xfe,
+  0x1d,  0xf7,  0x1d,  0x90,  0xfe,  0xf6,  0x15,  0x01,  0xfe,  0xfc,  0x16,  0xe0,  0x91,  0x1d,  0x66,  0xfe,
+  0x2c,  0x01,  0xfe,  0x2f,  0x19,  0x03,  0xae,  0x21,  0xfe,  0xe6,  0x15,  0xfe,  0xda,  0x10,  0x17,  0x10,
+  0x71,  0x05,  0xfe,  0x64,  0x01,  0xfe,  0x00,  0xf4,  0x19,  0xfe,  0x18,  0x58,  0x05,  0xfe,  0x66,  0x01,
+  0xfe,  0x19,  0x58,  0x91,  0x19,  0xfe,  0x3c,  0x90,  0xfe,  0x30,  0xf4,  0x06,  0xfe,  0x3c,  0x50,  0x66,
+  0xfe,  0x38,  0x00,  0xfe,  0x0f,  0x79,  0xfe,  0x1c,  0xf7,  0x19,  0x90,  0xfe,  0x40,  0x16,  0xfe,  0xb6,
+  0x14,  0x34,  0x03,  0xae,  0x21,  0xfe,  0x18,  0x16,  0xfe,  0x9c,  0x10,  0x17,  0x10,  0x71,  0xfe,  0x83,
+  0x5a,  0xfe,  0x18,  0xdf,  0xfe,  0x19,  0xde,  0xfe,  0x1d,  0xf7,  0x38,  0x90,  0xfe,  0x62,  0x16,  0xfe,
+  0x94,  0x14,  0xfe,  0x10,  0x13,  0x91,  0x38,  0x66,  0x1b,  0xfe,  0xaf,  0x19,  0xfe,  0x98,  0xe7,  0x00,
+  0x03,  0xae,  0x21,  0xfe,  0x56,  0x16,  0xfe,  0x6c,  0x10,  0x17,  0x10,  0x71,  0xfe,  0x30,  0xbc,  0xfe,
+  0xb2,  0xbc,  0x91,  0xc5,  0x66,  0x1b,  0xfe,  0x0f,  0x79,  0xfe,  0x1c,  0xf7,  0xc5,  0x90,  0xfe,  0x9a,
+  0x16,  0xfe,  0x5c,  0x14,  0x34,  0x03,  0xae,  0x21,  0xfe,  0x86,  0x16,  0xfe,  0x42,  0x10,  0xfe,  0x02,
+  0xf6,  0x10,  0x71,  0xfe,  0x18,  0xfe,  0x54,  0xfe,  0x19,  0xfe,  0x55,  0xfc,  0xfe,  0x1d,  0xf7,  0x4f,
+  0x90,  0xfe,  0xc0,  0x16,  0xfe,  0x36,  0x14,  0xfe,  0x1c,  0x13,  0x91,  0x4f,  0x47,  0xfe,  0x83,  0x58,
+  0xfe,  0xaf,  0x19,  0xfe,  0x80,  0xe7,  0x10,  0xfe,  0x81,  0xe7,  0x10,  0x11,  0xfe,  0xdd,  0x00,  0x63,
+  0x27,  0x03,  0x63,  0x27,  0xfe,  0x12,  0x45,  0x21,  0xfe,  0xb0,  0x16,  0x14,  0x06,  0x37,  0x95,  0xa9,
+  0x02,  0x29,  0xfe,  0x39,  0xf0,  0xfe,  0x04,  0x17,  0x23,  0x03,  0xfe,  0x7e,  0x18,  0x1c,  0x1a,  0x5d,
+  0x13,  0x0d,  0x03,  0x71,  0x05,  0xcb,  0x1c,  0x06,  0xfe,  0xef,  0x12,  0xfe,  0xe1,  0x10,  0x78,  0x2c,
+  0x46,  0x2f,  0x07,  0x2d,  0xfe,  0x3c,  0x13,  0xfe,  0x82,  0x14,  0xfe,  0x42,  0x13,  0x3c,  0x8a,  0x0a,
+  0x42,  0x01,  0x0e,  0xb0,  0xfe,  0x3e,  0x12,  0xf0,  0xfe,  0x45,  0x48,  0x01,  0xe3,  0xfe,  0x00,  0xcc,
+  0xb0,  0xfe,  0xf3,  0x13,  0x3d,  0x75,  0x07,  0x10,  0xa3,  0x0a,  0x80,  0x01,  0x0e,  0xf2,  0x01,  0x6f,
+  0xfe,  0x16,  0x10,  0x07,  0x7e,  0x85,  0xfe,  0x40,  0x14,  0xfe,  0x24,  0x12,  0xf6,  0xfe,  0xd6,  0xf0,
+  0xfe,  0x24,  0x17,  0x17,  0x0b,  0x03,  0xfe,  0x9c,  0xe7,  0x0b,  0x0f,  0xfe,  0x15,  0x00,  0x59,  0x76,
+  0x27,  0x01,  0xda,  0x17,  0x06,  0x03,  0x3c,  0x8a,  0x09,  0x4a,  0x1d,  0x35,  0x11,  0x2d,  0x01,  0x6f,
+  0x17,  0x06,  0x03,  0xfe,  0x38,  0x90,  0xfe,  0xba,  0x90,  0x79,  0xc7,  0x68,  0xc8,  0xfe,  0x48,  0x55,
+  0x34,  0xfe,  0xc9,  0x55,  0x03,  0x1e,  0x98,  0x73,  0x12,  0x98,  0x03,  0x0a,  0x99,  0x01,  0x0e,  0xf0,
+  0x0a,  0x40,  0x01,  0x0e,  0xfe,  0x49,  0x44,  0x16,  0xfe,  0xf0,  0x17,  0x73,  0x75,  0x03,  0x0a,  0x42,
+  0x01,  0x0e,  0x07,  0x10,  0x45,  0x0a,  0x51,  0x01,  0x9e,  0x0a,  0x40,  0x01,  0x0e,  0x73,  0x75,  0x03,
+  0xfe,  0x4e,  0xe4,  0x1a,  0x64,  0xfe,  0x24,  0x18,  0x05,  0xfe,  0x90,  0x00,  0xfe,  0x3a,  0x45,  0x5b,
+  0xfe,  0x4e,  0xe4,  0xc2,  0x64,  0xfe,  0x36,  0x18,  0x05,  0xfe,  0x92,  0x00,  0xfe,  0x02,  0xe6,  0x1b,
+  0xdc,  0xfe,  0x4e,  0xe4,  0xfe,  0x0b,  0x00,  0x64,  0xfe,  0x48,  0x18,  0x05,  0xfe,  0x94,  0x00,  0xfe,
+  0x02,  0xe6,  0x19,  0xfe,  0x08,  0x10,  0x05,  0xfe,  0x96,  0x00,  0xfe,  0x02,  0xe6,  0x2c,  0xfe,  0x4e,
+  0x45,  0xfe,  0x0c,  0x12,  0xaf,  0xff,  0x04,  0x68,  0x54,  0xde,  0x1c,  0x69,  0x03,  0x07,  0x7a,  0xfe,
+  0x5a,  0xf0,  0xfe,  0x74,  0x18,  0x24,  0xfe,  0x09,  0x00,  0xfe,  0x34,  0x10,  0x07,  0x1b,  0xfe,  0x5a,
+  0xf0,  0xfe,  0x82,  0x18,  0x24,  0xc3,  0xfe,  0x26,  0x10,  0x07,  0x1a,  0x5d,  0x24,  0x2c,  0xdc,  0x07,
+  0x0b,  0x5d,  0x24,  0x93,  0xfe,  0x0e,  0x10,  0x07,  0x06,  0x5d,  0x24,  0x4d,  0x9f,  0xad,  0x03,  0x14,
+  0xfe,  0x09,  0x00,  0x01,  0x33,  0xfe,  0x04,  0xfe,  0x7d,  0x05,  0x7f,  0xf9,  0x03,  0x25,  0xfe,  0xca,
+  0x18,  0xfe,  0x14,  0xf0,  0x08,  0x65,  0xfe,  0xc6,  0x18,  0x03,  0xff,  0x1a,  0x00,  0x00,
 };
 
 STATIC unsigned short _adv_asc3550_size =
-    sizeof(_adv_asc3550_buf); /* 0x13E5 */
+        sizeof(_adv_asc3550_buf); /* 0x13AD */
 STATIC ADV_DCNT _adv_asc3550_chksum =
-    0x04FFFF0E; /* Expanded checksum. */
+        0x04D52DDDUL; /* Expanded little-endian checksum. */
 
+/* Microcode buffer is kept after initialization for error recovery. */
 STATIC unsigned char _adv_asc38C0800_buf[] = {
-  0x00,  0x00,  0x00,  0xf2,  0x00,  0xf0,  0x00,  0x16,  0x00,  0xfc,  0x48,  0xe4,  0x01,  0x00,  0x18,  0xe4,
-  0x00,  0xf6,  0x01,  0xf6,  0x18,  0x80,  0x02,  0x00,  0x40,  0x1a,  0x00,  0xfa,  0xff,  0xff,  0x03,  0xf6,
-  0xff,  0x00,  0x82,  0xe7,  0x01,  0xfa,  0x9e,  0xe7,  0x09,  0xe7,  0x1a,  0x0f,  0x00,  0xea,  0x01,  0xe6,
-  0x03,  0x00,  0x55,  0xf0,  0x18,  0xf4,  0x1e,  0xf0,  0x3e,  0x57,  0x04,  0x00,  0x3e,  0x01,  0x85,  0xf0,
-  0x00,  0xe6,  0x03,  0xfc,  0x08,  0x00,  0x2c,  0x1a,  0x32,  0xf0,  0x86,  0xf0,  0xbe,  0x0d,  0xd4,  0x01,
-  0xd5,  0xf0,  0x00,  0xec,  0x01,  0xfc,  0x38,  0x54,  0x98,  0x57,  0xbc,  0x00,  0x0c,  0x1c,  0xb1,  0xf0,
-  0x3c,  0x00,  0xb4,  0x00,  0xb8,  0x0d,  0x00,  0x57,  0x01,  0xf0,  0x02,  0x13,  0x02,  0xfc,  0x03,  0xe6,
-  0x10,  0x00,  0x18,  0x40,  0x3e,  0x1c,  0x44,  0x13,  0x6c,  0x01,  0x6e,  0x01,  0xbd,  0x00,  0xe0,  0x00,
-  0x02,  0x80,  0x30,  0xe4,  0x3e,  0x00,  0x74,  0x01,  0x76,  0x01,  0x7c,  0x16,  0x80,  0x00,  0xb9,  0x54,
-  0xbb,  0x00,  0xee,  0x13,  0x00,  0x4e,  0x01,  0x01,  0x01,  0xea,  0x02,  0x48,  0x02,  0xfa,  0x04,  0x12,
-  0x08,  0x12,  0x3c,  0x56,  0x4e,  0x01,  0x5d,  0xf0,  0x7a,  0x01,  0x7e,  0x10,  0xb6,  0x00,  0xc2,  0x10,
-  0xee,  0x08,  0x00,  0x80,  0x05,  0xfc,  0x10,  0x44,  0x24,  0x01,  0x28,  0x01,  0x32,  0x00,  0x3c,  0x01,
-  0x40,  0x00,  0x4b,  0xe4,  0x4b,  0xf4,  0x4c,  0x1c,  0x68,  0x01,  0x6a,  0x01,  0x70,  0x01,  0x72,  0x01,
-  0x78,  0x01,  0x7c,  0x01,  0xbb,  0x55,  0xc2,  0x0d,  0x00,  0x01,  0x02,  0xee,  0x03,  0x58,  0x03,  0xf7,
-  0x03,  0xfa,  0x04,  0x80,  0x08,  0x44,  0x09,  0xf0,  0x0f,  0x00,  0x1b,  0x80,  0x20,  0x01,  0x38,  0x1c,
-  0x4e,  0x1c,  0x5b,  0xf0,  0x62,  0x0a,  0xaa,  0x00,  0xbe,  0x00,  0xc0,  0x00,  0xc0,  0x15,  0xcc,  0x10,
-  0x00,  0x4c,  0x00,  0xdc,  0x02,  0x4a,  0x04,  0xfc,  0x05,  0x00,  0x05,  0xf0,  0x05,  0xf8,  0x06,  0x13,
-  0x06,  0xf7,  0x08,  0x13,  0x0a,  0x10,  0x0c,  0x00,  0x0e,  0x47,  0x0e,  0xf7,  0x10,  0x0f,  0x20,  0x00,
-  0x20,  0x16,  0x2a,  0x01,  0x32,  0x1c,  0x36,  0x00,  0x42,  0x54,  0x44,  0x55,  0x45,  0x5a,  0x52,  0x0c,
-  0x59,  0xf0,  0x5c,  0xf0,  0x69,  0x08,  0x6e,  0x0b,  0x83,  0x59,  0xb8,  0xf0,  0xbd,  0x56,  0xcc,  0x18,
-  0xce,  0x10,  0xd8,  0x18,  0xf0,  0x00,  0x01,  0x48,  0x04,  0x10,  0x04,  0xea,  0x04,  0xf6,  0x05,  0x80,
-  0x05,  0xe6,  0x06,  0x00,  0x06,  0x0f,  0x06,  0x12,  0x0b,  0xf0,  0x0c,  0x10,  0x0c,  0xf0,  0x10,  0x13,
-  0x12,  0x10,  0x19,  0x00,  0x19,  0xe4,  0x30,  0x1c,  0x33,  0x00,  0x34,  0x00,  0x38,  0x44,  0x40,  0x5c,
-  0x4a,  0xe4,  0x62,  0x1a,  0x68,  0x08,  0x68,  0x54,  0x6c,  0x15,  0x70,  0x15,  0x83,  0x55,  0x83,  0x5a,
-  0x91,  0x44,  0xa4,  0x00,  0xac,  0x13,  0xb0,  0x57,  0xb5,  0x00,  0xb8,  0x17,  0xba,  0x00,  0xce,  0x45,
-  0xd0,  0x00,  0xe1,  0x00,  0xe5,  0x55,  0xe7,  0x00,  0x00,  0x54,  0x01,  0x58,  0x02,  0x10,  0x02,  0xe6,
-  0x03,  0xa1,  0x04,  0x13,  0x06,  0x83,  0x06,  0xf0,  0x07,  0x00,  0x0a,  0x00,  0x0a,  0x12,  0x0a,  0xf0,
-  0x0c,  0x12,  0x0c,  0x13,  0x0c,  0x90,  0x0e,  0x13,  0x10,  0x04,  0x10,  0x10,  0x12,  0x1c,  0x19,  0x81,
-  0x1a,  0x10,  0x1c,  0x00,  0x1c,  0x12,  0x1d,  0xf7,  0x1e,  0x13,  0x20,  0x1c,  0x20,  0xe7,  0x22,  0x01,
-  0x26,  0x01,  0x2a,  0x12,  0x2c,  0x0f,  0x30,  0xe7,  0x32,  0x15,  0x34,  0x1c,  0x36,  0x1c,  0x38,  0x12,
-  0x3a,  0x55,  0x3f,  0x00,  0x41,  0x58,  0x43,  0x48,  0x46,  0x1c,  0x4e,  0xe4,  0x76,  0x02,  0x77,  0x57,
-  0x78,  0x03,  0x89,  0x48,  0x8e,  0x90,  0x98,  0x80,  0x99,  0x00,  0xfe,  0x9c,  0xf0,  0x27,  0x02,  0xfe,
-  0xe0,  0x0d,  0xff,  0x10,  0x00,  0x00,  0xfe,  0xc6,  0x01,  0xfe,  0x56,  0x1a,  0x00,  0xfe,  0xc4,  0x01,
-  0xfe,  0x84,  0x01,  0xff,  0x03,  0x00,  0x00,  0xfe,  0x6a,  0x13,  0xfe,  0x05,  0x05,  0xff,  0x40,  0x00,
-  0x00,  0x0e,  0xff,  0x09,  0x00,  0x00,  0xff,  0x08,  0x01,  0x01,  0xff,  0x10,  0xff,  0xff,  0xff,  0x1f,
-  0x00,  0x00,  0xff,  0x10,  0xff,  0xff,  0xff,  0x11,  0x00,  0x00,  0xfe,  0x78,  0x56,  0xfe,  0x34,  0x12,
-  0xff,  0x21,  0x00,  0x00,  0xfe,  0x04,  0xf7,  0xfe,  0xc4,  0x01,  0x2e,  0x88,  0x0b,  0x01,  0xfe,  0xca,
-  0x0f,  0xfe,  0x04,  0xf7,  0xfe,  0xc4,  0x01,  0x88,  0x0b,  0x1c,  0x2e,  0xfe,  0x3d,  0xf0,  0xfe,  0xfc,
-  0x01,  0xfe,  0x20,  0xf0,  0xdc,  0x04,  0x5f,  0x4f,  0x02,  0xfe,  0xfc,  0x0d,  0x01,  0xfe,  0x5c,  0x0e,
-  0xfe,  0xe9,  0x12,  0x02,  0xfe,  0x08,  0x03,  0xfe,  0x28,  0x1c,  0x04,  0xfe,  0xa6,  0x00,  0xfe,  0xdd,
-  0x12,  0x47,  0x12,  0xfe,  0xa6,  0x00,  0xcd,  0xfe,  0x48,  0xf0,  0xfe,  0x80,  0x02,  0xfe,  0x49,  0xf0,
-  0xfe,  0x9a,  0x02,  0xfe,  0x4a,  0xf0,  0xfe,  0xb8,  0x02,  0xfe,  0x46,  0xf0,  0xfe,  0x4a,  0x02,  0xfe,
-  0x47,  0xf0,  0xfe,  0x50,  0x02,  0xfe,  0x43,  0xf0,  0xfe,  0x3e,  0x02,  0xfe,  0x44,  0xf0,  0xfe,  0x42,
-  0x02,  0xfe,  0x45,  0xf0,  0xfe,  0x46,  0x02,  0x09,  0x0b,  0xa4,  0x09,  0x06,  0x12,  0xc1,  0x02,  0x27,
-  0xfe,  0x00,  0x1c,  0xfe,  0xf1,  0x10,  0xfe,  0x02,  0x1c,  0xfe,  0xed,  0x10,  0xfe,  0x1e,  0x1c,  0xfe,
-  0xe9,  0x10,  0x01,  0xfe,  0x2c,  0x18,  0xfe,  0xe7,  0x10,  0xfe,  0x06,  0xfc,  0xfe,  0xa8,  0x00,  0x0f,
-  0x7c,  0x01,  0xaa,  0x02,  0x27,  0x17,  0x5e,  0x4c,  0xc4,  0x01,  0xfe,  0x40,  0x10,  0x0f,  0x7c,  0x01,
-  0x8e,  0xfe,  0xbd,  0x10,  0x0f,  0x7c,  0x01,  0x8e,  0xfe,  0xad,  0x10,  0xfe,  0x16,  0x1c,  0xfe,  0x58,
-  0x1c,  0x09,  0x06,  0x12,  0xc1,  0x2e,  0x1b,  0x27,  0xfe,  0x3d,  0xf0,  0xfe,  0xfc,  0x01,  0x28,  0xfe,
-  0x8e,  0x02,  0xfe,  0x5a,  0x1c,  0xde,  0xfe,  0x14,  0x1c,  0x17,  0xfe,  0x30,  0x00,  0x4c,  0xc4,  0x01,
-  0xfe,  0x30,  0x10,  0x09,  0x06,  0x12,  0xc1,  0x02,  0xfe,  0xc6,  0x01,  0x29,  0x2d,  0x05,  0x10,  0x35,
-  0xfe,  0x69,  0x10,  0x09,  0x06,  0x12,  0xc1,  0xfe,  0x04,  0xec,  0x2d,  0x08,  0x2d,  0x09,  0x3e,  0x1c,
-  0x01,  0x45,  0x82,  0xfe,  0x05,  0xf6,  0xfe,  0xa8,  0x00,  0x01,  0xfe,  0x56,  0x17,  0x0a,  0x41,  0x8f,
-  0x39,  0x11,  0x48,  0x1c,  0xd2,  0x08,  0x1e,  0x09,  0x52,  0x01,  0x90,  0x02,  0x27,  0x0f,  0x3f,  0x01,
-  0x15,  0x05,  0x10,  0xdb,  0x08,  0x1e,  0x09,  0x52,  0x01,  0x7e,  0xfe,  0x28,  0x10,  0x0f,  0xc8,  0x01,
-  0x15,  0xf2,  0x0f,  0x7d,  0x01,  0x15,  0xfe,  0x49,  0x54,  0x79,  0xfe,  0x16,  0x03,  0x08,  0x1e,  0x09,
-  0x52,  0x01,  0x90,  0x02,  0x27,  0x2e,  0x82,  0xfe,  0x02,  0xe8,  0x31,  0xfe,  0xbf,  0x57,  0xfe,  0x9e,
-  0x43,  0xf7,  0xfe,  0x07,  0x4b,  0xfe,  0x20,  0xf0,  0xdc,  0xfe,  0x40,  0x1c,  0x1b,  0xf8,  0xfe,  0x26,
-  0xf0,  0xfe,  0x74,  0x03,  0xfe,  0xa0,  0xf0,  0xfe,  0x62,  0x03,  0xfe,  0x11,  0xf0,  0xdc,  0xfe,  0x0e,
-  0x10,  0xfe,  0x9f,  0xf0,  0xfe,  0x82,  0x03,  0xf4,  0x13,  0xfe,  0x11,  0x00,  0x02,  0x6b,  0x2e,  0xfe,
-  0x48,  0x1c,  0xf4,  0x1b,  0xf8,  0x34,  0xf8,  0xfe,  0x82,  0xf0,  0xfe,  0x88,  0x03,  0x2b,  0x29,  0xc6,
-  0x72,  0x16,  0xc6,  0x0f,  0x7d,  0x01,  0x15,  0x72,  0x80,  0x08,  0x1e,  0x09,  0x52,  0x01,  0x45,  0x11,
-  0x3f,  0x08,  0x3f,  0x09,  0xa2,  0x01,  0x90,  0xfe,  0x9c,  0x32,  0x11,  0xfe,  0xe4,  0x00,  0x2f,  0xfe,
-  0xce,  0x03,  0x1b,  0x32,  0x1f,  0xfe,  0xde,  0x03,  0x01,  0x55,  0xd3,  0xfe,  0xee,  0x03,  0x73,  0x97,
-  0xd7,  0xfe,  0xae,  0x06,  0x02,  0x26,  0x04,  0x7c,  0x2c,  0x19,  0xfe,  0x20,  0x05,  0x17,  0x8b,  0x01,
-  0x3b,  0x01,  0x9f,  0x01,  0xa1,  0x34,  0xfe,  0x60,  0x02,  0x02,  0xf6,  0xf4,  0x2e,  0x88,  0x18,  0xfe,
-  0x67,  0x1b,  0xfe,  0xbf,  0x57,  0xf7,  0xfe,  0x48,  0x1c,  0x92,  0x01,  0xfe,  0x9c,  0x13,  0xb3,  0xfe,
-  0x96,  0xf0,  0xfe,  0x28,  0x04,  0x2f,  0xfe,  0x2c,  0x04,  0x34,  0x27,  0x0f,  0x3f,  0x01,  0x15,  0x05,
-  0x10,  0x19,  0xfe,  0x0c,  0x05,  0x4d,  0x7a,  0xa5,  0x31,  0x86,  0x76,  0x1b,  0x32,  0x1f,  0x26,  0x04,
-  0x7c,  0x2c,  0xfe,  0x10,  0x12,  0x17,  0x8b,  0x01,  0x3b,  0x34,  0xfe,  0x60,  0x02,  0x02,  0xf6,  0x21,
-  0xfe,  0xa0,  0x00,  0xfe,  0x9b,  0x57,  0xfe,  0x5e,  0x12,  0x0a,  0x07,  0x06,  0xfe,  0x56,  0x12,  0x24,
-  0x23,  0x9a,  0x01,  0x0c,  0x86,  0x76,  0x1f,  0xfe,  0xdc,  0x04,  0x24,  0x23,  0x9a,  0x01,  0x0c,  0x1f,
-  0x26,  0x24,  0x23,  0xba,  0xfe,  0x4c,  0x44,  0xfe,  0x32,  0x12,  0x51,  0xfe,  0x44,  0x48,  0x08,  0xfe,
-  0x93,  0x00,  0xfe,  0x4c,  0x54,  0x79,  0xfe,  0x0c,  0x05,  0x82,  0xa5,  0x31,  0xfe,  0x06,  0x80,  0xfe,
-  0x48,  0x47,  0xfe,  0x48,  0x13,  0x40,  0x05,  0xfe,  0xcc,  0x00,  0xfe,  0x40,  0x13,  0x0a,  0x07,  0x06,
-  0xef,  0xfe,  0x06,  0x10,  0x24,  0x23,  0xba,  0x0a,  0x07,  0x38,  0xe2,  0x17,  0xa9,  0x0a,  0x07,  0x06,
-  0x4f,  0x17,  0xfe,  0x0d,  0x00,  0x01,  0x3b,  0x34,  0xfe,  0xa0,  0x0d,  0x02,  0x26,  0x3a,  0x11,  0xfe,
-  0xe6,  0x00,  0xfe,  0x1c,  0x90,  0xb7,  0x03,  0x17,  0xa9,  0x01,  0x3b,  0x34,  0x27,  0x1b,  0x27,  0x02,
-  0xfe,  0x14,  0x05,  0xfe,  0x42,  0x5b,  0x88,  0x18,  0xfe,  0x46,  0x59,  0xfe,  0xbf,  0x57,  0xf7,  0x17,
-  0x46,  0xfe,  0x07,  0x80,  0xfe,  0x31,  0x44,  0x0a,  0x07,  0x0b,  0xfe,  0x78,  0x13,  0xfe,  0x20,  0x80,
-  0x05,  0x18,  0xfe,  0x70,  0x12,  0x75,  0x07,  0x06,  0xfe,  0x60,  0x13,  0x04,  0xfe,  0xa2,  0x00,  0x2c,
-  0x19,  0xfe,  0xac,  0x05,  0xfe,  0x31,  0xe4,  0x60,  0x75,  0x07,  0x0b,  0xfe,  0x4a,  0x13,  0x04,  0xfe,
-  0xa0,  0x00,  0x2c,  0xfe,  0x42,  0x12,  0x63,  0x2f,  0xfe,  0x6c,  0x05,  0x1b,  0x32,  0xf9,  0x01,  0x0c,
-  0x25,  0xfe,  0xc4,  0x05,  0x11,  0xfe,  0xe3,  0x00,  0x2b,  0x75,  0xfe,  0x4a,  0xf0,  0xfe,  0x96,  0x05,
-  0xfe,  0x49,  0xf0,  0xfe,  0x90,  0x05,  0xad,  0x20,  0xfe,  0x21,  0x00,  0x8a,  0x20,  0xfe,  0x22,  0x00,
-  0xa4,  0x20,  0x8f,  0xfe,  0x09,  0x48,  0x01,  0x0c,  0x25,  0xfe,  0xc4,  0x05,  0xfe,  0xe2,  0x08,  0x75,
-  0x07,  0xe1,  0x4f,  0x01,  0xc2,  0x20,  0x06,  0x16,  0xe8,  0x4c,  0xfe,  0x27,  0x01,  0x0a,  0x07,  0x38,
-  0xe9,  0x47,  0x01,  0xbd,  0x17,  0xa9,  0x0a,  0x07,  0x06,  0x4f,  0x17,  0xfe,  0x0d,  0x00,  0x01,  0x3b,
-  0x01,  0x9f,  0x01,  0xa1,  0x34,  0xfe,  0xa0,  0x0d,  0x02,  0x26,  0x04,  0xfe,  0x9c,  0x00,  0x2c,  0xfe,
-  0x3e,  0x12,  0x04,  0x5c,  0x2c,  0xfe,  0x36,  0x13,  0x47,  0x01,  0xbd,  0x25,  0xfe,  0x3c,  0x06,  0x0f,
-  0x06,  0x75,  0x07,  0x22,  0xfe,  0x02,  0x12,  0x6a,  0x01,  0xfe,  0x06,  0x15,  0x1f,  0xfe,  0x32,  0x06,
-  0x11,  0xc9,  0x01,  0x55,  0x11,  0xfe,  0xe5,  0x00,  0x04,  0x5c,  0xc3,  0x0d,  0x5c,  0x04,  0xfe,  0x9e,
-  0x00,  0x2c,  0xfe,  0x62,  0x12,  0x04,  0x56,  0x2c,  0xfe,  0x5a,  0x13,  0x01,  0xfe,  0x7e,  0x19,  0x01,
-  0xfe,  0xe8,  0x19,  0xf3,  0xa8,  0xf1,  0x08,  0x6c,  0xff,  0x02,  0x00,  0x57,  0x6e,  0x81,  0x1a,  0x59,
-  0xd1,  0xa8,  0x74,  0x47,  0x01,  0xbd,  0x25,  0xfe,  0xa6,  0x06,  0x75,  0x07,  0x1d,  0xab,  0x9e,  0x0f,
-  0x5e,  0x01,  0xfe,  0x34,  0x15,  0x1f,  0xfe,  0x9c,  0x06,  0x11,  0xc9,  0x01,  0x55,  0x11,  0xfe,  0xe5,
-  0x00,  0x04,  0x56,  0xc3,  0x0d,  0x56,  0x09,  0x06,  0x01,  0xbd,  0xfe,  0x9c,  0x32,  0x78,  0x92,  0x01,
-  0xfe,  0x9c,  0x13,  0xb3,  0x11,  0xfe,  0xe2,  0x00,  0x2f,  0xfe,  0xbe,  0x06,  0x1b,  0x32,  0xd7,  0xfe,
-  0xda,  0x06,  0x85,  0xfe,  0x78,  0x07,  0xd3,  0xfe,  0x80,  0x07,  0x73,  0x97,  0x02,  0x26,  0x0a,  0x07,
-  0x0b,  0xfe,  0x2e,  0x12,  0x14,  0x18,  0x01,  0x0c,  0x14,  0x00,  0x01,  0x0c,  0x14,  0x00,  0x01,  0x0c,
-  0x14,  0x00,  0x01,  0x0c,  0xfe,  0x99,  0xa4,  0x01,  0x0c,  0x14,  0x00,  0x02,  0xfe,  0x50,  0x08,  0x71,
-  0x07,  0x1d,  0xef,  0x0a,  0x07,  0x1d,  0xfe,  0x30,  0x13,  0x14,  0xfe,  0x1b,  0x00,  0x01,  0x0c,  0x14,
-  0x00,  0x01,  0x0c,  0x14,  0x00,  0x01,  0x0c,  0x14,  0x00,  0x01,  0x0c,  0x14,  0x06,  0x01,  0x0c,  0x14,
-  0x00,  0x02,  0xfe,  0x0a,  0x0c,  0x6a,  0xfe,  0x9a,  0x81,  0x6f,  0x8f,  0xfe,  0x09,  0x6f,  0xfe,  0x93,
-  0x45,  0x19,  0xfe,  0x88,  0x07,  0x2f,  0xfe,  0x60,  0x07,  0x1b,  0x32,  0xd7,  0xfe,  0x58,  0x07,  0x73,
-  0x97,  0x85,  0xfe,  0x78,  0x07,  0x02,  0x26,  0x01,  0x55,  0x02,  0xfe,  0xbe,  0x06,  0x14,  0x22,  0x02,
-  0xfe,  0xbe,  0x06,  0xfe,  0x9c,  0xf7,  0xfe,  0xf0,  0x07,  0xfe,  0x2c,  0x90,  0xfe,  0xae,  0x90,  0x53,
-  0xfe,  0xd6,  0x07,  0x0d,  0x66,  0x12,  0x67,  0x0a,  0x41,  0x60,  0x39,  0x01,  0xfe,  0x14,  0x19,  0x05,
-  0x10,  0x87,  0xfe,  0x83,  0xe7,  0xfe,  0x95,  0x00,  0x8a,  0xfe,  0x03,  0x40,  0x0a,  0x41,  0x46,  0x39,
-  0x01,  0xc5,  0xb6,  0xfe,  0x1f,  0x40,  0x16,  0x68,  0x01,  0xfe,  0xbe,  0x13,  0xfe,  0x08,  0x50,  0xfe,
-  0x8a,  0x50,  0xfe,  0x34,  0x51,  0xfe,  0xb6,  0x51,  0xfe,  0x08,  0x90,  0xfe,  0x8a,  0x90,  0x0d,  0x64,
-  0x12,  0x65,  0xda,  0xfa,  0x0d,  0x3c,  0x12,  0x3d,  0xfe,  0x60,  0x10,  0x0a,  0x07,  0x60,  0xe9,  0xfe,
-  0x2c,  0x90,  0xfe,  0xae,  0x90,  0x0d,  0x66,  0x12,  0x67,  0x0a,  0x07,  0x46,  0xd1,  0x01,  0xc5,  0xfe,
-  0x1f,  0x80,  0x16,  0x68,  0xfe,  0x34,  0x90,  0xfe,  0xb6,  0x90,  0x0d,  0x43,  0x12,  0x44,  0xfe,  0x08,
-  0x90,  0xfe,  0x8a,  0x90,  0x0d,  0x64,  0x12,  0x65,  0xa7,  0x07,  0x46,  0xdb,  0xda,  0xfa,  0x0d,  0x3c,
-  0x12,  0x3d,  0xad,  0xfe,  0x28,  0x90,  0xfe,  0xaa,  0x90,  0x0d,  0x3c,  0x12,  0x3d,  0x0d,  0x30,  0x12,
-  0x42,  0x2b,  0x0d,  0x54,  0x0d,  0x69,  0x0a,  0x41,  0x22,  0x39,  0x2e,  0x08,  0x84,  0x2f,  0xfe,  0x70,
-  0x08,  0xfe,  0x9e,  0xf0,  0xfe,  0x84,  0x08,  0xa3,  0x19,  0x32,  0x2e,  0x5b,  0xfe,  0xed,  0x10,  0xac,
-  0xfe,  0xa8,  0x08,  0xae,  0xfe,  0xc4,  0x08,  0x85,  0xfe,  0x9c,  0x08,  0xd3,  0xfe,  0xa2,  0x08,  0x73,
-  0x97,  0x02,  0x26,  0x01,  0x55,  0xfe,  0xc9,  0x10,  0x14,  0x22,  0xfe,  0xc9,  0x10,  0x71,  0x07,  0x06,
-  0xfe,  0x10,  0x12,  0x71,  0x07,  0x0b,  0x50,  0x0a,  0x07,  0x0b,  0xfe,  0xa6,  0x12,  0xfe,  0x2e,  0x1c,
-  0xb0,  0x71,  0x07,  0x06,  0x50,  0x71,  0x07,  0x0b,  0xfe,  0x92,  0x12,  0xfe,  0x2c,  0x1c,  0xa7,  0x07,
-  0x46,  0xaf,  0xa7,  0x41,  0x46,  0xfe,  0x05,  0x40,  0xda,  0xfa,  0xfe,  0x28,  0x50,  0xfe,  0xaa,  0x50,
-  0xfe,  0xaa,  0xf0,  0xfe,  0xf6,  0x09,  0xfe,  0xac,  0xf0,  0xfe,  0x24,  0x09,  0x02,  0xfe,  0x02,  0x0a,
-  0xfe,  0xb7,  0xf0,  0xfe,  0x20,  0x09,  0xfe,  0x02,  0xf6,  0x1d,  0x6a,  0xfe,  0x70,  0x18,  0xfe,  0xf1,
-  0x18,  0xfe,  0x40,  0x55,  0xfe,  0xe1,  0x55,  0xfe,  0x10,  0x58,  0xfe,  0x91,  0x58,  0xfe,  0x14,  0x59,
-  0xfe,  0x95,  0x59,  0x1b,  0x9b,  0xfe,  0x8c,  0xf0,  0xfe,  0x20,  0x09,  0xfe,  0xac,  0xf0,  0xfe,  0x14,
-  0x09,  0xed,  0xfe,  0xcb,  0x10,  0xfe,  0xad,  0xf0,  0xfe,  0x30,  0x09,  0x02,  0xfe,  0x3c,  0x0b,  0xee,
-  0xfe,  0xbf,  0x10,  0xfe,  0x2b,  0xf0,  0x9b,  0xfe,  0x6b,  0x18,  0x1a,  0xfe,  0x00,  0xfe,  0xe2,  0xcd,
-  0xfe,  0xd2,  0xf0,  0x9b,  0xfe,  0x76,  0x18,  0x1a,  0x18,  0x19,  0x9b,  0x04,  0xe7,  0x1a,  0x06,  0x19,
-  0x9b,  0xac,  0x58,  0xae,  0x58,  0xed,  0xee,  0xfe,  0x89,  0x10,  0x92,  0x63,  0x3a,  0x17,  0xa9,  0x01,
-  0x3b,  0x13,  0xfe,  0x35,  0x00,  0x34,  0x6b,  0x13,  0x93,  0x02,  0x6b,  0xfb,  0xb2,  0x0b,  0xfe,  0x1a,
-  0x12,  0x51,  0xfe,  0x19,  0x82,  0xfe,  0x6c,  0x18,  0xfe,  0x44,  0x54,  0xf0,  0xdf,  0xfe,  0x74,  0x18,
-  0x94,  0x95,  0x19,  0xfe,  0xf2,  0x08,  0x02,  0x58,  0x0a,  0x07,  0x60,  0xaf,  0x04,  0x30,  0x2a,  0x42,
-  0x0d,  0x43,  0x12,  0x44,  0x83,  0x30,  0x5a,  0x42,  0xfe,  0x6c,  0x18,  0xfe,  0xed,  0x18,  0xfe,  0x44,
-  0x54,  0xfe,  0xe5,  0x54,  0x36,  0x43,  0x21,  0x44,  0x04,  0x54,  0x2a,  0x69,  0x94,  0xfe,  0xe3,  0x54,
-  0xfe,  0x74,  0x18,  0xfe,  0xf5,  0x18,  0x94,  0xfe,  0xe3,  0x54,  0x95,  0xca,  0x53,  0xfe,  0xf2,  0x08,
-  0x02,  0x58,  0xfe,  0x37,  0xf0,  0xfe,  0xfe,  0x09,  0xfe,  0x8b,  0xf0,  0xfe,  0x84,  0x09,  0x02,  0x58,
-  0xfb,  0xb2,  0x0b,  0x28,  0xfe,  0x1e,  0x0b,  0x36,  0x54,  0x21,  0x69,  0x53,  0x7a,  0x08,  0xfe,  0xc0,
-  0x07,  0x47,  0x62,  0x00,  0xd9,  0xfe,  0x01,  0x59,  0xfe,  0x52,  0xf0,  0xfe,  0x30,  0x0a,  0x94,  0x99,
-  0xfe,  0x48,  0x0a,  0x36,  0x54,  0x94,  0xfe,  0xe3,  0x54,  0x4e,  0x54,  0x70,  0x69,  0xfe,  0x14,  0x58,
-  0xfe,  0x95,  0x58,  0x02,  0x58,  0x36,  0x54,  0x21,  0x69,  0xfe,  0x14,  0x59,  0xfe,  0x95,  0x59,  0xf0,
-  0x4e,  0x54,  0x4e,  0x69,  0x02,  0x58,  0x0a,  0x07,  0x60,  0xfe,  0x82,  0x12,  0x0a,  0x07,  0x22,  0xfe,
-  0x66,  0x13,  0x29,  0x68,  0x72,  0xd0,  0xfe,  0x83,  0x80,  0xfe,  0xc8,  0x44,  0xfe,  0x2e,  0x13,  0xfe,
-  0x04,  0x91,  0xfe,  0x86,  0x91,  0x6d,  0x31,  0xfe,  0x40,  0x59,  0xfe,  0xc1,  0x59,  0x53,  0xfe,  0xfa,
-  0x08,  0x04,  0x66,  0x2a,  0x67,  0x0d,  0xb5,  0x12,  0x93,  0x4e,  0x66,  0x70,  0x67,  0x01,  0xc5,  0xb6,
-  0x6d,  0x31,  0x16,  0x68,  0x83,  0x30,  0x5a,  0x42,  0x36,  0x43,  0x21,  0x44,  0x95,  0xca,  0xfe,  0x04,
-  0xfa,  0x30,  0xfe,  0x05,  0xfa,  0x42,  0x01,  0xfe,  0xbe,  0x13,  0xfe,  0x36,  0x10,  0x2b,  0x0d,  0xb5,
-  0x0d,  0x93,  0x36,  0x43,  0x21,  0x44,  0xb0,  0x0a,  0x07,  0x22,  0x19,  0xfe,  0xfa,  0x08,  0x36,  0x3c,
-  0x21,  0x3d,  0x0a,  0x07,  0xfe,  0xf7,  0x00,  0x39,  0x04,  0x64,  0x2a,  0x65,  0xfe,  0x10,  0x58,  0xfe,
-  0x91,  0x58,  0x4e,  0x54,  0x70,  0x69,  0x02,  0xfe,  0x18,  0x0a,  0x0a,  0x07,  0x22,  0x19,  0xfe,  0xfa,
-  0x08,  0x0a,  0x07,  0xfe,  0xf7,  0x00,  0x39,  0xf0,  0xdf,  0x6a,  0xfe,  0x10,  0x90,  0xfe,  0x92,  0x90,
-  0xfe,  0xd3,  0x10,  0x40,  0x05,  0xcb,  0x19,  0xfe,  0x2c,  0x09,  0x11,  0xcb,  0xfb,  0xb2,  0x0b,  0xfe,
-  0x14,  0x13,  0x04,  0x3c,  0x2a,  0x3d,  0x53,  0xfe,  0x2c,  0x09,  0xfe,  0x0c,  0x58,  0xfe,  0x8d,  0x58,
-  0x02,  0x58,  0x2b,  0x47,  0xfe,  0x19,  0x80,  0xfe,  0xf1,  0x10,  0x0a,  0x07,  0x0b,  0xab,  0xfe,  0x6c,
-  0x19,  0xfe,  0x19,  0x41,  0xfe,  0x8e,  0x10,  0xfe,  0x6c,  0x19,  0x4e,  0x3c,  0xfe,  0xed,  0x19,  0x70,
-  0x3d,  0xfe,  0x0c,  0x51,  0xfe,  0x8e,  0x51,  0xfe,  0x6b,  0x18,  0x1a,  0xfe,  0x00,  0xff,  0x35,  0xfe,
-  0x74,  0x10,  0xcd,  0xfe,  0xd2,  0xf0,  0xfe,  0xb6,  0x0b,  0xfe,  0x76,  0x18,  0x1a,  0x18,  0xd6,  0x04,
-  0xe7,  0x1a,  0x06,  0x89,  0x13,  0xfe,  0x16,  0x00,  0x02,  0x6b,  0xfe,  0xd1,  0xf0,  0xfe,  0xc8,  0x0b,
-  0x17,  0x84,  0x01,  0x3b,  0x13,  0xfe,  0x17,  0x00,  0xfe,  0x42,  0x10,  0xfe,  0xce,  0xf0,  0xfe,  0xce,
-  0x0b,  0xfe,  0x3c,  0x10,  0xfe,  0xcd,  0xf0,  0xfe,  0xda,  0x0b,  0x13,  0xfe,  0x22,  0x00,  0x02,  0x6b,
-  0xfe,  0xcb,  0xf0,  0xfe,  0xe6,  0x0b,  0x13,  0xfe,  0x24,  0x00,  0x02,  0x6b,  0xfe,  0xd0,  0xf0,  0xfe,
-  0xf0,  0x0b,  0x13,  0xb1,  0xe0,  0xfe,  0xcf,  0xf0,  0xfe,  0xfa,  0x0b,  0x13,  0x8f,  0xdd,  0xfe,  0xcc,
-  0xf0,  0xfe,  0x0a,  0x0c,  0xfe,  0x84,  0x80,  0xb2,  0x22,  0x4f,  0x13,  0xfe,  0x12,  0x00,  0x2e,  0x08,
-  0x84,  0x2f,  0xfe,  0x10,  0x0c,  0xfe,  0x9e,  0xf0,  0xfe,  0x24,  0x0c,  0xa3,  0x19,  0x32,  0x2e,  0x5b,
-  0xfe,  0xed,  0x10,  0xac,  0x26,  0xae,  0x26,  0x2e,  0xfe,  0x9c,  0x32,  0x2f,  0xfe,  0x30,  0x0c,  0x1b,
-  0x32,  0x85,  0xfe,  0x4c,  0x0c,  0x73,  0x97,  0xac,  0xfe,  0xf0,  0x07,  0xae,  0xfe,  0xf0,  0x07,  0x02,
-  0x26,  0x01,  0x55,  0xfe,  0xdb,  0x10,  0x11,  0xfe,  0xe8,  0x00,  0xed,  0xee,  0x92,  0x86,  0x76,  0xfe,
-  0x89,  0xf0,  0x26,  0x24,  0x23,  0xfe,  0xe9,  0x09,  0x01,  0x0c,  0x86,  0x76,  0x1f,  0x26,  0x24,  0x23,
-  0x9a,  0x34,  0xfe,  0x88,  0x0c,  0x1b,  0x32,  0x02,  0xfe,  0x7c,  0x0c,  0xa3,  0x50,  0x13,  0xfe,  0x42,
-  0x00,  0x02,  0x6b,  0xa6,  0x06,  0xfe,  0x81,  0x49,  0xfe,  0xcc,  0x12,  0x0a,  0x07,  0x0b,  0xfe,  0x5a,
-  0x13,  0x13,  0x00,  0x61,  0x0b,  0xfe,  0x6a,  0x12,  0x61,  0xfe,  0x28,  0x00,  0x28,  0xfe,  0xce,  0x0d,
-  0x0f,  0x7d,  0x01,  0x15,  0x05,  0x00,  0x89,  0x37,  0xfe,  0x28,  0x00,  0x02,  0xfe,  0xce,  0x0d,  0x01,
-  0x9f,  0x01,  0xa1,  0x0f,  0xc8,  0x01,  0xfe,  0x24,  0x0f,  0xb9,  0x08,  0x3f,  0x09,  0xa2,  0x01,  0x45,
-  0x11,  0x48,  0x08,  0x1e,  0x09,  0x52,  0x01,  0x7e,  0x02,  0x27,  0x13,  0xfe,  0x44,  0x00,  0x61,  0x0b,
-  0xab,  0x37,  0x0b,  0xfe,  0xc0,  0x10,  0x01,  0xc2,  0x37,  0x0b,  0xfe,  0xb6,  0x10,  0x01,  0xc2,  0xfe,
-  0x19,  0x82,  0xfe,  0x34,  0x46,  0xfe,  0x0a,  0x13,  0x37,  0x0b,  0x13,  0xfe,  0x43,  0x00,  0xfe,  0xa2,
-  0x10,  0x0a,  0x41,  0x0b,  0x39,  0x01,  0x9f,  0x01,  0xa1,  0xb9,  0x08,  0x3f,  0x09,  0xa2,  0x01,  0x45,
-  0x11,  0x48,  0x08,  0x1e,  0x09,  0x52,  0x01,  0x7e,  0x88,  0x0b,  0xb9,  0x1c,  0xd2,  0x02,  0xfe,  0x4c,
-  0x03,  0x0a,  0x07,  0x0b,  0xd6,  0x37,  0x0b,  0x13,  0x00,  0xfe,  0x54,  0x10,  0x71,  0x07,  0x1d,  0xfe,
-  0x50,  0x12,  0x0a,  0x07,  0x1d,  0xfe,  0x48,  0x13,  0xfe,  0x1c,  0x1c,  0xfe,  0x9d,  0xf0,  0xfe,  0x8c,
-  0x0d,  0xfe,  0x1c,  0x1c,  0xfe,  0x9d,  0xf0,  0xfe,  0x92,  0x0d,  0x0a,  0x41,  0x1d,  0x39,  0xfe,  0x95,
-  0x10,  0x13,  0xfe,  0x15,  0x00,  0xfe,  0x04,  0xe6,  0x0b,  0x6a,  0xfe,  0x26,  0x10,  0x13,  0xfe,  0x13,
-  0x00,  0xdd,  0x13,  0xfe,  0x47,  0x00,  0x8a,  0x13,  0xfe,  0x41,  0x00,  0xa4,  0x13,  0xfe,  0x24,  0x00,
-  0x04,  0x7c,  0x2c,  0x28,  0xf6,  0x6a,  0xfe,  0x04,  0xe6,  0x1d,  0xfe,  0x9d,  0x41,  0xfe,  0x1c,  0x42,
-  0xb9,  0x01,  0xea,  0x02,  0x27,  0xde,  0x17,  0x0b,  0x4c,  0xfe,  0x9b,  0x00,  0xe5,  0x17,  0xfe,  0x31,
-  0x00,  0x4c,  0xc4,  0x01,  0xfe,  0x30,  0x10,  0x02,  0xfe,  0xc6,  0x01,  0x1c,  0xfe,  0x06,  0xec,  0xfe,
-  0xb9,  0x00,  0x8c,  0x37,  0x38,  0xc7,  0x35,  0x1c,  0xfe,  0x06,  0xea,  0xfe,  0xb9,  0x00,  0xfe,  0x47,
-  0x4b,  0x9e,  0xfe,  0x75,  0x57,  0x04,  0x5f,  0xfe,  0x98,  0x56,  0xfe,  0x28,  0x12,  0x0f,  0x7d,  0xfe,
-  0xf4,  0x14,  0x47,  0xf2,  0x0f,  0xc8,  0xfe,  0xea,  0x14,  0xfe,  0x49,  0x54,  0x98,  0xfe,  0x42,  0x0e,
-  0x0f,  0x1e,  0xfe,  0xde,  0x14,  0xfe,  0x44,  0x48,  0x02,  0xfe,  0x4c,  0x03,  0x0f,  0x5f,  0xfe,  0xc8,
-  0x14,  0x8c,  0x37,  0x38,  0xc7,  0x35,  0x1c,  0xfe,  0xce,  0x47,  0xfe,  0xbd,  0x13,  0x02,  0x27,  0x29,
-  0x2d,  0x05,  0x10,  0xfe,  0x78,  0x12,  0x2b,  0x16,  0x5e,  0x16,  0xb4,  0x29,  0x48,  0x47,  0x4c,  0x48,
-  0xa3,  0xd9,  0xfe,  0xbc,  0xf0,  0xfe,  0xde,  0x0e,  0x08,  0x06,  0x16,  0x5e,  0x01,  0xfe,  0xe6,  0x16,
-  0x04,  0xfe,  0x38,  0x01,  0x2a,  0xfe,  0x3a,  0x01,  0x53,  0xfe,  0xe2,  0x0e,  0x04,  0xfe,  0x38,  0x01,
-  0x1a,  0xfe,  0xf0,  0xff,  0x0d,  0xfe,  0x60,  0x01,  0x04,  0xfe,  0x3a,  0x01,  0x0d,  0xfe,  0x62,  0x01,
-  0x20,  0x06,  0x16,  0x48,  0xfe,  0x04,  0xec,  0x2d,  0x08,  0x2d,  0x09,  0x3e,  0x1c,  0x01,  0x45,  0x82,
-  0xfe,  0x05,  0xf6,  0xfe,  0x34,  0x01,  0x01,  0xfe,  0x56,  0x17,  0x11,  0x48,  0xd2,  0x08,  0x06,  0x03,
-  0x2b,  0x03,  0x29,  0x5e,  0xfe,  0xf7,  0x12,  0x29,  0xb4,  0x72,  0x16,  0xb4,  0x05,  0x84,  0xfe,  0x93,
-  0x13,  0xfe,  0x24,  0x1c,  0x17,  0x18,  0x4c,  0xfe,  0x9b,  0x00,  0xe5,  0xfe,  0xd9,  0x10,  0x9c,  0xfe,
-  0x03,  0xdc,  0xfe,  0x73,  0x57,  0xfe,  0x80,  0x5d,  0x03,  0x9c,  0xfe,  0x03,  0xdc,  0xfe,  0x5b,  0x57,
-  0xfe,  0x80,  0x5d,  0x03,  0xfe,  0x03,  0x57,  0x9c,  0x2b,  0xfe,  0x00,  0xcc,  0x03,  0xfe,  0x03,  0x57,
-  0x9c,  0x80,  0x03,  0x01,  0xfe,  0x8e,  0x17,  0x40,  0x05,  0x48,  0xfe,  0x0a,  0x13,  0x08,  0x1e,  0x09,
-  0x52,  0xdd,  0x01,  0x9f,  0x01,  0xa1,  0x08,  0x3f,  0x09,  0xa2,  0x01,  0x45,  0x11,  0xfe,  0xe9,  0x00,
-  0x0a,  0x07,  0x8f,  0xfe,  0x52,  0x13,  0x01,  0xfe,  0x18,  0x17,  0xfe,  0x1e,  0x1c,  0xfe,  0x14,  0x90,
-  0x0d,  0xfe,  0x64,  0x01,  0xfe,  0x16,  0x90,  0x0d,  0xfe,  0x66,  0x01,  0x0a,  0x07,  0x46,  0xef,  0xfe,
-  0x03,  0x80,  0x5b,  0x4d,  0x11,  0x7b,  0x08,  0x2d,  0x09,  0x3e,  0x1c,  0x7a,  0x01,  0x90,  0xfe,  0x62,
-  0x08,  0x72,  0x4d,  0x11,  0x7b,  0x08,  0x2d,  0x09,  0x3e,  0x1c,  0x7a,  0x01,  0x90,  0x6d,  0x31,  0x11,
-  0x7b,  0x08,  0x2d,  0x09,  0x3e,  0x1c,  0x7a,  0x01,  0x7e,  0x03,  0xfe,  0x08,  0x1c,  0x04,  0xfe,  0xac,
-  0x00,  0xfe,  0x06,  0x58,  0x04,  0xfe,  0xae,  0x00,  0xfe,  0x07,  0x58,  0x04,  0xfe,  0xb0,  0x00,  0xfe,
-  0x08,  0x58,  0x04,  0xfe,  0xb2,  0x00,  0xfe,  0x09,  0x58,  0xfe,  0x0a,  0x1c,  0x20,  0x74,  0x16,  0xfe,
-  0xb9,  0x00,  0x2b,  0x0d,  0x5c,  0x0d,  0x56,  0x20,  0x10,  0x16,  0x2d,  0x16,  0x3e,  0x51,  0xa6,  0xfe,
-  0x93,  0x00,  0x08,  0x2d,  0x09,  0x3e,  0x1c,  0x01,  0x7e,  0x82,  0x11,  0x7b,  0xfe,  0x14,  0x56,  0xfe,
-  0xd6,  0xf0,  0x8a,  0xde,  0x92,  0xfe,  0x14,  0x1c,  0xfe,  0x10,  0x1c,  0xfe,  0x18,  0x1c,  0x03,  0x1c,
-  0xfe,  0x0c,  0x14,  0x8c,  0xfe,  0x07,  0xe6,  0x38,  0xfe,  0xce,  0x47,  0xfe,  0xf5,  0x13,  0x03,  0x01,
-  0xc2,  0x0f,  0x3f,  0x01,  0x15,  0x05,  0x10,  0xdb,  0x0f,  0x1e,  0x01,  0x15,  0x05,  0x10,  0xe2,  0xfe,
-  0x44,  0x58,  0x4d,  0xfe,  0x01,  0xec,  0xc4,  0xfe,  0x9e,  0x40,  0xfe,  0x9d,  0xe7,  0x00,  0xfe,  0x9c,
-  0xe7,  0x1d,  0xa5,  0x31,  0x01,  0xea,  0xfe,  0xc9,  0x10,  0x03,  0x2e,  0x86,  0x76,  0x24,  0x23,  0xba,
-  0x05,  0x1d,  0xfe,  0x48,  0x12,  0x05,  0x0b,  0xfe,  0x4c,  0x12,  0x05,  0x18,  0xfe,  0x30,  0x12,  0x05,
-  0xd4,  0x19,  0xfe,  0xd4,  0x11,  0x05,  0xfe,  0x23,  0x00,  0x19,  0xfe,  0xe0,  0x11,  0x05,  0x06,  0x19,
-  0xfe,  0x3e,  0x12,  0x05,  0x22,  0xfe,  0x12,  0x12,  0x05,  0x00,  0x19,  0x26,  0x17,  0xd4,  0x01,  0x3b,
-  0xce,  0x3a,  0x01,  0x0c,  0x85,  0x55,  0x03,  0x3a,  0x11,  0xfe,  0xcc,  0x00,  0x02,  0x27,  0x3a,  0x40,
-  0x05,  0xcb,  0xfe,  0xe3,  0x13,  0x36,  0x3c,  0x21,  0x3d,  0x53,  0xfe,  0x92,  0x11,  0x0a,  0x07,  0x60,
-  0xfe,  0x72,  0x12,  0x83,  0x30,  0x5a,  0x42,  0x95,  0xca,  0x98,  0xfe,  0x5c,  0x11,  0x29,  0x68,  0xfe,
-  0x26,  0x13,  0x04,  0xb5,  0x2a,  0x93,  0x53,  0xfe,  0xb2,  0x0d,  0x0d,  0x66,  0x12,  0x67,  0x2b,  0x0d,
-  0xb5,  0x0d,  0x93,  0x01,  0xc5,  0x20,  0x74,  0x5b,  0x16,  0x68,  0x01,  0xfe,  0xbe,  0x13,  0x83,  0x30,
-  0x5a,  0x42,  0xfe,  0x04,  0x55,  0xfe,  0xa5,  0x55,  0xfe,  0x04,  0xfa,  0x30,  0xfe,  0x05,  0xfa,  0x42,
-  0xfe,  0x91,  0x10,  0x04,  0x43,  0x2a,  0x44,  0xfe,  0x40,  0x56,  0xfe,  0xe1,  0x56,  0x0d,  0x43,  0x12,
-  0x44,  0xad,  0x83,  0x30,  0x5a,  0x42,  0x95,  0xca,  0x04,  0x64,  0x2a,  0x65,  0xfe,  0x00,  0x56,  0xfe,
-  0xa1,  0x56,  0x0d,  0x64,  0x12,  0x65,  0x0a,  0x07,  0x60,  0xfe,  0x1e,  0x12,  0x29,  0x68,  0xfe,  0x1f,
-  0x40,  0x04,  0x66,  0x2a,  0x67,  0xfe,  0x2c,  0x50,  0xfe,  0xae,  0x50,  0x04,  0x43,  0x2a,  0x44,  0xfe,
-  0x34,  0x50,  0xfe,  0xb6,  0x50,  0x04,  0x64,  0x2a,  0x65,  0xfe,  0x08,  0x50,  0xfe,  0x8a,  0x50,  0x04,
-  0x3c,  0x2a,  0x3d,  0xfe,  0x28,  0x50,  0xfe,  0xaa,  0x50,  0x02,  0xa0,  0x20,  0x06,  0x16,  0xfc,  0x02,
-  0x7f,  0x3a,  0x01,  0x0c,  0x1f,  0x57,  0x24,  0x23,  0xba,  0x05,  0x06,  0x28,  0x57,  0x40,  0x05,  0xcb,
-  0x28,  0x7f,  0x01,  0xfe,  0x9c,  0x13,  0x1a,  0x59,  0x19,  0x57,  0x0a,  0x07,  0x0b,  0xe4,  0x36,  0x3c,
-  0x21,  0x3d,  0xfe,  0x0a,  0x55,  0x35,  0xfe,  0x8b,  0x55,  0x4e,  0x3c,  0x70,  0x3d,  0xfe,  0x0c,  0x51,
-  0xfe,  0x8e,  0x51,  0x02,  0x7f,  0xdf,  0xfe,  0x0a,  0x45,  0xfe,  0x19,  0x41,  0x02,  0x7f,  0x3a,  0x01,
-  0x0c,  0x1f,  0xfe,  0xd6,  0x10,  0x24,  0x23,  0xfe,  0xe9,  0x09,  0x61,  0x18,  0xfe,  0x94,  0x12,  0x61,
-  0x0b,  0x4f,  0x02,  0x57,  0x2f,  0xfe,  0x5e,  0x12,  0x1b,  0x32,  0x1f,  0xfe,  0xd6,  0x10,  0x24,  0x23,
-  0x9a,  0x05,  0x18,  0x28,  0x57,  0x01,  0x0c,  0x1f,  0xfe,  0xd6,  0x10,  0x24,  0x23,  0xfe,  0xe8,  0x09,
-  0x51,  0x04,  0xfe,  0x9c,  0x00,  0x2c,  0x35,  0xfe,  0xbb,  0x45,  0x61,  0x00,  0x50,  0x37,  0x06,  0xa6,
-  0x59,  0xfe,  0xc0,  0x14,  0xfe,  0xf8,  0x14,  0xb3,  0x40,  0x05,  0xc9,  0xfe,  0x16,  0x13,  0x04,  0xfe,
-  0x9e,  0x00,  0x2c,  0xd6,  0x04,  0x56,  0x2c,  0x35,  0x63,  0x02,  0x7f,  0xfe,  0xc0,  0x5d,  0xfe,  0xe4,
-  0x14,  0xfe,  0x03,  0x17,  0x04,  0x5c,  0xc3,  0x0d,  0x5c,  0x63,  0x3a,  0x01,  0x0c,  0x25,  0xa0,  0x01,
-  0xfe,  0x06,  0x15,  0x02,  0xa0,  0x2f,  0xfe,  0xe8,  0x12,  0x1b,  0x32,  0x1f,  0x57,  0x24,  0x23,  0x9a,
-  0x05,  0x06,  0x28,  0x57,  0xfe,  0xf6,  0x14,  0xfe,  0x42,  0x58,  0xfe,  0x70,  0x14,  0xfe,  0x92,  0x14,
-  0xb3,  0xfe,  0x4a,  0xf4,  0x0b,  0x19,  0x57,  0xfe,  0x4a,  0xf4,  0x06,  0xd8,  0x40,  0x05,  0xc9,  0xd1,
-  0x02,  0x7f,  0x04,  0x56,  0xc3,  0x0d,  0x56,  0x63,  0x3a,  0x01,  0x0c,  0x25,  0xa0,  0x01,  0xfe,  0x34,
-  0x15,  0x02,  0xa0,  0x25,  0xfe,  0x50,  0x13,  0x78,  0xf9,  0x78,  0x03,  0x34,  0xfe,  0x4c,  0x13,  0x73,
-  0xfe,  0x4c,  0x13,  0x63,  0x3a,  0x01,  0x0c,  0xfe,  0xe3,  0x10,  0x08,  0x6c,  0xff,  0x02,  0x00,  0x57,
-  0x6e,  0x81,  0x1a,  0xfe,  0xff,  0x7f,  0xfe,  0x30,  0x56,  0xfe,  0x00,  0x5c,  0x03,  0x08,  0x6c,  0xff,
-  0x02,  0x00,  0x57,  0x6e,  0x81,  0x1a,  0x59,  0xfe,  0x30,  0x56,  0xfe,  0x00,  0x5c,  0x03,  0x08,  0x6c,
-  0xff,  0x02,  0x00,  0x57,  0x6e,  0x81,  0x03,  0x08,  0x6c,  0xff,  0x02,  0x00,  0x57,  0x6e,  0x81,  0xfe,
-  0x0b,  0x58,  0x03,  0x0f,  0x5c,  0x01,  0x8e,  0x0f,  0x56,  0x01,  0x8e,  0x03,  0xd0,  0x1a,  0x10,  0xff,
-  0x03,  0x00,  0x54,  0xfe,  0x00,  0xf4,  0x22,  0x6e,  0xfe,  0x00,  0x7d,  0xfe,  0x01,  0x7d,  0xfe,  0x02,
-  0x7d,  0xfe,  0x03,  0x7c,  0x6d,  0x31,  0x0d,  0x64,  0x12,  0x65,  0x4e,  0x43,  0x70,  0x44,  0x03,  0xfe,
-  0x62,  0x18,  0xfe,  0x82,  0x5a,  0xfe,  0xe1,  0x1a,  0xbf,  0xfe,  0x02,  0x58,  0x03,  0x01,  0xfe,  0x7e,
-  0x19,  0xfe,  0x42,  0x48,  0x6a,  0x51,  0x9e,  0x01,  0x0c,  0x1f,  0xfe,  0xfe,  0x14,  0x24,  0x23,  0xfe,
-  0xe9,  0x09,  0xfe,  0xc1,  0x59,  0x01,  0x0c,  0x1f,  0xfe,  0xfe,  0x14,  0x24,  0x23,  0xfe,  0xe8,  0x0a,
-  0x04,  0xfe,  0x9e,  0x00,  0x2c,  0xfe,  0xc4,  0x12,  0x2b,  0xb8,  0x1d,  0xe4,  0x61,  0xd5,  0x79,  0xfe,
-  0x4c,  0x14,  0x4f,  0x08,  0x06,  0x09,  0xd5,  0xa6,  0xfe,  0x00,  0x10,  0xfe,  0x78,  0x10,  0xff,  0x02,
-  0x83,  0x55,  0x8a,  0xff,  0x02,  0x83,  0x55,  0xb8,  0x18,  0xfe,  0x12,  0x13,  0x62,  0xfe,  0x30,  0x00,
-  0x98,  0xfe,  0xa6,  0x14,  0x09,  0x8b,  0x08,  0x06,  0xfe,  0x56,  0x10,  0xb8,  0x0b,  0xfe,  0x16,  0x13,
-  0x62,  0xfe,  0x64,  0x00,  0x98,  0xfe,  0xa6,  0x14,  0x0f,  0xfe,  0x64,  0x00,  0x09,  0xb1,  0x08,  0x06,
-  0xfe,  0x28,  0x10,  0xb8,  0x06,  0xfe,  0x60,  0x13,  0x62,  0xfe,  0xc8,  0x00,  0x98,  0xfe,  0xa6,  0x14,
-  0x0f,  0xfe,  0xc8,  0x00,  0x09,  0x5e,  0x08,  0x06,  0xad,  0x62,  0xfe,  0x90,  0x01,  0x99,  0xfe,  0xb2,
-  0x14,  0x9e,  0xb0,  0xfe,  0x43,  0xf4,  0xb4,  0xfe,  0x56,  0xf0,  0xfe,  0xc4,  0x14,  0xfe,  0x04,  0xf4,
-  0x6c,  0xfe,  0x43,  0xf4,  0xb1,  0xfe,  0xf3,  0x10,  0xb7,  0x01,  0xfe,  0x8e,  0x13,  0x1a,  0x59,  0xaf,
-  0xfe,  0x00,  0x17,  0xfe,  0x4d,  0xe4,  0x74,  0x99,  0xfe,  0xf8,  0x14,  0xa8,  0x74,  0xfe,  0x14,  0x10,
-  0xfe,  0x00,  0x17,  0xfe,  0x4d,  0xe4,  0xf1,  0x99,  0xfe,  0xf8,  0x14,  0xa8,  0xf1,  0xa4,  0x51,  0x9e,
-  0x08,  0x06,  0xfe,  0xb4,  0x56,  0xfe,  0xc3,  0x58,  0x03,  0x51,  0x08,  0x0b,  0x03,  0x14,  0x06,  0x01,
-  0x0c,  0x25,  0xec,  0x14,  0x0b,  0x01,  0x0c,  0x25,  0xec,  0x14,  0x18,  0x01,  0x0c,  0x25,  0xec,  0x78,
-  0xfe,  0x89,  0x49,  0x01,  0x0c,  0x03,  0x14,  0x06,  0x01,  0x0c,  0x25,  0xbc,  0x14,  0x18,  0x01,  0x0c,
-  0x25,  0xbc,  0x14,  0x06,  0x01,  0x0c,  0x25,  0xbc,  0xfe,  0x89,  0x49,  0x01,  0x0c,  0x25,  0xbc,  0x78,
-  0xfe,  0x89,  0x4a,  0x01,  0x0c,  0x03,  0x51,  0x03,  0x29,  0xe8,  0x05,  0x06,  0x3b,  0xb6,  0x16,  0xe8,
-  0xfe,  0x49,  0xf4,  0x00,  0x4f,  0x78,  0xce,  0x63,  0xfe,  0x01,  0xec,  0xfe,  0x27,  0x01,  0xf9,  0x01,
-  0x0c,  0x40,  0x05,  0xfe,  0xe3,  0x00,  0xfe,  0x20,  0x13,  0x1f,  0xfe,  0xb6,  0x15,  0x2b,  0x16,  0xfc,
-  0x01,  0x55,  0x29,  0xfc,  0x05,  0x06,  0x50,  0x0a,  0x41,  0x06,  0x39,  0x03,  0x0d,  0x5d,  0x12,  0x91,
-  0xfe,  0x43,  0x58,  0x01,  0x15,  0x05,  0x10,  0xfe,  0x1e,  0x12,  0x4a,  0xf3,  0x96,  0x01,  0x49,  0xfe,
-  0x90,  0x4d,  0xe6,  0x10,  0xfe,  0xc5,  0x59,  0x01,  0x49,  0xfe,  0x8d,  0x56,  0xbf,  0x4a,  0x03,  0x4a,
-  0x21,  0x91,  0x01,  0x15,  0x4a,  0x96,  0x01,  0x49,  0xeb,  0x10,  0xe6,  0x10,  0x21,  0x5d,  0x62,  0x1e,
-  0x89,  0x0f,  0x5f,  0x01,  0xaa,  0x03,  0x0d,  0x5d,  0x12,  0x91,  0xfe,  0xc3,  0x58,  0x01,  0x15,  0x05,
-  0x10,  0xfe,  0x1a,  0x12,  0x4a,  0xf3,  0x96,  0x01,  0x49,  0xeb,  0x10,  0xfe,  0x80,  0x4d,  0xfe,  0xc5,
-  0x59,  0x01,  0x49,  0x4a,  0x03,  0x4a,  0x21,  0x5d,  0x01,  0x15,  0x4a,  0x96,  0x01,  0x49,  0xeb,  0x10,
-  0xe6,  0x10,  0x21,  0x5d,  0x62,  0x1e,  0x89,  0x0f,  0x5f,  0x01,  0xaa,  0x03,  0x0d,  0x5d,  0x12,  0x91,
-  0xfe,  0x43,  0x58,  0x01,  0x15,  0xfe,  0x42,  0x48,  0x96,  0x01,  0x49,  0xfe,  0xc0,  0x5a,  0xb7,  0xfe,
-  0x00,  0xcd,  0xfe,  0x01,  0xcc,  0xfe,  0x4a,  0x46,  0xe4,  0x9c,  0x80,  0x05,  0x10,  0xfe,  0x2e,  0x13,
-  0x5a,  0x5d,  0xfe,  0x4d,  0xf4,  0x1e,  0xfe,  0x1c,  0x13,  0x0f,  0x5f,  0x01,  0x8e,  0xb0,  0xfe,  0x40,
-  0x4c,  0xfe,  0xc5,  0x58,  0x01,  0x49,  0xfe,  0x00,  0x07,  0x80,  0x05,  0x10,  0x89,  0x5a,  0x91,  0xfe,
-  0x05,  0x57,  0xfe,  0x08,  0x10,  0xfe,  0x45,  0x58,  0x01,  0x49,  0xfe,  0x8d,  0x56,  0xbf,  0xfe,  0x80,
-  0x4c,  0xfe,  0x05,  0x17,  0x03,  0x09,  0x10,  0x77,  0x6f,  0xfe,  0x60,  0x01,  0xfe,  0x18,  0xdf,  0xfe,
-  0x19,  0xde,  0xfe,  0x24,  0x1c,  0xe3,  0x38,  0x9d,  0xfe,  0xfa,  0x16,  0x01,  0xfe,  0x08,  0x18,  0xd9,
-  0x8d,  0x38,  0x6f,  0xfe,  0x2c,  0x01,  0xfe,  0x2f,  0x19,  0x03,  0xc0,  0x28,  0xfe,  0xea,  0x16,  0xfe,
-  0xe2,  0x10,  0x09,  0x10,  0x77,  0x04,  0xfe,  0x64,  0x01,  0xfe,  0x00,  0xf4,  0x22,  0xfe,  0x18,  0x58,
-  0x04,  0xfe,  0x66,  0x01,  0xfe,  0x19,  0x58,  0x8d,  0x22,  0xfe,  0x3c,  0x90,  0xfe,  0x30,  0xf4,  0x06,
-  0xfe,  0x3c,  0x50,  0x6f,  0xfe,  0x38,  0x00,  0xfe,  0x0f,  0x79,  0xfe,  0x1c,  0xf7,  0x22,  0x9d,  0xfe,
-  0x44,  0x17,  0xfe,  0xbe,  0x14,  0x35,  0x03,  0xc0,  0x28,  0xfe,  0x1c,  0x17,  0xfe,  0xa4,  0x10,  0x09,
-  0x10,  0x77,  0xbf,  0xfe,  0x18,  0xdf,  0xfe,  0x19,  0xdf,  0xe3,  0x30,  0x9d,  0xfe,  0x66,  0x17,  0xfe,
-  0x9c,  0x14,  0xfe,  0x18,  0x13,  0x8d,  0x30,  0x6f,  0x1d,  0xfe,  0xaf,  0x19,  0xfe,  0x98,  0xe7,  0x00,
-  0xa7,  0x07,  0xfe,  0x7f,  0x00,  0xfe,  0x05,  0x40,  0x03,  0xc0,  0x28,  0xfe,  0x5a,  0x17,  0xfe,  0x6c,
-  0x10,  0x09,  0x10,  0x77,  0xfe,  0x30,  0xbc,  0xfe,  0xb2,  0xbc,  0x8d,  0xe1,  0x6f,  0x1d,  0xfe,  0x0f,
-  0x79,  0xfe,  0x1c,  0xf7,  0xe1,  0x9d,  0xfe,  0xa6,  0x17,  0xfe,  0x5c,  0x14,  0x35,  0x03,  0xc0,  0x28,
-  0xfe,  0x92,  0x17,  0xfe,  0x42,  0x10,  0xfe,  0x02,  0xf6,  0x10,  0x77,  0xfe,  0x18,  0xfe,  0x66,  0xfe,
-  0x19,  0xfe,  0x67,  0xd0,  0xe3,  0x46,  0x9d,  0xfe,  0xcc,  0x17,  0xfe,  0x36,  0x14,  0xfe,  0x1c,  0x13,
-  0x8d,  0x46,  0x47,  0xfe,  0x83,  0x58,  0xfe,  0xaf,  0x19,  0xfe,  0x80,  0xe7,  0x10,  0xfe,  0x81,  0xe7,
-  0x10,  0x11,  0xfe,  0xdd,  0x00,  0x6d,  0x31,  0x03,  0x6d,  0x31,  0xfe,  0x12,  0x45,  0x28,  0xfe,  0xbc,
-  0x17,  0x17,  0x06,  0x4c,  0xfe,  0x9b,  0x00,  0xe5,  0x02,  0x27,  0xfe,  0x39,  0xf0,  0xfe,  0x10,  0x18,
-  0x2b,  0x03,  0xfe,  0x7e,  0x18,  0x1a,  0x18,  0x87,  0x08,  0x0e,  0x03,  0x77,  0x04,  0xe7,  0x1a,  0x06,
-  0xfe,  0xef,  0x12,  0xfe,  0xe1,  0x10,  0x1c,  0x0f,  0x1e,  0x01,  0x15,  0x05,  0x10,  0x50,  0x4d,  0xfe,
-  0x78,  0x14,  0xfe,  0x34,  0x12,  0x59,  0x8c,  0x37,  0x38,  0xc7,  0xfe,  0xe9,  0x13,  0x1c,  0x0f,  0x3f,
-  0x01,  0x15,  0x05,  0x10,  0x50,  0x4d,  0xfe,  0x56,  0x14,  0xe9,  0x59,  0x8c,  0x37,  0x38,  0xc7,  0xfe,
-  0xe9,  0x13,  0x09,  0x0b,  0x03,  0xfe,  0x9c,  0xe7,  0x0b,  0x13,  0xfe,  0x15,  0x00,  0x7a,  0xa5,  0x31,
-  0x01,  0xea,  0x09,  0x06,  0x03,  0x0a,  0x41,  0x38,  0x39,  0x08,  0x3f,  0x09,  0xa2,  0x01,  0x45,  0x11,
-  0x48,  0x08,  0x1e,  0x09,  0x52,  0x01,  0x7e,  0x09,  0x06,  0x03,  0xfe,  0x38,  0x90,  0xfe,  0xba,  0x90,
-  0x36,  0xfe,  0xa8,  0x00,  0x21,  0x7b,  0xfe,  0x48,  0x55,  0x35,  0xfe,  0xc9,  0x55,  0x03,  0x29,  0xc6,
-  0x5b,  0x16,  0xc6,  0x03,  0x0f,  0xc8,  0x01,  0x15,  0xf2,  0x0f,  0x7d,  0x01,  0x15,  0xfe,  0x49,  0x44,
-  0x28,  0xfe,  0x06,  0x19,  0x0f,  0x1e,  0x01,  0x15,  0x05,  0x10,  0x50,  0x0f,  0x5f,  0x01,  0xaa,  0x0f,
-  0x7d,  0x01,  0x15,  0x5b,  0x80,  0x03,  0xfe,  0x40,  0x5e,  0xfe,  0xe2,  0x08,  0xfe,  0xc0,  0x4c,  0x29,
-  0x3e,  0x05,  0x10,  0xfe,  0x52,  0x12,  0x4d,  0x05,  0x00,  0xfe,  0x18,  0x12,  0xfe,  0xe1,  0x18,  0xfe,
-  0x19,  0xf4,  0xfe,  0x7f,  0x00,  0xaf,  0xfe,  0xe2,  0x08,  0x5b,  0x4d,  0x40,  0x05,  0x7b,  0xab,  0xfe,
-  0x82,  0x48,  0xfe,  0x01,  0x80,  0xfe,  0xd7,  0x10,  0xfe,  0xc4,  0x48,  0x08,  0x2d,  0x09,  0x3e,  0xfe,
-  0x40,  0x5f,  0x1c,  0x01,  0x45,  0x11,  0xfe,  0xdd,  0x00,  0xfe,  0x14,  0x46,  0x08,  0x2d,  0x09,  0x3e,
-  0x01,  0x45,  0x11,  0xfe,  0xdd,  0x00,  0xfe,  0x40,  0x4a,  0x72,  0xfe,  0x06,  0x17,  0xfe,  0x01,  0x07,
-  0xfe,  0x82,  0x48,  0xfe,  0x04,  0x17,  0x03,  0xf5,  0x18,  0x79,  0xfe,  0x8e,  0x19,  0x04,  0xfe,  0x90,
-  0x00,  0xfe,  0x3a,  0x45,  0xfe,  0x2c,  0x10,  0xf5,  0xd4,  0x79,  0xfe,  0xa0,  0x19,  0x04,  0xfe,  0x92,
-  0x00,  0xcf,  0x1d,  0xe0,  0xf5,  0xfe,  0x0b,  0x00,  0x79,  0xfe,  0xb2,  0x19,  0x04,  0xfe,  0x94,  0x00,
-  0xcf,  0x22,  0xfe,  0x08,  0x10,  0x04,  0xfe,  0x96,  0x00,  0xcf,  0x8b,  0xfe,  0x4e,  0x45,  0xd8,  0xfe,
-  0x0a,  0x45,  0xff,  0x04,  0x68,  0x54,  0xfe,  0xf1,  0x10,  0x1a,  0x74,  0xfe,  0x08,  0x1c,  0xfe,  0x67,
-  0x19,  0xfe,  0x0a,  0x1c,  0xfe,  0x1a,  0xf4,  0xfe,  0x00,  0x04,  0xd8,  0xfe,  0x48,  0xf4,  0x18,  0x99,
-  0xfe,  0xe6,  0x19,  0x08,  0x18,  0x03,  0x05,  0x84,  0xfe,  0x5a,  0xf0,  0xfe,  0xf6,  0x19,  0x20,  0xfe,
-  0x09,  0x00,  0xfe,  0x34,  0x10,  0x05,  0x1d,  0xfe,  0x5a,  0xf0,  0xfe,  0x04,  0x1a,  0x20,  0xd5,  0xfe,
-  0x26,  0x10,  0x05,  0x18,  0x87,  0x20,  0x8b,  0xe0,  0x05,  0x0b,  0x87,  0x20,  0xb1,  0xfe,  0x0e,  0x10,
-  0x05,  0x06,  0x87,  0x20,  0x5e,  0xce,  0xb6,  0x03,  0x17,  0xfe,  0x09,  0x00,  0x01,  0x3b,  0x2f,  0xfe,
-  0x34,  0x1a,  0x04,  0x76,  0xb7,  0x03,  0x1b,  0xfe,  0x54,  0x1a,  0xfe,  0x14,  0xf0,  0x0c,  0x2f,  0xfe,
-  0x48,  0x1a,  0x1b,  0xfe,  0x54,  0x1a,  0xfe,  0x82,  0xf0,  0xfe,  0x4c,  0x1a,  0x03,  0xff,  0x15,  0x00,
-  0x00,
+  0x00,  0x00,  0x00,  0xf2,  0x00,  0xf0,  0x00,  0xfc,  0x00,  0x16,  0x18,  0xe4,  0x01,  0x00,  0x48,  0xe4,
+  0x18,  0x80,  0x03,  0xf6,  0x02,  0x00,  0xce,  0x19,  0x00,  0xfa,  0xff,  0xff,  0x1c,  0x0f,  0x00,  0xf6,
+  0x9e,  0xe7,  0xff,  0x00,  0x82,  0xe7,  0x00,  0xea,  0x01,  0xfa,  0x01,  0xe6,  0x09,  0xe7,  0x55,  0xf0,
+  0x01,  0xf6,  0x03,  0x00,  0x04,  0x00,  0x10,  0x00,  0x1e,  0xf0,  0x85,  0xf0,  0x18,  0xf4,  0x08,  0x00,
+  0xbc,  0x00,  0x38,  0x54,  0x00,  0xec,  0xd5,  0xf0,  0x82,  0x0d,  0x00,  0xe6,  0x86,  0xf0,  0xb1,  0xf0,
+  0x98,  0x57,  0x01,  0xfc,  0xb4,  0x00,  0xd4,  0x01,  0x0c,  0x1c,  0x3e,  0x1c,  0x3c,  0x00,  0xbb,  0x00,
+  0x00,  0x10,  0xba,  0x19,  0x02,  0x80,  0x32,  0xf0,  0x7c,  0x0d,  0x02,  0x13,  0xba,  0x13,  0x18,  0x40,
+  0x00,  0x57,  0x01,  0xea,  0x02,  0xfc,  0x03,  0xfc,  0x3e,  0x00,  0x6c,  0x01,  0x6e,  0x01,  0x74,  0x01,
+  0x76,  0x01,  0xb9,  0x54,  0x3e,  0x57,  0x00,  0x80,  0x03,  0xe6,  0xb6,  0x00,  0xc0,  0x00,  0x01,  0x01,
+  0x3e,  0x01,  0x7a,  0x01,  0xca,  0x08,  0xce,  0x10,  0x16,  0x11,  0x04,  0x12,  0x08,  0x12,  0x02,  0x4a,
+  0xbb,  0x55,  0x3c,  0x56,  0x03,  0x58,  0x1b,  0x80,  0x30,  0xe4,  0x4b,  0xe4,  0x5d,  0xf0,  0x02,  0xfa,
+  0x20,  0x00,  0x32,  0x00,  0x40,  0x00,  0x80,  0x00,  0x24,  0x01,  0x3c,  0x01,  0x68,  0x01,  0x6a,  0x01,
+  0x70,  0x01,  0x72,  0x01,  0x78,  0x01,  0x7c,  0x01,  0x62,  0x0a,  0x86,  0x0d,  0x06,  0x13,  0x4c,  0x1c,
+  0x04,  0x80,  0x4a,  0xe4,  0x02,  0xee,  0x5b,  0xf0,  0x03,  0xf7,  0x0c,  0x00,  0x0f,  0x00,  0x47,  0x00,
+  0xbe,  0x00,  0x00,  0x01,  0x20,  0x11,  0x5c,  0x16,  0x32,  0x1c,  0x38,  0x1c,  0x4e,  0x1c,  0x10,  0x44,
+  0x00,  0x4c,  0x04,  0xea,  0x5c,  0xf0,  0xa7,  0xf0,  0x04,  0xf6,  0x03,  0xfa,  0x05,  0x00,  0x34,  0x00,
+  0x36,  0x00,  0x98,  0x00,  0xcc,  0x00,  0x20,  0x01,  0x4e,  0x01,  0x4a,  0x0b,  0x42,  0x0c,  0x12,  0x0f,
+  0x0c,  0x10,  0x22,  0x11,  0x0a,  0x12,  0x04,  0x13,  0x30,  0x1c,  0x02,  0x48,  0x00,  0x4e,  0x42,  0x54,
+  0x44,  0x55,  0xbd,  0x56,  0x06,  0x83,  0x00,  0xdc,  0x05,  0xf0,  0x09,  0xf0,  0x59,  0xf0,  0xb8,  0xf0,
+  0x4b,  0xf4,  0x06,  0xf7,  0x0e,  0xf7,  0x04,  0xfc,  0x05,  0xfc,  0x06,  0x00,  0x19,  0x00,  0x33,  0x00,
+  0x9b,  0x00,  0xa4,  0x00,  0xb5,  0x00,  0xba,  0x00,  0xd0,  0x00,  0xe1,  0x00,  0xe7,  0x00,  0xe2,  0x03,
+  0x08,  0x0f,  0x02,  0x10,  0x04,  0x10,  0x0a,  0x10,  0x0a,  0x13,  0x0c,  0x13,  0x12,  0x13,  0x24,  0x14,
+  0x34,  0x14,  0x04,  0x16,  0x08,  0x16,  0xa4,  0x17,  0x20,  0x1c,  0x34,  0x1c,  0x36,  0x1c,  0x08,  0x44,
+  0x38,  0x44,  0x91,  0x44,  0x0a,  0x45,  0x48,  0x46,  0x01,  0x48,  0x68,  0x54,  0x3a,  0x55,  0x83,  0x55,
+  0xe5,  0x55,  0xb0,  0x57,  0x01,  0x58,  0x83,  0x59,  0x05,  0xe6,  0x0b,  0xf0,  0x0c,  0xf0,  0x04,  0xf8,
+  0x05,  0xf8,  0x07,  0x00,  0x0a,  0x00,  0x1c,  0x00,  0x1e,  0x00,  0x9e,  0x00,  0xa8,  0x00,  0xaa,  0x00,
+  0xb9,  0x00,  0xe0,  0x00,  0x22,  0x01,  0x26,  0x01,  0x79,  0x01,  0x7e,  0x01,  0xc4,  0x01,  0xc6,  0x01,
+  0x80,  0x02,  0x5e,  0x03,  0xee,  0x04,  0x9a,  0x06,  0xf8,  0x07,  0x62,  0x08,  0x68,  0x08,  0x69,  0x08,
+  0xd6,  0x08,  0xe9,  0x09,  0xfa,  0x0b,  0x2e,  0x0f,  0x12,  0x10,  0x1a,  0x10,  0xed,  0x10,  0xf1,  0x10,
+  0x2a,  0x11,  0x06,  0x12,  0x0c,  0x12,  0x3e,  0x12,  0x10,  0x13,  0x16,  0x13,  0x1e,  0x13,  0x46,  0x14,
+  0x76,  0x14,  0x82,  0x14,  0x36,  0x15,  0xca,  0x15,  0x6b,  0x18,  0xbe,  0x18,  0xca,  0x18,  0xe6,  0x19,
+  0x12,  0x1c,  0x46,  0x1c,  0x9c,  0x32,  0x00,  0x40,  0x0e,  0x47,  0xfe,  0x9c,  0xf0,  0x2b,  0x02,  0xfe,
+  0xac,  0x0d,  0xff,  0x10,  0x00,  0x00,  0xd7,  0xfe,  0xe8,  0x19,  0x00,  0xd6,  0xfe,  0x84,  0x01,  0xff,
+  0x03,  0x00,  0x00,  0xfe,  0x93,  0x15,  0xfe,  0x0f,  0x05,  0xff,  0x38,  0x00,  0x00,  0xfe,  0x57,  0x24,
+  0x00,  0xfe,  0x4c,  0x00,  0x5b,  0xff,  0x04,  0x00,  0x00,  0x11,  0xff,  0x09,  0x00,  0x00,  0xff,  0x08,
+  0x01,  0x01,  0xff,  0x08,  0xff,  0xff,  0xff,  0x27,  0x00,  0x00,  0xff,  0x10,  0xff,  0xff,  0xff,  0x11,
+  0x00,  0x00,  0xfe,  0x78,  0x56,  0xfe,  0x34,  0x12,  0xff,  0x21,  0x00,  0x00,  0xfe,  0x04,  0xf7,  0xd6,
+  0x2c,  0x99,  0x0a,  0x01,  0xfe,  0xc2,  0x0f,  0xfe,  0x04,  0xf7,  0xd6,  0x99,  0x0a,  0x42,  0x2c,  0xfe,
+  0x3d,  0xf0,  0xfe,  0x06,  0x02,  0xfe,  0x20,  0xf0,  0xa7,  0xfe,  0x91,  0xf0,  0xfe,  0xf4,  0x01,  0xfe,
+  0x90,  0xf0,  0xfe,  0xf4,  0x01,  0xfe,  0x8f,  0xf0,  0xa7,  0x03,  0x5d,  0x4d,  0x02,  0xfe,  0xc8,  0x0d,
+  0x01,  0xfe,  0x38,  0x0e,  0xfe,  0xdd,  0x12,  0xfe,  0xfc,  0x10,  0xfe,  0x28,  0x1c,  0x03,  0xfe,  0xa6,
+  0x00,  0xfe,  0xd3,  0x12,  0x41,  0x14,  0xfe,  0xa6,  0x00,  0xc2,  0xfe,  0x48,  0xf0,  0xfe,  0x8a,  0x02,
+  0xfe,  0x49,  0xf0,  0xfe,  0xa4,  0x02,  0xfe,  0x4a,  0xf0,  0xfe,  0xc2,  0x02,  0xfe,  0x46,  0xf0,  0xfe,
+  0x54,  0x02,  0xfe,  0x47,  0xf0,  0xfe,  0x5a,  0x02,  0xfe,  0x43,  0xf0,  0xfe,  0x48,  0x02,  0xfe,  0x44,
+  0xf0,  0xfe,  0x4c,  0x02,  0xfe,  0x45,  0xf0,  0xfe,  0x50,  0x02,  0x18,  0x0a,  0xaa,  0x18,  0x06,  0x14,
+  0xa1,  0x02,  0x2b,  0xfe,  0x00,  0x1c,  0xe7,  0xfe,  0x02,  0x1c,  0xe6,  0xfe,  0x1e,  0x1c,  0xfe,  0xe9,
+  0x10,  0x01,  0xfe,  0x18,  0x18,  0xfe,  0xe7,  0x10,  0xfe,  0x06,  0xfc,  0xce,  0x09,  0x70,  0x01,  0xa8,
+  0x02,  0x2b,  0x15,  0x59,  0x39,  0xa2,  0x01,  0xfe,  0x58,  0x10,  0x09,  0x70,  0x01,  0x87,  0xfe,  0xbd,
+  0x10,  0x09,  0x70,  0x01,  0x87,  0xfe,  0xad,  0x10,  0xfe,  0x16,  0x1c,  0xfe,  0x58,  0x1c,  0x18,  0x06,
+  0x14,  0xa1,  0x2c,  0x1c,  0x2b,  0xfe,  0x3d,  0xf0,  0xfe,  0x06,  0x02,  0x23,  0xfe,  0x98,  0x02,  0xfe,
+  0x5a,  0x1c,  0xf8,  0xfe,  0x14,  0x1c,  0x15,  0xfe,  0x30,  0x00,  0x39,  0xa2,  0x01,  0xfe,  0x48,  0x10,
+  0x18,  0x06,  0x14,  0xa1,  0x02,  0xd7,  0x22,  0x20,  0x07,  0x11,  0x35,  0xfe,  0x69,  0x10,  0x18,  0x06,
+  0x14,  0xa1,  0xfe,  0x04,  0xec,  0x20,  0x4f,  0x43,  0x13,  0x20,  0xfe,  0x05,  0xf6,  0xce,  0x01,  0xfe,
+  0x4a,  0x17,  0x08,  0x54,  0x58,  0x37,  0x12,  0x2f,  0x42,  0x92,  0x01,  0xfe,  0x82,  0x16,  0x02,  0x2b,
+  0x09,  0x46,  0x01,  0x0e,  0x07,  0x00,  0x66,  0x01,  0x73,  0xfe,  0x18,  0x10,  0xfe,  0x41,  0x58,  0x09,
+  0xa4,  0x01,  0x0e,  0xfe,  0xc8,  0x54,  0x6b,  0xfe,  0x10,  0x03,  0x01,  0xfe,  0x82,  0x16,  0x02,  0x2b,
+  0x2c,  0x4f,  0xfe,  0x02,  0xe8,  0x2a,  0xfe,  0xbf,  0x57,  0xfe,  0x9e,  0x43,  0xfe,  0x77,  0x57,  0xfe,
+  0x27,  0xf0,  0xfe,  0xe0,  0x01,  0xfe,  0x07,  0x4b,  0xfe,  0x20,  0xf0,  0xa7,  0xfe,  0x40,  0x1c,  0x1c,
+  0xd9,  0xfe,  0x26,  0xf0,  0xfe,  0x5a,  0x03,  0xfe,  0xa0,  0xf0,  0xfe,  0x48,  0x03,  0xfe,  0x11,  0xf0,
+  0xa7,  0xfe,  0xef,  0x10,  0xfe,  0x9f,  0xf0,  0xfe,  0x68,  0x03,  0xf9,  0x10,  0xfe,  0x11,  0x00,  0x02,
+  0x65,  0x2c,  0xfe,  0x48,  0x1c,  0xf9,  0x08,  0x05,  0x1b,  0xfe,  0x18,  0x13,  0x21,  0x22,  0xa3,  0xb7,
+  0x13,  0xa3,  0x09,  0x46,  0x01,  0x0e,  0xb7,  0x78,  0x01,  0xfe,  0xb4,  0x16,  0x12,  0xd1,  0x1c,  0xd9,
+  0xfe,  0x01,  0xf0,  0xd9,  0xfe,  0x82,  0xf0,  0xfe,  0x96,  0x03,  0xfa,  0x12,  0xfe,  0xe4,  0x00,  0x27,
+  0xfe,  0xa8,  0x03,  0x1c,  0x34,  0x1d,  0xfe,  0xb8,  0x03,  0x01,  0x4b,  0xfe,  0x06,  0xf0,  0xfe,  0xc8,
+  0x03,  0x95,  0x86,  0xfe,  0x0a,  0xf0,  0xfe,  0x8a,  0x06,  0x02,  0x24,  0x03,  0x70,  0x28,  0x17,  0xfe,
+  0xfa,  0x04,  0x15,  0x6d,  0x01,  0x36,  0x7b,  0xfe,  0x6a,  0x02,  0x02,  0xd8,  0xf9,  0x2c,  0x99,  0x19,
+  0xfe,  0x67,  0x1b,  0xfe,  0xbf,  0x57,  0xfe,  0x77,  0x57,  0xfe,  0x48,  0x1c,  0x74,  0x01,  0xaf,  0x8c,
+  0x09,  0x46,  0x01,  0x0e,  0x07,  0x00,  0x17,  0xda,  0x09,  0xd1,  0x01,  0x0e,  0x8d,  0x51,  0x64,  0x79,
+  0x2a,  0x03,  0x70,  0x28,  0xfe,  0x10,  0x12,  0x15,  0x6d,  0x01,  0x36,  0x7b,  0xfe,  0x6a,  0x02,  0x02,
+  0xd8,  0xc7,  0x81,  0xc8,  0x83,  0x1c,  0x24,  0x27,  0xfe,  0x40,  0x04,  0x1d,  0xfe,  0x3c,  0x04,  0x3b,
+  0xfe,  0xa0,  0x00,  0xfe,  0x9b,  0x57,  0xfe,  0x4e,  0x12,  0x2d,  0xff,  0x02,  0x00,  0x10,  0x01,  0x0b,
+  0x1d,  0xfe,  0xe4,  0x04,  0x2d,  0x01,  0x0b,  0x1d,  0x24,  0x33,  0x31,  0xde,  0xfe,  0x4c,  0x44,  0xfe,
+  0x4c,  0x12,  0x51,  0xfe,  0x44,  0x48,  0x0f,  0x6f,  0xfe,  0x4c,  0x54,  0x6b,  0xda,  0x4f,  0x79,  0x2a,
+  0xfe,  0x06,  0x80,  0xfe,  0x48,  0x47,  0xfe,  0x62,  0x13,  0x08,  0x05,  0x1b,  0xfe,  0x2a,  0x13,  0x32,
+  0x07,  0x82,  0xfe,  0x52,  0x13,  0xfe,  0x20,  0x10,  0x0f,  0x6f,  0xfe,  0x4c,  0x54,  0x6b,  0xda,  0xfe,
+  0x06,  0x80,  0xfe,  0x48,  0x47,  0xfe,  0x40,  0x13,  0x08,  0x05,  0x1b,  0xfe,  0x08,  0x13,  0x32,  0x07,
+  0x82,  0xfe,  0x30,  0x13,  0x08,  0x05,  0x1b,  0xfe,  0x1c,  0x12,  0x15,  0x9d,  0x08,  0x05,  0x06,  0x4d,
+  0x15,  0xfe,  0x0d,  0x00,  0x01,  0x36,  0x7b,  0xfe,  0x64,  0x0d,  0x02,  0x24,  0x2d,  0x12,  0xfe,  0xe6,
+  0x00,  0xfe,  0x1c,  0x90,  0xfe,  0x40,  0x5c,  0x04,  0x15,  0x9d,  0x01,  0x36,  0x02,  0x2b,  0xfe,  0x42,
+  0x5b,  0x99,  0x19,  0xfe,  0x46,  0x59,  0xfe,  0xbf,  0x57,  0xfe,  0x77,  0x57,  0xfe,  0x87,  0x80,  0xfe,
+  0x31,  0xe4,  0x5b,  0x08,  0x05,  0x0a,  0xfe,  0x84,  0x13,  0xfe,  0x20,  0x80,  0x07,  0x19,  0xfe,  0x7c,
+  0x12,  0x53,  0x05,  0x06,  0xfe,  0x6c,  0x13,  0x03,  0xfe,  0xa2,  0x00,  0x28,  0x17,  0xfe,  0x90,  0x05,
+  0xfe,  0x31,  0xe4,  0x5a,  0x53,  0x05,  0x0a,  0xfe,  0x56,  0x13,  0x03,  0xfe,  0xa0,  0x00,  0x28,  0xfe,
+  0x4e,  0x12,  0x67,  0xff,  0x02,  0x00,  0x10,  0x27,  0xfe,  0x48,  0x05,  0x1c,  0x34,  0xfe,  0x89,  0x48,
+  0xff,  0x02,  0x00,  0x10,  0x27,  0xfe,  0x56,  0x05,  0x26,  0xfe,  0xa8,  0x05,  0x12,  0xfe,  0xe3,  0x00,
+  0x21,  0x53,  0xfe,  0x4a,  0xf0,  0xfe,  0x76,  0x05,  0xfe,  0x49,  0xf0,  0xfe,  0x70,  0x05,  0x88,  0x25,
+  0xfe,  0x21,  0x00,  0xab,  0x25,  0xfe,  0x22,  0x00,  0xaa,  0x25,  0x58,  0xfe,  0x09,  0x48,  0xff,  0x02,
+  0x00,  0x10,  0x27,  0xfe,  0x86,  0x05,  0x26,  0xfe,  0xa8,  0x05,  0xfe,  0xe2,  0x08,  0x53,  0x05,  0xcb,
+  0x4d,  0x01,  0xb0,  0x25,  0x06,  0x13,  0xd3,  0x39,  0xfe,  0x27,  0x01,  0x08,  0x05,  0x1b,  0xfe,  0x22,
+  0x12,  0x41,  0x01,  0xb2,  0x15,  0x9d,  0x08,  0x05,  0x06,  0x4d,  0x15,  0xfe,  0x0d,  0x00,  0x01,  0x36,
+  0x7b,  0xfe,  0x64,  0x0d,  0x02,  0x24,  0x03,  0xfe,  0x9c,  0x00,  0x28,  0xeb,  0x03,  0x5c,  0x28,  0xfe,
+  0x36,  0x13,  0x41,  0x01,  0xb2,  0x26,  0xfe,  0x18,  0x06,  0x09,  0x06,  0x53,  0x05,  0x1f,  0xfe,  0x02,
+  0x12,  0x50,  0x01,  0xfe,  0x9e,  0x15,  0x1d,  0xfe,  0x0e,  0x06,  0x12,  0xa5,  0x01,  0x4b,  0x12,  0xfe,
+  0xe5,  0x00,  0x03,  0x5c,  0xc1,  0x0c,  0x5c,  0x03,  0xcd,  0x28,  0xfe,  0x62,  0x12,  0x03,  0x45,  0x28,
+  0xfe,  0x5a,  0x13,  0x01,  0xfe,  0x0c,  0x19,  0x01,  0xfe,  0x76,  0x19,  0xfe,  0x43,  0x48,  0xc4,  0xcc,
+  0x0f,  0x71,  0xff,  0x02,  0x00,  0x57,  0x52,  0x93,  0x1e,  0x43,  0x8b,  0xc4,  0x6e,  0x41,  0x01,  0xb2,
+  0x26,  0xfe,  0x82,  0x06,  0x53,  0x05,  0x1a,  0xe9,  0x91,  0x09,  0x59,  0x01,  0xfe,  0xcc,  0x15,  0x1d,
+  0xfe,  0x78,  0x06,  0x12,  0xa5,  0x01,  0x4b,  0x12,  0xfe,  0xe5,  0x00,  0x03,  0x45,  0xc1,  0x0c,  0x45,
+  0x18,  0x06,  0x01,  0xb2,  0xfa,  0x76,  0x74,  0x01,  0xaf,  0x8c,  0x12,  0xfe,  0xe2,  0x00,  0x27,  0xdb,
+  0x1c,  0x34,  0xfe,  0x0a,  0xf0,  0xfe,  0xb6,  0x06,  0x94,  0xfe,  0x6c,  0x07,  0xfe,  0x06,  0xf0,  0xfe,
+  0x74,  0x07,  0x95,  0x86,  0x02,  0x24,  0x08,  0x05,  0x0a,  0xfe,  0x2e,  0x12,  0x16,  0x19,  0x01,  0x0b,
+  0x16,  0x00,  0x01,  0x0b,  0x16,  0x00,  0x01,  0x0b,  0x16,  0x00,  0x01,  0x0b,  0xfe,  0x99,  0xa4,  0x01,
+  0x0b,  0x16,  0x00,  0x02,  0xfe,  0x42,  0x08,  0x68,  0x05,  0x1a,  0xfe,  0x38,  0x12,  0x08,  0x05,  0x1a,
+  0xfe,  0x30,  0x13,  0x16,  0xfe,  0x1b,  0x00,  0x01,  0x0b,  0x16,  0x00,  0x01,  0x0b,  0x16,  0x00,  0x01,
+  0x0b,  0x16,  0x00,  0x01,  0x0b,  0x16,  0x06,  0x01,  0x0b,  0x16,  0x00,  0x02,  0xe2,  0x6c,  0x58,  0xbe,
+  0x50,  0xfe,  0x9a,  0x81,  0x55,  0x1b,  0x7a,  0xfe,  0x42,  0x07,  0x09,  0x1b,  0xfe,  0x09,  0x6f,  0xba,
+  0xfe,  0xca,  0x45,  0xfe,  0x32,  0x12,  0x69,  0x6d,  0x8b,  0x6c,  0x7f,  0x27,  0xfe,  0x54,  0x07,  0x1c,
+  0x34,  0xfe,  0x0a,  0xf0,  0xfe,  0x42,  0x07,  0x95,  0x86,  0x94,  0xfe,  0x6c,  0x07,  0x02,  0x24,  0x01,
+  0x4b,  0x02,  0xdb,  0x16,  0x1f,  0x02,  0xdb,  0xfe,  0x9c,  0xf7,  0xdc,  0xfe,  0x2c,  0x90,  0xfe,  0xae,
+  0x90,  0x56,  0xfe,  0xda,  0x07,  0x0c,  0x60,  0x14,  0x61,  0x08,  0x54,  0x5a,  0x37,  0x22,  0x20,  0x07,
+  0x11,  0xfe,  0x0e,  0x12,  0x8d,  0xfe,  0x80,  0x80,  0x39,  0x20,  0x6a,  0x2a,  0xfe,  0x06,  0x10,  0xfe,
+  0x83,  0xe7,  0xfe,  0x48,  0x00,  0xab,  0xfe,  0x03,  0x40,  0x08,  0x54,  0x5b,  0x37,  0x01,  0xb3,  0xb8,
+  0xfe,  0x1f,  0x40,  0x13,  0x62,  0x01,  0xef,  0xfe,  0x08,  0x50,  0xfe,  0x8a,  0x50,  0xfe,  0x44,  0x51,
+  0xfe,  0xc6,  0x51,  0x88,  0xfe,  0x08,  0x90,  0xfe,  0x8a,  0x90,  0x0c,  0x5e,  0x14,  0x5f,  0xfe,  0x0c,
+  0x90,  0xfe,  0x8e,  0x90,  0xfe,  0x40,  0x50,  0xfe,  0xc2,  0x50,  0x0c,  0x3d,  0x14,  0x3e,  0xfe,  0x4a,
+  0x10,  0x08,  0x05,  0x5a,  0xfe,  0x2a,  0x12,  0xfe,  0x2c,  0x90,  0xfe,  0xae,  0x90,  0x0c,  0x60,  0x14,
+  0x61,  0x08,  0x05,  0x5b,  0x8b,  0x01,  0xb3,  0xfe,  0x1f,  0x80,  0x13,  0x62,  0xfe,  0x44,  0x90,  0xfe,
+  0xc6,  0x90,  0x0c,  0x3f,  0x14,  0x40,  0xfe,  0x08,  0x90,  0xfe,  0x8a,  0x90,  0x0c,  0x5e,  0x14,  0x5f,
+  0xfe,  0x40,  0x90,  0xfe,  0xc2,  0x90,  0x0c,  0x3d,  0x14,  0x3e,  0x0c,  0x2e,  0x14,  0x3c,  0x21,  0x0c,
+  0x49,  0x0c,  0x63,  0x08,  0x54,  0x1f,  0x37,  0x2c,  0x0f,  0xfe,  0x4e,  0x11,  0x27,  0xdd,  0xfe,  0x9e,
+  0xf0,  0xfe,  0x76,  0x08,  0xbc,  0x17,  0x34,  0x2c,  0x77,  0xe6,  0xc5,  0xfe,  0x9a,  0x08,  0xc6,  0xfe,
+  0xb8,  0x08,  0x94,  0xfe,  0x8e,  0x08,  0xfe,  0x06,  0xf0,  0xfe,  0x94,  0x08,  0x95,  0x86,  0x02,  0x24,
+  0x01,  0x4b,  0xfe,  0xc9,  0x10,  0x16,  0x1f,  0xfe,  0xc9,  0x10,  0x68,  0x05,  0x06,  0xfe,  0x10,  0x12,
+  0x68,  0x05,  0x0a,  0x4e,  0x08,  0x05,  0x0a,  0xfe,  0x90,  0x12,  0xfe,  0x2e,  0x1c,  0x02,  0xfe,  0x18,
+  0x0b,  0x68,  0x05,  0x06,  0x4e,  0x68,  0x05,  0x0a,  0xfe,  0x7a,  0x12,  0xfe,  0x2c,  0x1c,  0xfe,  0xaa,
+  0xf0,  0xfe,  0xd2,  0x09,  0xfe,  0xac,  0xf0,  0xfe,  0x00,  0x09,  0x02,  0xfe,  0xde,  0x09,  0xfe,  0xb7,
+  0xf0,  0xfe,  0xfc,  0x08,  0xfe,  0x02,  0xf6,  0x1a,  0x50,  0xfe,  0x70,  0x18,  0xfe,  0xf1,  0x18,  0xfe,
+  0x40,  0x55,  0xfe,  0xe1,  0x55,  0xfe,  0x10,  0x58,  0xfe,  0x91,  0x58,  0xfe,  0x14,  0x59,  0xfe,  0x95,
+  0x59,  0x1c,  0x85,  0xfe,  0x8c,  0xf0,  0xfe,  0xfc,  0x08,  0xfe,  0xac,  0xf0,  0xfe,  0xf0,  0x08,  0xb5,
+  0xfe,  0xcb,  0x10,  0xfe,  0xad,  0xf0,  0xfe,  0x0c,  0x09,  0x02,  0xfe,  0x18,  0x0b,  0xb6,  0xfe,  0xbf,
+  0x10,  0xfe,  0x2b,  0xf0,  0x85,  0xf4,  0x1e,  0xfe,  0x00,  0xfe,  0xfe,  0x1c,  0x12,  0xc2,  0xfe,  0xd2,
+  0xf0,  0x85,  0xfe,  0x76,  0x18,  0x1e,  0x19,  0x17,  0x85,  0x03,  0xd2,  0x1e,  0x06,  0x17,  0x85,  0xc5,
+  0x4a,  0xc6,  0x4a,  0xb5,  0xb6,  0xfe,  0x89,  0x10,  0x74,  0x67,  0x2d,  0x15,  0x9d,  0x01,  0x36,  0x10,
+  0xfe,  0x35,  0x00,  0xfe,  0x01,  0xf0,  0x65,  0x10,  0x80,  0x02,  0x65,  0xfe,  0x98,  0x80,  0xfe,  0x19,
+  0xe4,  0x0a,  0xfe,  0x1a,  0x12,  0x51,  0xfe,  0x19,  0x82,  0xfe,  0x6c,  0x18,  0xfe,  0x44,  0x54,  0xbe,
+  0xfe,  0x19,  0x81,  0xfe,  0x74,  0x18,  0x8f,  0x90,  0x17,  0xfe,  0xce,  0x08,  0x02,  0x4a,  0x08,  0x05,
+  0x5a,  0xec,  0x03,  0x2e,  0x29,  0x3c,  0x0c,  0x3f,  0x14,  0x40,  0x9b,  0x2e,  0x9c,  0x3c,  0xfe,  0x6c,
+  0x18,  0xfe,  0xed,  0x18,  0xfe,  0x44,  0x54,  0xfe,  0xe5,  0x54,  0x3a,  0x3f,  0x3b,  0x40,  0x03,  0x49,
+  0x29,  0x63,  0x8f,  0xfe,  0xe3,  0x54,  0xfe,  0x74,  0x18,  0xfe,  0xf5,  0x18,  0x8f,  0xfe,  0xe3,  0x54,
+  0x90,  0xc0,  0x56,  0xfe,  0xce,  0x08,  0x02,  0x4a,  0xfe,  0x37,  0xf0,  0xfe,  0xda,  0x09,  0xfe,  0x8b,
+  0xf0,  0xfe,  0x60,  0x09,  0x02,  0x4a,  0x08,  0x05,  0x0a,  0x23,  0xfe,  0xfa,  0x0a,  0x3a,  0x49,  0x3b,
+  0x63,  0x56,  0xfe,  0x3e,  0x0a,  0x0f,  0xfe,  0xc0,  0x07,  0x41,  0x98,  0x00,  0xad,  0xfe,  0x01,  0x59,
+  0xfe,  0x52,  0xf0,  0xfe,  0x0c,  0x0a,  0x8f,  0x7a,  0xfe,  0x24,  0x0a,  0x3a,  0x49,  0x8f,  0xfe,  0xe3,
+  0x54,  0x57,  0x49,  0x7d,  0x63,  0xfe,  0x14,  0x58,  0xfe,  0x95,  0x58,  0x02,  0x4a,  0x3a,  0x49,  0x3b,
+  0x63,  0xfe,  0x14,  0x59,  0xfe,  0x95,  0x59,  0xbe,  0x57,  0x49,  0x57,  0x63,  0x02,  0x4a,  0x08,  0x05,
+  0x5a,  0xfe,  0x82,  0x12,  0x08,  0x05,  0x1f,  0xfe,  0x66,  0x13,  0x22,  0x62,  0xb7,  0xfe,  0x03,  0xa1,
+  0xfe,  0x83,  0x80,  0xfe,  0xc8,  0x44,  0xfe,  0x2e,  0x13,  0xfe,  0x04,  0x91,  0xfe,  0x86,  0x91,  0x6a,
+  0x2a,  0xfe,  0x40,  0x59,  0xfe,  0xc1,  0x59,  0x56,  0xe0,  0x03,  0x60,  0x29,  0x61,  0x0c,  0x7f,  0x14,
+  0x80,  0x57,  0x60,  0x7d,  0x61,  0x01,  0xb3,  0xb8,  0x6a,  0x2a,  0x13,  0x62,  0x9b,  0x2e,  0x9c,  0x3c,
+  0x3a,  0x3f,  0x3b,  0x40,  0x90,  0xc0,  0xfe,  0x04,  0xfa,  0x2e,  0xfe,  0x05,  0xfa,  0x3c,  0x01,  0xef,
+  0xfe,  0x36,  0x10,  0x21,  0x0c,  0x7f,  0x0c,  0x80,  0x3a,  0x3f,  0x3b,  0x40,  0xe4,  0x08,  0x05,  0x1f,
+  0x17,  0xe0,  0x3a,  0x3d,  0x3b,  0x3e,  0x08,  0x05,  0xfe,  0xf7,  0x00,  0x37,  0x03,  0x5e,  0x29,  0x5f,
+  0xfe,  0x10,  0x58,  0xfe,  0x91,  0x58,  0x57,  0x49,  0x7d,  0x63,  0x02,  0xfe,  0xf4,  0x09,  0x08,  0x05,
+  0x1f,  0x17,  0xe0,  0x08,  0x05,  0xfe,  0xf7,  0x00,  0x37,  0xbe,  0xfe,  0x19,  0x81,  0x50,  0xfe,  0x10,
+  0x90,  0xfe,  0x92,  0x90,  0xfe,  0xd3,  0x10,  0x32,  0x07,  0xa6,  0x17,  0xfe,  0x08,  0x09,  0x12,  0xa6,
+  0x08,  0x05,  0x0a,  0xfe,  0x14,  0x13,  0x03,  0x3d,  0x29,  0x3e,  0x56,  0xfe,  0x08,  0x09,  0xfe,  0x0c,
+  0x58,  0xfe,  0x8d,  0x58,  0x02,  0x4a,  0x21,  0x41,  0xfe,  0x19,  0x80,  0xe7,  0x08,  0x05,  0x0a,  0xfe,
+  0x1a,  0x12,  0xfe,  0x6c,  0x19,  0xfe,  0x19,  0x41,  0xf4,  0xc2,  0xfe,  0xd1,  0xf0,  0xe2,  0x15,  0x7e,
+  0x01,  0x36,  0x10,  0xfe,  0x44,  0x00,  0xfe,  0x8e,  0x10,  0xfe,  0x6c,  0x19,  0x57,  0x3d,  0xfe,  0xed,
+  0x19,  0x7d,  0x3e,  0xfe,  0x0c,  0x51,  0xfe,  0x8e,  0x51,  0xf4,  0x1e,  0xfe,  0x00,  0xff,  0x35,  0xfe,
+  0x74,  0x10,  0xc2,  0xfe,  0xd2,  0xf0,  0xfe,  0xa6,  0x0b,  0xfe,  0x76,  0x18,  0x1e,  0x19,  0x8a,  0x03,
+  0xd2,  0x1e,  0x06,  0xfe,  0x08,  0x13,  0x10,  0xfe,  0x16,  0x00,  0x02,  0x65,  0xfe,  0xd1,  0xf0,  0xfe,
+  0xb8,  0x0b,  0x15,  0x7e,  0x01,  0x36,  0x10,  0xfe,  0x17,  0x00,  0xfe,  0x42,  0x10,  0xfe,  0xce,  0xf0,
+  0xfe,  0xbe,  0x0b,  0xfe,  0x3c,  0x10,  0xfe,  0xcd,  0xf0,  0xfe,  0xca,  0x0b,  0x10,  0xfe,  0x22,  0x00,
+  0x02,  0x65,  0xfe,  0xcb,  0xf0,  0xfe,  0xd6,  0x0b,  0x10,  0xfe,  0x24,  0x00,  0x02,  0x65,  0xfe,  0xd0,
+  0xf0,  0xfe,  0xe0,  0x0b,  0x10,  0x9e,  0xe5,  0xfe,  0xcf,  0xf0,  0xfe,  0xea,  0x0b,  0x10,  0x58,  0xfe,
+  0x10,  0x10,  0xfe,  0xcc,  0xf0,  0xe2,  0x68,  0x05,  0x1f,  0x4d,  0x10,  0xfe,  0x12,  0x00,  0x2c,  0x0f,
+  0xfe,  0x4e,  0x11,  0x27,  0xfe,  0x00,  0x0c,  0xfe,  0x9e,  0xf0,  0xfe,  0x14,  0x0c,  0xbc,  0x17,  0x34,
+  0x2c,  0x77,  0xe6,  0xc5,  0x24,  0xc6,  0x24,  0x2c,  0xfa,  0x27,  0xfe,  0x20,  0x0c,  0x1c,  0x34,  0x94,
+  0xfe,  0x3c,  0x0c,  0x95,  0x86,  0xc5,  0xdc,  0xc6,  0xdc,  0x02,  0x24,  0x01,  0x4b,  0xfe,  0xdb,  0x10,
+  0x12,  0xfe,  0xe8,  0x00,  0xb5,  0xb6,  0x74,  0xc7,  0x81,  0xc8,  0x83,  0xfe,  0x89,  0xf0,  0x24,  0x33,
+  0x31,  0xe1,  0xc7,  0x81,  0xc8,  0x83,  0x27,  0xfe,  0x66,  0x0c,  0x1d,  0x24,  0x33,  0x31,  0xdf,  0xbc,
+  0x4e,  0x10,  0xfe,  0x42,  0x00,  0x02,  0x65,  0x7c,  0x06,  0xfe,  0x81,  0x49,  0x17,  0xfe,  0x2c,  0x0d,
+  0x08,  0x05,  0x0a,  0xfe,  0x44,  0x13,  0x10,  0x00,  0x55,  0x0a,  0xfe,  0x54,  0x12,  0x55,  0xfe,  0x28,
+  0x00,  0x23,  0xfe,  0x9a,  0x0d,  0x09,  0x46,  0x01,  0x0e,  0x07,  0x00,  0x66,  0x44,  0xfe,  0x28,  0x00,
+  0xfe,  0xe2,  0x10,  0x01,  0xf5,  0x01,  0xf6,  0x09,  0xa4,  0x01,  0xfe,  0x26,  0x0f,  0x64,  0x12,  0x2f,
+  0x01,  0x73,  0x02,  0x2b,  0x10,  0xfe,  0x44,  0x00,  0x55,  0x0a,  0xe9,  0x44,  0x0a,  0xfe,  0xb4,  0x10,
+  0x01,  0xb0,  0x44,  0x0a,  0xfe,  0xaa,  0x10,  0x01,  0xb0,  0xfe,  0x19,  0x82,  0xfe,  0x34,  0x46,  0xac,
+  0x44,  0x0a,  0x10,  0xfe,  0x43,  0x00,  0xfe,  0x96,  0x10,  0x08,  0x54,  0x0a,  0x37,  0x01,  0xf5,  0x01,
+  0xf6,  0x64,  0x12,  0x2f,  0x01,  0x73,  0x99,  0x0a,  0x64,  0x42,  0x92,  0x02,  0xfe,  0x2e,  0x03,  0x08,
+  0x05,  0x0a,  0x8a,  0x44,  0x0a,  0x10,  0x00,  0xfe,  0x5c,  0x10,  0x68,  0x05,  0x1a,  0xfe,  0x58,  0x12,
+  0x08,  0x05,  0x1a,  0xfe,  0x50,  0x13,  0xfe,  0x1c,  0x1c,  0xfe,  0x9d,  0xf0,  0xfe,  0x50,  0x0d,  0xfe,
+  0x1c,  0x1c,  0xfe,  0x9d,  0xf0,  0xfe,  0x56,  0x0d,  0x08,  0x54,  0x1a,  0x37,  0xfe,  0xa9,  0x10,  0x10,
+  0xfe,  0x15,  0x00,  0xfe,  0x04,  0xe6,  0x0a,  0x50,  0xfe,  0x2e,  0x10,  0x10,  0xfe,  0x13,  0x00,  0xfe,
+  0x10,  0x10,  0x10,  0x6f,  0xab,  0x10,  0xfe,  0x41,  0x00,  0xaa,  0x10,  0xfe,  0x24,  0x00,  0x8c,  0xb5,
+  0xb6,  0x74,  0x03,  0x70,  0x28,  0x23,  0xd8,  0x50,  0xfe,  0x04,  0xe6,  0x1a,  0xfe,  0x9d,  0x41,  0xfe,
+  0x1c,  0x42,  0x64,  0x01,  0xe3,  0x02,  0x2b,  0xf8,  0x15,  0x0a,  0x39,  0xa0,  0xb4,  0x15,  0xfe,  0x31,
+  0x00,  0x39,  0xa2,  0x01,  0xfe,  0x48,  0x10,  0x02,  0xd7,  0x42,  0xfe,  0x06,  0xec,  0xd0,  0xfc,  0x44,
+  0x1b,  0xfe,  0xce,  0x45,  0x35,  0x42,  0xfe,  0x06,  0xea,  0xd0,  0xfe,  0x47,  0x4b,  0x91,  0xfe,  0x75,
+  0x57,  0x03,  0x5d,  0xfe,  0x98,  0x56,  0xfe,  0x38,  0x12,  0x09,  0x48,  0x01,  0x0e,  0xfe,  0x44,  0x48,
+  0x4f,  0x08,  0x05,  0x1b,  0xfe,  0x1a,  0x13,  0x09,  0x46,  0x01,  0x0e,  0x41,  0xfe,  0x41,  0x58,  0x09,
+  0xa4,  0x01,  0x0e,  0xfe,  0x49,  0x54,  0x96,  0xfe,  0x1e,  0x0e,  0x02,  0xfe,  0x2e,  0x03,  0x09,  0x5d,
+  0xfe,  0xee,  0x14,  0xfc,  0x44,  0x1b,  0xfe,  0xce,  0x45,  0x35,  0x42,  0xfe,  0xce,  0x47,  0xfe,  0xad,
+  0x13,  0x02,  0x2b,  0x22,  0x20,  0x07,  0x11,  0xfe,  0x9e,  0x12,  0x21,  0x13,  0x59,  0x13,  0x9f,  0x13,
+  0xd5,  0x22,  0x2f,  0x41,  0x39,  0x2f,  0xbc,  0xad,  0xfe,  0xbc,  0xf0,  0xfe,  0xe0,  0x0e,  0x0f,  0x06,
+  0x13,  0x59,  0x01,  0xfe,  0xda,  0x16,  0x03,  0xfe,  0x38,  0x01,  0x29,  0xfe,  0x3a,  0x01,  0x56,  0xfe,
+  0xe4,  0x0e,  0xfe,  0x02,  0xec,  0xd5,  0x69,  0x00,  0x66,  0xfe,  0x04,  0xec,  0x20,  0x4f,  0xfe,  0x05,
+  0xf6,  0xfe,  0x34,  0x01,  0x01,  0xfe,  0x4a,  0x17,  0xfe,  0x08,  0x90,  0xfe,  0x48,  0xf4,  0x0d,  0xfe,
+  0x18,  0x13,  0xba,  0xfe,  0x02,  0xea,  0xd5,  0x69,  0x7e,  0xfe,  0xc5,  0x13,  0x15,  0x1a,  0x39,  0xa0,
+  0xb4,  0xfe,  0x2e,  0x10,  0x03,  0xfe,  0x38,  0x01,  0x1e,  0xfe,  0xf0,  0xff,  0x0c,  0xfe,  0x60,  0x01,
+  0x03,  0xfe,  0x3a,  0x01,  0x0c,  0xfe,  0x62,  0x01,  0x43,  0x13,  0x20,  0x25,  0x06,  0x13,  0x2f,  0x12,
+  0x2f,  0x92,  0x0f,  0x06,  0x04,  0x21,  0x04,  0x22,  0x59,  0xfe,  0xf7,  0x12,  0x22,  0x9f,  0xb7,  0x13,
+  0x9f,  0x07,  0x7e,  0xfe,  0x71,  0x13,  0xfe,  0x24,  0x1c,  0x15,  0x19,  0x39,  0xa0,  0xb4,  0xfe,  0xd9,
+  0x10,  0xc3,  0xfe,  0x03,  0xdc,  0xfe,  0x73,  0x57,  0xfe,  0x80,  0x5d,  0x04,  0xc3,  0xfe,  0x03,  0xdc,
+  0xfe,  0x5b,  0x57,  0xfe,  0x80,  0x5d,  0x04,  0xfe,  0x03,  0x57,  0xc3,  0x21,  0xfe,  0x00,  0xcc,  0x04,
+  0xfe,  0x03,  0x57,  0xc3,  0x78,  0x04,  0x08,  0x05,  0x58,  0xfe,  0x22,  0x13,  0xfe,  0x1c,  0x80,  0x07,
+  0x06,  0xfe,  0x1a,  0x13,  0xfe,  0x1e,  0x80,  0xed,  0xfe,  0x1d,  0x80,  0xae,  0xfe,  0x0c,  0x90,  0xfe,
+  0x0e,  0x13,  0xfe,  0x0e,  0x90,  0xac,  0xfe,  0x3c,  0x90,  0xfe,  0x30,  0xf4,  0x0a,  0xfe,  0x3c,  0x50,
+  0xaa,  0x01,  0xfe,  0x7a,  0x17,  0x32,  0x07,  0x2f,  0xad,  0x01,  0xfe,  0xb4,  0x16,  0x08,  0x05,  0x1b,
+  0x4e,  0x01,  0xf5,  0x01,  0xf6,  0x12,  0xfe,  0xe9,  0x00,  0x08,  0x05,  0x58,  0xfe,  0x2c,  0x13,  0x01,
+  0xfe,  0x0c,  0x17,  0xfe,  0x1e,  0x1c,  0xfe,  0x14,  0x90,  0xfe,  0x96,  0x90,  0x0c,  0xfe,  0x64,  0x01,
+  0x14,  0xfe,  0x66,  0x01,  0x08,  0x05,  0x5b,  0xfe,  0x12,  0x12,  0xfe,  0x03,  0x80,  0x8d,  0xfe,  0x01,
+  0xec,  0x20,  0xfe,  0x80,  0x40,  0x13,  0x20,  0x6a,  0x2a,  0x12,  0xcf,  0x64,  0x22,  0x20,  0xfb,  0x79,
+  0x20,  0x04,  0xfe,  0x08,  0x1c,  0x03,  0xfe,  0xac,  0x00,  0xfe,  0x06,  0x58,  0x03,  0xfe,  0xae,  0x00,
+
+  0xfe,  0x07,  0x58,  0x03,  0xfe,  0xb0,  0x00,  0xfe,  0x08,  0x58,  0x03,  0xfe,  0xb2,  0x00,  0xfe,  0x09,
+  0x58,  0xfe,  0x0a,  0x1c,  0x25,  0x6e,  0x13,  0xd0,  0x21,  0x0c,  0x5c,  0x0c,  0x45,  0x0f,  0x46,  0x52,
+  0x50,  0x18,  0x1b,  0xfe,  0x90,  0x4d,  0xfe,  0x91,  0x54,  0x23,  0xfe,  0xfc,  0x0f,  0x44,  0x11,  0x0f,
+  0x48,  0x52,  0x18,  0x58,  0xfe,  0x90,  0x4d,  0xfe,  0x91,  0x54,  0x23,  0xe4,  0x25,  0x11,  0x13,  0x20,
+  0x7c,  0x6f,  0x4f,  0x22,  0x20,  0xfb,  0x79,  0x20,  0x12,  0xcf,  0xfe,  0x14,  0x56,  0xfe,  0xd6,  0xf0,
+  0xfe,  0x26,  0x10,  0xf8,  0x74,  0xfe,  0x14,  0x1c,  0xfe,  0x10,  0x1c,  0xfe,  0x18,  0x1c,  0x04,  0x42,
+  0xfe,  0x0c,  0x14,  0xfc,  0xfe,  0x07,  0xe6,  0x1b,  0xfe,  0xce,  0x47,  0xfe,  0xf5,  0x13,  0x04,  0x01,
+  0xb0,  0x7c,  0x6f,  0x4f,  0xfe,  0x06,  0x80,  0xfe,  0x48,  0x47,  0xfe,  0x42,  0x13,  0x32,  0x07,  0x2f,
+  0xfe,  0x34,  0x13,  0x09,  0x48,  0x01,  0x0e,  0xbb,  0xfe,  0x36,  0x12,  0xfe,  0x41,  0x48,  0xfe,  0x45,
+  0x48,  0x01,  0xf0,  0xfe,  0x00,  0xcc,  0xbb,  0xfe,  0xf3,  0x13,  0x43,  0x78,  0x07,  0x11,  0xac,  0x09,
+  0x84,  0x01,  0x0e,  0xfe,  0x80,  0x5c,  0x01,  0x73,  0xfe,  0x0e,  0x10,  0x07,  0x82,  0x4e,  0xfe,  0x14,
+  0x56,  0xfe,  0xd6,  0xf0,  0xfe,  0x60,  0x10,  0x04,  0xfe,  0x44,  0x58,  0x8d,  0xfe,  0x01,  0xec,  0xa2,
+  0xfe,  0x9e,  0x40,  0xfe,  0x9d,  0xe7,  0x00,  0xfe,  0x9c,  0xe7,  0x1a,  0x79,  0x2a,  0x01,  0xe3,  0xfe,
+  0xdd,  0x10,  0x2c,  0xc7,  0x81,  0xc8,  0x83,  0x33,  0x31,  0xde,  0x07,  0x1a,  0xfe,  0x48,  0x12,  0x07,
+  0x0a,  0xfe,  0x56,  0x12,  0x07,  0x19,  0xfe,  0x30,  0x12,  0x07,  0xc9,  0x17,  0xfe,  0x32,  0x12,  0x07,
+  0xfe,  0x23,  0x00,  0x17,  0xeb,  0x07,  0x06,  0x17,  0xfe,  0x9c,  0x12,  0x07,  0x1f,  0xfe,  0x12,  0x12,
+  0x07,  0x00,  0x17,  0x24,  0x15,  0xc9,  0x01,  0x36,  0xa9,  0x2d,  0x01,  0x0b,  0x94,  0x4b,  0x04,  0x2d,
+  0xdd,  0x09,  0xd1,  0x01,  0xfe,  0x26,  0x0f,  0x12,  0x82,  0x02,  0x2b,  0x2d,  0x32,  0x07,  0xa6,  0xfe,
+  0xd9,  0x13,  0x3a,  0x3d,  0x3b,  0x3e,  0x56,  0xfe,  0xf0,  0x11,  0x08,  0x05,  0x5a,  0xfe,  0x72,  0x12,
+  0x9b,  0x2e,  0x9c,  0x3c,  0x90,  0xc0,  0x96,  0xfe,  0xba,  0x11,  0x22,  0x62,  0xfe,  0x26,  0x13,  0x03,
+  0x7f,  0x29,  0x80,  0x56,  0xfe,  0x76,  0x0d,  0x0c,  0x60,  0x14,  0x61,  0x21,  0x0c,  0x7f,  0x0c,  0x80,
+  0x01,  0xb3,  0x25,  0x6e,  0x77,  0x13,  0x62,  0x01,  0xef,  0x9b,  0x2e,  0x9c,  0x3c,  0xfe,  0x04,  0x55,
+  0xfe,  0xa5,  0x55,  0xfe,  0x04,  0xfa,  0x2e,  0xfe,  0x05,  0xfa,  0x3c,  0xfe,  0x91,  0x10,  0x03,  0x3f,
+  0x29,  0x40,  0xfe,  0x40,  0x56,  0xfe,  0xe1,  0x56,  0x0c,  0x3f,  0x14,  0x40,  0x88,  0x9b,  0x2e,  0x9c,
+  0x3c,  0x90,  0xc0,  0x03,  0x5e,  0x29,  0x5f,  0xfe,  0x00,  0x56,  0xfe,  0xa1,  0x56,  0x0c,  0x5e,  0x14,
+  0x5f,  0x08,  0x05,  0x5a,  0xfe,  0x1e,  0x12,  0x22,  0x62,  0xfe,  0x1f,  0x40,  0x03,  0x60,  0x29,  0x61,
+  0xfe,  0x2c,  0x50,  0xfe,  0xae,  0x50,  0x03,  0x3f,  0x29,  0x40,  0xfe,  0x44,  0x50,  0xfe,  0xc6,  0x50,
+  0x03,  0x5e,  0x29,  0x5f,  0xfe,  0x08,  0x50,  0xfe,  0x8a,  0x50,  0x03,  0x3d,  0x29,  0x3e,  0xfe,  0x40,
+  0x50,  0xfe,  0xc2,  0x50,  0x02,  0x89,  0x25,  0x06,  0x13,  0xd4,  0x02,  0x72,  0x2d,  0x01,  0x0b,  0x1d,
+  0x4c,  0x33,  0x31,  0xde,  0x07,  0x06,  0x23,  0x4c,  0x32,  0x07,  0xa6,  0x23,  0x72,  0x01,  0xaf,  0x1e,
+  0x43,  0x17,  0x4c,  0x08,  0x05,  0x0a,  0xee,  0x3a,  0x3d,  0x3b,  0x3e,  0xfe,  0x0a,  0x55,  0x35,  0xfe,
+  0x8b,  0x55,  0x57,  0x3d,  0x7d,  0x3e,  0xfe,  0x0c,  0x51,  0xfe,  0x8e,  0x51,  0x02,  0x72,  0xfe,  0x19,
+  0x81,  0xba,  0xfe,  0x19,  0x41,  0x02,  0x72,  0x2d,  0x01,  0x0b,  0x1c,  0x34,  0x1d,  0xe8,  0x33,  0x31,
+  0xe1,  0x55,  0x19,  0xfe,  0xa6,  0x12,  0x55,  0x0a,  0x4d,  0x02,  0x4c,  0x01,  0x0b,  0x1c,  0x34,  0x1d,
+  0xe8,  0x33,  0x31,  0xdf,  0x07,  0x19,  0x23,  0x4c,  0x01,  0x0b,  0x1d,  0xe8,  0x33,  0x31,  0xfe,  0xe8,
+  0x09,  0xfe,  0xc2,  0x49,  0x51,  0x03,  0xfe,  0x9c,  0x00,  0x28,  0x8a,  0x53,  0x05,  0x1f,  0x35,  0xa9,
+  0xfe,  0xbb,  0x45,  0x55,  0x00,  0x4e,  0x44,  0x06,  0x7c,  0x43,  0xfe,  0xda,  0x14,  0x01,  0xaf,  0x8c,
+  0xfe,  0x4b,  0x45,  0xee,  0x32,  0x07,  0xa5,  0xed,  0x03,  0xcd,  0x28,  0x8a,  0x03,  0x45,  0x28,  0x35,
+  0x67,  0x02,  0x72,  0xfe,  0xc0,  0x5d,  0xfe,  0xf8,  0x14,  0xfe,  0x03,  0x17,  0x03,  0x5c,  0xc1,  0x0c,
+  0x5c,  0x67,  0x2d,  0x01,  0x0b,  0x26,  0x89,  0x01,  0xfe,  0x9e,  0x15,  0x02,  0x89,  0x01,  0x0b,  0x1c,
+  0x34,  0x1d,  0x4c,  0x33,  0x31,  0xdf,  0x07,  0x06,  0x23,  0x4c,  0x01,  0xf1,  0xfe,  0x42,  0x58,  0xf1,
+  0xfe,  0xa4,  0x14,  0x8c,  0xfe,  0x4a,  0xf4,  0x0a,  0x17,  0x4c,  0xfe,  0x4a,  0xf4,  0x06,  0xea,  0x32,
+  0x07,  0xa5,  0x8b,  0x02,  0x72,  0x03,  0x45,  0xc1,  0x0c,  0x45,  0x67,  0x2d,  0x01,  0x0b,  0x26,  0x89,
+  0x01,  0xfe,  0xcc,  0x15,  0x02,  0x89,  0x0f,  0x06,  0x27,  0xfe,  0xbe,  0x13,  0x26,  0xfe,  0xd4,  0x13,
+  0x76,  0xfe,  0x89,  0x48,  0x01,  0x0b,  0x21,  0x76,  0x04,  0x7b,  0xfe,  0xd0,  0x13,  0x1c,  0xfe,  0xd0,
+  0x13,  0x1d,  0xfe,  0xbe,  0x13,  0x67,  0x2d,  0x01,  0x0b,  0xfe,  0xd5,  0x10,  0x0f,  0x71,  0xff,  0x02,
+  0x00,  0x57,  0x52,  0x93,  0x1e,  0xfe,  0xff,  0x7f,  0xfe,  0x30,  0x56,  0xfe,  0x00,  0x5c,  0x04,  0x0f,
+  0x71,  0xff,  0x02,  0x00,  0x57,  0x52,  0x93,  0x1e,  0x43,  0xfe,  0x30,  0x56,  0xfe,  0x00,  0x5c,  0x04,
+  0x0f,  0x71,  0xff,  0x02,  0x00,  0x57,  0x52,  0x93,  0x04,  0x0f,  0x71,  0xff,  0x02,  0x00,  0x57,  0x52,
+  0x93,  0xfe,  0x0b,  0x58,  0x04,  0x09,  0x5c,  0x01,  0x87,  0x09,  0x45,  0x01,  0x87,  0x04,  0xfe,  0x03,
+  0xa1,  0x1e,  0x11,  0xff,  0x03,  0x00,  0x54,  0xfe,  0x00,  0xf4,  0x1f,  0x52,  0xfe,  0x00,  0x7d,  0xfe,
+  0x01,  0x7d,  0xfe,  0x02,  0x7d,  0xfe,  0x03,  0x7c,  0x6a,  0x2a,  0x0c,  0x5e,  0x14,  0x5f,  0x57,  0x3f,
+  0x7d,  0x40,  0x04,  0xdd,  0xfe,  0x82,  0x4a,  0xfe,  0xe1,  0x1a,  0xfe,  0x83,  0x5a,  0x8d,  0x04,  0x01,
+  0xfe,  0x0c,  0x19,  0xfe,  0x42,  0x48,  0x50,  0x51,  0x91,  0x01,  0x0b,  0x1d,  0xfe,  0x96,  0x15,  0x33,
+  0x31,  0xe1,  0x01,  0x0b,  0x1d,  0xfe,  0x96,  0x15,  0x33,  0x31,  0xfe,  0xe8,  0x0a,  0xfe,  0xc1,  0x59,
+  0x03,  0xcd,  0x28,  0xfe,  0xcc,  0x12,  0x53,  0x05,  0x1a,  0xfe,  0xc4,  0x13,  0x21,  0x69,  0x1a,  0xee,
+  0x55,  0xca,  0x6b,  0xfe,  0xdc,  0x14,  0x4d,  0x0f,  0x06,  0x18,  0xca,  0x7c,  0x30,  0xfe,  0x78,  0x10,
+  0xff,  0x02,  0x83,  0x55,  0xab,  0xff,  0x02,  0x83,  0x55,  0x69,  0x19,  0xae,  0x98,  0xfe,  0x30,  0x00,
+  0x96,  0xf2,  0x18,  0x6d,  0x0f,  0x06,  0xfe,  0x56,  0x10,  0x69,  0x0a,  0xed,  0x98,  0xfe,  0x64,  0x00,
+  0x96,  0xf2,  0x09,  0xfe,  0x64,  0x00,  0x18,  0x9e,  0x0f,  0x06,  0xfe,  0x28,  0x10,  0x69,  0x06,  0xfe,
+  0x60,  0x13,  0x98,  0xfe,  0xc8,  0x00,  0x96,  0xf2,  0x09,  0xfe,  0xc8,  0x00,  0x18,  0x59,  0x0f,  0x06,
+  0x88,  0x98,  0xfe,  0x90,  0x01,  0x7a,  0xfe,  0x42,  0x15,  0x91,  0xe4,  0xfe,  0x43,  0xf4,  0x9f,  0xfe,
+  0x56,  0xf0,  0xfe,  0x54,  0x15,  0xfe,  0x04,  0xf4,  0x71,  0xfe,  0x43,  0xf4,  0x9e,  0xfe,  0xf3,  0x10,
+  0xfe,  0x40,  0x5c,  0x01,  0xfe,  0x16,  0x14,  0x1e,  0x43,  0xec,  0xfe,  0x00,  0x17,  0xfe,  0x4d,  0xe4,
+  0x6e,  0x7a,  0xfe,  0x90,  0x15,  0xc4,  0x6e,  0xfe,  0x1c,  0x10,  0xfe,  0x00,  0x17,  0xfe,  0x4d,  0xe4,
+  0xcc,  0x7a,  0xfe,  0x90,  0x15,  0xc4,  0xcc,  0x88,  0x51,  0x21,  0xfe,  0x4d,  0xf4,  0x00,  0xe9,  0x91,
+  0x0f,  0x06,  0xfe,  0xb4,  0x56,  0xfe,  0xc3,  0x58,  0x04,  0x51,  0x0f,  0x0a,  0x04,  0x16,  0x06,  0x01,
+  0x0b,  0x26,  0xf3,  0x16,  0x0a,  0x01,  0x0b,  0x26,  0xf3,  0x16,  0x19,  0x01,  0x0b,  0x26,  0xf3,  0x76,
+  0xfe,  0x89,  0x49,  0x01,  0x0b,  0x04,  0x16,  0x06,  0x01,  0x0b,  0x26,  0xb1,  0x16,  0x19,  0x01,  0x0b,
+  0x26,  0xb1,  0x16,  0x06,  0x01,  0x0b,  0x26,  0xb1,  0xfe,  0x89,  0x49,  0x01,  0x0b,  0x26,  0xb1,  0x76,
+  0xfe,  0x89,  0x4a,  0x01,  0x0b,  0x04,  0x51,  0x04,  0x22,  0xd3,  0x07,  0x06,  0xfe,  0x48,  0x13,  0xb8,
+  0x13,  0xd3,  0xfe,  0x49,  0xf4,  0x00,  0x4d,  0x76,  0xa9,  0x67,  0xfe,  0x01,  0xec,  0xfe,  0x27,  0x01,
+  0xfe,  0x89,  0x48,  0xff,  0x02,  0x00,  0x10,  0x27,  0xfe,  0x2e,  0x16,  0x32,  0x07,  0xfe,  0xe3,  0x00,
+  0xfe,  0x20,  0x13,  0x1d,  0xfe,  0x52,  0x16,  0x21,  0x13,  0xd4,  0x01,  0x4b,  0x22,  0xd4,  0x07,  0x06,
+  0x4e,  0x08,  0x54,  0x06,  0x37,  0x04,  0x09,  0x48,  0x01,  0x0e,  0xfb,  0x8e,  0x07,  0x11,  0xae,  0x09,
+  0x84,  0x01,  0x0e,  0x8e,  0x09,  0x5d,  0x01,  0xa8,  0x04,  0x09,  0x84,  0x01,  0x0e,  0x8e,  0xfe,  0x80,
+  0xe7,  0x11,  0x07,  0x11,  0x8a,  0xfe,  0x45,  0x58,  0x01,  0xf0,  0x8e,  0x04,  0x09,  0x48,  0x01,  0x0e,
+  0x8e,  0x09,  0x5d,  0x01,  0xa8,  0x04,  0x09,  0x48,  0x01,  0x0e,  0xfe,  0x80,  0x80,  0xfe,  0x80,  0x4c,
+  0xfe,  0x49,  0xe4,  0x11,  0xae,  0x09,  0x84,  0x01,  0x0e,  0xfe,  0x80,  0x4c,  0x09,  0x5d,  0x01,  0x87,
+  0x04,  0x18,  0x11,  0x75,  0x6c,  0xfe,  0x60,  0x01,  0xfe,  0x18,  0xdf,  0xfe,  0x19,  0xde,  0xfe,  0x24,
+  0x1c,  0xfe,  0x1d,  0xf7,  0x1b,  0x97,  0xfe,  0xee,  0x16,  0x01,  0xfe,  0xf4,  0x17,  0xad,  0x9a,  0x1b,
+  0x6c,  0xfe,  0x2c,  0x01,  0xfe,  0x2f,  0x19,  0x04,  0xb9,  0x23,  0xfe,  0xde,  0x16,  0xfe,  0xda,  0x10,
+  0x18,  0x11,  0x75,  0x03,  0xfe,  0x64,  0x01,  0xfe,  0x00,  0xf4,  0x1f,  0xfe,  0x18,  0x58,  0x03,  0xfe,
+  0x66,  0x01,  0xfe,  0x19,  0x58,  0x9a,  0x1f,  0xfe,  0x3c,  0x90,  0xfe,  0x30,  0xf4,  0x06,  0xfe,  0x3c,
+  0x50,  0x6c,  0xfe,  0x38,  0x00,  0xfe,  0x0f,  0x79,  0xfe,  0x1c,  0xf7,  0x1f,  0x97,  0xfe,  0x38,  0x17,
+  0xfe,  0xb6,  0x14,  0x35,  0x04,  0xb9,  0x23,  0xfe,  0x10,  0x17,  0xfe,  0x9c,  0x10,  0x18,  0x11,  0x75,
+  0xfe,  0x83,  0x5a,  0xfe,  0x18,  0xdf,  0xfe,  0x19,  0xde,  0xfe,  0x1d,  0xf7,  0x2e,  0x97,  0xfe,  0x5a,
+  0x17,  0xfe,  0x94,  0x14,  0xec,  0x9a,  0x2e,  0x6c,  0x1a,  0xfe,  0xaf,  0x19,  0xfe,  0x98,  0xe7,  0x00,
+  0x04,  0xb9,  0x23,  0xfe,  0x4e,  0x17,  0xfe,  0x6c,  0x10,  0x18,  0x11,  0x75,  0xfe,  0x30,  0xbc,  0xfe,
+  0xb2,  0xbc,  0x9a,  0xcb,  0x6c,  0x1a,  0xfe,  0x0f,  0x79,  0xfe,  0x1c,  0xf7,  0xcb,  0x97,  0xfe,  0x92,
+  0x17,  0xfe,  0x5c,  0x14,  0x35,  0x04,  0xb9,  0x23,  0xfe,  0x7e,  0x17,  0xfe,  0x42,  0x10,  0xfe,  0x02,
+  0xf6,  0x11,  0x75,  0xfe,  0x18,  0xfe,  0x60,  0xfe,  0x19,  0xfe,  0x61,  0xfe,  0x03,  0xa1,  0xfe,  0x1d,
+  0xf7,  0x5b,  0x97,  0xfe,  0xb8,  0x17,  0xfe,  0x36,  0x14,  0xfe,  0x1c,  0x13,  0x9a,  0x5b,  0x41,  0xfe,
+  0x83,  0x58,  0xfe,  0xaf,  0x19,  0xfe,  0x80,  0xe7,  0x11,  0xfe,  0x81,  0xe7,  0x11,  0x12,  0xfe,  0xdd,
+  0x00,  0x6a,  0x2a,  0x04,  0x6a,  0x2a,  0xfe,  0x12,  0x45,  0x23,  0xfe,  0xa8,  0x17,  0x15,  0x06,  0x39,
+  0xa0,  0xb4,  0x02,  0x2b,  0xfe,  0x39,  0xf0,  0xfe,  0xfc,  0x17,  0x21,  0x04,  0xfe,  0x7e,  0x18,  0x1e,
+  0x19,  0x66,  0x0f,  0x0d,  0x04,  0x75,  0x03,  0xd2,  0x1e,  0x06,  0xfe,  0xef,  0x12,  0xfe,  0xe1,  0x10,
+  0x7c,  0x6f,  0x4f,  0x32,  0x07,  0x2f,  0xfe,  0x3c,  0x13,  0xf1,  0xfe,  0x42,  0x13,  0x42,  0x92,  0x09,
+  0x48,  0x01,  0x0e,  0xbb,  0xeb,  0xfe,  0x41,  0x48,  0xfe,  0x45,  0x48,  0x01,  0xf0,  0xfe,  0x00,  0xcc,
+  0xbb,  0xfe,  0xf3,  0x13,  0x43,  0x78,  0x07,  0x11,  0xac,  0x09,  0x84,  0x01,  0x0e,  0xfe,  0x80,  0x4c,
+  0x01,  0x73,  0xfe,  0x16,  0x10,  0x07,  0x82,  0x8b,  0xfe,  0x40,  0x14,  0xfe,  0x24,  0x12,  0xfe,  0x14,
+  0x56,  0xfe,  0xd6,  0xf0,  0xfe,  0x1c,  0x18,  0x18,  0x0a,  0x04,  0xfe,  0x9c,  0xe7,  0x0a,  0x10,  0xfe,
+  0x15,  0x00,  0x64,  0x79,  0x2a,  0x01,  0xe3,  0x18,  0x06,  0x04,  0x42,  0x92,  0x08,  0x54,  0x1b,  0x37,
+  0x12,  0x2f,  0x01,  0x73,  0x18,  0x06,  0x04,  0xfe,  0x38,  0x90,  0xfe,  0xba,  0x90,  0x3a,  0xce,  0x3b,
+  0xcf,  0xfe,  0x48,  0x55,  0x35,  0xfe,  0xc9,  0x55,  0x04,  0x22,  0xa3,  0x77,  0x13,  0xa3,  0x04,  0x09,
+  0xa4,  0x01,  0x0e,  0xfe,  0x41,  0x48,  0x09,  0x46,  0x01,  0x0e,  0xfe,  0x49,  0x44,  0x17,  0xfe,  0xe8,
+  0x18,  0x77,  0x78,  0x04,  0x09,  0x48,  0x01,  0x0e,  0x07,  0x11,  0x4e,  0x09,  0x5d,  0x01,  0xa8,  0x09,
+  0x46,  0x01,  0x0e,  0x77,  0x78,  0x04,  0xfe,  0x4e,  0xe4,  0x19,  0x6b,  0xfe,  0x1c,  0x19,  0x03,  0xfe,
+  0x90,  0x00,  0xfe,  0x3a,  0x45,  0xfe,  0x2c,  0x10,  0xfe,  0x4e,  0xe4,  0xc9,  0x6b,  0xfe,  0x2e,  0x19,
+  0x03,  0xfe,  0x92,  0x00,  0xfe,  0x02,  0xe6,  0x1a,  0xe5,  0xfe,  0x4e,  0xe4,  0xfe,  0x0b,  0x00,  0x6b,
+  0xfe,  0x40,  0x19,  0x03,  0xfe,  0x94,  0x00,  0xfe,  0x02,  0xe6,  0x1f,  0xfe,  0x08,  0x10,  0x03,  0xfe,
+  0x96,  0x00,  0xfe,  0x02,  0xe6,  0x6d,  0xfe,  0x4e,  0x45,  0xea,  0xba,  0xff,  0x04,  0x68,  0x54,  0xe7,
+  0x1e,  0x6e,  0xfe,  0x08,  0x1c,  0xfe,  0x67,  0x19,  0xfe,  0x0a,  0x1c,  0xfe,  0x1a,  0xf4,  0xfe,  0x00,
+  0x04,  0xea,  0xfe,  0x48,  0xf4,  0x19,  0x7a,  0xfe,  0x74,  0x19,  0x0f,  0x19,  0x04,  0x07,  0x7e,  0xfe,
+  0x5a,  0xf0,  0xfe,  0x84,  0x19,  0x25,  0xfe,  0x09,  0x00,  0xfe,  0x34,  0x10,  0x07,  0x1a,  0xfe,  0x5a,
+  0xf0,  0xfe,  0x92,  0x19,  0x25,  0xca,  0xfe,  0x26,  0x10,  0x07,  0x19,  0x66,  0x25,  0x6d,  0xe5,  0x07,
+  0x0a,  0x66,  0x25,  0x9e,  0xfe,  0x0e,  0x10,  0x07,  0x06,  0x66,  0x25,  0x59,  0xa9,  0xb8,  0x04,  0x15,
+  0xfe,  0x09,  0x00,  0x01,  0x36,  0xfe,  0x04,  0xfe,  0x81,  0x03,  0x83,  0xfe,  0x40,  0x5c,  0x04,  0x1c,
+  0xf7,  0xfe,  0x14,  0xf0,  0x0b,  0x27,  0xfe,  0xd6,  0x19,  0x1c,  0xf7,  0x7b,  0xf7,  0xfe,  0x82,  0xf0,
+  0xfe,  0xda,  0x19,  0x04,  0xff,  0xcc,  0x00,  0x00,
 };
 
 STATIC unsigned short _adv_asc38C0800_size =
-    sizeof(_adv_asc38C0800_buf); /* 0x14F1 */
+        sizeof(_adv_asc38C0800_buf); /* 0x14E1 */
 STATIC ADV_DCNT _adv_asc38C0800_chksum =
-    0x053503A5; /* Expanded checksum. */
+        0x050D3FD8UL; /* Expanded little-endian checksum. */
+
+/* Microcode buffer is kept after initialization for error recovery. */
+STATIC unsigned char _adv_asc38C1600_buf[] = {
+  0x00,  0x00,  0x00,  0xf2,  0x00,  0x16,  0x00,  0xfc,  0x00,  0x10,  0x00,  0xf0,  0x18,  0xe4,  0x01,  0x00,
+  0x04,  0x1e,  0x48,  0xe4,  0x03,  0xf6,  0xf7,  0x13,  0x2e,  0x1e,  0x02,  0x00,  0x07,  0x17,  0xc0,  0x5f,
+  0x00,  0xfa,  0xff,  0xff,  0x04,  0x00,  0x00,  0xf6,  0x09,  0xe7,  0x82,  0xe7,  0x85,  0xf0,  0x86,  0xf0,
+  0x4e,  0x10,  0x9e,  0xe7,  0xff,  0x00,  0x55,  0xf0,  0x01,  0xf6,  0x03,  0x00,  0x98,  0x57,  0x01,  0xe6,
+  0x00,  0xea,  0x00,  0xec,  0x01,  0xfa,  0x18,  0xf4,  0x08,  0x00,  0xf0,  0x1d,  0x38,  0x54,  0x32,  0xf0,
+  0x10,  0x00,  0xc2,  0x0e,  0x1e,  0xf0,  0xd5,  0xf0,  0xbc,  0x00,  0x4b,  0xe4,  0x00,  0xe6,  0xb1,  0xf0,
+  0xb4,  0x00,  0x02,  0x13,  0x3e,  0x1c,  0xc8,  0x47,  0x3e,  0x00,  0xd8,  0x01,  0x06,  0x13,  0x0c,  0x1c,
+  0x5e,  0x1e,  0x00,  0x57,  0xc8,  0x57,  0x01,  0xfc,  0xbc,  0x0e,  0xa2,  0x12,  0xb9,  0x54,  0x00,  0x80,
+  0x62,  0x0a,  0x5a,  0x12,  0xc8,  0x15,  0x3e,  0x1e,  0x18,  0x40,  0xbd,  0x56,  0x03,  0xe6,  0x01,  0xea,
+  0x5c,  0xf0,  0x0f,  0x00,  0x20,  0x00,  0x6c,  0x01,  0x6e,  0x01,  0x04,  0x12,  0x04,  0x13,  0xbb,  0x55,
+  0x3c,  0x56,  0x3e,  0x57,  0x03,  0x58,  0x4a,  0xe4,  0x40,  0x00,  0xb6,  0x00,  0xbb,  0x00,  0xc0,  0x00,
+  0x00,  0x01,  0x01,  0x01,  0x3e,  0x01,  0x58,  0x0a,  0x44,  0x10,  0x0a,  0x12,  0x4c,  0x1c,  0x4e,  0x1c,
+  0x02,  0x4a,  0x30,  0xe4,  0x05,  0xe6,  0x0c,  0x00,  0x3c,  0x00,  0x80,  0x00,  0x24,  0x01,  0x3c,  0x01,
+  0x68,  0x01,  0x6a,  0x01,  0x70,  0x01,  0x72,  0x01,  0x74,  0x01,  0x76,  0x01,  0x78,  0x01,  0x7c,  0x01,
+  0xc6,  0x0e,  0x0c,  0x10,  0xac,  0x12,  0xae,  0x12,  0x16,  0x1a,  0x32,  0x1c,  0x6e,  0x1e,  0x02,  0x48,
+  0x3a,  0x55,  0xc9,  0x57,  0x02,  0xee,  0x5b,  0xf0,  0x03,  0xf7,  0x06,  0xf7,  0x03,  0xfc,  0x06,  0x00,
+  0x1e,  0x00,  0xbe,  0x00,  0xe1,  0x00,  0x0c,  0x12,  0x18,  0x1a,  0x70,  0x1a,  0x30,  0x1c,  0x38,  0x1c,
+  0x10,  0x44,  0x00,  0x4c,  0xb0,  0x57,  0x40,  0x5c,  0x4d,  0xe4,  0x04,  0xea,  0x5d,  0xf0,  0xa7,  0xf0,
+  0x04,  0xf6,  0x02,  0xfc,  0x05,  0x00,  0x09,  0x00,  0x19,  0x00,  0x32,  0x00,  0x33,  0x00,  0x34,  0x00,
+  0x36,  0x00,  0x98,  0x00,  0x9e,  0x00,  0xcc,  0x00,  0x20,  0x01,  0x4e,  0x01,  0x79,  0x01,  0x3c,  0x09,
+  0x68,  0x0d,  0x02,  0x10,  0x04,  0x10,  0x3a,  0x10,  0x08,  0x12,  0x0a,  0x13,  0x40,  0x16,  0x50,  0x16,
+  0x00,  0x17,  0x4a,  0x19,  0x00,  0x4e,  0x00,  0x54,  0x01,  0x58,  0x00,  0xdc,  0x05,  0xf0,  0x09,  0xf0,
+  0x59,  0xf0,  0xb8,  0xf0,  0x48,  0xf4,  0x0e,  0xf7,  0x0a,  0x00,  0x9b,  0x00,  0x9c,  0x00,  0xa4,  0x00,
+  0xb5,  0x00,  0xba,  0x00,  0xd0,  0x00,  0xe7,  0x00,  0xf0,  0x03,  0x69,  0x08,  0xe9,  0x09,  0x5c,  0x0c,
+  0xb6,  0x12,  0xbc,  0x19,  0xd8,  0x1b,  0x20,  0x1c,  0x34,  0x1c,  0x36,  0x1c,  0x42,  0x1d,  0x08,  0x44,
+  0x38,  0x44,  0x91,  0x44,  0x0a,  0x45,  0x48,  0x46,  0x89,  0x48,  0x68,  0x54,  0x83,  0x55,  0x83,  0x59,
+  0x31,  0xe4,  0x02,  0xe6,  0x07,  0xf0,  0x08,  0xf0,  0x0b,  0xf0,  0x0c,  0xf0,  0x4b,  0xf4,  0x04,  0xf8,
+  0x05,  0xf8,  0x02,  0xfa,  0x03,  0xfa,  0x04,  0xfc,  0x05,  0xfc,  0x07,  0x00,  0xa8,  0x00,  0xaa,  0x00,
+  0xb9,  0x00,  0xe0,  0x00,  0xe5,  0x00,  0x22,  0x01,  0x26,  0x01,  0x60,  0x01,  0x7a,  0x01,  0x82,  0x01,
+  0xc8,  0x01,  0xca,  0x01,  0x86,  0x02,  0x6a,  0x03,  0x18,  0x05,  0xb2,  0x07,  0x68,  0x08,  0x10,  0x0d,
+  0x06,  0x10,  0x0a,  0x10,  0x0e,  0x10,  0x12,  0x10,  0x60,  0x10,  0xed,  0x10,  0xf3,  0x10,  0x06,  0x12,
+  0x10,  0x12,  0x1e,  0x12,  0x0c,  0x13,  0x0e,  0x13,  0x10,  0x13,  0xfe,  0x9c,  0xf0,  0x35,  0x05,  0xfe,
+  0xec,  0x0e,  0xff,  0x10,  0x00,  0x00,  0xe9,  0xfe,  0x34,  0x1f,  0x00,  0xe8,  0xfe,  0x88,  0x01,  0xff,
+  0x03,  0x00,  0x00,  0xfe,  0x93,  0x15,  0xfe,  0x0f,  0x05,  0xff,  0x38,  0x00,  0x00,  0xfe,  0x57,  0x24,
+  0x00,  0xfe,  0x4c,  0x00,  0x65,  0xff,  0x04,  0x00,  0x00,  0x1a,  0xff,  0x09,  0x00,  0x00,  0xff,  0x08,
+  0x01,  0x01,  0xff,  0x08,  0xff,  0xff,  0xff,  0x27,  0x00,  0x00,  0xff,  0x10,  0xff,  0xff,  0xff,  0x13,
+  0x00,  0x00,  0xfe,  0x78,  0x56,  0xfe,  0x34,  0x12,  0xff,  0x21,  0x00,  0x00,  0xfe,  0x04,  0xf7,  0xe8,
+  0x37,  0x7d,  0x0d,  0x01,  0xfe,  0x4a,  0x11,  0xfe,  0x04,  0xf7,  0xe8,  0x7d,  0x0d,  0x51,  0x37,  0xfe,
+  0x3d,  0xf0,  0xfe,  0x0c,  0x02,  0xfe,  0x20,  0xf0,  0xbc,  0xfe,  0x91,  0xf0,  0xfe,  0xf8,  0x01,  0xfe,
+  0x90,  0xf0,  0xfe,  0xf8,  0x01,  0xfe,  0x8f,  0xf0,  0xbc,  0x03,  0x67,  0x4d,  0x05,  0xfe,  0x08,  0x0f,
+  0x01,  0xfe,  0x78,  0x0f,  0xfe,  0xdd,  0x12,  0x05,  0xfe,  0x0e,  0x03,  0xfe,  0x28,  0x1c,  0x03,  0xfe,
+  0xa6,  0x00,  0xfe,  0xd1,  0x12,  0x3e,  0x22,  0xfe,  0xa6,  0x00,  0xac,  0xfe,  0x48,  0xf0,  0xfe,  0x90,
+  0x02,  0xfe,  0x49,  0xf0,  0xfe,  0xaa,  0x02,  0xfe,  0x4a,  0xf0,  0xfe,  0xc8,  0x02,  0xfe,  0x46,  0xf0,
+  0xfe,  0x5a,  0x02,  0xfe,  0x47,  0xf0,  0xfe,  0x60,  0x02,  0xfe,  0x43,  0xf0,  0xfe,  0x4e,  0x02,  0xfe,
+  0x44,  0xf0,  0xfe,  0x52,  0x02,  0xfe,  0x45,  0xf0,  0xfe,  0x56,  0x02,  0x1c,  0x0d,  0xa2,  0x1c,  0x07,
+  0x22,  0xb7,  0x05,  0x35,  0xfe,  0x00,  0x1c,  0xfe,  0xf1,  0x10,  0xfe,  0x02,  0x1c,  0xf5,  0xfe,  0x1e,
+  0x1c,  0xfe,  0xe9,  0x10,  0x01,  0x5f,  0xfe,  0xe7,  0x10,  0xfe,  0x06,  0xfc,  0xde,  0x0a,  0x81,  0x01,
+  0xa3,  0x05,  0x35,  0x1f,  0x95,  0x47,  0xb8,  0x01,  0xfe,  0xe4,  0x11,  0x0a,  0x81,  0x01,  0x5c,  0xfe,
+  0xbd,  0x10,  0x0a,  0x81,  0x01,  0x5c,  0xfe,  0xad,  0x10,  0xfe,  0x16,  0x1c,  0xfe,  0x58,  0x1c,  0x1c,
+  0x07,  0x22,  0xb7,  0x37,  0x2a,  0x35,  0xfe,  0x3d,  0xf0,  0xfe,  0x0c,  0x02,  0x2b,  0xfe,  0x9e,  0x02,
+  0xfe,  0x5a,  0x1c,  0xfe,  0x12,  0x1c,  0xfe,  0x14,  0x1c,  0x1f,  0xfe,  0x30,  0x00,  0x47,  0xb8,  0x01,
+  0xfe,  0xd4,  0x11,  0x1c,  0x07,  0x22,  0xb7,  0x05,  0xe9,  0x21,  0x2c,  0x09,  0x1a,  0x31,  0xfe,  0x69,
+  0x10,  0x1c,  0x07,  0x22,  0xb7,  0xfe,  0x04,  0xec,  0x2c,  0x60,  0x01,  0xfe,  0x1e,  0x1e,  0x20,  0x2c,
+  0xfe,  0x05,  0xf6,  0xde,  0x01,  0xfe,  0x62,  0x1b,  0x01,  0x0c,  0x61,  0x4a,  0x44,  0x15,  0x56,  0x51,
+  0x01,  0xfe,  0x9e,  0x1e,  0x01,  0xfe,  0x96,  0x1a,  0x05,  0x35,  0x0a,  0x57,  0x01,  0x18,  0x09,  0x00,
+  0x36,  0x01,  0x85,  0xfe,  0x18,  0x10,  0xfe,  0x41,  0x58,  0x0a,  0xba,  0x01,  0x18,  0xfe,  0xc8,  0x54,
+  0x7b,  0xfe,  0x1c,  0x03,  0x01,  0xfe,  0x96,  0x1a,  0x05,  0x35,  0x37,  0x60,  0xfe,  0x02,  0xe8,  0x30,
+  0xfe,  0xbf,  0x57,  0xfe,  0x9e,  0x43,  0xfe,  0x77,  0x57,  0xfe,  0x27,  0xf0,  0xfe,  0xe4,  0x01,  0xfe,
+  0x07,  0x4b,  0xfe,  0x20,  0xf0,  0xbc,  0xfe,  0x40,  0x1c,  0x2a,  0xeb,  0xfe,  0x26,  0xf0,  0xfe,  0x66,
+  0x03,  0xfe,  0xa0,  0xf0,  0xfe,  0x54,  0x03,  0xfe,  0x11,  0xf0,  0xbc,  0xfe,  0xef,  0x10,  0xfe,  0x9f,
+  0xf0,  0xfe,  0x74,  0x03,  0xfe,  0x46,  0x1c,  0x19,  0xfe,  0x11,  0x00,  0x05,  0x70,  0x37,  0xfe,  0x48,
+  0x1c,  0xfe,  0x46,  0x1c,  0x01,  0x0c,  0x06,  0x28,  0xfe,  0x18,  0x13,  0x26,  0x21,  0xb9,  0xc7,  0x20,
+  0xb9,  0x0a,  0x57,  0x01,  0x18,  0xc7,  0x89,  0x01,  0xfe,  0xc8,  0x1a,  0x15,  0xe1,  0x2a,  0xeb,  0xfe,
+  0x01,  0xf0,  0xeb,  0xfe,  0x82,  0xf0,  0xfe,  0xa4,  0x03,  0xfe,  0x9c,  0x32,  0x15,  0xfe,  0xe4,  0x00,
+  0x2f,  0xfe,  0xb6,  0x03,  0x2a,  0x3c,  0x16,  0xfe,  0xc6,  0x03,  0x01,  0x41,  0xfe,  0x06,  0xf0,  0xfe,
+  0xd6,  0x03,  0xaf,  0xa0,  0xfe,  0x0a,  0xf0,  0xfe,  0xa2,  0x07,  0x05,  0x29,  0x03,  0x81,  0x1e,  0x1b,
+  0xfe,  0x24,  0x05,  0x1f,  0x63,  0x01,  0x42,  0x8f,  0xfe,  0x70,  0x02,  0x05,  0xea,  0xfe,  0x46,  0x1c,
+  0x37,  0x7d,  0x1d,  0xfe,  0x67,  0x1b,  0xfe,  0xbf,  0x57,  0xfe,  0x77,  0x57,  0xfe,  0x48,  0x1c,  0x75,
+  0x01,  0xa6,  0x86,  0x0a,  0x57,  0x01,  0x18,  0x09,  0x00,  0x1b,  0xec,  0x0a,  0xe1,  0x01,  0x18,  0x77,
+  0x50,  0x40,  0x8d,  0x30,  0x03,  0x81,  0x1e,  0xf8,  0x1f,  0x63,  0x01,  0x42,  0x8f,  0xfe,  0x70,  0x02,
+  0x05,  0xea,  0xd7,  0x99,  0xd8,  0x9c,  0x2a,  0x29,  0x2f,  0xfe,  0x4e,  0x04,  0x16,  0xfe,  0x4a,  0x04,
+  0x7e,  0xfe,  0xa0,  0x00,  0xfe,  0x9b,  0x57,  0xfe,  0x54,  0x12,  0x32,  0xff,  0x02,  0x00,  0x10,  0x01,
+  0x08,  0x16,  0xfe,  0x02,  0x05,  0x32,  0x01,  0x08,  0x16,  0x29,  0x27,  0x25,  0xee,  0xfe,  0x4c,  0x44,
+  0xfe,  0x58,  0x12,  0x50,  0xfe,  0x44,  0x48,  0x13,  0x34,  0xfe,  0x4c,  0x54,  0x7b,  0xec,  0x60,  0x8d,
+  0x30,  0x01,  0xfe,  0x4e,  0x1e,  0xfe,  0x48,  0x47,  0xfe,  0x7c,  0x13,  0x01,  0x0c,  0x06,  0x28,  0xfe,
+  0x32,  0x13,  0x01,  0x43,  0x09,  0x9b,  0xfe,  0x68,  0x13,  0xfe,  0x26,  0x10,  0x13,  0x34,  0xfe,  0x4c,
+  0x54,  0x7b,  0xec,  0x01,  0xfe,  0x4e,  0x1e,  0xfe,  0x48,  0x47,  0xfe,  0x54,  0x13,  0x01,  0x0c,  0x06,
+  0x28,  0xa5,  0x01,  0x43,  0x09,  0x9b,  0xfe,  0x40,  0x13,  0x01,  0x0c,  0x06,  0x28,  0xf9,  0x1f,  0x7f,
+  0x01,  0x0c,  0x06,  0x07,  0x4d,  0x1f,  0xfe,  0x0d,  0x00,  0x01,  0x42,  0x8f,  0xfe,  0xa4,  0x0e,  0x05,
+  0x29,  0x32,  0x15,  0xfe,  0xe6,  0x00,  0x0f,  0xfe,  0x1c,  0x90,  0x04,  0xfe,  0x9c,  0x93,  0x3a,  0x0b,
+  0x0e,  0x8b,  0x02,  0x1f,  0x7f,  0x01,  0x42,  0x05,  0x35,  0xfe,  0x42,  0x5b,  0x7d,  0x1d,  0xfe,  0x46,
+  0x59,  0xfe,  0xbf,  0x57,  0xfe,  0x77,  0x57,  0x0f,  0xfe,  0x87,  0x80,  0x04,  0xfe,  0x87,  0x83,  0xfe,
+  0xc9,  0x47,  0x0b,  0x0e,  0xd0,  0x65,  0x01,  0x0c,  0x06,  0x0d,  0xfe,  0x98,  0x13,  0x0f,  0xfe,  0x20,
+  0x80,  0x04,  0xfe,  0xa0,  0x83,  0x33,  0x0b,  0x0e,  0x09,  0x1d,  0xfe,  0x84,  0x12,  0x01,  0x38,  0x06,
+  0x07,  0xfe,  0x70,  0x13,  0x03,  0xfe,  0xa2,  0x00,  0x1e,  0x1b,  0xfe,  0xda,  0x05,  0xd0,  0x54,  0x01,
+  0x38,  0x06,  0x0d,  0xfe,  0x58,  0x13,  0x03,  0xfe,  0xa0,  0x00,  0x1e,  0xfe,  0x50,  0x12,  0x5e,  0xff,
+  0x02,  0x00,  0x10,  0x2f,  0xfe,  0x90,  0x05,  0x2a,  0x3c,  0xcc,  0xff,  0x02,  0x00,  0x10,  0x2f,  0xfe,
+  0x9e,  0x05,  0x17,  0xfe,  0xf4,  0x05,  0x15,  0xfe,  0xe3,  0x00,  0x26,  0x01,  0x38,  0xfe,  0x4a,  0xf0,
+  0xfe,  0xc0,  0x05,  0xfe,  0x49,  0xf0,  0xfe,  0xba,  0x05,  0x71,  0x2e,  0xfe,  0x21,  0x00,  0xf1,  0x2e,
+  0xfe,  0x22,  0x00,  0xa2,  0x2e,  0x4a,  0xfe,  0x09,  0x48,  0xff,  0x02,  0x00,  0x10,  0x2f,  0xfe,  0xd0,
+  0x05,  0x17,  0xfe,  0xf4,  0x05,  0xfe,  0xe2,  0x08,  0x01,  0x38,  0x06,  0xfe,  0x1c,  0x00,  0x4d,  0x01,
+  0xa7,  0x2e,  0x07,  0x20,  0xe4,  0x47,  0xfe,  0x27,  0x01,  0x01,  0x0c,  0x06,  0x28,  0xfe,  0x24,  0x12,
+  0x3e,  0x01,  0x84,  0x1f,  0x7f,  0x01,  0x0c,  0x06,  0x07,  0x4d,  0x1f,  0xfe,  0x0d,  0x00,  0x01,  0x42,
+  0x8f,  0xfe,  0xa4,  0x0e,  0x05,  0x29,  0x03,  0xe6,  0x1e,  0xfe,  0xca,  0x13,  0x03,  0xb6,  0x1e,  0xfe,
+  0x40,  0x12,  0x03,  0x66,  0x1e,  0xfe,  0x38,  0x13,  0x3e,  0x01,  0x84,  0x17,  0xfe,  0x72,  0x06,  0x0a,
+  0x07,  0x01,  0x38,  0x06,  0x24,  0xfe,  0x02,  0x12,  0x4f,  0x01,  0xfe,  0x56,  0x19,  0x16,  0xfe,  0x68,
+  0x06,  0x15,  0x82,  0x01,  0x41,  0x15,  0xe2,  0x03,  0x66,  0x8a,  0x10,  0x66,  0x03,  0x9a,  0x1e,  0xfe,
+  0x70,  0x12,  0x03,  0x55,  0x1e,  0xfe,  0x68,  0x13,  0x01,  0xc6,  0x09,  0x12,  0x48,  0xfe,  0x92,  0x06,
+  0x2e,  0x12,  0x01,  0xfe,  0xac,  0x1d,  0xfe,  0x43,  0x48,  0x62,  0x80,  0x13,  0x58,  0xff,  0x02,  0x00,
+  0x57,  0x52,  0xad,  0x23,  0x3f,  0x4e,  0x62,  0x49,  0x3e,  0x01,  0x84,  0x17,  0xfe,  0xea,  0x06,  0x01,
+  0x38,  0x06,  0x12,  0xf7,  0x45,  0x0a,  0x95,  0x01,  0xfe,  0x84,  0x19,  0x16,  0xfe,  0xe0,  0x06,  0x15,
+  0x82,  0x01,  0x41,  0x15,  0xe2,  0x03,  0x55,  0x8a,  0x10,  0x55,  0x1c,  0x07,  0x01,  0x84,  0xfe,  0xae,
+  0x10,  0x03,  0x6f,  0x1e,  0xfe,  0x9e,  0x13,  0x3e,  0x01,  0x84,  0x03,  0x9a,  0x1e,  0xfe,  0x1a,  0x12,
+  0x01,  0x38,  0x06,  0x12,  0xfc,  0x01,  0xc6,  0x01,  0xfe,  0xac,  0x1d,  0xfe,  0x43,  0x48,  0x62,  0x80,
+  0xf0,  0x45,  0x0a,  0x95,  0x03,  0xb6,  0x1e,  0xf8,  0x01,  0x38,  0x06,  0x24,  0x36,  0xfe,  0x02,  0xf6,
+  0x07,  0x71,  0x78,  0x8c,  0x00,  0x4d,  0x62,  0x49,  0x3e,  0x2d,  0x93,  0x4e,  0xd0,  0x0d,  0x17,  0xfe,
+  0x9a,  0x07,  0x01,  0xfe,  0xc0,  0x19,  0x16,  0xfe,  0x90,  0x07,  0x26,  0x20,  0x9e,  0x15,  0x82,  0x01,
+  0x41,  0x15,  0xe2,  0x21,  0x9e,  0x09,  0x07,  0xfb,  0x03,  0xe6,  0xfe,  0x58,  0x57,  0x10,  0xe6,  0x05,
+  0xfe,  0x2a,  0x06,  0x03,  0x6f,  0x8a,  0x10,  0x6f,  0x1c,  0x07,  0x01,  0x84,  0xfe,  0x9c,  0x32,  0x5f,
+  0x75,  0x01,  0xa6,  0x86,  0x15,  0xfe,  0xe2,  0x00,  0x2f,  0xed,  0x2a,  0x3c,  0xfe,  0x0a,  0xf0,  0xfe,
+  0xce,  0x07,  0xae,  0xfe,  0x96,  0x08,  0xfe,  0x06,  0xf0,  0xfe,  0x9e,  0x08,  0xaf,  0xa0,  0x05,  0x29,
+  0x01,  0x0c,  0x06,  0x0d,  0xfe,  0x2e,  0x12,  0x14,  0x1d,  0x01,  0x08,  0x14,  0x00,  0x01,  0x08,  0x14,
+  0x00,  0x01,  0x08,  0x14,  0x00,  0x01,  0x08,  0xfe,  0x99,  0xa4,  0x01,  0x08,  0x14,  0x00,  0x05,  0xfe,
+  0xc6,  0x09,  0x01,  0x76,  0x06,  0x12,  0xfe,  0x3a,  0x12,  0x01,  0x0c,  0x06,  0x12,  0xfe,  0x30,  0x13,
+  0x14,  0xfe,  0x1b,  0x00,  0x01,  0x08,  0x14,  0x00,  0x01,  0x08,  0x14,  0x00,  0x01,  0x08,  0x14,  0x00,
+  0x01,  0x08,  0x14,  0x07,  0x01,  0x08,  0x14,  0x00,  0x05,  0xef,  0x7c,  0x4a,  0x78,  0x4f,  0x0f,  0xfe,
+  0x9a,  0x81,  0x04,  0xfe,  0x9a,  0x83,  0xfe,  0xcb,  0x47,  0x0b,  0x0e,  0x2d,  0x28,  0x48,  0xfe,  0x6c,
+  0x08,  0x0a,  0x28,  0xfe,  0x09,  0x6f,  0xca,  0xfe,  0xca,  0x45,  0xfe,  0x32,  0x12,  0x53,  0x63,  0x4e,
+  0x7c,  0x97,  0x2f,  0xfe,  0x7e,  0x08,  0x2a,  0x3c,  0xfe,  0x0a,  0xf0,  0xfe,  0x6c,  0x08,  0xaf,  0xa0,
+  0xae,  0xfe,  0x96,  0x08,  0x05,  0x29,  0x01,  0x41,  0x05,  0xed,  0x14,  0x24,  0x05,  0xed,  0xfe,  0x9c,
+  0xf7,  0x9f,  0x01,  0xfe,  0xae,  0x1e,  0xfe,  0x18,  0x58,  0x01,  0xfe,  0xbe,  0x1e,  0xfe,  0x99,  0x58,
+  0xfe,  0x78,  0x18,  0xfe,  0xf9,  0x18,  0x8e,  0xfe,  0x16,  0x09,  0x10,  0x6a,  0x22,  0x6b,  0x01,  0x0c,
+  0x61,  0x54,  0x44,  0x21,  0x2c,  0x09,  0x1a,  0xf8,  0x77,  0x01,  0xfe,  0x7e,  0x1e,  0x47,  0x2c,  0x7a,
+  0x30,  0xf0,  0xfe,  0x83,  0xe7,  0xfe,  0x3f,  0x00,  0x71,  0xfe,  0x03,  0x40,  0x01,  0x0c,  0x61,  0x65,
+  0x44,  0x01,  0xc2,  0xc8,  0xfe,  0x1f,  0x40,  0x20,  0x6e,  0x01,  0xfe,  0x6a,  0x16,  0xfe,  0x08,  0x50,
+  0xfe,  0x8a,  0x50,  0xfe,  0x44,  0x51,  0xfe,  0xc6,  0x51,  0xfe,  0x10,  0x10,  0x01,  0xfe,  0xce,  0x1e,
+  0x01,  0xfe,  0xde,  0x1e,  0x10,  0x68,  0x22,  0x69,  0x01,  0xfe,  0xee,  0x1e,  0x01,  0xfe,  0xfe,  0x1e,
+  0xfe,  0x40,  0x50,  0xfe,  0xc2,  0x50,  0x10,  0x4b,  0x22,  0x4c,  0xfe,  0x8a,  0x10,  0x01,  0x0c,  0x06,
+  0x54,  0xfe,  0x50,  0x12,  0x01,  0xfe,  0xae,  0x1e,  0x01,  0xfe,  0xbe,  0x1e,  0x10,  0x6a,  0x22,  0x6b,
+  0x01,  0x0c,  0x06,  0x65,  0x4e,  0x01,  0xc2,  0x0f,  0xfe,  0x1f,  0x80,  0x04,  0xfe,  0x9f,  0x83,  0x33,
+  0x0b,  0x0e,  0x20,  0x6e,  0x0f,  0xfe,  0x44,  0x90,  0x04,  0xfe,  0xc4,  0x93,  0x3a,  0x0b,  0xfe,  0xc6,
+  0x90,  0x04,  0xfe,  0xc6,  0x93,  0x79,  0x0b,  0x0e,  0x10,  0x6c,  0x22,  0x6d,  0x01,  0xfe,  0xce,  0x1e,
+  0x01,  0xfe,  0xde,  0x1e,  0x10,  0x68,  0x22,  0x69,  0x0f,  0xfe,  0x40,  0x90,  0x04,  0xfe,  0xc0,  0x93,
+  0x3a,  0x0b,  0xfe,  0xc2,  0x90,  0x04,  0xfe,  0xc2,  0x93,  0x79,  0x0b,  0x0e,  0x10,  0x4b,  0x22,  0x4c,
+  0x10,  0x64,  0x22,  0x34,  0x01,  0x0c,  0x61,  0x24,  0x44,  0x37,  0x13,  0xfe,  0x4e,  0x11,  0x2f,  0xfe,
+  0xde,  0x09,  0xfe,  0x9e,  0xf0,  0xfe,  0xf2,  0x09,  0xfe,  0x01,  0x48,  0x1b,  0x3c,  0x37,  0x88,  0xf5,
+  0xd4,  0xfe,  0x1e,  0x0a,  0xd5,  0xfe,  0x42,  0x0a,  0xd2,  0xfe,  0x1e,  0x0a,  0xd3,  0xfe,  0x42,  0x0a,
+  0xae,  0xfe,  0x12,  0x0a,  0xfe,  0x06,  0xf0,  0xfe,  0x18,  0x0a,  0xaf,  0xa0,  0x05,  0x29,  0x01,  0x41,
+  0xfe,  0xc1,  0x10,  0x14,  0x24,  0xfe,  0xc1,  0x10,  0x01,  0x76,  0x06,  0x07,  0xfe,  0x14,  0x12,  0x01,
+  0x76,  0x06,  0x0d,  0x5d,  0x01,  0x0c,  0x06,  0x0d,  0xfe,  0x74,  0x12,  0xfe,  0x2e,  0x1c,  0x05,  0xfe,
+  0x1a,  0x0c,  0x01,  0x76,  0x06,  0x07,  0x5d,  0x01,  0x76,  0x06,  0x0d,  0x41,  0xfe,  0x2c,  0x1c,  0xfe,
+  0xaa,  0xf0,  0xfe,  0xce,  0x0a,  0xfe,  0xac,  0xf0,  0xfe,  0x66,  0x0a,  0xfe,  0x92,  0x10,  0xc4,  0xf6,
+  0xfe,  0xad,  0xf0,  0xfe,  0x72,  0x0a,  0x05,  0xfe,  0x1a,  0x0c,  0xc5,  0xfe,  0xe7,  0x10,  0xfe,  0x2b,
+  0xf0,  0xbf,  0xfe,  0x6b,  0x18,  0x23,  0xfe,  0x00,  0xfe,  0xfe,  0x1c,  0x12,  0xac,  0xfe,  0xd2,  0xf0,
+  0xbf,  0xfe,  0x76,  0x18,  0x23,  0x1d,  0x1b,  0xbf,  0x03,  0xe3,  0x23,  0x07,  0x1b,  0xbf,  0xd4,  0x5b,
+  0xd5,  0x5b,  0xd2,  0x5b,  0xd3,  0x5b,  0xc4,  0xc5,  0xfe,  0xa9,  0x10,  0x75,  0x5e,  0x32,  0x1f,  0x7f,
+  0x01,  0x42,  0x19,  0xfe,  0x35,  0x00,  0xfe,  0x01,  0xf0,  0x70,  0x19,  0x98,  0x05,  0x70,  0xfe,  0x74,
+  0x18,  0x23,  0xfe,  0x00,  0xf8,  0x1b,  0x5b,  0x7d,  0x12,  0x01,  0xfe,  0x78,  0x0f,  0x4d,  0x01,  0xfe,
+  0x96,  0x1a,  0x21,  0x30,  0x77,  0x7d,  0x1d,  0x05,  0x5b,  0x01,  0x0c,  0x06,  0x0d,  0x2b,  0xfe,  0xe2,
+  0x0b,  0x01,  0x0c,  0x06,  0x54,  0xfe,  0xa6,  0x12,  0x01,  0x0c,  0x06,  0x24,  0xfe,  0x88,  0x13,  0x21,
+  0x6e,  0xc7,  0x01,  0xfe,  0x1e,  0x1f,  0x0f,  0xfe,  0x83,  0x80,  0x04,  0xfe,  0x83,  0x83,  0xfe,  0xc9,
+  0x47,  0x0b,  0x0e,  0xfe,  0xc8,  0x44,  0xfe,  0x42,  0x13,  0x0f,  0xfe,  0x04,  0x91,  0x04,  0xfe,  0x84,
+  0x93,  0xfe,  0xca,  0x57,  0x0b,  0xfe,  0x86,  0x91,  0x04,  0xfe,  0x86,  0x93,  0xfe,  0xcb,  0x57,  0x0b,
+  0x0e,  0x7a,  0x30,  0xfe,  0x40,  0x59,  0xfe,  0xc1,  0x59,  0x8e,  0x40,  0x03,  0x6a,  0x3b,  0x6b,  0x10,
+  0x97,  0x22,  0x98,  0xd9,  0x6a,  0xda,  0x6b,  0x01,  0xc2,  0xc8,  0x7a,  0x30,  0x20,  0x6e,  0xdb,  0x64,
+  0xdc,  0x34,  0x91,  0x6c,  0x7e,  0x6d,  0xfe,  0x44,  0x55,  0xfe,  0xe5,  0x55,  0xfe,  0x04,  0xfa,  0x64,
+  0xfe,  0x05,  0xfa,  0x34,  0x01,  0xfe,  0x6a,  0x16,  0xa3,  0x26,  0x10,  0x97,  0x10,  0x98,  0x91,  0x6c,
+  0x7e,  0x6d,  0xfe,  0x14,  0x10,  0x01,  0x0c,  0x06,  0x24,  0x1b,  0x40,  0x91,  0x4b,  0x7e,  0x4c,  0x01,
+  0x0c,  0x06,  0xfe,  0xf7,  0x00,  0x44,  0x03,  0x68,  0x3b,  0x69,  0xfe,  0x10,  0x58,  0xfe,  0x91,  0x58,
+  0xfe,  0x14,  0x59,  0xfe,  0x95,  0x59,  0x05,  0x5b,  0x01,  0x0c,  0x06,  0x24,  0x1b,  0x40,  0x01,  0x0c,
+  0x06,  0xfe,  0xf7,  0x00,  0x44,  0x78,  0x01,  0xfe,  0x8e,  0x1e,  0x4f,  0x0f,  0xfe,  0x10,  0x90,  0x04,
+  0xfe,  0x90,  0x93,  0x3a,  0x0b,  0xfe,  0x92,  0x90,  0x04,  0xfe,  0x92,  0x93,  0x79,  0x0b,  0x0e,  0xfe,
+  0xbd,  0x10,  0x01,  0x43,  0x09,  0xbb,  0x1b,  0xfe,  0x6e,  0x0a,  0x15,  0xbb,  0x01,  0x0c,  0x06,  0x0d,
+  0xfe,  0x14,  0x13,  0x03,  0x4b,  0x3b,  0x4c,  0x8e,  0xfe,  0x6e,  0x0a,  0xfe,  0x0c,  0x58,  0xfe,  0x8d,
+  0x58,  0x05,  0x5b,  0x26,  0x3e,  0x0f,  0xfe,  0x19,  0x80,  0x04,  0xfe,  0x99,  0x83,  0x33,  0x0b,  0x0e,
+  0xfe,  0xe5,  0x10,  0x01,  0x0c,  0x06,  0x0d,  0xfe,  0x1a,  0x12,  0xfe,  0x6c,  0x19,  0xfe,  0x19,  0x41,
+  0xfe,  0x6b,  0x18,  0xac,  0xfe,  0xd1,  0xf0,  0xef,  0x1f,  0x92,  0x01,  0x42,  0x19,  0xfe,  0x44,  0x00,
+  0xfe,  0x90,  0x10,  0xfe,  0x6c,  0x19,  0xd9,  0x4b,  0xfe,  0xed,  0x19,  0xda,  0x4c,  0xfe,  0x0c,  0x51,
+  0xfe,  0x8e,  0x51,  0xfe,  0x6b,  0x18,  0x23,  0xfe,  0x00,  0xff,  0x31,  0xfe,  0x76,  0x10,  0xac,  0xfe,
+  0xd2,  0xf0,  0xfe,  0xba,  0x0c,  0xfe,  0x76,  0x18,  0x23,  0x1d,  0x5d,  0x03,  0xe3,  0x23,  0x07,  0xfe,
+  0x08,  0x13,  0x19,  0xfe,  0x16,  0x00,  0x05,  0x70,  0xfe,  0xd1,  0xf0,  0xfe,  0xcc,  0x0c,  0x1f,  0x92,
+  0x01,  0x42,  0x19,  0xfe,  0x17,  0x00,  0x5c,  0xfe,  0xce,  0xf0,  0xfe,  0xd2,  0x0c,  0xfe,  0x3e,  0x10,
+  0xfe,  0xcd,  0xf0,  0xfe,  0xde,  0x0c,  0x19,  0xfe,  0x22,  0x00,  0x05,  0x70,  0xfe,  0xcb,  0xf0,  0xfe,
+  0xea,  0x0c,  0x19,  0xfe,  0x24,  0x00,  0x05,  0x70,  0xfe,  0xd0,  0xf0,  0xfe,  0xf4,  0x0c,  0x19,  0x94,
+  0xfe,  0x1c,  0x10,  0xfe,  0xcf,  0xf0,  0xfe,  0xfe,  0x0c,  0x19,  0x4a,  0xf3,  0xfe,  0xcc,  0xf0,  0xef,
+  0x01,  0x76,  0x06,  0x24,  0x4d,  0x19,  0xfe,  0x12,  0x00,  0x37,  0x13,  0xfe,  0x4e,  0x11,  0x2f,  0xfe,
+  0x16,  0x0d,  0xfe,  0x9e,  0xf0,  0xfe,  0x2a,  0x0d,  0xfe,  0x01,  0x48,  0x1b,  0x3c,  0x37,  0x88,  0xf5,
+  0xd4,  0x29,  0xd5,  0x29,  0xd2,  0x29,  0xd3,  0x29,  0x37,  0xfe,  0x9c,  0x32,  0x2f,  0xfe,  0x3e,  0x0d,
+  0x2a,  0x3c,  0xae,  0xfe,  0x62,  0x0d,  0xaf,  0xa0,  0xd4,  0x9f,  0xd5,  0x9f,  0xd2,  0x9f,  0xd3,  0x9f,
+  0x05,  0x29,  0x01,  0x41,  0xfe,  0xd3,  0x10,  0x15,  0xfe,  0xe8,  0x00,  0xc4,  0xc5,  0x75,  0xd7,  0x99,
+  0xd8,  0x9c,  0xfe,  0x89,  0xf0,  0x29,  0x27,  0x25,  0xbe,  0xd7,  0x99,  0xd8,  0x9c,  0x2f,  0xfe,  0x8c,
+  0x0d,  0x16,  0x29,  0x27,  0x25,  0xbd,  0xfe,  0x01,  0x48,  0xa4,  0x19,  0xfe,  0x42,  0x00,  0x05,  0x70,
+  0x90,  0x07,  0xfe,  0x81,  0x49,  0x1b,  0xfe,  0x64,  0x0e,  0x01,  0x0c,  0x06,  0x0d,  0xfe,  0x44,  0x13,
+  0x19,  0x00,  0x2d,  0x0d,  0xfe,  0x54,  0x12,  0x2d,  0xfe,  0x28,  0x00,  0x2b,  0xfe,  0xda,  0x0e,  0x0a,
+  0x57,  0x01,  0x18,  0x09,  0x00,  0x36,  0x46,  0xfe,  0x28,  0x00,  0xfe,  0xfa,  0x10,  0x01,  0xfe,  0xf4,
+  0x1c,  0x01,  0xfe,  0x00,  0x1d,  0x0a,  0xba,  0x01,  0xfe,  0x58,  0x10,  0x40,  0x15,  0x56,  0x01,  0x85,
+  0x05,  0x35,  0x19,  0xfe,  0x44,  0x00,  0x2d,  0x0d,  0xf7,  0x46,  0x0d,  0xfe,  0xcc,  0x10,  0x01,  0xa7,
+  0x46,  0x0d,  0xfe,  0xc2,  0x10,  0x01,  0xa7,  0x0f,  0xfe,  0x19,  0x82,  0x04,  0xfe,  0x99,  0x83,  0xfe,
+  0xcc,  0x47,  0x0b,  0x0e,  0xfe,  0x34,  0x46,  0xa5,  0x46,  0x0d,  0x19,  0xfe,  0x43,  0x00,  0xfe,  0xa2,
+  0x10,  0x01,  0x0c,  0x61,  0x0d,  0x44,  0x01,  0xfe,  0xf4,  0x1c,  0x01,  0xfe,  0x00,  0x1d,  0x40,  0x15,
+  0x56,  0x01,  0x85,  0x7d,  0x0d,  0x40,  0x51,  0x01,  0xfe,  0x9e,  0x1e,  0x05,  0xfe,  0x3a,  0x03,  0x01,
+  0x0c,  0x06,  0x0d,  0x5d,  0x46,  0x0d,  0x19,  0x00,  0xfe,  0x62,  0x10,  0x01,  0x76,  0x06,  0x12,  0xfe,
+  0x5c,  0x12,  0x01,  0x0c,  0x06,  0x12,  0xfe,  0x52,  0x13,  0xfe,  0x1c,  0x1c,  0xfe,  0x9d,  0xf0,  0xfe,
+  0x8e,  0x0e,  0xfe,  0x1c,  0x1c,  0xfe,  0x9d,  0xf0,  0xfe,  0x94,  0x0e,  0x01,  0x0c,  0x61,  0x12,  0x44,
+  0xfe,  0x9f,  0x10,  0x19,  0xfe,  0x15,  0x00,  0xfe,  0x04,  0xe6,  0x0d,  0x4f,  0xfe,  0x2e,  0x10,  0x19,
+  0xfe,  0x13,  0x00,  0xfe,  0x10,  0x10,  0x19,  0xfe,  0x47,  0x00,  0xf1,  0x19,  0xfe,  0x41,  0x00,  0xa2,
+  0x19,  0xfe,  0x24,  0x00,  0x86,  0xc4,  0xc5,  0x75,  0x03,  0x81,  0x1e,  0x2b,  0xea,  0x4f,  0xfe,  0x04,
+  0xe6,  0x12,  0xfe,  0x9d,  0x41,  0xfe,  0x1c,  0x42,  0x40,  0x01,  0xf4,  0x05,  0x35,  0xfe,  0x12,  0x1c,
+  0x1f,  0x0d,  0x47,  0xb5,  0xc3,  0x1f,  0xfe,  0x31,  0x00,  0x47,  0xb8,  0x01,  0xfe,  0xd4,  0x11,  0x05,
+  0xe9,  0x51,  0xfe,  0x06,  0xec,  0xe0,  0xfe,  0x0e,  0x47,  0x46,  0x28,  0xfe,  0xce,  0x45,  0x31,  0x51,
+  0xfe,  0x06,  0xea,  0xe0,  0xfe,  0x47,  0x4b,  0x45,  0xfe,  0x75,  0x57,  0x03,  0x67,  0xfe,  0x98,  0x56,
+  0xfe,  0x38,  0x12,  0x0a,  0x5a,  0x01,  0x18,  0xfe,  0x44,  0x48,  0x60,  0x01,  0x0c,  0x06,  0x28,  0xfe,
+  0x18,  0x13,  0x0a,  0x57,  0x01,  0x18,  0x3e,  0xfe,  0x41,  0x58,  0x0a,  0xba,  0xfe,  0xfa,  0x14,  0xfe,
+  0x49,  0x54,  0xb0,  0xfe,  0x5e,  0x0f,  0x05,  0xfe,  0x3a,  0x03,  0x0a,  0x67,  0xfe,  0xe0,  0x14,  0xfe,
+  0x0e,  0x47,  0x46,  0x28,  0xfe,  0xce,  0x45,  0x31,  0x51,  0xfe,  0xce,  0x47,  0xfe,  0xad,  0x13,  0x05,
+  0x35,  0x21,  0x2c,  0x09,  0x1a,  0xfe,  0x98,  0x12,  0x26,  0x20,  0x96,  0x20,  0xe7,  0xfe,  0x08,  0x1c,
+  0xfe,  0x7c,  0x19,  0xfe,  0xfd,  0x19,  0xfe,  0x0a,  0x1c,  0x03,  0xe5,  0xfe,  0x48,  0x55,  0xa5,  0x3b,
+  0xfe,  0x62,  0x01,  0xfe,  0xc9,  0x55,  0x31,  0xfe,  0x74,  0x10,  0x01,  0xfe,  0xf0,  0x1a,  0x03,  0xfe,
+  0x38,  0x01,  0x3b,  0xfe,  0x3a,  0x01,  0x8e,  0xfe,  0x1e,  0x10,  0xfe,  0x02,  0xec,  0xe7,  0x53,  0x00,
+  0x36,  0xfe,  0x04,  0xec,  0x2c,  0x60,  0xfe,  0x05,  0xf6,  0xfe,  0x34,  0x01,  0x01,  0xfe,  0x62,  0x1b,
+  0x01,  0xfe,  0xce,  0x1e,  0xb2,  0x11,  0xfe,  0x18,  0x13,  0xca,  0xfe,  0x02,  0xea,  0xe7,  0x53,  0x92,
+  0xfe,  0xc3,  0x13,  0x1f,  0x12,  0x47,  0xb5,  0xc3,  0xfe,  0x2a,  0x10,  0x03,  0xfe,  0x38,  0x01,  0x23,
+  0xfe,  0xf0,  0xff,  0x10,  0xe5,  0x03,  0xfe,  0x3a,  0x01,  0x10,  0xfe,  0x62,  0x01,  0x01,  0xfe,  0x1e,
+  0x1e,  0x20,  0x2c,  0x15,  0x56,  0x01,  0xfe,  0x9e,  0x1e,  0x13,  0x07,  0x02,  0x26,  0x02,  0x21,  0x96,
+  0xc7,  0x20,  0x96,  0x09,  0x92,  0xfe,  0x79,  0x13,  0x1f,  0x1d,  0x47,  0xb5,  0xc3,  0xfe,  0xe1,  0x10,
+  0xcf,  0xfe,  0x03,  0xdc,  0xfe,  0x73,  0x57,  0xfe,  0x80,  0x5d,  0x02,  0xcf,  0xfe,  0x03,  0xdc,  0xfe,
+  0x5b,  0x57,  0xfe,  0x80,  0x5d,  0x02,  0xfe,  0x03,  0x57,  0xcf,  0x26,  0xfe,  0x00,  0xcc,  0x02,  0xfe,
+  0x03,  0x57,  0xcf,  0x89,  0x02,  0x01,  0x0c,  0x06,  0x4a,  0xfe,  0x4e,  0x13,  0x0f,  0xfe,  0x1c,  0x80,
+  0x04,  0xfe,  0x9c,  0x83,  0x33,  0x0b,  0x0e,  0x09,  0x07,  0xfe,  0x3a,  0x13,  0x0f,  0xfe,  0x1e,  0x80,
+  0x04,  0xfe,  0x9e,  0x83,  0x33,  0x0b,  0x0e,  0xfe,  0x2a,  0x13,  0x0f,  0xfe,  0x1d,  0x80,  0x04,  0xfe,
+  0x9d,  0x83,  0xfe,  0xf9,  0x13,  0x0e,  0xfe,  0x1c,  0x13,  0x01,  0xfe,  0xee,  0x1e,  0xac,  0xfe,  0x14,
+  0x13,  0x01,  0xfe,  0xfe,  0x1e,  0xfe,  0x81,  0x58,  0xfa,  0x01,  0xfe,  0x0e,  0x1f,  0xfe,  0x30,  0xf4,
+  0x0d,  0xfe,  0x3c,  0x50,  0xa2,  0x01,  0xfe,  0x92,  0x1b,  0x01,  0x43,  0x09,  0x56,  0xfb,  0x01,  0xfe,
+  0xc8,  0x1a,  0x01,  0x0c,  0x06,  0x28,  0xa4,  0x01,  0xfe,  0xf4,  0x1c,  0x01,  0xfe,  0x00,  0x1d,  0x15,
+  0xfe,  0xe9,  0x00,  0x01,  0x0c,  0x06,  0x4a,  0xfe,  0x4e,  0x13,  0x01,  0xfe,  0x22,  0x1b,  0xfe,  0x1e,
+  0x1c,  0x0f,  0xfe,  0x14,  0x90,  0x04,  0xfe,  0x94,  0x93,  0x3a,  0x0b,  0xfe,  0x96,  0x90,  0x04,  0xfe,
+  0x96,  0x93,  0x79,  0x0b,  0x0e,  0x10,  0xfe,  0x64,  0x01,  0x22,  0xfe,  0x66,  0x01,  0x01,  0x0c,  0x06,
+  0x65,  0xf9,  0x0f,  0xfe,  0x03,  0x80,  0x04,  0xfe,  0x83,  0x83,  0x33,  0x0b,  0x0e,  0x77,  0xfe,  0x01,
+  0xec,  0x2c,  0xfe,  0x80,  0x40,  0x20,  0x2c,  0x7a,  0x30,  0x15,  0xdf,  0x40,  0x21,  0x2c,  0xfe,  0x00,
+  0x40,  0x8d,  0x2c,  0x02,  0xfe,  0x08,  0x1c,  0x03,  0xfe,  0xac,  0x00,  0xfe,  0x06,  0x58,  0x03,  0xfe,
+  0xae,  0x00,  0xfe,  0x07,  0x58,  0x03,  0xfe,  0xb0,  0x00,  0xfe,  0x08,  0x58,  0x03,  0xfe,  0xb2,  0x00,
+  0xfe,  0x09,  0x58,  0xfe,  0x0a,  0x1c,  0x2e,  0x49,  0x20,  0xe0,  0x26,  0x10,  0x66,  0x10,  0x55,  0x10,
+  0x6f,  0x13,  0x57,  0x52,  0x4f,  0x1c,  0x28,  0xfe,  0x90,  0x4d,  0xfe,  0x91,  0x54,  0x2b,  0xfe,  0x88,
+  0x11,  0x46,  0x1a,  0x13,  0x5a,  0x52,  0x1c,  0x4a,  0xfe,  0x90,  0x4d,  0xfe,  0x91,  0x54,  0x2b,  0xfe,
+  0x9e,  0x11,  0x2e,  0x1a,  0x20,  0x2c,  0x90,  0x34,  0x60,  0x21,  0x2c,  0xfe,  0x00,  0x40,  0x8d,  0x2c,
+  0x15,  0xdf,  0xfe,  0x14,  0x56,  0xfe,  0xd6,  0xf0,  0xfe,  0xb2,  0x11,  0xfe,  0x12,  0x1c,  0x75,  0xfe,
+  0x14,  0x1c,  0xfe,  0x10,  0x1c,  0xfe,  0x18,  0x1c,  0x02,  0x51,  0xfe,  0x0c,  0x14,  0xfe,  0x0e,  0x47,
+  0xfe,  0x07,  0xe6,  0x28,  0xfe,  0xce,  0x47,  0xfe,  0xf5,  0x13,  0x02,  0x01,  0xa7,  0x90,  0x34,  0x60,
+  0xfe,  0x06,  0x80,  0xfe,  0x48,  0x47,  0xfe,  0x42,  0x13,  0xfe,  0x02,  0x80,  0x09,  0x56,  0xfe,  0x34,
+  0x13,  0x0a,  0x5a,  0x01,  0x18,  0xcb,  0xfe,  0x36,  0x12,  0xfe,  0x41,  0x48,  0xfe,  0x45,  0x48,  0x01,
+  0xfe,  0xb2,  0x16,  0xfe,  0x00,  0xcc,  0xcb,  0xfe,  0xf3,  0x13,  0x3f,  0x89,  0x09,  0x1a,  0xa5,  0x0a,
+  0x9d,  0x01,  0x18,  0xfe,  0x80,  0x5c,  0x01,  0x85,  0xf2,  0x09,  0x9b,  0xa4,  0xfe,  0x14,  0x56,  0xfe,
+  0xd6,  0xf0,  0xfe,  0xec,  0x11,  0x02,  0xfe,  0x44,  0x58,  0x77,  0xfe,  0x01,  0xec,  0xb8,  0xfe,  0x9e,
+  0x40,  0xfe,  0x9d,  0xe7,  0x00,  0xfe,  0x9c,  0xe7,  0x12,  0x8d,  0x30,  0x01,  0xf4,  0xfe,  0xdd,  0x10,
+  0x37,  0xd7,  0x99,  0xd8,  0x9c,  0x27,  0x25,  0xee,  0x09,  0x12,  0xfe,  0x48,  0x12,  0x09,  0x0d,  0xfe,
+  0x56,  0x12,  0x09,  0x1d,  0xfe,  0x30,  0x12,  0x09,  0xdd,  0x1b,  0xfe,  0xc4,  0x13,  0x09,  0xfe,  0x23,
+  0x00,  0x1b,  0xfe,  0xd0,  0x13,  0x09,  0x07,  0x1b,  0xfe,  0x34,  0x14,  0x09,  0x24,  0xfe,  0x12,  0x12,
+  0x09,  0x00,  0x1b,  0x29,  0x1f,  0xdd,  0x01,  0x42,  0xa1,  0x32,  0x01,  0x08,  0xae,  0x41,  0x02,  0x32,
+  0xfe,  0x62,  0x08,  0x0a,  0xe1,  0x01,  0xfe,  0x58,  0x10,  0x15,  0x9b,  0x05,  0x35,  0x32,  0x01,  0x43,
+  0x09,  0xbb,  0xfe,  0xd7,  0x13,  0x91,  0x4b,  0x7e,  0x4c,  0x8e,  0xfe,  0x80,  0x13,  0x01,  0x0c,  0x06,
+  0x54,  0xfe,  0x72,  0x12,  0xdb,  0x64,  0xdc,  0x34,  0xfe,  0x44,  0x55,  0xfe,  0xe5,  0x55,  0xb0,  0xfe,
+  0x4a,  0x13,  0x21,  0x6e,  0xfe,  0x26,  0x13,  0x03,  0x97,  0x3b,  0x98,  0x8e,  0xfe,  0xb6,  0x0e,  0x10,
+  0x6a,  0x22,  0x6b,  0x26,  0x10,  0x97,  0x10,  0x98,  0x01,  0xc2,  0x2e,  0x49,  0x88,  0x20,  0x6e,  0x01,
+  0xfe,  0x6a,  0x16,  0xdb,  0x64,  0xdc,  0x34,  0xfe,  0x04,  0x55,  0xfe,  0xa5,  0x55,  0xfe,  0x04,  0xfa,
+  0x64,  0xfe,  0x05,  0xfa,  0x34,  0xfe,  0x8f,  0x10,  0x03,  0x6c,  0x3b,  0x6d,  0xfe,  0x40,  0x56,  0xfe,
+  0xe1,  0x56,  0x10,  0x6c,  0x22,  0x6d,  0x71,  0xdb,  0x64,  0xdc,  0x34,  0xfe,  0x44,  0x55,  0xfe,  0xe5,
+  0x55,  0x03,  0x68,  0x3b,  0x69,  0xfe,  0x00,  0x56,  0xfe,  0xa1,  0x56,  0x10,  0x68,  0x22,  0x69,  0x01,
+  0x0c,  0x06,  0x54,  0xf9,  0x21,  0x6e,  0xfe,  0x1f,  0x40,  0x03,  0x6a,  0x3b,  0x6b,  0xfe,  0x2c,  0x50,
+  0xfe,  0xae,  0x50,  0x03,  0x6c,  0x3b,  0x6d,  0xfe,  0x44,  0x50,  0xfe,  0xc6,  0x50,  0x03,  0x68,  0x3b,
+  0x69,  0xfe,  0x08,  0x50,  0xfe,  0x8a,  0x50,  0x03,  0x4b,  0x3b,  0x4c,  0xfe,  0x40,  0x50,  0xfe,  0xc2,
+  0x50,  0x05,  0x73,  0x2e,  0x07,  0x20,  0x9e,  0x05,  0x72,  0x32,  0x01,  0x08,  0x16,  0x3d,  0x27,  0x25,
+  0xee,  0x09,  0x07,  0x2b,  0x3d,  0x01,  0x43,  0x09,  0xbb,  0x2b,  0x72,  0x01,  0xa6,  0x23,  0x3f,  0x1b,
+  0x3d,  0x01,  0x0c,  0x06,  0x0d,  0xfe,  0x1e,  0x13,  0x91,  0x4b,  0x7e,  0x4c,  0xfe,  0x0a,  0x55,  0x31,
+  0xfe,  0x8b,  0x55,  0xd9,  0x4b,  0xda,  0x4c,  0xfe,  0x0c,  0x51,  0xfe,  0x8e,  0x51,  0x05,  0x72,  0x01,
+  0xfe,  0x8e,  0x1e,  0xca,  0xfe,  0x19,  0x41,  0x05,  0x72,  0x32,  0x01,  0x08,  0x2a,  0x3c,  0x16,  0xc0,
+  0x27,  0x25,  0xbe,  0x2d,  0x1d,  0xc0,  0x2d,  0x0d,  0x83,  0x2d,  0x7f,  0x1b,  0xfe,  0x66,  0x15,  0x05,
+  0x3d,  0x01,  0x08,  0x2a,  0x3c,  0x16,  0xc0,  0x27,  0x25,  0xbd,  0x09,  0x1d,  0x2b,  0x3d,  0x01,  0x08,
+  0x16,  0xc0,  0x27,  0x25,  0xfe,  0xe8,  0x09,  0xfe,  0xc2,  0x49,  0x50,  0x03,  0xb6,  0x1e,  0x83,  0x01,
+  0x38,  0x06,  0x24,  0x31,  0xa1,  0xfe,  0xbb,  0x45,  0x2d,  0x00,  0xa4,  0x46,  0x07,  0x90,  0x3f,  0x01,
+  0xfe,  0xf8,  0x15,  0x01,  0xa6,  0x86,  0xfe,  0x4b,  0x45,  0xfe,  0x20,  0x13,  0x01,  0x43,  0x09,  0x82,
+  0xfe,  0x16,  0x13,  0x03,  0x9a,  0x1e,  0x5d,  0x03,  0x55,  0x1e,  0x31,  0x5e,  0x05,  0x72,  0xfe,  0xc0,
+  0x5d,  0x01,  0xa7,  0xfe,  0x03,  0x17,  0x03,  0x66,  0x8a,  0x10,  0x66,  0x5e,  0x32,  0x01,  0x08,  0x17,
+  0x73,  0x01,  0xfe,  0x56,  0x19,  0x05,  0x73,  0x01,  0x08,  0x2a,  0x3c,  0x16,  0x3d,  0x27,  0x25,  0xbd,
+  0x09,  0x07,  0x2b,  0x3d,  0x01,  0xfe,  0xbe,  0x16,  0xfe,  0x42,  0x58,  0xfe,  0xe8,  0x14,  0x01,  0xa6,
+  0x86,  0xfe,  0x4a,  0xf4,  0x0d,  0x1b,  0x3d,  0xfe,  0x4a,  0xf4,  0x07,  0xfe,  0x0e,  0x12,  0x01,  0x43,
+  0x09,  0x82,  0x4e,  0x05,  0x72,  0x03,  0x55,  0x8a,  0x10,  0x55,  0x5e,  0x32,  0x01,  0x08,  0x17,  0x73,
+  0x01,  0xfe,  0x84,  0x19,  0x05,  0x73,  0x01,  0x08,  0x2a,  0x3c,  0x16,  0x3d,  0x27,  0x25,  0xbd,  0x09,
+  0x12,  0x2b,  0x3d,  0x01,  0xfe,  0xe8,  0x17,  0x8b,  0xfe,  0xaa,  0x14,  0xfe,  0xb6,  0x14,  0x86,  0xa8,
+  0xb2,  0x0d,  0x1b,  0x3d,  0xb2,  0x07,  0xfe,  0x0e,  0x12,  0x01,  0x43,  0x09,  0x82,  0x4e,  0x05,  0x72,
+  0x03,  0x6f,  0x8a,  0x10,  0x6f,  0x5e,  0x32,  0x01,  0x08,  0x17,  0x73,  0x01,  0xfe,  0xc0,  0x19,  0x05,
+  0x73,  0x13,  0x07,  0x2f,  0xfe,  0xcc,  0x15,  0x17,  0xfe,  0xe2,  0x15,  0x5f,  0xcc,  0x01,  0x08,  0x26,
+  0x5f,  0x02,  0x8f,  0xfe,  0xde,  0x15,  0x2a,  0xfe,  0xde,  0x15,  0x16,  0xfe,  0xcc,  0x15,  0x5e,  0x32,
+  0x01,  0x08,  0xfe,  0xd5,  0x10,  0x13,  0x58,  0xff,  0x02,  0x00,  0x57,  0x52,  0xad,  0x23,  0xfe,  0xff,
+  0x7f,  0xfe,  0x30,  0x56,  0xfe,  0x00,  0x5c,  0x02,  0x13,  0x58,  0xff,  0x02,  0x00,  0x57,  0x52,  0xad,
+  0x23,  0x3f,  0xfe,  0x30,  0x56,  0xfe,  0x00,  0x5c,  0x02,  0x13,  0x58,  0xff,  0x02,  0x00,  0x57,  0x52,
+  0xad,  0x02,  0x13,  0x58,  0xff,  0x02,  0x00,  0x57,  0x52,  0xfe,  0x00,  0x5e,  0x02,  0x13,  0x58,  0xff,
+  0x02,  0x00,  0x57,  0x52,  0xad,  0xfe,  0x0b,  0x58,  0x02,  0x0a,  0x66,  0x01,  0x5c,  0x0a,  0x55,  0x01,
+  0x5c,  0x0a,  0x6f,  0x01,  0x5c,  0x02,  0x01,  0xfe,  0x1e,  0x1f,  0x23,  0x1a,  0xff,  0x03,  0x00,  0x54,
+  0xfe,  0x00,  0xf4,  0x24,  0x52,  0x0f,  0xfe,  0x00,  0x7c,  0x04,  0xfe,  0x07,  0x7c,  0x3a,  0x0b,  0x0e,
+  0xfe,  0x00,  0x71,  0xfe,  0xf9,  0x18,  0xfe,  0x7a,  0x19,  0xfe,  0xfb,  0x19,  0xfe,  0x1a,  0xf7,  0x00,
+  0xfe,  0x1b,  0xf7,  0x00,  0x7a,  0x30,  0x10,  0x68,  0x22,  0x69,  0xd9,  0x6c,  0xda,  0x6d,  0x02,  0xfe,
+  0x62,  0x08,  0xfe,  0x82,  0x4a,  0xfe,  0xe1,  0x1a,  0xfe,  0x83,  0x5a,  0x77,  0x02,  0x01,  0xc6,  0xfe,
+  0x42,  0x48,  0x4f,  0x50,  0x45,  0x01,  0x08,  0x16,  0xfe,  0xe0,  0x17,  0x27,  0x25,  0xbe,  0x01,  0x08,
+  0x16,  0xfe,  0xe0,  0x17,  0x27,  0x25,  0xfe,  0xe8,  0x0a,  0xfe,  0xc1,  0x59,  0x03,  0x9a,  0x1e,  0xfe,
+  0xda,  0x12,  0x01,  0x38,  0x06,  0x12,  0xfe,  0xd0,  0x13,  0x26,  0x53,  0x12,  0x48,  0xfe,  0x08,  0x17,
+  0xd1,  0x12,  0x53,  0x12,  0xfe,  0x1e,  0x13,  0x2d,  0xb4,  0x7b,  0xfe,  0x26,  0x17,  0x4d,  0x13,  0x07,
+  0x1c,  0xb4,  0x90,  0x04,  0xfe,  0x78,  0x10,  0xff,  0x02,  0x83,  0x55,  0xf1,  0xff,  0x02,  0x83,  0x55,
+  0x53,  0x1d,  0xfe,  0x12,  0x13,  0xd6,  0xfe,  0x30,  0x00,  0xb0,  0xfe,  0x80,  0x17,  0x1c,  0x63,  0x13,
+  0x07,  0xfe,  0x56,  0x10,  0x53,  0x0d,  0xfe,  0x16,  0x13,  0xd6,  0xfe,  0x64,  0x00,  0xb0,  0xfe,  0x80,
+  0x17,  0x0a,  0xfe,  0x64,  0x00,  0x1c,  0x94,  0x13,  0x07,  0xfe,  0x28,  0x10,  0x53,  0x07,  0xfe,  0x60,
+  0x13,  0xd6,  0xfe,  0xc8,  0x00,  0xb0,  0xfe,  0x80,  0x17,  0x0a,  0xfe,  0xc8,  0x00,  0x1c,  0x95,  0x13,
+  0x07,  0x71,  0xd6,  0xfe,  0x90,  0x01,  0x48,  0xfe,  0x8c,  0x17,  0x45,  0xf3,  0xfe,  0x43,  0xf4,  0x96,
+  0xfe,  0x56,  0xf0,  0xfe,  0x9e,  0x17,  0xfe,  0x04,  0xf4,  0x58,  0xfe,  0x43,  0xf4,  0x94,  0xf6,  0x8b,
+  0x01,  0xfe,  0x24,  0x16,  0x23,  0x3f,  0xfc,  0xa8,  0x8c,  0x49,  0x48,  0xfe,  0xda,  0x17,  0x62,  0x49,
+  0xfe,  0x1c,  0x10,  0xa8,  0x8c,  0x80,  0x48,  0xfe,  0xda,  0x17,  0x62,  0x80,  0x71,  0x50,  0x26,  0xfe,
+  0x4d,  0xf4,  0x00,  0xf7,  0x45,  0x13,  0x07,  0xfe,  0xb4,  0x56,  0xfe,  0xc3,  0x58,  0x02,  0x50,  0x13,
+  0x0d,  0x02,  0x50,  0x3e,  0x78,  0x4f,  0x45,  0x01,  0x08,  0x16,  0xa9,  0x27,  0x25,  0xbe,  0xfe,  0x03,
+  0xea,  0xfe,  0x7e,  0x01,  0x01,  0x08,  0x16,  0xa9,  0x27,  0x25,  0xfe,  0xe9,  0x0a,  0x01,  0x08,  0x16,
+  0xa9,  0x27,  0x25,  0xfe,  0xe9,  0x0a,  0xfe,  0x05,  0xea,  0xfe,  0x7f,  0x01,  0x01,  0x08,  0x16,  0xa9,
+  0x27,  0x25,  0xfe,  0x69,  0x09,  0xfe,  0x02,  0xea,  0xfe,  0x80,  0x01,  0x01,  0x08,  0x16,  0xa9,  0x27,
+  0x25,  0xfe,  0xe8,  0x08,  0x47,  0xfe,  0x81,  0x01,  0x03,  0xb6,  0x1e,  0x83,  0x01,  0x38,  0x06,  0x24,
+  0x31,  0xa2,  0x78,  0xf2,  0x53,  0x07,  0x36,  0xfe,  0x34,  0xf4,  0x3f,  0xa1,  0x78,  0x03,  0x9a,  0x1e,
+  0x83,  0x01,  0x38,  0x06,  0x12,  0x31,  0xf0,  0x4f,  0x45,  0xfe,  0x90,  0x10,  0xfe,  0x40,  0x5a,  0x23,
+  0x3f,  0xfb,  0x8c,  0x49,  0x48,  0xfe,  0xaa,  0x18,  0x62,  0x49,  0x71,  0x8c,  0x80,  0x48,  0xfe,  0xaa,
+  0x18,  0x62,  0x80,  0xfe,  0xb4,  0x56,  0xfe,  0x40,  0x5d,  0x01,  0xc6,  0x01,  0xfe,  0xac,  0x1d,  0xfe,
+  0x02,  0x17,  0xfe,  0xc8,  0x45,  0xfe,  0x5a,  0xf0,  0xfe,  0xc0,  0x18,  0xfe,  0x43,  0x48,  0x2d,  0x93,
+  0x36,  0xfe,  0x34,  0xf4,  0xfe,  0x00,  0x11,  0xfe,  0x40,  0x10,  0x2d,  0xb4,  0x36,  0xfe,  0x34,  0xf4,
+  0x04,  0xfe,  0x34,  0x10,  0x2d,  0xfe,  0x0b,  0x00,  0x36,  0x46,  0x63,  0xfe,  0x28,  0x10,  0xfe,  0xc0,
+  0x49,  0xff,  0x02,  0x00,  0x54,  0xb2,  0xfe,  0x90,  0x01,  0x48,  0xfe,  0xfa,  0x18,  0x45,  0xfe,  0x1c,
+  0xf4,  0x3f,  0xf3,  0xfe,  0x40,  0xf4,  0x96,  0xfe,  0x56,  0xf0,  0xfe,  0x0c,  0x19,  0xfe,  0x04,  0xf4,
+  0x58,  0xfe,  0x40,  0xf4,  0x94,  0xf6,  0x3e,  0x2d,  0x93,  0x4e,  0xd0,  0x0d,  0x21,  0xfe,  0x7f,  0x01,
+  0xfe,  0xc8,  0x46,  0xfe,  0x24,  0x13,  0x8c,  0x00,  0x5d,  0x26,  0x21,  0xfe,  0x7e,  0x01,  0xfe,  0xc8,
+  0x45,  0xfe,  0x14,  0x13,  0x21,  0xfe,  0x80,  0x01,  0xfe,  0x48,  0x45,  0xfa,  0x21,  0xfe,  0x81,  0x01,
+  0xfe,  0xc8,  0x44,  0x4e,  0x26,  0x02,  0x13,  0x07,  0x02,  0x78,  0x45,  0x50,  0x13,  0x0d,  0x02,  0x14,
+  0x07,  0x01,  0x08,  0x17,  0xfe,  0x82,  0x19,  0x14,  0x0d,  0x01,  0x08,  0x17,  0xfe,  0x82,  0x19,  0x14,
+  0x1d,  0x01,  0x08,  0x17,  0xfe,  0x82,  0x19,  0x5f,  0xfe,  0x89,  0x49,  0x01,  0x08,  0x02,  0x14,  0x07,
+  0x01,  0x08,  0x17,  0xc1,  0x14,  0x1d,  0x01,  0x08,  0x17,  0xc1,  0x14,  0x07,  0x01,  0x08,  0x17,  0xc1,
+  0xfe,  0x89,  0x49,  0x01,  0x08,  0x17,  0xc1,  0x5f,  0xfe,  0x89,  0x4a,  0x01,  0x08,  0x02,  0x50,  0x02,
+  0x14,  0x07,  0x01,  0x08,  0x17,  0x74,  0x14,  0x7f,  0x01,  0x08,  0x17,  0x74,  0x14,  0x12,  0x01,  0x08,
+  0x17,  0x74,  0xfe,  0x89,  0x49,  0x01,  0x08,  0x17,  0x74,  0x14,  0x00,  0x01,  0x08,  0x17,  0x74,  0xfe,
+  0x89,  0x4a,  0x01,  0x08,  0x17,  0x74,  0xfe,  0x09,  0x49,  0x01,  0x08,  0x17,  0x74,  0x5f,  0xcc,  0x01,
+  0x08,  0x02,  0x21,  0xe4,  0x09,  0x07,  0xfe,  0x4c,  0x13,  0xc8,  0x20,  0xe4,  0xfe,  0x49,  0xf4,  0x00,
+  0x4d,  0x5f,  0xa1,  0x5e,  0xfe,  0x01,  0xec,  0xfe,  0x27,  0x01,  0xcc,  0xff,  0x02,  0x00,  0x10,  0x2f,
+  0xfe,  0x3e,  0x1a,  0x01,  0x43,  0x09,  0xfe,  0xe3,  0x00,  0xfe,  0x22,  0x13,  0x16,  0xfe,  0x64,  0x1a,
+  0x26,  0x20,  0x9e,  0x01,  0x41,  0x21,  0x9e,  0x09,  0x07,  0x5d,  0x01,  0x0c,  0x61,  0x07,  0x44,  0x02,
+  0x0a,  0x5a,  0x01,  0x18,  0xfe,  0x00,  0x40,  0xaa,  0x09,  0x1a,  0xfe,  0x12,  0x13,  0x0a,  0x9d,  0x01,
+  0x18,  0xaa,  0x0a,  0x67,  0x01,  0xa3,  0x02,  0x0a,  0x9d,  0x01,  0x18,  0xaa,  0xfe,  0x80,  0xe7,  0x1a,
+  0x09,  0x1a,  0x5d,  0xfe,  0x45,  0x58,  0x01,  0xfe,  0xb2,  0x16,  0xaa,  0x02,  0x0a,  0x5a,  0x01,  0x18,
+  0xaa,  0x0a,  0x67,  0x01,  0xa3,  0x02,  0x0a,  0x5a,  0x01,  0x18,  0x01,  0xfe,  0x7e,  0x1e,  0xfe,  0x80,
+  0x4c,  0xfe,  0x49,  0xe4,  0x1a,  0xfe,  0x12,  0x13,  0x0a,  0x9d,  0x01,  0x18,  0xfe,  0x80,  0x4c,  0x0a,
+  0x67,  0x01,  0x5c,  0x02,  0x1c,  0x1a,  0x87,  0x7c,  0xe5,  0xfe,  0x18,  0xdf,  0xfe,  0x19,  0xde,  0xfe,
+  0x24,  0x1c,  0xfe,  0x1d,  0xf7,  0x28,  0xb1,  0xfe,  0x04,  0x1b,  0x01,  0xfe,  0x2a,  0x1c,  0xfa,  0xb3,
+  0x28,  0x7c,  0xfe,  0x2c,  0x01,  0xfe,  0x2f,  0x19,  0x02,  0xc9,  0x2b,  0xfe,  0xf4,  0x1a,  0xfe,  0xfa,
+  0x10,  0x1c,  0x1a,  0x87,  0x03,  0xfe,  0x64,  0x01,  0xfe,  0x00,  0xf4,  0x24,  0xfe,  0x18,  0x58,  0x03,
+  0xfe,  0x66,  0x01,  0xfe,  0x19,  0x58,  0xb3,  0x24,  0x01,  0xfe,  0x0e,  0x1f,  0xfe,  0x30,  0xf4,  0x07,
+  0xfe,  0x3c,  0x50,  0x7c,  0xfe,  0x38,  0x00,  0xfe,  0x0f,  0x79,  0xfe,  0x1c,  0xf7,  0x24,  0xb1,  0xfe,
+  0x50,  0x1b,  0xfe,  0xd4,  0x14,  0x31,  0x02,  0xc9,  0x2b,  0xfe,  0x26,  0x1b,  0xfe,  0xba,  0x10,  0x1c,
+  0x1a,  0x87,  0xfe,  0x83,  0x5a,  0xfe,  0x18,  0xdf,  0xfe,  0x19,  0xde,  0xfe,  0x1d,  0xf7,  0x54,  0xb1,
+  0xfe,  0x72,  0x1b,  0xfe,  0xb2,  0x14,  0xfc,  0xb3,  0x54,  0x7c,  0x12,  0xfe,  0xaf,  0x19,  0xfe,  0x98,
+  0xe7,  0x00,  0x02,  0xc9,  0x2b,  0xfe,  0x66,  0x1b,  0xfe,  0x8a,  0x10,  0x1c,  0x1a,  0x87,  0x8b,  0x0f,
+  0xfe,  0x30,  0x90,  0x04,  0xfe,  0xb0,  0x93,  0x3a,  0x0b,  0xfe,  0x18,  0x58,  0xfe,  0x32,  0x90,  0x04,
+  0xfe,  0xb2,  0x93,  0x3a,  0x0b,  0xfe,  0x19,  0x58,  0x0e,  0xa8,  0xb3,  0x4a,  0x7c,  0x12,  0xfe,  0x0f,
+  0x79,  0xfe,  0x1c,  0xf7,  0x4a,  0xb1,  0xfe,  0xc6,  0x1b,  0xfe,  0x5e,  0x14,  0x31,  0x02,  0xc9,  0x2b,
+  0xfe,  0x96,  0x1b,  0x5c,  0xfe,  0x02,  0xf6,  0x1a,  0x87,  0xfe,  0x18,  0xfe,  0x6a,  0xfe,  0x19,  0xfe,
+  0x6b,  0x01,  0xfe,  0x1e,  0x1f,  0xfe,  0x1d,  0xf7,  0x65,  0xb1,  0xfe,  0xee,  0x1b,  0xfe,  0x36,  0x14,
+  0xfe,  0x1c,  0x13,  0xb3,  0x65,  0x3e,  0xfe,  0x83,  0x58,  0xfe,  0xaf,  0x19,  0xfe,  0x80,  0xe7,  0x1a,
+  0xfe,  0x81,  0xe7,  0x1a,  0x15,  0xfe,  0xdd,  0x00,  0x7a,  0x30,  0x02,  0x7a,  0x30,  0xfe,  0x12,  0x45,
+  0x2b,  0xfe,  0xdc,  0x1b,  0x1f,  0x07,  0x47,  0xb5,  0xc3,  0x05,  0x35,  0xfe,  0x39,  0xf0,  0x75,  0x26,
+  0x02,  0xfe,  0x7e,  0x18,  0x23,  0x1d,  0x36,  0x13,  0x11,  0x02,  0x87,  0x03,  0xe3,  0x23,  0x07,  0xfe,
+  0xef,  0x12,  0xfe,  0xe1,  0x10,  0x90,  0x34,  0x60,  0xfe,  0x02,  0x80,  0x09,  0x56,  0xfe,  0x3c,  0x13,
+  0xfe,  0x82,  0x14,  0xfe,  0x42,  0x13,  0x51,  0xfe,  0x06,  0x83,  0x0a,  0x5a,  0x01,  0x18,  0xcb,  0xfe,
+  0x3e,  0x12,  0xfe,  0x41,  0x48,  0xfe,  0x45,  0x48,  0x01,  0xfe,  0xb2,  0x16,  0xfe,  0x00,  0xcc,  0xcb,
+  0xfe,  0xf3,  0x13,  0x3f,  0x89,  0x09,  0x1a,  0xa5,  0x0a,  0x9d,  0x01,  0x18,  0xfe,  0x80,  0x4c,  0x01,
+  0x85,  0xfe,  0x16,  0x10,  0x09,  0x9b,  0x4e,  0xfe,  0x40,  0x14,  0xfe,  0x24,  0x12,  0xfe,  0x14,  0x56,
+  0xfe,  0xd6,  0xf0,  0xfe,  0x52,  0x1c,  0x1c,  0x0d,  0x02,  0xfe,  0x9c,  0xe7,  0x0d,  0x19,  0xfe,  0x15,
+  0x00,  0x40,  0x8d,  0x30,  0x01,  0xf4,  0x1c,  0x07,  0x02,  0x51,  0xfe,  0x06,  0x83,  0xfe,  0x18,  0x80,
+  0x61,  0x28,  0x44,  0x15,  0x56,  0x01,  0x85,  0x1c,  0x07,  0x02,  0xfe,  0x38,  0x90,  0xfe,  0xba,  0x90,
+  0x91,  0xde,  0x7e,  0xdf,  0xfe,  0x48,  0x55,  0x31,  0xfe,  0xc9,  0x55,  0x02,  0x21,  0xb9,  0x88,  0x20,
+  0xb9,  0x02,  0x0a,  0xba,  0x01,  0x18,  0xfe,  0x41,  0x48,  0x0a,  0x57,  0x01,  0x18,  0xfe,  0x49,  0x44,
+  0x1b,  0xfe,  0x1e,  0x1d,  0x88,  0x89,  0x02,  0x0a,  0x5a,  0x01,  0x18,  0x09,  0x1a,  0xa4,  0x0a,  0x67,
+  0x01,  0xa3,  0x0a,  0x57,  0x01,  0x18,  0x88,  0x89,  0x02,  0xfe,  0x4e,  0xe4,  0x1d,  0x7b,  0xfe,  0x52,
+  0x1d,  0x03,  0xfe,  0x90,  0x00,  0xfe,  0x3a,  0x45,  0xfe,  0x2c,  0x10,  0xfe,  0x4e,  0xe4,  0xdd,  0x7b,
+  0xfe,  0x64,  0x1d,  0x03,  0xfe,  0x92,  0x00,  0xd1,  0x12,  0xfe,  0x1a,  0x10,  0xfe,  0x4e,  0xe4,  0xfe,
+  0x0b,  0x00,  0x7b,  0xfe,  0x76,  0x1d,  0x03,  0xfe,  0x94,  0x00,  0xd1,  0x24,  0xfe,  0x08,  0x10,  0x03,
+  0xfe,  0x96,  0x00,  0xd1,  0x63,  0xfe,  0x4e,  0x45,  0x83,  0xca,  0xff,  0x04,  0x68,  0x54,  0xfe,  0xf1,
+  0x10,  0x23,  0x49,  0xfe,  0x08,  0x1c,  0xfe,  0x67,  0x19,  0xfe,  0x0a,  0x1c,  0xfe,  0x1a,  0xf4,  0xfe,
+  0x00,  0x04,  0x83,  0xb2,  0x1d,  0x48,  0xfe,  0xaa,  0x1d,  0x13,  0x1d,  0x02,  0x09,  0x92,  0xfe,  0x5a,
+  0xf0,  0xfe,  0xba,  0x1d,  0x2e,  0x93,  0xfe,  0x34,  0x10,  0x09,  0x12,  0xfe,  0x5a,  0xf0,  0xfe,  0xc8,
+  0x1d,  0x2e,  0xb4,  0xfe,  0x26,  0x10,  0x09,  0x1d,  0x36,  0x2e,  0x63,  0xfe,  0x1a,  0x10,  0x09,  0x0d,
+  0x36,  0x2e,  0x94,  0xf2,  0x09,  0x07,  0x36,  0x2e,  0x95,  0xa1,  0xc8,  0x02,  0x1f,  0x93,  0x01,  0x42,
+  0xfe,  0x04,  0xfe,  0x99,  0x03,  0x9c,  0x8b,  0x02,  0x2a,  0xfe,  0x1c,  0x1e,  0xfe,  0x14,  0xf0,  0x08,
+  0x2f,  0xfe,  0x0c,  0x1e,  0x2a,  0xfe,  0x1c,  0x1e,  0x8f,  0xfe,  0x1c,  0x1e,  0xfe,  0x82,  0xf0,  0xfe,
+  0x10,  0x1e,  0x02,  0x0f,  0x3f,  0x04,  0xfe,  0x80,  0x83,  0x33,  0x0b,  0x0e,  0x02,  0x0f,  0xfe,  0x18,
+  0x80,  0x04,  0xfe,  0x98,  0x83,  0x33,  0x0b,  0x0e,  0x02,  0x0f,  0xfe,  0x02,  0x80,  0x04,  0xfe,  0x82,
+  0x83,  0x33,  0x0b,  0x0e,  0x02,  0x0f,  0xfe,  0x06,  0x80,  0x04,  0xfe,  0x86,  0x83,  0x33,  0x0b,  0x0e,
+  0x02,  0x0f,  0xfe,  0x1b,  0x80,  0x04,  0xfe,  0x9b,  0x83,  0x33,  0x0b,  0x0e,  0x02,  0x0f,  0xfe,  0x04,
+  0x80,  0x04,  0xfe,  0x84,  0x83,  0x33,  0x0b,  0x0e,  0x02,  0x0f,  0xfe,  0x80,  0x80,  0x04,  0xfe,  0x80,
+  0x83,  0xfe,  0xc9,  0x47,  0x0b,  0x0e,  0x02,  0x0f,  0xfe,  0x19,  0x81,  0x04,  0xfe,  0x99,  0x83,  0xfe,
+  0xca,  0x47,  0x0b,  0x0e,  0x02,  0x0f,  0xfe,  0x06,  0x83,  0x04,  0xfe,  0x86,  0x83,  0xfe,  0xce,  0x47,
+  0x0b,  0x0e,  0x02,  0x0f,  0xfe,  0x2c,  0x90,  0x04,  0xfe,  0xac,  0x93,  0x3a,  0x0b,  0x0e,  0x02,  0x0f,
+  0xfe,  0xae,  0x90,  0x04,  0xfe,  0xae,  0x93,  0x79,  0x0b,  0x0e,  0x02,  0x0f,  0xfe,  0x08,  0x90,  0x04,
+  0xfe,  0x88,  0x93,  0x3a,  0x0b,  0x0e,  0x02,  0x0f,  0xfe,  0x8a,  0x90,  0x04,  0xfe,  0x8a,  0x93,  0x79,
+  0x0b,  0x0e,  0x02,  0x0f,  0xfe,  0x0c,  0x90,  0x04,  0xfe,  0x8c,  0x93,  0x3a,  0x0b,  0x0e,  0x02,  0x0f,
+  0xfe,  0x8e,  0x90,  0x04,  0xfe,  0x8e,  0x93,  0x79,  0x0b,  0x0e,  0x02,  0x0f,  0xfe,  0x3c,  0x90,  0x04,
+  0xfe,  0xbc,  0x93,  0x3a,  0x0b,  0x0e,  0x02,  0x8b,  0x0f,  0xfe,  0x03,  0x80,  0x04,  0xfe,  0x83,  0x83,
+  0x33,  0x0b,  0x77,  0x0e,  0xa8,  0x02,  0xff,  0x66,  0x00,  0x00,
+};
+
+STATIC unsigned short _adv_asc38C1600_size =
+        sizeof(_adv_asc38C1600_buf); /* 0x1673 */
+STATIC ADV_DCNT _adv_asc38C1600_chksum =
+        0x0604EF77UL; /* Expanded little-endian checksum. */
 
 /* a_init.c */
 /*
@@ -15455,6 +14573,14 @@
  * configuration. The BIOS now uses this structure when it is built.
  * Additional structure information can be found in a_condor.h where
  * the structure is defined.
+ *
+ * The *_Field_IsChar structs are needed to correct for endianness.
+ * These values are read from the board 16 bits at a time directly
+ * into the structs. Because some fields are char, the values will be
+ * in the wrong order. The *_Field_IsChar tells when to flip the
+ * bytes. Data read and written to PCI memory is automatically swapped
+ * on big-endian platforms so char fields read as words are actually being
+ * unswapped on big-endian platforms.
  */
 STATIC ADVEEP_3550_CONFIG
 Default_3550_EEPROM_Config ASC_INITDATA = {
@@ -15494,6 +14620,44 @@
     0                           /* num_of_err */
 };
 
+STATIC ADVEEP_3550_CONFIG
+ADVEEP_3550_Config_Field_IsChar ASC_INITDATA = {
+    0,                          /* cfg_lsw */
+    0,                          /* cfg_msw */
+    0,                          /* -disc_enable */
+    0,                          /* wdtr_able */
+    0,                          /* sdtr_able */
+    0,                          /* start_motor */
+    0,                          /* tagqng_able */
+    0,                          /* bios_scan */
+    0,                          /* scam_tolerant */
+    1,                          /* adapter_scsi_id */
+    1,                          /* bios_boot_delay */
+    1,                          /* scsi_reset_delay */
+    1,                          /* bios_id_lun */
+    1,                          /* termination */
+    1,                          /* reserved1 */
+    0,                          /* bios_ctrl */
+    0,                          /* ultra_able */
+    0,                          /* reserved2 */
+    1,                          /* max_host_qng */
+    1,                          /* max_dvc_qng */
+    0,                          /* dvc_cntl */
+    0,                          /* bug_fix */
+    0,                          /* serial_number_word1 */
+    0,                          /* serial_number_word2 */
+    0,                          /* serial_number_word3 */
+    0,                          /* check_sum */
+    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 }, /* oem_name[16] */
+    0,                          /* dvc_err_code */
+    0,                          /* adv_err_code */
+    0,                          /* adv_err_addr */
+    0,                          /* saved_dvc_err_code */
+    0,                          /* saved_adv_err_code */
+    0,                          /* saved_adv_err_addr */
+    0                           /* num_of_err */
+};
+
 STATIC ADVEEP_38C0800_CONFIG
 Default_38C0800_EEPROM_Config ASC_INITDATA = {
     ADV_EEPROM_BIOS_ENABLE,     /* 00 cfg_lsw */
@@ -15559,6 +14723,201 @@
     0                           /* 63 reserved */
 };
 
+STATIC ADVEEP_38C0800_CONFIG
+ADVEEP_38C0800_Config_Field_IsChar ASC_INITDATA = {
+    0,                          /* 00 cfg_lsw */
+    0,                          /* 01 cfg_msw */
+    0,                          /* 02 disc_enable */
+    0,                          /* 03 wdtr_able */
+    0,                          /* 04 sdtr_speed1 */
+    0,                          /* 05 start_motor */
+    0,                          /* 06 tagqng_able */
+    0,                          /* 07 bios_scan */
+    0,                          /* 08 scam_tolerant */
+    1,                          /* 09 adapter_scsi_id */
+    1,                          /*    bios_boot_delay */
+    1,                          /* 10 scsi_reset_delay */
+    1,                          /*    bios_id_lun */
+    1,                          /* 11 termination_se */
+    1,                          /*    termination_lvd */
+    0,                          /* 12 bios_ctrl */
+    0,                          /* 13 sdtr_speed2 */
+    0,                          /* 14 sdtr_speed3 */
+    1,                          /* 15 max_host_qng */
+    1,                          /*    max_dvc_qng */
+    0,                          /* 16 dvc_cntl */
+    0,                          /* 17 sdtr_speed4 */
+    0,                          /* 18 serial_number_word1 */
+    0,                          /* 19 serial_number_word2 */
+    0,                          /* 20 serial_number_word3 */
+    0,                          /* 21 check_sum */
+    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 }, /* 22-29 oem_name[16] */
+    0,                          /* 30 dvc_err_code */
+    0,                          /* 31 adv_err_code */
+    0,                          /* 32 adv_err_addr */
+    0,                          /* 33 saved_dvc_err_code */
+    0,                          /* 34 saved_adv_err_code */
+    0,                          /* 35 saved_adv_err_addr */
+    0,                          /* 36 reserved */
+    0,                          /* 37 reserved */
+    0,                          /* 38 reserved */
+    0,                          /* 39 reserved */
+    0,                          /* 40 reserved */
+    0,                          /* 41 reserved */
+    0,                          /* 42 reserved */
+    0,                          /* 43 reserved */
+    0,                          /* 44 reserved */
+    0,                          /* 45 reserved */
+    0,                          /* 46 reserved */
+    0,                          /* 47 reserved */
+    0,                          /* 48 reserved */
+    0,                          /* 49 reserved */
+    0,                          /* 50 reserved */
+    0,                          /* 51 reserved */
+    0,                          /* 52 reserved */
+    0,                          /* 53 reserved */
+    0,                          /* 54 reserved */
+    0,                          /* 55 reserved */
+    0,                          /* 56 cisptr_lsw */
+    0,                          /* 57 cisprt_msw */
+    0,                          /* 58 subsysvid */
+    0,                          /* 59 subsysid */
+    0,                          /* 60 reserved */
+    0,                          /* 61 reserved */
+    0,                          /* 62 reserved */
+    0                           /* 63 reserved */
+};
+
+STATIC ADVEEP_38C1600_CONFIG
+Default_38C1600_EEPROM_Config ASC_INITDATA = {
+    ADV_EEPROM_BIOS_ENABLE,     /* 00 cfg_lsw */
+    0x0000,                     /* 01 cfg_msw */
+    0xFFFF,                     /* 02 disc_enable */
+    0xFFFF,                     /* 03 wdtr_able */
+    0x5555,                     /* 04 sdtr_speed1 */
+    0xFFFF,                     /* 05 start_motor */
+    0xFFFF,                     /* 06 tagqng_able */
+    0xFFFF,                     /* 07 bios_scan */
+    0,                          /* 08 scam_tolerant */
+    7,                          /* 09 adapter_scsi_id */
+    0,                          /*    bios_boot_delay */
+    3,                          /* 10 scsi_reset_delay */
+    0,                          /*    bios_id_lun */
+    0,                          /* 11 termination_se */
+    0,                          /*    termination_lvd */
+    0xFFE7,                     /* 12 bios_ctrl */
+    0x5555,                     /* 13 sdtr_speed2 */
+    0x5555,                     /* 14 sdtr_speed3 */
+    ASC_DEF_MAX_HOST_QNG,       /* 15 max_host_qng */
+    ASC_DEF_MAX_DVC_QNG,        /*    max_dvc_qng */
+    0,                          /* 16 dvc_cntl */
+    0x5555,                     /* 17 sdtr_speed4 */
+    0,                          /* 18 serial_number_word1 */
+    0,                          /* 19 serial_number_word2 */
+    0,                          /* 20 serial_number_word3 */
+    0,                          /* 21 check_sum */
+    { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }, /* 22-29 oem_name[16] */
+    0,                          /* 30 dvc_err_code */
+    0,                          /* 31 adv_err_code */
+    0,                          /* 32 adv_err_addr */
+    0,                          /* 33 saved_dvc_err_code */
+    0,                          /* 34 saved_adv_err_code */
+    0,                          /* 35 saved_adv_err_addr */
+    0,                          /* 36 reserved */
+    0,                          /* 37 reserved */
+    0,                          /* 38 reserved */
+    0,                          /* 39 reserved */
+    0,                          /* 40 reserved */
+    0,                          /* 41 reserved */
+    0,                          /* 42 reserved */
+    0,                          /* 43 reserved */
+    0,                          /* 44 reserved */
+    0,                          /* 45 reserved */
+    0,                          /* 46 reserved */
+    0,                          /* 47 reserved */
+    0,                          /* 48 reserved */
+    0,                          /* 49 reserved */
+    0,                          /* 50 reserved */
+    0,                          /* 51 reserved */
+    0,                          /* 52 reserved */
+    0,                          /* 53 reserved */
+    0,                          /* 54 reserved */
+    0,                          /* 55 reserved */
+    0,                          /* 56 cisptr_lsw */
+    0,                          /* 57 cisprt_msw */
+    ADV_PCI_VENDOR_ID,          /* 58 subsysvid */
+    ADV_PCI_DEVID_38C1600_REV1, /* 59 subsysid */
+    0,                          /* 60 reserved */
+    0,                          /* 61 reserved */
+    0,                          /* 62 reserved */
+    0                           /* 63 reserved */
+};
+
+STATIC ADVEEP_38C1600_CONFIG
+ADVEEP_38C1600_Config_Field_IsChar ASC_INITDATA = {
+    0,                          /* 00 cfg_lsw */
+    0,                          /* 01 cfg_msw */
+    0,                          /* 02 disc_enable */
+    0,                          /* 03 wdtr_able */
+    0,                          /* 04 sdtr_speed1 */
+    0,                          /* 05 start_motor */
+    0,                          /* 06 tagqng_able */
+    0,                          /* 07 bios_scan */
+    0,                          /* 08 scam_tolerant */
+    1,                          /* 09 adapter_scsi_id */
+    1,                          /*    bios_boot_delay */
+    1,                          /* 10 scsi_reset_delay */
+    1,                          /*    bios_id_lun */
+    1,                          /* 11 termination_se */
+    1,                          /*    termination_lvd */
+    0,                          /* 12 bios_ctrl */
+    0,                          /* 13 sdtr_speed2 */
+    0,                          /* 14 sdtr_speed3 */
+    1,                          /* 15 max_host_qng */
+    1,                          /*    max_dvc_qng */
+    0,                          /* 16 dvc_cntl */
+    0,                          /* 17 sdtr_speed4 */
+    0,                          /* 18 serial_number_word1 */
+    0,                          /* 19 serial_number_word2 */
+    0,                          /* 20 serial_number_word3 */
+    0,                          /* 21 check_sum */
+    { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 }, /* 22-29 oem_name[16] */
+    0,                          /* 30 dvc_err_code */
+    0,                          /* 31 adv_err_code */
+    0,                          /* 32 adv_err_addr */
+    0,                          /* 33 saved_dvc_err_code */
+    0,                          /* 34 saved_adv_err_code */
+    0,                          /* 35 saved_adv_err_addr */
+    0,                          /* 36 reserved */
+    0,                          /* 37 reserved */
+    0,                          /* 38 reserved */
+    0,                          /* 39 reserved */
+    0,                          /* 40 reserved */
+    0,                          /* 41 reserved */
+    0,                          /* 42 reserved */
+    0,                          /* 43 reserved */
+    0,                          /* 44 reserved */
+    0,                          /* 45 reserved */
+    0,                          /* 46 reserved */
+    0,                          /* 47 reserved */
+    0,                          /* 48 reserved */
+    0,                          /* 49 reserved */
+    0,                          /* 50 reserved */
+    0,                          /* 51 reserved */
+    0,                          /* 52 reserved */
+    0,                          /* 53 reserved */
+    0,                          /* 54 reserved */
+    0,                          /* 55 reserved */
+    0,                          /* 56 cisptr_lsw */
+    0,                          /* 57 cisprt_msw */
+    0,                          /* 58 subsysvid */
+    0,                          /* 59 subsysid */
+    0,                          /* 60 reserved */
+    0,                          /* 61 reserved */
+    0,                          /* 62 reserved */
+    0                           /* 63 reserved */
+};
+
 /*
  * Initialize the ADV_DVC_VAR structure.
  *
@@ -15639,11 +14998,11 @@
     asc_dvc->cfg->chip_version =
       AdvGetChipVersion(iop_base, asc_dvc->bus_type);
 
-    ASC_DBG2(1, "AdvInitGetConfig: iopb_chip_id_1: %x %x\n",
+    ASC_DBG2(1, "AdvInitGetConfig: iopb_chip_id_1: 0x%x 0x%x\n",
         (ushort) AdvReadByteRegister(iop_base, IOPB_CHIP_ID_1),
         (ushort) ADV_CHIP_ID_BYTE);
 
-    ASC_DBG2(1, "AdvInitGetConfig: iopw_chip_id_0: %x %x\n",
+    ASC_DBG2(1, "AdvInitGetConfig: iopw_chip_id_0: 0x%x 0x%x\n",
         (ushort) AdvReadWordRegister(iop_base, IOPW_CHIP_ID_0),
         (ushort) ADV_CHIP_ID_WORD);
 
@@ -15676,7 +15035,13 @@
         AdvWriteWordRegister(iop_base, IOPW_CTRL_REG,
             ADV_CTRL_REG_CMD_WR_IO_REG);
 
-        if (asc_dvc->chip_type == ADV_CHIP_ASC38C0800)
+        if (asc_dvc->chip_type == ADV_CHIP_ASC38C1600)
+        {
+            if ((status = AdvInitFrom38C1600EEP(asc_dvc)) == ADV_ERROR)
+            {
+                return ADV_ERROR;
+            }
+        } else if (asc_dvc->chip_type == ADV_CHIP_ASC38C0800)
         {
             if ((status = AdvInitFrom38C0800EEP(asc_dvc)) == ADV_ERROR)
             {
@@ -15702,6 +15067,8 @@
  *
  * For a non-fatal error return a warning code. If there are no warnings
  * then 0 is returned.
+ *
+ * Needed after initialization for error recovery.
  */
 STATIC int
 AdvInitAsc3550Driver(ADV_DVC_VAR *asc_dvc)
@@ -15814,22 +15181,662 @@
             {
                 AdvWriteWordAutoIncLram(iop_base, (((ushort)
                     _adv_asc3550_buf[i + 3] << 8) |
-                    _adv_asc3550_buf[i + 2]));
+                _adv_asc3550_buf[i + 2]));
                 word++;
             }
             i += 3;
         } else if (_adv_asc3550_buf[i] == 0xfe)
         {
             AdvWriteWordAutoIncLram(iop_base, (((ushort)
-                _adv_asc3550_buf[i + 2] << 8) |
-                _adv_asc3550_buf[i + 1]));
+                _adv_asc3550_buf[i + 2] << 8) |
+                _adv_asc3550_buf[i + 1]));
+            i += 2;
+            word++;
+        } else
+        {
+            AdvWriteWordAutoIncLram(iop_base, (((ushort)
+                _adv_asc3550_buf[(_adv_asc3550_buf[i] * 2) + 1] << 8) |
+                _adv_asc3550_buf[_adv_asc3550_buf[i] * 2]));
+            word++;
+        }
+    }
+
+    /*
+     * Set 'word' for later use to clear the rest of memory and save
+     * the expanded mcode size.
+     */
+    word *= 2;
+    adv_asc3550_expanded_size = word;
+
+    /*
+     * Clear the rest of ASC-3550 Internal RAM (8KB).
+     */
+    for (; word < ADV_3550_MEMSIZE; word += 2)
+    {
+        AdvWriteWordAutoIncLram(iop_base, 0);
+    }
+
+    /*
+     * Verify the microcode checksum.
+     */
+    sum = 0;
+    AdvWriteWordRegister(iop_base, IOPW_RAM_ADDR, 0);
+
+    for (word = 0; word < adv_asc3550_expanded_size; word += 2)
+    {
+        sum += AdvReadWordAutoIncLram(iop_base);
+    }
+
+    if (sum != _adv_asc3550_chksum)
+    {
+        asc_dvc->err_code |= ASC_IERR_MCODE_CHKSUM;
+        return ADV_ERROR;
+    }
+
+    /*
+     * Restore the RISC memory BIOS region.
+     */
+    for (i = 0; i < ASC_MC_BIOSLEN/2; i++)
+    {
+        AdvWriteWordLram(iop_base, ASC_MC_BIOSMEM + (2 * i), bios_mem[i]);
+    }
+
+    /*
+     * Calculate and write the microcode code checksum to the microcode
+     * code checksum location ASC_MC_CODE_CHK_SUM (0x2C).
+     */
+    AdvReadWordLram(iop_base, ASC_MC_CODE_BEGIN_ADDR, begin_addr);
+    AdvReadWordLram(iop_base, ASC_MC_CODE_END_ADDR, end_addr);
+    code_sum = 0;
+    AdvWriteWordRegister(iop_base, IOPW_RAM_ADDR, begin_addr);
+    for (word = begin_addr; word < end_addr; word += 2)
+    {
+        code_sum += AdvReadWordAutoIncLram(iop_base);
+    }
+    AdvWriteWordLram(iop_base, ASC_MC_CODE_CHK_SUM, code_sum);
+
+    /*
+     * Read and save microcode version and date.
+     */
+    AdvReadWordLram(iop_base, ASC_MC_VERSION_DATE, asc_dvc->cfg->mcode_date);
+    AdvReadWordLram(iop_base, ASC_MC_VERSION_NUM, asc_dvc->cfg->mcode_version);
+
+    /*
+     * Set the chip type to indicate the ASC3550.
+     */
+    AdvWriteWordLram(iop_base, ASC_MC_CHIP_TYPE, ADV_CHIP_ASC3550);
+
+    /*
+     * If the PCI Configuration Command Register "Parity Error Response
+     * Control" Bit was clear (0), then set the microcode variable
+     * 'control_flag' CONTROL_FLAG_IGNORE_PERR flag to tell the microcode
+     * to ignore DMA parity errors.
+     */
+    if (asc_dvc->cfg->control_flag & CONTROL_FLAG_IGNORE_PERR)
+    {
+        AdvReadWordLram(iop_base, ASC_MC_CONTROL_FLAG, word);
+        word |= CONTROL_FLAG_IGNORE_PERR;
+        AdvWriteWordLram(iop_base, ASC_MC_CONTROL_FLAG, word);
+    }
+
+    /*
+     * For ASC-3550, setting the START_CTL_EMFU [3:2] bits sets a FIFO
+     * threshold of 128 bytes. This register is only accessible to the host.
+     */
+    AdvWriteByteRegister(iop_base, IOPB_DMA_CFG0,
+        START_CTL_EMFU | READ_CMD_MRM);
+
+    /*
+     * Microcode operating variables for WDTR, SDTR, and command tag
+     * queuing will be set in AdvInquiryHandling() based on what a
+     * device reports it is capable of in Inquiry byte 7.
+     *
+     * If SCSI Bus Resets have been disabled, then directly set
+     * SDTR and WDTR from the EEPROM configuration. This will allow
+     * the BIOS and warm boot to work without a SCSI bus hang on
+     * the Inquiry caused by host and target mismatched DTR values.
+     * Without the SCSI Bus Reset, before an Inquiry a device can't
+     * be assumed to be in Asynchronous, Narrow mode.
+     */
+    if ((asc_dvc->bios_ctrl & BIOS_CTRL_RESET_SCSI_BUS) == 0)
+    {
+        AdvWriteWordLram(iop_base, ASC_MC_WDTR_ABLE, asc_dvc->wdtr_able);
+        AdvWriteWordLram(iop_base, ASC_MC_SDTR_ABLE, asc_dvc->sdtr_able);
+    }
+
+    /*
+     * Set microcode operating variables for SDTR_SPEED1, SDTR_SPEED2,
+     * SDTR_SPEED3, and SDTR_SPEED4 based on the ULTRA EEPROM per TID
+     * bitmask. These values determine the maximum SDTR speed negotiated
+     * with a device.
+     *
+     * The SDTR per TID bitmask overrides the SDTR_SPEED1, SDTR_SPEED2,
+     * SDTR_SPEED3, and SDTR_SPEED4 values so it is safe to set them
+     * without determining here whether the device supports SDTR.
+     *
+     * 4-bit speed  SDTR speed name
+     * ===========  ===============
+     * 0000b (0x0)  SDTR disabled
+     * 0001b (0x1)  5 Mhz
+     * 0010b (0x2)  10 Mhz
+     * 0011b (0x3)  20 Mhz (Ultra)
+     * 0100b (0x4)  40 Mhz (LVD/Ultra2)
+     * 0101b (0x5)  80 Mhz (LVD2/Ultra3)
+     * 0110b (0x6)  Undefined
+     * .
+     * 1111b (0xF)  Undefined
+     */
+    word = 0;
+    for (tid = 0; tid <= ADV_MAX_TID; tid++)
+    {
+        if (ADV_TID_TO_TIDMASK(tid) & asc_dvc->ultra_able)
+        {
+            /* Set Ultra speed for TID 'tid'. */
+            word |= (0x3 << (4 * (tid % 4)));
+        } else
+        {
+            /* Set Fast speed for TID 'tid'. */
+            word |= (0x2 << (4 * (tid % 4)));
+        }
+        if (tid == 3) /* Check if done with sdtr_speed1. */
+        {
+            AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED1, word);
+            word = 0;
+        } else if (tid == 7) /* Check if done with sdtr_speed2. */
+        {
+            AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED2, word);
+            word = 0;
+        } else if (tid == 11) /* Check if done with sdtr_speed3. */
+        {
+            AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED3, word);
+            word = 0;
+        } else if (tid == 15) /* Check if done with sdtr_speed4. */
+        {
+            AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED4, word);
+            /* End of loop. */
+        }
+    }
+
+    /*
+     * Set microcode operating variable for the disconnect per TID bitmask.
+     */
+    AdvWriteWordLram(iop_base, ASC_MC_DISC_ENABLE, asc_dvc->cfg->disc_enable);
+
+    /*
+     * Set SCSI_CFG0 Microcode Default Value.
+     *
+     * The microcode will set the SCSI_CFG0 register using this value
+     * after it is started below.
+     */
+    AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_SCSI_CFG0,
+        PARITY_EN | QUEUE_128 | SEL_TMO_LONG | OUR_ID_EN |
+        asc_dvc->chip_scsi_id);
+
+    /*
+     * Determine SCSI_CFG1 Microcode Default Value.
+     *
+     * The microcode will set the SCSI_CFG1 register using this value
+     * after it is started below.
+     */
+
+    /* Read current SCSI_CFG1 Register value. */
+    scsi_cfg1 = AdvReadWordRegister(iop_base, IOPW_SCSI_CFG1);
+
+    /*
+     * If all three connectors are in use, return an error.
+     */
+    if ((scsi_cfg1 & CABLE_ILLEGAL_A) == 0 ||
+        (scsi_cfg1 & CABLE_ILLEGAL_B) == 0)
+    {
+            asc_dvc->err_code |= ASC_IERR_ILLEGAL_CONNECTION;
+            return ADV_ERROR;
+    }
+
+    /*
+     * If the internal narrow cable is reversed all of the SCSI_CTRL
+     * register signals will be set. Check for and return an error if
+     * this condition is found.
+     */
+    if ((AdvReadWordRegister(iop_base, IOPW_SCSI_CTRL) & 0x3F07) == 0x3F07)
+    {
+        asc_dvc->err_code |= ASC_IERR_REVERSED_CABLE;
+        return ADV_ERROR;
+    }
+
+    /*
+     * If this is a differential board and a single-ended device
+     * is attached to one of the connectors, return an error.
+     */
+    if ((scsi_cfg1 & DIFF_MODE) && (scsi_cfg1 & DIFF_SENSE) == 0)
+    {
+        asc_dvc->err_code |= ASC_IERR_SINGLE_END_DEVICE;
+        return ADV_ERROR;
+    }
+
+    /*
+     * If automatic termination control is enabled, then set the
+     * termination value based on a table listed in a_condor.h.
+     *
+     * If manual termination was specified with an EEPROM setting
+     * then 'termination' was set-up in AdvInitFrom3550EEPROM() and
+     * is ready to be 'ored' into SCSI_CFG1.
+     */
+    if (asc_dvc->cfg->termination == 0)
+    {
+        /*
+         * The software always controls termination by setting TERM_CTL_SEL.
+         * If TERM_CTL_SEL were set to 0, the hardware would set termination.
+         */
+        asc_dvc->cfg->termination |= TERM_CTL_SEL;
+
+        switch(scsi_cfg1 & CABLE_DETECT)
+        {
+            /* TERM_CTL_H: on, TERM_CTL_L: on */
+            case 0x3: case 0x7: case 0xB: case 0xD: case 0xE: case 0xF:
+                asc_dvc->cfg->termination |= (TERM_CTL_H | TERM_CTL_L);
+                break;
+
+            /* TERM_CTL_H: on, TERM_CTL_L: off */
+            case 0x1: case 0x5: case 0x9: case 0xA: case 0xC:
+                asc_dvc->cfg->termination |= TERM_CTL_H;
+                break;
+
+            /* TERM_CTL_H: off, TERM_CTL_L: off */
+            case 0x2: case 0x6:
+                break;
+        }
+    }
+
+    /*
+     * Clear any set TERM_CTL_H and TERM_CTL_L bits.
+     */
+    scsi_cfg1 &= ~TERM_CTL;
+
+    /*
+     * Invert the TERM_CTL_H and TERM_CTL_L bits and then
+     * set 'scsi_cfg1'. The TERM_POL bit does not need to be
+     * referenced, because the hardware internally inverts
+     * the Termination High and Low bits if TERM_POL is set.
+     */
+    scsi_cfg1 |= (TERM_CTL_SEL | (~asc_dvc->cfg->termination & TERM_CTL));
+
+    /*
+     * Set SCSI_CFG1 Microcode Default Value
+     *
+     * Set filter value and possibly modified termination control
+     * bits in the Microcode SCSI_CFG1 Register Value.
+     *
+     * The microcode will set the SCSI_CFG1 register using this value
+     * after it is started below.
+     */
+    AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_SCSI_CFG1,
+        FLTR_DISABLE | scsi_cfg1);
+
+    /*
+     * Set MEM_CFG Microcode Default Value
+     *
+     * The microcode will set the MEM_CFG register using this value
+     * after it is started below.
+     *
+     * MEM_CFG may be accessed as a word or byte, but only bits 0-7
+     * are defined.
+     *
+     * ASC-3550 has 8KB internal memory.
+     */
+    AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_MEM_CFG,
+        BIOS_EN | RAM_SZ_8KB);
+
+    /*
+     * Set SEL_MASK Microcode Default Value
+     *
+     * The microcode will set the SEL_MASK register using this value
+     * after it is started below.
+     */
+    AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_SEL_MASK,
+        ADV_TID_TO_TIDMASK(asc_dvc->chip_scsi_id));
+
+    /*
+     * Build carrier freelist.
+     *
+     * Driver must have already allocated memory and set 'carrier_buf'.
+     */
+    ASC_ASSERT(asc_dvc->carrier_buf != NULL);
+
+    carrp = (ADV_CARR_T *) ADV_16BALIGN(asc_dvc->carrier_buf);
+    asc_dvc->carr_freelist = NULL;
+    if (carrp == (ADV_CARR_T *) asc_dvc->carrier_buf)
+    {
+        buf_size = ADV_CARRIER_BUFSIZE;
+    } else
+    {
+        buf_size = ADV_CARRIER_BUFSIZE - sizeof(ADV_CARR_T);
+    }
+
+    do {
+        /*
+         * Get physical address of the carrier 'carrp'.
+         */
+        contig_len = sizeof(ADV_CARR_T);
+        carr_paddr = cpu_to_le32(DvcGetPhyAddr(asc_dvc, NULL, (uchar *) carrp,
+            (ADV_SDCNT *) &contig_len, ADV_IS_CARRIER_FLAG));
+
+        buf_size -= sizeof(ADV_CARR_T);
+
+        /*
+         * If the current carrier is not physically contiguous, then
+         * maybe there was a page crossing. Try the next carrier aligned
+         * start address.
+         */
+        if (contig_len < sizeof(ADV_CARR_T))
+        {
+            carrp++;
+            continue;
+        }
+
+        carrp->carr_pa = carr_paddr;
+        carrp->carr_va = cpu_to_le32(ADV_VADDR_TO_U32(carrp));
+
+        /*
+         * Insert the carrier at the beginning of the freelist.
+         */
+        carrp->next_vpa = cpu_to_le32(ADV_VADDR_TO_U32(asc_dvc->carr_freelist));
+        asc_dvc->carr_freelist = carrp;
+
+        carrp++;
+    }
+    while (buf_size > 0);
+
+    /*
+     * Set-up the Host->RISC Initiator Command Queue (ICQ).
+     */
+
+    if ((asc_dvc->icq_sp = asc_dvc->carr_freelist) == NULL)
+    {
+        asc_dvc->err_code |= ASC_IERR_NO_CARRIER;
+        return ADV_ERROR;
+    }
+    asc_dvc->carr_freelist = (ADV_CARR_T *)
+        ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->icq_sp->next_vpa));
+
+    /*
+     * The first command issued will be placed in the stopper carrier.
+     */
+    asc_dvc->icq_sp->next_vpa = cpu_to_le32(ASC_CQ_STOPPER);
+
+    /*
+     * Set RISC ICQ physical address start value.
+     */
+    AdvWriteDWordLramNoSwap(iop_base, ASC_MC_ICQ, asc_dvc->icq_sp->carr_pa);
+
+    /*
+     * Set-up the RISC->Host Initiator Response Queue (IRQ).
+     */
+    if ((asc_dvc->irq_sp = asc_dvc->carr_freelist) == NULL)
+    {
+        asc_dvc->err_code |= ASC_IERR_NO_CARRIER;
+        return ADV_ERROR;
+    }
+    asc_dvc->carr_freelist = (ADV_CARR_T *)
+         ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->next_vpa));
+
+    /*
+     * The first command completed by the RISC will be placed in
+     * the stopper.
+     *
+     * Note: Set 'next_vpa' to ASC_CQ_STOPPER. When the request is
+     * completed the RISC will set the ASC_RQ_STOPPER bit.
+     */
+    asc_dvc->irq_sp->next_vpa = cpu_to_le32(ASC_CQ_STOPPER);
+
+    /*
+     * Set RISC IRQ physical address start value.
+     */
+    AdvWriteDWordLramNoSwap(iop_base, ASC_MC_IRQ, asc_dvc->irq_sp->carr_pa);
+    asc_dvc->carr_pending_cnt = 0;
+
+    AdvWriteByteRegister(iop_base, IOPB_INTR_ENABLES,
+        (ADV_INTR_ENABLE_HOST_INTR | ADV_INTR_ENABLE_GLOBAL_INTR));
+
+    AdvReadWordLram(iop_base, ASC_MC_CODE_BEGIN_ADDR, word);
+    AdvWriteWordRegister(iop_base, IOPW_PC, word);
+
+    /* finally, finally, gentlemen, start your engine */
+    AdvWriteWordRegister(iop_base, IOPW_RISC_CSR, ADV_RISC_CSR_RUN);
+
+    /*
+     * Reset the SCSI Bus if the EEPROM indicates that SCSI Bus
+     * Resets should be performed. The RISC has to be running
+     * to issue a SCSI Bus Reset.
+     */
+    if (asc_dvc->bios_ctrl & BIOS_CTRL_RESET_SCSI_BUS)
+    {
+        /*
+         * If the BIOS Signature is present in memory, restore the
+         * BIOS Handshake Configuration Table and do not perform
+         * a SCSI Bus Reset.
+         */
+        if (bios_mem[(ASC_MC_BIOS_SIGNATURE - ASC_MC_BIOSMEM)/2] == 0x55AA)
+        {
+            /*
+             * Restore per TID negotiated values.
+             */
+            AdvWriteWordLram(iop_base, ASC_MC_WDTR_ABLE, wdtr_able);
+            AdvWriteWordLram(iop_base, ASC_MC_SDTR_ABLE, sdtr_able);
+            AdvWriteWordLram(iop_base, ASC_MC_TAGQNG_ABLE, tagqng_able);
+            for (tid = 0; tid <= ADV_MAX_TID; tid++)
+            {
+                AdvWriteByteLram(iop_base, ASC_MC_NUMBER_OF_MAX_CMD + tid,
+                    max_cmd[tid]);
+            }
+        } else
+        {
+            if (AdvResetSB(asc_dvc) != ADV_TRUE)
+            {
+                warn_code = ASC_WARN_BUSRESET_ERROR;
+            }
+        }
+    }
+
+    return warn_code;
+}
+
+/*
+ * Initialize the ASC-38C0800.
+ *
+ * On failure set the ADV_DVC_VAR field 'err_code' and return ADV_ERROR.
+ *
+ * For a non-fatal error return a warning code. If there are no warnings
+ * then 0 is returned.
+ *
+ * Needed after initialization for error recovery.
+ */
+STATIC int
+AdvInitAsc38C0800Driver(ADV_DVC_VAR *asc_dvc)
+{
+    AdvPortAddr iop_base;
+    ushort      warn_code;
+    ADV_DCNT    sum;
+    int         begin_addr;
+    int         end_addr;
+    ushort      code_sum;
+    int         word;
+    int         j;
+    int         adv_asc38C0800_expanded_size;
+    ADV_CARR_T  *carrp;
+    ADV_DCNT    contig_len;
+    ADV_SDCNT   buf_size;
+    ADV_PADDR   carr_paddr;
+    int         i;
+    ushort      scsi_cfg1;
+    uchar       byte;
+    uchar       tid;
+    ushort      bios_mem[ASC_MC_BIOSLEN/2]; /* BIOS RISC Memory 0x40-0x8F. */
+    ushort      wdtr_able, sdtr_able, tagqng_able;
+    uchar       max_cmd[ADV_MAX_TID + 1];
+
+    /* If there is already an error, don't continue. */
+    if (asc_dvc->err_code != 0)
+    {
+        return ADV_ERROR;
+    }
+
+    /*
+     * The caller must set 'chip_type' to ADV_CHIP_ASC38C0800.
+     */
+    if (asc_dvc->chip_type != ADV_CHIP_ASC38C0800)
+    {
+        asc_dvc->err_code = ASC_IERR_BAD_CHIPTYPE;
+        return ADV_ERROR;
+    }
+
+    warn_code = 0;
+    iop_base = asc_dvc->iop_base;
+
+    /*
+     * Save the RISC memory BIOS region before writing the microcode.
+     * The BIOS may already be loaded and using its RISC LRAM region
+     * so its region must be saved and restored.
+     *
+     * Note: This code makes the assumption, which is currently true,
+     * that a chip reset does not clear RISC LRAM.
+     */
+    for (i = 0; i < ASC_MC_BIOSLEN/2; i++)
+    {
+        AdvReadWordLram(iop_base, ASC_MC_BIOSMEM + (2 * i), bios_mem[i]);
+    }
+
+    /*
+     * Save current per TID negotiated values.
+     */
+    AdvReadWordLram(iop_base, ASC_MC_WDTR_ABLE, wdtr_able);
+    AdvReadWordLram(iop_base, ASC_MC_SDTR_ABLE, sdtr_able);
+    AdvReadWordLram(iop_base, ASC_MC_TAGQNG_ABLE, tagqng_able);
+    for (tid = 0; tid <= ADV_MAX_TID; tid++)
+    {
+        AdvReadByteLram(iop_base, ASC_MC_NUMBER_OF_MAX_CMD + tid,
+            max_cmd[tid]);
+    }
+
+    /*
+     * RAM BIST (RAM Built-In Self Test)
+     *
+     * Address : I/O base + offset 0x38h register (byte).
+     * Function: Bit 7-6(RW) : RAM mode
+     *                          Normal Mode   : 0x00
+     *                          Pre-test Mode : 0x40
+     *                          RAM Test Mode : 0x80
+     *           Bit 5       : unused
+     *           Bit 4(RO)   : Done bit
+     *           Bit 3-0(RO) : Status
+     *                          Host Error    : 0x08
+     *                          Int_RAM Error : 0x04
+     *                          RISC Error    : 0x02
+     *                          SCSI Error    : 0x01
+     *                          No Error      : 0x00
+     *
+     * Note: RAM BIST code should be put right here, before loading the
+     * microcode and after saving the RISC memory BIOS region.
+     */
+
+    /*
+     * LRAM Pre-test
+     *
+     * Write PRE_TEST_MODE (0x40) to register and wait for 10 milliseconds.
+     * If Done bit not set or low nibble not PRE_TEST_VALUE (0x05), return
+     * an error. Reset to NORMAL_MODE (0x00) and do again. If cannot reset
+     * to NORMAL_MODE, return an error too.
+     */
+    for (i = 0; i < 2; i++)
+    {
+        AdvWriteByteRegister(iop_base, IOPB_RAM_BIST, PRE_TEST_MODE);
+        DvcSleepMilliSecond(10);  /* Wait for 10ms before reading back. */
+        byte = AdvReadByteRegister(iop_base, IOPB_RAM_BIST);
+        if ((byte & RAM_TEST_DONE) == 0 || (byte & 0x0F) != PRE_TEST_VALUE)
+        {
+            asc_dvc->err_code |= ASC_IERR_BIST_PRE_TEST;
+            return ADV_ERROR;
+        }
+
+        AdvWriteByteRegister(iop_base, IOPB_RAM_BIST, NORMAL_MODE);
+        DvcSleepMilliSecond(10);  /* Wait for 10ms before reading back. */
+        if (AdvReadByteRegister(iop_base, IOPB_RAM_BIST)
+            != NORMAL_VALUE)
+        {
+            asc_dvc->err_code |= ASC_IERR_BIST_PRE_TEST;
+            return ADV_ERROR;
+        }
+    }
+
+    /*
+     * LRAM Test - It takes about 1.5 ms to run through the test.
+     *
+     * Write RAM_TEST_MODE (0x80) to register and wait for 10 milliseconds.
+     * If Done bit not set or Status not 0, save register byte, set the
+     * err_code, and return an error.
+     */
+    AdvWriteByteRegister(iop_base, IOPB_RAM_BIST, RAM_TEST_MODE);
+    DvcSleepMilliSecond(10);  /* Wait for 10ms before checking status. */
+
+    byte = AdvReadByteRegister(iop_base, IOPB_RAM_BIST);
+    if ((byte & RAM_TEST_DONE) == 0 || (byte & RAM_TEST_STATUS) != 0)
+    {
+        /* Get here if Done bit not set or Status not 0. */
+        asc_dvc->bist_err_code = byte;  /* for BIOS display message */
+        asc_dvc->err_code |= ASC_IERR_BIST_RAM_TEST;
+        return ADV_ERROR;
+    }
+
+    /* We need to reset back to normal mode after LRAM test passes. */
+    AdvWriteByteRegister(iop_base, IOPB_RAM_BIST, NORMAL_MODE);
+
+    /*
+     * Load the Microcode
+     *
+     * Write the microcode image to RISC memory starting at address 0.
+     *
+     */
+    AdvWriteWordRegister(iop_base, IOPW_RAM_ADDR, 0);
+
+    /* Assume the following compressed format of the microcode buffer:
+     *
+     *  254 word (508 byte) table indexed by byte code followed
+     *  by the following byte codes:
+     *
+     *    1-Byte Code:
+     *      00: Emit word 0 in table.
+     *      01: Emit word 1 in table.
+     *      .
+     *      FD: Emit word 253 in table.
+     *
+     *    Multi-Byte Code:
+     *      FE WW WW: (3 byte code) Word to emit is the next word WW WW.
+     *      FF BB WW WW: (4 byte code) Emit BB count times next word WW WW.
+     */
+    word = 0;
+    for (i = 253 * 2; i < _adv_asc38C0800_size; i++)
+    {
+        if (_adv_asc38C0800_buf[i] == 0xff)
+        {
+            for (j = 0; j < _adv_asc38C0800_buf[i + 1]; j++)
+            {
+                AdvWriteWordAutoIncLram(iop_base, (((ushort)
+                    _adv_asc38C0800_buf[i + 3] << 8) |
+                    _adv_asc38C0800_buf[i + 2]));
+                word++;
+            }
+            i += 3;
+        } else if (_adv_asc38C0800_buf[i] == 0xfe)
+        {
+            AdvWriteWordAutoIncLram(iop_base, (((ushort)
+                _adv_asc38C0800_buf[i + 2] << 8) |
+                _adv_asc38C0800_buf[i + 1]));
             i += 2;
             word++;
         } else
         {
             AdvWriteWordAutoIncLram(iop_base, (((ushort)
-                _adv_asc3550_buf[(_adv_asc3550_buf[i] * 2) + 1] << 8) |
-                _adv_asc3550_buf[_adv_asc3550_buf[i] * 2]));
+                _adv_asc38C0800_buf[(_adv_asc38C0800_buf[i] * 2) + 1] << 8) |
+                _adv_asc38C0800_buf[_adv_asc38C0800_buf[i] * 2]));
             word++;
         }
     }
@@ -15839,12 +15846,12 @@
      * the expanded mcode size.
      */
     word *= 2;
-    adv_asc3550_expanded_size = word;
+    adv_asc38C0800_expanded_size = word;
 
     /*
-     * Clear the rest of ASC-3550 Internal RAM (8KB).
+     * Clear the rest of ASC-38C0800 Internal RAM (16KB).
      */
-    for (; word < ADV_3550_MEMSIZE; word += 2)
+    for (; word < ADV_38C0800_MEMSIZE; word += 2)
     {
         AdvWriteWordAutoIncLram(iop_base, 0);
     }
@@ -15855,12 +15862,17 @@
     sum = 0;
     AdvWriteWordRegister(iop_base, IOPW_RAM_ADDR, 0);
 
-    for (word = 0; word < adv_asc3550_expanded_size; word += 2)
+    for (word = 0; word < adv_asc38C0800_expanded_size; word += 2)
     {
         sum += AdvReadWordAutoIncLram(iop_base);
     }
+    ASC_DBG2(1, "AdvInitAsc38C0800Driver: word %d, i %d\n", word, i);
 
-    if (sum != _adv_asc3550_chksum)
+    ASC_DBG2(1,
+        "AdvInitAsc38C0800Driver: sum 0x%lx, _adv_asc38C0800_chksum 0x%lx\n",
+        (ulong) sum, (ulong) _adv_asc38C0800_chksum);
+
+    if (sum != _adv_asc38C0800_chksum)
     {
         asc_dvc->err_code |= ASC_IERR_MCODE_CHKSUM;
         return ADV_ERROR;
@@ -15871,7 +15883,7 @@
      */
     for (i = 0; i < ASC_MC_BIOSLEN/2; i++)
     {
-        AdvWriteByteLram(iop_base, ASC_MC_BIOSMEM + (2 * i), bios_mem[i]);
+        AdvWriteWordLram(iop_base, ASC_MC_BIOSMEM + (2 * i), bios_mem[i]);
     }
 
     /*
@@ -15889,15 +15901,26 @@
     AdvWriteWordLram(iop_base, ASC_MC_CODE_CHK_SUM, code_sum);
 
     /*
-     * Read and save microcode version and date.
+     * Read microcode version and date.
      */
     AdvReadWordLram(iop_base, ASC_MC_VERSION_DATE, asc_dvc->cfg->mcode_date);
     AdvReadWordLram(iop_base, ASC_MC_VERSION_NUM, asc_dvc->cfg->mcode_version);
 
     /*
-     * Set the chip type to indicate the ASC3550.
+     * Set the chip type to indicate the ASC38C0800.
      */
-    AdvWriteWordLram(iop_base, ASC_MC_CHIP_TYPE, ADV_CHIP_ASC3550);
+    AdvWriteWordLram(iop_base, ASC_MC_CHIP_TYPE, ADV_CHIP_ASC38C0800);
+
+    /*
+     * Write 1 to bit 14 'DIS_TERM_DRV' in the SCSI_CFG1 register.
+     * When DIS_TERM_DRV set to 1, C_DET[3:0] will reflect current
+     * cable detection and then we are able to read C_DET[3:0].
+     *
+     * Note: We will reset DIS_TERM_DRV to 0 in the 'Set SCSI_CFG1
+     * Microcode Default Value' section below.
+     */
+    scsi_cfg1 = AdvReadWordRegister(iop_base, IOPW_SCSI_CFG1);
+    AdvWriteWordRegister(iop_base, IOPW_SCSI_CFG1, scsi_cfg1 | DIS_TERM_DRV);
 
     /*
      * If the PCI Configuration Command Register "Parity Error Response
@@ -15907,22 +15930,21 @@
      */
     if (asc_dvc->cfg->control_flag & CONTROL_FLAG_IGNORE_PERR)
     {
-        /*
-         * Note: Don't remove the use of a temporary variable in
-         * the following code, otherwise the Microsoft C compiler
-         * will turn the following lines into a no-op.
-         */
         AdvReadWordLram(iop_base, ASC_MC_CONTROL_FLAG, word);
         word |= CONTROL_FLAG_IGNORE_PERR;
         AdvWriteWordLram(iop_base, ASC_MC_CONTROL_FLAG, word);
     }
 
     /*
-     * For ASC-3550, setting the START_CTL_EMFU [3:2] bits sets a FIFO
-     * threshold of 128 bytes. This register is only accessible to the host.
+     * For ASC-38C0800, set FIFO_THRESH_80B [6:4] bits and START_CTL_TH [3:2]
+     * bits for the default FIFO threshold.
+     *
+     * Note: ASC-38C0800 FIFO threshold has been changed to 256 bytes.
+     *
+     * For DMA Errata #4 set the BC_THRESH_ENB bit.
      */
     AdvWriteByteRegister(iop_base, IOPB_DMA_CFG0,
-        START_CTL_EMFU | READ_CMD_MRM);
+        BC_THRESH_ENB | FIFO_THRESH_80B | START_CTL_TH | READ_CMD_MRM);
 
     /*
      * Microcode operating variables for WDTR, SDTR, and command tag
@@ -15943,63 +15965,19 @@
     }
 
     /*
-     * Set microcode operating variables for SDTR_SPEED1, SDTR_SPEED2,
-     * SDTR_SPEED3, and SDTR_SPEED4 based on the ULTRA EEPROM per TID
-     * bitmask. These values determine the maximum SDTR speed negotiated
-     * with a device.
+     * Set microcode operating variables for DISC and SDTR_SPEED1,
+     * SDTR_SPEED2, SDTR_SPEED3, and SDTR_SPEED4 based on the EEPROM
+     * configuration values.
      *
      * The SDTR per TID bitmask overrides the SDTR_SPEED1, SDTR_SPEED2,
      * SDTR_SPEED3, and SDTR_SPEED4 values so it is safe to set them
      * without determining here whether the device supports SDTR.
-     *
-     * 4-bit speed  SDTR speed name
-     * ===========  ===============
-     * 0000b (0x0)  SDTR disabled
-     * 0001b (0x1)  5 Mhz
-     * 0010b (0x2)  10 Mhz
-     * 0011b (0x3)  20 Mhz (Ultra)
-     * 0100b (0x4)  40 Mhz (LVD/Ultra2)
-     * 0101b (0x5)  80 Mhz (LVD2/Ultra3)
-     * 0110b (0x6)  Undefined
-     * .
-     * 1111b (0xF)  Undefined
-     */
-    word = 0;
-    for (tid = 0; tid <= ADV_MAX_TID; tid++)
-    {
-        if (ADV_TID_TO_TIDMASK(tid) & asc_dvc->ultra_able)
-        {
-            /* Set Ultra speed for TID 'tid'. */
-            word |= (0x3 << (4 * (tid % 4)));
-        } else
-        {
-            /* Set Fast speed for TID 'tid'. */
-            word |= (0x2 << (4 * (tid % 4)));
-        }
-        if (tid == 3) /* Check if done with sdtr_speed1. */
-        {
-            AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED1, word);
-            word = 0;
-        } else if (tid == 7) /* Check if done with sdtr_speed2. */
-        {
-            AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED2, word);
-            word = 0;
-        } else if (tid == 11) /* Check if done with sdtr_speed3. */
-        {
-            AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED3, word);
-            word = 0;
-        } else if (tid == 15) /* Check if done with sdtr_speed4. */
-        {
-            AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED4, word);
-            /* End of loop. */
-        }
-    }
-
-    /*
-     * Set microcode operating variable for the disconnect per TID bitmask.
      */
     AdvWriteWordLram(iop_base, ASC_MC_DISC_ENABLE, asc_dvc->cfg->disc_enable);
-
+    AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED1, asc_dvc->sdtr_speed1);
+    AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED2, asc_dvc->sdtr_speed2);
+    AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED3, asc_dvc->sdtr_speed3);
+    AdvWriteWordLram(iop_base, ASC_MC_SDTR_SPEED4, asc_dvc->sdtr_speed4);
 
     /*
      * Set SCSI_CFG0 Microcode Default Value.
@@ -16008,7 +15986,8 @@
      * after it is started below.
      */
     AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_SCSI_CFG0,
-        PARITY_EN | SEL_TMO_LONG | OUR_ID_EN | asc_dvc->chip_scsi_id);
+        PARITY_EN | QUEUE_128 | SEL_TMO_LONG | OUR_ID_EN |
+        asc_dvc->chip_scsi_id);
 
     /*
      * Determine SCSI_CFG1 Microcode Default Value.
@@ -16021,16 +16000,6 @@
     scsi_cfg1 = AdvReadWordRegister(iop_base, IOPW_SCSI_CFG1);
 
     /*
-     * If all three connectors are in use, return an error.
-     */
-    if ((scsi_cfg1 & CABLE_ILLEGAL_A) == 0 ||
-        (scsi_cfg1 & CABLE_ILLEGAL_B) == 0)
-    {
-            asc_dvc->err_code |= ASC_IERR_ILLEGAL_CONNECTION;
-            return ADV_ERROR;
-    }
-
-    /*
      * If the internal narrow cable is reversed all of the SCSI_CTRL
      * register signals will be set. Check for and return an error if
      * this condition is found.
@@ -16042,73 +16011,88 @@
     }
 
     /*
-     * If this is a differential board and a single-ended device
-     * is attached to one of the connectors, return an error.
+     * All kind of combinations of devices attached to one of four connectors
+     * are acceptable except HVD device attached. For example, LVD device can
+     * be attached to SE connector while SE device attached to LVD connector.
+     * If LVD device attached to SE connector, it only runs up to Ultra speed.
+     *
+     * If an HVD device is attached to one of LVD connectors, return an error.
+     * However, there is no way to detect HVD device attached to SE connectors.
      */
-    if ((scsi_cfg1 & DIFF_MODE) && (scsi_cfg1 & DIFF_SENSE) == 0)
+    if (scsi_cfg1 & HVD)
     {
-        asc_dvc->err_code |= ASC_IERR_SINGLE_END_DEVICE;
+        asc_dvc->err_code |= ASC_IERR_HVD_DEVICE;
         return ADV_ERROR;
     }
 
     /*
-     * If automatic termination control is enabled, then set the
-     * termination value based on a table listed in a_condor.h.
+     * If either SE or LVD automatic termination control is enabled, then
+     * set the termination value based on a table listed in a_condor.h.
      *
-     * If manual termination was specified with an EEPROM setting
-     * then 'termination' was set-up in AdvInitFrom3550EEPROM() and
-     * is ready to be 'ored' into SCSI_CFG1.
+     * If manual termination was specified with an EEPROM setting then
+     * 'termination' was set-up in AdvInitFrom38C0800EEPROM() and is ready to
+     * be 'ored' into SCSI_CFG1.
      */
-    if (asc_dvc->cfg->termination == 0)
+    if ((asc_dvc->cfg->termination & TERM_SE) == 0)
     {
-        /*
-         * The software always controls termination by setting TERM_CTL_SEL.
-         * If TERM_CTL_SEL were set to 0, the hardware would set termination.
-         */
-        asc_dvc->cfg->termination |= TERM_CTL_SEL;
-
-        switch(scsi_cfg1 & CABLE_DETECT)
+        /* SE automatic termination control is enabled. */
+        switch(scsi_cfg1 & C_DET_SE)
         {
-            /* TERM_CTL_H: on, TERM_CTL_L: on */
-            case 0x3: case 0x7: case 0xB: case 0xD: case 0xE: case 0xF:
-                asc_dvc->cfg->termination |= (TERM_CTL_H | TERM_CTL_L);
+            /* TERM_SE_HI: on, TERM_SE_LO: on */
+            case 0x1: case 0x2: case 0x3:
+                asc_dvc->cfg->termination |= TERM_SE;
                 break;
 
-            /* TERM_CTL_H: on, TERM_CTL_L: off */
-            case 0x1: case 0x5: case 0x9: case 0xA: case 0xC:
-                asc_dvc->cfg->termination |= TERM_CTL_H;
+            /* TERM_SE_HI: on, TERM_SE_LO: off */
+            case 0x0:
+                asc_dvc->cfg->termination |= TERM_SE_HI;
                 break;
+        }
+    }
 
-            /* TERM_CTL_H: off, TERM_CTL_L: off */
-            case 0x2: case 0x6:
+    if ((asc_dvc->cfg->termination & TERM_LVD) == 0)
+    {
+        /* LVD automatic termination control is enabled. */
+        switch(scsi_cfg1 & C_DET_LVD)
+        {
+            /* TERM_LVD_HI: on, TERM_LVD_LO: on */
+            case 0x4: case 0x8: case 0xC:
+                asc_dvc->cfg->termination |= TERM_LVD;
+                break;
+
+            /* TERM_LVD_HI: off, TERM_LVD_LO: off */
+            case 0x0:
                 break;
         }
     }
 
     /*
-     * Clear any set TERM_CTL_H and TERM_CTL_L bits.
+     * Clear any set TERM_SE and TERM_LVD bits.
      */
-    scsi_cfg1 &= ~TERM_CTL;
+    scsi_cfg1 &= (~TERM_SE & ~TERM_LVD);
 
     /*
-     * Invert the TERM_CTL_H and TERM_CTL_L bits and then
-     * set 'scsi_cfg1'. The TERM_POL bit does not need to be
-     * referenced, because the hardware internally inverts
-     * the Termination High and Low bits if TERM_POL is set.
+     * Invert the TERM_SE and TERM_LVD bits and then set 'scsi_cfg1'.
      */
-    scsi_cfg1 |= (TERM_CTL_SEL | (~asc_dvc->cfg->termination & TERM_CTL));
+    scsi_cfg1 |= (~asc_dvc->cfg->termination & 0xF0);
+
+    /*
+     * Clear BIG_ENDIAN, DIS_TERM_DRV, Terminator Polarity and HVD/LVD/SE bits
+     * and set possibly modified termination control bits in the Microcode
+     * SCSI_CFG1 Register Value.
+     */
+    scsi_cfg1 &= (~BIG_ENDIAN & ~DIS_TERM_DRV & ~TERM_POL & ~HVD_LVD_SE);
 
     /*
      * Set SCSI_CFG1 Microcode Default Value
      *
-     * Set filter value and possibly modified termination control
+     * Set possibly modified termination control and reset DIS_TERM_DRV
      * bits in the Microcode SCSI_CFG1 Register Value.
      *
      * The microcode will set the SCSI_CFG1 register using this value
      * after it is started below.
      */
-    AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_SCSI_CFG1,
-        FLTR_DISABLE | scsi_cfg1);
+    AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_SCSI_CFG1, scsi_cfg1);
 
     /*
      * Set MEM_CFG Microcode Default Value
@@ -16119,10 +16103,10 @@
      * MEM_CFG may be accessed as a word or byte, but only bits 0-7
      * are defined.
      *
-     * ASC-3550 has 8KB internal memory.
+     * ASC-38C0800 has 16KB internal memory.
      */
     AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_MEM_CFG,
-        BIOS_EN | RAM_SZ_8KB);
+        BIOS_EN | RAM_SZ_16KB);
 
     /*
      * Set SEL_MASK Microcode Default Value
@@ -16134,7 +16118,7 @@
         ADV_TID_TO_TIDMASK(asc_dvc->chip_scsi_id));
 
     /*
-     * Build carrier freelist.
+     * Build the carrier freelist.
      *
      * Driver must have already allocated memory and set 'carrier_buf'.
      */
@@ -16152,7 +16136,7 @@
 
     do {
         /*
-         * Get physical address of the carrier 'carrp'.
+         * Get physical address for the carrier 'carrp'.
          */
         contig_len = sizeof(ADV_CARR_T);
         carr_paddr = cpu_to_le32(DvcGetPhyAddr(asc_dvc, NULL, (uchar *) carrp,
@@ -16172,12 +16156,12 @@
         }
 
         carrp->carr_pa = carr_paddr;
-        carrp->carr_va = ADV_VADDR_TO_U32(carrp);
+        carrp->carr_va = cpu_to_le32(ADV_VADDR_TO_U32(carrp));
 
         /*
          * Insert the carrier at the beginning of the freelist.
          */
-        carrp->next_vpa = ADV_VADDR_TO_U32(asc_dvc->carr_freelist);
+        carrp->next_vpa = cpu_to_le32(ADV_VADDR_TO_U32(asc_dvc->carr_freelist));
         asc_dvc->carr_freelist = carrp;
 
         carrp++;
@@ -16193,19 +16177,19 @@
         asc_dvc->err_code |= ASC_IERR_NO_CARRIER;
         return ADV_ERROR;
     }
-    asc_dvc->carr_freelist =
-        (ADV_CARR_T *) ADV_U32_TO_VADDR(asc_dvc->icq_sp->next_vpa);
+    asc_dvc->carr_freelist = (ADV_CARR_T *)
+        ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->icq_sp->next_vpa));
 
     /*
      * The first command issued will be placed in the stopper carrier.
      */
-    asc_dvc->icq_sp->next_vpa = ASC_CQ_STOPPER;
+    asc_dvc->icq_sp->next_vpa = cpu_to_le32(ASC_CQ_STOPPER);
 
     /*
      * Set RISC ICQ physical address start value.
+     * carr_pa is LE, must be native before write
      */
-    AdvWriteDWordLram(iop_base, ASC_MC_ICQ,
-        cpu_to_le32(asc_dvc->icq_sp->carr_pa));
+    AdvWriteDWordLramNoSwap(iop_base, ASC_MC_ICQ, asc_dvc->icq_sp->carr_pa);
 
     /*
      * Set-up the RISC->Host Initiator Response Queue (IRQ).
@@ -16215,8 +16199,8 @@
         asc_dvc->err_code |= ASC_IERR_NO_CARRIER;
         return ADV_ERROR;
     }
-    asc_dvc->carr_freelist =
-        (ADV_CARR_T *) ADV_U32_TO_VADDR(asc_dvc->irq_sp->next_vpa);
+    asc_dvc->carr_freelist = (ADV_CARR_T *)
+        ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->next_vpa));
 
     /*
      * The first command completed by the RISC will be placed in
@@ -16225,23 +16209,19 @@
      * Note: Set 'next_vpa' to ASC_CQ_STOPPER. When the request is
      * completed the RISC will set the ASC_RQ_STOPPER bit.
      */
-    asc_dvc->irq_sp->next_vpa = ASC_CQ_STOPPER;
+    asc_dvc->irq_sp->next_vpa = cpu_to_le32(ASC_CQ_STOPPER);
 
     /*
      * Set RISC IRQ physical address start value.
+     *
+     * carr_pa is LE, must be native before write *
      */
-    AdvWriteDWordLram(iop_base, ASC_MC_IRQ,
-        cpu_to_le32(asc_dvc->irq_sp->carr_pa));
+    AdvWriteDWordLramNoSwap(iop_base, ASC_MC_IRQ, asc_dvc->irq_sp->carr_pa);
     asc_dvc->carr_pending_cnt = 0;
 
     AdvWriteByteRegister(iop_base, IOPB_INTR_ENABLES,
         (ADV_INTR_ENABLE_HOST_INTR | ADV_INTR_ENABLE_GLOBAL_INTR));
 
-    /*
-     * Note: Don't remove the use of a temporary variable in
-     * the following code, otherwise the Microsoft C compiler
-     * will turn the following lines into a no-op.
-     */
     AdvReadWordLram(iop_base, ASC_MC_CODE_BEGIN_ADDR, word);
     AdvWriteWordRegister(iop_base, IOPW_PC, word);
 
@@ -16286,15 +16266,17 @@
 }
 
 /*
- * Initialize the ASC-38C0800.
+ * Initialize the ASC-38C1600.
  *
- * On failure set the ADV_DVC_VAR field 'err_code' and return ADV_ERROR.
+ * On failure set the ASC_DVC_VAR field 'err_code' and return ADV_ERROR.
  *
  * For a non-fatal error return a warning code. If there are no warnings
  * then 0 is returned.
+ *
+ * Needed after initialization for error recovery.
  */
 STATIC int
-AdvInitAsc38C0800Driver(ADV_DVC_VAR *asc_dvc)
+AdvInitAsc38C1600Driver(ADV_DVC_VAR *asc_dvc)
 {
     AdvPortAddr iop_base;
     ushort      warn_code;
@@ -16302,9 +16284,9 @@
     int         begin_addr;
     int         end_addr;
     ushort      code_sum;
-    int         word;
+    long        word;
     int         j;
-    int         adv_asc38C0800_expanded_size;
+    int         adv_asc38C1600_expanded_size;
     ADV_CARR_T  *carrp;
     ADV_DCNT    contig_len;
     ADV_SDCNT   buf_size;
@@ -16314,8 +16296,8 @@
     uchar       byte;
     uchar       tid;
     ushort      bios_mem[ASC_MC_BIOSLEN/2]; /* BIOS RISC Memory 0x40-0x8F. */
-    ushort      wdtr_able, sdtr_able, tagqng_able;
-    uchar       max_cmd[ADV_MAX_TID + 1];
+    ushort      wdtr_able, sdtr_able, ppr_able, tagqng_able;
+    uchar       max_cmd[ASC_MAX_TID + 1];
 
     /* If there is already an error, don't continue. */
     if (asc_dvc->err_code != 0)
@@ -16324,9 +16306,9 @@
     }
 
     /*
-     * The caller must set 'chip_type' to ADV_CHIP_ASC38C0800.
+     * The caller must set 'chip_type' to ADV_CHIP_ASC38C1600.
      */
-    if (asc_dvc->chip_type != ADV_CHIP_ASC38C0800)
+    if (asc_dvc->chip_type != ADV_CHIP_ASC38C1600)
     {
         asc_dvc->err_code = ASC_IERR_BAD_CHIPTYPE;
         return ADV_ERROR;
@@ -16353,15 +16335,16 @@
      */
     AdvReadWordLram(iop_base, ASC_MC_WDTR_ABLE, wdtr_able);
     AdvReadWordLram(iop_base, ASC_MC_SDTR_ABLE, sdtr_able);
+    AdvReadWordLram(iop_base, ASC_MC_PPR_ABLE, ppr_able);
     AdvReadWordLram(iop_base, ASC_MC_TAGQNG_ABLE, tagqng_able);
-    for (tid = 0; tid <= ADV_MAX_TID; tid++)
+    for (tid = 0; tid <= ASC_MAX_TID; tid++)
     {
         AdvReadByteLram(iop_base, ASC_MC_NUMBER_OF_MAX_CMD + tid,
             max_cmd[tid]);
     }
 
     /*
-     * RAM BIST (RAM Built-In Self Test)
+     * RAM BIST (Built-In Self Test)
      *
      * Address : I/O base + offset 0x38h register (byte).
      * Function: Bit 7-6(RW) : RAM mode
@@ -16440,7 +16423,8 @@
      */
     AdvWriteWordRegister(iop_base, IOPW_RAM_ADDR, 0);
 
-    /* Assume the following compressed format of the microcode buffer:
+    /*
+     * Assume the following compressed format of the microcode buffer:
      *
      *  254 word (508 byte) table indexed by byte code followed
      *  by the following byte codes:
@@ -16456,30 +16440,30 @@
      *      FF BB WW WW: (4 byte code) Emit BB count times next word WW WW.
      */
     word = 0;
-    for (i = 253 * 2; i < _adv_asc38C0800_size; i++)
+    for (i = 253 * 2; i < _adv_asc38C1600_size; i++)
     {
-        if (_adv_asc38C0800_buf[i] == 0xff)
+        if (_adv_asc38C1600_buf[i] == 0xff)
         {
-            for (j = 0; j < _adv_asc38C0800_buf[i + 1]; j++)
+            for (j = 0; j < _adv_asc38C1600_buf[i + 1]; j++)
             {
                 AdvWriteWordAutoIncLram(iop_base, (((ushort)
-                    _adv_asc38C0800_buf[i + 3] << 8) |
-                    _adv_asc38C0800_buf[i + 2]));
+                     _adv_asc38C1600_buf[i + 3] << 8) |
+                     _adv_asc38C1600_buf[i + 2]));
                 word++;
             }
-            i += 3;
-        } else if (_adv_asc38C0800_buf[i] == 0xfe)
+           i += 3;
+        } else if (_adv_asc38C1600_buf[i] == 0xfe)
         {
-            AdvWriteWordAutoIncLram(iop_base, (((ushort)
-                _adv_asc38C0800_buf[i + 2] << 8) |
-                _adv_asc38C0800_buf[i + 1]));
+                AdvWriteWordAutoIncLram(iop_base, (((ushort)
+                     _adv_asc38C1600_buf[i + 2] << 8) |
+                     _adv_asc38C1600_buf[i + 1]));
             i += 2;
             word++;
         } else
         {
             AdvWriteWordAutoIncLram(iop_base, (((ushort)
-                _adv_asc38C0800_buf[(_adv_asc38C0800_buf[i] * 2) + 1] << 8) |
-                _adv_asc38C0800_buf[_adv_asc38C0800_buf[i] * 2]));
+                 _adv_asc38C1600_buf[(_adv_asc38C1600_buf[i] * 2) + 1] << 8) |
+                 _adv_asc38C1600_buf[_adv_asc38C1600_buf[i] * 2]));
             word++;
         }
     }
@@ -16489,12 +16473,12 @@
      * the expanded mcode size.
      */
     word *= 2;
-    adv_asc38C0800_expanded_size = word;
+    adv_asc38C1600_expanded_size = word;
 
     /*
-     * Clear the rest of ASC-38C0800 Internal RAM (16KB).
+     * Clear the rest of ASC-38C1600 Internal RAM (32KB).
      */
-    for (; word < ADV_38C0800_MEMSIZE; word += 2)
+    for (; word < ADV_38C1600_MEMSIZE; word += 2)
     {
         AdvWriteWordAutoIncLram(iop_base, 0);
     }
@@ -16505,17 +16489,12 @@
     sum = 0;
     AdvWriteWordRegister(iop_base, IOPW_RAM_ADDR, 0);
 
-    for (word = 0; word < adv_asc38C0800_expanded_size; word += 2)
+    for (word = 0; word < adv_asc38C1600_expanded_size; word += 2)
     {
         sum += AdvReadWordAutoIncLram(iop_base);
     }
-    ASC_DBG2(1, "AdvInitAsc38C0800Driver: word %d, i %d\n", word, i);
-
-    ASC_DBG2(1,
-        "AdvInitAsc38C0800Driver: sum 0x%lx, _adv_asc38C0800_chksum 0x%lx\n",
-        (ulong) sum, (ulong) _adv_asc38C0800_chksum);
 
-    if (sum != _adv_asc38C0800_chksum)
+    if (sum != _adv_asc38C1600_chksum)
     {
         asc_dvc->err_code |= ASC_IERR_MCODE_CHKSUM;
         return ADV_ERROR;
@@ -16550,9 +16529,9 @@
     AdvReadWordLram(iop_base, ASC_MC_VERSION_NUM, asc_dvc->cfg->mcode_version);
 
     /*
-     * Set the chip type to indicate the ASC38C0800.
+     * Set the chip type to indicate the ASC38C1600.
      */
-    AdvWriteWordLram(iop_base, ASC_MC_CHIP_TYPE, ADV_CHIP_ASC38C0800);
+    AdvWriteWordLram(iop_base, ASC_MC_CHIP_TYPE, ADV_CHIP_ASC38C1600);
 
     /*
      * Write 1 to bit 14 'DIS_TERM_DRV' in the SCSI_CFG1 register.
@@ -16573,26 +16552,30 @@
      */
     if (asc_dvc->cfg->control_flag & CONTROL_FLAG_IGNORE_PERR)
     {
-        /*
-         * Note: Don't remove the use of a temporary variable in
-         * the following code, otherwise the Microsoft C compiler
-         * will turn the following lines into a no-op.
-         */
         AdvReadWordLram(iop_base, ASC_MC_CONTROL_FLAG, word);
         word |= CONTROL_FLAG_IGNORE_PERR;
         AdvWriteWordLram(iop_base, ASC_MC_CONTROL_FLAG, word);
     }
 
     /*
-     * For ASC-38C0800, set FIFO_THRESH_80B [6:4] bits and START_CTL_TH [3:2]
-     * bits for the default FIFO threshold.
-     *
-     * Note: ASC-38C0800 FIFO threshold has been changed to 256 bytes.
-     *
-     * For DMA Errata #4 set the BC_THRESH_ENB bit.
+     * If the BIOS control flag AIPP (Asynchronous Information
+     * Phase Protection) disable bit is not set, then set the firmware
+     * 'control_flag' CONTROL_FLAG_ENABLE_AIPP bit to enable
+     * AIPP checking and encoding.
+     */
+    if ((asc_dvc->bios_ctrl & BIOS_CTRL_AIPP_DIS) == 0)
+    {
+        AdvReadWordLram(iop_base, ASC_MC_CONTROL_FLAG, word);
+        word |= CONTROL_FLAG_ENABLE_AIPP;
+        AdvWriteWordLram(iop_base, ASC_MC_CONTROL_FLAG, word);
+    }
+
+    /*
+     * For ASC-38C1600 use DMA_CFG0 default values: FIFO_THRESH_80B [6:4],
+     * and START_CTL_TH [3:2].
      */
     AdvWriteByteRegister(iop_base, IOPB_DMA_CFG0,
-        BC_THRESH_ENB | FIFO_THRESH_80B | START_CTL_TH | READ_CMD_MRM);
+        FIFO_THRESH_80B | START_CTL_TH | READ_CMD_MRM);
 
     /*
      * Microcode operating variables for WDTR, SDTR, and command tag
@@ -16634,22 +16617,24 @@
      * after it is started below.
      */
     AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_SCSI_CFG0,
-        PARITY_EN | SEL_TMO_LONG | OUR_ID_EN | asc_dvc->chip_scsi_id);
+        PARITY_EN | QUEUE_128 | SEL_TMO_LONG | OUR_ID_EN |
+        asc_dvc->chip_scsi_id);
 
     /*
-     * Determine SCSI_CFG1 Microcode Default Value.
+     * Calculate SCSI_CFG1 Microcode Default Value.
      *
      * The microcode will set the SCSI_CFG1 register using this value
      * after it is started below.
+     *
+     * Each ASC-38C1600 function has only two cable detect bits.
+     * The bus mode override bits are in IOPB_SOFT_OVER_WR.
      */
-
-    /* Read current SCSI_CFG1 Register value. */
     scsi_cfg1 = AdvReadWordRegister(iop_base, IOPW_SCSI_CFG1);
 
     /*
-     * If the internal narrow cable is reversed all of the SCSI_CTRL
-     * register signals will be set. Check for and return an error if
-     * this condition is found.
+     * If the cable is reversed all of the SCSI_CTRL register signals
+     * will be set. Check for and return an error if this condition is
+     * found.
      */
     if ((AdvReadWordRegister(iop_base, IOPW_SCSI_CTRL) & 0x3F07) == 0x3F07)
     {
@@ -16658,13 +16643,12 @@
     }
 
     /*
-     * All kind of combinations of devices attached to one of four connectors
-     * are acceptable except HVD device attached. For example, LVD device can
-     * be attached to SE connector while SE device attached to LVD connector.
-     * If LVD device attached to SE connector, it only runs up to Ultra speed.
+     * Each ASC-38C1600 function has two connectors. Only an HVD device
+     * can not be connected to either connector. An LVD device or SE device
+     * may be connected to either connecor. If an SE device is connected,
+     * then at most Ultra speed (20 Mhz) can be used on both connectors.
      *
-     * If an HVD device is attached to one of LVD connectors, return an error.
-     * However, there is no way to detect HVD device attached to SE connectors.
+     * If an HVD device is attached, return an error.
      */
     if (scsi_cfg1 & HVD)
     {
@@ -16673,12 +16657,17 @@
     }
 
     /*
-     * If either SE or LVD automatic termination control is enabled, then
-     * set the termination value based on a table listed in a_condor.h.
+     * Each function in the ASC-38C1600 uses only the SE cable detect and
+     * termination because there are two connectors for each function. Each
+     * function may use either LVD or SE mode. Corresponding the SE automatic
+     * termination control EEPROM bits are used for each function. Each
+     * function has its own EEPROM. If SE automatic control is enabled for
+     * the function, then set the termination value based on a table listed
+     * in a_condor.h.
      *
-     * If manual termination was specified with an EEPROM setting then
-     * 'termination' was set-up in AdvInitFrom38C0800EEPROM() and is ready to
-     * be 'ored' into SCSI_CFG1.
+     * If manual termination is specified in the EEPROM for the function,
+     * then 'termination' was set-up in AscInitFrom38C1600EEPROM() and is
+     * ready to be 'ored' into SCSI_CFG1.
      */
     if ((asc_dvc->cfg->termination & TERM_SE) == 0)
     {
@@ -16690,51 +16679,44 @@
                 asc_dvc->cfg->termination |= TERM_SE;
                 break;
 
-            /* TERM_SE_HI: on, TERM_SE_LO: off */
-            case 0x0:
-                asc_dvc->cfg->termination |= TERM_SE_HI;
-                break;
-        }
-    }
-
-    if ((asc_dvc->cfg->termination & TERM_LVD) == 0)
-    {
-        /* LVD automatic termination control is enabled. */
-        switch(scsi_cfg1 & C_DET_LVD)
-        {
-            /* TERM_LVD_HI: on, TERM_LVD_LO: on */
-            case 0x4: case 0x8: case 0xC:
-                asc_dvc->cfg->termination |= TERM_LVD;
-                break;
-
-            /* TERM_LVD_HI: off, TERM_LVD_LO: off */
             case 0x0:
+                if (ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info) == 0)
+                {
+                    /* Function 0 - TERM_SE_HI: off, TERM_SE_LO: off */
+                }
+                else
+                {
+                    /* Function 1 - TERM_SE_HI: on, TERM_SE_LO: off */
+                    asc_dvc->cfg->termination |= TERM_SE_HI;
+                }
                 break;
         }
     }
 
     /*
-     * Clear any set TERM_SE and TERM_LVD bits.
+     * Clear any set TERM_SE bits.
      */
-    scsi_cfg1 &= (~TERM_SE & ~TERM_LVD);
+    scsi_cfg1 &= ~TERM_SE;
 
     /*
-     * Invert the TERM_SE and TERM_LVD bits and then set 'scsi_cfg1'.
+     * Invert the TERM_SE bits and then set 'scsi_cfg1'.
      */
-    scsi_cfg1 |= (~asc_dvc->cfg->termination & 0xF0);
+    scsi_cfg1 |= (~asc_dvc->cfg->termination & TERM_SE);
 
     /*
-     * Clear BIG_ENDIAN, DIS_TERM_DRV, Terminator Polarity and HVD/LVD/SE bits
-     * and set possibly modified termination control bits in the Microcode
-     * SCSI_CFG1 Register Value.
+     * Clear Big Endian and Terminator Polarity bits and set possibly
+     * modified termination control bits in the Microcode SCSI_CFG1
+     * Register Value.
+     *
+     * Big Endian bit is not used even on big endian machines.
      */
-    scsi_cfg1 &= (~BIG_ENDIAN & ~DIS_TERM_DRV & ~TERM_POL & ~HVD_LVD_SE);
+    scsi_cfg1 &= (~BIG_ENDIAN & ~DIS_TERM_DRV & ~TERM_POL);
 
     /*
      * Set SCSI_CFG1 Microcode Default Value
      *
-     * Set possibly modified termination control and reset DIS_TERM_DRV
-     * bits in the Microcode SCSI_CFG1 Register Value.
+     * Set possibly modified termination control bits in the Microcode
+     * SCSI_CFG1 Register Value.
      *
      * The microcode will set the SCSI_CFG1 register using this value
      * after it is started below.
@@ -16750,10 +16732,17 @@
      * MEM_CFG may be accessed as a word or byte, but only bits 0-7
      * are defined.
      *
-     * ASC-38C0800 has 16KB internal memory.
+     * ASC-38C1600 has 32KB internal memory.
+     *
+     * XXX - Since ASC38C1600 Rev.3 has a Local RAM failure issue, we come
+     * out a special 16K Adv Library and Microcode version. After the issue
+     * resolved, we should turn back to the 32K support. Both a_condor.h and
+     * mcode.sas files also need to be updated.
+     *
+     * AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_MEM_CFG,
+     *  BIOS_EN | RAM_SZ_32KB);
      */
-    AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_MEM_CFG,
-        BIOS_EN | RAM_SZ_16KB);
+     AdvWriteWordLram(iop_base, ASC_MC_DEFAULT_MEM_CFG, BIOS_EN | RAM_SZ_16KB);
 
     /*
      * Set SEL_MASK Microcode Default Value
@@ -16769,6 +16758,7 @@
      *
      * Driver must have already allocated memory and set 'carrier_buf'.
      */
+
     ASC_ASSERT(asc_dvc->carrier_buf != NULL);
 
     carrp = (ADV_CARR_T *) ADV_16BALIGN(asc_dvc->carrier_buf);
@@ -16803,12 +16793,12 @@
         }
 
         carrp->carr_pa = carr_paddr;
-        carrp->carr_va = ADV_VADDR_TO_U32(carrp);
+        carrp->carr_va = cpu_to_le32(ADV_VADDR_TO_U32(carrp));
 
         /*
          * Insert the carrier at the beginning of the freelist.
          */
-        carrp->next_vpa = ADV_VADDR_TO_U32(asc_dvc->carr_freelist);
+        carrp->next_vpa = cpu_to_le32(ADV_VADDR_TO_U32(asc_dvc->carr_freelist));
         asc_dvc->carr_freelist = carrp;
 
         carrp++;
@@ -16818,25 +16808,27 @@
     /*
      * Set-up the Host->RISC Initiator Command Queue (ICQ).
      */
-
     if ((asc_dvc->icq_sp = asc_dvc->carr_freelist) == NULL)
     {
         asc_dvc->err_code |= ASC_IERR_NO_CARRIER;
         return ADV_ERROR;
     }
-    asc_dvc->carr_freelist =
-        (ADV_CARR_T *) ADV_U32_TO_VADDR(asc_dvc->icq_sp->next_vpa);
+    asc_dvc->carr_freelist = (ADV_CARR_T *)
+        ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->icq_sp->next_vpa));
 
     /*
      * The first command issued will be placed in the stopper carrier.
      */
-    asc_dvc->icq_sp->next_vpa = ASC_CQ_STOPPER;
+    asc_dvc->icq_sp->next_vpa = cpu_to_le32(ASC_CQ_STOPPER);
 
     /*
-     * Set RISC ICQ physical address start value.
+     * Set RISC ICQ physical address start value. Initialize the
+     * COMMA register to the same value otherwise the RISC will
+     * prematurely detect a command is available.
      */
-    AdvWriteDWordLram(iop_base, ASC_MC_ICQ,
-        cpu_to_le32(asc_dvc->icq_sp->carr_pa));
+    AdvWriteDWordLramNoSwap(iop_base, ASC_MC_ICQ, asc_dvc->icq_sp->carr_pa);
+    AdvWriteDWordRegister(iop_base, IOPDW_COMMA,
+        le32_to_cpu(asc_dvc->icq_sp->carr_pa));
 
     /*
      * Set-up the RISC->Host Initiator Response Queue (IRQ).
@@ -16846,8 +16838,8 @@
         asc_dvc->err_code |= ASC_IERR_NO_CARRIER;
         return ADV_ERROR;
     }
-    asc_dvc->carr_freelist =
-        (ADV_CARR_T *) ADV_U32_TO_VADDR(asc_dvc->irq_sp->next_vpa);
+    asc_dvc->carr_freelist = (ADV_CARR_T *)
+        ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->next_vpa));
 
     /*
      * The first command completed by the RISC will be placed in
@@ -16856,22 +16848,16 @@
      * Note: Set 'next_vpa' to ASC_CQ_STOPPER. When the request is
      * completed the RISC will set the ASC_RQ_STOPPER bit.
      */
-    asc_dvc->irq_sp->next_vpa = ASC_CQ_STOPPER;
+    asc_dvc->irq_sp->next_vpa = cpu_to_le32(ASC_CQ_STOPPER);
 
     /*
      * Set RISC IRQ physical address start value.
      */
-    AdvWriteDWordLram(iop_base, ASC_MC_IRQ,
-        cpu_to_le32(asc_dvc->irq_sp->carr_pa));
+    AdvWriteDWordLramNoSwap(iop_base, ASC_MC_IRQ, asc_dvc->irq_sp->carr_pa);
     asc_dvc->carr_pending_cnt = 0;
 
     AdvWriteByteRegister(iop_base, IOPB_INTR_ENABLES,
         (ADV_INTR_ENABLE_HOST_INTR | ADV_INTR_ENABLE_GLOBAL_INTR));
-    /*
-     * Note: Don't remove the use of a temporary variable in
-     * the following code, otherwise the Microsoft C compiler
-     * will turn the following lines into a no-op.
-     */
     AdvReadWordLram(iop_base, ASC_MC_CODE_BEGIN_ADDR, word);
     AdvWriteWordRegister(iop_base, IOPW_PC, word);
 
@@ -16887,8 +16873,7 @@
     {
         /*
          * If the BIOS Signature is present in memory, restore the
-         * BIOS Handshake Configuration Table and do not perform
-         * a SCSI Bus Reset.
+         * per TID microcode operating variables.
          */
         if (bios_mem[(ASC_MC_BIOS_SIGNATURE - ASC_MC_BIOSMEM)/2] == 0x55AA)
         {
@@ -16897,8 +16882,9 @@
              */
             AdvWriteWordLram(iop_base, ASC_MC_WDTR_ABLE, wdtr_able);
             AdvWriteWordLram(iop_base, ASC_MC_SDTR_ABLE, sdtr_able);
+            AdvWriteWordLram(iop_base, ASC_MC_PPR_ABLE, ppr_able);
             AdvWriteWordLram(iop_base, ASC_MC_TAGQNG_ABLE, tagqng_able);
-            for (tid = 0; tid <= ADV_MAX_TID; tid++)
+            for (tid = 0; tid <= ASC_MAX_TID; tid++)
             {
                 AdvWriteByteLram(iop_base, ASC_MC_NUMBER_OF_MAX_CMD + tid,
                     max_cmd[tid]);
@@ -16945,8 +16931,6 @@
      * Read the board's EEPROM configuration.
      *
      * Set default values if a bad checksum is found.
-     *
-     * XXX - Don't handle big-endian access to EEPROM yet.
      */
     if (AdvGet3550EEPConfig(iop_base, &eep_config) != eep_config.check_sum)
     {
@@ -16967,13 +16951,13 @@
          * failed.
          */
         eep_config.serial_number_word3 =
-            AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 1);
+            AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 1);
 
         eep_config.serial_number_word2 =
-            AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 2);
+            AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 2);
 
         eep_config.serial_number_word1 =
-            AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 3);
+            AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 3);
 
         AdvSet3550EEPConfig(iop_base, &eep_config);
     }
@@ -17049,7 +17033,211 @@
     asc_dvc->max_host_qng = eep_config.max_host_qng;
     asc_dvc->max_dvc_qng = eep_config.max_dvc_qng;
 
-
+
+    /*
+     * If the EEPROM 'termination' field is set to automatic (0), then set
+     * the ADV_DVC_CFG 'termination' field to automatic also.
+     *
+     * If the termination is specified with a non-zero 'termination'
+     * value check that a legal value is set and set the ADV_DVC_CFG
+     * 'termination' field appropriately.
+     */
+    if (eep_config.termination == 0)
+    {
+        asc_dvc->cfg->termination = 0;    /* auto termination */
+    } else
+    {
+        /* Enable manual control with low off / high off. */
+        if (eep_config.termination == 1)
+        {
+            asc_dvc->cfg->termination = TERM_CTL_SEL;
+
+        /* Enable manual control with low off / high on. */
+        } else if (eep_config.termination == 2)
+        {
+            asc_dvc->cfg->termination = TERM_CTL_SEL | TERM_CTL_H;
+
+        /* Enable manual control with low on / high on. */
+        } else if (eep_config.termination == 3)
+        {
+            asc_dvc->cfg->termination = TERM_CTL_SEL | TERM_CTL_H | TERM_CTL_L;
+        } else
+        {
+            /*
+             * The EEPROM 'termination' field contains a bad value. Use
+             * automatic termination instead.
+             */
+            asc_dvc->cfg->termination = 0;
+            warn_code |= ASC_WARN_EEPROM_TERMINATION;
+        }
+    }
+
+    return warn_code;
+}
+
+/*
+ * Read the board's EEPROM configuration. Set fields in ADV_DVC_VAR and
+ * ADV_DVC_CFG based on the EEPROM settings. The chip is stopped while
+ * all of this is done.
+ *
+ * On failure set the ADV_DVC_VAR field 'err_code' and return ADV_ERROR.
+ *
+ * For a non-fatal error return a warning code. If there are no warnings
+ * then 0 is returned.
+ *
+ * Note: Chip is stopped on entry.
+ */
+ASC_INITFUNC(
+STATIC int,
+AdvInitFrom38C0800EEP(ADV_DVC_VAR *asc_dvc)
+)
+{
+    AdvPortAddr              iop_base;
+    ushort                   warn_code;
+    ADVEEP_38C0800_CONFIG    eep_config;
+    int                      i;
+    uchar                    tid, termination;
+    ushort                   sdtr_speed = 0;
+
+    iop_base = asc_dvc->iop_base;
+
+    warn_code = 0;
+
+    /*
+     * Read the board's EEPROM configuration.
+     *
+     * Set default values if a bad checksum is found.
+     */
+    if (AdvGet38C0800EEPConfig(iop_base, &eep_config) != eep_config.check_sum)
+    {
+        warn_code |= ASC_WARN_EEPROM_CHKSUM;
+
+        /*
+         * Set EEPROM default values.
+         */
+        for (i = 0; i < sizeof(ADVEEP_38C0800_CONFIG); i++)
+        {
+            *((uchar *) &eep_config + i) =
+                *((uchar *) &Default_38C0800_EEPROM_Config + i);
+        }
+
+        /*
+         * Assume the 6 byte board serial number that was read
+         * from EEPROM is correct even if the EEPROM checksum
+         * failed.
+         */
+        eep_config.serial_number_word3 =
+            AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 1);
+
+        eep_config.serial_number_word2 =
+            AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 2);
+
+        eep_config.serial_number_word1 =
+            AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 3);
+
+        AdvSet38C0800EEPConfig(iop_base, &eep_config);
+    }
+    /*
+     * Set ADV_DVC_VAR and ADV_DVC_CFG variables from the
+     * EEPROM configuration that was read.
+     *
+     * This is the mapping of EEPROM fields to Adv Library fields.
+     */
+    asc_dvc->wdtr_able = eep_config.wdtr_able;
+    asc_dvc->sdtr_speed1 = eep_config.sdtr_speed1;
+    asc_dvc->sdtr_speed2 = eep_config.sdtr_speed2;
+    asc_dvc->sdtr_speed3 = eep_config.sdtr_speed3;
+    asc_dvc->sdtr_speed4 = eep_config.sdtr_speed4;
+    asc_dvc->tagqng_able = eep_config.tagqng_able;
+    asc_dvc->cfg->disc_enable = eep_config.disc_enable;
+    asc_dvc->max_host_qng = eep_config.max_host_qng;
+    asc_dvc->max_dvc_qng = eep_config.max_dvc_qng;
+    asc_dvc->chip_scsi_id = (eep_config.adapter_scsi_id & ADV_MAX_TID);
+    asc_dvc->start_motor = eep_config.start_motor;
+    asc_dvc->scsi_reset_wait = eep_config.scsi_reset_delay;
+    asc_dvc->bios_ctrl = eep_config.bios_ctrl;
+    asc_dvc->no_scam = eep_config.scam_tolerant;
+    asc_dvc->cfg->serial1 = eep_config.serial_number_word1;
+    asc_dvc->cfg->serial2 = eep_config.serial_number_word2;
+    asc_dvc->cfg->serial3 = eep_config.serial_number_word3;
+
+    /*
+     * For every Target ID if any of its 'sdtr_speed[1234]' bits
+     * are set, then set an 'sdtr_able' bit for it.
+     */
+    asc_dvc->sdtr_able = 0;
+    for (tid = 0; tid <= ADV_MAX_TID; tid++)
+    {
+        if (tid == 0)
+        {
+            sdtr_speed = asc_dvc->sdtr_speed1;
+        } else if (tid == 4)
+        {
+            sdtr_speed = asc_dvc->sdtr_speed2;
+        } else if (tid == 8)
+        {
+            sdtr_speed = asc_dvc->sdtr_speed3;
+        } else if (tid == 12)
+        {
+            sdtr_speed = asc_dvc->sdtr_speed4;
+        }
+        if (sdtr_speed & ADV_MAX_TID)
+        {
+            asc_dvc->sdtr_able |= (1 << tid);
+        }
+        sdtr_speed >>= 4;
+    }
+
+    /*
+     * Set the host maximum queuing (max. 253, min. 16) and the per device
+     * maximum queuing (max. 63, min. 4).
+     */
+    if (eep_config.max_host_qng > ASC_DEF_MAX_HOST_QNG)
+    {
+        eep_config.max_host_qng = ASC_DEF_MAX_HOST_QNG;
+    } else if (eep_config.max_host_qng < ASC_DEF_MIN_HOST_QNG)
+    {
+        /* If the value is zero, assume it is uninitialized. */
+        if (eep_config.max_host_qng == 0)
+        {
+            eep_config.max_host_qng = ASC_DEF_MAX_HOST_QNG;
+        } else
+        {
+            eep_config.max_host_qng = ASC_DEF_MIN_HOST_QNG;
+        }
+    }
+
+    if (eep_config.max_dvc_qng > ASC_DEF_MAX_DVC_QNG)
+    {
+        eep_config.max_dvc_qng = ASC_DEF_MAX_DVC_QNG;
+    } else if (eep_config.max_dvc_qng < ASC_DEF_MIN_DVC_QNG)
+    {
+        /* If the value is zero, assume it is uninitialized. */
+        if (eep_config.max_dvc_qng == 0)
+        {
+            eep_config.max_dvc_qng = ASC_DEF_MAX_DVC_QNG;
+        } else
+        {
+            eep_config.max_dvc_qng = ASC_DEF_MIN_DVC_QNG;
+        }
+    }
+
+    /*
+     * If 'max_dvc_qng' is greater than 'max_host_qng', then
+     * set 'max_dvc_qng' to 'max_host_qng'.
+     */
+    if (eep_config.max_dvc_qng > eep_config.max_host_qng)
+    {
+        eep_config.max_dvc_qng = eep_config.max_host_qng;
+    }
+
+    /*
+     * Set ADV_DVC_VAR 'max_host_qng' and ADV_DVC_VAR 'max_dvc_qng'
+     * values based on possibly adjusted EEPROM values.
+     */
+    asc_dvc->max_host_qng = eep_config.max_host_qng;
+    asc_dvc->max_dvc_qng = eep_config.max_dvc_qng;
+
     /*
      * If the EEPROM 'termination' field is set to automatic (0), then set
      * the ADV_DVC_CFG 'termination' field to automatic also.
@@ -17058,32 +17246,63 @@
      * value check that a legal value is set and set the ADV_DVC_CFG
      * 'termination' field appropriately.
      */
-    if (eep_config.termination == 0)
+    if (eep_config.termination_se == 0)
     {
-        asc_dvc->cfg->termination = 0;    /* auto termination */
+        termination = 0;                         /* auto termination for SE */
     } else
     {
         /* Enable manual control with low off / high off. */
-        if (eep_config.termination == 1)
+        if (eep_config.termination_se == 1)
         {
-            asc_dvc->cfg->termination = TERM_CTL_SEL;
+            termination = 0;
 
         /* Enable manual control with low off / high on. */
-        } else if (eep_config.termination == 2)
+        } else if (eep_config.termination_se == 2)
         {
-            asc_dvc->cfg->termination = TERM_CTL_SEL | TERM_CTL_H;
+            termination = TERM_SE_HI;
 
         /* Enable manual control with low on / high on. */
-        } else if (eep_config.termination == 3)
+        } else if (eep_config.termination_se == 3)
         {
-            asc_dvc->cfg->termination = TERM_CTL_SEL | TERM_CTL_H | TERM_CTL_L;
+            termination = TERM_SE;
         } else
         {
             /*
-             * The EEPROM 'termination' field contains a bad value. Use
-             * automatic termination instead.
+             * The EEPROM 'termination_se' field contains a bad value.
+             * Use automatic termination instead.
              */
-            asc_dvc->cfg->termination = 0;
+            termination = 0;
+            warn_code |= ASC_WARN_EEPROM_TERMINATION;
+        }
+    }
+
+    if (eep_config.termination_lvd == 0)
+    {
+        asc_dvc->cfg->termination = termination; /* auto termination for LVD */
+    } else
+    {
+        /* Enable manual control with low off / high off. */
+        if (eep_config.termination_lvd == 1)
+        {
+            asc_dvc->cfg->termination = termination;
+
+        /* Enable manual control with low off / high on. */
+        } else if (eep_config.termination_lvd == 2)
+        {
+            asc_dvc->cfg->termination = termination | TERM_LVD_HI;
+
+        /* Enable manual control with low on / high on. */
+        } else if (eep_config.termination_lvd == 3)
+        {
+            asc_dvc->cfg->termination =
+                termination | TERM_LVD;
+        } else
+        {
+            /*
+             * The EEPROM 'termination_lvd' field contains a bad value.
+             * Use automatic termination instead.
+             */
+            asc_dvc->cfg->termination = termination;
             warn_code |= ASC_WARN_EEPROM_TERMINATION;
         }
     }
@@ -17092,11 +17311,11 @@
 }
 
 /*
- * Read the board's EEPROM configuration. Set fields in ADV_DVC_VAR and
- * ADV_DVC_CFG based on the EEPROM settings. The chip is stopped while
+ * Read the board's EEPROM configuration. Set fields in ASC_DVC_VAR and
+ * ASC_DVC_CFG based on the EEPROM settings. The chip is stopped while
  * all of this is done.
  *
- * On failure set the ADV_DVC_VAR field 'err_code' and return ADV_ERROR.
+ * On failure set the ASC_DVC_VAR field 'err_code' and return ADV_ERROR.
  *
  * For a non-fatal error return a warning code. If there are no warnings
  * then 0 is returned.
@@ -17105,12 +17324,12 @@
  */
 ASC_INITFUNC(
 STATIC int,
-AdvInitFrom38C0800EEP(ADV_DVC_VAR *asc_dvc)
+AdvInitFrom38C1600EEP(ADV_DVC_VAR *asc_dvc)
 )
 {
     AdvPortAddr              iop_base;
     ushort                   warn_code;
-    ADVEEP_38C0800_CONFIG    eep_config;
+    ADVEEP_38C1600_CONFIG    eep_config;
     int                      i;
     uchar                    tid, termination;
     ushort                   sdtr_speed = 0;
@@ -17123,20 +17342,59 @@
      * Read the board's EEPROM configuration.
      *
      * Set default values if a bad checksum is found.
-     *
-     * XXX - Don't handle big-endian access to EEPROM yet.
      */
-    if (AdvGet38C0800EEPConfig(iop_base, &eep_config) != eep_config.check_sum)
+    if (AdvGet38C1600EEPConfig(iop_base, &eep_config) != eep_config.check_sum)
     {
         warn_code |= ASC_WARN_EEPROM_CHKSUM;
 
         /*
          * Set EEPROM default values.
          */
-        for (i = 0; i < sizeof(ADVEEP_38C0800_CONFIG); i++)
+        for (i = 0; i < sizeof(ADVEEP_38C1600_CONFIG); i++)
         {
-            *((uchar *) &eep_config + i) =
-                *((uchar *) &Default_38C0800_EEPROM_Config + i);
+            if (i == 1 && ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info) != 0)
+            {
+                /*
+                 * Set Function 1 EEPROM Word 0 MSB
+                 *
+                 * Clear the BIOS_ENABLE (bit 14) and INTAB (bit 11)
+                 * EEPROM bits.
+                 *
+                 * Disable Bit 14 (BIOS_ENABLE) to fix SPARC Ultra 60 and
+                 * old Mac system booting problem. The Expansion ROM must
+                 * be disabled in Function 1 for these systems.
+                 *
+                 */
+                *((uchar *) &eep_config + i) =
+                ((*((uchar *) &Default_38C1600_EEPROM_Config + i)) &
+                    (~(((ADV_EEPROM_BIOS_ENABLE | ADV_EEPROM_INTAB) >> 8) &
+                     0xFF)));
+
+                /*
+                 * Set the INTAB (bit 11) if the GPIO 0 input indicates
+                 * the Function 1 interrupt line is wired to INTA.
+                 *
+                 * Set/Clear Bit 11 (INTAB) from the GPIO bit 0 input:
+                 *   1 - Function 1 interrupt line wired to INT A.
+                 *   0 - Function 1 interrupt line wired to INT B.
+                 *
+                 * Note: Adapter boards always have Function 0 wired to INTA.
+                 * Put all 5 GPIO bits in input mode and then read
+                 * their input values.
+                 */
+                AdvWriteByteRegister(iop_base, IOPB_GPIO_CNTL, 0);
+                if (AdvReadByteRegister(iop_base, IOPB_GPIO_DATA) & 0x01)
+                {
+                    /* Function 1 interrupt wired to INTA; Set EEPROM bit. */
+                *((uchar *) &eep_config + i) |=
+                    ((ADV_EEPROM_INTAB >> 8) & 0xFF);
+                }
+            }
+            else
+            {
+                *((uchar *) &eep_config + i) =
+                *((uchar *) &Default_38C1600_EEPROM_Config + i);
+            }
         }
 
         /*
@@ -17145,18 +17403,19 @@
          * failed.
          */
         eep_config.serial_number_word3 =
-            AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 1);
+            AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 1);
 
         eep_config.serial_number_word2 =
-            AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 2);
+            AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 2);
 
         eep_config.serial_number_word1 =
-            AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 3);
+            AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 3);
 
-        AdvSet38C0800EEPConfig(iop_base, &eep_config);
+        AdvSet38C1600EEPConfig(iop_base, &eep_config);
     }
+
     /*
-     * Set ADV_DVC_VAR and ADV_DVC_CFG variables from the
+     * Set ASC_DVC_VAR and ASC_DVC_CFG variables from the
      * EEPROM configuration that was read.
      *
      * This is the mapping of EEPROM fields to Adv Library fields.
@@ -17166,25 +17425,23 @@
     asc_dvc->sdtr_speed2 = eep_config.sdtr_speed2;
     asc_dvc->sdtr_speed3 = eep_config.sdtr_speed3;
     asc_dvc->sdtr_speed4 = eep_config.sdtr_speed4;
+    asc_dvc->ppr_able = 0;
     asc_dvc->tagqng_able = eep_config.tagqng_able;
     asc_dvc->cfg->disc_enable = eep_config.disc_enable;
     asc_dvc->max_host_qng = eep_config.max_host_qng;
     asc_dvc->max_dvc_qng = eep_config.max_dvc_qng;
-    asc_dvc->chip_scsi_id = (eep_config.adapter_scsi_id & ADV_MAX_TID);
+    asc_dvc->chip_scsi_id = (eep_config.adapter_scsi_id & ASC_MAX_TID);
     asc_dvc->start_motor = eep_config.start_motor;
     asc_dvc->scsi_reset_wait = eep_config.scsi_reset_delay;
     asc_dvc->bios_ctrl = eep_config.bios_ctrl;
     asc_dvc->no_scam = eep_config.scam_tolerant;
-    asc_dvc->cfg->serial1 = eep_config.serial_number_word1;
-    asc_dvc->cfg->serial2 = eep_config.serial_number_word2;
-    asc_dvc->cfg->serial3 = eep_config.serial_number_word3;
 
     /*
      * For every Target ID if any of its 'sdtr_speed[1234]' bits
      * are set, then set an 'sdtr_able' bit for it.
      */
     asc_dvc->sdtr_able = 0;
-    for (tid = 0; tid <= ADV_MAX_TID; tid++)
+    for (tid = 0; tid <= ASC_MAX_TID; tid++)
     {
         if (tid == 0)
         {
@@ -17199,7 +17456,7 @@
         {
             sdtr_speed = asc_dvc->sdtr_speed4;
         }
-        if (sdtr_speed & ADV_MAX_TID)
+        if (sdtr_speed & ASC_MAX_TID)
         {
             asc_dvc->sdtr_able |= (1 << tid);
         }
@@ -17250,7 +17507,7 @@
     }
 
     /*
-     * Set ADV_DVC_VAR 'max_host_qng' and ADV_DVC_VAR 'max_dvc_qng'
+     * Set ASC_DVC_VAR 'max_host_qng' and ASC_DVC_VAR 'max_dvc_qng'
      * values based on possibly adjusted EEPROM values.
      */
     asc_dvc->max_host_qng = eep_config.max_host_qng;
@@ -17258,10 +17515,10 @@
 
     /*
      * If the EEPROM 'termination' field is set to automatic (0), then set
-     * the ADV_DVC_CFG 'termination' field to automatic also.
+     * the ASC_DVC_CFG 'termination' field to automatic also.
      *
      * If the termination is specified with a non-zero 'termination'
-     * value check that a legal value is set and set the ADV_DVC_CFG
+     * value check that a legal value is set and set the ASC_DVC_CFG
      * 'termination' field appropriately.
      */
     if (eep_config.termination_se == 0)
@@ -17341,25 +17598,37 @@
     ushort              wval, chksum;
     ushort              *wbuf;
     int                 eep_addr;
+    ushort              *charfields;
 
+    charfields = (ushort *) &ADVEEP_3550_Config_Field_IsChar;
     wbuf = (ushort *) cfg_buf;
     chksum = 0;
 
-    for (eep_addr = ASC_EEP_DVC_CFG_BEGIN;
-         eep_addr < ASC_EEP_DVC_CFG_END;
+    for (eep_addr = ADV_EEP_DVC_CFG_BEGIN;
+         eep_addr < ADV_EEP_DVC_CFG_END;
          eep_addr++, wbuf++)
     {
         wval = AdvReadEEPWord(iop_base, eep_addr);
-        chksum += wval;
-        *wbuf = wval;
+        chksum += wval; /* Checksum is calculated from word values. */
+        if (*charfields++) {
+            *wbuf = le16_to_cpu(wval);
+        } else {
+            *wbuf = wval;
+        }
     }
+    /* Read checksum word. */
     *wbuf = AdvReadEEPWord(iop_base, eep_addr);
-    wbuf++;
-    for (eep_addr = ASC_EEP_DVC_CTL_BEGIN;
-         eep_addr < ASC_EEP_MAX_WORD_ADDR;
+    wbuf++; charfields++;
+
+    /* Read rest of EEPROM not covered by the checksum. */
+    for (eep_addr = ADV_EEP_DVC_CTL_BEGIN;
+         eep_addr < ADV_EEP_MAX_WORD_ADDR;
          eep_addr++, wbuf++)
     {
         *wbuf = AdvReadEEPWord(iop_base, eep_addr);
+        if (*charfields++) {
+            *wbuf = le16_to_cpu(*wbuf);
+        }
     }
     return chksum;
 }
@@ -17378,29 +17647,89 @@
     ushort              wval, chksum;
     ushort              *wbuf;
     int                 eep_addr;
+    ushort              *charfields;
 
+    charfields = (ushort *) &ADVEEP_38C0800_Config_Field_IsChar;
     wbuf = (ushort *) cfg_buf;
     chksum = 0;
 
-    for (eep_addr = ASC_EEP_DVC_CFG_BEGIN;
-         eep_addr < ASC_EEP_DVC_CFG_END;
+    for (eep_addr = ADV_EEP_DVC_CFG_BEGIN;
+         eep_addr < ADV_EEP_DVC_CFG_END;
          eep_addr++, wbuf++)
     {
         wval = AdvReadEEPWord(iop_base, eep_addr);
-        chksum += wval;
-        *wbuf = wval;
+        chksum += wval; /* Checksum is calculated from word values. */
+        if (*charfields++) {
+            *wbuf = le16_to_cpu(wval);
+        } else {
+            *wbuf = wval;
+        }
     }
+    /* Read checksum word. */
     *wbuf = AdvReadEEPWord(iop_base, eep_addr);
-    wbuf++;
-    for (eep_addr = ASC_EEP_DVC_CTL_BEGIN;
-         eep_addr < ASC_EEP_MAX_WORD_ADDR;
+    wbuf++; charfields++;
+
+    /* Read rest of EEPROM not covered by the checksum. */
+    for (eep_addr = ADV_EEP_DVC_CTL_BEGIN;
+         eep_addr < ADV_EEP_MAX_WORD_ADDR;
          eep_addr++, wbuf++)
     {
         *wbuf = AdvReadEEPWord(iop_base, eep_addr);
+        if (*charfields++) {
+            *wbuf = le16_to_cpu(*wbuf);
+        }
     }
     return chksum;
 }
 
+/*
+ * Read EEPROM configuration into the specified buffer.
+ *
+ * Return a checksum based on the EEPROM configuration read.
+ */
+ASC_INITFUNC(
+STATIC ushort,
+AdvGet38C1600EEPConfig(AdvPortAddr iop_base,
+                       ADVEEP_38C1600_CONFIG *cfg_buf)
+)
+{
+    ushort              wval, chksum;
+    ushort              *wbuf;
+    int                 eep_addr;
+    ushort              *charfields;
+
+    charfields = (ushort*) &ADVEEP_38C1600_Config_Field_IsChar;
+    wbuf = (ushort *) cfg_buf;
+    chksum = 0;
+
+    for (eep_addr = ADV_EEP_DVC_CFG_BEGIN;
+         eep_addr < ADV_EEP_DVC_CFG_END;
+         eep_addr++, wbuf++)
+    {
+        wval = AdvReadEEPWord(iop_base, eep_addr);
+        chksum += wval; /* Checksum is calculated from word values. */
+        if (*charfields++) {
+            *wbuf = le16_to_cpu(wval);
+        } else {
+            *wbuf = wval;
+        }
+    }
+    /* Read checksum word. */
+    *wbuf = AdvReadEEPWord(iop_base, eep_addr);
+    wbuf++; charfields++;
+
+    /* Read rest of EEPROM not covered by the checksum. */
+    for (eep_addr = ADV_EEP_DVC_CTL_BEGIN;
+         eep_addr < ADV_EEP_MAX_WORD_ADDR;
+         eep_addr++, wbuf++)
+    {
+        *wbuf = AdvReadEEPWord(iop_base, eep_addr);
+        if (*charfields++) {
+            *wbuf = le16_to_cpu(*wbuf);
+        }
+    }
+    return chksum;
+}
 
 /*
  * Read the EEPROM from specified location
@@ -17426,7 +17755,7 @@
 {
     int eep_delay_ms;
 
-    for (eep_delay_ms = 0; eep_delay_ms < ASC_EEP_DELAY_MS; eep_delay_ms++)
+    for (eep_delay_ms = 0; eep_delay_ms < ADV_EEP_DELAY_MS; eep_delay_ms++)
     {
         if (AdvReadWordRegister(iop_base, IOPW_EE_CMD) & ASC_EEP_CMD_DONE)
         {
@@ -17449,41 +17778,57 @@
 {
     ushort *wbuf;
     ushort addr, chksum;
+    ushort *charfields;
 
     wbuf = (ushort *) cfg_buf;
+    charfields = (ushort *) &ADVEEP_3550_Config_Field_IsChar;
     chksum = 0;
 
     AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE_ABLE);
     AdvWaitEEPCmd(iop_base);
 
     /*
-     * Write EEPROM from word 0 to word 20
+     * Write EEPROM from word 0 to word 20.
      */
-    for (addr = ASC_EEP_DVC_CFG_BEGIN;
-         addr < ASC_EEP_DVC_CFG_END; addr++, wbuf++)
+    for (addr = ADV_EEP_DVC_CFG_BEGIN;
+         addr < ADV_EEP_DVC_CFG_END; addr++, wbuf++)
     {
-        chksum += *wbuf;
-        AdvWriteWordRegister(iop_base, IOPW_EE_DATA, *wbuf);
+        ushort word;
+
+        if (*charfields++) {
+            word = cpu_to_le16(*wbuf);
+        } else {
+            word = *wbuf;
+        }
+        chksum += *wbuf; /* Checksum is calculated from word values. */
+        AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word);
         AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
         AdvWaitEEPCmd(iop_base);
-        DvcSleepMilliSecond(ASC_EEP_DELAY_MS);
+        DvcSleepMilliSecond(ADV_EEP_DELAY_MS);
     }
 
     /*
-     * Write EEPROM checksum at word 21
+     * Write EEPROM checksum at word 21.
      */
     AdvWriteWordRegister(iop_base, IOPW_EE_DATA, chksum);
     AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
     AdvWaitEEPCmd(iop_base);
-    wbuf++;        /* skip over check_sum */
+    wbuf++; charfields++;
 
     /*
-     * Write EEPROM OEM name at words 22 to 29
+     * Write EEPROM OEM name at words 22 to 29.
      */
-    for (addr = ASC_EEP_DVC_CTL_BEGIN;
-         addr < ASC_EEP_MAX_WORD_ADDR; addr++, wbuf++)
+    for (addr = ADV_EEP_DVC_CTL_BEGIN;
+         addr < ADV_EEP_MAX_WORD_ADDR; addr++, wbuf++)
     {
-        AdvWriteWordRegister(iop_base, IOPW_EE_DATA, *wbuf);
+        ushort word;
+
+        if (*charfields++) {
+            word = cpu_to_le16(*wbuf);
+        } else {
+            word = *wbuf;
+        }
+        AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word);
         AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
         AdvWaitEEPCmd(iop_base);
     }
@@ -17500,42 +17845,126 @@
                        ADVEEP_38C0800_CONFIG *cfg_buf)
 {
     ushort *wbuf;
+    ushort *charfields;
     ushort addr, chksum;
 
     wbuf = (ushort *) cfg_buf;
+    charfields = (ushort *) &ADVEEP_38C0800_Config_Field_IsChar;
+    chksum = 0;
+
+    AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE_ABLE);
+    AdvWaitEEPCmd(iop_base);
+
+    /*
+     * Write EEPROM from word 0 to word 20.
+     */
+    for (addr = ADV_EEP_DVC_CFG_BEGIN;
+         addr < ADV_EEP_DVC_CFG_END; addr++, wbuf++)
+    {
+        ushort word;
+
+        if (*charfields++) {
+            word = cpu_to_le16(*wbuf);
+        } else {
+            word = *wbuf;
+        }
+        chksum += *wbuf; /* Checksum is calculated from word values. */
+        AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word);
+        AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
+        AdvWaitEEPCmd(iop_base);
+        DvcSleepMilliSecond(ADV_EEP_DELAY_MS);
+    }
+
+    /*
+     * Write EEPROM checksum at word 21.
+     */
+    AdvWriteWordRegister(iop_base, IOPW_EE_DATA, chksum);
+    AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
+    AdvWaitEEPCmd(iop_base);
+    wbuf++; charfields++;
+
+    /*
+     * Write EEPROM OEM name at words 22 to 29.
+     */
+    for (addr = ADV_EEP_DVC_CTL_BEGIN;
+         addr < ADV_EEP_MAX_WORD_ADDR; addr++, wbuf++)
+    {
+        ushort word;
+
+        if (*charfields++) {
+            word = cpu_to_le16(*wbuf);
+        } else {
+            word = *wbuf;
+        }
+        AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word);
+        AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
+        AdvWaitEEPCmd(iop_base);
+    }
+    AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE_DISABLE);
+    AdvWaitEEPCmd(iop_base);
+    return;
+}
+
+/*
+ * Write the EEPROM from 'cfg_buf'.
+ */
+void
+AdvSet38C1600EEPConfig(AdvPortAddr iop_base,
+                       ADVEEP_38C1600_CONFIG *cfg_buf)
+{
+    ushort              *wbuf;
+    ushort              *charfields;
+    ushort              addr, chksum;
+
+    wbuf = (ushort *) cfg_buf;
+    charfields = (ushort *) &ADVEEP_38C1600_Config_Field_IsChar;
     chksum = 0;
 
     AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE_ABLE);
     AdvWaitEEPCmd(iop_base);
 
     /*
-     * Write EEPROM from word 0 to word 20
+     * Write EEPROM from word 0 to word 20.
      */
-    for (addr = ASC_EEP_DVC_CFG_BEGIN;
-         addr < ASC_EEP_DVC_CFG_END; addr++, wbuf++)
+    for (addr = ADV_EEP_DVC_CFG_BEGIN;
+         addr < ADV_EEP_DVC_CFG_END; addr++, wbuf++)
     {
-        chksum += *wbuf;
-        AdvWriteWordRegister(iop_base, IOPW_EE_DATA, *wbuf);
+        ushort word;
+
+        if (*charfields++) {
+            word = cpu_to_le16(*wbuf);
+        } else {
+            word = *wbuf;
+        }
+        chksum += *wbuf; /* Checksum is calculated from word values. */
+        AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word);
         AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
         AdvWaitEEPCmd(iop_base);
-        DvcSleepMilliSecond(ASC_EEP_DELAY_MS);
+        DvcSleepMilliSecond(ADV_EEP_DELAY_MS);
     }
 
     /*
-     * Write EEPROM checksum at word 21
+     * Write EEPROM checksum at word 21.
      */
     AdvWriteWordRegister(iop_base, IOPW_EE_DATA, chksum);
     AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
     AdvWaitEEPCmd(iop_base);
-    wbuf++;        /* skip over check_sum */
+    wbuf++; charfields++;
 
     /*
-     * Write EEPROM OEM name at words 22 to 29
+     * Write EEPROM OEM name at words 22 to 29.
      */
-    for (addr = ASC_EEP_DVC_CTL_BEGIN;
-         addr < ASC_EEP_MAX_WORD_ADDR; addr++, wbuf++)
+    for (addr = ADV_EEP_DVC_CTL_BEGIN;
+         addr < ADV_EEP_MAX_WORD_ADDR; addr++, wbuf++)
     {
-        AdvWriteWordRegister(iop_base, IOPW_EE_DATA, *wbuf);
+        ushort word;
+
+        if (*charfields++) {
+            word = cpu_to_le16(*wbuf);
+        } else {
+            word = *wbuf;
+        }
+        AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word);
         AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr);
         AdvWaitEEPCmd(iop_base);
     }
@@ -17570,7 +17999,7 @@
 AdvExeScsiQueue(ADV_DVC_VAR *asc_dvc,
                 ADV_SCSI_REQ_Q *scsiq)
 {
-    int                    last_int_level;
+    ulong                  last_int_level;
     AdvPortAddr            iop_base;
     ADV_DCNT               req_size;
     ADV_PADDR              req_paddr;
@@ -17598,10 +18027,11 @@
      */
     if ((new_carrp = asc_dvc->carr_freelist) == NULL)
     {
+       DvcLeaveCritical(last_int_level);
        return ADV_BUSY;
     }
-    asc_dvc->carr_freelist =
-        (ADV_CARR_T *) ADV_U32_TO_VADDR(new_carrp->next_vpa);
+    asc_dvc->carr_freelist = (ADV_CARR_T *)
+        ADV_U32_TO_VADDR(le32_to_cpu(new_carrp->next_vpa));
     asc_dvc->carr_pending_cnt++;
 
     /*
@@ -17609,7 +18039,7 @@
      * to the stopper value. The current stopper will be changed
      * below to point to the new stopper.
      */
-    new_carrp->next_vpa = ASC_CQ_STOPPER;
+    new_carrp->next_vpa = cpu_to_le32(ASC_CQ_STOPPER);
 
     /*
      * Clear the ADV_SCSI_REQ_Q done flag.
@@ -17617,17 +18047,20 @@
     scsiq->a_flag &= ~ADV_SCSIQ_DONE;
 
     req_size = sizeof(ADV_SCSI_REQ_Q);
-    req_paddr = cpu_to_le32(DvcGetPhyAddr(asc_dvc, scsiq, (uchar *) scsiq,
-        (ADV_SDCNT *) &req_size, ADV_IS_SCSIQ_FLAG));
+    req_paddr = DvcGetPhyAddr(asc_dvc, scsiq, (uchar *) scsiq,
+        (ADV_SDCNT *) &req_size, ADV_IS_SCSIQ_FLAG);
 
-    ASC_ASSERT(ADV_DWALIGN(req_paddr) == req_paddr);
+    ASC_ASSERT(ADV_32BALIGN(req_paddr) == req_paddr);
     ASC_ASSERT(req_size >= sizeof(ADV_SCSI_REQ_Q));
 
+    /* Wait for assertion before making little-endian */
+    req_paddr = cpu_to_le32(req_paddr);
+
     /* Save virtual and physical address of ADV_SCSI_REQ_Q and carrier. */
-    scsiq->scsiq_ptr = ADV_VADDR_TO_U32(scsiq);
+    scsiq->scsiq_ptr = cpu_to_le32(ADV_VADDR_TO_U32(scsiq));
     scsiq->scsiq_rptr = req_paddr;
 
-    scsiq->carr_va = ADV_VADDR_TO_U32(asc_dvc->icq_sp);
+    scsiq->carr_va = cpu_to_le32(ADV_VADDR_TO_U32(asc_dvc->icq_sp));
     /*
      * Every ADV_CARR_T.carr_pa is byte swapped to little-endian
      * order during initialization.
@@ -17653,18 +18086,30 @@
      */
     asc_dvc->icq_sp = new_carrp;
 
-    /*
-     * Tickle the RISC to tell it to read its Command Queue Head pointer.
-     */
-    AdvWriteByteRegister(iop_base, IOPB_TICKLE, ADV_TICKLE_A);
-    if (asc_dvc->chip_type == ADV_CHIP_ASC3550)
+    if (asc_dvc->chip_type == ADV_CHIP_ASC3550 ||
+        asc_dvc->chip_type == ADV_CHIP_ASC38C0800)
     {
         /*
-         * Clear the tickle value. In the ASC-3550 the RISC flag
-         * command 'clr_tickle_a' does not work unless the host
-         * value is cleared.
+         * Tickle the RISC to tell it to read its Command Queue Head pointer.
          */
-        AdvWriteByteRegister(iop_base, IOPB_TICKLE, ADV_TICKLE_NOP);
+        AdvWriteByteRegister(iop_base, IOPB_TICKLE, ADV_TICKLE_A);
+        if (asc_dvc->chip_type == ADV_CHIP_ASC3550)
+        {
+            /*
+             * Clear the tickle value. In the ASC-3550 the RISC flag
+             * command 'clr_tickle_a' does not work unless the host
+             * value is cleared.
+             */
+            AdvWriteByteRegister(iop_base, IOPB_TICKLE, ADV_TICKLE_NOP);
+        }
+    } else if (asc_dvc->chip_type == ADV_CHIP_ASC38C1600)
+    {
+        /*
+         * Notify the RISC a carrier is ready by writing the physical
+         * address of the new carrier stopper to the COMMA register.
+         */
+        AdvWriteDWordRegister(iop_base, IOPDW_COMMA,
+                le32_to_cpu(new_carrp->carr_pa));
     }
 
     DvcLeaveCritical(last_int_level);
@@ -17731,6 +18176,7 @@
 {
     int         status;
     ushort      wdtr_able, sdtr_able, tagqng_able;
+    ushort      ppr_able = 0;
     uchar       tid, max_cmd[ADV_MAX_TID + 1];
     AdvPortAddr iop_base;
     ushort      bios_sig;
@@ -17742,6 +18188,10 @@
      */
     AdvReadWordLram(iop_base, ASC_MC_WDTR_ABLE, wdtr_able);
     AdvReadWordLram(iop_base, ASC_MC_SDTR_ABLE, sdtr_able);
+    if (asc_dvc->chip_type == ADV_CHIP_ASC38C1600)
+    {
+        AdvReadWordLram(iop_base, ASC_MC_PPR_ABLE, ppr_able);
+    }
     AdvReadWordLram(iop_base, ASC_MC_TAGQNG_ABLE, tagqng_able);
     for (tid = 0; tid <= ADV_MAX_TID; tid++)
     {
@@ -17771,7 +18221,11 @@
      * re-initializing the chip.
      */
     asc_dvc->err_code = 0;
-    if (asc_dvc->chip_type == ADV_CHIP_ASC38C0800)
+    if (asc_dvc->chip_type == ADV_CHIP_ASC38C1600)
+    {
+        status = AdvInitAsc38C1600Driver(asc_dvc);
+    }
+    else if (asc_dvc->chip_type == ADV_CHIP_ASC38C0800)
     {
         status = AdvInitAsc38C0800Driver(asc_dvc);
     } else
@@ -17798,6 +18252,10 @@
      */
     AdvWriteWordLram(iop_base, ASC_MC_WDTR_ABLE, wdtr_able);
     AdvWriteWordLram(iop_base, ASC_MC_SDTR_ABLE, sdtr_able);
+    if (asc_dvc->chip_type == ADV_CHIP_ASC38C1600)
+    {
+        AdvWriteWordLram(iop_base, ASC_MC_PPR_ABLE, ppr_able);
+    }
     AdvWriteWordLram(iop_base, ASC_MC_TAGQNG_ABLE, tagqng_able);
     for (tid = 0; tid <= ADV_MAX_TID; tid++)
     {
@@ -17848,6 +18306,7 @@
     if ((int_stat & (ADV_INTR_STATUS_INTRA | ADV_INTR_STATUS_INTRB |
          ADV_INTR_STATUS_INTRC)) == 0)
     {
+        DvcLeaveCritical(flags);
         return ADV_FALSE;
     }
 
@@ -17861,13 +18320,18 @@
         uchar intrb_code;
 
         AdvReadByteLram(iop_base, ASC_MC_INTRB_CODE, intrb_code);
-        if (intrb_code == ADV_ASYNC_CARRIER_READY_FAILURE &&
-            asc_dvc->carr_pending_cnt != 0)
+
+        if (asc_dvc->chip_type == ADV_CHIP_ASC3550 ||
+            asc_dvc->chip_type == ADV_CHIP_ASC38C0800)
         {
-            AdvWriteByteRegister(iop_base, IOPB_TICKLE, ADV_TICKLE_A);
-            if (asc_dvc->chip_type == ADV_CHIP_ASC3550)
+            if (intrb_code == ADV_ASYNC_CARRIER_READY_FAILURE &&
+                asc_dvc->carr_pending_cnt != 0)
             {
-                AdvWriteByteRegister(iop_base, IOPB_TICKLE, ADV_TICKLE_NOP);
+                AdvWriteByteRegister(iop_base, IOPB_TICKLE, ADV_TICKLE_A);
+                if (asc_dvc->chip_type == ADV_CHIP_ASC3550)
+                {
+                    AdvWriteByteRegister(iop_base, IOPB_TICKLE, ADV_TICKLE_NOP);
+                }
             }
         }
 
@@ -17880,7 +18344,8 @@
     /*
      * Check if the IRQ stopper carrier contains a completed request.
      */
-    while (((irq_next_vpa = asc_dvc->irq_sp->next_vpa) & ASC_RQ_DONE) != 0)
+    while (((irq_next_vpa =
+             le32_to_cpu(asc_dvc->irq_sp->next_vpa)) & ASC_RQ_DONE) != 0)
     {
         /*
          * Get a pointer to the newly completed ADV_SCSI_REQ_Q structure.
@@ -17891,7 +18356,20 @@
          * below complements the conversion of ASC_SCSI_REQ_Q.scsiq_ptr'
          * in AdvExeScsiQueue().
          */
-        scsiq = (ADV_SCSI_REQ_Q *) ADV_U32_TO_VADDR(asc_dvc->irq_sp->areq_vpa);
+        scsiq = (ADV_SCSI_REQ_Q *)
+            ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->areq_vpa));
+
+        /*
+         * Request finished with good status and the queue was not
+         * DMAed to host memory by the firmware. Set all status fields
+         * to indicate good status.
+         */
+        if ((irq_next_vpa & ASC_RQ_GOOD) != 0)
+        {
+            scsiq->done_status = QD_NO_ERROR;
+            scsiq->host_status = scsiq->scsi_status = 0;
+            scsiq->data_cnt = 0L;
+        }
 
         /*
          * Advance the stopper pointer to the next carrier
@@ -17902,7 +18380,8 @@
         asc_dvc->irq_sp = (ADV_CARR_T *)
             ADV_U32_TO_VADDR(ASC_GET_CARRP(irq_next_vpa));
 
-        free_carrp->next_vpa = ADV_VADDR_TO_U32(asc_dvc->carr_freelist);
+        free_carrp->next_vpa =
+                cpu_to_le32(ADV_VADDR_TO_U32(asc_dvc->carr_freelist));
         asc_dvc->carr_freelist = free_carrp;
         asc_dvc->carr_pending_cnt--;
 
@@ -17914,23 +18393,20 @@
          */
         scsiq->cntl = 0;
 
-#if __BIG_ENDIAN
-        /*
-         * After the request completes the only field in the ASC_SCSI_REQ_Q
-         * structure needs to be byte swapped from little endian order to
-         * big endian order is the residual data count.
-         */
-        scsiqp->data_cnt = le32_to_cpu(scsiqp->data_cnt);
-#endif /* __BIG_ENDIAN */
-
         /*
          * If the command that completed was a SCSI INQUIRY and
          * LUN 0 was sent the command, then process the INQUIRY
          * command information for the device.
+         *
+         * Note: If data returned were either VPD or CmdDt data,
+         * don't process the INQUIRY command information for
+         * the device, otherwise may erroneously set *_able bits.
          */
         if (scsiq->done_status == QD_NO_ERROR &&
             scsiq->cdb[0] == SCSICMD_Inquiry &&
-            scsiq->target_lun == 0)
+            scsiq->target_lun == 0 &&
+            (scsiq->cdb[1] & ADV_INQ_RTN_VPD_AND_CMDDT)
+                == ADV_INQ_RTN_STD_INQUIRY_DATA)
         {
             AdvInquiryHandling(asc_dvc, scsiq);
         }
@@ -17982,7 +18458,7 @@
                ushort idle_cmd,
                ADV_DCNT idle_cmd_parameter)
 {
-    int         last_int_level;
+    ulong       last_int_level;
     int         result;
     ADV_DCNT    i, j;
     AdvPortAddr iop_base;
@@ -18005,8 +18481,8 @@
      * followed, the microcode may process the idle command before the
      * parameters have been written to LRAM.
      */
-    AdvWriteDWordLram(iop_base, ASC_MC_IDLE_CMD_PARAMETER,
-        idle_cmd_parameter);
+    AdvWriteDWordLramNoSwap(iop_base, ASC_MC_IDLE_CMD_PARAMETER,
+        cpu_to_le32(idle_cmd_parameter));
     AdvWriteWordLram(iop_base, ASC_MC_IDLE_CMD, idle_cmd);
 
     /*
@@ -18072,7 +18548,8 @@
      * microcode to the transfer residual count.
      */
 
-    if (scsiq->cdb[4] < 8 || (scsiq->cdb[4] - scsiq->data_cnt) < 8)
+    if (scsiq->cdb[4] < 8 ||
+        (scsiq->cdb[4] - le32_to_cpu(scsiq->data_cnt)) < 8)
     {
         return;
     }
@@ -18085,7 +18562,7 @@
     /*
      * WDTR, SDTR, and Tag Queuing cannot be enabled for old devices.
      */
-    if (inq->rsp_data_fmt < 2 && inq->ansi_apr_ver < 2)
+    if (ADV_INQ_RESPONSE_FMT(inq) < 2 && ADV_INQ_ANSI_VER(inq) < 2)
     {
         return;
     } else
@@ -18109,7 +18586,7 @@
          * device's 'wdtr_able' bit and write the new value to the
          * microcode.
          */
-        if ((asc_dvc->wdtr_able & tidmask) && inq->WBus16)
+        if ((asc_dvc->wdtr_able & tidmask) && ADV_INQ_WIDE16(inq))
         {
             AdvReadWordLram(iop_base, ASC_MC_WDTR_ABLE, cfg_word);
             if ((cfg_word & tidmask) == 0)
@@ -18140,7 +18617,7 @@
          * supports synchronous transfers, then turn on the device's
          * 'sdtr_able' bit. Write the new value to the microcode.
          */
-        if ((asc_dvc->sdtr_able & tidmask) && inq->Sync)
+        if ((asc_dvc->sdtr_able & tidmask) && ADV_INQ_SYNC(inq))
         {
             AdvReadWordLram(iop_base, ASC_MC_SDTR_ABLE, cfg_word);
             if ((cfg_word & tidmask) == 0)
@@ -18158,6 +18635,29 @@
                 AdvWriteWordLram(iop_base, ASC_MC_SDTR_DONE, cfg_word);
             }
         }
+        /*
+         * If the Inquiry data included enough space for the SPI-3
+         * Clocking field, then check if DT mode is supported.
+         */
+        if (asc_dvc->chip_type == ADV_CHIP_ASC38C1600 &&
+            (scsiq->cdb[4] >= 57 ||
+            (scsiq->cdb[4] - le32_to_cpu(scsiq->data_cnt)) >= 57))
+        {
+            /*
+             * PPR (Parallel Protocol Request) Capable
+             *
+             * If the device supports DT mode, then it must be PPR capable.
+             * The PPR message will be used in place of the SDTR and WDTR
+             * messages to negotiate synchronous speed and offset, transfer
+             * width, and protocol options.
+             */
+            if (ADV_INQ_CLOCKING(inq) & ADV_INQ_CLOCKING_DT_ONLY)
+            {
+                AdvReadWordLram(iop_base, ASC_MC_PPR_ABLE, asc_dvc->ppr_able);
+                asc_dvc->ppr_able |= tidmask;
+                AdvWriteWordLram(iop_base, ASC_MC_PPR_ABLE, asc_dvc->ppr_able);
+            }
+        }
 
         /*
          * If the EEPROM enabled Tag Queuing for the device and the
@@ -18171,7 +18671,7 @@
          * disabling Tag Queuing in the BIOS devices with Tag Queuing
          * bugs will at least work with the BIOS.
          */
-        if ((asc_dvc->tagqng_able & tidmask) && inq->CmdQue)
+        if ((asc_dvc->tagqng_able & tidmask) && ADV_INQ_CMD_QUEUE(inq))
         {
             AdvReadWordLram(iop_base, ASC_MC_TAGQNG_ABLE, cfg_word);
             cfg_word |= tidmask;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)