diff -purN -X /home/mbligh/.diff.exclude 000-virgin/Documentation/filesystems/proc.txt 999-mjb/Documentation/filesystems/proc.txt --- 000-virgin/Documentation/filesystems/proc.txt 2003-10-01 11:46:27.000000000 -0700 +++ 999-mjb/Documentation/filesystems/proc.txt 2003-11-24 16:26:49.000000000 -0800 @@ -38,6 +38,7 @@ Table of Contents 2.8 /proc/sys/net/ipv4 - IPV4 settings 2.9 Appletalk 2.10 IPX + 2.11 /proc/sys/sched - scheduler tunables ------------------------------------------------------------------------------ Preface @@ -1805,6 +1806,104 @@ The /proc/net/ipx_route table holds a gives the destination network, the router node (or Directly) and the network address of the router (or Connected) for internal networks. +2.11 /proc/sys/sched - scheduler tunables +----------------------------------------- + +Useful knobs for tuning the scheduler live in /proc/sys/sched. + +child_penalty +------------- + +Percentage of the parent's sleep_avg that children inherit. sleep_avg is +a running average of the time a process spends sleeping. Tasks with high +sleep_avg values are considered interactive and given a higher dynamic +priority and a larger timeslice. You typically want this some value just +under 100. + +exit_weight +----------- + +When a CPU hog task exits, its parent's sleep_avg is reduced by a factor of +exit_weight against the exiting task's sleep_avg. + +interactive_delta +----------------- + +If a task is "interactive" it is reinserted into the active array after it +has expired its timeslice, instead of being inserted into the expired array. +How "interactive" a task must be in order to be deemed interactive is a +function of its nice value. This interactive limit is scaled linearly by nice +value and is offset by the interactive_delta. + +max_sleep_avg +------------- + +max_sleep_avg is the largest value (in ms) stored for a task's running sleep +average. The larger this value, the longer a task needs to sleep to be +considered interactive (maximum interactive bonus is a function of +max_sleep_avg). + +max_timeslice +------------- + +Maximum timeslice, in milliseconds. This is the value given to tasks of the +highest dynamic priority. + +min_timeslice +------------- + +Minimum timeslice, in milliseconds. This is the value given to tasks of the +lowest dynamic priority. Every task gets at least this slice of the processor +per array switch. + +parent_penalty +-------------- + +Percentage of the parent's sleep_avg that it retains across a fork(). +sleep_avg is a running average of the time a process spends sleeping. Tasks +with high sleep_avg values are considered interactive and given a higher +dynamic priority and a larger timeslice. Normally, this value is 100 and thus +task's retain their sleep_avg on fork. If you want to punish interactive +tasks for forking, set this below 100. + +prio_bonus_ratio +---------------- + +Middle percentage of the priority range that tasks can receive as a dynamic +priority. The default value of 25% ensures that nice values at the +extremes are still enforced. For example, nice +19 interactive tasks will +never be able to preempt a nice 0 CPU hog. Setting this higher will increase +the size of the priority range the tasks can receive as a bonus. Setting +this lower will decrease this range, making the interactivity bonus less +apparent and user nice values more applicable. + +starvation_limit +---------------- + +Sufficiently interactive tasks are reinserted into the active array when they +run out of timeslice. Normally, tasks are inserted into the expired array. +Reinserting interactive tasks into the active array allows them to remain +runnable, which is important to interactive performance. This could starve +expired tasks, however, since the interactive task could prevent the array +switch. To prevent starving the tasks on the expired array for too long. the +starvation_limit is the longest (in ms) we will let the expired array starve +at the expense of reinserting interactive tasks back into active. Higher +values here give more preferance to running interactive tasks, at the expense +of expired tasks. Lower values provide more fair scheduling behavior, at the +expense of interactivity. The units are in milliseconds. + +idle_node_rebalance_ratio +------------------------- + +On NUMA machines, we normally rebalance within nodes, but we also rebalance +globally every N idle rebalance ticks, where N = idle_node_rebalance_ratio. + +busy_node_rebalance_ratio +------------------------- + +On NUMA machines, we normally rebalance within nodes, but we also rebalance +globally every N busy rebalance ticks, where N = busy_node_rebalance_ratio. + ------------------------------------------------------------------------------ Summary ------------------------------------------------------------------------------ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/Documentation/i386/kgdb/andthen 999-mjb/Documentation/i386/kgdb/andthen --- 000-virgin/Documentation/i386/kgdb/andthen 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/Documentation/i386/kgdb/andthen 2003-11-24 16:13:59.000000000 -0800 @@ -0,0 +1,100 @@ + +define set_andthen + set var $thp=0 + set var $thp=(struct kgdb_and_then_struct *)&kgdb_data[0] + set var $at_size = (sizeof kgdb_data)/(sizeof *$thp) + set var $at_oc=kgdb_and_then_count + set var $at_cc=$at_oc +end + +define andthen_next + set var $at_cc=$arg0 +end + +define andthen + andthen_set_edge + if ($at_cc >= $at_oc) + printf "Outside window. Window size is %d\n",($at_oc-$at_low) + else + printf "%d: ",$at_cc + output *($thp+($at_cc++ % $at_size )) + printf "\n" + end +end +define andthen_set_edge + set var $at_oc=kgdb_and_then_count + set var $at_low = $at_oc - $at_size + if ($at_low < 0 ) + set var $at_low = 0 + end + if (( $at_cc > $at_oc) || ($at_cc < $at_low)) + printf "Count outside of window, setting count to " + if ($at_cc >= $at_oc) + set var $at_cc = $at_oc + else + set var $at_cc = $at_low + end + printf "%d\n",$at_cc + end +end + +define beforethat + andthen_set_edge + if ($at_cc <= $at_low) + printf "Outside window. Window size is %d\n",($at_oc-$at_low) + else + printf "%d: ",$at_cc-1 + output *($thp+(--$at_cc % $at_size )) + printf "\n" + end +end + +document andthen_next + andthen_next + . sets the number of the event to display next. If this event + . is not in the event pool, either andthen or beforethat will + . correct it to the nearest event pool edge. The event pool + . ends at the last event recorded and begins + . prior to that. If beforethat is used next, it will display + . event -1. +. + andthen commands are: set_andthen, andthen_next, andthen and beforethat +end + + +document andthen + andthen +. displays the next event in the list. sets up to display +. the oldest saved event first. +. (optional) count of the event to display. +. note the number of events saved is specified at configure time. +. if events are saved between calls to andthen the index will change +. but the displayed event will be the next one (unless the event buffer +. is overrun). +. +. andthen commands are: set_andthen, andthen_next, andthen and beforethat +end + +document set_andthen + set_andthen +. sets up to use the and commands. +. if you have defined your own struct, use the above and +. then enter the following: +. p $thp=(struct kgdb_and_then_structX *)&kgdb_data[0] +. where is the name of your structure. +. +. andthen commands are: set_andthen, andthen_next, andthen and beforethat +end + +document beforethat + beforethat +. displays the next prior event in the list. sets up to +. display the last occuring event first. +. +. note the number of events saved is specified at configure time. +. if events are saved between calls to beforethat the index will change +. but the displayed event will be the next one (unless the event buffer +. is overrun). +. +. andthen commands are: set_andthen, andthen_next, andthen and beforethat +end diff -purN -X /home/mbligh/.diff.exclude 000-virgin/Documentation/i386/kgdb/debug-nmi.txt 999-mjb/Documentation/i386/kgdb/debug-nmi.txt --- 000-virgin/Documentation/i386/kgdb/debug-nmi.txt 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/Documentation/i386/kgdb/debug-nmi.txt 2003-11-24 16:13:59.000000000 -0800 @@ -0,0 +1,37 @@ +Subject: Debugging with NMI +Date: Mon, 12 Jul 1999 11:28:31 -0500 +From: David Grothe +Organization: Gcom, Inc +To: David Grothe + +Kernel hackers: + +Maybe this is old hat, but it is new to me -- + +On an ISA bus machine, if you short out the A1 and B1 pins of an ISA +slot you will generate an NMI to the CPU. This interrupts even a +machine that is hung in a loop with interrupts disabled. Used in +conjunction with kgdb < +ftp://ftp.gcom.com/pub/linux/src/kgdb-2.3.35/kgdb-2.3.35.tgz > you can +gain debugger control of a machine that is hung in the kernel! Even +without kgdb the kernel will print a stack trace so you can find out +where it was hung. + +The A1/B1 pins are directly opposite one another and the farthest pins +towards the bracket end of the ISA bus socket. You can stick a paper +clip or multi-meter probe between them to short them out. + +I had a spare ISA bus to PC104 bus adapter around. The PC104 end of the +board consists of two rows of wire wrap pins. So I wired a push button +between the A1/B1 pins and now have an ISA board that I can stick into +any ISA bus slot for debugger entry. + +Microsoft has a circuit diagram of a PCI card at +http://www.microsoft.com/hwdev/DEBUGGING/DMPSW.HTM. If you want to +build one you will have to mail them and ask for the PAL equations. +Nobody makes one comercially. + +[THIS TIP COMES WITH NO WARRANTY WHATSOEVER. It works for me, but if +your machine catches fire, it is your problem, not mine.] + +-- Dave (the kgdb guy) diff -purN -X /home/mbligh/.diff.exclude 000-virgin/Documentation/i386/kgdb/gdb-globals.txt 999-mjb/Documentation/i386/kgdb/gdb-globals.txt --- 000-virgin/Documentation/i386/kgdb/gdb-globals.txt 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/Documentation/i386/kgdb/gdb-globals.txt 2003-11-24 16:13:59.000000000 -0800 @@ -0,0 +1,71 @@ +Sender: akale@veritas.com +Date: Fri, 23 Jun 2000 19:26:35 +0530 +From: "Amit S. Kale" +Organization: Veritas Software (India) +To: Dave Grothe , linux-kernel@vger.rutgers.edu +CC: David Milburn , + "Edouard G. Parmelan" , + ezannoni@cygnus.com, Keith Owens +Subject: Re: Module debugging using kgdb + +Dave Grothe wrote: +> +> Amit: +> +> There is a 2.4.0 version of kgdb on our ftp site: +> ftp://ftp.gcom.com/pub/linux/src/kgdb. I mirrored your version of gdb +> and loadmodule.sh there. +> +> Have a look at the README file and see if I go it right. If not, send +> me some corrections and I will update it. +> +> Does your version of gdb solve the global variable problem? + +Yes. +Thanks to Elena Zanoni, gdb (developement version) can now calculate +correctly addresses of dynamically loaded object files. I have not been +following gdb developement for sometime and am not sure when symbol +address calculation fix is going to appear in a gdb stable version. + +Elena, any idea when the fix will make it to a prebuilt gdb from a +redhat release? + +For the time being I have built a gdb developement version. It can be +used for module debugging with loadmodule.sh script. + +The problem with calculating of module addresses with previous versions +of gdb was as follows: +gdb did not use base address of a section while calculating address of +a symbol in the section in an object file loaded via 'add-symbol-file'. +It used address of .text segment instead. Due to this addresses of +symbols in .data, .bss etc. (e.g. global variables) were calculated incorrectly. + +Above mentioned fix allow gdb to use base address of a segment while +calculating address of a symbol in it. It adds a parameter '-s' to +'add-symbol-file' command for specifying base address of a segment. + +loadmodule.sh script works as follows. + +1. Copy a module file to target machine. +2. Load the module on the target machine using insmod with -m parameter. +insmod produces a module load map which contains base addresses of all +sections in the module and addresses of symbols in the module file. +3. Find all sections and their base addresses in the module from +the module map. +4. Generate a script that loads the module file. The script uses +'add-symbol-file' and specifies address of text segment followed by +addresses of all segments in the module. + +Here is an example gdb script produced by loadmodule.sh script. + +add-symbol-file foo 0xd082c060 -s .text.lock 0xd08cbfb5 +-s .fixup 0xd08cfbdf -s .rodata 0xd08cfde0 -s __ex_table 0xd08e3b38 +-s .data 0xd08e3d00 -s .bss 0xd08ec8c0 -s __ksymtab 0xd08ee838 + +With this command gdb can calculate addresses of symbols in ANY segment +in a module file. + +Regards. +-- +Amit Kale +Veritas Software ( http://www.veritas.com ) diff -purN -X /home/mbligh/.diff.exclude 000-virgin/Documentation/i386/kgdb/gdbinit 999-mjb/Documentation/i386/kgdb/gdbinit --- 000-virgin/Documentation/i386/kgdb/gdbinit 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/Documentation/i386/kgdb/gdbinit 2003-11-24 16:13:59.000000000 -0800 @@ -0,0 +1,14 @@ +shell echo -e "\003" >/dev/ttyS0 +set remotebaud 38400 +target remote /dev/ttyS0 +define si +stepi +printf "EAX=%08x EBX=%08x ECX=%08x EDX=%08x\n", $eax, $ebx, $ecx, $edx +printf "ESI=%08x EDI=%08x EBP=%08x ESP=%08x\n", $esi, $edi, $ebp, $esp +x/i $eip +end +define ni +nexti +printf "EAX=%08x EBX=%08x ECX=%08x EDX=%08x\n", $eax, $ebx, $ecx, $edx +printf "ESI=%08x EDI=%08x EBP=%08x ESP=%08x\n", $esi, $edi, $ebp, $esp +x/i $eip diff -purN -X /home/mbligh/.diff.exclude 000-virgin/Documentation/i386/kgdb/gdbinit-modules 999-mjb/Documentation/i386/kgdb/gdbinit-modules --- 000-virgin/Documentation/i386/kgdb/gdbinit-modules 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/Documentation/i386/kgdb/gdbinit-modules 2003-11-24 16:13:59.000000000 -0800 @@ -0,0 +1,146 @@ +# +# Usefull GDB user-command to debug Linux Kernel Modules with gdbstub. +# +# This don't work for Linux-2.0 or older. +# +# Author Edouard G. Parmelan +# +# +# Fri Apr 30 20:33:29 CEST 1999 +# First public release. +# +# Major cleanup after experiment Linux-2.0 kernel without success. +# Symbols of a module are not in the correct order, I can't explain +# why :( +# +# Fri Mar 19 15:41:40 CET 1999 +# Initial version. +# +# Thu Jan 6 16:29:03 CST 2000 +# A little fixing by Dave Grothe +# +# Mon Jun 19 09:33:13 CDT 2000 +# Alignment changes from Edouard Parmelan +# +# The basic idea is to find where insmod load the module and inform +# GDB to load the symbol table of the module with the GDB command +# ``add-symbol-file
''. +# +# The Linux kernel holds the list of all loaded modules in module_list, +# this list end with &kernel_module (exactly with module->next == NULL, +# but the last module is not a real module). +# +# Insmod allocates the struct module before the object file. Since +# Linux-2.1, this structure contain his size. The real address of +# the object file is then (char*)module + module->size_of_struct. +# +# You can use three user functions ``mod-list'', ``mod-print-symbols'' +# and ``add-module-symbols''. +# +# mod-list list all loaded modules with the format: +# +# +# As soon as you have found the address of your module, you can +# print its exported symbols (mod-print-symbols) or inform GDB to add +# symbols from your module file (mod-add-symbols). +# +# The argument that you give to mod-print-symbols or mod-add-symbols +# is the from the mod-list command. +# +# When using the mod-add-symbols command you must also give the full +# pathname of the modules object code file. +# +# The command mod-add-lis is an example of how to make this easier. +# You can edit this macro to contain the path name of your own +# favorite module and then use it as a shorthand to load it. You +# still need the module-address, however. +# +# The internal function ``mod-validate'' set the GDB variable $mod +# as a ``struct module*'' if the kernel known the module otherwise +# $mod is set to NULL. This ensure to not add symbols for a wrong +# address. +# +# Have a nice hacking day ! +# +# +define mod-list + set $mod = (struct module*)module_list + # the last module is the kernel, ignore it + while $mod != &kernel_module + printf "%p\t%s\n", (long)$mod, ($mod)->name + set $mod = $mod->next + end +end +document mod-list +List all modules in the form: +Use the as the argument for the other +mod-commands: mod-print-symbols, mod-add-symbols. +end + +define mod-validate + set $mod = (struct module*)module_list + while ($mod != $arg0) && ($mod != &kernel_module) + set $mod = $mod->next + end + if $mod == &kernel_module + set $mod = 0 + printf "%p is not a module\n", $arg0 + end +end +document mod-validate +mod-validate +Internal user-command used to validate the module parameter. +If is a real loaded module, set $mod to it otherwise set $mod to 0. +end + + +define mod-print-symbols + mod-validate $arg0 + if $mod != 0 + set $i = 0 + while $i < $mod->nsyms + set $sym = $mod->syms[$i] + printf "%p\t%s\n", $sym->value, $sym->name + set $i = $i + 1 + end + end +end +document mod-print-symbols +mod-print-symbols +Print all exported symbols of the module. see mod-list +end + + +define mod-add-symbols-align + mod-validate $arg0 + if $mod != 0 + set $mod_base = ($mod->size_of_struct + (long)$mod) + if ($arg2 != 0) && (($mod_base & ($arg2 - 1)) != 0) + set $mod_base = ($mod_base | ($arg2 - 1)) + 1 + end + add-symbol-file $arg1 $mod_base + end +end +document mod-add-symbols-align +mod-add-symbols-align +Load the symbols table of the module from the object file where +first section aligment is . +To retreive alignment, use `objdump -h '. +end + +define mod-add-symbols + mod-add-symbols-align $arg0 $arg1 sizeof(long) +end +document mod-add-symbols +mod-add-symbols +Load the symbols table of the module from the object file. +Default alignment is 4. See mod-add-symbols-align. +end + +define mod-add-lis + mod-add-symbols-align $arg0 /usr/src/LiS/streams.o 16 +end +document mod-add-lis +mod-add-lis +Does mod-add-symbols /usr/src/LiS/streams.o +end diff -purN -X /home/mbligh/.diff.exclude 000-virgin/Documentation/i386/kgdb/gdbinit.hw 999-mjb/Documentation/i386/kgdb/gdbinit.hw --- 000-virgin/Documentation/i386/kgdb/gdbinit.hw 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/Documentation/i386/kgdb/gdbinit.hw 2003-11-24 16:13:59.000000000 -0800 @@ -0,0 +1,117 @@ + +#Using ia-32 hardware breakpoints. +# +#4 hardware breakpoints are available in ia-32 processors. These breakpoints +#do not need code modification. They are set using debug registers. +# +#Each hardware breakpoint can be of one of the +#three types: execution, write, access. +#1. An Execution breakpoint is triggered when code at the breakpoint address is +#executed. +#2. A write breakpoint ( aka watchpoints ) is triggered when memory location +#at the breakpoint address is written. +#3. An access breakpoint is triggered when memory location at the breakpoint +#address is either read or written. +# +#As hardware breakpoints are available in limited number, use software +#breakpoints ( br command in gdb ) instead of execution hardware breakpoints. +# +#Length of an access or a write breakpoint defines length of the datatype to +#be watched. Length is 1 for char, 2 short , 3 int. +# +#For placing execution, write and access breakpoints, use commands +#hwebrk, hwwbrk, hwabrk +#To remove a breakpoint use hwrmbrk command. +# +#These commands take following types of arguments. For arguments associated +#with each command, use help command. +#1. breakpointno: 0 to 3 +#2. length: 1 to 3 +#3. address: Memory location in hex ( without 0x ) e.g c015e9bc +# +#Use the command exinfo to find which hardware breakpoint occured. + +#hwebrk breakpointno address +define hwebrk + maintenance packet Y$arg0,0,0,$arg1 +end +document hwebrk + hwebrk
+ Places a hardware execution breakpoint + = 0 - 3 +
= Hex digits without leading "0x". +end + +#hwwbrk breakpointno length address +define hwwbrk + maintenance packet Y$arg0,1,$arg1,$arg2 +end +document hwwbrk + hwwbrk
+ Places a hardware write breakpoint + = 0 - 3 + = 1 (1 byte), 2 (2 byte), 3 (4 byte) +
= Hex digits without leading "0x". +end + +#hwabrk breakpointno length address +define hwabrk + maintenance packet Y$arg0,1,$arg1,$arg2 +end +document hwabrk + hwabrk
+ Places a hardware access breakpoint + = 0 - 3 + = 1 (1 byte), 2 (2 byte), 3 (4 byte) +
= Hex digits without leading "0x". +end + +#hwrmbrk breakpointno +define hwrmbrk + maintenance packet y$arg0 +end +document hwrmbrk + hwrmbrk + = 0 - 3 + Removes a hardware breakpoint +end + +define reboot + maintenance packet r +end +#exinfo +define exinfo + maintenance packet qE +end +document exinfo + exinfo + Gives information about a breakpoint. +end +define get_th + p $th=(struct thread_info *)((int)$esp & ~8191) +end +document get_th + get_tu + Gets and prints the current thread_info pointer, Defines th to be it. +end +define get_cu + p $cu=((struct thread_info *)((int)$esp & ~8191))->task +end +document get_cu + get_cu + Gets and print the "current" value. Defines $cu to be it. +end +define int_off + set var $flags=$eflags + set $eflags=$eflags&~0x200 + end +define int_on + set var $eflags|=$flags&0x200 + end +document int_off + saves the current interrupt state and clears the processor interrupt + flag. Use int_on to restore the saved flag. +end +document int_on + Restores the interrupt flag saved by int_off. +end diff -purN -X /home/mbligh/.diff.exclude 000-virgin/Documentation/i386/kgdb/kgdb.txt 999-mjb/Documentation/i386/kgdb/kgdb.txt --- 000-virgin/Documentation/i386/kgdb/kgdb.txt 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/Documentation/i386/kgdb/kgdb.txt 2003-11-24 16:13:59.000000000 -0800 @@ -0,0 +1,775 @@ +Last edit: <20030806.1637.12> +This file has information specific to the i386 kgdb option. Other +platforms with the kgdb option may behave in a similar fashion. + +New features: +============ +20030806.1557.37 +This version was made against the 2.6.0-test2 kernel. We have made the +following changes: + +- The getthread() code in the stub calls find_task_by_pid(). It fails + if we are early in the bring up such that the pid arrays have yet to + be allocated. We have added a line to kernel/pid.c to make + "kgdb_pid_init_done" true once the arrays are allocated. This way the + getthread() code knows not to call. This is only used by the thread + debugging stuff and threads will not yet exist at this point in the + boot. + +- For some reason, gdb was not asking for a new thread list when the + "info thread" command was given. We changed to the newer version of + the thread info command and gdb now seems to ask when needed. Result, + we now get all threads in the thread list. + +- We now respond to the ThreadExtraInfo request from gdb with the thread + name from task_struct .comm. This then appears in the thread list. + Thoughts on additional options for this are welcome. Things such as + "has BKL" and "Preempted" come to mind. I think we could have a flag + word that could enable different bits of info here. + +- We now honor, sort of, the C and S commands. These are continue and + single set after delivering a signal. We ignore the signal and do the + requested action. This only happens when we told gdb that a signal + was the reason for entry, which is only done on memory faults. The + result is that you can now continue into the Oops. + +- We changed the -g to -gdwarf-2. This seems to be the same as -ggdb, + but it is more exact on what language to use. + +- We added two dwarf2 include files and a bit of code at the end of + entry.S. This does not yet work, so it is disabled. Still we want to + keep track of the code and "maybe" someone out there can fix it. + +- Randy Dunlap sent some fix ups for this file which are now merged. + +- Hugh Dickins sent a fix to a bit of code in traps.c that prevents a + compiler warning if CONFIG_KGDB is off (now who would do that :). + +- Andrew Morton sent a fix for the serial driver which is now merged. + +- Andrew also sent a change to the stub around the cpu managment code + which is also merged. + +- Andrew also sent a patch to make "f" as well as "g" work as SysRq + commands to enter kgdb, merged. + +- If CONFIG_KGDB and CONFIG_DEBUG_SPINLOCKS are both set we added a + "who" field to the spinlock data struct. This is filled with + "current" when ever the spinlock suceeds. Useful if you want to know + who has the lock. + +_ And last, but not least, we fixed the "get_cu" macro to properly get + the current value of "current". + +New features: +============ +20030505.1827.27 +We are starting to align with the sourceforge version, at least in +commands. To this end, the boot command string to start kgdb at +boot time has been changed from "kgdb" to "gdb". + +Andrew Morton sent a couple of patches which are now included as follows: +1.) We now return a flag to the interrupt handler. +2.) We no longer use smp_num_cpus (a conflict with the lock meter). +3.) And from William Lee Irwin III code to make + sure high-mem is set up before we attempt to register our interrupt + handler. +We now include asm/kgdb.h from config.h so you will most likely never +have to include it. It also 'NULLS' the kgdb macros you might have in +your code when CONFIG_KGDB is not defined. This allows you to just +turn off CONFIG_KGDB to turn off all the kgdb_ts() calls and such. +This include is conditioned on the machine being an x86 so as to not +mess with other archs. + +20020801.1129.03 +This is currently the version for the 2.4.18 (and beyond?) kernel. + +We have several new "features" beginning with this version: + +1.) Kgdb now syncs the "other" CPUs with a cross-CPU NMI. No more + waiting and it will pull that guy out of an IRQ off spin lock :) + +2.) We doctored up the code that tells where a task is waiting and + included it so that the "info thread" command will show a bit more + than "schedule()". Try it... + +3.) Added the ability to call a function from gdb. All the standard gdb + issues apply, i.e. if you hit a breakpoint in the function, you are + not allowed to call another (gdb limitation, not kgdb). To help + this capability we added a memory allocation function. Gdb does not + return this memory (it is used for strings that you pass to that function + you are calling from gdb) so we fixed up a way to allow you to + manually return the memory (see below). + +4.) Kgdb time stamps (kgdb_ts()) are enhanced to expand what was the + interrupt flag to now also include the preemption count and the + "in_interrupt" info. The flag is now called "with_pif" to indicate + the order, preempt_count, in_interrupt, flag. The preempt_count is + shifted left by 4 bits so you can read the count in hex by dropping + the low order digit. In_interrupt is in bit 1, and the flag is in + bit 0. + +5.) The command: "p kgdb_info" is now expanded and prints something + like: +(gdb) p kgdb_info +$2 = {used_malloc = 0, called_from = 0xc0107506, entry_tsc = 67468627259, + errcode = 0, vector = 3, print_debug_info = 0, hold_on_sstep = 1, + cpus_waiting = {{task = 0xc027a000, pid = 32768, hold = 0, + regs = 0xc027bf84}, {task = 0x0, pid = 0, hold = 0, regs = 0x0}}} + + Things to note here: a.) used_malloc is the amount of memory that + has been malloc'ed to do calls from gdb. You can reclaim this + memory like this: "p kgdb_info.used_malloc=0" Cool, huh? b.) + cpus_waiting is now "sized" by the number of CPUs you enter at + configure time in the kgdb configure section. This is NOT used + anywhere else in the system, but it is "nice" here. c.) The task's + "pid" is now in the structure. This is the pid you will need to use + to decode to the thread id to get gdb to look at that thread. + Remember that the "info thread" command prints a list of threads + wherein it numbers each thread with its reference number followed + by the thread's pid. Note that the per-CPU idle threads actually + have pids of 0 (yes, there is more than one pid 0 in an SMP system). + To avoid confusion, kgdb numbers these threads with numbers beyond + the MAX_PID. That is why you see 32768 and above. + +6.) A subtle change, we now provide the complete register set for tasks + that are active on the other CPUs. This allows better trace back on + those tasks. + + And, let's mention what we could not fix. Back-trace from all but the + thread that we trapped will, most likely, have a bogus entry in it. + The problem is that gdb does not recognize the entry code for + functions that use "current" near (at all?) the entry. The compiler + is putting the "current" decode as the first two instructions of the + function where gdb expects to find %ebp changing code. Back trace + also has trouble with interrupt frames. I am talking with Daniel + Jacobowitz about some way to fix this, but don't hold your breath. + +20011220.0050.35 +Major enhancement with this version is the ability to hold one or more +CPUs in an SMP system while allowing the others to continue. Also, by +default only the current CPU is enabled on single-step commands (please +note that gdb issues single-step commands at times other than when you +use the si command). + +Another change is to collect some useful information in +a global structure called "kgdb_info". You should be able to just: + +p kgdb_info + +although I have seen cases where the first time this is done gdb just +prints the first member but prints the whole structure if you then enter +CR (carriage return or enter). This also works: + +p *&kgdb_info + +Here is a sample: +(gdb) p kgdb_info +$4 = {called_from = 0xc010732c, entry_tsc = 32804123790856, errcode = 0, + vector = 3, print_debug_info = 0} + +"Called_from" is the return address from the current entry into kgdb. +Sometimes it is useful to know why you are in kgdb, for example, was +it an NMI or a real breakpoint? The simple way to interrogate this +return address is: + +l *0xc010732c + +which will print the surrounding few lines of source code. + +"Entry_tsc" is the CPU TSC on entry to kgdb (useful to compare to the +kgdb_ts entries). + +"errcode" and "vector" are other entry parameters which may be helpful on +some traps. + +"print_debug_info" is the internal debugging kgdb print enable flag. Yes, +you can modify it. + +In SMP systems kgdb_info also includes the "cpus_waiting" structure and +"hold_on_step": + +(gdb) p kgdb_info +$7 = {called_from = 0xc0112739, entry_tsc = 1034936624074, errcode = 0, + vector = 2, print_debug_info = 0, hold_on_sstep = 1, cpus_waiting = {{ + task = 0x0, hold = 0, regs = 0x0}, {task = 0xc71b8000, hold = 0, + regs = 0xc71b9f70}, {task = 0x0, hold = 0, regs = 0x0}, {task = 0x0, + hold = 0, regs = 0x0}, {task = 0x0, hold = 0, regs = 0x0}, {task = 0x0, + hold = 0, regs = 0x0}, {task = 0x0, hold = 0, regs = 0x0}, {task = 0x0, + hold = 0, regs = 0x0}}} + +"Cpus_waiting" has an entry for each CPU other than the current one that +has been stopped. Each entry contains the task_struct address for that +CPU, the address of the regs for that task and a hold flag. All these +have the proper typing so that, for example: + +p *kgdb_info.cpus_waiting[1].regs + +will print the registers for CPU 1. + +"Hold_on_sstep" is a new feature with this version and comes up set or +true. What this means is that whenever kgdb is asked to single-step all +other CPUs are held (i.e. not allowed to execute). The flag applies to +all but the current CPU and, again, can be changed: + +p kgdb_info.hold_on_sstep=0 + +restores the old behavior of letting all CPUs run during single-stepping. + +Likewise, each CPU has a "hold" flag, which if set, locks that CPU out +of execution. Note that this has some risk in cases where the CPUs need +to communicate with each other. If kgdb finds no CPU available on exit, +it will push a message thru gdb and stay in kgdb. Note that it is legal +to hold the current CPU as long as at least one CPU can execute. + +20010621.1117.09 +This version implements an event queue. Events are signaled by calling +a function in the kgdb stub and may be examined from gdb. See EVENTS +below for details. This version also tightens up the interrupt and SMP +handling to not allow interrupts on the way to kgdb from a breakpoint +trap. It is fine to allow these interrupts for user code, but not +system debugging. + +Version +======= + +This version of the kgdb package was developed and tested on +kernel version 2.4.16. It will not install on any earlier kernels. +It is possible that it will continue to work on later versions +of 2.4 and then versions of 2.5 (I hope). + + +Debugging Setup +=============== + +Designate one machine as the "development" machine. This is the +machine on which you run your compiles and which has your source +code for the kernel. Designate a second machine as the "target" +machine. This is the machine that will run your experimental +kernel. + +The two machines will be connected together via a serial line out +one or the other of the COM ports of the PC. You will need the +appropriate modem eliminator (null modem) cable(s) for this. + +Decide on which tty port you want the machines to communicate, then +connect them up back-to-back using the null modem cable. COM1 is +/dev/ttyS0 and COM2 is /dev/ttyS1. You should test this connection +with the two machines prior to trying to debug a kernel. Once you +have it working, on the TARGET machine, enter: + +setserial /dev/ttyS0 (or what ever tty you are using) + +and record the port address and the IRQ number. + +On the DEVELOPMENT machine you need to apply the patch for the kgdb +hooks. You have probably already done that if you are reading this +file. + +On your DEVELOPMENT machine, go to your kernel source directory and do +"make Xconfig" where X is one of "x", "menu", or "". If you are +configuring in the standard serial driver, it must not be a module. +Either yes or no is ok, but making the serial driver a module means it +will initialize after kgdb has set up the UART interrupt code and may +cause a failure of the control-C option discussed below. The configure +question for the serial driver is under the "Character devices" heading +and is: + +"Standard/generic (8250/16550 and compatible UARTs) serial support" + +Go down to the kernel debugging menu item and open it up. Enable the +kernel kgdb stub code by selecting that item. You can also choose to +turn on the "-ggdb -O1" compile options. The -ggdb causes the compiler +to put more debug info (like local symbols) in the object file. On the +i386 -g and -ggdb are the same so this option just reduces to "O1". The +-O1 reduces the optimization level. This may be helpful in some cases, +be aware, however, that this may also mask the problem you are looking +for. + +The baud rate. Default is 115200. What ever you choose be sure that +the host machine is set to the same speed. I recommend the default. + +The port. This is the I/O address of the serial UART that you should +have gotten using setserial as described above. The standard COM1 port +(3f8) using IRQ 4 is default. COM2 is 2f8 which by convention uses IRQ +3. + +The port IRQ (see above). + +Stack overflow test. This option makes a minor change in the trap, +system call and interrupt code to detect stack overflow and transfer +control to kgdb if it happens. (Some platforms have this in the +baseline code, but the i386 does not.) + +You can also configure the system to recognize the boot option +"console=kgdb" which if given will cause all console output during +booting to be put thru gdb as well as other consoles. This option +requires that gdb and kgdb be connected prior to sending console output +so, if they are not, a breakpoint is executed to force the connection. +This will happen before any kernel output (it is going thru gdb, right), +and will stall the boot until the connection is made. + +You can also configure in a patch to SysRq to enable the kGdb SysRq. +This request generates a breakpoint. Since the serial port IRQ line is +set up after any serial drivers, it is possible that this command will +work when the control-C will not. + +Save and exit the Xconfig program. Then do "make clean" , "make dep" +and "make bzImage" (or whatever target you want to make). This gets the +kernel compiled with the "-g" option set -- necessary for debugging. + +You have just built the kernel on your DEVELOPMENT machine that you +intend to run on your TARGET machine. + +To install this new kernel, use the following installation procedure. +Remember, you are on the DEVELOPMENT machine patching the kernel source +for the kernel that you intend to run on the TARGET machine. + +Copy this kernel to your target machine using your usual procedures. I +usually arrange to copy development: +/usr/src/linux/arch/i386/boot/bzImage to /vmlinuz on the TARGET machine +via a LAN based NFS access. That is, I run the cp command on the target +and copy from the development machine via the LAN. Run Lilo (see "man +lilo" for details on how to set this up) on the new kernel on the target +machine so that it will boot! Then boot the kernel on the target +machine. + +On the DEVELOPMENT machine, create a file called .gdbinit in the +directory /usr/src/linux. An example .gdbinit file looks like this: + +shell echo -e "\003" >/dev/ttyS0 +set remotebaud 38400 (or what ever speed you have chosen) +target remote /dev/ttyS0 + + +Change the "echo" and "target" definition so that it specifies the tty +port that you intend to use. Change the "remotebaud" definition to +match the data rate that you are going to use for the com line. + +You are now ready to try it out. + +Boot your target machine with "kgdb" in the boot command i.e. something +like: + +lilo> test kgdb + +or if you also want console output thru gdb: + +lilo> test kgdb console=kgdb + +You should see the lilo message saying it has loaded the kernel and then +all output stops. The kgdb stub is trying to connect with gdb. Start +gdb something like this: + + +On your DEVELOPMENT machine, cd /usr/src/linux and enter "gdb vmlinux". +When gdb gets the symbols loaded it will read your .gdbinit file and, if +everything is working correctly, you should see gdb print out a few +lines indicating that a breakpoint has been taken. It will actually +show a line of code in the target kernel inside the kgdb activation +code. + +The gdb interaction should look something like this: + + linux-dev:/usr/src/linux# gdb vmlinux + GDB is free software and you are welcome to distribute copies of it + under certain conditions; type "show copying" to see the conditions. + There is absolutely no warranty for GDB; type "show warranty" for details. + GDB 4.15.1 (i486-slackware-linux), + Copyright 1995 Free Software Foundation, Inc... + breakpoint () at i386-stub.c:750 + 750 } + (gdb) + +You can now use whatever gdb commands you like to set breakpoints. +Enter "continue" to start your target machine executing again. At this +point the target system will run at full speed until it encounters +your breakpoint or gets a segment violation in the kernel, or whatever. + +If you have the kgdb console enabled when you continue, gdb will print +out all the console messages. + +The above example caused a breakpoint relatively early in the boot +process. For the i386 kgdb it is possible to code a break instruction +as the first C-language point in init/main.c, i.e. as the first instruction +in start_kernel(). This could be done as follows: + +#include + breakpoint(); + +This breakpoint() is really a function that sets up the breakpoint and +single-step hardware trap cells and then executes a breakpoint. Any +early hard coded breakpoint will need to use this function. Once the +trap cells are set up they need not be set again, but doing it again +does not hurt anything, so you don't need to be concerned about which +breakpoint is hit first. Once the trap cells are set up (and the kernel +sets them up in due course even if breakpoint() is never called) the +macro: + +BREAKPOINT; + +will generate an inline breakpoint. This may be more useful as it stops +the processor at the instruction instead of in a function a step removed +from the location of interest. In either case must be +included to define both breakpoint() and BREAKPOINT. + +Triggering kgdbstub at other times +================================== + +Often you don't need to enter the debugger until much later in the boot +or even after the machine has been running for some time. Once the +kernel is booted and interrupts are on, you can force the system to +enter the debugger by sending a control-C to the debug port. This is +what the first line of the recommended .gdbinit file does. This allows +you to start gdb any time after the system is up as well as when the +system is already at a breakpoint. (In the case where the system is +already at a breakpoint the control-C is not needed, however, it will +be ignored by the target so no harm is done. Also note the the echo +command assumes that the port speed is already set. This will be true +once gdb has connected, but it is best to set the port speed before you +run gdb.) + +Another simple way to do this is to put the following file in you ~/bin +directory: + +#!/bin/bash +echo -e "\003" > /dev/ttyS0 + +Here, the ttyS0 should be replaced with what ever port you are using. +The "\003" is control-C. Once you are connected with gdb, you can enter +control-C at the command prompt. + +An alternative way to get control to the debugger is to enable the kGdb +SysRq command. Then you would enter Alt-SysRq-g (all three keys at the +same time, but push them down in the order given). To refresh your +memory of the available SysRq commands try Alt-SysRq-=. Actually any +undefined command could replace the "=", but I like to KNOW that what I +am pushing will never be defined. + +Debugging hints +=============== + +You can break into the target machine at any time from the development +machine by typing ^C (see above paragraph). If the target machine has +interrupts enabled this will stop it in the kernel and enter the +debugger. + +There is unfortunately no way of breaking into the kernel if it is +in a loop with interrupts disabled, so if this happens to you then +you need to place exploratory breakpoints or printk's into the kernel +to find out where it is looping. The exploratory breakpoints can be +entered either thru gdb or hard coded into the source. This is very +handy if you do something like: + +if () BREAKPOINT; + + +There is a copy of an e-mail in the Documentation/i386/kgdb/ directory +(debug-nmi.txt) which describes how to create an NMI on an ISA bus +machine using a paper clip. I have a sophisticated version of this made +by wiring a push button switch into a PC104/ISA bus adapter card. The +adapter card nicely furnishes wire wrap pins for all the ISA bus +signals. + +When you are done debugging the kernel on the target machine it is a +good idea to leave it in a running state. This makes reboots faster, +bypassing the fsck. So do a gdb "continue" as the last gdb command if +this is possible. To terminate gdb itself on the development machine +and leave the target machine running, first clear all breakpoints and +continue, then type ^Z to suspend gdb and then kill it with "kill %1" or +something similar. + +If gdbstub Does Not Work +======================== + +If it doesn't work, you will have to troubleshoot it. Do the easy +things first like double checking your cabling and data rates. You +might try some non-kernel based programs to see if the back-to-back +connection works properly. Just something simple like cat /etc/hosts +>/dev/ttyS0 on one machine and cat /dev/ttyS0 on the other will tell you +if you can send data from one machine to the other. Make sure it works +in both directions. There is no point in tearing out your hair in the +kernel if the line doesn't work. + +All of the real action takes place in the file +/usr/src/linux/arch/i386/kernel/kgdb_stub.c. That is the code on the target +machine that interacts with gdb on the development machine. In gdb you can +turn on a debug switch with the following command: + + set remotedebug + +This will print out the protocol messages that gdb is exchanging with +the target machine. + +Another place to look is /usr/src/arch/i386/lib/kgdb_serial.c. This is +the code that talks to the serial port on the target side. There might +be a problem there. In particular there is a section of this code that +tests the UART which will tell you what UART you have if you define +"PRNT" (just remove "_off" from the #define PRNT_off). To view this +report you will need to boot the system without any beakpoints. This +allows the kernel to run to the point where it calls kgdb to set up +interrupts. At this time kgdb will test the UART and print out the type +it finds. (You need to wait so that the printks are actually being +printed. Early in the boot they are cached, waiting for the console to +be enabled. Also, if kgdb is entered thru a breakpoint it is possible +to cause a dead lock by calling printk when the console is locked. The +stub thus avoids doing printks from breakpoints, especially in the +serial code.) At this time, if the UART fails to do the expected thing, +kgdb will print out (using printk) information on what failed. (These +messages will be buried in all the other boot up messages. Look for +lines that start with "gdb_hook_interrupt:". You may want to use dmesg +once the system is up to view the log. If this fails or if you still +don't connect, review your answers for the port address. Use: + +setserial /dev/ttyS0 + +to get the current port and IRQ information. This command will also +tell you what the system found for the UART type. The stub recognizes +the following UART types: + +16450, 16550, and 16550A + +If you are really desperate you can use printk debugging in the +kgdbstub code in the target kernel until you get it working. In particular, +there is a global variable in /usr/src/linux/arch/i386/kernel/kgdb_stub.c +named "remote_debug". Compile your kernel with this set to 1, rather +than 0 and the debug stub will print out lots of stuff as it does +what it does. Likewise there are debug printks in the kgdb_serial.c +code that can be turned on with simple changes in the macro defines. + + +Debugging Loadable Modules +========================== + +This technique comes courtesy of Edouard Parmelan + + +When you run gdb, enter the command + +source gdbinit-modules + +This will read in a file of gdb macros that was installed in your +kernel source directory when kgdb was installed. This file implements +the following commands: + +mod-list + Lists the loaded modules in the form + +mod-print-symbols + Prints all the symbols in the indicated module. + +mod-add-symbols + Loads the symbols from the object file and associates them + with the indicated module. + +After you have loaded the module that you want to debug, use the command +mod-list to find the of your module. Then use that +address in the mod-add-symbols command to load your module's symbols. +From that point onward you can debug your module as if it were a part +of the kernel. + +The file gdbinit-modules also contains a command named mod-add-lis as +an example of how to construct a command of your own to load your +favorite module. The idea is to "can" the pathname of the module +in the command so you don't have to type so much. + +Threads +======= + +Each process in a target machine is seen as a gdb thread. gdb thread +related commands (info threads, thread n) can be used. + +ia-32 hardware breakpoints +========================== + +kgdb stub contains support for hardware breakpoints using debugging features +of ia-32(x86) processors. These breakpoints do not need code modification. +They use debugging registers. 4 hardware breakpoints are available in ia-32 +processors. + +Each hardware breakpoint can be of one of the following three types. + +1. Execution breakpoint - An Execution breakpoint is triggered when code + at the breakpoint address is executed. + + As limited number of hardware breakpoints are available, it is + advisable to use software breakpoints ( break command ) instead + of execution hardware breakpoints, unless modification of code + is to be avoided. + +2. Write breakpoint - A write breakpoint is triggered when memory + location at the breakpoint address is written. + + A write or can be placed for data of variable length. Length of + a write breakpoint indicates length of the datatype to be + watched. Length is 1 for 1 byte data , 2 for 2 byte data, 3 for + 4 byte data. + +3. Access breakpoint - An access breakpoint is triggered when memory + location at the breakpoint address is either read or written. + + Access breakpoints also have lengths similar to write breakpoints. + +IO breakpoints in ia-32 are not supported. + +Since gdb stub at present does not use the protocol used by gdb for hardware +breakpoints, hardware breakpoints are accessed through gdb macros. gdb macros +for hardware breakpoints are described below. + +hwebrk - Places an execution breakpoint + hwebrk breakpointno address +hwwbrk - Places a write breakpoint + hwwbrk breakpointno length address +hwabrk - Places an access breakpoint + hwabrk breakpointno length address +hwrmbrk - Removes a breakpoint + hwrmbrk breakpointno +exinfo - Tells whether a software or hardware breakpoint has occurred. + Prints number of the hardware breakpoint if a hardware breakpoint has + occurred. + +Arguments required by these commands are as follows +breakpointno - 0 to 3 +length - 1 to 3 +address - Memory location in hex digits ( without 0x ) e.g c015e9bc + +SMP support +========== + +When a breakpoint occurs or user issues a break ( Ctrl + C ) to gdb +client, all the processors are forced to enter the debugger. Current +thread corresponds to the thread running on the processor where +breakpoint occurred. Threads running on other processor(s) appear +similar to other non-running threads in the 'info threads' output. +Within the kgdb stub there is a structure "waiting_cpus" in which kgdb +records the values of "current" and "regs" for each CPU other than the +one that hit the breakpoint. "current" is a pointer to the task +structure for the task that CPU is running, while "regs" points to the +saved registers for the task. This structure can be examined with the +gdb "p" command. + +ia-32 hardware debugging registers on all processors are set to same +values. Hence any hardware breakpoints may occur on any processor. + +gdb troubleshooting +=================== + +1. gdb hangs +Kill it. restart gdb. Connect to target machine. + +2. gdb cannot connect to target machine (after killing a gdb and +restarting another) If the target machine was not inside debugger when +you killed gdb, gdb cannot connect because the target machine won't +respond. In this case echo "Ctrl+C"(ASCII 3) to the serial line. +e.g. echo -e "\003" > /dev/ttyS1 +This forces that target machine into the debugger, after which you +can connect. + +3. gdb cannot connect even after echoing Ctrl+C into serial line +Try changing serial line settings min to 1 and time to 0 +e.g. stty min 1 time 0 < /dev/ttyS1 +Try echoing again + +Check serial line speed and set it to correct value if required +e.g. stty ispeed 115200 ospeed 115200 < /dev/ttyS1 + +EVENTS +====== + +Ever want to know the order of things happening? Which CPU did what and +when? How did the spinlock get the way it is? Then events are for +you. Events are defined by calls to an event collection interface and +saved for later examination. In this case, kgdb events are saved by a +very fast bit of code in kgdb which is fully SMP and interrupt protected +and they are examined by using gdb to display them. Kgdb keeps only +the last N events, where N must be a power of two and is defined at +configure time. + + +Events are signaled to kgdb by calling: + +kgdb_ts(data0,data1) + +For each call kgdb records each call in an array along with other info. +Here is the array definition: + +struct kgdb_and_then_struct { +#ifdef CONFIG_SMP + int on_cpu; +#endif + long long at_time; + int from_ln; + char * in_src; + void *from; + int with_if; + int data0; + int data1; +}; + +For SMP machines the CPU is recorded, for all machines the TSC is +recorded (gets a time stamp) as well as the line number and source file +the call was made from. The address of the (from), the "if" (interrupt +flag) and the two data items are also recorded. The macro kgdb_ts casts +the types to int, so you can put any 32-bit values here. There is a +configure option to select the number of events you want to keep. A +nice number might be 128, but you can keep up to 1024 if you want. The +number must be a power of two. An "andthen" macro library is provided +for gdb to help you look at these events. It is also possible to define +a different structure for the event storage and cast the data to this +structure. For example the following structure is defined in kgdb: + +struct kgdb_and_then_struct2 { +#ifdef CONFIG_SMP + int on_cpu; +#endif + long long at_time; + int from_ln; + char * in_src; + void *from; + int with_if; + struct task_struct *t1; + struct task_struct *t2; +}; + +If you use this for display, the data elements will be displayed as +pointers to task_struct entries. You may want to define your own +structure to use in casting. You should only change the last two items +and you must keep the structure size the same. Kgdb will handle these +as 32-bit ints, but within that constraint you can define a structure to +cast to any 32-bit quantity. This need only be available to gdb and is +only used for casting in the display code. + +Final Items +=========== + +I picked up this code from Amit S. Kale and enhanced it. + +If you make some really cool modification to this stuff, or if you +fix a bug, please let me know. + +George Anzinger + + +Amit S. Kale + + +(First kgdb by David Grothe ) + +(modified by Tigran Aivazian ) + Putting gdbstub into the kernel config menu. + +(modified by Scott Foehner ) + Hooks for entering gdbstub at boot time. + +(modified by Amit S. Kale ) + Threads, ia-32 hw debugging, mp support, console support, + nmi watchdog handling. + +(modified by George Anzinger ) + Extended threads to include the idle threads. + Enhancements to allow breakpoint() at first C code. + Use of module_init() and __setup() to automate the configure. + Enhanced the cpu "collection" code to work in early bring-up. + Added ability to call functions from gdb + Print info thread stuff without going back to schedule() + Now collect the "other" cpus with an IPI/ NMI. diff -purN -X /home/mbligh/.diff.exclude 000-virgin/Documentation/i386/kgdb/kgdbeth.txt 999-mjb/Documentation/i386/kgdb/kgdbeth.txt --- 000-virgin/Documentation/i386/kgdb/kgdbeth.txt 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/Documentation/i386/kgdb/kgdbeth.txt 2003-11-24 16:13:59.000000000 -0800 @@ -0,0 +1,118 @@ +KGDB over ethernet +================== + +Authors +------- + +Robert Walsh (2.6 port) +wangdi (2.6 port) +San Mehat (original 2.4 code) + + +Introduction +------------ + +KGDB supports debugging over ethernet. Only a limited set of ethernet +devices are supported right now, but adding support for new devices +should not be too complicated. See "New Devices" below for details. + + +Terminology +----------- + +This document uses the following terms: + + TARGET: the machine being debugged. + HOST: the machine running gdb. + + +Usage +----- + +You need to use the following command-line options on the TARGET kernel: + + gdbeth=DEVICENUM + gdbeth_remoteip=HOSTIPADDR + gdbeth_remotemac=REMOTEMAC + gdbeth_localmac=LOCALMAC + +kgdbeth=DEVICENUM sets the ethernet device number to listen on for +debugging packets. e.g. kgdbeth=0 listens on eth0. + +kgdbeth_remoteip=HOSTIPADDR sets the IP address of the HOST machine. +Only packets originating from this IP address will be accepted by the +debugger. e.g. kgdbeth_remoteip=192.168.2.2 + +kgdbeth_remotemac=REMOTEMAC sets the ethernet address of the HOST machine. +e.g. kgdbeth_remotemac=00:07:70:12:4E:F5 + +kgdbeth_localmac=LOCALMAC sets the ethernet address of the TARGET machine. +e.g. kgdbeth_localmac=00:10:9F:18:21:3C + +You can also set the following command-line option on the TARGET kernel: + + kgdbeth_listenport=PORT + +kgdbeth_listenport sets the UDP port to listen on for gdb debugging +packets. The default value is "6443". e.g. kgdbeth_listenport=7654 +causes the kernel to listen on UDP port 7654 for debugging packets. + +On the HOST side, run gdb as normal and use a remote UDP host as the +target: + + % gdb ./vmlinux + GNU gdb Red Hat Linux (5.3post-0.20021129.18rh) + Copyright 2003 Free Software Foundation, Inc. + GDB is free software, covered by the GNU General Public License, and you are + welcome to change it and/or distribute copies of it under certain conditions. + Type "show copying" to see the conditions. + There is absolutely no warranty for GDB. Type "show warranty" for details. + This GDB was configured as "i386-redhat-linux-gnu"... + (gdb) target remote udp:HOSTNAME:6443 + +You can now continue as if you were debugging over a serial line. + +Observations +------------ + +I've used this with NFS and various other network applications (ssh, +etc.) and it's doesn't appear to interfere with their operation in +any way. It doesn't seem to effect the NIC it uses - i.e. you don't +need a dedicated NIC for this. + +Limitations +----------- + +In the inital release of this code you _must_ break into the system with the +debugger by hand, early after boot, as described above. + +Otherwise, the first time the kernel tries to enter the debugger (say, via an +oops or a BUG), the kgdb stub will doublefault and die because things aren't +fully set up yet. + +Supported devices +----------------- + +Right now, the following drivers are supported: + + e100 driver (drivers/net/e100/*) + 3c59x driver (drivers/net/3c59x.c) + + +New devices +----------- + +Supporting a new device is straightforward. Just add a "poll" routine to +the driver and hook it into the poll_controller field in the netdevice +structure. For an example, look in drivers/net/3c59x.c and search +for CONFIG_KGDB (two places.) + +The poll routine is usually quite simple - it's usually enough to just +disable interrupts, call the device's interrupt routine and re-enable +interrupts again. + + +Bug reports +----------- + +Send bug reports to Robert Walsh . diff -purN -X /home/mbligh/.diff.exclude 000-virgin/Documentation/i386/kgdb/loadmodule.sh 999-mjb/Documentation/i386/kgdb/loadmodule.sh --- 000-virgin/Documentation/i386/kgdb/loadmodule.sh 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/Documentation/i386/kgdb/loadmodule.sh 2003-11-24 16:13:59.000000000 -0800 @@ -0,0 +1,78 @@ +#/bin/sh +# This script loads a module on a target machine and generates a gdb script. +# source generated gdb script to load the module file at appropriate addresses +# in gdb. +# +# Usage: +# Loading the module on target machine and generating gdb script) +# [foo]$ loadmodule.sh +# +# Loading the module file into gdb +# (gdb) source +# +# Modify following variables according to your setup. +# TESTMACHINE - Name of the target machine +# GDBSCRIPTS - The directory where a gdb script will be generated +# +# Author: Amit S. Kale (akale@veritas.com). +# +# If you run into problems, please check files pointed to by following +# variables. +# ERRFILE - /tmp/.errs contains stderr output of insmod +# MAPFILE - /tmp/.map contains stdout output of insmod +# GDBSCRIPT - $GDBSCRIPTS/load gdb script. + +TESTMACHINE=foo +GDBSCRIPTS=/home/bar + +if [ $# -lt 1 ] ; then { + echo Usage: $0 modulefile + exit +} ; fi + +MODULEFILE=$1 +MODULEFILEBASENAME=`basename $1` + +if [ $MODULEFILE = $MODULEFILEBASENAME ] ; then { + MODULEFILE=`pwd`/$MODULEFILE +} fi + +ERRFILE=/tmp/$MODULEFILEBASENAME.errs +MAPFILE=/tmp/$MODULEFILEBASENAME.map +GDBSCRIPT=$GDBSCRIPTS/load$MODULEFILEBASENAME + +function findaddr() { + local ADDR=0x$(echo "$SEGMENTS" | \ + grep "$1" | sed 's/^[^ ]*[ ]*[^ ]*[ ]*//' | \ + sed 's/[ ]*[^ ]*$//') + echo $ADDR +} + +function checkerrs() { + if [ "`cat $ERRFILE`" != "" ] ; then { + cat $ERRFILE + exit + } fi +} + +#load the module +echo Copying $MODULEFILE to $TESTMACHINE +rcp $MODULEFILE root@${TESTMACHINE}: + +echo Loading module $MODULEFILE +rsh -l root $TESTMACHINE /sbin/insmod -m ./`basename $MODULEFILE` \ + > $MAPFILE 2> $ERRFILE +checkerrs + +SEGMENTS=`head -n 11 $MAPFILE | tail -n 10` +TEXTADDR=$(findaddr "\\.text[^.]") +LOADSTRING="add-symbol-file $MODULEFILE $TEXTADDR" +SEGADDRS=`echo "$SEGMENTS" | awk '//{ + if ($1 != ".text" && $1 != ".this" && + $1 != ".kstrtab" && $1 != ".kmodtab") { + print " -s " $1 " 0x" $3 " " + } +}'` +LOADSTRING="$LOADSTRING $SEGADDRS" +echo Generating script $GDBSCRIPT +echo $LOADSTRING > $GDBSCRIPT diff -purN -X /home/mbligh/.diff.exclude 000-virgin/MAINTAINERS 999-mjb/MAINTAINERS --- 000-virgin/MAINTAINERS 2003-11-24 16:12:27.000000000 -0800 +++ 999-mjb/MAINTAINERS 2003-11-24 16:13:59.000000000 -0800 @@ -1154,6 +1154,12 @@ W: http://sf.net/projects/kernel-janitor W: http://developer.osdl.org/rddunlap/kj-patches/ S: Maintained +KGDB FOR I386 PLATFORM +P: George Anzinger +M: george@mvista.com +L: linux-net@vger.kernel.org +S: Supported + KERNEL NFSD P: Neil Brown M: neilb@cse.unsw.edu.au diff -purN -X /home/mbligh/.diff.exclude 000-virgin/Makefile 999-mjb/Makefile --- 000-virgin/Makefile 2003-11-24 16:12:27.000000000 -0800 +++ 999-mjb/Makefile 2003-11-25 23:01:56.000000000 -0800 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 0 -EXTRAVERSION = -test10 +EXTRAVERSION = -test10-mjb1 # *DOCUMENTATION* # To see a list of typical targets execute "make help" @@ -66,6 +66,8 @@ endif # # The O= assigment takes precedence over the KBUILD_OUTPUT environment variable. +GCOV_FLAGS = -fprofile-arcs -ftest-coverage + # KBUILD_SRC is set on invocation of make in OBJ directory # KBUILD_SRC is not intended to be used by the regular user (for now) @@ -287,6 +289,8 @@ export VERSION PATCHLEVEL SUBLEVEL EXTRA export CPPFLAGS NOSTDINC_FLAGS OBJCOPYFLAGS LDFLAGS export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE +export CFLAGS_NOGCOV + export MODVERDIR := .tmp_versions @@ -435,6 +439,10 @@ ifndef CONFIG_FRAME_POINTER CFLAGS += -fomit-frame-pointer endif +ifeq ($(CONFIG_MCOUNT),y) +CFLAGS += -pg +endif + ifdef CONFIG_DEBUG_INFO CFLAGS += -g endif @@ -662,6 +670,11 @@ depend dep: # --------------------------------------------------------------------------- # Modules +CFLAGS_NOGCOV := $(CFLAGS) +ifdef CONFIG_GCOV_ALL +CFLAGS += $(GCOV_FLAGS) +endif + ifdef CONFIG_MODULES # By default, build modules as well @@ -784,6 +797,7 @@ clean: archclean $(clean-dirs) $(call cmd,rmclean) @find . $(RCS_FIND_IGNORE) \ \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ + -o -name '*.bb' -o -name '*.bbg' -o -name '*.da' \ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ -type f -print | xargs rm -f diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/Kconfig 999-mjb/arch/i386/Kconfig --- 000-virgin/arch/i386/Kconfig 2003-10-14 15:50:11.000000000 -0700 +++ 999-mjb/arch/i386/Kconfig 2003-11-25 14:24:37.000000000 -0800 @@ -453,17 +453,17 @@ config NR_CPUS This is purely to save memory - each supported CPU adds approximately eight kilobytes to the kernel image. -config PREEMPT - bool "Preemptible Kernel" - help - This option reduces the latency of the kernel when reacting to - real-time or interactive events by allowing a low priority process to - be preempted even if it is in kernel mode executing a system call. - This allows applications to run more reliably even when the system is - under load. - - Say Y here if you are building a kernel for a desktop, embedded - or real-time system. Say N if you are unsure. +# config PREEMPT +# bool "Preemptible Kernel" +# help +# This option reduces the latency of the kernel when reacting to +# real-time or interactive events by allowing a low priority process to +# be preempted even if it is in kernel mode executing a system call. +# This allows applications to run more reliably even when the system is +# under load. +# +# Say Y here if you are building a kernel for a desktop, embedded +# or real-time system. Say N if you are unsure. config X86_UP_APIC bool "Local APIC support on uniprocessors" if !SMP @@ -682,6 +682,44 @@ config HIGHMEM64G endchoice +choice + help + On i386, a process can only virtually address 4GB of memory. This + lets you select how much of that virtual space you would like to + devoted to userspace, and how much to the kernel. + + Some userspace programs would like to address as much as possible and + have few demands of the kernel other than it get out of the way. These + users may opt to use the 3.5GB option to give their userspace program + as much room as possible. Due to alignment issues imposed by PAE, + the "3.5GB" option is unavailable if "64GB" high memory support is + enabled. + + Other users (especially those who use PAE) may be running out of + ZONE_NORMAL memory. Those users may benefit from increasing the + kernel's virtual address space size by taking it away from userspace, + which may not need all of its space. An indicator that this is + happening is when /proc/Meminfo's "LowFree:" is a small percentage of + "LowTotal:" while "HighFree:" is very large. + + If unsure, say "3GB" + prompt "User address space size" + default 1GB + +config 05GB + bool "3.5 GB" + depends on !HIGHMEM64G + +config 1GB + bool "3 GB" + +config 2GB + bool "2 GB" + +config 3GB + bool "1 GB" +endchoice + config HIGHMEM bool depends on HIGHMEM64G || HIGHMEM4G @@ -784,6 +822,33 @@ config MTRR See for more information. +choice + help + This is unrelated to your processor's speed. This variable alters + how often the system is asked to generate timer interrupts. A larger + value can lead to a more responsive system, but also causes extra + overhead from the increased number of context switches. + + If in doubt, leave it at the default of 1000. + + prompt "Kernel HZ" + default 1000HZ + +config 100HZ + bool "100 Hz" + +config 1000HZ + bool "1000 Hz" +endchoice + +config IRQBALANCE + bool "Enable kernel irq balancing" + depends on SMP + default y + help + The defalut yes will allow the kernel to do irq load balancing. + Saying no will keep the kernel from doing irq load balancing. + config HAVE_DEC_LOCK bool depends on (SMP || PREEMPT) && X86_CMPXCHG @@ -1124,6 +1189,36 @@ source "fs/Kconfig" source "arch/i386/oprofile/Kconfig" +menu "GCOV coverage profiling" + +config GCOV_PROFILE + bool "GCOV coverage profiling" + ---help--- + Provide infrastructure for coverage support for the kernel. This + will not compile the kernel by default with the necessary flags. + To obtain coverage information for the entire kernel, one should + enable the subsequent option (Profile entire kernel). If only + particular files or directories of the kernel are desired, then + one must provide the following compile options for such targets: + "-fprofile-arcs -ftest-coverage" in the CFLAGS. To obtain + access to the coverage data one must insmod the gcov-proc kernel + module. + +config GCOV_ALL + bool "GCOV_ALL" + depends on GCOV_PROFILE + ---help--- + If you say Y here, it will compile the entire kernel with coverage + option enabled. + +config GCOV_PROC + tristate "gcov-proc module" + depends on GCOV_PROFILE && PROC_FS + ---help--- + This is the gcov-proc module that exposes gcov data through the + /proc filesystem + +endmenu menu "Kernel hacking" @@ -1170,6 +1265,26 @@ config MAGIC_SYSRQ keys are documented in . Don't say Y unless you really know what this hack does. +config X86_EARLY_PRINTK + bool "Early console support" + default n + depends on DEBUG_KERNEL + help + Write kernel log output directly into the VGA buffer or serial port. + This is useful for kernel debugging when your machine crashes very + early before the console code is initialized. For normal operation + it is not recommended because it looks ugly and doesn't cooperate + with klogd/syslogd or the X server.You should normally N here, + unless you want to debug such a crash. + + Syntax: earlyprintk=vga + earlyprintk=serial[,ttySn[,baudrate]] + Append ,keep to not disable it when the real console takes over. + Only vga or serial at a time, not both. + Currently only ttyS0 and ttyS1 are supported. + Interaction with the standard serial driver is not very good. + The VGA output is eventually overwritten by the real console. + config DEBUG_SPINLOCK bool "Spinlock debugging" depends on DEBUG_KERNEL @@ -1187,6 +1302,15 @@ config DEBUG_PAGEALLOC This results in a large slowdown, but helps to find certain types of memory corruptions. +config SPINLINE + bool "Spinlock inlining" + depends on DEBUG_KERNEL + help + This will change spinlocks from out of line to inline, making them + account cost to the callers in readprofile, rather than the lock + itself (as ".text.lock.filename"). This can be helpful for finding + the callers of locks. + config DEBUG_HIGHMEM bool "Highmem debugging" depends on DEBUG_KERNEL && HIGHMEM @@ -1203,20 +1327,230 @@ config DEBUG_INFO Say Y here only if you plan to use gdb to debug the kernel. If you don't debug the kernel, you can say N. +config LOCKMETER + bool "Kernel lock metering" + depends on SMP && !PREEMPT + help + Say Y to enable kernel lock metering, which adds overhead to SMP locks, + but allows you to see various statistics using the lockstat command. + config DEBUG_SPINLOCK_SLEEP bool "Sleep-inside-spinlock checking" help If you say Y here, various routines which may sleep will become very noisy if they are called with a spinlock held. +config KGDB + bool "Include kgdb kernel debugger" + depends on DEBUG_KERNEL + help + If you say Y here, the system will be compiled with the debug + option (-g) and a debugging stub will be included in the + kernel. This stub communicates with gdb on another (host) + computer via a serial port. The host computer should have + access to the kernel binary file (vmlinux) and a serial port + that is connected to the target machine. Gdb can be made to + configure the serial port or you can use stty and setserial to + do this. See the 'target' command in gdb. This option also + configures in the ability to request a breakpoint early in the + boot process. To request the breakpoint just include 'kgdb' + as a boot option when booting the target machine. The system + will then break as soon as it looks at the boot options. This + option also installs a breakpoint in panic and sends any + kernel faults to the debugger. For more information see the + Documentation/i386/kgdb.txt file. + +choice + depends on KGDB + prompt "Debug serial port BAUD" + default KGDB_115200BAUD + help + Gdb and the kernel stub need to agree on the baud rate to be + used. Some systems (x86 family at this writing) allow this to + be configured. + +config KGDB_9600BAUD + bool "9600" + +config KGDB_19200BAUD + bool "19200" + +config KGDB_38400BAUD + bool "38400" + +config KGDB_57600BAUD + bool "57600" + +config KGDB_115200BAUD + bool "115200" +endchoice + +config KGDB_PORT + hex "hex I/O port address of the debug serial port" + depends on KGDB + default 3f8 + help + Some systems (x86 family at this writing) allow the port + address to be configured. The number entered is assumed to be + hex, don't put 0x in front of it. The standard address are: + COM1 3f8 , irq 4 and COM2 2f8 irq 3. Setserial /dev/ttySx + will tell you what you have. It is good to test the serial + connection with a live system before trying to debug. + +config KGDB_IRQ + int "IRQ of the debug serial port" + depends on KGDB + default 4 + help + This is the irq for the debug port. If everything is working + correctly and the kernel has interrupts on a control C to the + port should cause a break into the kernel debug stub. + +config DEBUG_INFO + bool + depends on KGDB + default y + +config KGDB_MORE + bool "Add any additional compile options" + depends on KGDB + default n + help + Saying yes here turns on the ability to enter additional + compile options. + + +config KGDB_OPTIONS + depends on KGDB_MORE + string "Additional compile arguments" + default "-O1" + help + This option allows you enter additional compile options for + the whole kernel compile. Each platform will have a default + that seems right for it. For example on PPC "-ggdb -O1", and + for i386 "-O1". Note that by configuring KGDB "-g" is already + turned on. In addition, on i386 platforms + "-fomit-frame-pointer" is deleted from the standard compile + options. + +config NO_KGDB_CPUS + int "Number of CPUs" + depends on KGDB && SMP + default NR_CPUS + help + + This option sets the number of cpus for kgdb ONLY. It is used + to prune some internal structures so they look "nice" when + displayed with gdb. This is to overcome possibly larger + numbers that may have been entered above. Enter the real + number to get nice clean kgdb_info displays. + +config KGDB_TS + bool "Enable kgdb time stamp macros?" + depends on KGDB + default n + help + Kgdb event macros allow you to instrument your code with calls + to the kgdb event recording function. The event log may be + examined with gdb at a break point. Turning on this + capability also allows you to choose how many events to + keep. Kgdb always keeps the lastest events. + +choice + depends on KGDB_TS + prompt "Max number of time stamps to save?" + default KGDB_TS_128 + +config KGDB_TS_64 + bool "64" + +config KGDB_TS_128 + bool "128" + +config KGDB_TS_256 + bool "256" + +config KGDB_TS_512 + bool "512" + +config KGDB_TS_1024 + bool "1024" + +endchoice + +config STACK_OVERFLOW_TEST + bool "Turn on kernel stack overflow testing?" + depends on KGDB + default n + help + This option enables code in the front line interrupt handlers + to check for kernel stack overflow on interrupts and system + calls. This is part of the kgdb code on x86 systems. + +config KGDB_CONSOLE + bool "Enable serial console thru kgdb port" + depends on KGDB + default n + help + This option enables the command line "console=kgdb" option. + When the system is booted with this option in the command line + all kernel printk output is sent to gdb (as well as to other + consoles). For this to work gdb must be connected. For this + reason, this command line option will generate a breakpoint if + gdb has not yet connected. After the gdb continue command is + given all pent up console output will be printed by gdb on the + host machine. Neither this option, nor KGDB require the + serial driver to be configured. + +config KGDB_SYSRQ + bool "Turn on SysRq 'G' command to do a break?" + depends on KGDB + default y + help + This option includes an option in the SysRq code that allows + you to enter SysRq G which generates a breakpoint to the KGDB + stub. This will work if the keyboard is alive and can + interrupt the system. Because of constraints on when the + serial port interrupt can be enabled, this code may allow you + to interrupt the system before the serial port control C is + available. Just say yes here. + config FRAME_POINTER bool "Compile the kernel with frame pointers" + default KGDB help If you say Y here the resulting kernel image will be slightly larger and slower, but it will give very useful debugging information. If you don't debug the kernel, you can say N, but we may not be able to solve problems without frame pointers. +config MAGIC_SYSRQ + bool + depends on KGDB_SYSRQ + default y + +config SCHEDSTATS + bool "Collect scheduler statistics" + depends on PROC_FS + default y + help + If you say Y here, additional code will be inserted into the + scheduler and related routines to collect statistics about + scheduler behavior and provide them in /proc/schedstat. These + stats may be useful for both tuning and debugging the scheduler + If you aren't debugging the scheduler or trying to tune a specific + application, you can say N to avoid the very slight overhead + this adds. + +config MMAP_TOPDOWN + bool "Top-down vma allocation" + help + Say Y here to have the kernel change its vma allocation policy + to allocate vma's from the top of the address space down, and + to shove the stack low so as to conserve virtualspace. This is + risky because various apps, including a number of versions of + ld.so, depend on the kernel's bottom-up behavior. + config X86_EXTRA_IRQS bool depends on X86_LOCAL_APIC || X86_VOYAGER @@ -1232,6 +1566,14 @@ config X86_MPPARSE depends on X86_LOCAL_APIC && !X86_VISWS default y +config MCOUNT + bool "Generate function call graph" + depends on FRAME_POINTER + help + This option instruments the kernel to generate a deterministic + function call graph. Answering Y here will make your kernel run + ???% slower. + endmenu source "security/Kconfig" diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/Makefile 999-mjb/arch/i386/Makefile --- 000-virgin/arch/i386/Makefile 2003-10-01 11:47:33.000000000 -0700 +++ 999-mjb/arch/i386/Makefile 2003-11-24 16:26:38.000000000 -0800 @@ -84,6 +84,9 @@ mcore-$(CONFIG_X86_ES7000) := mach-es700 # default subarch .h files mflags-y += -Iinclude/asm-i386/mach-default +mflags-$(CONFIG_KGDB) += -gdwarf-2 +mflags-$(CONFIG_KGDB_MORE) += $(shell echo $(CONFIG_KGDB_OPTIONS) | sed -e 's/"//g') + head-y := arch/i386/kernel/head.o arch/i386/kernel/init_task.o libs-y += arch/i386/lib/ @@ -98,6 +101,7 @@ drivers-$(CONFIG_PM) += arch/i386/powe CFLAGS += $(mflags-y) AFLAGS += $(mflags-y) +AFLAGS_vmlinux.lds.o += -include $(TOPDIR)/include/asm-i386/page.h boot := arch/i386/boot diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/boot/compressed/Makefile 999-mjb/arch/i386/boot/compressed/Makefile --- 000-virgin/arch/i386/boot/compressed/Makefile 2003-03-20 11:25:38.000000000 -0800 +++ 999-mjb/arch/i386/boot/compressed/Makefile 2003-11-24 16:35:58.000000000 -0800 @@ -7,8 +7,20 @@ targets := vmlinux vmlinux.bin vmlinux.bin.gz head.o misc.o piggy.o EXTRA_AFLAGS := -traditional +CFLAGS := $(CFLAGS_NOGCOV) LDFLAGS_vmlinux := -Ttext $(IMAGE_OFFSET) -e startup_32 +ifeq ($(CONFIG_MCOUNT),y) +quiet_cmd_nopg = CC $@ + cmd_nopg = $(CC) $(subst -pg,,$(CFLAGS)) -c $(src)/$(*F).c -o $@ + +$(obj)/misc.o: alwayscc + $(call cmd,nopg) + +alwayscc: + $(Q)rm -f $(obj)/misc.o +endif + $(obj)/vmlinux: $(obj)/head.o $(obj)/misc.o $(obj)/piggy.o FORCE $(call if_changed,ld) @: diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/kernel/Makefile 999-mjb/arch/i386/kernel/Makefile --- 000-virgin/arch/i386/kernel/Makefile 2003-10-01 11:47:33.000000000 -0700 +++ 999-mjb/arch/i386/kernel/Makefile 2003-11-24 16:14:00.000000000 -0800 @@ -14,6 +14,7 @@ obj-y += timers/ obj-$(CONFIG_ACPI_BOOT) += acpi/ obj-$(CONFIG_X86_BIOS_REBOOT) += reboot.o obj-$(CONFIG_MCA) += mca.o +obj-$(CONFIG_KGDB) += kgdb_stub.o obj-$(CONFIG_X86_MSR) += msr.o obj-$(CONFIG_X86_CPUID) += cpuid.o obj-$(CONFIG_MICROCODE) += microcode.o diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/kernel/apic.c 999-mjb/arch/i386/kernel/apic.c --- 000-virgin/arch/i386/kernel/apic.c 2003-10-21 11:16:03.000000000 -0700 +++ 999-mjb/arch/i386/kernel/apic.c 2003-11-24 16:33:45.000000000 -0800 @@ -1028,7 +1028,7 @@ int setup_profiling_timer(unsigned int m * multiplier is 1 and it can be changed by writing the new multiplier * value into /proc/profile. */ - +extern void calc_load_cpu(int cpu); inline void smp_local_timer_interrupt(struct pt_regs * regs) { int cpu = smp_processor_id(); @@ -1056,6 +1056,7 @@ inline void smp_local_timer_interrupt(st #ifdef CONFIG_SMP update_process_times(user_mode(regs)); + calc_load_cpu(cpu); #endif } diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/kernel/entry.S 999-mjb/arch/i386/kernel/entry.S --- 000-virgin/arch/i386/kernel/entry.S 2003-11-24 16:12:27.000000000 -0800 +++ 999-mjb/arch/i386/kernel/entry.S 2003-11-24 16:34:32.000000000 -0800 @@ -48,6 +48,18 @@ #include #include #include "irq_vectors.h" + /* We do not recover from a stack overflow, but at least + * we know it happened and should be able to track it down. + */ +#ifdef CONFIG_STACK_OVERFLOW_TEST +#define STACK_OVERFLOW_TEST \ + testl $7680,%esp; \ + jnz 10f; \ + call stack_overflow; \ +10: +#else +#define STACK_OVERFLOW_TEST +#endif #define nr_syscalls ((syscall_table_size)/4) @@ -100,7 +112,8 @@ TSS_ESP0_OFFSET = (4 - 0x200) pushl %ebx; \ movl $(__USER_DS), %edx; \ movl %edx, %ds; \ - movl %edx, %es; + movl %edx, %es; \ + STACK_OVERFLOW_TEST #define RESTORE_INT_REGS \ popl %ebx; \ @@ -300,6 +313,19 @@ syscall_exit: testw $_TIF_ALLWORK_MASK, %cx # current->work jne syscall_exit_work restore_all: +#ifdef CONFIG_TRAP_BAD_SYSCALL_EXITS + movl EFLAGS(%esp), %eax # mix EFLAGS and CS + movb CS(%esp), %al + testl $(VM_MASK | 3), %eax + jz resume_kernelX # returning to kernel or vm86-space + + cmpl $0,TI_PRE_COUNT(%ebx) # non-zero preempt_count ? + jz resume_kernelX + + int $3 + +resume_kernelX: +#endif RESTORE_ALL # perform work that needs to be done immediately before resumption @@ -831,7 +857,7 @@ ENTRY(sys_call_table) .long sys_getdents64 /* 220 */ .long sys_fcntl64 .long sys_ni_syscall /* reserved for TUX */ - .long sys_ni_syscall + .long sys_mbind .long sys_gettid .long sys_readahead /* 225 */ .long sys_setxattr @@ -884,3 +910,57 @@ ENTRY(sys_call_table) .long sys_ni_syscall /* sys_vserver */ syscall_table_size=(.-sys_call_table) + + +# Here we do call frames. We cheat a bit as we only really need +# correct frames at locations we can actually look at from a +# debugger. Since the break instruction trap actually goes thru +# some of this code, we don't really need info on those areas, but +# only after the fact. I.e. if we can not step or break in a +# location or end up with a return address pointing at the +# location, we don't need a correct call frame for it. + +#if 0 + +#include +/* + * The register numbers as known by gdb + */ +#define _EAX 0 +#define _ECX 1 +#define _EDX 2 +#define _EBX 3 +#define _ESP 4 +#define _EBP 5 +#define _ESI 6 +#define _EDI 7 +#define _PC 8 +#define _EIP 8 +#define _PS 9 +#define _EFLAGS 9 +#define _CS 10 +#define _SS 11 +#define _DS 12 +#define _ES 13 +#define _FS 14 +#define _GS 15 + + CFI_preamble(c1,_PC,1,1) + CFA_define_reference(_ESP,OLDESP) + CFA_define_offset(_EIP,EIP) + CFA_define_offset(_EBX,EBX) + CFA_define_offset(_ECX,ECX) + CFA_define_offset(_EDX,EDX) + CFA_define_offset(_ESI,ESI) + CFA_define_offset(_EDI,EDI) + CFA_define_offset(_EBP,EBP) + CFA_define_offset(_EAX,EAX) + CFA_define_offset(_EFLAGS,EFLAGS) + CFA_define_offset(_CS,CS) + CFA_define_offset(_DS,DS) + CFA_define_offset(_ES,ES) + CFI_postamble(c1) + + FDE_preamble(c1,f1,ret_from_intr,(divide_error - ret_from_intr)) + FDE_postamble(f1) +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/kernel/head.S 999-mjb/arch/i386/kernel/head.S --- 000-virgin/arch/i386/kernel/head.S 2003-10-01 11:40:40.000000000 -0700 +++ 999-mjb/arch/i386/kernel/head.S 2003-11-24 16:35:16.000000000 -0800 @@ -487,3 +487,24 @@ ENTRY(cpu_gdt_table) .fill (NR_CPUS-1)*GDT_ENTRIES,8,0 /* other CPU's GDT */ #endif +#ifdef CONFIG_GCOV_PROFILE +/* + * The .ctors-section contains a list of pointers to constructor + * functions which are used to initialize gcov structures. + * + * Because there is no NULL at the end of the constructor list + * in the kernel we need the addresses of both the constructor + * as well as the destructor list which are supposed to be + * adjacent. + */ + +.section ".ctors","aw" +.globl __CTOR_LIST__ +.type __CTOR_LIST__,@object +__CTOR_LIST__: +.section ".dtors","aw" +.globl __DTOR_LIST__ +.type __DTOR_LIST__,@object +__DTOR_LIST__: +#endif + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/kernel/i386_ksyms.c 999-mjb/arch/i386/kernel/i386_ksyms.c --- 000-virgin/arch/i386/kernel/i386_ksyms.c 2003-10-14 15:50:11.000000000 -0700 +++ 999-mjb/arch/i386/kernel/i386_ksyms.c 2003-11-24 16:35:58.000000000 -0800 @@ -186,6 +186,11 @@ extern void * memcpy(void *,const void * EXPORT_SYMBOL_NOVERS(memcpy); EXPORT_SYMBOL_NOVERS(memset); +#ifdef CONFIG_MCOUNT +extern void mcount(void); +EXPORT_SYMBOL_NOVERS(mcount); +#endif + #ifdef CONFIG_HAVE_DEC_LOCK EXPORT_SYMBOL(atomic_dec_and_lock); #endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/kernel/io_apic.c 999-mjb/arch/i386/kernel/io_apic.c --- 000-virgin/arch/i386/kernel/io_apic.c 2003-10-27 10:41:08.000000000 -0800 +++ 999-mjb/arch/i386/kernel/io_apic.c 2003-11-24 16:35:44.000000000 -0800 @@ -272,7 +272,7 @@ static void set_ioapic_affinity(unsigned spin_unlock_irqrestore(&ioapic_lock, flags); } -#if defined(CONFIG_SMP) +#if defined(CONFIG_IRQBALANCE) # include /* kernel_thread() */ # include /* kstat */ # include /* kmalloc() */ @@ -393,7 +393,7 @@ static void do_irq_balance(void) unsigned long max_cpu_irq = 0, min_cpu_irq = (~0); unsigned long move_this_load = 0; int max_loaded = 0, min_loaded = 0; - unsigned long useful_load_threshold = balanced_irq_interval + 10; + unsigned long useful_load_threshold = balanced_irq_interval / 10; int selected_irq; int tmp_loaded, first_attempt = 1; unsigned long tmp_cpu_irq; @@ -670,8 +670,6 @@ static int __init irqbalance_disable(cha __setup("noirqbalance", irqbalance_disable); -static void set_ioapic_affinity(unsigned int irq, cpumask_t mask); - static inline void move_irq(int irq) { /* note - we hold the desc->lock */ @@ -683,9 +681,11 @@ static inline void move_irq(int irq) __initcall(balanced_irq_init); -#else /* !SMP */ +#else /* !CONFIG_IRQBALANCE */ static inline void move_irq(int irq) { } +#endif /* CONFIG_IRQBALANCE */ +#ifndef CONFIG_SMP void send_IPI_self(int vector) { unsigned int cfg; @@ -700,7 +700,7 @@ void send_IPI_self(int vector) */ apic_write_around(APIC_ICR, cfg); } -#endif /* defined(CONFIG_SMP) */ +#endif /* !CONFIG_SMP */ /* diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/kernel/irq.c 999-mjb/arch/i386/kernel/irq.c --- 000-virgin/arch/i386/kernel/irq.c 2003-10-27 10:41:08.000000000 -0800 +++ 999-mjb/arch/i386/kernel/irq.c 2003-11-24 16:14:00.000000000 -0800 @@ -45,6 +45,7 @@ #include #include #include +#include /* * Linux has a controller-independent x86 interrupt architecture. @@ -502,6 +503,17 @@ out: irq_exit(); +#ifdef CONFIG_KGDB + /* + * We need to do this after clearing out of all the interrupt + * machinery because kgdb will reenter the NIC driver and the IRQ + * system. synchronize_irq() (at least) will deadlock. + */ + if (kgdb_eth_need_breakpoint[smp_processor_id()]) { + kgdb_eth_need_breakpoint[smp_processor_id()] = 0; + BREAKPOINT; + } +#endif return 1; } diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/kernel/kgdb_stub.c 999-mjb/arch/i386/kernel/kgdb_stub.c --- 000-virgin/arch/i386/kernel/kgdb_stub.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/arch/i386/kernel/kgdb_stub.c 2003-11-24 16:14:00.000000000 -0800 @@ -0,0 +1,2492 @@ +/* + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ + +/* + * Copyright (c) 2000 VERITAS Software Corporation. + * + */ +/**************************************************************************** + * Header: remcom.c,v 1.34 91/03/09 12:29:49 glenne Exp $ + * + * Module name: remcom.c $ + * Revision: 1.34 $ + * Date: 91/03/09 12:29:49 $ + * Contributor: Lake Stevens Instrument Division$ + * + * Description: low level support for gdb debugger. $ + * + * Considerations: only works on target hardware $ + * + * Written by: Glenn Engel $ + * Updated by: David Grothe + * Updated by: Robert Walsh + * Updated by: wangdi + * ModuleState: Experimental $ + * + * NOTES: See Below $ + * + * Modified for 386 by Jim Kingdon, Cygnus Support. + * Compatibility with 2.1.xx kernel by David Grothe + * + * Changes to allow auto initilization. All that is needed is that it + * be linked with the kernel and a break point (int 3) be executed. + * The header file defines BREAKPOINT to allow one to do + * this. It should also be possible, once the interrupt system is up, to + * call putDebugChar("+"). Once this is done, the remote debugger should + * get our attention by sending a ^C in a packet. George Anzinger + * + * Integrated into 2.2.5 kernel by Tigran Aivazian + * Added thread support, support for multiple processors, + * support for ia-32(x86) hardware debugging. + * Amit S. Kale ( akale@veritas.com ) + * + * Modified to support debugging over ethernet by Robert Walsh + * and wangdi , based on + * code by San Mehat. + * + * + * To enable debugger support, two things need to happen. One, a + * call to set_debug_traps() is necessary in order to allow any breakpoints + * or error conditions to be properly intercepted and reported to gdb. + * Two, a breakpoint needs to be generated to begin communication. This + * is most easily accomplished by a call to breakpoint(). Breakpoint() + * simulates a breakpoint by executing an int 3. + * + ************* + * + * The following gdb commands are supported: + * + * command function Return value + * + * g return the value of the CPU registers hex data or ENN + * G set the value of the CPU registers OK or ENN + * + * mAA..AA,LLLL Read LLLL bytes at address AA..AA hex data or ENN + * MAA..AA,LLLL: Write LLLL bytes at address AA.AA OK or ENN + * + * c Resume at current address SNN ( signal NN) + * cAA..AA Continue at address AA..AA SNN + * + * s Step one instruction SNN + * sAA..AA Step one instruction from AA..AA SNN + * + * k kill + * + * ? What was the last sigval ? SNN (signal NN) + * + * All commands and responses are sent with a packet which includes a + * checksum. A packet consists of + * + * $#. + * + * where + * :: + * :: < two hex digits computed as modulo 256 sum of > + * + * When a packet is received, it is first acknowledged with either '+' or '-'. + * '+' indicates a successful transfer. '-' indicates a failed transfer. + * + * Example: + * + * Host: Reply: + * $m0,10#2a +$00010203040506070809101112131415#42 + * + ****************************************************************************/ +#define KGDB_VERSION "<20030915.1651.33>" +#include +#include +#include /* for strcpy */ +#include +#include +#include +#include +#include /* for linux pt_regs struct */ +#include +#include +#include +#include +#include +#include +#include +#include + +/************************************************************************ + * + * external low-level support routines + */ +typedef void (*Function) (void); /* pointer to a function */ + +/* Thread reference */ +typedef unsigned char threadref[8]; + +extern int tty_putDebugChar(int); /* write a single character */ +extern int tty_getDebugChar(void); /* read and return a single char */ +extern void tty_flushDebugChar(void); /* flush pending characters */ +extern int eth_putDebugChar(int); /* write a single character */ +extern int eth_getDebugChar(void); /* read and return a single char */ +extern void eth_flushDebugChar(void); /* flush pending characters */ +extern void kgdb_eth_set_trapmode(int); +extern void kgdb_eth_reply_arp(void); /*send arp request */ +extern volatile int kgdb_eth_is_initializing; + + +/************************************************************************/ +/* BUFMAX defines the maximum number of characters in inbound/outbound buffers*/ +/* at least NUMREGBYTES*2 are needed for register packets */ +/* Longer buffer is needed to list all threads */ +#define BUFMAX 400 + +char *kgdb_version = KGDB_VERSION; + +/* debug > 0 prints ill-formed commands in valid packets & checksum errors */ +int debug_regs = 0; /* set to non-zero to print registers */ + +/* filled in by an external module */ +char *gdb_module_offsets; + +static const char hexchars[] = "0123456789abcdef"; + +/* Number of bytes of registers. */ +#define NUMREGBYTES 64 +/* + * Note that this register image is in a different order than + * the register image that Linux produces at interrupt time. + * + * Linux's register image is defined by struct pt_regs in ptrace.h. + * Just why GDB uses a different order is a historical mystery. + */ +enum regnames { _EAX, /* 0 */ + _ECX, /* 1 */ + _EDX, /* 2 */ + _EBX, /* 3 */ + _ESP, /* 4 */ + _EBP, /* 5 */ + _ESI, /* 6 */ + _EDI, /* 7 */ + _PC /* 8 also known as eip */ , + _PS /* 9 also known as eflags */ , + _CS, /* 10 */ + _SS, /* 11 */ + _DS, /* 12 */ + _ES, /* 13 */ + _FS, /* 14 */ + _GS /* 15 */ +}; + +/*************************** ASSEMBLY CODE MACROS *************************/ +/* + * Put the error code here just in case the user cares. + * Likewise, the vector number here (since GDB only gets the signal + * number through the usual means, and that's not very specific). + * The called_from is the return address so he can tell how we entered kgdb. + * This will allow him to seperate out the various possible entries. + */ +#define REMOTE_DEBUG 0 /* set != to turn on printing (also available in info) */ + +#define PID_MAX PID_MAX_DEFAULT + +#ifdef CONFIG_SMP +void smp_send_nmi_allbutself(void); +#define IF_SMP(x) x +#undef MAX_NO_CPUS +#ifndef CONFIG_NO_KGDB_CPUS +#define CONFIG_NO_KGDB_CPUS 2 +#endif +#if CONFIG_NO_KGDB_CPUS > NR_CPUS +#define MAX_NO_CPUS NR_CPUS +#else +#define MAX_NO_CPUS CONFIG_NO_KGDB_CPUS +#endif +#define hold_init hold_on_sstep: 1, +#define MAX_CPU_MASK (unsigned long)((1LL << MAX_NO_CPUS) - 1LL) +#define NUM_CPUS num_online_cpus() +#else +#define IF_SMP(x) +#define hold_init +#undef MAX_NO_CPUS +#define MAX_NO_CPUS 1 +#define NUM_CPUS 1 +#endif +#define NOCPU (struct task_struct *)0xbad1fbad +/* *INDENT-OFF* */ +struct kgdb_info { + int used_malloc; + void *called_from; + long long entry_tsc; + int errcode; + int vector; + int print_debug_info; +#ifdef CONFIG_SMP + int hold_on_sstep; + struct { + volatile struct task_struct *task; + int pid; + int hold; + struct pt_regs *regs; + } cpus_waiting[MAX_NO_CPUS]; +#endif +} kgdb_info = {hold_init print_debug_info:REMOTE_DEBUG, vector:-1}; + +/* *INDENT-ON* */ + +#define used_m kgdb_info.used_malloc +/* + * This is little area we set aside to contain the stack we + * need to build to allow gdb to call functions. We use one + * per cpu to avoid locking issues. We will do all this work + * with interrupts off so that should take care of the protection + * issues. + */ +#define LOOKASIDE_SIZE 200 /* should be more than enough */ +#define MALLOC_MAX 200 /* Max malloc size */ +struct { + unsigned int esp; + int array[LOOKASIDE_SIZE]; +} fn_call_lookaside[MAX_NO_CPUS]; + +static int trap_cpu; +static unsigned int OLD_esp; + +#define END_OF_LOOKASIDE &fn_call_lookaside[trap_cpu].array[LOOKASIDE_SIZE] +#define IF_BIT 0x200 +#define TF_BIT 0x100 + +#define MALLOC_ROUND 8-1 + +static char malloc_array[MALLOC_MAX]; +IF_SMP(static void to_gdb(const char *mess)); +void * +malloc(int size) +{ + + if (size <= (MALLOC_MAX - used_m)) { + int old_used = used_m; + used_m += ((size + MALLOC_ROUND) & (~MALLOC_ROUND)); + return &malloc_array[old_used]; + } else { + return NULL; + } +} + +/* + * I/O dispatch functions... + * Based upon kgdb_eth, either call the ethernet + * handler or the serial one.. + */ +void +putDebugChar(int c) +{ + if (kgdb_eth == -1) { + tty_putDebugChar(c); + } else { + eth_putDebugChar(c); + } +} + +int +getDebugChar(void) +{ + if (kgdb_eth == -1) { + return tty_getDebugChar(); + } else { + return eth_getDebugChar(); + } +} + +void +flushDebugChar(void) +{ + if (kgdb_eth == -1) { + tty_flushDebugChar(); + } else { + eth_flushDebugChar(); + } +} + +/* + * Gdb calls functions by pushing agruments, including a return address + * on the stack and the adjusting EIP to point to the function. The + * whole assumption in GDB is that we are on a different stack than the + * one the "user" i.e. code that hit the break point, is on. This, of + * course is not true in the kernel. Thus various dodges are needed to + * do the call without directly messing with EIP (which we can not change + * as it is just a location and not a register. To adjust it would then + * require that we move every thing below EIP up or down as needed. This + * will not work as we may well have stack relative pointer on the stack + * (such as the pointer to regs, for example). + + * So here is what we do: + * We detect gdb attempting to store into the stack area and instead, store + * into the fn_call_lookaside.array at the same relative location as if it + * were the area ESP pointed at. We also trap ESP modifications + * and uses these to adjust fn_call_lookaside.esp. On entry + * fn_call_lookaside.esp will be set to point at the last entry in + * fn_call_lookaside.array. This allows us to check if it has changed, and + * if so, on exit, we add the registers we will use to do the move and a + * trap/ interrupt return exit sequence. We then adjust the eflags in the + * regs array (remember we now have a copy in the fn_call_lookaside.array) to + * kill the interrupt bit, AND we change EIP to point at our set up stub. + * As part of the register set up we preset the registers to point at the + * begining and end of the fn_call_lookaside.array, so all the stub needs to + * do is move words from the array to the stack until ESP= the desired value + * then do the rti. This will then transfer to the desired function with + * all the correct registers. Nifty huh? + */ +extern asmlinkage void fn_call_stub(void); +extern asmlinkage void fn_rtn_stub(void); +/* *INDENT-OFF* */ +__asm__("fn_rtn_stub:\n\t" + "movl %eax,%esp\n\t" + "fn_call_stub:\n\t" + "1:\n\t" + "addl $-4,%ebx\n\t" + "movl (%ebx), %eax\n\t" + "pushl %eax\n\t" + "cmpl %esp,%ecx\n\t" + "jne 1b\n\t" + "popl %eax\n\t" + "popl %ebx\n\t" + "popl %ecx\n\t" + "iret \n\t"); +/* *INDENT-ON* */ +#define gdb_i386vector kgdb_info.vector +#define gdb_i386errcode kgdb_info.errcode +#define waiting_cpus kgdb_info.cpus_waiting +#define remote_debug kgdb_info.print_debug_info +#define hold_cpu(cpu) kgdb_info.cpus_waiting[cpu].hold +/* gdb locks */ + +#ifdef CONFIG_SMP +static int in_kgdb_called; +static spinlock_t waitlocks[MAX_NO_CPUS] = + {[0 ... MAX_NO_CPUS - 1] = SPIN_LOCK_UNLOCKED }; +/* + * The following array has the thread pointer of each of the "other" + * cpus. We make it global so it can be seen by gdb. + */ +volatile int in_kgdb_entry_log[MAX_NO_CPUS]; +volatile struct pt_regs *in_kgdb_here_log[MAX_NO_CPUS]; +/* +static spinlock_t continuelocks[MAX_NO_CPUS]; +*/ +spinlock_t kgdb_spinlock = SPIN_LOCK_UNLOCKED; +/* waiters on our spinlock plus us */ +static atomic_t spinlock_waiters = ATOMIC_INIT(1); +static int spinlock_count = 0; +static int spinlock_cpu = 0; +/* + * Note we use nested spin locks to account for the case where a break + * point is encountered when calling a function by user direction from + * kgdb. Also there is the memory exception recursion to account for. + * Well, yes, but this lets other cpus thru too. Lets add a + * cpu id to the lock. + */ +#define KGDB_SPIN_LOCK(x) if( spinlock_count == 0 || \ + spinlock_cpu != smp_processor_id()){\ + atomic_inc(&spinlock_waiters); \ + while (! spin_trylock(x)) {\ + in_kgdb(®s);\ + }\ + atomic_dec(&spinlock_waiters); \ + spinlock_count = 1; \ + spinlock_cpu = smp_processor_id(); \ + }else{ \ + spinlock_count++; \ + } +#define KGDB_SPIN_UNLOCK(x) if( --spinlock_count == 0) spin_unlock(x) +#else +unsigned kgdb_spinlock = 0; +#define KGDB_SPIN_LOCK(x) --*x +#define KGDB_SPIN_UNLOCK(x) ++*x +#endif + +int +hex(char ch) +{ + if ((ch >= 'a') && (ch <= 'f')) + return (ch - 'a' + 10); + if ((ch >= '0') && (ch <= '9')) + return (ch - '0'); + if ((ch >= 'A') && (ch <= 'F')) + return (ch - 'A' + 10); + return (-1); +} + +/* scan for the sequence $# */ +void +getpacket(char *buffer) +{ + unsigned char checksum; + unsigned char xmitcsum; + int i; + int count; + char ch; + + do { + /* wait around for the start character, ignore all other characters */ + while ((ch = (getDebugChar() & 0x7f)) != '$') ; + checksum = 0; + xmitcsum = -1; + + count = 0; + + /* now, read until a # or end of buffer is found */ + while (count < BUFMAX) { + ch = getDebugChar() & 0x7f; + if (ch == '#') + break; + checksum = checksum + ch; + buffer[count] = ch; + count = count + 1; + } + buffer[count] = 0; + + if (ch == '#') { + xmitcsum = hex(getDebugChar() & 0x7f) << 4; + xmitcsum += hex(getDebugChar() & 0x7f); + if ((remote_debug) && (checksum != xmitcsum)) { + printk + ("bad checksum. My count = 0x%x, sent=0x%x. buf=%s\n", + checksum, xmitcsum, buffer); + } + + if (checksum != xmitcsum) + putDebugChar('-'); /* failed checksum */ + else { + putDebugChar('+'); /* successful transfer */ + /* if a sequence char is present, reply the sequence ID */ + if (buffer[2] == ':') { + putDebugChar(buffer[0]); + putDebugChar(buffer[1]); + /* remove sequence chars from buffer */ + count = strlen(buffer); + for (i = 3; i <= count; i++) + buffer[i - 3] = buffer[i]; + } + } + } + } while (checksum != xmitcsum); + + if (remote_debug) + printk("R:%s\n", buffer); + flushDebugChar(); +} + +/* send the packet in buffer. */ + +void +putpacket(char *buffer) +{ + unsigned char checksum; + int count; + char ch; + + /* $#. */ + + if (kgdb_eth == -1) { + do { + if (remote_debug) + printk("T:%s\n", buffer); + putDebugChar('$'); + checksum = 0; + count = 0; + + while ((ch = buffer[count])) { + putDebugChar(ch); + checksum += ch; + count += 1; + } + + putDebugChar('#'); + putDebugChar(hexchars[checksum >> 4]); + putDebugChar(hexchars[checksum % 16]); + flushDebugChar(); + + } while ((getDebugChar() & 0x7f) != '+'); + } else { + /* + * For udp, we can not transfer too much bytes once. + * We only transfer MAX_SEND_COUNT size bytes each time + */ + +#define MAX_SEND_COUNT 30 + + int send_count = 0, i = 0; + char send_buf[MAX_SEND_COUNT]; + + do { + if (remote_debug) + printk("T:%s\n", buffer); + putDebugChar('$'); + checksum = 0; + count = 0; + send_count = 0; + while ((ch = buffer[count])) { + if (send_count >= MAX_SEND_COUNT) { + for(i = 0; i < MAX_SEND_COUNT; i++) { + putDebugChar(send_buf[i]); + } + flushDebugChar(); + send_count = 0; + } else { + send_buf[send_count] = ch; + checksum += ch; + count ++; + send_count++; + } + } + for(i = 0; i < send_count; i++) + putDebugChar(send_buf[i]); + putDebugChar('#'); + putDebugChar(hexchars[checksum >> 4]); + putDebugChar(hexchars[checksum % 16]); + flushDebugChar(); + } while ((getDebugChar() & 0x7f) != '+'); + } +} + +static char remcomInBuffer[BUFMAX]; +static char remcomOutBuffer[BUFMAX]; +static short error; + +void +debug_error(char *format, char *parm) +{ + if (remote_debug) + printk(format, parm); +} + +static void +print_regs(struct pt_regs *regs) +{ + printk("EAX=%08lx ", regs->eax); + printk("EBX=%08lx ", regs->ebx); + printk("ECX=%08lx ", regs->ecx); + printk("EDX=%08lx ", regs->edx); + printk("\n"); + printk("ESI=%08lx ", regs->esi); + printk("EDI=%08lx ", regs->edi); + printk("EBP=%08lx ", regs->ebp); + printk("ESP=%08lx ", (long) ®s->esp); + printk("\n"); + printk(" DS=%08x ", regs->xds); + printk(" ES=%08x ", regs->xes); + printk(" SS=%08x ", __KERNEL_DS); + printk(" FL=%08lx ", regs->eflags); + printk("\n"); + printk(" CS=%08x ", regs->xcs); + printk(" IP=%08lx ", regs->eip); +#if 0 + printk(" FS=%08x ", regs->fs); + printk(" GS=%08x ", regs->gs); +#endif + printk("\n"); + +} /* print_regs */ + +#define NEW_esp fn_call_lookaside[trap_cpu].esp + +static void +regs_to_gdb_regs(int *gdb_regs, struct pt_regs *regs) +{ + gdb_regs[_EAX] = regs->eax; + gdb_regs[_EBX] = regs->ebx; + gdb_regs[_ECX] = regs->ecx; + gdb_regs[_EDX] = regs->edx; + gdb_regs[_ESI] = regs->esi; + gdb_regs[_EDI] = regs->edi; + gdb_regs[_EBP] = regs->ebp; + gdb_regs[_DS] = regs->xds; + gdb_regs[_ES] = regs->xes; + gdb_regs[_PS] = regs->eflags; + gdb_regs[_CS] = regs->xcs; + gdb_regs[_PC] = regs->eip; + /* Note, as we are a debugging the kernel, we will always + * trap in kernel code, this means no priviledge change, + * and so the pt_regs structure is not completely valid. In a non + * privilege change trap, only EFLAGS, CS and EIP are put on the stack, + * SS and ESP are not stacked, this means that the last 2 elements of + * pt_regs is not valid (they would normally refer to the user stack) + * also, using regs+1 is no good because you end up will a value that is + * 2 longs (8) too high. This used to cause stepping over functions + * to fail, so my fix is to use the address of regs->esp, which + * should point at the end of the stack frame. Note I have ignored + * completely exceptions that cause an error code to be stacked, such + * as double fault. Stuart Hughes, Zentropix. + * original code: gdb_regs[_ESP] = (int) (regs + 1) ; + + * this is now done on entry and moved to OLD_esp (as well as NEW_esp). + */ + gdb_regs[_ESP] = NEW_esp; + gdb_regs[_SS] = __KERNEL_DS; + gdb_regs[_FS] = 0xFFFF; + gdb_regs[_GS] = 0xFFFF; +} /* regs_to_gdb_regs */ + +static void +gdb_regs_to_regs(int *gdb_regs, struct pt_regs *regs) +{ + regs->eax = gdb_regs[_EAX]; + regs->ebx = gdb_regs[_EBX]; + regs->ecx = gdb_regs[_ECX]; + regs->edx = gdb_regs[_EDX]; + regs->esi = gdb_regs[_ESI]; + regs->edi = gdb_regs[_EDI]; + regs->ebp = gdb_regs[_EBP]; + regs->xds = gdb_regs[_DS]; + regs->xes = gdb_regs[_ES]; + regs->eflags = gdb_regs[_PS]; + regs->xcs = gdb_regs[_CS]; + regs->eip = gdb_regs[_PC]; + NEW_esp = gdb_regs[_ESP]; /* keep the value */ +#if 0 /* can't change these */ + regs->esp = gdb_regs[_ESP]; + regs->xss = gdb_regs[_SS]; + regs->fs = gdb_regs[_FS]; + regs->gs = gdb_regs[_GS]; +#endif + +} /* gdb_regs_to_regs */ +extern void scheduling_functions_start_here(void); +extern void scheduling_functions_end_here(void); +#define first_sched ((unsigned long) scheduling_functions_start_here) +#define last_sched ((unsigned long) scheduling_functions_end_here) + +int thread_list = 0; + +void +get_gdb_regs(struct task_struct *p, struct pt_regs *regs, int *gdb_regs) +{ + unsigned long stack_page; + int count = 0; + IF_SMP(int i); + if (!p || p == current) { + regs_to_gdb_regs(gdb_regs, regs); + return; + } +#ifdef CONFIG_SMP + for (i = 0; i < MAX_NO_CPUS; i++) { + if (p == kgdb_info.cpus_waiting[i].task) { + regs_to_gdb_regs(gdb_regs, + kgdb_info.cpus_waiting[i].regs); + gdb_regs[_ESP] = + (int) &kgdb_info.cpus_waiting[i].regs->esp; + + return; + } + } +#endif + memset(gdb_regs, 0, NUMREGBYTES); + gdb_regs[_ESP] = p->thread.esp; + gdb_regs[_PC] = p->thread.eip; + gdb_regs[_EBP] = *(int *) gdb_regs[_ESP]; + gdb_regs[_EDI] = *(int *) (gdb_regs[_ESP] + 4); + gdb_regs[_ESI] = *(int *) (gdb_regs[_ESP] + 8); + +/* + * This code is to give a more informative notion of where a process + * is waiting. It is used only when the user asks for a thread info + * list. If he then switches to the thread, s/he will find the task + * is in schedule, but a back trace should show the same info we come + * up with. This code was shamelessly purloined from process.c. It was + * then enhanced to provide more registers than simply the program + * counter. + */ + + if (!thread_list) { + return; + } + + if (p->state == TASK_RUNNING) + return; + stack_page = (unsigned long) p->thread_info; + if (gdb_regs[_ESP] < stack_page || gdb_regs[_ESP] > 8188 + stack_page) + return; + /* include/asm-i386/system.h:switch_to() pushes ebp last. */ + do { + if (gdb_regs[_EBP] < stack_page || + gdb_regs[_EBP] > 8184 + stack_page) + return; + gdb_regs[_PC] = *(unsigned long *) (gdb_regs[_EBP] + 4); + gdb_regs[_ESP] = gdb_regs[_EBP] + 8; + gdb_regs[_EBP] = *(unsigned long *) gdb_regs[_EBP]; + if (gdb_regs[_PC] < first_sched || gdb_regs[_PC] >= last_sched) + return; + } while (count++ < 16); + return; +} + +/* Indicate to caller of mem2hex or hex2mem that there has been an + error. */ +static volatile int mem_err = 0; +static volatile int mem_err_expected = 0; +static volatile int mem_err_cnt = 0; +static int garbage_loc = -1; + +int +get_char(char *addr) +{ + return *addr; +} + +void +set_char(char *addr, int val, int may_fault) +{ + /* + * This code traps references to the area mapped to the kernel + * stack as given by the regs and, instead, stores to the + * fn_call_lookaside[cpu].array + */ + if (may_fault && + (unsigned int) addr < OLD_esp && + ((unsigned int) addr > (OLD_esp - (unsigned int) LOOKASIDE_SIZE))) { + addr = (char *) END_OF_LOOKASIDE - ((char *) OLD_esp - addr); + } + *addr = val; +} + +/* convert the memory pointed to by mem into hex, placing result in buf */ +/* return a pointer to the last char put in buf (null) */ +/* If MAY_FAULT is non-zero, then we should set mem_err in response to + a fault; if zero treat a fault like any other fault in the stub. */ +char * +mem2hex(char *mem, char *buf, int count, int may_fault) +{ + int i; + unsigned char ch; + + if (may_fault) { + mem_err_expected = 1; + mem_err = 0; + } + for (i = 0; i < count; i++) { + /* printk("%lx = ", mem) ; */ + + ch = get_char(mem++); + + /* printk("%02x\n", ch & 0xFF) ; */ + if (may_fault && mem_err) { + if (remote_debug) + printk("Mem fault fetching from addr %lx\n", + (long) (mem - 1)); + *buf = 0; /* truncate buffer */ + return (buf); + } + *buf++ = hexchars[ch >> 4]; + *buf++ = hexchars[ch % 16]; + } + *buf = 0; + if (may_fault) + mem_err_expected = 0; + return (buf); +} + +/* convert the hex array pointed to by buf into binary to be placed in mem */ +/* return a pointer to the character AFTER the last byte written */ +/* NOTE: We use the may fault flag to also indicate if the write is to + * the registers (0) or "other" memory (!=0) + */ +char * +hex2mem(char *buf, char *mem, int count, int may_fault) +{ + int i; + unsigned char ch; + + if (may_fault) { + mem_err_expected = 1; + mem_err = 0; + } + for (i = 0; i < count; i++) { + ch = hex(*buf++) << 4; + ch = ch + hex(*buf++); + set_char(mem++, ch, may_fault); + + if (may_fault && mem_err) { + if (remote_debug) + printk("Mem fault storing to addr %lx\n", + (long) (mem - 1)); + return (mem); + } + } + if (may_fault) + mem_err_expected = 0; + return (mem); +} + +/**********************************************/ +/* WHILE WE FIND NICE HEX CHARS, BUILD AN INT */ +/* RETURN NUMBER OF CHARS PROCESSED */ +/**********************************************/ +int +hexToInt(char **ptr, int *intValue) +{ + int numChars = 0; + int hexValue; + + *intValue = 0; + + while (**ptr) { + hexValue = hex(**ptr); + if (hexValue >= 0) { + *intValue = (*intValue << 4) | hexValue; + numChars++; + } else + break; + + (*ptr)++; + } + + return (numChars); +} + +#define stubhex(h) hex(h) +#ifdef old_thread_list + +static int +stub_unpack_int(char *buff, int fieldlength) +{ + int nibble; + int retval = 0; + + while (fieldlength) { + nibble = stubhex(*buff++); + retval |= nibble; + fieldlength--; + if (fieldlength) + retval = retval << 4; + } + return retval; +} +#endif +static char * +pack_hex_byte(char *pkt, int byte) +{ + *pkt++ = hexchars[(byte >> 4) & 0xf]; + *pkt++ = hexchars[(byte & 0xf)]; + return pkt; +} + +#define BUF_THREAD_ID_SIZE 16 + +static char * +pack_threadid(char *pkt, threadref * id) +{ + char *limit; + unsigned char *altid; + + altid = (unsigned char *) id; + limit = pkt + BUF_THREAD_ID_SIZE; + while (pkt < limit) + pkt = pack_hex_byte(pkt, *altid++); + return pkt; +} + +#ifdef old_thread_list +static char * +unpack_byte(char *buf, int *value) +{ + *value = stub_unpack_int(buf, 2); + return buf + 2; +} + +static char * +unpack_threadid(char *inbuf, threadref * id) +{ + char *altref; + char *limit = inbuf + BUF_THREAD_ID_SIZE; + int x, y; + + altref = (char *) id; + + while (inbuf < limit) { + x = stubhex(*inbuf++); + y = stubhex(*inbuf++); + *altref++ = (x << 4) | y; + } + return inbuf; +} +#endif +void +int_to_threadref(threadref * id, int value) +{ + unsigned char *scan; + + scan = (unsigned char *) id; + { + int i = 4; + while (i--) + *scan++ = 0; + } + *scan++ = (value >> 24) & 0xff; + *scan++ = (value >> 16) & 0xff; + *scan++ = (value >> 8) & 0xff; + *scan++ = (value & 0xff); +} +int +int_to_hex_v(unsigned char * id, int value) +{ + unsigned char *start = id; + int shift; + int ch; + + for (shift = 28; shift >= 0; shift -= 4) { + if ((ch = (value >> shift) & 0xf) || (id != start)) { + *id = hexchars[ch]; + id++; + } + } + if (id == start) + *id++ = '0'; + return id - start; +} +#ifdef old_thread_list + +static int +threadref_to_int(threadref * ref) +{ + int i, value = 0; + unsigned char *scan; + + scan = (char *) ref; + scan += 4; + i = 4; + while (i-- > 0) + value = (value << 8) | ((*scan++) & 0xff); + return value; +} +#endif +static int +cmp_str(char *s1, char *s2, int count) +{ + while (count--) { + if (*s1++ != *s2++) + return 0; + } + return 1; +} + +#if 1 /* this is a hold over from 2.4 where O(1) was "sometimes" */ +extern struct task_struct *kgdb_get_idle(int cpu); +#define idle_task(cpu) kgdb_get_idle(cpu) +#else +#define idle_task(cpu) init_tasks[cpu] +#endif + +extern int kgdb_pid_init_done; + +struct task_struct * +getthread(int pid) +{ + struct task_struct *thread; + if (pid >= PID_MAX && pid <= (PID_MAX + MAX_NO_CPUS)) { + + return idle_task(pid - PID_MAX); + } else { + /* + * find_task_by_pid is relatively safe all the time + * Other pid functions require lock downs which imply + * that we may be interrupting them (as we get here + * in the middle of most any lock down). + * Still we don't want to call until the table exists! + */ + if (kgdb_pid_init_done){ + thread = find_task_by_pid(pid); + if (thread) { + return thread; + } + } + } + return NULL; +} +/* *INDENT-OFF* */ +struct hw_breakpoint { + unsigned enabled; + unsigned type; + unsigned len; + unsigned addr; +} breakinfo[4] = { {enabled:0}, + {enabled:0}, + {enabled:0}, + {enabled:0}}; +/* *INDENT-ON* */ +unsigned hw_breakpoint_status; +void +correct_hw_break(void) +{ + int breakno; + int correctit; + int breakbit; + unsigned dr7; + + asm volatile ("movl %%db7, %0\n":"=r" (dr7) + :); + /* *INDENT-OFF* */ + do { + unsigned addr0, addr1, addr2, addr3; + asm volatile ("movl %%db0, %0\n" + "movl %%db1, %1\n" + "movl %%db2, %2\n" + "movl %%db3, %3\n" + :"=r" (addr0), "=r"(addr1), + "=r"(addr2), "=r"(addr3) + :); + } while (0); + /* *INDENT-ON* */ + correctit = 0; + for (breakno = 0; breakno < 3; breakno++) { + breakbit = 2 << (breakno << 1); + if (!(dr7 & breakbit) && breakinfo[breakno].enabled) { + correctit = 1; + dr7 |= breakbit; + dr7 &= ~(0xf0000 << (breakno << 2)); + dr7 |= (((breakinfo[breakno].len << 2) | + breakinfo[breakno].type) << 16) << + (breakno << 2); + switch (breakno) { + case 0: + asm volatile ("movl %0, %%dr0\n"::"r" + (breakinfo[breakno].addr)); + break; + + case 1: + asm volatile ("movl %0, %%dr1\n"::"r" + (breakinfo[breakno].addr)); + break; + + case 2: + asm volatile ("movl %0, %%dr2\n"::"r" + (breakinfo[breakno].addr)); + break; + + case 3: + asm volatile ("movl %0, %%dr3\n"::"r" + (breakinfo[breakno].addr)); + break; + } + } else if ((dr7 & breakbit) && !breakinfo[breakno].enabled) { + correctit = 1; + dr7 &= ~breakbit; + dr7 &= ~(0xf0000 << (breakno << 2)); + } + } + if (correctit) { + asm volatile ("movl %0, %%db7\n"::"r" (dr7)); + } +} + +int +remove_hw_break(unsigned breakno) +{ + if (!breakinfo[breakno].enabled) { + return -1; + } + breakinfo[breakno].enabled = 0; + return 0; +} + +int +set_hw_break(unsigned breakno, unsigned type, unsigned len, unsigned addr) +{ + if (breakinfo[breakno].enabled) { + return -1; + } + breakinfo[breakno].enabled = 1; + breakinfo[breakno].type = type; + breakinfo[breakno].len = len; + breakinfo[breakno].addr = addr; + return 0; +} + +#ifdef CONFIG_SMP +static int in_kgdb_console = 0; + +int +in_kgdb(struct pt_regs *regs) +{ + unsigned flags; + int cpu = smp_processor_id(); + in_kgdb_called = 1; + if (!spin_is_locked(&kgdb_spinlock)) { + if (in_kgdb_here_log[cpu] || /* we are holding this cpu */ + in_kgdb_console) { /* or we are doing slow i/o */ + return 1; + } + return 0; + } + + /* As I see it the only reason not to let all cpus spin on + * the same spin_lock is to allow selected ones to proceed. + * This would be a good thing, so we leave it this way. + * Maybe someday.... Done ! + + * in_kgdb() is called from an NMI so we don't pretend + * to have any resources, like printk() for example. + */ + + kgdb_local_irq_save(flags); /* only local here, to avoid hanging */ + /* + * log arival of this cpu + * The NMI keeps on ticking. Protect against recurring more + * than once, and ignor the cpu that has the kgdb lock + */ + in_kgdb_entry_log[cpu]++; + in_kgdb_here_log[cpu] = regs; + if (cpu == spinlock_cpu || waiting_cpus[cpu].task) { + goto exit_in_kgdb; + } + /* + * For protection of the initilization of the spin locks by kgdb + * it locks the kgdb spinlock before it gets the wait locks set + * up. We wait here for the wait lock to be taken. If the + * kgdb lock goes away first?? Well, it could be a slow exit + * sequence where the wait lock is removed prior to the kgdb lock + * so if kgdb gets unlocked, we just exit. + */ + while (spin_is_locked(&kgdb_spinlock) && + !spin_is_locked(waitlocks + cpu)) ; + if (!spin_is_locked(&kgdb_spinlock)) { + goto exit_in_kgdb; + } + waiting_cpus[cpu].task = current; + waiting_cpus[cpu].pid = (current->pid) ? : (PID_MAX + cpu); + waiting_cpus[cpu].regs = regs; + + spin_unlock_wait(waitlocks + cpu); + /* + * log departure of this cpu + */ + waiting_cpus[cpu].task = 0; + waiting_cpus[cpu].pid = 0; + waiting_cpus[cpu].regs = 0; + correct_hw_break(); + exit_in_kgdb: + in_kgdb_here_log[cpu] = 0; + kgdb_local_irq_restore(flags); + return 1; + /* + spin_unlock(continuelocks + smp_processor_id()); + */ +} + +void +smp__in_kgdb(struct pt_regs regs) +{ + ack_APIC_irq(); + in_kgdb(®s); +} +#else +int +in_kgdb(struct pt_regs *regs) +{ + return (kgdb_spinlock); +} +#endif + +void +printexceptioninfo(int exceptionNo, int errorcode, char *buffer) +{ + unsigned dr6; + int i; + switch (exceptionNo) { + case 1: /* debug exception */ + break; + case 3: /* breakpoint */ + sprintf(buffer, "Software breakpoint"); + return; + default: + sprintf(buffer, "Details not available"); + return; + } + asm volatile ("movl %%db6, %0\n":"=r" (dr6) + :); + if (dr6 & 0x4000) { + sprintf(buffer, "Single step"); + return; + } + for (i = 0; i < 4; ++i) { + if (dr6 & (1 << i)) { + sprintf(buffer, "Hardware breakpoint %d", i); + return; + } + } + sprintf(buffer, "Unknown trap"); + return; +} + +/* + * This function does all command procesing for interfacing to gdb. + * + * NOTE: The INT nn instruction leaves the state of the interrupt + * enable flag UNCHANGED. That means that when this routine + * is entered via a breakpoint (INT 3) instruction from code + * that has interrupts enabled, then interrupts will STILL BE + * enabled when this routine is entered. The first thing that + * we do here is disable interrupts so as to prevent recursive + * entries and bothersome serial interrupts while we are + * trying to run the serial port in polled mode. + * + * For kernel version 2.1.xx the kgdb_cli() actually gets a spin lock so + * it is always necessary to do a restore_flags before returning + * so as to let go of that lock. + */ +int +kgdb_handle_exception(int exceptionVector, + int signo, int err_code, struct pt_regs *linux_regs) +{ + struct task_struct *usethread = NULL; + struct task_struct *thread_list_start = 0, *thread = NULL; + int addr, length; + unsigned long address; + int breakno, breaktype; + char *ptr; + int newPC; + threadref thref; + int threadid; + int thread_min = PID_MAX + MAX_NO_CPUS; +#ifdef old_thread_list + int maxthreads; +#endif + int nothreads; + unsigned long flags; + int gdb_regs[NUMREGBYTES / 4]; + int dr6; + IF_SMP(int entry_state = 0); /* 0, ok, 1, no nmi, 2 sync failed */ +#define NO_NMI 1 +#define NO_SYNC 2 +#define regs (*linux_regs) +#define NUMREGS NUMREGBYTES/4 + /* + * If the entry is not from the kernel then return to the Linux + * trap handler and let it process the interrupt normally. + */ + if ((linux_regs->eflags & VM_MASK) || (3 & linux_regs->xcs)) { + printk("ignoring non-kernel exception\n"); + print_regs(®s); + return (0); + } + /* + * If we're using eth mode, set the 'mode' in the netdevice. + */ + + __asm__("movl %%cr2,%0":"=r" (address)); + + if (kgdb_eth != -1) { + kgdb_eth_set_trapmode(1); + } + + kgdb_local_irq_save(flags); + + /* Get kgdb spinlock */ + + KGDB_SPIN_LOCK(&kgdb_spinlock); + rdtscll(kgdb_info.entry_tsc); + /* + * We depend on this spinlock and the NMI watch dog to control the + * other cpus. They will arrive at "in_kgdb()" as a result of the + * NMI and will wait there for the following spin locks to be + * released. + */ +#ifdef CONFIG_SMP + +#if 0 + if (cpu_callout_map & ~MAX_CPU_MASK) { + printk("kgdb : too many cpus, possibly not mapped" + " in contiguous space, change MAX_NO_CPUS" + " in kgdb_stub and make new kernel.\n" + " cpu_callout_map is %lx\n", cpu_callout_map); + goto exit_just_unlock; + } +#endif + if (spinlock_count == 1) { + int time, end_time, dum; + int i; + int cpu_logged_in[MAX_NO_CPUS] = {[0 ... MAX_NO_CPUS - 1] = (0) + }; + if (remote_debug) { + printk("kgdb : cpu %d entry, syncing others\n", + smp_processor_id()); + } + for (i = 0; i < MAX_NO_CPUS; i++) { + /* + * Use trylock as we may already hold the lock if + * we are holding the cpu. Net result is all + * locked. + */ + spin_trylock(&waitlocks[i]); + } + for (i = 0; i < MAX_NO_CPUS; i++) + cpu_logged_in[i] = 0; + /* + * Wait for their arrival. We know the watch dog is active if + * in_kgdb() has ever been called, as it is always called on a + * watchdog tick. + */ + rdtsc(dum, time); + end_time = time + 2; /* Note: we use the High order bits! */ + i = 1; + if (num_online_cpus() > 1) { + int me_in_kgdb = in_kgdb_entry_log[smp_processor_id()]; + smp_send_nmi_allbutself(); + while (i < num_online_cpus() && time != end_time) { + int j; + for (j = 0; j < MAX_NO_CPUS; j++) { + if (waiting_cpus[j].task && + !cpu_logged_in[j]) { + i++; + cpu_logged_in[j] = 1; + if (remote_debug) { + printk + ("kgdb : cpu %d arrived at kgdb\n", + j); + } + break; + } else if (!waiting_cpus[j].task && + !cpu_online(j)) { + waiting_cpus[j].task = NOCPU; + cpu_logged_in[j] = 1; + waiting_cpus[j].hold = 1; + break; + } + if (!waiting_cpus[j].task && + in_kgdb_here_log[j]) { + + int wait = 100000; + while (wait--) ; + if (!waiting_cpus[j].task && + in_kgdb_here_log[j]) { + printk + ("kgdb : cpu %d stall" + " in in_kgdb\n", + j); + i++; + cpu_logged_in[j] = 1; + waiting_cpus[j].task = + (struct task_struct + *) 1; + } + } + } + + if (in_kgdb_entry_log[smp_processor_id()] > + (me_in_kgdb + 10)) { + break; + } + + rdtsc(dum, time); + } + if (i < num_online_cpus()) { + printk + ("kgdb : time out, proceeding without sync\n"); +#if 0 + printk("kgdb : Waiting_cpus: 0 = %d, 1 = %d\n", + waiting_cpus[0].task != 0, + waiting_cpus[1].task != 0); + printk("kgdb : Cpu_logged in: 0 = %d, 1 = %d\n", + cpu_logged_in[0], cpu_logged_in[1]); + printk + ("kgdb : in_kgdb_here_log in: 0 = %d, 1 = %d\n", + in_kgdb_here_log[0] != 0, + in_kgdb_here_log[1] != 0); +#endif + entry_state = NO_SYNC; + } else { +#if 0 + int ent = + in_kgdb_entry_log[smp_processor_id()] - + me_in_kgdb; + printk("kgdb : sync after %d entries\n", ent); +#endif + } + } else { + if (remote_debug) { + printk + ("kgdb : %d cpus, but watchdog not active\n" + "proceeding without locking down other cpus\n", + num_online_cpus()); + entry_state = NO_NMI; + } + } + } +#endif + + if (remote_debug) { + printk("handle_exception(exceptionVector=%d, " + "signo=%d, err_code=%d, linux_regs=%p)\n", + exceptionVector, signo, err_code, linux_regs); + printk(" address: %lx\n", address); + + if (debug_regs) { + print_regs(®s); + show_trace(current, (unsigned long *)®s); + } + } + + /* Disable hardware debugging while we are in kgdb */ + /* Get the debug register status register */ +/* *INDENT-OFF* */ + __asm__("movl %0,%%db7" + : /* no output */ + :"r"(0)); + + asm volatile ("movl %%db6, %0\n" + :"=r" (hw_breakpoint_status) + :); + +/* *INDENT-ON* */ + switch (exceptionVector) { + case 0: /* divide error */ + case 1: /* debug exception */ + case 2: /* NMI */ + case 3: /* breakpoint */ + case 4: /* overflow */ + case 5: /* bounds check */ + case 6: /* invalid opcode */ + case 7: /* device not available */ + case 8: /* double fault (errcode) */ + case 10: /* invalid TSS (errcode) */ + case 12: /* stack fault (errcode) */ + case 16: /* floating point error */ + case 17: /* alignment check (errcode) */ + default: /* any undocumented */ + break; + case 11: /* segment not present (errcode) */ + case 13: /* general protection (errcode) */ + case 14: /* page fault (special errcode) */ + case 19: /* cache flush denied */ + if (mem_err_expected) { + /* + * This fault occured because of the + * get_char or set_char routines. These + * two routines use either eax of edx to + * indirectly reference the location in + * memory that they are working with. + * For a page fault, when we return the + * instruction will be retried, so we + * have to make sure that these + * registers point to valid memory. + */ + mem_err = 1; /* set mem error flag */ + mem_err_expected = 0; + mem_err_cnt++; /* helps in debugging */ + /* make valid address */ + regs.eax = (long) &garbage_loc; + /* make valid address */ + regs.edx = (long) &garbage_loc; + if (remote_debug) + printk("Return after memory error: " + "mem_err_cnt=%d\n", mem_err_cnt); + if (debug_regs) + print_regs(®s); + goto exit_kgdb; + } + break; + } + if (remote_debug) + printk("kgdb : entered kgdb on cpu %d\n", smp_processor_id()); + + gdb_i386vector = exceptionVector; + gdb_i386errcode = err_code; + kgdb_info.called_from = __builtin_return_address(0); +#ifdef CONFIG_SMP + /* + * OK, we can now communicate, lets tell gdb about the sync. + * but only if we had a problem. + */ + switch (entry_state) { + case NO_NMI: + to_gdb("NMI not active, other cpus not stopped\n"); + break; + case NO_SYNC: + to_gdb("Some cpus not stopped, see 'kgdb_info' for details\n"); + default:; + } + +#endif +/* + * Set up the gdb function call area. + */ + trap_cpu = smp_processor_id(); + OLD_esp = NEW_esp = (int) (&linux_regs->esp); + + IF_SMP(once_again:) + /* reply to host that an exception has occurred */ + remcomOutBuffer[0] = 'S'; + remcomOutBuffer[1] = hexchars[signo >> 4]; + remcomOutBuffer[2] = hexchars[signo % 16]; + remcomOutBuffer[3] = 0; + + if (kgdb_eth_is_initializing) { + kgdb_eth_is_initializing = 0; + } else { + putpacket(remcomOutBuffer); + } + + kgdb_eth_reply_arp(); + while (1 == 1) { + error = 0; + remcomOutBuffer[0] = 0; + getpacket(remcomInBuffer); + switch (remcomInBuffer[0]) { + case '?': + remcomOutBuffer[0] = 'S'; + remcomOutBuffer[1] = hexchars[signo >> 4]; + remcomOutBuffer[2] = hexchars[signo % 16]; + remcomOutBuffer[3] = 0; + break; + case 'd': + remote_debug = !(remote_debug); /* toggle debug flag */ + printk("Remote debug %s\n", + remote_debug ? "on" : "off"); + break; + case 'g': /* return the value of the CPU registers */ + get_gdb_regs(usethread, ®s, gdb_regs); + mem2hex((char *) gdb_regs, + remcomOutBuffer, NUMREGBYTES, 0); + break; + case 'G': /* set the value of the CPU registers - return OK */ + hex2mem(&remcomInBuffer[1], + (char *) gdb_regs, NUMREGBYTES, 0); + if (!usethread || usethread == current) { + gdb_regs_to_regs(gdb_regs, ®s); + strcpy(remcomOutBuffer, "OK"); + } else { + strcpy(remcomOutBuffer, "E00"); + } + break; + + case 'P':{ /* set the value of a single CPU register - + return OK */ + /* + * For some reason, gdb wants to talk about psudo + * registers (greater than 15). These may have + * meaning for ptrace, but for us it is safe to + * ignor them. We do this by dumping them into + * _GS which we also ignor, but do have memory for. + */ + int regno; + + ptr = &remcomInBuffer[1]; + regs_to_gdb_regs(gdb_regs, ®s); + if ((!usethread || usethread == current) && + hexToInt(&ptr, ®no) && + *ptr++ == '=' && (regno >= 0)) { + regno = + (regno >= NUMREGS ? _GS : regno); + hex2mem(ptr, (char *) &gdb_regs[regno], + 4, 0); + gdb_regs_to_regs(gdb_regs, ®s); + strcpy(remcomOutBuffer, "OK"); + break; + } + strcpy(remcomOutBuffer, "E01"); + break; + } + + /* mAA..AA,LLLL Read LLLL bytes at address AA..AA */ + case 'm': + /* TRY TO READ %x,%x. IF SUCCEED, SET PTR = 0 */ + ptr = &remcomInBuffer[1]; + if (hexToInt(&ptr, &addr) && + (*(ptr++) == ',') && (hexToInt(&ptr, &length))) { + ptr = 0; + /* + * hex doubles the byte count + */ + if (length > (BUFMAX / 2)) + length = BUFMAX / 2; + mem2hex((char *) addr, + remcomOutBuffer, length, 1); + if (mem_err) { + strcpy(remcomOutBuffer, "E03"); + debug_error("memory fault\n", NULL); + } + } + + if (ptr) { + strcpy(remcomOutBuffer, "E01"); + debug_error + ("malformed read memory command: %s\n", + remcomInBuffer); + } + break; + + /* MAA..AA,LLLL: + Write LLLL bytes at address AA.AA return OK */ + case 'M': + /* TRY TO READ '%x,%x:'. IF SUCCEED, SET PTR = 0 */ + ptr = &remcomInBuffer[1]; + if (hexToInt(&ptr, &addr) && + (*(ptr++) == ',') && + (hexToInt(&ptr, &length)) && (*(ptr++) == ':')) { + hex2mem(ptr, (char *) addr, length, 1); + + if (mem_err) { + strcpy(remcomOutBuffer, "E03"); + debug_error("memory fault\n", NULL); + } else { + strcpy(remcomOutBuffer, "OK"); + } + + ptr = 0; + } + if (ptr) { + strcpy(remcomOutBuffer, "E02"); + debug_error + ("malformed write memory command: %s\n", + remcomInBuffer); + } + break; + case 'S': + remcomInBuffer[0] = 's'; + case 'C': + /* Csig;AA..AA where ;AA..AA is optional + * continue with signal + * Since signals are meaning less to us, delete that + * part and then fall into the 'c' code. + */ + ptr = &remcomInBuffer[1]; + length = 2; + while (*ptr && *ptr != ';') { + length++; + ptr++; + } + if (*ptr) { + do { + ptr++; + *(ptr - length++) = *ptr; + } while (*ptr); + } else { + remcomInBuffer[1] = 0; + } + + /* cAA..AA Continue at address AA..AA(optional) */ + /* sAA..AA Step one instruction from AA..AA(optional) */ + /* D detach, reply OK and then continue */ + case 'c': + case 's': + case 'D': + + /* try to read optional parameter, + pc unchanged if no parm */ + ptr = &remcomInBuffer[1]; + if (hexToInt(&ptr, &addr)) { + if (remote_debug) + printk("Changing EIP to 0x%x\n", addr); + + regs.eip = addr; + } + + newPC = regs.eip; + + if (kgdb_eth != -1) { + kgdb_eth_set_trapmode(0); + } + + /* clear the trace bit */ + regs.eflags &= 0xfffffeff; + + /* set the trace bit if we're stepping */ + if (remcomInBuffer[0] == 's') + regs.eflags |= 0x100; + + /* detach is a friendly version of continue. Note that + debugging is still enabled (e.g hit control C) + */ + if (remcomInBuffer[0] == 'D') { + strcpy(remcomOutBuffer, "OK"); + putpacket(remcomOutBuffer); + } + + if (remote_debug) { + printk("Resuming execution\n"); + print_regs(®s); + } + asm volatile ("movl %%db6, %0\n":"=r" (dr6) + :); + if (!(dr6 & 0x4000)) { + for (breakno = 0; breakno < 4; ++breakno) { + if (dr6 & (1 << breakno) && + (breakinfo[breakno].type == 0)) { + /* Set restore flag */ + regs.eflags |= 0x10000; + break; + } + } + } + correct_hw_break(); + asm volatile ("movl %0, %%db6\n"::"r" (0)); + goto exit_kgdb; + + /* kill the program */ + case 'k': /* do nothing */ + break; + + /* query */ + case 'q': + nothreads = 0; + switch (remcomInBuffer[1]) { + case 'f': + threadid = 1; + thread_list = 2; + thread_list_start = (usethread ? : current); + case 's': + if (!cmp_str(&remcomInBuffer[2], + "ThreadInfo", 10)) + break; + + remcomOutBuffer[nothreads++] = 'm'; + for (; threadid < PID_MAX + MAX_NO_CPUS; + threadid++) { + thread = getthread(threadid); + if (thread) { + nothreads += int_to_hex_v( + &remcomOutBuffer[ + nothreads], + threadid); + if (thread_min > threadid) + thread_min = threadid; + remcomOutBuffer[ + nothreads] = ','; + nothreads++; + if (nothreads > BUFMAX - 10) + break; + } + } + if (remcomOutBuffer[nothreads - 1] == 'm') { + remcomOutBuffer[nothreads - 1] = 'l'; + } else { + nothreads--; + } + remcomOutBuffer[nothreads] = 0; + break; + +#ifdef old_thread_list /* Old thread info request */ + case 'L': + /* List threads */ + thread_list = 2; + thread_list_start = (usethread ? : current); + unpack_byte(remcomInBuffer + 3, &maxthreads); + unpack_threadid(remcomInBuffer + 5, &thref); + do { + int buf_thread_limit = + (BUFMAX - 22) / BUF_THREAD_ID_SIZE; + if (maxthreads > buf_thread_limit) { + maxthreads = buf_thread_limit; + } + } while (0); + remcomOutBuffer[0] = 'q'; + remcomOutBuffer[1] = 'M'; + remcomOutBuffer[4] = '0'; + pack_threadid(remcomOutBuffer + 5, &thref); + + threadid = threadref_to_int(&thref); + for (nothreads = 0; + nothreads < maxthreads && + threadid < PID_MAX + MAX_NO_CPUS; + threadid++) { + thread = getthread(threadid); + if (thread) { + int_to_threadref(&thref, + threadid); + pack_threadid(remcomOutBuffer + + 21 + + nothreads * 16, + &thref); + nothreads++; + if (thread_min > threadid) + thread_min = threadid; + } + } + + if (threadid == PID_MAX + MAX_NO_CPUS) { + remcomOutBuffer[4] = '1'; + } + pack_hex_byte(remcomOutBuffer + 2, nothreads); + remcomOutBuffer[21 + nothreads * 16] = '\0'; + break; +#endif + case 'C': + /* Current thread id */ + remcomOutBuffer[0] = 'Q'; + remcomOutBuffer[1] = 'C'; + threadid = current->pid; + if (!threadid) { + /* + * idle thread + */ + for (threadid = PID_MAX; + threadid < PID_MAX + MAX_NO_CPUS; + threadid++) { + if (current == + idle_task(threadid - + PID_MAX)) + break; + } + } + int_to_threadref(&thref, threadid); + pack_threadid(remcomOutBuffer + 2, &thref); + remcomOutBuffer[18] = '\0'; + break; + + case 'E': + /* Print exception info */ + printexceptioninfo(exceptionVector, + err_code, remcomOutBuffer); + break; + case 'T':{ + char * nptr; + /* Thread extra info */ + if (!cmp_str(&remcomInBuffer[2], + "hreadExtraInfo,", 15)) { + break; + } + ptr = &remcomInBuffer[17]; + hexToInt(&ptr, &threadid); + thread = getthread(threadid); + nptr = &thread->comm[0]; + length = 0; + ptr = &remcomOutBuffer[0]; + do { + length++; + ptr = pack_hex_byte(ptr, *nptr++); + } while (*nptr && length < 16); + /* + * would like that 16 to be the size of + * task_struct.comm but don't know the + * syntax.. + */ + *ptr = 0; + } + } + break; + + /* task related */ + case 'H': + switch (remcomInBuffer[1]) { + case 'g': + ptr = &remcomInBuffer[2]; + hexToInt(&ptr, &threadid); + thread = getthread(threadid); + if (!thread) { + remcomOutBuffer[0] = 'E'; + remcomOutBuffer[1] = '\0'; + break; + } + /* + * Just in case I forget what this is all about, + * the "thread info" command to gdb causes it + * to ask for a thread list. It then switches + * to each thread and asks for the registers. + * For this (and only this) usage, we want to + * fudge the registers of tasks not on the run + * list (i.e. waiting) to show the routine that + * called schedule. Also, gdb, is a minimalist + * in that if the current thread is the last + * it will not re-read the info when done. + * This means that in this case we must show + * the real registers. So here is how we do it: + * Each entry we keep track of the min + * thread in the list (the last that gdb will) + * get info for. We also keep track of the + * starting thread. + * "thread_list" is cleared when switching back + * to the min thread if it is was current, or + * if it was not current, thread_list is set + * to 1. When the switch to current comes, + * if thread_list is 1, clear it, else do + * nothing. + */ + usethread = thread; + if ((thread_list == 1) && + (thread == thread_list_start)) { + thread_list = 0; + } + if (thread_list && (threadid == thread_min)) { + if (thread == thread_list_start) { + thread_list = 0; + } else { + thread_list = 1; + } + } + /* follow through */ + case 'c': + remcomOutBuffer[0] = 'O'; + remcomOutBuffer[1] = 'K'; + remcomOutBuffer[2] = '\0'; + break; + } + break; + + /* Query thread status */ + case 'T': + ptr = &remcomInBuffer[1]; + hexToInt(&ptr, &threadid); + thread = getthread(threadid); + if (thread) { + remcomOutBuffer[0] = 'O'; + remcomOutBuffer[1] = 'K'; + remcomOutBuffer[2] = '\0'; + if (thread_min > threadid) + thread_min = threadid; + } else { + remcomOutBuffer[0] = 'E'; + remcomOutBuffer[1] = '\0'; + } + break; + + case 'Y': /* set up a hardware breakpoint */ + ptr = &remcomInBuffer[1]; + hexToInt(&ptr, &breakno); + ptr++; + hexToInt(&ptr, &breaktype); + ptr++; + hexToInt(&ptr, &length); + ptr++; + hexToInt(&ptr, &addr); + if (set_hw_break(breakno & 0x3, + breaktype & 0x3, + length & 0x3, addr) == 0) { + strcpy(remcomOutBuffer, "OK"); + } else { + strcpy(remcomOutBuffer, "ERROR"); + } + break; + + /* Remove hardware breakpoint */ + case 'y': + ptr = &remcomInBuffer[1]; + hexToInt(&ptr, &breakno); + if (remove_hw_break(breakno & 0x3) == 0) { + strcpy(remcomOutBuffer, "OK"); + } else { + strcpy(remcomOutBuffer, "ERROR"); + } + break; + + case 'r': /* reboot */ + strcpy(remcomOutBuffer, "OK"); + putpacket(remcomOutBuffer); + /*to_gdb("Rebooting\n"); */ + /* triplefault no return from here */ + { + static long no_idt[2]; + __asm__ __volatile__("lidt %0"::"m"(no_idt[0])); + BREAKPOINT; + } + + } /* switch */ + + /* reply to the request */ + putpacket(remcomOutBuffer); + } /* while(1==1) */ + /* + * reached by goto only. + */ + exit_kgdb: + /* + * Here is where we set up to trap a gdb function call. NEW_esp + * will be changed if we are trying to do this. We handle both + * adding and subtracting, thus allowing gdb to put grung on + * the stack which it removes later. + */ + if (NEW_esp != OLD_esp) { + int *ptr = END_OF_LOOKASIDE; + if (NEW_esp < OLD_esp) + ptr -= (OLD_esp - NEW_esp) / sizeof (int); + *--ptr = linux_regs->eflags; + *--ptr = linux_regs->xcs; + *--ptr = linux_regs->eip; + *--ptr = linux_regs->ecx; + *--ptr = linux_regs->ebx; + *--ptr = linux_regs->eax; + linux_regs->ecx = NEW_esp - (sizeof (int) * 6); + linux_regs->ebx = (unsigned int) END_OF_LOOKASIDE; + if (NEW_esp < OLD_esp) { + linux_regs->eip = (unsigned int) fn_call_stub; + } else { + linux_regs->eip = (unsigned int) fn_rtn_stub; + linux_regs->eax = NEW_esp; + } + linux_regs->eflags &= ~(IF_BIT | TF_BIT); + } +#ifdef CONFIG_SMP + /* + * Release gdb wait locks + * Sanity check time. Must have at least one cpu to run. Also single + * step must not be done if the current cpu is on hold. + */ + if (spinlock_count == 1) { + int ss_hold = (regs.eflags & 0x100) && kgdb_info.hold_on_sstep; + int cpu_avail = 0; + int i; + + for (i = 0; i < MAX_NO_CPUS; i++) { + if (!cpu_online(i)) + break; + if (!hold_cpu(i)) { + cpu_avail = 1; + } + } + /* + * Early in the bring up there will be NO cpus on line... + */ + if (!cpu_avail && !cpus_empty(cpu_online_map)) { + to_gdb("No cpus unblocked, see 'kgdb_info.hold_cpu'\n"); + goto once_again; + } + if (hold_cpu(smp_processor_id()) && (regs.eflags & 0x100)) { + to_gdb + ("Current cpu must be unblocked to single step\n"); + goto once_again; + } + if (!(ss_hold)) { + int i; + for (i = 0; i < MAX_NO_CPUS; i++) { + if (!hold_cpu(i)) { + spin_unlock(&waitlocks[i]); + } + } + } else { + spin_unlock(&waitlocks[smp_processor_id()]); + } + /* Release kgdb spinlock */ + KGDB_SPIN_UNLOCK(&kgdb_spinlock); + /* + * If this cpu is on hold, this is where we + * do it. Note, the NMI will pull us out of here, + * but will return as the above lock is not held. + * We will stay here till another cpu releases the lock for us. + */ + spin_unlock_wait(waitlocks + smp_processor_id()); + kgdb_local_irq_restore(flags); + return (0); + } +#if 0 +exit_just_unlock: +#endif +#endif + /* Release kgdb spinlock */ + KGDB_SPIN_UNLOCK(&kgdb_spinlock); + kgdb_local_irq_restore(flags); + return (0); +} + +/* this function is used to set up exception handlers for tracing and + * breakpoints. + * This function is not needed as the above line does all that is needed. + * We leave it for backward compatitability... + */ +void +set_debug_traps(void) +{ + /* + * linux_debug_hook is defined in traps.c. We store a pointer + * to our own exception handler into it. + + * But really folks, every hear of labeled common, an old Fortran + * concept. Lots of folks can reference it and it is define if + * anyone does. Only one can initialize it at link time. We do + * this with the hook. See the statement above. No need for any + * executable code and it is ready as soon as the kernel is + * loaded. Very desirable in kernel debugging. + + linux_debug_hook = handle_exception ; + */ + + /* In case GDB is started before us, ack any packets (presumably + "$?#xx") sitting there. + putDebugChar ('+'); + + initialized = 1; + */ +} + +/* This function will generate a breakpoint exception. It is used at the + beginning of a program to sync up with a debugger and can be used + otherwise as a quick means to stop program execution and "break" into + the debugger. */ +/* But really, just use the BREAKPOINT macro. We will handle the int stuff + */ + +#ifdef later +/* + * possibly we should not go thru the traps.c code at all? Someday. + */ +void +do_kgdb_int3(struct pt_regs *regs, long error_code) +{ + kgdb_handle_exception(3, 5, error_code, regs); + return; +} +#endif +#undef regs +#ifdef CONFIG_TRAP_BAD_SYSCALL_EXITS +asmlinkage void +bad_sys_call_exit(int stuff) +{ + struct pt_regs *regs = (struct pt_regs *) &stuff; + printk("Sys call %d return with %x preempt_count\n", + (int) regs->orig_eax, preempt_count()); +} +#endif +#ifdef CONFIG_STACK_OVERFLOW_TEST +#include +asmlinkage void +stack_overflow(void) +{ +#ifdef BREAKPOINT + BREAKPOINT; +#else + printk("Kernel stack overflow, looping forever\n"); +#endif + while (1) { + } +} +#endif + +#if defined(CONFIG_SMP) || defined(CONFIG_KGDB_CONSOLE) +char gdbconbuf[BUFMAX]; + +static void +kgdb_gdb_message(const char *s, unsigned count) +{ + int i; + int wcount; + char *bufptr; + /* + * This takes care of NMI while spining out chars to gdb + */ + IF_SMP(in_kgdb_console = 1); + gdbconbuf[0] = 'O'; + bufptr = gdbconbuf + 1; + while (count > 0) { + if ((count << 1) > (BUFMAX - 2)) { + wcount = (BUFMAX - 2) >> 1; + } else { + wcount = count; + } + count -= wcount; + for (i = 0; i < wcount; i++) { + bufptr = pack_hex_byte(bufptr, s[i]); + } + *bufptr = '\0'; + s += wcount; + + putpacket(gdbconbuf); + + } + IF_SMP(in_kgdb_console = 0); +} +#endif +#ifdef CONFIG_SMP +static void +to_gdb(const char *s) +{ + int count = 0; + while (s[count] && (count++ < BUFMAX)) ; + kgdb_gdb_message(s, count); +} +#endif +#ifdef CONFIG_KGDB_CONSOLE +#include +#include +#include +#include +#include + +void +kgdb_console_write(struct console *co, const char *s, unsigned count) +{ + + if (gdb_i386vector == -1) { + /* + * We have not yet talked to gdb. What to do... + * lets break, on continue we can do the write. + * But first tell him whats up. Uh, well no can do, + * as this IS the console. Oh well... + * We do need to wait or the messages will be lost. + * Other option would be to tell the above code to + * ignore this breakpoint and do an auto return, + * but that might confuse gdb. Also this happens + * early enough in boot up that we don't have the traps + * set up yet, so... + */ + breakpoint(); + } + kgdb_gdb_message(s, count); +} + +/* + * ------------------------------------------------------------ + * Serial KGDB driver + * ------------------------------------------------------------ + */ + +static struct console kgdbcons = { + name:"kgdb", + write:kgdb_console_write, +#ifdef CONFIG_KGDB_USER_CONSOLE + device:kgdb_console_device, +#endif + flags:CON_PRINTBUFFER | CON_ENABLED, + index:-1, +}; + +/* + * The trick here is that this file gets linked before printk.o + * That means we get to peer at the console info in the command + * line before it does. If we are up, we register, otherwise, + * do nothing. By returning 0, we allow printk to look also. + */ +static int kgdb_console_enabled; + +int __init +kgdb_console_init(char *str) +{ + if ((strncmp(str, "kgdb", 4) == 0) || (strncmp(str, "gdb", 3) == 0)) { + register_console(&kgdbcons); + kgdb_console_enabled = 1; + } + return 0; /* let others look at the string */ +} + +__setup("console=", kgdb_console_init); + +#ifdef CONFIG_KGDB_USER_CONSOLE +static kdev_t kgdb_console_device(struct console *c); +/* This stuff sort of works, but it knocks out telnet devices + * we are leaving it here in case we (or you) find time to figure it out + * better.. + */ + +/* + * We need a real char device as well for when the console is opened for user + * space activities. + */ + +static int +kgdb_consdev_open(struct inode *inode, struct file *file) +{ + return 0; +} + +static ssize_t +kgdb_consdev_write(struct file *file, const char *buf, + size_t count, loff_t * ppos) +{ + int size, ret = 0; + static char kbuf[128]; + static DECLARE_MUTEX(sem); + + /* We are not reentrant... */ + if (down_interruptible(&sem)) + return -ERESTARTSYS; + + while (count > 0) { + /* need to copy the data from user space */ + size = count; + if (size > sizeof (kbuf)) + size = sizeof (kbuf); + if (copy_from_user(kbuf, buf, size)) { + ret = -EFAULT; + break;; + } + kgdb_console_write(&kgdbcons, kbuf, size); + count -= size; + ret += size; + buf += size; + } + + up(&sem); + + return ret; +} + +struct file_operations kgdb_consdev_fops = { + open:kgdb_consdev_open, + write:kgdb_consdev_write +}; +static kdev_t +kgdb_console_device(struct console *c) +{ + return MKDEV(TTYAUX_MAJOR, 1); +} + +/* + * This routine gets called from the serial stub in the i386/lib + * This is so it is done late in bring up (just before the console open). + */ +void +kgdb_console_finit(void) +{ + if (kgdb_console_enabled) { + char *cptr = cdevname(MKDEV(TTYAUX_MAJOR, 1)); + char *cp = cptr; + while (*cptr && *cptr != '(') + cptr++; + *cptr = 0; + unregister_chrdev(TTYAUX_MAJOR, cp); + register_chrdev(TTYAUX_MAJOR, "kgdb", &kgdb_consdev_fops); + } +} +#endif +#endif +#ifdef CONFIG_KGDB_TS +#include /* time stamp code */ +#include /* in_interrupt */ +#ifdef CONFIG_KGDB_TS_64 +#define DATA_POINTS 64 +#endif +#ifdef CONFIG_KGDB_TS_128 +#define DATA_POINTS 128 +#endif +#ifdef CONFIG_KGDB_TS_256 +#define DATA_POINTS 256 +#endif +#ifdef CONFIG_KGDB_TS_512 +#define DATA_POINTS 512 +#endif +#ifdef CONFIG_KGDB_TS_1024 +#define DATA_POINTS 1024 +#endif +#ifndef DATA_POINTS +#define DATA_POINTS 128 /* must be a power of two */ +#endif +#define INDEX_MASK (DATA_POINTS - 1) +#if (INDEX_MASK & DATA_POINTS) +#error "CONFIG_KGDB_TS_COUNT must be a power of 2" +#endif +struct kgdb_and_then_struct { +#ifdef CONFIG_SMP + int on_cpu; +#endif + struct task_struct *task; + long long at_time; + int from_ln; + char *in_src; + void *from; + int *with_shpf; + int data0; + int data1; +}; +struct kgdb_and_then_struct2 { +#ifdef CONFIG_SMP + int on_cpu; +#endif + struct task_struct *task; + long long at_time; + int from_ln; + char *in_src; + void *from; + int *with_shpf; + struct task_struct *t1; + struct task_struct *t2; +}; +struct kgdb_and_then_struct kgdb_data[DATA_POINTS]; + +struct kgdb_and_then_struct *kgdb_and_then = &kgdb_data[0]; +int kgdb_and_then_count; + +void +kgdb_tstamp(int line, char *source, int data0, int data1) +{ + static spinlock_t ts_spin = SPIN_LOCK_UNLOCKED; + int flags; + kgdb_local_irq_save(flags); + spin_lock(&ts_spin); + rdtscll(kgdb_and_then->at_time); +#ifdef CONFIG_SMP + kgdb_and_then->on_cpu = smp_processor_id(); +#endif + kgdb_and_then->task = current; + kgdb_and_then->from_ln = line; + kgdb_and_then->in_src = source; + kgdb_and_then->from = __builtin_return_address(0); + kgdb_and_then->with_shpf = (int *) (((flags & IF_BIT) >> 9) | + (preempt_count() << 8)); + kgdb_and_then->data0 = data0; + kgdb_and_then->data1 = data1; + kgdb_and_then = &kgdb_data[++kgdb_and_then_count & INDEX_MASK]; + spin_unlock(&ts_spin); + kgdb_local_irq_restore(flags); +#ifdef CONFIG_PREEMPT + +#endif + return; +} +#endif +typedef int gdb_debug_hook(int exceptionVector, + int signo, int err_code, struct pt_regs *linux_regs); +gdb_debug_hook *linux_debug_hook = &kgdb_handle_exception; /* histerical reasons... */ + +static int __init kgdb_opt_kgdbeth(char *str) +{ + kgdb_eth = simple_strtoul(str, NULL, 10); + return 1; +} + +static int __init kgdb_opt_kgdbeth_remoteip(char *str) +{ + kgdb_remoteip = in_aton(str); + return 1; +} + +static int __init kgdb_opt_kgdbeth_listenport(char *str) +{ + kgdb_listenport = simple_strtoul(str, NULL, 10); + kgdb_sendport = kgdb_listenport - 1; + return 1; +} + +static int __init parse_hw_addr(char *str, unsigned char *addr) +{ + int i; + char *p; + + p = str; + i = 0; + while(1) + { + unsigned int c; + + sscanf(p, "%x:", &c); + addr[i++] = c; + while((*p != 0) && (*p != ':')) { + p++; + } + if (*p == 0) { + break; + } + p++; + } + + return 1; +} + +static int __init kgdb_opt_kgdbeth_remotemac(char *str) +{ + return parse_hw_addr(str, kgdb_remotemac); +} +static int __init kgdb_opt_kgdbeth_localmac(char *str) +{ + return parse_hw_addr(str, kgdb_localmac); +} + + +__setup("gdbeth=", kgdb_opt_kgdbeth); +__setup("gdbeth_remoteip=", kgdb_opt_kgdbeth_remoteip); +__setup("gdbeth_listenport=", kgdb_opt_kgdbeth_listenport); +__setup("gdbeth_remotemac=", kgdb_opt_kgdbeth_remotemac); +__setup("gdbeth_localmac=", kgdb_opt_kgdbeth_localmac); + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/kernel/nmi.c 999-mjb/arch/i386/kernel/nmi.c --- 000-virgin/arch/i386/kernel/nmi.c 2003-10-01 11:34:29.000000000 -0700 +++ 999-mjb/arch/i386/kernel/nmi.c 2003-11-24 16:14:00.000000000 -0800 @@ -31,7 +31,16 @@ #include #include +#ifdef CONFIG_KGDB +#include +#ifdef CONFIG_SMP +unsigned int nmi_watchdog = NMI_IO_APIC; +#else +unsigned int nmi_watchdog = NMI_LOCAL_APIC; +#endif +#else unsigned int nmi_watchdog = NMI_NONE; +#endif static unsigned int nmi_hz = HZ; unsigned int nmi_perfctr_msr; /* the MSR to reset in NMI handler */ extern void show_registers(struct pt_regs *regs); @@ -408,6 +417,9 @@ void touch_nmi_watchdog (void) for (i = 0; i < NR_CPUS; i++) alert_counter[i] = 0; } +#ifdef CONFIG_KGDB +int tune_watchdog = 5*HZ; +#endif void nmi_watchdog_tick (struct pt_regs * regs) { @@ -421,12 +433,24 @@ void nmi_watchdog_tick (struct pt_regs * sum = irq_stat[cpu].apic_timer_irqs; +#ifdef CONFIG_KGDB + if (! in_kgdb(regs) && last_irq_sums[cpu] == sum ) { + +#else if (last_irq_sums[cpu] == sum) { +#endif /* * Ayiee, looks like this CPU is stuck ... * wait a few IRQs (5 seconds) before doing the oops ... */ alert_counter[cpu]++; +#ifdef CONFIG_KGDB + if (alert_counter[cpu] == tune_watchdog) { + kgdb_handle_exception(2, SIGPWR, 0, regs); + last_irq_sums[cpu] = sum; + alert_counter[cpu] = 0; + } +#endif if (alert_counter[cpu] == 5*nmi_hz) { spin_lock(&nmi_print_lock); /* diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/kernel/numaq.c 999-mjb/arch/i386/kernel/numaq.c --- 000-virgin/arch/i386/kernel/numaq.c 2003-10-01 11:47:33.000000000 -0700 +++ 999-mjb/arch/i386/kernel/numaq.c 2003-11-24 16:36:03.000000000 -0800 @@ -42,6 +42,10 @@ extern long node_start_pfn[], node_end_p * function also increments numnodes with the number of nodes (quads) * present. */ +extern unsigned long max_pages_per_node; +extern int limit_mem_per_node; + +#define node_size_pages(n) (node_end_pfn[n] - node_start_pfn[n]) static void __init smp_dump_qct(void) { int node; @@ -60,6 +64,8 @@ static void __init smp_dump_qct(void) eq->hi_shrd_mem_start - eq->priv_mem_size); node_end_pfn[node] = MB_TO_PAGES( eq->hi_shrd_mem_start + eq->hi_shrd_mem_size); + if (node_size_pages(node) > max_pages_per_node) + node_end_pfn[node] = node_start_pfn[node] + max_pages_per_node; } } } diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/kernel/setup.c 999-mjb/arch/i386/kernel/setup.c --- 000-virgin/arch/i386/kernel/setup.c 2003-10-27 10:41:08.000000000 -0800 +++ 999-mjb/arch/i386/kernel/setup.c 2003-11-24 16:36:03.000000000 -0800 @@ -139,7 +139,7 @@ static void __init probe_roms(void) probe_extension_roms(roms); } -static void __init limit_regions(unsigned long long size) +void __init limit_regions(unsigned long long size) { unsigned long long current_addr = 0; int i; @@ -451,6 +451,7 @@ static void __init setup_memory_region(v print_memory_map(who); } /* setup_memory_region */ +unsigned long max_pages_per_node = 0xFFFFFFFF; static void __init parse_cmdline_early (char ** cmdline_p) { @@ -494,6 +495,14 @@ static void __init parse_cmdline_early ( userdef=1; } } + + if (c == ' ' && !memcmp(from, "memnode=", 8)) { + unsigned long long node_size_bytes; + if (to != command_line) + to--; + node_size_bytes = memparse(from+8, &from); + max_pages_per_node = node_size_bytes >> PAGE_SHIFT; + } if (c == ' ' && !memcmp(from, "memmap=", 7)) { if (to != command_line) diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/kernel/smp.c 999-mjb/arch/i386/kernel/smp.c --- 000-virgin/arch/i386/kernel/smp.c 2003-10-01 11:40:40.000000000 -0700 +++ 999-mjb/arch/i386/kernel/smp.c 2003-11-24 16:14:00.000000000 -0800 @@ -466,7 +466,17 @@ void flush_tlb_all(void) { on_each_cpu(do_flush_tlb_all, 0, 1, 1); } - +#ifdef CONFIG_KGDB +/* + * By using the NMI code instead of a vector we just sneak thru the + * word generator coming out with just what we want. AND it does + * not matter if clustered_apic_mode is set or not. + */ +void smp_send_nmi_allbutself(void) +{ + send_IPI_allbutself(APIC_DM_NMI); +} +#endif /* * this function sends a 'reschedule' IPI to another CPU. * it goes straight through and wastes no time serializing diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/kernel/srat.c 999-mjb/arch/i386/kernel/srat.c --- 000-virgin/arch/i386/kernel/srat.c 2003-10-01 11:47:33.000000000 -0700 +++ 999-mjb/arch/i386/kernel/srat.c 2003-11-24 16:36:03.000000000 -0800 @@ -53,6 +53,10 @@ struct node_memory_chunk_s { }; static struct node_memory_chunk_s node_memory_chunk[MAXCHUNKS]; +#define chunk_start(i) (node_memory_chunk[i].start_pfn) +#define chunk_end(i) (node_memory_chunk[i].end_pfn) +#define chunk_size(i) (chunk_end(i)-chunk_start(i)) + static int num_memory_chunks; /* total number of memory chunks */ static int zholes_size_init; static unsigned long zholes_size[MAX_NUMNODES * MAX_NR_ZONES]; @@ -198,6 +202,9 @@ static void __init initialize_physnode_m } } +extern unsigned long max_pages_per_node; +extern int limit_mem_per_node; + /* Parse the ACPI Static Resource Affinity Table */ static int __init acpi20_parse_srat(struct acpi_table_srat *sratp) { @@ -281,23 +288,27 @@ static int __init acpi20_parse_srat(stru node_memory_chunk[j].start_pfn, node_memory_chunk[j].end_pfn); } - + /*calculate node_start_pfn/node_end_pfn arrays*/ for (nid = 0; nid < numnodes; nid++) { - int been_here_before = 0; + unsigned long node_present_pages = 0; + node_start_pfn[nid] = -1; for (j = 0; j < num_memory_chunks; j++){ - if (node_memory_chunk[j].nid == nid) { - if (been_here_before == 0) { - node_start_pfn[nid] = node_memory_chunk[j].start_pfn; - node_end_pfn[nid] = node_memory_chunk[j].end_pfn; - been_here_before = 1; - } else { /* We've found another chunk of memory for the node */ - if (node_start_pfn[nid] < node_memory_chunk[j].start_pfn) { - node_end_pfn[nid] = node_memory_chunk[j].end_pfn; - } - } - } + unsigned long proposed_size; + + if (node_memory_chunk[j].nid != nid) + continue; + + proposed_size = node_present_pages + chunk_size(j); + if (proposed_size > max_pages_per_node) + chunk_end(j) = chunk_start(j) + + max_pages_per_node - node_present_pages; + node_present_pages += chunk_size(j); + + if (node_start_pfn[nid] == -1) + node_start_pfn[nid] = chunk_start(j); + node_end_pfn[nid] = chunk_end(j); } } return 1; diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/kernel/traps.c 999-mjb/arch/i386/kernel/traps.c --- 000-virgin/arch/i386/kernel/traps.c 2003-10-21 11:16:03.000000000 -0700 +++ 999-mjb/arch/i386/kernel/traps.c 2003-11-24 16:14:00.000000000 -0800 @@ -91,6 +91,42 @@ asmlinkage void alignment_check(void); asmlinkage void spurious_interrupt_bug(void); asmlinkage void machine_check(void); +#ifdef CONFIG_KGDB +extern void sysenter_entry(void); +#include +#include +extern void int3(void); +extern void debug(void); +void set_intr_gate(unsigned int n, void *addr); +static void set_intr_usr_gate(unsigned int n, void *addr); +/* + * Should be able to call this breakpoint() very early in + * bring up. Just hard code the call where needed. + * The breakpoint() code is here because set_?_gate() functions + * are local (static) to trap.c. They need be done only once, + * but it does not hurt to do them over. + */ +void breakpoint(void) +{ + set_intr_usr_gate(3,&int3); /* disable ints on trap */ + set_intr_gate(1,&debug); + set_intr_gate(14,&page_fault); + + BREAKPOINT; +} +#define CHK_REMOTE_DEBUG(trapnr,signr,error_code,regs,after) \ + { \ + if (!user_mode(regs) ) \ + { \ + kgdb_handle_exception(trapnr, signr, error_code, regs); \ + after; \ + } else if ((trapnr == 3) && (regs->eflags &0x200)) local_irq_enable(); \ + } +#else +#define CHK_REMOTE_DEBUG(trapnr,signr,error_code,regs,after) +#endif + + static int kstack_depth_to_print = 24; void show_trace(struct task_struct *task, unsigned long * stack) @@ -261,6 +297,15 @@ void die(const char * str, struct pt_reg bust_spinlocks(1); handle_BUG(regs); printk("%s: %04lx [#%d]\n", str, err & 0xffff, ++die_counter); +#ifdef CONFIG_KGDB + /* This is about the only place we want to go to kgdb even if in + * user mode. But we must go in via a trap so within kgdb we will + * always be in kernel mode. + */ + if (user_mode(regs)) + BREAKPOINT; +#endif + CHK_REMOTE_DEBUG(0,SIGTRAP,err,regs,) show_registers(regs); bust_spinlocks(0); spin_unlock_irq(&die_lock); @@ -330,6 +375,7 @@ static inline void do_trap(int trapnr, i #define DO_ERROR(trapnr, signr, str, name) \ asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ { \ + CHK_REMOTE_DEBUG(trapnr,signr,error_code,regs,)\ do_trap(trapnr, signr, str, 0, regs, error_code, NULL); \ } @@ -347,7 +393,9 @@ asmlinkage void do_##name(struct pt_regs #define DO_VM86_ERROR(trapnr, signr, str, name) \ asmlinkage void do_##name(struct pt_regs * regs, long error_code) \ { \ + CHK_REMOTE_DEBUG(trapnr, signr, error_code,regs, return)\ do_trap(trapnr, signr, str, 1, regs, error_code, NULL); \ + return; \ } #define DO_VM86_ERROR_INFO(trapnr, signr, str, name, sicode, siaddr) \ @@ -394,8 +442,10 @@ gp_in_vm86: return; gp_in_kernel: - if (!fixup_exception(regs)) + if (!fixup_exception(regs)){ + CHK_REMOTE_DEBUG(13,SIGSEGV,error_code,regs,) die("general protection fault", regs, error_code); + } } static void mem_parity_error(unsigned char reason, struct pt_regs * regs) @@ -557,8 +607,18 @@ asmlinkage void do_debug(struct pt_regs * allowing programs to debug themselves without the ptrace() * interface. */ +#ifdef CONFIG_KGDB + /* + * I think this is the only "real" case of a TF in the kernel + * that really belongs to user space. Others are + * "Ours all ours!" + */ + if (((regs->xcs & 3) == 0) && ((void *)regs->eip == sysenter_entry)) + goto clear_TF_reenable; +#else if ((regs->xcs & 3) == 0) goto clear_TF_reenable; +#endif if ((tsk->ptrace & (PT_DTRACE|PT_PTRACED)) == PT_DTRACE) goto clear_TF; } @@ -570,6 +630,17 @@ asmlinkage void do_debug(struct pt_regs info.si_errno = 0; info.si_code = TRAP_BRKPT; +#ifdef CONFIG_KGDB + /* + * If this is a kernel mode trap, we need to reset db7 to allow us + * to continue sanely ALSO skip the signal delivery + */ + if ((regs->xcs & 3) == 0) + goto clear_dr7; + + /* if not kernel, allow ints but only if they were on */ + if ( regs->eflags & 0x200) local_irq_enable(); +#endif /* If this is a kernel mode trap, save the user PC on entry to * the kernel, that's what the debugger can make sense of. */ @@ -584,6 +655,7 @@ clear_dr7: __asm__("movl %0,%%db7" : /* no output */ : "r" (0)); + CHK_REMOTE_DEBUG(1,SIGTRAP,error_code,regs,) return; debug_vm86: @@ -832,6 +904,12 @@ static void __init set_call_gate(void *a { _set_gate(a,12,3,addr,__KERNEL_CS); } +#ifdef CONFIG_KGDB +void set_intr_usr_gate(unsigned int n, void *addr) +{ + _set_gate(idt_table+n,14,3,addr,__KERNEL_CS); +} +#endif static void __init set_task_gate(unsigned int n, unsigned int gdt_entry) { @@ -854,7 +932,11 @@ void __init trap_init(void) set_trap_gate(0,÷_error); set_intr_gate(1,&debug); set_intr_gate(2,&nmi); +#ifndef CONFIG_KGDB set_system_gate(3,&int3); /* int3-5 can be called from all */ +#else + set_intr_usr_gate(3,&int3); /* int3-5 can be called from all */ +#endif set_system_gate(4,&overflow); set_system_gate(5,&bounds); set_trap_gate(6,&invalid_op); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/kernel/vmlinux.lds.S 999-mjb/arch/i386/kernel/vmlinux.lds.S --- 000-virgin/arch/i386/kernel/vmlinux.lds.S 2003-10-01 11:40:41.000000000 -0700 +++ 999-mjb/arch/i386/kernel/vmlinux.lds.S 2003-11-24 16:26:38.000000000 -0800 @@ -10,7 +10,7 @@ ENTRY(startup_32) jiffies = jiffies_64; SECTIONS { - . = 0xC0000000 + 0x100000; + . = __PAGE_OFFSET + 0x100000; /* read-only */ _text = .; /* Text and read-only data */ .text : { diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/lib/Makefile 999-mjb/arch/i386/lib/Makefile --- 000-virgin/arch/i386/lib/Makefile 2003-06-19 14:41:15.000000000 -0700 +++ 999-mjb/arch/i386/lib/Makefile 2003-11-24 16:35:58.000000000 -0800 @@ -9,4 +9,6 @@ lib-y = checksum.o delay.o \ lib-$(CONFIG_X86_USE_3DNOW) += mmx.o lib-$(CONFIG_HAVE_DEC_LOCK) += dec_and_lock.o +lib-$(CONFIG_KGDB) += kgdb_serial.o lib-$(CONFIG_DEBUG_IOVIRT) += iodebug.o +lib-$(CONFIG_MCOUNT) += mcount.o diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/lib/dec_and_lock.c 999-mjb/arch/i386/lib/dec_and_lock.c --- 000-virgin/arch/i386/lib/dec_and_lock.c 2002-12-09 18:45:50.000000000 -0800 +++ 999-mjb/arch/i386/lib/dec_and_lock.c 2003-11-24 16:27:18.000000000 -0800 @@ -10,6 +10,7 @@ #include #include +#ifndef ATOMIC_DEC_AND_LOCK int atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) { int counter; @@ -38,3 +39,5 @@ slow_path: spin_unlock(lock); return 0; } +#endif + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/lib/kgdb_serial.c 999-mjb/arch/i386/lib/kgdb_serial.c --- 000-virgin/arch/i386/lib/kgdb_serial.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/arch/i386/lib/kgdb_serial.c 2003-11-24 16:14:00.000000000 -0800 @@ -0,0 +1,499 @@ +/* + * Serial interface GDB stub + * + * Written (hacked together) by David Grothe (dave@gcom.com) + * Modified to allow invokation early in boot see also + * kgdb.h for instructions by George Anzinger(george@mvista.com) + * Modified to handle debugging over ethernet by Robert Walsh + * and wangdi , based on + * code by San Mehat. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifdef CONFIG_KGDB_USER_CONSOLE +extern void kgdb_console_finit(void); +#endif +#define PRNT_off +#define TEST_EXISTANCE +#ifdef PRNT +#define dbprintk(s) printk s +#else +#define dbprintk(s) +#endif +#define TEST_INTERRUPT_off +#ifdef TEST_INTERRUPT +#define intprintk(s) printk s +#else +#define intprintk(s) +#endif + +#define IRQ_T(info) ((info->flags & ASYNC_SHARE_IRQ) ? SA_SHIRQ : SA_INTERRUPT) + +#define GDB_BUF_SIZE 512 /* power of 2, please */ + +static char gdb_buf[GDB_BUF_SIZE]; +static int gdb_buf_in_inx; +static atomic_t gdb_buf_in_cnt; +static int gdb_buf_out_inx; + +struct async_struct *gdb_async_info; +static int gdb_async_irq; + +#define outb_px(a,b) outb_p(b,a) + +static void program_uart(struct async_struct *info); +static void write_char(struct async_struct *info, int chr); +/* + * Get a byte from the hardware data buffer and return it + */ +static int +read_data_bfr(struct async_struct *info) +{ + char it = inb_p(info->port + UART_LSR); + + if (it & UART_LSR_DR) + return (inb_p(info->port + UART_RX)); + /* + * If we have a framing error assume somebody messed with + * our uart. Reprogram it and send '-' both ways... + */ + if (it & 0xc) { + program_uart(info); + write_char(info, '-'); + return ('-'); + } + return (-1); + +} /* read_data_bfr */ + +/* + * Get a char if available, return -1 if nothing available. + * Empty the receive buffer first, then look at the interface hardware. + + * Locking here is a bit of a problem. We MUST not lock out communication + * if we are trying to talk to gdb about a kgdb entry. ON the other hand + * we can loose chars in the console pass thru if we don't lock. It is also + * possible that we could hold the lock or be waiting for it when kgdb + * NEEDS to talk. Since kgdb locks down the world, it does not need locks. + * We do, of course have possible issues with interrupting a uart operation, + * but we will just depend on the uart status to help keep that straight. + + */ +static spinlock_t uart_interrupt_lock = SPIN_LOCK_UNLOCKED; +#ifdef CONFIG_SMP +extern spinlock_t kgdb_spinlock; +#endif + +static int +read_char(struct async_struct *info) +{ + int chr; + unsigned long flags; + local_irq_save(flags); +#ifdef CONFIG_SMP + if (!spin_is_locked(&kgdb_spinlock)) { + spin_lock(&uart_interrupt_lock); + } +#endif + if (atomic_read(&gdb_buf_in_cnt) != 0) { /* intr routine has q'd chars */ + chr = gdb_buf[gdb_buf_out_inx++]; + gdb_buf_out_inx &= (GDB_BUF_SIZE - 1); + atomic_dec(&gdb_buf_in_cnt); + } else { + chr = read_data_bfr(info); + } +#ifdef CONFIG_SMP + if (!spin_is_locked(&kgdb_spinlock)) { + spin_unlock(&uart_interrupt_lock); + } +#endif + local_irq_restore(flags); + return (chr); +} + +/* + * Wait until the interface can accept a char, then write it. + */ +static void +write_char(struct async_struct *info, int chr) +{ + while (!(inb_p(info->port + UART_LSR) & UART_LSR_THRE)) ; + + outb_p(chr, info->port + UART_TX); + +} /* write_char */ + +/* + * Mostly we don't need a spinlock, but since the console goes + * thru here with interrutps on, well, we need to catch those + * chars. + */ +/* + * This is the receiver interrupt routine for the GDB stub. + * It will receive a limited number of characters of input + * from the gdb host machine and save them up in a buffer. + * + * When the gdb stub routine tty_getDebugChar() is called it + * draws characters out of the buffer until it is empty and + * then reads directly from the serial port. + * + * We do not attempt to write chars from the interrupt routine + * since the stubs do all of that via tty_putDebugChar() which + * writes one byte after waiting for the interface to become + * ready. + * + * The debug stubs like to run with interrupts disabled since, + * after all, they run as a consequence of a breakpoint in + * the kernel. + * + * Perhaps someone who knows more about the tty driver than I + * care to learn can make this work for any low level serial + * driver. + */ +static irqreturn_t +gdb_interrupt(int irq, void *dev_id, struct pt_regs *regs) +{ + struct async_struct *info; + unsigned long flags; + + info = gdb_async_info; + if (!info || !info->tty || irq != gdb_async_irq) + return IRQ_NONE; + + local_irq_save(flags); + spin_lock(&uart_interrupt_lock); + do { + int chr = read_data_bfr(info); + intprintk(("Debug char on int: %x hex\n", chr)); + if (chr < 0) + continue; + + if (chr == 3) { /* Ctrl-C means remote interrupt */ + BREAKPOINT; + continue; + } + + if (atomic_read(&gdb_buf_in_cnt) >= GDB_BUF_SIZE) { + /* buffer overflow tosses early char */ + read_char(info); + } + gdb_buf[gdb_buf_in_inx++] = chr; + gdb_buf_in_inx &= (GDB_BUF_SIZE - 1); + } while (inb_p(info->port + UART_IIR) & UART_IIR_RDI); + spin_unlock(&uart_interrupt_lock); + local_irq_restore(flags); + return IRQ_HANDLED; +} /* gdb_interrupt */ + +/* + * Just a NULL routine for testing. + */ +void +gdb_null(void) +{ +} /* gdb_null */ + +/* These structure are filled in with values defined in asm/kgdb_local.h + */ +static struct serial_state state = SB_STATE; +static struct async_struct local_info = SB_INFO; +static int ok_to_enable_ints = 0; +static void kgdb_enable_ints_now(void); + +extern char *kgdb_version; +/* + * Hook an IRQ for KGDB. + * + * This routine is called from tty_putDebugChar, below. + */ +static int ints_disabled = 1; +int +gdb_hook_interrupt(struct async_struct *info, int verb) +{ + struct serial_state *state = info->state; + unsigned long flags; + int port; +#ifdef TEST_EXISTANCE + int scratch, scratch2; +#endif + + /* The above fails if memory managment is not set up yet. + * Rather than fail the set up, just keep track of the fact + * and pick up the interrupt thing later. + */ + gdb_async_info = info; + port = gdb_async_info->port; + gdb_async_irq = state->irq; + if (verb) { + printk("kgdb %s : port =%x, IRQ=%d, divisor =%d\n", + kgdb_version, + port, + gdb_async_irq, gdb_async_info->state->custom_divisor); + } + local_irq_save(flags); +#ifdef TEST_EXISTANCE + /* Existance test */ + /* Should not need all this, but just in case.... */ + + scratch = inb_p(port + UART_IER); + outb_px(port + UART_IER, 0); + outb_px(0xff, 0x080); + scratch2 = inb_p(port + UART_IER); + outb_px(port + UART_IER, scratch); + if (scratch2) { + printk + ("gdb_hook_interrupt: Could not clear IER, not a UART!\n"); + local_irq_restore(flags); + return 1; /* We failed; there's nothing here */ + } + scratch2 = inb_p(port + UART_LCR); + outb_px(port + UART_LCR, 0xBF); /* set up for StarTech test */ + outb_px(port + UART_EFR, 0); /* EFR is the same as FCR */ + outb_px(port + UART_LCR, 0); + outb_px(port + UART_FCR, UART_FCR_ENABLE_FIFO); + scratch = inb_p(port + UART_IIR) >> 6; + if (scratch == 1) { + printk("gdb_hook_interrupt: Undefined UART type!" + " Not a UART! \n"); + local_irq_restore(flags); + return 1; + } else { + dbprintk(("gdb_hook_interrupt: UART type " + "is %d where 0=16450, 2=16550 3=16550A\n", scratch)); + } + scratch = inb_p(port + UART_MCR); + outb_px(port + UART_MCR, UART_MCR_LOOP | scratch); + outb_px(port + UART_MCR, UART_MCR_LOOP | 0x0A); + scratch2 = inb_p(port + UART_MSR) & 0xF0; + outb_px(port + UART_MCR, scratch); + if (scratch2 != 0x90) { + printk("gdb_hook_interrupt: " + "Loop back test failed! Not a UART!\n"); + local_irq_restore(flags); + return scratch2 + 1000; /* force 0 to fail */ + } +#endif /* test existance */ + program_uart(info); + local_irq_restore(flags); + + return (0); + +} /* gdb_hook_interrupt */ + +static void +program_uart(struct async_struct *info) +{ + int port = info->port; + + (void) inb_p(port + UART_RX); + outb_px(port + UART_IER, 0); + + (void) inb_p(port + UART_RX); /* serial driver comments say */ + (void) inb_p(port + UART_IIR); /* this clears the interrupt regs */ + (void) inb_p(port + UART_MSR); + outb_px(port + UART_LCR, UART_LCR_WLEN8 | UART_LCR_DLAB); + outb_px(port + UART_DLL, info->state->custom_divisor & 0xff); /* LS */ + outb_px(port + UART_DLM, info->state->custom_divisor >> 8); /* MS */ + outb_px(port + UART_MCR, info->MCR); + + outb_px(port + UART_FCR, UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1 | UART_FCR_CLEAR_XMIT | UART_FCR_CLEAR_RCVR); /* set fcr */ + outb_px(port + UART_LCR, UART_LCR_WLEN8); /* reset DLAB */ + outb_px(port + UART_FCR, UART_FCR_ENABLE_FIFO | UART_FCR_TRIGGER_1); /* set fcr */ + if (!ints_disabled) { + intprintk(("KGDB: Sending %d to port %x offset %d\n", + gdb_async_info->IER, + (int) gdb_async_info->port, UART_IER)); + outb_px(gdb_async_info->port + UART_IER, gdb_async_info->IER); + } + return; +} + +/* + * tty_getDebugChar + * + * This is a GDB stub routine. It waits for a character from the + * serial interface and then returns it. If there is no serial + * interface connection then it returns a bogus value which will + * almost certainly cause the system to hang. In the + */ +int kgdb_in_isr = 0; +int kgdb_in_lsr = 0; +extern spinlock_t kgdb_spinlock; + +/* Caller takes needed protections */ + +int +tty_getDebugChar(void) +{ + volatile int chr, dum, time, end_time; + + dbprintk(("tty_getDebugChar(port %x): ", gdb_async_info->port)); + + if (gdb_async_info == NULL) { + gdb_hook_interrupt(&local_info, 0); + } + /* + * This trick says if we wait a very long time and get + * no char, return the -1 and let the upper level deal + * with it. + */ + rdtsc(dum, time); + end_time = time + 2; + while (((chr = read_char(gdb_async_info)) == -1) && + (end_time - time) > 0) { + rdtsc(dum, time); + }; + /* + * This covers our butts if some other code messes with + * our uart, hay, it happens :o) + */ + if (chr == -1) + program_uart(gdb_async_info); + + dbprintk(("%c\n", chr > ' ' && chr < 0x7F ? chr : ' ')); + return (chr); + +} /* tty_getDebugChar */ + +static int count = 3; +static spinlock_t one_at_atime = SPIN_LOCK_UNLOCKED; + +static int __init +kgdb_enable_ints(void) +{ + if (kgdb_eth != -1) { + return 0; + } + if (gdb_async_info == NULL) { + gdb_hook_interrupt(&local_info, 1); + } + ok_to_enable_ints = 1; + kgdb_enable_ints_now(); +#ifdef CONFIG_KGDB_USER_CONSOLE + kgdb_console_finit(); +#endif + return 0; +} + +#ifdef CONFIG_SERIAL_8250 +void shutdown_for_kgdb(struct async_struct *gdb_async_info); +#endif + +#ifdef CONFIG_DISCONTIGMEM +static inline int kgdb_mem_init_done(void) +{ + return highmem_start_page != NULL; +} +#else +static inline int kgdb_mem_init_done(void) +{ + return max_mapnr != 0; +} +#endif + +static void +kgdb_enable_ints_now(void) +{ + if (!spin_trylock(&one_at_atime)) + return; + if (!ints_disabled) + goto exit; + if (kgdb_mem_init_done() && + ints_disabled) { /* don't try till mem init */ +#ifdef CONFIG_SERIAL_8250 + /* + * The ifdef here allows the system to be configured + * without the serial driver. + * Don't make it a module, however, it will steal the port + */ + shutdown_for_kgdb(gdb_async_info); +#endif + ints_disabled = request_irq(gdb_async_info->state->irq, + gdb_interrupt, + IRQ_T(gdb_async_info), + "KGDB-stub", NULL); + intprintk(("KGDB: request_irq returned %d\n", ints_disabled)); + } + if (!ints_disabled) { + intprintk(("KGDB: Sending %d to port %x offset %d\n", + gdb_async_info->IER, + (int) gdb_async_info->port, UART_IER)); + outb_px(gdb_async_info->port + UART_IER, gdb_async_info->IER); + } + exit: + spin_unlock(&one_at_atime); +} + +/* + * tty_putDebugChar + * + * This is a GDB stub routine. It waits until the interface is ready + * to transmit a char and then sends it. If there is no serial + * interface connection then it simply returns to its caller, having + * pretended to send the char. Caller takes needed protections. + */ +void +tty_putDebugChar(int chr) +{ + dbprintk(("tty_putDebugChar(port %x): chr=%02x '%c', ints_on=%d\n", + gdb_async_info->port, + chr, + chr > ' ' && chr < 0x7F ? chr : ' ', ints_disabled ? 0 : 1)); + + if (gdb_async_info == NULL) { + gdb_hook_interrupt(&local_info, 0); + } + + write_char(gdb_async_info, chr); /* this routine will wait */ + count = (chr == '#') ? 0 : count + 1; + if ((count == 2)) { /* try to enable after */ + if (ints_disabled & ok_to_enable_ints) + kgdb_enable_ints_now(); /* try to enable after */ + + /* We do this a lot because, well we really want to get these + * interrupts. The serial driver will clear these bits when it + * initializes the chip. Every thing else it does is ok, + * but this. + */ + if (!ints_disabled) { + outb_px(gdb_async_info->port + UART_IER, + gdb_async_info->IER); + } + } + +} /* tty_putDebugChar */ + +/* + * This does nothing for the serial port, since it doesn't buffer. + */ + +void tty_flushDebugChar(void) +{ +} + +module_init(kgdb_enable_ints); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/lib/mcount.S 999-mjb/arch/i386/lib/mcount.S --- 000-virgin/arch/i386/lib/mcount.S 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/arch/i386/lib/mcount.S 2003-11-24 16:35:58.000000000 -0800 @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2000 SGI + * + * Written by Dimitris Michailidis dimitris@sgi.com + * + * This file implements mcount(), which is used to collect profiling data. + * We provide several variants to accomodate different types of callers at + * the lowest possible overhead. + */ + +#include +#include + +#define MCOUNT_HEAD \ + pushl %ecx /* We must protect the arguments of FASTCALLs */; \ + movl mcount_hook, %ecx; \ + testl %ecx, %ecx; \ + jz 1f; \ + pushl %eax; \ + pushl %edx; \ + movl 12(%esp), %edx /* mcount()'s parent */ + +#define MCOUNT_TAIL \ + call *%ecx; \ + popl %edx; \ + popl %eax; \ +1: popl %ecx + +/* + * This is the main variant and is called by C code. GCC's -pg option + * automatically instruments every C function with a call to this. + */ +ENTRY(mcount) +#if defined(CONFIG_MCOUNT) + MCOUNT_HEAD +#ifdef CONFIG_FRAME_POINTER + movl 4(%ebp), %eax /* mcount()'s parent's parent */ +#endif + MCOUNT_TAIL +#endif + ret diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/mm/fault.c 999-mjb/arch/i386/mm/fault.c --- 000-virgin/arch/i386/mm/fault.c 2003-10-21 11:16:03.000000000 -0700 +++ 999-mjb/arch/i386/mm/fault.c 2003-11-24 16:14:00.000000000 -0800 @@ -402,6 +402,12 @@ no_context: * Oops. The kernel tried to access some bad page. We'll have to * terminate things with extreme prejudice. */ +#ifdef CONFIG_KGDB + if (!user_mode(regs)){ + kgdb_handle_exception(14,SIGBUS, error_code, regs); + return; + } +#endif bust_spinlocks(1); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/mm/hugetlbpage.c 999-mjb/arch/i386/mm/hugetlbpage.c --- 000-virgin/arch/i386/mm/hugetlbpage.c 2003-11-24 16:12:27.000000000 -0800 +++ 999-mjb/arch/i386/mm/hugetlbpage.c 2003-11-24 16:34:48.000000000 -0800 @@ -61,6 +61,27 @@ static struct page *alloc_fresh_huge_pag static void free_huge_page(struct page *page); +#ifdef CONFIG_NUMA + +static inline void huge_inc_rss(struct mm_struct *mm, struct page *page) +{ + mm->rss += (HPAGE_SIZE / PAGE_SIZE); + mm->pernode_rss[page_to_nid(page)] += (HPAGE_SIZE / PAGE_SIZE); +} + +static inline void huge_dec_rss(struct mm_struct *mm, struct page *page) +{ + mm->rss -= (HPAGE_SIZE / PAGE_SIZE); + mm->pernode_rss[page_to_nid(page)] -= (HPAGE_SIZE / PAGE_SIZE); +} + +#else /* !CONFIG_NUMA */ + +#define huge_inc_rss(mm, page) ((mm)->rss += (HPAGE_SIZE / PAGE_SIZE)) +#define huge_dec_rss(mm, page) ((mm)->rss -= (HPAGE_SIZE / PAGE_SIZE)) + +#endif /* CONFIG_NUMA */ + static struct page *alloc_hugetlb_page(void) { int i; @@ -105,7 +126,7 @@ static void set_huge_pte(struct mm_struc { pte_t entry; - mm->rss += (HPAGE_SIZE / PAGE_SIZE); + huge_inc_rss(mm, page); if (write_access) { entry = pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot))); @@ -145,7 +166,7 @@ int copy_hugetlb_page_range(struct mm_st ptepage = pte_page(entry); get_page(ptepage); set_pte(dst_pte, entry); - dst->rss += (HPAGE_SIZE / PAGE_SIZE); + huge_inc_rss(dst, ptepage); addr += HPAGE_SIZE; } return 0; @@ -314,8 +335,8 @@ void unmap_hugepage_range(struct vm_area page = pte_page(*pte); huge_page_release(page); pte_clear(pte); + huge_dec_rss(mm, page); } - mm->rss -= (end - start) >> PAGE_SHIFT; flush_tlb_range(vma, start, end); } diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/i386/mm/pgtable.c 999-mjb/arch/i386/mm/pgtable.c --- 000-virgin/arch/i386/mm/pgtable.c 2003-10-01 11:34:29.000000000 -0700 +++ 999-mjb/arch/i386/mm/pgtable.c 2003-11-25 14:24:37.000000000 -0800 @@ -237,3 +237,60 @@ void pgd_free(pgd_t *pgd) /* in the non-PAE case, clear_page_tables() clears user pgd entries */ kmem_cache_free(pgd_cache, pgd); } + +#define GLIBC_BUFFER (32*1024*1024) + +/* + * This is total crap; it needs to use the free area cache to mitigate + * catastrophic O(n) search with many vmas. + */ +unsigned long arch_get_unmapped_area(struct file *filp, unsigned long addr, + unsigned long len, unsigned long pgoff, + unsigned long flags) +{ + struct mm_struct *mm = current->mm; + struct vm_area_struct *vma, *prev; + + len = PAGE_ALIGN(len); + addr = PAGE_ALIGN(addr); + + if (len > TASK_SIZE) + return -ENOMEM; + + if (addr) { + struct vm_area_struct *vma; + vma = find_vma(mm, addr); + if (TASK_SIZE - len >= addr && + (!vma || addr + len <= vma->vm_start)) + goto out; + } + + if (!mm->mmap) { + if (len > TASK_SIZE - GLIBC_BUFFER) + addr = TASK_SIZE - len; + else + addr = TASK_SIZE - GLIBC_BUFFER - len; + goto out; + } + + addr = -ENOMEM; + for (prev = NULL, vma = mm->mmap; vma; prev = vma, vma = vma->vm_next) { + unsigned long lo, hi; + lo = prev ? prev->vm_end : 0; + hi = vma->vm_start; + if (hi - lo >= len && (addr == -ENOMEM || addr < hi - len)) + addr = hi - len; + } + /* + * We're at the last one; let's try the top, but only if nothing + * else can be found (to respect GLIBC_BUFFER). + */ + if (prev && TASK_SIZE - prev->vm_end >= len) { + if (TASK_SIZE - GLIBC_BUFFER - prev->vm_end >= len) + addr = TASK_SIZE - GLIBC_BUFFER - len; + else if (addr == -ENOMEM) + addr = TASK_SIZE - len; + } +out: + return addr; +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/ppc/Kconfig 999-mjb/arch/ppc/Kconfig --- 000-virgin/arch/ppc/Kconfig 2003-10-14 15:50:13.000000000 -0700 +++ 999-mjb/arch/ppc/Kconfig 2003-11-24 16:35:16.000000000 -0800 @@ -1288,6 +1288,36 @@ source "drivers/usb/Kconfig" source "lib/Kconfig" +menu "GCOV coverage profiling" + +config GCOV_PROFILE + bool "GCOV coverage profiling" + ---help--- + Provide infrastructure for coverage support for the kernel. This + will not compile the kernel by default with the necessary flags. + To obtain coverage information for the entire kernel, one should + enable the subsequent option (Profile entire kernel). If only + particular files or directories of the kernel are desired, then + one must provide the following compile options for such targets: + "-fprofile-arcs -ftest-coverage" in the CFLAGS. To obtain + access to the coverage data one must insmod the gcov-prof kernel + module. + +config GCOV_ALL + bool "GCOV_ALL" + depends on GCOV_PROFILE + ---help--- + If you say Y here, it will compile the entire kernel with coverage + option enabled. + +config GCOV_PROC + tristate "gcov-proc module" + depends on GCOV_PROFILE && PROC_FS + ---help--- + This is the gcov-proc module that exposes gcov data through the + /proc filesystem + +endmenu menu "Kernel hacking" diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/ppc/boot/openfirmware/common.c 999-mjb/arch/ppc/boot/openfirmware/common.c --- 000-virgin/arch/ppc/boot/openfirmware/common.c 2002-12-09 18:46:16.000000000 -0800 +++ 999-mjb/arch/ppc/boot/openfirmware/common.c 2003-11-24 16:35:16.000000000 -0800 @@ -30,6 +30,10 @@ struct memchunk { static struct memchunk *freechunks; +#ifdef CONFIG_GCOV_PROFILE +void __bb_init_func (void *ptr /* struct bb *blocks */) { } +#endif + static void *zalloc(void *x, unsigned items, unsigned size) { void *p; diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/ppc/boot/prep/misc.c 999-mjb/arch/ppc/boot/prep/misc.c --- 000-virgin/arch/ppc/boot/prep/misc.c 2003-01-13 16:04:55.000000000 -0800 +++ 999-mjb/arch/ppc/boot/prep/misc.c 2003-11-24 16:35:16.000000000 -0800 @@ -71,6 +71,10 @@ extern unsigned long serial_init(int cha extern void serial_fixups(void); extern unsigned long get_mem_size(void); +#ifdef CONFIG_GCOV_PROFILE +void __bb_init_func (void *ptr /* struct bb *blocks */) { } +#endif + void writel(unsigned int val, unsigned int address) { diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/ppc/kernel/Makefile 999-mjb/arch/ppc/kernel/Makefile --- 000-virgin/arch/ppc/kernel/Makefile 2003-10-01 11:47:36.000000000 -0700 +++ 999-mjb/arch/ppc/kernel/Makefile 2003-11-24 16:35:16.000000000 -0800 @@ -18,8 +18,8 @@ extra-$(CONFIG_6xx) += idle_6xx.o extra-$(CONFIG_POWER4) += idle_power4.o extra-y += vmlinux.lds.s -obj-y := entry.o traps.o irq.o idle.o time.o misc.o \ - process.o signal.o ptrace.o align.o \ +obj-y := entry.o ptrace.o traps.o irq.o idle.o time.o misc.o \ + process.o signal.o align.o \ semaphore.o syscalls.o setup.o \ cputable.o ppc_htab.o obj-$(CONFIG_6xx) += l2cr.o cpu_setup_6xx.o diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/ppc/kernel/entry.S 999-mjb/arch/ppc/kernel/entry.S --- 000-virgin/arch/ppc/kernel/entry.S 2003-11-24 16:12:28.000000000 -0800 +++ 999-mjb/arch/ppc/kernel/entry.S 2003-11-24 16:35:16.000000000 -0800 @@ -106,10 +106,26 @@ transfer_to_handler: mfspr r11,SPRN_HID0 mtcr r11 BEGIN_FTR_SECTION +#ifdef CONFIG_GCOV_PROFILE + bt- 8,near1_power_save_6xx_restore /* Check DOZE */ + b skip1_power_save_6xx_restore +near1_power_save_6xx_restore: + b power_save_6xx_restore +skip1_power_save_6xx_restore: +#else bt- 8,power_save_6xx_restore /* Check DOZE */ +#endif END_FTR_SECTION_IFSET(CPU_FTR_CAN_DOZE) BEGIN_FTR_SECTION +#ifdef CONFIG_GCOV_PROFILE + bt- 9,near2_power_save_6xx_restore /* Check NAP */ + b skip2_power_save_6xx_restore +near2_power_save_6xx_restore: + b power_save_6xx_restore +skip2_power_save_6xx_restore: +#else bt- 9,power_save_6xx_restore /* Check NAP */ +#endif END_FTR_SECTION_IFSET(CPU_FTR_CAN_NAP) #endif /* CONFIG_6xx */ .globl transfer_to_handler_cont diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/ppc/kernel/head.S 999-mjb/arch/ppc/kernel/head.S --- 000-virgin/arch/ppc/kernel/head.S 2003-10-21 11:16:04.000000000 -0700 +++ 999-mjb/arch/ppc/kernel/head.S 2003-11-24 16:35:16.000000000 -0800 @@ -1755,3 +1755,25 @@ intercept_table: */ abatron_pteptrs: .space 8 + +#ifdef CONFIG_GCOV_PROFILE +/* + * The .ctors-section contains a list of pointers to constructor + * functions which are used to initialize gcov structures. + * + * Because there is no NULL at the end of the constructor list + * in the kernel we need the addresses of both the constructor + * as well as the destructor list which are supposed to be + * adjacent. + */ + +.section ".ctors","aw" +.globl __CTOR_LIST__ +.type __CTOR_LIST__,@object +__CTOR_LIST__: +.section ".dtors","aw" +.globl __DTOR_LIST__ +.type __DTOR_LIST__,@object +__DTOR_LIST__: +#endif + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/ppc/syslib/prom_init.c 999-mjb/arch/ppc/syslib/prom_init.c --- 000-virgin/arch/ppc/syslib/prom_init.c 2003-10-01 11:47:37.000000000 -0700 +++ 999-mjb/arch/ppc/syslib/prom_init.c 2003-11-24 16:35:16.000000000 -0800 @@ -737,7 +737,11 @@ prom_instantiate_rtas(void) * Actually OF has bugs so we just arbitrarily * use memory at the 6MB point. */ +#ifdef CONFIG_GCOV_PROFILE + rtas_data = 0x990000; +#else rtas_data = 6 << 20; +#endif prom_print(" at "); prom_print_hex(rtas_data); } diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/ppc64/Kconfig 999-mjb/arch/ppc64/Kconfig --- 000-virgin/arch/ppc64/Kconfig 2003-10-01 11:47:38.000000000 -0700 +++ 999-mjb/arch/ppc64/Kconfig 2003-11-24 16:35:58.000000000 -0800 @@ -323,6 +323,37 @@ config VIOPATH source "arch/ppc64/oprofile/Kconfig" +menu "GCOV coverage profiling" + +config GCOV_PROFILE + bool "GCOV coverage profiling" + ---help--- + Provide infrastructure for coverage support for the kernel. This + will not compile the kernel by default with the necessary flags. + To obtain coverage information for the entire kernel, one should + enable the subsequent option (Profile entire kernel). If only + particular files or directories of the kernel are desired, then + one must provide the following compile options for such targets: + "-fprofile-arcs -ftest-coverage" in the CFLAGS. To obtain + access to the coverage data one must insmod the gcov-prof kernel + module. + +config GCOV_ALL + bool "GCOV_ALL" + depends on GCOV_PROFILE + ---help--- + If you say Y here, it will compile the entire kernel with coverage + option enabled. + +config GCOV_PROC + tristate "gcov-proc module" + depends on GCOV_PROFILE && PROC_FS + ---help--- + This is the gcov-proc module that exposes gcov data through the + /proc filesystem + +endmenu + menu "Kernel hacking" config DEBUG_KERNEL @@ -377,6 +408,14 @@ config DEBUG_INFO Say Y here only if you plan to use gdb to debug the kernel. If you don't debug the kernel, you can say N. +config MCOUNT + bool "Generate function call graph" + depends on DEBUG_KERNEL + help + This option instruments the kernel to generate a deterministic + function call graph. Answering Y here will make your kernel run + 1-2% slower. + endmenu source "security/Kconfig" diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/ppc64/kernel/Makefile 999-mjb/arch/ppc64/kernel/Makefile --- 000-virgin/arch/ppc64/kernel/Makefile 2003-10-01 11:40:44.000000000 -0700 +++ 999-mjb/arch/ppc64/kernel/Makefile 2003-11-24 16:35:58.000000000 -0800 @@ -5,6 +5,17 @@ EXTRA_CFLAGS += -mno-minimal-toc extra-y := head.o vmlinux.lds.s +ifeq ($(CONFIG_MCOUNT),y) +quiet_cmd_nopg = CC $@ + cmd_nopg = $(CC) $(subst -pg,,$(CFLAGS)) -c $(src)/$(*F).c -o $@ + +$(obj)/stab.o: alwayscc + $(call cmd,nopg) + +alwayscc: + $(Q)rm -f $(obj)/stab.o +endif + obj-y := setup.o entry.o traps.o irq.o idle.o \ time.o process.o signal.o syscalls.o misc.o ptrace.o \ align.o semaphore.o bitops.o stab.o htab.o pacaData.o \ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/ppc64/kernel/head.S 999-mjb/arch/ppc64/kernel/head.S --- 000-virgin/arch/ppc64/kernel/head.S 2003-10-21 11:16:04.000000000 -0700 +++ 999-mjb/arch/ppc64/kernel/head.S 2003-11-24 16:35:16.000000000 -0800 @@ -1924,3 +1924,24 @@ stab_array: .globl cmd_line cmd_line: .space 512 + +#ifdef CONFIG_GCOV_PROFILE +/* + * The .ctors-section contains a list of pointers to constructor + * functions which are used to initialize gcov structures. + * + * Because there is no NULL at the end of the constructor list + * in the kernel we need the addresses of both the constructor + * as well as the destructor list which are supposed to be + * adjacent. + */ + +.section ".ctors","aw" +.globl __CTOR_LIST__ +.type __CTOR_LIST__,@object +__CTOR_LIST__: +.section ".dtors","aw" +.globl __DTOR_LIST__ +.type __DTOR_LIST__,@object +__DTOR_LIST__: +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/ppc64/lib/Makefile 999-mjb/arch/ppc64/lib/Makefile --- 000-virgin/arch/ppc64/lib/Makefile 2003-06-19 14:41:18.000000000 -0700 +++ 999-mjb/arch/ppc64/lib/Makefile 2003-11-24 16:35:58.000000000 -0800 @@ -4,3 +4,4 @@ lib-y := checksum.o dec_and_lock.o string.o strcase.o lib-y += copypage.o memcpy.o copyuser.o +lib-$(CONFIG_MCOUNT) += mcount.o diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/ppc64/lib/mcount.S 999-mjb/arch/ppc64/lib/mcount.S --- 000-virgin/arch/ppc64/lib/mcount.S 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/arch/ppc64/lib/mcount.S 2003-11-24 16:35:58.000000000 -0800 @@ -0,0 +1,61 @@ +/* + * Written by Adam Litke (agl@us.ibm.com) + * + * This file implements mcount(), which is used to collect profiling data. + * + */ + +#include +#include +#include + +/* + * This is called by C code in all files compiled with -pg + */ + +_GLOBAL(_mcount) + /* Store parameter regs on stack */ + std r3, -16(r1) + std r4, -24(r1) + std r5, -32(r1) + std r6, -40(r1) + std r7, -48(r1) + std r8, -56(r1) + std r9, -64(r1) + std r10, -72(r1) + + /* Set up new stack frame */ + mflr r0 + std r0, 16(r1) + mfcr r0 + std r0, 8(r1) + stdu r1, -184(r1) + + /* If relocation is off skip mcount_entry */ + std r14, -8(r1) + mfmsr r14 + andi. r14, r14, MSR_IR + cmpldi r14, 0 + ld r14, -8(r1) + beq 1f + + /* Call mcount_entry */ + bl .mcount_entry + ori 0,0,0 + +1: + /* Put everything back */ + addi r1, r1, 184 + ld r0, 16(r1) + mtlr r0 + ld r0, 8(r1) + mtcr r0 + ld r3, -16(r1) + ld r4, -24(r1) + ld r5, -32(r1) + ld r6, -40(r1) + ld r7, -48(r1) + ld r8, -56(r1) + ld r9, -64(r1) + ld r10, -72(r1) + blr diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/x86_64/Kconfig 999-mjb/arch/x86_64/Kconfig --- 000-virgin/arch/x86_64/Kconfig 2003-10-14 15:50:15.000000000 -0700 +++ 999-mjb/arch/x86_64/Kconfig 2003-11-24 16:35:16.000000000 -0800 @@ -432,6 +432,37 @@ source "drivers/usb/Kconfig" source "arch/x86_64/oprofile/Kconfig" +menu "GCOV coverage profiling" + +config GCOV_PROFILE + bool "GCOV coverage profiling" + ---help--- + Provide infrastructure for coverage support for the kernel. This + will not compile the kernel by default with the necessary flags. + To obtain coverage information for the entire kernel, one should + enable the subsequent option (Profile entire kernel). If only + particular files or directories of the kernel are desired, then + one must provide the following compile options for such targets: + "-fprofile-arcs -ftest-coverage" in the CFLAGS. To obtain + access to the coverage data one must insmod the gcov-prof kernel + module. + +config GCOV_ALL + bool "GCOV_ALL" + depends on GCOV_PROFILE + ---help--- + If you say Y here, it will compile the entire kernel with coverage + option enabled. + +config GCOV_PROC + tristate "gcov-proc module" + depends on GCOV_PROFILE && PROC_FS + ---help--- + This is the gcov-proc module that exposes gcov data through the + /proc filesystem + +endmenu + menu "Kernel hacking" config DEBUG_KERNEL diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/x86_64/boot/compressed/head.S 999-mjb/arch/x86_64/boot/compressed/head.S --- 000-virgin/arch/x86_64/boot/compressed/head.S 2002-12-09 18:46:24.000000000 -0800 +++ 999-mjb/arch/x86_64/boot/compressed/head.S 2003-11-24 16:14:00.000000000 -0800 @@ -26,6 +26,7 @@ .code32 .text +#define IN_BOOTLOADER #include #include diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/x86_64/boot/compressed/misc.c 999-mjb/arch/x86_64/boot/compressed/misc.c --- 000-virgin/arch/x86_64/boot/compressed/misc.c 2003-10-01 11:47:39.000000000 -0700 +++ 999-mjb/arch/x86_64/boot/compressed/misc.c 2003-11-24 16:14:00.000000000 -0800 @@ -9,6 +9,7 @@ * High loaded stuff by Hans Lermen & Werner Almesberger, Feb. 1996 */ +#define IN_BOOTLOADER #include "miscsetup.h" #include diff -purN -X /home/mbligh/.diff.exclude 000-virgin/arch/x86_64/kernel/head.S 999-mjb/arch/x86_64/kernel/head.S --- 000-virgin/arch/x86_64/kernel/head.S 2003-10-01 11:34:39.000000000 -0700 +++ 999-mjb/arch/x86_64/kernel/head.S 2003-11-24 16:35:16.000000000 -0800 @@ -383,3 +383,23 @@ ENTRY(idt_table) .quad 0 .endr +#ifdef CONFIG_GCOV_PROFILE +/* + * The .ctors-section contains a list of pointers to constructor + * functions which are used to initialize gcov structures. + * + * Because there is no NULL at the end of the constructor list + * in the kernel we need the addresses of both the constructor + * as well as the destructor list which are supposed to be + * adjacent. + */ + +.section ".ctors","aw" +.globl __CTOR_LIST__ +.type __CTOR_LIST__,@object +__CTOR_LIST__: +.section ".dtors","aw" +.globl __DTOR_LIST__ +.type __DTOR_LIST__,@object +__DTOR_LIST__: +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/Makefile 999-mjb/drivers/Makefile --- 000-virgin/drivers/Makefile 2003-10-01 11:46:32.000000000 -0700 +++ 999-mjb/drivers/Makefile 2003-11-24 16:35:16.000000000 -0800 @@ -49,3 +49,4 @@ obj-$(CONFIG_ISDN_BOOL) += isdn/ obj-$(CONFIG_MCA) += mca/ obj-$(CONFIG_EISA) += eisa/ obj-$(CONFIG_CPU_FREQ) += cpufreq/ +obj-$(CONFIG_GCOV_PROC) += gcov/ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/char/keyboard.c 999-mjb/drivers/char/keyboard.c --- 000-virgin/drivers/char/keyboard.c 2003-10-27 10:41:09.000000000 -0800 +++ 999-mjb/drivers/char/keyboard.c 2003-11-24 16:14:00.000000000 -0800 @@ -1052,6 +1052,9 @@ void kbd_keycode(unsigned int keycode, i } if (sysrq_down && down && !rep) { handle_sysrq(kbd_sysrq_xlate[keycode], regs, tty); +#ifdef CONFIG_KGDB_SYSRQ + sysrq_down = 0; /* in case we miss the "up" event */ +#endif return; } #endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/char/sysrq.c 999-mjb/drivers/char/sysrq.c --- 000-virgin/drivers/char/sysrq.c 2003-10-01 11:47:45.000000000 -0700 +++ 999-mjb/drivers/char/sysrq.c 2003-11-24 16:14:00.000000000 -0800 @@ -35,6 +35,25 @@ #include #include +#ifdef CONFIG_KGDB_SYSRQ + +#define GDB_OP &kgdb_op +static void kgdb_sysrq(int key, struct pt_regs *pt_regs, struct tty_struct *tty) +{ + printk("kgdb sysrq\n"); + breakpoint(); +} + +static struct sysrq_key_op kgdb_op = { + .handler = kgdb_sysrq, + .help_msg = "kGdb|Fgdb", + .action_msg = "Debug breakpoint\n", +}; + +#else +#define GDB_OP NULL +#endif + extern void reset_vc(unsigned int); @@ -238,8 +257,8 @@ static struct sysrq_key_op *sysrq_key_ta /* c */ NULL, /* d */ NULL, /* e */ &sysrq_term_op, -/* f */ NULL, -/* g */ NULL, +/* f */ GDB_OP, +/* g */ GDB_OP, /* h */ NULL, /* i */ &sysrq_kill_op, /* j */ NULL, diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/gcov/Makefile 999-mjb/drivers/gcov/Makefile --- 000-virgin/drivers/gcov/Makefile 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/gcov/Makefile 2003-11-24 16:35:16.000000000 -0800 @@ -0,0 +1,8 @@ +# +# Makefile for GCOV profiling kernel module +# + +obj-$(CONFIG_GCOV_PROC) += gcov-proc.o + +$(obj)/gcov-proc.o: $(obj)/gcov-proc.c + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/gcov/gcov-proc.c 999-mjb/drivers/gcov/gcov-proc.c --- 000-virgin/drivers/gcov/gcov-proc.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/gcov/gcov-proc.c 2003-11-24 16:35:16.000000000 -0800 @@ -0,0 +1,713 @@ +/* + * This kernel module provides access to coverage data produced by + * an instrumented kernel via an entry in the proc file system + * at /proc/gcov/. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Copyright (c) International Business Machines Corp., 2002 + * + * Author: Hubertus Franke + * Rajan Ravindran + * + * Bugfixes by Peter.Oberparleiter@de.ibm.com: + * Changes by Paul Larson + * Automatically detect gcc version for gcov_type + * + */ + +#include +#include +#include + +#include +#include +#include +#include + +MODULE_LICENSE("GPL"); +#define GCOV_PROF_PROC "gcov" + +static DECLARE_MUTEX_LOCKED(gcov_lock); +#define DOWN() down(&gcov_lock); +#define UP() up(&gcov_lock); +#define PAD8(x) ((x + 7) & ~7) + +//#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,4)) +//static inline struct proc_dir_entry *PDE(const struct inode *inode) +//{ +// return ((struct proc_dir_entry *) inode->u.generic_ip); +//} +//#endif + +/* ################################################################### + # NOTICE ########################################################## + ################################################################### + + GCOV_TYPE defines the count type used by the instrumentation code. + Kernels compiled with a gcc version prior to 3.1 should use LONG, + otherwise LONG LONG. */ + +#if __GNUC__ >= 3 && __GNUC_MINOR__ >= 1 +typedef long long gcov_type; +#else +typedef long gcov_type; +#endif + + +struct bb +{ + long zero_word; + const char *filename; + gcov_type *counts; + long ncounts; + struct bb *next; + const unsigned long *addresses; + + /* Older GCC's did not emit these fields. */ + long nwords; + const char **functions; + const long *line_nums; + const char **filenames; + char *flags; +}; + +extern struct bb *bb_head; +static struct file_operations proc_gcov_operations; +extern char *gcov_kernelpath; +extern void (*gcov_callback)(int cmd, struct bb *); +extern void do_global_ctors(char *, char *, struct module *, int); + +static int create_bb_links = 1; +static int kernel_path_len; + +int debug = 0; +#define PPRINTK(x) do { if (debug) { printk x ; } } while (0) + +struct gcov_ftree_node +{ + int isdir; /* directory or file */ + char *fname; /* only the name within the hierachy */ + struct gcov_ftree_node *sibling; /* sibling of tree */ + struct gcov_ftree_node *files; /* children of tree */ + struct gcov_ftree_node *parent; /* parent of current gcov_ftree_node */ + struct proc_dir_entry *proc[4]; + struct bb *bb; + /* below only valid for leaf nodes == files */ + unsigned long offset; /* offset in global file */ + struct gcov_ftree_node *next; /* next leave node */ +}; + +static struct proc_dir_entry *proc_vmlinux = NULL; +static struct gcov_ftree_node *leave_nodes = NULL; +static struct gcov_ftree_node *dumpall_cached_node = NULL; +static struct gcov_ftree_node tree_root = + { 1, GCOV_PROF_PROC, NULL, NULL, NULL, + { NULL, NULL, NULL, NULL} , NULL, 0,NULL }; +static char *endings[3] = { ".bb", ".bbg", ".c" }; + + +/* Calculate the header size of an entry in the vmlinux-tracefile which + contains the collection of trace data of all instrumented kernel objects. + + An entry header is defined as: + 0: length of filename of the respective .da file padded to 8 bytes + 8: filename padded to 8 bytes + + */ + +static inline unsigned long +hdr_ofs (struct gcov_ftree_node *tptr) +{ + return 8 + PAD8(strlen (tptr->bb->filename) + 1); +} + + +/* Calculate the total size of an entry in the vmlinux-tracefile. + An entry consists of the header, an 8 byte word for the number + of counts in this entry and the actual array of 8 byte counts. */ + +static inline unsigned long +dump_size(struct gcov_ftree_node *tptr) +{ + return (hdr_ofs(tptr) + (tptr->bb->ncounts+1)*8); +} + + +/* Store a portable representation of VALUE in DEST using BYTES*8-1 bits. + Return a non-zero value if VALUE requires more than BYTES*8-1 bits + to store (this is adapted code from gcc/gcov-io.h). */ + +static int +store_gcov_type (gcov_type value, void *buf, int offset, int len) +{ + const size_t bytes = 8; + char dest[10]; + int upper_bit = (value < 0 ? 128 : 0); + size_t i; + + if (value < 0) { + gcov_type oldvalue = value; + value = -value; + if (oldvalue != -value) + return 1; + } + + for(i = 0 ; + i < (sizeof (value) < bytes ? sizeof (value) : bytes) ; + i++) { + dest[i] = value & (i == (bytes - 1) ? 127 : 255); + value = value / 256; + } + + if (value && value != -1) + return 1; + + for(; i < bytes ; i++) + dest[i] = 0; + dest[bytes - 1] |= upper_bit; + copy_to_user(buf,&dest[offset],len); + return 0; +} + + +/* Create a directory entry in the proc file system and fill in + the respective fields in the provided tree node. Return a + non-zero value on error. */ + +int +create_dir_proc (struct gcov_ftree_node *bt, char *fname) +{ + bt->proc[0] = proc_mkdir(fname, bt->parent->proc[0]); + bt->proc[1] = bt->proc[2] = bt->proc[3] = NULL; + return (bt->proc[0] == NULL); +} + + +/* Replace file ending in with . Return a new + string containing the new filename or NULL on error. */ + +static +char* replace_ending (const char *fname,char *end, char *newend) +{ + char *newfname; + char *cptr = strstr(fname,end); + int len; + if (cptr == NULL) + return NULL; + len = cptr - fname; + newfname = (char*)kmalloc(len+strlen(newend)+1,GFP_KERNEL); + if (newfname == NULL) + return NULL; + memcpy(newfname,fname,len); + strcpy(newfname+len,newend); + return newfname; +} + + +/* Create a file entry in the proc file system and update the respective + fields on the tree node. Optionally try to create links to the + source, .bb and .bbg files. Return a non-zero value on error. */ + +int +create_file_proc (struct gcov_ftree_node *bt, struct bb *bptr, char *fname, + const char *fullname) +{ + bt->proc[0] = create_proc_entry(fname, S_IWUSR | S_IRUGO, + bt->parent->proc[0]); + if (!bt->proc[0]) { + PPRINTK(("error creating file proc <%s>\n", fname)); + return 1; + } + + bt->proc[0]->proc_fops = &proc_gcov_operations; + bt->proc[0]->size = 8 + (8 * bptr->ncounts); + + if (create_bb_links) { + int i; + for (i=0;i<3;i++) { + char *newfname; + char *newfullname; + newfname = replace_ending(fname,".da",endings[i]); + newfullname = replace_ending(fullname,".da",endings[i]); + if ((newfname) && (newfullname)) { + bt->proc[i+1] = proc_symlink(newfname,bt->parent->proc[0],newfullname); + } + if (newfname) kfree(newfname); + if (newfullname) kfree(newfullname); + } + } else { + bt->proc[1] = bt->proc[2] = bt->proc[3] = NULL; + } + return 0; +} + + +/* Recursively check and if necessary create the file specified by + and all its path components, both in the proc file-system as + well as in the internal tree structure. */ + +void +check_proc_fs(const char *fullname, struct gcov_ftree_node *parent, + char *name, struct bb *bbptr) +{ + char dirname[128]; + char *localname = name; + char *tname; + int isdir; + struct gcov_ftree_node *tptr; + + tname = strstr(name, "/"); + if ((isdir = (tname != NULL))) { + memcpy(dirname,name,tname-name); + dirname[tname-name] = '\0'; + localname = dirname; + } + + /* search the list of files in gcov_ftree_node and + * see whether file already exists in this directory level */ + for ( tptr = parent->files ; tptr ; tptr = tptr->sibling) { + if (!strcmp(tptr->fname,localname)) + break; + } + if (!tptr) { + /* no entry yet */ + tptr = (struct gcov_ftree_node*) + kmalloc(sizeof(struct gcov_ftree_node),GFP_KERNEL); + tptr->parent = parent; + + if (!isdir) { + if (create_file_proc(tptr, bbptr, localname,fullname)) { + kfree(tptr); + return; + } + tptr->bb = bbptr; + tptr->proc[0]->data = tptr; + tptr->next = leave_nodes; + leave_nodes = tptr; + } else { + int len = strlen(dirname)+1; + localname = (char*)kmalloc(len,GFP_KERNEL); + strncpy(localname,dirname,len); + if (create_dir_proc(tptr,localname)) { + kfree(tptr); + kfree(localname); + return; + } + tptr->bb = NULL; + tptr->proc[0]->data = NULL; + tptr->next = NULL; + } + tptr->isdir = isdir; + tptr->fname = localname; + tptr->files = NULL; + tptr->sibling = parent->files; + parent->files = tptr; + } + if (isdir) + check_proc_fs(fullname,tptr,tname+1,bbptr); +} + + +/* Read out tracefile data to user space. Return the number of bytes + read. */ + +static ssize_t +read_gcov(struct file *file, char *buf, + size_t count, loff_t *ppos) +{ + unsigned long p = *ppos; + ssize_t read; + gcov_type ncnt; + struct bb *bbptr; + gcov_type slen; + gcov_type *wptr; + struct gcov_ftree_node *treeptr; + struct proc_dir_entry * de; + int dumpall; + unsigned int hdrofs; + unsigned long poffs; + + DOWN(); + + read = 0; + hdrofs = 0; + poffs = 0; + de = PDE(file->f_dentry->d_inode); + + /* Check whether this is a request to /proc/gcov/vmlinux in + which case we should dump the complete tracefile. */ + dumpall = (de == proc_vmlinux); + + + /* Have treeptr point to the tree node to be dumped. */ + + if (!dumpall) + treeptr = (struct gcov_ftree_node*) (de ? de->data : NULL); + else { + /* dumpall_cached_node will speed up things in case + of a sequential read. */ + if (dumpall_cached_node && (p >= dumpall_cached_node->offset)) { + treeptr = dumpall_cached_node; + } + else + treeptr = leave_nodes; + + /* Search the tree node that covers the requested + tracefile offset. */ + while (treeptr) { + struct gcov_ftree_node *next = treeptr->next; + if ((next == NULL) || (p < next->offset)) { + hdrofs = hdr_ofs(treeptr); + poffs = treeptr->offset; + break; + } + treeptr = next; + } + dumpall_cached_node = treeptr; + } + + bbptr = treeptr ? treeptr->bb : NULL; + + if (bbptr == NULL) + goto out; + + ncnt = (gcov_type) bbptr->ncounts; + p -= poffs; + + do { + if (p < hdrofs) { + /* User wants to read parts of the header. */ + + slen = PAD8(strlen(treeptr->bb->filename)+1); + + if (p >= 8) { + /* Read filename */ + if (slen > (gcov_type) count) slen = count; + copy_to_user (buf, &treeptr->bb->filename[p-8], + slen); + count-=slen;buf+= slen;read+=slen;p+=slen; + continue; + } + wptr = &slen; + } + else if (p < (hdrofs + 8)) { + /* User wants to read the number of counts in this + entry. */ + + wptr = &ncnt; + } + else if (p < (hdrofs) + (unsigned long) (ncnt+1)*8) { + /* User wants to read actual counters */ + + wptr = &bbptr->counts[((p-hdrofs)/8)-1]; + } + else + break; + + /* do we have to write partial word */ + + if ((count < 8) || (p & 0x7)) { + /* partial write */ + unsigned long offset = p & 0x7; + unsigned long length = (count+offset)<8?count:(8-offset); + + store_gcov_type(*wptr,buf, offset, length); + buf+=length;p+=length;count-=length;read+=length; + break; + } else { + store_gcov_type(*wptr,buf, 0, 8); + buf+=8;p+=8;count-=8;read+=8; + } + } while (count > 0); + *ppos = p + poffs; +out: + UP(); + return read; +} + + +/* A write to any of our proc file-system entries is interpreted + as a request to reset the data from that node. */ + +static ssize_t +write_gcov(struct file * file, const char * buf, + size_t count, loff_t *ppos) +{ + struct bb *ptr; + struct proc_dir_entry * de; + int resetall, i; + struct gcov_ftree_node *tptr; + + DOWN(); + + de = PDE(file->f_dentry->d_inode); + + if (de == NULL) { + count = 0; + goto out; + } + + /* Check for a write to /proc/gcov/vmlinux */ + resetall = (de == proc_vmlinux); + + if (resetall) { + /* Reset all nodes */ + for (ptr = bb_head; ptr != (struct bb *) 0; ptr = ptr->next) + { + int i; + if (ptr->counts == NULL) continue; + for (i = 0; i < ptr->ncounts; i++) + ptr->counts[i]=0; + } + } else { + /* Reset a single node */ + tptr = (struct gcov_ftree_node*)(de->data); + if (tptr == NULL) + goto out; + ptr = tptr->bb; + if (ptr->ncounts != 0) { + for (i = 0; i < ptr->ncounts; i++) + ptr->counts[i]=0; + } + } +out: + UP(); + return count; +} + + +/* This struct identifies the functions to be used for proc file-system + interaction. */ + +static struct file_operations proc_gcov_operations = { + read: read_gcov, + write: write_gcov +}; + + +/* Recursively remove a node and all its children from the internal + data tree and from the proc file-system. */ + +void +cleanup_node(struct gcov_ftree_node *node, int delname, int del_in_parent) +{ + struct gcov_ftree_node *next,*tptr; + struct proc_dir_entry *par_proc; + + PPRINTK(("parent n:%p p:%p f:%p s:%p <%s>\n", node, + node->parent, node->files, node->sibling, node->fname)); + if ((tptr = node->parent)) { + if (del_in_parent) { + /* Remove node from parent's list of children */ + struct gcov_ftree_node *cptr,*prev_cptr; + for ( prev_cptr = NULL, cptr = tptr->files; cptr && (cptr != node); + prev_cptr = cptr, cptr = cptr->sibling); + if (prev_cptr == NULL) + tptr->files = cptr->sibling; + else + prev_cptr->sibling = cptr->sibling; + } + par_proc = (struct proc_dir_entry*)(tptr->proc[0]); + } else + par_proc = &proc_root; + + if (node->isdir) { + /* In case of a directory, clean up all child nodes. */ + next = node->files; + node->files = NULL; + for (tptr = next ; tptr; ) { + next = tptr->sibling; + cleanup_node(tptr,1,0); + tptr = next; + } + remove_proc_entry(node->fname, par_proc); + if (delname) kfree(node->fname); + } else { + /* Remove file entry and optional links. */ + remove_proc_entry(node->fname, par_proc); + if (create_bb_links) { + int i; + for (i=0;i<3;i++) { + char *newfname; + if (node->proc[i+1] == NULL) continue; + newfname = replace_ending(node->fname,".da",endings[i]); + if (newfname) { + PPRINTK(("remove_proc_entry <%s>\n", node->fname)); + remove_proc_entry(newfname, par_proc); + kfree(newfname); + } + } + } + } + /* free the data */ + if (node != &tree_root) + kfree(node); +} + + +/* Create a tree node for the given bb struct and initiate the + creation of a corresponding proc file-system entry. */ + +static void +create_node_tree(struct bb *bbptr) +{ + const char *tmp; + const char *filename = bbptr->filename; + char *modname; + int len; + + PPRINTK(("kernelpath <%s> <%s>\n", gcov_kernelpath, filename)); + + /* Check whether this is a file located in the kernel source + directory. */ + if (!strncmp (filename, gcov_kernelpath, kernel_path_len)) + { + /* Remove kernel path and create relative proc-file-system + entry. */ + tmp = filename + kernel_path_len+1; + if (*tmp == '0') return; + check_proc_fs(filename, &tree_root, (char*)tmp, bbptr); + } + else { + /* Insert entry to module sub-directory. */ + len = strlen(filename); + modname = (char *)kmalloc (len + 7, GFP_KERNEL); + strcpy(modname, "module"); + strcat (modname, filename); + check_proc_fs(filename, &tree_root, modname, bbptr); + } +} + + +/* This function will be used as gcov_callback, i.e. it is + called from constructor and destructor code of all instrumented + object files. It updates the local tree structure and the proc + file-system entries. */ + +static void +gcov_cleanup(int cmd, struct bb *bbptr) +{ + unsigned long offset = 0; + struct gcov_ftree_node *tptr; + struct gcov_ftree_node *parent; + struct gcov_ftree_node *prev_cptr; + + DOWN(); + switch (cmd) { + case 0: + /* remove leave node */ + prev_cptr = NULL; + for (tptr = leave_nodes; tptr ; prev_cptr = tptr, tptr = tptr->next) { + if (tptr->bb == bbptr) break; + } + if (!tptr) { + PPRINTK(("Can't find module in /proc/gcov\n")); + UP(); + return; + } + if (prev_cptr) + prev_cptr->next = tptr->next; + else + leave_nodes = tptr->next; + dumpall_cached_node = NULL; + + + /* Find highest level node without further siblings */ + + parent = tptr->parent; + do { + if (parent->files->sibling != NULL) break; + tptr = parent; + parent = parent->parent; + } while (parent); + cleanup_node(tptr,0,1); + + /* Update the offsets at which a certain node can + be found in the tracefile. */ + for (tptr = leave_nodes; tptr; tptr = tptr->next) { + tptr->offset = offset; + offset += dump_size(tptr); + } + break; + + case 1: + /* insert node */ + create_node_tree(bbptr); + + /* Update the offsets at which a certain node can + be found in the tracefile. */ + for (tptr = leave_nodes; tptr; tptr = tptr->next) { + tptr->offset = offset; + offset += dump_size(tptr); + } + + break; + } + UP(); +} + + +/* Initialize the data structure by calling the constructor code + of all instrumented object files and creating the proc + file-system entries. */ + +int +init_module(void) +{ + struct bb *bbptr; + unsigned long offset = 0; + struct gcov_ftree_node *tptr; + + PPRINTK(("init module <%s>\n\n", GCOV_PROF_PROC)); + + do_global_ctors(NULL, NULL, NULL, 0); + + tree_root.proc[0] = proc_mkdir(GCOV_PROF_PROC, 0); + kernel_path_len = strlen(gcov_kernelpath); + + for (bbptr = bb_head; bbptr ; bbptr = bbptr->next) { + create_node_tree(bbptr); + } + + /* Fill in the offset at which a certain node can + be found in the tracefile. */ + for (tptr = leave_nodes; tptr; tptr = tptr->next) { + tptr->offset = offset; + offset += dump_size(tptr); + } + + proc_vmlinux = create_proc_entry("vmlinux",S_IWUSR | S_IRUGO, + tree_root.proc[0]); + if (proc_vmlinux) + proc_vmlinux->proc_fops = &proc_gcov_operations; + + gcov_callback = gcov_cleanup; + UP(); + return 0; +} + + +void +cleanup_module(void) +{ + PPRINTK(("remove module <%s>\n\n", GCOV_PROF_PROC)); + gcov_callback = NULL; + DOWN(); + cleanup_node(&tree_root,0,0); +} + +//module_init(gcov_init_module); +//module_exit(gcov_cleanup_module); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/net/3c59x.c 999-mjb/drivers/net/3c59x.c --- 000-virgin/drivers/net/3c59x.c 2003-10-01 11:46:38.000000000 -0700 +++ 999-mjb/drivers/net/3c59x.c 2003-11-24 16:14:00.000000000 -0800 @@ -1063,6 +1063,22 @@ static int __devinit vortex_init_one (st return rc; } +#ifdef CONFIG_NET_POLL_CONTROLLER +static void vortex_rx_poll(struct net_device *dev) +{ + disable_irq(dev->irq); + vortex_interrupt(dev->irq, (void *)dev, 0); + enable_irq(dev->irq); +} + +static void boomerang_rx_poll(struct net_device *dev) +{ + disable_irq(dev->irq); + boomerang_interrupt(dev->irq, (void *)dev, 0); + enable_irq(dev->irq); +} +#endif + /* * Start up the PCI/EISA device which is described by *gendev. * Return 0 on success. @@ -1450,6 +1466,13 @@ static int __devinit vortex_probe1(struc dev->set_multicast_list = set_rx_mode; dev->tx_timeout = vortex_tx_timeout; dev->watchdog_timeo = (watchdog * HZ) / 1000; +#ifdef CONFIG_NET_POLL_CONTROLLER + if (vp->full_bus_master_tx) + dev->poll_controller = boomerang_rx_poll; + else + dev->poll_controller = vortex_rx_poll; +#endif + if (pdev) { vp->pm_state_valid = 1; pci_save_state(VORTEX_PCI(vp), vp->power_state); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/net/Kconfig 999-mjb/drivers/net/Kconfig --- 000-virgin/drivers/net/Kconfig 2003-10-21 11:16:07.000000000 -0700 +++ 999-mjb/drivers/net/Kconfig 2003-11-24 16:14:00.000000000 -0800 @@ -2441,6 +2441,9 @@ config SHAPER To compile this driver as a module, choose M here: the module will be called shaper. If unsure, say N. +config NET_POLL_CONTROLLER + def_bool KGDB + source "drivers/net/wan/Kconfig" source "drivers/net/pcmcia/Kconfig" diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/net/Makefile 999-mjb/drivers/net/Makefile --- 000-virgin/drivers/net/Makefile 2003-10-01 11:47:51.000000000 -0700 +++ 999-mjb/drivers/net/Makefile 2003-11-24 16:14:00.000000000 -0800 @@ -32,6 +32,8 @@ obj-$(CONFIG_BMAC) += bmac.o obj-$(CONFIG_OAKNET) += oaknet.o 8390.o +obj-$(CONFIG_KGDB) += kgdb_eth.o + obj-$(CONFIG_DGRS) += dgrs.o obj-$(CONFIG_RCPCI) += rcpci.o obj-$(CONFIG_VORTEX) += 3c59x.o diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/net/e100/e100_main.c 999-mjb/drivers/net/e100/e100_main.c --- 000-virgin/drivers/net/e100/e100_main.c 2003-10-01 11:47:53.000000000 -0700 +++ 999-mjb/drivers/net/e100/e100_main.c 2003-11-24 16:14:00.000000000 -0800 @@ -539,6 +539,15 @@ e100_trigger_SWI(struct e100_private *bd readw(&(bdp->scb->scb_status)); /* flushes last write, read-safe */ } +#ifdef CONFIG_NET_POLL_CONTROLLER +static void e100_rx_poll(struct net_device *dev) +{ + disable_irq(dev->irq); + e100intr(dev->irq, (void *)dev, 0); + enable_irq(dev->irq); +} +#endif + static int __devinit e100_found1(struct pci_dev *pcid, const struct pci_device_id *ent) { @@ -631,7 +640,9 @@ e100_found1(struct pci_dev *pcid, const dev->set_multicast_list = &e100_set_multi; dev->set_mac_address = &e100_set_mac; dev->do_ioctl = &e100_ioctl; - +#ifdef CONFIG_NET_POLL_CONTROLLER + dev->poll_controller = e100_rx_poll; +#endif if (bdp->flags & USE_IPCB) dev->features = NETIF_F_SG | NETIF_F_IP_CSUM | NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX; diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/net/kgdb_eth.c 999-mjb/drivers/net/kgdb_eth.c --- 000-virgin/drivers/net/kgdb_eth.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/net/kgdb_eth.c 2003-11-24 16:14:00.000000000 -0800 @@ -0,0 +1,517 @@ +/* + * Network interface GDB stub + * + * Written by San Mehat (nettwerk@biodome.org) + * Based upon 'gdbserial' by David Grothe (dave@gcom.com) + * and Scott Foehner (sfoehner@engr.sgi.com) + * + * Twiddled for 2.6 by Robert Walsh + * and wangdi . + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#define GDB_BUF_SIZE 512 /* power of 2, please */ + +static char kgdb_buf[GDB_BUF_SIZE] ; +static int kgdb_buf_in_inx ; +static atomic_t kgdb_buf_in_cnt ; +static int kgdb_buf_out_inx ; + +extern void set_debug_traps(void) ; /* GDB routine */ +extern void breakpoint(void); + +unsigned int kgdb_remoteip = 0; +unsigned short kgdb_listenport = 6443; +unsigned short kgdb_sendport= 6442; +int kgdb_eth = -1; /* Default tty mode */ +unsigned char kgdb_remotemac[6] = {0xff,0xff,0xff,0xff,0xff,0xff}; +unsigned char kgdb_localmac[6] = {0xff,0xff,0xff,0xff,0xff,0xff}; +volatile int kgdb_eth_is_initializing = 0; +int kgdb_eth_need_breakpoint[NR_CPUS]; + +struct net_device *kgdb_netdevice = NULL; + +/* + * Get a char if available, return -1 if nothing available. + * Empty the receive buffer first, then look at the interface hardware. + */ +static int +read_char(void) +{ + /* intr routine has queued chars */ + if (atomic_read(&kgdb_buf_in_cnt) != 0) + { + int chr; + + chr = kgdb_buf[kgdb_buf_out_inx++] ; + kgdb_buf_out_inx &= (GDB_BUF_SIZE - 1) ; + atomic_dec(&kgdb_buf_in_cnt) ; + return chr; + } + + return -1; /* no data */ +} + +/* + * Wait until the interface can accept a char, then write it. + */ +static void +write_buffer(char *buf, int len) +{ + int total_len, eth_len, ip_len, udp_len; + struct in_device *in_dev; + struct sk_buff *skb; + struct udphdr *udph; + struct iphdr *iph; + struct ethhdr *eth; + + if (!(in_dev = (struct in_device *) kgdb_netdevice->ip_ptr)) { + panic("No in_device available for interface!\n"); + } + + if (!(in_dev->ifa_list)) { + panic("No interface address set for interface!\n"); + } + + udp_len = len + sizeof(struct udphdr); + ip_len = eth_len = udp_len + sizeof(struct iphdr); + total_len = eth_len + ETH_HLEN; + + if (!(skb = alloc_skb(total_len, GFP_ATOMIC))) { + return; + } + + atomic_set(&skb->users, 1); + skb_reserve(skb, total_len - len); + + memcpy(skb->data, (unsigned char *) buf, len); + skb->len += len; + + udph = (struct udphdr *) skb_push(skb, sizeof(*udph)); + udph->source = htons(kgdb_listenport); + udph->dest = htons(kgdb_sendport); + udph->len = htons(udp_len); + udph->check = 0; + + iph = (struct iphdr *)skb_push(skb, sizeof(*iph)); + iph->version = 4; + iph->ihl = 5; + iph->tos = 0; + iph->tot_len = htons(ip_len); + iph->id = 0; + iph->frag_off = 0; + iph->ttl = 64; + iph->protocol = IPPROTO_UDP; + iph->check = 0; + iph->saddr = in_dev->ifa_list->ifa_address; + iph->daddr = kgdb_remoteip; + iph->check = ip_fast_csum((unsigned char *)iph, iph->ihl); + + eth = (struct ethhdr *) skb_push(skb, ETH_HLEN); + eth->h_proto = htons(ETH_P_IP); + memcpy(eth->h_source, kgdb_localmac, kgdb_netdevice->addr_len); + memcpy(eth->h_dest, kgdb_remotemac, kgdb_netdevice->addr_len); + +repeat: + spin_lock(&kgdb_netdevice->xmit_lock); + kgdb_netdevice->xmit_lock_owner = smp_processor_id(); + + if (netif_queue_stopped(kgdb_netdevice)) { + kgdb_netdevice->xmit_lock_owner = -1; + spin_unlock(&kgdb_netdevice->xmit_lock); + + kgdb_netdevice->poll_controller(kgdb_netdevice); + goto repeat; + } + + kgdb_netdevice->hard_start_xmit(skb, kgdb_netdevice); + kgdb_netdevice->xmit_lock_owner = -1; + spin_unlock(&kgdb_netdevice->xmit_lock); +} + +/* + * In the interrupt state the target machine will not respond to any + * arp requests, so handle them here. + */ + +static struct sk_buff *send_skb = NULL; + +void +kgdb_eth_reply_arp(void) +{ + if (send_skb) { + spin_lock(&kgdb_netdevice->xmit_lock); + kgdb_netdevice->xmit_lock_owner = smp_processor_id(); + kgdb_netdevice->hard_start_xmit(send_skb, kgdb_netdevice); + kgdb_netdevice->xmit_lock_owner = -1; + spin_unlock(&kgdb_netdevice->xmit_lock); + send_skb = NULL; + } +} + +static int +make_arp_request(struct sk_buff *skb) +{ + struct arphdr *arp; + unsigned char *arp_ptr; + int type = ARPOP_REPLY; + int ptype = ETH_P_ARP; + u32 sip, tip; + unsigned char *sha, *tha; + struct in_device *in_dev = (struct in_device *) kgdb_netdevice->ip_ptr; + + /* No arp on this interface */ + + if (kgdb_netdevice->flags & IFF_NOARP) { + return 0; + } + + if (!pskb_may_pull(skb, (sizeof(struct arphdr) + + (2 * kgdb_netdevice->addr_len) + + (2 * sizeof(u32))))) { + return 0; + } + + skb->h.raw = skb->nh.raw = skb->data; + arp = skb->nh.arph; + + if ((arp->ar_hrd != htons(ARPHRD_ETHER) && + arp->ar_hrd != htons(ARPHRD_IEEE802)) || + arp->ar_pro != htons(ETH_P_IP)) { + return 0; + } + + /* Understand only these message types */ + + if (arp->ar_op != htons(ARPOP_REQUEST)) { + return 0; + } + + /* Extract fields */ + + arp_ptr= (unsigned char *)(arp+1); + sha = arp_ptr; + arp_ptr += kgdb_netdevice->addr_len; + memcpy(&sip, arp_ptr, 4); + arp_ptr += 4; + tha = arp_ptr; + arp_ptr += kgdb_netdevice->addr_len; + memcpy(&tip, arp_ptr, 4); + + if (tip != in_dev->ifa_list->ifa_address) { + return 0; + } + + if (kgdb_remoteip != sip) { + return 0; + } + + /* + * Check for bad requests for 127.x.x.x and requests for multicast + * addresses. If this is one such, delete it. + */ + + if (LOOPBACK(tip) || MULTICAST(tip)) { + return 0; + } + + /* reply to the ARP request */ + + send_skb = alloc_skb(sizeof(struct arphdr) + 2 * (kgdb_netdevice->addr_len + 4) + LL_RESERVED_SPACE(kgdb_netdevice), GFP_ATOMIC); + + if (send_skb == NULL) { + return 0; + } + + skb_reserve(send_skb, LL_RESERVED_SPACE(kgdb_netdevice)); + send_skb->nh.raw = send_skb->data; + arp = (struct arphdr *) skb_put(send_skb, sizeof(struct arphdr) + 2 * (kgdb_netdevice->addr_len + 4)); + send_skb->dev = kgdb_netdevice; + send_skb->protocol = htons(ETH_P_ARP); + + /* Fill the device header for the ARP frame */ + + if (kgdb_netdevice->hard_header && + kgdb_netdevice->hard_header(send_skb, kgdb_netdevice, ptype, + kgdb_remotemac, kgdb_localmac, + send_skb->len) < 0) { + kfree_skb(send_skb); + return 0; + } + + /* + * Fill out the arp protocol part. + * + * we only support ethernet device type, + * which (according to RFC 1390) should always equal 1 (Ethernet). + */ + + arp->ar_hrd = htons(kgdb_netdevice->type); + arp->ar_pro = htons(ETH_P_IP); + + arp->ar_hln = kgdb_netdevice->addr_len; + arp->ar_pln = 4; + arp->ar_op = htons(type); + + arp_ptr=(unsigned char *)(arp + 1); + + memcpy(arp_ptr, kgdb_netdevice->dev_addr, kgdb_netdevice->addr_len); + arp_ptr += kgdb_netdevice->addr_len; + memcpy(arp_ptr, &tip, 4); + arp_ptr += 4; + memcpy(arp_ptr, kgdb_localmac, kgdb_netdevice->addr_len); + arp_ptr += kgdb_netdevice->addr_len; + memcpy(arp_ptr, &sip, 4); + return 0; +} + + +/* + * Accept an skbuff from net_device layer and add the payload onto + * kgdb buffer + * + * When the kgdb stub routine getDebugChar() is called it draws characters + * out of the buffer until it is empty and then reads directly from the + * serial port. + * + * We do not attempt to write chars from the interrupt routine since + * the stubs do all of that via putDebugChar() which writes one byte + * after waiting for the interface to become ready. + * + * The debug stubs like to run with interrupts disabled since, after all, + * they run as a consequence of a breakpoint in the kernel. + * + * NOTE: Return value of 1 means it was for us and is an indication to + * the calling driver to destroy the sk_buff and not send it up the stack. + */ +int +kgdb_net_interrupt(struct sk_buff *skb) +{ + unsigned char chr; + struct iphdr *iph = (struct iphdr*)skb->data; + struct udphdr *udph= (struct udphdr*)(skb->data+(iph->ihl<<2)); + unsigned char *data = (unsigned char *) udph + sizeof(struct udphdr); + int len; + int i; + + if ((kgdb_eth != -1) && (!kgdb_netdevice) && + (iph->protocol == IPPROTO_UDP) && + (be16_to_cpu(udph->dest) == kgdb_listenport)) { + kgdb_sendport = be16_to_cpu(udph->source); + + while (kgdb_eth_is_initializing) + ; + if (!kgdb_netdevice) + kgdb_eth_hook(); + if (!kgdb_netdevice) { + /* Lets not even try again. */ + kgdb_eth = -1; + return 0; + } + } + if (!kgdb_netdevice) { + return 0; + } + if (skb->protocol == __constant_htons(ETH_P_ARP) && !send_skb) { + make_arp_request(skb); + return 0; + } + if (iph->protocol != IPPROTO_UDP) { + return 0; + } + + if (be16_to_cpu(udph->dest) != kgdb_listenport) { + return 0; + } + + len = (be16_to_cpu(iph->tot_len) - + (sizeof(struct udphdr) + sizeof(struct iphdr))); + + for (i = 0; i < len; i++) { + chr = data[i]; + if (chr == 3) { + kgdb_eth_need_breakpoint[smp_processor_id()] = 1; + continue; + } + if (atomic_read(&kgdb_buf_in_cnt) >= GDB_BUF_SIZE) { + /* buffer overflow, clear it */ + kgdb_buf_in_inx = 0; + atomic_set(&kgdb_buf_in_cnt, 0); + kgdb_buf_out_inx = 0; + break; + } + kgdb_buf[kgdb_buf_in_inx++] = chr; + kgdb_buf_in_inx &= (GDB_BUF_SIZE - 1); + atomic_inc(&kgdb_buf_in_cnt); + } + + if (!kgdb_netdevice->kgdb_is_trapped) { + /* + * If a new gdb instance is trying to attach, we need to + * break here. + */ + if (!strncmp(data, "$Hc-1#09", 8)) + kgdb_eth_need_breakpoint[smp_processor_id()] = 1; + } + return 1; +} +EXPORT_SYMBOL(kgdb_net_interrupt); + +int +kgdb_eth_hook(void) +{ + char kgdb_netdev[16]; + extern void kgdb_respond_ok(void); + + if (kgdb_remotemac[0] == 0xff) { + panic("ERROR! 'gdbeth_remotemac' option not set!\n"); + } + if (kgdb_localmac[0] == 0xff) { + panic("ERROR! 'gdbeth_localmac' option not set!\n"); + } + if (kgdb_remoteip == 0) { + panic("ERROR! 'gdbeth_remoteip' option not set!\n"); + } + + sprintf(kgdb_netdev,"eth%d",kgdb_eth); + +#ifdef CONFIG_SMP + if (num_online_cpus() > CONFIG_NO_KGDB_CPUS) { + printk("kgdb: too manu cpus. Cannot enable debugger with more than %d cpus\n", CONFIG_NO_KGDB_CPUS); + return -1; + } +#endif + for (kgdb_netdevice = dev_base; + kgdb_netdevice != NULL; + kgdb_netdevice = kgdb_netdevice->next) { + if (strncmp(kgdb_netdevice->name, kgdb_netdev, IFNAMSIZ) == 0) { + break; + } + } + if (!kgdb_netdevice) { + printk("KGDB NET : Unable to find interface %s\n",kgdb_netdev); + return -ENODEV; + } + + /* + * Call GDB routine to setup the exception vectors for the debugger + */ + set_debug_traps(); + + /* + * Call the breakpoint() routine in GDB to start the debugging + * session. + */ + kgdb_eth_is_initializing = 1; + kgdb_eth_need_breakpoint[smp_processor_id()] = 1; + return 0; +} + +/* + * getDebugChar + * + * This is a GDB stub routine. It waits for a character from the + * serial interface and then returns it. If there is no serial + * interface connection then it returns a bogus value which will + * almost certainly cause the system to hang. + */ +int +eth_getDebugChar(void) +{ + volatile int chr; + + while ((chr = read_char()) < 0) { + if (send_skb) { + kgdb_eth_reply_arp(); + } + if (kgdb_netdevice->poll_controller) { + kgdb_netdevice->poll_controller(kgdb_netdevice); + } else { + printk("KGDB NET: Error - Device %s is not supported!\n", kgdb_netdevice->name); + panic("Please add support for kgdb net to this driver"); + } + } + return chr; +} + +#define ETH_QUEUE_SIZE 256 +static char eth_queue[ETH_QUEUE_SIZE]; +static int outgoing_queue; + +void +eth_flushDebugChar(void) +{ + if(outgoing_queue) { + write_buffer(eth_queue, outgoing_queue); + + outgoing_queue = 0; + } +} + +static void +put_char_on_queue(int chr) +{ + eth_queue[outgoing_queue++] = chr; + if(outgoing_queue == ETH_QUEUE_SIZE) + { + eth_flushDebugChar(); + } +} + +/* + * eth_putDebugChar + * + * This is a GDB stub routine. It waits until the interface is ready + * to transmit a char and then sends it. + */ +void +eth_putDebugChar(int chr) +{ + put_char_on_queue(chr); /* this routine will wait */ +} + +void +kgdb_eth_set_trapmode(int mode) +{ + if (!kgdb_netdevice) { + return; + } + kgdb_netdevice->kgdb_is_trapped = mode; +} + +int +kgdb_eth_is_trapped() +{ + if (!kgdb_netdevice) { + return 0; + } + return kgdb_netdevice->kgdb_is_trapped; +} +EXPORT_SYMBOL(kgdb_eth_is_trapped); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/net/loopback.c 999-mjb/drivers/net/loopback.c --- 000-virgin/drivers/net/loopback.c 2003-10-21 11:16:07.000000000 -0700 +++ 999-mjb/drivers/net/loopback.c 2003-11-24 16:32:58.000000000 -0800 @@ -173,7 +173,7 @@ struct net_device loopback_dev = { .rebuild_header = eth_rebuild_header, .flags = IFF_LOOPBACK, .features = NETIF_F_SG|NETIF_F_FRAGLIST - |NETIF_F_NO_CSUM|NETIF_F_HIGHDMA|NETIF_F_TSO, + |NETIF_F_NO_CSUM|NETIF_F_HIGHDMA, }; /* Setup and register the of the LOOPBACK device. */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/pci/bus.c 999-mjb/drivers/pci/bus.c --- 000-virgin/drivers/pci/bus.c 2003-06-24 16:43:03.000000000 -0700 +++ 999-mjb/drivers/pci/bus.c 2003-11-25 23:01:43.000000000 -0800 @@ -116,6 +116,8 @@ void __devinit pci_bus_add_devices(struc list_add_tail(&dev->subordinate->node, &dev->bus->children); spin_unlock(&pci_bus_lock); pci_bus_add_devices(dev->subordinate); + + sysfs_create_link(&dev->subordinate->class_dev.kobj, &dev->dev.kobj, "bridge"); } } } diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/pci/probe.c 999-mjb/drivers/pci/probe.c --- 000-virgin/drivers/pci/probe.c 2003-10-01 11:35:11.000000000 -0700 +++ 999-mjb/drivers/pci/probe.c 2003-11-25 23:01:43.000000000 -0800 @@ -25,6 +25,39 @@ EXPORT_SYMBOL(pci_root_buses); LIST_HEAD(pci_devices); /* + * PCI Bus Class + */ +static void release_pcibus_dev(struct class_device *class_dev) +{ + struct pci_bus *pci_bus = to_pci_bus(class_dev); + if (pci_bus->bridge) + put_device(pci_bus->bridge); + kfree(pci_bus); +} + +static struct class pcibus_class = { + .name = "pci_bus", + .release = &release_pcibus_dev, +}; + +static int __init pcibus_class_init(void) +{ + return class_register(&pcibus_class); +} +postcore_initcall(pcibus_class_init); + +/* + * PCI Bus Class Devices + */ +static ssize_t pci_bus_show_cpuaffinity(struct class_device *class_dev, char *buf) +{ + struct pci_bus *pcibus = to_pci_bus(class_dev); + + return sprintf(buf, "%lx\n", (unsigned long)pcibus_to_cpumask(pcibus->number)); +} +static CLASS_DEVICE_ATTR(cpuaffinity, S_IRUGO, pci_bus_show_cpuaffinity, NULL); + +/* * Translate the low bits of the PCI base * to the resource type */ @@ -176,7 +209,7 @@ void __devinit pci_read_bridge_bases(str limit |= (io_limit_hi << 16); } - if (base && base <= limit) { + if (base <= limit) { res->flags = (io_base_lo & PCI_IO_RANGE_TYPE_MASK) | IORESOURCE_IO; res->start = base; res->end = limit + 0xfff; @@ -238,37 +271,40 @@ static struct pci_bus * __devinit pci_alloc_child_bus(struct pci_bus *parent, struct pci_dev *bridge, int busnr) { struct pci_bus *child; + int i; /* * Allocate a new bus, and inherit stuff from the parent.. */ child = pci_alloc_bus(); + if (!child) + return NULL; - if (child) { - int i; - - child->self = bridge; - child->parent = parent; - child->ops = parent->ops; - child->sysdata = parent->sysdata; - child->dev = &bridge->dev; - - /* - * Set up the primary, secondary and subordinate - * bus numbers. - */ - child->number = child->secondary = busnr; - child->primary = parent->secondary; - child->subordinate = 0xff; - - /* Set up default resource pointers and names.. */ - for (i = 0; i < 4; i++) { - child->resource[i] = &bridge->resource[PCI_BRIDGE_RESOURCES+i]; - child->resource[i]->name = child->name; - } + child->self = bridge; + child->parent = parent; + child->ops = parent->ops; + child->sysdata = parent->sysdata; + child->bridge = get_device(&bridge->dev); + + child->class_dev.class = &pcibus_class; + sprintf(child->class_dev.class_id, "%04x:%02x", pci_domain_nr(child), busnr); + class_device_register(&child->class_dev); + class_device_create_file(&child->class_dev, &class_device_attr_cpuaffinity); - bridge->subordinate = child; + /* + * Set up the primary, secondary and subordinate + * bus numbers. + */ + child->number = child->secondary = busnr; + child->primary = parent->secondary; + child->subordinate = 0xff; + + /* Set up default resource pointers and names.. */ + for (i = 0; i < 4; i++) { + child->resource[i] = &bridge->resource[PCI_BRIDGE_RESOURCES+i]; + child->resource[i]->name = child->name; } + bridge->subordinate = child; return child; } @@ -307,18 +343,17 @@ int __devinit pci_scan_bridge(struct pci pci_name(dev), buses & 0xffffff, pass); if ((buses & 0xffff00) && !pcibios_assign_all_busses() && !is_cardbus) { - unsigned int cmax; + unsigned int cmax, busnr; /* * Bus already configured by firmware, process it in the first * pass and just note the configuration. */ if (pass) return max; - child = pci_alloc_child_bus(bus, dev, 0); + busnr = (buses >> 8) & 0xFF; + child = pci_alloc_child_bus(bus, dev, busnr); child->primary = buses & 0xFF; - child->secondary = (buses >> 8) & 0xFF; child->subordinate = (buses >> 16) & 0xFF; - child->number = child->secondary; cmax = pci_scan_child_bus(child); if (cmax > max) max = cmax; } else { @@ -508,7 +543,7 @@ pci_scan_device(struct pci_bus *bus, int memset(dev, 0, sizeof(struct pci_dev)); dev->bus = bus; dev->sysdata = bus->sysdata; - dev->dev.parent = bus->dev; + dev->dev.parent = bus->bridge; dev->dev.bus = &pci_bus_type; dev->devfn = devfn; dev->hdr_type = hdr_type & 0x7f; @@ -634,13 +669,14 @@ unsigned int __devinit pci_do_scan_bus(s struct pci_bus * __devinit pci_scan_bus_parented(struct device *parent, int bus, struct pci_ops *ops, void *sysdata) { struct pci_bus *b; + struct device *dev; b = pci_alloc_bus(); if (!b) return NULL; - b->dev = kmalloc(sizeof(*(b->dev)),GFP_KERNEL); - if (!b->dev){ + dev = kmalloc(sizeof(*dev), GFP_KERNEL); + if (!dev){ kfree(b); return NULL; } @@ -651,17 +687,24 @@ struct pci_bus * __devinit pci_scan_bus_ if (pci_find_bus(pci_domain_nr(b), bus)) { /* If we already got to this bus through a different bridge, ignore it */ DBG("PCI: Bus %02x already known\n", bus); - kfree(b->dev); + kfree(dev); kfree(b); return NULL; } - list_add_tail(&b->node, &pci_root_buses); - memset(b->dev,0,sizeof(*(b->dev))); - b->dev->parent = parent; - sprintf(b->dev->bus_id,"pci%04x:%02x", pci_domain_nr(b), bus); - device_register(b->dev); + memset(dev, 0, sizeof(*dev)); + dev->parent = parent; + sprintf(dev->bus_id, "pci%04x:%02x", pci_domain_nr(b), bus); + device_register(dev); + b->bridge = get_device(dev); + + b->class_dev.class = &pcibus_class; + sprintf(b->class_dev.class_id, "%04x:%02x", pci_domain_nr(b), bus); + class_device_register(&b->class_dev); + class_device_create_file(&b->class_dev, &class_device_attr_cpuaffinity); + + sysfs_create_link(&b->class_dev.kobj, &b->bridge->kobj, "bridge"); b->number = b->secondary = bus; b->resource[0] = &ioport_resource; diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/Kconfig 999-mjb/drivers/scsi/Kconfig --- 000-virgin/drivers/scsi/Kconfig 2003-11-24 16:12:30.000000000 -0800 +++ 999-mjb/drivers/scsi/Kconfig 2003-11-25 14:18:47.000000000 -0800 @@ -1212,6 +1212,8 @@ config SCSI_QLOGICPTI To compile this driver as a module, choose M here: the module will be called qlogicpti. +source "drivers/scsi/qla2xxx/Kconfig" + config SCSI_SEAGATE tristate "Seagate ST-02 and Future Domain TMC-8xx SCSI support" depends on X86 && ISA && SCSI && BROKEN @@ -1457,6 +1459,13 @@ config SCSI_MAC53C94 source "drivers/scsi/arm/Kconfig" +config SCSI_LPFC + tristate "Emulex LP support" + depends on PCI && SCSI + ---help--- + This driver supports the Emulex LP hardware (fibre channel + adapter cards). + config JAZZ_ESP bool "MIPS JAZZ FAS216 SCSI support" depends on MIPS_JAZZ && SCSI diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/Makefile 999-mjb/drivers/scsi/Makefile --- 000-virgin/drivers/scsi/Makefile 2003-10-27 10:41:11.000000000 -0800 +++ 999-mjb/drivers/scsi/Makefile 2003-11-25 14:18:47.000000000 -0800 @@ -74,6 +74,7 @@ obj-$(CONFIG_SCSI_QLOGIC_FAS) += qlogicf obj-$(CONFIG_SCSI_QLOGIC_ISP) += qlogicisp.o obj-$(CONFIG_SCSI_QLOGIC_FC) += qlogicfc.o obj-$(CONFIG_SCSI_QLOGIC_1280) += qla1280.o +obj-$(CONFIG_SCSI_QLA2XXX) += qla2xxx/ obj-$(CONFIG_SCSI_PAS16) += pas16.o obj-$(CONFIG_SCSI_SEAGATE) += seagate.o obj-$(CONFIG_SCSI_FD_8xx) += seagate.o @@ -119,6 +120,7 @@ obj-$(CONFIG_SCSI_SATA_SIL) += libata.o obj-$(CONFIG_SCSI_SATA_VIA) += libata.o sata_via.o obj-$(CONFIG_ARM) += arm/ +obj-$(CONFIG_SCSI_LPFC) += lpfc/ obj-$(CONFIG_CHR_DEV_ST) += st.o obj-$(CONFIG_CHR_DEV_OSST) += osst.o diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/COPYING 999-mjb/drivers/scsi/lpfc/COPYING --- 000-virgin/drivers/scsi/lpfc/COPYING 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/COPYING 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,342 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. + + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/Makefile 999-mjb/drivers/scsi/lpfc/Makefile --- 000-virgin/drivers/scsi/lpfc/Makefile 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/Makefile 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,6 @@ +obj-$(CONFIG_SCSI_LPFC) += lpfcdd.o + +EXTRA_CFLAGS += -DLP6000 -D_LINUX -Idrivers/scsi + +lpfcdd-objs := fcscsib.o fcmboxb.o fcmemb.o fcelsb.o fcstratb.o \ + fcxmitb.o fcrpib.o fcclockb.o fcLINUXfcp.o lpfc.conf.o diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/README 999-mjb/drivers/scsi/lpfc/README --- 000-virgin/drivers/scsi/lpfc/README 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/README 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,43 @@ +************************************************************************ +Emulex Corporation + +README for the Driver kit 1.23a for Emulex Fibre Channel Host Adapters + +September 12, 2003 +************************************************************************ + +This Application kit has been designed for the following environment: + +- Supported Hardware architecture platforms: + - 32-bit Intel platforms (IA-32) + - 64-bit Intel platforms (IA-64) + - Power PC 64 bits (PPC) + +- Supported Linux OS (note that testing has been conducted only with the kernels in parenthesis): + - Red Hat Pro 7.3 (kernel 2.4.18-27) + - Red Hat Pro 8.0 (kernel 2.4.18-27) + - Red Hat Advanced Server 2.1 x86 (kernel 2.4.9-e.16) + - SLES 7 x86 (kernel 2.4.16) + - SLES 8 x86 (kernel 2.4.19) + - Red Hat Advanced Server 2.1 IA-64 (kernel 2.4.18-e.25) + - SuSE 8.0 ppc64 (kernel 2.4.19-u11-ppc64) + +- Supported Emulex enterprise adapters: + - LP8000 + - LP9000 + - LP9002L + - LP9002DC + - LP9402DC + - LP9802 + - LP10000 + - LP9802 + - LP10000 + +- This driver supports any mix of the above Emulex adapters within a single host system. + +Main driver features: +1. Full fabric support, discovery, FCP and fibre channel device/error and exception handling +2. Concurrent multi-protocol (FCP and IP) support +3. Supports INT13 (EDD 2.1/3.0) fabric boot. +4. This driver is entirely self-contained and intended for configuration using lpfc. No external utility is required or supported. +5. This driver will not be dependent on any non-open source program for its execution. It will not taint an open source kernel. diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/dfc.h 999-mjb/drivers/scsi/lpfc/dfc.h --- 000-virgin/drivers/scsi/lpfc/dfc.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/dfc.h 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,199 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ +#if !defined(_KERNEL) && !defined(__KERNEL__) +#endif + + +#define _DFC_64BIT 1 + +#ifdef BITS_PER_LONG +#if BITS_PER_LONG < 64 +#undef _DFC_64BIT +#endif +#endif + +#ifdef i386 +#undef _DFC_64BIT +#endif + +#ifdef powerpc +#ifndef CONFIG_PPC64 +#undef _DFC_64BIT +#endif +#endif + + +struct dfccmdinfo { +#ifdef _DFC_64BIT + char *c_datain; + char *c_dataout; + unsigned short c_cmd; + unsigned short c_insz; + uint32 c_outsz; +#else + void *c_filler1; + char *c_datain; + void *c_filler2; + char *c_dataout; + unsigned short c_cmd; + unsigned short c_insz; + uint32 c_outsz; +#endif +}; + +struct cmd_input { +#ifdef _DFC_64BIT + short c_brd; + short c_ring; + short c_iocb; + short c_flag; + void *c_arg1; + void *c_arg2; + void *c_arg3; + char c_string[16]; +#else + short c_brd; + short c_ring; + short c_iocb; + short c_flag; + void *c_filler1; + void *c_arg1; + void *c_filler2; + void *c_arg2; + void *c_filler3; + void *c_arg3; + char c_string[16]; +#endif +}; + + + +struct cmdinfo { + int c_cmd; + char *c_string; + int (*c_routine)(struct cmdinfo *cp, void *p); + char *c_datain; + char *c_dataout; + unsigned short c_insz; + unsigned short c_outsz; +}; + +#define C_INVAL 0x0 +#define C_DISPLAY_PCI_ALL 0x1 +#define C_WRITE_PCI 0x2 +#define C_WRITE_HC 0x3 +#define C_WRITE_HS 0x4 +#define C_WRITE_HA 0x5 +#define C_WRITE_CA 0x6 +#define C_READ_PCI 0x7 +#define C_READ_HC 0x8 +#define C_READ_HS 0x9 +#define C_READ_HA 0xa +#define C_READ_CA 0xb +#define C_READ_MB 0xc +#define C_EXIT 0xd +#define C_SET 0xe +#define C_READ_RING 0xf +#define C_READ_MEM 0x10 +#define C_READ_IOCB 0x11 +#define C_READ_RPILIST 0x12 +#define C_READ_BPLIST 0x13 +#define C_READ_MEMSEG 0x14 +#define C_MBOX 0x15 +#define C_RESET 0x16 +#define C_READ_BINFO 0x17 +#define C_NDD_STAT 0x18 +#define C_FC_STAT 0x19 +#define C_WRITE_MEM 0x1a +#define C_WRITE_CTLREG 0x1b +#define C_READ_CTLREG 0x1c +#define C_INITBRDS 0x1d +#define C_SETDIAG 0x1e +#define C_DBG 0x1f +#define C_GET_PHYSADDR 0x20 +#define C_PUT_PHYSADDR 0x21 +#define C_NODE 0x22 +#define C_DEVP 0x23 +#define C_INST 0x24 +#define C_LIP 0x25 +#define C_LINKINFO 0x26 +#define C_IOINFO 0x27 +#define C_NODEINFO 0x28 +#define C_GETCFG 0x29 +#define C_SETCFG 0x2a +#define C_FAILIO 0x2b +#define C_OUTFCPIO 0x2c +#define C_RSTQDEPTH 0x2d +#define C_CT 0x2e +#define C_HBA_ADAPTERATRIBUTES 0x33 +#define C_HBA_PORTATRIBUTES 0x34 +#define C_HBA_PORTSTATISTICS 0x35 +#define C_HBA_DISCPORTATRIBUTES 0x36 +#define C_HBA_WWPNPORTATRIBUTES 0x37 +#define C_HBA_INDEXPORTATRIBUTES 0x38 +#define C_HBA_FCPTARGETMAPPING 0x39 +#define C_HBA_FCPBINDING 0x3a +#define C_HBA_SETMGMTINFO 0x3b +#define C_HBA_GETMGMTINFO 0x3c +#define C_HBA_RNID 0x3d +#define C_HBA_GETEVENT 0x3e +#define C_HBA_RESETSTAT 0x3f +#define C_HBA_SEND_SCSI 0x40 +#define C_HBA_REFRESHINFO 0x41 +#define C_SEND_ELS 0x42 +#define C_LISTN 0x45 +#define C_TRACE 0x46 +#define C_HELP 0x47 +#define C_HBA_SEND_FCP 0x48 +#define C_SET_EVENT 0x49 +#define C_GET_EVENT 0x4a +#define C_SEND_MGMT_CMD 0x4b +#define C_SEND_MGMT_RSP 0x4c +#define C_LISTEVT 0x59 +#define C_MAX_CMDS 0x5a + +#define DFC_MBX_MAX_CMDS 29 + +/* Structure for OUTFCPIO command */ +struct out_fcp_io { + ushort tx_count; + ushort txp_count; + ushort timeout_count; + ushort devp_count; + void * tx_head; + void * tx_tail; + void * txp_head; + void * txp_tail; + void * timeout_head; +}; + +struct out_fcp_devp { + ushort target; + ushort lun; + uint32 standby_count; + uint32 pend_count; + uint32 clear_count; + void *standby_queue_head; + void *standby_queue_tail; + void *pend_head; + void *pend_tail; + void *clear_head; +}; + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/dfcdd.c 999-mjb/drivers/scsi/lpfc/dfcdd.c --- 000-virgin/drivers/scsi/lpfc/dfcdd.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/dfcdd.c 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,4595 @@ + +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#include "dfc.h" + +/*************************************************************************/ +/* Global data structures */ +/*************************************************************************/ + + int rc = 0; + int do_cp = 0; + +#ifdef DFC_SUBSYSTEM + +struct dfc { + uint32 dfc_init; + uint32 dfc_pad; + uchar dfc_buffer[4096]; + struct dfc_info dfc_info[MAX_FC_BRDS]; +}; + +_static_ struct dfc dfc; + +struct dfc_mem { + uint32 fc_outsz; + uint32 fc_filler; + void * fc_dataout; +}; + +extern uint32 fc_dbg_flag; +uint32 fc_out_event = 4; + +/* Routine Declaration - Local */ +_local_ fc_dev_ctl_t * dfc_getpdev(struct cmd_input *ci); +_local_ int dfc_msdelay(fc_dev_ctl_t *p, ulong ms); +_local_ int dfc_issue_mbox( fc_dev_ctl_t *p, MAILBOX * mb, ulong *ipri); +_local_ DMATCHMAP * dfc_cmd_data_alloc(fc_dev_ctl_t *p, uchar *inp, ULP_BDE64 *bpl, uint32 size); +_local_ int dfc_cmd_data_free(fc_dev_ctl_t *p, DMATCHMAP *mlist); +_local_ int dfc_rsp_data_copy(fc_dev_ctl_t *p, uchar * op, DMATCHMAP *mlist, uint32 size); +_local_ DMATCHMAP * dfc_fcp_data_alloc(fc_dev_ctl_t *p, ULP_BDE64 *bpl); +_local_ int dfc_fcp_data_free(fc_dev_ctl_t *p, DMATCHMAP *fcpmp); +_forward_ int dfc_data_alloc(fc_dev_ctl_t * p_dev_ctl, struct dfc_mem *dm, uint32 size); +_forward_ int dfc_hba_rnid(fc_dev_ctl_t * p_dev_ctl, struct dfc_mem *dm, struct cmd_input *cip, struct dfccmdinfo *infop, MBUF_INFO *buf_info, ulong ipri); +_forward_ int dfc_hba_sendmgmt_ct(fc_dev_ctl_t * p_dev_ctl, struct dfc_mem *dm, struct cmd_input *cip, struct dfccmdinfo *infop, ulong ipri); +_forward_ int dfc_hba_fcpbind(fc_dev_ctl_t * p_dev_ctl, struct dfc_mem *dm, struct cmd_input *cip, struct dfccmdinfo *infop, ulong ipri); +_forward_ int dfc_hba_targetmapping(fc_dev_ctl_t * p_dev_ctl, struct dfc_mem *dm, struct cmd_input *cip, struct dfccmdinfo *infop, ulong ipri); +_forward_ int dfc_hba_sendscsi_fcp(fc_dev_ctl_t * p_dev_ctl, struct dfc_mem *dm, struct cmd_input *cip, struct dfccmdinfo *infop, ulong ipri); +_forward_ int dfc_hba_set_event(fc_dev_ctl_t * p_dev_ctl, struct dfc_mem *dm, struct cmd_input *cip, struct dfccmdinfo *infop, ulong ipri); +_forward_ int dfc_data_free(fc_dev_ctl_t * p_dev_ctl, struct dfc_mem *dm); +_forward_ uint32 dfc_getLunId(node_t *nodep, uint32 lunIndex); +/* End Routine Declaration - Local */ + +/*****************************************************************************/ +/* + * NAME: dfc_ioctl + * + * FUNCTION: diagnostic ioctl interface + * + * EXECUTION ENVIRONMENT: process only + * + * NOTES: + * + * CALLED FROM: + * dfc_config + * + * RETURNS: + * 0 - successful + * EINVAL - invalid parameter was passed + * + */ +/*****************************************************************************/ +_static_ int +dfc_ioctl( +struct dfccmdinfo *infop, +struct cmd_input *cip) +{ + uint32 outshift; + int i, j; /* loop index */ + ulong ipri; + int max; + FC_BRD_INFO * binfo; + uint32 * lptr; + MBUF_INFO * buf_info; + MBUF_INFO * dmdata_info; + MBUF_INFO * mbox_info; + uchar * bp; + uint32 incr; + uint32 size; + uint32 buf1sz; + int total_mem; + uint32 offset; + uint32 cnt; + NODELIST * nlp; + node_t * nodep; + dvi_t * dev_ptr; + void * ioa; + fc_dev_ctl_t * p_dev_ctl; + iCfgParam * clp; + RING * rp; + MAILBOX * mb; + MATCHMAP * mm; + node_t * node_ptr; + fcipbuf_t * fbp; + struct out_fcp_io * fp; + struct out_fcp_devp * dp; + struct dfc_info * di; + struct dfc_mem * dm; + HBA_PORTATTRIBUTES * hp; + fc_vpd_t * vp; + MAILBOX * mbox; + MBUF_INFO bufinfo; + + if ((p_dev_ctl = dfc_getpdev(cip)) == 0) { + return(EINVAL); + } + + binfo = &BINFO; + cnt = binfo->fc_brd_no; + clp = DD_CTL.p_config[cnt]; + di = &dfc.dfc_info[cip->c_brd]; + buf_info = &bufinfo; + + dmdata_info = &bufinfo; + dmdata_info->virt = 0; + dmdata_info->phys = 0; + dmdata_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + dmdata_info->align = sizeof(void *); + dmdata_info->size = sizeof(* dm); + dmdata_info->dma_handle = 0; + fc_malloc(p_dev_ctl, dmdata_info); + if (buf_info->virt == NULL) { + return (ENOMEM); + } + dm = (struct dfc_mem *)dmdata_info->virt; + fc_bzero((void *)dm, sizeof(struct dfc_mem)); + + mbox_info = &bufinfo; + mbox_info->virt = 0; + mbox_info->phys = 0; + mbox_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + mbox_info->align = sizeof(void *); + mbox_info->size = sizeof(* mbox); + mbox_info->dma_handle = 0; + fc_malloc(p_dev_ctl, mbox_info); + if (mbox_info->virt == NULL) { + return (ENOMEM); + } + mbox = (MAILBOX *)mbox_info->virt; + + + /* dfc_ioctl entry */ + + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0400, /* ptr to msg structure */ + fc_mes0400, /* ptr to msg */ + fc_msgBlk0400.msgPreambleStr, /* begin varargs */ + infop->c_cmd, + (uint32)((ulong)cip->c_arg1), + (uint32)((ulong)cip->c_arg2), + infop->c_outsz); /* end varargs */ + + outshift = 0; + if(infop->c_outsz) { + if(infop->c_outsz <= (64 * 1024)) + total_mem = infop->c_outsz; + else + total_mem = 64 * 1024; + if(dfc_data_alloc(p_dev_ctl, dm, total_mem)) { + return(ENOMEM); + } + } + else { + /* Allocate memory for ioctl data */ + if(dfc_data_alloc(p_dev_ctl, dm, 4096)) { + return(ENOMEM); + } + total_mem = 4096; + } + + /* Make sure driver instance is attached */ + if(p_dev_ctl != DD_CTL.p_dev[cnt]) { + return(ENODEV); + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + di->fc_refcnt++; + + + switch (infop->c_cmd) { + /* Diagnostic Interface Library Support */ + + case C_WRITE_PCI: + offset = (uint32)((ulong)cip->c_arg1); + if (!(binfo->fc_flag & FC_OFFLINE_MODE)) { + rc = EPERM; + break; + } + if (offset > 255) { + rc = ERANGE; + break; + } + cnt = (uint32)((ulong)cip->c_arg2); + if ((cnt + offset) > 256) { + rc = ERANGE; + break; + } + + dfc_unlock_enable(ipri, &CMD_LOCK); + if (fc_copyin((uchar *)infop->c_dataout, (uchar *)dfc.dfc_buffer, (ulong)cnt)) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + break; + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = fc_writepci(di, offset, (char *)dfc.dfc_buffer, (cnt >> 2)); + break; + + case C_READ_PCI: + offset = (uint32)((ulong)cip->c_arg1); + if (offset > 255) { + rc = ERANGE; + break; + } + cnt = (uint32)((ulong)cip->c_arg2); + if ((cnt + offset) > 256) { + rc = ERANGE; + break; + } + rc = fc_readpci(di, offset, (char *)dm->fc_dataout, (cnt >> 2)); + break; + + case C_WRITE_MEM: + offset = (uint32)((ulong)cip->c_arg1); + if (!(binfo->fc_flag & FC_OFFLINE_MODE)) { + if (offset != 256) { + rc = EPERM; + break; + } + if (cnt > 128) { + rc = EPERM; + break; + } + } + if (offset >= 4096) { + rc = ERANGE; + break; + } + cnt = (uint32)((ulong)cip->c_arg2); + if ((cnt + offset) > 4096) { + rc = ERANGE; + break; + } + + dfc_unlock_enable(ipri, &CMD_LOCK); + if (fc_copyin((uchar *)infop->c_dataout, (uchar *)dfc.dfc_buffer, (ulong)cnt)) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + break; + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + binfo = &BINFO; + if ((binfo->fc_flag & FC_SLI2) && (!(binfo->fc_flag & FC_OFFLINE_MODE))) { + fc_pcimem_bcopy((uint32 * )dfc.dfc_buffer, + (uint32 * )(((char *)(binfo->fc_slim2.virt)) + offset), cnt); + } else { + ioa = (void *)FC_MAP_MEM(&di->fc_iomap_mem); /* map in slim */ + WRITE_SLIM_COPY(binfo, (uint32 * )dfc.dfc_buffer, + (volatile uint32 * )((volatile char *)ioa + offset), + (cnt / sizeof(uint32))); + FC_UNMAP_MEMIO(ioa); + } + + break; + + case C_READ_MEM: + offset = (uint32)((ulong)cip->c_arg1); + if (offset >= 4096) { + rc = ERANGE; + break; + } + cnt = (uint32)((ulong)cip->c_arg2); + if ((cnt + offset) > 4096) { + rc = ERANGE; + break; + } + + binfo = &BINFO; + if ((binfo->fc_flag & FC_SLI2) && (!(binfo->fc_flag & FC_OFFLINE_MODE))) { + fc_pcimem_bcopy((uint32 * )(((char *)(binfo->fc_slim2.virt)) + offset), + (uint32 * )dm->fc_dataout, cnt); + } else { + ioa = (void *)FC_MAP_MEM(&di->fc_iomap_mem); /* map in slim */ + READ_SLIM_COPY(binfo, (uint32 * )dm->fc_dataout, + (volatile uint32 * )((volatile char *)ioa + offset), + (cnt / sizeof(uint32))); + FC_UNMAP_MEMIO(ioa); + } + break; + + case C_WRITE_CTLREG: + offset = (uint32)((ulong)cip->c_arg1); + if (!(binfo->fc_flag & FC_OFFLINE_MODE)) { + rc = EPERM; + break; + } + if (offset > 255) { + rc = ERANGE; + break; + } + incr = (uint32)((ulong)cip->c_arg2); + ioa = (void *)FC_MAP_IO(&di->fc_iomap_io); /* map in io registers */ + WRITE_CSR_REG(binfo, + ((volatile uint32 * )((volatile char *)ioa + (offset))), incr); + FC_UNMAP_MEMIO(ioa); + + break; + + case C_READ_CTLREG: + offset = (uint32)((ulong)cip->c_arg1); + if (offset > 255) { + rc = ERANGE; + break; + } + ioa = (void *)FC_MAP_IO(&di->fc_iomap_io); /* map in io registers */ + incr = READ_CSR_REG(binfo, + ((volatile uint32 * )((volatile char *)ioa + (offset)))); + FC_UNMAP_MEMIO(ioa); + *((uint32 * )dm->fc_dataout) = incr; + break; + + case C_INITBRDS: + dfc_unlock_enable(ipri, &CMD_LOCK); + if (fc_copyin((uchar*)infop->c_dataout, (uchar*)&di->fc_ba, sizeof(brdinfo))) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + break; + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + if (fc_initpci(di, p_dev_ctl)) { + rc = EIO; + break; + } + if (binfo->fc_flag & FC_OFFLINE_MODE) + di->fc_ba.a_offmask |= OFFDI_OFFLINE; + + fc_bcopy((uchar * ) & di->fc_ba, dm->fc_dataout, sizeof(brdinfo)); + infop->c_outsz = sizeof(brdinfo); + break; + + case C_SETDIAG: + dfc_unlock_enable(ipri, &CMD_LOCK); + offset = (uint32)((ulong)cip->c_arg1); + switch (offset) { + case DDI_ONDI: + if (fc_diag_state == DDI_OFFDI) { + fc_online(0); + } + *((uint32 * )(dm->fc_dataout)) = fc_diag_state; + break; + case DDI_OFFDI: + if (fc_diag_state == DDI_ONDI) { + fc_offline(0); + } + *((uint32 * )(dm->fc_dataout)) = fc_diag_state; + break; + case DDI_SHOW: + *((uint32 * )(dm->fc_dataout)) = fc_diag_state; + break; + case DDI_BRD_ONDI: + if (binfo->fc_flag & FC_OFFLINE_MODE) { + fc_online(p_dev_ctl); + } + *((uint32 * )(dm->fc_dataout)) = DDI_ONDI; + break; + case DDI_BRD_OFFDI: + if (!(binfo->fc_flag & FC_OFFLINE_MODE)) { + fc_offline(p_dev_ctl); + } + *((uint32 * )(dm->fc_dataout)) = DDI_OFFDI; + break; + case DDI_BRD_SHOW: + if (binfo->fc_flag & FC_OFFLINE_MODE) { + *((uint32 * )(dm->fc_dataout)) = DDI_OFFDI; + } + else { + *((uint32 * )(dm->fc_dataout)) = DDI_ONDI; + } + break; + default: + rc = ERANGE; + break; + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + break; + + case C_LIP: + binfo = &BINFO; + mb = (MAILBOX * )mbox; + fc_bzero((void *)mb, sizeof(MAILBOX)); + + if ((binfo->fc_ffstate == FC_READY) && (binfo->fc_process_LA)) { + /* Turn off link attentions */ + binfo->fc_process_LA = 0; + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + offset = READ_CSR_REG(binfo, FC_HC_REG(binfo, ioa)); + offset &= ~HC_LAINT_ENA; + WRITE_CSR_REG(binfo, FC_HC_REG(binfo, ioa), offset); + FC_UNMAP_MEMIO(ioa); + + switch (clp[CFG_TOPOLOGY].a_current) { + case FLAGS_TOPOLOGY_MODE_LOOP_PT: + mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_LOOP; + mb->un.varInitLnk.link_flags |= FLAGS_TOPOLOGY_FAILOVER; + break; + case FLAGS_TOPOLOGY_MODE_PT_PT: + mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_PT_PT; + break; + case FLAGS_TOPOLOGY_MODE_LOOP: + mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_LOOP; + break; + case FLAGS_TOPOLOGY_MODE_PT_LOOP: + mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_PT_PT; + mb->un.varInitLnk.link_flags |= FLAGS_TOPOLOGY_FAILOVER; + break; + } + + vp = &VPD; + if (binfo->fc_flag & FC_2G_CAPABLE) { + if ((vp->rev.feaLevelHigh >= 0x02) && + (clp[CFG_LINK_SPEED].a_current > 0)) { + mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; + mb->un.varInitLnk.link_speed = clp[CFG_LINK_SPEED].a_current; + } + } + mb->mbxCommand = MBX_INIT_LINK; + mb->mbxOwner = OWN_HOST; + goto mbxbegin; + } + mb->mbxStatus = MBXERR_ERROR; + fc_bcopy((char *) & mb->mbxStatus, dm->fc_dataout, sizeof(ushort)); + break; + + case C_FAILIO: + { + uint32 tgt; + uint32 lun; + uint32 dev_index; + + binfo = &BINFO; + i = (uint32)((ulong)cip->c_arg1); + tgt = (uint32)((ulong)cip->c_arg2); + lun = (uint32)((ulong)cip->c_arg3); + switch(i) { + case 1: + fc_failio(p_dev_ctl); + break; + case 2: /* stop */ + dev_index = INDEX(0, tgt); + dev_ptr = fc_find_lun(binfo, dev_index, lun); + if(dev_ptr == 0) { + rc = ERANGE; + goto out; + } + dev_ptr->stop_send_io = 1; + break; + case 3: /* start */ + dev_index = INDEX(0, tgt); + dev_ptr = fc_find_lun(binfo, dev_index, lun); + if(dev_ptr == 0) { + rc = ERANGE; + goto out; + } + if(dev_ptr->stop_send_io == 1) { + dev_ptr->stop_send_io = 0; + fc_restart_device(dev_ptr); + } + break; + } + break; + } + + case C_RSTQDEPTH: + fc_reset_dev_q_depth(p_dev_ctl); + break; + + case C_OUTFCPIO: + { + max = (infop->c_outsz / sizeof(struct out_fcp_devp)) - 1; + + binfo = &BINFO; + fp = (struct out_fcp_io *)dm->fc_dataout; + dp = (struct out_fcp_devp *)((uchar *)fp + sizeof(struct out_fcp_io)); + rp = &binfo->fc_ring[FC_FCP_RING]; + fp->tx_head = rp->fc_tx.q_first; + fp->tx_tail = rp->fc_tx.q_last; + fp->txp_head = rp->fc_txp.q_first; + fp->txp_tail = rp->fc_txp.q_last; + fp->tx_count = rp->fc_tx.q_cnt; + fp->txp_count = rp->fc_txp.q_cnt; + fp->timeout_head = p_dev_ctl->timeout_head; + fp->timeout_count = p_dev_ctl->timeout_count; + fp->devp_count = 0; + for (i = 0; i < MAX_FC_TARGETS; i++) { + if ((node_ptr = binfo->device_queue_hash[i].node_ptr) != NULL) { + for (dev_ptr = node_ptr->lunlist; dev_ptr != NULL; + dev_ptr = dev_ptr->next) { + if(fp->devp_count++ >= max) + goto outio; + dp->target = dev_ptr->nodep->scsi_id; + dp->lun = (ushort)(dev_ptr->lun_id); + dp->standby_queue_head = dev_ptr->standby_queue_head; + dp->standby_queue_tail = dev_ptr->standby_queue_tail; + dp->standby_count = dev_ptr->standby_count; + dp->pend_head = dev_ptr->pend_head; + dp->pend_tail = dev_ptr->pend_tail; + dp->pend_count = dev_ptr->pend_count; + dp->clear_head = dev_ptr->clear_head; + dp->clear_count = dev_ptr->clear_count; + dp++; + } + } + } +outio: + infop->c_outsz = (sizeof(struct out_fcp_io) + + (fp->devp_count * sizeof(struct out_fcp_devp))); + } + break; + + case C_HBA_SEND_SCSI: + case C_HBA_SEND_FCP: + ipri = dfc_hba_sendscsi_fcp(p_dev_ctl, dm, cip, infop, ipri); + break; + + case C_SEND_ELS: + { + uint32 did; + uint32 opcode; + + binfo = &BINFO; + did = (uint32)((ulong)cip->c_arg1); + opcode = (uint32)((ulong)cip->c_arg2); + did = (did & Mask_DID); + + if(((nlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, did))) == 0) { + if((nlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP))) { + fc_bzero((void *)nlp, sizeof(NODELIST)); + nlp->sync = binfo->fc_sync; + nlp->capabilities = binfo->fc_capabilities; + nlp->nlp_DID = did; + nlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, nlp); + } + else { + rc = ENOMEM; + break; + } + } + + fc_els_cmd(binfo, opcode, (void *)((ulong)did), (uint32)0, (ushort)0, nlp); + } + break; + + case C_SEND_MGMT_RSP: + { + ULP_BDE64 * bpl; + MATCHMAP * bmp; + DMATCHMAP * indmp; + uint32 tag; + + tag = (uint32)cip->c_flag; /* XRI for XMIT_SEQUENCE */ + buf1sz = (uint32)((ulong)cip->c_arg2); + + if((buf1sz == 0) || + (buf1sz > (80 * 4096))) { + rc = ERANGE; + goto out; + } + + /* Allocate buffer for Buffer ptr list */ + if ((bmp = (MATCHMAP * )fc_mem_get(binfo, MEM_BPL)) == 0) { + rc = ENOMEM; + goto out; + } + bpl = (ULP_BDE64 * )bmp->virt; + dfc_unlock_enable(ipri, &CMD_LOCK); + + if((indmp = dfc_cmd_data_alloc(p_dev_ctl, (uchar *)cip->c_arg1, bpl, buf1sz)) == 0) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + rc = ENOMEM; + goto out; + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + if((rc=fc_issue_ct_rsp(binfo, tag, bmp, indmp))) { + if(rc == ENODEV) + rc = EACCES; + goto xmout1; + } + + j = 0; + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_msdelay(p_dev_ctl, 1); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + /* Wait for CT request to complete or timeout */ + while(indmp->dfc_flag == 0) { + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_msdelay(p_dev_ctl, 50); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + if(j >= 600) { + indmp->dfc_flag = -1; + break; + } + j++; + } + + j = indmp->dfc_flag; + if(j == -1) { + rc = ETIMEDOUT; + } + +xmout1: + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_cmd_data_free(p_dev_ctl, indmp); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + } + break; + + case C_SEND_MGMT_CMD: + case C_CT: + ipri = dfc_hba_sendmgmt_ct(p_dev_ctl, dm, cip, infop, ipri); + break; + + case C_MBOX: + binfo = &BINFO; + mb = (MAILBOX * )mbox; + + dfc_unlock_enable(ipri, &CMD_LOCK); + if (fc_copyin((uchar *)cip->c_arg1, (uchar *)mb, + MAILBOX_CMD_WSIZE * sizeof(uint32))) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + goto out; + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + +mbxbegin: + + cnt = 0; + while ((binfo->fc_mbox_active) || (di->fc_flag & DFC_MBOX_ACTIVE)) { + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_msdelay(p_dev_ctl, 5); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + if(cnt++ == 200) + break; + } + + if (cnt >= 200) { + mb->mbxStatus = MBXERR_ERROR; + } + else { + binfo->fc_mbox_active = 2; +#ifdef _LP64 + if((mb->mbxCommand == MBX_READ_SPARM) || + (mb->mbxCommand == MBX_READ_RPI) || + (mb->mbxCommand == MBX_REG_LOGIN) || + (mb->mbxCommand == MBX_READ_LA)) { + mb->mbxStatus = MBXERR_ERROR; + rc = ENODEV; + binfo->fc_mbox_active = 0; + goto mbout; + } +#endif + lptr = 0; + size = 0; + switch (mb->mbxCommand) { + /* Offline only */ + case MBX_WRITE_NV: + case MBX_INIT_LINK: + case MBX_DOWN_LINK: + case MBX_CONFIG_LINK: + case MBX_PART_SLIM: + case MBX_CONFIG_RING: + case MBX_RESET_RING: + case MBX_UNREG_LOGIN: + case MBX_CLEAR_LA: + case MBX_DUMP_CONTEXT: + case MBX_RUN_DIAGS: + case MBX_RESTART: + case MBX_FLASH_WR_ULA: + case MBX_SET_MASK: + case MBX_SET_SLIM: + case MBX_SET_DEBUG: + if (!(binfo->fc_flag & FC_OFFLINE_MODE)) { + if (infop->c_cmd != C_LIP) { + mb->mbxStatus = MBXERR_ERROR; + binfo->fc_mbox_active = 0; + goto mbout; + } + } + break; + + /* Online / Offline */ + case MBX_LOAD_SM: + case MBX_READ_NV: + case MBX_READ_CONFIG: + case MBX_READ_RCONFIG: + case MBX_READ_STATUS: + case MBX_READ_XRI: + case MBX_READ_REV: + case MBX_READ_LNK_STAT: + case MBX_DUMP_MEMORY: + case MBX_DOWN_LOAD: + case MBX_UPDATE_CFG: + case MBX_LOAD_AREA: + case MBX_LOAD_EXP_ROM: + break; + + /* Offline only - with DMA */ + case MBX_REG_LOGIN: + if (!(binfo->fc_flag & FC_OFFLINE_MODE)) { + mb->mbxStatus = MBXERR_ERROR; + binfo->fc_mbox_active = 0; + goto mbout; + } + lptr = (uint32 * )((ulong)mb->un.varRegLogin.un.sp.bdeAddress); + size = (int)mb->un.varRegLogin.un.sp.bdeSize; + if (lptr) { + buf_info->virt = (void * )dfc.dfc_buffer; + buf_info->flags = (FC_MBUF_PHYSONLY | FC_MBUF_DMA | + FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = DMA_READ; + buf_info->size = sizeof(SERV_PARM); + buf_info->dma_handle = 0; + + dfc_unlock_enable(ipri, &CMD_LOCK); + fc_malloc(p_dev_ctl, buf_info); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + if (buf_info->phys == NULL) { + mb->mbxStatus = MBXERR_ERROR; + binfo->fc_mbox_active = 0; + goto mbout; + } + mb->un.varRegLogin.un.sp.bdeAddress = + (uint32)putPaddrLow(buf_info->phys); + } + break; + case MBX_RUN_BIU_DIAG: + if (!(binfo->fc_flag & FC_OFFLINE_MODE)) { + mb->mbxStatus = MBXERR_ERROR; + binfo->fc_mbox_active = 0; + goto mbout; + } + mb->mbxStatus = MBXERR_ERROR; + binfo->fc_mbox_active = 0; + goto mbout; + + /* Online / Offline - with DMA */ + case MBX_READ_SPARM64: + if (!((binfo->fc_flag & FC_SLI2) && (!(binfo->fc_flag & FC_OFFLINE_MODE)))) { + mb->mbxStatus = MBXERR_ERROR; + binfo->fc_mbox_active = 0; + goto mbout; + } + case MBX_READ_SPARM: + if ((binfo->fc_flag & FC_SLI2) && (!(binfo->fc_flag & FC_OFFLINE_MODE))) { + if (mb->mbxCommand == MBX_READ_SPARM) { + mb->mbxStatus = MBXERR_ERROR; + binfo->fc_mbox_active = 0; + goto mbout; + } + lptr = (uint32 * )getPaddr(mb->un.varRdSparm.un.sp64.addrHigh, + mb->un.varRdSparm.un.sp64.addrLow); + size = (int)mb->un.varRdSparm.un.sp64.tus.f.bdeSize; + } else { + lptr = (uint32 * )((ulong)mb->un.varRdSparm.un.sp.bdeAddress); + size = (int)mb->un.varRdSparm.un.sp.bdeSize; + } + if (lptr) { + buf_info->virt = (void * )dfc.dfc_buffer; + buf_info->flags = (FC_MBUF_PHYSONLY | FC_MBUF_DMA | + FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = DMA_READ; + buf_info->size = sizeof(SERV_PARM); + buf_info->dma_handle = 0; + buf_info->phys = 0; + + dfc_unlock_enable(ipri, &CMD_LOCK); + fc_malloc(p_dev_ctl, buf_info); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + if (buf_info->phys == NULL) { + mb->mbxStatus = MBXERR_ERROR; + binfo->fc_mbox_active = 0; + goto mbout; + } + if ((binfo->fc_flag & FC_SLI2) && (!(binfo->fc_flag & FC_OFFLINE_MODE))) { + mb->un.varRdSparm.un.sp64.addrHigh = + (uint32)putPaddrHigh(buf_info->phys); + mb->un.varRdSparm.un.sp64.addrLow = + (uint32)putPaddrLow(buf_info->phys); + } + else + mb->un.varRdSparm.un.sp.bdeAddress = + (uint32)putPaddrLow(buf_info->phys); + } + break; + case MBX_READ_RPI64: + if (!((binfo->fc_flag & FC_SLI2) && (!(binfo->fc_flag & FC_OFFLINE_MODE)))) { + mb->mbxStatus = MBXERR_ERROR; + binfo->fc_mbox_active = 0; + goto mbout; + } + case MBX_READ_RPI: + if ((binfo->fc_flag & FC_SLI2) && (!(binfo->fc_flag & FC_OFFLINE_MODE))) { + if (mb->mbxCommand == MBX_READ_RPI) { + mb->mbxStatus = MBXERR_ERROR; + binfo->fc_mbox_active = 0; + goto mbout; + } + lptr = (uint32 * )getPaddr(mb->un.varRdRPI.un.sp64.addrHigh, + mb->un.varRdRPI.un.sp64.addrLow); + size = (int)mb->un.varRdRPI.un.sp64.tus.f.bdeSize; + } else { + lptr = (uint32 * )((ulong)mb->un.varRdRPI.un.sp.bdeAddress); + size = (int)mb->un.varRdRPI.un.sp.bdeSize; + } + if (lptr) { + buf_info->virt = (void * )dfc.dfc_buffer; + buf_info->flags = (FC_MBUF_PHYSONLY | FC_MBUF_DMA | + FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = DMA_READ; + buf_info->size = sizeof(SERV_PARM); + buf_info->dma_handle = 0; + + dfc_unlock_enable(ipri, &CMD_LOCK); + fc_malloc(p_dev_ctl, buf_info); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + if (buf_info->phys == NULL) { + mb->mbxStatus = MBXERR_ERROR; + binfo->fc_mbox_active = 0; + goto mbout; + } + if ((binfo->fc_flag & FC_SLI2) && (!(binfo->fc_flag & FC_OFFLINE_MODE))) { + mb->un.varRdRPI.un.sp64.addrHigh = + (uint32)putPaddrHigh(buf_info->phys); + mb->un.varRdRPI.un.sp64.addrLow = + (uint32)putPaddrLow(buf_info->phys); + } + else + mb->un.varRdRPI.un.sp.bdeAddress = + (uint32)putPaddrLow(buf_info->phys); + } + break; + case MBX_READ_LA: + if (!(binfo->fc_flag & FC_OFFLINE_MODE)) { + mb->mbxStatus = MBXERR_ERROR; + binfo->fc_mbox_active = 0; + goto mbout; + } + lptr = (uint32 * )((ulong)mb->un.varReadLA.un.lilpBde.bdeAddress); + size = (int)mb->un.varReadLA.un.lilpBde.bdeSize; + if (lptr) { + buf_info->virt = (void * )dfc.dfc_buffer; + buf_info->flags = (FC_MBUF_PHYSONLY | FC_MBUF_DMA | + FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = DMA_READ; + buf_info->size = 128; + buf_info->dma_handle = 0; + + dfc_unlock_enable(ipri, &CMD_LOCK); + fc_malloc(p_dev_ctl, buf_info); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + if (buf_info->phys == NULL) { + mb->mbxStatus = MBXERR_ERROR; + binfo->fc_mbox_active = 0; + goto mbout; + } + mb->un.varReadLA.un.lilpBde.bdeAddress = + (uint32)putPaddrLow(buf_info->phys); + } + break; + + case MBX_CONFIG_PORT: + case MBX_REG_LOGIN64: + case MBX_READ_LA64: + mb->mbxStatus = MBXERR_ERROR; + binfo->fc_mbox_active = 0; + goto mbout; + + default: + if (!(binfo->fc_flag & FC_OFFLINE_MODE)) { + mb->mbxStatus = MBXERR_ERROR; + binfo->fc_mbox_active = 0; + goto mbout; + } + break; + } + + binfo->fc_mbox_active = 0; + if(dfc_issue_mbox(p_dev_ctl, mb, &ipri)) + goto mbout; + + if (lptr) { + buf_info->virt = 0; + buf_info->flags = (FC_MBUF_PHYSONLY | FC_MBUF_DMA | + FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->dma_handle = 0; + switch (mb->mbxCommand) { + case MBX_REG_LOGIN: + buf_info->phys = (uint32 * ) + ((ulong)mb->un.varRegLogin.un.sp.bdeAddress); + buf_info->size = sizeof(SERV_PARM); + break; + + case MBX_READ_SPARM: + buf_info->phys = (uint32 * ) + ((ulong)mb->un.varRdSparm.un.sp.bdeAddress); + buf_info->size = sizeof(SERV_PARM); + break; + + case MBX_READ_RPI: + buf_info->phys = (uint32 * ) + ((ulong)mb->un.varRdRPI.un.sp.bdeAddress); + buf_info->size = sizeof(SERV_PARM); + break; + + case MBX_READ_LA: + buf_info->phys = (uint32 * ) + ((ulong)mb->un.varReadLA.un.lilpBde.bdeAddress); + buf_info->size = 128; + break; + } + + dfc_unlock_enable(ipri, &CMD_LOCK); + fc_free(p_dev_ctl, buf_info); + + if ((fc_copyout((uchar *)dfc.dfc_buffer, (uchar *)lptr, (ulong)size))) { + rc = EIO; + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + } + } + +mbout: + if (infop->c_cmd == C_LIP) { + /* Turn on Link Attention interrupts */ + binfo->fc_process_LA = 1; + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + offset = READ_CSR_REG(binfo, FC_HC_REG(binfo, ioa)); + offset |= HC_LAINT_ENA; + WRITE_CSR_REG(binfo, FC_HC_REG(binfo, ioa), offset); + FC_UNMAP_MEMIO(ioa); + } + + if (infop->c_cmd == C_LIP) + fc_bcopy((char *) & mb->mbxStatus, dm->fc_dataout, sizeof(ushort)); + else + fc_bcopy((char *)mb, dm->fc_dataout, MAILBOX_CMD_WSIZE * sizeof(uint32)); + break; + + + case C_DISPLAY_PCI_ALL: + + if ((rc = fc_readpci(di, 0, (char *)dm->fc_dataout, 64))) + break; + break; + + case C_SET: + if(cip->c_iocb == 0) { + bp = binfo->fc_portname.IEEE; + } + else { + cnt = 0; + bp = 0; + nlp = binfo->fc_nlpunmap_start; + if(nlp == (NODELIST *)&binfo->fc_nlpunmap_start) + nlp = binfo->fc_nlpmap_start; + while(nlp != (NODELIST *)&binfo->fc_nlpmap_start) { + if((int)cnt == cip->c_iocb-1) { + if ((nlp->nlp_type & NLP_IP_NODE) && (nlp->nlp_Rpi) && + (nlp->nlp_Xri)) { + bp = nlp->nlp_nodename.IEEE; + } + else { + bp = binfo->fc_portname.IEEE; + } + break; + } + cnt++; + nlp = (NODELIST *)nlp->nlp_listp_next; + if(nlp == (NODELIST *)&binfo->fc_nlpunmap_start) + nlp = binfo->fc_nlpmap_start; + } + } + break; + + case C_WRITE_HC: + incr = (uint32)((ulong)cip->c_arg1); + ioa = (void *)FC_MAP_IO(&di->fc_iomap_io); /* map in io registers */ + WRITE_CSR_REG(binfo, + ((volatile uint32 * )((volatile char *)ioa + (sizeof(uint32) * HC_REG_OFFSET))), incr); + FC_UNMAP_MEMIO(ioa); + case C_READ_HC: + ioa = (void *)FC_MAP_IO(&di->fc_iomap_io); /* map in io registers */ + offset = READ_CSR_REG(binfo, FC_HC_REG(binfo, ioa)); + FC_UNMAP_MEMIO(ioa); + + *((uint32 * )dm->fc_dataout) = offset; + break; + + case C_WRITE_HS: + incr = (uint32)((ulong)cip->c_arg1); + ioa = (void *)FC_MAP_IO(&di->fc_iomap_io); /* map in io registers */ + WRITE_CSR_REG(binfo, + ((volatile uint32 * )((volatile char *)ioa + (sizeof(uint32) * HS_REG_OFFSET))), incr); + FC_UNMAP_MEMIO(ioa); + case C_READ_HS: + ioa = (void *)FC_MAP_IO(&di->fc_iomap_io); /* map in io registers */ + offset = READ_CSR_REG(binfo, FC_STAT_REG(binfo, ioa)); + FC_UNMAP_MEMIO(ioa); + + *((uint32 * )dm->fc_dataout) = offset; + break; + + case C_WRITE_HA: + incr = (uint32)((ulong)cip->c_arg1); + ioa = (void *)FC_MAP_IO(&di->fc_iomap_io); /* map in io registers */ + WRITE_CSR_REG(binfo, + ((volatile uint32 * )((volatile char *)ioa + (sizeof(uint32) * HA_REG_OFFSET))), incr); + FC_UNMAP_MEMIO(ioa); + case C_READ_HA: + ioa = (void *)FC_MAP_IO(&di->fc_iomap_io); /* map in io registers */ + offset = READ_CSR_REG(binfo, FC_HA_REG(binfo, ioa)); + FC_UNMAP_MEMIO(ioa); + + *((uint32 * )dm->fc_dataout) = offset; + break; + + case C_WRITE_CA: + incr = (uint32)((ulong)cip->c_arg1); + ioa = (void *)FC_MAP_IO(&di->fc_iomap_io); /* map in io registers */ + WRITE_CSR_REG(binfo, + ((volatile uint32 * )((volatile char *)ioa + (sizeof(uint32) * CA_REG_OFFSET))), incr); + FC_UNMAP_MEMIO(ioa); + case C_READ_CA: + ioa = (void *)FC_MAP_IO(&di->fc_iomap_io); /* map in io registers */ + offset = READ_CSR_REG(binfo, FC_FF_REG(binfo, ioa)); + FC_UNMAP_MEMIO(ioa); + + *((uint32 * )dm->fc_dataout) = offset; + break; + + case C_READ_MB: + binfo = &BINFO; + if ((binfo->fc_flag & FC_SLI2) && (!(binfo->fc_flag & FC_OFFLINE_MODE))) { + mb = FC_SLI2_MAILBOX(binfo); + fc_pcimem_bcopy((uint32 * )mb, (uint32 * )dm->fc_dataout, 128); + } else { + ioa = (void *)FC_MAP_MEM(&di->fc_iomap_mem); /* map in slim */ + READ_SLIM_COPY(binfo, (uint32 * )dm->fc_dataout, (uint32 * )ioa, + MAILBOX_CMD_WSIZE); + FC_UNMAP_MEMIO(ioa); + } + break; + + case C_DBG: + offset = (uint32)((ulong)cip->c_arg1); + switch (offset) { + case 0xffffffff: + break; + default: + fc_dbg_flag = offset; + break; + } + + fc_bcopy((uchar * ) & fc_dbg_flag , dm->fc_dataout, sizeof(uint32)); + break; + + case C_INST: + fc_bcopy((uchar * ) &fcinstcnt, dm->fc_dataout, sizeof(int)); + fc_bcopy((uchar * ) fcinstance, ((uchar *)dm->fc_dataout) + sizeof(int), sizeof(int) * MAX_FC_BRDS); + break; + + case C_READ_RING: + fc_bcopy(&binfo->fc_ring[cip->c_ring], dm->fc_dataout, sizeof(RING)); + break; + + case C_LISTN: + { + NODELIST *npp; + ulong lcnt; + ulong *lcntp; + + offset = (uint32)((ulong)cip->c_arg1); + total_mem -= sizeof(NODELIST); + lcnt = 0; + switch (offset) { + case 1: /* bind */ + lcntp = dm->fc_dataout; + fc_bcopy((uchar * ) &lcnt , dm->fc_dataout, sizeof(ulong)); + npp = (NODELIST *)((char *)(dm->fc_dataout) + sizeof(ulong)); + nlp = binfo->fc_nlpbind_start; + while((nlp != (NODELIST *)&binfo->fc_nlpbind_start) && (total_mem > 0)) { + fc_bcopy((char *)nlp, npp, (sizeof(NODELIST))); + total_mem -= sizeof(NODELIST); + npp++; + lcnt++; + nlp = (NODELIST *)nlp->nlp_listp_next; + } + *lcntp = lcnt; + break; + case 2: /* unmap */ + lcntp = dm->fc_dataout; + fc_bcopy((uchar * ) &lcnt , dm->fc_dataout, sizeof(ulong)); + npp = (NODELIST *)((char *)(dm->fc_dataout) + sizeof(ulong)); + nlp = binfo->fc_nlpunmap_start; + while((nlp != (NODELIST *)&binfo->fc_nlpunmap_start) && (total_mem > 0)) { + fc_bcopy((char *)nlp, npp, (sizeof(NODELIST))); + total_mem -= sizeof(NODELIST); + npp++; + lcnt++; + nlp = (NODELIST *)nlp->nlp_listp_next; + } + *lcntp = lcnt; + break; + case 3: /* map */ + lcntp = dm->fc_dataout; + fc_bcopy((uchar * ) &lcnt , dm->fc_dataout, sizeof(ulong)); + npp = (NODELIST *)((char *)(dm->fc_dataout) + sizeof(ulong)); + nlp = binfo->fc_nlpmap_start; + while((nlp != (NODELIST *)&binfo->fc_nlpmap_start) && (total_mem > 0)) { + fc_bcopy((char *)nlp, npp, (sizeof(NODELIST))); + total_mem -= sizeof(NODELIST); + npp++; + lcnt++; + nlp = (NODELIST *)nlp->nlp_listp_next; + } + *lcntp = lcnt; + break; + case 4: /* all */ + lcntp = dm->fc_dataout; + fc_bcopy((uchar * ) &lcnt , dm->fc_dataout, sizeof(ulong)); + npp = (NODELIST *)((char *)(dm->fc_dataout) + sizeof(ulong)); + nlp = binfo->fc_nlpbind_start; + while((nlp != (NODELIST *)&binfo->fc_nlpbind_start) && (total_mem > 0)) { + fc_bcopy((char *)nlp, npp, (sizeof(NODELIST))); + total_mem -= sizeof(NODELIST); + npp++; + lcnt++; + nlp = (NODELIST *)nlp->nlp_listp_next; + } + nlp = binfo->fc_nlpunmap_start; + while((nlp != (NODELIST *)&binfo->fc_nlpunmap_start) && (total_mem > 0)) { + fc_bcopy((char *)nlp, npp, (sizeof(NODELIST))); + total_mem -= sizeof(NODELIST); + npp++; + lcnt++; + nlp = (NODELIST *)nlp->nlp_listp_next; + } + nlp = binfo->fc_nlpmap_start; + while((nlp != (NODELIST *)&binfo->fc_nlpmap_start) && (total_mem > 0)) { + fc_bcopy((char *)nlp, npp, (sizeof(NODELIST))); + total_mem -= sizeof(NODELIST); + npp++; + lcnt++; + nlp = (NODELIST *)nlp->nlp_listp_next; + } + *lcntp = lcnt; + break; + default: + rc = ERANGE; + break; + } + infop->c_outsz = (sizeof(ulong) + (lcnt * sizeof(NODELIST))); + break; + } + + case C_LISTEVT: + { + uint32 ehdcnt; + uint32 ecnt; + uint32 *ehdcntp; + uint32 *ecntp; + fcEvent *ep; + fcEvent_header *ehp; + + offset = (uint32)((ulong)cip->c_arg1); + total_mem -= sizeof(uint32); + infop->c_outsz = sizeof(uint32); + ehdcnt = 0; + ehdcntp = (uint32 *)dm->fc_dataout; + bp = (uchar *)((char *)(dm->fc_dataout) + sizeof(uint32)); + switch (offset) { + case 1: /* link */ + offset = FC_REG_LINK_EVENT; + break; + case 2: /* rscn */ + offset = FC_REG_RSCN_EVENT; + break; + case 3: /* ct */ + offset = FC_REG_CT_EVENT; + break; + case 7: /* all */ + offset = 0; + break; + default: + rc = ERANGE; + goto out; + } + ehp = (fcEvent_header *)p_dev_ctl->fc_evt_head; + while (ehp) { + if ((offset == 0) || (ehp->e_mask == offset)) { + ehdcnt++; + fc_bcopy((char *)ehp, bp, (sizeof(fcEvent_header))); + bp += (sizeof(fcEvent_header)); + total_mem -= sizeof(fcEvent_header); + if(total_mem <= 0) { + rc = ENOMEM; + goto out; + } + infop->c_outsz += sizeof(fcEvent_header); + ecnt = 0; + ecntp = (uint32 *)bp; + bp += (sizeof(uint32)); + total_mem -= sizeof(uint32); + infop->c_outsz += sizeof(uint32); + ep = ehp->e_head; + while(ep) { + ecnt++; + fc_bcopy((char *)ehp, bp, (sizeof(fcEvent))); + bp += (sizeof(fcEvent)); + total_mem -= sizeof(fcEvent); + if(total_mem <= 0) { + rc = ENOMEM; + goto out; + } + infop->c_outsz += sizeof(fcEvent); + ep = ep->evt_next; + } + *ecntp = ecnt; + } + ehp = (fcEvent_header *)ehp->e_next_header; + } + + *ehdcntp = ehdcnt; + break; + } + + case C_READ_RPILIST: + { + NODELIST *npp; + + cnt = 0; + npp = (NODELIST *)(dm->fc_dataout); + nlp = binfo->fc_nlpbind_start; + if(nlp == (NODELIST *)&binfo->fc_nlpbind_start) + nlp = binfo->fc_nlpunmap_start; + if(nlp == (NODELIST *)&binfo->fc_nlpunmap_start) + nlp = binfo->fc_nlpmap_start; + while((nlp != (NODELIST *)&binfo->fc_nlpmap_start) && (total_mem > 0)) { + fc_bcopy((char *)nlp, (char *)npp, sizeof(NODELIST)); + npp++; + cnt++; + nlp = (NODELIST *)nlp->nlp_listp_next; + if(nlp == (NODELIST *)&binfo->fc_nlpbind_start) + nlp = binfo->fc_nlpunmap_start; + if(nlp == (NODELIST *)&binfo->fc_nlpunmap_start) + nlp = binfo->fc_nlpmap_start; + } + if(cnt) { + infop->c_outsz = (uint32)(cnt * sizeof(NODELIST)); + } + } + break; + + case C_READ_BPLIST: + rp = &binfo->fc_ring[cip->c_ring]; + lptr = (uint32 * )dm->fc_dataout; + + mm = (MATCHMAP * )rp->fc_mpoff; + total_mem -= (3*sizeof(ulong)); + while ((mm) && (total_mem > 0)) { + if (cip->c_ring == FC_ELS_RING) { + *lptr++ = (uint32)((ulong)mm); + *lptr++ = (uint32)((ulong)mm->virt); + *lptr++ = (uint32)((ulong)mm->phys); + mm = (MATCHMAP * )mm->fc_mptr; + } + if (cip->c_ring == FC_IP_RING) { + fbp = (fcipbuf_t * )mm; + *lptr++ = (uint32)((ulong)fbp); + *lptr++ = (uint32)((ulong)fcdata(fbp)); + *lptr++ = (uint32)((ulong)fcnextpkt(fbp)); + mm = (MATCHMAP * )fcnextdata(fbp); + } + total_mem -= (3 * sizeof(ulong)); + } + *lptr++ = 0; + *lptr++ = (uint32)((ulong)rp->fc_mpon); + + infop->c_outsz = ((uchar * )lptr - (uchar *)(dm->fc_dataout)); + break; + + case C_READ_MEMSEG: + fc_bcopy(&binfo->fc_memseg, dm->fc_dataout, (sizeof(MEMSEG) * FC_MAX_SEG)); + break; + + case C_RESET: + offset = (uint32)((ulong)cip->c_arg1); + switch (offset) { + case 1: /* hba */ + fc_brdreset(p_dev_ctl); + break; + case 2: /* link */ + fc_rlip(p_dev_ctl); + break; + case 3: /* target */ + fc_fcp_abort(p_dev_ctl, TARGET_RESET, (int)((ulong)cip->c_arg2), -1); + break; + case 4: /* lun */ + fc_fcp_abort(p_dev_ctl, LUN_RESET, (int)((ulong)cip->c_arg2), + (int)((ulong)cip->c_arg3)); + break; + case 5: /* task set */ + fc_fcp_abort(p_dev_ctl, ABORT_TASK_SET, (int)((ulong)cip->c_arg2), + (int)((ulong)cip->c_arg3)); + break; + case 6: /* bus */ + fc_fcp_abort(p_dev_ctl, TARGET_RESET, -1, -1); + break; + default: + rc = ERANGE; + break; + } + break; + + case C_READ_BINFO: + case C_FC_STAT: + fc_bcopy(binfo, dm->fc_dataout, sizeof(FC_BRD_INFO)); + break; + + case C_NODE: + break; + + case C_DEVP: + offset = (uint32)((ulong)cip->c_arg1); + cnt = (uint32)((ulong)cip->c_arg2); + if ((offset >= (MAX_FC_TARGETS)) || (cnt >= 128)) { + rc = ERANGE; + break; + } + fc_bzero(dm->fc_dataout, (sizeof(dvi_t))+(sizeof(nodeh_t))+(sizeof(node_t))); + fc_bcopy((char *)&binfo->device_queue_hash[offset], (uchar *)dm->fc_dataout, (sizeof(nodeh_t))); + + nodep = binfo->device_queue_hash[offset].node_ptr; + if (nodep == 0) { + break; + } + dev_ptr = nodep->lunlist; + while ((dev_ptr != 0)) { + if(dev_ptr->lun_id == cnt) + break; + dev_ptr = dev_ptr->next; + } + if (dev_ptr == 0) { + break; + } + + fc_bcopy((char *)&binfo->device_queue_hash[offset], (uchar *)dm->fc_dataout, + (sizeof(nodeh_t))); + fc_bcopy((char *)nodep, ((uchar *)dm->fc_dataout + sizeof(nodeh_t)), + (sizeof(node_t))); + fc_bcopy((char *)dev_ptr, + ((uchar *)dm->fc_dataout + sizeof(nodeh_t) + sizeof(node_t)), + (sizeof(dvi_t))); + break; + + case C_NDD_STAT: + fc_bcopy(&NDDSTAT, dm->fc_dataout, sizeof(ndd_genstats_t)); + break; + + case C_LINKINFO: +linfo: + { + LinkInfo *linkinfo; + + linkinfo = (LinkInfo *)dm->fc_dataout; + linkinfo->a_linkEventTag = binfo->fc_eventTag; + linkinfo->a_linkUp = FCSTATCTR.LinkUp; + linkinfo->a_linkDown = FCSTATCTR.LinkDown; + linkinfo->a_linkMulti = FCSTATCTR.LinkMultiEvent; + linkinfo->a_DID = binfo->fc_myDID; + if (binfo->fc_topology == TOPOLOGY_LOOP) { + if(binfo->fc_flag & FC_PUBLIC_LOOP) { + linkinfo->a_topology = LNK_PUBLIC_LOOP; + fc_bcopy((uchar * )binfo->alpa_map, + (uchar *)linkinfo->a_alpaMap, 128); + linkinfo->a_alpaCnt = binfo->alpa_map[0]; + } + else { + linkinfo->a_topology = LNK_LOOP; + fc_bcopy((uchar * )binfo->alpa_map, + (uchar *)linkinfo->a_alpaMap, 128); + linkinfo->a_alpaCnt = binfo->alpa_map[0]; + } + } + else { + fc_bzero((uchar *)linkinfo->a_alpaMap, 128); + linkinfo->a_alpaCnt = 0; + if(binfo->fc_flag & FC_FABRIC) { + linkinfo->a_topology = LNK_FABRIC; + } + else { + linkinfo->a_topology = LNK_PT2PT; + } + } + linkinfo->a_linkState = 0; + switch (binfo->fc_ffstate) { + case FC_INIT_START: + case FC_INIT_NVPARAMS: + case FC_INIT_REV: + case FC_INIT_PARTSLIM: + case FC_INIT_CFGRING: + case FC_INIT_INITLINK: + case FC_LINK_DOWN: + linkinfo->a_linkState = LNK_DOWN; + fc_bzero((uchar *)linkinfo->a_alpaMap, 128); + linkinfo->a_alpaCnt = 0; + break; + case FC_LINK_UP: + case FC_INIT_SPARAM: + case FC_CFG_LINK: + linkinfo->a_linkState = LNK_UP; + break; + case FC_FLOGI: + linkinfo->a_linkState = LNK_FLOGI; + break; + case FC_LOOP_DISC: + case FC_NS_REG: + case FC_NS_QRY: + case FC_NODE_DISC: + case FC_REG_LOGIN: + case FC_CLEAR_LA: + linkinfo->a_linkState = LNK_DISCOVERY; + break; + case FC_READY: + linkinfo->a_linkState = LNK_READY; + break; + } + linkinfo->a_alpa = (uchar)(binfo->fc_myDID & 0xff); + fc_bcopy((uchar * )&binfo->fc_portname, (uchar *)linkinfo->a_wwpName, 8); + fc_bcopy((uchar * )&binfo->fc_nodename, (uchar *)linkinfo->a_wwnName, 8); + } + break; + + case C_IOINFO: + { + IOinfo *ioinfo; + + ioinfo = (IOinfo *)dm->fc_dataout; + ioinfo->a_mbxCmd = FCSTATCTR.issueMboxCmd; + ioinfo->a_mboxCmpl = FCSTATCTR.mboxEvent; + ioinfo->a_mboxErr = FCSTATCTR.mboxStatErr; + ioinfo->a_iocbCmd = FCSTATCTR.IssueIocb; + ioinfo->a_iocbRsp = FCSTATCTR.iocbRsp; + ioinfo->a_adapterIntr = (FCSTATCTR.linkEvent + FCSTATCTR.iocbRsp + + FCSTATCTR.mboxEvent); + ioinfo->a_fcpCmd = FCSTATCTR.fcpCmd; + ioinfo->a_fcpCmpl = FCSTATCTR.fcpCmpl; + ioinfo->a_fcpErr = FCSTATCTR.fcpRspErr + FCSTATCTR.fcpRemoteStop + + FCSTATCTR.fcpPortRjt + FCSTATCTR.fcpPortBusy + FCSTATCTR.fcpError + + FCSTATCTR.fcpLocalErr; + ioinfo->a_seqXmit = NDDSTAT.ndd_ifOutUcastPkts_lsw; + ioinfo->a_seqRcv = NDDSTAT.ndd_recvintr_lsw; + ioinfo->a_bcastXmit = NDDSTAT.ndd_ifOutBcastPkts_lsw + + NDDSTAT.ndd_ifOutMcastPkts_lsw; + ioinfo->a_bcastRcv = FCSTATCTR.frameRcvBcast; + ioinfo->a_elsXmit = FCSTATCTR.elsXmitFrame; + ioinfo->a_elsRcv = FCSTATCTR.elsRcvFrame; + ioinfo->a_RSCNRcv = FCSTATCTR.elsRcvRSCN; + ioinfo->a_seqXmitErr = NDDSTAT.ndd_oerrors; + ioinfo->a_elsXmitErr = FCSTATCTR.elsXmitErr; + ioinfo->a_elsBufPost = binfo->fc_ring[FC_ELS_RING].fc_bufcnt; + ioinfo->a_ipBufPost = binfo->fc_ring[FC_IP_RING].fc_bufcnt; + ioinfo->a_cnt1 = 0; + ioinfo->a_cnt2 = 0; + ioinfo->a_cnt3 = 0; + ioinfo->a_cnt4 = 0; + } + break; + + case C_NODEINFO: + { + NodeInfo * np; + + /* First uint32 word will be count */ + np = (NodeInfo *)dm->fc_dataout; + cnt = 0; + total_mem -= sizeof(NODELIST); + + nlp = binfo->fc_nlpbind_start; + if(nlp == (NODELIST *)&binfo->fc_nlpbind_start) + nlp = binfo->fc_nlpunmap_start; + if(nlp == (NODELIST *)&binfo->fc_nlpunmap_start) + nlp = binfo->fc_nlpmap_start; + while((nlp != (NODELIST *)&binfo->fc_nlpmap_start) && (total_mem > 0)) { + fc_bzero((uchar *)np, sizeof(NODELIST)); + if(nlp->nlp_flag & NLP_NS_REMOVED) + np->a_flag |= NODE_NS_REMOVED; + if(nlp->nlp_flag & NLP_RPI_XRI) + np->a_flag |= NODE_RPI_XRI; + if(nlp->nlp_flag & NLP_REQ_SND) + np->a_flag |= NODE_REQ_SND; + if(nlp->nlp_flag & NLP_RM_ENTRY) + np->a_flag |= NODE_RM_ENTRY; + if(nlp->nlp_flag & NLP_FARP_SND) + np->a_flag |= NODE_FARP_SND; + if(nlp->nlp_type & NLP_FABRIC) + np->a_flag |= NODE_FABRIC; + if(nlp->nlp_type & NLP_FCP_TARGET) + np->a_flag |= NODE_FCP_TARGET; + if(nlp->nlp_type & NLP_IP_NODE) + np->a_flag |= NODE_IP_NODE; + if(nlp->nlp_type & NLP_SEED_WWPN) + np->a_flag |= NODE_SEED_WWPN; + if(nlp->nlp_type & NLP_SEED_WWNN) + np->a_flag |= NODE_SEED_WWNN; + if(nlp->nlp_type & NLP_SEED_DID) + np->a_flag |= NODE_SEED_DID; + if(nlp->nlp_type & NLP_AUTOMAP) + np->a_flag |= NODE_AUTOMAP; + if(nlp->nlp_action & NLP_DO_DISC_START) + np->a_flag |= NODE_DISC_START; + if(nlp->nlp_action & NLP_DO_ADDR_AUTH) + np->a_flag |= NODE_ADDR_AUTH; + np->a_state = nlp->nlp_state; + np->a_did = nlp->nlp_DID; + np->a_targetid = FC_SCSID(nlp->id.nlp_pan, nlp->id.nlp_sid); + fc_bcopy(&nlp->nlp_portname, np->a_wwpn, 8); + fc_bcopy(&nlp->nlp_nodename, np->a_wwnn, 8); + total_mem -= sizeof(NODELIST); + np++; + cnt++; + nlp = (NODELIST *)nlp->nlp_listp_next; + if(nlp == (NODELIST *)&binfo->fc_nlpbind_start) + nlp = binfo->fc_nlpunmap_start; + if(nlp == (NODELIST *)&binfo->fc_nlpunmap_start) + nlp = binfo->fc_nlpmap_start; + } + if(cnt) { + infop->c_outsz = (uint32)(cnt * sizeof(NodeInfo)); + } + } + break; + + case C_HBA_ADAPTERATRIBUTES: + { + HBA_ADAPTERATTRIBUTES * ha; + + vp = &VPD; + ha = (HBA_ADAPTERATTRIBUTES *)dm->fc_dataout; + fc_bzero(dm->fc_dataout, (sizeof(HBA_ADAPTERATTRIBUTES))); + ha->NumberOfPorts = 1; + ha->VendorSpecificID = di->fc_ba.a_pci; + fc_bcopy(di->fc_ba.a_drvrid, ha->DriverVersion, 16); + fc_bcopy(di->fc_ba.a_fwname, ha->FirmwareVersion, 32); + fc_bcopy((uchar * )&binfo->fc_sparam.nodeName, (uchar * )&ha->NodeWWN, + sizeof(HBA_WWN)); + fc_bcopy("Emulex Corporation", ha->Manufacturer, 20); + + switch(((SWAP_LONG(ha->VendorSpecificID))>>16) & 0xffff) { + case PCI_DEVICE_ID_SUPERFLY: + if((vp->rev.biuRev == 1) || + (vp->rev.biuRev == 2) || (vp->rev.biuRev == 3)) { + fc_bcopy("LP7000", ha->Model, 8); + fc_bcopy("Emulex LightPulse LP7000 1 Gigabit PCI Fibre Channel Adapter", ha->ModelDescription, 62); + } + else { + fc_bcopy("LP7000E", ha->Model, 9); + fc_bcopy("Emulex LightPulse LP7000E 1 Gigabit PCI Fibre Channel Adapter", ha->ModelDescription, 62); + } + break; + case PCI_DEVICE_ID_DRAGONFLY: + fc_bcopy("LP8000", ha->Model, 8); + fc_bcopy("Emulex LightPulse LP8000 1 Gigabit PCI Fibre Channel Adapter", ha->ModelDescription, 62); + break; + case PCI_DEVICE_ID_CENTAUR: + if(FC_JEDEC_ID(vp->rev.biuRev) == CENTAUR_2G_JEDEC_ID) { + fc_bcopy("LP9002", ha->Model, 8); + fc_bcopy("Emulex LightPulse LP9002 2 Gigabit PCI Fibre Channel Adapter", ha->ModelDescription, 62); + } + else { + fc_bcopy("LP9000", ha->Model, 8); + fc_bcopy("Emulex LightPulse LP9000 1 Gigabit PCI Fibre Channel Adapter", ha->ModelDescription, 62); + } + break; + case PCI_DEVICE_ID_PEGASUS: + fc_bcopy("LP9802", ha->Model, 8); + fc_bcopy("Emulex LightPulse LP9802 2 Gigabit PCI Fibre Channel Adapter", ha->ModelDescription, 62); + break; + case PCI_DEVICE_ID_THOR: + fc_bcopy("LP10000", ha->Model, 9); + fc_bcopy("Emulex LightPulse LP10000 2 Gigabit PCI Fibre Channel Adapter", ha->ModelDescription, 63); + break; + case PCI_DEVICE_ID_PFLY: + fc_bcopy("LP982", ha->Model, 7); + fc_bcopy("Emulex LightPulse LP982 2 Gigabit PCI Fibre Channel Adapter", ha->ModelDescription, 62); + break; + case PCI_DEVICE_ID_TFLY: + fc_bcopy("LP1050", ha->Model, 8); + fc_bcopy("Emulex LightPulse LP1050 2 Gigabit PCI Fibre Channel Adapter", ha->ModelDescription, 63); + break; + } + fc_bcopy("lpfcdd", ha->DriverName, 7); + fc_bcopy(binfo->fc_SerialNumber, ha->SerialNumber, 32); + fc_bcopy(binfo->fc_OptionROMVersion, ha->OptionROMVersion, 32); + + /* Convert JEDEC ID to ascii for hardware version */ + incr = vp->rev.biuRev; + for(i=0;i<8;i++) { + j = (incr & 0xf); + if(j <= 9) + ha->HardwareVersion[7-i] = (char)((uchar)0x30 + (uchar)j); + else + ha->HardwareVersion[7-i] = (char)((uchar)0x61 + (uchar)(j-10)); + incr = (incr >> 4); + } + ha->HardwareVersion[8] = 0; + + } + break; + + case C_HBA_PORTATRIBUTES: + { + SERV_PARM * hsp; + HBA_OSDN * osdn; + +localport: + vp = &VPD; + hsp = (SERV_PARM *)&binfo->fc_sparam; + hp = (HBA_PORTATTRIBUTES *)dm->fc_dataout; + fc_bzero(dm->fc_dataout, (sizeof(HBA_PORTATTRIBUTES))); + fc_bcopy((uchar * )&binfo->fc_sparam.nodeName, (uchar * )&hp->NodeWWN, + sizeof(HBA_WWN)); + fc_bcopy((uchar * )&binfo->fc_sparam.portName, (uchar * )&hp->PortWWN, + sizeof(HBA_WWN)); + + if( binfo->fc_linkspeed == LA_2GHZ_LINK) + hp->PortSpeed = HBA_PORTSPEED_2GBIT; + else + hp->PortSpeed = HBA_PORTSPEED_1GBIT; + + if(FC_JEDEC_ID(vp->rev.biuRev) == CENTAUR_2G_JEDEC_ID) + hp->PortSupportedSpeed = HBA_PORTSPEED_2GBIT; + else + hp->PortSupportedSpeed = HBA_PORTSPEED_1GBIT; + + hp->PortFcId = binfo->fc_myDID; + hp->PortType = HBA_PORTTYPE_UNKNOWN; + if (binfo->fc_topology == TOPOLOGY_LOOP) { + if(binfo->fc_flag & FC_PUBLIC_LOOP) { + hp->PortType = HBA_PORTTYPE_NLPORT; + fc_bcopy((uchar * )&binfo->fc_fabparam.nodeName, + (uchar * )&hp->FabricName, sizeof(HBA_WWN)); + } + else { + hp->PortType = HBA_PORTTYPE_LPORT; + } + } + else { + if(binfo->fc_flag & FC_FABRIC) { + hp->PortType = HBA_PORTTYPE_NPORT; + fc_bcopy((uchar * )&binfo->fc_fabparam.nodeName, + (uchar * )&hp->FabricName, sizeof(HBA_WWN)); + } + else { + hp->PortType = HBA_PORTTYPE_PTP; + } + } + + if (binfo->fc_flag & FC_BYPASSED_MODE) { + hp->PortState = HBA_PORTSTATE_BYPASSED; + } + else if (binfo->fc_flag & FC_OFFLINE_MODE) { + hp->PortState = HBA_PORTSTATE_DIAGNOSTICS; + } + else { + switch (binfo->fc_ffstate) { + case FC_INIT_START: + case FC_INIT_NVPARAMS: + case FC_INIT_REV: + case FC_INIT_PARTSLIM: + case FC_INIT_CFGRING: + case FC_INIT_INITLINK: + hp->PortState = HBA_PORTSTATE_UNKNOWN; + case FC_LINK_DOWN: + case FC_LINK_UP: + case FC_INIT_SPARAM: + case FC_CFG_LINK: + case FC_FLOGI: + case FC_LOOP_DISC: + case FC_NS_REG: + case FC_NS_QRY: + case FC_NODE_DISC: + case FC_REG_LOGIN: + case FC_CLEAR_LA: + hp->PortState = HBA_PORTSTATE_LINKDOWN; + break; + case FC_READY: + hp->PortState = HBA_PORTSTATE_ONLINE; + break; + default: + hp->PortState = HBA_PORTSTATE_ERROR; + break; + } + } + cnt = binfo->fc_map_cnt + binfo->fc_unmap_cnt; + hp->NumberofDiscoveredPorts = cnt; + if (hsp->cls1.classValid) { + hp->PortSupportedClassofService |= 1; /* bit 1 */ + } + if (hsp->cls2.classValid) { + hp->PortSupportedClassofService |= 2; /* bit 2 */ + } + if (hsp->cls3.classValid) { + hp->PortSupportedClassofService |= 4; /* bit 3 */ + } + hp->PortMaxFrameSize = (((uint32)hsp->cmn.bbRcvSizeMsb) << 8) | + (uint32)hsp->cmn.bbRcvSizeLsb; + + hp->PortSupportedFc4Types.bits[2] = 0x1; + hp->PortSupportedFc4Types.bits[3] = 0x20; + hp->PortSupportedFc4Types.bits[7] = 0x1; + if(clp[CFG_FCP_ON].a_current) { + hp->PortActiveFc4Types.bits[2] = 0x1; + } + if(clp[CFG_NETWORK_ON].a_current) { + hp->PortActiveFc4Types.bits[3] = 0x20; + } + hp->PortActiveFc4Types.bits[7] = 0x1; + + + /* OSDeviceName is the device info filled into the HBA_OSDN structure */ + osdn = (HBA_OSDN *)&hp->OSDeviceName[0]; + fc_bcopy("lpfc", osdn->drvname, 4); + osdn->instance = fc_brd_to_inst(binfo->fc_brd_no); + osdn->target = (HBA_UINT32)(-1); + osdn->lun = (HBA_UINT32)(-1); + + } + break; + + case C_HBA_PORTSTATISTICS: + { + HBA_PORTSTATISTICS * hs; + FCCLOCK_INFO * clock_info; + + hs = (HBA_PORTSTATISTICS *)dm->fc_dataout; + fc_bzero(dm->fc_dataout, (sizeof(HBA_PORTSTATISTICS))); + + mb = (MAILBOX * )mbox; + fc_read_status(binfo, mb); + mb->un.varRdStatus.clrCounters = 0; + if(dfc_issue_mbox(p_dev_ctl, mb, &ipri)) { + rc = ENODEV; + break; + } + hs->TxFrames = mb->un.varRdStatus.xmitFrameCnt; + hs->RxFrames = mb->un.varRdStatus.rcvFrameCnt; + /* Convert KBytes to words */ + hs->TxWords = (mb->un.varRdStatus.xmitByteCnt * 256); + hs->RxWords = (mb->un.varRdStatus.rcvbyteCnt * 256); + fc_read_lnk_stat(binfo, mb); + if(dfc_issue_mbox(p_dev_ctl, mb, &ipri)) { + rc = ENODEV; + break; + } + hs->LinkFailureCount = mb->un.varRdLnk.linkFailureCnt; + hs->LossOfSyncCount = mb->un.varRdLnk.lossSyncCnt; + hs->LossOfSignalCount = mb->un.varRdLnk.lossSignalCnt; + hs->PrimitiveSeqProtocolErrCount = mb->un.varRdLnk.primSeqErrCnt; + hs->InvalidTxWordCount = mb->un.varRdLnk.invalidXmitWord; + hs->InvalidCRCCount = mb->un.varRdLnk.crcCnt; + hs->ErrorFrames = mb->un.varRdLnk.crcCnt; + + if (binfo->fc_topology == TOPOLOGY_LOOP) { + hs->LIPCount = (binfo->fc_eventTag >> 1); + hs->NOSCount = -1; + } + else { + hs->LIPCount = -1; + hs->NOSCount = (binfo->fc_eventTag >> 1); + } + + hs->DumpedFrames = -1; + clock_info = &DD_CTL.fc_clock_info; + hs->SecondsSinceLastReset = clock_info->ticks; + + } + break; + + case C_HBA_WWPNPORTATRIBUTES: + { + HBA_WWN findwwn; + + hp = (HBA_PORTATTRIBUTES *)dm->fc_dataout; + vp = &VPD; + fc_bzero(dm->fc_dataout, (sizeof(HBA_PORTATTRIBUTES))); + + dfc_unlock_enable(ipri, &CMD_LOCK); + if (fc_copyin((uchar *)cip->c_arg1, (uchar *)&findwwn, (ulong)(sizeof(HBA_WWN)))) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + break; + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + /* First Mapped ports, then unMapped ports */ + nlp = binfo->fc_nlpmap_start; + if(nlp == (NODELIST *)&binfo->fc_nlpmap_start) + nlp = binfo->fc_nlpunmap_start; + while(nlp != (NODELIST *)&binfo->fc_nlpunmap_start) { + if (fc_geportname(&nlp->nlp_portname, (NAME_TYPE *)&findwwn) == 2) + goto foundit; + nlp = (NODELIST *)nlp->nlp_listp_next; + if(nlp == (NODELIST *)&binfo->fc_nlpmap_start) + nlp = binfo->fc_nlpunmap_start; + } + rc = ERANGE; + break; + } + + case C_HBA_DISCPORTATRIBUTES: + { + SERV_PARM * hsp; + MATCHMAP * mp; + HBA_OSDN * osdn; + uint32 refresh; + + vp = &VPD; + hp = (HBA_PORTATTRIBUTES *)dm->fc_dataout; + fc_bzero(dm->fc_dataout, (sizeof(HBA_PORTATTRIBUTES))); + offset = (uint32)((ulong)cip->c_arg2); + refresh = (uint32)((ulong)cip->c_arg3); + if(refresh != binfo->nlptimer) { + hp->PortFcId = 0xffffffff; + break; + } + cnt = 0; + /* First Mapped ports, then unMapped ports */ + nlp = binfo->fc_nlpmap_start; + if(nlp == (NODELIST *)&binfo->fc_nlpmap_start) + nlp = binfo->fc_nlpunmap_start; + while(nlp != (NODELIST *)&binfo->fc_nlpunmap_start) { + if(cnt == offset) + goto foundit; + cnt++; + nlp = (NODELIST *)nlp->nlp_listp_next; + if(nlp == (NODELIST *)&binfo->fc_nlpmap_start) + nlp = binfo->fc_nlpunmap_start; + } + rc = ERANGE; + break; + +foundit: + /* Check if its the local port */ + if(binfo->fc_myDID == nlp->nlp_DID) { + goto localport; + } + + mb = (MAILBOX * )mbox; + fc_read_rpi(binfo, (uint32)nlp->nlp_Rpi, + (MAILBOX * )mb, (uint32)0); + + if ((mp = (MATCHMAP * )fc_mem_get(binfo, MEM_BUF)) == 0) { + rc = ENOMEM; + break; + } + hsp = (SERV_PARM *)mp->virt; + if (binfo->fc_flag & FC_SLI2) { + mb->un.varRdRPI.un.sp64.addrHigh = + (uint32)putPaddrHigh(mp->phys); + mb->un.varRdRPI.un.sp64.addrLow = + (uint32)putPaddrLow(mp->phys); + mb->un.varRdRPI.un.sp64.tus.f.bdeSize = sizeof(SERV_PARM); + } + else { + mb->un.varRdRPI.un.sp.bdeAddress = + (uint32)putPaddrLow(mp->phys); + mb->un.varRdRPI.un.sp.bdeSize = sizeof(SERV_PARM); + } + + if(dfc_issue_mbox(p_dev_ctl, mb, &ipri)) { + rc = ENODEV; + break; + } + + if (hsp->cls1.classValid) { + hp->PortSupportedClassofService |= 1; /* bit 1 */ + } + if (hsp->cls2.classValid) { + hp->PortSupportedClassofService |= 2; /* bit 2 */ + } + if (hsp->cls3.classValid) { + hp->PortSupportedClassofService |= 4; /* bit 3 */ + } + hp->PortMaxFrameSize = (((uint32)hsp->cmn.bbRcvSizeMsb) << 8) | + (uint32)hsp->cmn.bbRcvSizeLsb; + + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + + fc_bcopy((uchar * )&nlp->nlp_nodename, (uchar * )&hp->NodeWWN, + sizeof(HBA_WWN)); + fc_bcopy((uchar * )&nlp->nlp_portname, (uchar * )&hp->PortWWN, + sizeof(HBA_WWN)); + + hp->PortSpeed = 0; + if(((binfo->fc_myDID & 0xffff00) == (nlp->nlp_DID & 0xffff00)) && + (binfo->fc_topology == TOPOLOGY_LOOP)) { + if( binfo->fc_linkspeed == LA_2GHZ_LINK) + hp->PortSpeed = HBA_PORTSPEED_2GBIT; + else + hp->PortSpeed = HBA_PORTSPEED_1GBIT; + } + + hp->PortFcId = nlp->nlp_DID; + if((binfo->fc_flag & FC_FABRIC) && + ((binfo->fc_myDID & 0xff0000) == (nlp->nlp_DID & 0xff0000))) { + fc_bcopy((uchar * )&binfo->fc_fabparam.nodeName, + (uchar * )&hp->FabricName, sizeof(HBA_WWN)); + } + hp->PortState = HBA_PORTSTATE_ONLINE; + if (nlp->nlp_type & NLP_FCP_TARGET) { + hp->PortActiveFc4Types.bits[2] = 0x1; + } + if (nlp->nlp_type & NLP_IP_NODE) { + hp->PortActiveFc4Types.bits[3] = 0x20; + } + hp->PortActiveFc4Types.bits[7] = 0x1; + + hp->PortType = HBA_PORTTYPE_UNKNOWN; + if (binfo->fc_topology == TOPOLOGY_LOOP) { + if(binfo->fc_flag & FC_PUBLIC_LOOP) { + /* Check if Fabric port */ + if (fc_geportname(&nlp->nlp_nodename, (NAME_TYPE *)&(binfo->fc_fabparam.nodeName)) == 2) { + hp->PortType = HBA_PORTTYPE_FLPORT; + } + else { + /* Based on DID */ + if((nlp->nlp_DID & 0xff) == 0) { + hp->PortType = HBA_PORTTYPE_NPORT; + } + else { + if((nlp->nlp_DID & 0xff0000) != 0xff0000) { + hp->PortType = HBA_PORTTYPE_NLPORT; + } + } + } + } + else { + hp->PortType = HBA_PORTTYPE_LPORT; + } + } + else { + if(binfo->fc_flag & FC_FABRIC) { + /* Check if Fabric port */ + if (fc_geportname(&nlp->nlp_nodename, (NAME_TYPE *)&(binfo->fc_fabparam.nodeName)) == 2) { + hp->PortType = HBA_PORTTYPE_FPORT; + } + else { + /* Based on DID */ + if((nlp->nlp_DID & 0xff) == 0) { + hp->PortType = HBA_PORTTYPE_NPORT; + } + else { + if((nlp->nlp_DID & 0xff0000) != 0xff0000) { + hp->PortType = HBA_PORTTYPE_NLPORT; + } + } + } + } + else { + hp->PortType = HBA_PORTTYPE_PTP; + } + } + + /* for mapped devices OSDeviceName is device info filled into HBA_OSDN structure */ + if(nlp->nlp_flag & NLP_MAPPED) { + osdn = (HBA_OSDN *)&hp->OSDeviceName[0]; + fc_bcopy("lpfc", osdn->drvname, 4); + osdn->instance = fc_brd_to_inst(binfo->fc_brd_no); + osdn->target = FC_SCSID(nlp->id.nlp_pan, nlp->id.nlp_sid); + osdn->lun = (HBA_UINT32)(-1); + } + + } + break; + + case C_HBA_INDEXPORTATRIBUTES: + { + uint32 refresh; + + vp = &VPD; + hp = (HBA_PORTATTRIBUTES *)dm->fc_dataout; + fc_bzero(dm->fc_dataout, (sizeof(HBA_PORTATTRIBUTES))); + offset = (uint32)((ulong)cip->c_arg2); + refresh = (uint32)((ulong)cip->c_arg3); + if(refresh != binfo->nlptimer) { + hp->PortFcId = 0xffffffff; + break; + } + cnt = 0; + /* Mapped NPorts only */ + nlp = binfo->fc_nlpmap_start; + while(nlp != (NODELIST *)&binfo->fc_nlpmap_start) { + if(cnt == offset) + goto foundit; + cnt++; + nlp = (NODELIST *)nlp->nlp_listp_next; + } + rc = ERANGE; + } + break; + + case C_HBA_SETMGMTINFO: + { + HBA_MGMTINFO *mgmtinfo; + + mgmtinfo = (HBA_MGMTINFO *)dfc.dfc_buffer; + + dfc_unlock_enable(ipri, &CMD_LOCK); + if (fc_copyin((uchar *)cip->c_arg1, (uchar *)mgmtinfo, sizeof(HBA_MGMTINFO))) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + break; + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + binfo->ipVersion = mgmtinfo->IPVersion; + binfo->UDPport = mgmtinfo->UDPPort; + if(binfo->ipVersion == RNID_IPV4) { + fc_bcopy((uchar *)&mgmtinfo->IPAddress[0], + (uchar * )&binfo->ipAddr[0], 4); + } + else { + fc_bcopy((uchar *)&mgmtinfo->IPAddress[0], + (uchar * )&binfo->ipAddr[0], 16); + } + } + break; + + case C_HBA_GETMGMTINFO: + { + HBA_MGMTINFO *mgmtinfo; + + mgmtinfo = (HBA_MGMTINFO *)dm->fc_dataout; + fc_bcopy((uchar * )&binfo->fc_nodename, (uchar *)&mgmtinfo->wwn, 8); + mgmtinfo->unittype = RNID_HBA; + mgmtinfo->PortId = binfo->fc_myDID; + mgmtinfo->NumberOfAttachedNodes = 0; + mgmtinfo->TopologyDiscoveryFlags = 0; + mgmtinfo->IPVersion = binfo->ipVersion; + mgmtinfo->UDPPort = binfo->UDPport; + if(binfo->ipVersion == RNID_IPV4) { + fc_bcopy((void *) & binfo->ipAddr[0], + (void *) & mgmtinfo->IPAddress[0], 4); + } + else { + fc_bcopy((void *) & binfo->ipAddr[0], + (void *) & mgmtinfo->IPAddress[0], 16); + } + } + break; + + case C_HBA_REFRESHINFO: + { + lptr = (uint32 *)dm->fc_dataout; + *lptr = binfo->nlptimer; + } + break; + + case C_HBA_RNID: + ipri = dfc_hba_rnid( p_dev_ctl, dm, cip, infop, buf_info, ipri); + break; + + case C_HBA_GETEVENT: + { + HBA_UINT32 outsize; + HBAEVENT *rec; + HBAEVENT *recout; + + size = (uint32)((ulong)cip->c_arg1); /* size is number of event entries */ + + recout = (HBAEVENT * )dm->fc_dataout; + for(j=0;jhba_event_get == p_dev_ctl->hba_event_put)) + break; + rec = &p_dev_ctl->hbaevent[p_dev_ctl->hba_event_get]; + fc_bcopy((uchar * )rec, (uchar *)recout, sizeof(HBAEVENT)); + recout++; + p_dev_ctl->hba_event_get++; + if(p_dev_ctl->hba_event_get >= MAX_HBAEVENT) { + p_dev_ctl->hba_event_get = 0; + } + } + outsize = j; + + /* copy back size of response */ + dfc_unlock_enable(ipri, &CMD_LOCK); + if (fc_copyout((uchar *)&outsize, (uchar *)cip->c_arg2, sizeof(HBA_UINT32))) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + break; + } + /* copy back number of missed records */ + if (fc_copyout((uchar *)&p_dev_ctl->hba_event_missed, (uchar *)cip->c_arg3, sizeof(HBA_UINT32))) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + break; + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + p_dev_ctl->hba_event_missed = 0; + infop->c_outsz = (uint32)(outsize * sizeof(HBA_EVENTINFO)); + } + + break; + + case C_HBA_FCPTARGETMAPPING: + ipri = dfc_hba_targetmapping(p_dev_ctl, dm, cip, infop, ipri); + break; + + case C_HBA_FCPBINDING: + ipri = dfc_hba_fcpbind(p_dev_ctl, dm, cip, infop, ipri); + break; + + case C_GETCFG: + { + CfgParam * cp; + iCfgParam * icp; + + /* First uint32 word will be count */ + cp = (CfgParam *)dm->fc_dataout; + cnt = 0; + for (i = 0; i < NUM_CFG_PARAM; i++) { + icp = &clp[i]; + cp->a_low = icp->a_low; + cp->a_hi = icp->a_hi; + cp->a_flag = icp->a_flag; + cp->a_default = icp->a_default; + cp->a_current = icp->a_current; + cp->a_changestate = icp->a_changestate; + fc_bcopy(icp->a_string, cp->a_string, 32); + fc_bcopy(icp->a_help, cp->a_help, 80); + cp++; + cnt++; + } + if(cnt) { + infop->c_outsz = (uint32)(cnt * sizeof(CfgParam)); + } + } + break; + + case C_SETCFG: + { + RING * rp; + iCfgParam * icp; + + offset = (uint32)((ulong)cip->c_arg1); + cnt = (uint32)((ulong)cip->c_arg2); + if (offset >= NUM_CFG_PARAM) { + rc = ERANGE; + break; + } + icp = &clp[offset]; + if(icp->a_changestate != CFG_DYNAMIC) { + rc = EPERM; + break; + } + if (((icp->a_low != 0) && (cnt < icp->a_low)) || (cnt > icp->a_hi)) { + rc = ERANGE; + break; + } + switch(offset) { + case CFG_FCP_CLASS: + switch (cnt) { + case 1: + clp[CFG_FCP_CLASS].a_current = CLASS1; + break; + case 2: + clp[CFG_FCP_CLASS].a_current = CLASS2; + break; + case 3: + clp[CFG_FCP_CLASS].a_current = CLASS3; + break; + } + icp->a_current = cnt; + break; + + case CFG_IP_CLASS: + switch (cnt) { + case 1: + clp[CFG_IP_CLASS].a_current = CLASS1; + break; + case 2: + clp[CFG_IP_CLASS].a_current = CLASS2; + break; + case 3: + clp[CFG_IP_CLASS].a_current = CLASS3; + break; + } + icp->a_current = cnt; + break; + + case CFG_LINKDOWN_TMO: + icp->a_current = cnt; + rp = &binfo->fc_ring[FC_FCP_RING]; + if(clp[CFG_LINKDOWN_TMO].a_current) { + rp->fc_ringtmo = clp[CFG_LINKDOWN_TMO].a_current; + } + break; + + default: + icp->a_current = cnt; + } + } + break; + + case C_GET_EVENT: + { + fcEvent *ep; + fcEvent *oep; + fcEvent_header *ehp; + uchar *cp; + MATCHMAP *omm; + int no_more; + + no_more = 1; + + offset = ((uint32)((ulong)cip->c_arg3) & FC_REG_EVENT_MASK); /* event mask */ + incr = (uint32)cip->c_flag; /* event id */ + size = (uint32)cip->c_iocb; /* process requesting event */ + ehp = (fcEvent_header *)p_dev_ctl->fc_evt_head; + while (ehp) { + if (ehp->e_mask == offset) + break; + ehp = (fcEvent_header *)ehp->e_next_header; + } + + if (!ehp) { + rc = ENOENT; + break; + } + + ep = ehp->e_head; + oep = 0; + while(ep) { + /* Find an event that matches the event mask */ + if(ep->evt_sleep == 0) { + /* dequeue event from event list */ + if(oep == 0) { + ehp->e_head = ep->evt_next; + } else { + oep->evt_next = ep->evt_next; + } + if(ehp->e_tail == ep) + ehp->e_tail = oep; + + switch(offset) { + case FC_REG_LINK_EVENT: + break; + case FC_REG_RSCN_EVENT: + /* Return data length */ + cnt = sizeof(uint32); + + dfc_unlock_enable(ipri, &CMD_LOCK); + if (fc_copyout((uchar *)&cnt, (uchar *)cip->c_arg1, sizeof(uint32))) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + fc_bcopy((char *)&ep->evt_data0, dm->fc_dataout, cnt); + infop->c_outsz = (uint32)cnt; + break; + case FC_REG_CT_EVENT: + /* Return data length */ + cnt = (ulong)(ep->evt_data2); + + dfc_unlock_enable(ipri, &CMD_LOCK); + if (fc_copyout((uchar *)&cnt, (uchar *)cip->c_arg1, sizeof(uint32))) { + rc = EIO; + } + else { + if (fc_copyout((uchar *)&ep->evt_data0, (uchar *)cip->c_arg2, + sizeof(uint32))) { + rc = EIO; + } + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + infop->c_outsz = (uint32)cnt; + i = cnt; + mm = (MATCHMAP * )ep->evt_data1; + cp = (uchar *)dm->fc_dataout; + while(mm) { + + if(cnt > FCELSSIZE) + i = FCELSSIZE; + else + i = cnt; + + if(total_mem > 0) { + fc_bcopy((char *)mm->virt, cp, i); + total_mem -= i; + } + + omm = mm; + mm = (MATCHMAP *)mm->fc_mptr; + cp += i; + fc_mem_put(binfo, MEM_BUF, (uchar * )omm); + } + break; + } + + if((offset == FC_REG_CT_EVENT) && (ep->evt_next) && + (((fcEvent *)(ep->evt_next))->evt_sleep == 0)) { + ep->evt_data0 |= 0x80000000; /* More event is waiting */ + if (fc_copyout((uchar *)&ep->evt_data0, (uchar *)cip->c_arg2, + sizeof(uint32))) { + rc = EIO; + } + no_more = 0; + } + + /* Requeue event entry */ + ep->evt_next = 0; + ep->evt_data0 = 0; + ep->evt_data1 = 0; + ep->evt_data2 = 0; + ep->evt_sleep = 1; + ep->evt_flags = 0; + + if(ehp->e_head == 0) { + ehp->e_head = ep; + ehp->e_tail = ep; + } + else { + ehp->e_tail->evt_next = ep; + ehp->e_tail = ep; + } + + if(offset == FC_REG_LINK_EVENT) { + ehp->e_flag &= ~E_GET_EVENT_ACTIVE; + goto linfo; + } + + dfc_unlock_enable(ipri, &CMD_LOCK); + if (fc_copyout((char *)dm->fc_dataout, infop->c_dataout, (int)infop->c_outsz)) { + rc = EIO; + } + dfc_data_free(p_dev_ctl, dm); + + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + if (no_more) + ehp->e_flag &= ~E_GET_EVENT_ACTIVE; + di->fc_refcnt--; + dfc_unlock_enable(ipri, &CMD_LOCK); + + return (rc); + } + oep = ep; + ep = ep->evt_next; + } + if(ep == 0) { + /* No event found */ + rc = ENOENT; + } + } + break; + + case C_SET_EVENT: + ipri = dfc_hba_set_event(p_dev_ctl, dm, cip, infop, ipri); + break; + + default: + rc = EINVAL; + break; + } + +out: + /* dfc_ioctl exit */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0401, /* ptr to msg structure */ + fc_mes0401, /* ptr to msg */ + fc_msgBlk0401.msgPreambleStr, /* begin varargs */ + rc, + infop->c_outsz, + (uint32)((ulong)infop->c_dataout)); /* end varargs */ + + di->fc_refcnt--; + dfc_unlock_enable(ipri, &CMD_LOCK); + + /* Copy data to user space config method */ + if ((rc == 0) || (do_cp == 1)) { + if (infop->c_outsz) { + if (fc_copyout((char *)dm->fc_dataout, infop->c_dataout, (int)infop->c_outsz)) { + rc = EIO; + } + } + } + + /* Now free the space for these structures */ + dmdata_info->virt = (struct dfc_mem *)dm; + dmdata_info->phys = 0; + dmdata_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + dmdata_info->size = sizeof(* dm); + dmdata_info->dma_handle = 0; + dmdata_info->data_handle = 0; + fc_free(p_dev_ctl, dmdata_info); + + mbox_info->virt = (char *)mbox; + mbox_info->phys = 0; + mbox_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + mbox_info->size = sizeof(* mbox); + mbox_info->dma_handle = 0; + mbox_info->data_handle = 0; + fc_free(p_dev_ctl, mbox_info); + + dfc_data_free(p_dev_ctl, dm); + return (rc); +} + + +uint32 +dfc_getLunId( +node_t *nodep, uint32 lunIndex) +{ + static uint32 lun; + static int i; + static dvi_t *dev_ptr; + static FCP_CMND *tmp; + + tmp = (FCP_CMND *)nodep->virtRptLunData; + + if(tmp == 0) { + dev_ptr = nodep->lunlist; + lun = dev_ptr->lun_id; + } else { + i = (lunIndex + 1) * 8; + tmp = (FCP_CMND *)(((uchar *)nodep->virtRptLunData) + i); + lun = ((tmp->fcpLunMsl >> FC_LUN_SHIFT) & 0xff); + } + return lun; +} + +_static_ int +dfc_bcopy( +uint32 *lsrc, +uint32 *ldest, +int cnt, +int incr) +{ + static ushort * ssrc; + static ushort * sdest; + static uchar * csrc; + static uchar * cdest; + static int i; + + csrc = (uchar * )lsrc; + cdest = (uchar * )ldest; + ssrc = (ushort * )lsrc; + sdest = (ushort * )ldest; + + for (i = 0; i < cnt; i += incr) { + if (incr == sizeof(char)) { + *cdest++ = *csrc++; + } else if (incr == sizeof(short)) { + *sdest++ = *ssrc++; + } else { + *ldest++ = *lsrc++; + } + } + return(0); +} + + +_static_ fc_dev_ctl_t * +dfc_getpdev( +struct cmd_input *ci) +{ + static fc_dev_ctl_t * p_dev_ctl;/* pointer to dev_ctl area */ + static FC_BRD_INFO * binfo; + + p_dev_ctl = DD_CTL.p_dev[ci->c_brd]; + binfo = &BINFO; + + if (p_dev_ctl == 0) { + return(0); + } + + /* Make sure command specified ring is within range */ + if (ci->c_ring >= binfo->fc_ffnumrings) { + return(0); + } + + return(p_dev_ctl); +} + + +_static_ int +fc_inst_to_brd( +int ddiinst) +{ + int i; + + for (i = 0; i < fcinstcnt; i++) + if (fcinstance[i] == ddiinst) + return(i); + + return(MAX_FC_BRDS); +} + + +_static_ int +dfc_msdelay( +fc_dev_ctl_t * p_dev_ctl, +ulong ms) +{ + DELAYMSctx(ms); + return(0); +} + +_local_ int +dfc_issue_mbox( +fc_dev_ctl_t * p_dev_ctl, +MAILBOX * mb, +ulong * ipri) +{ + static int j; + static MAILBOX * mbslim; + static FC_BRD_INFO * binfo; + static iCfgParam * clp; + struct dfc_info * di; + static volatile uint32 word0, ldata; + static uint32 ha_copy; + static void * ioa; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + di = &dfc.dfc_info[binfo->fc_brd_no]; + if (binfo->fc_ffstate == FC_ERROR) { + mb->mbxStatus = MBXERR_ERROR; + return(1); + } + j = 0; + while((binfo->fc_mbox_active) || (di->fc_flag & DFC_MBOX_ACTIVE)) { + dfc_unlock_enable(*ipri, &CMD_LOCK); + + if (j < 10) { + dfc_msdelay(p_dev_ctl, 1); + } else { + dfc_msdelay(p_dev_ctl, 50); + } + + *ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + if (j++ >= 600) { + mb->mbxStatus = MBXERR_ERROR; + return(1); + } + } + binfo->fc_mbox_active = 2; + di->fc_flag |= DFC_MBOX_ACTIVE; + +retrycmd: + /* next set own bit for the adapter and copy over command word */ + mb->mbxOwner = OWN_CHIP; + + if ((binfo->fc_flag & FC_SLI2) && (!(binfo->fc_flag & FC_OFFLINE_MODE))) { + /* First copy command data */ + mbslim = FC_SLI2_MAILBOX(binfo); + fc_pcimem_bcopy((uint32 * )mb, (uint32 * )mbslim, + (sizeof(uint32) * (MAILBOX_CMD_WSIZE))); + } else { + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&di->fc_iomap_mem); /* map in SLIM */ + mbslim = FC_MAILBOX(binfo, ioa); + WRITE_SLIM_COPY(binfo, &mb->un.varWords, &mbslim->un.varWords, + (MAILBOX_CMD_WSIZE - 1)); + + /* copy over last word, with mbxOwner set */ + ldata = *((volatile uint32 * )mb); + + + WRITE_SLIM_ADDR(binfo, ((volatile uint32 * )mbslim), ldata); + FC_UNMAP_MEMIO(ioa); + } + + fc_bcopy((char *)(mb), (char *)&p_dev_ctl->dfcmb[0], + (sizeof(uint32) * (MAILBOX_CMD_WSIZE))); + + /* interrupt board to doit right away */ + ioa = (void *)FC_MAP_IO(&di->fc_iomap_io); /* map in io registers */ + WRITE_CSR_REG(binfo, FC_FF_REG(binfo, ioa), CA_MBATT); + FC_UNMAP_MEMIO(ioa); + + FCSTATCTR.issueMboxCmd++; + + if ((binfo->fc_flag & FC_SLI2) && (!(binfo->fc_flag & FC_OFFLINE_MODE))) { + /* First copy command data */ + word0 = p_dev_ctl->dfcmb[0]; + } else { + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&di->fc_iomap_mem); /* map in SLIM */ + mbslim = FC_MAILBOX(binfo, ioa); + word0 = READ_SLIM_ADDR(binfo, ((volatile uint32 * )mbslim)); + FC_UNMAP_MEMIO(ioa); + } + + ioa = (void *)FC_MAP_IO(&di->fc_iomap_io); /* map in io registers */ + ha_copy = READ_CSR_REG(binfo, FC_HA_REG(binfo, ioa)); + FC_UNMAP_MEMIO(ioa); + + /* Wait for command to complete */ + while (((word0 & OWN_CHIP) == OWN_CHIP) || !(ha_copy & HA_MBATT)) { + dfc_unlock_enable(*ipri, &CMD_LOCK); + + if ((j < 20) && (mb->mbxCommand != MBX_INIT_LINK)) { + dfc_msdelay(p_dev_ctl, 1); + } else { + dfc_msdelay(p_dev_ctl, 50); + } + + *ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + if (j++ >= 600) { + mb->mbxStatus = MBXERR_ERROR; + binfo->fc_mbox_active = 0; + di->fc_flag &= ~DFC_MBOX_ACTIVE; + return(1); + } + + if ((binfo->fc_flag & FC_SLI2) && (!(binfo->fc_flag & FC_OFFLINE_MODE))) { + /* First copy command data */ + word0 = p_dev_ctl->dfcmb[0]; + } else { + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&di->fc_iomap_mem); /* map in SLIM */ + mbslim = FC_MAILBOX(binfo, ioa); + word0 = READ_SLIM_ADDR(binfo, ((volatile uint32 * )mbslim)); + FC_UNMAP_MEMIO(ioa); + } + ha_copy = HA_MBATT; + } + + mbslim = (MAILBOX * ) & word0; + if (mbslim->mbxCommand != mb->mbxCommand) { + j++; + if(mb->mbxCommand == MBX_INIT_LINK) { + /* Do not retry init_link's */ + mb->mbxStatus = 0; + binfo->fc_mbox_active = 0; + di->fc_flag &= ~DFC_MBOX_ACTIVE; + return(1); + } + goto retrycmd; + } + + /* copy results back to user */ + if ((binfo->fc_flag & FC_SLI2) && (!(binfo->fc_flag & FC_OFFLINE_MODE))) { + /* First copy command data */ + fc_bcopy((char *)&p_dev_ctl->dfcmb[0], (char *)mb, + (sizeof(uint32) * (MAILBOX_CMD_WSIZE))); + } else { + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&di->fc_iomap_mem); /* map in SLIM */ + mbslim = FC_MAILBOX(binfo, ioa); + /* copy results back to user */ + READ_SLIM_COPY(binfo, (uint32 * )mb, (uint32 * )mbslim, + MAILBOX_CMD_WSIZE); + FC_UNMAP_MEMIO(ioa); + } + + ioa = (void *)FC_MAP_IO(&di->fc_iomap_io); /* map in io registers */ + WRITE_CSR_REG(binfo, FC_HA_REG(binfo, ioa), HA_MBATT); + FC_UNMAP_MEMIO(ioa); + + + binfo->fc_mbox_active = 0; + di->fc_flag &= ~DFC_MBOX_ACTIVE; + + return(0); +} + +int +dfc_put_event( +fc_dev_ctl_t * p_dev_ctl, +uint32 evcode, +uint32 evdata0, +void * evdata1, +void * evdata2) +{ + static fcEvent *ep; + static fcEvent *oep; + static fcEvent_header *ehp = NULL; + static int found; + static MATCHMAP *mp; + static uint32 fstype; + static SLI_CT_REQUEST * ctp; + + ehp = (fcEvent_header *)p_dev_ctl->fc_evt_head; + + while (ehp) { + if (ehp->e_mask == evcode) + break; + ehp = (fcEvent_header *)ehp->e_next_header; + } + + if (!ehp) { + return (0); + } + + ep = ehp->e_head; + oep = 0; + found = 0; + + while(ep && (!found)) { + if(ep->evt_sleep) { + switch(evcode) { + case FC_REG_CT_EVENT: + mp = (MATCHMAP *)evdata1; + ctp = (SLI_CT_REQUEST *)mp->virt; + fstype = (uint32)(ctp->FsType); + if((ep->evt_type == FC_FSTYPE_ALL) || + (ep->evt_type == fstype)) { + found++; + ep->evt_data0 = evdata0; /* tag */ + ep->evt_data1 = evdata1; /* buffer ptr */ + ep->evt_data2 = evdata2; /* count */ + ep->evt_sleep = 0; + if ((ehp->e_mode & E_SLEEPING_MODE) && !(ehp->e_flag & E_GET_EVENT_ACTIVE)) { + ehp->e_flag |= E_GET_EVENT_ACTIVE; + dfc_wakeup(p_dev_ctl, ehp); + } + + } + break; + default: + found++; + ep->evt_data0 = evdata0; + ep->evt_data1 = evdata1; + ep->evt_data2 = evdata2; + ep->evt_sleep = 0; + if ((ehp->e_mode & E_SLEEPING_MODE) && !(ehp->e_flag & E_GET_EVENT_ACTIVE)) { + ehp->e_flag |= E_GET_EVENT_ACTIVE; + dfc_wakeup(p_dev_ctl, ehp); + } + break; + } + } + oep = ep; + ep = ep->evt_next; + } + return(found); +} + +int +dfc_wakeupall( +fc_dev_ctl_t * p_dev_ctl, +int flag) +{ + static fcEvent *ep; + static fcEvent *oep; + static fcEvent_header *ehp = NULL; + static int found; + + ehp = (fcEvent_header *)p_dev_ctl->fc_evt_head; + found = 0; + + while (ehp) { + ep = ehp->e_head; + oep = 0; + while(ep) { + ep->evt_sleep = 0; + if(flag) { + dfc_wakeup(p_dev_ctl, ehp); + } + else if (!(ehp->e_flag & E_GET_EVENT_ACTIVE)) { + found++; + ehp->e_flag |= E_GET_EVENT_ACTIVE; + dfc_wakeup(p_dev_ctl, ehp); + } + oep = ep; + ep = ep->evt_next; + } + ehp = (fcEvent_header *)ehp->e_next_header; + } + return(found); +} + +int +dfc_hba_put_event( +fc_dev_ctl_t * p_dev_ctl, +uint32 evcode, +uint32 evdata1, +uint32 evdata2, +uint32 evdata3, +uint32 evdata4) +{ + static HBAEVENT *rec; + static FC_BRD_INFO * binfo; + + binfo = &BINFO; + rec = &p_dev_ctl->hbaevent[p_dev_ctl->hba_event_put]; + rec->fc_eventcode = evcode; + + rec->fc_evdata1 = evdata1; + rec->fc_evdata2 = evdata2; + rec->fc_evdata3 = evdata3; + rec->fc_evdata4 = evdata4; + p_dev_ctl->hba_event_put++; + if(p_dev_ctl->hba_event_put >= MAX_HBAEVENT) { + p_dev_ctl->hba_event_put = 0; + } + if(p_dev_ctl->hba_event_put == p_dev_ctl->hba_event_get) { + p_dev_ctl->hba_event_missed++; + p_dev_ctl->hba_event_get++; + if(p_dev_ctl->hba_event_get >= MAX_HBAEVENT) { + p_dev_ctl->hba_event_get = 0; + } + } + + return(0); +} /* End dfc_hba_put_event */ + +int +dfc_hba_set_event( +fc_dev_ctl_t * p_dev_ctl, +struct dfc_mem *dm, +struct cmd_input *cip, +struct dfccmdinfo *infop, +ulong ipri) +{ + static fcEvent *evp; + static fcEvent *ep; + static fcEvent *oep; + static fcEvent_header *ehp; + static fcEvent_header *oehp; + static int found; + static MBUF_INFO * buf_info; + static MBUF_INFO bufinfo; + static uint32 offset; + static uint32 incr; + + offset = ((uint32)((ulong)cip->c_arg3) & FC_REG_EVENT_MASK); + incr = (uint32)cip->c_flag; + + switch(offset) { + case FC_REG_CT_EVENT: + found = fc_out_event; + break; + case FC_REG_RSCN_EVENT: + found = fc_out_event; + break; + case FC_REG_LINK_EVENT: + found = 2; + break; + default: + found = 0; + rc = EINTR; + return(ipri); + } + + oehp = 0; + ehp = (fcEvent_header *)p_dev_ctl->fc_evt_head; + while (ehp) { + if (ehp->e_mask == offset) { + found = 0; + break; + } + oehp = ehp; + ehp = (fcEvent_header *)ehp->e_next_header; + } + + if (!ehp) { + buf_info = &bufinfo; + buf_info->virt = 0; + buf_info->phys = 0; + buf_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = sizeof(void *); + buf_info->size = sizeof(fcEvent_header); + buf_info->dma_handle = 0; + + dfc_unlock_enable(ipri, &CMD_LOCK); + fc_malloc(p_dev_ctl, buf_info); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + if (buf_info->virt == NULL) { + rc = EINTR; + return(ipri); + } + ehp = (fcEvent_header *)(buf_info->virt); + fc_bzero((char *)ehp, sizeof(fcEvent_header)); + if(p_dev_ctl->fc_evt_head == 0) { + p_dev_ctl->fc_evt_head = ehp; + p_dev_ctl->fc_evt_tail = ehp; + } else { + ((fcEvent_header *)(p_dev_ctl->fc_evt_tail))->e_next_header = ehp; + p_dev_ctl->fc_evt_tail = (void *)ehp; + } + ehp->e_handle = incr; + ehp->e_mask = offset; + + } + + while(found) { + /* Save event id for C_GET_EVENT */ + buf_info = &bufinfo; + buf_info->virt = 0; + buf_info->phys = 0; + buf_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = sizeof(void *); + buf_info->size = sizeof(fcEvent); + buf_info->dma_handle = 0; + + dfc_unlock_enable(ipri, &CMD_LOCK); + fc_malloc(p_dev_ctl, buf_info); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + if (buf_info->virt == NULL) { + rc = EINTR; + break; + } + oep = (fcEvent *)(buf_info->virt); + fc_bzero((char *)oep, sizeof(fcEvent)); + + oep->evt_sleep = 1; + oep->evt_handle = incr; + oep->evt_mask = offset; + switch(offset) { + case FC_REG_CT_EVENT: + oep->evt_type = (uint32)((ulong)cip->c_arg2); /* fstype for CT */ + break; + default: + oep->evt_type = 0; + } + + if(ehp->e_head == 0) { + ehp->e_head = oep; + ehp->e_tail = oep; + } else { + ehp->e_tail->evt_next = (void *)oep; + ehp->e_tail = oep; + } + oep->evt_next = 0; + found--; + } + + switch(offset) { + case FC_REG_CT_EVENT: + case FC_REG_RSCN_EVENT: + case FC_REG_LINK_EVENT: + if(dfc_sleep(p_dev_ctl, ehp)) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EINTR; + /* Remove all eventIds from queue */ + ep = ehp->e_head; + oep = 0; + found = 0; + while(ep) { + if(ep->evt_handle == incr) { + /* dequeue event from event list */ + if(oep == 0) { + ehp->e_head = ep->evt_next; + } + else { + oep->evt_next = ep->evt_next; + } + if(ehp->e_tail == ep) + ehp->e_tail = oep; + evp = ep; + ep = ep->evt_next; + dfc_unlock_enable(ipri, &CMD_LOCK); + buf_info = &bufinfo; + buf_info->virt = (uchar *)evp; + buf_info->size = sizeof(fcEvent); + buf_info->phys = 0; + buf_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = 0; + buf_info->dma_handle = 0; + fc_free(p_dev_ctl, buf_info); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + } else { + oep = ep; + ep = ep->evt_next; + } + } + if (ehp->e_head == 0) { + + if (oehp == 0) { + p_dev_ctl->fc_evt_head = ehp->e_next_header; + } else { + oehp->e_next_header = ehp->e_next_header; + } + if (p_dev_ctl->fc_evt_tail == ehp) + p_dev_ctl->fc_evt_tail = oehp; + + dfc_unlock_enable(ipri, &CMD_LOCK); + buf_info = &bufinfo; + buf_info->virt = (uchar *)ehp; + buf_info->size = sizeof(fcEvent_header); + buf_info->phys = 0; + buf_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = 0; + buf_info->dma_handle = 0; + fc_free(p_dev_ctl, buf_info); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + } + return(ipri); + } + return(ipri); + } + return(ipri); +} + +int +dfc_hba_sendscsi_fcp( +fc_dev_ctl_t * p_dev_ctl, +struct dfc_mem *dm, +struct cmd_input *cip, +struct dfccmdinfo *infop, +ulong ipri) +{ + static HBA_WWN findwwn; + static DMATCHMAP * fcpmp; + static RING * rp; + static fc_buf_t * fcptr; + static FCP_CMND * fcpCmnd; + static FCP_RSP * fcpRsp; + static ULP_BDE64 * bpl; + static MATCHMAP * bmp; + static DMATCHMAP * outdmp; + static MBUF_INFO * buf_info; + static MBUF_INFO bufinfo; + static uint32 buf1sz; + static uint32 buf2sz; + static uint32 j; + static uint32 * lptr; + static char * bp; + static uint32 max; + static struct { + uint32 rspcnt; + uint32 snscnt; + } count; + static struct dev_info *dev_info; + static FC_BRD_INFO * binfo; + + binfo = &BINFO; + lptr = (uint32 *)&cip->c_string[0]; + buf1sz = *lptr++; /* Request data size */ + buf2sz = *lptr; /* Sns / rsp buffer size */ + if((buf1sz + infop->c_outsz) > (80 * 4096)) { + rc = ERANGE; + return(ipri); + } + + dfc_unlock_enable(ipri, &CMD_LOCK); + if (fc_copyin((uchar *)cip->c_arg3, (uchar *)&findwwn, (ulong)(sizeof(HBA_WWN)))) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + return(ipri); + } + + buf_info = &bufinfo; + buf_info->virt = 0; + buf_info->phys = 0; + buf_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = sizeof(void *); + buf_info->size = sizeof(struct dev_info); + buf_info->dma_handle = 0; + + fc_malloc(p_dev_ctl, buf_info); + if (buf_info->virt == NULL) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = ENOMEM; + return(ipri); + } + dev_info = (struct dev_info *)buf_info->virt; + + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + /* Allocate buffer for Buffer ptr list */ + if ((bmp = (MATCHMAP * )fc_mem_get(binfo, MEM_BPL)) == 0) { + rc = ENOMEM; + goto ssout3; + } + bpl = (ULP_BDE64 * )bmp->virt; + dfc_unlock_enable(ipri, &CMD_LOCK); + + if((fcpmp = dfc_fcp_data_alloc(p_dev_ctl, bpl)) == 0) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + fc_mem_put(binfo, MEM_BUF, (uchar * )bmp); + rc = ENOMEM; + goto ssout3; + } + bpl += 2; /* Cmnd and Rsp ptrs */ + fcpCmnd = (FCP_CMND *)fcpmp->dfc.virt; + fcpRsp = (FCP_RSP *)((uchar *)fcpCmnd + sizeof(FCP_CMND)); + +{ +lptr = (uint32 *)bmp->virt; +} + if (fc_copyin((uchar *)cip->c_arg1, (uchar *)fcpCmnd, (ulong)(buf1sz))) { + dfc_fcp_data_free(p_dev_ctl, fcpmp); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + fc_mem_put(binfo, MEM_BUF, (uchar * )bmp); + rc = ENOMEM; + goto ssout3; + } +{ +lptr = (uint32 *)fcpCmnd; +} + fc_mpdata_sync(fcpmp->dfc.dma_handle, 0, 0, DDI_DMA_SYNC_FORDEV); + + if(fcpCmnd->fcpCntl3 == WRITE_DATA) { + bp = (uchar *)infop->c_dataout; + } + else { + bp = 0; + } + + if(infop->c_outsz == 0) + outdmp = dfc_cmd_data_alloc(p_dev_ctl, bp, bpl, 512); + else + outdmp = dfc_cmd_data_alloc(p_dev_ctl, bp, bpl, infop->c_outsz); + + if(!(outdmp)) { + dfc_fcp_data_free(p_dev_ctl, fcpmp); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + fc_mem_put(binfo, MEM_BUF, (uchar * )bmp); + rc = ENOMEM; + goto ssout3; + } + + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + max = 0; +redoss: +{ +lptr = (uint32 *)bmp->virt; +} + + if((rc=fc_snd_scsi_req(p_dev_ctl, (NAME_TYPE *)&findwwn, bmp, fcpmp, outdmp, infop->c_outsz, dev_info))) + { + if((rc == ENODEV) && (max < 4)) { + max++; + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_msdelay(p_dev_ctl, 500); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + goto redoss; + } + if(rc == ENODEV) + rc = EACCES; + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_cmd_data_free(p_dev_ctl, outdmp); + dfc_fcp_data_free(p_dev_ctl, fcpmp); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + fc_mem_put(binfo, MEM_BUF, (uchar * )bmp); + rc = ENOMEM; + goto ssout3; + } + + rp = &binfo->fc_ring[FC_FCP_RING]; + fcptr = (fc_buf_t *)fcpmp->dfc.virt; + + j = 0; + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_msdelay(p_dev_ctl, 1); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + /* Wait for FCP I/O to complete or timeout */ + while(dev_info->queue_state == ACTIVE_PASSTHRU) { + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_msdelay(p_dev_ctl, 50); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + if(j >= 600) { + break; + } + j++; + } + + /* Check for timeout conditions */ + if(dev_info->queue_state == ACTIVE_PASSTHRU) { + /* Free resources */ + fc_deq_fcbuf_active(rp, fcptr->iotag); + rc = ETIMEDOUT; + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_cmd_data_free(p_dev_ctl, outdmp); + dfc_fcp_data_free(p_dev_ctl, fcpmp); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + goto ssout3; + } + if ((infop->c_cmd == C_HBA_SEND_FCP) && + (dev_info->ioctl_event != IOSTAT_LOCAL_REJECT)) { + if(buf2sz < sizeof(FCP_RSP)) + count.snscnt = buf2sz; + else + count.snscnt = sizeof(FCP_RSP); +{ +lptr = (uint32 *)fcpRsp; +} + dfc_unlock_enable(ipri, &CMD_LOCK); + if (fc_copyout((uchar *)fcpRsp, (uchar *)cip->c_arg2, count.snscnt)) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + goto ssout0; + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + } + + switch(dev_info->ioctl_event) { + case IOSTAT_SUCCESS: +cpdata: + /* copy back response data */ + if(infop->c_outsz < dev_info->clear_count) { + infop->c_outsz = 0; + rc = ERANGE; + goto ssout0; + } + infop->c_outsz = dev_info->clear_count; + + if (infop->c_cmd == C_HBA_SEND_SCSI) { + count.rspcnt = infop->c_outsz; + count.snscnt = 0; + } else { + /* For C_HBA_SEND_FCP, snscnt is already set */ + count.rspcnt = infop->c_outsz; + } + + /* Return data length */ + dfc_unlock_enable(ipri, &CMD_LOCK); + if (fc_copyout((uchar *)&count, (uchar *)cip->c_arg3, (2*sizeof(uint32)))) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + goto ssout0; + } + + infop->c_outsz = 0; + if(count.rspcnt) { + if(dfc_rsp_data_copy(p_dev_ctl, (uchar *)infop->c_dataout, outdmp, count.rspcnt)) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + goto ssout0; + } + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + break; + case IOSTAT_LOCAL_REJECT: + infop->c_outsz = 0; + if(dev_info->ioctl_errno == IOERR_SEQUENCE_TIMEOUT) { + rc = ETIMEDOUT; + goto ssout0; + } + rc = EFAULT; + goto ssout0; + case IOSTAT_FCP_RSP_ERROR: + j = 0; + + if(fcpCmnd->fcpCntl3 == READ_DATA) { + dev_info->clear_count = infop->c_outsz - dev_info->clear_count; + if ((fcpRsp->rspStatus2 & RESID_UNDER) && + (dev_info->clear_count)) { + goto cpdata; + } + } + else + dev_info->clear_count = 0; + + count.rspcnt = (uint32)dev_info->clear_count; + infop->c_outsz = 0; + + if (fcpRsp->rspStatus2 & RSP_LEN_VALID) { + j = SWAP_DATA(fcpRsp->rspRspLen); + } + if (fcpRsp->rspStatus2 & SNS_LEN_VALID) { + if (infop->c_cmd == C_HBA_SEND_SCSI) { + if(buf2sz < (int)dev_info->sense_length) + count.snscnt = buf2sz; + else + count.snscnt = dev_info->sense_length; + + /* Return sense info from rsp packet */ + dfc_unlock_enable(ipri, &CMD_LOCK); + if (fc_copyout(((uchar *)&fcpRsp->rspInfo0) + j, + (uchar *)cip->c_arg2, count.snscnt)) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + goto ssout0; + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + } + } + else { + rc = EFAULT; + goto ssout0; + } + + /* Return data length */ + dfc_unlock_enable(ipri, &CMD_LOCK); + if (fc_copyout((uchar *)&count, (uchar *)cip->c_arg3, (2*sizeof(uint32)))) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + goto ssout0; + } + + /* return data for read */ + if(count.rspcnt) { + if(dfc_rsp_data_copy(p_dev_ctl, (uchar *)infop->c_dataout, outdmp, count.rspcnt)) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + goto ssout0; + } + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + break; + + default: + infop->c_outsz = 0; + rc = EFAULT; + goto ssout0; + } + +ssout0: + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_cmd_data_free(p_dev_ctl, outdmp); + dfc_fcp_data_free(p_dev_ctl, fcpmp); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); +ssout3: + dfc_unlock_enable(ipri, &CMD_LOCK); + buf_info->size = sizeof(struct dev_info); + buf_info->virt = (uint32 * )dev_info; + buf_info->phys = 0; + buf_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + + fc_free(p_dev_ctl, buf_info); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + return(ipri); +} + +int +dfc_hba_fcpbind( +fc_dev_ctl_t * p_dev_ctl, +struct dfc_mem *dm, +struct cmd_input *cip, +struct dfccmdinfo *infop, +ulong ipri) +{ + static HBA_FCPBINDING * hb; + static HBA_FCPBINDINGENTRY *ep; + static uint32 room; + static uint32 total; + static uint32 lunIndex, totalLuns; /* these 2 vars are per target id */ + static uint32 lunId; /* what we get back at lunIndex in virtRptLunData */ + static int memsz, mapList; + static char *appPtr; + static uint32 cnt; + static node_t * nodep; + static dvi_t * dev_ptr; + static uint32 total_mem; + static uint32 offset, j; + static NODELIST * nlp; + static FC_BRD_INFO * binfo; + + binfo = &BINFO; + hb = (HBA_FCPBINDING *)dm->fc_dataout; + ep = &hb->entry[0]; + room = (uint32)((ulong)cip->c_arg1); + cnt = 0; + total = 0; + memsz = 0; + lunIndex = 0; + totalLuns = 0; + appPtr = ((char *)infop->c_dataout) + sizeof(ulong); + mapList = 1; + + /* First Mapped ports, then unMapped ports, then binding list */ + nlp = binfo->fc_nlpmap_start; + if(nlp == (NODELIST *)&binfo->fc_nlpmap_start) { + nlp = binfo->fc_nlpunmap_start; + mapList = 0; + } + if(nlp == (NODELIST *)&binfo->fc_nlpunmap_start) + nlp = binfo->fc_nlpbind_start; + while(nlp != (NODELIST *)&binfo->fc_nlpbind_start) { + + if (nlp->nlp_type & NLP_SEED_MASK) { + offset = FC_SCSID(nlp->id.nlp_pan, nlp->id.nlp_sid); + if(offset > MAX_FC_TARGETS) { + goto nextbind; + } + nodep = binfo->device_queue_hash[offset].node_ptr; + if(nodep) + dev_ptr = nodep->lunlist; + else + dev_ptr = 0; + + if((!nodep) || (!dev_ptr)) { + dev_ptr=fc_alloc_devp(p_dev_ctl, offset, 0); + nodep = dev_ptr->nodep; + } + + if(mapList) { + /* For devices on the map list, we need to issue REPORT_LUN + * in case the device's config has changed */ + nodep->rptlunstate = REPORT_LUN_ONGOING; + issue_report_lun(p_dev_ctl, dev_ptr, 0); + + j = 0; + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_msdelay(p_dev_ctl, 1); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + /* Wait for ReportLun request to complete or timeout */ + while(nodep->rptlunstate == REPORT_LUN_ONGOING) { + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_msdelay(p_dev_ctl, 50); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + if(j >= 600) { + break; + } + j++; + } + if(nodep->rptlunstate == REPORT_LUN_ONGOING) { + break; + } + /* + * If nodep->virtRptLunData is null, then we just report 1 lun. + * If not null, we will report luns from virtRptLunData buffer. + */ + lunIndex = 0; + totalLuns = 1; + dev_ptr = 0; + if (nodep->virtRptLunData) { + uint32 *tmp; + tmp = (uint32*)nodep->virtRptLunData; + totalLuns = SWAP_DATA(*tmp) / 8; + } + } + + while(((mapList) && (lunIndex < totalLuns)) || + (dev_ptr)) { + if(mapList) { + lunId = dfc_getLunId(nodep, lunIndex); + dev_ptr = fc_find_lun(binfo, offset, lunId); + } else + lunId = dev_ptr->lun_id; + + if((mapList) || + ((dev_ptr) && (dev_ptr->opened))) + { + if(cnt < room) { + HBA_OSDN *osdn; + HBA_UINT32 fcpLun[2]; + if(total_mem - memsz < sizeof(HBA_FCPBINDINGENTRY)) { + dfc_unlock_enable(ipri, &CMD_LOCK); + fc_copyout((char *)(&hb->entry[0]), appPtr, memsz); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + appPtr = appPtr + memsz; + ep = &hb->entry[0]; + memsz = 0; + } + fc_bzero((void *)ep->ScsiId.OSDeviceName, 256); + if(nlp->nlp_flag & NLP_MAPPED) { + osdn = (HBA_OSDN *)&ep->ScsiId.OSDeviceName[0]; + fc_bcopy("lpfc", osdn->drvname, 4); + osdn->instance = fc_brd_to_inst(binfo->fc_brd_no); + osdn->target = FC_SCSID(nlp->id.nlp_pan, nlp->id.nlp_sid); + osdn->lun = (HBA_UINT32)(lunId); + } + + ep->ScsiId.ScsiTargetNumber = + FC_SCSID(nlp->id.nlp_pan, nlp->id.nlp_sid); + ep->ScsiId.ScsiOSLun = (HBA_UINT32)(lunId); + ep->ScsiId.ScsiBusNumber = 0; + + fc_bzero((char *)fcpLun, sizeof(HBA_UINT64)); + fcpLun[0] = (lunId << FC_LUN_SHIFT); + if (nodep->addr_mode == VOLUME_SET_ADDRESSING) { + fcpLun[0] |= SWAP_DATA(0x40000000); + } + fc_bcopy((char *)&fcpLun[0], (char *)&ep->FcpId.FcpLun, sizeof(HBA_UINT64)); + if (nlp->nlp_type & NLP_SEED_DID) { + ep->type = TO_D_ID; + ep->FcpId.FcId = nlp->nlp_DID; + ep->FcId = nlp->nlp_DID; + fc_bzero((uchar *)&ep->FcpId.PortWWN, sizeof(HBA_WWN)); + fc_bzero((uchar *)&ep->FcpId.NodeWWN, sizeof(HBA_WWN)); + } + else { + ep->type = TO_WWN; + ep->FcId = 0; + ep->FcpId.FcId = 0; + if (nlp->nlp_type & NLP_SEED_WWPN) + fc_bcopy(&nlp->nlp_portname, (uchar *)&ep->FcpId.PortWWN, sizeof(HBA_WWN)); + else + fc_bcopy(&nlp->nlp_nodename, (uchar *)&ep->FcpId.NodeWWN, sizeof(HBA_WWN)); + } + if (nlp->nlp_state == NLP_ALLOC) { + ep->FcpId.FcId = nlp->nlp_DID; + fc_bcopy(&nlp->nlp_portname, (uchar *)&ep->FcpId.PortWWN, sizeof(HBA_WWN)); + fc_bcopy(&nlp->nlp_nodename, (uchar *)&ep->FcpId.NodeWWN, sizeof(HBA_WWN)); + } + ep++; + cnt++; + memsz = memsz + sizeof(HBA_FCPBINDINGENTRY); + total++; + } + } + if(mapList) { + /* for map list, we want the while loop to go stricly + * based on lunIndex and totalLuns. */ + lunIndex++; + dev_ptr = 0; + } else + dev_ptr = dev_ptr->next; + } /* while loop */ + } + +nextbind: + nlp = (NODELIST *)nlp->nlp_listp_next; + if(nlp == (NODELIST *)&binfo->fc_nlpmap_start) { + nlp = binfo->fc_nlpunmap_start; + mapList = 0; + } + if(nlp == (NODELIST *)&binfo->fc_nlpunmap_start) + nlp = binfo->fc_nlpbind_start; + } + + dfc_unlock_enable(ipri, &CMD_LOCK); + fc_copyout((char *)(&hb->entry[0]), appPtr, memsz); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + hb->NumberOfEntries = (HBA_UINT32)total; + dfc_unlock_enable(ipri, &CMD_LOCK); + fc_copyout((char *)(&hb->NumberOfEntries), infop->c_dataout, sizeof(ulong)); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + infop->c_outsz = 0; + if (total > room) { + rc = ERANGE; + do_cp = 1; + } + return (ipri); +} + +int +dfc_hba_sendmgmt_ct( +fc_dev_ctl_t * p_dev_ctl, +struct dfc_mem *dm, +struct cmd_input *cip, +struct dfccmdinfo *infop, +ulong ipri) + +{ + static ULP_BDE64 * bpl; + static MATCHMAP * bmp; + static DMATCHMAP * indmp; + static DMATCHMAP * outdmp; + static uint32 portid; + static HBA_WWN findwwn; + static uint32 buf1sz; + static uint32 buf2sz; + static int j; + static uint32 max; + static uint32 incr; + static uint32 * lptr; + static NODELIST * nlp; + static FC_BRD_INFO * binfo; + + binfo = &BINFO; + incr = (uint32)cip->c_flag; /* timeout for CT request */ + lptr = (uint32 *)&cip->c_string[0]; + buf1sz = *lptr++; + buf2sz = *lptr; + + if((buf1sz == 0) || + (buf2sz == 0) || + (buf1sz + buf2sz > (80 * 4096))) { + rc = ERANGE; + return(ipri); + } + + dfc_unlock_enable(ipri, &CMD_LOCK); + + if(infop->c_cmd == C_SEND_MGMT_CMD) { + if (fc_copyin((uchar *)cip->c_arg3, (uchar *)&findwwn, (ulong)(sizeof(HBA_WWN)))) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + return(ipri); + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + /* First Mapped ports, then unMapped ports */ + nlp = binfo->fc_nlpmap_start; + if(nlp == (NODELIST *)&binfo->fc_nlpmap_start) + nlp = binfo->fc_nlpunmap_start; + while(nlp != (NODELIST *)&binfo->fc_nlpunmap_start) { + if (fc_geportname(&nlp->nlp_portname, (NAME_TYPE *)&findwwn) == 2) + goto gotit; + nlp = (NODELIST *)nlp->nlp_listp_next; + if(nlp == (NODELIST *)&binfo->fc_nlpmap_start) + nlp = binfo->fc_nlpunmap_start; + } + rc = ERANGE; + return(ipri); +gotit: + portid = nlp->nlp_DID; + dfc_unlock_enable(ipri, &CMD_LOCK); + } + else { + portid = (uint32)((ulong)cip->c_arg3); + } + + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + /* Allocate buffer for Buffer ptr list */ + if ((bmp = (MATCHMAP * )fc_mem_get(binfo, MEM_BPL)) == 0) { + rc = ENOMEM; + return(ipri); + } + bpl = (ULP_BDE64 * )bmp->virt; + dfc_unlock_enable(ipri, &CMD_LOCK); + + if((indmp = dfc_cmd_data_alloc(p_dev_ctl, (uchar *)cip->c_arg1, bpl, buf1sz)) == 0) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + rc = ENOMEM; + return(ipri); + } + bpl += indmp->dfc_flag; + + if((outdmp = dfc_cmd_data_alloc(p_dev_ctl, 0, bpl, buf2sz)) == 0) { + dfc_cmd_data_free(p_dev_ctl, indmp); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + rc = ENOMEM; + return(ipri); + } + + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + max = 0; +redoct: + if((rc=fc_issue_ct_req(binfo, portid, bmp, indmp, outdmp, incr))) { + if((rc == ENODEV) && (max < 4)) { + max++; + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_msdelay(p_dev_ctl, 500); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + goto redoct; + } + if(rc == ENODEV) + rc = EACCES; + goto ctout1; + } + + j = 0; + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_msdelay(p_dev_ctl, 1); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + /* Wait for CT request to complete or timeout */ + while(outdmp->dfc_flag == 0) { + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_msdelay(p_dev_ctl, 50); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + if(j >= 600) { + outdmp->dfc_flag = -1; + break; + } + j++; + } + + j = outdmp->dfc_flag; + if(j == -1) { + rc = ETIMEDOUT; + goto ctout1; + } + + if(j == -2) { + rc = EFAULT; + goto ctout1; + } + + /* copy back response data */ + if(j > buf2sz) { + rc = ERANGE; + /* C_CT Request error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1208, /* ptr to msg structure */ + fc_mes1208, /* ptr to msg */ + fc_msgBlk1208.msgPreambleStr, /* begin varargs */ + outdmp->dfc_flag, + 4096); /* end varargs */ + goto ctout1; + } + fc_bcopy((char *)&j, dm->fc_dataout, sizeof(int)); + + /* copy back data */ + dfc_unlock_enable(ipri, &CMD_LOCK); + if(dfc_rsp_data_copy(p_dev_ctl, (uchar *)cip->c_arg2, outdmp, j)) + rc = EIO; + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + +ctout1: + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_cmd_data_free(p_dev_ctl, indmp); + dfc_cmd_data_free(p_dev_ctl, outdmp); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + return(ipri); +} + +int +dfc_hba_rnid( +fc_dev_ctl_t * p_dev_ctl, +struct dfc_mem *dm, +struct cmd_input *cip, +struct dfccmdinfo *infop, +MBUF_INFO *buf_info, +ulong ipri) +{ + static HBA_WWN findwwn; + static ELS_PKT * ep; + static DMATCHMAP inmatp; + static DMATCHMAP outmatp; + static MATCHMAP * bmptr; + static uint32 * lptr; + static NODELIST * nlp; + static int j; + static uint32 size, incr; + static uint32 max; + static FC_BRD_INFO * binfo; + + binfo = &BINFO; + dfc_unlock_enable(ipri, &CMD_LOCK); + if (fc_copyin((uchar *)cip->c_arg1, (uchar *)&findwwn, (ulong)(sizeof(HBA_WWN)))) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + return(ipri); + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + size = NLP_ALLOC; + incr = 0; +nlpchk: + nlp = binfo->fc_nlpbind_start; + if(nlp == (NODELIST *)&binfo->fc_nlpbind_start) + nlp = binfo->fc_nlpunmap_start; + if(nlp == (NODELIST *)&binfo->fc_nlpunmap_start) + nlp = binfo->fc_nlpmap_start; + while(nlp != (NODELIST *)&binfo->fc_nlpmap_start) { + if(cip->c_flag == NODE_WWN) { + if (fc_geportname(&nlp->nlp_nodename, (NAME_TYPE *)&findwwn) == 2) + goto foundrnid; + } + else { + if (fc_geportname(&nlp->nlp_portname, (NAME_TYPE *)&findwwn) == 2) + goto foundrnid; + } + nlp = (NODELIST *)nlp->nlp_listp_next; + if(nlp == (NODELIST *)&binfo->fc_nlpbind_start) + nlp = binfo->fc_nlpunmap_start; + if(nlp == (NODELIST *)&binfo->fc_nlpunmap_start) + nlp = binfo->fc_nlpmap_start; + } + rc = ERANGE; + return(ipri); + +foundrnid: + if(nlp->nlp_action & NLP_DO_RNID) + goto waitloop; + + if(nlp->nlp_Rpi == 0) { + int wait_sec; + + size = nlp->nlp_DID; + if(size == 0) { + size = nlp->nlp_oldDID; + } + if((size == 0) || (size == 0xffffffff) || (size == 0xffffff) || + (incr == 3)) { + rc = ERANGE; + return(ipri); + } + incr++; + nlp->nlp_action |= NLP_DO_RNID; + fc_els_cmd(binfo, ELS_CMD_PLOGI, (void *)((ulong)size), + (uint32)0, (ushort)0, nlp); +waitloop: + wait_sec = 0; + while(nlp->nlp_action & NLP_DO_RNID) { + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_msdelay(p_dev_ctl, 1000); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + if(wait_sec++ == 10) + return(ipri); + } + nlp->nlp_action &= ~NLP_DO_RNID; + goto nlpchk; + } + + buf_info->virt = 0; + buf_info->phys = 0; + buf_info->flags = (FC_MBUF_DMA | FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = (int)FCELSSIZE; + buf_info->size = (int)FCELSSIZE; + buf_info->dma_handle = 0; + + dfc_unlock_enable(ipri, &CMD_LOCK); + fc_malloc(p_dev_ctl, buf_info); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + if (buf_info->phys == NULL) { + rc = ENOMEM; + return(ipri); + } + inmatp.dfc.virt = buf_info->virt; + if (buf_info->dma_handle) { + inmatp.dfc.dma_handle = buf_info->dma_handle; + inmatp.dfc.data_handle = buf_info->data_handle; + } + inmatp.dfc.phys = (uchar * )buf_info->phys; + + /* Save size of RNID request in this field */ + inmatp.dfc.fc_mptr = (uchar *)((ulong)(2*sizeof(uint32))); + fc_bzero((void *)inmatp.dfc.virt, (2 * sizeof(uint32))); + + buf_info->virt = 0; + buf_info->phys = 0; + buf_info->flags = (FC_MBUF_DMA | FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = 4096; + buf_info->size = infop->c_outsz + sizeof(uint32); + buf_info->dma_handle = 0; + + dfc_unlock_enable(ipri, &CMD_LOCK); + fc_malloc(p_dev_ctl, buf_info); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + if (buf_info->phys == NULL) { + rc = ENOMEM; + goto rnidout2; + } + outmatp.dfc.virt = buf_info->virt; + if (buf_info->dma_handle) { + outmatp.dfc.dma_handle = buf_info->dma_handle; + outmatp.dfc.data_handle = buf_info->data_handle; + } + outmatp.dfc.phys = (uchar * )buf_info->phys; + + /* Save size in this field */ + outmatp.dfc.fc_mptr = (uchar *)((ulong)(infop->c_outsz + sizeof(uint32))); + + /* Setup RNID command */ + lptr = (uint32 *)inmatp.dfc.virt; + *lptr = ELS_CMD_RNID; + ep = (ELS_PKT * )lptr; + ep->un.rnid.Format = RNID_TOPOLOGY_DISC; + + max = 0; + bmptr = 0; +redornid: + outmatp.dfc_flag = 0; + if((rc=fc_rnid_req( binfo, &inmatp, &outmatp, &bmptr, nlp->nlp_Rpi))) { + if(bmptr) + fc_mem_put(binfo, MEM_BPL, (uchar * )bmptr); + + if((rc == ENODEV) && (max < 4)) { + max++; + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_msdelay(p_dev_ctl, 500); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + goto redornid; + } + if(rc == ENODEV) + rc = EACCES; + goto rnidout1; + } + + j = 0; + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_msdelay(p_dev_ctl, 1); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + /* Wait for RNID request to complete or timeout */ + while(outmatp.dfc_flag == 0) { + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_msdelay(p_dev_ctl, 50); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + if(j >= 600) { + outmatp.dfc_flag = -1; + return(ipri); + } + j++; + } + + if(bmptr) + fc_mem_put(binfo, MEM_BPL, (uchar * )bmptr); + + j = (int)((ulong)outmatp.dfc_flag); + if(outmatp.dfc_flag == -1) { + + rc = ETIMEDOUT; + goto rnidout1; + } + + if(outmatp.dfc_flag == -2) { + + rc = EFAULT; + goto rnidout1; + } + + /* copy back response data */ + if(j > 4096) { + rc = ERANGE; + /* RNID Request error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1209, /* ptr to msg structure */ + fc_mes1209, /* ptr to msg */ + fc_msgBlk1209.msgPreambleStr, /* begin varargs */ + (int)((ulong)outmatp.dfc.fc_mptr), + 4096); /* end varargs */ + goto rnidout1; + } + lptr = (uint32 *)outmatp.dfc.virt; + if(*lptr != ELS_CMD_ACC) { + rc = EFAULT; + goto rnidout1; + } + lptr++; + j -= sizeof(uint32); + fc_bcopy((char *)lptr, dm->fc_dataout, j); + + /* copy back size of response */ + dfc_unlock_enable(ipri, &CMD_LOCK); + if (fc_copyout((uchar *)&j, (uchar *)cip->c_arg2, sizeof(int))) { + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + rc = EIO; + goto rnidout1; + } + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + infop->c_outsz = (uint32)((ulong)outmatp.dfc.fc_mptr); + +rnidout1: + buf_info->size = (int)((ulong)outmatp.dfc.fc_mptr); + buf_info->virt = (uint32 * )outmatp.dfc.virt; + buf_info->phys = (uint32 * )outmatp.dfc.phys; + buf_info->flags = (FC_MBUF_DMA | FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + if (outmatp.dfc.dma_handle) { + buf_info->dma_handle = outmatp.dfc.dma_handle; + buf_info->data_handle = outmatp.dfc.data_handle; + } + dfc_unlock_enable(ipri, &CMD_LOCK); + fc_free(p_dev_ctl, buf_info); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + +rnidout2: + buf_info->size = (int)((ulong)inmatp.dfc.fc_mptr); + buf_info->virt = (uint32 * )inmatp.dfc.virt; + buf_info->phys = (uint32 * )inmatp.dfc.phys; + buf_info->flags = (FC_MBUF_DMA | FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + if (inmatp.dfc.dma_handle) { + buf_info->dma_handle = inmatp.dfc.dma_handle; + buf_info->data_handle = inmatp.dfc.data_handle; + } + dfc_unlock_enable(ipri, &CMD_LOCK); + fc_free(p_dev_ctl, buf_info); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + return(ipri); +} + +int +dfc_hba_targetmapping( +fc_dev_ctl_t * p_dev_ctl, +struct dfc_mem *dm, +struct cmd_input *cip, +struct dfccmdinfo *infop, +ulong ipri) +{ + static HBA_FCPTARGETMAPPING * hf; + static HBA_FCPSCSIENTRY *ep; + static uint32 room; + static uint32 total; + static uint32 lunIndex, totalLuns; /* these 2 vars are per target id */ + static uint32 lunId; /* what we get back at lunIndex in virtRptLunData */ + static int memsz; + static char *appPtr; + static NODELIST * nlp; + static node_t * nodep; + static dvi_t * dev_ptr; + static FC_BRD_INFO * binfo; + static uint32 offset; + static uint32 total_mem; + static uint32 j; + static uint32 cnt; + + binfo = &BINFO; + hf = (HBA_FCPTARGETMAPPING *)dm->fc_dataout; + ep = &hf->entry[0]; + room = (uint32)((ulong)cip->c_arg1); + cnt = 0; + total = 0; + memsz = 0; + appPtr = ((char *)infop->c_dataout) + sizeof(ulong); + + /* Mapped ports only */ + nlp = binfo->fc_nlpmap_start; + while(nlp != (NODELIST *)&binfo->fc_nlpmap_start) { + offset = FC_SCSID(nlp->id.nlp_pan, nlp->id.nlp_sid); + if(offset > MAX_FC_TARGETS) { + nlp = (NODELIST *)nlp->nlp_listp_next; + continue; + } + nodep = binfo->device_queue_hash[offset].node_ptr; + if(nodep) + dev_ptr = nodep->lunlist; + else + dev_ptr = 0; + + if((!nodep) || (!dev_ptr)) { + dev_ptr=fc_alloc_devp(p_dev_ctl, offset, 0); + nodep = dev_ptr->nodep; + } + + /* we need to issue REPORT_LUN here in case the device's + * config has changed */ + nodep->rptlunstate = REPORT_LUN_ONGOING; + issue_report_lun(p_dev_ctl, dev_ptr, 0); + + j = 0; + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_msdelay(p_dev_ctl, 1); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + /* Wait for ReportLun request to complete or timeout */ + while(nodep->rptlunstate == REPORT_LUN_ONGOING) { + dfc_unlock_enable(ipri, &CMD_LOCK); + dfc_msdelay(p_dev_ctl, 50); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + if(j >= 600) { + break; + } + j++; + } + if(nodep->rptlunstate == REPORT_LUN_ONGOING) { + break; + } + + lunIndex = 0; + totalLuns = 1; + if (nodep->virtRptLunData) { + uint32 *tmp; + tmp = (uint32*)nodep->virtRptLunData; + totalLuns = SWAP_DATA(*tmp) / 8; + } + + while(lunIndex < totalLuns) { + lunId = dfc_getLunId(nodep, lunIndex); + dev_ptr = fc_find_lun(binfo, offset, lunId); + + if((!dev_ptr) || + ((dev_ptr) && (dev_ptr->opened) && (dev_ptr->queue_state == ACTIVE))) { + if(cnt < room) { + HBA_OSDN *osdn; + HBA_UINT32 fcpLun[2]; + + if(total_mem - memsz < sizeof(HBA_FCPSCSIENTRY)) { + dfc_unlock_enable(ipri, &CMD_LOCK); + fc_copyout((char *)(&hf->entry[0]), appPtr,memsz); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + appPtr = appPtr + memsz; + ep = &hf->entry[0]; + memsz = 0; + } + + fc_bzero((void *)ep->ScsiId.OSDeviceName, 256); + osdn = (HBA_OSDN *)&ep->ScsiId.OSDeviceName[0]; + fc_bcopy("lpfc", osdn->drvname, 4); + osdn->instance = fc_brd_to_inst(binfo->fc_brd_no); + osdn->target = FC_SCSID(nlp->id.nlp_pan, nlp->id.nlp_sid); + osdn->lun = (HBA_UINT32)(lunId); + osdn->flags = 0; + ep->ScsiId.ScsiTargetNumber = + FC_SCSID(nlp->id.nlp_pan, nlp->id.nlp_sid); + ep->ScsiId.ScsiOSLun = (HBA_UINT32)(lunId); + ep->ScsiId.ScsiBusNumber = 0; + ep->FcpId.FcId = nlp->nlp_DID; + fc_bzero((char *)fcpLun, sizeof(HBA_UINT64)); + + fcpLun[0] = (lunId << FC_LUN_SHIFT); + if (nodep->addr_mode == VOLUME_SET_ADDRESSING) { + fcpLun[0] |= SWAP_DATA(0x40000000); + } + fc_bcopy((char *)&fcpLun[0], (char *)&ep->FcpId.FcpLun, sizeof(HBA_UINT64)); + fc_bcopy(&nlp->nlp_portname, (uchar *)&ep->FcpId.PortWWN, sizeof(HBA_WWN)); + fc_bcopy(&nlp->nlp_nodename, (uchar *)&ep->FcpId.NodeWWN, sizeof(HBA_WWN)); + cnt++; + ep++; + memsz = memsz + sizeof(HBA_FCPSCSIENTRY); + } + total++; + } + lunIndex++; + } + nlp = (NODELIST *)nlp->nlp_listp_next; + } + dfc_unlock_enable(ipri, &CMD_LOCK); + fc_copyout((char *)(&hf->entry[0]), appPtr,memsz); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + hf->NumberOfEntries = (HBA_UINT32)total; + dfc_unlock_enable(ipri, &CMD_LOCK); + fc_copyout((char *)(&hf->NumberOfEntries), infop->c_dataout, sizeof(ulong)); + ipri = dfc_disable_lock(FC_LVL, &CMD_LOCK); + + infop->c_outsz = 0; /* no more copy needed */ + if (total > room) { + rc = ERANGE; + do_cp = 1; + } + return(ipri); +} + +int +dfc_data_alloc( +fc_dev_ctl_t * p_dev_ctl, +struct dfc_mem *dm, +uint32 size) +{ + static FC_BRD_INFO * binfo; +#ifndef powerpc + static MBUF_INFO * buf_info; + static MBUF_INFO bufinfo; +#endif + + binfo = &BINFO; + + if(dm->fc_dataout) + return(EACCES); + +#ifdef powerpc + dm->fc_dataout = p_dev_ctl->dfc_kernel_buf; + dm->fc_outsz = size; +#else + size = ((size + 0xfff) & 0xfffff000); + buf_info = &bufinfo; + buf_info->virt = 0; + buf_info->phys = 0; + buf_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = sizeof(void *); + buf_info->size = (int)size; + buf_info->dma_handle = 0; + + fc_malloc(p_dev_ctl, buf_info); + if (buf_info->virt == NULL) { + return(ENOMEM); + } + dm->fc_dataout = buf_info->virt; + dm->fc_outsz = size; + /* dfc_data_alloc */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0402, /* ptr to msg structure */ + fc_mes0402, /* ptr to msg */ + fc_msgBlk0402.msgPreambleStr, /* begin varargs */ + (uint32)((ulong)dm->fc_dataout), + dm->fc_outsz); /* end varargs */ +#endif + + return(0); +} + +int +dfc_data_free( +fc_dev_ctl_t * p_dev_ctl, +struct dfc_mem *dm) +{ + static FC_BRD_INFO * binfo; +#ifndef powerpc + static MBUF_INFO * buf_info; + static MBUF_INFO bufinfo; +#endif + + binfo = &BINFO; + + /* dfc_data_free */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0403, /* ptr to msg structure */ + fc_mes0403, /* ptr to msg */ + fc_msgBlk0403.msgPreambleStr, /* begin varargs */ + (uint32)((ulong)dm->fc_dataout), + dm->fc_outsz); /* end varargs */ + if(dm->fc_dataout == 0) + return(EACCES); + +#ifdef powerpc + dm->fc_dataout = 0; + dm->fc_outsz = 0; +#else + buf_info = &bufinfo; + buf_info->virt = dm->fc_dataout; + buf_info->size = dm->fc_outsz; + buf_info->phys = 0; + buf_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = 0; + buf_info->dma_handle = 0; + fc_free(p_dev_ctl, buf_info); + dm->fc_dataout = 0; + dm->fc_outsz = 0; +#endif + return(0); +} + +DMATCHMAP * +dfc_cmd_data_alloc( +fc_dev_ctl_t * p_dev_ctl, +uchar * indataptr, +ULP_BDE64 * bpl, +uint32 size) +{ + static FC_BRD_INFO * binfo; + static MBUF_INFO * buf_info; + static MBUF_INFO bufinfo; + static DMATCHMAP * mlist; + static DMATCHMAP * mlast; + static DMATCHMAP * dmp; + static int cnt, offset, i; + + binfo = &BINFO; + buf_info = &bufinfo; + mlist = 0; + mlast = 0; + i = 0; + offset = 0; + + while(size) { + + if(size > 4096) + cnt = 4096; + else + cnt = size; + + /* allocate DMATCHMAP buffer header */ + buf_info->virt = 0; + buf_info->phys = 0; + buf_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = (int)sizeof(long); + buf_info->size = (int)sizeof(DMATCHMAP); + buf_info->dma_handle = 0; + + fc_malloc(p_dev_ctl, buf_info); + + if (buf_info->virt == NULL) { + goto out; + } + dmp = buf_info->virt; + dmp->dfc.fc_mptr = 0; + dmp->dfc.virt = 0; + + /* Queue it to a linked list */ + if(mlast == 0) { + mlist = dmp; + mlast = dmp; + } + else { + mlast->dfc.fc_mptr = (uchar *)dmp; + mlast = dmp; + } + dmp->dfc.fc_mptr = 0; + + /* allocate buffer */ + buf_info->virt = 0; + buf_info->phys = 0; + buf_info->flags = (FC_MBUF_DMA | FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = (int)4096; + buf_info->size = (int)cnt; + buf_info->dma_handle = 0; + + fc_malloc(p_dev_ctl, buf_info); + + if (buf_info->phys == NULL) { + goto out; + } + dmp->dfc.virt = buf_info->virt; + if (buf_info->dma_handle) { + dmp->dfc.dma_handle = buf_info->dma_handle; + dmp->dfc.data_handle = buf_info->data_handle; + } + dmp->dfc.phys = (uchar * )buf_info->phys; + dmp->dfc_size = cnt; + + if(indataptr) { + /* Copy data from user space in */ + if (fc_copyin((indataptr+offset), (uchar *)dmp->dfc.virt, (ulong)cnt)) { + goto out; + } + bpl->tus.f.bdeFlags = 0; + fc_mpdata_sync(dmp->dfc.dma_handle, 0, 0, DDI_DMA_SYNC_FORDEV); + } + else { + bpl->tus.f.bdeFlags = BUFF_USE_RCV; + } + + /* build buffer ptr list for IOCB */ + bpl->addrLow = PCIMEM_LONG(putPaddrLow((ulong)dmp->dfc.phys)); + bpl->addrHigh = PCIMEM_LONG(putPaddrHigh((ulong)dmp->dfc.phys)); + bpl->tus.f.bdeSize = (ushort)cnt; + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + bpl++; + + i++; + offset += cnt; + size -= cnt; + } + + mlist->dfc_flag = i; + return(mlist); +out: + dfc_cmd_data_free(p_dev_ctl, mlist); + return(0); +} + +DMATCHMAP * +dfc_fcp_data_alloc( +fc_dev_ctl_t * p_dev_ctl, +ULP_BDE64 * bpl) +{ + static DMATCHMAP * fcpmp; + static fc_buf_t * fcptr; + static FC_BRD_INFO * binfo; + static MBUF_INFO * buf_info; + static MBUF_INFO bufinfo; + + binfo = &BINFO; + buf_info = &bufinfo; + + /* allocate DMATCHMAP buffer header */ + buf_info->virt = 0; + buf_info->phys = 0; + buf_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = (int)sizeof(long); + buf_info->size = (int)sizeof(DMATCHMAP); + buf_info->dma_handle = 0; + + fc_malloc(p_dev_ctl, buf_info); + + if (buf_info->virt == NULL) { + return(0); + } + fcpmp = buf_info->virt; + fc_bzero((char *)fcpmp, sizeof(DMATCHMAP)); + + /* allocate buffer */ + buf_info->virt = 0; + buf_info->phys = 0; + buf_info->flags = (FC_MBUF_DMA | FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = (int)4096; + buf_info->size = (int)4096; + buf_info->dma_handle = 0; + + fc_malloc(p_dev_ctl, buf_info); + + if (buf_info->phys == NULL) { + buf_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->size = (int)sizeof(DMATCHMAP); + buf_info->virt = (uint32 * )fcpmp; + buf_info->phys = (uint32 * )0; + buf_info->dma_handle = 0; + buf_info->data_handle = 0; + fc_free(p_dev_ctl, buf_info); + return(0); + } + fcpmp->dfc.virt = buf_info->virt; + if (buf_info->dma_handle) { + fcpmp->dfc.dma_handle = buf_info->dma_handle; + fcpmp->dfc.data_handle = buf_info->data_handle; + } + fcpmp->dfc.phys = (uchar * )buf_info->phys; + fcpmp->dfc_size = 4096; + fc_bzero((char *)fcpmp->dfc.virt, 4096); + + fcptr = (fc_buf_t *)fcpmp->dfc.virt; + fcptr->phys_adr = (char *)fcpmp->dfc.phys; + + bpl->addrHigh = PCIMEM_LONG((uint32)putPaddrHigh(GET_PAYLOAD_PHYS_ADDR(fcptr))); + bpl->addrLow = PCIMEM_LONG((uint32)putPaddrLow(GET_PAYLOAD_PHYS_ADDR(fcptr))); + bpl->tus.f.bdeSize = sizeof(FCP_CMND); + bpl->tus.f.bdeFlags = BUFF_USE_CMND; + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + bpl++; + bpl->addrHigh = PCIMEM_LONG((uint32)putPaddrHigh(GET_PAYLOAD_PHYS_ADDR(fcptr)+sizeof(FCP_CMND))); + bpl->addrLow = PCIMEM_LONG((uint32)putPaddrLow(GET_PAYLOAD_PHYS_ADDR(fcptr)+sizeof(FCP_CMND))); + bpl->tus.f.bdeSize = sizeof(FCP_RSP); + bpl->tus.f.bdeFlags = (BUFF_USE_CMND | BUFF_USE_RCV); + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + return(fcpmp); +} + +int +dfc_fcp_data_free( +fc_dev_ctl_t * p_dev_ctl, +DMATCHMAP * fcpmp) +{ + static FC_BRD_INFO * binfo; + static MBUF_INFO * buf_info; + static MBUF_INFO bufinfo; + + binfo = &BINFO; + buf_info = &bufinfo; + + if(fcpmp->dfc.virt) { + buf_info->size = fcpmp->dfc_size; + buf_info->virt = (uint32 * )fcpmp->dfc.virt; + buf_info->phys = (uint32 * )fcpmp->dfc.phys; + buf_info->flags = (FC_MBUF_DMA | FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + if (fcpmp->dfc.dma_handle) { + buf_info->dma_handle = fcpmp->dfc.dma_handle; + buf_info->data_handle = fcpmp->dfc.data_handle; + } + fc_free(p_dev_ctl, buf_info); + } + buf_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->size = (int)sizeof(DMATCHMAP); + buf_info->virt = (uint32 * )fcpmp; + buf_info->phys = (uint32 * )0; + buf_info->dma_handle = 0; + buf_info->data_handle = 0; + fc_free(p_dev_ctl, buf_info); + + return(0); +} + +int +dfc_rsp_data_copy( +fc_dev_ctl_t * p_dev_ctl, +uchar * outdataptr, +DMATCHMAP * mlist, +uint32 size) +{ + static FC_BRD_INFO * binfo; + static DMATCHMAP * mlast; + static int cnt, offset; + + binfo = &BINFO; + mlast = 0; + offset = 0; + + while(mlist && size) { + if(size > 4096) + cnt = 4096; + else + cnt = size; + + mlast = mlist; + mlist = (DMATCHMAP *)mlist->dfc.fc_mptr; + + if(outdataptr) { + fc_mpdata_sync(mlast->dfc.dma_handle, 0, 0, DDI_DMA_SYNC_FORKERNEL); + /* Copy data to user space */ + if (fc_copyout((uchar *)mlast->dfc.virt, (outdataptr+offset), (ulong)cnt)) { + return(1); + } + } + offset += cnt; + size -= cnt; + } + return(0); +} + +int +dfc_cmd_data_free( +fc_dev_ctl_t * p_dev_ctl, +DMATCHMAP * mlist) +{ + static FC_BRD_INFO * binfo; + static MBUF_INFO * buf_info; + static MBUF_INFO bufinfo; + static DMATCHMAP * mlast; + + binfo = &BINFO; + buf_info = &bufinfo; + while(mlist) { + mlast = mlist; + mlist = (DMATCHMAP *)mlist->dfc.fc_mptr; + if(mlast->dfc.virt) { + buf_info->size = mlast->dfc_size; + buf_info->virt = (uint32 * )mlast->dfc.virt; + buf_info->phys = (uint32 * )mlast->dfc.phys; + buf_info->flags = (FC_MBUF_DMA | FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + if (mlast->dfc.dma_handle) { + buf_info->dma_handle = mlast->dfc.dma_handle; + buf_info->data_handle = mlast->dfc.data_handle; + } + fc_free(p_dev_ctl, buf_info); + } + buf_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->size = (int)sizeof(DMATCHMAP); + buf_info->virt = (uint32 * )mlast; + buf_info->phys = (uint32 * )0; + buf_info->dma_handle = 0; + buf_info->data_handle = 0; + fc_free(p_dev_ctl, buf_info); + } + return(0); +} + + +_static_ int +dfc_fmw_rev( +fc_dev_ctl_t * p_dev_ctl) +{ + FC_BRD_INFO * binfo; + struct dfc_info * di; + + binfo = &BINFO; + di = &dfc.dfc_info[binfo->fc_brd_no]; + decode_firmware_rev( binfo, &VPD); + fc_bcopy((uchar *)fwrevision, di->fc_ba.a_fwname, 32); + return(0); +} + + +#else /* DFC_SUBSYSTEM */ + +_static_ int +dfc_ioctl( +struct dfccmdinfo *infop, +struct cmd_input *cip) +{ + return (ENODEV); +} + +int +dfc_put_event( +fc_dev_ctl_t * p_dev_ctl, +uint32 evcode, +uint32 evdata0, +void * evdata1, +void * evdata2) +{ + return(0); +} + +int +dfc_hba_put_event( +fc_dev_ctl_t * p_dev_ctl, +uint32 evcode, +uint32 evdata1, +uint32 evdata2, +uint32 evdata3, +uint32 evdata4) +{ + return(0); +} /* End dfc_hba_put_event */ + +_static_ int +dfc_fmw_rev( +fc_dev_ctl_t * p_dev_ctl) +{ + return(0); +} + +#endif /* DFC_SUBSYSTEM */ + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fc.h 999-mjb/drivers/scsi/lpfc/fc.h --- 000-virgin/drivers/scsi/lpfc/fc.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fc.h 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,1264 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#ifndef _H_FC +#define _H_FC + +/* Open Source defines */ +#define DFC_SUBSYSTEM 1 /* Include dfc subsystem */ + +#include "fcdiag.h" +#include "fcdds.h" + +#define LONGW_ALIGN 2 /* longword align for xmalloc */ +#define FC_MAX_SEQUENCE 65536 /* maximum fc sequence size */ +#define FC_MIN_SEQUENCE 0 /* minimum fc sequence size */ +#define FC_MAX_IP_VECS 16 /* Max scatter list for mapping */ +#define RING_TMO_DFT 30 /* default cmd timeout for IOCB rings */ +#define MBOX_TMO_DFT 30 /* dft mailbox timeout for mbox cmds */ +#define FC_CAP_AUTOSENSE 0x0400 /* SCSI capability for autosense */ +#define FC_MAX_HOLD_RSCN 32 /* max number of deferred RSCNs */ +#define FC_MAX_NS_RSP 65536 /* max size NameServer rsp */ + +/* Definitions for Binding Entry Type for fc_parse_binding_entry() */ +#define FC_BIND_WW_NN_PN 0 +#define FC_BIND_DID 1 + +#define FC_DMX_ID 0x100 +#define FL_DMX_ID 0x101 + +/* + * Debug printf event ids. + */ + +/* Check if WWN is 0 */ +#define isWWNzero(wwn) ((wwn.nameType == 0) && (wwn.IEEE[0] == 0) && (wwn.IEEE[1] == 0) && (wwn.IEEE[2] == 0) && (wwn.IEEE[3] == 0) && (wwn.IEEE[4] == 0) && (wwn.IEEE[5] == 0)) + +#define ERRID_NOTICE 0x100 +#define ERRID_ERROR 0x200 +#define ERRID_PANIC 0x400 +#define ERRID_MASK 0xf00 + +#define ERRID_VERBOSE 0x10ff + +/* These are verbose logging masks and debug printf masks */ +#define DBG_ELS 0x1 /* ELS events */ +#define DBG_DISCOVERY 0x2 /* Link discovery events */ +#define DBG_MBOX 0x4 /* Mailbox events */ +#define DBG_INIT 0x8 /* Initialization events */ +#define DBG_LINK_EVENT 0x10 /* link events */ +#define DBG_IP 0x20 /* IP traffic history */ +#define DBG_FCP 0x40 /* FCP traffic history */ +#define DBG_NODE 0x80 /* Node Table events */ +#define DBG_CHK_COND 0x1000 /* FCP Check condition flag */ + +/* These are debug printf masks */ +#define DBG_XRI 0x1000 /* Exchange events */ +#define DBG_IP_DATA 0x2000 /* IP traffic history */ +#define DBG_INTR 0x4000 /* Interrupts */ +#define DBG_IOCB_RSP 0x8000 /* IOCB Response ring events */ +#define DBG_IOCB_RSP_DATA 0x10000 /* IOCB Response ring events */ +#define DBG_IOCB_CMD 0x20000 /* IOCB Command ring events */ +#define DBG_IOCB_CMD_DATA 0x40000 /* IOCB Command ring events */ +#define DBG_FCP_DATA 0x100000/* FCP traffic history */ +#define DBG_ERROR 0x800000/* ERROR events */ + + +/* + * These definitions define SYNTAX errors that occur during the parsing + * of binding config lines. + */ +#define FC_SYNTAX_OK 0 +#define FC_SYNTAX_OK_BUT_NOT_THIS_BRD 1 +#define FC_SYNTAX_ERR_ASC_CONVERT 2 +#define FC_SYNTAX_ERR_EXP_COLON 3 +#define FC_SYNTAX_ERR_EXP_LPFC 4 +#define FC_SYNTAX_ERR_INV_LPFC_NUM 5 +#define FC_SYNTAX_ERR_EXP_T 6 +#define FC_SYNTAX_ERR_INV_TARGET_NUM 7 +#define FC_SYNTAX_ERR_EXP_D 8 +#define FC_SYNTAX_ERR_INV_DEVICE_NUM 9 +#define FC_SYNTAX_ERR_EXP_NULL_TERM 13 + +/*****************************************************************************/ +/* device states */ +/*****************************************************************************/ + +#define CLOSED 0 /* initial device state */ +#define DEAD 1 /* fatal hardware error encountered */ +#define LIMBO 2 /* error recovery period */ +#define OPEN_PENDING 3 /* open initiated */ +#define OPENED 4 /* opened successfully, functioning */ +#define CLOSE_PENDING 5 /* close initiated */ + +#define NORMAL_OPEN 0x0 /* opened in normal mode */ +#define DIAG_OPEN 0x1 /* opened in diagnostics mode */ + +/*****************************************************************************/ +/* This is the board information structure for the fc device */ +/*****************************************************************************/ + +struct fc_q { + uchar *q_first; /* queue first element */ + uchar *q_last; /* queue last element */ + ushort q_cnt; /* current length of queue */ + ushort q_max; /* max length queue can get */ +}; +typedef struct fc_q Q; + +typedef struct fclink { + struct fclink *_f; + struct fclink *_b; +} FCLINK; + +/* +*** fc_enque - enqueue element 'x' after element 'p' in +*** a queue without protection for critical sections. +*/ +#define fc_enque(x,p) {(((FCLINK *)x)->_f = ((FCLINK *)p)->_f, \ + ((FCLINK *)x)->_b = ((FCLINK *)p), \ + ((FCLINK *)p)->_f->_b = ((FCLINK *)x), \ + ((FCLINK *)p)->_f = ((FCLINK *)x));} + +/* +*** fc_deque - dequeue element 'x' (the user must make +*** sure its not the queue header +*/ +#define fc_deque(x) {(((FCLINK *)x)->_b->_f = ((FCLINK *)x)->_f, \ + ((FCLINK *)x)->_f->_b = ((FCLINK *)x)->_b, \ + ((FCLINK *)x)->_b = 0, \ + ((FCLINK *)x)->_f = 0);} + +/* This structure is used when allocating a buffer pool. + */ +typedef struct mbuf_info { + int size; /* Specifies the number of bytes to allocate. */ + int align; /* The desired address boundary. */ + + int flags; +#define FC_MBUF_DMA 0x1 /* blocks are for DMA */ +#define FC_MBUF_PHYSONLY 0x2 /* For malloc - map a given virtual address + * to physical (skip the malloc). For free - + * just unmap the given physical address + * (skip the free). + */ +#define FC_MBUF_IOCTL 0x4 /* called from dfc_ioctl */ +#define FC_MBUF_UNLOCK 0x8 /* called with driver unlocked */ + void * virt; /* specifies the virtual buffer pointer */ + void * phys; /* specifies the physical buffer pointer */ + ulong * data_handle; + ulong * dma_handle; +} MBUF_INFO; + + +struct fc_match { + uchar * fc_mptr; + uchar * virt; /* virtual address ptr */ + uchar * phys; /* mapped address */ + ulong * data_handle; + ulong * dma_handle; +}; +typedef struct fc_match MATCHMAP; + +struct dfc_match { + MATCHMAP dfc; + uint32 dfc_size; + int dfc_flag; +}; +typedef struct dfc_match DMATCHMAP; + +/* Kernel level Event structure */ +struct fcEvent { + uint32 evt_handle; + uint32 evt_mask; + uint32 evt_type; + uint32 evt_data0; + ushort evt_sleep; + ushort evt_flags; + void *evt_next; + void *evt_data1; + void *evt_data2; +}; +typedef struct fcEvent fcEvent; + +/* Define for e_mode */ +#define E_SLEEPING_MODE 0x0001 + +/* Define for e_flag */ +#define E_GET_EVENT_ACTIVE 0x0001 + +/* Kernel level Event Header */ +struct fcEvent_header { + uint32 e_handle; + uint32 e_mask; + ushort e_mode; + ushort e_flag; + fcEvent * e_head; + fcEvent * e_tail; + void * e_next_header; +/* Add something here */ +}; +typedef struct fcEvent_header fcEvent_header; + +/* Structures using for clock / timeout handling */ +typedef struct fcclock { + struct fcclock *cl_fw; /* forward linkage */ + union { + struct { + ushort cl_soft_arg; + ushort cl_soft_cmd; + } c1; + struct fcclock *cl_bw; /* backward linkage */ + } un; + uint32 cl_tix; /* differential number of clock ticks */ + void (*cl_func)(void *, void *, void *); + void * cl_p_dev_ctl; + void * cl_arg1; /* argument 1 to function */ + void * cl_arg2; /* argument 2 to function */ +} FCCLOCK; + +#define cl_bw un.cl_bw + +typedef struct clkhdr { + FCCLOCK *cl_f; + FCCLOCK * cl_b; + uint32 count; /* number of clock blocks in list */ +} CLKHDR; + +#define FC_NUM_GLBL_CLK 4 /* number of global clock blocks */ + +typedef struct fcclock_info { + CLKHDR fc_clkhdr; /* fc_clock queue head */ + uint32 ticks; /* elapsed time since initialization */ + uint32 Tmr_ct; /* Timer expired count */ + uint32 timestamp[2]; /* SMT 64 bit timestamp */ + void * clktimer; /* used for scheduling clock routine */ + Simple_lock clk_slock; /* clock routine lock */ + FCCLOCK clk_block[FC_NUM_GLBL_CLK]; /* global clock blocks */ +} FCCLOCK_INFO; + + +/* Structure used to access adapter rings */ +struct fc_ring { + IOCBQ * fc_iocbhd; /* ptr to head iocb rsp list for ring */ + IOCBQ * fc_iocbtl; /* ptr to tail iocb rsp list for ring */ + uchar fc_numCiocb; /* number of command iocb's per ring */ + uchar fc_numRiocb; /* number of rsp iocb's per ring */ + uchar fc_rspidx; /* current index in response ring */ + uchar fc_cmdidx; /* current index in command ring */ + uchar fc_ringno; /* ring number */ + uchar fc_xmitstate; /* state needed for xmit */ + void * fc_cmdringaddr; /* virtual offset for cmd rings */ + void * fc_rspringaddr; /* virtual offset for rsp rings */ + ushort fc_iotag; /* used to identify I/Os */ + + ushort fc_missbufcnt; /* buf cnt we need to repost */ + ushort fc_wdt_inited; /* timer is inited */ + ushort fc_bufcnt; /* cnt of buffers posted */ + uchar * fc_mpon; /* index ptr for match structure */ + uchar * fc_mpoff; /* index ptr for match structure */ + uchar * fc_binfo; /* ptr to FC_BRD_INFO for ring */ + Q fc_tx; /* iocb command queue */ + Q fc_txp; /* iocb pending queue */ + FCCLOCK * fc_wdt; /* timer for ring activity */ + int fc_ringtmo; /* timer timeout value */ +}; +typedef struct fc_ring RING; + +/* Defines for nlp_state (uchar) */ +#define NLP_UNUSED 0 /* unused NL_PORT entry */ +#define NLP_LIMBO 0x1 /* entry needs to hang around for wwpn / sid */ +#define NLP_LOGOUT 0x2 /* NL_PORT is not logged in - entry is cached */ +#define NLP_PLOGI 0x3 /* PLOGI was sent to NL_PORT */ +#define NLP_LOGIN 0x4 /* NL_PORT is logged in / login REG_LOGINed */ +#define NLP_PRLI 0x5 /* PRLI was sent to NL_PORT */ +#define NLP_ALLOC 0x6 /* NL_PORT is ready to initiate adapter I/O */ +#define NLP_SEED 0x7 /* seed scsi id bind in table */ + +/* Defines for nlp_flag (uint32) */ +#define NLP_RPI_XRI 0x1 /* creating xri for entry */ +#define NLP_REQ_SND 0x2 /* sent ELS request for this entry */ +#define NLP_RM_ENTRY 0x4 /* Remove this entry */ +#define NLP_FARP_SND 0x8 /* sent FARP request for this entry */ +#define NLP_NS_NODE 0x10 /* Authenticated entry by NameServer */ +#define NLP_NODEV_TMO 0x20 /* nodev timeout is running for node */ +#define NLP_REG_INP 0x40 /* Reglogin in progress for node */ +#define NLP_UNREG_LOGO 0x80 /* Perform LOGO after unreglogin */ +#define NLP_RCV_PLOGI 0x100 /* Rcv'ed PLOGI from remote system */ +#define NLP_MAPPED 0x200 /* Node is now mapped */ +#define NLP_UNMAPPED 0x400 /* Node is now unmapped */ +#define NLP_BIND 0x800 /* Node is now bound */ +#define NLP_LIST_MASK 0xe00 /* mask to see what list node is on */ +#define NLP_SND_PLOGI 0x1000 /* Flg to indicate send PLOGI */ +#define NLP_REQ_SND_PRLI 0x2000 /* Send PRLI ELS command */ +#define NLP_REQ_SND_ADISC 0x2000 /* Send ADISC ELS command */ +#define NLP_REQ_SND_PDISC 0x2000 /* Send PDISC ELS command */ +#define NLP_NS_REMOVED 0x4000 /* Node removed from NameServer */ + +/* Defines for nlp_action (uchar) */ +#define NLP_DO_ADDR_AUTH 0x1 /* Authenticating addr for entry */ +#define NLP_DO_DISC_START 0x2 /* start discovery on this entry */ +#define NLP_DO_RSCN 0x4 /* Authenticate entry for by RSCN */ +#define NLP_DO_RNID 0x8 /* Authenticate entry for by RSCN */ +#define NLP_DO_SCSICMD 0x10 /* Authenticate entry for by RSCN */ +#define NLP_DO_CT_USR 0x20 /* Authenticate entry for by RSCN */ +#define NLP_DO_CT_DRVR 0x40 /* Authenticate entry for by RSCN */ + +/* Defines for nlp_type (uchar) */ +#define NLP_FABRIC 0x1 /* this entry represents the Fabric */ +#define NLP_FCP_TARGET 0x2 /* this entry is an FCP target */ +#define NLP_IP_NODE 0x4 /* this entry is an IP node */ +#define NLP_SEED_WWPN 0x10 /* Entry scsi id is seeded for WWPN */ +#define NLP_SEED_WWNN 0x20 /* Entry scsi id is seeded for WWNN */ +#define NLP_SEED_DID 0x40 /* Entry scsi id is seeded for DID */ +#define NLP_SEED_MASK 0x70 /* mask for seeded flags */ +#define NLP_AUTOMAP 0x80 /* Entry was automap'ed */ + +/* Defines for list searchs */ +#define NLP_SEARCH_MAPPED 0x1 /* search mapped */ +#define NLP_SEARCH_UNMAPPED 0x2 /* search unmapped */ +#define NLP_SEARCH_BIND 0x4 /* search bind */ +#define NLP_SEARCH_ALL 0x7 /* search all lists */ + +/* Defines for nlp_fcp_info */ +#define NLP_FCP_2_DEVICE 0x10 /* FCP-2 device */ + +struct nlp_nodeList { /* NOTE: any changes to this structure + * must be dup'ed in fcdds.h, cnode_t. + */ + void * nlp_listp_next; /* Node table ptr bind / map / unmap list */ + void * nlp_listp_prev; /* Node table ptr bind / map / unmap list */ + uchar nlp_state; /* state transition indicator */ + uchar nlp_action; /* Action being performed on node */ + uchar nlp_type; /* node type identifier */ + uchar nlp_alpa; /* SCSI device AL_PA */ + ushort nlp_Rpi; /* login id returned by REG_LOGIN */ + ushort nlp_Xri; /* output exchange id for RPI */ + ushort capabilities; + ushort sync; + uint32 target_scsi_options; + uint32 nlp_flag; /* entry flags */ + uint32 nlp_DID; /* fibre channel D_ID of entry */ + uint32 nlp_time; /* timestamp */ + uint32 nlp_oldDID; + NAME_TYPE nlp_portname; /* port name */ + NAME_TYPE nlp_nodename; /* node name */ + struct { /* device id - for FCP */ + uchar nlp_pan; /* pseudo adapter number */ + uchar nlp_sid; /* scsi id */ + uchar nlp_fcp_info; /* Remote class info */ + uchar nlp_ip_info; /* Remote class info */ + } id; + uchar * nlp_bp; /* save buffer ptr - for IP */ + uchar * nlp_targetp; /* Node table ptr for target */ +}; +typedef struct nlp_nodeList NODELIST; + +/* For now stick fc_lun_t in here, + * should move to fc_os.h eventually. + */ +typedef uint32 fc_lun_t; + +#define mapLun(di) ((di)->lun_id) + +#define NLP_MAXREQ 32 /* max num of outstanding NODELIST requests */ +#define NLP_MAXSID 16 /* max number of scsi devices / adapter */ +#define NLP_MAXPAN 32 /* max number of pseudo adapters */ +#define PA_MASK 0x1f /* mask devno to get pseudo adapter number */ +#define DABS 5 /* convert devno to adapter number bit shift */ +#define FC_MIN_QFULL 1 /* lowest we can decrement throttle + to on qfull */ + +#define FC_SCSID(pan, sid) ((uint32)((pan << 16) | sid)) /* For logging */ + +/* Max number of fibre channel devices supported in network */ +#define NLP_MAXRPI 512 /* firmware supports 512 rpis [0-511] */ + +#define FC_MAXLOOP 126 /* max devices supported on a single fc loop */ +#define FC_MAX_MCAST 16 /* max number of multicast addresses */ +#define MULTI_BIT_MASK (0x01) /* Multicast Bit Mask */ +#define FC_MAX_ADPTMSG (8*28) /* max size of a msg from adapter */ +#define FC_INIT_RING_BUF 12 + +struct fc_networkhdr { + NAME_TYPE fc_destname; /* destination port name */ + NAME_TYPE fc_srcname; /* source port name */ +}; +typedef struct fc_networkhdr NETHDR; + +#define MEM_NLP 0 /* memory segment to hold node list entries */ +#define MEM_IOCB 1 /* memory segment to hold iocb commands */ +#define MEM_CLOCK 1 /* memory segment to hold clock blocks */ +#define MEM_MBOX 2 /* memory segment to hold mailbox cmds */ +#define MEM_BUF 3 /* memory segment to hold buffer data */ +#define MEM_BPL 3 /* and to hold buffer ptr lists - SLI2 */ +#define FC_MAX_SEG 4 + +#define MEM_SEG_MASK 0xff /* mask used to mask off the priority bit */ +#define MEM_PRI 0x100 /* Priority bit: set to exceed low water */ + +#define MIN_CLK_BLKS 256 + +struct fc_memseg { + uchar *fc_memptr; /* ptr to memory blocks */ + uchar *fc_endmemptr; /* ptr to last memory block */ + uchar *fc_memhi; /* highest address in pool */ + uchar *fc_memlo; /* lowest address in pool */ + ushort fc_memsize; /* size of memory blocks */ + ushort fc_numblks; /* number of memory blocks */ + ushort fc_free; /* number of free memory blocks */ + ushort fc_memflag; /* what to do when list is exhausted */ + ushort fc_lowmem; /* low water mark, used w/MEM_PRI flag */ +}; +typedef struct fc_memseg MEMSEG; + +#define FC_MEM_ERR 1 /* return error memflag */ +#define FC_MEM_GETMORE 2 /* get more memory memflag */ +#define FC_MEM_DMA 4 /* blocks are for DMA */ +#define FC_MEM_LOWHIT 8 /* low water mark was hit */ + +#define FC_MEMPAD 16 /* offset used for a FC_MEM_DMA buffer */ + +/* + * Board stat counters + */ +struct fc_stats { + uint32 chipRingFree; + uint32 cmdCreateXri; + uint32 cmdQbuf; + uint32 elsCmdIocbInval; + uint32 elsCmdPktInval; + uint32 elsLogiCol; + uint32 elsRetryExceeded; + uint32 elsStrayXmitCmpl; + uint32 elsXmitCmpl; + uint32 elsXmitErr; + uint32 elsXmitFrame; + uint32 elsXmitRetry; + uint32 elsRcvDrop; + uint32 elsRcvFrame; + uint32 elsRcvRSCN; + uint32 elsRcvFARP; + uint32 elsRcvFARPR; + uint32 elsRcvFLOGI; + uint32 elsRcvPLOGI; + uint32 elsRcvADISC; + uint32 elsRcvPDISC; + uint32 elsRcvFAN; + uint32 elsRcvLOGO; + uint32 elsRcvPRLO; + uint32 elsRcvRRQ; + uint32 frameRcvBcast; + uint32 frameRcvMulti; + uint32 hostRingFree; + uint32 iocbCmdInval; + uint32 iocbRingBusy; + uint32 IssueIocb; + uint32 iocbRsp; + uint32 issueMboxCmd; + uint32 linkEvent; + uint32 xmitnoroom; + uint32 NoIssueIocb; + uint32 mapPageErr; + uint32 mboxCmdBusy; + uint32 mboxCmdInval; + uint32 mboxEvent; + uint32 mboxStatErr; + uint32 memAllocErr; + uint32 noRpiList; + uint32 noVirtPtr; + uint32 ringEvent; + uint32 strayXmitCmpl; + uint32 frameXmitDelay; + uint32 xriCmdCmpl; + uint32 xriStatErr; + uint32 mbufcopy; + uint32 LinkUp; + uint32 LinkDown; + uint32 LinkMultiEvent; + uint32 NoRcvBuf; + uint32 fcpCmd; + uint32 fcpCmpl; + uint32 fcpStrayCmpl; + uint32 fcpFirstCheck; + uint32 fcpGood; + uint32 fcpRspErr; + uint32 fcpRemoteStop; + uint32 fcpLocalErr; + uint32 fcpLocalTmo; + uint32 fcpLocalNores; + uint32 fcpLocalBufShort; + uint32 fcpLocalSfw; + uint32 fcpLocalTxDMA; + uint32 fcpLocalRxDMA; + uint32 fcpLocalinternal; + uint32 fcpLocalCorrupt; + uint32 fcpLocalIllFrm; + uint32 fcpLocalDupFrm; + uint32 fcpLocalLnkCtlFrm; + uint32 fcpLocalLoopOpen; + uint32 fcpLocalInvalRpi; + uint32 fcpLocalLinkDown; + uint32 fcpLocalOOO; + uint32 fcpLocalAbtInp; + uint32 fcpLocalAbtReq; + uint32 fcpLocal; + uint32 fcpPortRjt; + uint32 fcpPortBusy; + uint32 fcpError; + uint32 fcpScsiTmo; + uint32 fcpSense; + uint32 fcpNoDevice; + uint32 fcMallocCnt; + uint32 fcMallocByte; + uint32 fcFreeCnt; + uint32 fcFreeByte; + uint32 fcMapCnt; + uint32 fcUnMapCnt; + uint32 fcpRsvd0; + uint32 fcpRsvd1; + uint32 fcpRsvd2; + uint32 fcpRsvd3; + uint32 fcpRsvd4; + uint32 fcpRsvd5; + uint32 fcpRsvd6; + uint32 fcpRsvd7; + uint32 fcpRsvd8; +}; +typedef struct fc_stats fc_stat_t; + + +/* Defines / Structures used to support IP profile */ + +#define FC_MIN_MTU 0 /* minimum size FC message */ +#define FC_MAX_MTU 65280 /* maximum size FC message */ + +/* structure for MAC header */ +typedef struct { + uchar dest_addr[MACADDR_LEN]; /* 48 bit unique address */ + uchar src_addr[MACADDR_LEN]; /* 48 bit unique address */ + ushort llc_len; /* length of LLC data */ +} emac_t; +#define HDR_LEN 14 /* MAC header size */ + +/* structure for LLC/SNAP header */ +typedef struct { + unsigned char dsap; /* DSAP */ + unsigned char ssap; /* SSAP */ + unsigned char ctrl; /* control field */ + unsigned char prot_id[3]; /* protocol id */ + unsigned short type; /* type field */ +} snaphdr_t; + +struct fc_hdr { + emac_t mac; + snaphdr_t llc; +}; + +struct fc_nethdr { + NETHDR fcnet; + snaphdr_t llc; +}; + +#define FC_LLC_SSAP 0xaa /* specifies LLC SNAP header */ +#define FC_LLC_DSAP 0xaa /* specifies LLC SNAP header */ +#define FC_LLC_CTRL 3 /* UI */ + + +/* + * The fc_buf structure is used to communicate SCSI commands to the adapter + */ +typedef struct sc_buf T_SCSIBUF; +#define SET_ADAPTER_STATUS(bp, val) bp->general_card_status = val; + +#define P_DEPTH ((FC_MAX_TRANSFER/PAGESIZE) + 2) + +typedef struct fc_buf { + FCP_CMND fcp_cmd; /* FCP command - This MUST be first */ + FCP_RSP fcp_rsp; /* FCP response - This MUST be next */ + struct fc_buf *fc_fwd; /* forward list pointer */ + struct fc_buf *fc_bkwd; /* backward list pointer */ + char *phys_adr; /* physical address of this fc_buf */ + T_SCSIBUF *sc_bufp; /* pointer to sc_buf for this cmd */ + struct dev_info *dev_ptr; /* pointer to SCSI device structure */ + uint32 timeout; /* Fill in how OS represents a time stamp */ + /* Fill in any OS specific members */ + int offset; + ulong * fc_cmd_dma_handle; + ushort iotag; /* iotag for this cmd */ + ushort flags; /* flags for this cmd */ +#define DATA_MAPPED 0x0001 /* data buffer has been D_MAPed */ +#define FCBUF_ABTS 0x0002 /* ABTS has been sent for this cmd */ +#define FCBUF_ABTS2 0x0004 /* ABTS has been sent twice */ +#define FCBUF_INTERNAL 0x0008 /* Internal generated driver command */ + + /* + * Save the buffer pointer list for later use. + * In SLI2, the fc_deq_fcbuf_active uses this pointer to + * free up MEM_BPL buffer + */ + MATCHMAP *bmp; +} fc_buf_t; + +#define FCP_CONTINUE 0x01 /* flag for issue_fcp_cmd */ +#define FCP_REQUEUE 0x02 /* flag for issue_fcp_cmd */ +#define FCP_EXIT 0x04 /* flag for issue_fcp_cmd */ + +/* + * The fcp_table structure is used to relate FCP iotags to an fc_buf + */ + +typedef struct fcp_table { + fc_buf_t *fcp_array[MAX_FCP_CMDS];/* fc_buf pointers indexed by iotag */ +} FCPTBL; + + +/* + * SCSI node structure for each open Fibre Channel node + */ + +typedef struct scsi_node { + struct fc_dev_ctl * ap; /* adapter structure ptr */ + struct dev_info * lunlist; /* LUN structure list for this node */ + NODELIST * nlp; /* nlp structure ptr */ + struct dev_info * last_dev; /* The last device had an I/O */ + FCCLOCK * nodev_tmr; /* Timer for nodev-tmo */ + int devno; /* pseudo adapter major/minor number */ + int max_lun; /* max number of luns */ + ushort tgt_queue_depth; /* Max throttle of this node */ + ushort num_active_io; /* Total number of active I/O */ + ushort rpi; /* Device rpi */ + ushort last_good_rpi; /* Last known good device rpi */ + ushort scsi_id; /* SCSI ID of this device */ + ushort flags; +#define FC_NODEV_TMO 0x1 /* nodev-tmo tmr started and expired */ +#define FC_FCP2_RECOVERY 0x2 /* set FCP2 Recovery for commands */ +#define RETRY_RPTLUN 0x4 /* Report Lun has been retried */ + ushort addr_mode; /* SCSI address method */ +#define PERIPHERAL_DEVICE_ADDRESSING 0 +#define VOLUME_SET_ADDRESSING 1 +#define LOGICAL_UNIT_ADDRESSING 2 + ushort rptlunstate; /* For report lun SCSI command */ +#define REPORT_LUN_REQUIRED 0 +#define REPORT_LUN_ONGOING 1 +#define REPORT_LUN_COMPLETE 2 + void *virtRptLunData; + void *physRptLunData; +} node_t; + +/* Values for node_flag and fcp_mapping are in fcdds.h */ + +/* + * SCSI device structure for each open LUN + */ + +#define MAX_FCBUF_PAGES 6 /* This value may need to change when + * lun-queue-depth > 256 in lpfc.conf + */ + +typedef struct dev_info { + node_t *nodep; /* Pointer to the node structure */ + struct dev_info *next; /* Used for list of LUNs on this node */ + fc_lun_t lun_id; /* LUN ID of this device */ + uchar first_check; /* flag for first check condition */ +#define FIRST_CHECK_COND 0x1 +#define FIRST_IO 0x2 + + uchar opened; + uchar ioctl_wakeup; /* wakeup sleeping ioctl call */ + int ioctl_event; + int ioctl_errno; + int stop_event; + int active_io_count; + + struct dev_info *DEVICE_WAITING_fwd; + struct dev_info *ABORT_BDR_fwd; + struct dev_info *ABORT_BDR_bkwd; + + long qfullcnt; + /* Fill in any OS specific members */ + T_SCSIBUF *scp; + void *scsi_dev; + long scpcnt; + long qcmdcnt; + long iodonecnt; + long errorcnt; + /* + * A command lives in a pending queue until it is sent to the HBA. + * Throttling constraints apply: + * No more than N commands total to a single target + * No more than M commands total to a single LUN on that target + * + * A command that has left the pending queue and been sent to the HBA + * is an "underway" command. We count underway commands, per-LUN, + * to obey the LUN throttling constraint. + * + * Because we only allocate enough fc_buf_t structures to handle N + * commands, per target, we implicitly obey the target throttling + * constraint by being unable to send a command when we run out of + * free fc_buf_t structures. + * + * We count the number of pending commands to determine whether the + * target has I/O to be issued at all. + * + * We use next_pending to rotor through the LUNs, issuing one I/O at + * a time for each LUN. This mechanism guarantees a fair distribution + * of I/Os across LUNs in the face of a target queue_depth lower than + * #LUNs*fcp_lun_queue_depth. + */ + T_SCSIBUF *standby_queue_head; /* ptr to retry command queue */ + T_SCSIBUF *standby_queue_tail; /* ptr to retry command queue */ + uint32 standby_count; /* # of I/Os on standby queue */ + /* END: added by andy kong for SCSI */ + + ushort fcp_cur_queue_depth; /* Current maximum # cmds outstanding + * to dev; */ + ushort fcp_lun_queue_depth; /* maximum # cmds to each lun */ + T_SCSIBUF *pend_head; /* ptr to pending cmd queue */ + T_SCSIBUF *pend_tail; /* ptr to pending cmd queue */ + uint32 pend_count; +#define QUEUE_HEAD 1 +#define QUEUE_TAIL 0 + struct buf *clear_head; /* ptr to bufs to iodone after clear */ + uint32 clear_count; + + uchar numfcbufs; /* number of free fc_bufs */ + uchar stop_send_io; /* stop sending any io to this dev */ + + +#define ACTIVE 0 +#define STOPPING 1 +#define HALTED 2 +#define RESTART_WHEN_READY 3 +#define ACTIVE_PASSTHRU 4 +#define WAIT_RESUME 8 +#define WAIT_INFO 10 +#define WAIT_ACA 11 +#define WAIT_FLUSH 12 +#define WAIT_HEAD_RESUME 13 + uchar queue_state; /* device general queue state */ + /* ACTIVE, STOPPING, or HALTED */ + +#define SCSI_TQ_HALTED 0x0001 /* The transaction Q is halted */ +#define SCSI_TQ_CLEARING 0x0002 /* The transaction Q is clearing */ +#define SCSI_TQ_CLEAR_ACA 0x0004 /* a CLEAR_ACA is PENDING */ +#define SCSI_LUN_RESET 0x0008 /* sent LUN_RESET not of TARGET_RESET */ +#define SCSI_ABORT_TSET 0x0010 /* BDR requested but not yet sent */ +#define SCSI_TARGET_RESET 0x0020 /* a SCSI BDR is active for device */ +#define CHK_SCSI_ABDR 0x0038 /* value used to check tm flags */ +#define QUEUED_FOR_ABDR 0x0040 /* dev_ptr is on ABORT_BDR queue */ +#define NORPI_RESET_DONE 0x0100 /* BOGUS_RPI Bus Reset attempted */ +#define DONT_LOG_INVALID_RPI 0x0200 /* if flag is set, the I/O issuing */ + /* to an invalid RPI won't be logged */ +#define SCSI_IOCTL_INPROGRESS 0x0400 /* An ioctl is in progress */ +#define SCSI_SEND_INQUIRY_SN 0x1000 /* Serial number inq should be sent */ +#define SCSI_INQUIRY_SN 0x2000 /* Serial number inq has been sent */ +#define SCSI_INQUIRY_P0 0x4000 /* Page 0 inq has been sent */ +#define SCSI_INQUIRY_CMD 0x6000 /* Serial number or Page 0 inq sent */ +#define SCSI_DEV_RESET 0x8000 /* device is in process of resetting */ + ushort flags; /* flags for the drive */ + + struct dio vlist; /* virtual address of fc_bufs */ + struct dio blist; /* physical addresses of fc_bufs */ + fc_buf_t * fcbuf_head; /* head ptr to list of free fc_bufs */ + fc_buf_t * fcbuf_tail; /* tail ptr to list of free fc_bufs */ + + uchar sense[MAX_FCP_SNS]; /* Temporary request sense buffer */ + uchar sense_valid; /* flag to indicate new sense data */ + uchar sizeSN; /* size of InquirySN */ + uint32 sense_length; /* new sense data length */ + +#define MAX_QFULL_RETRIES 255 +#define MAX_QFULL_RETRY_INTERVAL 1000 /* 1000 (ms) */ + short qfull_retries; /* number of retries on a qfull condition */ + short qfull_retry_interval; /* the interval for qfull retry */ + void * qfull_tmo_id; + T_SCSIBUF scbuf; /* sc_buf for task management cmds */ + +} dvi_t; + + +typedef struct node_info_hash { + node_t *node_ptr; /* SCSI device node pointer */ + uint32 node_flag; /* match node on WWPN WWNN or DID */ + union { + NAME_TYPE dev_nodename; /* SCSI node name */ + NAME_TYPE dev_portname; /* SCSI port name */ + uint32 dev_did; /* SCSI did */ + } un; +} nodeh_t; + +/* + * LONGWAIT is used to define a default scsi_timeout value in seconds. + */ +#define LONGWAIT 30 + + +/* +*** Board Information Data Structure +*/ + +struct fc_brd_info { + /* Configuration Parameters */ + int fc_ffnumrings; /* number of FF rings being used */ + NAME_TYPE fc_nodename; /* fc nodename */ + NAME_TYPE fc_portname; /* fc portname */ + uint32 fc_pref_DID; /* preferred D_ID */ + uchar fc_pref_ALPA; /* preferred AL_PA */ + uchar fc_deferip; /* defer IP processing */ + uchar fc_nummask[4]; /* number of masks/rings being used */ + uchar fc_rval[6]; /* rctl for ring assume mask is 0xff */ + uchar fc_tval[6]; /* type for ring assume mask is 0xff */ + uchar ipAddr[16]; /* For RNID support */ + ushort ipVersion; /* For RNID support */ + ushort UDPport; /* For RNID support */ + uint32 fc_edtov; /* E_D_TOV timer value */ + uint32 fc_arbtov; /* ARB_TOV timer value */ + uint32 fc_ratov; /* R_A_TOV timer value */ + uint32 fc_rttov; /* R_T_TOV timer value */ + uint32 fc_altov; /* AL_TOV timer value */ + uint32 fc_crtov; /* C_R_TOV timer value */ + uint32 fc_citov; /* C_I_TOV timer value */ + uint32 fc_myDID; /* fibre channel S_ID */ + uint32 fc_prevDID; /* previous fibre channel S_ID */ + + /* The next three structures get DMA'ed directly into, + * so they must be in the first page of the adapter structure! + */ + volatile SERV_PARM fc_sparam; /* buffer for our service parameters */ + volatile SERV_PARM fc_fabparam; /* fabric service parameters buffer */ + volatile uchar alpa_map[128]; /* AL_PA map from READ_LA */ + + uchar fc_mbox_active; /* flag for mailbox in use */ + uchar fc_process_LA; /* flag to process Link Attention */ + uchar fc_ns_retry; /* retries for fabric nameserver */ + uchar fc_sli; /* configured SLI, 1 or 2 */ + int fc_nlp_cnt; /* cnt outstanding NODELIST requests */ + int fc_open_count; /* count of devices opened */ + int fc_rscn_id_cnt; /* count of RSCNs dids in list */ + uint32 fc_rscn_id_list[FC_MAX_HOLD_RSCN]; + Q fc_plogi; /* ELS PLOGI cmd queue */ + Q fc_mbox; /* mailbox cmd queue */ + Q fc_rscn; /* RSCN cmd queue */ + Q fc_defer_rscn; /* deferred RSCN cmd queue */ + uchar * fc_mbbp; /* buffer pointer for mbox command */ + uchar * fc_p_dev_ctl; /* pointer to driver device ctl */ + + /* Board dependent variables */ + int fc_flag; /* FC flags */ + int fc_brd_no; /* FC board number */ + int fc_ints_disabled; /* DEBUG: interrupts disabled */ + volatile int fc_ffstate; /* Current state of FF init process */ + int fc_interrupts; /* number of fc interrupts */ + int fc_cnt; /* generic counter for board */ + int fc_topology; /* link topology, from LINK INIT */ + int fc_firstopen; /* First open to driver flag */ + int fc_msgidx; /* current index to adapter msg buf */ + uint32 fc_eventTag; /* event tag for link attention */ + ulong fc_fabrictmo; /* timeout for fabric timer */ + uchar fc_multi; /* number of multicast addresses */ + uchar fc_linkspeed; /* Link speed after last READ_LA */ + uchar fc_max_data_rate; /* max_data_rate */ + + void * physaddr[FC_MAX_IP_VECS]; /* used in mbuf_to_iocb for */ + uint32 cntaddr[FC_MAX_IP_VECS]; /* phys mapping */ + + uchar fc_busflag; /* bus access flags */ +#define FC_HOSTPTR 2 /* Default is ring pointers in SLIM */ + + volatile uint32 * fc_mboxaddr; /* virtual offset for mailbox/SLIM */ + volatile uint32 fc_BCregaddr; /* virtual offset for BIU config reg */ + volatile uint32 fc_HAregaddr; /* virtual offset for host attn reg */ + volatile uint32 fc_HCregaddr; /* virtual offset for host ctl reg */ + volatile uint32 fc_FFregaddr; /* virtual offset for FF attn reg */ + volatile uint32 fc_STATregaddr; /* virtual offset for status reg */ + + + MATCHMAP fc_slim2; /* pointers to slim for SLI-2 */ + + void *fc_iomap_io; /* starting address for registers */ + void *fc_iomap_mem; /* starting address for SLIM */ + /* Fill in any OS specific members */ + /* dma handle, mem map, pci config access */ + + + + + + FCCLOCK * fc_mbox_wdt; /* timer for mailbox */ + FCCLOCK * fc_fabric_wdt; /* timer for fabric */ + FCCLOCK * fc_rscn_disc_wdt; /* timer for RSCN discovery */ + fc_stat_t fc_stats; /* fc driver generic statistics */ + + NAME_TYPE fc_multiaddr[FC_MAX_MCAST];/* multicast adrs for interface */ + NODELIST * fc_nlpbind_start; /* ptr to bind list */ + NODELIST * fc_nlpbind_end; /* ptr to bind list */ + NODELIST * fc_nlpunmap_start; /* ptr to unmap list */ + NODELIST * fc_nlpunmap_end; /* ptr to unmap list */ + NODELIST * fc_nlpmap_start; /* ptr to map list */ + NODELIST * fc_nlpmap_end; /* ptr to map list */ + ushort fc_bind_cnt; + ushort fc_unmap_cnt; + ushort fc_map_cnt; + ushort fc_rpi_used; + NODELIST * fc_nlplookup[NLP_MAXRPI]; /* ptr to active D_ID / RPIs */ + NODELIST fc_fcpnodev; /* nodelist entry for no device */ + uint32 nlptimer; /* timestamp for nlplist entry */ + ushort fc_capabilities; /* default value for NODELIST caps */ + ushort fc_sync; /* default value for NODELIST sync */ + + nodeh_t device_queue_hash[MAX_FC_TARGETS]; /* SCSI node pointers */ + FCPTBL * fc_table; /* FCP iotag table pointer */ + IOCBQ * fc_delayxmit; /* List of IOCBs for delayed xmit */ + + + char fc_adaptermsg[FC_MAX_ADPTMSG]; /* adapter printf messages */ + char fc_SerialNumber[32]; /* adapter Serial Number */ + char fc_OptionROMVersion[32]; /* adapter BIOS / Fcode version */ + MEMSEG fc_memseg[FC_MAX_SEG]; /* memory for buffers / structures */ + RING fc_ring[MAX_RINGS]; +}; + +typedef struct fc_brd_info FC_BRD_INFO; + + +/* Host Attn reg */ +#define FC_HA_REG(binfo,sa) ((volatile uint32 *)((volatile char *)sa + (binfo->fc_HAregaddr))) +#define FC_FF_REG(binfo,sa) ((volatile uint32 *)((volatile char *)sa + (binfo->fc_FFregaddr))) + +/* Host Status reg */ +#define FC_STAT_REG(binfo,sa) ((volatile uint32 *)((volatile char *)sa +(binfo->fc_STATregaddr))) + +/* Host Cntl reg */ +#define FC_HC_REG(binfo,sa) ((volatile uint32 *)((volatile char *)sa + (binfo->fc_HCregaddr))) + +/* BIU Configuration reg */ +#define FC_BC_REG(binfo,sa) ((volatile uint32 *)((volatile char *)sa + (binfo->fc_BCregaddr))) + +/* SLIM defines for SLI-1 */ +#define FC_MAILBOX(binfo,sa) ((MAILBOX *)((volatile char *)sa + ((uint32)((ulong)binfo->fc_mboxaddr)))) + +/* SLIM defines for SLI-2 */ +#define FC_SLI2_MAILBOX(binfo) ((MAILBOX *)(binfo->fc_mboxaddr)) + +#define FC_IOCB(binfo,sa) ((volatile uchar *)((volatile char *)sa + ((uint32)binfo->fc_mboxaddr + 0x100))) + +#define FC_RING(ringoff,sa) ((volatile uchar *)((volatile char *)sa + (ulong)(ringoff))) + + + +/* Write 32-bit value to CSR register pointed to by regp */ +#define WRITE_CSR_REG(binfo, regp, val) fc_writel((uint32 *)(regp), (uint32)val) + +/* Write 32-bit value to SLIM address pointed to by regp */ +#define WRITE_SLIM_ADDR(binfo, regp, val) fc_writel((uint32 *)(regp), (uint32)val) + +/* Read 32-bit value from CSR register pointed to by regp */ +#define READ_CSR_REG(binfo, regp) fc_readl((uint32 *)(regp)) + +/* Read 32-bit value from SLIM address pointed to by regp */ +#define READ_SLIM_ADDR(binfo, regp) fc_readl((uint32 *)(regp)) + +/* Write wcnt 32-bit words to SLIM address pointed to by slimp */ +#define WRITE_SLIM_COPY(binfo, bufp, slimp, wcnt) \ + fc_write_toio((uint32*)bufp, (uint32*)slimp, (sizeof(uint32)*(wcnt))) + +/* Read wcnt 32-bit words from SLIM address pointed to by slimp */ +#define READ_SLIM_COPY(binfo, bufp, slimp, wcnt) \ + fc_read_fromio((uint32*)slimp, (uint32*)bufp, (sizeof(uint32)*(wcnt)));\ + +#define WRITE_FLASH_COPY(binfo, bufp, flashp, wcnt) \ + fc_write_toio(bufp, flashp ,(sizeof(uint32)*(wcnt))) + +#define READ_FLASH_COPY(binfo, bufp, flashp, wcnt) \ + fc_read_fromio(flashp, bufp, (sizeof(uint32)*(wcnt))) + + + + + +/* defines for fc_open_count */ +#define FC_LAN_OPEN 0x1 /* LAN open completed */ +#define FC_FCP_OPEN 0x2 /* FCP open completed */ + +/* defines for fc_flag */ +#define FC_FCP_WWNN 0x0 /* Match FCP targets on WWNN */ +#define FC_FCP_WWPN 0x1 /* Match FCP targets on WWPN */ +#define FC_FCP_DID 0x2 /* Match FCP targets on DID */ +#define FC_FCP_MATCH 0x3 /* Mask for match FCP targets */ +#define FC_PENDING_RING0 0x4 /* Defer ring 0 IOCB processing */ +#define FC_LNK_DOWN 0x8 /* Link is down */ +#define FC_PT2PT 0x10 /* pt2pt with no fabric */ +#define FC_PT2PT_PLOGI 0x20 /* pt2pt initiate PLOGI */ +#define FC_DELAY_DISC 0x40 /* Delay discovery till after cfglnk */ +#define FC_PUBLIC_LOOP 0x80 /* Public loop */ +#define FC_INTR_THREAD 0x100 /* In interrupt code */ +#define FC_LBIT 0x200 /* LOGIN bit in loopinit set */ +#define FC_RSCN_MODE 0x400 /* RSCN cmd rcv'ed */ +#define FC_RSCN_DISC_TMR 0x800 /* wait edtov before processing RSCN */ +#define FC_NLP_MORE 0x1000 /* More node to process in node tbl */ +#define FC_OFFLINE_MODE 0x2000 /* Interface is offline for diag */ +#define FC_LD_TIMER 0x4000 /* Linkdown timer has been started */ +#define FC_LD_TIMEOUT 0x8000 /* Linkdown timeout has occurred */ +#define FC_FABRIC 0x10000 /* We are fabric attached */ +#define FC_DELAY_PLOGI 0x20000 /* Delay login till unreglogin */ +#define FC_SLI2 0x40000 /* SLI-2 CONFIG_PORT cmd completed */ +#define FC_INTR_WORK 0x80000 /* Was there work last intr */ +#define FC_NO_ROOM_IP 0x100000 /* No room on IP xmit queue */ +#define FC_NO_RCV_BUF 0x200000 /* No Rcv Buffers posted IP ring */ +#define FC_BUS_RESET 0x400000 /* SCSI BUS RESET */ +#define FC_ESTABLISH_LINK 0x800000 /* Reestablish Link */ +#define FC_SCSI_RLIP 0x1000000 /* SCSI rlip routine called */ +#define FC_DELAY_NSLOGI 0x2000000 /* Delay NameServer till ureglogin */ +#define FC_NSLOGI_TMR 0x4000000 /* NameServer in process of logout */ +#define FC_DELAY_RSCN 0x8000000 /* Delay RSCN till ureg/reg login */ +#define FC_RSCN_DISCOVERY 0x10000000 /* Authenticate all devices after RSCN */ +#define FC_2G_CAPABLE 0x20000000 /* HBA is 2 Gig capable */ +#define FC_POLL_MODE 0x40000000 /* [SYNC] I/O is in the polling mode */ +#define FC_BYPASSED_MODE 0x80000000 /* Interface is offline for diag */ + +/* defines for fc_ffstate */ +#define FC_INIT_START 1 +#define FC_INIT_NVPARAMS 2 +#define FC_INIT_REV 3 +#define FC_INIT_PARTSLIM 4 +#define FC_INIT_CFGRING 5 +#define FC_INIT_INITLINK 6 +#define FC_LINK_DOWN 7 +#define FC_LINK_UP 8 +#define FC_INIT_SPARAM 9 +#define FC_CFG_LINK 10 +#define FC_FLOGI 11 +#define FC_LOOP_DISC 12 +#define FC_NS_REG 13 +#define FC_NS_QRY 14 +#define FC_NODE_DISC 15 +#define FC_REG_LOGIN 16 +#define FC_CLEAR_LA 17 +#define FC_READY 32 +#define FC_ERROR 0xff + +#define NADDR_LEN 6 /* MAC network address length */ + +/* This should correspond with the HBA API event structure */ +struct fc_hba_event { + uint32 fc_eventcode; + uint32 fc_evdata1; + uint32 fc_evdata2; + uint32 fc_evdata3; + uint32 fc_evdata4; +}; + +typedef struct fc_hba_event HBAEVENT; +#define MAX_HBAEVENT 32 + +/***************************************************************************/ +/* + * This is the whole device control area for the adapter + */ +/***************************************************************************/ + +struct fc_dev_ctl { /* NOTE: struct intr must be FIRST */ + struct intr ihs; /* interrupt handler control struct */ + ndd_t ndd; /* ndd for NS ndd chain */ + struct fc_dev_ctl *next; /* point to the next device */ + uchar phys_addr[NADDR_LEN]; /* actual network address in use */ + Simple_lock cmd_slock; /* adapter command lock */ + void * ctl_correlator;/* point to the dd_ctl table */ + uchar device_state; /* main state of the device */ + uchar open_state; /* open state of the device */ + uchar intr_inited; /* flag for interrupt registration */ + uchar fcp_mapping; /* Map FCP devices based on WWNN WWPN or DID */ + ulong fc_ipri; /* save priority */ + int power_up; + uint32 dev_flag; /* device flags */ +#define FC_SCHED_CFG_INIT 2 /* schedule a call to fc_cfg_init() */ +#define FC_FULL_INFO_CALL 4 /* set if fc_info() can return full info */ +#define FC_NEEDS_DPC 0x10 + + uchar * devinfo; /* point to the device info */ + uchar * dip; /* point to device information */ + uchar * tran; /* point to device information */ + FCCLOCK * fc_estabtmo; /* link establishment timer */ + FCCLOCK * fc_waitflogi; /* link establishment timer */ + fc_dds_t dds; /* device dependent structure */ + fc_vpd_t vpd; /* vital product data */ + FC_BRD_INFO info; /* device specific info */ + uchar * mbufl_head; /* mbuf for offlevel intr handler */ + uchar * mbufl_tail; /* mbuf for offlevel intr handler */ + void * fc_evt_head; /* waiting for event queue */ + void * fc_evt_tail; /* waiting for event queue */ + + dvi_t * DEVICE_WAITING_head; + dvi_t * DEVICE_WAITING_tail; + dvi_t * ABORT_BDR_head; + dvi_t * ABORT_BDR_tail; + struct buf * timeout_head; /* bufs to iodone after RLIP done */ + + ushort timeout_count; + ushort init_eventTag; /* initial READ_LA eventtag from cfg */ + ushort hba_event_put; /* hbaevent event put word anchor */ + ushort hba_event_get; /* hbaevent event get word anchor */ + int hba_event_missed;/* hbaevent missed event word anchor */ + uchar pan_cnt; /* pseudo adapter number counter */ + uchar sid_cnt; /* SCSI ID counter */ + uchar adapter_state[NLP_MAXPAN]; + /* open/close state for pseudo adapters */ + + Simple_lock iostrat_lock; /* lock for ioctl IOSTRAT */ + int iostrat_event; /* iostrat event word anchor */ + struct buf * iostrat_head; /* head ptr to list of returned bufs */ + struct buf * iostrat_tail; /* tail ptr to list of returned bufs */ + HBAEVENT hbaevent[MAX_HBAEVENT]; + uint32 vendor_flag; + uint32 dfcmb[MAILBOX_CMD_WSIZE]; + /* Fill in any OS specific members */ + struct Scsi_Host *host; + struct pci_dev *pcidev; + struct buf *iodone_head; + struct buf *iodone_list; + void *dfc_kernel_buf; + void *abort_head; + void *abort_list; + void *rdev_head; + void *rdev_list; + void *rbus_head; + void *rbus_list; + void *rhst_head; + void *rhst_list; + void *qcmd_head; + void *qcmd_list; + void *qclk_head; + void *qclk_list; + uint32 dpc_ha_copy; /* copy of Host Attention Reg for DPC */ + uint32 dpc_hstatus; /* copy of Host Status Reg for DPC */ + uint32 dpc_cnt; + uint32 save_dpc_cnt; + ulong iflg; + ulong siflg; + WAIT_QUEUE linkwq; + WAIT_QUEUE rscnwq; + WAIT_QUEUE ctwq; +}; + +typedef struct fc_dev_ctl fc_dev_ctl_t; + + +/***************************************************************************/ +/* + * This is the global device driver control structure + */ +/***************************************************************************/ + +struct fc_dd_ctl { + FCCLOCK_INFO fc_clock_info; /* clock setup */ + FCCLOCK * fc_scsitmo; /* scsi timeout timer */ + fc_dev_ctl_t * p_dev[MAX_FC_BRDS]; /* device array */ + void * p_config[MAX_FC_BRDS]; + ushort num_devs; /* count of devices configed */ + + spinlock_t smp_lock; /* keep this at end */ +}; + +typedef struct fc_dd_ctl fc_dd_ctl_t; + +/* + * Macros for accessing device control area. The pointer to this area has to + * be named p_dev_ctl for using these macros. + */ + +#define DD_CTL fc_dd_ctl +#define CMD_LOCK p_dev_ctl->cmd_slock +#define IOCTL_SLP_LOCK ioctl_slp_lock +#define CLOCK_LOCK clock_info->clk_slock +#define IOSTRAT_LOCK p_dev_ctl->iostrat_lock +#define SCSI_TMO DD_CTL.fc_scsitmo +#define CLOCKWDT clock_info->clktimer + +#define IHS p_dev_ctl->ihs +#define NDD p_dev_ctl->ndd +#define NDDSTAT p_dev_ctl->ndd.ndd_genstats +#define VPD p_dev_ctl->vpd +#define DDS p_dev_ctl->dds +#define BINFO p_dev_ctl->info +#define RINGTMO rp->fc_wdt +#define MBOXTMO binfo->fc_mbox_wdt +#define FABRICTMO binfo->fc_fabric_wdt +#define FCSTATCTR binfo->fc_stats + +/* + * Lock class registration number for lock instrumentation. + * These numbers should be unique on the system and they should be + * controlled by the lock registration procedure set up for the lock + * instrumentations. + */ +#define FC_CMD_LOCK 47 +#define FC_IOSTRAT_LOCK 48 +#define FC_CFG_LOCK 49 +#define FC_CLOCK_LOCK 50 +#define FC_IOCTL_SLP_LOCK 51 + +#ifndef LITTLE_ENDIAN_HOST +#if defined(i386) +#define LITTLE_ENDIAN_HOST 1 +#endif + +#endif +#if LITTLE_ENDIAN_HOST +#define SWAP_SHORT(x) (x) +#define SWAP_LONG(x) (x) +#define SWAP_DATA(x) ((((x) & 0xFF)<<24) | (((x) & 0xFF00)<<8) | \ + (((x) & 0xFF0000)>>8) | (((x) & 0xFF000000)>>24)) +#define SWAP_DATA16(x) ((((x) & 0xFF) << 8) | ((x) >> 8)) +#define PCIMEM_SHORT(x) SWAP_SHORT(x) +#define PCIMEM_LONG(x) SWAP_LONG(x) +#define PCIMEM_DATA(x) SWAP_DATA(x) + +#else /* BIG_ENDIAN_HOST */ + +#define SWAP_SHORT(x) ((((x) & 0xFF) << 8) | ((x) >> 8)) +#define SWAP_LONG(x) ((((x) & 0xFF)<<24) | (((x) & 0xFF00)<<8) | \ + (((x) & 0xFF0000)>>8) | (((x) & 0xFF000000)>>24)) +#define SWAP_DATA(x) (x) +#define SWAP_DATA16(x) (x) + +#ifdef BIU_BSE /* This feature only makes sense for Big Endian */ +#define PCIMEM_SHORT(x) (x) +#define PCIMEM_LONG(x) (x) +#define PCIMEM_DATA(x) ((((x) & 0xFF)<<24) | (((x) & 0xFF00)<<8) | \ + (((x) & 0xFF0000)>>8) | (((x) & 0xFF000000)>>24)) +#else +#define PCIMEM_SHORT(x) SWAP_SHORT(x) +#define PCIMEM_LONG(x) SWAP_LONG(x) +#define PCIMEM_DATA(x) SWAP_DATA(x) +#endif +#endif + +#define SWAP_ALWAYS(x) ((((x) & 0xFF)<<24) | (((x) & 0xFF00)<<8) | \ + (((x) & 0xFF0000)>>8) | (((x) & 0xFF000000)>>24)) +#define SWAP_ALWAYS16(x) ((((x) & 0xFF) << 8) | ((x) >> 8)) + +/* + * For PCI configuration + */ +#define ADDR_LO(addr) ((int)(addr) & 0xffff) /* low 16 bits */ +#define ADDR_HI(addr) (((int)(addr) >> 16) & 0xffff) /* high 16 bits */ + +#endif /* _H_FC */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fcLINUXfcp.c 999-mjb/drivers/scsi/lpfc/fcLINUXfcp.c --- 000-virgin/drivers/scsi/lpfc/fcLINUXfcp.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fcLINUXfcp.c 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,7065 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,4) +#include +#else +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "fc_os.h" +#include "fc_hw.h" +#include "fc.h" +#include "dfc.h" +#include "fcdiag.h" +#include "fcmsg.h" +#include "fc_crtn.h" +#include "fc_ertn.h" + + +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) +#include +#include +#else +#include +#endif +#include +#include +#include +#include + +#ifdef powerpc +#include + +#ifdef NO_TCE +#define INVALID_PHYS NO_TCE +#else +#define INVALID_PHYS 0 +#endif + +#else +#define INVALID_PHYS 0 +#endif + +#define is_invalid_phys(addr) ((addr) == (void *)((ulong)INVALID_PHYS)) + +static long IOcnt = 0; +static long lpfcdiag_cnt = 0; + +#define LPFC_DRIVER_VERSION "1.23a" +_static_ char *lpfc_release_version = LPFC_DRIVER_VERSION; + +/* Declare memory for global structure that is used to access + * per adapter specific info.c + */ +_static_ fc_dd_ctl_t DD_CTL; +_static_ spinlock_t lpfc_smp_lock; +_static_ struct watchdog lpfc_clktimer; +_static_ int lpfc_initTimer = 0; +_static_ int lpfc_one_cpu = 1; /* Just bind DPC to CPU 0 */ +_static_ int lpfc_use_hostptr = 0; + +_static_ spinlock_t lpfc_q_lock[MAX_FC_BRDS]; +_static_ spinlock_t lpfc_mempool_lock[MAX_FC_BRDS]; + +struct lpfc_dpc { + struct task_struct *dpc_handler; /* kernel thread */ + struct semaphore *dpc_wait; /* DPC waits on this semaphore */ + struct semaphore *dpc_notify; /* requester waits for DPC on sem */ + int dpc_active; /* DPC routine is active */ + int dpc_ticks; /* DPC routine current tick count */ + struct semaphore dpc_sem; +} lpfc_dpc[MAX_FC_BRDS]; + +_static_ int lpfc_dpc_timer = 0; + +_forward_ void lpfc_timer(void *p); +_forward_ int do_fc_timer(fc_dev_ctl_t *p_dev_ctl); +_forward_ void lpfc_do_dpc(void *p); +_forward_ int fc_dpc_lstchk(fc_dev_ctl_t *p_dev_ctl, struct scsi_cmnd *Cmnd); + +/* Binding Definitions: Max string size */ +#define FC_MAX_DID_STRING 6 +#define FC_MAX_WW_NN_PN_STRING 16 + +int lpfcMallocCnt = 0; +int lpfcMallocByte = 0; +int lpfcFreeCnt = 0; +int lpfcFreeByte = 0; + +/* This defines memory for the common configuration parameters */ +#define DEF_ICFG 1 +#include "fcfgparm.h" + +#define SHUTDOWN_SIGS (sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGTERM)) + +#if LINUX_VERSION_CODE <= LinuxVersionCode(2,5,0) +typedef void irqreturn_t; +#define IRQ_NONE +#define IRQ_HANDLED +#define IRQ_RETVAL(x) +#endif + +#ifdef MODULE + +#ifndef EXPORT_SYMTAB +#define EXPORT_SYMTAB +#endif + +#include + +MODULE_PARM(lpfc_vendor, "i"); +MODULE_PARM(lpfc_bind_entries, "i"); +MODULE_PARM(lpfc_fcp_bind_WWPN, "1-" __MODULE_STRING(MAX_FC_BINDINGS) "s"); +MODULE_PARM(lpfc_fcp_bind_WWNN, "1-" __MODULE_STRING(MAX_FC_BINDINGS) "s"); +MODULE_PARM(lpfc_fcp_bind_DID, "1-" __MODULE_STRING(MAX_FC_BINDINGS) "s"); + +MODULE_PARM(lpfc_lun0_missing, "i"); +MODULE_PARM(lpfc_lun_skip, "i"); +MODULE_PARM(lpfc_use_removable, "i"); +MODULE_PARM(lpfc_max_lun, "i"); +MODULE_PARM(lpfc_use_data_direction, "i"); + + +#ifndef FC_NEW_EH +int lpfc_reset(struct scsi_cmnd *, unsigned int); +int fc_proc_info( char *, char **, off_t, int, int, int); +#endif +int fc_abort(struct scsi_cmnd *); +int fc_reset_device(struct scsi_cmnd *); +int fc_reset_bus(struct scsi_cmnd *); +int fc_reset_host(struct scsi_cmnd *); +int fc_queuecommand(struct scsi_cmnd *, void (*done)(struct scsi_cmnd *)); +void fc_queue_done_cmd(fc_dev_ctl_t * , struct buf *); +void fc_flush_done_cmds(fc_dev_ctl_t *, ulong); +void lpfc_nodev(unsigned long); +void local_timeout(unsigned long data); +irqreturn_t do_fc_intr_handler(int , void *, struct pt_regs *); +int do_fc_intr(struct intr *); +void * lpfc_kmalloc( unsigned int, unsigned int, void **, fc_dev_ctl_t *); +void lpfc_kfree( unsigned int, void *, void *, fc_dev_ctl_t *); + +EXPORT_SYMBOL(fc_abort); +EXPORT_SYMBOL(fc_reset_device); +EXPORT_SYMBOL(fc_reset_bus); +EXPORT_SYMBOL(fc_reset_host); +EXPORT_SYMBOL(local_timeout); +EXPORT_SYMBOL(do_fc_intr_handler); +EXPORT_SYMBOL(fc_queuecommand); +EXPORT_SYMBOL(fc_queue_done_cmd); +EXPORT_SYMBOL(fc_flush_done_cmds); +EXPORT_SYMBOL(do_fc_intr); +#else /* MODULE */ +#ifndef FC_NEW_EH +int fc_reset_device(struct scsi_cmnd *); +int fc_reset_bus(struct scsi_cmnd *); +int fc_reset_host(struct scsi_cmnd *); +#endif +void local_timeout(unsigned long data); +irqreturn_t do_fc_intr_handler(int , void *, struct pt_regs *); +int do_fc_intr(struct intr *); +void * lpfc_kmalloc( unsigned int, unsigned int, void **, fc_dev_ctl_t *); +void lpfc_kfree( unsigned int, void *, void *, fc_dev_ctl_t *); +extern int lpfn_probe(void); +static int lpfc_detect_called = 0; +#endif /* MODULE */ +int do_fc_abort(fc_dev_ctl_t *); +int do_fc_reset_device(fc_dev_ctl_t *); +int do_fc_reset_bus(fc_dev_ctl_t *); +int do_fc_reset_host(fc_dev_ctl_t *); +int do_fc_queuecommand(fc_dev_ctl_t *, ulong); +void fc_select_queue_depth(struct Scsi_Host *, struct scsi_device *); +int fc_device_queue_depth(fc_dev_ctl_t *, struct scsi_device *); +int fc_DetectInstance(int, struct pci_dev *pdev, uint, struct scsi_host_template *); + +#include "lpfc.conf.defs" + +#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,0) +#ifdef MODULE +struct scsi_host_template driver_template = EMULEXFC; +#include "scsi_module.c" +#endif +#else /* new kernel scsi initialization scheme */ +static struct scsi_host_template driver_template = EMULEXFC; +#include "scsi_module.c" +#endif + +#ifndef __GENKSYMS__ +#include "fcmsgcom.c" +extern char fwrevision[32]; + +_local_ int lpfcdfc_init(void); +_local_ int fc_rtalloc(fc_dev_ctl_t *, struct dev_info *); +_local_ int fc_bind_wwpn(fc_dev_ctl_t *, char **, u_int ); +_local_ int fc_bind_wwnn(fc_dev_ctl_t *, char **, u_int ); +_local_ int fc_bind_did(fc_dev_ctl_t *, char **, u_int ); +_local_ dvi_t *fc_getDVI(fc_dev_ctl_t *, int, fc_lun_t); +_local_ ulong fc_po2(ulong); +_local_ int linux_attach(int, struct scsi_host_template *, struct pci_dev *); +_local_ int lpfc_find_cmd( fc_dev_ctl_t *p_dev_ctl, struct scsi_cmnd *cmnd); +_local_ void deviFree(fc_dev_ctl_t *, dvi_t *, node_t *); +#ifdef MODULE +_local_ int linux_detach(int ); +#endif /* MODULE */ +_local_ void *fc_kmem_zalloc(unsigned int ); + +extern int dfc_ioctl( struct dfccmdinfo *infop, struct cmd_input *cip); + +int lpfcdiag_ioctl(struct inode * inode, struct file * file, + unsigned int cmd, unsigned long arg); +int lpfcdiag_open(struct inode * inode, struct file * file); +int lpfcdiag_release(struct inode * inode, struct file * file); +int fc_ioctl(int , void *); + +static struct file_operations lpfc_fops = { + ioctl: lpfcdiag_ioctl, + open: lpfcdiag_open, + release: lpfcdiag_release, +}; + +static int lpfc_major = 0; + +/* If we want to define a new entry for Emulex boards*/ +/* #define PROC_SCSI_EMULEXFC PROC_SCSI_FILE+1 */ +/* For now we use the FC entry */ +#define NAMEEMULEX "lpfc" +#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,0) +static struct proc_dir_entry proc_scsi_emulex = { + PROC_SCSI_FCAL , 4, "lpfc", + S_IFDIR | S_IRUGO | S_IXUGO, 2 +}; +#endif + +struct dfc { + uint32 dfc_init; + uint32 filler; + uchar bufout[sizeof(FC_BRD_INFO)]; + struct dfc_info dfc_info[MAX_FC_BRDS]; +}; +extern struct dfc dfc; + +/*Extra configuration parameters as defined in lpfc.conf.c*/ +extern int lpfc_vendor; +extern int lpfc_bind_entries; +extern char *lpfc_fcp_bind_WWPN[]; +extern char *lpfc_fcp_bind_WWNN[]; +extern char *lpfc_fcp_bind_DID[]; +extern int lpfc_lun0_missing; +extern int lpfc_lun_skip; +extern int lpfc_use_removable; +extern int lpfc_max_lun; +extern int lpfc_use_data_direction; + +/*Other configuration parameters, not available to user*/ +static int lpfc_pci_latency_clocks =0; +static int lpfc_pci_cache_line =0; + +/*Other configuration parameters, not available to user*/ +static int lpfc_mtu = 4032; /* define IP max MTU size */ +static int lpfc_intr_ack = 1; +static int lpfc_first_check = 1; +static int lpfc_zone_rscn = 1; +static int lpfc_qfull_retry = 5; + +int lpfc_nethdr = 1; +int lpfc_driver_unloading = 0; + +/* The size of a physical memory page */ +uint32 fcPAGESIZE = 4096; /*PAGE_SIZE;*/ + +/* Can be used to map driver instance number and hardware adapter number */ +int fcinstance[MAX_FC_BRDS]; +int fcinstcnt = 0; + +/* Current driver state for diagnostic mode, online / offline, see fcdiag.h */ +uint32 fc_diag_state; +uint32 fc_dbg_flag = 0; +#define FC_MAX_SEGSZ 4096 + +#define FC_MAX_POOL 1024 +struct fc_mem_pool { + void *p_virt; + void *p_phys; + ushort p_refcnt; + ushort p_left; +}; +struct fc_mem_pool *fc_mem_dmapool[MAX_FC_BRDS]; +int fc_idx_dmapool[MAX_FC_BRDS]; +int fc_size_dmapool[MAX_FC_BRDS]; + +#define ScsiResult(host_code, scsi_code) (((host_code) << 16) | scsi_code) + +#define ZERO_PAN 0 + +_static_ unsigned int lpfc_page_mask; + +/* Used in generating timeouts for timers */ +_static_ uint32 fc_scsi_abort_timeout_ticks; +_static_ uint32 fc_ticks_per_second; + +/* Can be used to map driver instance number and hardware adapter number */ +extern int fcinstance[]; +extern int fcinstcnt; + +/* Current driver state for diagnostic mode, online / offline, see fcdiag.h */ +extern uint32 fc_diag_state; + +extern int fc_check_for_vpd; +extern int fc_reset_on_attach; +extern int fc_max_ns_retry; +extern int fc_fdmi_on; +extern int fc_max_els_sent; + + + +void lpfc_scsi_add_timer(struct scsi_cmnd *, int); +int lpfc_scsi_delete_timer(struct scsi_cmnd *); + +#ifdef powerpc +#if LINUX_VERSION_CODE > LinuxVersionCode(2,4,14) +#define NO_BCOPY 1 +#endif +#endif + +#ifndef FC_NEW_EH +/****************************************************************************** +* Function name : fc_proc_info +* +* Description : +* +******************************************************************************/ +int fc_proc_info(char *buffer, + char **start, + off_t offset, + int length, + int hostno, + int inout) +{ + return(0); +} +#endif + +#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,0) +/****************************************************************************** +* Function name : fc_pci_alloc_consistent +* +* Description : +* +******************************************************************************/ +void * fc_pci_alloc_consistent(struct pci_dev *hwdev, + size_t size, + dma_addr_t *dma_handle) +{ + void *virt_ptr; + u_long a_size; + int order; + + if ((size % PAGE_SIZE) == 0) { + for (order = 0, a_size = PAGE_SIZE; + a_size < size; order++, a_size <<= 1); + virt_ptr = (void *) __get_free_pages(GFP_ATOMIC, order); + } + else{ + a_size = fc_po2(size); + if(a_size == 256) + a_size = 512; + virt_ptr = kmalloc(a_size, GFP_KERNEL); + } + *dma_handle = virt_to_bus(virt_ptr); + return virt_ptr; +} + +/****************************************************************************** +* Function name : fc_pci_free_consistent +* +* Description : +* +******************************************************************************/ +void fc_pci_free_consistent(struct pci_dev *hwdev, + size_t size, + void *virt_ptr, + dma_addr_t dma_handle) +{ + u_long a_size; + int order; + + if(!virt_ptr) + return; + + /* + * Check which method was used to allocate the memory + */ + if ((size % PAGE_SIZE) == 0) { + for (order = 0, a_size = PAGE_SIZE; + a_size < size; order++, a_size <<= 1) + ; + free_pages((unsigned long)virt_ptr, order); + } + else{ + kfree(virt_ptr); + } +} +#else +/****************************************************************************** +* Function name : fc_pci_dma_sync_single +* +* Description : +* +******************************************************************************/ +void fc_pci_dma_sync_single(struct pci_dev *hwdev, + dma_addr_t h, + size_t size, + int c) +{ + pci_dma_sync_single(hwdev, h, 4096, c); +} +#endif + +#if defined (MODULE) || defined (NO_BCOPY) +/****************************************************************************** +* Function name : bcopy +* +* Description : kernel-space to kernel-space copy +* +******************************************************************************/ +_static_ void bcopy(void *src, + void *dest, + size_t n) +{ + memcpy(dest, src, n); +} +#else +/****************************************************************************** +* Function name : bcopy +* +* Description : kernel-space to kernel-space copy +* +******************************************************************************/ +_static_ void bcopy(void *src, void *dest, size_t n); + +#endif /* MODULE or NO_BCOPY */ + +/****************************************************************************** +* Function name : lpfc_DELAYMS +* +* Description : Called to delay cnt ms +* +******************************************************************************/ +_static_ int lpfc_DELAYMS(fc_dev_ctl_t *new_dev_ctl, + int cnt) +{ + int i; + fc_dev_ctl_t *p_dev_ctl; + FC_BRD_INFO *binfo; + struct lpfc_dpc *ldp; + + for (i = 0; i < MAX_FC_BRDS; i++) { + if((p_dev_ctl = (fc_dev_ctl_t *)DD_CTL.p_dev[i])) { + if(new_dev_ctl == p_dev_ctl) + continue; + binfo = &BINFO; + ldp = &lpfc_dpc[binfo->fc_brd_no]; + if ((ldp->dpc_active == 0) && ldp->dpc_wait) + up(ldp->dpc_wait); + } + } + if(new_dev_ctl->info.fc_ffstate != FC_INIT_START) { + barrier(); + schedule(); + } + mdelay(cnt); + for (i = 0; i < MAX_FC_BRDS; i++) { + if((p_dev_ctl = (fc_dev_ctl_t *)DD_CTL.p_dev[i])) { + if(new_dev_ctl == p_dev_ctl) + continue; + binfo = &BINFO; + ldp = &lpfc_dpc[binfo->fc_brd_no]; + if ((ldp->dpc_active == 0) && ldp->dpc_wait) + up(ldp->dpc_wait); + } + } + if(new_dev_ctl->info.fc_ffstate != FC_INIT_START) { + barrier(); + schedule(); + } + return(0); +} + +/****************************************************************************** +* Function name : kmem_alloc +* +* Description : Kernel memory alloc and free +* +******************************************************************************/ +_static_ void *fc_kmem_alloc(unsigned int size) +{ + void *ptr; + lpfcMallocCnt++; + lpfcMallocByte += size; + ptr = lpfc_kmalloc(size, GFP_ATOMIC, 0, 0); + return ptr; + +} + +/****************************************************************************** +* Function name : fc_kmem_free +* +* Description : +* +******************************************************************************/ +_static_ void fc_kmem_free(void *obj, + unsigned int size) +{ + lpfcFreeCnt++; + lpfcFreeByte += size; + if(obj) + lpfc_kfree(size, obj, (void *)((ulong)INVALID_PHYS), 0); +} + +/****************************************************************************** +* Function name : fc_kmem_zalloc +* +* Description : allocate memory and initialize to zeros +* +******************************************************************************/ +_static_ void *fc_kmem_zalloc(unsigned int size) +{ + void *ptr = fc_kmem_alloc(size); + if(ptr) + fc_bzero(ptr,size); + return ptr; +} + +/****************************************************************************** +* Function name : dfc_disable_lock +* +* Description : +* +******************************************************************************/ +_static_ ulong dfc_disable_lock(ulong p1, + Simple_lock *p2) + +{ + ulong iflg; + + iflg = 0; + spin_lock_irqsave(&lpfc_smp_lock, iflg); + return(iflg); +} + +/****************************************************************************** +* Function name : dfc_unlock_enable +* +* Description : +* +******************************************************************************/ +_static_ void dfc_unlock_enable(ulong p1, + Simple_lock *p2) +{ + ulong iflg; + + iflg = p1; + spin_unlock_irqrestore(&lpfc_smp_lock, iflg); + return; +} + +_static_ ulong lpfc_q_disable_lock(fc_dev_ctl_t *p_dev_ctl) +{ + ulong iflg; + + iflg = 0; + spin_lock_irqsave(&lpfc_q_lock[p_dev_ctl->info.fc_brd_no], iflg); + return(iflg); +} + + +_static_ void lpfc_q_unlock_enable(fc_dev_ctl_t *p_dev_ctl, ulong p1) +{ + ulong iflg; + + iflg = p1; + spin_unlock_irqrestore(&lpfc_q_lock[p_dev_ctl->info.fc_brd_no], iflg); + return; +} + +_static_ ulong lpfc_mempool_disable_lock(fc_dev_ctl_t *p_dev_ctl) +{ + ulong iflg; + + iflg = 0; + spin_lock_irqsave(&lpfc_mempool_lock[p_dev_ctl->info.fc_brd_no], iflg); + return(iflg); +} + + +_static_ void lpfc_mempool_unlock_enable(fc_dev_ctl_t *p_dev_ctl, ulong p1) +{ + ulong iflg; + + iflg = p1; + spin_unlock_irqrestore(&lpfc_mempool_lock[p_dev_ctl->info.fc_brd_no], iflg); + return; +} + +/****************************************************************************** +* Function name : fc_flush_done_cmds +* +* Description : flush all done commands at once +* +******************************************************************************/ +void fc_flush_done_cmds(fc_dev_ctl_t *p_dev_ctl, + ulong siflg) +{ + int count, first_inq; + struct scsi_cmnd *cmd; + struct buf * head; + FC_BRD_INFO *binfo; + struct dev_info *devp; + struct sc_buf *sp; + uint32 *iptr; + ulong iflg; + + iflg = 0; + LPFC_LOCK_DRIVER(1); + + head = p_dev_ctl->iodone_head; + binfo = &BINFO; + count = 0; + while(head) { + count++; + cmd = head->cmnd; + devp = ((struct sc_buf *)head)->current_devp; + head=head->av_forw; + + if(devp) + devp->iodonecnt++; + else + panic("NULL devp in flush_done\n"); + + if(cmd && (cmd->scsi_done != NULL)) { + sp = (struct sc_buf *)cmd->host_scribble; + if (!sp) { + /* NULL sp in flush_done */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0708, /* ptr to msg structure */ + fc_mes0708, /* ptr to msg */ + fc_msgBlk0708.msgPreambleStr, /* begin varargs */ + cmd->cmnd[0], + cmd->serial_number, + cmd->retries, + cmd->result); /* end varargs */ + continue; + } + + FCSTATCTR.fcpRsvd1++; + + if(devp->scp) { + sp->bufstruct.av_forw = devp->scp; + devp->scp = sp; + } + else { + devp->scp = sp; + devp->scp->bufstruct.av_forw = 0; + } + devp->scpcnt++; + cmd->host_scribble = 0; + + first_inq = 0; + if(devp->first_check & FIRST_IO) { + uchar *buf; + if(cmd->cmnd[0] == FCP_SCSI_INQUIRY) { + buf = (uchar *)cmd->request_buffer; + if((cmd->result) || + ((*buf & 0x70) != 0)) { /* lun not there */ +#ifdef FREE_LUN + deviFree(p_dev_ctl, devp, devp->nodep); +#else + devp->first_check &= ~FIRST_IO; +#endif + } else { + devp->first_check &= ~FIRST_IO; + } + first_inq = 1; + } + } + + + LPFC_UNLOCK_DRIVER; + iptr = (uint32 *)&cmd->sense_buffer[0]; + if((cmd->result) || *iptr) { + devp->errorcnt++; + /* iodone error return */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0710, /* ptr to msg structure */ + fc_mes0710, /* ptr to msg */ + fc_msgBlk0710.msgPreambleStr, /* begin varargs */ + (uint32)((cmd->device->id << 16) | cmd->device->lun), + (uint32)((cmd->retries << 16 ) | cmd->cmnd[0]), + cmd->result, + *iptr); /* end varargs */ + } + + lpfc_scsi_add_timer(cmd, cmd->timeout_per_command); + cmd->scsi_done(cmd); + iflg = 0; + LPFC_LOCK_DRIVER(2); + } + else + panic("Cmnd in done queue without scsi_done\n"); + } + p_dev_ctl->iodone_head = 0; + p_dev_ctl->iodone_list = 0; + LPFC_UNLOCK_DRIVER; + return; +} + +/****************************************************************************** +* Function name : fc_queue_done_cmd +* +* Description : add done command to a queue to be flushed later +* +******************************************************************************/ +void fc_queue_done_cmd(fc_dev_ctl_t *p_dev_ctl, + struct buf *sb) +{ + struct sc_buf *sp; + + if(p_dev_ctl->iodone_head == NULL) { + p_dev_ctl->iodone_head = sb; + p_dev_ctl->iodone_list = sb; + } else { + p_dev_ctl->iodone_list->av_forw = sb; + p_dev_ctl->iodone_list = sb; + } + sb->av_forw = NULL; + + sp = (struct sc_buf *)sb; + if (sp->cmd_flag & FLAG_ABORT) + sp->cmd_flag &= ~FLAG_ABORT; +} + +/****************************************************************************** +* Function name : remap_pci_mem +* +* Description : remap pci memory, makes sure mapped memory is page-aligned +* +******************************************************************************/ +_local_ void * remap_pci_mem(u_long base, + u_long size) +{ +#ifdef powerpc + return (ioremap (base, size)); +#else + u_long page_base = ((u_long) base)& PAGE_MASK; + u_long page_offs = ((u_long) base) - page_base; + u_long page_remapped = (u_long) ioremap(page_base, page_offs+size); + return (void *) (page_remapped? (page_remapped + page_offs) : ((ulong)-1)); +#endif +} + +/****************************************************************************** +* Function name : unmap_pci_mem +* +* Description : unmap pci memory +* +******************************************************************************/ +_local_ void unmap_pci_mem(u_long vaddr) +{ + if (vaddr) { + } +} + +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) +/****************************************************************************** +* Function name : pci_getadd +* +* Description : get address from a pci register, accounts for 64 bit addresses +* returns next register +* +******************************************************************************/ +_local_ int pci_getadd(struct pci_dev *pdev, + int reg, + u_long *base) + +{ + *base = pci_resource_start(pdev, reg); + reg++; + return ++reg; +} +#else +/****************************************************************************** +* Function name : pci_getadd +* +* Description : get address from a pci register, accounts for 64 bit addresses +* returns next register +* +******************************************************************************/ +_local_ int pci_getadd(struct pci_dev *pdev, + int reg, + u_long *base) +{ + *base = pdev->base_address[reg++]; + if ((*base & 0x7) == 0x4) { +#if BITS_PER_LONG > 32 + *base |= (((u_long)pdev->base_address[reg]) << 32); +#endif + ++reg; + } + return reg; +} +#endif + +/****************************************************************************** +* Function name : fc_DetectInstance +* +* Description : +* +******************************************************************************/ +int fc_DetectInstance( int instance, + struct pci_dev *pdev, + uint type, + struct scsi_host_template *tmpt) +{ + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) + /* PCI_SUBSYSTEM_IDS supported */ + while ((pdev = pci_find_subsys(PCI_VENDOR_ID_EMULEX, type, + PCI_ANY_ID, PCI_ANY_ID, pdev) )) + { + if (pci_enable_device(pdev)) continue; +#else + while ((pdev = pci_find_device(PCI_VENDOR_ID_EMULEX, type, + pdev))) + { +#endif + if(linux_attach(instance, tmpt, pdev) ) + continue; + instance++; + } + + return(instance); +} + +/****************************************************************************** +* Function name : fc_detect +* +* Description : Mid-level driver entry function for detecting the boards +* Also provides some initialization +* +******************************************************************************/ +int fc_detect(struct scsi_host_template *tmpt) +{ +#define WAIT_4_FC_READY 200 /* Thats 200 * 25 ms = 5 sec */ +#define MSEC_25_DELAY 25 +#define PRE_FC_READY_DELAY 40 +#define POST_FC_READY_DELAY 60 + + int instance = 0; + struct pci_dev *pdev = NULL; + fc_dev_ctl_t *p_dev_ctl; + FC_BRD_INFO *binfo; + int i, j, cnt; + /* To add another, add 1 to number of elements, add a line + * sType[x] = id, leave last sType[x+1] = 0; + */ + uint sType [8]; + + sType[0] = PCI_DEVICE_ID_THOR; + sType[1] = PCI_DEVICE_ID_SUPERFLY; + sType[2] = PCI_DEVICE_ID_PEGASUS; + sType[3] = PCI_DEVICE_ID_PFLY; + sType[4] = PCI_DEVICE_ID_CENTAUR; + sType[5] = PCI_DEVICE_ID_DRAGONFLY; + sType[6] = PCI_DEVICE_ID_TFLY; + /* sType[x] = PCI_DEVICE_ID_XXX; */ + sType[7] = 0; + + /* + * Intialization + */ + lpfc_page_mask = ((unsigned int) ~(fcPAGESIZE - 1)); + fc_ticks_per_second = HZ; + fc_scsi_abort_timeout_ticks = 300 * HZ /*CLOCK_TICK_RATE*/ ; + fc_bzero(&DD_CTL, sizeof(fc_dd_ctl_t)); + for (i = 0; i < MAX_FC_BRDS; i++) { + DD_CTL.p_dev[i] = NULL; + DD_CTL.p_config[i] = NULL; + fcinstance[i] = -1; + } + DD_CTL.num_devs = 0; + + fc_check_for_vpd = 1; /* issue dump mbox command during HBA initialization + * to check VPD data (if any) for a Serial Number */ + fc_reset_on_attach = 0; /* Always reset HBA before initialization in attach */ + fc_fdmi_on = 0; /* Enable FDMI */ + fc_max_ns_retry = 3; /* max number of retries for NameServer CT requests + * during discovery. */ + + fc_max_els_sent = 1; + if(fc_max_els_sent > NLP_MAXREQ) + fc_max_els_sent = NLP_MAXREQ; + +#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,0) + tmpt->proc_dir = &proc_scsi_emulex; +#else + tmpt->proc_name = NAMEEMULEX; +#endif + + printk("Emulex LightPulse FC SCSI/IP %s\n", lpfc_release_version); + /* + * the mid-level clears interrupts + * no need to re-intialize pdev + */ + i = 0; + while(sType[i]) + { + instance = fc_DetectInstance(instance, pdev, sType[i], tmpt); + i++; + } + + if(instance) { + lpfcdfc_init(); /* Initialize diagnostic interface */ + } + + p_dev_ctl = (fc_dev_ctl_t *)NULL; /* Prevent compiler warning */ + if( (PRE_FC_READY_DELAY > 0) && + (instance > 0) && + (p_dev_ctl = (fc_dev_ctl_t *)DD_CTL.p_dev[0])) { + binfo = &BINFO; + for( i=0; ifc_ffstate >= FC_LINK_UP) && (binfo->fc_ffstate != FC_READY)) { + cnt++; + } + } + } + if(cnt) { + /* HBA(s) not FC_READY yet */ + lpfc_DELAYMS( p_dev_ctl, MSEC_25_DELAY); /* 25 millisec */ + continue; + } + break; + } + + /* There are cases where the HBAs are FC_READY but not all FC nodes + * have completed their FC PLOGI/PRLI sequence due to collisions. The + * following delay loop provides a chance for these noded to complete + * their FC PLOGI/PRLI sequence prior to allowing the SCSI layer to + * start up upon the return from this routine. + */ + + if( (POST_FC_READY_DELAY > 0) && + (instance > 0) && + (p_dev_ctl = (fc_dev_ctl_t *)DD_CTL.p_dev[0])) { + binfo = &BINFO; + for( i=0; ipcidev; + if(!pdev) + return(INTR_FAIL); + if (request_irq(pdev->irq, do_fc_intr_handler, SA_INTERRUPT | SA_SHIRQ, + "lpfcdd", (void *)ihs)) + return(INTR_FAIL); + return(INTR_SUCC); +} + +/****************************************************************************** +* Function name : i_clear +* +* Description : Called from fc_detach to remove interrupt vector for adapter +* +******************************************************************************/ +_static_ int i_clear(struct intr *ihs) +{ + struct pci_dev *pdev; + fc_dev_ctl_t *p_dev_ctl; + + p_dev_ctl = (fc_dev_ctl_t * )ihs; /* Since struct intr is at beginning */ + + /* + * Get PCI for this board + */ + pdev = p_dev_ctl->pcidev; + if(!pdev) + return(1); + free_irq(pdev->irq, p_dev_ctl); + p_dev_ctl->intr_inited=0; + return(0); +} + +/****************************************************************************** +* Function name : linux_attach +* +* Description : LINUX initialization entry point, called from environment +* to attach to / initialize a specific adapter. +* +******************************************************************************/ +_local_ int linux_attach(int instance, + struct scsi_host_template *tmpt, + struct pci_dev *pdev) +{ + struct Scsi_Host *host; + fc_dev_ctl_t *p_dev_ctl=NULL; + FC_BRD_INFO *binfo; + FCCLOCK_INFO *clock_info; + iCfgParam *clp=NULL; + int initTimer = 0; + ulong iflg; + + /* + * must have a valid pci_dev + */ + if(!pdev) + return (1); + + /* Allocate memory to manage HBA dma pool */ + fc_mem_dmapool[instance] = kmalloc((sizeof(struct fc_mem_pool) * FC_MAX_POOL), + GFP_ATOMIC); + if(fc_mem_dmapool[instance] == 0) + return(1); + + fc_bzero((void *)fc_mem_dmapool[instance], + (sizeof(struct fc_mem_pool) * FC_MAX_POOL)); + fc_idx_dmapool[instance] = 0; + fc_size_dmapool[instance] = FC_MAX_POOL; + + /* + * Allocate space for adapter info structure + */ + if (!(p_dev_ctl = (fc_dev_ctl_t *)fc_kmem_zalloc(sizeof(fc_dev_ctl_t)))) { + return (1); + } + /* + * Allocate space for configuration parameters + */ + if (!(clp = (iCfgParam *)fc_kmem_zalloc(sizeof(icfgparam)))) { + goto fail1; + } + + p_dev_ctl->pcidev = pdev; + p_dev_ctl->sid_cnt = 0; /* Start scsid assignment at 1 */ + binfo = &BINFO; + binfo->fc_brd_no = instance; + spin_lock_init(&lpfc_q_lock[instance]); + spin_lock_init(&lpfc_mempool_lock[instance]); + + if(lpfc_use_hostptr) + binfo->fc_busflag = FC_HOSTPTR; +#ifdef powerpc + binfo->fc_busflag = FC_HOSTPTR; +#endif + + binfo->fc_p_dev_ctl = (uchar * )p_dev_ctl; + DD_CTL.p_dev[instance] = p_dev_ctl; + DD_CTL.p_config[instance] = clp; + fcinstance[instance] = instance; + + /* + * Initialize config parameters + */ + bcopy((void * )&icfgparam, (void *)clp, sizeof(icfgparam)); + + /* + * Initialize locks, and timeout functions + */ + clock_info = &DD_CTL.fc_clock_info; + CLOCKWDT = (void *)&lpfc_clktimer; +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) + init_waitqueue_head(&p_dev_ctl->linkwq); + init_waitqueue_head(&p_dev_ctl->rscnwq); + init_waitqueue_head(&p_dev_ctl->ctwq); +#endif + + + initTimer = 0; + if(lpfc_initTimer == 0) { + LPFC_INIT_LOCK_DRIVER; /* Just one global lock for driver */ + fc_clock_init(); + ((struct watchdog *)(CLOCKWDT))->func = fc_timer; + ((struct watchdog *)(CLOCKWDT))->restart = 1; + ((struct watchdog *)(CLOCKWDT))->count = 0; + ((struct watchdog *)(CLOCKWDT))->stopping = 0; + ((struct watchdog *)(CLOCKWDT))->timeout_id = 1; + /* + * add our watchdog timer routine to kernel's list + */ + ((struct watchdog *)(CLOCKWDT))->timer.expires = HZ + jiffies; + ((struct watchdog *)(CLOCKWDT))->timer.function = local_timeout; + ((struct watchdog *)(CLOCKWDT))->timer.data = (unsigned long)(CLOCKWDT); + init_timer(&((struct watchdog *)(CLOCKWDT))->timer); + add_timer(&((struct watchdog *)(CLOCKWDT))->timer); + lpfc_initTimer = 1; + initTimer = 1; + } + + { + struct lpfc_dpc *ldp; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) + struct semaphore sem = MUTEX_LOCKED; +#else + DECLARE_MUTEX_LOCKED(sem); +#endif + + ldp = &lpfc_dpc[instance]; + ldp->dpc_notify = &sem; + kernel_thread((int (*)(void *))lpfc_do_dpc, (void *) p_dev_ctl, 0); + /* + * Now wait for the kernel dpc thread to initialize and go to sleep. + */ + down(&sem); + ldp->dpc_notify = NULL; + } + + p_dev_ctl->intr_inited = 0; + fcinstcnt++; + if (fc_attach(instance, (uint32 * )((ulong)instance))) { + /* + * lower level routine will log error + */ + fcinstcnt--; + goto fail; + } + + /* + * Register this board + */ + host = scsi_register(tmpt, sizeof(unsigned long)); +#ifdef FC_NEW_EH +#if LINUX_VERSION_CODE <= LinuxVersionCode(2,5,0) + host->hostt->use_new_eh_code = 1; +#endif +#endif + + /* + * Adjust the number of id's + * Although max_id is an int, target id's are unsined chars + * Do not exceed 255, otherwise the device scan will wrap around + */ + host->max_id = MAX_FCP_TARGET; + if(!lpfc_max_lun) { + host->max_lun = MAX_FCP_LUN+1; + lpfc_max_lun = MAX_FCP_LUN+1; + } + else { + host->max_lun = lpfc_max_lun; + } + host->unique_id = instance; + + /* Adapter ID */ + host->this_id = MAX_FCP_TARGET - 1; + + /* + * Starting with 2.4.0 kernel, Linux can support commands longer + * than 12 bytes. However, scsi_register() always sets it to 12. + * For it to be useful to the midlayer, we have to set it here. + */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) + host->max_cmd_len = 16; +#endif + + /* + * Queue depths per lun + */ + host->cmd_per_lun = 1; +#if LINUX_VERSION_CODE <= LinuxVersionCode(2,5,0) + host->select_queue_depths = fc_select_queue_depth; +#endif + + /* + * Save a pointer to device control in host and increment board + */ + host->hostdata[0] = (unsigned long)p_dev_ctl; +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,4) +#if LINUX_VERSION_CODE <= LinuxVersionCode(2,5,0) + scsi_set_pci_device(host, pdev); +#endif +#endif + p_dev_ctl->host = host; + DD_CTL.num_devs++; + + iflg = 0; + LPFC_LOCK_DRIVER(23); + /* + * Need to start scsi timeout if FCP is turned on + * The SCSI timeout watch dog is for all adaptors, so do it once only + */ + + if((SCSI_TMO == 0) && clp[CFG_FCP_ON].a_current) { + SCSI_TMO = fc_clk_set(0, 5, fc_scsi_timeout, 0, 0); + } + + /* DQFULL */ + if ((clp[CFG_DQFULL_THROTTLE].a_current) && + (clp[CFG_DFT_LUN_Q_DEPTH].a_current > FC_MIN_QFULL)) { + if ((clp[CFG_DQFULL_THROTTLE_UP_TIME].a_current) && + (clp[CFG_DQFULL_THROTTLE_UP_INC].a_current)) { + fc_clk_set(p_dev_ctl, clp[CFG_DQFULL_THROTTLE_UP_TIME].a_current, + fc_q_depth_up, 0, 0); + } + } + LPFC_UNLOCK_DRIVER; + return(0); + +fail: + if(initTimer) { + if(SCSI_TMO) { + fc_clk_can(0, SCSI_TMO); + SCSI_TMO = 0; + } + clock_info = &DD_CTL.fc_clock_info; + ((struct watchdog *)(CLOCKWDT))->stopping = 1; + if (((struct watchdog *)(CLOCKWDT))->timer.function) + del_timer(&((struct watchdog *)(CLOCKWDT))->timer); + ((struct watchdog *)(CLOCKWDT))->timer.function=NULL; + ((struct watchdog *)(CLOCKWDT))->timeout_id=0; + } + + { + struct lpfc_dpc *ldp; + ldp = &lpfc_dpc[instance]; + if(ldp->dpc_handler != NULL ) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) + struct semaphore sem = MUTEX_LOCKED; +#else + DECLARE_MUTEX_LOCKED(sem); +#endif + + ldp->dpc_notify = &sem; + send_sig(SIGKILL, ldp->dpc_handler, 1); + down(&sem); + ldp->dpc_notify = NULL; + } + } + /* + * Free up any allocated resources + */ + fc_kmem_free(clp, sizeof(icfgparam)); + fail1: + /* + * Just in case the interrupt is still on + */ + if(p_dev_ctl->intr_inited) + i_clear((struct intr *)p_dev_ctl); + fc_kmem_free(p_dev_ctl, sizeof(fc_dev_ctl_t)); + + return(1); +} + +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,5,0) + +#else +/************************************************************************** +* Function name : fc_select_queue_depth +* +* Description: +* Sets the queue depth for each SCSI device hanging off the input +**************************************************************************/ +_static_ void fc_select_queue_depth(struct Scsi_Host *host, + struct scsi_device *scsi_devs) +{ + struct scsi_device *device; + fc_dev_ctl_t *p_dev_ctl; + + p_dev_ctl = (fc_dev_ctl_t *)host->hostdata[0]; + for( device = scsi_devs; device != NULL; device = device->next ) { + if( device->host == host ) + fc_device_queue_depth(p_dev_ctl, device); + } +} +#endif + +/****************************************************************************** +* Function name : fc_device_queue_depth +* +* Description : Determines the queue depth for a given device. +* There are two ways +* a queue depth can be obtained for a tagged queueing device. +* One way is the default queue depth which is determined by +* whether if it is defined, then it is used as the default +* queue depth. +* Otherwise, we use either 4 or 8 as the default queue depth +* (dependent on the number of hardware SCBs). +******************************************************************************/ +int fc_device_queue_depth(fc_dev_ctl_t *p_dev_ctl, + struct scsi_device *device) +{ + iCfgParam * clp; + FC_BRD_INFO *binfo; + + binfo = &p_dev_ctl->info; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + if( device->tagged_supported ) { +#if LINUX_VERSION_CODE <= LinuxVersionCode(2,5,0) + device->tagged_queue = 1; +#endif + device->current_tag = 0; + device->queue_depth = clp[CFG_DFT_LUN_Q_DEPTH].a_current; + } else { + device->queue_depth = 16; + } + return(device->queue_depth); +} + +/****************************************************************************** +* Function name : lpfc_do_dpc +* +* Description : +* +******************************************************************************/ +void lpfc_do_dpc(void *p) +{ + fc_dev_ctl_t * p_dev_ctl=(fc_dev_ctl_t*)p; + FC_BRD_INFO * binfo; + FCCLOCK_INFO * clock_info; + iCfgParam * clp; + struct lpfc_dpc * ldp; + void * ioa; + unsigned long secs; + int instance, ev; + ulong iflg; + ulong siflg; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) + struct fs_struct *fs; + struct semaphore sem = MUTEX_LOCKED; +#else + DECLARE_MUTEX_LOCKED(sem); +#endif + + lock_kernel(); + secs = 0; + + /* + * If we were started as result of loading a module, close all of the + * user space pages. We don't need them, and if we didn't close them + * they would be locked into memory. + */ + exit_mm(current); + + binfo = &BINFO; + clock_info = &DD_CTL.fc_clock_info; + instance = binfo->fc_brd_no ; + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) + daemonize("lpfc_do_dpc_%d", instance); +#else + /* + * Set the name of this process. + */ + sprintf(current->comm, "lpfc_do_dpc_%d", instance); + +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) + daemonize(); +#else + /* Become as one with the init task */ + exit_fs(current); /* current->fs->count--; */ + + fs = init_task.fs; + /* + * Some kernels compiled for SMP, while actually running + * on a uniproc machine, will return NULL for this call + */ + if( fs) { + current->fs = fs; + atomic_inc(&fs->count); + + exit_files(current); + current->files = init_task.files; + atomic_inc(¤t->files->count); + } +#endif +#endif + + clp = DD_CTL.p_config[instance]; + ldp = &lpfc_dpc[instance]; + + /* Since this is a kernel process, lets be nice to it! */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) +#ifdef DEF_NICE + current->nice = -20; + current->processor = smp_processor_id(); +#endif /* DEF_NICE */ + current->cpus_allowed = lpfc_one_cpu; + + +#else + { + int niceval; + uint32 priority; + + niceval = -20; + priority = niceval; + if (niceval < 0) + priority = -niceval; + if (priority > 20) + priority = 20; + priority = (priority * DEF_PRIORITY + 10) / 20 + DEF_PRIORITY; + + if (niceval >= 0) { + priority = 2*DEF_PRIORITY - priority; + if (!priority) + priority = 1; + } + current->priority = priority; + } + current->session = 1; + current->pgrp = 1; +#endif + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) + siginitsetinv(¤t->blocked, SHUTDOWN_SIGS); +#else + siginitsetinv(¤t->blocked, sigmask(SIGKILL)); +#endif + + ldp->dpc_wait = &sem; + ldp->dpc_handler = current; + + unlock_kernel(); + + /* + * Wake up the thread that created us. + */ + if( ldp->dpc_notify != NULL ) + up(ldp->dpc_notify); + ev = 0; + + while( 1 ) { + /* + * If we get a signal, it means we are supposed to go + * away and die. This typically happens if the user is + * trying to unload a module. + */ + if(ev == 0) { + ldp->dpc_ticks = clock_info->ticks; + + if(clp[CFG_NETWORK_ON].a_current) { +#if LINUX_VERSION_CODE <= LinuxVersionCode(2,5,0) +#ifdef __ia64__ + if (bh_count(smp_processor_id()) > 0) { + bh_count(smp_processor_id())--; + } +#else + if (local_bh_count(smp_processor_id()) > 0) { + local_bh_count(smp_processor_id())--; + } +#endif +#endif + } + + /* Only wait if we go thru KP once with no work */ + down_interruptible(&sem); + if( signal_pending(current) ) { + + iflg = 0; +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,5,0) + flush_signals(current); +#else +#ifdef INIT_SIGHAND + spin_lock_irqsave(¤t->sighand->siglock, iflg); + flush_signals(current); + spin_unlock_irqrestore(¤t->sighand->siglock, iflg); +#else + spin_lock_irqsave(¤t->sigmask_lock, iflg); + flush_signals(current); + spin_unlock_irqrestore(¤t->sigmask_lock, iflg); +#endif +#endif + + /* Only allow our driver unload to kill the KP */ + if( ldp->dpc_notify != NULL ) + break; /* get out */ + } + ldp->dpc_ticks = clock_info->ticks; + if(clp[CFG_NETWORK_ON].a_current) { +#if LINUX_VERSION_CODE <= LinuxVersionCode(2,5,0) +#ifdef __ia64__ + bh_count(smp_processor_id())++; +#else + local_bh_count(smp_processor_id())++; +#endif +#endif + } + + } + ev = 0; + + siflg = 0; + iflg = 0; + /* LPFC_LOCK_SCSI_DONE; XXX patman verify removal */ + LPFC_LOCK_DRIVER(22); + ldp->dpc_active = 1; + + p_dev_ctl->dpc_cnt++; + p_dev_ctl->dev_flag &= ~FC_NEEDS_DPC; + + /* Handle timer interrupts */ + if(p_dev_ctl->qclk_head) { + ev++; + do_fc_timer(p_dev_ctl); + } + + /* Handle adapter interrupts */ + if(p_dev_ctl->dpc_ha_copy) { + ev++; + do_fc_intr((struct intr *)p_dev_ctl); + } + + if(p_dev_ctl->qcmd_head) { + ev++; + if(clp[CFG_CR_DELAY].a_current != 0) { + ioa = FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in io registers */ + if ((uchar)READ_SLIM_ADDR(binfo, ((volatile uint32 *)ioa + (SLIMOFF+(FC_ELS_RING*2)+1))) != + ((SLI2_SLIM * )binfo->fc_slim2.virt)->mbx.us.s2.port[FC_ELS_RING].rspPutInx) { + handle_ring_event(p_dev_ctl, FC_ELS_RING, HA_R0CE_RSP); + } + if ((uchar)READ_SLIM_ADDR(binfo, ((volatile uint32 *)ioa + (SLIMOFF+(FC_FCP_RING*2)+1))) != + ((SLI2_SLIM * )binfo->fc_slim2.virt)->mbx.us.s2.port[FC_FCP_RING].rspPutInx) { + handle_ring_event(p_dev_ctl, FC_FCP_RING, HA_R2CE_RSP); + } + FC_UNMAP_MEMIO(ioa); + } + do_fc_queuecommand(p_dev_ctl, siflg); + } + + /* Handle SCSI layer aborts */ + if(p_dev_ctl->abort_head) { + ev++; + do_fc_abort(p_dev_ctl); + } + + /* Handle SCSI layer device resets */ + if(p_dev_ctl->rdev_head) { + ev++; + do_fc_reset_device(p_dev_ctl); + } + + /* Handle SCSI layer bus resets */ + if(p_dev_ctl->rbus_head) { + ev++; + do_fc_reset_bus(p_dev_ctl); + } + + /* Handle SCSI layer host resets */ + if(p_dev_ctl->rhst_head) { + ev++; + do_fc_reset_host(p_dev_ctl); + } + + /* Handle iodone processing */ + if(p_dev_ctl->iodone_head) { + int count, first_inq; + struct scsi_cmnd *cmd; + struct buf * head; + struct dev_info *devp; + struct sc_buf *sp; + uint32 *iptr; + + ev++; + ldp->dpc_active = 0; + + head = p_dev_ctl->iodone_head; + count = 0; + while(head) { + count++; + cmd = head->cmnd; + devp = ((struct sc_buf *)head)->current_devp; + head=head->av_forw; + + if(devp) + devp->iodonecnt++; + else + panic("NULL devp in flush_done\n"); + + if(cmd && (cmd->scsi_done != NULL)) { + sp = (struct sc_buf *)cmd->host_scribble; + if (!sp) { + /* NULL sp in DPC flush_done */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0709, /* ptr to msg structure */ + fc_mes0709, /* ptr to msg */ + fc_msgBlk0709.msgPreambleStr, /* begin varargs */ + cmd->cmnd[0], + cmd->serial_number, + cmd->retries, + cmd->result); /* end varargs */ + continue; + } + + FCSTATCTR.fcpRsvd1++; + + if(devp->scp) { + sp->bufstruct.av_forw = devp->scp; + devp->scp = sp; + } + else { + devp->scp = sp; + devp->scp->bufstruct.av_forw = 0; + } + devp->scpcnt++; + cmd->host_scribble = 0; + + iptr = (uint32 *)&cmd->sense_buffer[0]; + if((cmd->result) || *iptr) { + devp->errorcnt++; + /* iodone error return */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0711, /* ptr to msg structure */ + fc_mes0711, /* ptr to msg */ + fc_msgBlk0711.msgPreambleStr, /* begin varargs */ + (uint32)((cmd->device->id << 16) | cmd->device->lun), + (uint32)((cmd->retries << 16 ) | cmd->cmnd[0]), + cmd->result, + *iptr); /* end varargs */ + } + + first_inq = 0; + if(devp->first_check & FIRST_IO) { + uchar *buf; + if(cmd->cmnd[0] == FCP_SCSI_INQUIRY) { + buf = (uchar *)cmd->request_buffer; + if((cmd->result) || + ((*buf & 0x70) != 0)) { /* lun not there */ +#ifdef FREE_LUN + deviFree(p_dev_ctl, devp, devp->nodep); +#else + devp->first_check &= ~FIRST_IO; +#endif + } else { + devp->first_check &= ~FIRST_IO; + } + first_inq = 1; + } + } + + LPFC_UNLOCK_DRIVER; + lpfc_scsi_add_timer(cmd, cmd->timeout_per_command); + cmd->scsi_done(cmd); + iflg = 0; + LPFC_LOCK_DRIVER(2); + } + else + panic("Cmnd in done queue without scsi_done\n"); + } + p_dev_ctl->iodone_head = 0; + p_dev_ctl->iodone_list = 0; + LPFC_UNLOCK_DRIVER; + } + else { + ldp->dpc_active = 0; + LPFC_UNLOCK_DRIVER; + } + /* LPFC_UNLOCK_SCSI_DONE; XXX patman verify removal */ + + if(p_dev_ctl->dev_flag & FC_SCHED_CFG_INIT) { + p_dev_ctl->dev_flag &= ~FC_SCHED_CFG_INIT; + fc_cfg_init(p_dev_ctl); + + /* LPFC_LOCK_SCSI_DONE; XXX patman verify removal */ + LPFC_LOCK_DRIVER(27); + if(p_dev_ctl->fc_estabtmo) { + fc_clk_can(p_dev_ctl, p_dev_ctl->fc_estabtmo); + } + if (binfo->fc_ffstate != FC_READY) { + p_dev_ctl->fc_estabtmo = + fc_clk_set(p_dev_ctl, 60, fc_establish_link_tmo, 0, 0); + } + LPFC_UNLOCK_DRIVER; + /* LPFC_UNLOCK_SCSI_DONE; XXX patman verify removal */ + } + } + + /* + * Make sure that nobody tries to wake us up again. + */ + ldp->dpc_wait = NULL; + ldp->dpc_handler = NULL; + ldp->dpc_active = 0; + + /* + * If anyone is waiting for us to exit (i.e. someone trying to unload + * a driver), then wake up that process to let them know we are on + * the way out the door. This may be overkill - I *think* that we + * could probably just unload the driver and send the signal, and when + * the error handling thread wakes up that it would just exit without + * needing to touch any memory associated with the driver itself. + */ + if( ldp->dpc_notify != NULL ) + up(ldp->dpc_notify); +} + +#ifdef MODULE +/****************************************************************************** +* Function name : fc_release +* +* Description : +* +******************************************************************************/ +int fc_release(struct Scsi_Host *host) +{ + fc_dev_ctl_t *p_dev_ctl; + FC_BRD_INFO *binfo; + node_t *node_ptr; + struct dev_info *dev_ptr; + struct lpfc_dpc *ldp; + int instance; + int dev_index,target; + fc_lun_t lun; + ulong iflg; + + /* + * Indicate driver unloading so our interrupt handler can stop + * accepting interrupts. + */ + lpfc_driver_unloading = 1; + + /* + * get dev control from host + */ + p_dev_ctl = (fc_dev_ctl_t *)host->hostdata[0]; + binfo = &BINFO; + instance = binfo->fc_brd_no ; + + if(lpfcdiag_cnt) { + /* Cannot unload driver while lpfcdiag Interface is active */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1200, /* ptr to msg structure */ + fc_mes1200, /* ptr to msg */ + fc_msgBlk1200.msgPreambleStr, /* begin varargs */ + lpfcdiag_cnt, + (uint32)instance); /* end varargs */ + } + + iflg = 0; + LPFC_LOCK_DRIVER(24); + linux_detach(instance); + /* + *Clear all devi's + *Although host_queue has all devices, its not a good idea to touch it! + *instead we will loop on all possible targets and luns + */ + for(target=0; target < host->max_id; target++) { + dev_index = INDEX(ZERO_PAN, target); + node_ptr = binfo->device_queue_hash[dev_index].node_ptr; + if(!node_ptr) + continue; + for(lun=0; lun <= host->max_lun; lun++){ + dev_ptr = fc_find_lun(binfo, dev_index, lun); + if(!dev_ptr) + continue; + /* + * Free this device + */ + deviFree(p_dev_ctl, dev_ptr, node_ptr); + } + fc_kmem_free(node_ptr, sizeof(node_t)); + binfo->device_queue_hash[dev_index].node_ptr = 0; + } + + fcinstcnt--; + DD_CTL.num_devs--; + LPFC_UNLOCK_DRIVER; + + if(lpfc_major) + unregister_chrdev(lpfc_major, "lpfcdfc"); + + ldp = &lpfc_dpc[instance]; + if(ldp->dpc_handler != NULL ) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,0) + struct semaphore sem = MUTEX_LOCKED; +#else + DECLARE_MUTEX_LOCKED(sem); +#endif + + ldp->dpc_notify = &sem; + send_sig(SIGKILL, ldp->dpc_handler, 1); + down(&sem); + ldp->dpc_notify = NULL; + } + + return 0; +} +#endif /* MODULE */ + +#ifdef MODULE +/****************************************************************************** +* Function name : linux_detach +* +* Description : LINUX deinitialization entry point, called from environment +* to detach from / free resources for a specific adapter. +******************************************************************************/ +_local_ int linux_detach( int instance) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + fc_dev_ctl_t * p_dev_ctl = (fc_dev_ctl_t * ) NULL; + + p_dev_ctl = DD_CTL.p_dev[instance]; + if (p_dev_ctl == NULL) { + return(0); + } + binfo = &BINFO; + clp = DD_CTL.p_config[instance]; + if (clp == NULL) { + return(0); + } + + /* + * Stop and free resources associated with scsi timeout timer + */ + if(DD_CTL.num_devs == 1) { + FCCLOCK_INFO * clock_info; + + if(SCSI_TMO) { + fc_clk_can(0, SCSI_TMO); + SCSI_TMO = 0; + } + clock_info = &DD_CTL.fc_clock_info; + ((struct watchdog *)(CLOCKWDT))->stopping = 1; + if (((struct watchdog *)(CLOCKWDT))->timer.function) + del_timer(&((struct watchdog *)(CLOCKWDT))->timer); + ((struct watchdog *)(CLOCKWDT))->timer.function=NULL; + ((struct watchdog *)(CLOCKWDT))->timeout_id=0; + } + fc_detach(instance); + + fc_kmem_free(DD_CTL.p_dev[instance], sizeof(fc_dev_ctl_t)); + DD_CTL.p_dev[instance] = 0; + fc_kmem_free(DD_CTL.p_config[instance], sizeof(icfgparam)); + DD_CTL.p_config[instance] = 0; + + kfree(fc_mem_dmapool[instance]); + return(0); +} +#endif /* MODULE */ + +/****************************************************************************** +* Function name : fc_abort +* +* Description : Linux mid-level command abort entry +* Note we are using the new error handling routines +******************************************************************************/ +int fc_abort(struct scsi_cmnd *Cmnd) +{ + struct Scsi_Host *host; + fc_dev_ctl_t *p_dev_ctl; + FC_BRD_INFO * binfo; + ulong iflg; + struct lpfc_dpc *ldp; + + + host = Cmnd->device->host; + if(!host) { +#ifdef FC_NEW_EH + return FAILED ; +#else + return SCSI_ABORT_NOT_RUNNING ; +#endif + } + p_dev_ctl = (fc_dev_ctl_t *)host->hostdata[0]; + if(!p_dev_ctl) { +#if FC_NEW_EH + return FAILED ; +#else + return SCSI_ABORT_NOT_RUNNING ; +#endif + } + binfo = &BINFO; + + iflg = 0; + LPFC_LOCK_DRIVER(5); + ldp = &lpfc_dpc[binfo->fc_brd_no]; + if (ldp->dpc_wait == NULL) { + LPFC_UNLOCK_DRIVER; +#if FC_NEW_EH + return SUCCESS; +#else + return SCSI_ABORT_SUCCESS ; +#endif + } + + fc_dpc_lstchk(p_dev_ctl, Cmnd); + if(p_dev_ctl->abort_head == NULL) { + p_dev_ctl->abort_head = (void *)Cmnd; + p_dev_ctl->abort_list = (void *)Cmnd; + } else { + SCMD_NEXT((struct scsi_cmnd *)(p_dev_ctl->abort_list)) = Cmnd; + p_dev_ctl->abort_list = (void *)Cmnd; + } + SCMD_NEXT(Cmnd) = NULL; + + + if (ldp->dpc_active == 0) { + LPFC_UNLOCK_DRIVER; + up(ldp->dpc_wait); + } + else { + LPFC_UNLOCK_DRIVER; + } + +#if FC_NEW_EH + return SUCCESS; +#else + return SCSI_ABORT_SUCCESS ; +#endif +} + +/****************************************************************************** +* Function name : do_fc_abort +* +* Description : +* +******************************************************************************/ +int do_fc_abort(fc_dev_ctl_t *p_dev_ctl) +{ + struct scsi_cmnd * Cmnd; + struct scsi_cmnd * oCmnd; + FC_BRD_INFO * binfo; + dvi_t * dev_ptr; + struct sc_buf * sp; + int dev_index,target; + fc_lun_t lun; + + binfo = &BINFO; + Cmnd = (struct scsi_cmnd *)p_dev_ctl->abort_head; + while(Cmnd) { + target = (int)Cmnd->device->id; + lun = (fc_lun_t)Cmnd->device->lun; + dev_index = INDEX(ZERO_PAN, target); + + dev_ptr = fc_find_lun(binfo, dev_index, lun); + /* SCSI layer issued abort device */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0712, /* ptr to msg structure */ + fc_mes0712, /* ptr to msg */ + fc_msgBlk0712.msgPreambleStr, /* begin varargs */ + target, + (uint32)lun, + Cmnd->cmnd[0], + Cmnd->serial_number); /* end varargs */ + if(!dev_ptr || !(dev_ptr->nodep)) { + goto done; + } + + if (dev_ptr->flags & CHK_SCSI_ABDR) { + goto done; + } + + sp = (struct sc_buf *)Cmnd->host_scribble; + if (lpfc_find_cmd(p_dev_ctl, Cmnd)) { + FCSTATCTR.fcpRsvd2++; + } else { + if (fc_abort_clk_blk(p_dev_ctl, lpfc_scsi_selto_timeout, sp, 0)) { + FCSTATCTR.fcpRsvd2++; + } + } +done: + oCmnd = Cmnd; + Cmnd = SCMD_NEXT(Cmnd); + SCMD_NEXT(oCmnd) = 0; + } + p_dev_ctl->abort_head = 0; + p_dev_ctl->abort_list = 0; + + return(0); +} + +#ifndef FC_NEW_EH +/****************************************************************************** +* Function name : lpfc_reset +* +* Description : +* +******************************************************************************/ +int lpfc_reset(struct scsi_cmnd *Cmnd, + unsigned int flags) +{ + int action; + + if( flags & SCSI_RESET_SUGGEST_HOST_RESET ) { + if((action = fc_reset_host(Cmnd)) == FAILED) + return(SCSI_RESET_ERROR); + action = SCSI_RESET_SUCCESS | SCSI_RESET_HOST_RESET; + } + else if( flags & SCSI_RESET_SUGGEST_BUS_RESET ) { + if((action = fc_reset_bus(Cmnd)) == FAILED) + return(SCSI_RESET_ERROR); + action = SCSI_RESET_SUCCESS | SCSI_RESET_BUS_RESET; + } + else { + if((action = fc_reset_device(Cmnd)) == FAILED) + return(SCSI_RESET_ERROR); + action = SCSI_RESET_SUCCESS; + } + return(action); +} +#endif + +/****************************************************************************** +* Function name : fc_reset_device +* +* Description : Linux mid-level reset device entry +* Note we are using the new error handling routines +* In the old handlers there is only one reset entry which has +* two arguments +******************************************************************************/ +int fc_reset_device(struct scsi_cmnd *Cmnd) +{ + struct Scsi_Host *host; + fc_dev_ctl_t *p_dev_ctl; + FC_BRD_INFO *binfo; + ulong iflg; + struct lpfc_dpc *ldp; + + host = Cmnd->device->host; + if(!host) { + return FAILED ; + } + p_dev_ctl = (fc_dev_ctl_t *)host->hostdata[0]; + if(!p_dev_ctl) { + return FAILED; + } + binfo = &BINFO; + + iflg = 0; + LPFC_LOCK_DRIVER(6); + ldp = &lpfc_dpc[binfo->fc_brd_no]; + if (ldp->dpc_wait == NULL) { + LPFC_UNLOCK_DRIVER; + return SUCCESS; + } + + fc_dpc_lstchk(p_dev_ctl, Cmnd); + if(p_dev_ctl->rdev_head == NULL) { + p_dev_ctl->rdev_head = (void *)Cmnd; + p_dev_ctl->rdev_list = (void *)Cmnd; + } else { + SCMD_NEXT((struct scsi_cmnd *)(p_dev_ctl->rdev_list)) = Cmnd; + p_dev_ctl->rdev_list = (void *)Cmnd; + } + SCMD_NEXT(Cmnd) = NULL; + + if (ldp->dpc_active == 0) { + LPFC_UNLOCK_DRIVER; + up(ldp->dpc_wait); + } + else { + LPFC_UNLOCK_DRIVER; + } + + return SUCCESS; +} + +/****************************************************************************** +* Function name : do_fc_reset_device +* +* Description : +* +******************************************************************************/ +int do_fc_reset_device(fc_dev_ctl_t *p_dev_ctl) +{ + struct scsi_cmnd * Cmnd; + struct scsi_cmnd * oCmnd; + struct dev_info * dev_ptr; + FC_BRD_INFO * binfo; + int dev_index, target, j; + fc_lun_t lun; + + binfo = &BINFO; + Cmnd = (struct scsi_cmnd *)p_dev_ctl->rdev_head; + while(Cmnd) { + target = (int)Cmnd->device->id; + lun = (fc_lun_t)Cmnd->device->lun; + dev_index = INDEX(ZERO_PAN, target); + + dev_ptr = fc_find_lun(binfo, dev_index, lun); + j = 0; + /* SCSI layer issued target reset */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0713, /* ptr to msg structure */ + fc_mes0713, /* ptr to msg */ + fc_msgBlk0713.msgPreambleStr, /* begin varargs */ + target, + (uint32)lun, + dev_index); /* end varargs */ + if(dev_ptr == 0) { + goto done; + } + if ((binfo->fc_ffstate != FC_READY) || + (!(dev_ptr->nodep)) || + (dev_ptr->nodep->rpi == 0xfffe)) { + goto done; + } + fc_fcp_abort(p_dev_ctl, TARGET_RESET, dev_index, -1); + + +done: + oCmnd = Cmnd; + Cmnd = SCMD_NEXT(Cmnd); + SCMD_NEXT(oCmnd) = 0; + } + p_dev_ctl->rdev_head = 0; + p_dev_ctl->rdev_list = 0; + + return(0); +} + +/****************************************************************************** +* Function name : fc_reset_bus +* +* Description : Linux mid-level reset host/bus entry +* +******************************************************************************/ +int fc_reset_bus(struct scsi_cmnd *Cmnd) +{ + struct Scsi_Host *host; + fc_dev_ctl_t *p_dev_ctl; + FC_BRD_INFO *binfo; + ulong iflg; + struct lpfc_dpc *ldp; + + host = Cmnd->device->host; + if(!host) { + return FAILED; + } + p_dev_ctl = (fc_dev_ctl_t *)host->hostdata[0]; + if(!p_dev_ctl) { + return FAILED; + } + binfo = &p_dev_ctl->info; + + iflg = 0; + LPFC_LOCK_DRIVER(8); + ldp = &lpfc_dpc[binfo->fc_brd_no]; + if (ldp->dpc_wait == NULL) { + LPFC_UNLOCK_DRIVER; + return SUCCESS; + } + + fc_dpc_lstchk(p_dev_ctl, Cmnd); + if(p_dev_ctl->rbus_head == NULL) { + p_dev_ctl->rbus_head = (void *)Cmnd; + p_dev_ctl->rbus_list = (void *)Cmnd; + } else { + SCMD_NEXT((struct scsi_cmnd *)(p_dev_ctl->rbus_list)) = Cmnd; + p_dev_ctl->rbus_list = (void *)Cmnd; + } + SCMD_NEXT(Cmnd) = NULL; + + if (ldp->dpc_active == 0) { + LPFC_UNLOCK_DRIVER; + up(ldp->dpc_wait); + } + else { + LPFC_UNLOCK_DRIVER; + } + + return SUCCESS; +} + +/****************************************************************************** +* Function name : do_fc_reset_bus +* +* Description : +* +******************************************************************************/ +int do_fc_reset_bus(fc_dev_ctl_t *p_dev_ctl) +{ + struct scsi_cmnd * Cmnd; + struct scsi_cmnd * oCmnd; + FC_BRD_INFO *binfo; + node_t * node_ptr; + struct dev_info * dev_ptr; + NODELIST * nlp; + NODELIST * new_nlp; + iCfgParam *clp; + int rets = FAILED; + + binfo = &p_dev_ctl->info; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + Cmnd = (struct scsi_cmnd *)p_dev_ctl->rbus_head; + while(Cmnd) { + /* SCSI layer issued Bus Reset */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0714, /* ptr to msg structure */ + fc_mes0714, /* ptr to msg */ + fc_msgBlk0714.msgPreambleStr, /* begin varargs */ + Cmnd->device->id, + (uint32)Cmnd->device->lun); /* end varargs */ + /* + * Tell them + */ + if (binfo->fc_ffstate == FC_READY) { + rets = SUCCESS; + fc_fcp_abort(p_dev_ctl, TARGET_RESET, -1, -1); + } + else { + /* + * Check to see if we should wait for FC_READY + */ + if ((binfo->fc_ffstate < FC_LINK_DOWN) || + (binfo->fc_ffstate == FC_ERROR)) { + rets = FAILED; + } + else { + rets = SUCCESS; + } + } + + /* Reset first_check */ + nlp = binfo->fc_nlpmap_start; + while(nlp != (NODELIST *)&binfo->fc_nlpmap_start) { + new_nlp = (NODELIST *)nlp->nlp_listp_next; + if (nlp->nlp_type & NLP_FCP_TARGET) { + if(clp[CFG_FIRST_CHECK].a_current) { + /* If we are an FCP node, update first_check flag for all LUNs */ + if ((node_ptr = (node_t * )nlp->nlp_targetp) != NULL) { + for (dev_ptr = node_ptr->lunlist; dev_ptr != NULL; + dev_ptr = dev_ptr->next) { + dev_ptr->first_check = FIRST_CHECK_COND; + } + } + } + } + nlp = new_nlp; + } + oCmnd = Cmnd; + Cmnd = SCMD_NEXT(Cmnd); + SCMD_NEXT(oCmnd) = 0; + } + p_dev_ctl->rbus_head = 0; + p_dev_ctl->rbus_list = 0; + + return rets; +} + +/****************************************************************************** +* Function name : fc_reset_host +* +* Description : +* +******************************************************************************/ +int fc_reset_host(struct scsi_cmnd *Cmnd) +{ + struct Scsi_Host *host; + fc_dev_ctl_t *p_dev_ctl; + FC_BRD_INFO *binfo; + ulong iflg; + struct lpfc_dpc *ldp; + + host = Cmnd->device->host; + if(!host) { + return FAILED; + } + p_dev_ctl = (fc_dev_ctl_t *)host->hostdata[0]; + if(!p_dev_ctl) { + return FAILED; + } + binfo = &p_dev_ctl->info; + + iflg = 0; + LPFC_LOCK_DRIVER(10); + ldp = &lpfc_dpc[binfo->fc_brd_no]; + if (ldp->dpc_wait == NULL) { + LPFC_UNLOCK_DRIVER; + return SUCCESS; + } + + fc_dpc_lstchk(p_dev_ctl, Cmnd); + if(p_dev_ctl->rhst_head == NULL) { + p_dev_ctl->rhst_head = (void *)Cmnd; + p_dev_ctl->rhst_list = (void *)Cmnd; + } else { + SCMD_NEXT((struct scsi_cmnd *)(p_dev_ctl->rhst_list)) = Cmnd; + p_dev_ctl->rhst_list = (void *)Cmnd; + } + SCMD_NEXT(Cmnd) = NULL; + + if (ldp->dpc_active == 0) { + LPFC_UNLOCK_DRIVER; + up(ldp->dpc_wait); + } + else { + LPFC_UNLOCK_DRIVER; + } + + return SUCCESS; +} + +/****************************************************************************** +* Function name : do_fc_reset_host +* +* Description : +* +******************************************************************************/ +int do_fc_reset_host(fc_dev_ctl_t *p_dev_ctl) +{ + struct scsi_cmnd * Cmnd; + struct scsi_cmnd * oCmnd; + FC_BRD_INFO *binfo; + int rets = FAILED; + + binfo = &p_dev_ctl->info; + Cmnd = (struct scsi_cmnd *)p_dev_ctl->rhst_head; + while(Cmnd) { + /* SCSI layer issued Host Reset */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0715, /* ptr to msg structure */ + fc_mes0715, /* ptr to msg */ + fc_msgBlk0715.msgPreambleStr, /* begin varargs */ + Cmnd->device->id, + (uint32)Cmnd->device->lun); /* end varargs */ + /* + * Check to see if we should wait for FC_READY + */ + if ((binfo->fc_ffstate < FC_LINK_DOWN) || (binfo->fc_ffstate == FC_ERROR)) { + rets = FAILED; + } + else { + rets = SUCCESS; + } + oCmnd = Cmnd; + Cmnd = SCMD_NEXT(Cmnd); + SCMD_NEXT(oCmnd) = 0; + } + p_dev_ctl->rhst_head = 0; + p_dev_ctl->rhst_list = 0; + + return(rets); +} + + +static char addrStr[18]; + +/****************************************************************************** +* Function name : addr_sprintf +* +* Description : Used by fc_info for displaying WWNN / WWPNs +* +******************************************************************************/ +_static_ char * addr_sprintf(register uchar *ap) +{ + register int i; + register char *cp = addrStr; + static char digits[] = "0123456789abcdef"; + + for (i = 0; i < 8; i++) { + *cp++ = digits[*ap >> 4]; + *cp++ = digits[*ap++ & 0xf]; + *cp++ = ':'; + } + *--cp = 0; + return(addrStr); +} /* End addr_sprintf */ + +/****************************************************************************** +* Function name : fc_info +* +* Description : Prepare host information for mid-level +* +******************************************************************************/ +const char *fc_info(struct Scsi_Host *host) +{ + static char buf[4096]; + fc_dev_ctl_t *p_dev_ctl; + FC_BRD_INFO * binfo; + struct pci_dev *pdev; + char *multip; + int idx, i, j, incr; + char hdw[9]; + NODELIST *nlp; + + buf[0]='\0'; + p_dev_ctl = (fc_dev_ctl_t *)host->hostdata[0]; + if(!p_dev_ctl) + return buf; + binfo = &BINFO; + pdev = p_dev_ctl->pcidev ; + + for(idx=0; idx < MAX_FC_BRDS; idx++) { + if(p_dev_ctl == DD_CTL.p_dev[idx]) + break; + } + + multip = "LPFC"; + + if (!(p_dev_ctl->dev_flag & FC_FULL_INFO_CALL)) { + if(pdev != NULL) { + switch(pdev->device){ + case PCI_DEVICE_ID_CENTAUR: + if(FC_JEDEC_ID(VPD.rev.biuRev) == CENTAUR_2G_JEDEC_ID) { + sprintf(&buf[strlen(buf)], + "HBA: Emulex LightPulse LP9002 on PCI bus %02x device %02x irq %d", + p_dev_ctl->pcidev->bus->number, p_dev_ctl->pcidev->devfn, + p_dev_ctl->pcidev->irq); + } else { + sprintf(&buf[strlen(buf)], + "HBA: Emulex LightPulse LP9000 on PCI bus %02x device %02x irq %d", + p_dev_ctl->pcidev->bus->number, p_dev_ctl->pcidev->devfn, + p_dev_ctl->pcidev->irq); + } + break; + case PCI_DEVICE_ID_DRAGONFLY: + sprintf(&buf[strlen(buf)], + "HBA: Emulex LightPulse LP8000 on PCI bus %02x device %02x irq %d", + p_dev_ctl->pcidev->bus->number, p_dev_ctl->pcidev->devfn, + p_dev_ctl->pcidev->irq); + break; + case PCI_DEVICE_ID_PEGASUS: + sprintf(&buf[strlen(buf)], + "HBA: Emulex LightPulse LP9802 on PCI bus %02x device %02x irq %d", + p_dev_ctl->pcidev->bus->number, p_dev_ctl->pcidev->devfn, + p_dev_ctl->pcidev->irq); + break; + case PCI_DEVICE_ID_PFLY: + sprintf(&buf[strlen(buf)], + "HBA: Emulex LightPulse LP982 on PCI bus %02x device %02x irq %d", + p_dev_ctl->pcidev->bus->number, p_dev_ctl->pcidev->devfn, + p_dev_ctl->pcidev->irq); + break; + case PCI_DEVICE_ID_THOR: + sprintf(&buf[strlen(buf)], + "HBA: Emulex LightPulse LP10000 on PCI bus %02x device %02x irq %d", + p_dev_ctl->pcidev->bus->number, p_dev_ctl->pcidev->devfn, + p_dev_ctl->pcidev->irq); + break; + case PCI_DEVICE_ID_TFLY: + sprintf(&buf[strlen(buf)], + "HBA: Emulex LightPulse LP1050 on PCI bus %02x device %02x irq %d", + p_dev_ctl->pcidev->bus->number, p_dev_ctl->pcidev->devfn, + p_dev_ctl->pcidev->irq); + break; + default: + sprintf(&buf[strlen(buf)], + "HBA: Emulex LightPulse on PCI bus %02x device %02x irq %d", + p_dev_ctl->pcidev->bus->number, p_dev_ctl->pcidev->devfn, + p_dev_ctl->pcidev->irq); + } + } + p_dev_ctl->dev_flag |= FC_FULL_INFO_CALL; + return(buf); + } + + sprintf(buf, "Emulex LightPulse %s Driver Version: %s\n", + multip, lpfc_release_version); + + if(pdev != NULL) { + switch(pdev->device){ + case PCI_DEVICE_ID_CENTAUR: + if(FC_JEDEC_ID(VPD.rev.biuRev) == CENTAUR_2G_JEDEC_ID) { + sprintf(&buf[strlen(buf)], + "HBA: Emulex LightPulse LP9002 2 Gigabit PCI Fibre Channel Adapter\n"); + } else { + sprintf(&buf[strlen(buf)], + "HBA: Emulex LightPulse LP9000 1 Gigabit PCI Fibre Channel Adapter\n"); + } + break; + case PCI_DEVICE_ID_DRAGONFLY: + sprintf(&buf[strlen(buf)], + "HBA: Emulex LightPulse LP8000 1 Gigabit PCI Fibre Channel Adapter\n"); + break; + case PCI_DEVICE_ID_PEGASUS: + sprintf(&buf[strlen(buf)], + "HBA: Emulex LightPulse LP9802 2 Gigabit PCI Fibre Channel Adapter\n"); + break; + case PCI_DEVICE_ID_PFLY: + sprintf(&buf[strlen(buf)], + "HBA: Emulex LightPulse LP982 2 Gigabit PCI Fibre Channel Adapter\n"); + break; + case PCI_DEVICE_ID_THOR: + sprintf(&buf[strlen(buf)], + "HBA: Emulex LightPulse LP10000 2 Gigabit PCI Fibre Channel Adapter\n"); + break; + case PCI_DEVICE_ID_TFLY: + sprintf(&buf[strlen(buf)], + "HBA: Emulex LightPulse LP1050 2 Gigabit PCI Fibre Channel Adapter\n"); + break; + default: + sprintf(&buf[strlen(buf)], + "HBA: Emulex LightPulse PCI Fibre Channel Adapter\n"); + } + } + + sprintf(&buf[strlen(buf)], "SerialNum: %s\n", binfo->fc_SerialNumber); + + decode_firmware_rev(binfo, &VPD); + sprintf(&buf[strlen(buf)], "Firmware Version: %s\n", fwrevision); + + sprintf(&buf[strlen(buf)], "Hdw: "); + /* Convert JEDEC ID to ascii for hardware version */ + incr = VPD.rev.biuRev; + for(i=0;i<8;i++) { + j = (incr & 0xf); + if(j <= 9) + hdw[7-i] = (char)((uchar)0x30 + (uchar)j); + else + hdw[7-i] = (char)((uchar)0x61 + (uchar)(j-10)); + incr = (incr >> 4); + } + hdw[8] = 0; + strcat(buf, hdw); + + sprintf(&buf[strlen(buf)], "\nVendorId: 0x%x\n", + ((((uint32)pdev->device) << 16) | (uint32)(pdev->vendor))); + + sprintf(&buf[strlen(buf)], "Portname: "); + strcat(buf, addr_sprintf((uchar *)&binfo->fc_portname)); + + sprintf(&buf[strlen(buf)], " Nodename: "); + strcat(buf, addr_sprintf((uchar *)&binfo->fc_nodename)); + + switch (binfo->fc_ffstate) { + case FC_INIT_START: + case FC_INIT_NVPARAMS: + case FC_INIT_REV: + case FC_INIT_PARTSLIM: + case FC_INIT_CFGRING: + case FC_INIT_INITLINK: + case FC_LINK_DOWN: + sprintf(&buf[strlen(buf)], "\n\nLink Down\n"); + break; + case FC_LINK_UP: + case FC_INIT_SPARAM: + case FC_CFG_LINK: + sprintf(&buf[strlen(buf)], "\n\nLink Up\n"); + break; + case FC_FLOGI: + case FC_LOOP_DISC: + case FC_NS_REG: + case FC_NS_QRY: + case FC_NODE_DISC: + case FC_REG_LOGIN: + case FC_CLEAR_LA: + sprintf(&buf[strlen(buf)], "\n\nLink Up - Discovery\n"); + break; + case FC_READY: + sprintf(&buf[strlen(buf)], "\n\nLink Up - Ready:\n"); + sprintf(&buf[strlen(buf)], " PortID 0x%x\n", binfo->fc_myDID); + if (binfo->fc_topology == TOPOLOGY_LOOP) { + if(binfo->fc_flag & FC_PUBLIC_LOOP) + sprintf(&buf[strlen(buf)], " Public Loop\n"); + else + sprintf(&buf[strlen(buf)], " Private Loop\n"); + } else { + if(binfo->fc_flag & FC_FABRIC) + sprintf(&buf[strlen(buf)], " Fabric\n"); + else + sprintf(&buf[strlen(buf)], " Point-2-Point\n"); + } + + if(binfo->fc_linkspeed == LA_2GHZ_LINK) + sprintf(&buf[strlen(buf)], " Current speed 2G\n"); + else + sprintf(&buf[strlen(buf)], " Current speed 1G\n"); + + nlp = binfo->fc_nlpmap_start; + while(nlp != (NODELIST *)&binfo->fc_nlpmap_start) { + if (nlp->nlp_state == NLP_ALLOC) { + sprintf(&buf[strlen(buf)], "\nlpfc%dt%02x DID %06x WWPN ", + idx, FC_SCSID(nlp->id.nlp_pan, nlp->id.nlp_sid), nlp->nlp_DID); + strcat(buf, addr_sprintf((uchar *)&nlp->nlp_portname)); + strcat(buf, " WWNN "); + strcat(buf, addr_sprintf((uchar *)&nlp->nlp_nodename)); + } + if ((4096 - strlen(buf)) < 90) + break; + nlp = (NODELIST *)nlp->nlp_listp_next; + } + if(nlp != (NODELIST *)&binfo->fc_nlpmap_start) + strcat(buf,"\n....\n"); + } + + return (buf); +} + +/****************************************************************************** +* Function name : fc_data_direction +* +* Description : If we do not relay on Cmnd->sc_data_direction call this +* routine to determine if we are doing a read or write. +* +******************************************************************************/ +int fc_data_direction(struct scsi_cmnd *Cmnd) +{ + int ret_code; + + switch (Cmnd->cmnd[0]) { + case WRITE_6: + case WRITE_10: + case WRITE_12: + case CHANGE_DEFINITION: + case LOG_SELECT: + case MODE_SELECT: + case MODE_SELECT_10: + case WRITE_BUFFER: + case VERIFY: + case WRITE_VERIFY: + case WRITE_VERIFY_12: + case WRITE_LONG: + case WRITE_LONG_2: + case WRITE_SAME: + case SEND_DIAGNOSTIC: + case FORMAT_UNIT: + case REASSIGN_BLOCKS: + case FCP_SCSI_RELEASE_LUNR: + case FCP_SCSI_RELEASE_LUNV: + case HPVA_SETPASSTHROUGHMODE: + case HPVA_EXECUTEPASSTHROUGH: + case HPVA_CREATELUN: + case HPVA_SETLUNSECURITYLIST: + case HPVA_SETCLOCK: + case HPVA_RECOVER: + case HPVA_GENERICSERVICEOUT: + case DMEP_EXPORT_OUT: + ret_code = B_WRITE; + break; + case MDACIOCTL_DIRECT_CMD: + switch (Cmnd->cmnd[2]) { + case MDACIOCTL_STOREIMAGE: + case MDACIOCTL_WRITESIGNATURE: + case MDACIOCTL_SETREALTIMECLOCK: + case MDACIOCTL_PASS_THRU_CDB: + case MDACIOCTL_CREATENEWCONF: + case MDACIOCTL_ADDNEWCONF: + case MDACIOCTL_MORE: + case MDACIOCTL_SETPHYSDEVPARAMETER: + case MDACIOCTL_SETLOGDEVPARAMETER: + case MDACIOCTL_SETCONTROLLERPARAMETER: + case MDACIOCTL_WRITESANMAP: + case MDACIOCTL_SETMACADDRESS: + ret_code = B_WRITE; + break; + case MDACIOCTL_PASS_THRU_INITIATE: + if (Cmnd->cmnd[3] & 0x80) { + ret_code = B_WRITE; + } + else { + ret_code = B_READ; + } + break; + default: + ret_code = B_READ; + } + break; + default: +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) + if (Cmnd->sc_data_direction == SCSI_DATA_WRITE) + ret_code = B_WRITE; + else +#endif + ret_code = B_READ; + } +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) + if(ret_code == B_WRITE) + Cmnd->sc_data_direction = SCSI_DATA_WRITE; + else + Cmnd->sc_data_direction = SCSI_DATA_READ; +#endif + return ret_code; +} + +int +chkLun( +node_t *node_ptr, +fc_lun_t lun) +{ + uint32 rptLunLen; + uint32 *datap32; + uint32 lunvalue, i; + + if(node_ptr->virtRptLunData) { + datap32 = (uint32 *)node_ptr->virtRptLunData; + rptLunLen = SWAP_DATA(*datap32); + for(i=0; i < rptLunLen; i+=8) { + datap32 += 2; + lunvalue = (((* datap32) >> FC_LUN_SHIFT) & 0xff); + if (lunvalue == (uint32)lun) + return 1; + } + return 0; + } + else { + return 1; + } +} +/****************************************************************************** +* Function name : fc_queuecommand +* +* Description : Linux queue command entry +* +******************************************************************************/ +int fc_queuecommand(struct scsi_cmnd *Cmnd, + void (*done)(struct scsi_cmnd *)) +{ + FC_BRD_INFO * binfo; + struct Scsi_Host *host; + fc_dev_ctl_t *p_dev_ctl; + iCfgParam *clp; + struct dev_info *dev_ptr; + node_t *node_ptr; + struct sc_buf *sp; + int dev_index,target,retcod; + fc_lun_t lun; + ulong iflg; + struct lpfc_dpc *ldp; + + + host = Cmnd->device->host; + fc_bzero(Cmnd->sense_buffer, 16); + if(!host){ + retcod=DID_BAD_TARGET; + Cmnd->result = ScsiResult(retcod, 0); + done(Cmnd); + return(0); + } + Cmnd->scsi_done = done; /* Save done routine for this command */ + + p_dev_ctl = (fc_dev_ctl_t *)host->hostdata[0]; + if(p_dev_ctl == 0) { + retcod=DID_BAD_TARGET; + Cmnd->result = ScsiResult(retcod, 0); + done(Cmnd); + return(0); + } + + + retcod = 0; + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + LPFC_LOCK_DRIVER(12); + ldp = &lpfc_dpc[binfo->fc_brd_no]; + if (ldp->dpc_wait == NULL) { + retcod=DID_NO_CONNECT; +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) + if(lpfc_use_removable) { + Cmnd->sense_buffer[0] = 0x70; + Cmnd->sense_buffer[2] = UNIT_ATTENTION; + Cmnd->device->removable = 1; + } +#endif + Cmnd->result = ScsiResult(retcod, 0); + FCSTATCTR.fcpRsvd8++; + done(Cmnd); + LPFC_UNLOCK_DRIVER; + return(0); + } + + target = (int)Cmnd->device->id; + lun = (fc_lun_t)Cmnd->device->lun; + + if(lun > MAX_FCP_LUN) { + retcod=DID_BAD_TARGET; + Cmnd->result = ScsiResult(retcod, 0); + LPFC_UNLOCK_DRIVER; + done(Cmnd); + return(0); + } + + /* + * Device for target/lun + */ + dev_index = INDEX(ZERO_PAN, target); + if (!(dev_ptr = fc_find_lun(binfo, dev_index, lun))) { + if(!(dev_ptr=fc_getDVI(p_dev_ctl, target, lun))){ + retcod=DID_NO_CONNECT; + Cmnd->result = ScsiResult(retcod, 0); + FCSTATCTR.fcpRsvd3++; + LPFC_UNLOCK_DRIVER; + done(Cmnd); + return(0); + } + } + + node_ptr = binfo->device_queue_hash[dev_index].node_ptr; + if((node_ptr) && + ((node_ptr->flags & FC_NODEV_TMO) || (lun >= node_ptr->max_lun))) { + retcod=DID_NO_CONNECT; + Cmnd->result = ScsiResult(retcod, 0); + LPFC_UNLOCK_DRIVER; + done(Cmnd); + return(0); + } + + if((node_ptr) && (Cmnd->cmnd[0] == 0x12) && (!chkLun(node_ptr, lun))) { + retcod=DID_NO_CONNECT; + Cmnd->result = ScsiResult(retcod, 0); + LPFC_UNLOCK_DRIVER; + done(Cmnd); + return(0); + } + + if(binfo->fc_flag & FC_LD_TIMEOUT) { + retcod=DID_NO_CONNECT; + Cmnd->result = ScsiResult(retcod, 0); + LPFC_UNLOCK_DRIVER; + done(Cmnd); + return(0); + } + + dev_ptr->qcmdcnt++; + + sp = dev_ptr->scp; + if(!sp){ + retcod=DID_NO_CONNECT; + Cmnd->result = ScsiResult(retcod, 0); + dev_ptr->iodonecnt++; + dev_ptr->errorcnt++; + FCSTATCTR.fcpRsvd5++; + LPFC_UNLOCK_DRIVER; + done(Cmnd); + return(0); + } + + Cmnd->host_scribble = (void *)sp; + dev_ptr->scp = sp->bufstruct.av_forw; + dev_ptr->scpcnt--; + fc_bzero(sp,sizeof(struct sc_buf)); + sp->bufstruct.cmnd = Cmnd; + sp->current_devp = dev_ptr; + FCSTATCTR.fcpRsvd0++; + lpfc_scsi_delete_timer(Cmnd); + + /* Since we delete active timers, we can use eh_timeout.data as a linked + * list ptr internally within the driver. + */ + if(p_dev_ctl->qcmd_head == NULL) { + p_dev_ctl->qcmd_head = (void *)Cmnd; + p_dev_ctl->qcmd_list = (void *)Cmnd; + } else { + ((struct scsi_cmnd *)(p_dev_ctl->qcmd_list))->eh_timeout.data = (ulong)Cmnd; + p_dev_ctl->qcmd_list = (void *)Cmnd; + } + Cmnd->eh_timeout.data = (unsigned long) NULL; + + if (ldp->dpc_active == 0) { + LPFC_UNLOCK_DRIVER; + up(ldp->dpc_wait); + } + else { + LPFC_UNLOCK_DRIVER; + } + return 0; +} + +/****************************************************************************** +* Function name : do_fc_queuecommand +* +* Description : +* +******************************************************************************/ +int do_fc_queuecommand(fc_dev_ctl_t *p_dev_ctl, + ulong siflg) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + struct dev_info * dev_ptr; + struct sc_buf * sp; + struct buf * bp; + struct scsi_cmnd * Cmnd; + struct scsi_cmnd * oCmnd; + int i, retcod, firstin; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + Cmnd = (struct scsi_cmnd *)p_dev_ctl->qcmd_head; + firstin = 1; + + + while(Cmnd) { + sp = (struct sc_buf *)(Cmnd->host_scribble); + dev_ptr = sp->current_devp; + + sp->flags = SC_RESUME; + + + IOcnt++; + /* + * Buffer count depends on whether scatter-gather is used or not + */ + if(!Cmnd->use_sg){ + sp->bufstruct.b_bcount = (int)Cmnd->request_bufflen; + } + else { + struct scatterlist *scatter = (struct scatterlist *)Cmnd->buffer; + sp->bufstruct.b_bcount = 0; + + for(i=0; i < Cmnd->use_sg; i++) + sp->bufstruct.b_bcount += scatter[i].length; + } + + /* + * Set read/write flag + */ +#if LINUX_VERSION_CODE > LinuxVersionCode(2,4,4) + if(lpfc_use_data_direction) { + if(Cmnd->sc_data_direction == SCSI_DATA_WRITE) + sp->bufstruct.b_flags = B_WRITE; + else + sp->bufstruct.b_flags = B_READ; + } + else { + sp->bufstruct.b_flags = fc_data_direction(Cmnd); + } +#else + sp->bufstruct.b_flags = fc_data_direction(Cmnd); +#endif + + if (Cmnd->cmnd[0] == TEST_UNIT_READY) + sp->bufstruct.b_bcount = 0; + + /* + * Fill in the sp struct + */ + bcopy((void *)Cmnd->cmnd, (void *)&sp->scsi_command.scsi_cmd, 16); + + sp->scsi_command.scsi_length=Cmnd->cmd_len; + sp->scsi_command.scsi_id=Cmnd->device->id; + sp->scsi_command.scsi_lun=Cmnd->device->lun; + if (Cmnd->device->tagged_supported) { + switch (Cmnd->tag) { + case HEAD_OF_QUEUE_TAG: + sp->scsi_command.flags = HEAD_OF_Q; + break; + case ORDERED_QUEUE_TAG: + sp->scsi_command.flags = ORDERED_Q; + break; + default: + sp->scsi_command.flags = SIMPLE_Q; + break; + } + } + else + sp->scsi_command.flags = 0; + + sp->timeout_value = Cmnd->timeout_per_command / fc_ticks_per_second; + sp->adap_q_status = 0; + sp->bufstruct.av_forw = NULL; + + retcod = 0; + if(p_dev_ctl->device_state == DEAD) { + retcod=DID_NO_CONNECT; + Cmnd->result = ScsiResult(retcod, 0); + FCSTATCTR.fcpRsvd8++; + goto done; + } + + /* + * Is it a valid target? + */ + if((dev_ptr == 0) || (dev_ptr->nodep == 0)) { + retcod=DID_NO_CONNECT; + Cmnd->result = ScsiResult(retcod, 0); + FCSTATCTR.fcpRsvd4++; + goto done; + } + + if(dev_ptr->nodep == 0) { + FCSTATCTR.fcpRsvd6++; + retcod=DID_SOFT_ERROR; + } + else { + if((clp[CFG_LINKDOWN_TMO].a_current == 0) || clp[CFG_HOLDIO].a_current) { + retcod=0; + } + else { + retcod=0; + if (binfo->fc_flag & FC_LD_TIMEOUT) { + if(clp[CFG_NODEV_TMO].a_current == 0) { + retcod=DID_SOFT_ERROR; + FCSTATCTR.fcpRsvd7++; + } + else { + if(dev_ptr->nodep->flags & FC_NODEV_TMO) { + retcod=DID_SOFT_ERROR; + FCSTATCTR.fcpRsvd7++; + } + } + } + } + } + if(retcod) + goto done; + retcod=DID_OK; + + + if (dev_ptr->pend_head == NULL) { + dev_ptr->pend_head = sp; + dev_ptr->pend_tail = sp; + } else { + dev_ptr->pend_tail->bufstruct.av_forw = (struct buf *)sp; + dev_ptr->pend_tail = sp; + } + dev_ptr->pend_count++; + + /* + * put on the DEVICE_WAITING_head + */ + fc_enq_wait(dev_ptr); + + /* + * Send out the SCSI REPORT LUN command before sending the very + * first SCSI command to that device. + */ + if (dev_ptr->nodep->rptlunstate == REPORT_LUN_REQUIRED) { + dev_ptr->nodep->rptlunstate = REPORT_LUN_ONGOING; + issue_report_lun(p_dev_ctl, dev_ptr, 0); + } else { + if ( (dev_ptr->nodep->rptlunstate == REPORT_LUN_COMPLETE) && + !(dev_ptr->flags & CHK_SCSI_ABDR) && dev_ptr->numfcbufs) + fc_issue_cmd(p_dev_ctl); + } + + /* + * Done + */ +done: + if(retcod!=DID_OK) { + dev_ptr->iodonecnt++; + dev_ptr->errorcnt++; + bp = (struct buf *) sp; + bp->b_error = EIO; + bp->b_flags |= B_ERROR; + sp->status_validity = SC_ADAPTER_ERROR; + sp->general_card_status = SC_SCSI_BUS_RESET; + fc_delay_iodone(p_dev_ctl, sp); + } + oCmnd = Cmnd; + Cmnd = (struct scsi_cmnd *)Cmnd->eh_timeout.data; + oCmnd->eh_timeout.data = 0; + } + p_dev_ctl->qcmd_head = 0; + p_dev_ctl->qcmd_list = 0; + + return 0; +} + +/****************************************************************************** +* Function name : fc_rtalloc +* +* Description : +* +******************************************************************************/ +_local_ int fc_rtalloc(fc_dev_ctl_t *p_dev_ctl, + struct dev_info *dev_ptr) +{ + int i; + unsigned int size; + fc_buf_t *fcptr; + struct sc_buf *sp; + dma_addr_t phys; + FC_BRD_INFO * binfo; + MBUF_INFO * buf_info; + MBUF_INFO bufinfo; + + binfo = &p_dev_ctl->info; + for (i = 0; i < dev_ptr->fcp_lun_queue_depth+1 ; i++) { + + size = fc_po2(sizeof(fc_buf_t)); + phys = (dma_addr_t)((ulong)INVALID_PHYS); + + buf_info = &bufinfo; + buf_info->size = size; + buf_info->flags = FC_MBUF_DMA; + buf_info->align = size; + buf_info->phys = 0; + buf_info->dma_handle = 0; + buf_info->data_handle = 0; + fc_malloc(p_dev_ctl, buf_info); + fcptr = buf_info->virt; + phys = (dma_addr_t)((ulong)buf_info->phys); + if (!fcptr || is_invalid_phys((void *)((ulong)phys))) { + return(0); + } + + fc_bzero(fcptr, sizeof(fc_buf_t)); + + fcptr->dev_ptr = dev_ptr; + fcptr->phys_adr = (void *)((ulong)phys); + +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) + fcptr->fc_cmd_dma_handle = (ulong *)fcptr->phys_adr; +#endif + fc_enq_fcbuf(fcptr); + + sp = (struct sc_buf *)fc_kmem_zalloc(sizeof(struct sc_buf)); + if (!sp) { + return(0); + } + if(dev_ptr->scp) { + sp->bufstruct.av_forw = dev_ptr->scp; + dev_ptr->scp = sp; + } + else { + dev_ptr->scp = sp; + dev_ptr->scp->bufstruct.av_forw = 0; + } + dev_ptr->scpcnt++; + } /* end for loop */ + return(1); +} /* end of fc_rtalloc */ + +/****************************************************************************** +* Function name : do_fc_intr_handler +* +* Description : Local interupt handler +* +******************************************************************************/ +irqreturn_t do_fc_intr_handler(int irq, + void *dev_id, + struct pt_regs *regs) +{ + struct intr *ihs; + FC_BRD_INFO * binfo; + fc_dev_ctl_t * p_dev_ctl; + void *ioa; + volatile uint32 ha_copy; + uint32 i; + ulong siflg; + ulong iflg; + + /* + * If driver is unloading, we can stop processing interrupt. + */ + if (lpfc_driver_unloading) + return IRQ_HANDLED; + + ihs = (struct intr *)dev_id; + p_dev_ctl = (fc_dev_ctl_t * )ihs; + if(!p_dev_ctl){ + return IRQ_HANDLED; + } + + for(i=0;iinfo; + /* Ignore all interrupts during initialization. */ + if(binfo->fc_ffstate < FC_LINK_DOWN) { + LPFC_UNLOCK_DRIVER; + /* LPFC_UNLOCK_SCSI_DONE; XXX patman verify removal */ + return IRQ_HANDLED; + } + + ioa = FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + + /* Read host attention register to determine interrupt source */ + ha_copy = READ_CSR_REG(binfo, FC_HA_REG(binfo, ioa)); + + /* Clear Attention Sources, except ERROR (to preserve status) & LATT + * (ha_copy & ~HA_ERATT & ~HA_LATT); + */ + WRITE_CSR_REG(binfo, FC_HA_REG(binfo,ioa), (ha_copy & ~(HA_LATT | HA_ERATT))); + + if (ha_copy & HA_ERATT) { /* Link / board error */ + volatile uint32 status; + + /* do what needs to be done, get error from STATUS REGISTER */ + status = READ_CSR_REG(binfo, FC_STAT_REG(binfo, ioa)); + /* Clear Chip error bit */ + WRITE_CSR_REG(binfo, FC_HA_REG(binfo, ioa), HA_ERATT); + if(p_dev_ctl->dpc_hstatus == 0) + p_dev_ctl->dpc_hstatus = status; + } + + if (ha_copy & HA_LATT) { /* Link Attention interrupt */ + volatile uint32 control; + + if (binfo->fc_process_LA) { + control = READ_CSR_REG(binfo, FC_HC_REG(binfo, ioa)); + control &= ~HC_LAINT_ENA; + WRITE_CSR_REG(binfo, FC_HC_REG(binfo, ioa), control); + /* Clear Link Attention in HA REG */ + WRITE_CSR_REG(binfo, FC_HA_REG(binfo,ioa), (volatile uint32)(HA_LATT)); + } + } + + FC_UNMAP_MEMIO(ioa); + + + p_dev_ctl->dpc_ha_copy |= ha_copy; + + { + struct lpfc_dpc *ldp; + ldp = &lpfc_dpc[binfo->fc_brd_no]; + if ((p_dev_ctl->power_up == 0) || (ldp->dpc_wait == NULL)) { + do_fc_intr((struct intr *)p_dev_ctl); + LPFC_UNLOCK_DRIVER; + fc_flush_done_cmds(p_dev_ctl, siflg); + /* LPFC_UNLOCK_SCSI_DONE; XXX patman verify removal */ + } + else { + if (ldp->dpc_active == 0) { + LPFC_UNLOCK_DRIVER; + /* LPFC_UNLOCK_SCSI_DONE; XXX patman verify removal */ + up(ldp->dpc_wait); + } + else { + LPFC_UNLOCK_DRIVER; + fc_flush_done_cmds(p_dev_ctl, siflg); + /* LPFC_UNLOCK_SCSI_DONE; XXX patman verify removal */ + } + } + } + return IRQ_HANDLED; +} + +/****************************************************************************** +* Function name : do_fc_intr +* +* Description : +* p_ihs also points to device control area +******************************************************************************/ +int do_fc_intr(struct intr *p_ihs) +{ + fc_dev_ctl_t * p_dev_ctl = (fc_dev_ctl_t * )p_ihs; + volatile uint32 ha_copy; + FC_BRD_INFO * binfo; + iCfgParam * clp; + fcipbuf_t * mbp; + MAILBOXQ * mb; + IOCBQ * delayiocb; + IOCBQ * temp; + IOCBQ * processiocb; + IOCBQ * endiocb; + int ipri, rc; + + binfo = &BINFO; + ipri = disable_lock(FC_LVL, &CMD_LOCK); + binfo->fc_flag |= FC_INTR_THREAD; + + /* Read host attention register to determine interrupt source */ + ha_copy = p_dev_ctl->dpc_ha_copy; + p_dev_ctl->dpc_ha_copy = 0; + + if (ha_copy) { + rc = INTR_SUCC; + binfo->fc_flag |= FC_INTR_WORK; + } else { + clp = DD_CTL.p_config[binfo->fc_brd_no]; + if (clp[CFG_INTR_ACK].a_current && (binfo->fc_flag&FC_INTR_WORK)) { + rc = INTR_SUCC; /* Just claim the first non-working interrupt */ + binfo->fc_flag &= ~FC_INTR_WORK; + } else { + if (clp[CFG_INTR_ACK].a_current == 2) + rc = INTR_SUCC; /* Always claim the interrupt */ + else + rc = INTR_FAIL; + } + } + + if (binfo->fc_flag & FC_OFFLINE_MODE) { + binfo->fc_flag &= ~FC_INTR_THREAD; + unlock_enable(ipri, &CMD_LOCK); + return(INTR_FAIL); + } + processiocb = 0; + if(binfo->fc_delayxmit) { + delayiocb = binfo->fc_delayxmit; + binfo->fc_delayxmit = 0; + endiocb = 0; + while(delayiocb) { + temp = delayiocb; + delayiocb = (IOCBQ *)temp->q; + temp->rsvd2--; + /* If retry == 0, process IOCB */ + if(temp->rsvd2 == 0) { + if(processiocb == 0) { + processiocb = temp; + } + else { + endiocb->q = (uchar *)temp; + } + endiocb = temp; + temp->q = 0; + } + else { + /* Make delayxmit point to first non-zero retry */ + if(binfo->fc_delayxmit == 0) + binfo->fc_delayxmit = temp; + } + } + if(processiocb) { + /* Handle any delayed IOCBs */ + endiocb = processiocb; + while(endiocb) { + temp = endiocb; + endiocb = (IOCBQ *)temp->q; + temp->q = 0; + issue_iocb_cmd(binfo, &binfo->fc_ring[FC_ELS_RING], temp); + } + } + } + + if (ha_copy & HA_ERATT) { /* Link / board error */ + unlock_enable(ipri, &CMD_LOCK); + handle_ff_error(p_dev_ctl); + return(rc); + } else { + if (ha_copy & HA_MBATT) { /* Mailbox interrupt */ + handle_mb_event(p_dev_ctl); + if(binfo->fc_flag & FC_PENDING_RING0) { + binfo->fc_flag &= ~FC_PENDING_RING0; + ha_copy |= HA_R0ATT; /* event on ring 0 */ + } + } + + if (ha_copy & HA_LATT) { /* Link Attention interrupt */ + if (binfo->fc_process_LA) { + handle_link_event(p_dev_ctl); + } + } + + if (ha_copy & HA_R0ATT) { /* event on ring 0 */ + if(binfo->fc_mbox_active == 0) + handle_ring_event(p_dev_ctl, 0, (ha_copy & 0x0000000F)); + else + binfo->fc_flag |= FC_PENDING_RING0; + } + + if (ha_copy & HA_R1ATT) { /* event on ring 1 */ + /* This ring handles IP. Defer processing anything on this ring + * till all FCP ELS traffic settles down. + */ + if (binfo->fc_ffstate <= FC_NODE_DISC) + binfo->fc_deferip |= (uchar)((ha_copy >> 4) & 0x0000000F); + else + handle_ring_event(p_dev_ctl, 1, ((ha_copy >> 4) & 0x0000000F)); + } + + if (ha_copy & HA_R2ATT) { /* event on ring 2 */ + handle_ring_event(p_dev_ctl, 2, ((ha_copy >> 8) & 0x0000000F)); + } + + if (ha_copy & HA_R3ATT) { /* event on ring 3 */ + handle_ring_event(p_dev_ctl, 3, ((ha_copy >> 12) & 0x0000000F)); + } + } + + if((processiocb == 0) && (binfo->fc_delayxmit) && + (binfo->fc_mbox_active == 0)) { + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX))) { + fc_read_rpi(binfo, (uint32)1, (MAILBOX * )mb, (uint32)0); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + } + + binfo->fc_flag &= ~FC_INTR_THREAD; + + while (p_dev_ctl->mbufl_head != 0) { + binfo->fc_flag |= FC_INTR_WORK; + mbp = (fcipbuf_t * )p_dev_ctl->mbufl_head; + p_dev_ctl->mbufl_head = (uchar * )fcnextpkt(mbp); + fcnextpkt(mbp) = 0; + fc_xmit(p_dev_ctl, mbp); + } + p_dev_ctl->mbufl_tail = 0; + unlock_enable(ipri, &CMD_LOCK); + return(rc); +} /* End do_fc_intr */ + +/****************************************************************************** +* Function name : fc_memmap +* +* Description : Called from fc_attach to map shared memory (SLIM and CSRs) +* for adapter and to setup memory for SLI2 interface. +******************************************************************************/ +int fc_memmap(fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO *binfo; + struct pci_dev *pdev; + int reg; + ulong base; + + binfo = &BINFO; + + /* + * Get PCI for board + */ + pdev = p_dev_ctl->pcidev; + if(!pdev){ + panic("no dev in pcimap\n"); + return(1); + } +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,3) + /* Configure DMA attributes. */ +#if BITS_PER_LONG > 32 + if (pci_set_dma_mask(pdev, (uint64_t) 0xffffffffffffffff)) { + printk("Cannot set dma mask\n"); + return(1); + } +#else + if (pci_set_dma_mask(pdev, (uint64_t) 0xffffffff)) { + printk("Cannot set dma mask\n"); + return(1); + } +#endif +#else +#if BITS_PER_LONG > 32 + pdev->dma_mask = 0xffffffffffffffff; +#endif +#endif + + /* + * address in first register + */ + reg = 0; + reg = pci_getadd(pdev, reg, &base); + + /* + * need to mask the value to get the physical address + */ + base &= PCI_BASE_ADDRESS_MEM_MASK; + DDS.bus_mem_addr = base; + + /* + * next two registers are the control, get the first one, if doing direct io + * if i/o port is to be used get the second + * Note that pci_getadd returns the correct next register + */ + reg = pci_getadd(pdev, reg, &base); + base &= PCI_BASE_ADDRESS_MEM_MASK; + DDS.bus_io_addr = base; + /* + * Map adapter SLIM and Control Registers + */ + binfo->fc_iomap_mem = remap_pci_mem((ulong)DDS.bus_mem_addr,FF_SLIM_SIZE); + if(binfo->fc_iomap_mem == ((void *)(-1))){ + return (ENOMEM); + } + + binfo->fc_iomap_io =remap_pci_mem((ulong)DDS.bus_io_addr,FF_REG_AREA_SIZE); + if(binfo->fc_iomap_io == ((void *)(-1))){ + unmap_pci_mem((ulong)binfo->fc_iomap_mem); + return (ENOMEM); + } + + + /* + * Setup SLI2 interface + */ + if ((binfo->fc_sli == 2) && (binfo->fc_slim2.virt == 0)) { + MBUF_INFO * buf_info; + MBUF_INFO bufinfo; + + buf_info = &bufinfo; + + /* + * Allocate memory for SLI-2 structures + */ + buf_info->size = sizeof(SLI2_SLIM); + buf_info->flags = FC_MBUF_DMA; + buf_info->align = fcPAGESIZE; + buf_info->dma_handle = 0; + buf_info->data_handle = 0; + fc_malloc(p_dev_ctl, buf_info); + if (buf_info->virt == NULL) { + + /* + * unmap adapter SLIM and Control Registers + */ + unmap_pci_mem((ulong)binfo->fc_iomap_mem); + unmap_pci_mem((ulong)binfo->fc_iomap_io); + + return (ENOMEM); + } + + binfo->fc_slim2.virt = (uchar * )buf_info->virt; + binfo->fc_slim2.phys = (uchar * )buf_info->phys; + binfo->fc_slim2.data_handle = buf_info->data_handle; + binfo->fc_slim2.dma_handle = buf_info->dma_handle; + fc_bzero((char *)binfo->fc_slim2.virt, sizeof(SLI2_SLIM)); + } + return(0); +} + +/****************************************************************************** +* Function name : fc_unmemmap +* +* Description : Called from fc_detach to unmap shared memory (SLIM and CSRs) +* for adapter +* +******************************************************************************/ +int fc_unmemmap(fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO *binfo; + + binfo = &BINFO; + + /* + * unmap adapter SLIM and Control Registers + */ + unmap_pci_mem((ulong)binfo->fc_iomap_mem); + unmap_pci_mem((ulong)binfo->fc_iomap_io); + /* + * Free resources associated with SLI2 interface + */ + if (binfo->fc_slim2.virt) { + MBUF_INFO * buf_info; + MBUF_INFO bufinfo; + + buf_info = &bufinfo; + buf_info->phys = (uint32 * )binfo->fc_slim2.phys; + buf_info->data_handle = binfo->fc_slim2.data_handle; + buf_info->dma_handle = binfo->fc_slim2.dma_handle; + buf_info->flags = FC_MBUF_DMA; + + buf_info->virt = (uint32 * )binfo->fc_slim2.virt; + buf_info->size = sizeof(SLI2_SLIM); + fc_free(p_dev_ctl, buf_info); + binfo->fc_slim2.virt = 0; + binfo->fc_slim2.phys = 0; + binfo->fc_slim2.dma_handle = 0; + binfo->fc_slim2.data_handle = 0; + } + return(0); +} + +/****************************************************************************** +* Function name : fc_pcimap +* +* Description : Called from fc_attach to setup PCI configuration registers +* +******************************************************************************/ +int fc_pcimap(fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO *binfo; + iCfgParam *clp; + struct pci_dev *pdev; + u16 cmd; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + /* + * PCI for board + */ + pdev = p_dev_ctl->pcidev; + if(!pdev) + return(1); + + /* + * bus mastering and parity checking enabled + */ + pci_read_config_word(pdev, PCI_COMMAND, &cmd); + if(cmd & CMD_PARITY_CHK) + cmd = CMD_CFG_VALUE ; + else + cmd = (CMD_CFG_VALUE & ~(CMD_PARITY_CHK)); + + + pci_write_config_word(pdev, PCI_COMMAND, cmd); + + if(lpfc_pci_latency_clocks) + pci_write_config_byte(pdev, PCI_LATENCY_TMR_REGISTER,(uchar)lpfc_pci_latency_clocks); + + if(lpfc_pci_cache_line) + pci_write_config_byte(pdev, PCI_CACHE_LINE_REGISTER,(uchar)lpfc_pci_cache_line); + + /* + * Get the irq from the pdev structure + */ + DDS.bus_intr_lvl = (int)pdev->irq; + + return(0); +} + +/****************************************************************************** +* Function name : lpfc_cfg_init +* +* Description : Called from handle_ff_error() to bring link back up +* +******************************************************************************/ +int lpfc_cfg_init(fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO * binfo; + struct lpfc_dpc *ldp; + + binfo = &BINFO; + p_dev_ctl->dev_flag |= FC_SCHED_CFG_INIT; + ldp = &lpfc_dpc[binfo->fc_brd_no]; + if ((ldp->dpc_active == 0) && ldp->dpc_wait) + up(ldp->dpc_wait); + return(0); +} + +/****************************************************************************** +* Function name : lpfc_kfree_skb +* +* Description : This routine is only called by the IP portion of the driver +* and the Fabric NameServer portion of the driver. It should +* free a fcipbuf chain. +******************************************************************************/ +int lpfc_kfree_skb(struct sk_buff *skb) +{ + struct sk_buff *sskb; + + while(skb->next) { + sskb = skb; + skb = skb->next; + sskb->next = 0; +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) + if(in_interrupt()) { + dev_kfree_skb_irq(sskb); + } + else { + dev_kfree_skb(sskb); + } +#else + dev_kfree_skb(sskb); +#endif + } +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) + if(in_interrupt()) { + dev_kfree_skb_irq(skb); + } + else { + dev_kfree_skb(skb); + } +#else + dev_kfree_skb(skb); +#endif + return(0); +} + +/****************************************************************************** +* Function name : lpfc_alloc_skb +* +* Description : +* +******************************************************************************/ +struct sk_buff *lpfc_alloc_skb(unsigned int size) +{ + return(alloc_skb(size, GFP_ATOMIC)); +} + +/****************************************************************************** +* Function name : fc_malloc +* +* Description : fc_malloc environment specific routine for memory +* allocation / mapping +* The buf_info->flags field describes the memory operation requested. +* +* FC_MBUF_PHYSONLY set requests a supplied virtual address be mapped for DMA +* Virtual address is supplied in buf_info->virt +* DMA mapping flag is in buf_info->align (DMA_READ, DMA_WRITE_ONLY, both) +* The mapped physical address is returned buf_info->phys +* +* FC_MBUF_PHYSONLY cleared requests memory be allocated for driver use and +* if FC_MBUF_DMA is set the memory is also mapped for DMA +* The byte alignment of the memory request is supplied in buf_info->align +* The byte size of the memory request is supplied in buf_info->size +* The virtual address is returned buf_info->virt +* The mapped physical address is returned buf_info->phys (for FC_MBUF_DMA) +* +******************************************************************************/ +uchar *fc_malloc(fc_dev_ctl_t *p_dev_ctl, + MBUF_INFO *buf_info) +{ + FC_BRD_INFO * binfo; + unsigned int size; + + binfo = &BINFO; + buf_info->phys = (void *)((ulong)INVALID_PHYS); + buf_info->dma_handle = 0; + if (buf_info->flags & FC_MBUF_PHYSONLY) { + if(buf_info->virt == NULL) + return NULL; +#if LINUX_VERSION_CODE <= LinuxVersionCode(2,4,12) + buf_info->phys = (void *)((ulong)pci_map_single(p_dev_ctl->pcidev, + buf_info->virt, buf_info->size, PCI_DMA_BIDIRECTIONAL)); +#else + { + struct page *page = virt_to_page((ulong)(buf_info->virt)); + unsigned long offset = ((unsigned long)buf_info->virt & ~PAGE_MASK); + + buf_info->phys = (void *)((ulong)pci_map_page(p_dev_ctl->pcidev, + page, offset, buf_info->size, PCI_DMA_BIDIRECTIONAL)); + } +#endif + +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) + buf_info->dma_handle = buf_info->phys; +#endif + FCSTATCTR.fcMapCnt++; + return((uchar * )buf_info->virt); + } + if((buf_info->flags & FC_MBUF_DMA)) { + size = fc_po2(buf_info->size); + buf_info->phys = (void *)((ulong)INVALID_PHYS); + buf_info->virt = lpfc_kmalloc(size, GFP_ATOMIC, &buf_info->phys, p_dev_ctl); + if (buf_info->virt) { + if(is_invalid_phys(buf_info->phys)) { + lpfc_kfree((unsigned int)buf_info->size, (void *)buf_info->virt, (void *)buf_info->phys, p_dev_ctl); + buf_info->virt = 0; + } + } +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) + buf_info->dma_handle = buf_info->phys; +#endif + if(buf_info->virt == 0) { + buf_info->phys = (void *)((ulong)INVALID_PHYS); + buf_info->dma_handle = 0; + } + } + else { + buf_info->size = ((buf_info->size + 7) & 0xfffffff8); + buf_info->virt = (uint32 * )lpfc_kmalloc((unsigned int)buf_info->size, GFP_ATOMIC, 0, 0); + if(buf_info->virt) + fc_bzero(buf_info->virt, buf_info->size); + buf_info->phys = (void *)((ulong)INVALID_PHYS); + } + FCSTATCTR.fcMallocCnt++; + FCSTATCTR.fcMallocByte += buf_info->size; + return((uchar * )buf_info->virt); +} + +/****************************************************************************** +* Function name : fc_po2 +* +* Description : Convert size to next highest power of 2 +* +******************************************************************************/ +ulong fc_po2(ulong size) +{ + ulong order; + + for (order = 1; order < size; order <<= 1); + return(order); +} + +void *lpfc_last_dma_page = 0; +int lpfc_dma_page_offset = 0; + +/****************************************************************************** +* Function name : fc_free +* +* Description : Environment specific routine for memory de-allocation/unmapping +* The buf_info->flags field describes the memory operation requested. +* FC_MBUF_PHYSONLY set requests a supplied virtual address be unmapped +* for DMA, but not freed. +* The mapped physical address to be unmapped is in buf_info->phys +* FC_MBUF_PHYSONLY cleared requests memory be freed and unmapped for DMA +* only if FC_MBUF_DMA is set. +* The mapped physical address to be unmapped is in buf_info->phys +* The virtual address to be freed is in buf_info->virt +******************************************************************************/ +void fc_free(fc_dev_ctl_t *p_dev_ctl, + MBUF_INFO *buf_info) +{ + FC_BRD_INFO * binfo; + unsigned int size; + + binfo = &BINFO; + + if (buf_info->flags & FC_MBUF_PHYSONLY) { +#if LINUX_VERSION_CODE <= LinuxVersionCode(2,4,12) + pci_unmap_single(p_dev_ctl->pcidev, + (ulong)(buf_info->phys), buf_info->size, PCI_DMA_BIDIRECTIONAL); +#else + pci_unmap_page(p_dev_ctl->pcidev, + (ulong)(buf_info->phys), buf_info->size, PCI_DMA_BIDIRECTIONAL); +#endif + FCSTATCTR.fcUnMapCnt++; + } + else { + if((buf_info->flags & FC_MBUF_DMA)) { + size = fc_po2(buf_info->size); + lpfc_kfree((unsigned int)buf_info->size, (void *)buf_info->virt, (void *)buf_info->phys, p_dev_ctl); + } + else { + buf_info->size = ((buf_info->size + 7) & 0xfffffff8); + lpfc_kfree((unsigned int)buf_info->size, (void *)buf_info->virt, (void *)((ulong)INVALID_PHYS), 0); + } + FCSTATCTR.fcFreeCnt++; + FCSTATCTR.fcFreeByte += buf_info->size; + } +} + +/****************************************************************************** +* Function name : fc_rdpci_cmd +* +******************************************************************************/ +ushort fc_rdpci_cmd(fc_dev_ctl_t *p_dev_ctl) +{ + u16 cmd; + struct pci_dev *pdev; + + /* + * PCI device + */ + pdev = p_dev_ctl->pcidev; + if(!pdev){ + panic("no dev in fc_rdpci_cmd\n"); + return((ushort)0); + } + pci_read_config_word(pdev, PCI_COMMAND, &cmd); + return((ushort)cmd); +} + +/****************************************************************************** +* Function name : fc_rdpci_32 +* +******************************************************************************/ +uint32 fc_rdpci_32(fc_dev_ctl_t *p_dev_ctl, + uint32 offset) +{ + uint32 cmd; + struct pci_dev *pdev; + + /* + * PCI device + */ + pdev = p_dev_ctl->pcidev; + if(!pdev){ + panic("no dev in fc_rdpci_32\n"); + return((ushort)0); + } + pci_read_config_dword(pdev, offset, &cmd); + return(cmd); +} + +/****************************************************************************** +* Function name : fc_wrpci_cmd +* +******************************************************************************/ +void fc_wrpci_cmd(fc_dev_ctl_t *p_dev_ctl, + ushort cfg_value) +{ + struct pci_dev *pdev; + + /* + * PCI device + */ + pdev = p_dev_ctl->pcidev; + if(!pdev){ + panic("no dev in fc_wrpci_cmd\n"); + return; + } + pci_write_config_word(pdev, PCI_COMMAND, cfg_value); +} +/****************************************************************************** +* +* Function name : lpfc_fcp_error() +* +* Description : Handle an FCP response error +* +* Context : called from handle_fcp_event +* Can be called by interrupt thread. +******************************************************************************/ +_static_ void lpfc_fcp_error(fc_buf_t * fcptr, + IOCB * cmd) +{ + FCP_RSP *fcpRsp = &fcptr->fcp_rsp; + struct sc_buf *sp = fcptr->sc_bufp; + struct buf *bp; + struct scsi_cmnd *Cmnd; + + bp = (struct buf *)sp; + Cmnd = bp->cmnd; + + if (fcpRsp->rspStatus2 & RESID_UNDER) { + uint32 len, resid, brd; + + if((fcptr->dev_ptr) && (fcptr->dev_ptr->nodep)) + brd = fcptr->dev_ptr->nodep->ap->info.fc_brd_no; + else + brd = 0; + + len = SWAP_DATA(fcptr->fcp_cmd.fcpDl); + resid = SWAP_DATA(fcpRsp->rspResId); + + /* FCP residual underrun, expected , residual */ + fc_log_printf_msg_vargs( brd, + &fc_msgBlk0716, /* ptr to msg structure */ + fc_mes0716, /* ptr to msg */ + fc_msgBlk0716.msgPreambleStr, /* begin varargs */ + len, + resid, + Cmnd->cmnd[0], + Cmnd->underflow); /* end varargs */ + + switch (Cmnd->cmnd[0]) { + case TEST_UNIT_READY: + case REQUEST_SENSE: + case INQUIRY: + case RECEIVE_DIAGNOSTIC: + case READ_CAPACITY: + case FCP_SCSI_READ_DEFECT_LIST: + case MDACIOCTL_DIRECT_CMD: + break; + default: + if((!(fcpRsp->rspStatus2 & SNS_LEN_VALID)) && + (len - resid < Cmnd->underflow)) { + /* FCP command residual underrun converted to error */ + fc_log_printf_msg_vargs( brd, + &fc_msgBlk0717, /* ptr to msg structure */ + fc_mes0717, /* ptr to msg */ + fc_msgBlk0717.msgPreambleStr, /* begin varargs */ + Cmnd->cmnd[0], + Cmnd->underflow, + len, + resid); /* end varargs */ + fcpRsp->rspStatus3 = SC_COMMAND_TERMINATED; + fcpRsp->rspStatus2 &= ~RESID_UNDER; + sp->scsi_status = 0; + } + break; + } + } +} +/****************************************************************************** +* Function name : fc_do_iodone +* +* Description : Return a SCSI initiated I/O to above layer +* when the I/O completes. +******************************************************************************/ +int fc_do_iodone(struct buf *bp) +{ + struct scsi_cmnd *Cmnd; + struct sc_buf * sp = (struct sc_buf *) bp; + FC_BRD_INFO * binfo; + iCfgParam * clp; + fc_dev_ctl_t * p_dev_ctl; + NODELIST * nlp; + node_t * node_ptr; + struct Scsi_Host *host; + struct dev_info * dev_ptr; + int dev_index; + int host_status = DID_OK; + + IOcnt--; + + if(!bp) { + return(1); + } + /* + * Linux command from our buffer + */ + Cmnd = bp->cmnd; + + /* + * must have Cmnd and Linux completion functions + */ + if(!Cmnd || !Cmnd->scsi_done){ + return (0); + } + + /* + * retrieve host adapter and device control + */ + host = Cmnd->device->host; + if(!host){ + return (0); + } + p_dev_ctl = (fc_dev_ctl_t *)host->hostdata[0]; + if(!p_dev_ctl){ + return (0); + } + + fc_fcp_bufunmap(p_dev_ctl, sp); + + dev_index = INDEX(ZERO_PAN, Cmnd->device->id); + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + dev_ptr = sp->current_devp; + + if (!dev_ptr) { + node_ptr = binfo->device_queue_hash[dev_index].node_ptr; + goto qf; + } + + if((node_ptr = dev_ptr->nodep) == 0) { + node_ptr = binfo->device_queue_hash[dev_index].node_ptr; + if(!node_ptr) { + dev_ptr = 0; + goto qf; + } + } + + if(node_ptr->rpi == 0xfffe) { +qf: + if ((binfo->fc_ffstate > FC_LINK_DOWN) && (binfo->fc_ffstate < FC_READY)) + goto force_retry; + + if(node_ptr) + nlp = node_ptr->nlp; + else + nlp = 0; + if (nlp && + (binfo->fc_flag & FC_RSCN_MODE) && (binfo->fc_ffstate == FC_READY) && + (nlp->nlp_action & (NLP_DO_ADDR_AUTH | NLP_DO_DISC_START | NLP_DO_RSCN))) + goto force_retry; + + if ((node_ptr) && (clp[CFG_NODEV_TMO].a_current)) { + if(node_ptr->flags & FC_NODEV_TMO) { +#ifdef FC_NEW_EH + Cmnd->retries = Cmnd->allowed; /* no more retries */ +#endif + host_status = DID_NO_CONNECT; +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) + if(lpfc_use_removable) { + Cmnd->sense_buffer[0] = 0x70; + Cmnd->sense_buffer[2] = UNIT_ATTENTION; + Cmnd->device->removable = 1; + } +#endif + if(dev_ptr) + dev_ptr->scsi_dev = (void *)Cmnd->device; + } + else { +#ifdef FC_NEW_EH + Cmnd->retries = 0; /* Force retry */ +#endif + host_status = DID_BUS_BUSY; + } + Cmnd->result = ScsiResult(host_status, 0); + } + else { + if((clp[CFG_LINKDOWN_TMO].a_current)&&(binfo->fc_flag & FC_LD_TIMEOUT)) { +#ifdef FC_NEW_EH + Cmnd->retries = Cmnd->allowed; /* no more retries */ +#endif + host_status = DID_NO_CONNECT; +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) + if(lpfc_use_removable) { + Cmnd->sense_buffer[0] = 0x70; + Cmnd->sense_buffer[2] = UNIT_ATTENTION; + Cmnd->device->removable = 1; + } +#endif + if(dev_ptr) + dev_ptr->scsi_dev = (void *)Cmnd->device; + } + else { +force_retry: +#ifdef FC_NEW_EH + Cmnd->retries = 0; /* Force retry */ +#endif + host_status = DID_BUS_BUSY; + } + Cmnd->result = ScsiResult(host_status, 0); + } + fc_queue_done_cmd(p_dev_ctl, bp); + return (0); + } + + /* + * mark it as done, no longer required, but will leave for now + */ + bp->isdone=1; +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) + Cmnd->resid = bp->b_resid; +#endif + + /* + * First check if a scsi error, mid-level handles these only if DID_OK + */ + if(sp->status_validity == SC_SCSI_ERROR){ + if(sp->scsi_status==SC_CHECK_CONDITION){ + lpfc_copy_sense(dev_ptr, bp); + } + else if (sp->scsi_status == SC_RESERVATION_CONFLICT) { + host_status = DID_ERROR; + } + else if (sp->scsi_status == SC_BUSY_STATUS) { +#ifdef FC_NEW_EH + Cmnd->retries = 0; /* Force retry */ +#endif + host_status = DID_BUS_BUSY; + } + else { + host_status = DID_ERROR; + } + + if((bp->b_flags & B_ERROR)) { + if (bp->b_error == EBUSY){ + host_status = DID_OK; + sp->scsi_status = SC_QUEUE_FULL; + } else if (bp->b_error == EINVAL){ +#ifdef FC_NEW_EH + Cmnd->retries = 0; /* Force retry */ +#endif + host_status = DID_BUS_BUSY; + sp->scsi_status = 0; + } + } + + Cmnd->result = ScsiResult(host_status,sp->scsi_status); + fc_queue_done_cmd(p_dev_ctl, bp); + return (0); + } + + /* + * check error flag + */ + if((bp->b_flags & B_ERROR)) + { + switch(bp->b_error){ + case 0: + host_status = DID_OK; + sp->scsi_status = 0; + break; + case EBUSY: + host_status = DID_BUS_BUSY; + sp->scsi_status = 0; + break; + case EINVAL: +#ifdef FC_NEW_EH + Cmnd->retries = 0; /* Force retry */ +#endif + host_status = DID_BUS_BUSY; + sp->scsi_status = 0; + break; + default: +#ifdef FC_NEW_EH + host_status = DID_ERROR; +#else + host_status = DID_BUS_BUSY; +#endif + break; + } + } + + /* + * next hardware errors + */ + if(sp->status_validity == SC_ADAPTER_ERROR){ +#ifdef FC_NEW_EH + host_status = DID_ERROR; +#else + host_status = DID_BUS_BUSY; +#endif + Cmnd->result = ScsiResult(host_status,0); + fc_queue_done_cmd(p_dev_ctl, bp); + return (0); + } + + /* + * if lun0_missing feature is turned on and it's inquiry to a missing + * lun 0, then we will fake out LINUX scsi layer to allow scanning + * of other luns. + */ + if (lpfc_lun0_missing) { + if ((Cmnd->cmnd[0] == FCP_SCSI_INQUIRY) && (Cmnd->device->lun == 0)) { + uchar *buf; + buf = (uchar *)Cmnd->request_buffer; + if( *buf == 0x7f) { + /* Make lun unassigned and wrong type */ + *buf = 0x3; + } + } + } + + if(lpfc_lun_skip) { + /* If a LINUX OS patch to support, LUN skipping / no LUN 0, is not present, + * this code will fake out the LINUX scsi layer to allow it to detect + * all LUNs if there are LUN holes on a device. + */ + if (Cmnd->cmnd[0] == FCP_SCSI_INQUIRY) { + uchar *buf; + buf = (uchar *)Cmnd->request_buffer; + if(( *buf == 0x7f) || ((*buf & 0xE0) == 0x20)) { + /* Make lun unassigned and wrong type */ + *buf = 0x3; + } + } + } + + Cmnd->result = ScsiResult(host_status,sp->scsi_status); + fc_queue_done_cmd(p_dev_ctl, bp); + + return(0); +} + +/****************************************************************************** +* Function name : fc_fcp_bufunmap +* +* Description : +* +******************************************************************************/ +int fc_fcp_bufunmap(fc_dev_ctl_t * p_dev_ctl, + struct sc_buf * sp) +{ + struct buf *bp; + struct scsi_cmnd * Cmnd; + FC_BRD_INFO * binfo; + + binfo = &BINFO; + bp = (struct buf *)sp; + Cmnd = bp->cmnd; + /* unmap DMA resources used */ + if(!(sp->flags & SC_MAPPED)) + return(0); +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) + { + int rwflg; + + rwflg = Cmnd->sc_data_direction; + + if (Cmnd->use_sg) { + pci_unmap_sg(p_dev_ctl->pcidev, Cmnd->request_buffer, Cmnd->use_sg, rwflg); + } + else if ((Cmnd->request_bufflen) && (bp->av_back)) { +#if LINUX_VERSION_CODE <= LinuxVersionCode(2,4,12) + pci_unmap_single(p_dev_ctl->pcidev, (uint64_t)((ulong)(bp->av_back)), Cmnd->request_bufflen, rwflg); +#else + pci_unmap_page(p_dev_ctl->pcidev, (uint64_t)((ulong)(bp->av_back)), Cmnd->request_bufflen, rwflg); +#endif + } + } + +#endif + FCSTATCTR.fcUnMapCnt++; + sp->flags &= ~SC_MAPPED; + return(0); +} + +/****************************************************************************** +* Function name : fc_fcp_bufmap +* +* Description : Called from issue_fcp_cmd, used to map addresses in sbp to +* physical addresses for the I/O. +******************************************************************************/ +int fc_fcp_bufmap(fc_dev_ctl_t * p_dev_ctl, + struct sc_buf * sbp, + fc_buf_t * fcptr, + IOCBQ * temp, + ULP_BDE64 * bpl, + dvi_t * dev_ptr, + int pend) +{ + uint32 seg_cnt, cnt, num_bmps, i, num_bde; + int rwflg; + FC_BRD_INFO * binfo = &BINFO; + iCfgParam * clp; + struct buf * bp; + RING * rp; + IOCB * cmd; + struct scsi_cmnd * cmnd; + ULP_BDE64 * topbpl; + MATCHMAP * bmp; + MATCHMAP * last_bmp; + void * physaddr; + struct scatterlist *sgel_p; +#ifdef powerpc + struct scatterlist *sgel_p_t0; +#endif /* endif powerpc */ + + bp = (struct buf *)sbp; + /* + Linux command */ + cmnd = bp->cmnd; + if(!cmnd) + return(FCP_EXIT); + rp = &binfo->fc_ring[FC_FCP_RING]; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + cmd = &temp->iocb; + + last_bmp = fcptr->bmp; + num_bmps = 1; + num_bde = 0; + topbpl = 0; + sgel_p = 0; + + fcptr->flags |= DATA_MAPPED; + if (cmnd->use_sg) { + sbp->bufstruct.av_back = 0; + sgel_p = (struct scatterlist *)cmnd->request_buffer; +#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,0) + seg_cnt = cmnd->use_sg; + rwflg = 0; +#else + rwflg = cmnd->sc_data_direction; + #ifdef powerpc /* remap to get a different set of fysadds that xclud zro */ + remapsgl: + #endif /* end if powerpc */ + seg_cnt = pci_map_sg(p_dev_ctl->pcidev, sgel_p, cmnd->use_sg, rwflg); + #ifdef powerpc /* check 4 zro phys address, then remap to get a diff 1 */ + for (sgel_p_t0=sgel_p, i=0; ibufstruct.b_bcount = cnt; + break; + } + /* Fill in continuation entry to next bpl */ + bpl->addrHigh = (uint32)putPaddrHigh(bmp->phys); + bpl->addrHigh = PCIMEM_LONG(bpl->addrHigh); + bpl->addrLow = (uint32)putPaddrLow(bmp->phys); + bpl->addrLow = PCIMEM_LONG(bpl->addrLow); + bpl->tus.f.bdeFlags = BPL64_SIZE_WORD; + num_bde++; + if (num_bmps == 1) { + cmd->un.fcpi64.bdl.bdeSize += (num_bde * sizeof(ULP_BDE64)); + } else { + topbpl->tus.f.bdeSize = (num_bde * sizeof(ULP_BDE64)); + topbpl->tus.w = PCIMEM_LONG(topbpl->tus.w); + } + topbpl = bpl; + bpl = (ULP_BDE64 * )bmp->virt; + last_bmp->fc_mptr = (void *)bmp; + last_bmp = bmp; + num_bde = 0; + num_bmps++; + } +#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,0) + rwflg = 0; +#else + if(rwflg == B_WRITE) + rwflg = SCSI_DATA_WRITE; + else + rwflg = SCSI_DATA_READ; +#endif + + physaddr = (void *)((ulong)scsi_sg_dma_address(sgel_p)); + + bpl->addrLow = PCIMEM_LONG(putPaddrLow(physaddr)); + bpl->addrHigh = PCIMEM_LONG(putPaddrHigh(physaddr)); + bpl->tus.f.bdeSize = scsi_sg_dma_len(sgel_p); + cnt += bpl->tus.f.bdeSize; + if (cmd->ulpCommand == CMD_FCP_IREAD64_CR) + bpl->tus.f.bdeFlags = BUFF_USE_RCV; + else + bpl->tus.f.bdeFlags = 0; + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + bpl++; + sgel_p++; + num_bde++; + } /* end for loop */ + + } + else { + +#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,0) + rwflg = 0; +#else + rwflg = cmnd->sc_data_direction; +#endif + +#if LINUX_VERSION_CODE <= LinuxVersionCode(2,4,12) + physaddr = (void *)((ulong)pci_map_single(p_dev_ctl->pcidev, + cmnd->request_buffer, cmnd->request_bufflen, rwflg)); +#else + { + struct page *page = virt_to_page((ulong)(cmnd->request_buffer)); + unsigned long offset = ((unsigned long)cmnd->request_buffer & ~PAGE_MASK); + + #ifdef powerpc + remapnsg: + #endif /* endif powerpc */ + physaddr = (void *)((ulong)pci_map_page(p_dev_ctl->pcidev, + page, offset, cmnd->request_bufflen, rwflg)); + #ifdef powerpc + if (!physaddr) { + goto remapnsg; + } + #endif /* endif remapnsg */ + } +#endif + FCSTATCTR.fcMapCnt++; + sbp->bufstruct.av_back = (void *)physaddr; + /* no scatter-gather list case */ + bpl->addrLow = PCIMEM_LONG(putPaddrLow(physaddr)); + bpl->addrHigh = PCIMEM_LONG(putPaddrHigh(physaddr)); + bpl->tus.f.bdeSize = sbp->bufstruct.b_bcount; + if (cmd->ulpCommand == CMD_FCP_IREAD64_CR) + bpl->tus.f.bdeFlags = BUFF_USE_RCV; + else + bpl->tus.f.bdeFlags = 0; + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + num_bde = 1; + bpl++; + + } + + bpl->addrHigh = 0; + bpl->addrLow = 0; + bpl->tus.w = 0; + last_bmp->fc_mptr = 0; + if (num_bmps == 1) { + cmd->un.fcpi64.bdl.bdeSize += (num_bde * sizeof(ULP_BDE64)); + } else { + topbpl->tus.f.bdeSize = (num_bde * sizeof(ULP_BDE64)); + topbpl->tus.w = PCIMEM_LONG(topbpl->tus.w); + } + cmd->ulpBdeCount = 1; + cmd->ulpLe = 1; /* Set the LE bit in the last iocb */ + + /* Queue cmd chain to last iocb entry in xmit queue */ + if (rp->fc_tx.q_first == NULL) { + rp->fc_tx.q_first = (uchar * )temp; + } else { + ((IOCBQ * )(rp->fc_tx.q_last))->q = (uchar * )temp; + } + rp->fc_tx.q_last = (uchar * )temp; + rp->fc_tx.q_cnt++; + + sbp->flags |= SC_MAPPED; + return(0); +} + +/****************************************************************************** +* Function name : local_timeout +* +* Description : Local handler for watchdog timeouts +******************************************************************************/ +void local_timeout(unsigned long data) +{ + struct watchdog *wdt = (struct watchdog *)data; + fc_dev_ctl_t * p_dev_ctl; + FC_BRD_INFO * binfo; + int skip_intr, i; + ulong siflg; + ulong iflg; + struct lpfc_dpc *ldp; + + siflg = 0; + skip_intr = 0; + /* LPFC_LOCK_SCSI_DONE; XXX patman verify removal */ + iflg = 0; + LPFC_LOCK_DRIVER0; + for (i = 0; i < MAX_FC_BRDS; i++) { + if((p_dev_ctl = (fc_dev_ctl_t *)DD_CTL.p_dev[i])) { + if(p_dev_ctl->fc_ipri != 0) { + printk("LOCK 14 failure %x %x\n",(uint32)p_dev_ctl->fc_ipri, (uint32)iflg); + } + p_dev_ctl->fc_ipri = 14; + + /* Check to see if the DPC was scheduled since the last clock interrupt */ + if(p_dev_ctl->dpc_cnt == p_dev_ctl->save_dpc_cnt) { + volatile uint32 ha_copy; + void * ioa; + + binfo = &BINFO; + ioa = FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + /* Read host attention register to determine interrupt source */ + ha_copy = READ_CSR_REG(binfo, FC_HA_REG(binfo, ioa)); + FC_UNMAP_MEMIO(ioa); + /* If there are any hardware interrupts to process, they better + * get done before the next clock interrupt. + */ + if(p_dev_ctl->dpc_ha_copy || (ha_copy & ~HA_LATT)) { + if(p_dev_ctl->dev_flag & FC_NEEDS_DPC) { + skip_intr = 1; + /* Local_timeout Skipping clock tick */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0756, /* ptr to msg structure */ + fc_mes0756, /* ptr to msg */ + fc_msgBlk0756.msgPreambleStr, /* begin varargs */ + p_dev_ctl->dpc_ha_copy, + ha_copy, + p_dev_ctl->dpc_cnt, + binfo->fc_ffstate); /* end varargs */ + if(wdt) + del_timer(&wdt->timer); + } + else { + p_dev_ctl->dev_flag |= FC_NEEDS_DPC; + } + } + } + p_dev_ctl->save_dpc_cnt = p_dev_ctl->dpc_cnt; + } + } + + if(skip_intr || !wdt || !wdt->timeout_id) { + fc_reset_timer(); + goto out; + } + del_timer(&wdt->timer); + + ldp = &lpfc_dpc[0]; + if (ldp->dpc_wait == NULL) { + if(wdt->func) + wdt->func(wdt); + } + else { + lpfc_timer(0); + } + +out: + for (i = 0; i < MAX_FC_BRDS; i++) { + if((p_dev_ctl = (fc_dev_ctl_t *)DD_CTL.p_dev[i])) { + p_dev_ctl->fc_ipri = 0; + } + } + LPFC_UNLOCK_DRIVER0; + + /* LPFC_UNLOCK_SCSI_DONE; XXX patman verify removal */ + for (i = 0; i < MAX_FC_BRDS; i++) { + if((p_dev_ctl = (fc_dev_ctl_t *)DD_CTL.p_dev[i])) { + binfo = &BINFO; + ldp = &lpfc_dpc[binfo->fc_brd_no]; + if ((ldp->dpc_active == 0) && ldp->dpc_wait) + up(ldp->dpc_wait); + } + } +} + +/****************************************************************************** +* Function name : fc_reset_timer +* +* Description : +* +******************************************************************************/ +void fc_reset_timer(void) +{ + FCCLOCK_INFO * clock_info; + + clock_info = &DD_CTL.fc_clock_info; + ((struct watchdog *)(CLOCKWDT))->func = fc_timer; + ((struct watchdog *)(CLOCKWDT))->restart = 1; + ((struct watchdog *)(CLOCKWDT))->count = 0; + ((struct watchdog *)(CLOCKWDT))->stopping = 0; + /* + * add our watchdog timer routine to kernel's list + */ + ((struct watchdog *)(CLOCKWDT))->timer.expires = HZ + jiffies; + ((struct watchdog *)(CLOCKWDT))->timer.function = local_timeout; + ((struct watchdog *)(CLOCKWDT))->timer.data = (unsigned long)(CLOCKWDT); + init_timer(&((struct watchdog *)(CLOCKWDT))->timer); + add_timer(&((struct watchdog *)(CLOCKWDT))->timer); + return; +} + +/****************************************************************************** +* Function name : curtime +* +* Description : Set memory pointed to by time, with the current time (LBOLT) +* +******************************************************************************/ +void curtime(uint32 *time) +{ + *time = jiffies; +} + +/****************************************************************************** +* Function name : fc_initpci +* +* Description : Called by driver diagnostic interface to initialize dfc_info +* +******************************************************************************/ +int fc_initpci(struct dfc_info *di, + fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO * binfo; /* point to the binfo area */ + struct pci_dev *pdev; + + pdev = p_dev_ctl->pcidev; + /* + must have the pci struct + */ + if(!pdev) + return(1); + binfo = &BINFO; + + di->fc_ba.a_onmask = (ONDI_MBOX | ONDI_RMEM | ONDI_RPCI | ONDI_RCTLREG | + ONDI_IOINFO | ONDI_LNKINFO | ONDI_NODEINFO | ONDI_CFGPARAM | + ONDI_CT | ONDI_HBAAPI); + di->fc_ba.a_offmask = (OFFDI_MBOX | OFFDI_RMEM | OFFDI_WMEM | OFFDI_RPCI | + OFFDI_WPCI | OFFDI_RCTLREG | OFFDI_WCTLREG); + + if ((binfo->fc_flag & FC_SLI2) && (fc_diag_state == DDI_ONDI)) + di->fc_ba.a_onmask |= ONDI_SLI2; + else + di->fc_ba.a_onmask |= ONDI_SLI1; +#ifdef powerpc + di->fc_ba.a_onmask |= ONDI_BIG_ENDIAN; +#else + di->fc_ba.a_onmask |= ONDI_LTL_ENDIAN; +#endif + di->fc_ba.a_pci=((((uint32)pdev->device) << 16) | (uint32)(pdev->vendor)); + di->fc_ba.a_pci = SWAP_LONG(di->fc_ba.a_pci); + di->fc_ba.a_ddi = fcinstance[binfo->fc_brd_no]; + if(pdev->bus) + di->fc_ba.a_busid = (uint32)(pdev->bus->number); + else + di->fc_ba.a_busid = 0; + di->fc_ba.a_devid = (uint32)(pdev->devfn); + + bcopy((void *)lpfc_release_version, di->fc_ba.a_drvrid, 8); + decode_firmware_rev(binfo, &VPD); + bcopy((void *)fwrevision, di->fc_ba.a_fwname, 32); + + + /* setup structures for I/O mapping */ + di->fc_iomap_io = binfo->fc_iomap_io; + di->fc_iomap_mem = binfo->fc_iomap_mem; + di->fc_hmap = (char *)pdev; + return(0); +} + +/****************************************************************************** +* Function name : fc_readpci +* +* Description : Called by driver diagnostic interface to copy cnt bytes from +* PCI configuration registers, at offset, into buf. +******************************************************************************/ +int fc_readpci(struct dfc_info *di, + uint32 offset, + char *buf, + uint32 cnt) +{ + struct pci_dev *pdev; + int i; + uint32 *lp; + uint32 ldata; + + if(!di->fc_hmap) return(1); + pdev = (struct pci_dev *)di->fc_hmap; + for(i=0; i < cnt; i++){ + lp = (uint32 *)buf; + pci_read_config_dword(pdev,(u8)offset, (u32 *)buf); + ldata = *lp; + *lp = SWAP_LONG(ldata); + buf+=4; + offset+=4; + } + return(0); +} + +/****************************************************************************** +* Function name : fc_writepci +* +* Description : Called by driver diagnostic interface to write cnt bytes from +* buf into PCI configuration registers, starting at offset. +******************************************************************************/ +int fc_writepci(struct dfc_info *di, + uint32 offset, + char *buf, + uint32 cnt) +{ + struct pci_dev *pdev; + int i; + uint32 *lp; + uint32 ldata; + + if(!di->fc_hmap) return(1); + pdev = (struct pci_dev *)di->fc_hmap; + for(i=0; i < cnt; i++){ + lp = (uint32 *)buf; + ldata = *lp; + *lp = SWAP_LONG(ldata); + pci_write_config_dword(pdev,(u8)offset, *buf); + buf+=4; + offset+=4; + } + return(0); +} + +/****************************************************************************** +* Function name : copyout +* +* Description : copy from kernel-space to a user-space +* +******************************************************************************/ +int copyout(uchar *src, + uchar *dst, + unsigned long size) +{ + copy_to_user(dst,src,size); + return(0); +} + +/****************************************************************************** +* Function name : copyin +* +* Description : copy from user-space to kernel-space +* +******************************************************************************/ +int copyin(uchar *src, + uchar *dst, + unsigned long size) +{ + copy_from_user(dst,src,size); + return(0); +} + +/****************************************************************************** +* Function name : fc_getDVI +* +* Description : get a dvi ptr from a Linux scsi cmnd +* +******************************************************************************/ +_local_ dvi_t *fc_getDVI(fc_dev_ctl_t * p_dev_ctl, + int target, + fc_lun_t lun) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + struct dev_info * dev_ptr; + struct dev_info * save_ptr; + node_t * node_ptr; + NODELIST * nlp; + int dev_index; + int report_device = 1; + + binfo = &p_dev_ctl->info; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + dev_index = INDEX(ZERO_PAN, target); + + if (dev_index >= MAX_FC_TARGETS){ + return (0); + } + + if (lun < 0) { + /* LUN address out of range */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0718, /* ptr to msg structure */ + fc_mes0718, /* ptr to msg */ + fc_msgBlk0718.msgPreambleStr, /* begin varargs */ + target, + (uint32)lun); /* end varargs */ + return (0); + } + + /* + * Find the target from the nlplist based on SCSI ID + */ + if((nlp = fc_findnode_scsid(binfo, NLP_SEARCH_MAPPED, target)) == 0) { + /* + * Device SCSI ID is not a valid FCP target + */ + + return (0); + } + + /* Allocate SCSI node structure for each open FC node */ + node_ptr = binfo->device_queue_hash[dev_index].node_ptr; + if (node_ptr == NULL) { + if (!(node_ptr = (node_t * ) fc_kmem_zalloc(sizeof(node_t)))) { + return (0); + } + + /* Initialize the node ptr structure */ + node_ptr->ap = p_dev_ctl; /* point back to adapter struct */ + node_ptr->devno = target; + node_ptr->lunlist = NULL; + node_ptr->max_lun = lpfc_max_lun; + + node_ptr->last_dev = NULL; + node_ptr->num_active_io = 0; + node_ptr->virtRptLunData = 0; + node_ptr->physRptLunData = 0; + + node_ptr->tgt_queue_depth = (u_int)clp[CFG_DFT_TGT_Q_DEPTH].a_current; + + node_ptr->nlp = nlp; + node_ptr->rpi = nlp->nlp_Rpi; + node_ptr->last_good_rpi = nlp->nlp_Rpi; + node_ptr->scsi_id = target; + nlp->nlp_targetp = (uchar * )node_ptr; + binfo->device_queue_hash[dev_index].node_ptr = node_ptr; + } + + dev_ptr = fc_find_lun(binfo, dev_index, lun); + /* device queue structure doesn't exist yet */ + if ( dev_ptr == NULL ) { + if (!(dev_ptr = (dvi_t * ) fc_kmem_zalloc(sizeof(dvi_t)))) { + return (0); + } + + /* Initialize the dev_info structure */ + dev_ptr->nodep = node_ptr; + dev_ptr->lun_id = lun; + dev_ptr->flags = 0; + dev_ptr->sense_valid = FALSE; + + /* Initialize device queues */ + dev_ptr->ABORT_BDR_fwd = NULL; + dev_ptr->ABORT_BDR_bkwd = NULL; + dev_ptr->DEVICE_WAITING_fwd = NULL; + dev_ptr->pend_head = NULL; + dev_ptr->pend_tail = NULL; + dev_ptr->pend_count = 0; + dev_ptr->clear_head = NULL; + dev_ptr->clear_count = 0; + dev_ptr->active_io_count = 0; + dev_ptr->stop_send_io = 0; + dev_ptr->ioctl_wakeup = 0; + dev_ptr->qfull_retries = lpfc_qfull_retry; + dev_ptr->first_check = FIRST_CHECK_COND | FIRST_IO; + + dev_ptr->fcp_lun_queue_depth = (u_int)clp[CFG_DFT_LUN_Q_DEPTH].a_current; + if (dev_ptr->fcp_lun_queue_depth < 1) + dev_ptr->fcp_lun_queue_depth = 1; + + dev_ptr->fcp_cur_queue_depth = dev_ptr->fcp_lun_queue_depth; + + /* init command state flags */ + dev_ptr->queue_state = ACTIVE; + dev_ptr->opened = TRUE; + dev_ptr->ioctl_wakeup = FALSE; + dev_ptr->ioctl_event = EVENT_NULL; + dev_ptr->stop_event = FALSE; + + /* + * Create fc_bufs - allocate virtual and bus lists for use with FCP + */ + if(fc_rtalloc(p_dev_ctl, dev_ptr) == 0) { + fc_kmem_free(dev_ptr, sizeof(dvi_t)); + return (0); + } + + /* Add dev_ptr to lunlist */ + if (node_ptr->lunlist == NULL) { + node_ptr->lunlist = dev_ptr; + } else { + save_ptr = node_ptr->lunlist; + while (save_ptr->next != NULL ) { + save_ptr = save_ptr->next; + } + save_ptr->next = dev_ptr; + } + dev_ptr->next = NULL; + } + + if(clp[CFG_DEVICE_REPORT].a_current + && dev_ptr!=NULL && report_device && + (dev_ptr->nodep->nlp->nlp_type & NLP_FCP_TARGET)) { + nlp = dev_ptr->nodep->nlp; + printk(KERN_INFO"!lpfc%d: Acquired FCP/SCSI Target 0x%lx LUN 0x%lx , D_ID is (0x%lx)\n", + binfo->fc_brd_no, + (ulong)target, + (ulong)lun, + (ulong)(nlp->nlp_DID)); + } + + return (dev_ptr); +} + +dvi_t * +fc_alloc_devp( +fc_dev_ctl_t * p_dev_ctl, +int target, +fc_lun_t lun) +{ + return fc_getDVI(p_dev_ctl, target, lun); +} + +/****************************************************************************** +* Function name : deviFree +* +* Description : Free a dvi_t pointer +* +******************************************************************************/ +_local_ void deviFree(fc_dev_ctl_t *p_dev_ctl, + dvi_t *dev_ptr, + node_t *node_ptr) +{ + struct dev_info *curDev, *prevDev; + fc_buf_t *curFcBuf, *tmpFcBuf; + struct sc_buf *sp; + dma_addr_t phys; + unsigned int size; + MBUF_INFO * buf_info; + MBUF_INFO bufinfo; + + /* + * First, we free up all fcbuf for this device. + */ + curFcBuf = dev_ptr->fcbuf_head; + while (curFcBuf != NULL) { + tmpFcBuf = curFcBuf->fc_fwd; + phys = (dma_addr_t)((ulong)curFcBuf->phys_adr); + size = fc_po2(sizeof(fc_buf_t)); + + buf_info = &bufinfo; + buf_info->phys = (void *)((ulong)phys); + buf_info->data_handle = 0; + buf_info->dma_handle = 0; + buf_info->flags = FC_MBUF_DMA; + buf_info->virt = (uint32 * )curFcBuf; + buf_info->size = size; + fc_free(p_dev_ctl, buf_info); + curFcBuf = tmpFcBuf; + } /* end while loop */ + while (dev_ptr->scp != NULL) { + sp = dev_ptr->scp; + dev_ptr->scp = sp->bufstruct.av_forw; + dev_ptr->scpcnt--; + fc_kmem_free((void *)sp, sizeof(struct sc_buf)); + } + + /* + * Next, we are going to remove this device-lun combination. + * But we need to make sure the link list where this dev_ptr + * belongs is not broken. + */ + + curDev = node_ptr->lunlist; + prevDev = curDev; + while (curDev != NULL) { + if (curDev == dev_ptr) + break; + else { + prevDev = curDev; + curDev = curDev->next; + } + } + + if (curDev == dev_ptr) { /* This should always pass */ + if (curDev == node_ptr->lunlist) + node_ptr->lunlist = curDev->next; + else + prevDev->next = curDev->next; + } + fc_kmem_free((void *)dev_ptr, sizeof(dvi_t)); +} +/****************************************************************************** +* Function name : fc_print +* +* Description : +* +******************************************************************************/ +int fc_print( char *str, + void *a1, + void *a2) +{ + printk((const char *)str, a1, a2); + return(1); +} /* fc_print */ + +/****************************************************************************** +* Function name : log_printf_msgblk +* +* Description : Called from common code function fc_log_printf_msg_vargs +* Note : Input string 'str' is formatted (sprintf) by caller. +******************************************************************************/ +int log_printf_msgblk(int brdno, + msgLogDef * msg, + char * str, /* String formatted by caller */ + int log_only) +{ + int ddiinst; + char * mod; + + ddiinst = fcinstance[brdno]; + mod = "lpfc"; + if (log_only) { + /* system buffer only */ + switch(msg->msgType) { + case FC_LOG_MSG_TYPE_INFO: + case FC_LOG_MSG_TYPE_WARN: + /* These LOG messages appear in LOG file only */ + printk(KERN_INFO"!%s%d:%04d:%s\n", mod, ddiinst, msg->msgNum, str); + break; + case FC_LOG_MSG_TYPE_ERR_CFG: + case FC_LOG_MSG_TYPE_ERR: + /* These LOG messages appear on the monitor and in the LOG file */ + printk(KERN_WARNING"!%s%d:%04d:%s\n", mod, ddiinst, msg->msgNum, str); + break; + case FC_LOG_MSG_TYPE_PANIC: + panic("!%s%d:%04d:%s\n", mod, ddiinst, msg->msgNum, str); + break; + default: + return(0); + } + } + else { + switch(msg->msgType) { + case FC_LOG_MSG_TYPE_INFO: + case FC_LOG_MSG_TYPE_WARN: + printk(KERN_INFO"!%s%d:%04d:%s\n", mod, ddiinst, msg->msgNum, str); + break; + case FC_LOG_MSG_TYPE_ERR_CFG: + case FC_LOG_MSG_TYPE_ERR: + printk(KERN_WARNING"!%s%d:%04d:%s\n", mod, ddiinst, msg->msgNum, str); + break; + case FC_LOG_MSG_TYPE_PANIC: + panic("!%s%d:%04d:%s\n", mod, ddiinst, msg->msgNum, str); + break; + default: + return(0); + } + } + return(1); +} /* log_printf_msgblk */ + +/****************************************************************************** +* Function name : fc_write_toio +* +******************************************************************************/ +_static_ void fc_write_toio(uint32 *src, + uint32 *dest_io, + uint32 cnt) +{ + uint32 ldata; + int i; + + for (i = 0; i < (int)cnt; i += sizeof(uint32)) { + ldata = *src++; + writel(ldata, dest_io); + dest_io++; + } + return; +} + +/****************************************************************************** +* Function name : fc_read_fromio +* +* Description : +* +******************************************************************************/ +_static_ void fc_read_fromio( uint32 *src_io, + uint32 *dest, + uint32 cnt) +{ + uint32 ldata; + int i; + + for (i = 0; i < (int)cnt; i += sizeof(uint32)) { + ldata = readl(src_io); + src_io++; + *dest++ = ldata; + } + return; +} + +/****************************************************************************** +* Function name : fc_writel +* +* Description : +* +******************************************************************************/ +_static_ void fc_writel(uint32 * src_io, + uint32 ldata) +{ + writel(ldata, src_io); + return; +} + +/****************************************************************************** +* Function name : fc_readl +* +* Description : +* +******************************************************************************/ +_static_ uint32 fc_readl(uint32 *src_io) +{ + uint32 ldata; + + ldata = readl(src_io); + return(ldata); +} + + + +#ifdef MODULE +/* + * Just forget versioning? This is only for internal symbols AFAICT +#include "lpfc.ver" + */ +#endif /* MODULE */ + +#endif /* __GENKSYMS__ */ + +#ifdef MODULE + +#ifndef EXPORT_SYMTAB +#define EXPORT_SYMTAB +#endif + +int lpfc_xmit(fc_dev_ctl_t *p_dev_ctl, struct sk_buff *skb); +int lpfc_ioctl(int cmd, void *s); + +EXPORT_SYMBOL(lpfc_xmit); +EXPORT_SYMBOL(lpfc_ioctl); + +#endif /* MODULE */ + +/****************************************************************************** +* Function name : fc_ioctl +* +* Description : ioctl interface to diagnostic utilities +* called by a special character device driver (fcLINUXdiag.c) +* fd is the board number (instance), and s is a cmninfo pointer +* +******************************************************************************/ +int fc_ioctl(int cmd, + void *s) +{ + int rc, fd; + fc_dev_ctl_t *p_dev_ctl; + struct dfccmdinfo *cp = (struct dfccmdinfo *)s; + struct cmd_input *ci = (struct cmd_input *)cp->c_datain; + + if(!cp || !ci) + return EINVAL; + fd = ci->c_brd; + if(fd > DD_CTL.num_devs) + return EINVAL; + if(!(p_dev_ctl = (fc_dev_ctl_t *)DD_CTL.p_dev[fd])) + return EINVAL; + + rc = dfc_ioctl(cp, ci); + + return(rc); +} + +/****************************************************************************** +* Function name : dfc_sleep +* +* Description : +* +******************************************************************************/ +int dfc_sleep(fc_dev_ctl_t *p_dev_ctl, + fcEvent_header *ep) +{ + switch(ep->e_mask) { + case FC_REG_LINK_EVENT: + ep->e_mode |= E_SLEEPING_MODE; + interruptible_sleep_on(&p_dev_ctl->linkwq); + if (signal_pending (current)) + return(1); + break; + case FC_REG_RSCN_EVENT: + ep->e_mode |= E_SLEEPING_MODE; + interruptible_sleep_on(&p_dev_ctl->rscnwq); + if (signal_pending (current)) + return(1); + break; + case FC_REG_CT_EVENT: + ep->e_mode |= E_SLEEPING_MODE; + interruptible_sleep_on(&p_dev_ctl->ctwq); + if (signal_pending (current)) + return(1); + break; + } + return(0); +} + +/****************************************************************************** +* Function name : dfc_wakeup +* +* Description : +* +******************************************************************************/ +int dfc_wakeup(fc_dev_ctl_t *p_dev_ctl, + fcEvent_header *ep) +{ + switch(ep->e_mask) { + case FC_REG_LINK_EVENT: + ep->e_mode &= ~E_SLEEPING_MODE; + wake_up_interruptible(&p_dev_ctl->linkwq); + break; + case FC_REG_RSCN_EVENT: + ep->e_mode &= ~E_SLEEPING_MODE; + wake_up_interruptible(&p_dev_ctl->rscnwq); + break; + case FC_REG_CT_EVENT: + ep->e_mode &= ~E_SLEEPING_MODE; + wake_up_interruptible(&p_dev_ctl->ctwq); + break; + } + return(0); +} + +/****************************************************************************** +* Function name : lpfc_xmit +* +* Description : +* +******************************************************************************/ +int lpfc_xmit(fc_dev_ctl_t *p_dev_ctl, + struct sk_buff *skb) +{ + int rc; + ulong siflg, iflg; + + siflg = 0; + LPFC_LOCK_SCSI_DONE(p_dev_ctl->host); + iflg = 0; + LPFC_LOCK_DRIVER(15); + rc = fc_xmit(p_dev_ctl, skb); + LPFC_UNLOCK_DRIVER; + LPFC_UNLOCK_SCSI_DONE(p_dev_ctl->host); + return(rc); +} + +/****************************************************************************** +* Function name : lpfc_ioctl +* +* Description : +* +******************************************************************************/ +int lpfc_ioctl(int cmd, + void *s) +{ + int i, cnt, ipri; + NETDEVICE *dev; + fc_dev_ctl_t *p_dev_ctl; + FC_BRD_INFO * binfo; + iCfgParam * clp; + struct lpfn_probe *lp; + ndd_t * p_ndd; + + cnt = 0; + switch(cmd) { + case LPFN_PROBE: +#ifndef MODULE + if(lpfc_detect_called != 1) { + lpfc_detect_called = 2; /* defer calling this till after fc_detect */ + return(1); + } +#endif /* MODULE */ + + for (i = 0; i < MAX_FC_BRDS; i++) { + if((p_dev_ctl = (fc_dev_ctl_t *)DD_CTL.p_dev[i])) { + clp = DD_CTL.p_config[i]; + binfo = &BINFO; + if(clp[CFG_NETWORK_ON].a_current == 0) + continue; + ipri = disable_lock(FC_LVL, &CMD_LOCK); + if(p_dev_ctl->ihs.lpfn_dev == 0) { + unsigned int alloc_size; + + /* ensure 32-byte alignment of the private area */ + alloc_size = sizeof(NETDEVICE) + 31; + + dev = (NETDEVICE *) lpfc_kmalloc (alloc_size, GFP_KERNEL, 0, 0); + if (dev == NULL) { + unlock_enable(ipri, &CMD_LOCK); + continue; + } + memset(dev, 0, alloc_size); +#if LINUX_VERSION_CODE < LinuxVersionCode(2,4,0) + dev->name = (char *)(dev + 1); + sprintf(dev->name, "lpfn%d", binfo->fc_brd_no); + +#else + rtnl_lock(); + strcpy(dev->name, "lpfn%d"); + if (dev_alloc_name(dev, "lpfn%d")<0) { + rtnl_unlock(); + lpfc_kfree(alloc_size, (void *)dev, (void *)((ulong)INVALID_PHYS), 0); + unlock_enable(ipri, &CMD_LOCK); + continue; + } + +#endif + dev->priv = (void *)p_dev_ctl; + p_dev_ctl->ihs.lpfn_dev = dev; + + lp = (struct lpfn_probe *)s; + p_ndd = (ndd_t * ) & (NDD); + /* Initialize the device structure. */ + dev->hard_start_xmit = lp->hard_start_xmit; + dev->get_stats = lp->get_stats; + dev->open = lp->open; + dev->stop = lp->stop; + dev->hard_header = lp->hard_header; + dev->rebuild_header = lp->rebuild_header; + dev->change_mtu = lp->change_mtu; + p_ndd->nd_receive = + (void (*)(void *, struct sk_buff *, void *))(lp->receive); + + /* Assume fc header + LLC/SNAP 24 bytes */ + dev->hard_header_len = 24; + dev->type = ARPHRD_ETHER; + dev->mtu = p_dev_ctl->ihs.lpfn_mtu; + dev->addr_len = 6; + dev->tx_queue_len = 100; + + memset(dev->broadcast, 0xFF, 6); + bcopy(p_dev_ctl->phys_addr, dev->dev_addr, 6); + + /* New-style flags */ + dev->flags = IFF_BROADCAST; + register_netdevice(dev); +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) + rtnl_unlock(); +#endif + + cnt++; + } + unlock_enable(ipri, &CMD_LOCK); + } + } + break; + case LPFN_DETACH: + for (i = 0; i < MAX_FC_BRDS; i++) { + if((p_dev_ctl = (fc_dev_ctl_t *)DD_CTL.p_dev[i])) { + clp = DD_CTL.p_config[i]; + if(clp[CFG_NETWORK_ON].a_current == 0) + continue; + ipri = disable_lock(FC_LVL, &CMD_LOCK); + if((dev=p_dev_ctl->ihs.lpfn_dev)) { + unregister_netdev(dev); + dev->priv = NULL; + p_dev_ctl->ihs.lpfn_dev = 0; + cnt++; + } + unlock_enable(ipri, &CMD_LOCK); + } + } + break; + case LPFN_DFC: + break; + default: + return(0); + } + return(cnt); +} + + +/****************************************************************************** +* Function name : lpfcdfc_init +* +* Description : Register your major, and accept a dynamic number +* +******************************************************************************/ +int lpfcdfc_init(void) +{ + int result; +#ifdef powerpc + fc_dev_ctl_t *p_dev_ctl; + MBUF_INFO *buf_info; + MBUF_INFO bufinfo; + int i; +#endif + + result = register_chrdev(lpfc_major, "lpfcdfc", &lpfc_fops); + if (result < 0) { + printk(KERN_WARNING "lpfcdfc: can't get major %d\n",lpfc_major); + return result; + } + if (lpfc_major == 0) lpfc_major = result; /* dynamic */ + +#ifdef powerpc + for(i=0; i < MAX_FC_BRDS; i++) { + p_dev_ctl = (fc_dev_ctl_t *)DD_CTL.p_dev[i]; + if(p_dev_ctl) { + buf_info = &bufinfo; + buf_info->virt = 0; + buf_info->phys = 0; + buf_info->flags = (FC_MBUF_IOCTL | FC_MBUF_UNLOCK); + buf_info->align = sizeof(void *); + buf_info->size = 64 * 1024; + buf_info->dma_handle = 0; + + fc_malloc(p_dev_ctl, buf_info); + p_dev_ctl->dfc_kernel_buf = buf_info->virt; + } + } +#endif + + return 0; +} + +/****************************************************************************** +* Function name : lpfcdiag_ioctl +* +* Description : caller must insure that cmd is the board number and arg is +* the cmdinfo pointer +* +******************************************************************************/ +int lpfcdiag_ioctl(struct inode * inode, + struct file * file, + unsigned int cmd, + unsigned long arg) +{ + return -fc_ioctl(cmd, (void *)arg); +} + +/****************************************************************************** +* Function name : lpfcdiag_open +* +* Description : +* +******************************************************************************/ +int lpfcdiag_open(struct inode * inode, + struct file * file) +{ + fc_dev_ctl_t *p_dev_ctl; + struct Scsi_Host *host; + + if(((p_dev_ctl = DD_CTL.p_dev[0])) && + ((host = p_dev_ctl->host))) { + lpfcdiag_cnt++; +#if LINUX_VERSION_CODE <= LinuxVersionCode(2,5,0) +#ifdef MODULE + MOD_INC_USE_COUNT; +#endif /* MODULE */ +#endif + } + return(0); +} + +/****************************************************************************** +* Function name : lpfcdiag_release +* +* Description : +* +******************************************************************************/ +int lpfcdiag_release(struct inode * inode, + struct file * file) +{ + fc_dev_ctl_t *p_dev_ctl; + struct Scsi_Host *host; + + if(((p_dev_ctl = DD_CTL.p_dev[0])) && + ((host = p_dev_ctl->host))) { + lpfcdiag_cnt--; +#if LINUX_VERSION_CODE <= LinuxVersionCode(2,5,0) +#ifdef MODULE + MOD_DEC_USE_COUNT; +#endif /* MODULE */ +#endif + } + return(0); +} + +/****************************************************************************** +* Function name : fc_get_dds_bind +* +* Description : Called from fc_attach to setup binding parameters for adapter +******************************************************************************/ +int fc_get_dds_bind(fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO *binfo; + iCfgParam *clp; + char **arrayp; + u_int cnt; + + /* + * Check if there are any WWNN / scsid bindings + */ + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + cnt = lpfc_bind_entries; + arrayp = lpfc_fcp_bind_WWNN; + if(cnt && (*arrayp != 0)) { + fc_bind_wwnn(p_dev_ctl, arrayp, cnt); + } else { + + /* + * Check if there are any WWPN / scsid bindings + */ + arrayp = lpfc_fcp_bind_WWPN; + if(cnt && (*arrayp != 0)) { + fc_bind_wwpn(p_dev_ctl, arrayp, cnt); + } else { + + /* + * Check if there are any NPortID / scsid bindings + */ + arrayp = lpfc_fcp_bind_DID; + if(cnt && (*arrayp != 0)) { + fc_bind_did(p_dev_ctl, arrayp, cnt); + } else { + switch(clp[CFG_AUTOMAP].a_current) { + case 2: + p_dev_ctl->fcp_mapping = FCP_SEED_WWPN; + break; + case 3: + p_dev_ctl->fcp_mapping = FCP_SEED_DID; + break; + default: + p_dev_ctl->fcp_mapping = FCP_SEED_WWNN; + } + } + } + } + + clp[CFG_SCAN_DOWN].a_current = (uint32)lpfc_scandown; + if(cnt && (*arrayp != 0) && (clp[CFG_SCAN_DOWN].a_current == 2)) { + /* Scan-down is 2 with Persistent binding - ignoring scan-down */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0411, /* ptr to msg structure */ + fc_mes0411, /* ptr to msg */ + fc_msgBlk0411.msgPreambleStr, /* begin varargs */ + clp[CFG_SCAN_DOWN].a_current, + p_dev_ctl->fcp_mapping); /* end varargs */ + clp[CFG_SCAN_DOWN].a_current = 0; + } + if(clp[CFG_SCAN_DOWN].a_current > 2) { + /* Scan-down is out of range - ignoring scan-down */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0412, /* ptr to msg structure */ + fc_mes0412, /* ptr to msg */ + fc_msgBlk0412.msgPreambleStr, /* begin varargs */ + clp[CFG_SCAN_DOWN].a_current, + p_dev_ctl->fcp_mapping); /* end varargs */ + clp[CFG_SCAN_DOWN].a_current = 0; + } + return(0); +} + +/****************************************************************************** +* Function name : fc_get_dds +* +* Description : Called from fc_attach to setup configuration parameters for +* adapter +* The goal of this routine is to fill in all the a_current +* members of the CfgParam structure for all configuration +* parameters. +* Example: +* clp[CFG_XXX].a_current = (uint32)value; +* value might be a define, a global variable, clp[CFG_XXX].a_default, +* or some other enviroment specific way of initializing config parameters. +******************************************************************************/ +int fc_get_dds(fc_dev_ctl_t *p_dev_ctl, + uint32 *pio) +{ + FC_BRD_INFO *binfo; + iCfgParam *clp; + int i; + int brd; + + binfo = &BINFO; + brd = binfo->fc_brd_no; + clp = DD_CTL.p_config[brd]; + + p_dev_ctl->open_state = NORMAL_OPEN; + + /* + * Set everything to the defaults + */ + for(i=0; i < NUM_CFG_PARAM; i++) + clp[i].a_current = clp[i].a_default; + + /* Default values for I/O colaesing */ + clp[CFG_CR_DELAY].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_CR_DELAY)); + clp[CFG_CR_COUNT].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_CR_COUNT)); + + clp[CFG_AUTOMAP].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_AUTOMAP)); + + clp[CFG_LINK_SPEED].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_LINK_SPEED)); + + bcopy((uchar * )"lpfc0", (uchar *)DDS.logical_name, 6); + DDS.logical_name[4] += binfo->fc_brd_no; + DDS.logical_name[5] = 0; + + clp[CFG_INTR_ACK].a_current = (uint32)lpfc_intr_ack; + clp[CFG_IDENTIFY_SELF].a_current = 0; + clp[CFG_DEVICE_REPORT].a_current = 0; + + clp[CFG_LOG_VERBOSE].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_LOG_VERBOSE)); + clp[CFG_LOG_ONLY].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_LOG_ONLY)); + + /* Can NOT log verbose messages until you read VERBOSE config param */ + if((binfo->fc_flag & FC_2G_CAPABLE) == 0) { + /* This HBA is NOT 2G_CAPABLE */ + if( clp[CFG_LINK_SPEED].a_current > 1) { + /* Reset link speed to auto. 1G HBA cfg'd for 2G. */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1303, /* ptr to msg structure */ + fc_mes1303, /* ptr to msg */ + fc_msgBlk1303.msgPreambleStr); /* begin & end varargs */ + clp[CFG_LINK_SPEED].a_current = LINK_SPEED_AUTO; + } + } + + clp[CFG_NUM_IOCBS].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_NUM_IOCBS)); + + if (clp[CFG_NUM_IOCBS].a_current < LPFC_MIN_NUM_IOCBS) { + /* Num-iocbs too low, resetting */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0413, /* ptr to msg structure */ + fc_mes0413, /* ptr to msg */ + fc_msgBlk0413.msgPreambleStr, /* begin varargs */ + clp[CFG_NUM_IOCBS].a_current, + LPFC_MIN_NUM_IOCBS); /* end varargs */ + clp[CFG_NUM_IOCBS].a_current = LPFC_MIN_NUM_IOCBS; + } + if (clp[CFG_NUM_IOCBS].a_current > LPFC_MAX_NUM_IOCBS) { + /* Num-iocbs too high, resetting */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0414, /* ptr to msg structure */ + fc_mes0414, /* ptr to msg */ + fc_msgBlk0414.msgPreambleStr, /* begin varargs */ + clp[CFG_NUM_IOCBS].a_current, + LPFC_MAX_NUM_IOCBS); /* end varargs */ + clp[CFG_NUM_IOCBS].a_current = LPFC_MAX_NUM_IOCBS; + } + + clp[CFG_NUM_BUFS].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_NUM_BUFS)); + + if (clp[CFG_NUM_BUFS].a_current < LPFC_MIN_NUM_BUFS) { + /* Num-bufs too low, resetting */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0415, /* ptr to msg structure */ + fc_mes0415, /* ptr to msg */ + fc_msgBlk0415.msgPreambleStr, /* begin varargs */ + clp[CFG_NUM_BUFS].a_current, + LPFC_MIN_NUM_BUFS); /* end varargs */ + clp[CFG_NUM_BUFS].a_current = LPFC_MIN_NUM_BUFS; + } + if (clp[CFG_NUM_BUFS].a_current > LPFC_MAX_NUM_BUFS) { + /* Num-bufs too high, resetting */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0416, /* ptr to msg structure */ + fc_mes0416, /* ptr to msg */ + fc_msgBlk0416.msgPreambleStr, /* begin varargs */ + clp[CFG_NUM_BUFS].a_current, + LPFC_MAX_NUM_BUFS); /* end varargs */ + clp[CFG_NUM_BUFS].a_current = LPFC_MAX_NUM_BUFS; + } + + clp[CFG_FCP_ON].a_current = 1; + clp[CFG_DFT_TGT_Q_DEPTH].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_DFT_TGT_Q_DEPTH)); + clp[CFG_DFT_LUN_Q_DEPTH].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_DFT_LUN_Q_DEPTH)); + if (clp[CFG_DFT_TGT_Q_DEPTH].a_current > LPFC_MAX_TGT_Q_DEPTH ) { + /* Target qdepth too high, resetting to max */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0417, /* ptr to msg structure */ + fc_mes0417, /* ptr to msg */ + fc_msgBlk0417.msgPreambleStr, /* begin varargs */ + clp[CFG_DFT_TGT_Q_DEPTH].a_current, + LPFC_MAX_TGT_Q_DEPTH); /* end varargs */ + clp[CFG_DFT_TGT_Q_DEPTH].a_current = LPFC_MAX_TGT_Q_DEPTH; + } + if (clp[CFG_DFT_LUN_Q_DEPTH].a_current > LPFC_MAX_LUN_Q_DEPTH ) { + /* Lun qdepth too high, resetting to max */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0418, /* ptr to msg structure */ + fc_mes0418, /* ptr to msg */ + fc_msgBlk0418.msgPreambleStr, /* begin varargs */ + clp[CFG_DFT_LUN_Q_DEPTH].a_current, + LPFC_MAX_LUN_Q_DEPTH); /* end varargs */ + clp[CFG_DFT_LUN_Q_DEPTH].a_current = LPFC_MAX_LUN_Q_DEPTH; + } + if (clp[CFG_DFT_LUN_Q_DEPTH].a_current == 0 ) { + /* Lun qdepth cannot be , resetting to 1 */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0419, /* ptr to msg structure */ + fc_mes0419, /* ptr to msg */ + fc_msgBlk0419.msgPreambleStr, /* begin varargs */ + clp[CFG_DFT_LUN_Q_DEPTH].a_current ); /* end varargs */ + clp[CFG_DFT_LUN_Q_DEPTH].a_current = 1; + } + + clp[CFG_DQFULL_THROTTLE_UP_TIME].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_DQFULL_THROTTLE_UP_TIME)); + clp[CFG_DQFULL_THROTTLE_UP_INC].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_DQFULL_THROTTLE_UP_INC)); + + clp[CFG_FIRST_CHECK].a_current = (uint32)lpfc_first_check; + clp[CFG_FCPFABRIC_TMO].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_FCPFABRIC_TMO)); + if (clp[CFG_FCPFABRIC_TMO].a_current > LPFC_MAX_FABRIC_TIMEOUT) { + /* Fcpfabric_tmo too high, resetting */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0420, /* ptr to msg structure */ + fc_mes0420, /* ptr to msg */ + fc_msgBlk0420.msgPreambleStr, /* begin varargs */ + clp[CFG_FCPFABRIC_TMO].a_current, + LPFC_MAX_FABRIC_TIMEOUT); /* end varargs */ + clp[CFG_FCPFABRIC_TMO].a_current = LPFC_MAX_FABRIC_TIMEOUT; + } + + clp[CFG_FCP_CLASS].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_FCP_CLASS)); + switch (clp[CFG_FCP_CLASS].a_current) { + case 2: + clp[CFG_FCP_CLASS].a_current = CLASS2; + break; + case 3: + clp[CFG_FCP_CLASS].a_current = CLASS3; + break; + default: + /* Fcp-class is illegal, resetting to default */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0421, /* ptr to msg structure */ + fc_mes0421, /* ptr to msg */ + fc_msgBlk0421.msgPreambleStr, /* begin varargs */ + clp[CFG_FCP_CLASS].a_current, + CLASS3); /* end varargs */ + clp[CFG_FCP_CLASS].a_current = CLASS3; + break; + } + + clp[CFG_USE_ADISC].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_USE_ADISC)); + + clp[CFG_NO_DEVICE_DELAY].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_NO_DEVICE_DELAY)); + if (clp[CFG_NO_DEVICE_DELAY].a_current > LPFC_MAX_NO_DEVICE_DELAY) { + /* No-device-delay too high, resetting to max */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0422, /* ptr to msg structure */ + fc_mes0422, /* ptr to msg */ + fc_msgBlk0422.msgPreambleStr, /* begin varargs */ + clp[CFG_NO_DEVICE_DELAY].a_current, + LPFC_MAX_NO_DEVICE_DELAY); /* end varargs */ + clp[CFG_NO_DEVICE_DELAY].a_current = LPFC_MAX_NO_DEVICE_DELAY; + } + + clp[CFG_NETWORK_ON].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_NETWORK_ON)); + clp[CFG_POST_IP_BUF].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_POST_IP_BUF)); + + if (clp[CFG_POST_IP_BUF].a_current < LPFC_MIN_POST_IP_BUF) { + /* Post_ip_buf too low, resetting */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0423, /* ptr to msg structure */ + fc_mes0423, /* ptr to msg */ + fc_msgBlk0423.msgPreambleStr, /* begin varargs */ + clp[CFG_POST_IP_BUF].a_current, + LPFC_MIN_POST_IP_BUF); /* end varargs */ + clp[CFG_POST_IP_BUF].a_current = LPFC_MIN_POST_IP_BUF; + } + if (clp[CFG_POST_IP_BUF].a_current > LPFC_MAX_POST_IP_BUF) { + /* Post_ip_buf too high, resetting */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0424, /* ptr to msg structure */ + fc_mes0424, /* ptr to msg */ + fc_msgBlk0424.msgPreambleStr, /* begin varargs */ + clp[CFG_POST_IP_BUF].a_current, + LPFC_MAX_POST_IP_BUF); /* end varargs */ + clp[CFG_POST_IP_BUF].a_current = LPFC_MAX_POST_IP_BUF; + } + + clp[CFG_XMT_Q_SIZE].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_XMT_Q_SIZE)); + if (clp[CFG_XMT_Q_SIZE].a_current < LPFC_MIN_XMT_QUE_SIZE) { + /* Xmt-que_size too low, resetting */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0425, /* ptr to msg structure */ + fc_mes0425, /* ptr to msg */ + fc_msgBlk0425.msgPreambleStr, /* begin varargs */ + clp[CFG_XMT_Q_SIZE].a_current, + LPFC_MIN_XMT_QUE_SIZE); /* end varargs */ + clp[CFG_XMT_Q_SIZE].a_current = LPFC_MIN_XMT_QUE_SIZE; + } + if (clp[CFG_XMT_Q_SIZE].a_current > LPFC_MAX_XMT_QUE_SIZE) { + /* Xmt-que_size too high, resetting */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0426, /* ptr to msg structure */ + fc_mes0426, /* ptr to msg */ + fc_msgBlk0426.msgPreambleStr, /* begin varargs */ + clp[CFG_XMT_Q_SIZE].a_current, + LPFC_MAX_XMT_QUE_SIZE); /* end varargs */ + clp[CFG_XMT_Q_SIZE].a_current = LPFC_MAX_XMT_QUE_SIZE; + } + binfo->fc_ring[FC_IP_RING].fc_tx.q_max = clp[CFG_XMT_Q_SIZE].a_current; + + clp[CFG_IP_CLASS].a_current = (uint32)((ulong)fc_get_cfg_param(brd, CFG_IP_CLASS)); + switch (clp[CFG_IP_CLASS].a_current) { + case 2: + clp[CFG_IP_CLASS].a_current = CLASS2; + break; + case 3: + clp[CFG_IP_CLASS].a_current = CLASS3; + break; + default: + /* Ip-class is illegal, resetting */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0427, /* ptr to msg structure */ + fc_mes0427, /* ptr to msg */ + fc_msgBlk0427.msgPreambleStr, /* begin varargs */ + clp[CFG_IP_CLASS].a_current, + CLASS3); /* end varargs */ + clp[CFG_IP_CLASS].a_current = CLASS3; + break; + } + + clp[CFG_ZONE_RSCN].a_current = (uint32)lpfc_zone_rscn; + p_dev_ctl->vendor_flag = (uint32)lpfc_vendor; + + clp[CFG_HOLDIO].a_current = (uint32)((ulong)fc_get_cfg_param(brd, CFG_HOLDIO)); + clp[CFG_ACK0].a_current = (uint32)((ulong)fc_get_cfg_param(brd, CFG_ACK0)); + clp[CFG_TOPOLOGY].a_current = (uint32)((ulong)fc_get_cfg_param(brd, CFG_TOPOLOGY)); + + switch (clp[CFG_TOPOLOGY].a_current) { + case 0: + case 1: + case 2: + case 4: + case 6: + /* topology is a valid choice */ + break; + default: + /* Topology is illegal, resetting */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0428, /* ptr to msg structure */ + fc_mes0428, /* ptr to msg */ + fc_msgBlk0428.msgPreambleStr, /* begin varargs */ + clp[CFG_TOPOLOGY].a_current, + LPFC_DFT_TOPOLOGY); /* end varargs */ + clp[CFG_TOPOLOGY].a_current = LPFC_DFT_TOPOLOGY; + break; + } + + clp[CFG_NODEV_TMO].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_NODEV_TMO)); + clp[CFG_DELAY_RSP_ERR].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_DELAY_RSP_ERR)); + clp[CFG_CHK_COND_ERR].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_CHK_COND_ERR)); + + clp[CFG_LINKDOWN_TMO].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_LINKDOWN_TMO)); + if (clp[CFG_LINKDOWN_TMO].a_current > LPFC_MAX_LNKDWN_TIMEOUT) { + /* Linkdown_tmo too high, resetting */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0429, /* ptr to msg structure */ + fc_mes0429, /* ptr to msg */ + fc_msgBlk0429.msgPreambleStr, /* begin varargs */ + clp[CFG_LINKDOWN_TMO].a_current, + LPFC_MAX_LNKDWN_TIMEOUT); /* end varargs */ + clp[CFG_LINKDOWN_TMO].a_current = LPFC_MAX_LNKDWN_TIMEOUT; + } + + clp[CFG_LINK_SPEED].a_current = + (uint32)((ulong)fc_get_cfg_param(brd, CFG_LINK_SPEED)); + + p_dev_ctl->ihs.lpfn_mtu = lpfc_mtu; + if((lpfc_mtu % PAGE_SIZE) == 0) + p_dev_ctl->ihs.lpfn_rcv_buf_size = lpfc_mtu; + else { + p_dev_ctl->ihs.lpfn_rcv_buf_size = ((lpfc_mtu + PAGE_SIZE) & (PAGE_MASK)); + p_dev_ctl->ihs.lpfn_rcv_buf_size -= 16; + } + clp[CFG_NUM_NODES].a_current = clp[CFG_NUM_NODES].a_default; + + return(0); +} /* fc_get_dds */ + +/****************************************************************************** +* Function name : fc_bind_wwpn +* +******************************************************************************/ +_local_ int fc_bind_wwpn(fc_dev_ctl_t *p_dev_ctl, + char **arrayp, + u_int cnt) +{ + uchar *datap, *np; + NODELIST *nlp; + nodeh_t *hp; + NAME_TYPE pn; + int i, dev_index, entry, lpfc_num, rstatus; + unsigned int sum; + + FC_BRD_INFO * binfo = &BINFO; + + p_dev_ctl->fcp_mapping = FCP_SEED_WWPN; + np = (uchar *)&pn; + + for(entry = 0; entry < cnt; entry++) { + datap = (uchar *)arrayp[entry]; + if(datap == 0) + break; + /* Determined the number of ASC hex chars in WWNN & WWPN */ + for( i = 0; i < FC_MAX_WW_NN_PN_STRING; i++) { + if( fc_asc_to_hex( datap[i]) < 0) + break; + } + if((rstatus = fc_parse_binding_entry( p_dev_ctl, datap, np, + i, sizeof( NAME_TYPE), + FC_BIND_WW_NN_PN, &sum, entry, &lpfc_num)) > 0) { + if( rstatus == FC_SYNTAX_OK_BUT_NOT_THIS_BRD) + continue; + + /* WWPN binding entry : Syntax error code */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0430, /* ptr to msg structure */ + fc_mes0430, /* ptr to msg */ + fc_msgBlk0430.msgPreambleStr, /* begin varargs */ + entry, + rstatus); /* end varargs */ + goto out; + } + + /* Loop through all NODELIST entries and find + * the next available entry. + */ + if((nlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP)) == 0) { + /* WWPN binding entry: node table full */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0432, /* ptr to msg structure */ + fc_mes0432, /* ptr to msg */ + fc_msgBlk0432.msgPreambleStr); /* begin & end varargs */ + goto out; + } + fc_bzero((void *)nlp, sizeof(NODELIST)); + nlp->sync = binfo->fc_sync; + nlp->capabilities = binfo->fc_capabilities; + + nlp->nlp_state = NLP_SEED; + nlp->nlp_type = NLP_SEED_WWPN | NLP_FCP_TARGET; + + nlp->id.nlp_sid = DEV_SID(sum); + nlp->id.nlp_pan = DEV_PAN(sum); + bcopy((uchar * )&pn, &nlp->nlp_portname, sizeof(NAME_TYPE)); + + dev_index = INDEX(nlp->id.nlp_pan, nlp->id.nlp_sid); + hp = &binfo->device_queue_hash[dev_index]; + + /* Claim SCSI ID by copying bind parameter to + * proper index in device_queue_hash. + */ + bcopy(&nlp->nlp_portname, &hp->un.dev_portname, sizeof(NAME_TYPE)); + hp->node_flag = FCP_SEED_WWPN; + + fc_nlp_bind(binfo, nlp); + + out: + np = (uchar *)&pn; + } + return (0); +} /* fc_bind_wwpn */ + +/****************************************************************************** +* Function name : fc_bind_wwnn +* +* Description : p_dev_ctl, pointer to the device control area +* +******************************************************************************/ +_local_ int fc_bind_wwnn(fc_dev_ctl_t *p_dev_ctl, + char **arrayp, + u_int cnt) +{ + uchar *datap, *np; + NODELIST *nlp; + nodeh_t *hp; + NAME_TYPE pn; + int i, dev_index, entry, lpfc_num, rstatus; + unsigned int sum; + + FC_BRD_INFO * binfo = &BINFO; + + p_dev_ctl->fcp_mapping = FCP_SEED_WWNN; + np = (uchar *)&pn; + + for(entry = 0; entry < cnt; entry++) { + datap = (uchar *)arrayp[entry]; + if(datap == 0) + break; + /* Determined the number of ASC hex chars in WWNN & WWPN */ + for( i = 0; i < FC_MAX_WW_NN_PN_STRING; i++) { + if( fc_asc_to_hex( datap[i]) < 0) + break; + } + if((rstatus = fc_parse_binding_entry( p_dev_ctl, datap, np, + i, sizeof( NAME_TYPE), + FC_BIND_WW_NN_PN, &sum, entry, &lpfc_num)) > 0) { + if( rstatus == FC_SYNTAX_OK_BUT_NOT_THIS_BRD) + continue; + + /* WWNN binding entry : Syntax error code */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0431, /* ptr to msg structure */ + fc_mes0431, /* ptr to msg */ + fc_msgBlk0431.msgPreambleStr, /* begin varargs */ + entry, + rstatus); /* end varargs */ + goto out; + } + + /* Loop through all NODELIST entries and find + * the next available entry. + */ + if((nlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP)) == 0) { + /* WWNN binding entry: node table full */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0433, /* ptr to msg structure */ + fc_mes0433, /* ptr to msg */ + fc_msgBlk0433.msgPreambleStr); /* begin & end varargs */ + goto out; + } + fc_bzero((void *)nlp, sizeof(NODELIST)); + nlp->sync = binfo->fc_sync; + nlp->capabilities = binfo->fc_capabilities; + + nlp->nlp_state = NLP_SEED; + nlp->nlp_type = NLP_SEED_WWNN | NLP_FCP_TARGET; + nlp->id.nlp_sid = DEV_SID(sum); + nlp->id.nlp_pan = DEV_PAN(sum); + bcopy((uchar * )&pn, &nlp->nlp_nodename, sizeof(NAME_TYPE)); + + dev_index = INDEX(nlp->id.nlp_pan, nlp->id.nlp_sid); + hp = &binfo->device_queue_hash[dev_index]; + + /* Claim SCSI ID by copying bind parameter to + * proper index in device_queue_hash. + */ + bcopy(&nlp->nlp_nodename, &hp->un.dev_nodename, sizeof(NAME_TYPE)); + hp->node_flag = FCP_SEED_WWNN; + + fc_nlp_bind(binfo, nlp); + + out: + np = (uchar *)&pn; + } /* for loop */ + return (0); +} /* fc_bind_wwnn */ + +/****************************************************************************** +* Function name : fc_bind_did +* +* Description : p_dev_ctl, pointer to the device control area +* +******************************************************************************/ +_local_ int fc_bind_did(fc_dev_ctl_t *p_dev_ctl, + char **arrayp, + u_int cnt) +{ + uchar *datap, *np; + NODELIST *nlp; + nodeh_t *hp; + FC_BRD_INFO *binfo = &BINFO; + D_ID ndid; + int i, dev_index, entry, lpfc_num, rstatus; + unsigned int sum; + + p_dev_ctl->fcp_mapping = FCP_SEED_DID; + ndid.un.word = 0; + np = (uchar *)&ndid.un.word; + + for(entry = 0; entry < cnt; entry++) { + datap = (uchar *)arrayp[entry]; + if(datap == 0) + break; + /* Determined the number of ASC hex chars in DID */ + for( i = 0; i < FC_MAX_DID_STRING; i++) { + if( fc_asc_to_hex( datap[i]) < 0) + break; + } + if((rstatus = fc_parse_binding_entry( p_dev_ctl, datap, np, + i, sizeof(D_ID), + FC_BIND_DID, &sum, entry, &lpfc_num)) > 0) { + if( rstatus == FC_SYNTAX_OK_BUT_NOT_THIS_BRD) + continue; + + /* DID binding entry : Syntax error code */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0434, /* ptr to msg structure */ + fc_mes0434, /* ptr to msg */ + fc_msgBlk0434.msgPreambleStr, /* begin varargs */ + entry, + rstatus); /* end varargs */ + goto out; + } + + /* Loop through all NODELIST entries and find + * the next available entry. + */ + if((nlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP)) == 0) { + /* DID binding entry: node table full */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0435, /* ptr to msg structure */ + fc_mes0435, /* ptr to msg */ + fc_msgBlk0435.msgPreambleStr); /* begin & end varargs */ + goto out; + } + fc_bzero((void *)nlp, sizeof(NODELIST)); + nlp->sync = binfo->fc_sync; + nlp->capabilities = binfo->fc_capabilities; + + nlp->nlp_state = NLP_SEED; + nlp->nlp_type = NLP_SEED_DID | NLP_FCP_TARGET; + nlp->id.nlp_sid = DEV_SID(sum); + nlp->id.nlp_pan = DEV_PAN(sum); + nlp->nlp_DID = SWAP_DATA(ndid.un.word); + + dev_index = INDEX(nlp->id.nlp_pan, nlp->id.nlp_sid); + hp = &binfo->device_queue_hash[dev_index]; + + /* Claim SCSI ID by copying bind parameter to + * proper index in device_queue_hash. + */ + hp->un.dev_did = nlp->nlp_DID; + hp->node_flag = FCP_SEED_DID; + + fc_nlp_bind(binfo, nlp); + + out: + + np = (uchar *)&ndid.un.word; + } + return (0); +} + +/****************************************************************************** +* Function name : fc_bufmap +* +* Description : Maps in the specified chunk of memory, bp + len, and returns +* the number of mapped segments in the scatter list. Upon return +* phys will point to a list of physical addresses and cnt will +* point to a corresponding list of sizes. Handle will point to a +* dma handle for the I/O, if needed. +* This routine is only called by the IP portion of the driver to +* get a scatter / gather list for a specific IP packet before +* starting the I/O. +******************************************************************************/ +int fc_bufmap(fc_dev_ctl_t *p_dev_ctl, + uchar *bp, + uint32 len, + void **phys, + uint32 *cnt, + void **handle) +{ + MBUF_INFO * buf_info; + MBUF_INFO bufinfo; + + buf_info = &bufinfo; + *handle = 0; + buf_info->phys = (void *)((ulong)INVALID_PHYS); + buf_info->virt = bp; + buf_info->size = len; + buf_info->flags = (FC_MBUF_PHYSONLY | FC_MBUF_DMA); + fc_malloc(p_dev_ctl, buf_info); + + if(is_invalid_phys(buf_info->phys)) + return(0); + + phys[0] = (void *) buf_info->phys; + cnt[0] = (uint32) len; + return(1); +} + +/****************************************************************************** +* Function name : fc_bufunmap +* +* Description : This is called to unmap a piece of memory, mapped by fc_bufmap, +* and to free the asociated DMA handle, if needed. +******************************************************************************/ +void fc_bufunmap(fc_dev_ctl_t *p_dev_ctl, + uchar *addr, + uchar *dmahandle, + uint32 len) +{ + MBUF_INFO * buf_info; + MBUF_INFO bufinfo; + + buf_info = &bufinfo; + buf_info->phys = (uint32 * )addr; + buf_info->flags = (FC_MBUF_PHYSONLY | FC_MBUF_DMA); + buf_info->size = len; + fc_free(p_dev_ctl, buf_info); +} + +/****************************************************************************** +* Function name : lpfc_scsi_selto_timeout +* +* Description : call back function for scsi timeout +******************************************************************************/ +void lpfc_scsi_selto_timeout(fc_dev_ctl_t *p_dev_ctl, + void *l1, + void *l2) +{ + struct buf *bp; + + bp = (struct buf *)l1; + /* Set any necessary flags for buf error */ + if((bp->b_error != EBUSY) && (bp->b_error != EINVAL)) + bp->b_error = EIO; + bp->b_flags |= B_ERROR; + fc_do_iodone(bp); +} + +/****************************************************************************** +* Function name : lpfc_copy_sense +* +* Description : call back function for scsi timeout +******************************************************************************/ +int lpfc_copy_sense(dvi_t * dev_ptr, + struct buf * bp) +{ + struct scsi_cmnd *cmnd; + int sense_cnt; + + cmnd = bp->cmnd; + if (dev_ptr->sense_length > SCSI_SENSE_BUFFERSIZE) { + sense_cnt = SCSI_SENSE_BUFFERSIZE; + } + else { + sense_cnt = dev_ptr->sense_length; + } + /* Copy sense data into SCSI buffer */ + bcopy(dev_ptr->sense, cmnd->sense_buffer, sense_cnt); + dev_ptr->sense_valid = 0; + return(0); +} + +/****************************************************************************** +* Function name : get_cmd_off_txq +* +* Description : +* +******************************************************************************/ +IOCBQ *get_cmd_off_txq(fc_dev_ctl_t *p_dev_ctl, + ushort iotag) +{ + FC_BRD_INFO * binfo = &BINFO; + IOCBQ * iocbq, *save; + RING * rp; + unsigned long iflag; + + iflag = lpfc_q_disable_lock(p_dev_ctl); + rp = &binfo->fc_ring[FC_FCP_RING]; + iocbq = (IOCBQ * )(rp->fc_tx.q_first); + save = 0; + while (iocbq) { + if(iocbq->iocb.ulpIoTag == iotag) { + if(save) + save->q = iocbq->q; + else + rp->fc_tx.q_first = (uchar *)iocbq->q; + + if(rp->fc_tx.q_last == (uchar *)iocbq) + rp->fc_tx.q_last = (uchar *)save; + + rp->fc_tx.q_cnt--; + lpfc_q_unlock_enable(p_dev_ctl, iflag); + return iocbq; + } + save = iocbq; + iocbq = (IOCBQ * )iocbq->q; + } + + lpfc_q_unlock_enable(p_dev_ctl, iflag); + return 0; +} + +/****************************************************************************** +* Function name : find_cmd_in_txpq +* +* Description : +* +******************************************************************************/ +int find_cmd_in_txpq(fc_dev_ctl_t *p_dev_ctl, + struct scsi_cmnd *cmnd) +{ + FC_BRD_INFO * binfo = &BINFO; + struct fc_buf *fcptr, *savefc; + dvi_t * dev_ptr; + IOCBQ *iocb_cmd, *iocb_cn_cmd; + struct buf *bp; + RING * rp; + struct sc_buf *sp; + int abort_stat; + unsigned long iflag; + + iflag = lpfc_q_disable_lock(p_dev_ctl); + rp = &binfo->fc_ring[FC_FCP_RING]; + fcptr = (struct fc_buf *)(rp->fc_txp.q_first); + savefc = 0; + while (fcptr) { + if(((struct buf *)(fcptr->sc_bufp))->cmnd == cmnd) { + dev_ptr = fcptr->dev_ptr; + lpfc_q_unlock_enable(p_dev_ctl, iflag); + iocb_cmd = get_cmd_off_txq(p_dev_ctl, fcptr->iotag); + iflag = lpfc_q_disable_lock(p_dev_ctl); + if (iocb_cmd) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )iocb_cmd); + + lpfc_q_unlock_enable(p_dev_ctl, iflag); + while ((iocb_cn_cmd = get_cmd_off_txq(p_dev_ctl, fcptr->iotag))) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )iocb_cn_cmd); + } + iflag = lpfc_q_disable_lock(p_dev_ctl); + + bp = (struct buf *)fcptr->sc_bufp; + bp->b_error = ETIMEDOUT; + bp->b_flags |= B_ERROR; + lpfc_q_unlock_enable(p_dev_ctl, iflag); + fc_do_iodone(bp); + iflag = lpfc_q_disable_lock(p_dev_ctl); + + if(savefc) { + savefc->fc_fwd = fcptr->fc_fwd; + if (fcptr->fc_fwd) + fcptr->fc_fwd->fc_bkwd = savefc; + } else { + rp->fc_txp.q_first = (uchar *)(fcptr->fc_fwd); + if (fcptr->fc_fwd) + fcptr->fc_fwd->fc_bkwd = 0; + } + + if(rp->fc_txp.q_last == (uchar *)fcptr) { + rp->fc_txp.q_last = (uchar *)savefc; + } + + rp->fc_txp.q_cnt--; + lpfc_q_unlock_enable(p_dev_ctl, iflag); + fc_enq_fcbuf(fcptr); + iflag = lpfc_q_disable_lock(p_dev_ctl); + dev_ptr->active_io_count--; + if (dev_ptr->nodep) + dev_ptr->nodep->num_active_io--; + else + panic ("abort in txp: dev_ptr->nodep is NULL\n"); + } else { + sp = (struct sc_buf *)(fcptr->sc_bufp); + sp->cmd_flag |= FLAG_ABORT; + lpfc_q_unlock_enable(p_dev_ctl, iflag); + abort_stat = fc_abort_xri(binfo, fcptr->dev_ptr, + fcptr->iotag, ABORT_TYPE_ABTS); + iflag = lpfc_q_disable_lock(p_dev_ctl); + } + lpfc_q_unlock_enable(p_dev_ctl, iflag); + return 1; + } else { + savefc = fcptr; + fcptr = (struct fc_buf *)fcptr->fc_fwd; + } + } + lpfc_q_unlock_enable(p_dev_ctl, iflag); + return 0; +} + +/****************************************************************************** +* Function name : find_cmd_in_tmolist +* +* Description : +* +******************************************************************************/ +int find_cmd_in_tmolist(fc_dev_ctl_t *p_dev_ctl, + struct scsi_cmnd *cmnd) +{ + struct buf *bp, *savebp; + + savebp = 0; + for (bp = p_dev_ctl->timeout_head; bp != NULL; ) { + if (bp->cmnd == cmnd) { + if(savebp) + savebp->av_forw = bp->av_forw; + else + p_dev_ctl->timeout_head = bp->av_forw; + + p_dev_ctl->timeout_count--; + bp->b_error = ETIMEDOUT; + bp->b_flags |= B_ERROR; + fc_do_iodone(bp); + return 1; + } else { + savebp = bp; + bp = bp->av_forw; + } + } + + return 0; +} + +/****************************************************************************** +* Function name : find_cmd_in_pendlist +* +* Description : +* +******************************************************************************/ +int find_cmd_in_pendlist(dvi_t *dev_ptr, + struct scsi_cmnd *cmnd) +{ + struct buf *bp, *savebp; + node_t * nodep; + + bp = (struct buf *)dev_ptr->pend_head; + savebp = 0; + while (bp) { + if (bp->cmnd == cmnd) { + nodep = dev_ptr->nodep; + if(savebp) + savebp->av_forw = bp->av_forw; + else + dev_ptr->pend_head = (struct sc_buf *)(bp->av_forw); + + if (dev_ptr->pend_tail == (struct sc_buf *)bp) + dev_ptr->pend_tail = (struct sc_buf *)savebp; + + dev_ptr->pend_count--; + bp->b_error = ETIMEDOUT; + bp->b_flags |= B_ERROR; + fc_do_iodone(bp); + return 1; + } else { + savebp = bp; + bp = bp->av_forw; + } + } + + return 0; +} + +/****************************************************************************** +* Function name : lpfc_find_cmd +* +* Description : +* +******************************************************************************/ +_local_ int lpfc_find_cmd(fc_dev_ctl_t *p_dev_ctl, + struct scsi_cmnd *cmnd) +{ + dvi_t * dev_ptr; + struct sc_buf * sp; + + sp = (struct sc_buf *)cmnd->host_scribble; + if(sp == 0) + return 1; + dev_ptr = sp->current_devp; + if(dev_ptr) { + if (find_cmd_in_pendlist(dev_ptr, cmnd)) + goto err1; + } + + if (find_cmd_in_txpq(p_dev_ctl, cmnd)) + goto err1; + if (find_cmd_in_tmolist(p_dev_ctl, cmnd)) + goto err1; + + return 0; + +err1: + return 1; +} + +/****************************************************************************** +* Function name : lpfc_nodev +* +* Description : +* +******************************************************************************/ +void lpfc_nodev(unsigned long l) +{ + return; +} + +/****************************************************************************** +* Function name : lpfc_scsi_add_timer +* +* Description : Copied from scsi_add_timer +******************************************************************************/ +void lpfc_scsi_add_timer(struct scsi_cmnd * SCset, + int timeout) +{ + + if( SCset->eh_timeout.function != NULL ) + { + del_timer(&SCset->eh_timeout); + } + + if(SCset->eh_timeout.data != (unsigned long) SCset) { + SCset->eh_timeout.data = (unsigned long) SCset; + SCset->eh_timeout.function = (void (*)(unsigned long))lpfc_nodev; + } + SCset->eh_timeout.expires = jiffies + timeout; + + add_timer(&SCset->eh_timeout); +} + +/****************************************************************************** +* Function name : lpfc_scsi_delete_timer() +* +* Purpose: Delete/cancel timer for a given function. +* Copied from scsi_delete_timer() +* +* Arguments: SCset - command that we are canceling timer for. +* +* Returns: Amount of time remaining before command would have timed out. +******************************************************************************/ +int lpfc_scsi_delete_timer(struct scsi_cmnd * SCset) +{ + int rtn; + + rtn = jiffies - SCset->eh_timeout.expires; + del_timer(&SCset->eh_timeout); + SCset->eh_timeout.data = (unsigned long) NULL; + SCset->eh_timeout.function = NULL; + return rtn; +} + +/****************************************************************************** +* Function name : fc_device_changed +* +* Description : +* +******************************************************************************/ +int fc_device_changed(fc_dev_ctl_t *p_dev_ctl, + struct dev_info *dev_ptr) +{ + struct scsi_device *sd; + + if(lpfc_use_removable) { + sd = (struct scsi_device *)dev_ptr->scsi_dev; + if(sd) { +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) + sd->changed = 0; + sd->removable = 0; +#else + sd->online = 1; +#endif + } + } + return(0); +} +/****************************************************************************** +* Function name : fc_bcopy +* +* Description : +* +******************************************************************************/ +void fc_bcopy(void *from, + void *to, + ulong cnt) +{ + bcopy(from, to, cnt); +} + +/****************************************************************************** +* Function name : fc_bzero +* +* Description : +* +******************************************************************************/ +void fc_bzero(void *from, + ulong cnt) +{ + memset(from,0,(size_t)cnt); +} + +/****************************************************************************** +* Function name : fc_copyout +* +* Description : +* +******************************************************************************/ +int fc_copyout(uchar *from, + uchar *to, + ulong cnt) +{ + return(copyout(from, to, cnt)); +} + +/****************************************************************************** +* Function name : fc_copyin +* +* Description : +* +******************************************************************************/ +int fc_copyin(uchar *from, + uchar *to, + ulong cnt) +{ + return(copyin(from, to, cnt)); +} + +/****************************************************************************** +* Function name : lpfc_mpdata_sync +* +* Description : +* +******************************************************************************/ +void lpfc_mpdata_sync(fc_dev_ctl_t *p_dev_ctl, + void *h, + int a, + int b, + int c) +{ +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,4,0) + if(c == 1) + c = PCI_DMA_FROMDEVICE; + else + c = PCI_DMA_TODEVICE; + if(b) + fc_pci_dma_sync_single(p_dev_ctl->pcidev, (dma_addr_t)((ulong)h), b, c); + else + fc_pci_dma_sync_single(p_dev_ctl->pcidev, (dma_addr_t)((ulong)h), 4096, c); +#endif +} + +/****************************************************************************** +* Function name : lpfc_ip_rcvsz +* +* Description : +* +******************************************************************************/ +int lpfc_ip_rcvsz(fc_dev_ctl_t *p_dev_ctl) +{ + return(p_dev_ctl->ihs.lpfn_rcv_buf_size); +} + +/****************************************************************************** +* Function name : fc_dpc_lstchk +* +* Description : Since abort, device reset, bus reset, and host reset dpc lists +* all use SCp.ptr for linking, double check to make sure +* LINUX doesn't use the same Cmnd for multiple resets / aborts. +* +* XXX patman check that this still works +******************************************************************************/ +int fc_dpc_lstchk(fc_dev_ctl_t * p_dev_ctl, + struct scsi_cmnd * Cmnd) +{ + struct scsi_cmnd * aCmnd; + struct scsi_cmnd * bCmnd; + + aCmnd = (struct scsi_cmnd *)p_dev_ctl->abort_head; + bCmnd = 0; + while(aCmnd) { + /* Check for duplicate on abort list */ + if(aCmnd == Cmnd) { + if(bCmnd == 0) { + p_dev_ctl->abort_head = (void *)SCMD_NEXT(Cmnd); + } + else { + SCMD_NEXT(bCmnd) = SCMD_NEXT(Cmnd); + } + if(Cmnd == (struct scsi_cmnd *)p_dev_ctl->abort_list) + p_dev_ctl->abort_list = (void *)bCmnd; + SCMD_NEXT(Cmnd) = 0; + return(1); + } + bCmnd = aCmnd; + aCmnd = SCMD_NEXT(aCmnd); + } + aCmnd = (struct scsi_cmnd *)p_dev_ctl->rdev_head; + bCmnd = 0; + while(aCmnd) { + /* Check for duplicate on device reset list */ + if(aCmnd == Cmnd) { + if(bCmnd == 0) { + p_dev_ctl->rdev_head = (void *)SCMD_NEXT(Cmnd); + } + else { + SCMD_NEXT(bCmnd) = SCMD_NEXT(Cmnd); + } + if(Cmnd == (struct scsi_cmnd *)p_dev_ctl->rdev_list) + p_dev_ctl->rdev_list = (void *)bCmnd; + SCMD_NEXT(Cmnd) = 0; + return(2); + } + bCmnd = aCmnd; + aCmnd = SCMD_NEXT(aCmnd); + } + aCmnd = (struct scsi_cmnd *)p_dev_ctl->rbus_head; + bCmnd = 0; + while(aCmnd) { + /* Check for duplicate on bus reset list */ + if(aCmnd == Cmnd) { + if(bCmnd == 0) { + p_dev_ctl->rbus_head = (void *)SCMD_NEXT(Cmnd); + } + else { + SCMD_NEXT(bCmnd) = SCMD_NEXT(Cmnd); + } + if(Cmnd == (struct scsi_cmnd *)p_dev_ctl->rbus_list) + p_dev_ctl->rbus_list = (void *)bCmnd; + SCMD_NEXT(Cmnd) = 0; + return(3); + } + bCmnd = aCmnd; + aCmnd = SCMD_NEXT(aCmnd); + } + aCmnd = (struct scsi_cmnd *)p_dev_ctl->rhst_head; + bCmnd = 0; + while(aCmnd) { + /* Check for duplicate on host reset list */ + if(aCmnd == Cmnd) { + if(bCmnd == 0) { + p_dev_ctl->rhst_head = (void *)SCMD_NEXT(Cmnd); + } + else { + SCMD_NEXT(bCmnd) = SCMD_NEXT(Cmnd); + } + if(Cmnd == (struct scsi_cmnd *)p_dev_ctl->rhst_list) + p_dev_ctl->rhst_list = (void *)bCmnd; + SCMD_NEXT(Cmnd) = 0; + return(4); + } + bCmnd = aCmnd; + aCmnd = SCMD_NEXT(aCmnd); + } + return(0); +} + +/****************************************************************************** +* Function name : fc_timer +* +* Description : This function will be called by the driver every second. +******************************************************************************/ +_static_ void lpfc_timer(void *p) +{ + fc_dev_ctl_t * p_dev_ctl; + FCCLOCK_INFO * clock_info; + ulong tix; + FCCLOCK * x; + int ipri; + + clock_info = &DD_CTL.fc_clock_info; + ipri = disable_lock(CLK_LVL, &CLOCK_LOCK); + + /* + *** Increment time_sample value + */ + clock_info->ticks++; + + x = clock_info->fc_clkhdr.cl_f; + + /* counter for propagating negative values */ + tix = 0; + /* If there are expired clocks */ + if (x != (FCCLOCK * ) & clock_info->fc_clkhdr) { + x->cl_tix = x->cl_tix - 1; + if (x->cl_tix <= 0) { + /* Loop thru all clock blocks */ + while (x != (FCCLOCK * ) & clock_info->fc_clkhdr) { + x->cl_tix += tix; + /* If # of ticks left > 0, break out of loop */ + if (x->cl_tix > 0) + break; + tix = x->cl_tix; + + fc_deque(x); + /* Decrement count of unexpired clocks */ + clock_info->fc_clkhdr.count--; + + unlock_enable(ipri, &CLOCK_LOCK); + + p_dev_ctl = x->cl_p_dev_ctl; + + if(p_dev_ctl) { + /* Queue clock blk to appropriate dpc to be processed */ + if(p_dev_ctl->qclk_head == NULL) { + p_dev_ctl->qclk_head = (void *)x; + p_dev_ctl->qclk_list = (void *)x; + } else { + ((FCCLOCK *)(p_dev_ctl->qclk_list))->cl_fw = x; + p_dev_ctl->qclk_list = (void *)x; + } + x->cl_fw = NULL; + } + else { + /* Call timeout routine */ + (*x->cl_func) (p_dev_ctl, x->cl_arg1, x->cl_arg2); + /* Release clock block */ + fc_clkrelb(p_dev_ctl, x); + } + + ipri = disable_lock(CLK_LVL, &CLOCK_LOCK); + + x = clock_info->fc_clkhdr.cl_f; + } + } + } + unlock_enable(ipri, &CLOCK_LOCK); + fc_reset_timer(); +} + +/****************************************************************************** +* Function name : do_fc_timer +* +* Description : +* +******************************************************************************/ +int do_fc_timer(fc_dev_ctl_t *p_dev_ctl) +{ + FCCLOCK *x; + FCCLOCK *cb; + + cb = (FCCLOCK *)p_dev_ctl->qclk_head; + while(cb) { + x = cb; + cb = cb->cl_fw; + /* Call timeout routine */ + (*x->cl_func) (p_dev_ctl, x->cl_arg1, x->cl_arg2); + /* Release clock block */ + fc_clkrelb(p_dev_ctl, x); + } + p_dev_ctl->qclk_head = 0; + p_dev_ctl->qclk_list = 0; + return(0); +} + +/****************************************************************************** +* Function name : lpfc_kmalloc +* +* Description : +* +******************************************************************************/ +void * lpfc_kmalloc(unsigned int size, + unsigned int type, + void **pphys, + fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO * binfo; + void * pcidev; + void * virt; + struct fc_mem_pool * fmp; + dma_addr_t phys; + int i, instance; + +/* printk("lpfc_kmalloc: %d %d %lx %lx\n", size, type, pphys, p_dev_ctl); +*/ + if(pphys == 0) { + virt = (void *)kmalloc(size, type); + return(virt); + } + if(p_dev_ctl == 0) { + /* lpfc_kmalloc: Bad p_dev_ctl */ + fc_log_printf_msg_vargs( 0, /* force brd 0, no p_dev_ctl */ + &fc_msgBlk1201, /* ptr to msg structure */ + fc_mes1201, /* ptr to msg */ + fc_msgBlk1201.msgPreambleStr, /* begin varargs */ + size, + type, + fc_idx_dmapool[0]); /* end varargs */ + return(0); + } + instance = p_dev_ctl->info.fc_brd_no; + pcidev = p_dev_ctl->pcidev; + binfo = &BINFO; + + if(size > FC_MAX_SEGSZ) { + /* lpfc_kmalloc: Bad size */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1202, /* ptr to msg structure */ + fc_mes1202, /* ptr to msg */ + fc_msgBlk1202.msgPreambleStr, /* begin varargs */ + size, + type, + fc_idx_dmapool[instance]); /* end varargs */ + return(0); + } +top: + fmp = fc_mem_dmapool[instance]; + for(i=0;i<=fc_idx_dmapool[instance];i++) { + fmp = (fc_mem_dmapool[instance] + i); + if((fmp->p_virt == 0) || (fmp->p_left >= size)) + break; + } + if(i == (fc_size_dmapool[instance] - 2)) { + /* Lets make it bigger */ + fc_size_dmapool[instance] += FC_MAX_POOL; + fmp = kmalloc((sizeof(struct fc_mem_pool) * fc_size_dmapool[instance]), + GFP_ATOMIC); + if(fmp) { + fc_bzero((void *)fmp, + (sizeof(struct fc_mem_pool) * fc_size_dmapool[instance])); + fc_bcopy((void *)fc_mem_dmapool[instance], fmp, + (sizeof(struct fc_mem_pool) * (fc_size_dmapool[instance]-FC_MAX_POOL))); + kfree(fc_mem_dmapool[instance]); + fc_mem_dmapool[instance] = fmp; + goto top; + } + goto out; + } + + if(fmp->p_virt == 0) { + virt = pci_alloc_consistent(pcidev, FC_MAX_SEGSZ, &phys); + if(virt) { + fmp->p_phys = (void *)((ulong)phys); + fmp->p_virt = virt; + fmp->p_refcnt = 0; + fmp->p_left = (ushort)FC_MAX_SEGSZ; + if(i == fc_idx_dmapool[instance]) + if(i < (fc_size_dmapool[instance] - 2)) + fc_idx_dmapool[instance]++; + } + else { + /* lpfc_kmalloc: Bad virtual addr */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1204, /* ptr to msg structure */ + fc_mes1204, /* ptr to msg */ + fc_msgBlk1204.msgPreambleStr, /* begin varargs */ + i, + size, + type, + fc_idx_dmapool[instance]); /* end varargs */ + return(0); + } + } + + if(fmp->p_left >= size) { + fmp->p_refcnt++; + virt = (void *)((uchar *)fmp->p_virt + FC_MAX_SEGSZ - fmp->p_left); + phys = (dma_addr_t)(ulong)((uchar *)fmp->p_phys + FC_MAX_SEGSZ - fmp->p_left); + *pphys = (void *)((ulong)phys); + fmp->p_left -= size; + return(virt); + } +out: + /* lpfc_kmalloc: dmapool FULL */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1205, /* ptr to msg structure */ + fc_mes1205, /* ptr to msg */ + fc_msgBlk1205.msgPreambleStr, /* begin varargs */ + i, + size, + type, + fc_idx_dmapool[instance]); /* end varargs */ + return(0); +} + +/****************************************************************************** +* Function name : lpfc_kfree +* +* Description : +* +******************************************************************************/ +void lpfc_kfree(unsigned int size, + void *virt, + void *phys, + fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO * binfo; + struct fc_mem_pool * fmp; + void * pcidev; + int i, instance; + + if(is_invalid_phys(phys)) { + kfree(virt); + return; + } + + if(p_dev_ctl == 0) { + /* lpfc_kfree: Bad p_dev_ctl */ + fc_log_printf_msg_vargs( 0, /* force brd 0, no p_dev_ctl */ + &fc_msgBlk1206, /* ptr to msg structure */ + fc_mes1206, /* ptr to msg */ + fc_msgBlk1206.msgPreambleStr, /* begin varargs */ + size, + fc_idx_dmapool[0]); /* end varargs */ + return; + } + + instance = p_dev_ctl->info.fc_brd_no; + pcidev = p_dev_ctl->pcidev; + binfo = &BINFO; + + + for(i=0;i= fmp->p_virt) && + (virt < (void *)((uchar *)fmp->p_virt + FC_MAX_SEGSZ))) { + fmp->p_refcnt--; + if(fmp->p_refcnt == 0) { + pci_free_consistent(pcidev, FC_MAX_SEGSZ, + fmp->p_virt, (dma_addr_t)((ulong)fmp->p_phys)); + fc_bzero((void *)fmp, sizeof(struct fc_mem_pool)); + } + return; + } + } + /* lpfc_kfree: NOT in dmapool */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1207, /* ptr to msg structure */ + fc_mes1207, /* ptr to msg */ + fc_msgBlk1207.msgPreambleStr, /* begin varargs */ + (uint32)((ulong)virt), + size, + fc_idx_dmapool[instance]); /* end varargs */ + return; +} /* lpfc_kfree */ + +MODULE_LICENSE("GPL"); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fcLINUXlan.c 999-mjb/drivers/scsi/lpfc/fcLINUXlan.c --- 000-virgin/drivers/scsi/lpfc/fcLINUXlan.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fcLINUXlan.c 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,376 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,4) +#include +#else +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define LinuxVersionCode(v, p, s) (((v)<<16)+((p)<<8)+(s)) +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,17) +#include +#else +#include +#endif +#include +#include +#include + +#ifdef MODULE +#include +#include "lpfc.ver" +#else +extern int lpfn_probe(void); +#endif /* MODULE */ + +/* fcLINUXlan.c IP interface network driver */ +#include "fc_os.h" +#include "fc_hw.h" +#include "fc.h" + +static int lpfn_xmit(struct sk_buff *skb, NETDEVICE *dev); +static struct enet_statistics *lpfn_get_stats(NETDEVICE *dev); + +extern int arp_find(unsigned char *haddr, struct sk_buff *skb); +extern int lpfc_xmit(fc_dev_ctl_t *p_dev_ctl, struct sk_buff *skb); +extern int lpfc_ioctl(int cmd, void *s); + +/****************************************************************************** +* Function name : lpfn_open +* +* Description : +* +******************************************************************************/ +static int lpfn_open(NETDEVICE *dev) +{ + fc_dev_ctl_t *p_dev_ctl; + FC_BRD_INFO * binfo; + + if((p_dev_ctl = (fc_dev_ctl_t *)(dev->priv)) == 0) + return(-ENODEV); + binfo = &BINFO; + p_dev_ctl->device_state = OPENED; + binfo->fc_open_count |= FC_LAN_OPEN; + + netdevice_start(dev); + netif_start_queue(dev); +#ifdef MODULE + MOD_INC_USE_COUNT; +#endif /* MODULE */ + return 0; +} + +/****************************************************************************** +* Function name : lpfn_close +* +* Description : +* +******************************************************************************/ +static int lpfn_close(NETDEVICE *dev) +{ + fc_dev_ctl_t *p_dev_ctl; + FC_BRD_INFO * binfo; + + if((p_dev_ctl = (fc_dev_ctl_t *)(dev->priv)) == 0) + return(-ENODEV); + binfo = &BINFO; + p_dev_ctl->device_state = 0; + binfo->fc_open_count &= ~FC_LAN_OPEN; + + netdevice_stop(dev); + netif_stop_queue(dev); +#ifdef MODULE + MOD_DEC_USE_COUNT; +#endif /* MODULE */ + return 0; +} + +/****************************************************************************** +* Function name : lpfn_change_mtu +* +* Description : +* +******************************************************************************/ +int lpfn_change_mtu(NETDEVICE *dev, + int new_mtu) +{ + fc_dev_ctl_t *p_dev_ctl; + + if((p_dev_ctl = (fc_dev_ctl_t *)(dev->priv)) == 0) + return(-ENODEV); + if ((new_mtu < FC_MIN_MTU) || (new_mtu > p_dev_ctl->ihs.lpfn_mtu)) + return -EINVAL; + dev->mtu = new_mtu; + return(0); +} + + +/****************************************************************************** +* Function name : lpfn_header +* +* Description : Create the FC MAC/LLC/SNAP header for an arbitrary protocol +* layer +* saddr=NULL means use device source address +* daddr=NULL means leave destination address (eg unresolved arp) +* +******************************************************************************/ +int lpfn_header(struct sk_buff *skb, + NETDEVICE *dev, + unsigned short type, + void *daddr, + void *saddr, + unsigned len) +{ + struct fc_nethdr *fchdr; + int rc; + + if (type == ETH_P_IP || type == ETH_P_ARP) { + fchdr = (struct fc_nethdr *)skb_push(skb, sizeof(struct fc_nethdr)); + + fchdr->llc.dsap = FC_LLC_DSAP; /* DSAP */ + fchdr->llc.ssap = FC_LLC_SSAP; /* SSAP */ + fchdr->llc.ctrl = FC_LLC_CTRL; /* control field */ + fchdr->llc.prot_id[0] = 0; /* protocol id */ + fchdr->llc.prot_id[1] = 0; /* protocol id */ + fchdr->llc.prot_id[2] = 0; /* protocol id */ + fchdr->llc.type = htons(type); /* type field */ + rc = sizeof(struct fc_nethdr); + } + else { +printk("lpfn_header:Not IP or ARP: %x\n",type); + + fchdr = (struct fc_nethdr *)skb_push(skb, sizeof(struct fc_nethdr)); + rc = sizeof(struct fc_nethdr); + } + + /* Set the source and destination hardware addresses */ + if (saddr != NULL) + memcpy(fchdr->fcnet.fc_srcname.IEEE, saddr, dev->addr_len); + else + memcpy(fchdr->fcnet.fc_srcname.IEEE, dev->dev_addr, dev->addr_len); + + fchdr->fcnet.fc_srcname.nameType = NAME_IEEE; /* IEEE name */ + fchdr->fcnet.fc_srcname.IEEEextMsn = 0; + fchdr->fcnet.fc_srcname.IEEEextLsb = 0; + + + if (daddr != NULL) + { + memcpy(fchdr->fcnet.fc_destname.IEEE, daddr, dev->addr_len); + fchdr->fcnet.fc_destname.nameType = NAME_IEEE; /* IEEE name */ + fchdr->fcnet.fc_destname.IEEEextMsn = 0; + fchdr->fcnet.fc_destname.IEEEextLsb = 0; + return(rc); + } + + return(-rc); +} + +/****************************************************************************** +* Function name : lpfn_rebuild_header +* +* Description : Rebuild the FC MAC/LLC/SNAP header. +* This is called after an ARP (or in future other address +* resolution) has completed on this sk_buff. +* We now let ARP fill in the other fields. +******************************************************************************/ +int lpfn_rebuild_header(struct sk_buff *skb) +{ + struct fc_nethdr *fchdr = (struct fc_nethdr *)skb->data; + NETDEVICE *dev = skb->dev; + + if (fchdr->llc.type == htons(ETH_P_IP)) { + return arp_find(fchdr->fcnet.fc_destname.IEEE, skb); + } + + printk("%s: unable to resolve type %X addresses.\n", + dev->name, (int)fchdr->llc.type); + + memcpy(fchdr->fcnet.fc_srcname.IEEE, dev->dev_addr, dev->addr_len); + fchdr->fcnet.fc_srcname.nameType = NAME_IEEE; /* IEEE name */ + fchdr->fcnet.fc_srcname.IEEEextMsn = 0; + fchdr->fcnet.fc_srcname.IEEEextLsb = 0; + + return 0; +} + +/****************************************************************************** +* Function name : lpfn_xmit +* +* Description : +* +******************************************************************************/ +static int lpfn_xmit(struct sk_buff *skb, + NETDEVICE *dev) +{ + fc_dev_ctl_t *p_dev_ctl; + int rc; + + + p_dev_ctl = (fc_dev_ctl_t *)dev->priv; + rc=lpfc_xmit(p_dev_ctl, skb); + return rc; +} + +/****************************************************************************** +* Function name : lpfn_receive +* +* Description : +* +******************************************************************************/ +_static_ void lpfn_receive(ndd_t *p_ndd, + struct sk_buff *skb, + void *p) +{ + fc_dev_ctl_t *p_dev_ctl; + NETDEVICE *dev; + struct fc_nethdr *fchdr = (struct fc_nethdr *)skb->data; + struct ethhdr *eth; + unsigned short *sp; + + p_dev_ctl = (fc_dev_ctl_t *)p; + dev = p_dev_ctl->ihs.lpfn_dev; + skb->dev = dev; + + skb->mac.raw=fchdr->fcnet.fc_destname.IEEE; + sp = (unsigned short *)fchdr->fcnet.fc_srcname.IEEE; + *(sp - 1) = *sp; + sp++; + *(sp - 1) = *sp; + sp++; + *(sp - 1) = *sp; + + skb_pull(skb, dev->hard_header_len); + eth= skb->mac.ethernet; + + if(*eth->h_dest&1) { + if(memcmp(eth->h_dest,dev->broadcast, ETH_ALEN)==0) + skb->pkt_type=PACKET_BROADCAST; + else + skb->pkt_type=PACKET_MULTICAST; + } + + else if(dev->flags&(IFF_PROMISC)) { + if(memcmp(eth->h_dest,dev->dev_addr, ETH_ALEN)) + skb->pkt_type=PACKET_OTHERHOST; + } + + skb->protocol = fchdr->llc.type; + + if (skb->protocol == ntohs(ETH_P_ARP)) + skb->data[1] = 0x06; + + + netif_rx(skb); +} + +/****************************************************************************** +* Function name : lpfn_get_stats +* +* Description : +* +******************************************************************************/ +static struct enet_statistics *lpfn_get_stats(NETDEVICE *dev) +{ + fc_dev_ctl_t *p_dev_ctl; + struct enet_statistics *stats; + + p_dev_ctl = (fc_dev_ctl_t *)dev->priv; + stats = &NDDSTAT.ndd_enet; + return stats; +} + +#ifdef MODULE +/****************************************************************************** +* Function name : init_module +* +* Description : +* +******************************************************************************/ +int init_module(void) +#else +/****************************************************************************** +* Function name : lpfn_probe +* +* Description : +* +******************************************************************************/ +int lpfn_probe(void) +#endif /* MODULE */ +{ + struct lpfn_probe lp; + + lp.hard_start_xmit = &lpfn_xmit; + lp.receive = &lpfn_receive; + lp.get_stats = &lpfn_get_stats; + lp.open = &lpfn_open; + lp.stop = &lpfn_close; + lp.hard_header = &lpfn_header; + lp.rebuild_header = &lpfn_rebuild_header; + lp.change_mtu = &lpfn_change_mtu; + if(lpfc_ioctl(LPFN_PROBE,(void *)&lp) == 0) + return -ENODEV; + + return 0; +} + +#ifdef MODULE +/****************************************************************************** +* Function name : cleanup_module +* +* Description : +* +******************************************************************************/ +void cleanup_module(void) +{ + lpfc_ioctl(LPFN_DETACH,0); +} +MODULE_LICENSE("GPL"); +#endif /* MODULE */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fc_crtn.h 999-mjb/drivers/scsi/lpfc/fc_crtn.h --- 000-virgin/drivers/scsi/lpfc/fc_crtn.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fc_crtn.h 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,254 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +/* Module fcxmitb.c External Routine Declarations */ +_forward_ int fc_create_xri(FC_BRD_INFO *binfo, RING *rp, NODELIST *nlp); +_forward_ void fc_restartio(fc_dev_ctl_t *p_dev_ctl, NODELIST *nlp); +_forward_ IOCBQ *fc_ringtx_drain(RING *rp); +_forward_ IOCBQ *fc_ringtx_get(RING *rp); +_forward_ void fc_ringtx_put(RING *rp, IOCBQ *iocbq); +_forward_ IOCBQ *fc_ringtxp_get(RING *rp, ushort iotag); +_forward_ void fc_ringtxp_put(RING *rp, IOCBQ *iocbq); +_forward_ int fc_xmit(fc_dev_ctl_t *p_dev_ctl, fcipbuf_t *p_mbuf); +_forward_ int handle_create_xri(fc_dev_ctl_t *p_dev_ctl, RING *rp,IOCBQ *tmp); +_forward_ int handle_xmit_cmpl(fc_dev_ctl_t *p_dev_ctl, RING *rp, IOCBQ *tmp); + + + +/* Module fcelsb.c External Routine Declarations */ +_forward_ int fc_chkpadisc(FC_BRD_INFO *binfo, NODELIST *nlp, + volatile NAME_TYPE *nn, volatile NAME_TYPE *pn); +_forward_ int fc_els_cmd(FC_BRD_INFO *binfo, uint32 type, void *arg, + uint32 class, ushort iotag, NODELIST *nlp); +_forward_ int fc_els_rsp(FC_BRD_INFO *binfo, uint32 type, uint32 Xri, + uint32 class, void *iocbp, uint32 flag, NODELIST *nlp); +_forward_ void fc_snd_flogi(fc_dev_ctl_t *p_dev_ctl, void *a1, void *a2); +_forward_ int fc_initial_flogi(fc_dev_ctl_t * p_dev_ctl); +_forward_ int handle_els_event(fc_dev_ctl_t *p_dev_ctl, RING *rp, IOCBQ *temp); +_forward_ int handle_rcv_els_req(fc_dev_ctl_t *p_dev_ctl, RING *rp, IOCBQ *temp); +_forward_ int fc_process_rscn(fc_dev_ctl_t *p_dev_ctl, IOCBQ *temp, MATCHMAP *mp); +_forward_ int fc_handle_rscn(fc_dev_ctl_t *p_dev_ctl, D_ID *didp); +_forward_ int fc_issue_ct_req(FC_BRD_INFO *binfo, uint32 portid, MATCHMAP *bmp, DMATCHMAP *inmp, DMATCHMAP *outmp, uint32 tmo); +_forward_ int fc_gen_req(FC_BRD_INFO *binfo, MATCHMAP *bmp, MATCHMAP *inmp, MATCHMAP *outmp, uint32 rpi, uint32 flag, uint32 cnt, uint32 tmo); +_forward_ int fc_issue_ct_rsp(FC_BRD_INFO *binfo, uint32 tag, MATCHMAP *bmp, DMATCHMAP *inp); +_forward_ int fc_rnid_req(FC_BRD_INFO *binfo, DMATCHMAP *inp, DMATCHMAP *outp, + MATCHMAP **bmp, uint32 rpi); +_forward_ void fc_issue_ns_query(fc_dev_ctl_t *p, void *a1, void *a2); +_forward_ int fc_flush_rscn_defer(fc_dev_ctl_t *p_dev_ctl); +_forward_ int fc_abort_discovery( fc_dev_ctl_t *p_dev_ctl); +/* FDMI */ +_forward_ int fc_fdmi_cmd(fc_dev_ctl_t *p_dev_ctl, NODELIST *ndlp, int cmdcode); +_forward_ void fc_fdmi_rsp(fc_dev_ctl_t *p_dev_ctl, MATCHMAP *mp, MATCHMAP *rsp_mp); +_forward_ void fc_plogi_put(FC_BRD_INFO *binfo, IOCBQ *iocbq); +_forward_ IOCBQ * fc_plogi_get(FC_BRD_INFO *binfo); + + + +/* Module fcmboxb.c External Routine Declarations */ +_forward_ void fc_clear_la(FC_BRD_INFO *binfo, MAILBOX *mb); +_forward_ void fc_read_status(FC_BRD_INFO *binfo, MAILBOX *mb); +_forward_ void fc_read_lnk_stat(FC_BRD_INFO *binfo, MAILBOX *mb); +_forward_ void fc_config_link(fc_dev_ctl_t *p_dev_ctl, MAILBOX *mb); +_forward_ int fc_config_port(FC_BRD_INFO *binfo, MAILBOX *mb, uint32 *hbainit); +_forward_ void fc_config_ring(FC_BRD_INFO *binfo, int ring, int profile, + MAILBOX *mb); +_forward_ void fc_init_link(FC_BRD_INFO *binfo, MAILBOX *mb, + uint32 topology, uint32 linkspeed); +_forward_ MAILBOXQ *fc_mbox_get(FC_BRD_INFO *binfo); +_forward_ int fc_read_la(fc_dev_ctl_t *p_dev_ctl, MAILBOX *mb); +_forward_ void fc_mbox_put(FC_BRD_INFO *binfo, MAILBOXQ *mbq); +_forward_ void fc_read_rev(FC_BRD_INFO *binfo, MAILBOX *mb); +_forward_ int fc_read_rpi(FC_BRD_INFO *binfo, uint32 rpi,MAILBOX *mb,uint32 flg); +_forward_ int fc_read_sparam(fc_dev_ctl_t *p_dev_ctl, MAILBOX *mb); +_forward_ int fc_reg_login(FC_BRD_INFO *binfo, uint32 did, uchar *param, + MAILBOX *mb, uint32 flag); +_forward_ void fc_set_slim(FC_BRD_INFO *binfo, MAILBOX *mb, uint32 addr, + uint32 value); +_forward_ void fc_unreg_login(FC_BRD_INFO *binfo, uint32 rpi, MAILBOX *mb); +_forward_ void fc_unreg_did(FC_BRD_INFO *binfo, uint32 did, MAILBOX *mb); +_forward_ void fc_dump_mem(FC_BRD_INFO *binfo, MAILBOX *mb); + +_forward_ void fc_config_farp(FC_BRD_INFO *binfo, MAILBOX *mb); +_forward_ void fc_read_config(FC_BRD_INFO *binfo, MAILBOX *mb); + +/* Module fcmemb.c External Routine Declarations */ +_forward_ void fc_disable_tc(FC_BRD_INFO *binfo, MAILBOX *mb); +_forward_ MATCHMAP *fc_getvaddr(fc_dev_ctl_t *p_dev_ctl, RING *rp, uchar *mapbp); +_forward_ uchar *fc_mem_get(FC_BRD_INFO *binfo, uint32 seg); +_forward_ uchar *fc_mem_put(FC_BRD_INFO *binfo, uint32 seg, uchar *bp); +_forward_ int fc_free_buffer(fc_dev_ctl_t *p_dev_ctl); +_forward_ int fc_malloc_buffer(fc_dev_ctl_t *p_dev_ctl); +_forward_ void fc_mapvaddr(FC_BRD_INFO *binfo, RING *rp, MATCHMAP *mp, + uint32 *haddr, uint32 *laddr); +_forward_ int fc_runBIUdiag(FC_BRD_INFO *binfo, MAILBOX *mb, uchar *in, + uchar *out); + + +/* Module fcclockb.c External Routine Declarations */ +_forward_ void fc_clkrelb(fc_dev_ctl_t *p_dev_ctl, FCCLOCK *cb); +_forward_ int fc_clk_can(fc_dev_ctl_t *p_dev_ctl, FCCLOCK *cb); +_forward_ FCCLOCK *fc_clk_set(fc_dev_ctl_t *p_dev_ctl, ulong tix, + void (*func)(fc_dev_ctl_t*, void*, void*), void *arg1, void *arg2); +_forward_ ulong fc_clk_res(fc_dev_ctl_t *p_dev_ctl, ulong tix, FCCLOCK *cb); +_forward_ void fc_timer(void *); +_forward_ void fc_clock_deque(FCCLOCK *cb); +_forward_ void fc_clock_init(void); +_forward_ void fc_flush_clk_set(fc_dev_ctl_t *p_dev_ctl, + void (*func)(fc_dev_ctl_t*, void*, void*)); +_forward_ int fc_abort_clk_blk(fc_dev_ctl_t *p_dev_ctl, + void (*func)(fc_dev_ctl_t*, void*, void*), void *a1, void *a2); +_forward_ int fc_abort_delay_els_cmd( fc_dev_ctl_t *p_dev_ctl, uint32 did); +_forward_ void fc_q_depth_up(fc_dev_ctl_t *p_dev_ctl, void *, void *); +_forward_ void fc_establish_link_tmo(fc_dev_ctl_t *p_dev_ctl, void *, void *); +/* QFULL_RETRY */ +_forward_ void fc_qfull_retry(void *); +_forward_ void fc_reset_timer(void); + +/* Module fcrpib.c External Routine Declarations */ +_forward_ int fc_discovery(fc_dev_ctl_t *p_dev_ctl); +_forward_ ushort fc_emac_lookup(FC_BRD_INFO *binfo, uchar *addr, + NODELIST **nlpp); +_forward_ int fc_fanovery(fc_dev_ctl_t *p_dev_ctl); +_forward_ NODELIST *fc_findnode_rpi(FC_BRD_INFO *binfo, uint32 rpi); +_forward_ int fc_free_rpilist(fc_dev_ctl_t *p_dev_ctl, int keeprpi); +_forward_ void fc_freebufq(fc_dev_ctl_t *p_dev_ctl, RING *rp, IOCBQ *xmitiq); +_forward_ int fc_freenode(FC_BRD_INFO *binfo, NODELIST *nlp, int rm); +_forward_ int fc_freenode_did(FC_BRD_INFO *binfo, uint32 did, int rm); +_forward_ int fc_nlpadjust(FC_BRD_INFO *binfo); +_forward_ int fc_rpi_abortxri(FC_BRD_INFO *binfo, ushort xri); +_forward_ int fc_nlp_bind(FC_BRD_INFO *binfo, NODELIST *nlp); +_forward_ int fc_nlp_unmap(FC_BRD_INFO *binfo, NODELIST *nlp); +_forward_ int fc_nlp_map(FC_BRD_INFO *binfo, NODELIST *nlp); +_forward_ NODELIST *fc_findnode_odid(FC_BRD_INFO *binfo, uint32 order, uint32 did); +_forward_ NODELIST *fc_findnode_scsid(FC_BRD_INFO *binfo, uint32 order, uint32 scid); +_forward_ NODELIST *fc_findnode_wwpn(FC_BRD_INFO *binfo, uint32 odr, NAME_TYPE *wwp); +_forward_ NODELIST *fc_findnode_wwnn(FC_BRD_INFO *binfo, uint32 odr, NAME_TYPE *wwn); +_forward_ NODELIST *fc_findnode_oxri(FC_BRD_INFO *binfo, uint32 order, uint32 xri); +_forward_ int fc_nlp_logi(FC_BRD_INFO *binfo, NODELIST *nlp, NAME_TYPE *wwpnp, + NAME_TYPE *wwnnp); +_forward_ int fc_nlp_swapinfo(FC_BRD_INFO *binfo, NODELIST *onlp, NODELIST *nnlp); + + +/* Module fcstratb.c External Routine Declarations */ +_forward_ dvi_t *fc_fcp_abort(fc_dev_ctl_t *p, int flg, int tgt, int lun); +_forward_ int fc_assign_scsid(fc_dev_ctl_t *ap, NODELIST *nlp); +_forward_ fc_buf_t *fc_deq_fcbuf_active(RING *rp, ushort iotag); +_forward_ fc_buf_t *fc_deq_fcbuf(dvi_t *di); +_forward_ void fc_enq_abort_bdr(dvi_t *dev_ptr); +_forward_ void fc_enq_fcbuf(fc_buf_t *fcptr); +_forward_ void fc_enq_fcbuf_active(RING *rp, fc_buf_t *fcptr); +_forward_ int issue_fcp_cmd(fc_dev_ctl_t *p_dev_ctl, dvi_t *dev_ptr, + T_SCSIBUF *sbp, int pend); +_forward_ void fc_enq_wait(dvi_t *dev_ptr); +_forward_ void fc_fail_cmd(dvi_t *dev_ptr, char error, uint32 statistic); +_forward_ void fc_fail_pendq(dvi_t *dev_ptr, char error, uint32 statistic); +_forward_ int fc_failio(fc_dev_ctl_t * p_dev_ctl); +_forward_ dvi_t *fc_find_lun( FC_BRD_INFO * binfo, int hash_index, fc_lun_t lun); +_forward_ void fc_issue_cmd(fc_dev_ctl_t *ap); +_forward_ int fc_reset_dev_q_depth( fc_dev_ctl_t * p_dev_ctl); +_forward_ int fc_restart_all_devices(fc_dev_ctl_t * p_dev_ctl); +_forward_ int fc_restart_device(dvi_t * dev_ptr); +_forward_ void fc_return_standby_queue(dvi_t *dev_ptr, uchar status, + uint32 statistic); +_forward_ void re_issue_fcp_cmd(dvi_t *dev_ptr); +_forward_ void fc_polling(FC_BRD_INFO *binfo, uint32 att_bit); +_forward_ void fc_fcp_fix_txq(fc_dev_ctl_t *p_dev_ctl); + + + +/* Module fcscsib.c External Routine Declarations */ +_forward_ int fc_abort_fcp_txpq(FC_BRD_INFO *binfo, dvi_t *dev_ptr); +_forward_ int fc_abort_xri(FC_BRD_INFO *binfo, dvi_t *dev_ptr, ushort iotag, int flag); +_forward_ int fc_abort_ixri_cx(FC_BRD_INFO *binfo, ushort xri, uint32 cmd, RING *rp); +_forward_ int fc_attach(int index, uint32 *p_uio); +_forward_ int fc_cfg_init(fc_dev_ctl_t *p_dev_ctl); +_forward_ void fc_cfg_remove(fc_dev_ctl_t *p_dev_ctl); +_forward_ void fc_cmdring_timeout(fc_dev_ctl_t *p, void *a1, void *a2); +_forward_ int fc_delay_iodone(fc_dev_ctl_t *p_dev_ctl, + T_SCSIBUF * sbp); +_forward_ void fc_delay_timeout(fc_dev_ctl_t *p, void *l1, void *l2); +_forward_ void fc_nodev_timeout(fc_dev_ctl_t *p, void *l1, void *l2); +_forward_ int fc_detach(int index); +_forward_ void fc_ffcleanup(fc_dev_ctl_t *p_dev_ctl); +_forward_ void fc_free_clearq(dvi_t *dev_ptr); +_forward_ int fc_geportname(NAME_TYPE *pn1, NAME_TYPE *pn2); +_forward_ int fc_linkdown(fc_dev_ctl_t *p_dev_ctl); +_forward_ void fc_linkdown_timeout(fc_dev_ctl_t *p, void *a1, void *a2); +_forward_ void fc_mbox_timeout(fc_dev_ctl_t *p, void *a1, void *a2); +_forward_ void fc_fabric_timeout(fc_dev_ctl_t *p, void *a1, void *a2); +_forward_ int fc_nextauth(fc_dev_ctl_t *p_dev_ctl, int sndcnt); +_forward_ int fc_nextdisc(fc_dev_ctl_t *p_dev_ctl, int sndcnt); +_forward_ int fc_nextnode(fc_dev_ctl_t *p_dev_ctl, NODELIST *nlp); +_forward_ int fc_nextrscn(fc_dev_ctl_t *p_dev_ctl, int sndcnt); +_forward_ int fc_free_ct_rsp(fc_dev_ctl_t *p_dev_ctl, MATCHMAP *mlist); +_forward_ int fc_ns_cmd(fc_dev_ctl_t *p_dev_ctl, NODELIST *nlp, int cc); +_forward_ int fc_ns_rsp(fc_dev_ctl_t *p_dev_ctl, NODELIST *nslp, MATCHMAP *mp, uint32 sz); +_forward_ int fc_ct_cmd(fc_dev_ctl_t *p_dev_ctl, MATCHMAP *mp, + MATCHMAP *bmp, NODELIST *nlp); +_forward_ int fc_offline(fc_dev_ctl_t *p_dev_ctl); +_forward_ int fc_online(fc_dev_ctl_t *p_dev_ctl); +_forward_ void fc_pcimem_bcopy(uint32 *src, uint32 *dest, uint32 cnt); +_forward_ int fc_post_buffer(fc_dev_ctl_t *p_dev_ctl, RING *rp, int cnt); +_forward_ int fc_post_mbuf(fc_dev_ctl_t *p_dev_ctl, RING *rp, int cnt); +_forward_ int fc_rlip(fc_dev_ctl_t *p_dev_ctl); +_forward_ void fc_scsi_timeout(fc_dev_ctl_t *p, void *l1, void *l2); +_forward_ void fc_start(fc_dev_ctl_t *p_dev_ctl); +_forward_ void handle_fcp_event(fc_dev_ctl_t *p_dev_ctl, RING *rp,IOCBQ *temp); +_forward_ int handle_mb_cmd(fc_dev_ctl_t *p_dev_ctl, MAILBOX *mb, uint32 cmd); +_forward_ int fc_free_iocb_buf(fc_dev_ctl_t *p_dev_ctl, RING *rp, IOCBQ *tmp); +_forward_ int handle_iprcv_seq(fc_dev_ctl_t *p_dev_ctl, RING *rp, IOCBQ *temp); +_forward_ int handle_elsrcv_seq(fc_dev_ctl_t *p_dev_ctl, RING *rp, IOCBQ *temp); +_forward_ void fc_process_reglogin(fc_dev_ctl_t *p_dev_ctl, NODELIST *nlp); +_forward_ int fc_snd_scsi_req(fc_dev_ctl_t *p_dev_ctl, NAME_TYPE *wwn, + MATCHMAP *bmp, DMATCHMAP *fcpmp, DMATCHMAP *omatp, + uint32 cnt, struct dev_info *devp); +_forward_ void issue_report_lun(fc_dev_ctl_t *p_dev_ctl, void *l1, void *l2); +_forward_ int fc_parse_binding_entry( fc_dev_ctl_t *p_dev_ctl, uchar *inbuf, + uchar *outbuf, int in_size, int out_size, int bind_type, + unsigned int *sum, int entry, int *lpfc_num); + +/* + * External Routine Declarations for local print statement formatting + */ + +_forward_ int fc_asc_seq_to_hex( fc_dev_ctl_t *p_dev_ctl, + int input_bc, int output_bc, char *inp, char *outp); +_forward_ int fc_asc_to_hex( uchar c); +_forward_ int fc_is_digit( int chr); +_forward_ int fc_log_printf_msg_vargs( + int brdno, msgLogDef *msg, + void *control, ...); +_forward_ int fc_check_this_log_msg_disabled( + int brdno, msgLogDef *msg, int *log_only); + +_forward_ void fc_brdreset(fc_dev_ctl_t *p_dev_ctl); +_forward_ int fc_ffinit(fc_dev_ctl_t *p_dev_ctl); +_forward_ int issue_mb_cmd(FC_BRD_INFO *binfo, MAILBOX *mb, int flag); +_forward_ uint32 issue_iocb_cmd(FC_BRD_INFO *binfo, RING *rp, IOCBQ *iocb_cmd); +_forward_ char *decode_firmware_rev(FC_BRD_INFO *binfo, fc_vpd_t *vp); +_forward_ int dfc_fmw_rev( fc_dev_ctl_t * p_dev_ctl); +_forward_ int dfc_hba_put_event( fc_dev_ctl_t * p_dev_ctl, uint32 evcode, + uint32 evdata1, uint32 evdata2, uint32 evdata3, uint32 evdata4); +_forward_ int dfc_put_event( fc_dev_ctl_t * p_dev_ctl, uint32 evcode, + uint32 evdata0, void *evdata1, void *evdata2); +_forward_ void handle_ff_error(fc_dev_ctl_t *p_dev_ctl); +_forward_ int handle_mb_event(fc_dev_ctl_t *p_dev_ctl); +_forward_ void handle_link_event(fc_dev_ctl_t *p_dev_ctl); +_forward_ void handle_ring_event(fc_dev_ctl_t *p_dev_ctl, int ring,uint32 reg); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fc_ertn.h 999-mjb/drivers/scsi/lpfc/fc_ertn.h --- 000-virgin/drivers/scsi/lpfc/fc_ertn.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fc_ertn.h 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,89 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +/* + * Begin Global Function Definitions + */ +_forward_ void fc_bcopy(void *src, void *dest, unsigned long n); +_forward_ void fc_bzero(void *src, unsigned long size ); +_forward_ int fc_copyin(uchar *src, uchar *dst, unsigned long); +_forward_ int fc_copyout(uchar *, uchar *, unsigned long); +_forward_ void lpfc_mpdata_sync(fc_dev_ctl_t *p_dev_ctl, void *h, int a, int b, int c); +_forward_ void *fc_kmem_alloc(unsigned int size); +_forward_ void fc_kmem_free(void *obj, unsigned int size); +_forward_ void curtime(uint32 *time); +_forward_ ulong dfc_disable_lock(ulong p1, Simple_lock *p2); +_forward_ void dfc_unlock_enable(ulong p1, Simple_lock *p2); +_forward_ ulong lpfc_q_disable_lock(fc_dev_ctl_t *p_dev_ctl); +_forward_ void lpfc_q_unlock_enable(fc_dev_ctl_t *p_dev_ctl, ulong p1); +_forward_ ulong lpfc_mempool_disable_lock(fc_dev_ctl_t *p_dev_ctl); +_forward_ void lpfc_mempool_unlock_enable(fc_dev_ctl_t *p_dev_ctl, ulong p1); +_forward_ int dfc_sleep(fc_dev_ctl_t *p_dev_ctl, fcEvent_header *ep); +_forward_ int dfc_wakeup(fc_dev_ctl_t *p_dev_ctl, fcEvent_header *ep); +_forward_ int lpfc_DELAYMS(fc_dev_ctl_t *p_dev_ctl, int cnt); +_forward_ int fc_fcp_bufunmap(fc_dev_ctl_t *pdev, struct sc_buf *sp); +_forward_ int fc_bufmap(fc_dev_ctl_t *p_dev_ctl, uchar *bp, uint32 len, + void **phys, uint32 *cnt, void **handle); +_forward_ void fc_bufunmap(fc_dev_ctl_t *p_dev_ctl, uchar *addr, + uchar *dmahandle, uint32 size); +_forward_ int fc_fcp_bufmap(fc_dev_ctl_t *p_dev_ctl, struct sc_buf *sbp, + fc_buf_t *fcptr, IOCBQ *temp, ULP_BDE64 *bpl, + dvi_t * dev_ptr, int pend); +_forward_ void fc_free(fc_dev_ctl_t *p_dev_ctl, MBUF_INFO *buf_info); +_forward_ int fc_get_dds(fc_dev_ctl_t *p_dev_ctl, uint32 *p_uio); +_forward_ int fc_get_dds_bind(fc_dev_ctl_t *p_dev_ctl); +_forward_ int fc_get_dds(fc_dev_ctl_t *p_dev_ctl, uint32 *p_uio); +_forward_ void lpfc_scsi_selto_timeout(fc_dev_ctl_t *p, void *l1, void *l2); +_forward_ int lpfc_copy_sense(dvi_t * dev_ptr, struct buf * bp); +_forward_ int fc_intr(struct intr *p_ihs); +_forward_ int fc_pcimap(fc_dev_ctl_t *p_dev_ctl); +_forward_ ushort fc_rdpci_cmd( fc_dev_ctl_t *p_dev_ctl); +_forward_ uint32 fc_rdpci_32( fc_dev_ctl_t *p_dev_ctl, uint32 offset); +_forward_ int fc_initpci(struct dfc_info *di, fc_dev_ctl_t *p_dev_ctl); +_forward_ int fc_readpci(struct dfc_info *di, uint32 offset, char *buf, uint32 cnt); +_forward_ int fc_writepci(struct dfc_info *di, uint32 offset, char *buf, uint32 cnt); +_forward_ uchar *fc_malloc(fc_dev_ctl_t *p_dev_ctl, MBUF_INFO *buf_info); +_forward_ int fc_memmap(fc_dev_ctl_t *p_dev_ctl); +_forward_ int fc_unmemmap(fc_dev_ctl_t *p_dev_ctl); +_forward_ int lpfc_cfg_init(fc_dev_ctl_t *p_dev_ctl); +_forward_ void fc_wrpci_cmd( fc_dev_ctl_t *p_dev_ctl, ushort cfg_value); +_forward_ int i_clear(struct intr *ihs); +_forward_ int i_init(struct intr *ihs); +_forward_ void lpfc_fcp_error( fc_buf_t * fcptr, IOCB * cmd); +_forward_ dvi_t *fc_alloc_devp(fc_dev_ctl_t *, int target, fc_lun_t lun); +_forward_ int fc_do_iodone( struct buf *bp); +_forward_ int fc_device_changed(fc_dev_ctl_t *p, struct dev_info *dp); +_forward_ int log_printf(int f, int type, int num, char *str, int brdno, + uint32 a1, uint32 a2, uint32 a3, uint32 a4); +_forward_ int log_printf_msgblk( int brdno, msgLogDef * msg, char *str, int log_only); + + +_forward_ uint32 timeout(void (*func)(ulong), struct timer_list * , uint32 ); +_forward_ int lpfc_ip_rcvsz(fc_dev_ctl_t *p_dev_ctl); +_forward_ int lpfc_kfree_skb(struct sk_buff *skb); +_forward_ struct sk_buff * lpfc_alloc_skb(unsigned int sz); +_forward_ void fc_pci_dma_sync_single(struct pci_dev *hwdev, dma_addr_t h, + size_t size, int c); +_forward_ void fc_write_toio(uint32 *src, uint32 *dest_io, uint32 cnt); +_forward_ void fc_read_fromio(uint32 *src_io, uint32 *dest, uint32 cnt); +_forward_ uint32 fc_readl(uint32 *src); +_forward_ void fc_writel(uint32 *src, uint32 value); +_forward_ int fc_print( char * str, void * arg1, void * arg2); + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fc_hw.h 999-mjb/drivers/scsi/lpfc/fc_hw.h --- 000-virgin/drivers/scsi/lpfc/fc_hw.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fc_hw.h 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,3073 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#ifndef _H_FC_HW +#define _H_FC_HW + +typedef unsigned u32bit; +typedef unsigned u16bit; +typedef unsigned u8bit; + +#define FC_MAX_TRANSFER 0x40000 /* Maximum transfer size per operation */ + +#define MAX_CONFIGURED_RINGS 4 /* # rings currently used */ + +#define IOCB_CMD_R0_ENTRIES 5 /* ELS command ring entries */ +#define IOCB_RSP_R0_ENTRIES 5 /* ELS response ring entries */ +#define IOCB_CMD_R1_ENTRIES 27 /* IP command ring entries */ +#define IOCB_RSP_R1_ENTRIES 28 /* IP response ring entries */ +#define IOCB_CMD_R2_ENTRIES 45 /* FCP command ring entries */ +#define IOCB_RSP_R2_ENTRIES 10 /* FCP response ring entries */ +#define MAX_BIOCB 120 /* max# of BIU IOCBs in shared memory */ + +#define SLI2_IOCB_CMD_R0_ENTRIES 6 /* SLI-2 ELS command ring entries */ +#define SLI2_IOCB_RSP_R0_ENTRIES 6 /* SLI-2 ELS response ring entries */ +#define SLI2_IOCB_CMD_R1_ENTRIES 24 /* SLI-2 IP command ring entries */ +#define SLI2_IOCB_RSP_R1_ENTRIES 30 /* SLI-2 IP response ring entries */ +#define SLI2_IOCB_CMD_R1XTRA_ENTRIES 18 /* SLI-2 extra FCP cmd ring entries */ +#define SLI2_IOCB_RSP_R1XTRA_ENTRIES 24 /* SLI-2 extra FCP rsp ring entries */ +#define SLI2_IOCB_CMD_R2_ENTRIES 30 /* SLI-2 FCP command ring entries */ +#define SLI2_IOCB_RSP_R2_ENTRIES 20 /* SLI-2 FCP response ring entries */ +#define SLI2_IOCB_CMD_R2XTRA_ENTRIES 22 /* SLI-2 extra FCP cmd ring entries */ +#define SLI2_IOCB_RSP_R2XTRA_ENTRIES 20 /* SLI-2 extra FCP rsp ring entries */ +#define SLI2_IOCB_CMD_R3_ENTRIES 0 /* SLI-2 FCP command ring entries */ +#define SLI2_IOCB_RSP_R3_ENTRIES 0 /* SLI-2 FCP response ring entries */ +#define MAX_SLI2_IOCB SLI2_IOCB_CMD_R0_ENTRIES + \ + SLI2_IOCB_RSP_R0_ENTRIES + \ + SLI2_IOCB_CMD_R1_ENTRIES + \ + SLI2_IOCB_RSP_R1_ENTRIES + \ + SLI2_IOCB_CMD_R2_ENTRIES + \ + SLI2_IOCB_RSP_R2_ENTRIES + \ + SLI2_IOCB_CMD_R3_ENTRIES + \ + SLI2_IOCB_RSP_R3_ENTRIES + +#define FCELSSIZE 1024 /* maximum ELS transfer size */ + +#define FC_MAXRETRY 3 /* max retries for ELS commands */ +#define FC_ELS_RING 0 /* use ring 0 for ELS commands */ +#define FC_IP_RING 1 /* use ring 1 for IP commands */ +#define FC_FCP_RING 2 /* use ring 2 for FCP initiator commands */ + +#define FF_DEF_EDTOV 2000 /* Default E_D_TOV (2000ms) */ +#define FF_DEF_ALTOV 15 /* Default AL_TIME (15ms) */ +#define FF_DEF_RATOV 2 /* Default RA_TOV (2s) */ +#define FF_DEF_ARBTOV 1900 /* Default ARB_TOV (1900ms) */ +#define MB_WAIT_PERIOD 500 /* Wait period in usec inbetween MB polls */ +#define MAX_MB_COMPLETION 1000 /* # MB_WAIT_PERIODs to wait for MB cmplt */ +#define MAX_MSG_DATA 28 /* max msg data in CMD_ADAPTER_MSG iocb */ + +#define FF_REG_AREA_SIZE 256 /* size, in bytes, of i/o register area */ +#define FF_SLIM_SIZE 4096 /* size, in bytes, of SLIM */ + +/* + * Miscellaneous stuff.... + */ +/* HBA Mgmt */ +#define FDMI_DID ((uint32)0xfffffa) +#define NameServer_DID ((uint32)0xfffffc) +#define SCR_DID ((uint32)0xfffffd) +#define Fabric_DID ((uint32)0xfffffe) +#define Bcast_DID ((uint32)0xffffff) +#define Mask_DID ((uint32)0xffffff) +#define CT_DID_MASK ((uint32)0xffff00) +#define Fabric_DID_MASK ((uint32)0xfff000) + +#define PT2PT_LocalID ((uint32)1) +#define PT2PT_RemoteID ((uint32)2) + +#define OWN_CHIP 1 /* IOCB / Mailbox is owned by Hba */ +#define OWN_HOST 0 /* IOCB / Mailbox is owned by Host */ +#define END_OF_CHAIN 0 +#define IOCB_WORD_SZ 8 /* # of words in ULP BIU XCB */ +#define MAX_RINGS 3 /* Max # of supported rings */ + +/* defines for type field in fc header */ +#define FC_ELS_DATA 0x1 +#define FC_LLC_SNAP 0x5 +#define FC_FCP_DATA 0x8 +#define FC_COMMON_TRANSPORT_ULP 0x20 + +/* defines for rctl field in fc header */ +#define FC_DEV_DATA 0x0 +#define FC_UNSOL_CTL 0x2 +#define FC_SOL_CTL 0x3 +#define FC_UNSOL_DATA 0x4 +#define FC_FCP_CMND 0x6 +#define FC_ELS_REQ 0x22 +#define FC_ELS_RSP 0x23 +#define FC_NET_HDR 0x20 /* network headers for Dfctl field */ + +/* + * Common Transport structures and definitions + * + */ + +union CtRevisionId { + /* Structure is in Big Endian format */ + struct { + u32bit Revision: 8; + u32bit InId: 24; + } bits; + uint32 word; +}; + +union CtCommandResponse { + /* Structure is in Big Endian format */ + struct { + u32bit CmdRsp: 16; + u32bit Size: 16; + } bits; + uint32 word; +}; + +typedef struct SliCtRequest { + /* Structure is in Big Endian format */ + union CtRevisionId RevisionId; + uchar FsType; + uchar FsSubType; + uchar Options; + uchar Rsrvd1; + union CtCommandResponse CommandResponse; + uchar Rsrvd2; + uchar ReasonCode; + uchar Explanation; + uchar VendorUnique; + + union { + uint32 PortID; + struct gid { + uchar PortType; /* for GID_PT requests */ + uchar DomainScope; + uchar AreaScope; + uchar Fc4Type; /* for GID_FT requests */ + } gid; + struct rft { + uint32 PortId; /* For RFT_ID requests */ +#if BIG_ENDIAN_HW + u32bit rsvd0: 16; + u32bit rsvd1: 7; + u32bit fcpReg: 1; /* Type 8 */ + u32bit rsvd2: 2; + u32bit ipReg: 1; /* Type 5 */ + u32bit rsvd3: 5; +#endif +#if LITTLE_ENDIAN_HW + u32bit rsvd0: 16; + u32bit fcpReg: 1; /* Type 8 */ + u32bit rsvd1: 7; + u32bit rsvd3: 5; + u32bit ipReg: 1; /* Type 5 */ + u32bit rsvd2: 2; +#endif + uint32 rsvd[7]; + } rft; + } un; +} SLI_CT_REQUEST, *PSLI_CT_REQUEST; + +#define SLI_CT_REVISION 1 +#define GID_REQUEST_SZ (sizeof(SLI_CT_REQUEST) - 32) +#define RFT_REQUEST_SZ (sizeof(SLI_CT_REQUEST)) + + +/* + * FsType Definitions + */ + +#define SLI_CT_MANAGEMENT_SERVICE 0xFA +#define SLI_CT_TIME_SERVICE 0xFB +#define SLI_CT_DIRECTORY_SERVICE 0xFC +#define SLI_CT_FABRIC_CONTROLLER_SERVICE 0xFD + +/* + * Directory Service Subtypes + */ + +#define SLI_CT_DIRECTORY_NAME_SERVER 0x02 + +/* + * Response Codes + */ + +#define SLI_CT_RESPONSE_FS_RJT 0x8001 +#define SLI_CT_RESPONSE_FS_ACC 0x8002 + +/* + * Reason Codes + */ + +#define SLI_CT_NO_ADDITIONAL_EXPL 0x0 +#define SLI_CT_INVALID_COMMAND 0x01 +#define SLI_CT_INVALID_VERSION 0x02 +#define SLI_CT_LOGICAL_ERROR 0x03 +#define SLI_CT_INVALID_IU_SIZE 0x04 +#define SLI_CT_LOGICAL_BUSY 0x05 +#define SLI_CT_PROTOCOL_ERROR 0x07 +#define SLI_CT_UNABLE_TO_PERFORM_REQ 0x09 +#define SLI_CT_REQ_NOT_SUPPORTED 0x0b +#define SLI_CT_HBA_INFO_NOT_REGISTERED 0x10 +#define SLI_CT_MULTIPLE_HBA_ATTR_OF_SAME_TYPE 0x11 +#define SLI_CT_INVALID_HBA_ATTR_BLOCK_LEN 0x12 +#define SLI_CT_HBA_ATTR_NOT_PRESENT 0x13 +#define SLI_CT_PORT_INFO_NOT_REGISTERED 0x20 +#define SLI_CT_MULTIPLE_PORT_ATTR_OF_SAME_TYPE 0x21 +#define SLI_CT_INVALID_PORT_ATTR_BLOCK_LEN 0x22 +#define SLI_CT_VENDOR_UNIQUE 0xff + +/* + * Name Server SLI_CT_UNABLE_TO_PERFORM_REQ Explanations + */ + +#define SLI_CT_NO_PORT_ID 0x01 +#define SLI_CT_NO_PORT_NAME 0x02 +#define SLI_CT_NO_NODE_NAME 0x03 +#define SLI_CT_NO_CLASS_OF_SERVICE 0x04 +#define SLI_CT_NO_IP_ADDRESS 0x05 +#define SLI_CT_NO_IPA 0x06 +#define SLI_CT_NO_FC4_TYPES 0x07 +#define SLI_CT_NO_SYMBOLIC_PORT_NAME 0x08 +#define SLI_CT_NO_SYMBOLIC_NODE_NAME 0x09 +#define SLI_CT_NO_PORT_TYPE 0x0A +#define SLI_CT_ACCESS_DENIED 0x10 +#define SLI_CT_INVALID_PORT_ID 0x11 +#define SLI_CT_DATABASE_EMPTY 0x12 + + + +/* + * Name Server Command Codes + */ + +#define SLI_CTNS_GA_NXT 0x0100 +#define SLI_CTNS_GPN_ID 0x0112 +#define SLI_CTNS_GNN_ID 0x0113 +#define SLI_CTNS_GCS_ID 0x0114 +#define SLI_CTNS_GFT_ID 0x0117 +#define SLI_CTNS_GSPN_ID 0x0118 +#define SLI_CTNS_GPT_ID 0x011A +#define SLI_CTNS_GID_PN 0x0121 +#define SLI_CTNS_GID_NN 0x0131 +#define SLI_CTNS_GIP_NN 0x0135 +#define SLI_CTNS_GIPA_NN 0x0136 +#define SLI_CTNS_GSNN_NN 0x0139 +#define SLI_CTNS_GNN_IP 0x0153 +#define SLI_CTNS_GIPA_IP 0x0156 +#define SLI_CTNS_GID_FT 0x0171 +#define SLI_CTNS_GID_PT 0x01A1 +#define SLI_CTNS_RPN_ID 0x0212 +#define SLI_CTNS_RNN_ID 0x0213 +#define SLI_CTNS_RCS_ID 0x0214 +#define SLI_CTNS_RFT_ID 0x0217 +#define SLI_CTNS_RSPN_ID 0x0218 +#define SLI_CTNS_RPT_ID 0x021A +#define SLI_CTNS_RIP_NN 0x0235 +#define SLI_CTNS_RIPA_NN 0x0236 +#define SLI_CTNS_RSNN_NN 0x0239 +#define SLI_CTNS_DA_ID 0x0300 + +/* + * Port Types + */ + +#define SLI_CTPT_N_PORT 0x01 +#define SLI_CTPT_NL_PORT 0x02 +#define SLI_CTPT_FNL_PORT 0x03 +#define SLI_CTPT_IP 0x04 +#define SLI_CTPT_FCP 0x08 +#define SLI_CTPT_NX_PORT 0x7F +#define SLI_CTPT_F_PORT 0x81 +#define SLI_CTPT_FL_PORT 0x82 +#define SLI_CTPT_E_PORT 0x84 + +#define SLI_CT_LAST_ENTRY 0x80000000 + +/*=====================================================================*/ + +#ifdef LP6000 +/* PCI register offsets */ +#define MEM_ADDR_OFFSET 0x10 /* SLIM base memory address */ +#define MEMH_OFFSET 0x14 /* SLIM base memory high address */ +#define REG_ADDR_OFFSET 0x18 /* REGISTER base memory address */ +#define REGH_OFFSET 0x1c /* REGISTER base memory high address */ +#define IO_ADDR_OFFSET 0x20 /* BIU I/O registers */ +#define REGIOH_OFFSET 0x24 /* REGISTER base io high address */ +#endif + +#define CMD_REG_OFFSET 0x4 /* PCI command configuration */ + +/* General PCI Register Definitions */ +/* Refer To The PCI Specification For Detailed Explanations */ + +/* Register Offsets in little endian format */ +#define PCI_VENDOR_ID_REGISTER 0x00 /* PCI Vendor ID Register*/ +#define PCI_DEVICE_ID_REGISTER 0x02 /* PCI Device ID Register*/ +#define PCI_CONFIG_ID_REGISTER 0x00 /* PCI Configuration ID Register*/ +#define PCI_COMMAND_REGISTER 0x04 /* PCI Command Register*/ +#define PCI_STATUS_REGISTER 0x06 /* PCI Status Register*/ +#define PCI_REV_ID_REGISTER 0x08 /* PCI Revision ID Register*/ +#define PCI_CLASS_CODE_REGISTER 0x09 /* PCI Class Code Register*/ +#define PCI_CACHE_LINE_REGISTER 0x0C /* PCI Cache Line Register*/ +#define PCI_LATENCY_TMR_REGISTER 0x0D /* PCI Latency Timer Register*/ +#define PCI_HEADER_TYPE_REGISTER 0x0E /* PCI Header Type Register*/ +#define PCI_BIST_REGISTER 0x0F /* PCI Built-In SelfTest Register*/ +#define PCI_BAR_0_REGISTER 0x10 /* PCI Base Address Register 0*/ +#define PCI_BAR_1_REGISTER 0x14 /* PCI Base Address Register 1*/ +#define PCI_BAR_2_REGISTER 0x18 /* PCI Base Address Register 2*/ +#define PCI_BAR_3_REGISTER 0x1C /* PCI Base Address Register 3*/ +#define PCI_BAR_4_REGISTER 0x20 /* PCI Base Address Register 4*/ +#define PCI_BAR_5_REGISTER 0x24 /* PCI Base Address Register 5*/ +#define PCI_EXPANSION_ROM 0x30 /* PCI Expansion ROM Base Register*/ +#define PCI_INTR_LINE_REGISTER 0x3C /* PCI Interrupt Line Register*/ +#define PCI_INTR_PIN_REGISTER 0x3D /* PCI Interrupt Pin Register*/ +#define PCI_MIN_GNT_REGISTER 0x3E /* PCI Min-Gnt Register*/ +#define PCI_MAX_LAT_REGISTER 0x3F /* PCI Max_Lat Register*/ +#define PCI_NODE_ADDR_REGISTER 0x40 /* PCI Node Address Register*/ + +/* PCI access methods */ +#define P_CONF_T1 1 +#define P_CONF_T2 2 + +/* max number of pci buses */ +#define MAX_PCI_BUSES 0xFF + +/* number of PCI config bytes to access */ +#define PCI_BYTE 1 +#define PCI_WORD 2 +#define PCI_DWORD 4 + +/* PCI related constants */ +#define CMD_IO_ENBL 0x0001 +#define CMD_MEM_ENBL 0x0002 +#define CMD_BUS_MASTER 0x0004 +#define CMD_MWI 0x0010 +#define CMD_PARITY_CHK 0x0040 +#define CMD_SERR_ENBL 0x0100 + +#define CMD_CFG_VALUE 0x156 /* mem enable, master, MWI, SERR, PERR */ + +/* PCI addresses */ +#define PCI_SPACE_ENABLE 0x0CF8 +#define CF1_CONFIG_ADDR_REGISTER 0x0CF8 +#define CF1_CONFIG_DATA_REGISTER 0x0CFC +#define CF2_FORWARD_REGISTER 0x0CFA +#define CF2_BASE_ADDRESS 0xC000 + +#define PCI_VENDOR_ID_EMULEX 0x10df + +#define PCI_DEVICE_ID_SUPERFLY 0xf700 +#define PCI_DEVICE_ID_DRAGONFLY 0xf800 +#define PCI_DEVICE_ID_CENTAUR 0xf900 +#define PCI_DEVICE_ID_PFLY 0xf098 +#define PCI_DEVICE_ID_PEGASUS 0xf980 +#define PCI_DEVICE_ID_TFLY 0xf0a5 +#define PCI_DEVICE_ID_THOR 0xfa00 + +#define JEDEC_ID_ADDRESS 0x0080001c +#define SUPERFLY_JEDEC_ID 0x0020 +#define DRAGONFLY_JEDEC_ID 0x0021 +#define DRAGONFLY_V2_JEDEC_ID 0x0025 +#define CENTAUR_2G_JEDEC_ID 0x0026 +#define CENTAUR_1G_JEDEC_ID 0x0028 +#define JEDEC_ID_MASK 0x0FFFF000 +#define JEDEC_ID_SHIFT 12 +#define FC_JEDEC_ID(id) ((id & JEDEC_ID_MASK) >> JEDEC_ID_SHIFT) + +#define DEFAULT_PCI_LATENCY_CLOCKS 0xf8 /* 0xF8 is a special value for + * FF11.1N6 firmware. Use + * 0x80 for pre-FF11.1N6 &N7, etc + */ +#define PCI_LATENCY_VALUE 0xf8 + +#ifdef LP6000 +typedef struct { /* BIU registers */ + uint32 hostAtt; /* See definitions for Host Attention register */ + uint32 chipAtt; /* See definitions for Chip Attention register */ + uint32 hostStatus; /* See definitions for Host Status register */ + uint32 hostControl; /* See definitions for Host Control register */ + uint32 buiConfig; /* See definitions for BIU configuration register*/ +} FF_REGS, *PFF_REGS; + +/* Host Attention Register */ + +#define HA_REG_OFFSET 0 /* Word offset from register base address */ + +#define HA_R0RE_REQ 0x00000001 /* Bit 0 */ +#define HA_R0CE_RSP 0x00000002 /* Bit 1 */ +#define HA_R0ATT 0x00000008 /* Bit 3 */ +#define HA_R1RE_REQ 0x00000010 /* Bit 4 */ +#define HA_R1CE_RSP 0x00000020 /* Bit 5 */ +#define HA_R1ATT 0x00000080 /* Bit 7 */ +#define HA_R2RE_REQ 0x00000100 /* Bit 8 */ +#define HA_R2CE_RSP 0x00000200 /* Bit 9 */ +#define HA_R2ATT 0x00000800 /* Bit 11 */ +#define HA_R3RE_REQ 0x00001000 /* Bit 12 */ +#define HA_R3CE_RSP 0x00002000 /* Bit 13 */ +#define HA_R3ATT 0x00008000 /* Bit 15 */ +#define HA_LATT 0x20000000 /* Bit 29 */ +#define HA_MBATT 0x40000000 /* Bit 30 */ +#define HA_ERATT 0x80000000 /* Bit 31 */ + + +/* Chip Attention Register */ + +#define CA_REG_OFFSET 1 /* Word offset from register base address */ + +#define CA_R0CE_REQ 0x00000001 /* Bit 0 */ +#define CA_R0RE_RSP 0x00000002 /* Bit 1 */ +#define CA_R0ATT 0x00000008 /* Bit 3 */ +#define CA_R1CE_REQ 0x00000010 /* Bit 4 */ +#define CA_R1RE_RSP 0x00000020 /* Bit 5 */ +#define CA_R1ATT 0x00000080 /* Bit 7 */ +#define CA_R2CE_REQ 0x00000100 /* Bit 8 */ +#define CA_R2RE_RSP 0x00000200 /* Bit 9 */ +#define CA_R2ATT 0x00000800 /* Bit 11 */ +#define CA_R3CE_REQ 0x00001000 /* Bit 12 */ +#define CA_R3RE_RSP 0x00002000 /* Bit 13 */ +#define CA_R3ATT 0x00008000 /* Bit 15 */ +#define CA_MBATT 0x40000000 /* Bit 30 */ + + +/* Host Status Register */ + +#define HS_REG_OFFSET 2 /* Word offset from register base address */ + +#define HS_MBRDY 0x00400000 /* Bit 22 */ +#define HS_FFRDY 0x00800000 /* Bit 23 */ +#define HS_FFER8 0x01000000 /* Bit 24 */ +#define HS_FFER7 0x02000000 /* Bit 25 */ +#define HS_FFER6 0x04000000 /* Bit 26 */ +#define HS_FFER5 0x08000000 /* Bit 27 */ +#define HS_FFER4 0x10000000 /* Bit 28 */ +#define HS_FFER3 0x20000000 /* Bit 29 */ +#define HS_FFER2 0x40000000 /* Bit 30 */ +#define HS_FFER1 0x80000000 /* Bit 31 */ +#define HS_FFERM 0xFF000000 /* Mask for error bits 31:24 */ + + +/* Host Control Register */ + +#define HC_REG_OFFSET 3 /* Word offset from register base address */ + +#define HC_MBINT_ENA 0x00000001 /* Bit 0 */ +#define HC_R0INT_ENA 0x00000002 /* Bit 1 */ +#define HC_R1INT_ENA 0x00000004 /* Bit 2 */ +#define HC_R2INT_ENA 0x00000008 /* Bit 3 */ +#define HC_R3INT_ENA 0x00000010 /* Bit 4 */ +#define HC_INITHBI 0x02000000 /* Bit 25 */ +#define HC_INITMB 0x04000000 /* Bit 26 */ +#define HC_INITFF 0x08000000 /* Bit 27 */ +#define HC_LAINT_ENA 0x20000000 /* Bit 29 */ +#define HC_ERINT_ENA 0x80000000 /* Bit 31 */ + +/* BIU Configuration Register */ + +#define BC_REG_OFFSET 4 /* Word offset from register base address */ + +#define BC_BSE 0x00000001 /* Bit 0 */ +#define BC_BSE_SWAP 0x01000000 /* Bit 0 - swapped */ + +#endif /* LP6000 */ + +/*=====================================================================*/ + +/* + * Start of FCP specific structures + */ + +/* + * Definition of FCP_RSP Packet + */ + +typedef struct _FCP_RSP { + uint32 rspRsvd1; /* FC Word 0, byte 0:3 */ + uint32 rspRsvd2; /* FC Word 1, byte 0:3 */ + + uchar rspStatus0; /* FCP_STATUS byte 0 (reserved) */ + uchar rspStatus1; /* FCP_STATUS byte 1 (reserved) */ + uchar rspStatus2; /* FCP_STATUS byte 2 field validity */ +#define RSP_LEN_VALID 0x01 /* bit 0 */ +#define SNS_LEN_VALID 0x02 /* bit 1 */ +#define RESID_OVER 0x04 /* bit 2 */ +#define RESID_UNDER 0x08 /* bit 3 */ + uchar rspStatus3; /* FCP_STATUS byte 3 SCSI status byte */ +#define SCSI_STAT_GOOD 0x00 +#define SCSI_STAT_CHECK_COND 0x02 +#define SCSI_STAT_COND_MET 0x04 +#define SCSI_STAT_BUSY 0x08 +#define SCSI_STAT_INTERMED 0x10 +#define SCSI_STAT_INTERMED_CM 0x14 +#define SCSI_STAT_RES_CNFLCT 0x18 +#define SCSI_STAT_CMD_TERM 0x22 +#define SCSI_STAT_QUE_FULL 0x28 + + uint32 rspResId; /* Residual xfer if RESID_xxxx set in fcpStatus2 */ + /* Received in Big Endian format */ + uint32 rspSnsLen; /* Length of sense data in fcpSnsInfo */ + /* Received in Big Endian format */ + uint32 rspRspLen; /* Length of FCP response data in fcpRspInfo */ + /* Received in Big Endian format */ + + uchar rspInfo0; /* FCP_RSP_INFO byte 0 (reserved) */ + uchar rspInfo1; /* FCP_RSP_INFO byte 1 (reserved) */ + uchar rspInfo2; /* FCP_RSP_INFO byte 2 (reserved) */ + uchar rspInfo3; /* FCP_RSP_INFO RSP_CODE byte 3 */ + +#define RSP_NO_FAILURE 0x00 +#define RSP_DATA_BURST_ERR 0x01 +#define RSP_CMD_FIELD_ERR 0x02 +#define RSP_RO_MISMATCH_ERR 0x03 +#define RSP_TM_NOT_SUPPORTED 0x04 /* Task mgmt function not supported */ +#define RSP_TM_NOT_COMPLETED 0x05 /* Task mgmt function not performed */ + + uint32 rspInfoRsvd; /* FCP_RSP_INFO bytes 4-7 (reserved) */ + +#define MAX_FCP_SNS 128 + uchar rspSnsInfo[MAX_FCP_SNS]; +} FCP_RSP, *PFCP_RSP; + +/* + * Definition of FCP_CMND Packet + */ + +typedef struct _FCP_CMND { + uint32 fcpLunMsl; /* most significant lun word (32 bits) */ + uint32 fcpLunLsl; /* least significant lun word (32 bits) */ + /* # of bits to shift lun id to end up in right + * payload word, little endian = 8, big = 16. + */ +#if LITTLE_ENDIAN_HW +#define FC_LUN_SHIFT 8 +#define FC_ADDR_MODE_SHIFT 0 +#endif +#if BIG_ENDIAN_HW +#define FC_LUN_SHIFT 16 +#define FC_ADDR_MODE_SHIFT 24 +#endif + + uchar fcpCntl0; /* FCP_CNTL byte 0 (reserved) */ + uchar fcpCntl1; /* FCP_CNTL byte 1 task codes */ +#define SIMPLE_Q 0x00 +#define HEAD_OF_Q 0x01 +#define ORDERED_Q 0x02 +#define ACA_Q 0x04 +#define UNTAGGED 0x05 + uchar fcpCntl2; /* FCP_CTL byte 2 task management codes */ +#define ABORT_TASK_SET 0x02 /* Bit 1 */ +#define CLEAR_TASK_SET 0x04 /* bit 2 */ +#define LUN_RESET 0x10 /* bit 4 */ +#define TARGET_RESET 0x20 /* bit 5 */ +#define CLEAR_ACA 0x40 /* bit 6 */ +#define TERMINATE_TASK 0x80 /* bit 7 */ + uchar fcpCntl3; +#define WRITE_DATA 0x01 /* Bit 0 */ +#define READ_DATA 0x02 /* Bit 1 */ + + uchar fcpCdb[16]; /* SRB cdb field is copied here */ + uint32 fcpDl; /* Total transfer length */ + +} FCP_CMND, *PFCP_CMND; + +/* SCSI INQUIRY Command Structure */ + +typedef struct inquiryDataType { + u8bit DeviceType : 5; + u8bit DeviceTypeQualifier : 3; + + u8bit DeviceTypeModifier : 7; + u8bit RemovableMedia : 1; + + uchar Versions; + uchar ResponseDataFormat; + uchar AdditionalLength; + uchar Reserved[2]; + + u8bit SoftReset : 1; + u8bit CommandQueue : 1; + u8bit Reserved2 : 1; + u8bit LinkedCommands : 1; + u8bit Synchronous : 1; + u8bit Wide16Bit : 1; + u8bit Wide32Bit : 1; + u8bit RelativeAddressing : 1; + + uchar VendorId[8]; + uchar ProductId[16]; + uchar ProductRevisionLevel[4]; + uchar VendorSpecific[20]; + uchar Reserved3[40]; +} INQUIRY_DATA_DEF; + +typedef struct _READ_CAPACITY_DATA { + ulong LogicalBlockAddress; + ulong BytesPerBlock; +} READ_CAPACITY_DATA_DEF; + +typedef struct _REPORT_LUNS_DATA { + union { + uchar cB[8]; + uint32 cL[2]; + } control; + union { + uchar eB[8]; + uint32 eL[2]; + } entry [1]; +} REPORT_LUNS_DATA_DEF; + +/* SCSI CDB command codes */ +#define FCP_SCSI_FORMAT_UNIT 0x04 +#define FCP_SCSI_INQUIRY 0x12 +#define FCP_SCSI_MODE_SELECT 0x15 +#define FCP_SCSI_MODE_SENSE 0x1A +#define FCP_SCSI_PAUSE_RESUME 0x4B +#define FCP_SCSI_PLAY_AUDIO 0x45 +#define FCP_SCSI_PLAY_AUDIO_EXT 0xA5 +#define FCP_SCSI_PLAY_AUDIO_MSF 0x47 +#define FCP_SCSI_PLAY_AUDIO_TRK_INDX 0x48 +#define FCP_SCSI_PREVENT_ALLOW_REMOVAL 0x1E +#define FCP_SCSI_READ 0x08 +#define FCP_SCSI_READ_BUFFER 0x3C +#define FCP_SCSI_READ_CAPACITY 0x25 +#define FCP_SCSI_READ_DEFECT_LIST 0x37 +#define FCP_SCSI_READ_EXTENDED 0x28 +#define FCP_SCSI_READ_HEADER 0x44 +#define FCP_SCSI_READ_LONG 0xE8 +#define FCP_SCSI_READ_SUB_CHANNEL 0x42 +#define FCP_SCSI_READ_TOC 0x43 +#define FCP_SCSI_REASSIGN_BLOCK 0x07 +#define FCP_SCSI_RECEIVE_DIAGNOSTIC_RESULTS 0x1C +#define FCP_SCSI_RELEASE_UNIT 0x17 +#define FCP_SCSI_REPORT_LUNS 0xa0 +#define FCP_SCSI_REQUEST_SENSE 0x03 +#define FCP_SCSI_RESERVE_UNIT 0x16 +#define FCP_SCSI_REZERO_UNIT 0x01 +#define FCP_SCSI_SEEK 0x0B +#define FCP_SCSI_SEEK_EXTENDED 0x2B +#define FCP_SCSI_SEND_DIAGNOSTIC 0x1D +#define FCP_SCSI_START_STOP_UNIT 0x1B +#define FCP_SCSI_TEST_UNIT_READY 0x00 +#define FCP_SCSI_VERIFY 0x2F +#define FCP_SCSI_WRITE 0x0A +#define FCP_SCSI_WRITE_AND_VERIFY 0x2E +#define FCP_SCSI_WRITE_BUFFER 0x3B +#define FCP_SCSI_WRITE_EXTENDED 0x2A +#define FCP_SCSI_WRITE_LONG 0xEA +#define FCP_SCSI_RELEASE_LUNR 0xBB +#define FCP_SCSI_RELEASE_LUNV 0xBF + +#define HPVA_SETPASSTHROUGHMODE 0x27 +#define HPVA_EXECUTEPASSTHROUGH 0x29 +#define HPVA_CREATELUN 0xE2 +#define HPVA_SETLUNSECURITYLIST 0xED +#define HPVA_SETCLOCK 0xF9 +#define HPVA_RECOVER 0xFA +#define HPVA_GENERICSERVICEOUT 0xFD + +#define DMEP_EXPORT_IN 0x85 +#define DMEP_EXPORT_OUT 0x89 + +#define MDACIOCTL_DIRECT_CMD 0x22 +#define MDACIOCTL_STOREIMAGE 0x2C +#define MDACIOCTL_WRITESIGNATURE 0xA6 +#define MDACIOCTL_SETREALTIMECLOCK 0xAC +#define MDACIOCTL_PASS_THRU_CDB 0xAD +#define MDACIOCTL_PASS_THRU_INITIATE 0xAE +#define MDACIOCTL_CREATENEWCONF 0xC0 +#define MDACIOCTL_ADDNEWCONF 0xC4 +#define MDACIOCTL_MORE 0xC6 +#define MDACIOCTL_SETPHYSDEVPARAMETER 0xC8 +#define MDACIOCTL_SETLOGDEVPARAMETER 0xCF +#define MDACIOCTL_SETCONTROLLERPARAMETER 0xD1 +#define MDACIOCTL_WRITESANMAP 0xD4 +#define MDACIOCTL_SETMACADDRESS 0xD5 + +/* + * End of FCP specific structures + */ + +#define FL_ALPA 0x00 /* AL_PA of FL_Port */ + +/* Fibre Channel Service Parameter definitions */ + +#define FC_PH_4_0 6 /* FC-PH version 4.0 */ +#define FC_PH_4_1 7 /* FC-PH version 4.1 */ +#define FC_PH_4_2 8 /* FC-PH version 4.2 */ +#define FC_PH_4_3 9 /* FC-PH version 4.3 */ + +#define FC_PH_LOW 8 /* Lowest supported FC-PH version */ +#define FC_PH_HIGH 9 /* Highest supported FC-PH version */ +#define FC_PH3 0x20 /* FC-PH-3 version */ + +#define FF_FRAME_SIZE 2048 + + +/* ==== Mailbox Commands ==== */ +#define MBX_SHUTDOWN 0x00 /* terminate testing */ +#define MBX_LOAD_SM 0x01 +#define MBX_READ_NV 0x02 +#define MBX_WRITE_NV 0x03 +#define MBX_RUN_BIU_DIAG 0x04 +#define MBX_INIT_LINK 0x05 +#define MBX_DOWN_LINK 0x06 +#define MBX_CONFIG_LINK 0x07 +#define MBX_PART_SLIM 0x08 +#define MBX_CONFIG_RING 0x09 +#define MBX_RESET_RING 0x0A +#define MBX_READ_CONFIG 0x0B +#define MBX_READ_RCONFIG 0x0C +#define MBX_READ_SPARM 0x0D +#define MBX_READ_STATUS 0x0E +#define MBX_READ_RPI 0x0F +#define MBX_READ_XRI 0x10 +#define MBX_READ_REV 0x11 +#define MBX_READ_LNK_STAT 0x12 +#define MBX_REG_LOGIN 0x13 +#define MBX_UNREG_LOGIN 0x14 +#define MBX_READ_LA 0x15 +#define MBX_CLEAR_LA 0x16 +#define MBX_DUMP_MEMORY 0x17 +#define MBX_DUMP_CONTEXT 0x18 +#define MBX_RUN_DIAGS 0x19 +#define MBX_RESTART 0x1A +#define MBX_UPDATE_CFG 0x1B +#define MBX_DOWN_LOAD 0x1C +#define MBX_DEL_LD_ENTRY 0x1D +#define MBX_RUN_PROGRAM 0x1E +#define MBX_SET_MASK 0x20 +#define MBX_SET_SLIM 0x21 +#define MBX_UNREG_D_ID 0x23 +#define MBX_CONFIG_FARP 0x25 + +#define MBX_LOAD_AREA 0x81 +#define MBX_RUN_BIU_DIAG64 0x84 +#define MBX_CONFIG_PORT 0x88 +#define MBX_READ_SPARM64 0x8D +#define MBX_READ_RPI64 0x8F +#define MBX_REG_LOGIN64 0x93 +#define MBX_READ_LA64 0x95 + +#define MBX_FLASH_WR_ULA 0x98 +#define MBX_SET_DEBUG 0x99 +#define MBX_LOAD_EXP_ROM 0x9C + +#define MBX_MAX_CMDS 0x9D +#define MBX_SLI2_CMD_MASK 0x80 + + +/* ==== IOCB Commands ==== */ + +#define CMD_RCV_SEQUENCE_CX 0x01 +#define CMD_XMIT_SEQUENCE_CR 0x02 +#define CMD_XMIT_SEQUENCE_CX 0x03 +#define CMD_XMIT_BCAST_CN 0x04 +#define CMD_XMIT_BCAST_CX 0x05 +#define CMD_QUE_RING_BUF_CN 0x06 +#define CMD_QUE_XRI_BUF_CX 0x07 +#define CMD_IOCB_CONTINUE_CN 0x08 +#define CMD_RET_XRI_BUF_CX 0x09 +#define CMD_ELS_REQUEST_CR 0x0A +#define CMD_ELS_REQUEST_CX 0x0B +#define CMD_RCV_ELS_REQ_CX 0x0D +#define CMD_ABORT_XRI_CN 0x0E +#define CMD_ABORT_XRI_CX 0x0F +#define CMD_CLOSE_XRI_CR 0x10 +#define CMD_CLOSE_XRI_CX 0x11 +#define CMD_CREATE_XRI_CR 0x12 +#define CMD_CREATE_XRI_CX 0x13 +#define CMD_GET_RPI_CN 0x14 +#define CMD_XMIT_ELS_RSP_CX 0x15 +#define CMD_GET_RPI_CR 0x16 +#define CMD_XRI_ABORTED_CX 0x17 +#define CMD_FCP_IWRITE_CR 0x18 +#define CMD_FCP_IWRITE_CX 0x19 +#define CMD_FCP_IREAD_CR 0x1A +#define CMD_FCP_IREAD_CX 0x1B +#define CMD_FCP_ICMND_CR 0x1C +#define CMD_FCP_ICMND_CX 0x1D +#define CMD_ADAPTER_MSG 0x20 +#define CMD_ADAPTER_DUMP 0x22 +#define CMD_BPL_IWRITE_CR 0x48 +#define CMD_BPL_IWRITE_CX 0x49 +#define CMD_BPL_IREAD_CR 0x4A +#define CMD_BPL_IREAD_CX 0x4B +#define CMD_BPL_ICMND_CR 0x4C +#define CMD_BPL_ICMND_CX 0x4D + +/* SLI_2 IOCB Command Set */ + +#define CMD_RCV_SEQUENCE64_CX 0x81 +#define CMD_XMIT_SEQUENCE64_CR 0x82 +#define CMD_XMIT_SEQUENCE64_CX 0x83 +#define CMD_XMIT_BCAST64_CN 0x84 +#define CMD_XMIT_BCAST64_CX 0x85 +#define CMD_QUE_RING_BUF64_CN 0x86 +#define CMD_QUE_XRI_BUF64_CX 0x87 +#define CMD_IOCB_CONTINUE64_CN 0x88 +#define CMD_RET_XRI_BUF64_CX 0x89 +#define CMD_ELS_REQUEST64_CR 0x8A +#define CMD_ELS_REQUEST64_CX 0x8B +#define CMD_RCV_ELS_REQ64_CX 0x8D +#define CMD_XMIT_ELS_RSP64_CX 0x95 +#define CMD_FCP_IWRITE64_CR 0x98 +#define CMD_FCP_IWRITE64_CX 0x99 +#define CMD_FCP_IREAD64_CR 0x9A +#define CMD_FCP_IREAD64_CX 0x9B +#define CMD_FCP_ICMND64_CR 0x9C +#define CMD_FCP_ICMND64_CX 0x9D +#define CMD_GEN_REQUEST64_CR 0xC2 +#define CMD_GEN_REQUEST64_CX 0xC3 + + +/* + * Define Status + */ +#define MBX_SUCCESS 0 +#define MBXERR_NUM_RINGS 1 +#define MBXERR_NUM_IOCBS 2 +#define MBXERR_IOCBS_EXCEEDED 3 +#define MBXERR_BAD_RING_NUMBER 4 +#define MBXERR_MASK_ENTRIES_RANGE 5 +#define MBXERR_MASKS_EXCEEDED 6 +#define MBXERR_BAD_PROFILE 7 +#define MBXERR_BAD_DEF_CLASS 8 +#define MBXERR_BAD_MAX_RESPONDER 9 +#define MBXERR_BAD_MAX_ORIGINATOR 10 +#define MBXERR_RPI_REGISTERED 11 +#define MBXERR_RPI_FULL 12 +#define MBXERR_NO_RESOURCES 13 +#define MBXERR_BAD_RCV_LENGTH 14 +#define MBXERR_DMA_ERROR 15 +#define MBXERR_ERROR 16 +#define MBX_NOT_FINISHED 255 +/* + * Error codes returned by issue_mb_cmd() + */ +#define MBX_BUSY 0xffffff /* Attempted cmd to a busy Mailbox */ +#define MBX_TIMEOUT 0xfffffe /* Max time-out expired waiting for */ +/* synch. Mailbox operation */ +/* + * flags for issue_mb_cmd() + */ +#define MBX_POLL 1 /* poll mailbox till command done, then return */ +#define MBX_SLEEP 2 /* sleep till mailbox intr cmpl wakes thread up */ +#define MBX_NOWAIT 3 /* issue command then return immediately */ + +typedef struct { +#if BIG_ENDIAN_HW + u32bit crReserved :16; + u32bit crBegin : 8; + u32bit crEnd : 8; /* Low order bit first word */ + u32bit rrReserved :16; + u32bit rrBegin : 8; + u32bit rrEnd : 8; /* Low order bit second word */ +#endif +#if LITTLE_ENDIAN_HW + u32bit crEnd : 8; /* Low order bit first word */ + u32bit crBegin : 8; + u32bit crReserved :16; + u32bit rrEnd : 8; /* Low order bit second word */ + u32bit rrBegin : 8; + u32bit rrReserved :16; +#endif +} RINGS; + + +typedef struct { +#if BIG_ENDIAN_HW + ushort offCiocb; + ushort numCiocb; + ushort offRiocb; + ushort numRiocb; +#endif +#if LITTLE_ENDIAN_HW + ushort numCiocb; + ushort offCiocb; + ushort numRiocb; + ushort offRiocb; +#endif +} RING_DEF; + + +/* + * The following F.C. frame stuctures are defined in Big Endian format. + */ + +typedef struct _NAME_TYPE { +#if BIG_ENDIAN_HW + u8bit nameType : 4; /* FC Word 0, bit 28:31 */ + u8bit IEEEextMsn : 4; /* FC Word 0, bit 24:27, bit 8:11 of IEEE ext */ +#endif +#if LITTLE_ENDIAN_HW + u8bit IEEEextMsn : 4; /* FC Word 0, bit 24:27, bit 8:11 of IEEE ext */ + u8bit nameType : 4; /* FC Word 0, bit 28:31 */ +#endif +#define NAME_IEEE 0x1 /* IEEE name - nameType */ +#define NAME_IEEE_EXT 0x2 /* IEEE extended name */ +#define NAME_FC_TYPE 0x3 /* FC native name type */ +#define NAME_IP_TYPE 0x4 /* IP address */ +#define NAME_CCITT_TYPE 0xC +#define NAME_CCITT_GR_TYPE 0xE + uchar IEEEextLsb; /* FC Word 0, bit 16:23, IEEE extended Lsb */ + uchar IEEE[6]; /* FC IEEE address */ +} NAME_TYPE; + + +typedef struct _CSP { + uchar fcphHigh; /* FC Word 0, byte 0 */ + uchar fcphLow; + uchar bbCreditMsb; + uchar bbCreditlsb; /* FC Word 0, byte 3 */ +#if BIG_ENDIAN_HW + u16bit increasingOffset : 1; /* FC Word 1, bit 31 */ + u16bit randomOffset : 1; /* FC Word 1, bit 30 */ + u16bit word1Reserved2 : 1; /* FC Word 1, bit 29 */ + u16bit fPort : 1; /* FC Word 1, bit 28 */ + u16bit altBbCredit : 1; /* FC Word 1, bit 27 */ + u16bit edtovResolution : 1; /* FC Word 1, bit 26 */ + u16bit multicast : 1; /* FC Word 1, bit 25 */ + u16bit broadcast : 1; /* FC Word 1, bit 24 */ + + u16bit huntgroup : 1; /* FC Word 1, bit 23 */ + u16bit simplex : 1; /* FC Word 1, bit 22 */ + u16bit word1Reserved1 : 3; /* FC Word 1, bit 21:19 */ + u16bit dhd : 1; /* FC Word 1, bit 18 */ + u16bit contIncSeqCnt : 1; /* FC Word 1, bit 17 */ + u16bit payloadlength : 1; /* FC Word 1, bit 16 */ +#endif +#if LITTLE_ENDIAN_HW + u16bit broadcast : 1; /* FC Word 1, bit 24 */ + u16bit multicast : 1; /* FC Word 1, bit 25 */ + u16bit edtovResolution : 1; /* FC Word 1, bit 26 */ + u16bit altBbCredit : 1; /* FC Word 1, bit 27 */ + u16bit fPort : 1; /* FC Word 1, bit 28 */ + u16bit word1Reserved2 : 1; /* FC Word 1, bit 29 */ + u16bit randomOffset : 1; /* FC Word 1, bit 30 */ + u16bit increasingOffset : 1; /* FC Word 1, bit 31 */ + + u16bit payloadlength : 1; /* FC Word 1, bit 16 */ + u16bit contIncSeqCnt : 1; /* FC Word 1, bit 17 */ + u16bit dhd : 1; /* FC Word 1, bit 18 */ + u16bit word1Reserved1 : 3; /* FC Word 1, bit 21:19 */ + u16bit simplex : 1; /* FC Word 1, bit 22 */ + u16bit huntgroup : 1; /* FC Word 1, bit 23 */ +#endif + uchar bbRcvSizeMsb; /* Upper nibble is reserved */ + + uchar bbRcvSizeLsb; /* FC Word 1, byte 3 */ + union { + struct { + uchar word2Reserved1; /* FC Word 2 byte 0 */ + + uchar totalConcurrSeq; /* FC Word 2 byte 1 */ + uchar roByCategoryMsb; /* FC Word 2 byte 2 */ + + uchar roByCategoryLsb; /* FC Word 2 byte 3 */ + } nPort; + uint32 r_a_tov; /* R_A_TOV must be in B.E. format */ + } w2; + + uint32 e_d_tov; /* E_D_TOV must be in B.E. format */ +} CSP; + + +typedef struct _CLASS_PARMS { +#if BIG_ENDIAN_HW + u8bit classValid : 1; /* FC Word 0, bit 31 */ + u8bit intermix : 1; /* FC Word 0, bit 30 */ + u8bit stackedXparent : 1; /* FC Word 0, bit 29 */ + u8bit stackedLockDown : 1; /* FC Word 0, bit 28 */ + u8bit seqDelivery : 1; /* FC Word 0, bit 27 */ + u8bit word0Reserved1 : 3; /* FC Word 0, bit 24:26 */ +#endif +#if LITTLE_ENDIAN_HW + u8bit word0Reserved1 : 3; /* FC Word 0, bit 24:26 */ + u8bit seqDelivery : 1; /* FC Word 0, bit 27 */ + u8bit stackedLockDown : 1; /* FC Word 0, bit 28 */ + u8bit stackedXparent : 1; /* FC Word 0, bit 29 */ + u8bit intermix : 1; /* FC Word 0, bit 30 */ + u8bit classValid : 1; /* FC Word 0, bit 31 */ + +#endif + uchar word0Reserved2; /* FC Word 0, bit 16:23 */ +#if BIG_ENDIAN_HW + u8bit iCtlXidReAssgn : 2; /* FC Word 0, Bit 14:15 */ + u8bit iCtlInitialPa : 2; /* FC Word 0, bit 12:13 */ + u8bit iCtlAck0capable : 1; /* FC Word 0, bit 11 */ + u8bit iCtlAckNcapable : 1; /* FC Word 0, bit 10 */ + u8bit word0Reserved3 : 2; /* FC Word 0, bit 8: 9 */ +#endif +#if LITTLE_ENDIAN_HW + u8bit word0Reserved3 : 2; /* FC Word 0, bit 8: 9 */ + u8bit iCtlAckNcapable : 1; /* FC Word 0, bit 10 */ + u8bit iCtlAck0capable : 1; /* FC Word 0, bit 11 */ + u8bit iCtlInitialPa : 2; /* FC Word 0, bit 12:13 */ + u8bit iCtlXidReAssgn : 2; /* FC Word 0, Bit 14:15 */ +#endif + uchar word0Reserved4; /* FC Word 0, bit 0: 7 */ +#if BIG_ENDIAN_HW + u8bit rCtlAck0capable : 1; /* FC Word 1, bit 31 */ + u8bit rCtlAckNcapable : 1; /* FC Word 1, bit 30 */ + u8bit rCtlXidInterlck : 1; /* FC Word 1, bit 29 */ + u8bit rCtlErrorPolicy : 2; /* FC Word 1, bit 27:28 */ + u8bit word1Reserved1 : 1; /* FC Word 1, bit 26 */ + u8bit rCtlCatPerSeq : 2; /* FC Word 1, bit 24:25 */ +#endif +#if LITTLE_ENDIAN_HW + u8bit rCtlCatPerSeq : 2; /* FC Word 1, bit 24:25 */ + u8bit word1Reserved1 : 1; /* FC Word 1, bit 26 */ + u8bit rCtlErrorPolicy : 2; /* FC Word 1, bit 27:28 */ + u8bit rCtlXidInterlck : 1; /* FC Word 1, bit 29 */ + u8bit rCtlAckNcapable : 1; /* FC Word 1, bit 30 */ + u8bit rCtlAck0capable : 1; /* FC Word 1, bit 31 */ +#endif + uchar word1Reserved2; /* FC Word 1, bit 16:23 */ + uchar rcvDataSizeMsb; /* FC Word 1, bit 8:15 */ + uchar rcvDataSizeLsb; /* FC Word 1, bit 0: 7 */ + + uchar concurrentSeqMsb; /* FC Word 2, bit 24:31 */ + uchar concurrentSeqLsb; /* FC Word 2, bit 16:23 */ + uchar EeCreditSeqMsb; /* FC Word 2, bit 8:15 */ + uchar EeCreditSeqLsb; /* FC Word 2, bit 0: 7 */ + + uchar openSeqPerXchgMsb; /* FC Word 3, bit 24:31 */ + uchar openSeqPerXchgLsb; /* FC Word 3, bit 16:23 */ + uchar word3Reserved1; /* Fc Word 3, bit 8:15 */ + uchar word3Reserved2; /* Fc Word 3, bit 0: 7 */ +} CLASS_PARMS; + + +typedef struct _SERV_PARM { /* Structure is in Big Endian format */ + CSP cmn; + NAME_TYPE portName; + NAME_TYPE nodeName; + CLASS_PARMS cls1; + CLASS_PARMS cls2; + CLASS_PARMS cls3; + CLASS_PARMS cls4; + uchar vendorVersion[16]; +} SERV_PARM, *PSERV_PARM; + + +/* + * Extended Link Service LS_COMMAND codes (Payload Word 0) + */ +#if BIG_ENDIAN_HW +#define ELS_CMD_MASK 0xffff0000 +#define ELS_RSP_MASK 0xff000000 +#define ELS_CMD_LS_RJT 0x01000000 +#define ELS_CMD_ACC 0x02000000 +#define ELS_CMD_PLOGI 0x03000000 +#define ELS_CMD_FLOGI 0x04000000 +#define ELS_CMD_LOGO 0x05000000 +#define ELS_CMD_ABTX 0x06000000 +#define ELS_CMD_RCS 0x07000000 +#define ELS_CMD_RES 0x08000000 +#define ELS_CMD_RSS 0x09000000 +#define ELS_CMD_RSI 0x0A000000 +#define ELS_CMD_ESTS 0x0B000000 +#define ELS_CMD_ESTC 0x0C000000 +#define ELS_CMD_ADVC 0x0D000000 +#define ELS_CMD_RTV 0x0E000000 +#define ELS_CMD_RLS 0x0F000000 +#define ELS_CMD_ECHO 0x10000000 +#define ELS_CMD_TEST 0x11000000 +#define ELS_CMD_RRQ 0x12000000 +#define ELS_CMD_PRLI 0x20100014 +#define ELS_CMD_PRLO 0x21100014 +#define ELS_CMD_PDISC 0x50000000 +#define ELS_CMD_FDISC 0x51000000 +#define ELS_CMD_ADISC 0x52000000 +#define ELS_CMD_FARP 0x54000000 +#define ELS_CMD_FARPR 0x55000000 +#define ELS_CMD_FAN 0x60000000 +#define ELS_CMD_RSCN 0x61040000 +#define ELS_CMD_SCR 0x62000000 +#define ELS_CMD_RNID 0x78000000 +#endif +#if LITTLE_ENDIAN_HW +#define ELS_CMD_MASK 0xffff +#define ELS_RSP_MASK 0xff +#define ELS_CMD_LS_RJT 0x01 +#define ELS_CMD_ACC 0x02 +#define ELS_CMD_PLOGI 0x03 +#define ELS_CMD_FLOGI 0x04 +#define ELS_CMD_LOGO 0x05 +#define ELS_CMD_ABTX 0x06 +#define ELS_CMD_RCS 0x07 +#define ELS_CMD_RES 0x08 +#define ELS_CMD_RSS 0x09 +#define ELS_CMD_RSI 0x0A +#define ELS_CMD_ESTS 0x0B +#define ELS_CMD_ESTC 0x0C +#define ELS_CMD_ADVC 0x0D +#define ELS_CMD_RTV 0x0E +#define ELS_CMD_RLS 0x0F +#define ELS_CMD_ECHO 0x10 +#define ELS_CMD_TEST 0x11 +#define ELS_CMD_RRQ 0x12 +#define ELS_CMD_PRLI 0x14001020 +#define ELS_CMD_PRLO 0x14001021 +#define ELS_CMD_PDISC 0x50 +#define ELS_CMD_FDISC 0x51 +#define ELS_CMD_ADISC 0x52 +#define ELS_CMD_FARP 0x54 +#define ELS_CMD_FARPR 0x55 +#define ELS_CMD_FAN 0x60 +#define ELS_CMD_RSCN 0x0461 +#define ELS_CMD_SCR 0x62 +#define ELS_CMD_RNID 0x78 +#endif + + +/* + * LS_RJT Payload Definition + */ + +typedef struct _LS_RJT { /* Structure is in Big Endian format */ + union { + uint32 lsRjtError; + struct { + uchar lsRjtRsvd0; /* FC Word 0, bit 24:31 */ + + uchar lsRjtRsnCode; /* FC Word 0, bit 16:23 */ + /* LS_RJT reason codes */ +#define LSRJT_INVALID_CMD 0x01 +#define LSRJT_LOGICAL_ERR 0x03 +#define LSRJT_LOGICAL_BSY 0x05 +#define LSRJT_PROTOCOL_ERR 0x07 +#define LSRJT_UNABLE_TPC 0x09 /* Unable to perform command */ +#define LSRJT_CMD_UNSUPPORTED 0x0B +#define LSRJT_VENDOR_UNIQUE 0xFF /* See Byte 3 */ + + uchar lsRjtRsnCodeExp; /* FC Word 0, bit 8:15 */ + /* LS_RJT reason explanation */ +#define LSEXP_NOTHING_MORE 0x00 +#define LSEXP_SPARM_OPTIONS 0x01 +#define LSEXP_SPARM_ICTL 0x03 +#define LSEXP_SPARM_RCTL 0x05 +#define LSEXP_SPARM_RCV_SIZE 0x07 +#define LSEXP_SPARM_CONCUR_SEQ 0x09 +#define LSEXP_SPARM_CREDIT 0x0B +#define LSEXP_INVALID_PNAME 0x0D +#define LSEXP_INVALID_NNAME 0x0E +#define LSEXP_INVALID_CSP 0x0F +#define LSEXP_INVALID_ASSOC_HDR 0x11 +#define LSEXP_ASSOC_HDR_REQ 0x13 +#define LSEXP_INVALID_O_SID 0x15 +#define LSEXP_INVALID_OX_RX 0x17 +#define LSEXP_CMD_IN_PROGRESS 0x19 +#define LSEXP_INVALID_NPORT_ID 0x1F +#define LSEXP_INVALID_SEQ_ID 0x21 +#define LSEXP_INVALID_XCHG 0x23 +#define LSEXP_INACTIVE_XCHG 0x25 +#define LSEXP_RQ_REQUIRED 0x27 +#define LSEXP_OUT_OF_RESOURCE 0x29 +#define LSEXP_CANT_GIVE_DATA 0x2A +#define LSEXP_REQ_UNSUPPORTED 0x2C + uchar vendorUnique; /* FC Word 0, bit 0: 7 */ + } b; + } un; +} LS_RJT; + + +/* + * N_Port Login (FLOGO/PLOGO Request) Payload Definition + */ + +typedef struct _LOGO { /* Structure is in Big Endian format */ + union { + uint32 nPortId32; /* Access nPortId as a word */ + struct { + uchar word1Reserved1; /* FC Word 1, bit 31:24 */ + uchar nPortIdByte0; /* N_port ID bit 16:23 */ + uchar nPortIdByte1; /* N_port ID bit 8:15 */ + uchar nPortIdByte2; /* N_port ID bit 0: 7 */ + } b; + } un; + NAME_TYPE portName; /* N_port name field */ +} LOGO; + + +/* + * FCP Login (PRLI Request / ACC) Payload Definition + */ + +#define PRLX_PAGE_LEN 0x10 +#define TPRLO_PAGE_LEN 0x14 + +typedef struct _PRLI { /* Structure is in Big Endian format */ + uchar prliType; /* FC Parm Word 0, bit 24:31 */ + +#define PRLI_FCP_TYPE 0x08 + uchar word0Reserved1; /* FC Parm Word 0, bit 16:23 */ + +#if BIG_ENDIAN_HW + u8bit origProcAssocV : 1; /* FC Parm Word 0, bit 15 */ + u8bit respProcAssocV : 1; /* FC Parm Word 0, bit 14 */ + u8bit estabImagePair : 1; /* FC Parm Word 0, bit 13 */ + + u8bit word0Reserved2 : 1; /* FC Parm Word 0, bit 12 */ + u8bit acceptRspCode : 4; /* FC Parm Word 0, bit 8:11, ACC ONLY */ +#endif +#if LITTLE_ENDIAN_HW + u8bit acceptRspCode : 4; /* FC Parm Word 0, bit 8:11, ACC ONLY */ + u8bit word0Reserved2 : 1; /* FC Parm Word 0, bit 12 */ + u8bit estabImagePair : 1; /* FC Parm Word 0, bit 13 */ + u8bit respProcAssocV : 1; /* FC Parm Word 0, bit 14 */ + u8bit origProcAssocV : 1; /* FC Parm Word 0, bit 15 */ +#endif +#define PRLI_REQ_EXECUTED 0x1 /* acceptRspCode */ +#define PRLI_NO_RESOURCES 0x2 +#define PRLI_INIT_INCOMPLETE 0x3 +#define PRLI_NO_SUCH_PA 0x4 +#define PRLI_PREDEF_CONFIG 0x5 +#define PRLI_PARTIAL_SUCCESS 0x6 +#define PRLI_INVALID_PAGE_CNT 0x7 + uchar word0Reserved3; /* FC Parm Word 0, bit 0:7 */ + + uint32 origProcAssoc; /* FC Parm Word 1, bit 0:31 */ + + uint32 respProcAssoc; /* FC Parm Word 2, bit 0:31 */ + + uchar word3Reserved1; /* FC Parm Word 3, bit 24:31 */ + uchar word3Reserved2; /* FC Parm Word 3, bit 16:23 */ +#if BIG_ENDIAN_HW + u16bit Word3bit15Resved : 1; /* FC Parm Word 3, bit 15 */ + u16bit Word3bit14Resved : 1; /* FC Parm Word 3, bit 14 */ + u16bit Word3bit13Resved : 1; /* FC Parm Word 3, bit 13 */ + u16bit Word3bit12Resved : 1; /* FC Parm Word 3, bit 12 */ + u16bit Word3bit11Resved : 1; /* FC Parm Word 3, bit 11 */ + u16bit Word3bit10Resved : 1; /* FC Parm Word 3, bit 10 */ + u16bit TaskRetryIdReq : 1; /* FC Parm Word 3, bit 9 */ + u16bit Retry : 1; /* FC Parm Word 3, bit 8 */ + u16bit ConfmComplAllowed : 1; /* FC Parm Word 3, bit 7 */ + u16bit dataOverLay : 1; /* FC Parm Word 3, bit 6 */ + u16bit initiatorFunc : 1; /* FC Parm Word 3, bit 5 */ + u16bit targetFunc : 1; /* FC Parm Word 3, bit 4 */ + u16bit cmdDataMixEna : 1; /* FC Parm Word 3, bit 3 */ + u16bit dataRspMixEna : 1; /* FC Parm Word 3, bit 2 */ + u16bit readXferRdyDis : 1; /* FC Parm Word 3, bit 1 */ + u16bit writeXferRdyDis : 1; /* FC Parm Word 3, bit 0 */ +#endif +#if LITTLE_ENDIAN_HW + u16bit Retry : 1; /* FC Parm Word 3, bit 8 */ + u16bit TaskRetryIdReq : 1; /* FC Parm Word 3, bit 9 */ + u16bit Word3bit10Resved : 1; /* FC Parm Word 3, bit 10 */ + u16bit Word3bit11Resved : 1; /* FC Parm Word 3, bit 11 */ + u16bit Word3bit12Resved : 1; /* FC Parm Word 3, bit 12 */ + u16bit Word3bit13Resved : 1; /* FC Parm Word 3, bit 13 */ + u16bit Word3bit14Resved : 1; /* FC Parm Word 3, bit 14 */ + u16bit Word3bit15Resved : 1; /* FC Parm Word 3, bit 15 */ + u16bit writeXferRdyDis : 1; /* FC Parm Word 3, bit 0 */ + u16bit readXferRdyDis : 1; /* FC Parm Word 3, bit 1 */ + u16bit dataRspMixEna : 1; /* FC Parm Word 3, bit 2 */ + u16bit cmdDataMixEna : 1; /* FC Parm Word 3, bit 3 */ + u16bit targetFunc : 1; /* FC Parm Word 3, bit 4 */ + u16bit initiatorFunc : 1; /* FC Parm Word 3, bit 5 */ + u16bit dataOverLay : 1; /* FC Parm Word 3, bit 6 */ + u16bit ConfmComplAllowed : 1; /* FC Parm Word 3, bit 7 */ +#endif +} PRLI; + +/* + * FCP Logout (PRLO Request / ACC) Payload Definition + */ + +typedef struct _PRLO { /* Structure is in Big Endian format */ + uchar prloType; /* FC Parm Word 0, bit 24:31 */ + +#define PRLO_FCP_TYPE 0x08 + uchar word0Reserved1; /* FC Parm Word 0, bit 16:23 */ + +#if BIG_ENDIAN_HW + u8bit origProcAssocV : 1; /* FC Parm Word 0, bit 15 */ + u8bit respProcAssocV : 1; /* FC Parm Word 0, bit 14 */ + u8bit word0Reserved2 : 2; /* FC Parm Word 0, bit 12:13 */ + u8bit acceptRspCode : 4; /* FC Parm Word 0, bit 8:11, ACC ONLY */ +#endif +#if LITTLE_ENDIAN_HW + u8bit acceptRspCode : 4; /* FC Parm Word 0, bit 8:11, ACC ONLY */ + u8bit word0Reserved2 : 2; /* FC Parm Word 0, bit 12:13 */ + u8bit respProcAssocV : 1; /* FC Parm Word 0, bit 14 */ + u8bit origProcAssocV : 1; /* FC Parm Word 0, bit 15 */ +#endif +#define PRLO_REQ_EXECUTED 0x1 /* acceptRspCode */ +#define PRLO_NO_SUCH_IMAGE 0x4 +#define PRLO_INVALID_PAGE_CNT 0x7 + + uchar word0Reserved3; /* FC Parm Word 0, bit 0:7 */ + + uint32 origProcAssoc; /* FC Parm Word 1, bit 0:31 */ + + uint32 respProcAssoc; /* FC Parm Word 2, bit 0:31 */ + + uint32 word3Reserved1; /* FC Parm Word 3, bit 0:31 */ +} PRLO; + + +typedef struct _ADISC { /* Structure is in Big Endian format */ + uint32 hardAL_PA; + NAME_TYPE portName; + NAME_TYPE nodeName; + uint32 DID; +} ADISC; + + +typedef struct _FARP { /* Structure is in Big Endian format */ + u32bit Mflags : 8; + u32bit Odid : 24; +#define FARP_NO_ACTION 0 /* FARP information enclosed, no action */ +#define FARP_MATCH_PORT 0x1 /* Match on Responder Port Name */ +#define FARP_MATCH_NODE 0x2 /* Match on Responder Node Name */ +#define FARP_MATCH_IP 0x4 /* Match on IP address, not supported */ +#define FARP_MATCH_IPV4 0x5 /* Match on IPV4 address, not supported */ +#define FARP_MATCH_IPV6 0x6 /* Match on IPV6 address, not supported */ + u32bit Rflags : 8; + u32bit Rdid : 24; +#define FARP_REQUEST_PLOGI 0x1 /* Request for PLOGI */ +#define FARP_REQUEST_FARPR 0x2 /* Request for FARP Response */ + NAME_TYPE OportName; + NAME_TYPE OnodeName; + NAME_TYPE RportName; + NAME_TYPE RnodeName; + uchar Oipaddr[16]; + uchar Ripaddr[16]; +} FARP; + +typedef struct _FAN { /* Structure is in Big Endian format */ + uint32 Fdid; + NAME_TYPE FportName; + NAME_TYPE FnodeName; +} FAN; + +typedef struct _SCR { /* Structure is in Big Endian format */ + uchar resvd1; + uchar resvd2; + uchar resvd3; + uchar Function; +#define SCR_FUNC_FABRIC 0x01 +#define SCR_FUNC_NPORT 0x02 +#define SCR_FUNC_FULL 0x03 +#define SCR_CLEAR 0xff +} SCR; + +typedef struct _RNID_TOP_DISC { + NAME_TYPE portName; + uchar resvd[8]; + uint32 unitType; +#define RNID_HBA 0x7 +#define RNID_HOST 0xa +#define RNID_DRIVER 0xd + uint32 physPort; + uint32 attachedNodes; + ushort ipVersion; +#define RNID_IPV4 0x1 +#define RNID_IPV6 0x2 + ushort UDPport; + uchar ipAddr[16]; + ushort resvd1; + ushort flags; +#define RNID_TD_SUPPORT 0x1 +#define RNID_LP_VALID 0x2 +} RNID_TOP_DISC; + +typedef struct _RNID { /* Structure is in Big Endian format */ + uchar Format; +#define RNID_TOPOLOGY_DISC 0xdf + uchar CommonLen; + uchar resvd1; + uchar SpecificLen; + NAME_TYPE portName; + NAME_TYPE nodeName; + union { + RNID_TOP_DISC topologyDisc; /* topology disc (0xdf) */ + } un; +} RNID; + +typedef struct _RRQ { /* Structure is in Big Endian format */ + uint32 SID; + ushort Oxid; + ushort Rxid; + uchar resv[32]; /* optional association hdr */ +} RRQ; + + +/* This is used for RSCN command */ +typedef struct _D_ID { /* Structure is in Big Endian format */ + union { + uint32 word; + struct { +#if BIG_ENDIAN_HW + uchar resv; + uchar domain; + uchar area; + uchar id; +#endif +#if LITTLE_ENDIAN_HW + uchar id; + uchar area; + uchar domain; + uchar resv; +#endif + } b; + } un; +} D_ID; + +/* + * Structure to define all ELS Payload types + */ + +typedef struct _ELS_PKT { /* Structure is in Big Endian format */ + uchar elsCode; /* FC Word 0, bit 24:31 */ + uchar elsByte1; + uchar elsByte2; + uchar elsByte3; + union { + LS_RJT lsRjt; /* Payload for LS_RJT ELS response */ + SERV_PARM logi; /* Payload for PLOGI/FLOGI/PDISC/ACC */ + LOGO logo; /* Payload for PLOGO/FLOGO/ACC */ + PRLI prli; /* Payload for PRLI/ACC */ + PRLO prlo; /* Payload for PRLO/ACC */ + ADISC adisc; /* Payload for ADISC/ACC */ + FARP farp; /* Payload for FARP/ACC */ + FAN fan; /* Payload for FAN */ + SCR scr; /* Payload for SCR/ACC */ + RRQ rrq; /* Payload for RRQ */ + RNID rnid; /* Payload for RNID */ + uchar pad[128-4]; /* Pad out to payload of 128 bytes */ + } un; +} ELS_PKT; + + +/* + * Begin Structure Definitions for Mailbox Commands + */ + +typedef struct { +#if BIG_ENDIAN_HW + uchar tval; + uchar tmask; + uchar rval; + uchar rmask; +#endif +#if LITTLE_ENDIAN_HW + uchar rmask; + uchar rval; + uchar tmask; + uchar tval; +#endif +} RR_REG; + +typedef struct { + uint32 bdeAddress; +#if BIG_ENDIAN_HW + u32bit bdeReserved : 4; + u32bit bdeAddrHigh : 4; + u32bit bdeSize : 24; +#endif +#if LITTLE_ENDIAN_HW + u32bit bdeSize : 24; + u32bit bdeAddrHigh : 4; + u32bit bdeReserved : 4; +#endif +} ULP_BDE; + +typedef struct ULP_BDE_64 { /* SLI-2 */ + union ULP_BDE_TUS { + uint32 w; + struct { +#if BIG_ENDIAN_HW + u32bit bdeFlags : 8; + u32bit bdeSize : 24; /* Size of buffer (in bytes) */ +#endif +#if LITTLE_ENDIAN_HW + u32bit bdeSize : 24; /* Size of buffer (in bytes) */ + u32bit bdeFlags : 8; +#endif +#define BUFF_USE_RSVD 0x01 /* bdeFlags */ +#define BUFF_USE_INTRPT 0x02 +#define BUFF_USE_CMND 0x04 /* Optional, 1=cmd/rsp 0=data buffer */ +#define BUFF_USE_RCV 0x08 /* "" "", 1=rcv buffer, 0=xmit buffer */ +#define BUFF_TYPE_32BIT 0x10 /* "" "", 1=32 bit addr 0=64 bit addr */ +#define BUFF_TYPE_SPECIAL 0x20 +#define BUFF_TYPE_BDL 0x40 /* Optional, may be set in BDL */ +#define BUFF_TYPE_INVALID 0x80 /* "" "" */ + } f; + } tus; + uint32 addrLow; + uint32 addrHigh; +} ULP_BDE64; +#define BDE64_SIZE_WORD 0 +#define BPL64_SIZE_WORD 0x40 + +typedef struct ULP_BDL { /* SLI-2 */ +#if BIG_ENDIAN_HW + u32bit bdeFlags : 8; /* BDL Flags */ + u32bit bdeSize : 24; /* Size of BDL array in host memory (bytes) */ +#endif +#if LITTLE_ENDIAN_HW + u32bit bdeSize : 24; /* Size of BDL array in host memory (bytes) */ + u32bit bdeFlags : 8; /* BDL Flags */ +#endif + uint32 addrLow; /* Address 0:31 */ + uint32 addrHigh; /* Address 32:63 */ + uint32 ulpIoTag32; /* Can be used for 32 bit I/O Tag */ +} ULP_BDL; + + +/* Structure for MB Command LOAD_SM and DOWN_LOAD */ + +typedef struct { +#if BIG_ENDIAN_HW + u32bit rsvd2 :25; + u32bit acknowledgment : 1; + u32bit version : 1; + u32bit erase_or_prog : 1; + u32bit update_flash : 1; + u32bit update_ram : 1; + u32bit method : 1; + u32bit load_cmplt : 1; +#endif +#if LITTLE_ENDIAN_HW + u32bit load_cmplt : 1; + u32bit method : 1; + u32bit update_ram : 1; + u32bit update_flash : 1; + u32bit erase_or_prog : 1; + u32bit version : 1; + u32bit acknowledgment : 1; + u32bit rsvd2 :25; +#endif + +#define DL_FROM_BDE 0 /* method */ +#define DL_FROM_SLIM 1 + + uint32 dl_to_adr_low; + uint32 dl_to_adr_high; + uint32 dl_len; + union { + uint32 dl_from_mbx_offset; + ULP_BDE dl_from_bde; + ULP_BDE64 dl_from_bde64; + } un; + +} LOAD_SM_VAR; + + +/* Structure for MB Command READ_NVPARM (02) */ + +typedef struct { + uint32 rsvd1[3]; /* Read as all one's */ + uint32 rsvd2; /* Read as all zero's */ + uint32 portname[2]; /* N_PORT name */ + uint32 nodename[2]; /* NODE name */ +#if BIG_ENDIAN_HW + u32bit pref_DID : 24; + u32bit hardAL_PA : 8; +#endif +#if LITTLE_ENDIAN_HW + u32bit hardAL_PA : 8; + u32bit pref_DID : 24; +#endif + uint32 rsvd3[21]; /* Read as all one's */ +} READ_NV_VAR; + + +/* Structure for MB Command WRITE_NVPARMS (03) */ + +typedef struct { + uint32 rsvd1[3]; /* Must be all one's */ + uint32 rsvd2; /* Must be all zero's */ + uint32 portname[2]; /* N_PORT name */ + uint32 nodename[2]; /* NODE name */ +#if BIG_ENDIAN_HW + u32bit pref_DID : 24; + u32bit hardAL_PA : 8; +#endif +#if LITTLE_ENDIAN_HW + u32bit hardAL_PA : 8; + u32bit pref_DID : 24; +#endif + uint32 rsvd3[21]; /* Must be all one's */ +} WRITE_NV_VAR; + + +/* Structure for MB Command RUN_BIU_DIAG (04) */ +/* Structure for MB Command RUN_BIU_DIAG64 (0x84) */ + +typedef struct { + uint32 rsvd1; + union { + struct { + ULP_BDE xmit_bde; + ULP_BDE rcv_bde; + } s1; + struct { + ULP_BDE64 xmit_bde64; + ULP_BDE64 rcv_bde64; + } s2; + } un; +} BIU_DIAG_VAR; + + +/* Structure for MB Command INIT_LINK (05) */ + +typedef struct { +#if BIG_ENDIAN_HW + u32bit rsvd1 : 24; + u32bit lipsr_AL_PA : 8; /* AL_PA to issue Lip Selective Reset to */ +#endif +#if LITTLE_ENDIAN_HW + u32bit lipsr_AL_PA : 8; /* AL_PA to issue Lip Selective Reset to */ + u32bit rsvd1 : 24; +#endif + +#if BIG_ENDIAN_HW + uchar fabric_AL_PA; /* If using a Fabric Assigned AL_PA */ + uchar rsvd2; + ushort link_flags; +#endif +#if LITTLE_ENDIAN_HW + ushort link_flags; + uchar rsvd2; + uchar fabric_AL_PA; /* If using a Fabric Assigned AL_PA */ +#endif +#define FLAGS_LOCAL_LB 0x01 /* link_flags (=1) ENDEC loopback */ +#define FLAGS_TOPOLOGY_MODE_LOOP_PT 0x00 /* Attempt loop then pt-pt */ +#define FLAGS_TOPOLOGY_MODE_PT_PT 0x02 /* Attempt pt-pt only */ +#define FLAGS_TOPOLOGY_MODE_LOOP 0x04 /* Attempt loop only */ +#define FLAGS_TOPOLOGY_MODE_PT_LOOP 0x06 /* Attempt pt-pt then loop */ +#define FLAGS_LIRP_LILP 0x80 /* LIRP / LILP is disabled */ + +#define FLAGS_TOPOLOGY_FAILOVER 0x0400 /* Bit 10 */ +#define FLAGS_LINK_SPEED 0x0800 /* Bit 11 */ + + uint32 link_speed; +#define LINK_SPEED_AUTO 0 /* Auto selection */ +#define LINK_SPEED_1G 1 /* 1 Gigabaud */ +#define LINK_SPEED_2G 2 /* 2 Gigabaud */ + +} INIT_LINK_VAR; + + +/* Structure for MB Command DOWN_LINK (06) */ + +typedef struct { + uint32 rsvd1; +} DOWN_LINK_VAR; + + +/* Structure for MB Command CONFIG_LINK (07) */ + +typedef struct { +#if BIG_ENDIAN_HW + u32bit cr : 1; + u32bit ci : 1; + u32bit cr_delay : 6; + u32bit cr_count : 8; + u32bit rsvd1 : 8; + u32bit MaxBBC : 8; +#endif +#if LITTLE_ENDIAN_HW + u32bit MaxBBC : 8; + u32bit rsvd1 : 8; + u32bit cr_count : 8; + u32bit cr_delay : 6; + u32bit ci : 1; + u32bit cr : 1; +#endif + uint32 myId; + uint32 rsvd2; + uint32 edtov; + uint32 arbtov; + uint32 ratov; + uint32 rttov; + uint32 altov; + uint32 crtov; + uint32 citov; +#if BIG_ENDIAN_HW + u32bit rrq_enable : 1; + u32bit rrq_immed : 1; + u32bit rsvd4 : 29; + u32bit ack0_enable : 1; +#endif +#if LITTLE_ENDIAN_HW + u32bit ack0_enable : 1; + u32bit rsvd4 : 29; + u32bit rrq_immed : 1; + u32bit rrq_enable : 1; +#endif +} CONFIG_LINK; + + +/* Structure for MB Command PART_SLIM (08) */ + +typedef struct { +#if BIG_ENDIAN_HW + u32bit unused1 : 24; + u32bit numRing : 8; +#endif +#if LITTLE_ENDIAN_HW + u32bit numRing : 8; + u32bit unused1 : 24; +#endif + RING_DEF ringdef[4]; + u32bit hbainit; +} PART_SLIM_VAR; + + +/* Structure for MB Command CONFIG_RING (09) */ + +typedef struct { +#if BIG_ENDIAN_HW + u32bit unused2 : 6; + u32bit recvSeq : 1; + u32bit recvNotify: 1; + u32bit numMask : 8; + u32bit profile : 8; + u32bit unused1 : 4; + u32bit ring : 4; +#endif +#if LITTLE_ENDIAN_HW + u32bit ring : 4; + u32bit unused1 : 4; + u32bit profile : 8; + u32bit numMask : 8; + u32bit recvNotify: 1; + u32bit recvSeq : 1; + u32bit unused2 : 6; +#endif +#if BIG_ENDIAN_HW + ushort maxRespXchg; + ushort maxOrigXchg; +#endif +#if LITTLE_ENDIAN_HW + ushort maxOrigXchg; + ushort maxRespXchg; +#endif + RR_REG rrRegs[6]; +} CONFIG_RING_VAR; + + +/* Structure for MB Command RESET_RING (10) */ + +typedef struct { + uint32 ring_no; +} RESET_RING_VAR; + + +/* Structure for MB Command READ_CONFIG (11) */ + +typedef struct { +#if BIG_ENDIAN_HW + u32bit cr : 1; + u32bit ci : 1; + u32bit cr_delay : 6; + u32bit cr_count : 8; + u32bit InitBBC : 8; + u32bit MaxBBC : 8; +#endif +#if LITTLE_ENDIAN_HW + u32bit MaxBBC : 8; + u32bit InitBBC : 8; + u32bit cr_count : 8; + u32bit cr_delay : 6; + u32bit ci : 1; + u32bit cr : 1; +#endif +#if BIG_ENDIAN_HW + u32bit topology : 8; + u32bit myDid : 24; +#endif +#if LITTLE_ENDIAN_HW + u32bit myDid : 24; + u32bit topology : 8; +#endif + /* Defines for topology (defined previously) */ +#if BIG_ENDIAN_HW + u32bit AR : 1; + u32bit IR : 1; + u32bit rsvd1 : 29; + u32bit ack0 : 1; +#endif +#if LITTLE_ENDIAN_HW + u32bit ack0 : 1; + u32bit rsvd1 : 29; + u32bit IR : 1; + u32bit AR : 1; +#endif + uint32 edtov; + uint32 arbtov; + uint32 ratov; + uint32 rttov; + uint32 altov; + uint32 lmt; +#define LMT_RESERVED 0x0 /* Not used */ +#define LMT_266_10bit 0x1 /* 265.625 Mbaud 10 bit iface */ +#define LMT_532_10bit 0x2 /* 531.25 Mbaud 10 bit iface */ +#define LMT_1063_10bit 0x3 /* 1062.5 Mbaud 20 bit iface */ +#define LMT_2125_10bit 0x8 /* 2125 Mbaud 10 bit iface */ + + uint32 rsvd2; + uint32 rsvd3; + uint32 max_xri; + uint32 max_iocb; + uint32 max_rpi; + uint32 avail_xri; + uint32 avail_iocb; + uint32 avail_rpi; + uint32 default_rpi; +} READ_CONFIG_VAR; + + +/* Structure for MB Command READ_RCONFIG (12) */ + +typedef struct { +#if BIG_ENDIAN_HW + u32bit rsvd2 : 7; + u32bit recvNotify : 1; + u32bit numMask : 8; + u32bit profile : 8; + u32bit rsvd1 : 4; + u32bit ring : 4; +#endif +#if LITTLE_ENDIAN_HW + u32bit ring : 4; + u32bit rsvd1 : 4; + u32bit profile : 8; + u32bit numMask : 8; + u32bit recvNotify : 1; + u32bit rsvd2 : 7; +#endif +#if BIG_ENDIAN_HW + ushort maxResp; + ushort maxOrig; +#endif +#if LITTLE_ENDIAN_HW + ushort maxOrig; + ushort maxResp; +#endif + RR_REG rrRegs[6]; +#if BIG_ENDIAN_HW + ushort cmdRingOffset; + ushort cmdEntryCnt; + ushort rspRingOffset; + ushort rspEntryCnt; + ushort nextCmdOffset; + ushort rsvd3; + ushort nextRspOffset; + ushort rsvd4; +#endif +#if LITTLE_ENDIAN_HW + ushort cmdEntryCnt; + ushort cmdRingOffset; + ushort rspEntryCnt; + ushort rspRingOffset; + ushort rsvd3; + ushort nextCmdOffset; + ushort rsvd4; + ushort nextRspOffset; +#endif +} READ_RCONF_VAR; + + +/* Structure for MB Command READ_SPARM (13) */ +/* Structure for MB Command READ_SPARM64 (0x8D) */ + +typedef struct { + uint32 rsvd1; + uint32 rsvd2; + union { + ULP_BDE sp; /* This BDE points to SERV_PARM structure */ + ULP_BDE64 sp64; + } un; +} READ_SPARM_VAR; + + +/* Structure for MB Command READ_STATUS (14) */ + +typedef struct { +#if BIG_ENDIAN_HW + u32bit rsvd1 : 31; + u32bit clrCounters : 1; + ushort activeXriCnt; + ushort activeRpiCnt; +#endif +#if LITTLE_ENDIAN_HW + u32bit clrCounters : 1; + u32bit rsvd1 : 31; + ushort activeRpiCnt; + ushort activeXriCnt; +#endif + uint32 xmitByteCnt; + uint32 rcvbyteCnt; + uint32 xmitFrameCnt; + uint32 rcvFrameCnt; + uint32 xmitSeqCnt; + uint32 rcvSeqCnt; + uint32 totalOrigExchanges; + uint32 totalRespExchanges; + uint32 rcvPbsyCnt; + uint32 rcvFbsyCnt; +} READ_STATUS_VAR; + + +/* Structure for MB Command READ_RPI (15) */ +/* Structure for MB Command READ_RPI64 (0x8F) */ + +typedef struct { +#if BIG_ENDIAN_HW + ushort nextRpi; + ushort reqRpi; + u32bit rsvd2 : 8; + u32bit DID : 24; +#endif +#if LITTLE_ENDIAN_HW + ushort reqRpi; + ushort nextRpi; + u32bit DID : 24; + u32bit rsvd2 : 8; +#endif + union { + ULP_BDE sp; + ULP_BDE64 sp64; + } un; + +} READ_RPI_VAR; + + +/* Structure for MB Command READ_XRI (16) */ + +typedef struct { +#if BIG_ENDIAN_HW + ushort nextXri; + ushort reqXri; + ushort rsvd1; + ushort rpi; + u32bit rsvd2 : 8; + u32bit DID : 24; + u32bit rsvd3 : 8; + u32bit SID : 24; + uint32 rsvd4; + uchar seqId; + uchar rsvd5; + ushort seqCount; + ushort oxId; + ushort rxId; + u32bit rsvd6 : 30; + u32bit si : 1; + u32bit exchOrig : 1; +#endif +#if LITTLE_ENDIAN_HW + ushort reqXri; + ushort nextXri; + ushort rpi; + ushort rsvd1; + u32bit DID : 24; + u32bit rsvd2 : 8; + u32bit SID : 24; + u32bit rsvd3 : 8; + uint32 rsvd4; + ushort seqCount; + uchar rsvd5; + uchar seqId; + ushort rxId; + ushort oxId; + u32bit exchOrig : 1; + u32bit si : 1; + u32bit rsvd6 : 30; +#endif +} READ_XRI_VAR; + + +/* Structure for MB Command READ_REV (17) */ + +typedef struct { +#if BIG_ENDIAN_HW + u32bit cv : 1; + u32bit rr : 1; + u32bit rsvd1 : 29; + u32bit rv : 1; +#endif +#if LITTLE_ENDIAN_HW + u32bit rv : 1; + u32bit rsvd1 : 29; + u32bit rr : 1; + u32bit cv : 1; +#endif + uint32 biuRev; + uint32 smRev; + union { + uint32 smFwRev; + struct { +#if BIG_ENDIAN_HW + uchar ProgType; + uchar ProgId; + u16bit ProgVer : 4; + u16bit ProgRev : 4; + u16bit ProgFixLvl : 2; + u16bit ProgDistType : 2; + u16bit DistCnt : 4; +#endif +#if LITTLE_ENDIAN_HW + u16bit DistCnt : 4; + u16bit ProgDistType : 2; + u16bit ProgFixLvl : 2; + u16bit ProgRev : 4; + u16bit ProgVer : 4; + uchar ProgId; + uchar ProgType; +#endif + } b; + } un; + uint32 endecRev; +#if BIG_ENDIAN_HW + uchar feaLevelHigh; + uchar feaLevelLow; + uchar fcphHigh; + uchar fcphLow; +#endif +#if LITTLE_ENDIAN_HW + uchar fcphLow; + uchar fcphHigh; + uchar feaLevelLow; + uchar feaLevelHigh; +#endif + uint32 postKernRev; + uint32 opFwRev; + uchar opFwName[16]; + uint32 sli1FwRev; + uchar sli1FwName[16]; + uint32 sli2FwRev; + uchar sli2FwName[16]; + uint32 rsvd2; + uint32 RandomData[7]; +} READ_REV_VAR; + +#define rxSeqRev postKernRev +#define txSeqRev opFwRev + +/* Structure for MB Command READ_LINK_STAT (18) */ + +typedef struct { + uint32 rsvd1; + uint32 linkFailureCnt; + uint32 lossSyncCnt; + + uint32 lossSignalCnt; + uint32 primSeqErrCnt; + uint32 invalidXmitWord; + uint32 crcCnt; + uint32 primSeqTimeout; + uint32 elasticOverrun; + uint32 arbTimeout; +} READ_LNK_VAR; + + +/* Structure for MB Command REG_LOGIN (19) */ +/* Structure for MB Command REG_LOGIN64 (0x93) */ + +typedef struct { +#if BIG_ENDIAN_HW + ushort rsvd1; + ushort rpi; + u32bit rsvd2 : 8; + u32bit did : 24; +#endif +#if LITTLE_ENDIAN_HW + ushort rpi; + ushort rsvd1; + u32bit did : 24; + u32bit rsvd2 : 8; +#endif + union { + ULP_BDE sp; + ULP_BDE64 sp64; + } un; + +} REG_LOGIN_VAR; + +/* Word 30 contents for REG_LOGIN */ +typedef union { + struct { +#if BIG_ENDIAN_HW + u16bit rsvd1 : 12; + u16bit class : 4; + ushort xri; +#endif +#if LITTLE_ENDIAN_HW + ushort xri; + u16bit class : 4; + u16bit rsvd1 : 12; +#endif + } f; + uint32 word; +} REG_WD30; + + +/* Structure for MB Command UNREG_LOGIN (20) */ + +typedef struct { +#if BIG_ENDIAN_HW + ushort rsvd1; + ushort rpi; +#endif +#if LITTLE_ENDIAN_HW + ushort rpi; + ushort rsvd1; +#endif +} UNREG_LOGIN_VAR; + + +/* Structure for MB Command UNREG_D_ID (0x23) */ + +typedef struct { + uint32 did; +} UNREG_D_ID_VAR; + + +/* Structure for MB Command READ_LA (21) */ +/* Structure for MB Command READ_LA64 (0x95) */ + +typedef struct { + uint32 eventTag; /* Event tag */ +#if BIG_ENDIAN_HW + u32bit rsvd1 : 22; + u32bit pb : 1; + u32bit il : 1; + u32bit attType : 8; +#endif +#if LITTLE_ENDIAN_HW + u32bit attType : 8; + u32bit il : 1; + u32bit pb : 1; + u32bit rsvd1 : 22; +#endif +#define AT_RESERVED 0x00 /* Reserved - attType */ +#define AT_LINK_UP 0x01 /* Link is up */ +#define AT_LINK_DOWN 0x02 /* Link is down */ +#if BIG_ENDIAN_HW + uchar granted_AL_PA; + uchar lipAlPs; + uchar lipType; + uchar topology; +#endif +#if LITTLE_ENDIAN_HW + uchar topology; + uchar lipType; + uchar lipAlPs; + uchar granted_AL_PA; +#endif +#define LT_PORT_INIT 0x00 /* An L_PORT initing (F7, AL_PS) - lipType */ +#define LT_PORT_ERR 0x01 /* Err @L_PORT rcv'er (F8, AL_PS) */ +#define LT_RESET_APORT 0x02 /* Lip Reset of some other port */ +#define LT_RESET_MYPORT 0x03 /* Lip Reset of my port */ +#define TOPOLOGY_PT_PT 0x01 /* Topology is pt-pt / pt-fabric */ +#define TOPOLOGY_LOOP 0x02 /* Topology is FC-AL */ + + union { + ULP_BDE lilpBde; /* This BDE points to a 128 byte buffer to */ + /* store the LILP AL_PA position map into */ + ULP_BDE64 lilpBde64; + } un; +#if BIG_ENDIAN_HW + u32bit Dlu : 1; + u32bit Dtf : 1; + u32bit Drsvd2 : 14; + u32bit DlnkSpeed : 8; + u32bit DnlPort : 4; + u32bit Dtx : 2; + u32bit Drx : 2; +#endif +#if LITTLE_ENDIAN_HW + u32bit Drx : 2; + u32bit Dtx : 2; + u32bit DnlPort : 4; + u32bit DlnkSpeed : 8; + u32bit Drsvd2 : 14; + u32bit Dtf : 1; + u32bit Dlu : 1; +#endif +#if BIG_ENDIAN_HW + u32bit Ulu : 1; + u32bit Utf : 1; + u32bit Ursvd2 : 14; + u32bit UlnkSpeed : 8; + u32bit UnlPort : 4; + u32bit Utx : 2; + u32bit Urx : 2; +#endif +#if LITTLE_ENDIAN_HW + u32bit Urx : 2; + u32bit Utx : 2; + u32bit UnlPort : 4; + u32bit UlnkSpeed : 8; + u32bit Ursvd2 : 14; + u32bit Utf : 1; + u32bit Ulu : 1; +#endif +#define LA_1GHZ_LINK 4 /* lnkSpeed */ +#define LA_2GHZ_LINK 8 /* lnkSpeed */ + +} READ_LA_VAR; + + +/* Structure for MB Command CLEAR_LA (22) */ + +typedef struct { + uint32 eventTag; /* Event tag */ + uint32 rsvd1; +} CLEAR_LA_VAR; + +/* Structure for MB Command DUMP */ + +typedef struct { +#if BIG_ENDIAN_HW + u32bit rsvd : 25 ; + u32bit ra : 1 ; + u32bit co : 1 ; + u32bit cv : 1 ; + u32bit type : 4 ; + u32bit entry_index : 16 ; + u32bit region_id : 16 ; +#endif +#if LITTLE_ENDIAN_HW + u32bit type : 4 ; + u32bit cv : 1 ; + u32bit co : 1 ; + u32bit ra : 1 ; + u32bit rsvd : 25 ; + u32bit region_id : 16 ; + u32bit entry_index : 16 ; +#endif + uint32 rsvd1; + uint32 word_cnt ; + uint32 resp_offset ; +} DUMP_VAR ; + +#define DMP_MEM_REG 0x1 +#define DMP_NV_PARAMS 0x2 + +#define DMP_REGION_VPD 0xe +#define DMP_VPD_SIZE 0x100 + +/* Structure for MB Command CONFIG_PORT (0x88) */ + +typedef struct { + uint32 pcbLen; + uint32 pcbLow; /* bit 31:0 of memory based port config block */ + uint32 pcbHigh; /* bit 63:32 of memory based port config block */ + uint32 hbainit[5]; +} CONFIG_PORT_VAR; + + +/* SLI-2 Port Control Block */ + +/* SLIM POINTER */ +#define SLIMOFF 0x30 /* WORD */ + +typedef struct _SLI2_RDSC { + uint32 cmdEntries; + uint32 cmdAddrLow; + uint32 cmdAddrHigh; + + uint32 rspEntries; + uint32 rspAddrLow; + uint32 rspAddrHigh; +} SLI2_RDSC; + +typedef struct _PCB { +#if BIG_ENDIAN_HW + u32bit type : 8; +#define TYPE_NATIVE_SLI2 0x01; + u32bit feature : 8; +#define FEATURE_INITIAL_SLI2 0x01; + u32bit rsvd : 12; + u32bit maxRing : 4; +#endif +#if LITTLE_ENDIAN_HW + u32bit maxRing : 4; + u32bit rsvd : 12; + u32bit feature : 8; +#define FEATURE_INITIAL_SLI2 0x01; + u32bit type : 8; +#define TYPE_NATIVE_SLI2 0x01; +#endif + + uint32 mailBoxSize; + uint32 mbAddrLow; + uint32 mbAddrHigh; + + uint32 hgpAddrLow; + uint32 hgpAddrHigh; + + uint32 pgpAddrLow; + uint32 pgpAddrHigh; + SLI2_RDSC rdsc[ MAX_RINGS]; +} PCB; + +typedef struct { +#if BIG_ENDIAN_HW + u32bit rsvd0 : 27; + u32bit discardFarp : 1; + u32bit IPEnable : 1; + u32bit nodeName : 1; + u32bit portName : 1; + u32bit filterEnable : 1; +#endif +#if LITTLE_ENDIAN_HW + u32bit filterEnable : 1; + u32bit portName : 1; + u32bit nodeName : 1; + u32bit IPEnable : 1; + u32bit discardFarp : 1; + u32bit rsvd : 27; +#endif + NAME_TYPE portname; + NAME_TYPE nodename; + uint32 rsvd1; + uint32 rsvd2; + uint32 rsvd3; + uint32 IPAddress; +} CONFIG_FARP_VAR; + + +/* Union of all Mailbox Command types */ + +typedef union { + uint32 varWords[31]; + LOAD_SM_VAR varLdSM; /* cmd = 1 (LOAD_SM) */ + READ_NV_VAR varRDnvp; /* cmd = 2 (READ_NVPARMS) */ + WRITE_NV_VAR varWTnvp; /* cmd = 3 (WRITE_NVPARMS) */ + BIU_DIAG_VAR varBIUdiag; /* cmd = 4 (RUN_BIU_DIAG) */ + INIT_LINK_VAR varInitLnk; /* cmd = 5 (INIT_LINK) */ + DOWN_LINK_VAR varDwnLnk; /* cmd = 6 (DOWN_LINK) */ + CONFIG_LINK varCfgLnk; /* cmd = 7 (CONFIG_LINK) */ + PART_SLIM_VAR varSlim; /* cmd = 8 (PART_SLIM) */ + CONFIG_RING_VAR varCfgRing; /* cmd = 9 (CONFIG_RING) */ + RESET_RING_VAR varRstRing; /* cmd = 10 (RESET_RING) */ + READ_CONFIG_VAR varRdConfig; /* cmd = 11 (READ_CONFIG) */ + READ_RCONF_VAR varRdRConfig; /* cmd = 12 (READ_RCONFIG) */ + READ_SPARM_VAR varRdSparm; /* cmd = 13 (READ_SPARM(64)) */ + READ_STATUS_VAR varRdStatus; /* cmd = 14 (READ_STATUS) */ + READ_RPI_VAR varRdRPI; /* cmd = 15 (READ_RPI(64)) */ + READ_XRI_VAR varRdXRI; /* cmd = 16 (READ_XRI) */ + READ_REV_VAR varRdRev; /* cmd = 17 (READ_REV) */ + READ_LNK_VAR varRdLnk; /* cmd = 18 (READ_LNK_STAT) */ + REG_LOGIN_VAR varRegLogin; /* cmd = 19 (REG_LOGIN(64)) */ + UNREG_LOGIN_VAR varUnregLogin; /* cmd = 20 (UNREG_LOGIN) */ + READ_LA_VAR varReadLA; /* cmd = 21 (READ_LA(64)) */ + CLEAR_LA_VAR varClearLA; /* cmd = 22 (CLEAR_LA) */ + DUMP_VAR varDmp ; /* Warm Start DUMP mbx cmd */ + UNREG_D_ID_VAR varUnregDID; /* cmd = 0x23 (UNREG_D_ID) */ + CONFIG_PORT_VAR varCfgPort; /* cmd = 0x88 (CONFIG_PORT) */ + CONFIG_FARP_VAR varCfgFarp; /* cmd = 0x25 (CONFIG_FARP) */ +} MAILVARIANTS; + +#define MAILBOX_CMD_WSIZE 32 + +/* + * SLI-2 specific structures + */ + +typedef struct _SLI1_DESC { + RINGS mbxCring[ 4]; + uint32 mbxUnused[ 24]; +} SLI1_DESC; + +typedef struct { + uint32 cmdPutInx; + uint32 rspGetInx; +} HGP; + +typedef struct { + uint32 cmdGetInx; + uint32 rspPutInx; +} PGP; + +typedef struct _SLI2_DESC { + HGP host[ MAX_RINGS]; + uint32 unused[ 16]; + PGP port[ MAX_RINGS]; +} SLI2_DESC; + +typedef union { + SLI1_DESC s1; + SLI2_DESC s2; +} SLI_VAR; + +typedef volatile struct { +#if BIG_ENDIAN_HW + ushort mbxStatus; + uchar mbxCommand; + u8bit mbxReserved : 6; + u8bit mbxHc : 1; + u8bit mbxOwner : 1; /* Low order bit first word */ +#endif +#if LITTLE_ENDIAN_HW + u8bit mbxOwner : 1; /* Low order bit first word */ + u8bit mbxHc : 1; + u8bit mbxReserved : 6; + uchar mbxCommand; + ushort mbxStatus; +#endif + MAILVARIANTS un; + SLI_VAR us; +} MAILBOX, *PMAILBOX; + +/* + * End Structure Definitions for Mailbox Commands + */ + + +/* + * Begin Structure Definitions for IOCB Commands + */ + +typedef struct { +#if BIG_ENDIAN_HW + uchar statAction; + uchar statRsn; + uchar statBaExp; + uchar statLocalError; +#endif +#if LITTLE_ENDIAN_HW + uchar statLocalError; + uchar statBaExp; + uchar statRsn; + uchar statAction; +#endif + /* statAction FBSY reason codes */ +#define FBSY_RSN_MASK 0xF0 /* Rsn stored in upper nibble */ +#define FBSY_FABRIC_BSY 0x10 /* F_bsy due to Fabric BSY */ +#define FBSY_NPORT_BSY 0x30 /* F_bsy due to N_port BSY */ + + /* statAction PBSY action codes */ +#define PBSY_ACTION1 0x01 /* Sequence terminated - retry */ +#define PBSY_ACTION2 0x02 /* Sequence active - retry */ + + /* statAction P/FRJT action codes */ +#define RJT_RETRYABLE 0x01 /* Retryable class of error */ +#define RJT_NO_RETRY 0x02 /* Non-Retryable class of error */ + + /* statRsn LS_RJT reason codes defined in LS_RJT structure */ + + /* statRsn P_BSY reason codes */ +#define PBSY_NPORT_BSY 0x01 /* Physical N_port BSY */ +#define PBSY_RESRCE_BSY 0x03 /* N_port resource BSY */ +#define PBSY_VU_BSY 0xFF /* See VU field for rsn */ + + /* statRsn P/F_RJT reason codes */ +#define RJT_BAD_D_ID 0x01 /* Invalid D_ID field */ +#define RJT_BAD_S_ID 0x02 /* Invalid S_ID field */ +#define RJT_UNAVAIL_TEMP 0x03 /* N_Port unavailable temp. */ +#define RJT_UNAVAIL_PERM 0x04 /* N_Port unavailable perm. */ +#define RJT_UNSUP_CLASS 0x05 /* Class not supported */ +#define RJT_DELIM_ERR 0x06 /* Delimiter usage error */ +#define RJT_UNSUP_TYPE 0x07 /* Type not supported */ +#define RJT_BAD_CONTROL 0x08 /* Invalid link conrtol */ +#define RJT_BAD_RCTL 0x09 /* R_CTL invalid */ +#define RJT_BAD_FCTL 0x0A /* F_CTL invalid */ +#define RJT_BAD_OXID 0x0B /* OX_ID invalid */ +#define RJT_BAD_RXID 0x0C /* RX_ID invalid */ +#define RJT_BAD_SEQID 0x0D /* SEQ_ID invalid */ +#define RJT_BAD_DFCTL 0x0E /* DF_CTL invalid */ +#define RJT_BAD_SEQCNT 0x0F /* SEQ_CNT invalid */ +#define RJT_BAD_PARM 0x10 /* Param. field invalid */ +#define RJT_XCHG_ERR 0x11 /* Exchange error */ +#define RJT_PROT_ERR 0x12 /* Protocol error */ +#define RJT_BAD_LENGTH 0x13 /* Invalid Length */ +#define RJT_UNEXPECTED_ACK 0x14 /* Unexpected ACK */ +#define RJT_LOGIN_REQUIRED 0x16 /* Login required */ +#define RJT_TOO_MANY_SEQ 0x17 /* Excessive sequences */ +#define RJT_XCHG_NOT_STRT 0x18 /* Exchange not started */ +#define RJT_UNSUP_SEC_HDR 0x19 /* Security hdr not supported */ +#define RJT_UNAVAIL_PATH 0x1A /* Fabric Path not available */ +#define RJT_VENDOR_UNIQUE 0xFF /* Vendor unique error */ + + /* statRsn BA_RJT reason codes */ +#define BARJT_BAD_CMD_CODE 0x01 /* Invalid command code */ +#define BARJT_LOGICAL_ERR 0x03 /* Logical error */ +#define BARJT_LOGICAL_BSY 0x05 /* Logical busy */ +#define BARJT_PROTOCOL_ERR 0x07 /* Protocol error */ +#define BARJT_VU_ERR 0xFF /* Vendor unique error */ + + /* LS_RJT reason explanation defined in LS_RJT structure */ + + /* BA_RJT reason explanation */ +#define BARJT_EXP_INVALID_ID 0x01 /* Invalid OX_ID/RX_ID */ +#define BARJT_EXP_ABORT_SEQ 0x05 /* Abort SEQ, no more info */ + + /* Localy detected errors */ +#define IOERR_SUCCESS 0x00 /* statLocalError */ +#define IOERR_MISSING_CONTINUE 0x01 +#define IOERR_SEQUENCE_TIMEOUT 0x02 +#define IOERR_INTERNAL_ERROR 0x03 +#define IOERR_INVALID_RPI 0x04 +#define IOERR_NO_XRI 0x05 +#define IOERR_ILLEGAL_COMMAND 0x06 +#define IOERR_XCHG_DROPPED 0x07 +#define IOERR_ILLEGAL_FIELD 0x08 +#define IOERR_BAD_CONTINUE 0x09 +#define IOERR_TOO_MANY_BUFFERS 0x0A +#define IOERR_RCV_BUFFER_WAITING 0x0B +#define IOERR_NO_CONNECTION 0x0C +#define IOERR_TX_DMA_FAILED 0x0D +#define IOERR_RX_DMA_FAILED 0x0E +#define IOERR_ILLEGAL_FRAME 0x0F +#define IOERR_EXTRA_DATA 0x10 +#define IOERR_NO_RESOURCES 0x11 +#define IOERR_RESERVED 0x12 +#define IOERR_ILLEGAL_LENGTH 0x13 +#define IOERR_UNSUPPORTED_FEATURE 0x14 +#define IOERR_ABORT_IN_PROGRESS 0x15 +#define IOERR_ABORT_REQUESTED 0x16 +#define IOERR_RECEIVE_BUFFER_TIMEOUT 0x17 +#define IOERR_LOOP_OPEN_FAILURE 0x18 +#define IOERR_RING_RESET 0x19 +#define IOERR_LINK_DOWN 0x1A +#define IOERR_CORRUPTED_DATA 0x1B +#define IOERR_CORRUPTED_RPI 0x1C +#define IOERR_OUT_OF_ORDER_DATA 0x1D +#define IOERR_OUT_OF_ORDER_ACK 0x1E +#define IOERR_DUP_FRAME 0x1F +#define IOERR_LINK_CONTROL_FRAME 0x20 /* ACK_N received */ +#define IOERR_BAD_HOST_ADDRESS 0x21 +#define IOERR_RCV_HDRBUF_WAITING 0x22 +#define IOERR_MISSING_HDR_BUFFER 0x23 +#define IOERR_MSEQ_CHAIN_CORRUPTED 0x24 +#define IOERR_ABORTMULT_REQUESTED 0x25 +#define IOERR_BUFFER_SHORTAGE 0x28 +} PARM_ERR; + +typedef union { + struct { +#if BIG_ENDIAN_HW + uchar Rctl; /* R_CTL field */ + uchar Type; /* TYPE field */ + uchar Dfctl; /* DF_CTL field */ + uchar Fctl; /* Bits 0-7 of IOCB word 5 */ +#endif +#if LITTLE_ENDIAN_HW + uchar Fctl; /* Bits 0-7 of IOCB word 5 */ + uchar Dfctl; /* DF_CTL field */ + uchar Type; /* TYPE field */ + uchar Rctl; /* R_CTL field */ +#endif + +#define BC 0x02 /* Broadcast Received - Fctl */ +#define SI 0x04 /* Sequence Initiative */ +#define LA 0x08 /* Ignore Link Attention state */ +#define LS 0x80 /* Last Sequence */ + } hcsw; + uint32 reserved; +} WORD5; + + +/* IOCB Command template for a generic response */ +typedef struct { + uint32 reserved[4]; + PARM_ERR perr; +} GENERIC_RSP; + + +/* IOCB Command template for XMIT / XMIT_BCAST / RCV_SEQUENCE / XMIT_ELS */ +typedef struct { + ULP_BDE xrsqbde[2]; + uint32 xrsqRo; /* Starting Relative Offset */ + WORD5 w5; /* Header control/status word */ +} XR_SEQ_FIELDS; + +/* IOCB Command template for ELS_REQUEST */ +typedef struct { + ULP_BDE elsReq; + ULP_BDE elsRsp; +#if BIG_ENDIAN_HW + u32bit word4Rsvd : 7; + u32bit fl : 1; + u32bit myID : 24; + u32bit word5Rsvd : 8; + u32bit remoteID : 24; +#endif +#if LITTLE_ENDIAN_HW + u32bit myID : 24; + u32bit fl : 1; + u32bit word4Rsvd : 7; + u32bit remoteID : 24; + u32bit word5Rsvd : 8; +#endif +} ELS_REQUEST; + +/* IOCB Command template for RCV_ELS_REQ */ +typedef struct { + ULP_BDE elsReq[2]; + uint32 parmRo; +#if BIG_ENDIAN_HW + u32bit word5Rsvd : 8; + u32bit remoteID : 24; +#endif +#if LITTLE_ENDIAN_HW + u32bit remoteID : 24; + u32bit word5Rsvd : 8; +#endif +} RCV_ELS_REQ; + +/* IOCB Command template for ABORT / CLOSE_XRI */ +typedef struct { + uint32 rsvd[3]; + uint32 abortType; +#define ABORT_TYPE_ABTX 0x00000000 +#define ABORT_TYPE_ABTS 0x00000001 + uint32 parm; +#if BIG_ENDIAN_HW + ushort abortContextTag; /* ulpContext from command to abort/close */ + ushort abortIoTag; /* ulpIoTag from command to abort/close */ +#endif +#if LITTLE_ENDIAN_HW + ushort abortIoTag; /* ulpIoTag from command to abort/close */ + ushort abortContextTag; /* ulpContext from command to abort/close */ +#endif +} AC_XRI; + +/* IOCB Command template for GET_RPI */ +typedef struct { + uint32 rsvd[4]; + uint32 parmRo; +#if BIG_ENDIAN_HW + u32bit word5Rsvd : 8; + u32bit remoteID : 24; +#endif +#if LITTLE_ENDIAN_HW + u32bit remoteID : 24; + u32bit word5Rsvd : 8; +#endif +} GET_RPI; + +/* IOCB Command template for all FCPI commands */ +typedef struct { + ULP_BDE fcpi_cmnd; /* FCP_CMND payload descriptor */ + ULP_BDE fcpi_rsp; /* Rcv buffer */ + uint32 fcpi_parm; + uint32 fcpi_XRdy; /* transfer ready for IWRITE */ +} FCPI_FIELDS; + +/* IOCB Command template for all FCPT commands */ +typedef struct { + ULP_BDE fcpt_Buffer[2]; /* FCP_CMND payload descriptor */ + uint32 fcpt_Offset; + uint32 fcpt_Length; /* transfer ready for IWRITE */ +} FCPT_FIELDS; + +/* SLI-2 IOCB structure definitions */ + +/* IOCB Command template for 64 bit XMIT / XMIT_BCAST / XMIT_ELS */ +typedef struct { + ULP_BDL bdl; + uint32 xrsqRo; /* Starting Relative Offset */ + WORD5 w5; /* Header control/status word */ +} XMT_SEQ_FIELDS64; + +/* IOCB Command template for 64 bit RCV_SEQUENCE64 */ +typedef struct { + ULP_BDE64 rcvBde; + uint32 rsvd1; + uint32 xrsqRo; /* Starting Relative Offset */ + WORD5 w5; /* Header control/status word */ +} RCV_SEQ_FIELDS64; + +/* IOCB Command template for ELS_REQUEST64 */ +typedef struct { + ULP_BDL bdl; +#if BIG_ENDIAN_HW + u32bit word4Rsvd : 7; + u32bit fl : 1; + u32bit myID : 24; + u32bit word5Rsvd : 8; + u32bit remoteID : 24; +#endif +#if LITTLE_ENDIAN_HW + u32bit myID : 24; + u32bit fl : 1; + u32bit word4Rsvd : 7; + u32bit remoteID : 24; + u32bit word5Rsvd : 8; +#endif +} ELS_REQUEST64; + +/* IOCB Command template for GEN_REQUEST64 */ +typedef struct { + ULP_BDL bdl; + uint32 xrsqRo; /* Starting Relative Offset */ + WORD5 w5; /* Header control/status word */ +} GEN_REQUEST64; + +/* IOCB Command template for RCV_ELS_REQ64 */ +typedef struct { + ULP_BDE64 elsReq; + uint32 rcvd1; + uint32 parmRo; +#if BIG_ENDIAN_HW + u32bit word5Rsvd : 8; + u32bit remoteID : 24; +#endif +#if LITTLE_ENDIAN_HW + u32bit remoteID : 24; + u32bit word5Rsvd : 8; +#endif +} RCV_ELS_REQ64; + +/* IOCB Command template for all 64 bit FCPI commands */ +typedef struct { + ULP_BDL bdl; + uint32 fcpi_parm; + uint32 fcpi_XRdy; /* transfer ready for IWRITE */ +} FCPI_FIELDS64; + +/* IOCB Command template for all 64 bit FCPT commands */ +typedef struct { + ULP_BDL bdl; + uint32 fcpt_Offset; + uint32 fcpt_Length; /* transfer ready for IWRITE */ +} FCPT_FIELDS64; + +typedef volatile struct _IOCB { /* IOCB structure */ + union { + GENERIC_RSP grsp; /* Generic response */ + XR_SEQ_FIELDS xrseq; /* XMIT / BCAST / RCV_SEQUENCE cmd */ + ULP_BDE cont[3]; /* up to 3 continuation bdes */ + ELS_REQUEST elsreq; /* ELS_REQUEST template */ + RCV_ELS_REQ rcvels; /* RCV_ELS_REQ template */ + AC_XRI acxri; /* ABORT / CLOSE_XRI template */ + GET_RPI getrpi; /* GET_RPI template */ + FCPI_FIELDS fcpi; /* FCPI template */ + FCPT_FIELDS fcpt; /* FCPT template */ + + /* SLI-2 structures */ + + ULP_BDE64 cont64[ 2]; /* up to 2 64 bit continuation bde_64s */ + ELS_REQUEST64 elsreq64; /* ELS_REQUEST template */ + GEN_REQUEST64 genreq64; /* GEN_REQUEST template */ + RCV_ELS_REQ64 rcvels64; /* RCV_ELS_REQ template */ + XMT_SEQ_FIELDS64 xseq64; /* XMIT / BCAST cmd */ + FCPI_FIELDS64 fcpi64; /* FCPI 64 bit template */ + FCPT_FIELDS64 fcpt64; /* FCPT 64 bit template */ + + uint32 ulpWord[IOCB_WORD_SZ-2]; /* generic 6 'words' */ + } un; + union { + struct { +#if BIG_ENDIAN_HW + ushort ulpContext; /* High order bits word 6 */ + ushort ulpIoTag; /* Low order bits word 6 */ +#endif +#if LITTLE_ENDIAN_HW + ushort ulpIoTag; /* Low order bits word 6 */ + ushort ulpContext; /* High order bits word 6 */ +#endif + } t1; + struct { +#if BIG_ENDIAN_HW + ushort ulpContext; /* High order bits word 6 */ + u16bit ulpIoTag1 : 2; /* Low order bits word 6 */ + u16bit ulpIoTag0 : 14; /* Low order bits word 6 */ +#endif +#if LITTLE_ENDIAN_HW + u16bit ulpIoTag0 : 14; /* Low order bits word 6 */ + u16bit ulpIoTag1 : 2; /* Low order bits word 6 */ + ushort ulpContext; /* High order bits word 6 */ +#endif + } t2; + } un1; +#define ulpContext un1.t1.ulpContext +#define ulpIoTag un1.t1.ulpIoTag +#define ulpIoTag0 un1.t2.ulpIoTag0 +#define ulpDelayXmit un1.t2.ulpIoTag1 +#define IOCB_DELAYXMIT_MSK 0x3000 +#if BIG_ENDIAN_HW + u32bit ulpRsvdByte : 8; + u32bit ulpXS : 1; + u32bit ulpFCP2Rcvy : 1; + u32bit ulpPU : 2; + u32bit ulpIr : 1; + u32bit ulpClass : 3; + u32bit ulpCommand : 8; + u32bit ulpStatus : 4; + u32bit ulpBdeCount : 2; + u32bit ulpLe : 1; + u32bit ulpOwner : 1; /* Low order bit word 7 */ +#endif +#if LITTLE_ENDIAN_HW + u32bit ulpOwner : 1; /* Low order bit word 7 */ + u32bit ulpLe : 1; + u32bit ulpBdeCount : 2; + u32bit ulpStatus : 4; + u32bit ulpCommand : 8; + u32bit ulpClass : 3; + u32bit ulpIr : 1; + u32bit ulpPU : 2; + u32bit ulpFCP2Rcvy : 1; + u32bit ulpXS : 1; + u32bit ulpRsvdByte : 8; +#endif + +#define ulpTimeout ulpRsvdByte + +#define IOCB_FCP 1 /* IOCB is used for FCP ELS cmds - ulpRsvByte */ +#define IOCB_IP 2 /* IOCB is used for IP ELS cmds */ +#define PARM_UNUSED 0 /* PU field (Word 4) not used */ +#define PARM_REL_OFF 1 /* PU field (Word 4) = R. O. */ +#define PARM_READ_CHECK 2 /* PU field (Word 4) = Data Transfer Length */ +#define CLASS1 0 /* Class 1 */ +#define CLASS2 1 /* Class 2 */ +#define CLASS3 2 /* Class 3 */ +#define CLASS_FCP_INTERMIX 7 /* FCP Data->Cls 1, all else->Cls 2 */ + +#define IOSTAT_SUCCESS 0x0 /* ulpStatus */ +#define IOSTAT_FCP_RSP_ERROR 0x1 +#define IOSTAT_REMOTE_STOP 0x2 +#define IOSTAT_LOCAL_REJECT 0x3 +#define IOSTAT_NPORT_RJT 0x4 +#define IOSTAT_FABRIC_RJT 0x5 +#define IOSTAT_NPORT_BSY 0x6 +#define IOSTAT_FABRIC_BSY 0x7 +#define IOSTAT_INTERMED_RSP 0x8 +#define IOSTAT_LS_RJT 0x9 +#define IOSTAT_BA_RJT 0xA + +} IOCB, *PIOCB; + +typedef struct { + IOCB iocb; /* iocb entry */ + uchar * q; /* ptr to next iocb entry */ + uchar * bp; /* ptr to data buffer structure */ + uchar * info; /* ptr to data information structure */ + uchar * bpl; /* ptr to data BPL structure */ + uchar * ndlp; /* ptr to the ndlp structure */ + uchar retry; /* retry counter for IOCB cmd - if needed */ + uchar rsvd1; + ushort rsvd2; +} IOCBQ; + +typedef struct { + volatile uint32 mb[MAILBOX_CMD_WSIZE]; + uchar * q; + uchar * bp; /* ptr to data buffer structure */ +} MAILBOXQ; + +/* Given a pointer to the start of the ring, and the slot number of + * the desired iocb entry, calc a pointer to that entry. + */ +#define IOCB_ENTRY(ring,slot) ((IOCB *)(((uchar *)((ulong)ring)) + (((uint32)((ulong)slot))<< 5))) + +/* + * End Structure Definitions for IOCB Commands + */ + +typedef struct { + MAILBOX mbx; + IOCB IOCBs[MAX_BIOCB]; +} SLIM; + +typedef struct { + MAILBOX mbx; + PCB pcb; + IOCB IOCBs[MAX_SLI2_IOCB]; +} SLI2_SLIM; + +/* +* FDMI +* HBA MAnagement Operations Command Codes +*/ +#define SLI_MGMT_GRHL 0x100 /* Get registered HBA list */ +#define SLI_MGMT_GHAT 0x101 /* Get HBA attributes */ +#define SLI_MGMT_GRPL 0x102 /* Get registered Port list */ +#define SLI_MGMT_GPAT 0x110 /* Get Port attributes */ +#define SLI_MGMT_RHBA 0x200 /* Register HBA */ +#define SLI_MGMT_RHAT 0x201 /* Register HBA atttributes */ +#define SLI_MGMT_RPRT 0x210 /* Register Port */ +#define SLI_MGMT_RPA 0x211 /* Register Port attributes */ +#define SLI_MGMT_DHBA 0x300 /* De-register HBA */ +#define SLI_MGMT_DPRT 0x310 /* De-register Port */ + +/* + * Management Service Subtypes + */ +#define SLI_CT_FDMI_Subtypes 0x10 + +/* + * HBA Management Service Reject Code + */ +#define REJECT_CODE 0x9 /* Unable to perform command request */ +/* + * HBA Management Service Reject Reason Code + * Please refer to the Reason Codes above + */ + +/* + * HBA Attribute Types + */ +#define NODE_NAME 0x1 +#define MANUFACTURER 0x2 +#define SERIAL_NUMBER 0x3 +#define MODEL 0x4 +#define MODEL_DESCRIPTION 0x5 +#define HARDWARE_VERSION 0x6 +#define DRIVER_VERSION 0x7 +#define OPTION_ROM_VERSION 0x8 +#define FIRMWARE_VERSION 0x9 +#define VENDOR_SPECIFIC 0xa +#define DRIVER_NAME 0xb +#define OS_NAME_VERSION 0xc +#define MAX_CT_PAYLOAD_LEN 0xd + +/* + * Port Attrubute Types + */ +#define SUPPORTED_FC4_TYPES 0x1 +#define SUPPORTED_SPEED 0x2 +#define PORT_SPEED 0x3 +#define MAX_FRAME_SIZE 0x4 +#define OS_DEVICE_NAME 0x5 + +union AttributesDef { + /* Structure is in Big Endian format */ + struct { + u32bit AttrType: 16; + u32bit AttrLen: 16; + } bits; + uint32 word; +}; + +/* + * HBA Attribute Entry (8 - 260 bytes) + */ +typedef struct +{ + union AttributesDef ad; + union { + uint32 VendorSpecific; + uint32 SupportSpeed; + uint32 PortSpeed; + uint32 MaxFrameSize; + uint32 MaxCTPayloadLen; + uchar SupportFC4Types[32]; + uchar OsDeviceName[256]; + uchar Manufacturer[64]; + uchar SerialNumber[64]; + uchar Model[256]; + uchar ModelDescription[256]; + uchar HardwareVersion[256]; + uchar DriverVersion[256]; + uchar OptionROMVersion[256]; + uchar FirmwareVersion[256]; + uchar DriverName[256]; + NAME_TYPE NodeName; + } un; +} ATTRIBUTE_ENTRY, *PATTRIBUTE_ENTRY; + + +/* + * HBA Attribute Block + */ +typedef struct +{ + uint32 EntryCnt; /* Number of HBA attribute entries */ + ATTRIBUTE_ENTRY Entry; /* Variable-length array */ +} ATTRIBUTE_BLOCK, *PATTRIBUTE_BLOCK; + + +/* + * Port Entry + */ +typedef struct +{ + NAME_TYPE PortName; +} PORT_ENTRY, *PPORT_ENTRY; + +/* + * HBA Identifier + */ +typedef struct +{ + NAME_TYPE PortName; +} HBA_IDENTIFIER, *PHBA_IDENTIFIER; + +/* + * Registered Port List Format + */ +typedef struct +{ + uint32 EntryCnt; + PORT_ENTRY pe; /* Variable-length array */ +} REG_PORT_LIST, *PREG_PORT_LIST; + +/* + * Register HBA(RHBA) + */ +typedef struct +{ + HBA_IDENTIFIER hi; + REG_PORT_LIST rpl; /* variable-length array */ +} REG_HBA, *PREG_HBA; + +/* + * Register HBA Attributes (RHAT) + */ +typedef struct +{ + NAME_TYPE HBA_PortName; + ATTRIBUTE_BLOCK ab; +} REG_HBA_ATTRIBUTE, *PREG_HBA_ATTRIBUTE; + +/* + * Register Port Attributes (RPA) + */ +typedef struct +{ + NAME_TYPE HBA_PortName; + NAME_TYPE PortName; + ATTRIBUTE_BLOCK ab; +} REG_PORT_ATTRIBUTE, *PREG_PORT_ATTRIBUTE; + +/* + * Get Registered HBA List (GRHL) Accept Payload Format + */ +typedef struct +{ + uint32 HBA__Entry_Cnt; /* Number of Registered HBA Identifiers */ + NAME_TYPE HBA_PortName; /* Variable-length array */ +} GRHL_ACC_PAYLOAD, *PGRHL_ACC_PAYLOAD; + +/* + * Get Registered Port List (GRPL) Accept Payload Format + */ +typedef struct +{ + uint32 RPL_Entry_Cnt; /* Number of Registered Port Entries */ + PORT_ENTRY Reg_Port_Entry[1]; /* Variable-length array */ +} GRPL_ACC_PAYLOAD, *PGRPL_ACC_PAYLOAD; + +/* + * Get Port Attributes (GPAT) Accept Payload Format + */ + +typedef struct +{ + ATTRIBUTE_BLOCK pab; +} GPAT_ACC_PAYLOAD, *PGPAT_ACC_PAYLOAD; +#endif /* _H_FC_HW */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fc_os.h 999-mjb/drivers/scsi/lpfc/fc_os.h --- 000-virgin/drivers/scsi/lpfc/fc_os.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fc_os.h 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,637 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#ifndef _H_FCOS +#define _H_FCOS + +#ifdef __KERNEL__ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define LinuxVersionCode(v, p, s) (((v)<<16)+((p)<<8)+(s)) +#endif /* __KERNEL__ */ + + +#ifdef LP6000 +#ifdef __KERNEL__ +/* From drivers/scsi */ +#include "hosts.h" + +/* The driver is comditionally compiled to utilize the old scsi error + * handling logic, or the make use of the new scsi logic (use_new_eh_code). + * To use the old error handling logic, delete the line "#define FC_NEW_EH 1". + * To use the new error handling logic, add the line "#define FC_NEW_EH 1". + * + * #define FC_NEW_EH 1 + */ + +/* Turn on new error handling for 2.4 kernel base and on */ +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,43) +#define FC_NEW_EH 1 +#endif + +#endif /* __KERNEL__ */ + +#ifndef __KERNEL__ +struct net_device_stats +{ + unsigned long rx_packets; /* total packets received */ + unsigned long tx_packets; /* total packets transmitted */ + unsigned long rx_bytes; /* total bytes received */ + unsigned long tx_bytes; /* total bytes transmitted */ + unsigned long rx_errors; /* bad packets received */ + unsigned long tx_errors; /* packet transmit problems */ + unsigned long rx_dropped; /* no space in linux buffers */ + unsigned long tx_dropped; /* no space available in linux */ + unsigned long multicast; /* multicast packets received */ + unsigned long collisions; + + /* detailed rx_errors: */ + unsigned long rx_length_errors; + unsigned long rx_over_errors; /* receiver ring buff overflow */ + unsigned long rx_crc_errors; /* recved pkt with crc error */ + unsigned long rx_frame_errors; /* recv'd frame alignment error */ + unsigned long rx_fifo_errors; /* recv'r fifo overrun */ + unsigned long rx_missed_errors; /* receiver missed packet */ + + /* detailed tx_errors */ + unsigned long tx_aborted_errors; + unsigned long tx_carrier_errors; + unsigned long tx_fifo_errors; + unsigned long tx_heartbeat_errors; + unsigned long tx_window_errors; + + /* for cslip etc */ + unsigned long rx_compressed; + unsigned long tx_compressed; +}; +#define enet_statistics net_device_stats +#endif /* __KERNEL__ */ + +typedef unsigned char uchar; +/* both ushort and ulong may be defined*/ + +#ifndef __KERNEL__ +#ifndef _SYS_TYPES_H +typedef unsigned short ushort; +typedef unsigned long ulong; +#endif +#endif /* __KERNEL__ */ + + +#define SELTO_TIMEOUT p_dev_ctl->selto_timeout + +#define _local_ static +#define _static_ +#define _forward_ extern + +typedef unsigned short uint16; +typedef unsigned int uint32; +typedef long long uint64; +#ifdef __KERNEL__ +#if LINUX_VERSION_CODE < LinuxVersionCode(2,2,18) +typedef unsigned long dma_addr_t; +#endif +#endif + +#if BITS_PER_LONG > 32 +/* These macros are for 64 bit support */ +#define putPaddrLow(addr) ((uint32) \ +(0xffffffff & (unsigned long)(addr))) +#define putPaddrHigh(addr) ((uint32) \ + (0xffffffff & (((unsigned long)(addr))>>32))) +#define getPaddr(high, low) ((unsigned long) \ + ((((unsigned long) (high)) << 32)|((unsigned long)(low)))) + +#else +/* Macro's to support 32 bit addressing */ +#define putPaddrLow(addr) ((uint32)(addr)) +#define putPaddrHigh(addr) 0 +#define getPaddr(high, low) ((uint32)(low)) +#endif + +/* Macro to get from adapter number to ddi instance */ +#define fc_brd_to_inst(brd) fcinstance[brd] + +#define DELAYMS(ms) lpfc_DELAYMS(p_dev_ctl, ms) +#define DELAYMSctx(ms) lpfc_DELAYMS(p_dev_ctl, ms) + +#define EXPORT_LINUX 1 + +#ifdef CONFIG_PPC64 +#define powerpc +#endif + +#ifdef powerpc +#define LITTLE_ENDIAN_HOST 0 /* For fc.h */ +#define BIG_ENDIAN_HW 1 /* For fc_hw.h */ +#else +#define LITTLE_ENDIAN_HOST 1 /* For fc.h */ +#define LITTLE_ENDIAN_HW 1 /* For fc_hw.h */ +#endif /* powerpc */ + +#define MACADDR_LEN 6 /* MAC network address length */ +#define FC_LVL 0 +#define CLK_LVL 0 +#define EVENT_NULL (-1) +#define DMA_READ 1 /* flag argument to D_MAP_LIST */ +#ifndef NULL /* define NULL if not defined*/ +#define NULL (0) +#endif +#define FALSE 0 +#define TRUE 1 +#define DFC_IOCTL 1 + +/* Return value for PCI interrupt routine */ +#define INTR_SUCC 1 /* Claimed interrupt, detected work to do */ +#define INTR_FAIL 0 /* Doesn't claim interrupt */ + + +#define con_print(s, a, b) \ + fc_print(s, (void *)((ulong)a), (void *)((ulong)b)) + + +/* These calls are used before, and after, access to a shared memory + * access to the adapter. + */ +#define FC_MAP_MEM(p1) (void *) (*(p1)) /* sigh */ +#define FC_MAP_IO(p1) (void *) (*(p1)) /* sigh */ +#define FC_UNMAP_MEMIO(p1) /* groan */ + +#define fc_mpdata_outcopy(p, m, d, c) fc_bcopy((m)->virt, d, c) +#define fc_mpdata_incopy(p, m, s, c) fc_bcopy(s, (m)->virt, c) +#define fc_mpdata_sync(h, a, b, c) lpfc_mpdata_sync(p_dev_ctl, h, a, b, c) + +#define DDI_DMA_SYNC_FORKERNEL 1 +#define DDI_DMA_SYNC_FORCPU 1 +#define DDI_DMA_SYNC_FORDEV 2 + +/* This call is used to wakeup someone waiting to send a SCSI + * administrative command to the drive, only one outstanding + * command can be sent to each device. + */ +#define fc_admin_wakeup(p, d, bp) + +#define lpfc_restart_device(dev_ptr) +#define lpfc_handle_fcp_error(p_pkt, p_fcptr, p_cmd) \ + lpfc_fcp_error(p_fcptr, p_cmd) +#define STAT_ABORTED 0 + +struct watchdog { + void (*func)(void *); /* completion handler */ + uint32 restart; /* restart time (in seconds) */ + uint32 count; /* time remaining */ + ulong timeout_id; + struct timer_list timer; + int stopping; +}; + +#define ntimerisset(p1) (*(p1)) +#define ntimerclear(p1) (*(p1) = 0) +#define ntimercmp(p1, p2, cmp) ((p1) cmp (p2)) + + +/* This is the dio and d_iovec structures for the d_map_* services */ +typedef struct d_iovec { + void *stub; +} *d_iovec_t; + +struct dio { + void *stub; +}; +typedef struct dio * dio_t; + +#ifdef __KERNEL__ +#if LINUX_VERSION_CODE < LinuxVersionCode(2,3,43) +#define pci_map_single(dev, address, size, direction) virt_to_bus(address) +#define pci_unmap_single(dev, address, size, direction) +#define pci_alloc_consistent(dev, s, h) fc_pci_alloc_consistent(dev, s, h) +#define pci_free_consistent(dev, s, v, h) fc_pci_free_consistent(dev, s, v, h) +#define scsi_sg_dma_address(sc) virt_to_bus((sc)->address) +#define scsi_sg_dma_len(sc) ((sc)->length) +typedef struct wait_queue *WAIT_QUEUE; +#else +#define scsi_sg_dma_address(sc) sg_dma_address(sc) +#define scsi_sg_dma_len(sc) sg_dma_len(sc) +typedef wait_queue_head_t WAIT_QUEUE; +#endif + +#if LINUX_VERSION_CODE >= LinuxVersionCode(2,3,17) +#define NETDEVICE struct net_device +#else +#define NETDEVICE struct device +#endif + +#if LINUX_VERSION_CODE < LinuxVersionCode(2,3,43) +#define netif_start_queue(dev) clear_bit(0, (void*)&dev->tbusy) +#define netif_stop_queue(dev) set_bit(0, (void*)&dev->tbusy) +#define netdevice_start(dev) dev->start = 1 +#define netdevice_stop(dev) dev->start = 0 +#define dev_kfree_skb_irq(a) dev_kfree_skb(a) +#else +#define netdevice_start(dev) +#define netdevice_stop(dev) +#endif + +#else +#define NETDEVICE void +#endif + +struct intr { + int (*handler) (struct intr *); + NETDEVICE * lpfn_dev; + int (*lpfn_handler) (void); + int lpfn_mtu; + int lpfn_rcv_buf_size; +}; +typedef struct sk_buff fcipbuf_t; + +#define fcnextpkt(x) ((x)->prev) /* FOR Now */ +#define fcnextdata(x) ((x)->next) +#define fcpktlen(x) ((x)->len) /* Assume 1 skbuff per packet */ +#define fcdata(x) ((x)->data) +#define fcdatalen(x) ((x)->len) +#define fcgethandle(x) 0 + +#define fcsetdatalen(x, l) (((x)->len) = l) +#define fcincdatalen(x, l) (((x)->len) += l) +#define fcsethandle(x, h) +#define fcfreehandle(p,x) + +#define m_getclust(a,b) lpfc_alloc_skb(p_dev_ctl->ihs.lpfn_rcv_buf_size) +#define m_getclustm(a,b,c) lpfc_alloc_skb(c) +#define m_freem(x) lpfc_kfree_skb(x); + +#define FC_RCV_BUF_SIZE lpfc_ip_rcvsz(p_dev_ctl) /* rcv buf size for IP */ + +#define enet_statistics net_device_stats +/* Structure for generic statistics */ +typedef struct ndd_genstats { + struct enet_statistics ndd_enet; + uint32 ndd_elapsed_time; /* time in seconds since last reset */ + uint32 ndd_ipackets_msw; /* packets received on interface(msw) */ + uint32 ndd_ibytes_msw; /* total # of octets received(msw) */ + uint32 ndd_recvintr_msw; /* number of receive interrupts(msw) */ + uint32 ndd_recvintr_lsw; /* number of receive interrupts(lsw) */ + uint32 ndd_opackets_msw; /* packets sent on interface(msw) */ + uint32 ndd_obytes_msw; /* total number of octets sent(msw) */ + uint32 ndd_xmitintr_msw; /* number of transmit interrupts(msw) */ + uint32 ndd_xmitintr_lsw; /* number of transmit interrupts(lsw) */ + uint32 ndd_nobufs; /* no buffers available */ + uint32 ndd_xmitque_max; /* max transmits ever queued */ + uint32 ndd_xmitque_ovf; /* number of transmit queue overflows */ + uint32 ndd_ibadpackets; /* # of bad pkts recv'd from adapter */ + uint32 ndd_xmitque_cur; /* sum of driver+adapter xmit queues */ + uint32 ndd_ifOutUcastPkts_msw; /* outbound unicast pkts requested */ + uint32 ndd_ifOutUcastPkts_lsw; /* on interface (msw and lsw) */ + uint32 ndd_ifOutMcastPkts_msw; /* outbound multicast pkts requested */ + uint32 ndd_ifOutMcastPkts_lsw; /* on interface (msw and lsw) */ + uint32 ndd_ifOutBcastPkts_msw; /* outbound broadcast pkts requested */ + uint32 ndd_ifOutBcastPkts_lsw; /* on interface (msw and lsw) */ + uint32 ndd_ifInBcastPkts_msw; /* rcv'ed broadcast pkts requested */ + uint32 ndd_ifInBcastPkts_lsw; /* on interface (msw and lsw) */ +} ndd_genstats_t; + +#define ndd_ipackets_lsw ndd_enet.rx_packets +#define ndd_opackets_lsw ndd_enet.tx_packets +#define ndd_ibytes_lsw ndd_enet.rx_bytes +#define ndd_obytes_lsw ndd_enet.tx_bytes +#define ndd_ipackets_drop ndd_enet.rx_dropped +#define ndd_opackets_drop ndd_enet.tx_dropped +#define ndd_ierrors ndd_enet.rx_errors +#define ndd_oerrors ndd_enet.tx_errors + +typedef struct ndd { + char *ndd_name; /* name, e.g. ``en0'' or ``tr0'' */ + char *ndd_alias; /* alternate name */ + uint32 ndd_flags; /* up/down, broadcast, etc. */ +#define NDD_UP (0x00000001) /* NDD is opened */ +#define NDD_BROADCAST (0x00000002) /* broadcast address valid */ +#define NDD_RUNNING (0x00000008) /* NDD is operational */ +#define NDD_SIMPLEX (0x00000010) /* can't hear own transmissions */ +#define NDD_MULTICAST (0x00000200) /* receiving all multicasts */ + void (*nd_receive)(void *, struct sk_buff *, void *); /* DLPI streams receive function */ + struct ndd_genstats ndd_genstats; /* generic network stats */ +} ndd_t; + +struct lpfn_probe { + int (*open)(NETDEVICE *dev); + int (*stop)(NETDEVICE *dev); + int (*hard_start_xmit) (struct sk_buff *skb, NETDEVICE *dev); + int (*hard_header) (struct sk_buff *skb, + NETDEVICE *dev, + unsigned short type, + void *daddr, + void *saddr, + unsigned len); + int (*rebuild_header)(struct sk_buff *skb); + void (*receive)(ndd_t *p_ndd, struct sk_buff *skb, void *p_dev_ctl); + struct net_device_stats* (*get_stats)(NETDEVICE *dev); + int (*change_mtu)(NETDEVICE *dev, int new_mtu); +}; +#define LPFN_PROBE 1 +#define LPFN_DETACH 2 +#define LPFN_DFC 3 + +struct buf { + void *av_forw; + void *av_back; + int b_bcount; /* transfer count */ + int b_error; /* expanded error field */ + int b_resid; /* words not transferred after error */ + int b_flags; /* see defines below */ +#define B_ERROR 0x0004 /* transaction aborted */ +#define B_READ 0x0040 /* read when I/O occurs */ +#define B_WRITE 0x0100 /* non-read pseudo-flag */ + struct scsi_cmnd *cmnd; + int isdone; +}; + +/* refer to the SCSI ANSI X3.131-1986 standard for information */ +struct sc_cmd { /* structure of the SCSI cmd block */ + uchar scsi_op_code; /* first byte of SCSI cmd block */ + uchar lun; /* second byte of SCSI cmd block */ + uchar scsi_bytes[14]; /* other bytes of SCSI cmd block */ +}; +#define SCSI_RELEASE_UNIT 0x17 +#define SCSI_REQUEST_SENSE 0x03 +#define SCSI_RESERVE_UNIT 0x16 + +struct scsi { + uchar scsi_length; /* byte length of scsi cmd (6,10, or 12) */ + uchar scsi_id; /* the target SCSI ID */ + uchar scsi_lun; /* which LUN on the target */ + uchar flags; /* flags for use with the physical scsi command */ +#define SC_NODISC 0x80 /* don't allow disconnections */ +#define SC_ASYNC 0x08 /* asynchronous data xfer */ + struct sc_cmd scsi_cmd; /* the actual SCSI cmd */ +}; + +struct sc_buf { + struct buf bufstruct; /* buffer structure containing request + for device -- MUST BE FIRST! */ + struct scsi scsi_command; /* the information relating strictly + to the scsi command itself */ + uint32 timeout_value; /* timeout value for the command, + in units of seconds */ + uint32 cmd_flag; +#define FLAG_ABORT 0x01 + + uchar status_validity; /* least significant bit - scsi_status + * valid, next least significant bit - + * card status valid */ + +#define SC_SCSI_ERROR 1 /* scsi status reflects error */ +#define SC_ADAPTER_ERROR 2 /* general card status reflects err */ + uchar scsi_status; /* returned SCSI Bus status */ +#define SCSI_STATUS_MASK 0x3e /* mask for useful bits */ +#define SC_GOOD_STATUS 0x00 /* target completed successfully */ +#define SC_CHECK_CONDITION 0x02 /* target is reporting an error, + * exception, or abnormal condition */ +#define SC_BUSY_STATUS 0x08 /* target is busy and cannot accept + * a command from initiator */ +#define SC_INTMD_GOOD 0x10 /* intermediate status good when using + * linked commands */ +#define SC_RESERVATION_CONFLICT 0x18 /* attempted to access a LUN which is + * reserved by another initiator */ +#define SC_COMMAND_TERMINATED 0x22 /* Command has been terminated by + * the device. */ +#define SC_QUEUE_FULL 0x28 /* Device's command queue is full */ + + uchar general_card_status; /* SCSI adapter card status byte */ +#define SC_HOST_IO_BUS_ERR 0x01 /* Host I/O Bus error condition */ +#define SC_SCSI_BUS_FAULT 0x02 /* failure of the SCSI Bus */ +#define SC_CMD_TIMEOUT 0x04 /* cmd didn't complete before timeout */ +#define SC_NO_DEVICE_RESPONSE 0x08 /* target device did not respond */ +#define SC_ADAPTER_HDW_FAILURE 0x10 /* indicating a hardware failure */ +#define SC_ADAPTER_SFW_FAILURE 0x20 /* indicating a microcode failure */ +#define SC_FUSE_OR_TERMINAL_PWR 0x40 /* indicating bad fuse or termination */ +#define SC_SCSI_BUS_RESET 0x80 /* detected external SCSI bus reset */ + + uchar adap_q_status; /* adapter's device queue status. This*/ +#define SC_DID_NOT_CLEAR_Q 0x1 /* SCSI adapter device driver has not */ + + uchar flags; /* flags to SCSI adapter driver */ +#define SC_RESUME 0x01 /* resume transaction queueing for this + * id/lun beginning with this sc_buf */ +#define SC_MAPPED 0x02 /* buffer is mapped */ + + uint32 qfull_retry_count; +struct dev_info *current_devp; +}; +#define STAT_DEV_RESET 0x0 + +#define MAX_FCP_TARGET 0xff /* max num of FCP targets supported */ +#define MAX_FCP_LUN 0xff /* max num of FCP LUNs supported */ +/* When on, if a lun is detected to be not present, or + * not ready ... device structures related to that lun + * will be freed to save memory. Remove this define + * to turn off the feature */ +#define FREE_LUN 1 + +#define INDEX(pan, target) (ushort)(((pan)<<8) | ((target) & 0x1ff)) +#define DEV_SID(x) (uchar)(x & 0xff) /* extract sid from device id */ +#define DEV_PAN(x) (uchar)((x>>8) & 0x01) /* extract pan from device id */ + +#define GET_PAYLOAD_PHYS_ADDR(x) (x->phys_adr) + +#define MAX_FCP_CMDS 4096 /* Max # of outstanding FCP cmds */ +#define MAX_FC_BRDS 16 /* Max # boards per system */ +#define MAX_FC_TARGETS 512 /* Max scsi target # per adapter */ +#define MAX_FC_BINDINGS 64 /* Max # of persistent bindings */ + +#define LPFC_LOCK_UNOWNED ((void *) -1) +#ifdef __KERNEL__ +#define cpuid smp_processor_id() +#define maxCPU NR_CPUS +#else +#define cpuid 0 +#define maxCPU 1 +#endif /* __KERNEL__ */ + +typedef struct Simple_lock { + spinlock_t *sl_lock; + int owner; +} Simple_lock; + +#define disable_lock(p1, p2) 0 +#define unlock_enable(p1, p2) + +#define LPFC_INIT_LOCK_DRIVER spin_lock_init(&lpfc_smp_lock) +#define LPFC_INIT_LOCK_DPCQ spin_lock_init(&lpfc_dpc_request_lock) + +#define LPFC_LOCK_DRIVER0 spin_lock_irqsave(&lpfc_smp_lock, iflg) +#define LPFC_LOCK_DRIVER(num) spin_lock_irqsave(&lpfc_smp_lock, iflg); \ + if(p_dev_ctl->fc_ipri != 0) { \ + printk("LOCK %d failure %x %x\n",num, \ + (uint32)p_dev_ctl->fc_ipri, (uint32)iflg); \ + } \ + p_dev_ctl->fc_ipri = num + +#define LPFC_UNLOCK_DRIVER0 spin_unlock_irqrestore(&lpfc_smp_lock, iflg) +#define LPFC_UNLOCK_DRIVER if(p_dev_ctl) p_dev_ctl->fc_ipri = 0; \ + spin_unlock_irqrestore(&lpfc_smp_lock, iflg) + +#define LPFC_LOCK_SCSI_DONE(shost) \ + spin_lock_irqsave(shost->host_lock, siflg) +#define LPFC_UNLOCK_SCSI_DONE(shost) \ + spin_unlock_irqrestore(shost->host_lock, siflg) + +#define LPFC_DPC_LOCK_Q spin_lock_irqsave(&lpfc_dpc_request_lock, siflg) +#define LPFC_DPC_UNLOCK_Q spin_unlock_irqrestore(&lpfc_dpc_request_lock, siflg) + +#define EPERM 1 /* Not super-user */ +#define ENOENT 2 /* No such file or directory */ +#define ESRCH 3 /* No such process */ +#define EINTR 4 /* interrupted system call */ +#define EIO 5 /* I/O error */ +#define ENXIO 6 /* No such device or address */ +#define E2BIG 7 /* Arg list too long */ +#define ENOEXEC 8 /* Exec format error */ +#define EBADF 9 /* Bad file number */ +#define ECHILD 10 /* No children */ +#ifndef EAGAIN +#define EAGAIN 11 /* Resource temporarily unavailable */ +#endif +#define ENOMEM 12 /* Not enough core */ +#define EACCES 13 /* Permission denied */ +#define EFAULT 14 /* Bad address */ +#define ENOTBLK 15 /* Block device required */ +#define EBUSY 16 /* Mount device busy */ +#define EEXIST 17 /* File exists */ +#define EXDEV 18 /* Cross-device link */ +#define ENODEV 19 /* No such device */ +#define ENOTDIR 20 /* Not a directory */ +#define EISDIR 21 /* Is a directory */ +#define EINVAL 22 /* Invalid argument */ +#define ENFILE 23 /* File table overflow */ +#define EMFILE 24 /* Too many open files */ +#define ENOTTY 25 /* Inappropriate ioctl for device */ +#define ETXTBSY 26 /* Text file busy */ +#define EFBIG 27 /* File too large */ +#define ENOSPC 28 /* No space left on device */ +#define ESPIPE 29 /* Illegal seek */ +#define EROFS 30 /* Read only file system */ +#define EMLINK 31 /* Too many links */ +#define EPIPE 32 /* Broken pipe */ +#define EDOM 33 /* Math arg out of domain of func */ +#define ERANGE 34 /* Math result not representable */ +#ifndef ECONNABORTED +#define ECONNABORTED 103 /* Software caused connection abort */ +#endif +#ifndef ETIMEDOUT +#define ETIMEDOUT 110 /* Connection timed out */ +#endif + +#endif /* LP6000 */ + +#ifdef __KERNEL__ +#define EMULEX_REQ_QUEUE_LEN 2048 +#define EMULEX_MAX_SG(ql) (4 + ((ql) > 0) ? 7*((ql) - 1) : 0) + +#define SCMD_NEXT(scmd) ((struct scsi_cmnd *)(scmd)->SCp.ptr) + +int fc_detect(struct scsi_host_template *); +#ifdef MODULE +int fc_release(struct Scsi_Host *); +#else +#define fc_release NULL +#endif +const char * fc_info(struct Scsi_Host *); +int fc_queuecommand(struct scsi_cmnd *, void (* done)(struct scsi_cmnd *)); +#define FC_EXTEND_TRANS_A 1 +int fc_abort(struct scsi_cmnd *); +#ifdef FC_NEW_EH +int fc_reset_bus(struct scsi_cmnd *); +int fc_reset_host(struct scsi_cmnd *); +int fc_reset_device(struct scsi_cmnd *); +#else +int lpfc_reset(struct scsi_cmnd *, unsigned int); +int fc_proc_info( char *, char **, off_t, int, int, int); +#endif + +#ifdef USE_HIMEM +#define HIGHMEM_ENTRY highmem_io:1 +#else +#define HIGHMEM_ENTRY +#endif + +#ifdef FC_NEW_EH +#define LPFC_SG_SEGMENT 64 +#define EMULEXFC { \ + name: "lpfc", \ + detect: fc_detect, \ + release: fc_release, \ + info: fc_info, \ + queuecommand: fc_queuecommand, \ + eh_abort_handler: fc_abort, \ + eh_device_reset_handler: fc_reset_device, \ + eh_bus_reset_handler: fc_reset_bus, \ + eh_host_reset_handler: fc_reset_host, \ + can_queue: EMULEX_REQ_QUEUE_LEN, \ + this_id: -1, \ + sg_tablesize: LPFC_SG_SEGMENT, \ + cmd_per_lun: 30, \ + use_clustering: DISABLE_CLUSTERING, \ + HIGHMEM_ENTRY \ +} + +#else +#define LPFC_SG_SEGMENT 32 +#define EMULEXFC { \ + next: NULL, \ + module: NULL, \ + proc_dir: NULL, \ + proc_info: fc_proc_info, \ + name: "lpfc", \ + detect: fc_detect, \ + release: fc_release, \ + info: fc_info, \ + ioctl: NULL, \ + command: NULL, \ + queuecommand: fc_queuecommand, \ + eh_strategy_handler: NULL, \ + eh_abort_handler: NULL, \ + eh_device_reset_handler:NULL, \ + eh_bus_reset_handler: NULL, \ + eh_host_reset_handler: NULL, \ + abort: fc_abort, \ + reset: lpfc_reset, \ + slave_attach: NULL, \ + can_queue: EMULEX_REQ_QUEUE_LEN, \ + sg_tablesize: LPFC_SG_SEGMENT, \ + cmd_per_lun: 30, \ + present: 0, \ + unchecked_isa_dma: 0, \ + use_clustering: DISABLE_CLUSTERING, \ + use_new_eh_code: 0, \ + emulated: 0 \ +} +#endif +#endif /* __KERNEL */ + +#endif /* _H_FCOS */ + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fcclockb.c 999-mjb/drivers/scsi/lpfc/fcclockb.c --- 000-virgin/drivers/scsi/lpfc/fcclockb.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fcclockb.c 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,832 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#include "fc_os.h" + +#include +#include +#include "fc_hw.h" +#include "fc.h" + +#include "fcdiag.h" +#include "hbaapi.h" + +#include "fc_hw.h" +#include "fc.h" + +#include "fcdiag.h" +#include "fcfgparm.h" +#include "fcmsg.h" +#include "fc_crtn.h" +#include "fc_ertn.h" + +extern fc_dd_ctl_t DD_CTL; +extern iCfgParam icfgparam[]; +/* Can be used to map driver instance number and hardware adapter number */ +extern int fcinstance[MAX_FC_BRDS]; +extern int fcinstcnt; + +_static_ FCCLOCK *fc_clkgetb(fc_dev_ctl_t *p_dev_ctl); +_static_ ulong fc_clk_rem(fc_dev_ctl_t *p_dev_ctl, FCCLOCK *cb); +_static_ int que_tin(FCLINK *blk, FCLINK *hdr); + +#include "lp6000.c" +#include "dfcdd.c" +/* +*** boolean to test if block is linked into specific queue +*** (intended for assertions) +*/ +#define inque(x,hdr) que_tin( (FCLINK *)(x), (FCLINK *)(hdr) ) + +#define FC_MAX_CLK_TIMEOUT 0xfffffff + +/***************************************************************** +*** fc_clkgetb() Get a clock block +*****************************************************************/ +_static_ FCCLOCK * +fc_clkgetb(fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO * binfo; + FCCLOCK_INFO * clock_info; + FCCLOCK * cb; + int i; + + clock_info = &DD_CTL.fc_clock_info; + + if(p_dev_ctl) { + binfo = &BINFO; + cb = (FCCLOCK * ) fc_mem_get(binfo, MEM_CLOCK); + } + else { + for(i=0;iclk_block[i]; + if(cb->cl_tix == -1) + break; + cb = 0; + } + } + + if(cb) + cb->cl_p_dev_ctl = (void *)p_dev_ctl; + + return (cb); +} + + +/***************************************************************** +*** fc_clkrelb() Release a clock block +*****************************************************************/ +_static_ void +fc_clkrelb(fc_dev_ctl_t *p_dev_ctl, FCCLOCK *cb) +{ + FC_BRD_INFO * binfo; + FCCLOCK_INFO * clock_info; + + clock_info = &DD_CTL.fc_clock_info; + + if(p_dev_ctl) { + binfo = &BINFO; + fc_mem_put(binfo, MEM_CLOCK, (uchar * )cb); + } + else { + cb->cl_tix = (uint32)-1; + } +} + + +/***************************************************************** +*** fc_clk_can() Cancel a clock request +*** fc_clk_can will cancel a previous request to fc_clk_set or +*** fc_clk_res. +*** The request must not have expired so far. A request that has been +*** cancelled cannot be reset. +*****************************************************************/ +_static_ int +fc_clk_can(fc_dev_ctl_t *p_dev_ctl, FCCLOCK *cb) +{ + FCCLOCK_INFO * clock_info; + int ipri; + + clock_info = &DD_CTL.fc_clock_info; + ipri = disable_lock(CLK_LVL, &CLOCK_LOCK); + + /* Make sure timer has not expired */ + if (!inque(cb, &clock_info->fc_clkhdr)) { + unlock_enable(ipri, &CLOCK_LOCK); + return(0); + } + + fc_clock_deque(cb); + + /* Release clock block */ + fc_clkrelb(p_dev_ctl, cb); + unlock_enable(ipri, &CLOCK_LOCK); + + return(1); +} + + +/***************************************************************** +*** fc_clk_rem() get amount of time remaining in a clock request +*** fc_clk_rem() returns the number of tix remaining in +*** a clock request generated by fc_clk_set or fc_clk_res. The timer must +*** not have expired or be cancelled. +*****************************************************************/ +_static_ ulong +fc_clk_rem(fc_dev_ctl_t *p_dev_ctl, FCCLOCK *cb) +{ + FCCLOCK_INFO * clock_info; + FCCLOCK * x; + ulong tix; + int ipri; + + clock_info = &DD_CTL.fc_clock_info; + ipri = disable_lock(CLK_LVL, &CLOCK_LOCK); + + tix = 0; + /* get top of clock queue */ + x = (FCCLOCK * ) & clock_info->fc_clkhdr; + /* + *** Add up ticks in blocks upto specified request + */ + do { + x = x->cl_fw; + if (x == (FCCLOCK * ) & clock_info->fc_clkhdr) { + unlock_enable(ipri, &CLOCK_LOCK); + return(0); + } + tix += x->cl_tix; + } while (x != cb); + + unlock_enable(ipri, &CLOCK_LOCK); + return(tix); +} + + +/***************************************************************** +*** fc_clk_res() clock reset +*** fc_clk_res() resets a clock previously assigned by fc_clk_set(). +*** That clock must not have expired. The new sec time is +*** used, measured from now. The original function/argument +*** are not changed. +*** Note: code parrallels fc_clk_can() and fc_clk_set(). +*****************************************************************/ +_static_ ulong +fc_clk_res(fc_dev_ctl_t *p_dev_ctl, ulong tix, FCCLOCK *cb) +{ + FCCLOCK_INFO * clock_info; + FCCLOCK * x; + int ipri; + + clock_info = &DD_CTL.fc_clock_info; + ipri = disable_lock(CLK_LVL, &CLOCK_LOCK); + + /* Make sure timer has not expired */ + if (!inque(cb, &clock_info->fc_clkhdr)) { + unlock_enable(ipri, &CLOCK_LOCK); + return(0); + } + if (tix <= 0) { + unlock_enable(ipri, &CLOCK_LOCK); + return(0); + } + tix++; /* round up 1 sec to account for partial first tick */ + + fc_clock_deque(cb); + + /* + *** Insert block into queue by order of amount of clock ticks, + *** each block contains difference in ticks between itself and + *** its predacessor. + */ + + /* get top of list */ + x = clock_info->fc_clkhdr.cl_f; + while (x != (FCCLOCK * ) & clock_info->fc_clkhdr) { + if (x->cl_tix >= tix) { + /* if inserting in middle of que, adjust next tix */ + x->cl_tix -= tix; + break; + } + tix -= x->cl_tix; + x = x->cl_fw; + } + + /* back up one in que */ + x = x->cl_bw; + fc_enque(cb, x); + clock_info->fc_clkhdr.count++; + cb->cl_tix = tix; + + unlock_enable(ipri, &CLOCK_LOCK); + return((ulong)1); +} + + +/***************************************************************** +*** fc_clk_set() request a clock service +*** fc_clk_set will cause specific functions to be executed at a fixed +*** time into the future. At a duration guaranteed to not be less +*** than, but potentially is longer than the given number of secs, +*** the given function is called with the given single argument. +*** Interlock is performed at a processor status level not lower +*** than the given value. The returned value is needed if the request +*** is to be cancelled or reset. +*****************************************************************/ +_static_ FCCLOCK * +fc_clk_set(fc_dev_ctl_t *p_dev_ctl, ulong tix, +void (*func)(fc_dev_ctl_t*, void*, void*), void *arg1, void *arg2) +{ + FCCLOCK_INFO * clock_info; + FCCLOCK * x; + FCCLOCK * cb; + int ipri; + + clock_info = &DD_CTL.fc_clock_info; + ipri = disable_lock(CLK_LVL, &CLOCK_LOCK); + + if (tix > FC_MAX_CLK_TIMEOUT) { + return(0); + } + tix++; /* round up 1 sec to account for partial first tick */ + + /* + *** Allocate a CLOCK block + */ + if ((cb = fc_clkgetb(p_dev_ctl)) == 0) { + unlock_enable(ipri, &CLOCK_LOCK); + return(0); + } + + /* + *** Insert block into queue by order of amount of clock ticks, + *** each block contains difference in ticks between itself and + *** its predecessor. + */ + + /* get top of list */ + x = clock_info->fc_clkhdr.cl_f; + while (x != (FCCLOCK * ) & clock_info->fc_clkhdr) { + if (x->cl_tix >= tix) { + /* if inserting in middle of que, adjust next tix */ + if (x->cl_tix > tix) { + x->cl_tix -= tix; + break; + } + /* + *** Another clock expires at same time. + *** Maintain the order of requests. + */ + for (x = x->cl_fw; + x != (FCCLOCK * ) & clock_info->fc_clkhdr; + x = x->cl_fw) { + if (x->cl_tix != 0) + break; + } + + /* I'm at end of list */ + tix = 0; + break; + } + + tix -= x->cl_tix; + x = x->cl_fw; + } + + /* back up one in que */ + x = x->cl_bw; + + /* Count the current number of unexpired clocks */ + clock_info->fc_clkhdr.count++; + fc_enque(cb, x); + cb->cl_func = (void(*)(void*, void*, void*))func; + cb->cl_arg1 = arg1; + cb->cl_arg2 = arg2; + cb->cl_tix = tix; + unlock_enable(ipri, &CLOCK_LOCK); + + return((FCCLOCK * ) cb); +} + + +/***************************************************************** +*** fc_timer +*** This function will be called by the driver every second. +*****************************************************************/ +_static_ void +fc_timer(void *p) +{ + fc_dev_ctl_t * p_dev_ctl; + FCCLOCK_INFO * clock_info; + ulong tix; + FCCLOCK * x; + int ipri; + + clock_info = &DD_CTL.fc_clock_info; + ipri = disable_lock(CLK_LVL, &CLOCK_LOCK); + + /* + *** Increment time_sample value + */ + clock_info->ticks++; + + x = clock_info->fc_clkhdr.cl_f; + + /* counter for propagating negative values */ + tix = 0; + /* If there are expired clocks */ + if (x != (FCCLOCK * ) & clock_info->fc_clkhdr) { + x->cl_tix = x->cl_tix - 1; + if (x->cl_tix <= 0) { + /* Loop thru all clock blocks */ + while (x != (FCCLOCK * ) & clock_info->fc_clkhdr) { + x->cl_tix += tix; + /* If # of ticks left > 0, break out of loop */ + if (x->cl_tix > 0) + break; + tix = x->cl_tix; + + /* Deque expired clock */ + fc_deque(x); + /* Decrement count of unexpired clocks */ + clock_info->fc_clkhdr.count--; + + unlock_enable(ipri, &CLOCK_LOCK); + + p_dev_ctl = x->cl_p_dev_ctl; + + if(p_dev_ctl) { + ipri = disable_lock(FC_LVL, &CMD_LOCK); + + /* Call timeout routine */ + (*x->cl_func) (p_dev_ctl, x->cl_arg1, x->cl_arg2); + /* Release clock block */ + fc_clkrelb(p_dev_ctl, x); + + unlock_enable(ipri, &CMD_LOCK); + } + else { + /* Call timeout routine */ + (*x->cl_func) (p_dev_ctl, x->cl_arg1, x->cl_arg2); + /* Release clock block */ + fc_clkrelb(p_dev_ctl, x); + } + + ipri = disable_lock(CLK_LVL, &CLOCK_LOCK); + + /* start over */ + x = clock_info->fc_clkhdr.cl_f; + } + } + } + unlock_enable(ipri, &CLOCK_LOCK); + fc_reset_timer(); +} + + +/***************************************************************** +*** fc_clock_deque() +*****************************************************************/ +_static_ void +fc_clock_deque(FCCLOCK *cb) +{ + FCCLOCK_INFO * clock_info; + FCCLOCK * x; + + clock_info = &DD_CTL.fc_clock_info; + /* + *** Remove the block from its present spot, but first adjust + *** tix field of any successor. + */ + if (cb->cl_fw != (FCCLOCK * ) & clock_info->fc_clkhdr) { + x = cb->cl_fw; + x->cl_tix += cb->cl_tix; + } + + /* Decrement count of unexpired clocks */ + clock_info->fc_clkhdr.count--; + + fc_deque(cb); +} + + +/***************************************************************** +*** fc_clock_init() +*****************************************************************/ +_static_ void +fc_clock_init() +{ + FCCLOCK_INFO * clock_info; + FCCLOCK * cb; + int i; + + clock_info = &DD_CTL.fc_clock_info; + + /* Initialize clock queue */ + clock_info->fc_clkhdr.cl_f = + clock_info->fc_clkhdr.cl_b = (FCCLOCK * ) & clock_info->fc_clkhdr; + clock_info->fc_clkhdr.count = 0; + + /* Initialize clock globals */ + clock_info->ticks = 0; + clock_info->Tmr_ct = 0; + + for(i=0;iclk_block[i]; + cb->cl_tix = (uint32)-1; + } +} + + +_static_ int +que_tin(FCLINK *blk, FCLINK *hdr) +{ + FCLINK * x; + + x = hdr->_f; + while (x != hdr) { + if (x == blk) { + return (1); + } + x = x->_f; + } + return(0); +} + + +_static_ void +fc_flush_clk_set( +fc_dev_ctl_t *p_dev_ctl, +void (*func)(fc_dev_ctl_t*, void*, void*)) +{ + FC_BRD_INFO * binfo; + FCCLOCK_INFO * clock_info; + FCCLOCK * x, * xmatch; + IOCBQ *iocbq; + int ipri; + + binfo = &BINFO; + clock_info = &DD_CTL.fc_clock_info; + ipri = disable_lock(CLK_LVL, &CLOCK_LOCK); + + x = clock_info->fc_clkhdr.cl_f; + + /* If there are clocks */ + while (x != (FCCLOCK * ) & clock_info->fc_clkhdr) { + if((p_dev_ctl == x->cl_p_dev_ctl) && ((void *)func == (void *)(*x->cl_func))) { + xmatch = x; + x = x->cl_fw; + + /* + *** Remove the block from its present spot, but first adjust + *** tix field of any successor. + */ + if (xmatch->cl_fw != (FCCLOCK * ) & clock_info->fc_clkhdr) { + x->cl_tix += xmatch->cl_tix; + } + + clock_info->fc_clkhdr.count--; + fc_deque(xmatch); + + if((void *)func == (void *)lpfc_scsi_selto_timeout) { + (*xmatch->cl_func) (p_dev_ctl, xmatch->cl_arg1, xmatch->cl_arg2); + } + if(func == fc_delay_timeout) { + iocbq = (IOCBQ *)xmatch->cl_arg1; + if(iocbq->bp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )iocbq->bp); + } + if(iocbq->info) { + fc_mem_put(binfo, MEM_BUF, (uchar * )iocbq->info); + } + if(iocbq->bpl) { + fc_mem_put(binfo, MEM_BPL, (uchar * )iocbq->bpl); + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )iocbq); + } + fc_clkrelb(p_dev_ctl, xmatch); + } + else { + x = x->cl_fw; + } + } + unlock_enable(ipri, &CLOCK_LOCK); + return; +} + +_static_ int +fc_abort_clk_blk( +fc_dev_ctl_t *p_dev_ctl, +void (*func)(fc_dev_ctl_t*, void*, void*), +void *arg1, +void *arg2) +{ + FC_BRD_INFO * binfo; + FCCLOCK_INFO * clock_info; + FCCLOCK * x, * xmatch; + IOCBQ *iocbq; + int ipri; + + binfo = &BINFO; + clock_info = &DD_CTL.fc_clock_info; + ipri = disable_lock(CLK_LVL, &CLOCK_LOCK); + + x = clock_info->fc_clkhdr.cl_f; + + /* If there are clocks */ + while (x != (FCCLOCK * ) & clock_info->fc_clkhdr) { + if((p_dev_ctl == x->cl_p_dev_ctl) && + ((void *)func == (void *)(*x->cl_func)) && + (arg1 == x->cl_arg1) && + (arg2 == x->cl_arg2)) { + xmatch = x; + x = x->cl_fw; + + /* + *** Remove the block from its present spot, but first adjust + *** tix field of any successor. + */ + if (xmatch->cl_fw != (FCCLOCK * ) & clock_info->fc_clkhdr) { + x->cl_tix += xmatch->cl_tix; + } + + clock_info->fc_clkhdr.count--; + fc_deque(xmatch); + if((void *)func == (void *)lpfc_scsi_selto_timeout) { + (*xmatch->cl_func) (p_dev_ctl, xmatch->cl_arg1, xmatch->cl_arg2); + } + if(func == fc_delay_timeout) { + iocbq = (IOCBQ *)xmatch->cl_arg1; + if(iocbq->bp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )iocbq->bp); + } + if(iocbq->info) { + fc_mem_put(binfo, MEM_BUF, (uchar * )iocbq->info); + } + if(iocbq->bpl) { + fc_mem_put(binfo, MEM_BPL, (uchar * )iocbq->bpl); + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )iocbq); + } + fc_clkrelb(p_dev_ctl, xmatch); + unlock_enable(ipri, &CLOCK_LOCK); + return(1); + } + else { + x = x->cl_fw; + } + } + unlock_enable(ipri, &CLOCK_LOCK); + return(0); +} + +_static_ int +fc_abort_delay_els_cmd( +fc_dev_ctl_t *p_dev_ctl, +uint32 did) +{ + FC_BRD_INFO * binfo; + FCCLOCK_INFO * clock_info; + FCCLOCK * x, * xmatch; + IOCBQ *iocbq, *saveiocbq, *next_iocbq; + int ipri; + + binfo = &BINFO; + clock_info = &DD_CTL.fc_clock_info; + ipri = disable_lock(CLK_LVL, &CLOCK_LOCK); + + x = clock_info->fc_clkhdr.cl_f; + + /* If there are clocks */ + while (x != (FCCLOCK * ) & clock_info->fc_clkhdr) { + if((p_dev_ctl == x->cl_p_dev_ctl) && + ((void *)(x->cl_func) == (void *)fc_delay_timeout)) { + xmatch = x; + x = x->cl_fw; + iocbq = (IOCBQ *)xmatch->cl_arg1; + + if((iocbq->iocb.un.elsreq.remoteID != did) && + (did != 0xffffffff)) + continue; + /* Abort delay xmit clock */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0100, /* ptr to msg structure */ + fc_mes0100, /* ptr to msg */ + fc_msgBlk0100.msgPreambleStr, /* begin varargs */ + did, + iocbq->iocb.un.elsreq.remoteID, + iocbq->iocb.ulpIoTag); /* end varargs */ + /* + *** Remove the block from its present spot, but first adjust + *** tix field of any successor. + */ + if (xmatch->cl_fw != (FCCLOCK * ) & clock_info->fc_clkhdr) { + x->cl_tix += xmatch->cl_tix; + } + + clock_info->fc_clkhdr.count--; + fc_deque(xmatch); + if(iocbq->bp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )iocbq->bp); + } + if(iocbq->info) { + fc_mem_put(binfo, MEM_BUF, (uchar * )iocbq->info); + } + if(iocbq->bpl) { + fc_mem_put(binfo, MEM_BPL, (uchar * )iocbq->bpl); + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )iocbq); + + fc_clkrelb(p_dev_ctl, xmatch); + + if(did != 0xffffffff) + break; + } + else { + x = x->cl_fw; + } + } + unlock_enable(ipri, &CLOCK_LOCK); + + if(binfo->fc_delayxmit) { + iocbq = binfo->fc_delayxmit; + saveiocbq = 0; + while(iocbq) { + + if((iocbq->iocb.un.elsreq.remoteID == did) || + (did == 0xffffffff)) { + + next_iocbq = (IOCBQ *)iocbq->q; + /* Abort delay xmit context */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0101, /* ptr to msg structure */ + fc_mes0101, /* ptr to msg */ + fc_msgBlk0101.msgPreambleStr, /* begin varargs */ + did, + iocbq->iocb.un.elsreq.remoteID, + iocbq->iocb.ulpIoTag); /* end varargs */ + if(saveiocbq) { + saveiocbq->q = iocbq->q; + } + else { + binfo->fc_delayxmit = (IOCBQ *)iocbq->q; + } + if(iocbq->bp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )iocbq->bp); + } + if(iocbq->info) { + fc_mem_put(binfo, MEM_BUF, (uchar * )iocbq->info); + } + if(iocbq->bpl) { + fc_mem_put(binfo, MEM_BPL, (uchar * )iocbq->bpl); + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )iocbq); + + if(did != 0xffffffff) + break; + iocbq = next_iocbq; + } + else { + saveiocbq = iocbq; + iocbq = (IOCBQ *)iocbq->q; + } + } + } + return(0); +} +/* DQFULL */ +/***************************************************************************** + * + * NAME: fc_q_depth_up + * FUNCTION: Increment current Q depth for LUNs + * + *****************************************************************************/ + +_static_ void +fc_q_depth_up( +fc_dev_ctl_t * p_dev_ctl, +void *n1, +void *n2) +{ + node_t *nodep; + NODELIST * ndlp; + iCfgParam * clp; + FC_BRD_INFO *binfo; + struct dev_info * dev_ptr; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + if (clp[CFG_DFT_LUN_Q_DEPTH].a_current <= FC_MIN_QFULL) { + return; + } + + if(binfo->fc_ffstate != FC_READY) + goto out; + + /* + * Find the target from the nlplist based on SCSI ID + */ + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + nodep = (node_t *)ndlp->nlp_targetp; + if (nodep) { + for (dev_ptr = nodep->lunlist; dev_ptr != NULL; + dev_ptr = dev_ptr->next) { + if ((dev_ptr->stop_send_io == 0) && + (dev_ptr->fcp_cur_queue_depth < clp[CFG_DFT_LUN_Q_DEPTH].a_current)) { + dev_ptr->fcp_cur_queue_depth += (ushort)clp[CFG_DQFULL_THROTTLE_UP_INC].a_current; + if (dev_ptr->fcp_cur_queue_depth > clp[CFG_DFT_LUN_Q_DEPTH].a_current) + dev_ptr->fcp_cur_queue_depth = clp[CFG_DFT_LUN_Q_DEPTH].a_current; + } else { + /* + * Try to reset stop_send_io + */ + if (dev_ptr->stop_send_io) + dev_ptr->stop_send_io--; + } + } + } + ndlp = (NODELIST *)ndlp->nlp_listp_next; + } + +out: + fc_clk_set(p_dev_ctl, clp[CFG_DQFULL_THROTTLE_UP_TIME].a_current, fc_q_depth_up, + 0, 0); + + return; +} + +/* QFULL_RETRY */ +_static_ void +fc_qfull_retry( +void *n1) +{ + fc_buf_t * fcptr; + dvi_t * dev_ptr; + T_SCSIBUF * sbp; + struct buf * bp; + fc_dev_ctl_t * p_dev_ctl; + + fcptr = (fc_buf_t *)n1; + sbp = fcptr->sc_bufp; + dev_ptr = fcptr->dev_ptr; + bp = (struct buf *) sbp; + + if(dev_ptr->nodep) { + p_dev_ctl = dev_ptr->nodep->ap; + fc_fcp_bufunmap(p_dev_ctl, sbp); + } + /* + * Queue this command to the head of the device's + * pending queue for processing by fc_issue_cmd. + */ + if (dev_ptr->pend_head == NULL) { /* Is queue empty? */ + dev_ptr->pend_head = sbp; + dev_ptr->pend_tail = sbp; + bp->av_forw = NULL; + fc_enq_wait(dev_ptr); + } else { /* Queue not empty */ + bp->av_forw = (struct buf *) dev_ptr->pend_head; + dev_ptr->pend_head = sbp; + } + dev_ptr->pend_count++; +} + +_static_ void +fc_establish_link_tmo( +fc_dev_ctl_t * p_dev_ctl, +void *n1, +void *n2) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + /* Re-establishing Link, timer expired */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1300, /* ptr to msg structure */ + fc_mes1300, /* ptr to msg */ + fc_msgBlk1300.msgPreambleStr, /* begin varargs */ + binfo->fc_flag, + binfo->fc_ffstate); /* end varargs */ + binfo->fc_flag &= ~FC_ESTABLISH_LINK; +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fcdds.h 999-mjb/drivers/scsi/lpfc/fcdds.h --- 000-virgin/drivers/scsi/lpfc/fcdds.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fcdds.h 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,175 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#ifndef _H_FCDDS +#define _H_FCDDS + +#include "fc_hw.h" + +#define LNAMESIZE 16 + +#ifndef DMA_MAXMIN_16M +#define DMA_MAXMIN_16M 0x8 +#define DMA_MAXMIN_32M 0x9 +#define DMA_MAXMIN_64M 0xa +#define DMA_MAXMIN_128M 0xb +#define DMA_MAXMIN_256M 0xc +#define DMA_MAXMIN_512M 0xd +#define DMA_MAXMIN_1G 0xe +#define DMA_MAXMIN_2G 0xf +#endif + +/****************************************************************************/ +/* This is the DDS structure for the FC device */ +/****************************************************************************/ + +typedef struct { + char logical_name[LNAMESIZE]; /* logical name in ASCII characters */ + char dev_alias[LNAMESIZE]; /* logical name in ASCII characters */ + uint32 devno; /* major/minor device number */ + + /* PCI parameters */ + int bus_id; /* for use with i_init and bus io */ + int sla; /* for use with pci_cfgrw and bus io */ + int bus_intr_lvl; /* interrupt level */ + uint64 bus_mem_addr; /* bus memory base address */ + uint64 bus_io_addr; /* I/O reg base address */ + + uint32 xmt_que_size; /* size of xmit queue for mbufs */ + uint32 num_iocbs; /* number of iocb buffers to allocate */ + uint32 num_bufs; /* number of ELS/IP buffers to allocate */ + uint32 fcpfabric_tmo; /* Extra FCP timeout for fabrics (in secs) */ + + ushort topology; /* link topology for init link */ + ushort post_ip_buf; /* number of IP buffers to post to ring 1 */ + + ushort rsvd1; + uchar ipclass; /* class to use for transmitting IP data */ + uchar fcpclass; /* class to use for transmitting FCP data */ + + uchar network_on; /* true if networking is enabled */ + uchar fcp_on; /* true if FCP access is enabled */ + uchar frame_512; /* true if 512 byte framesize is required */ + uchar use_adisc; /* Use ADISC results in FCP rediscovery */ + + uchar first_check; /* Ignore 0x2900 check condition after PLOGI */ + uchar sli; /* Service Level Interface supported */ + uchar ffnumrings; /* number of FF rings being used */ + + uchar scandown; + uchar linkdown_tmo; /* linkdown timer, seconds */ + uchar nodev_tmo; + uchar fabric_reg; /* perform RFT_ID with NameServer */ + + uchar nummask[4]; /* number of masks/rings being used */ + uchar rval[6]; /* rctl for ring, assume mask is 0xff */ + uchar tval[6]; /* type for ring, assume mask is 0xff */ + + uchar verbose; /* how much to hurl onto the console */ + uchar ack0support; /* Run with ACK0 for CLASS2 sequences */ + uchar log_only; /* console messages just logged to log file */ + uchar automap; /* assign scsi ids to all FCP devices */ + + uint32 default_tgt_queue_depth; /* max # cmds outstanding to a target */ + + uchar dds1_os; /* system dependent variable */ + uchar default_lun_queue_depth; /* max # cmds outstanding to a lun */ + uchar nodev_holdio; /* Hold I/O errors if device disappears */ + uchar zone_rscn; /* system dependent variable */ + + uchar check_cond_err; + uchar delay_rsp_err; + uchar rscn_adisc; + uchar filler1; + uchar filler2; + uchar filler3; + + uint32 dds5_os; /* system dependent variable */ +} fc_dds_t; + +/* Values for seed_base and fcp_mapping */ +#define FCP_SEED_WWPN 0x1 /* Entry scsi id is seeded for WWPN */ +#define FCP_SEED_WWNN 0x2 /* Entry scsi id is seeded for WWNN */ +#define FCP_SEED_DID 0x4 /* Entry scsi id is seeded for DID */ +#define FCP_SEED_MASK 0x7 /* mask for seeded flags */ + + + +/* Allocate space for any environment specific dds parameters */ + + + + + +/****************************************************************************/ +/* Device VPD save area */ +/****************************************************************************/ + +typedef struct fc_vpd { + uint32 status; /* vpd status value */ + uint32 length; /* number of bytes actually returned */ + struct { + uint32 rsvd1; /* Revision numbers */ + uint32 biuRev; + uint32 smRev; + uint32 smFwRev; + uint32 endecRev; + ushort rBit; + uchar fcphHigh; + uchar fcphLow; + uchar feaLevelHigh; + uchar feaLevelLow; + uint32 postKernRev; + uint32 opFwRev; + uchar opFwName[16]; + uint32 sli1FwRev; + uchar sli1FwName[16]; + uint32 sli2FwRev; + uchar sli2FwName[16]; + } rev; +} fc_vpd_t; + +/****************************************************************************/ +/* Node table information that the config routine needs */ +/****************************************************************************/ + + +/****************************************************************************/ +/* SCIOCOMPLETE results buffer structure */ +/****************************************************************************/ + +struct iorslt { + struct buf *buf_struct_ptr; + uint32 b_flags; + uint32 b_resid; + char b_error; +}; + +/****************************************************************************/ +/* Special ioctl calls for the Fibre Channel SCSI LAN device driver */ +/****************************************************************************/ + +#define SCIONODES 0x47 /* ioctl to get node table */ +#define SCIOSTRAT 0x48 /* strategy ioctl */ +#define SCIOCOMPLETE 0x49 /* I/O completion ioctl */ +#define SCIORESUMEQ 0x4a /* device resume Q ioctl */ + + +#endif /* _H_FCDDS */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fcdiag.h 999-mjb/drivers/scsi/lpfc/fcdiag.h --- 000-virgin/drivers/scsi/lpfc/fcdiag.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fcdiag.h 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,353 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#ifndef _H_FCDIAG +#define _H_FCDIAG + +#ifndef LP6000 +/* Applications using this header file should typedef the following */ +typedef unsigned int uint32; +typedef unsigned char uchar; +typedef unsigned short ushort; +typedef void* MAILBOX; +#endif + +/* the brdinfo structure */ +typedef struct BRDINFO { + uint32 a_mem_hi; /* memory identifier for adapter access */ + uint32 a_mem_low; /* memory identifier for adapter access */ + uint32 a_flash_hi; /* memory identifier for adapter access */ + uint32 a_flash_low; /* memory identifier for adapter access */ + uint32 a_ctlreg_hi; /* memory identifier for adapter access */ + uint32 a_ctlreg_low; /* memory identifier for adapter access */ + uint32 a_intrlvl; /* interrupt level for adapter */ + uint32 a_pci; /* PCI identifier (device / vendor id) */ + uint32 a_busid; /* identifier of PCI bus adapter is on */ + uint32 a_devid; /* identifier of PCI device number */ + uchar a_rsvd1; /* reserved for future use */ + uchar a_rsvd2; /* reserved for future use */ + uchar a_siglvl; /* signal handler used by library */ + uchar a_ddi; /* identifier device driver instance number */ + uint32 a_onmask; /* mask of ONDI primatives supported */ + uint32 a_offmask; /* mask of OFFDI primatives supported */ + uchar a_drvrid[16]; /* driver version */ + uchar a_fwname[32]; /* firmware version */ +} brdinfo; + +/* bits in a_onmask */ +#define ONDI_MBOX 0x1 /* allows non-destructive mailbox commands */ +#define ONDI_IOINFO 0x2 /* supports retrieval of I/O info */ +#define ONDI_LNKINFO 0x4 /* supports retrieval of link info */ +#define ONDI_NODEINFO 0x8 /* supports retrieval of node info */ +#define ONDI_TRACEINFO 0x10 /* supports retrieval of trace info */ +#define ONDI_SETTRACE 0x20 /* supports configuration of trace info */ +#define ONDI_SLI1 0x40 /* hardware supports SLI-1 interface */ +#define ONDI_SLI2 0x80 /* hardware supports SLI-2 interface */ +#define ONDI_BIG_ENDIAN 0x100 /* DDI interface is BIG Endian */ +#define ONDI_LTL_ENDIAN 0x200 /* DDI interface is LITTLE Endian */ +#define ONDI_RMEM 0x400 /* allows reading of adapter shared memory */ +#define ONDI_RFLASH 0x800 /* allows reading of adapter flash */ +#define ONDI_RPCI 0x1000 /* allows reading of adapter pci registers */ +#define ONDI_RCTLREG 0x2000 /* allows reading of adapter cntrol registers */ +#define ONDI_CFGPARAM 0x4000 /* supports get/set configuration parameters */ +#define ONDI_CT 0x8000 /* supports passthru CT interface */ +#define ONDI_HBAAPI 0x10000 /* supports HBA API interface */ + +/* bits in a_offmask */ +#define OFFDI_MBOX 0x1 /* allows all mailbox commands */ +#define OFFDI_RMEM 0x2 /* allows reading of adapter shared memory */ +#define OFFDI_WMEM 0x4 /* allows writing of adapter shared memory */ +#define OFFDI_RFLASH 0x8 /* allows reading of adapter flash */ +#define OFFDI_WFLASH 0x10 /* allows writing of adapter flash */ +#define OFFDI_RPCI 0x20 /* allows reading of adapter pci registers */ +#define OFFDI_WPCI 0x40 /* allows writing of adapter pci registers */ +#define OFFDI_RCTLREG 0x80 /* allows reading of adapter cntrol registers */ +#define OFFDI_WCTLREG 0x100 /* allows writing of adapter cntrol registers */ +#define OFFDI_OFFLINE 0x80000000 /* if set, adapter is in offline state */ + +/* values for flag in SetDiagEnv */ +#define DDI_SHOW 0x0 +#define DDI_ONDI 0x1 +#define DDI_OFFDI 0x2 + +#define DDI_BRD_SHOW 0x10 +#define DDI_BRD_ONDI 0x11 +#define DDI_BRD_OFFDI 0x12 + +/* unused field */ +#define DDI_UNUSED 0xFFFFFFFFL /* indicate unused field of brdinfo */ + +/* the ioinfo structure */ +typedef struct IOINFO { + uint32 a_mbxCmd; /* mailbox commands issued */ + uint32 a_mboxCmpl; /* mailbox commands completed */ + uint32 a_mboxErr; /* mailbox commands completed, error status */ + uint32 a_iocbCmd; /* iocb command ring issued */ + uint32 a_iocbRsp; /* iocb rsp ring recieved */ + uint32 a_adapterIntr; /* adapter interrupt events */ + uint32 a_fcpCmd; /* FCP commands issued */ + uint32 a_fcpCmpl; /* FCP command completions recieved */ + uint32 a_fcpErr; /* FCP command completions errors */ + uint32 a_seqXmit; /* IP xmit sequences sent */ + uint32 a_seqRcv; /* IP sequences recieved */ + uint32 a_bcastXmit; /* cnt of successful xmit broadcast commands issued */ + uint32 a_bcastRcv; /* cnt of receive broadcast commands received */ + uint32 a_elsXmit; /* cnt of successful ELS request commands issued */ + uint32 a_elsRcv; /* cnt of ELS request commands received */ + uint32 a_RSCNRcv; /* cnt of RSCN commands recieved */ + uint32 a_seqXmitErr; /* cnt of unsuccessful xmit broadcast cmds issued */ + uint32 a_elsXmitErr; /* cnt of unsuccessful ELS request commands issued */ + uint32 a_elsBufPost; /* cnt of ELS buffers posted to adapter */ + uint32 a_ipBufPost; /* cnt of IP buffers posted to adapter */ + uint32 a_cnt1; /* generic counter */ + uint32 a_cnt2; /* generic counter */ + uint32 a_cnt3; /* generic counter */ + uint32 a_cnt4; /* generic counter */ + +} IOinfo; + +/* the linkinfo structure */ +typedef struct LINKINFO { + uint32 a_linkEventTag; + uint32 a_linkUp; + uint32 a_linkDown; + uint32 a_linkMulti; + uint32 a_DID; + uchar a_topology; + uchar a_linkState; + uchar a_alpa; + uchar a_alpaCnt; + uchar a_alpaMap[128]; + uchar a_wwpName[8]; + uchar a_wwnName[8]; +} LinkInfo; + +/* values for a_topology */ +#define LNK_LOOP 0x1 +#define LNK_PUBLIC_LOOP 0x2 +#define LNK_FABRIC 0x3 +#define LNK_PT2PT 0x4 + +/* values for a_linkState */ +#define LNK_DOWN 0x1 +#define LNK_UP 0x2 +#define LNK_FLOGI 0x3 +#define LNK_DISCOVERY 0x4 +#define LNK_REDISCOVERY 0x5 +#define LNK_READY 0x6 + +/* the traceinfo structure */ +typedef struct TRACEINFO { + uchar a_event; + uchar a_cmd; + ushort a_status; + uint32 a_information; +} TraceInfo; + +/* values for flag */ +#define TRC_SHOW 0x0 +#define TRC_MBOX 0x1 +#define TRC_IOCB 0x2 +#define TRC_INTR 0x4 +#define TRC_EVENT 0x8 + +/* values for a_event */ +#define TRC_MBOX_CMD 0x1 +#define TRC_MBOX_CMPL 0x2 +#define TRC_IOCB_CMD 0x3 +#define TRC_IOCB_RSP 0x4 +#define TRC_INTR_RCV 0x5 +#define TRC_EVENT1 0x6 +#define TRC_EVENT2 0x7 +#define TRC_EVENT_MASK 0x7 +#define TRC_RING0 0x0 +#define TRC_RING1 0x40 +#define TRC_RING2 0x80 +#define TRC_RING3 0xC0 +#define TRC_RING_MASK 0xC0 + +/* the cfgparam structure */ +typedef struct CFGPARAM { + uchar a_string[32]; + uint32 a_low; + uint32 a_hi; + uint32 a_default; + uint32 a_current; + ushort a_flag; + ushort a_changestate; + uchar a_help[80]; +} CfgParam; + +#define MAX_CFG_PARAM 64 + +/* values for a_flag */ +#define CFG_EXPORT 0x1 /* Export this parameter to the end user */ +#define CFG_IGNORE 0x2 /* Ignore this parameter */ +#define CFG_DEFAULT 0x8000 /* Reestablishing Link */ + +/* values for a_changestate */ +#define CFG_REBOOT 0x0 /* Changes effective after ystem reboot */ +#define CFG_DYNAMIC 0x1 /* Changes effective immediately */ +#define CFG_RESTART 0x2 /* Changes effective after driver restart */ + +/* the icfgparam structure - internal use only */ +typedef struct ICFGPARAM { + char *a_string; + uint32 a_low; + uint32 a_hi; + uint32 a_default; + uint32 a_current; + ushort a_flag; + ushort a_changestate; + char *a_help; +} iCfgParam; + + +/* the nodeinfo structure */ +typedef struct NODEINFO { + ushort a_flag; + ushort a_state; + uint32 a_did; + uchar a_wwpn[8]; + uchar a_wwnn[8]; + uint32 a_targetid; +} NodeInfo; + +#define MAX_NODES 512 + +/* Defines for a_state */ +#define NODE_UNUSED 0 /* unused NL_PORT entry */ +#define NODE_LIMBO 0x1 /* entry needs to hang around for wwpn / sid */ +#define NODE_LOGOUT 0x2 /* NL_PORT is not logged in - entry is cached */ +#define NODE_PLOGI 0x3 /* PLOGI was sent to NL_PORT */ +#define NODE_LOGIN 0x4 /* NL_PORT is logged in / login REG_LOGINed */ +#define NODE_PRLI 0x5 /* PRLI was sent to NL_PORT */ +#define NODE_ALLOC 0x6 /* NL_PORT is ready to initiate adapter I/O */ +#define NODE_SEED 0x7 /* seed scsi id bind in table */ + +/* Defines for a_flag */ +#define NODE_RPI_XRI 0x1 /* creating xri for entry */ +#define NODE_REQ_SND 0x2 /* sent ELS request for this entry */ +#define NODE_ADDR_AUTH 0x4 /* Authenticating addr for this entry */ +#define NODE_RM_ENTRY 0x8 /* Remove this entry */ +#define NODE_FARP_SND 0x10 /* sent FARP request for this entry */ +#define NODE_FABRIC 0x20 /* this entry represents the Fabric */ +#define NODE_FCP_TARGET 0x40 /* this entry is an FCP target */ +#define NODE_IP_NODE 0x80 /* this entry is an IP node */ +#define NODE_DISC_START 0x100 /* start discovery on this entry */ +#define NODE_SEED_WWPN 0x200 /* Entry scsi id is seeded for WWPN */ +#define NODE_SEED_WWNN 0x400 /* Entry scsi id is seeded for WWNN */ +#define NODE_SEED_DID 0x800 /* Entry scsi id is seeded for DID */ +#define NODE_SEED_MASK 0xe00 /* mask for seeded flags */ +#define NODE_AUTOMAP 0x1000 /* This entry was automap'ed */ +#define NODE_NS_REMOVED 0x2000 /* This entry removed from NameServer */ + +/* Defines for RegisterForEvent mask */ +#define FC_REG_LINK_EVENT 0x1 /* Register for link up / down events */ +#define FC_REG_RSCN_EVENT 0x2 /* Register for RSCN events */ +#define FC_REG_CT_EVENT 0x4 /* Register for CT request events */ +#define FC_REG_EVENT_MASK 0x3f /* event mask */ +#define FC_REG_ALL_PORTS 0x80 /* Register for all ports */ + +#define MAX_FC_EVENTS 8 /* max events user process can wait for per HBA */ +#define FC_FSTYPE_ALL 0xffff /* match on all fsTypes */ + +/* Defines for error codes */ +#define FC_ERROR_BUFFER_OVERFLOW 0xff +#define FC_ERROR_RESPONSE_TIMEOUT 0xfe +#define FC_ERROR_LINK_UNAVAILABLE 0xfd +#define FC_ERROR_INSUFFICIENT_RESOURCES 0xfc +#define FC_ERROR_EXISTING_REGISTRATION 0xfb +#define FC_ERROR_INVALID_TAG 0xfa + +/* User Library level Event structure */ +typedef struct reg_evt { + uint32 e_mask; + uint32 e_gstype; + uint32 e_pid; + uint32 e_outsz; + void (*e_func)(uint32, ...); + void * e_ctx; + void * e_out; +} RegEvent; + +/* Defines for portid for CT interface */ +#define CT_FabricCntlServer ((uint32)0xfffffd) +#define CT_NameServer ((uint32)0xfffffc) +#define CT_TimeServer ((uint32)0xfffffb) +#define CT_MgmtServer ((uint32)0xfffffa) + + +/* functions from diagnostic specification */ +uint32 InitDiagEnv(brdinfo *bi); +uint32 FreeDiagEnv(void); +uint32 SetDiagEnv(uint32 flag); +uint32 SetBrdEnv(uint32 board, uint32 flag); +uint32 GetIOinfo(uint32 board, IOinfo *ioinfo); +uint32 GetLinkInfo(uint32 board, LinkInfo *linkinfo); +uint32 GetCfgParam(uint32 board, CfgParam *cfgparam); +uint32 SetCfgParam(uint32 board, uint32 index, uint32 value); +uint32 GetNodeInfo(uint32 board, NodeInfo *nodeinfo); +int GetCTInfo(uint32 board, uint32 portid, uchar *inbuf, uint32 incnt, + uchar *outbuf, uint32 outcnt); +uint32 GetTraceInfo(uint32 board, TraceInfo *traceinfo); +uint32 SetTraceInfo(uint32 board, uint32 flag, uint32 depth); +uint32 IssueMbox(uint32 board, MAILBOX *mb, uint32 insize, uint32 outsize); +uint32 ReadMem(uint32 board, uchar *buffer, uint32 offset, uint32 count); +uint32 WriteMem(uint32 board, uchar *buffer, uint32 offset, uint32 count); +uint32 ReadFlash(uint32 board, uchar *buffer, uint32 offset, uint32 count); +uint32 WriteFlash(uint32 board, uchar *buffer, uint32 offset, uint32 count); +uint32 ReadCtlReg(uint32 board, uint32 *buffer, uint32 offset); +uint32 WriteCtlReg(uint32 board, uint32 *buffer, uint32 offset); +uint32 ReadPciCfg(uint32 board, uchar *buffer, uint32 offset, uint32 count); +uint32 WritePciCfg(uint32 board, uchar *buffer, uint32 offset, uint32 count); +uint32 ReadFcodeFlash(uint32 board, uchar *buffer, uint32 offset, uint32 count); +uint32 WriteFcodeFlash(uint32 board, uchar *buffer, uint32 offset, uint32 count); +uint32 SendElsCmd(uint32 board, uint32 opcode, uint32 did); +uint32 SendScsiCmd(uint32 board, void *wwn, void *req, uint32 sz, void *rsp, + uint32 *rsz, void *sns, uint32 *snssz); +uint32 SendScsiRead(uint32 board, void *PortWWN, uint64 l, uint32 s, + void *rsp, uint32 *rspCount, void *sns, uint32 *snsCount); +uint32 SendScsiWrite(uint32 board, void *PortWWN, uint64 l, uint32 s, + void *rsp, uint32 *rspCount, void *sns, uint32 *snsCount); +uint32 SendFcpCmd(uint32 board, void *wwn, void *req, uint32 sz, void *data, + uint32 *datasz, void *fcpRsp, uint32 *fcpRspsz); +void * RegisterForCTEvents(uint32 board, ushort type, void (*func)(uint32, ...), void *ctx, uint32 *pstat); +uint32 unRegisterForCTEvent(uint32 board, void *eventid); +uint32 RegisterForEvent(uint32 board, uint32 mask, void *type, uint32 outsz, void (*func)(uint32, ...), void *ctx); +uint32 unRegisterForEvent(uint32 board, uint32 eventid); + +#if defined(_KERNEL) || defined(__KERNEL__) +struct dfc_info { + brdinfo fc_ba; + char * fc_iomap_io; /* starting address for registers */ + char * fc_iomap_mem; /* starting address for SLIM */ + uchar * fc_hmap; /* handle for mapping memory */ + uint32 fc_refcnt; + uint32 fc_flag; +}; + +/* Define for fc_flag */ +#define DFC_STOP_IOCTL 1 /* Stop processing dfc ioctls */ +#define DFC_MBOX_ACTIVE 2 /* mailbox is active thru dfc */ + +#endif + +#endif /* _H_FCDIAG */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fcelsb.c 999-mjb/drivers/scsi/lpfc/fcelsb.c --- 000-virgin/drivers/scsi/lpfc/fcelsb.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fcelsb.c 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,4792 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#include "fc_os.h" + +#include "fc_hw.h" +#include "fc.h" + +#include "fcdiag.h" +#include "hbaapi.h" +#include "fcfgparm.h" +#include "fcmsg.h" +#include "fc_crtn.h" +#include "fc_ertn.h" /* Environment - external routine definitions */ + +extern fc_dd_ctl_t DD_CTL; +extern iCfgParam icfgparam[]; +extern char *lpfc_release_version; +extern int fc_max_els_sent; + +/* Routine Declaration - Local */ +_local_ int fc_chksparm(FC_BRD_INFO *binfo,volatile SERV_PARM *sp, uint32 cls); +_local_ int fc_els_retry(FC_BRD_INFO *binfo, RING *rp, IOCBQ *iocb, uint32 cmd, + NODELIST *nlp); +_local_ int fc_status_action(FC_BRD_INFO *binfo, IOCBQ *iocb, uint32 cmd, + NODELIST *nlp); +/* End Routine Declaration - Local */ + +/******************************************************/ +/** handle_els_event **/ +/** **/ +/** Description: Process an ELS Response Ring cmpl. **/ +/** **/ +/******************************************************/ +_static_ int +handle_els_event( +fc_dev_ctl_t *p_dev_ctl, +RING *rp, +IOCBQ *temp) +{ + IOCB * cmd; + FC_BRD_INFO * binfo; + IOCBQ * xmitiq; + volatile SERV_PARM * sp; + uint32 * lp0, * lp1; + MATCHMAP * mp, * rmp; + DMATCHMAP * drmp; + NODELIST * ndlp; + MAILBOXQ * mb; + ELS_PKT * ep; + iCfgParam * clp; + ADISC * ap; + void * ioa; + int rc; + uint32 command; + uint32 did, bumpcnt; + volatile uint32 ha_copy; + + /* Called from host_interrupt() to process ELS R0ATT */ + rc = 0; + ndlp = 0; + binfo = &BINFO; + cmd = &temp->iocb; + + /* look up xmit complete by IoTag */ + if ((xmitiq = fc_ringtxp_get(rp, cmd->ulpIoTag)) == 0) { + /* completion with missing xmit command */ + FCSTATCTR.elsStrayXmitCmpl++; + + /* Stray ELS completion */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0102, /* ptr to msg structure */ + fc_mes0102, /* ptr to msg */ + fc_msgBlk0102.msgPreambleStr, /* begin varargs */ + cmd->ulpCommand, + cmd->ulpIoTag); /* end varargs */ + + return(EIO); + } + temp->retry = xmitiq->retry; + + if(binfo->fc_ffstate < FC_READY) { + /* If we are in discovery, and a Link Event is pending, abandon + * discovery, clean up pending actions, and take the Link Event. + */ + ioa = FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + /* Read host attention register to determine interrupt source */ + ha_copy = READ_CSR_REG(binfo, FC_HA_REG(binfo, ioa)); + FC_UNMAP_MEMIO(ioa); + + if(ha_copy & HA_LATT) { + /* Pending Link Event during Discovery */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0250, /* ptr to msg structure */ + fc_mes0250, /* ptr to msg */ + fc_msgBlk0250.msgPreambleStr, /* begin varargs */ + (uint32)cmd->ulpCommand, + (uint32)cmd->ulpIoTag, + (uint32)cmd->ulpStatus, + cmd->un.ulpWord[4]); /* end varargs */ + fc_abort_discovery(p_dev_ctl); + temp->retry = 0xff; + } + } + + /* Check for aborted ELS command */ + if(temp->retry == 0xff) { + + /* Aborted ELS IOCB */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0104, /* ptr to msg structure */ + fc_mes0104, /* ptr to msg */ + fc_msgBlk0104.msgPreambleStr, /* begin varargs */ + cmd->ulpCommand, + cmd->ulpIoTag); /* end varargs */ + switch (cmd->ulpCommand) { + case CMD_ELS_REQUEST_CR: + case CMD_ELS_REQUEST64_CR: + case CMD_ELS_REQUEST_CX: + case CMD_ELS_REQUEST64_CX: + mp = (MATCHMAP * )xmitiq->bp; + rmp = (MATCHMAP * )xmitiq->info; + lp0 = (uint32 * )mp->virt; + ndlp = 0; + command = *lp0; + switch (command) { + case ELS_CMD_PLOGI: + case ELS_CMD_LOGO: + case ELS_CMD_PRLI: + case ELS_CMD_PDISC: + case ELS_CMD_ADISC: + rmp->fc_mptr = (uchar *)0; + break; + } + break; + case CMD_XMIT_ELS_RSP_CX: /* Normal ELS response completion */ + case CMD_XMIT_ELS_RSP64_CX: /* Normal ELS response completion */ + mp = (MATCHMAP * )xmitiq->bp; + ndlp = (NODELIST * )xmitiq->ndlp; + break; + case CMD_GEN_REQUEST64_CX: + case CMD_GEN_REQUEST64_CR: + if(xmitiq->bpl == 0) { + /* User initiated request */ + drmp = (DMATCHMAP * )xmitiq->info; + drmp->dfc_flag = -1; + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + } + else { + /* Driver initiated request */ + /* Just free resources and let timer timeout */ + fc_mem_put(binfo, MEM_BPL, (uchar * )xmitiq->bpl); + if(xmitiq->bp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )xmitiq->bp); + } + if(xmitiq->info) + fc_free_ct_rsp(p_dev_ctl, (MATCHMAP *)xmitiq->info); + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + } + return(0); + } + goto out2; + } + + /* ELS completion */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0105, /* ptr to msg structure */ + fc_mes0105, /* ptr to msg */ + fc_msgBlk0105.msgPreambleStr, /* begin varargs */ + (uint32)cmd->ulpCommand, + (uint32)cmd->ulpIoTag, + (uint32)cmd->ulpStatus, + cmd->un.ulpWord[4]); /* end varargs */ + + switch (cmd->ulpCommand) { + + case CMD_GEN_REQUEST64_CR: + if(xmitiq->bpl == 0) { + /* User initiated request */ + drmp = (DMATCHMAP * )xmitiq->info; + drmp->dfc_flag = -2; + } + else { + /* Driver initiated request */ + /* Just free resources and let timer timeout */ + fc_mem_put(binfo, MEM_BPL, (uchar * )xmitiq->bpl); + if(xmitiq->bp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )xmitiq->bp); + } + if(xmitiq->info) + fc_free_ct_rsp(p_dev_ctl, (MATCHMAP *)xmitiq->info); + } + + break; + + case CMD_ELS_REQUEST_CR: /* Local error in ELS command */ + case CMD_ELS_REQUEST64_CR: /* Local error in ELS command */ + + FCSTATCTR.elsXmitErr++; + + /* Find out which command failed */ + mp = (MATCHMAP * )xmitiq->bp; + rmp = (MATCHMAP * )xmitiq->info; + ndlp = (NODELIST *)rmp->fc_mptr; + rmp->fc_mptr = (uchar *)0; + + lp0 = (uint32 * )mp->virt; + command = *lp0; + + if (fc_els_retry(binfo, rp, temp, command, ndlp) == 0) { + /* retry of ELS command failed */ + switch (command) { + case ELS_CMD_FLOGI: /* Fabric login */ + if (ndlp) + ndlp->nlp_flag &= ~NLP_REQ_SND; + fc_freenode_did(binfo, Fabric_DID, 1); + if (binfo->fc_ffstate == FC_FLOGI) { + binfo->fc_flag &= ~(FC_FABRIC | FC_PUBLIC_LOOP); + if (binfo->fc_topology == TOPOLOGY_LOOP) { + binfo->fc_edtov = FF_DEF_EDTOV; + binfo->fc_ratov = FF_DEF_RATOV; + if ((mb=(MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_config_link(p_dev_ctl, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + binfo->fc_flag |= FC_DELAY_DISC; + } else { + /* Device Discovery completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0206, /* ptr to msg structure */ + fc_mes0206, /* ptr to msg */ + fc_msgBlk0206.msgPreambleStr, /* begin varargs */ + cmd->ulpStatus, + cmd->un.ulpWord[4], + cmd->un.ulpWord[5]); /* end varargs */ + binfo->fc_ffstate = FC_ERROR; + if ((mb=(MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_clear_la(binfo, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + } + } + break; + + case ELS_CMD_PLOGI: /* NPort login */ + if ((ndlp == 0) && ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, (uint32)cmd->un.elsreq.remoteID)) == 0)) { + break; + } + + /* If we are in the middle of Discovery */ + if (ndlp->nlp_action & (NLP_DO_ADDR_AUTH | NLP_DO_DISC_START | NLP_DO_RSCN)) { + /* Goto next entry */ + fc_nextnode(p_dev_ctl, ndlp); + } + + ndlp->nlp_action &= ~NLP_DO_RNID; + ndlp->nlp_flag &= ~NLP_REQ_SND; + + if((ndlp->nlp_type & (NLP_AUTOMAP | NLP_SEED_MASK)) == 0) { + fc_freenode(binfo, ndlp, 1); + } + else { + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + break; + + case ELS_CMD_PRLI: /* Process Log In */ + if ((ndlp == 0) && ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, (uint32)cmd->un.elsreq.remoteID)) == 0)) { + break; + } + + /* If we are in the middle of Discovery */ + if (ndlp->nlp_action & (NLP_DO_DISC_START | NLP_DO_RSCN)) { + /* Goto next entry */ + fc_nextnode(p_dev_ctl, ndlp); + } + ndlp->nlp_flag &= ~NLP_REQ_SND; + ndlp->nlp_state = NLP_LOGIN; + fc_nlp_unmap(binfo, ndlp); + break; + + case ELS_CMD_PDISC: /* Pdisc */ + case ELS_CMD_ADISC: /* Adisc */ + if ((ndlp == 0) && ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + (uint32)cmd->un.elsreq.remoteID)) == 0)) { + break; + } + + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + + ndlp->nlp_action |= NLP_DO_DISC_START; + binfo->fc_nlp_cnt++; + fc_els_cmd(binfo, ELS_CMD_PLOGI, (void *)((ulong)cmd->un.elsreq.remoteID), (uint32)0, (ushort)0, ndlp); + break; + + case ELS_CMD_LOGO: /* Logout */ + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, (uint32)cmd->un.elsreq.remoteID)) == 0) { + break; + } + + /* If we are in the middle of Discovery */ + if (ndlp->nlp_action & (NLP_DO_ADDR_AUTH | NLP_DO_DISC_START | NLP_DO_RSCN)) { + /* Goto next entry */ + fc_nextnode(p_dev_ctl, ndlp); + } + + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + break; + + case ELS_CMD_FARPR: /* Farp-res */ + ep = (ELS_PKT * )lp0; + if((ndlp = fc_findnode_wwpn(binfo, NLP_SEARCH_ALL, + &ep->un.farp.RportName)) == 0) + break; + + /* If we are in the middle of Discovery */ + if (ndlp->nlp_action & NLP_DO_DISC_START) { + /* Goto next entry */ + fc_nextnode(p_dev_ctl, ndlp); + } + + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + break; + + case ELS_CMD_FARP: /* Farp-req */ + ep = (ELS_PKT * )lp0; + + if((ndlp = fc_findnode_wwpn(binfo, NLP_SEARCH_ALL, + &ep->un.farp.RportName)) == 0) + break; + + ndlp->nlp_flag &= ~NLP_FARP_SND; + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + break; + + case ELS_CMD_SCR: /* State Change Registration */ + break; + + case ELS_CMD_RNID: /* Receive Node Identification */ + break; + + default: + /* Unknown ELS command */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0106, /* ptr to msg structure */ + fc_mes0106, /* ptr to msg */ + fc_msgBlk0106.msgPreambleStr, /* begin varargs */ + command); /* end varargs */ + FCSTATCTR.elsCmdPktInval++; + break; + } + /* ELS command completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0107, /* ptr to msg structure */ + fc_mes0107, /* ptr to msg */ + fc_msgBlk0107.msgPreambleStr, /* begin varargs */ + cmd->ulpCommand, + cmd->ulpStatus, + cmd->un.ulpWord[4], + cmd->un.ulpWord[5]); /* end varargs */ + } + else { + /* Retry in progress */ + if ((command == ELS_CMD_PLOGI) && + ((cmd->un.ulpWord[4] & 0xff) == IOERR_LOOP_OPEN_FAILURE)) { + if (ndlp->nlp_action & (NLP_DO_ADDR_AUTH | NLP_DO_DISC_START | NLP_DO_RSCN)) { + /* Goto next entry */ + fc_nextnode(p_dev_ctl, ndlp); + } + } + } + + if (xmitiq->bpl) { + fc_mem_put(binfo, MEM_BPL, (uchar * )xmitiq->bpl); + } + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + fc_mem_put(binfo, MEM_BUF, (uchar * )xmitiq->info); + break; + + case CMD_XMIT_ELS_RSP_CX: /* Normal ELS response completion */ + case CMD_XMIT_ELS_RSP64_CX: /* Normal ELS response completion */ + + ndlp = (NODELIST * )xmitiq->ndlp; + did = 0; + bumpcnt = 0; + if ((ndlp) && (ndlp->nlp_flag & NLP_SND_PLOGI)) { + ndlp->nlp_flag &= ~NLP_SND_PLOGI; + did = ndlp->nlp_DID; + if((binfo->fc_flag & FC_RSCN_MODE) || + (binfo->fc_ffstate < FC_READY)) { + binfo->fc_nlp_cnt++; + bumpcnt = 1; + } + } + mp = (MATCHMAP * )xmitiq->bp; + lp0 = (uint32 * )mp->virt; + /* get command that errored */ + command = *lp0++; + sp = (volatile SERV_PARM * )lp0; + if (cmd->ulpStatus) { + /* Error occurred sending ELS response */ + /* check to see if we should retry */ + /* ELS response completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0108, /* ptr to msg structure */ + fc_mes0108, /* ptr to msg */ + fc_msgBlk0108.msgPreambleStr, /* begin varargs */ + cmd->ulpCommand, + cmd->ulpStatus, + cmd->un.ulpWord[4], + cmd->un.ulpWord[5]); /* end varargs */ + FCSTATCTR.elsXmitErr++; + + if (fc_els_retry(binfo, rp, temp, command, ndlp) == 0) { + /* No retries */ + if ((ndlp) && (ndlp->nlp_flag & NLP_RM_ENTRY) && + !(ndlp->nlp_flag & NLP_REQ_SND)) { + if (ndlp->nlp_type & NLP_FCP_TARGET) { + ndlp->nlp_flag &= ~NLP_RM_ENTRY; + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + if(binfo->fc_ffstate == FC_READY) { + if(!(binfo->fc_flag & FC_RSCN_MODE)) { + binfo->fc_flag |= FC_RSCN_MODE; + ndlp->nlp_action |= NLP_DO_RSCN; + ndlp->nlp_flag &= ~NLP_NODEV_TMO; + fc_nextrscn(p_dev_ctl, 1); + } + } + else { + ndlp->nlp_action |= NLP_DO_DISC_START; + fc_nextdisc(p_dev_ctl, 1); + } + } else { + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + } + else { + if (ndlp) { + if(!(ndlp->nlp_flag & NLP_REQ_SND)) { + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + } + } + } + } else { + FCSTATCTR.elsXmitCmpl++; + if(ndlp) { + /* ELS response completion */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0109, /* ptr to msg structure */ + fc_mes0109, /* ptr to msg */ + fc_msgBlk0109.msgPreambleStr, /* begin varargs */ + ndlp->nlp_DID, + ndlp->nlp_type, + ndlp->nlp_flag, + ndlp->nlp_state); /* end varargs */ + if ((ndlp->nlp_flag & NLP_REG_INP)) { + uint32 size; + MATCHMAP * bmp; + ULP_BDE64 * bpl; + + bmp = (MATCHMAP *)(xmitiq->bpl); + bpl = (ULP_BDE64 * )bmp->virt; + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + size = (uint32)bpl->tus.f.bdeSize; + if(size == (sizeof(SERV_PARM) + sizeof(uint32))) { + fc_process_reglogin(p_dev_ctl, ndlp); + } + } + + if ((ndlp->nlp_flag & NLP_RM_ENTRY) && + !(ndlp->nlp_flag & NLP_REQ_SND)) { + if (ndlp->nlp_type & NLP_FCP_TARGET) { + ndlp->nlp_flag &= ~NLP_RM_ENTRY; + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + if(binfo->fc_ffstate == FC_READY) { + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + if(!(binfo->fc_flag & FC_RSCN_MODE)) { + did = 0; + if(bumpcnt) + binfo->fc_nlp_cnt--; + + binfo->fc_flag |= FC_RSCN_MODE; + ndlp->nlp_action |= NLP_DO_RSCN; + ndlp->nlp_flag &= ~NLP_NODEV_TMO; + fc_nextrscn(p_dev_ctl, 1); + } + } + else { + did = 0; + if(bumpcnt) + binfo->fc_nlp_cnt--; + + ndlp->nlp_action |= NLP_DO_DISC_START; + fc_nextdisc(p_dev_ctl, 1); + } + } else { + if (ndlp->nlp_type & NLP_IP_NODE) { + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + else { + fc_freenode(binfo, ndlp, 1); + } + } + } + } + } + + if (xmitiq->bpl) { + fc_mem_put(binfo, MEM_BPL, (uchar * )xmitiq->bpl); + } + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + if(did && (!(ndlp->nlp_flag & NLP_NS_REMOVED))) { + fc_els_cmd(binfo, ELS_CMD_PLOGI, (void *)((ulong)did), + (uint32)0, (ushort)0, ndlp); + } + break; + + case CMD_GEN_REQUEST64_CX: + if(xmitiq->bpl == 0) { + /* User initiated request */ + drmp = (DMATCHMAP * )xmitiq->info; + fc_mpdata_sync(drmp->dfc.dma_handle, 0, 0, DDI_DMA_SYNC_FORKERNEL); + + if (cmd->ulpStatus) { + /* Error occurred sending ELS command */ + if ((cmd->un.ulpWord[4] & 0xff) == IOERR_SEQUENCE_TIMEOUT) + drmp->dfc_flag = -1; + else + drmp->dfc_flag = -2; + } + else { + drmp->dfc_flag = (int)(cmd->un.genreq64.bdl.bdeSize); + } + } + else { + /* Driver initiated request */ + if (cmd->ulpStatus == 0) { + mp = (MATCHMAP * )xmitiq->bp; + ndlp = (NODELIST *)mp->fc_mptr; + if(ndlp && (ndlp->nlp_DID == NameServer_DID)) { + fc_ns_rsp(p_dev_ctl, (NODELIST *)mp->fc_mptr, + (MATCHMAP *)xmitiq->info, + (uint32)(cmd->un.genreq64.bdl.bdeSize)); + } + /* FDMI */ + if(ndlp && (ndlp->nlp_DID == FDMI_DID)) { + fc_fdmi_rsp(p_dev_ctl, (MATCHMAP *)mp, (MATCHMAP *)xmitiq->info); + } + } + if(xmitiq->info) + fc_free_ct_rsp(p_dev_ctl, (MATCHMAP *)xmitiq->info); + fc_mem_put(binfo, MEM_BPL, (uchar * )xmitiq->bpl); + if(xmitiq->bp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )xmitiq->bp); + } + } + break; + + + case CMD_ELS_REQUEST_CX: /* Normal ELS command completion */ + case CMD_ELS_REQUEST64_CX: /* Normal ELS command completion */ + + /* get command that was accepted */ + mp = (MATCHMAP * )xmitiq->bp; + lp0 = (uint32 * )mp->virt; + command = *lp0; + + /* ELS command successful, get ptr to service params */ + rmp = (MATCHMAP * )xmitiq->info; + ndlp = (NODELIST *)rmp->fc_mptr; + rmp->fc_mptr = (uchar *)0; + + lp1 = (uint32 * )rmp->virt; + fc_mpdata_sync(rmp->dma_handle, 0, 0, DDI_DMA_SYNC_FORKERNEL); + + sp = (volatile SERV_PARM * )((char *)lp1 + sizeof(uint32)); + + if (cmd->ulpStatus) { + /* Error occurred sending ELS command */ + FCSTATCTR.elsXmitErr++; + /* ELS command completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0110, /* ptr to msg structure */ + fc_mes0110, /* ptr to msg */ + fc_msgBlk0110.msgPreambleStr, /* begin varargs */ + command, + cmd->ulpStatus, + cmd->un.ulpWord[4], + cmd->un.ulpWord[5]); /* end varargs */ + if ((command == ELS_CMD_FARP) || + (command == ELS_CMD_FARPR)) { + ep = (ELS_PKT * )lp0; + if((ndlp=fc_findnode_wwpn(binfo, NLP_SEARCH_ALL, &ep->un.farp.RportName))) { + ndlp->nlp_flag &= ~NLP_FARP_SND; + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + } + } + + /* If error occurred on ADISC/PDISC, check to see if address + * still needs to be authenticated. + */ + if ((command == ELS_CMD_ADISC) || (command == ELS_CMD_PDISC)) { + if(ndlp == 0) { + ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + (uint32)cmd->un.elsreq.remoteID); + } + } + else { + if (command == ELS_CMD_PLOGI) { + if(ndlp == 0) { + ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + (uint32)cmd->un.elsreq.remoteID); + } + } + } + + /* check to see if we should retry */ + if (fc_els_retry(binfo, rp, temp, command, ndlp) == 0) { + /* retry of ELS command failed */ + switch (command) { + case ELS_CMD_FLOGI: + if (ndlp) + ndlp->nlp_flag &= ~NLP_REQ_SND; + if (binfo->fc_ffstate == FC_FLOGI) { + binfo->fc_flag &= ~(FC_FABRIC | FC_PUBLIC_LOOP); + fc_freenode_did(binfo, Fabric_DID, 1); + if (binfo->fc_topology == TOPOLOGY_LOOP) { + binfo->fc_edtov = FF_DEF_EDTOV; + binfo->fc_ratov = FF_DEF_RATOV; + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_config_link(p_dev_ctl, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) + != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + binfo->fc_flag |= FC_DELAY_DISC; + } else { + /* Device Discovery completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0207, /* ptr to msg structure */ + fc_mes0207, /* ptr to msg */ + fc_msgBlk0207.msgPreambleStr); /* begin & end varargs */ + binfo->fc_ffstate = FC_ERROR; + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, + MEM_MBOX | MEM_PRI))) { + fc_clear_la(binfo, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) + != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + } + } + break; + + case ELS_CMD_PLOGI: + /* Cache entry in case we are in a + * LOGI collision. + */ + if ((ndlp == 0) && ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + (uint32)cmd->un.elsreq.remoteID)) == 0)) { + break; + } + + /* If we are in the middle of Discovery */ + if (ndlp->nlp_action & (NLP_DO_ADDR_AUTH | NLP_DO_DISC_START | NLP_DO_RSCN)) { + if((ndlp->nlp_state < NLP_LOGIN) && + !(ndlp->nlp_flag & NLP_REG_INP)) { + /* Goto next entry */ + fc_nextnode(p_dev_ctl, ndlp); + } + } + + ndlp->nlp_action &= ~NLP_DO_RNID; + ndlp->nlp_flag &= ~NLP_REQ_SND; + + if((ndlp->nlp_type & (NLP_AUTOMAP | NLP_SEED_MASK)) == 0) { + fc_freenode(binfo, ndlp, 1); + } + else { + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + break; + + case ELS_CMD_PRLI: + if ((ndlp == 0) && ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + (uint32)cmd->un.elsreq.remoteID)) == 0)) { + break; + } + + /* If we are in the middle of Discovery */ + if (ndlp->nlp_action & (NLP_DO_DISC_START | NLP_DO_RSCN)) { + /* Goto next entry */ + fc_nextnode(p_dev_ctl, ndlp); + } + ndlp->nlp_flag &= ~NLP_REQ_SND; + ndlp->nlp_state = NLP_LOGIN; + fc_nlp_unmap(binfo, ndlp); + break; + + case ELS_CMD_PDISC: + case ELS_CMD_ADISC: + if ((ndlp == 0) && ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + (uint32)cmd->un.elsreq.remoteID)) == 0)) { + break; + } + + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + + ndlp->nlp_action |= NLP_DO_DISC_START; + binfo->fc_nlp_cnt++; + fc_els_cmd(binfo, ELS_CMD_PLOGI, + (void *)((ulong)cmd->un.elsreq.remoteID), + (uint32)0, (ushort)0, ndlp); + break; + + case ELS_CMD_LOGO: + if ((ndlp == 0) && ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + (uint32)cmd->un.elsreq.remoteID)) == 0)) { + break; + } + + /* If we are in the middle of Discovery */ + if (ndlp->nlp_action & (NLP_DO_ADDR_AUTH | NLP_DO_DISC_START | NLP_DO_RSCN)) { + /* Goto next entry */ + fc_nextnode(p_dev_ctl, ndlp); + } + + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + break; + + case ELS_CMD_FARP: /* Farp-req */ + if (ndlp == 0) + break; + + ndlp->nlp_flag &= ~NLP_FARP_SND; + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + break; + + case ELS_CMD_FARPR: /* Farp-res */ + if (ndlp == 0) + break; + + ndlp->nlp_flag &= ~NLP_FARP_SND; + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + break; + + case ELS_CMD_SCR: /* State Change Registration */ + break; + + case ELS_CMD_RNID: /* Node Identification */ + break; + + default: + FCSTATCTR.elsCmdPktInval++; + + /* Unknown ELS command */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0111, /* ptr to msg structure */ + fc_mes0111, /* ptr to msg */ + fc_msgBlk0111.msgPreambleStr, /* begin varargs */ + command); /* end varargs */ + break; + } + } + else { + /* Retry in progress */ + if ((command == ELS_CMD_PLOGI) && + ((cmd->un.ulpWord[4] & 0xff) == IOERR_LOOP_OPEN_FAILURE)) { + if (ndlp->nlp_action & (NLP_DO_ADDR_AUTH | NLP_DO_DISC_START | NLP_DO_RSCN)) { + /* Goto next entry */ + fc_nextnode(p_dev_ctl, ndlp); + } + } + } + } else { + FCSTATCTR.elsXmitCmpl++; + + /* Process successful command completion */ + switch (command) { + case ELS_CMD_FLOGI: + /* FLOGI completes successfully */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0208, /* ptr to msg structure */ + fc_mes0208, /* ptr to msg */ + fc_msgBlk0208.msgPreambleStr, /* begin varargs */ + cmd->un.ulpWord[4], + sp->cmn.e_d_tov, + sp->cmn.w2.r_a_tov, + sp->cmn.edtovResolution); /* end varargs */ + if (ndlp) + ndlp->nlp_flag &= ~NLP_REQ_SND; + + /* register the login, REG_LOGIN */ + if (binfo->fc_ffstate == FC_FLOGI) { + /* If Common Service Parameters indicate Nport + * we are point to point, if Fport we are Fabric. + */ + if (sp->cmn.fPort) { + binfo->fc_flag |= FC_FABRIC; + if (sp->cmn.edtovResolution) { + /* E_D_TOV ticks are in nanoseconds */ + binfo->fc_edtov = (SWAP_DATA(sp->cmn.e_d_tov) + 999999) / 1000000; + } else { + /* E_D_TOV ticks are in milliseconds */ + binfo->fc_edtov = SWAP_DATA(sp->cmn.e_d_tov); + } + binfo->fc_ratov = (SWAP_DATA(sp->cmn.w2.r_a_tov) + 999) / 1000; + + if (binfo->fc_topology == TOPOLOGY_LOOP) { + binfo->fc_flag |= FC_PUBLIC_LOOP; + } else { + /* If we are a N-port connected to a Fabric, + * fixup sparam's so logins to devices on + * remote loops work. + */ + binfo->fc_sparam.cmn.altBbCredit = 1; + } + + binfo->fc_myDID = cmd->un.ulpWord[4] & Mask_DID; + + if ((ndlp == 0) && ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + (uint32)cmd->un.elsreq.remoteID)) == 0)) { + break; + } + ndlp->nlp_type |= NLP_FABRIC; + ndlp->nlp_flag &= ~NLP_REQ_SND; + + fc_nlp_logi(binfo, ndlp, + (NAME_TYPE *)&sp->portName, (NAME_TYPE *)&sp->nodeName); + + if ((mb=(MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_config_link(p_dev_ctl, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) + != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + + /* register the login with adapter */ + if (ndlp->nlp_Rpi == 0) { + fc_bcopy((void *)sp, (void *) & binfo->fc_fabparam, + sizeof(SERV_PARM)); + + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, + MEM_MBOX | MEM_PRI))) { + fc_reg_login(binfo, cmd->un.elsreq.remoteID, + (uchar * )sp, (MAILBOX * )mb, 0); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) + != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + } + + binfo->fc_flag |= FC_DELAY_DISC; + } else { + binfo->fc_flag &= ~(FC_FABRIC | FC_PUBLIC_LOOP); + binfo->fc_edtov = FF_DEF_EDTOV; + binfo->fc_ratov = FF_DEF_RATOV; + if ((rc = fc_geportname((NAME_TYPE * ) & binfo->fc_portname, + (NAME_TYPE * ) & sp->portName))) { + /* This side will initiate the PLOGI */ + binfo->fc_flag |= FC_PT2PT_PLOGI; + + /* N_Port ID cannot be 0, set our to LocalID the + * other side will be RemoteID. + */ + fc_freenode_did(binfo, 0, 1); + + /* not equal */ + if (rc == 1) + binfo->fc_myDID = PT2PT_LocalID; + rc = 0; + + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, + MEM_MBOX | MEM_PRI))) { + fc_config_link(p_dev_ctl, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) + != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, (uint32)binfo->fc_myDID)) == 0) { + if((ndlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP))) { + fc_bzero((void *)ndlp, sizeof(NODELIST)); + ndlp->sync = binfo->fc_sync; + ndlp->capabilities = binfo->fc_capabilities; + ndlp->nlp_DID = binfo->fc_myDID; + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + else + break; + } + ndlp->nlp_DID = binfo->fc_myDID; + fc_nlp_logi(binfo, ndlp, + (NAME_TYPE *)&sp->portName, (NAME_TYPE *)&sp->nodeName); + } else { + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, + MEM_MBOX | MEM_PRI))) { + fc_config_link(p_dev_ctl, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) + != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + } + binfo->fc_flag |= FC_PT2PT; + /* Use Fabric timer as pt2pt link up timer */ + binfo->fc_fabrictmo = (2 * binfo->fc_ratov) + + ((4 * binfo->fc_edtov) / 1000) + 1; + if(FABRICTMO) { + fc_clk_res(p_dev_ctl, binfo->fc_fabrictmo, FABRICTMO); + } + else { + FABRICTMO = fc_clk_set(p_dev_ctl, binfo->fc_fabrictmo, + fc_fabric_timeout, 0, 0); + } + fc_freenode_did(binfo, Fabric_DID, 1); + + /* This is Login at init, clear la */ + if ((mb=(MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + binfo->fc_ffstate = FC_CLEAR_LA; + fc_clear_la(binfo, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) + != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + } + } else { + FCSTATCTR.elsRcvDrop++; + fc_freenode_did(binfo, Fabric_DID, 1); + } + break; + + case ELS_CMD_PLOGI: + /* PLOGI completes successfully */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0112, /* ptr to msg structure */ + fc_mes0112, /* ptr to msg */ + fc_msgBlk0112.msgPreambleStr, /* begin varargs */ + cmd->un.elsreq.remoteID, + cmd->un.ulpWord[4], + cmd->un.ulpWord[5], + binfo->fc_ffstate); /* end varargs */ + if ((ndlp == 0) && ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + (uint32)cmd->un.elsreq.remoteID)) == 0)) { + break; + } + fc_nlp_logi(binfo, ndlp, + (NAME_TYPE *)&sp->portName, (NAME_TYPE *)&sp->nodeName); + + if (ndlp->nlp_DID != NameServer_DID) + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + + + ndlp->nlp_action &= ~NLP_DO_RNID; + + if (binfo->fc_flag & FC_PT2PT) { + /* Device Discovery completes */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0209, /* ptr to msg structure */ + fc_mes0209, /* ptr to msg */ + fc_msgBlk0209.msgPreambleStr); /* begin & end varargs */ + /* Fix up any changed RPIs in FCP IOCBs queued up a txq */ + fc_fcp_fix_txq(p_dev_ctl); + + binfo->fc_ffstate = FC_READY; + + binfo->fc_firstopen = 0; + if(FABRICTMO) { + fc_clk_can(p_dev_ctl, FABRICTMO); + FABRICTMO = 0; + } + ndlp->nlp_Rpi = 0; /* Keep the same rpi */ + } + + if (ndlp->nlp_Rpi) { + /* must explicitly unregister the login, UREG_LOGIN */ + /* This is so pending I/Os get returned with NO_RPI */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_unreg_login(binfo, ndlp->nlp_Rpi, (MAILBOX * )mb); + if (issue_mb_cmd(binfo,(MAILBOX * )mb,MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + binfo->fc_nlplookup[ndlp->nlp_Rpi] = 0; + ndlp->nlp_Rpi = 0; + } + + /* register the login, REG_LOGIN */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_reg_login(binfo, cmd->un.elsreq.remoteID, (uchar * )sp, + (MAILBOX * )mb, 0); + if (issue_mb_cmd(binfo,(MAILBOX * )mb,MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + + /* Fill in the FCP/IP class */ + { + clp = DD_CTL.p_config[binfo->fc_brd_no]; + if ( (clp[CFG_FCP_CLASS].a_current == CLASS2) && + (sp->cls2.classValid) ) { + ndlp->id.nlp_fcp_info |= CLASS2; + } else { + ndlp->id.nlp_fcp_info |= CLASS3; + } + + if ( (clp[CFG_IP_CLASS].a_current == CLASS2) && + (sp->cls2.classValid) ) { + ndlp->id.nlp_ip_info = CLASS2; + } else { + ndlp->id.nlp_ip_info = CLASS3; + } + } + + /* REG_LOGIN cmpl will goto nextnode */ + ndlp->nlp_flag &= ~NLP_REQ_SND; + ndlp->nlp_flag |= NLP_REG_INP; + break; + + case ELS_CMD_PRLI: + /* PRLI completes successfully */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0113, /* ptr to msg structure */ + fc_mes0113, /* ptr to msg */ + fc_msgBlk0113.msgPreambleStr, /* begin varargs */ + cmd->un.elsreq.remoteID, + cmd->un.ulpWord[4], + cmd->un.ulpWord[5], + binfo->fc_ffstate); /* end varargs */ + if ((ndlp == 0) && ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + cmd->un.elsreq.remoteID)) == 0)) + break; + + ndlp->nlp_flag &= ~NLP_REQ_SND; + + /* If we are in the middle of Discovery or in pt2pt mode */ + if ((ndlp->nlp_action & (NLP_DO_DISC_START | NLP_DO_RSCN)) || + (binfo->fc_flag & FC_PT2PT)) { + int index; + node_t * node_ptr; + PRLI * npr; + + npr = (PRLI * )sp; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + if ((npr->acceptRspCode == PRLI_REQ_EXECUTED) && + (npr->prliType == PRLI_FCP_TYPE) && + (npr->targetFunc == 1)) { + + if(clp[CFG_FCP_ON].a_current) { + if (!(fc_assign_scsid(p_dev_ctl, ndlp))) { + /* No more SCSI ids available */ + fc_nextnode(p_dev_ctl, ndlp); + ndlp->nlp_state = NLP_PRLI; + fc_nlp_unmap(binfo, ndlp); + ndlp->nlp_action &= ~NLP_DO_SCSICMD; + break; + } + + if ((node_ptr = (node_t * )ndlp->nlp_targetp) == NULL) { + index = INDEX(ndlp->id.nlp_pan, ndlp->id.nlp_sid); + node_ptr = binfo->device_queue_hash[index].node_ptr; + } + /* PRLI target assigned */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0210, /* ptr to msg structure */ + fc_mes0210, /* ptr to msg */ + fc_msgBlk0210.msgPreambleStr, /* begin varargs */ + cmd->un.ulpWord[5], /* did */ + ndlp->id.nlp_pan, + ndlp->id.nlp_sid); /* end varargs */ + /* Now check for FCP-2 support */ + if(node_ptr) { + if(npr->Retry && npr->TaskRetryIdReq) + node_ptr->flags |= FC_FCP2_RECOVERY; + else + node_ptr->flags &= ~FC_FCP2_RECOVERY; + } + + } + else { + goto prlierr; + } + + /* If PRLI is successful, we have a FCP target device */ + if (((PRLI * )sp)->Retry == 1) { + ndlp->id.nlp_fcp_info |= NLP_FCP_2_DEVICE; + } + ndlp->nlp_type |= NLP_FCP_TARGET; + if((ndlp->nlp_type & NLP_SEED_MASK) == 0) { + switch(p_dev_ctl->fcp_mapping) { + case FCP_SEED_DID: + ndlp->nlp_type |= NLP_SEED_DID; + break; + case FCP_SEED_WWPN: + ndlp->nlp_type |= NLP_SEED_WWPN; + break; + case FCP_SEED_WWNN: + default: + ndlp->nlp_type |= NLP_SEED_WWNN; + break; + } + if(clp[CFG_AUTOMAP].a_current) + ndlp->nlp_type |= NLP_AUTOMAP; + } + ndlp->nlp_state = NLP_ALLOC; + fc_nlp_map(binfo, ndlp); + + /* Fix up any changed RPIs in FCP IOCBs queued up a txq */ + fc_fcp_fix_txq(p_dev_ctl); + + fc_nextnode(p_dev_ctl, ndlp); + } else { +prlierr: + ndlp->nlp_state = NLP_LOGIN; + fc_nlp_unmap(binfo, ndlp); + fc_nextnode(p_dev_ctl, ndlp); + } + } + else { + PRLI * npr; + + npr = (PRLI * )sp; + if ((npr->acceptRspCode == PRLI_REQ_EXECUTED) && + (npr->prliType == PRLI_FCP_TYPE) && + (npr->targetFunc == 1)) { + if(ndlp->nlp_type & NLP_FCP_TARGET) { + ndlp->nlp_state = NLP_ALLOC; + fc_nlp_map(binfo, ndlp); + } + else { + ndlp->nlp_state = NLP_PRLI; + fc_nlp_unmap(binfo, ndlp); + } + } + else { + ndlp->nlp_state = NLP_LOGIN; + fc_nlp_unmap(binfo, ndlp); + } + } + + ndlp->nlp_action &= ~NLP_DO_SCSICMD; + break; + + case ELS_CMD_PRLO: + /* PRLO completes successfully */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0114, /* ptr to msg structure */ + fc_mes0114, /* ptr to msg */ + fc_msgBlk0114.msgPreambleStr, /* begin varargs */ + cmd->un.elsreq.remoteID, + cmd->un.ulpWord[4], + cmd->un.ulpWord[5], + binfo->fc_ffstate); /* end varargs */ + break; + + case ELS_CMD_LOGO: + /* LOGO completes successfully */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0115, /* ptr to msg structure */ + fc_mes0115, /* ptr to msg */ + fc_msgBlk0115.msgPreambleStr, /* begin varargs */ + cmd->un.elsreq.remoteID, + cmd->un.ulpWord[4], + cmd->un.ulpWord[5], + binfo->fc_ffstate); /* end varargs */ + if ((ndlp == 0) && ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + (uint32)cmd->un.elsreq.remoteID)) == 0)) { + break; + } + + /* If we are in the middle of Discovery */ + if (ndlp->nlp_action & (NLP_DO_ADDR_AUTH | NLP_DO_DISC_START | NLP_DO_RSCN)) { + /* Goto next entry */ + fc_nextnode(p_dev_ctl, ndlp); + } + + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + break; + + case ELS_CMD_PDISC: + /* PDISC completes successfully */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0116, /* ptr to msg structure */ + fc_mes0116, /* ptr to msg */ + fc_msgBlk0116.msgPreambleStr, /* begin varargs */ + cmd->un.elsreq.remoteID, + cmd->un.ulpWord[4], + cmd->un.ulpWord[5], + binfo->fc_ffstate); /* end varargs */ + if ((ndlp == 0) && ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + (uint32)cmd->un.elsreq.remoteID)) == 0)) { + break; + } + + /* If we are in the middle of Address Authentication */ + if (ndlp->nlp_action & (NLP_DO_ADDR_AUTH)) { + if (fc_chkpadisc(binfo, ndlp, &sp->nodeName, + &sp->portName) == 0) { + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + ndlp->nlp_action |= NLP_DO_DISC_START; + } + /* Goto next entry */ + fc_nextnode(p_dev_ctl, ndlp); + } + ndlp->nlp_flag &= ~NLP_REQ_SND_PDISC; + break; + + case ELS_CMD_ADISC: + /* ADISC completes successfully */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0117, /* ptr to msg structure */ + fc_mes0117, /* ptr to msg */ + fc_msgBlk0117.msgPreambleStr, /* begin varargs */ + cmd->un.elsreq.remoteID, + cmd->un.ulpWord[4], + cmd->un.ulpWord[5], + binfo->fc_ffstate); /* end varargs */ + if ((ndlp == 0) && ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + (uint32)cmd->un.elsreq.remoteID)) == 0)) { + break; + } + ndlp->nlp_flag &= ~NLP_REQ_SND_ADISC; + + /* If we are in the middle of Address Authentication */ + if (ndlp->nlp_action & (NLP_DO_ADDR_AUTH | NLP_DO_RSCN)) { + + ap = (ADISC * )sp; + if(fc_chkpadisc(binfo, ndlp, &ap->nodeName,&ap->portName) == 0) { + ndlp->nlp_action &= ~(NLP_DO_ADDR_AUTH | NLP_DO_DISC_START); + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + + + if((binfo->fc_flag & FC_RSCN_MODE) || + (binfo->fc_ffstate < FC_READY)) { + ndlp->nlp_DID = (uint32)cmd->un.elsreq.remoteID; + + + if(binfo->fc_flag & FC_RSCN_MODE) { + ndlp->nlp_action |= NLP_DO_RSCN; + binfo->fc_nlp_cnt--; + if (binfo->fc_nlp_cnt <= 0) { + binfo->fc_nlp_cnt = 0; + fc_nextrscn(p_dev_ctl, fc_max_els_sent); + } + } + else { + ndlp->nlp_action |= NLP_DO_DISC_START; + binfo->fc_nlp_cnt--; + if (binfo->fc_nlp_cnt <= 0) { + binfo->fc_nlp_cnt = 0; + fc_nextdisc(p_dev_ctl, fc_max_els_sent); + } + } + } + } + else { + fc_nextnode(p_dev_ctl, ndlp); + } + } + break; + + case ELS_CMD_FARP: + case ELS_CMD_FARPR: + /* FARP completes successfully */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0118, /* ptr to msg structure */ + fc_mes0118, /* ptr to msg */ + fc_msgBlk0118.msgPreambleStr, /* begin varargs */ + cmd->un.elsreq.remoteID, + cmd->un.ulpWord[4], + cmd->un.ulpWord[5], + command ); /* end varargs */ + ep = (ELS_PKT * )lp0; + if((ndlp = fc_findnode_wwpn(binfo, NLP_SEARCH_ALL, + &ep->un.farp.RportName)) == 0) + break; + + ndlp->nlp_flag &= ~NLP_FARP_SND; + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + break; + + case ELS_CMD_SCR: /* State Change Registration */ + /* SCR completes successfully */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0119, /* ptr to msg structure */ + fc_mes0119, /* ptr to msg */ + fc_msgBlk0119.msgPreambleStr, /* begin varargs */ + cmd->un.elsreq.remoteID, + cmd->un.ulpWord[4], + cmd->un.ulpWord[5], + binfo->fc_ffstate); /* end varargs */ + break; + + case ELS_CMD_RNID: /* Node Identification */ + /* RNID completes successfully */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0120, /* ptr to msg structure */ + fc_mes0120, /* ptr to msg */ + fc_msgBlk0120.msgPreambleStr, /* begin varargs */ + cmd->un.elsreq.remoteID, + cmd->un.ulpWord[4], + cmd->un.ulpWord[5], + binfo->fc_ffstate); /* end varargs */ + break; + + default: + FCSTATCTR.elsCmdPktInval++; + + /* Unknown ELS command completed */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0121, /* ptr to msg structure */ + fc_mes0121, /* ptr to msg */ + fc_msgBlk0121.msgPreambleStr, /* begin varargs */ + command); /* end varargs */ + break; + } + } + if (xmitiq->bpl) { + fc_mem_put(binfo, MEM_BPL, (uchar * )xmitiq->bpl); + } + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + fc_mem_put(binfo, MEM_BUF, (uchar * )rmp); + break; + + default: + FCSTATCTR.elsCmdIocbInval++; + + /* Unknown ELS IOCB */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0122, /* ptr to msg structure */ + fc_mes0122, /* ptr to msg */ + fc_msgBlk0122.msgPreambleStr, /* begin varargs */ + cmd->ulpCommand ); /* end varargs */ + +out2: + rc = EINVAL; + + if(xmitiq->bp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )xmitiq->bp); + } + if(xmitiq->info) { + fc_mem_put(binfo, MEM_BUF, (uchar * )xmitiq->info); + } + if(xmitiq->bpl) { + fc_mem_put(binfo, MEM_BPL, (uchar * )xmitiq->bpl); + } + + break; + } /* switch(cmd->ulpCommand) */ + + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + + return(rc); +} /* End handle_els_event */ + + +/**********************************************/ +/** handle_rcv_els_req **/ +/** **/ +/** Process an incoming ELS request **/ +/**********************************************/ +_static_ int +handle_rcv_els_req( +fc_dev_ctl_t *p_dev_ctl, +RING *rp, +IOCBQ *temp) +{ + IOCB * iocb; + FC_BRD_INFO * binfo; + uint32 * lp; + NODELIST * ndlp; + volatile SERV_PARM * sp; + NAME_TYPE * np; + ELS_PKT * ep; + MAILBOXQ * mb; + MATCHMAP * mp; + IOCBQ * saveq; + IOCBQ * iocbq; + uchar * bp; + uchar * bdeAddr; + iCfgParam * clp; + int i, cnt; + uint32 cmd; + uint32 did; + LS_RJT stat; + REG_WD30 wd30; + + iocb = &temp->iocb; + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + if (binfo->fc_flag & FC_SLI2) { + /* type of ELS cmd is first 32bit word in packet */ + mp = fc_getvaddr(p_dev_ctl, rp, + (uchar * )getPaddr(iocb->un.cont64[0].addrHigh, + iocb->un.cont64[0].addrLow)); + } else { + /* type of ELS cmd is first 32bit word in packet */ + mp = fc_getvaddr(p_dev_ctl, rp, (uchar * )((ulong)iocb->un.cont[0].bdeAddress)); + } + + if (mp == 0) { + + if (binfo->fc_flag & FC_SLI2) { + bdeAddr = (uchar *)getPaddr(iocb->un.cont64[0].addrHigh, + iocb->un.cont64[0].addrLow); + } + else { + bdeAddr = (uchar *)((ulong)iocb->un.cont[0].bdeAddress); + } + FCSTATCTR.elsRcvDrop++; + + goto out; + } + + bp = mp->virt; + lp = (uint32 * )bp; + cmd = *lp++; + + /* Received ELS command */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0123, /* ptr to msg structure */ + fc_mes0123, /* ptr to msg */ + fc_msgBlk0123.msgPreambleStr, /* begin varargs */ + cmd, + iocb->un.ulpWord[5], + iocb->ulpStatus, + binfo->fc_ffstate); /* end varargs */ + if ((iocb->ulpStatus) || + ((binfo->fc_ffstate <= FC_FLOGI) && + ((cmd != ELS_CMD_FLOGI) && (cmd != ELS_CMD_ADISC) && + (cmd != ELS_CMD_FAN)))) { + if ((iocb->ulpStatus == 0) && (cmd == ELS_CMD_PLOGI)) { + /* Do this for pt2pt as well, testing with miniport driver */ + + /* Reject this request because we are in process of discovery */ + stat.un.b.lsRjtRsvd0 = 0; + stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; + stat.un.b.lsRjtRsnCodeExp = LSEXP_NOTHING_MORE; + stat.un.b.vendorUnique = 0; + fc_els_rsp(binfo, ELS_CMD_LS_RJT, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)stat.un.lsRjtError, 0); + } + + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + + i = 1; + /* free resources associated with iocb and repost the ring buffers */ + if (!(binfo->fc_flag & FC_SLI2)) { + for (i = 1; i < (int)iocb->ulpBdeCount; i++) { + mp = fc_getvaddr(p_dev_ctl, rp, (uchar * )((ulong)iocb->un.cont[i].bdeAddress)); + if (mp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + } + } + } + fc_post_buffer(p_dev_ctl, rp, i); + /* Drop frame if there is an error */ + FCSTATCTR.elsRcvDrop++; + return(0); + } + + /* Special case RSCN cause 2 byte payload length field is variable */ + if ((cmd & ELS_CMD_MASK) == ELS_CMD_RSCN) { + /* Received RSCN command */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0211, /* ptr to msg structure */ + fc_mes0211, /* ptr to msg */ + fc_msgBlk0211.msgPreambleStr, /* begin varargs */ + binfo->fc_flag, + binfo->fc_defer_rscn.q_cnt, + binfo->fc_rscn.q_cnt, + binfo->fc_mbox_active ); /* end varargs */ + /* ACCEPT the rscn request */ + fc_els_rsp(binfo, ELS_CMD_ACC, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)(sizeof(uint32)), 0); + + if ((binfo->fc_flag & FC_RSCN_DISCOVERY) || + ((binfo->fc_flag & FC_RSCN_MODE) && !(binfo->fc_flag & FC_NSLOGI_TMR)) || + (binfo->fc_ffstate != FC_READY)) { + if(binfo->fc_defer_rscn.q_cnt > FC_MAX_HOLD_RSCN) { + binfo->fc_flag |= (FC_RSCN_DISCOVERY | FC_RSCN_MODE); + fc_flush_rscn_defer(p_dev_ctl); + goto dropit; + } + if(binfo->fc_flag & FC_RSCN_DISCOVERY) { + goto dropit; + } + else { + /* get an iocb buffer to copy entry into */ + if ((saveq = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB | MEM_PRI)) != NULL) { + fc_bcopy((uchar *)temp, (uchar *)saveq, sizeof(IOCBQ)); + if (binfo->fc_defer_rscn.q_first) { + /* queue command to end of list */ + ((IOCBQ * )binfo->fc_defer_rscn.q_last)->q = (uchar * )saveq; + binfo->fc_defer_rscn.q_last = (uchar * )saveq; + } else { + /* add command to empty list */ + binfo->fc_defer_rscn.q_first = (uchar * )saveq; + binfo->fc_defer_rscn.q_last = (uchar * )saveq; + } + saveq->q = NULL; + *((MATCHMAP **)&saveq->iocb) = mp; + binfo->fc_defer_rscn.q_cnt++; + binfo->fc_flag |= FC_RSCN_MODE; + if (!(binfo->fc_flag & FC_SLI2)) { + i = (int)iocb->ulpBdeCount; + } + else { + i = 1; + } + fc_post_buffer(p_dev_ctl, rp, i); + return(0); + } + else + goto dropit; + } + } + + /* Make sure all outstanding Mailbox cmds (reg/unreg login) are processed + * before processing RSCN. + */ + if (binfo->fc_mbox_active) { + /* get an iocb buffer to copy entry into */ + if ((saveq = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB | MEM_PRI)) != NULL) { + fc_bcopy((uchar *)temp, (uchar *)saveq, sizeof(IOCBQ)); + binfo->fc_flag |= (FC_DELAY_RSCN | FC_RSCN_MODE); + if (binfo->fc_rscn.q_first) { + /* queue command to end of list */ + ((IOCBQ * )binfo->fc_rscn.q_last)->q = (uchar * )saveq; + binfo->fc_rscn.q_last = (uchar * )saveq; + } else { + /* add command to empty list */ + binfo->fc_rscn.q_first = (uchar * )saveq; + binfo->fc_rscn.q_last = (uchar * )saveq; + } + + saveq->q = NULL; + *((MATCHMAP **)&saveq->iocb) = mp; + binfo->fc_rscn.q_cnt++; + if (!(binfo->fc_flag & FC_SLI2)) { + i = (int)iocb->ulpBdeCount; + } + else { + i = 1; + } + fc_post_buffer(p_dev_ctl, rp, i); + return(0); + } + else + goto dropit; + } + cmd &= ELS_CMD_MASK; + } + + switch (cmd) { + case ELS_CMD_PLOGI: + case ELS_CMD_FLOGI: + sp = (volatile SERV_PARM * )lp; + did = iocb->un.elsreq.remoteID; + if (cmd == ELS_CMD_FLOGI) { + FCSTATCTR.elsRcvFLOGI++; + if (binfo->fc_topology == TOPOLOGY_LOOP) { + /* We should never recieve a FLOGI in loop mode, ignore it */ + /* An FLOGI ELS command was received from DID in Loop Mode */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0124, /* ptr to msg structure */ + fc_mes0124, /* ptr to msg */ + fc_msgBlk0124.msgPreambleStr, /* begin varargs */ + cmd, + did); /* end varargs */ + break; + } + did = Fabric_DID; + if (fc_chksparm(binfo, sp, CLASS3)) { + /* For a FLOGI we accept, then if our portname is greater + * then the remote portname we initiate Nport login. + */ + int rc; + MAILBOX *tmpmb; + + rc = fc_geportname((NAME_TYPE * ) & binfo->fc_portname, + (NAME_TYPE * ) & sp->portName); + + if (rc == 2) { /* ourselves */ + /* It's ourselves, so we will just reset link */ + if ((tmpmb = (MAILBOX * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI)) == NULL) { + binfo->fc_ffstate = FC_ERROR; + return(1); + } + + binfo->fc_flag |= FC_SCSI_RLIP; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + /* Setup and issue mailbox INITIALIZE LINK command */ + fc_linkdown(p_dev_ctl); + fc_init_link(binfo, (MAILBOX * )tmpmb, clp[CFG_TOPOLOGY].a_current, clp[CFG_LINK_SPEED].a_current); + tmpmb->un.varInitLnk.lipsr_AL_PA = 0; + if (issue_mb_cmd(binfo, (MAILBOX * )tmpmb, MBX_NOWAIT) != MBX_BUSY) + fc_mem_put(binfo, MEM_MBOX, (uchar * )tmpmb); + break; + } + + if (p_dev_ctl->fc_waitflogi) { + if (p_dev_ctl->fc_waitflogi != (FCCLOCK *)1) + fc_clk_can(p_dev_ctl, p_dev_ctl->fc_waitflogi); + p_dev_ctl->fc_waitflogi = 0; + p_dev_ctl->power_up = 1; + fc_snd_flogi(p_dev_ctl, 0, 0); + } + + fc_els_rsp(binfo, ELS_CMD_ACC, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)sizeof(SERV_PARM), 0); + if (rc == 1) { /* greater than */ + binfo->fc_flag |= FC_PT2PT_PLOGI; + } + binfo->fc_flag |= FC_PT2PT; + /* Use Fabric timer as pt2pt link up timer */ + binfo->fc_fabrictmo = (2 * binfo->fc_ratov) + + ((4 * binfo->fc_edtov) / 1000) + 1; + if(FABRICTMO) { + fc_clk_res(p_dev_ctl, binfo->fc_fabrictmo, FABRICTMO); + } + else { + FABRICTMO = fc_clk_set(p_dev_ctl, binfo->fc_fabrictmo, + fc_fabric_timeout, 0, 0); + } + binfo->fc_flag &= ~(FC_FABRIC | FC_PUBLIC_LOOP); + } else { + /* Reject this request because invalid parameters */ + stat.un.b.lsRjtRsvd0 = 0; + stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; + stat.un.b.lsRjtRsnCodeExp = LSEXP_SPARM_OPTIONS; + stat.un.b.vendorUnique = 0; + fc_els_rsp(binfo, ELS_CMD_LS_RJT, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)stat.un.lsRjtError, + 0); + } + break; + } + FCSTATCTR.elsRcvPLOGI++; + + if (!(binfo->fc_flag & FC_PT2PT) && (binfo->fc_ffstate <= FC_FLOGI)) { + /* Reject this PLOGI because we are in rediscovery */ + stat.un.b.lsRjtRsvd0 = 0; + stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; + stat.un.b.lsRjtRsnCodeExp = LSEXP_NOTHING_MORE; + stat.un.b.vendorUnique = 0; + fc_els_rsp(binfo, ELS_CMD_LS_RJT, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)stat.un.lsRjtError, 0); + break; + } + + if(did == NameServer_DID) + break; + + if((did & Fabric_DID_MASK) != Fabric_DID_MASK) { + /* Check to see if an existing cached entry is bad */ + ndlp = fc_findnode_wwpn(binfo, NLP_SEARCH_ALL, (NAME_TYPE *)&sp->portName); + if (ndlp && ndlp->nlp_DID && (ndlp->nlp_DID != did)) { + /* Check for a FARP generated nlplist entry */ + if (ndlp->nlp_DID == Bcast_DID) + ndlp->nlp_DID = did; + else { + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + } + } + + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, did)) == 0) { + /* This is a new node so allocate an nlplist entry and accept + * the LOGI request. + */ + if((ndlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP))) { + fc_bzero((void *)ndlp, sizeof(NODELIST)); + ndlp->sync = binfo->fc_sync; + ndlp->capabilities = binfo->fc_capabilities; + ndlp->nlp_DID = did; + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + fc_nlp_logi(binfo, ndlp, + (NAME_TYPE *)&sp->portName, (NAME_TYPE *)&sp->nodeName); + } + else + break; + } + /* Received PLOGI command */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0125, /* ptr to msg structure */ + fc_mes0125, /* ptr to msg */ + fc_msgBlk0125.msgPreambleStr, /* begin varargs */ + ndlp->nlp_DID, + ndlp->nlp_state, + ndlp->nlp_flag, + ndlp->nlp_Rpi); /* end varargs */ + /* If we are pt2pt and this is the first PLOGI rcv'ed */ + if ((binfo->fc_flag & FC_PT2PT) && (binfo->fc_myDID == 0)) { + if(!(fc_chksparm(binfo, sp, CLASS3))) { + /* Reject this request because invalid parameters */ + stat.un.b.lsRjtRsvd0 = 0; + stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; + stat.un.b.lsRjtRsnCodeExp = LSEXP_SPARM_OPTIONS; + stat.un.b.vendorUnique = 0; + fc_els_rsp(binfo, ELS_CMD_LS_RJT, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)stat.un.lsRjtError, + ndlp); + break; + } + wd30.word = 0; + wd30.f.xri = iocb->ulpContext; + wd30.f.class = iocb->ulpClass; + + fc_freenode_did(binfo, 0, 1); + binfo->fc_myDID = iocb->un.ulpWord[4] & Mask_DID; + + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_config_link(p_dev_ctl, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) + != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, binfo->fc_myDID)) == 0) { + if((ndlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP))) { + fc_bzero((void *)ndlp, sizeof(NODELIST)); + ndlp->sync = binfo->fc_sync; + ndlp->capabilities = binfo->fc_capabilities; + ndlp->nlp_DID = binfo->fc_myDID; + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + } + if(ndlp) { + ndlp->nlp_DID = binfo->fc_myDID; + fc_nlp_logi(binfo, ndlp, &binfo->fc_portname, &binfo->fc_nodename); + if ((mb=(MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_reg_login(binfo, binfo->fc_myDID, + (uchar * ) & binfo->fc_sparam, (MAILBOX * )mb, 0); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) + != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + } + /* Device Discovery completes */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0212, /* ptr to msg structure */ + fc_mes0212, /* ptr to msg */ + fc_msgBlk0212.msgPreambleStr); /* begin & end varargs */ + binfo->fc_ffstate = FC_READY; + + binfo->fc_firstopen = 0; + if(FABRICTMO) { + fc_clk_can(p_dev_ctl, FABRICTMO); + FABRICTMO = 0; + } + + /* issue mailbox command to register login with the adapter */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_reg_login(binfo,did,(uchar * )sp, (MAILBOX * )mb, wd30.word); + if (issue_mb_cmd(binfo,(MAILBOX * )mb,MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + break; + } + + cnt = 1; + switch(ndlp->nlp_state) { + case NLP_PLOGI: + cnt = 0; + break; + + case NLP_LIMBO: + if (ndlp->nlp_flag & NLP_REQ_SND) { + cnt = 0; + break; + } + + case NLP_LOGOUT: + fc_nlp_logi(binfo, ndlp, + (NAME_TYPE *)&sp->portName, (NAME_TYPE *)&sp->nodeName); + + case NLP_LOGIN: + case NLP_PRLI: + case NLP_ALLOC: + ndlp->nlp_flag &= ~NLP_FARP_SND; + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + /* Keep the rpi we have and send ACC / LS_RJT */ + if (fc_chksparm(binfo, sp, CLASS3)) { + + if (ndlp->nlp_Rpi) { + fc_els_rsp(binfo, ELS_CMD_ACC, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)(sizeof(SERV_PARM)), ndlp); + break; + } + /* no rpi so we must reglogin */ + ndlp->nlp_flag |= NLP_RCV_PLOGI; + wd30.word = 0; + wd30.f.xri = iocb->ulpContext; + wd30.f.class = iocb->ulpClass; + /* issue mailbox command to register login with the adapter */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_reg_login(binfo,did,(uchar * )sp, (MAILBOX * )mb, wd30.word); + if (issue_mb_cmd(binfo,(MAILBOX * )mb,MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + } else { + /* Reject this request because invalid parameters */ + stat.un.b.lsRjtRsvd0 = 0; + stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; + stat.un.b.lsRjtRsnCodeExp = LSEXP_SPARM_OPTIONS; + stat.un.b.vendorUnique = 0; + fc_els_rsp(binfo, ELS_CMD_LS_RJT, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)stat.un.lsRjtError, + ndlp); + + if ((ndlp->nlp_state == NLP_ALLOC) && (binfo->fc_ffstate == FC_READY)) { + /* unregister existing login first */ + ndlp->nlp_flag |= NLP_UNREG_LOGO; + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + } + break; + } + + if(cnt) + break; + + + did = iocb->un.elsreq.remoteID; + + /* If a nlplist entry already exists, we potentially have + * a PLOGI collision. + */ + + if (!(ndlp->nlp_flag & NLP_REQ_SND)) { + /* In this case we are already logged in */ + ndlp->nlp_flag &= ~NLP_FARP_SND; + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + goto chkparm; + } + + FCSTATCTR.elsLogiCol++; + + /* For a PLOGI, we only accept if our portname is less + * than the remote portname. + */ + if (!(fc_geportname((NAME_TYPE * ) & binfo->fc_portname, + (NAME_TYPE * ) & sp->portName))) { +chkparm: + fc_nlp_logi(binfo, ndlp, + (NAME_TYPE *)&sp->portName, (NAME_TYPE *)&sp->nodeName); + if (fc_chksparm(binfo, sp, CLASS3)) { + /* PLOGI chkparm OK */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0126, /* ptr to msg structure */ + fc_mes0126, /* ptr to msg */ + fc_msgBlk0126.msgPreambleStr, /* begin varargs */ + ndlp->nlp_DID, + ndlp->nlp_state, + ndlp->nlp_flag, + ndlp->nlp_Rpi ); /* end varargs */ + if (ndlp->nlp_Rpi == 0) { + if (ndlp->nlp_flag & NLP_REQ_SND) { + /* Abort the current outstanding PLOGI */ + unsigned long iflag; + + iflag = lpfc_q_disable_lock(p_dev_ctl); + iocbq = (IOCBQ * )(rp->fc_txp.q_first); + while (iocbq) { + if(iocbq->iocb.un.elsreq.remoteID == ndlp->nlp_DID) { + iocbq->retry = 0xff; + } + iocbq = (IOCBQ * )iocbq->q; + } + lpfc_q_unlock_enable(p_dev_ctl, iflag); + /* In case its on fc_delay_timeout list */ + fc_abort_delay_els_cmd(p_dev_ctl, ndlp->nlp_DID); + + ndlp->nlp_flag &= ~NLP_REQ_SND; + /* The following reg_login acts as if original PLOGI cmpl */ + } + else + ndlp->nlp_flag |= NLP_RCV_PLOGI; + + wd30.word = 0; + wd30.f.xri = iocb->ulpContext; + wd30.f.class = iocb->ulpClass; + ndlp->nlp_flag |= NLP_REG_INP; + + /* issue mailbox command to register login with the adapter */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_reg_login(binfo, did, (uchar * )sp, (MAILBOX * )mb, + wd30.word); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) + != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + } else { + fc_els_rsp(binfo, ELS_CMD_ACC, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)(sizeof(SERV_PARM)), ndlp); + } + } else { + /* Reject this request because invalid parameters */ + stat.un.b.lsRjtRsvd0 = 0; + stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; + stat.un.b.lsRjtRsnCodeExp = LSEXP_SPARM_OPTIONS; + stat.un.b.vendorUnique = 0; + fc_els_rsp(binfo, ELS_CMD_LS_RJT, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)stat.un.lsRjtError, + ndlp); + + if (binfo->fc_ffstate == FC_READY) { + /* unregister existing login first */ + ndlp->nlp_flag |= NLP_UNREG_LOGO; + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + } + } else { + /* Reject this request because the remote node will accept ours */ + stat.un.b.lsRjtRsvd0 = 0; + stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; + stat.un.b.lsRjtRsnCodeExp = LSEXP_CMD_IN_PROGRESS; + stat.un.b.vendorUnique = 0; + fc_els_rsp(binfo, ELS_CMD_LS_RJT, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)stat.un.lsRjtError, ndlp); + } + break; + + case ELS_CMD_LOGO: + FCSTATCTR.elsRcvLOGO++; + goto skip1; + case ELS_CMD_PRLO: + FCSTATCTR.elsRcvPRLO++; +skip1: + lp++; /* lp now points to portname */ + np = (NAME_TYPE * )lp; + did = iocb->un.elsreq.remoteID; + + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, did)) == 0) { + if(((ndlp = fc_findnode_wwpn(binfo, NLP_SEARCH_ALL, np)) == 0) || + (ndlp->nlp_DID == 0)) + /* ACCEPT the logout request */ + fc_els_rsp(binfo, ELS_CMD_ACC, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)(sizeof(uint32)), 0); + break; + } + + + if (ndlp) { + if((ndlp->nlp_state >= NLP_LOGIN) || + ((!(ndlp->nlp_flag & (NLP_FARP_SND | NLP_RM_ENTRY))) && + (!(ndlp->nlp_action & (NLP_DO_ADDR_AUTH | NLP_DO_DISC_START | NLP_DO_RSCN))))) { + /* ACCEPT the logout request */ + unsigned long iflag; + + fc_els_rsp(binfo, ELS_CMD_ACC, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)(sizeof(uint32)), ndlp); + ndlp->nlp_flag &= ~NLP_REQ_SND; + ndlp->nlp_flag |= NLP_RM_ENTRY; + + iflag = lpfc_q_disable_lock(p_dev_ctl); + iocbq = (IOCBQ * )(rp->fc_txp.q_first); + while (iocbq) { + if(iocbq->iocb.un.elsreq.remoteID == ndlp->nlp_DID) { + if(ndlp->nlp_action & (NLP_DO_ADDR_AUTH | NLP_DO_DISC_START | NLP_DO_RSCN)) { + ndlp->nlp_flag &= ~(NLP_REQ_SND_ADISC | NLP_REQ_SND_PDISC | NLP_REQ_SND); + } + iocbq->retry = 0xff; + if((binfo->fc_flag & FC_RSCN_MODE) || + (binfo->fc_ffstate < FC_READY)) { + if((ndlp->nlp_state >= NLP_PLOGI) && + (ndlp->nlp_state <= NLP_ALLOC)) { + binfo->fc_nlp_cnt--; + } + if (binfo->fc_nlp_cnt <= 0) { + binfo->fc_nlp_cnt = 0; + } + } + } + iocbq = (IOCBQ * )iocbq->q; + } + lpfc_q_unlock_enable(p_dev_ctl, iflag); + /* In case its on fc_delay_timeout list */ + fc_abort_delay_els_cmd(p_dev_ctl, ndlp->nlp_DID); + + if ((ndlp->nlp_type & NLP_FCP_TARGET) && + (ndlp->nlp_state >= NLP_LOGIN)) { + ndlp->nlp_flag |= NLP_SND_PLOGI; + } + if (ndlp->nlp_action & (NLP_DO_ADDR_AUTH | NLP_DO_DISC_START | NLP_DO_RSCN)) { + fc_nextnode(p_dev_ctl, ndlp); + } + } + else { + /* ACCEPT the logout request */ + fc_els_rsp(binfo, ELS_CMD_ACC, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)(sizeof(uint32)), 0); + } + } + else { + /* ACCEPT the logout request */ + fc_els_rsp(binfo, ELS_CMD_ACC, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)(sizeof(uint32)), 0); + } + break; + + case ELS_CMD_FAN: + FCSTATCTR.elsRcvFAN++; + /* FAN received */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0213, /* ptr to msg structure */ + fc_mes0213, /* ptr to msg */ + fc_msgBlk0213.msgPreambleStr, /* begin varargs */ + iocb->un.ulpWord[4], + binfo->fc_ffstate); /* end varargs */ + /* Check to see if we were waiting for FAN */ + if ((binfo->fc_ffstate != FC_FLOGI) || + (binfo->fc_topology != TOPOLOGY_LOOP) || + (!(binfo->fc_flag & FC_PUBLIC_LOOP))) + break; + + ep = (ELS_PKT * )bp; + + /* Check to make sure we haven't switched fabrics */ + if ((fc_geportname((NAME_TYPE * ) & ep->un.fan.FportName, + (NAME_TYPE * ) & binfo->fc_fabparam.portName) != 2) || + (fc_geportname((NAME_TYPE * ) & ep->un.fan.FnodeName, + (NAME_TYPE * ) & binfo->fc_fabparam.nodeName) != 2)) { + /* We switched, so we need to FLOGI again after timeout */ + break; + } + + if(FABRICTMO) { + fc_clk_can(p_dev_ctl, FABRICTMO); + FABRICTMO = 0; + } + + binfo->fc_myDID = iocb->un.ulpWord[4] & Mask_DID; + + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, Fabric_DID)) == 0) { + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, (uint32)iocb->un.elsreq.remoteID)) == 0) { + break; + } + fc_nlp_logi(binfo, ndlp, &ep->un.fan.FportName, &ep->un.fan.FnodeName); + } + ndlp->nlp_type |= NLP_FABRIC; + + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_config_link(p_dev_ctl, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + + /* register the login with adapter */ + if (ndlp->nlp_Rpi == 0) { + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_reg_login(binfo, iocb->un.elsreq.remoteID, + (uchar * ) & binfo->fc_fabparam, (MAILBOX * )mb, 0); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + } + + /* Since this is a FAN, we don't need to do any discovery stuff */ + fc_fanovery(p_dev_ctl); + break; + + case ELS_CMD_RSCN: + FCSTATCTR.elsRcvRSCN++; + fc_process_rscn(p_dev_ctl, temp, mp); + break; + + case ELS_CMD_ADISC: + FCSTATCTR.elsRcvADISC++; + ep = (ELS_PKT * )bp; + did = iocb->un.elsreq.remoteID; + if (((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, did)) != 0) && + (ndlp->nlp_state >= NLP_LOGIN)) { + if (fc_chkpadisc(binfo, ndlp, &ep->un.adisc.nodeName, + &ep->un.adisc.portName)) { + fc_els_rsp(binfo, ELS_CMD_ADISC, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)sizeof(SERV_PARM), + ndlp); + } else { + /* Reject this request because invalid parameters */ + stat.un.b.lsRjtRsvd0 = 0; + stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; + stat.un.b.lsRjtRsnCodeExp = LSEXP_SPARM_OPTIONS; + stat.un.b.vendorUnique = 0; + fc_els_rsp(binfo, ELS_CMD_LS_RJT, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)stat.un.lsRjtError, + ndlp); + if (!(ndlp->nlp_flag & NLP_REQ_SND)) { + ndlp->nlp_flag |= NLP_UNREG_LOGO; + fc_freenode_did(binfo, did, 0); + } + } + } else { + /* Reject this request because not logged in */ + stat.un.b.lsRjtRsvd0 = 0; + stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; + stat.un.b.lsRjtRsnCodeExp = LSEXP_CANT_GIVE_DATA; + stat.un.b.vendorUnique = 0; + fc_els_rsp(binfo, ELS_CMD_LS_RJT, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)stat.un.lsRjtError, ndlp); + if ((ndlp == 0) || (!(ndlp->nlp_flag & NLP_REQ_SND))) + fc_freenode_did(binfo, did, 0); + } + break; + + case ELS_CMD_PDISC: + FCSTATCTR.elsRcvPDISC++; + sp = (volatile SERV_PARM * )lp; + did = iocb->un.elsreq.remoteID; + if (((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, did)) != 0) && + (ndlp->nlp_state >= NLP_LOGIN)) { + if (fc_chkpadisc(binfo, ndlp, &sp->nodeName, &sp->portName)) { + fc_els_rsp(binfo, ELS_CMD_ACC, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)sizeof(SERV_PARM), + ndlp); + } else { + /* Reject this request because invalid parameters */ + stat.un.b.lsRjtRsvd0 = 0; + stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; + stat.un.b.lsRjtRsnCodeExp = LSEXP_SPARM_OPTIONS; + stat.un.b.vendorUnique = 0; + fc_els_rsp(binfo, ELS_CMD_LS_RJT, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)stat.un.lsRjtError, + ndlp); + if (!(ndlp->nlp_flag & NLP_REQ_SND)) { + ndlp->nlp_flag |= NLP_UNREG_LOGO; + fc_freenode_did(binfo, did, 0); + } + } + } else { + /* Reject this request because not logged in */ + stat.un.b.lsRjtRsvd0 = 0; + stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; + stat.un.b.lsRjtRsnCodeExp = LSEXP_CANT_GIVE_DATA; + stat.un.b.vendorUnique = 0; + fc_els_rsp(binfo, ELS_CMD_LS_RJT, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)stat.un.lsRjtError, ndlp); + if ((ndlp == 0) || (!(ndlp->nlp_flag & NLP_REQ_SND))) + fc_freenode_did(binfo, did, 0); + } + break; + + case ELS_CMD_FARPR: + FCSTATCTR.elsRcvFARPR++; + ep = (ELS_PKT * )bp; + did = iocb->un.elsreq.remoteID; + /* FARP-RSP received from DID */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0600, /* ptr to msg structure */ + fc_mes0600, /* ptr to msg */ + fc_msgBlk0600.msgPreambleStr, /* begin varargs */ + did ); /* end varargs */ + /* ACCEPT the Farp resp request */ + fc_els_rsp(binfo, ELS_CMD_ACC, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)(sizeof(uint32)), 0); + break; + + case ELS_CMD_FARP: + FCSTATCTR.elsRcvFARP++; + ep = (ELS_PKT * )bp; + did = iocb->un.elsreq.remoteID; + /* FARP-REQ received from DID */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0601, /* ptr to msg structure */ + fc_mes0601, /* ptr to msg */ + fc_msgBlk0601.msgPreambleStr, /* begin varargs */ + did ); /* end varargs */ + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, did)) == 0) { + if((ndlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP))) { + fc_bzero((void *)ndlp, sizeof(NODELIST)); + ndlp->sync = binfo->fc_sync; + ndlp->capabilities = binfo->fc_capabilities; + ndlp->nlp_DID = did; + fc_nlp_logi(binfo,ndlp, &ep->un.farp.OportName, &ep->un.farp.OnodeName); + ndlp->nlp_state = NLP_LIMBO; + } + else + break; + } + + /* We will only support match on WWPN or WWNN */ + if (ep->un.farp.Mflags & ~(FARP_MATCH_NODE | FARP_MATCH_PORT)) + break; + + cnt = 0; + /* If this FARP command is searching for my portname */ + if (ep->un.farp.Mflags & FARP_MATCH_PORT) { + if (fc_geportname(&ep->un.farp.RportName, &binfo->fc_portname) == 2) + cnt = 1; + else + cnt = 0; + } + + /* If this FARP command is searching for my nodename */ + if (ep->un.farp.Mflags & FARP_MATCH_NODE) { + if (fc_geportname(&ep->un.farp.RnodeName, &binfo->fc_nodename) == 2) + cnt = 1; + else + cnt = 0; + } + + if (cnt) { + if (!(binfo->fc_flag & FC_LNK_DOWN) && + (binfo->fc_ffstate >= rp->fc_xmitstate) && + !(ndlp->nlp_flag & NLP_REQ_SND) && + !(ndlp->nlp_action & NLP_DO_ADDR_AUTH)) { + /* We need to re-login to that node */ + if ((ep->un.farp.Rflags & FARP_REQUEST_PLOGI) && + !(ndlp->nlp_flag & NLP_REQ_SND)) { + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + fc_els_cmd(binfo, ELS_CMD_PLOGI, (void *)((ulong)ndlp->nlp_DID), + (uint32)0, (ushort)0, ndlp); + } + + /* We need to send FARP response to that node */ + if (ep->un.farp.Rflags & FARP_REQUEST_FARPR) { + fc_els_cmd(binfo, ELS_CMD_FARPR, (void *)((ulong)ndlp->nlp_DID), + (uint32)0, (ushort)0, ndlp); + } + } + } + break; + + case ELS_CMD_RRQ: + FCSTATCTR.elsRcvRRQ++; + ep = (ELS_PKT * )bp; + /* Get oxid / rxid from payload and internally abort it */ + if ((ep->un.rrq.SID == SWAP_DATA(binfo->fc_myDID))) { + fc_abort_ixri_cx(binfo, ep->un.rrq.Oxid, CMD_CLOSE_XRI_CX, rp); + } else { + fc_abort_ixri_cx(binfo, ep->un.rrq.Rxid, CMD_CLOSE_XRI_CX, rp); + } + /* ACCEPT the rrq request */ + fc_els_rsp(binfo, ELS_CMD_ACC, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)(sizeof(uint32)), 0); + break; + + case ELS_CMD_PRLI: + /* ACCEPT the prli request */ + did = iocb->un.elsreq.remoteID; + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, did))) { + fc_els_rsp(binfo, ELS_CMD_PRLI, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)(sizeof(uint32)), ndlp); + } + else { + stat.un.b.lsRjtRsvd0 = 0; + stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; + stat.un.b.lsRjtRsnCodeExp = LSEXP_CANT_GIVE_DATA; + stat.un.b.vendorUnique = 0; + fc_els_rsp(binfo, ELS_CMD_LS_RJT, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)stat.un.lsRjtError, 0); + } + break; + + case ELS_CMD_RNID: + did = iocb->un.elsreq.remoteID; + ep = (ELS_PKT * )bp; + switch(ep->un.rnid.Format) { + case 0: + case RNID_TOPOLOGY_DISC: + fc_els_rsp(binfo, ELS_CMD_RNID, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)ep->un.rnid.Format, 0); + break; + default: + /* Reject this request because format not supported */ + stat.un.b.lsRjtRsvd0 = 0; + stat.un.b.lsRjtRsnCode = LSRJT_UNABLE_TPC; + stat.un.b.lsRjtRsnCodeExp = LSEXP_CANT_GIVE_DATA; + stat.un.b.vendorUnique = 0; + fc_els_rsp(binfo, ELS_CMD_LS_RJT, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)stat.un.lsRjtError, 0); + } + break; + + default: + /* Unsupported ELS command, reject */ + stat.un.b.lsRjtRsvd0 = 0; + stat.un.b.lsRjtRsnCode = LSRJT_CMD_UNSUPPORTED; + stat.un.b.lsRjtRsnCodeExp = LSEXP_NOTHING_MORE; + stat.un.b.vendorUnique = 0; + fc_els_rsp(binfo, ELS_CMD_LS_RJT, (uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)0, (uint32)stat.un.lsRjtError, 0); + FCSTATCTR.elsCmdPktInval++; + + did = iocb->un.elsreq.remoteID; + /* Unknown ELS command received from NPORT */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0127, /* ptr to msg structure */ + fc_mes0127, /* ptr to msg */ + fc_msgBlk0127.msgPreambleStr, /* begin varargs */ + cmd, + did); /* end varargs */ + break; + } + +dropit: + + FCSTATCTR.elsRcvFrame++; + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + +out: + + i = 1; + /* free resources associated with this iocb and repost the ring buffers */ + if (!(binfo->fc_flag & FC_SLI2)) { + for (i = 1; i < (int)iocb->ulpBdeCount; i++) { + mp = fc_getvaddr(p_dev_ctl, rp, (uchar * )((ulong)iocb->un.cont[i].bdeAddress)); + if (mp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + } + } + } + + fc_post_buffer(p_dev_ctl, rp, i); + + return(1); +} /* End handle_rcv_els_req */ + + +/***************************************/ +/** fc_process_rscn Process ELS **/ +/** RSCN command **/ +/***************************************/ +_static_ int +fc_process_rscn( +fc_dev_ctl_t *p_dev_ctl, +IOCBQ *temp, +MATCHMAP *mp) +{ + FC_BRD_INFO * binfo; + IOCB * iocb; + uchar * bp; + uint32 * lp; + D_ID rdid; + uint32 cmd; + int i, j, cnt; + + binfo = &BINFO; + iocb = &temp->iocb; + bp = mp->virt; + lp = (uint32 * )bp; + cmd = *lp++; + i = SWAP_DATA(cmd) & 0xffff; /* payload length */ + i -= sizeof(uint32); /* take off word 0 */ + cmd &= ELS_CMD_MASK; + + /* RSCN received */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0214, /* ptr to msg structure */ + fc_mes0214, /* ptr to msg */ + fc_msgBlk0214.msgPreambleStr, /* begin varargs */ + binfo->fc_flag, + i, + *lp, + binfo->fc_rscn_id_cnt); /* end varargs */ + cnt = 0; /* cnt will determine if we need to access NameServer */ + + /* Loop through all DIDs in the payload */ + binfo->fc_flag |= FC_RSCN_MODE; + + while (i) { + rdid.un.word = *lp++; + rdid.un.word = SWAP_DATA(rdid.un.word); + if(binfo->fc_rscn_id_cnt < FC_MAX_HOLD_RSCN) { + for(j=0;jfc_rscn_id_cnt;j++) { + if(binfo->fc_rscn_id_list[j] == rdid.un.word) { + goto skip_id; + } + } + binfo->fc_rscn_id_list[binfo->fc_rscn_id_cnt++] = rdid.un.word; + } + else { + binfo->fc_flag |= FC_RSCN_DISCOVERY; + fc_flush_rscn_defer(p_dev_ctl); + cnt = 0; + break; + } +skip_id: + cnt += (fc_handle_rscn(p_dev_ctl, &rdid)); + i -= sizeof(uint32); + } + + /* RSCN processed */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0215, /* ptr to msg structure */ + fc_mes0215, /* ptr to msg */ + fc_msgBlk0215.msgPreambleStr, /* begin varargs */ + binfo->fc_flag, + cnt, + binfo->fc_rscn_id_cnt, + binfo->fc_ffstate ); /* end varargs */ + if (cnt == 0) { + /* no need for nameserver login */ + fc_nextrscn(p_dev_ctl, fc_max_els_sent); + } + else { + if(!(binfo->fc_flag & FC_NSLOGI_TMR)) + fc_clk_set(p_dev_ctl, 1, fc_issue_ns_query, 0, 0); + binfo->fc_flag |= FC_NSLOGI_TMR; + } + return(0); +} + + +/***************************************/ +/** fc_handle_rscn Handle ELS **/ +/** RSCN command **/ +/***************************************/ +_static_ int +fc_handle_rscn( +fc_dev_ctl_t *p_dev_ctl, +D_ID *didp) +{ + FC_BRD_INFO * binfo; + NODELIST * ndlp; + NODELIST * new_ndlp; + NODELIST * callnextnode; + iCfgParam * clp; + D_ID did; + int change; + int numchange; + int ns; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + callnextnode = 0; + + dfc_hba_put_event(p_dev_ctl, HBA_EVENT_RSCN, binfo->fc_myDID, didp->un.word, 0, 0); + dfc_put_event(p_dev_ctl, FC_REG_RSCN_EVENT, didp->un.word, 0, 0); + + /* Is this an RSCN for me? */ + if (didp->un.word == binfo->fc_myDID) + return(0); + + /* Always query nameserver on RSCN (zoning) if CFG_ZONE_RSCN it set */ + ns = (int)clp[CFG_ZONE_RSCN].a_current; + numchange = 0; + + ndlp = binfo->fc_nlpbind_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + new_ndlp = 0; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + new_ndlp = (NODELIST *)ndlp->nlp_listp_next; + + /* Skip over FABRIC nodes and myself */ + if ((ndlp->nlp_DID == binfo->fc_myDID) || + (ndlp->nlp_type & NLP_FABRIC)) { + + ndlp = new_ndlp; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + continue; + } + + did.un.word = ndlp->nlp_DID; + change = 0; + + switch (didp->un.b.resv) { + case 0: /* Single N_Port ID effected */ + if (did.un.word == didp->un.word) { + change = 1; + } + break; + + case 1: /* Whole N_Port Area effected */ + if ((did.un.b.domain == didp->un.b.domain) && + (did.un.b.area == didp->un.b.area)) { + ns = 1; + change = 1; + } + break; + + case 2: /* Whole N_Port Domain effected */ + if (did.un.b.domain == didp->un.b.domain) { + ns = 1; + change = 1; + } + break; + + case 3: /* Whole Fabric effected */ + binfo->fc_flag |= FC_RSCN_DISCOVERY; + fc_flush_rscn_defer(p_dev_ctl); + return(0); + + default: + /* Unknown Identifier in RSCN payload */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0216, /* ptr to msg structure */ + fc_mes0216, /* ptr to msg */ + fc_msgBlk0216.msgPreambleStr, /* begin varargs */ + didp->un.word ); /* end varargs */ + break; + + } + + if (change) { + numchange++; + if((ndlp->nlp_state == NLP_ALLOC) || + (ndlp->nlp_state == NLP_LOGIN)) { + + if (ndlp->nlp_flag & NLP_REQ_SND) { + RING * rp; + IOCBQ * iocbq; + unsigned long iflag; + + /* Look through ELS ring and remove any ELS cmds in progress */ + iflag = lpfc_q_disable_lock(p_dev_ctl); + rp = &binfo->fc_ring[FC_ELS_RING]; + iocbq = (IOCBQ * )(rp->fc_txp.q_first); + while (iocbq) { + if (iocbq->iocb.un.elsreq.remoteID == ndlp->nlp_DID) { + iocbq->retry = 0xff; /* Mark for abort */ + } + iocbq = (IOCBQ * )iocbq->q; + } + lpfc_q_unlock_enable(p_dev_ctl, iflag); + /* In case its on fc_delay_timeout list */ + fc_abort_delay_els_cmd(p_dev_ctl, ndlp->nlp_DID); + + ndlp->nlp_flag &= ~NLP_REQ_SND; + } + + /* We are always using ADISC for RSCN validation */ + /* IF we are using ADISC, leave ndlp on mapped or unmapped q */ + + ndlp->nlp_flag &= ~NLP_NODEV_TMO; + + /* Mark node for authentication */ + ndlp->nlp_action |= NLP_DO_RSCN; + + } else { + + if (ndlp->nlp_flag & NLP_REQ_SND) { + if((callnextnode == 0) && (ndlp->nlp_action & NLP_DO_RSCN)) + callnextnode = ndlp; + } + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_flag &= ~NLP_NODEV_TMO; + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + + /* Mark node for authentication */ + ndlp->nlp_action |= NLP_DO_RSCN; + } + } + ndlp = new_ndlp; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + + /* If nothing in our node table is effected, + * we need to goto the Nameserver. + */ + if (numchange == 0) { + /* Is this a single N_Port that wasn't in our table */ + if (didp->un.b.resv == 0) { + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, didp->un.word)) == 0) { + if((ndlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP))) { + fc_bzero((void *)ndlp, sizeof(NODELIST)); + ndlp->sync = binfo->fc_sync; + ndlp->capabilities = binfo->fc_capabilities; + ndlp->nlp_DID = didp->un.word; + } + else + return(ns); + } + ndlp->nlp_action |= NLP_DO_RSCN; + ndlp->nlp_flag &= ~NLP_NODEV_TMO; + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + else { + ns = 1; + } + } + + /* Is this an area or domain N_Port */ + if (didp->un.b.resv != 0) { + ns = 1; + } + + if((ns == 0) && (callnextnode)) + fc_nextnode(p_dev_ctl, callnextnode); + + /* Tell calling routine if NameServer access is required + * and return number of nodes presently being authenticated. + */ + return(ns); +} /* End fc_handle_rscn */ + + +/*************************************************/ +/** fc_chksparm Check service parameters **/ +/*************************************************/ +_local_ int +fc_chksparm( +FC_BRD_INFO *binfo, +volatile SERV_PARM *sp, +uint32 class) +{ + volatile SERV_PARM *hsp; + + hsp = &binfo->fc_sparam; + /* First check for supported version */ + + /* Next check for class validity */ + if (sp->cls1.classValid) { + if (sp->cls1.rcvDataSizeMsb > hsp->cls1.rcvDataSizeMsb) + sp->cls1.rcvDataSizeMsb = hsp->cls1.rcvDataSizeMsb; + if (sp->cls1.rcvDataSizeLsb > hsp->cls1.rcvDataSizeLsb) + sp->cls1.rcvDataSizeLsb = hsp->cls1.rcvDataSizeLsb; + } else if (class == CLASS1) { + return(0); + } + + if (sp->cls2.classValid) { + if (sp->cls2.rcvDataSizeMsb > hsp->cls2.rcvDataSizeMsb) + sp->cls2.rcvDataSizeMsb = hsp->cls2.rcvDataSizeMsb; + if (sp->cls2.rcvDataSizeLsb > hsp->cls2.rcvDataSizeLsb) + sp->cls2.rcvDataSizeLsb = hsp->cls2.rcvDataSizeLsb; + } else if (class == CLASS2) { + return(0); + } + + if (sp->cls3.classValid) { + if (sp->cls3.rcvDataSizeMsb > hsp->cls3.rcvDataSizeMsb) + sp->cls3.rcvDataSizeMsb = hsp->cls3.rcvDataSizeMsb; + if (sp->cls3.rcvDataSizeLsb > hsp->cls3.rcvDataSizeLsb) + sp->cls3.rcvDataSizeLsb = hsp->cls3.rcvDataSizeLsb; + } else if (class == CLASS3) { + return(0); + } + + if (sp->cmn.bbRcvSizeMsb > hsp->cmn.bbRcvSizeMsb) + sp->cmn.bbRcvSizeMsb = hsp->cmn.bbRcvSizeMsb; + if (sp->cmn.bbRcvSizeLsb > hsp->cmn.bbRcvSizeLsb) + sp->cmn.bbRcvSizeLsb = hsp->cmn.bbRcvSizeLsb; + + return(1); +} /* End fc_chksparm */ + + +/***************************************/ +/** fc_chkpadisc Check **/ +/** P/ADISC parameters **/ +/***************************************/ +_static_ int +fc_chkpadisc( +FC_BRD_INFO *binfo, +NODELIST *ndlp, +volatile NAME_TYPE *nn, +volatile NAME_TYPE *pn) +{ + if (fc_geportname((NAME_TYPE * )nn, &ndlp->nlp_nodename) != 2) { + return(0); + } + + if (fc_geportname((NAME_TYPE * )pn, &ndlp->nlp_portname) != 2) { + return(0); + } + + return(1); +} /* End fc_chkpadisc */ + + +/***************************************/ +/** fc_els_cmd Issue an **/ +/** ELS command **/ +/***************************************/ +_static_ int +fc_els_cmd( +FC_BRD_INFO *binfo, +uint32 elscmd, +void *arg, +uint32 retry, +ushort iotag, +NODELIST *ndlp) +{ + IOCB * icmd; + IOCBQ * temp; + RING * rp; + uchar * bp; + ULP_BDE64 * bpl; + MATCHMAP * mp, * rmp, * bmp; + MAILBOXQ * mb; + iCfgParam * clp; + union { + SERV_PARM * sp; + ADISC * ap; + FARP * fp; + fc_vpd_t * vpd; + PRLI * npr; + } un; + uint32 * lp; + ushort size; + ulong setdelay; + fc_dev_ctl_t * p_dev_ctl; + + clp = DD_CTL.p_config[binfo->fc_brd_no]; + rp = &binfo->fc_ring[FC_ELS_RING]; + p_dev_ctl = (fc_dev_ctl_t *)(binfo->fc_p_dev_ctl); + + if ((elscmd == ELS_CMD_LOGO) && (iotag == 0)) { + /* First do unreglogin for did before sending ELS LOGO request */ + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, (uint32)((ulong)arg))) && ndlp->nlp_Rpi) { + /* If we are in the middle of Discovery */ + if (ndlp->nlp_action & (NLP_DO_ADDR_AUTH | NLP_DO_DISC_START | NLP_DO_RSCN)) { + /* Goto next entry */ + fc_nextnode(p_dev_ctl, ndlp); + } + ndlp->nlp_flag |= NLP_UNREG_LOGO; + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + return(0); + } + } + /* Allocate buffer for command iocb */ + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB | MEM_PRI)) == 0) { + return(1); + } + fc_bzero((void *)temp, sizeof(IOCBQ)); + icmd = &temp->iocb; + setdelay = 0; + + /* fill in BDEs for command */ + /* Allocate buffer for command payload */ + if ((mp = (MATCHMAP * )fc_mem_get(binfo, MEM_BUF | MEM_PRI)) == 0) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + return(1); + } + + /* Allocate buffer for response payload */ + if ((rmp = (MATCHMAP * )fc_mem_get(binfo, MEM_BUF | MEM_PRI)) == 0) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + return(1); + } + fc_bzero((void *)rmp->virt, sizeof(ELS_PKT)); + + if (binfo->fc_flag & FC_SLI2) { + /* Allocate buffer for Buffer ptr list */ + if ((bmp = (MATCHMAP * )fc_mem_get(binfo, MEM_BPL | MEM_PRI)) == 0) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + fc_mem_put(binfo, MEM_BUF, (uchar * )rmp); + return(1); + } + bpl = (ULP_BDE64 * )bmp->virt; + bpl->addrLow = PCIMEM_LONG(putPaddrLow((ulong)mp->phys)); + bpl->addrHigh = PCIMEM_LONG(putPaddrHigh((ulong)mp->phys)); + bpl->tus.f.bdeFlags = 0; + bpl++; + bpl->addrLow = PCIMEM_LONG(putPaddrLow((ulong)rmp->phys)); + bpl->addrHigh = PCIMEM_LONG(putPaddrHigh((ulong)rmp->phys)); + bpl->tus.f.bdeSize = FCELSSIZE; + bpl->tus.f.bdeFlags = BUFF_USE_RCV; + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + + bpl--; /* so we can fill in size later */ + + icmd->un.elsreq64.bdl.ulpIoTag32 = (uint32)0; + icmd->un.elsreq64.bdl.addrHigh = (uint32)putPaddrHigh(bmp->phys); + icmd->un.elsreq64.bdl.addrLow = (uint32)putPaddrLow(bmp->phys); + icmd->un.elsreq64.bdl.bdeSize = (2 * sizeof(ULP_BDE64)); + icmd->un.elsreq64.bdl.bdeFlags = BUFF_TYPE_BDL; + temp->bpl = (uchar *)bmp; + } else { + bpl = 0; + bmp = 0; + icmd->un.cont[0].bdeAddress = (uint32)putPaddrLow(mp->phys); + icmd->un.cont[1].bdeAddress = (uint32)putPaddrLow(rmp->phys); + icmd->un.cont[1].bdeSize = FCELSSIZE; + temp->bpl = 0; + } + + bp = mp->virt; + /* Save for completion so we can release these resources */ + temp->bp = (uchar * )mp; + temp->info = (uchar * )rmp; + + /* Fill in command field in payload */ + *((uint32 * )(bp)) = elscmd; /* FLOGI, PLOGI or LOGO */ + bp += sizeof(uint32); + + switch (elscmd) { + case ELS_CMD_PLOGI: /* NPort login */ + case ELS_CMD_PDISC: /* exchange parameters */ + if(ndlp && (ndlp->nlp_DID == 0)) { + ndlp->nlp_DID = (uint32)((ulong)arg); + } + case ELS_CMD_FLOGI: /* Fabric login */ + /* For LOGI request, remainder of payload is service parameters */ + fc_bcopy((void *) & binfo->fc_sparam, (void *)bp, sizeof(SERV_PARM)); + un.sp = (SERV_PARM * )bp; + + if (elscmd == ELS_CMD_FLOGI) { + un.sp->cmn.e_d_tov = 0; + un.sp->cmn.w2.r_a_tov = 0; + un.sp->cls1.classValid = 0; + un.sp->cls2.seqDelivery = 1; + un.sp->cls3.seqDelivery = 1; + if (un.sp->cmn.fcphLow < FC_PH3) + un.sp->cmn.fcphLow = FC_PH3; + if(FABRICTMO) { + fc_clk_res(p_dev_ctl, binfo->fc_fabrictmo, FABRICTMO); + } + } else { + /* Seagate drives can't handle FC_PH3 value! */ + if (un.sp->cmn.fcphLow < FC_PH_4_3) + un.sp->cmn.fcphLow = FC_PH_4_3; + } + + if (un.sp->cmn.fcphHigh < FC_PH3) + un.sp->cmn.fcphHigh = FC_PH3; + + icmd->un.elsreq.remoteID = (uint32)((ulong)arg); /* DID */ + size = (sizeof(uint32) + sizeof(SERV_PARM)); + + if (elscmd != ELS_CMD_PDISC) { + /* Allocate a nlplist entry, ELS cmpl will fill it in */ + if ((ndlp == 0) && + ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, (uint32)((ulong)arg))) == 0)) { + if((ndlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP))) { + fc_bzero((void *)ndlp, sizeof(NODELIST)); + ndlp->sync = binfo->fc_sync; + ndlp->capabilities = binfo->fc_capabilities; + ndlp->nlp_DID = (uint32)((ulong)arg); + } + else { + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + fc_mem_put(binfo, MEM_BUF, (uchar * )rmp); + if (bmp) { + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + } + return(1); + } + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + ndlp->nlp_flag &= ~NLP_RM_ENTRY; + ndlp->nlp_flag |= NLP_REQ_SND; + + if (elscmd == ELS_CMD_PLOGI) { + + ndlp->nlp_flag &= ~NLP_SND_PLOGI; + if (ndlp->nlp_Rpi) { + /* must explicitly unregister the login, UREG_LOGIN */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_unreg_login(binfo, ndlp->nlp_Rpi, (MAILBOX * )mb); + if (issue_mb_cmd(binfo,(MAILBOX * )mb,MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + binfo->fc_nlplookup[ndlp->nlp_Rpi] = 0; + ndlp->nlp_Rpi = 0; + } + + /* For PLOGI requests, must make sure all outstanding Mailbox + * commands have been processed. This is to ensure UNREG_LOGINs + * complete before we try to login. + */ + if (binfo->fc_mbox_active) { + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + fc_mem_put(binfo, MEM_BUF, (uchar * )rmp); + if (bmp) { + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + } + temp->info = (uchar *)0; + temp->bp = (uchar *)0; + temp->bpl = (uchar *)0; + fc_plogi_put(binfo, temp); + return(1); + } + + if ((ulong)arg == NameServer_DID) { + if (binfo->fc_ffstate == FC_READY) { + if(binfo->fc_flag & FC_RSCN_MODE) + ndlp->nlp_action |= NLP_DO_RSCN; + else + ndlp->nlp_action |= NLP_DO_ADDR_AUTH; + } + else + ndlp->nlp_action |= NLP_DO_ADDR_AUTH; + } + } + } + break; + + case ELS_CMD_LOGO: /* Logout */ + icmd->un.elsreq.remoteID = (uint32)((ulong)arg); /* DID */ + + *((uint32 * )(bp)) = SWAP_DATA(binfo->fc_myDID); + bp += sizeof(uint32); + + /* Last field in payload is our portname */ + fc_bcopy((void *) & binfo->fc_portname, (void *)bp, sizeof(NAME_TYPE)); + size = sizeof(uint32) + sizeof(uint32) + sizeof(NAME_TYPE); + break; + + case ELS_CMD_ADISC: + icmd->un.elsreq.remoteID = (uint32)((ulong)arg); /* DID */ + + if ((ndlp == 0) && + ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, (uint32)((ulong)arg))) == 0)) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + fc_mem_put(binfo, MEM_BUF, (uchar * )rmp); + if (bmp) { + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + } + return(1); + } + ndlp->nlp_DID = (uint32)((ulong)arg); + ndlp->nlp_flag |= NLP_REQ_SND_ADISC; + un.ap = (ADISC * )(bp); + un.ap->hardAL_PA = binfo->fc_pref_ALPA; + fc_bcopy((void *) & binfo->fc_portname, (void *) & un.ap->portName, + sizeof(NAME_TYPE)); + fc_bcopy((void *) & binfo->fc_nodename, (void *) & un.ap->nodeName, + sizeof(NAME_TYPE)); + un.ap->DID = SWAP_DATA(binfo->fc_myDID); + + size = sizeof(uint32) + sizeof(ADISC); + break; + + case ELS_CMD_PRLI: /* Process login */ + icmd->un.elsreq.remoteID = (uint32)((ulong)arg); /* DID */ + if ((ndlp == 0) && + ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, (uint32)((ulong)arg))) == 0)) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + fc_mem_put(binfo, MEM_BUF, (uchar * )rmp); + if (bmp) { + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + } + return(1); + } + ndlp->nlp_flag |= NLP_REQ_SND; + + /* For PRLI, remainder of payload is PRLI parameter page */ + fc_bzero((void *)bp, sizeof(PRLI)); + un.npr = (PRLI *)bp; + + /* + * If our firmware version is 3.20 or later, + * set the following bits for FC-TAPE support. + */ + if ( p_dev_ctl->vpd.rev.feaLevelHigh >= 0x02 ) { + un.npr->ConfmComplAllowed = 1; + un.npr->Retry = 1; + un.npr->TaskRetryIdReq = 1; + } + + un.npr->estabImagePair = 1; + un.npr->readXferRdyDis = 1; + if(clp[CFG_FCP_ON].a_current) { + un.npr->prliType = PRLI_FCP_TYPE; + un.npr->initiatorFunc = 1; + } + + size = sizeof(uint32) + sizeof(PRLI); + break; + + case ELS_CMD_PRLO: /* Process logout */ + /* For PRLO, remainder of payload is PRLO parameter page */ + fc_bzero((void *)bp, sizeof(PRLO)); + + icmd->un.elsreq.remoteID = (uint32)((ulong)arg); /* DID */ + size = sizeof(uint32) + sizeof(PRLO); + break; + + case ELS_CMD_SCR: /* State Change Registration */ + /* For SCR, remainder of payload is SCR parameter page */ + fc_bzero((void *)bp, sizeof(SCR)); + ((SCR * )bp)->Function = SCR_FUNC_FULL; + + icmd->un.elsreq.remoteID = (uint32)((ulong)arg); /* DID */ + size = sizeof(uint32) + sizeof(SCR); + break; + + case ELS_CMD_RNID: /* Node Identification */ + fc_bzero((void *)bp, sizeof(RNID)); + ((RNID * )bp)->Format = 0; + + icmd->un.elsreq.remoteID = (uint32)((ulong)arg); /* DID */ + size = sizeof(uint32) + sizeof(uint32); + break; + + case ELS_CMD_FARP: /* Farp */ + { + un.fp = (FARP * )(bp); + fc_bzero((void *)un.fp, sizeof(FARP)); + lp = (uint32 *)bp; + *lp++ = SWAP_DATA(binfo->fc_myDID); + un.fp->Mflags = FARP_MATCH_PORT; + un.fp->Rflags = FARP_REQUEST_PLOGI; + fc_bcopy((void *) & binfo->fc_portname, (void *) & un.fp->OportName, + sizeof(NAME_TYPE)); + fc_bcopy((void *) & binfo->fc_nodename, (void *) & un.fp->OnodeName, + sizeof(NAME_TYPE)); + switch(retry) { + case 0: + un.fp->Mflags = FARP_MATCH_PORT; + un.fp->RportName.nameType = NAME_IEEE; /* IEEE name */ + un.fp->RportName.IEEEextMsn = 0; + un.fp->RportName.IEEEextLsb = 0; + fc_bcopy(arg, (void *)un.fp->RportName.IEEE, 6); + un.fp->RnodeName.nameType = NAME_IEEE; /* IEEE name */ + un.fp->RnodeName.IEEEextMsn = 0; + un.fp->RnodeName.IEEEextLsb = 0; + fc_bcopy(arg, (void *)un.fp->RnodeName.IEEE, 6); + break; + case 1: + un.fp->Mflags = FARP_MATCH_PORT; + fc_bcopy(arg, (void *)&un.fp->RportName, sizeof(NAME_TYPE)); + retry = 0; + break; + case 2: + un.fp->Mflags = FARP_MATCH_NODE; + fc_bcopy(arg, (void *)&un.fp->RnodeName, sizeof(NAME_TYPE)); + retry = 0; + break; + } + + if((ndlp = fc_findnode_wwpn(binfo, NLP_SEARCH_ALL, &un.fp->RportName))) { + ndlp->nlp_flag |= NLP_FARP_SND; + ndlp->nlp_flag &= ~NLP_RM_ENTRY; + } + size = sizeof(uint32) + sizeof(FARP); + iotag = 0; + } + break; + + case ELS_CMD_FARPR: /* Farp response */ + { + icmd->un.elsreq.remoteID = (uint32)((ulong)arg); /* DID */ + un.fp = (FARP * )(bp); + lp = (uint32 *)bp; + *lp++ = SWAP_DATA((uint32)((ulong)arg)); + *lp++ = SWAP_DATA(binfo->fc_myDID); + un.fp->Rflags = 0; + un.fp->Mflags = (FARP_MATCH_PORT | FARP_MATCH_NODE); + + fc_bcopy((void *) & binfo->fc_portname, (void *) & un.fp->RportName, + sizeof(NAME_TYPE)); + fc_bcopy((void *) & binfo->fc_nodename, (void *) & un.fp->RnodeName, + sizeof(NAME_TYPE)); + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, (uint32)((ulong)arg)))) { + fc_bcopy((void *) & ndlp->nlp_portname, (void *) & un.fp->OportName, + sizeof(NAME_TYPE)); + fc_bcopy((void *) & ndlp->nlp_nodename, (void *) & un.fp->OnodeName, + sizeof(NAME_TYPE)); + } + + size = sizeof(uint32) + sizeof(FARP); + iotag = 0; + } + break; + + default: + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + fc_mem_put(binfo, MEM_BUF, (uchar * )rmp); + if (bmp) { + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + } + /* Xmit unknown ELS command */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0128, /* ptr to msg structure */ + fc_mes0128, /* ptr to msg */ + fc_msgBlk0128.msgPreambleStr, /* begin varargs */ + elscmd); /* end varargs */ + return(1); + } + + if (binfo->fc_flag & FC_SLI2) { + icmd->ulpCommand = CMD_ELS_REQUEST64_CR; + bpl->tus.f.bdeSize = size; + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + + fc_mpdata_sync(bmp->dma_handle, 0, 0, DDI_DMA_SYNC_FORDEV); + } else { + icmd->ulpCommand = CMD_ELS_REQUEST_CR; + icmd->un.cont[0].bdeSize = size; + } + + fc_mpdata_sync(mp->dma_handle, 0, 0, DDI_DMA_SYNC_FORDEV); + + if (iotag) { + icmd->ulpIoTag = iotag; + } + icmd->ulpIoTag0 = (unsigned)rp->fc_iotag++; + if ((rp->fc_iotag & 0x3fff) == 0) { + rp->fc_iotag = 1; + } + + /* Fill in rest of iocb */ + icmd->ulpBdeCount = 1; + icmd->ulpLe = 1; + icmd->ulpClass = CLASS3; + icmd->ulpOwner = OWN_CHIP; + temp->retry = (uchar)retry; /* retry = uint32 */ + rmp->fc_mptr = (uchar *)ndlp; + /* Xmit ELS command to remote NPORT */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0129, /* ptr to msg structure */ + fc_mes0129, /* ptr to msg */ + fc_msgBlk0129.msgPreambleStr, /* begin varargs */ + elscmd, + icmd->un.ulpWord[5], /* did */ + icmd->ulpIoTag, + binfo->fc_ffstate); /* end varargs */ + /* + * For handleing Dump command when system panic, + * the FC_BUS_RESET needs to be checked. If FC_BUS_RESET is set, + * there is no delay for issuing ELS command. + * FC_BUS_RESET is set by the lpfc_scsi_reset(). + */ + if(icmd->ulpDelayXmit) + { + if(icmd->ulpDelayXmit == 2) { + /* Delay issue of iocb 2048 interrupt latencies */ + if(binfo->fc_delayxmit) { + IOCBQ *iop; + iop = binfo->fc_delayxmit; + while(iop->q) + iop = (IOCBQ *)iop->q; + iop->q = (uchar *)temp; + } + else { + binfo->fc_delayxmit = temp; + } + temp->q = 0; + temp->rsvd2 = 2048; + } + else { + /* Delay issue of iocb for 1 to 2 seconds */ + temp->q = 0; + + setdelay = 1; /* seconds */ + fc_clk_set(p_dev_ctl, setdelay, fc_delay_timeout, (void *)temp, ndlp); + } + } + else { + issue_iocb_cmd(binfo, rp, temp); + } + + FCSTATCTR.elsXmitFrame++; + return(0); +} /* End fc_els_cmd */ + + +/***************************************/ +/** fc_els_rsp Issue an **/ +/** ELS response **/ +/***************************************/ +_static_ int +fc_els_rsp( +FC_BRD_INFO *binfo, +uint32 elscmd, +uint32 Xri, +uint32 class, +void *iocbp, +uint32 flag, +NODELIST *ndlp) +{ + IOCB * icmd; + IOCBQ * temp; + RING * rp; + uchar * bp; + MATCHMAP * mp, * bmp; + ULP_BDE64 * bpl; + ADISC * ap; + RNID * rn; + fc_vpd_t * vpd; + PRLI * npr; + iCfgParam * clp; + fc_dev_ctl_t * p_dev_ctl; + ushort size; + + rp = &binfo->fc_ring[FC_ELS_RING]; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + p_dev_ctl = (fc_dev_ctl_t *)(binfo->fc_p_dev_ctl); + + /* Allocate buffer for command iocb */ + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB)) == 0) { + return(1); + } + fc_bzero((void *)temp, sizeof(IOCBQ)); + icmd = &temp->iocb; + + /* fill in BDEs for command */ + /* Allocate buffer for response payload */ + if ((mp = (MATCHMAP * )fc_mem_get(binfo, MEM_BUF)) == 0) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + return(1); + } + + if (binfo->fc_flag & FC_SLI2) { + /* Allocate buffer for Buffer ptr list */ + if ((bmp = (MATCHMAP * )fc_mem_get(binfo, MEM_BPL)) == 0) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + return(1); + } + bpl = (ULP_BDE64 * )bmp->virt; + bpl->addrLow = PCIMEM_LONG(putPaddrLow((ulong)mp->phys)); + bpl->addrHigh = PCIMEM_LONG(putPaddrHigh((ulong)mp->phys)); + bpl->tus.f.bdeFlags = 0; + + icmd->un.elsreq64.bdl.ulpIoTag32 = (uint32)0; + icmd->un.elsreq64.bdl.addrHigh = (uint32)putPaddrHigh(bmp->phys); + icmd->un.elsreq64.bdl.addrLow = (uint32)putPaddrLow(bmp->phys); + icmd->un.elsreq64.bdl.bdeSize = sizeof(ULP_BDE64); + icmd->un.elsreq64.bdl.bdeFlags = BUFF_TYPE_BDL; + temp->bpl = (uchar *)bmp; + } else { + bpl = 0; + bmp = 0; + icmd->un.cont[0].bdeAddress = (uint32)putPaddrLow(mp->phys); + temp->bpl = 0; + } + + bp = mp->virt; + + /* Save for completion so we can release these resources */ + temp->bp = (uchar * )mp; + temp->ndlp = (uchar * )ndlp; + + /* Fill in command field in payload */ + *((uint32 * )(bp)) = elscmd; /* ACC or LS_RJT */ + + switch (elscmd) { + case ELS_CMD_ACC: /* Accept Response */ + /* ACCEPT will optionally contain service parameters, + * depending on flag. + */ + bp += sizeof(uint32); + if (flag >= sizeof(SERV_PARM)) { + fc_bcopy((void *) & binfo->fc_sparam, (void *)bp, sizeof(SERV_PARM)); + size = (sizeof(SERV_PARM) + sizeof(uint32)); + } else { + size = sizeof(uint32); + } + break; + + case ELS_CMD_LS_RJT: /* reject response */ + bp += sizeof(uint32); + *((uint32 * )(bp)) = flag; /* fill in error code */ + size = sizeof(uint32) + sizeof(uint32); + break; + + case ELS_CMD_ADISC: + *((uint32 * )(bp)) = ELS_CMD_ACC; + bp += sizeof(uint32); + if(ndlp) + icmd->un.elsreq.remoteID = ndlp->nlp_DID; /* DID */ + + ap = (ADISC * )(bp); + ap->hardAL_PA = binfo->fc_pref_ALPA; + fc_bcopy((void *) & binfo->fc_portname, (void *) & ap->portName, + sizeof(NAME_TYPE)); + fc_bcopy((void *) & binfo->fc_nodename, (void *) & ap->nodeName, + sizeof(NAME_TYPE)); + ap->DID = SWAP_DATA(binfo->fc_myDID); + + size = sizeof(uint32) + sizeof(ADISC); + break; + + case ELS_CMD_PRLI: + *((uint32 * )(bp)) = (ELS_CMD_ACC | (ELS_CMD_PRLI & ~ELS_RSP_MASK)); + bp += sizeof(uint32); + npr = (PRLI *)bp; + if(ndlp) + icmd->un.elsreq.remoteID = ndlp->nlp_DID; /* DID */ + + /* For PRLI, remainder of payload is PRLI parameter page */ + fc_bzero((void *)bp, sizeof(PRLI)); + + vpd = &p_dev_ctl->vpd; + /* + * If our firmware version is 3.20 or later, + * set the following bits for FC-TAPE support. + */ + if ( vpd->rev.feaLevelHigh >= 0x02 ) { + npr->ConfmComplAllowed = 1; + npr->Retry = 1; + npr->TaskRetryIdReq = 1; + } + + npr->acceptRspCode = PRLI_REQ_EXECUTED; + npr->estabImagePair = 1; + npr->readXferRdyDis = 1; + npr->ConfmComplAllowed = 1; + if(clp[CFG_FCP_ON].a_current) { + npr->prliType = PRLI_FCP_TYPE; + npr->initiatorFunc = 1; + } + + size = sizeof(uint32) + sizeof(PRLI); + break; + + case ELS_CMD_RNID: + *((uint32 * )(bp)) = ELS_CMD_ACC; + bp += sizeof(uint32); + + rn = (RNID * )(bp); + fc_bzero((void *)bp, sizeof(RNID)); + rn->Format = (uchar)flag; + rn->CommonLen = (2 * sizeof(NAME_TYPE)); + fc_bcopy((void *) & binfo->fc_portname, (void *) & rn->portName, + sizeof(NAME_TYPE)); + fc_bcopy((void *) & binfo->fc_nodename, (void *) & rn->nodeName, + sizeof(NAME_TYPE)); + switch(flag) { + case 0: + rn->SpecificLen = 0; + break; + case RNID_TOPOLOGY_DISC: + rn->SpecificLen = sizeof(RNID_TOP_DISC); + fc_bcopy((void *) & binfo->fc_portname, + (void *) & rn->un.topologyDisc.portName, sizeof(NAME_TYPE)); + rn->un.topologyDisc.unitType = RNID_HBA; + rn->un.topologyDisc.physPort = 0; + rn->un.topologyDisc.attachedNodes = 0; + if(clp[CFG_NETWORK_ON].a_current) { + rn->un.topologyDisc.ipVersion = binfo->ipVersion; + rn->un.topologyDisc.UDPport = binfo->UDPport; + fc_bcopy((void *) & binfo->ipAddr[0], + (void *) & rn->un.topologyDisc.ipAddr[0], 16); + } + break; + default: + rn->CommonLen = 0; + rn->SpecificLen = 0; + break; + } + size = sizeof(uint32) + sizeof(uint32) + rn->CommonLen + rn->SpecificLen; + break; + + default: + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + if (bmp) { + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + } + /* Xmit unknown ELS response (elsCmd> */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0130, /* ptr to msg structure */ + fc_mes0130, /* ptr to msg */ + fc_msgBlk0130.msgPreambleStr, /* begin varargs */ + elscmd ); /* end varargs */ + return(1); + } + + if (binfo->fc_flag & FC_SLI2) { + icmd->ulpCommand = CMD_XMIT_ELS_RSP64_CX; + bpl->tus.f.bdeSize = size; + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + + fc_mpdata_sync(bmp->dma_handle, 0, 0, DDI_DMA_SYNC_FORDEV); + } else { + icmd->ulpCommand = CMD_XMIT_ELS_RSP_CX; + icmd->un.cont[0].bdeSize = size; + } + + fc_mpdata_sync(mp->dma_handle, 0, 0, DDI_DMA_SYNC_FORDEV); + + /* If iotag is zero, assign one from global counter for board */ + if (iocbp == 0) { + temp->retry = 0; + } else { + icmd->ulpIoTag = ((IOCB *)iocbp)->ulpIoTag; + temp->retry = ((IOCBQ *)iocbp)->retry; + } + icmd->ulpIoTag0 = (unsigned)rp->fc_iotag++; + if ((rp->fc_iotag & 0x3fff) == 0) { + rp->fc_iotag = 1; + } + + /* fill in rest of iocb */ + icmd->ulpContext = (volatile ushort)Xri; + icmd->ulpBdeCount = 1; + icmd->ulpLe = 1; + icmd->ulpClass = class; + icmd->ulpOwner = OWN_CHIP; + /* Xmit ELS response to remote NPORT */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0131, /* ptr to msg structure */ + fc_mes0131, /* ptr to msg */ + fc_msgBlk0131.msgPreambleStr, /* begin varargs */ + elscmd, + icmd->un.ulpWord[5], /* did */ + icmd->ulpIoTag, + size); /* end varargs */ + issue_iocb_cmd(binfo, rp, temp); + + FCSTATCTR.elsXmitFrame++; + return(0); +} /* End fc_els_rsp */ + + +/* Retries the appropriate ELS command if necessary */ +_local_ int +fc_els_retry( +FC_BRD_INFO *binfo, +RING *rp, +IOCBQ *iocbq, +uint32 cmd, +NODELIST *ndlp) +{ + IOCB *iocb; + MATCHMAP *bmp; + + if (((binfo->fc_flag & FC_RSCN_MODE) && (binfo->fc_ffstate == FC_READY)) || + (binfo->fc_ffstate == FC_LOOP_DISC) || + (binfo->fc_ffstate == FC_NODE_DISC)) { + binfo->fc_fabrictmo = (2 * binfo->fc_ratov) + + ((4 * binfo->fc_edtov) / 1000) + 1; + if(FABRICTMO) { + fc_clk_res((fc_dev_ctl_t *)(binfo->fc_p_dev_ctl), + binfo->fc_fabrictmo, FABRICTMO); + } + else { + FABRICTMO = fc_clk_set((fc_dev_ctl_t *)(binfo->fc_p_dev_ctl), + binfo->fc_fabrictmo, fc_fabric_timeout, 0, 0); + } + } + + iocb = &iocbq->iocb; + /* Do not retry FARP/ADISC/PDISC */ + if ((cmd == ELS_CMD_FARP) || + (cmd == ELS_CMD_FARPR) || + (cmd == ELS_CMD_ADISC) || + (cmd == ELS_CMD_PDISC)) { + goto out; + } + + if (fc_status_action(binfo, iocbq, cmd, ndlp)) { + /* Indicates iocb should be retried */ + /* Retry ELS response/command */ + FCSTATCTR.elsXmitRetry++; + switch (iocb->ulpCommand) { + case CMD_ELS_REQUEST_CR: + case CMD_ELS_REQUEST64_CR: + case CMD_ELS_REQUEST_CX: + case CMD_ELS_REQUEST64_CX: + fc_els_cmd(binfo, cmd, (void *)((ulong)iocb->un.elsreq.remoteID), + (uint32)iocbq->retry, (ushort)iocb->ulpIoTag, ndlp); + break; + case CMD_XMIT_ELS_RSP_CX: + fc_els_rsp(binfo,cmd,(uint32)iocb->ulpContext, (uint32)iocb->ulpClass, + (void *)iocbq, (uint32)iocb->un.cont[0].bdeSize, ndlp); + break; + case CMD_XMIT_ELS_RSP64_CX: + bmp = (MATCHMAP *)iocbq->bpl; + if(bmp && bmp->virt) { + fc_els_rsp(binfo,cmd,(uint32)iocb->ulpContext, + (uint32)iocb->ulpClass, (void *)iocbq, + (uint32)(((ULP_BDE64 * )bmp->virt)->tus.f.bdeSize), ndlp); + } + break; + default: + goto out; + } + return(1); + } + +out: + /* ELS Retry failed */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0132, /* ptr to msg structure */ + fc_mes0132, /* ptr to msg */ + fc_msgBlk0132.msgPreambleStr, /* begin varargs */ + cmd, + iocb->un.ulpWord[4] ); /* end varargs */ + return(0); +} /* End fc_els_retry */ + + +/* Determines what action to take as result of the status + * field in the iocb. If the status indicates a retry, the iocb + * will be setup for retry and a 1 will be returned. If the status + * indicates error with no action, a 0 will be returned. + * The retry count is kept in the ls byte of the iotag. + */ +_local_ int +fc_status_action( +FC_BRD_INFO *binfo, +IOCBQ *iocbq, +uint32 cmd, +NODELIST *ndlp) +{ + uint32 class; + uchar tag; + int maxretry; + LS_RJT stat; + IOCB *iocb; + + maxretry = FC_MAXRETRY; + iocb = &iocbq->iocb; + iocb->ulpDelayXmit = 0; + + if(ndlp) { + if(ndlp->nlp_action & NLP_DO_RNID) + return(0); + if((ndlp->nlp_DID == 0) && (ndlp->nlp_type == 0)) + return(0); + } + + switch (iocb->ulpStatus) { + case IOSTAT_FCP_RSP_ERROR: + case IOSTAT_REMOTE_STOP: + break; + + case IOSTAT_LOCAL_REJECT: + if ((iocb->un.ulpWord[4] & 0xff) == IOERR_LINK_DOWN) + return(0); + + if ((iocb->un.ulpWord[4] & 0xff) == IOERR_LOOP_OPEN_FAILURE) { + if(cmd == ELS_CMD_PLOGI) { + if (iocbq->retry == 0) + iocb->ulpDelayXmit = 2; + } + goto elsretry; + } + if ((iocb->un.ulpWord[4] & 0xff) == IOERR_SEQUENCE_TIMEOUT) { + goto elsretry; + } + if ((iocb->un.ulpWord[4] & 0xff) == IOERR_NO_RESOURCES) { + if(cmd == ELS_CMD_PLOGI) + iocb->ulpDelayXmit = 1; + goto elsretry; + } + if ((iocb->un.ulpWord[4] & 0xff) == IOERR_INVALID_RPI) { + goto elsretry; + } + break; + + case IOSTAT_NPORT_RJT: + case IOSTAT_FABRIC_RJT: + /* iotag is retry count */ + if ((tag = (iocbq->retry + 1)) >= maxretry) { + FCSTATCTR.elsRetryExceeded++; + break; + } + + iocbq->retry = tag; + if (iocb->un.ulpWord[4] & RJT_UNAVAIL_TEMP) { + /* not avail temporary */ + /* Retry ELS command */ + return(1); + } + if (iocb->un.ulpWord[4] & RJT_UNSUP_CLASS) { + /* class not supported */ + if (cmd == ELS_CMD_FARP) + return(0); + if (binfo->fc_topology == TOPOLOGY_LOOP) { + /* for FC-AL retry logic goes class 3 - 2 - 1 */ + if (iocb->ulpClass == CLASS3) { + class = CLASS2; + } else { + break; + } + } else { + /* for non FC-AL retry logic goes class 1 - 2 */ + if (iocb->ulpClass == CLASS1) { + class = CLASS2; + } else { + break; + } + } + iocb->ulpClass = class; + /* Retry ELS command */ + return(1); + } + break; + + case IOSTAT_NPORT_BSY: + case IOSTAT_FABRIC_BSY: +elsretry: + tag = (iocbq->retry + 1); + /* iotag is retry count */ + if(ndlp) { + if(cmd == ELS_CMD_PLOGI) { + if((ndlp->nlp_state >= NLP_LOGIN) || + (ndlp->nlp_flag & NLP_REG_INP)) { + return(0); /* Don't retry */ + } + } + if(ndlp->nlp_flag & NLP_NODEV_TMO) { + iocbq->retry = tag; + /* Retry ELS command */ + return(1); + } + } + if(tag >= maxretry) { + FCSTATCTR.elsRetryExceeded++; + break; + } + iocbq->retry = tag; + /* Retry ELS command */ + return(1); + + case IOSTAT_LS_RJT: + stat.un.lsRjtError = SWAP_DATA(iocb->un.ulpWord[4]); + switch(stat.un.b.lsRjtRsnCode) { + case LSRJT_UNABLE_TPC: + if(stat.un.b.lsRjtRsnCodeExp == LSEXP_CMD_IN_PROGRESS) { + if(cmd == ELS_CMD_PLOGI) { + iocb->ulpDelayXmit = 1; + maxretry = 48; + } + goto elsretry; + } + if(cmd == ELS_CMD_PLOGI) { + iocb->ulpDelayXmit = 1; + + /* allow for 1sec FLOGI delay */ + maxretry = FC_MAXRETRY + 1; + goto elsretry; + } + break; + + case LSRJT_LOGICAL_BSY: + if(cmd == ELS_CMD_PLOGI) { + iocb->ulpDelayXmit = 1; + maxretry = 48; + } + goto elsretry; + } + + break; + + case IOSTAT_INTERMED_RSP: + case IOSTAT_BA_RJT: + break; + + default: + break; + } + + if((cmd == ELS_CMD_FLOGI) && (binfo->fc_topology != TOPOLOGY_LOOP)) { + iocb->ulpDelayXmit = 1; + maxretry = 48; + if ((tag = (iocbq->retry + 1)) >= maxretry) + return(0); + iocbq->retry = tag; + return(1); + } + return(0); +} /* End fc_status_action */ + + +_static_ void +fc_snd_flogi( +fc_dev_ctl_t * p_dev_ctl, +void *p1, +void *p2) +{ + FC_BRD_INFO * binfo; + RING * rp; + + binfo = &BINFO; + /* Stop the link down watchdog timer */ + rp = &binfo->fc_ring[FC_FCP_RING]; + if(RINGTMO) { + fc_clk_can(p_dev_ctl, RINGTMO); + RINGTMO = 0; + } + binfo->fc_flag &= ~(FC_LD_TIMEOUT | FC_LD_TIMER); + + /* We are either private or public loop topology */ + /* We are either Fabric or point-to-point topology */ + /* Now build FLOGI payload and issue ELS command to find out */ + fc_els_cmd(binfo, ELS_CMD_FLOGI, (void *)Fabric_DID, + (uint32)0, (ushort)0, (NODELIST *)0); + + /* + * Cancel the establish reset timer + * If we come to this point, we don't need tht timer to + * clear the FC_ESTABLISH_LINK flag. + */ + if (p_dev_ctl->fc_estabtmo) { + fc_clk_can(p_dev_ctl, p_dev_ctl->fc_estabtmo); + p_dev_ctl->fc_estabtmo = 0; + } + return; +} + +/* Wait < a second before sending intial FLOGI to start discovery */ +int +fc_initial_flogi( +fc_dev_ctl_t * p_dev_ctl) /* point to dev_ctl area */ +{ + if((p_dev_ctl->fc_waitflogi = fc_clk_set(p_dev_ctl, 0, fc_snd_flogi, 0, 0)) == 0) + fc_snd_flogi(p_dev_ctl, 0, 0); + return(0); +} + +/***************************************/ +/** fc_issue_ct_rsp Issue an **/ +/** CT rsp **/ +/***************************************/ +_static_ int +fc_issue_ct_rsp( +FC_BRD_INFO * binfo, +uint32 tag, +MATCHMAP * bmp, +DMATCHMAP * inp) +{ + IOCB * icmd; + IOCBQ * temp; + RING * rp; + fc_dev_ctl_t * p_dev_ctl; + uint32 num_entry; + + rp = &binfo->fc_ring[FC_ELS_RING]; + num_entry = (uint32)inp->dfc_flag; + inp->dfc_flag = 0; + + /* Allocate buffer for command iocb */ + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB)) == 0) { + return(1); + } + fc_bzero((void *)temp, sizeof(IOCBQ)); + icmd = &temp->iocb; + + icmd->un.xseq64.bdl.ulpIoTag32 = (uint32)0; + icmd->un.xseq64.bdl.addrHigh = (uint32)putPaddrHigh(bmp->phys); + icmd->un.xseq64.bdl.addrLow = (uint32)putPaddrLow(bmp->phys); + icmd->un.xseq64.bdl.bdeFlags = BUFF_TYPE_BDL; + icmd->un.xseq64.bdl.bdeSize = (num_entry * sizeof(ULP_BDE64)); + + /* Save for completion so we can release these resources */ + temp->bp = (uchar * )inp; + + icmd->un.xseq64.w5.hcsw.Fctl = (LS | LA); + icmd->un.xseq64.w5.hcsw.Dfctl = 0; + icmd->un.xseq64.w5.hcsw.Rctl = FC_SOL_CTL; + icmd->un.xseq64.w5.hcsw.Type = FC_COMMON_TRANSPORT_ULP; + + p_dev_ctl = (fc_dev_ctl_t *)(binfo->fc_p_dev_ctl); + fc_mpdata_sync(bmp->dma_handle, 0, 0, DDI_DMA_SYNC_FORDEV); + + /* If iotag is zero, assign one from global counter for board */ + icmd->ulpIoTag0 = (unsigned)rp->fc_iotag++; + if ((rp->fc_iotag & 0x3fff) == 0) { + rp->fc_iotag = 1; + } + + /* Fill in rest of iocb */ + icmd->ulpCommand = CMD_XMIT_SEQUENCE64_CX; + icmd->ulpBdeCount = 1; + icmd->ulpLe = 1; + icmd->ulpClass = CLASS3; + icmd->ulpContext = (ushort)tag; + icmd->ulpOwner = OWN_CHIP; + /* Xmit CT response on exchange */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0133, /* ptr to msg structure */ + fc_mes0133, /* ptr to msg */ + fc_msgBlk0133.msgPreambleStr, /* begin varargs */ + icmd->ulpContext, /* xid */ + icmd->ulpIoTag, + binfo->fc_ffstate ); /* end varargs */ + issue_iocb_cmd(binfo, rp, temp); + return(0); +} /* fc_issue_ct_rsp */ + +/***************************************/ +/** fc_gen_req Issue an **/ +/** GEN_REQUEST cmd **/ +/***************************************/ +_static_ int +fc_gen_req( +FC_BRD_INFO * binfo, +MATCHMAP * bmp, +MATCHMAP * inp, +MATCHMAP * outp, +uint32 rpi, +uint32 usr_flg, +uint32 num_entry, +uint32 tmo) +{ + IOCB * icmd; + IOCBQ * temp; + RING * rp; + fc_dev_ctl_t * p_dev_ctl; + + + rp = &binfo->fc_ring[FC_ELS_RING]; + + /* Allocate buffer for command iocb */ + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB | MEM_PRI)) == 0) { + return(1); + } + fc_bzero((void *)temp, sizeof(IOCBQ)); + icmd = &temp->iocb; + + icmd->un.genreq64.bdl.ulpIoTag32 = (uint32)0; + icmd->un.genreq64.bdl.addrHigh = (uint32)putPaddrHigh(bmp->phys); + icmd->un.genreq64.bdl.addrLow = (uint32)putPaddrLow(bmp->phys); + icmd->un.genreq64.bdl.bdeFlags = BUFF_TYPE_BDL; + icmd->un.genreq64.bdl.bdeSize = (num_entry * sizeof(ULP_BDE64)); + + if(usr_flg) + temp->bpl = 0; + else + temp->bpl = (uchar *)bmp; + + /* Save for completion so we can release these resources */ + temp->bp = (uchar * )inp; + temp->info = (uchar * )outp; + + /* Fill in payload, bp points to frame payload */ + icmd->ulpCommand = CMD_GEN_REQUEST64_CR; + + p_dev_ctl = (fc_dev_ctl_t *)(binfo->fc_p_dev_ctl); + fc_mpdata_sync(bmp->dma_handle, 0, 0, DDI_DMA_SYNC_FORDEV); + + /* If iotag is zero, assign one from global counter for board */ + icmd->ulpIoTag0 = (unsigned)rp->fc_iotag++; + if ((rp->fc_iotag & 0x3fff) == 0) { + rp->fc_iotag = 1; + } + + /* Fill in rest of iocb */ + icmd->un.genreq64.w5.hcsw.Fctl = (SI | LA); + icmd->un.genreq64.w5.hcsw.Dfctl = 0; + icmd->un.genreq64.w5.hcsw.Rctl = FC_UNSOL_CTL; + icmd->un.genreq64.w5.hcsw.Type = FC_COMMON_TRANSPORT_ULP; + + if(tmo == 0) + tmo = (2 * binfo->fc_ratov); + icmd->ulpTimeout = tmo; + icmd->ulpBdeCount = 1; + icmd->ulpLe = 1; + icmd->ulpClass = CLASS3; + icmd->ulpContext = (volatile ushort)rpi; + icmd->ulpOwner = OWN_CHIP; + /* Issue GEN REQ IOCB for NPORT */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0134, /* ptr to msg structure */ + fc_mes0134, /* ptr to msg */ + fc_msgBlk0134.msgPreambleStr, /* begin varargs */ + icmd->un.ulpWord[5], /* did */ + icmd->ulpIoTag, + binfo->fc_ffstate ); /* end varargs */ + issue_iocb_cmd(binfo, rp, temp); + + FCSTATCTR.elsXmitFrame++; + return(0); +} /* End fc_gen_req */ + + +/***************************************/ +/** fc_rnid_req Issue an **/ +/** RNID REQUEST cmd **/ +/***************************************/ +_static_ int +fc_rnid_req( +FC_BRD_INFO * binfo, +DMATCHMAP * inp, +DMATCHMAP * outp, +MATCHMAP ** bmpp, +uint32 rpi) +{ + IOCB * icmd; + IOCBQ * temp; + RING * rp; + ULP_BDE64 * bpl; + MATCHMAP * bmp; + fc_dev_ctl_t * p_dev_ctl; + + + rp = &binfo->fc_ring[FC_ELS_RING]; + + /* Allocate buffer for command iocb */ + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB | MEM_PRI)) == 0) { + return(1); + } + fc_bzero((void *)temp, sizeof(IOCBQ)); + icmd = &temp->iocb; + + if (binfo->fc_flag & FC_SLI2) { + /* Allocate buffer for Buffer ptr list */ + if ((bmp = (MATCHMAP * )fc_mem_get(binfo, MEM_BPL | MEM_PRI)) == 0) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + return(1); + } + *bmpp = bmp; /* to free BPL on compl */ + bpl = (ULP_BDE64 * )bmp->virt; + bpl->addrLow = PCIMEM_LONG(putPaddrLow((ulong)inp->dfc.phys)); + bpl->addrHigh = PCIMEM_LONG(putPaddrHigh((ulong)inp->dfc.phys)); + bpl->tus.f.bdeFlags = 0; + bpl++; + bpl->addrLow = PCIMEM_LONG(putPaddrLow((ulong)outp->dfc.phys)); + bpl->addrHigh = PCIMEM_LONG(putPaddrHigh((ulong)outp->dfc.phys)); + bpl->tus.f.bdeSize = (ushort)((ulong)(outp->dfc.fc_mptr)); + bpl->tus.f.bdeFlags = BUFF_USE_RCV; + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + + bpl--; /* so we can fill in size later */ + + icmd->un.genreq64.bdl.ulpIoTag32 = (uint32)0; + icmd->un.genreq64.bdl.addrHigh = (uint32)putPaddrHigh(bmp->phys); + icmd->un.genreq64.bdl.addrLow = (uint32)putPaddrLow(bmp->phys); + icmd->un.genreq64.bdl.bdeSize = (2 * sizeof(ULP_BDE64)); + icmd->un.genreq64.bdl.bdeFlags = BUFF_TYPE_BDL; + temp->bpl = 0; + } else { + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + return(1); + } + + /* Save for completion so we can release these resources */ + temp->info = (uchar * )outp; + + /* Fill in payload, bp points to frame payload */ + icmd->ulpCommand = CMD_GEN_REQUEST64_CR; + bpl->tus.f.bdeSize = (ushort)((ulong)(inp->dfc.fc_mptr)); + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + + p_dev_ctl = (fc_dev_ctl_t *)(binfo->fc_p_dev_ctl); + fc_mpdata_sync(bmp->dma_handle, 0, 0, DDI_DMA_SYNC_FORDEV); + fc_mpdata_sync(inp->dfc.dma_handle, 0, 0, DDI_DMA_SYNC_FORDEV); + + /* If iotag is zero, assign one from global counter for board */ + icmd->ulpIoTag0 = (unsigned)rp->fc_iotag++; + if ((rp->fc_iotag & 0x3fff) == 0) { + rp->fc_iotag = 1; + } + + /* Fill in rest of iocb */ + icmd->un.genreq64.w5.hcsw.Fctl = (SI | LA); + icmd->un.genreq64.w5.hcsw.Dfctl = 0; + icmd->un.genreq64.w5.hcsw.Rctl = FC_ELS_REQ; + icmd->un.genreq64.w5.hcsw.Type = FC_ELS_DATA; + + icmd->ulpBdeCount = 1; + icmd->ulpLe = 1; + icmd->ulpClass = CLASS3; + icmd->ulpTimeout = (uchar)(rp->fc_ringtmo - 2); + icmd->ulpContext = (volatile ushort)rpi; + icmd->ulpOwner = OWN_CHIP; + /* Issue GEN REQ IOCB for RNID */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0135, /* ptr to msg structure */ + fc_mes0135, /* ptr to msg */ + fc_msgBlk0135.msgPreambleStr, /* begin varargs */ + icmd->un.ulpWord[5], /* did */ + icmd->ulpIoTag, + binfo->fc_ffstate ); /* end varargs */ + issue_iocb_cmd(binfo, rp, temp); + outp->dfc.fc_mptr = 0; + + FCSTATCTR.elsXmitFrame++; + return(0); +} /* End fc_rnid_req */ + + +/***************************************/ +/** fc_issue_ct_req Issue a **/ +/** CT request to nameserver **/ +/***************************************/ +_static_ int +fc_issue_ct_req( +FC_BRD_INFO * binfo, +uint32 portid, +MATCHMAP * bmp, +DMATCHMAP * inmp, +DMATCHMAP * outmp, +uint32 tmo) +{ + uint32 size; + NODELIST * ndlp; + + size = (uint32)outmp->dfc_flag; + /* Find nameserver entry */ + if((((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, portid))) == 0) || + (ndlp->nlp_Rpi == 0) || + (binfo->fc_flag & FC_RSCN_MODE)) { + + if ((binfo->fc_flag & FC_FABRIC) && (binfo->fc_ffstate == FC_READY)) { + if ((ndlp == 0) || ((ndlp->nlp_state < NLP_PLOGI) && !(ndlp->nlp_flag & NLP_NS_REMOVED))) { + /* We can LOGIN to the port first */ + fc_els_cmd(binfo, ELS_CMD_PLOGI, (void *)((ulong)portid), + (uint32)0, (ushort)0, ndlp); + } + return(ENODEV); + } + return(EACCES); + } + + if((fc_gen_req(binfo, bmp, (MATCHMAP *)inmp, (MATCHMAP *)outmp, + ndlp->nlp_Rpi, 1, (inmp->dfc_flag + outmp->dfc_flag), tmo))) + return(ENOMEM); + + outmp->dfc_flag = 0; + return(0); +} + +/**************************************************/ +/** **/ +/** Free any deferred RSCNs **/ +/** **/ +/**************************************************/ +_static_ int +fc_flush_rscn_defer( +fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO * binfo; + RING * rp; + IOCBQ * xmitiq; + IOCB * iocb; + MATCHMAP * mp; + int i; + + binfo = &BINFO; + rp = &binfo->fc_ring[FC_ELS_RING]; + while (binfo->fc_defer_rscn.q_first) { + xmitiq = (IOCBQ * )binfo->fc_defer_rscn.q_first; + if ((binfo->fc_defer_rscn.q_first = xmitiq->q) == 0) { + binfo->fc_defer_rscn.q_last = 0; + } + binfo->fc_defer_rscn.q_cnt--; + iocb = &xmitiq->iocb; + mp = *((MATCHMAP **)iocb); + *((MATCHMAP **)iocb) = 0; + xmitiq->q = NULL; + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + + i = 1; + /* free resources associated with this iocb and repost the ring buffers */ + if (!(binfo->fc_flag & FC_SLI2)) { + for (i = 1; i < (int)iocb->ulpBdeCount; i++) { + mp = fc_getvaddr(p_dev_ctl, rp, (uchar * )((ulong)iocb->un.cont[i].bdeAddress)); + if (mp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + } + } + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + } + return(0); +} + +/**************************************************/ +/** **/ +/** Issue a NameServer query for RSCN processing **/ +/** **/ +/**************************************************/ +_static_ void +fc_issue_ns_query( +fc_dev_ctl_t *p_dev_ctl, +void *a1, +void *a2) +{ + FC_BRD_INFO * binfo; + NODELIST * ndlp; + + binfo = &BINFO; + binfo->fc_flag &= ~FC_NSLOGI_TMR; + /* Now check with NameServer */ + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, NameServer_DID)) == 0) { + /* We can LOGIN to the NameServer now */ + fc_els_cmd(binfo, ELS_CMD_PLOGI, (void *)NameServer_DID, + (uint32)0, (ushort)0, ndlp); + } + else { + /* Issue GID_FT to Nameserver */ + if (fc_ns_cmd(p_dev_ctl, ndlp, SLI_CTNS_GID_FT)) { + /* error so start discovery */ + /* Done with NameServer for now, but keep logged in */ + ndlp->nlp_action &= ~NLP_DO_RSCN; + + /* Fire out PLOGIs on nodes marked for discovery */ + if ((binfo->fc_nlp_cnt <= 0) && + !(binfo->fc_flag & FC_NLP_MORE)) { + binfo->fc_nlp_cnt = 0; + fc_nextrscn(p_dev_ctl, fc_max_els_sent); + } + else { + fc_nextnode(p_dev_ctl, ndlp); + } + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + } + } + return; +} + +_static_ int +fc_abort_discovery( +fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO * binfo; + MAILBOXQ * mb; + + binfo = &BINFO; + + fc_linkdown(p_dev_ctl); + + /* This should turn off DELAYED ABTS for ELS timeouts */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX))) { + fc_set_slim(binfo, (MAILBOX * )mb, 0x052198, 0); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + + /* This is at init, clear la */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_clear_la(binfo, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } else { + binfo->fc_ffstate = FC_ERROR; + /* Device Discovery completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0217, /* ptr to msg structure */ + fc_mes0217, /* ptr to msg */ + fc_msgBlk0217.msgPreambleStr); /* begin & end varargs */ + } + if(FABRICTMO) { + fc_clk_can(p_dev_ctl, FABRICTMO); + FABRICTMO = 0; + } + return(0); +} + +#define FOURBYTES 4 + +/**************************************************/ +/** fc_fdmi_cmd **/ +/** **/ +/** Description: **/ +/** Issue Cmd to HBA Management Server **/ +/** SLI_MGMT_RHBA **/ +/** SLI_MGMT_RPRT **/ +/** SLI_MGMT_DHBA **/ +/** SLI_MGMT_DPRT **/ +/** **/ +/** Accept Payload for those 4 commands **/ +/** is 0 **/ +/** **/ +/** Returns: **/ +/** **/ +/**************************************************/ +_static_ int +fc_fdmi_cmd( +fc_dev_ctl_t *p_dev_ctl, +NODELIST *ndlp, +int cmdcode) +{ + FC_BRD_INFO * binfo; + MATCHMAP * mp, *bmp; + SLI_CT_REQUEST * CtReq; + ULP_BDE64 * bpl; + u32bit size; + PREG_HBA rh; + PPORT_ENTRY pe; + PREG_PORT_ATTRIBUTE pab; + PATTRIBUTE_BLOCK ab; + PATTRIBUTE_ENTRY ae; + uint32 id; + + binfo = &BINFO; + + /* fill in BDEs for command */ + /* Allocate buffer for command payload */ + if ((mp = (MATCHMAP * )fc_mem_get(binfo, MEM_BUF)) == 0) { + return(1); + } + + bmp = 0; + + /* Allocate buffer for Buffer ptr list */ + if ((bmp = (MATCHMAP * )fc_mem_get(binfo, MEM_BPL)) == 0) { + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + return(1); + } + /* FDMI Req */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0218, /* ptr to msg structure */ + fc_mes0218, /* ptr to msg */ + fc_msgBlk0218.msgPreambleStr, /* begin varargs */ + cmdcode, + binfo->fc_flag ); /* end varargs */ + CtReq = (SLI_CT_REQUEST * )mp->virt; + /* + * Initialize mp, 1024 bytes + */ + fc_bzero((void *)CtReq, FCELSSIZE); + + CtReq->RevisionId.bits.Revision = SLI_CT_REVISION; + CtReq->RevisionId.bits.InId = 0; + + CtReq->FsType = SLI_CT_MANAGEMENT_SERVICE; + CtReq->FsSubType = SLI_CT_FDMI_Subtypes; + size = 0; + + switch (cmdcode) { + case SLI_MGMT_RHBA : + { + fc_vpd_t * vp; + char * str; + uint32 i, j, incr; + uchar HWrev[8]; + + vp = &VPD; + + CtReq->CommandResponse.bits.CmdRsp = SWAP_DATA16(SLI_MGMT_RHBA); + CtReq->CommandResponse.bits.Size = 0; + rh = (PREG_HBA)&CtReq->un.PortID; + fc_bcopy((uchar * )&binfo->fc_sparam.portName, (uchar * )&rh->hi.PortName, + sizeof(NAME_TYPE)); + rh->rpl.EntryCnt = SWAP_DATA(1); /* One entry (port) per adapter */ + fc_bcopy((uchar * )&binfo->fc_sparam.portName, (uchar * )&rh->rpl.pe, + sizeof(NAME_TYPE)); + + /* point to the HBA attribute block */ + size = sizeof(NAME_TYPE) + FOURBYTES + sizeof(NAME_TYPE); + ab = (PATTRIBUTE_BLOCK)((uchar *)rh + size); + ab->EntryCnt = 0; + + /* Point to the begin of the first HBA attribute entry */ + /* #1 HBA attribute entry */ + size += FOURBYTES; + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(NODE_NAME); + ae->ad.bits.AttrLen = SWAP_DATA16(sizeof(NAME_TYPE)); + fc_bcopy((uchar * )&binfo->fc_sparam.nodeName, (uchar * )&ae->un.NodeName, + sizeof(NAME_TYPE)); + ab->EntryCnt++; + size += FOURBYTES + sizeof(NAME_TYPE); + + /* #2 HBA attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(MANUFACTURER); + ae->ad.bits.AttrLen = SWAP_DATA16(24); + fc_bcopy("Emulex Network Systems", ae->un.Manufacturer, 22); + ab->EntryCnt++; + size += FOURBYTES + 24; + + /* #3 HBA attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(SERIAL_NUMBER); + ae->ad.bits.AttrLen = SWAP_DATA16(32); + fc_bcopy(binfo->fc_SerialNumber, ae->un.SerialNumber, 32); + ab->EntryCnt++; + size += FOURBYTES + 32; + + /* #4 HBA attribute entry */ + id = fc_rdpci_32(p_dev_ctl, PCI_VENDOR_ID_REGISTER); + switch((id >> 16) & 0xffff) { + case PCI_DEVICE_ID_SUPERFLY: + if((vp->rev.biuRev == 1) || (vp->rev.biuRev == 2) || + (vp->rev.biuRev == 3)) { + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(MODEL); + ae->ad.bits.AttrLen = SWAP_DATA16(8); + fc_bcopy("LP7000", ae->un.Model, 6); + ab->EntryCnt++; + size += FOURBYTES + 8; + + /* #5 HBA attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(MODEL_DESCRIPTION); + ae->ad.bits.AttrLen = SWAP_DATA16(64); + fc_bcopy("Emulex LightPulse LP7000 1 Gigabit PCI Fibre Channel Adapter", + ae->un.ModelDescription, 62); + ab->EntryCnt++; + size += FOURBYTES + 64; + } else { + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(MODEL); + ae->ad.bits.AttrLen = SWAP_DATA16(8); + fc_bcopy("LP7000E", ae->un.Model, 7); + ab->EntryCnt++; + size += FOURBYTES + 8; + + /* #5 HBA attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(MODEL_DESCRIPTION); + ae->ad.bits.AttrLen = SWAP_DATA16(64); + fc_bcopy("Emulex LightPulse LP7000E 1 Gigabit PCI Fibre Channel Adapter", + ae->un.ModelDescription, 62); + ab->EntryCnt++; + size += FOURBYTES + 64; + } + break; + case PCI_DEVICE_ID_DRAGONFLY: + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(MODEL); + ae->ad.bits.AttrLen = SWAP_DATA16(8); + fc_bcopy("LP8000", ae->un.Model, 6); + ab->EntryCnt++; + size += FOURBYTES + 8; + + /* #5 HBA attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(MODEL_DESCRIPTION); + ae->ad.bits.AttrLen = SWAP_DATA16(64); + fc_bcopy("Emulex LightPulse LP8000 1 Gigabit PCI Fibre Channel Adapter", + ae->un.ModelDescription, 62); + ab->EntryCnt++; + size += FOURBYTES + 64; + break; + case PCI_DEVICE_ID_CENTAUR: + if(FC_JEDEC_ID(vp->rev.biuRev) == CENTAUR_2G_JEDEC_ID) { + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(MODEL); + ae->ad.bits.AttrLen = SWAP_DATA16(8); + fc_bcopy("LP9002", ae->un.Model, 6); + ab->EntryCnt++; + size += FOURBYTES + 8; + + /* #5 HBA attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(MODEL_DESCRIPTION); + ae->ad.bits.AttrLen = SWAP_DATA16(64); + fc_bcopy("Emulex LightPulse LP9002 2 Gigabit PCI Fibre Channel Adapter", + ae->un.ModelDescription, 62); + ab->EntryCnt++; + size += FOURBYTES + 64; + } else { + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(MODEL); + ae->ad.bits.AttrLen = SWAP_DATA16(8); + fc_bcopy("LP9000", ae->un.Model, 6); + ab->EntryCnt++; + size += FOURBYTES + 8; + + /* #5 HBA attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(MODEL_DESCRIPTION); + ae->ad.bits.AttrLen = SWAP_DATA16(64); + fc_bcopy("Emulex LightPulse LP9000 1 Gigabit PCI Fibre Channel Adapter", + ae->un.ModelDescription, 62); + ab->EntryCnt++; + size += FOURBYTES + 64; + } + break; + case PCI_DEVICE_ID_PEGASUS: + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(MODEL); + ae->ad.bits.AttrLen = SWAP_DATA16(8); + fc_bcopy("LP9802", ae->un.Model, 6); + ab->EntryCnt++; + size += FOURBYTES + 8; + + /* #5 HBA attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(MODEL_DESCRIPTION); + ae->ad.bits.AttrLen = SWAP_DATA16(64); + fc_bcopy("Emulex LightPulse LP9802 2 Gigabit PCI Fibre Channel Adapter", + ae->un.ModelDescription, 62); + ab->EntryCnt++; + size += FOURBYTES + 64; + break; + case PCI_DEVICE_ID_PFLY: + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(MODEL); + ae->ad.bits.AttrLen = SWAP_DATA16(8); + fc_bcopy("LP982", ae->un.Model, 5); + ab->EntryCnt++; + size += FOURBYTES + 8; + + /* #5 HBA attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(MODEL_DESCRIPTION); + ae->ad.bits.AttrLen = SWAP_DATA16(64); + fc_bcopy("Emulex LightPulse LP982 2 Gigabit PCI Fibre Channel Adapter", + ae->un.ModelDescription, 62); + ab->EntryCnt++; + size += FOURBYTES + 64; + break; + } + + /* #6 HBA attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(HARDWARE_VERSION); + ae->ad.bits.AttrLen = SWAP_DATA16(8); + /* Convert JEDEC ID to ascii for hardware version */ + incr = vp->rev.biuRev; + for(i=0;i<8;i++) { + j = (incr & 0xf); + if(j <= 9) + HWrev[7-i] = (char)((uchar)0x30 + (uchar)j); + else + HWrev[7-i] = (char)((uchar)0x61 + (uchar)(j-10)); + incr = (incr >> 4); + } + fc_bcopy((uchar *)HWrev, ae->un.HardwareVersion, 8); + ab->EntryCnt++; + size += FOURBYTES + 8; + + /* #7 HBA attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(DRIVER_VERSION); + ae->ad.bits.AttrLen = SWAP_DATA16(16); + for (i=0; lpfc_release_version[i]; i++); + fc_bcopy((uchar *)lpfc_release_version, ae->un.DriverVersion, i); + ab->EntryCnt++; + size += FOURBYTES + 16; + + /* #8 HBA attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(OPTION_ROM_VERSION); + ae->ad.bits.AttrLen = SWAP_DATA16(32); + fc_bcopy(binfo->fc_OptionROMVersion, ae->un.OptionROMVersion, 32); + ab->EntryCnt++; + size += FOURBYTES + 32; + + /* #9 HBA attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(FIRMWARE_VERSION); + ae->ad.bits.AttrLen = SWAP_DATA16(32); + str = decode_firmware_rev(binfo, vp); + fc_bcopy((uchar *)str, ae->un.FirmwareVersion, 32); + ab->EntryCnt++; + size += FOURBYTES + 32; + + /* #10 HBA attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(VENDOR_SPECIFIC); + ae->ad.bits.AttrLen = SWAP_DATA16(4); + id = SWAP_LONG(id); + id = (((SWAP_ALWAYS16(id >> 16)) << 16) | SWAP_ALWAYS16(id)); + ae->un.VendorSpecific = id; + ab->EntryCnt++; + size += FOURBYTES + 4; + + /* #11 HBA attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)rh + size); + ae->ad.bits.AttrType = SWAP_DATA16(DRIVER_NAME); + ae->ad.bits.AttrLen = SWAP_DATA16(4); + fc_bcopy("lpfc", ae->un.DriverName, 4); + ab->EntryCnt++; + size += FOURBYTES + 4; + + + + ab->EntryCnt = SWAP_DATA(ab->EntryCnt); + /* Total size */ + size = GID_REQUEST_SZ - 4 + size; + } + break; + + case SLI_MGMT_RPRT : + { + fc_vpd_t * vp; + SERV_PARM * hsp; + + vp = &VPD; + + CtReq->CommandResponse.bits.CmdRsp = SWAP_DATA16(SLI_MGMT_RPRT); + CtReq->CommandResponse.bits.Size = 0; + pab = (PREG_PORT_ATTRIBUTE)&CtReq->un.PortID; + size = sizeof(NAME_TYPE) + sizeof(NAME_TYPE) + FOURBYTES; + fc_bcopy((uchar * )&binfo->fc_sparam.portName, (uchar * )&pab->HBA_PortName, + sizeof(NAME_TYPE)); + fc_bcopy((uchar * )&binfo->fc_sparam.portName, (uchar * )&pab->PortName, + sizeof(NAME_TYPE)); + pab->ab.EntryCnt = 0; + + /* #1 Port attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)pab + size); + ae->ad.bits.AttrType = SWAP_DATA16(SUPPORTED_FC4_TYPES); + ae->ad.bits.AttrLen = SWAP_DATA16(8); + ae->un.SupportFC4Types[4] = 1; + pab->ab.EntryCnt++; + size += FOURBYTES + 8; + + /* #2 Port attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)pab + size); + ae->ad.bits.AttrType = SWAP_DATA16(SUPPORTED_SPEED); + ae->ad.bits.AttrLen = SWAP_DATA16(4); + if(FC_JEDEC_ID(vp->rev.biuRev) == CENTAUR_2G_JEDEC_ID) + ae->un.SupportSpeed = HBA_PORTSPEED_2GBIT; + else + ae->un.SupportSpeed = HBA_PORTSPEED_1GBIT; + pab->ab.EntryCnt++; + size += FOURBYTES + 4; + + /* #3 Port attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)pab + size); + ae->ad.bits.AttrType = SWAP_DATA16(PORT_SPEED); + ae->ad.bits.AttrLen = SWAP_DATA16(4); + if( binfo->fc_linkspeed == LA_2GHZ_LINK) + ae->un.PortSpeed = HBA_PORTSPEED_2GBIT; + else + ae->un.PortSpeed = HBA_PORTSPEED_1GBIT; + pab->ab.EntryCnt++; + size += FOURBYTES + 4; + + /* #4 Port attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)pab + size); + ae->ad.bits.AttrType = SWAP_DATA16(MAX_FRAME_SIZE); + ae->ad.bits.AttrLen = SWAP_DATA16(4); + hsp = (SERV_PARM *)&binfo->fc_sparam; + ae->un.MaxFrameSize = (((uint32)hsp->cmn.bbRcvSizeMsb) << 8) | + (uint32)hsp->cmn.bbRcvSizeLsb; + pab->ab.EntryCnt++; + size += FOURBYTES + 4; + + /* #5 Port attribute entry */ + ae = (PATTRIBUTE_ENTRY)((uchar *)pab + size); + ae->ad.bits.AttrType = SWAP_DATA16(OS_DEVICE_NAME); + ae->ad.bits.AttrLen = SWAP_DATA16(4); + fc_bcopy("lpfc", (uchar * )&ae->un.DriverName, 4); + pab->ab.EntryCnt++; + size += FOURBYTES + 4; + + pab->ab.EntryCnt = SWAP_DATA(pab->ab.EntryCnt); + /* Total size */ + size = GID_REQUEST_SZ - 4 + size; + } + break; + + case SLI_MGMT_DHBA : + CtReq->CommandResponse.bits.CmdRsp = SWAP_DATA16(SLI_MGMT_DHBA); + CtReq->CommandResponse.bits.Size = 0; + pe = (PPORT_ENTRY)&CtReq->un.PortID; + fc_bcopy((uchar * )&binfo->fc_sparam.portName, (uchar * )&pe->PortName, + sizeof(NAME_TYPE)); + size = GID_REQUEST_SZ - 4 + sizeof(NAME_TYPE); + break; + + case SLI_MGMT_DPRT : + CtReq->CommandResponse.bits.CmdRsp = SWAP_DATA16(SLI_MGMT_DPRT); + CtReq->CommandResponse.bits.Size = 0; + pe = (PPORT_ENTRY)&CtReq->un.PortID; + fc_bcopy((uchar * )&binfo->fc_sparam.portName, (uchar * )&pe->PortName, + sizeof(NAME_TYPE)); + size = GID_REQUEST_SZ - 4 + sizeof(NAME_TYPE); + break; + } + + bpl = (ULP_BDE64 * )bmp->virt; + bpl->addrHigh = PCIMEM_LONG((uint32)putPaddrHigh(mp->phys)); + bpl->addrLow = PCIMEM_LONG((uint32)putPaddrLow(mp->phys)); + bpl->tus.f.bdeFlags = 0; + bpl->tus.f.bdeSize = size; + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + + + if(fc_ct_cmd(p_dev_ctl, mp, bmp, ndlp)) { + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + } + return(0); +} /* End fc_ns_cmd */ + +/**************************************************/ +/** fc_fdmi_rsp **/ +/** **/ +/** Description: **/ +/** Process Rsp from HBA Management Server **/ +/** SLI_MGMT_RHBA **/ +/** SLI_MGMT_RPRT **/ +/** SLI_MGMT_DHBA **/ +/** SLI_MGMT_DPRT **/ +/** **/ +/** Returns: **/ +/** **/ +/**************************************************/ +_static_ void +fc_fdmi_rsp( +fc_dev_ctl_t *p_dev_ctl, +MATCHMAP *mp, +MATCHMAP *rsp_mp) + +{ + FC_BRD_INFO * binfo; + SLI_CT_REQUEST * Cmd; + SLI_CT_REQUEST * Rsp; + NODELIST * ndlp; + ushort fdmi_cmd; + ushort fdmi_rsp; + int rc; + + binfo = &BINFO; + + ndlp = (NODELIST *)mp->fc_mptr; + Cmd = (SLI_CT_REQUEST *)mp->virt; + Rsp = (SLI_CT_REQUEST *)rsp_mp->virt; + + fdmi_rsp = Rsp->CommandResponse.bits.CmdRsp; + + fdmi_cmd = Cmd->CommandResponse.bits.CmdRsp; + rc = 1; + + switch (SWAP_DATA16(fdmi_cmd)) { + case SLI_MGMT_RHBA : + rc = fc_fdmi_cmd(p_dev_ctl, ndlp, SLI_MGMT_RPRT); + break; + + case SLI_MGMT_RPRT : + break; + + case SLI_MGMT_DHBA : + rc = fc_fdmi_cmd(p_dev_ctl, ndlp, SLI_MGMT_RHBA); + break; + + case SLI_MGMT_DPRT : + rc = fc_fdmi_cmd(p_dev_ctl, ndlp, SLI_MGMT_DHBA); + break; + } + + if (rc) { + /* FDMI rsp failed */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0251, /* ptr to msg structure */ + fc_mes0251, /* ptr to msg */ + fc_msgBlk0251.msgPreambleStr, /* begin varargs */ + SWAP_DATA16(fdmi_cmd) ); /* end varargs */ + } +} /* fc_fdmi_rsp */ + + +/*****************************************************************************/ +/* + * NAME: fc_plogi_put + * + * FUNCTION: put iocb cmd onto the iocb plogi queue. + * + * EXECUTION ENVIRONMENT: process and interrupt level. + * + * NOTES: + * + * CALLED FROM: + * issue_els_cmd + * + * INPUT: + * binfo - pointer to the device info area + * iocbq - pointer to iocb queue entry + * + * RETURNS: + * NULL - command queued + */ +/*****************************************************************************/ +_static_ void +fc_plogi_put( +FC_BRD_INFO *binfo, +IOCBQ *iocbq) /* pointer to iocbq entry */ +{ + if (binfo->fc_plogi.q_first) { + /* queue command to end of list */ + ((IOCBQ * )binfo->fc_plogi.q_last)->q = (uchar * )iocbq; + binfo->fc_plogi.q_last = (uchar * )iocbq; + } else { + /* add command to empty list */ + binfo->fc_plogi.q_first = (uchar * )iocbq; + binfo->fc_plogi.q_last = (uchar * )iocbq; + } + + iocbq->q = NULL; + binfo->fc_plogi.q_cnt++; + binfo->fc_flag |= FC_DELAY_NSLOGI; + return; + +} /* End fc_plogi_put */ + + +/*****************************************************************************/ +/* + * NAME: fc_plogi_get + * + * FUNCTION: get a iocb command from iocb plogi command queue + * + * EXECUTION ENVIRONMENT: interrupt level. + * + * NOTES: + * + * CALLED FROM: + * handle_mb_event + * + * INPUT: + * binfo - pointer to the device info area + * + * RETURNS: + * NULL - no match found + * iocb pointer - pointer to a iocb command + */ +/*****************************************************************************/ +_static_ IOCBQ * +fc_plogi_get( +FC_BRD_INFO *binfo) +{ + IOCBQ * p_first = NULL; + + if (binfo->fc_plogi.q_first) { + p_first = (IOCBQ * )binfo->fc_plogi.q_first; + if ((binfo->fc_plogi.q_first = p_first->q) == 0) { + binfo->fc_plogi.q_last = 0; + binfo->fc_flag &= ~FC_DELAY_NSLOGI; + } + p_first->q = NULL; + binfo->fc_plogi.q_cnt--; + } + return(p_first); + +} /* End fc_plogi_get */ + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fcfgparm.h 999-mjb/drivers/scsi/lpfc/fcfgparm.h --- 000-virgin/drivers/scsi/lpfc/fcfgparm.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fcfgparm.h 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,341 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#ifndef _H_CFGPARAM +#define _H_CFGPARAM + +#define LPFC_DFT_POST_IP_BUF 128 +#define LPFC_MIN_POST_IP_BUF 64 +#define LPFC_MAX_POST_IP_BUF 1024 +#define LPFC_DFT_XMT_QUE_SIZE 256 +#define LPFC_MIN_XMT_QUE_SIZE 128 +#define LPFC_MAX_XMT_QUE_SIZE 10240 +#define LPFC_DFT_NUM_IOCBS 1024 +#define LPFC_MIN_NUM_IOCBS 128 +#define LPFC_MAX_NUM_IOCBS 10240 +#define LPFC_DFT_NUM_BUFS 1024 +#define LPFC_MIN_NUM_BUFS 64 +#define LPFC_MAX_NUM_BUFS 4096 +#define LPFC_DFT_NUM_NODES 510 +#define LPFC_MIN_NUM_NODES 64 +#define LPFC_MAX_NUM_NODES 4096 +#define LPFC_DFT_TOPOLOGY 0 +#define LPFC_DFT_FC_CLASS 3 + +#define LPFC_DFT_NO_DEVICE_DELAY 1 /* 1 sec */ +#define LPFC_MAX_NO_DEVICE_DELAY 30 /* 30 sec */ +#define LPFC_DFT_FABRIC_TIMEOUT 0 +#define LPFC_MAX_FABRIC_TIMEOUT 255 /* 255 sec */ +#define LPFC_DFT_LNKDWN_TIMEOUT 30 +#define LPFC_MAX_LNKDWN_TIMEOUT 255 /* 255 sec */ +#define LPFC_DFT_NODEV_TIMEOUT 0 +#define LPFC_MAX_NODEV_TIMEOUT 255 /* 255 sec */ +#define LPFC_DFT_RSCN_NS_DELAY 0 +#define LPFC_MAX_RSCN_NS_DELAY 255 /* 255 sec */ + +#define LPFC_MAX_TGT_Q_DEPTH 10240 /* max cmds allowed per tgt */ +#define LPFC_DFT_TGT_Q_DEPTH 0 /* default max cmds per tgt */ + +#define LPFC_MAX_LUN_Q_DEPTH 128 /* max cmds to allow per lun */ +#define LPFC_DFT_LUN_Q_DEPTH 30 /* default max cmds per lun */ + +#define LPFC_MAX_DQFULL_THROTTLE 1 /* Boolean (max value) */ + +#define CFG_INTR_ACK 0 /* intr-ack */ +#define CFG_LOG_VERBOSE 1 /* log-verbose */ +#define CFG_LOG_ONLY 2 /* log-only */ +#define CFG_IDENTIFY_SELF 3 /* identify-self */ +#define CFG_NUM_IOCBS 4 /* num-iocbs */ +#define CFG_NUM_BUFS 5 /* num-bufs */ +#define CFG_FCP_ON 6 /* fcp-on */ +#define CFG_DEVICE_REPORT 7 /* device-report */ +#define CFG_AUTOMAP 8 /* automap */ +#define CFG_DFT_TGT_Q_DEPTH 9 /* tgt_queue_depth */ +#define CFG_DFT_LUN_Q_DEPTH 10 /* lun_queue_depth */ +#define CFG_FIRST_CHECK 11 /* first-check */ +#define CFG_FCPFABRIC_TMO 12 /* fcpfabric-tmo */ +#define CFG_FCP_CLASS 13 /* fcp-class */ +#define CFG_USE_ADISC 14 /* use-adisc */ +#define CFG_NO_DEVICE_DELAY 15 /* no-device-delay */ +#define CFG_NETWORK_ON 16 /* network-on */ +#define CFG_POST_IP_BUF 17 /* post-ip-buf */ +#define CFG_XMT_Q_SIZE 18 /* xmt-que-size */ +#define CFG_IP_CLASS 19 /* ip-class */ +#define CFG_ACK0 20 /* ack0 */ +#define CFG_TOPOLOGY 21 /* topology */ +#define CFG_SCAN_DOWN 22 /* scan-down */ +#define CFG_LINKDOWN_TMO 23 /* linkdown-tmo */ +#define CFG_USE_LOMEM 24 /* use-lomempages */ +#define CFG_ZONE_RSCN 25 /* zone-rscn */ +#define CFG_HOLDIO 26 /* nodev-holdio */ +#define CFG_DELAY_RSP_ERR 27 /* delay-rsp-err */ +#define CFG_CHK_COND_ERR 28 /* check-cond-err */ +#define CFG_NODEV_TMO 29 /* nodev-tmo */ +#define CFG_DQFULL_THROTTLE 30 /* dqfull-throttle */ +#define CFG_LINK_SPEED 31 /* link-speed NEW_FETURE */ +#define CFG_QFULL_RSP_ERR 32 /* qfull-rsp-err */ +#define CFG_DQFULL_THROTTLE_UP_TIME 33 /* dqfull-throttle-up-time */ +#define CFG_DQFULL_THROTTLE_UP_INC 34 /* dqfull-throttle-up-inc */ +#define CFG_NUM_NODES 35 /* num-nodes */ +#define CFG_CR_DELAY 36 /* cr-delay */ +#define CFG_CR_COUNT 37 /* cr-count */ +#define NUM_CFG_PARAM 38 + +#ifdef DEF_ICFG +_static_ iCfgParam icfgparam[NUM_CFG_PARAM] = { + + /* general driver parameters */ + { "intr-ack", + 0, 1, TRUE, 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "Claim interrupt even if no work discovered" }, + + { "log-verbose", + 0, 0xffff, FALSE, 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "Verbose logging mask" }, + + { "log-only", + 0, 2, TRUE, 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "Log messages only go to system logger, not console" }, + + { "identify-self", + 0, 2, TRUE, 0, + (ushort)0, + (ushort)CFG_REBOOT, + "Driver startup will report driver version and release information" }, + + { "num-iocbs", + LPFC_MIN_NUM_IOCBS, LPFC_MAX_NUM_IOCBS, LPFC_DFT_NUM_IOCBS, 0, + (ushort)0, + (ushort)CFG_RESTART, + "Number of outstanding IOCBs driver can queue to adapter" }, + + { "num-bufs", + LPFC_MIN_NUM_BUFS, LPFC_MAX_NUM_BUFS, LPFC_DFT_NUM_BUFS, 0, + (ushort)0, + (ushort)CFG_RESTART, + "Number of buffers driver uses for ELS commands and Buffer Pointer Lists." }, + + /* FCP specific parameters */ + { "fcp-on", + 0, 1, TRUE, 0, + (ushort)0, + (ushort)CFG_REBOOT, + "Enable FCP processing" }, + + { "device-report", + 0, 1, TRUE, 0, + (ushort)0, + (ushort)CFG_RESTART, + "Driver will report FCP devices as it finds them" }, + + { "automap", + 0, 3, 2, 0, + (ushort)0, + (ushort)CFG_RESTART, + "Automatically bind FCP devices as they are discovered" }, + + { "tgt-queue-depth", + 0, LPFC_MAX_TGT_Q_DEPTH, LPFC_DFT_TGT_Q_DEPTH, 0, + (ushort)0, + (ushort)CFG_RESTART, + "Max number of FCP commands we can queue to a specific target" }, + + { "lun-queue-depth", + 0, LPFC_MAX_LUN_Q_DEPTH, LPFC_DFT_LUN_Q_DEPTH, 0, + (ushort)0, + (ushort)CFG_RESTART, + "Max number of FCP commands we can queue to a specific LUN" }, + + { "first-check", + 0, 1, + FALSE, + 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "Retry the first 29xx check condition for FCP devices during discovery" }, + + { "fcpfabric-tmo", + 0, LPFC_MAX_FABRIC_TIMEOUT, LPFC_DFT_FABRIC_TIMEOUT, 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "Extra FCP command timeout when connected to a fabric" }, + + { "fcp-class", + 2, 3, LPFC_DFT_FC_CLASS, 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "Select Fibre Channel class of service for FCP sequences" }, + + { "use-adisc", + 0, 1, FALSE, 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "Use ADISC on rediscovery to authenticate FCP devices" }, + + { "no-device-delay", + 0, LPFC_MAX_NO_DEVICE_DELAY, LPFC_DFT_NO_DEVICE_DELAY, 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "No FCP device failed I/O sec delay" }, + + /* IP specific parameters */ + { "network-on", + 0, 1, FALSE, 0, + (ushort)0, + (ushort)CFG_REBOOT, + "Enable IP processing" }, + + { "post-ip-buf", + LPFC_MIN_POST_IP_BUF, LPFC_MAX_POST_IP_BUF, LPFC_DFT_POST_IP_BUF, 0, + (ushort)0, + (ushort)CFG_RESTART, + "Number of IP buffers to post to adapter" }, + + { "xmt-que-size", + LPFC_MIN_XMT_QUE_SIZE, LPFC_MAX_XMT_QUE_SIZE, LPFC_DFT_XMT_QUE_SIZE, 0, + (ushort)0, + (ushort)CFG_RESTART, + "Number of outstanding IP cmds for an adapter" }, + + { "ip-class", + 2, 3, LPFC_DFT_FC_CLASS, 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "Select Fibre Channel class of service for IP sequences" }, + + /* Fibre Channel specific parameters */ + { "ack0", + 0, 1, FALSE, 0, + (ushort)0, + (ushort)CFG_RESTART, + "Enable ACK0 support" }, + + { "topology", + 0, 6, LPFC_DFT_TOPOLOGY, 0, + (ushort)0, + (ushort)CFG_RESTART, + "Select Fibre Channel topology" }, + + { "scan-down", + 0, 2, 2, 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "Start scanning for devices from highest ALPA to lowest" }, + + { "linkdown-tmo", + 0, LPFC_MAX_LNKDWN_TIMEOUT, LPFC_DFT_LNKDWN_TIMEOUT, 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "Seconds driver will wait before deciding link is really down" }, + + { "use-lomempages", + 0, 1, FALSE, 0, + (ushort)0, + (ushort)CFG_RESTART, + "Use low memory for adapter DMA buffers" }, + + { "zone-rscn", + 0, 1, FALSE, 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "Force RSCNs to always check NameServer for N_Port IDs" }, + + { "nodev-holdio", + 0, 1, FALSE, 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "Hold I/O errors if device disappears " }, + + { "delay-rsp-err", + 0, 1, FALSE, 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "Delay FCP error return for FCP RSP error and Check Condition" }, + + { "check-cond-err", + 0, 1, FALSE, 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "Treat special Check Conditions as a FCP error" }, + + { "nodev-tmo", + 0, LPFC_MAX_NODEV_TIMEOUT, LPFC_DFT_NODEV_TIMEOUT, 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "Seconds driver will hold I/O waiting for a device to come back" }, + + { "dqfull-throttle", + 0, 1, 1, 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "Decrement LUN throttle on a queue full condition" }, + + { "link-speed", + 0, 2, 0, 0, + (ushort)0, + (ushort)CFG_RESTART, + "Select link speed" }, + + { "qfull-rsp-err", + 0, 1, FALSE, 0, + (ushort)0, + (ushort)CFG_DYNAMIC, + "Return BUSY (default) or TERMINATED as SCSI status on a queue full condition" }, + + { "dqfull-throttle-up-time", + 0, 30, 1, 0, + (ushort)0, + (ushort)CFG_RESTART, + "When to increment the current Q depth " }, + + { "dqfull-throttle-up-inc", + 0, LPFC_MAX_LUN_Q_DEPTH, 1, 0, + (ushort)0, + (ushort)CFG_RESTART, + "Increment the current Q depth by dqfull-throttle-up-inc" }, + + { "num-nodes", + LPFC_MIN_NUM_NODES, LPFC_MAX_NUM_NODES, LPFC_DFT_NUM_NODES, 0, + (ushort)0, + (ushort)CFG_RESTART, + "Number of fibre channel nodes (NPorts) the driver will support." }, + + { "cr-delay", + 0, 63, 0, 0, + (ushort)0, + (ushort)CFG_RESTART, + "A count of milliseconds after which an interrupt response is generated" }, + + { "cr-count", + 1, 255, 0, 0, + (ushort)0, + (ushort)CFG_RESTART, + "A count of I/O completions after which an interrupt response is generated" }, + + }; +#endif /* DEF_ICFG */ + +#endif /* _H_CFGPARAM */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fcmboxb.c 999-mjb/drivers/scsi/lpfc/fcmboxb.c --- 000-virgin/drivers/scsi/lpfc/fcmboxb.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fcmboxb.c 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,1013 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#include "fc_os.h" + +#include "fc_hw.h" +#include "fc.h" + +#include "fcdiag.h" +#include "fcfgparm.h" +#include "fcmsg.h" +#include "fc_crtn.h" +#include "fc_ertn.h" + +extern fc_dd_ctl_t DD_CTL; +extern iCfgParam icfgparam[]; + +/* Routine Declaration - Local */ +/* There currently are no local routine declarations */ +/* End Routine Declaration - Local */ + + +/**********************************************/ +/** fc_restart Issue a RESTART **/ +/** mailbox command **/ +/**********************************************/ +_static_ void +fc_restart( +FC_BRD_INFO *binfo, +MAILBOX *mb, +int doit) +{ + void *ioa; + MAILBOX * mbox; + fc_dev_ctl_t *p_dev_ctl; + + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + mb->mbxCommand = MBX_RESTART; + mb->mbxHc = OWN_CHIP; + mb->mbxOwner = OWN_HOST; + + if (doit) { + /* use REAL SLIM !!! */ + p_dev_ctl = (fc_dev_ctl_t *)(binfo->fc_p_dev_ctl); + binfo->fc_mboxaddr = 0; + binfo->fc_flag &= ~FC_SLI2; + + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + mbox = FC_MAILBOX(binfo, ioa); + WRITE_SLIM_COPY(binfo, (uint32 *)&mb->un.varWords, (uint32 *)&mbox->un.varWords, + (MAILBOX_CMD_WSIZE - 1)); + FC_UNMAP_MEMIO(ioa); + } + return; +} /* End fc_restart */ + + +/**********************************************/ +/** fc_dump_mem Issue a DUMP MEMORY **/ +/** mailbox command **/ +/**********************************************/ +_static_ void +fc_dump_mem( +FC_BRD_INFO *binfo, +MAILBOX *mb) +{ + /* Setup to dump VPD region */ + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + mb->mbxCommand = MBX_DUMP_MEMORY; + mb->un.varDmp.cv = 1; + mb->un.varDmp.type = DMP_NV_PARAMS; + mb->un.varDmp.region_id = DMP_REGION_VPD; + mb->un.varDmp.word_cnt = (DMP_VPD_SIZE / sizeof(uint32)); + + mb->un.varDmp.co = 0; + mb->un.varDmp.resp_offset = 0; + mb->mbxOwner = OWN_HOST; + return; +} /* End fc_dump_mem */ + + +/**********************************************/ +/** fc_read_nv Issue a READ NVPARAM **/ +/** mailbox command **/ +/**********************************************/ +_static_ void +fc_read_nv( +FC_BRD_INFO *binfo, +MAILBOX *mb) +{ + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + mb->mbxCommand = MBX_READ_NV; + mb->mbxOwner = OWN_HOST; + return; +} /* End fc_read_nv */ + +/**********************************************/ +/** fc_read_rev Issue a READ REV **/ +/** mailbox command **/ +/**********************************************/ +_static_ void +fc_read_rev( +FC_BRD_INFO *binfo, +MAILBOX *mb) +{ + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + mb->un.varRdRev.cv = 1; + mb->mbxCommand = MBX_READ_REV; + mb->mbxOwner = OWN_HOST; + return; +} /* End fc_read_rev */ + +/**********************************************/ +/** fc_runBIUdiag Issue a RUN_BIU_DIAG **/ +/** mailbox command **/ +/**********************************************/ +_static_ int +fc_runBIUdiag( +FC_BRD_INFO *binfo, +MAILBOX *mb, +uchar *in, +uchar *out) +{ + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + + if (binfo->fc_flag & FC_SLI2) { + mb->mbxCommand = MBX_RUN_BIU_DIAG64; + mb->un.varBIUdiag.un.s2.xmit_bde64.tus.f.bdeSize = FCELSSIZE; + mb->un.varBIUdiag.un.s2.xmit_bde64.addrHigh = (uint32)putPaddrHigh(in); + mb->un.varBIUdiag.un.s2.xmit_bde64.addrLow = (uint32)putPaddrLow(in); + mb->un.varBIUdiag.un.s2.rcv_bde64.tus.f.bdeSize = FCELSSIZE; + mb->un.varBIUdiag.un.s2.rcv_bde64.addrHigh = (uint32)putPaddrHigh(out); + mb->un.varBIUdiag.un.s2.rcv_bde64.addrLow = (uint32)putPaddrLow(out); + } else { + mb->mbxCommand = MBX_RUN_BIU_DIAG; + mb->un.varBIUdiag.un.s1.xmit_bde.bdeSize = FCELSSIZE; + mb->un.varBIUdiag.un.s1.xmit_bde.bdeAddress = (uint32)putPaddrLow(in); + mb->un.varBIUdiag.un.s1.rcv_bde.bdeSize = FCELSSIZE; + mb->un.varBIUdiag.un.s1.rcv_bde.bdeAddress = (uint32)putPaddrLow(out); + } + + mb->mbxOwner = OWN_HOST; + return(0); +} /* End fc_runBIUdiag */ + + +/**********************************************/ +/** fc_read_la Issue a READ LA **/ +/** mailbox command **/ +/**********************************************/ +_static_ int +fc_read_la( +fc_dev_ctl_t *p_dev_ctl, +MAILBOX *mb) +{ + FC_BRD_INFO * binfo; + MATCHMAP * mp; + + binfo = &BINFO; + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + + if ((mp = (MATCHMAP * )fc_mem_get(binfo, MEM_BUF)) == 0) { + + if (binfo->fc_flag & FC_SLI2) + mb->mbxCommand = MBX_READ_LA64; + else + mb->mbxCommand = MBX_READ_LA; + /* READ_LA: no buffers */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0300, /* ptr to msg structure */ + fc_mes0300, /* ptr to msg */ + fc_msgBlk0300.msgPreambleStr); /* begin & end varargs */ + return(1); + } + + if (binfo->fc_flag & FC_SLI2) { + mb->mbxCommand = MBX_READ_LA64; + mb->un.varReadLA.un.lilpBde64.tus.f.bdeSize = 128; + mb->un.varReadLA.un.lilpBde64.addrHigh = (uint32)putPaddrHigh(mp->phys); + mb->un.varReadLA.un.lilpBde64.addrLow = (uint32)putPaddrLow(mp->phys); + } else { + mb->mbxCommand = MBX_READ_LA; + mb->un.varReadLA.un.lilpBde.bdeSize = 128; + mb->un.varReadLA.un.lilpBde.bdeAddress = (uint32)putPaddrLow(mp->phys); + } + + /* save address for completion */ + ((MAILBOXQ * )mb)->bp = (uchar * )mp; + + mb->mbxOwner = OWN_HOST; + return(0); +} /* End fc_read_la */ + + +/**********************************************/ +/** fc_clear_la Issue a CLEAR LA **/ +/** mailbox command **/ +/**********************************************/ +_static_ void +fc_clear_la( +FC_BRD_INFO *binfo, +MAILBOX *mb) +{ + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + mb->un.varClearLA.eventTag = binfo->fc_eventTag; + mb->mbxCommand = MBX_CLEAR_LA; + mb->mbxOwner = OWN_HOST; + return; +} /* End fc_clear_la */ + + +/**********************************************/ +/** fc_read_status Issue a READ STATUS **/ +/** mailbox command **/ +/**********************************************/ +_static_ void +fc_read_status( +FC_BRD_INFO *binfo, +MAILBOX *mb) +{ + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + mb->mbxCommand = MBX_READ_STATUS; + mb->mbxOwner = OWN_HOST; + return; +} /* End fc_read_status */ + +/**********************************************/ +/** fc_read_lnk_stat Issue a LINK STATUS **/ +/** mailbox command **/ +/**********************************************/ +_static_ void +fc_read_lnk_stat( +FC_BRD_INFO *binfo, +MAILBOX *mb) +{ + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + mb->mbxCommand = MBX_READ_LNK_STAT; + mb->mbxOwner = OWN_HOST; + return; +} /* End fc_read_lnk_stat */ + + +/**************************************************/ +/** fc_config_ring Issue a CONFIG RING **/ +/** mailbox command **/ +/**************************************************/ +_static_ void +fc_config_ring( +FC_BRD_INFO *binfo, +int ring, +int profile, +MAILBOX *mb) +{ + int i; + int j; + + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + mb->un.varCfgRing.ring = ring; + mb->un.varCfgRing.profile = profile; + mb->un.varCfgRing.maxOrigXchg = 0; + mb->un.varCfgRing.maxRespXchg = 0; + mb->un.varCfgRing.recvNotify = 1; + mb->un.varCfgRing.numMask = binfo->fc_nummask[ring]; + + j = 0; + for (i = 0; i < ring; i++) + j += binfo->fc_nummask[i]; + + for (i = 0; i < binfo->fc_nummask[ring]; i++) { + mb->un.varCfgRing.rrRegs[i].rval = binfo->fc_rval[j + i]; + if (mb->un.varCfgRing.rrRegs[i].rval != FC_ELS_REQ) /* ELS request */ + mb->un.varCfgRing.rrRegs[i].rmask = 0xff; + else + mb->un.varCfgRing.rrRegs[i].rmask = 0xfe; + mb->un.varCfgRing.rrRegs[i].tval = binfo->fc_tval[j + i]; + mb->un.varCfgRing.rrRegs[i].tmask = 0xff; + } + + mb->mbxCommand = MBX_CONFIG_RING; + mb->mbxOwner = OWN_HOST; + return; +} /* End fc_config_ring */ + + +/**************************************************/ +/** fc_config_link Issue a CONFIG LINK **/ +/** mailbox command **/ +/**************************************************/ +_static_ void +fc_config_link( +fc_dev_ctl_t *p_dev_ctl, +MAILBOX *mb) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + + if(clp[CFG_CR_DELAY].a_current) { + mb->un.varCfgLnk.cr = 1; + mb->un.varCfgLnk.ci = 1; + mb->un.varCfgLnk.cr_delay = clp[CFG_CR_DELAY].a_current; + mb->un.varCfgLnk.cr_count = clp[CFG_CR_COUNT].a_current; + } + + mb->un.varCfgLnk.myId = binfo->fc_myDID; + mb->un.varCfgLnk.edtov = binfo->fc_edtov; + mb->un.varCfgLnk.arbtov = binfo->fc_arbtov; + mb->un.varCfgLnk.ratov = binfo->fc_ratov; + mb->un.varCfgLnk.rttov = binfo->fc_rttov; + mb->un.varCfgLnk.altov = binfo->fc_altov; + mb->un.varCfgLnk.crtov = binfo->fc_crtov; + mb->un.varCfgLnk.citov = binfo->fc_citov; + if(clp[CFG_ACK0].a_current) + mb->un.varCfgLnk.ack0_enable = 1; + + mb->mbxCommand = MBX_CONFIG_LINK; + mb->mbxOwner = OWN_HOST; + return; +} /* End fc_config_link */ + + +/**********************************************/ +/** fc_init_link Issue an INIT LINK **/ +/** mailbox command **/ +/**********************************************/ +_static_ void +fc_init_link( +FC_BRD_INFO *binfo, +MAILBOX *mb, +uint32 topology, +uint32 linkspeed) +{ + iCfgParam * clp; + fc_vpd_t * vpd; + + clp = DD_CTL.p_config[binfo->fc_brd_no]; + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + + switch (topology) { + case FLAGS_TOPOLOGY_MODE_LOOP_PT: + mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_LOOP; + mb->un.varInitLnk.link_flags |= FLAGS_TOPOLOGY_FAILOVER; + break; + case FLAGS_TOPOLOGY_MODE_PT_PT: + mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_PT_PT; + break; + case FLAGS_TOPOLOGY_MODE_LOOP: + mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_LOOP; + break; + case FLAGS_TOPOLOGY_MODE_PT_LOOP: + mb->un.varInitLnk.link_flags = FLAGS_TOPOLOGY_MODE_PT_PT; + mb->un.varInitLnk.link_flags |= FLAGS_TOPOLOGY_FAILOVER; + break; + } + + vpd = &((fc_dev_ctl_t *)(binfo->fc_p_dev_ctl))->vpd; + if (binfo->fc_flag & FC_2G_CAPABLE) { + if ((vpd->rev.feaLevelHigh >= 0x02) && (linkspeed > 0)) { + mb->un.varInitLnk.link_flags |= FLAGS_LINK_SPEED; + mb->un.varInitLnk.link_speed = linkspeed; + } + } + + mb->mbxCommand = (volatile uchar)MBX_INIT_LINK; + mb->mbxOwner = OWN_HOST; + mb->un.varInitLnk.fabric_AL_PA = binfo->fc_pref_ALPA; + return; +} /* End fc_init_link */ + + +/**********************************************/ +/** fc_down_link Issue a DOWN LINK **/ +/** mailbox command **/ +/**********************************************/ +_static_ void +fc_down_link( +FC_BRD_INFO *binfo, +MAILBOX *mb) +{ + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + + mb->mbxCommand = MBX_DOWN_LINK; + mb->mbxOwner = OWN_HOST; + return; +} + + +/**********************************************/ +/** fc_read_sparam Issue a READ SPARAM **/ +/** mailbox command **/ +/**********************************************/ +_static_ int +fc_read_sparam( +fc_dev_ctl_t *p_dev_ctl, +MAILBOX *mb) +{ + FC_BRD_INFO * binfo; + MATCHMAP * mp; + + binfo = &BINFO; + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + + mb->mbxOwner = OWN_HOST; + + if ((mp = (MATCHMAP * )fc_mem_get(binfo, MEM_BUF)) == 0) { + + if (binfo->fc_flag & FC_SLI2) + mb->mbxCommand = MBX_READ_SPARM64; + else + mb->mbxCommand = MBX_READ_SPARM; + /* READ_SPARAM: no buffers */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0301, /* ptr to msg structure */ + fc_mes0301, /* ptr to msg */ + fc_msgBlk0301.msgPreambleStr); /* begin & end varargs */ + return(1); + } + + if (binfo->fc_flag & FC_SLI2) { + mb->mbxCommand = MBX_READ_SPARM64; + mb->un.varRdSparm.un.sp64.tus.f.bdeSize = sizeof(SERV_PARM); + mb->un.varRdSparm.un.sp64.addrHigh = (uint32)putPaddrHigh(mp->phys); + mb->un.varRdSparm.un.sp64.addrLow = (uint32)putPaddrLow(mp->phys); + } else { + mb->mbxCommand = MBX_READ_SPARM; + mb->un.varRdSparm.un.sp.bdeSize = sizeof(SERV_PARM); + mb->un.varRdSparm.un.sp.bdeAddress = (uint32)putPaddrLow(mp->phys); + } + + /* save address for completion */ + ((MAILBOXQ * )mb)->bp = (uchar * )mp; + + return(0); +} /* End fc_read_sparam */ + + +/**********************************************/ +/** fc_read_rpi Issue a READ RPI **/ +/** mailbox command **/ +/**********************************************/ +_static_ int +fc_read_rpi( +FC_BRD_INFO *binfo, +uint32 rpi, +MAILBOX *mb, +uint32 flag) +{ + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + + mb->un.varRdRPI.reqRpi = (volatile ushort)rpi; + + if (binfo->fc_flag & FC_SLI2) { + mb->mbxCommand = MBX_READ_RPI64; + } else { + mb->mbxCommand = MBX_READ_RPI; + } + + mb->mbxOwner = OWN_HOST; + + mb->un.varWords[30] = flag; /* Set flag to issue action on cmpl */ + + return(0); +} /* End fc_read_rpi */ + + +/**********************************************/ +/** fc_read_xri Issue a READ XRI **/ +/** mailbox command **/ +/**********************************************/ +_static_ int +fc_read_xri( +FC_BRD_INFO *binfo, +uint32 xri, +MAILBOX *mb, +uint32 flag) +{ + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + + mb->un.varRdXRI.reqXri = (volatile ushort)xri; + + mb->mbxCommand = MBX_READ_XRI; + mb->mbxOwner = OWN_HOST; + + mb->un.varWords[30] = flag; /* Set flag to issue action on cmpl */ + + return(0); +} /* End fc_read_xri */ + + +/**********************************************/ +/** fc_reg_login Issue a REG_LOGIN **/ +/** mailbox command **/ +/**********************************************/ +_static_ int +fc_reg_login( +FC_BRD_INFO *binfo, +uint32 did, +uchar *param, +MAILBOX *mb, +uint32 flag) +{ + uchar * sparam; + MATCHMAP * mp; + fc_dev_ctl_t *p_dev_ctl; + + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + + mb->un.varRegLogin.rpi = 0; + mb->un.varRegLogin.did = did; + mb->un.varWords[30] = flag; /* Set flag to issue action on cmpl */ + + mb->mbxOwner = OWN_HOST; + + if ((mp = (MATCHMAP * )fc_mem_get(binfo, MEM_BUF)) == 0) { + + if (binfo->fc_flag & FC_SLI2) + mb->mbxCommand = MBX_REG_LOGIN64; + else + mb->mbxCommand = MBX_REG_LOGIN; + /* REG_LOGIN: no buffers */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0302, /* ptr to msg structure */ + fc_mes0302, /* ptr to msg */ + fc_msgBlk0302.msgPreambleStr, /* begin varargs */ + (uint32)did, + (uint32)flag); /* end varargs */ + return(1); + } + + sparam = mp->virt; + + /* Copy param's into a new buffer */ + fc_bcopy((void *)param, (void *)sparam, sizeof(SERV_PARM)); + + p_dev_ctl = (fc_dev_ctl_t *)(binfo->fc_p_dev_ctl); + fc_mpdata_sync(mp->dma_handle, 0, 0, DDI_DMA_SYNC_FORDEV); + + /* save address for completion */ + ((MAILBOXQ * )mb)->bp = (uchar * )mp; + + if (binfo->fc_flag & FC_SLI2) { + mb->mbxCommand = MBX_REG_LOGIN64; + mb->un.varRegLogin.un.sp64.tus.f.bdeSize = sizeof(SERV_PARM); + mb->un.varRegLogin.un.sp64.addrHigh = (uint32)putPaddrHigh(mp->phys); + mb->un.varRegLogin.un.sp64.addrLow = (uint32)putPaddrLow(mp->phys); + } else { + mb->mbxCommand = MBX_REG_LOGIN; + mb->un.varRegLogin.un.sp.bdeSize = sizeof(SERV_PARM); + mb->un.varRegLogin.un.sp.bdeAddress = (uint32)putPaddrLow(mp->phys); + } + + return(0); +} /* End fc_reg_login */ + + +/**********************************************/ +/** fc_unreg_login Issue a UNREG_LOGIN **/ +/** mailbox command **/ +/**********************************************/ +_static_ void +fc_unreg_login( +FC_BRD_INFO *binfo, +uint32 rpi, +MAILBOX *mb) +{ + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + + mb->un.varUnregLogin.rpi = (ushort)rpi; + mb->un.varUnregLogin.rsvd1 = 0; + + mb->mbxCommand = MBX_UNREG_LOGIN; + mb->mbxOwner = OWN_HOST; + return; +} /* End fc_unreg_login */ + + +/**********************************************/ +/** fc_unreg_did Issue a UNREG_DID **/ +/** mailbox command **/ +/**********************************************/ +_static_ void +fc_unreg_did( +FC_BRD_INFO *binfo, +uint32 did, +MAILBOX *mb) +{ + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + + mb->un.varUnregDID.did = did; + + mb->mbxCommand = MBX_UNREG_D_ID; + mb->mbxOwner = OWN_HOST; + return; +} /* End fc_unreg_did */ + + +/**********************************************/ +/** fc_set_slim Issue a special debug mbox */ +/** command to write slim */ +/**********************************************/ +_static_ void +fc_set_slim( +FC_BRD_INFO *binfo, +MAILBOX *mb, +uint32 addr, +uint32 value) +{ + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + + /* addr = 0x090597 is AUTO ABTS disable for ELS commands */ + /* addr = 0x052198 is DELAYED ABTS enable for ELS commands */ + + /* + * Always turn on DELAYED ABTS for ELS timeouts + */ + if ((addr == 0x052198) && (value == 0)) + value = 1; + + mb->un.varWords[0] = addr; + mb->un.varWords[1] = value; + + mb->mbxCommand = MBX_SET_SLIM; + mb->mbxOwner = OWN_HOST; + return; +} /* End fc_set_slim */ + + +/* Disable Traffic Cop */ +_static_ void +fc_disable_tc( +FC_BRD_INFO *binfo, +MAILBOX *mb) +{ + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + mb->un.varWords[0] = 0x50797; + mb->un.varWords[1] = 0; + mb->un.varWords[2] = 0xfffffffe; + + mb->mbxCommand = MBX_SET_SLIM; + mb->mbxOwner = OWN_HOST; +} /* End fc_set_tc */ + + +/**********************************************/ +/** fc_config_port Issue a CONFIG_PORT **/ +/** mailbox command **/ +/**********************************************/ +_static_ int +fc_config_port( +FC_BRD_INFO *binfo, +MAILBOX *mb, +uint32 *hbainit) +{ + RING * rp; + fc_dev_ctl_t * p_dev_ctl; + iCfgParam * clp; + int ring_3_active; /* 4th ring */ + struct pci_dev *pdev; + + p_dev_ctl = (fc_dev_ctl_t *)(binfo->fc_p_dev_ctl); + pdev = p_dev_ctl->pcidev ; + + clp = DD_CTL.p_config[binfo->fc_brd_no]; + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + + mb->mbxCommand = MBX_CONFIG_PORT; + mb->mbxOwner = OWN_HOST; + + ring_3_active = 0; /* Preset to inactive */ + + mb->un.varCfgPort.pcbLen = sizeof(PCB); + mb->un.varCfgPort.pcbLow = + (uint32)putPaddrLow( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->pcb); + mb->un.varCfgPort.pcbHigh = + (uint32)putPaddrHigh( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->pcb); + if((pdev->device == PCI_DEVICE_ID_TFLY)|| + (pdev->device == PCI_DEVICE_ID_PFLY)) + fc_bcopy((uchar*) hbainit, (uchar*) mb->un.varCfgPort.hbainit, 20); + else + fc_bcopy((uchar*) hbainit, (uchar*) mb->un.varCfgPort.hbainit, 4); + + /* Now setup pcb */ + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.type = TYPE_NATIVE_SLI2; + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.feature = FEATURE_INITIAL_SLI2; + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.maxRing = (binfo->fc_ffnumrings-1); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.mailBoxSize = sizeof(MAILBOX); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.mbAddrHigh = (uint32) + putPaddrHigh( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->mbx); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.mbAddrLow = (uint32) + putPaddrLow( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->mbx); + + /* SLIM POINTER */ + if (binfo->fc_busflag & FC_HOSTPTR) { + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.hgpAddrHigh = (uint32) + putPaddrHigh( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->mbx.us.s2.host); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.hgpAddrLow = (uint32) + putPaddrLow( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->mbx.us.s2.host); + } else { + uint32 Laddr; + + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.hgpAddrHigh = (uint32) + fc_rdpci_32((fc_dev_ctl_t *)binfo->fc_p_dev_ctl, PCI_BAR_1_REGISTER); + Laddr = fc_rdpci_32((fc_dev_ctl_t *)binfo->fc_p_dev_ctl, PCI_BAR_0_REGISTER); + Laddr &= ~0x4; + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.hgpAddrLow = (uint32)(Laddr + (SLIMOFF*4)); + } + + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.pgpAddrHigh = (uint32) + putPaddrHigh( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->mbx.us.s2.port); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.pgpAddrLow = (uint32) + putPaddrLow( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->mbx.us.s2.port); + + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[0].cmdEntries = SLI2_IOCB_CMD_R0_ENTRIES; + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[0].rspEntries = SLI2_IOCB_RSP_R0_ENTRIES; + if(clp[CFG_NETWORK_ON].a_current == 0) { + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[1].cmdEntries = + (SLI2_IOCB_CMD_R1_ENTRIES - SLI2_IOCB_CMD_R1XTRA_ENTRIES); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[1].rspEntries = + (SLI2_IOCB_RSP_R1_ENTRIES - SLI2_IOCB_RSP_R1XTRA_ENTRIES); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[2].cmdEntries = + (SLI2_IOCB_CMD_R2_ENTRIES + SLI2_IOCB_CMD_R2XTRA_ENTRIES); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[2].rspEntries = + (SLI2_IOCB_RSP_R2_ENTRIES + SLI2_IOCB_RSP_R2XTRA_ENTRIES); + } + else { + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[1].cmdEntries = SLI2_IOCB_CMD_R1_ENTRIES; + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[1].rspEntries = SLI2_IOCB_RSP_R1_ENTRIES; + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[2].cmdEntries = SLI2_IOCB_CMD_R2_ENTRIES; + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[2].rspEntries = SLI2_IOCB_RSP_R2_ENTRIES; + } + if( ring_3_active == 0) { + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[3].cmdEntries = 0; + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[3].rspEntries = 0; + } + + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[0].cmdAddrHigh = (uint32) + putPaddrHigh( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[0]); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[0].cmdAddrLow = (uint32) + putPaddrLow( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[0]); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[0].rspAddrHigh = (uint32) + putPaddrHigh( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES]); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[0].rspAddrLow = (uint32) + putPaddrLow( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES]); + rp = &binfo->fc_ring[0]; + rp->fc_cmdringaddr = (void *) & ((SLI2_SLIM * )binfo->fc_slim2.virt)->IOCBs[0]; + rp->fc_rspringaddr = (void *) & ((SLI2_SLIM * )binfo->fc_slim2.virt)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES]; + + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[1].cmdAddrHigh = (uint32) + putPaddrHigh( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES]); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[1].cmdAddrLow = (uint32) + putPaddrLow( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES]); + if(clp[CFG_NETWORK_ON].a_current == 0) { + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[1].rspAddrHigh = (uint32) + putPaddrHigh( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES - SLI2_IOCB_CMD_R1XTRA_ENTRIES]); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[1].rspAddrLow = (uint32) + putPaddrLow( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES - SLI2_IOCB_CMD_R1XTRA_ENTRIES]); + rp = &binfo->fc_ring[1]; + rp->fc_cmdringaddr = (void *) & ((SLI2_SLIM * )binfo->fc_slim2.virt)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES]; + rp->fc_rspringaddr = (void *) & ((SLI2_SLIM * )binfo->fc_slim2.virt)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES - SLI2_IOCB_CMD_R1XTRA_ENTRIES]; + + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[2].cmdAddrHigh = (uint32) + putPaddrHigh( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES + SLI2_IOCB_RSP_R1_ENTRIES - + SLI2_IOCB_CMD_R1XTRA_ENTRIES - SLI2_IOCB_RSP_R1XTRA_ENTRIES]); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[2].cmdAddrLow = (uint32) + putPaddrLow( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES + SLI2_IOCB_RSP_R1_ENTRIES - + SLI2_IOCB_CMD_R1XTRA_ENTRIES - SLI2_IOCB_RSP_R1XTRA_ENTRIES]); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[2].rspAddrHigh = (uint32) + putPaddrHigh( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES + SLI2_IOCB_RSP_R1_ENTRIES + + SLI2_IOCB_CMD_R2_ENTRIES + SLI2_IOCB_CMD_R2XTRA_ENTRIES - + SLI2_IOCB_CMD_R1XTRA_ENTRIES - SLI2_IOCB_RSP_R1XTRA_ENTRIES]); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[2].rspAddrLow = (uint32) + putPaddrLow( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES + SLI2_IOCB_RSP_R1_ENTRIES + + SLI2_IOCB_CMD_R2_ENTRIES + SLI2_IOCB_CMD_R2XTRA_ENTRIES - + SLI2_IOCB_CMD_R1XTRA_ENTRIES - SLI2_IOCB_RSP_R1XTRA_ENTRIES]); + rp = &binfo->fc_ring[2]; + rp->fc_cmdringaddr = (void *) & ((SLI2_SLIM * )binfo->fc_slim2.virt)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES + SLI2_IOCB_RSP_R1_ENTRIES - + SLI2_IOCB_CMD_R1XTRA_ENTRIES - SLI2_IOCB_RSP_R1XTRA_ENTRIES]; + rp->fc_rspringaddr = (void *) & ((SLI2_SLIM * )binfo->fc_slim2.virt)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES + SLI2_IOCB_RSP_R1_ENTRIES + + SLI2_IOCB_CMD_R2_ENTRIES + SLI2_IOCB_CMD_R2XTRA_ENTRIES - + SLI2_IOCB_CMD_R1XTRA_ENTRIES - SLI2_IOCB_RSP_R1XTRA_ENTRIES]; + } + else { + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[1].rspAddrHigh = (uint32) + putPaddrHigh( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES]); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[1].rspAddrLow = (uint32) + putPaddrLow( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES]); + rp = &binfo->fc_ring[1]; + rp->fc_cmdringaddr = (void *) & ((SLI2_SLIM * )binfo->fc_slim2.virt)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES]; + rp->fc_rspringaddr = (void *) & ((SLI2_SLIM * )binfo->fc_slim2.virt)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES]; + + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[2].cmdAddrHigh = (uint32) + putPaddrHigh( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES + SLI2_IOCB_RSP_R1_ENTRIES]); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[2].cmdAddrLow = (uint32) + putPaddrLow( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES + SLI2_IOCB_RSP_R1_ENTRIES]); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[2].rspAddrHigh = (uint32) + putPaddrHigh( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES + SLI2_IOCB_RSP_R1_ENTRIES + + SLI2_IOCB_CMD_R2_ENTRIES]); + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[2].rspAddrLow = (uint32) + putPaddrLow( & ((SLI2_SLIM * )binfo->fc_slim2.phys)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES + SLI2_IOCB_RSP_R1_ENTRIES + + SLI2_IOCB_CMD_R2_ENTRIES]); + rp = &binfo->fc_ring[2]; + rp->fc_cmdringaddr = (void *) & ((SLI2_SLIM * )binfo->fc_slim2.virt)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES + SLI2_IOCB_RSP_R1_ENTRIES]; + rp->fc_rspringaddr = (void *) & ((SLI2_SLIM * )binfo->fc_slim2.virt)->IOCBs[ + SLI2_IOCB_CMD_R0_ENTRIES + SLI2_IOCB_RSP_R0_ENTRIES + + SLI2_IOCB_CMD_R1_ENTRIES + SLI2_IOCB_RSP_R1_ENTRIES + + SLI2_IOCB_CMD_R2_ENTRIES]; + } + + if( ring_3_active == 0) { + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[3].cmdAddrHigh = 0; + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[3].rspAddrHigh = 0; + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[3].cmdAddrLow = 0; + ((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb.rdsc[3].rspAddrLow = 0; + } + + fc_pcimem_bcopy((uint32 * )(&((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb), + (uint32 * )(&((SLI2_SLIM * )binfo->fc_slim2.virt)->pcb), sizeof(PCB)); + + fc_mpdata_sync(binfo->fc_slim2.dma_handle, (off_t)0, (size_t)0, + DDI_DMA_SYNC_FORDEV); + /* Service Level Interface (SLI) 2 selected */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0405, /* ptr to msg structure */ + fc_mes0405, /* ptr to msg */ + fc_msgBlk0405.msgPreambleStr); /* begin & end varargs */ + return(0); +} /* End fc_config_port */ + +/**********************************************/ +/** fc_config_farp Issue a CONFIG FARP **/ +/** mailbox command **/ +/**********************************************/ +_static_ void +fc_config_farp( +FC_BRD_INFO *binfo, +MAILBOX *mb) +{ + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + + mb->un.varCfgFarp.filterEnable = 1; + mb->un.varCfgFarp.portName = 1; + mb->un.varCfgFarp.nodeName = 1; + + fc_bcopy((uchar * )&binfo->fc_portname, (uchar *)&mb->un.varCfgFarp.portname, sizeof(NAME_TYPE)); + fc_bcopy((uchar * )&binfo->fc_portname, (uchar *)&mb->un.varCfgFarp.nodename, sizeof(NAME_TYPE)); + + mb->mbxCommand = MBX_CONFIG_FARP; + mb->mbxOwner = OWN_HOST; + return; +} + + +/**********************************************/ +/** fc_read_nv Issue a READ CONFIG **/ +/** mailbox command **/ +/**********************************************/ +_static_ void +fc_read_config( +FC_BRD_INFO *binfo, +MAILBOX *mb) +{ + fc_bzero((void *)mb, sizeof(MAILBOXQ)); + mb->mbxCommand = MBX_READ_CONFIG; + mb->mbxOwner = OWN_HOST; + return; +} /* End fc_read_config */ + +/*****************************************************************************/ +/* + * NAME: fc_mbox_put + * + * FUNCTION: put mailbox cmd onto the mailbox queue. + * + * EXECUTION ENVIRONMENT: process and interrupt level. + * + * NOTES: + * + * CALLED FROM: + * issue_mb_cmd + * + * INPUT: + * binfo - pointer to the device info area + * mbp - pointer to mailbox queue entry of mailbox cmd + * + * RETURNS: + * NULL - command queued + */ +/*****************************************************************************/ +_static_ void +fc_mbox_put( +FC_BRD_INFO *binfo, +MAILBOXQ *mbq) /* pointer to mbq entry */ +{ + if (binfo->fc_mbox.q_first) { + /* queue command to end of list */ + ((MAILBOXQ * )binfo->fc_mbox.q_last)->q = (uchar * )mbq; + binfo->fc_mbox.q_last = (uchar * )mbq; + } else { + /* add command to empty list */ + binfo->fc_mbox.q_first = (uchar * )mbq; + binfo->fc_mbox.q_last = (uchar * )mbq; + } + + mbq->q = NULL; + binfo->fc_mbox.q_cnt++; + + return; + +} /* End fc_mbox_put */ + + +/*****************************************************************************/ +/* + * NAME: fc_mbox_get + * + * FUNCTION: get a mailbox command from mailbox command queue + * + * EXECUTION ENVIRONMENT: interrupt level. + * + * NOTES: + * + * CALLED FROM: + * handle_mb_event + * + * INPUT: + * binfo - pointer to the device info area + * + * RETURNS: + * NULL - no match found + * mb pointer - pointer to a mailbox command + */ +/*****************************************************************************/ +_static_ MAILBOXQ * +fc_mbox_get( +FC_BRD_INFO *binfo) +{ + MAILBOXQ * p_first = NULL; + + if (binfo->fc_mbox.q_first) { + p_first = (MAILBOXQ * )binfo->fc_mbox.q_first; + if ((binfo->fc_mbox.q_first = p_first->q) == 0) { + binfo->fc_mbox.q_last = 0; + } + p_first->q = NULL; + binfo->fc_mbox.q_cnt--; + } + + return(p_first); + +} /* End fc_mbox_get */ + + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fcmemb.c 999-mjb/drivers/scsi/lpfc/fcmemb.c --- 000-virgin/drivers/scsi/lpfc/fcmemb.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fcmemb.c 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,810 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#include "fc_os.h" + +#include "fc_hw.h" +#include "fc.h" + +#include "fcdiag.h" +#include "fcfgparm.h" +#include "fcmsg.h" +#include "fc_crtn.h" /* Core - external routine definitions */ +#include "fc_ertn.h" /* Environment - external routine definitions */ + +extern uint32 fcPAGESIZE; +extern fc_dd_ctl_t DD_CTL; +extern iCfgParam icfgparam[]; +extern int fc_max_els_sent; + + +/* + * Define the following to Enable SANITY check logic in routines + * fc_getvaddr() and fc_mapvaddr(). + * #define FC_DBG_VADDR_SANITY_CHK + */ + +/* Routine Declaration - Local */ +/* There currently are no local routine declarations */ +/* End Routine Declaration - Local */ + +/***************************************************/ +/** fc_malloc_buffer **/ +/** **/ +/** This routine will allocate iocb/data buffer **/ +/** space and setup the buffers for all rings on **/ +/** the specified board to use. The data buffers **/ +/** can be posted to the ring with the **/ +/** fc_post_buffer routine. The iocb buffers **/ +/** are used to make a temp copy of the response **/ +/** ring iocbs. Returns 0 if not enough memory, **/ +/** Returns 1 if successful. **/ +/***************************************************/ +_static_ int +fc_malloc_buffer( +fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO * binfo = &BINFO; + iCfgParam * clp; + int i, j; + uchar * bp; + uchar * oldbp; + RING * rp; + MEMSEG * mp; + MATCHMAP * matp; + MBUF_INFO * buf_info; + MBUF_INFO bufinfo; + unsigned long iflag; + + buf_info = &bufinfo; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + + for (i = 0; i < binfo->fc_ffnumrings; i++) { + rp = &binfo->fc_ring[i]; + rp->fc_mpon = 0; + rp->fc_mpoff = 0; + } + + if(clp[CFG_FCP_ON].a_current) { + buf_info->size = (MAX_FCP_CMDS * sizeof(void *)); + buf_info->flags = 0; + buf_info->align = sizeof(void *); + buf_info->dma_handle = 0; + + /* Create a table to relate FCP iotags to fc_buf addresses */ + fc_malloc(p_dev_ctl, buf_info); + if (buf_info->virt == NULL) { + fc_free_buffer(p_dev_ctl); + return(0); + } + binfo->fc_table = (FCPTBL * )buf_info->virt; + fc_bzero((char *)binfo->fc_table, MAX_FCP_CMDS * sizeof(void *)); + } + + /* Initialize xmit/receive buffer structure */ + /* Three buffers per response entry will initially be posted to ELS ring */ + iflag = lpfc_mempool_disable_lock(p_dev_ctl); + mp = &binfo->fc_memseg[MEM_BUF]; + mp->fc_memsize = FCELSSIZE; + if(clp[CFG_NUM_BUFS].a_current < 50) + mp->fc_numblks = 50; + else + mp->fc_numblks = (ushort)clp[CFG_NUM_BUFS].a_current; + + /* MEM_BUF is same pool as MEM_BPL */ + if (binfo->fc_sli == 2) + mp->fc_numblks += MAX_SLI2_IOCB; + + mp->fc_memflag = FC_MEM_DMA; + mp->fc_lowmem = (3 * fc_max_els_sent) + 8; + + if((2*mp->fc_lowmem) > mp->fc_numblks) + mp->fc_lowmem = (mp->fc_numblks / 2); + + /* Initialize mailbox cmd buffer structure */ + mp = &binfo->fc_memseg[MEM_MBOX]; + mp->fc_memsize = sizeof(MAILBOXQ); + mp->fc_numblks = (short)clp[CFG_NUM_NODES].a_current + 32; + mp->fc_memflag = 0; + mp->fc_lowmem = (2 * fc_max_els_sent) + 8; + + /* Initialize iocb buffer structure */ + mp = &binfo->fc_memseg[MEM_IOCB]; + mp->fc_memsize = sizeof(IOCBQ); + mp->fc_numblks = (ushort)clp[CFG_NUM_IOCBS].a_current + MIN_CLK_BLKS; + mp->fc_memflag = 0; + mp->fc_lowmem = (2 * fc_max_els_sent) + 8; + + /* Initialize iocb buffer structure */ + mp = &binfo->fc_memseg[MEM_NLP]; + mp->fc_memsize = sizeof(NODELIST); + mp->fc_numblks = (short)clp[CFG_NUM_NODES].a_current + 2; + mp->fc_memflag = 0; + mp->fc_lowmem = 0; + + + /* Allocate buffer pools for above buffer structures */ + for (j = 0; j < FC_MAX_SEG; j++) { + mp = &binfo->fc_memseg[j]; + + + mp->fc_memptr = 0; + mp->fc_endmemptr = 0; + mp->fc_memhi = 0; + mp->fc_memlo = 0; + + for (i = 0; i < mp->fc_numblks; i++) { + /* If this is a DMA buffer we need alignment on a page so we don't + * want to worry about buffers spanning page boundries when mapping + * memory for the adapter. + */ + if (mp->fc_memflag & FC_MEM_DMA) { + buf_info->size = sizeof(MATCHMAP); + buf_info->flags = 0; + buf_info->align = sizeof(void *); + buf_info->dma_handle = 0; + + fc_malloc(p_dev_ctl, buf_info); + if (buf_info->virt == NULL) { + lpfc_mempool_unlock_enable(p_dev_ctl, iflag); + fc_free_buffer(p_dev_ctl); + return(0); + } + + matp = (MATCHMAP * )buf_info->virt; + fc_bzero(matp, sizeof(MATCHMAP)); + if((ulong)matp > (ulong)(mp->fc_memhi)) + mp->fc_memhi = (uchar *)matp; + if(mp->fc_memlo == 0) + mp->fc_memlo = (uchar *)matp; + else { + if((ulong)matp < (ulong)(mp->fc_memlo)) + mp->fc_memlo = (uchar *)matp; + } + + buf_info->size = mp->fc_memsize; + buf_info->flags = FC_MBUF_DMA; + buf_info->dma_handle = 0; + + switch (mp->fc_memsize) { + case sizeof(FCP_CMND): + buf_info->align = sizeof(FCP_CMND); + break; + + case 1024: + buf_info->align = 1024; + break; + + case 2048: + buf_info->align = 2048; + break; + + case 4096: + buf_info->align = 4096; + break; + + default: + buf_info->align = sizeof(void *); + break; + } + + fc_malloc(p_dev_ctl, buf_info); + if (buf_info->virt == NULL) { + fc_free_buffer(p_dev_ctl); + return(0); + } + bp = (uchar * )buf_info->virt; + fc_bzero(bp, mp->fc_memsize); + + /* Link buffer into beginning of list. The first pointer in + * each buffer is a forward pointer to the next buffer. + */ + oldbp = mp->fc_memptr; + if(oldbp == 0) + mp->fc_endmemptr = (uchar *)matp; + mp->fc_memptr = (uchar * )matp; + matp->fc_mptr = oldbp; + matp->virt = bp; + if (buf_info->dma_handle) { + matp->dma_handle = buf_info->dma_handle; + matp->data_handle = buf_info->data_handle; + } + matp->phys = (uchar * )buf_info->phys; + } else { + buf_info->size = mp->fc_memsize; + buf_info->flags = 0; + buf_info->align = sizeof(void *); + buf_info->dma_handle = 0; + + fc_malloc(p_dev_ctl, buf_info); + if (buf_info->virt == NULL) { + lpfc_mempool_unlock_enable(p_dev_ctl, iflag); + fc_free_buffer(p_dev_ctl); + return(0); + } + bp = (uchar * )buf_info->virt; + fc_bzero(bp, mp->fc_memsize); + if((ulong)bp > (ulong)(mp->fc_memhi)) + mp->fc_memhi = (uchar *)bp; + if(mp->fc_memlo == 0) + mp->fc_memlo = (uchar *)bp; + else { + if((ulong)bp < (ulong)(mp->fc_memlo)) + mp->fc_memlo = (uchar *)bp; + } + + /* Link buffer into beginning of list. The first pointer in + * each buffer is a forward pointer to the next buffer. + */ + oldbp = mp->fc_memptr; + if(oldbp == 0) + mp->fc_endmemptr = bp; + mp->fc_memptr = bp; + *((uchar * *)bp) = oldbp; + } + } + + /* free blocks = total blocks right now */ + mp->fc_free = i; + } + + lpfc_mempool_unlock_enable(p_dev_ctl, iflag); + return(1); +} /* End fc_malloc_buffer */ + + +/***************************************************/ +/** fc_free_buffer **/ +/** **/ +/** This routine will free iocb/data buffer space */ +/***************************************************/ +_static_ int +fc_free_buffer( +fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO * binfo = &BINFO; + int j, ipri; + uchar * bp; + MEMSEG * mp; + MATCHMAP * mm; + NODELIST * ndlp; + NODELIST * ondlp; + RING * rp; + IOCBQ * iocbq, *save; + MAILBOXQ * mbox, *mbsave; + MBUF_INFO * buf_info; + MBUF_INFO bufinfo; + FCCLOCK_INFO * clock_info; + FCCLOCK * cb; + FCCLOCK * nextcb; + unsigned long iflag; + + buf_info = &bufinfo; + + /* free the mapped address match area for each ring */ + for (j = 0; j < binfo->fc_ffnumrings; j++) { + rp = &binfo->fc_ring[j]; + + /* Free everything on tx queue */ + iocbq = (IOCBQ * )(rp->fc_tx.q_first); + while (iocbq) { + save = iocbq; + iocbq = (IOCBQ * )iocbq->q; + fc_mem_put(binfo, MEM_IOCB, (uchar * )save); + } + + if (j != FC_FCP_RING) { + /* Free everything on txp queue */ + unsigned long iflag; + + iflag = lpfc_q_disable_lock(p_dev_ctl); + iocbq = (IOCBQ * )(rp->fc_txp.q_first); + while (iocbq) { + save = iocbq; + iocbq = (IOCBQ * )iocbq->q; + fc_mem_put(binfo, MEM_IOCB, (uchar * )save); + } + lpfc_q_unlock_enable(p_dev_ctl, iflag); + + while (rp->fc_mpoff) { + uchar * addr; + + addr = 0; + mm = (MATCHMAP * )(rp->fc_mpoff); + if (j == FC_IP_RING) + addr = (uchar * )(fcnextpkt((fcipbuf_t * )mm)); + else if (j == FC_ELS_RING) + addr = mm->phys; + if ((mm = fc_getvaddr(p_dev_ctl, rp, addr))) { + if (j == FC_ELS_RING) { + fc_mem_put(binfo, MEM_BUF, (uchar * )mm); + } + else if (j == FC_IP_RING) { + fcipbuf_t * mbuf; + + mbuf = (fcipbuf_t * )mm; + fcnextdata(mbuf) = 0; + fcnextpkt(mbuf) = 0; + m_freem(mbuf); + } + } + } + } + } + + /* Free any delayed ELS xmits */ + if(binfo->fc_delayxmit) { + iocbq = binfo->fc_delayxmit; + binfo->fc_delayxmit = 0; + while(iocbq) { + mm = (MATCHMAP * )iocbq->bp; + if (binfo->fc_flag & FC_SLI2) { + fc_mem_put(binfo, MEM_BPL, (uchar * )iocbq->bpl); + } + fc_mem_put(binfo, MEM_BUF, (uchar * )mm); + fc_mem_put(binfo, MEM_BUF, (uchar * )iocbq->info); + save = iocbq; + iocbq = (IOCBQ *)save->q; + fc_mem_put(binfo, MEM_IOCB, (uchar * )save); + } + } + + if (binfo->fc_table) { + buf_info->size = (MAX_FCP_CMDS * sizeof(void *)); + buf_info->virt = (uint32 * )binfo->fc_table; + buf_info->phys = 0; + buf_info->flags = 0; + buf_info->dma_handle = 0; + fc_free(p_dev_ctl, buf_info); + binfo->fc_table = 0; + } + + /* Free everything on mbox queue */ + mbox = (MAILBOXQ * )(binfo->fc_mbox.q_first); + while (mbox) { + mbsave = mbox; + mbox = (MAILBOXQ * )mbox->q; + fc_mem_put(binfo, MEM_MBOX, (uchar * )mbsave); + } + binfo->fc_mbox.q_first = 0; + binfo->fc_mbox.q_last = 0; + binfo->fc_mbox_active = 0; + + /* Free everything on iocb plogi queue */ + iocbq = (IOCBQ * )(binfo->fc_plogi.q_first); + while (iocbq) { + save = iocbq; + iocbq = (IOCBQ * )iocbq->q; + fc_mem_put(binfo, MEM_IOCB, (uchar * )save); + } + binfo->fc_plogi.q_first = 0; + binfo->fc_plogi.q_last = 0; + + /* Now cleanup unexpired clock blocks */ + clock_info = &DD_CTL.fc_clock_info; + ipri = disable_lock(FC_LVL, &CLOCK_LOCK); + + cb = clock_info->fc_clkhdr.cl_f; + while (cb != (FCCLOCK * ) & clock_info->fc_clkhdr) { + nextcb = cb->cl_fw; + if(cb->cl_p_dev_ctl == (void *)p_dev_ctl) { + fc_clock_deque(cb); + /* Release clock block */ + fc_clkrelb(p_dev_ctl, cb); + /* start over */ + } + cb = nextcb; + } + unlock_enable(ipri, &CLOCK_LOCK); + + /* Free all node table entries */ + ndlp = binfo->fc_nlpbind_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + ondlp = ndlp; + ndlp = (NODELIST *)ndlp->nlp_listp_next; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + fc_mem_put(binfo, MEM_NLP, (uchar * )ondlp); + } + binfo->fc_nlpbind_start = (NODELIST *)&binfo->fc_nlpbind_start; + binfo->fc_nlpbind_end = (NODELIST *)&binfo->fc_nlpbind_start; + binfo->fc_nlpmap_start = (NODELIST *)&binfo->fc_nlpmap_start; + binfo->fc_nlpmap_end = (NODELIST *)&binfo->fc_nlpmap_start; + binfo->fc_nlpunmap_start = (NODELIST *)&binfo->fc_nlpunmap_start; + binfo->fc_nlpunmap_end = (NODELIST *)&binfo->fc_nlpunmap_start; + + iflag = lpfc_mempool_disable_lock(p_dev_ctl); + /* Loop through all memory buffer pools */ + for (j = 0; j < FC_MAX_SEG; j++) { + mp = &binfo->fc_memseg[j]; + /* Free memory associated with all buffers on free buffer pool */ + while ((bp = mp->fc_memptr) != NULL) { + mp->fc_memptr = *((uchar * *)bp); + if (mp->fc_memflag & FC_MEM_DMA) { + mm = (MATCHMAP * )bp; + bp = mm->virt; + buf_info->size = mp->fc_memsize; + buf_info->virt = (uint32 * )bp; + buf_info->phys = (uint32 * )mm->phys; + buf_info->flags = FC_MBUF_DMA; + if (mm->dma_handle) { + buf_info->dma_handle = mm->dma_handle; + buf_info->data_handle = mm->data_handle; + } + fc_free(p_dev_ctl, buf_info); + + buf_info->size = sizeof(MATCHMAP); + buf_info->virt = (uint32 * )mm; + buf_info->phys = 0; + buf_info->flags = 0; + buf_info->dma_handle = 0; + fc_free(p_dev_ctl, buf_info); + } else { + buf_info->size = mp->fc_memsize; + buf_info->virt = (uint32 * )bp; + buf_info->phys = 0; + buf_info->flags = 0; + buf_info->dma_handle = 0; + fc_free(p_dev_ctl, buf_info); + } + } + mp->fc_endmemptr = NULL; + mp->fc_free = 0; + } + lpfc_mempool_unlock_enable(p_dev_ctl, iflag); + return(0); +} /* End fc_free_buffer */ + + + +/**************************************************/ +/** fc_mem_get **/ +/** **/ +/** This routine will get a free memory buffer. **/ +/** seg identifies which buffer pool to use. **/ +/** Returns the free buffer ptr or 0 for no buf **/ +/**************************************************/ +_static_ uchar * +fc_mem_get( +FC_BRD_INFO *binfo, +uint32 arg) +{ + uchar * bp; + MEMSEG * mp; + uint32 seg = arg & MEM_SEG_MASK; + int low; + fc_dev_ctl_t *p_dev_ctl; + unsigned long iflag; + + /* range check on seg argument */ + if (seg >= FC_MAX_SEG) + return((uchar * )0); + + p_dev_ctl = (fc_dev_ctl_t *)binfo->fc_p_dev_ctl; + iflag = lpfc_mempool_disable_lock(p_dev_ctl); + mp = &binfo->fc_memseg[seg]; + + if ((low = (!(arg & MEM_PRI) && (mp->fc_free <= mp->fc_lowmem)))) { + /* Memory Buffer Pool is below low water mark */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0406, /* ptr to msg structure */ + fc_mes0406, /* ptr to msg */ + fc_msgBlk0406.msgPreambleStr, /* begin varargs */ + seg, + mp->fc_lowmem, + low); /* end varargs */ + /* Low priority request and not enough buffers, so fail */ + lpfc_mempool_unlock_enable(p_dev_ctl, iflag); + return((uchar * )0); + } + + bp = mp->fc_memptr; + + if (bp) { + if(((ulong)bp > (ulong)(mp->fc_memhi)) || ((ulong)bp < (ulong)(mp->fc_memlo))) { + /* Memory Buffer Pool is corrupted */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0407, /* ptr to msg structure */ + fc_mes0407, /* ptr to msg */ + fc_msgBlk0407.msgPreambleStr, /* begin varargs */ + seg, + (ulong)bp, + (ulong)mp->fc_memhi, + (ulong)mp->fc_memlo); /* end varargs */ + mp->fc_memptr = 0; + lpfc_mempool_unlock_enable(p_dev_ctl, iflag); + return((uchar * )0); + } + + /* If a memory block exists, take it off freelist + * and return it to the user. + */ + if(mp->fc_endmemptr == bp) { + mp->fc_endmemptr = 0; + } + mp->fc_memptr = *((uchar * *)bp); + *((uchar * *)bp) = 0; + mp->fc_free--; + } else { + /* Memory Buffer Pool is out of buffers */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0409, /* ptr to msg structure */ + fc_mes0409, /* ptr to msg */ + fc_msgBlk0409.msgPreambleStr, /* begin varargs */ + seg, + mp->fc_free, + binfo->fc_mbox.q_cnt, + (ulong)(mp->fc_memhi)); /* end varargs */ + FCSTATCTR.memAllocErr++; + } + + if (seg == MEM_NLP) { + /* GET nodelist */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0927, /* ptr to msg structure */ + fc_mes0927, /* ptr to msg */ + fc_msgBlk0927.msgPreambleStr, /* begin varargs */ + (ulong)bp, + mp->fc_free); /* end varargs */ + } + + lpfc_mempool_unlock_enable(p_dev_ctl, iflag); + return(bp); +} /* End fc_mem_get */ + + +/**************************************************/ +/** fc_mem_put **/ +/** **/ +/** This routine will put a memory buffer back **/ +/** on the freelist. **/ +/** seg identifies which buffer pool to use. **/ +/**************************************************/ +_static_ uchar * +fc_mem_put( +FC_BRD_INFO *binfo, +uint32 seg, +uchar *bp) +{ + MEMSEG * mp; + uchar * oldbp; + fc_dev_ctl_t *p_dev_ctl; + unsigned long iflag; + /* range check on seg argument */ + if (seg >= FC_MAX_SEG) + return((uchar * )0); + + p_dev_ctl = (fc_dev_ctl_t *)binfo->fc_p_dev_ctl; + iflag = lpfc_mempool_disable_lock(p_dev_ctl); + mp = &binfo->fc_memseg[seg]; + + if (bp) { + + if(((ulong)bp > (ulong)(mp->fc_memhi)) || ((ulong)bp < (ulong)(mp->fc_memlo))) { + /* Memory Buffer Pool is corrupted */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0408, /* ptr to msg structure */ + fc_mes0408, /* ptr to msg */ + fc_msgBlk0408.msgPreambleStr, /* begin varargs */ + seg, + (ulong)bp, + (ulong)mp->fc_memhi, + (ulong)mp->fc_memlo); /* end varargs */ + lpfc_mempool_unlock_enable(p_dev_ctl, iflag); + return((uchar * )0); + } + /* If a memory block exists, put it on freelist + * and return it to the user. + */ + oldbp = mp->fc_memptr; + mp->fc_memptr = bp; + *((uchar * *)bp) = oldbp; + if(oldbp == 0) + mp->fc_endmemptr = bp; + mp->fc_free++; + } + + if (seg == MEM_NLP) { + /* PUT nodelist */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0928, /* ptr to msg structure */ + fc_mes0928, /* ptr to msg */ + fc_msgBlk0928.msgPreambleStr, /* begin varargs */ + (ulong)bp, + mp->fc_free); /* end varargs */ + } + + lpfc_mempool_unlock_enable(p_dev_ctl, iflag); + return(bp); +} /* End fc_mem_put */ + + +/* Look up the virtual address given a mapped address */ +_static_ MATCHMAP * +fc_getvaddr( +fc_dev_ctl_t *p_dev_ctl, +RING *rp, +uchar *mapbp) +{ + FC_BRD_INFO * binfo; + + binfo = &BINFO; + /* While there are available slots in the list */ + if (rp->fc_ringno == FC_ELS_RING) { + MATCHMAP * mp; + MATCHMAP * mpoff; + + mpoff = (MATCHMAP * )rp->fc_mpoff; + mp = 0; + + while (mpoff) { + /* Check for a match */ + if (mpoff->phys == mapbp) { + /* If we matched on the first slot */ + if (mp == 0) { + rp->fc_mpoff = mpoff->fc_mptr; + } else { + mp->fc_mptr = mpoff->fc_mptr; + } + + if (rp->fc_mpon == (uchar * )mpoff) { + rp->fc_mpon = (uchar * )mp; + } + rp->fc_bufcnt--; + mpoff->fc_mptr = 0; + + fc_mpdata_sync(mpoff->dma_handle, 0, 0, DDI_DMA_SYNC_FORKERNEL); + + /* Return entry */ + return(mpoff); + } + mp = mpoff; + mpoff = (MATCHMAP * )mpoff->fc_mptr; + } + } + + if (rp->fc_ringno == FC_IP_RING) { + fcipbuf_t * mb; + fcipbuf_t * mboff; + + mboff = (fcipbuf_t * )rp->fc_mpoff; + mb = 0; + + while (mboff) { + /* Check for a match */ + if (fcnextpkt(mboff) == (fcipbuf_t * )mapbp) { + /* If we matched on the first slot */ + if (mb == 0) { + rp->fc_mpoff = (uchar * )fcnextdata(mboff); + } else { + fcnextdata(mb) = fcnextdata(mboff); + } + + if (rp->fc_mpon == (uchar * )mboff) { + rp->fc_mpon = (uchar * )mb; + } + rp->fc_bufcnt--; + + if (fcnextpkt(mboff)) { + MBUF_INFO * buf_info; + MBUF_INFO bufinfo; + + buf_info = &bufinfo; + buf_info->dma_handle = (ulong * )fcgethandle(mboff); + if (buf_info->dma_handle) { + fc_mpdata_sync(buf_info->dma_handle, 0, 0, + DDI_DMA_SYNC_FORKERNEL); + } + buf_info->virt = 0; + buf_info->flags = (FC_MBUF_PHYSONLY | FC_MBUF_DMA); + buf_info->phys = (uint32 * )fcnextpkt(mboff); + buf_info->size = fcPAGESIZE; + fc_free(p_dev_ctl, buf_info); + } + + fcsethandle(mboff, 0); + fcnextpkt(mboff) = 0; + fcnextdata(mboff) = 0; + /* Return entry */ + return((MATCHMAP * )mboff); + } + mb = mboff; + mboff = (fcipbuf_t * )fcnextdata(mboff); + } + } + /* Cannot find virtual addr for mapped buf on ring (num) */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0410, /* ptr to msg structure */ + fc_mes0410, /* ptr to msg */ + fc_msgBlk0410.msgPreambleStr, /* begin varargs */ + rp->fc_ringno, + (ulong)mapbp, + (ulong)rp->fc_mpoff, + (ulong)rp->fc_mpon); /* end varargs */ + FCSTATCTR.noVirtPtr++; + return(0); +} /* End fc_getvaddr */ + + +/* Given a virtual address, bp, generate the physical mapped address + * and place it where addr points to. Save the address pair for lookup later. + */ +_static_ void +fc_mapvaddr( +FC_BRD_INFO *binfo, +RING *rp, +MATCHMAP *mp, +uint32 *haddr, +uint32 *laddr) +{ + fcipbuf_t * mbuf; + + switch (rp->fc_ringno) { + case FC_ELS_RING: + mp->fc_mptr = 0; + /* Update slot fc_mpon points to then bump it */ + if (rp->fc_mpoff == 0) { + rp->fc_mpoff = (uchar * )mp; + rp->fc_mpon = (uchar * )mp; + } else { + ((MATCHMAP * )(rp->fc_mpon))->fc_mptr = (uchar * )mp; + rp->fc_mpon = (uchar * )mp; + } + if (binfo->fc_flag & FC_SLI2) { + *haddr = (uint32)putPaddrHigh(mp->phys); /* return mapped address */ + *laddr = (uint32)putPaddrLow(mp->phys); /* return mapped address */ + } else { + *laddr = (uint32)putPaddrLow(mp->phys); /* return mapped address */ + } + break; + + case FC_IP_RING: + mbuf = (fcipbuf_t * )mp; + fcnextdata(mbuf) = 0; + /* Update slot fc_mpon points to then bump it */ + if (rp->fc_mpoff == 0) { + rp->fc_mpoff = (uchar * )mbuf; + rp->fc_mpon = (uchar * )mbuf; + } else { + fcnextdata((fcipbuf_t * )(rp->fc_mpon)) = mbuf; + rp->fc_mpon = (uchar * )mbuf; + } + if (binfo->fc_flag & FC_SLI2) { + *haddr = (uint32)putPaddrHigh(fcnextpkt(mbuf)); + *laddr = (uint32)putPaddrLow(fcnextpkt(mbuf)); + } else { + *laddr = (uint32)putPaddrLow(fcnextpkt(mbuf)); + } + break; + } + + rp->fc_bufcnt++; + return; +} /* End fc_mapvaddr */ + + + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fcmsg.h 999-mjb/drivers/scsi/lpfc/fcmsg.h --- 000-virgin/drivers/scsi/lpfc/fcmsg.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fcmsg.h 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,1082 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#ifndef _H_FCMSG +#define _H_FCMSG + +/* + * LOG Message Group Numbering Sequence + * + * Message Group Preamble From To + * String + * + * ELS ELx 100 199 + * DISCOVERY DIx 200 299 + * MBOX MBx 300 399 + * INIT INx 400 499 + * Unused 500 599 + * IP IPx 600 699 + * FCP FPx 700 799 + * Unused 800 899 + * NODE NDx 900 999 + * MISC MIx 1200 1299 + * LINK LKx 1300 1399 + * SLI SLx 1400 1499 + * CHK_CONDITION CKx 1500 1599 + */ + +/* + * Log Message Structure + * + * The following structure supports LOG messages only. + * Every LOG message is associated to a msgBlkLogDef structure of the + * following type. + */ + +typedef struct msgLogType { + int msgNum; /* Message number */ + char * msgStr; /* Ptr to log message */ + char * msgPreambleStr; /* Ptr to log message preamble */ + int msgOutput; /* Message output target - bitmap */ + /* + * This member controls message OUTPUT. + * + * The phase 'global controls' refers to user configurable parameters + * such as LOG_VERBOSE that control message output on a global basis. + */ + +#define FC_MSG_OPUT_GLOB_CTRL 0x0 /* Use global control */ +#define FC_MSG_OPUT_DISA 0x1 /* Override global control */ +#define FC_MSG_OPUT_FORCE 0x2 /* Override global control */ + int msgType; /* Message LOG type - bitmap */ +#define FC_LOG_MSG_TYPE_INFO 0x1 /* Maskable */ +#define FC_LOG_MSG_TYPE_WARN 0x2 /* Non-Maskable */ +#define FC_LOG_MSG_TYPE_ERR_CFG 0x4 /* Non-Maskable */ +#define FC_LOG_MSG_TYPE_ERR 0x8 /* Non-Maskable */ +#define FC_LOG_MSG_TYPE_PANIC 0x10 /* Non-Maskable */ + int msgMask; /* Message LOG mask - bitmap */ + /* + * NOTE: Only LOG messages of types MSG_TYPE_WARN & MSG_TYPE_INFO are + * maskable at the GLOBAL level. + * + * Any LOG message regardless of message type can be disabled (override verbose) + * at the msgBlkLogDef struct level my setting member msgOutput = FC_MSG_OPUT_DISA. + * The message will never be displayed regardless of verbose mask. + * + * Any LOG message regardless of message type can be enable (override verbose) + * at the msgBlkLogDef struct level my setting member msgOutput = FC_MSG_OPUT_FORCE. + * The message will always be displayed regardless of verbose mask. + */ +#define LOG_ELS 0x1 /* ELS events */ +#define LOG_DISCOVERY 0x2 /* Link discovery events */ +#define LOG_MBOX 0x4 /* Mailbox events */ +#define LOG_INIT 0x8 /* Initialization events */ +#define LOG_LINK_EVENT 0x10 /* Link events */ +#define LOG_IP 0x20 /* IP traffic history */ +#define LOG_FCP 0x40 /* FCP traffic history */ +#define LOG_NODE 0x80 /* Node table events */ +#define LOG_MISC 0x400 /* Miscellaneous events */ +#define LOG_SLI 0x800 /* SLI events */ +#define LOG_CHK_COND 0x1000 /* FCP Check condition flag */ +#define LOG_ALL_MSG 0x1fff /* LOG all messages */ + unsigned int msgLogID; /* Message LOG ID */ +#define ERRID_LOG_TIMEOUT 0xfdefefa7 /* Fibre Channel timeout */ +#define ERRID_LOG_HDW_ERR 0x1ae4fffc /* Fibre Channel hardware failure */ +#define ERRID_LOG_UNEXPECT_EVENT 0xbdb7e728 /* Fibre Channel unexpected event */ +#define ERRID_LOG_INIT 0xbe1043b8 /* Fibre Channel init failure */ +#define ERRID_LOG_NO_RESOURCE 0x474c1775 /* Fibre Channel no resources */ + } msgLogDef; + +/* + * External Declarations for LOG Messages + */ + +/* ELS LOG Messages */ +extern char fc_mes0100[]; +extern char fc_mes0101[]; +extern char fc_mes0102[]; +extern char fc_mes0103[]; +extern char fc_mes0104[]; +extern char fc_mes0105[]; +extern char fc_mes0106[]; +extern char fc_mes0107[]; +extern char fc_mes0108[]; +extern char fc_mes0109[]; +extern char fc_mes0110[]; +extern char fc_mes0111[]; +extern char fc_mes0112[]; +extern char fc_mes0113[]; +extern char fc_mes0114[]; +extern char fc_mes0115[]; +extern char fc_mes0116[]; +extern char fc_mes0117[]; +extern char fc_mes0118[]; +extern char fc_mes0119[]; +extern char fc_mes0120[]; +extern char fc_mes0121[]; +extern char fc_mes0122[]; +extern char fc_mes0123[]; +extern char fc_mes0124[]; +extern char fc_mes0125[]; +extern char fc_mes0126[]; +extern char fc_mes0127[]; +extern char fc_mes0128[]; +extern char fc_mes0129[]; +extern char fc_mes0130[]; +extern char fc_mes0131[]; +extern char fc_mes0132[]; +extern char fc_mes0133[]; +extern char fc_mes0134[]; +extern char fc_mes0135[]; +extern char fc_mes0136[]; + +/* DISCOVERY LOG Messages */ +extern char fc_mes0200[]; +extern char fc_mes0201[]; +extern char fc_mes0202[]; +extern char fc_mes0203[]; +extern char fc_mes0204[]; +extern char fc_mes0205[]; +extern char fc_mes0206[]; +extern char fc_mes0207[]; +extern char fc_mes0208[]; +extern char fc_mes0209[]; +extern char fc_mes0210[]; +extern char fc_mes0211[]; +extern char fc_mes0212[]; +extern char fc_mes0213[]; +extern char fc_mes0214[]; +extern char fc_mes0215[]; +extern char fc_mes0216[]; +extern char fc_mes0217[]; +extern char fc_mes0218[]; +extern char fc_mes0219[]; +extern char fc_mes0220[]; +extern char fc_mes0221[]; +extern char fc_mes0222[]; +extern char fc_mes0223[]; +extern char fc_mes0224[]; +extern char fc_mes0225[]; +extern char fc_mes0226[]; +extern char fc_mes0227[]; +extern char fc_mes0228[]; +extern char fc_mes0229[]; +extern char fc_mes0230[]; +extern char fc_mes0231[]; +extern char fc_mes0232[]; +extern char fc_mes0233[]; +extern char fc_mes0234[]; +extern char fc_mes0235[]; +extern char fc_mes0236[]; +extern char fc_mes0237[]; +extern char fc_mes0238[]; +extern char fc_mes0239[]; +extern char fc_mes0240[]; +extern char fc_mes0241[]; +extern char fc_mes0242[]; +extern char fc_mes0243[]; +extern char fc_mes0244[]; +extern char fc_mes0245[]; +extern char fc_mes0246[]; +extern char fc_mes0247[]; +extern char fc_mes0248[]; +extern char fc_mes0249[]; +extern char fc_mes0250[]; +extern char fc_mes0251[]; +extern char fc_mes0252[]; + +/* MAILBOX LOG Messages */ +extern char fc_mes0300[]; +extern char fc_mes0301[]; +extern char fc_mes0302[]; +extern char fc_mes0303[]; +extern char fc_mes0304[]; +extern char fc_mes0305[]; +extern char fc_mes0306[]; +extern char fc_mes0307[]; +extern char fc_mes0308[]; +extern char fc_mes0309[]; +extern char fc_mes0310[]; +extern char fc_mes0311[]; +extern char fc_mes0312[]; + +/* INIT LOG Messages */ +extern char fc_mes0400[]; +extern char fc_mes0401[]; +extern char fc_mes0402[]; +extern char fc_mes0403[]; +extern char fc_mes0404[]; +extern char fc_mes0405[]; +extern char fc_mes0406[]; +extern char fc_mes0407[]; +extern char fc_mes0408[]; +extern char fc_mes0409[]; +extern char fc_mes0410[]; +extern char fc_mes0411[]; +extern char fc_mes0412[]; +extern char fc_mes0413[]; +extern char fc_mes0414[]; +extern char fc_mes0415[]; +extern char fc_mes0416[]; +extern char fc_mes0417[]; +extern char fc_mes0418[]; +extern char fc_mes0419[]; +extern char fc_mes0420[]; +extern char fc_mes0421[]; +extern char fc_mes0422[]; +extern char fc_mes0423[]; +extern char fc_mes0424[]; +extern char fc_mes0425[]; +extern char fc_mes0426[]; +extern char fc_mes0427[]; +extern char fc_mes0428[]; +extern char fc_mes0429[]; +extern char fc_mes0430[]; +extern char fc_mes0431[]; +extern char fc_mes0432[]; +extern char fc_mes0433[]; +extern char fc_mes0434[]; +extern char fc_mes0435[]; +extern char fc_mes0436[]; +extern char fc_mes0437[]; +extern char fc_mes0438[]; +extern char fc_mes0439[]; +extern char fc_mes0440[]; +extern char fc_mes0440[]; +extern char fc_mes0441[]; +extern char fc_mes0442[]; +extern char fc_mes0443[]; +extern char fc_mes0444[]; +extern char fc_mes0445[]; +extern char fc_mes0446[]; +extern char fc_mes0447[]; +extern char fc_mes0448[]; +extern char fc_mes0449[]; +extern char fc_mes0450[]; +extern char fc_mes0451[]; +extern char fc_mes0452[]; +extern char fc_mes0453[]; +extern char fc_mes0454[]; +extern char fc_mes0455[]; +extern char fc_mes0456[]; +extern char fc_mes0457[]; +extern char fc_mes0458[]; +extern char fc_mes0459[]; +extern char fc_mes0460[]; +extern char fc_mes0461[]; + +/* UNUSED */ +/* +extern char fc_mes0500[]; +*/ + +/* IP LOG Messages */ +extern char fc_mes0600[]; +extern char fc_mes0601[]; +extern char fc_mes0602[]; +extern char fc_mes0603[]; +extern char fc_mes0604[]; +extern char fc_mes0605[]; +extern char fc_mes0606[]; +extern char fc_mes0607[]; +extern char fc_mes0608[]; + +/* FCP LOG Messages */ +extern char fc_mes0700[]; +extern char fc_mes0701[]; +extern char fc_mes0702[]; +extern char fc_mes0703[]; +extern char fc_mes0704[]; +extern char fc_mes0705[]; +extern char fc_mes0706[]; +extern char fc_mes0707[]; +extern char fc_mes0708[]; +extern char fc_mes0709[]; +extern char fc_mes0710[]; +extern char fc_mes0711[]; +extern char fc_mes0712[]; +extern char fc_mes0713[]; +extern char fc_mes0714[]; +extern char fc_mes0715[]; +extern char fc_mes0716[]; +extern char fc_mes0717[]; +extern char fc_mes0718[]; +extern char fc_mes0719[]; +extern char fc_mes0720[]; +extern char fc_mes0721[]; +extern char fc_mes0722[]; +extern char fc_mes0723[]; +extern char fc_mes0724[]; +extern char fc_mes0725[]; +extern char fc_mes0726[]; +extern char fc_mes0727[]; +extern char fc_mes0728[]; +extern char fc_mes0729[]; +extern char fc_mes0730[]; +extern char fc_mes0731[]; +extern char fc_mes0732[]; +extern char fc_mes0733[]; +extern char fc_mes0734[]; +extern char fc_mes0735[]; +extern char fc_mes0736[]; +extern char fc_mes0737[]; +extern char fc_mes0738[]; +extern char fc_mes0739[]; +extern char fc_mes0740[]; +extern char fc_mes0741[]; +extern char fc_mes0742[]; +extern char fc_mes0743[]; +extern char fc_mes0744[]; +extern char fc_mes0745[]; +extern char fc_mes0746[]; +extern char fc_mes0747[]; +extern char fc_mes0748[]; +extern char fc_mes0749[]; +extern char fc_mes0750[]; +extern char fc_mes0751[]; +extern char fc_mes0752[]; +extern char fc_mes0753[]; +extern char fc_mes0754[]; +extern char fc_mes0756[]; + +/* UNUSED */ +/* +extern char fc_mes0800[]; +*/ + +/* NODE LOG Messages */ +extern char fc_mes0900[]; +extern char fc_mes0901[]; +extern char fc_mes0902[]; +extern char fc_mes0903[]; +extern char fc_mes0904[]; +extern char fc_mes0905[]; +extern char fc_mes0906[]; +extern char fc_mes0907[]; +extern char fc_mes0908[]; +extern char fc_mes0909[]; +extern char fc_mes0910[]; +extern char fc_mes0911[]; +extern char fc_mes0912[]; +extern char fc_mes0913[]; +extern char fc_mes0914[]; +extern char fc_mes0915[]; +extern char fc_mes0916[]; +extern char fc_mes0917[]; +extern char fc_mes0918[]; +extern char fc_mes0919[]; +extern char fc_mes0920[]; +extern char fc_mes0921[]; +extern char fc_mes0922[]; +extern char fc_mes0923[]; +extern char fc_mes0924[]; +extern char fc_mes0925[]; +extern char fc_mes0926[]; +extern char fc_mes0927[]; +extern char fc_mes0928[]; + + + +/* MISC LOG messages */ +extern char fc_mes1200[]; +extern char fc_mes1201[]; +extern char fc_mes1202[]; +extern char fc_mes1203[]; +extern char fc_mes1204[]; +extern char fc_mes1205[]; +extern char fc_mes1206[]; +extern char fc_mes1207[]; +extern char fc_mes1208[]; +extern char fc_mes1209[]; +extern char fc_mes1210[]; +extern char fc_mes1211[]; +extern char fc_mes1212[]; +extern char fc_mes1213[]; + +/* LINK LOG Messages */ +extern char fc_mes1300[]; +extern char fc_mes1301[]; +extern char fc_mes1302[]; +extern char fc_mes1303[]; +extern char fc_mes1304[]; +extern char fc_mes1305[]; +extern char fc_mes1306[]; +extern char fc_mes1307[]; + +/* SLI LOG Messages */ +extern char fc_mes1400[]; +extern char fc_mes1401[]; +extern char fc_mes1402[]; + +/* CHK CONDITION LOG Messages */ +/* +extern char fc_mes1500[]; +*/ + +/* + * External Declarations for LOG Message Structure msgBlkLogDef + */ + +/* ELS LOG Message Structures */ +extern msgLogDef fc_msgBlk0100; +extern msgLogDef fc_msgBlk0101; +extern msgLogDef fc_msgBlk0102; +extern msgLogDef fc_msgBlk0103; +extern msgLogDef fc_msgBlk0104; +extern msgLogDef fc_msgBlk0105; +extern msgLogDef fc_msgBlk0106; +extern msgLogDef fc_msgBlk0107; +extern msgLogDef fc_msgBlk0108; +extern msgLogDef fc_msgBlk0109; +extern msgLogDef fc_msgBlk0110; +extern msgLogDef fc_msgBlk0111; +extern msgLogDef fc_msgBlk0112; +extern msgLogDef fc_msgBlk0113; +extern msgLogDef fc_msgBlk0114; +extern msgLogDef fc_msgBlk0115; +extern msgLogDef fc_msgBlk0116; +extern msgLogDef fc_msgBlk0117; +extern msgLogDef fc_msgBlk0118; +extern msgLogDef fc_msgBlk0119; +extern msgLogDef fc_msgBlk0120; +extern msgLogDef fc_msgBlk0121; +extern msgLogDef fc_msgBlk0122; +extern msgLogDef fc_msgBlk0123; +extern msgLogDef fc_msgBlk0124; +extern msgLogDef fc_msgBlk0125; +extern msgLogDef fc_msgBlk0126; +extern msgLogDef fc_msgBlk0127; +extern msgLogDef fc_msgBlk0128; +extern msgLogDef fc_msgBlk0129; +extern msgLogDef fc_msgBlk0130; +extern msgLogDef fc_msgBlk0131; +extern msgLogDef fc_msgBlk0132; +extern msgLogDef fc_msgBlk0133; +extern msgLogDef fc_msgBlk0134; +extern msgLogDef fc_msgBlk0135; +extern msgLogDef fc_msgBlk0136; + +/* DISCOVERY LOG Message Structures */ +extern msgLogDef fc_msgBlk0200; +extern msgLogDef fc_msgBlk0201; +extern msgLogDef fc_msgBlk0202; +extern msgLogDef fc_msgBlk0203; +extern msgLogDef fc_msgBlk0204; +extern msgLogDef fc_msgBlk0205; +extern msgLogDef fc_msgBlk0206; +extern msgLogDef fc_msgBlk0207; +extern msgLogDef fc_msgBlk0208; +extern msgLogDef fc_msgBlk0209; +extern msgLogDef fc_msgBlk0210; +extern msgLogDef fc_msgBlk0211; +extern msgLogDef fc_msgBlk0212; +extern msgLogDef fc_msgBlk0213; +extern msgLogDef fc_msgBlk0214; +extern msgLogDef fc_msgBlk0215; +extern msgLogDef fc_msgBlk0216; +extern msgLogDef fc_msgBlk0217; +extern msgLogDef fc_msgBlk0218; +extern msgLogDef fc_msgBlk0219; +extern msgLogDef fc_msgBlk0220; +extern msgLogDef fc_msgBlk0221; +extern msgLogDef fc_msgBlk0222; +extern msgLogDef fc_msgBlk0223; +extern msgLogDef fc_msgBlk0224; +extern msgLogDef fc_msgBlk0225; +extern msgLogDef fc_msgBlk0226; +extern msgLogDef fc_msgBlk0227; +extern msgLogDef fc_msgBlk0228; +extern msgLogDef fc_msgBlk0229; +extern msgLogDef fc_msgBlk0230; +extern msgLogDef fc_msgBlk0231; +extern msgLogDef fc_msgBlk0232; +extern msgLogDef fc_msgBlk0233; +extern msgLogDef fc_msgBlk0234; +extern msgLogDef fc_msgBlk0235; +extern msgLogDef fc_msgBlk0236; +extern msgLogDef fc_msgBlk0237; +extern msgLogDef fc_msgBlk0238; +extern msgLogDef fc_msgBlk0239; +extern msgLogDef fc_msgBlk0240; +extern msgLogDef fc_msgBlk0241; +extern msgLogDef fc_msgBlk0242; +extern msgLogDef fc_msgBlk0243; +extern msgLogDef fc_msgBlk0244; +extern msgLogDef fc_msgBlk0245; +extern msgLogDef fc_msgBlk0246; +extern msgLogDef fc_msgBlk0247; +extern msgLogDef fc_msgBlk0248; +extern msgLogDef fc_msgBlk0249; +extern msgLogDef fc_msgBlk0250; +extern msgLogDef fc_msgBlk0251; +extern msgLogDef fc_msgBlk0252; + +/* MAILBOX LOG Message Structures */ +extern msgLogDef fc_msgBlk0300; +extern msgLogDef fc_msgBlk0301; +extern msgLogDef fc_msgBlk0302; +extern msgLogDef fc_msgBlk0303; +extern msgLogDef fc_msgBlk0304; +extern msgLogDef fc_msgBlk0305; +extern msgLogDef fc_msgBlk0306; +extern msgLogDef fc_msgBlk0307; +extern msgLogDef fc_msgBlk0308; +extern msgLogDef fc_msgBlk0309; +extern msgLogDef fc_msgBlk0310; +extern msgLogDef fc_msgBlk0311; +extern msgLogDef fc_msgBlk0312; + +/* INIT LOG Message Structures */ +extern msgLogDef fc_msgBlk0400; +extern msgLogDef fc_msgBlk0401; +extern msgLogDef fc_msgBlk0402; +extern msgLogDef fc_msgBlk0403; +extern msgLogDef fc_msgBlk0404; +extern msgLogDef fc_msgBlk0405; +extern msgLogDef fc_msgBlk0406; +extern msgLogDef fc_msgBlk0407; +extern msgLogDef fc_msgBlk0408; +extern msgLogDef fc_msgBlk0409; +extern msgLogDef fc_msgBlk0410; +extern msgLogDef fc_msgBlk0411; +extern msgLogDef fc_msgBlk0412; +extern msgLogDef fc_msgBlk0413; +extern msgLogDef fc_msgBlk0414; +extern msgLogDef fc_msgBlk0415; +extern msgLogDef fc_msgBlk0416; +extern msgLogDef fc_msgBlk0417; +extern msgLogDef fc_msgBlk0418; +extern msgLogDef fc_msgBlk0419; +extern msgLogDef fc_msgBlk0420; +extern msgLogDef fc_msgBlk0421; +extern msgLogDef fc_msgBlk0422; +extern msgLogDef fc_msgBlk0423; +extern msgLogDef fc_msgBlk0424; +extern msgLogDef fc_msgBlk0425; +extern msgLogDef fc_msgBlk0426; +extern msgLogDef fc_msgBlk0427; +extern msgLogDef fc_msgBlk0428; +extern msgLogDef fc_msgBlk0429; +extern msgLogDef fc_msgBlk0430; +extern msgLogDef fc_msgBlk0431; +extern msgLogDef fc_msgBlk0432; +extern msgLogDef fc_msgBlk0433; +extern msgLogDef fc_msgBlk0434; +extern msgLogDef fc_msgBlk0435; +extern msgLogDef fc_msgBlk0436; +extern msgLogDef fc_msgBlk0437; +extern msgLogDef fc_msgBlk0438; +extern msgLogDef fc_msgBlk0439; +extern msgLogDef fc_msgBlk0440; +extern msgLogDef fc_msgBlk0441; +extern msgLogDef fc_msgBlk0442; +extern msgLogDef fc_msgBlk0443; +extern msgLogDef fc_msgBlk0444; +extern msgLogDef fc_msgBlk0445; +extern msgLogDef fc_msgBlk0446; +extern msgLogDef fc_msgBlk0447; +extern msgLogDef fc_msgBlk0448; +extern msgLogDef fc_msgBlk0449; +extern msgLogDef fc_msgBlk0450; +extern msgLogDef fc_msgBlk0451; +extern msgLogDef fc_msgBlk0452; +extern msgLogDef fc_msgBlk0453; +extern msgLogDef fc_msgBlk0454; +extern msgLogDef fc_msgBlk0455; +extern msgLogDef fc_msgBlk0456; +extern msgLogDef fc_msgBlk0457; +extern msgLogDef fc_msgBlk0458; +extern msgLogDef fc_msgBlk0459; +extern msgLogDef fc_msgBlk0460; +extern msgLogDef fc_msgBlk0461; + +/* UNUSED */ +/* +extern msgLogDef fc_msgBlk0500; +*/ + +/* IP LOG Message Structures */ +extern msgLogDef fc_msgBlk0600; +extern msgLogDef fc_msgBlk0601; +extern msgLogDef fc_msgBlk0602; +extern msgLogDef fc_msgBlk0603; +extern msgLogDef fc_msgBlk0604; +extern msgLogDef fc_msgBlk0605; +extern msgLogDef fc_msgBlk0606; +extern msgLogDef fc_msgBlk0607; +extern msgLogDef fc_msgBlk0608; + +/* FCP LOG Message Structures */ +extern msgLogDef fc_msgBlk0700; +extern msgLogDef fc_msgBlk0701; +extern msgLogDef fc_msgBlk0702; +extern msgLogDef fc_msgBlk0703; +extern msgLogDef fc_msgBlk0704; +extern msgLogDef fc_msgBlk0705; +extern msgLogDef fc_msgBlk0706; +extern msgLogDef fc_msgBlk0707; +extern msgLogDef fc_msgBlk0708; +extern msgLogDef fc_msgBlk0709; +extern msgLogDef fc_msgBlk0710; +extern msgLogDef fc_msgBlk0711; +extern msgLogDef fc_msgBlk0712; +extern msgLogDef fc_msgBlk0713; +extern msgLogDef fc_msgBlk0714; +extern msgLogDef fc_msgBlk0715; +extern msgLogDef fc_msgBlk0716; +extern msgLogDef fc_msgBlk0717; +extern msgLogDef fc_msgBlk0718; +extern msgLogDef fc_msgBlk0719; +extern msgLogDef fc_msgBlk0720; +extern msgLogDef fc_msgBlk0721; +extern msgLogDef fc_msgBlk0722; +extern msgLogDef fc_msgBlk0723; +extern msgLogDef fc_msgBlk0724; +extern msgLogDef fc_msgBlk0725; +extern msgLogDef fc_msgBlk0726; +extern msgLogDef fc_msgBlk0727; +extern msgLogDef fc_msgBlk0728; +extern msgLogDef fc_msgBlk0729; +extern msgLogDef fc_msgBlk0730; +extern msgLogDef fc_msgBlk0731; +extern msgLogDef fc_msgBlk0732; +extern msgLogDef fc_msgBlk0733; +extern msgLogDef fc_msgBlk0734; +extern msgLogDef fc_msgBlk0735; +extern msgLogDef fc_msgBlk0736; +extern msgLogDef fc_msgBlk0737; +extern msgLogDef fc_msgBlk0738; +extern msgLogDef fc_msgBlk0739; +extern msgLogDef fc_msgBlk0740; +extern msgLogDef fc_msgBlk0741; +extern msgLogDef fc_msgBlk0742; +extern msgLogDef fc_msgBlk0743; +extern msgLogDef fc_msgBlk0744; +extern msgLogDef fc_msgBlk0745; +extern msgLogDef fc_msgBlk0746; +extern msgLogDef fc_msgBlk0747; +extern msgLogDef fc_msgBlk0748; +extern msgLogDef fc_msgBlk0749; +extern msgLogDef fc_msgBlk0750; +extern msgLogDef fc_msgBlk0751; +extern msgLogDef fc_msgBlk0752; +extern msgLogDef fc_msgBlk0753; +extern msgLogDef fc_msgBlk0754; +extern msgLogDef fc_msgBlk0756; + +/* UNUSED */ +/* +extern msgLogDef fc_msgBlk0800; +*/ + +/* NODE LOG Message Structures */ +extern msgLogDef fc_msgBlk0900; +extern msgLogDef fc_msgBlk0901; +extern msgLogDef fc_msgBlk0902; +extern msgLogDef fc_msgBlk0903; +extern msgLogDef fc_msgBlk0904; +extern msgLogDef fc_msgBlk0905; +extern msgLogDef fc_msgBlk0906; +extern msgLogDef fc_msgBlk0907; +extern msgLogDef fc_msgBlk0908; +extern msgLogDef fc_msgBlk0909; +extern msgLogDef fc_msgBlk0910; +extern msgLogDef fc_msgBlk0911; +extern msgLogDef fc_msgBlk0912; +extern msgLogDef fc_msgBlk0913; +extern msgLogDef fc_msgBlk0914; +extern msgLogDef fc_msgBlk0915; +extern msgLogDef fc_msgBlk0916; +extern msgLogDef fc_msgBlk0917; +extern msgLogDef fc_msgBlk0918; +extern msgLogDef fc_msgBlk0919; +extern msgLogDef fc_msgBlk0920; +extern msgLogDef fc_msgBlk0921; +extern msgLogDef fc_msgBlk0922; +extern msgLogDef fc_msgBlk0923; +extern msgLogDef fc_msgBlk0924; +extern msgLogDef fc_msgBlk0925; +extern msgLogDef fc_msgBlk0926; +extern msgLogDef fc_msgBlk0927; +extern msgLogDef fc_msgBlk0928; + + + +/* MISC LOG Message Structures */ +extern msgLogDef fc_msgBlk1200; +extern msgLogDef fc_msgBlk1201; +extern msgLogDef fc_msgBlk1202; +extern msgLogDef fc_msgBlk1203; +extern msgLogDef fc_msgBlk1204; +extern msgLogDef fc_msgBlk1205; +extern msgLogDef fc_msgBlk1206; +extern msgLogDef fc_msgBlk1207; +extern msgLogDef fc_msgBlk1208; +extern msgLogDef fc_msgBlk1209; +extern msgLogDef fc_msgBlk1210; +extern msgLogDef fc_msgBlk1211; +extern msgLogDef fc_msgBlk1212; +extern msgLogDef fc_msgBlk1213; + +/* LINK LOG Message Structures */ +extern msgLogDef fc_msgBlk1300; +extern msgLogDef fc_msgBlk1301; +extern msgLogDef fc_msgBlk1302; +extern msgLogDef fc_msgBlk1303; +extern msgLogDef fc_msgBlk1304; +extern msgLogDef fc_msgBlk1305; +extern msgLogDef fc_msgBlk1306; +extern msgLogDef fc_msgBlk1307; + +/* SLI LOG Message Structures */ +extern msgLogDef fc_msgBlk1400; +extern msgLogDef fc_msgBlk1401; +extern msgLogDef fc_msgBlk1402; + +/* CHK CONDITION LOG Message Structures */ +/* +extern msgLogDef fc_msgBlk1500; +*/ + +/* + * LOG Messages Numbers + */ + +/* ELS LOG Message Numbers */ +#define FC_LOG_MSG_EL_0100 100 +#define FC_LOG_MSG_EL_0101 101 +#define FC_LOG_MSG_EL_0102 102 +#define FC_LOG_MSG_EL_0103 103 +#define FC_LOG_MSG_EL_0104 104 +#define FC_LOG_MSG_EL_0105 105 +#define FC_LOG_MSG_EL_0106 106 +#define FC_LOG_MSG_EL_0107 107 +#define FC_LOG_MSG_EL_0108 108 +#define FC_LOG_MSG_EL_0109 109 +#define FC_LOG_MSG_EL_0110 110 +#define FC_LOG_MSG_EL_0111 111 +#define FC_LOG_MSG_EL_0112 112 +#define FC_LOG_MSG_EL_0113 113 +#define FC_LOG_MSG_EL_0114 114 +#define FC_LOG_MSG_EL_0115 115 +#define FC_LOG_MSG_EL_0116 116 +#define FC_LOG_MSG_EL_0117 117 +#define FC_LOG_MSG_EL_0118 118 +#define FC_LOG_MSG_EL_0119 119 +#define FC_LOG_MSG_EL_0120 120 +#define FC_LOG_MSG_EL_0121 121 +#define FC_LOG_MSG_EL_0122 122 +#define FC_LOG_MSG_EL_0123 123 +#define FC_LOG_MSG_EL_0124 124 +#define FC_LOG_MSG_EL_0125 125 +#define FC_LOG_MSG_EL_0126 126 +#define FC_LOG_MSG_EL_0127 127 +#define FC_LOG_MSG_EL_0128 128 +#define FC_LOG_MSG_EL_0129 129 +#define FC_LOG_MSG_EL_0130 130 +#define FC_LOG_MSG_EL_0131 131 +#define FC_LOG_MSG_EL_0132 132 +#define FC_LOG_MSG_EL_0133 133 +#define FC_LOG_MSG_EL_0134 134 +#define FC_LOG_MSG_EL_0135 135 +#define FC_LOG_MSG_EL_0136 136 + +/* DISCOVERY LOG Message Numbers */ +#define FC_LOG_MSG_DI_0200 200 +#define FC_LOG_MSG_DI_0201 201 +#define FC_LOG_MSG_DI_0202 202 +#define FC_LOG_MSG_DI_0203 203 +#define FC_LOG_MSG_DI_0204 204 +#define FC_LOG_MSG_DI_0205 205 +#define FC_LOG_MSG_DI_0206 206 +#define FC_LOG_MSG_DI_0207 207 +#define FC_LOG_MSG_DI_0208 208 +#define FC_LOG_MSG_DI_0209 209 +#define FC_LOG_MSG_DI_0210 210 +#define FC_LOG_MSG_DI_0211 211 +#define FC_LOG_MSG_DI_0212 212 +#define FC_LOG_MSG_DI_0213 213 +#define FC_LOG_MSG_DI_0214 214 +#define FC_LOG_MSG_DI_0215 215 +#define FC_LOG_MSG_DI_0216 216 +#define FC_LOG_MSG_DI_0217 217 +#define FC_LOG_MSG_DI_0218 218 +#define FC_LOG_MSG_DI_0219 219 +#define FC_LOG_MSG_DI_0220 220 +#define FC_LOG_MSG_DI_0221 221 +#define FC_LOG_MSG_DI_0222 222 +#define FC_LOG_MSG_DI_0223 223 +#define FC_LOG_MSG_DI_0224 224 +#define FC_LOG_MSG_DI_0225 225 +#define FC_LOG_MSG_DI_0226 226 +#define FC_LOG_MSG_DI_0227 227 +#define FC_LOG_MSG_DI_0228 228 +#define FC_LOG_MSG_DI_0229 229 +#define FC_LOG_MSG_DI_0230 230 +#define FC_LOG_MSG_DI_0231 231 +#define FC_LOG_MSG_DI_0232 232 +#define FC_LOG_MSG_DI_0233 233 +#define FC_LOG_MSG_DI_0234 234 +#define FC_LOG_MSG_DI_0235 235 +#define FC_LOG_MSG_DI_0236 236 +#define FC_LOG_MSG_DI_0237 237 +#define FC_LOG_MSG_DI_0238 238 +#define FC_LOG_MSG_DI_0239 239 +#define FC_LOG_MSG_DI_0240 240 +#define FC_LOG_MSG_DI_0241 241 +#define FC_LOG_MSG_DI_0242 242 +#define FC_LOG_MSG_DI_0243 243 +#define FC_LOG_MSG_DI_0244 244 +#define FC_LOG_MSG_DI_0245 245 +#define FC_LOG_MSG_DI_0246 246 +#define FC_LOG_MSG_DI_0247 247 +#define FC_LOG_MSG_DI_0248 248 +#define FC_LOG_MSG_DI_0249 249 +#define FC_LOG_MSG_DI_0250 250 +#define FC_LOG_MSG_DI_0251 251 +#define FC_LOG_MSG_DI_0252 252 + +/* MAILBOX LOG Message Numbers */ +#define FC_LOG_MSG_MB_0300 300 +#define FC_LOG_MSG_MB_0301 301 +#define FC_LOG_MSG_MB_0302 302 +#define FC_LOG_MSG_MB_0303 303 +#define FC_LOG_MSG_MB_0304 304 +#define FC_LOG_MSG_MB_0305 305 +#define FC_LOG_MSG_MB_0306 306 +#define FC_LOG_MSG_MB_0307 307 +#define FC_LOG_MSG_MB_0308 308 +#define FC_LOG_MSG_MB_0309 309 +#define FC_LOG_MSG_MB_0310 310 +#define FC_LOG_MSG_MB_0311 311 +#define FC_LOG_MSG_MB_0312 312 + +/* INIT LOG Message Numbers */ +#define FC_LOG_MSG_IN_0400 400 +#define FC_LOG_MSG_IN_0401 401 +#define FC_LOG_MSG_IN_0402 402 +#define FC_LOG_MSG_IN_0403 403 +#define FC_LOG_MSG_IN_0404 404 +#define FC_LOG_MSG_IN_0405 405 +#define FC_LOG_MSG_IN_0406 406 +#define FC_LOG_MSG_IN_0407 407 +#define FC_LOG_MSG_IN_0408 408 +#define FC_LOG_MSG_IN_0409 409 +#define FC_LOG_MSG_IN_0410 410 +#define FC_LOG_MSG_IN_0411 411 +#define FC_LOG_MSG_IN_0412 412 +#define FC_LOG_MSG_IN_0413 413 +#define FC_LOG_MSG_IN_0414 414 +#define FC_LOG_MSG_IN_0415 415 +#define FC_LOG_MSG_IN_0416 416 +#define FC_LOG_MSG_IN_0417 417 +#define FC_LOG_MSG_IN_0418 418 +#define FC_LOG_MSG_IN_0419 419 +#define FC_LOG_MSG_IN_0420 420 +#define FC_LOG_MSG_IN_0421 421 +#define FC_LOG_MSG_IN_0422 422 +#define FC_LOG_MSG_IN_0423 423 +#define FC_LOG_MSG_IN_0424 424 +#define FC_LOG_MSG_IN_0425 425 +#define FC_LOG_MSG_IN_0426 426 +#define FC_LOG_MSG_IN_0427 427 +#define FC_LOG_MSG_IN_0428 428 +#define FC_LOG_MSG_IN_0429 429 +#define FC_LOG_MSG_IN_0430 430 +#define FC_LOG_MSG_IN_0431 431 +#define FC_LOG_MSG_IN_0432 432 +#define FC_LOG_MSG_IN_0433 433 +#define FC_LOG_MSG_IN_0434 434 +#define FC_LOG_MSG_IN_0435 435 +#define FC_LOG_MSG_IN_0436 436 +#define FC_LOG_MSG_IN_0437 437 +#define FC_LOG_MSG_IN_0438 438 +#define FC_LOG_MSG_IN_0439 439 +#define FC_LOG_MSG_IN_0440 440 +#define FC_LOG_MSG_IN_0441 441 +#define FC_LOG_MSG_IN_0442 442 +#define FC_LOG_MSG_IN_0443 443 +#define FC_LOG_MSG_IN_0444 444 +#define FC_LOG_MSG_IN_0445 445 +#define FC_LOG_MSG_IN_0446 446 +#define FC_LOG_MSG_IN_0447 447 +#define FC_LOG_MSG_IN_0448 448 +#define FC_LOG_MSG_IN_0449 449 +#define FC_LOG_MSG_IN_0450 450 +#define FC_LOG_MSG_IN_0451 451 +#define FC_LOG_MSG_IN_0452 452 +#define FC_LOG_MSG_IN_0453 453 +#define FC_LOG_MSG_IN_0454 454 +#define FC_LOG_MSG_IN_0455 455 +#define FC_LOG_MSG_IN_0456 456 +#define FC_LOG_MSG_IN_0457 457 +#define FC_LOG_MSG_IN_0458 458 +#define FC_LOG_MSG_IN_0459 459 +#define FC_LOG_MSG_IN_0460 460 +#define FC_LOG_MSG_IN_0461 461 + +/* UNUSED */ +/* +#define FC_LOG_MSG_IN_0500 500 +*/ + +/* IP LOG Message Numbers */ +#define FC_LOG_MSG_IP_0600 600 +#define FC_LOG_MSG_IP_0601 601 +#define FC_LOG_MSG_IP_0602 602 +#define FC_LOG_MSG_IP_0603 603 +#define FC_LOG_MSG_IP_0604 604 +#define FC_LOG_MSG_IP_0605 605 +#define FC_LOG_MSG_IP_0606 606 +#define FC_LOG_MSG_IP_0607 607 +#define FC_LOG_MSG_IP_0608 608 + +/* FCP LOG Message Numbers */ +#define FC_LOG_MSG_FP_0700 700 +#define FC_LOG_MSG_FP_0701 701 +#define FC_LOG_MSG_FP_0702 702 +#define FC_LOG_MSG_FP_0703 703 +#define FC_LOG_MSG_FP_0704 704 +#define FC_LOG_MSG_FP_0705 705 +#define FC_LOG_MSG_FP_0706 706 +#define FC_LOG_MSG_FP_0707 707 +#define FC_LOG_MSG_FP_0708 708 +#define FC_LOG_MSG_FP_0709 709 +#define FC_LOG_MSG_FP_0710 710 +#define FC_LOG_MSG_FP_0711 711 +#define FC_LOG_MSG_FP_0712 712 +#define FC_LOG_MSG_FP_0713 713 +#define FC_LOG_MSG_FP_0714 714 +#define FC_LOG_MSG_FP_0715 715 +#define FC_LOG_MSG_FP_0716 716 +#define FC_LOG_MSG_FP_0717 717 +#define FC_LOG_MSG_FP_0718 718 +#define FC_LOG_MSG_FP_0719 719 +#define FC_LOG_MSG_FP_0720 720 +#define FC_LOG_MSG_FP_0721 721 +#define FC_LOG_MSG_FP_0722 722 +#define FC_LOG_MSG_FP_0723 723 +#define FC_LOG_MSG_FP_0724 724 +#define FC_LOG_MSG_FP_0725 725 +#define FC_LOG_MSG_FP_0726 726 +#define FC_LOG_MSG_FP_0727 727 +#define FC_LOG_MSG_FP_0728 728 +#define FC_LOG_MSG_FP_0729 729 +#define FC_LOG_MSG_FP_0730 730 +#define FC_LOG_MSG_FP_0731 731 +#define FC_LOG_MSG_FP_0732 732 +#define FC_LOG_MSG_FP_0733 733 +#define FC_LOG_MSG_FP_0734 734 +#define FC_LOG_MSG_FP_0735 735 +#define FC_LOG_MSG_FP_0736 736 +#define FC_LOG_MSG_FP_0737 737 +#define FC_LOG_MSG_FP_0738 738 +#define FC_LOG_MSG_FP_0739 739 +#define FC_LOG_MSG_FP_0740 740 +#define FC_LOG_MSG_FP_0741 741 +#define FC_LOG_MSG_FP_0742 742 +#define FC_LOG_MSG_FP_0743 743 +#define FC_LOG_MSG_FP_0744 744 +#define FC_LOG_MSG_FP_0745 745 +#define FC_LOG_MSG_FP_0746 746 +#define FC_LOG_MSG_FP_0747 747 +#define FC_LOG_MSG_FP_0748 748 +#define FC_LOG_MSG_FP_0749 749 +#define FC_LOG_MSG_FP_0750 750 +#define FC_LOG_MSG_FP_0751 751 +#define FC_LOG_MSG_FP_0752 752 +#define FC_LOG_MSG_FP_0753 753 +#define FC_LOG_MSG_FP_0754 754 +#define FC_LOG_MSG_FP_0756 756 + +/* UNUSED */ +/* +#define FC_LOG_MSG_FP_0800 800 +*/ + +/* NODE LOG Message Numbers */ +#define FC_LOG_MSG_ND_0900 900 +#define FC_LOG_MSG_ND_0901 901 +#define FC_LOG_MSG_ND_0902 902 +#define FC_LOG_MSG_ND_0903 903 +#define FC_LOG_MSG_ND_0904 904 +#define FC_LOG_MSG_ND_0905 905 +#define FC_LOG_MSG_ND_0906 906 +#define FC_LOG_MSG_ND_0907 907 +#define FC_LOG_MSG_ND_0908 908 +#define FC_LOG_MSG_ND_0909 909 +#define FC_LOG_MSG_ND_0910 910 +#define FC_LOG_MSG_ND_0911 911 +#define FC_LOG_MSG_ND_0912 912 +#define FC_LOG_MSG_ND_0913 913 +#define FC_LOG_MSG_ND_0914 914 +#define FC_LOG_MSG_ND_0915 915 +#define FC_LOG_MSG_ND_0916 916 +#define FC_LOG_MSG_ND_0917 917 +#define FC_LOG_MSG_ND_0918 918 +#define FC_LOG_MSG_ND_0919 919 +#define FC_LOG_MSG_ND_0920 920 +#define FC_LOG_MSG_ND_0921 921 +#define FC_LOG_MSG_ND_0922 922 +#define FC_LOG_MSG_ND_0923 923 +#define FC_LOG_MSG_ND_0924 924 +#define FC_LOG_MSG_ND_0925 925 +#define FC_LOG_MSG_ND_0926 926 +#define FC_LOG_MSG_ND_0927 927 +#define FC_LOG_MSG_ND_0928 928 + + + +/* MISC LOG Message Numbers */ +#define FC_LOG_MSG_MI_1200 1200 +#define FC_LOG_MSG_MI_1201 1201 +#define FC_LOG_MSG_MI_1202 1202 +#define FC_LOG_MSG_MI_1203 1203 +#define FC_LOG_MSG_MI_1204 1204 +#define FC_LOG_MSG_MI_1205 1205 +#define FC_LOG_MSG_MI_1206 1206 +#define FC_LOG_MSG_MI_1207 1207 +#define FC_LOG_MSG_MI_1208 1208 +#define FC_LOG_MSG_MI_1209 1209 +#define FC_LOG_MSG_MI_1210 1210 +#define FC_LOG_MSG_MI_1211 1211 +#define FC_LOG_MSG_MI_1212 1212 +#define FC_LOG_MSG_MI_1213 1213 + +/* LINK LOG Message Numbers */ +#define FC_LOG_MSG_LK_1300 1300 +#define FC_LOG_MSG_LK_1301 1301 +#define FC_LOG_MSG_LK_1302 1302 +#define FC_LOG_MSG_LK_1303 1303 +#define FC_LOG_MSG_LK_1304 1304 +#define FC_LOG_MSG_LK_1305 1305 +#define FC_LOG_MSG_LK_1306 1306 +#define FC_LOG_MSG_LK_1307 1307 + +/* SLI LOG Message Numbers */ +#define FC_LOG_MSG_LK_1400 1400 +#define FC_LOG_MSG_LK_1401 1401 +#define FC_LOG_MSG_LK_1402 1402 + +/* CHK COMDITION LOG Message Numbers */ +/* +#define FC_LOG_MSG_LK_1500 1500 +*/ +#endif /* _H_FCMSG */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fcmsgcom.c 999-mjb/drivers/scsi/lpfc/fcmsgcom.c --- 000-virgin/drivers/scsi/lpfc/fcmsgcom.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fcmsgcom.c 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,6231 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +/* +LOG Message Preamble Strings + +Preamble strings are displayed at the start of LOG messages. +The 3rd letter of the preamble string identifies the +message type as follows: + +i = Information fc_msgPreamble??i where i = Information +w = Warning fc_msgPreamble??w where w = Warning +c = Error config fc_msgPreamble??c where c = Error config +e = Error fc_msgPreamble??e where e = Error +p = Panic fc_msgPreamble??p where p = Panic +*/ + +/* ELS Log Message Preamble Strings - 100 */ +char fc_msgPreambleELi[] = "ELi:"; /* ELS Information */ +char fc_msgPreambleELw[] = "ELw:"; /* ELS Warning */ +char fc_msgPreambleELe[] = "ELe:"; /* ELS Error */ +char fc_msgPreambleELp[] = "ELp:"; /* ELS Panic */ + +/* DISCOVERY Log Message Preamble Strings - 200 */ +char fc_msgPreambleDIi[] = "DIi:"; /* Discovery Information */ +char fc_msgPreambleDIw[] = "DIw:"; /* Discovery Warning */ +char fc_msgPreambleDIe[] = "DIe:"; /* Discovery Error */ +char fc_msgPreambleDIp[] = "DIp:"; /* Discovery Panic */ + +/* MAIBOX Log Message Preamble Strings - 300 */ +char fc_msgPreambleMBi[] = "MBi:"; /* Mailbox Information */ +char fc_msgPreambleMBw[] = "MBw:"; /* Mailbox Warning */ +char fc_msgPreambleMBe[] = "MBe:"; /* Mailbox Error */ +char fc_msgPreambleMBp[] = "MBp:"; /* Mailbox Panic */ + +/* INIT Log Message Preamble Strings - 400, 500 */ +char fc_msgPreambleINi[] = "INi:"; /* INIT Information */ +char fc_msgPreambleINw[] = "INw:"; /* INIT Warning */ +char fc_msgPreambleINc[] = "INc:"; /* INIT Error Config*/ +char fc_msgPreambleINe[] = "INe:"; /* INIT Error */ +char fc_msgPreambleINp[] = "INp:"; /* INIT Panic */ + +/* IP Log Message Preamble Strings - 600 */ +char fc_msgPreambleIPi[] = "IPi:"; /* IP Information */ +char fc_msgPreambleIPw[] = "IPw:"; /* IP Warning */ +char fc_msgPreambleIPe[] = "IPe:"; /* IP Error */ +char fc_msgPreambleIPp[] = "IPp:"; /* IP Panic */ + +/* FCP Log Message Preamble Strings - 700, 800 */ +char fc_msgPreambleFPi[] = "FPi:"; /* FP Information */ +char fc_msgPreambleFPw[] = "FPw:"; /* FP Warning */ +char fc_msgPreambleFPe[] = "FPe:"; /* FP Error */ +char fc_msgPreambleFPp[] = "FPp:"; /* FP Panic */ + +/* NODE Log Message Preamble Strings - 900 */ +char fc_msgPreambleNDi[] = "NDi:"; /* Node Information */ +char fc_msgPreambleNDe[] = "NDe:"; /* Node Error */ +char fc_msgPreambleNDp[] = "NDp:"; /* Node Panic */ + + + +/* MISC Log Message Preamble Strings - 1200 */ +char fc_msgPreambleMIi[] = "MIi:"; /* MISC Information */ +char fc_msgPreambleMIw[] = "MIw:"; /* MISC Warning */ +char fc_msgPreambleMIc[] = "MIc:"; /* MISC Error Config */ +char fc_msgPreambleMIe[] = "MIe:"; /* MISC Error */ +char fc_msgPreambleMIp[] = "MIp:"; /* MISC Panic */ + +/* Link Log Message Preamble Strings - 1300 */ +char fc_msgPreambleLKi[] = "LKi:"; /* Link Information */ +char fc_msgPreambleLKw[] = "LKw:"; /* Link Warning */ +char fc_msgPreambleLKe[] = "LKe:"; /* Link Error */ +char fc_msgPreambleLKp[] = "Lkp:"; /* Link Panic */ + +/* SLI Log Message Preamble Strings - 1400 */ +char fc_msgPreambleSLe[] = "SLe:"; /* SLI Error */ + +/* CHECK CONDITION Log Message Preamble Strings - 1500 */ +char fc_msgPreambleCKi[] = "CKi:"; /* Check Condition Information */ +char fc_msgPreambleCKe[] = "CKe:"; /* Check Condition Error */ +char fc_msgPreambleCKp[] = "CKp:"; /* Check Condition Panic */ + + +/* + * Begin ELS LOG message structures + */ + +/* +msgName: fc_mes0100 +message: Abort delay xmit clock +descript: The driver is canceling the delay timer for sending an ELS + command. +data: (1) did (2) remoteID (3) ulpIoTag +severity: Warning +log: LOG_ELS verbose +module: fcclockb.c +action: None required +*/ +char fc_mes0100[] = "%sAbort delay xmit clock Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0100 = { + FC_LOG_MSG_EL_0100, /* LOG message number */ + fc_mes0100, /* LOG message pointer */ + fc_msgPreambleELw, /* LOG message preamble pointer */ + FC_MSG_OPUT_GLOB_CTRL, /* LOG message output control */ + FC_LOG_MSG_TYPE_WARN, /* LOG message type */ + LOG_ELS, /* LOG message mask & group */ + ERRID_LOG_UNEXPECT_EVENT }; /* LOG message error ID */ + +/* +msgName: fc_mes0101 +message: Abort delay xmit context +descript: The driver is canceling the delay timer for sending an ELS + command. +data: (1) did (2) remoteID (3) ulpIoTag +severity: Warning +log: LOG_ELS verbose +module: fcclockb.c +action: None required +*/ +char fc_mes0101[] = "%sAbort delay xmit context Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0101 = { + FC_LOG_MSG_EL_0101, + fc_mes0101, + fc_msgPreambleELw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0102 +message: Stray ELS completion +descript: Received an ELS command completion without issuing a + corresponding ELS Command (based on the IOTAG field + in the CMD_ELS_REQUEST_CR IOCB). +data: (1) ulpCommand (2) ulpIoTag +severity: Error +log: Always +module: fcelsb.c +action: This error could indicate a software driver or firmware + problem. If problems persist report these errors to + Technical Support. +*/ +char fc_mes0102[] = "%sStray ELS completion Data: x%x x%x"; +msgLogDef fc_msgBlk0102 = { + FC_LOG_MSG_EL_0102, + fc_mes0102, + fc_msgPreambleELe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0103 +message: Dropping ELS rsp +descript: Dropping ELS response because there is no node table entry. +data: (1) ldata (2) ldid +severity: Error +log: Always +module: fcscsib.c +action: This error could indicate a software driver or firmware + problem. If problems persist report these errors to + Technical Support. +*/ +char fc_mes0103[] = "%sDropping ELS rsp Data: x%x x%x"; +msgLogDef fc_msgBlk0103 = { + FC_LOG_MSG_EL_0103, + fc_mes0103, + fc_msgPreambleELe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0104 +message: Aborted ELS IOCB +descript: Driver decided to abort any action taken as a result of this ELS + command completing. +data: (1) ulpCommand (2) ulpIoTag +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required. +*/ +char fc_mes0104[] = "%sAborted ELS IOCB Data: x%x x%x"; +msgLogDef fc_msgBlk0104 = { + FC_LOG_MSG_EL_0104, + fc_mes0104, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0105 +message: ELS completion +descript: Adapter has notified the driver of ELS command completion. +data: (1) ulpCommand (2) ulpIoTag (3) ulpStatus (4) ulpWord[4] +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required. +*/ +char fc_mes0105[] = "%sELS completion Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0105 = { + FC_LOG_MSG_EL_0105, + fc_mes0105, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0106 +message: Unknown ELS command +descript: Received an unknown ELS command completion. +data: None +severity: Error +log: Always +module: fcelsb.c +action: This error could indicate a software driver or firmware + problem. If problems persist report these errors to + Technical Support. +*/ +char fc_mes0106[] = "%sUnknown ELS command x%x"; +msgLogDef fc_msgBlk0106 = { + FC_LOG_MSG_EL_0106, + fc_mes0106, + fc_msgPreambleELe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0107 +message: ELS command completion error +descript: A driver initiated ELS command completed with an error status. +data: (1) ulpCommand (2) ulpStatus (3) ulpWord[4] (4) ulpWord[5] +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0107[] = "%sELS command completion error Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0107 = { + FC_LOG_MSG_EL_0107, + fc_mes0107, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0108 +message: ELS response completion error +descript: An ELS response sent in response to a received ELS command + completed with an error status. +data: (1) ulpCommand (2) ulpStatus (3) ulpWord[4] (4) ulpWord[5] +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required. +*/ +char fc_mes0108[] = "%sELS response completion error Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0108 = { + FC_LOG_MSG_EL_0108, + fc_mes0108, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0109 +message: ELS response completion +descript: An ELS response sent in response to a received ELS command + completed successfully. +data: (1) nlp_DID (2) nlp_type (3) nlp_flag (4) nlp_state +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0109[] = "%sELS response completion Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0109 = { + FC_LOG_MSG_EL_0109, + fc_mes0109, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0110 +message: ELS command completion error +descript: Adapter has notified the driver of ELS command completion. +data: (1) command (2) ulpStatus (3) ulpWord[4] (4) ulpWord[5] +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0110[] = "%sELS command completion error Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0110 = { + FC_LOG_MSG_EL_0110, + fc_mes0110, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0111 +message: Unknown ELS command +descript: Received an unknown ELS command completion. +data: None +severity: Error +log: Always +module: fcelsb.c +action: This error could indicate a software driver or firmware + problem. If problems persist report these errors to + Technical Support. +*/ +char fc_mes0111[] = "%sUnknown ELS command x%x"; +msgLogDef fc_msgBlk0111 = { + FC_LOG_MSG_EL_0111, + fc_mes0111, + fc_msgPreambleELe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0112 +message: PLOGI completes successfully +descript: A PLOGI to a Fibre Channel NPORT completed successfully +data: (1) remoteID (2) ulpWord[4] (3) ulpWord[5] (4) fc_ffstate +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0112[] = "%sPLOGI completes successfully Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0112 = { + FC_LOG_MSG_EL_0112, + fc_mes0112, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0113 +message: PRLI completes successfully +descript: A PRLI to a FCP target completed successfully. +data: (1) remoteID (2) ulpWord[4] (3) ulpWord[5] (4) fc_ffstate +severity: Information +log: LOG_ELS & LOG_DISCOVERY verbose +module: fcelsb.c +action: None required. +*/ +char fc_mes0113[] = "%sPRLI completes successfully Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0113 = { + FC_LOG_MSG_EL_0113, + fc_mes0113, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS | LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0114 +message: PRLO completes successfully +descript: A PRLO to a FCP target completed successfully. +data: (1) remoteID (2) ulpWord[4] (3) ulpWord[5] (4) fc_ffstate +severity: Information +severity: Information +log: LOG_ELS ELS & LOG_DISCOVERY verbose +module: fcelsb.c +action: None required. +*/ +char fc_mes0114[] = "%sPRLO completes successfully Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0114 = { + FC_LOG_MSG_EL_0114, + fc_mes0114, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0115 +message: LOGO completes successfully +descript: A LOGO to a FCP target completed successfully. +data: (1) remoteID (2) ulpWord[4] (3) ulpWord[5] (4) fc_ffstate +severity: Information +log: LOG_ELS ELS & LOG_DISCOVERY verbose +module: fcelsb.c +action: None required. +*/ +char fc_mes0115[] = "%sLOGO completes successfully Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0115 = { + FC_LOG_MSG_EL_0115, + fc_mes0115, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0116 +message: PDISC completes successfully +descript: A PDISC to a FCP target completed successfully. +data: (1) remoteID (2) ulpWord[4] (3) ulpWord[5] (4) fc_ffstate +severity: Information +log: LOG_ELS ELS & LOG_DISCOVERY verbose +module: fcelsb.c +action: None required. +*/ +char fc_mes0116[] = "%sPDISC completes successfully Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0116 = { + FC_LOG_MSG_EL_0116, + fc_mes0116, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0117 +message: ADISC completes successfully +descript: A ADISC to a FCP target completed successfully. +data: (1) remoteID (2) ulpWord[4] (3) ulpWord[5] (4) fc_ffstate +severity: Information +log: ELS or LOG_DISCOVERY verbose +module: fcelsb.c +action: None required. +*/ +char fc_mes0117[] = "%sADISC completes successfully Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0117 = { + FC_LOG_MSG_EL_0117, + fc_mes0117, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0118 +message: FARP completes successfully +descript: A FARP completed successfully. +data: (1) remoteID (2) ulpWord[4] (3) ulpWord[5] (4) command +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required. +*/ +char fc_mes0118[] = "%sFARP completes successfully Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0118 = { + FC_LOG_MSG_EL_0118, + fc_mes0118, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0119 +message: SCR completes successfully +descript: A SCR completed successfully. +data: (1) remoteID (2) ulpWord[4] (3) ulpWord[5] (4) fc_ffstate +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required. +*/ +char fc_mes0119[] = "%sSCR completes successfully Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0119 = { + FC_LOG_MSG_EL_0119, + fc_mes0119, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0120 +message: RNID completes successfully +descript: A RNID completed successfully. +data: (1) remoteID (2) ulpWord[4] (3) ulpWord[5] (4) fc_ffstate +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required. +*/ +char fc_mes0120[] = "%sRNID completes successfully Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0120 = { + FC_LOG_MSG_EL_0120, + fc_mes0120, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0121 +message: Unknown ELS command completed +descript: Received an unknown ELS command completion. +data: None +severity: Error +log: Always +module: fcelsb.c +action: This error could indicate a software driver or firmware + problem. If problems persist report these errors to + Technical Support. +*/ +char fc_mes0121[] = "%sUnknown ELS command x%x completed"; +msgLogDef fc_msgBlk0121 = { + FC_LOG_MSG_EL_0121, + fc_mes0121, + fc_msgPreambleELe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0122 +message: Unknown ELS IOCB +descript: An unknown IOCB command completed in the ELS ring +data: (1) ulpCommand +severity: Error +log: Always +module: fcelsb.c +action: This error could indicate a software driver or firmware + problem. If problems persist report these errors to + Technical Support. +*/ +char fc_mes0122[] = "%sUnknown ELS IOCB Data: x%x"; +msgLogDef fc_msgBlk0122 = { + FC_LOG_MSG_EL_0122, + fc_mes0122, + fc_msgPreambleELe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0123 +message: Received ELS command +descript: An ELS command was received. +data: (1) ulpWord[5] (2) ulpStatus (3) fc_ffstate +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0123[] = "%sReceived ELS command x%x Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0123 = { + FC_LOG_MSG_EL_0123, + fc_mes0123, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0124 +message: An FLOGI ELS command was received from DID in Loop Mode +descript: While in Loop Mode an unknown or unsupported ELS commnad + was received. +data: None +severity: Error +log: Always +module: fcelsb.c +action: Check device DID +*/ +char fc_mes0124[] = "%sAn FLOGI ELS command x%x was received from DID x%x in Loop Mode"; +msgLogDef fc_msgBlk0124 = { + FC_LOG_MSG_EL_0124, + fc_mes0124, + fc_msgPreambleELe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0125 +message: Received PLOGI command +descript: A PLOGI command was received. +data: (1) nlp_DID (2) nlp_state (3) nlp_flag (4) nlp_Rpi +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0125[] = "%sReceived PLOGI command Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0125 = { + FC_LOG_MSG_EL_0125, + fc_mes0125, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0126 +message: PLOGI chkparm OK +descript: Received a PLOGI from a remote NPORT and its Fibre Channel service + parameters match this HBA. Request can be accepted. +data: (1) nlp_DID (2) nlp_state (3) nlp_flag (4) nlp_Rpi +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0126[] = "%sPLOGI chkparm OK Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0126 = { + FC_LOG_MSG_EL_0126, + fc_mes0126, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0127 +message: Unknown ELS command received from NPORT +descript: Received an unsupported ELS command from a remote NPORT. +data: None +severity: Error +log: Always +module: fcelsb.c +action: Check remote NPORT for potential problem. +*/ +char fc_mes0127[] = "%sUnknown ELS command x%x received from NPORT x%x"; +msgLogDef fc_msgBlk0127 = { + FC_LOG_MSG_EL_0127, + fc_mes0127, + fc_msgPreambleELe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0128 +message: Xmit unknown ELS command +descript: The Fibre Channel driver is attempting to send an + unsupported or unknown ELS command. +data: None +severity: Error +log: Always +module: fcelsb.c +action: This error could indicate a software driver or firmware + problem. If problems persist report these errors to + Technical Support. +*/ +char fc_mes0128[] = "%sXmit unknown ELS command x%x"; +msgLogDef fc_msgBlk0128 = { + FC_LOG_MSG_EL_0128, + fc_mes0128, + fc_msgPreambleELe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0129 +message: Xmit ELS command to remote NPORT +descript: Xmit ELS command to remote NPORT +data: (1) icmd->ulpIoTag (2) binfo->fc_ffstate +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0129[] = "%sXmit ELS command x%x to remote NPORT x%x Data: x%x x%x"; +msgLogDef fc_msgBlk0129 = { + FC_LOG_MSG_EL_0129, + fc_mes0129, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0130 +message: Xmit unknown ELS response (elsCmd> +descript: The Fibre Channel driver is attempting to send an + unsupported or unknown ELS response. +data: None +severity: Error +log: Always +module: fcelsb.c +action: This error could indicate a software driver or firmware + problem. If problems persist report these errors to + Technical Support. +*/ +char fc_mes0130[] = "%sXmit unknown ELS response x%x"; +msgLogDef fc_msgBlk0130 = { + FC_LOG_MSG_EL_0130, + fc_mes0130, + fc_msgPreambleELe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0131 +message: Xmit ELS response to remote NPORT +descript: Xmit ELS response to remote NPORT +data: (1) icmd->ulpIoTag (2) size +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0131[] = "%sXmit ELS response x%x to remote NPORT x%x Data: x%x x%x"; +msgLogDef fc_msgBlk0131 = { + FC_LOG_MSG_EL_0131, + fc_mes0131, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0132 +message: ELS Retry failed +descript: If an ELS command fails, it may be retried up + to 3 times. This message will be recorded if + the driver gives up retrying a specific ELS + command. +data: (1) ELS command, (2) remote PortID +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: If the ELS command is a PRLI, and the destination + PortID is not an FCP Target, no action is required. + Otherwise, check physical connections to Fibre + Channel network and the state of the remote PortID. +*/ +char fc_mes0132[] = "%sELS Retry failed Data: x%x x%x"; +msgLogDef fc_msgBlk0132 = { + FC_LOG_MSG_EL_0132, + fc_mes0132, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0133 +message: Xmit CT response on exchange +descript: Xmit a CT response on the appropriate exchange. +data: (1) ulpIoTag (2) fc_ffstate +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0133[] = "%sXmit CT response on exchange x%x Data: x%x x%x"; +msgLogDef fc_msgBlk0133 = { + FC_LOG_MSG_EL_0133, + fc_mes0133, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0134 +message: Issue GEN REQ IOCB for NPORT +descript: Issue a GEN REQ IOCB for remote NPORT. These are typically + used for CT request. +data: (1) ulpIoTag (2) fc_ffstate +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0134[] = "%sIssue GEN REQ IOCB for NPORT x%x Data: x%x x%x"; +msgLogDef fc_msgBlk0134 = { + FC_LOG_MSG_EL_0134, + fc_mes0134, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0135 +message: Issue GEN REQ IOCB for RNID +descript: Issue a GEN REQ IOCB to support an ELS RNID command +data: (1) ulpWord[5] (2) ulpIoTag (3) fc_ffstate +severity: Information +log: LOG_ELS verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0135[] = "%sIssue GEN REQ IOCB for RNID Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0135 = { + FC_LOG_MSG_EL_0135, + fc_mes0135, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0136 +message: Delayxmit ELS command timeout +descript: The delay for issuing an ELS command has expired. The ELS + command is queued to HBA to be xmitted. +data: (1) ulpIoTag (2) retry (3) remoteID +severity: Information +log: LOG_ELS verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0136[] = "%sDelayxmit ELS command x%x timeout Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0136 = { + FC_LOG_MSG_EL_0136, + fc_mes0136, + fc_msgPreambleELi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_ELS, + ERRID_LOG_TIMEOUT }; + +/* + * Begin DSCOVERY LOG Message Structures + */ + +/* +msgName: fc_mes0200 +message: Device Discovery Started +descript: Device discovery / rediscovery after FLOGI or FAN has started. +data: None +severity: Information +log: LOG_DISCOVERY verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0200[] = "%sDevice Discovery Started"; +msgLogDef fc_msgBlk0200 = { + FC_LOG_MSG_DI_0200, + fc_mes0200, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0201 +message: Device Discovery completion error +descript: This indicates an uncorrectable error was encountered + during device (re)discovery after a link up. Fibre + Channel devices will not be accessible if this message + is displayed. +data: None +severity: Error +log: Always +module: fcrpib.c +action: Reboot system. If problem persists, contact Technical + Support. Run with verbose mode on for more details. +*/ +char fc_mes0201[] = "%sDevice Discovery completion error"; +msgLogDef fc_msgBlk0201 = { + FC_LOG_MSG_DI_0201, + fc_mes0201, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0202 +message: Device Discovery Started +descript: Device discovery / rediscovery after FLOGI or FAN has started. +data: None +severity: Information +log: LOG_DISCOVERY verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0202[] = "%sDevice Discovery Started"; +msgLogDef fc_msgBlk0202 = { + FC_LOG_MSG_DI_0202, + fc_mes0202, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0203 +message: Device Discovery continues +descript: Device discovery in process +data: (1) firstndlp (2) fc_ffstate +severity: Information +log: LOG_DISCOVERY verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0203[] = "%sDevice Discovery continues Data: x%x x%x"; +msgLogDef fc_msgBlk0203 = { + FC_LOG_MSG_DI_0203, + fc_mes0203, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0204 +message: Device Discovery completion error +descript: This indicates an uncorrectable error was encountered + during device (re)discovery after a link up. Fibre + Channel devices will not be accessible if this message + is displayed. +data: None +severity: Error +log: Always +module: fcrpib.c +action: Reboot system. If problem persists, contact Technical + Support. Run with verbose mode on for more details. +*/ +char fc_mes0204[] = "%sDevice Discovery completion error"; +msgLogDef fc_msgBlk0204 = { + FC_LOG_MSG_DI_0204, + fc_mes0204, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0205 +message: Device Discovery authentication +descript: The driver has marked NPORTs in its none table that require ADISC + for authentication. +data: (1) cnt (2) cnt1 (3) cnt2 +severity: Information +log: LOG_DISCOVERY verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0205[] = "%sDevice Discovery authentication Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0205 = { + FC_LOG_MSG_DI_0205, + fc_mes0205, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0206 +message: Device Discovery completion error +descript: This indicates an uncorrectable error was encountered + during device (re)discovery after a link up. Fibre + Channel devices will not be accessible if this message + is displayed. +data: (1) ulpStatus (2) ulpWord[4] (3) ulpWord[5] +severity: Error +log: Always +module: fcelsb.c +action: Reboot system. If problem persists, contact Technical + Support. Run with verbose mode on for more details. +*/ +char fc_mes0206[] = "%sDevice Discovery completion error Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0206 = { + FC_LOG_MSG_DI_0206, + fc_mes0206, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0207 +message: Device Discovery completion error +descript: This indicates an uncorrectable error was encountered + during device (re)discovery after a link up. Fibre + Channel devices will not be accessible if this message + is displayed. +data: None +severity: Error +log: Always +module: fcelsb.c +action: Reboot system. If problem persists, contact Technical + Support. Run with verbose mode on for more details. +*/ +char fc_mes0207[] = "%sDevice Discovery completion error"; +msgLogDef fc_msgBlk0207 = { + FC_LOG_MSG_DI_0207, + fc_mes0207, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0208 +message: FLOGI completes successfully +descript: Fabric Login completed successfully. +data: (1) ulpWord[4] (2) e_d_tov (3) r_a_tov (4) edtovResolution +severity: Information +log: LOG_DISCOVERY verbose +module: fcelsb.c +action: None required. +*/ +char fc_mes0208[] = "%sFLOGI completes successfully Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0208 = { + FC_LOG_MSG_DI_0208, + fc_mes0208, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0209 +message: Device Discovery completes +descript: This indicates successful completion of device + (re)discovery after a link up. +data: None +severity: Information +log: LOG_DISCOVERY verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0209[] = "%sDevice Discovery completes"; +msgLogDef fc_msgBlk0209 = { + FC_LOG_MSG_DI_0209, + fc_mes0209, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0210 +message: PRLI target assigned +descript: The driver has assigned a SCSI ID to the FCP target. +data: (1) ulpWord[5] (2) nlp_pan (3) nlp_sid +severity: Information +log: LOG_DISCOVERY verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0210[] = "%sPRLI target assigned Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0210 = { + FC_LOG_MSG_DI_0210, + fc_mes0210, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0211 +message: Received RSCN command +descript: The driver has received an RSCN command from the fabric. This + indicates a device was potentially added or removed from the + Fibre Channel network. +data: (1) fc_flag (2) defer_rscn.q_cnt (3) fc_rscn.q_cnt (4) fc_mbox_active +severity: Information +log: LOG_DISCOVERY verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0211[] = "%sReceived RSCN command Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0211 = { + FC_LOG_MSG_DI_0211, + fc_mes0211, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0212 +message: Device Discovery completes +descript: This indicates successful completion of device + (re)discovery after a link up. +data: None +severity: Information +log: LOG_DISCOVERY verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0212[] = "%sDevice Discovery completes"; +msgLogDef fc_msgBlk0212 = { + FC_LOG_MSG_DI_0212, + fc_mes0212, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0213 +message: FAN received +descript: A FAN ELS command was received from a Fabric. +data: (1) ulpWord[4] (2) fc_ffstate +severity: Information +log: LOG_DISCOVERY verbose +module: fcelsb.c +action: None required. +*/ +char fc_mes0213[] = "%sFAN received Data: x%x x%x"; +msgLogDef fc_msgBlk0213 = { + FC_LOG_MSG_DI_0213, + fc_mes0213, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0214 +message: RSCN received +descript: A RSCN ELS command was received from a Fabric. +data: (1) fc_flag (2) i (3) *lp (4) fc_rscn_id_cnt +severity: Information +log: LOG_DISCOVERY verbose +module: fcelsb.c +action: None required. +*/ +char fc_mes0214[] = "%sRSCN received Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0214 = { + FC_LOG_MSG_DI_0214, + fc_mes0214, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0215 +message: RSCN processed +descript: A RSCN ELS command was received from a Fabric and processed. +data: (1) fc_flag (2) cnt (3) fc_rscn_id_cnt (4) fc_ffstate +severity: Information +log: LOG_DISCOVERY verbose +module: fcelsb.c +action: None required. +*/ +char fc_mes0215[] = "%sRSCN processed Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0215 = { + FC_LOG_MSG_DI_0215, + fc_mes0215, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0216 +message: Unknown Identifier in RSCN payload +descript: Typically the identifier in the RSCN payload specifies + a domain, area or a specific NportID. If neither of + these are specified, a warning will be recorded. +data: (1) didp->un.word +severity: Error +log: Always +module: fcelsb.c +action: Potential problem with Fabric. Check with Fabric vendor. +*/ +char fc_mes0216[] = "%sUnknown Identifier in RSCN payload Data: x%x"; +msgLogDef fc_msgBlk0216 = { + FC_LOG_MSG_DI_0216, + fc_mes0216, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0217 +message: Device Discovery completion error +descript: This indicates an uncorrectable error was encountered + during device (re)discovery after a link up. Fibre + Channel devices will not be accessible if this message + is displayed. +data: None +severity: Error +log: Always +module: fcelsb.c +action: Reboot system. If problem persists, contact Technical + Support. Run with verbose mode on for more details. +*/ +char fc_mes0217[] = "%sDevice Discovery completion error"; +msgLogDef fc_msgBlk0217 = { + FC_LOG_MSG_DI_0217, + fc_mes0217, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0218 +message: FDMI Request +descript: The driver is sending an FDMI request to the fabric. +data: (1) cmdcode (2) fc_flag +severity: Information +log: LOG_DISCOVERY verbose +module: fcelsb.c +action: None required. +*/ +char fc_mes0218[] = "%sFDMI Req Data: x%x x%x"; +msgLogDef fc_msgBlk0218 = { + FC_LOG_MSG_DI_0218, + fc_mes0218, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + + +/* +msgName: fc_mes0219 +message: Issue FDMI request failed +descript: Cannot issue FDMI request to HBA. +data: (1) SLI_MGMT_DPRT +severity: Information +log: LOG_DISCOVERY verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0219[] = "%sIssue FDMI request failed Data: x%x"; +msgLogDef fc_msgBlk0219 = { + FC_LOG_MSG_DI_0219, + fc_mes0219, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0220 +message: Device Discovery completion error +descript: This indicates an uncorrectable error was encountered + during device (re)discovery after a link up. Fibre + Channel devices will not be accessible if this message + is displayed. +data: None +severity: Error +log: Always +module: fcscsib.c +action: Reboot system. If problem persists, contact Technical + Support. Run with verbose mode on for more details. +*/ +char fc_mes0220[] = "%sDevice Discovery completion error"; +msgLogDef fc_msgBlk0220 = { + FC_LOG_MSG_DI_0220, + fc_mes0220, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0221 +message: FAN timeout +descript: A link up event was received without the login bit set, + so the driver waits E_D_TOV for the Fabric to send a FAN. + If no FAN if received, a FLOGI will be sent after the timeout. +data: None +severity: Warning +log: LOG_DISCOVERY verbose +module: fcscsib.c +action: None required. The driver recovers from this condition by + issuing a FLOGI to the Fabric. +*/ +char fc_mes0221[] = "%sFAN timeout"; +msgLogDef fc_msgBlk0221 = { + FC_LOG_MSG_DI_0221, + fc_mes0221, + fc_msgPreambleDIw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_DISCOVERY, + ERRID_LOG_TIMEOUT }; + +/* +msgName: fc_mes0222 +message: Initial FLOGI timeout +descript: The driver is sending initial FLOGI to fabric. +data: None +severity: Error +log: Always +module: fcscsib.c +action: Check Fabric configuration. The driver recovers from this and + continues with device discovery. +*/ +char fc_mes0222[] = "%sInitial FLOGI timeout"; +msgLogDef fc_msgBlk0222 = { + FC_LOG_MSG_DI_0222, + fc_mes0222, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_TIMEOUT }; + +/* +msgName: fc_mes0223 +message: NameServer Registration timeout +descript: Our registration request to the Fabric was not acknowledged + within RATOV. +data: (1) fc_ns_retry (2) fc_max_ns_retry +severity: Error +log: Always +module: fcscsib.c +action: Check Fabric configuration. The driver recovers from this and + continues with device discovery. +*/ +char fc_mes0223[] = "%sNameServer Registration timeout Data: x%x x%x"; +msgLogDef fc_msgBlk0223 = { + FC_LOG_MSG_DI_0223, + fc_mes0223, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_TIMEOUT }; + +/* +msgName: fc_mes0224 +message: NameServer Query timeout +descript: Node authentication timeout, node Discovery timeout. A NameServer + Query to the Fabric or discovery of reported remote NPorts is not + acknowledged within R_A_TOV. +data: (1) fc_ns_retry (2) fc_max_ns_retry +severity: Error +log: Always +module: fcscsib.c +action: Check Fabric configuration. The driver recovers from this and + continues with device discovery. +*/ +char fc_mes0224[] = "%sNameServer Query timeout Data: x%x x%x"; +msgLogDef fc_msgBlk0224 = { + FC_LOG_MSG_DI_0224, + fc_mes0224, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_TIMEOUT }; + +/* +msgName: fc_mes0225 +message: Device Discovery completes +descript: This indicates successful completion of device + (re)discovery after a link up. +data: None +severity: Information +log: LOG_DISCOVERY verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0225[] = "%sDevice Discovery completes"; +msgLogDef fc_msgBlk0225 = { + FC_LOG_MSG_DI_0225, + fc_mes0225, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0226 +message: Device Discovery completion error +descript: This indicates an uncorrectable error was encountered + during device (re)discovery after a link up. Fibre + Channel devices will not be accessible if this message + is displayed. +data: None +severity: Error +log: Always +module: fcscsib.c +action: Reboot system. If problem persists, contact Technical + Support. Run with verbose mode on for more details. +*/ +char fc_mes0226[] = "%sDevice Discovery completion error"; +msgLogDef fc_msgBlk0226 = { + FC_LOG_MSG_DI_0226, + fc_mes0226, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0227 +message: Node Authentication timeout +descript: The driver has lost track of what NPORTs are being authenticated. +data: None +severity: Error +log: Always +module: fcscsib.c +action: None required. Driver should recover from this event. +*/ +char fc_mes0227[] = "%sNode Authentication timeout"; +msgLogDef fc_msgBlk0227 = { + FC_LOG_MSG_DI_0227, + fc_mes0227, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_TIMEOUT }; + +/* +msgName: fc_mes0228 +message: Node Discovery timeout +descript: The driver has lost track of what NPORTs are being discovered. +data: None +severity: Error +log: Always +module: fcscsib.c +action: None required. Driver should recover from this event. +*/ +char fc_mes0228[] = "%sNode Discovery timeout"; +msgLogDef fc_msgBlk0228 = { + FC_LOG_MSG_DI_0228, + fc_mes0228, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_TIMEOUT }; + +/* +msgName: fc_mes0229 +message: Node Discovery timeout +descript: The driver has lost track of what NPORTs are being discovered. +data: (1) nlp_DID (2) nlp_flag (3) nlp_state (4) nlp_type +severity: Error +log: Always +module: fcscsib.c +action: None required. Driver should recover from this event. +*/ +char fc_mes0229[] = "%sNode Discovery timeout Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0229 = { + FC_LOG_MSG_DI_0229, + fc_mes0229, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_TIMEOUT }; + +/* +msgName: fc_mes0230 +message: Device Discovery completion error +descript: This indicates an uncorrectable error was encountered + during device (re)discovery after a link up. Fibre + Channel devices will not be accessible if this message + is displayed. +data: None +severity: Error +log: Always +module: fcscsib.c +action: Reboot system. If problem persists, contact Technical + Support. Run with verbose mode on for more details. +*/ +char fc_mes0230[] = "%sDevice Discovery completion error"; +msgLogDef fc_msgBlk0230 = { + FC_LOG_MSG_DI_0230, + fc_mes0230, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0231 +message: RSCN timeout +descript: The driver has lost track of what NPORTs have RSCNs pending. +data: (1) fc_ns_retry (2) fc_max_ns_retry +severity: Error +log: Always +module: fcscsib.c +action: None required. Driver should recover from this event. +*/ +char fc_mes0231[] = "%sRSCN timeout Data: x%x x%x"; +msgLogDef fc_msgBlk0231 = { + FC_LOG_MSG_DI_0231, + fc_mes0231, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_TIMEOUT }; + +/* +msgName: fc_mes0232 +message: Node RSCN timeout +descript: The driver is cleaning up the node table entry for a node + that had a pending RSCN. +data: (1) nlp_DID (2) nlp_flag (3) nlp_state (4) nlp_type +severity: Error +log: Always +module: fcscsib.c +action: None required. Driver should recover from this event. +*/ +char fc_mes0232[] = "%sNode RSCN timeout Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0232 = { + FC_LOG_MSG_DI_0232, + fc_mes0232, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_TIMEOUT }; + +/* +msgName: fc_mes0233 +message: PT2PT link up timeout +descript: A PLOGI has not been received, within R_A_TOV, after a + successful FLOGI, which indicates our topology is + point-to-point with another NPort. Typically this PLOGI + is used to assign a NPortID. +data: None +severity: Warning +log: LOG_DISCOVERY verbose +module: fcscsib.c +action: None required. Driver will recover by configuring NPortID as 0. +*/ +char fc_mes0233[] = "%sPT2PT link up timeout"; +msgLogDef fc_msgBlk0233 = { + FC_LOG_MSG_DI_0233, + fc_mes0233, + fc_msgPreambleDIw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_DISCOVERY, + ERRID_LOG_TIMEOUT }; + +/* +msgName: fc_mes0234 +message: Device Discovery completes +descript: This indicates successful completion of device + (re)discovery after a link up. +data: None +severity: Information +log: LOG_DISCOVERY verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0234[] = "%sDevice Discovery completes"; +msgLogDef fc_msgBlk0234 = { + FC_LOG_MSG_DI_0234, + fc_mes0234, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0235 +message: Device Discovery completion error +descript: This indicates an uncorrectable error was encountered + during device (re)discovery after a link up. Fibre + Channel devices will not be accessible if this message + is displayed. +data: None +severity: Error +log: Always +module: fcscsib.c +action: Reboot system. If problem persists, contact Technical + Support. Run with verbose mode on for more details. +*/ +char fc_mes0235[] = "%sDevice Discovery completion error"; +msgLogDef fc_msgBlk0235 = { + FC_LOG_MSG_DI_0235, + fc_mes0235, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0236 +message: NameServer Req +descript: The driver is issuing a nameserver request to the fabric. +data: (1) cmdcode (2) fc_flag (3) fc_rscn_id_cnt +severity: Information +log: LOG_DISCOVERY verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0236[] = "%sNameServer Req Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0236 = { + FC_LOG_MSG_DI_0236, + fc_mes0236, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0237 +message: Unknown Identifier in RSCN list +descript: A RSCN list entry contains an unknown identifier. +data: (1) rscn_did.un.word +severity: Error +log: Always +module: fcscsib.c +action: Potential problem with Fabric. Check with Fabric vendor. +*/ +char fc_mes0237[] = "%sUnknown Identifier in RSCN list Data: x%x"; +msgLogDef fc_msgBlk0237 = { + FC_LOG_MSG_DI_0237, + fc_mes0237, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0238 +message: NameServer Rsp +descript: The driver received a nameserver response. +data: (1) Did (2) nlp_flag (3) fc_flag (4) fc_rscn_id_cnt +severity: Information +log: LOG_DISCOVERY verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0238[] = "%sNameServer Rsp Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0238 = { + FC_LOG_MSG_DI_0238, + fc_mes0238, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0239 +message: NameServer Rsp +descript: The driver received a nameserver response. +data: (1) Did (2) ndlp (3) fc_flag (4) fc_rscn_id_cnt +severity: Information +log: LOG_DISCOVERY verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0239[] = "%sNameServer Rsp Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0239 = { + FC_LOG_MSG_DI_0239, + fc_mes0239, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0240 +message: NameServer Rsp Error +descript: The driver received a nameserver response containig a status error. +data: (1) CommandResponse.bits.CmdRsp (2) ReasonCode (3) Explanation + (4) fc_flag +severity: Information +log: LOG_DISCOVERY verbose +module: fcscsib.c +action: Check Fabric configuration. The driver recovers from this and + continues with device discovery. +*/ +char fc_mes0240[] = "%sNameServer Rsp Error Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0240 = { + FC_LOG_MSG_DI_0240, + fc_mes0240, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0241 +message: NameServer Rsp Error +descript: The driver received a nameserver response containing a status error. +data: (1) CommandResponse.bits.CmdRsp (2) ReasonCode (3) Explanation + (4) fc_flag +severity: Information +log: LOG_DISCOVERY verbose +module: fcscsib.c +action: Check Fabric configuration. The driver recovers from this and + continues with device discovery. +*/ +char fc_mes0241[] = "%sNameServer Rsp Error Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0241 = { + FC_LOG_MSG_DI_0241, + fc_mes0241, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0242 +message: Device Discovery nextnode +descript: The driver continuing with discovery. +data: (1) nlp_state (2) nlp_DID (3) nlp_flag (4) fc_ffstate +severity: Information +log: LOG_DISCOVERY verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0242[] = "%sDevice Discovery nextnode Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0242 = { + FC_LOG_MSG_DI_0242, + fc_mes0242, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0243 +message: Device Discovery nextdisc +descript: The driver continuing with NPORT discovery. +data: (1) fc_nlp_cnt (2) sndcnt (3) fc_mbox_active +severity: Information +log: LOG_DISCOVERY verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0243[] = "%sDevice Discovery nextdisc Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0243 = { + FC_LOG_MSG_DI_0243, + fc_mes0243, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0244 +message: Device Discovery completion error +descript: This indicates an uncorrectable error was encountered + during device (re)discovery after a link up. Fibre + Channel devices will not be accessible if this message + is displayed. +data: None +severity: Error +log: Always +module: fcscsib.c +action: Reboot system. If problem persists, contact Technical + Support. Run with verbose mode on for more details. +*/ +char fc_mes0244[] = "%sDevice Discovery completion error"; +msgLogDef fc_msgBlk0244 = { + FC_LOG_MSG_DI_0244, + fc_mes0244, + fc_msgPreambleDIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0245 +message: Device Discovery next authentication +descript: The driver is continuing with NPORT authentication. +data: (1) fc_nlp_cnt (2) sndcnt (3) fc_mbox_active +severity: Information +log: LOG_DISCOVERY verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0245[] = "%sDevice Discovery next authentication Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0245 = { + FC_LOG_MSG_DI_0245, + fc_mes0245, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0246 +message: Device Discovery next RSCN +descript: The driver is continuing with RSCN processing. +data: (1) fc_nlp_cnt (2) sndcnt (3) fc_mbox_active (4) fc_flag +severity: Information +log: LOG_DISCOVERY verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0246[] = "%sDevice Discovery next RSCN Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0246 = { + FC_LOG_MSG_DI_0246, + fc_mes0246, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0247 +message: Discovery RSCN +descript: The number / type of RSCNs has forced the driver to go to + the nameserver and re-discover all NPORTs. +data: (1) fc_defer_rscn.q_cnt (2) fc_flag (3) fc_rscn_disc_wdt +severity: Information +log: LOG_DISCOVERY verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0247[] = "%sDiscovery RSCN Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0247 = { + FC_LOG_MSG_DI_0247, + fc_mes0247, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0248 +message: Deferred RSCN +descript: The driver has received multiple RSCNs and has deferred the + processing of the most recent RSCN. +data: (1) fc_defer_rscn.q_cnt (2) fc_flag +severity: Information +log: LOG_DISCOVERY verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0248[] = "%sDeferred RSCN Data: x%x x%x"; +msgLogDef fc_msgBlk0248 = { + FC_LOG_MSG_DI_0248, + fc_mes0248, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0249 +message: Device Discovery completes +descript: This indicates successful completion of device + (re)discovery after a link up. +data: (1) fc_flag +severity: Information +log: LOG_DISCOVERY verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0249[] = "%sDevice Discovery completes Data: x%x"; +msgLogDef fc_msgBlk0249 = { + FC_LOG_MSG_DI_0249, + fc_mes0249, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0250 +message: Pending Link Event during Discovery +descript: Received link event during discovery. Causes discovery restart. +data: (1) ulpCommand (2) ulpIoTag (3) ulpStatus (4) ulpWord[4] +severity: Warning +log: LOG_DISCOVERY verbose +module: fcelsb.c +action: None required unless problem persist. If problems persist, check + cabling. +*/ +char fc_mes0250[] = "%sPending Link Event during Discovery Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0250 = { + FC_LOG_MSG_DI_0250, + fc_mes0250, + fc_msgPreambleDIw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0251 +message: FDMI rsp failed +descript: An error response was received to FDMI request +data: (1) SWAP_DATA16(fdmi_cmd) +severity: Information +log: LOG_DISCOVERY verbose +module: fcelsb.c +action: The fabric does not support FDMI, check fabric configuration. +*/ +char fc_mes0251[] = "%sFDMI rsp failed Data: x%x"; +msgLogDef fc_msgBlk0251 = { + FC_LOG_MSG_DI_0251, + fc_mes0251, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0252 +message: EXPIRED RSCN disc timer +descript: The driver timed out when processing an RSCN command from the + fabric. +data: (1) fc_flag +severity: Information +log: LOG_DISCOVERY | LOG_ELS verbose +module: fcscsib.c +action: This error could indicate a software driver or firmware + problem. If problems persist report these errors to + Technical Support. +*/ +char fc_mes0252[] = "%sEXPIRED RSCN disc timer Data: x%x"; +msgLogDef fc_msgBlk0252 = { + FC_LOG_MSG_DI_0252, + fc_mes0252, + fc_msgPreambleDIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_DISCOVERY | LOG_ELS, + ERRID_LOG_UNEXPECT_EVENT }; + +/* + * Begin MAILBOX LOG Message Structures + */ + +/* +msgName: fc_mes0300 +message: READ_LA: no buffers +descript: The driver attempted to issue READ_LA mailbox command to the HBA + but there were no buffer available. +data: None +severity: Warning +log: LOG_MBOX verbose +module: fcmboxb.c +action: This message indicates (1) a possible lack of memory resources. Try + increasing the lpfc 'num_bufs' configuration parameter to allocate + more buffers. (2) A possble driver buffer management problem. If + this problem persists, report these errors to Technical Support. +*/ +char fc_mes0300[] = "%sREAD_LA: no buffers"; +msgLogDef fc_msgBlk0300 = { + FC_LOG_MSG_MB_0300, + fc_mes0300, + fc_msgPreambleMBw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_MBOX, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0301 +message: READ_SPARAM: no buffers +descript: The driver attempted to issue READ_SPARAM mailbox command to the + HBA but there were no buffer available. +data: None +severity: Warning +log: LOG_MBOX verbose +module: fcmboxb.c +action: This message indicates (1) a possible lack of memory resources. Try + increasing the lpfc 'num_bufs' configuration parameter to allocate + more buffers. (2) A possble driver buffer management problem. If + this problem persists, report these errors to Technical Support. +*/ +char fc_mes0301[] = "%sREAD_SPARAM: no buffers"; +msgLogDef fc_msgBlk0301 = { + FC_LOG_MSG_MB_0301, + fc_mes0301, + fc_msgPreambleMBw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_MBOX, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0302 +message: REG_LOGIN: no buffers +descript: The driver attempted to issue REG_LOGIN mailbox command to the HBA + but there were no buffer available. +data: None +severity: Warning +log: LOG_MBOX verbose +module: fcmboxb.c +action: This message indicates (1) a possible lack of memory resources. Try + increasing the lpfc 'num_bufs' configuration parameter to allocate + more buffers. (2) A possble driver buffer management problem. If + this problem persists, report these errors to Technical Support. +*/ +char fc_mes0302[] = "%sREG_LOGIN: no buffers Data x%x x%x"; +msgLogDef fc_msgBlk0302 = { + FC_LOG_MSG_MB_0302, + fc_mes0302, + fc_msgPreambleMBw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_MBOX, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0303 +message: Adapter initialization error, mbxCmd READ_NVPARM, + mbxStatus +descript: A mailbox command failed during initialization. +data: None +severity: Error +log: Always +module: fcLINUX.c +action: This error could indicate a hardware or firmware problem. If + problems persist report these errors to Technical Support. +*/ +char fc_mes0303[] = "%sAdapter init error, mbxCmd x%x READ_NVPARM, mbxStatus x%x"; +msgLogDef fc_msgBlk0303 = { + FC_LOG_MSG_MB_0303, + fc_mes0303, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0304 +message: Stray Mailbox Interrupt, mbxCommand mbxStatus . +descript: Received a mailbox completion interrupt and there are no + outstanding mailbox commands. +data: None +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a hardware or firmware problem. If + problems persist report these errors to Technical Support. +*/ +char fc_mes0304[] = "%sStray Mailbox Interrupt mbxCommand x%x mbxStatus x%x"; +msgLogDef fc_msgBlk0304 = { + FC_LOG_MSG_MB_0304, + fc_mes0304, + fc_msgPreambleMBe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_MBOX, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0305 +message: Mbox cmd cmpl error - RETRYing +descript: A mailbox command completed with an error status that causes the + driver to reissue the mailbox command. +data: (1) mbxCommand (2) word0 (3) fc_ffstate (4) fc_flag +severity: Information +log: LOG_MBOX verbose +module: lp6000.c +action: None required +*/ +char fc_mes0305[] = "%sMbox cmd cmpl error - RETRYing Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0305 = { + FC_LOG_MSG_MB_0305, + fc_mes0305, + fc_msgPreambleMBi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_MBOX, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0306 +message: Mbox cmd cmpl error +descript: A mailbox command completed with an error status. +data: (1) mbxCommand (2) word0 (3) ff_state (4) fc_flag +severity: Information +log: LOG_MBOX verbose +module: lp6000.c +action: None required +*/ +char fc_mes0306[] = "%sMbox cmd cmpl error Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0306 = { + FC_LOG_MSG_MB_0306, + fc_mes0306, + fc_msgPreambleMBi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_MBOX, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0307 +message: Mbox cmd cmpl +descript: A mailbox command completed.. +data: (1) mbxCommand (2) word0 (3) ff_state (4) fc_flag +severity: Information +log: LOG_MBOX verbose +module: lp6000.c +action: None required +*/ +char fc_mes0307[] = "%sMbox cmd cmpl Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0307 = { + FC_LOG_MSG_MB_0307, + fc_mes0307, + fc_msgPreambleMBi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_MBOX, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0308 +message: Mbox cmd issue - BUSY +descript: The driver attempted to issue a mailbox command while the mailbox + was busy processing the previous command. The processing of the + new command will be deferred until the mailbox becomes available. +data: (1) mbxCommand (2) ff_state (3) fc_flag (4) flag +severity: Information +log: LOG_MBOX verbose +module: lp6000.c +action: None required +*/ +char fc_mes0308[] = "%sMbox cmd issue - BUSY Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0308 = { + FC_LOG_MSG_MB_0308, + fc_mes0308, + fc_msgPreambleMBi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_MBOX, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0309 +message: Mailbox cmd issue +descript: The driver is in the process of issuing a mailbox command. +data: (1) ff_state (2) fc_flag (3) flag +severity: Information +log: LOG_MBOX verbose +module: lp6000.c +action: None required +*/ +char fc_mes0309[] = "%sMailbox cmd x%x issue Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0309 = { + FC_LOG_MSG_MB_0309, + fc_mes0309, + fc_msgPreambleMBi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_MBOX, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0310 +message: Mailbox command timeout, status +descript: A Mailbox command was posted to the adapter and did + not complete within 30 seconds. +data: None +severity: Error +log: Always +module: fcscsib.c +action: This error could indicate a software driver or firmware + problem. If no I/O is going through the adapter, reboot + the system. If these problems persist, report these + errors to Technical Support. +*/ +char fc_mes0310[] = "%sMailbox command x%x timeout, status x%x"; +msgLogDef fc_msgBlk0310 = { + FC_LOG_MSG_MB_0310, + fc_mes0310, + fc_msgPreambleMBe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_MBOX, + ERRID_LOG_TIMEOUT }; + +/* +msgName: fc_mes0311 +message: REG_LOGIN cmpl +descript: REG LOGIN mailbox command completed successfully. +data: (1) nlp_DID (2) nlp_state (3) nlp_flag (4) nlp_Rpi +severity: Information +log: LOG_MBOX verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0311[] = "%sREG_LOGIN cmpl Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0311 = { + FC_LOG_MSG_MB_0311, + fc_mes0311, + fc_msgPreambleMBi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_MBOX, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0312 +message: Unknown Mailbox command completion +descript: An unsupported or illegal Mailbox command completed. +data: None +severity: Error +log: Always +module: fcscsib.c +action: This error could indicate a software driver or firmware + problem. If problems persist report these errors to + Technical Support. +*/ +char fc_mes0312[] = "%sUnknown Mailbox command x%x completion"; +msgLogDef fc_msgBlk0312 = { + FC_LOG_MSG_MB_0312, + fc_mes0312, + fc_msgPreambleMBe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_MBOX, + ERRID_LOG_UNEXPECT_EVENT }; + +/* + * Begin INIT LOG Message Structures + */ + +/* +msgName: fc_mes0400 +message: dfc_ioctl entry +descript: Entry point for processing diagnostic ioctl. +data: (1) c_cmd (2) c_arg1 (3) c_arg2 (4) c_outsz +severity: Information +log: LOG_INIT verbose +module: dfcdd.c +action: None required +*/ +char fc_mes0400[] = "%sdfc_ioctl entry Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0400 = { + FC_LOG_MSG_IN_0400, + fc_mes0400, + fc_msgPreambleINi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_INIT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0401 +message: dfc_ioctl exit +descript: Exit point for processing diagnostic ioctl. +data: (1) rc (2) c_outsz (3) c_dataout +severity: Information +log: LOG_INIT verbose +module: dfcdd.c +action: None required +*/ +char fc_mes0401[] = "%sdfc_ioctl exit Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0401 = { + FC_LOG_MSG_IN_0401, + fc_mes0401, + fc_msgPreambleINi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_INIT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0402 +message: dfc_data_alloc +descript: Allocating data buffer to process dfc ioct. +data: (1) fc_dataout (2) fc_outsz +severity: Iniformation +log: LOG_INIT verbose +module: dfcdd.c +action: None required +*/ +char fc_mes0402[] = "%sdfc_data_alloc Data: x%x x%x"; +msgLogDef fc_msgBlk0402 = { + FC_LOG_MSG_IN_0402, + fc_mes0402, + fc_msgPreambleINi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_INIT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0403 +message: dfc_data_free +descript: Freeing data buffer to process dfc ioct. +data: (1) fc_dataout (2) fc_outsz +severity: Information +log: LOG_INIT verbose +module: dfcdd.c +action: None required +*/ +char fc_mes0403[] = "%sdfc_data_free Data: x%x x%x"; +msgLogDef fc_msgBlk0403 = { + FC_LOG_MSG_IN_0403, + fc_mes0403, + fc_msgPreambleINi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_INIT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0404 +message: Service Level Interface (SLI) 1 selected +descript: A PART_SLIM (SLI1) mailbox command was issued. +data: None +severity: Information +log: LOG_INIT verbose +module: fcmboxb.c +action: None required. +*/ +char fc_mes0404[] = "%sService Level Interface (SLI) 1 selected"; +msgLogDef fc_msgBlk0404 = { + FC_LOG_MSG_IN_0404, + fc_mes0404, + fc_msgPreambleINi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_INIT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0405 +message: Service Level Interface (SLI) 2 selected +descript: A CONFIG_PORT (SLI2) mailbox command was issued. +data: None +severity: Information +log: LOG_INIT verbose +module: fcmboxb.c +action: None required. +*/ +char fc_mes0405[] = "%sService Level Interface (SLI) 2 selected"; +msgLogDef fc_msgBlk0405 = { + FC_LOG_MSG_IN_0405, + fc_mes0405, + fc_msgPreambleINi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_INIT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0406 +message: Memory Buffer Pool is below low water mark +descript: A driver memory buffer pool is low on buffers. +data: (1) seg (2) fc_lowmem (3) low +severity: Warning +log: LOG_INIT verbose +module: fcmemb.c +action: None required. Driver will recover as buffers are returned to pool. +*/ +char fc_mes0406[] = "%sMem Buf Pool is below low water mark Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0406 = { + FC_LOG_MSG_IN_0406, + fc_mes0406, + fc_msgPreambleINw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_INIT, + ERRID_LOG_NO_RESOURCE }; + +/* +msgName: fc_mes0407 +message: Memory Buffer Pool is corrupted +descript: The buffer address received from the pool is outside + the range of the pool and is therefore corrupt. +data: (1) seg (2) bp (3) fc_memhi (4) fc_memlo +severity: Error +log: Always +module: fcmemb.c +action: This error could indicate a software driver or firmware + problem. If problems persist report these errors to + Technical Support. +*/ +char fc_mes0407[] = "%sMemory Buffer Pool is corrupted Data x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0407 = { + FC_LOG_MSG_IN_0407, + fc_mes0407, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_NO_RESOURCE }; + +/* +msgName: fc_mes0408 +message: Memory Buffer Pool is corrupted +descript: The buffer address returned to the pool is outside + the range of the pool and is therefore corrupt. +data: (1) seg (2) bp (3) fc_memhi (4) fc_memlo +severity: Error +log: Always +module: fcmemb.c +action: This error could indicate a software driver or firmware + problem. If problems persist report these errors to + Technical Support. +*/ +char fc_mes0408[] = "%sMemory Buffer Pool is corrupted Data x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0408 = { + FC_LOG_MSG_IN_0408, + fc_mes0408, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_NO_RESOURCE }; + +/* +msgName: fc_mes0409 +message: Memory Buffer Pool is out of buffers +descript: A driver memory buffer pool is exhausted. +data: (1) seg (2) fc_free (3) fc_mbox.q_cnt (4) fc_memhi +severity: Error +log: Always +module: fcmemb.c +action: Configure more resources for that buffer pool. If + problems persist report these errors to Technical + Support. +*/ +char fc_mes0409[] = "%sMemory Buffer Pool is out of buffers Data x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0409 = { + FC_LOG_MSG_IN_0409, + fc_mes0409, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_NO_RESOURCE }; + +/* +msgName: fc_mes0410 +message: Cannot find virtual addr for mapped buf on ring +descript: The driver cannot find the specified buffer in its + mapping table. Thus it cannot find the virtual address + needed to access the data. +data: (1) mapbp (2) fc_mpoff (3) fc_mpon +severity: Error +log: Always +module: fcmemb.c +action: This error could indicate a software driver or firmware + problem. If problems persist report these errors to + Technical Support. +*/ +char fc_mes0410[] = "%sCannot find virtual addr for mapped buf on ring %d Data x%x x%x x%x"; +msgLogDef fc_msgBlk0410 = { + FC_LOG_MSG_IN_0410, + fc_mes0410, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_NO_RESOURCE }; + +/* +msgName: fc_mes0411 +message: Scan-down is 2 with Persistent binding - ignoring scan-down +descript: The configuration parameter for Scan-down conflicts with + Persistent binding parameter. +data: (1) a_current (2) fcp_mapping +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0411[] = "%sScan-down is 2 with Persistent binding - ignoring scan-down Data: x%x x%x"; +msgLogDef fc_msgBlk0411 = { + FC_LOG_MSG_IN_0411, + fc_mes0411, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0412 +message: Scan-down is out of range - ignoring scan-down +descript: The configuration parameter for Scan-down is out of range. +data: (1) clp[CFG_SCAN_DOWN].a_current (2) fcp_mapping +severity: Error +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0412[] = "%sScan-down is out of range - ignoring scan-down Data: x%x x%x"; +msgLogDef fc_msgBlk0412 = { + FC_LOG_MSG_IN_0412, + fc_mes0412, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0413 +message: Num-iocbs too low, resetting +descript: The configuration parameter for Num-iocs is too low, resetting + parameter to default value. +data: (1) a_current (2) LPFC_MIN_NUM_IOCBS +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0413[] = "%sNum-iocbs too low, resetting Data: x%x x%x"; +msgLogDef fc_msgBlk0413 = { + FC_LOG_MSG_IN_0413, + fc_mes0413, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0414 +message: Num-iocbs too high, resetting +descript: The configuration parameter for Num-iocs is too high, resetting + parameter to default value. +data: (1) clp[CFG_NUM_IOCBS].a_current (2) LPFC_MAX_NUM_IOCBS +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0414[] = "%sNum-iocbs too high, resetting Data: x%x x%x"; +msgLogDef fc_msgBlk0414 = { + FC_LOG_MSG_IN_0414, + fc_mes0414, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0415 +message: Num-bufs too low, resetting +descript: The configuration parameter for Num-bufs is too low, resetting + parameter to default value. +data: (1) a_current (2) LPFC_MIN_NUM_BUFS +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0415[] = "%sNum-bufs too low, resetting Data: x%x x%x"; +msgLogDef fc_msgBlk0415 = { + FC_LOG_MSG_IN_0415, + fc_mes0415, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0416 +message: Num-bufs too high, resetting +descript: The configuration parameter for Num-bufs is too high, resetting + parameter to default value. +data: (1) a_current (2) LPFC_MAX_NUM_BUFS +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0416[] = "%sNum-bufs too high, resetting Data: x%x x%x"; +msgLogDef fc_msgBlk0416 = { + FC_LOG_MSG_IN_0416, + fc_mes0416, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0417 +message: Target qdepth too high, resetting to max +descript: The configuration parameter for Target queue depth is too high, + resetting parameter to default value. +data: (1) a_current (2) LPFC_MAX_TGT_Q_DEPTH +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0417[] = "%sTarget qdepth too high, resetting to max Data: x%x x%x"; +msgLogDef fc_msgBlk0417 = { + FC_LOG_MSG_IN_0417, + fc_mes0417, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0418 +message: LUN qdepth too high, resetting to max +descript: The configuration parameter for LUN queue depth is too high, + resetting parameter to maximum default value. +data: (1) a_current (2) LPFC_MAX_LUN_Q_DEPTH +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0418[] = "%sLUN qdepth too high, resetting to max Data: x%x x%x"; +msgLogDef fc_msgBlk0418 = { + FC_LOG_MSG_IN_0418, + fc_mes0418, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0419 +message: LUN qdepth cannot be , resetting to 1 +descript: The configuration parameter for LUN queue depth is set to 0. + Resetting parameter to default value of 1. +data: (1) a_current +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0419[] = "%sLUN qdepth cannot be %d, resetting to 1"; +msgLogDef fc_msgBlk0419 = { + FC_LOG_MSG_IN_0419, + fc_mes0419, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0420 +message: Fcpfabric_tmo too high, resetting +descript: The configuration parameter for Fcpfabric_tmo is too high, + resetting parameter to default value. +data: (1) a_current (2) LPFC_MAX_FABRIC_TIMEOUT +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0420[] = "%sFcpfabric_tmo too high, resetting Data: x%x x%x"; +msgLogDef fc_msgBlk0420 = { + FC_LOG_MSG_IN_0420, + fc_mes0420, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0421 +message: Fcp-class is illegal, resetting to default +descript: The configuration parameter for Fcp-class is illegal, resetting + parameter to default value. +data: (1) a_current (2) CLASS3 +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0421[] = "%sFcp-class is illegal, resetting Data: x%x x%x"; +msgLogDef fc_msgBlk0421 = { + FC_LOG_MSG_IN_0421, + fc_mes0421, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0422 +message: No-device-delay too high, resetting to max +descript: The configuration parameter for No-device-delay is too high, + resetting parameter to maximum default value. +data: (1) a_current (2) LPFC_MAX_NO_DEVICE_DELAY +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0422[] = "%sNo-device-delay too high, resetting to max Data: x%x x%x"; +msgLogDef fc_msgBlk0422 = { + FC_LOG_MSG_IN_0422, + fc_mes0422, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0423 +message: Post_ip_buf too low, resetting +descript: The configuration parameter for Post_ip_buf is too low, resetting + parameter to default value. +data: (1) a_current (2) LPFC_MIN_POST_IP_BUF +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0423[] = "%sPost_ip_buf too low, resetting Data: x%x x%x"; +msgLogDef fc_msgBlk0423 = { + FC_LOG_MSG_IN_0423, + fc_mes0423, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0424 +message: Post_ip_buf too high, resetting +descript: The configuration parameter for Post_ip_buf is too high, resetting + parameter to default value. +data: (1) a_current (2) LPFC_MAX_POST_IP_BUF +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0424[] = "%sPost_ip_buf too high, resetting Data: x%x x%x"; +msgLogDef fc_msgBlk0424 = { + FC_LOG_MSG_IN_0424, + fc_mes0424, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0425 +message: Xmt-que_size too low, resetting +descript: The configuration parameter for Xmt-que_size is too low, resetting + parameter to default value. +data: (1) a_current (2) LPFC_MIN_XMT_QUE_SIZE +severity: Error config +log: Always +module: fcLINUXcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0425[] = "%sXmt-que_size too low, resetting Data: x%x x%x"; +msgLogDef fc_msgBlk0425 = { + FC_LOG_MSG_IN_0425, + fc_mes0425, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0426 +message: Xmt-que_size too high, resetting +descript: The configuration parameter for Xmt-que_size is too high, resetting + parameter to default value. +data: (1) a_current (2) LPFC_MAX_XMT_QUE_SIZE +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0426[] = "%sXmt-que_size too high, resetting Data: x%x x%x"; +msgLogDef fc_msgBlk0426 = { + FC_LOG_MSG_IN_0426, + fc_mes0426, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0427 +message: Ip-class is illegal, resetting +descript: The configuration parameter for Ip-class is illegal, resetting + parameter to default value. +data: (1) a_current (2) CLASS3 +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0427[] = "%sIp-class is illegal, resetting Data: x%x x%x"; +msgLogDef fc_msgBlk0427 = { + FC_LOG_MSG_IN_0427, + fc_mes0427, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0428 +message: Topology is illegal, resetting +descript: The configuration parameter for Topology is illegal, resetting + parameter to default value. +data: (1) a_current (2) LPFC_DFT_TOPOLOGY +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0428[] = "%sTopology is illegal, resetting Data: x%x x%x"; +msgLogDef fc_msgBlk0428 = { + FC_LOG_MSG_IN_0428, + fc_mes0428, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0429 +message: Linkdown_tmo too high, resetting +descript: The configuration parameter for Linkdown_tmo is too high, resetting + parameter to default value. +data: (1) a_current (2) LPFC_MAX_LNKDWN_TIMEOUT +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0429[] = "%sLinkdown_tmo too high, resetting Data: x%x x%x"; +msgLogDef fc_msgBlk0429 = { + FC_LOG_MSG_IN_0429, + fc_mes0429, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0430 +message: WWPN binding entry : Syntax error code +descript: A syntax error occured while parsing WWPN binding + configuraion information. +data: None +detail: Binding syntax error codes + 0 FC_SYNTAX_OK + 1 FC_SYNTAX_OK_BUT_NOT_THIS_BRD + 2 FC_SYNTAX_ERR_ASC_CONVERT + 3 FC_SYNTAX_ERR_EXP_COLON + 4 FC_SYNTAX_ERR_EXP_LPFC + 5 FC_SYNTAX_ERR_INV_LPFC_NUM + 6 FC_SYNTAX_ERR_EXP_T + 7 FC_SYNTAX_ERR_INV_TARGET_NUM + 8 FC_SYNTAX_ERR_EXP_D + 9 FC_SYNTAX_ERR_INV_DEVICE_NUM + 10 FC_SYNTAX_ERR_INV_RRATIO_NUM + 11 FC_SYNTAX_ERR_EXP_NULL_TERM +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0430[] = "%sWWPN binding entry %d: Syntax error code %d"; +msgLogDef fc_msgBlk0430 = { + FC_LOG_MSG_IN_0430, + fc_mes0430, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0431 +message: WWNN binding entry : Syntax error code +descript: A syntax error occured while parsing WWNN binding + configuraion information. +data: None +detail: Binding syntax error codes + 0 FC_SYNTAX_OK + 1 FC_SYNTAX_OK_BUT_NOT_THIS_BRD + 2 FC_SYNTAX_ERR_ASC_CONVERT + 3 FC_SYNTAX_ERR_EXP_COLON + 4 FC_SYNTAX_ERR_EXP_LPFC + 5 FC_SYNTAX_ERR_INV_LPFC_NUM + 6 FC_SYNTAX_ERR_EXP_T + 7 FC_SYNTAX_ERR_INV_TARGET_NUM + 8 FC_SYNTAX_ERR_EXP_D + 9 FC_SYNTAX_ERR_INV_DEVICE_NUM + 10 FC_SYNTAX_ERR_INV_RRATIO_NUM + 11 FC_SYNTAX_ERR_EXP_NULL_TERM +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0431[] = "%sWWNN binding entry %d: Syntax error code %d"; +msgLogDef fc_msgBlk0431 = { + FC_LOG_MSG_IN_0431, + fc_mes0431, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0432 +message: WWPN binding entry: node table full +descript: More bindings entries were configured than the driver can handle. +data: None +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file such that + fewer bindings are configured. +*/ +char fc_mes0432[] = "%sWWPN binding entry: node table full"; +msgLogDef fc_msgBlk0432 = { + FC_LOG_MSG_IN_0432, + fc_mes0432, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0433 +message: WWNN binding entry: node table full +descript: More bindings entries were configured than the driver can handle. +data: None +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file such that + fewer bindings are configured. +*/ +char fc_mes0433[] = "%sWWNN binding entry: node table full"; +msgLogDef fc_msgBlk0433 = { + FC_LOG_MSG_IN_0433, + fc_mes0433, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0434 +message: DID binding entry : Syntax error code +descript: A syntax error occured while parsing DID binding + configuraion information. +data: None +detail: Binding syntax error codes + 0 FC_SYNTAX_OK + 1 FC_SYNTAX_OK_BUT_NOT_THIS_BRD + 2 FC_SYNTAX_ERR_ASC_CONVERT + 3 FC_SYNTAX_ERR_EXP_COLON + 4 FC_SYNTAX_ERR_EXP_LPFC + 5 FC_SYNTAX_ERR_INV_LPFC_NUM + 6 FC_SYNTAX_ERR_EXP_T + 7 FC_SYNTAX_ERR_INV_TARGET_NUM + 8 FC_SYNTAX_ERR_EXP_D + 9 FC_SYNTAX_ERR_INV_DEVICE_NUM + 10 FC_SYNTAX_ERR_INV_RRATIO_NUM + 11 FC_SYNTAX_ERR_EXP_NULL_TERM +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes0434[] = "%sDID binding entry %d: Syntax error code %d"; +msgLogDef fc_msgBlk0434 = { + FC_LOG_MSG_IN_0434, + fc_mes0434, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0435 +message: DID binding entry: node table full +descript: More bindings entries were configured than the driver can handle. +data: None +severity: Error config +log: Always +module: fcLINUXfcp.c +action: Make neccessary changes to lpfc configuration file such that + fewer bindings are configured. +*/ +char fc_mes0435[] = "%sDID binding entry: node table full"; +msgLogDef fc_msgBlk0435 = { + FC_LOG_MSG_IN_0435, + fc_mes0435, + fc_msgPreambleINc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_INIT, + ERRID_LOG_INIT }; +/* +msgName: fc_mes0436 +message: Adapter failed to init, timeout, status reg +descript: The adapter failed during powerup diagnostics after it was reset. +data: None +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a hardware or firmware problem. If + problems persist report these errors to Technical Support. +*/ +char fc_mes0436[] = "%sAdapter failed to init, timeout, status reg x%x"; +msgLogDef fc_msgBlk0436 = { + FC_LOG_MSG_IN_0436, + fc_mes0436, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0437 +message: Adapter failed to init, chipset, status reg +descript: The adapter failed during powerup diagnostics after it was reset. +data: None +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a hardware or firmware problem. If + problems persist report these errors to Technical Support. +*/ +char fc_mes0437[] = "%sAdapter failed to init, chipset, status reg x%x"; +msgLogDef fc_msgBlk0437 = { + FC_LOG_MSG_IN_0437, + fc_mes0437, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0438 +message: Adapter failed to init, chipset, status reg +descript: The adapter failed during powerup diagnostics after it was reset. +data: None +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a hardware or firmware problem. If + problems persist report these errors to Technical Support. +*/ +char fc_mes0438[] = "%sAdapter failed to init, chipset, status reg x%x"; +msgLogDef fc_msgBlk0438 = { + FC_LOG_MSG_IN_0438, + fc_mes0438, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0439 +message: Adapter failed to init, mbxCmd READ_REV, mbxStatus +descript: Adapter initialization failed when issuing READ_REV mailbox command. +data: None +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a hardware or firmware problem. If + problems persist report these errors to Technical Support. +*/ +char fc_mes0439[] = "%sAdapter failed to init, mbxCmd x%x READ_REV, mbxStatus x%x"; +msgLogDef fc_msgBlk0439 = { + FC_LOG_MSG_IN_0439, + fc_mes0439, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0440 +message: Adapter failed to init, mbxCmd READ_REV detected outdated firmware +descript: Outdated firmware was detected during initialization. +data: (1) read_rev_reset +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a hardware or firmware problem. Update + firmware. If problems persist report these errors to Technical + Support. +*/ +char fc_mes0440[] = "%sAdapter failed to init, mbxCmd x%x READ_REV detected outdated firmware Data: x%x"; +msgLogDef fc_msgBlk0440 = { + FC_LOG_MSG_IN_0440, + fc_mes0440, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0441 +message: Adapter failed to init, mbxCmd DUMP VPD, mbxStatus +descript: Adapter initialization failed when issuing DUMP_VPD mailbox command. +data: None +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a hardware or firmware problem. If + problems persist report these errors to Technical Support. +*/ +char fc_mes0441[] = "%sAdapter failed to init, mbxCmd x%x DUMP VPD, mbxStatus x%x"; +msgLogDef fc_msgBlk0441 = { + FC_LOG_MSG_IN_0441, + fc_mes0441, + fc_msgPreambleINw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0442 +message: Adapter failed to init, mbxCmd CONFIG_PORT, mbxStatus +descript: Adapter initialization failed when issuing CONFIG_PORT mailbox + command. +data: 0 +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a hardware or firmware problem. If + problems persist report these errors to Technical Support. +*/ +char fc_mes0442[] = "%sAdapter failed to init, mbxCmd x%x CONFIG_PORT, mbxStatus x%x Data: x%x"; +msgLogDef fc_msgBlk0442 = { + FC_LOG_MSG_IN_0442, + fc_mes0442, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0443 +message: SLI1 not supported, mbxCmd , mbxStatus +descript: The driver no longer support SLI-1 mode. +data: 0 +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a driver problem. If problems persist + report these errors to Technical Support. +*/ +char fc_mes0443[] = "%sSLI1 not supported, mbxCmd x%x, mbxStatus x%x Data: x%x"; +msgLogDef fc_msgBlk0443 = { + FC_LOG_MSG_IN_0443, + fc_mes0443, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0444 +message: Adapter failed to init, no buffers for RUN_BIU_DIAG +descript: The driver attempted to issue RUN_BIU_DIAG mailbox command to + the HBA but there were no buffer available. +data: None +severity: Error +log: Always +module: lp6000.c +action: This message indicates (1) a possible lack of memory resources. + Try increasing the lpfc 'num_bufs' configuration parameter to + allocate more buffers. (2) A possble driver buffer management + problem. If this problem persists, report these errors to + Technical Support. +*/ +char fc_mes0444[] = "%sAdapter failed to init, no buffers for RUN_BIU_DIAG"; +msgLogDef fc_msgBlk0444 = { + FC_LOG_MSG_IN_0444, + fc_mes0444, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0445 +message: RUN_BIU_DIAG failed +descript: Adapter failed to init properly because a PCI bus DMA + test failed. +data: None +severity: Error +log: Always +module: lp6000.c +action: This error usually indicates a hardware problem with the + adapter. Run diagnostics. +*/ +char fc_mes0445[] = "%sRUN_BIU_DIAG failed"; +msgLogDef fc_msgBlk0445 = { + FC_LOG_MSG_IN_0445, + fc_mes0445, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0446 +message: Adapter failed to init, mbxCmd CFG_RING, mbxStatus , ring +descript: Adapter initialization failed when issuing CFG_RING mailbox command. +data: None +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a hardware or firmware problem. If + problems persist report these errors to Technical Support. +*/ +char fc_mes0446[] = "%sAdapter failed to init, mbxCmd x%x CFG_RING, mbxStatus x%x, ring %d"; +msgLogDef fc_msgBlk0446 = { + FC_LOG_MSG_IN_0446, + fc_mes0446, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0447 +message: Adapter failed init, mbxCmd rubBIUdiag mbxStatus +descript: Adapter initialization failed when issuing runBIUdiag mailbox + command. +data: None +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a hardware or firmware problem. If + problems persist report these errors to Technical Support. +*/ +char fc_mes0447[] = "%sAdapter failed init, mbxCmd x%x CONFIG_LINK mbxStatus x%x"; +msgLogDef fc_msgBlk0447 = { + FC_LOG_MSG_IN_0447, + fc_mes0447, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0448 +message: Adapter failed to init, mbxCmd READ_SPARM, mbxStatus +descript: Adapter initialization failed when issuing READ_SPARM mailbox + command. +data: None +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a hardware or firmware problem. If + problems persist report these errors to Technical Support. +*/ +char fc_mes0448[] = "%sAdapter failed init, mbxCmd x%x READ_SPARM mbxStatus x%x"; +msgLogDef fc_msgBlk0448 = { + FC_LOG_MSG_IN_0448, + fc_mes0448, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0449 +message: WorldWide PortName Type doesn't conform to IP Profile +descript: In order to run IP, the WorldWide PortName must be of type + IEEE (NAA = 1). This message displays if the adapter WWPN + doesn't conform with the standard. +data: None +severity: Error +log: Always +module: lp6000.c +action: Turn off the network-on configuration parameter or configure + a different WWPN. +*/ +char fc_mes0449[] = "%sWorldWide PortName Type x%x doesn't conform to IP Profile"; +msgLogDef fc_msgBlk0449 = { + FC_LOG_MSG_IN_0449, + fc_mes0449, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0450 +message: Adapter failed to init, mbxCmd FARP, mbxStatus +descript: Adapter initialization failed when issuing FARP mailbox command. +data: None +severity: Warning +log: LOG_INIT verbose +module: lp6000.c +action: None required +*/ +char fc_mes0450[] = "%sAdapter failed to init, mbxCmd x%x FARP, mbxStatus x%x"; +msgLogDef fc_msgBlk0450 = { + FC_LOG_MSG_IN_0450, + fc_mes0450, + fc_msgPreambleINw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0451 +message: Enable interrupt handler failed +descript: The driver attempted to register the HBA interrupt service + routine with the host operating system but failed. +data: None +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a hardware or driver problem. If + problems persist report these errors to Technical Support. +*/ +char fc_mes0451[] = "%sEnable interrupt handler failed"; +msgLogDef fc_msgBlk0451 = { + FC_LOG_MSG_IN_0451, + fc_mes0451, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0452 +message: Bring Adapter offline +descript: The FC driver has received a request to bring the adapter + offline. This may occur when running lputil. +data: None +severity: Warning +log: LOG_INIT verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0452[] = "%sBring Adapter offline"; +msgLogDef fc_msgBlk0452 = { + FC_LOG_MSG_IN_0452, + fc_mes0452, + fc_msgPreambleINw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_INIT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0453 +message: Adapter failed to init, mbxCmd READ_CONFIG, mbxStatus +descript: Adapter initialization failed when issuing READ_CONFIG mailbox + command. +data: None +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a hardware or firmware problem. If + problems persist report these errors to Technical Support. +*/ +char fc_mes0453[] = "%sAdapter failed to init, mbxCmd x%x READ_CONFIG, mbxStatus x%x"; +msgLogDef fc_msgBlk0453 = { + FC_LOG_MSG_IN_0453, + fc_mes0453, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0454 +message: Adapter failed to init, mbxCmd INIT_LINK, mbxStatus +descript: Adapter initialization failed when issuing INIT_LINK mailbox command. +data: None +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a hardware or firmware problem. If + problems persist report these errors to Technical Support. +*/ +char fc_mes0454[] = "%sAdapter failed to init, mbxCmd x%x INIT_LINK, mbxStatus x%x"; +msgLogDef fc_msgBlk0454 = { + FC_LOG_MSG_IN_0454, + fc_mes0454, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0455 +message: Vital Product +descript: Vital Product Data (VPD) contained in HBA flash. +data: (1) vpd[0] (2) vpd[1] (3) vpd[2] (4) vpd[3] +severity: Information +log: LOG_INIT verbose +module: lp6000.c +action: None required +*/ +char fc_mes0455[] = "%sVital Product Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0455 = { + FC_LOG_MSG_IN_0455, + fc_mes0455, + fc_msgPreambleINi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0457 +message: Adapter Hardware Error +descript: The driver received an interrupt indicting a possible hardware + problem. +data: (1) status (2) status1 (3) status2 +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a hardware or firmware problem. If + problems persist report these errors to Technical Support. +*/ +char fc_mes0457[] = "%sAdapter Hardware Error Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0457 = { + FC_LOG_MSG_IN_0457, + fc_mes0457, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* +msgName: fc_mes0458 +message: Bring Adapter online +descript: The FC driver has received a request to bring the adapter + online. This may occur when running lputil. +data: None +severity: Warning +log: LOG_INIT verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0458[] = "%sBring Adapter online"; +msgLogDef fc_msgBlk0458 = { + FC_LOG_MSG_IN_0458, + fc_mes0458, + fc_msgPreambleINw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_INIT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0459 +message: Bring Adapter online +descript: The FC driver has received a request to bring the adapter + online. This may occur when running lputil. +data: None +severity: Warning +log: LOG_INIT verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0459[] = "%sBring Adapter online"; +msgLogDef fc_msgBlk0459 = { + FC_LOG_MSG_IN_0459, + fc_mes0459, + fc_msgPreambleINw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_INIT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0460 +message: Bring Adapter offline +descript: The FC driver has received a request to bring the adapter + offline. This may occur when running lputil. +data: None +severity: Warning +log: LOG_INIT verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0460[] = "%sBring Adapter offline"; +msgLogDef fc_msgBlk0460 = { + FC_LOG_MSG_IN_0460, + fc_mes0460, + fc_msgPreambleINw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_INIT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0461 +message: Adapter failed init, mbxCmd CONFIG_LINK mbxStatus +descript: Adapter initialization failed when issuing CONFIG_LINK mailbox + command. +data: None +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a hardware or firmware problem. If + problems persist report these errors to Technical Support. +*/ +char fc_mes0461[] = "%sAdapter failed init, mbxCmd x%x CONFIG_LINK mbxStatus x%x"; +msgLogDef fc_msgBlk0461 = { + FC_LOG_MSG_IN_0461, + fc_mes0461, + fc_msgPreambleINe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_INIT, + ERRID_LOG_INIT }; + +/* + * UNUSED 0500 + */ + +/* + * Begin IP LOG Message Structures + */ + +/* +msgName: fc_mes0600 +message: FARP-RSP received from DID . +descript: A FARP ELS command response was received. +data: None +severity: Information +log: LOG_IP verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0600[] = "%sFARP-RSP received from DID x%x"; +msgLogDef fc_msgBlk0600 = { + FC_LOG_MSG_IP_0600, + fc_mes0600, + fc_msgPreambleIPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_IP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0601 +message: FARP-REQ received fron DID +descript: A FARP ELS command request was received. . +data: None +severity: Information +log: LOG_IP verbose +module: fcelsb.c +action: None required +*/ +char fc_mes0601[] = "%sFARP-REQ received from DID x%x"; +msgLogDef fc_msgBlk0601 = { + FC_LOG_MSG_IP_0601, + fc_mes0601, + fc_msgPreambleIPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_IP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0602 +message: IP Response Ring out of posted buffers +descript: The IP ring returned all posted buffers to the driver + and is waiting for the driver to post new buffers. This + could mean the host system is out of TCP/IP buffers. +data: (1) fc_missbufcnt (2) NoRcvBuf +severity: Warning +log: LOG_IP verbose +module: fcscsib.c +action: Try allocating more IP buffers (STREAMS buffers or mbufs) + of size 4096 and/or increasing the post-ip-buf lpfc + configuration parameter. Reboot the system. +*/ +char fc_mes0602[] = "%sIP Response Ring %d out of posted buffers Data: x%x x%x"; +msgLogDef fc_msgBlk0602 = { + FC_LOG_MSG_IP_0602, + fc_mes0602, + fc_msgPreambleIPw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_IP, + ERRID_LOG_NO_RESOURCE }; + +/* +msgName: fc_mes0603 +message: Rcv Ring out of posted buffers +descript: The ring returned all posted buffers to the driver + and is waiting for the driver to post new buffers. This + could mean the host system is out of ELS or CT buffers. +data: (1) fc_missbufcnt (2) NoRcvBuf +severity: Error +log: Always +module: fcscsib.c +action: Try allocating more buffers by increasing the num-buf lpfc + configuration parameter. Reboot the system. +*/ +char fc_mes0603[] = "%sRcv Ring %d out of posted buffers Data: x%x x%x"; +msgLogDef fc_msgBlk0603 = { + FC_LOG_MSG_IP_0603, + fc_mes0603, + fc_msgPreambleIPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_IP, + ERRID_LOG_NO_RESOURCE }; + +/* +msgName: fc_mes0604 +message: Post buffer for IP ring failed +descript: The driver cannot allocate a buffer to post to the IP ring. + This usually means the host system is out of TCP/IP buffers. +data: (1) missbufcnt +severity: Error +log: Always +module: fcscsib.c +action: Try allocating more IP buffers (STREAMS buffers or mbufs) + of size 4096. Reboot the system. +*/ +char fc_mes0604[] = "%sPost buffer for IP ring %d failed Data: x%x"; +msgLogDef fc_msgBlk0604 = { + FC_LOG_MSG_IP_0604, + fc_mes0604, + fc_msgPreambleIPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_IP, + ERRID_LOG_NO_RESOURCE }; + +/* +msgName: fc_mes0605 +message: No room on IP xmit queue +descript: The system is generating IOCB commands to be processed + faster than the adapter can process them. +data: (1) xmitnoroom +severity: Warning +log: LOG_IP verbose +module: fcxmitb.c +action: Check the state of the link. If the link is up and running, + reconfigure the xmit queue size to be larger. Note, a larger + queue size may require more system IP buffers. If the link + is down, check physical connections to Fibre Channel network. +*/ +char fc_mes0605[] = "%sNo room on IP xmit queue Data: x%x"; +msgLogDef fc_msgBlk0605 = { + FC_LOG_MSG_IP_0605, + fc_mes0605, + fc_msgPreambleIPw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_IP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0606 +message: Stray XmitSequence completion +descript: Received an XMIT_SEQUENCE IOCB completion without issuing + a corresponding XMIT_SEQUENCE Command (based on the IOTAG + field in the XMIT_SEQUENCE_CR iocb). +data: (1) ulpCommand (2) ulpIoTag +severity: Error +log: Always +module: fcxmitb.c +action: This error could indicate a software driver or firmware + problem. If problems persist report these errors to + Technical Support. +*/ +char fc_mes0606[] = "%sStray XmitSequence completion Data: x%x x%x"; +msgLogDef fc_msgBlk0606 = { + FC_LOG_MSG_IP_0606, + fc_mes0606, + fc_msgPreambleIPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_IP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0607 +message: Xmit Sequence completion error +descript: A XMIT_SEQUENCE command completed with a status error + in the IOCB. +data: (1) ulpStatus (2) ulpToTag (3) ulpWord[4] (4) did +severity: Warning +log: LOG_IP verbose +module: fcxmitb.c +action: If there are many errors to one device, check physical + connections to Fibre Channel network and the state of + the remote PortID. The driver attempts to recover by + creating a new exchange to the remote device. +*/ +char fc_mes0607[] = "%sXmit Sequence completion error Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0607 = { + FC_LOG_MSG_IP_0607, + fc_mes0607, + fc_msgPreambleIPw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_IP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0608 +message: Stray CreateXRI completion +descript: Received a CREATE_XRI command completion without + issuing a corresponding CREATE_XRI Command (based + on the IOTAG field in the CREATE_XRI_CR iocb). +data: (1) ulpCommad (2) ulpToTag +severity: Error +log: Always +module: fcxmitb.c +action: This error could indicate a software driver or + firmware problem. If problems persist report these + errors to Technical Support. +*/ +char fc_mes0608[] = "%sStray CreateXRI completion Data: x%x x%x"; +msgLogDef fc_msgBlk0608 = { + FC_LOG_MSG_IP_0608, + fc_mes0608, + fc_msgPreambleIPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_IP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* + * Begin FCP LOG Message Structures + */ + +/* +msgName: fc_mes0700 +message: Start nodev timer +descript: A target disappeared from the Fibre Channel network. If the + target does not return within nodev-tmo timeout all I/O to + the target will fail. +data: (1) nlp (2) nlp_flag (3) nlp_state (4) nlp_DID +severity: Information +log: LOG_FCP verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0700[] = "%sSTART nodev timer Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0700 = { + FC_LOG_MSG_FP_0700, + fc_mes0700, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0701 +message: Issue Abort Task Set I/O for LUN +descript: The SCSI layer detected that it needs to abort all I/O + to a specific device. This results in an FCP Task + Management command to abort the I/O in progress. +data: (1) did (2) sid (3) flags +severity: Information +log: LOG_FCP verbose +module: fcstratb.c +action: Check state of device in question. +*/ +char fc_mes0701[] = "%sIssue Abort Task Set I/O for LUN %d Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0701 = { + FC_LOG_MSG_FP_0701, + fc_mes0701, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0702 +message: Issue Target Reset I/O +descript: The SCSI layer detected that it needs to abort all I/O + to a specific target. This results in an FCP Task + Management command to abort the I/O in progress. +data: (1) lun (2) did (3) sid (4) flags +severity: Information +log: LOG_FCP verbose +module: fcstratb.c +action: Check state of target in question. +*/ +char fc_mes0702[] = "%sIssue Target Reset I/O Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0702 = { + FC_LOG_MSG_FP_0702, + fc_mes0702, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0703 +message: Issue LUN Reset I/O for LUN +descript: The SCSI layer detected that it needs to abort all I/O + to a specific device. This results in an FCP Task + Management command to abort the I/O in progress. +data: (1) did (2) sid (3) flags +severity: Information +log: LOG_FCP verbose +module: fcstratb.c +action: Check state of device in question. +*/ +char fc_mes0703[] = "%sIssue LUN Reset I/O for LUN %d Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0703 = { + FC_LOG_MSG_FP_0703, + fc_mes0703, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0704 +message: STOP nodev timer +descript: The FCP target was rediscovered and I/O can be resumed. +data: (1) ndlp (2) nlp_flag (3) nlp_state (4) nlp_DID +severity: Information +log: LOG_FCP verbose +module: fcstratb.c +action: None required +*/ +char fc_mes0704[] = "%sSTOP nodev timer Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0704 = { + FC_LOG_MSG_FP_0704, + fc_mes0704, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0705 +message: STOP nodev timer +descript: The FCP target was rediscovered and I/O can be resumed. +data: (1) ndlp (2) nlp_flag (3) nlp_state (4) nlp_DID +severity: Information +log: LOG_FCP verbose +module: fcstratb.c +action: None required +*/ +char fc_mes0705[] = "%sSTOP nodev timer Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0705 = { + FC_LOG_MSG_FP_0705, + fc_mes0705, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0706 +message: Cannot issue FCP command +descript: A valid ELS login with the FCP target no longer exists. +data: (1) did (2) sid +severity: Warning +log: LOG_FCP verbose +module: fcstratb.c +action: Check the state of the target in question. +*/ +char fc_mes0706[] = "%sCannot issue FCP command Data: x%x x%x"; +msgLogDef fc_msgBlk0706 = { + FC_LOG_MSG_FP_0706, + fc_mes0706, + fc_msgPreambleFPw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0707 +message: Bad SCSI CDB length for LUN DID +descript: This error indicates a SCSI command sent to the + FC driver from the SCSI layer has an invalid length. +data: (1) cmd_cdblen (2) fcpCdb +severity: Error +log: Always +module: fcstratb.c +action: This error could indicate a host operating system SCSI + layer problem. If problems persist report these errors + to Technical Support. +*/ +char fc_mes0707[] = "%sBad SCSI CDB length for LUN %d DID x%x Data: x%x x%x"; +msgLogDef fc_msgBlk0707 = { + FC_LOG_MSG_FP_0707, + fc_mes0707, + fc_msgPreambleFPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0708 +message: NULL sp in flush_done +descript: This error indicates a potential FC driver problem + related to a FCP command iodone +data: (1) cmnd[0] (2) serial_number (3) retries (4) result +severity: Error +log: Always +module: fcLINUXfcp.c +action: This error could indicate a driver problem. If problems + persist report these errors to Technical Support. +*/ +char fc_mes0708[] = "%sNULL sp in flush_done Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0708 = { + FC_LOG_MSG_FP_0708, + fc_mes0708, + fc_msgPreambleFPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0709 +message: NULL sp in DPC flush_done +descript: This error indicates a potential FC driver problem + related to a FCP command iodone +data: (1) cmnd[0] (2) serial_number (3) retries (4) result +severity: Error +log: Always +module: fcLINUXfcp.c +action: This error could indicate a driver problem. If problems + persist report these errors to Technical Support. +*/ +char fc_mes0709[] = "%sNULL sp in DPC flush_done Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0709 = { + FC_LOG_MSG_FP_0709, + fc_mes0709, + fc_msgPreambleFPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0710 +message: iodone error return +descript: This error indicates the FC driver is returning SCSI + command to the SCSI layer in error or with sense data. +data: (1) target (2) retries (3) result (4) *iptr +severity: Information +log: LOG_FCP verbose +module: fcLINUXfcp.c +action: None required +*/ +char fc_mes0710[] = "%siodone error return Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0710 = { + FC_LOG_MSG_FP_0710, + fc_mes0710, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0711 +message: iodone error return +descript: This error indicates the FC driver is returning SCSI + command to the SCSI layer in error or with sense data. +data: (1) target (2) retries (3) result (4) *iptr +severity: Information +log: LOG_FCP verbose +module: fcLINUXfcp.c +action: None required +*/ +char fc_mes0711[] = "%siodone error return Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0711 = { + FC_LOG_MSG_FP_0711, + fc_mes0711, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0712 +message: SCSI layer issued abort device +descript: The SCSI layer is requesting the driver to abort + I/O to a specific device. +data: (1) target (2) lun (3) cmnd[0] (4) serial_number +severity: Error +log: Always +module: fcLINUXfcp.c +action: Check state of device in question. +*/ +char fc_mes0712[] = "%sSCSI layer issued abort device Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0712 = { + FC_LOG_MSG_FP_0712, + fc_mes0712, + fc_msgPreambleFPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0713 +message: SCSI layer issued target reset +descript: The SCSI layer is requesting the driver to abort + I/O to a specific target. +data: (1) target (2) lun (3) dev_index +severity: Error +log: Always +module: fcLINUXfcp.c +action: Check state of target in question. +*/ +char fc_mes0713[] = "%sSCSI layer issued target reset Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0713 = { + FC_LOG_MSG_FP_0713, + fc_mes0713, + fc_msgPreambleFPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0714 +message: SCSI layer issued Bus Reset +descript: The SCSI layer is requesting the driver to abort + all I/Os to all targets on this HBA. +data: (1) target (2) lun +severity: Error +log: Always +module: fcLINUXfcp.c +action: Check state of targets in question. +*/ +char fc_mes0714[] = "%sSCSI layer issued Bus Reset Data: x%x x%x"; +msgLogDef fc_msgBlk0714 = { + FC_LOG_MSG_FP_0714, + fc_mes0714, + fc_msgPreambleFPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0715 +message: SCSI layer issued Host Reset +descript: The SCSI layer is requesting the driver to reset the link + on this HBA. +data: (1) target (2) lun +severity: Error +log: Always +module: fcLINUXfcp.c +action: Check state of HBA link. +*/ +char fc_mes0715[] = "%sSCSI layer issued Host Reset Data: x%x x%x"; +msgLogDef fc_msgBlk0715 = { + FC_LOG_MSG_FP_0715, + fc_mes0715, + fc_msgPreambleFPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0716 +message: FCP residual underrun, expected , residual +descript: FCP device provided less data than was requested. +data: (1) cmnd[0] (2) underflow +severity: Information +log: LOG_FCP verbose +module: fcLINUXfcp.c +action: None required +*/ +char fc_mes0716[] = "%sFCP residual underrun, expected %d, residual %d Data: x%x x%x"; +msgLogDef fc_msgBlk0716 = { + FC_LOG_MSG_FP_0716, + fc_mes0716, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0717 +message: FCP command residual underrun converted to error +descript: The driver converts this underrun condition to an error based + on the underflow field in the SCSI cmnd. +data: (1) underflow (2) len (3) resid +severity: Information +log: LOG_FCP verbose +module: fcLINUXfcp.c +action: None required +*/ +char fc_mes0717[] = "%sFCP cmd x%x resid urun convrt'd to err Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0717 = { + FC_LOG_MSG_FP_0717, + fc_mes0717, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0718 +message: LUN address out of range +descript: Invalid LUN number in the SCSI command passed to the driver. +data: (1) target (2) lun +severity: Error +log: Always +module: fcLINUXfcp.c +action: This error could indicate a host operating system SCSI + layer problem. If problems persist report these errors + to Technical Support. +*/ +char fc_mes0718[] = "%sLUN address out of range Data: x%x x%x"; +msgLogDef fc_msgBlk0718 = { + FC_LOG_MSG_FP_0718, + fc_mes0718, + fc_msgPreambleFPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0719 +message: Waiting for REPORT LUN cmpl before issuing INQUIRY SN +descript: Waiting for REPORT LUN completion before issuing INQUIRY SN +data: (1) scsi_id (2) lun_id (3) flags +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0719[] = "%sWaiting for REPORT LUN cmpl before issuing INQUIRY SN Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0719 = { + FC_LOG_MSG_FP_0719, + fc_mes0719, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0720 +message: Stray FCP completion +descript: Received an FCP command completion without issuing a + corresponding FCP Command (based on the IOTAG field + in the FCP IOCB). +data: (1) ulpCommand (2) ulpIoTag (3) ulpStatus (4) ulpWord[4] +severity: Error +log: Always +module: fcscsib.c +action: This error could indicate a software driver or firmware + problem. If problems persist report these errors to + Technical Support. +*/ +char fc_mes0720[] = "%sStray FCP completion Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0720 = { + FC_LOG_MSG_FP_0720, + fc_mes0720, + fc_msgPreambleFPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0721 +message: INQUIRY SN cmpl +descript: An INQUIRY Serial Number (page x83) completed. This information + is saved by the driver. +data: (1) scsi_id (2) lun_id (3) statLocalError (4) cmd + WD7 +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0721[] = "%sINQUIRY SN cmpl Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0721 = { + FC_LOG_MSG_FP_0721, + fc_mes0721, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0722 +message: INQUIRY SN info +descript: This is the serial number of the device that will be saved. +data: (1) *datap (2) *datap + 3 (3) datap + 7 (4) rspResId +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0722[] = "%sINQUIRY SN info Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0722 = { + FC_LOG_MSG_FP_0722, + fc_mes0722, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0723 +message: Issue INQUIRY SN +descript: Issuing an INQUIRY Serial Number (page x83) FCP command. +data: (1) scsi_id (2) lun_id +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0723[] = "%sIssue INQUIRY SN Data: x%x x%x"; +msgLogDef fc_msgBlk0723 = { + FC_LOG_MSG_FP_0723, + fc_mes0723, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0724 +message: Issue INQUIRY Page 0 +descript: Issuing an INQUIRY (page x0) FCP command. +data: (1) scsi_id (2) lun_id +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0724[] = "%sIssue INQUIRY Page 0 Data: x%x x%x"; +msgLogDef fc_msgBlk0724 = { + FC_LOG_MSG_FP_0724, + fc_mes0724, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0725 +message: Inquiry Serial Number: invalid length +descript: An INQUIRY SN command completed with an invalid serial number length. +data: (1) sizeSN (2) j (3) scsi_id (4) lun_id +severity: Error +log: Always +module: fcscsib.c +action: Check remote NPORT for potential problem. +*/ +char fc_mes0725[] = "%sINQ Serial Number: invalid length Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0725= { + FC_LOG_MSG_FP_0725, + fc_mes0725, + fc_msgPreambleFPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_FCP, + ERRID_LOG_HDW_ERR }; + +/* +msgName: fc_mes0726 +message: INQUIRY SN cmd failed +descript: The INQUIRY Serial Number (page x83) failed. +data: (1) ulpStatus (2) fcpi_parm (3) m_target (4) m_lun +severity: Error +log: Always +module: fcscsib.c +action: Check if target device supports this command +*/ +char fc_mes0726[] = "%sINQUIRY SN cmd failed Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0726= { + FC_LOG_MSG_FP_0726, + fc_mes0726, + fc_msgPreambleFPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_FCP, + ERRID_LOG_HDW_ERR }; + +/* +msgName: fc_mes0727 +message: INQUIRY Page 0 cmpl +descript: An INQUIRY (page 0) completed. This information is saved by + the driver. +data: (1) scsi_id (2) lun_id (3) statLocalError (4) cmd + WD7 +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0727[] = "%sINQUIRY Page 0 cmpl Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0727 = { + FC_LOG_MSG_FP_0727, + fc_mes0727, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0728 +message: INQUIRY Page 0 cmd failed +descript: The INQUIRY (page 0) failed. +data: (1) ulpStatus (2) fcpi_parm (3) scsi_id (4) lun_id +severity: Error +log: Always +module: fcscsib.c +action: Check if target device supports this command +*/ +char fc_mes0728[] = "%sINQUIRY Page 0 cmd failed Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0728= { + FC_LOG_MSG_FP_0728, + fc_mes0728, + fc_msgPreambleFPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_FCP, + ERRID_LOG_HDW_ERR }; + +/* +msgName: fc_mes0729 +message: FCP cmd failed on device (, ) DID +descript: The specifed device failed an FCP command. +data: (1) rspInfo3 (2) statLocalError (3) *cmd + WD6 (4) *cmd + WD7 +severity: Warning +log: LOG_FCP verbose +module: fcscsib.c +action: Check the state of the target in question. +*/ +char fc_mes0729[] = "%sFCP cmd x%x failed on device (%d, %d), DID x%x Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0729= { + FC_LOG_MSG_FP_0729, + fc_mes0729, + fc_msgPreambleFPw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0730 +message: FCP command failed: RSP +descript: The FCP command failed with a response error. +data: (1) lp[2] (2) lp[3] (3) lp[4] (4) lp[5] +severity: Warning +log: LOG_FCP verbose +module: fcscsib.c +action: Check the state of the target in question. +*/ +char fc_mes0730[] = "%sFCP command failed: RSP Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0730= { + FC_LOG_MSG_FP_0730, + fc_mes0730, + fc_msgPreambleFPw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0731 +message: FCP command failed: SNS +descript: The FCP command failed with sense information. +data: (1) lp[0] (2) lp[1] (3) lp[2] (4) lp[3] + (5) lp[4] (6) lp[5] (7) lp6[6] (8) lp[7] +severity: Warning +log: LOG_FCP verbose +module: fcscsib.c +action: Check the state of the target in question. +*/ +char fc_mes0731[] = "%sFCP command failed: SNS Data: x%x x%x x%x x%x x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0731= { + FC_LOG_MSG_FP_0731, + fc_mes0731, + fc_msgPreambleFPw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0732 +message: Retry FCP command due to 29,00 check condition +descript: The issued FCP command got a 29,00 check condition and will + be retried by the driver. +data: (1) *lp (2) *lp+1 (3) *lp+2 (4) *lp+3 +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0732[] = "%sRetry FCP command due to 29,00 check condition Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0732 = { + FC_LOG_MSG_FP_0732, + fc_mes0732, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0733 +message: FCP Read Underrun +descript: The issued FCP command returned a Read Underrun +data: (1) *cmd + WD7 (2) ulpContext (3) rspResId (4) fcpi_parm +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0733[] = "%sFCP Read Underrun Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0733 = { + FC_LOG_MSG_FP_0733, + fc_mes0733, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0734 +message: FCP Read Check Error +descript: The issued FCP command returned a Read Check Error +data: (1) *cmd + WD7 (2) ulpContext (3) rspResId (4) fcpi_parm +severity: Error +log: Always +module: fcscsib.c +action: Check the state of the target in question. +*/ +char fc_mes0734[] = "%sFCP Read Check Error Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0734= { + FC_LOG_MSG_FP_0734, + fc_mes0734, + fc_msgPreambleFPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_FCP, + ERRID_LOG_HDW_ERR }; + +/* +msgName: fc_mes0735 +message: FCP Read Check Error with Check Condition +descript: The issued FCP command returned a Read Check Error and a + Check condition. +data: (1) *cmd + WD7 (2) ulpContext (3) rspResId (4) fcpi_parm +severity: Error +log: Always +module: fcscsib.c +action: Check the state of the target in question. +*/ +char fc_mes0735[] = "%sFCP Read Check Error with Check Condition Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0735= { + FC_LOG_MSG_FP_0735, + fc_mes0735, + fc_msgPreambleFPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_FCP | LOG_CHK_COND, + ERRID_LOG_HDW_ERR }; + +/* +msgName: fc_mes0736 +message: FCP QUEUE Full +descript: Received a Queue Full status from the FCP device. +data: (1) fcp_cur_queue_depth (2) active_io_count (3) flags (4) a_current +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0736[] = "%sFCP QUEUE Full Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0736 = { + FC_LOG_MSG_FP_0736, + fc_mes0736, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0737 +message: FCP error: Check condition +descript: The issued FCP command resulted in a Check Condition. +data: (1) *cmd + WD7 (2) ulpIoTag (3) ulpContext (4) statLocalError +severity: Information +log: LOG_FCP | LOG_CHK_COND verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0737[] = "%sFCP error: Check condition Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0737 = { + FC_LOG_MSG_FP_0737, + fc_mes0737, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP | LOG_CHK_COND, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0738 +message: 29,00 Check condition received +descript: The received check condition indicates the device was powered + on or reset. +data: (1) lp[0] (2) lp[1] (3) lp[2] (4) lp[3] +severity: Information +log: LOG_FCP | LOG_CHK_COND verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0738[] = "%s29,00 Check condition received Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0738 = { + FC_LOG_MSG_FP_0738, + fc_mes0738, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP | LOG_CHK_COND, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0739 +message: Check condition received ERR1 +descript: The command SCSI3_PERSISTENT_RESERVE_IN resulted in a Invalid + Command operation code check condition. +data: (1) lp[0] (2) lp[1] (3) lp[2] (4) lp[3] +severity: Information +log: LOG_FCP | LOG_CHK_COND verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0739[] = "%sCheck condition received ERR1 Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0739 = { + FC_LOG_MSG_FP_0739, + fc_mes0739, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP | LOG_CHK_COND, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0740 +message: Check condition received ERR2 +descript: The check condition meets the criteria for the configuration + parameters lpfc_check_cond_err and lpfc_delay_rsp_err. +data: (1) lp[0] (2) lp[1] (3) lp[2] (4) lp[3] +severity: Information +log: LOG_FCP | LOG_CHK_COND verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0740[] = "%sCheck condition received ERR2 Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0740 = { + FC_LOG_MSG_FP_0740, + fc_mes0740, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP | LOG_CHK_COND, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0741 +message: Check condition received +descript: The issued FCP command resulted in a Check Condition. +data: (1) lp[0] (2) lp[1] (3) lp[2] (4) lp[3] +severity: Information +log: LOG_FCP | LOG_CHK_COND verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0741[] = "%sCheck condition received Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0741 = { + FC_LOG_MSG_FP_0741, + fc_mes0741, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP | LOG_CHK_COND, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0742 +message: FCP completion error +descript: An FCP command completed with a status error in the IOCB. +data: (1) ulpStatus (2) ulpWord[4] (3) did. +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: If there are many errors to one device, check physical + connections to Fibre Channel network and the state of the + remote PortID. +*/ +char fc_mes0742[] = "%sFCP completion error Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0742 = { + FC_LOG_MSG_FP_0742, + fc_mes0742, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0743 +message: FCP completion error +descript: An FCP command completed with a status error in the IOCB. +data: (1) ulpStatus (2) ulpWord[4] (3) did. +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: If there are many errors to one device, check physical + connections to Fibre Channel network and the state of the + remote PortID. +*/ +char fc_mes0743[] = "%sFCP completion error Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0743 = { + FC_LOG_MSG_FP_0743, + fc_mes0743, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_HDW_ERR }; + +/* +msgName: fc_mes0744 +message: FCP completion error +descript: An FCP command completed with a status error in the IOCB. +data: (1) did (2) *lp (3) *(lp+2) (4) *(lp+3) +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: If there are many errors to one device, check physical + connections to Fibre Channel network and the state of the + remote PortID. +*/ +char fc_mes0744[] = "%sFCP completion error Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0744 = { + FC_LOG_MSG_FP_0744, + fc_mes0744, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0745 +message: FCP completion error +descript: An FCP command completed with a status error in the IOCB. +data: (1) ulpStatus (2) ulpWord[4] (3) did. +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: If there are many errors to one device, check physical + connections to Fibre Channel network and the state of the + remote PortID. +*/ +char fc_mes0745[] = "%sFCP completion error Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0745 = { + FC_LOG_MSG_FP_0745, + fc_mes0745, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_HDW_ERR }; + +/* +msgName: fc_mes0746 +message: FCP completion error +descript: An FCP command completed with a status error in the IOCB. +data: (1) ulpStatus (2) ulpWord[4] (3) did. +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: If there are many errors to one device, check physical + connections to Fibre Channel network and the state of the + remote PortID. +*/ +char fc_mes0746[] = "%sFCP completion error Data: x%x x%x x%x"; +msgLogDef fc_msgBlk0746 = { + FC_LOG_MSG_FP_0746, + fc_mes0746, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0747 +message: Cmpl Target Reset +descript: A driver initiated Target Reset completed. +data: (1) scsi_id (2) lun_id (3) statLocalError (4) *cmd + WD7 +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0747[] = "%sCmpl Target Reset Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0747 = { + FC_LOG_MSG_FP_0747, + fc_mes0747, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0748 +message: Cmpl LUN Reset +descript: A driver initiated LUN Reset completed. +data: (1) scsi_id (2) lun_id (3) statLocalError (4) *cmd + WD7 +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0748[] = "%sCmpl LUN Reset Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0748 = { + FC_LOG_MSG_FP_0748, + fc_mes0748, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0749 +message: Cmpl Abort Task Set +descript: A driver initiated Abort Task Set completed. +data: (1) scsi_id (2) lun_id (3) statLocalError (4) *cmd + WD7 +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: None required +*/ +char fc_mes0749[] = "%sCmpl Abort Task Set Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0749 = { + FC_LOG_MSG_FP_0749, + fc_mes0749, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0750 +message: EXPIRED linkdown timer +descript: The link was down for greater than the configuration parameter + (lpfc_linkdown_tmo) seconds. All I/O associated with the devices + on this link will be failed. +data: (1) fc_ffstate +severity: Information +log: LOG_FCP | LOG_LINK_EVENT verbose +module: fcscsib.c +action: Check HBA cable/connection to Fibre Channel network. +*/ +char fc_mes0750[] = "%sEXPIRED linkdown timer Data: x%x"; +msgLogDef fc_msgBlk0750 = { + FC_LOG_MSG_FP_0750, + fc_mes0750, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP | LOG_LINK_EVENT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0751 +message: EXPIRED nodev timer +descript: A device disappeared for greater than the configuration parameter + (lpfc_nodev_tmo) seconds. All I/O associated with this device + will be failed. +data: (1) ndlp (2) nlp_flag (3) nlp_state (4) nlp_DID +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: Check physical connections to Fibre Channel network and the + state of the remote PortID. +*/ +char fc_mes0751[] = "%sEXPIRED nodev timer Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0751 = { + FC_LOG_MSG_FP_0751, + fc_mes0751, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0752 +message: Device disappeared, nodev timeout +descript: A device disappeared for greater than the configuration + parameter (lpfc_nodev_tmo) seconds. All I/O associated with + this device will be failed. +data: (1) did (2) sid (3) pan (4) a_current +severity: Information +log: LOG_FCP verbose +module: fcscsib.c +action: Check physical connections to Fibre Channel network and the + state of the remote PortID. +*/ +char fc_mes0752[] = "%sDevice disappeared, nodev timeout Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0752 = { + FC_LOG_MSG_FP_0752, + fc_mes0752, + fc_msgPreambleFPi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0753 +message: Inquiry Serial Number: invalid length +descript: An INQUIRY SN command completed with an invalid serial number length. +data: (1) sizeSN (2) j (3) scsi_id (4) lun_id +severity: Error +log: Always +module: fcscsib.c +action: Check state of target in question. +*/ +char fc_mes0753[] = "%sInquiry Serial Number: invalid length Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0753= { + FC_LOG_MSG_FP_0753, + fc_mes0753, + fc_msgPreambleFPe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_FCP, + ERRID_LOG_HDW_ERR }; + +/* +msgName: fc_mes0754 +message: SCSI timeout +descript: An FCP IOCB command was posted to a ring and did not complete + within ULP timeout seconds. +data: (1) did (2) sid +severity: Warning +log: LOG_FCP verbose +module: fcscsib.c +action: If no I/O is going through the adapter, reboot the system; + otherwise check the state of the target in question. +*/ +char fc_mes0754[] = "%sSCSI timeout Data: x%x x%x"; +msgLogDef fc_msgBlk0754 = { + FC_LOG_MSG_FP_0754, + fc_mes0754, + fc_msgPreambleFPw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_FCP, + ERRID_LOG_TIMEOUT }; + +/* +msgName: fc_mes0756 +message: Local_timeout Skipping clock tick +descript: The DPC thread has not been scheduled within several seconds +data: (1) dpc_ha_copy (2) ha_copy (3) dpc_cnt (4) fc_ffstate +severity: Warning +log: LOG_FCP verbose +module: fcLINUXfcp.c +action: Check the state of the target in question. +*/ +char fc_mes0756[] = "%sLocal_timeout Skipping clock tick Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0756= { + FC_LOG_MSG_FP_0756, + fc_mes0756, + fc_msgPreambleFPw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_FCP, + ERRID_LOG_UNEXPECT_EVENT }; + +/* + * UNUSED 0800 + */ + +/* + * Begin NODE LOG Message Structures + */ + +/* +msgName: fc_mes0900 +message: FIND node rpi +descript: The driver is looking up the node table entry for a remote + NPORT based on its RPI. +data: (1) ndlp (2) rpi +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None requird +*/ +char fc_mes0900[] = "%sFIND node rpi Data: x%x x%x"; +msgLogDef fc_msgBlk0900 = { + FC_LOG_MSG_ND_0900, + fc_mes0900, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0901 +message: Free node tbl +descript: The driver is freeing a node table entry. +data: (1) nlp_DID (2) nlp_flag (3) nlp_Rpi (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0901[] = "%sFree node tbl Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0901 = { + FC_LOG_MSG_ND_0901, + fc_mes0901, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0902 +message: Free node IEEE +descript: The driver freeing a node table entry. +data: (1) IEEE[2] (2) IEEE[3] (3) IEEE[4] (4) IEEE[5] +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0902[] = "%sFree node IEEE Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0902 = { + FC_LOG_MSG_ND_0902, + fc_mes0902, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0903 +message: BIND node tbl +descript: The driver is putting the node table entry on the binding list. +data: (1) nlp (2) nlp_DID (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0903[] = "%sBIND node tbl Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0903= { + FC_LOG_MSG_ND_0903, + fc_mes0903, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0904 +message: UNMAP node tbl +descript: The driver is putting the node table entry on the unmapped node list. +data: (1) nlp (2) nlp_DID (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0904[] = "%sUNMAP node tbl Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0904 = { + FC_LOG_MSG_ND_0904, + fc_mes0904, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0905 +message: MAP node tbl +descript: The driver is putting the node table entry on the mapped node list. +data: (1) nlp (2) nlp_DID (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0905[] = "%sMAP node tbl Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0905 = { + FC_LOG_MSG_ND_0905, + fc_mes0905, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0906 +message: FIND node DID unmapped +descript: The driver is searching for a node table entry, on the + unmapped node list, based on DID. +data: (1) nlp (2) nlp_DID (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0906[] = "%sFIND node DID unmapped Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0906 = { + FC_LOG_MSG_ND_0906, + fc_mes0906, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0907 +message: FIND node DID mapped +descript: The driver is searching for a node table entry, on the + mapped node list, based on DID. +data: (1) nlp (2) nlp_DID (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0907[] = "%sFIND node DID mapped Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0907 = { + FC_LOG_MSG_ND_0907, + fc_mes0907, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0908 +message: FIND node DID bind +descript: The driver is searching for a node table entry, on the + binding list, based on DID. +data: (1) nlp (2) nlp_DID (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0908[] = "%sFIND node DID bind Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0908 = { + FC_LOG_MSG_ND_0908, + fc_mes0908, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0909 +message: FIND node did NOT FOUND +descript: The driver was searching for a node table entry based on DID + and the entry was not found. +data: (1) order +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0909[] = "%sFIND node did x%x NOT FOUND Data: x%x"; +msgLogDef fc_msgBlk0909 = { + FC_LOG_MSG_ND_0909, + fc_mes0909, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0910 +message: FIND node scsi_id unmapped +descript: The driver is searching for a node table entry, on the + unmapped node list, based on the SCSI ID. +data: (1) nlp (2) nlp_DID (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0910[] = "%sFIND node scsi_id unmapped Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0910 = { + FC_LOG_MSG_ND_0910, + fc_mes0910, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0911 +message: FIND node scsi_id mapped +descript: The driver is searching for a node table entry, on the + mapped node list, based on the SCSI ID. +data: (1) nlp (2) nlp_DID (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0911[] = "%sFIND node scsi_id mapped Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0911 = { + FC_LOG_MSG_ND_0911, + fc_mes0911, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0912 +message: FIND node scsi_id bind +descript: The driver is searching for a node table entry, on the + binding list, based on the SCSI ID. +data: (1) nlp (2) nlp_DID (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0912[] = "%sFIND node scsi_id bind Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0912 = { + FC_LOG_MSG_ND_0912, + fc_mes0912, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0913 +message: FIND node scsi_id NOT FOUND +descript: The driver was searching for a node table entry based on SCSI ID + and the entry was not found. +data: (1) scsid (2) order +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0913[] = "%sFIND node scsi_id NOT FOUND Data: x%x x%x"; +msgLogDef fc_msgBlk0913 = { + FC_LOG_MSG_ND_0913, + fc_mes0913, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0914 +message: FIND node wwnn unmapped +descript: The driver is searching for a node table entry, on the + unmapped port list, based on the WWNN. +data: (1) nlp (2) nlp_DID (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0914[] = "%sFIND node wwnn unmapped Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0914 = { + FC_LOG_MSG_ND_0914, + fc_mes0914, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0915 +message: FIND node wwnn mapped +descript: The driver is searching for a node table entry, on the + mapped port list, based on the WWNN. +data: (1) nlp (2) nlp_DID (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0915[] = "%sFIND node wwnn mapped Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0915 = { + FC_LOG_MSG_ND_0915, + fc_mes0915, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0916 +message: FIND node wwnn bind +descript: The driver is searching for a node table entry, on the + binding list, based on the WWNN. +data: (1) nlp (2) nlp_DID (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0916[] = "%sFIND node wwnn bind Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0916 = { + FC_LOG_MSG_ND_0916, + fc_mes0916, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0917 +message: PUT END nodelist +descript: The driver is freeing a node table entry buffer. +data: (1) bp (2) fc_free +severity: Information +log: LOG_NODE verbose +module: fcmemb.c +action: None required +*/ +char fc_mes0917[] = "%sPUT END nodelist Data: x%x x%x"; +msgLogDef fc_msgBlk0917 = { + FC_LOG_MSG_ND_0917, + fc_mes0917, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0918 +message: FIND node wwnn NOT FOUND +descript: The driver was searching for a node table entry based on WWNN + and the entry was not found. +data: (1) order +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0918[] = "%sFIND node wwnn NOT FOUND Data: x%x"; +msgLogDef fc_msgBlk0918 = { + FC_LOG_MSG_ND_0918, + fc_mes0918, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0919 +message: FIND node wwpn unmapped +descript: The driver is searching for a node table entry, on the + unmapped port list, based on the WWPN. +data: (1) nlp (2) nlp_DID (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0919[] = "%sFIND node wwpn unmapped Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0919 = { + FC_LOG_MSG_ND_0919, + fc_mes0919, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0920 +message: FIND node wwpn mapped +descript: The driver is searching for a node table entry, on the + mapped port list, based on the WWPN. +data: (1) nlp (2) nlp_DID (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0920[] = "%sFIND node wwpn mapped Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0920 = { + FC_LOG_MSG_ND_0920, + fc_mes0920, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0921 +message: FIND node wwpn bind +descript: The driver is searching for a node table entry, on the + binding list, based on the WWPN. +data: (1) nlp (2) nlp_DID (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0921[] = "%sFIND node wwpn bind Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0921 = { + FC_LOG_MSG_ND_0921, + fc_mes0921, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0922 +message: FIND node wwpn NOT FOUND +descript: The driver was searching for a node table entry based on WWPN + and the entry was not found. +data: (1) order +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0922[] = "%sFIND node wwpn NOT FOUND Data: x%x"; +msgLogDef fc_msgBlk0922 = { + FC_LOG_MSG_ND_0922, + fc_mes0922, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0923 +message: FIND node xri unmapped +descript: The driver is searching for a node table entry, on the + unmapped port list, based on the XRI. +data: (1) nlp (2) nlp_Xri (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0923[] = "%sFIND node xri unmapped Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0923 = { + FC_LOG_MSG_ND_0923, + fc_mes0923, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0924 +message: FIND node xri mapped +descript: The driver is searching for a node table entry, on the + mapped port list, based on the XRI. +data: (1) nlp (2) nlp_Xri (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0924[] = "%sFIND node xri mapped Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0924 = { + FC_LOG_MSG_ND_0924, + fc_mes0924, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0925 +message: FIND node xri bind +descript: The driver is searching for a node table entry, on the + binding list, based on the XRI. +data: (1) nlp (2) nlp_Xri (3) nlp_flag (4) data1 +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0925[] = "%sFIND node xri bind Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk0925 = { + FC_LOG_MSG_ND_0925, + fc_mes0925, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0926 +message: FIND node xri NOT FOUND +descript: The driver was searching for a node table entry based on the + XRI and the entry was not found. +data: (1) xri (2) order +severity: Information +log: LOG_NODE verbose +module: fcrpib.c +action: None required +*/ +char fc_mes0926[] = "%sFIND node xri NOT FOUND Data: x%x x%x"; +msgLogDef fc_msgBlk0926 = { + FC_LOG_MSG_ND_0926, + fc_mes0926, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0927 +message: GET nodelist +descript: The driver is allocating a buffer to hold a node table entry. +data: (1) bp (2) fc_free +severity: Information +log: LOG_NODE verbose +module: fcmemb.c +action: None required +*/ +char fc_mes0927[] = "%sGET nodelist Data: x%x x%x"; +msgLogDef fc_msgBlk0927 = { + FC_LOG_MSG_ND_0927, + fc_mes0927, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes0928 +message: PUT nodelist +descript: The driver is freeing a node table entry buffer. +data: (1) bp (2) fc_free +severity: Information +log: LOG_NODE verbose +module: fcmemb.c +action: None required +*/ +char fc_mes0928[] = "%sPUT nodelist Data: x%x x%x"; +msgLogDef fc_msgBlk0928 = { + FC_LOG_MSG_ND_0928, + fc_mes0928, + fc_msgPreambleNDi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_NODE, + ERRID_LOG_UNEXPECT_EVENT }; + + + +/* + * Begin MISC LOG message structures + */ + +/* +msgName: fc_mes1200 +message: Cannot unload driver while lpfcdiag Interface is active Data +descript: An attempt was made to unload the driver while the DFC + interface was active. +data: (1) lpfcdiag_cnt (2) instance +severity: Error +log: Always +module: fcLINUXfcp.c +action: Exit any application that uses the DFC diagnostic interface + before attempting to unload the driver. +*/ +char fc_mes1200[] = "%sCannot unload driver while lpfcdiag Interface is active Data: x%x x%x"; +msgLogDef fc_msgBlk1200 = { + FC_LOG_MSG_MI_1200, + fc_mes1200, + fc_msgPreambleMIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_MISC, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1201 +message: lpfc_kmalloc: Bad p_dev_ctl +descript: The driver manages its own memory for internal usage. This + error indicates a problem occurred in the driver memory + management routines. This error could also indicate the host + system in low on memory resources. +data: (1) size (2) type (3) fc_idx_dmapool +severity: Error +log: Always +module: fcLINUXfcp.c +action: This error could indicate a driver or host operating system + problem. If problems persist report these errors to Technical + Support. +*/ +char fc_mes1201[] = "%slpfc_kmalloc: Bad p_dev_ctl Data: x%x x%x x%x"; +msgLogDef fc_msgBlk1201 = { + FC_LOG_MSG_MI_1201, + fc_mes1201, + fc_msgPreambleMIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_MISC, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1202 +message: lpfc_kmalloc: Bad size +descript: The driver manages its own memory for internal usage. This + error indicates a problem occurred in the driver memory + management routines. This error could also indicate the host + system in low on memory resources. +data: (1) size (2) type (3) fc_idx_dmapool +severity: Error +log: Always +module: fcLINUXfcp.c +action: This error could indicate a driver or host operating system + problem. If problems persist report these errors to Technical + Support. +*/ +char fc_mes1202[] = "%slpfc_kmalloc: Bad size Data: x%x x%x x%x"; +msgLogDef fc_msgBlk1202 = { + FC_LOG_MSG_MI_1202, + fc_mes1202, + fc_msgPreambleMIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_MISC, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1203 +message: lpfc_kmalloc: Virt addr failed to alloc +descript: The driver manages its own memory for internal usage. This + error indicates a problem occurred in the driver memory + management routines. This error could also indicate the host + system in low on memory resources. +data: (1) size (2) type +severity: Error +log: Always +module: fcLINUXfcp.c +action: This error could indicate a driver or host operating system + problem. If problems persist report these errors to Technical + Support. +*/ +char fc_mes1203[] = "%slpfc_kmalloc: Virt addr failed to alloc Data: x%x x%x"; +msgLogDef fc_msgBlk1203 = { + FC_LOG_MSG_MI_1203, + fc_mes1203, + fc_msgPreambleMIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_MISC, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1204 +message: lpfc_kmalloc: Bad virtual addr +descript: The driver manages its own memory for internal usage. This + error indicates a problem occurred in the driver memory + management routines. This error could also indicate the host + system in low on memory resources. +data: (1) i (2) size ( 3) type (4) fc_idx_dmapool +severity: Error +log: Always +module: fcLINUXfcp.c +action: This error could indicate a driver or host operating system + problem. If problems persist report these errors to Technical + Support. +*/ +char fc_mes1204[] = "%slpfc_kmalloc: Bad virtual addr Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk1204 = { + FC_LOG_MSG_MI_1204, + fc_mes1204, + fc_msgPreambleMIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_MISC, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1205 +message: lpfc_kmalloc: dmapool FULL +descript: The driver manages its own memory for internal usage. This + error indicates a problem occurred in the driver memory + management routines. This error could also indicate the host + system in low on memory resources. +data: (1) i (2) size (3) type (4) fc_idx_dmapool +severity: Error +log: Always +module: fcLINUXfcp.c +action: This error could indicate a driver or host operating system + problem. If problems persist report these errors to Technical + Support. +*/ +char fc_mes1205[] = "%slpfc_kmalloc: dmapool FULL Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk1205 = { + FC_LOG_MSG_MI_1205, + fc_mes1205, + fc_msgPreambleMIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_MISC, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1206 +message: lpfc_kfree: Bad p_dev_ctl +descript: The driver manages its own memory for internal usage. This + error indicates a problem occurred in the driver memory + management routines. This error could also indicate the host + system in low on memory resources. +data: (1) size (2) fc_idx_dmapool +severity: Error +log: Always +module: fcLINUXfcp.c +action: This error could indicate a driver or host operating system + problem. If problems persist report these errors to Technical + Support. +*/ +char fc_mes1206[] = "%slpfc_kfree: Bad p_dev_ctl Data: x%x x%x"; +msgLogDef fc_msgBlk1206 = { + FC_LOG_MSG_MI_1206, + fc_mes1206, + fc_msgPreambleMIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_MISC, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1207 +message: lpfc_kfree: NOT in dmapool +descript: The driver manages its own memory for internal usage. This + error indicates a problem occurred in the driver memory + management routines. This error could also indicate the host + system in low on memory resources. +data: (1) virt (2) size (3) fc_idx_dmapool +severity: Error +log: Always +module: fcLINUXfcp.c +action: This error could indicate a driver or host operating system + problem. If problems persist report these errors to Technical + Support. +*/ +char fc_mes1207[] = "%slpfc_kfree: NOT in dmapool Data: x%x x%x x%x"; +msgLogDef fc_msgBlk1207 = { + FC_LOG_MSG_MI_1207, + fc_mes1207, + fc_msgPreambleMIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_MISC, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1208 +descript: The CT response returned more data than the user buffer could hold. +message: C_CT Request error +data: (1) dfc_flag (2) 4096 +severity: Information +log: LOG_MISC verbose +module: dfcdd.c +action: Modify user application issuing CT request to allow for a larger + response buffer. +*/ +char fc_mes1208[] = "%sC_CT Request error Data: x%x x%x"; +msgLogDef fc_msgBlk1208 = { + FC_LOG_MSG_MI_1208, + fc_mes1208, + fc_msgPreambleMIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_MISC, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1209 +message: RNID Request error +descript: RNID sent back a response that was larger than the driver supports. +data: (1) fc_mptr (2) 4096 +severity: Information +log: LOG_MISC verbose +module: dfcdd.c +action: None required +*/ +char fc_mes1209[] = "%sRNID Request error Data: x%x x%x"; +msgLogDef fc_msgBlk1209 = { + FC_LOG_MSG_MI_1209, + fc_mes1209, + fc_msgPreambleMIi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_MISC, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1210 +message: Convert ASC to hex. Input byte cnt < 1 +descript: ASCII string to hex conversion failed. Input byte count < 1. +data: none +severity: Error +log: Always +action: This error could indicate a software driver problem. + If problems persist report these errors to Technical Support. +*/ +char fc_mes1210[] = "%sConvert ASC to hex. Input byte cnt < 1"; +msgLogDef fc_msgBlk1210 = { + FC_LOG_MSG_MI_1210, + fc_mes1210, + fc_msgPreambleMIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_MISC, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1211 +message: Convert ASC to hex. Input byte cnt > max +descript: ASCII string to hex conversion failed. Input byte count > max . +data: none +severity: Error +log: Always +action: This error could indicate a software driver problem. + If problems persist report these errors to Technical Support. +*/ +char fc_mes1211[] = "%sConvert ASC to hex. Input byte cnt > max %d"; +msgLogDef fc_msgBlk1211 = { + FC_LOG_MSG_MI_1211, + fc_mes1211, + fc_msgPreambleMIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_MISC, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1212 +message: Convert ASC to hex. Output buffer to small +descript: ASCII string to hex conversion failed. The output buffer byte + size is less than 1/2 of input byte count. Every 2 input chars + (bytes) require 1 output byte. +data: none +severity: Error +log: Always +action: This error could indicate a software driver problem. + If problems persist report these errors to Technical Support. +*/ +char fc_mes1212[] = "%sConvert ASC to hex. Output buffer too small"; +msgLogDef fc_msgBlk1212 = { + FC_LOG_MSG_MI_1212, + fc_mes1212, + fc_msgPreambleMIe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_MISC, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1213 +message: Convert ASC to hex. Input char seq not ASC hex. +descript: The ASCII hex input string contains a non-ASCII hex characters +data: none +severity: Error configuration +log: Always +action: Make neccessary changes to lpfc configuration file. +*/ +char fc_mes1213[] = "%sConvert ASC to hex. Input char seq not ASC hex."; +msgLogDef fc_msgBlk1213 = { + FC_LOG_MSG_MI_1213, + fc_mes1213, + fc_msgPreambleMIc, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR_CFG, + LOG_MISC, + ERRID_LOG_UNEXPECT_EVENT }; + +/* + * Begin LINK LOG Message Structures + */ + +/* +msgName: fc_mes1300 +message: Re-establishing Link, timer expired +descript: The driver detected a condition where it had to re-initialize + the link. +data: (1) fc_flag (2) fc_ffstate +severity: Error +log: Always +module: fcclockb.c +action: If numerous link events are occurring, check physical + connections to Fibre Channel network. +*/ +char fc_mes1300[] = "%sRe-establishing Link, timer expired Data: x%x x%x"; +msgLogDef fc_msgBlk1300 = { + FC_LOG_MSG_LK_1300, + fc_mes1300, + fc_msgPreambleLKe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_LINK_EVENT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1301 +message: Re-establishing Link +descript: The driver detected a condition where it had to re-initialize + the link. +data: (1) status (2) status1 (3) status2 +severity: Information +log: LOG_LINK_EVENT verbose +module: lp6000.c +action: If numerous link events are occurring, check physical + connections to Fibre Channel network. +*/ +char fc_mes1301[] = "%sRe-establishing Link Data: x%x x%x x%x"; +msgLogDef fc_msgBlk1301 = { + FC_LOG_MSG_LK_1301, + fc_mes1301, + fc_msgPreambleLKi, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_INFO, + LOG_LINK_EVENT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1302 +message: Reset link speed to auto. 1G node detected in loop. +descript: The driver is reinitializing the link speed to auto-detect. + This acton results if a 2G HBA is configured for a link + speed of 2G and the HBA detects a node that does NOT + support 2G link speed. All nodes on that loop will come + up with a link speed equal to 1G. +data: none +severity: Warning +log: LOG_LINK_EVENT verbose +module: lp6000.c +action: None required +*/ +char fc_mes1302[] = "%sReset link speed to auto. 1G node detected in loop."; +msgLogDef fc_msgBlk1302 = { + FC_LOG_MSG_LK_1302, + fc_mes1302, + fc_msgPreambleLKw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_LINK_EVENT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1303 +message: Reset link speed to auto. 1G HBA cfg'd for 2G. +descript: The driver is reinitializing the link speed to auto-detect. + This acton results if a 1G HBA is configured for 2G + link speed operation. All nodes on that loop will come + up with a link speed equal to 1G. +data: none +severity: Warning +log: LOG_LINK_EVENT verbose +module: fcfcp.c +action: None required +*/ +char fc_mes1303[] = "%sReset link speed to auto. 1G HBA cfg'd for 2G"; +msgLogDef fc_msgBlk1303 = { + FC_LOG_MSG_LK_1303, + fc_mes1303, + fc_msgPreambleLKw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_LINK_EVENT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1304 +message: Link Up Event received +descript: A link up event was received. It is also possible for + multiple link events to be received together. +data: (1) eventTag (2) fc_eventTag (3) granted_AL_PA (4) alpa_map[0] +detail: If multiple link events received, log (1) current event + number, (2) last event number received, (3) ALPA granted, + (4) number of entries in the loop init LILP ALPA map. + An ALPA map message is also recorded if LINK_EVENT + verbose mode is set. Each ALPA map message contains + 16 ALPAs. +severity: Error +log: Always +module: fcscsib.c +action: If numerous link events are occurring, check physical + connections to Fibre Channel network. +*/ +char fc_mes1304[] = "%sLink Up Event received Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk1304 = { + FC_LOG_MSG_LK_1304, + fc_mes1304, + fc_msgPreambleLKe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_LINK_EVENT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1305 +message: Link Up Event ALPA map +descript: A link up event was received. +data: (1) wd1 (2) wd2 (3) wd3 (4) wd4 +severity: Warning +log: LOG_LINK_EVENT verbose +module: fcscsib.c +action: If numerous link events are occurring, check physical + connections to Fibre Channel network. +*/ +char fc_mes1305[] = "%sLink Up Event ALPA map Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk1305 = { + FC_LOG_MSG_LK_1305, + fc_mes1305, + fc_msgPreambleLKw, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_WARN, + LOG_LINK_EVENT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1306 +message: Link Down Event received +descript: A link down event was received. +data: (1) eventTag (2) fc_eventTag (3) granted_AL_PA (4) alpa_map[0] +severity: Error +log: Always +module: fcscsib.c +action: If numerous link events are occurring, check physical + connections to Fibre Channel network. +*/ +char fc_mes1306[] = "%sLink Down Event received Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk1306 = { + FC_LOG_MSG_LK_1306, + fc_mes1306, + fc_msgPreambleLKe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_LINK_EVENT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1307 +message: SCSI Link Reset +descript: The SCSI layer has determined the link needs to be reset. + A LIP is sent to restart loop initialization. +data: None +severity: Error +log: Always +module: fcscsib.c +action: None required +*/ +char fc_mes1307[] = "%sSCSI Link Reset"; +msgLogDef fc_msgBlk1307 = { + FC_LOG_MSG_LK_1307, + fc_mes1307, + fc_msgPreambleLKe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_LINK_EVENT, + ERRID_LOG_UNEXPECT_EVENT }; + +/* + * Begin SLI LOG Message Structures + */ + +/* +msgName: fc_mes1400 +message: Unknown IOCB command +descript: Received an unknown IOCB command completion. +data: (1) ulpCommand (2) ulpStatus (3) ulpIoTag (4) ulpContext) +severity: Error +log: Always +module: lp6000.c +action: This error could indicate a software driver or firmware + problem. If these problems persist, report these errors + to Technical Support. +*/ +char fc_mes1400[] = "%sUnknown IOCB command Data: x%x x%x x%x x%x"; +msgLogDef fc_msgBlk1400 = { + FC_LOG_MSG_LK_1400, + fc_mes1400, + fc_msgPreambleSLe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_SLI, + ERRID_LOG_UNEXPECT_EVENT }; + +/* +msgName: fc_mes1401 +message: Command ring timeout +descript: An IOCB command was posted to a ring and did not complete + within a timeout based on RATOV. +data: (1) IOCB command (2) ulpCommand +severity: Error +log: Always +module: fcscsib.c +action: This error could indicate a software driver or firmware + problem. If no I/O is going through the adapter, reboot + the system. If these problems persist, report these errors + to Technical Support. +*/ +char fc_mes1401[] = "%sCommand ring %d timeout Data: x%x"; +msgLogDef fc_msgBlk1401 = { + FC_LOG_MSG_LK_1401, + fc_mes1401, + fc_msgPreambleSLe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_SLI, + ERRID_LOG_TIMEOUT }; + +/* +msgName: fc_mes1402 +message: Command ring timeout +descript: An IOCB command was posted to a ring and did not complete + within a timeout based on RATOV. +data: None +severity: Error +log: Always +module: fcscsib.c +action: This error could indicate a software driver or firmware + problem. If no I/O is going through the adapter, reboot + the system. If these problems persist, report these errors + to Technical Support. +*/ +char fc_mes1402[] = "%sCommand ring %d timeout"; +msgLogDef fc_msgBlk1402 = { + FC_LOG_MSG_LK_1402, + fc_mes1402, + fc_msgPreambleSLe, + FC_MSG_OPUT_GLOB_CTRL, + FC_LOG_MSG_TYPE_ERR, + LOG_SLI, + ERRID_LOG_TIMEOUT }; + + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fcrpib.c 999-mjb/drivers/scsi/lpfc/fcrpib.c --- 000-virgin/drivers/scsi/lpfc/fcrpib.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fcrpib.c 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,2675 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#include "fc_os.h" + +#include "fc_hw.h" +#include "fc.h" + +#include "fcdiag.h" +#include "fcfgparm.h" +#include "fcmsg.h" +#include "fc_crtn.h" +#include "fc_ertn.h" + +extern fc_dd_ctl_t DD_CTL; +extern iCfgParam icfgparam[]; +extern int fc_max_els_sent; + +/* Routine Declaration - Local */ +_local_ int fc_addrauth(fc_dev_ctl_t *p_dev_ctl); +_local_ void fc_clear_fcp_iocbq(fc_dev_ctl_t *p_dev_ctl, NODELIST *nlp); +_local_ void fc_clear_ip_iocbq(fc_dev_ctl_t *p_dev_ctl, NODELIST *nlp); +_local_ int fc_matchdid(FC_BRD_INFO *binfo, NODELIST *nlp, uint32 did); +/* End Routine Declaration - Local */ + +/* + * Array of all 126 valid AL_PA's (excluding FL_PORT AL_PA 0) + */ + +static uchar staticAlpaArray[] = +{ + 0x01, 0x02, 0x04, 0x08, 0x0F, 0x10, 0x17, 0x18, 0x1B, 0x1D, + 0x1E, 0x1F, 0x23, 0x25, 0x26, 0x27, 0x29, 0x2A, 0x2B, 0x2C, + 0x2D, 0x2E, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x39, 0x3A, + 0x3C, 0x43, 0x45, 0x46, 0x47, 0x49, 0x4A, 0x4B, 0x4C, 0x4D, + 0x4E, 0x51, 0x52, 0x53, 0x54, 0x55, 0x56, 0x59, 0x5A, 0x5C, + 0x63, 0x65, 0x66, 0x67, 0x69, 0x6A, 0x6B, 0x6C, 0x6D, 0x6E, + 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x79, 0x7A, 0x7C, 0x80, + 0x81, 0x82, 0x84, 0x88, 0x8F, 0x90, 0x97, 0x98, 0x9B, 0x9D, + 0x9E, 0x9F, 0xA3, 0xA5, 0xA6, 0xA7, 0xA9, 0xAA, 0xAB, 0xAC, + 0xAD, 0xAE, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB9, 0xBA, + 0xBC, 0xC3, 0xC5, 0xC6, 0xC7, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, + 0xCE, 0xD1, 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD9, 0xDA, 0xDC, + 0xE0, 0xE1, 0xE2, 0xE4, 0xE8, 0xEF +}; + +int fc_fdmi_on = 0; + +_local_ int +fc_matchdid( +FC_BRD_INFO *binfo, +NODELIST *ndlp, +uint32 did) +{ + D_ID mydid; + D_ID odid; + D_ID ndid; + int zero_did; + + if (did == Bcast_DID) + return(0); + + zero_did = 0; + if (ndlp->nlp_DID == 0) { + ndlp->nlp_DID = ndlp->nlp_oldDID; + zero_did = 1; + } + + /* First check for Direct match */ + if (ndlp->nlp_DID == did) + return(1); + + /* Next check for area/domain == 0 match */ + mydid.un.word = binfo->fc_myDID; + if ((mydid.un.b.domain == 0) && (mydid.un.b.area == 0)) { + goto out; + } + + ndid.un.word = did; + odid.un.word = ndlp->nlp_DID; + if (ndid.un.b.id == odid.un.b.id) { + if ((mydid.un.b.domain == ndid.un.b.domain) && + (mydid.un.b.area == ndid.un.b.area)) { + ndid.un.word = ndlp->nlp_DID; + odid.un.word = did; + if ((ndid.un.b.domain == 0) && + (ndid.un.b.area == 0)) { + if (ndid.un.b.id) + return(1); + } + goto out; + } + + ndid.un.word = ndlp->nlp_DID; + if ((mydid.un.b.domain == ndid.un.b.domain) && + (mydid.un.b.area == ndid.un.b.area)) { + odid.un.word = ndlp->nlp_DID; + ndid.un.word = did; + if ((ndid.un.b.domain == 0) && + (ndid.un.b.area == 0)) { + if (ndid.un.b.id) + return(1); + } + } + } +out: + if(zero_did) + ndlp->nlp_DID = 0; + return(0); +} /* End fc_matchdid */ + + +/**************************************************/ +/** fc_nlpadjust **/ +/** **/ +/** This routine adjusts the timestamp in the **/ +/** nlplist when the counter wraps **/ +/**************************************************/ +_static_ int +fc_nlpadjust( +FC_BRD_INFO *binfo) +{ + NODELIST * ndlp; + NODELIST * nlphi, *nlpprev; + uint32 rpts; + + nlphi = 0; + nlpprev = 0; + rpts = 0; + ndlp = binfo->fc_nlpbind_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + if (ndlp->nlp_time > rpts) { + rpts = ndlp->nlp_time; + nlpprev = nlphi; + nlphi = ndlp; + } + + switch (ndlp->nlp_state) { + case NLP_LIMBO: + case NLP_LOGOUT: + ndlp->nlp_time = 1; + break; + + case NLP_ALLOC: + ndlp->nlp_time = 3; + break; + + default: + ndlp->nlp_time = 2; + break; + } + ndlp = (NODELIST *)ndlp->nlp_listp_next; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + + if (nlpprev) + nlpprev->nlp_time = 4; + if (nlphi) + nlphi->nlp_time = 5; + binfo->nlptimer = 6; + return(0); +} /* End fc_nlpadjust */ + + +/**************************************************/ +/** fc_findnode_rpi **/ +/** **/ +/** This routine find a node by rpi **/ +/**************************************************/ +_static_ NODELIST * +fc_findnode_rpi( +FC_BRD_INFO *binfo, +uint32 rpi) +{ + NODELIST * ndlp = 0; + + if (rpi < NLP_MAXRPI) + ndlp = binfo->fc_nlplookup[rpi]; + /* FIND node rpi */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0900, /* ptr to msg structure */ + fc_mes0900, /* ptr to msg */ + fc_msgBlk0900.msgPreambleStr, /* begin varargs */ + (ulong)ndlp, + rpi); /* end varargs */ + return(ndlp); +} /* End fc_findnode_rpi */ + + +/**************************************************/ +/** fc_freenode_did **/ +/** **/ +/** This routine will free an NODELIST entry **/ +/** associated with did. **/ +/**************************************************/ +_static_ int +fc_freenode_did( +FC_BRD_INFO *binfo, +uint32 did, +int rm) +{ + NODELIST * ndlp; + + + if(((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, did)) == 0) || + (ndlp->nlp_state == NLP_SEED)) { + /* no match found */ + return(0); + } + + fc_freenode(binfo, ndlp, rm); + if(rm == 0) { + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + return(1); +} /* End fc_freenode_did */ + + +/**************************************************/ +/** fc_free_rpilist **/ +/** **/ +/** This routine will free all NODELIST entries **/ +/** and associated buffers. **/ +/**************************************************/ +_static_ int +fc_free_rpilist( +fc_dev_ctl_t *p_dev_ctl, +int keeprpi) +{ + FC_BRD_INFO * binfo; + NODELIST * ndlp; + NODELIST * new_ndlp; + RING * rp; + IOCBQ * xmitiq; + iCfgParam * clp; + struct buf * bp; + T_SCSIBUF * sbp; + dvi_t * dev_ptr; + fc_buf_t * fcptr; + node_t * node_ptr; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + /* if keeprpi == 0, toss everything on ELS xmitq and xmit pending queue */ + if (keeprpi == 0) { + rp = &binfo->fc_ring[FC_ELS_RING]; + /* get next command from ring xmit queue */ + while ((xmitiq = fc_ringtx_drain(rp)) != 0) { + fc_freebufq(p_dev_ctl, rp, xmitiq); + } + + /* look up xmit next compl */ + while ((xmitiq = fc_ringtxp_get(rp, 0)) != 0) { + fc_freebufq(p_dev_ctl, rp, xmitiq); + } + } + + /* Toss everything on LAN xmitq and xmit pending queue */ + rp = &binfo->fc_ring[FC_IP_RING]; + /* get next command from ring xmit queue */ + while ((xmitiq = fc_ringtx_drain(rp)) != 0) { + fc_freebufq(p_dev_ctl, rp, xmitiq); + } + + /* look up xmit next compl */ + while ((xmitiq = fc_ringtxp_get(rp, 0)) != 0) { + fc_freebufq(p_dev_ctl, rp, xmitiq); + } + + NDDSTAT.ndd_xmitque_cur = 0; + + if(clp[CFG_FCP_ON].a_current) { + int i; + + rp = &binfo->fc_ring[FC_FCP_RING]; + + for(i=0;ifc_table->fcp_array[i]) && + (fcptr = fc_deq_fcbuf_active(rp, (ushort)i))) { + dev_ptr = fcptr->dev_ptr; + + if(dev_ptr->queue_state == ACTIVE_PASSTHRU) { + node_t * map_node_ptr; + struct dev_info * map_dev_ptr; + + map_node_ptr = (node_t *)dev_ptr->pend_head; + map_dev_ptr = (struct dev_info *)dev_ptr->pend_tail; + dev_ptr->pend_head = 0; + dev_ptr->pend_tail = 0; + dev_ptr->queue_state = HALTED; + dev_ptr->active_io_count--; + if(map_dev_ptr) + map_dev_ptr->active_io_count--; + if(map_node_ptr) + map_node_ptr->num_active_io--; + + dev_ptr->ioctl_event = IOSTAT_LOCAL_REJECT; + + dev_ptr->ioctl_errno = IOERR_SEQUENCE_TIMEOUT; + dev_ptr->sense_length = 0; + dev_ptr->clear_count = 0; + continue; + } /* end ACTIVE_PASSTHRU management */ + + sbp = fcptr->sc_bufp; + bp = (struct buf *) sbp; + + + /* E_D_TOV timeout */ + bp->b_error = ETIMEDOUT; + + sbp->adap_q_status = SC_DID_NOT_CLEAR_Q; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + sbp->status_validity = SC_ADAPTER_ERROR; + SET_ADAPTER_STATUS(sbp, SC_CMD_TIMEOUT) + + if (fcptr->fcp_cmd.fcpCntl2) { + /* This is a task management command */ + if (bp->b_flags & B_ERROR) + dev_ptr->ioctl_errno = bp->b_error; + else + dev_ptr->ioctl_errno = 0; + + if (fcptr->fcp_cmd.fcpCntl2 == ABORT_TASK_SET) + dev_ptr->flags &= ~SCSI_ABORT_TSET; + + if (fcptr->fcp_cmd.fcpCntl2 & TARGET_RESET) + dev_ptr->flags &= ~SCSI_TARGET_RESET; + + if (fcptr->fcp_cmd.fcpCntl2 & LUN_RESET) + dev_ptr->flags &= ~SCSI_LUN_RESET; + + if (dev_ptr->ioctl_wakeup == 1) { + dev_ptr->ioctl_wakeup = 0; + + fc_admin_wakeup(p_dev_ctl, dev_ptr, sbp); + } else { + fc_do_iodone(bp); + } + } else { + fc_do_iodone(bp); + } + dev_ptr->active_io_count--; + dev_ptr->nodep->num_active_io--; + fc_enq_fcbuf(fcptr); + } + } + + fc_failio(p_dev_ctl); + + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + + /* Make sure pendq is empty */ + i = INDEX(ndlp->id.nlp_pan, ndlp->id.nlp_sid); + if ((node_ptr = binfo->device_queue_hash[i].node_ptr) != NULL) { + for (dev_ptr = node_ptr->lunlist; dev_ptr != NULL; + dev_ptr = dev_ptr->next) { + while ((sbp = dev_ptr->pend_head) != NULL) { + dev_ptr->pend_count--; + dev_ptr->pend_head = (T_SCSIBUF *) sbp->bufstruct.av_forw; + if (dev_ptr->pend_head == NULL) + dev_ptr->pend_tail = NULL; + else + dev_ptr->pend_head->bufstruct.av_back = NULL; + + sbp->bufstruct.b_flags |= B_ERROR; + sbp->bufstruct.b_error = EIO; + sbp->bufstruct.b_resid = sbp->bufstruct.b_bcount; + sbp->status_validity = SC_ADAPTER_ERROR; + SET_ADAPTER_STATUS(sbp, SC_NO_DEVICE_RESPONSE) + + sbp->bufstruct.av_forw = 0; + fc_do_iodone((struct buf *) sbp); + } + } + } + ndlp = binfo->fc_nlpmap_start; + } + } + + /* Put all Mapped and unmapped nodes on the bind list */ + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + new_ndlp = (NODELIST *)ndlp->nlp_listp_next; + + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + + ndlp = new_ndlp; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + + /* Put adapter into an error state and return all outstanding I/Os */ + fc_linkdown(p_dev_ctl); + + return(0); +} /* End fc_free_rpilist */ + + +/* + * Issue an ABORT_XRI_CX iocb command to abort an exchange + */ +_static_ int +fc_rpi_abortxri( +FC_BRD_INFO *binfo, +ushort xri) +{ + IOCB * icmd; + IOCBQ * temp; + RING * rp; + + /* Use IP ring so ABTS comes out after CLEAR_LA */ + rp = &binfo->fc_ring[FC_IP_RING]; + + /* Get an iocb buffer */ + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB)) == 0) { + return(1); + } + fc_bzero((void *)temp, sizeof(IOCBQ)); + icmd = &temp->iocb; + + icmd->un.acxri.abortType = ABORT_TYPE_ABTS; + icmd->ulpContext = xri; + + /* set up an iotag */ + icmd->ulpIoTag = rp->fc_iotag++; + if (rp->fc_iotag == 0) { + rp->fc_iotag = 1; + } + + icmd->ulpLe = 1; + icmd->ulpClass = CLASS3; + icmd->ulpCommand = CMD_ABORT_XRI_CX; + icmd->ulpOwner = OWN_CHIP; + + issue_iocb_cmd(binfo, rp, temp); + + return(0); +} /* End fc_rpi_abortxri */ + + +/**************************************************/ +/** fc_freenode **/ +/** **/ +/** This routine will remove NODELIST entries **/ +/** rm determines state to leave entry at, **/ +/** either NLP_UNUSED or NLP_LOGOUT **/ +/**************************************************/ +_static_ int +fc_freenode( +FC_BRD_INFO *binfo, +NODELIST *nlp, +int rm) +{ + MAILBOXQ * mbox; + node_t * node_ptr; + uint32 data1; + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + rm ); + + /* Free node tbl */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0901, /* ptr to msg structure */ + fc_mes0901, /* ptr to msg */ + fc_msgBlk0901.msgPreambleStr, /* begin varargs */ + nlp->nlp_DID, + nlp->nlp_flag, + nlp->nlp_Rpi, + data1); /* end varargs */ + /* FREE node IEEE */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0902, /* ptr to msg structure */ + fc_mes0902, /* ptr to msg */ + fc_msgBlk0902.msgPreambleStr, /* begin varargs */ + nlp->nlp_nodename.IEEE[2], + nlp->nlp_nodename.IEEE[3], + nlp->nlp_nodename.IEEE[4], + nlp->nlp_nodename.IEEE[5]); /* end varargs */ + + + if(nlp == &binfo->fc_fcpnodev) + return(1); + + if(nlp->nlp_listp_next) { + if (nlp->nlp_flag & NLP_MAPPED) { + nlp->nlp_time = binfo->nlptimer++; + if (nlp->nlp_time == 0) { + fc_nlpadjust(binfo); + } + nlp->nlp_flag &= ~NLP_MAPPED; + binfo->fc_map_cnt--; + fc_deque(nlp); + } + else if (nlp->nlp_flag & NLP_UNMAPPED) { + nlp->nlp_time = binfo->nlptimer++; + if (nlp->nlp_time == 0) { + fc_nlpadjust(binfo); + } + nlp->nlp_flag &= ~NLP_UNMAPPED; + binfo->fc_unmap_cnt--; + fc_deque(nlp); + } + else if (nlp->nlp_flag & NLP_BIND) { + nlp->nlp_flag &= ~NLP_BIND; + binfo->fc_bind_cnt--; + fc_deque(nlp); + } + } + + /* Unregister login with firmware for this node */ + if (nlp->nlp_Rpi) { + /* Unregister login */ + if ((mbox = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_unreg_login(binfo, nlp->nlp_Rpi, (MAILBOX * )mbox); + if (nlp->nlp_flag & NLP_UNREG_LOGO) { + ((MAILBOX *)mbox)->un.varWords[30] = nlp->nlp_DID; + } + if (issue_mb_cmd(binfo, (MAILBOX * )mbox, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mbox); + } + } + binfo->fc_nlplookup[nlp->nlp_Rpi] = 0; + nlp->nlp_Rpi = 0; + } + + if (nlp->nlp_DID) { + RING * rp; + IOCBQ * iocbq; + unsigned long iflag; + fc_dev_ctl_t *p_dev_ctl; + + /* Look through ELS ring and remove any ELS cmds in progress */ + p_dev_ctl = (fc_dev_ctl_t *)binfo->fc_p_dev_ctl; + iflag = lpfc_q_disable_lock(p_dev_ctl); + rp = &binfo->fc_ring[FC_ELS_RING]; + iocbq = (IOCBQ * )(rp->fc_txp.q_first); + while (iocbq) { + if (iocbq->iocb.un.elsreq.remoteID == nlp->nlp_DID) { + iocbq->retry = 0xff; /* Mark for abort */ + if((binfo->fc_flag & FC_RSCN_MODE) || + (binfo->fc_ffstate < FC_READY)) { + if((nlp->nlp_state >= NLP_PLOGI) && + (nlp->nlp_state <= NLP_PRLI)) { + nlp->nlp_action &= ~NLP_DO_RSCN; + binfo->fc_nlp_cnt--; + if ((nlp->nlp_type & NLP_IP_NODE) && nlp->nlp_bp) { + m_freem((fcipbuf_t *)nlp->nlp_bp); + nlp->nlp_bp = (uchar * )0; + } + } + } + } + iocbq = (IOCBQ * )iocbq->q; + } + lpfc_q_unlock_enable(p_dev_ctl, iflag); + /* In case its on fc_delay_timeout list */ + fc_abort_delay_els_cmd((fc_dev_ctl_t *)binfo->fc_p_dev_ctl, nlp->nlp_DID); + + nlp->nlp_oldDID = nlp->nlp_DID; /* save the old DID */ + } + + if (nlp->nlp_flag & (NLP_REQ_SND | NLP_REQ_SND_ADISC)) { + nlp->nlp_flag &= ~(NLP_REQ_SND | NLP_REQ_SND_ADISC); + /* Goto next entry */ + fc_nextnode((fc_dev_ctl_t * )(binfo->fc_p_dev_ctl), nlp); + } + + + if (nlp->nlp_type & NLP_IP_NODE) { + if (nlp->nlp_bp) { + m_freem((fcipbuf_t * )nlp->nlp_bp); + nlp->nlp_bp = 0; + } + + /* Go remove all entries for this node from the IP IOCBQ */ + fc_clear_ip_iocbq((fc_dev_ctl_t * )(binfo->fc_p_dev_ctl), nlp); + } + + if (nlp->nlp_type & NLP_FCP_TARGET) { + iCfgParam * clp; + + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + /* Go remove all entries for this RPI from the FCP IOCBQ */ + fc_clear_fcp_iocbq((fc_dev_ctl_t *)binfo->fc_p_dev_ctl, nlp); + + if ((node_ptr = (node_t * )(nlp->nlp_targetp)) != NULL) { + dvi_t * dev_ptr; + + node_ptr->rpi = 0xfffe; + node_ptr->flags &= ~FC_FCP2_RECOVERY; + for (dev_ptr = node_ptr->lunlist; dev_ptr != NULL; + dev_ptr = dev_ptr->next) { + if(binfo->fc_ffstate == FC_READY){ + /* + * Cause the standby queue to drain. + */ + fc_return_standby_queue(dev_ptr, + (uchar)((binfo->fc_flag & FC_BUS_RESET) ? EIO : EFAULT), 0); + + fc_fail_pendq(dev_ptr, + (uchar)((binfo->fc_flag & FC_BUS_RESET) ? EIO : EFAULT), 0); + /* UNREG_LOGIN from freenode should abort txp I/Os */ + fc_fail_cmd(dev_ptr, (char)((binfo->fc_flag & FC_BUS_RESET) ? + EIO : EFAULT), 0); + + /* Call iodone for all the CLEARQ error bufs */ + fc_free_clearq(dev_ptr); + } + dev_ptr->queue_state = HALTED; + } + } + + /* Is this node, automapped or seeded */ + if(nlp->nlp_type & (NLP_AUTOMAP | NLP_SEED_MASK)) { + /* If FCP we need to keep entry around for the wwpn - sid mapping */ + nlp->nlp_type = (NLP_FCP_TARGET | + (nlp->nlp_type & (NLP_AUTOMAP | NLP_SEED_MASK))); + if(nlp->nlp_type & NLP_SEED_DID) { + fc_bzero((void *)&nlp->nlp_portname, sizeof(NAME_TYPE)); + fc_bzero((void *)&nlp->nlp_nodename, sizeof(NAME_TYPE)); + } + else { + nlp->nlp_DID = 0; + } + } + else { + nlp->nlp_flag = 0; + nlp->nlp_action = 0; + nlp->nlp_type = 0; + nlp->nlp_targetp = 0; + nlp->id.nlp_pan = 0; + nlp->id.nlp_sid = 0; + } + + if(node_ptr && (clp[CFG_NODEV_TMO].a_current) && + ((node_ptr->flags & FC_NODEV_TMO) == 0)) { + if(node_ptr->nodev_tmr == 0) { + /* START nodev timer */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0700, /* ptr to msg structure */ + fc_mes0700, /* ptr to msg */ + fc_msgBlk0700.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_flag, + nlp->nlp_state, + nlp->nlp_DID); /* end varargs */ + + if(binfo->fc_ffstate != FC_LINK_DOWN) { + node_ptr->nodev_tmr = + fc_clk_set((fc_dev_ctl_t * )(binfo->fc_p_dev_ctl), + clp[CFG_NODEV_TMO].a_current, fc_nodev_timeout, + (void *)node_ptr, 0); + } + else { + node_ptr->nodev_tmr = + fc_clk_set((fc_dev_ctl_t * )(binfo->fc_p_dev_ctl), + (clp[CFG_NODEV_TMO].a_current + clp[CFG_LINKDOWN_TMO].a_current), + fc_nodev_timeout, (void *)node_ptr, 0); + } + } + } + } + else { + nlp->nlp_targetp = 0; + nlp->id.nlp_pan = 0; + nlp->id.nlp_sid = 0; + nlp->nlp_type = 0; + } + + nlp->nlp_Xri = 0; + nlp->nlp_action = 0; + + if (rm) { + fc_bzero((void *)nlp, sizeof(NODELIST)); + fc_mem_put(binfo, MEM_NLP, (uchar *)nlp); + } else { + if(nlp->nlp_flag & NLP_NS_REMOVED) + nlp->nlp_flag = NLP_NS_REMOVED; + else + nlp->nlp_flag = 0; + + /* Keep the entry cached */ + nlp->nlp_state = NLP_LIMBO; + /* Let the caller put it on the appropriate q at the appropriate time */ + } + return(1); +} /* End fc_freenode */ + + +/************************************************************************/ +/* */ +/* NAME: fc_clear_fcp_iocbq */ +/* */ +/* FUNCTION: Fail All FCP Commands in IOCBQ for one RPI */ +/* */ +/* This routine is called to clear out all FCP commands */ +/* in the IOCBQ for a specific SCSI FCP device RPI. */ +/* */ +/* EXECUTION ENVIRONMENT: */ +/* This routine can only be called on priority levels */ +/* equal to that of the interrupt handler. */ +/* */ +/* DATA STRUCTURES: */ +/* sc_buf - input/output request struct used between the adapter */ +/* driver and the calling SCSI device driver */ +/* */ +/* INPUTS: */ +/* NODELIST structure - pointer to device node structure */ +/* */ +/* RETURN VALUE DESCRIPTION: */ +/* none */ +/* */ +/************************************************************************/ +_local_ void +fc_clear_fcp_iocbq( +fc_dev_ctl_t *p_dev_ctl, +NODELIST *ndlp) +{ + FC_BRD_INFO * binfo; + T_SCSIBUF * sbp; + RING * rp; + IOCBQ * iocb_cmd, *next; + IOCB * icmd; + dvi_t * dev_ptr; + fc_buf_t * fcptr; + struct buf * bp; + Q tmpq; + + binfo = &BINFO; + + /* Clear out all fc_buf structures in the iocb queue for this RPI */ + rp = &binfo->fc_ring[FC_FCP_RING]; + tmpq.q_first = NULL; + + /* Get next command from ring xmit queue */ + iocb_cmd = fc_ringtx_get(rp); + + while (iocb_cmd) { + icmd = &iocb_cmd->iocb; + if ((icmd->ulpCommand != CMD_IOCB_CONTINUE_CN) && + (icmd->ulpContext == ndlp->nlp_Rpi)) { + + if ((fcptr = fc_deq_fcbuf_active(rp, icmd->ulpIoTag)) != NULL) { + dev_ptr = fcptr->dev_ptr; + /* Reject this command with error */ + if(dev_ptr && (dev_ptr->queue_state == ACTIVE_PASSTHRU)) { + node_t * map_node_ptr; + struct dev_info * map_dev_ptr; + + map_node_ptr = (node_t *)dev_ptr->pend_head; + map_dev_ptr = (struct dev_info *)dev_ptr->pend_tail; + dev_ptr->pend_head = 0; + dev_ptr->pend_tail = 0; + dev_ptr->queue_state = HALTED; + dev_ptr->active_io_count--; + if(map_dev_ptr) + map_dev_ptr->active_io_count--; + if(map_node_ptr) + map_node_ptr->num_active_io--; + + dev_ptr->ioctl_event = IOSTAT_LOCAL_REJECT; + + dev_ptr->ioctl_errno = IOERR_SEQUENCE_TIMEOUT; + dev_ptr->sense_length = 0; + dev_ptr->clear_count = 0; + while ((iocb_cmd = fc_ringtx_get(rp)) != NULL) { + icmd = &iocb_cmd->iocb; + if (icmd->ulpCommand != CMD_IOCB_CONTINUE_CN) + break; + fc_mem_put(binfo, MEM_IOCB, (uchar * )iocb_cmd); + } + continue; + } /* end ACTIVE_PASSTHRU management */ + + if (fcptr->fcp_cmd.fcpCntl2) { + + bp = (struct buf *)fcptr->sc_bufp; + + if(dev_ptr) { + /* This is a task management command */ + dev_ptr->ioctl_errno = ENXIO; + dev_ptr->active_io_count--; + dev_ptr->nodep->num_active_io--; + + if (fcptr->fcp_cmd.fcpCntl2 == ABORT_TASK_SET) + dev_ptr->flags &= ~SCSI_ABORT_TSET; + + if (fcptr->fcp_cmd.fcpCntl2 & TARGET_RESET) + dev_ptr->flags &= ~SCSI_TARGET_RESET; + + if (fcptr->fcp_cmd.fcpCntl2 & LUN_RESET) + dev_ptr->flags &= ~SCSI_LUN_RESET; + + if (fcptr->dev_ptr->ioctl_wakeup) { + fcptr->dev_ptr->ioctl_wakeup = 0; + fc_admin_wakeup(((fc_dev_ctl_t *)(binfo->fc_p_dev_ctl)), + fcptr->dev_ptr, fcptr->sc_bufp); + } + } + } else { + /* This is a regular FCP command */ + + bp = (struct buf *)fcptr->sc_bufp; + bp->b_error = ENXIO; + bp->b_resid = bp->b_bcount; + bp->b_flags |= B_ERROR; + + sbp = (T_SCSIBUF *)bp; + sbp->status_validity = SC_ADAPTER_ERROR; + SET_ADAPTER_STATUS(sbp, SC_NO_DEVICE_RESPONSE) + + dev_ptr = fcptr->dev_ptr; + if(dev_ptr) { + dev_ptr->active_io_count--; + dev_ptr->nodep->num_active_io--; + } + + fc_delay_iodone(p_dev_ctl, sbp); + } + fc_enq_fcbuf(fcptr); + } + + fc_mem_put(binfo, MEM_IOCB, (uchar * )iocb_cmd); + + while ((iocb_cmd = fc_ringtx_get(rp)) != NULL) { + icmd = &iocb_cmd->iocb; + if (icmd->ulpCommand != CMD_IOCB_CONTINUE_CN) + break; + fc_mem_put(binfo, MEM_IOCB, (uchar * )iocb_cmd); + } + } else { + /* Queue this iocb to the temporary queue */ + if (tmpq.q_first) { + ((IOCBQ * )tmpq.q_last)->q = (uchar * )iocb_cmd; + tmpq.q_last = (uchar * )iocb_cmd; + } else { + tmpq.q_first = (uchar * )iocb_cmd; + tmpq.q_last = (uchar * )iocb_cmd; + } + iocb_cmd->q = NULL; + + iocb_cmd = fc_ringtx_get(rp); + } + } + + /* Put the temporary queue back in the FCP iocb queue */ + iocb_cmd = (IOCBQ * )tmpq.q_first; + while (iocb_cmd) { + next = (IOCBQ * )iocb_cmd->q; + fc_ringtx_put(rp, iocb_cmd); + iocb_cmd = next; + } + + return; +} /* End fc_clear_fcp_iocbq */ + + +/************************************************************************/ +/* */ +/* NAME: fc_clear_ip_iocbq */ +/* */ +/* FUNCTION: Fail All IP Commands in IOCBQ for one RPI */ +/* */ +/* This routine is called to clear out all IP commands */ +/* in the IOCBQ for a specific IP device RPI. */ +/* */ +/* EXECUTION ENVIRONMENT: */ +/* This routine can only be called on priority levels */ +/* equal to that of the interrupt handler. */ +/* */ +/* INPUTS: */ +/* NODELIST structure - pointer to device node structure */ +/* */ +/* RETURN VALUE DESCRIPTION: */ +/* none */ +/* */ +/************************************************************************/ +_local_ void +fc_clear_ip_iocbq( +fc_dev_ctl_t *p_dev_ctl, +NODELIST *ndlp) +{ + FC_BRD_INFO * binfo; + RING * rp; + IOCBQ * xmitiq, *next; + IOCB * icmd; + Q tmpq; + fcipbuf_t * p_mbuf; + fcipbuf_t * m_net; + int i; + ULP_BDE64 * bpl; + MATCHMAP * bmp; + + binfo = &BINFO; + /* Clear out all commands in the iocb queue for this RPI */ + rp = &binfo->fc_ring[FC_IP_RING]; + tmpq.q_first = NULL; + + /* Get next command from ring xmit queue */ + xmitiq = fc_ringtx_drain(rp); + + while (xmitiq) { + icmd = &xmitiq->iocb; + if (((icmd->ulpCommand == CMD_XMIT_SEQUENCE_CX) || + (icmd->ulpCommand == CMD_XMIT_SEQUENCE64_CX) || + (icmd->ulpCommand == 0)) && + (ndlp == (NODELIST * )xmitiq->info)) { + + /* get mbuf ptr for xmit */ + m_net = (fcipbuf_t * )xmitiq->bp; + if (ndlp->nlp_DID == NameServer_DID) { + if (binfo->fc_flag & FC_SLI2) { + fc_mem_put(binfo, MEM_BPL, (uchar * )xmitiq->bpl); + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + fc_mem_put(binfo, MEM_BUF, (uchar * )m_net); + goto out; + } + + /* Loop thru BDEs and unmap memory pages associated with mbuf */ + if (binfo->fc_flag & FC_SLI2) { + bmp = (MATCHMAP * )xmitiq->bpl; + bpl = (ULP_BDE64 * )bmp->virt; + while (bpl && xmitiq->iocb.un.xseq64.bdl.bdeSize) { + fc_bufunmap(p_dev_ctl, (uchar *)getPaddr(bpl->addrHigh, bpl->addrLow), 0, bpl->tus.f.bdeSize); + bpl++; + xmitiq->iocb.un.xseq64.bdl.bdeSize -= sizeof(ULP_BDE64); + } + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + } else { + for (i = 0; i < (int)xmitiq->iocb.ulpBdeCount; i++) { + fc_bufunmap(p_dev_ctl, (uchar *)((ulong)xmitiq->iocb.un.cont[i].bdeAddress), 0, (uint32)xmitiq->iocb.un.cont[i].bdeSize); + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + } + + /* Take care of Continuation IOCBs for this mbuf */ + while ((xmitiq = fc_ringtx_drain(rp)) != NULL) { + icmd = &xmitiq->iocb; + if ((icmd->ulpCommand != CMD_IOCB_CONTINUE_CN) && + (icmd->ulpCommand != CMD_IOCB_CONTINUE64_CN)) + break; + /* Loop thru BDEs and unmap memory pages associated with IOCB */ + for (i = 0; i < (int)xmitiq->iocb.ulpBdeCount; i++) { + if (binfo->fc_flag & FC_SLI2) + fc_bufunmap(p_dev_ctl, (uchar *)getPaddr(xmitiq->iocb.un.cont64[i].addrHigh, xmitiq->iocb.un.cont64[i].addrLow), 0, xmitiq->iocb.un.cont64[i].tus.f.bdeSize); + else + fc_bufunmap(p_dev_ctl, (uchar *) ((ulong)xmitiq->iocb.un.cont[i].bdeAddress), 0, (uint32)xmitiq->iocb.un.cont[i].bdeSize); + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + } + + p_mbuf = fcnextdata(m_net); + fcnextdata(m_net) = 0; + fcfreehandle(p_dev_ctl, m_net); + m_freem(m_net); + + if (p_mbuf) { + /* free mbuf */ + fcfreehandle(p_dev_ctl, p_mbuf); + m_freem(p_mbuf); + } + + } else { + /* Queue this iocb to the temporary queue */ + if (tmpq.q_first) { + ((IOCBQ * )tmpq.q_last)->q = (uchar * )xmitiq; + tmpq.q_last = (uchar * )xmitiq; + } else { + tmpq.q_first = (uchar * )xmitiq; + tmpq.q_last = (uchar * )xmitiq; + } + xmitiq->q = NULL; + + xmitiq = fc_ringtx_drain(rp); + } + } + +out: + /* Put the temporary queue back in the IP iocb queue */ + xmitiq = (IOCBQ * )tmpq.q_first; + while (xmitiq) { + next = (IOCBQ * )xmitiq->q; + fc_ringtx_put(rp, xmitiq); + xmitiq = next; + } + + return; +} /* End fc_clear_ip_iocbq */ + + +/**************************************************/ +/** fc_fanovery **/ +/** **/ +/** This routine will recover after a FAN rcvd **/ +/**************************************************/ +_static_ int +fc_fanovery( +fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + NODELIST * ndlp; + NODELIST * firstndlp; + MAILBOXQ * mb; + int j, addrauth; + D_ID did; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + /* Device Discovery Started */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0200, /* ptr to msg structure */ + fc_mes0200, /* ptr to msg */ + fc_msgBlk0200.msgPreambleStr); /* begin & end varargs */ + binfo->fc_ffstate = FC_LOOP_DISC; + binfo->fc_nlp_cnt = 0; + binfo->fc_flag &= ~(FC_NLP_MORE | FC_DELAY_PLOGI); + + firstndlp = 0; + addrauth = 0; + /* Next, lets seed the nodeList with our ALPAmap */ + if (binfo->fc_topology == TOPOLOGY_LOOP) { + if (binfo->alpa_map[0]) { + for (j = 1; j <= binfo->alpa_map[0]; j++) { + if (((binfo->fc_myDID & 0xff) == binfo->alpa_map[j]) || + (binfo->alpa_map[j] == 0)) + continue; + /* Skip if the node is already in the node table */ + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, binfo->alpa_map[j]))) { + ndlp->nlp_DID = binfo->alpa_map[j]; + /* Mark slot for address authentication */ + ndlp->nlp_action |= NLP_DO_ADDR_AUTH; + addrauth++; + continue; + } + if((ndlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP))) { + fc_bzero((void *)ndlp, sizeof(NODELIST)); + ndlp->sync = binfo->fc_sync; + ndlp->capabilities = binfo->fc_capabilities; + ndlp->nlp_DID = binfo->alpa_map[j]; + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + else + continue; + + ndlp->nlp_action |= NLP_DO_DISC_START; + if (firstndlp == 0) + firstndlp = ndlp; + } + } else { + /* No alpamap, so try all alpa's */ + for (j = 0; j < FC_MAXLOOP; j++) { + int index; + + if (clp[CFG_SCAN_DOWN].a_current) + index = FC_MAXLOOP - j - 1; + else + index = j; + if ((binfo->fc_myDID & 0xff) == staticAlpaArray[index]) + continue; + /* Skip if the node is already in the node table */ + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, staticAlpaArray[index]))) { + /* Mark slot for address authentication */ + ndlp->nlp_action |= NLP_DO_ADDR_AUTH; + ndlp->nlp_DID = staticAlpaArray[index]; + addrauth++; + continue; + } + if((ndlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP))) { + fc_bzero((void *)ndlp, sizeof(NODELIST)); + ndlp->sync = binfo->fc_sync; + ndlp->capabilities = binfo->fc_capabilities; + ndlp->nlp_DID = staticAlpaArray[index]; + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + else + continue; + ndlp->nlp_action |= NLP_DO_DISC_START; + if (firstndlp == 0) + firstndlp = ndlp; + } + } + + /* Next mark ALL unmarked local nodes for Authentication */ + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + + /* Skip over Fabric nodes, myself, and nodes partially logged in */ + if ((ndlp->nlp_DID == binfo->fc_myDID) || + (ndlp->nlp_type & NLP_FABRIC) || + (ndlp->nlp_action & (NLP_DO_DISC_START | NLP_DO_ADDR_AUTH))) { + ndlp = (NODELIST *)ndlp->nlp_listp_next; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + continue; + } + + /* If it is a local node */ + did.un.word = ndlp->nlp_DID; + did.un.b.domain = 0; + did.un.b.area = 0; + if (fc_matchdid(binfo, ndlp, did.un.word)) { + /* Mark slot for address authentication */ + ndlp->nlp_action |= NLP_DO_ADDR_AUTH; + addrauth++; + } + ndlp = (NODELIST *)ndlp->nlp_listp_next; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + + if (addrauth) { + fc_nextauth(p_dev_ctl, fc_max_els_sent); + return(0); + } else { + if (firstndlp) { + /* We can start discovery right now */ + fc_nextdisc(p_dev_ctl, fc_max_els_sent); + return(0); + } + } + } + + /* This should turn off DELAYED ABTS for ELS timeouts */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX))) { + fc_set_slim(binfo, (MAILBOX * )mb, 0x052198, 0); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + + /* This is at init, clear la */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + binfo->fc_ffstate = FC_CLEAR_LA; + fc_clear_la(binfo, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } else { + binfo->fc_ffstate = FC_ERROR; + /* Device Discovery completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0201, /* ptr to msg structure */ + fc_mes0201, /* ptr to msg */ + fc_msgBlk0201.msgPreambleStr); /* begin & end varargs */ + } + + if(FABRICTMO) { + fc_clk_can(p_dev_ctl, FABRICTMO); + FABRICTMO = 0; + } + return(0); +} /* End fc_fanovery */ + + +/**************************************************/ +/** fc_discovery **/ +/** **/ +/** This routine will find devices in network **/ +/**************************************************/ +_static_ int +fc_discovery( +fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + NODELIST * ndlp; + NODELIST * new_ndlp; + NODELIST * firstndlp; + MAILBOXQ * mb; + int j, addrauth; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + /* Device Discovery Started */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0202, /* ptr to msg structure */ + fc_mes0202, /* ptr to msg */ + fc_msgBlk0202.msgPreambleStr); /* begin & end varargs */ + + binfo->fc_ffstate = FC_LOOP_DISC; + binfo->fc_nlp_cnt = 0; + binfo->fc_flag &= ~(FC_NLP_MORE | FC_DELAY_PLOGI); + + /* If this is not our first time doing discovery and we don't have + * a new myDID, then rediscovery (address authentication) is appropriate. + */ + if ((p_dev_ctl->init_eventTag) && (binfo->fc_prevDID == binfo->fc_myDID)) { + /* do rediscovery on the loop */ + addrauth = fc_addrauth(p_dev_ctl); + } else { + addrauth = 0; + p_dev_ctl->init_eventTag = 1; + /* First make sure all nodes in nlplist are free */ + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + new_ndlp = (NODELIST *)ndlp->nlp_listp_next; + + /* Skip over FABRIC nodes and myself */ + if ((ndlp->nlp_DID == binfo->fc_myDID) || + (ndlp->nlp_type & NLP_FABRIC)) { + ndlp = new_ndlp; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + continue; + } + + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + ndlp->nlp_action |= NLP_DO_DISC_START; + + ndlp = new_ndlp; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + } + binfo->fc_flag &= ~FC_SCSI_RLIP; + + /* If FCP is not enabled, go right to CLEAR_LA */ + if(!(clp[CFG_FCP_ON].a_current)) { + if (addrauth) { + /* Start authentication */ + fc_nextauth(p_dev_ctl, fc_max_els_sent); + return(0); + } + /* Nothing to discover, so goto CLEAR_LA */ + goto cla; + } + + firstndlp = 0; + + /* If FC_FABRIC is set, we need to do some NameServer stuff + * to seed the nodeList with additional entries. + */ + if (binfo->fc_flag & FC_FABRIC) { + /* We can LOGIN to the NameServer first */ + fc_els_cmd(binfo, ELS_CMD_PLOGI, (void *)NameServer_DID, + (uint32)0, (ushort)0, (NODELIST *)0); + if(fc_fdmi_on) { + /* HBA Mgmt */ + fc_els_cmd(binfo, ELS_CMD_PLOGI, (void *)FDMI_DID, + (uint32)0, (ushort)0, (NODELIST *)0); + } + return(0); + } + + /* No Fabric, just seed the nodeList with our ALPAmap */ + if (binfo->fc_topology == TOPOLOGY_LOOP) { + if (binfo->alpa_map[0]) { + for (j = 1; j <= binfo->alpa_map[0]; j++) { + if (((binfo->fc_myDID & 0xff) == binfo->alpa_map[j]) || + (binfo->alpa_map[j] == 0)) + continue; + /* Skip if the node is already marked address authentication */ + if((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, binfo->alpa_map[j]))) { + if(ndlp->nlp_action & (NLP_DO_ADDR_AUTH | NLP_DO_DISC_START)) { + ndlp->nlp_DID = binfo->alpa_map[j]; + if (firstndlp == 0) + firstndlp = ndlp; + continue; + } + } + else { + if((ndlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP))) { + fc_bzero((void *)ndlp, sizeof(NODELIST)); + ndlp->sync = binfo->fc_sync; + ndlp->capabilities = binfo->fc_capabilities; + ndlp->nlp_DID = binfo->alpa_map[j]; + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + else + continue; + } + ndlp->nlp_action |= NLP_DO_DISC_START; + if (firstndlp == 0) + firstndlp = ndlp; + } + } else { + /* No alpamap, so try all alpa's */ + for (j = 0; j < FC_MAXLOOP; j++) { + int index; + + if (clp[CFG_SCAN_DOWN].a_current) + index = FC_MAXLOOP - j - 1; + else + index = j; + if ((binfo->fc_myDID & 0xff) == staticAlpaArray[index]) + continue; + /* Skip if the node is already marked address authentication */ + if((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, staticAlpaArray[index]))) { + if(ndlp->nlp_action & (NLP_DO_ADDR_AUTH | NLP_DO_DISC_START)) { + ndlp->nlp_DID = staticAlpaArray[index]; + if (firstndlp == 0) + firstndlp = ndlp; + continue; + } + } + else { + if((ndlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP))) { + fc_bzero((void *)ndlp, sizeof(NODELIST)); + ndlp->sync = binfo->fc_sync; + ndlp->capabilities = binfo->fc_capabilities; + ndlp->nlp_DID = staticAlpaArray[index]; + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + else + continue; + } + ndlp->nlp_action |= NLP_DO_DISC_START; + if (firstndlp == 0) + firstndlp = ndlp; + } + } + } + /* Device Discovery continues */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0203, /* ptr to msg structure */ + fc_mes0203, /* ptr to msg */ + fc_msgBlk0203.msgPreambleStr, /* begin varargs */ + (ulong)firstndlp, + binfo->fc_ffstate); /* end varargs */ + if (addrauth) { + /* Start authentication */ + if(fc_nextauth(p_dev_ctl, fc_max_els_sent)) + return(0); + } + + if (firstndlp) { + /* We can start discovery right now */ + fc_nextdisc(p_dev_ctl, fc_max_els_sent); + return(0); + } + else { + /* Make sure no nodes are marked for discovery */ + /* go through all nodes in nlplist */ + ndlp = binfo->fc_nlpbind_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + if (ndlp->nlp_action & (NLP_DO_ADDR_AUTH | NLP_DO_DISC_START)) + ndlp->nlp_action &= ~(NLP_DO_ADDR_AUTH | NLP_DO_DISC_START); + ndlp = (NODELIST *)ndlp->nlp_listp_next; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + } + +cla: + /* This should turn off DELAYED ABTS for ELS timeouts */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX))) { + fc_set_slim(binfo, (MAILBOX * )mb, 0x052198, 0); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + + /* This is at init, clear la */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + binfo->fc_ffstate = FC_CLEAR_LA; + fc_clear_la(binfo, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } else { + binfo->fc_ffstate = FC_ERROR; + /* Device Discovery completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0204, /* ptr to msg structure */ + fc_mes0204, /* ptr to msg */ + fc_msgBlk0204.msgPreambleStr); /* begin & end varargs */ + } + if(FABRICTMO) { + fc_clk_can(p_dev_ctl, FABRICTMO); + FABRICTMO = 0; + } + return(0); +} /* End fc_discovery */ + + +/**************************************************/ +/** fc_addrauth **/ +/** **/ +/** This routine will validate NODELIST entries **/ +/**************************************************/ +_local_ int +fc_addrauth( +fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + NODELIST * ndlp; + NODELIST * new_ndlp; + int cnt; + int cnt1, cnt2; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + binfo->fc_nlp_cnt = 0; + binfo->fc_flag &= ~FC_NLP_MORE; + cnt = 0; + cnt1 = 0; + cnt2 = 0; + + /* go through all nodes in nlplist */ + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + new_ndlp = (NODELIST *)ndlp->nlp_listp_next; + + /* Skip over Fabric nodes, myself, and nodes partially logged in */ + if ((ndlp->nlp_DID == binfo->fc_myDID) || + (ndlp->nlp_type & NLP_FABRIC)) { + ndlp = new_ndlp; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + continue; + } + + if ((ndlp->nlp_type & NLP_FCP_TARGET) && + ((!clp[CFG_USE_ADISC].a_current) || (ndlp->nlp_Rpi == 0) || + (binfo->fc_flag & FC_SCSI_RLIP))) { + /* Force regular discovery on this node */ + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + ndlp->nlp_action |= NLP_DO_DISC_START; + cnt1++; + } else { + if ((ndlp->nlp_type & NLP_IP_NODE) && (ndlp->nlp_Rpi == 0)) { + /* Force regular discovery on this node */ + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + ndlp->nlp_action |= NLP_DO_DISC_START; + cnt2++; + } else { + /* Mark slot for address authentication */ + ndlp->nlp_action |= NLP_DO_ADDR_AUTH; + cnt++; + } + } + ndlp = new_ndlp; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + + /* Device Discovery authentication */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0205, /* ptr to msg structure */ + fc_mes0205, /* ptr to msg */ + fc_msgBlk0205.msgPreambleStr, /* begin varargs */ + cnt, + cnt1, + cnt2); /* end varargs */ + return(cnt); +} /* End fc_addrauth */ + + +/**************************************************/ +/** fc_freebufq **/ +/** **/ +/** This routine will free a iocb cmd block and **/ +/** all associated memory. **/ +/**************************************************/ +_static_ void +fc_freebufq( +fc_dev_ctl_t *p_dev_ctl, +RING *rp, +IOCBQ *xmitiq) +{ + FC_BRD_INFO * binfo; + fcipbuf_t * p_mbuf; + fcipbuf_t * m_net; + NODELIST * ndlp; + ULP_BDE64 * bpl; + MATCHMAP * bmp; + int i; + + binfo = &BINFO; + switch (xmitiq->iocb.ulpCommand) { + case 0: + case CMD_XMIT_BCAST_CN: /* process xmit completion */ + case CMD_XMIT_BCAST_CX: + case CMD_XMIT_SEQUENCE_CX: + case CMD_XMIT_BCAST64_CN: /* process xmit completion */ + case CMD_XMIT_BCAST64_CX: + case CMD_XMIT_SEQUENCE64_CX: + /* get mbuf ptr for xmit */ + m_net = (fcipbuf_t * )xmitiq->bp; + ndlp = (NODELIST * ) xmitiq->info; + + /* Loop thru BDEs and unmap memory pages associated with mbuf */ + if (binfo->fc_flag & FC_SLI2) { + bmp = (MATCHMAP * )xmitiq->bpl; + if(bmp) { + bpl = (ULP_BDE64 * )bmp->virt; + while (bpl && xmitiq->iocb.un.xseq64.bdl.bdeSize) { + fc_bufunmap(p_dev_ctl, (uchar *)getPaddr(bpl->addrHigh, bpl->addrLow), 0, bpl->tus.f.bdeSize); + bpl++; + xmitiq->iocb.un.xseq64.bdl.bdeSize -= sizeof(ULP_BDE64); + } + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + } else { + for (i = 0; i < (int)xmitiq->iocb.ulpBdeCount; i++) { + fc_bufunmap(p_dev_ctl, (uchar *)((ulong)xmitiq->iocb.un.cont[i].bdeAddress), 0, (uint32)xmitiq->iocb.un.cont[i].bdeSize); + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + } + + if (ndlp && (ndlp->nlp_DID == NameServer_DID)) { + fc_mem_put(binfo, MEM_BUF, (uchar * )m_net); + } else { + /* free mbuf */ + p_mbuf = fcnextdata(m_net); + fcnextdata(m_net) = 0; + fcfreehandle(p_dev_ctl, m_net); + m_freem(m_net); + if (p_mbuf) { + fcfreehandle(p_dev_ctl, p_mbuf); + m_freem(p_mbuf); + } + } + break; + + case CMD_IOCB_CONTINUE_CN: + case CMD_IOCB_CONTINUE64_CN: + /* This is valid only for the IP ring, not the ELS ring */ + if (rp->fc_ringno == FC_ELS_RING) + break; + /* Loop thru BDEs and unmap memory pages associated with IOCB */ + for (i = 0; i < (int)xmitiq->iocb.ulpBdeCount; i++) { + if (binfo->fc_flag & FC_SLI2) + fc_bufunmap(p_dev_ctl, (uchar *)getPaddr(xmitiq->iocb.un.cont64[i].addrHigh, xmitiq->iocb.un.cont64[i].addrLow), 0, xmitiq->iocb.un.cont64[i].tus.f.bdeSize); + else + fc_bufunmap(p_dev_ctl, (uchar *)((ulong)xmitiq->iocb.un.cont[i].bdeAddress), 0, (uint32)xmitiq->iocb.un.cont[i].bdeSize); + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + break; + + case CMD_XMIT_ELS_RSP_CX: + case CMD_XMIT_ELS_RSP64_CX: + if (xmitiq->bp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )xmitiq->bp); + } + if (binfo->fc_flag & FC_SLI2) { + fc_mem_put(binfo, MEM_BPL, (uchar * )xmitiq->bpl); + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + break; + + case CMD_ELS_REQUEST_CR: + case CMD_ELS_REQUEST64_CR: + if (xmitiq->bp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )xmitiq->bp); + } + if (xmitiq->info) { + fc_mem_put(binfo, MEM_BUF, (uchar * )xmitiq->info); + } + if (binfo->fc_flag & FC_SLI2) { + fc_mem_put(binfo, MEM_BPL, (uchar * )xmitiq->bpl); + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + break; + + case CMD_QUE_RING_BUF_CN: + case CMD_QUE_RING_BUF64_CN: + /* Loop thru BDEs and return MEM_BUFs associated with IOCB */ + for (i = 0; i < (int)xmitiq->iocb.ulpBdeCount; i++) { + MATCHMAP * matp; + + if (binfo->fc_flag & FC_SLI2) + matp = fc_getvaddr(p_dev_ctl, rp, + (uchar * )getPaddr(xmitiq->iocb.un.cont64[i].addrHigh, xmitiq->iocb.un.cont64[i].addrLow)); + else + matp = fc_getvaddr(p_dev_ctl, rp, + (uchar * )((ulong)xmitiq->iocb.un.cont[i].bdeAddress)); + if (matp) { + if (rp->fc_ringno == FC_ELS_RING) { + fc_mem_put(binfo, MEM_BUF, (uchar * )matp); + } + if (rp->fc_ringno == FC_IP_RING) { + p_mbuf = (fcipbuf_t * )matp; + fcnextdata(p_mbuf) = 0; + fcnextpkt(p_mbuf) = 0; + m_freem(p_mbuf); + } + } + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + break; + + case CMD_CREATE_XRI_CX: + case CMD_CREATE_XRI_CR: + default: + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + break; + } +} /* End fc_freebufq */ + + +/**************************************************/ +/** fc_emac_lookup **/ +/** **/ +/** This routine will find an NODELIST entry **/ +/** that matches the destination MAC address. **/ +/** The XID for that entry is returned and rpi **/ +/** is updated with a ptr to the NODELIST entry. **/ +/**************************************************/ +_static_ ushort +fc_emac_lookup( +FC_BRD_INFO *binfo, +uchar *addr, +NODELIST **ndlpp) +{ + int j; + NODELIST * ndlp; + + ndlp = binfo->fc_nlpbind_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + + /* IF portname matches IEEE address, return NODELIST entry */ + if ((ndlp->nlp_portname.IEEE[0] == addr[0])) { + if((ndlp->nlp_state == NLP_SEED) || + ((ndlp->nlp_DID != Bcast_DID) && + ((ndlp->nlp_DID & CT_DID_MASK) == CT_DID_MASK))) { + ndlp = (NODELIST *)ndlp->nlp_listp_next; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + continue; + } + + /* check rest of bytes in address / portname */ + for (j = 1; j < NADDR_LEN; j++) { + if (ndlp->nlp_portname.IEEE[j] != addr[j]) + break; + } + /* do all NADDR_LEN bytes match? */ + if (j == NADDR_LEN) { + if ((ndlp->nlp_portname.nameType == NAME_IEEE) && + (ndlp->nlp_portname.IEEEextMsn == 0) && + (ndlp->nlp_portname.IEEEextLsb == 0)) { + *ndlpp = ndlp; + return(ndlp->nlp_Xri); + } + } + } + ndlp = (NODELIST *)ndlp->nlp_listp_next; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + + /* no match so return 0 */ + + *ndlpp = 0; + return(0); +} /* End fc_emac_lookup */ + + + +/* Put nlp on bind list */ +_static_ int +fc_nlp_bind( +FC_BRD_INFO *binfo, +NODELIST *nlp) +{ + NODELIST *end_nlp; + uint32 data1; + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)nlp->nlp_Rpi & 0xff) ); + /* BIND node tbl */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0903, /* ptr to msg structure */ + fc_mes0903, /* ptr to msg */ + fc_msgBlk0903.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_DID, + nlp->nlp_flag, + data1); /* end varargs */ + /* First take it off any list its on */ + if(nlp->nlp_listp_next) { + if (nlp->nlp_flag & NLP_MAPPED) { + nlp->nlp_time = binfo->nlptimer++; + if (nlp->nlp_time == 0) { + fc_nlpadjust(binfo); + } + nlp->nlp_flag &= ~NLP_MAPPED; + binfo->fc_map_cnt--; + fc_deque(nlp); + } + else if (nlp->nlp_flag & NLP_UNMAPPED) { + nlp->nlp_time = binfo->nlptimer++; + if (nlp->nlp_time == 0) { + fc_nlpadjust(binfo); + } + nlp->nlp_flag &= ~NLP_UNMAPPED; + binfo->fc_unmap_cnt--; + fc_deque(nlp); + } + else if (nlp->nlp_flag & NLP_BIND) { + return(0); /* Already on bind list */ + } + } + + /* Put it at the begining of the bind list */ + binfo->fc_bind_cnt++; + + if(binfo->fc_nlpbind_start == (NODELIST *)&binfo->fc_nlpbind_start) { + nlp->nlp_listp_next = &binfo->fc_nlpbind_start; + binfo->fc_nlpbind_end = nlp; + } + else { + end_nlp = binfo->fc_nlpbind_start; + nlp->nlp_listp_next = end_nlp; + end_nlp->nlp_listp_prev = nlp; + } + binfo->fc_nlpbind_start = nlp;; + nlp->nlp_listp_prev = &binfo->fc_nlpbind_start; + + nlp->nlp_flag |= NLP_BIND; + + return(0); +} + +/* Put nlp on unmap list */ +_static_ int +fc_nlp_unmap( +FC_BRD_INFO *binfo, +NODELIST *nlp) +{ + NODELIST * end_nlp; + RING * rp; + IOCBQ * iocbq; + uint32 data1; + fc_dev_ctl_t * p_dev_ctl; + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)nlp->nlp_Rpi & 0xff) ); + /* UNMAP node tbl */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0904, /* ptr to msg structure */ + fc_mes0904, /* ptr to msg */ + fc_msgBlk0904.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_DID, + nlp->nlp_flag, + data1); /* end varargs */ + /* First take it off any list its on */ + if(nlp->nlp_listp_next) { + if (nlp->nlp_flag & NLP_MAPPED) { + nlp->nlp_time = binfo->nlptimer++; + if (nlp->nlp_time == 0) { + fc_nlpadjust(binfo); + } + nlp->nlp_flag &= ~NLP_MAPPED; + binfo->fc_map_cnt--; + fc_deque(nlp); + } + else if (nlp->nlp_flag & NLP_BIND) { + nlp->nlp_time = binfo->nlptimer++; + if (nlp->nlp_time == 0) { + fc_nlpadjust(binfo); + } + nlp->nlp_flag &= ~NLP_BIND; + binfo->fc_bind_cnt--; + fc_deque(nlp); + /* If we are going from bind to unmapped, check for duplicate + * WWNN on bind list. + */ + /* Missing SP */ + p_dev_ctl = (fc_dev_ctl_t * )(binfo->fc_p_dev_ctl); + + /* Fabric nodes are always mapped by DID only */ + if((nlp->nlp_DID & Fabric_DID_MASK) == Fabric_DID_MASK) + goto out; + + switch(p_dev_ctl->fcp_mapping) { + + case FCP_SEED_DID: + break; + + case FCP_SEED_WWNN: + if((end_nlp = fc_findnode_wwnn(binfo, NLP_SEARCH_BIND, &nlp->nlp_nodename))) { + /* Found one so remove it */ + unsigned long iflag; + end_nlp->nlp_flag &= ~NLP_BIND; + binfo->fc_bind_cnt--; + fc_deque(end_nlp); + /* Look through ELS ring and remove any ELS cmds in progress for rnlp */ + iflag = lpfc_q_disable_lock(p_dev_ctl); + rp = &binfo->fc_ring[FC_ELS_RING]; + iocbq = (IOCBQ * )(rp->fc_txp.q_first); + while (iocbq) { + if ((iocbq->iocb.un.elsreq.remoteID == end_nlp->nlp_DID) || + ((end_nlp->nlp_DID == 0) && + (iocbq->iocb.un.elsreq.remoteID == end_nlp->nlp_oldDID))) { + iocbq->retry = 0xff; /* Mark for abort */ + if((binfo->fc_flag & FC_RSCN_MODE) || + (binfo->fc_ffstate < FC_READY)) { + if((end_nlp->nlp_state >= NLP_PLOGI) && + (end_nlp->nlp_state <= NLP_PRLI)) { + end_nlp->nlp_action &= ~NLP_DO_RSCN; + binfo->fc_nlp_cnt--; + if ((end_nlp->nlp_type & NLP_IP_NODE) && end_nlp->nlp_bp) { + m_freem((fcipbuf_t *)end_nlp->nlp_bp); + end_nlp->nlp_bp = (uchar * )0; + } + } + } + } + iocbq = (IOCBQ * )iocbq->q; + } + lpfc_q_unlock_enable(p_dev_ctl, iflag); + /* In case its on fc_delay_timeout list */ + fc_abort_delay_els_cmd(p_dev_ctl, end_nlp->nlp_DID); + fc_bzero((void *)end_nlp, sizeof(NODELIST)); + fc_mem_put(binfo, MEM_NLP, (uchar *)end_nlp); + } + break; + + case FCP_SEED_WWPN: + if((end_nlp = fc_findnode_wwpn(binfo, NLP_SEARCH_BIND, &nlp->nlp_portname))) { + /* Found one so remove it */ + unsigned long iflag; + end_nlp->nlp_flag &= ~NLP_BIND; + binfo->fc_bind_cnt--; + fc_deque(end_nlp); + /* Look through ELS ring and remove any ELS cmds in progress for rnlp */ + iflag = lpfc_q_disable_lock(p_dev_ctl); + rp = &binfo->fc_ring[FC_ELS_RING]; + iocbq = (IOCBQ * )(rp->fc_txp.q_first); + while (iocbq) { + if ((iocbq->iocb.un.elsreq.remoteID == end_nlp->nlp_DID) || + ((end_nlp->nlp_DID == 0) && (iocbq->iocb.un.elsreq.remoteID == end_nlp->nlp_oldDID))) { + iocbq->retry = 0xff; /* Mark for abort */ + if((binfo->fc_flag & FC_RSCN_MODE) || + (binfo->fc_ffstate < FC_READY)) { + if((end_nlp->nlp_state >= NLP_PLOGI) && + (end_nlp->nlp_state <= NLP_PRLI)) { + end_nlp->nlp_action &= ~NLP_DO_RSCN; + binfo->fc_nlp_cnt--; + if ((end_nlp->nlp_type & NLP_IP_NODE) && end_nlp->nlp_bp) { + m_freem((fcipbuf_t *)end_nlp->nlp_bp); + end_nlp->nlp_bp = (uchar * )0; + } + } + } + } + iocbq = (IOCBQ * )iocbq->q; + } + lpfc_q_unlock_enable(p_dev_ctl, iflag); + /* In case its on fc_delay_timeout list */ + fc_abort_delay_els_cmd(p_dev_ctl, end_nlp->nlp_DID); + fc_bzero((void *)end_nlp, sizeof(NODELIST)); + fc_mem_put(binfo, MEM_NLP, (uchar *)end_nlp); + } + break; + } /* switch */ + } + else if (nlp->nlp_flag & NLP_UNMAPPED) { + return(0); /* Already on unmap list */ + } + } + +out: + /* Put it on the end of the unmapped list */ + binfo->fc_unmap_cnt++; + end_nlp = binfo->fc_nlpunmap_end; + fc_enque(nlp, end_nlp); + nlp->nlp_flag |= NLP_UNMAPPED; + return(0); +} + +/* Put nlp on map list */ +_static_ int +fc_nlp_map( +FC_BRD_INFO *binfo, +NODELIST *nlp) +{ + NODELIST *end_nlp; + uint32 data1; + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)nlp->nlp_Rpi & 0xff) ); + /* MAP node tbl */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0905, /* ptr to msg structure */ + fc_mes0905, /* ptr to msg */ + fc_msgBlk0905.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_DID, + nlp->nlp_flag, + data1); /* end varargs */ + /* First take it off any list its on */ + if(nlp->nlp_listp_next) { + if (nlp->nlp_flag & NLP_UNMAPPED) { + nlp->nlp_time = binfo->nlptimer++; + if (nlp->nlp_time == 0) { + fc_nlpadjust(binfo); + } + nlp->nlp_flag &= ~NLP_UNMAPPED; + binfo->fc_unmap_cnt--; + fc_deque(nlp); + } + else if (nlp->nlp_flag & NLP_BIND) { + nlp->nlp_time = binfo->nlptimer++; + if (nlp->nlp_time == 0) { + fc_nlpadjust(binfo); + } + nlp->nlp_flag &= ~NLP_BIND; + binfo->fc_bind_cnt--; + fc_deque(nlp); + } + else if (nlp->nlp_flag & NLP_MAPPED) { + return(0); /* Already on map list */ + } + } + + /* Put it on the end of the mapped list */ + binfo->fc_map_cnt++; + end_nlp = binfo->fc_nlpmap_end; + fc_enque(nlp, end_nlp); + nlp->nlp_flag |= NLP_MAPPED; + return(0); +} + +/**************************************************/ +/** fc_findnode_odid **/ +/** **/ +/** This routine find a node by did **/ +/**************************************************/ +_static_ NODELIST * +fc_findnode_odid( +FC_BRD_INFO *binfo, +uint32 order, +uint32 did) +{ + NODELIST * nlp; + uint32 data1; + + if(order & NLP_SEARCH_UNMAPPED) { + nlp = binfo->fc_nlpunmap_start; + while(nlp != (NODELIST *)&binfo->fc_nlpunmap_start) { + if (fc_matchdid(binfo, nlp, did)) { + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)nlp->nlp_Rpi & 0xff) ); + /* FIND node DID unmapped */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0906, /* ptr to msg structure */ + fc_mes0906, /* ptr to msg */ + fc_msgBlk0906.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_DID, + nlp->nlp_flag, + data1); /* end varargs */ + return(nlp); + } + nlp = (NODELIST *)nlp->nlp_listp_next; + } + } + if(order & NLP_SEARCH_MAPPED) { + nlp = binfo->fc_nlpmap_start; + while(nlp != (NODELIST *)&binfo->fc_nlpmap_start) { + if (fc_matchdid(binfo, nlp, did)) { + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)nlp->nlp_Rpi & 0xff) ); + /* FIND node did mapped */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0907, /* ptr to msg structure */ + fc_mes0907, /* ptr to msg */ + fc_msgBlk0907.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_DID, + nlp->nlp_flag, + data1); /* end varargs */ + return(nlp); + } + nlp = (NODELIST *)nlp->nlp_listp_next; + } + } + if(order & NLP_SEARCH_BIND) { + nlp = binfo->fc_nlpbind_start; + while(nlp != (NODELIST *)&binfo->fc_nlpbind_start) { + if (fc_matchdid(binfo, nlp, did)) { + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)nlp->nlp_Rpi & 0xff) ); + /* FIND node DID bind */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0908, /* ptr to msg structure */ + fc_mes0908, /* ptr to msg */ + fc_msgBlk0908.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_DID, + nlp->nlp_flag, + data1); /* end varargs */ + return(nlp); + } + nlp = (NODELIST *)nlp->nlp_listp_next; + } + } + /* FIND node did NOT FOUND */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0909, /* ptr to msg structure */ + fc_mes0909, /* ptr to msg */ + fc_msgBlk0909.msgPreambleStr, /* begin varargs */ + did, + order); /* end varargs */ + /* no match found */ + return((NODELIST * )0); +} /* End fc_findnode_odid */ + + +/**************************************************/ +/** fc_findnode_scsid **/ +/** **/ +/** This routine find a node by scsid **/ +/**************************************************/ +_static_ NODELIST * +fc_findnode_scsid( +FC_BRD_INFO *binfo, +uint32 order, +uint32 scsid) +{ + NODELIST * nlp; + uint32 data1; + + if(order & NLP_SEARCH_UNMAPPED) { + nlp = binfo->fc_nlpunmap_start; + if(nlp == 0) { + return(0); + } + while(nlp != (NODELIST *)&binfo->fc_nlpunmap_start) { + if ((nlp->nlp_type & NLP_FCP_TARGET) && + (INDEX(nlp->id.nlp_pan, nlp->id.nlp_sid) == scsid)) { + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)scsid & 0xff) ); + /* FIND node scsi_id unmapped */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0910, /* ptr to msg structure */ + fc_mes0910, /* ptr to msg */ + fc_msgBlk0910.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_DID, + nlp->nlp_flag, + data1); /* end varargs */ + return(nlp); + } + nlp = (NODELIST *)nlp->nlp_listp_next; + if(nlp == 0) { + return(0); + } + } + } + if(order & NLP_SEARCH_MAPPED) { + nlp = binfo->fc_nlpmap_start; + if(nlp == 0) { + return(0); + } + while(nlp != (NODELIST *)&binfo->fc_nlpmap_start) { + if ((nlp->nlp_type & NLP_FCP_TARGET) && + (INDEX(nlp->id.nlp_pan, nlp->id.nlp_sid) == scsid)) { + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)scsid & 0xff) ); + /* FIND node scsi_id mapped */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0911, /* ptr to msg structure */ + fc_mes0911, /* ptr to msg */ + fc_msgBlk0911.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_DID, + nlp->nlp_flag, + data1); /* end varargs */ + return(nlp); + } + nlp = (NODELIST *)nlp->nlp_listp_next; + if(nlp == 0) { + return(0); + } + } + } + if(order & NLP_SEARCH_BIND) { + nlp = binfo->fc_nlpbind_start; + if(nlp == 0) { + return(0); + } + while(nlp != (NODELIST *)&binfo->fc_nlpbind_start) { + if ((nlp->nlp_type & NLP_FCP_TARGET) && + (INDEX(nlp->id.nlp_pan, nlp->id.nlp_sid) == scsid)) { + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)scsid & 0xff) ); + /* FIND node scsi_id bind */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0912, /* ptr to msg structure */ + fc_mes0912, /* ptr to msg */ + fc_msgBlk0912.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_DID, + nlp->nlp_flag, + data1); /* end varargs */ + return(nlp); + } + nlp = (NODELIST *)nlp->nlp_listp_next; + if(nlp == 0) { + return(0); + } + } + } + /* FIND node scsi_id NOT FOUND */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0913, /* ptr to msg structure */ + fc_mes0913, /* ptr to msg */ + fc_msgBlk0913.msgPreambleStr, /* begin varargs */ + scsid, + order); /* end varargs */ + /* no match found */ + return((NODELIST * )0); +} /* End fc_findnode_scsid */ + + +/**************************************************/ +/** fc_findnode_wwnn **/ +/** **/ +/** This routine find a node by WWNN **/ +/**************************************************/ +_static_ NODELIST * +fc_findnode_wwnn( +FC_BRD_INFO *binfo, +uint32 order, +NAME_TYPE * wwnn) +{ + NODELIST * nlp; + uint32 data1; + + if(order & NLP_SEARCH_UNMAPPED) { + nlp = binfo->fc_nlpunmap_start; + while(nlp != (NODELIST *)&binfo->fc_nlpunmap_start) { + if(fc_geportname(&nlp->nlp_nodename, wwnn) == 2) { + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)nlp->nlp_Rpi & 0xff) ); + /* FIND node wwnn unmapped */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0914, /* ptr to msg structure */ + fc_mes0914, /* ptr to msg */ + fc_msgBlk0914.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_DID, + nlp->nlp_flag, + data1); /* end varargs */ + return(nlp); + } + nlp = (NODELIST *)nlp->nlp_listp_next; + } + } + if(order & NLP_SEARCH_MAPPED) { + nlp = binfo->fc_nlpmap_start; + while(nlp != (NODELIST *)&binfo->fc_nlpmap_start) { + if(fc_geportname(&nlp->nlp_nodename, wwnn) == 2) { + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)nlp->nlp_Rpi & 0xff) ); + /* FIND node wwnn mapped */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0915, /* ptr to msg structure */ + fc_mes0915, /* ptr to msg */ + fc_msgBlk0915.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_DID, + nlp->nlp_flag, + data1); /* end varargs */ + return(nlp); + } + nlp = (NODELIST *)nlp->nlp_listp_next; + } + } + if(order & NLP_SEARCH_BIND) { + nlp = binfo->fc_nlpbind_start; + while(nlp != (NODELIST *)&binfo->fc_nlpbind_start) { + if(fc_geportname(&nlp->nlp_nodename, wwnn) == 2) { + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)nlp->nlp_Rpi & 0xff) ); + /* FIND node wwnn bind */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0916, /* ptr to msg structure */ + fc_mes0916, /* ptr to msg */ + fc_msgBlk0916.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_DID, + nlp->nlp_flag, + data1); /* end varargs */ + return(nlp); + } + nlp = (NODELIST *)nlp->nlp_listp_next; + } + } + /* FIND node wwnn NOT FOUND */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0918, /* ptr to msg structure */ + fc_mes0918, /* ptr to msg */ + fc_msgBlk0918.msgPreambleStr, /* begin varargs */ + order); /* end varargs */ + /* no match found */ + return((NODELIST * )0); +} /* End fc_findnode_wwnn */ + + + +/**************************************************/ +/** fc_findnode_wwpn **/ +/** **/ +/** This routine find a node by WWPN **/ +/**************************************************/ +_static_ NODELIST * +fc_findnode_wwpn( +FC_BRD_INFO *binfo, +uint32 order, +NAME_TYPE * wwpn) +{ + NODELIST * nlp; + uint32 data1; + + if(order & NLP_SEARCH_UNMAPPED) { + nlp = binfo->fc_nlpunmap_start; + while(nlp != (NODELIST *)&binfo->fc_nlpunmap_start) { + if(fc_geportname(&nlp->nlp_portname, wwpn) == 2) { + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)nlp->nlp_Rpi & 0xff) ); + /* FIND node wwpn unmapped */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0919, /* ptr to msg structure */ + fc_mes0919, /* ptr to msg */ + fc_msgBlk0919.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_DID, + nlp->nlp_flag, + data1); /* end varargs */ + return(nlp); + } + nlp = (NODELIST *)nlp->nlp_listp_next; + } + } + if(order & NLP_SEARCH_MAPPED) { + nlp = binfo->fc_nlpmap_start; + while(nlp != (NODELIST *)&binfo->fc_nlpmap_start) { + if(fc_geportname(&nlp->nlp_portname, wwpn) == 2) { + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)nlp->nlp_Rpi & 0xff) ); + /* FIND node wwpn mapped */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0920, /* ptr to msg structure */ + fc_mes0920, /* ptr to msg */ + fc_msgBlk0920.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_DID, + nlp->nlp_flag, + data1); /* end varargs */ + return(nlp); + } + nlp = (NODELIST *)nlp->nlp_listp_next; + } + } + if(order & NLP_SEARCH_BIND) { + nlp = binfo->fc_nlpbind_start; + while(nlp != (NODELIST *)&binfo->fc_nlpbind_start) { + if(fc_geportname(&nlp->nlp_portname, wwpn) == 2) { + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)nlp->nlp_Rpi & 0xff) ); + /* FIND node wwpn bind */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0921, /* ptr to msg structure */ + fc_mes0921, /* ptr to msg */ + fc_msgBlk0921.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_DID, + nlp->nlp_flag, + data1); /* end varargs */ + return(nlp); + } + nlp = (NODELIST *)nlp->nlp_listp_next; + } + } + /* FIND node wwpn NOT FOUND */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0922, /* ptr to msg structure */ + fc_mes0922, /* ptr to msg */ + fc_msgBlk0922.msgPreambleStr, /* begin varargs */ + order); /* end varargs */ + /* no match found */ + return((NODELIST * )0); +} /* End fc_findnode_wwpn */ + + +/**************************************************/ +/** fc_findnode_oxri **/ +/** **/ +/** This routine find a node by OXri **/ +/**************************************************/ +_static_ NODELIST * +fc_findnode_oxri( +FC_BRD_INFO *binfo, +uint32 order, +uint32 xri) +{ + NODELIST * nlp; + uint32 data1; + + if(order & NLP_SEARCH_UNMAPPED) { + nlp = binfo->fc_nlpunmap_start; + while(nlp != (NODELIST *)&binfo->fc_nlpunmap_start) { + if (nlp->nlp_Xri == xri) { + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)nlp->nlp_Rpi & 0xff) ); + /* FIND node xri unmapped */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0923, /* ptr to msg structure */ + fc_mes0923, /* ptr to msg */ + fc_msgBlk0923.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_Xri, + nlp->nlp_flag, + data1); /* end varargs */ + return(nlp); + } + nlp = (NODELIST *)nlp->nlp_listp_next; + } + } + if(order & NLP_SEARCH_MAPPED) { + nlp = binfo->fc_nlpmap_start; + while(nlp != (NODELIST *)&binfo->fc_nlpmap_start) { + if (nlp->nlp_Xri == xri) { + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)nlp->nlp_Rpi & 0xff) ); + /* FIND node xri mapped */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0924, /* ptr to msg structure */ + fc_mes0924, /* ptr to msg */ + fc_msgBlk0924.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_Xri, + nlp->nlp_flag, + data1); /* end varargs */ + return(nlp); + } + nlp = (NODELIST *)nlp->nlp_listp_next; + } + } + if(order & NLP_SEARCH_BIND) { + nlp = binfo->fc_nlpbind_start; + while(nlp != (NODELIST *)&binfo->fc_nlpbind_start) { + if (nlp->nlp_Xri == xri) { + + data1 = ( ((uint32)nlp->nlp_state << 24) | + ((uint32)nlp->nlp_action << 16) | + ((uint32)nlp->nlp_type << 8) | + ((uint32)nlp->nlp_Rpi & 0xff) ); + /* FIND node xri bind */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0925, /* ptr to msg structure */ + fc_mes0925, /* ptr to msg */ + fc_msgBlk0925.msgPreambleStr, /* begin varargs */ + (ulong)nlp, + nlp->nlp_Xri, + nlp->nlp_flag, + data1); /* end varargs */ + return(nlp); + } + nlp = (NODELIST *)nlp->nlp_listp_next; + } + } + /* FIND node xri NOT FOUND */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0926, /* ptr to msg structure */ + fc_mes0926, /* ptr to msg */ + fc_msgBlk0926.msgPreambleStr, /* begin varargs */ + xri, + order); /* end varargs */ + /* no match found */ + return((NODELIST * )0); +} /* End fc_findnode_oxri */ + +/* Put nlp in PLOGI state */ +_static_ int +fc_nlp_logi( +FC_BRD_INFO *binfo, +NODELIST *nlp, +NAME_TYPE *wwpnp, +NAME_TYPE *wwnnp) +{ + fc_dev_ctl_t * p_dev_ctl; + NODELIST * rnlp; + + if (nlp->nlp_flag & NLP_UNMAPPED) { + nlp->nlp_flag &= ~NLP_UNMAPPED; + binfo->fc_unmap_cnt--; + fc_deque(nlp); + } + else if (nlp->nlp_flag & NLP_BIND) { + nlp->nlp_flag &= ~NLP_BIND; + binfo->fc_bind_cnt--; + fc_deque(nlp); + } + else if (nlp->nlp_flag & NLP_MAPPED) { + nlp->nlp_flag &= ~NLP_MAPPED; + binfo->fc_map_cnt--; + fc_deque(nlp); + } + + p_dev_ctl = (fc_dev_ctl_t * )(binfo->fc_p_dev_ctl); + + /* Fabric nodes are always mapped by DID only */ + if((nlp->nlp_DID & Fabric_DID_MASK) == Fabric_DID_MASK) + goto out; + + switch(p_dev_ctl->fcp_mapping) { + case FCP_SEED_DID: + fc_bcopy(wwpnp, &nlp->nlp_portname, sizeof(NAME_TYPE)); + fc_bcopy(wwnnp, &nlp->nlp_nodename, sizeof(NAME_TYPE)); + break; + case FCP_SEED_WWNN: + /* Check to see if this WWNN already has a binding setup */ + if(fc_geportname(&nlp->nlp_nodename, wwnnp) != 2) { + if (nlp->nlp_type & NLP_SEED_WWNN) { + /* Get a new entry to save old binding info */ + if((rnlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP))) { + fc_bzero((void *)rnlp, sizeof(NODELIST)); + rnlp->nlp_state = NLP_LIMBO; + fc_nlp_swapinfo(binfo, nlp, rnlp); + fc_nlp_bind(binfo, rnlp); + } + } + /* Search for existing entry with that binding */ + if((rnlp = fc_findnode_wwnn(binfo, NLP_SEARCH_ALL, wwnnp)) && + (rnlp->nlp_type & NLP_SEED_WWNN)) { + + if (rnlp->nlp_flag & NLP_MAPPED) { + rnlp->nlp_flag &= ~NLP_MAPPED; + binfo->fc_map_cnt--; + fc_deque(rnlp); + } + else if (rnlp->nlp_flag & NLP_UNMAPPED) { + rnlp->nlp_flag &= ~NLP_UNMAPPED; + binfo->fc_unmap_cnt--; + fc_deque(rnlp); + } + else if (rnlp->nlp_flag & NLP_BIND) { + rnlp->nlp_flag &= ~NLP_BIND; + binfo->fc_bind_cnt--; + fc_deque(rnlp); + } + + /* found, so copy binding info into nlp */ + fc_nlp_swapinfo(binfo, rnlp, nlp); + if(rnlp->nlp_action || (rnlp->nlp_flag & NLP_REQ_SND)) { + fc_nlp_bind(binfo, rnlp); + } + else { + fc_freenode(binfo, rnlp, 1); + } + } + fc_bcopy(wwpnp, &nlp->nlp_portname, sizeof(NAME_TYPE)); + fc_bcopy(wwnnp, &nlp->nlp_nodename, sizeof(NAME_TYPE)); + } + else { + /* DID and WWNN match existing entry */ + fc_bcopy(wwpnp, &nlp->nlp_portname, sizeof(NAME_TYPE)); + } + break; + case FCP_SEED_WWPN: + /* Check to see if this WWPN already has a binding setup */ + if(fc_geportname(&nlp->nlp_portname, wwpnp) != 2) { + if (nlp->nlp_type & NLP_SEED_WWPN) { + /* Get a new entry to save old binding info */ + if((rnlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP))) { + fc_bzero((void *)rnlp, sizeof(NODELIST)); + rnlp->nlp_state = NLP_LIMBO; + fc_nlp_swapinfo(binfo, nlp, rnlp); + fc_nlp_bind(binfo, rnlp); + } + } + /* Search for existing entry with that binding */ + if((rnlp = fc_findnode_wwpn(binfo, NLP_SEARCH_ALL, wwpnp)) && + (rnlp->nlp_type & NLP_SEED_WWPN)) { + + if (rnlp->nlp_flag & NLP_MAPPED) { + rnlp->nlp_flag &= ~NLP_MAPPED; + binfo->fc_map_cnt--; + fc_deque(rnlp); + } + else if (rnlp->nlp_flag & NLP_UNMAPPED) { + rnlp->nlp_flag &= ~NLP_UNMAPPED; + binfo->fc_unmap_cnt--; + fc_deque(rnlp); + } + else if (rnlp->nlp_flag & NLP_BIND) { + rnlp->nlp_flag &= ~NLP_BIND; + binfo->fc_bind_cnt--; + fc_deque(rnlp); + } + /* found, so copy binding info into nlp */ + fc_nlp_swapinfo(binfo, rnlp, nlp); + if(rnlp->nlp_action || (rnlp->nlp_flag & NLP_REQ_SND)) { + fc_nlp_bind(binfo, rnlp); + } + else { + fc_freenode(binfo, rnlp, 1); + } + } +out: + fc_bcopy(wwpnp, &nlp->nlp_portname, sizeof(NAME_TYPE)); + fc_bcopy(wwnnp, &nlp->nlp_nodename, sizeof(NAME_TYPE)); + } + else { + /* DID and WWPN match existing entry */ + fc_bcopy(wwnnp, &nlp->nlp_nodename, sizeof(NAME_TYPE)); + } + break; + } + + nlp->nlp_state = NLP_PLOGI; + fc_nlp_bind(binfo, nlp); + return(0); +} + +_static_ int +fc_nlp_swapinfo( +FC_BRD_INFO *binfo, +NODELIST *old_nlp, +NODELIST *new_nlp) +{ + int index; + + fc_bcopy(&old_nlp->nlp_nodename, &new_nlp->nlp_nodename, sizeof(NAME_TYPE)); + fc_bcopy(&old_nlp->nlp_portname, &new_nlp->nlp_portname, sizeof(NAME_TYPE)); + new_nlp->nlp_type = old_nlp->nlp_type; + new_nlp->id.nlp_pan = old_nlp->id.nlp_pan; + new_nlp->id.nlp_sid = old_nlp->id.nlp_sid; + new_nlp->nlp_targetp = old_nlp->nlp_targetp; + new_nlp->target_scsi_options = old_nlp->target_scsi_options; + new_nlp->capabilities = old_nlp->capabilities; + new_nlp->sync = old_nlp->sync; + + if((old_nlp->nlp_type & NLP_FCP_TARGET) && old_nlp->nlp_targetp != NULL) { + index = INDEX(new_nlp->id.nlp_pan, new_nlp->id.nlp_sid); + if(binfo->device_queue_hash[index].node_ptr && + binfo->device_queue_hash[index].node_ptr->nlp == old_nlp) { + binfo->device_queue_hash[index].node_ptr->nlp = new_nlp; + new_nlp->nlp_targetp = (uchar *)binfo->device_queue_hash[index].node_ptr; + } + } + + old_nlp->nlp_type = 0; + old_nlp->id.nlp_pan = 0; + old_nlp->id.nlp_sid = 0; + old_nlp->nlp_targetp = 0; + old_nlp->sync = binfo->fc_sync; + old_nlp->capabilities = binfo->fc_capabilities; + fc_bzero(&old_nlp->nlp_nodename, sizeof(NAME_TYPE)); + fc_bzero(&old_nlp->nlp_portname, sizeof(NAME_TYPE)); + return(0); +} + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fcscsib.c 999-mjb/drivers/scsi/lpfc/fcscsib.c --- 000-virgin/drivers/scsi/lpfc/fcscsib.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fcscsib.c 2003-11-25 14:18:43.000000000 -0800 @@ -0,0 +1,7611 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#include "fc_os.h" + +#include "fc_hw.h" +#include "fc.h" + +#include "fcdiag.h" +#include "hbaapi.h" +#include "fcfgparm.h" +#include "fcmsg.h" +#include "fc_crtn.h" +#include "fc_ertn.h" /* Environment - external routine definitions */ + +extern clock_t fc_ticks_per_second; +extern fc_dd_ctl_t DD_CTL; +extern iCfgParam icfgparam[]; +extern int lpfc_nethdr; +extern uint32 fcPAGESIZE; +extern uint32 fc_diag_state; +extern int fcinstance[]; + +/* Routine Declaration - Local */ +_local_ void fc_rscndisc_timeout(fc_dev_ctl_t *p_dev_ctl, void *l1, void *l2); +_local_ int fc_ring_txcnt(FC_BRD_INFO *binfo, int flag); +_local_ int fc_ring_txpcnt(FC_BRD_INFO *binfo, int flag); +/* End Routine Declaration - Local */ + +static uchar fcbroadcastaddr[MACADDR_LEN] = +{ + 0xff, 0xff, 0xff, 0xff, 0xff, 0xff +}; + +_static_ int fc_max_ns_retry = 3; +_static_ int fc_inq_hbeat_tmo = 60; +_static_ int fc_inq_sn_tmo = 30; +_static_ int fc_offline_stop_io = 1; +_static_ int fc_max_els_sent = 32; + +#define INQ_LEN 0x100 + +#define RPTLUN_MIN_LEN 0x1000 +#define WD6 (IOCB_WORD_SZ-2) /* IOCB wd 6 */ +#define WD7 (IOCB_WORD_SZ-1) /* IOCB wd 7 */ +/********************************************/ +/** fc_strncmp **/ +/** **/ +/** Compare string 1 to string 2. **/ +/** Compare terminates on count N **/ +/** **/ +/** Return value: **/ +/** Less than 0 = str1 < str2 **/ +/** Zero = str1 egual str2 **/ +/** Greater than 0 = str1 > str2 **/ +/********************************************/ +_forward_ int +fc_strncmp( char *str1, + char *str2, + int cnt) +{ + int c1, c2; + int dif; + + while( cnt--) { + c1 = (int)*str1++ & 0xff; + c2 = (int)*str2++ & 0xff; + if( (c1 | c2) == 0) + return(0); /* strings equal */ + if( (dif = c1 - c2) == 0) + continue; /* chars are equal */ + if( c1 == 0) + return(-1); /* str1 < str2 */ + if( c2 == 0) + return(1); /* str1 > str2 */ + return(dif); + } + return(0); /* strings equal */ +} /* fc_strncmp */ + +/********************************************/ +/* fc_strcpy */ +/* */ +/* Copy str2 to str1. . */ +/* Str2 must be a pointer to a null */ +/* terminated string. It is the caller's */ +/* responsibility to insure that str1 is */ +/* large enough to hold str2. */ +/* */ +/* Return value: */ +/* pointer to str1 */ +/********************************************/ +_static_ char * +fc_strcpy( char *str1, /* dest */ + char *str2) /* src */ +{ + char *temp; + temp = str1; + + while( (*str1++ = *str2++) != '\0') { + continue; + } + return(temp); +} /* fc_strcpy */ + +/************************************************/ +/** fc_setup_ring **/ +/** **/ +/** After ring has been configured, this **/ +/** routine is called to initialize the ring **/ +/************************************************/ +_static_ void +fc_setup_ring( +fc_dev_ctl_t *p_dev_ctl, /* point to dev_ctl area */ +int ring) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + RING * rp; + + binfo = &BINFO; + rp = &binfo->fc_ring[ring]; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + /* set up the watchdog timer control structure section */ + if (!rp->fc_wdt_inited) { + if (ring == FC_FCP_RING) { + if(clp[CFG_LINKDOWN_TMO].a_current) { + rp->fc_ringtmo = clp[CFG_LINKDOWN_TMO].a_current; + } + else { + rp->fc_ringtmo = clp[CFG_LINKDOWN_TMO].a_default; + } + } else { + rp->fc_ringtmo = RING_TMO_DFT; + } + RINGTMO = 0; + rp->fc_wdt_inited = 1; + } +} /* End fc_setup_ring */ + +/************************************************************************/ +/* */ +/* NAME: fc_closewait */ +/* */ +/* FUNCTION: Adapter Driver Wait for Close Routine */ +/* This routine waits for the adapter to finish all requests */ +/* */ +/* EXECUTION ENVIRONMENT: */ +/* This routine can be called by a process. */ +/* */ +/* INPUTS: */ +/* fc_dev_ctl_t - adapter unique data structure (one per adapter) */ +/* */ +/* RETURN VALUE DESCRIPTION: none */ +/* */ +/* EXTERNAL PROCEDURES CALLED: */ +/* disable_lock lock_enable */ +/* */ +/************************************************************************/ +_static_ void +fc_closewait( +fc_dev_ctl_t *p_dev_ctl) /* point to dev_ctl area */ +{ + FC_BRD_INFO * binfo; + int ipri; + struct buf *bp, *nextbp; + + binfo = &BINFO; + + ipri = disable_lock(FC_LVL, &CMD_LOCK); + + /* wait for all operations to complete */ + while ((fc_ring_txcnt(binfo, FC_FCP_RING) + || fc_ring_txpcnt(binfo, FC_FCP_RING) + || binfo->fc_mbox.q_cnt)) { + unlock_enable(ipri, &CMD_LOCK); + DELAYMSctx(1000); /* delay 1 second */ + ipri = disable_lock(FC_LVL, &CMD_LOCK); + } + + /* Clear out timeout queue */ + for (bp = p_dev_ctl->timeout_head; bp != NULL; ) { + nextbp = bp->av_forw; + bp->b_error = ETIMEDOUT; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + FCSTATCTR.fcpScsiTmo++; + fc_do_iodone(bp); + bp = nextbp; + } + p_dev_ctl->timeout_head = NULL; + p_dev_ctl->timeout_count = 0; + + /* update the device state */ + binfo->fc_open_count &= ~FC_FCP_OPEN; + if (binfo->fc_open_count == 0) + p_dev_ctl->device_state = CLOSED; + + unlock_enable(ipri, &CMD_LOCK); + return; + +} /* End fc_closewait */ + + +/* + * This routine copies data from src + * then potentially swaps the destination to big endian. + * Assumes cnt is a multiple of sizeof(uint32). + */ +_static_ void +fc_pcimem_bcopy( +uint32 *src, +uint32 *dest, +uint32 cnt) +{ + uint32 ldata; + int i; + + for (i = 0; i < (int)cnt; i += sizeof(uint32)) { + ldata = *src++; + ldata = PCIMEM_LONG(ldata); + *dest++ = ldata; + } +} /* End fc_pcimem_bcopy */ + + +#define SCSI3_PERSISTENT_RESERVE_IN 0x5e + +/******************************************************/ +/** handle_fcp_event **/ +/** **/ +/** Description: Process an FCP Rsp Ring completion **/ +/** **/ +/******************************************************/ +_static_ void +handle_fcp_event( +fc_dev_ctl_t *p_dev_ctl, +RING *rp, +IOCBQ *temp) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + IOCB * cmd; + fc_buf_t * fcptr; + struct buf * bp; + T_SCSIBUF * sbp; + FCP_RSP * fcpRsp; + uint32 * lp, i, qfull; + dvi_t * dev_ptr, * next_dev_ptr; + NODELIST * ndlp; + + /* called from host_interrupt() to process R2ATT */ + binfo = &BINFO; + cmd = &temp->iocb; + qfull = 0; + ndlp = 0; + + /* look up FCP complete by IoTag */ + if ((fcptr = fc_deq_fcbuf_active(rp, cmd->ulpIoTag)) == NULL) { + /* ERROR: completion with missing FCP command */ + if (!((cmd->ulpStatus == IOSTAT_LOCAL_REJECT) && + ((cmd->un.grsp.perr.statLocalError == IOERR_INVALID_RPI) || + (cmd->un.grsp.perr.statLocalError == IOERR_ABORT_IN_PROGRESS) || + (cmd->un.grsp.perr.statLocalError == IOERR_SEQUENCE_TIMEOUT) || + (cmd->un.grsp.perr.statLocalError == IOERR_ABORT_REQUESTED)))) { + /* Stray FCP completion */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0720, /* ptr to msg structure */ + fc_mes0720, /* ptr to msg */ + fc_msgBlk0720.msgPreambleStr, /* begin varargs */ + cmd->ulpCommand, + cmd->ulpIoTag, + cmd->ulpStatus, + cmd->un.ulpWord[4]); /* end varargs */ + } + + FCSTATCTR.fcpStrayCmpl++; + return; + } + FCSTATCTR.fcpCmpl++; + + dev_ptr = fcptr->dev_ptr; + dev_ptr->stop_send_io = 0; + + + if(dev_ptr->queue_state == ACTIVE_PASSTHRU) { + node_t * map_node_ptr; + struct dev_info * map_dev_ptr; + + map_node_ptr = (node_t *)dev_ptr->pend_head; + map_dev_ptr = (struct dev_info *)dev_ptr->pend_tail; + dev_ptr->pend_head = 0; + dev_ptr->pend_tail = 0; + dev_ptr->queue_state = HALTED; + dev_ptr->active_io_count--; + if(map_dev_ptr) + map_dev_ptr->active_io_count--; + if(map_node_ptr) + map_node_ptr->num_active_io--; + + dev_ptr->ioctl_event = cmd->ulpStatus; + dev_ptr->ioctl_errno = (uint32)cmd->un.grsp.perr.statLocalError; + fcpRsp = &fcptr->fcp_rsp; + dev_ptr->sense_length = SWAP_DATA(fcpRsp->rspSnsLen); + if(cmd->ulpCommand == CMD_FCP_IWRITE64_CX) { + if (cmd->ulpStatus == IOSTAT_SUCCESS) { + dev_ptr->clear_count = 1; + } + else { + dev_ptr->clear_count = 0; + } + } + else { + dev_ptr->clear_count = cmd->un.fcpi.fcpi_parm; + } + return; + } + + /* + * Is it a SCSI Report Lun command ? + */ + if ((fcptr->fcp_cmd.fcpCdb[0] == FCP_SCSI_REPORT_LUNS) && + (fcptr->flags & FCBUF_INTERNAL)) { + uchar *datap; + MBUF_INFO *mbufp; + node_t *nodep; + uint32 rptLunLen; + uint32 *datap32; + uint32 max, lun; + + mbufp = (MBUF_INFO *)fcptr->sc_bufp; + fcptr->sc_bufp = 0; + mbufp->size = 4096; + nodep = dev_ptr->nodep; + if(nodep == 0) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )mbufp); + dev_ptr->active_io_count--; + fc_enq_fcbuf(fcptr); + return; + } + if ((cmd->ulpStatus == IOSTAT_SUCCESS) || + ((cmd->ulpStatus == IOSTAT_FCP_RSP_ERROR) && + (fcptr->fcp_rsp.rspStatus2 & RESID_UNDER) && + (fcptr->fcp_rsp.rspStatus3 == SCSI_STAT_GOOD))) { + + datap = (uchar *)mbufp->virt; + /* + * if Lun0 uses VSA, we assume others use too. + */ + if ((datap[8] & 0xc0) == 0x40) { + nodep->addr_mode = VOLUME_SET_ADDRESSING; + } + /* + * Skip retry + */ + datap32 = (uint32 *)mbufp->virt; + rptLunLen = SWAP_DATA(*datap32); + /* search for the max lun */ + max = 0; + for(i=0; i < rptLunLen; i+=8) { + datap32 += 2; + lun = (((* datap32) >> FC_LUN_SHIFT) & 0xff); + if(lun > max) + max = lun; + } + if(i) { + nodep->max_lun = max + 1; + } + + if(nodep->virtRptLunData == 0) { + if(rptLunLen > 8) { /* more than 1 lun */ + nodep->virtRptLunData = mbufp->virt; + nodep->physRptLunData = mbufp->phys; + } else { + fc_free(p_dev_ctl, mbufp); + } + } + } else { + datap = 0; + fc_free(p_dev_ctl, mbufp); + nodep->virtRptLunData = 0; + nodep->physRptLunData = 0; + } + + fc_mem_put(binfo, MEM_IOCB, (uchar * )mbufp); + + dev_ptr->active_io_count--; + nodep->num_active_io--; + fc_enq_fcbuf(fcptr); + + if ((datap == 0) && (!(nodep->flags & RETRY_RPTLUN))) { + nodep->flags |= RETRY_RPTLUN; + /* Wait a little bit for ABTSs to settle down */ + fc_clk_set(p_dev_ctl, 1, issue_report_lun, (void *)dev_ptr, 0); + } + else { + nodep->flags &= ~RETRY_RPTLUN; + nodep->rptlunstate = REPORT_LUN_COMPLETE; + } + return; + } + + + sbp = fcptr->sc_bufp; + bp = (struct buf *) sbp; + + + if (cmd->ulpStatus) { + fcpRsp = &fcptr->fcp_rsp; + { + uint32 did; + uint32 pan; + uint32 sid; + + if ((dev_ptr->nodep) && (dev_ptr->nodep->nlp)) { + ndlp = dev_ptr->nodep->nlp; + did = ndlp->nlp_DID; + pan = ndlp->id.nlp_pan; + sid = ndlp->id.nlp_sid; + if(ndlp->nlp_action & NLP_DO_RSCN) + qfull = 1; + } else { + did = 0; + pan = 0; + sid = 0; + } + /* FCP cmd failed on device (, ) DID */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0729, /* ptr to msg structure */ + fc_mes0729, /* ptr to msg */ + fc_msgBlk0729.msgPreambleStr, /* begin varargs */ + fcptr->fcp_cmd.fcpCdb[0], + FC_SCSID(pan, sid), + (uint32)(dev_ptr->lun_id), + did, + (uint32)fcpRsp->rspInfo3, + (uint32)cmd->un.grsp.perr.statLocalError, + *((uint32 *)(((uint32 *)cmd) + WD6)), /* IOCB wd 6 */ + *((uint32 *)(((uint32 *)cmd) + WD7))); /* IOCB wd 7, end varargs */ + + } + lp = (uint32 * )fcpRsp; + i = 0; + /* FCP command failed: RSP */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0730, /* ptr to msg structure */ + fc_mes0730, /* ptr to msg */ + fc_msgBlk0730.msgPreambleStr, /* begin varargs */ + lp[2], + lp[3], + lp[4], + lp[5]); /* end varargs */ + if (fcpRsp->rspStatus2 & RSP_LEN_VALID) { + i = SWAP_DATA(fcpRsp->rspRspLen); + } + if (fcpRsp->rspStatus2 & SNS_LEN_VALID) { + lp = (uint32 * )(((uchar * ) & fcpRsp->rspInfo0) + i); + /* FCP command failed: SNS */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0731, /* ptr to msg structure */ + fc_mes0731, /* ptr to msg */ + fc_msgBlk0731.msgPreambleStr, /* begin varargs */ + lp[0], + lp[1], + lp[2], + lp[3], + lp[4], + lp[5], + lp[6], + lp[7]); /* end varargs */ + if (i > sizeof(FCP_RSP)) { + cmd->ulpStatus = IOSTAT_REMOTE_STOP; + goto handle_iocb; + } + + if(binfo->fc_process_LA == 0) + goto skip4; /* link down processing */ + if (dev_ptr->first_check & FIRST_CHECK_COND) { + clp = DD_CTL.p_config[binfo->fc_brd_no]; + dev_ptr->first_check &= ~FIRST_CHECK_COND; + if((clp[CFG_FIRST_CHECK].a_current) && + (SWAP_DATA((lp[3]) & SWAP_DATA(0xFF000000)) == 0x29000000)) { + FCSTATCTR.fcpFirstCheck++; + + lp = (uint32 *)&cmd->un.ulpWord[4]; + /* Retry FCP command due to 29,00 check condition */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0732, /* ptr to msg structure */ + fc_mes0732, /* ptr to msg */ + fc_msgBlk0732.msgPreambleStr, /* begin varargs */ + *lp, + *(lp+1), + *(lp+2), + *(lp+3)); /* end varargs */ + fc_fcp_bufunmap(p_dev_ctl, sbp); + + + /* + * Queue this command to the head of the device's + * pending queue for processing by fc_issue_cmd. + */ + if (dev_ptr->pend_head == NULL) { /* Is queue empty? */ + dev_ptr->pend_head = sbp; + dev_ptr->pend_tail = sbp; + bp->av_forw = NULL; + fc_enq_wait(dev_ptr); + } else { /* Queue not empty */ + bp->av_forw = (struct buf *) dev_ptr->pend_head; + dev_ptr->pend_head = sbp; + } + dev_ptr->pend_count++; + dev_ptr->active_io_count--; + dev_ptr->nodep->num_active_io--; + fc_enq_fcbuf(fcptr); + return; + } + } + + fc_bcopy(((uchar * ) & fcpRsp->rspInfo0) + i, dev_ptr->sense, + MAX_FCP_SNS); + dev_ptr->sense_valid = 1; + dev_ptr->sense_length = SWAP_DATA(fcpRsp->rspSnsLen); + + } else { + if ((cmd->ulpStatus == IOSTAT_FCP_RSP_ERROR) && + ((((uchar)fcpRsp->rspStatus3) & SCSI_STATUS_MASK) == SCSI_STAT_QUE_FULL) && + (dev_ptr->qfull_retries > 0) && + (sbp->qfull_retry_count < dev_ptr->qfull_retries)) { + clp = DD_CTL.p_config[binfo->fc_brd_no]; + if (clp[CFG_DQFULL_THROTTLE].a_current) { + if (dev_ptr->fcp_cur_queue_depth > FC_MIN_QFULL) { + if(dev_ptr->active_io_count > FC_MIN_QFULL) + dev_ptr->fcp_cur_queue_depth = dev_ptr->active_io_count - 1; + else + dev_ptr->fcp_cur_queue_depth = FC_MIN_QFULL; + } + } + + fc_qfull_retry((void *)fcptr); + + sbp->qfull_retry_count++; + + dev_ptr->qfullcnt++; + dev_ptr->active_io_count--; + dev_ptr->nodep->num_active_io--; + fc_enq_fcbuf(fcptr); + return; + } + } + } else { + fcpRsp = &fcptr->fcp_rsp; + } + +handle_iocb: + + switch (cmd->ulpStatus) { + case IOSTAT_SUCCESS: + FCSTATCTR.fcpGood++; + break; + + case IOSTAT_FCP_RSP_ERROR: + /* ERROR: all is not well with the FCP Response */ + bp->b_error = EIO; + bp->b_flags |= B_ERROR; + + bp->b_resid = 0; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + FCSTATCTR.fcpRspErr++; + + if(binfo->fc_process_LA == 0) + goto skip4; /* link down processing */ + + + if ((fcpRsp->rspStatus2 & RESID_UNDER) || + (fcpRsp->rspStatus2 & RESID_OVER)) { + if (fcpRsp->rspStatus2 & RESID_UNDER) { + /* This is not an error! */ + bp->b_resid = SWAP_DATA(fcpRsp->rspResId); + + bp->b_error = 0; + bp->b_flags &= ~B_ERROR; + /* FCP Read Underrun */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0733, /* ptr to msg structure */ + fc_mes0733, /* ptr to msg */ + fc_msgBlk0733.msgPreambleStr, /* begin varargs */ + *((uint32 *)(((uint32 *)cmd) + WD7)), /* IOCB wd 7 */ + (uint32)cmd->ulpContext, + SWAP_DATA(fcpRsp->rspResId), + cmd->un.fcpi.fcpi_parm); /* end varargs */ + } + /* Overrun already has error set */ + } + else { + if ((bp->b_flags & B_READ) && cmd->un.fcpi.fcpi_parm) { + /* This is ALWAYS a readcheck error!! */ + + /* Give Check Condition priority over Read Check */ + if (fcpRsp->rspStatus3 != SCSI_STAT_CHECK_COND) { + bp->b_error = EIO; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + /* FCP Read Check Error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0734, /* ptr to msg structure */ + fc_mes0734, /* ptr to msg */ + fc_msgBlk0734.msgPreambleStr, /* begin varargs */ + *((uint32 *)(((uint32 *)cmd) + WD7)), /* IOCB wd 7 */ + (uint32)cmd->ulpContext, + SWAP_DATA(fcpRsp->rspResId), + cmd->un.fcpi.fcpi_parm); /* end varargs */ + } + else { + /* FCP Read Check Error with Check Condition */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0735, /* ptr to msg structure */ + fc_mes0735, /* ptr to msg */ + fc_msgBlk0735.msgPreambleStr, /* begin varargs */ + *((uint32 *)(((uint32 *)cmd) + WD7)), /* IOCB wd 7 */ + (uint32)cmd->ulpContext, + SWAP_DATA(fcpRsp->rspResId), + cmd->un.fcpi.fcpi_parm); /* end varargs */ + } + } + } + + /* For QUE_FULL we will delay the iodone */ + if((((uchar) fcpRsp->rspStatus3) & SCSI_STATUS_MASK) == SCSI_STAT_QUE_FULL) { + dev_ptr->qfullcnt++; + if (clp[CFG_DQFULL_THROTTLE].a_current) { + if (dev_ptr->fcp_cur_queue_depth > FC_MIN_QFULL) { + if(dev_ptr->active_io_count > 1) + dev_ptr->fcp_cur_queue_depth = dev_ptr->active_io_count - 1; + else + dev_ptr->fcp_cur_queue_depth = 1; + } + if (dev_ptr->active_io_count > FC_MIN_QFULL) { + /* + * Try out + * stop_send_io will be decreament by 1 in fc_q_depth_up(); + */ + dev_ptr->stop_send_io = clp[CFG_NO_DEVICE_DELAY].a_current; + } + } + /* FCP QUEUE Full */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0736, /* ptr to msg structure */ + fc_mes0736, /* ptr to msg */ + fc_msgBlk0736.msgPreambleStr, /* begin varargs */ + dev_ptr->fcp_cur_queue_depth, + dev_ptr->active_io_count, + dev_ptr->flags, + clp[CFG_DQFULL_THROTTLE].a_current); /* end varargs */ + qfull = 1; + /* Set any necessary flags for buf error */ + bp->b_error = EBUSY; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + } + lpfc_handle_fcp_error(pkt, fcptr, cmd); + + if ((fcpRsp->rspStatus2 & RSP_LEN_VALID) && + (fcpRsp->rspInfo3 != RSP_NO_FAILURE)) { + + /* Error detected in the FCP layer */ + sbp->status_validity = SC_ADAPTER_ERROR; + + if(clp[CFG_DELAY_RSP_ERR].a_current) + qfull = clp[CFG_DELAY_RSP_ERR].a_current; + + switch (fcpRsp->rspInfo3) { + case RSP_TM_NOT_SUPPORTED: + SET_ADAPTER_STATUS(sbp, SC_NO_DEVICE_RESPONSE) + break; + + case RSP_DATA_BURST_ERR: + case RSP_CMD_FIELD_ERR: + case RSP_RO_MISMATCH_ERR: + if (fcpRsp->rspStatus3 != SCSI_STAT_GOOD) { + sbp->status_validity = SC_SCSI_ERROR; + sbp->scsi_status = fcpRsp->rspStatus3; + if ((fcpRsp->rspStatus3 == SC_CHECK_CONDITION) || + (fcpRsp->rspStatus3 == SC_COMMAND_TERMINATED)) { + sbp->adap_q_status = SC_DID_NOT_CLEAR_Q; + } + + + break; + } + + case RSP_TM_NOT_COMPLETED: + default: + SET_ADAPTER_STATUS(sbp, SC_ADAPTER_HDW_FAILURE) + break; + } + } else if (fcpRsp->rspStatus3 != SCSI_STAT_GOOD) { + /* SCSI layer detected error */ + if (fcpRsp->rspStatus3 == SCSI_STAT_CHECK_COND) { + uint32 cc; + /* FCP error: Check condition */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0737, /* ptr to msg structure */ + fc_mes0737, /* ptr to msg */ + fc_msgBlk0737.msgPreambleStr, /* begin varargs */ + *((uint32 *)(((uint32 *)cmd) + WD7)), /* IOCB wd 7 */ + (uint32)cmd->ulpIoTag, + (uint32)cmd->ulpContext, + (uint32)cmd->un.grsp.perr.statLocalError); /* end varargs */ + i = SWAP_DATA(fcpRsp->rspRspLen); + lp = (uint32 * )(((uchar * ) & fcpRsp->rspInfo0) + i); + + cc = (SWAP_DATA((lp[3]) & SWAP_DATA(0xFF000000))); + switch(cc) { + case 0x29000000: /* Power on / reset */ + i = 0; + /* 29,00 Check condition received */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0738, /* ptr to msg structure */ + fc_mes0738, /* ptr to msg */ + fc_msgBlk0738.msgPreambleStr, /* begin varargs */ + lp[0], + lp[1], + lp[2], + lp[3]); /* end varargs */ + break; + case 0x0: /* No additional sense info */ + if((lp[3]) & SWAP_DATA(0x00FF0000)) /* if ASCQ != 0 */ + goto default_chk; + case 0x44000000: /* Internal Target failure */ + case 0x25000000: /* Login Unit Not Support */ + case 0x20000000: /* Invalid Command operation code */ + if ((cc == 0x20000000) && (fcptr->fcp_cmd.fcpCdb[0] == SCSI3_PERSISTENT_RESERVE_IN)) { + /* Check condition received ERR1 */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0739, /* ptr to msg structure */ + fc_mes0739, /* ptr to msg */ + fc_msgBlk0739.msgPreambleStr, /* begin varargs */ + lp[0], + lp[1], + lp[2], + lp[3]); /* end varargs */ + goto out; + } + if(clp[CFG_CHK_COND_ERR].a_current) { + /* We want to return check cond on TUR cmd */ + if (fcptr->fcp_cmd.fcpCdb[0] == FCP_SCSI_TEST_UNIT_READY) + goto default_chk; + fc_bzero((void * )dev_ptr->sense, MAX_FCP_SNS); + dev_ptr->sense_valid = 0; + dev_ptr->sense_length = 0; + fcpRsp->rspStatus3 = SC_COMMAND_TERMINATED; + bp->b_error = EIO; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + sbp->status_validity = SC_ADAPTER_ERROR; + SET_ADAPTER_STATUS(sbp, SC_SCSI_BUS_RESET) + i = 0; + if(clp[CFG_DELAY_RSP_ERR].a_current) + qfull = clp[CFG_DELAY_RSP_ERR].a_current; + /* Check condition received ERR2 */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0740, /* ptr to msg structure */ + fc_mes0740, /* ptr to msg */ + fc_msgBlk0740.msgPreambleStr, /* begin varargs */ + lp[0], + lp[1], + lp[2], + lp[3]); /* end varargs */ + goto out; + } + default: + if(clp[CFG_DELAY_RSP_ERR].a_current) + qfull = clp[CFG_DELAY_RSP_ERR].a_current; +default_chk: + i = 0; + /* Check condition received */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0741, /* ptr to msg structure */ + fc_mes0741, /* ptr to msg */ + fc_msgBlk0741.msgPreambleStr, /* begin varargs */ + lp[0], + lp[1], + lp[2], + lp[3]); /* end varargs */ + break; + } + } + else { + if(clp[CFG_DELAY_RSP_ERR].a_current) + qfull = clp[CFG_DELAY_RSP_ERR].a_current; + } + + sbp->status_validity = SC_SCSI_ERROR; + sbp->scsi_status = fcpRsp->rspStatus3; + if ((fcpRsp->rspStatus3 == SC_CHECK_CONDITION) || + (fcpRsp->rspStatus3 == SC_COMMAND_TERMINATED)) { + sbp->adap_q_status = SC_DID_NOT_CLEAR_Q; + + } + } + break; + + case IOSTAT_REMOTE_STOP: + /* ERROR: ABTS/ABTX by remote N_PORT */ + FCSTATCTR.fcpRemoteStop++; + bp->b_error = EIO; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + sbp->status_validity = SC_SCSI_ERROR; + sbp->scsi_status = SC_COMMAND_TERMINATED; + sbp->adap_q_status = SC_DID_NOT_CLEAR_Q; + + break; + + case IOSTAT_LOCAL_REJECT: + FCSTATCTR.fcpLocalErr++; + switch (cmd->un.grsp.perr.statLocalError) { + case IOERR_SEQUENCE_TIMEOUT: + FCSTATCTR.fcpLocalTmo++; + /* E_D_TOV timeout */ + bp->b_error = ETIMEDOUT; + sbp->adap_q_status = SC_DID_NOT_CLEAR_Q; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + sbp->status_validity = SC_ADAPTER_ERROR; + SET_ADAPTER_STATUS(sbp, SC_CMD_TIMEOUT) + break; + + case IOERR_NO_RESOURCES: + FCSTATCTR.fcpLocalNores++; + fc_qfull_retry((void *)fcptr); + dev_ptr->active_io_count--; + dev_ptr->nodep->num_active_io--; + fc_enq_fcbuf(fcptr); + return; + case IOERR_BUFFER_SHORTAGE: + FCSTATCTR.fcpLocalBufShort++; + /* The adapter is too busy to deal with this command */ + bp->b_error = EBUSY; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + sbp->status_validity = 0; + break; + + case IOERR_MISSING_CONTINUE: + case IOERR_ILLEGAL_COMMAND: + case IOERR_ILLEGAL_FIELD: + case IOERR_BAD_CONTINUE: + case IOERR_TOO_MANY_BUFFERS: + case IOERR_EXTRA_DATA: + case IOERR_ILLEGAL_LENGTH: + case IOERR_UNSUPPORTED_FEATURE: + /* Let's call these driver software errors */ + qfull = 1; + FCSTATCTR.fcpLocalSfw++; + bp->b_error = EINVAL; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + sbp->status_validity = 0; + + { + uint32 did; + + did = 0; + if ((dev_ptr->nodep) && (dev_ptr->nodep->nlp)) + did = dev_ptr->nodep->nlp->nlp_DID; + /* FCP completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0742, /* ptr to msg structure */ + fc_mes0742, /* ptr to msg */ + fc_msgBlk0742.msgPreambleStr, /* begin varargs */ + cmd->ulpStatus, + cmd->un.ulpWord[4], + did ); /* end varargs */ + } + break; + + case IOERR_TX_DMA_FAILED: + FCSTATCTR.fcpLocalTxDMA++; + goto skip2; + case IOERR_RX_DMA_FAILED: + FCSTATCTR.fcpLocalRxDMA++; + goto skip2; + case IOERR_INTERNAL_ERROR: + FCSTATCTR.fcpLocalinternal++; + goto skip2; + case IOERR_CORRUPTED_DATA: + case IOERR_CORRUPTED_RPI: + FCSTATCTR.fcpLocalCorrupt++; +skip2: + /* Let's call these adapter hardware errors */ + bp->b_error = EIO; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + sbp->status_validity = SC_ADAPTER_ERROR; + SET_ADAPTER_STATUS(sbp, SC_ADAPTER_HDW_FAILURE) + + { + uint32 did; + + did = 0; + if ((dev_ptr->nodep) && (dev_ptr->nodep->nlp)) + did = dev_ptr->nodep->nlp->nlp_DID; + /* FCP completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0743, /* ptr to msg structure */ + fc_mes0743, /* ptr to msg */ + fc_msgBlk0743.msgPreambleStr, /* begin varargs */ + cmd->ulpStatus, + cmd->un.ulpWord[4], + did ); /* end varargs */ + } + + break; + + case IOERR_ILLEGAL_FRAME: + FCSTATCTR.fcpLocalIllFrm++; + goto skip3; + case IOERR_DUP_FRAME: + FCSTATCTR.fcpLocalDupFrm++; + goto skip3; + case IOERR_LINK_CONTROL_FRAME: + FCSTATCTR.fcpLocalLnkCtlFrm++; +skip3: + qfull = 1; + /* Let's call these device hardware errors */ + bp->b_error = EINVAL; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + sbp->status_validity = 0; + + { + uint32 did; + + did = 0; + if ((dev_ptr->nodep) && (dev_ptr->nodep->nlp)) + did = dev_ptr->nodep->nlp->nlp_DID; + + lp = (uint32 *)&cmd->un.ulpWord[4]; + /* FCP completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0744, /* ptr to msg structure */ + fc_mes0744, /* ptr to msg */ + fc_msgBlk0744.msgPreambleStr, /* begin varargs */ + did, + *lp, + *(lp+2), + *(lp+3) ); /* end varargs */ + } + + break; + + case IOERR_LOOP_OPEN_FAILURE: + FCSTATCTR.fcpLocalLoopOpen++; + /* The device disappeared from the loop! */ + qfull = 1; + bp->b_error = EIO; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + sbp->status_validity = SC_ADAPTER_ERROR; + SET_ADAPTER_STATUS(sbp, SC_NO_DEVICE_RESPONSE) + if(dev_ptr->nodep && (dev_ptr->nodep->flags & FC_NODEV_TMO)) { + break; + } + if(binfo->fc_ffstate != FC_READY) { + break; + } + /* Will HALT, CLEARQ, and kick off discovery, below */ + /* Try to relogin, and if unsuccessful reject future cmds */ + if((ndlp == 0) && dev_ptr->nodep) + ndlp = fc_findnode_rpi(binfo, (uint32)dev_ptr->nodep->rpi); + + if ((ndlp) && !(ndlp->nlp_flag & (NLP_NODEV_TMO | NLP_REQ_SND))) { + ndlp->nlp_flag &= ~NLP_RM_ENTRY; + /* We are in FC_READY state */ + if (!(ndlp->nlp_action & NLP_DO_RSCN)) { + binfo->fc_flag |= FC_RSCN_MODE; + ndlp->nlp_action |= NLP_DO_RSCN; + fc_nextrscn(p_dev_ctl, 1); + } + } + break; + + case IOERR_INVALID_RPI: + FCSTATCTR.fcpLocalInvalRpi++; + goto skip4; + case IOERR_LINK_DOWN: + FCSTATCTR.fcpLocalLinkDown++; +skip4: + /* Retry these failures */ + qfull=1; + bp->b_error = EIO; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + sbp->status_validity = SC_ADAPTER_ERROR; + SET_ADAPTER_STATUS(sbp, SC_SCSI_BUS_RESET) + break; + + case IOERR_OUT_OF_ORDER_DATA: + case IOERR_OUT_OF_ORDER_ACK: + FCSTATCTR.fcpLocalOOO++; + /* Retry these failures */ + bp->b_error = ENXIO; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + sbp->status_validity = 0; + break; + + case IOERR_ABORT_IN_PROGRESS: + FCSTATCTR.fcpLocalAbtInp++; + goto skip5; + case IOERR_ABORT_REQUESTED: + FCSTATCTR.fcpLocalAbtReq++; +skip5: + /* Abort requested by us */ + if (fcptr->flags & FCBUF_ABTS) { + /* ABTS sent because of operation timeout */ + bp->b_error = ETIMEDOUT; + sbp->status_validity = SC_ADAPTER_ERROR; + SET_ADAPTER_STATUS(sbp, SC_CMD_TIMEOUT) + } else { + bp->b_error = ENXIO; + sbp->status_validity = 0; + } + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + break; + + case IOERR_SUCCESS: + case IOERR_NO_XRI: + case IOERR_XCHG_DROPPED: + case IOERR_RCV_BUFFER_WAITING: + case IOERR_RECEIVE_BUFFER_TIMEOUT: + case IOERR_RING_RESET: + case IOERR_BAD_HOST_ADDRESS: + case IOERR_RCV_HDRBUF_WAITING: + case IOERR_MISSING_HDR_BUFFER: + case IOERR_MSEQ_CHAIN_CORRUPTED: + case IOERR_ABORTMULT_REQUESTED: + default: + FCSTATCTR.fcpLocal++; + bp->b_error = EIO; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + sbp->status_validity = SC_ADAPTER_ERROR; + SET_ADAPTER_STATUS(sbp, SC_NO_DEVICE_RESPONSE) + + { + uint32 did; + + did = 0; + if ((dev_ptr->nodep) && (dev_ptr->nodep->nlp)) + did = dev_ptr->nodep->nlp->nlp_DID; + /* FCP completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0745, /* ptr to msg structure */ + fc_mes0745, /* ptr to msg */ + fc_msgBlk0745.msgPreambleStr, /* begin varargs */ + cmd->ulpStatus, + cmd->un.ulpWord[4], + did ); /* end varargs */ + } + break; + } + break; + + case IOSTAT_NPORT_RJT: + case IOSTAT_FABRIC_RJT: + FCSTATCTR.fcpPortRjt++; + /* The fabric or port rejected this command */ + if (cmd->un.grsp.perr.statAction == RJT_RETRYABLE) { + bp->b_error = ENXIO; + sbp->status_validity = SC_SCSI_ERROR; + sbp->scsi_status = SC_BUSY_STATUS; + } else { + bp->b_error = EIO; + sbp->status_validity = 0; + } + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + break; + + case IOSTAT_NPORT_BSY: + case IOSTAT_FABRIC_BSY: + FCSTATCTR.fcpPortBusy++; + /* The fabric or port is too busy to deal with this command */ + bp->b_error = ENXIO; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + sbp->status_validity = SC_SCSI_ERROR; + sbp->scsi_status = SC_BUSY_STATUS; + break; + + case IOSTAT_INTERMED_RSP: + case IOSTAT_LS_RJT: + case IOSTAT_BA_RJT: + default: + FCSTATCTR.fcpError++; + /* ERROR: None of these errors should occur! */ + bp->b_error = EIO; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + sbp->status_validity = SC_ADAPTER_ERROR; + SET_ADAPTER_STATUS(sbp, SC_NO_DEVICE_RESPONSE) + + { + uint32 did; + + did = 0; + if ((dev_ptr->nodep) && (dev_ptr->nodep->nlp)) + did = dev_ptr->nodep->nlp->nlp_DID; + /* FCP completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0746, /* ptr to msg structure */ + fc_mes0746, /* ptr to msg */ + fc_msgBlk0746.msgPreambleStr, /* begin varargs */ + cmd->ulpStatus, + cmd->un.ulpWord[4], + did ); /* end varargs */ + } + break; + } +out: + + if (fcptr->fcp_cmd.fcpCntl2) + { + /* This is a task management command */ + if (bp->b_flags & B_ERROR) + dev_ptr->ioctl_errno = bp->b_error; + else + dev_ptr->ioctl_errno = 0; + + + + if (fcptr->fcp_cmd.fcpCntl2 & TARGET_RESET) { + /* Cmpl Target Reset */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0747, /* ptr to msg structure */ + fc_mes0747, /* ptr to msg */ + fc_msgBlk0747.msgPreambleStr, /* begin varargs */ + (uint32)dev_ptr->nodep->scsi_id, + (uint32)dev_ptr->lun_id, + (uint32)cmd->un.grsp.perr.statLocalError, + *((uint32 *)(((uint32 *)cmd) + WD7))); /* end varargs */ + clp = DD_CTL.p_config[binfo->fc_brd_no]; + dev_ptr->flags &= ~SCSI_TARGET_RESET; + for (next_dev_ptr = dev_ptr->nodep->lunlist; next_dev_ptr != NULL; + next_dev_ptr = next_dev_ptr->next) { + + next_dev_ptr->flags &= ~SCSI_TARGET_RESET; + /* First send ABTS on any outstanding I/O in txp queue */ + fc_abort_fcp_txpq(binfo, next_dev_ptr); + fc_fail_cmd(next_dev_ptr, ENXIO, STAT_DEV_RESET); + next_dev_ptr->fcp_cur_queue_depth = + (ushort)clp[CFG_DFT_LUN_Q_DEPTH].a_current; + if (next_dev_ptr->ioctl_wakeup == 0) + fc_restart_device(next_dev_ptr); + } + } + + if (fcptr->fcp_cmd.fcpCntl2 & LUN_RESET) { + /* Cmpl LUN Reset */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0748, /* ptr to msg structure */ + fc_mes0748, /* ptr to msg */ + fc_msgBlk0748.msgPreambleStr, /* begin varargs */ + (uint32)dev_ptr->nodep->scsi_id, + (uint32)dev_ptr->lun_id, + (uint32)cmd->un.grsp.perr.statLocalError, + *((uint32 *)(((uint32 *)cmd) + WD7))); /* end varargs */ + dev_ptr->flags &= ~SCSI_LUN_RESET; + /* First send ABTS on any outstanding I/O in txp queue */ + fc_abort_fcp_txpq(binfo, dev_ptr); + fc_fail_cmd(dev_ptr, ENXIO, STAT_DEV_RESET); + if (dev_ptr->ioctl_wakeup == 0) + fc_restart_device(dev_ptr); + } + + if (fcptr->fcp_cmd.fcpCntl2 & ABORT_TASK_SET) { + /* Cmpl Abort Task Set */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0749, /* ptr to msg structure */ + fc_mes0749, /* ptr to msg */ + fc_msgBlk0749.msgPreambleStr, /* begin varargs */ + (uint32)dev_ptr->nodep->scsi_id, + (uint32)dev_ptr->lun_id, + (uint32)cmd->un.grsp.perr.statLocalError, + *((uint32 *)(((uint32 *)cmd) + WD7))); /* end varargs */ + dev_ptr->flags &= ~SCSI_ABORT_TSET; + /* First send ABTS on any outstanding I/O in txp queue */ + fc_abort_fcp_txpq(binfo, dev_ptr); + fc_fail_cmd(dev_ptr, ENXIO, STAT_DEV_RESET); + if (dev_ptr->ioctl_wakeup == 0) + fc_restart_device(dev_ptr); + } + + if (dev_ptr->ioctl_wakeup == 1) { + dev_ptr->ioctl_wakeup = 0; + fc_admin_wakeup(p_dev_ctl, dev_ptr, sbp); + } + } else { + if ((bp->b_flags & B_ERROR) && + (dev_ptr->queue_state != STOPPING)) { + /* An error has occurred, so halt the queues */ + sbp->adap_q_status = SC_DID_NOT_CLEAR_Q; + if(qfull) + fc_delay_iodone(p_dev_ctl, sbp); + else + fc_do_iodone(bp); + } else { + if(qfull) + fc_delay_iodone(p_dev_ctl, sbp); + else + fc_do_iodone(bp); + } + } + + + dev_ptr->active_io_count--; + dev_ptr->nodep->num_active_io--; + fc_enq_fcbuf(fcptr); + + + if ((dev_ptr->nodep->tgt_queue_depth) && + (dev_ptr->nodep->tgt_queue_depth == dev_ptr->nodep->num_active_io)) { + re_issue_fcp_cmd(dev_ptr->nodep->last_dev); + } + return; +} /* End handle_fcp_event */ + + +int +fc_delay_iodone( +fc_dev_ctl_t *p_dev_ctl, +T_SCSIBUF * sbp) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + uint32 tmout; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + if(clp[CFG_NO_DEVICE_DELAY].a_current) { + /* Need to set a timer so iodone can be called + * for buffer upon expiration. + */ + tmout = clp[CFG_NO_DEVICE_DELAY].a_current; + + if(fc_clk_set(p_dev_ctl, tmout, + lpfc_scsi_selto_timeout, (void *)sbp, 0) != 0) + return(1); + } + fc_do_iodone((struct buf *)sbp); + return(0); +} /* End fc_delay_iodone */ + + +/**********************************************/ +/** handle_iprcv_seq **/ +/** **/ +/**********************************************/ +_static_ int +handle_iprcv_seq( +fc_dev_ctl_t *p_dev_ctl, +RING *rp, +IOCBQ *temp) +{ + MAILBOXQ * mb; + FC_BRD_INFO * binfo; + IOCB * cmd = 0; + IOCB * savecmd; + IOCBQ * savetemp; + NETHDR * nh; + fcipbuf_t * p_mbuf, *mp, *last_mp; + ndd_t * p_ndd; + NODELIST * ndlp; + MATCHMAP * matp; + uchar * daddr; + uchar * saddr; + int count, i, la; + + binfo = &BINFO; + p_ndd = (ndd_t * ) & (NDD); + + p_mbuf = 0; + matp = (MATCHMAP *)0; /* prevent compiler warning */ + + if (++NDDSTAT.ndd_recvintr_lsw == 0) { + NDDSTAT.ndd_recvintr_msw++; + } + + mp = 0; + last_mp = 0; + count = 0; + la = 0; + + savetemp = temp; + if (binfo->fc_ffstate < FC_READY) { + if (binfo->fc_ffstate < rp->fc_xmitstate) { + goto dropout; + } + la = 1; + } + + savecmd = &temp->iocb; + while (temp) { + cmd = &temp->iocb; + if (cmd->ulpStatus) { + if ((cmd->ulpStatus == IOSTAT_LOCAL_REJECT) && + ((cmd->un.ulpWord[4] & 0xff) == IOERR_RCV_BUFFER_WAITING)) { + FCSTATCTR.NoRcvBuf++; + if(!(binfo->fc_flag & FC_NO_RCV_BUF)) { + /* IP Response Ring out of posted buffers */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0602, /* ptr to msg structure */ + fc_mes0602, /* ptr to msg */ + fc_msgBlk0602.msgPreambleStr, /* begin varargs */ + rp->fc_ringno, + rp->fc_missbufcnt, + FCSTATCTR.NoRcvBuf); /* end varargs */ + } + binfo->fc_flag |= FC_NO_RCV_BUF; + + fc_post_mbuf(p_dev_ctl, rp, 0); + } + else + NDDSTAT.ndd_ierrors++; +dropout: + NDDSTAT.ndd_ipackets_drop++; + fc_free_iocb_buf(p_dev_ctl, rp, savetemp); + if (p_mbuf) { + m_freem(p_mbuf); + } + return(0); + } + + if (cmd->ulpBdeCount == 0) { + temp = (IOCBQ * )temp->q; + continue; + } + for (i = 0; i < (int)cmd->ulpBdeCount; i++) { + matp = fc_getvaddr(p_dev_ctl, rp, (uchar *) + getPaddr(cmd->un.cont64[i].addrHigh, cmd->un.cont64[i].addrLow)); + if (matp == 0) { + uchar *bdeAddr; + + bdeAddr = (uchar *)getPaddr(cmd->un.cont64[0].addrHigh, + cmd->un.cont64[0].addrLow); + goto dropout; + } + + mp = (fcipbuf_t * )matp; + if (last_mp) { + fcnextdata(last_mp) = mp; + } else { + p_mbuf = mp; + } + last_mp = mp; + fcnextdata(mp) = 0; + fcsetdatalen(mp, cmd->un.cont64[i].tus.f.bdeSize); + count += cmd->un.cont64[i].tus.f.bdeSize; + } + + fc_post_mbuf(p_dev_ctl, rp, i); + cmd->ulpBdeCount = 0; + temp = (IOCBQ * )temp->q; + } + + if (p_mbuf == 0) { + goto dropout; + } + + binfo->fc_flag &= ~FC_NO_RCV_BUF; + + /* Set any IP buffer flags to indicate a recieve buffer, if needed */ + + if (++NDDSTAT.ndd_ipackets_lsw == 0) + NDDSTAT.ndd_ipackets_msw++; + + NDDSTAT.ndd_ibytes_lsw += count; + if ((int)NDDSTAT.ndd_ibytes_lsw < count) + NDDSTAT.ndd_ibytes_msw++; + nh = (NETHDR * )fcdata(p_mbuf); + + if(lpfc_nethdr == 0) { + emac_t * ep; + + /* Adjust mbuf count now */ + count -= 2; + + fcpktlen(p_mbuf) = count; /* total data in mbuf */ + fcincdatalen(p_mbuf, -2); + + fcdata(p_mbuf) += 2; + ep = (emac_t * )(fcdata(p_mbuf)); + daddr = (uchar *)ep->dest_addr; + saddr = (uchar *)ep->src_addr; + ep->llc_len = (count - sizeof(emac_t)); + } + else { + NETHDR * np; + + np = (NETHDR * )(fcdata(p_mbuf)); + daddr = np->fc_destname.IEEE; + saddr = np->fc_srcname.IEEE; + fcpktlen(p_mbuf) = count; /* total data in mbuf */ + } + + if (count < (HDR_LEN + sizeof(snaphdr_t))) + goto dropout; + + /* If this is first broadcast received from that address */ + if (savecmd->un.xrseq.w5.hcsw.Fctl & BC) { +bcst: + FCSTATCTR.frameRcvBcast++; + if (++NDDSTAT.ndd_ifInBcastPkts_lsw == 0) + NDDSTAT.ndd_ifInBcastPkts_msw++; + + fc_bcopy((char *)fcbroadcastaddr, (char *)daddr, MACADDR_LEN); + + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + (uint32)savecmd->un.xrseq.xrsqRo)) == 0) { + + /* Need to cache the did / portname */ + if((ndlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP))) { + fc_bzero((void *)ndlp, sizeof(NODELIST)); + ndlp->sync = binfo->fc_sync; + ndlp->capabilities = binfo->fc_capabilities; + ndlp->nlp_DID = savecmd->un.xrseq.xrsqRo; + fc_bcopy(&nh->fc_srcname, &ndlp->nlp_portname, sizeof(NAME_TYPE)); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + else { + goto dropout; + } + } + } else { + if ((ndlp = binfo->fc_nlplookup[savecmd->ulpIoTag]) == 0) { + if(nh->fc_destname.IEEE[0] == 0xff) { + if((nh->fc_destname.IEEE[1] == 0xff) && + (nh->fc_destname.IEEE[2] == 0xff) && + (nh->fc_destname.IEEE[3] == 0xff) && + (nh->fc_destname.IEEE[4] == 0xff) && + (nh->fc_destname.IEEE[5] == 0xff)) { + goto bcst; + } + } + /* Need to send LOGOUT for this RPI */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX))) { + fc_read_rpi(binfo, (uint32)savecmd->ulpIoTag, + (MAILBOX * )mb, (uint32)ELS_CMD_LOGO); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + goto dropout; + } + } + + + if(lpfc_nethdr == 0) { + fc_bcopy(ndlp->nlp_portname.IEEE, (char *)saddr, MACADDR_LEN); + } + if ((p_dev_ctl->device_state != OPENED) || + (p_ndd->nd_receive == 0)) { + goto dropout; + } + ndlp->nlp_type |= NLP_IP_NODE; + + unlock_enable(FC_LVL, &CMD_LOCK); + (*(p_ndd->nd_receive))(p_ndd, p_mbuf, p_dev_ctl); + i = disable_lock(FC_LVL, &CMD_LOCK); + + return(1); +} /* End handle_iprcv_seq */ + +/**********************************************/ +/** handle_elsrcv_seq **/ +/** **/ +/**********************************************/ +_static_ int +handle_elsrcv_seq( +fc_dev_ctl_t *p_dev_ctl, +RING *rp, +IOCBQ *temp) +{ + FC_BRD_INFO * binfo; + IOCB * cmd = 0; + IOCB * savecmd; + IOCBQ * savetemp; + MATCHMAP * p_mbuf, *last_mp; + ndd_t * p_ndd; + MATCHMAP * matp; + uint32 ctx; + int count, i, la; + + binfo = &BINFO; + p_ndd = (ndd_t * ) & (NDD); + + p_mbuf = 0; + matp = (MATCHMAP *)0; /* prevent compiler warning */ + + last_mp = 0; + count = 0; + la = 0; + + savetemp = temp; + if (binfo->fc_ffstate < FC_READY) { + goto dropout; + } + + ctx = 0; + savecmd = &temp->iocb; + while (temp) { + cmd = &temp->iocb; + if(ctx == 0) + ctx = (uint32)(cmd->ulpContext); + if (cmd->ulpStatus) { + if ((cmd->ulpStatus == IOSTAT_LOCAL_REJECT) && + ((cmd->un.ulpWord[4] & 0xff) == IOERR_RCV_BUFFER_WAITING)) { + FCSTATCTR.NoRcvBuf++; + if(!(binfo->fc_flag & FC_NO_RCV_BUF)) { + /* Rcv Ring out of posted buffers */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0603, /* ptr to msg structure */ + fc_mes0603, /* ptr to msg */ + fc_msgBlk0603.msgPreambleStr, /* begin varargs */ + rp->fc_ringno, + rp->fc_missbufcnt, + FCSTATCTR.NoRcvBuf); /* end varargs */ + } + binfo->fc_flag |= FC_NO_RCV_BUF; + + fc_post_buffer(p_dev_ctl, rp, 0); + } + goto dropout; + } + + if (cmd->ulpBdeCount == 0) { + temp = (IOCBQ * )temp->q; + continue; + } + for (i = 0; i < (int)cmd->ulpBdeCount; i++) { + matp = fc_getvaddr(p_dev_ctl, rp, (uchar *) + getPaddr(cmd->un.cont64[i].addrHigh, cmd->un.cont64[i].addrLow)); + if (matp == 0) { + uchar *bdeAddr; + + bdeAddr = (uchar *)getPaddr(cmd->un.cont64[0].addrHigh, + cmd->un.cont64[0].addrLow); + + goto dropout; + } + + /* Typically for Unsolicited CT requests */ + + if (last_mp) { + last_mp->fc_mptr = (void *)matp; + } else { + p_mbuf = matp; + } + last_mp = matp; + matp->fc_mptr = 0; + count += cmd->un.cont64[i].tus.f.bdeSize; + } + + fc_post_buffer(p_dev_ctl, rp, i); + cmd->ulpBdeCount = 0; + temp = (IOCBQ * )temp->q; + } + + if (p_mbuf == 0) { + goto dropout; + } + binfo->fc_flag &= ~FC_NO_RCV_BUF; + if(dfc_put_event(p_dev_ctl, FC_REG_CT_EVENT, ctx, (void *)p_mbuf, (void *)((ulong)count))) { + fc_free_iocb_buf(p_dev_ctl, rp, savetemp); + return(0); + } + +dropout: + fc_free_iocb_buf(p_dev_ctl, rp, savetemp); + while (p_mbuf) { + matp = p_mbuf; + p_mbuf = (MATCHMAP *)matp->fc_mptr; + fc_mem_put(binfo, MEM_BUF, (uchar * )matp); + } + return(0); +} /* End handle_elsrcv_seq */ + + +/**************************************************/ +/** fc_post_buffer **/ +/** **/ +/** This routine will post count buffers to the **/ +/** ring with the QUE_RING_BUF_CN command. This **/ +/** allows 3 buffers / command to be posted. **/ +/** Returns the number of buffers NOT posted. **/ +/**************************************************/ +_static_ int +fc_post_buffer( +fc_dev_ctl_t *p_dev_ctl, +RING *rp, +int cnt) +{ + IOCB * icmd; + IOCBQ * temp; + int i, j; + ushort tag; + ushort maxqbuf; + MATCHMAP * mp; + FC_BRD_INFO * binfo; + + binfo = &BINFO; + mp = 0; + if (binfo->fc_flag & FC_SLI2) + maxqbuf = 2; + else + maxqbuf = 3; + + tag = (ushort)cnt; + cnt += rp->fc_missbufcnt; + /* While there are buffers to post */ + while (cnt) { + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB)) == 0) { + rp->fc_missbufcnt = cnt; + return(cnt); + } + fc_bzero((void *)temp, sizeof(IOCBQ)); + icmd = &temp->iocb; + + /* Max buffers can be posted per command */ + for (i = 0; i < maxqbuf; i++) { + if (cnt <= 0) + break; + + /* fill in BDEs for command */ + if ((mp = (MATCHMAP * )fc_mem_get(binfo, MEM_BUF)) == 0) { + icmd->ulpBdeCount = i; + for (j = 0; j < i; j++) { + if (binfo->fc_flag & FC_SLI2) { + mp = fc_getvaddr(p_dev_ctl, rp, + (uchar * )getPaddr(icmd->un.cont64[j].addrHigh, + icmd->un.cont64[j].addrLow)); + } + else { + mp = fc_getvaddr(p_dev_ctl, rp, + (uchar * )((ulong)icmd->un.cont[j].bdeAddress)); + } + if (mp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + } + } + + rp->fc_missbufcnt = cnt + i; + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + return(cnt + i); + } + + /* map that page and save the address pair for lookup later */ + if (binfo->fc_flag & FC_SLI2) { + fc_mapvaddr(binfo, rp, mp, + (uint32 *) & icmd->un.cont64[i].addrHigh, + (uint32 *) & icmd->un.cont64[i].addrLow); + icmd->un.cont64[i].tus.f.bdeSize = FCELSSIZE; + icmd->ulpCommand = CMD_QUE_RING_BUF64_CN; + } else { + fc_mapvaddr(binfo, rp, mp, + 0, (uint32 *) & icmd->un.cont[i].bdeAddress); + icmd->un.cont[i].bdeSize = FCELSSIZE; + icmd->ulpCommand = CMD_QUE_RING_BUF_CN; + } + cnt--; + } + + icmd->ulpIoTag = tag; + icmd->ulpBdeCount = i; + icmd->ulpLe = 1; + + icmd->ulpOwner = OWN_CHIP; + + temp->bp = (uchar * )mp; /* used for delimiter between commands */ + + + FCSTATCTR.cmdQbuf++; + issue_iocb_cmd(binfo, rp, temp); + } + + rp->fc_missbufcnt = 0; + return(0); +} /* End fc_post_buffer */ + + +/**************************************************/ +/** fc_post_mbuf **/ +/** **/ +/** This routine will post count buffers to the **/ +/** ring with the QUE_RING_BUF_CN command. This **/ +/** allows 3 buffers / command to be posted. **/ +/** Returns the number of buffers NOT posted. **/ +/**************************************************/ +_static_ int +fc_post_mbuf( +fc_dev_ctl_t *p_dev_ctl, +RING *rp, +int cnt) +{ + FC_BRD_INFO * binfo; + IOCB * icmd; + IOCBQ * temp; + int i, j; + ushort tag; + ushort maxqbuf; + fcipbuf_t * mp; + + binfo = &BINFO; + mp = 0; + if (binfo->fc_flag & FC_SLI2) + maxqbuf = 2; + else + maxqbuf = 3; + + tag = (ushort)cnt; + cnt += rp->fc_missbufcnt; + /* While there are buffers to post */ + while (cnt) { + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB)) == 0) { + rp->fc_missbufcnt = cnt; + return(cnt); + } + fc_bzero((void *)temp, sizeof(IOCBQ)); + icmd = &temp->iocb; + + /* Max buffers can be posted per command */ + for (i = 0; i < maxqbuf; i++) { + if (cnt <= 0) + break; + + /* fill in BDEs for command */ + if ((mp = (fcipbuf_t * )m_getclust(M_DONTWAIT, MT_DATA)) == 0) { + +out: + /* Post buffer for IP ring failed */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0604, /* ptr to msg structure */ + fc_mes0604, /* ptr to msg */ + fc_msgBlk0604.msgPreambleStr, /* begin varargs */ + rp->fc_ringno, + rp->fc_missbufcnt); /* end varargs */ + icmd->ulpBdeCount = i; + for (j = 0; j < i; j++) { + if (binfo->fc_flag & FC_SLI2) { + mp = (fcipbuf_t * )fc_getvaddr(p_dev_ctl, rp, + (uchar * )getPaddr(icmd->un.cont64[j].addrHigh, + icmd->un.cont64[j].addrLow)); + } + else { + mp = (fcipbuf_t * )fc_getvaddr(p_dev_ctl, rp, + (uchar * )((ulong)icmd->un.cont[j].bdeAddress)); + } + if (mp) { + fcnextdata(mp) = 0; + fcnextpkt(mp) = 0; + m_freem(mp); + } + } + + rp->fc_missbufcnt = cnt + i; + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + return(cnt + i); + } + { + MBUF_INFO * buf_info; + MBUF_INFO bufinfo; + + buf_info = &bufinfo; + buf_info->virt = (uint32 * )fcdata(mp); + buf_info->size = fcPAGESIZE; + buf_info->flags = (FC_MBUF_PHYSONLY | FC_MBUF_DMA); + buf_info->align = 0; + buf_info->dma_handle = 0; + + /* Map page of memory associated with m_data for read/write */ + fc_malloc(p_dev_ctl, buf_info); + if (buf_info->phys == NULL) { + /* mapping that page failed */ + goto out; + } + fcnextpkt(mp) = (fcipbuf_t * )buf_info->phys; + fcsethandle(mp, buf_info->dma_handle); + } + /* map that page and save the address pair for lookup later */ + if (binfo->fc_flag & FC_SLI2) { + fc_mapvaddr(binfo, rp, (MATCHMAP * )mp, + (uint32 *) & icmd->un.cont64[i].addrHigh, + (uint32 *) & icmd->un.cont64[i].addrLow); + icmd->un.cont64[i].tus.f.bdeSize = FC_RCV_BUF_SIZE; + icmd->ulpCommand = CMD_QUE_RING_BUF64_CN; + } else { + fc_mapvaddr(binfo, rp, (MATCHMAP * )mp, + 0, (uint32 *) & icmd->un.cont[i].bdeAddress); + icmd->un.cont[i].bdeSize = FC_RCV_BUF_SIZE; + icmd->ulpCommand = CMD_QUE_RING_BUF_CN; + } + cnt--; + } + + icmd->ulpIoTag = tag; + icmd->ulpBdeCount = i; + icmd->ulpLe = 1; + + icmd->ulpOwner = OWN_CHIP; + + temp->bp = (uchar * )mp; /* used for delimiter between commands */ + + FCSTATCTR.cmdQbuf++; + issue_iocb_cmd(binfo, rp, temp); + } + + rp->fc_missbufcnt = 0; + return(0); +} /* End fc_post_mbuf */ + + +_static_ int +fc_free_iocb_buf( +fc_dev_ctl_t *p_dev_ctl, +RING *rp, +IOCBQ *temp) +{ + FC_BRD_INFO * binfo; + IOCB * cmd; + int i; + MATCHMAP * mp; + + binfo = &BINFO; + while (temp) { + cmd = &temp->iocb; + for (i = 0; i < (int)cmd->ulpBdeCount; i++) { + if (binfo->fc_flag & FC_SLI2) { + mp = fc_getvaddr(p_dev_ctl, rp, (uchar * ) + getPaddr(cmd->un.cont64[i].addrHigh, cmd->un.cont64[i].addrLow)); + } + else { + mp = fc_getvaddr(p_dev_ctl, rp, (uchar * )((ulong)cmd->un.cont[i].bdeAddress)); + } + + if (mp) { + if (rp->fc_ringno == FC_ELS_RING) { + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + } + else if (rp->fc_ringno == FC_IP_RING) { + fcipbuf_t * mbuf; + + mbuf = (fcipbuf_t * )mp; + fcnextdata(mbuf) = 0; + fcnextpkt(mbuf) = 0; + m_freem(mbuf); + } + } + } + switch (rp->fc_ringno) { + case FC_ELS_RING: + fc_post_buffer(p_dev_ctl, rp, i); + break; + case FC_IP_RING: + fc_post_mbuf(p_dev_ctl, rp, i); + break; + } + temp = (IOCBQ * )temp->q; + } + return(0); +} /* End fc_free_iocb_buf */ + + +/* + * Returns 0 if pn1 < pn2 + * Returns 1 if pn1 > pn2 + * Returns 2 if pn1 = pn2 + */ +_static_ int +fc_geportname( +NAME_TYPE *pn1, +NAME_TYPE *pn2) +{ + int i; + uchar * cp1, *cp2; + + i = sizeof(NAME_TYPE); + cp1 = (uchar * )pn1; + cp2 = (uchar * )pn2; + while (i--) { + if (*cp1 < *cp2) { + return(0); + } + if (*cp1 > *cp2) { + return(1); + } + cp1++; + cp2++; + } + + return(2); /* equal */ +} /* End fc_geportname */ + + +_local_ int +fc_ring_txcnt( +FC_BRD_INFO *binfo, +int flag) +{ + int sum = 0; + + if ((binfo->fc_flag & FC_SLI2) && (FCSTATCTR.linkEvent == 0)) + return(0); + + switch (flag) { + case FC_IP_RING: + sum += binfo->fc_ring[FC_IP_RING].fc_tx.q_cnt; + sum += binfo->fc_ring[FC_ELS_RING].fc_tx.q_cnt; + break; + case FC_FCP_RING: + sum += binfo->fc_ring[FC_FCP_RING].fc_tx.q_cnt; + sum += binfo->fc_ring[FC_ELS_RING].fc_tx.q_cnt; + break; + default: + sum = 1; + break; + } + return(sum); +} /* End fc_ring_txcnt */ + + +_local_ int +fc_ring_txpcnt( +FC_BRD_INFO *binfo, +int flag) +{ + int sum = 0; + + switch (flag) { + case FC_IP_RING: + sum += binfo->fc_ring[FC_IP_RING].fc_txp.q_cnt; + sum += binfo->fc_ring[FC_ELS_RING].fc_txp.q_cnt; + break; + case FC_FCP_RING: + sum += binfo->fc_ring[FC_FCP_RING].fc_txp.q_cnt; + sum += binfo->fc_ring[FC_ELS_RING].fc_txp.q_cnt; + break; + default: + sum = 1; + break; + } + return(sum); +} /* End fc_ring_txpcnt */ + + +/*****************************************************************************/ +/* + * NAME: fc_cmdring_timeout + * + * FUNCTION: Fibre Channel driver cmd ring watchdog timer timeout routine. + * + * EXECUTION ENVIRONMENT: interrupt only + * + * CALLED FROM: + * Timer function + * + * RETURNS: + * none + */ +/*****************************************************************************/ +_static_ void +fc_cmdring_timeout( +fc_dev_ctl_t * p_dev_ctl, +void *l1, +void *l2) +{ + FC_BRD_INFO * binfo; + RING * rp; + int i; + uint32 command; + uint32 * lp0; + IOCBQ * xmitiq; + IOCBQ * save; + IOCB * icmd; + MAILBOXQ * mb; + MATCHMAP * mp; + NODELIST * ndlp; + ELS_PKT * ep; + fcipbuf_t * p_mbuf; + fcipbuf_t * m_net; + + if (!p_dev_ctl) { + return; + } + rp = (RING *)l1; + RINGTMO = 0; + + binfo = &BINFO; + if ((xmitiq = fc_ringtxp_get(rp, 0)) != NULL) { + icmd = &xmitiq->iocb; + switch (icmd->ulpCommand) { + case CMD_ELS_REQUEST_CR: + case CMD_ELS_REQUEST64_CR: + mp = (MATCHMAP * )xmitiq->bp; + lp0 = (uint32 * )mp->virt; + command = *lp0; + switch (command) { + case ELS_CMD_FLOGI: /* Fabric login */ + fc_freenode_did(binfo, Fabric_DID, 1); + if (binfo->fc_ffstate == FC_FLOGI) { + binfo->fc_flag &= ~FC_FABRIC; + if (binfo->fc_topology == TOPOLOGY_LOOP) { + binfo->fc_edtov = FF_DEF_EDTOV; + binfo->fc_ratov = FF_DEF_RATOV; + if ((mb=(MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_config_link(p_dev_ctl, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) + != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + binfo->fc_flag |= FC_DELAY_DISC; + } else { + /* Device Discovery completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0220, /* ptr to msg structure */ + fc_mes0220, /* ptr to msg */ + fc_msgBlk0220.msgPreambleStr); /* begin & end varargs */ + binfo->fc_ffstate = FC_ERROR; + if ((mb=(MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_clear_la(binfo, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) + != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + } + } + break; + + case ELS_CMD_PLOGI: /* NPort login */ + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + icmd->un.elsreq.remoteID)) == 0) + break; + + /* If we are in the middle of Discovery */ + if (ndlp->nlp_action & NLP_DO_DISC_START) { + /* Goto next entry */ + fc_nextnode(p_dev_ctl, ndlp); + } + ndlp->nlp_flag &= ~NLP_REQ_SND; + + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + break; + + case ELS_CMD_PRLI: /* Process Log In */ + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + icmd->un.elsreq.remoteID)) == 0) + break; + + /* If we are in the middle of Discovery */ + if (ndlp->nlp_action & NLP_DO_DISC_START) { + /* Goto next entry */ + fc_nextnode(p_dev_ctl, ndlp); + } + ndlp->nlp_flag &= ~NLP_REQ_SND; + ndlp->nlp_state = NLP_LOGIN; + fc_nlp_unmap(binfo, ndlp); + break; + + case ELS_CMD_PDISC: /* Pdisc */ + case ELS_CMD_ADISC: /* Adisc */ + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + icmd->un.elsreq.remoteID)) == 0) + break; + + /* If we are in the middle of Address Authentication */ + if (ndlp->nlp_action & (NLP_DO_ADDR_AUTH)) { + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + + ndlp->nlp_action |= NLP_DO_DISC_START; + /* Goto next entry */ + fc_nextnode(p_dev_ctl, ndlp); + } else { + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + break; + + case ELS_CMD_LOGO: /* Logout */ + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, + icmd->un.elsreq.remoteID)) == 0) + break; + + /* If we are in the middle of Discovery */ + if (ndlp->nlp_action & NLP_DO_DISC_START) { + /* Goto next entry */ + fc_nextnode(p_dev_ctl, ndlp); + } + + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + break; + + case ELS_CMD_FARP: /* Farp-req */ + case ELS_CMD_FARPR: /* Farp-res */ + ep = (ELS_PKT * )lp0; + if((ndlp = fc_findnode_wwpn(binfo, NLP_SEARCH_ALL, + &ep->un.farp.RportName)) == 0) + break; + ndlp->nlp_flag &= ~NLP_FARP_SND; + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + + /* Check for a FARP generated nlplist entry */ + if (ndlp->nlp_DID == Bcast_DID) { + fc_freenode(binfo, ndlp, 1); + } + break; + + case ELS_CMD_SCR: /* State Change Registration */ + break; + + default: + FCSTATCTR.elsCmdPktInval++; + break; + } + if (xmitiq->bp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )xmitiq->bp); + } + if (xmitiq->info) { + fc_mem_put(binfo, MEM_BUF, (uchar * )xmitiq->info); + } + if ((binfo->fc_flag & FC_SLI2) && (xmitiq->bpl)) { + fc_mem_put(binfo, MEM_BPL, (uchar * )xmitiq->bpl); + } + break; + + case CMD_XMIT_ELS_RSP_CX: + case CMD_XMIT_ELS_RSP64_CX: + ndlp = (NODELIST * )xmitiq->ndlp; + /* No retries */ + if ((ndlp) && (ndlp->nlp_flag & NLP_RM_ENTRY) && + !(ndlp->nlp_flag & NLP_REQ_SND)) { + if (ndlp->nlp_type & NLP_FCP_TARGET) { + ndlp->nlp_flag &= ~NLP_RM_ENTRY; + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + if(binfo->fc_ffstate == FC_READY) { + if ((ndlp->nlp_flag & NLP_NODEV_TMO) && + (ndlp->nlp_DID != (uint32)0)) { + ndlp->nlp_flag |= NLP_NODEV_TMO; + if(!(ndlp->nlp_flag & NLP_NS_REMOVED)) { + fc_els_cmd(binfo, ELS_CMD_PLOGI, + (void *)((ulong)ndlp->nlp_DID), (uint32)0, (ushort)0, ndlp); + } + } + if(!(binfo->fc_flag & FC_RSCN_MODE)) { + binfo->fc_flag |= FC_RSCN_MODE; + ndlp->nlp_action |= NLP_DO_RSCN; + ndlp->nlp_flag &= ~NLP_NODEV_TMO; + fc_nextrscn(p_dev_ctl, 1); + } + } + else { + ndlp->nlp_action |= NLP_DO_DISC_START; + fc_nextdisc(p_dev_ctl, 1); + } + } else + fc_freenode_did(binfo, ndlp->nlp_DID, 0); + } + if (xmitiq->bp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )xmitiq->bp); + } + if ((binfo->fc_flag & FC_SLI2) && (xmitiq->bpl)) { + fc_mem_put(binfo, MEM_BPL, (uchar * )xmitiq->bpl); + } + break; + + case CMD_ABORT_XRI_CN: + break; + + case CMD_CREATE_XRI_CR: + break; + + case CMD_XMIT_SEQUENCE_CX: + case CMD_XMIT_BCAST_CN: + case CMD_XMIT_SEQUENCE64_CX: + case CMD_XMIT_BCAST64_CN: + if (rp->fc_ringno != FC_IP_RING) { + break; + } + NDDSTAT.ndd_xmitque_cur--; + /* get mbuf ptr for completed xmit */ + m_net = (fcipbuf_t * )xmitiq->bp; + /* Loop through iocb chain unmap memory pages associated with mbuf */ + if (binfo->fc_flag & FC_SLI2) { + ULP_BDE64 * bpl; + MATCHMAP * bmp; + + bmp = (MATCHMAP * )xmitiq->bpl; + bpl = (ULP_BDE64 * )bmp->virt; + while (bpl && xmitiq->iocb.un.xseq64.bdl.bdeSize) { + fc_bufunmap(p_dev_ctl, (uchar *)getPaddr(bpl->addrHigh, bpl->addrLow), 0, bpl->tus.f.bdeSize); + bpl++; + xmitiq->iocb.un.xseq64.bdl.bdeSize -= sizeof(ULP_BDE64); + } + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + xmitiq = 0; + } else { + while (xmitiq) { + for (i = 0; i < (int)xmitiq->iocb.ulpBdeCount; i++) { + fc_bufunmap(p_dev_ctl, (uchar *)((ulong)xmitiq->iocb.un.cont[i].bdeAddress), 0, (uint32)xmitiq->iocb.un.cont[i].bdeSize); + } + save = (IOCBQ * )xmitiq->q; + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + xmitiq = save; + } + } + + /* free mbuf */ + if (m_net) { + p_mbuf = fcnextdata(m_net); + fcnextdata(m_net) = 0; + fcfreehandle(p_dev_ctl, m_net); + m_freem(m_net); + if (p_mbuf) { + fcfreehandle(p_dev_ctl, p_mbuf); + m_freem(p_mbuf); + } + } + break; + + default: + break; + } + if (xmitiq) + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + /* Command ring timeout */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1401, /* ptr to msg structure */ + fc_mes1401, /* ptr to msg */ + fc_msgBlk1401.msgPreambleStr, /* begin varargs */ + rp->fc_ringno, + icmd->ulpCommand ); /* end varargs */ + } else { + /* Command ring timeout */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1402, /* ptr to msg structure */ + fc_mes1402, /* ptr to msg */ + fc_msgBlk1402.msgPreambleStr, /* begin varargs */ + rp->fc_ringno ); /* end varargs */ + } + + if ((rp->fc_ringno == FC_IP_RING) && + (binfo->fc_flag & FC_LNK_DOWN)) { + IOCBQ * xmitiq; + + /* If linkdown, flush out tx and txp queues */ + /* get next command from ring xmit queue */ + while ((xmitiq = fc_ringtx_drain(rp)) != 0) { + fc_freebufq(p_dev_ctl, rp, xmitiq); + } + + /* look up xmit next compl */ + while ((xmitiq = fc_ringtxp_get(rp, 0)) != 0) { + fc_freebufq(p_dev_ctl, rp, xmitiq); + } + NDDSTAT.ndd_xmitque_cur = 0; + } + + return; +} /* End fc_cmdring_timeout */ + + +/*****************************************************************************/ +/* + * NAME: fc_linkdown_timeout + * + * FUNCTION: Fibre Channel driver link down watchdog timer timeout routine. + * + * EXECUTION ENVIRONMENT: interrupt only + * + * CALLED FROM: + * Timer function + * + * RETURNS: + * none + */ +/*****************************************************************************/ +_static_ void +fc_linkdown_timeout( +fc_dev_ctl_t * p_dev_ctl, +void *l1, +void *l2) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + RING * rp; + NODELIST * ndlp; + NODELIST * new_ndlp; + + if (!p_dev_ctl) { + return; + } + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + rp = &binfo->fc_ring[FC_FCP_RING]; + RINGTMO = 0; + + /* EXPIRED linkdown timer */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0750, /* ptr to msg structure */ + fc_mes0750, /* ptr to msg */ + fc_msgBlk0750.msgPreambleStr, /* begin varargs */ + (ulong)binfo->fc_ffstate ); /* end varargs */ + if (binfo->fc_ffstate == FC_READY) { + return; + } + + if ((binfo->fc_ffstate > FC_LINK_DOWN) && + (binfo->fc_ffstate < FC_READY)) { + + /* Set the link down watchdog timer expired flag */ + binfo->fc_flag |= FC_LD_TIMEOUT; + goto out; + } + + /* Since the link has been down for so long, call fc_freenode for all + * SCSI device and clear out all SCSI queues + */ + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + new_ndlp = (NODELIST *)ndlp->nlp_listp_next; + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + ndlp = new_ndlp; + } + + /* Set the link down watchdog timer expired flag */ + binfo->fc_flag |= FC_LD_TIMEOUT; + + if((clp[CFG_LINKDOWN_TMO].a_current) && (clp[CFG_HOLDIO].a_current == 0)) { + fc_failio(p_dev_ctl); + } + +out: + + return; +} /* End fc_linkdown_timeout */ + + +/*****************************************************************************/ +/* + * NAME: fc_mbox_timeout + * + * FUNCTION: Fibre Channel driver mailbox watchdog timer timeout routine. + * + * EXECUTION ENVIRONMENT: interrupt only + * + * CALLED FROM: + * Timer function + * + * RETURNS: + * none + */ +/*****************************************************************************/ +_static_ void +fc_mbox_timeout( +fc_dev_ctl_t * p_dev_ctl, +void *l1, +void *l2) +{ + FC_BRD_INFO * binfo; + MAILBOXQ * mbox; + MAILBOX * swpmb, *mb; + void *ioa; + volatile uint32 word0; + + if (!p_dev_ctl) { + return; + } + + binfo = &BINFO; + MBOXTMO = 0; + + binfo->fc_mbox_active = 0; + + if (binfo->fc_flag & FC_SLI2) { + fc_mpdata_sync(binfo->fc_slim2.dma_handle, 0, 0, + DDI_DMA_SYNC_FORKERNEL); + /* First copy command data */ + mb = FC_SLI2_MAILBOX(binfo); + word0 = *((volatile uint32 * )mb); + word0 = PCIMEM_LONG(word0); + } else { + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + mb = FC_MAILBOX(binfo, ioa); + word0 = READ_SLIM_ADDR(binfo, ((volatile uint32 * )mb)); + FC_UNMAP_MEMIO(ioa); + } + swpmb = (MAILBOX * ) & word0; + + /* Mailbox command timeout, status fc_brd_no, + &fc_msgBlk0310, /* ptr to msg structure */ + fc_mes0310, /* ptr to msg */ + fc_msgBlk0310.msgPreambleStr, /* begin varargs */ + swpmb->mbxCommand, + swpmb->mbxStatus); /* end varargs */ + if ((mbox = fc_mbox_get(binfo))) { + if (issue_mb_cmd(binfo, (MAILBOX * )mbox, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mbox); + } + } + + return; +} /* End fc_mbox_timeout */ + + + +/*****************************************************************************/ +/* + * NAME: fc_fabric_timeout + * + * FUNCTION: Fibre Channel driver fabric watchdog timer timeout routine. + * + * EXECUTION ENVIRONMENT: interrupt only + * + * CALLED FROM: + * Timer function + * + * RETURNS: + * none + */ +/*****************************************************************************/ +_static_ void +fc_fabric_timeout( +fc_dev_ctl_t * p_dev_ctl, +void *l1, +void *l2) +{ + FC_BRD_INFO * binfo; + NODELIST * ndlp; + NODELIST * new_ndlp; + MAILBOXQ * mb; + iCfgParam * clp; + + if (!p_dev_ctl) { + return; + } + + binfo = &BINFO; + FABRICTMO = 0; + + /* Check for wait for FAN timeout */ + if (binfo->fc_ffstate == FC_FLOGI) { + if((binfo->fc_topology == TOPOLOGY_LOOP) && + (binfo->fc_flag & FC_PUBLIC_LOOP)) { + /* FAN timeout */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0221, /* ptr to msg structure */ + fc_mes0221, /* ptr to msg */ + fc_msgBlk0221.msgPreambleStr); /* begin & end varargs */ + } + else { + /* Initial FLOGI timeout */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0222, /* ptr to msg structure */ + fc_mes0222, /* ptr to msg */ + fc_msgBlk0222.msgPreambleStr); /* begin & end varargs */ + } + + fc_freenode_did(binfo, Fabric_DID, 1); + /* FAN timeout, so just do FLOGI instead */ + /* Now build FLOGI payload and issue ELS command */ + fc_els_cmd(binfo, ELS_CMD_FLOGI, (void *)Fabric_DID, + (uint32)0, (ushort)0, (NODELIST *)0); + goto out; + } + + /* Check for wait for NameServer Rsp timeout */ + if (binfo->fc_ffstate == FC_NS_REG) { + /* NameServer Registration timeout */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0223, /* ptr to msg structure */ + fc_mes0223, /* ptr to msg */ + fc_msgBlk0223.msgPreambleStr, /* begin varargs */ + binfo->fc_ns_retry, + fc_max_ns_retry); /* end varargs */ + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, NameServer_DID))) { + if(binfo->fc_ns_retry) { + if(binfo->fc_ns_retry < fc_max_ns_retry) { + /* Try it one more time */ + if (fc_ns_cmd(p_dev_ctl, ndlp, SLI_CTNS_RFT_ID) == 0) { + goto out; + } + } + binfo->fc_ns_retry = 0; + } + /* Complete discovery, then issue an INIT_LINK */ + goto ns_tmout; + } + goto out; + } + + /* Check for wait for NameServer Rsp timeout */ + if (binfo->fc_ffstate == FC_NS_QRY) { + /* NameServer Query timeout */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0224, /* ptr to msg structure */ + fc_mes0224, /* ptr to msg */ + fc_msgBlk0224.msgPreambleStr, /* begin varargs */ + binfo->fc_ns_retry, + fc_max_ns_retry); /* end varargs */ + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, NameServer_DID))) { + if(binfo->fc_ns_retry) { + if(binfo->fc_ns_retry < fc_max_ns_retry) { + /* Try it one more time */ + if (fc_ns_cmd(p_dev_ctl, ndlp, SLI_CTNS_GID_FT) == 0) { + goto out; + } + } + binfo->fc_ns_retry = 0; + } + +ns_tmout: + /* Complete discovery, then issue an INIT_LINK */ + /* This should turn off DELAYED ABTS for ELS timeouts */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX))) { + fc_set_slim(binfo, (MAILBOX * )mb, 0x052198, 0); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + + /* Nothing to authenticate, so CLEAR_LA right now */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + binfo->fc_ffstate = FC_CLEAR_LA; + fc_clear_la(binfo, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + /* Device Discovery completes */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0225, /* ptr to msg structure */ + fc_mes0225, /* ptr to msg */ + fc_msgBlk0225.msgPreambleStr); /* begin & end varargs */ + } else { + /* Device Discovery completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0226, /* ptr to msg structure */ + fc_mes0226, /* ptr to msg */ + fc_msgBlk0226.msgPreambleStr); /* begin & end varargs */ + binfo->fc_ffstate = FC_ERROR; + } + + binfo->fc_firstopen++; + if(binfo->fc_firstopen >= fc_max_ns_retry) { + goto out; + } + + /* Get a buffer to use for the mailbox command */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + /* Setup and issue mailbox INITIALIZE LINK command */ + fc_linkdown(p_dev_ctl); + fc_init_link(binfo, (MAILBOX * )mb, clp[CFG_TOPOLOGY].a_current, + clp[CFG_LINK_SPEED].a_current); + ((MAILBOX *)mb)->un.varInitLnk.lipsr_AL_PA = 0; + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + goto out; + } + + /* Check for Node Authentication timeout */ + if (binfo->fc_ffstate == FC_LOOP_DISC) { + int disc; + + disc = 0; + /* Node Authentication timeout */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0227, /* ptr to msg structure */ + fc_mes0227, /* ptr to msg */ + fc_msgBlk0227.msgPreambleStr); /* begin & end varargs */ + ndlp = binfo->fc_nlpbind_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + new_ndlp = (NODELIST *)ndlp->nlp_listp_next; + + /* Clean up all nodes marked for authentication */ + if (ndlp->nlp_action & NLP_DO_ADDR_AUTH) { + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + if (ndlp->nlp_DID != NameServer_DID) { + ndlp->nlp_action |= NLP_DO_DISC_START; + disc++; + } + } + else if (ndlp->nlp_action & NLP_DO_DISC_START) { + if (ndlp->nlp_DID != NameServer_DID) { + disc++; + } + } + ndlp = new_ndlp; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + if(disc) { + fc_nextdisc(p_dev_ctl, fc_max_els_sent); + } + else { + goto ns_tmout; + } + goto out; + } + + /* Check for Node Discovery timeout */ + if (binfo->fc_ffstate == FC_NODE_DISC) { + /* Node Discovery timeout */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0228, /* ptr to msg structure */ + fc_mes0228, /* ptr to msg */ + fc_msgBlk0228.msgPreambleStr); /* begin & end varargs */ + ndlp = binfo->fc_nlpbind_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + new_ndlp = (NODELIST *)ndlp->nlp_listp_next; + + /* Clean up all nodes marked for discovery/authentication */ + if (ndlp->nlp_action & (NLP_DO_ADDR_AUTH | NLP_DO_DISC_START)) { + /* Node Discovery timeout */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0229, /* ptr to msg structure */ + fc_mes0229, /* ptr to msg */ + fc_msgBlk0229.msgPreambleStr, /* begin varargs */ + ndlp->nlp_DID, + ndlp->nlp_flag, + ndlp->nlp_state, + ndlp->nlp_type); /* end varargs */ + ndlp->nlp_flag &= ~(NLP_REQ_SND | NLP_REG_INP | NLP_REQ_SND_ADISC); + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + ndlp = new_ndlp; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + /* Nothing to discover, so CLEAR_LA right now */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + binfo->fc_ffstate = FC_CLEAR_LA; + fc_clear_la(binfo, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb,MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } else { + /* Device Discovery completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0230, /* ptr to msg structure */ + fc_mes0230, /* ptr to msg */ + fc_msgBlk0230.msgPreambleStr); /* begin & end varargs */ + binfo->fc_ffstate = FC_ERROR; + } + goto out; + } + + /* Check for RSCN timeout */ + if ((binfo->fc_flag & FC_RSCN_MODE) && (binfo->fc_ffstate == FC_READY)) { + + if(binfo->fc_ns_retry) { + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, NameServer_DID))) { + if(binfo->fc_ns_retry < fc_max_ns_retry) { + /* Try it one more time */ + if (fc_ns_cmd(p_dev_ctl, ndlp, SLI_CTNS_GID_FT) == 0) { + goto out; + } + } + } + } + /* RSCN timeout */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0231, /* ptr to msg structure */ + fc_mes0231, /* ptr to msg */ + fc_msgBlk0231.msgPreambleStr, /* begin varargs */ + binfo->fc_ns_retry, + fc_max_ns_retry ); /* end varargs */ + ndlp = binfo->fc_nlpbind_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + new_ndlp = (NODELIST *)ndlp->nlp_listp_next; + + /* Clean up all nodes marked for rscn */ + if (ndlp->nlp_action & NLP_DO_RSCN) { + /* Node RSCN timeout */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0232, /* ptr to msg structure */ + fc_mes0232, /* ptr to msg */ + fc_msgBlk0232.msgPreambleStr, /* begin varargs */ + ndlp->nlp_DID, + ndlp->nlp_flag, + ndlp->nlp_state, + ndlp->nlp_type); /* end varargs */ + ndlp->nlp_flag &= ~(NLP_REQ_SND | NLP_REG_INP | NLP_REQ_SND_ADISC); + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + ndlp = new_ndlp; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + + binfo->fc_flag &= ~FC_NLP_MORE; + binfo->fc_nlp_cnt = 0; + binfo->fc_ns_retry = 0; + /* fc_nextrscn(p_dev_ctl, fc_max_els_sent); */ + fc_rlip(p_dev_ctl); + goto out; + } + + /* Check for pt2pt link up timeout */ + if ((binfo->fc_flag & FC_PT2PT) && (binfo->fc_ffstate != FC_READY)) { + /* PT2PT link up timeout */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0233, /* ptr to msg structure */ + fc_mes0233, /* ptr to msg */ + fc_msgBlk0233.msgPreambleStr); /* begin & end varargs */ + binfo->fc_ffstate = FC_LINK_UP; + binfo->fc_flag &= ~(FC_LNK_DOWN | FC_PT2PT | FC_PT2PT_PLOGI | + FC_LBIT | FC_RSCN_MODE | FC_NLP_MORE | + FC_RSCN_DISC_TMR | FC_RSCN_DISCOVERY); + + binfo->fc_myDID = 0; + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + binfo->fc_ffstate = FC_CFG_LINK; + fc_config_link(p_dev_ctl, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + goto out; + } + +out: + return; +} /* End fc_fabric_timeout */ + + +/*****************************************************************************/ +/* + * NAME: fc_delay_timeout + * + * FUNCTION: Fibre Channel driver delay watchdog timer timeout routine. + * + * EXECUTION ENVIRONMENT: interrupt only + * + * CALLED FROM: + * Timer function + * + * RETURNS: + * none + */ +/*****************************************************************************/ +_static_ void +fc_delay_timeout( +fc_dev_ctl_t * p_dev_ctl, +void *l1, +void *l2) +{ + FC_BRD_INFO * binfo; + IOCBQ * iocbq; + RING * rp; + MATCHMAP * rmp; + NODELIST * ndlp; + + binfo = &BINFO; + rp = &binfo->fc_ring[FC_ELS_RING]; + iocbq = (IOCBQ *)l1; + + if(((rmp = (MATCHMAP *)iocbq->info) != 0) && + ((ndlp = (NODELIST *)rmp->fc_mptr) != 0)) { + /* Don't send PLOGI if we are already logged in! */ + if(ndlp->nlp_state >= NLP_LOGIN) { + if(iocbq->bp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )iocbq->bp); + } + if (iocbq->info) { + fc_mem_put(binfo, MEM_BUF, (uchar * )iocbq->info); + } + if (iocbq->bpl) { + fc_mem_put(binfo, MEM_BPL, (uchar * )iocbq->bpl); + } + + fc_mem_put(binfo, MEM_IOCB, (uchar * )iocbq); + return; + } + } + /* Delayxmit ELS command timeout */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0136, /* ptr to msg structure */ + fc_mes0136, /* ptr to msg */ + fc_msgBlk0136.msgPreambleStr, /* begin varargs */ + iocbq->iocb.ulpCommand, + iocbq->iocb.ulpIoTag, + iocbq->retry, + iocbq->iocb.un.elsreq.remoteID); /* end varargs */ + issue_iocb_cmd(binfo, rp, iocbq); + + if (((binfo->fc_flag & FC_RSCN_MODE) && (binfo->fc_ffstate == FC_READY)) || + (binfo->fc_ffstate == FC_LOOP_DISC) || + (binfo->fc_ffstate == FC_NODE_DISC)) { + binfo->fc_fabrictmo = (2 * binfo->fc_ratov) + + ((4 * binfo->fc_edtov) / 1000) + 1; + if(FABRICTMO) { + fc_clk_res(p_dev_ctl, binfo->fc_fabrictmo, FABRICTMO); + } + else { + FABRICTMO = fc_clk_set(p_dev_ctl, binfo->fc_fabrictmo, + fc_fabric_timeout, 0, 0); + } + } + + return; +} + +/*****************************************************************************/ +/* + * NAME: fc_nodev_timeout + * + * FUNCTION: Fibre Channel driver FCP device disappearing timeout routine. + * + * EXECUTION ENVIRONMENT: interrupt only + * + * CALLED FROM: + * Timer interrupt + * + * INPUT: + * tp - pointer to the timer structure + * + * RETURNS: + * none + */ +/*****************************************************************************/ +_static_ void +fc_nodev_timeout( +fc_dev_ctl_t * p_dev_ctl, +void * np, +void *l2) +{ + node_t * nodep; + dvi_t * dev_ptr; + FC_BRD_INFO * binfo; + iCfgParam * clp; + NODELIST * ndlp; + RING * rp; + IOCBQ * temp; + IOCBQ * nexttemp, *prevtemp; + IOCB * cmd; + unsigned long iflag; + + nodep = (node_t *)np; + binfo = &BINFO; + rp = &binfo->fc_ring[FC_FCP_RING]; + if(nodep) { + uint32 did; + uint32 pan; + uint32 sid; + uint32 rpi; + + clp = DD_CTL.p_config[p_dev_ctl->info.fc_brd_no]; + if(nodep->rpi != 0xfffe) + rpi = nodep->rpi; + else + rpi = 0; + + if((ndlp = nodep->nlp) == 0) { + /* + * Find the target from the nlplist based on SCSI ID + */ + ndlp = fc_findnode_scsid(binfo, NLP_SEARCH_MAPPED, nodep->scsi_id); + } + + if (ndlp) { + RING * rp; + IOCBQ * iocbq; + + /* EXPIRED nodev timer */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0751, /* ptr to msg structure */ + fc_mes0751, /* ptr to msg */ + fc_msgBlk0751.msgPreambleStr, /* begin varargs */ + (ulong)ndlp, + ndlp->nlp_flag, + ndlp->nlp_state, + ndlp->nlp_DID); /* end varargs */ + pan = ndlp->id.nlp_pan; + sid = ndlp->id.nlp_sid; + ndlp->nlp_flag &= ~NLP_NODEV_TMO; + did = ndlp->nlp_DID; + if(ndlp->nlp_Rpi) + rpi = ndlp->nlp_Rpi; + if(did == 0) { + if((ndlp->nlp_type & (NLP_AUTOMAP | NLP_SEED_MASK)) && + (ndlp->nlp_state == NLP_LIMBO) && ndlp->nlp_oldDID) + did = ndlp->nlp_oldDID; + + if (ndlp->nlp_flag & NLP_REQ_SND) { + /* Look through ELS ring and abort ELS cmd */ + rp = &binfo->fc_ring[FC_ELS_RING]; + iocbq = (IOCBQ * )(rp->fc_txp.q_first); + while (iocbq) { + if(iocbq->iocb.un.elsreq.remoteID == did) { + iocbq->retry = 0xff; + if((binfo->fc_flag & FC_RSCN_MODE) || + (binfo->fc_ffstate < FC_READY)) { + if((ndlp->nlp_state >= NLP_PLOGI) && + (ndlp->nlp_state <= NLP_PRLI)) { + ndlp->nlp_action &= ~NLP_DO_RSCN; + binfo->fc_nlp_cnt--; + if ((ndlp->nlp_type & NLP_IP_NODE) && ndlp->nlp_bp) { + m_freem((fcipbuf_t *)ndlp->nlp_bp); + ndlp->nlp_bp = (uchar * )0; + } + } + } + } + iocbq = (IOCBQ * )iocbq->q; + } + /* In case its on fc_delay_timeout list */ + fc_abort_delay_els_cmd(p_dev_ctl, ndlp->nlp_DID); + } + } + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } else { + did = 0; + pan = 0; + sid = 0; + } + /* Device disappeared, nodev timeout */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0752, /* ptr to msg structure */ + fc_mes0752, /* ptr to msg */ + fc_msgBlk0752.msgPreambleStr, /* begin varargs */ + did, + sid, + pan, + clp[CFG_NODEV_TMO].a_current); /* end varargs */ + nodep->flags |= FC_NODEV_TMO; + nodep->flags &= ~FC_FCP2_RECOVERY; + nodep->nodev_tmr = 0; + for (dev_ptr = nodep->lunlist; dev_ptr != NULL; + dev_ptr = dev_ptr->next) { + + /* UNREG_LOGIN from freenode should abort txp I/Os */ + if(ndlp == 0) { + /* First send ABTS on outstanding I/Os in txp queue */ + fc_abort_fcp_txpq(binfo, dev_ptr); + } + + fc_fail_pendq(dev_ptr, ENXIO, STAT_ABORTED); + fc_fail_cmd(dev_ptr, ENXIO, STAT_ABORTED); + fc_return_standby_queue(dev_ptr, ENXIO, STAT_ABORTED); + + /* Call iodone for all the CLEARQ error bufs */ + fc_free_clearq(dev_ptr); + } + /* fail everything on txq that matches rpi */ + iflag = lpfc_q_disable_lock(p_dev_ctl); + prevtemp = 0; + temp = (IOCBQ *)rp->fc_tx.q_first; + while (temp != NULL) { + nexttemp = (IOCBQ *)temp->q; + cmd = &temp->iocb; + if(cmd->ulpContext == rpi) { + if(prevtemp) + prevtemp->q = (uchar *)nexttemp; + else + rp->fc_tx.q_first = (uchar *)nexttemp; + if(rp->fc_tx.q_last == (uchar * )temp) { + rp->fc_tx.q_last =0; + break; + } + cmd->ulpStatus = IOSTAT_LOCAL_REJECT; + cmd->un.grsp.perr.statLocalError = IOERR_INVALID_RPI; + + lpfc_q_unlock_enable(p_dev_ctl, iflag); + handle_fcp_event(p_dev_ctl, rp, temp); + iflag = lpfc_q_disable_lock(p_dev_ctl); + + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + } + else + prevtemp = temp; + + if(rp->fc_tx.q_last == (uchar * )temp) + break; + temp = nexttemp; + } + lpfc_q_unlock_enable(p_dev_ctl, iflag); + } +} + +/*****************************************************************************/ +/* + * NAME: fc_rscndisc_timeout + * + * FUNCTION: Fibre Channel driver RSCN timer timeout routine. + * + * EXECUTION ENVIRONMENT: interrupt only + * + * CALLED FROM: + * Timer function + * + * RETURNS: + * none + */ +/*****************************************************************************/ +_local_ void +fc_rscndisc_timeout( +fc_dev_ctl_t * p_dev_ctl, +void *l1, +void *l2) +{ + FC_BRD_INFO * binfo; + + binfo = &BINFO; + binfo->fc_flag |= (FC_RSCN_DISC_TMR | FC_RSCN_DISCOVERY); + /* EXPIRED RSCN disc timer */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0252, /* ptr to msg structure */ + fc_mes0252, /* ptr to msg */ + fc_msgBlk0252.msgPreambleStr, /* begin varargs */ + (ulong)binfo->fc_flag ); /* end varargs */ + fc_nextrscn(p_dev_ctl, fc_max_els_sent); +} + +_static_ int +fc_free_fcp_txq( +fc_dev_ctl_t * p_dev_ctl, +uint32 iotag) +{ + FC_BRD_INFO * binfo; + RING * rp; + IOCBQ * temp; + IOCBQ * prev_temp; + IOCB * cmd; + unsigned long iflag; + + iflag = lpfc_q_disable_lock(p_dev_ctl); + binfo = &BINFO; + rp = &binfo->fc_ring[FC_FCP_RING]; + + /* Check to see if iotag is still queued on txq */ + prev_temp = 0; + temp = (IOCBQ *)(rp->fc_tx.q_first); + while(temp) { + cmd = &temp->iocb; + if(iotag == cmd->ulpIoTag) { + /* A match so dequeue it */ + if(prev_temp) { + prev_temp->q = temp->q; + } + else { + rp->fc_tx.q_first = (uchar *)(temp->q); + } + if(rp->fc_tx.q_last == (uchar * )temp) + rp->fc_tx.q_last = (uchar * )prev_temp; + rp->fc_tx.q_cnt--; + prev_temp = temp; + temp = (IOCBQ *)(temp->q); + fc_mem_put(binfo, MEM_IOCB, (uchar * )prev_temp); + lpfc_q_unlock_enable(p_dev_ctl, iflag); + return(1); + } + prev_temp = temp; + temp = (IOCBQ *)(temp->q); + } + lpfc_q_unlock_enable(p_dev_ctl, iflag); + return(0); +} /* End fc_free_fcp_txq */ + +/*****************************************************************************/ +/* + * NAME: fc_scsi_timeout + * + * FUNCTION: Fibre Channel driver SCSI FCP timeout routine. + * + * EXECUTION ENVIRONMENT: interrupt only + * + * CALLED FROM: + * Timer interrupt + * + * INPUT: + * tp - pointer to the timer structure + * + * RETURNS: + * none + */ +/*****************************************************************************/ +_static_ void +fc_scsi_timeout( +fc_dev_ctl_t * p, +void *l1, +void *l2) +{ + fc_dev_ctl_t * p_dev_ctl; + FC_BRD_INFO * binfo; + iCfgParam * clp; + RING * rp; + fc_buf_t * fcptr, *next_fcptr; + T_SCSIBUF * sbp; + struct buf * clrptr; + dvi_t * dev_ptr; + int j, ipri, do_rlip; + uint32 now; + + curtime(&now); + + /* + * Search through all outstanding SCSI commands for any that timed out + */ + for (j = 0; j < MAX_FC_BRDS; j++) { + p_dev_ctl = DD_CTL.p_dev[j]; + if (p_dev_ctl) { + do_rlip = 0; + binfo = &BINFO; + if(binfo->fc_flag & FC_ESTABLISH_LINK) { + continue; + } + clp = DD_CTL.p_config[binfo->fc_brd_no]; + if (clp[CFG_FCP_ON].a_current) { + rp = &binfo->fc_ring[FC_FCP_RING]; + + if(((clp[CFG_LINKDOWN_TMO].a_current == 0) || + clp[CFG_HOLDIO].a_current) && (binfo->fc_ffstate != FC_READY)) { + continue; + } + + ipri = disable_lock(FC_LVL, &CMD_LOCK); + fcptr = (fc_buf_t * ) rp->fc_txp.q_first; + while (fcptr != NULL) { + next_fcptr = fcptr->fc_fwd; + + if(fcptr->dev_ptr->queue_state == ACTIVE_PASSTHRU) { + /* Don't manage PASSTRU CMD HERE */ + fc_free_fcp_txq(p_dev_ctl, fcptr->iotag); + fcptr = next_fcptr; + continue; + } /* end ACTIVE_PASSTHRU management */ + + if(ntimercmp(fcptr->timeout, now, < ) && + ntimerisset(&fcptr->timeout)) { + + { + uint32 did; + uint32 pan; + uint32 sid; + + dev_ptr = fcptr->dev_ptr; + if ((dev_ptr->nodep) && (dev_ptr->nodep->nlp)) { + did = dev_ptr->nodep->nlp->nlp_DID; + pan = dev_ptr->nodep->nlp->id.nlp_pan; + sid = dev_ptr->nodep->nlp->id.nlp_sid; + } else { + did = 0; + pan = 0; + sid = 0; + } + /* SCSI timeout */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0754, /* ptr to msg structure */ + fc_mes0754, /* ptr to msg */ + fc_msgBlk0754.msgPreambleStr, /* begin varargs */ + did, + FC_SCSID(pan, sid) ); /* end varargs */ + } + if (!(fcptr->flags & FCBUF_ABTS2)) { + /* Operation timeout, send ABTS for this exchange */ + if (fc_abort_xri(binfo, fcptr->dev_ptr, + fcptr->iotag, ABORT_TYPE_ABTS)) { + /* ABTS not sent this time, out of IOCBs */ + goto skip_rlip; + } else { + if (fcptr->flags & FCBUF_ABTS) { + /* Second ABTS sent for this command */ + fcptr->flags |= FCBUF_ABTS2; + } else { + /* First ABTS sent for this command */ + fcptr->flags |= FCBUF_ABTS; + } + } + fcptr = next_fcptr; + continue; + } + + /* Operation timeout, start loop initialization (LIP) */ + if (dev_ptr->queue_state != STOPPING) { + dev_ptr->queue_state = HALTED; + } + + do_rlip = 1; + +skip_rlip: + sbp = fcptr->sc_bufp; + fc_deq_fcbuf_active(rp, fcptr->iotag); + + sbp->bufstruct.b_error = ETIMEDOUT; + sbp->bufstruct.b_flags |= B_ERROR; + sbp->bufstruct.b_resid = sbp->bufstruct.b_bcount; + sbp->status_validity = SC_ADAPTER_ERROR; + SET_ADAPTER_STATUS(sbp, SC_CMD_TIMEOUT) + + if (fcptr->fcp_cmd.fcpCntl2) { + /* This is a task management command */ + dev_ptr->ioctl_errno = ETIMEDOUT; + + if (dev_ptr->ioctl_wakeup == 1) { + dev_ptr->ioctl_wakeup = 0; + + fc_admin_wakeup(p_dev_ctl, dev_ptr, sbp); + } + } else { + /* Don't iodone this buf until adapter cleared out */ + if(fcptr->flags & FCBUF_INTERNAL) { + if(fcptr->fcp_cmd.fcpCdb[0] != FCP_SCSI_REPORT_LUNS) { + fc_free(p_dev_ctl, (MBUF_INFO *)sbp); + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )sbp); + + if((fcptr->fcp_cmd.fcpCdb[0] == FCP_SCSI_REPORT_LUNS) && + (dev_ptr->nodep) && + (dev_ptr->nodep->rptlunstate == REPORT_LUN_ONGOING)) { + dev_ptr->nodep->flags &= ~RETRY_RPTLUN; + dev_ptr->nodep->rptlunstate = REPORT_LUN_REQUIRED; + } + } + else { + if (p_dev_ctl->timeout_head == NULL) + p_dev_ctl->timeout_head = (struct buf *)sbp; + else { + clrptr = p_dev_ctl->timeout_head; + while (clrptr->av_forw) + clrptr = clrptr->av_forw; + clrptr->av_forw = (struct buf *)sbp; + } + p_dev_ctl->timeout_count++; + } + dev_ptr->active_io_count--; + dev_ptr->nodep->num_active_io--; + sbp->bufstruct.av_forw = NULL; + } + + fc_free_fcp_txq(p_dev_ctl, fcptr->iotag); + fc_enq_fcbuf(fcptr); + } + fcptr = next_fcptr; + } + unlock_enable(ipri, &CMD_LOCK); + } + + /* fix multiple init_link problem */ + if(do_rlip) { + ipri = disable_lock(FC_LVL, &CMD_LOCK); + fc_rlip(p_dev_ctl); + unlock_enable(ipri, &CMD_LOCK); + } + continue; + } + } + + SCSI_TMO = fc_clk_set(0, 5, fc_scsi_timeout, 0, 0); + return; +} /* End fc_scsi_timeout */ + +_static_ int +fc_abort_fcp_txpq( +FC_BRD_INFO *binfo, +dvi_t *dev_ptr) +{ + fc_buf_t * fcptr1, * next_fcptr; + RING * rp; + int cnt; + fc_dev_ctl_t * p_dev_ctl; + unsigned long iflag; + + p_dev_ctl = (fc_dev_ctl_t *)binfo->fc_p_dev_ctl; + iflag = lpfc_q_disable_lock(p_dev_ctl); + rp = &binfo->fc_ring[FC_FCP_RING]; + cnt = 0; + + /* send ABTS on any outstanding I/O in txp queue */ + fcptr1 = (fc_buf_t *)rp->fc_txp.q_first; + while (fcptr1 != NULL) { + next_fcptr = fcptr1->fc_fwd; + if (fcptr1->dev_ptr == dev_ptr) { + lpfc_q_unlock_enable(p_dev_ctl, iflag); + fc_abort_xri(binfo, fcptr1->dev_ptr, fcptr1->iotag, ABORT_TYPE_ABTS); + iflag = lpfc_q_disable_lock(p_dev_ctl); + cnt++; + } + fcptr1 = next_fcptr; + } + lpfc_q_unlock_enable(p_dev_ctl, iflag); + return(cnt); +} + +/* + * Issue an ABORT_XRI_CN iocb command to abort an FCP command already issued. + */ +_static_ int +fc_abort_xri( +FC_BRD_INFO *binfo, +dvi_t *dev_ptr, +ushort iotag, +int flag) +{ + IOCB * icmd; + IOCBQ * temp; + RING * rp; + + rp = &binfo->fc_ring[FC_FCP_RING]; + + if ((binfo->fc_ffstate != FC_READY) || + (dev_ptr->nodep->rpi == 0xfffe)) { + return(1); + } + + /* Get an iocb buffer */ + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB)) == 0) { + return(1); + } + fc_bzero((void *)temp, sizeof(IOCBQ)); + icmd = &temp->iocb; + + icmd->un.acxri.abortType = flag; + icmd->un.acxri.abortContextTag = dev_ptr->nodep->rpi; + icmd->un.acxri.abortIoTag = iotag; + + /* set up an iotag using special ABTS iotags */ + icmd->ulpIoTag = (unsigned)rp->fc_bufcnt++; + if (rp->fc_bufcnt == 0) { + rp->fc_bufcnt = MAX_FCP_CMDS; + } + + icmd->ulpLe = 1; + icmd->ulpClass = (dev_ptr->nodep->nlp->id.nlp_fcp_info & 0x0f); + icmd->ulpCommand = CMD_ABORT_XRI_CN; + icmd->ulpOwner = OWN_CHIP; + + issue_iocb_cmd(binfo, rp, temp); + + return(0); +} /* End fc_abort_xri */ + + +/* + * Issue an ABORT_XRI_CX iocb command to abort an IXri. + */ +_static_ int +fc_abort_ixri_cx( +FC_BRD_INFO *binfo, +ushort xri, +uint32 cmd, +RING *rp) +{ + IOCB * icmd; + IOCBQ * temp; + NODELIST * ndlp; + + /* Get an iocb buffer */ + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB)) == 0) { + return(1); + } + + if( (ndlp = fc_findnode_oxri(binfo, NLP_SEARCH_MAPPED | NLP_SEARCH_UNMAPPED, xri)) == 0 ) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + return (1); + } + + fc_bzero((void *)temp, sizeof(IOCBQ)); + icmd = &temp->iocb; + + icmd->un.acxri.abortType = ABORT_TYPE_ABTS; + icmd->ulpContext = xri; + + /* set up an iotag */ + icmd->ulpIoTag0 = (unsigned)rp->fc_iotag++; + if ((rp->fc_iotag & 0x3fff) == 0) { + rp->fc_iotag = 1; + } + + icmd->ulpLe = 1; + icmd->ulpClass = ndlp->id.nlp_ip_info; + icmd->ulpCommand = cmd; + icmd->ulpOwner = OWN_CHIP; + + issue_iocb_cmd(binfo, rp, temp); + + return(0); +} /* End fc_abort_ixri_cx */ + + +/**************************************************/ +/** handle_mb_cmd **/ +/** **/ +/** Description: Process a Mailbox Command. **/ +/** Called from host_interrupt to process MBATT **/ +/** **/ +/** Returns: **/ +/** **/ +/**************************************************/ +_static_ int +handle_mb_cmd( +fc_dev_ctl_t *p_dev_ctl, +MAILBOX *mb, +uint32 cmd) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + MAILBOXQ * mbox; + NODELIST * ndlp; + NODELIST * new_ndlp; + struct buf *bp, *nextbp; + RING * rp; + int i; + void *ioa; + uint32 control, ldid, lrpi, ldata; + node_t * node_ptr; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + /* Mailbox command completed successfully, process completion */ + switch (cmd) { + case MBX_LOAD_SM: + case MBX_READ_NV: /* a READ NVPARAMS command completed */ + case MBX_WRITE_NV: /* a WRITE NVPARAMS command completed */ + case MBX_RUN_BIU_DIAG: + case MBX_INIT_LINK: /* a LINK INIT command completed */ + case MBX_SET_SLIM: + case MBX_SET_DEBUG: + case MBX_PART_SLIM: /* a PARTITION SLIM command completed */ + case MBX_CONFIG_RING: /* a CONFIGURE RING command completed */ + case MBX_RESET_RING: + case MBX_READ_CONFIG: + case MBX_READ_RCONFIG: + case MBX_READ_STATUS: + case MBX_READ_XRI: + case MBX_READ_REV: + case MBX_UNREG_D_ID: + case MBX_READ_LNK_STAT: + case MBX_DUMP_MEMORY: + case MBX_LOAD_AREA: + break; + + case MBX_CONFIG_LINK: /* a CONFIGURE LINK command completed */ + /* Change the cmdring_timeout value for IP and ELS commands */ + rp = &binfo->fc_ring[FC_ELS_RING]; + rp->fc_ringtmo = (2 * binfo->fc_ratov) + ((4 * binfo->fc_edtov) / 1000) + 1; + rp = &binfo->fc_ring[FC_IP_RING]; + rp->fc_ringtmo = (2 * binfo->fc_ratov) + ((4 * binfo->fc_edtov) / 1000) + 1; + binfo->fc_fabrictmo = (2 * binfo->fc_ratov) + ((4 * binfo->fc_edtov) / 1000) + 1; + + if (binfo->fc_ffstate == FC_CFG_LINK) { + binfo->fc_ffstate = FC_FLOGI; + if (binfo->fc_topology == TOPOLOGY_LOOP) { + /* If we are public loop and L bit was set */ + if ((binfo->fc_flag & FC_PUBLIC_LOOP) && + !(binfo->fc_flag & FC_LBIT)) { + /* Need to wait for FAN - use fabric timer for timeout. + */ + binfo->fc_fabrictmo = ((binfo->fc_edtov) / 1000) + 1; + if(FABRICTMO) { + fc_clk_res(p_dev_ctl, binfo->fc_fabrictmo, FABRICTMO); + } + else { + FABRICTMO = fc_clk_set(p_dev_ctl, binfo->fc_fabrictmo, + fc_fabric_timeout, 0, 0); + } + break; + } + + binfo->fc_fabrictmo = (2*(binfo->fc_edtov) / 1000) + 1; + if(FABRICTMO) { + fc_clk_res(p_dev_ctl, binfo->fc_fabrictmo, FABRICTMO); + } + else { + FABRICTMO = fc_clk_set(p_dev_ctl, binfo->fc_fabrictmo, + fc_fabric_timeout, 0, 0); + } + /* For power_up == 0 see fc_ffinit */ + if(p_dev_ctl->power_up) + fc_initial_flogi(p_dev_ctl); + } + else { /* pt2pt */ + /* For power_up == 0 see fc_ffinit */ + if(p_dev_ctl->power_up) + fc_initial_flogi(p_dev_ctl); + } + } else { + if (binfo->fc_flag & FC_DELAY_DISC) { + /* Config_link is done, so start discovery */ + binfo->fc_flag &= ~FC_DELAY_DISC; + fc_discovery(p_dev_ctl); + if (binfo->fc_flag & FC_FABRIC) { + /* Register with Fabric for receiving RSCNs */ + fc_els_cmd(binfo, ELS_CMD_SCR, (void *)SCR_DID, + (uint32)0, (ushort)0, (NODELIST *)0); + } + } + } + break; + + case MBX_READ_SPARM: /* a READ SPARAM command completed */ + case MBX_READ_SPARM64: /* a READ SPARAM command completed */ + { + MATCHMAP * mp; + + mp = (MATCHMAP * )binfo->fc_mbbp; + + if(mp) { + fc_mpdata_sync(mp->dma_handle, 0, sizeof(SERV_PARM), + DDI_DMA_SYNC_FORKERNEL); + fc_mpdata_outcopy(p_dev_ctl, mp, (uchar * ) & binfo->fc_sparam, + sizeof(SERV_PARM)); + + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + + binfo->fc_mbbp = 0; + + + fc_bcopy((uchar * ) & binfo->fc_sparam.nodeName, (uchar * ) & binfo->fc_nodename, + sizeof(NAME_TYPE)); + fc_bcopy((uchar * ) & binfo->fc_sparam.portName, (uchar * ) & binfo->fc_portname, + sizeof(NAME_TYPE)); + fc_bcopy(binfo->fc_portname.IEEE, p_dev_ctl->phys_addr, 6); + } + break; + } + + case MBX_READ_RPI: + case MBX_READ_RPI64: + if (binfo->fc_flag & FC_SLI2) { + /* First copy command data */ + mb = FC_SLI2_MAILBOX(binfo); + ldata = mb->un.varWords[0]; /* get rpi */ + ldata = PCIMEM_LONG(ldata); + lrpi = ldata & 0xffff; + ldata = mb->un.varWords[1]; /* get did */ + ldata = PCIMEM_LONG(ldata); + ldid = ldata & Mask_DID; + ldata = mb->un.varWords[30]; + ldata = PCIMEM_LONG(ldata); + } else { + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + mb = FC_MAILBOX(binfo, ioa); + ldata = READ_SLIM_ADDR(binfo, (uint32 * ) & mb->un.varWords[0]); + lrpi = ldata & 0xffff; + ldata = READ_SLIM_ADDR(binfo, (uint32 * ) & mb->un.varWords[1]); + ldid = ldata & Mask_DID; + ldata = READ_SLIM_ADDR(binfo, (uint32 * ) & mb->un.varWords[30]); + FC_UNMAP_MEMIO(ioa); + } + + if (ldata == ELS_CMD_LOGO) { + if (((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, ldid)) == 0) || + (!(ndlp->nlp_action & NLP_DO_ADDR_AUTH) && + !(ndlp->nlp_flag & (NLP_FARP_SND | NLP_REQ_SND)))) { + + if (ndlp) { + if (ndlp->nlp_Rpi) + break; /* Now we have an rpi so don't logout */ + } + fc_els_cmd(binfo, ELS_CMD_LOGO, (void *)((ulong)ldid), + (uint32)0, (ushort)0, ndlp); + } + } + break; + + case MBX_REG_LOGIN: + case MBX_REG_LOGIN64: + if (binfo->fc_mbbp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )binfo->fc_mbbp); + binfo->fc_mbbp = 0; + } + + if (binfo->fc_flag & FC_SLI2) { + /* First copy command data */ + mb = FC_SLI2_MAILBOX(binfo); + ldata = mb->un.varWords[0]; /* get rpi */ + ldata = PCIMEM_LONG(ldata); + lrpi = ldata & 0xffff; + ldata = mb->un.varWords[1]; /* get did */ + ldata = PCIMEM_LONG(ldata); + ldid = ldata & Mask_DID; + ldata = mb->un.varWords[30]; + ldata = PCIMEM_LONG(ldata); + } else { + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + mb = FC_MAILBOX(binfo, ioa); + ldata = READ_SLIM_ADDR(binfo, (uint32 * ) & mb->un.varWords[0]); + lrpi = ldata & 0xffff; + ldata = READ_SLIM_ADDR(binfo, (uint32 * ) & mb->un.varWords[1]); + ldid = ldata & Mask_DID; + ldata = READ_SLIM_ADDR(binfo, (uint32 * ) & mb->un.varWords[30]); + FC_UNMAP_MEMIO(ioa); + } + + /* Register RPI, will fill in XRI later */ + if ((ndlp=fc_findnode_odid(binfo, NLP_SEARCH_ALL, ldid))) { + ndlp->nlp_Rpi = (short)lrpi; + binfo->fc_nlplookup[lrpi] = ndlp; + ndlp->nlp_state = NLP_LOGIN; + /* REG_LOGIN cmpl */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0311, /* ptr to msg structure */ + fc_mes0311, /* ptr to msg */ + fc_msgBlk0311.msgPreambleStr, /* begin varargs */ + ndlp->nlp_DID, + ndlp->nlp_state, + ndlp->nlp_flag, + ndlp->nlp_Rpi ); /* end varargs */ + fc_nlp_unmap(binfo, ndlp); + + /* If word30 is set, send back ACC */ + if (ldata) { + REG_WD30 wd30; + + wd30.word = ldata; + + /* Wait for ACC to complete before issuing PRLI */ + fc_els_rsp(binfo, ELS_CMD_ACC, (uint32)wd30.f.xri, + (uint32)wd30.f.class, (void *)0, (uint32)sizeof(SERV_PARM), ndlp); + ndlp->nlp_flag |= NLP_REG_INP; + break; + } + + if (ndlp->nlp_DID == binfo->fc_myDID) { + ndlp->nlp_state = NLP_LOGIN; + } else { + fc_process_reglogin(p_dev_ctl, ndlp); + } + } else { + if (ldata) { + /* Dropping ELS rsp */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0103, /* ptr to msg structure */ + fc_mes0103, /* ptr to msg */ + fc_msgBlk0103.msgPreambleStr, /* begin varargs */ + ldata, + ldid ); /* end varargs */ + } + + /* Can't find NODELIST entry for this login, so unregister it */ + if ((mbox = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX))) { + fc_unreg_login(binfo, lrpi, (MAILBOX * )mbox); + if (issue_mb_cmd(binfo, (MAILBOX * )mbox, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mbox); + } + } + } + + break; + + case MBX_UNREG_LOGIN: + if (binfo->fc_flag & FC_SLI2) { + /* First copy command data */ + mb = FC_SLI2_MAILBOX(binfo); + ldata = mb->un.varWords[0]; /* get rpi */ + ldata = PCIMEM_LONG(ldata); + lrpi = ldata & 0xffff; + ldata = mb->un.varWords[30]; + ldata = PCIMEM_LONG(ldata); + } else { + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + mb = FC_MAILBOX(binfo, ioa); + ldata = READ_SLIM_ADDR(binfo, (uint32 * ) & mb->un.varWords[0]); + lrpi = ldata & 0xffff; + ldata = READ_SLIM_ADDR(binfo, (uint32 * ) & mb->un.varWords[30]); + FC_UNMAP_MEMIO(ioa); + } + + /* If word30 is set, send back LOGO */ + if (ldata) { + fc_els_cmd(binfo, ELS_CMD_LOGO, (void *)((ulong)ldata), (uint32)0, (ushort)1, (NODELIST *)0); + } + break; + + case MBX_READ_LA: + case MBX_READ_LA64: + { + READ_LA_VAR la; + MATCHMAP * mp; + + if (binfo->fc_flag & FC_SLI2) { + /* First copy command data */ + mb = FC_SLI2_MAILBOX(binfo); + fc_pcimem_bcopy((uint32 * )((char *)mb + sizeof(uint32)), (uint32 * ) & la, + sizeof(READ_LA_VAR)); + } else { + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + mb = FC_MAILBOX(binfo, ioa); + READ_SLIM_COPY(binfo, (uint32 * ) & la, + (uint32 * )((char *)mb + sizeof(uint32)), + (sizeof(READ_LA_VAR) / sizeof(uint32))); + FC_UNMAP_MEMIO(ioa); + } + + mp = (MATCHMAP * )binfo->fc_mbbp; + if(mp) { + fc_mpdata_sync(mp->dma_handle, 0, 128, DDI_DMA_SYNC_FORKERNEL); + fc_mpdata_outcopy(p_dev_ctl, mp, (uchar * )binfo->alpa_map, 128); + + binfo->fc_mbbp = 0; + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + } + + if (la.pb) + binfo->fc_flag |= FC_BYPASSED_MODE; + else + binfo->fc_flag &= ~FC_BYPASSED_MODE; + + if (((binfo->fc_eventTag + 1) < la.eventTag) || + (binfo->fc_eventTag == la.eventTag)) { + FCSTATCTR.LinkMultiEvent++; + if (la.attType == AT_LINK_UP) { + if (binfo->fc_eventTag != 0) { /* Pegasus */ + fc_linkdown(p_dev_ctl); + if (!(binfo->fc_flag & FC_LD_TIMER)) { + /* Start the link down watchdog timer until CLA done */ + rp = &binfo->fc_ring[FC_FCP_RING]; + RINGTMO = fc_clk_set(p_dev_ctl, rp->fc_ringtmo, + fc_linkdown_timeout, 0, 0); + if((clp[CFG_LINKDOWN_TMO].a_current == 0) || + clp[CFG_HOLDIO].a_current) { + binfo->fc_flag |= FC_LD_TIMEOUT; + } + binfo->fc_flag |= FC_LD_TIMER; + } + } + } + } + + binfo->fc_eventTag = la.eventTag; + + if (la.attType == AT_LINK_UP) { + FCSTATCTR.LinkUp++; + /* Link Up Event received */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1304, /* ptr to msg structure */ + fc_mes1304, /* ptr to msg */ + fc_msgBlk1304.msgPreambleStr, /* begin varargs */ + la.eventTag, + binfo->fc_eventTag, + la.granted_AL_PA, + binfo->alpa_map[0] ); /* end varargs */ + if(clp[CFG_NETWORK_ON].a_current) { + /* Stop the link down watchdog timer */ + rp = &binfo->fc_ring[FC_IP_RING]; + if(RINGTMO) { + fc_clk_can(p_dev_ctl, RINGTMO); + RINGTMO = 0; + } + } + binfo->fc_ffstate = FC_LINK_UP; + binfo->fc_flag &= ~(FC_LNK_DOWN | FC_PT2PT | FC_PT2PT_PLOGI | + FC_LBIT | FC_RSCN_MODE | FC_NLP_MORE | FC_DELAY_DISC | + FC_RSCN_DISC_TMR | FC_RSCN_DISCOVERY); + binfo->fc_ns_retry = 0; + + if( la.UlnkSpeed == LA_2GHZ_LINK) + binfo->fc_linkspeed = LA_2GHZ_LINK; + else + binfo->fc_linkspeed = 0; + + if ((binfo->fc_topology = la.topology) == TOPOLOGY_LOOP) { + + if (la.il) { + binfo->fc_flag |= FC_LBIT; + fc_freenode_did(binfo, Fabric_DID, 1); + } + + binfo->fc_myDID = la.granted_AL_PA; + + dfc_hba_put_event(p_dev_ctl, HBA_EVENT_LINK_UP, binfo->fc_myDID, + la.topology, la.lipType, la.UlnkSpeed); + dfc_put_event(p_dev_ctl, FC_REG_LINK_EVENT, 0, 0, 0); + + if (binfo->fc_flag & FC_SLI2) { + i = la.un.lilpBde64.tus.f.bdeSize; + } else { + i = la.un.lilpBde.bdeSize; + } + if (i == 0) { + binfo->alpa_map[0] = 0; + } else { + if(clp[CFG_LOG_VERBOSE].a_current & DBG_LINK_EVENT) { + int numalpa, j, k; + union { + uchar pamap[16]; + struct { + uint32 wd1; + uint32 wd2; + uint32 wd3; + uint32 wd4; + } pa; + } un; + + numalpa = binfo->alpa_map[0]; + j = 0; + while (j < numalpa) { + fc_bzero(un.pamap, 16); + for (k = 1; j < numalpa; k++) { + un.pamap[k-1] = binfo->alpa_map[j+1]; + j++; + if (k == 16) + break; + } + /* Link Up Event ALPA map */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1305, /* ptr to msg structure */ + fc_mes1305, /* ptr to msg */ + fc_msgBlk1305.msgPreambleStr, /* begin varargs */ + un.pa.wd1, + un.pa.wd2, + un.pa.wd3, + un.pa.wd4 ); /* end varargs */ + } + } + } + } else { + fc_freenode_did(binfo, Fabric_DID, 1); + + binfo->fc_myDID = binfo->fc_pref_DID; + + dfc_hba_put_event(p_dev_ctl, HBA_EVENT_LINK_UP, binfo->fc_myDID, + la.topology, la.lipType, la.UlnkSpeed); + dfc_put_event(p_dev_ctl, FC_REG_LINK_EVENT, 0, 0, 0); + } + + if ((mbox = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + /* This should turn on DELAYED ABTS for ELS timeouts */ + fc_set_slim(binfo, (MAILBOX * )mbox, 0x052198, 0x1); + /* unreg_login mailbox command could be executing, + * queue this command to be processed later. + */ + fc_mbox_put(binfo, mbox); + } + + if ((mbox = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + if(fc_read_sparam(p_dev_ctl, (MAILBOX * )mbox) == 0) { + /* set_slim mailbox command needs to execute first, + * queue this command to be processed later. + */ + fc_mbox_put(binfo, mbox); + } else { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mbox); + } + } + if ((mbox = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + binfo->fc_ffstate = FC_CFG_LINK; + fc_config_link(p_dev_ctl, (MAILBOX * )mbox); + /* read_sparam mailbox command needs to execute first, + * queue this command to be processed later. + */ + fc_mbox_put(binfo, mbox); + } + + + } /* end if link up */ + else { + FCSTATCTR.LinkDown++; + dfc_hba_put_event(p_dev_ctl, HBA_EVENT_LINK_DOWN, binfo->fc_myDID, + la.topology, la.lipType, la.UlnkSpeed); + dfc_put_event(p_dev_ctl, FC_REG_LINK_EVENT, 0, 0, 0); + /* Link Down Event received */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1306, /* ptr to msg structure */ + fc_mes1306, /* ptr to msg */ + fc_msgBlk1306.msgPreambleStr, /* begin varargs */ + la.eventTag, + binfo->fc_eventTag, + la.granted_AL_PA, + binfo->alpa_map[0] ); /* end varargs */ + fc_linkdown(p_dev_ctl); + + if (!(binfo->fc_flag & FC_LD_TIMER)) { + /* Start the link down watchdog timer until CLA done */ + rp = &binfo->fc_ring[FC_FCP_RING]; + RINGTMO = fc_clk_set(p_dev_ctl, rp->fc_ringtmo, + fc_linkdown_timeout, 0, 0); + if((clp[CFG_LINKDOWN_TMO].a_current == 0) || + clp[CFG_HOLDIO].a_current) { + binfo->fc_flag |= FC_LD_TIMEOUT; + } + binfo->fc_flag |= FC_LD_TIMER; + } + + /* turn on Link Attention interrupts - no CLEAR_LA needed */ + binfo->fc_process_LA = 1; + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + control = READ_CSR_REG(binfo, FC_HC_REG(binfo, ioa)); + control |= HC_LAINT_ENA; + WRITE_CSR_REG(binfo, FC_HC_REG(binfo, ioa), control); + FC_UNMAP_MEMIO(ioa); + } + break; + } + + case MBX_CLEAR_LA: + /* Turn on Link Attention interrupts */ + binfo->fc_process_LA = 1; + + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + control = READ_CSR_REG(binfo, FC_HC_REG(binfo, ioa)); + control |= HC_LAINT_ENA; + WRITE_CSR_REG(binfo, FC_HC_REG(binfo, ioa), control); + FC_UNMAP_MEMIO(ioa); + + if ((!(binfo->fc_flag & FC_LNK_DOWN)) && + (binfo->fc_ffstate != FC_ERROR) && + (mb->mbxStatus != 0x1601)) { /* Link is Up */ + + if (!(binfo->fc_flag & FC_PT2PT)) { + /* Device Discovery completes */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0234, /* ptr to msg structure */ + fc_mes0234, /* ptr to msg */ + fc_msgBlk0234.msgPreambleStr); /* begin & end varargs */ + binfo->fc_nlp_cnt = 0; /* In case we need to do RSCNs */ + binfo->fc_firstopen = 0; + + /* Fix up any changed RPIs in FCP IOCBs queued up a txq */ + fc_fcp_fix_txq(p_dev_ctl); + + binfo->fc_ffstate = FC_READY; + + /* Check to see if we need to process an RSCN */ + if(binfo->fc_flag & FC_RSCN_MODE) { + fc_nextrscn(p_dev_ctl, fc_max_els_sent); + } + } + + /* Do FDMI to Register HBA and port */ + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, FDMI_DID))) { + if (fc_fdmi_cmd(p_dev_ctl, ndlp, SLI_MGMT_DPRT)) { + /* Issue FDMI request failed */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0219, /* ptr to msg structure */ + fc_mes0219, /* ptr to msg */ + fc_msgBlk0219.msgPreambleStr, /* begin varargs */ + SLI_MGMT_DPRT ); /* end varargs */ + } + } + + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + new_ndlp = (NODELIST *)ndlp->nlp_listp_next; + + /* skip myself, fabric nodes and partially logged in nodes */ + if ((ndlp->nlp_DID == binfo->fc_myDID) || + (ndlp->nlp_type & NLP_FABRIC) || + (ndlp->nlp_state != NLP_ALLOC)) + goto loop1; + + /* Allocate exchanges for all IP (non-FCP) nodes */ + if ((ndlp->nlp_Rpi) && + (ndlp->nlp_Xri == 0) && + ((ndlp->nlp_DID & CT_DID_MASK) != CT_DID_MASK) && + !(ndlp->nlp_flag & NLP_RPI_XRI) && + !(ndlp->nlp_type & NLP_FCP_TARGET)) { + ndlp->nlp_flag |= NLP_RPI_XRI; + fc_create_xri(binfo, &binfo->fc_ring[FC_ELS_RING], ndlp); + } + + if (ndlp->nlp_type & NLP_FCP_TARGET) { + int dev_index; + + dev_index = INDEX(ndlp->id.nlp_pan, ndlp->id.nlp_sid); + node_ptr = binfo->device_queue_hash[dev_index].node_ptr; + if(node_ptr) { + /* This is a new device that entered the loop */ + node_ptr->nlp = ndlp; + node_ptr->rpi = ndlp->nlp_Rpi; + node_ptr->last_good_rpi = ndlp->nlp_Rpi; + node_ptr->scsi_id = dev_index; + ndlp->nlp_targetp = (uchar *)node_ptr; + node_ptr->flags &= ~FC_NODEV_TMO; + ndlp->nlp_flag &= ~NLP_NODEV_TMO; + } + } + + if (ndlp->nlp_type & NLP_IP_NODE) { + fc_restartio(p_dev_ctl, ndlp); + } +loop1: + ndlp = new_ndlp; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + + /* If we are not point to point, reglogin to ourself */ + if (!(binfo->fc_flag & FC_PT2PT)) { + /* Build nlplist entry and Register login to ourself */ + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, binfo->fc_myDID))) { + ndlp->nlp_DID = binfo->fc_myDID; + fc_nlp_logi(binfo, ndlp, &(binfo->fc_portname), &(binfo->fc_nodename)); + } + else { + if((ndlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP))) { + fc_bzero((void *)ndlp, sizeof(NODELIST)); + ndlp->sync = binfo->fc_sync; + ndlp->capabilities = binfo->fc_capabilities; + ndlp->nlp_DID = binfo->fc_myDID; + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + fc_nlp_logi(binfo, ndlp, &(binfo->fc_portname), &(binfo->fc_nodename)); + } + } + if(ndlp) { + if ((mbox = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))){ + fc_reg_login(binfo, binfo->fc_myDID, + (uchar * ) & binfo->fc_sparam, (MAILBOX * )mbox, 0); + if (issue_mb_cmd(binfo, (MAILBOX * )mbox, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mbox); + } + } + } + } else { + /* We are pt2pt no fabric */ + if (binfo->fc_flag & FC_PT2PT_PLOGI) { + /* Build nlplist entry and Register login to ourself */ + if ((ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, binfo->fc_myDID))) { + ndlp->nlp_DID = binfo->fc_myDID; + fc_nlp_logi(binfo, ndlp, &(binfo->fc_portname), &(binfo->fc_nodename)); + } + else { + if((ndlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP))) { + fc_bzero((void *)ndlp, sizeof(NODELIST)); + ndlp->sync = binfo->fc_sync; + ndlp->capabilities = binfo->fc_capabilities; + ndlp->nlp_DID = binfo->fc_myDID; + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + fc_nlp_logi(binfo, ndlp, &(binfo->fc_portname), &(binfo->fc_nodename)); + } + } + if(ndlp) { + if ((mbox = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))){ + fc_reg_login(binfo, binfo->fc_myDID, + (uchar * ) & binfo->fc_sparam, (MAILBOX * )mbox, 0); + if (issue_mb_cmd(binfo, (MAILBOX * )mbox, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mbox); + } + } + fc_els_cmd(binfo, ELS_CMD_PLOGI, (void *)PT2PT_RemoteID, + (uint32)0, (ushort)0, (NODELIST *)0); + } + } + } + + if(binfo->fc_flag & FC_ESTABLISH_LINK) { + binfo->fc_flag &= ~FC_ESTABLISH_LINK; + } + + if(p_dev_ctl->fc_estabtmo) { + fc_clk_can(p_dev_ctl, p_dev_ctl->fc_estabtmo); + p_dev_ctl->fc_estabtmo = 0; + } + + if(((clp[CFG_LINKDOWN_TMO].a_current == 0) || + clp[CFG_HOLDIO].a_current) && + (binfo->fc_flag & FC_LD_TIMEOUT)) { + fc_failio(p_dev_ctl); + } + + /* Stop the link down watchdog timer */ + rp = &binfo->fc_ring[FC_FCP_RING]; + if(RINGTMO) { + fc_clk_can(p_dev_ctl, RINGTMO); + RINGTMO = 0; + } + binfo->fc_flag &= ~(FC_LD_TIMEOUT | FC_LD_TIMER); + + if(clp[CFG_FCP_ON].a_current) { + fc_restart_all_devices(p_dev_ctl); + + /* Call iodone for any commands that timed out previously */ + for (bp = p_dev_ctl->timeout_head; bp != NULL; ) { + nextbp = bp->av_forw; + bp->b_error = ETIMEDOUT; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + FCSTATCTR.fcpScsiTmo++; + fc_do_iodone(bp); + bp = nextbp; + } + p_dev_ctl->timeout_count = 0; + p_dev_ctl->timeout_head = NULL; + + /* Send down any saved FCP commands */ + fc_issue_cmd(p_dev_ctl); + } + + if (binfo->fc_deferip) { + handle_ring_event(p_dev_ctl, FC_IP_RING, + (uint32)binfo->fc_deferip); + binfo->fc_deferip = 0; + } + } + break; + + default: + /* Unknown Mailbox command completion */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0312, /* ptr to msg structure */ + fc_mes0312, /* ptr to msg */ + fc_msgBlk0312.msgPreambleStr, /* begin varargs */ + cmd ); /* end varargs */ + FCSTATCTR.mboxCmdInval++; + break; + } + + binfo->fc_mbbp = 0; + return(0); +} /* End handle_mb_cmd */ + + +/**************************************************/ +/** fc_linkdown **/ +/** **/ +/** Description: Process a Link Down event. **/ +/** Called from host_intupt to process LinkDown **/ +/** **/ +/** Returns: **/ +/** **/ +/**************************************************/ +_static_ int +fc_linkdown( +fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + RING * rp; + NODELIST * ndlp; + NODELIST * new_ndlp; + MAILBOXQ * mb; + IOCBQ * xmitiq; + IOCBQ * iocbq; + MATCHMAP * mp; + ULP_BDE64 * addr; + + binfo = &BINFO; + binfo->fc_prevDID = binfo->fc_myDID; + binfo->fc_ffstate = FC_LINK_DOWN; + binfo->fc_flag |= FC_LNK_DOWN; + binfo->fc_flag &= ~FC_DELAY_PLOGI; + + + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_unreg_did(binfo, 0xffffffff, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + + /* Free all nodes in nlplist */ + ndlp = binfo->fc_nlpbind_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + new_ndlp = (NODELIST *)ndlp->nlp_listp_next; + + /* Any RSCNs in progress don't matter at this point */ + ndlp->nlp_action &= ~NLP_DO_RSCN; + + if ((ndlp->nlp_type & NLP_IP_NODE) && ndlp->nlp_bp) { + m_freem((fcipbuf_t *)ndlp->nlp_bp); + ndlp->nlp_bp = (uchar * )0; + } + + /* Need to abort all exchanges, used only on IP */ + if (ndlp->nlp_Xri) { + fc_rpi_abortxri(binfo, ndlp->nlp_Xri); + ndlp->nlp_Xri = 0; + } + + /* Need to free all nodes in the process of login / registration + * as well as all Fabric nodes and myself. + */ + if ((ndlp->nlp_DID == binfo->fc_myDID) || + (!(ndlp->nlp_type & NLP_FABRIC) && ((ndlp->nlp_DID & CT_DID_MASK) == CT_DID_MASK)) || + (binfo->fc_flag & FC_PT2PT) || + (ndlp->nlp_state < NLP_ALLOC)) { + NAME_TYPE zero_pn; + + fc_bzero((void *)&zero_pn, sizeof(NAME_TYPE)); + if ((fc_geportname(&ndlp->nlp_portname, &zero_pn) == 2) && + (ndlp->nlp_state < NLP_LOGIN) && + ((ndlp->nlp_type & (NLP_AUTOMAP | NLP_SEED_MASK)) == 0)) { + fc_freenode(binfo, ndlp, 1); + } + else { + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + } + + /* If we are not using ADISC, free fcp nodes here to avoid excessive + * actitivity when during PLOGIs when link comes back up. + */ + clp = DD_CTL.p_config[binfo->fc_brd_no]; + if((ndlp->nlp_state == NLP_ALLOC) && + (ndlp->nlp_type & NLP_FCP_TARGET) && + ((!clp[CFG_USE_ADISC].a_current))) { + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + + /* Any Discovery in progress doesn't matter at this point */ + ndlp->nlp_action &= ~(NLP_DO_ADDR_AUTH | NLP_DO_DISC_START); + + ndlp = new_ndlp; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + + if (binfo->fc_flag & FC_PT2PT) { + binfo->fc_myDID = 0; + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + fc_config_link(p_dev_ctl, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + binfo->fc_flag &= ~(FC_PT2PT | FC_PT2PT_PLOGI); + } + + clp = DD_CTL.p_config[binfo->fc_brd_no]; + if(clp[CFG_NETWORK_ON].a_current) { + rp = &binfo->fc_ring[FC_IP_RING]; + /* flush all xmit compls */ + while ((xmitiq = fc_ringtxp_get(rp, 0)) != 0) { + fc_freebufq(p_dev_ctl, rp, xmitiq); + } + NDDSTAT.ndd_xmitque_cur = 0; + } + + + fc_flush_clk_set(p_dev_ctl, fc_delay_timeout); + + if(FABRICTMO) { + fc_clk_can(p_dev_ctl, FABRICTMO); + FABRICTMO = 0; + } + + if(binfo->fc_rscn_disc_wdt) { + fc_clk_can(p_dev_ctl, binfo->fc_rscn_disc_wdt); + binfo->fc_rscn_disc_wdt = 0; + } + binfo->fc_flag &= ~(FC_RSCN_MODE | FC_RSCN_DISC_TMR | FC_RSCN_DISCOVERY); + binfo->fc_rscn_id_cnt = 0; + + /* Free any deferred RSCNs */ + fc_flush_rscn_defer(p_dev_ctl); + + /* Free any delayed ELS xmits */ + fc_abort_delay_els_cmd(p_dev_ctl, 0xffffffff); + + /* Look through ELS ring and remove any ELS cmds in progress */ + rp = &binfo->fc_ring[FC_ELS_RING]; + iocbq = (IOCBQ * )(rp->fc_txp.q_first); + while (iocbq) { + iocbq->retry = 0xff; /* Mark for abort */ + iocbq = (IOCBQ * )iocbq->q; + } + + if (rp->fc_tx.q_cnt) { + IOCB * icmd; + /* get next command from ring xmit queue */ + xmitiq = fc_ringtx_get(rp); + + while (xmitiq) { + icmd = &xmitiq->iocb; + if (icmd->ulpCommand == CMD_IOCB_CONTINUE_CN) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + xmitiq = fc_ringtx_get(rp); + continue; + } + + if(xmitiq->bp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )xmitiq->bp); + } + + if (binfo->fc_flag & FC_SLI2) { + + mp = (MATCHMAP *)xmitiq->bpl; + if(mp) { + addr = (ULP_BDE64 * )mp->virt; + addr++; /* goto the next one */ + + switch (icmd->ulpCommand) { + case CMD_ELS_REQUEST_CR: + case CMD_ELS_REQUEST64_CR: + case CMD_ELS_REQUEST_CX: + case CMD_ELS_REQUEST64_CX: + fc_mem_put(binfo, MEM_BUF, (uchar * )xmitiq->info); + break; + default: + if(xmitiq->info) + fc_mem_put(binfo, MEM_BUF, (uchar * )xmitiq->info); + } + fc_mem_put(binfo, MEM_BPL, (uchar * )mp); + } + } + else { + if (icmd->un.cont[1].bdeAddress) { + fc_mem_put(binfo, MEM_BUF, (uchar * )xmitiq->info); + } + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + xmitiq = fc_ringtx_get(rp); + } + } + + return(0); +} /* End fc_linkdown */ + +/**************************************************/ +/** fc_rlip **/ +/** **/ +/** Description: **/ +/** Called to reset the link with an init_link **/ +/** **/ +/** Returns: **/ +/** **/ +/**************************************************/ +_static_ int +fc_rlip( +fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + MAILBOX * mb; + + binfo = &BINFO; + + /* Start the Fibre Channel reset LIP process */ + if (binfo->fc_ffstate == FC_READY) { + /* Get a buffer to use for the mailbox command */ + if ((mb = (MAILBOX * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI)) == NULL) { + /* Device Discovery completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0235, /* ptr to msg structure */ + fc_mes0235, /* ptr to msg */ + fc_msgBlk0235.msgPreambleStr); /* begin & end varargs */ + binfo->fc_ffstate = FC_ERROR; + return(1); + } + + binfo->fc_flag |= FC_SCSI_RLIP; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + /* Setup and issue mailbox INITIALIZE LINK command */ + fc_linkdown(p_dev_ctl); + fc_init_link(binfo, (MAILBOX * )mb, clp[CFG_TOPOLOGY].a_current, clp[CFG_LINK_SPEED].a_current); + mb->un.varInitLnk.lipsr_AL_PA = 0; + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + /* SCSI Link Reset */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1307, /* ptr to msg structure */ + fc_mes1307, /* ptr to msg */ + fc_msgBlk1307.msgPreambleStr); /* begin & end varargs */ + } + return(0); +} /* End fc_rlip */ + +/**************************************************/ +/** fc_ns_cmd **/ +/** **/ +/** Description: **/ +/** Issue Cmd to NameServer **/ +/** SLI_CTNS_GID_FT **/ +/** SLI_CTNS_RFT_ID **/ +/** **/ +/** Returns: **/ +/** **/ +/**************************************************/ +_static_ int +fc_ns_cmd( +fc_dev_ctl_t *p_dev_ctl, +NODELIST *ndlp, +int cmdcode) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + MATCHMAP * mp, *bmp; + SLI_CT_REQUEST * CtReq; + ULP_BDE64 * bpl; + + binfo = &BINFO; + + /* fill in BDEs for command */ + /* Allocate buffer for command payload */ + if ((mp = (MATCHMAP * )fc_mem_get(binfo, MEM_BUF)) == 0) { + return(1); + } + + bmp = 0; + + /* Allocate buffer for Buffer ptr list */ + if ((bmp = (MATCHMAP * )fc_mem_get(binfo, MEM_BPL)) == 0) { + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + return(1); + } + bpl = (ULP_BDE64 * )bmp->virt; + bpl->addrHigh = PCIMEM_LONG((uint32)putPaddrHigh(mp->phys)); + bpl->addrLow = PCIMEM_LONG((uint32)putPaddrLow(mp->phys)); + bpl->tus.f.bdeFlags = 0; + if (cmdcode == SLI_CTNS_GID_FT) + bpl->tus.f.bdeSize = GID_REQUEST_SZ; + else if (cmdcode == SLI_CTNS_RFT_ID) + bpl->tus.f.bdeSize = RFT_REQUEST_SZ; + else + bpl->tus.f.bdeSize = 0; + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + + CtReq = (SLI_CT_REQUEST * )mp->virt; + /* NameServer Req */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0236, /* ptr to msg structure */ + fc_mes0236, /* ptr to msg */ + fc_msgBlk0236.msgPreambleStr, /* begin varargs */ + cmdcode, + binfo->fc_flag, + binfo->fc_rscn_id_cnt); /* end varargs */ + fc_bzero((void *)CtReq, sizeof(SLI_CT_REQUEST)); + + CtReq->RevisionId.bits.Revision = SLI_CT_REVISION; + CtReq->RevisionId.bits.InId = 0; + + CtReq->FsType = SLI_CT_DIRECTORY_SERVICE; + CtReq->FsSubType = SLI_CT_DIRECTORY_NAME_SERVER; + + CtReq->CommandResponse.bits.Size = 0; + switch (cmdcode) { + case SLI_CTNS_GID_FT: + CtReq->CommandResponse.bits.CmdRsp = SWAP_DATA16(SLI_CTNS_GID_FT); + CtReq->un.gid.Fc4Type = SLI_CTPT_FCP; + if(binfo->fc_ffstate != FC_READY) + binfo->fc_ffstate = FC_NS_QRY; + break; + case SLI_CTNS_RFT_ID: + clp = DD_CTL.p_config[binfo->fc_brd_no]; + CtReq->CommandResponse.bits.CmdRsp = SWAP_DATA16(SLI_CTNS_RFT_ID); + CtReq->un.rft.PortId = SWAP_DATA(binfo->fc_myDID); + if(clp[CFG_FCP_ON].a_current) { + CtReq->un.rft.fcpReg = 1; + } + if(clp[CFG_NETWORK_ON].a_current) { + CtReq->un.rft.ipReg = 1; + } + if(binfo->fc_ffstate != FC_READY) + binfo->fc_ffstate = FC_NS_REG; + break; + } + + binfo->fc_ns_retry++; + if(FABRICTMO) { + fc_clk_can(p_dev_ctl, FABRICTMO); + } + FABRICTMO = fc_clk_set(p_dev_ctl, binfo->fc_ratov, + fc_fabric_timeout, 0, 0); + + if(fc_ct_cmd(p_dev_ctl, mp, bmp, ndlp)) { + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + } + return(0); +} /* End fc_ns_cmd */ + +_static_ int +fc_free_ct_rsp( +fc_dev_ctl_t * p_dev_ctl, +MATCHMAP * mlist) +{ + FC_BRD_INFO * binfo; + MATCHMAP * mlast; + + binfo = &BINFO; + while(mlist) { + mlast = mlist; + mlist = (MATCHMAP *)mlist->fc_mptr; + + fc_mem_put(binfo, MEM_BUF, (uchar * )mlast); + } + return(0); +} + +_local_ MATCHMAP * +fc_alloc_ct_rsp( +fc_dev_ctl_t * p_dev_ctl, +ULP_BDE64 * bpl, +uint32 size, +int * entries) +{ + FC_BRD_INFO * binfo; + MATCHMAP * mlist; + MATCHMAP * mlast; + MATCHMAP * mp; + int cnt, i; + + binfo = &BINFO; + mlist = 0; + mlast = 0; + i = 0; + + while(size) { + + /* We get chucks of FCELSSIZE */ + if(size > FCELSSIZE) + cnt = FCELSSIZE; + else + cnt = size; + + /* Allocate buffer for rsp payload */ + if ((mp = (MATCHMAP * )fc_mem_get(binfo, MEM_BUF)) == 0) { + fc_free_ct_rsp(p_dev_ctl, mlist); + return(0); + } + + /* Queue it to a linked list */ + if(mlast == 0) { + mlist = mp; + mlast = mp; + } + else { + mlast->fc_mptr = (uchar *)mp; + mlast = mp; + } + mp->fc_mptr = 0; + + bpl->tus.f.bdeFlags = BUFF_USE_RCV; + + /* build buffer ptr list for IOCB */ + bpl->addrLow = PCIMEM_LONG(putPaddrLow((ulong)mp->phys)); + bpl->addrHigh = PCIMEM_LONG(putPaddrHigh((ulong)mp->phys)); + bpl->tus.f.bdeSize = (ushort)cnt; + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + bpl++; + + i++; + size -= cnt; + } + + *entries = i; + return(mlist); +} + +_static_ int +fc_ct_cmd( +fc_dev_ctl_t *p_dev_ctl, +MATCHMAP *inmp, +MATCHMAP *bmp, +NODELIST *ndlp) +{ + FC_BRD_INFO * binfo; + ULP_BDE64 * bpl; + MATCHMAP * outmp; + int cnt; + + binfo = &BINFO; + bpl = (ULP_BDE64 * )bmp->virt; + bpl++; /* Skip past ct request */ + + cnt = 0; + /* Put buffer(s) for ct rsp in bpl */ + if((outmp = fc_alloc_ct_rsp(p_dev_ctl, bpl, FC_MAX_NS_RSP, &cnt)) == 0) { + return(ENOMEM); + } + + /* save ndlp for cmpl */ + inmp->fc_mptr = (uchar *)ndlp; + + if((fc_gen_req(binfo, bmp, inmp, outmp, ndlp->nlp_Rpi, 0, (cnt+1), 0))) { + fc_free_ct_rsp(p_dev_ctl, outmp); + return(ENOMEM); + } + return(0); +} /* End fc_ct_cmd */ + + +/**************************************************/ +/** fc_ns_rsp **/ +/** **/ +/** Description: **/ +/** Process NameServer response **/ +/** **/ +/** Returns: **/ +/** **/ +/**************************************************/ +_static_ int +fc_ns_rsp( +fc_dev_ctl_t *p_dev_ctl, +NODELIST *nslp, +MATCHMAP *mp, +uint32 Size) +{ + FC_BRD_INFO * binfo; + SLI_CT_REQUEST * Response; + NODELIST * ndlp; + NODELIST * new_ndlp; + MATCHMAP * mlast; + D_ID rscn_did; + D_ID ns_did; + uint32 * tptr; + uint32 Did; + uint32 Temp; + int j, Cnt, match, new_node; + + binfo = &BINFO; + ndlp = 0; + binfo->fc_ns_retry = 0; + + binfo->fc_fabrictmo = (2 * binfo->fc_ratov) + + ((4 * binfo->fc_edtov) / 1000) + 1; + if(FABRICTMO) { + fc_clk_can(p_dev_ctl, FABRICTMO); + FABRICTMO = 0; + } + + Response = (SLI_CT_REQUEST * )mp->virt; + + if ((Response->CommandResponse.bits.CmdRsp == SWAP_DATA16(SLI_CT_RESPONSE_FS_ACC)) && + ((binfo->fc_ffstate == FC_NS_QRY) || + ((binfo->fc_ffstate == FC_READY) && (binfo->fc_flag & FC_RSCN_MODE)))) { + + tptr = (uint32 * ) & Response->un.gid.PortType; + while(mp) { + mlast = mp; + mp = (MATCHMAP *)mp->fc_mptr; + fc_mpdata_sync(mlast->dma_handle, 0, 0, DDI_DMA_SYNC_FORKERNEL); + + if(Size > FCELSSIZE) + Cnt = FCELSSIZE; + else + Cnt = Size; + Size -= Cnt; + + if(tptr == 0) + tptr = (uint32 * )mlast->virt; + else + Cnt -= 16; /* subtract length of CT header */ + + while(Cnt) { + /* Loop through entire NameServer list of DIDs */ + + /* Get next DID from NameServer List */ + Temp = *tptr++; + Did = (SWAP_DATA(Temp) & Mask_DID); + + ndlp = 0; + if ((Did) && (Did != binfo->fc_myDID)) { + new_node = 0; + ndlp = fc_findnode_odid(binfo, NLP_SEARCH_ALL, Did); + if(ndlp) { + ndlp->nlp_DID = Did; + /* Skip nodes already marked for discovery / rscn */ + if(ndlp->nlp_action & + (NLP_DO_ADDR_AUTH | NLP_DO_DISC_START | NLP_DO_RSCN)) + goto nsout; + } + else { + new_node = 1; + if((ndlp = (NODELIST *)fc_mem_get(binfo, MEM_NLP))) { + fc_bzero((void *)ndlp, sizeof(NODELIST)); + ndlp->sync = binfo->fc_sync; + ndlp->capabilities = binfo->fc_capabilities; + ndlp->nlp_DID = Did; + fc_nlp_bind(binfo, ndlp); + } + else + goto nsout; + } + + if ((new_node) || + (!(ndlp->nlp_flag & NLP_REQ_SND) && + (ndlp->nlp_state < NLP_ALLOC)) ) { + + if ((binfo->fc_ffstate == FC_READY) && + (binfo->fc_flag & FC_RSCN_MODE)) { + /* we are in RSCN node, so match Did from NameServer with + * with list recieved from previous RSCN commands. + * Do NOT add it to our RSCN discovery list unless we have + * a match. + */ + match = 0; + for(j=0;jfc_rscn_id_cnt;j++) { + + rscn_did.un.word = binfo->fc_rscn_id_list[j]; + ns_did.un.word = Did; + + switch (rscn_did.un.b.resv) { + case 0: /* Single N_Port ID effected */ + if (ns_did.un.word == rscn_did.un.word) { + match = 1; + } + break; + + case 1: /* Whole N_Port Area effected */ + if ((ns_did.un.b.domain == rscn_did.un.b.domain) && + (ns_did.un.b.area == rscn_did.un.b.area)) { + match = 1; + } + break; + + case 2: /* Whole N_Port Domain effected */ + if (ns_did.un.b.domain == rscn_did.un.b.domain) { + match = 1; + } + break; + + case 3: /* Whole Fabric effected */ + match = 1; + break; + + default: + /* Unknown Identifier in RSCN list */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0237, /* ptr to msg structure */ + fc_mes0237, /* ptr to msg */ + fc_msgBlk0237.msgPreambleStr, /* begin varargs */ + rscn_did.un.word); /* end varargs */ + break; + + } + if(match) + break; + } + if(match == 0) /* Skip it */ + goto nsout; + } + + /* Add it to our discovery list */ + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + if ((binfo->fc_ffstate == FC_READY) && + (binfo->fc_flag & FC_RSCN_MODE)) { + ndlp->nlp_action |= NLP_DO_RSCN; + ndlp->nlp_flag &= ~NLP_NODEV_TMO; + } + else { + ndlp->nlp_action |= NLP_DO_DISC_START; + } + } + else { + if (binfo->fc_ffstate < FC_READY) { + /* Add it to our discovery list */ + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + ndlp->nlp_action |= NLP_DO_DISC_START; + } + } + } +nsout: + + /* Mark all node table entries that are in the Nameserver */ + if(ndlp) { + ndlp->nlp_flag |= NLP_NS_NODE; + ndlp->nlp_flag &= ~NLP_NS_REMOVED; + /* NameServer Rsp */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0238, /* ptr to msg structure */ + fc_mes0238, /* ptr to msg */ + fc_msgBlk0238.msgPreambleStr, /* begin varargs */ + Did, + ndlp->nlp_flag, + binfo->fc_flag, + binfo->fc_rscn_id_cnt); /* end varargs */ + } + else { + /* NameServer Rsp */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0239, /* ptr to msg structure */ + fc_mes0239, /* ptr to msg */ + fc_msgBlk0239.msgPreambleStr, /* begin varargs */ + Did, + (ulong)ndlp, + binfo->fc_flag, + binfo->fc_rscn_id_cnt); /* end varargs */ + } + + if (Temp & SWAP_DATA(SLI_CT_LAST_ENTRY)) + goto nsout1; + Cnt -= sizeof(uint32); + } + tptr = 0; + } + +nsout1: + /* Take out all node table entries that are not in the NameServer */ + ndlp = binfo->fc_nlpbind_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + new_ndlp = (NODELIST *)ndlp->nlp_listp_next; + if ( (ndlp->nlp_state == NLP_LIMBO) || + (ndlp->nlp_state == NLP_SEED) || + (ndlp->nlp_DID == binfo->fc_myDID) || + (ndlp->nlp_DID == NameServer_DID) || + (ndlp->nlp_DID == FDMI_DID) || + (ndlp->nlp_type & NLP_FABRIC) || + (ndlp->nlp_flag & NLP_NS_NODE)) { + if(ndlp->nlp_flag & NLP_NS_NODE) { + ndlp->nlp_flag &= ~NLP_NS_NODE; + } else { + if(ndlp->nlp_DID != NameServer_DID) + ndlp->nlp_action &= ~(NLP_DO_ADDR_AUTH | NLP_DO_DISC_START | NLP_DO_RSCN); + } + goto loop1; + } + if ((binfo->fc_ffstate == FC_READY) && + (binfo->fc_flag & FC_RSCN_MODE) && + !(ndlp->nlp_action & NLP_DO_RSCN)) + goto loop1; + + if ((ndlp->nlp_DID != 0) && !(ndlp->nlp_flag & NLP_NODEV_TMO)) { + RING * rp; + IOCBQ * iocbq; + /* Look through ELS ring and remove any ELS cmds in progress */ + rp = &binfo->fc_ring[FC_ELS_RING]; + iocbq = (IOCBQ * )(rp->fc_txp.q_first); + while (iocbq) { + if(iocbq->iocb.un.elsreq.remoteID == ndlp->nlp_DID) { + iocbq->retry = 0xff; /* Mark for abort */ + } + iocbq = (IOCBQ * )iocbq->q; + } + /* In case its on fc_delay_timeout list */ + fc_abort_delay_els_cmd(p_dev_ctl, ndlp->nlp_DID); + + ndlp->nlp_flag &= ~(NLP_REQ_SND | NLP_REQ_SND_ADISC); + } + + ndlp->nlp_action &= ~(NLP_DO_ADDR_AUTH | NLP_DO_DISC_START | NLP_DO_RSCN); + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + ndlp->nlp_flag |= NLP_NS_REMOVED; + ndlp->nlp_type &= ~(NLP_FABRIC | NLP_IP_NODE); +loop1: + ndlp = new_ndlp; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + + } else if ((Response->CommandResponse.bits.CmdRsp == SWAP_DATA16(SLI_CT_RESPONSE_FS_RJT)) && + ((binfo->fc_ffstate == FC_NS_QRY) || + ((binfo->fc_ffstate == FC_READY) && (binfo->fc_flag & FC_RSCN_MODE)))) { + /* NameServer Rsp Error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0240, /* ptr to msg structure */ + fc_mes0240, /* ptr to msg */ + fc_msgBlk0240.msgPreambleStr, /* begin varargs */ + Response->CommandResponse.bits.CmdRsp, + (uint32)Response->ReasonCode, + (uint32)Response->Explanation, + binfo->fc_flag); /* end varargs */ + goto nsout1; + + } else { + /* NameServer Rsp Error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0241, /* ptr to msg structure */ + fc_mes0241, /* ptr to msg */ + fc_msgBlk0241.msgPreambleStr, /* begin varargs */ + Response->CommandResponse.bits.CmdRsp, + (uint32)Response->ReasonCode, + (uint32)Response->Explanation, + binfo->fc_flag); /* end varargs */ + } + + if (binfo->fc_ffstate == FC_NS_REG) { + /* Issue GID_FT to Nameserver */ + if (fc_ns_cmd(p_dev_ctl, nslp, SLI_CTNS_GID_FT)) + goto out; + } else { +out: + /* Done with NameServer for now, but leave logged in */ + + /* We can start discovery right now */ + /* Fire out PLOGIs on all nodes marked for discovery */ + binfo->fc_rscn_id_cnt = 0; + if ((binfo->fc_nlp_cnt <= 0) && !(binfo->fc_flag & FC_NLP_MORE)) { + binfo->fc_nlp_cnt = 0; + if ((binfo->fc_ffstate == FC_READY) && + (binfo->fc_flag & FC_RSCN_MODE)) { + nslp->nlp_action &= ~(NLP_DO_ADDR_AUTH | NLP_DO_RSCN); + fc_nextrscn(p_dev_ctl, fc_max_els_sent); + } + else { + nslp->nlp_action |= NLP_DO_ADDR_AUTH; + fc_nextnode(p_dev_ctl, nslp); + } + } + else { + nslp->nlp_action |= NLP_DO_ADDR_AUTH; + fc_nextnode(p_dev_ctl, nslp); + } + } + return(0); +} /* End fc_ns_rsp */ + +/**************************************************/ +/** fc_free_clearq **/ +/** **/ +/** Description: **/ +/** Called to free all clearq bufs for a device **/ +/** **/ +/** Returns: **/ +/** **/ +/**************************************************/ +_static_ void +fc_free_clearq( +dvi_t *dev_ptr) +{ + struct buf *bp, *nextbp; + FC_BRD_INFO * binfo; + + binfo = &dev_ptr->nodep->ap->info; + + /* Call iodone for all the CLEARQ error bufs */ + for (bp = dev_ptr->clear_head; bp != NULL; ) { + dev_ptr->clear_count--; + nextbp = bp->av_forw; + FCSTATCTR.fcpScsiTmo++; + fc_do_iodone(bp); + bp = nextbp; + } + dev_ptr->clear_head = NULL; + dev_ptr->flags &= ~SCSI_TQ_HALTED & ~SCSI_TQ_CLEARING; + + fc_restart_device(dev_ptr); + return; +} /* End fc_free_clearq */ + + +/****************************************************/ +/** fc_nextnode **/ +/** **/ +/** Description: **/ +/** Called during discovery or rediscovery **/ +/** **/ +/** Returns: **/ +/** **/ +/****************************************************/ +_static_ int +fc_nextnode( +fc_dev_ctl_t *p_dev_ctl, +NODELIST *ndlp) +{ + FC_BRD_INFO * binfo; + node_t * node_ptr; + dvi_t * dev_ptr; + iCfgParam * clp; + + binfo = &BINFO; + binfo->fc_fabrictmo = (2 * binfo->fc_ratov) + + ((4 * binfo->fc_edtov) / 1000) + 1; + + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + /* Device Discovery nextnode */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0242, /* ptr to msg structure */ + fc_mes0242, /* ptr to msg */ + fc_msgBlk0242.msgPreambleStr, /* begin varargs */ + (uint32)ndlp->nlp_state, + ndlp->nlp_DID, + (uint32)ndlp->nlp_flag, + binfo->fc_ffstate); /* end varargs */ + if (binfo->fc_flag & FC_FABRIC) { + if (binfo->fc_ffstate < FC_NS_QRY) { + return(0); + } + if ((binfo->fc_ffstate < FC_NODE_DISC) && binfo->fc_ns_retry) { + return(0); + } + } + + if(FABRICTMO) { + fc_clk_res(p_dev_ctl, binfo->fc_fabrictmo, FABRICTMO); + } + else { + FABRICTMO = fc_clk_set(p_dev_ctl, binfo->fc_fabrictmo, + fc_fabric_timeout, 0, 0); + } + + if ((ndlp->nlp_type & NLP_FCP_TARGET) && (ndlp->nlp_state == NLP_ALLOC)) { + if(clp[CFG_FIRST_CHECK].a_current) { + /* If we are an FCP node, update first_check flag for all LUNs */ + if ((node_ptr = (node_t * )ndlp->nlp_targetp) != NULL) { + for (dev_ptr = node_ptr->lunlist; dev_ptr != NULL; + dev_ptr = dev_ptr->next) { + dev_ptr->first_check = FIRST_CHECK_COND; + fc_device_changed(p_dev_ctl, dev_ptr); + } + } + } + } + + /* Check for ADISC Address Authentication */ + if (ndlp->nlp_action & NLP_DO_ADDR_AUTH) { + ndlp->nlp_flag &= ~(NLP_REQ_SND | NLP_REQ_SND_ADISC); + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + + if(ndlp->nlp_DID != NameServer_DID) + binfo->fc_nlp_cnt--; + + if (binfo->fc_nlp_cnt <= 0) { + /* If no nodes left to authenticate, redo discovery on any + * new nodes. + */ + if (fc_nextauth(p_dev_ctl, fc_max_els_sent) == 0) { + binfo->fc_nlp_cnt = 0; + fc_nextdisc(p_dev_ctl, fc_max_els_sent); + } + } else { + fc_nextauth(p_dev_ctl, 1); + } + + return(0); + } + + /* Check for RSCN Discovery */ + if (ndlp->nlp_action & NLP_DO_RSCN) { + ndlp->nlp_flag &= ~(NLP_REQ_SND | NLP_REQ_SND_ADISC); + ndlp->nlp_action &= ~NLP_DO_RSCN; + binfo->fc_nlp_cnt--; + if ((ndlp->nlp_type & NLP_IP_NODE) && ndlp->nlp_bp) { + m_freem((fcipbuf_t *)ndlp->nlp_bp); + ndlp->nlp_bp = (uchar * )0; + } + + if (ndlp->nlp_type & NLP_FCP_TARGET) { + node_t * node_ptr; + dvi_t * dev_ptr; + + if ((node_ptr = (node_t * )ndlp->nlp_targetp) != NULL) { + /* restart any I/Os on this node */ + for (dev_ptr = node_ptr->lunlist; + dev_ptr != NULL; dev_ptr = dev_ptr->next) { + dev_ptr->queue_state = HALTED; + } + } + } + + if (binfo->fc_nlp_cnt <= 0) { + binfo->fc_nlp_cnt = 0; + fc_nextrscn(p_dev_ctl, fc_max_els_sent); + } else { + fc_nextrscn(p_dev_ctl, 1); + } + } + + /* Check for Address Discovery */ + if ((ndlp->nlp_action & NLP_DO_DISC_START) || + (ndlp->nlp_flag & NLP_REQ_SND)) { + ndlp->nlp_flag &= ~NLP_REQ_SND; + ndlp->nlp_action &= ~NLP_DO_DISC_START; + binfo->fc_nlp_cnt--; + + if (binfo->fc_nlp_cnt <= 0) { + binfo->fc_nlp_cnt = 0; + fc_nextdisc(p_dev_ctl, fc_max_els_sent); + } else { + fc_nextdisc(p_dev_ctl, 1); + } + } + + return(0); +} /* End fc_nextnode */ + + +/****************************************************/ +/** fc_nextdisc **/ +/** **/ +/** Description: **/ +/** Called during discovery or rediscovery **/ +/** **/ +/** Returns: **/ +/** **/ +/****************************************************/ +_static_ int +fc_nextdisc( +fc_dev_ctl_t *p_dev_ctl, +int sndcnt) +{ + FC_BRD_INFO * binfo; + MAILBOXQ * mb; + NODELIST * ndlp; + NODELIST * new_ndlp; + int cnt, skip; + uint32 did; + + binfo = &BINFO; + /* Device Discovery nextdisc */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0243, /* ptr to msg structure */ + fc_mes0243, /* ptr to msg */ + fc_msgBlk0243.msgPreambleStr, /* begin varargs */ + binfo->fc_nlp_cnt, + sndcnt, + binfo->fc_mbox_active); /* end varargs */ + binfo->fc_ffstate = FC_NODE_DISC; + binfo->fc_fabrictmo = (2 * binfo->fc_ratov) + + ((4 * binfo->fc_edtov) / 1000) + 1; + if(FABRICTMO) { + fc_clk_res(p_dev_ctl, binfo->fc_fabrictmo, FABRICTMO); + } + else { + FABRICTMO = fc_clk_set(p_dev_ctl, binfo->fc_fabrictmo, + fc_fabric_timeout, 0, 0); + } + + /* For MAXREQ requests, we must make sure all outstanding Mailbox + * commands have been processed. This is to ensure UNREG_LOGINs + * complete before we try to relogin. + */ + if (sndcnt == fc_max_els_sent) { + if (binfo->fc_mbox_active) { + binfo->fc_flag |= FC_DELAY_PLOGI; + return(fc_max_els_sent); + } + } + + cnt = 0; + skip = 0; + binfo->fc_flag &= ~FC_NLP_MORE; + + /* We can start discovery right now */ + /* Fire out PLOGIs on all nodes marked for discovery */ + ndlp = binfo->fc_nlpbind_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + new_ndlp = (NODELIST *)ndlp->nlp_listp_next; + + if ((ndlp->nlp_action & NLP_DO_DISC_START) && + (ndlp->nlp_DID != NameServer_DID)) { + if(!(ndlp->nlp_flag & (NLP_REQ_SND | NLP_REG_INP | NLP_RM_ENTRY))) { + binfo->fc_nlp_cnt++; + did = ndlp->nlp_DID; + if(did == 0) + did = ndlp->nlp_oldDID; + /* Start discovery for this node */ + fc_els_cmd(binfo, ELS_CMD_PLOGI, (void *)((ulong)did), + (uint32)0, (ushort)0, ndlp); + cnt++; + + if ((binfo->fc_nlp_cnt >= fc_max_els_sent) || + (cnt == sndcnt)) { + binfo->fc_flag |= FC_NLP_MORE; + return(cnt); + } + } + else + skip++; + } + ndlp = new_ndlp; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + + if ((binfo->fc_nlp_cnt) || skip) + return(binfo->fc_nlp_cnt); + + /* This should turn off DELAYED ABTS for ELS timeouts */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX))) { + fc_set_slim(binfo, (MAILBOX * )mb, 0x052198, 0); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + + /* Nothing to authenticate, so CLEAR_LA right now */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + binfo->fc_ffstate = FC_CLEAR_LA; + fc_clear_la(binfo, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } else { + /* Device Discovery completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0244, /* ptr to msg structure */ + fc_mes0244, /* ptr to msg */ + fc_msgBlk0244.msgPreambleStr); /* begin & end varargs */ + binfo->fc_ffstate = FC_ERROR; + } + + if(FABRICTMO) { + fc_clk_can(p_dev_ctl, FABRICTMO); + FABRICTMO = 0; + } + return(0); +} /* End fc_nextdisc */ + + +/****************************************************/ +/** fc_nextauth **/ +/** **/ +/** Description: **/ +/** Called during rediscovery **/ +/** **/ +/** Returns: **/ +/** **/ +/****************************************************/ +_static_ int +fc_nextauth( +fc_dev_ctl_t *p_dev_ctl, +int sndcnt) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + NODELIST * ndlp; + NODELIST * new_ndlp; + int cnt; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + /* Device Discovery next authentication */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0245, /* ptr to msg structure */ + fc_mes0245, /* ptr to msg */ + fc_msgBlk0245.msgPreambleStr, /* begin varargs */ + binfo->fc_nlp_cnt, + sndcnt, + binfo->fc_mbox_active); /* end varargs */ + cnt = 0; + binfo->fc_flag &= ~FC_NLP_MORE; + binfo->fc_fabrictmo = (2 * binfo->fc_ratov) + + ((4 * binfo->fc_edtov) / 1000) + 1; + if(FABRICTMO) { + fc_clk_res(p_dev_ctl, binfo->fc_fabrictmo, FABRICTMO); + } + else { + FABRICTMO = fc_clk_set(p_dev_ctl, binfo->fc_fabrictmo, + fc_fabric_timeout, 0, 0); + } + + /* We can start rediscovery right now */ + /* Fire out ADISC on all nodes marked for addr_auth */ + + ndlp = binfo->fc_nlpbind_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + new_ndlp = (NODELIST *)ndlp->nlp_listp_next; + + if (ndlp->nlp_action & NLP_DO_ADDR_AUTH) { + if (ndlp->nlp_flag & (NLP_RM_ENTRY | NLP_REQ_SND_ADISC | + NLP_REQ_SND | NLP_REG_INP)) + goto loop1; + + if ((ndlp->nlp_type & NLP_FCP_TARGET) && + ((!clp[CFG_USE_ADISC].a_current) || (ndlp->nlp_Rpi == 0))) { + /* Force regular discovery on this node */ + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + ndlp->nlp_action |= NLP_DO_DISC_START; + goto loop1; + } else { + if ((ndlp->nlp_type & NLP_IP_NODE) && (ndlp->nlp_Rpi == 0)) { + /* Force regular discovery on this node */ + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + goto loop1; + } + } + + if((ndlp->nlp_type & (NLP_FCP_TARGET | NLP_IP_NODE)) == 0) { + /* Force regular discovery on this node */ + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + ndlp->nlp_action |= NLP_DO_DISC_START; + goto loop1; + } + + binfo->fc_nlp_cnt++; + /* Start authentication */ + fc_els_cmd(binfo, ELS_CMD_ADISC, (void *)((ulong)ndlp->nlp_DID), + (uint32)0, (ushort)0, ndlp); + cnt++; + if ((binfo->fc_nlp_cnt >= fc_max_els_sent) || + (cnt == sndcnt)) { + binfo->fc_flag |= FC_NLP_MORE; + return(cnt); + } + } +loop1: + ndlp = new_ndlp; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + + return(binfo->fc_nlp_cnt); +} /* End fc_nextauth */ + +/****************************************************/ +/** fc_nextrscn **/ +/** **/ +/** Description: **/ +/** Called during RSCN processing **/ +/** **/ +/** Returns: **/ +/** **/ +/****************************************************/ +_static_ int +fc_nextrscn( +fc_dev_ctl_t *p_dev_ctl, +int sndcnt) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + NODELIST * ndlp; + NODELIST * new_ndlp; + MAILBOXQ * mb; + struct buf * bp, * nextbp; + RING * rp; + IOCBQ * xmitiq; + IOCB * iocb; + MATCHMAP * mp; + int i, j, cnt; + uint32 did; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + /* Device Discovery next RSCN */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0246, /* ptr to msg structure */ + fc_mes0246, /* ptr to msg */ + fc_msgBlk0246.msgPreambleStr, /* begin varargs */ + binfo->fc_nlp_cnt, + sndcnt, + binfo->fc_mbox_active, + binfo->fc_flag); /* end varargs */ + cnt = 0; + if (binfo->fc_flag & FC_RSCN_DISC_TMR) + goto out; + + /* Are we waiting for a NameServer Query to complete */ + if (binfo->fc_flag & FC_NSLOGI_TMR) + return(1); + + if (binfo->fc_mbox_active) { + binfo->fc_flag |= FC_DELAY_PLOGI; + return(1); + } + + binfo->fc_flag &= ~FC_NLP_MORE; + + if(FABRICTMO) { + fc_clk_res(p_dev_ctl, binfo->fc_fabrictmo, FABRICTMO); + } + else { + FABRICTMO = fc_clk_set(p_dev_ctl, binfo->fc_fabrictmo, + fc_fabric_timeout, 0, 0); + } + + /* We can start rediscovery right now */ + /* Fire out PLOGI on all nodes marked for rscn */ + ndlp = binfo->fc_nlpbind_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + new_ndlp = (NODELIST *)ndlp->nlp_listp_next; + + if (ndlp->nlp_action & NLP_DO_RSCN) { + if (ndlp->nlp_flag & (NLP_RM_ENTRY | NLP_REQ_SND_ADISC | + NLP_REQ_SND | NLP_REG_INP)) + goto loop2; + + did = ndlp->nlp_DID; + if(did == 0) { + did = ndlp->nlp_oldDID; + if(did == 0) + goto loop2; + } + + binfo->fc_nlp_cnt++; + + /* We are always using ADISC for RSCN validation */ + if ((ndlp->nlp_type & NLP_FCP_TARGET) && (ndlp->nlp_Rpi == 0)) { + /* Force regular discovery on this node */ + fc_els_cmd(binfo, ELS_CMD_PLOGI, (void *)((ulong)did), + (uint32)0, (ushort)0, ndlp); + } else { + if (((ndlp->nlp_type & NLP_IP_NODE) && (ndlp->nlp_Rpi == 0)) || + ((ndlp->nlp_type & (NLP_FCP_TARGET | NLP_IP_NODE)) == 0)) { + /* Force regular discovery on this node */ + fc_els_cmd(binfo, ELS_CMD_PLOGI, (void *)((ulong)did), + (uint32)0, (ushort)0, ndlp); + } + else { + fc_els_cmd(binfo, ELS_CMD_ADISC,(void *)((ulong)did), + (uint32)0, (ushort)0, ndlp); + } + } + cnt++; + if ((binfo->fc_nlp_cnt >= fc_max_els_sent) || + (cnt == sndcnt)) { + binfo->fc_flag |= FC_NLP_MORE; + return(cnt); + } + } +loop2: + ndlp = new_ndlp; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + + if (binfo->fc_nlp_cnt) + return(binfo->fc_nlp_cnt); + +out: + if (binfo->fc_flag & FC_RSCN_DISCOVERY) { + /* Discovery RSCN */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0247, /* ptr to msg structure */ + fc_mes0247, /* ptr to msg */ + fc_msgBlk0247.msgPreambleStr, /* begin varargs */ + binfo->fc_defer_rscn.q_cnt, + binfo->fc_flag, + (ulong)(binfo->fc_rscn_disc_wdt)); /* end varargs */ + if(binfo->fc_rscn_disc_wdt == 0) { + binfo->fc_rscn_disc_wdt = fc_clk_set(p_dev_ctl, + ((binfo->fc_edtov / 1000) + 1), fc_rscndisc_timeout, 0, 0); + /* Free any deferred RSCNs */ + fc_flush_rscn_defer(p_dev_ctl); + return(0); + } + + if(!(binfo->fc_flag & FC_RSCN_DISC_TMR)) + return(0); + + binfo->fc_flag &= ~(FC_RSCN_DISC_TMR | FC_RSCN_DISCOVERY); + binfo->fc_rscn_disc_wdt = 0; + + /* RSCN match on all DIDs in NameServer */ + binfo->fc_rscn_id_list[0] = 0x03000000; + binfo->fc_rscn_id_cnt = 1; + + /* Free any deferred RSCNs */ + fc_flush_rscn_defer(p_dev_ctl); + + /* Authenticate all nodes in nlplist */ + ndlp = binfo->fc_nlpbind_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + while(ndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + new_ndlp = (NODELIST *)ndlp->nlp_listp_next; + + /* Skip over FABRIC nodes and myself */ + if ((ndlp->nlp_DID == binfo->fc_myDID) || + (ndlp->nlp_type & NLP_FABRIC) || + ((ndlp->nlp_DID & CT_DID_MASK) == CT_DID_MASK)) + goto loop3; + + if (ndlp->nlp_state == NLP_ALLOC) { + /* Mark node for authentication */ + ndlp->nlp_action |= NLP_DO_RSCN; + ndlp->nlp_flag &= ~NLP_NODEV_TMO; + + /* We are always using ADISC for RSCN validation */ + } +loop3: + ndlp = new_ndlp; + if(ndlp == (NODELIST *)&binfo->fc_nlpbind_start) + ndlp = binfo->fc_nlpunmap_start; + if(ndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + ndlp = binfo->fc_nlpmap_start; + } + + fc_issue_ns_query(p_dev_ctl, (void *)0, (void *)0); + return(0); + } + + if (binfo->fc_defer_rscn.q_first) { + uint32 * lp; + D_ID rdid; + uint32 cmd; + + /* process any deferred RSCNs */ + /* Deferred RSCN */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0248, /* ptr to msg structure */ + fc_mes0248, /* ptr to msg */ + fc_msgBlk0248.msgPreambleStr, /* begin varargs */ + binfo->fc_defer_rscn.q_cnt, + binfo->fc_flag); /* end varargs */ + binfo->fc_rscn_id_cnt = 0; + rp = &binfo->fc_ring[FC_ELS_RING]; + while (binfo->fc_defer_rscn.q_first) { + xmitiq = (IOCBQ * )binfo->fc_defer_rscn.q_first; + if ((binfo->fc_defer_rscn.q_first = xmitiq->q) == 0) { + binfo->fc_defer_rscn.q_last = 0; + } + binfo->fc_defer_rscn.q_cnt--; + iocb = &xmitiq->iocb; + mp = *((MATCHMAP **)iocb); + *((MATCHMAP **)iocb) = 0; + xmitiq->q = NULL; + + lp = (uint32 * )mp->virt; + cmd = *lp++; + i = SWAP_DATA(cmd) & 0xffff; /* payload length */ + i -= sizeof(uint32); /* take off word 0 */ + while (i) { + rdid.un.word = *lp++; + rdid.un.word = SWAP_DATA(rdid.un.word); + if(binfo->fc_rscn_id_cnt < FC_MAX_HOLD_RSCN) { + for(j=0;jfc_rscn_id_cnt;j++) { + if(binfo->fc_rscn_id_list[j] == rdid.un.word) { + goto skip_id; + } + } + binfo->fc_rscn_id_list[binfo->fc_rscn_id_cnt++] = rdid.un.word; + } + else { + binfo->fc_flag |= FC_RSCN_DISCOVERY; + goto out1; + } +skip_id: + cnt += (fc_handle_rscn(p_dev_ctl, &rdid)); + i -= sizeof(uint32); + } + +out1: + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + + i = 1; + /* free resources associated with this iocb and repost the ring buffers */ + if (!(binfo->fc_flag & FC_SLI2)) { + for (i = 1; i < (int)iocb->ulpBdeCount; i++) { + mp = fc_getvaddr(p_dev_ctl, rp, (uchar * )((ulong)iocb->un.cont[i].bdeAddress)); + if (mp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + } + } + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + if (binfo->fc_flag & FC_RSCN_DISCOVERY) + goto out; + } + if (cnt == 0) { + /* no need for nameserver login */ + fc_nextrscn(p_dev_ctl, fc_max_els_sent); + } + else + fc_issue_ns_query(p_dev_ctl, (void *)0, (void *)0); + + return(0); + } + + binfo->fc_flag &= ~FC_RSCN_MODE; + binfo->fc_rscn_id_cnt = 0; + + /* This should turn off DELAYED ABTS for ELS timeouts */ + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX))) { + fc_set_slim(binfo, (MAILBOX * )mb, 0x052198, 0); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + /* Device Discovery completes */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0249, /* ptr to msg structure */ + fc_mes0249, /* ptr to msg */ + fc_msgBlk0249.msgPreambleStr, /* begin varargs */ + binfo->fc_flag); /* end varargs */ + /* Fix up any changed RPIs in FCP IOCBs queued up a txq */ + fc_fcp_fix_txq(p_dev_ctl); + + + if(FABRICTMO) { + fc_clk_can(p_dev_ctl, FABRICTMO); + FABRICTMO = 0; + } + + if(clp[CFG_FCP_ON].a_current) { + + fc_restart_all_devices(p_dev_ctl); + + /* Call iodone for any commands that timed out previously */ + for (bp = p_dev_ctl->timeout_head; bp != NULL; ) { + nextbp = bp->av_forw; + bp->b_error = ETIMEDOUT; + bp->b_flags |= B_ERROR; + bp->b_resid = bp->b_bcount; + FCSTATCTR.fcpScsiTmo++; + fc_do_iodone(bp); + bp = nextbp; + } + p_dev_ctl->timeout_count = 0; + p_dev_ctl->timeout_head = NULL; + /* Send down any saved FCP commands */ + fc_issue_cmd(p_dev_ctl); + } + return(0); +} /* End fc_nextrscn */ + + +_static_ int +fc_online( +fc_dev_ctl_t * p_dev_ctl) +{ + FC_BRD_INFO * binfo; + int ipri; + int j; + + if(p_dev_ctl) { + ipri = disable_lock(FC_LVL, &CMD_LOCK); + binfo = &BINFO; + if (!(binfo->fc_flag & FC_OFFLINE_MODE)) { + unlock_enable(ipri, &CMD_LOCK); + return(0); + } + /* Bring Adapter online */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0458, /* ptr to msg structure */ + fc_mes0458, /* ptr to msg */ + fc_msgBlk0458.msgPreambleStr); /* begin & end varargs */ + binfo->fc_flag &= ~FC_OFFLINE_MODE; + + fc_brdreset(p_dev_ctl); + unlock_enable(ipri, &CMD_LOCK); + fc_cfg_init(p_dev_ctl); + return(0); + } + + fc_diag_state = DDI_ONDI; + + /* + * find the device in the dev_array if it is there + */ + for (j = 0; j < MAX_FC_BRDS; j++) { + p_dev_ctl = DD_CTL.p_dev[j]; + if (p_dev_ctl) { + ipri = disable_lock(FC_LVL, &CMD_LOCK); + binfo = &BINFO; + if (!(binfo->fc_flag & FC_OFFLINE_MODE)) + continue; + /* Bring Adapter online */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0459, /* ptr to msg structure */ + fc_mes0459, /* ptr to msg */ + fc_msgBlk0459.msgPreambleStr); /* begin & end varargs */ + binfo->fc_flag &= ~FC_OFFLINE_MODE; + + fc_brdreset(p_dev_ctl); + unlock_enable(ipri, &CMD_LOCK); + fc_cfg_init(p_dev_ctl); + continue; + } + } + return(0); +} /* End fc_online */ + + +_static_ int +fc_offline( +fc_dev_ctl_t * p_dev_ctl) +{ + FC_BRD_INFO * binfo; + int ipri; + int j; + + if(p_dev_ctl) { + ipri = disable_lock(FC_LVL, &CMD_LOCK); + binfo = &BINFO; + if (binfo->fc_flag & FC_OFFLINE_MODE) { + unlock_enable(ipri, &CMD_LOCK); + return(0); + } + /* Bring Adapter offline */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0460, /* ptr to msg structure */ + fc_mes0460, /* ptr to msg */ + fc_msgBlk0460.msgPreambleStr); /* begin & end varargs */ + + fc_cfg_remove(p_dev_ctl); + binfo->fc_flag |= FC_OFFLINE_MODE; + + unlock_enable(ipri, &CMD_LOCK); + return(0); + } + fc_diag_state = DDI_OFFDI; + + /* + * find the device in the dev_array if it is there + */ + for (j = 0; j < MAX_FC_BRDS; j++) { + p_dev_ctl = DD_CTL.p_dev[j]; + if (p_dev_ctl) { + ipri = disable_lock(FC_LVL, &CMD_LOCK); + binfo = &BINFO; + if (binfo->fc_flag & FC_OFFLINE_MODE) { + unlock_enable(ipri, &CMD_LOCK); + continue; + } + /* Bring Adapter offline */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0452, /* ptr to msg structure */ + fc_mes0452, /* ptr to msg */ + fc_msgBlk0452.msgPreambleStr); /* begin & end varargs */ + + fc_cfg_remove(p_dev_ctl); + binfo->fc_flag |= FC_OFFLINE_MODE; + unlock_enable(ipri, &CMD_LOCK); + continue; + } + } + return(0); +} /* End fc_offline */ + + +_static_ int +fc_attach( +int index, +uint32 *p_uio) /* pointer to driver specific structure */ +{ + fc_dev_ctl_t * p_dev_ctl; + FC_BRD_INFO * binfo; + iCfgParam * clp; + int rc, i; + + if ((p_dev_ctl = DD_CTL.p_dev[index]) == NULL) { + rc = ENOMEM; + return(rc); + } + + binfo = &BINFO; + fc_diag_state = DDI_ONDI; + + binfo->fc_brd_no = index; /* FC board number */ + binfo->fc_p_dev_ctl = (uchar * )p_dev_ctl; + binfo->nlptimer = 1; + binfo->fc_fcpnodev.nlp_Rpi = 0xfffe; + binfo->fc_nlpbind_start = (NODELIST *)&binfo->fc_nlpbind_start; + binfo->fc_nlpbind_end = (NODELIST *)&binfo->fc_nlpbind_start; + binfo->fc_nlpmap_start = (NODELIST *)&binfo->fc_nlpmap_start; + binfo->fc_nlpmap_end = (NODELIST *)&binfo->fc_nlpmap_start; + binfo->fc_nlpunmap_start = (NODELIST *)&binfo->fc_nlpunmap_start; + binfo->fc_nlpunmap_end = (NODELIST *)&binfo->fc_nlpunmap_start; + + /* Initialize current value of config parameters from default */ + clp = DD_CTL.p_config[binfo->fc_brd_no]; + for(i=0;ifc_sli = (uchar)2; + clp[CFG_ZONE_RSCN].a_current = 1; /* ALWAYS force NS login on RSCN */ + + /* config the device */ + if ((rc = fc_cfg_init(p_dev_ctl))) { + return(rc); + } + return(0); +} + + +_static_ int +fc_detach( +int index) /* device unit number */ +{ + fc_dev_ctl_t * p_dev_ctl; + FC_BRD_INFO * binfo; + + p_dev_ctl = DD_CTL.p_dev[index]; + binfo = &BINFO; + if (p_dev_ctl == 0) + return(0); + + + if (!(binfo->fc_flag & FC_OFFLINE_MODE)) { + /* Free the device resources */ + fc_cfg_remove(p_dev_ctl); + } + + /* De-register the interrupt handler */ + if (p_dev_ctl->intr_inited) { + i_clear(&IHS); + p_dev_ctl->intr_inited = 0; + } + + fc_unmemmap(p_dev_ctl); + return(0); +} + + +/*****************************************************************************/ +/* + * NAME: fc_cfg_init + * + * FUNCTION: perform CFG_INIT function. Initialize the device control + * structure and get the adapter VPD data. + * + * EXECUTION ENVIRONMENT: process only + * + * CALLED FROM: + * fc_config + * + * INPUT: + * p_dev_ctl - pointer to the dev_ctl area + * + * RETURNS: + * 0 - OK + * EEXIST - device name in use (from ns_attach) + * EINVAL - invalid parameter was passed + * EIO - permanent I/O error + */ +/*****************************************************************************/ +_static_ int +fc_cfg_init( +fc_dev_ctl_t *p_dev_ctl) /* pointer to the device control area */ +{ + int rc; /* return code */ + int i; + FC_BRD_INFO * binfo; + iCfgParam * clp; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + p_dev_ctl->ctl_correlator = (void * ) & DD_CTL; + + for (i = 0; i < NLP_MAXPAN; i++) { + p_dev_ctl->adapter_state[i] = CLOSED; + } + + if ((rc = fc_pcimap(p_dev_ctl))) { + return(rc); + } + + if ((rc = fc_memmap(p_dev_ctl))) { + return(rc); + } + + /* offset from beginning of SLIM */ + BINFO.fc_mboxaddr = 0; + + BINFO.fc_mbox_active = 0; + BINFO.fc_ns_retry = 0; + BINFO.fc_process_LA = 0; + BINFO.fc_edtov = FF_DEF_EDTOV; + BINFO.fc_ratov = FF_DEF_RATOV; + BINFO.fc_altov = FF_DEF_ALTOV; + BINFO.fc_arbtov = FF_DEF_ARBTOV; + + /* offset from beginning of register space */ + BINFO.fc_HAregaddr = (sizeof(uint32) * HA_REG_OFFSET); + BINFO.fc_FFregaddr = (sizeof(uint32) * CA_REG_OFFSET); + BINFO.fc_STATregaddr = (sizeof(uint32) * HS_REG_OFFSET); + BINFO.fc_HCregaddr = (sizeof(uint32) * HC_REG_OFFSET); + BINFO.fc_BCregaddr = (sizeof(uint32) * BC_REG_OFFSET); + + + /* save the dev_ctl address in the NDD correlator field */ + NDD.ndd_name = DDS.logical_name;/* point to the name contained in the dds */ + NDD.ndd_alias = DDS.dev_alias; /* point to the name contained in the dds */ + + + + binfo->fc_ring[FC_IP_RING].fc_tx.q_max = + (ushort)clp[CFG_XMT_Q_SIZE].a_current; + + p_dev_ctl->iostrat_event = EVENT_NULL; + p_dev_ctl->iostrat_head = NULL; + p_dev_ctl->iostrat_tail = NULL; + + /* + * Perform any device-specific initialization necessary at the + * CFG_INIT time. If there is any error during the device initialization, + * the CFG_INIT will fail. Also get VPD data. + */ + if ((rc = fc_ffinit(p_dev_ctl))) { + return(rc); + } + + /* Now setup physical address */ + fc_bcopy(binfo->fc_portname.IEEE, p_dev_ctl->phys_addr, 6); + + return(0); +} /* End fc_cfg_init */ + + +/*****************************************************************************/ +/* + * NAME: fc_cfg_remove + * + * FUNCTION: Remove the device resources that have been allocated during + * CFG_INIT configuration time. + * + * EXECUTION ENVIRONMENT: process only + * + * NOTES: + * + * CALLED FROM: + * fc_config + * + * INPUT: + * p_dev_ctl - address of a pointer to the dev control structure + * + * RETURNS: + * none. + */ +/*****************************************************************************/ +_static_ void +fc_cfg_remove( +fc_dev_ctl_t *p_dev_ctl) /* point to the dev_ctl area */ +{ + fc_free_rpilist(p_dev_ctl, 0); + + /* Release the watchdog timers and disable board interrupts */ + fc_ffcleanup(p_dev_ctl); + + fc_free_buffer(p_dev_ctl); /* free device buffers */ + + fc_brdreset(p_dev_ctl); + +} /* End fc_cfg_remove */ + + +/*****************************************************************************/ +/* + * NAME: fc_ffcleanup + * + * EXECUTION ENVIRONMENT: process only + * + * CALLED FROM: + * CFG_TERM + * + * INPUT: + * p_dev_ctl - pointer to the dev_ctl area. + * + * RETURNS: + * none + */ +/*****************************************************************************/ +_static_ void +fc_ffcleanup( +fc_dev_ctl_t *p_dev_ctl) /* pointer to the dev_ctl area */ +{ + int i; + RING * rp; + FC_BRD_INFO * binfo; + void *ioa; + MAILBOX * mb; + + binfo = &BINFO; + binfo->fc_process_LA = 0; + + /* Disable all but the mailbox interrupt */ + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + WRITE_CSR_REG(binfo, FC_HC_REG(binfo, ioa), HC_MBINT_ENA); + FC_UNMAP_MEMIO(ioa); + + /* Issue unreg_login command to logout all nodes */ + if (p_dev_ctl->init_eventTag) { + /* Get a buffer for mailbox command */ + if ((mb = (MAILBOX * )fc_mem_get(binfo, MEM_MBOX)) == NULL) { + } else { + fc_unreg_login(binfo, 0xffff, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + /* Clear all interrupt enable conditions */ + WRITE_CSR_REG(binfo, FC_HC_REG(binfo, ioa), 0); + FC_UNMAP_MEMIO(ioa); + + for (i = 0; i < binfo->fc_ffnumrings; i++) { + rp = &binfo->fc_ring[i]; + /* Clear the transmit watchdog timer */ + if (rp->fc_wdt_inited) { + if(RINGTMO) { + fc_clk_can(p_dev_ctl, RINGTMO); + RINGTMO = 0; + } + rp->fc_wdt_inited = 0; + } + } + + if(MBOXTMO) { + fc_clk_can(p_dev_ctl, MBOXTMO); + MBOXTMO = 0; + } + if(FABRICTMO) { + fc_clk_can(p_dev_ctl, FABRICTMO); + FABRICTMO = 0; + } + + fc_flush_rscn_defer(p_dev_ctl); + + fc_flush_clk_set(p_dev_ctl, fc_delay_timeout); + + fc_flush_clk_set(p_dev_ctl, lpfc_scsi_selto_timeout); + +} /* End fc_ffcleanup */ + + +/*****************************************************************************/ +/* + * NAME: fc_start + * + * FUNCTION: Initialize and activate the adapter. + * + * EXECUTION ENVIRONMENT: process or interrupt + * + * CALLED FROM: + * fc_config + * + * INPUT: + * p_dev_ctl - pointer to the dev_ctl area. + * + * RETURNS: + * NONE + */ +/*****************************************************************************/ + +_static_ void +fc_start( +fc_dev_ctl_t *p_dev_ctl) /* pointer to the dev_ctl area */ +{ + uint32 i, j; + FC_BRD_INFO * binfo; + iCfgParam * clp; + void * ioa; + RING * rp; + + /* Activate the adapter and allocate all the resources needed */ + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + /* Enable appropriate host interrupts */ + i = (uint32) (HC_MBINT_ENA | HC_ERINT_ENA); + if (binfo->fc_ffnumrings > 0) + i |= HC_R0INT_ENA; + if (binfo->fc_ffnumrings > 1) + i |= HC_R1INT_ENA; + if (binfo->fc_ffnumrings > 2) + i |= HC_R2INT_ENA; + if (binfo->fc_ffnumrings > 3) + i |= HC_R3INT_ENA; + + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + WRITE_CSR_REG(binfo, FC_HC_REG(binfo, ioa), i); + FC_UNMAP_MEMIO(ioa); + + for (i = 0; i < (uint32)binfo->fc_ffnumrings; i++) { + /* Initialize / post buffers to ring */ + fc_setup_ring(p_dev_ctl, i); + + if (i == FC_ELS_RING) { + /* Now post receive buffers to the ring */ + rp = &binfo->fc_ring[i]; + for (j = 0; j < 64; j++) + fc_post_buffer(p_dev_ctl, rp, 2); + } + } + + clp = DD_CTL.p_config[binfo->fc_brd_no]; + if(clp[CFG_NETWORK_ON].a_current) { + rp = &binfo->fc_ring[FC_IP_RING]; + i = clp[CFG_POST_IP_BUF].a_current; + while(i) { + fc_post_mbuf(p_dev_ctl, rp, 2); + i -= 2; + } + } + + /* set up the watchdog timer control structure section */ + binfo->fc_fabrictmo = FF_DEF_RATOV + 1; + +} /* End fc_start */ + + +_static_ void +fc_process_reglogin( +fc_dev_ctl_t *p_dev_ctl, /* pointer to the dev_ctl area */ +NODELIST *ndlp) +{ + node_t * node_ptr; + RING * rp; + FC_BRD_INFO * binfo; + iCfgParam * clp; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + ndlp->nlp_flag &= ~NLP_REG_INP; + if (ndlp->nlp_DID == Fabric_DID) { + ndlp->nlp_flag &= ~NLP_FARP_SND; + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + } else { + /* If we are an FCP node, update the rpi */ + if (ndlp->nlp_type & NLP_FCP_TARGET) { + if ((node_ptr = (node_t * )ndlp->nlp_targetp) != NULL) { + node_ptr->rpi = (ushort)ndlp->nlp_Rpi; + node_ptr->last_good_rpi = (ushort)ndlp->nlp_Rpi; + node_ptr->nlp = ndlp; + node_ptr->flags &= ~FC_NODEV_TMO; + ndlp->nlp_flag &= ~NLP_NODEV_TMO; + } + else { + int dev_index; + + dev_index = INDEX(ndlp->id.nlp_pan, ndlp->id.nlp_sid); + node_ptr = binfo->device_queue_hash[dev_index].node_ptr; + if(node_ptr) { + /* This is a new device that entered the loop */ + node_ptr->nlp = ndlp; + node_ptr->rpi = (ushort)ndlp->nlp_Rpi; + node_ptr->last_good_rpi = (ushort)ndlp->nlp_Rpi; + node_ptr->scsi_id = dev_index; + ndlp->nlp_targetp = (uchar *)node_ptr; + node_ptr->flags &= ~FC_NODEV_TMO; + ndlp->nlp_flag &= ~NLP_NODEV_TMO; + } + } + } + + if((ndlp->nlp_DID & CT_DID_MASK) == CT_DID_MASK) + ndlp->nlp_state = NLP_LOGIN; + + /* HBA Mgmt */ + if(ndlp->nlp_DID == FDMI_DID) { + ndlp->nlp_state = NLP_LOGIN; + return; + } + + /* If we are a NameServer, go to next phase */ + if (ndlp->nlp_DID == NameServer_DID) { + int fabcmd; + + ndlp->nlp_state = NLP_LOGIN; + + if(binfo->fc_ffstate == FC_READY) { + fabcmd = SLI_CTNS_GID_FT; + } + else { + fabcmd = SLI_CTNS_RFT_ID; + } + + /* Issue RFT_ID / GID_FT to Nameserver */ + if (fc_ns_cmd(p_dev_ctl, ndlp, fabcmd)) { + /* error so start discovery */ + /* Done with NameServer for now, but keep logged in */ + ndlp->nlp_action &= ~NLP_DO_RSCN; + + /* Fire out PLOGIs on nodes marked for discovery */ + if ((binfo->fc_nlp_cnt <= 0) && + !(binfo->fc_flag & FC_NLP_MORE)) { + binfo->fc_nlp_cnt = 0; + if ((binfo->fc_ffstate == FC_READY) && + (binfo->fc_flag & FC_RSCN_MODE)) { + fc_nextrscn(p_dev_ctl, fc_max_els_sent); + } + else { + fc_nextnode(p_dev_ctl, ndlp); + } + } + else { + fc_nextnode(p_dev_ctl, ndlp); + } + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + } + return; + } + + /* If we are in the middle of Discovery */ + if ((ndlp->nlp_type & NLP_FCP_TARGET) || + (ndlp->nlp_action & NLP_DO_DISC_START) || + (ndlp->nlp_action & NLP_DO_ADDR_AUTH) || + (ndlp->nlp_action & NLP_DO_RSCN) || + (ndlp->nlp_action & NLP_DO_SCSICMD) || + (binfo->fc_flag & FC_PT2PT) || + (ndlp->nlp_portname.nameType != NAME_IEEE)) { + + ndlp->nlp_flag &= ~NLP_FARP_SND; + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + if((!(binfo->fc_flag & FC_PT2PT)) && (ndlp->nlp_action == 0)) { + if(binfo->fc_ffstate == FC_READY) { + ndlp->nlp_action |= NLP_DO_RSCN; + } + else { + ndlp->nlp_action |= NLP_DO_DISC_START; + } + } + if(clp[CFG_FCP_ON].a_current) { + ndlp->nlp_state = NLP_PRLI; + if((ndlp->nlp_flag & NLP_RCV_PLOGI) && + (!(ndlp->nlp_action) || (ndlp->nlp_flag & NLP_REQ_SND)) && + !(binfo->fc_flag & FC_PT2PT)) { + ndlp->nlp_state = NLP_LOGIN; + } + else { + if((ndlp->nlp_DID & Fabric_DID_MASK) != Fabric_DID_MASK) { + fc_els_cmd(binfo, ELS_CMD_PRLI, + (void *)((ulong)ndlp->nlp_DID), (uint32)0, (ushort)0, ndlp); + } + else + fc_nextnode(p_dev_ctl, ndlp); + } + } else { + /* establish a new exchange for login registration */ + if ((ndlp->nlp_Xri == 0) && + (ndlp->nlp_type & NLP_IP_NODE) && + ((ndlp->nlp_DID & CT_DID_MASK) != CT_DID_MASK) && + !(ndlp->nlp_flag & NLP_RPI_XRI)) { + ndlp->nlp_flag |= NLP_RPI_XRI; + rp = &binfo->fc_ring[FC_ELS_RING]; + fc_create_xri(binfo, rp, ndlp); + } + if(!(ndlp->nlp_flag & NLP_RCV_PLOGI)) + fc_nextnode(p_dev_ctl, ndlp); + } + } else { + ndlp->nlp_flag &= ~NLP_FARP_SND; + ndlp->nlp_action &= ~NLP_DO_ADDR_AUTH; + /* establish a new exchange for Nport login registration */ + if ((ndlp->nlp_Xri == 0) && + ((ndlp->nlp_DID & CT_DID_MASK) != CT_DID_MASK) && + !(ndlp->nlp_flag & NLP_RPI_XRI)) { + ndlp->nlp_flag |= NLP_RPI_XRI; + rp = &binfo->fc_ring[FC_ELS_RING]; + fc_create_xri(binfo, rp, ndlp); /* IP ONLY */ + } + } + ndlp->nlp_flag &= ~NLP_RCV_PLOGI; + } + return; +} + +_static_ int +fc_snd_scsi_req( +fc_dev_ctl_t *p_dev_ctl, +NAME_TYPE *wwn, +MATCHMAP *bmp, +DMATCHMAP *fcpmp, +DMATCHMAP *omatp, +uint32 count, +struct dev_info *dev_ptr) +{ + FC_BRD_INFO *binfo; + NODELIST * ndlp; + RING * rp; + IOCBQ * temp; + IOCB * cmd; + ULP_BDE64 * bpl; + FCP_CMND * inqcmnd; + fc_buf_t * fcptr; + node_t * map_node_ptr; + struct dev_info * map_dev_ptr; + uint32 did; + fc_lun_t lun; + int i; + + binfo = &BINFO; + if(((ndlp = fc_findnode_wwpn(binfo, NLP_SEARCH_ALL, wwn)) == 0) || + (!(binfo->fc_flag & FC_SLI2))) { /* MUST be SLI2 */ + return(EACCES); + } + + if(ndlp->nlp_flag & NLP_REQ_SND) { + return(ENODEV); + } + + if(ndlp->nlp_state <= NLP_LOGIN) { + if ((ndlp->nlp_DID == binfo->fc_myDID) || + (ndlp->nlp_DID & Fabric_DID_MASK)) { + return(ENODEV); + } + ndlp->nlp_action |= NLP_DO_SCSICMD; + if((ndlp->nlp_state == NLP_LOGIN) && ndlp->nlp_Rpi) { + /* Need to send PRLI */ + fc_els_cmd(binfo, ELS_CMD_PRLI, + (void *)((ulong)ndlp->nlp_DID), (uint32)0, (ushort)0, ndlp); + } + else { + /* Need to send PLOGI */ + did = ndlp->nlp_DID; + if(did == 0) { + did = ndlp->nlp_oldDID; + } + if(!(ndlp->nlp_flag & NLP_NS_REMOVED)) { + fc_els_cmd(binfo, ELS_CMD_PLOGI, + (void *)((ulong)did), (uint32)0, (ushort)0, ndlp); + } + } + return(ENODEV); + } + + inqcmnd = (FCP_CMND *)fcpmp->dfc.virt; + lun = ((inqcmnd->fcpLunMsl >> FC_LUN_SHIFT) & 0xff); + + map_node_ptr = 0; + map_dev_ptr = 0; + + if (ndlp->nlp_type & NLP_SEED_MASK) { + /* If this is a mapped target, check qdepth limits */ + i = INDEX(ndlp->id.nlp_pan, ndlp->id.nlp_sid); + if ((map_node_ptr = binfo->device_queue_hash[i].node_ptr) != NULL) { + + if (map_node_ptr->tgt_queue_depth && + (map_node_ptr->tgt_queue_depth == map_node_ptr->num_active_io)) + return(ENODEV); + + if ((map_dev_ptr = fc_find_lun(binfo, i, lun))) { + if ((map_dev_ptr->active_io_count >= map_dev_ptr->fcp_cur_queue_depth) || + (map_dev_ptr->stop_send_io)) + return(ENODEV); + } + } + } + + rp = &binfo->fc_ring[FC_FCP_RING]; + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB)) == NULL) { + return(EACCES); + } + + fc_bzero((void *)dev_ptr, sizeof(dev_ptr)); + dev_ptr->lun_id = lun; + dev_ptr->opened = TRUE; + dev_ptr->fcp_lun_queue_depth = 1; + dev_ptr->fcp_cur_queue_depth = 1; + dev_ptr->queue_state = ACTIVE_PASSTHRU; + dev_ptr->pend_head = (T_SCSIBUF *)map_node_ptr; + dev_ptr->pend_tail = (T_SCSIBUF *)map_dev_ptr; + + fcptr = (fc_buf_t *)fcpmp->dfc.virt; + fcptr->dev_ptr = dev_ptr; + fcptr->phys_adr = (char *)fcpmp->dfc.phys; + fcptr->sc_bufp = (T_SCSIBUF *)omatp; + fcptr->flags = 0; + /* set up an iotag so we can match the completion iocb */ + for (i = 0; i < MAX_FCP_CMDS; i++) { + fcptr->iotag = rp->fc_iotag++; + if (rp->fc_iotag >= MAX_FCP_CMDS) + rp->fc_iotag = 1; + if (binfo->fc_table->fcp_array[fcptr->iotag] == 0) + break; + } + if (i >= MAX_FCP_CMDS) { + /* No more command slots available, retry later */ + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + return(EACCES); + } + + fc_bzero((void *)temp, sizeof(IOCBQ)); + cmd = &temp->iocb; + + bpl = (ULP_BDE64 * )bmp->virt; + + cmd->un.fcpi64.bdl.ulpIoTag32 = (uint32)0; + cmd->un.fcpi64.bdl.addrHigh = (uint32)putPaddrHigh(bmp->phys); + cmd->un.fcpi64.bdl.addrLow = (uint32)putPaddrLow(bmp->phys); + cmd->un.fcpi64.bdl.bdeFlags = BUFF_TYPE_BDL; + cmd->ulpBdeCount = 1; + fcptr->bmp = bmp; + temp->bpl = (uchar *)0; + + cmd->ulpContext = ndlp->nlp_Rpi; + cmd->ulpIoTag = fcptr->iotag; + /* + * if device is FCP-2 device, set the following bit that says + * to run the FC-TAPE protocol. + */ + if (ndlp->id.nlp_fcp_info & NLP_FCP_2_DEVICE) { + cmd->ulpFCP2Rcvy = 1; + } + cmd->ulpClass = (ndlp->id.nlp_fcp_info & 0x0f); + cmd->ulpOwner = OWN_CHIP; + + /* Hardcode 30 second timeout for I/O to complete */ + curtime(&fcptr->timeout); + cmd->ulpRsvdByte = fc_inq_sn_tmo; + fcptr->timeout = ((ulong)fcptr->timeout + (31 * fc_ticks_per_second)); + + switch(fcptr->fcp_cmd.fcpCntl3) { + case READ_DATA: + /* Set up for SCSI read */ + cmd->ulpCommand = CMD_FCP_IREAD64_CR; + cmd->ulpPU = PARM_READ_CHECK; + cmd->un.fcpi.fcpi_parm = count; + cmd->un.fcpi64.bdl.bdeSize = ((omatp->dfc_flag+2) * sizeof(ULP_BDE64)); + cmd->ulpBdeCount = 1; + break; + + case WRITE_DATA: + /* Set up for SCSI write */ + cmd->ulpCommand = CMD_FCP_IWRITE64_CR; + cmd->un.fcpi64.bdl.bdeSize = ((omatp->dfc_flag+2) * sizeof(ULP_BDE64)); + cmd->ulpBdeCount = 1; + break; + default: + /* Set up for SCSI command */ + cmd->ulpCommand = CMD_FCP_ICMND64_CR; + cmd->un.fcpi64.bdl.bdeSize = (2 * sizeof(ULP_BDE64)); + cmd->ulpBdeCount = 1; + break; + } + + cmd->ulpLe = 1; + /* Queue cmd chain to last iocb entry in xmit queue */ + if (rp->fc_tx.q_first == NULL) { + rp->fc_tx.q_first = (uchar * )temp; + } else { + ((IOCBQ * )(rp->fc_tx.q_last))->q = (uchar * )temp; + } + rp->fc_tx.q_last = (uchar * )temp; + rp->fc_tx.q_cnt++; + + fc_enq_fcbuf_active(rp, fcptr); + + if(map_dev_ptr) + map_dev_ptr->active_io_count++; + if(map_node_ptr) + map_node_ptr->num_active_io++; + dev_ptr->active_io_count++; + FCSTATCTR.fcpCmd++; + + issue_iocb_cmd(binfo, rp, 0); + return(0); +} + + +/****************************************************************************** +* Function name : fc_parse_binding_entry +* +* Description : Parse binding entry for WWNN & WWPN +* +* ASCII Input string example: 2000123456789abc:lpfc1t0 +* +* Return : 0 = Success +* Greater than 0 = Binding entry syntax error. SEE defs +* FC_SYNTAX_ERR_XXXXXX. +******************************************************************************/ +_static_ int +fc_parse_binding_entry( fc_dev_ctl_t *p_dev_ctl, + uchar *inbuf, uchar *outbuf, + int in_size, int out_size, + int bind_type, + unsigned int *sum, int entry, int *lpfc_num) +{ + int brd; + int c1, cvert_cnt, sumtmp; + + FC_BRD_INFO * binfo = &BINFO; + + char ds_lpfc[] = "lpfc"; + + *lpfc_num = -1; + + /* Parse 16 digit ASC hex address */ + if( bind_type == FC_BIND_DID) outbuf++; + cvert_cnt = fc_asc_seq_to_hex( p_dev_ctl, in_size, out_size, (char *)inbuf, (char *)outbuf); + if(cvert_cnt < 0) + return(FC_SYNTAX_ERR_ASC_CONVERT); + inbuf += (ulong)cvert_cnt; + + /* Parse colon */ + if(*inbuf++ != ':') + return(FC_SYNTAX_ERR_EXP_COLON); + + /* Parse lpfc */ + if(fc_strncmp( (char *)inbuf, ds_lpfc, (sizeof(ds_lpfc)-1))) + return(FC_SYNTAX_ERR_EXP_LPFC); + inbuf += sizeof(ds_lpfc)-1; + + /* Parse lpfc number */ + /* Get 1st lpfc digit */ + c1 = *inbuf++; + if(fc_is_digit(c1) == 0) + goto err_lpfc_num; + sumtmp = c1 - 0x30; + + /* Get 2nd lpfc digit */ + c1 = *inbuf; + if(fc_is_digit(c1) == 0) + goto convert_instance; + inbuf++; + sumtmp = (sumtmp * 10) + c1 - 0x30; + if((sumtmp < 0) || (sumtmp > 15)) + goto err_lpfc_num; + goto convert_instance; + +err_lpfc_num: + + return(FC_SYNTAX_ERR_INV_LPFC_NUM); + + /* Convert from ddi instance number to adapter number */ +convert_instance: + + for(brd = 0; brd < MAX_FC_BRDS; brd++) { + if(fcinstance[brd] == sumtmp) + break; + } + if(binfo->fc_brd_no != brd) { + /* Skip this entry */ + return(FC_SYNTAX_OK_BUT_NOT_THIS_BRD); + } + + + /* Parse 't' */ + if(*inbuf++ != 't') + return(FC_SYNTAX_ERR_EXP_T); + + /* Parse target number */ + /* Get 1st target digit */ + c1 = *inbuf++; + if(fc_is_digit(c1) == 0) + goto err_target_num; + sumtmp = c1 - 0x30; + + /* Get 2nd target digit */ + c1 = *inbuf; + if(fc_is_digit(c1) == 0) + goto check_for_term; + inbuf++; + sumtmp = (sumtmp * 10) + c1 - 0x30; + + /* Get 3nd target digit */ + c1 = *inbuf; + if(fc_is_digit(c1) == 0) + goto check_for_term; + inbuf++; + sumtmp = (sumtmp * 10) + c1 - 0x30; + if((sumtmp < 0) || (sumtmp > 999)) + goto err_target_num; + goto check_for_term; + +err_target_num: + return(FC_SYNTAX_ERR_INV_TARGET_NUM); + + /* Test that input string in NULL terminated - End of input */ +check_for_term: + + if(*inbuf != 0) + return(FC_SYNTAX_ERR_EXP_NULL_TERM); + + + *sum = sumtmp; + return(FC_SYNTAX_OK); /* Success */ +} /* fc_parse_binding_entry */ + +void +issue_report_lun( +fc_dev_ctl_t *pd, +void *l1, +void *l2) +{ + FC_BRD_INFO * binfo = &pd->info; + dvi_t * di = (dvi_t *)l1; + RING * rp; + fc_buf_t * fcptr; + IOCBQ * temp; + IOCB * cmd; + ULP_BDE64 * bpl; + MATCHMAP * bmp; + MBUF_INFO * mbufp; + node_t * nodep; + int i, tmo; + + rp = &binfo->fc_ring[FC_FCP_RING]; + nodep = di->nodep; + + mbufp = (MBUF_INFO * )fc_mem_get(binfo, MEM_IOCB); + if (mbufp == NULL) { + nodep->rptlunstate = REPORT_LUN_COMPLETE; + return; + } + mbufp->virt = 0; + mbufp->phys = 0; + mbufp->flags = FC_MBUF_DMA; + mbufp->align = (int)4096; + mbufp->size = 4096; + + if (nodep->virtRptLunData == 0) { + fc_malloc(pd, mbufp); + if (mbufp->phys == NULL) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )mbufp); + nodep->rptlunstate = REPORT_LUN_COMPLETE; + return; + } + } else { + mbufp->phys = nodep->physRptLunData; + mbufp->virt = nodep->virtRptLunData; + } + + if ((fcptr = fc_deq_fcbuf(di)) == NULL) { + if (nodep->virtRptLunData == 0) + fc_free(pd, mbufp); + fc_mem_put(binfo, MEM_IOCB, (uchar * )mbufp); + nodep->rptlunstate = REPORT_LUN_COMPLETE; + return; + } + + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB)) == NULL) { + if (nodep->virtRptLunData == 0) + fc_free(pd, mbufp); + fc_mem_put(binfo, MEM_IOCB, (uchar * )mbufp); + fc_enq_fcbuf(fcptr); + nodep->rptlunstate = REPORT_LUN_COMPLETE; + return; + } + + fc_bzero((void *)fcptr, sizeof(FCP_CMND) + sizeof(FCP_RSP)); + + /* + * Save the MBUF pointer. + * Buffer will be freed by handle_fcp_event(). + */ + fcptr->sc_bufp = (void *)mbufp; + + /* + * Setup SCSI command block in FCP payload + */ + fcptr->fcp_cmd.fcpCdb[0]= 0xA0; /* SCSI Report Lun Command */ + + fcptr->fcp_cmd.fcpCdb[8]= 0x10; + fcptr->fcp_cmd.fcpCntl3 = READ_DATA; + fcptr->fcp_cmd.fcpDl = SWAP_DATA(RPTLUN_MIN_LEN); + + /* + * set up an iotag so we can match the completion iocb + */ + for (i = 0; i < MAX_FCP_CMDS; i++) { + fcptr->iotag = rp->fc_iotag++; + if (rp->fc_iotag >= MAX_FCP_CMDS) + rp->fc_iotag = 1; + if (binfo->fc_table->fcp_array[fcptr->iotag] == 0) + break; + } + if (i >= MAX_FCP_CMDS) { + /* + * No more command slots available + */ + if (nodep->virtRptLunData == 0) + fc_free(pd, mbufp); + fc_mem_put(binfo, MEM_IOCB, (uchar * )mbufp); + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + fc_enq_fcbuf(fcptr); + nodep->rptlunstate = REPORT_LUN_COMPLETE; + return; + } + + fc_bzero((void *)temp, sizeof(IOCBQ)); + cmd = &temp->iocb; + temp->q = NULL; + + /* + * Allocate buffer for Buffer ptr list + */ + if ((bmp = (MATCHMAP * )fc_mem_get(binfo, MEM_BPL)) == 0) { + if (nodep->virtRptLunData == 0) + fc_free(pd, mbufp); + fc_mem_put(binfo, MEM_IOCB, (uchar * )mbufp); + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + fc_enq_fcbuf(fcptr); + nodep->rptlunstate = REPORT_LUN_COMPLETE; + return; + } + + bpl = (ULP_BDE64 * )bmp->virt; + bpl->addrHigh = PCIMEM_LONG((uint32)putPaddrHigh(GET_PAYLOAD_PHYS_ADDR(fcptr))); + bpl->addrLow = PCIMEM_LONG((uint32)putPaddrLow(GET_PAYLOAD_PHYS_ADDR(fcptr))); + bpl->tus.f.bdeSize = sizeof(FCP_CMND); + bpl->tus.f.bdeFlags = BUFF_USE_CMND; + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + bpl++; + bpl->addrHigh = PCIMEM_LONG((uint32)putPaddrHigh(GET_PAYLOAD_PHYS_ADDR(fcptr)+sizeof(FCP_CMND))); + bpl->addrLow = PCIMEM_LONG((uint32)putPaddrLow(GET_PAYLOAD_PHYS_ADDR(fcptr)+sizeof(FCP_CMND))); + bpl->tus.f.bdeSize = sizeof(FCP_RSP); + bpl->tus.f.bdeFlags = (BUFF_USE_CMND | BUFF_USE_RCV); + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + bpl++; + + cmd->un.fcpi64.bdl.ulpIoTag32 = (uint32)0; + cmd->un.fcpi64.bdl.addrHigh = (uint32)putPaddrHigh(bmp->phys); + cmd->un.fcpi64.bdl.addrLow = (uint32)putPaddrLow(bmp->phys); + cmd->un.fcpi64.bdl.bdeSize = (2 * sizeof(ULP_BDE64)); + cmd->un.fcpi64.bdl.bdeFlags = BUFF_TYPE_BDL; + cmd->ulpBdeCount = 1; + fcptr->bmp = bmp; + temp->bpl = (uchar *)0; + + cmd->ulpContext = nodep->rpi; + cmd->ulpIoTag = fcptr->iotag; + + /* + * if device is FCP-2 device, set the following bit that says + * to run the FC-TAPE protocol. + */ + if (nodep->nlp->id.nlp_fcp_info & NLP_FCP_2_DEVICE) { + cmd->ulpFCP2Rcvy = 1; + } + cmd->ulpClass = (nodep->nlp->id.nlp_fcp_info & 0x0f); + cmd->ulpOwner = OWN_CHIP; + + /* + * Hardcode 2*RATOV second timeout for I/O to complete + */ + tmo = (2 * binfo->fc_ratov); + curtime(&fcptr->timeout); + cmd->ulpRsvdByte = tmo; + tmo++; /* Make scsi timeout longer then cmd tmo */ + fcptr->timeout = ((ulong)fcptr->timeout + (tmo * fc_ticks_per_second)); + + /* + * Read Data + */ + cmd->ulpCommand = CMD_FCP_IREAD64_CR; + cmd->ulpPU = PARM_READ_CHECK; + cmd->un.fcpi.fcpi_parm = RPTLUN_MIN_LEN; + + bpl->addrHigh = PCIMEM_LONG((uint32)putPaddrHigh(mbufp->phys)); + bpl->addrLow = PCIMEM_LONG((uint32)putPaddrLow(mbufp->phys)); + bpl->tus.f.bdeSize = RPTLUN_MIN_LEN; + bpl->tus.f.bdeFlags = BUFF_USE_RCV; + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + bpl++; + + cmd->un.fcpi64.bdl.bdeSize += sizeof(ULP_BDE64); + cmd->ulpBdeCount = 1; + + cmd->ulpLe = 1; + + /* + * Queue cmd chain to last iocb entry in xmit queue + */ + if (rp->fc_tx.q_first == NULL) { + rp->fc_tx.q_first = (uchar * )temp; + } else { + ((IOCBQ * )(rp->fc_tx.q_last))->q = (uchar * )temp; + } + rp->fc_tx.q_last = (uchar * )temp; + rp->fc_tx.q_cnt++; + + fc_enq_fcbuf_active(rp, fcptr); + fcptr->flags |= FCBUF_INTERNAL; + + di->active_io_count++; + nodep->num_active_io++; + FCSTATCTR.fcpCmd++; + + issue_iocb_cmd(binfo, rp, 0); + return; +} +/****************************************/ +/* Print Format Declarations Start Here */ +/****************************************/ +_local_ int fc_sprintf_fargs( uchar *string, void *control, char *fixArgs); + +#define LENGTH_LINE 71 +#define MAX_IO_SIZE 32 * 2 /* iobuf cache size */ +#define MAX_TBUFF 18 * 2 /* temp buffer size */ + +typedef union { /* Pointer to table of arguments. */ + ulong *ip; + ulong *lip; + ulong *uip; + ulong *luip; + ulong **luipp; + uchar *cp; + uchar **csp; +} ARGLIST; + +typedef struct { + uchar *string; + long index; + int count; + uchar buf[MAX_IO_SIZE + MAX_TBUFF]; /* extra room to convert numbers */ +} PRINTBLK; + +/* + * ASCII string declarations + */ +static char dig[] = {"0123456789ABCDEF"}; +static char ds_disabled[] = "disabled"; +static char ds_enabled[] = "enabled"; +static char ds_none[] = "none"; +static char ds_null_string[] = ""; +static char ds_unknown[] = "unknown"; + +/* + * Function Declarations + */ +_local_ int add_char( PRINTBLK * io, uchar ch); +_local_ int add_string( PRINTBLK * io, uchar * string); +_local_ int fmtout( uchar *ostr, uchar *control, va_list inarg); +_local_ void print_string( PRINTBLK * io); +_local_ int long_itos( long val, uchar * cp, long base); + + +/**********************************************************/ +/** expanded_len */ +/** determine the length of the string after expanding */ +/**********************************************************/ +_local_ +int expanded_len( +uchar *sp) +{ + register int i; + uchar c; + + i = 0; + while ((c = *sp++) != 0) { + if (c < 0x1b) { + if ((c == '\r') || (c == '\n')) + break; /* stop at cr or lf */ + i++; /* double it */ + } + i++; + } + return (i); +} /* expanded_len */ + +/*************************************************/ +/** long_itos **/ +/** Convert long integer to decimal string. **/ +/** Returns the string length. **/ +/*************************************************/ +_local_ +int long_itos( +long val, /* Number to convert. */ +uchar * cp, /* Store the string here. */ +long base) /* Conversion base. */ +{ + uchar tempc[16]; + uchar *tcp; + int n=0; /* number of characters in result */ + ulong uval; /* unsigned value */ + + *(tcp=(tempc+15))=0; + if (base<0) { + /* needs signed conversion */ + base= -base; + if (val<0) { + n=1; + val = -val; + } + do { + *(--tcp)=dig[ (int)(val%base)]; + val /= base; + } while (val); + } + else { + uval=val; + do { + *(--tcp)=dig[ (int)(uval%base)]; + uval/=base; + } while(uval); + } + if (n) + *(--tcp)='-'; + n=(int)((long)&tempc[15] - (long)tcp); + fc_bcopy( tcp, cp, n+1); /* from, to, cnt */ + return(n); +} /* long_itos */ + +/****************************************/ +/** add_char **/ +/****************************************/ +_local_ +int add_char( +PRINTBLK * io, +uchar ch) +{ + int index; + + if (ch < 0x1b) { + switch (ch) { + case 0xd: /* carriage return */ + io->count = -1; /* will be incremented to 0, below */ + break; + case 0x8: /* back space */ + io->count -= 2; /* will be incremented to 1 less, below */ + break; + case 0xa: /* line feed */ + case 0x7: /* bell */ + case 0x9: /* hortizontal tab */ + case 0xe: /* shift out */ + case 0xf: /* shift in */ + io->count--; /* will be incremented to same, below */ + break; + default: + add_char(io, '^'); + ch |= 0x40; + break; + } + } + io->count++; + if (io->string != NULL) { + *io->string = ch; + *++io->string = '\0'; + return (0); + } + + index = io->index; + if( index < (MAX_IO_SIZE + MAX_TBUFF -2)) { + io->buf[index] = ch; + io->buf[++index] = '\0'; + } + return (++io->index); +} /* add_char */ + +/****************************************/ +/** add_string **/ +/****************************************/ +_local_ +int add_string( +PRINTBLK * io, +uchar * string) +{ + if (io->string != NULL) { + io->string = + (uchar *)fc_strcpy( (char *)io->string, (char *)string); /* dst, src */ + return (0); + } + return (io->index = ((long)(fc_strcpy( (char *)&io->buf[io->index], + (char *)string))) - ((long)((char *)io->buf))); /* dst, src */ +} /* add_string */ + +/*****************************************************/ +/** print_string **/ +/** takes print defn, prints data, zeroes index **/ +/*****************************************************/ +_local_ +void print_string( +PRINTBLK * io) +{ + io->index = 0; + fc_print( (char *)&io->buf[0],0,0); +} /* print_string */ + +/*VARARGS*/ +/*****************************************/ +/** fmtout **/ +/** Low-level string print routines. **/ +/*****************************************/ +_local_ +int fmtout ( +uchar *ostr, /* Output buffer, or NULL if temp */ +uchar *control, /* Control string */ +va_list inarg) /* Argument list */ +{ + short temp; /* Output channel number if string NULL. */ + int leftadj; /* Negative pararameter width specified. */ + int longflag; /* Integer is long. */ + int box = FALSE; /* not from body */ + int chr; /* control string character */ + uchar padchar; /* Pad character, typically space. */ + int width; /* Width of subfield. */ + int length; /* Length of subfield. */ + uchar *altctl; /* temp control string */ + ARGLIST altarg; + ARGLIST arg; + PRINTBLK io; + + union { /* Accumulate parameter value here. */ + uint16 tlong; + uint16 tulong; + long ltlong; + ulong ltulong; + uchar str[4]; + uint16 twds[2]; + } lw; + + union { /* Used by case %c */ + int intchar; + uchar chr[2]; + } ichar; + + arg.uip = (ulong *)inarg; + io.index = 0; + io.count = 0; + + if( (io.string = ostr) != (uchar *)NULL) + *ostr = 0; /* initialize output string to null */ + control--; + + mainloop: + altctl = NULL; + + while ((length = *++control) != 0) + { /* while more in control string */ + if (length !='%') { /* format control */ + if ((length == '\n') && box) { + fc_print( (char *)&io.buf[0],0,0); + continue; + } + if (add_char( &io, (uchar) length) >= MAX_IO_SIZE) + print_string(&io); /* write it */ + continue; + } + leftadj = (*++control == '-'); + if (leftadj) + ++control; + padchar = ' '; + width = 0; + if ((uint16)(length = (*control - '0')) <= 9) { + if (length == 0) + padchar = '0'; + width = length; + while ((uint16)(length = (*++control - '0')) <= 9 ) + width = width*10+length; + } + longflag = ( *control == 'l'); + if ( longflag) + ++control; + + chr = (int)(*control); + if( chr != 'E') { + chr |= 0x20; + } + + switch (chr) { + case 'a': + longflag = 1; + temp=16; + padchar = '0'; + length = width = 8; + goto nosign; + case 'b': + temp=2; + goto nosign; + case 'o': + temp=8; + goto nosign; + case 'u': + temp=10; + goto nosign; + case 'x': + temp=16; + goto nosign; + + case 'e': + ostr = (uchar *)va_arg(inarg, char *); + if ((chr == 'e') && + ((*(long *)ostr) == (long)NULL) && + ((*(uint16 *)&ostr[4]) == (uint16)0)) { + ostr = (uchar *)ds_unknown; + length = 7; + break; + } + temp = -1; + length = MAX_IO_SIZE -1; + fc_strcpy((char *)&io.buf[MAX_IO_SIZE], + "00-00-00-00-00-00"); /* dst, src */ + do { + long_itos((long)( ostr[++temp] + 256), lw.str, 16); + io.buf[++length] = lw.str[1]; + io.buf[++length] = lw.str[2]; + } while (++length < MAX_IO_SIZE+17); + ostr = &io.buf[MAX_IO_SIZE]; + length = 17; + break; + + case 'E': + ostr = (uchar *)va_arg(inarg, char *); + if ((chr == 'E') && + ((*(long *)ostr) == (long)NULL) && + ((*(long *)&ostr[4]) == (long)NULL)) { + ostr = (uchar *)ds_unknown; + length = 7; + break; + } + temp = -1; + length = MAX_IO_SIZE -1; + fc_strcpy( (char *)&io.buf[MAX_IO_SIZE], + "00-00-00-00-00-00-00-00"); /* dst, src */ + do { + long_itos((long)( ostr[++temp] + 256), lw.str, 16); + io.buf[++length] = lw.str[1]; + io.buf[++length] = lw.str[2]; + } while (++length < MAX_IO_SIZE+23); + ostr = &io.buf[MAX_IO_SIZE]; + length = 23; + break; + + case 'f': /* flags */ + ostr = (uchar *)ds_disabled; + length = 8; + if (va_arg(inarg, char *) != 0) { /* test value */ + ostr = (uchar *)ds_enabled; + length = 7; + } + if (chr == 'F') { + length -= 7; + ostr = (uchar *)"-"; + } + break; + + case 'i': + ostr = (uchar *)va_arg(inarg, char *); + if ((chr == 'i') && *(long *)ostr == (long)NULL) + goto putnone; + temp = 0; + length = MAX_IO_SIZE; + do { + length += long_itos((long) ostr[temp], &io.buf[length], 10); + if ( ++temp >= 4) + break; + io.buf[length] = '.'; + length++; + } while (TRUE); + ostr = &io.buf[MAX_IO_SIZE]; + length -= MAX_IO_SIZE; + break; + + case 'y': /* flags */ + if ( va_arg(inarg, char *) != 0) { /* test value */ + ostr = (uchar*)"yes"; + length = 3; + } + else { + ostr = (uchar*)"no"; + length = 2; + } + break; + + case 'c': + if (chr == 'C') { /* normal, control, or none */ + if ((length = va_arg(inarg, int)) < ' ') { + if (length == 0) { + ostr = (uchar *)ds_none; + length = 4; + } + else { + io.buf[MAX_IO_SIZE] = '^'; + io.buf[MAX_IO_SIZE+1] = ((uchar)length) + '@'; + io.buf[MAX_IO_SIZE+2] = 0; + ostr = &io.buf[MAX_IO_SIZE]; + length = 2; + } + arg.ip++; + break; + } + } /* normal, control, or none */ + + ichar.intchar = va_arg(inarg, int); + ostr = &ichar.chr[0]; + length=1; + break; + + case 'd': + temp = -10; + nosign: + if (longflag) + lw.ltulong = va_arg(inarg, ulong); + else if (temp < 0) + lw.ltlong = va_arg(inarg, long); + else + lw.ltulong = va_arg(inarg, ulong); +/* + nosign2: +*/ + length = long_itos( lw.ltlong, ostr = &io.buf[MAX_IO_SIZE], temp); + break; + + case 's': + ostr = (uchar *)va_arg(inarg, char *); /* string */ + if ((chr == 's') || (*ostr != '\0')) { + length = expanded_len(ostr); + break; + } + putnone: + ostr = (uchar *)ds_none; + length = 4; + break; + + case 't': /* tabbing */ + if ((width -= io.count) < 0) /* Spaces required to get to column. */ + width = 0; + length = 0; /* nothing other than width padding. */ + ostr = (uchar *)ds_null_string; + break; + case ' ': + width = va_arg(inarg, int); + length = 0; /* nothing other than width padding. */ + ostr = (uchar *)ds_null_string; + break; + + default: + ostr=control; + length=1; + break; + } /* switch on control */ + + if (length < 0) { /* non printing */ + if (add_string( &io, ostr) >= MAX_IO_SIZE) + print_string(&io); /* no more room, dump current buffer */ + continue; + } /* non printing */ + + + if (!leftadj && width > length) { + while (--width >= length) { + if (add_char( &io, padchar) >= MAX_IO_SIZE) + print_string(&io); /* write it */ + } + } + + if (width>length) + width -= length; + else + width = 0; + + if (length <= 1) { + if (length == 1) { + if (add_char( &io, *ostr) >= MAX_IO_SIZE) + print_string(&io); /* write it */ + } + } + else { + while ((temp = *ostr++) != 0) { + if (add_char( &io, (uchar) temp) >= MAX_IO_SIZE) + print_string(&io); /* write it */ + } + } + + while (--width >= 0) { + if (add_char( &io, padchar) >= MAX_IO_SIZE) + print_string(&io); /* write it */ + } + + } /* while more in control string */ + + if (altctl != NULL) { + control = altctl; + arg.ip = altarg.ip; + goto mainloop; + } + + if (io.index) /* anything left? */ + print_string(&io); /* write it */ + + return(io.count); +} /* fmtout */ +/*FIXARGS*/ +_local_ int +fc_sprintf_fargs( +uchar *string, /* output buffer */ +void *control, /* format string */ +char *fixArgs) /* control arguments */ +{ + return( fmtout((uchar *)string, (uchar *)control, fixArgs)); +} /* fc_sprintf_fargs */ +/*VARARGS*/ +int fc_sprintf_vargs( + void *string, /* output buffer */ + void *control, /* format string */ + ...) /* control arguments */ +{ + int iocnt; + va_list args; + va_start(args, control); + + iocnt = fmtout((uchar *)string, (uchar *)control, args); + va_end( args); + return( iocnt); +} /* fc_sprintf_vargs */ +/****************************************/ +/** fc_log_printf_msg_vargs **/ +/****************************************/ +/* +All log messages come through this routine. +All log messages are unique. +All log messages are define by a msgLogDef messages structure. +*/ +/*VARARGS*/ +_static_ int +fc_log_printf_msg_vargs( + int brdno, + msgLogDef * msg, /* Pionter to LOG msg structure */ + void * control, + ...) +{ + uchar str2[MAX_IO_SIZE + MAX_TBUFF]; /* extra room to convert numbers */ + int iocnt; + int log_only; + va_list args; + va_start(args, control); + + log_only = 0; + if( fc_check_this_log_msg_disabled( brdno, msg, &log_only)) + return(0); /* This LOG message disabled */ + + /* + If LOG message is disabled via any SW method, we SHOULD NOT get this far! + We should have taken the above return. + */ + + str2[0] = '\0'; + iocnt = fc_sprintf_fargs(str2, control, args); + va_end( args); + + return( log_printf_msgblk( brdno, msg, (char *)str2, log_only)); +} /* fc_log_printf_msg_vargs */ + +/*****************************************************/ +/** Function name : fc_check_this_log_msg_disabled **/ +/** **/ +/** Description : **/ +/** **/ +/** Return : 0 LOG message enabled **/ +/** : 1 LOG message disabled **/ +/*****************************************************/ +int fc_check_this_log_msg_disabled( int brdno, + msgLogDef *msg, + int *log_only) +{ + fc_dev_ctl_t * p_dev_ctl; + iCfgParam * clp; + int verbose; + + verbose = 0; + if( msg->msgOutput == FC_MSG_OPUT_DISA) + return(1); /* This LOG message disabled */ + + if ((p_dev_ctl = DD_CTL.p_dev[brdno])) { + clp = DD_CTL.p_config[brdno]; + if((*log_only = clp[CFG_LOG_ONLY].a_current) > 1) + return(1); /* This LOG message disabled */ + verbose = clp[CFG_LOG_VERBOSE].a_current; + } + + if( msg->msgOutput == FC_MSG_OPUT_FORCE) + return(0); /* This LOG message enabled */ + /* + * If this is a verbose message (INFO or WARN) and we are not in + * verbose mode, return 1. If it is a verbose message and the verbose + * error doesn't match our verbose mask, return 1. + */ + if( (msg->msgType == FC_LOG_MSG_TYPE_INFO) || + (msg->msgType == FC_LOG_MSG_TYPE_WARN)) { + /* LOG msg is INFO or WARN */ + if ((msg->msgMask & verbose) == 0) + return(1); /* This LOG mesaage disabled */ + } + return(0); /* This LOG message enabled */ +} /* fc_check_this_log_msg_disabled */ + +/*************************************************/ +/** fc_asc_to_hex **/ +/** Convert an ASCII hex character to hex. **/ +/** Return Hex value if success **/ +/** -1 if character not ASCII hex **/ +/*************************************************/ + +_forward_ int +fc_asc_to_hex( + uchar c) /* Character to convert */ +{ +if (c >= '0' && c <= '9') + return(c - '0'); +else if (c >= 'A' && c <= 'F') + return(c - 'A'+ 10); +else if (c >= 'a' && c <= 'f') + return(c - 'a'+ 10); +else + return(-1); +} /* fc_asc_to_hex */ + +/***************************************************/ +/** fc_asc_seq_to_hex **/ +/** **/ +/** Convert an ASCII character sequence to a **/ +/** hex number sequence **/ +/** **/ +/** return >0 Success. Return number of ASCII **/ +/** hex characters converted. **/ +/** -1 Input byte count < 1 **/ +/** -2 Input byte count > max **/ +/** -3 Output buffer to small **/ +/** -4 Input character sequence not **/ +/** ASCII hex. **/ +/***************************************************/ + +/* +This routine converts an ASCII char stream of byte into +a stream of hex bytes. The byte order of the input and +output stream are identical. The caller must deal with +SWAPPING bytes if required. + +The maximum number of ASCII hex characters that can be +convert to hex is hard coded by the LOCAL define +MAX_ASC_HEX_CHARS_INPUT. + +Two ASCII hex input characters require 1 byte of output +buffer. + +A NULL terminator at the end of an ASCII hex input string +is not required nor is it counted in the strings byte size. + +To determine the byte size of the output buffer: +(1) Add 1 to input buffer byte size if size is odd. +(2) Output buffer size = input buffer size / 2. + +Therefore an input buffer containing 10 ASC hex chars +requires an output buffer size of 5 bytes. + +An input buffer containing 11 ASC hex chars requires an +output buffer size of 6 bytes. +*/ + +_forward_ int +fc_asc_seq_to_hex( fc_dev_ctl_t *p_dev_ctl, + int input_bc, /* Number of bytes (ASC hex chars) to be converted */ + int output_bc, /* Number of bytes in hex output buffer (modulo INT) */ + char *inp, /* Pointer to ASC hex input character sequence */ + char *outp) /* Pointer to hex output buffer */ +{ +#define HEX_DIGITS_PER_BYTE 2 +#define MAX_ASC_HEX_CHARS_INPUT 32 /* Limit damage if over-write */ +#define MAX_BUF_SIZE_HEX_OUTPUT (MAX_ASC_HEX_CHARS_INPUT / HEX_DIGITS_PER_BYTE) + + FC_BRD_INFO *binfo; + int lowNib, hiNib; + int inputCharsConverted; + uchar twoHexDig; + + binfo = &BINFO; + inputCharsConverted = 0; + lowNib = -1; + hiNib = -1; + + if(input_bc < 1) { + /* Convert ASC to hex. Input byte cnt < 1. */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1210, /* ptr to msg structure */ + fc_mes1210, /* ptr to msg */ + fc_msgBlk1210.msgPreambleStr); /* begin & end varargs */ + return(-1); + } + if(input_bc > MAX_ASC_HEX_CHARS_INPUT) { + /* Convert ASC to hex. Input byte cnt > max */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1211, /* ptr to msg structure */ + fc_mes1211, /* ptr to msg */ + fc_msgBlk1211.msgPreambleStr, /* begin varargs */ + MAX_ASC_HEX_CHARS_INPUT); /* end varargs */ + return(-2); + } + if((output_bc * 2) < input_bc) { + /* Convert ASC to hex. Output buffer to small. */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1212, /* ptr to msg structure */ + fc_mes1212, /* ptr to msg */ + fc_msgBlk1212.msgPreambleStr); /* begin & end varargs */ + return(-4); + } + + while( input_bc) { + twoHexDig = 0; + lowNib = -1; + hiNib = fc_asc_to_hex( *inp++); + if( --input_bc > 0) { + lowNib = fc_asc_to_hex( *inp++); + input_bc--; + } + if ((lowNib < 0) || (hiNib < 0)) { + /* Convert ASC to hex. Input char seq not ASC hex. */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1213, /* ptr to msg structure */ + fc_mes1213, /* ptr to msg */ + fc_msgBlk1213.msgPreambleStr); /* begin & end varargs */ + return( -4); + } + if( lowNib >= 0) { + /* There were 2 digits */ + hiNib <<= 4; + twoHexDig = (hiNib | lowNib); + inputCharsConverted += 2; + } + else { + /* There was a single digit */ + twoHexDig = lowNib; + inputCharsConverted++; + } + *outp++ = twoHexDig; + } /* while */ + return(inputCharsConverted); /* ASC to hex conversion complete. Return # of chars converted */ +} /* fc_asc_seq_to_hex */ + +/********************************************/ +/** fc_is_digit **/ +/** **/ +/** Check if ASCII input value is numeric. **/ +/** **/ +/** Return 0 = input NOT numeric **/ +/** 1 = input IS numeric **/ +/********************************************/ +_forward_ int +fc_is_digit(int chr) +{ + if( (chr >= '0') && (chr <= '9')) + return(1); + return(0); +} /* fc_is_digit */ + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fcstratb.c 999-mjb/drivers/scsi/lpfc/fcstratb.c --- 000-virgin/drivers/scsi/lpfc/fcstratb.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fcstratb.c 2003-11-25 14:18:44.000000000 -0800 @@ -0,0 +1,2080 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#include "fc_os.h" + +#include "fc_hw.h" +#include "fc.h" + +#include "fcdiag.h" +#include "fcfgparm.h" +#include "fcmsg.h" +#include "fc_crtn.h" +#include "fc_ertn.h" + +extern fc_dd_ctl_t DD_CTL; +extern iCfgParam icfgparam[]; + + + + +/* Some timers in data structures are stored in seconds, some environments + * timeout functions work in ticks, thus some conversion is required. + * Other externs, as needed for environemt are defined here. + */ +extern uint32 fc_scsi_abort_timeout_ticks; +extern uint32 fc_ticks_per_second; + + + + +/* Routine Declaration - Local */ +_local_ void fc_deq_abort_bdr(dvi_t *dev_ptr); +_local_ void fc_deq_wait(dvi_t *dev_ptr); +/* End Routine Declaration - Local */ + +/* AlpaArray for assignment of scsid for scan-down == 2 */ +_static_ uchar AlpaArray[] = + { + 0xEF, 0xE8, 0xE4, 0xE2, 0xE1, 0xE0, 0xDC, 0xDA, 0xD9, 0xD6, + 0xD5, 0xD4, 0xD3, 0xD2, 0xD1, 0xCE, 0xCD, 0xCC, 0xCB, 0xCA, + 0xC9, 0xC7, 0xC6, 0xC5, 0xC3, 0xBC, 0xBA, 0xB9, 0xB6, 0xB5, + 0xB4, 0xB3, 0xB2, 0xB1, 0xAE, 0xAD, 0xAC, 0xAB, 0xAA, 0xA9, + 0xA7, 0xA6, 0xA5, 0xA3, 0x9F, 0x9E, 0x9D, 0x9B, 0x98, 0x97, + 0x90, 0x8F, 0x88, 0x84, 0x82, 0x81, 0x80, 0x7C, 0x7A, 0x79, + 0x76, 0x75, 0x74, 0x73, 0x72, 0x71, 0x6E, 0x6D, 0x6C, 0x6B, + 0x6A, 0x69, 0x67, 0x66, 0x65, 0x63, 0x5C, 0x5A, 0x59, 0x56, + 0x55, 0x54, 0x53, 0x52, 0x51, 0x4E, 0x4D, 0x4C, 0x4B, 0x4A, + 0x49, 0x47, 0x46, 0x45, 0x43, 0x3C, 0x3A, 0x39, 0x36, 0x35, + 0x34, 0x33, 0x32, 0x31, 0x2E, 0x2D, 0x2C, 0x2B, 0x2A, 0x29, + 0x27, 0x26, 0x25, 0x23, 0x1F, 0x1E, 0x1D, 0x1B, 0x18, 0x17, + 0x10, 0x0F, 0x08, 0x04, 0x02, 0x01 + }; + + +_static_ dvi_t * +fc_fcp_abort( + fc_dev_ctl_t * p_dev_ctl, + int flag, + int target, + int lun) +{ + FC_BRD_INFO * binfo; + node_t * node_ptr; + dvi_t * dev_ptr; + dvi_t * xmt_devp, * devp; + RING * rp; + int i; + + binfo = &BINFO; + if(binfo->fc_flag & FC_ESTABLISH_LINK) + return(0); + + rp = &binfo->fc_ring[FC_FCP_RING]; + xmt_devp = 0; + /* Clear the queues for one or more SCSI devices + * flag will indicate perform a Target Reset, Lun Reset, or Abort Task Set + * if target = -1, all targets (bus reset). + * if lun = -1 all luns on the target. + */ + for (i = 0; i < MAX_FC_TARGETS; i++) { + if ((node_ptr = binfo->device_queue_hash[i].node_ptr) != NULL) { + if ((target != -1) && (node_ptr->scsi_id != target)) + continue; + dev_ptr = node_ptr->lunlist; + if((flag == TARGET_RESET) && + (dev_ptr != NULL)) { + if((node_ptr->rpi != 0xFFFE) && (binfo->fc_ffstate == FC_READY)) { + if(dev_ptr->flags & (SCSI_LUN_RESET | SCSI_ABORT_TSET)) { + /* check if we sent abort task set or reset lun */ + for (devp = p_dev_ctl->ABORT_BDR_head; (devp != NULL); + devp = devp->ABORT_BDR_fwd) { + if(devp == dev_ptr) + break; + } + if(devp) { + /* we found devp, its not sent yet, + * so change it to target reset. + */ + dev_ptr->flags &= ~CHK_SCSI_ABDR; + dev_ptr->flags |= SCSI_TARGET_RESET; + } + else { + /* just Q another task mgmt cmd, target reset */ + dev_ptr->flags |= SCSI_TARGET_RESET; + fc_enq_abort_bdr(dev_ptr); + } + xmt_devp = dev_ptr; + } + else if(!(dev_ptr->flags & SCSI_TARGET_RESET)) { + dev_ptr->flags |= SCSI_TARGET_RESET; + fc_enq_abort_bdr(dev_ptr); + fc_issue_cmd(p_dev_ctl); + xmt_devp = dev_ptr; + } + } + } + for (dev_ptr = node_ptr->lunlist; dev_ptr != NULL; + dev_ptr = dev_ptr->next) { + if ((lun != -1) && (dev_ptr->lun_id != lun)) + continue; + + if(flag == TARGET_RESET) { + if((node_ptr->rpi != 0xFFFE) && (binfo->fc_ffstate == FC_READY)) { + dev_ptr->flags |= SCSI_TARGET_RESET; + dev_ptr->queue_state = HALTED; + fc_fail_pendq(dev_ptr, (char) EIO, 0); + } + else { + /* First send ABTS on outstanding I/Os in txp queue */ + fc_abort_fcp_txpq(binfo, dev_ptr); + + fc_fail_pendq(dev_ptr, (char) EIO, 0); + fc_fail_cmd(dev_ptr, (char) EIO, 0); + } + } + + if((flag == LUN_RESET) && + !(dev_ptr->flags & CHK_SCSI_ABDR)) { + + if((node_ptr->rpi != 0xFFFE) && (binfo->fc_ffstate == FC_READY)) { + dev_ptr->flags |= SCSI_LUN_RESET; + fc_enq_abort_bdr(dev_ptr); + fc_issue_cmd(p_dev_ctl); + xmt_devp = dev_ptr; + dev_ptr->queue_state = HALTED; + fc_fail_pendq(dev_ptr, (char) EIO, 0); + } + else { + /* First send ABTS on outstanding I/Os in txp queue */ + fc_abort_fcp_txpq(binfo, dev_ptr); + + fc_fail_pendq(dev_ptr, (char) EIO, 0); + fc_fail_cmd(dev_ptr, (char) EIO, 0); + } + } + + if((flag == ABORT_TASK_SET) && + !(dev_ptr->flags & CHK_SCSI_ABDR)) { + + if((node_ptr->rpi != 0xFFFE) && (binfo->fc_ffstate == FC_READY)) { + dev_ptr->flags |= SCSI_ABORT_TSET; + fc_enq_abort_bdr(dev_ptr); + fc_issue_cmd(p_dev_ctl); + xmt_devp = dev_ptr; + dev_ptr->queue_state = HALTED; + fc_fail_pendq(dev_ptr, (char) EIO, 0); + } + else { + /* First send ABTS on outstanding I/Os in txp queue */ + fc_abort_fcp_txpq(binfo, dev_ptr); + + fc_fail_pendq(dev_ptr, (char) EIO, 0); + fc_fail_cmd(dev_ptr, (char) EIO, 0); + } + } + } + } + } + return(xmt_devp); +} + +_static_ int +issue_abdr( + fc_dev_ctl_t * ap, + dvi_t * dev_ptr, + RING * rp, + fc_lun_t lun) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + fc_buf_t * fcptr; + T_SCSIBUF * sbp; + IOCB * cmd; + IOCBQ * temp; + uint32 * lp; + MATCHMAP * bmp; + ULP_BDE64 * bpl; + int i; + + binfo = &ap->info; + if ((fcptr = fc_deq_fcbuf(dev_ptr)) == NULL) { + return(EIO); + } + + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB)) == NULL) { + fc_enq_fcbuf(fcptr); + return(EIO); + } + + { + uint32 did; + uint32 pan; + uint32 sid; + + if ((dev_ptr->nodep) && (dev_ptr->nodep->nlp)) { + did = dev_ptr->nodep->nlp->nlp_DID; + pan = dev_ptr->nodep->nlp->id.nlp_pan; + sid = dev_ptr->nodep->nlp->id.nlp_sid; + } else { + did = 0; + pan = 0; + sid = 0; + } + + if (dev_ptr->flags & SCSI_ABORT_TSET) { + /* Issue Abort Task Set I/O for LUN */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0701, /* ptr to msg structure */ + fc_mes0701, /* ptr to msg */ + fc_msgBlk0701.msgPreambleStr, /* begin varargs */ + (uint32)lun, + did, + FC_SCSID(pan, sid), + dev_ptr->flags); /* end varargs */ + } else if (dev_ptr->flags & SCSI_TARGET_RESET) { + /* Issue Target Reset I/O */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0702, /* ptr to msg structure */ + fc_mes0702, /* ptr to msg */ + fc_msgBlk0702.msgPreambleStr, /* begin varargs */ + (uint32)lun, + did, + FC_SCSID(pan, sid), + dev_ptr->flags); /* end varargs */ + } else if (dev_ptr->flags & SCSI_LUN_RESET) { + /* Issue LUN Reset I/O for LUN */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0703, /* ptr to msg structure */ + fc_mes0703, /* ptr to msg */ + fc_msgBlk0703.msgPreambleStr, /* begin varargs */ + (uint32)lun, + did, + FC_SCSID(pan, sid), + dev_ptr->flags); /* end varargs */ + } + } + + sbp = &dev_ptr->scbuf; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + fc_bzero((void *)fcptr, sizeof(FCP_CMND) + sizeof(FCP_RSP)); + + /* shift lun id into the right payload byte */ + fcptr->fcp_cmd.fcpLunMsl = lun << FC_LUN_SHIFT; + fcptr->fcp_cmd.fcpLunLsl = 0; + if (dev_ptr->nodep->addr_mode == VOLUME_SET_ADDRESSING) { + fcptr->fcp_cmd.fcpLunMsl |= SWAP_DATA(0x40000000); + } + + fcptr->sc_bufp = sbp; + fcptr->flags = 0; + sbp->bufstruct.b_flags = 0; + sbp->bufstruct.b_error = 0; + + if (dev_ptr->flags & SCSI_ABORT_TSET) { + /* Issue an Abort Task Set task management command */ + fcptr->fcp_cmd.fcpCntl2 = ABORT_TASK_SET; + } else if (dev_ptr->flags & SCSI_TARGET_RESET) { + /* Issue a Target Reset task management command */ + fcptr->fcp_cmd.fcpCntl2 = TARGET_RESET; + } else if (dev_ptr->flags & SCSI_LUN_RESET) { + /* Issue a Lun Reset task management command */ + fcptr->fcp_cmd.fcpCntl2 = LUN_RESET; + } + + /* set up an iotag so we can match the completion iocb */ + for (i = 0; i < MAX_FCP_CMDS; i++) { + fcptr->iotag = rp->fc_iotag++; + if (rp->fc_iotag >= MAX_FCP_CMDS) + rp->fc_iotag = 1; + if (binfo->fc_table->fcp_array[fcptr->iotag] == 0) + break; + } + + if (i >= MAX_FCP_CMDS) { + /* No more command slots available, retry later */ + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + fc_enq_fcbuf(fcptr); + return(EIO); + } + + fc_bzero((void *)temp, sizeof(IOCBQ)); /* zero the iocb entry */ + cmd = &temp->iocb; + + if (binfo->fc_flag & FC_SLI2) { + /* Allocate buffer for Buffer ptr list */ + if ((bmp = (MATCHMAP * )fc_mem_get(binfo, MEM_BPL)) == 0) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + fc_enq_fcbuf(fcptr); + return(EIO); + } + bpl = (ULP_BDE64 * )bmp->virt; + bpl->addrHigh = PCIMEM_LONG((uint32)putPaddrHigh(GET_PAYLOAD_PHYS_ADDR(fcptr))); + bpl->addrLow = PCIMEM_LONG((uint32)putPaddrLow(GET_PAYLOAD_PHYS_ADDR(fcptr))); + bpl->tus.f.bdeSize = sizeof(FCP_CMND); + bpl->tus.f.bdeFlags = BUFF_USE_CMND; + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + + bpl++; + bpl->addrHigh = PCIMEM_LONG((uint32)putPaddrHigh(GET_PAYLOAD_PHYS_ADDR(fcptr)+sizeof(FCP_CMND))); + bpl->addrLow = PCIMEM_LONG((uint32)putPaddrLow(GET_PAYLOAD_PHYS_ADDR(fcptr)+sizeof(FCP_CMND))); + bpl->tus.f.bdeSize = sizeof(FCP_RSP); + bpl->tus.f.bdeFlags = (BUFF_USE_CMND | BUFF_USE_RCV); + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + + bpl++; + cmd->un.fcpi64.bdl.ulpIoTag32 = (uint32)0; + cmd->un.fcpi64.bdl.addrHigh = (uint32)putPaddrHigh(bmp->phys); + cmd->un.fcpi64.bdl.addrLow = (uint32)putPaddrLow(bmp->phys); + cmd->un.fcpi64.bdl.bdeSize = (2 * sizeof(ULP_BDE64)); + cmd->un.fcpi64.bdl.bdeFlags = BUFF_TYPE_BDL; + + cmd->ulpCommand = CMD_FCP_ICMND64_CR; + cmd->ulpBdeCount = 1; + fcptr->bmp = bmp; + temp->bpl = (uchar *)0; + } else { + cmd->un.fcpi.fcpi_cmnd.bdeAddress = (uint32)putPaddrLow(GET_PAYLOAD_PHYS_ADDR(fcptr)); + cmd->un.fcpi.fcpi_cmnd.bdeSize = sizeof(FCP_CMND); + cmd->un.fcpi.fcpi_rsp.bdeAddress = (uint32)(putPaddrLow((GET_PAYLOAD_PHYS_ADDR(fcptr) + sizeof(FCP_CMND)))); + cmd->un.fcpi.fcpi_rsp.bdeSize = sizeof(FCP_RSP); + cmd->ulpCommand = CMD_FCP_ICMND_CR; + cmd->ulpBdeCount = 2; + temp->bpl = (uchar *)0; + } + cmd->ulpContext = dev_ptr->nodep->rpi; + cmd->ulpIoTag = fcptr->iotag; + cmd->ulpClass = (dev_ptr->nodep->nlp->id.nlp_fcp_info & 0x0f); + cmd->ulpOwner = OWN_CHIP; + cmd->ulpLe = 1; + + /* Timeout for this command is 30 seconds */ + curtime(&fcptr->timeout); + + + /* Need to set the FCP timeout in the fcptr structure and the IOCB + * for this I/O to get the adapter to run a timer. + */ + { + uint32 time_out; + + time_out = fc_scsi_abort_timeout_ticks; + if (binfo->fc_flag & FC_FABRIC) { + time_out += (fc_ticks_per_second * + (clp[CFG_FCPFABRIC_TMO].a_current + (2 * binfo->fc_ratov))); + } + + fcptr->timeout = ((ulong)fcptr->timeout + time_out + fc_scsi_abort_timeout_ticks); + + /* Set the FCP timeout in the IOCB to get the adapter to run a timer */ + if ((time_out / fc_ticks_per_second) < 256) + cmd->ulpTimeout = time_out / fc_ticks_per_second; + + } + + lp = (uint32 * ) & fcptr->fcp_cmd; + dev_ptr->active_io_count++; + dev_ptr->nodep->num_active_io++; + + /* Queue command to last iocb entry in xmit queue */ + if (rp->fc_tx.q_first == NULL) { + rp->fc_tx.q_first = (uchar * )temp; + } else { + ((IOCBQ * )(rp->fc_tx.q_last))->q = (uchar * )temp; + } + rp->fc_tx.q_last = (uchar * )temp; + rp->fc_tx.q_cnt++; + + fc_enq_fcbuf_active(rp, fcptr); + return (0); +} + + +/************************************************************************/ +/* */ +/* NAME: fc_issue_cmd */ +/* */ +/* FUNCTION: issues a waiting FCP command, or ABORT/BDR command */ +/* */ +/* EXECUTION ENVIRONMENT: */ +/* Called by a process or the interrupt handler */ +/* */ +/* INPUTS: */ +/* ap pointer to the adapter structure */ +/* */ +/* RETURN VALUE DESCRIPTION: none */ +/* */ +/* ERROR DESCRIPTION: none */ +/* */ +/* EXTERNAL PROCEDURES CALLED: */ +/* iodone */ +/************************************************************************/ +_static_ void +fc_issue_cmd( + fc_dev_ctl_t * ap) +{ + dvi_t * dev_ptr, * requeue_ptr; + T_SCSIBUF * sbp; + int rc, requeue, exit; + FC_BRD_INFO * binfo; + RING * rp; + node_t * nodep; + + binfo = &ap->info; + if(binfo->fc_flag & FC_ESTABLISH_LINK) + return; + + rp = &binfo->fc_ring[FC_FCP_RING]; + + /* ALUN */ + /* If the abort/bdr queue is not empty we deal with it first */ + for (dev_ptr = ap->ABORT_BDR_head; (dev_ptr != NULL); + dev_ptr = ap->ABORT_BDR_head) { + + if(dev_ptr->flags & CHK_SCSI_ABDR) { + rc = issue_abdr(ap, dev_ptr, rp, dev_ptr->lun_id); + if (rc != 0) { + break; + } + } + + fc_deq_abort_bdr(dev_ptr); + } + + requeue_ptr = NULL; + exit = 0; + + /* See if there is something on the waiting queue */ + while (((dev_ptr = ap->DEVICE_WAITING_head) != NULL) + && (binfo->fc_ffstate == FC_READY) + && (dev_ptr != requeue_ptr)) { + + nodep = dev_ptr->nodep; + /* Check if a target queue depth is set */ + if (nodep->rptlunstate == REPORT_LUN_ONGOING) { + requeue = 1; + } else if (nodep->tgt_queue_depth && + (nodep->tgt_queue_depth == nodep->num_active_io)) { + if (dev_ptr->nodep->last_dev == NULL) + dev_ptr->nodep->last_dev = dev_ptr; + requeue = 1; + } else if (dev_ptr->flags & (CHK_SCSI_ABDR | SCSI_TQ_HALTED)) { + requeue = 1; + } else { + requeue = 0; + + while ((sbp = dev_ptr->pend_head) != NULL) + { + if ((dev_ptr->active_io_count >= dev_ptr->fcp_cur_queue_depth) || + (dev_ptr->stop_send_io)) { + requeue = 1; + break; + } + if ((rc = issue_fcp_cmd(ap, dev_ptr, sbp, 1))) { + if (rc & FCP_REQUEUE) { + requeue = 1; + break; + } else if (rc & FCP_EXIT) { + exit = 1; + break; + } + continue; + } + dev_ptr->pend_count--; + dev_ptr->pend_head = (T_SCSIBUF *) sbp->bufstruct.av_forw; + if (dev_ptr->pend_head == NULL) + dev_ptr->pend_tail = NULL; + else + dev_ptr->pend_head->bufstruct.av_back = NULL; + + /* Check if a target queue depth is set */ + if (nodep->tgt_queue_depth && + (nodep->tgt_queue_depth == nodep->num_active_io)) { + /* requeue I/O if max cmds to tgt are outstanding */ + if (dev_ptr->nodep->last_dev == NULL) + dev_ptr->nodep->last_dev = dev_ptr; + requeue = 1; + break; + } + } /* while pend_head */ + } + if (exit) + break; + + fc_deq_wait(dev_ptr); + + if (requeue) { + if (requeue_ptr == NULL) + requeue_ptr = dev_ptr; + fc_enq_wait(dev_ptr); + } + + } /* while wait queue */ + + if (rp->fc_tx.q_cnt) { + issue_iocb_cmd(binfo, rp, 0); + /* [SYNC] */ + if (binfo->fc_flag & FC_POLL_MODE) { + fc_polling(binfo, HA_R2ATT); + } + } + + return; + +} /* End fc_issue_cmd */ + + +/**************************************************************************/ +/* */ +/* NAME: fc_enq_fcbuf_active, fc_enq_wait, fc_enq_fcbuf, fc_enq_abort_bdr */ +/* */ +/* FUNCTION: */ +/* Utility routines to handle queuing of device structures to each */ +/* of the queues in use. */ +/* */ +/* EXECUTION ENVIRONMENT: */ +/* */ +/* RETURN VALUE DESCRIPTION: none */ +/* */ +/* ERROR DESCRIPTION: The following errno values may be returned: */ +/* none */ +/* */ +/**************************************************************************/ +_static_ void +fc_enq_fcbuf_active( +RING *rp, /* Pointer to ring for fcbufs */ +fc_buf_t *fcptr) /* Pointer to fcbuf to enqueue */ +{ + FC_BRD_INFO * binfo; + fc_dev_ctl_t *p_dev_ctl; + + binfo = (FC_BRD_INFO * )(rp->fc_binfo); + p_dev_ctl = (fc_dev_ctl_t *)(binfo->fc_p_dev_ctl); + /* Sync the FCP_CMND payload data */ + /* Use correct offset and size for syncing */ + fc_mpdata_sync(fcptr->fc_cmd_dma_handle, (off_t)fcptr->offset, + sizeof(FCP_CMND), DDI_DMA_SYNC_FORDEV); + + /* Enqueue the fcbuf on the FCP ring active queue */ + if (rp->fc_txp.q_first) { + fcptr->fc_bkwd = (fc_buf_t * )rp->fc_txp.q_last; + ((fc_buf_t * )rp->fc_txp.q_last)->fc_fwd = fcptr; + rp->fc_txp.q_last = (uchar * )fcptr; + } else { + rp->fc_txp.q_first = (uchar * )fcptr; + rp->fc_txp.q_last = (uchar * )fcptr; + fcptr->fc_bkwd = NULL; + } + + fcptr->fc_fwd = NULL; + rp->fc_txp.q_cnt++; + if(rp->fc_txp.q_cnt > rp->fc_txp.q_max) { + rp->fc_txp.q_max = rp->fc_txp.q_cnt; + } + binfo->fc_table->fcp_array[fcptr->iotag] = fcptr; +} /* End fc_enq_fcbuf_active */ + + +/* + * Name: fc_enq_wait + * Function: Place dev_ptr on the adapter's wait queue. + * Input: dvi_t *dev_ptr dev_ptr to enqueue. + * Returns: nothing. + */ +_static_ void +fc_enq_wait( +dvi_t *dev_ptr) +{ + fc_dev_ctl_t * ap; + + ap = dev_ptr->nodep->ap; + + /* Queue the dev_ptr if it is not already on the queue */ + if ((dev_ptr->DEVICE_WAITING_fwd == NULL) + && (ap->DEVICE_WAITING_tail != dev_ptr)) { + + if (ap->DEVICE_WAITING_head == NULL) { + ap->DEVICE_WAITING_head = dev_ptr; + } else { + ap->DEVICE_WAITING_tail->DEVICE_WAITING_fwd = dev_ptr; + } + ap->DEVICE_WAITING_tail = dev_ptr; + } +} /* End fc_enq_wait */ + +/* ALUN */ +/* + * Name: fc_enq_fcbuf + * Function: Place fc_buf on the device's free queue. + * Input: fc_buf_t *fcptr fc_buf to enqueue + * Returns: nothing. + */ +_static_ void +fc_enq_fcbuf( +fc_buf_t *fcptr) +{ + dvi_t * dev_ptr; + + dev_ptr = fcptr->dev_ptr; + + if (dev_ptr->fcbuf_head == NULL) { + dev_ptr->fcbuf_head = fcptr; + } else { + dev_ptr->fcbuf_tail->fc_fwd = fcptr; + } + fcptr->fc_fwd = NULL; + dev_ptr->fcbuf_tail = fcptr; + dev_ptr->numfcbufs++; + + if (dev_ptr->numfcbufs == dev_ptr->fcp_lun_queue_depth) { + if (dev_ptr->flags & SCSI_TQ_CLEARING) { + /* Call iodone for all the CLEARQ error bufs */ + fc_free_clearq(dev_ptr); + } + if (dev_ptr->queue_state == STOPPING) { + /* If we are trying to close, check to see if all done */ + } + } + + return; +} /* End fc_enq_fcbuf */ + + +/* + * Name: fc_enq_abort_bdr + * Function: Place dev_ptr on the adapter's Bus Device Reset queue. + * Input: dvi_t *dev_ptr dev_ptr to enqueue. + * Returns: nothing. + */ +_static_ void +fc_enq_abort_bdr( + dvi_t * dev_ptr) +{ + fc_dev_ctl_t * ap; + + ap = dev_ptr->nodep->ap; + + if (ap->ABORT_BDR_head == NULL) { + dev_ptr->ABORT_BDR_fwd = NULL; + dev_ptr->ABORT_BDR_bkwd = NULL; + ap->ABORT_BDR_head = dev_ptr; + ap->ABORT_BDR_tail = dev_ptr; + } else { + dev_ptr->ABORT_BDR_bkwd = ap->ABORT_BDR_tail; + dev_ptr->ABORT_BDR_fwd = NULL; + ap->ABORT_BDR_tail->ABORT_BDR_fwd = dev_ptr; + ap->ABORT_BDR_tail = dev_ptr; + } +} /* End fc_enq_abort_bdr */ + + +/**************************************************************************/ +/* */ +/* NAME: fc_deq_fcbuf_active, fc_deq_wait, fc_deq_fcbuf, fc_deq_abort_bdr */ +/* */ +/* FUNCTION: */ +/* Utility routines to handle dequeueing device structures from */ +/* each of the queues in use. */ +/* */ +/* EXECUTION ENVIRONMENT: */ +/* */ +/* ERROR DESCRIPTION: The following errno values may be returned: */ +/* none */ +/* */ +/**************************************************************************/ +_static_ fc_buf_t * +fc_deq_fcbuf_active( + RING * rp, + ushort iotag) /* tag to match I/O */ +{ + FC_BRD_INFO * binfo; + fc_dev_ctl_t * p_dev_ctl; + fc_buf_t * fcptr = NULL; + + binfo = (FC_BRD_INFO * )(rp->fc_binfo); + p_dev_ctl = (fc_dev_ctl_t *)(binfo->fc_p_dev_ctl); + /* Remove an fcbuf from the FCP ring active queue based on iotag */ + + if ((iotag < MAX_FCP_CMDS) && + (fcptr = binfo->fc_table->fcp_array[iotag])) { + + /* Remove fcbuf from list, adjust first, last and cnt */ + if (fcptr->fc_bkwd) { + fcptr->fc_bkwd->fc_fwd = fcptr->fc_fwd; + } else { + rp->fc_txp.q_first = (uchar * )fcptr->fc_fwd; + } + + if (fcptr->fc_fwd) { + fcptr->fc_fwd->fc_bkwd = fcptr->fc_bkwd; + } else { + rp->fc_txp.q_last = (uchar * )fcptr->fc_bkwd; + } + + rp->fc_txp.q_cnt--; + binfo->fc_table->fcp_array[iotag] = NULL; + } + + if (fcptr) { + if (binfo->fc_flag & FC_SLI2) { + MATCHMAP * next_bmp; + + while(fcptr->bmp) { + next_bmp = (MATCHMAP *)fcptr->bmp->fc_mptr; + fc_mem_put(binfo, MEM_BPL, (uchar *)fcptr->bmp); + fcptr->bmp = next_bmp; + } + } + fcptr->bmp = 0; + + /* Use correct offset and size for syncing */ + fc_mpdata_sync(fcptr->fc_cmd_dma_handle, + (off_t)(fcptr->offset + sizeof(FCP_CMND)), + (u_int) sizeof(FCP_RSP), DDI_DMA_SYNC_FORCPU); + + } + return(fcptr); +} /* End fc_deq_fcbuf_active */ + + +/* + * Name: fc_deq_wait + * Function: Remove a dev_ptr from the adapter's wait queue. + * Input: dvi_t *dev_ptr dev_ptr to be dequeued. + * Returns: nothing. + */ +_local_ void +fc_deq_wait( + dvi_t * dev_ptr) +{ + fc_dev_ctl_t * ap; + dvi_t *prev_ptr; + + if(dev_ptr == NULL) { + return; + } + ap = dev_ptr->nodep->ap; + if(ap->DEVICE_WAITING_head == NULL) { + return; + } + + if(dev_ptr != ap->DEVICE_WAITING_head) { + prev_ptr = ap->DEVICE_WAITING_head; + while(prev_ptr->DEVICE_WAITING_fwd != dev_ptr && + prev_ptr != ap->DEVICE_WAITING_tail) + { + prev_ptr=prev_ptr->DEVICE_WAITING_fwd; + } + if(prev_ptr->DEVICE_WAITING_fwd == dev_ptr) { + prev_ptr->DEVICE_WAITING_fwd = dev_ptr->DEVICE_WAITING_fwd; + if(ap->DEVICE_WAITING_tail == dev_ptr) { + ap->DEVICE_WAITING_tail = prev_ptr; + } + dev_ptr->DEVICE_WAITING_fwd = NULL; + } + return; + } + if (ap->DEVICE_WAITING_head == ap->DEVICE_WAITING_tail) { + ap->DEVICE_WAITING_head = NULL; + ap->DEVICE_WAITING_tail = NULL; + } else { + ap->DEVICE_WAITING_head = dev_ptr->DEVICE_WAITING_fwd; + } + dev_ptr->DEVICE_WAITING_fwd = NULL; + +} /* End fc_deq_wait */ + + +/* + * Name: fc_deq_fcbuf + * Function: Remove an fc_buf from the device's free queue. + * Input: dvi_t *dev_ptr dev_ptr with the free list. + * Returns: pointer to the fc_buf, or NULL if none exist. + */ +_static_ fc_buf_t * +fc_deq_fcbuf( + dvi_t * dev_ptr) +{ + fc_buf_t * fcptr; + + if (dev_ptr->fcbuf_head == NULL) + return(NULL); + + fcptr = dev_ptr->fcbuf_head; + if (dev_ptr->fcbuf_head == dev_ptr->fcbuf_tail) { + dev_ptr->fcbuf_head = NULL; + dev_ptr->fcbuf_tail = NULL; + } else { + dev_ptr->fcbuf_head = fcptr->fc_fwd; + } + dev_ptr->numfcbufs--; + + return(fcptr); + +} /* End fc_deq_fcbuf */ + + +/* + * Name: fc_deq_abort_bdr + * Function: Removes a dev_ptr from the adapter's abort Bus Device Reset + * queue. + * Input: dvi_t *dev_ptr dev_ptr to be removed. + * Returns: nothing. + */ +_local_ void +fc_deq_abort_bdr( +dvi_t *dev_ptr) +{ + fc_dev_ctl_t * ap; + + ap = dev_ptr->nodep->ap; + + if (ap->ABORT_BDR_head == ap->ABORT_BDR_tail) { + ap->ABORT_BDR_head = NULL; + ap->ABORT_BDR_tail = NULL; + } else if (ap->ABORT_BDR_head == dev_ptr) { + /* first one */ + ap->ABORT_BDR_head = dev_ptr->ABORT_BDR_fwd; + dev_ptr->ABORT_BDR_fwd->ABORT_BDR_bkwd = dev_ptr->ABORT_BDR_bkwd; + } else if (ap->ABORT_BDR_tail == dev_ptr) { + /* last one */ + ap->ABORT_BDR_tail = dev_ptr->ABORT_BDR_bkwd; + dev_ptr->ABORT_BDR_bkwd->ABORT_BDR_fwd = dev_ptr->ABORT_BDR_fwd; + } else { + /* in the middle */ + dev_ptr->ABORT_BDR_bkwd->ABORT_BDR_fwd = dev_ptr->ABORT_BDR_fwd; + dev_ptr->ABORT_BDR_fwd->ABORT_BDR_bkwd = dev_ptr->ABORT_BDR_bkwd; + } + dev_ptr->ABORT_BDR_fwd = NULL; + dev_ptr->ABORT_BDR_bkwd = NULL; + +} /* End fc_deq_abort_bdr */ + + +/* Assign a SCSI ID to a nodelist table entry */ +_static_ int +fc_assign_scsid( +fc_dev_ctl_t *p_dev_ctl, +NODELIST *ndlp) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + node_t * node_ptr; + nodeh_t * hp; + NODELIST * seedndlp; + NODELIST * new_ndlp; + int dev_index, i; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + /* Next check to see if our binding already has a SCSI ID */ + for (dev_index = 0; dev_index < MAX_FC_TARGETS; dev_index++) { + hp = &binfo->device_queue_hash[dev_index]; + i = (hp->node_flag & FCP_SEED_MASK); + if ((i & FCP_SEED_DID) && (ndlp->nlp_DID == hp->un.dev_did)) + break; /* a match */ + else if ((i & FCP_SEED_WWPN) && + (fc_geportname(&ndlp->nlp_portname, &hp->un.dev_portname) == 2)) + break; /* a match */ + else if ((i & FCP_SEED_WWNN) && + (fc_geportname(&ndlp->nlp_nodename, &hp->un.dev_nodename) == 2)) + break; /* a match */ + } + + /* If not, assign a new SCSI ID / pan number */ + if (dev_index == MAX_FC_TARGETS) { + seedndlp = binfo->fc_nlpbind_start; + if(seedndlp == (NODELIST *)&binfo->fc_nlpbind_start) + seedndlp = binfo->fc_nlpunmap_start; + if(seedndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + seedndlp = binfo->fc_nlpmap_start; + while(seedndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + new_ndlp = (NODELIST *)seedndlp->nlp_listp_next; + + if (seedndlp->nlp_type & NLP_SEED_MASK) { + if (seedndlp->nlp_type & NLP_SEED_WWNN) { + if (fc_geportname(&ndlp->nlp_nodename, + &seedndlp->nlp_nodename) == 2) { + ndlp->id.nlp_pan = seedndlp->id.nlp_pan; + ndlp->id.nlp_sid = seedndlp->id.nlp_sid; + ndlp->nlp_type |= NLP_SEED_WWNN; + if(seedndlp != ndlp) { + seedndlp->nlp_type &= ~NLP_FCP_TARGET; + fc_freenode(binfo, seedndlp, 0); + seedndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, seedndlp); + } + dev_index = INDEX(ndlp->id.nlp_pan, ndlp->id.nlp_sid); + hp = &binfo->device_queue_hash[dev_index]; + + /* Claim SCSI ID by copying bind parameter to + * proper index in device_queue_hash. + */ + if(hp->node_ptr) + ndlp->nlp_targetp = (uchar *)hp->node_ptr; + fc_bcopy(&ndlp->nlp_nodename, &hp->un.dev_nodename, + sizeof(NAME_TYPE)); + hp->node_flag &= ~FCP_SEED_MASK; + hp->node_flag |= FCP_SEED_WWNN; + goto out1; + } + } + if (seedndlp->nlp_type & NLP_SEED_WWPN) { + if (fc_geportname(&ndlp->nlp_portname, + &seedndlp->nlp_portname) == 2) { + ndlp->id.nlp_pan = seedndlp->id.nlp_pan; + ndlp->id.nlp_sid = seedndlp->id.nlp_sid; + ndlp->nlp_type |= NLP_SEED_WWPN; + if(seedndlp != ndlp) { + seedndlp->nlp_type &= ~NLP_FCP_TARGET; + fc_freenode(binfo, seedndlp, 0); + seedndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, seedndlp); + } + dev_index = INDEX(ndlp->id.nlp_pan, ndlp->id.nlp_sid); + hp = &binfo->device_queue_hash[dev_index]; + + /* Claim SCSI ID by copying bind parameter to + * proper index in device_queue_hash. + */ + if(hp->node_ptr) + ndlp->nlp_targetp = (uchar *)hp->node_ptr; + fc_bcopy(&ndlp->nlp_portname, &hp->un.dev_portname, + sizeof(NAME_TYPE)); + hp->node_flag &= ~FCP_SEED_MASK; + hp->node_flag |= FCP_SEED_WWPN; + goto out1; + } + } + if (seedndlp->nlp_type & NLP_SEED_DID) { + if (ndlp->nlp_DID == seedndlp->nlp_DID) { + ndlp->id.nlp_pan = seedndlp->id.nlp_pan; + ndlp->id.nlp_sid = seedndlp->id.nlp_sid; + ndlp->nlp_type |= NLP_SEED_DID; + if(seedndlp != ndlp) { + seedndlp->nlp_type &= ~NLP_FCP_TARGET; + fc_freenode(binfo, seedndlp, 0); + seedndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, seedndlp); + } + dev_index = INDEX(ndlp->id.nlp_pan, ndlp->id.nlp_sid); + hp = &binfo->device_queue_hash[dev_index]; + + /* Claim SCSI ID by copying bind parameter to + * proper index in device_queue_hash. + */ + if(hp->node_ptr) + ndlp->nlp_targetp = (uchar *)hp->node_ptr; + hp->un.dev_did = ndlp->nlp_DID; + hp->node_flag &= ~FCP_SEED_MASK; + hp->node_flag |= FCP_SEED_DID; + goto out1; + } + } + } + seedndlp = new_ndlp; + if(seedndlp == (NODELIST *)&binfo->fc_nlpbind_start) + seedndlp = binfo->fc_nlpunmap_start; + if(seedndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + seedndlp = binfo->fc_nlpmap_start; + } + + if(clp[CFG_AUTOMAP].a_current) { + /* Fill in nodelist entry */ + if (DEV_PAN(p_dev_ctl->sid_cnt) == NLP_MAXPAN) { + return(0); /* No more available SCSI IDs */ + } + + /* If scan-down == 2 and we are private loop, automap + * method is based on ALPA. + */ + if((clp[CFG_SCAN_DOWN].a_current == 2) && + !(binfo->fc_flag & (FC_PUBLIC_LOOP | FC_FABRIC)) && + (binfo->fc_topology == TOPOLOGY_LOOP)) { + for (i = 0; i < FC_MAXLOOP; i++) { + if(ndlp->nlp_DID == (uint32)AlpaArray[i]) + break; + } + if(i == FC_MAXLOOP) { + goto jmp_auto; + } + ndlp->id.nlp_pan = DEV_PAN(i); + ndlp->id.nlp_sid = DEV_SID(i); + } + else { + /* Check to make sure assigned scsi id does not overlap + * with a seeded value. + */ +jmp_auto: + seedndlp = binfo->fc_nlpbind_start; + if(seedndlp == (NODELIST *)&binfo->fc_nlpbind_start) + seedndlp = binfo->fc_nlpunmap_start; + if(seedndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + seedndlp = binfo->fc_nlpmap_start; + while(seedndlp != (NODELIST *)&binfo->fc_nlpmap_start) { + if ((seedndlp->nlp_state == NLP_SEED) || + (seedndlp->nlp_type & NLP_SEED_MASK)) { + if ((seedndlp->id.nlp_pan == DEV_PAN(p_dev_ctl->sid_cnt)) && + (seedndlp->id.nlp_sid == DEV_SID(p_dev_ctl->sid_cnt))) { + /* We overlap, so pick a new id and start again */ + p_dev_ctl->sid_cnt++; + goto jmp_auto; + } + } + seedndlp = (NODELIST *)seedndlp->nlp_listp_next; + if(seedndlp == (NODELIST *)&binfo->fc_nlpbind_start) + seedndlp = binfo->fc_nlpunmap_start; + if(seedndlp == (NODELIST *)&binfo->fc_nlpunmap_start) + seedndlp = binfo->fc_nlpmap_start; + } + + ndlp->id.nlp_pan = DEV_PAN(p_dev_ctl->sid_cnt); + ndlp->id.nlp_sid = DEV_SID(p_dev_ctl->sid_cnt); + p_dev_ctl->sid_cnt++; + } + ndlp->nlp_type |= NLP_AUTOMAP; + + dev_index = INDEX(ndlp->id.nlp_pan, ndlp->id.nlp_sid); + hp = &binfo->device_queue_hash[dev_index]; + + /* Claim SCSI ID by copying bind parameter to + * proper index in device_queue_hash. + */ + if(hp->node_ptr) + ndlp->nlp_targetp = (uchar *)hp->node_ptr; + switch(p_dev_ctl->fcp_mapping) { + case FCP_SEED_DID: + hp->un.dev_did = ndlp->nlp_DID; + ndlp->nlp_type |= NLP_SEED_DID; + break; + case FCP_SEED_WWPN: + fc_bcopy(&ndlp->nlp_portname, &hp->un.dev_portname, sizeof(NAME_TYPE)); + ndlp->nlp_type |= NLP_SEED_WWPN; + break; + case FCP_SEED_WWNN: + default: + fc_bcopy(&ndlp->nlp_nodename, &hp->un.dev_nodename, sizeof(NAME_TYPE)); + ndlp->nlp_type |= NLP_SEED_WWNN; + break; + } + hp->node_flag &= ~FCP_SEED_MASK; + hp->node_flag |= p_dev_ctl->fcp_mapping; + goto out1; + } + return(0); /* Cannot assign a scsi id */ + } + + /* If scan-down == 2 and we are private loop, automap + * method is based on ALPA. + */ + if((clp[CFG_SCAN_DOWN].a_current == 2) && + !(binfo->fc_flag & (FC_PUBLIC_LOOP | FC_FABRIC)) && + (binfo->fc_topology == TOPOLOGY_LOOP)) { + for (i = 0; i < FC_MAXLOOP; i++) { + if(ndlp->nlp_DID == (uint32)AlpaArray[i]) + break; + } + if(i == FC_MAXLOOP) { + goto jmp_auto; + } + ndlp->id.nlp_pan = DEV_PAN(i); + ndlp->id.nlp_sid = DEV_SID(i); + goto out1; + } + /* Copy SCSI ID for the WWN into nodelist */ + ndlp->id.nlp_pan = DEV_PAN(dev_index); + ndlp->id.nlp_sid = DEV_SID(dev_index); + + /* Update rpi for that SCSI ID's device node info */ + if ((node_ptr = (node_t * )ndlp->nlp_targetp) != NULL) { + node_ptr->rpi = ndlp->nlp_Rpi; + node_ptr->last_good_rpi = ndlp->nlp_Rpi; + node_ptr->nlp = ndlp; + node_ptr->flags &= ~FC_NODEV_TMO; + ndlp->nlp_flag &= ~NLP_NODEV_TMO; + if(node_ptr->nodev_tmr) { + /* STOP nodev timer */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0704, /* ptr to msg structure */ + fc_mes0704, /* ptr to msg */ + fc_msgBlk0704.msgPreambleStr, /* begin varargs */ + (ulong)ndlp, + ndlp->nlp_flag, + ndlp->nlp_state, + ndlp->nlp_DID); /* end varargs */ + fc_clk_can(p_dev_ctl, node_ptr->nodev_tmr); + node_ptr->nodev_tmr = 0; + } + } + else { + int dev_index; +out1: + dev_index = INDEX(ndlp->id.nlp_pan, ndlp->id.nlp_sid); + node_ptr = binfo->device_queue_hash[dev_index].node_ptr; + if(node_ptr) { + /* This is a new device that entered the loop */ + node_ptr->nlp = ndlp; + node_ptr->rpi = ndlp->nlp_Rpi; + node_ptr->last_good_rpi = ndlp->nlp_Rpi; + node_ptr->scsi_id = dev_index; + ndlp->nlp_targetp = (uchar *)node_ptr; + node_ptr->flags &= ~FC_NODEV_TMO; + ndlp->nlp_flag &= ~NLP_NODEV_TMO; + if(node_ptr->nodev_tmr) { + /* STOP nodev timer */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0705, /* ptr to msg structure */ + fc_mes0705, /* ptr to msg */ + fc_msgBlk0705.msgPreambleStr, /* begin varargs */ + (ulong)ndlp, + ndlp->nlp_flag, + ndlp->nlp_state, + ndlp->nlp_DID); /* end varargs */ + fc_clk_can(p_dev_ctl, node_ptr->nodev_tmr); + node_ptr->nodev_tmr = 0; + } + } + } + return(1); +} /* End fc_assign_scsid */ + + +/************************************************************************/ +/* */ +/* NAME: fc_fail_cmd */ +/* */ +/* FUNCTION: Fail All Pending Commands Routine */ +/* */ +/* This routine is called to clear out all pending commands */ +/* for a SCSI FCP device. */ +/* */ +/* EXECUTION ENVIRONMENT: */ +/* This routine can only be called on priority levels */ +/* equal to that of the interrupt handler. */ +/* */ +/* DATA STRUCTURES: */ +/* sc_buf - input/output request struct used between the adapter */ +/* driver and the calling SCSI device driver */ +/* */ +/* INPUTS: */ +/* dev_info structure - pointer to device information structure */ +/* */ +/* RETURN VALUE DESCRIPTION: The following are the return values: */ +/* none */ +/* */ +/************************************************************************/ +_static_ void +fc_fail_cmd( + dvi_t * dev_ptr, + char error, + uint32 statistic) +{ + T_SCSIBUF * sbp; + RING * rp; + IOCBQ * iocb_cmd, *next; + IOCB * icmd; + Q tmpq; + fc_buf_t * fcptr; + struct buf * bp; + dvi_t * next_dev_ptr; + fc_dev_ctl_t * p_dev_ctl; + FC_BRD_INFO * binfo; + iCfgParam * clp; + + p_dev_ctl = dev_ptr->nodep->ap; + binfo = &BINFO; + rp = &binfo->fc_ring[FC_FCP_RING]; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + /* First clear out all sc_buf structures in the pending queue */ + if(! clp[CFG_HOLDIO].a_current) { + if((dev_ptr->nodep) && + (dev_ptr->nodep->rptlunstate == REPORT_LUN_ONGOING)) + goto out; + sbp = dev_ptr->pend_head; + dev_ptr->pend_head = NULL; /* reset tail pointer */ + dev_ptr->pend_tail = NULL; /* reset tail pointer */ + dev_ptr->pend_count = 0; + + while (sbp != NULL) { + T_SCSIBUF *nextsbp; + + sbp->bufstruct.b_flags |= B_ERROR; /* set b_flags B_ERROR flag */ + sbp->bufstruct.b_error = error; + sbp->bufstruct.b_resid = sbp->bufstruct.b_bcount; + if (error) { + sbp->status_validity = SC_ADAPTER_ERROR; + SET_ADAPTER_STATUS(sbp,SC_NO_DEVICE_RESPONSE) + } else { + sbp->status_validity = 0; + } + + /* Point to next sc_buf in pending chain, if any */ + nextsbp = (T_SCSIBUF *) sbp->bufstruct.av_forw; + sbp->bufstruct.av_forw = 0; + fc_do_iodone((struct buf *) sbp); /* This could reque to pend_head */ + sbp = nextsbp; + } + } + +out: + /* Next clear out all fc_buf structures in the iocb queue for this device */ + tmpq.q_first = NULL; + + /* Get next command from ring xmit queue */ + iocb_cmd = fc_ringtx_get(rp); + + while (iocb_cmd) { + icmd = &iocb_cmd->iocb; + if ((icmd->ulpCommand != CMD_IOCB_CONTINUE_CN) && + (icmd->ulpContext == dev_ptr->nodep->last_good_rpi) && + (icmd->ulpIoTag < MAX_FCP_CMDS) && + (fcptr = binfo->fc_table->fcp_array[icmd->ulpIoTag]) && + (fcptr->dev_ptr == dev_ptr)) { + + if ((fcptr = fc_deq_fcbuf_active(rp, icmd->ulpIoTag)) != NULL) { + bp = (struct buf *)fcptr->sc_bufp; + + /* Reject this command with error */ + if (fcptr->fcp_cmd.fcpCntl2) { + + /* This is a task management command */ + dev_ptr->ioctl_errno = error; + if (fcptr->fcp_cmd.fcpCntl2 == ABORT_TASK_SET) + dev_ptr->flags &= ~SCSI_ABORT_TSET; + + if (fcptr->fcp_cmd.fcpCntl2 & TARGET_RESET) { + dev_ptr->flags &= ~SCSI_TARGET_RESET; + for (next_dev_ptr = dev_ptr->nodep->lunlist; + next_dev_ptr != NULL; next_dev_ptr = next_dev_ptr->next) { + next_dev_ptr->flags &= ~SCSI_TARGET_RESET; + } + } + + if (fcptr->fcp_cmd.fcpCntl2 & LUN_RESET) + dev_ptr->flags &= ~SCSI_LUN_RESET; + + if (dev_ptr->ioctl_wakeup == 1) { + dev_ptr->ioctl_wakeup = 0; + + fc_admin_wakeup(p_dev_ctl, dev_ptr, fcptr->sc_bufp); + } + else { + fc_do_iodone(bp); + } + + dev_ptr->active_io_count--; + dev_ptr->nodep->num_active_io--; + + } else { + /* This is a regular FCP command */ + bp->b_error = error; + bp->b_resid = bp->b_bcount; + bp->b_flags |= B_ERROR; + if (error) { + sbp = fcptr->sc_bufp; + sbp->status_validity = SC_ADAPTER_ERROR; + SET_ADAPTER_STATUS(sbp,SC_NO_DEVICE_RESPONSE) + } + + sbp = fcptr->sc_bufp; + + dev_ptr->active_io_count--; + dev_ptr->nodep->num_active_io--; + fc_do_iodone(bp); + } + fc_enq_fcbuf(fcptr); + } + + fc_mem_put(binfo, MEM_IOCB, (uchar * )iocb_cmd); + + while ((iocb_cmd = fc_ringtx_get(rp)) != NULL) { + icmd = &iocb_cmd->iocb; + if (icmd->ulpCommand != CMD_IOCB_CONTINUE_CN) + break; + fc_mem_put(binfo, MEM_IOCB, (uchar * )iocb_cmd); + } + } else { + /* Queue this iocb to the temporary queue */ + if (tmpq.q_first) { + ((IOCBQ * )tmpq.q_last)->q = (uchar * )iocb_cmd; + tmpq.q_last = (uchar * )iocb_cmd; + } else { + tmpq.q_first = (uchar * )iocb_cmd; + tmpq.q_last = (uchar * )iocb_cmd; + } + iocb_cmd->q = NULL; + + iocb_cmd = fc_ringtx_get(rp); + } + } + + /* Put the temporary queue back in the FCP iocb queue */ + iocb_cmd = (IOCBQ * )tmpq.q_first; + while (iocb_cmd) { + next = (IOCBQ * )iocb_cmd->q; + fc_ringtx_put(rp, iocb_cmd); + iocb_cmd = next; + } + + return; +} /* End fc_fail_cmd */ + +/* Fix up any changed RPIs in FCP IOCBs queued up a txq + * Called from CLEAR_LA after a link up. + */ +_static_ void +fc_fcp_fix_txq( + fc_dev_ctl_t * p_dev_ctl) +{ + RING * rp; + FC_BRD_INFO * binfo; + fc_buf_t * fcptr; + IOCBQ * temp; + IOCB * cmd; + dvi_t * dev_ptr; + unsigned long iflag; + + iflag = lpfc_q_disable_lock(p_dev_ctl); + binfo = &BINFO; + rp = &binfo->fc_ring[FC_FCP_RING]; + + /* Make sure all RPIs on txq are still ok */ + temp = (IOCBQ *)rp->fc_tx.q_first; + while (temp != NULL) { + cmd = &temp->iocb; + if ((fcptr = binfo->fc_table->fcp_array[cmd->ulpIoTag]) != NULL) { + dev_ptr = fcptr->dev_ptr; + if((dev_ptr) && (dev_ptr->nodep) && + (cmd->ulpContext != dev_ptr->nodep->rpi)) { + cmd->ulpContext = dev_ptr->nodep->rpi; + } + } + if(rp->fc_tx.q_last == (uchar * )temp) + break; + temp = (IOCBQ *)temp->q; + } + lpfc_q_unlock_enable(p_dev_ctl, iflag); + return; +} /* End fc_fcp_fix_txq */ + +_static_ void +fc_fail_pendq( + dvi_t * dev_ptr, + char error, + uint32 statistic) +{ + T_SCSIBUF * sbp; + RING * rp; + fc_dev_ctl_t * p_dev_ctl; + FC_BRD_INFO * binfo; + iCfgParam * clp; + + p_dev_ctl = dev_ptr->nodep->ap; + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + rp = &binfo->fc_ring[FC_FCP_RING]; + + if((dev_ptr->nodep) && + (dev_ptr->nodep->rptlunstate == REPORT_LUN_ONGOING)) + goto out; + + if(clp[CFG_HOLDIO].a_current) + goto out; + + sbp = dev_ptr->pend_head; + dev_ptr->pend_head = NULL; /* reset tail pointer */ + dev_ptr->pend_tail = NULL; /* reset tail pointer */ + dev_ptr->pend_count = 0; + + while (sbp != NULL) { + T_SCSIBUF *nextsbp; + + sbp->bufstruct.b_flags |= B_ERROR; /* set b_flags B_ERROR flag */ + sbp->bufstruct.b_error = error; + sbp->bufstruct.b_resid = sbp->bufstruct.b_bcount; + if (error) { + sbp->status_validity = SC_ADAPTER_ERROR; + SET_ADAPTER_STATUS(sbp,SC_NO_DEVICE_RESPONSE) + } else { + sbp->status_validity = 0; + } + + /* Point to next sc_buf in pending chain, if any */ + nextsbp = (T_SCSIBUF *) sbp->bufstruct.av_forw; + sbp->bufstruct.av_forw = 0; + fc_do_iodone((struct buf *) sbp); /* This could reque to pend_head */ + sbp = nextsbp; + } + +out: + return; +} /* End fc_fail_pendq */ + +/************************************************************************/ +/* */ +/* NAME:issue_fcp_cmd */ +/* */ +/* FUNCTION:Issue an FCP command to the adapter iocb queue */ +/* */ +/* EXECUTION ENVIRONMENT: */ +/* This routine always runs at interrupt level */ +/* */ +/* DATA STRUCTURES: */ +/* sc_buf- input/output request struct used between the adapter */ +/* driver and the calling SCSI device driver */ +/* */ +/* RETURN VALUE DESCRIPTION: 0 = success */ +/* 1 = continue */ +/* 2 = requeue */ +/* 4 = exit */ +/* */ +/************************************************************************/ +_static_ int +issue_fcp_cmd( + fc_dev_ctl_t * p_dev_ctl, + dvi_t * dev_ptr, + T_SCSIBUF * sbp, + int pend) +{ + FC_BRD_INFO * binfo = &BINFO; + iCfgParam * clp; + struct buf * bp; + fc_buf_t * fcptr; + int i, rc; + RING * rp; + IOCBQ * temp; + IOCB * cmd; + uint32 count, * lp; + fc_lun_t lun; + ULP_BDE64 * bpl; + MATCHMAP * bmp; + NODELIST * ndlp; + + rp = &binfo->fc_ring[FC_FCP_RING]; + bp = (struct buf *) sbp; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + if((dev_ptr->nodep == 0) || + ((ndlp = dev_ptr->nodep->nlp) == 0)) + return(FCP_REQUEUE); + + if ( !(ndlp->capabilities & FC_CAP_AUTOSENSE) ) { + if (dev_ptr->sense_valid && + (sbp->scsi_command.scsi_cmd.scsi_op_code == SCSI_REQUEST_SENSE)) { + + /* Request sense command - use saved sense data */ + if (bp->b_bcount > (int)dev_ptr->sense_length) { + bp->b_resid = bp->b_bcount - (int)dev_ptr->sense_length; + count = dev_ptr->sense_length; + } else { + count = bp->b_bcount; + } + lp = (uint32 * )dev_ptr->sense; + lpfc_copy_sense(dev_ptr, bp); + bp->b_error = 0; + bp->b_flags &= ~B_ERROR; + + if (pend) { + dev_ptr->pend_head = (T_SCSIBUF *) bp->av_forw; + if (dev_ptr->pend_head == NULL) + dev_ptr->pend_tail = NULL; + else + dev_ptr->pend_head->bufstruct.av_back = NULL; + dev_ptr->pend_count--; + } + dev_ptr->sense_valid = 0; + + FCSTATCTR.fcpSense++; + fc_do_iodone(bp); + return(FCP_CONTINUE); + } + } + + + if(dev_ptr->queue_state != ACTIVE) { + return(FCP_REQUEUE); + } + + if(binfo->fc_process_LA == 0) { + return(FCP_REQUEUE); + } + + /* Check if device is in process of resetting */ + if (dev_ptr->flags & SCSI_DEV_RESET) { + return(FCP_REQUEUE); + } + + if (dev_ptr->nodep->rpi == 0xFFFE) { + + if(clp[CFG_HOLDIO].a_current) { + return(FCP_REQUEUE); + } + + if((clp[CFG_NODEV_TMO].a_current) && + ((dev_ptr->nodep->flags & FC_NODEV_TMO) == 0)) { + + /* Kick off first PLOGI to device */ + if (!(ndlp->nlp_flag & NLP_REQ_SND)) { + uint32 did; + + did = ndlp->nlp_DID; + if(did == (uint32)0) { + if((ndlp->nlp_type & (NLP_AUTOMAP | NLP_SEED_MASK)) && + (ndlp->nlp_state == NLP_LIMBO) && ndlp->nlp_oldDID) + did = ndlp->nlp_oldDID; + } + ndlp->nlp_flag &= ~NLP_RM_ENTRY; + if ((!(ndlp->nlp_flag & NLP_NODEV_TMO)) && + (did != (uint32)0)) { + if(!(ndlp->nlp_flag & NLP_NS_REMOVED)) { + ndlp->nlp_flag |= NLP_NODEV_TMO; + fc_els_cmd(binfo, ELS_CMD_PLOGI, (void *)((ulong)did), + (uint32)0, (ushort)0, ndlp); + } + } + } + else { + ndlp->nlp_flag |= NLP_NODEV_TMO; + } + return(FCP_REQUEUE); + } + + /* The device is not active at this time */ + bp->b_error = EIO; + bp->b_resid = bp->b_bcount; + bp->b_flags |= B_ERROR; + sbp->status_validity = SC_ADAPTER_ERROR; + SET_ADAPTER_STATUS(sbp,SC_NO_DEVICE_RESPONSE) + if (pend) { + dev_ptr->pend_head = (T_SCSIBUF *) bp->av_forw; + if (dev_ptr->pend_head == NULL) + dev_ptr->pend_tail = NULL; + else + dev_ptr->pend_head->bufstruct.av_back = NULL; + dev_ptr->pend_count--; + } + + FCSTATCTR.fcpNoDevice++; + fc_delay_iodone(p_dev_ctl, sbp); + + { + uint32 did; + uint32 pan; + uint32 sid; + + did = ndlp->nlp_DID; + pan = ndlp->id.nlp_pan; + sid = ndlp->id.nlp_sid; + + if (!(dev_ptr->flags & DONT_LOG_INVALID_RPI)) { + /* Cannot issue FCP command */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0706, /* ptr to msg structure */ + fc_mes0706, /* ptr to msg */ + fc_msgBlk0706.msgPreambleStr, /* begin varargs */ + did, + FC_SCSID(pan, sid)); /* end varargs */ + dev_ptr->flags |= DONT_LOG_INVALID_RPI; + } + } + return(FCP_CONTINUE); + } + + if (ndlp->nlp_action & NLP_DO_RSCN) { + return(FCP_REQUEUE); + } + + if ((fcptr = fc_deq_fcbuf(dev_ptr)) == NULL) { + return(FCP_REQUEUE); + } + + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB)) == NULL) { + fc_enq_fcbuf(fcptr); + return(FCP_EXIT); + } + + fc_bzero((void *)fcptr, sizeof(FCP_CMND) + sizeof(FCP_RSP)); + + /* Copy SCSI cmd into FCP payload for xmit.*/ + lun = (uint32) sbp->scsi_command.scsi_lun; + { + int i; + fcptr->fcp_cmd.fcpCdb[0]= sbp->scsi_command.scsi_cmd.scsi_op_code; + fcptr->fcp_cmd.fcpCdb[1]= sbp->scsi_command.scsi_cmd.lun; + for(i=0; i< (sizeof(struct sc_cmd)-2); i++) + fcptr->fcp_cmd.fcpCdb[i+2]= sbp->scsi_command.scsi_cmd.scsi_bytes[i]; + fcptr->fcp_cmd.fcpCntl1 = sbp->scsi_command.flags; + } + + /* Put LUN in the FCP command using the Peripheral Addressing Method */ + fcptr->fcp_cmd.fcpLunMsl = lun << FC_LUN_SHIFT; + fcptr->fcp_cmd.fcpLunLsl = 0; + + /* + * The Logical Unit Addressing method is not supported at + * this current release. + */ + if (dev_ptr->nodep->addr_mode == VOLUME_SET_ADDRESSING) { + fcptr->fcp_cmd.fcpLunMsl |= SWAP_DATA(0x40000000); + } + + fcptr->fcp_cmd.fcpDl = SWAP_DATA(bp->b_bcount); + + fcptr->sc_bufp = sbp; + fcptr->flags = 0; + + /* set up an iotag so we can match the completion iocb */ + for (i = 0; i < MAX_FCP_CMDS; i++) { + fcptr->iotag = rp->fc_iotag++; + if (rp->fc_iotag >= MAX_FCP_CMDS) + rp->fc_iotag = 1; + if (binfo->fc_table->fcp_array[fcptr->iotag] == 0) + break; + } + if (i >= MAX_FCP_CMDS) { + /* No more command slots available, retry later */ + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + fc_enq_fcbuf(fcptr); + return(FCP_EXIT); + } + + fc_bzero((void *)temp, sizeof(IOCBQ)); /* zero the iocb entry */ + cmd = &temp->iocb; + + if (binfo->fc_flag & FC_SLI2) { + /* Allocate buffer for Buffer ptr list */ + if ((bmp = (MATCHMAP * )fc_mem_get(binfo, MEM_BPL)) == 0) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + fc_enq_fcbuf(fcptr); + return(FCP_EXIT); + } + bpl = (ULP_BDE64 * )bmp->virt; + bpl->addrHigh = PCIMEM_LONG((uint32)putPaddrHigh(GET_PAYLOAD_PHYS_ADDR(fcptr))); + bpl->addrLow = PCIMEM_LONG((uint32)putPaddrLow(GET_PAYLOAD_PHYS_ADDR(fcptr))); + bpl->tus.f.bdeSize = sizeof(FCP_CMND); + bpl->tus.f.bdeFlags = BUFF_USE_CMND; + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + bpl++; + bpl->addrHigh = PCIMEM_LONG((uint32)putPaddrHigh(GET_PAYLOAD_PHYS_ADDR(fcptr)+sizeof(FCP_CMND))); + bpl->addrLow = PCIMEM_LONG((uint32)putPaddrLow(GET_PAYLOAD_PHYS_ADDR(fcptr)+sizeof(FCP_CMND))); + bpl->tus.f.bdeSize = sizeof(FCP_RSP); + bpl->tus.f.bdeFlags = (BUFF_USE_CMND | BUFF_USE_RCV); + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + bpl++; + + cmd->un.fcpi64.bdl.ulpIoTag32 = (uint32)0; + cmd->un.fcpi64.bdl.addrHigh = (uint32)putPaddrHigh(bmp->phys); + cmd->un.fcpi64.bdl.addrLow = (uint32)putPaddrLow(bmp->phys); + cmd->un.fcpi64.bdl.bdeSize = (2 * sizeof(ULP_BDE64)); + cmd->un.fcpi64.bdl.bdeFlags = BUFF_TYPE_BDL; + cmd->ulpBdeCount = 1; + fcptr->bmp = bmp; + temp->bpl = (uchar *)0; + } else { + bpl = 0; + cmd->un.fcpi.fcpi_cmnd.bdeAddress = (uint32)putPaddrLow(GET_PAYLOAD_PHYS_ADDR(fcptr)); + cmd->un.fcpi.fcpi_cmnd.bdeSize = sizeof(FCP_CMND); + cmd->un.fcpi.fcpi_rsp.bdeAddress = (uint32)(putPaddrLow((GET_PAYLOAD_PHYS_ADDR(fcptr) + sizeof(FCP_CMND)))); + cmd->un.fcpi.fcpi_rsp.bdeSize = sizeof(FCP_RSP); + cmd->ulpBdeCount = 2; + fcptr->bmp = 0; + temp->bpl = (uchar *)0; + } + + cmd->ulpContext = dev_ptr->nodep->rpi; + cmd->ulpIoTag = fcptr->iotag; + /* + * if device is FCP-2 device, set the following bit that says + * to run the FC-TAPE protocol. + */ + if (ndlp->id.nlp_fcp_info & NLP_FCP_2_DEVICE) { + cmd->ulpFCP2Rcvy = 1; + } + cmd->ulpClass = (ndlp->id.nlp_fcp_info & 0x0f); + cmd->ulpOwner = OWN_CHIP; + + if (sbp->timeout_value == 0) + sbp->timeout_value = 3600; /* One hour in seconds */ + + curtime(&fcptr->timeout); + + /* Need to set the FCP timeout in the fcptr structure and the IOCB + * for this I/O to get the adapter to run a timer. + */ + { + uint32 time_out; + + if(sbp->timeout_value) + time_out = sbp->timeout_value * fc_ticks_per_second; + else + time_out = 30 * fc_ticks_per_second; + + if (binfo->fc_flag & FC_FABRIC) { + time_out += (fc_ticks_per_second * + (clp[CFG_FCPFABRIC_TMO].a_current + (2 * binfo->fc_ratov))); + } + + fcptr->timeout = ((ulong)fcptr->timeout + time_out + (300 * fc_ticks_per_second)); + + /* Set the FCP timeout in the IOCB to get the adapter to run a timer */ + if ((time_out / fc_ticks_per_second) < 256) + cmd->ulpTimeout = time_out / fc_ticks_per_second; + } + + if (bp->b_bcount == 0) { + /* Set up for SCSI command */ + if (binfo->fc_flag & FC_SLI2) + cmd->ulpCommand = CMD_FCP_ICMND64_CR; + else + cmd->ulpCommand = CMD_FCP_ICMND_CR; + + if (((fcptr->fcp_cmd.fcpCdb[0] & 0xBF) == SCSI_RESERVE_UNIT) || + ((fcptr->fcp_cmd.fcpCdb[0] & 0xBF) == SCSI_RELEASE_UNIT)) { + /* Mask off the lun field for reserve/release commands */ + fcptr->fcp_cmd.fcpCdb[1] &= 0x1f; + } + if(bpl) { + bpl->addrHigh = 0; + bpl->addrLow = 0; + bpl->tus.w = 0; + } + cmd->un.fcpi.fcpi_parm = 0; + fcptr->fcp_cmd.fcpCntl3 = 0; + + cmd->ulpLe = 1; + /* Queue cmd chain to last iocb entry in xmit queue */ + if (rp->fc_tx.q_first == NULL) { + rp->fc_tx.q_first = (uchar * )temp; + } else { + ((IOCBQ * )(rp->fc_tx.q_last))->q = (uchar * )temp; + } + rp->fc_tx.q_last = (uchar * )temp; + rp->fc_tx.q_cnt++; + + } else if (bp->b_flags & B_READ) { + /* Set up for SCSI read */ + if (binfo->fc_flag & FC_SLI2) + cmd->ulpCommand = CMD_FCP_IREAD64_CR; + else + cmd->ulpCommand = CMD_FCP_IREAD_CR; + cmd->ulpPU = PARM_READ_CHECK; + cmd->un.fcpi.fcpi_parm = bp->b_bcount; + fcptr->fcp_cmd.fcpCntl3 = READ_DATA; + if((rc = fc_fcp_bufmap(p_dev_ctl, sbp, fcptr, temp, bpl, dev_ptr, pend)) != 0) + return(rc); + } else { + /* Set up for SCSI write */ + if (binfo->fc_flag & FC_SLI2) + cmd->ulpCommand = CMD_FCP_IWRITE64_CR; + else + cmd->ulpCommand = CMD_FCP_IWRITE_CR; + fcptr->fcp_cmd.fcpCntl3 = WRITE_DATA; + if((rc = fc_fcp_bufmap(p_dev_ctl, sbp, fcptr, temp, bpl, dev_ptr, pend)) != 0) + return(rc); + } + + if(dev_ptr->nodep->flags & FC_FCP2_RECOVERY) + cmd->ulpFCP2Rcvy = 1; + + lp = (uint32 * ) & fcptr->fcp_cmd; + fc_enq_fcbuf_active(rp, fcptr); + + dev_ptr->active_io_count++; + dev_ptr->nodep->num_active_io++; + FCSTATCTR.fcpCmd++; + + return(0); +} /* End issue_fcp_cmd */ + + +_static_ int +fc_failio( + fc_dev_ctl_t * p_dev_ctl) +{ + FC_BRD_INFO * binfo; + node_t * node_ptr; + dvi_t * dev_ptr; + struct buf *bp, *nextbp; + int i; + + binfo = &BINFO; + + /* Clear the queues for one or more SCSI devices */ + for (i = 0; i < MAX_FC_TARGETS; i++) { + if ((node_ptr = binfo->device_queue_hash[i].node_ptr) != NULL) { + for (dev_ptr = node_ptr->lunlist; dev_ptr != NULL; + dev_ptr = dev_ptr->next) { + + dev_ptr->queue_state = HALTED; + fc_return_standby_queue(dev_ptr, + (uchar)((binfo->fc_flag & FC_BUS_RESET) ? EIO : EFAULT), 0); + + /* First send ABTS on outstanding I/Os in txp queue */ + fc_abort_fcp_txpq(binfo, dev_ptr); + + fc_fail_pendq(dev_ptr, (char)((binfo->fc_flag & FC_BUS_RESET) ? + EIO : EFAULT), 0); + + fc_fail_cmd(dev_ptr, (char)((binfo->fc_flag & FC_BUS_RESET) ? + EIO : EFAULT), 0); + + /* Call iodone for all the CLEARQ error bufs */ + fc_free_clearq(dev_ptr); + } + } + } + /* Call iodone for any commands that timed out previously */ + for (bp = p_dev_ctl->timeout_head; bp != NULL; ) { + nextbp = bp->av_forw; + bp->b_error = ETIMEDOUT; + bp->b_flags |= B_ERROR; + fc_do_iodone(bp); + bp = nextbp; + } + p_dev_ctl->timeout_head = NULL; + p_dev_ctl->timeout_count = 0; + return(0); +} + + +_static_ void +fc_return_standby_queue( + dvi_t * dev_ptr, + uchar status, + uint32 statistic) +{ + T_SCSIBUF * sp; + + /* It is possible to have IOs on the pending queue because + of the way the scheduler works. */ + + while ((sp = dev_ptr->standby_queue_head) != NULL) { + dev_ptr->standby_count--; + dev_ptr->standby_queue_head = (T_SCSIBUF *)sp->bufstruct.av_forw; + fc_do_iodone((struct buf *) sp); + } + dev_ptr->standby_queue_head = NULL; + dev_ptr->standby_queue_tail = NULL; +} + +/* + * Restart all devices for a given adapter. Should only be + * invoked at the conclusion of loop {re}discovery. + */ +_static_ int +fc_restart_all_devices( + fc_dev_ctl_t * p_dev_ctl) +{ + dvi_t * dev_ptr; + FC_BRD_INFO * binfo; + int i; + node_t * node_ptr; + + binfo = &BINFO; + + for (i = 0; i < MAX_FC_TARGETS; ++i) { + if ((node_ptr = binfo->device_queue_hash[i].node_ptr) != NULL) { + dev_ptr = node_ptr->lunlist; + while (dev_ptr) { + if ((dev_ptr->queue_state == RESTART_WHEN_READY) || + (dev_ptr->queue_state == HALTED)) { + fc_restart_device(dev_ptr); + } + + if (dev_ptr->nodep->rpi != 0xfffe) + dev_ptr->flags &= ~(NORPI_RESET_DONE | DONT_LOG_INVALID_RPI); + else + dev_ptr->flags &= ~DONT_LOG_INVALID_RPI; + fc_enq_wait(dev_ptr); + dev_ptr = dev_ptr->next; + } + } + } + return(0); +} /* End fc_restart_all_devices */ + +/* + * Restart a device by draining its standby queue. + */ +_static_ int +fc_restart_device( + dvi_t * dev_ptr) +{ + FC_BRD_INFO * binfo; + + binfo = &dev_ptr->nodep->ap->info; + if (binfo->fc_ffstate != FC_READY || + (dev_ptr->flags & (SCSI_TQ_CLEARING | CHK_SCSI_ABDR))) { + + dev_ptr->queue_state = RESTART_WHEN_READY; + return(0); + } + + dev_ptr->queue_state = ACTIVE; + dev_ptr->flags &= ~(SCSI_TQ_HALTED | CHK_SCSI_ABDR); + fc_return_standby_queue(dev_ptr, + (uchar)((binfo->fc_flag & FC_BUS_RESET) ? EIO : EFAULT), 0); + + return(1); +} /* End fc_restart_device */ + +/* Called to reissue fcp command if tgt throttle was reached */ +_static_ void +re_issue_fcp_cmd( + dvi_t * dev_ptr) +{ + fc_dev_ctl_t * ap; + dvi_t * next_ptr; + dvi_t * start_ptr; + T_SCSIBUF * sbp = NULL; + int rc; + FC_BRD_INFO * binfo; + RING * rp; + + if (dev_ptr == NULL) + return; + + ap = dev_ptr->nodep->ap; + binfo = &ap->info; + + rp = &binfo->fc_ring[FC_FCP_RING]; + + next_ptr = dev_ptr; + start_ptr = next_ptr->nodep->lunlist; + + if (start_ptr == NULL) + return; + + do { + + if ((sbp = next_ptr->pend_head) != NULL) + break; + + next_ptr = next_ptr->next; + if (!next_ptr) + next_ptr = start_ptr; + } while ( next_ptr != dev_ptr ); + + if (! sbp) { + next_ptr->nodep->last_dev = NULL; + return; + } + + if ((rc = issue_fcp_cmd(ap, next_ptr, sbp, 1))) { + if ((rc & FCP_REQUEUE) || (rc & FCP_EXIT)) + return; + } + next_ptr->pend_count--; + next_ptr->pend_head = (T_SCSIBUF *) sbp->bufstruct.av_forw; + if (next_ptr->pend_head == NULL) + next_ptr->pend_tail = NULL; + else + next_ptr->pend_head->bufstruct.av_back = NULL; + + if (next_ptr->pend_count == 0) + fc_deq_wait(next_ptr); + + next_ptr->nodep->last_dev = next_ptr->next; + if (next_ptr->nodep->last_dev == NULL) + next_ptr->nodep->last_dev = next_ptr->nodep->lunlist; + + if (rp->fc_tx.q_cnt) + issue_iocb_cmd(binfo, rp, 0); + + return; +} /* End re_issue_fcp_cmd */ + +/* Find a SCSI device structure for a given LUN */ +_static_ dvi_t * +fc_find_lun( +FC_BRD_INFO *binfo, +int hash_index, +fc_lun_t lun) +{ + node_t * node_ptr; + dvi_t * dev_ptr; + + if ((hash_index < 0) || (hash_index > MAX_FC_TARGETS)) + return(NULL); + + node_ptr = binfo->device_queue_hash[hash_index].node_ptr; + + if (node_ptr == NULL) { + dev_ptr = NULL; + } else { + for (dev_ptr = node_ptr->lunlist; dev_ptr != NULL; + dev_ptr = dev_ptr->next) { + + if (dev_ptr->lun_id == lun) { + /* We found the correct entry */ + break; + } + } + } + return(dev_ptr); +} /* End fc_find_lun */ + +_static_ int +fc_reset_dev_q_depth( + fc_dev_ctl_t * p_dev_ctl) +{ + dvi_t * dev_ptr; + FC_BRD_INFO * binfo; + int i; + iCfgParam * clp; + node_t * node_ptr; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + for (i = 0; i < MAX_FC_TARGETS; ++i) { + if ((node_ptr = binfo->device_queue_hash[i].node_ptr) != NULL) { + dev_ptr = node_ptr->lunlist; + while (dev_ptr) { + dev_ptr->fcp_cur_queue_depth = (ushort)clp[CFG_DFT_LUN_Q_DEPTH].a_current; + dev_ptr = dev_ptr->next; + } + } + } + return(0); +} /* End fc_reset_dev_q_depth */ + + +/* [SYNC] */ +_static_ void +fc_polling( + FC_BRD_INFO *binfo, + uint32 att_bit) +{ + volatile uint32 ha_copy; + void *ioa; + fc_dev_ctl_t * p_dev_ctl; + + p_dev_ctl = (fc_dev_ctl_t *)binfo->fc_p_dev_ctl; + do { + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + ha_copy = READ_CSR_REG(binfo, FC_HA_REG(binfo, ioa)); + FC_UNMAP_MEMIO(ioa); + if (ha_copy & att_bit) + break; + } while (1); + fc_intr((struct intr *)p_dev_ctl); +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/fcxmitb.c 999-mjb/drivers/scsi/lpfc/fcxmitb.c --- 000-virgin/drivers/scsi/lpfc/fcxmitb.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/fcxmitb.c 2003-11-25 14:18:44.000000000 -0800 @@ -0,0 +1,1442 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#include "fc_os.h" + +#include "fc_hw.h" +#include "fc.h" + +#include "fcdiag.h" +#include "fcfgparm.h" +#include "fcmsg.h" +#include "fc_crtn.h" /* Core - external routine definitions */ +#include "fc_ertn.h" /* Environment - external routine definitions */ + +extern fc_dd_ctl_t DD_CTL; +extern iCfgParam icfgparam[]; +extern int lpfc_nethdr; + +/* Routine Declaration - Local */ +_local_ int fc_mbuf_to_iocb(fc_dev_ctl_t *p_dev_ctl, fcipbuf_t *p_mbuf); +_local_ fcipbuf_t *fc_txq_put(fc_dev_ctl_t *p_dev_ctl, RING *rp, + fcipbuf_t *p_mbuf); +/* End Routine Declaration - Local */ + +/*****************************************************************************/ +/* + * NAME: fc_ringtx_put + * + * FUNCTION: put xmit iocb onto the ring transmit queue. + * + * EXECUTION ENVIRONMENT: process and interrupt level. + * + * CALLED FROM: + * fc_els_cmd + * + * INPUT: + * binfo - pointer to the device info area + * iocbq - pointer to iocbq entry of xmit iocb + * + * RETURNS: + * none + */ +/*****************************************************************************/ +_static_ void +fc_ringtx_put( +RING *rp, +IOCBQ *iocbq) /* pointer to iocbq entry */ +{ + FC_BRD_INFO * binfo; + + binfo = (FC_BRD_INFO * )rp->fc_binfo; + if (rp->fc_tx.q_first) { + ((IOCBQ * )rp->fc_tx.q_last)->q = (uchar * )iocbq; + rp->fc_tx.q_last = (uchar * )iocbq; + } else { + rp->fc_tx.q_first = (uchar * )iocbq; + rp->fc_tx.q_last = (uchar * )iocbq; + } + + iocbq->q = NULL; + rp->fc_tx.q_cnt++; + + return; + +} /* End fc_ringtx_put */ + + +/*****************************************************************************/ +/* + * NAME: fc_ringtx_get + * + * FUNCTION: get a packet off the ring transmit queue. + * + * EXECUTION ENVIRONMENT: interrupt level. + * + * CALLED FROM: + * fc_els_cmd + * + * INPUT: + * rp - pointer to the ring to get an iocb from + * + * RETURNS: + * NULL - no iocbs found + * iocb pointer - pointer to an iocb to transmit + */ +/*****************************************************************************/ +_static_ IOCBQ * +fc_ringtx_get( +RING *rp) +{ + FC_BRD_INFO * binfo; + NODELIST * nlp; + IOCBQ * p_first = NULL; + IOCBQ * prev = NULL; + uchar * daddr; + ushort xri; + + binfo = (FC_BRD_INFO * )rp->fc_binfo; + if (rp->fc_tx.q_first) { + p_first = (IOCBQ * )rp->fc_tx.q_first; + + /* Make sure we already have a login and exchange to the remote node */ + while (p_first->iocb.ulpCommand == 0) { + if (rp->fc_ringno == FC_IP_RING) { + NETHDR * np; + + /* check to see if nlplist entry exists yet */ + np = (NETHDR * )(fcdata(((fcipbuf_t * )(p_first->bp)))); + daddr = np->fc_destname.IEEE; + if ((xri = fc_emac_lookup(binfo, daddr, &nlp))) { + /* exchange to destination already exists */ + if (binfo->fc_flag & FC_SLI2) + p_first->iocb.ulpCommand = CMD_XMIT_SEQUENCE64_CX; + else + p_first->iocb.ulpCommand = CMD_XMIT_SEQUENCE_CX; + p_first->iocb.ulpContext = xri; + p_first->info = (uchar * )nlp; + break; + } + } + + /* loop past continuation iocbs */ + while (p_first->iocb.ulpLe == 0) { + prev = p_first; + if ((p_first = (IOCBQ * )p_first->q) == 0) { + return(0); + } + } + prev = p_first; + if ((p_first = (IOCBQ * )p_first->q) == 0) { + return(0); + } + } + + /* adjust last if necessary */ + if (p_first->q == 0) { + rp->fc_tx.q_last = (uchar * )prev; + } + + /* remove iocb chain to process */ + if (prev == 0) { + rp->fc_tx.q_first = p_first->q; + } else { + prev->q = (uchar * )p_first->q; + } + + p_first->q = NULL; + rp->fc_tx.q_cnt--; + } + return(p_first); + +} /* End fc_ringtx_get */ + + +/*****************************************************************************/ +/* + * NAME: fc_ringtx_drain + * + * FUNCTION: get all packets off the ring transmit queue. + * + * EXECUTION ENVIRONMENT: interrupt level. + * + * NOTES: + * + * CALLED FROM: + * fc_els_cmd + * + * INPUT: + * binfo - pointer to the device info area + * + * RETURNS: + * NULL - no match found + * mbuf pointer - pointer to a mbuf chain which contains a packet. + */ +/*****************************************************************************/ +_static_ IOCBQ * +fc_ringtx_drain( +RING *rp) +{ + FC_BRD_INFO * binfo; + IOCBQ * p_first; + IOCBQ * prev; + + binfo = (FC_BRD_INFO * )rp->fc_binfo; + p_first = (IOCBQ * )rp->fc_tx.q_first; + if (p_first) { + prev = (IOCBQ * )p_first->q; + + /* remove iocb chain to process */ + if (prev == 0) { + rp->fc_tx.q_first = 0; + rp->fc_tx.q_last = 0; + } else { + rp->fc_tx.q_first = (uchar * )prev; + } + + p_first->q = NULL; + rp->fc_tx.q_cnt--; + } + + return(p_first); + +} /* End fc_ringtx_drain */ + + + + +/*****************************************************************************/ +/* + * NAME: fc_ringtxp_put + * + * FUNCTION: put xmit iocb onto the ring pending queue. + * + * EXECUTION ENVIRONMENT: process and interrupt level. + * + * CALLED FROM: + * fc_elsp_cmd + * + * INPUT: + * rp - pointer to the ring + * iocbq - pointer to iocbq entry of xmit iocb + * + * RETURNS: + * none + */ +/*****************************************************************************/ +_static_ void +fc_ringtxp_put( +RING *rp, +IOCBQ *iocbq) /* pointer to iocbq entry */ +{ + fc_dev_ctl_t * p_dev_ctl; + FC_BRD_INFO * binfo; + unsigned long iflag; + + binfo = (FC_BRD_INFO * )rp->fc_binfo; + p_dev_ctl = (fc_dev_ctl_t *)binfo->fc_p_dev_ctl; + + iflag = lpfc_q_disable_lock(p_dev_ctl); + if (rp->fc_txp.q_first) { + ((IOCBQ * )rp->fc_txp.q_last)->q = (uchar * )iocbq; + rp->fc_txp.q_last = (uchar * )iocbq; + } else { + rp->fc_txp.q_first = (uchar * )iocbq; + rp->fc_txp.q_last = (uchar * )iocbq; + + /* start watchdog timer on first xmit only */ + if (rp->fc_ringno != FC_FCP_RING) { + lpfc_q_unlock_enable(p_dev_ctl, iflag); + RINGTMO = fc_clk_set((fc_dev_ctl_t *)(binfo->fc_p_dev_ctl), + rp->fc_ringtmo, fc_cmdring_timeout, (void *)rp, 0); + iflag = lpfc_q_disable_lock(p_dev_ctl); + } + } + + iocbq->q = NULL; + rp->fc_txp.q_cnt++; + + lpfc_q_unlock_enable(p_dev_ctl, iflag); + return; + +} /* End fc_ringtxp_put */ + + +/*****************************************************************************/ +/* + * NAME: fc_ringtxp_get + * + * FUNCTION: get a packet off the ring pending queue. + * + * EXECUTION ENVIRONMENT: interrupt level. + * + * CALLED FROM: + * fc_els_cmd + * + * INPUT: + * rp - pointer to the ring + * + * RETURNS: + * NULL - no match found + * iocbq pointer - pointer to iocbq which matches the iotag + */ +/*****************************************************************************/ +_static_ IOCBQ * +fc_ringtxp_get( +RING *rp, +ushort iotag) /* tag to match i/o */ +{ + fc_dev_ctl_t * p_dev_ctl; + FC_BRD_INFO * binfo; + IOCBQ * iocbq; /* pointer to iocbq entry */ + IOCBQ * pq; /* pointer to previous iocbq entry */ + IOCBQ * save; /* pointer to iocb entry of chain */ + unsigned long iflag; + + binfo = (FC_BRD_INFO * )rp->fc_binfo; + p_dev_ctl = (fc_dev_ctl_t *)binfo->fc_p_dev_ctl; + pq = 0; + save = 0; + + /* Right now this just loops through the linked list looking + * for a match on iotag. This can get optimized in the future + * to have iotag just index into an array. + */ + iflag = lpfc_q_disable_lock(p_dev_ctl); + iocbq = (IOCBQ * )(rp->fc_txp.q_first); + while (iocbq) { + /* do we match on iotag */ + if ((iocbq->iocb.ulpIoTag == iotag) || (iotag == 0)) { + /* loop past continuation iocbs */ + while (iocbq->iocb.ulpLe == 0) { + rp->fc_txp.q_cnt--; + save = iocbq; + if ((iocbq = (IOCBQ * )iocbq->q) == 0) { + iocbq = save; + break; + } + } + save = iocbq; + iocbq = (IOCBQ * )iocbq->q; + + save->q = 0; /* NULL terminate iocb chain */ + + /* Remove iocbq chain from list, adjust first, last and cnt */ + if (iocbq == 0) + rp->fc_txp.q_last = (uchar * )pq; + + if (pq) { + save = (IOCBQ * )pq->q; + pq->q = (uchar * )iocbq; + } else { + save = (IOCBQ * )rp->fc_txp.q_first; + rp->fc_txp.q_first = (uchar * )iocbq; + } + rp->fc_txp.q_cnt--; + + /* stop watchdog timer */ + if(RINGTMO) { + lpfc_q_unlock_enable(p_dev_ctl, iflag); + fc_clk_can((fc_dev_ctl_t *)(binfo->fc_p_dev_ctl), RINGTMO); + iflag = lpfc_q_disable_lock(p_dev_ctl); + RINGTMO = 0; + } + + /* if xmits are still pending, restart the watchdog timer */ + if (rp->fc_txp.q_cnt > 0) { + /* start watchdog timer */ + if (rp->fc_ringno != FC_FCP_RING) { + lpfc_q_unlock_enable(p_dev_ctl, iflag); + RINGTMO = fc_clk_set((fc_dev_ctl_t *)(binfo->fc_p_dev_ctl), + rp->fc_ringtmo, fc_cmdring_timeout, (void *)rp, 0); + iflag = lpfc_q_disable_lock(p_dev_ctl); + } + } + break; + } + + pq = iocbq; + iocbq = (IOCBQ * )iocbq->q; + } + + lpfc_q_unlock_enable(p_dev_ctl, iflag); + return(save); +} /* End fc_ringtxp_get */ + + +/*****************************************************************************/ +/* + * NAME: fc_xmit + * + * FUNCTION: Fibre Channel driver output routine. + * + * EXECUTION ENVIRONMENT: process only + * + * NOTES: + * + * CALLED FROM: + * fc_output fc_intr + * + * INPUT: + * p_dev_ctl - pointer to device information. + * p_mbuf - pointer to a mbuf (chain) for outgoing packets + * + * RETURNS: + * 0 - successful + * EAGAIN - transmit queue is full + */ +/*****************************************************************************/ +int +fc_xmit( +fc_dev_ctl_t *p_dev_ctl, +fcipbuf_t *p_mbuf) +{ + fcipbuf_t * p_cur_mbuf; + fcipbuf_t * buf_tofree; + RING * rp; + FC_BRD_INFO * binfo; + iCfgParam * clp; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + if(clp[CFG_NETWORK_ON].a_current == 0) + return(EIO); + + rp = &binfo->fc_ring[FC_IP_RING]; + buf_tofree = fc_txq_put(p_dev_ctl, rp, p_mbuf); + if (NDDSTAT.ndd_xmitque_max < rp->fc_tx.q_cnt) { + NDDSTAT.ndd_xmitque_max = rp->fc_tx.q_cnt; + } + + /* xmit queue was totally full */ + if (buf_tofree == p_mbuf) { + while (p_mbuf) { + NDDSTAT.ndd_xmitque_ovf++; + NDDSTAT.ndd_opackets_drop++; + p_mbuf = fcnextpkt(p_mbuf); + } + + /* send the packet(s) on the xmit queue */ + issue_iocb_cmd(binfo, rp, 0); + + return(EAGAIN); + } + + /* xmit queue could not fit entire chain */ + while ((p_cur_mbuf = buf_tofree) != NULL) { + NDDSTAT.ndd_xmitque_ovf++; + NDDSTAT.ndd_opackets_drop++; + buf_tofree = fcnextpkt(buf_tofree); + fcnextpkt(p_cur_mbuf) = NULL; + m_freem(p_cur_mbuf); + } + + /* send the packet(s) on the xmit queue */ + issue_iocb_cmd(binfo, rp, 0); + + return(0); +} /* End fc_xmit */ + + +/*****************************************************************************/ +/* + * NAME: fc_txq_put + * + * FUNCTION: put packets onto the transmit queue. + * + * EXECUTION ENVIRONMENT: process and interrupt level. + * + * NOTES: + * + * CALLED FROM: + * fc_xmit + * + * INPUT: + * p_dev_ctl - pointer to the device information area + * rp - pointer to the device information area + * p_mbuf - pointer to a mbuf chain + * + * RETURNS: + * NULL - all mbufs are queued. + * mbuf pointer - point to a mbuf chain which contains packets + * that overflows the transmit queue. + */ +/*****************************************************************************/ +_local_ fcipbuf_t * +fc_txq_put( +fc_dev_ctl_t *p_dev_ctl, +RING *rp, +fcipbuf_t *p_mbuf) /* pointer to a mbuf chain */ +{ + FC_BRD_INFO * binfo; + fcipbuf_t * p_last, *p_over, *p_next; + int room; + + room = rp->fc_tx.q_max - NDDSTAT.ndd_xmitque_cur; + binfo = &BINFO; + if (room > 0) { + p_over = 0; + p_next = p_mbuf; + while (p_next) { + p_last = fcnextpkt(p_next); + fcnextpkt(p_next) = NULL; + if (fc_mbuf_to_iocb(p_dev_ctl, p_next)) { + fcnextpkt(p_next) = p_last; + p_over = p_next; + break; + } + p_next = p_last; + if ( --room <= 0) { + p_over = p_next; + break; + } + } + binfo->fc_flag &= ~FC_NO_ROOM_IP; + } else { + FCSTATCTR.xmitnoroom++; + p_over = p_mbuf; + + if(!(binfo->fc_flag & FC_NO_ROOM_IP)) { + /* No room on IP xmit queue */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0605, /* ptr to msg structure */ + fc_mes0605, /* ptr to msg */ + fc_msgBlk0605.msgPreambleStr, /* begin varargs */ + FCSTATCTR.xmitnoroom); /* end varargs */ + } + binfo->fc_flag |= FC_NO_ROOM_IP; + } + + return(p_over); + +} /* End fc_txq_put */ + + + +/*****************************************************************************/ +/* + * NAME: fc_mbuf_to_iocb + * + * FUNCTION: converts and mbuf into an iocb cmd chain and put on transmit q + * + * EXECUTION ENVIRONMENT: process and interrupt + * + * NOTES: + * + * CALLED FROM: + * + * INPUT: + * p_dev_ctl - pointer to the device information area + * p_mbuf - pointer to a packet in mbuf + * + * RETURNS: + * 0 - OK + * -1 - error occurred during transmit + */ +/*****************************************************************************/ +_local_ int +fc_mbuf_to_iocb( +fc_dev_ctl_t *p_dev_ctl, +fcipbuf_t *p_mbuf) /* pointer to the packet in mbuf */ +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + uchar * daddr; + RING * rp; + IOCBQ * temp; + IOCBQ * qhead, * qtail; + IOCB * cmd; + NODELIST * nlp; + fcipbuf_t * p_cur_mbuf; /* pointer to current packet in mbuf */ + fcipbuf_t * m_net; + ushort * sp1, * sp2; + ULP_BDE64 * bpl, * topbpl; + MATCHMAP * bmp; + MATCHMAP * bmphead, *bmptail; + MATCHMAP * savebmp; + void * handle; + emac_t * ep; + NETHDR * np; + int i, j, mapcnt; + int count, firstbuflen; + int num_iocbs, num_bdes, numble; + ushort leftover, xri; + uchar isbcast, ismcast; + + binfo = &BINFO; + rp = &binfo->fc_ring[FC_IP_RING]; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + /* First get a temporary iocb buffers. temp will be + * used for the first iocb entry XMIT_SEQUENCE, and will + * be used for each successive IOCB_CONTINUE entry. + * qhead will be saved for the return + */ + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB)) == 0) { + m_freem(p_mbuf); + return(0); + } + + fc_bzero((void *)temp, sizeof(IOCBQ)); /* initially zero the iocb entry */ + cmd = &temp->iocb; + mapcnt = 0; + numble = 0; + qhead = 0; + qtail = 0; + leftover = 0; + bmp = 0; + topbpl = 0; + if (binfo->fc_flag & FC_SLI2) { + bmphead = 0; + bmptail = 0; + /* Allocate buffer for Buffer ptr list */ + if ((bmp = (MATCHMAP * )fc_mem_get(binfo, MEM_BPL)) == 0) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + m_freem(p_mbuf); + return(0); + } + bpl = (ULP_BDE64 * )bmp->virt; + cmd->un.xseq64.bdl.ulpIoTag32 = (uint32)0; + cmd->un.xseq64.bdl.addrHigh = (uint32)putPaddrHigh(bmp->phys); + cmd->un.xseq64.bdl.addrLow = (uint32)putPaddrLow(bmp->phys); + cmd->un.xseq64.bdl.bdeFlags = BUFF_TYPE_BDL; + temp->bpl = (uchar *)bmp; + } + else { + bpl = 0; + bmphead = 0; + bmptail = 0; + } + + if(lpfc_nethdr == 0) { + ep = (emac_t * )(fcdata(p_mbuf)); + daddr = ep->dest_addr; + + /* We need to convert 802.3 header (14 bytes) into + * fc network header (16 bytes). Since the header is at + * the begining of the buffer, we need to allocate extra space. + */ + + count = fcpktlen(p_mbuf) + 2; /* total data in mbuf after copy */ + firstbuflen = fcdatalen(p_mbuf); + /* Assume first data buffer holds emac and LLC/SNAP at a minimun */ + if (firstbuflen < sizeof(struct fc_hdr )) { + FCSTATCTR.mbufcopy++; + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + if (bmp) { + fc_mem_put(binfo, MEM_BPL, (uchar * ) bmp); + } + m_freem(p_mbuf); + return(0); + } + + + /* Allocate a buffer big enough to hold the Fibre Channel header + * and the LLC/SNAP header. + */ + if ((m_net = (fcipbuf_t * )m_getclustm(M_DONTWAIT, MT_DATA, + (sizeof(NETHDR) + sizeof(snaphdr_t)))) == 0) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + if (bmp) { + fc_mem_put(binfo, MEM_BPL, (uchar * ) bmp); + } + return(EIO); + } + fcsethandle(m_net, 0); + + np = (NETHDR * )fcdata(m_net); + + /* Copy data from emac_t header to network header */ + sp1 = (ushort * ) & np->fc_destname; + *sp1++ = 0; + np->fc_destname.nameType = NAME_IEEE; /* IEEE name */ + sp2 = (ushort * )ep->dest_addr; + + if (*sp2 & SWAP_DATA16(0x8000)) /* Check for multicast */ { + ismcast = 1; + if (*sp2 != 0xffff) /* Check for broadcast */ + isbcast = 0; + else + isbcast = 1; + } else { + ismcast = 0; + isbcast = 0; + } + + /* First copy over the dest IEEE address */ + *sp1++ = *sp2++; + if (isbcast && (*sp2 != 0xffff)) + isbcast = 0; + *sp1++ = *sp2++; + if (isbcast && (*sp2 != 0xffff)) + isbcast = 0; + *sp1++ = *sp2++; + + /* Next copy over the src IEEE address */ + sp1 = (ushort * ) & np->fc_srcname; + *sp1++ = 0; + np->fc_srcname.nameType = NAME_IEEE; /* IEEE name */ + sp2 = (ushort * )binfo->fc_portname.IEEE; + *sp1++ = *sp2++; + *sp1++ = *sp2++; + *sp1++ = *sp2++; + + sp2 = (ushort * )((uchar *)ep + sizeof(emac_t)); + + /* Now Copy LLC/SNAP */ + *sp1++ = *sp2++; + *sp1++ = *sp2++; + *sp1++ = *sp2++; + *sp1++ = *sp2++; + + p_cur_mbuf = m_net; + fcsetdatalen(m_net, (sizeof(NETHDR) + sizeof(snaphdr_t))); + + fcincdatalen(p_mbuf, (-(sizeof(struct fc_hdr )))); + + fcdata(p_mbuf) += sizeof(struct fc_hdr ); + + /* Fixup mbuf chain so data is in line */ + fcnextdata(m_net) = p_mbuf; + } + else { + np = (NETHDR * )(fcdata(((fcipbuf_t * )(p_mbuf)))); + daddr = np->fc_destname.IEEE; + count = fcpktlen(p_mbuf); + p_cur_mbuf = p_mbuf; + m_net = p_mbuf; + + sp2 = (ushort * )daddr; + if (*sp2 & SWAP_DATA16(0x8000)) /* Check for multicast */ { + ismcast = 1; + if (*sp2 != 0xffff) /* Check for broadcast */ + isbcast = 0; + else + isbcast = 1; + } else { + ismcast = 0; + isbcast = 0; + } + } + + num_iocbs = 0; /* count number of iocbs needed to xmit p_mbuf */ + num_bdes = 2; /* Will change to 3 for IOCB_CONTINUE */ + nlp = 0; + + /* + * While there's data left to send and we are not at the end of + * the mbuf chain, put the data from each mbuf in the chain into + * a seperate iocb entry. + */ + while (count && p_cur_mbuf) { + if (binfo->fc_flag & FC_SLI2) { + qhead = temp; + qtail = temp; + /* Set to max number of ULP_BDE64's that fit into a bpl */ + /* Save the last BDE for a continuation ptr, if needed */ + num_bdes = ((FCELSSIZE / sizeof(ULP_BDE64)) - 1); + numble = 0; + if (bmphead == 0) { + bmphead = bmp; + bmptail = bmp; + } else { + bmptail->fc_mptr = (uchar * )bmp; + bmptail = bmp; + } + bmp->fc_mptr = 0; + } else { + if (qhead == 0) { + qhead = temp; + qtail = temp; + } else { + qtail->q = (uchar * )temp; + qtail = temp; + } + } + temp->q = 0; + /* + * copy data pointers into iocb entry + */ + for (i = 0; i < num_bdes; i++) { + /* Skip mblk's with 0 data length */ + while (p_cur_mbuf && (fcdatalen(p_cur_mbuf) == 0)) + p_cur_mbuf = fcnextdata(p_cur_mbuf); /* goto next mbuf in chain */ + + if ((count <= 0) || (p_cur_mbuf == 0)) + break; + + if (leftover == 0) { + mapcnt = fc_bufmap(p_dev_ctl, (uchar * )(fcdata(p_cur_mbuf)), + (uint32)fcdatalen(p_cur_mbuf), binfo->physaddr, binfo->cntaddr, &handle); + + /* fill in BDEs for command */ + if (mapcnt <= 0) { + cmd->ulpBdeCount = i; + goto out; + } + + /* Save dmahandle if one was returned */ + fcsethandle(p_cur_mbuf, handle); + } + + for (j = leftover; j < mapcnt; j++) { + if ((i + j - leftover) >= num_bdes) { + i = num_bdes; + leftover = j; + goto lim; + } + if (binfo->fc_flag & FC_SLI2) { + bpl->addrHigh = (uint32)putPaddrHigh(binfo->physaddr[j]); + bpl->addrHigh = PCIMEM_LONG(bpl->addrHigh); + bpl->addrLow = (uint32)putPaddrLow(binfo->physaddr[j]); + bpl->addrLow = PCIMEM_LONG(bpl->addrLow); + bpl->tus.f.bdeSize = binfo->cntaddr[j]; + bpl->tus.f.bdeFlags = BDE64_SIZE_WORD; + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + bpl++; + numble++; + } else { + cmd->un.cont[i+j-leftover].bdeAddress = (uint32)putPaddrLow(binfo->physaddr[j]); + cmd->un.cont[i+j-leftover].bdeSize = binfo->cntaddr[j]; + cmd->un.cont[i+j-leftover].bdeAddrHigh = 0; + cmd->un.cont[i+j-leftover].bdeReserved = 0; + } + } + + i = i + j - leftover - 1; + count -= fcdatalen(p_cur_mbuf); /* adjust count of data left */ + leftover = 0; + p_cur_mbuf = fcnextdata(p_cur_mbuf); /* goto next mbuf in chain */ + } + +lim: + /* Fill in rest of iocb entry, all non-zero fields */ + + cmd->ulpBdeCount = i; + + /* Setup command to use accordingly */ + if (++num_iocbs > 1) { + if (!(binfo->fc_flag & FC_SLI2)) { + cmd->ulpCommand = CMD_IOCB_CONTINUE_CN; + temp->bp = 0; + temp->info = 0; + } + } else { + /* set up an iotag so we can match the completion to an iocb/mbuf */ + cmd->ulpIoTag = rp->fc_iotag++; + if (rp->fc_iotag == 0) { + rp->fc_iotag = 1; + } + + /* Setup fibre channel header information */ + cmd->un.xrseq.w5.hcsw.Fctl = 0; + cmd->un.xrseq.w5.hcsw.Dfctl = FC_NET_HDR; /* network headers */ + cmd->un.xrseq.w5.hcsw.Rctl = FC_UNSOL_DATA; + cmd->un.xrseq.w5.hcsw.Type = FC_LLC_SNAP; + + if (isbcast) { + if (++NDDSTAT.ndd_ifOutBcastPkts_lsw == 0) + NDDSTAT.ndd_ifOutBcastPkts_msw++; + if (binfo->fc_flag & FC_SLI2) + cmd->ulpCommand = CMD_XMIT_BCAST64_CN; + else + cmd->ulpCommand = CMD_XMIT_BCAST_CN; + cmd->ulpContext = 0; + nlp = 0; + } else if (ismcast) { + if (++NDDSTAT.ndd_ifOutMcastPkts_lsw == 0) + NDDSTAT.ndd_ifOutMcastPkts_msw++; + if (binfo->fc_flag & FC_SLI2) + cmd->ulpCommand = CMD_XMIT_BCAST64_CN; + else + cmd->ulpCommand = CMD_XMIT_BCAST_CN; + cmd->ulpContext = 0; + nlp = 0; + } else { + if (++NDDSTAT.ndd_ifOutUcastPkts_lsw == 0) + NDDSTAT.ndd_ifOutUcastPkts_msw++; + + /* data from upper layer has a full MAC header on it. We + * need to match the destination address with the portname + * field in our nlp table to determine if we already have an + * exchange opened to this destination. + */ + if (((xri = fc_emac_lookup(binfo, daddr, &nlp)) != 0) && + !(nlp->nlp_action & NLP_DO_RSCN) && + (nlp->nlp_bp == 0)) { + /* exchange to destination already exists */ + if (binfo->fc_flag & FC_SLI2) + cmd->ulpCommand = CMD_XMIT_SEQUENCE64_CX; + else + cmd->ulpCommand = CMD_XMIT_SEQUENCE_CX; + cmd->ulpContext = xri; + nlp->nlp_type |= NLP_IP_NODE; + } else { /* need to wait for exchange to destination */ + FCSTATCTR.frameXmitDelay++; + cmd->ulpCommand = 0; + cmd->ulpContext = 0; + + if ((binfo->fc_flag & FC_LNK_DOWN) || + (binfo->fc_ffstate < rp->fc_xmitstate)) + goto out; + + if (nlp == 0) { + /* A partial entry doesn't even exist, so initiate + * ELS login by sending a FARP + */ + /* Add FARP code here */ + fc_els_cmd(binfo, ELS_CMD_FARP, (void *)daddr, + (uint32)0, (ushort)0, (NODELIST *)0); + } else { + if ((nlp->nlp_DID != Bcast_DID) && + !(nlp->nlp_action & NLP_DO_ADDR_AUTH) && + !(nlp->nlp_action & NLP_DO_RSCN) && + !(nlp->nlp_flag & (NLP_FARP_SND | NLP_REQ_SND | NLP_RPI_XRI))) { + /* If a cached entry exists, PLOGI first */ + if ((nlp->nlp_state == NLP_LIMBO) || + (nlp->nlp_state == NLP_LOGOUT)) { + fc_els_cmd(binfo, ELS_CMD_PLOGI, + (void *)((ulong)nlp->nlp_DID), (uint32)0, (ushort)0, nlp); + } + /* establish a new exchange */ + if ((nlp->nlp_Rpi) && (nlp->nlp_Xri == 0)) { + nlp->nlp_flag |= NLP_RPI_XRI; + fc_create_xri(binfo, &binfo->fc_ring[FC_ELS_RING], nlp); + } + } + } + + cmd = &temp->iocb; + if (binfo->fc_flag & FC_SLI2) { + while (bpl && (bpl != (ULP_BDE64 * )bmp->virt)) { + bpl--; + fc_bufunmap(p_dev_ctl, + (uchar *)getPaddr(bpl->addrHigh, bpl->addrLow), 0, bpl->tus.f.bdeSize); + } + if (bmp) { + fc_mem_put(binfo, MEM_BPL, (uchar * ) bmp); + } + } else { + for (i = 0; i < (int)cmd->ulpBdeCount; i++) { + fc_bufunmap(p_dev_ctl, (uchar *)((ulong)cmd->un.cont[i].bdeAddress), 0, (uint32)cmd->un.cont[i].bdeSize); + } + } + if(lpfc_nethdr == 0) { + /* Free Resources */ + fcnextdata(m_net) = 0; + fcfreehandle(p_dev_ctl, m_net); + m_freem(m_net); + + /* Put p_mbuf back the way it was, without NETHDR */ + fcincdatalen(p_mbuf, sizeof(struct fc_hdr )); + fcdata(p_mbuf) -= sizeof(struct fc_hdr ); + } + + fcfreehandle(p_dev_ctl, p_mbuf); + + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + + /* save buffer till ELS login completes */ + + if (nlp == 0) { + m_freem(p_mbuf); + return(0); + } + + if (nlp->nlp_bp == 0) { + nlp->nlp_bp = (uchar * )p_mbuf; + } else { + /* Only keep one mbuf chain per node "on deck" */ + p_cur_mbuf = (fcipbuf_t * )nlp->nlp_bp; + nlp->nlp_bp = (uchar * )p_mbuf; + m_freem(p_cur_mbuf); + } + return(0); + } + cmd->ulpClass = nlp->id.nlp_ip_info; + } + + num_bdes = 3; /* in case IOCB_CONTINUEs are needed */ + temp->bp = (uchar * )m_net; + temp->info = (uchar * )nlp; + } + + cmd->ulpOwner = OWN_CHIP; + + /* is this the last iocb entry we will need */ + if ((count == 0) || (p_cur_mbuf == 0)) { + temp = 0; + cmd->ulpLe = 1; + /* if so queue cmd chain to last iocb entry in xmit queue */ + if (rp->fc_tx.q_first == 0) { + rp->fc_tx.q_first = (uchar * )qhead; + rp->fc_tx.q_last = (uchar * )qtail; + } else { + ((IOCBQ * )(rp->fc_tx.q_last))->q = (uchar * )qhead; + rp->fc_tx.q_last = (uchar * )qtail; + } + rp->fc_tx.q_cnt += num_iocbs; + NDDSTAT.ndd_xmitque_cur++; + break; + } else { + cmd->ulpLe = 0; + } + + /* get another iocb entry buffer */ + if (binfo->fc_flag & FC_SLI2) { + /* Allocate buffer for Buffer ptr list */ + if ((bmp = (MATCHMAP * )fc_mem_get(binfo, MEM_BPL)) == 0) { + goto out; + } + /* Fill in continuation entry to next bpl */ + bpl->addrHigh = (uint32)putPaddrHigh(bmp->phys); + bpl->addrHigh = PCIMEM_LONG(bpl->addrHigh); + bpl->addrLow = (uint32)putPaddrLow(bmp->phys); + bpl->addrLow = PCIMEM_LONG(bpl->addrLow); + bpl->tus.f.bdeFlags = BPL64_SIZE_WORD; + numble++; + if (num_iocbs == 1) { + cmd->un.xseq64.bdl.bdeSize = (numble * sizeof(ULP_BDE64)); + } else { + topbpl->tus.f.bdeSize = (numble * sizeof(ULP_BDE64)); + topbpl->tus.w = PCIMEM_LONG(topbpl->tus.w); + } + topbpl = bpl; + bpl = (ULP_BDE64 * )bmp->virt; + leftover = 0; + } else { + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB)) == 0) { +out: + /* no more available, so toss mbuf by freeing + * resources associated with qhead + */ + if (binfo->fc_flag & FC_SLI2) { + num_bdes = ((FCELSSIZE / sizeof(ULP_BDE64)) - 1); + bmp = bmphead; + while (bmp) { + i = 0; + bpl = (ULP_BDE64 * )bmp->virt; + while (bpl && (i < num_bdes)) { + bpl++; + i++; + fc_bufunmap(p_dev_ctl, + (uchar *)getPaddr(bpl->addrHigh, bpl->addrLow), 0, bpl->tus.f.bdeSize); + } + savebmp = (MATCHMAP * )bmp->fc_mptr; + if (bmp) { + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + } + bmp = savebmp; + } + + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + } else { + while (qhead) { + temp = qhead; + cmd = &temp->iocb; + for (i = 0; i < (int)cmd->ulpBdeCount; i++) { + fc_bufunmap(p_dev_ctl, (uchar *)((ulong)cmd->un.cont[i].bdeAddress), 0, (uint32)cmd->un.cont[i].bdeSize); + } + qhead = (IOCBQ * )temp->q; + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + } + } + + if(lpfc_nethdr == 0) { + fcnextdata(m_net) = 0; + fcfreehandle(p_dev_ctl, m_net); + m_freem(m_net); + + /* Put p_mbuf back the way it was, without NETHDR */ + fcincdatalen(p_mbuf, sizeof(struct fc_hdr )); + fcdata(p_mbuf) -= sizeof(struct fc_hdr ); + } + + fcfreehandle(p_dev_ctl, p_mbuf); + + if (binfo->fc_flag & FC_SLI2) { + m_freem(p_mbuf); + return(0); + } + return(EIO); + } + fc_bzero((void *)temp, sizeof(IOCBQ)); + cmd = &temp->iocb; + } + } + + if (binfo->fc_flag & FC_SLI2) { + bpl->addrHigh = 0; + bpl->addrLow = 0; + bpl->tus.w = 0; + cmd->ulpBdeCount = 1; + if (num_iocbs == 1) { + cmd->un.xseq64.bdl.bdeSize = (numble * sizeof(ULP_BDE64)); + } else { + topbpl->tus.f.bdeSize = (numble * sizeof(ULP_BDE64)); + topbpl->tus.w = PCIMEM_LONG(topbpl->tus.w); + } + } + + if (temp) + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + + return(0); +} /* End fc_mbuf_to_iocb */ + + + +/**********************************************/ +/** handle_xmit_cmpl **/ +/** **/ +/** Process all transmit completions **/ +/** **/ +/**********************************************/ +_static_ int +handle_xmit_cmpl( +fc_dev_ctl_t *p_dev_ctl, +RING *rp, +IOCBQ *temp) +{ + FC_BRD_INFO * binfo; + IOCB * cmd; + IOCBQ * xmitiq; + IOCBQ * save; + NODELIST * nlp; + fcipbuf_t * p_mbuf; + fcipbuf_t * m_net; + int i, cnt; + ULP_BDE64 * bpl; + MATCHMAP * bmp; + DMATCHMAP * indmp; + + cmd = &temp->iocb; + binfo = &BINFO; + if (++NDDSTAT.ndd_xmitintr_lsw == 0) { + NDDSTAT.ndd_xmitintr_msw++; + } + + /* look up xmit compl by IoTag */ + if ((xmitiq = fc_ringtxp_get(rp, cmd->ulpIoTag)) == 0) { + FCSTATCTR.strayXmitCmpl++; + /* Stray XmitSequence completion */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0606, /* ptr to msg structure */ + fc_mes0606, /* ptr to msg */ + fc_msgBlk0606.msgPreambleStr, /* begin varargs */ + cmd->ulpCommand, + cmd->ulpIoTag); /* end varargs */ + /* completion with missing xmit command */ + return(EIO); + } + + if (rp->fc_ringno == FC_ELS_RING) { + indmp = (DMATCHMAP * )xmitiq->bp; + if (cmd->ulpStatus) { + indmp->dfc_flag = -1; + } + else { + indmp->dfc_flag = xmitiq->iocb.un.xseq64.bdl.bdeSize; + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + return(0); + } + + + NDDSTAT.ndd_xmitque_cur--; + + /* get mbuf ptr for completed xmit */ + m_net = (fcipbuf_t * )xmitiq->bp; + + /* check for first xmit completion in sequence */ + nlp = (NODELIST * ) xmitiq->info; + + if (cmd->ulpStatus) { + uint32 did = 0; + + NDDSTAT.ndd_oerrors++; + + if (nlp) + did = nlp->nlp_DID; + /* Xmit Sequence completion error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0607, /* ptr to msg structure */ + fc_mes0607, /* ptr to msg */ + fc_msgBlk0607.msgPreambleStr, /* begin varargs */ + cmd->ulpStatus, + cmd->ulpIoTag, + cmd->un.ulpWord[4], + did); /* end varargs */ + if (nlp && (nlp->nlp_state >= NLP_LOGIN)) { + /* If XRI in xmit sequence with status error matches XRI + * in nlplist entry, we need to create a new one. + */ + if ((nlp->nlp_Xri == cmd->ulpContext) && + !(nlp->nlp_flag & NLP_RPI_XRI)) { + /* on xmit error, exchange is aborted */ + nlp->nlp_Xri = 0; /* xri */ + /* establish a new exchange */ + if ((nlp->nlp_Rpi) && + (binfo->fc_ffstate == FC_READY)) { + nlp->nlp_flag |= NLP_RPI_XRI; + fc_create_xri(binfo, &binfo->fc_ring[FC_ELS_RING], nlp); + } + } + } + } else { + if (++NDDSTAT.ndd_opackets_lsw == 0) + NDDSTAT.ndd_opackets_msw++; + + if (m_net && + ((nlp && ((nlp->nlp_DID & CT_DID_MASK) != CT_DID_MASK)) || + (xmitiq->iocb.ulpCommand == CMD_XMIT_BCAST_CX))) { + + if(lpfc_nethdr == 0) { + p_mbuf = fcnextdata(m_net); + cnt = fcpktlen(p_mbuf); + } + else { + p_mbuf = m_net; + cnt = fcpktlen(p_mbuf) - sizeof(NETHDR); /* total data in mbuf */ + } + + NDDSTAT.ndd_obytes_lsw += cnt; + if ((int)NDDSTAT.ndd_obytes_lsw < cnt) + NDDSTAT.ndd_obytes_msw++; + } + } + + if (nlp && (nlp->nlp_DID == NameServer_DID)) { + MATCHMAP * mp; + + mp = (MATCHMAP * )m_net; + if (binfo->fc_flag & FC_SLI2) { + fc_mem_put(binfo, MEM_BPL, (uchar * )xmitiq->bpl); + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + return(0); + } + + /* Loop through iocb chain and unmap memory pages associated with mbuf */ + if (binfo->fc_flag & FC_SLI2) { + MATCHMAP * savebmp; + int cnt; + + bmp = (MATCHMAP * )xmitiq->bpl; + cnt = xmitiq->iocb.un.xseq64.bdl.bdeSize; + while (bmp) { + bpl = (ULP_BDE64 * )bmp->virt; + while (bpl && cnt) { + bpl->addrHigh = PCIMEM_LONG(bpl->addrHigh); + bpl->addrLow = PCIMEM_LONG(bpl->addrLow); + bpl->tus.w = PCIMEM_LONG(bpl->tus.w); + switch (bpl->tus.f.bdeFlags) { + case BPL64_SIZE_WORD: + cnt = bpl->tus.f.bdeSize; + bpl = 0; + break; + case BDE64_SIZE_WORD: + fc_bufunmap(p_dev_ctl, (uchar *)getPaddr(bpl->addrHigh, bpl->addrLow), 0, bpl->tus.f.bdeSize); + bpl++; + cnt -= sizeof(ULP_BDE64); + break; + default: + bpl = 0; + cnt = 0; + break; + } + } + savebmp = (MATCHMAP * )bmp->fc_mptr; + fc_mem_put(binfo, MEM_BPL, (uchar * )bmp); + bmp = savebmp; + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + } else { + while (xmitiq) { + for (i = 0; i < (int)xmitiq->iocb.ulpBdeCount; i++) { + fc_bufunmap(p_dev_ctl, (uchar *)((ulong)xmitiq->iocb.un.cont[i].bdeAddress), 0, (uint32)xmitiq->iocb.un.cont[i].bdeSize); + } + save = (IOCBQ * )xmitiq->q; + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + xmitiq = save; + } + } + + /* free mbuf */ + if (m_net) { + if(lpfc_nethdr == 0) { + p_mbuf = fcnextdata(m_net); + fcnextdata(m_net) = 0; + fcfreehandle(p_dev_ctl, m_net); + m_freem(m_net); + + /* Put p_mbuf back the way it was, without NETHDR */ + fcincdatalen(p_mbuf, sizeof(struct fc_hdr )); + + fcdata(p_mbuf) -= sizeof(struct fc_hdr ); + } + else { + p_mbuf = m_net; + } + + fcfreehandle(p_dev_ctl, p_mbuf); + m_freem(p_mbuf); + } + + fc_restartio(p_dev_ctl, nlp); + + return(0); +} /* End handle_xmit_cmpl */ + + +/* + * Issue an iocb command to create an exchange with the remote + * specified by the NODELIST entry. + */ +_static_ int +fc_create_xri( +FC_BRD_INFO *binfo, +RING *rp, +NODELIST *nlp) +{ + IOCB * icmd; + IOCBQ * temp; + + /* While there are buffers to post */ + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB)) == 0) { + return(1); + } + fc_bzero((void *)temp, sizeof(IOCBQ)); + icmd = &temp->iocb; + + /* set up an iotag so we can match the completion to an iocb/mbuf */ + icmd->ulpIoTag = rp->fc_iotag++; + if (rp->fc_iotag == 0) { + rp->fc_iotag = 1; + } + icmd->ulpContext = nlp->nlp_Rpi; + icmd->ulpLe = 1; + + icmd->ulpCommand = CMD_CREATE_XRI_CR; + icmd->ulpOwner = OWN_CHIP; + + temp->bp = (uchar * )nlp; /* used for delimiter between commands */ + + FCSTATCTR.cmdCreateXri++; + + issue_iocb_cmd(binfo, rp, temp); + return(0); +} /* End fc_create_xri */ + + +/* + * Process a create_xri command completion. + */ +_static_ int +handle_create_xri( +fc_dev_ctl_t *p_dev_ctl, +RING *rp, +IOCBQ *temp) +{ + FC_BRD_INFO * binfo; + IOCB * cmd; + NODELIST * nlp; + IOCBQ * xmitiq; + + cmd = &temp->iocb; + binfo = &BINFO; + /* look up xmit compl by IoTag */ + if ((xmitiq = fc_ringtxp_get(rp, cmd->ulpIoTag)) == 0) { + FCSTATCTR.strayXmitCmpl++; + /* Stray CreateXRI completion */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0608, /* ptr to msg structure */ + fc_mes0608, /* ptr to msg */ + fc_msgBlk0608.msgPreambleStr, /* begin varargs */ + cmd->ulpCommand, + cmd->ulpIoTag); /* end varargs */ + /* completion with missing xmit command */ + return(EIO); + } + + /* check for first xmit completion in sequence */ + nlp = (NODELIST * ) xmitiq->bp; + + if (cmd->ulpStatus) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + + nlp->nlp_flag &= ~NLP_RPI_XRI; + + fc_freenode_did(binfo, nlp->nlp_DID, 0); + + FCSTATCTR.xriStatErr++; + return(EIO); + } + + FCSTATCTR.xriCmdCmpl++; + + nlp->nlp_Xri = cmd->ulpContext; + nlp->nlp_flag &= ~NLP_RPI_XRI; + + fc_mem_put(binfo, MEM_IOCB, (uchar * )xmitiq); + + fc_restartio(p_dev_ctl, nlp); + return(0); +} /* End handle_create_xri */ + + +_static_ void +fc_restartio( +fc_dev_ctl_t *p_dev_ctl, +NODELIST *nlp) +{ + FC_BRD_INFO * binfo; + RING * rp; + fcipbuf_t * p_cur_mbuf; + fcipbuf_t * buf_tofree; + + binfo = &BINFO; + rp = &binfo->fc_ring[FC_IP_RING]; + + if (nlp) { + if ((nlp->nlp_bp) && (nlp->nlp_Xri)) { + p_cur_mbuf = (fcipbuf_t * )nlp->nlp_bp; + nlp->nlp_bp = 0; + buf_tofree = fc_txq_put(p_dev_ctl, rp, p_cur_mbuf); + while ((p_cur_mbuf = buf_tofree) != 0) { + NDDSTAT.ndd_opackets_drop++; + buf_tofree = fcnextpkt(buf_tofree); + fcnextpkt(p_cur_mbuf) = NULL; + m_freem(p_cur_mbuf); + } + } + } + + /* Is there a xmit waiting to be started */ + if (rp->fc_tx.q_first) { + /* If so, start it */ + issue_iocb_cmd(binfo, rp, 0); + } + + /* If needed */ +} /* End fc_restartio */ + + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/hbaapi.h 999-mjb/drivers/scsi/lpfc/hbaapi.h --- 000-virgin/drivers/scsi/lpfc/hbaapi.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/hbaapi.h 2003-11-25 14:18:44.000000000 -0800 @@ -0,0 +1,311 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#ifndef HBA_API_H +#define HBA_API_H + +/* Library version string */ +#define HBA_LIBVERSION 1 + +/* DLL imports for WIN32 operation */ +#define HBA_API + +/* OS specific definitions */ + + +typedef unsigned char HBA_UINT8; /* Unsigned 8 bits */ +typedef char HBA_INT8; /* Signed 8 bits */ +typedef unsigned short HBA_UINT16; /* Unsigned 16 bits */ +typedef short HBA_INT16; /* Signed 16 bits */ +typedef unsigned int HBA_UINT32; /* Unsigned 32 bits */ +typedef int HBA_INT32; /* Signed 32 bits */ +typedef void* HBA_PVOID; /* Pointer to void */ +typedef HBA_UINT32 HBA_VOID32; /* Opaque 32 bits */ +typedef long long HBA_INT64; +typedef long long HBA_UINT64; + + + +/* 4.2.1 Handle to Device */ +typedef HBA_UINT32 HBA_HANDLE; + +/* 4.2.2 Status Return Values */ +typedef HBA_UINT32 HBA_STATUS; + +#define HBA_STATUS_OK 0 +#define HBA_STATUS_ERROR 1 /* Error */ +#define HBA_STATUS_ERROR_NOT_SUPPORTED 2 /* Function not supported.*/ +#define HBA_STATUS_ERROR_INVALID_HANDLE 3 /* invalid handle */ +#define HBA_STATUS_ERROR_ARG 4 /* Bad argument */ +#define HBA_STATUS_ERROR_ILLEGAL_WWN 5 /* WWN not recognized */ +#define HBA_STATUS_ERROR_ILLEGAL_INDEX 6 /* Index not recognized */ +#define HBA_STATUS_ERROR_MORE_DATA 7 /* Larger buffer required */ +#define HBA_STATUS_ERROR_STALE_DATA 8 /* need a refresh */ + + + +/* 4.2.3 Port Operational Modes Values */ + +typedef HBA_UINT32 HBA_PORTTYPE; + +#define HBA_PORTTYPE_UNKNOWN 1 /* Unknown */ +#define HBA_PORTTYPE_OTHER 2 /* Other */ +#define HBA_PORTTYPE_NOTPRESENT 3 /* Not present */ +#define HBA_PORTTYPE_NPORT 5 /* Fabric */ +#define HBA_PORTTYPE_NLPORT 6 /* Public Loop */ +#define HBA_PORTTYPE_FLPORT 7 /* Fabric Loop Port */ +#define HBA_PORTTYPE_FPORT 8 /* Fabric Port */ +#define HBA_PORTTYPE_EPORT 9 /* Fabric expansion port */ +#define HBA_PORTTYPE_GPORT 10 /* Generic Fabric Port */ +#define HBA_PORTTYPE_LPORT 20 /* Private Loop */ +#define HBA_PORTTYPE_PTP 21 /* Point to Point */ + + +typedef HBA_UINT32 HBA_PORTSTATE; +#define HBA_PORTSTATE_UNKNOWN 1 /* Unknown */ +#define HBA_PORTSTATE_ONLINE 2 /* Operational */ +#define HBA_PORTSTATE_OFFLINE 3 /* User Offline */ +#define HBA_PORTSTATE_BYPASSED 4 /* Bypassed */ +#define HBA_PORTSTATE_DIAGNOSTICS 5 /* In diagnostics mode */ +#define HBA_PORTSTATE_LINKDOWN 6 /* Link Down */ +#define HBA_PORTSTATE_ERROR 7 /* Port Error */ +#define HBA_PORTSTATE_LOOPBACK 8 /* Loopback */ + + +typedef HBA_UINT32 HBA_PORTSPEED; +#define HBA_PORTSPEED_1GBIT 1 /* 1 GBit/sec */ +#define HBA_PORTSPEED_2GBIT 2 /* 2 GBit/sec */ +#define HBA_PORTSPEED_10GBIT 4 /* 10 GBit/sec */ + + + +/* 4.2.4 Class of Service Values - See GS-2 Spec.*/ + +typedef HBA_UINT32 HBA_COS; + + +/* 4.2.5 Fc4Types Values */ + +typedef struct HBA_fc4types { + HBA_UINT8 bits[32]; /* 32 bytes of FC-4 per GS-2 */ +} HBA_FC4TYPES, *PHBA_FC4TYPES; + +/* 4.2.6 Basic Types */ + +typedef struct HBA_wwn { + HBA_UINT8 wwn[8]; +} HBA_WWN, *PHBA_WWN; + +typedef struct HBA_ipaddress { + int ipversion; /* see enumerations in RNID */ + union + { + unsigned char ipv4address[4]; + unsigned char ipv6address[16]; + } ipaddress; +} HBA_IPADDRESS, *PHBA_IPADDRESS; + +/* 4.2.7 Adapter Attributes */ +typedef struct hba_AdapterAttributes { + char Manufacturer[64]; /*Emulex */ + char SerialNumber[64]; /* A12345 */ + char Model[256]; /* QLA2200 */ + char ModelDescription[256]; /* Agilent TachLite */ + HBA_WWN NodeWWN; + char NodeSymbolicName[256]; /* From GS-3 */ + char HardwareVersion[256]; /* Vendor use */ + char DriverVersion[256]; /* Vendor use */ + char OptionROMVersion[256]; /* Vendor use - i.e. hardware boot ROM*/ + char FirmwareVersion[256]; /* Vendor use */ + HBA_UINT32 VendorSpecificID; /* Vendor specific */ + HBA_UINT32 NumberOfPorts; + char DriverName[256]; /* Binary path and/or name of driver file. */ +} HBA_ADAPTERATTRIBUTES, *PHBA_ADAPTERATTRIBUTES; + +/* 4.2.8 Port Attributes */ +typedef struct HBA_PortAttributes { + HBA_WWN NodeWWN; + HBA_WWN PortWWN; + HBA_UINT32 PortFcId; + HBA_PORTTYPE PortType; /*PTP, Fabric, etc. */ + HBA_PORTSTATE PortState; + HBA_COS PortSupportedClassofService; + HBA_FC4TYPES PortSupportedFc4Types; + HBA_FC4TYPES PortActiveFc4Types; + char PortSymbolicName[256]; + char OSDeviceName[256]; /* \device\ScsiPort3 */ + HBA_PORTSPEED PortSupportedSpeed; + HBA_PORTSPEED PortSpeed; + HBA_UINT32 PortMaxFrameSize; + HBA_WWN FabricName; + HBA_UINT32 NumberofDiscoveredPorts; +} HBA_PORTATTRIBUTES, *PHBA_PORTATTRIBUTES; + + + +/* 4.2.9 Port Statistics */ + +typedef struct HBA_PortStatistics { + HBA_INT64 SecondsSinceLastReset; + HBA_INT64 TxFrames; + HBA_INT64 TxWords; + HBA_INT64 RxFrames; + HBA_INT64 RxWords; + HBA_INT64 LIPCount; + HBA_INT64 NOSCount; + HBA_INT64 ErrorFrames; + HBA_INT64 DumpedFrames; + HBA_INT64 LinkFailureCount; + HBA_INT64 LossOfSyncCount; + HBA_INT64 LossOfSignalCount; + HBA_INT64 PrimitiveSeqProtocolErrCount; + HBA_INT64 InvalidTxWordCount; + HBA_INT64 InvalidCRCCount; +} HBA_PORTSTATISTICS, *PHBA_PORTSTATISTICS; + + + +/* 4.2.10 FCP Attributes */ + +typedef enum HBA_fcpbindingtype { TO_D_ID, TO_WWN } HBA_FCPBINDINGTYPE; + +typedef struct HBA_ScsiId { + char OSDeviceName[256]; /* \device\ScsiPort3 */ + HBA_UINT32 ScsiBusNumber; /* Bus on the HBA */ + HBA_UINT32 ScsiTargetNumber; /* SCSI Target ID to OS */ + HBA_UINT32 ScsiOSLun; +} HBA_SCSIID, *PHBA_SCSIID; + +typedef struct HBA_FcpId { + HBA_UINT32 FcId; + HBA_WWN NodeWWN; + HBA_WWN PortWWN; + HBA_UINT64 FcpLun; +} HBA_FCPID, *PHBA_FCPID; + +typedef struct HBA_FcpScsiEntry { + HBA_SCSIID ScsiId; + HBA_FCPID FcpId; +} HBA_FCPSCSIENTRY, *PHBA_FCPSCSIENTRY; + +typedef struct HBA_FCPTargetMapping { + HBA_UINT32 NumberOfEntries; + HBA_FCPSCSIENTRY entry[1]; /* Variable length array containing mappings*/ +} HBA_FCPTARGETMAPPING, *PHBA_FCPTARGETMAPPING; + +typedef struct HBA_FCPBindingEntry { + HBA_FCPBINDINGTYPE type; + HBA_SCSIID ScsiId; + HBA_FCPID FcpId; /* WWN valid only if type is to WWN, FcpLun always valid */ + HBA_UINT32 FcId; /* valid only if type is to DID */ +} HBA_FCPBINDINGENTRY, *PHBA_FCPBINDINGENTRY; + +typedef struct HBA_FCPBinding { + HBA_UINT32 NumberOfEntries; + HBA_FCPBINDINGENTRY entry[1]; /* Variable length array */ +} HBA_FCPBINDING, *PHBA_FCPBINDING; + +/* 4.2.11 FC-3 Management Atrributes */ + +typedef enum HBA_wwntype { NODE_WWN, PORT_WWN } HBA_WWNTYPE; + +typedef struct HBA_MgmtInfo { + HBA_WWN wwn; + HBA_UINT32 unittype; + HBA_UINT32 PortId; + HBA_UINT32 NumberOfAttachedNodes; + HBA_UINT16 IPVersion; + HBA_UINT16 UDPPort; + HBA_UINT8 IPAddress[16]; + HBA_UINT16 reserved; + HBA_UINT16 TopologyDiscoveryFlags; +} HBA_MGMTINFO, *PHBA_MGMTINFO; + +#define HBA_EVENT_LIP_OCCURRED 1 +#define HBA_EVENT_LINK_UP 2 +#define HBA_EVENT_LINK_DOWN 3 +#define HBA_EVENT_LIP_RESET_OCCURRED 4 +#define HBA_EVENT_RSCN 5 +#define HBA_EVENT_PROPRIETARY 0xFFFF + +typedef struct HBA_Link_EventInfo { + HBA_UINT32 PortFcId; /* Port which this event occurred */ + HBA_UINT32 Reserved[3]; +} HBA_LINK_EVENTINFO, *PHBA_LINK_EVENTINFO; + +typedef struct HBA_RSCN_EventInfo { + HBA_UINT32 PortFcId; /* Port which this event occurred */ + HBA_UINT32 NPortPage; /* Reference FC-FS for RSCN ELS "Affected N-Port Pages"*/ + HBA_UINT32 Reserved[2]; +} HBA_RSCN_EVENTINFO, *PHBA_RSCN_EVENTINFO; + +typedef struct HBA_Pty_EventInfo { + HBA_UINT32 PtyData[4]; /* Proprietary data */ +} HBA_PTY_EVENTINFO, *PHBA_PTY_EVENTINFO; + +typedef struct HBA_EventInfo { + HBA_UINT32 EventCode; + union { + HBA_LINK_EVENTINFO Link_EventInfo; + HBA_RSCN_EVENTINFO RSCN_EventInfo; + HBA_PTY_EVENTINFO Pty_EventInfo; + } Event; +} HBA_EVENTINFO, *PHBA_EVENTINFO; + +/* Used for OSDeviceName */ +typedef struct HBA_osdn { + char drvname[32]; + HBA_UINT32 instance; + HBA_UINT32 target; + HBA_UINT32 lun; + HBA_UINT32 bus; + char flags; + char sizeSN; + char InquirySN[32]; +} HBA_OSDN; + +/* Function Prototypes */ +#if (!defined(_KERNEL) && !defined(__KERNEL__)) +uint32 GetAdapterAttributes(uint32, HBA_ADAPTERATTRIBUTES *); +uint32 GetAdapterPortAttributes(uint32, HBA_UINT32, HBA_PORTATTRIBUTES *); +uint32 GetPortStatistics(uint32, HBA_UINT32, HBA_PORTSTATISTICS *); +uint32 GetDiscoveredPortAttributes(uint32, HBA_UINT32, HBA_UINT32, HBA_PORTATTRIBUTES *); +uint32 GetPortAttributesByWWN(uint32, HBA_WWN *, HBA_PORTATTRIBUTES *); +uint32 GetPortAttributesByIndex(uint32, HBA_UINT32, HBA_UINT32, HBA_PORTATTRIBUTES *); +uint32 GetEventBuffer(uint32, PHBA_EVENTINFO, HBA_UINT32 *); +uint32 SetRNIDMgmtInfo(uint32, HBA_MGMTINFO *); +uint32 GetRNIDMgmtInfo(uint32, HBA_MGMTINFO *); +uint32 SendRNID(uint32, HBA_WWN *, HBA_WWNTYPE, void *, HBA_UINT32 *); +void ResetStatistics(uint32, HBA_UINT32); +uint32 RefreshInformation(uint32); +uint32 GetFcpTargetMapping(uint32, PHBA_FCPTARGETMAPPING); +uint32 GetFcpPersistentBinding(uint32, PHBA_FCPBINDING); +uint32 SendCTPassThru(uint32, void *, HBA_UINT32, void *, HBA_UINT32 *); +uint32 SendReportLUNs(uint32, HBA_WWN *, void *, HBA_UINT32 *, void *, + HBA_UINT32 *); +uint32 SendReadCapacity(uint32, HBA_WWN *, HBA_UINT64, void *, HBA_UINT32 *, + void *, HBA_UINT32 *); +uint32 SendScsiInquiry(uint32, HBA_WWN *, HBA_UINT64, HBA_UINT8, HBA_UINT32, + void *, HBA_UINT32 *, void *, HBA_UINT32 *); +#endif + + +#endif + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/lp6000.c 999-mjb/drivers/scsi/lpfc/lp6000.c --- 000-virgin/drivers/scsi/lpfc/lp6000.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/lp6000.c 2003-11-25 14:18:44.000000000 -0800 @@ -0,0 +1,2696 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +/* Routine Declaration - Local */ +_local_ int fc_binfo_init(fc_dev_ctl_t *p_dev_ctl); +_local_ int fc_parse_vpd(fc_dev_ctl_t *p_dev_ctl, uchar *vpd); +_local_ int fc_proc_ring_event( fc_dev_ctl_t *p_dev_ctl, RING *rp, + IOCBQ *saveq); +/* End Routine Declaration - Local */ +extern uint32 fcPAGESIZE; +extern uint32 fc_diag_state; +extern int fcinstance[]; + +int fc_check_for_vpd = 1; +int fc_reset_on_attach = 0; + +extern int fc_max_els_sent; + +#define FC_MAX_VPD_SIZE 0x100 +static uint32 fc_vpd_data[FC_MAX_VPD_SIZE]; + +static uint32 fc_run_biu_test[256] = { + /* Walking ones */ + 0x80000000, 0x40000000, 0x20000000, 0x10000000, + 0x08000000, 0x04000000, 0x02000000, 0x01000000, + 0x00800000, 0x00400000, 0x00200000, 0x00100000, + 0x00080000, 0x00040000, 0x00020000, 0x00010000, + 0x00008000, 0x00004000, 0x00002000, 0x00001000, + 0x00000800, 0x00000400, 0x00000200, 0x00000100, + 0x00000080, 0x00000040, 0x00000020, 0x00000010, + 0x00000008, 0x00000004, 0x00000002, 0x00000001, + + /* Walking zeros */ + 0x7fffffff, 0xbfffffff, 0xdfffffff, 0xefffffff, + 0xf7ffffff, 0xfbffffff, 0xfdffffff, 0xfeffffff, + 0xff7fffff, 0xffbfffff, 0xffdfffff, 0xffefffff, + 0xfff7ffff, 0xfffbffff, 0xfffdffff, 0xfffeffff, + 0xffff7fff, 0xffffbfff, 0xffffdfff, 0xffffefff, + 0xfffff7ff, 0xfffffbff, 0xfffffdff, 0xfffffeff, + 0xffffff7f, 0xffffffbf, 0xffffffdf, 0xffffffef, + 0xfffffff7, 0xfffffffb, 0xfffffffd, 0xfffffffe, + + /* all zeros */ + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00000000, 0x00000000, + + /* all ones */ + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, + + /* all 5's */ + 0x55555555, 0x55555555, 0x55555555, 0x55555555, + 0x55555555, 0x55555555, 0x55555555, 0x55555555, + 0x55555555, 0x55555555, 0x55555555, 0x55555555, + 0x55555555, 0x55555555, 0x55555555, 0x55555555, + 0x55555555, 0x55555555, 0x55555555, 0x55555555, + 0x55555555, 0x55555555, 0x55555555, 0x55555555, + 0x55555555, 0x55555555, 0x55555555, 0x55555555, + 0x55555555, 0x55555555, 0x55555555, 0x55555555, + + /* all a's */ + 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, + 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, + 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, + 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, + 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, + 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, + 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, + 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, 0xaaaaaaaa, + + /* all 5a's */ + 0x5a5a5a5a, 0x5a5a5a5a, 0x5a5a5a5a, 0x5a5a5a5a, + 0x5a5a5a5a, 0x5a5a5a5a, 0x5a5a5a5a, 0x5a5a5a5a, + 0x5a5a5a5a, 0x5a5a5a5a, 0x5a5a5a5a, 0x5a5a5a5a, + 0x5a5a5a5a, 0x5a5a5a5a, 0x5a5a5a5a, 0x5a5a5a5a, + 0x5a5a5a5a, 0x5a5a5a5a, 0x5a5a5a5a, 0x5a5a5a5a, + 0x5a5a5a5a, 0x5a5a5a5a, 0x5a5a5a5a, 0x5a5a5a5a, + 0x5a5a5a5a, 0x5a5a5a5a, 0x5a5a5a5a, 0x5a5a5a5a, + 0x5a5a5a5a, 0x5a5a5a5a, 0x5a5a5a5a, 0x5a5a5a5a, + + /* all a5's */ + 0xa5a5a5a5, 0xa5a5a5a5, 0xa5a5a5a5, 0xa5a5a5a5, + 0xa5a5a5a5, 0xa5a5a5a5, 0xa5a5a5a5, 0xa5a5a5a5, + 0xa5a5a5a5, 0xa5a5a5a5, 0xa5a5a5a5, 0xa5a5a5a5, + 0xa5a5a5a5, 0xa5a5a5a5, 0xa5a5a5a5, 0xa5a5a5a5, + 0xa5a5a5a5, 0xa5a5a5a5, 0xa5a5a5a5, 0xa5a5a5a5, + 0xa5a5a5a5, 0xa5a5a5a5, 0xa5a5a5a5, 0xa5a5a5a5, + 0xa5a5a5a5, 0xa5a5a5a5, 0xa5a5a5a5, 0xa5a5a5a5, + 0xa5a5a5a5, 0xa5a5a5a5, 0xa5a5a5a5, 0xa5a5a5a5 +}; + +extern _static_ void fc_read_nv(FC_BRD_INFO *binfo, MAILBOX *mb); +#define S(N,V) (((V)<<(N))|((V)>>(32-(N)))) +#define BYTESWAP(x) ((x<<24) | (x >> 24) | (0xFF00 & (x >> 8)) | (0xFF0000 & (x << 8))); + +/************************************************************************/ +/* */ +/* fc_swap_bcopy */ +/* */ +/************************************************************************/ +_static_ void +fc_swap_bcopy( +uint32 *src, +uint32 *dest, +uint32 cnt) +{ + uint32 ldata; + int i; + + for (i = 0; i < (int)cnt; i += sizeof(uint32)) { + ldata = *src++; + ldata = cpu_to_be32(ldata); + *dest++ = ldata; + } +} /* End fc_swap_bcopy */ + +/************************************************************************/ +/* */ +/* fc_init_hba */ +/* */ +/************************************************************************/ +uint32 +fc_init_hba( +fc_dev_ctl_t * p_dev_ctl, +MAILBOX * mb, +uint32 * pwwnn) +{ + FC_BRD_INFO * binfo; + uint32 * pText; + char licensed[56] = "key unlock for use with gnu public licensed code only\0"; + pText = (uint32 *) licensed; + fc_swap_bcopy(pText, pText, 56); + binfo = &BINFO; + /* Setup and issue mailbox READ NVPARAMS command */ + binfo->fc_ffstate = FC_INIT_NVPARAMS; + fc_read_nv(binfo, mb); + memset((void*) mb->un.varRDnvp.rsvd3, 0, sizeof(mb->un.varRDnvp.rsvd3)); + memcpy((void*) mb->un.varRDnvp.rsvd3, licensed, sizeof(licensed)); + if (issue_mb_cmd(binfo, mb, MBX_POLL) != MBX_SUCCESS) { + /* Adapter initialization error, mbxCmd READ_NVPARM, mbxStatus */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0303, /* ptr to msg structure */ + fc_mes0303, /* ptr to msg */ + fc_msgBlk0303.msgPreambleStr, /* begin varargs */ + mb->mbxCommand, + mb->mbxStatus); /* end varargs */ + return(0); + } + fc_bcopy ((uchar*)mb->un.varRDnvp.nodename, (uchar*) pwwnn, sizeof(mb->un.varRDnvp.nodename)); + return(1); +} + +/************************************************************************/ +/* */ +/* sha_initialize */ +/* */ +/************************************************************************/ +void +sha_initialize( +uint32 *HashResultPointer) +{ + HashResultPointer[0] = 0x67452301; + HashResultPointer[1] = 0xEFCDAB89; + HashResultPointer[2] = 0x98BADCFE; + HashResultPointer[3] = 0x10325476; + HashResultPointer[4] = 0xC3D2E1F0; +} +/************************************************************************/ +/* */ +/* sha_iterate */ +/* */ +/************************************************************************/ +void +sha_iterate( +uint32 *HashResultPointer, +uint32 *HashWorkingPointer) +{ + int t; + uint32 TEMP; + uint32 A, B, C, D, E; + t = 16; + do + { + HashWorkingPointer[t] = S(1,HashWorkingPointer[t-3]^HashWorkingPointer[t-8]^HashWorkingPointer[t-14]^HashWorkingPointer[t-16]); + } while (++t <= 79); + t = 0; + A = HashResultPointer[0]; + B = HashResultPointer[1]; + C = HashResultPointer[2]; + D = HashResultPointer[3]; + E = HashResultPointer[4]; + + do + { + if (t < 20) + { + TEMP = ((B & C) | ((~B) & D)) + 0x5A827999; + } else if (t < 40) { + TEMP = (B ^ C ^ D) + 0x6ED9EBA1; + } else if (t < 60) { + TEMP = ((B & C) | (B & D) | (C & D)) + 0x8F1BBCDC; + } else { + TEMP = (B ^ C ^ D) + 0xCA62C1D6; + } + TEMP += S(5,A) + E + HashWorkingPointer[t]; + E = D; + D = C; + C = S(30,B); + B = A; + A = TEMP; + } while (++t <= 79); + + HashResultPointer[0] += A; + HashResultPointer[1] += B; + HashResultPointer[2] += C; + HashResultPointer[3] += D; + HashResultPointer[4] += E; + +} +/************************************************************************/ +/* */ +/* Challenge_XOR_KEY */ +/* */ +/************************************************************************/ +void +Challenge_XOR_KEY +(uint32 *RandomChallenge, + uint32 *HashWorking) +{ + *HashWorking = (*RandomChallenge ^ *HashWorking); +} + +/************************************************************************/ +/* */ +/* fc_SHA1 */ +/* */ +/************************************************************************/ +void +fc_SHA1( +uint32 * pwwnn, +uint32 * phbainitEx, +uint32 * RandomData) +{ + int t; + uint32 HashWorking[80]; + + fc_bzero(HashWorking, sizeof(HashWorking)); + HashWorking[0] = HashWorking[78] = *pwwnn++; + HashWorking[1] = HashWorking[79] = *pwwnn; + for (t = 0; t < 7 ; t++) { + Challenge_XOR_KEY(RandomData+t,HashWorking+t); + } + sha_initialize(phbainitEx); + sha_iterate(phbainitEx, HashWorking); +} + +/************************************************************************/ +/* */ +/* fc_ffinit */ +/* */ +/************************************************************************/ +_static_ int +fc_ffinit( +fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + fc_vpd_t * vp; + uint32 status, i, j; + uint32 read_rev_reset, hbainit = 0; + uint32 RandomData[7]; + uint32 hbainitEx[5]; + uint32 wwnn[2]; + struct pci_dev *pdev; + int ipri, flogi_sent; + MBUF_INFO bufinfo; + MBUF_INFO * buf_info; + void * ioa; + RING * rp; + MAILBOX * mb; + MATCHMAP * mp, *mp1, *mp2; + uchar * inptr, *outptr; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + vp = &VPD; + mb = 0; + + pdev = p_dev_ctl->pcidev ; + /* Set board state to initialization started */ + binfo->fc_ffstate = FC_INIT_START; + read_rev_reset = 0; + + if(fc_reset_on_attach) { + binfo->fc_ffstate = 0; + fc_brdreset(p_dev_ctl); + binfo->fc_ffstate = FC_INIT_START; + DELAYMS(2500); + } + +top: + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + +#if LITTLE_ENDIAN_HOST + /* For Little Endian, BIU_BSE is not supported */ +#else +#ifdef BIU_BSE + status = READ_CSR_REG(binfo, FC_BC_REG(binfo, ioa)); + WRITE_CSR_REG(binfo, FC_BC_REG(binfo, ioa), (BC_BSE_SWAP | status)); + i = READ_CSR_REG(binfo, FC_BC_REG(binfo, ioa)); +#endif +#endif + + status = READ_CSR_REG(binfo, FC_STAT_REG(binfo, ioa)); + FC_UNMAP_MEMIO(ioa); + + i = 0; + + /* Check status register to see what current state is */ + while ((status & (HS_FFRDY | HS_MBRDY)) != (HS_FFRDY | HS_MBRDY)) { + + /* Check every 100ms for 5 retries, then every 500ms for 5, then + * every 2.5 sec for 5, then reset board and every 2.5 sec for 4. + */ + if (i++ >= 20) { + /* Adapter failed to init, timeout, status reg */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0436, /* ptr to msg structure */ + fc_mes0436, /* ptr to msg */ + fc_msgBlk0436.msgPreambleStr, /* begin varargs */ + status); /* end varargs */ + binfo->fc_ffstate = FC_ERROR; + return(EIO); + } + + /* Check to see if any errors occurred during init */ + if (status & HS_FFERM) { + /* ERROR: During chipset initialization */ + /* Adapter failed to init, chipset, status reg */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0437, /* ptr to msg structure */ + fc_mes0437, /* ptr to msg */ + fc_msgBlk0437.msgPreambleStr, /* begin varargs */ + status); /* end varargs */ + binfo->fc_ffstate = FC_ERROR; + return(EIO); + } + + if (i <= 5) { + DELAYMS(100); + } + else if (i <= 10) { + DELAYMS(500); + } + else { + DELAYMS(2500); + } + + if (i == 15) { + /* Reset board and try one more time */ + binfo->fc_ffstate = 0; + fc_brdreset(p_dev_ctl); + binfo->fc_ffstate = FC_INIT_START; + } + + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + status = READ_CSR_REG(binfo, FC_STAT_REG(binfo, ioa)); + FC_UNMAP_MEMIO(ioa); + } + + /* Check to see if any errors occurred during init */ + if (status & HS_FFERM) { + /* ERROR: During chipset initialization */ + /* Adapter failed to init, chipset, status reg */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0438, /* ptr to msg structure */ + fc_mes0438, /* ptr to msg */ + fc_msgBlk0438.msgPreambleStr, /* begin varargs */ + status); /* end varargs */ + binfo->fc_ffstate = FC_ERROR; + return(EIO); + } + + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + + /* Clear all interrupt enable conditions */ + WRITE_CSR_REG(binfo, FC_HC_REG(binfo, ioa), 0); + + /* setup host attn register */ + WRITE_CSR_REG(binfo, FC_HA_REG(binfo, ioa), 0xffffffff); + + FC_UNMAP_MEMIO(ioa); + + if(read_rev_reset) + goto do_read_rev; + + fc_binfo_init(p_dev_ctl); + + /* Allocate some memory for buffers */ + if (fc_malloc_buffer(p_dev_ctl) == 0) { + binfo->fc_ffstate = FC_ERROR; + return(ENOMEM); + } + + fc_get_dds_bind(p_dev_ctl); + + /* Get a buffer which will be used repeatedly for mailbox commands */ + if ((mb = (MAILBOX * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI)) == 0) { + binfo->fc_ffstate = FC_ERROR; + fc_free_buffer(p_dev_ctl); + return(ENOMEM); + } + +do_read_rev: + if((pdev->device == PCI_DEVICE_ID_TFLY)|| + (pdev->device == PCI_DEVICE_ID_PFLY)) + hbainit = fc_init_hba(p_dev_ctl, mb, wwnn); + /* Setup and issue mailbox READ REV command */ + binfo->fc_ffstate = FC_INIT_REV; + fc_read_rev(binfo, mb); + if (issue_mb_cmd(binfo, mb, MBX_POLL) != MBX_SUCCESS) { + /* Adapter failed to init, mbxCmd READ_REV, mbxStatus */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0439, /* ptr to msg structure */ + fc_mes0439, /* ptr to msg */ + fc_msgBlk0439.msgPreambleStr, /* begin varargs */ + mb->mbxCommand, + mb->mbxStatus); /* end varargs */ + + /* If read_rev fails, give it one more chance */ + if(read_rev_reset == 0) { + binfo->fc_ffstate = 0; + fc_brdreset(p_dev_ctl); + binfo->fc_ffstate = FC_INIT_START; + + DELAYMS(2500); + DELAYMS(2500); + + read_rev_reset = 1; + goto top; + } + binfo->fc_ffstate = FC_ERROR; + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + fc_free_buffer(p_dev_ctl); + return(EIO); + } + + if(mb->un.varRdRev.rr == 0) { + + if(read_rev_reset == 0) { + binfo->fc_ffstate = 0; + fc_brdreset(p_dev_ctl); + binfo->fc_ffstate = FC_INIT_START; + + DELAYMS(2500); + DELAYMS(2500); + + read_rev_reset = 1; + goto top; + } + + vp->rev.rBit = 0; + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0440, /* ptr to msg structure */ + fc_mes0440, /* ptr to msg */ + fc_msgBlk0440.msgPreambleStr, /* begin varargs */ + mb->mbxCommand, + read_rev_reset); /* end varargs */ + } + else { + if(mb->un.varRdRev.un.b.ProgType != 2) { + if(read_rev_reset == 0) { + binfo->fc_ffstate = 0; + fc_brdreset(p_dev_ctl); + binfo->fc_ffstate = FC_INIT_START; + + DELAYMS(2500); + DELAYMS(2500); + + read_rev_reset = 1; + goto top; + } + } + vp->rev.rBit = 1; + vp->rev.sli1FwRev = mb->un.varRdRev.sli1FwRev; + fc_bcopy((uchar *)mb->un.varRdRev.sli1FwName, (uchar *)vp->rev.sli1FwName, 16); + vp->rev.sli2FwRev = mb->un.varRdRev.sli2FwRev; + fc_bcopy((uchar *)mb->un.varRdRev.sli2FwName, (uchar *)vp->rev.sli2FwName, 16); + } + + /* Save information as VPD data */ + vp->rev.biuRev = mb->un.varRdRev.biuRev; + vp->rev.smRev = mb->un.varRdRev.smRev; + vp->rev.smFwRev = mb->un.varRdRev.un.smFwRev; + vp->rev.endecRev = mb->un.varRdRev.endecRev; + vp->rev.fcphHigh = mb->un.varRdRev.fcphHigh; + vp->rev.fcphLow = mb->un.varRdRev.fcphLow; + vp->rev.feaLevelHigh = mb->un.varRdRev.feaLevelHigh; + vp->rev.feaLevelLow = mb->un.varRdRev.feaLevelLow; + vp->rev.postKernRev = mb->un.varRdRev.postKernRev; + vp->rev.opFwRev = mb->un.varRdRev.opFwRev; + if((pdev->device == PCI_DEVICE_ID_TFLY)|| + (pdev->device == PCI_DEVICE_ID_PFLY)) + fc_bcopy((uchar *)&mb->un.varWords[24], (uchar *)RandomData, sizeof(RandomData)); + + dfc_fmw_rev(p_dev_ctl); /* Save firmware rev for HBAAPI */ + + if(fc_check_for_vpd) { + /* Get adapter VPD information */ + fc_dump_mem(binfo, mb); + if (issue_mb_cmd(binfo, mb, MBX_POLL) != MBX_SUCCESS) { + /* + * Let it go through even if failed. + */ + /* Adapter failed to init, mbxCmd DUMP VPD, mbxStatus */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0441, /* ptr to msg structure */ + fc_mes0441, /* ptr to msg */ + fc_msgBlk0441.msgPreambleStr, /* begin varargs */ + mb->mbxCommand, + mb->mbxStatus); /* end varargs */ + + /* If dump_mem times out, give it one more chance */ + if((read_rev_reset == 0) && (mb->mbxStatus == 0)) { + binfo->fc_ffstate = 0; + fc_brdreset(p_dev_ctl); + binfo->fc_ffstate = FC_INIT_START; + + DELAYMS(2500); + DELAYMS(2500); + + read_rev_reset = 1; + goto top; + } + } + else { + if((mb->un.varDmp.ra == 1) && + (mb->un.varDmp.word_cnt <= FC_MAX_VPD_SIZE)) { + uint32 *lp1, *lp2; + + lp1 = (uint32 * )&mb->un.varDmp.resp_offset; + lp2 = (uint32 * )&fc_vpd_data[0]; + for(i=0;iun.varDmp.word_cnt;i++) { + status = *lp1++; + *lp2++ = SWAP_LONG(status); + } + fc_parse_vpd(p_dev_ctl, (uchar *)&fc_vpd_data[0]); + } + } + } + + /* Setup and issue mailbox CONFIG_PORT or PARTITION_SLIM command */ + binfo->fc_ffstate = FC_INIT_PARTSLIM; + if (binfo->fc_sli == 2) { + if((pdev->device == PCI_DEVICE_ID_TFLY)|| + (pdev->device == PCI_DEVICE_ID_PFLY)){ + fc_SHA1(wwnn, hbainitEx, RandomData); + fc_config_port(binfo, mb, (uint32 *) hbainitEx); + } + else + fc_config_port(binfo, mb, &hbainit); + if (issue_mb_cmd(binfo, mb, MBX_POLL) != MBX_SUCCESS) { + /* Adapter failed to init, mbxCmd CONFIG_PORT, mbxStatus */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0442, /* ptr to msg structure */ + fc_mes0442, /* ptr to msg */ + fc_msgBlk0442.msgPreambleStr, /* begin varargs */ + mb->mbxCommand, + mb->mbxStatus, + 0); /* end varargs */ + + /* If config_port fails, give it one more chance */ + if(read_rev_reset == 0) { + binfo->fc_ffstate = 0; + fc_brdreset(p_dev_ctl); + binfo->fc_ffstate = FC_INIT_START; + + DELAYMS(2500); + DELAYMS(2500); + + read_rev_reset = 1; + goto top; + } + + binfo->fc_flag &= ~FC_SLI2; + binfo->fc_mboxaddr = 0; + if (binfo->fc_slim2.virt) { + buf_info = &bufinfo; + if (binfo->fc_slim2.phys) { + buf_info->phys = (void * )binfo->fc_slim2.phys; + buf_info->data_handle = binfo->fc_slim2.data_handle; + buf_info->dma_handle = binfo->fc_slim2.dma_handle; + buf_info->flags = FC_MBUF_DMA; + } else { + buf_info->phys = 0; + buf_info->data_handle = 0; + buf_info->dma_handle = 0; + buf_info->flags = 0; + } + buf_info->size = fcPAGESIZE; + buf_info->virt = (void * )binfo->fc_slim2.virt; + fc_free(p_dev_ctl, buf_info); + binfo->fc_slim2.virt = 0; + binfo->fc_slim2.phys = 0; + binfo->fc_slim2.dma_handle = 0; + binfo->fc_slim2.data_handle = 0; + } + binfo->fc_ffstate = FC_ERROR; + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + fc_free_buffer(p_dev_ctl); + return(EIO); + } + } else { + /* SLI1 not supported, mbxCmd , mbxStatus */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0443, /* ptr to msg structure */ + fc_mes0443, /* ptr to msg */ + fc_msgBlk0443.msgPreambleStr, /* begin varargs */ + mb->mbxCommand, + mb->mbxStatus, + 0); /* end varargs */ + binfo->fc_ffstate = FC_ERROR; + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + fc_free_buffer(p_dev_ctl); + return(EIO); + } + + /* Initialize cmd/rsp ring pointers */ + for (i = 0; i < (uint32)binfo->fc_ffnumrings; i++) { + rp = &binfo->fc_ring[i]; + + rp->fc_ringno = (uchar)i; + rp->fc_xmitstate = FC_LINK_UP; + if ((i == FC_IP_RING) || (i == FC_FCP_RING)) + rp->fc_xmitstate = FC_READY; + rp->fc_binfo = (uchar * )binfo; + rp->fc_iocbhd = 0; + rp->fc_iocbtl = 0; + rp->fc_cmdidx = 0; + rp->fc_rspidx = 0; + rp->fc_iotag = 1; /* used to identify each I/O */ + if (i == FC_FCP_RING) + rp->fc_bufcnt = MAX_FCP_CMDS; /* Used for ABTS iotag */ + + /* offsets are from the beginning of SLIM */ + if (!(binfo->fc_flag & FC_SLI2)) { + /* offsets are from the beginning of SLIM */ + rp->fc_cmdringaddr = (void *)((ulong)(mb->un.varSlim.ringdef[i].offCiocb)); + rp->fc_rspringaddr = (void *)((ulong)(mb->un.varSlim.ringdef[i].offRiocb)); + + } + } + + mp1 = 0; + mp2 = 0; + /* Setup and issue mailbox RUN BIU DIAG command */ + /* setup test buffers */ + if (((mp = (MATCHMAP * )fc_mem_get(binfo, MEM_BUF | MEM_PRI)) == 0) || + ((mp1 = (MATCHMAP * )fc_mem_get(binfo, MEM_BUF | MEM_PRI)) == 0) || + ((mp2 = (MATCHMAP * )fc_mem_get(binfo, MEM_BUF | MEM_PRI)) == 0)) { + /* Adapter failed to init, no buffers for RUN_BIU_DIAG */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0444, /* ptr to msg structure */ + fc_mes0444, /* ptr to msg */ + fc_msgBlk0444.msgPreambleStr); /* begin & end varargs */ + if (mp) + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + if (mp1) + fc_mem_put(binfo, MEM_BUF, (uchar * )mp1); + binfo->fc_ffstate = FC_ERROR; + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + fc_free_buffer(p_dev_ctl); + return(ENOMEM); + } + + fc_mpdata_incopy(p_dev_ctl, mp, (uchar * ) & fc_run_biu_test[0], FCELSSIZE); + fc_mpdata_sync(mp->dma_handle, 0, 0, DDI_DMA_SYNC_FORDEV); + inptr = mp->virt; + /* Issue mailbox command */ + fc_runBIUdiag(binfo, mb, mp->phys, mp1->phys); + if (issue_mb_cmd(binfo, mb, MBX_POLL) != MBX_SUCCESS) { + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + FC_UNMAP_MEMIO(ioa); + /* Adapter failed init, mailbox cmd runBIUdiag mbxStatus */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0447, /* ptr to msg structure */ + fc_mes0447, /* ptr to msg */ + fc_msgBlk0447.msgPreambleStr, /* begin varargs */ + mb->mbxCommand, + mb->mbxStatus); /* end varargs */ + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + fc_mem_put(binfo, MEM_BUF, (uchar * )mp1); + fc_mem_put(binfo, MEM_BUF, (uchar * )mp2); + binfo->fc_ffstate = FC_ERROR; + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + fc_free_buffer(p_dev_ctl); + return(EIO); + } + + fc_mpdata_sync(mp1->dma_handle, 0, 0, DDI_DMA_SYNC_FORKERNEL); + fc_mpdata_outcopy(p_dev_ctl, mp1, (uchar * )mp2->virt, FCELSSIZE); + outptr = (uchar * )mp2->virt; + + for (i = 0; i < FCELSSIZE; i++) { + if (*outptr++ != *inptr++) { + outptr--; + inptr--; + /* RUN_BIU_DIAG failed */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0445, /* ptr to msg structure */ + fc_mes0445, /* ptr to msg */ + fc_msgBlk0445.msgPreambleStr); /* begin & end varargs */ + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + fc_mem_put(binfo, MEM_BUF, (uchar * )mp1); + fc_mem_put(binfo, MEM_BUF, (uchar * )mp2); + binfo->fc_ffstate = FC_ERROR; + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + fc_free_buffer(p_dev_ctl); + return(EIO); + } + } + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + fc_mem_put(binfo, MEM_BUF, (uchar * )mp1); + fc_mem_put(binfo, MEM_BUF, (uchar * )mp2); + + /* Setup and issue mailbox CONFIGURE RING command */ + for (i = 0; i < (uint32)binfo->fc_ffnumrings; i++) { + binfo->fc_ffstate = FC_INIT_CFGRING; + fc_config_ring(binfo, i, 0, mb); + if (issue_mb_cmd(binfo, mb, MBX_POLL) != MBX_SUCCESS) { + /* Adapter failed to init, mbxCmd CFG_RING, mbxStatus , ring */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0446, /* ptr to msg structure */ + fc_mes0446, /* ptr to msg */ + fc_msgBlk0446.msgPreambleStr, /* begin varargs */ + mb->mbxCommand, + mb->mbxStatus, + i); /* ring num - end varargs */ + binfo->fc_ffstate = FC_ERROR; + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + fc_free_buffer(p_dev_ctl); + return(EIO); + } + } + + /* Setup link timers */ + fc_config_link(p_dev_ctl, mb); + if (issue_mb_cmd(binfo, mb, MBX_POLL) != MBX_SUCCESS) { + /* Adapter failed to init, mbxCmd CONFIG_LINK mbxStatus */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0447, /* ptr to msg structure */ + fc_mes0447, /* ptr to msg */ + fc_msgBlk0447.msgPreambleStr, /* begin varargs */ + mb->mbxCommand, + mb->mbxStatus); /* end varargs */ + binfo->fc_ffstate = FC_ERROR; + fc_ffcleanup(p_dev_ctl); + i_clear(&IHS); + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + fc_free_buffer(p_dev_ctl); + return(EIO); + } + + /* We need to get login parameters for NID */ + fc_read_sparam(p_dev_ctl, mb); + if (issue_mb_cmd(binfo, mb, MBX_POLL) != MBX_SUCCESS) { + /* Adapter failed to init, mbxCmd READ_SPARM mbxStatus */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0448, /* ptr to msg structure */ + fc_mes0448, /* ptr to msg */ + fc_msgBlk0448.msgPreambleStr, /* begin varargs */ + mb->mbxCommand, + mb->mbxStatus); /* end varargs */ + binfo->fc_ffstate = FC_ERROR; + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + fc_free_buffer(p_dev_ctl); + return(EIO); + } + + mp = (MATCHMAP * )binfo->fc_mbbp; + fc_mpdata_sync(mp->dma_handle, 0, sizeof(SERV_PARM), + DDI_DMA_SYNC_FORKERNEL); + fc_mpdata_outcopy(p_dev_ctl, mp, (uchar * ) & binfo->fc_sparam, + sizeof(SERV_PARM)); + + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + binfo->fc_mbbp = 0; + + fc_bcopy((uchar * )&binfo->fc_sparam.nodeName, (uchar * )&binfo->fc_nodename, + sizeof(NAME_TYPE)); + fc_bcopy((uchar * )&binfo->fc_sparam.portName, (uchar * )&binfo->fc_portname, + sizeof(NAME_TYPE)); + fc_bcopy(binfo->fc_portname.IEEE, p_dev_ctl->phys_addr, 6); + + /* If no serial number in VPD data, use low 6 bytes of WWNN */ + if(binfo->fc_SerialNumber[0] == 0) { + outptr = (uchar *) &binfo->fc_nodename.IEEE[0]; + for(i=0;i<12;i++) { + status = *outptr++; + j = ((status & 0xf0) >> 4); + if(j <= 9) + binfo->fc_SerialNumber[i] = (char)((uchar)0x30 + (uchar)j); + else + binfo->fc_SerialNumber[i] = (char)((uchar)0x61 + (uchar)(j-10)); + i++; + j = (status & 0xf); + if(j <= 9) + binfo->fc_SerialNumber[i] = (char)((uchar)0x30 + (uchar)j); + else + binfo->fc_SerialNumber[i] = (char)((uchar)0x61 + (uchar)(j-10)); + } + } + + if(clp[CFG_NETWORK_ON].a_current) { + if ((binfo->fc_sparam.portName.nameType != NAME_IEEE) || + (binfo->fc_sparam.portName.IEEEextMsn != 0) || + (binfo->fc_sparam.portName.IEEEextLsb != 0)) { + clp[CFG_NETWORK_ON].a_current = 0; + /* WorldWide PortName Type doesn't conform to IP Profile */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0449, /* ptr to msg structure */ + fc_mes0449, /* ptr to msg */ + fc_msgBlk0449.msgPreambleStr, /* begin varargs */ + binfo->fc_sparam.portName.nameType); /* end varargs */ + } + + fc_config_farp(binfo, mb); + if (issue_mb_cmd(binfo, mb, MBX_POLL) != MBX_SUCCESS) { + /* + * Let it go through even if failed. + */ + /* Adapter failed to init, mbxCmd FARP, mbxStatus */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0450, /* ptr to msg structure */ + fc_mes0450, /* ptr to msg */ + fc_msgBlk0450.msgPreambleStr, /* begin varargs */ + mb->mbxCommand, + mb->mbxStatus); /* end varargs */ + } + } + + if (p_dev_ctl->intr_inited != 1) { + /* Add our interrupt routine to kernel's interrupt chain & enable it */ + + + IHS.handler = fc_intr; + + if ((i_init((struct intr *) & IHS)) == INTR_FAIL) { + /* Enable interrupt handler failed */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0451, /* ptr to msg structure */ + fc_mes0451, /* ptr to msg */ + fc_msgBlk0451.msgPreambleStr); /* begin & end varargs */ + binfo->fc_ffstate = FC_ERROR; + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + fc_free_buffer(p_dev_ctl); + return(EIO); + } + p_dev_ctl->intr_inited = 1; + } + + fc_disable_tc(binfo, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, mb, MBX_POLL) != MBX_SUCCESS) { + binfo->fc_ffstate = FC_ERROR; + fc_ffcleanup(p_dev_ctl); + i_clear(&IHS); + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + fc_free_buffer(p_dev_ctl); + return(EIO); + } + + fc_read_config(binfo, (MAILBOX * )mb); + if (issue_mb_cmd(binfo, mb, MBX_POLL) != MBX_SUCCESS) { + /* Adapter failed to init, mbxCmd READ_CONFIG, mbxStatus */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0453, /* ptr to msg structure */ + fc_mes0453, /* ptr to msg */ + fc_msgBlk0453.msgPreambleStr, /* begin varargs */ + mb->mbxCommand, + mb->mbxStatus); /* end varargs */ + binfo->fc_ffstate = FC_ERROR; + fc_ffcleanup(p_dev_ctl); + i_clear(&IHS); + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + fc_free_buffer(p_dev_ctl); + return(EIO); + } + + if (mb->un.varRdConfig.lmt & LMT_2125_10bit) + /* HBA is 2G capable */ + binfo->fc_flag |= FC_2G_CAPABLE; + + binfo->fc_ffstate = FC_LINK_DOWN; + binfo->fc_flag |= FC_LNK_DOWN; + + /* Activate the adapter and allocate all the resources needed for ELS */ + fc_start(p_dev_ctl); + + /* Setup and issue mailbox INITIALIZE LINK command */ + fc_init_link(binfo, mb, clp[CFG_TOPOLOGY].a_current, + clp[CFG_LINK_SPEED].a_current); + if (issue_mb_cmd(binfo, mb, MBX_NOWAIT) != MBX_SUCCESS) { + /* Adapter failed to init, mbxCmd INIT_LINK, mbxStatus */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0454, /* ptr to msg structure */ + fc_mes0454, /* ptr to msg */ + fc_msgBlk0454.msgPreambleStr, /* begin varargs */ + mb->mbxCommand, + mb->mbxStatus); /* end varargs */ + binfo->fc_ffstate = FC_ERROR; + fc_ffcleanup(p_dev_ctl); + i_clear(&IHS); + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + fc_free_buffer(p_dev_ctl); + return(EIO); + } + + + /* Enable link attention interrupt */ + ipri = disable_lock(FC_LVL, &CMD_LOCK); + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + status = READ_CSR_REG(binfo, FC_HC_REG(binfo, ioa)); + status = status | HC_LAINT_ENA; + WRITE_CSR_REG(binfo, FC_HC_REG(binfo, ioa), status); + FC_UNMAP_MEMIO(ioa); + binfo->fc_process_LA = 1; + p_dev_ctl->fc_waitflogi = (FCCLOCK *)1; + unlock_enable(ipri, &CMD_LOCK); + + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + + binfo->fc_prevDID = Mask_DID; + /* If we are point to point, don't wait for link up */ + if ((clp[CFG_TOPOLOGY].a_current == FLAGS_TOPOLOGY_MODE_PT_PT) && + (clp[CFG_FCP_ON].a_current == 0)) { + goto out; + } + + flogi_sent = 0; + i = 0; + while (binfo->fc_ffstate != FC_READY) { + /* Check every second for 20 retries. */ + if ((i++ > 20) || + ((i >= 10) && (binfo->fc_ffstate <= FC_LINK_DOWN))) { + /* The link is down, so set linkdown timeout */ + rp = &binfo->fc_ring[FC_FCP_RING]; + RINGTMO = fc_clk_set(p_dev_ctl, rp->fc_ringtmo, fc_linkdown_timeout, 0, 0); + break; + } + ipri = disable_lock(FC_LVL, &CMD_LOCK); + if((i > 1) && (binfo->fc_ffstate == FC_FLOGI) && + (flogi_sent == 0) && (p_dev_ctl->power_up == 0)) { + if(p_dev_ctl->fc_waitflogi) { + if (p_dev_ctl->fc_waitflogi != (FCCLOCK *)1) + fc_clk_can(p_dev_ctl, p_dev_ctl->fc_waitflogi); + p_dev_ctl->fc_waitflogi = 0; + } + fc_snd_flogi(p_dev_ctl, 0, 0); + flogi_sent = 1; + rp = &binfo->fc_ring[FC_ELS_RING]; + if(RINGTMO) + fc_clk_res(p_dev_ctl, 20, RINGTMO); + } + unlock_enable(ipri, &CMD_LOCK); + + DELAYMS(1000); + } + +out: + ipri = disable_lock(FC_LVL, &CMD_LOCK); + if((binfo->fc_ffstate == FC_FLOGI) && (p_dev_ctl->power_up == 0)) { + fc_snd_flogi(p_dev_ctl, 0, 0); + } + p_dev_ctl->power_up = 1; + unlock_enable(ipri, &CMD_LOCK); + + return(0); +} /* End fc_ffinit */ + +/************************************************************************/ +/* */ +/* fc_binfo_init */ +/* This routine will initialize the binfo structure */ +/* */ +/************************************************************************/ +_local_ int +fc_binfo_init( +fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO * binfo; + iCfgParam * clp; + int idx; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + /* Initialize configuration parameters */ + if(binfo->fc_flag & FC_ESTABLISH_LINK) + binfo->fc_flag = FC_ESTABLISH_LINK; + else + binfo->fc_flag = 0; /* don't change nvram or tov */ + + binfo->fc_ffnumrings = MAX_CONFIGURED_RINGS - 1; /* number of rings */ + + /* Ring 0 - ELS */ + binfo->fc_nummask[0] = 4; + + binfo->fc_rval[0] = FC_ELS_REQ; /* ELS request */ + binfo->fc_tval[0] = FC_ELS_DATA; /* ELS */ + binfo->fc_rval[1] = FC_ELS_RSP; /* ELS response */ + binfo->fc_tval[1] = FC_ELS_DATA; /* ELS */ + binfo->fc_rval[2] = FC_UNSOL_CTL; /* NameServer Inquiries */ + binfo->fc_tval[2] = FC_COMMON_TRANSPORT_ULP; /* NameServer */ + binfo->fc_rval[3] = FC_SOL_CTL; /* NameServer response */ + binfo->fc_tval[3] = FC_COMMON_TRANSPORT_ULP; /* NameServer */ + if (binfo->fc_sli == 2) { + binfo->fc_ring[0].fc_numCiocb = SLI2_IOCB_CMD_R0_ENTRIES; + binfo->fc_ring[0].fc_numRiocb = SLI2_IOCB_RSP_R0_ENTRIES; + } else { + binfo->fc_ring[0].fc_numCiocb = IOCB_CMD_R0_ENTRIES; + binfo->fc_ring[0].fc_numRiocb = IOCB_RSP_R0_ENTRIES; + } + + /* Ring 1 - IP */ + if(clp[CFG_NETWORK_ON].a_current) { + binfo->fc_nummask[1] = 1; + idx = 5; + } else { + binfo->fc_nummask[1] = 0; + idx = 4; + } + binfo->fc_rval[4] = FC_UNSOL_DATA; /* Unsolicited Data */ + binfo->fc_tval[4] = FC_LLC_SNAP; /* LLC/SNAP */ + if (binfo->fc_sli == 2) { + binfo->fc_ring[1].fc_numCiocb = SLI2_IOCB_CMD_R1_ENTRIES; + binfo->fc_ring[1].fc_numRiocb = SLI2_IOCB_RSP_R1_ENTRIES; + if(clp[CFG_NETWORK_ON].a_current == 0) { + binfo->fc_ring[1].fc_numCiocb -= SLI2_IOCB_CMD_R1XTRA_ENTRIES; + binfo->fc_ring[1].fc_numRiocb -= SLI2_IOCB_RSP_R1XTRA_ENTRIES; + } + } else { + binfo->fc_ring[1].fc_numCiocb = IOCB_CMD_R1_ENTRIES; + binfo->fc_ring[1].fc_numRiocb = IOCB_RSP_R1_ENTRIES; + } + + /* Ring 2 - FCP */ + binfo->fc_nummask[2] = 0; + if (binfo->fc_sli == 2) { + binfo->fc_ring[2].fc_numCiocb = SLI2_IOCB_CMD_R2_ENTRIES; + binfo->fc_ring[2].fc_numRiocb = SLI2_IOCB_RSP_R2_ENTRIES; + if(clp[CFG_NETWORK_ON].a_current == 0) { + binfo->fc_ring[2].fc_numCiocb += SLI2_IOCB_CMD_R2XTRA_ENTRIES; + binfo->fc_ring[2].fc_numRiocb += SLI2_IOCB_RSP_R2XTRA_ENTRIES; + } + } else { + binfo->fc_ring[2].fc_numCiocb = IOCB_CMD_R2_ENTRIES; + binfo->fc_ring[2].fc_numRiocb = IOCB_RSP_R2_ENTRIES; + } + + + binfo->ipVersion = RNID_IPV4; + return(0); +} /* End fc_binfo_init */ + +/************************************************************************/ +/* */ +/* fc_parse_vpd */ +/* This routine will parse the VPD data */ +/* */ +/************************************************************************/ +_local_ int +fc_parse_vpd( +fc_dev_ctl_t *p_dev_ctl, +uchar *vpd) +{ + FC_BRD_INFO * binfo; + int finished = 0; + int index = 0; + uchar lenlo, lenhi; + unsigned char *Length; + int i, j; + + binfo = &BINFO; + /* Vital Product */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0455, /* ptr to msg structure */ + fc_mes0455, /* ptr to msg */ + fc_msgBlk0455.msgPreambleStr, /* begin varargs */ + (uint32)vpd[0], + (uint32)vpd[1], + (uint32)vpd[2], + (uint32)vpd[3]); /* end varargs */ + do { + switch (vpd[index]) { + case 0x82: + index += 1; + lenlo = vpd[index]; + index += 1; + lenhi = vpd[index]; + index += 1; + i = ((((unsigned short)lenhi) << 8) + lenlo); + index += i; + break; + case 0x90: + index += 1; + lenlo = vpd[index]; + index += 1; + lenhi = vpd[index]; + index += 1; + i = ((((unsigned short)lenhi) << 8) + lenlo); + do { + /* Look for Serial Number */ + if ((vpd[index] == 'S') && (vpd[index+1] == 'N')) { + index += 2; + Length = &vpd[index]; + index += 1; + i = *Length; + j = 0; + while(i--) { + binfo->fc_SerialNumber[j++] = vpd[index++]; + if(j == 31) + break; + } + binfo->fc_SerialNumber[j] = 0; + return(1); + } + else { + index += 2; + Length = &vpd[index]; + index += 1; + j = (int)(*Length); + index += j; + i -= (3 + j); + } + } while (i > 0); + finished = 0; + break; + case 0x78: + finished = 1; + break; + default: + return(0); + } + } while (!finished); + return(1); +} + +_static_ char fwrevision[32]; + +/* TAPE */ +_static_ char * +decode_firmware_rev( +FC_BRD_INFO *binfo, +fc_vpd_t *vp) +{ + uint32 b1, b2, b3, b4, ldata; + char c; + uint32 i, rev; + uint32 *ptr, str[4]; + + if ( vp->rev.rBit ) { + if (binfo->fc_sli == 2) + rev = vp->rev.sli2FwRev; + else + rev = vp->rev.sli1FwRev; + + b1 = (rev & 0x0000f000) >> 12; + b2 = (rev & 0x00000f00) >> 8; + b3 = (rev & 0x000000c0) >> 6; + b4 = (rev & 0x00000030) >> 4; + + switch (b4) { + case 0: + c = 'N'; + break; + case 1: + c = 'A'; + break; + case 2: + c = 'B'; + break; + case 3: + default: + c = 0; + break; + } + b4 = (rev & 0x0000000f); + + if (binfo->fc_sli == 2) { + for (i=0; i<16; i++) { + if (vp->rev.sli2FwName[i] == 0x20) { + vp->rev.sli2FwName[i] = 0; + } + } + ptr = (uint32 *)vp->rev.sli2FwName; + } else { + for (i=0; i<16; i++) { + if (vp->rev.sli1FwName[i] == 0x20) { + vp->rev.sli1FwName[i] = 0; + } + } + ptr = (uint32 *)vp->rev.sli1FwName; + } + for (i=0; i<3; i++) { + ldata = *ptr++; + ldata = SWAP_DATA(ldata); + str[i] = ldata; + } + + fwrevision[0] = (char)((int)'0' + b1); + fwrevision[1] = '.'; + fwrevision[2] = (char)((int)'0' + b2); + fwrevision[3] = (char)((int)'0' + b3); + if(c) { + fwrevision[4] = c; + fwrevision[5] = (char)((int)'0' + b4); + fwrevision[6] = 0; + } + else { + fwrevision[4] = 0; + } + } else { + rev = vp->rev.smFwRev; + + b1 = (rev & 0xff000000) >> 24; + b2 = (rev & 0x00f00000) >> 20; + b3 = (rev & 0x000f0000) >> 16; + c = (char)((rev & 0x0000ff00) >> 8); + b4 = (rev & 0x000000ff); + + fwrevision[0] = (char)((int)'0' + b1); + fwrevision[1] = '.'; + fwrevision[2] = (char)((int)'0' + b2); + fwrevision[3] = (char)((int)'0' + b3); + fwrevision[4] = c; + fwrevision[5] = (char)((int)'0' + b4); + fwrevision[6] = 0; + } + return(fwrevision); +} /* End decode_firmware_rev */ + + +/*****************************************************************************/ +/* + * NAME: fc_intr + * + * FUNCTION: Fibre Channel driver interrupt routine. + * + * EXECUTION ENVIRONMENT: interrupt only + * + * CALLED FROM: + * The FLIH + * + * INPUT: + * p_ihs - point to the interrupt structure. + * + * RETURNS: + * INTR_SUCC - our interrupt + * INTR_FAIL - not our interrupt + */ +/*****************************************************************************/ +_static_ int +fc_intr( +struct intr *p_ihs) /* This also points to device control area */ +{ + fc_dev_ctl_t * p_dev_ctl = (fc_dev_ctl_t * )p_ihs; + volatile uint32 ha_copy; + FC_BRD_INFO * binfo; + iCfgParam * clp; + fcipbuf_t * mbp; + MAILBOXQ * mb; + IOCBQ * delayiocb; + IOCBQ * temp; + IOCBQ * processiocb; + IOCBQ * endiocb; + void * ioa; + int ipri, rc; + + binfo = &BINFO; + + ipri = disable_lock(FC_LVL, &CMD_LOCK); + binfo->fc_flag |= FC_INTR_THREAD; + + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + + /* Read host attention register to determine interrupt source */ + ha_copy = READ_CSR_REG(binfo, FC_HA_REG(binfo, ioa)); + + /* Clear Attention Sources, except ERROR (to preserve status) & LATT */ + WRITE_CSR_REG(binfo, FC_HA_REG(binfo, ioa), + (ha_copy & ~HA_ERATT & ~HA_LATT)); + + FC_UNMAP_MEMIO(ioa); + + + if (ha_copy) { + rc = INTR_SUCC; + binfo->fc_flag |= FC_INTR_WORK; + } else { + clp = DD_CTL.p_config[binfo->fc_brd_no]; + if (clp[CFG_INTR_ACK].a_current && (binfo->fc_flag&FC_INTR_WORK)) { + rc = INTR_SUCC; /* Just claim the first non-working interrupt */ + binfo->fc_flag &= ~FC_INTR_WORK; + } else { + if (clp[CFG_INTR_ACK].a_current == 2) + rc = INTR_SUCC; /* Always claim the interrupt */ + else + rc = INTR_FAIL; + } + } + + if (binfo->fc_flag & FC_OFFLINE_MODE) { + binfo->fc_flag &= ~FC_INTR_THREAD; + unlock_enable(ipri, &CMD_LOCK); + return(INTR_FAIL); + } + + processiocb = 0; + if(binfo->fc_delayxmit) { + delayiocb = binfo->fc_delayxmit; + binfo->fc_delayxmit = 0; + endiocb = 0; + while(delayiocb) { + temp = delayiocb; + delayiocb = (IOCBQ *)temp->q; + temp->rsvd2--; + /* If retry == 0, process IOCB */ + if(temp->rsvd2 == 0) { + if(processiocb == 0) { + processiocb = temp; + } + else { + endiocb->q = (uchar *)temp; + } + endiocb = temp; + temp->q = 0; + } + else { + /* Make delayxmit point to first non-zero retry */ + if(binfo->fc_delayxmit == 0) + binfo->fc_delayxmit = temp; + } + } + if(processiocb) { + /* Handle any delayed IOCBs */ + endiocb = processiocb; + while(endiocb) { + temp = endiocb; + endiocb = (IOCBQ *)temp->q; + temp->q = 0; + issue_iocb_cmd(binfo, &binfo->fc_ring[FC_ELS_RING], temp); + } + } + } + + + if (ha_copy & HA_ERATT) { /* Link / board error */ + unlock_enable(ipri, &CMD_LOCK); + handle_ff_error(p_dev_ctl); + return (rc); + } else { + if (ha_copy & HA_MBATT) { /* Mailbox interrupt */ + handle_mb_event(p_dev_ctl); + if(binfo->fc_flag & FC_PENDING_RING0) { + binfo->fc_flag &= ~FC_PENDING_RING0; + ha_copy |= HA_R0ATT; /* event on ring 0 */ + } + } + + if (ha_copy & HA_LATT) { /* Link Attention interrupt */ + if (binfo->fc_process_LA) { + handle_link_event(p_dev_ctl); + } + } + + if (ha_copy & HA_R0ATT) { /* event on ring 0 */ + if(binfo->fc_mbox_active == 0) + handle_ring_event(p_dev_ctl, 0, (ha_copy & 0x0000000F)); + else + binfo->fc_flag |= FC_PENDING_RING0; + } + + if (ha_copy & HA_R1ATT) { /* event on ring 1 */ + /* This ring handles IP. Defer processing anything on this ring + * till all FCP ELS traffic settles down. + */ + if (binfo->fc_ffstate <= FC_NODE_DISC) + binfo->fc_deferip |= (uchar)((ha_copy >> 4) & 0x0000000F); + else + handle_ring_event(p_dev_ctl, 1, ((ha_copy >> 4) & 0x0000000F)); + } + + if (ha_copy & HA_R2ATT) { /* event on ring 2 */ + handle_ring_event(p_dev_ctl, 2, ((ha_copy >> 8) & 0x0000000F)); + } + + if (ha_copy & HA_R3ATT) { /* event on ring 3 */ + handle_ring_event(p_dev_ctl, 3, ((ha_copy >> 12) & 0x0000000F)); + } + } + + if((processiocb == 0) && (binfo->fc_delayxmit) && + (binfo->fc_mbox_active == 0)) { + if ((mb = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX))) { + fc_read_rpi(binfo, (uint32)1, (MAILBOX * )mb, (uint32)0); + if (issue_mb_cmd(binfo, (MAILBOX * )mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } + } + + binfo->fc_flag &= ~FC_INTR_THREAD; + + while (p_dev_ctl->mbufl_head != 0) { + binfo->fc_flag |= FC_INTR_WORK; + mbp = (fcipbuf_t * )p_dev_ctl->mbufl_head; + p_dev_ctl->mbufl_head = (uchar * )fcnextpkt(mbp); + fcnextpkt(mbp) = 0; + fc_xmit(p_dev_ctl, mbp); + } + p_dev_ctl->mbufl_tail = 0; + + + unlock_enable(ipri, &CMD_LOCK); + return(rc); +} /* End fc_intr */ + + + +/**************************************************/ +/** handle_ff_error **/ +/** **/ +/** Runs at Interrupt level **/ +/** **/ +/**************************************************/ +_static_ void +handle_ff_error( +fc_dev_ctl_t *p_dev_ctl) +{ + volatile uint32 status, status1, status2; + void *ioa; + FC_BRD_INFO * binfo; + iCfgParam * clp; + int ipri; + + ipri = disable_lock(FC_LVL, &CMD_LOCK); + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + status = p_dev_ctl->dpc_hstatus; + p_dev_ctl->dpc_hstatus = 0; + + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + status1 = READ_SLIM_ADDR(binfo, ((volatile uchar * )ioa + 0xa8)); + status2 = READ_SLIM_ADDR(binfo, ((volatile uchar * )ioa + 0xac)); + FC_UNMAP_MEMIO(ioa); + + + if (status & HS_FFER6) { + + + /* Re-establishing Link */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1301, /* ptr to msg structure */ + fc_mes1301, /* ptr to msg */ + fc_msgBlk1301.msgPreambleStr, /* begin varargs */ + status, + status1, + status2); /* end varargs */ + binfo->fc_flag |= FC_ESTABLISH_LINK; + fc_cfg_remove(p_dev_ctl); + + binfo->fc_flag |= FC_OFFLINE_MODE; + + lpfc_cfg_init(p_dev_ctl); + + unlock_enable(ipri, &CMD_LOCK); + } else { + /* Adapter Hardware Error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0457, /* ptr to msg structure */ + fc_mes0457, /* ptr to msg */ + fc_msgBlk0457.msgPreambleStr, /* begin varargs */ + status, + status1, + status2); /* end varargs */ + if (status & HS_FFER8) { /* Chipset error 8 */ + } else if (status & HS_FFER7) { /* Chipset error 7 */ + } else if (status & HS_FFER5) { /* Chipset error 5 */ + } else if (status & HS_FFER4) { /* Chipset error 4 */ + } else if (status & HS_FFER3) { /* Chipset error 3 */ + } else if (status & HS_FFER2) { /* Chipset error 2 */ + } else if (status & HS_FFER1) { /* Chipset error 1 */ + } + + fc_free_rpilist(p_dev_ctl, 0); + + p_dev_ctl->device_state = DEAD; + binfo->fc_ffstate = FC_ERROR; + unlock_enable(ipri, &CMD_LOCK); + } + +} /* End handle_ff_error */ + + +/**************************************************/ +/** handle_link_event **/ +/** **/ +/** Description: Process a Link Attention. **/ +/** **/ +/**************************************************/ +_static_ void +handle_link_event( +fc_dev_ctl_t *p_dev_ctl) +{ + /* called from host_interrupt, to process LATT */ + MAILBOX * mb; + FC_BRD_INFO * binfo; + void *ioa; + volatile uint32 control; + + binfo = &BINFO; + FCSTATCTR.linkEvent++; + + /* Get a buffer which will be used for mailbox commands */ + if ((mb = (MAILBOX * )fc_mem_get(binfo, MEM_MBOX | MEM_PRI))) { + if (fc_read_la(p_dev_ctl, mb) == 0) { + if (issue_mb_cmd(binfo, mb, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + /* Turn off Link Attention interrupts until CLEAR_LA done */ + binfo->fc_process_LA = 0; + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + control = READ_CSR_REG(binfo, FC_HC_REG(binfo, ioa)); + control &= ~HC_LAINT_ENA; + WRITE_CSR_REG(binfo, FC_HC_REG(binfo, ioa), control); + /* Clear Link Attention in HA REG */ + WRITE_CSR_REG(binfo, FC_HA_REG(binfo, ioa), + (volatile uint32)(HA_LATT)); + FC_UNMAP_MEMIO(ioa); + } + else { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mb); + } + } +} /* End handle_link_event */ + + +/**************************************************/ +/** handle_ring_event **/ +/** **/ +/** Description: Process a Ring Attention. **/ +/** **/ +/**************************************************/ +_static_ void +handle_ring_event( +fc_dev_ctl_t *p_dev_ctl, +int ring_no, +uint32 reg_mask) +{ + FC_BRD_INFO * binfo; + RING * rp; + IOCB * entry; + IOCBQ * saveq; + IOCBQ * temp; + void * ioa; + int fcpfound = 0; + uint32 * xx; + uint32 portGet; + volatile uint32 chipatt; + uint32 portRspPut; + + binfo = &BINFO; + /* called from host_interrupt() to process RxATT */ + + rp = &binfo->fc_ring[ring_no]; + temp = NULL; + fc_mpdata_sync(binfo->fc_slim2.dma_handle, 0, 0, DDI_DMA_SYNC_FORKERNEL); + + /* Gather iocb entries off response ring. + * Ensure entry is owned by the host. + */ + entry = (IOCB * )IOCB_ENTRY(rp->fc_rspringaddr, rp->fc_rspidx); + portRspPut = PCIMEM_LONG(((SLI2_SLIM * )binfo->fc_slim2.virt)->mbx.us.s2.port[ring_no].rspPutInx); + if (portRspPut >= rp->fc_numRiocb) { + return; + } + + while (rp->fc_rspidx != portRspPut) { + if((ring_no == 0) && (binfo->fc_mbox_active)) { + binfo->fc_flag |= FC_PENDING_RING0; + break; + } + /* get an iocb buffer to copy entry into */ + if ((temp = (IOCBQ * )fc_mem_get(binfo, MEM_IOCB | MEM_PRI)) == NULL) { + break; + } + + + fc_pcimem_bcopy((uint32 * )entry, (uint32 * ) & temp->iocb, sizeof(IOCB)); + temp->q = NULL; + + /* bump iocb available response index */ + if (++rp->fc_rspidx >= rp->fc_numRiocb) { + rp->fc_rspidx = 0; + } + + /* SLIM POINTER */ + if (binfo->fc_busflag & FC_HOSTPTR) { + ((SLI2_SLIM * )binfo->fc_slim2.virt)->mbx.us.s2.host[ring_no].rspGetInx = + PCIMEM_LONG(rp->fc_rspidx); + } else { + void * ioa2; + + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + ioa2 = (void *)((char *)ioa + ((SLIMOFF+(ring_no*2)+1)*4)); + WRITE_SLIM_ADDR(binfo, (volatile uint32 *)ioa2, rp->fc_rspidx); + FC_UNMAP_MEMIO(ioa); + } + + /* chain all iocb entries until LE is set */ + if (rp->fc_iocbhd == NULL) { + rp->fc_iocbhd = temp; + rp->fc_iocbtl = temp; + } else { + rp->fc_iocbtl->q = (uchar * )temp; + rp->fc_iocbtl = temp; + } + + /* when LE is set, entire Command has been received */ + if (temp->iocb.ulpLe) { + saveq = rp->fc_iocbhd; + + rp->fc_iocbhd = NULL; + rp->fc_iocbtl = NULL; + + /* get a ptr to first iocb entry in chain and process it */ + xx = (uint32 * ) & saveq->iocb; + fcpfound = fc_proc_ring_event(p_dev_ctl, rp, saveq); + + /* Free up iocb buffer chain for command just processed */ + while (saveq) { + temp = saveq; + saveq = (IOCBQ * )temp->q; + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + } + + } /* Entire Command has been received */ + + entry = (IOCB * )IOCB_ENTRY(rp->fc_rspringaddr, rp->fc_rspidx); + + } /* While(entry->ulpOwner == 0) */ + + if ((temp != NULL) && (reg_mask & HA_R0RE_REQ)) { + /* At least one response entry has been freed */ + FCSTATCTR.chipRingFree++; + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + /* SET R0RE_RSP in Chip Att register */ + chipatt = ((CA_R0ATT | CA_R0RE_RSP) << (ring_no * 4)); + WRITE_CSR_REG(binfo, FC_FF_REG(binfo, ioa), chipatt); + FC_UNMAP_MEMIO(ioa); + } + + if (reg_mask != 0xffffffff) { + if (fcpfound) { + fc_issue_cmd(p_dev_ctl); + } else if (reg_mask & HA_R0CE_RSP) { + FCSTATCTR.hostRingFree++; + /* Cmd ring is available, queue any available cmds */ + portGet = issue_iocb_cmd(binfo, rp, 0); + if(portGet != PCIMEM_LONG(((SLI2_SLIM * )binfo->fc_slim2.virt)->mbx.us.s2.port[rp->fc_ringno].cmdGetInx)) { + issue_iocb_cmd(binfo, rp, 0); + } + } + FCSTATCTR.ringEvent++; + } + + return; +} /* End handle_ring_event */ + +_static_ int +fc_proc_ring_event( +fc_dev_ctl_t *p_dev_ctl, +RING *rp, +IOCBQ *saveq) +{ + FC_BRD_INFO * binfo; + NODELIST * ndlp; + IOCB * cmd; + int rc; + + binfo = &BINFO; + cmd = &saveq->iocb; + rc = 0; + FCSTATCTR.iocbRsp++; + + switch (cmd->ulpCommand) { + case CMD_FCP_ICMND_CR: + case CMD_FCP_ICMND_CX: + case CMD_FCP_IREAD_CR: + case CMD_FCP_IREAD_CX: + case CMD_FCP_IWRITE_CR: + case CMD_FCP_IWRITE_CX: + case CMD_FCP_ICMND64_CR: + case CMD_FCP_ICMND64_CX: + case CMD_FCP_IREAD64_CR: + case CMD_FCP_IREAD64_CX: + case CMD_FCP_IWRITE64_CR: + case CMD_FCP_IWRITE64_CX: + handle_fcp_event(p_dev_ctl, rp, saveq); + rc = 1; + break; + + case CMD_RCV_SEQUENCE_CX: /* received incoming frame */ + case CMD_RCV_SEQUENCE64_CX: /* received incoming frame */ + switch(rp->fc_ringno) { + case FC_ELS_RING: + handle_elsrcv_seq(p_dev_ctl, rp, saveq); + break; + case FC_IP_RING: + handle_iprcv_seq(p_dev_ctl, rp, saveq); + break; + } + break; + + case CMD_XMIT_BCAST_CN: /* process xmit completion */ + case CMD_XMIT_BCAST_CX: + case CMD_XMIT_SEQUENCE_CX: + case CMD_XMIT_SEQUENCE_CR: + case CMD_XMIT_BCAST64_CN: /* process xmit completion */ + case CMD_XMIT_BCAST64_CX: + case CMD_XMIT_SEQUENCE64_CX: + case CMD_XMIT_SEQUENCE64_CR: + handle_xmit_cmpl(p_dev_ctl, rp, saveq); + break; + + case CMD_RCV_ELS_REQ_CX: /* received an els frame */ + case CMD_RCV_ELS_REQ64_CX: /* received an els frame */ + handle_rcv_els_req(p_dev_ctl, rp, saveq); + break; + + case CMD_CREATE_XRI_CR: + case CMD_CREATE_XRI_CX: + handle_create_xri(p_dev_ctl, rp, saveq); + break; + + case CMD_ELS_REQUEST_CR: /* xmit els frame completion */ + case CMD_ELS_REQUEST_CX: + case CMD_XMIT_ELS_RSP_CX: + case CMD_ELS_REQUEST64_CR: + case CMD_ELS_REQUEST64_CX: + case CMD_XMIT_ELS_RSP64_CX: + case CMD_GEN_REQUEST64_CR: + case CMD_GEN_REQUEST64_CX: + handle_els_event(p_dev_ctl, rp, saveq); + break; + + case CMD_ABORT_XRI_CN: /* Abort fcp command */ + break; + + case CMD_ABORT_XRI_CX: /* Abort command */ + break; + + case CMD_XRI_ABORTED_CX: /* Handle ABORT condition */ + /* + * If we find an NODELIST entry that matches the aborted + * XRI, clear out the Xri field. + */ + if (((ndlp = fc_findnode_oxri(binfo, NLP_SEARCH_UNMAPPED | NLP_SEARCH_MAPPED, + cmd->ulpContext)) != NULL) && !(ndlp->nlp_flag & NLP_RPI_XRI)) { + ndlp->nlp_Xri = 0; /* xri */ + /* establish a new exchange */ + if ((ndlp->nlp_Rpi) && + ((ndlp->nlp_DID & CT_DID_MASK) != CT_DID_MASK) && + (binfo->fc_ffstate == FC_READY)) { + ndlp->nlp_flag |= NLP_RPI_XRI; + fc_create_xri(binfo, &binfo->fc_ring[FC_ELS_RING], ndlp); + } + } + break; + + case CMD_ADAPTER_MSG: + if ((binfo->fc_msgidx + MAX_MSG_DATA) <= FC_MAX_ADPTMSG) { + fc_bcopy((uchar * )cmd, &binfo->fc_adaptermsg[binfo->fc_msgidx], + MAX_MSG_DATA); + binfo->fc_msgidx += MAX_MSG_DATA; + con_print("lpfc%d: %s", binfo->fc_brd_no, binfo->fc_adaptermsg); + fc_bzero((void *)binfo->fc_adaptermsg, FC_MAX_ADPTMSG); + binfo->fc_msgidx = 0; + } else { + con_print("lpfc%d: %s\n", binfo->fc_brd_no, binfo->fc_adaptermsg); + fc_bzero(binfo->fc_adaptermsg, FC_MAX_ADPTMSG); + binfo->fc_msgidx = 0; + } + break; + + + default: + /* Unknown IOCB command */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1400, /* ptr to msg structure */ + fc_mes1400, /* ptr to msg */ + fc_msgBlk1400.msgPreambleStr, /* begin varargs */ + cmd->ulpCommand, + cmd->ulpStatus, + cmd->ulpIoTag, + cmd->ulpContext); /* end varargs */ + break; + } /* switch(cmd->ulpCommand) */ + + return(rc); +} /* End fc_proc_ring_event */ + + +/**************************************************/ +/** handle_mb_event **/ +/** **/ +/** Description: Process a Mailbox Attention. **/ +/** Called from host_interrupt to process MBATT **/ +/** **/ +/** Returns: **/ +/** **/ +/**************************************************/ +_static_ int +handle_mb_event( +fc_dev_ctl_t *p_dev_ctl) +{ + FC_BRD_INFO * binfo; + MAILBOX * mb; + MAILBOX * swpmb; + MAILBOXQ * mbox; + IOCBQ * iocbq; + NODELIST * ndlp; + void *ioa; + uint32 control; + volatile uint32 word0; + volatile uint32 ldata; + volatile uint32 ldid; + volatile uint32 lrpi; + iCfgParam * clp; + + binfo = &BINFO; + clp = DD_CTL.p_config[binfo->fc_brd_no]; + + if (binfo->fc_flag & FC_SLI2) { + fc_mpdata_sync(binfo->fc_slim2.dma_handle, 0, 0, DDI_DMA_SYNC_FORKERNEL); + /* First copy command data */ + mb = FC_SLI2_MAILBOX(binfo); + word0 = *((volatile uint32 * )mb); + word0 = PCIMEM_LONG(word0); + } else { + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + mb = FC_MAILBOX(binfo, ioa); + word0 = READ_SLIM_ADDR(binfo, ((volatile uint32 * )mb)); + FC_UNMAP_MEMIO(ioa); + } + + swpmb = (MAILBOX * ) & word0; + + FCSTATCTR.mboxEvent++; + + /* Sanity check to ensure the host owns the mailbox */ + if (swpmb->mbxOwner != OWN_HOST) { + int i; + + for(i=0; i<10240;i++) { + if (binfo->fc_flag & FC_SLI2) { + fc_mpdata_sync(binfo->fc_slim2.dma_handle, 0, 0, DDI_DMA_SYNC_FORKERNEL); + /* First copy command data */ + mb = FC_SLI2_MAILBOX(binfo); + word0 = *((volatile uint32 * )mb); + word0 = PCIMEM_LONG(word0); + } else { + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + mb = FC_MAILBOX(binfo, ioa); + word0 = READ_SLIM_ADDR(binfo, ((volatile uint32 * )mb)); + FC_UNMAP_MEMIO(ioa); + } + + swpmb = (MAILBOX * ) & word0; + if (swpmb->mbxOwner == OWN_HOST) + goto out; + } + /* Stray Mailbox Interrupt, mbxCommand mbxStatus */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0304, /* ptr to msg structure */ + fc_mes0304, /* ptr to msg */ + fc_msgBlk0304.msgPreambleStr, /* begin varargs */ + swpmb->mbxCommand, + swpmb->mbxStatus); /* end varargs */ + return(1); + } + +out: + + /* stop watchdog timer */ + if(MBOXTMO) { + fc_clk_can(p_dev_ctl, MBOXTMO); + MBOXTMO = 0; + } + + if (swpmb->mbxStatus) { + if (swpmb->mbxStatus == MBXERR_NO_RESOURCES) { + FCSTATCTR.mboxStatErr++; + /* Mbox cmd cmpl error - RETRYing */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0305, /* ptr to msg structure */ + fc_mes0305, /* ptr to msg */ + fc_msgBlk0305.msgPreambleStr, /* begin varargs */ + swpmb->mbxCommand, + word0, + binfo->fc_ffstate, + binfo->fc_flag); /* end varargs */ + if ((mbox = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX))) { + if (binfo->fc_flag & FC_SLI2) { + /* First copy mbox command data */ + mb = FC_SLI2_MAILBOX(binfo); + fc_pcimem_bcopy((uint32 * )mb, (uint32 * )mbox, + (sizeof(uint32) * (MAILBOX_CMD_WSIZE))); + } else { + /* First copy mbox command data */ + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + mb = FC_MAILBOX(binfo, ioa); + READ_SLIM_COPY(binfo, (uint32 *)mbox, (uint32 *)mb, + MAILBOX_CMD_WSIZE); + FC_UNMAP_MEMIO(ioa); + } + switch(((MAILBOX *)mbox)->mbxCommand) { + case MBX_READ_SPARM: + control = ((MAILBOX *)mbox)->un.varRdSparm.un.sp.bdeSize; + if(control == 0) { + fc_read_sparam(p_dev_ctl, (MAILBOX *)mbox); + } + case MBX_READ_SPARM64: + control = ((MAILBOX *)mbox)->un.varRdSparm.un.sp64.tus.f.bdeSize; + if(control == 0) { + fc_read_sparam(p_dev_ctl, (MAILBOX *)mbox); + } + case MBX_REG_LOGIN: + control = ((MAILBOX *)mbox)->un.varRegLogin.un.sp.bdeSize; + if(control == 0) { + goto mbout; + } + case MBX_REG_LOGIN64: + control = ((MAILBOX *)mbox)->un.varRegLogin.un.sp64.tus.f.bdeSize; + if(control == 0) { + goto mbout; + } + case MBX_READ_LA: + control = ((MAILBOX *)mbox)->un.varReadLA.un.lilpBde.bdeSize; + if(control == 0) { + fc_read_la(p_dev_ctl, (MAILBOX *)mbox); + } + case MBX_READ_LA64: + control = ((MAILBOX *)mbox)->un.varReadLA.un.lilpBde64.tus.f.bdeSize; + if(control == 0) { + fc_read_la(p_dev_ctl, (MAILBOX *)mbox); + } + } + ((MAILBOX *)mbox)->mbxOwner = OWN_HOST; + ((MAILBOX *)mbox)->mbxStatus = 0; + mbox->bp = (uchar * )binfo->fc_mbbp; + binfo->fc_mbox_active = 0; + if (issue_mb_cmd(binfo, (MAILBOX * )mbox, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mbox); + } + return(0); + } + } + if (!((swpmb->mbxCommand == MBX_CLEAR_LA) && + (swpmb->mbxStatus == 0x1601))) { + /* Mbox cmd cmpl error */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0306, /* ptr to msg structure */ + fc_mes0306, /* ptr to msg */ + fc_msgBlk0306.msgPreambleStr, /* begin varargs */ + swpmb->mbxCommand, + word0, + binfo->fc_ffstate, + binfo->fc_flag); /* end varargs */ + FCSTATCTR.mboxStatErr++; + switch (swpmb->mbxCommand) { + case MBX_REG_LOGIN: + case MBX_REG_LOGIN64: + if (binfo->fc_flag & FC_SLI2) { + /* First copy command data */ + mb = FC_SLI2_MAILBOX(binfo); + ldata = mb->un.varWords[1]; /* get did */ + ldata = PCIMEM_LONG(ldata); + } else { + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + mb = FC_MAILBOX(binfo, ioa); + ldata = READ_SLIM_ADDR(binfo, &mb->un.varWords[1]); + FC_UNMAP_MEMIO(ioa); + } + + ldid = ldata & Mask_DID; + if ((ndlp=fc_findnode_odid(binfo,(NLP_SEARCH_MAPPED | NLP_SEARCH_UNMAPPED), ldid))) { + if (ndlp->nlp_action & NLP_DO_DISC_START) { + /* Goto next entry */ + fc_nextnode(p_dev_ctl, ndlp); + } + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + } + break; + + case MBX_UNREG_LOGIN: + if (binfo->fc_flag & FC_SLI2) { + /* First copy command data */ + mb = FC_SLI2_MAILBOX(binfo); + ldata = mb->un.varWords[0]; /* get rpi */ + ldata = PCIMEM_LONG(ldata); + } else { + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + mb = FC_MAILBOX(binfo, ioa); + ldata = READ_SLIM_ADDR(binfo, &mb->un.varWords[0]); + FC_UNMAP_MEMIO(ioa); + } + + lrpi = ldata & 0xffff; + + if ((ndlp = fc_findnode_rpi(binfo, lrpi)) == 0) + break; + binfo->fc_nlplookup[ndlp->nlp_Rpi] = 0; + ndlp->nlp_Rpi = 0; + fc_freenode(binfo, ndlp, 0); + ndlp->nlp_state = NLP_LIMBO; + fc_nlp_bind(binfo, ndlp); + break; + + case MBX_READ_LA: + case MBX_READ_LA64: + case MBX_CLEAR_LA: + /* Turn on Link Attention interrupts */ + binfo->fc_process_LA = 1; + + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + control = READ_CSR_REG(binfo, FC_HC_REG(binfo, ioa)); + control |= HC_LAINT_ENA; + WRITE_CSR_REG(binfo, FC_HC_REG(binfo, ioa), control); + FC_UNMAP_MEMIO(ioa); + break; + + case MBX_INIT_LINK: + if (binfo->fc_flag & FC_SLI2) { + if ((clp[CFG_LINK_SPEED].a_current > 0) && + ((swpmb->mbxStatus == 0x0011) || (swpmb->mbxStatus == 0x0500))) { + /* Reset link speed to auto. 1G node detected in loop. */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk1302, /* ptr to msg structure */ + fc_mes1302, /* ptr to msg */ + fc_msgBlk1302.msgPreambleStr); /* begin & end varargs */ + clp[CFG_LINK_SPEED].a_current = LINK_SPEED_AUTO; + if ((mbox = (MAILBOXQ * )fc_mem_get(binfo, MEM_MBOX))) { + /* First copy mbox command data */ + mb = FC_SLI2_MAILBOX(binfo); + fc_pcimem_bcopy((uint32 * )mb, (uint32 * )mbox, + (sizeof(uint32) * (MAILBOX_CMD_WSIZE))); + ((MAILBOX *)mbox)->un.varInitLnk.link_flags &= ~FLAGS_LINK_SPEED; + ((MAILBOX *)mbox)->un.varInitLnk.link_speed = 0; /* LINK_SPEED_AUTO */ + ((MAILBOX *)mbox)->mbxOwner = OWN_HOST; + ((MAILBOX *)mbox)->mbxStatus = 0; + mbox->bp = (uchar * )binfo->fc_mbbp; + binfo->fc_mbox_active = 0; + if (issue_mb_cmd(binfo, (MAILBOX * )mbox, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mbox); + } + return(0); + } + } + } + break; + } + if (binfo->fc_mbbp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )binfo->fc_mbbp); + binfo->fc_mbbp = 0; + } + goto mbout; + } + } + + /* Mbox cmd cmpl */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0307, /* ptr to msg structure */ + fc_mes0307, /* ptr to msg */ + fc_msgBlk0307.msgPreambleStr, /* begin varargs */ + swpmb->mbxCommand, + word0, + binfo->fc_ffstate, + binfo->fc_flag); /* end varargs */ + + if(binfo->fc_mbox_active == 2) { + MAILBOX *mbslim; + + /* command was issued by dfc layer, so save mbox cmpl */ + if ((binfo->fc_flag & FC_SLI2) && (!(binfo->fc_flag & FC_OFFLINE_MODE))) { + /* First copy command data */ + mbslim = FC_SLI2_MAILBOX(binfo); + /* copy results back to user */ + fc_pcimem_bcopy((uint32 * )mbslim, (uint32 * )&p_dev_ctl->dfcmb, + (sizeof(uint32) * MAILBOX_CMD_WSIZE)); + } else { + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + mbslim = FC_MAILBOX(binfo, ioa); + /* copy results back to user */ + READ_SLIM_COPY(binfo, (uint32 * )&p_dev_ctl->dfcmb, (uint32 * )mbslim, + MAILBOX_CMD_WSIZE); + FC_UNMAP_MEMIO(ioa); + } + } + else { + handle_mb_cmd(p_dev_ctl, swpmb, (uint32)swpmb->mbxCommand); + } + + +mbout: + /* Process next mailbox command if there is one */ + binfo->fc_mbox_active = 0; + if ((mbox = fc_mbox_get(binfo))) { + if (issue_mb_cmd(binfo, (MAILBOX * )mbox, MBX_NOWAIT) != MBX_BUSY) { + fc_mem_put(binfo, MEM_MBOX, (uchar * )mbox); + } + } else { + if (binfo->fc_flag & FC_DELAY_PLOGI) { + binfo->fc_flag &= ~FC_DELAY_PLOGI; + if((binfo->fc_flag & FC_RSCN_MODE) && (binfo->fc_ffstate == FC_READY)) + fc_nextrscn(p_dev_ctl, fc_max_els_sent); + else + fc_nextdisc(p_dev_ctl, fc_max_els_sent); + } + if (binfo->fc_flag & FC_DELAY_NSLOGI) { + if ((iocbq = fc_plogi_get(binfo))) { + fc_els_cmd(binfo, ELS_CMD_PLOGI, + (void *)((ulong)iocbq->iocb.un.elsreq.remoteID), + (uint32)0, (ushort)0, (NODELIST *)0); + fc_mem_put(binfo, MEM_IOCB, (uchar * )iocbq); + } + else { + binfo->fc_flag &= ~FC_DELAY_NSLOGI; + } + } + if (binfo->fc_flag & FC_DELAY_RSCN) { + IOCBQ *temp; + IOCB *iocb; + MATCHMAP *mp; + RING *rp; + int i; + + rp = &binfo->fc_ring[FC_ELS_RING]; + binfo->fc_flag &= ~FC_DELAY_RSCN; + while (binfo->fc_rscn.q_first) { + temp = (IOCBQ * )binfo->fc_rscn.q_first; + if ((binfo->fc_rscn.q_first = temp->q) == 0) { + binfo->fc_rscn.q_last = 0; + } + binfo->fc_rscn.q_cnt--; + iocb = &temp->iocb; + mp = *((MATCHMAP **)iocb); + *((MATCHMAP **)iocb) = 0; + temp->q = NULL; + fc_process_rscn(p_dev_ctl, temp, mp); + + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + + i = 1; + /* free resources associated with this iocb and repost the ring buffers */ + if (!(binfo->fc_flag & FC_SLI2)) { + for (i = 1; i < (int)iocb->ulpBdeCount; i++) { + mp = fc_getvaddr(p_dev_ctl, rp, (uchar * )((ulong)iocb->un.cont[i].bdeAddress)); + if (mp) { + fc_mem_put(binfo, MEM_BUF, (uchar * )mp); + } + } + } + fc_mem_put(binfo, MEM_IOCB, (uchar * )temp); + } + } + } + return(0); +} /* End handle_mb_event */ + + +/**********************************************************/ +/** issue_mb_cmd Issue a mailbox command. **/ +/** If the mailbox is currently busy, **/ +/** queue command to mbox queue. **/ +/**********************************************************/ +_static_ int +issue_mb_cmd( +FC_BRD_INFO *binfo, +MAILBOX *mb, +int flag) +{ + MAILBOX * mbox; + MAILBOXQ * mbq; + int i; + void *ioa; + uint32 status, evtctr; + uint32 ha_copy; + fc_dev_ctl_t *p_dev_ctl; + volatile uint32 word0, ldata; + + mbq = (MAILBOXQ * )mb; + status = MBX_SUCCESS; + + if (binfo->fc_mbox_active) { + /* Another mailbox command is still being processed, queue this + * command to be processed later. + */ + fc_mbox_put(binfo, mbq); + + /* Mbox cmd issue - BUSY */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0308, /* ptr to msg structure */ + fc_mes0308, /* ptr to msg */ + fc_msgBlk0308.msgPreambleStr, /* begin varargs */ + mb->mbxCommand, + binfo->fc_ffstate, + binfo->fc_flag, + flag); /* end varargs */ + FCSTATCTR.mboxCmdBusy++; + + return(MBX_BUSY); + } + + binfo->fc_mbox_active = 1; + p_dev_ctl = (fc_dev_ctl_t *)(binfo->fc_p_dev_ctl); + + /* Mailbox cmd issue */ + fc_log_printf_msg_vargs( binfo->fc_brd_no, + &fc_msgBlk0309, /* ptr to msg structure */ + fc_mes0309, /* ptr to msg */ + fc_msgBlk0309.msgPreambleStr, /* begin varargs */ + mb->mbxCommand, + binfo->fc_ffstate, + binfo->fc_flag, + flag); /* end varargs */ + /* If we are not polling, turn on watchdog timer */ + if (flag != MBX_POLL) { + MBOXTMO = fc_clk_set(p_dev_ctl, MBOX_TMO_DFT, fc_mbox_timeout, 0, 0); + } + + FCSTATCTR.issueMboxCmd++; + evtctr = FCSTATCTR.mboxEvent; + + /* if there is one, save buffer to release in completion */ + if (mbq->bp) { + binfo->fc_mbbp = mbq->bp; + mbq->bp = 0; + } + + /* next set own bit for the adapter and copy over command word */ + mb->mbxOwner = OWN_CHIP; + + if (binfo->fc_flag & FC_SLI2) { + /* First copy command data */ + mbox = FC_SLI2_MAILBOX(binfo); + fc_pcimem_bcopy((uint32 * )mb, (uint32 * )mbox, + (sizeof(uint32) * (MAILBOX_CMD_WSIZE))); + fc_mpdata_sync(binfo->fc_slim2.dma_handle, 0, 0, DDI_DMA_SYNC_FORDEV); + } else { + if (mb->mbxCommand == MBX_CONFIG_PORT) { + /* copy command data into host mbox for cmpl */ + fc_pcimem_bcopy((uint32 * )mb, + (uint32 * ) & ((SLI2_SLIM * )binfo->fc_slim2.virt)->mbx, + (sizeof(uint32) * (MAILBOX_CMD_WSIZE))); + } + + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + + mbox = FC_MAILBOX(binfo, ioa); + WRITE_SLIM_COPY(binfo, &mb->un.varWords, &mbox->un.varWords, + (MAILBOX_CMD_WSIZE - 1)); + + + /* copy over last word, with mbxOwner set */ + ldata = *((volatile uint32 * )mb); + + WRITE_SLIM_ADDR(binfo, ((volatile uint32 * )mbox), ldata); + FC_UNMAP_MEMIO(ioa); + + if (mb->mbxCommand == MBX_CONFIG_PORT) { + /* switch over to host mailbox */ + binfo->fc_mboxaddr = (uint32 *)&((SLI2_SLIM * )binfo->fc_slim2.virt)->mbx; + binfo->fc_flag |= FC_SLI2; + } + } + + + /* interrupt board to doit right away */ + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + WRITE_CSR_REG(binfo, FC_FF_REG(binfo, ioa), CA_MBATT); + FC_UNMAP_MEMIO(ioa); + + switch (flag) { + case MBX_SLEEP: + case MBX_NOWAIT: + break; + + case MBX_POLL: + i = 0; + if (binfo->fc_flag & FC_SLI2) { + fc_mpdata_sync(binfo->fc_slim2.dma_handle, 0, 0, + DDI_DMA_SYNC_FORKERNEL); + + /* First copy command data */ + mbox = FC_SLI2_MAILBOX(binfo); + word0 = *((volatile uint32 * )mbox); + word0 = PCIMEM_LONG(word0); + } else { + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + mbox = FC_MAILBOX(binfo, ioa); + word0 = READ_SLIM_ADDR(binfo, ((volatile uint32 * )mbox)); + FC_UNMAP_MEMIO(ioa); + } + + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + ha_copy = READ_CSR_REG(binfo, FC_HA_REG(binfo, ioa)); + FC_UNMAP_MEMIO(ioa); + + /* Wait for command to complete */ + while (((word0 & OWN_CHIP) == OWN_CHIP) || !(ha_copy & HA_MBATT)) { + if (i++ >= 100) { + binfo->fc_mbox_active = 0; + return(MBX_NOT_FINISHED); + } + + /* Check if we took a mbox interrupt while we were polling */ + if(((word0 & OWN_CHIP) != OWN_CHIP) && (evtctr != FCSTATCTR.mboxEvent)) + break; + + DELAYMS(i); + + if (binfo->fc_flag & FC_SLI2) { + fc_mpdata_sync(binfo->fc_slim2.dma_handle, 0, 0, + DDI_DMA_SYNC_FORKERNEL); + + /* First copy command data */ + mbox = FC_SLI2_MAILBOX(binfo); + word0 = *((volatile uint32 * )mbox); + word0 = PCIMEM_LONG(word0); + } else { + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + mbox = FC_MAILBOX(binfo, ioa); + word0 = READ_SLIM_ADDR(binfo, ((volatile uint32 * )mbox)); + FC_UNMAP_MEMIO(ioa); + } + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + ha_copy = READ_CSR_REG(binfo, FC_HA_REG(binfo, ioa)); + FC_UNMAP_MEMIO(ioa); + } + + if (binfo->fc_flag & FC_SLI2) { + fc_mpdata_sync(binfo->fc_slim2.dma_handle, 0, 0, + DDI_DMA_SYNC_FORKERNEL); + + /* First copy command data */ + mbox = FC_SLI2_MAILBOX(binfo); + /* copy results back to user */ + fc_pcimem_bcopy((uint32 * )mbox, (uint32 * )mb, + (sizeof(uint32) * MAILBOX_CMD_WSIZE)); + } else { + /* First copy command data */ + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + mbox = FC_MAILBOX(binfo, ioa); + /* copy results back to user */ + READ_SLIM_COPY(binfo, (uint32 * )mb, (uint32 * )mbox, MAILBOX_CMD_WSIZE); + FC_UNMAP_MEMIO(ioa); + } + + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + WRITE_CSR_REG(binfo, FC_HA_REG(binfo, ioa), HA_MBATT); + FC_UNMAP_MEMIO(ioa); + + binfo->fc_mbox_active = 0; + status = mb->mbxStatus; + break; + } + return(status); +} /* End issue_mb_cmd */ + + +/* + * This routine will issue as many iocb commands from the + * ring's xmit queue to the adapter as it can. + * If iocb_cmd is specified it will be queued to the xmit queue. + */ +_static_ uint32 +issue_iocb_cmd( +FC_BRD_INFO *binfo, +RING *rp, +IOCBQ *iocb_cmd) +{ + IOCB * iocb; + IOCB * icmd; + void * ioa; + uint32 status; + uint32 * xx; + int onetime; + uint32 portCmdGet, rc; + fc_dev_ctl_t *p_dev_ctl; + + rc = PCIMEM_LONG(((SLI2_SLIM * )binfo->fc_slim2.virt)->mbx.us.s2.port[rp->fc_ringno].cmdGetInx); + onetime = 0; + if ((binfo->fc_flag & FC_LNK_DOWN) || + (binfo->fc_ffstate < rp->fc_xmitstate)) { + if (iocb_cmd) { + icmd = &iocb_cmd->iocb; + if ((icmd->ulpCommand != CMD_QUE_RING_BUF_CN) && + (icmd->ulpCommand != CMD_QUE_RING_BUF64_CN) && + (icmd->ulpCommand != CMD_CREATE_XRI_CR)) { + fc_ringtx_put(rp, iocb_cmd); + + FCSTATCTR.NoIssueIocb++; + /* If link is down, just return */ + return(rc); + } + onetime = 1; + } else { + /* If link is down, just return */ + return(rc); + } + } else { + if (iocb_cmd) { + /* Queue command to ring xmit queue */ + fc_ringtx_put(rp, iocb_cmd); + } + if((binfo->fc_process_LA == 0) && + (rp->fc_ringno == FC_FCP_RING)) { + return(rc); + } + } + + p_dev_ctl = (fc_dev_ctl_t *)(binfo->fc_p_dev_ctl); + fc_mpdata_sync(binfo->fc_slim2.dma_handle, 0, 0, DDI_DMA_SYNC_FORKERNEL); + + /* onetime should only be set for QUE_RING_BUF or CREATE_XRI + * iocbs sent with link down. + */ + + /* get the next available command iocb */ + iocb = (IOCB * )IOCB_ENTRY(rp->fc_cmdringaddr, rp->fc_cmdidx); + + portCmdGet = rc; + + if (portCmdGet >= rp->fc_numCiocb) { + if (iocb_cmd) { + /* Queue command to ring xmit queue */ + fc_ringtx_put(rp, iocb_cmd); + } + return(rc); + } + + /* bump iocb available command index */ + if (++rp->fc_cmdidx >= rp->fc_numCiocb) { + rp->fc_cmdidx = 0; + } + + /* While IOCB entries are available */ + while (rp->fc_cmdidx != portCmdGet) { + /* get next command from ring xmit queue */ + if ((onetime == 0) && ((iocb_cmd = fc_ringtx_get(rp)) == NULL)) { +out: + fc_mpdata_sync(binfo->fc_slim2.dma_handle, 0, 0, + DDI_DMA_SYNC_FORKERNEL); + fc_mpdata_sync(binfo->fc_slim2.dma_handle, 0, 0, + DDI_DMA_SYNC_FORDEV); + + /* SLIM POINTER */ + if (binfo->fc_busflag & FC_HOSTPTR) { + rp->fc_cmdidx = + (uchar)PCIMEM_LONG(((SLI2_SLIM * )binfo->fc_slim2.virt)->mbx.us.s2.host[rp->fc_ringno].cmdPutInx); + } else { + void *ioa2; + + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + ioa2 = (void *)((char *)ioa +((SLIMOFF+(rp->fc_ringno*2))*4)); + rp->fc_cmdidx = (uchar)READ_SLIM_ADDR(binfo, (volatile uint32 *)ioa2); + FC_UNMAP_MEMIO(ioa); + } + + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + status = ((CA_R0ATT) << (rp->fc_ringno * 4)); + WRITE_CSR_REG(binfo, FC_FF_REG(binfo, ioa), (volatile uint32)status); + FC_UNMAP_MEMIO(ioa); + return(rc); + } + icmd = &iocb_cmd->iocb; + + xx = (uint32 * ) icmd; + /* issue iocb command to adapter */ + fc_pcimem_bcopy((uint32 * )icmd, (uint32 * )iocb, sizeof(IOCB)); + FCSTATCTR.IssueIocb++; + + if ((icmd->ulpCommand == CMD_QUE_RING_BUF_CN) || + (icmd->ulpCommand == CMD_QUE_RING_BUF64_CN) || + (rp->fc_ringno == FC_FCP_RING) || + (icmd->ulpCommand == CMD_ABORT_XRI_CX) || + (icmd->ulpCommand == CMD_ABORT_XRI_CN)) { + fc_mem_put(binfo, MEM_IOCB, (uchar * )iocb_cmd); + } else { + fc_ringtxp_put(rp, iocb_cmd); + } + + /* SLIM POINTER */ + if (binfo->fc_busflag & FC_HOSTPTR) { + ((SLI2_SLIM * )binfo->fc_slim2.virt)->mbx.us.s2.host[rp->fc_ringno].cmdPutInx = PCIMEM_LONG(rp->fc_cmdidx); + } else { + void *ioa2; + + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + ioa2 = (void *)((char *)ioa +((SLIMOFF+(rp->fc_ringno*2))*4)); + WRITE_SLIM_ADDR(binfo, (volatile uint32 *)ioa2, rp->fc_cmdidx); + FC_UNMAP_MEMIO(ioa); + } + + if (onetime) { + goto out; + } + + /* get the next available command iocb */ + iocb = (IOCB * )IOCB_ENTRY(rp->fc_cmdringaddr, rp->fc_cmdidx); + + /* bump iocb available command index */ + if (++rp->fc_cmdidx >= rp->fc_numCiocb) { + rp->fc_cmdidx = 0; + } + } + + fc_mpdata_sync(binfo->fc_slim2.dma_handle, 0, 0, + DDI_DMA_SYNC_FORKERNEL); + fc_mpdata_sync(binfo->fc_slim2.dma_handle, 0, 0, + DDI_DMA_SYNC_FORDEV); + + /* SLIM POINTER */ + if (binfo->fc_busflag & FC_HOSTPTR) { + rp->fc_cmdidx = + (uchar)PCIMEM_LONG(((SLI2_SLIM * )binfo->fc_slim2.virt)->mbx.us.s2.host[rp->fc_ringno].cmdPutInx); + } else { + void *ioa2; + + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + ioa2 = (void *)((char *)ioa +((SLIMOFF+(rp->fc_ringno*2))*4)); + rp->fc_cmdidx = (uchar)READ_SLIM_ADDR(binfo, (volatile uint32 *)ioa2); + FC_UNMAP_MEMIO(ioa); + } + + + /* If we get here, iocb list is full */ + /* + * Set ring 'x' to SET R0CE_REQ in Chip Att register. + * Chip will tell us when an entry is freed. + */ + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + status = ((CA_R0ATT | CA_R0CE_REQ) << (rp->fc_ringno * 4)); + WRITE_CSR_REG(binfo, FC_FF_REG(binfo, ioa), (volatile uint32)status); + FC_UNMAP_MEMIO(ioa); + + FCSTATCTR.iocbRingBusy++; + + if (onetime) { + /* Queue command to ring xmit queue */ + fc_ringtx_put(rp, iocb_cmd); + } + return(rc); +} /* End issue_iocb_cmd */ + + + + +/*****************************************************************************/ +/* + * NAME: fc_brdreset + * + * FUNCTION: hardware reset of adapter is performed + * + * EXECUTION ENVIRONMENT: process only + * + * NOTES: + * + * CALLED FROM: + * fc_cfg_init + * + * INPUT: + * p_dev_ctl - point to the dev_ctl area + * + */ +/*****************************************************************************/ +_static_ void +fc_brdreset ( +fc_dev_ctl_t *p_dev_ctl) /* point to the dev_ctl area */ +{ + uint32 word0; + ushort cfg_value, skip_post; + void *ioa; + FC_BRD_INFO * binfo; + MAILBOX * swpmb; + MAILBOX * mb; + + binfo = &BINFO; + ioa = (void *)FC_MAP_MEM(&binfo->fc_iomap_mem); /* map in SLIM */ + + + /* use REAL SLIM !!! */ + binfo->fc_mboxaddr = 0; + binfo->fc_flag &= ~FC_SLI2; + + /* Reset the board - First put restart command in mailbox */ + mb = FC_MAILBOX(binfo, ioa); + word0 = 0; + swpmb = (MAILBOX * ) & word0; + swpmb->mbxCommand = MBX_RESTART; + swpmb->mbxHc = 1; + WRITE_SLIM_ADDR(binfo, ((volatile uint32 * )mb), word0); + /* Only skip post after fc_ffinit is completed */ + if (binfo->fc_ffstate) { + skip_post = 1; + WRITE_SLIM_ADDR(binfo, (((volatile uint32 * )mb) + 1), 1); /* Skip post */ + } + else { + skip_post = 0; + } + FC_UNMAP_MEMIO(ioa); + + /* Turn off SERR, PERR in PCI cmd register */ + binfo->fc_ffstate = FC_INIT_START; + + cfg_value = fc_rdpci_cmd(p_dev_ctl); + fc_wrpci_cmd(p_dev_ctl, (ushort)(cfg_value & ~(CMD_PARITY_CHK | CMD_SERR_ENBL))); + + ioa = (void *)FC_MAP_IO(&binfo->fc_iomap_io); /* map in io registers */ + + WRITE_CSR_REG(binfo, FC_HC_REG(binfo, ioa), (volatile uint32)HC_INITFF); + DELAYMS(1); + + WRITE_CSR_REG(binfo, FC_HC_REG(binfo, ioa), (volatile uint32)0); + + FC_UNMAP_MEMIO(ioa); + + /* Restore PCI cmd register */ + fc_wrpci_cmd(p_dev_ctl, cfg_value); + + if(skip_post) { + DELAYMS(100); + } + else { + DELAYMS(2000); + } + + binfo->fc_ffstate = FC_INIT_START; + binfo->fc_eventTag = 0; + binfo->fc_myDID = 0; + binfo->fc_prevDID = 0; + p_dev_ctl->power_up = 0; + return; +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/lpfc.conf.c 999-mjb/drivers/scsi/lpfc/lpfc.conf.c --- 000-virgin/drivers/scsi/lpfc/lpfc.conf.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/lpfc.conf.c 2003-11-25 14:18:44.000000000 -0800 @@ -0,0 +1,336 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +#include +#include "fc_os.h" +#include "fc_hw.h" +#include "fc.h" +#include "fcmsg.h" + +/* +# Verbosity: only turn this flag on if you are willing to risk being +# deluged with LOTS of information. +# You can set a bit mask to record specific types of verbose messages: +# +# LOG_ELS 0x1 ELS events +# LOG_DISCOVERY 0x2 Link discovery events +# LOG_MBOX 0x4 Mailbox events +# LOG_INIT 0x8 Initialization events +# LOG_LINK_EVENT 0x10 Link events +# LOG_IP 0x20 IP traffic history +# LOG_FCP 0x40 FCP traffic history +# LOG_NODE 0x80 Node table events +# LOG_MISC 0x400 Miscellaneous events +# LOG_SLI 0x800 SLI events +# LOG_CHK_COND 0x1000 FCP Check condition flag +# LOG_ALL_MSG 0x1fff LOG all messages +*/ +int lpfc_log_verbose =0; + +/* +# Setting log-only to 0 causes log messages to be printed on the +# console and to be logged to syslog (which may send them to the +# console again if it's configured to do so). +# Setting log-only to 1 causes log messages to go to syslog only. +*/ +int lpfc_log_only =0; + +/* +# lun-queue-depth: the default value lpfc will use to limit +# the number of outstanding commands per FCP LUN. This value is +# global, affecting each LUN recognized by the driver. +*/ +int lpfc_lun_queue_depth =30; + +/* +# lpfc_lun_skip : Is a LINUX OS parameter to support LUN skipping / no LUN +# If this is set to 1, lpfc will fake out the LINUX scsi layer to allow +# it to detect all LUNs if there are LUN holes on a device. +*/ +int lpfc_lun_skip=0; + +/* +# tgt-queue-depth: the default value lpfc will use to limit +# the number of outstanding commands per FCP target. This value is +# global, affecting each target recognized by the driver. +*/ +int lpfc_tgt_queue_depth =0; + +/* +# no-device-delay [0 or 1 to 30] - determines the length of +# the interval between deciding to fail back an I/O because there is no way +# to communicate with its particular device (e.g., due to device failure) and +# the actual fail back. A value of zero implies no delay whatsoever. +# Cautions: (1) This value is in seconds. +# (2) Setting a long delay value may permit I/O to build up, +# each with a pending timeout, which could result in the exhaustion of +# critical LINUX kernel resources. +# +# Note that this value can have an impact on the speed with which a +# system can shut down with I/Os pending and with the HBA not able to +# communicate with the loop or fabric, e.g., with a cable pulled. +*/ +int lpfc_no_device_delay =1; + +/* +# +++ Variables relating to IP networking support. +++ +*/ + +/* +# network-on: true (1) if networking is enabled, false (0) if not +*/ +int lpfc_network_on = 0; + +/* +# xmt-que-size: size of the transmit queue for mbufs (128 - 10240) +*/ +int lpfc_xmt_que_size = 256; + +/* +# +++ Variables common to both SCSI (FCP) and IP networking support. +++ +*/ + +/* +# Some disk devices have a "select ID" or "select Target" capability. +# From a protocol standpoint "select ID" usually means select the +# Fibre channel "ALPA". In the FC-AL Profile there is an "informative +# annex" which contains a table that maps a "select ID" (a number +# between 0 and 7F) to an ALPA. By default, for compatibility with +# older drivers, the lpfc driver scans its ALPA map from low ALPA +# to high ALPA. +# +# Turning on the scan-down variable (on = 1, off = 0) will +# cause the lpfc driver to use an inverted ALPA map, effectively +# scanning ALPAs from high to low as specified in the FC-AL annex. +# A value of 2, will also cause target assignment in a private loop +# environment to be based on the ALPA. Persistent bindings should NOT be +# used if scan-down is 2. +# +# (Note: This "select ID" functionality is a LOOP ONLY characteristic +# and will not work across a fabric.) +*/ +int lpfc_scandown =2; + +/* +# Determine how long the driver will wait to begin linkdown processing +# when a cable has been pulled or the link has otherwise become +# inaccessible, 1 - 255 secs. Linkdown processing includes failing back +# cmds to the target driver that have been waiting around for the link +# to come back up. There's a tradeoff here: small values of the timer +# cause the link to appear to "bounce", while large values of the +# timer can delay failover in a fault tolerant environment. Units are in +# seconds. A value of 0 means never failback cmds until the link comes up. +*/ +int lpfc_linkdown_tmo =30; + +/* +# If set, nodev-holdio will hold all I/O errors on devices that disappear +# until they come back. Default is 0, return errors with no-device-delay +*/ +int lpfc_nodev_holdio =0; + +/* +# If set, nodev-tmo will hold all I/O errors on devices that disappear +# until the timer expires. Default is 0, return errors with no-device-delay. +*/ +int lpfc_nodev_tmo =30; + +/* +# Use no-device-delay to delay FCP RSP errors and certain check conditions +*/ +int lpfc_delay_rsp_err =1; + +/* +# Treat certain check conditions as a FCP error +*/ +int lpfc_check_cond_err =1; + +/* +# num-iocbs: number of iocb buffers to allocate (128 to 10240) +*/ +int lpfc_num_iocbs = 2048; + +/* +# num-bufs: number of ELS buffers to allocate (64 to 4096) +# ELS buffers are needed to support Fibre channel Extended Link Services. +# Also used for SLI-2 FCP buffers, one per FCP command, and Mailbox commands. +*/ +int lpfc_num_bufs = 4096; + +/* +# topology: link topology for init link +# 0x0 = attempt loop mode then point-to-point +# 0x02 = attempt point-to-point mode only +# 0x04 = attempt loop mode only +# 0x06 = attempt point-to-point mode then loop +# Set point-to-point mode if you want to run as an N_Port. +# Set loop mode if you want to run as an NL_Port. +*/ +int lpfc_topology = 0; + +/* +# link-speed:link speed selection for initializing the Fibre Channel connection. +# 0 = auto select (default) +# 1 = 1 Gigabaud +# 2 = 2 Gigabaud +*/ +int lpfc_link_speed = 0; + +/* +# ip-class: FC class (2 or 3) to use for the IP protocol. +*/ +int lpfc_ip_class = 3; + +/* +# fcp-class: FC class (2 or 3) to use for the FCP protocol. +*/ +int lpfc_fcp_class = 3; + +/* +# Use ADISC for FCP rediscovery instead of PLOGI +*/ +int lpfc_use_adisc =0; + +/* +# Extra FCP timeout for fabrics +*/ +int lpfc_fcpfabric_tmo =0; + +/* +# Number of 4k STREAMS buffers to post to IP ring +*/ +int lpfc_post_ip_buf =128; + +/* +#Use dqfull-throttle-up-time to specify when to increment the current Q depth. +# This variable is in seconds. +*/ +int lpfc_dqfull_throttle_up_time =1; + +/* +# Increment the current Q depth by dqfull-throttle-up-inc +*/ +int lpfc_dqfull_throttle_up_inc =1; + +/* +# Use ACK0, instead of ACK1 for class 2 acknowledgement +*/ +int lpfc_ack0support =0; + +/* +# Vendor specific flag for vendor specifc actions. +*/ +int lpfc_vendor =0x1; + +/* +# Linux does not scan past lun 0 is it's missing. Emulex driver can +# work around this limitation if this feature is on (1). +*/ +int lpfc_lun0_missing =0; + +/* +# When a disk disapears, fiber cable being disconnected for example, +# this option will report it missing BUT removable. This allows +# Linux to re-discover the disk later on without scan, when the cable +# is re-connected in our example. +# Warning: when this option is set, statuses and timeout values on +# disk missing reported to the kernel may have an effect +# on other software packages like failover, multipath, etc... +*/ +int lpfc_use_removable =1; + +/* +# specified the maximum number of luns per target. A value of 20 means +# luns from 0 to 19 are valid. +# Default of 0 means to use driver's maximum of 256. + */ +int lpfc_max_lun =0; + +/* +# When the scsi layer passes the driver a command, the SCSI command structure +# has a field in it, sc_data_direction, to indicate if the SCSI command is a +# read or a write SCSI operation. Under some instances, this field is invalid +# and the SCSI opcode can be used to determine the type of SCSI operation. If +# wish to use the SCSI opcode, set this to 0. +# Note: For LINUX kernel revisions <= 2.4.4, this is ignored and the SCSI +# opcode is always used. +*/ +int lpfc_use_data_direction =1; + +/* +# Setup FCP persistent bindings, +# fcp-bind-WWPN binds a specific WorldWide PortName to a target id, +# fcp-bind-WWNN binds a specific WorldWide NodeName to a target id, +# fcp-bind-DID binds a specific DID to a target id. +# Only one binding method can be used. "lpfc_automap" needs to +# be changed to 0 and scan-down should NOT be set to 2 +# when one of these binding methods is used. +# WWNN, WWPN and DID are hexadecimal values. +# WWNN must be 16 digit BCD with leading 0s. +# WWPN must be 16 digit BCD with leading 0s. +# DID must be 6 digit BCD with leading 0s. +# The SCSI ID to bind to consists of two parts, the lpfc interface +# to bind to, and the target number for that interface. +# Thus lpfc0t2 specifies target 2 on interface lpfc0. +# +# Here are some examples: +# WWNN SCSI ID +# char *lpfc_fcp_bind_WWNN[]={"22000020370b8275:lpfc0t1", +# "22000020370b8998:lpfc0t2"}; +# +# WWPN SCSI ID +# char *lpfc_fcp_bind_WWPN[]={"22000020370b8275:lpfc0t1", +# "22000020370b8998:lpfc0t2"}; +# +# DID SCSI ID +# char *lpfc_fcp_bind_DID[]={"0000dc:lpfc0t1", +# "0000e0:lpfc0t2"}; +# +*/ +int lpfc_bind_entries =0; +char *lpfc_fcp_bind_WWNN[MAX_FC_BINDINGS]; +char *lpfc_fcp_bind_WWPN[MAX_FC_BINDINGS]; +char *lpfc_fcp_bind_DID[MAX_FC_BINDINGS]; + +/* +# If automap is set, SCSI IDs for all FCP nodes without +# persistent bindings will be automatically generated. +# If new FCP devices are added to the network when the system is down, +# there is no guarantee that these SCSI IDs will remain the same +# when the system is booted again. +# If one of the above fcp binding methods is specified, then automap +# devices will use the same mapping method to preserve +# SCSI IDs between link down and link up. +# If no bindings are specified above, a value of 1 will force WWNN +# binding, 2 for WWPN binding, and 3 for DID binding. +# If automap is 0, only devices with persistent bindings will be +# recognized by the system. +*/ +int lpfc_automap =2; + +/* +# Default values for I/O colaesing +# cr_delay ms or cr_count outstanding commands +*/ +int lpfc_cr_delay =0; +int lpfc_cr_count =0; + + + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/lpfc.conf.defs 999-mjb/drivers/scsi/lpfc/lpfc.conf.defs --- 000-virgin/drivers/scsi/lpfc/lpfc.conf.defs 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/lpfc.conf.defs 2003-11-25 14:18:44.000000000 -0800 @@ -0,0 +1,3380 @@ +/******************************************************************* + * This file is part of the Emulex Linux Device Driver for * + * Enterprise Fibre Channel Host Bus Adapters. * + * Refer to the README file included with this package for * + * driver version and adapter support. * + * Copyright (C) 2003 Emulex Corporation. * + * www.emulex.com * + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU General Public License * + * as published by the Free Software Foundation; either version 2 * + * of the License, or (at your option) any later version. * + * * + * This program is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details, a copy of which * + * can be found in the file COPYING included with this package. * + *******************************************************************/ + +/* This file is to support different configurations for each HBA */ +/* HBA 0 */ +#ifdef MODULE_PARM +MODULE_PARM(lpfc0_log_verbose, "i"); +MODULE_PARM(lpfc0_log_only, "i"); +MODULE_PARM(lpfc0_lun_queue_depth, "i"); +MODULE_PARM(lpfc0_tgt_queue_depth, "i"); +MODULE_PARM(lpfc0_no_device_delay, "i"); +MODULE_PARM(lpfc0_network_on, "i"); +MODULE_PARM(lpfc0_xmt_que_size, "i"); +MODULE_PARM(lpfc0_scandown, "i"); +MODULE_PARM(lpfc0_linkdown_tmo, "i"); +MODULE_PARM(lpfc0_nodev_tmo, "i"); +MODULE_PARM(lpfc0_delay_rsp_err, "i"); +MODULE_PARM(lpfc0_nodev_holdio, "i"); +MODULE_PARM(lpfc0_check_cond_err, "i"); +MODULE_PARM(lpfc0_num_iocbs, "i"); +MODULE_PARM(lpfc0_num_bufs, "i"); +MODULE_PARM(lpfc0_topology, "i"); +MODULE_PARM(lpfc0_link_speed, "i"); +MODULE_PARM(lpfc0_ip_class, "i"); +MODULE_PARM(lpfc0_fcp_class, "i"); +MODULE_PARM(lpfc0_use_adisc, "i"); +MODULE_PARM(lpfc0_fcpfabric_tmo, "i"); +MODULE_PARM(lpfc0_post_ip_buf, "i"); +MODULE_PARM(lpfc0_dqfull_throttle_up_time, "i"); +MODULE_PARM(lpfc0_dqfull_throttle_up_inc, "i"); +MODULE_PARM(lpfc0_ack0support, "i"); +MODULE_PARM(lpfc0_automap, "i"); +MODULE_PARM(lpfc0_cr_delay, "i"); +MODULE_PARM(lpfc0_cr_count, "i"); +#endif + +static int lpfc0_log_verbose = -1; +static int lpfc0_log_only = -1; +static int lpfc0_lun_queue_depth = -1; +static int lpfc0_tgt_queue_depth = -1; +static int lpfc0_no_device_delay = -1; +static int lpfc0_network_on = -1; +static int lpfc0_xmt_que_size = -1; +static int lpfc0_scandown = -1; +static int lpfc0_linkdown_tmo = -1; +static int lpfc0_nodev_tmo = -1; +static int lpfc0_delay_rsp_err = -1; +static int lpfc0_nodev_holdio = -1; +static int lpfc0_check_cond_err = -1; +static int lpfc0_num_iocbs = -1; +static int lpfc0_num_bufs = -1; +static int lpfc0_topology = -1; +static int lpfc0_link_speed = -1; +static int lpfc0_ip_class = -1; +static int lpfc0_fcp_class = -1; +static int lpfc0_use_adisc = -1; +static int lpfc0_fcpfabric_tmo = -1; +static int lpfc0_post_ip_buf = -1; +static int lpfc0_dqfull_throttle_up_time = -1; +static int lpfc0_dqfull_throttle_up_inc = -1; +static int lpfc0_ack0support = -1; +static int lpfc0_automap = -1; +static int lpfc0_cr_delay = -1; +static int lpfc0_cr_count = -1; + +/* HBA 1 */ +#ifdef MODULE_PARM +MODULE_PARM(lpfc1_log_verbose, "i"); +MODULE_PARM(lpfc1_log_only, "i"); +MODULE_PARM(lpfc1_lun_queue_depth, "i"); +MODULE_PARM(lpfc1_tgt_queue_depth, "i"); +MODULE_PARM(lpfc1_no_device_delay, "i"); +MODULE_PARM(lpfc1_network_on, "i"); +MODULE_PARM(lpfc1_xmt_que_size, "i"); +MODULE_PARM(lpfc1_scandown, "i"); +MODULE_PARM(lpfc1_linkdown_tmo, "i"); +MODULE_PARM(lpfc1_nodev_tmo, "i"); +MODULE_PARM(lpfc1_delay_rsp_err, "i"); +MODULE_PARM(lpfc1_nodev_holdio, "i"); +MODULE_PARM(lpfc1_check_cond_err, "i"); +MODULE_PARM(lpfc1_num_iocbs, "i"); +MODULE_PARM(lpfc1_num_bufs, "i"); +MODULE_PARM(lpfc1_topology, "i"); +MODULE_PARM(lpfc1_link_speed, "i"); +MODULE_PARM(lpfc1_ip_class, "i"); +MODULE_PARM(lpfc1_fcp_class, "i"); +MODULE_PARM(lpfc1_use_adisc, "i"); +MODULE_PARM(lpfc1_fcpfabric_tmo, "i"); +MODULE_PARM(lpfc1_post_ip_buf, "i"); +MODULE_PARM(lpfc1_dqfull_throttle_up_time, "i"); +MODULE_PARM(lpfc1_dqfull_throttle_up_inc, "i"); +MODULE_PARM(lpfc1_ack0support, "i"); +MODULE_PARM(lpfc1_automap, "i"); +MODULE_PARM(lpfc1_cr_delay, "i"); +MODULE_PARM(lpfc1_cr_count, "i"); +#endif + +static int lpfc1_log_verbose = -1; +static int lpfc1_log_only = -1; +static int lpfc1_lun_queue_depth = -1; +static int lpfc1_tgt_queue_depth = -1; +static int lpfc1_no_device_delay = -1; +static int lpfc1_network_on = -1; +static int lpfc1_xmt_que_size = -1; +static int lpfc1_scandown = -1; +static int lpfc1_linkdown_tmo = -1; +static int lpfc1_nodev_tmo = -1; +static int lpfc1_delay_rsp_err = -1; +static int lpfc1_nodev_holdio = -1; +static int lpfc1_check_cond_err = -1; +static int lpfc1_num_iocbs = -1; +static int lpfc1_num_bufs = -1; +static int lpfc1_topology = -1; +static int lpfc1_link_speed = -1; +static int lpfc1_ip_class = -1; +static int lpfc1_fcp_class = -1; +static int lpfc1_use_adisc = -1; +static int lpfc1_fcpfabric_tmo = -1; +static int lpfc1_post_ip_buf = -1; +static int lpfc1_dqfull_throttle_up_time = -1; +static int lpfc1_dqfull_throttle_up_inc = -1; +static int lpfc1_ack0support = -1; +static int lpfc1_automap = -1; +static int lpfc1_cr_delay = -1; +static int lpfc1_cr_count = -1; + +/* HBA 2 */ +#ifdef MODULE_PARM +MODULE_PARM(lpfc2_log_verbose, "i"); +MODULE_PARM(lpfc2_log_only, "i"); +MODULE_PARM(lpfc2_lun_queue_depth, "i"); +MODULE_PARM(lpfc2_tgt_queue_depth, "i"); +MODULE_PARM(lpfc2_no_device_delay, "i"); +MODULE_PARM(lpfc2_network_on, "i"); +MODULE_PARM(lpfc2_xmt_que_size, "i"); +MODULE_PARM(lpfc2_scandown, "i"); +MODULE_PARM(lpfc2_linkdown_tmo, "i"); +MODULE_PARM(lpfc2_nodev_tmo, "i"); +MODULE_PARM(lpfc2_delay_rsp_err, "i"); +MODULE_PARM(lpfc2_nodev_holdio, "i"); +MODULE_PARM(lpfc2_check_cond_err, "i"); +MODULE_PARM(lpfc2_num_iocbs, "i"); +MODULE_PARM(lpfc2_num_bufs, "i"); +MODULE_PARM(lpfc2_topology, "i"); +MODULE_PARM(lpfc2_link_speed, "i"); +MODULE_PARM(lpfc2_ip_class, "i"); +MODULE_PARM(lpfc2_fcp_class, "i"); +MODULE_PARM(lpfc2_use_adisc, "i"); +MODULE_PARM(lpfc2_fcpfabric_tmo, "i"); +MODULE_PARM(lpfc2_post_ip_buf, "i"); +MODULE_PARM(lpfc2_dqfull_throttle_up_time, "i"); +MODULE_PARM(lpfc2_dqfull_throttle_up_inc, "i"); +MODULE_PARM(lpfc2_ack0support, "i"); +MODULE_PARM(lpfc2_automap, "i"); +MODULE_PARM(lpfc2_cr_delay, "i"); +MODULE_PARM(lpfc2_cr_count, "i"); +#endif + +static int lpfc2_log_verbose = -1; +static int lpfc2_log_only = -1; +static int lpfc2_lun_queue_depth = -1; +static int lpfc2_tgt_queue_depth = -1; +static int lpfc2_no_device_delay = -1; +static int lpfc2_network_on = -1; +static int lpfc2_xmt_que_size = -1; +static int lpfc2_scandown = -1; +static int lpfc2_linkdown_tmo = -1; +static int lpfc2_nodev_tmo = -1; +static int lpfc2_delay_rsp_err = -1; +static int lpfc2_nodev_holdio = -1; +static int lpfc2_check_cond_err = -1; +static int lpfc2_num_iocbs = -1; +static int lpfc2_num_bufs = -1; +static int lpfc2_topology = -1; +static int lpfc2_link_speed = -1; +static int lpfc2_ip_class = -1; +static int lpfc2_fcp_class = -1; +static int lpfc2_use_adisc = -1; +static int lpfc2_fcpfabric_tmo = -1; +static int lpfc2_post_ip_buf = -1; +static int lpfc2_dqfull_throttle_up_time = -1; +static int lpfc2_dqfull_throttle_up_inc = -1; +static int lpfc2_ack0support = -1; +static int lpfc2_automap = -1; +static int lpfc2_cr_delay = -1; +static int lpfc2_cr_count = -1; + +/* HBA 3 */ +#ifdef MODULE_PARM +MODULE_PARM(lpfc3_log_verbose, "i"); +MODULE_PARM(lpfc3_log_only, "i"); +MODULE_PARM(lpfc3_lun_queue_depth, "i"); +MODULE_PARM(lpfc3_tgt_queue_depth, "i"); +MODULE_PARM(lpfc3_no_device_delay, "i"); +MODULE_PARM(lpfc3_network_on, "i"); +MODULE_PARM(lpfc3_xmt_que_size, "i"); +MODULE_PARM(lpfc3_scandown, "i"); +MODULE_PARM(lpfc3_linkdown_tmo, "i"); +MODULE_PARM(lpfc3_nodev_tmo, "i"); +MODULE_PARM(lpfc3_delay_rsp_err, "i"); +MODULE_PARM(lpfc3_nodev_holdio, "i"); +MODULE_PARM(lpfc3_check_cond_err, "i"); +MODULE_PARM(lpfc3_num_iocbs, "i"); +MODULE_PARM(lpfc3_num_bufs, "i"); +MODULE_PARM(lpfc3_topology, "i"); +MODULE_PARM(lpfc3_link_speed, "i"); +MODULE_PARM(lpfc3_ip_class, "i"); +MODULE_PARM(lpfc3_fcp_class, "i"); +MODULE_PARM(lpfc3_use_adisc, "i"); +MODULE_PARM(lpfc3_fcpfabric_tmo, "i"); +MODULE_PARM(lpfc3_post_ip_buf, "i"); +MODULE_PARM(lpfc3_dqfull_throttle_up_time, "i"); +MODULE_PARM(lpfc3_dqfull_throttle_up_inc, "i"); +MODULE_PARM(lpfc3_ack0support, "i"); +MODULE_PARM(lpfc3_automap, "i"); +MODULE_PARM(lpfc3_cr_delay, "i"); +MODULE_PARM(lpfc3_cr_count, "i"); +#endif + +static int lpfc3_log_verbose = -1; +static int lpfc3_log_only = -1; +static int lpfc3_lun_queue_depth = -1; +static int lpfc3_tgt_queue_depth = -1; +static int lpfc3_no_device_delay = -1; +static int lpfc3_network_on = -1; +static int lpfc3_xmt_que_size = -1; +static int lpfc3_scandown = -1; +static int lpfc3_linkdown_tmo = -1; +static int lpfc3_nodev_tmo = -1; +static int lpfc3_delay_rsp_err = -1; +static int lpfc3_nodev_holdio = -1; +static int lpfc3_check_cond_err = -1; +static int lpfc3_num_iocbs = -1; +static int lpfc3_num_bufs = -1; +static int lpfc3_topology = -1; +static int lpfc3_link_speed = -1; +static int lpfc3_ip_class = -1; +static int lpfc3_fcp_class = -1; +static int lpfc3_use_adisc = -1; +static int lpfc3_fcpfabric_tmo = -1; +static int lpfc3_post_ip_buf = -1; +static int lpfc3_dqfull_throttle_up_time = -1; +static int lpfc3_dqfull_throttle_up_inc = -1; +static int lpfc3_ack0support = -1; +static int lpfc3_automap = -1; +static int lpfc3_cr_delay = -1; +static int lpfc3_cr_count = -1; + +/* HBA 4 */ +#ifdef MODULE_PARM +MODULE_PARM(lpfc4_log_verbose, "i"); +MODULE_PARM(lpfc4_log_only, "i"); +MODULE_PARM(lpfc4_lun_queue_depth, "i"); +MODULE_PARM(lpfc4_tgt_queue_depth, "i"); +MODULE_PARM(lpfc4_no_device_delay, "i"); +MODULE_PARM(lpfc4_network_on, "i"); +MODULE_PARM(lpfc4_xmt_que_size, "i"); +MODULE_PARM(lpfc4_scandown, "i"); +MODULE_PARM(lpfc4_linkdown_tmo, "i"); +MODULE_PARM(lpfc4_nodev_tmo, "i"); +MODULE_PARM(lpfc4_delay_rsp_err, "i"); +MODULE_PARM(lpfc4_nodev_holdio, "i"); +MODULE_PARM(lpfc4_check_cond_err, "i"); +MODULE_PARM(lpfc4_num_iocbs, "i"); +MODULE_PARM(lpfc4_num_bufs, "i"); +MODULE_PARM(lpfc4_topology, "i"); +MODULE_PARM(lpfc4_link_speed, "i"); +MODULE_PARM(lpfc4_ip_class, "i"); +MODULE_PARM(lpfc4_fcp_class, "i"); +MODULE_PARM(lpfc4_use_adisc, "i"); +MODULE_PARM(lpfc4_fcpfabric_tmo, "i"); +MODULE_PARM(lpfc4_post_ip_buf, "i"); +MODULE_PARM(lpfc4_dqfull_throttle_up_time, "i"); +MODULE_PARM(lpfc4_dqfull_throttle_up_inc, "i"); +MODULE_PARM(lpfc4_ack0support, "i"); +MODULE_PARM(lpfc4_automap, "i"); +MODULE_PARM(lpfc4_cr_delay, "i"); +MODULE_PARM(lpfc4_cr_count, "i"); +#endif + +static int lpfc4_log_verbose = -1; +static int lpfc4_log_only = -1; +static int lpfc4_lun_queue_depth = -1; +static int lpfc4_tgt_queue_depth = -1; +static int lpfc4_no_device_delay = -1; +static int lpfc4_network_on = -1; +static int lpfc4_xmt_que_size = -1; +static int lpfc4_scandown = -1; +static int lpfc4_linkdown_tmo = -1; +static int lpfc4_nodev_tmo = -1; +static int lpfc4_delay_rsp_err = -1; +static int lpfc4_nodev_holdio = -1; +static int lpfc4_check_cond_err = -1; +static int lpfc4_num_iocbs = -1; +static int lpfc4_num_bufs = -1; +static int lpfc4_topology = -1; +static int lpfc4_link_speed = -1; +static int lpfc4_ip_class = -1; +static int lpfc4_fcp_class = -1; +static int lpfc4_use_adisc = -1; +static int lpfc4_fcpfabric_tmo = -1; +static int lpfc4_post_ip_buf = -1; +static int lpfc4_dqfull_throttle_up_time = -1; +static int lpfc4_dqfull_throttle_up_inc = -1; +static int lpfc4_ack0support = -1; +static int lpfc4_automap = -1; +static int lpfc4_cr_delay = -1; +static int lpfc4_cr_count = -1; + +/* HBA 5 */ +#ifdef MODULE_PARM +MODULE_PARM(lpfc5_log_verbose, "i"); +MODULE_PARM(lpfc5_log_only, "i"); +MODULE_PARM(lpfc5_lun_queue_depth, "i"); +MODULE_PARM(lpfc5_tgt_queue_depth, "i"); +MODULE_PARM(lpfc5_no_device_delay, "i"); +MODULE_PARM(lpfc5_network_on, "i"); +MODULE_PARM(lpfc5_xmt_que_size, "i"); +MODULE_PARM(lpfc5_scandown, "i"); +MODULE_PARM(lpfc5_linkdown_tmo, "i"); +MODULE_PARM(lpfc5_nodev_tmo, "i"); +MODULE_PARM(lpfc5_delay_rsp_err, "i"); +MODULE_PARM(lpfc5_nodev_holdio, "i"); +MODULE_PARM(lpfc5_check_cond_err, "i"); +MODULE_PARM(lpfc5_num_iocbs, "i"); +MODULE_PARM(lpfc5_num_bufs, "i"); +MODULE_PARM(lpfc5_topology, "i"); +MODULE_PARM(lpfc5_link_speed, "i"); +MODULE_PARM(lpfc5_ip_class, "i"); +MODULE_PARM(lpfc5_fcp_class, "i"); +MODULE_PARM(lpfc5_use_adisc, "i"); +MODULE_PARM(lpfc5_fcpfabric_tmo, "i"); +MODULE_PARM(lpfc5_post_ip_buf, "i"); +MODULE_PARM(lpfc5_dqfull_throttle_up_time, "i"); +MODULE_PARM(lpfc5_dqfull_throttle_up_inc, "i"); +MODULE_PARM(lpfc5_ack0support, "i"); +MODULE_PARM(lpfc5_automap, "i"); +MODULE_PARM(lpfc5_cr_delay, "i"); +MODULE_PARM(lpfc5_cr_count, "i"); +#endif + +static int lpfc5_log_verbose = -1; +static int lpfc5_log_only = -1; +static int lpfc5_lun_queue_depth = -1; +static int lpfc5_tgt_queue_depth = -1; +static int lpfc5_no_device_delay = -1; +static int lpfc5_network_on = -1; +static int lpfc5_xmt_que_size = -1; +static int lpfc5_scandown = -1; +static int lpfc5_linkdown_tmo = -1; +static int lpfc5_nodev_tmo = -1; +static int lpfc5_delay_rsp_err = -1; +static int lpfc5_nodev_holdio = -1; +static int lpfc5_check_cond_err = -1; +static int lpfc5_num_iocbs = -1; +static int lpfc5_num_bufs = -1; +static int lpfc5_topology = -1; +static int lpfc5_link_speed = -1; +static int lpfc5_ip_class = -1; +static int lpfc5_fcp_class = -1; +static int lpfc5_use_adisc = -1; +static int lpfc5_fcpfabric_tmo = -1; +static int lpfc5_post_ip_buf = -1; +static int lpfc5_dqfull_throttle_up_time = -1; +static int lpfc5_dqfull_throttle_up_inc = -1; +static int lpfc5_ack0support = -1; +static int lpfc5_automap = -1; +static int lpfc5_cr_delay = -1; +static int lpfc5_cr_count = -1; + +/* HBA 6 */ +#ifdef MODULE_PARM +MODULE_PARM(lpfc6_log_verbose, "i"); +MODULE_PARM(lpfc6_log_only, "i"); +MODULE_PARM(lpfc6_lun_queue_depth, "i"); +MODULE_PARM(lpfc6_tgt_queue_depth, "i"); +MODULE_PARM(lpfc6_no_device_delay, "i"); +MODULE_PARM(lpfc6_network_on, "i"); +MODULE_PARM(lpfc6_xmt_que_size, "i"); +MODULE_PARM(lpfc6_scandown, "i"); +MODULE_PARM(lpfc6_linkdown_tmo, "i"); +MODULE_PARM(lpfc6_nodev_tmo, "i"); +MODULE_PARM(lpfc6_delay_rsp_err, "i"); +MODULE_PARM(lpfc6_nodev_holdio, "i"); +MODULE_PARM(lpfc6_check_cond_err, "i"); +MODULE_PARM(lpfc6_num_iocbs, "i"); +MODULE_PARM(lpfc6_num_bufs, "i"); +MODULE_PARM(lpfc6_topology, "i"); +MODULE_PARM(lpfc6_link_speed, "i"); +MODULE_PARM(lpfc6_ip_class, "i"); +MODULE_PARM(lpfc6_fcp_class, "i"); +MODULE_PARM(lpfc6_use_adisc, "i"); +MODULE_PARM(lpfc6_fcpfabric_tmo, "i"); +MODULE_PARM(lpfc6_post_ip_buf, "i"); +MODULE_PARM(lpfc6_dqfull_throttle_up_time, "i"); +MODULE_PARM(lpfc6_dqfull_throttle_up_inc, "i"); +MODULE_PARM(lpfc6_ack0support, "i"); +MODULE_PARM(lpfc6_automap, "i"); +MODULE_PARM(lpfc6_cr_delay, "i"); +MODULE_PARM(lpfc6_cr_count, "i"); +#endif + +static int lpfc6_log_verbose = -1; +static int lpfc6_log_only = -1; +static int lpfc6_lun_queue_depth = -1; +static int lpfc6_tgt_queue_depth = -1; +static int lpfc6_no_device_delay = -1; +static int lpfc6_network_on = -1; +static int lpfc6_xmt_que_size = -1; +static int lpfc6_scandown = -1; +static int lpfc6_linkdown_tmo = -1; +static int lpfc6_nodev_tmo = -1; +static int lpfc6_delay_rsp_err = -1; +static int lpfc6_nodev_holdio = -1; +static int lpfc6_check_cond_err = -1; +static int lpfc6_num_iocbs = -1; +static int lpfc6_num_bufs = -1; +static int lpfc6_topology = -1; +static int lpfc6_link_speed = -1; +static int lpfc6_ip_class = -1; +static int lpfc6_fcp_class = -1; +static int lpfc6_use_adisc = -1; +static int lpfc6_fcpfabric_tmo = -1; +static int lpfc6_post_ip_buf = -1; +static int lpfc6_dqfull_throttle_up_time = -1; +static int lpfc6_dqfull_throttle_up_inc = -1; +static int lpfc6_ack0support = -1; +static int lpfc6_automap = -1; +static int lpfc6_cr_delay = -1; +static int lpfc6_cr_count = -1; + +/* HBA 7 */ +#ifdef MODULE_PARM +MODULE_PARM(lpfc7_log_verbose, "i"); +MODULE_PARM(lpfc7_log_only, "i"); +MODULE_PARM(lpfc7_lun_queue_depth, "i"); +MODULE_PARM(lpfc7_tgt_queue_depth, "i"); +MODULE_PARM(lpfc7_no_device_delay, "i"); +MODULE_PARM(lpfc7_network_on, "i"); +MODULE_PARM(lpfc7_xmt_que_size, "i"); +MODULE_PARM(lpfc7_scandown, "i"); +MODULE_PARM(lpfc7_linkdown_tmo, "i"); +MODULE_PARM(lpfc7_nodev_tmo, "i"); +MODULE_PARM(lpfc7_delay_rsp_err, "i"); +MODULE_PARM(lpfc7_nodev_holdio, "i"); +MODULE_PARM(lpfc7_check_cond_err, "i"); +MODULE_PARM(lpfc7_num_iocbs, "i"); +MODULE_PARM(lpfc7_num_bufs, "i"); +MODULE_PARM(lpfc7_topology, "i"); +MODULE_PARM(lpfc7_link_speed, "i"); +MODULE_PARM(lpfc7_ip_class, "i"); +MODULE_PARM(lpfc7_fcp_class, "i"); +MODULE_PARM(lpfc7_use_adisc, "i"); +MODULE_PARM(lpfc7_fcpfabric_tmo, "i"); +MODULE_PARM(lpfc7_post_ip_buf, "i"); +MODULE_PARM(lpfc7_dqfull_throttle_up_time, "i"); +MODULE_PARM(lpfc7_dqfull_throttle_up_inc, "i"); +MODULE_PARM(lpfc7_ack0support, "i"); +MODULE_PARM(lpfc7_automap, "i"); +MODULE_PARM(lpfc7_cr_delay, "i"); +MODULE_PARM(lpfc7_cr_count, "i"); +#endif + +static int lpfc7_log_verbose = -1; +static int lpfc7_log_only = -1; +static int lpfc7_lun_queue_depth = -1; +static int lpfc7_tgt_queue_depth = -1; +static int lpfc7_no_device_delay = -1; +static int lpfc7_network_on = -1; +static int lpfc7_xmt_que_size = -1; +static int lpfc7_scandown = -1; +static int lpfc7_linkdown_tmo = -1; +static int lpfc7_nodev_tmo = -1; +static int lpfc7_delay_rsp_err = -1; +static int lpfc7_nodev_holdio = -1; +static int lpfc7_check_cond_err = -1; +static int lpfc7_num_iocbs = -1; +static int lpfc7_num_bufs = -1; +static int lpfc7_topology = -1; +static int lpfc7_link_speed = -1; +static int lpfc7_ip_class = -1; +static int lpfc7_fcp_class = -1; +static int lpfc7_use_adisc = -1; +static int lpfc7_fcpfabric_tmo = -1; +static int lpfc7_post_ip_buf = -1; +static int lpfc7_dqfull_throttle_up_time = -1; +static int lpfc7_dqfull_throttle_up_inc = -1; +static int lpfc7_ack0support = -1; +static int lpfc7_automap = -1; +static int lpfc7_cr_delay = -1; +static int lpfc7_cr_count = -1; + +/* HBA 8 */ +#ifdef MODULE_PARM +MODULE_PARM(lpfc8_log_verbose, "i"); +MODULE_PARM(lpfc8_log_only, "i"); +MODULE_PARM(lpfc8_lun_queue_depth, "i"); +MODULE_PARM(lpfc8_tgt_queue_depth, "i"); +MODULE_PARM(lpfc8_no_device_delay, "i"); +MODULE_PARM(lpfc8_network_on, "i"); +MODULE_PARM(lpfc8_xmt_que_size, "i"); +MODULE_PARM(lpfc8_scandown, "i"); +MODULE_PARM(lpfc8_linkdown_tmo, "i"); +MODULE_PARM(lpfc8_nodev_tmo, "i"); +MODULE_PARM(lpfc8_delay_rsp_err, "i"); +MODULE_PARM(lpfc8_nodev_holdio, "i"); +MODULE_PARM(lpfc8_check_cond_err, "i"); +MODULE_PARM(lpfc8_num_iocbs, "i"); +MODULE_PARM(lpfc8_num_bufs, "i"); +MODULE_PARM(lpfc8_topology, "i"); +MODULE_PARM(lpfc8_link_speed, "i"); +MODULE_PARM(lpfc8_ip_class, "i"); +MODULE_PARM(lpfc8_fcp_class, "i"); +MODULE_PARM(lpfc8_use_adisc, "i"); +MODULE_PARM(lpfc8_fcpfabric_tmo, "i"); +MODULE_PARM(lpfc8_post_ip_buf, "i"); +MODULE_PARM(lpfc8_dqfull_throttle_up_time, "i"); +MODULE_PARM(lpfc8_dqfull_throttle_up_inc, "i"); +MODULE_PARM(lpfc8_ack0support, "i"); +MODULE_PARM(lpfc8_automap, "i"); +MODULE_PARM(lpfc8_cr_delay, "i"); +MODULE_PARM(lpfc8_cr_count, "i"); +#endif + +static int lpfc8_log_verbose = -1; +static int lpfc8_log_only = -1; +static int lpfc8_lun_queue_depth = -1; +static int lpfc8_tgt_queue_depth = -1; +static int lpfc8_no_device_delay = -1; +static int lpfc8_network_on = -1; +static int lpfc8_xmt_que_size = -1; +static int lpfc8_scandown = -1; +static int lpfc8_linkdown_tmo = -1; +static int lpfc8_nodev_tmo = -1; +static int lpfc8_delay_rsp_err = -1; +static int lpfc8_nodev_holdio = -1; +static int lpfc8_check_cond_err = -1; +static int lpfc8_num_iocbs = -1; +static int lpfc8_num_bufs = -1; +static int lpfc8_topology = -1; +static int lpfc8_link_speed = -1; +static int lpfc8_ip_class = -1; +static int lpfc8_fcp_class = -1; +static int lpfc8_use_adisc = -1; +static int lpfc8_fcpfabric_tmo = -1; +static int lpfc8_post_ip_buf = -1; +static int lpfc8_dqfull_throttle_up_time = -1; +static int lpfc8_dqfull_throttle_up_inc = -1; +static int lpfc8_ack0support = -1; +static int lpfc8_automap = -1; +static int lpfc8_cr_delay = -1; +static int lpfc8_cr_count = -1; + +/* HBA 9 */ +#ifdef MODULE_PARM +MODULE_PARM(lpfc9_log_verbose, "i"); +MODULE_PARM(lpfc9_log_only, "i"); +MODULE_PARM(lpfc9_lun_queue_depth, "i"); +MODULE_PARM(lpfc9_tgt_queue_depth, "i"); +MODULE_PARM(lpfc9_no_device_delay, "i"); +MODULE_PARM(lpfc9_network_on, "i"); +MODULE_PARM(lpfc9_xmt_que_size, "i"); +MODULE_PARM(lpfc9_scandown, "i"); +MODULE_PARM(lpfc9_linkdown_tmo, "i"); +MODULE_PARM(lpfc9_nodev_tmo, "i"); +MODULE_PARM(lpfc9_delay_rsp_err, "i"); +MODULE_PARM(lpfc9_nodev_holdio, "i"); +MODULE_PARM(lpfc9_check_cond_err, "i"); +MODULE_PARM(lpfc9_num_iocbs, "i"); +MODULE_PARM(lpfc9_num_bufs, "i"); +MODULE_PARM(lpfc9_topology, "i"); +MODULE_PARM(lpfc9_link_speed, "i"); +MODULE_PARM(lpfc9_ip_class, "i"); +MODULE_PARM(lpfc9_fcp_class, "i"); +MODULE_PARM(lpfc9_use_adisc, "i"); +MODULE_PARM(lpfc9_fcpfabric_tmo, "i"); +MODULE_PARM(lpfc9_post_ip_buf, "i"); +MODULE_PARM(lpfc9_dqfull_throttle_up_time, "i"); +MODULE_PARM(lpfc9_dqfull_throttle_up_inc, "i"); +MODULE_PARM(lpfc9_ack0support, "i"); +MODULE_PARM(lpfc9_automap, "i"); +MODULE_PARM(lpfc9_cr_delay, "i"); +MODULE_PARM(lpfc9_cr_count, "i"); +#endif + +static int lpfc9_log_verbose = -1; +static int lpfc9_log_only = -1; +static int lpfc9_lun_queue_depth = -1; +static int lpfc9_tgt_queue_depth = -1; +static int lpfc9_no_device_delay = -1; +static int lpfc9_network_on = -1; +static int lpfc9_xmt_que_size = -1; +static int lpfc9_scandown = -1; +static int lpfc9_linkdown_tmo = -1; +static int lpfc9_nodev_tmo = -1; +static int lpfc9_delay_rsp_err = -1; +static int lpfc9_nodev_holdio = -1; +static int lpfc9_check_cond_err = -1; +static int lpfc9_num_iocbs = -1; +static int lpfc9_num_bufs = -1; +static int lpfc9_topology = -1; +static int lpfc9_link_speed = -1; +static int lpfc9_ip_class = -1; +static int lpfc9_fcp_class = -1; +static int lpfc9_use_adisc = -1; +static int lpfc9_fcpfabric_tmo = -1; +static int lpfc9_post_ip_buf = -1; +static int lpfc9_dqfull_throttle_up_time = -1; +static int lpfc9_dqfull_throttle_up_inc = -1; +static int lpfc9_ack0support = -1; +static int lpfc9_automap = -1; +static int lpfc9_cr_delay = -1; +static int lpfc9_cr_count = -1; + +/* HBA 10 */ +#ifdef MODULE_PARM +MODULE_PARM(lpfc10_log_verbose, "i"); +MODULE_PARM(lpfc10_log_only, "i"); +MODULE_PARM(lpfc10_lun_queue_depth, "i"); +MODULE_PARM(lpfc10_tgt_queue_depth, "i"); +MODULE_PARM(lpfc10_no_device_delay, "i"); +MODULE_PARM(lpfc10_network_on, "i"); +MODULE_PARM(lpfc10_xmt_que_size, "i"); +MODULE_PARM(lpfc10_scandown, "i"); +MODULE_PARM(lpfc10_linkdown_tmo, "i"); +MODULE_PARM(lpfc10_nodev_tmo, "i"); +MODULE_PARM(lpfc10_delay_rsp_err, "i"); +MODULE_PARM(lpfc10_nodev_holdio, "i"); +MODULE_PARM(lpfc10_check_cond_err, "i"); +MODULE_PARM(lpfc10_num_iocbs, "i"); +MODULE_PARM(lpfc10_num_bufs, "i"); +MODULE_PARM(lpfc10_topology, "i"); +MODULE_PARM(lpfc10_link_speed, "i"); +MODULE_PARM(lpfc10_ip_class, "i"); +MODULE_PARM(lpfc10_fcp_class, "i"); +MODULE_PARM(lpfc10_use_adisc, "i"); +MODULE_PARM(lpfc10_fcpfabric_tmo, "i"); +MODULE_PARM(lpfc10_post_ip_buf, "i"); +MODULE_PARM(lpfc10_dqfull_throttle_up_time, "i"); +MODULE_PARM(lpfc10_dqfull_throttle_up_inc, "i"); +MODULE_PARM(lpfc10_ack0support, "i"); +MODULE_PARM(lpfc10_automap, "i"); +MODULE_PARM(lpfc10_cr_delay, "i"); +MODULE_PARM(lpfc10_cr_count, "i"); +#endif + +static int lpfc10_log_verbose = -1; +static int lpfc10_log_only = -1; +static int lpfc10_lun_queue_depth = -1; +static int lpfc10_tgt_queue_depth = -1; +static int lpfc10_no_device_delay = -1; +static int lpfc10_network_on = -1; +static int lpfc10_xmt_que_size = -1; +static int lpfc10_scandown = -1; +static int lpfc10_linkdown_tmo = -1; +static int lpfc10_nodev_tmo = -1; +static int lpfc10_delay_rsp_err = -1; +static int lpfc10_nodev_holdio = -1; +static int lpfc10_check_cond_err = -1; +static int lpfc10_num_iocbs = -1; +static int lpfc10_num_bufs = -1; +static int lpfc10_topology = -1; +static int lpfc10_link_speed = -1; +static int lpfc10_ip_class = -1; +static int lpfc10_fcp_class = -1; +static int lpfc10_use_adisc = -1; +static int lpfc10_fcpfabric_tmo = -1; +static int lpfc10_post_ip_buf = -1; +static int lpfc10_dqfull_throttle_up_time = -1; +static int lpfc10_dqfull_throttle_up_inc = -1; +static int lpfc10_ack0support = -1; +static int lpfc10_automap = -1; +static int lpfc10_cr_delay = -1; +static int lpfc10_cr_count = -1; + +/* HBA 11 */ +#ifdef MODULE_PARM +MODULE_PARM(lpfc11_log_verbose, "i"); +MODULE_PARM(lpfc11_log_only, "i"); +MODULE_PARM(lpfc11_lun_queue_depth, "i"); +MODULE_PARM(lpfc11_tgt_queue_depth, "i"); +MODULE_PARM(lpfc11_no_device_delay, "i"); +MODULE_PARM(lpfc11_network_on, "i"); +MODULE_PARM(lpfc11_xmt_que_size, "i"); +MODULE_PARM(lpfc11_scandown, "i"); +MODULE_PARM(lpfc11_linkdown_tmo, "i"); +MODULE_PARM(lpfc11_nodev_tmo, "i"); +MODULE_PARM(lpfc11_delay_rsp_err, "i"); +MODULE_PARM(lpfc11_nodev_holdio, "i"); +MODULE_PARM(lpfc11_check_cond_err, "i"); +MODULE_PARM(lpfc11_num_iocbs, "i"); +MODULE_PARM(lpfc11_num_bufs, "i"); +MODULE_PARM(lpfc11_topology, "i"); +MODULE_PARM(lpfc11_link_speed, "i"); +MODULE_PARM(lpfc11_ip_class, "i"); +MODULE_PARM(lpfc11_fcp_class, "i"); +MODULE_PARM(lpfc11_use_adisc, "i"); +MODULE_PARM(lpfc11_fcpfabric_tmo, "i"); +MODULE_PARM(lpfc11_post_ip_buf, "i"); +MODULE_PARM(lpfc11_dqfull_throttle_up_time, "i"); +MODULE_PARM(lpfc11_dqfull_throttle_up_inc, "i"); +MODULE_PARM(lpfc11_ack0support, "i"); +MODULE_PARM(lpfc11_automap, "i"); +MODULE_PARM(lpfc11_cr_delay, "i"); +MODULE_PARM(lpfc11_cr_count, "i"); +#endif + +static int lpfc11_log_verbose = -1; +static int lpfc11_log_only = -1; +static int lpfc11_lun_queue_depth = -1; +static int lpfc11_tgt_queue_depth = -1; +static int lpfc11_no_device_delay = -1; +static int lpfc11_network_on = -1; +static int lpfc11_xmt_que_size = -1; +static int lpfc11_scandown = -1; +static int lpfc11_linkdown_tmo = -1; +static int lpfc11_nodev_tmo = -1; +static int lpfc11_delay_rsp_err = -1; +static int lpfc11_nodev_holdio = -1; +static int lpfc11_check_cond_err = -1; +static int lpfc11_num_iocbs = -1; +static int lpfc11_num_bufs = -1; +static int lpfc11_topology = -1; +static int lpfc11_link_speed = -1; +static int lpfc11_ip_class = -1; +static int lpfc11_fcp_class = -1; +static int lpfc11_use_adisc = -1; +static int lpfc11_fcpfabric_tmo = -1; +static int lpfc11_post_ip_buf = -1; +static int lpfc11_dqfull_throttle_up_time = -1; +static int lpfc11_dqfull_throttle_up_inc = -1; +static int lpfc11_ack0support = -1; +static int lpfc11_automap = -1; +static int lpfc11_cr_delay = -1; +static int lpfc11_cr_count = -1; + +/* HBA 12 */ +#ifdef MODULE_PARM +MODULE_PARM(lpfc12_log_verbose, "i"); +MODULE_PARM(lpfc12_log_only, "i"); +MODULE_PARM(lpfc12_lun_queue_depth, "i"); +MODULE_PARM(lpfc12_tgt_queue_depth, "i"); +MODULE_PARM(lpfc12_no_device_delay, "i"); +MODULE_PARM(lpfc12_network_on, "i"); +MODULE_PARM(lpfc12_xmt_que_size, "i"); +MODULE_PARM(lpfc12_scandown, "i"); +MODULE_PARM(lpfc12_linkdown_tmo, "i"); +MODULE_PARM(lpfc12_nodev_tmo, "i"); +MODULE_PARM(lpfc12_delay_rsp_err, "i"); +MODULE_PARM(lpfc12_nodev_holdio, "i"); +MODULE_PARM(lpfc12_check_cond_err, "i"); +MODULE_PARM(lpfc12_num_iocbs, "i"); +MODULE_PARM(lpfc12_num_bufs, "i"); +MODULE_PARM(lpfc12_topology, "i"); +MODULE_PARM(lpfc12_link_speed, "i"); +MODULE_PARM(lpfc12_ip_class, "i"); +MODULE_PARM(lpfc12_fcp_class, "i"); +MODULE_PARM(lpfc12_use_adisc, "i"); +MODULE_PARM(lpfc12_fcpfabric_tmo, "i"); +MODULE_PARM(lpfc12_post_ip_buf, "i"); +MODULE_PARM(lpfc12_dqfull_throttle_up_time, "i"); +MODULE_PARM(lpfc12_dqfull_throttle_up_inc, "i"); +MODULE_PARM(lpfc12_ack0support, "i"); +MODULE_PARM(lpfc12_automap, "i"); +MODULE_PARM(lpfc12_cr_delay, "i"); +MODULE_PARM(lpfc12_cr_count, "i"); +#endif + +static int lpfc12_log_verbose = -1; +static int lpfc12_log_only = -1; +static int lpfc12_lun_queue_depth = -1; +static int lpfc12_tgt_queue_depth = -1; +static int lpfc12_no_device_delay = -1; +static int lpfc12_network_on = -1; +static int lpfc12_xmt_que_size = -1; +static int lpfc12_scandown = -1; +static int lpfc12_linkdown_tmo = -1; +static int lpfc12_nodev_tmo = -1; +static int lpfc12_delay_rsp_err = -1; +static int lpfc12_nodev_holdio = -1; +static int lpfc12_check_cond_err = -1; +static int lpfc12_num_iocbs = -1; +static int lpfc12_num_bufs = -1; +static int lpfc12_topology = -1; +static int lpfc12_link_speed = -1; +static int lpfc12_ip_class = -1; +static int lpfc12_fcp_class = -1; +static int lpfc12_use_adisc = -1; +static int lpfc12_fcpfabric_tmo = -1; +static int lpfc12_post_ip_buf = -1; +static int lpfc12_dqfull_throttle_up_time = -1; +static int lpfc12_dqfull_throttle_up_inc = -1; +static int lpfc12_ack0support = -1; +static int lpfc12_automap = -1; +static int lpfc12_cr_delay = -1; +static int lpfc12_cr_count = -1; + +/* HBA 13 */ +#ifdef MODULE_PARM +MODULE_PARM(lpfc13_log_verbose, "i"); +MODULE_PARM(lpfc13_log_only, "i"); +MODULE_PARM(lpfc13_lun_queue_depth, "i"); +MODULE_PARM(lpfc13_tgt_queue_depth, "i"); +MODULE_PARM(lpfc13_no_device_delay, "i"); +MODULE_PARM(lpfc13_network_on, "i"); +MODULE_PARM(lpfc13_xmt_que_size, "i"); +MODULE_PARM(lpfc13_scandown, "i"); +MODULE_PARM(lpfc13_linkdown_tmo, "i"); +MODULE_PARM(lpfc13_nodev_tmo, "i"); +MODULE_PARM(lpfc13_delay_rsp_err, "i"); +MODULE_PARM(lpfc13_nodev_holdio, "i"); +MODULE_PARM(lpfc13_check_cond_err, "i"); +MODULE_PARM(lpfc13_num_iocbs, "i"); +MODULE_PARM(lpfc13_num_bufs, "i"); +MODULE_PARM(lpfc13_topology, "i"); +MODULE_PARM(lpfc13_link_speed, "i"); +MODULE_PARM(lpfc13_ip_class, "i"); +MODULE_PARM(lpfc13_fcp_class, "i"); +MODULE_PARM(lpfc13_use_adisc, "i"); +MODULE_PARM(lpfc13_fcpfabric_tmo, "i"); +MODULE_PARM(lpfc13_post_ip_buf, "i"); +MODULE_PARM(lpfc13_dqfull_throttle_up_time, "i"); +MODULE_PARM(lpfc13_dqfull_throttle_up_inc, "i"); +MODULE_PARM(lpfc13_ack0support, "i"); +MODULE_PARM(lpfc13_automap, "i"); +MODULE_PARM(lpfc13_cr_delay, "i"); +MODULE_PARM(lpfc13_cr_count, "i"); +#endif + +static int lpfc13_log_verbose = -1; +static int lpfc13_log_only = -1; +static int lpfc13_lun_queue_depth = -1; +static int lpfc13_tgt_queue_depth = -1; +static int lpfc13_no_device_delay = -1; +static int lpfc13_network_on = -1; +static int lpfc13_xmt_que_size = -1; +static int lpfc13_scandown = -1; +static int lpfc13_linkdown_tmo = -1; +static int lpfc13_nodev_tmo = -1; +static int lpfc13_delay_rsp_err = -1; +static int lpfc13_nodev_holdio = -1; +static int lpfc13_check_cond_err = -1; +static int lpfc13_num_iocbs = -1; +static int lpfc13_num_bufs = -1; +static int lpfc13_topology = -1; +static int lpfc13_link_speed = -1; +static int lpfc13_ip_class = -1; +static int lpfc13_fcp_class = -1; +static int lpfc13_use_adisc = -1; +static int lpfc13_fcpfabric_tmo = -1; +static int lpfc13_post_ip_buf = -1; +static int lpfc13_dqfull_throttle_up_time = -1; +static int lpfc13_dqfull_throttle_up_inc = -1; +static int lpfc13_ack0support = -1; +static int lpfc13_automap = -1; +static int lpfc13_cr_delay = -1; +static int lpfc13_cr_count = -1; + +/* HBA 14 */ +#ifdef MODULE_PARM +MODULE_PARM(lpfc14_log_verbose, "i"); +MODULE_PARM(lpfc14_log_only, "i"); +MODULE_PARM(lpfc14_lun_queue_depth, "i"); +MODULE_PARM(lpfc14_tgt_queue_depth, "i"); +MODULE_PARM(lpfc14_no_device_delay, "i"); +MODULE_PARM(lpfc14_network_on, "i"); +MODULE_PARM(lpfc14_xmt_que_size, "i"); +MODULE_PARM(lpfc14_scandown, "i"); +MODULE_PARM(lpfc14_linkdown_tmo, "i"); +MODULE_PARM(lpfc14_nodev_tmo, "i"); +MODULE_PARM(lpfc14_delay_rsp_err, "i"); +MODULE_PARM(lpfc14_nodev_holdio, "i"); +MODULE_PARM(lpfc14_check_cond_err, "i"); +MODULE_PARM(lpfc14_num_iocbs, "i"); +MODULE_PARM(lpfc14_num_bufs, "i"); +MODULE_PARM(lpfc14_topology, "i"); +MODULE_PARM(lpfc14_link_speed, "i"); +MODULE_PARM(lpfc14_ip_class, "i"); +MODULE_PARM(lpfc14_fcp_class, "i"); +MODULE_PARM(lpfc14_use_adisc, "i"); +MODULE_PARM(lpfc14_fcpfabric_tmo, "i"); +MODULE_PARM(lpfc14_post_ip_buf, "i"); +MODULE_PARM(lpfc14_dqfull_throttle_up_time, "i"); +MODULE_PARM(lpfc14_dqfull_throttle_up_inc, "i"); +MODULE_PARM(lpfc14_ack0support, "i"); +MODULE_PARM(lpfc14_automap, "i"); +MODULE_PARM(lpfc14_cr_delay, "i"); +MODULE_PARM(lpfc14_cr_count, "i"); +#endif + +static int lpfc14_log_verbose = -1; +static int lpfc14_log_only = -1; +static int lpfc14_lun_queue_depth = -1; +static int lpfc14_tgt_queue_depth = -1; +static int lpfc14_no_device_delay = -1; +static int lpfc14_network_on = -1; +static int lpfc14_xmt_que_size = -1; +static int lpfc14_scandown = -1; +static int lpfc14_linkdown_tmo = -1; +static int lpfc14_nodev_tmo = -1; +static int lpfc14_delay_rsp_err = -1; +static int lpfc14_nodev_holdio = -1; +static int lpfc14_check_cond_err = -1; +static int lpfc14_num_iocbs = -1; +static int lpfc14_num_bufs = -1; +static int lpfc14_topology = -1; +static int lpfc14_link_speed = -1; +static int lpfc14_ip_class = -1; +static int lpfc14_fcp_class = -1; +static int lpfc14_use_adisc = -1; +static int lpfc14_fcpfabric_tmo = -1; +static int lpfc14_post_ip_buf = -1; +static int lpfc14_dqfull_throttle_up_time = -1; +static int lpfc14_dqfull_throttle_up_inc = -1; +static int lpfc14_ack0support = -1; +static int lpfc14_automap = -1; +static int lpfc14_cr_delay = -1; +static int lpfc14_cr_count = -1; + +/* HBA 15 */ +#ifdef MODULE_PARM +MODULE_PARM(lpfc15_log_verbose, "i"); +MODULE_PARM(lpfc15_log_only, "i"); +MODULE_PARM(lpfc15_lun_queue_depth, "i"); +MODULE_PARM(lpfc15_tgt_queue_depth, "i"); +MODULE_PARM(lpfc15_no_device_delay, "i"); +MODULE_PARM(lpfc15_network_on, "i"); +MODULE_PARM(lpfc15_xmt_que_size, "i"); +MODULE_PARM(lpfc15_scandown, "i"); +MODULE_PARM(lpfc15_linkdown_tmo, "i"); +MODULE_PARM(lpfc15_nodev_tmo, "i"); +MODULE_PARM(lpfc15_delay_rsp_err, "i"); +MODULE_PARM(lpfc15_nodev_holdio, "i"); +MODULE_PARM(lpfc15_check_cond_err, "i"); +MODULE_PARM(lpfc15_num_iocbs, "i"); +MODULE_PARM(lpfc15_num_bufs, "i"); +MODULE_PARM(lpfc15_topology, "i"); +MODULE_PARM(lpfc15_link_speed, "i"); +MODULE_PARM(lpfc15_ip_class, "i"); +MODULE_PARM(lpfc15_fcp_class, "i"); +MODULE_PARM(lpfc15_use_adisc, "i"); +MODULE_PARM(lpfc15_fcpfabric_tmo, "i"); +MODULE_PARM(lpfc15_post_ip_buf, "i"); +MODULE_PARM(lpfc15_dqfull_throttle_up_time, "i"); +MODULE_PARM(lpfc15_dqfull_throttle_up_inc, "i"); +MODULE_PARM(lpfc15_ack0support, "i"); +MODULE_PARM(lpfc15_automap, "i"); +MODULE_PARM(lpfc15_cr_delay, "i"); +MODULE_PARM(lpfc15_cr_count, "i"); +#endif + +static int lpfc15_log_verbose = -1; +static int lpfc15_log_only = -1; +static int lpfc15_lun_queue_depth = -1; +static int lpfc15_tgt_queue_depth = -1; +static int lpfc15_no_device_delay = -1; +static int lpfc15_network_on = -1; +static int lpfc15_xmt_que_size = -1; +static int lpfc15_scandown = -1; +static int lpfc15_linkdown_tmo = -1; +static int lpfc15_nodev_tmo = -1; +static int lpfc15_delay_rsp_err = -1; +static int lpfc15_nodev_holdio = -1; +static int lpfc15_check_cond_err = -1; +static int lpfc15_num_iocbs = -1; +static int lpfc15_num_bufs = -1; +static int lpfc15_topology = -1; +static int lpfc15_link_speed = -1; +static int lpfc15_ip_class = -1; +static int lpfc15_fcp_class = -1; +static int lpfc15_use_adisc = -1; +static int lpfc15_fcpfabric_tmo = -1; +static int lpfc15_post_ip_buf = -1; +static int lpfc15_dqfull_throttle_up_time = -1; +static int lpfc15_dqfull_throttle_up_inc = -1; +static int lpfc15_ack0support = -1; +static int lpfc15_automap = -1; +static int lpfc15_cr_delay = -1; +static int lpfc15_cr_count = -1; + +#ifdef MODULE_PARM +MODULE_PARM(lpfc_log_verbose, "i"); +MODULE_PARM(lpfc_log_only, "i"); +MODULE_PARM(lpfc_lun_queue_depth, "i"); +MODULE_PARM(lpfc_tgt_queue_depth, "i"); +MODULE_PARM(lpfc_no_device_delay, "i"); +MODULE_PARM(lpfc_network_on, "i"); +MODULE_PARM(lpfc_xmt_que_size, "i"); +MODULE_PARM(lpfc_scandown, "i"); +MODULE_PARM(lpfc_linkdown_tmo, "i"); +MODULE_PARM(lpfc_nodev_tmo, "i"); +MODULE_PARM(lpfc_delay_rsp_err, "i"); +MODULE_PARM(lpfc_nodev_holdio, "i"); +MODULE_PARM(lpfc_check_cond_err, "i"); +MODULE_PARM(lpfc_num_iocbs, "i"); +MODULE_PARM(lpfc_num_bufs, "i"); +MODULE_PARM(lpfc_topology, "i"); +MODULE_PARM(lpfc_link_speed, "i"); +MODULE_PARM(lpfc_ip_class, "i"); +MODULE_PARM(lpfc_fcp_class, "i"); +MODULE_PARM(lpfc_use_adisc, "i"); +MODULE_PARM(lpfc_fcpfabric_tmo, "i"); +MODULE_PARM(lpfc_post_ip_buf, "i"); +MODULE_PARM(lpfc_dqfull_throttle_up_time, "i"); +MODULE_PARM(lpfc_dqfull_throttle_up_inc, "i"); +MODULE_PARM(lpfc_ack0support, "i"); +MODULE_PARM(lpfc_automap, "i"); +MODULE_PARM(lpfc_cr_delay, "i"); +MODULE_PARM(lpfc_cr_count, "i"); +#endif + +extern int lpfc_log_verbose; +extern int lpfc_log_only; +extern int lpfc_lun_queue_depth; +extern int lpfc_tgt_queue_depth; +extern int lpfc_no_device_delay; +extern int lpfc_network_on; +extern int lpfc_xmt_que_size; +extern int lpfc_scandown; +extern int lpfc_linkdown_tmo; +extern int lpfc_nodev_tmo; +extern int lpfc_delay_rsp_err; +extern int lpfc_nodev_holdio; +extern int lpfc_check_cond_err; +extern int lpfc_num_iocbs; +extern int lpfc_num_bufs; +extern int lpfc_topology; +extern int lpfc_link_speed; +extern int lpfc_ip_class; +extern int lpfc_fcp_class; +extern int lpfc_use_adisc; +extern int lpfc_fcpfabric_tmo; +extern int lpfc_post_ip_buf; +extern int lpfc_dqfull_throttle_up_time; +extern int lpfc_dqfull_throttle_up_inc; +extern int lpfc_ack0support; +extern int lpfc_automap; +extern int lpfc_cr_delay; +extern int lpfc_cr_count; + + +void * +fc_get_cfg_param( +int brd, +int param) +{ + void *value; + + value = (void *)((ulong)(-1)); + switch(brd) { + case 0: /* HBA 0 */ + switch(param) { + case CFG_LOG_VERBOSE: /* log-verbose */ + value = (void *)((ulong)lpfc_log_verbose); + if(lpfc0_log_verbose != -1) + value = (void *)((ulong)lpfc0_log_verbose); + break; + case CFG_LOG_ONLY: /* log-only */ + value = (void *)((ulong)lpfc_log_only); + if(lpfc0_log_only != -1) + value = (void *)((ulong)lpfc0_log_only); + break; + case CFG_NUM_IOCBS: /* num-iocbs */ + value = (void *)((ulong)lpfc_num_iocbs); + if(lpfc0_num_iocbs != -1) + value = (void *)((ulong)lpfc0_num_iocbs); + break; + case CFG_NUM_BUFS: /* num-bufs */ + value = (void *)((ulong)lpfc_num_bufs); + if(lpfc0_num_bufs != -1) + value = (void *)((ulong)lpfc0_num_bufs); + break; + case CFG_AUTOMAP: /* automap */ + value = (void *)((ulong)lpfc_automap); + if(lpfc0_automap != -1) + value = (void *)((ulong)lpfc0_automap); + break; + case CFG_CR_DELAY: /* cr_delay */ + value = (void *)((ulong)lpfc_cr_delay); + if(lpfc0_cr_delay != -1) + value = (void *)((ulong)lpfc0_cr_delay); + break; + case CFG_CR_COUNT: /* cr_count */ + value = (void *)((ulong)lpfc_cr_count); + if(lpfc0_cr_count != -1) + value = (void *)((ulong)lpfc0_cr_count); + break; + case CFG_DFT_TGT_Q_DEPTH: /* tgt_queue_depth */ + value = (void *)((ulong)lpfc_tgt_queue_depth); + if(lpfc0_tgt_queue_depth != -1) + value = (void *)((ulong)lpfc0_tgt_queue_depth); + break; + case CFG_DFT_LUN_Q_DEPTH: /* lun_queue_depth */ + value = (void *)((ulong)lpfc_lun_queue_depth); + if(lpfc0_lun_queue_depth != -1) + value = (void *)((ulong)lpfc0_lun_queue_depth); + break; + case CFG_FCPFABRIC_TMO: /* fcpfabric-tmo */ + value = (void *)((ulong)lpfc_fcpfabric_tmo); + if(lpfc0_fcpfabric_tmo != -1) + value = (void *)((ulong)lpfc0_fcpfabric_tmo); + break; + case CFG_FCP_CLASS: /* fcp-class */ + value = (void *)((ulong)lpfc_fcp_class); + if(lpfc0_fcp_class != -1) + value = (void *)((ulong)lpfc0_fcp_class); + break; + case CFG_USE_ADISC: /* use-adisc */ + value = (void *)((ulong)lpfc_use_adisc); + if(lpfc0_use_adisc != -1) + value = (void *)((ulong)lpfc0_use_adisc); + break; + case CFG_NO_DEVICE_DELAY: /* no-device-delay */ + value = (void *)((ulong)lpfc_no_device_delay); + if(lpfc0_no_device_delay != -1) + value = (void *)((ulong)lpfc0_no_device_delay); + break; + case CFG_NETWORK_ON: /* network-on */ + value = (void *)((ulong)lpfc_network_on); + if(lpfc0_network_on != -1) + value = (void *)((ulong)lpfc0_network_on); + break; + case CFG_POST_IP_BUF: /* post-ip-buf */ + value = (void *)((ulong)lpfc_post_ip_buf); + if(lpfc0_post_ip_buf != -1) + value = (void *)((ulong)lpfc0_post_ip_buf); + break; + case CFG_XMT_Q_SIZE: /* xmt-que-size */ + value = (void *)((ulong)lpfc_xmt_que_size); + if(lpfc0_xmt_que_size != -1) + value = (void *)((ulong)lpfc0_xmt_que_size); + break; + case CFG_IP_CLASS: /* ip-class */ + value = (void *)((ulong)lpfc_ip_class); + if(lpfc0_ip_class != -1) + value = (void *)((ulong)lpfc0_ip_class); + break; + case CFG_ACK0: /* ack0 */ + value = (void *)((ulong)lpfc_ack0support); + if(lpfc0_ack0support != -1) + value = (void *)((ulong)lpfc0_ack0support); + break; + case CFG_TOPOLOGY: /* topology */ + value = (void *)((ulong)lpfc_topology); + if(lpfc0_topology != -1) + value = (void *)((ulong)lpfc0_topology); + break; + case CFG_SCAN_DOWN: /* scan-down */ + value = (void *)((ulong)lpfc_scandown); + if(lpfc0_scandown != -1) + value = (void *)((ulong)lpfc0_scandown); + break; + case CFG_LINKDOWN_TMO: /* linkdown-tmo */ + value = (void *)((ulong)lpfc_linkdown_tmo); + if(lpfc0_linkdown_tmo != -1) + value = (void *)((ulong)lpfc0_linkdown_tmo); + break; + case CFG_HOLDIO: /* nodev-holdio */ + value = (void *)((ulong)lpfc_nodev_holdio); + if(lpfc0_nodev_holdio != -1) + value = (void *)((ulong)lpfc0_nodev_holdio); + break; + case CFG_DELAY_RSP_ERR: /* delay-rsp-err */ + value = (void *)((ulong)lpfc_delay_rsp_err); + if(lpfc0_delay_rsp_err != -1) + value = (void *)((ulong)lpfc0_delay_rsp_err); + break; + case CFG_CHK_COND_ERR: /* check-cond-err */ + value = (void *)((ulong)lpfc_check_cond_err); + if(lpfc0_check_cond_err != -1) + value = (void *)((ulong)lpfc0_check_cond_err); + break; + case CFG_NODEV_TMO: /* nodev-tmo */ + value = (void *)((ulong)lpfc_nodev_tmo); + if(lpfc0_nodev_tmo != -1) + value = (void *)((ulong)lpfc0_nodev_tmo); + break; + case CFG_LINK_SPEED: /* link-speed */ + value = (void *)((ulong)lpfc_link_speed); + if(lpfc0_link_speed != -1) + value = (void *)((ulong)lpfc0_link_speed); + break; + case CFG_DQFULL_THROTTLE_UP_TIME: /* dqfull-throttle-up-time */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_time); + if(lpfc0_dqfull_throttle_up_time != -1) + value = (void *)((ulong)lpfc0_dqfull_throttle_up_time); + break; + case CFG_DQFULL_THROTTLE_UP_INC: /* dqfull-throttle-up-inc */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_inc); + if(lpfc0_dqfull_throttle_up_inc != -1) + value = (void *)((ulong)lpfc0_dqfull_throttle_up_inc); + break; + default: + break; + } + break; + case 1: /* HBA 1 */ + switch(param) { + case CFG_LOG_VERBOSE: /* log-verbose */ + value = (void *)((ulong)lpfc_log_verbose); + if(lpfc1_log_verbose != -1) + value = (void *)((ulong)lpfc1_log_verbose); + break; + case CFG_LOG_ONLY: /* log-only */ + value = (void *)((ulong)lpfc_log_only); + if(lpfc1_log_only != -1) + value = (void *)((ulong)lpfc1_log_only); + break; + case CFG_NUM_IOCBS: /* num-iocbs */ + value = (void *)((ulong)lpfc_num_iocbs); + if(lpfc1_num_iocbs != -1) + value = (void *)((ulong)lpfc1_num_iocbs); + break; + case CFG_NUM_BUFS: /* num-bufs */ + value = (void *)((ulong)lpfc_num_bufs); + if(lpfc1_num_bufs != -1) + value = (void *)((ulong)lpfc1_num_bufs); + break; + case CFG_AUTOMAP: /* automap */ + value = (void *)((ulong)lpfc_automap); + if(lpfc1_automap != -1) + value = (void *)((ulong)lpfc1_automap); + break; + case CFG_CR_DELAY: /* cr_delay */ + value = (void *)((ulong)lpfc_cr_delay); + if(lpfc1_cr_delay != -1) + value = (void *)((ulong)lpfc1_cr_delay); + break; + case CFG_CR_COUNT: /* cr_count */ + value = (void *)((ulong)lpfc_cr_count); + if(lpfc1_cr_count != -1) + value = (void *)((ulong)lpfc1_cr_count); + break; + case CFG_DFT_TGT_Q_DEPTH: /* tgt_queue_depth */ + value = (void *)((ulong)lpfc_tgt_queue_depth); + if(lpfc1_tgt_queue_depth != -1) + value = (void *)((ulong)lpfc1_tgt_queue_depth); + break; + case CFG_DFT_LUN_Q_DEPTH: /* lun_queue_depth */ + value = (void *)((ulong)lpfc_lun_queue_depth); + if(lpfc1_lun_queue_depth != -1) + value = (void *)((ulong)lpfc1_lun_queue_depth); + break; + case CFG_FCPFABRIC_TMO: /* fcpfabric-tmo */ + value = (void *)((ulong)lpfc_fcpfabric_tmo); + if(lpfc1_fcpfabric_tmo != -1) + value = (void *)((ulong)lpfc1_fcpfabric_tmo); + break; + case CFG_FCP_CLASS: /* fcp-class */ + value = (void *)((ulong)lpfc_fcp_class); + if(lpfc1_fcp_class != -1) + value = (void *)((ulong)lpfc1_fcp_class); + break; + case CFG_USE_ADISC: /* use-adisc */ + value = (void *)((ulong)lpfc_use_adisc); + if(lpfc1_use_adisc != -1) + value = (void *)((ulong)lpfc1_use_adisc); + break; + case CFG_NO_DEVICE_DELAY: /* no-device-delay */ + value = (void *)((ulong)lpfc_no_device_delay); + if(lpfc1_no_device_delay != -1) + value = (void *)((ulong)lpfc1_no_device_delay); + break; + case CFG_NETWORK_ON: /* network-on */ + value = (void *)((ulong)lpfc_network_on); + if(lpfc1_network_on != -1) + value = (void *)((ulong)lpfc1_network_on); + break; + case CFG_POST_IP_BUF: /* post-ip-buf */ + value = (void *)((ulong)lpfc_post_ip_buf); + if(lpfc1_post_ip_buf != -1) + value = (void *)((ulong)lpfc1_post_ip_buf); + break; + case CFG_XMT_Q_SIZE: /* xmt-que-size */ + value = (void *)((ulong)lpfc_xmt_que_size); + if(lpfc1_xmt_que_size != -1) + value = (void *)((ulong)lpfc1_xmt_que_size); + break; + case CFG_IP_CLASS: /* ip-class */ + value = (void *)((ulong)lpfc_ip_class); + if(lpfc1_ip_class != -1) + value = (void *)((ulong)lpfc1_ip_class); + break; + case CFG_ACK0: /* ack0 */ + value = (void *)((ulong)lpfc_ack0support); + if(lpfc1_ack0support != -1) + value = (void *)((ulong)lpfc1_ack0support); + break; + case CFG_TOPOLOGY: /* topology */ + value = (void *)((ulong)lpfc_topology); + if(lpfc1_topology != -1) + value = (void *)((ulong)lpfc1_topology); + break; + case CFG_SCAN_DOWN: /* scan-down */ + value = (void *)((ulong)lpfc_scandown); + if(lpfc1_scandown != -1) + value = (void *)((ulong)lpfc1_scandown); + break; + case CFG_LINKDOWN_TMO: /* linkdown-tmo */ + value = (void *)((ulong)lpfc_linkdown_tmo); + if(lpfc1_linkdown_tmo != -1) + value = (void *)((ulong)lpfc1_linkdown_tmo); + break; + case CFG_HOLDIO: /* nodev-holdio */ + value = (void *)((ulong)lpfc_nodev_holdio); + if(lpfc1_nodev_holdio != -1) + value = (void *)((ulong)lpfc1_nodev_holdio); + break; + case CFG_DELAY_RSP_ERR: /* delay-rsp-err */ + value = (void *)((ulong)lpfc_delay_rsp_err); + if(lpfc1_delay_rsp_err != -1) + value = (void *)((ulong)lpfc1_delay_rsp_err); + break; + case CFG_CHK_COND_ERR: /* check-cond-err */ + value = (void *)((ulong)lpfc_check_cond_err); + if(lpfc1_check_cond_err != -1) + value = (void *)((ulong)lpfc1_check_cond_err); + break; + case CFG_NODEV_TMO: /* nodev-tmo */ + value = (void *)((ulong)lpfc_nodev_tmo); + if(lpfc1_nodev_tmo != -1) + value = (void *)((ulong)lpfc1_nodev_tmo); + break; + case CFG_LINK_SPEED: /* link-speed */ + value = (void *)((ulong)lpfc_link_speed); + if(lpfc1_link_speed != -1) + value = (void *)((ulong)lpfc1_link_speed); + break; + case CFG_DQFULL_THROTTLE_UP_TIME: /* dqfull-throttle-up-time */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_time); + if(lpfc1_dqfull_throttle_up_time != -1) + value = (void *)((ulong)lpfc1_dqfull_throttle_up_time); + break; + case CFG_DQFULL_THROTTLE_UP_INC: /* dqfull-throttle-up-inc */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_inc); + if(lpfc1_dqfull_throttle_up_inc != -1) + value = (void *)((ulong)lpfc1_dqfull_throttle_up_inc); + break; + } + break; + case 2: /* HBA 2 */ + switch(param) { + case CFG_LOG_VERBOSE: /* log-verbose */ + value = (void *)((ulong)lpfc_log_verbose); + if(lpfc2_log_verbose != -1) + value = (void *)((ulong)lpfc2_log_verbose); + break; + case CFG_LOG_ONLY: /* log-only */ + value = (void *)((ulong)lpfc_log_only); + if(lpfc2_log_only != -1) + value = (void *)((ulong)lpfc2_log_only); + break; + case CFG_NUM_IOCBS: /* num-iocbs */ + value = (void *)((ulong)lpfc_num_iocbs); + if(lpfc2_num_iocbs != -1) + value = (void *)((ulong)lpfc2_num_iocbs); + break; + case CFG_NUM_BUFS: /* num-bufs */ + value = (void *)((ulong)lpfc_num_bufs); + if(lpfc2_num_bufs != -1) + value = (void *)((ulong)lpfc2_num_bufs); + break; + case CFG_AUTOMAP: /* automap */ + value = (void *)((ulong)lpfc_automap); + if(lpfc2_automap != -1) + value = (void *)((ulong)lpfc2_automap); + break; + case CFG_CR_DELAY: /* cr_delay */ + value = (void *)((ulong)lpfc_cr_delay); + if(lpfc2_cr_delay != -1) + value = (void *)((ulong)lpfc2_cr_delay); + break; + case CFG_CR_COUNT: /* cr_count */ + value = (void *)((ulong)lpfc_cr_count); + if(lpfc2_cr_count != -1) + value = (void *)((ulong)lpfc2_cr_count); + break; + case CFG_DFT_TGT_Q_DEPTH: /* tgt_queue_depth */ + value = (void *)((ulong)lpfc_tgt_queue_depth); + if(lpfc2_tgt_queue_depth != -1) + value = (void *)((ulong)lpfc2_tgt_queue_depth); + break; + case CFG_DFT_LUN_Q_DEPTH: /* lun_queue_depth */ + value = (void *)((ulong)lpfc_lun_queue_depth); + if(lpfc2_lun_queue_depth != -1) + value = (void *)((ulong)lpfc2_lun_queue_depth); + break; + case CFG_FCPFABRIC_TMO: /* fcpfabric-tmo */ + value = (void *)((ulong)lpfc_fcpfabric_tmo); + if(lpfc2_fcpfabric_tmo != -1) + value = (void *)((ulong)lpfc2_fcpfabric_tmo); + break; + case CFG_FCP_CLASS: /* fcp-class */ + value = (void *)((ulong)lpfc_fcp_class); + if(lpfc2_fcp_class != -1) + value = (void *)((ulong)lpfc2_fcp_class); + break; + case CFG_USE_ADISC: /* use-adisc */ + value = (void *)((ulong)lpfc_use_adisc); + if(lpfc2_use_adisc != -1) + value = (void *)((ulong)lpfc2_use_adisc); + break; + case CFG_NO_DEVICE_DELAY: /* no-device-delay */ + value = (void *)((ulong)lpfc_no_device_delay); + if(lpfc2_no_device_delay != -1) + value = (void *)((ulong)lpfc2_no_device_delay); + break; + case CFG_NETWORK_ON: /* network-on */ + value = (void *)((ulong)lpfc_network_on); + if(lpfc2_network_on != -1) + value = (void *)((ulong)lpfc2_network_on); + break; + case CFG_POST_IP_BUF: /* post-ip-buf */ + value = (void *)((ulong)lpfc_post_ip_buf); + if(lpfc2_post_ip_buf != -1) + value = (void *)((ulong)lpfc2_post_ip_buf); + break; + case CFG_XMT_Q_SIZE: /* xmt-que-size */ + value = (void *)((ulong)lpfc_xmt_que_size); + if(lpfc2_xmt_que_size != -1) + value = (void *)((ulong)lpfc2_xmt_que_size); + break; + case CFG_IP_CLASS: /* ip-class */ + value = (void *)((ulong)lpfc_ip_class); + if(lpfc2_ip_class != -1) + value = (void *)((ulong)lpfc2_ip_class); + break; + case CFG_ACK0: /* ack0 */ + value = (void *)((ulong)lpfc_ack0support); + if(lpfc2_ack0support != -1) + value = (void *)((ulong)lpfc2_ack0support); + break; + case CFG_TOPOLOGY: /* topology */ + value = (void *)((ulong)lpfc_topology); + if(lpfc2_topology != -1) + value = (void *)((ulong)lpfc2_topology); + break; + case CFG_SCAN_DOWN: /* scan-down */ + value = (void *)((ulong)lpfc_scandown); + if(lpfc2_scandown != -1) + value = (void *)((ulong)lpfc2_scandown); + break; + case CFG_LINKDOWN_TMO: /* linkdown-tmo */ + value = (void *)((ulong)lpfc_linkdown_tmo); + if(lpfc2_linkdown_tmo != -1) + value = (void *)((ulong)lpfc2_linkdown_tmo); + break; + case CFG_HOLDIO: /* nodev-holdio */ + value = (void *)((ulong)lpfc_nodev_holdio); + if(lpfc2_nodev_holdio != -1) + value = (void *)((ulong)lpfc2_nodev_holdio); + break; + case CFG_DELAY_RSP_ERR: /* delay-rsp-err */ + value = (void *)((ulong)lpfc_delay_rsp_err); + if(lpfc2_delay_rsp_err != -1) + value = (void *)((ulong)lpfc2_delay_rsp_err); + break; + case CFG_CHK_COND_ERR: /* check-cond-err */ + value = (void *)((ulong)lpfc_check_cond_err); + if(lpfc2_check_cond_err != -1) + value = (void *)((ulong)lpfc2_check_cond_err); + break; + case CFG_NODEV_TMO: /* nodev-tmo */ + value = (void *)((ulong)lpfc_nodev_tmo); + if(lpfc2_nodev_tmo != -1) + value = (void *)((ulong)lpfc2_nodev_tmo); + break; + case CFG_LINK_SPEED: /* link-speed */ + value = (void *)((ulong)lpfc_link_speed); + if(lpfc2_link_speed != -1) + value = (void *)((ulong)lpfc2_link_speed); + break; + case CFG_DQFULL_THROTTLE_UP_TIME: /* dqfull-throttle-up-time */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_time); + if(lpfc2_dqfull_throttle_up_time != -1) + value = (void *)((ulong)lpfc2_dqfull_throttle_up_time); + break; + case CFG_DQFULL_THROTTLE_UP_INC: /* dqfull-throttle-up-inc */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_inc); + if(lpfc2_dqfull_throttle_up_inc != -1) + value = (void *)((ulong)lpfc2_dqfull_throttle_up_inc); + break; + } + break; + case 3: /* HBA 3 */ + switch(param) { + case CFG_LOG_VERBOSE: /* log-verbose */ + value = (void *)((ulong)lpfc_log_verbose); + if(lpfc3_log_verbose != -1) + value = (void *)((ulong)lpfc3_log_verbose); + break; + case CFG_LOG_ONLY: /* log-only */ + value = (void *)((ulong)lpfc_log_only); + if(lpfc3_log_only != -1) + value = (void *)((ulong)lpfc3_log_only); + break; + case CFG_NUM_IOCBS: /* num-iocbs */ + value = (void *)((ulong)lpfc_num_iocbs); + if(lpfc3_num_iocbs != -1) + value = (void *)((ulong)lpfc3_num_iocbs); + break; + case CFG_NUM_BUFS: /* num-bufs */ + value = (void *)((ulong)lpfc_num_bufs); + if(lpfc3_num_bufs != -1) + value = (void *)((ulong)lpfc3_num_bufs); + break; + case CFG_AUTOMAP: /* automap */ + value = (void *)((ulong)lpfc_automap); + if(lpfc3_automap != -1) + value = (void *)((ulong)lpfc3_automap); + break; + case CFG_CR_DELAY: /* cr_delay */ + value = (void *)((ulong)lpfc_cr_delay); + if(lpfc3_cr_delay != -1) + value = (void *)((ulong)lpfc3_cr_delay); + break; + case CFG_CR_COUNT: /* cr_count */ + value = (void *)((ulong)lpfc_cr_count); + if(lpfc3_cr_count != -1) + value = (void *)((ulong)lpfc3_cr_count); + break; + case CFG_DFT_TGT_Q_DEPTH: /* tgt_queue_depth */ + value = (void *)((ulong)lpfc_tgt_queue_depth); + if(lpfc3_tgt_queue_depth != -1) + value = (void *)((ulong)lpfc3_tgt_queue_depth); + break; + case CFG_DFT_LUN_Q_DEPTH: /* lun_queue_depth */ + value = (void *)((ulong)lpfc_lun_queue_depth); + if(lpfc3_lun_queue_depth != -1) + value = (void *)((ulong)lpfc3_lun_queue_depth); + break; + case CFG_FCPFABRIC_TMO: /* fcpfabric-tmo */ + value = (void *)((ulong)lpfc_fcpfabric_tmo); + if(lpfc3_fcpfabric_tmo != -1) + value = (void *)((ulong)lpfc3_fcpfabric_tmo); + break; + case CFG_FCP_CLASS: /* fcp-class */ + value = (void *)((ulong)lpfc_fcp_class); + if(lpfc3_fcp_class != -1) + value = (void *)((ulong)lpfc3_fcp_class); + break; + case CFG_USE_ADISC: /* use-adisc */ + value = (void *)((ulong)lpfc_use_adisc); + if(lpfc3_use_adisc != -1) + value = (void *)((ulong)lpfc3_use_adisc); + break; + case CFG_NO_DEVICE_DELAY: /* no-device-delay */ + value = (void *)((ulong)lpfc_no_device_delay); + if(lpfc3_no_device_delay != -1) + value = (void *)((ulong)lpfc3_no_device_delay); + break; + case CFG_NETWORK_ON: /* network-on */ + value = (void *)((ulong)lpfc_network_on); + if(lpfc3_network_on != -1) + value = (void *)((ulong)lpfc3_network_on); + break; + case CFG_POST_IP_BUF: /* post-ip-buf */ + value = (void *)((ulong)lpfc_post_ip_buf); + if(lpfc3_post_ip_buf != -1) + value = (void *)((ulong)lpfc3_post_ip_buf); + break; + case CFG_XMT_Q_SIZE: /* xmt-que-size */ + value = (void *)((ulong)lpfc_xmt_que_size); + if(lpfc3_xmt_que_size != -1) + value = (void *)((ulong)lpfc3_xmt_que_size); + break; + case CFG_IP_CLASS: /* ip-class */ + value = (void *)((ulong)lpfc_ip_class); + if(lpfc3_ip_class != -1) + value = (void *)((ulong)lpfc3_ip_class); + break; + case CFG_ACK0: /* ack0 */ + value = (void *)((ulong)lpfc_ack0support); + if(lpfc3_ack0support != -1) + value = (void *)((ulong)lpfc3_ack0support); + break; + case CFG_TOPOLOGY: /* topology */ + value = (void *)((ulong)lpfc_topology); + if(lpfc3_topology != -1) + value = (void *)((ulong)lpfc3_topology); + break; + case CFG_SCAN_DOWN: /* scan-down */ + value = (void *)((ulong)lpfc_scandown); + if(lpfc3_scandown != -1) + value = (void *)((ulong)lpfc3_scandown); + break; + case CFG_LINKDOWN_TMO: /* linkdown-tmo */ + value = (void *)((ulong)lpfc_linkdown_tmo); + if(lpfc3_linkdown_tmo != -1) + value = (void *)((ulong)lpfc3_linkdown_tmo); + break; + case CFG_HOLDIO: /* nodev-holdio */ + value = (void *)((ulong)lpfc_nodev_holdio); + if(lpfc3_nodev_holdio != -1) + value = (void *)((ulong)lpfc3_nodev_holdio); + break; + case CFG_DELAY_RSP_ERR: /* delay-rsp-err */ + value = (void *)((ulong)lpfc_delay_rsp_err); + if(lpfc3_delay_rsp_err != -1) + value = (void *)((ulong)lpfc3_delay_rsp_err); + break; + case CFG_CHK_COND_ERR: /* check-cond-err */ + value = (void *)((ulong)lpfc_check_cond_err); + if(lpfc3_check_cond_err != -1) + value = (void *)((ulong)lpfc3_check_cond_err); + break; + case CFG_NODEV_TMO: /* nodev-tmo */ + value = (void *)((ulong)lpfc_nodev_tmo); + if(lpfc3_nodev_tmo != -1) + value = (void *)((ulong)lpfc3_nodev_tmo); + break; + case CFG_LINK_SPEED: /* link-speed */ + value = (void *)((ulong)lpfc_link_speed); + if(lpfc3_link_speed != -1) + value = (void *)((ulong)lpfc3_link_speed); + break; + case CFG_DQFULL_THROTTLE_UP_TIME: /* dqfull-throttle-up-time */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_time); + if(lpfc3_dqfull_throttle_up_time != -1) + value = (void *)((ulong)lpfc3_dqfull_throttle_up_time); + break; + case CFG_DQFULL_THROTTLE_UP_INC: /* dqfull-throttle-up-inc */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_inc); + if(lpfc3_dqfull_throttle_up_inc != -1) + value = (void *)((ulong)lpfc3_dqfull_throttle_up_inc); + break; + } + break; + case 4: /* HBA 4 */ + switch(param) { + case CFG_LOG_VERBOSE: /* log-verbose */ + value = (void *)((ulong)lpfc_log_verbose); + if(lpfc4_log_verbose != -1) + value = (void *)((ulong)lpfc4_log_verbose); + break; + case CFG_LOG_ONLY: /* log-only */ + value = (void *)((ulong)lpfc_log_only); + if(lpfc4_log_only != -1) + value = (void *)((ulong)lpfc4_log_only); + break; + case CFG_NUM_IOCBS: /* num-iocbs */ + value = (void *)((ulong)lpfc_num_iocbs); + if(lpfc4_num_iocbs != -1) + value = (void *)((ulong)lpfc4_num_iocbs); + break; + case CFG_NUM_BUFS: /* num-bufs */ + value = (void *)((ulong)lpfc_num_bufs); + if(lpfc4_num_bufs != -1) + value = (void *)((ulong)lpfc4_num_bufs); + break; + case CFG_AUTOMAP: /* automap */ + value = (void *)((ulong)lpfc_automap); + if(lpfc4_automap != -1) + value = (void *)((ulong)lpfc4_automap); + break; + case CFG_CR_DELAY: /* cr_delay */ + value = (void *)((ulong)lpfc_cr_delay); + if(lpfc4_cr_delay != -1) + value = (void *)((ulong)lpfc4_cr_delay); + break; + case CFG_CR_COUNT: /* cr_count */ + value = (void *)((ulong)lpfc_cr_count); + if(lpfc4_cr_count != -1) + value = (void *)((ulong)lpfc4_cr_count); + break; + case CFG_DFT_TGT_Q_DEPTH: /* tgt_queue_depth */ + value = (void *)((ulong)lpfc_tgt_queue_depth); + if(lpfc4_tgt_queue_depth != -1) + value = (void *)((ulong)lpfc4_tgt_queue_depth); + break; + case CFG_DFT_LUN_Q_DEPTH: /* lun_queue_depth */ + value = (void *)((ulong)lpfc_lun_queue_depth); + if(lpfc4_lun_queue_depth != -1) + value = (void *)((ulong)lpfc4_lun_queue_depth); + break; + case CFG_FCPFABRIC_TMO: /* fcpfabric-tmo */ + value = (void *)((ulong)lpfc_fcpfabric_tmo); + if(lpfc4_fcpfabric_tmo != -1) + value = (void *)((ulong)lpfc4_fcpfabric_tmo); + break; + case CFG_FCP_CLASS: /* fcp-class */ + value = (void *)((ulong)lpfc_fcp_class); + if(lpfc4_fcp_class != -1) + value = (void *)((ulong)lpfc4_fcp_class); + break; + case CFG_USE_ADISC: /* use-adisc */ + value = (void *)((ulong)lpfc_use_adisc); + if(lpfc4_use_adisc != -1) + value = (void *)((ulong)lpfc4_use_adisc); + break; + case CFG_NO_DEVICE_DELAY: /* no-device-delay */ + value = (void *)((ulong)lpfc_no_device_delay); + if(lpfc4_no_device_delay != -1) + value = (void *)((ulong)lpfc4_no_device_delay); + break; + case CFG_NETWORK_ON: /* network-on */ + value = (void *)((ulong)lpfc_network_on); + if(lpfc4_network_on != -1) + value = (void *)((ulong)lpfc4_network_on); + break; + case CFG_POST_IP_BUF: /* post-ip-buf */ + value = (void *)((ulong)lpfc_post_ip_buf); + if(lpfc4_post_ip_buf != -1) + value = (void *)((ulong)lpfc4_post_ip_buf); + break; + case CFG_XMT_Q_SIZE: /* xmt-que-size */ + value = (void *)((ulong)lpfc_xmt_que_size); + if(lpfc4_xmt_que_size != -1) + value = (void *)((ulong)lpfc4_xmt_que_size); + break; + case CFG_IP_CLASS: /* ip-class */ + value = (void *)((ulong)lpfc_ip_class); + if(lpfc4_ip_class != -1) + value = (void *)((ulong)lpfc4_ip_class); + break; + case CFG_ACK0: /* ack0 */ + value = (void *)((ulong)lpfc_ack0support); + if(lpfc4_ack0support != -1) + value = (void *)((ulong)lpfc4_ack0support); + break; + case CFG_TOPOLOGY: /* topology */ + value = (void *)((ulong)lpfc_topology); + if(lpfc4_topology != -1) + value = (void *)((ulong)lpfc4_topology); + break; + case CFG_SCAN_DOWN: /* scan-down */ + value = (void *)((ulong)lpfc_scandown); + if(lpfc4_scandown != -1) + value = (void *)((ulong)lpfc4_scandown); + break; + case CFG_LINKDOWN_TMO: /* linkdown-tmo */ + value = (void *)((ulong)lpfc_linkdown_tmo); + if(lpfc4_linkdown_tmo != -1) + value = (void *)((ulong)lpfc4_linkdown_tmo); + break; + case CFG_HOLDIO: /* nodev-holdio */ + value = (void *)((ulong)lpfc_nodev_holdio); + if(lpfc4_nodev_holdio != -1) + value = (void *)((ulong)lpfc4_nodev_holdio); + break; + case CFG_DELAY_RSP_ERR: /* delay-rsp-err */ + value = (void *)((ulong)lpfc_delay_rsp_err); + if(lpfc4_delay_rsp_err != -1) + value = (void *)((ulong)lpfc4_delay_rsp_err); + break; + case CFG_CHK_COND_ERR: /* check-cond-err */ + value = (void *)((ulong)lpfc_check_cond_err); + if(lpfc4_check_cond_err != -1) + value = (void *)((ulong)lpfc4_check_cond_err); + break; + case CFG_NODEV_TMO: /* nodev-tmo */ + value = (void *)((ulong)lpfc_nodev_tmo); + if(lpfc4_nodev_tmo != -1) + value = (void *)((ulong)lpfc4_nodev_tmo); + break; + case CFG_LINK_SPEED: /* link-speed */ + value = (void *)((ulong)lpfc_link_speed); + if(lpfc4_link_speed != -1) + value = (void *)((ulong)lpfc4_link_speed); + break; + case CFG_DQFULL_THROTTLE_UP_TIME: /* dqfull-throttle-up-time */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_time); + if(lpfc4_dqfull_throttle_up_time != -1) + value = (void *)((ulong)lpfc4_dqfull_throttle_up_time); + break; + case CFG_DQFULL_THROTTLE_UP_INC: /* dqfull-throttle-up-inc */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_inc); + if(lpfc4_dqfull_throttle_up_inc != -1) + value = (void *)((ulong)lpfc4_dqfull_throttle_up_inc); + break; + } + break; + case 5: /* HBA 5 */ + switch(param) { + case CFG_LOG_VERBOSE: /* log-verbose */ + value = (void *)((ulong)lpfc_log_verbose); + if(lpfc5_log_verbose != -1) + value = (void *)((ulong)lpfc5_log_verbose); + break; + case CFG_LOG_ONLY: /* log-only */ + value = (void *)((ulong)lpfc_log_only); + if(lpfc5_log_only != -1) + value = (void *)((ulong)lpfc5_log_only); + break; + case CFG_NUM_IOCBS: /* num-iocbs */ + value = (void *)((ulong)lpfc_num_iocbs); + if(lpfc5_num_iocbs != -1) + value = (void *)((ulong)lpfc5_num_iocbs); + break; + case CFG_NUM_BUFS: /* num-bufs */ + value = (void *)((ulong)lpfc_num_bufs); + if(lpfc5_num_bufs != -1) + value = (void *)((ulong)lpfc5_num_bufs); + break; + case CFG_AUTOMAP: /* automap */ + value = (void *)((ulong)lpfc_automap); + if(lpfc5_automap != -1) + value = (void *)((ulong)lpfc5_automap); + break; + case CFG_CR_DELAY: /* cr_delay */ + value = (void *)((ulong)lpfc_cr_delay); + if(lpfc5_cr_delay != -1) + value = (void *)((ulong)lpfc5_cr_delay); + break; + case CFG_CR_COUNT: /* cr_count */ + value = (void *)((ulong)lpfc_cr_count); + if(lpfc5_cr_count != -1) + value = (void *)((ulong)lpfc5_cr_count); + break; + case CFG_DFT_TGT_Q_DEPTH: /* tgt_queue_depth */ + value = (void *)((ulong)lpfc_tgt_queue_depth); + if(lpfc5_tgt_queue_depth != -1) + value = (void *)((ulong)lpfc5_tgt_queue_depth); + break; + case CFG_DFT_LUN_Q_DEPTH: /* lun_queue_depth */ + value = (void *)((ulong)lpfc_lun_queue_depth); + if(lpfc5_lun_queue_depth != -1) + value = (void *)((ulong)lpfc5_lun_queue_depth); + break; + case CFG_FCPFABRIC_TMO: /* fcpfabric-tmo */ + value = (void *)((ulong)lpfc_fcpfabric_tmo); + if(lpfc5_fcpfabric_tmo != -1) + value = (void *)((ulong)lpfc5_fcpfabric_tmo); + break; + case CFG_FCP_CLASS: /* fcp-class */ + value = (void *)((ulong)lpfc_fcp_class); + if(lpfc5_fcp_class != -1) + value = (void *)((ulong)lpfc5_fcp_class); + break; + case CFG_USE_ADISC: /* use-adisc */ + value = (void *)((ulong)lpfc_use_adisc); + if(lpfc5_use_adisc != -1) + value = (void *)((ulong)lpfc5_use_adisc); + break; + case CFG_NO_DEVICE_DELAY: /* no-device-delay */ + value = (void *)((ulong)lpfc_no_device_delay); + if(lpfc5_no_device_delay != -1) + value = (void *)((ulong)lpfc5_no_device_delay); + break; + case CFG_NETWORK_ON: /* network-on */ + value = (void *)((ulong)lpfc_network_on); + if(lpfc5_network_on != -1) + value = (void *)((ulong)lpfc5_network_on); + break; + case CFG_POST_IP_BUF: /* post-ip-buf */ + value = (void *)((ulong)lpfc_post_ip_buf); + if(lpfc5_post_ip_buf != -1) + value = (void *)((ulong)lpfc5_post_ip_buf); + break; + case CFG_XMT_Q_SIZE: /* xmt-que-size */ + value = (void *)((ulong)lpfc_xmt_que_size); + if(lpfc5_xmt_que_size != -1) + value = (void *)((ulong)lpfc5_xmt_que_size); + break; + case CFG_IP_CLASS: /* ip-class */ + value = (void *)((ulong)lpfc_ip_class); + if(lpfc5_ip_class != -1) + value = (void *)((ulong)lpfc5_ip_class); + break; + case CFG_ACK0: /* ack0 */ + value = (void *)((ulong)lpfc_ack0support); + if(lpfc5_ack0support != -1) + value = (void *)((ulong)lpfc5_ack0support); + break; + case CFG_TOPOLOGY: /* topology */ + value = (void *)((ulong)lpfc_topology); + if(lpfc5_topology != -1) + value = (void *)((ulong)lpfc5_topology); + break; + case CFG_SCAN_DOWN: /* scan-down */ + value = (void *)((ulong)lpfc_scandown); + if(lpfc5_scandown != -1) + value = (void *)((ulong)lpfc5_scandown); + break; + case CFG_LINKDOWN_TMO: /* linkdown-tmo */ + value = (void *)((ulong)lpfc_linkdown_tmo); + if(lpfc5_linkdown_tmo != -1) + value = (void *)((ulong)lpfc5_linkdown_tmo); + break; + case CFG_HOLDIO: /* nodev-holdio */ + value = (void *)((ulong)lpfc_nodev_holdio); + if(lpfc5_nodev_holdio != -1) + value = (void *)((ulong)lpfc5_nodev_holdio); + break; + case CFG_DELAY_RSP_ERR: /* delay-rsp-err */ + value = (void *)((ulong)lpfc_delay_rsp_err); + if(lpfc5_delay_rsp_err != -1) + value = (void *)((ulong)lpfc5_delay_rsp_err); + break; + case CFG_CHK_COND_ERR: /* check-cond-err */ + value = (void *)((ulong)lpfc_check_cond_err); + if(lpfc5_check_cond_err != -1) + value = (void *)((ulong)lpfc5_check_cond_err); + break; + case CFG_NODEV_TMO: /* nodev-tmo */ + value = (void *)((ulong)lpfc_nodev_tmo); + if(lpfc5_nodev_tmo != -1) + value = (void *)((ulong)lpfc5_nodev_tmo); + break; + case CFG_LINK_SPEED: /* link-speed */ + value = (void *)((ulong)lpfc_link_speed); + if(lpfc5_link_speed != -1) + value = (void *)((ulong)lpfc5_link_speed); + break; + case CFG_DQFULL_THROTTLE_UP_TIME: /* dqfull-throttle-up-time */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_time); + if(lpfc5_dqfull_throttle_up_time != -1) + value = (void *)((ulong)lpfc5_dqfull_throttle_up_time); + break; + case CFG_DQFULL_THROTTLE_UP_INC: /* dqfull-throttle-up-inc */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_inc); + if(lpfc5_dqfull_throttle_up_inc != -1) + value = (void *)((ulong)lpfc5_dqfull_throttle_up_inc); + break; + } + break; + case 6: /* HBA 6 */ + switch(param) { + case CFG_LOG_VERBOSE: /* log-verbose */ + value = (void *)((ulong)lpfc_log_verbose); + if(lpfc6_log_verbose != -1) + value = (void *)((ulong)lpfc6_log_verbose); + break; + case CFG_LOG_ONLY: /* log-only */ + value = (void *)((ulong)lpfc_log_only); + if(lpfc6_log_only != -1) + value = (void *)((ulong)lpfc6_log_only); + break; + case CFG_NUM_IOCBS: /* num-iocbs */ + value = (void *)((ulong)lpfc_num_iocbs); + if(lpfc6_num_iocbs != -1) + value = (void *)((ulong)lpfc6_num_iocbs); + break; + case CFG_NUM_BUFS: /* num-bufs */ + value = (void *)((ulong)lpfc_num_bufs); + if(lpfc6_num_bufs != -1) + value = (void *)((ulong)lpfc6_num_bufs); + break; + case CFG_AUTOMAP: /* automap */ + value = (void *)((ulong)lpfc_automap); + if(lpfc6_automap != -1) + value = (void *)((ulong)lpfc6_automap); + break; + case CFG_CR_DELAY: /* cr_delay */ + value = (void *)((ulong)lpfc_cr_delay); + if(lpfc6_cr_delay != -1) + value = (void *)((ulong)lpfc6_cr_delay); + break; + case CFG_CR_COUNT: /* cr_count */ + value = (void *)((ulong)lpfc_cr_count); + if(lpfc6_cr_count != -1) + value = (void *)((ulong)lpfc6_cr_count); + break; + case CFG_DFT_TGT_Q_DEPTH: /* tgt_queue_depth */ + value = (void *)((ulong)lpfc_tgt_queue_depth); + if(lpfc6_tgt_queue_depth != -1) + value = (void *)((ulong)lpfc6_tgt_queue_depth); + break; + case CFG_DFT_LUN_Q_DEPTH: /* lun_queue_depth */ + value = (void *)((ulong)lpfc_lun_queue_depth); + if(lpfc6_lun_queue_depth != -1) + value = (void *)((ulong)lpfc6_lun_queue_depth); + break; + case CFG_FCPFABRIC_TMO: /* fcpfabric-tmo */ + value = (void *)((ulong)lpfc_fcpfabric_tmo); + if(lpfc6_fcpfabric_tmo != -1) + value = (void *)((ulong)lpfc6_fcpfabric_tmo); + break; + case CFG_FCP_CLASS: /* fcp-class */ + value = (void *)((ulong)lpfc_fcp_class); + if(lpfc6_fcp_class != -1) + value = (void *)((ulong)lpfc6_fcp_class); + break; + case CFG_USE_ADISC: /* use-adisc */ + value = (void *)((ulong)lpfc_use_adisc); + if(lpfc6_use_adisc != -1) + value = (void *)((ulong)lpfc6_use_adisc); + break; + case CFG_NO_DEVICE_DELAY: /* no-device-delay */ + value = (void *)((ulong)lpfc_no_device_delay); + if(lpfc6_no_device_delay != -1) + value = (void *)((ulong)lpfc6_no_device_delay); + break; + case CFG_NETWORK_ON: /* network-on */ + value = (void *)((ulong)lpfc_network_on); + if(lpfc6_network_on != -1) + value = (void *)((ulong)lpfc6_network_on); + break; + case CFG_POST_IP_BUF: /* post-ip-buf */ + value = (void *)((ulong)lpfc_post_ip_buf); + if(lpfc6_post_ip_buf != -1) + value = (void *)((ulong)lpfc6_post_ip_buf); + break; + case CFG_XMT_Q_SIZE: /* xmt-que-size */ + value = (void *)((ulong)lpfc_xmt_que_size); + if(lpfc6_xmt_que_size != -1) + value = (void *)((ulong)lpfc6_xmt_que_size); + break; + case CFG_IP_CLASS: /* ip-class */ + value = (void *)((ulong)lpfc_ip_class); + if(lpfc6_ip_class != -1) + value = (void *)((ulong)lpfc6_ip_class); + break; + case CFG_ACK0: /* ack0 */ + value = (void *)((ulong)lpfc_ack0support); + if(lpfc6_ack0support != -1) + value = (void *)((ulong)lpfc6_ack0support); + break; + case CFG_TOPOLOGY: /* topology */ + value = (void *)((ulong)lpfc_topology); + if(lpfc6_topology != -1) + value = (void *)((ulong)lpfc6_topology); + break; + case CFG_SCAN_DOWN: /* scan-down */ + value = (void *)((ulong)lpfc_scandown); + if(lpfc6_scandown != -1) + value = (void *)((ulong)lpfc6_scandown); + break; + case CFG_LINKDOWN_TMO: /* linkdown-tmo */ + value = (void *)((ulong)lpfc_linkdown_tmo); + if(lpfc6_linkdown_tmo != -1) + value = (void *)((ulong)lpfc6_linkdown_tmo); + break; + case CFG_HOLDIO: /* nodev-holdio */ + value = (void *)((ulong)lpfc_nodev_holdio); + if(lpfc6_nodev_holdio != -1) + value = (void *)((ulong)lpfc6_nodev_holdio); + break; + case CFG_DELAY_RSP_ERR: /* delay-rsp-err */ + value = (void *)((ulong)lpfc_delay_rsp_err); + if(lpfc6_delay_rsp_err != -1) + value = (void *)((ulong)lpfc6_delay_rsp_err); + break; + case CFG_CHK_COND_ERR: /* check-cond-err */ + value = (void *)((ulong)lpfc_check_cond_err); + if(lpfc6_check_cond_err != -1) + value = (void *)((ulong)lpfc6_check_cond_err); + break; + case CFG_NODEV_TMO: /* nodev-tmo */ + value = (void *)((ulong)lpfc_nodev_tmo); + if(lpfc6_nodev_tmo != -1) + value = (void *)((ulong)lpfc6_nodev_tmo); + break; + case CFG_LINK_SPEED: /* link-speed */ + value = (void *)((ulong)lpfc_link_speed); + if(lpfc6_link_speed != -1) + value = (void *)((ulong)lpfc6_link_speed); + break; + case CFG_DQFULL_THROTTLE_UP_TIME: /* dqfull-throttle-up-time */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_time); + if(lpfc6_dqfull_throttle_up_time != -1) + value = (void *)((ulong)lpfc6_dqfull_throttle_up_time); + break; + case CFG_DQFULL_THROTTLE_UP_INC: /* dqfull-throttle-up-inc */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_inc); + if(lpfc6_dqfull_throttle_up_inc != -1) + value = (void *)((ulong)lpfc6_dqfull_throttle_up_inc); + break; + } + break; + case 7: /* HBA 7 */ + switch(param) { + case CFG_LOG_VERBOSE: /* log-verbose */ + value = (void *)((ulong)lpfc_log_verbose); + if(lpfc7_log_verbose != -1) + value = (void *)((ulong)lpfc7_log_verbose); + break; + case CFG_LOG_ONLY: /* log-only */ + value = (void *)((ulong)lpfc_log_only); + if(lpfc7_log_only != -1) + value = (void *)((ulong)lpfc7_log_only); + break; + case CFG_NUM_IOCBS: /* num-iocbs */ + value = (void *)((ulong)lpfc_num_iocbs); + if(lpfc7_num_iocbs != -1) + value = (void *)((ulong)lpfc7_num_iocbs); + break; + case CFG_NUM_BUFS: /* num-bufs */ + value = (void *)((ulong)lpfc_num_bufs); + if(lpfc7_num_bufs != -1) + value = (void *)((ulong)lpfc7_num_bufs); + break; + case CFG_AUTOMAP: /* automap */ + value = (void *)((ulong)lpfc_automap); + if(lpfc7_automap != -1) + value = (void *)((ulong)lpfc7_automap); + break; + case CFG_CR_DELAY: /* cr_delay */ + value = (void *)((ulong)lpfc_cr_delay); + if(lpfc7_cr_delay != -1) + value = (void *)((ulong)lpfc7_cr_delay); + break; + case CFG_CR_COUNT: /* cr_count */ + value = (void *)((ulong)lpfc_cr_count); + if(lpfc7_cr_count != -1) + value = (void *)((ulong)lpfc7_cr_count); + break; + case CFG_DFT_TGT_Q_DEPTH: /* tgt_queue_depth */ + value = (void *)((ulong)lpfc_tgt_queue_depth); + if(lpfc7_tgt_queue_depth != -1) + value = (void *)((ulong)lpfc7_tgt_queue_depth); + break; + case CFG_DFT_LUN_Q_DEPTH: /* lun_queue_depth */ + value = (void *)((ulong)lpfc_lun_queue_depth); + if(lpfc7_lun_queue_depth != -1) + value = (void *)((ulong)lpfc7_lun_queue_depth); + break; + case CFG_FCPFABRIC_TMO: /* fcpfabric-tmo */ + value = (void *)((ulong)lpfc_fcpfabric_tmo); + if(lpfc7_fcpfabric_tmo != -1) + value = (void *)((ulong)lpfc7_fcpfabric_tmo); + break; + case CFG_FCP_CLASS: /* fcp-class */ + value = (void *)((ulong)lpfc_fcp_class); + if(lpfc7_fcp_class != -1) + value = (void *)((ulong)lpfc7_fcp_class); + break; + case CFG_USE_ADISC: /* use-adisc */ + value = (void *)((ulong)lpfc_use_adisc); + if(lpfc7_use_adisc != -1) + value = (void *)((ulong)lpfc7_use_adisc); + break; + case CFG_NO_DEVICE_DELAY: /* no-device-delay */ + value = (void *)((ulong)lpfc_no_device_delay); + if(lpfc7_no_device_delay != -1) + value = (void *)((ulong)lpfc7_no_device_delay); + break; + case CFG_NETWORK_ON: /* network-on */ + value = (void *)((ulong)lpfc_network_on); + if(lpfc7_network_on != -1) + value = (void *)((ulong)lpfc7_network_on); + break; + case CFG_POST_IP_BUF: /* post-ip-buf */ + value = (void *)((ulong)lpfc_post_ip_buf); + if(lpfc7_post_ip_buf != -1) + value = (void *)((ulong)lpfc7_post_ip_buf); + break; + case CFG_XMT_Q_SIZE: /* xmt-que-size */ + value = (void *)((ulong)lpfc_xmt_que_size); + if(lpfc7_xmt_que_size != -1) + value = (void *)((ulong)lpfc7_xmt_que_size); + break; + case CFG_IP_CLASS: /* ip-class */ + value = (void *)((ulong)lpfc_ip_class); + if(lpfc7_ip_class != -1) + value = (void *)((ulong)lpfc7_ip_class); + break; + case CFG_ACK0: /* ack0 */ + value = (void *)((ulong)lpfc_ack0support); + if(lpfc7_ack0support != -1) + value = (void *)((ulong)lpfc7_ack0support); + break; + case CFG_TOPOLOGY: /* topology */ + value = (void *)((ulong)lpfc_topology); + if(lpfc7_topology != -1) + value = (void *)((ulong)lpfc7_topology); + break; + case CFG_SCAN_DOWN: /* scan-down */ + value = (void *)((ulong)lpfc_scandown); + if(lpfc7_scandown != -1) + value = (void *)((ulong)lpfc7_scandown); + break; + case CFG_LINKDOWN_TMO: /* linkdown-tmo */ + value = (void *)((ulong)lpfc_linkdown_tmo); + if(lpfc7_linkdown_tmo != -1) + value = (void *)((ulong)lpfc7_linkdown_tmo); + break; + case CFG_HOLDIO: /* nodev-holdio */ + value = (void *)((ulong)lpfc_nodev_holdio); + if(lpfc7_nodev_holdio != -1) + value = (void *)((ulong)lpfc7_nodev_holdio); + break; + case CFG_DELAY_RSP_ERR: /* delay-rsp-err */ + value = (void *)((ulong)lpfc_delay_rsp_err); + if(lpfc7_delay_rsp_err != -1) + value = (void *)((ulong)lpfc7_delay_rsp_err); + break; + case CFG_CHK_COND_ERR: /* check-cond-err */ + value = (void *)((ulong)lpfc_check_cond_err); + if(lpfc7_check_cond_err != -1) + value = (void *)((ulong)lpfc7_check_cond_err); + break; + case CFG_NODEV_TMO: /* nodev-tmo */ + value = (void *)((ulong)lpfc_nodev_tmo); + if(lpfc7_nodev_tmo != -1) + value = (void *)((ulong)lpfc7_nodev_tmo); + break; + case CFG_LINK_SPEED: /* link-speed */ + value = (void *)((ulong)lpfc_link_speed); + if(lpfc7_link_speed != -1) + value = (void *)((ulong)lpfc7_link_speed); + break; + case CFG_DQFULL_THROTTLE_UP_TIME: /* dqfull-throttle-up-time */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_time); + if(lpfc7_dqfull_throttle_up_time != -1) + value = (void *)((ulong)lpfc7_dqfull_throttle_up_time); + break; + case CFG_DQFULL_THROTTLE_UP_INC: /* dqfull-throttle-up-inc */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_inc); + if(lpfc7_dqfull_throttle_up_inc != -1) + value = (void *)((ulong)lpfc7_dqfull_throttle_up_inc); + break; + } + break; + case 8: /* HBA 8 */ + switch(param) { + case CFG_LOG_VERBOSE: /* log-verbose */ + value = (void *)((ulong)lpfc_log_verbose); + if(lpfc8_log_verbose != -1) + value = (void *)((ulong)lpfc8_log_verbose); + break; + case CFG_LOG_ONLY: /* log-only */ + value = (void *)((ulong)lpfc_log_only); + if(lpfc8_log_only != -1) + value = (void *)((ulong)lpfc8_log_only); + break; + case CFG_NUM_IOCBS: /* num-iocbs */ + value = (void *)((ulong)lpfc_num_iocbs); + if(lpfc8_num_iocbs != -1) + value = (void *)((ulong)lpfc8_num_iocbs); + break; + case CFG_NUM_BUFS: /* num-bufs */ + value = (void *)((ulong)lpfc_num_bufs); + if(lpfc8_num_bufs != -1) + value = (void *)((ulong)lpfc8_num_bufs); + break; + case CFG_AUTOMAP: /* automap */ + value = (void *)((ulong)lpfc_automap); + if(lpfc8_automap != -1) + value = (void *)((ulong)lpfc8_automap); + break; + case CFG_CR_DELAY: /* cr_delay */ + value = (void *)((ulong)lpfc_cr_delay); + if(lpfc8_cr_delay != -1) + value = (void *)((ulong)lpfc8_cr_delay); + break; + case CFG_CR_COUNT: /* cr_count */ + value = (void *)((ulong)lpfc_cr_count); + if(lpfc8_cr_count != -1) + value = (void *)((ulong)lpfc8_cr_count); + break; + case CFG_DFT_TGT_Q_DEPTH: /* tgt_queue_depth */ + value = (void *)((ulong)lpfc_tgt_queue_depth); + if(lpfc8_tgt_queue_depth != -1) + value = (void *)((ulong)lpfc8_tgt_queue_depth); + break; + case CFG_DFT_LUN_Q_DEPTH: /* lun_queue_depth */ + value = (void *)((ulong)lpfc_lun_queue_depth); + if(lpfc8_lun_queue_depth != -1) + value = (void *)((ulong)lpfc8_lun_queue_depth); + break; + case CFG_FCPFABRIC_TMO: /* fcpfabric-tmo */ + value = (void *)((ulong)lpfc_fcpfabric_tmo); + if(lpfc8_fcpfabric_tmo != -1) + value = (void *)((ulong)lpfc8_fcpfabric_tmo); + break; + case CFG_FCP_CLASS: /* fcp-class */ + value = (void *)((ulong)lpfc_fcp_class); + if(lpfc8_fcp_class != -1) + value = (void *)((ulong)lpfc8_fcp_class); + break; + case CFG_USE_ADISC: /* use-adisc */ + value = (void *)((ulong)lpfc_use_adisc); + if(lpfc8_use_adisc != -1) + value = (void *)((ulong)lpfc8_use_adisc); + break; + case CFG_NO_DEVICE_DELAY: /* no-device-delay */ + value = (void *)((ulong)lpfc_no_device_delay); + if(lpfc8_no_device_delay != -1) + value = (void *)((ulong)lpfc8_no_device_delay); + break; + case CFG_NETWORK_ON: /* network-on */ + value = (void *)((ulong)lpfc_network_on); + if(lpfc8_network_on != -1) + value = (void *)((ulong)lpfc8_network_on); + break; + case CFG_POST_IP_BUF: /* post-ip-buf */ + value = (void *)((ulong)lpfc_post_ip_buf); + if(lpfc8_post_ip_buf != -1) + value = (void *)((ulong)lpfc8_post_ip_buf); + break; + case CFG_XMT_Q_SIZE: /* xmt-que-size */ + value = (void *)((ulong)lpfc_xmt_que_size); + if(lpfc8_xmt_que_size != -1) + value = (void *)((ulong)lpfc8_xmt_que_size); + break; + case CFG_IP_CLASS: /* ip-class */ + value = (void *)((ulong)lpfc_ip_class); + if(lpfc8_ip_class != -1) + value = (void *)((ulong)lpfc8_ip_class); + break; + case CFG_ACK0: /* ack0 */ + value = (void *)((ulong)lpfc_ack0support); + if(lpfc8_ack0support != -1) + value = (void *)((ulong)lpfc8_ack0support); + break; + case CFG_TOPOLOGY: /* topology */ + value = (void *)((ulong)lpfc_topology); + if(lpfc8_topology != -1) + value = (void *)((ulong)lpfc8_topology); + break; + case CFG_SCAN_DOWN: /* scan-down */ + value = (void *)((ulong)lpfc_scandown); + if(lpfc8_scandown != -1) + value = (void *)((ulong)lpfc8_scandown); + break; + case CFG_LINKDOWN_TMO: /* linkdown-tmo */ + value = (void *)((ulong)lpfc_linkdown_tmo); + if(lpfc8_linkdown_tmo != -1) + value = (void *)((ulong)lpfc8_linkdown_tmo); + break; + case CFG_HOLDIO: /* nodev-holdio */ + value = (void *)((ulong)lpfc_nodev_holdio); + if(lpfc8_nodev_holdio != -1) + value = (void *)((ulong)lpfc8_nodev_holdio); + break; + case CFG_DELAY_RSP_ERR: /* delay-rsp-err */ + value = (void *)((ulong)lpfc_delay_rsp_err); + if(lpfc8_delay_rsp_err != -1) + value = (void *)((ulong)lpfc8_delay_rsp_err); + break; + case CFG_CHK_COND_ERR: /* check-cond-err */ + value = (void *)((ulong)lpfc_check_cond_err); + if(lpfc8_check_cond_err != -1) + value = (void *)((ulong)lpfc8_check_cond_err); + break; + case CFG_NODEV_TMO: /* nodev-tmo */ + value = (void *)((ulong)lpfc_nodev_tmo); + if(lpfc8_nodev_tmo != -1) + value = (void *)((ulong)lpfc8_nodev_tmo); + break; + case CFG_LINK_SPEED: /* link-speed */ + value = (void *)((ulong)lpfc_link_speed); + if(lpfc8_link_speed != -1) + value = (void *)((ulong)lpfc8_link_speed); + break; + case CFG_DQFULL_THROTTLE_UP_TIME: /* dqfull-throttle-up-time */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_time); + if(lpfc8_dqfull_throttle_up_time != -1) + value = (void *)((ulong)lpfc8_dqfull_throttle_up_time); + break; + case CFG_DQFULL_THROTTLE_UP_INC: /* dqfull-throttle-up-inc */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_inc); + if(lpfc8_dqfull_throttle_up_inc != -1) + value = (void *)((ulong)lpfc8_dqfull_throttle_up_inc); + break; + } + break; + case 9: /* HBA 9 */ + switch(param) { + case CFG_LOG_VERBOSE: /* log-verbose */ + value = (void *)((ulong)lpfc_log_verbose); + if(lpfc9_log_verbose != -1) + value = (void *)((ulong)lpfc9_log_verbose); + break; + case CFG_LOG_ONLY: /* log-only */ + value = (void *)((ulong)lpfc_log_only); + if(lpfc9_log_only != -1) + value = (void *)((ulong)lpfc9_log_only); + break; + case CFG_NUM_IOCBS: /* num-iocbs */ + value = (void *)((ulong)lpfc_num_iocbs); + if(lpfc9_num_iocbs != -1) + value = (void *)((ulong)lpfc9_num_iocbs); + break; + case CFG_NUM_BUFS: /* num-bufs */ + value = (void *)((ulong)lpfc_num_bufs); + if(lpfc9_num_bufs != -1) + value = (void *)((ulong)lpfc9_num_bufs); + break; + case CFG_AUTOMAP: /* automap */ + value = (void *)((ulong)lpfc_automap); + if(lpfc9_automap != -1) + value = (void *)((ulong)lpfc9_automap); + break; + case CFG_CR_DELAY: /* cr_delay */ + value = (void *)((ulong)lpfc_cr_delay); + if(lpfc9_cr_delay != -1) + value = (void *)((ulong)lpfc9_cr_delay); + break; + case CFG_CR_COUNT: /* cr_count */ + value = (void *)((ulong)lpfc_cr_count); + if(lpfc9_cr_count != -1) + value = (void *)((ulong)lpfc9_cr_count); + break; + case CFG_DFT_TGT_Q_DEPTH: /* tgt_queue_depth */ + value = (void *)((ulong)lpfc_tgt_queue_depth); + if(lpfc9_tgt_queue_depth != -1) + value = (void *)((ulong)lpfc9_tgt_queue_depth); + break; + case CFG_DFT_LUN_Q_DEPTH: /* lun_queue_depth */ + value = (void *)((ulong)lpfc_lun_queue_depth); + if(lpfc9_lun_queue_depth != -1) + value = (void *)((ulong)lpfc9_lun_queue_depth); + break; + case CFG_FCPFABRIC_TMO: /* fcpfabric-tmo */ + value = (void *)((ulong)lpfc_fcpfabric_tmo); + if(lpfc9_fcpfabric_tmo != -1) + value = (void *)((ulong)lpfc9_fcpfabric_tmo); + break; + case CFG_FCP_CLASS: /* fcp-class */ + value = (void *)((ulong)lpfc_fcp_class); + if(lpfc9_fcp_class != -1) + value = (void *)((ulong)lpfc9_fcp_class); + break; + case CFG_USE_ADISC: /* use-adisc */ + value = (void *)((ulong)lpfc_use_adisc); + if(lpfc9_use_adisc != -1) + value = (void *)((ulong)lpfc9_use_adisc); + break; + case CFG_NO_DEVICE_DELAY: /* no-device-delay */ + value = (void *)((ulong)lpfc_no_device_delay); + if(lpfc9_no_device_delay != -1) + value = (void *)((ulong)lpfc9_no_device_delay); + break; + case CFG_NETWORK_ON: /* network-on */ + value = (void *)((ulong)lpfc_network_on); + if(lpfc9_network_on != -1) + value = (void *)((ulong)lpfc9_network_on); + break; + case CFG_POST_IP_BUF: /* post-ip-buf */ + value = (void *)((ulong)lpfc_post_ip_buf); + if(lpfc9_post_ip_buf != -1) + value = (void *)((ulong)lpfc9_post_ip_buf); + break; + case CFG_XMT_Q_SIZE: /* xmt-que-size */ + value = (void *)((ulong)lpfc_xmt_que_size); + if(lpfc9_xmt_que_size != -1) + value = (void *)((ulong)lpfc9_xmt_que_size); + break; + case CFG_IP_CLASS: /* ip-class */ + value = (void *)((ulong)lpfc_ip_class); + if(lpfc9_ip_class != -1) + value = (void *)((ulong)lpfc9_ip_class); + break; + case CFG_ACK0: /* ack0 */ + value = (void *)((ulong)lpfc_ack0support); + if(lpfc9_ack0support != -1) + value = (void *)((ulong)lpfc9_ack0support); + break; + case CFG_TOPOLOGY: /* topology */ + value = (void *)((ulong)lpfc_topology); + if(lpfc9_topology != -1) + value = (void *)((ulong)lpfc9_topology); + break; + case CFG_SCAN_DOWN: /* scan-down */ + value = (void *)((ulong)lpfc_scandown); + if(lpfc9_scandown != -1) + value = (void *)((ulong)lpfc9_scandown); + break; + case CFG_LINKDOWN_TMO: /* linkdown-tmo */ + value = (void *)((ulong)lpfc_linkdown_tmo); + if(lpfc9_linkdown_tmo != -1) + value = (void *)((ulong)lpfc9_linkdown_tmo); + break; + case CFG_HOLDIO: /* nodev-holdio */ + value = (void *)((ulong)lpfc_nodev_holdio); + if(lpfc9_nodev_holdio != -1) + value = (void *)((ulong)lpfc9_nodev_holdio); + break; + case CFG_DELAY_RSP_ERR: /* delay-rsp-err */ + value = (void *)((ulong)lpfc_delay_rsp_err); + if(lpfc9_delay_rsp_err != -1) + value = (void *)((ulong)lpfc9_delay_rsp_err); + break; + case CFG_CHK_COND_ERR: /* check-cond-err */ + value = (void *)((ulong)lpfc_check_cond_err); + if(lpfc9_check_cond_err != -1) + value = (void *)((ulong)lpfc9_check_cond_err); + break; + case CFG_NODEV_TMO: /* nodev-tmo */ + value = (void *)((ulong)lpfc_nodev_tmo); + if(lpfc9_nodev_tmo != -1) + value = (void *)((ulong)lpfc9_nodev_tmo); + break; + case CFG_LINK_SPEED: /* link-speed */ + value = (void *)((ulong)lpfc_link_speed); + if(lpfc9_link_speed != -1) + value = (void *)((ulong)lpfc9_link_speed); + break; + case CFG_DQFULL_THROTTLE_UP_TIME: /* dqfull-throttle-up-time */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_time); + if(lpfc9_dqfull_throttle_up_time != -1) + value = (void *)((ulong)lpfc9_dqfull_throttle_up_time); + break; + case CFG_DQFULL_THROTTLE_UP_INC: /* dqfull-throttle-up-inc */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_inc); + if(lpfc9_dqfull_throttle_up_inc != -1) + value = (void *)((ulong)lpfc9_dqfull_throttle_up_inc); + break; + } + break; + case 10: /* HBA 10 */ + switch(param) { + case CFG_LOG_VERBOSE: /* log-verbose */ + value = (void *)((ulong)lpfc_log_verbose); + if(lpfc10_log_verbose != -1) + value = (void *)((ulong)lpfc10_log_verbose); + break; + case CFG_LOG_ONLY: /* log-only */ + value = (void *)((ulong)lpfc_log_only); + if(lpfc10_log_only != -1) + value = (void *)((ulong)lpfc10_log_only); + break; + case CFG_NUM_IOCBS: /* num-iocbs */ + value = (void *)((ulong)lpfc_num_iocbs); + if(lpfc10_num_iocbs != -1) + value = (void *)((ulong)lpfc10_num_iocbs); + break; + case CFG_NUM_BUFS: /* num-bufs */ + value = (void *)((ulong)lpfc_num_bufs); + if(lpfc10_num_bufs != -1) + value = (void *)((ulong)lpfc10_num_bufs); + break; + case CFG_AUTOMAP: /* automap */ + value = (void *)((ulong)lpfc_automap); + if(lpfc10_automap != -1) + value = (void *)((ulong)lpfc10_automap); + break; + case CFG_CR_DELAY: /* cr_delay */ + value = (void *)((ulong)lpfc_cr_delay); + if(lpfc10_cr_delay != -1) + value = (void *)((ulong)lpfc10_cr_delay); + break; + case CFG_CR_COUNT: /* cr_count */ + value = (void *)((ulong)lpfc_cr_count); + if(lpfc10_cr_count != -1) + value = (void *)((ulong)lpfc10_cr_count); + break; + case CFG_DFT_TGT_Q_DEPTH: /* tgt_queue_depth */ + value = (void *)((ulong)lpfc_tgt_queue_depth); + if(lpfc10_tgt_queue_depth != -1) + value = (void *)((ulong)lpfc10_tgt_queue_depth); + break; + case CFG_DFT_LUN_Q_DEPTH: /* lun_queue_depth */ + value = (void *)((ulong)lpfc_lun_queue_depth); + if(lpfc10_lun_queue_depth != -1) + value = (void *)((ulong)lpfc10_lun_queue_depth); + break; + case CFG_FCPFABRIC_TMO: /* fcpfabric-tmo */ + value = (void *)((ulong)lpfc_fcpfabric_tmo); + if(lpfc10_fcpfabric_tmo != -1) + value = (void *)((ulong)lpfc10_fcpfabric_tmo); + break; + case CFG_FCP_CLASS: /* fcp-class */ + value = (void *)((ulong)lpfc_fcp_class); + if(lpfc10_fcp_class != -1) + value = (void *)((ulong)lpfc10_fcp_class); + break; + case CFG_USE_ADISC: /* use-adisc */ + value = (void *)((ulong)lpfc_use_adisc); + if(lpfc10_use_adisc != -1) + value = (void *)((ulong)lpfc10_use_adisc); + break; + case CFG_NO_DEVICE_DELAY: /* no-device-delay */ + value = (void *)((ulong)lpfc_no_device_delay); + if(lpfc10_no_device_delay != -1) + value = (void *)((ulong)lpfc10_no_device_delay); + break; + case CFG_NETWORK_ON: /* network-on */ + value = (void *)((ulong)lpfc_network_on); + if(lpfc10_network_on != -1) + value = (void *)((ulong)lpfc10_network_on); + break; + case CFG_POST_IP_BUF: /* post-ip-buf */ + value = (void *)((ulong)lpfc_post_ip_buf); + if(lpfc10_post_ip_buf != -1) + value = (void *)((ulong)lpfc10_post_ip_buf); + break; + case CFG_XMT_Q_SIZE: /* xmt-que-size */ + value = (void *)((ulong)lpfc_xmt_que_size); + if(lpfc10_xmt_que_size != -1) + value = (void *)((ulong)lpfc10_xmt_que_size); + break; + case CFG_IP_CLASS: /* ip-class */ + value = (void *)((ulong)lpfc_ip_class); + if(lpfc10_ip_class != -1) + value = (void *)((ulong)lpfc10_ip_class); + break; + case CFG_ACK0: /* ack0 */ + value = (void *)((ulong)lpfc_ack0support); + if(lpfc10_ack0support != -1) + value = (void *)((ulong)lpfc10_ack0support); + break; + case CFG_TOPOLOGY: /* topology */ + value = (void *)((ulong)lpfc_topology); + if(lpfc10_topology != -1) + value = (void *)((ulong)lpfc10_topology); + break; + case CFG_SCAN_DOWN: /* scan-down */ + value = (void *)((ulong)lpfc_scandown); + if(lpfc10_scandown != -1) + value = (void *)((ulong)lpfc10_scandown); + break; + case CFG_LINKDOWN_TMO: /* linkdown-tmo */ + value = (void *)((ulong)lpfc_linkdown_tmo); + if(lpfc10_linkdown_tmo != -1) + value = (void *)((ulong)lpfc10_linkdown_tmo); + break; + case CFG_HOLDIO: /* nodev-holdio */ + value = (void *)((ulong)lpfc_nodev_holdio); + if(lpfc10_nodev_holdio != -1) + value = (void *)((ulong)lpfc10_nodev_holdio); + break; + case CFG_DELAY_RSP_ERR: /* delay-rsp-err */ + value = (void *)((ulong)lpfc_delay_rsp_err); + if(lpfc10_delay_rsp_err != -1) + value = (void *)((ulong)lpfc10_delay_rsp_err); + break; + case CFG_CHK_COND_ERR: /* check-cond-err */ + value = (void *)((ulong)lpfc_check_cond_err); + if(lpfc10_check_cond_err != -1) + value = (void *)((ulong)lpfc10_check_cond_err); + break; + case CFG_NODEV_TMO: /* nodev-tmo */ + value = (void *)((ulong)lpfc_nodev_tmo); + if(lpfc10_nodev_tmo != -1) + value = (void *)((ulong)lpfc10_nodev_tmo); + break; + case CFG_LINK_SPEED: /* link-speed */ + value = (void *)((ulong)lpfc_link_speed); + if(lpfc10_link_speed != -1) + value = (void *)((ulong)lpfc10_link_speed); + break; + case CFG_DQFULL_THROTTLE_UP_TIME: /* dqfull-throttle-up-time */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_time); + if(lpfc10_dqfull_throttle_up_time != -1) + value = (void *)((ulong)lpfc10_dqfull_throttle_up_time); + break; + case CFG_DQFULL_THROTTLE_UP_INC: /* dqfull-throttle-up-inc */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_inc); + if(lpfc10_dqfull_throttle_up_inc != -1) + value = (void *)((ulong)lpfc10_dqfull_throttle_up_inc); + break; + } + break; + case 11: /* HBA 11 */ + switch(param) { + case CFG_LOG_VERBOSE: /* log-verbose */ + value = (void *)((ulong)lpfc_log_verbose); + if(lpfc11_log_verbose != -1) + value = (void *)((ulong)lpfc11_log_verbose); + break; + case CFG_LOG_ONLY: /* log-only */ + value = (void *)((ulong)lpfc_log_only); + if(lpfc11_log_only != -1) + value = (void *)((ulong)lpfc11_log_only); + break; + case CFG_NUM_IOCBS: /* num-iocbs */ + value = (void *)((ulong)lpfc_num_iocbs); + if(lpfc11_num_iocbs != -1) + value = (void *)((ulong)lpfc11_num_iocbs); + break; + case CFG_NUM_BUFS: /* num-bufs */ + value = (void *)((ulong)lpfc_num_bufs); + if(lpfc11_num_bufs != -1) + value = (void *)((ulong)lpfc11_num_bufs); + break; + case CFG_AUTOMAP: /* automap */ + value = (void *)((ulong)lpfc_automap); + if(lpfc11_automap != -1) + value = (void *)((ulong)lpfc11_automap); + break; + case CFG_CR_DELAY: /* cr_delay */ + value = (void *)((ulong)lpfc_cr_delay); + if(lpfc11_cr_delay != -1) + value = (void *)((ulong)lpfc11_cr_delay); + break; + case CFG_CR_COUNT: /* cr_count */ + value = (void *)((ulong)lpfc_cr_count); + if(lpfc11_cr_count != -1) + value = (void *)((ulong)lpfc11_cr_count); + break; + case CFG_DFT_TGT_Q_DEPTH: /* tgt_queue_depth */ + value = (void *)((ulong)lpfc_tgt_queue_depth); + if(lpfc11_tgt_queue_depth != -1) + value = (void *)((ulong)lpfc11_tgt_queue_depth); + break; + case CFG_DFT_LUN_Q_DEPTH: /* lun_queue_depth */ + value = (void *)((ulong)lpfc_lun_queue_depth); + if(lpfc11_lun_queue_depth != -1) + value = (void *)((ulong)lpfc11_lun_queue_depth); + break; + case CFG_FCPFABRIC_TMO: /* fcpfabric-tmo */ + value = (void *)((ulong)lpfc_fcpfabric_tmo); + if(lpfc11_fcpfabric_tmo != -1) + value = (void *)((ulong)lpfc11_fcpfabric_tmo); + break; + case CFG_FCP_CLASS: /* fcp-class */ + value = (void *)((ulong)lpfc_fcp_class); + if(lpfc11_fcp_class != -1) + value = (void *)((ulong)lpfc11_fcp_class); + break; + case CFG_USE_ADISC: /* use-adisc */ + value = (void *)((ulong)lpfc_use_adisc); + if(lpfc11_use_adisc != -1) + value = (void *)((ulong)lpfc11_use_adisc); + break; + case CFG_NO_DEVICE_DELAY: /* no-device-delay */ + value = (void *)((ulong)lpfc_no_device_delay); + if(lpfc11_no_device_delay != -1) + value = (void *)((ulong)lpfc11_no_device_delay); + break; + case CFG_NETWORK_ON: /* network-on */ + value = (void *)((ulong)lpfc_network_on); + if(lpfc11_network_on != -1) + value = (void *)((ulong)lpfc11_network_on); + break; + case CFG_POST_IP_BUF: /* post-ip-buf */ + value = (void *)((ulong)lpfc_post_ip_buf); + if(lpfc11_post_ip_buf != -1) + value = (void *)((ulong)lpfc11_post_ip_buf); + break; + case CFG_XMT_Q_SIZE: /* xmt-que-size */ + value = (void *)((ulong)lpfc_xmt_que_size); + if(lpfc11_xmt_que_size != -1) + value = (void *)((ulong)lpfc11_xmt_que_size); + break; + case CFG_IP_CLASS: /* ip-class */ + value = (void *)((ulong)lpfc_ip_class); + if(lpfc11_ip_class != -1) + value = (void *)((ulong)lpfc11_ip_class); + break; + case CFG_ACK0: /* ack0 */ + value = (void *)((ulong)lpfc_ack0support); + if(lpfc11_ack0support != -1) + value = (void *)((ulong)lpfc11_ack0support); + break; + case CFG_TOPOLOGY: /* topology */ + value = (void *)((ulong)lpfc_topology); + if(lpfc11_topology != -1) + value = (void *)((ulong)lpfc11_topology); + break; + case CFG_SCAN_DOWN: /* scan-down */ + value = (void *)((ulong)lpfc_scandown); + if(lpfc11_scandown != -1) + value = (void *)((ulong)lpfc11_scandown); + break; + case CFG_LINKDOWN_TMO: /* linkdown-tmo */ + value = (void *)((ulong)lpfc_linkdown_tmo); + if(lpfc11_linkdown_tmo != -1) + value = (void *)((ulong)lpfc11_linkdown_tmo); + break; + case CFG_HOLDIO: /* nodev-holdio */ + value = (void *)((ulong)lpfc_nodev_holdio); + if(lpfc11_nodev_holdio != -1) + value = (void *)((ulong)lpfc11_nodev_holdio); + break; + case CFG_DELAY_RSP_ERR: /* delay-rsp-err */ + value = (void *)((ulong)lpfc_delay_rsp_err); + if(lpfc11_delay_rsp_err != -1) + value = (void *)((ulong)lpfc11_delay_rsp_err); + break; + case CFG_CHK_COND_ERR: /* check-cond-err */ + value = (void *)((ulong)lpfc_check_cond_err); + if(lpfc11_check_cond_err != -1) + value = (void *)((ulong)lpfc11_check_cond_err); + break; + case CFG_NODEV_TMO: /* nodev-tmo */ + value = (void *)((ulong)lpfc_nodev_tmo); + if(lpfc11_nodev_tmo != -1) + value = (void *)((ulong)lpfc11_nodev_tmo); + break; + case CFG_LINK_SPEED: /* link-speed */ + value = (void *)((ulong)lpfc_link_speed); + if(lpfc11_link_speed != -1) + value = (void *)((ulong)lpfc11_link_speed); + break; + case CFG_DQFULL_THROTTLE_UP_TIME: /* dqfull-throttle-up-time */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_time); + if(lpfc11_dqfull_throttle_up_time != -1) + value = (void *)((ulong)lpfc11_dqfull_throttle_up_time); + break; + case CFG_DQFULL_THROTTLE_UP_INC: /* dqfull-throttle-up-inc */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_inc); + if(lpfc11_dqfull_throttle_up_inc != -1) + value = (void *)((ulong)lpfc11_dqfull_throttle_up_inc); + break; + } + break; + case 12: /* HBA 12 */ + switch(param) { + case CFG_LOG_VERBOSE: /* log-verbose */ + value = (void *)((ulong)lpfc_log_verbose); + if(lpfc12_log_verbose != -1) + value = (void *)((ulong)lpfc12_log_verbose); + break; + case CFG_LOG_ONLY: /* log-only */ + value = (void *)((ulong)lpfc_log_only); + if(lpfc12_log_only != -1) + value = (void *)((ulong)lpfc12_log_only); + break; + case CFG_NUM_IOCBS: /* num-iocbs */ + value = (void *)((ulong)lpfc_num_iocbs); + if(lpfc12_num_iocbs != -1) + value = (void *)((ulong)lpfc12_num_iocbs); + break; + case CFG_NUM_BUFS: /* num-bufs */ + value = (void *)((ulong)lpfc_num_bufs); + if(lpfc12_num_bufs != -1) + value = (void *)((ulong)lpfc12_num_bufs); + break; + case CFG_AUTOMAP: /* automap */ + value = (void *)((ulong)lpfc_automap); + if(lpfc12_automap != -1) + value = (void *)((ulong)lpfc12_automap); + break; + case CFG_CR_DELAY: /* cr_delay */ + value = (void *)((ulong)lpfc_cr_delay); + if(lpfc12_cr_delay != -1) + value = (void *)((ulong)lpfc12_cr_delay); + break; + case CFG_CR_COUNT: /* cr_count */ + value = (void *)((ulong)lpfc_cr_count); + if(lpfc12_cr_count != -1) + value = (void *)((ulong)lpfc12_cr_count); + break; + case CFG_DFT_TGT_Q_DEPTH: /* tgt_queue_depth */ + value = (void *)((ulong)lpfc_tgt_queue_depth); + if(lpfc12_tgt_queue_depth != -1) + value = (void *)((ulong)lpfc12_tgt_queue_depth); + break; + case CFG_DFT_LUN_Q_DEPTH: /* lun_queue_depth */ + value = (void *)((ulong)lpfc_lun_queue_depth); + if(lpfc12_lun_queue_depth != -1) + value = (void *)((ulong)lpfc12_lun_queue_depth); + break; + case CFG_FCPFABRIC_TMO: /* fcpfabric-tmo */ + value = (void *)((ulong)lpfc_fcpfabric_tmo); + if(lpfc12_fcpfabric_tmo != -1) + value = (void *)((ulong)lpfc12_fcpfabric_tmo); + break; + case CFG_FCP_CLASS: /* fcp-class */ + value = (void *)((ulong)lpfc_fcp_class); + if(lpfc12_fcp_class != -1) + value = (void *)((ulong)lpfc12_fcp_class); + break; + case CFG_USE_ADISC: /* use-adisc */ + value = (void *)((ulong)lpfc_use_adisc); + if(lpfc12_use_adisc != -1) + value = (void *)((ulong)lpfc12_use_adisc); + break; + case CFG_NO_DEVICE_DELAY: /* no-device-delay */ + value = (void *)((ulong)lpfc_no_device_delay); + if(lpfc12_no_device_delay != -1) + value = (void *)((ulong)lpfc12_no_device_delay); + break; + case CFG_NETWORK_ON: /* network-on */ + value = (void *)((ulong)lpfc_network_on); + if(lpfc12_network_on != -1) + value = (void *)((ulong)lpfc12_network_on); + break; + case CFG_POST_IP_BUF: /* post-ip-buf */ + value = (void *)((ulong)lpfc_post_ip_buf); + if(lpfc12_post_ip_buf != -1) + value = (void *)((ulong)lpfc12_post_ip_buf); + break; + case CFG_XMT_Q_SIZE: /* xmt-que-size */ + value = (void *)((ulong)lpfc_xmt_que_size); + if(lpfc12_xmt_que_size != -1) + value = (void *)((ulong)lpfc12_xmt_que_size); + break; + case CFG_IP_CLASS: /* ip-class */ + value = (void *)((ulong)lpfc_ip_class); + if(lpfc12_ip_class != -1) + value = (void *)((ulong)lpfc12_ip_class); + break; + case CFG_ACK0: /* ack0 */ + value = (void *)((ulong)lpfc_ack0support); + if(lpfc12_ack0support != -1) + value = (void *)((ulong)lpfc12_ack0support); + break; + case CFG_TOPOLOGY: /* topology */ + value = (void *)((ulong)lpfc_topology); + if(lpfc12_topology != -1) + value = (void *)((ulong)lpfc12_topology); + break; + case CFG_SCAN_DOWN: /* scan-down */ + value = (void *)((ulong)lpfc_scandown); + if(lpfc12_scandown != -1) + value = (void *)((ulong)lpfc12_scandown); + break; + case CFG_LINKDOWN_TMO: /* linkdown-tmo */ + value = (void *)((ulong)lpfc_linkdown_tmo); + if(lpfc12_linkdown_tmo != -1) + value = (void *)((ulong)lpfc12_linkdown_tmo); + break; + case CFG_HOLDIO: /* nodev-holdio */ + value = (void *)((ulong)lpfc_nodev_holdio); + if(lpfc12_nodev_holdio != -1) + value = (void *)((ulong)lpfc12_nodev_holdio); + break; + case CFG_DELAY_RSP_ERR: /* delay-rsp-err */ + value = (void *)((ulong)lpfc_delay_rsp_err); + if(lpfc12_delay_rsp_err != -1) + value = (void *)((ulong)lpfc12_delay_rsp_err); + break; + case CFG_CHK_COND_ERR: /* check-cond-err */ + value = (void *)((ulong)lpfc_check_cond_err); + if(lpfc12_check_cond_err != -1) + value = (void *)((ulong)lpfc12_check_cond_err); + break; + case CFG_NODEV_TMO: /* nodev-tmo */ + value = (void *)((ulong)lpfc_nodev_tmo); + if(lpfc12_nodev_tmo != -1) + value = (void *)((ulong)lpfc12_nodev_tmo); + break; + case CFG_LINK_SPEED: /* link-speed */ + value = (void *)((ulong)lpfc_link_speed); + if(lpfc12_link_speed != -1) + value = (void *)((ulong)lpfc12_link_speed); + break; + case CFG_DQFULL_THROTTLE_UP_TIME: /* dqfull-throttle-up-time */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_time); + if(lpfc12_dqfull_throttle_up_time != -1) + value = (void *)((ulong)lpfc12_dqfull_throttle_up_time); + break; + case CFG_DQFULL_THROTTLE_UP_INC: /* dqfull-throttle-up-inc */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_inc); + if(lpfc12_dqfull_throttle_up_inc != -1) + value = (void *)((ulong)lpfc12_dqfull_throttle_up_inc); + break; + } + break; + case 13: /* HBA 13 */ + switch(param) { + case CFG_LOG_VERBOSE: /* log-verbose */ + value = (void *)((ulong)lpfc_log_verbose); + if(lpfc13_log_verbose != -1) + value = (void *)((ulong)lpfc13_log_verbose); + break; + case CFG_LOG_ONLY: /* log-only */ + value = (void *)((ulong)lpfc_log_only); + if(lpfc13_log_only != -1) + value = (void *)((ulong)lpfc13_log_only); + break; + case CFG_NUM_IOCBS: /* num-iocbs */ + value = (void *)((ulong)lpfc_num_iocbs); + if(lpfc13_num_iocbs != -1) + value = (void *)((ulong)lpfc13_num_iocbs); + break; + case CFG_NUM_BUFS: /* num-bufs */ + value = (void *)((ulong)lpfc_num_bufs); + if(lpfc13_num_bufs != -1) + value = (void *)((ulong)lpfc13_num_bufs); + break; + case CFG_AUTOMAP: /* automap */ + value = (void *)((ulong)lpfc_automap); + if(lpfc13_automap != -1) + value = (void *)((ulong)lpfc13_automap); + break; + case CFG_CR_DELAY: /* cr_delay */ + value = (void *)((ulong)lpfc_cr_delay); + if(lpfc13_cr_delay != -1) + value = (void *)((ulong)lpfc13_cr_delay); + break; + case CFG_CR_COUNT: /* cr_count */ + value = (void *)((ulong)lpfc_cr_count); + if(lpfc13_cr_count != -1) + value = (void *)((ulong)lpfc13_cr_count); + break; + case CFG_DFT_TGT_Q_DEPTH: /* tgt_queue_depth */ + value = (void *)((ulong)lpfc_tgt_queue_depth); + if(lpfc13_tgt_queue_depth != -1) + value = (void *)((ulong)lpfc13_tgt_queue_depth); + break; + case CFG_DFT_LUN_Q_DEPTH: /* lun_queue_depth */ + value = (void *)((ulong)lpfc_lun_queue_depth); + if(lpfc13_lun_queue_depth != -1) + value = (void *)((ulong)lpfc13_lun_queue_depth); + break; + case CFG_FCPFABRIC_TMO: /* fcpfabric-tmo */ + value = (void *)((ulong)lpfc_fcpfabric_tmo); + if(lpfc13_fcpfabric_tmo != -1) + value = (void *)((ulong)lpfc13_fcpfabric_tmo); + break; + case CFG_FCP_CLASS: /* fcp-class */ + value = (void *)((ulong)lpfc_fcp_class); + if(lpfc13_fcp_class != -1) + value = (void *)((ulong)lpfc13_fcp_class); + break; + case CFG_USE_ADISC: /* use-adisc */ + value = (void *)((ulong)lpfc_use_adisc); + if(lpfc13_use_adisc != -1) + value = (void *)((ulong)lpfc13_use_adisc); + break; + case CFG_NO_DEVICE_DELAY: /* no-device-delay */ + value = (void *)((ulong)lpfc_no_device_delay); + if(lpfc13_no_device_delay != -1) + value = (void *)((ulong)lpfc13_no_device_delay); + break; + case CFG_NETWORK_ON: /* network-on */ + value = (void *)((ulong)lpfc_network_on); + if(lpfc13_network_on != -1) + value = (void *)((ulong)lpfc13_network_on); + break; + case CFG_POST_IP_BUF: /* post-ip-buf */ + value = (void *)((ulong)lpfc_post_ip_buf); + if(lpfc13_post_ip_buf != -1) + value = (void *)((ulong)lpfc13_post_ip_buf); + break; + case CFG_XMT_Q_SIZE: /* xmt-que-size */ + value = (void *)((ulong)lpfc_xmt_que_size); + if(lpfc13_xmt_que_size != -1) + value = (void *)((ulong)lpfc13_xmt_que_size); + break; + case CFG_IP_CLASS: /* ip-class */ + value = (void *)((ulong)lpfc_ip_class); + if(lpfc13_ip_class != -1) + value = (void *)((ulong)lpfc13_ip_class); + break; + case CFG_ACK0: /* ack0 */ + value = (void *)((ulong)lpfc_ack0support); + if(lpfc13_ack0support != -1) + value = (void *)((ulong)lpfc13_ack0support); + break; + case CFG_TOPOLOGY: /* topology */ + value = (void *)((ulong)lpfc_topology); + if(lpfc13_topology != -1) + value = (void *)((ulong)lpfc13_topology); + break; + case CFG_SCAN_DOWN: /* scan-down */ + value = (void *)((ulong)lpfc_scandown); + if(lpfc13_scandown != -1) + value = (void *)((ulong)lpfc13_scandown); + break; + case CFG_LINKDOWN_TMO: /* linkdown-tmo */ + value = (void *)((ulong)lpfc_linkdown_tmo); + if(lpfc13_linkdown_tmo != -1) + value = (void *)((ulong)lpfc13_linkdown_tmo); + break; + case CFG_HOLDIO: /* nodev-holdio */ + value = (void *)((ulong)lpfc_nodev_holdio); + if(lpfc13_nodev_holdio != -1) + value = (void *)((ulong)lpfc13_nodev_holdio); + break; + case CFG_DELAY_RSP_ERR: /* delay-rsp-err */ + value = (void *)((ulong)lpfc_delay_rsp_err); + if(lpfc13_delay_rsp_err != -1) + value = (void *)((ulong)lpfc13_delay_rsp_err); + break; + case CFG_CHK_COND_ERR: /* check-cond-err */ + value = (void *)((ulong)lpfc_check_cond_err); + if(lpfc13_check_cond_err != -1) + value = (void *)((ulong)lpfc13_check_cond_err); + break; + case CFG_NODEV_TMO: /* nodev-tmo */ + value = (void *)((ulong)lpfc_nodev_tmo); + if(lpfc13_nodev_tmo != -1) + value = (void *)((ulong)lpfc13_nodev_tmo); + break; + case CFG_LINK_SPEED: /* link-speed */ + value = (void *)((ulong)lpfc_link_speed); + if(lpfc13_link_speed != -1) + value = (void *)((ulong)lpfc13_link_speed); + break; + case CFG_DQFULL_THROTTLE_UP_TIME: /* dqfull-throttle-up-time */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_time); + if(lpfc13_dqfull_throttle_up_time != -1) + value = (void *)((ulong)lpfc13_dqfull_throttle_up_time); + break; + case CFG_DQFULL_THROTTLE_UP_INC: /* dqfull-throttle-up-inc */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_inc); + if(lpfc13_dqfull_throttle_up_inc != -1) + value = (void *)((ulong)lpfc13_dqfull_throttle_up_inc); + break; + } + break; + case 14: /* HBA 14 */ + switch(param) { + case CFG_LOG_VERBOSE: /* log-verbose */ + value = (void *)((ulong)lpfc_log_verbose); + if(lpfc14_log_verbose != -1) + value = (void *)((ulong)lpfc14_log_verbose); + break; + case CFG_LOG_ONLY: /* log-only */ + value = (void *)((ulong)lpfc_log_only); + if(lpfc14_log_only != -1) + value = (void *)((ulong)lpfc14_log_only); + break; + case CFG_NUM_IOCBS: /* num-iocbs */ + value = (void *)((ulong)lpfc_num_iocbs); + if(lpfc14_num_iocbs != -1) + value = (void *)((ulong)lpfc14_num_iocbs); + break; + case CFG_NUM_BUFS: /* num-bufs */ + value = (void *)((ulong)lpfc_num_bufs); + if(lpfc14_num_bufs != -1) + value = (void *)((ulong)lpfc14_num_bufs); + break; + case CFG_AUTOMAP: /* automap */ + value = (void *)((ulong)lpfc_automap); + if(lpfc14_automap != -1) + value = (void *)((ulong)lpfc14_automap); + break; + case CFG_CR_DELAY: /* cr_delay */ + value = (void *)((ulong)lpfc_cr_delay); + if(lpfc14_cr_delay != -1) + value = (void *)((ulong)lpfc14_cr_delay); + break; + case CFG_CR_COUNT: /* cr_count */ + value = (void *)((ulong)lpfc_cr_count); + if(lpfc14_cr_count != -1) + value = (void *)((ulong)lpfc14_cr_count); + break; + case CFG_DFT_TGT_Q_DEPTH: /* tgt_queue_depth */ + value = (void *)((ulong)lpfc_tgt_queue_depth); + if(lpfc14_tgt_queue_depth != -1) + value = (void *)((ulong)lpfc14_tgt_queue_depth); + break; + case CFG_DFT_LUN_Q_DEPTH: /* lun_queue_depth */ + value = (void *)((ulong)lpfc_lun_queue_depth); + if(lpfc14_lun_queue_depth != -1) + value = (void *)((ulong)lpfc14_lun_queue_depth); + break; + case CFG_FCPFABRIC_TMO: /* fcpfabric-tmo */ + value = (void *)((ulong)lpfc_fcpfabric_tmo); + if(lpfc14_fcpfabric_tmo != -1) + value = (void *)((ulong)lpfc14_fcpfabric_tmo); + break; + case CFG_FCP_CLASS: /* fcp-class */ + value = (void *)((ulong)lpfc_fcp_class); + if(lpfc14_fcp_class != -1) + value = (void *)((ulong)lpfc14_fcp_class); + break; + case CFG_USE_ADISC: /* use-adisc */ + value = (void *)((ulong)lpfc_use_adisc); + if(lpfc14_use_adisc != -1) + value = (void *)((ulong)lpfc14_use_adisc); + break; + case CFG_NO_DEVICE_DELAY: /* no-device-delay */ + value = (void *)((ulong)lpfc_no_device_delay); + if(lpfc14_no_device_delay != -1) + value = (void *)((ulong)lpfc14_no_device_delay); + break; + case CFG_NETWORK_ON: /* network-on */ + value = (void *)((ulong)lpfc_network_on); + if(lpfc14_network_on != -1) + value = (void *)((ulong)lpfc14_network_on); + break; + case CFG_POST_IP_BUF: /* post-ip-buf */ + value = (void *)((ulong)lpfc_post_ip_buf); + if(lpfc14_post_ip_buf != -1) + value = (void *)((ulong)lpfc14_post_ip_buf); + break; + case CFG_XMT_Q_SIZE: /* xmt-que-size */ + value = (void *)((ulong)lpfc_xmt_que_size); + if(lpfc14_xmt_que_size != -1) + value = (void *)((ulong)lpfc14_xmt_que_size); + break; + case CFG_IP_CLASS: /* ip-class */ + value = (void *)((ulong)lpfc_ip_class); + if(lpfc14_ip_class != -1) + value = (void *)((ulong)lpfc14_ip_class); + break; + case CFG_ACK0: /* ack0 */ + value = (void *)((ulong)lpfc_ack0support); + if(lpfc14_ack0support != -1) + value = (void *)((ulong)lpfc14_ack0support); + break; + case CFG_TOPOLOGY: /* topology */ + value = (void *)((ulong)lpfc_topology); + if(lpfc14_topology != -1) + value = (void *)((ulong)lpfc14_topology); + break; + case CFG_SCAN_DOWN: /* scan-down */ + value = (void *)((ulong)lpfc_scandown); + if(lpfc14_scandown != -1) + value = (void *)((ulong)lpfc14_scandown); + break; + case CFG_LINKDOWN_TMO: /* linkdown-tmo */ + value = (void *)((ulong)lpfc_linkdown_tmo); + if(lpfc14_linkdown_tmo != -1) + value = (void *)((ulong)lpfc14_linkdown_tmo); + break; + case CFG_HOLDIO: /* nodev-holdio */ + value = (void *)((ulong)lpfc_nodev_holdio); + if(lpfc14_nodev_holdio != -1) + value = (void *)((ulong)lpfc14_nodev_holdio); + break; + case CFG_DELAY_RSP_ERR: /* delay-rsp-err */ + value = (void *)((ulong)lpfc_delay_rsp_err); + if(lpfc14_delay_rsp_err != -1) + value = (void *)((ulong)lpfc14_delay_rsp_err); + break; + case CFG_CHK_COND_ERR: /* check-cond-err */ + value = (void *)((ulong)lpfc_check_cond_err); + if(lpfc14_check_cond_err != -1) + value = (void *)((ulong)lpfc14_check_cond_err); + break; + case CFG_NODEV_TMO: /* nodev-tmo */ + value = (void *)((ulong)lpfc_nodev_tmo); + if(lpfc14_nodev_tmo != -1) + value = (void *)((ulong)lpfc14_nodev_tmo); + break; + case CFG_LINK_SPEED: /* link-speed */ + value = (void *)((ulong)lpfc_link_speed); + if(lpfc14_link_speed != -1) + value = (void *)((ulong)lpfc14_link_speed); + break; + case CFG_DQFULL_THROTTLE_UP_TIME: /* dqfull-throttle-up-time */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_time); + if(lpfc14_dqfull_throttle_up_time != -1) + value = (void *)((ulong)lpfc14_dqfull_throttle_up_time); + break; + case CFG_DQFULL_THROTTLE_UP_INC: /* dqfull-throttle-up-inc */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_inc); + if(lpfc14_dqfull_throttle_up_inc != -1) + value = (void *)((ulong)lpfc14_dqfull_throttle_up_inc); + break; + } + break; + case 15: /* HBA 15 */ + switch(param) { + case CFG_LOG_VERBOSE: /* log-verbose */ + value = (void *)((ulong)lpfc_log_verbose); + if(lpfc15_log_verbose != -1) + value = (void *)((ulong)lpfc15_log_verbose); + break; + case CFG_LOG_ONLY: /* log-only */ + value = (void *)((ulong)lpfc_log_only); + if(lpfc15_log_only != -1) + value = (void *)((ulong)lpfc15_log_only); + break; + case CFG_NUM_IOCBS: /* num-iocbs */ + value = (void *)((ulong)lpfc_num_iocbs); + if(lpfc15_num_iocbs != -1) + value = (void *)((ulong)lpfc15_num_iocbs); + break; + case CFG_NUM_BUFS: /* num-bufs */ + value = (void *)((ulong)lpfc_num_bufs); + if(lpfc15_num_bufs != -1) + value = (void *)((ulong)lpfc15_num_bufs); + break; + case CFG_AUTOMAP: /* automap */ + value = (void *)((ulong)lpfc_automap); + if(lpfc15_automap != -1) + value = (void *)((ulong)lpfc15_automap); + break; + case CFG_CR_DELAY: /* cr_delay */ + value = (void *)((ulong)lpfc_cr_delay); + if(lpfc15_cr_delay != -1) + value = (void *)((ulong)lpfc15_cr_delay); + break; + case CFG_CR_COUNT: /* cr_count */ + value = (void *)((ulong)lpfc_cr_count); + if(lpfc15_cr_count != -1) + value = (void *)((ulong)lpfc15_cr_count); + break; + case CFG_DFT_TGT_Q_DEPTH: /* tgt_queue_depth */ + value = (void *)((ulong)lpfc_tgt_queue_depth); + if(lpfc15_tgt_queue_depth != -1) + value = (void *)((ulong)lpfc15_tgt_queue_depth); + break; + case CFG_DFT_LUN_Q_DEPTH: /* lun_queue_depth */ + value = (void *)((ulong)lpfc_lun_queue_depth); + if(lpfc15_lun_queue_depth != -1) + value = (void *)((ulong)lpfc15_lun_queue_depth); + break; + case CFG_FCPFABRIC_TMO: /* fcpfabric-tmo */ + value = (void *)((ulong)lpfc_fcpfabric_tmo); + if(lpfc15_fcpfabric_tmo != -1) + value = (void *)((ulong)lpfc15_fcpfabric_tmo); + break; + case CFG_FCP_CLASS: /* fcp-class */ + value = (void *)((ulong)lpfc_fcp_class); + if(lpfc15_fcp_class != -1) + value = (void *)((ulong)lpfc15_fcp_class); + break; + case CFG_USE_ADISC: /* use-adisc */ + value = (void *)((ulong)lpfc_use_adisc); + if(lpfc15_use_adisc != -1) + value = (void *)((ulong)lpfc15_use_adisc); + break; + case CFG_NO_DEVICE_DELAY: /* no-device-delay */ + value = (void *)((ulong)lpfc_no_device_delay); + if(lpfc15_no_device_delay != -1) + value = (void *)((ulong)lpfc15_no_device_delay); + break; + case CFG_NETWORK_ON: /* network-on */ + value = (void *)((ulong)lpfc_network_on); + if(lpfc15_network_on != -1) + value = (void *)((ulong)lpfc15_network_on); + break; + case CFG_POST_IP_BUF: /* post-ip-buf */ + value = (void *)((ulong)lpfc_post_ip_buf); + if(lpfc15_post_ip_buf != -1) + value = (void *)((ulong)lpfc15_post_ip_buf); + break; + case CFG_XMT_Q_SIZE: /* xmt-que-size */ + value = (void *)((ulong)lpfc_xmt_que_size); + if(lpfc15_xmt_que_size != -1) + value = (void *)((ulong)lpfc15_xmt_que_size); + break; + case CFG_IP_CLASS: /* ip-class */ + value = (void *)((ulong)lpfc_ip_class); + if(lpfc15_ip_class != -1) + value = (void *)((ulong)lpfc15_ip_class); + break; + case CFG_ACK0: /* ack0 */ + value = (void *)((ulong)lpfc_ack0support); + if(lpfc15_ack0support != -1) + value = (void *)((ulong)lpfc15_ack0support); + break; + case CFG_TOPOLOGY: /* topology */ + value = (void *)((ulong)lpfc_topology); + if(lpfc15_topology != -1) + value = (void *)((ulong)lpfc15_topology); + break; + case CFG_SCAN_DOWN: /* scan-down */ + value = (void *)((ulong)lpfc_scandown); + if(lpfc15_scandown != -1) + value = (void *)((ulong)lpfc15_scandown); + break; + case CFG_LINKDOWN_TMO: /* linkdown-tmo */ + value = (void *)((ulong)lpfc_linkdown_tmo); + if(lpfc15_linkdown_tmo != -1) + value = (void *)((ulong)lpfc15_linkdown_tmo); + break; + case CFG_HOLDIO: /* nodev-holdio */ + value = (void *)((ulong)lpfc_nodev_holdio); + if(lpfc15_nodev_holdio != -1) + value = (void *)((ulong)lpfc15_nodev_holdio); + break; + case CFG_DELAY_RSP_ERR: /* delay-rsp-err */ + value = (void *)((ulong)lpfc_delay_rsp_err); + if(lpfc15_delay_rsp_err != -1) + value = (void *)((ulong)lpfc15_delay_rsp_err); + break; + case CFG_CHK_COND_ERR: /* check-cond-err */ + value = (void *)((ulong)lpfc_check_cond_err); + if(lpfc15_check_cond_err != -1) + value = (void *)((ulong)lpfc15_check_cond_err); + break; + case CFG_NODEV_TMO: /* nodev-tmo */ + value = (void *)((ulong)lpfc_nodev_tmo); + if(lpfc15_nodev_tmo != -1) + value = (void *)((ulong)lpfc15_nodev_tmo); + break; + case CFG_LINK_SPEED: /* link-speed */ + value = (void *)((ulong)lpfc_link_speed); + if(lpfc15_link_speed != -1) + value = (void *)((ulong)lpfc15_link_speed); + break; + case CFG_DQFULL_THROTTLE_UP_TIME: /* dqfull-throttle-up-time */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_time); + if(lpfc15_dqfull_throttle_up_time != -1) + value = (void *)((ulong)lpfc15_dqfull_throttle_up_time); + break; + case CFG_DQFULL_THROTTLE_UP_INC: /* dqfull-throttle-up-inc */ + value = (void *)((ulong)lpfc_dqfull_throttle_up_inc); + if(lpfc15_dqfull_throttle_up_inc != -1) + value = (void *)((ulong)lpfc15_dqfull_throttle_up_inc); + break; + } + break; + default: + break; + } + return(value); +} + + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/lpfc/lpfc.spec 999-mjb/drivers/scsi/lpfc/lpfc.spec --- 000-virgin/drivers/scsi/lpfc/lpfc.spec 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/lpfc/lpfc.spec 2003-11-25 14:18:44.000000000 -0800 @@ -0,0 +1,127 @@ +#******************************************************************* +# * This file is part of the Emulex Linux Device Driver for * +# * Enterprise Fibre Channel Host Bus Adapters. * +# * Refer to the README file included with this package for * +# * driver version and adapter support. * +# * Copyright (C) 2003 Emulex Corporation. * +# * www.emulex.com * +# * * +# * This program is free software; you can redistribute it and/or * +# * modify it under the terms of the GNU General Public License * +# * as published by the Free Software Foundation; either version 2 * +# * of the License, or (at your option) any later version. * +# * * +# * This program is distributed in the hope that it will be useful, * +# * but WITHOUT ANY WARRANTY; without even the implied warranty of * +# * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +# * GNU General Public License for more details, a copy of which * +# * can be found in the file COPYING included with this package. * +# ******************************************************************* +%define rel 1 +%define ver LPFC_DRIVER_VERSION +%define tarName lpfcdriver.tar + +Summary: Emulex Driver Kit for Linux +Name: lpfcdriver +Version: %ver +Release: %rel +Copyright: Emulex Corp. +Group: System Environment/Kernel +Source: %tarName +URL: http://www.emulex.com +Vendor: Emulex Corp. +Packager: Regis.Goupil +BuildRoot: /tmp/lpfc-%{ver} +Requires: kernel >= 2.2.0 +Requires: rpm >= 3.0.4 + +%description +Emulex Open Source Fibre Channel driver for Linux version %ver + +%prep + +%build +rm -rf %{buildroot} +mkdir -p %{buildroot}/lpfc-%{ver} +cd lpfc-%{ver} +find . -print | cpio -pdumv %{buildroot}/ + +%install +cd %{buildroot}/lpfc-%{ver} +tar -xf /usr/src/redhat/SOURCES/lpfc-%{ver}/lpfcdriver.tar +if [ -e /usr/src/linux-2.4/drivers/scsi ]; then dirval="linux-2.4"; \ +else if [ -e /usr/src/linux/drivers/scsi ]; then dirval="linux"; \ +else echo "Cannot find the kernel sources directory"; exit 1; fi fi +if [ -e /usr/src/$dirval/drivers/scsi/lpfc/ ]; then \ +rm -fr /usr/src/$dirval/drivers/scsi/lpfc; +fi +mkdir -p /usr/src/$dirval/drivers/scsi/lpfc; +cp * /usr/src/$dirval/drivers/scsi/lpfc; + +# post install (on client machine) section +%post +if [ -e /usr/src/linux-2.4/drivers/scsi ]; then dirval="linux-2.4"; \ +else if [ -e /usr/src/linux/drivers/scsi ]; then dirval="linux"; \ +else echo "Cannot find the kernel sources directory"; exit 1; fi fi +rm -fr lpfc-%{ver}/lpfc; +rm -fr /usr/src/$dirval/drivers/scsi/lpfc; +mkdir /usr/src/$dirval/drivers/scsi/lpfc; +cp lpfc-%{ver}/* /usr/src/$dirval/drivers/scsi/lpfc; + +echo " " +echo "The Emulex Open Source Driver has been installed on your system." +echo "Source files have been installed under a temporary directory /lpfc-%{ver}" +echo "and under /usr/src/$dirval/drivers/scsi/lpfc." +echo "Please refer to the Emulex documentation for the next step." +echo " " + +%preun +if [ -e /usr/src/linux-2.4/drivers/scsi/lpfc ]; then dirval="linux-2.4"; \ +else if [ -e /usr/src/linux/drivers/scsi/lpfc ]; then dirval="linux"; fi fi +echo " " +echo "The lpfcdriver rpm is about to be removed from your system." +echo "All the source files under /usr/src/$dirval/drivers/scsi/lpfc" +echo "and /lpfc-%{ver} will be removed." +echo " " + +%postun +if [ -e /usr/src/linux-2.4/drivers/scsi/lpfc ]; then dirval="linux-2.4"; \ +else if [ -e /usr/src/linux/drivers/scsi/lpfc ]; then dirval="linux"; fi fi +rm -fr /usr/src/$dirval/drivers/scsi/lpfc; +echo " " +echo "The Emulex Open Source Driver has been removed from your system." +echo "Remove the appropriate entry in modules.conf if this file was modified." +echo " " +rm -fr lpfc-%{ver}; + +%files +/lpfc-%{ver}/COPYING +/lpfc-%{ver}/dfcdd.c +/lpfc-%{ver}/dfc.h +/lpfc-%{ver}/fcclockb.c +/lpfc-%{ver}/fc_crtn.h +/lpfc-%{ver}/fcdds.h +/lpfc-%{ver}/fcdiag.h +/lpfc-%{ver}/fcelsb.c +/lpfc-%{ver}/fc_ertn.h +/lpfc-%{ver}/fcfgparm.h +/lpfc-%{ver}/fc.h +/lpfc-%{ver}/fc_hw.h +/lpfc-%{ver}/fcLINUXfcp.c +/lpfc-%{ver}/fcLINUXlan.c +/lpfc-%{ver}/fcmboxb.c +/lpfc-%{ver}/fcmemb.c +/lpfc-%{ver}/fcmsgcom.c +/lpfc-%{ver}/fcmsg.h +/lpfc-%{ver}/fc_os.h +/lpfc-%{ver}/fcrpib.c +/lpfc-%{ver}/fcscsib.c +/lpfc-%{ver}/fcstratb.c +/lpfc-%{ver}/fcxmitb.c +/lpfc-%{ver}/hbaapi.h +/lpfc-%{ver}/lp6000.c +/lpfc-%{ver}/lpfc.conf.c +/lpfc-%{ver}/lpfc.conf.defs +/lpfc-%{ver}/Makefile +/lpfc-%{ver}/README +/lpfc-%{ver}/lpfc.spec diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/Kconfig 999-mjb/drivers/scsi/qla2xxx/Kconfig --- 000-virgin/drivers/scsi/qla2xxx/Kconfig 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/Kconfig 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,26 @@ +config SCSI_QLA2XXX + bool "QLogic QLA2XXX FC-SCSI support (v8)" + depends on PCI && SCSI + ---help--- + These drivers support the QLogic 2xxx host adapter family of SCSI + FCP HBAs. + +config SCSI_QLA2XXX_QLA21XX + tristate "QLogic QLA21xx FC-SCSI support (v8)" + depends on SCSI_QLA2XXX + ---help--- + This driver supports the QLogic 21xx (ISP2100) host adapter family. + +config SCSI_QLA2XXX_QLA22XX + tristate "QLogic QLA22xx FC-SCSI support (v8)" + depends on SCSI_QLA2XXX + ---help--- + This driver supports the QLogic 22xx (ISP2200) host adapter family. + +config SCSI_QLA2XXX_QLA23XX + tristate "QLogic QLA23xx FC-SCSI support (v8)" + depends on SCSI_QLA2XXX + ---help--- + This driver supports the QLogic 23xx (ISP2300, ISP2312, and ISP2322) + host adapter family. + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/Makefile 999-mjb/drivers/scsi/qla2xxx/Makefile --- 000-virgin/drivers/scsi/qla2xxx/Makefile 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/Makefile 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,66 @@ +# Kernel makefile for 8.x series QLogic Fibre Channel driver. +# +EXTRA_CFLAGS += -g -Idrivers/scsi -I$(obj) -DUNIQUE_FW_NAME + +ISPTYPES := qla2100 qla2200 qla2300 +ISPDIRS := $(foreach dir, $(ISPTYPES), $(addsuffix /, $(addprefix .,$(dir)))) + +COMMON_SRCS := qla_os.c qla_init.c qla_mbx.c qla_iocb.c qla_isr.c qla_gs.c \ + qla_xioct.c qla_inioct.c qla_fo.c qla_cfg.c qla_cfgln.c qla_vendor.c \ + qla_dbg.c qla_sup.c +ISP2100_SRCS := $(COMMON_SRCS) ql2100_fw.c +ISP2200_SRCS := $(COMMON_SRCS) ql2200_fw.c +ISP2300_SRCS := $(COMMON_SRCS) qla_rscn.c ql2300_fw.c #ql2322_fw.c +ISP2100_OBJS := $(foreach file, $(ISP2100_SRCS), $(patsubst %.c, %.o, $(file))) +ISP2200_OBJS := $(foreach file, $(ISP2200_SRCS), $(patsubst %.c, %.o, $(file))) +ISP2300_OBJS := $(foreach file, $(ISP2300_SRCS), $(patsubst %.c, %.o, $(file))) + +ISP2100_DIR_SRCS := $(foreach file, $(ISP2100_SRCS), $(addprefix .qla2100/,$(file))) +ISP2200_DIR_SRCS := $(foreach file, $(ISP2200_SRCS), $(addprefix .qla2200/,$(file))) +ISP2300_DIR_SRCS := $(foreach file, $(ISP2300_SRCS), $(addprefix .qla2300/,$(file))) +ISP2100_DIR_OBJS := $(foreach file, $(ISP2100_OBJS), $(addprefix .qla2100/,$(file))) +ISP2200_DIR_OBJS := $(foreach file, $(ISP2200_OBJS), $(addprefix .qla2200/,$(file))) +ISP2300_DIR_OBJS := $(foreach file, $(ISP2300_OBJS), $(addprefix .qla2300/,$(file))) + +PREPALL := $(shell for dir in $(ISPDIRS) ; \ + do \ + if [ ! -d $(obj)/$${dir} ] ; then \ + mkdir $(obj)/$${dir} ; \ + fi ; \ + done ; \ + for link in $(ISP2100_SRCS) ; \ + do \ + if [ ! -h $(obj)/.qla2100/$${link} ] ; then \ + ln -sf ../$${link} $(obj)/.qla2100/$${link} ; \ + fi ; \ + done ; \ + for link in $(ISP2200_SRCS) ; \ + do \ + if [ ! -h $(obj)/.qla2200/$${link} ] ; then \ + ln -sf ../$${link} $(obj)/.qla2200/$${link} ; \ + fi ; \ + done ; \ + for link in $(ISP2300_SRCS) ; \ + do \ + if [ ! -h $(obj)/.qla2300/$${link} ] ; then \ + ln -sf ../$${link} $(obj)/.qla2300/$${link} ; \ + fi ; \ + done) + +obj-$(CONFIG_SCSI_QLA2XXX_QLA21XX) += qla2100.o +obj-$(CONFIG_SCSI_QLA2XXX_QLA22XX) += qla2200.o +obj-$(CONFIG_SCSI_QLA2XXX_QLA23XX) += qla2300.o + +$(obj)/qla2100.o: $(PREPALL) +$(obj)/qla2200.o: $(PREPALL) +$(obj)/qla2300.o: $(PREPALL) + +$(src)/.qla2100/%: EXTRA_CFLAGS += -Dqla21xx +$(src)/.qla2200/%: EXTRA_CFLAGS += -Dqla22xx +$(src)/.qla2300/%: EXTRA_CFLAGS += -Dqla23xx + +qla2100-objs := $(ISP2100_DIR_OBJS) +qla2200-objs := $(ISP2200_DIR_OBJS) +qla2300-objs := $(ISP2300_DIR_OBJS) + +clean-files := $(ISP2100_DIR_SRCS) $(ISP2200_DIR_SRCS) $(ISP2300_DIR_SRCS) diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/exioct.h 999-mjb/drivers/scsi/qla2xxx/exioct.h --- 000-virgin/drivers/scsi/qla2xxx/exioct.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/exioct.h 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,995 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + +/* + * File Name: exioct.h + * + * San/Device Management Ioctl Header + * File is created to adhere to Solaris requirement using 8-space tabs. + * + * !!!!! PLEASE DO NOT REMOVE THE TABS !!!!! + * !!!!! PLEASE NO SINGLE LINE COMMENTS: // !!!!! + * !!!!! PLEASE NO MORE THAN 80 CHARS PER LINE !!!!! + * + * Revision History: + * + * Rev. 0 March 1, 2000 + * YPL - Created. + * + * Rev. 1 March 2, 2000 + * RLU - Updated with latest definitions. Added more comments. + * + * Rev. 2 May 16, 2000 + * SP - Updated definitions and changed structures (March 27, 2000) + * SP - Addded structures + * + * Rev. 3 June 1, 2000 + * THL - Made major changes to include all changes talked in our meeting. + * + * Rev. 4 June 5, 2000 + * RLU - Added new definitions/structures for SDM_GET_AEN and SDM_REG_AEN + * functions. + * - Major definition/structure name changes as discussed in meetings. + * - Deleted duplicated command code and structure definitions. + * + * Rev. 4.1 June 14, 2000 + * WTR - Moved Solaris specific defines to exioctso.h. This makes it + * possible for application developers to include only exioct.h + * in their Solaris application development. + * + * Rev. 4.2 June 15, 2000 + * THL - Changed UINT16 and UINT32 back to WORD and DWORD for NT; otherwise, + * NT will get a compilation error for redefining UINT16 and UINT32. + * Added RISC_CODE/FLASH_RAM macros. + * + * Rev. 4.3 June 22, 2000 + * THL - Changed SDM_FC_ADDR according to External Ioctls document. + * Added SDM_DEF_TYPE macros. + * + * Rev. 4.4 June 22, 2000 + * THL - Moved NT specific defines to exioctnt.h. + * + * Rev. 4.5 August 15, 2000 + * SP - Rolled back some changes made by Todd R. + * Kept new status code SDM_STATUS_NO_MEMORY + * Port types fabric and tape device + * + * Rev. 4.7 Sep 6, 2000 + * YPL - Replace SDM_ with EXT_, _ISP with _CHIP. + * Add vendor specific statuses, device update, config defines. + * + * Rev. 5.0 Sep 13, 2000 + * YPL - Update version to 5, remove max defines, make port type bit. + * Change HBA_PORT_PROPERTY to have bus/target/lun defined as UINT16 + * + * Rev. 5.1 Sep 22, 2000 + * THL - Add destination address for specify scsi address or FC address. + * Remove "not support" comment and add more macros. + * + * Rev. 5.2 Sep 27, 2000 + * THL - Add new macros and structure for add and swap target device. + * Create new data structure for get port database. + * TLE - Merge changes needed for FailOver + * + * Rev. 5.3 Sep 29, 2000 + * THL - Add access mode for NVRAM. + * + * Rev. 5.4 Oct 03, 2000 + * THL - Add EXT_SC_GET_FC_STATISTICS. + * + * Rev. 5.5 Oct 18, 2000 + * THL - Remove duplicated EXT_DEF_ADDR_MODE_32 and EXT_DEF_ADDR_MODE_16. + * Reformat new data structures and defines. + * + * Rev. 5.6 Oct 19, 2000 + * RLU - Changed file name from ExIoct.h to exioct.h. + * - Added definition of EXT_RNID_DATA for API implementation. + * - Reformat some lines to conform to the format agreed + * upon in IOCTL meeting (and mentioned at beginning of + * this file). + * + * Rev. 5.7 Oct 25, 2000 + * BN - Added LUN bitmask structure and macros + * + * Rev. 5.8 Oct 25, 2000 + * BN - Added EXT_CC_DRIVER_PROP define + * + * Rev. 5.9 Oct 26, 2000 + * BN - Sync with UnixApi project + * + * Rev. 5.10 Oct 30, 2000 + * BN - Remove not needed #define for EXT_CC_DRIVER_PROP + * - Add EXT_ to IS_LUN_BIT_SET, SET_LUN_BIT, CLR_LUN_BIT + * + * Rev. 5.11 Nov 1, 2000 + * BN - Increased [1] of EXT_DEVICEDATA to [EXT_MAX_TARGET] + * TLE - Decreased [EXT_MAX_TARGET] of EXT_DEVICEDATA to [1] + * + * Rev. 5.12 Nov 7, 2000 + * RLU - Deleted EXT_DEF_MAX_LUNS define and changed all references + * to it to use EXT_MAX_LUN. + * - Changed the revision numbers for the last 2 revisions down + * to use 5.x. + * + * Rev. 5.13 Nov 14, 2000 + * WTR - Fixed pointer referencing problem in the LUN_BIT_MASK macros. + * Updated comment at bit mask definition. + * + * Rev. 5.14 Dec 6, 2000 + * THL - Added Local and LoopID to discovered port/target property. + * + * Rev. 5.15 Dec 24, 2000 + * YPL - Enhance port connection modes and driver attrib + * + * Rev. 5.16 Dec 27, 2000 + * TLE - Add BufferHandle member to _EXT_ASYNC_EVENT data structure for + * SCTP support + * + * Rev. 5.17 Jan 10, 2001 + * YPL - Add edtov, ratov & fabric name in port property + * + * Rev. 5.18 Feb 28, 2001 + * YPL - Remove SCTP fields and add fabric parameter flags in port property + * + * Rev. 5.19 Mar 08, 2001 + * YPL - Remove SCTP fields from hba port prop + * + * Rev. 5.20 June 11, 2001 + * YPL - Change to reserved fields and add fabric name field in port property + * + * Rev. 5.21 June 29, 2001 + * YPL - Merge in changes decided long time ago (use _DEF_ for defines) & + * reserved some EXT_CC for legacy ioctls, plus add RNID dataformat + * values definition + * + * Rev. 5.21 Sep 18, 2001 + * SP - Added New return status codes + * + * Rev. 5.22 Oct 23, 2001 + * SP - Change reserve fields to add fields to EXT_HBA_PORT + * Added port speeds and FC4Types fields and related definitions + * + * Rev. 5.23 Dec 04, 2001 + * RL - Added port speed value definition. + * + * Rev. 5.24 Jan 20, 2002 + * JJ - Added PCI device function bits field in EXT_CHIP structure. + * + * Rev. 5.25 Feb 04, 2002 + * JJ - Added 16 bytes CDB support. Also added SenseLength field + * in SCSI_PASSTHRU structure. + * + * Rev. 5.26 Feb 12, 2002 + * AV - Changed type size used in SCSI_PASSTHRU structure definitions + * to re-enable gcc's automatic structure padding for backward + * compatibility. + * + * Rev. 5.27 Mar 01, 2002 + * RL - Added new SC value for SCSI3 command passthru. + * + * Rev. 5.28 Dec 09, 2002 + * Sync up with NT version of exioct.h: + * TLE - Modify EXT_RNID_REQ data structure for IBM SendRNID workaround + * YPL - Add firmware state (online diagnostics) + * YPL - Add ELS PS + * YPL - Add els event, # of els buffers & size + * + * Rev. 5.29 April 21, 2003 + * RA - Defined the structure EXT_BEACON_CONTROL and subcommand code: + * EXT_SC_GET_BEACON_STATE,EXT_SC_SET_BEACON_STATE for the + * led blinking feature. + * + * Rev. 5.30 July 21, 2003 + * RL - Added new statistics fields in HBA_PORT_STAT struct. + */ + +#ifndef _EXIOCT_H +#define _EXIOCT_H + +/* + * NOTE: the following version defines must be updated each time the + * changes made may affect the backward compatibility of the + * input/output relations of the SDM IOCTL functions. + */ +#define EXT_VERSION 5 + + +/* + * OS independent General definitions + */ +#define EXT_DEF_SIGNATURE_SIZE 8 +#define EXT_DEF_WWN_NAME_SIZE 8 +#define EXT_DEF_WWP_NAME_SIZE 8 +#define EXT_DEF_SERIAL_NUM_SIZE 4 +#define EXT_DEF_PORTID_SIZE 4 +#define EXT_DEF_PORTID_SIZE_ACTUAL 3 +#define EXT_DEF_MAX_STR_SIZE 128 +#define EXT_DEF_SCSI_PASSTHRU_CDB_LENGTH 16 + +#define EXT_DEF_ADDR_MODE_32 1 +#define EXT_DEF_ADDR_MODE_64 2 + +/* + * *********************************************************************** + * X OS type definitions + * *********************************************************************** + */ +#ifdef _MSC_VER /* NT */ + +#pragma pack(1) +#include "ExIoctNT.h" + +#elif defined(linux) /* Linux */ + +#include "exioctln.h" + +#elif defined(sun) || defined(__sun) /* Solaris */ + +#include "exioctso.h" + +#endif + +/* + * *********************************************************************** + * OS dependent General configuration defines + * *********************************************************************** + */ +#define EXT_DEF_MAX_HBA EXT_DEF_MAX_HBA_OS +#define EXT_DEF_MAX_BUS EXT_DEF_MAX_BUS_OS +#define EXT_DEF_MAX_TARGET EXT_DEF_MAX_TARGET_OS +#define EXT_DEF_MAX_LUN EXT_DEF_MAX_LUN_OS + +/* + * *********************************************************************** + * Common header struct definitions for San/Device Mgmt + * *********************************************************************** + */ +typedef struct { + UINT64 Signature; /* 8 chars string */ + UINT16 AddrMode; /* 2 */ + UINT16 Version; /* 2 */ + UINT16 SubCode; /* 2 */ + UINT16 Instance; /* 2 */ + UINT32 Status; /* 4 */ + UINT32 DetailStatus; /* 4 */ + UINT32 Reserved1; /* 4 */ + UINT32 RequestLen; /* 4 */ + UINT32 ResponseLen; /* 4 */ + UINT64 RequestAdr; /* 8 */ + UINT64 ResponseAdr; /* 8 */ + UINT16 HbaSelect; /* 2 */ + UINT16 VendorSpecificStatus[11]; /* 22 */ + UINT64 VendorSpecificData; /* 8 chars string */ +} EXT_IOCTL, *PEXT_IOCTL; /* 84 / 0x54 */ + +/* + * Addressing mode used by the user application + */ +#define EXT_ADDR_MODE EXT_ADDR_MODE_OS + +/* + * Status. These macros are being used for setting Status field in + * EXT_IOCTL structure. + */ +#define EXT_STATUS_OK 0 +#define EXT_STATUS_ERR 1 +#define EXT_STATUS_BUSY 2 +#define EXT_STATUS_PENDING 3 +#define EXT_STATUS_SUSPENDED 4 +#define EXT_STATUS_RETRY_PENDING 5 +#define EXT_STATUS_INVALID_PARAM 6 +#define EXT_STATUS_DATA_OVERRUN 7 +#define EXT_STATUS_DATA_UNDERRUN 8 +#define EXT_STATUS_DEV_NOT_FOUND 9 +#define EXT_STATUS_COPY_ERR 10 +#define EXT_STATUS_MAILBOX 11 +#define EXT_STATUS_UNSUPPORTED_SUBCODE 12 +#define EXT_STATUS_UNSUPPORTED_VERSION 13 +#define EXT_STATUS_MS_NO_RESPONSE 14 +#define EXT_STATUS_SCSI_STATUS 15 +#define EXT_STATUS_BUFFER_TOO_SMALL 16 +#define EXT_STATUS_NO_MEMORY 17 +#define EXT_STATUS_UNKNOWN 18 +#define EXT_STATUS_UNKNOWN_DSTATUS 19 +#define EXT_STATUS_INVALID_REQUEST 20 + +#define EXT_STATUS_DEVICE_NOT_READY 21 +#define EXT_STATUS_DEVICE_OFFLINE 22 +#define EXT_STATUS_HBA_NOT_READY 23 +#define EXT_STATUS_HBA_QUEUE_FULL 24 + +/* + * Detail Status contains the SCSI bus status codes. + */ + +#define EXT_DSTATUS_GOOD 0x00 +#define EXT_DSTATUS_CHECK_CONDITION 0x02 +#define EXT_DSTATUS_CONDITION_MET 0x04 +#define EXT_DSTATUS_BUSY 0x08 +#define EXT_DSTATUS_INTERMEDIATE 0x10 +#define EXT_DSTATUS_INTERMEDIATE_COND_MET 0x14 +#define EXT_DSTATUS_RESERVATION_CONFLICT 0x18 +#define EXT_DSTATUS_COMMAND_TERMINATED 0x22 +#define EXT_DSTATUS_QUEUE_FULL 0x28 + +/* + * Detail Status contains the needed Response buffer space(bytes) + * when Status = EXT_STATUS_BUFFER_TOO_SMALL + */ + + +/* + * Detail Status contains one of the following codes + * when Status = EXT_STATUS_INVALID_PARAM or + * = EXT_STATUS_DEV_NOT_FOUND + */ +#define EXT_DSTATUS_NOADNL_INFO 0x00 +#define EXT_DSTATUS_HBA_INST 0x01 +#define EXT_DSTATUS_TARGET 0x02 +#define EXT_DSTATUS_LUN 0x03 +#define EXT_DSTATUS_REQUEST_LEN 0x04 +#define EXT_DSTATUS_PATH_INDEX 0x05 + +/* + * Currently supported DeviceControl / ioctl command codes + */ +#define EXT_CC_QUERY EXT_CC_QUERY_OS +#define EXT_CC_SEND_FCCT_PASSTHRU EXT_CC_SEND_FCCT_PASSTHRU_OS +#define EXT_CC_REG_AEN EXT_CC_REG_AEN_OS +#define EXT_CC_GET_AEN EXT_CC_GET_AEN_OS +#define EXT_CC_SEND_ELS_RNID EXT_CC_SEND_ELS_RNID_OS +#define EXT_CC_SEND_SCSI_PASSTHRU EXT_CC_SCSI_PASSTHRU_OS +#define EXT_CC_SEND_ELS_PASSTHRU EXT_CC_SEND_ELS_PASSTHRU_OS + +/* + * HBA port operations + */ +#define EXT_CC_GET_DATA EXT_CC_GET_DATA_OS +#define EXT_CC_SET_DATA EXT_CC_SET_DATA_OS + + +/* Reserved command codes. */ +#define EXT_CC_RESERVED0A EXT_CC_RESERVED0A_OS +#define EXT_CC_RESERVED0B EXT_CC_RESERVED0B_OS +#define EXT_CC_RESERVED0C EXT_CC_RESERVED0C_OS +#define EXT_CC_RESERVED0D EXT_CC_RESERVED0D_OS +#define EXT_CC_RESERVED0E EXT_CC_RESERVED0E_OS +#define EXT_CC_RESERVED0F EXT_CC_RESERVED0F_OS +#define EXT_CC_RESERVED0G EXT_CC_RESERVED0G_OS +#define EXT_CC_RESERVED0H EXT_CC_RESERVED0H_OS +#define EXT_CC_RESERVED0I EXT_CC_RESERVED0I_OS +#define EXT_CC_RESERVED0J EXT_CC_RESERVED0J_OS +#define EXT_CC_RESERVED0Z EXT_CC_RESERVED0Z_OS + + +/* + * *********************************************************************** + * EXT_IOCTL SubCode definition. + * These macros are being used for setting SubCode field in EXT_IOCTL + * structure. + * *********************************************************************** + */ + +/* + * Query. + * Uses with EXT_QUERY as the ioctl code. + */ +#define EXT_SC_QUERY_HBA_NODE 1 +#define EXT_SC_QUERY_HBA_PORT 2 +#define EXT_SC_QUERY_DISC_PORT 3 +#define EXT_SC_QUERY_DISC_TGT 4 +#define EXT_SC_QUERY_DISC_LUN 5 /* Currently Not Supported */ +#define EXT_SC_QUERY_DRIVER 6 +#define EXT_SC_QUERY_FW 7 +#define EXT_SC_QUERY_CHIP 8 + +/* + * Sub codes for Get Data. + * Use in combination with EXT_GET_DATA as the ioctl code + */ +/* 1 - 99 Common */ +#define EXT_SC_GET_SCSI_ADDR 1 /* Currently Not Supported */ +#define EXT_SC_GET_ERR_DETECTIONS 2 /* Currently Not Supported */ +#define EXT_SC_GET_STATISTICS 3 +#define EXT_SC_GET_BUS_MODE 4 /* Currently Not Supported */ +#define EXT_SC_GET_DR_DUMP_BUF 5 /* Currently Not Supported */ +#define EXT_SC_GET_RISC_CODE 6 /* Currently Not Supported */ +#define EXT_SC_GET_FLASH_RAM 7 /* for backward compatible */ +#define EXT_SC_GET_BEACON_STATE 8 + +/* 100 - 199 FC_INTF_TYPE */ +#define EXT_SC_GET_LINK_STATUS 101 /* Currently Not Supported */ +#define EXT_SC_GET_LOOP_ID 102 /* Currently Not Supported */ +#define EXT_SC_GET_LUN_BITMASK 103 +#define EXT_SC_GET_PORT_DATABASE 104 /* Currently Not Supported */ +#define EXT_SC_GET_PORT_DATABASE_MEM 105 /* Currently Not Supported */ +#define EXT_SC_GET_PORT_SUMMARY 106 +#define EXT_SC_GET_POSITION_MAP 107 +#define EXT_SC_GET_RETRY_CNT 108 /* Currently Not Supported */ +#define EXT_SC_GET_RNID 109 +#define EXT_SC_GET_RTIN 110 /* Currently Not Supported */ +#define EXT_SC_GET_FC_LUN_BITMASK 111 +#define EXT_SC_GET_FC_STATISTICS 112 /* for backward compatible */ + +/* 200 - 299 SCSI_INTF_TYPE */ +#define EXT_SC_GET_SEL_TIMEOUT 201 /* Currently Not Supported */ + + +/* + * Sub codes for Set Data. + * Use in combination with EXT_SET_DATA as the ioctl code + */ +/* 1 - 99 Common */ +#define EXT_SC_RST_STATISTICS 3 +#define EXT_SC_RESERVED_BC7 7 +#define EXT_SC_SET_BEACON_STATE 8 + +/* 100 - 199 FC_INTF_TYPE */ +#define EXT_SC_SET_LUN_BITMASK 103 +#define EXT_SC_SET_RNID 109 +#define EXT_SC_SET_FC_LUN_BITMASK 111 +#define EXT_SC_RESERVED_BC112 112 +#define EXT_SC_RESERVED_BC113 113 + +/* 200 - 299 SCSI_INTF_TYPE */ + +/* SCSI passthrough */ +#define EXT_SC_SEND_SCSI_PASSTHRU 0 +#define EXT_SC_SEND_FC_SCSI_PASSTHRU 1 +#define EXT_SC_SCSI3_PASSTHRU 2 + +/* Read */ + +/* Write */ + +/* Reset */ + +/* Request struct */ + + +/* + * Response struct + */ +typedef struct _EXT_HBA_NODE { + UINT8 WWNN [EXT_DEF_WWN_NAME_SIZE]; /* 8 */ + UINT8 Manufacturer [EXT_DEF_MAX_STR_SIZE]; /* 128; "QLOGIC" */ + UINT8 Model [EXT_DEF_MAX_STR_SIZE]; /* 128; "QLA2200" */ + UINT8 SerialNum [EXT_DEF_SERIAL_NUM_SIZE];/* 4; 123 */ + UINT8 DriverVersion[EXT_DEF_MAX_STR_SIZE]; /* 128; "7.4.3" */ + UINT8 FWVersion [EXT_DEF_MAX_STR_SIZE]; /* 128; "2.1.6" */ + + /* The following field is currently not supported */ + UINT8 OptRomVersion[EXT_DEF_MAX_STR_SIZE]; /* 128; "1.44" */ + + UINT16 PortCount; /* 2; 1 */ + UINT16 InterfaceType; /* 2; FC/SCSI */ + + /* The following two fields are not yet supported */ + UINT32 DriverAttr; /* 4 */ + UINT32 FWAttr; /* 4 */ + + UINT32 Reserved[8]; /* 32 */ +} EXT_HBA_NODE, *PEXT_HBA_NODE; /* 696 */ + +/* HBA node query interface type */ +#define EXT_DEF_FC_INTF_TYPE 1 +#define EXT_DEF_SCSI_INTF_TYPE 2 + +typedef struct _EXT_HBA_PORT { + UINT8 WWPN[EXT_DEF_WWN_NAME_SIZE]; /* 8 */ + UINT8 Id [EXT_DEF_PORTID_SIZE]; /* 4; 3 bytes valid Port Id. */ + UINT16 Type; /* 2; Port Type */ + UINT16 State; /* 2; Port State */ + UINT16 Mode; /* 2 */ + UINT16 DiscPortCount; /* 2 */ + UINT16 DiscPortNameType; /* 2; USE_NODE_NAME or */ + /* USE_PORT_NAME */ + UINT16 DiscTargetCount; /* 2 */ + UINT16 Bus; /* 2 */ + UINT16 Target; /* 2 */ + UINT16 Lun; /* 2 */ + /* 2 */ + UINT8 PortSupportedFC4Types; + UINT8 PortActiveFC4Types; + UINT8 FabricName[EXT_DEF_WWN_NAME_SIZE]; /* 8 */ + + /* 2*/ + UINT8 PortSupportedSpeed; + UINT8 PortSpeed; + UINT16 Unused; /* 2 */ + UINT32 Reserved[3]; /* 12 */ +} EXT_HBA_PORT, *PEXT_HBA_PORT; /* 56 */ + +/* port type */ +#define EXT_DEF_INITIATOR_DEV 1 +#define EXT_DEF_TARGET_DEV 2 +#define EXT_DEF_TAPE_DEV 4 +#define EXT_DEF_FABRIC_DEV 8 + + +/* HBA port state */ +#define EXT_DEF_HBA_OK 0 +#define EXT_DEF_HBA_SUSPENDED 1 +#define EXT_DEF_HBA_LOOP_DOWN 2 + +/* Connection mode */ +#define EXT_DEF_UNKNOWN_MODE 0 +#define EXT_DEF_P2P_MODE 1 +#define EXT_DEF_LOOP_MODE 2 +#define EXT_DEF_FL_MODE 3 +#define EXT_DEF_N_MODE 4 + +/* Valid name type for Disc. port/target */ +#define EXT_DEF_USE_NODE_NAME 1 +#define EXT_DEF_USE_PORT_NAME 2 + +/* FC4 type values */ +#define EXT_DEF_FC4_TYPE_SCSI 0x1 +#define EXT_DEF_FC4_TYPE_IP 0x2 +#define EXT_DEF_FC4_TYPE_SCTP 0x4 +#define EXT_DEF_FC4_TYPE_VI 0x8 + +/* Port Speed values */ +#define EXT_DEF_PORTSPEED_1GBIT 1 +#define EXT_DEF_PORTSPEED_2GBIT 2 +#define EXT_DEF_PORTSPEED_10GBIT 4 + +typedef struct _EXT_DISC_PORT { + UINT8 WWNN[EXT_DEF_WWN_NAME_SIZE]; /* 8 */ + UINT8 WWPN[EXT_DEF_WWN_NAME_SIZE]; /* 8 */ + UINT8 Id [EXT_DEF_PORTID_SIZE]; + /* 4; last 3 bytes used. big endian */ + + /* The following fields currently are not supported */ + UINT16 Type; /* 2; Port Type */ + UINT16 Status; /* 2; Port Status */ + UINT16 Bus; /* 2; n/a for Solaris */ + + UINT16 TargetId; /* 2 */ + UINT8 Local; /* 1; Local or Remote */ + UINT8 ReservedByte[1]; /* 1 */ + + UINT16 LoopID; /* 2; Loop ID */ + + UINT32 Reserved[7]; /* 28 */ +} EXT_DISC_PORT, *PEXT_DISC_PORT; /* 60 */ + +typedef struct _EXT_DISC_TARGET { + UINT8 WWNN[EXT_DEF_WWN_NAME_SIZE]; /* 8 */ + UINT8 WWPN[EXT_DEF_WWN_NAME_SIZE]; /* 8 */ + UINT8 Id [EXT_DEF_PORTID_SIZE]; + /* 4; last 3 bytes used. big endian */ + + /* The following fields currently are not supported */ + UINT16 Type; /* 2; Target Type */ + UINT16 Status; /* 2; Target Status*/ + UINT16 Bus; /* 2; n/a for Solaris */ + + UINT16 TargetId; /* 2 */ + + /* The following field is currently not supported */ + UINT16 LunCount; /* 2; n/a for nt */ + + UINT8 Local; /* 1; Local or Remote */ + UINT8 ReservedByte[1]; /* 1 */ + + UINT16 LoopID; /* 2; Loop ID */ + + UINT16 Reserved[13]; /* 26 */ +} EXT_DISC_TARGET, *PEXT_DISC_TARGET; /* 60 */ + +/* The following command is not supported */ +typedef struct _EXT_DISC_LUN { /* n/a for nt */ + UINT16 Id; /* 2 */ + UINT16 State; /* 2 */ + UINT16 IoCount; /* 2 */ + UINT16 Reserved[15]; /* 30 */ +} EXT_DISC_LUN, *PEXT_DISC_LUN; /* 36 */ + + +/* SCSI address */ +typedef struct _EXT_SCSI_ADDR { + UINT16 Bus; /* 2 */ + UINT16 Target; /* 2 */ + UINT16 Lun; /* 2 */ + UINT16 Padding[5]; /* 10 */ +} EXT_SCSI_ADDR, *PEXT_SCSI_ADDR; /* 16 */ + + +/* Fibre Channel address */ +typedef struct _EXT_FC_ADDR { + union { + UINT8 WWNN[EXT_DEF_WWN_NAME_SIZE]; /* 8 */ + UINT8 WWPN[EXT_DEF_WWN_NAME_SIZE]; /* 8 */ + UINT8 Id[EXT_DEF_PORTID_SIZE]; /* 4 */ + } FcAddr; + UINT16 Type; /* 2 */ + UINT16 Padding[2]; /* 2 */ +} EXT_FC_ADDR, *PEXT_FC_ADDR; /* 24 */ + +#define EXT_DEF_TYPE_WWNN 1 +#define EXT_DEF_TYPE_WWPN 2 +#define EXT_DEF_TYPE_PORTID 3 +#define EXT_DEF_TYPE_FABRIC 4 + + +/* Destination address */ +typedef struct _EXT_DEST_ADDR { + union { + UINT8 WWNN[EXT_DEF_WWN_NAME_SIZE]; /* 8 */ + UINT8 WWPN[EXT_DEF_WWN_NAME_SIZE]; /* 8 */ + UINT8 Id[EXT_DEF_PORTID_SIZE]; /* 4 */ + struct { + UINT16 Bus; /* 2 */ + UINT16 Target; /* 2 */ + } ScsiAddr; + } DestAddr; + UINT16 DestType; /* 2 */ + UINT16 Lun; /* 2 */ + UINT16 Padding[2]; /* 4 */ +} EXT_DEST_ADDR, *PEXT_DEST_ADDR; /* 16 */ + + +#define EXT_DEF_DESTTYPE_WWNN 1 +#define EXT_DEF_DESTTYPE_WWPN 2 +#define EXT_DEF_DESTTYPE_PORTID 3 +#define EXT_DEF_DESTTYPE_FABRIC 4 +#define EXT_DEF_DESTTYPE_SCSI 5 + +/* Statistic */ +#if defined(linux) /* Linux */ +typedef struct _EXT_HBA_PORT_STAT { + UINT32 ControllerErrorCount; /* 4 */ + UINT32 DeviceErrorCount; /* 4 */ + UINT32 TotalIoCount; /* 4 */ + UINT32 TotalMBytes; /* 4; MB of data processed */ + UINT32 TotalLipResets; /* 4; Total no. of LIP Reset */ + UINT32 Reserved2; /* 4 */ + UINT32 TotalLinkFailures; /* 4 */ + UINT32 TotalLossOfSync; /* 4 */ + UINT32 TotalLossOfSignals; /* 4 */ + UINT32 PrimitiveSeqProtocolErrorCount;/* 4 */ + UINT32 InvalidTransmissionWordCount; /* 4 */ + UINT32 InvalidCRCCount; /* 4 */ + uint64_t InputRequestCount; /* 8 */ + uint64_t OutputRequestCount; /* 8 */ + uint64_t ControlRequestCount; /* 8 */ + uint64_t InputMBytes; /* 8 */ + uint64_t OutputMBytes; /* 8 */ + UINT32 Reserved[6]; /* 24 */ +} EXT_HBA_PORT_STAT, *PEXT_HBA_PORT_STAT; /* 112 */ +#else +typedef struct _EXT_HBA_PORT_STAT { + UINT32 ControllerErrorCount; /* 4 */ + UINT32 DeviceErrorCount; /* 4 */ + UINT32 TotalIoCount; /* 4 */ + UINT32 TotalMBytes; /* 4; MB of data processed */ + UINT32 TotalLipResets; /* 4; Total no. of LIP Reset */ + UINT32 Reserved2; /* 4 */ + UINT32 TotalLinkFailures; /* 4 */ + UINT32 TotalLossOfSync; /* 4 */ + UINT32 TotalLossOfSignals; /* 4 */ + UINT32 PrimitiveSeqProtocolErrorCount;/* 4 */ + UINT32 InvalidTransmissionWordCount; /* 4 */ + UINT32 InvalidCRCCount; /* 4 */ + UINT64 InputRequestCount; /* 8 */ + UINT64 OutputRequestCount; /* 8 */ + UINT64 ControlRequestCount; /* 8 */ + UINT64 InputMBytes; /* 8 */ + UINT64 OutputMBytes; /* 8 */ + UINT32 Reserved[6]; /* 24 */ +} EXT_HBA_PORT_STAT, *PEXT_HBA_PORT_STAT; /* 112 */ +#endif + + +/* Driver property */ +typedef struct _EXT_DRIVER { + UINT8 Version[EXT_DEF_MAX_STR_SIZE];/* 128 */ + UINT16 NumOfBus; /* 2; Port Type */ + UINT16 TargetsPerBus; /* 2; Port Status */ + UINT16 LunsPerTarget; /* 2 */ + UINT32 MaxTransferLen; /* 4 */ + UINT32 MaxDataSegments; /* 4 */ + UINT16 DmaBitAddresses; /* 2 */ + UINT16 IoMapType; /* 2 */ + UINT32 Attrib; /* 4 */ + UINT32 InternalFlags[4]; /* 16 */ + UINT32 Reserved[8]; /* 32 */ +} EXT_DRIVER, *PEXT_DRIVER; /* 198 */ + + +/* Firmware property */ +typedef struct _EXT_FW { + UINT8 Version[EXT_DEF_MAX_STR_SIZE];/* 128 */ + UINT32 Attrib; /* 4 */ + UINT16 Reserved[33]; /* 66 */ +} EXT_FW, *PEXT_FW; /* 198 */ + + +/* ISP/Chip property */ +typedef struct _EXT_CHIP { + UINT16 VendorId; /* 2 */ + UINT16 DeviceId; /* 2 */ + UINT16 SubVendorId; /* 2 */ + UINT16 SubSystemId; /* 2 */ + UINT16 PciBusNumber; /* 2 */ + UINT16 PciSlotNumber; /* 2 */ + UINT32 IoAddr; /* 4 */ + UINT32 IoAddrLen; /* 4 */ + UINT32 MemAddr; /* 4 */ + UINT32 MemAddrLen; /* 4 */ + UINT16 ChipType; /* 2 */ + UINT16 InterruptLevel; /* 2 */ + UINT16 OutMbx[8]; /* 16 */ + UINT16 PciDevFunc; /* 2 */ + UINT16 Reserved[15]; /* 30 */ +} EXT_CHIP, *PEXT_CHIP; /* 80 */ + + +/* Request Buffer for RNID */ +typedef struct _EXT_RNID_REQ { + EXT_FC_ADDR Addr; /* 14 */ + UINT8 DataFormat; /* 1 */ + UINT8 Pad; /* 1 */ + UINT8 OptWWN[EXT_DEF_WWN_NAME_SIZE]; /* 8 */ + UINT8 OptPortId[EXT_DEF_PORTID_SIZE]; /* 4 */ + UINT32 Reserved[12]; /* 48 */ + UINT8 Pad1[3]; /* 3 */ +} EXT_RNID_REQ, *PEXT_RNID_REQ; /* 79 */ + +#define EXT_DEF_RNID_DFORMAT_NONE 0 +#define EXT_DEF_RNID_DFORMAT_TOPO_DISC 0xDF + +/* Request Buffer for Set RNID */ +typedef struct _EXT_SET_RNID_REQ { + UINT8 IPVersion[2]; + UINT8 UDPPortNumber[2]; + UINT8 IPAddress[16]; + UINT32 Reserved[16]; +} EXT_SET_RNID_REQ, *PEXT_SET_RNID_REQ; + +/* RNID definition and data struct */ +#define SEND_RNID_RSP_SIZE 72 + +typedef struct _RNID_DATA +{ + UINT8 WWN[16]; /* 16 */ + UINT32 UnitType; /* 4 */ + UINT8 PortId[4]; /* 4 */ + UINT32 NumOfAttachedNodes; /* 4 */ + UINT8 IPVersion[2]; /* 2 */ + UINT8 UDPPortNumber[2]; /* 2 */ + UINT8 IPAddress[16]; /* 16 */ + UINT16 Reserved; /* 2 */ + UINT16 TopoDiscFlags; /* 2 */ +} EXT_RNID_DATA, *PEXT_RNID_DATA; /* 52 */ + + +/* SCSI pass-through */ +typedef struct _EXT_SCSI_PASSTHRU { + EXT_SCSI_ADDR TargetAddr; + UINT8 Direction; + UINT8 CdbLength; + UINT8 Cdb[EXT_DEF_SCSI_PASSTHRU_CDB_LENGTH]; + UINT32 Reserved[14]; + UINT16 Reserved2; + UINT16 SenseLength; + UINT8 SenseData[256]; +} EXT_SCSI_PASSTHRU, *PEXT_SCSI_PASSTHRU; + +/* FC SCSI pass-through */ +typedef struct _EXT_FC_SCSI_PASSTHRU { + EXT_DEST_ADDR FCScsiAddr; + UINT8 Direction; + UINT8 CdbLength; + UINT8 Cdb[EXT_DEF_SCSI_PASSTHRU_CDB_LENGTH]; + UINT32 Reserved[14]; + UINT16 Reserved2; + UINT16 SenseLength; + UINT8 SenseData[256]; +} EXT_FC_SCSI_PASSTHRU, *PEXT_FC_SCSI_PASSTHRU; + +/* SCSI pass-through direction */ +#define EXT_DEF_SCSI_PASSTHRU_DATA_IN 1 +#define EXT_DEF_SCSI_PASSTHRU_DATA_OUT 2 + + +/* EXT_REG_AEN Request struct */ +typedef struct _EXT_REG_AEN { + UINT32 Enable; /* 4; non-0 to enable, 0 to disable. */ + UINT32 Reserved; /* 4 */ +} EXT_REG_AEN, *PEXT_REG_AEN; /* 8 */ + +/* EXT_GET_AEN Response struct */ +typedef struct _EXT_ASYNC_EVENT { + UINT32 AsyncEventCode; /* 4 */ + union { + struct { + UINT8 RSCNInfo[EXT_DEF_PORTID_SIZE_ACTUAL];/* 3, BE */ + UINT8 AddrFormat; /* 1 */ + UINT32 Rsvd_1[2]; /* 8 */ + } RSCN; + + UINT32 Reserved[3]; /* 12 */ + } Payload; +} EXT_ASYNC_EVENT, *PEXT_ASYNC_EVENT; /* 16 */ + + +/* Asynchronous Event Codes */ +#define EXT_DEF_LIP_OCCURRED 0x8010 +#define EXT_DEF_LINK_UP 0x8011 +#define EXT_DEF_LINK_DOWN 0x8012 +#define EXT_DEF_LIP_RESET 0x8013 +#define EXT_DEF_RSCN 0x8015 +#define EXT_DEF_DEVICE_UPDATE 0x8014 +#define EXT_DEF_ELS 0x8200 + +/* Required # of entries in the queue buffer allocated. */ +#define EXT_DEF_MAX_AEN_QUEUE EXT_DEF_MAX_AEN_QUEUE_OS +#define EXT_DEF_MAX_ELS_BUFS EXT_DEF_MAX_ELS_BUFS_OS +#define EXT_DEF_SIZE_ELS_BUF EXT_DEF_SIZE_ELS_BUF_OS + +/* Device type to get for EXT_SC_GET_PORT_SUMMARY */ +#define EXT_DEF_GET_KNOWN_DEVICE 0x1 +#define EXT_DEF_GET_VISIBLE_DEVICE 0x2 +#define EXT_DEF_GET_HIDDEN_DEVICE 0x4 +#define EXT_DEF_GET_FABRIC_DEVICE 0x8 +#define EXT_DEF_GET_LOOP_DEVICE 0x10 + +/* Each entry in device database */ +typedef struct _EXT_DEVICEDATAENTRY +{ + UINT8 NodeWWN[8]; /* Node World Wide Name for device */ + UINT8 PortWWN[8]; /* Port World Wide Name for device */ + UINT8 PortID[3]; /* Current PortId for device */ + UINT8 ControlFlags; /* Control flag */ + EXT_SCSI_ADDR TargetAddress; /* scsi address */ + UINT32 DeviceFlags; /* Flags for device */ + UINT16 LoopID; /* Loop ID */ + UINT16 BaseLunNumber; + UINT32 Reserved[32]; +} EXT_DEVICEDATAENTRY, *PEXT_DEVICEDATAENTRY; + +/* Device database information */ +typedef struct _EXT_DEVICEDATA +{ + UINT32 TotalDevices; /* Set to total number of device. */ + UINT32 ReturnListEntryCount; /* Set to number of device entries */ + /* returned in list. */ + + EXT_DEVICEDATAENTRY EntryList[1]; /* Variable length */ +} EXT_DEVICEDATA, *PEXT_DEVICEDATA; + + +/* Swap Target Device Data structure */ +typedef struct _EXT_SWAPTARGETDEVICE +{ + EXT_DEVICEDATAENTRY CurrentExistDevice; + EXT_DEVICEDATAENTRY NewDevice; +} EXT_SWAPTARGETDEVICE, *PEXT_SWAPTARGETDEVICE; + +/* LUN BitMask structure definition, array of 8bit bytes, + * 1 bit per lun. When bit == 1, the lun is masked. + * Most significant bit of mask[0] is lun 0. + * Least significant bit of mask[0] is lun 7. + */ +typedef struct _EXT_LUN_BIT_MASK { +#if ((EXT_DEF_MAX_LUN & 0x7) == 0) + UINT8 mask[EXT_DEF_MAX_LUN >> 3]; +#else + UINT8 mask[(EXT_DEF_MAX_LUN + 8) >> 3 ]; +#endif +} EXT_LUN_BIT_MASK, *PEXT_LUN_BIT_MASK; + +/* + * LUN mask bit manipulation macros + * + * P = Pointer to an EXT_LUN_BIT_MASK union. + * L = LUN number. + */ +#define EXT_IS_LUN_BIT_SET(P,L) \ + (((P)->mask[L/8] & (0x80 >> (L%8)))?1:0) + +#define EXT_SET_LUN_BIT(P,L) \ + ((P)->mask[L/8] |= (0x80 >> (L%8))) + +#define EXT_CLR_LUN_BIT(P,L) \ + ((P)->mask[L/8] &= ~(0x80 >> (L%8))) + +#define EXT_DEF_LUN_BITMASK_LIST_MIN_ENTRIES 1 +#define EXT_DEF_LUN_BITMASK_LIST_MAX_ENTRIES 256 + +#ifdef _WIN64 +#define EXT_DEF_LUN_BITMASK_LIST_HEADER_SIZE 32 +#else +#define EXT_DEF_LUN_BITMASK_LIST_HEADER_SIZE \ + offsetof(LUN_BITMASK_LIST_BUFFER, asBitmaskEntry) +#endif + +#define EXT_DEF_LUN_COUNT 2048 +#define EXT_DEF_LUN_BITMASK_BYTES (EXT_DEF_LUN_COUNT / 8) + +typedef struct _EXT_LUN_BITMASK_ENTRY +{ + UINT8 NodeName[EXT_DEF_WWN_NAME_SIZE]; + UINT8 PortName[EXT_DEF_WWN_NAME_SIZE]; + + UINT32 Reserved2; + UINT32 Reserved3; + UINT32 Reserved4; + UINT32 Reserved5; /* Pad to 32-byte header.*/ + + UINT8 Bitmask[EXT_DEF_LUN_BITMASK_BYTES]; +} EXT_LUN_BITMASK_ENTRY, *PEXT_LUN_BITMASK_ENTRY; + +/* Structure as it is stored in the config file.*/ +typedef struct _LUN_BITMASK_LIST +{ + UINT16 Version; /* Should be LUN_BITMASK_REGISTRY_VERSION */ + UINT16 EntryCount; /* Count of variable entries following.*/ + UINT32 Reserved1; + UINT32 Reserved2; + UINT32 Reserved3; + UINT32 Reserved4; + UINT32 Reserved5; + UINT32 Reserved6; + UINT32 Reserved7; /* Pad to 32-byte header.*/ + + EXT_LUN_BITMASK_ENTRY BitmaskEntry[1]; /* Variable-length data.*/ + +} EXT_LUN_BITMASK_LIST, *PEXT_LUN_BITMASK_LIST; + + +#define EXT_DEF_LUN_BITMASK_LIST_MIN_SIZE \ + (EXT_DEF_LUN_BITMASK_LIST_HEADER_SIZE + \ + (sizeof(EXT_DEF_LUN_BITMASK_ENTRY) * EXT_DEF_LUN_BITMASK_LIST_MIN_ENTRIES)) +#define EXT_DEF_LUN_BITMASK_LIST_MAX_SIZE \ + (EXT_DEF_LUN_BITMASK_LIST_HEADER_SIZE + \ + (sizeof(EXT_DEF_LUN_BITMASK_ENTRY) * EXT_DEF_LUN_BITMASK_LIST_MAX_ENTRIES)) + +/* Request Buffer for ELS PT*/ +#define EXT_DEF_WWPN_VALID 1 +#define EXT_DEF_WWNN_VALID 2 +#define EXT_DEF_PID_VALID 4 +typedef struct _EXT_ELS_PT_REQ { + UINT8 WWNN[EXT_DEF_WWN_NAME_SIZE]; /* 8 */ + UINT8 WWPN[EXT_DEF_WWN_NAME_SIZE]; /* 8 */ + UINT8 Id[EXT_DEF_PORTID_SIZE]; /* 4 */ + UINT16 ValidMask; /* 2 */ + UINT16 Lid; /* 2 */ + UINT16 Rxid; /* 2 */ + UINT16 AccRjt; /* 2 */ + UINT32 Reserved; /* 4 */ +} EXT_ELS_PT_REQ, *PEXT_ELS_PT_REQ; /* 32 */ + +/* LED state information */ + +#define EXT_DEF_GRN_BLINK_ON 0x01ED0017 +#define EXT_DEF_GRN_BLINK_OFF 0x01ED00FF + +typedef struct _EXT_BEACON_CONTROL { + UINT32 State; /* 4 */ + UINT32 Reserved[3]; /* 12 */ +} EXT_BEACON_CONTROL , *PEXT_BEACON_CONTROL ; /* 16 */ + +#ifdef _MSC_VER +#pragma pack() +#endif + +#endif /* _EXIOCT_H */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/exioctln.h 999-mjb/drivers/scsi/qla2xxx/exioctln.h --- 000-virgin/drivers/scsi/qla2xxx/exioctln.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/exioctln.h 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,297 @@ +/***************************************************************************** +* QLOGIC LINUX SOFTWARE +* +* QLogic ISP2x00 device driver for Linux 2.6.x +* Copyright (C) 2003 QLogic Corporation +* (www.qlogic.com) +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2, or (at your option) any +* later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +****************************************************************************/ + +/* + * File Name: exioctln.h + + Rev 16 July 31, 2003 RL + - Added definitions for Status field in discovered target + structure. + - Updated ioctl command value assignment on PPC64 so this + file can be shared with API lib. + + Rev 15 June 03, 2003 RL + - Modified ioctl command code value assignment so it also + works on PPC64. + + Rev 14 February 25, 2003 RL + - Added EXT_CC_DRIVER_SPECIFIC ioctl command to return + some driver specific data that can be used by API library + to determine how to maintain backward compatibility + of certain features. + + Rev 13 January 31, 2003 RL + - Changed the value of EXT_DEF_USE_HBASELECT to avoid + conflicting with older implementation of FO API lib. + + Rev 12 January 20, 2003 RL + - Added EXT_DEF_USE_HBASELECT definition for use by + the SETINSTANCE command. + + Rev 11 December 10, 2002 RL + - Added EXT_CC_SEND_ELS_PASSTHRU_OS definition. + + Rev 10 October 26, 2001 RL + - Corrected MAX_HBA, MAX_TARGET and MAX_LUN values to 255. + + Rev 9 July 26, 2001 RL + - Added definition of signed types. + + Rev 8 July 05, 2001 RL + - Redefined ioctl command values. + + Rev 7 Nov 06, 2000 BN + - Added EXT_DEF_MAX_AEN_QUEUE_OS define + - Added define for handle_hba_t + + Rev 6 Oct 25, 2000 BN + - Added EXT_CC_DRIVER_PROP_OS define + + Rev 5 Oct 25, 2000 BN + - Redo the copyright header and add AEN details + + Rev 4 Oct 23, 2000 BN + - Added definition for BOOLEAN + + Rev 3 Oct 23, 2000 BN + - Added definitions for EXT_ADDR_MODE_OS + and also include of + + Rev 2 Oct 18, 2000 BN + - Enable API Exention support + + Rev 1 Original version Sep 7, 2000 BN + +*/ + + +#ifndef _EXIOCT_LN_H_ +#define _EXIOCT_LN_H_ + +#include + +#ifdef APILIB +#include +#endif + + +#define INT8 int8_t +#define INT16 int16_t +#define INT32 int32_t +#define UINT8 uint8_t +#define UINT16 uint16_t +#define UINT32 uint32_t +#define UINT64 void * +#define BOOLEAN uint8_t + +typedef struct track_instance { + int handle; +} track_instance_t; + + +#if BITS_PER_LONG <= 32 +#define EXT_ADDR_MODE_OS EXT_DEF_ADDR_MODE_32 +#else +#define EXT_ADDR_MODE_OS EXT_DEF_ADDR_MODE_64 +#endif + + +#define QLMULTIPATH_MAGIC 'y' + +#define _QLBUILD /* for exioct.h to enable include of qinsdmgt.h */ + + + +#define EXT_DEF_MAX_HBA_OS 255 /* 0 - 0xFE */ +#define EXT_DEF_MAX_BUS_OS 1 +#define EXT_DEF_MAX_TARGET_OS 255 /* 0 - 0xFE */ +#define EXT_DEF_MAX_LUN_OS 255 /* 0 - 0xFE */ + +#define EXT_DEF_MAX_AEN_QUEUE_OS 64 + +#define EXT_DEF_FC_HEADER_LEN 24 +#define EXT_DEF_ELS_RJT_LENGTH 0x08 /* 8 */ +#define EXT_DEF_ELS_RPS_ACC_LENGTH 0x40 /* 64 */ +#define EXT_DEF_ELS_RLS_ACC_LENGTH 0x1C /* 28 */ + +#define EXT_DEF_USE_HBASELECT 0x02 /* bit 1: HbaSelect field now + * used to specify destination + * HBA of each command. + * SetInstance cmd is now + * issued only once during + * API initialization. + */ + +/* target status flags */ +#define EXT_DEF_TGTSTAT_OFFLINE 0x01 +#define EXT_DEF_TGTSTAT_IN_CFG 0x02 + + +/*****************/ +/* Command codes */ +/*****************/ +#define QL_IOCTL_BASE(idx) \ + _IOWR_BAD(QLMULTIPATH_MAGIC, idx, sizeof(EXT_IOCTL)) + +#ifndef APILIB + #if CONFIG_PPC64 + #define QL_IOCTL_CMD(idx) (QL_IOCTL_BASE(idx) - 0x40000) + #else + #define QL_IOCTL_CMD(idx) QL_IOCTL_BASE(idx) + #endif +#else + #define QL_IOCTL_CMD(idx) QL_IOCTL_BASE(idx) +#endif + +/*************************************************************** + * These are regular/external command codes, starting from 0. + * The regular command code end index must be updated whenever + * adding new commands. + ***************************************************************/ +#define EXT_DEF_LN_REG_CC_START_IDX 0x00 /* reg cmd start index */ + +#define EXT_CC_QUERY_OS /* QUERY */ \ + QL_IOCTL_CMD(0x00) +#define EXT_CC_SEND_FCCT_PASSTHRU_OS /* FCCT_PASSTHRU */ \ + QL_IOCTL_CMD(0x01) +#define EXT_CC_REG_AEN_OS /* REG_AEN */ \ + QL_IOCTL_CMD(0x02) +#define EXT_CC_GET_AEN_OS /* GET_AEN */ \ + QL_IOCTL_CMD(0x03) +#define EXT_CC_SEND_ELS_RNID_OS /* SEND_ELS_RNID */ \ + QL_IOCTL_CMD(0x04) +#define EXT_CC_SCSI_PASSTHRU_OS /* SCSI_PASSTHRU */ \ + QL_IOCTL_CMD(0x05) + +#define EXT_CC_GET_DATA_OS /* GET_DATA */ \ + QL_IOCTL_CMD(0x06) +#define EXT_CC_SET_DATA_OS /* SET_DATA */ \ + QL_IOCTL_CMD(0x07) + +#define EXT_DEF_LN_REG_CC_END_IDX 0x07 /* reg cmd end index */ + +/***************************************** + * Following are internal command codes. + * See inioct.h. + *****************************************/ +#define EXT_DEF_LN_INT_CC_START_IDX 0x08 /* int cmd start index */ +#define EXT_CC_RESERVED0A_OS \ + QL_IOCTL_CMD(0x08) +#define EXT_CC_RESERVED0B_OS \ + QL_IOCTL_CMD(0x09) + +#define EXT_CC_RESERVED0C_OS \ + QL_IOCTL_CMD(0x0a) +#define EXT_CC_RESERVED0D_OS \ + QL_IOCTL_CMD(0x0b) + +#define EXT_CC_RESERVED0E_OS \ + QL_IOCTL_CMD(0x0c) +#define EXT_CC_RESERVED0F_OS \ + QL_IOCTL_CMD(0x0d) + +#define EXT_CC_RESERVED0G_OS \ + QL_IOCTL_CMD(0x0e) +#define EXT_CC_RESERVED0H_OS \ + QL_IOCTL_CMD(0x0f) + +#define EXT_CC_RESERVED0I_OS \ + QL_IOCTL_CMD(0x10) +#define EXT_CC_RESERVED0J_OS \ + QL_IOCTL_CMD(0x11) + +#define EXT_DEF_LN_INT_CC_END_IDX 0x11 /* supported int cmd end idx */ + +#define EXT_CC_RESERVED0Z_OS \ + QL_IOCTL_CMD(0x21) + +/********************************************************/ +/* These are additional regular/external command codes. */ +/********************************************************/ +#define EXT_DEF_LN_ADD_CC_START_IDX 0x30 /* additional cmd start index */ +#define EXT_CC_SEND_ELS_PASSTHRU_OS \ + QL_IOCTL_CMD(0x30) +#define EXT_DEF_LN_ADD_CC_END_IDX 0x30 /* additional cmd end index */ + + +/******************************************************** + * Failover ioctl command codes range from 0xc0 to 0xdf. + * See definition in qlfoln.h. + ********************************************************/ + + +/*******************************************************************/ +/* These are Linux driver implementation specific commands. Values */ +/* start from highest possible value and in decreasing order. */ +/*******************************************************************/ +#define EXT_DEF_LN_SPC_CC_START_IDX 0xff /* LN specific cmd start idx */ + +#define EXT_CC_STARTIOCTL /* STARTIOCTL */ \ + QL_IOCTL_CMD(0xff) +#define EXT_CC_SETINSTANCE /* SETINSTANCE */ \ + QL_IOCTL_CMD(0xfe) +#define EXT_CC_WWPN_TO_SCSIADDR /* WWPN_TO_SCSIADDR */ \ + QL_IOCTL_CMD(0xfd) +#define EXT_CC_DRIVER_SPECIFIC /* DRIVER_SPECIFIC */ \ + QL_IOCTL_CMD(0xfc) + +#define EXT_DEF_LN_SPC_CC_END_IDX 0xfc /* LN specific cmd end idx */ + + +/* + * Response struct definition + */ +typedef struct _EXT_LN_DRV_VERSION { + UINT8 Major; + UINT8 Minor; + UINT8 Patch; + UINT8 Beta; + UINT8 Reserved[4]; +} EXT_LN_DRV_VERSION; /* 8 */ + +typedef struct _EXT_LN_DRIVER_DATA { + EXT_LN_DRV_VERSION DrvVer; /* 8 */ + UINT32 Reserved[14]; /* 56 */ +} EXT_LN_DRIVER_DATA, *PEXT_LN_DRIVER_DATA; /* 64 */ + + + + + + +/* + * Overrides for Emacs so that we almost follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-indent-level: 2 + * c-brace-imaginary-offset: 0 + * c-brace-offset: -2 + * c-argdecl-indent: 2 + * c-label-offset: -2 + * c-continued-statement-offset: 4 + * c-continued-brace-offset: 0 + * indent-tabs-mode: nil + * tab-width: 8 + * End: + */ + +#endif /* _EXIOCT_LN_H_ */ + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/gdump.sh 999-mjb/drivers/scsi/qla2xxx/gdump.sh --- 000-virgin/drivers/scsi/qla2xxx/gdump.sh 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/gdump.sh 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,60 @@ +#!/bin/sh +# +# QLogic ISP2x00 device driver dump reader +# Copyright (C) 2003 QLogic Corporation +# (www.qlogic.com) +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by the +# Free Software Foundation; either version 2, or (at your option) any +# later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +version=1.039720 +sysfs=/sys +qstats=${sysfs}/class/scsi_host/host${1}/device/stats +qfwd=${sysfs}/class/scsi_host/host${1}/device/fw_dump +dfile=fw_dump_${1}_`eval date +%Y%m%d_%H%M%S`.txt + +# Get host number +if [ -z "${1}" ] ; then + echo "QLogic Firmware Dump Reader: ${version}" + echo "Usage:" + echo " `basename ${0}` " + exit 1 +fi + +# Verify fw_dump binary-attribute file +if ! test -f ${qfwd} ; then + echo "No firmware dump file at host ${1}!!!" + exit 1 +fi + +# Verify a firmware dump is available for the given host +#if ! test -f ${qstats} ; then +# echo "No device stats to verify firmware dump available at host ${1}!!!" +# exit 1 +#fi +#do_dump=`eval cat ${qstats} | cut -d ' ' -f5` +#if [ "${do_dump}" = "0" ] ; then +# echo "No firmware dump available at host ${1}!!!" +# exit 1 +#fi + +# Go with dump +echo 1 > ${qfwd} +cat ${qfwd} > ${dfile} +echo 0 > ${qfwd} +if ! test -s "${dfile}" ; then + echo "No firmware dump available at host ${1}!!!" + rm ${dfile} + exit 1 +fi + +echo "Firmware dumped to file ${dfile}." + +exit 0 diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/inioct.h 999-mjb/drivers/scsi/qla2xxx/inioct.h --- 000-virgin/drivers/scsi/qla2xxx/inioct.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/inioct.h 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,137 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + +/* + * File Name: inioct.h + * + * San/Device Management Ioctl Header + * File is created to adhere to Solaris requirement using 8-space tabs. + * + * !!!!! PLEASE DO NOT REMOVE THE TABS !!!!! + * !!!!! PLEASE NO SINGLE LINE COMMENTS: // !!!!! + * !!!!! PLEASE NO MORE THAN 80 CHARS PER LINE !!!!! + * + * + * Revision History: + * + * Rev. 0 June 15, 2001 + * YPL - Created. + * + * Rev. 1 June 26, 2001 + * YPL - Change the loop back structure and delete cc that is not used. + * + * Rev. 2 June 29, 2001 + * YPL - Use new EXT_CC defines from exioct.h + * + * Rev. 3 July 12, 2001 + * RL - Added definitions for loopback mbx command completion codes. + * + * Rev. 4 July 12, 2001 + * RL - Added definitions for loopback mbx command completion codes. + * + * Rev. 5 October 9, 2002 + * AV - Added definition for Read Option ROM IOCTL. + * + * Rev. 6 May 27, 2003 + * RL - Modified loopback rsp buffer structure definition to add + * diagnostic Echo command support. + * + */ + +#ifndef _INIOCT_H +#define _INIOCT_H + +/* + * *********************************************************************** + * X OS type definitions + * *********************************************************************** + */ +#ifdef _MSC_VER /* NT */ +#pragma pack(1) +#endif + +/* + * *********************************************************************** + * INT_IOCTL SubCode definition. + * These macros are being used for setting SubCode field in EXT_IOCTL + * structure. + * *********************************************************************** + */ + +/* + * Currently supported DeviceControl / ioctl command codes + */ +#define INT_CC_GET_PORT_STAT_FC EXT_CC_RESERVED0A_OS +#define INT_CC_LOOPBACK EXT_CC_RESERVED0B_OS +#define INT_CC_UPDATE_OPTION_ROM EXT_CC_RESERVED0C_OS +#define INT_CC_ADD_TARGET_DEVICE EXT_CC_RESERVED0D_OS +#define INT_CC_READ_NVRAM EXT_CC_RESERVED0E_OS +#define INT_CC_UPDATE_NVRAM EXT_CC_RESERVED0F_OS +#define INT_CC_SWAP_TARGET_DEVICE EXT_CC_RESERVED0G_OS +#define INT_CC_READ_OPTION_ROM EXT_CC_RESERVED0H_OS +#define INT_CC_LEGACY_LOOPBACK EXT_CC_RESERVED0Z_OS + + + +/* NVRAM */ +#define INT_SC_NVRAM_HARDWARE 0 /* Save */ +#define INT_SC_NVRAM_DRIVER 1 /* Driver (Apply) */ +#define INT_SC_NVRAM_ALL 2 /* NVRAM/Driver (Save+Apply) */ + +/* Loopback */ +typedef struct _INT_LOOPBACK_REQ +{ + UINT16 Options; /* 2 */ + UINT32 TransferCount; /* 4 */ + UINT32 IterationCount; /* 4 */ + UINT64 BufferAddress; /* 8 */ + UINT32 BufferLength; /* 4 */ + UINT16 Reserved[9]; /* 18 */ +} INT_LOOPBACK_REQ, *PINT_LOOPBACK_REQ; /* 408 */ + +typedef struct _INT_LOOPBACK_RSP +{ + UINT64 BufferAddress; /* 8 */ + UINT32 BufferLength; /* 4 */ + UINT16 CompletionStatus; /* 2 */ + UINT16 CrcErrorCount; /* 2 */ + UINT16 DisparityErrorCount; /* 2 */ + UINT16 FrameLengthErrorCount; /* 2 */ + UINT32 IterationCountLastError; /* 4 */ + UINT8 CommandSent; /* 1 */ + UINT8 Reserved1; /* 1 */ + UINT16 Reserved2[7]; /* 16 */ +} INT_LOOPBACK_RSP, *PINT_LOOPBACK_RSP; /* 40 */ + +/* definition for interpreting CompletionStatus values */ +#define INT_DEF_LB_COMPLETE 0x4000 +#define INT_DEF_LB_ECHO_CMD_ERR 0x4005 +#define INT_DEF_LB_PARAM_ERR 0x4006 +#define INT_DEF_LB_LOOP_DOWN 0x400b +#define INT_DEF_LB_CMD_ERROR 0x400c + +/* definition for interpreting CommandSent field */ +#define INT_DEF_LB_LOOPBACK_CMD 0 +#define INT_DEF_LB_ECHO_CMD 1 + +#ifdef _MSC_VER +#pragma pack() +#endif + +#endif /* _INIOCT_H */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/ql2100_fw.c 999-mjb/drivers/scsi/qla2xxx/ql2100_fw.c --- 000-virgin/drivers/scsi/qla2xxx/ql2100_fw.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/ql2100_fw.c 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,4858 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + *************************************************************************/ + +/* + * Firmware Version 1.19.24 (14:02 Jul 16, 2002) + */ + +#ifdef UNIQUE_FW_NAME +unsigned short fw2100tp_version = 1*1024+19; +#else +unsigned short risc_code_version = 1*1024+19; +#endif + +#ifdef UNIQUE_FW_NAME +unsigned char fw2100tp_version_str[] = {1,19,24}; +#else +unsigned char firmware_version[] = {1,19,24}; +#endif + +#ifdef UNIQUE_FW_NAME +#define fw2100tp_VERSION_STRING "1.19.24" +#else +#define FW_VERSION_STRING "1.19.24" +#endif + +#ifdef UNIQUE_FW_NAME +unsigned short fw2100tp_addr01 = 0x1000 ; +#else +unsigned short risc_code_addr01 = 0x1000 ; +#endif + +#ifdef UNIQUE_FW_NAME +unsigned short fw2100tp_code01[] = { +#else +unsigned short risc_code01[] = { +#endif + 0x0078, 0x102d, 0x0000, 0x95f1, 0x0000, 0x0001, 0x0013, 0x0018, + 0x0017, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, + 0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, + 0x5449, 0x4f4e, 0x2049, 0x5350, 0x3231, 0x3030, 0x2046, 0x6972, + 0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030, + 0x312e, 0x3139, 0x2020, 0x2020, 0x2400, 0x2091, 0x2000, 0x20c1, + 0x0021, 0x2039, 0xffff, 0x2019, 0xaaaa, 0x2760, 0x2069, 0x7fff, + 0x20c1, 0x0020, 0x2c2c, 0x2d34, 0x2762, 0x236a, 0x2c24, 0x2d04, + 0x266a, 0x2562, 0xa406, 0x00c0, 0x1052, 0x20c1, 0x0021, 0x2c2c, + 0x2362, 0x2c04, 0x2562, 0xa306, 0x0040, 0x1052, 0x20c1, 0x0020, + 0x2039, 0x8fff, 0x20a1, 0xad00, 0x2708, 0x810d, 0x810d, 0x810d, + 0x810d, 0xa18c, 0x000f, 0x2001, 0x000a, 0xa112, 0xa00e, 0x21a8, + 0x41a4, 0x3400, 0x8211, 0x00c0, 0x105f, 0x2708, 0x3400, 0xa102, + 0x0040, 0x106f, 0x0048, 0x106f, 0x20a8, 0xa00e, 0x41a4, 0x20a1, + 0xa5f1, 0x2009, 0x0000, 0x20a9, 0x070f, 0x41a4, 0x3400, 0x20c9, + 0xaaff, 0x2059, 0x0000, 0x2b78, 0x7823, 0x0004, 0x2089, 0x25c7, + 0x2051, 0xa600, 0x2a70, 0x7762, 0xa786, 0x8fff, 0x0040, 0x1092, + 0x705f, 0xcd00, 0x705b, 0xccf1, 0x7067, 0x0200, 0x706b, 0x0200, + 0x0078, 0x109a, 0x705b, 0xbd01, 0x7067, 0x0100, 0x706b, 0x0100, + 0x705f, 0xbd00, 0x1078, 0x12df, 0x1078, 0x13ca, 0x1078, 0x1577, + 0x1078, 0x1ce9, 0x1078, 0x42ec, 0x1078, 0x76bf, 0x1078, 0x1355, + 0x1078, 0x2ac0, 0x1078, 0x4e93, 0x1078, 0x49a3, 0x1078, 0x594a, + 0x1078, 0x2263, 0x1078, 0x5c43, 0x1078, 0x5485, 0x1078, 0x2162, + 0x1078, 0x2240, 0x2091, 0x3009, 0x7823, 0x0000, 0x0090, 0x10cf, + 0x7820, 0xa086, 0x0002, 0x00c0, 0x10cf, 0x7823, 0x4000, 0x0068, + 0x10c7, 0x781b, 0x0001, 0x2091, 0x5000, 0x2091, 0x4080, 0x2a70, + 0x7003, 0x0000, 0x2001, 0x017f, 0x2003, 0x0000, 0x2a70, 0x7000, + 0xa08e, 0x0003, 0x00c0, 0x10ef, 0x1078, 0x365e, 0x1078, 0x2ae8, + 0x1078, 0x4ee3, 0x1078, 0x4b66, 0x2009, 0x0100, 0x2104, 0xa082, + 0x0002, 0x0048, 0x10f3, 0x1078, 0x5966, 0x0078, 0x10d6, 0x1079, + 0x10f7, 0x0078, 0x10dc, 0x1078, 0x7197, 0x0078, 0x10eb, 0x1101, + 0x1102, 0x11be, 0x10ff, 0x1246, 0x12dc, 0x12dd, 0x12de, 0x1078, + 0x1332, 0x007c, 0x127e, 0x0f7e, 0x2091, 0x8000, 0x7000, 0xa086, + 0x0001, 0x00c0, 0x1198, 0x1078, 0x3aec, 0x2079, 0x0100, 0x7844, + 0xa005, 0x00c0, 0x1198, 0x2011, 0x41dc, 0x1078, 0x5a45, 0x1078, + 0x1adf, 0x780f, 0x00ff, 0x7840, 0xa084, 0xfffb, 0x7842, 0x2011, + 0x8010, 0x73c4, 0x1078, 0x361b, 0x2001, 0xffff, 0x1078, 0x5ae6, + 0x723c, 0xc284, 0x723e, 0x2001, 0xa60c, 0x2014, 0xc2ac, 0x2202, + 0x1078, 0x6f9f, 0x2011, 0x0004, 0x1078, 0x8d1b, 0x1078, 0x489e, + 0x1078, 0x42d4, 0x0040, 0x1144, 0x7087, 0x0001, 0x70bf, 0x0000, + 0x1078, 0x3c9e, 0x0078, 0x1198, 0x1078, 0x4967, 0x0040, 0x114d, + 0x7a0c, 0xc2b4, 0x7a0e, 0x0078, 0x1159, 0x1078, 0x90a6, 0x70cc, + 0xd09c, 0x00c0, 0x1159, 0x7098, 0xa005, 0x0040, 0x1159, 0x1078, + 0x42b8, 0x70d7, 0x0000, 0x70d3, 0x0000, 0x72cc, 0x2079, 0xa652, + 0x7804, 0xd0ac, 0x0040, 0x1165, 0xc295, 0x72ce, 0xa296, 0x0004, + 0x0040, 0x1186, 0x2011, 0x0001, 0x1078, 0x8d1b, 0x7093, 0x0000, + 0x7097, 0xffff, 0x7003, 0x0002, 0x0f7f, 0x1078, 0x2677, 0x2011, + 0x0005, 0x1078, 0x70e0, 0x1078, 0x62d1, 0x0c7e, 0x2061, 0x0100, + 0x60e3, 0x0008, 0x0c7f, 0x127f, 0x0078, 0x119a, 0x7093, 0x0000, + 0x7097, 0xffff, 0x7003, 0x0002, 0x2011, 0x0005, 0x1078, 0x70e0, + 0x1078, 0x62d1, 0x0c7e, 0x2061, 0x0100, 0x60e3, 0x0008, 0x0c7f, + 0x0f7f, 0x127f, 0x007c, 0x0c7e, 0x20a9, 0x0082, 0x2009, 0x007e, + 0x017e, 0x027e, 0x037e, 0x2110, 0x027e, 0x2019, 0x0029, 0x1078, + 0x73d0, 0x027f, 0x1078, 0xa4f1, 0x037f, 0x027f, 0x017f, 0x1078, + 0x298e, 0x8108, 0x00f0, 0x11a0, 0x0c7f, 0x706f, 0x0000, 0x7070, + 0xa084, 0x00ff, 0x7072, 0x709b, 0x0000, 0x007c, 0x127e, 0x2091, + 0x8000, 0x7000, 0xa086, 0x0002, 0x00c0, 0x1244, 0x7094, 0xa086, + 0xffff, 0x0040, 0x11d1, 0x1078, 0x2677, 0x1078, 0x62d1, 0x0078, + 0x1244, 0x70cc, 0xd09c, 0x0040, 0x11fd, 0xd084, 0x0040, 0x11fd, + 0x0f7e, 0x2079, 0x0100, 0x790c, 0xc1b5, 0x790e, 0x0f7f, 0xd08c, + 0x0040, 0x11fd, 0x70d0, 0xa086, 0xffff, 0x0040, 0x11f9, 0x1078, + 0x27f7, 0x1078, 0x62d1, 0x70cc, 0xd094, 0x00c0, 0x1244, 0x2011, + 0x0001, 0x2019, 0x0000, 0x1078, 0x282f, 0x1078, 0x62d1, 0x0078, + 0x1244, 0x70d4, 0xa005, 0x00c0, 0x1244, 0x7090, 0xa005, 0x00c0, + 0x1244, 0x1078, 0x4967, 0x00c0, 0x1244, 0x2001, 0xa653, 0x2004, + 0xd0ac, 0x0040, 0x1227, 0x157e, 0x0c7e, 0x20a9, 0x007f, 0x2009, + 0x0000, 0x017e, 0x1078, 0x45c4, 0x00c0, 0x121a, 0x6000, 0xd0ec, + 0x00c0, 0x1222, 0x017f, 0x8108, 0x00f0, 0x1211, 0x0c7f, 0x157f, + 0x0078, 0x1227, 0x017f, 0x0c7f, 0x157f, 0x0078, 0x1244, 0x7003, + 0x0003, 0x7097, 0xffff, 0x2001, 0x0000, 0x1078, 0x24e8, 0x1078, + 0x3699, 0x2001, 0xa8b2, 0x2004, 0xa086, 0x0005, 0x00c0, 0x123c, + 0x2011, 0x0000, 0x1078, 0x70e0, 0x2011, 0x0000, 0x1078, 0x70ea, + 0x1078, 0x62d1, 0x1078, 0x639b, 0x127f, 0x007c, 0x017e, 0x0f7e, + 0x127e, 0x2091, 0x8000, 0x2079, 0x0100, 0x2009, 0x00f7, 0x1078, + 0x42a1, 0x7940, 0xa18c, 0x0010, 0x7942, 0x7924, 0xd1b4, 0x0040, + 0x125b, 0x7827, 0x0040, 0xd19c, 0x0040, 0x1260, 0x7827, 0x0008, + 0x007e, 0x037e, 0x157e, 0xa006, 0x1078, 0x5ae6, 0x7900, 0xa18a, + 0x0003, 0x0050, 0x1289, 0x7954, 0xd1ac, 0x00c0, 0x1289, 0x2009, + 0x00f8, 0x1078, 0x42a1, 0x7843, 0x0090, 0x7843, 0x0010, 0x20a9, + 0x09c4, 0x7820, 0xd09c, 0x00c0, 0x1281, 0x7824, 0xd0ac, 0x00c0, + 0x12ca, 0x00f0, 0x1279, 0x2001, 0x0001, 0x1078, 0x24e8, 0x0078, + 0x12d5, 0x7853, 0x0000, 0x782f, 0x0020, 0x20a9, 0x0050, 0x00e0, + 0x128f, 0x2091, 0x6000, 0x00f0, 0x128f, 0x7853, 0x0400, 0x782f, + 0x0000, 0x2009, 0x00f8, 0x1078, 0x42a1, 0x20a9, 0x000e, 0x0005, + 0x00f0, 0x129f, 0x7853, 0x1400, 0x7843, 0x0090, 0x7843, 0x0010, + 0x2019, 0x61a8, 0x7854, 0x0005, 0x0005, 0xd08c, 0x0040, 0x12b4, + 0x7824, 0xd0ac, 0x00c0, 0x12ca, 0x8319, 0x00c0, 0x12aa, 0x2009, + 0xa632, 0x2104, 0x8000, 0x200a, 0xa084, 0xfff0, 0x0040, 0x12c4, + 0x200b, 0x0000, 0x1078, 0x2588, 0x2001, 0x0001, 0x1078, 0x24e8, + 0x0078, 0x12d3, 0x2001, 0xa632, 0x2003, 0x0000, 0x7828, 0xc09d, + 0x782a, 0x7827, 0x0048, 0x7853, 0x0400, 0x157f, 0x037f, 0x007f, + 0x127f, 0x0f7f, 0x017f, 0x007c, 0x007c, 0x007c, 0x007c, 0x2a70, + 0x2061, 0xa8ad, 0x2063, 0x0001, 0x6007, 0x0013, 0x600b, 0x0018, + 0x600f, 0x0017, 0x2009, 0x0100, 0x2104, 0xa082, 0x0002, 0x0048, + 0x12f5, 0x7053, 0xffff, 0x0078, 0x12f7, 0x7053, 0x0000, 0x7057, + 0xffff, 0x706f, 0x0000, 0x7073, 0x0000, 0x1078, 0x90a6, 0x2061, + 0xa88d, 0x6003, 0x0909, 0x6007, 0x0000, 0x600b, 0x8800, 0x600f, + 0x0200, 0x6013, 0x00ff, 0x6017, 0x0003, 0x601b, 0x0000, 0x601f, + 0x07d0, 0x2061, 0xa895, 0x6003, 0x8000, 0x6007, 0x0000, 0x600b, + 0x0000, 0x600f, 0x0200, 0x6013, 0x00ff, 0x6017, 0x0000, 0x601b, + 0x0001, 0x601f, 0x0000, 0x2061, 0xa8a5, 0x6003, 0x514c, 0x6007, + 0x4f47, 0x600b, 0x4943, 0x600f, 0x2020, 0x2001, 0xa626, 0x2003, + 0x0000, 0x007c, 0x2091, 0x8000, 0x0068, 0x1334, 0x007e, 0x017e, + 0x2079, 0x0000, 0x7818, 0xd084, 0x00c0, 0x133a, 0x017f, 0x792e, + 0x007f, 0x782a, 0x007f, 0x7826, 0x3900, 0x783a, 0x7823, 0x8002, + 0x781b, 0x0001, 0x2091, 0x5000, 0x2091, 0x4080, 0x2079, 0xa600, + 0x7803, 0x0005, 0x0078, 0x1352, 0x007c, 0x2071, 0xa600, 0x715c, + 0x712e, 0x2021, 0x0001, 0xa190, 0x002d, 0xa298, 0x002d, 0x0048, + 0x136b, 0x7060, 0xa302, 0x00c8, 0x136b, 0x220a, 0x2208, 0x2310, + 0x8420, 0x0078, 0x135d, 0x200b, 0x0000, 0x74aa, 0x74ae, 0x007c, + 0x0e7e, 0x127e, 0x2091, 0x8000, 0x2071, 0xa600, 0x70ac, 0xa0ea, + 0x0010, 0x00c8, 0x137e, 0xa06e, 0x0078, 0x1388, 0x8001, 0x70ae, + 0x702c, 0x2068, 0x2d04, 0x702e, 0x206b, 0x0000, 0x6807, 0x0000, + 0x127f, 0x0e7f, 0x007c, 0x0e7e, 0x2071, 0xa600, 0x127e, 0x2091, + 0x8000, 0x70ac, 0x8001, 0x00c8, 0x1398, 0xa06e, 0x0078, 0x13a1, + 0x70ae, 0x702c, 0x2068, 0x2d04, 0x702e, 0x206b, 0x0000, 0x6807, + 0x0000, 0x127f, 0x0e7f, 0x007c, 0x0e7e, 0x127e, 0x2091, 0x8000, + 0x2071, 0xa600, 0x702c, 0x206a, 0x2d00, 0x702e, 0x70ac, 0x8000, + 0x70ae, 0x127f, 0x0e7f, 0x007c, 0x8dff, 0x0040, 0x13c0, 0x6804, + 0x6807, 0x0000, 0x007e, 0x1078, 0x13a4, 0x0d7f, 0x0078, 0x13b4, + 0x007c, 0x0e7e, 0x2071, 0xa600, 0x70ac, 0xa08a, 0x0010, 0xa00d, + 0x0e7f, 0x007c, 0x0e7e, 0x2071, 0xa8d6, 0x7007, 0x0000, 0x701b, + 0x0000, 0x701f, 0x0000, 0x2071, 0x0000, 0x7010, 0xa085, 0x8004, + 0x7012, 0x0e7f, 0x007c, 0x127e, 0x2091, 0x8000, 0x0e7e, 0x2270, + 0x700b, 0x0000, 0x2071, 0xa8d6, 0x7018, 0xa088, 0xa8df, 0x220a, + 0x8000, 0xa084, 0x0007, 0x701a, 0x7004, 0xa005, 0x00c0, 0x13f6, + 0x0f7e, 0x2079, 0x0010, 0x1078, 0x1408, 0x0f7f, 0x0e7f, 0x127f, + 0x007c, 0x0e7e, 0x2071, 0xa8d6, 0x7004, 0xa005, 0x00c0, 0x1406, + 0x0f7e, 0x2079, 0x0010, 0x1078, 0x1408, 0x0f7f, 0x0e7f, 0x007c, + 0x7000, 0x0079, 0x140b, 0x140f, 0x1479, 0x1496, 0x1496, 0x7018, + 0x711c, 0xa106, 0x00c0, 0x1417, 0x7007, 0x0000, 0x007c, 0x0d7e, + 0xa180, 0xa8df, 0x2004, 0x700a, 0x2068, 0x8108, 0xa18c, 0x0007, + 0x711e, 0x7803, 0x0026, 0x6824, 0x7832, 0x6828, 0x7836, 0x682c, + 0x783a, 0x6830, 0x783e, 0x6810, 0x700e, 0x680c, 0x7016, 0x6804, + 0x0d7f, 0xd084, 0x0040, 0x1439, 0x7007, 0x0001, 0x1078, 0x143e, + 0x007c, 0x7007, 0x0002, 0x1078, 0x1454, 0x007c, 0x017e, 0x027e, + 0x710c, 0x2011, 0x0040, 0xa182, 0x0040, 0x00c8, 0x1449, 0x2110, + 0xa006, 0x700e, 0x7212, 0x8203, 0x7822, 0x7803, 0x0020, 0x7803, + 0x0041, 0x027f, 0x017f, 0x007c, 0x017e, 0x027e, 0x137e, 0x147e, + 0x157e, 0x7014, 0x2098, 0x20a1, 0x0014, 0x7803, 0x0026, 0x710c, + 0x2011, 0x0040, 0xa182, 0x0040, 0x00c8, 0x1468, 0x2110, 0xa006, + 0x700e, 0x22a8, 0x53a6, 0x8203, 0x7822, 0x7803, 0x0020, 0x3300, + 0x7016, 0x7803, 0x0001, 0x157f, 0x147f, 0x137f, 0x027f, 0x017f, + 0x007c, 0x137e, 0x147e, 0x157e, 0x2099, 0xa6fa, 0x20a1, 0x0018, + 0x20a9, 0x0008, 0x53a3, 0x7803, 0x0020, 0x127e, 0x2091, 0x8000, + 0x7803, 0x0041, 0x7007, 0x0003, 0x7000, 0xc084, 0x7002, 0x700b, + 0xa6f5, 0x127f, 0x157f, 0x147f, 0x137f, 0x007c, 0x137e, 0x147e, + 0x157e, 0x2001, 0xa729, 0x209c, 0x20a1, 0x0014, 0x7803, 0x0026, + 0x2001, 0xa72a, 0x20ac, 0x53a6, 0x2099, 0xa72b, 0x20a1, 0x0018, + 0x20a9, 0x0008, 0x53a3, 0x7803, 0x0020, 0x127e, 0x2091, 0x8000, + 0x7803, 0x0001, 0x7007, 0x0004, 0x7000, 0xc08c, 0x7002, 0x700b, + 0xa726, 0x127f, 0x157f, 0x147f, 0x137f, 0x007c, 0x017e, 0x0e7e, + 0x2071, 0xa8d6, 0x0f7e, 0x2079, 0x0010, 0x7904, 0x7803, 0x0002, + 0xd1fc, 0x0040, 0x14d0, 0xa18c, 0x0700, 0x7004, 0x1079, 0x14d4, + 0x0f7f, 0x0e7f, 0x017f, 0x007c, 0x1408, 0x14dc, 0x1509, 0x1531, + 0x1564, 0x14da, 0x0078, 0x14da, 0xa18c, 0x0700, 0x00c0, 0x1502, + 0x137e, 0x147e, 0x157e, 0x7014, 0x20a0, 0x2099, 0x0014, 0x7803, + 0x0040, 0x7010, 0x20a8, 0x53a5, 0x3400, 0x7016, 0x157f, 0x147f, + 0x137f, 0x700c, 0xa005, 0x0040, 0x151e, 0x1078, 0x143e, 0x007c, + 0x7008, 0xa080, 0x0002, 0x2003, 0x0100, 0x7007, 0x0000, 0x1078, + 0x1408, 0x007c, 0x7008, 0xa080, 0x0002, 0x2003, 0x0200, 0x0078, + 0x14fd, 0xa18c, 0x0700, 0x00c0, 0x1514, 0x700c, 0xa005, 0x0040, + 0x151e, 0x1078, 0x1454, 0x007c, 0x7008, 0xa080, 0x0002, 0x2003, + 0x0200, 0x7007, 0x0000, 0x1078, 0x1408, 0x007c, 0x0d7e, 0x7008, + 0x2068, 0x7830, 0x6826, 0x7834, 0x682a, 0x7838, 0x682e, 0x783c, + 0x6832, 0x680b, 0x0100, 0x0d7f, 0x7007, 0x0000, 0x1078, 0x1408, + 0x007c, 0xa18c, 0x0700, 0x00c0, 0x155e, 0x137e, 0x147e, 0x157e, + 0x2001, 0xa6f8, 0x2004, 0xa080, 0x000d, 0x20a0, 0x2099, 0x0014, + 0x7803, 0x0040, 0x20a9, 0x0020, 0x53a5, 0x2001, 0xa6fa, 0x2004, + 0xd0bc, 0x0040, 0x1554, 0x2001, 0xa703, 0x2004, 0xa080, 0x000d, + 0x20a0, 0x20a9, 0x0020, 0x53a5, 0x157f, 0x147f, 0x137f, 0x7007, + 0x0000, 0x1078, 0x4f8c, 0x1078, 0x1408, 0x007c, 0x2011, 0x8003, + 0x1078, 0x361b, 0x0078, 0x1562, 0xa18c, 0x0700, 0x00c0, 0x1571, + 0x2001, 0xa728, 0x2003, 0x0100, 0x7007, 0x0000, 0x1078, 0x1408, + 0x007c, 0x2011, 0x8004, 0x1078, 0x361b, 0x0078, 0x1575, 0x127e, + 0x2091, 0x2100, 0x2079, 0x0030, 0x2071, 0xa8e7, 0x7803, 0x0004, + 0x7003, 0x0000, 0x700f, 0xa8ed, 0x7013, 0xa8ed, 0x780f, 0x0076, + 0x7803, 0x0004, 0x127f, 0x007c, 0x6934, 0xa184, 0x0007, 0x0079, + 0x1591, 0x1599, 0x15df, 0x1599, 0x1599, 0x1599, 0x15c4, 0x15a8, + 0x159d, 0xa085, 0x0001, 0x0078, 0x15f9, 0x684c, 0xd0bc, 0x0040, + 0x1599, 0x6860, 0x682e, 0x685c, 0x682a, 0x6858, 0x0078, 0x15e7, + 0xa18c, 0x00ff, 0xa186, 0x001e, 0x00c0, 0x1599, 0x684c, 0xd0bc, + 0x0040, 0x1599, 0x6860, 0x682e, 0x685c, 0x682a, 0x6804, 0x681a, + 0xa080, 0x000d, 0x2004, 0xa084, 0x000f, 0xa080, 0x206a, 0x2004, + 0x6832, 0x6858, 0x0078, 0x15ef, 0xa18c, 0x00ff, 0xa186, 0x0015, + 0x00c0, 0x1599, 0x684c, 0xd0ac, 0x0040, 0x1599, 0x6804, 0x681a, + 0xa080, 0x000d, 0x2004, 0xa084, 0x000f, 0xa080, 0x206a, 0x2004, + 0x6832, 0xa006, 0x682e, 0x682a, 0x6858, 0x0078, 0x15ef, 0x684c, + 0xd0ac, 0x0040, 0x1599, 0xa006, 0x682e, 0x682a, 0x6858, 0xa18c, + 0x000f, 0xa188, 0x206a, 0x210c, 0x6932, 0x2d08, 0x691a, 0x6826, + 0x684c, 0xc0dd, 0x684e, 0xa006, 0x680a, 0x697c, 0x6912, 0x6980, + 0x6916, 0x007c, 0x20e1, 0x0007, 0x20e1, 0x2000, 0x2001, 0x020a, + 0x2004, 0x82ff, 0x0040, 0x161c, 0xa280, 0x0004, 0x0d7e, 0x206c, + 0x684c, 0xd0dc, 0x00c0, 0x1618, 0x1078, 0x158c, 0x0040, 0x1618, + 0x0d7f, 0xa280, 0x0000, 0x2003, 0x0002, 0xa016, 0x0078, 0x161c, + 0x6808, 0x8000, 0x680a, 0x0d7f, 0x127e, 0x047e, 0x037e, 0x027e, + 0x2091, 0x2100, 0x027f, 0x037f, 0x047f, 0x7000, 0xa005, 0x00c0, + 0x1630, 0x7206, 0x2001, 0x1651, 0x007e, 0x2260, 0x0078, 0x17e0, + 0x710c, 0x220a, 0x8108, 0x230a, 0x8108, 0x240a, 0x8108, 0xa182, + 0xa908, 0x0048, 0x163d, 0x2009, 0xa8ed, 0x710e, 0x7010, 0xa102, + 0xa082, 0x0009, 0x0040, 0x1648, 0xa080, 0x001b, 0x00c0, 0x164b, + 0x2009, 0x0138, 0x200a, 0x7000, 0xa005, 0x00c0, 0x1651, 0x1078, + 0x17c1, 0x127f, 0x007c, 0x127e, 0x027e, 0x037e, 0x0c7e, 0x007e, + 0x2091, 0x2100, 0x007f, 0x047f, 0x037f, 0x027f, 0x0d7e, 0x0c7e, + 0x2460, 0x6110, 0x2168, 0x6a62, 0x6b5e, 0xa005, 0x0040, 0x16dd, + 0x6808, 0xa005, 0x0040, 0x174a, 0x7000, 0xa005, 0x00c0, 0x1672, + 0x0078, 0x16d2, 0x700c, 0x7110, 0xa106, 0x00c0, 0x1753, 0x7004, + 0xa406, 0x00c0, 0x16d2, 0x2001, 0x0005, 0x2004, 0xd08c, 0x0040, + 0x168f, 0x047e, 0x1078, 0x1913, 0x047f, 0x2460, 0x6010, 0xa080, + 0x0002, 0x2004, 0xa005, 0x0040, 0x174a, 0x0078, 0x166c, 0x2001, + 0x0207, 0x2004, 0xd09c, 0x00c0, 0x167b, 0x7804, 0xa084, 0x6000, + 0x0040, 0x16a0, 0xa086, 0x6000, 0x0040, 0x16a0, 0x0078, 0x167b, + 0x7100, 0xa186, 0x0002, 0x00c0, 0x16c0, 0x0e7e, 0x2b68, 0x6818, + 0x2060, 0x1078, 0x203f, 0x2804, 0xac70, 0x6034, 0xd09c, 0x00c0, + 0x16b5, 0x7108, 0x720c, 0x0078, 0x16b7, 0x7110, 0x7214, 0x6810, + 0xa100, 0x6812, 0x6814, 0xa201, 0x6816, 0x0e7f, 0x0078, 0x16c4, + 0xa186, 0x0001, 0x00c0, 0x16cc, 0x7820, 0x6910, 0xa100, 0x6812, + 0x7824, 0x6914, 0xa101, 0x6816, 0x7803, 0x0004, 0x7003, 0x0000, + 0x7004, 0x2060, 0x6100, 0xa18e, 0x0004, 0x00c0, 0x1753, 0x2009, + 0x0048, 0x1078, 0x775c, 0x0078, 0x1753, 0x6808, 0xa005, 0x0040, + 0x174a, 0x7000, 0xa005, 0x00c0, 0x16e7, 0x0078, 0x174a, 0x700c, + 0x7110, 0xa106, 0x00c0, 0x16f0, 0x7004, 0xa406, 0x00c0, 0x174a, + 0x2001, 0x0005, 0x2004, 0xd08c, 0x0040, 0x1704, 0x047e, 0x1078, + 0x1913, 0x047f, 0x2460, 0x6010, 0xa080, 0x0002, 0x2004, 0xa005, + 0x0040, 0x174a, 0x0078, 0x16e1, 0x2001, 0x0207, 0x2004, 0xd09c, + 0x00c0, 0x16f0, 0x2001, 0x0005, 0x2004, 0xd08c, 0x00c0, 0x16f6, + 0x7804, 0xa084, 0x6000, 0x0040, 0x171b, 0xa086, 0x6000, 0x0040, + 0x171b, 0x0078, 0x16f0, 0x7007, 0x0000, 0xa016, 0x2218, 0x7000, + 0xa08e, 0x0001, 0x0040, 0x173c, 0xa08e, 0x0002, 0x00c0, 0x174a, + 0x0c7e, 0x0e7e, 0x6818, 0x2060, 0x1078, 0x203f, 0x2804, 0xac70, + 0x6034, 0xd09c, 0x00c0, 0x1738, 0x7308, 0x720c, 0x0078, 0x173a, + 0x7310, 0x7214, 0x0e7f, 0x0c7f, 0x7820, 0xa318, 0x7824, 0xa211, + 0x6810, 0xa300, 0x6812, 0x6814, 0xa201, 0x6816, 0x7803, 0x0004, + 0x7003, 0x0000, 0x6100, 0xa18e, 0x0004, 0x00c0, 0x1753, 0x2009, + 0x0048, 0x1078, 0x775c, 0x0c7f, 0x0d7f, 0x127f, 0x007c, 0x0f7e, + 0x0e7e, 0x027e, 0x037e, 0x047e, 0x057e, 0x2071, 0xa8e7, 0x7000, + 0xa086, 0x0000, 0x0040, 0x17ba, 0x7004, 0xac06, 0x00c0, 0x17ab, + 0x2079, 0x0030, 0x7000, 0xa086, 0x0003, 0x0040, 0x17ab, 0x7804, + 0xd0fc, 0x00c0, 0x17a7, 0x20e1, 0x6000, 0x2011, 0x0032, 0x2001, + 0x0208, 0x200c, 0x2001, 0x0209, 0x2004, 0xa106, 0x00c0, 0x176f, + 0x8211, 0x00c0, 0x1777, 0x7804, 0xd0fc, 0x00c0, 0x17a7, 0x1078, + 0x1b22, 0x027e, 0x057e, 0x7803, 0x0004, 0x7804, 0xd0ac, 0x00c0, + 0x178d, 0x7803, 0x0002, 0x7803, 0x0009, 0x7003, 0x0003, 0x7007, + 0x0000, 0x057f, 0x027f, 0x2001, 0x015d, 0x2003, 0x0000, 0x2001, + 0x0160, 0x2502, 0x2001, 0x0138, 0x2202, 0x0078, 0x17ab, 0x1078, + 0x1913, 0x0078, 0x175f, 0x157e, 0x20a9, 0x0009, 0x2009, 0xa8ed, + 0x2104, 0xac06, 0x00c0, 0x17b5, 0x200a, 0xa188, 0x0003, 0x00f0, + 0x17b0, 0x157f, 0x057f, 0x047f, 0x037f, 0x027f, 0x0e7f, 0x0f7f, + 0x007c, 0x700c, 0x7110, 0xa106, 0x00c0, 0x17c9, 0x7003, 0x0000, + 0x007c, 0x2104, 0x7006, 0x2060, 0x8108, 0x211c, 0x8108, 0x2124, + 0x8108, 0xa182, 0xa908, 0x0048, 0x17d7, 0x2009, 0xa8ed, 0x7112, + 0x700c, 0xa106, 0x00c0, 0x17e0, 0x2001, 0x0138, 0x2003, 0x0008, + 0x8cff, 0x00c0, 0x17e7, 0x1078, 0x1b4d, 0x0078, 0x1854, 0x6010, + 0x2068, 0x2d58, 0x6828, 0xa406, 0x00c0, 0x17f2, 0x682c, 0xa306, + 0x0040, 0x182f, 0x601c, 0xa086, 0x0008, 0x0040, 0x182f, 0x6024, + 0xd0f4, 0x00c0, 0x181c, 0xd0d4, 0x0040, 0x1818, 0x6038, 0xa402, + 0x6034, 0xa303, 0x0040, 0x1806, 0x00c8, 0x1818, 0x643a, 0x6336, + 0x6c2a, 0x6b2e, 0x047e, 0x037e, 0x2400, 0x6c7c, 0xa402, 0x6812, + 0x2300, 0x6b80, 0xa303, 0x6816, 0x037f, 0x047f, 0x0078, 0x181c, + 0x1078, 0x9053, 0x0040, 0x17e3, 0x2001, 0xa674, 0x2004, 0xd0b4, + 0x00c0, 0x182b, 0x6018, 0x2004, 0xd0bc, 0x00c0, 0x182b, 0x6817, + 0x7fff, 0x6813, 0xffff, 0x1078, 0x208a, 0x00c0, 0x17e3, 0x0c7e, + 0x7004, 0x2060, 0x6024, 0xc0d4, 0x6026, 0x0c7f, 0x684c, 0xd0f4, + 0x0040, 0x1840, 0x6817, 0xffff, 0x6813, 0xffff, 0x0078, 0x17e3, + 0x6824, 0x2050, 0x6818, 0x2060, 0x6830, 0x2040, 0x6034, 0xa0cc, + 0x000f, 0x2009, 0x0011, 0x1078, 0x1855, 0x0040, 0x1853, 0x2009, + 0x0001, 0x1078, 0x1855, 0x2d58, 0x007c, 0x8aff, 0x0040, 0x18ec, + 0xa03e, 0x2730, 0x6850, 0xd0fc, 0x00c0, 0x1877, 0xd0f4, 0x00c0, + 0x1887, 0x0d7e, 0x2804, 0xac68, 0x2900, 0x0079, 0x1867, 0x18ce, + 0x188e, 0x188e, 0x18ce, 0x18ce, 0x18c6, 0x18ce, 0x188e, 0x18ce, + 0x1894, 0x1894, 0x18ce, 0x18ce, 0x18ce, 0x18bd, 0x1894, 0xc0fc, + 0x6852, 0x6b6c, 0x6a70, 0x6d1c, 0x6c20, 0x0d7e, 0xd99c, 0x0040, + 0x18d1, 0x2804, 0xac68, 0x6f08, 0x6e0c, 0x0078, 0x18d1, 0xc0f4, + 0x6852, 0x6b6c, 0x6a70, 0x0d7e, 0x0078, 0x18d8, 0x6b08, 0x6a0c, + 0x6d00, 0x6c04, 0x0078, 0x18d1, 0x7b0c, 0xd3bc, 0x0040, 0x18b5, + 0x7004, 0x0e7e, 0x2070, 0x701c, 0x0e7f, 0xa086, 0x0008, 0x00c0, + 0x18b5, 0x7b08, 0xa39c, 0x0fff, 0x2d20, 0x0d7f, 0x0d7e, 0x6a14, + 0x82ff, 0x00c0, 0x18b0, 0x6810, 0xa302, 0x0048, 0x18b0, 0x6b10, + 0x2011, 0x0000, 0x2468, 0x0078, 0x18b7, 0x6b10, 0x6a14, 0x6d00, + 0x6c04, 0x6f08, 0x6e0c, 0x0078, 0x18d1, 0x0d7f, 0x0d7e, 0x6834, + 0xa084, 0x00ff, 0xa086, 0x001e, 0x00c0, 0x18ce, 0x0d7f, 0x1078, + 0x2026, 0x00c0, 0x1855, 0xa00e, 0x0078, 0x18ec, 0x0d7f, 0x1078, + 0x1332, 0x7b22, 0x7a26, 0x7d32, 0x7c36, 0x7f3a, 0x7e3e, 0x7902, + 0x7000, 0x8000, 0x7002, 0x0d7f, 0x6828, 0xa300, 0x682a, 0x682c, + 0xa201, 0x682e, 0x2300, 0x6b10, 0xa302, 0x6812, 0x2200, 0x6a14, + 0xa203, 0x6816, 0x1078, 0x2026, 0x007c, 0x1078, 0x1332, 0x1078, + 0x1c97, 0x7004, 0x2060, 0x0d7e, 0x6010, 0x2068, 0x7003, 0x0000, + 0x1078, 0x1af4, 0x1078, 0x8d06, 0x0040, 0x190c, 0x6808, 0x8001, + 0x680a, 0x697c, 0x6912, 0x6980, 0x6916, 0x682b, 0xffff, 0x682f, + 0xffff, 0x6850, 0xc0bd, 0x6852, 0x0d7f, 0x1078, 0x8a01, 0x0078, + 0x1adb, 0x1078, 0x1332, 0x127e, 0x2091, 0x2100, 0x007e, 0x017e, + 0x2b68, 0x6818, 0x2060, 0x7904, 0x7803, 0x0002, 0xa184, 0x0700, + 0x00c0, 0x18ef, 0xa184, 0x0003, 0xa086, 0x0003, 0x0040, 0x1911, + 0x7000, 0x0079, 0x192b, 0x1933, 0x1935, 0x1a34, 0x1ab2, 0x1ac9, + 0x1933, 0x1933, 0x1933, 0x1078, 0x1332, 0x8001, 0x7002, 0xa184, + 0x0880, 0x00c0, 0x194a, 0x8aff, 0x0040, 0x19d4, 0x2009, 0x0001, + 0x1078, 0x1855, 0x0040, 0x1adb, 0x2009, 0x0001, 0x1078, 0x1855, + 0x0078, 0x1adb, 0x7803, 0x0004, 0x7003, 0x0000, 0xd1bc, 0x00c0, + 0x19b2, 0x027e, 0x037e, 0x017e, 0x7808, 0xd0ec, 0x00c0, 0x1962, + 0x7c20, 0x7d24, 0x7e30, 0x7f34, 0x7803, 0x0009, 0x7003, 0x0004, + 0x0078, 0x1964, 0x1078, 0x1bd7, 0x017f, 0xd194, 0x0040, 0x196b, + 0x8aff, 0x0040, 0x19a1, 0x6b28, 0x6a2c, 0x2400, 0x686e, 0xa31a, + 0x2500, 0x6872, 0xa213, 0x6b2a, 0x6a2e, 0x0c7e, 0x7004, 0x2060, + 0x6024, 0xd0f4, 0x00c0, 0x197e, 0x633a, 0x6236, 0x0c7f, 0x2400, + 0x6910, 0xa100, 0x6812, 0x2500, 0x6914, 0xa101, 0x6816, 0x037f, + 0x027f, 0x2600, 0x681e, 0x2700, 0x6822, 0x1078, 0x203f, 0x2a00, + 0x6826, 0x2c00, 0x681a, 0x2800, 0x6832, 0x6850, 0xc0fd, 0x6852, + 0x6808, 0x8001, 0x680a, 0x00c0, 0x19a7, 0x684c, 0xd0e4, 0x0040, + 0x19a7, 0x7004, 0x2060, 0x2009, 0x0048, 0x1078, 0x775c, 0x7000, + 0xa086, 0x0004, 0x0040, 0x1adb, 0x7003, 0x0000, 0x1078, 0x17c1, + 0x0078, 0x1adb, 0x057e, 0x7d0c, 0xd5bc, 0x00c0, 0x19b9, 0x1078, + 0xa57e, 0x057f, 0x1078, 0x1af4, 0x0f7e, 0x7004, 0x2078, 0x1078, + 0x4963, 0x0040, 0x19c6, 0x7824, 0xc0f5, 0x7826, 0x0f7f, 0x682b, + 0xffff, 0x682f, 0xffff, 0x6808, 0x8001, 0x680a, 0x697c, 0x6912, + 0x6980, 0x6916, 0x0078, 0x1adb, 0x7004, 0x0c7e, 0x2060, 0x6024, + 0x0c7f, 0xd0f4, 0x0040, 0x19e1, 0x6808, 0x8001, 0x680a, 0x0078, + 0x19f5, 0x684c, 0xc0f5, 0x684e, 0x7814, 0xa005, 0x00c0, 0x19f9, + 0x7003, 0x0000, 0x6808, 0x8001, 0x680a, 0x00c0, 0x19f5, 0x7004, + 0x2060, 0x2009, 0x0048, 0x1078, 0x775c, 0x1078, 0x17c1, 0x0078, + 0x1adb, 0x7814, 0x6910, 0xa102, 0x6812, 0x6914, 0xa183, 0x0000, + 0x6816, 0x7814, 0x7908, 0xa18c, 0x0fff, 0xa192, 0x0841, 0x00c8, + 0x18ef, 0xa188, 0x0007, 0x8114, 0x8214, 0x8214, 0xa10a, 0x8104, + 0x8004, 0x8004, 0xa20a, 0x810b, 0x810b, 0x810b, 0x1078, 0x1b5e, + 0x7803, 0x0004, 0x780f, 0xffff, 0x7803, 0x0001, 0x7804, 0xd0fc, + 0x0040, 0x1a1e, 0x7803, 0x0002, 0x7803, 0x0004, 0x780f, 0x0076, + 0x7004, 0x7007, 0x0000, 0x2060, 0x2009, 0x0048, 0x1078, 0x775c, + 0x1078, 0x1b92, 0x0040, 0x19f5, 0x8001, 0x7002, 0xd194, 0x0040, + 0x1a46, 0x7804, 0xd0fc, 0x00c0, 0x191b, 0x8aff, 0x0040, 0x1adb, + 0x2009, 0x0001, 0x1078, 0x1855, 0x0078, 0x1adb, 0xa184, 0x0880, + 0x00c0, 0x1a53, 0x8aff, 0x0040, 0x1adb, 0x2009, 0x0001, 0x1078, + 0x1855, 0x0078, 0x1adb, 0x7803, 0x0004, 0x7003, 0x0000, 0xd1bc, + 0x00c0, 0x1a93, 0x027e, 0x037e, 0x7808, 0xd0ec, 0x00c0, 0x1a66, + 0x7803, 0x0009, 0x7003, 0x0004, 0x0078, 0x1a68, 0x1078, 0x1bd7, + 0x6b28, 0x6a2c, 0x1078, 0x203f, 0x0d7e, 0x0f7e, 0x2d78, 0x2804, + 0xac68, 0x6034, 0xd09c, 0x00c0, 0x1a83, 0x6808, 0x2008, 0xa31a, + 0x680c, 0xa213, 0x7810, 0xa100, 0x7812, 0x690c, 0x7814, 0xa101, + 0x7816, 0x0078, 0x1a8f, 0x6810, 0x2008, 0xa31a, 0x6814, 0xa213, + 0x7810, 0xa100, 0x7812, 0x6914, 0x7814, 0xa101, 0x7816, 0x0f7f, + 0x0d7f, 0x0078, 0x196d, 0x057e, 0x7d0c, 0x1078, 0xa57e, 0x057f, + 0x1078, 0x1af4, 0x0f7e, 0x7004, 0x2078, 0x1078, 0x4963, 0x0040, + 0x1aa4, 0x7824, 0xc0f5, 0x7826, 0x0f7f, 0x682b, 0xffff, 0x682f, + 0xffff, 0x6808, 0x8001, 0x680a, 0x697c, 0x6912, 0x6980, 0x6916, + 0x0078, 0x1adb, 0x7803, 0x0004, 0x7003, 0x0000, 0x7004, 0xa00d, + 0x0040, 0x1ac5, 0x6808, 0x8001, 0x680a, 0x00c0, 0x1ac5, 0x7004, + 0x2060, 0x2009, 0x0048, 0x1078, 0x775c, 0x1078, 0x17c1, 0x0078, + 0x1adb, 0x7803, 0x0004, 0x7003, 0x0000, 0x7004, 0x2060, 0x6010, + 0xa005, 0x0040, 0x1ac5, 0x2068, 0x6808, 0x8000, 0x680a, 0x6c28, + 0x6b2c, 0x1078, 0x17e0, 0x017f, 0x007f, 0x127f, 0x007c, 0x127e, + 0x2091, 0x2100, 0x7000, 0xa086, 0x0003, 0x00c0, 0x1af2, 0x700c, + 0x7110, 0xa106, 0x0040, 0x1af2, 0x20e1, 0x9028, 0x700f, 0xa8ed, + 0x7013, 0xa8ed, 0x127f, 0x007c, 0x0c7e, 0x1078, 0x1b22, 0x20e1, + 0x9028, 0x700c, 0x7110, 0xa106, 0x0040, 0x1b19, 0x2104, 0xa005, + 0x0040, 0x1b08, 0x2060, 0x6010, 0x2060, 0x6008, 0x8001, 0x600a, + 0xa188, 0x0003, 0xa182, 0xa908, 0x0048, 0x1b10, 0x2009, 0xa8ed, + 0x7112, 0x700c, 0xa106, 0x00c0, 0x1af9, 0x2011, 0x0008, 0x0078, + 0x1af9, 0x2001, 0x015d, 0x2003, 0x0000, 0x2001, 0x0138, 0x2202, + 0x0c7f, 0x007c, 0x2001, 0x0138, 0x2014, 0x2003, 0x0000, 0x2021, + 0xb015, 0x2001, 0x0141, 0x201c, 0xd3dc, 0x00c0, 0x1b3f, 0x2001, + 0x0109, 0x201c, 0xa39c, 0x0048, 0x00c0, 0x1b3f, 0x2001, 0x0111, + 0x201c, 0x83ff, 0x00c0, 0x1b3f, 0x8421, 0x00c0, 0x1b29, 0x007c, + 0x2011, 0x0201, 0x2009, 0x003c, 0x2204, 0xa005, 0x00c0, 0x1b4c, + 0x8109, 0x00c0, 0x1b44, 0x007c, 0x007c, 0x1078, 0x1b40, 0x0040, + 0x1b55, 0x780c, 0xd0a4, 0x0040, 0x1b5b, 0x1078, 0x1af4, 0xa085, + 0x0001, 0x0078, 0x1b5d, 0x1078, 0x1b92, 0x007c, 0x0e7e, 0x2071, + 0x0200, 0x7808, 0xa084, 0xf000, 0xa10d, 0x1078, 0x1b22, 0x2019, + 0x5000, 0x8319, 0x0040, 0x1b7c, 0x2001, 0xa908, 0x2004, 0xa086, + 0x0000, 0x0040, 0x1b7c, 0x2001, 0x0021, 0xd0fc, 0x0040, 0x1b69, + 0x1078, 0x1eaa, 0x0078, 0x1b67, 0x20e1, 0x7000, 0x7324, 0x7420, + 0x7028, 0x7028, 0x7426, 0x7037, 0x0001, 0x810f, 0x712e, 0x702f, + 0x0100, 0x7037, 0x0008, 0x7326, 0x7422, 0x2001, 0x0138, 0x2202, + 0x0e7f, 0x007c, 0x027e, 0x2001, 0x015d, 0x2001, 0x0000, 0x7908, + 0xa18c, 0x0fff, 0xa182, 0x0ffd, 0x0048, 0x1ba0, 0x2009, 0x0000, + 0xa190, 0x0007, 0xa294, 0x1ff8, 0x8214, 0x8214, 0x8214, 0x2001, + 0x020a, 0x82ff, 0x0040, 0x1bb5, 0x20e1, 0x6000, 0x200c, 0x200c, + 0x200c, 0x200c, 0x8211, 0x00c0, 0x1bae, 0x20e1, 0x7000, 0x200c, + 0x200c, 0x7003, 0x0000, 0x20e1, 0x6000, 0x2001, 0x0208, 0x200c, + 0x2001, 0x0209, 0x2004, 0xa106, 0x0040, 0x1bd4, 0x1078, 0x1b40, + 0x0040, 0x1bd2, 0x7908, 0xd1ec, 0x00c0, 0x1bd4, 0x790c, 0xd1a4, + 0x0040, 0x1b97, 0x1078, 0x1af4, 0xa006, 0x027f, 0x007c, 0x7c20, + 0x7d24, 0x7e30, 0x7f34, 0x700c, 0x7110, 0xa106, 0x0040, 0x1c69, + 0x7004, 0x017e, 0x210c, 0xa106, 0x017f, 0x0040, 0x1c69, 0x0d7e, + 0x0c7e, 0x216c, 0x2d00, 0xa005, 0x0040, 0x1c67, 0x681c, 0xa086, + 0x0008, 0x0040, 0x1c67, 0x6824, 0xd0d4, 0x00c0, 0x1c67, 0x6810, + 0x2068, 0x6850, 0xd0fc, 0x0040, 0x1c29, 0x8108, 0x2104, 0x6b2c, + 0xa306, 0x00c0, 0x1c67, 0x8108, 0x2104, 0x6a28, 0xa206, 0x00c0, + 0x1c67, 0x6850, 0xc0fc, 0xc0f5, 0x6852, 0x686c, 0x7822, 0x6870, + 0x7826, 0x681c, 0x7832, 0x6820, 0x7836, 0x6818, 0x2060, 0x6034, + 0xd09c, 0x0040, 0x1c24, 0x6830, 0x2004, 0xac68, 0x6808, 0x783a, + 0x680c, 0x783e, 0x0078, 0x1c65, 0xa006, 0x783a, 0x783e, 0x0078, + 0x1c65, 0x8108, 0x2104, 0xa005, 0x00c0, 0x1c67, 0x6b2c, 0xa306, + 0x00c0, 0x1c67, 0x8108, 0x2104, 0xa005, 0x00c0, 0x1c67, 0x6a28, + 0xa206, 0x00c0, 0x1c67, 0x6850, 0xc0f5, 0x6852, 0x6830, 0x2004, + 0x6918, 0xa160, 0xa180, 0x000d, 0x2004, 0xd09c, 0x00c0, 0x1c57, + 0x6008, 0x7822, 0x686e, 0x600c, 0x7826, 0x6872, 0x6000, 0x7832, + 0x6004, 0x7836, 0xa006, 0x783a, 0x783e, 0x0078, 0x1c65, 0x6010, + 0x7822, 0x686e, 0x6014, 0x7826, 0x6872, 0x6000, 0x7832, 0x6004, + 0x7836, 0x6008, 0x783a, 0x600c, 0x783e, 0x7803, 0x0011, 0x0c7f, + 0x0d7f, 0x007c, 0x0f7e, 0x0e7e, 0x017e, 0x027e, 0x2071, 0xa8e7, + 0x2079, 0x0030, 0x2011, 0x0050, 0x7000, 0xa086, 0x0000, 0x0040, + 0x1c92, 0x8211, 0x0040, 0x1c90, 0x2001, 0x0005, 0x2004, 0xd08c, + 0x0040, 0x1c79, 0x7904, 0xa18c, 0x0780, 0x017e, 0x1078, 0x1913, + 0x017f, 0x81ff, 0x00c0, 0x1c90, 0x2011, 0x0050, 0x0078, 0x1c74, + 0xa085, 0x0001, 0x027f, 0x017f, 0x0e7f, 0x0f7f, 0x007c, 0x7803, + 0x0004, 0x2009, 0x0064, 0x7804, 0xd0ac, 0x0040, 0x1ce8, 0x8109, + 0x00c0, 0x1c9b, 0x2009, 0x0100, 0x210c, 0xa18a, 0x0003, 0x1048, + 0x1332, 0x1078, 0x1fca, 0x0e7e, 0x0f7e, 0x2071, 0xa8d6, 0x2079, + 0x0010, 0x7004, 0xa086, 0x0000, 0x0040, 0x1ce0, 0x7800, 0x007e, + 0x7820, 0x007e, 0x7830, 0x007e, 0x7834, 0x007e, 0x7838, 0x007e, + 0x783c, 0x007e, 0x7803, 0x0004, 0x7823, 0x0000, 0x0005, 0x0005, + 0x2079, 0x0030, 0x7804, 0xd0ac, 0x10c0, 0x1332, 0x2079, 0x0010, + 0x007f, 0x783e, 0x007f, 0x783a, 0x007f, 0x7836, 0x007f, 0x7832, + 0x007f, 0x7822, 0x007f, 0x7802, 0x0f7f, 0x0e7f, 0x0078, 0x1ce6, + 0x0f7f, 0x0e7f, 0x7804, 0xd0ac, 0x10c0, 0x1332, 0x1078, 0x639b, + 0x007c, 0x0e7e, 0x2071, 0xa908, 0x7003, 0x0000, 0x0e7f, 0x007c, + 0x0d7e, 0xa280, 0x0004, 0x206c, 0x694c, 0xd1dc, 0x00c0, 0x1d6b, + 0x6934, 0xa184, 0x0007, 0x0079, 0x1cfd, 0x1d05, 0x1d56, 0x1d05, + 0x1d05, 0x1d05, 0x1d3b, 0x1d18, 0x1d07, 0x1078, 0x1332, 0x684c, + 0xd0b4, 0x0040, 0x1e79, 0x6860, 0x682e, 0x6816, 0x685c, 0x682a, + 0x6812, 0x687c, 0x680a, 0x6880, 0x680e, 0x6958, 0x0078, 0x1d5e, + 0x6834, 0xa084, 0x00ff, 0xa086, 0x001e, 0x00c0, 0x1d05, 0x684c, + 0xd0b4, 0x0040, 0x1e79, 0x6860, 0x682e, 0x6816, 0x685c, 0x682a, + 0x6812, 0x687c, 0x680a, 0x6880, 0x680e, 0x6804, 0x681a, 0xa080, + 0x000d, 0x2004, 0xa084, 0x000f, 0xa080, 0x206a, 0x2004, 0x6832, + 0x6958, 0x0078, 0x1d67, 0xa18c, 0x00ff, 0xa186, 0x0015, 0x00c0, + 0x1d6b, 0x684c, 0xd0b4, 0x0040, 0x1e79, 0x6804, 0x681a, 0xa080, + 0x000d, 0x2004, 0xa084, 0x000f, 0xa080, 0x206a, 0x2004, 0x6832, + 0x6958, 0xa006, 0x682e, 0x682a, 0x0078, 0x1d67, 0x684c, 0xd0b4, + 0x0040, 0x18ed, 0x6958, 0xa006, 0x682e, 0x682a, 0x2d00, 0x681a, + 0x6834, 0xa084, 0x000f, 0xa080, 0x206a, 0x2004, 0x6832, 0x6926, + 0x684c, 0xc0dd, 0x684e, 0x0d7f, 0x007c, 0x0f7e, 0x2079, 0x0020, + 0x7804, 0xd0fc, 0x10c0, 0x1eaa, 0x0e7e, 0x0d7e, 0x2071, 0xa908, + 0x7000, 0xa005, 0x00c0, 0x1df0, 0x0c7e, 0x7206, 0xa280, 0x0004, + 0x205c, 0x7004, 0x2068, 0x7803, 0x0004, 0x6818, 0x0d7e, 0x2068, + 0x686c, 0x7812, 0x6890, 0x0f7e, 0x20e1, 0x9040, 0x2079, 0x0200, + 0x781a, 0x2079, 0x0100, 0x8004, 0x78d6, 0x0f7f, 0x0d7f, 0x2b68, + 0x6824, 0x2050, 0x6818, 0x2060, 0x6830, 0x2040, 0x6034, 0xa0cc, + 0x000f, 0x6908, 0x2001, 0x04fd, 0x2004, 0xa086, 0x0007, 0x0040, + 0x1db2, 0xa184, 0x0007, 0x0040, 0x1db2, 0x017e, 0x2009, 0x0008, + 0xa102, 0x017f, 0xa108, 0x791a, 0x7116, 0x701e, 0x680c, 0xa081, + 0x0000, 0x781e, 0x701a, 0xa006, 0x700e, 0x7012, 0x7004, 0x692c, + 0x6814, 0xa106, 0x00c0, 0x1dc9, 0x6928, 0x6810, 0xa106, 0x0040, + 0x1dd6, 0x037e, 0x047e, 0x6b14, 0x6c10, 0x1078, 0x208a, 0x047f, + 0x037f, 0x0040, 0x1dd6, 0x0c7f, 0x0078, 0x1df0, 0x8aff, 0x00c0, + 0x1dde, 0x0c7f, 0xa085, 0x0001, 0x0078, 0x1df0, 0x127e, 0x2091, + 0x8000, 0x2079, 0x0020, 0x2009, 0x0001, 0x1078, 0x1df4, 0x0040, + 0x1ded, 0x2009, 0x0001, 0x1078, 0x1df4, 0x127f, 0x0c7f, 0xa006, + 0x0d7f, 0x0e7f, 0x0f7f, 0x007c, 0x077e, 0x067e, 0x057e, 0x047e, + 0x037e, 0x027e, 0x8aff, 0x0040, 0x1e72, 0x700c, 0x7214, 0xa23a, + 0x7010, 0x7218, 0xa203, 0x0048, 0x1e71, 0xa705, 0x0040, 0x1e71, + 0xa03e, 0x2730, 0x6850, 0xd0fc, 0x00c0, 0x1e24, 0x0d7e, 0x2804, + 0xac68, 0x2900, 0x0079, 0x1e14, 0x1e53, 0x1e34, 0x1e34, 0x1e53, + 0x1e53, 0x1e4b, 0x1e53, 0x1e34, 0x1e53, 0x1e3a, 0x1e3a, 0x1e53, + 0x1e53, 0x1e53, 0x1e42, 0x1e3a, 0xc0fc, 0x6852, 0x6b6c, 0x6a70, + 0x6d1c, 0x6c20, 0xd99c, 0x0040, 0x1e57, 0x0d7e, 0x2804, 0xac68, + 0x6f08, 0x6e0c, 0x0078, 0x1e56, 0x6b08, 0x6a0c, 0x6d00, 0x6c04, + 0x0078, 0x1e56, 0x6b10, 0x6a14, 0x6d00, 0x6c04, 0x6f08, 0x6e0c, + 0x0078, 0x1e56, 0x0d7f, 0x0d7e, 0x6834, 0xa084, 0x00ff, 0xa086, + 0x001e, 0x00c0, 0x1e53, 0x0d7f, 0x1078, 0x2026, 0x00c0, 0x1dfa, + 0xa00e, 0x0078, 0x1e72, 0x0d7f, 0x1078, 0x1332, 0x0d7f, 0x7b22, + 0x7a26, 0x7d32, 0x7c36, 0x7f3a, 0x7e3e, 0x7902, 0x7000, 0x8000, + 0x7002, 0x6828, 0xa300, 0x682a, 0x682c, 0xa201, 0x682e, 0x700c, + 0xa300, 0x700e, 0x7010, 0xa201, 0x7012, 0x1078, 0x2026, 0x0078, + 0x1e72, 0xa006, 0x027f, 0x037f, 0x047f, 0x057f, 0x067f, 0x077f, + 0x007c, 0x1078, 0x1332, 0x027e, 0x2001, 0x0105, 0x2003, 0x0010, + 0x20e1, 0x9040, 0x7803, 0x0004, 0x7003, 0x0000, 0x7004, 0x2060, + 0x0d7e, 0x6010, 0x2068, 0x1078, 0x8d06, 0x0040, 0x1e92, 0x6850, + 0xc0bd, 0x6852, 0x0d7f, 0x0c7e, 0x1078, 0x8a01, 0x0c7f, 0x2001, + 0xa8c0, 0x2004, 0xac06, 0x00c0, 0x1ea7, 0x20e1, 0x9040, 0x1078, + 0x738a, 0x2011, 0x0000, 0x1078, 0x70ea, 0x1078, 0x639b, 0x027f, + 0x0078, 0x1f76, 0x127e, 0x2091, 0x2200, 0x007e, 0x017e, 0x0f7e, + 0x0e7e, 0x0d7e, 0x0c7e, 0x2079, 0x0020, 0x2071, 0xa908, 0x2b68, + 0x6818, 0x2060, 0x7904, 0x7803, 0x0002, 0xa184, 0x0700, 0x00c0, + 0x1e7b, 0x7000, 0x0079, 0x1ec4, 0x1f76, 0x1ec8, 0x1f43, 0x1f74, + 0x8001, 0x7002, 0xd19c, 0x00c0, 0x1edc, 0x8aff, 0x0040, 0x1efb, + 0x2009, 0x0001, 0x1078, 0x1df4, 0x0040, 0x1f76, 0x2009, 0x0001, + 0x1078, 0x1df4, 0x0078, 0x1f76, 0x7803, 0x0004, 0xd194, 0x0040, + 0x1eec, 0x6850, 0xc0fc, 0x6852, 0x8aff, 0x00c0, 0x1ef1, 0x684c, + 0xc0f5, 0x684e, 0x0078, 0x1ef1, 0x1078, 0x203f, 0x6850, 0xc0fd, + 0x6852, 0x2a00, 0x6826, 0x2c00, 0x681a, 0x2800, 0x6832, 0x7003, + 0x0000, 0x0078, 0x1f76, 0x711c, 0x81ff, 0x0040, 0x1f11, 0x7918, + 0x7922, 0x7827, 0x0000, 0x7803, 0x0001, 0x7000, 0x8000, 0x7002, + 0x700c, 0xa100, 0x700e, 0x7010, 0xa081, 0x0000, 0x7012, 0x0078, + 0x1f76, 0x0f7e, 0x027e, 0x781c, 0x007e, 0x7818, 0x007e, 0x2079, + 0x0100, 0x7a14, 0xa284, 0x0004, 0xa085, 0x0012, 0x7816, 0x037e, + 0x2019, 0x1000, 0x8319, 0x1040, 0x1332, 0x7820, 0xd0bc, 0x00c0, + 0x1f22, 0x037f, 0x79c8, 0x007f, 0xa102, 0x017f, 0x007e, 0x017e, + 0x79c4, 0x007f, 0xa103, 0x78c6, 0x007f, 0x78ca, 0xa284, 0x0004, + 0xa085, 0x0012, 0x7816, 0x027f, 0x0f7f, 0x7803, 0x0008, 0x7003, + 0x0000, 0x0078, 0x1f76, 0x8001, 0x7002, 0xd194, 0x0040, 0x1f58, + 0x7804, 0xd0fc, 0x00c0, 0x1eba, 0xd19c, 0x00c0, 0x1f72, 0x8aff, + 0x0040, 0x1f76, 0x2009, 0x0001, 0x1078, 0x1df4, 0x0078, 0x1f76, + 0x027e, 0x037e, 0x6b28, 0x6a2c, 0x1078, 0x203f, 0x0d7e, 0x2804, + 0xac68, 0x6034, 0xd09c, 0x00c0, 0x1f6b, 0x6808, 0xa31a, 0x680c, + 0xa213, 0x0078, 0x1f6f, 0x6810, 0xa31a, 0x6814, 0xa213, 0x0d7f, + 0x0078, 0x1eec, 0x0078, 0x1eec, 0x1078, 0x1332, 0x0c7f, 0x0d7f, + 0x0e7f, 0x0f7f, 0x017f, 0x007f, 0x127f, 0x007c, 0x0f7e, 0x0e7e, + 0x2071, 0xa908, 0x7000, 0xa086, 0x0000, 0x0040, 0x1fc7, 0x2079, + 0x0020, 0x017e, 0x2009, 0x0207, 0x210c, 0xd194, 0x0040, 0x1fa4, + 0x2009, 0x020c, 0x210c, 0xa184, 0x0003, 0x0040, 0x1fa4, 0x1078, + 0xa5d2, 0x2001, 0x0133, 0x2004, 0xa005, 0x1040, 0x1332, 0x20e1, + 0x9040, 0x2001, 0x020c, 0x2102, 0x2009, 0x0206, 0x2104, 0x2009, + 0x0203, 0x210c, 0xa106, 0x00c0, 0x1faf, 0x20e1, 0x9040, 0x7804, + 0xd0fc, 0x0040, 0x1f8a, 0x1078, 0x1eaa, 0x7000, 0xa086, 0x0000, + 0x00c0, 0x1f8a, 0x017f, 0x7803, 0x0004, 0x7804, 0xd0ac, 0x00c0, + 0x1fbd, 0x20e1, 0x9040, 0x7803, 0x0002, 0x7003, 0x0000, 0x0e7f, + 0x0f7f, 0x007c, 0x027e, 0x0c7e, 0x0d7e, 0x0e7e, 0x0f7e, 0x2071, + 0xa908, 0x2079, 0x0020, 0x7000, 0xa086, 0x0000, 0x0040, 0x2003, + 0x7004, 0x2060, 0x6010, 0x2068, 0x1078, 0x8d06, 0x0040, 0x1fed, + 0x6850, 0xc0b5, 0x6852, 0x680c, 0x7a1c, 0xa206, 0x00c0, 0x1fed, + 0x6808, 0x7a18, 0xa206, 0x0040, 0x2009, 0x2001, 0x0105, 0x2003, + 0x0010, 0x20e1, 0x9040, 0x7803, 0x0004, 0x7003, 0x0000, 0x7004, + 0x2060, 0x1078, 0x8a01, 0x20e1, 0x9040, 0x1078, 0x738a, 0x2011, + 0x0000, 0x1078, 0x70ea, 0x0f7f, 0x0e7f, 0x0d7f, 0x0c7f, 0x027f, + 0x007c, 0x6810, 0x6a14, 0xa205, 0x00c0, 0x1fed, 0x684c, 0xc0dc, + 0x684e, 0x2c10, 0x1078, 0x1cf0, 0x2001, 0x0105, 0x2003, 0x0010, + 0x20e1, 0x9040, 0x7803, 0x0004, 0x7003, 0x0000, 0x2069, 0xa8b1, + 0x6833, 0x0000, 0x683f, 0x0000, 0x0078, 0x2003, 0x8840, 0x2804, + 0xa005, 0x00c0, 0x203a, 0x6004, 0xa005, 0x0040, 0x203c, 0x681a, + 0x2060, 0x6034, 0xa084, 0x000f, 0xa080, 0x206a, 0x2044, 0x88ff, + 0x1040, 0x1332, 0x8a51, 0x007c, 0x2051, 0x0000, 0x007c, 0x8a50, + 0x8841, 0x2804, 0xa005, 0x00c0, 0x2059, 0x2c00, 0xad06, 0x0040, + 0x204e, 0x6000, 0xa005, 0x00c0, 0x204e, 0x2d00, 0x2060, 0x681a, + 0x6034, 0xa084, 0x000f, 0xa080, 0x207a, 0x2044, 0x88ff, 0x1040, + 0x1332, 0x007c, 0x0000, 0x0011, 0x0015, 0x0019, 0x001d, 0x0021, + 0x0025, 0x0029, 0x0000, 0x000f, 0x0015, 0x001b, 0x0021, 0x0027, + 0x0000, 0x0000, 0x0000, 0x205f, 0x205b, 0x0000, 0x0000, 0x2069, + 0x0000, 0x205f, 0x0000, 0x2066, 0x2063, 0x0000, 0x0000, 0x0000, + 0x2069, 0x2066, 0x0000, 0x2061, 0x2061, 0x0000, 0x0000, 0x2069, + 0x0000, 0x2061, 0x0000, 0x2067, 0x2067, 0x0000, 0x0000, 0x0000, + 0x2069, 0x2067, 0x0a7e, 0x097e, 0x087e, 0x6b2e, 0x6c2a, 0x6858, + 0xa055, 0x0040, 0x212d, 0x2d60, 0x6034, 0xa0cc, 0x000f, 0xa9c0, + 0x206a, 0xa986, 0x0007, 0x0040, 0x20a5, 0xa986, 0x000e, 0x0040, + 0x20a5, 0xa986, 0x000f, 0x00c0, 0x20a9, 0x605c, 0xa422, 0x6060, + 0xa31a, 0x2804, 0xa045, 0x00c0, 0x20b7, 0x0050, 0x20b1, 0x0078, + 0x212d, 0x6004, 0xa065, 0x0040, 0x212d, 0x0078, 0x2094, 0x2804, + 0xa005, 0x0040, 0x20d5, 0xac68, 0xd99c, 0x00c0, 0x20c5, 0x6808, + 0xa422, 0x680c, 0xa31b, 0x0078, 0x20c9, 0x6810, 0xa422, 0x6814, + 0xa31b, 0x0048, 0x20f4, 0x2300, 0xa405, 0x0040, 0x20db, 0x8a51, + 0x0040, 0x212d, 0x8840, 0x0078, 0x20b7, 0x6004, 0xa065, 0x0040, + 0x212d, 0x0078, 0x2094, 0x8a51, 0x0040, 0x212d, 0x8840, 0x2804, + 0xa005, 0x00c0, 0x20ee, 0x6004, 0xa065, 0x0040, 0x212d, 0x6034, + 0xa0cc, 0x000f, 0xa9c0, 0x206a, 0x2804, 0x2040, 0x2b68, 0x6850, + 0xc0fc, 0x6852, 0x0078, 0x2121, 0x8422, 0x8420, 0x831a, 0xa399, + 0x0000, 0x0d7e, 0x2b68, 0x6c6e, 0x6b72, 0x0d7f, 0xd99c, 0x00c0, + 0x210f, 0x6908, 0x2400, 0xa122, 0x690c, 0x2300, 0xa11b, 0x1048, + 0x1332, 0x6800, 0xa420, 0x6804, 0xa319, 0x0078, 0x211b, 0x6910, + 0x2400, 0xa122, 0x6914, 0x2300, 0xa11b, 0x1048, 0x1332, 0x6800, + 0xa420, 0x6804, 0xa319, 0x2b68, 0x6c1e, 0x6b22, 0x6850, 0xc0fd, + 0x6852, 0x2c00, 0x681a, 0x2800, 0x6832, 0x2a00, 0x6826, 0x007f, + 0x007f, 0x007f, 0xa006, 0x0078, 0x2132, 0x087f, 0x097f, 0x0a7f, + 0xa085, 0x0001, 0x007c, 0x2001, 0x0005, 0x2004, 0xa084, 0x0007, + 0x0079, 0x213a, 0x2142, 0x2143, 0x2146, 0x2149, 0x214e, 0x2151, + 0x2156, 0x215b, 0x007c, 0x1078, 0x1eaa, 0x007c, 0x1078, 0x1913, + 0x007c, 0x1078, 0x1913, 0x1078, 0x1eaa, 0x007c, 0x1078, 0x14be, + 0x007c, 0x1078, 0x1eaa, 0x1078, 0x14be, 0x007c, 0x1078, 0x1913, + 0x1078, 0x14be, 0x007c, 0x1078, 0x1913, 0x1078, 0x1eaa, 0x1078, + 0x14be, 0x007c, 0x127e, 0x2091, 0x2300, 0x2079, 0x0200, 0x2071, + 0xab80, 0x2069, 0xa600, 0x2009, 0x0004, 0x7912, 0x7817, 0x0004, + 0x1078, 0x251f, 0x781b, 0x0002, 0x20e1, 0x8700, 0x127f, 0x007c, + 0x127e, 0x2091, 0x2300, 0x781c, 0xa084, 0x0007, 0x0079, 0x2180, + 0x21a4, 0x2188, 0x218c, 0x2190, 0x2196, 0x219a, 0x219e, 0x21a2, + 0x1078, 0x548e, 0x0078, 0x21a4, 0x1078, 0x54da, 0x0078, 0x21a4, + 0x1078, 0x548e, 0x1078, 0x54da, 0x0078, 0x21a4, 0x1078, 0x21a6, + 0x0078, 0x21a4, 0x1078, 0x21a6, 0x0078, 0x21a4, 0x1078, 0x21a6, + 0x0078, 0x21a4, 0x1078, 0x21a6, 0x127f, 0x007c, 0x007e, 0x017e, + 0x027e, 0x1078, 0xa5d2, 0x7930, 0xa184, 0x0003, 0x0040, 0x21c9, + 0x2001, 0xa8c0, 0x2004, 0xa005, 0x0040, 0x21c5, 0x2001, 0x0133, + 0x2004, 0xa005, 0x1040, 0x1332, 0x0c7e, 0x2001, 0xa8c0, 0x2064, + 0x1078, 0x8a01, 0x0c7f, 0x0078, 0x21f2, 0x20e1, 0x9040, 0x0078, + 0x21f2, 0xa184, 0x0030, 0x0040, 0x21da, 0x6a00, 0xa286, 0x0003, + 0x00c0, 0x21d4, 0x0078, 0x21d6, 0x1078, 0x4224, 0x20e1, 0x9010, + 0x0078, 0x21f2, 0xa184, 0x00c0, 0x0040, 0x21ec, 0x0e7e, 0x037e, + 0x047e, 0x057e, 0x2071, 0xa8e7, 0x1078, 0x1af4, 0x057f, 0x047f, + 0x037f, 0x0e7f, 0x0078, 0x21f2, 0xa184, 0x0300, 0x0040, 0x21f2, + 0x20e1, 0x9020, 0x7932, 0x027f, 0x017f, 0x007f, 0x007c, 0x017e, + 0x0e7e, 0x0f7e, 0x2071, 0xa600, 0x7128, 0x2001, 0xa890, 0x2102, + 0x2001, 0xa898, 0x2102, 0xa182, 0x0211, 0x00c8, 0x220b, 0x2009, + 0x0008, 0x0078, 0x2235, 0xa182, 0x0259, 0x00c8, 0x2213, 0x2009, + 0x0007, 0x0078, 0x2235, 0xa182, 0x02c1, 0x00c8, 0x221b, 0x2009, + 0x0006, 0x0078, 0x2235, 0xa182, 0x0349, 0x00c8, 0x2223, 0x2009, + 0x0005, 0x0078, 0x2235, 0xa182, 0x0421, 0x00c8, 0x222b, 0x2009, + 0x0004, 0x0078, 0x2235, 0xa182, 0x0581, 0x00c8, 0x2233, 0x2009, + 0x0003, 0x0078, 0x2235, 0x2009, 0x0002, 0x2079, 0x0200, 0x7912, + 0x7817, 0x0004, 0x1078, 0x251f, 0x0f7f, 0x0e7f, 0x017f, 0x007c, + 0x127e, 0x2091, 0x2200, 0x2061, 0x0100, 0x2071, 0xa600, 0x6024, + 0x6026, 0x6053, 0x0030, 0x6033, 0x00ef, 0x60e7, 0x0000, 0x60eb, + 0x00ef, 0x60e3, 0x0008, 0x604b, 0xf7f7, 0x6043, 0x0000, 0x602f, + 0x0080, 0x602f, 0x0000, 0x6007, 0x0eaf, 0x600f, 0x00ff, 0x602b, + 0x002f, 0x127f, 0x007c, 0x2001, 0xa630, 0x2003, 0x0000, 0x2001, + 0xa62f, 0x2003, 0x0001, 0x007c, 0x127e, 0x2091, 0x2200, 0x007e, + 0x017e, 0x027e, 0x6124, 0xa184, 0x002c, 0x00c0, 0x227b, 0xa184, + 0x0007, 0x0079, 0x2281, 0xa195, 0x0004, 0xa284, 0x0007, 0x0079, + 0x2281, 0x22ad, 0x2289, 0x228d, 0x2291, 0x2297, 0x229b, 0x22a1, + 0x22a7, 0x1078, 0x5c56, 0x0078, 0x22ad, 0x1078, 0x5d45, 0x0078, + 0x22ad, 0x1078, 0x5d45, 0x1078, 0x5c56, 0x0078, 0x22ad, 0x1078, + 0x22b2, 0x0078, 0x22ad, 0x1078, 0x5c56, 0x1078, 0x22b2, 0x0078, + 0x22ad, 0x1078, 0x5d45, 0x1078, 0x22b2, 0x0078, 0x22ad, 0x1078, + 0x5d45, 0x1078, 0x5c56, 0x1078, 0x22b2, 0x027f, 0x017f, 0x007f, + 0x127f, 0x007c, 0x6124, 0xd1ac, 0x0040, 0x23ac, 0x017e, 0x047e, + 0x0c7e, 0x644c, 0xa486, 0xf0f0, 0x00c0, 0x22c5, 0x2061, 0x0100, + 0x644a, 0x6043, 0x0090, 0x6043, 0x0010, 0x74c6, 0xa48c, 0xff00, + 0x7034, 0xd084, 0x0040, 0x22dd, 0xa186, 0xf800, 0x00c0, 0x22dd, + 0x703c, 0xd084, 0x00c0, 0x22dd, 0xc085, 0x703e, 0x037e, 0x2418, + 0x2011, 0x8016, 0x1078, 0x361b, 0x037f, 0xa196, 0xff00, 0x0040, + 0x231f, 0x6030, 0xa084, 0x00ff, 0x810f, 0xa116, 0x0040, 0x231f, + 0x7130, 0xd184, 0x00c0, 0x231f, 0x2011, 0xa653, 0x2214, 0xd2ec, + 0x0040, 0x22fa, 0xc18d, 0x7132, 0x2011, 0xa653, 0x2214, 0xd2ac, + 0x00c0, 0x231f, 0x6240, 0xa294, 0x0010, 0x0040, 0x2306, 0x6248, + 0xa294, 0xff00, 0xa296, 0xff00, 0x0040, 0x231f, 0x7030, 0xd08c, + 0x0040, 0x2371, 0x7034, 0xd08c, 0x00c0, 0x2316, 0x2001, 0xa60c, + 0x200c, 0xd1ac, 0x00c0, 0x2371, 0xc1ad, 0x2102, 0x037e, 0x73c4, + 0x2011, 0x8013, 0x1078, 0x361b, 0x037f, 0x0078, 0x2371, 0x7034, + 0xd08c, 0x00c0, 0x232b, 0x2001, 0xa60c, 0x200c, 0xd1ac, 0x00c0, + 0x2371, 0xc1ad, 0x2102, 0x037e, 0x73c4, 0x2011, 0x8013, 0x1078, + 0x361b, 0x037f, 0x7130, 0xc185, 0x7132, 0x2011, 0xa653, 0x220c, + 0xd1a4, 0x0040, 0x2355, 0x017e, 0x2009, 0x0001, 0x2011, 0x0100, + 0x1078, 0x5bf1, 0x2019, 0x000e, 0x1078, 0xa195, 0xa484, 0x00ff, + 0xa080, 0x29c0, 0x200c, 0xa18c, 0xff00, 0x810f, 0x8127, 0xa006, + 0x2009, 0x000e, 0x1078, 0xa21d, 0x017f, 0xd1ac, 0x00c0, 0x2362, + 0x017e, 0x2009, 0x0000, 0x2019, 0x0004, 0x1078, 0x284f, 0x017f, + 0x0078, 0x2371, 0x157e, 0x20a9, 0x007f, 0x2009, 0x0000, 0x1078, + 0x45c4, 0x00c0, 0x236d, 0x1078, 0x42f8, 0x8108, 0x00f0, 0x2367, + 0x157f, 0x0c7f, 0x047f, 0x0f7e, 0x2079, 0xa8c4, 0x783c, 0xa086, + 0x0000, 0x0040, 0x2383, 0x6027, 0x0004, 0x783f, 0x0000, 0x2079, + 0x0140, 0x7803, 0x0000, 0x0f7f, 0x2011, 0x0003, 0x1078, 0x70e0, + 0x2011, 0x0002, 0x1078, 0x70ea, 0x1078, 0x6fc4, 0x037e, 0x2019, + 0x0000, 0x1078, 0x7058, 0x037f, 0x60e3, 0x0000, 0x017f, 0x2001, + 0xa600, 0x2014, 0xa296, 0x0004, 0x00c0, 0x23a4, 0xd19c, 0x00c0, + 0x23ac, 0x6228, 0xc29d, 0x622a, 0x2003, 0x0001, 0x2001, 0xa622, + 0x2003, 0x0000, 0x6027, 0x0020, 0xd194, 0x0040, 0x2490, 0x0f7e, + 0x2079, 0xa8c4, 0x783c, 0xa086, 0x0001, 0x00c0, 0x23d0, 0x017e, + 0x6027, 0x0004, 0x783f, 0x0000, 0x2079, 0x0140, 0x7803, 0x1000, + 0x7803, 0x0000, 0x2079, 0xa8b1, 0x7807, 0x0000, 0x7833, 0x0000, + 0x1078, 0x62d1, 0x1078, 0x639b, 0x017f, 0x0f7f, 0x0078, 0x2490, + 0x0f7f, 0x017e, 0x3900, 0xa082, 0xa9e3, 0x00c8, 0x23db, 0x017e, + 0x1078, 0x747a, 0x017f, 0x6220, 0xd2b4, 0x0040, 0x2446, 0x1078, + 0x5acb, 0x1078, 0x6e0f, 0x6027, 0x0004, 0x0f7e, 0x2019, 0xa8ba, + 0x2304, 0xa07d, 0x0040, 0x241c, 0x7804, 0xa086, 0x0032, 0x00c0, + 0x241c, 0x0d7e, 0x0c7e, 0x0e7e, 0x2069, 0x0140, 0x618c, 0x6288, + 0x7818, 0x608e, 0x7808, 0x608a, 0x6043, 0x0002, 0x2001, 0x0003, + 0x8001, 0x00c0, 0x2400, 0x6043, 0x0000, 0x6803, 0x1000, 0x6803, + 0x0000, 0x618e, 0x628a, 0x1078, 0x61cd, 0x1078, 0x62d1, 0x7810, + 0x2070, 0x7037, 0x0103, 0x2f60, 0x1078, 0x772d, 0x0e7f, 0x0c7f, + 0x0d7f, 0x0f7f, 0x017f, 0x007c, 0x0f7f, 0x0d7e, 0x2069, 0x0140, + 0x6804, 0xa084, 0x4000, 0x0040, 0x2429, 0x6803, 0x1000, 0x6803, + 0x0000, 0x0d7f, 0x0c7e, 0x2061, 0xa8b1, 0x6028, 0xa09a, 0x00c8, + 0x00c8, 0x2439, 0x8000, 0x602a, 0x0c7f, 0x1078, 0x6e01, 0x0078, + 0x248f, 0x2019, 0xa8ba, 0x2304, 0xa065, 0x0040, 0x2443, 0x2009, + 0x0027, 0x1078, 0x775c, 0x0c7f, 0x0078, 0x248f, 0xd2bc, 0x0040, + 0x248f, 0x1078, 0x5ad8, 0x6017, 0x0010, 0x6027, 0x0004, 0x0d7e, + 0x2069, 0x0140, 0x6804, 0xa084, 0x4000, 0x0040, 0x245b, 0x6803, + 0x1000, 0x6803, 0x0000, 0x0d7f, 0x0c7e, 0x2061, 0xa8b1, 0x6044, + 0xa09a, 0x00c8, 0x00c8, 0x247e, 0x8000, 0x6046, 0x603c, 0x0c7f, + 0xa005, 0x0040, 0x248f, 0x2009, 0x07d0, 0x1078, 0x5ad0, 0xa080, + 0x0007, 0x2004, 0xa086, 0x0006, 0x00c0, 0x247a, 0x6017, 0x0012, + 0x0078, 0x248f, 0x6017, 0x0016, 0x0078, 0x248f, 0x037e, 0x2019, + 0x0001, 0x1078, 0x7058, 0x037f, 0x2019, 0xa8c0, 0x2304, 0xa065, + 0x0040, 0x248e, 0x2009, 0x004f, 0x1078, 0x775c, 0x0c7f, 0x017f, + 0xd19c, 0x0040, 0x24e4, 0x7034, 0xd0ac, 0x00c0, 0x24c1, 0x017e, + 0x157e, 0x6027, 0x0008, 0x602f, 0x0020, 0x20a9, 0x000a, 0x00f0, + 0x249f, 0x602f, 0x0000, 0x6150, 0xa185, 0x1400, 0x6052, 0x20a9, + 0x0320, 0x00e0, 0x24a9, 0x2091, 0x6000, 0x6020, 0xd09c, 0x00c0, + 0x24b8, 0x157f, 0x6152, 0x017f, 0x6027, 0x0008, 0x0078, 0x24e4, + 0x1078, 0x2577, 0x00f0, 0x24a9, 0x157f, 0x6152, 0x017f, 0x6027, + 0x0008, 0x017e, 0x6028, 0xc09c, 0x602a, 0x2011, 0x0003, 0x1078, + 0x70e0, 0x2011, 0x0002, 0x1078, 0x70ea, 0x1078, 0x6fc4, 0x037e, + 0x2019, 0x0000, 0x1078, 0x7058, 0x037f, 0x60e3, 0x0000, 0x1078, + 0xa5ad, 0x1078, 0xa5cb, 0x2001, 0xa600, 0x2003, 0x0004, 0x6027, + 0x0008, 0x1078, 0x1246, 0x017f, 0xa18c, 0xffd0, 0x6126, 0x007c, + 0x007e, 0x017e, 0x027e, 0x0e7e, 0x0f7e, 0x127e, 0x2091, 0x8000, + 0x2071, 0xa600, 0x71bc, 0x70be, 0xa116, 0x0040, 0x2518, 0x81ff, + 0x0040, 0x2500, 0x2011, 0x8011, 0x1078, 0x361b, 0x0078, 0x2518, + 0x2011, 0x8012, 0x1078, 0x361b, 0x2001, 0xa672, 0x2004, 0xd0fc, + 0x00c0, 0x2518, 0x037e, 0x0c7e, 0x1078, 0x6f9f, 0x2061, 0x0100, + 0x2019, 0x0028, 0x2009, 0x0000, 0x1078, 0x284f, 0x0c7f, 0x037f, + 0x127f, 0x0f7f, 0x0e7f, 0x027f, 0x017f, 0x007f, 0x007c, 0x0c7e, + 0x0f7e, 0x007e, 0x027e, 0x2061, 0x0100, 0xa190, 0x253b, 0x2204, + 0x60f2, 0x2011, 0x2548, 0x6000, 0xa082, 0x0003, 0x00c8, 0x2534, + 0x2001, 0x00ff, 0x0078, 0x2535, 0x2204, 0x60ee, 0x027f, 0x007f, + 0x0f7f, 0x0c7f, 0x007c, 0x0840, 0x0840, 0x0840, 0x0580, 0x0420, + 0x0348, 0x02c0, 0x0258, 0x0210, 0x01a8, 0x01a8, 0x01a8, 0x01a8, + 0x0140, 0x00f8, 0x00d0, 0x00b0, 0x00a0, 0x2028, 0xa18c, 0x00ff, + 0x2130, 0xa094, 0xff00, 0x00c0, 0x2558, 0x81ff, 0x0040, 0x255c, + 0x1078, 0x5761, 0x0078, 0x2563, 0xa080, 0x29c0, 0x200c, 0xa18c, + 0xff00, 0x810f, 0xa006, 0x007c, 0xa080, 0x29c0, 0x200c, 0xa18c, + 0x00ff, 0x007c, 0x0c7e, 0x2061, 0xa600, 0x6030, 0x0040, 0x2573, + 0xc09d, 0x0078, 0x2574, 0xc09c, 0x6032, 0x0c7f, 0x007c, 0x007e, + 0x157e, 0x0f7e, 0x2079, 0x0100, 0x20a9, 0x000a, 0x7854, 0xd08c, + 0x00c0, 0x2584, 0x00f0, 0x257e, 0x0f7f, 0x157f, 0x007f, 0x007c, + 0x0c7e, 0x007e, 0x2061, 0x0100, 0x6030, 0x007e, 0x6048, 0x007e, + 0x60e4, 0x007e, 0x60e8, 0x007e, 0x6050, 0x007e, 0x60f0, 0x007e, + 0x60ec, 0x007e, 0x600c, 0x007e, 0x6004, 0x007e, 0x6028, 0x007e, + 0x60e0, 0x007e, 0x602f, 0x0100, 0x602f, 0x0000, 0x0005, 0x0005, + 0x0005, 0x0005, 0x602f, 0x0040, 0x602f, 0x0000, 0x007f, 0x60e2, + 0x007f, 0x602a, 0x007f, 0x6006, 0x007f, 0x600e, 0x007f, 0x60ee, + 0x007f, 0x60f2, 0x007f, 0x6052, 0x007f, 0x60ea, 0x007f, 0x60e6, + 0x007f, 0x604a, 0x007f, 0x6032, 0x007f, 0x0c7f, 0x007c, 0x25e7, + 0x25eb, 0x25ef, 0x25f5, 0x25fb, 0x2601, 0x2607, 0x260f, 0x2617, + 0x261d, 0x2623, 0x262b, 0x2633, 0x263b, 0x2643, 0x264d, 0x2657, + 0x2657, 0x2657, 0x2657, 0x2657, 0x2657, 0x2657, 0x2657, 0x2657, + 0x2657, 0x2657, 0x2657, 0x2657, 0x2657, 0x2657, 0x2657, 0x107e, + 0x007e, 0x0078, 0x2670, 0x107e, 0x007e, 0x0078, 0x2670, 0x107e, + 0x007e, 0x1078, 0x226c, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, + 0x226c, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, 0x2133, 0x0078, + 0x2670, 0x107e, 0x007e, 0x1078, 0x2133, 0x0078, 0x2670, 0x107e, + 0x007e, 0x1078, 0x226c, 0x1078, 0x2133, 0x0078, 0x2670, 0x107e, + 0x007e, 0x1078, 0x226c, 0x1078, 0x2133, 0x0078, 0x2670, 0x107e, + 0x007e, 0x1078, 0x2178, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, + 0x2178, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, 0x226c, 0x1078, + 0x2178, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, 0x226c, 0x1078, + 0x2178, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, 0x2133, 0x1078, + 0x2178, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, 0x2133, 0x1078, + 0x2178, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, 0x226c, 0x1078, + 0x2133, 0x1078, 0x2178, 0x0078, 0x2670, 0x107e, 0x007e, 0x1078, + 0x226c, 0x1078, 0x2133, 0x1078, 0x2178, 0x0078, 0x2670, 0x0005, + 0x0078, 0x2657, 0xb084, 0x003c, 0x8004, 0x8004, 0x0079, 0x2660, + 0x2670, 0x25ed, 0x25f1, 0x25f7, 0x25fd, 0x2603, 0x2609, 0x2611, + 0x2619, 0x261f, 0x2625, 0x262d, 0x2635, 0x263d, 0x2645, 0x264f, + 0x0008, 0x265a, 0x007f, 0x107f, 0x2091, 0x8001, 0x007c, 0x0c7e, + 0x027e, 0x047e, 0x2021, 0x0000, 0x1078, 0x4967, 0x00c0, 0x2772, + 0x70cc, 0xd09c, 0x0040, 0x268e, 0xd084, 0x00c0, 0x268e, 0xd0bc, + 0x00c0, 0x2772, 0x1078, 0x2776, 0x0078, 0x2772, 0xd0cc, 0x00c0, + 0x2772, 0xd094, 0x0040, 0x2698, 0x7097, 0xffff, 0x0078, 0x2772, + 0x2001, 0x010c, 0x203c, 0x7284, 0xd284, 0x0040, 0x2701, 0xd28c, + 0x00c0, 0x2701, 0x037e, 0x7394, 0xa38e, 0xffff, 0x0040, 0x26ab, + 0x83ff, 0x00c0, 0x26ad, 0x2019, 0x0001, 0x8314, 0xa2e0, 0xacc0, + 0x2c04, 0xa38c, 0x0001, 0x0040, 0x26ba, 0xa084, 0xff00, 0x8007, + 0x0078, 0x26bc, 0xa084, 0x00ff, 0xa70e, 0x0040, 0x26f6, 0xa08e, + 0x0000, 0x0040, 0x26f6, 0xa08e, 0x00ff, 0x00c0, 0x26d3, 0x7230, + 0xd284, 0x00c0, 0x26fc, 0x7284, 0xc28d, 0x7286, 0x7097, 0xffff, + 0x037f, 0x0078, 0x2701, 0x2009, 0x0000, 0x1078, 0x254d, 0x1078, + 0x455c, 0x00c0, 0x26f9, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, + 0x00c0, 0x26f0, 0x7030, 0xd08c, 0x0040, 0x26ea, 0x6000, 0xd0bc, + 0x0040, 0x26f0, 0x1078, 0x278c, 0x0040, 0x26f9, 0x0078, 0x26f6, + 0x1078, 0x28c4, 0x1078, 0x27b9, 0x0040, 0x26f9, 0x8318, 0x0078, + 0x26ad, 0x7396, 0x0078, 0x26fe, 0x7097, 0xffff, 0x037f, 0x0078, + 0x2772, 0xa780, 0x29c0, 0x203c, 0xa7bc, 0xff00, 0x873f, 0x2041, + 0x007e, 0x7094, 0xa096, 0xffff, 0x00c0, 0x2713, 0x2009, 0x0000, + 0x28a8, 0x0078, 0x271f, 0xa812, 0x0048, 0x271b, 0x2008, 0xa802, + 0x20a8, 0x0078, 0x271f, 0x7097, 0xffff, 0x0078, 0x2772, 0x2700, + 0x157e, 0x017e, 0xa106, 0x0040, 0x2766, 0xc484, 0x1078, 0x45c4, + 0x0040, 0x2730, 0x1078, 0x455c, 0x00c0, 0x276f, 0x0078, 0x2731, + 0xc485, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x00c0, 0x2740, + 0x7030, 0xd08c, 0x0040, 0x275e, 0x6000, 0xd0bc, 0x00c0, 0x275e, + 0x7284, 0xd28c, 0x0040, 0x2756, 0x6004, 0xa084, 0x00ff, 0xa082, + 0x0006, 0x0048, 0x2766, 0xd484, 0x00c0, 0x2752, 0x1078, 0x457f, + 0x0078, 0x2754, 0x1078, 0x298e, 0x0078, 0x2766, 0x1078, 0x28c4, + 0x1078, 0x27b9, 0x0040, 0x276f, 0x0078, 0x2766, 0x1078, 0x2959, + 0x0040, 0x2766, 0x1078, 0x278c, 0x0040, 0x276f, 0x017f, 0x8108, + 0x157f, 0x00f0, 0x271f, 0x7097, 0xffff, 0x0078, 0x2772, 0x017f, + 0x157f, 0x7196, 0x047f, 0x027f, 0x0c7f, 0x007c, 0x0c7e, 0x017e, + 0x7097, 0x0001, 0x2009, 0x007e, 0x1078, 0x455c, 0x00c0, 0x2789, + 0x1078, 0x28c4, 0x1078, 0x27b9, 0x0040, 0x2789, 0x70cc, 0xc0bd, + 0x70ce, 0x017f, 0x0c7f, 0x007c, 0x017e, 0x077e, 0x0d7e, 0x0c7e, + 0x2c68, 0x2001, 0xa657, 0x2004, 0xa084, 0x00ff, 0x6842, 0x1078, + 0x76c7, 0x0040, 0x27b4, 0x2d00, 0x601a, 0x601f, 0x0001, 0x2001, + 0x0000, 0x1078, 0x44ee, 0x2001, 0x0000, 0x1078, 0x4502, 0x127e, + 0x2091, 0x8000, 0x7090, 0x8000, 0x7092, 0x127f, 0x2009, 0x0004, + 0x1078, 0x775c, 0xa085, 0x0001, 0x0c7f, 0x0d7f, 0x077f, 0x017f, + 0x007c, 0x017e, 0x077e, 0x0d7e, 0x0c7e, 0x2c68, 0x2001, 0xa657, + 0x2004, 0xa084, 0x00ff, 0x6842, 0x1078, 0x9187, 0x0040, 0x27f2, + 0x2d00, 0x601a, 0x6800, 0xc0c4, 0x6802, 0x68a0, 0xa086, 0x007e, + 0x0040, 0x27db, 0x6804, 0xa084, 0x00ff, 0xa086, 0x0006, 0x00c0, + 0x27db, 0x1078, 0x2880, 0x601f, 0x0001, 0x2001, 0x0000, 0x1078, + 0x44ee, 0x2001, 0x0002, 0x1078, 0x4502, 0x127e, 0x2091, 0x8000, + 0x7090, 0x8000, 0x7092, 0x127f, 0x2009, 0x0002, 0x1078, 0x775c, + 0xa085, 0x0001, 0x0c7f, 0x0d7f, 0x077f, 0x017f, 0x007c, 0x0c7e, + 0x027e, 0x2009, 0x0080, 0x1078, 0x455c, 0x00c0, 0x2805, 0x1078, + 0x2808, 0x0040, 0x2805, 0x70d3, 0xffff, 0x027f, 0x0c7f, 0x007c, + 0x017e, 0x077e, 0x0d7e, 0x0c7e, 0x2c68, 0x1078, 0x76c7, 0x0040, + 0x282a, 0x2d00, 0x601a, 0x601f, 0x0001, 0x2001, 0x0000, 0x1078, + 0x44ee, 0x2001, 0x0002, 0x1078, 0x4502, 0x127e, 0x2091, 0x8000, + 0x70d4, 0x8000, 0x70d6, 0x127f, 0x2009, 0x0002, 0x1078, 0x775c, + 0xa085, 0x0001, 0x0c7f, 0x0d7f, 0x077f, 0x017f, 0x007c, 0x0c7e, + 0x0d7e, 0x127e, 0x2091, 0x8000, 0x2009, 0x007f, 0x1078, 0x455c, + 0x00c0, 0x284b, 0x2c68, 0x1078, 0x76c7, 0x0040, 0x284b, 0x2d00, + 0x601a, 0x6312, 0x601f, 0x0001, 0x620a, 0x2009, 0x0022, 0x1078, + 0x775c, 0xa085, 0x0001, 0x127f, 0x0d7f, 0x0c7f, 0x007c, 0x0e7e, + 0x0c7e, 0x067e, 0x037e, 0x027e, 0x1078, 0x5f0e, 0x1078, 0x5eae, + 0x1078, 0x8068, 0x2130, 0x81ff, 0x0040, 0x2864, 0x20a9, 0x007e, + 0x2009, 0x0000, 0x0078, 0x2868, 0x20a9, 0x007f, 0x2009, 0x0000, + 0x017e, 0x1078, 0x45c4, 0x00c0, 0x2871, 0x1078, 0x47e9, 0x1078, + 0x42f8, 0x017f, 0x8108, 0x00f0, 0x2868, 0x86ff, 0x00c0, 0x287a, + 0x1078, 0x119b, 0x027f, 0x037f, 0x067f, 0x0c7f, 0x0e7f, 0x007c, + 0x0e7e, 0x0c7e, 0x037e, 0x027e, 0x017e, 0x6218, 0x2270, 0x72a0, + 0x027e, 0x2019, 0x0029, 0x1078, 0x5f01, 0x077e, 0x2039, 0x0000, + 0x1078, 0x5e0a, 0x2c08, 0x1078, 0x9f8b, 0x077f, 0x017f, 0x2e60, + 0x1078, 0x47e9, 0x6210, 0x6314, 0x1078, 0x42f8, 0x6212, 0x6316, + 0x017f, 0x027f, 0x037f, 0x0c7f, 0x0e7f, 0x007c, 0x0e7e, 0x007e, + 0x6018, 0xa080, 0x0028, 0x2004, 0xd0bc, 0x00c0, 0x28ba, 0x2071, + 0xa600, 0x7090, 0xa005, 0x0040, 0x28b7, 0x8001, 0x7092, 0x007f, + 0x0e7f, 0x007c, 0x2071, 0xa600, 0x70d4, 0xa005, 0x0040, 0x28b7, + 0x8001, 0x70d6, 0x0078, 0x28b7, 0x6000, 0xc08c, 0x6002, 0x007c, + 0x0f7e, 0x0e7e, 0x0c7e, 0x037e, 0x027e, 0x017e, 0x157e, 0x2178, + 0x81ff, 0x00c0, 0x28d7, 0x20a9, 0x0001, 0x0078, 0x28f2, 0x2001, + 0xa653, 0x2004, 0xd0c4, 0x0040, 0x28ee, 0xd0a4, 0x0040, 0x28ee, + 0x047e, 0x6018, 0xa080, 0x0028, 0x2024, 0xa4a4, 0x00ff, 0x8427, + 0xa006, 0x2009, 0x002d, 0x1078, 0xa21d, 0x047f, 0x20a9, 0x00ff, + 0x2011, 0x0000, 0x027e, 0xa28e, 0x007e, 0x0040, 0x2936, 0xa28e, + 0x007f, 0x0040, 0x2936, 0xa28e, 0x0080, 0x0040, 0x2936, 0xa288, + 0xa735, 0x210c, 0x81ff, 0x0040, 0x2936, 0x8fff, 0x1040, 0x2942, + 0x0c7e, 0x2160, 0x2001, 0x0001, 0x1078, 0x4972, 0x0c7f, 0x2019, + 0x0029, 0x1078, 0x5f01, 0x077e, 0x2039, 0x0000, 0x1078, 0x5e0a, + 0x0c7e, 0x027e, 0x2160, 0x6204, 0xa294, 0x00ff, 0xa286, 0x0006, + 0x00c0, 0x2926, 0x6007, 0x0404, 0x0078, 0x292b, 0x2001, 0x0004, + 0x8007, 0xa215, 0x6206, 0x027f, 0x0c7f, 0x017e, 0x2c08, 0x1078, + 0x9f8b, 0x017f, 0x077f, 0x2160, 0x1078, 0x47e9, 0x027f, 0x8210, + 0x00f0, 0x28f2, 0x157f, 0x017f, 0x027f, 0x037f, 0x0c7f, 0x0e7f, + 0x0f7f, 0x007c, 0x047e, 0x027e, 0x017e, 0x2001, 0xa653, 0x2004, + 0xd0c4, 0x0040, 0x2955, 0xd0a4, 0x0040, 0x2955, 0xa006, 0x2220, + 0x8427, 0x2009, 0x0029, 0x1078, 0xa21d, 0x017f, 0x027f, 0x047f, + 0x007c, 0x017e, 0x027e, 0x037e, 0x0c7e, 0x7284, 0x82ff, 0x0040, + 0x2987, 0xa290, 0xa653, 0x2214, 0xd2ac, 0x00c0, 0x2987, 0x2100, + 0x1078, 0x2564, 0x81ff, 0x0040, 0x2989, 0x2019, 0x0001, 0x8314, + 0xa2e0, 0xacc0, 0x2c04, 0xd384, 0x0040, 0x297b, 0xa084, 0xff00, + 0x8007, 0x0078, 0x297d, 0xa084, 0x00ff, 0xa116, 0x0040, 0x2989, + 0xa096, 0x00ff, 0x0040, 0x2987, 0x8318, 0x0078, 0x296f, 0xa085, + 0x0001, 0x0c7f, 0x037f, 0x027f, 0x017f, 0x007c, 0x017e, 0x0c7e, + 0x127e, 0x2091, 0x8000, 0x017e, 0x027e, 0x037e, 0x2110, 0x027e, + 0x2019, 0x0029, 0x1078, 0x73d0, 0x027f, 0x1078, 0xa4f1, 0x037f, + 0x027f, 0x017f, 0xa180, 0xa735, 0x2004, 0xa065, 0x0040, 0x29b7, + 0x017e, 0x0c7e, 0x1078, 0x9187, 0x017f, 0x1040, 0x1332, 0x611a, + 0x1078, 0x2880, 0x1078, 0x772d, 0x017f, 0x1078, 0x457f, 0x127f, + 0x0c7f, 0x017f, 0x007c, 0x2001, 0xa633, 0x2004, 0xd0cc, 0x007c, + 0x7eef, 0x7de8, 0x7ce4, 0x80e2, 0x7be1, 0x80e0, 0x80dc, 0x80da, + 0x7ad9, 0x80d6, 0x80d5, 0x80d4, 0x80d3, 0x80d2, 0x80d1, 0x79ce, + 0x78cd, 0x80cc, 0x80cb, 0x80ca, 0x80c9, 0x80c7, 0x80c6, 0x77c5, + 0x76c3, 0x80bc, 0x80ba, 0x75b9, 0x80b6, 0x74b5, 0x73b4, 0x72b3, + 0x80b2, 0x80b1, 0x80ae, 0x71ad, 0x80ac, 0x70ab, 0x6faa, 0x6ea9, + 0x80a7, 0x6da6, 0x6ca5, 0x6ba3, 0x6a9f, 0x699e, 0x689d, 0x809b, + 0x8098, 0x6797, 0x6690, 0x658f, 0x6488, 0x6384, 0x6282, 0x8081, + 0x8080, 0x617c, 0x607a, 0x8079, 0x5f76, 0x8075, 0x8074, 0x8073, + 0x8072, 0x8071, 0x806e, 0x5e6d, 0x806c, 0x5d6b, 0x5c6a, 0x5b69, + 0x8067, 0x5a66, 0x5965, 0x5863, 0x575c, 0x565a, 0x5559, 0x8056, + 0x8055, 0x5454, 0x5353, 0x5252, 0x5151, 0x504e, 0x4f4d, 0x804c, + 0x804b, 0x4e4a, 0x4d49, 0x8047, 0x4c46, 0x8045, 0x8043, 0x803c, + 0x803a, 0x8039, 0x8036, 0x4b35, 0x8034, 0x4a33, 0x4932, 0x4831, + 0x802e, 0x472d, 0x462c, 0x452b, 0x442a, 0x4329, 0x4227, 0x8026, + 0x8025, 0x4123, 0x401f, 0x3f1e, 0x3e1d, 0x3d1b, 0x3c18, 0x8017, + 0x8010, 0x3b0f, 0x3a08, 0x8004, 0x3902, 0x8001, 0x8000, 0x8000, + 0x3800, 0x3700, 0x3600, 0x8000, 0x3500, 0x8000, 0x8000, 0x8000, + 0x3400, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3300, + 0x3200, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x3100, + 0x3000, 0x8000, 0x8000, 0x2f00, 0x8000, 0x2e00, 0x2d00, 0x2c00, + 0x8000, 0x8000, 0x8000, 0x2b00, 0x8000, 0x2a00, 0x2900, 0x2800, + 0x8000, 0x2700, 0x2600, 0x2500, 0x2400, 0x2300, 0x2200, 0x8000, + 0x8000, 0x2100, 0x2000, 0x1f00, 0x1e00, 0x1d00, 0x1c00, 0x8000, + 0x8000, 0x1b00, 0x1a00, 0x8000, 0x1900, 0x8000, 0x8000, 0x8000, + 0x8000, 0x8000, 0x8000, 0x1800, 0x8000, 0x1700, 0x1600, 0x1500, + 0x8000, 0x1400, 0x1300, 0x1200, 0x1100, 0x1000, 0x0f00, 0x8000, + 0x8000, 0x0e00, 0x0d00, 0x0c00, 0x0b00, 0x0a00, 0x0900, 0x8000, + 0x8000, 0x0800, 0x0700, 0x8000, 0x0600, 0x8000, 0x8000, 0x8000, + 0x0500, 0x0400, 0x0300, 0x8000, 0x0200, 0x8000, 0x8000, 0x8000, + 0x0100, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x0000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x2071, 0xa682, 0x7003, 0x0002, 0xa006, 0x7012, 0x7016, 0x703a, + 0x703e, 0x7033, 0xa692, 0x7037, 0xa692, 0x7007, 0x0001, 0x2061, + 0xa6d2, 0x6003, 0x0002, 0x007c, 0x0090, 0x2ae7, 0x0068, 0x2ae7, + 0x2071, 0xa682, 0x2b78, 0x7818, 0xd084, 0x00c0, 0x2ae7, 0x2a60, + 0x7820, 0xa08e, 0x0069, 0x00c0, 0x2bd7, 0x0079, 0x2b6b, 0x007c, + 0x2071, 0xa682, 0x7004, 0x0079, 0x2aed, 0x2af1, 0x2af2, 0x2afc, + 0x2b0e, 0x007c, 0x0090, 0x2afb, 0x0068, 0x2afb, 0x2b78, 0x7818, + 0xd084, 0x0040, 0x2b1a, 0x007c, 0x2b78, 0x2061, 0xa6d2, 0x6008, + 0xa08e, 0x0100, 0x0040, 0x2b09, 0xa086, 0x0200, 0x0040, 0x2bcf, + 0x007c, 0x7014, 0x2068, 0x2a60, 0x7018, 0x007a, 0x7010, 0x2068, + 0x6834, 0xa086, 0x0103, 0x0040, 0x2b16, 0x007c, 0x2a60, 0x2b78, + 0x7018, 0x007a, 0x2a60, 0x7820, 0xa08a, 0x0040, 0x00c8, 0x2b23, + 0x61bc, 0x0079, 0x2b2b, 0x2100, 0xa08a, 0x003f, 0x00c8, 0x2bcb, + 0x61bc, 0x0079, 0x2b6b, 0x2bad, 0x2bdf, 0x2be7, 0x2beb, 0x2bf3, + 0x2bf9, 0x2bfd, 0x2c09, 0x2c0d, 0x2c17, 0x2c1b, 0x2bcb, 0x2bcb, + 0x2bcb, 0x2c1f, 0x2bcb, 0x2c2f, 0x2c46, 0x2c5d, 0x2cdd, 0x2ce2, + 0x2d0f, 0x2d69, 0x2d7a, 0x2d98, 0x2dd9, 0x2de3, 0x2df0, 0x2e03, + 0x2e22, 0x2e2b, 0x2e68, 0x2e6e, 0x2bcb, 0x2e8a, 0x2bcb, 0x2bcb, + 0x2bcb, 0x2bcb, 0x2bcb, 0x2e91, 0x2e9b, 0x2bcb, 0x2bcb, 0x2bcb, + 0x2bcb, 0x2bcb, 0x2bcb, 0x2bcb, 0x2bcb, 0x2ea3, 0x2bcb, 0x2bcb, + 0x2bcb, 0x2bcb, 0x2bcb, 0x2eb5, 0x2ece, 0x2bcb, 0x2bcb, 0x2bcb, + 0x2bcb, 0x2bcb, 0x2bcb, 0x2ee0, 0x2f37, 0x2f95, 0x2fa9, 0x2bcb, + 0x2bcb, 0x2bcb, 0x398e, 0x2bcb, 0x2bcb, 0x2bcb, 0x2bcb, 0x2bcb, + 0x2bcb, 0x2bcb, 0x2bcb, 0x2c17, 0x2c1b, 0x2fc0, 0x2bcb, 0x2fcd, + 0x3a26, 0x3a83, 0x2bcb, 0x2bcb, 0x2bcb, 0x2bcb, 0x2bcb, 0x2bcb, + 0x2bcb, 0x2bcb, 0x2bcb, 0x301a, 0x314f, 0x316b, 0x3177, 0x31da, + 0x3233, 0x323e, 0x327d, 0x328c, 0x329b, 0x329e, 0x2fd1, 0x32c2, + 0x331e, 0x332b, 0x343c, 0x356f, 0x3599, 0x36a6, 0x2bcb, 0x36b6, + 0x36f0, 0x37bf, 0x2bcb, 0x2bcb, 0x2bcb, 0x2bcb, 0x3827, 0x3843, + 0x38bd, 0x3977, 0x713c, 0x0078, 0x2bad, 0x2021, 0x4000, 0x1078, + 0x35f5, 0x127e, 0x2091, 0x8000, 0x0068, 0x2bba, 0x7818, 0xd084, + 0x0040, 0x2bbd, 0x127f, 0x0078, 0x2bb1, 0x7c22, 0x7926, 0x7a2a, + 0x7b2e, 0x781b, 0x0001, 0x2091, 0x4080, 0x7007, 0x0001, 0x2091, + 0x5000, 0x127f, 0x007c, 0x2021, 0x4001, 0x0078, 0x2baf, 0x2021, + 0x4002, 0x0078, 0x2baf, 0x2021, 0x4003, 0x0078, 0x2baf, 0x2021, + 0x4005, 0x0078, 0x2baf, 0x2021, 0x4006, 0x0078, 0x2baf, 0xa02e, + 0x2520, 0x7b28, 0x7a2c, 0x7824, 0x7930, 0x0078, 0x3604, 0x7823, + 0x0004, 0x7824, 0x007a, 0xa02e, 0x2520, 0x7b28, 0x7a2c, 0x7824, + 0x7930, 0x0078, 0x3608, 0x7924, 0x7828, 0x2114, 0x200a, 0x0078, + 0x2bad, 0x7924, 0x2114, 0x0078, 0x2bad, 0x2099, 0x0009, 0x20a1, + 0x0009, 0x20a9, 0x0007, 0x53a3, 0x7924, 0x7a28, 0x7b2c, 0x0078, + 0x2bad, 0x7824, 0x2060, 0x0078, 0x2c21, 0x2009, 0x0001, 0x2011, + 0x0013, 0x2019, 0x0018, 0x783b, 0x0017, 0x0078, 0x2bad, 0x7d38, + 0x7c3c, 0x0078, 0x2be1, 0x7d38, 0x7c3c, 0x0078, 0x2bed, 0x2061, + 0x1000, 0x610c, 0xa006, 0x2c14, 0xa200, 0x8c60, 0x8109, 0x00c0, + 0x2c23, 0x2010, 0xa005, 0x0040, 0x2bad, 0x0078, 0x2bd3, 0x2069, + 0xa652, 0x7824, 0x7930, 0xa11a, 0x00c8, 0x2bdb, 0x8019, 0x0040, + 0x2bdb, 0x684a, 0x6942, 0x782c, 0x6852, 0x7828, 0x6856, 0xa006, + 0x685a, 0x685e, 0x1078, 0x4eae, 0x0078, 0x2bad, 0x2069, 0xa652, + 0x7824, 0x7934, 0xa11a, 0x00c8, 0x2bdb, 0x8019, 0x0040, 0x2bdb, + 0x684e, 0x6946, 0x782c, 0x6862, 0x7828, 0x6866, 0xa006, 0x686a, + 0x686e, 0x1078, 0x4a3e, 0x0078, 0x2bad, 0xa02e, 0x2520, 0x81ff, + 0x00c0, 0x2bd7, 0x7924, 0x7b28, 0x7a2c, 0x20a9, 0x0005, 0x20a1, + 0xa689, 0x41a1, 0x1078, 0x35ba, 0x0040, 0x2bd7, 0x2009, 0x0020, + 0x1078, 0x3604, 0x701b, 0x2c75, 0x007c, 0x6834, 0x2008, 0xa084, + 0x00ff, 0xa096, 0x0011, 0x0040, 0x2c85, 0xa096, 0x0019, 0x0040, + 0x2c85, 0xa096, 0x0015, 0x00c0, 0x2bd7, 0x810f, 0xa18c, 0x00ff, + 0x0040, 0x2bd7, 0x710e, 0x700c, 0x8001, 0x0040, 0x2cb6, 0x700e, + 0x1078, 0x35ba, 0x0040, 0x2bd7, 0x2009, 0x0020, 0x2061, 0xa6d2, + 0x6224, 0x6328, 0x642c, 0x6530, 0xa290, 0x0040, 0xa399, 0x0000, + 0xa4a1, 0x0000, 0xa5a9, 0x0000, 0x1078, 0x3604, 0x701b, 0x2ca9, + 0x007c, 0x6834, 0xa084, 0x00ff, 0xa096, 0x0002, 0x0040, 0x2cb4, + 0xa096, 0x000a, 0x00c0, 0x2bd7, 0x0078, 0x2c8b, 0x7010, 0x2068, + 0x6838, 0xc0fd, 0x683a, 0x1078, 0x4431, 0x00c0, 0x2cc4, 0x7007, + 0x0003, 0x701b, 0x2cc6, 0x007c, 0x1078, 0x4b51, 0x127e, 0x2091, + 0x8000, 0x20a9, 0x0005, 0x2099, 0xa689, 0x530a, 0x2100, 0xa210, + 0xa399, 0x0000, 0xa4a1, 0x0000, 0xa5a9, 0x0000, 0xad80, 0x000d, + 0x2009, 0x0020, 0x127f, 0x0078, 0x3608, 0x61a4, 0x7824, 0x60a6, + 0x0078, 0x2bad, 0x2091, 0x8000, 0x7823, 0x4000, 0x7827, 0x4953, + 0x782b, 0x5020, 0x782f, 0x2020, 0x2009, 0x017f, 0x2104, 0x7832, + 0x3f00, 0x7836, 0x2061, 0x0100, 0x6200, 0x2061, 0x0200, 0x603c, + 0x8007, 0xa205, 0x783a, 0x2009, 0x04fd, 0x2104, 0x783e, 0x781b, + 0x0001, 0x2091, 0x5000, 0x2091, 0x4080, 0x2071, 0x0010, 0x20c1, + 0x00f0, 0xa08a, 0x0003, 0x00c8, 0x0427, 0x0078, 0x0423, 0x81ff, + 0x00c0, 0x2bd7, 0x7924, 0x810f, 0xa18c, 0x00ff, 0x1078, 0x45c4, + 0x00c0, 0x2bdb, 0x7e38, 0xa684, 0x3fff, 0xa082, 0x4000, 0x0048, + 0x2d23, 0x0078, 0x2bdb, 0x7c28, 0x7d2c, 0x1078, 0x47a4, 0xd28c, + 0x00c0, 0x2d2e, 0x1078, 0x4736, 0x0078, 0x2d30, 0x1078, 0x4772, + 0x00c0, 0x2d5a, 0x2061, 0xad00, 0x127e, 0x2091, 0x8000, 0x6000, + 0xa086, 0x0000, 0x0040, 0x2d48, 0x6010, 0xa06d, 0x0040, 0x2d48, + 0x683c, 0xa406, 0x00c0, 0x2d48, 0x6840, 0xa506, 0x0040, 0x2d53, + 0x127f, 0xace0, 0x0010, 0x2001, 0xa616, 0x2004, 0xac02, 0x00c8, + 0x2bd7, 0x0078, 0x2d34, 0x1078, 0x8a01, 0x127f, 0x0040, 0x2bd7, + 0x0078, 0x2bad, 0xa00e, 0x2001, 0x0005, 0x1078, 0x4b51, 0x127e, + 0x2091, 0x8000, 0x1078, 0x8f85, 0x1078, 0x4a73, 0x127f, 0x0078, + 0x2bad, 0x81ff, 0x00c0, 0x2bd7, 0x1078, 0x35d2, 0x0040, 0x2bdb, + 0x1078, 0x4673, 0x0040, 0x2bd7, 0x1078, 0x47b2, 0x0040, 0x2bd7, + 0x0078, 0x2bad, 0x81ff, 0x00c0, 0x2bd7, 0x1078, 0x35e4, 0x0040, + 0x2bdb, 0x1078, 0x482f, 0x0040, 0x2bd7, 0x2019, 0x0005, 0x1078, + 0x47d3, 0x0040, 0x2bd7, 0x7828, 0xa08a, 0x1000, 0x00c8, 0x2bdb, + 0x8003, 0x800b, 0x810b, 0xa108, 0x1078, 0x5a52, 0x0078, 0x2bad, + 0x127e, 0x2091, 0x8000, 0x81ff, 0x0040, 0x2da2, 0x2009, 0x0001, + 0x0078, 0x2dd3, 0x2029, 0x00ff, 0x6450, 0x2400, 0xa506, 0x0040, + 0x2dcd, 0x2508, 0x1078, 0x45c4, 0x00c0, 0x2dcd, 0x1078, 0x482f, + 0x00c0, 0x2db8, 0x2009, 0x0002, 0x62ac, 0x2518, 0x0078, 0x2dd3, + 0x2019, 0x0004, 0x1078, 0x47d3, 0x00c0, 0x2dc2, 0x2009, 0x0006, + 0x0078, 0x2dd3, 0x7824, 0xa08a, 0x1000, 0x00c8, 0x2dd6, 0x8003, + 0x800b, 0x810b, 0xa108, 0x1078, 0x5a52, 0x8529, 0x00c8, 0x2da5, + 0x127f, 0x0078, 0x2bad, 0x127f, 0x0078, 0x2bd7, 0x127f, 0x0078, + 0x2bdb, 0x1078, 0x35d2, 0x0040, 0x2bdb, 0x1078, 0x46e7, 0x1078, + 0x47a4, 0x0078, 0x2bad, 0x81ff, 0x00c0, 0x2bd7, 0x1078, 0x35d2, + 0x0040, 0x2bdb, 0x1078, 0x46d6, 0x1078, 0x47a4, 0x0078, 0x2bad, + 0x81ff, 0x00c0, 0x2bd7, 0x1078, 0x35d2, 0x0040, 0x2bdb, 0x1078, + 0x4775, 0x0040, 0x2bd7, 0x1078, 0x4484, 0x1078, 0x472f, 0x1078, + 0x47a4, 0x0078, 0x2bad, 0x1078, 0x35d2, 0x0040, 0x2bdb, 0x1078, + 0x4673, 0x0040, 0x2bd7, 0x62a0, 0x2019, 0x0005, 0x0c7e, 0x1078, + 0x47e9, 0x0c7f, 0x1078, 0x5f01, 0x077e, 0x2039, 0x0000, 0x1078, + 0x5e0a, 0x2009, 0x0000, 0x1078, 0x9f8b, 0x077f, 0x1078, 0x47a4, + 0x0078, 0x2bad, 0x1078, 0x35d2, 0x0040, 0x2bdb, 0x1078, 0x47a4, + 0x2208, 0x0078, 0x2bad, 0x157e, 0x0d7e, 0x0e7e, 0x2069, 0xa714, + 0x6810, 0x6914, 0xa10a, 0x00c8, 0x2e37, 0x2009, 0x0000, 0x6816, + 0x2011, 0x0000, 0x2019, 0x0000, 0x20a9, 0x00ff, 0x2069, 0xa735, + 0x2d04, 0xa075, 0x0040, 0x2e4c, 0x704c, 0x1078, 0x2e56, 0xa210, + 0x7080, 0x1078, 0x2e56, 0xa318, 0x8d68, 0x00f0, 0x2e40, 0x2300, + 0xa218, 0x0e7f, 0x0d7f, 0x157f, 0x0078, 0x2bad, 0x0f7e, 0x017e, + 0xa07d, 0x0040, 0x2e65, 0x2001, 0x0000, 0x8000, 0x2f0c, 0x81ff, + 0x0040, 0x2e65, 0x2178, 0x0078, 0x2e5d, 0x017f, 0x0f7f, 0x007c, + 0x2069, 0xa714, 0x6910, 0x62a8, 0x0078, 0x2bad, 0x81ff, 0x00c0, + 0x2bd7, 0x6150, 0xa190, 0x29c0, 0x2214, 0xa294, 0x00ff, 0x6070, + 0xa084, 0xff00, 0xa215, 0x636c, 0x67cc, 0xd79c, 0x0040, 0x2e84, + 0x2031, 0x0001, 0x0078, 0x2e86, 0x2031, 0x0000, 0x7e3a, 0x7f3e, + 0x0078, 0x2bad, 0x6140, 0x6244, 0x2019, 0xa8a2, 0x231c, 0x0078, + 0x2bad, 0x127e, 0x2091, 0x8000, 0x6134, 0x6338, 0xa006, 0x2010, + 0x127f, 0x0078, 0x2bad, 0x1078, 0x35e4, 0x0040, 0x2bdb, 0x6244, + 0x6338, 0x0078, 0x2bad, 0x6140, 0x6244, 0x7824, 0x6042, 0x7b28, + 0x6346, 0x2069, 0xa652, 0x831f, 0xa305, 0x6816, 0x782c, 0x2069, + 0xa8a2, 0x2d1c, 0x206a, 0x0078, 0x2bad, 0x017e, 0x127e, 0x2091, + 0x8000, 0x7824, 0x6036, 0xd094, 0x0040, 0x2ec8, 0x7828, 0xa085, + 0x0001, 0x2009, 0xa8ab, 0x200a, 0x2001, 0xffff, 0x1078, 0x5ae6, + 0x782c, 0x603a, 0x127f, 0x017f, 0x0078, 0x2bad, 0x1078, 0x35e4, + 0x0040, 0x2bdb, 0x7828, 0xa00d, 0x0040, 0x2bdb, 0x782c, 0xa005, + 0x0040, 0x2bdb, 0x6244, 0x6146, 0x6338, 0x603a, 0x0078, 0x2bad, + 0x2001, 0xa600, 0x2004, 0xa086, 0x0003, 0x00c0, 0x2bd7, 0x0c7e, + 0x2061, 0x0100, 0x7924, 0x810f, 0xa18c, 0x00ff, 0xa196, 0x00ff, + 0x00c0, 0x2ef7, 0x6030, 0xa085, 0xff00, 0x0078, 0x2f06, 0xa182, + 0x007f, 0x00c8, 0x2f30, 0xa188, 0x29c0, 0x210c, 0xa18c, 0x00ff, + 0x6030, 0xa116, 0x0040, 0x2f30, 0x810f, 0xa105, 0x127e, 0x2091, + 0x8000, 0x007e, 0x1078, 0x76c7, 0x007f, 0x0040, 0x2f2c, 0x601a, + 0x600b, 0xbc09, 0x601f, 0x0001, 0x1078, 0x35ba, 0x0040, 0x2f33, + 0x6837, 0x0000, 0x7007, 0x0003, 0x6833, 0x0000, 0x6838, 0xc0fd, + 0x683a, 0x701b, 0x2f8e, 0x2d00, 0x6012, 0x2009, 0x0032, 0x1078, + 0x775c, 0x127f, 0x0c7f, 0x007c, 0x127f, 0x0c7f, 0x0078, 0x2bd7, + 0x0c7f, 0x0078, 0x2bdb, 0x1078, 0x772d, 0x0078, 0x2f2c, 0x2001, + 0xa600, 0x2004, 0xa086, 0x0003, 0x00c0, 0x2bd7, 0x0c7e, 0x2061, + 0x0100, 0x7924, 0x810f, 0xa18c, 0x00ff, 0xa196, 0x00ff, 0x00c0, + 0x2f4e, 0x6030, 0xa085, 0xff00, 0x0078, 0x2f5d, 0xa182, 0x007f, + 0x00c8, 0x2f87, 0xa188, 0x29c0, 0x210c, 0xa18c, 0x00ff, 0x6030, + 0xa116, 0x0040, 0x2f87, 0x810f, 0xa105, 0x127e, 0x2091, 0x8000, + 0x007e, 0x1078, 0x76c7, 0x007f, 0x0040, 0x2f83, 0x601a, 0x600b, + 0xbc05, 0x601f, 0x0001, 0x1078, 0x35ba, 0x0040, 0x2f8a, 0x6837, + 0x0000, 0x7007, 0x0003, 0x6833, 0x0000, 0x6838, 0xc0fd, 0x683a, + 0x701b, 0x2f8e, 0x2d00, 0x6012, 0x2009, 0x0032, 0x1078, 0x775c, + 0x127f, 0x0c7f, 0x007c, 0x127f, 0x0c7f, 0x0078, 0x2bd7, 0x0c7f, + 0x0078, 0x2bdb, 0x1078, 0x772d, 0x0078, 0x2f83, 0x6830, 0xa086, + 0x0100, 0x0040, 0x2bd7, 0x0078, 0x2bad, 0x2061, 0xa933, 0x127e, + 0x2091, 0x8000, 0x6000, 0xd084, 0x0040, 0x2fa6, 0x6104, 0x6208, + 0x2019, 0xa612, 0x231c, 0x127f, 0x0078, 0x2bad, 0x127f, 0x0078, + 0x2bdb, 0x81ff, 0x00c0, 0x2bd7, 0x127e, 0x2091, 0x8000, 0x6248, + 0x6064, 0xa202, 0x0048, 0x2fbd, 0xa085, 0x0001, 0x1078, 0x256a, + 0x1078, 0x3c9e, 0x127f, 0x0078, 0x2bad, 0x127f, 0x0078, 0x2bdb, + 0x127e, 0x2091, 0x8000, 0x20a9, 0x0012, 0x2001, 0xa640, 0x20a0, + 0xa006, 0x40a4, 0x127f, 0x0078, 0x2bad, 0x7d38, 0x7c3c, 0x0078, + 0x2c5f, 0x7824, 0xa09c, 0x00ff, 0xa39a, 0x0003, 0x00c8, 0x2bd7, + 0x6250, 0xa084, 0xff00, 0x8007, 0xa206, 0x00c0, 0x2fe9, 0x2001, + 0xa640, 0x2009, 0x000c, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x0078, + 0x3608, 0x81ff, 0x00c0, 0x2bd7, 0x1078, 0x35e4, 0x0040, 0x2bdb, + 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x00c0, 0x2bd7, 0x0c7e, + 0x1078, 0x35ba, 0x0c7f, 0x0040, 0x2bd7, 0x6837, 0x0000, 0x6838, + 0xc0fd, 0x683a, 0x1078, 0x8e4a, 0x0040, 0x2bd7, 0x7007, 0x0003, + 0x701b, 0x300b, 0x007c, 0x6830, 0xa086, 0x0100, 0x0040, 0x2bd7, + 0xad80, 0x000e, 0x2009, 0x000c, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, + 0x0078, 0x3608, 0x1078, 0x35ba, 0x0040, 0x2bd7, 0x1078, 0x42dd, + 0x2009, 0x001c, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x1078, 0x3604, + 0x701b, 0x302b, 0x007c, 0xade8, 0x000d, 0x6800, 0xa005, 0x0040, + 0x2bdb, 0x6804, 0xd0ac, 0x0040, 0x3038, 0xd0a4, 0x0040, 0x2bdb, + 0xd094, 0x0040, 0x3043, 0x0c7e, 0x2061, 0x0100, 0x6104, 0xa18c, + 0xffdf, 0x6106, 0x0c7f, 0xd08c, 0x0040, 0x304e, 0x0c7e, 0x2061, + 0x0100, 0x6104, 0xa18d, 0x0010, 0x6106, 0x0c7f, 0x2009, 0x0100, + 0x210c, 0xa18a, 0x0002, 0x0048, 0x3063, 0xd084, 0x0040, 0x3063, + 0x6a28, 0xa28a, 0x007f, 0x00c8, 0x2bdb, 0xa288, 0x29c0, 0x210c, + 0xa18c, 0x00ff, 0x6156, 0xd0dc, 0x0040, 0x306c, 0x6828, 0xa08a, + 0x007f, 0x00c8, 0x2bdb, 0x6052, 0x6808, 0xa08a, 0x0100, 0x0048, + 0x2bdb, 0xa08a, 0x0841, 0x00c8, 0x2bdb, 0xa084, 0x0007, 0x00c0, + 0x2bdb, 0x680c, 0xa005, 0x0040, 0x2bdb, 0x6810, 0xa005, 0x0040, + 0x2bdb, 0x6848, 0x6940, 0xa10a, 0x00c8, 0x2bdb, 0x8001, 0x0040, + 0x2bdb, 0x684c, 0x6944, 0xa10a, 0x00c8, 0x2bdb, 0x8001, 0x0040, + 0x2bdb, 0x6804, 0xd0fc, 0x0040, 0x30c2, 0x1078, 0x35ba, 0x0040, + 0x2bd7, 0x2009, 0x0014, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0xa290, + 0x0038, 0xa399, 0x0000, 0x1078, 0x3604, 0x701b, 0x30a8, 0x007c, + 0xade8, 0x000d, 0x20a9, 0x0014, 0x2d98, 0x2069, 0xa66e, 0x2da0, + 0x53a3, 0x7010, 0xa0e8, 0x000d, 0x2001, 0xa672, 0x200c, 0xd1e4, + 0x0040, 0x30c2, 0x0c7e, 0x2061, 0x0100, 0x6004, 0xa085, 0x0b00, + 0x6006, 0x0c7f, 0x20a9, 0x001c, 0x2d98, 0x2069, 0xa652, 0x2da0, + 0x53a3, 0x6814, 0xa08c, 0x00ff, 0x6142, 0x8007, 0xa084, 0x00ff, + 0x6046, 0x1078, 0x4eae, 0x1078, 0x49ce, 0x1078, 0x4a3e, 0x6000, + 0xa086, 0x0000, 0x00c0, 0x314d, 0x6808, 0x602a, 0x1078, 0x21f7, + 0x6818, 0x691c, 0x6a20, 0x6b24, 0x8007, 0x810f, 0x8217, 0x831f, + 0x6016, 0x611a, 0x621e, 0x6322, 0x6c04, 0xd4f4, 0x0040, 0x30fa, + 0x6830, 0x6934, 0x6a38, 0x6b3c, 0x8007, 0x810f, 0x8217, 0x831f, + 0x0078, 0x30fc, 0xa084, 0xf0ff, 0x6006, 0x610a, 0x620e, 0x6312, + 0x1078, 0x5b19, 0x6904, 0xd1fc, 0x0040, 0x312f, 0x0c7e, 0x2009, + 0x0000, 0x20a9, 0x0001, 0x6b70, 0xd384, 0x0040, 0x312c, 0x0078, + 0x3116, 0x839d, 0x00c8, 0x312c, 0x3508, 0x8109, 0x1078, 0x5480, + 0x6878, 0x6016, 0x6874, 0x2008, 0xa084, 0xff00, 0x8007, 0x600a, + 0xa184, 0x00ff, 0x6006, 0x8108, 0x00c0, 0x312a, 0x6003, 0x0003, + 0x0078, 0x312c, 0x6003, 0x0001, 0x00f0, 0x3111, 0x0c7f, 0x0c7e, + 0x2061, 0x0100, 0x602f, 0x0040, 0x602f, 0x0000, 0x0c7f, 0x1078, + 0x3819, 0x0040, 0x313d, 0x1078, 0x256a, 0x60c0, 0xa005, 0x0040, + 0x3149, 0x6003, 0x0001, 0x2091, 0x301d, 0x1078, 0x4224, 0x0078, + 0x314d, 0x6003, 0x0004, 0x2091, 0x301d, 0x0078, 0x2bad, 0x6000, + 0xa086, 0x0000, 0x0040, 0x2bd7, 0x2069, 0xa652, 0x7830, 0x6842, + 0x7834, 0x6846, 0x6804, 0xd0fc, 0x0040, 0x3162, 0x2009, 0x0030, + 0x0078, 0x3164, 0x2009, 0x001c, 0x2d00, 0x7a2c, 0x7b28, 0x7c3c, + 0x7d38, 0x0078, 0x3608, 0xa006, 0x1078, 0x256a, 0x81ff, 0x00c0, + 0x2bd7, 0x1078, 0x42dd, 0x1078, 0x4224, 0x0078, 0x2bad, 0x81ff, + 0x00c0, 0x2bd7, 0x6184, 0x81ff, 0x0040, 0x3191, 0x703f, 0x0000, + 0x2001, 0xacc0, 0x2009, 0x0040, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, + 0x127e, 0x2091, 0x8000, 0x1078, 0x3608, 0x701b, 0x2baa, 0x127f, + 0x007c, 0x703f, 0x0001, 0x0d7e, 0x2069, 0xacc0, 0x20a9, 0x0040, + 0x20a1, 0xacc0, 0x2019, 0xffff, 0x43a4, 0x6550, 0xa588, 0x29c0, + 0x210c, 0xa18c, 0x00ff, 0x216a, 0xa00e, 0x2011, 0x0002, 0x2100, + 0xa506, 0x0040, 0x31c3, 0x1078, 0x45c4, 0x00c0, 0x31c3, 0x6014, + 0x821c, 0x0048, 0x31bb, 0xa398, 0xacc0, 0xa085, 0xff00, 0x8007, + 0x201a, 0x0078, 0x31c2, 0xa398, 0xacc0, 0x2324, 0xa4a4, 0xff00, + 0xa405, 0x201a, 0x8210, 0x8108, 0xa182, 0x0080, 0x00c8, 0x31ca, + 0x0078, 0x31a7, 0x8201, 0x8007, 0x2d0c, 0xa105, 0x206a, 0x0d7f, + 0x20a9, 0x0040, 0x20a1, 0xacc0, 0x2099, 0xacc0, 0x1078, 0x4281, + 0x0078, 0x3180, 0x1078, 0x35e4, 0x0040, 0x2bdb, 0x0c7e, 0x1078, + 0x35ba, 0x0c7f, 0x00c0, 0x31e8, 0x2009, 0x0002, 0x0078, 0x2bd7, + 0x2001, 0xa653, 0x2004, 0xd0b4, 0x0040, 0x320f, 0x6000, 0xd08c, + 0x00c0, 0x320f, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x00c0, + 0x320f, 0x6837, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x1078, 0x8e9e, + 0x00c0, 0x3206, 0x2009, 0x0003, 0x0078, 0x2bd7, 0x7007, 0x0003, + 0x701b, 0x320b, 0x007c, 0x1078, 0x35e4, 0x0040, 0x2bdb, 0x20a9, + 0x002b, 0x2c98, 0xade8, 0x0002, 0x2da0, 0x53a3, 0x20a9, 0x0004, + 0xac80, 0x0006, 0x2098, 0xad80, 0x0006, 0x20a0, 0x1078, 0x4281, + 0x20a9, 0x0004, 0xac80, 0x000a, 0x2098, 0xad80, 0x000a, 0x20a0, + 0x1078, 0x4281, 0x2d00, 0x2009, 0x002b, 0x7a2c, 0x7b28, 0x7c3c, + 0x7d38, 0x0078, 0x3608, 0x81ff, 0x00c0, 0x2bd7, 0x1078, 0x35d2, + 0x0040, 0x2bdb, 0x1078, 0x47bd, 0x0078, 0x2bad, 0x81ff, 0x00c0, + 0x2bd7, 0x7828, 0xa08a, 0x1000, 0x00c8, 0x2bdb, 0x1078, 0x35e4, + 0x0040, 0x2bdb, 0x1078, 0x482f, 0x0040, 0x2bd7, 0x2019, 0x0004, + 0x1078, 0x47d3, 0x7924, 0x810f, 0x7a28, 0x1078, 0x3259, 0x0078, + 0x2bad, 0xa186, 0x00ff, 0x0040, 0x3261, 0x1078, 0x3271, 0x0078, + 0x3270, 0x2029, 0x007e, 0x2061, 0xa600, 0x6450, 0x2400, 0xa506, + 0x0040, 0x326d, 0x2508, 0x1078, 0x3271, 0x8529, 0x00c8, 0x3266, + 0x007c, 0x1078, 0x45c4, 0x00c0, 0x327c, 0x2200, 0x8003, 0x800b, + 0x810b, 0xa108, 0x1078, 0x5a52, 0x007c, 0x81ff, 0x00c0, 0x2bd7, + 0x1078, 0x35d2, 0x0040, 0x2bdb, 0x1078, 0x4673, 0x0040, 0x2bd7, + 0x1078, 0x47c8, 0x0078, 0x2bad, 0x81ff, 0x00c0, 0x2bd7, 0x1078, + 0x35d2, 0x0040, 0x2bdb, 0x1078, 0x4673, 0x0040, 0x2bd7, 0x1078, + 0x47b2, 0x0078, 0x2bad, 0x6100, 0x0078, 0x2bad, 0x1078, 0x35e4, + 0x0040, 0x2bdb, 0x2001, 0xa600, 0x2004, 0xa086, 0x0003, 0x00c0, + 0x2bd7, 0x0d7e, 0xace8, 0x000a, 0x7924, 0xd184, 0x0040, 0x32b2, + 0xace8, 0x0006, 0x680c, 0x8007, 0x783e, 0x6808, 0x8007, 0x783a, + 0x6b04, 0x831f, 0x6a00, 0x8217, 0x0d7f, 0x6100, 0xa18c, 0x0200, + 0x0078, 0x2bad, 0xa006, 0x1078, 0x256a, 0x7824, 0xa084, 0x00ff, + 0xa086, 0x00ff, 0x0040, 0x32cf, 0x81ff, 0x00c0, 0x2bd7, 0x1078, + 0x42dd, 0x7828, 0xa08a, 0x1000, 0x00c8, 0x2bdb, 0x7924, 0xa18c, + 0xff00, 0x810f, 0xa186, 0x00ff, 0x0040, 0x32e5, 0xa182, 0x007f, + 0x00c8, 0x2bdb, 0x2100, 0x1078, 0x2564, 0x027e, 0x0c7e, 0x127e, + 0x2091, 0x8000, 0x2061, 0xa8c4, 0x601b, 0x0000, 0x601f, 0x0000, + 0x2011, 0x0003, 0x1078, 0x70e0, 0x2011, 0x0002, 0x1078, 0x70ea, + 0x1078, 0x6fc4, 0x037e, 0x2019, 0x0000, 0x1078, 0x7058, 0x037f, + 0x2061, 0x0100, 0x6030, 0xa084, 0x00ff, 0x810f, 0xa105, 0x604a, + 0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x002d, 0x2011, 0x4259, + 0x1078, 0x5add, 0x7924, 0xa18c, 0xff00, 0x810f, 0x7a28, 0x1078, + 0x3259, 0x127f, 0x0c7f, 0x027f, 0x0078, 0x2bad, 0x7924, 0xa18c, + 0xff00, 0x810f, 0x0c7e, 0x1078, 0x455c, 0x2c08, 0x0c7f, 0x00c0, + 0x2bdb, 0x0078, 0x2bad, 0x81ff, 0x0040, 0x3332, 0x2009, 0x0001, + 0x0078, 0x2bd7, 0x60cc, 0xd09c, 0x00c0, 0x333a, 0x2009, 0x0005, + 0x0078, 0x2bd7, 0x1078, 0x35ba, 0x00c0, 0x3342, 0x2009, 0x0002, + 0x0078, 0x2bd7, 0x7924, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x1078, + 0x3604, 0x701b, 0x334c, 0x007c, 0x2009, 0x0080, 0x1078, 0x45c4, + 0x00c0, 0x3359, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x0040, + 0x335d, 0x2021, 0x400a, 0x0078, 0x2baf, 0x0d7e, 0xade8, 0x000d, + 0x6900, 0x6a08, 0x6b0c, 0x6c10, 0x6d14, 0x6e18, 0x6820, 0xa0be, + 0x0100, 0x0040, 0x33d0, 0xa0be, 0x0112, 0x0040, 0x33d0, 0xa0be, + 0x0113, 0x0040, 0x33d0, 0xa0be, 0x0114, 0x0040, 0x33d0, 0xa0be, + 0x0117, 0x0040, 0x33d0, 0xa0be, 0x011a, 0x0040, 0x33d0, 0xa0be, + 0x0121, 0x0040, 0x33c6, 0xa0be, 0x0131, 0x0040, 0x33c6, 0xa0be, + 0x0171, 0x0040, 0x33d0, 0xa0be, 0x0173, 0x0040, 0x33d0, 0xa0be, + 0x01a1, 0x00c0, 0x3398, 0x6830, 0x8007, 0x6832, 0x0078, 0x33d6, + 0xa0be, 0x0212, 0x0040, 0x33cc, 0xa0be, 0x0213, 0x0040, 0x33cc, + 0xa0be, 0x0214, 0x0040, 0x33be, 0xa0be, 0x0217, 0x0040, 0x33b8, + 0xa0be, 0x021a, 0x00c0, 0x33b1, 0x6838, 0x8007, 0x683a, 0x0078, + 0x33d0, 0xa0be, 0x0300, 0x0040, 0x33d0, 0x0d7f, 0x0078, 0x2bdb, + 0xad80, 0x0010, 0x20a9, 0x0007, 0x1078, 0x3418, 0xad80, 0x000e, + 0x20a9, 0x0001, 0x1078, 0x3418, 0x0078, 0x33d0, 0xad80, 0x000c, + 0x1078, 0x3426, 0x0078, 0x33d6, 0xad80, 0x000e, 0x1078, 0x3426, + 0xad80, 0x000c, 0x20a9, 0x0001, 0x1078, 0x3418, 0x0c7e, 0x1078, + 0x35ba, 0x0040, 0x3409, 0x6838, 0xc0fd, 0x683a, 0x6837, 0x0119, + 0x6853, 0x0000, 0x684f, 0x0020, 0x685b, 0x0001, 0x810b, 0x697e, + 0x6883, 0x0000, 0x6a86, 0x6b8a, 0x6c8e, 0x6d92, 0x6996, 0x689b, + 0x0000, 0x0c7f, 0x0d7f, 0x6837, 0x0000, 0x6838, 0xc0fd, 0x683a, + 0x6823, 0x0000, 0x6804, 0x2068, 0x1078, 0x8e66, 0x00c0, 0x3404, + 0x2009, 0x0003, 0x0078, 0x2bd7, 0x7007, 0x0003, 0x701b, 0x340f, + 0x007c, 0x0c7f, 0x0d7f, 0x2009, 0x0002, 0x0078, 0x2bd7, 0x6820, + 0xa086, 0x8001, 0x00c0, 0x2bad, 0x2009, 0x0004, 0x0078, 0x2bd7, + 0x017e, 0x2008, 0x2044, 0x8000, 0x204c, 0x8000, 0x290a, 0x8108, + 0x280a, 0x8108, 0x00f0, 0x341a, 0x017f, 0x007c, 0x017e, 0x0a7e, + 0x0b7e, 0x2008, 0x2044, 0x8000, 0x204c, 0x8000, 0x2054, 0x8000, + 0x205c, 0x2b0a, 0x8108, 0x2a0a, 0x8108, 0x290a, 0x8108, 0x280a, + 0x0b7f, 0x0a7f, 0x017f, 0x007c, 0x81ff, 0x0040, 0x3443, 0x2009, + 0x0001, 0x0078, 0x2bd7, 0x60cc, 0xd09c, 0x00c0, 0x344b, 0x2009, + 0x0005, 0x0078, 0x2bd7, 0x7924, 0x2140, 0xa18c, 0xff00, 0x810f, + 0xa182, 0x0080, 0x0048, 0x2bdb, 0xa182, 0x00ff, 0x00c8, 0x2bdb, + 0x7a2c, 0x7b28, 0x606c, 0xa306, 0x00c0, 0x3466, 0x6070, 0xa24e, + 0x0040, 0x2bdb, 0xa9cc, 0xff00, 0x0040, 0x2bdb, 0x0c7e, 0x1078, + 0x350f, 0x2c68, 0x0c7f, 0x0040, 0x349e, 0xa0c6, 0x4000, 0x00c0, + 0x3484, 0x0c7e, 0x007e, 0x2d60, 0x2009, 0x0000, 0x1078, 0x489b, + 0x00c0, 0x347b, 0xc185, 0x6000, 0xd0bc, 0x0040, 0x3480, 0xc18d, + 0x007f, 0x0c7f, 0x0078, 0x349b, 0xa0c6, 0x4007, 0x00c0, 0x348b, + 0x2408, 0x0078, 0x349b, 0xa0c6, 0x4008, 0x00c0, 0x3493, 0x2708, + 0x2610, 0x0078, 0x349b, 0xa0c6, 0x4009, 0x00c0, 0x3499, 0x0078, + 0x349b, 0x2001, 0x4006, 0x2020, 0x0078, 0x2baf, 0x2d00, 0x7022, + 0x017e, 0x0b7e, 0x0c7e, 0x0e7e, 0x2c70, 0x1078, 0x76c7, 0x0040, + 0x34e4, 0x2d00, 0x601a, 0x2001, 0xa657, 0x2004, 0xa084, 0x00ff, + 0x6842, 0x2e58, 0x0e7f, 0x0e7e, 0x0c7e, 0x1078, 0x35ba, 0x0c7f, + 0x2b70, 0x00c0, 0x34c5, 0x1078, 0x772d, 0x0e7f, 0x0c7f, 0x0b7f, + 0x017f, 0x2009, 0x0002, 0x0078, 0x2bd7, 0x6837, 0x0000, 0x2d00, + 0x6012, 0x6833, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x127e, 0x2091, + 0x8000, 0x1078, 0x2880, 0x127f, 0x601f, 0x0001, 0x2001, 0x0000, + 0x1078, 0x44ee, 0x2001, 0x0002, 0x1078, 0x4502, 0x2009, 0x0002, + 0x1078, 0x775c, 0xa085, 0x0001, 0x0e7f, 0x0c7f, 0x0b7f, 0x017f, + 0x00c0, 0x34ee, 0x2009, 0x0003, 0x0078, 0x2bd7, 0x7007, 0x0003, + 0x701b, 0x34f3, 0x007c, 0x6830, 0xa086, 0x0100, 0x7020, 0x2060, + 0x00c0, 0x3501, 0x2009, 0x0004, 0x6204, 0xa294, 0x00ff, 0x0078, + 0x2bd7, 0x2009, 0x0000, 0x1078, 0x489b, 0x00c0, 0x3508, 0xc185, + 0x6000, 0xd0bc, 0x0040, 0x350d, 0xc18d, 0x0078, 0x2bad, 0x0e7e, + 0x0d7e, 0x2029, 0x0000, 0x2021, 0x0080, 0x20a9, 0x007f, 0x2071, + 0xa7b5, 0x2e04, 0xa005, 0x00c0, 0x3524, 0x2100, 0xa406, 0x00c0, + 0x3555, 0x2428, 0x0078, 0x3555, 0x2068, 0x6f10, 0x2700, 0xa306, + 0x00c0, 0x3546, 0x6e14, 0x2600, 0xa206, 0x00c0, 0x3546, 0x2400, + 0xa106, 0x00c0, 0x3542, 0x2d60, 0xd884, 0x0040, 0x356a, 0x6004, + 0xa084, 0x00ff, 0xa086, 0x0006, 0x00c0, 0x356a, 0x2001, 0x4000, + 0x0078, 0x356b, 0x2001, 0x4007, 0x0078, 0x356b, 0x2400, 0xa106, + 0x00c0, 0x3555, 0x6e14, 0x87ff, 0x00c0, 0x3551, 0x86ff, 0x0040, + 0x3521, 0x2001, 0x4008, 0x0078, 0x356b, 0x8420, 0x8e70, 0x00f0, + 0x3519, 0x85ff, 0x00c0, 0x3564, 0x2001, 0x4009, 0x0078, 0x356b, + 0x2001, 0x0001, 0x0078, 0x356b, 0x1078, 0x455c, 0x00c0, 0x3560, + 0x6312, 0x6216, 0xa006, 0xa005, 0x0d7f, 0x0e7f, 0x007c, 0x81ff, + 0x00c0, 0x2bd7, 0x1078, 0x35ba, 0x0040, 0x2bd7, 0x6837, 0x0000, + 0x6838, 0xc0fd, 0x683a, 0x7824, 0xa005, 0x0040, 0x2bdb, 0xa096, + 0x00ff, 0x0040, 0x3587, 0xa092, 0x0004, 0x00c8, 0x2bdb, 0x2010, + 0x2d18, 0x1078, 0x282f, 0x0040, 0x2bd7, 0x7007, 0x0003, 0x701b, + 0x3592, 0x007c, 0x6830, 0xa086, 0x0100, 0x0040, 0x2bd7, 0x0078, + 0x2bad, 0x7924, 0xa18c, 0xff00, 0x810f, 0xa182, 0x0080, 0x0048, + 0x2bdb, 0xa182, 0x00ff, 0x00c8, 0x2bdb, 0x127e, 0x2091, 0x8000, + 0x1078, 0x8d4b, 0x00c0, 0x35b7, 0xa190, 0xa735, 0x2204, 0xa065, + 0x0040, 0x35b7, 0x1078, 0x42f8, 0x127f, 0x0078, 0x2bad, 0x127f, + 0x0078, 0x2bd7, 0x1078, 0x138b, 0x0040, 0x35d1, 0xa006, 0x6802, + 0x7010, 0xa005, 0x00c0, 0x35c9, 0x2d00, 0x7012, 0x7016, 0x0078, + 0x35cf, 0x7014, 0x6802, 0x2060, 0x2d00, 0x6006, 0x7016, 0xad80, + 0x000d, 0x007c, 0x7924, 0x810f, 0xa18c, 0x00ff, 0x1078, 0x45c4, + 0x00c0, 0x35e1, 0x7e28, 0xa684, 0x3fff, 0xa082, 0x4000, 0x0048, + 0x35e2, 0xa066, 0x8cff, 0x007c, 0x7e24, 0x860f, 0xa18c, 0x00ff, + 0x1078, 0x45c4, 0x00c0, 0x35f2, 0xa6b4, 0x00ff, 0xa682, 0x4000, + 0x0048, 0x35f3, 0xa066, 0x8cff, 0x007c, 0x017e, 0x7110, 0x81ff, + 0x0040, 0x3600, 0x2168, 0x6904, 0x1078, 0x13a4, 0x0078, 0x35f7, + 0x7112, 0x7116, 0x017f, 0x007c, 0x2031, 0x0001, 0x0078, 0x360a, + 0x2031, 0x0000, 0x2061, 0xa6d2, 0x6606, 0x6112, 0x600e, 0x6226, + 0x632a, 0x642e, 0x6532, 0x2c10, 0x1078, 0x13db, 0x7007, 0x0002, + 0x701b, 0x2bad, 0x007c, 0x0f7e, 0x127e, 0x2091, 0x8000, 0x2079, + 0x0000, 0x2001, 0xa690, 0x2004, 0xa005, 0x00c0, 0x3636, 0x0068, + 0x3636, 0x7818, 0xd084, 0x00c0, 0x3636, 0x7a22, 0x7b26, 0x7c2a, + 0x781b, 0x0001, 0x2091, 0x4080, 0x0078, 0x365b, 0x017e, 0x0c7e, + 0x0e7e, 0x2071, 0xa682, 0x7138, 0xa182, 0x0008, 0x0048, 0x3644, + 0x7030, 0x2060, 0x0078, 0x3655, 0x7030, 0xa0e0, 0x0008, 0xac82, + 0xa6d2, 0x0048, 0x364d, 0x2061, 0xa692, 0x2c00, 0x7032, 0x81ff, + 0x00c0, 0x3653, 0x7036, 0x8108, 0x713a, 0x2262, 0x6306, 0x640a, + 0x0e7f, 0x0c7f, 0x017f, 0x127f, 0x0f7f, 0x007c, 0x0e7e, 0x2071, + 0xa682, 0x7038, 0xa005, 0x0040, 0x3697, 0x127e, 0x2091, 0x8000, + 0x0068, 0x3696, 0x0f7e, 0x2079, 0x0000, 0x7818, 0xd084, 0x00c0, + 0x3695, 0x0c7e, 0x7034, 0x2060, 0x2c04, 0x7822, 0x6004, 0x7826, + 0x6008, 0x782a, 0x781b, 0x0001, 0x2091, 0x4080, 0x7038, 0x8001, + 0x703a, 0xa005, 0x00c0, 0x368b, 0x7033, 0xa692, 0x7037, 0xa692, + 0x0c7f, 0x0078, 0x3695, 0xac80, 0x0008, 0xa0fa, 0xa6d2, 0x0048, + 0x3693, 0x2001, 0xa692, 0x7036, 0x0c7f, 0x0f7f, 0x127f, 0x0e7f, + 0x007c, 0x027e, 0x2001, 0xa653, 0x2004, 0xd0c4, 0x0040, 0x36a4, + 0x2011, 0x8014, 0x1078, 0x361b, 0x027f, 0x007c, 0x81ff, 0x00c0, + 0x2bd7, 0x127e, 0x2091, 0x8000, 0x6030, 0xc08d, 0xc085, 0xc0ac, + 0x6032, 0x1078, 0x4224, 0x127f, 0x0078, 0x2bad, 0x81ff, 0x00c0, + 0x2bd7, 0x6000, 0xa086, 0x0003, 0x00c0, 0x2bd7, 0x2001, 0xa653, + 0x2004, 0xd0ac, 0x00c0, 0x2bd7, 0x1078, 0x35e4, 0x0040, 0x2bdb, + 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x00c0, 0x36d3, 0x7828, + 0xa005, 0x0040, 0x2bad, 0x0c7e, 0x1078, 0x35ba, 0x0c7f, 0x0040, + 0x2bd7, 0x6837, 0x0000, 0x6833, 0x0000, 0x6838, 0xc0fd, 0x683a, + 0x1078, 0x8f12, 0x0040, 0x2bd7, 0x7007, 0x0003, 0x701b, 0x36e9, + 0x007c, 0x6830, 0xa086, 0x0100, 0x0040, 0x2bd7, 0x0078, 0x2bad, + 0x2001, 0xa600, 0x2004, 0xa086, 0x0003, 0x00c0, 0x2bd7, 0x7f24, + 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x1078, 0x35ba, 0x0040, 0x2bd7, + 0x2009, 0x0000, 0x2031, 0x0000, 0x7023, 0x0000, 0x702f, 0x0000, + 0xad80, 0x0005, 0x7026, 0x20a0, 0x1078, 0x45c4, 0x00c0, 0x376d, + 0x6004, 0xa0c4, 0x00ff, 0xa8c6, 0x0006, 0x0040, 0x371d, 0xa0c4, + 0xff00, 0xa8c6, 0x0600, 0x00c0, 0x376d, 0x2001, 0xa653, 0x2004, + 0xd0ac, 0x00c0, 0x372a, 0x1078, 0x489b, 0x00c0, 0x372a, 0xd79c, + 0x0040, 0x376d, 0xd794, 0x00c0, 0x3730, 0xd784, 0x0040, 0x373c, + 0xac80, 0x0006, 0x2098, 0x3400, 0x20a9, 0x0004, 0x53a3, 0x1078, + 0x3426, 0xd794, 0x0040, 0x3745, 0xac80, 0x000a, 0x2098, 0x3400, + 0x20a9, 0x0004, 0x53a3, 0x1078, 0x3426, 0x21a2, 0xd794, 0x0040, + 0x3765, 0xac80, 0x0000, 0x2098, 0x94a0, 0x20a9, 0x0002, 0x53a3, + 0xac80, 0x0003, 0x20a6, 0x94a0, 0xac80, 0x0004, 0x2098, 0x3400, + 0x20a9, 0x0002, 0x53a3, 0x1078, 0x3418, 0xac80, 0x0026, 0x2098, + 0x20a9, 0x0002, 0x53a3, 0x0078, 0x3766, 0x94a0, 0xd794, 0x0040, + 0x376b, 0xa6b0, 0x000b, 0xa6b0, 0x0005, 0x8108, 0xd78c, 0x0040, + 0x3777, 0xa186, 0x0100, 0x0040, 0x3788, 0x0078, 0x377b, 0xa186, + 0x007e, 0x0040, 0x3788, 0xd794, 0x0040, 0x3782, 0xa686, 0x0020, + 0x0078, 0x3784, 0xa686, 0x0028, 0x0040, 0x3791, 0x0078, 0x370c, + 0x86ff, 0x00c0, 0x378f, 0x7120, 0x810b, 0x0078, 0x2bad, 0x702f, + 0x0001, 0x711e, 0x7020, 0xa600, 0x7022, 0x772a, 0x2061, 0xa6d2, + 0x6007, 0x0000, 0x6612, 0x7024, 0x600e, 0x6226, 0x632a, 0x642e, + 0x6532, 0x2c10, 0x1078, 0x13db, 0x7007, 0x0002, 0x701b, 0x37a9, + 0x007c, 0x702c, 0xa005, 0x00c0, 0x37bb, 0x711c, 0x7024, 0x20a0, + 0x7728, 0x2031, 0x0000, 0x2061, 0xa6d2, 0x6224, 0x6328, 0x642c, + 0x6530, 0x0078, 0x370c, 0x7120, 0x810b, 0x0078, 0x2bad, 0x2029, + 0x007e, 0x7924, 0x7a28, 0x7b2c, 0x7c38, 0xa184, 0xff00, 0x8007, + 0xa0e2, 0x0020, 0x0048, 0x2bdb, 0xa502, 0x0048, 0x2bdb, 0xa184, + 0x00ff, 0xa0e2, 0x0020, 0x0048, 0x2bdb, 0xa502, 0x0048, 0x2bdb, + 0xa284, 0xff00, 0x8007, 0xa0e2, 0x0020, 0x0048, 0x2bdb, 0xa502, + 0x0048, 0x2bdb, 0xa284, 0x00ff, 0xa0e2, 0x0020, 0x0048, 0x2bdb, + 0xa502, 0x0048, 0x2bdb, 0xa384, 0xff00, 0x8007, 0xa0e2, 0x0020, + 0x0048, 0x2bdb, 0xa502, 0x0048, 0x2bdb, 0xa384, 0x00ff, 0xa0e2, + 0x0020, 0x0048, 0x2bdb, 0xa502, 0x0048, 0x2bdb, 0xa484, 0xff00, + 0x8007, 0xa0e2, 0x0020, 0x0048, 0x2bdb, 0xa502, 0x0048, 0x2bdb, + 0xa484, 0x00ff, 0xa0e2, 0x0020, 0x0048, 0x2bdb, 0xa502, 0x0048, + 0x2bdb, 0x2061, 0xa8a5, 0x6102, 0x6206, 0x630a, 0x640e, 0x0078, + 0x2bad, 0x007e, 0x2001, 0xa653, 0x2004, 0xd0cc, 0x007f, 0x007c, + 0x007e, 0x2001, 0xa672, 0x2004, 0xd0bc, 0x007f, 0x007c, 0x6164, + 0x7a24, 0x6300, 0x82ff, 0x00c0, 0x3830, 0x7926, 0x0078, 0x2bad, + 0x83ff, 0x00c0, 0x2bdb, 0x2001, 0xfff0, 0xa200, 0x00c8, 0x2bdb, + 0x2019, 0xffff, 0x6068, 0xa302, 0xa200, 0x0048, 0x2bdb, 0x7926, + 0x6266, 0x0078, 0x2bad, 0x2001, 0xa600, 0x2004, 0xa086, 0x0003, + 0x00c0, 0x2bd7, 0x7c28, 0x7d24, 0x7e38, 0x7f2c, 0x1078, 0x35ba, + 0x0040, 0x2bd7, 0x2009, 0x0000, 0x2019, 0x0000, 0x7023, 0x0000, + 0x702f, 0x0000, 0xad80, 0x0003, 0x7026, 0x20a0, 0xa1e0, 0xa735, + 0x2c64, 0x8cff, 0x0040, 0x387d, 0x6004, 0xa084, 0x00ff, 0xa086, + 0x0006, 0x0040, 0x3872, 0x6004, 0xa084, 0xff00, 0xa086, 0x0600, + 0x00c0, 0x387d, 0x6014, 0x20a2, 0x94a0, 0x6010, 0x8007, 0xa105, + 0x8007, 0x20a2, 0x94a0, 0xa398, 0x0002, 0x8108, 0xa182, 0x00ff, + 0x0040, 0x3888, 0xa386, 0x002a, 0x0040, 0x3891, 0x0078, 0x385e, + 0x83ff, 0x00c0, 0x388f, 0x7120, 0x810c, 0x0078, 0x2bad, 0x702f, + 0x0001, 0x711e, 0x7020, 0xa300, 0x7022, 0x2061, 0xa6d2, 0x6007, + 0x0000, 0x6312, 0x7024, 0x600e, 0x6426, 0x652a, 0x662e, 0x6732, + 0x2c10, 0x1078, 0x13db, 0x7007, 0x0002, 0x701b, 0x38a8, 0x007c, + 0x702c, 0xa005, 0x00c0, 0x38b9, 0x711c, 0x7024, 0x20a0, 0x2019, + 0x0000, 0x2061, 0xa6d2, 0x6424, 0x6528, 0x662c, 0x6730, 0x0078, + 0x385e, 0x7120, 0x810c, 0x0078, 0x2bad, 0x81ff, 0x00c0, 0x2bd7, + 0x60cc, 0xd09c, 0x0040, 0x2bd7, 0x1078, 0x35ba, 0x0040, 0x2bd7, + 0x7924, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x1078, 0x3604, 0x701b, + 0x38d2, 0x007c, 0x0d7e, 0xade8, 0x000d, 0x6828, 0xa0be, 0x7000, + 0x0040, 0x38e5, 0xa0be, 0x7100, 0x0040, 0x38e5, 0xa0be, 0x7200, + 0x0040, 0x38e5, 0x0d7f, 0x0078, 0x2bdb, 0x6820, 0x6924, 0x1078, + 0x254d, 0x00c0, 0x3910, 0x1078, 0x455c, 0x00c0, 0x3910, 0x7122, + 0x6612, 0x6516, 0x6e18, 0x0c7e, 0x1078, 0x35ba, 0x0040, 0x3910, + 0x1078, 0x35ba, 0x0040, 0x3910, 0x0c7f, 0x0d7f, 0x6837, 0x0000, + 0x6838, 0xc0fd, 0x683a, 0x6823, 0x0000, 0x6804, 0x2068, 0x1078, + 0x8e82, 0x0040, 0x2bd7, 0x7007, 0x0003, 0x701b, 0x3913, 0x007c, + 0x0d7f, 0x0078, 0x2bd7, 0x7120, 0x1078, 0x298e, 0x6820, 0xa086, + 0x8001, 0x0040, 0x2bd7, 0x2d00, 0x701e, 0x6804, 0xa080, 0x0002, + 0x007e, 0x20a9, 0x002a, 0x2098, 0x20a0, 0x1078, 0x4281, 0x007f, + 0xade8, 0x000d, 0x6a08, 0x6b0c, 0x6c10, 0x6d14, 0x2061, 0xa6d2, + 0x6007, 0x0000, 0x6e00, 0x6f28, 0xa7c6, 0x7000, 0x00c0, 0x393a, + 0x0078, 0x393e, 0xa7c6, 0x7100, 0x00c0, 0x3946, 0xa6c2, 0x0004, + 0x0048, 0x2bdb, 0x2009, 0x0004, 0x0078, 0x3608, 0xa7c6, 0x7200, + 0x00c0, 0x2bdb, 0xa6c2, 0x0054, 0x0048, 0x2bdb, 0x600e, 0x6013, + 0x002a, 0x6226, 0x632a, 0x642e, 0x6532, 0x2c10, 0x1078, 0x13db, + 0x7007, 0x0002, 0x701b, 0x395d, 0x007c, 0x701c, 0x2068, 0x6804, + 0xa080, 0x0001, 0x2004, 0xa080, 0x0002, 0x007e, 0x20a9, 0x002a, + 0x2098, 0x20a0, 0x1078, 0x4281, 0x007f, 0x2009, 0x002a, 0x2061, + 0xa6d2, 0x6224, 0x6328, 0x642c, 0x6530, 0x0078, 0x3608, 0x81ff, + 0x00c0, 0x2bd7, 0x792c, 0x2001, 0xa89d, 0x2102, 0x1078, 0x35d2, + 0x0040, 0x2bdb, 0x1078, 0x4673, 0x0040, 0x2bd7, 0x127e, 0x2091, + 0x8000, 0x1078, 0x47de, 0x127f, 0x0078, 0x2bad, 0x7824, 0xd08c, + 0x00c0, 0x3995, 0xd084, 0x0040, 0x31da, 0x1078, 0x35e4, 0x0040, + 0x2bdb, 0x0c7e, 0x1078, 0x35ba, 0x0c7f, 0x00c0, 0x39a3, 0x2009, + 0x0002, 0x0078, 0x2bd7, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, + 0x0040, 0x39b0, 0xa08e, 0x0004, 0x0040, 0x39b0, 0xa08e, 0x0005, + 0x00c0, 0x39dd, 0x7824, 0xd08c, 0x0040, 0x39bb, 0x6000, 0xc08c, + 0x6002, 0x0078, 0x39c5, 0x2001, 0xa653, 0x2004, 0xd0b4, 0x0040, + 0x320f, 0x6000, 0xd08c, 0x00c0, 0x320f, 0x6837, 0x0000, 0x6838, + 0xc0fd, 0x683a, 0x1078, 0x8e9e, 0x00c0, 0x39d2, 0x2009, 0x0003, + 0x0078, 0x2bd7, 0x7007, 0x0003, 0x701b, 0x39d7, 0x007c, 0x1078, + 0x35e4, 0x0040, 0x2bdb, 0x0078, 0x320f, 0x2009, 0xa62f, 0x210c, + 0x81ff, 0x0040, 0x39e7, 0x2009, 0x0001, 0x0078, 0x2bd7, 0x2001, + 0xa600, 0x2004, 0xa086, 0x0003, 0x0040, 0x39f2, 0x2009, 0x0007, + 0x0078, 0x2bd7, 0x2001, 0xa653, 0x2004, 0xd0ac, 0x0040, 0x39fc, + 0x2009, 0x0008, 0x0078, 0x2bd7, 0x609c, 0xd0a4, 0x00c0, 0x3a03, + 0xd0ac, 0x00c0, 0x320f, 0x6837, 0x0000, 0x6833, 0x0000, 0x6838, + 0xc0fd, 0x683a, 0x1078, 0x8f12, 0x00c0, 0x3a12, 0x2009, 0x0003, + 0x0078, 0x2bd7, 0x7007, 0x0003, 0x701b, 0x3a17, 0x007c, 0x6830, + 0xa086, 0x0100, 0x00c0, 0x3a20, 0x2009, 0x0004, 0x0078, 0x2bd7, + 0x1078, 0x35e4, 0x0040, 0x2bdb, 0x0078, 0x39b2, 0x81ff, 0x2009, + 0x0001, 0x00c0, 0x2bd7, 0x6000, 0xa086, 0x0003, 0x2009, 0x0007, + 0x00c0, 0x2bd7, 0x2001, 0xa653, 0x2004, 0xd0ac, 0x2009, 0x0008, + 0x00c0, 0x2bd7, 0x1078, 0x35e4, 0x0040, 0x2bdb, 0x6004, 0xa084, + 0x00ff, 0xa086, 0x0006, 0x2009, 0x0009, 0x00c0, 0x2bd7, 0x0c7e, + 0x1078, 0x35ba, 0x0c7f, 0x2009, 0x0002, 0x0040, 0x2bd7, 0x6837, + 0x0000, 0x6833, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x7928, 0xa194, + 0xff00, 0xa18c, 0x00ff, 0xa006, 0x82ff, 0x00c0, 0x3a65, 0xc0ed, + 0x6952, 0x792c, 0x6956, 0x0078, 0x3a6e, 0xa28e, 0x0100, 0x00c0, + 0x2bdb, 0xc0e5, 0x6853, 0x0000, 0x6857, 0x0000, 0x683e, 0x1078, + 0x90bd, 0x2009, 0x0003, 0x0040, 0x2bd7, 0x7007, 0x0003, 0x701b, + 0x3a7a, 0x007c, 0x6830, 0xa086, 0x0100, 0x2009, 0x0004, 0x0040, + 0x2bd7, 0x0078, 0x2bad, 0x81ff, 0x2009, 0x0001, 0x00c0, 0x2bd7, + 0x6000, 0xa086, 0x0003, 0x2009, 0x0007, 0x00c0, 0x2bd7, 0x1078, + 0x35e4, 0x0040, 0x2bdb, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, + 0x2009, 0x0009, 0x00c0, 0x2bd7, 0x0c7e, 0x1078, 0x35ba, 0x0c7f, + 0x2009, 0x0002, 0x0040, 0x2bd7, 0xad80, 0x000f, 0x2009, 0x0008, + 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x1078, 0x3604, 0x701b, 0x3ab1, + 0x007c, 0x0d7e, 0xade8, 0x000f, 0x6800, 0xa086, 0x0500, 0x00c0, + 0x3ac4, 0x6804, 0xa005, 0x00c0, 0x3ac4, 0x6808, 0xa084, 0xff00, + 0x00c0, 0x3ac4, 0x0078, 0x3ac7, 0x0d7f, 0x00c0, 0x2bdb, 0x0d7f, + 0x6837, 0x0000, 0x6833, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x0c7e, + 0x1078, 0x35e4, 0x00c0, 0x3ad7, 0x0c7f, 0x0078, 0x2bdb, 0x1078, + 0x9119, 0x2009, 0x0003, 0x0c7f, 0x0040, 0x2bd7, 0x7007, 0x0003, + 0x701b, 0x3ae3, 0x007c, 0x6830, 0xa086, 0x0100, 0x2009, 0x0004, + 0x0040, 0x2bd7, 0x0078, 0x2bad, 0x127e, 0x0c7e, 0x0e7e, 0x2061, + 0x0100, 0x2071, 0xa600, 0x6044, 0xd0a4, 0x00c0, 0x3b15, 0xd084, + 0x0040, 0x3afe, 0x1078, 0x3c75, 0x0078, 0x3b11, 0xd08c, 0x0040, + 0x3b05, 0x1078, 0x3b8c, 0x0078, 0x3b11, 0xd094, 0x0040, 0x3b0c, + 0x1078, 0x3b60, 0x0078, 0x3b11, 0xd09c, 0x0040, 0x3b11, 0x1078, + 0x3b1f, 0x0e7f, 0x0c7f, 0x127f, 0x007c, 0x017e, 0x6128, 0xd19c, + 0x00c0, 0x3b1c, 0xc19d, 0x612a, 0x017f, 0x0078, 0x3b11, 0x624c, + 0xa286, 0xf0f0, 0x00c0, 0x3b30, 0x6048, 0xa086, 0xf0f0, 0x0040, + 0x3b30, 0x624a, 0x6043, 0x0090, 0x6043, 0x0010, 0x0078, 0x3b5f, + 0xa294, 0xff00, 0xa296, 0xf700, 0x0040, 0x3b45, 0x7134, 0xd1a4, + 0x00c0, 0x3b45, 0x6240, 0xa294, 0x0010, 0x0040, 0x3b45, 0x2009, + 0x00f7, 0x1078, 0x42a1, 0x0078, 0x3b5f, 0x6043, 0x0040, 0x6043, + 0x0000, 0x7077, 0x0000, 0x708f, 0x0001, 0x70b3, 0x0000, 0x70cf, + 0x0000, 0x2009, 0xacc0, 0x200b, 0x0000, 0x7087, 0x0000, 0x707b, + 0x000f, 0x2009, 0x000f, 0x2011, 0x41d5, 0x1078, 0x5add, 0x007c, + 0x157e, 0x7078, 0xa005, 0x00c0, 0x3b8a, 0x2011, 0x41d5, 0x1078, + 0x5a45, 0x6040, 0xa094, 0x0010, 0xa285, 0x0020, 0x6042, 0x20a9, + 0x00c8, 0x6044, 0xd08c, 0x00c0, 0x3b83, 0x00f0, 0x3b71, 0x6242, + 0x708b, 0x0000, 0x6040, 0xa094, 0x0010, 0xa285, 0x0080, 0x6042, + 0x6242, 0x0078, 0x3b8a, 0x6242, 0x708b, 0x0000, 0x707f, 0x0000, + 0x0078, 0x3b8a, 0x157f, 0x007c, 0x707c, 0xa08a, 0x0003, 0x00c8, + 0x3b95, 0x1079, 0x3b98, 0x0078, 0x3b97, 0x1078, 0x1332, 0x007c, + 0x3b9b, 0x3bea, 0x3c74, 0x0f7e, 0x707f, 0x0001, 0x20e1, 0xa000, + 0x20e1, 0x8700, 0x1078, 0x21f7, 0x20e1, 0x9080, 0x20e1, 0x4000, + 0x2079, 0xab00, 0x207b, 0x2200, 0x7807, 0x00ef, 0x780b, 0x0000, + 0x780f, 0x00ef, 0x7813, 0x0138, 0x7817, 0x0000, 0x781b, 0x0000, + 0x781f, 0x0000, 0x7823, 0xffff, 0x7827, 0xffff, 0x782b, 0x0000, + 0x782f, 0x0000, 0x2079, 0xab0c, 0x207b, 0x1101, 0x7807, 0x0000, + 0x2099, 0xa605, 0x20a1, 0xab0e, 0x20a9, 0x0004, 0x53a3, 0x2079, + 0xab12, 0x207b, 0x0000, 0x7807, 0x0000, 0x2099, 0xab00, 0x20a1, + 0x020b, 0x20a9, 0x0014, 0x53a6, 0x60c3, 0x000c, 0x600f, 0x0000, + 0x1078, 0x420b, 0x0f7f, 0x7083, 0x0000, 0x6043, 0x0008, 0x6043, + 0x0000, 0x007c, 0x0d7e, 0x7080, 0x7083, 0x0000, 0xa025, 0x0040, + 0x3c5e, 0x6020, 0xd0b4, 0x00c0, 0x3c5c, 0x718c, 0x81ff, 0x0040, + 0x3c4b, 0xa486, 0x000c, 0x00c0, 0x3c56, 0xa480, 0x0018, 0x8004, + 0x20a8, 0x2011, 0xab80, 0x2019, 0xab00, 0x220c, 0x2304, 0xa106, + 0x00c0, 0x3c22, 0x8210, 0x8318, 0x00f0, 0x3c05, 0x6043, 0x0004, + 0x608b, 0xbc94, 0x608f, 0xf0f0, 0x6043, 0x0006, 0x707f, 0x0002, + 0x708b, 0x0002, 0x2009, 0x07d0, 0x2011, 0x41dc, 0x1078, 0x5add, + 0x0078, 0x3c5c, 0x2069, 0xab80, 0x6930, 0xa18e, 0x1101, 0x00c0, + 0x3c56, 0x6834, 0xa005, 0x00c0, 0x3c56, 0x6900, 0xa18c, 0x00ff, + 0x00c0, 0x3c36, 0x6804, 0xa005, 0x0040, 0x3c4b, 0x2011, 0xab8e, + 0x2019, 0xa605, 0x20a9, 0x0004, 0x220c, 0x2304, 0xa102, 0x0048, + 0x3c49, 0x00c0, 0x3c56, 0x8210, 0x8318, 0x00f0, 0x3c3c, 0x0078, + 0x3c56, 0x708f, 0x0000, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x2099, + 0xab80, 0x20a1, 0x020b, 0x20a9, 0x0014, 0x53a6, 0x6043, 0x0008, + 0x6043, 0x0000, 0x0078, 0x3c5e, 0x0d7f, 0x007c, 0x6020, 0xd0b4, + 0x00c0, 0x3c5c, 0x60c3, 0x000c, 0x2011, 0xa8bb, 0x2013, 0x0000, + 0x7083, 0x0000, 0x20e1, 0x9080, 0x60a3, 0x0056, 0x60a7, 0x9575, + 0x1078, 0x6e06, 0x0078, 0x3c5c, 0x007c, 0x7088, 0xa08a, 0x001d, + 0x00c8, 0x3c7e, 0x1079, 0x3c81, 0x0078, 0x3c80, 0x1078, 0x1332, + 0x007c, 0x3cab, 0x3cba, 0x3ce9, 0x3d02, 0x3d2e, 0x3d5a, 0x3d86, + 0x3dbc, 0x3de8, 0x3e10, 0x3e53, 0x3e7d, 0x3e9f, 0x3eb5, 0x3edb, + 0x3eee, 0x3ef7, 0x3f2b, 0x3f57, 0x3f83, 0x3faf, 0x3fe5, 0x4030, + 0x405f, 0x4081, 0x40c3, 0x40e9, 0x4102, 0x4103, 0x0c7e, 0x2061, + 0xa600, 0x6003, 0x0007, 0x2061, 0x0100, 0x6004, 0xa084, 0xfff9, + 0x6006, 0x0c7f, 0x007c, 0x608b, 0xbc94, 0x608f, 0xf0f0, 0x6043, + 0x0002, 0x708b, 0x0001, 0x2009, 0x07d0, 0x2011, 0x41dc, 0x1078, + 0x5add, 0x007c, 0x0f7e, 0x7080, 0xa086, 0x0014, 0x00c0, 0x3ce7, + 0x6043, 0x0000, 0x6020, 0xd0b4, 0x00c0, 0x3ce7, 0x2079, 0xab80, + 0x7a30, 0xa296, 0x1102, 0x00c0, 0x3ce5, 0x7834, 0xa005, 0x00c0, + 0x3ce5, 0x7a38, 0xd2fc, 0x0040, 0x3cdb, 0x70b0, 0xa005, 0x00c0, + 0x3cdb, 0x70b3, 0x0001, 0x2011, 0x41dc, 0x1078, 0x5a45, 0x708b, + 0x0010, 0x1078, 0x3ef7, 0x0078, 0x3ce7, 0x1078, 0x4224, 0x0f7f, + 0x007c, 0x708b, 0x0003, 0x6043, 0x0004, 0x2011, 0x41dc, 0x1078, + 0x5a45, 0x1078, 0x4289, 0x20a3, 0x1102, 0x20a3, 0x0000, 0x20a9, + 0x000a, 0x20a3, 0x0000, 0x00f0, 0x3cf9, 0x60c3, 0x0014, 0x1078, + 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, 0x0040, 0x3d2c, 0x2011, + 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0014, 0x00c0, 0x3d2a, 0x2079, + 0xab80, 0x7a30, 0xa296, 0x1102, 0x00c0, 0x3d2a, 0x7834, 0xa005, + 0x00c0, 0x3d2a, 0x7a38, 0xd2fc, 0x0040, 0x3d24, 0x70b0, 0xa005, + 0x00c0, 0x3d24, 0x70b3, 0x0001, 0x708b, 0x0004, 0x1078, 0x3d2e, + 0x0078, 0x3d2c, 0x1078, 0x4224, 0x0f7f, 0x007c, 0x708b, 0x0005, + 0x1078, 0x4289, 0x20a3, 0x1103, 0x20a3, 0x0000, 0x3430, 0x2011, + 0xab8e, 0x1078, 0x42d4, 0x00c0, 0x3d4c, 0x7074, 0xa005, 0x00c0, + 0x3d4c, 0x7150, 0xa186, 0xffff, 0x0040, 0x3d4c, 0x1078, 0x419d, + 0x0040, 0x3d4c, 0x1078, 0x42b8, 0x20a9, 0x0008, 0x2298, 0x26a0, + 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0014, 0x1078, + 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, 0x0040, 0x3d84, 0x2011, + 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0014, 0x00c0, 0x3d82, 0x2079, + 0xab80, 0x7a30, 0xa296, 0x1103, 0x00c0, 0x3d82, 0x7834, 0xa005, + 0x00c0, 0x3d82, 0x7a38, 0xd2fc, 0x0040, 0x3d7c, 0x70b0, 0xa005, + 0x00c0, 0x3d7c, 0x70b3, 0x0001, 0x708b, 0x0006, 0x1078, 0x3d86, + 0x0078, 0x3d84, 0x1078, 0x4224, 0x0f7f, 0x007c, 0x708b, 0x0007, + 0x1078, 0x4289, 0x20a3, 0x1104, 0x20a3, 0x0000, 0x3430, 0x2011, + 0xab8e, 0x1078, 0x42d4, 0x00c0, 0x3dae, 0x7074, 0xa005, 0x00c0, + 0x3dae, 0x7154, 0xa186, 0xffff, 0x0040, 0x3dae, 0xa180, 0x29c0, + 0x200c, 0xa18c, 0xff00, 0x810f, 0x1078, 0x419d, 0x0040, 0x3dae, + 0x1078, 0x3820, 0x0040, 0x3dae, 0x1078, 0x256a, 0x20a9, 0x0008, + 0x2298, 0x26a0, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, + 0x0014, 0x1078, 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, 0x0040, + 0x3de6, 0x2011, 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0014, 0x00c0, + 0x3de4, 0x2079, 0xab80, 0x7a30, 0xa296, 0x1104, 0x00c0, 0x3de4, + 0x7834, 0xa005, 0x00c0, 0x3de4, 0x7a38, 0xd2fc, 0x0040, 0x3dde, + 0x70b0, 0xa005, 0x00c0, 0x3dde, 0x70b3, 0x0001, 0x708b, 0x0008, + 0x1078, 0x3de8, 0x0078, 0x3de6, 0x1078, 0x4224, 0x0f7f, 0x007c, + 0x708b, 0x0009, 0x1078, 0x4289, 0x20a3, 0x1105, 0x20a3, 0x0100, + 0x3430, 0x1078, 0x42d4, 0x00c0, 0x3e01, 0x7074, 0xa005, 0x00c0, + 0x3e01, 0x1078, 0x4104, 0x00c0, 0x3e0b, 0xa085, 0x0001, 0x1078, + 0x256a, 0x20a9, 0x0008, 0x2099, 0xab8e, 0x26a0, 0x53a6, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0014, 0x1078, 0x420b, 0x007c, + 0x0f7e, 0x7080, 0xa005, 0x0040, 0x3e51, 0x2011, 0x41dc, 0x1078, + 0x5a45, 0xa086, 0x0014, 0x00c0, 0x3e4f, 0x2079, 0xab80, 0x7a30, + 0xa296, 0x1105, 0x00c0, 0x3e4f, 0x7834, 0x2011, 0x0100, 0xa21e, + 0x00c0, 0x3e3a, 0x7a38, 0xd2fc, 0x0040, 0x3e34, 0x70b0, 0xa005, + 0x00c0, 0x3e34, 0x70b3, 0x0001, 0x708b, 0x000a, 0x1078, 0x3e53, + 0x0078, 0x3e51, 0xa005, 0x00c0, 0x3e4f, 0x7a38, 0xd2fc, 0x0040, + 0x3e47, 0x70b0, 0xa005, 0x00c0, 0x3e47, 0x70b3, 0x0001, 0x7087, + 0x0000, 0x708b, 0x000e, 0x1078, 0x3edb, 0x0078, 0x3e51, 0x1078, + 0x4224, 0x0f7f, 0x007c, 0x708b, 0x000b, 0x2011, 0xab0e, 0x22a0, + 0x20a9, 0x0040, 0x2019, 0xffff, 0x43a4, 0x20a9, 0x0002, 0x2009, + 0x0000, 0x41a4, 0x1078, 0x4289, 0x20a3, 0x1106, 0x20a3, 0x0000, + 0x1078, 0x42d4, 0x0040, 0x3e70, 0x2013, 0x0000, 0x0078, 0x3e74, + 0x6030, 0xa085, 0x0100, 0x2012, 0x2298, 0x20a9, 0x0042, 0x53a6, + 0x60c3, 0x0084, 0x1078, 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, + 0x0040, 0x3e9d, 0x2011, 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0084, + 0x00c0, 0x3e9b, 0x2079, 0xab80, 0x7a30, 0xa296, 0x1106, 0x00c0, + 0x3e9b, 0x7834, 0xa005, 0x00c0, 0x3e9b, 0x708b, 0x000c, 0x1078, + 0x3e9f, 0x0078, 0x3e9d, 0x1078, 0x4224, 0x0f7f, 0x007c, 0x708b, + 0x000d, 0x1078, 0x4289, 0x20a3, 0x1107, 0x20a3, 0x0000, 0x2099, + 0xab8e, 0x20a9, 0x0040, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x60c3, 0x0084, 0x1078, 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, + 0x0040, 0x3ed9, 0x2011, 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0084, + 0x00c0, 0x3ed7, 0x2079, 0xab80, 0x7a30, 0xa296, 0x1107, 0x00c0, + 0x3ed7, 0x7834, 0xa005, 0x00c0, 0x3ed7, 0x7087, 0x0001, 0x1078, + 0x427b, 0x708b, 0x000e, 0x1078, 0x3edb, 0x0078, 0x3ed9, 0x1078, + 0x4224, 0x0f7f, 0x007c, 0x708b, 0x000f, 0x7083, 0x0000, 0x608b, + 0xbc85, 0x608f, 0xb5b5, 0x6043, 0x0005, 0x6043, 0x0004, 0x2009, + 0x07d0, 0x2011, 0x41dc, 0x1078, 0x5a38, 0x007c, 0x7080, 0xa005, + 0x0040, 0x3ef6, 0x2011, 0x41dc, 0x1078, 0x5a45, 0x007c, 0x708b, + 0x0011, 0x1078, 0x42d4, 0x00c0, 0x3f14, 0x716c, 0x81ff, 0x0040, + 0x3f14, 0x2009, 0x0000, 0x7070, 0xa084, 0x00ff, 0x1078, 0x254d, + 0xa186, 0x007e, 0x0040, 0x3f14, 0xa186, 0x0080, 0x0040, 0x3f14, + 0x2011, 0xab8e, 0x1078, 0x419d, 0x20e1, 0x9080, 0x20e1, 0x4000, + 0x2099, 0xab80, 0x20a1, 0x020b, 0x7480, 0xa480, 0x0018, 0xa080, + 0x0007, 0xa084, 0x03f8, 0x8004, 0x20a8, 0x53a6, 0x60c3, 0x0014, + 0x1078, 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, 0x0040, 0x3f55, + 0x2011, 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0014, 0x00c0, 0x3f53, + 0x2079, 0xab80, 0x7a30, 0xa296, 0x1103, 0x00c0, 0x3f53, 0x7834, + 0xa005, 0x00c0, 0x3f53, 0x7a38, 0xd2fc, 0x0040, 0x3f4d, 0x70b0, + 0xa005, 0x00c0, 0x3f4d, 0x70b3, 0x0001, 0x708b, 0x0012, 0x1078, + 0x3f57, 0x0078, 0x3f55, 0x1078, 0x4224, 0x0f7f, 0x007c, 0x708b, + 0x0013, 0x1078, 0x4295, 0x20a3, 0x1103, 0x20a3, 0x0000, 0x3430, + 0x2011, 0xab8e, 0x1078, 0x42d4, 0x00c0, 0x3f75, 0x7074, 0xa005, + 0x00c0, 0x3f75, 0x7150, 0xa186, 0xffff, 0x0040, 0x3f75, 0x1078, + 0x419d, 0x0040, 0x3f75, 0x1078, 0x42b8, 0x20a9, 0x0008, 0x2298, + 0x26a0, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0014, + 0x1078, 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, 0x0040, 0x3fad, + 0x2011, 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0014, 0x00c0, 0x3fab, + 0x2079, 0xab80, 0x7a30, 0xa296, 0x1104, 0x00c0, 0x3fab, 0x7834, + 0xa005, 0x00c0, 0x3fab, 0x7a38, 0xd2fc, 0x0040, 0x3fa5, 0x70b0, + 0xa005, 0x00c0, 0x3fa5, 0x70b3, 0x0001, 0x708b, 0x0014, 0x1078, + 0x3faf, 0x0078, 0x3fad, 0x1078, 0x4224, 0x0f7f, 0x007c, 0x708b, + 0x0015, 0x1078, 0x4295, 0x20a3, 0x1104, 0x20a3, 0x0000, 0x3430, + 0x2011, 0xab8e, 0x1078, 0x42d4, 0x00c0, 0x3fd7, 0x7074, 0xa005, + 0x00c0, 0x3fd7, 0x7154, 0xa186, 0xffff, 0x0040, 0x3fd7, 0xa180, + 0x29c0, 0x200c, 0xa18c, 0xff00, 0x810f, 0x1078, 0x419d, 0x0040, + 0x3fd7, 0x1078, 0x3820, 0x0040, 0x3fd7, 0x1078, 0x256a, 0x20a9, + 0x0008, 0x2298, 0x26a0, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x60c3, 0x0014, 0x1078, 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, + 0x0040, 0x402e, 0x2011, 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0014, + 0x00c0, 0x402c, 0x2079, 0xab80, 0x7a30, 0xa296, 0x1105, 0x00c0, + 0x402c, 0x7834, 0x2011, 0x0100, 0xa21e, 0x00c0, 0x400b, 0x7a38, + 0xd2fc, 0x0040, 0x4009, 0x70b0, 0xa005, 0x00c0, 0x4009, 0x70b3, + 0x0001, 0x0078, 0x401a, 0xa005, 0x00c0, 0x402c, 0x7a38, 0xd2fc, + 0x0040, 0x4018, 0x70b0, 0xa005, 0x00c0, 0x4018, 0x70b3, 0x0001, + 0x7087, 0x0000, 0x7a38, 0xd2f4, 0x0040, 0x4026, 0x2001, 0xa674, + 0x2004, 0xd0a4, 0x00c0, 0x4026, 0x70cf, 0x0008, 0x708b, 0x0016, + 0x1078, 0x4030, 0x0078, 0x402e, 0x1078, 0x4224, 0x0f7f, 0x007c, + 0x20e1, 0x9080, 0x20e1, 0x4000, 0x2099, 0xab80, 0x20a1, 0x020b, + 0x20a9, 0x000e, 0x53a6, 0x3430, 0x2011, 0xab8e, 0x708b, 0x0017, + 0x1078, 0x42d4, 0x00c0, 0x4050, 0x7074, 0xa005, 0x00c0, 0x4050, + 0x1078, 0x4104, 0x00c0, 0x405a, 0xa085, 0x0001, 0x1078, 0x256a, + 0x20a9, 0x0008, 0x2099, 0xab8e, 0x26a0, 0x53a6, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x60c3, 0x0014, 0x1078, 0x420b, 0x007c, 0x0f7e, + 0x7080, 0xa005, 0x0040, 0x407f, 0x2011, 0x41dc, 0x1078, 0x5a45, + 0xa086, 0x0084, 0x00c0, 0x407d, 0x2079, 0xab80, 0x7a30, 0xa296, + 0x1106, 0x00c0, 0x407d, 0x7834, 0xa005, 0x00c0, 0x407d, 0x708b, + 0x0018, 0x1078, 0x4081, 0x0078, 0x407f, 0x1078, 0x4224, 0x0f7f, + 0x007c, 0x708b, 0x0019, 0x1078, 0x4295, 0x20a3, 0x1106, 0x20a3, + 0x0000, 0x3430, 0x2099, 0xab8e, 0x2039, 0xab0e, 0x27a0, 0x20a9, + 0x0040, 0x53a3, 0x1078, 0x42d4, 0x00c0, 0x40b5, 0x2728, 0x2514, + 0x8207, 0xa084, 0x00ff, 0x8000, 0x2018, 0xa294, 0x00ff, 0x8007, + 0xa205, 0x202a, 0x6030, 0x2310, 0x8214, 0xa2a0, 0xab0e, 0x2414, + 0xa38c, 0x0001, 0x0040, 0x40b0, 0xa294, 0xff00, 0x0078, 0x40b3, + 0xa294, 0x00ff, 0x8007, 0xa215, 0x2222, 0x2798, 0x26a0, 0x20a9, + 0x0040, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0084, + 0x1078, 0x420b, 0x007c, 0x0f7e, 0x7080, 0xa005, 0x0040, 0x40e7, + 0x2011, 0x41dc, 0x1078, 0x5a45, 0xa086, 0x0084, 0x00c0, 0x40e5, + 0x2079, 0xab80, 0x7a30, 0xa296, 0x1107, 0x00c0, 0x40e5, 0x7834, + 0xa005, 0x00c0, 0x40e5, 0x7087, 0x0001, 0x1078, 0x427b, 0x708b, + 0x001a, 0x1078, 0x40e9, 0x0078, 0x40e7, 0x1078, 0x4224, 0x0f7f, + 0x007c, 0x708b, 0x001b, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x2099, + 0xab80, 0x20a1, 0x020b, 0x7480, 0xa480, 0x0018, 0xa080, 0x0007, + 0xa084, 0x03f8, 0x8004, 0x20a8, 0x53a6, 0x60c3, 0x0084, 0x1078, + 0x420b, 0x007c, 0x007c, 0x007c, 0x087e, 0x097e, 0x2029, 0xa653, + 0x252c, 0x20a9, 0x0008, 0x2041, 0xab0e, 0x28a0, 0x2099, 0xab8e, + 0x53a3, 0x20a9, 0x0008, 0x2011, 0x0007, 0xd5d4, 0x0040, 0x411a, + 0x2011, 0x0000, 0x2800, 0xa200, 0x200c, 0xa1a6, 0xffff, 0x00c0, + 0x412c, 0xd5d4, 0x0040, 0x4127, 0x8210, 0x0078, 0x4128, 0x8211, + 0x00f0, 0x411a, 0x0078, 0x4194, 0x82ff, 0x00c0, 0x413e, 0xd5d4, + 0x0040, 0x4138, 0xa1a6, 0x3fff, 0x0040, 0x4124, 0x0078, 0x413c, + 0xa1a6, 0x3fff, 0x0040, 0x4194, 0xa18d, 0xc000, 0x20a9, 0x0010, + 0x2019, 0x0001, 0xd5d4, 0x0040, 0x4147, 0x2019, 0x0010, 0x2120, + 0xd5d4, 0x0040, 0x414e, 0x8423, 0x0078, 0x414f, 0x8424, 0x00c8, + 0x415c, 0xd5d4, 0x0040, 0x4157, 0x8319, 0x0078, 0x4158, 0x8318, + 0x00f0, 0x4148, 0x0078, 0x4194, 0x23a8, 0x2021, 0x0001, 0x8426, + 0x8425, 0x00f0, 0x4160, 0x2328, 0x8529, 0xa2be, 0x0007, 0x0040, + 0x4174, 0x007e, 0x2039, 0x0007, 0x2200, 0xa73a, 0x007f, 0x27a8, + 0xa5a8, 0x0010, 0x00f0, 0x4170, 0x7552, 0xa5c8, 0x29c0, 0x292c, + 0xa5ac, 0x00ff, 0x6532, 0x60e7, 0x0000, 0x65ea, 0x706f, 0x0000, + 0x7572, 0x2018, 0x2304, 0xa405, 0x201a, 0x7077, 0x0001, 0x26a0, + 0x2898, 0x20a9, 0x0008, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0xa085, 0x0001, 0x0078, 0x419a, 0xa006, 0x0078, 0x419a, 0xa006, + 0x1078, 0x1332, 0x097f, 0x087f, 0x007c, 0x2118, 0x2021, 0x0000, + 0x2001, 0x0007, 0xa39a, 0x0010, 0x0048, 0x41aa, 0x8420, 0x8001, + 0x0078, 0x41a2, 0x2118, 0x84ff, 0x0040, 0x41b3, 0xa39a, 0x0010, + 0x8421, 0x00c0, 0x41ae, 0x2021, 0x0001, 0x83ff, 0x0040, 0x41bc, + 0x8423, 0x8319, 0x00c0, 0x41b8, 0xa238, 0x2704, 0xa42c, 0x00c0, + 0x41d4, 0xa405, 0x203a, 0x7152, 0xa1a0, 0x29c0, 0x242c, 0xa5ac, + 0x00ff, 0x6532, 0x60e7, 0x0000, 0x65ea, 0x706f, 0x0000, 0x7572, + 0x7077, 0x0001, 0xa084, 0x0000, 0x007c, 0x0e7e, 0x2071, 0xa600, + 0x707b, 0x0000, 0x0e7f, 0x007c, 0x0e7e, 0x0f7e, 0x2001, 0x0002, + 0x1078, 0x5ae6, 0x2079, 0x0100, 0x2071, 0x0140, 0x1078, 0x6e0f, + 0x7004, 0xa084, 0x4000, 0x0040, 0x41f1, 0x7003, 0x1000, 0x7003, + 0x0000, 0x127e, 0x2091, 0x8000, 0x2071, 0xa622, 0x2073, 0x0000, + 0x7840, 0x027e, 0x017e, 0x2009, 0x00f7, 0x1078, 0x42a1, 0x017f, + 0xa094, 0x0010, 0xa285, 0x0080, 0x7842, 0x7a42, 0x027f, 0x127f, + 0x0f7f, 0x0e7f, 0x007c, 0x127e, 0x2091, 0x8000, 0x2011, 0xa8bb, + 0x2013, 0x0000, 0x7083, 0x0000, 0x127f, 0x20e1, 0x9080, 0x60a3, + 0x0056, 0x60a7, 0x9575, 0x1078, 0x6e06, 0x2009, 0x07d0, 0x2011, + 0x41dc, 0x1078, 0x5add, 0x007c, 0x017e, 0x027e, 0x0c7e, 0x127e, + 0x2091, 0x8000, 0x2011, 0x0003, 0x1078, 0x70e0, 0x2011, 0x0002, + 0x1078, 0x70ea, 0x1078, 0x6fc4, 0x037e, 0x2019, 0x0000, 0x1078, + 0x7058, 0x037f, 0x2009, 0x00f7, 0x1078, 0x42a1, 0x2061, 0xa8c4, + 0x601b, 0x0000, 0x601f, 0x0000, 0x2061, 0xa600, 0x6003, 0x0001, + 0x2061, 0x0100, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x002d, + 0x2011, 0x4259, 0x1078, 0x5a38, 0x127f, 0x0c7f, 0x027f, 0x017f, + 0x007c, 0x0e7e, 0x007e, 0x127e, 0x2091, 0x8000, 0x2001, 0x0001, + 0x1078, 0x5ae6, 0x2071, 0x0100, 0x1078, 0x6e0f, 0x2071, 0x0140, + 0x7004, 0xa084, 0x4000, 0x0040, 0x4271, 0x7003, 0x1000, 0x7003, + 0x0000, 0x2001, 0x0001, 0x1078, 0x24e8, 0x1078, 0x4224, 0x127f, + 0x007f, 0x0e7f, 0x007c, 0x20a9, 0x0040, 0x20a1, 0xacc0, 0x2099, + 0xab8e, 0x3304, 0x8007, 0x20a2, 0x9398, 0x94a0, 0x00f0, 0x4281, + 0x007c, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x2099, 0xab00, 0x20a1, + 0x020b, 0x20a9, 0x000c, 0x53a6, 0x007c, 0x20e1, 0x9080, 0x20e1, + 0x4000, 0x2099, 0xab80, 0x20a1, 0x020b, 0x20a9, 0x000c, 0x53a6, + 0x007c, 0x0c7e, 0x007e, 0x2061, 0x0100, 0x810f, 0x2001, 0xa62f, + 0x2004, 0xa005, 0x00c0, 0x42b2, 0x6030, 0xa084, 0x00ff, 0xa105, + 0x0078, 0x42b4, 0xa185, 0x00f7, 0x604a, 0x007f, 0x0c7f, 0x007c, + 0x017e, 0x047e, 0x2001, 0xa653, 0x2004, 0xd0a4, 0x0040, 0x42cb, + 0xa006, 0x2020, 0x2009, 0x002a, 0x1078, 0xa21d, 0x2001, 0xa60c, + 0x200c, 0xc195, 0x2102, 0x2019, 0x002a, 0x2009, 0x0000, 0x1078, + 0x284f, 0x047f, 0x017f, 0x007c, 0x007e, 0x2001, 0xa60c, 0x2004, + 0xd09c, 0x0040, 0x42db, 0x007f, 0x007c, 0x007e, 0x017e, 0x127e, + 0x2091, 0x8000, 0x2001, 0x0101, 0x200c, 0xa18d, 0x0006, 0x2102, + 0x127f, 0x017f, 0x007f, 0x007c, 0x157e, 0x20a9, 0x00ff, 0x2009, + 0xa735, 0xa006, 0x200a, 0x8108, 0x00f0, 0x42f2, 0x157f, 0x007c, + 0x0d7e, 0x037e, 0x157e, 0x137e, 0x147e, 0x2069, 0xa652, 0xa006, + 0x6002, 0x6007, 0x0707, 0x600a, 0x600e, 0x6012, 0xa198, 0x29c0, + 0x231c, 0xa39c, 0x00ff, 0x6316, 0x20a9, 0x0004, 0xac98, 0x0006, + 0x23a0, 0x40a4, 0x20a9, 0x0004, 0xac98, 0x000a, 0x23a0, 0x40a4, + 0x603e, 0x6042, 0x604e, 0x6052, 0x6056, 0x605a, 0x605e, 0x6062, + 0x6066, 0x606a, 0x606e, 0x6072, 0x6076, 0x607a, 0x607e, 0x6082, + 0x6086, 0x608a, 0x608e, 0x6092, 0x6096, 0x609a, 0x609e, 0x60ae, + 0x61a2, 0x0d7e, 0x60a4, 0xa06d, 0x0040, 0x4338, 0x1078, 0x13a4, + 0x60a7, 0x0000, 0x60a8, 0xa06d, 0x0040, 0x4340, 0x1078, 0x13a4, + 0x60ab, 0x0000, 0x0d7f, 0xa006, 0x604a, 0x6810, 0x603a, 0x680c, + 0x6046, 0x6814, 0xa084, 0x00ff, 0x6042, 0x147f, 0x137f, 0x157f, + 0x037f, 0x0d7f, 0x007c, 0x127e, 0x2091, 0x8000, 0x6944, 0x6e48, + 0xa684, 0x3fff, 0xa082, 0x4000, 0x00c8, 0x4424, 0xa18c, 0xff00, + 0x810f, 0xa182, 0x00ff, 0x00c8, 0x442a, 0x2001, 0xa60c, 0x2004, + 0xa084, 0x0003, 0x0040, 0x4385, 0x2001, 0xa60c, 0x2004, 0xd084, + 0x00c0, 0x4405, 0xa188, 0xa735, 0x2104, 0xa065, 0x0040, 0x4405, + 0x6004, 0xa084, 0x00ff, 0xa08e, 0x0006, 0x00c0, 0x4405, 0x6000, + 0xd0c4, 0x0040, 0x4405, 0x0078, 0x4392, 0xa188, 0xa735, 0x2104, + 0xa065, 0x0040, 0x43e9, 0x6004, 0xa084, 0x00ff, 0xa08e, 0x0006, + 0x00c0, 0x43ef, 0x60a4, 0xa00d, 0x0040, 0x439a, 0x1078, 0x4817, + 0x0040, 0x43e3, 0x60a8, 0xa00d, 0x0040, 0x43b4, 0x1078, 0x486a, + 0x00c0, 0x43b4, 0x694c, 0xd1fc, 0x00c0, 0x43aa, 0x1078, 0x44df, + 0x0078, 0x43de, 0x1078, 0x4484, 0x694c, 0xd1ec, 0x00c0, 0x43de, + 0x1078, 0x46d6, 0x0078, 0x43de, 0x694c, 0xa184, 0xa000, 0x0040, + 0x43ce, 0xd1ec, 0x0040, 0x43c7, 0xd1fc, 0x0040, 0x43c3, 0x1078, + 0x46e7, 0x0078, 0x43ca, 0x1078, 0x46e7, 0x0078, 0x43ce, 0xd1fc, + 0x0040, 0x43ce, 0x1078, 0x4484, 0x0078, 0x43de, 0x6050, 0xa00d, + 0x0040, 0x43d9, 0x2d00, 0x200a, 0x6803, 0x0000, 0x6052, 0x0078, + 0x43de, 0x2d00, 0x6052, 0x604e, 0x6803, 0x0000, 0x1078, 0x5da9, + 0xa006, 0x127f, 0x007c, 0x2001, 0x0005, 0x2009, 0x0000, 0x0078, + 0x442e, 0x2001, 0x0028, 0x2009, 0x0000, 0x0078, 0x442e, 0xa082, + 0x0006, 0x00c8, 0x4405, 0x60a0, 0xd0bc, 0x00c0, 0x4401, 0x6100, + 0xd1fc, 0x0040, 0x4392, 0x2001, 0x0029, 0x2009, 0x1000, 0x0078, + 0x442e, 0x2001, 0x0028, 0x0078, 0x4420, 0x2009, 0xa60c, 0x210c, + 0xd18c, 0x0040, 0x440f, 0x2001, 0x0004, 0x0078, 0x4420, 0xd184, + 0x0040, 0x4416, 0x2001, 0x0004, 0x0078, 0x4420, 0x2001, 0x0029, + 0x6100, 0xd1fc, 0x0040, 0x4420, 0x2009, 0x1000, 0x0078, 0x442e, + 0x2009, 0x0000, 0x0078, 0x442e, 0x2001, 0x0029, 0x2009, 0x0000, + 0x0078, 0x442e, 0x2001, 0x0029, 0x2009, 0x0000, 0xa005, 0x127f, + 0x007c, 0x6944, 0x6e48, 0xa684, 0x3fff, 0xa082, 0x4000, 0x00c8, + 0x447e, 0xa18c, 0xff00, 0x810f, 0xa182, 0x00ff, 0x00c8, 0x4464, + 0xa188, 0xa735, 0x2104, 0xa065, 0x0040, 0x4464, 0x6004, 0xa084, + 0x00ff, 0xa08e, 0x0006, 0x00c0, 0x446a, 0x684c, 0xd0ec, 0x0040, + 0x4457, 0x1078, 0x46e7, 0x1078, 0x4484, 0x0078, 0x445f, 0x1078, + 0x4484, 0x684c, 0xd0fc, 0x0040, 0x445f, 0x1078, 0x46d6, 0x1078, + 0x472f, 0xa006, 0x0078, 0x4482, 0x2001, 0x0028, 0x2009, 0x0000, + 0x0078, 0x4482, 0xa082, 0x0006, 0x00c8, 0x4478, 0x6100, 0xd1fc, + 0x0040, 0x444d, 0x2001, 0x0029, 0x2009, 0x1000, 0x0078, 0x4482, + 0x2001, 0x0029, 0x2009, 0x0000, 0x0078, 0x4482, 0x2001, 0x0029, + 0x2009, 0x0000, 0xa005, 0x007c, 0x127e, 0x2091, 0x8000, 0x6050, + 0xa00d, 0x0040, 0x4492, 0x2d00, 0x200a, 0x6803, 0x0000, 0x6052, + 0x127f, 0x007c, 0x2d00, 0x6052, 0x604e, 0x6803, 0x0000, 0x0078, + 0x4490, 0x127e, 0x2091, 0x8000, 0x604c, 0xa005, 0x0040, 0x44af, + 0x0e7e, 0x2071, 0xa8b1, 0x7004, 0xa086, 0x0002, 0x0040, 0x44b6, + 0x0e7f, 0x604c, 0x6802, 0x2d00, 0x604e, 0x127f, 0x007c, 0x2d00, + 0x6052, 0x604e, 0x6803, 0x0000, 0x0078, 0x44ad, 0x701c, 0xac06, + 0x00c0, 0x44a8, 0x604c, 0x2070, 0x7000, 0x6802, 0x2d00, 0x7002, + 0x0e7f, 0x127f, 0x007c, 0x127e, 0x2091, 0x8000, 0x604c, 0xa06d, + 0x0040, 0x44d1, 0x6800, 0xa005, 0x00c0, 0x44cf, 0x6052, 0x604e, + 0xad05, 0x127f, 0x007c, 0x604c, 0xa06d, 0x0040, 0x44de, 0x6800, + 0xa005, 0x00c0, 0x44dc, 0x6052, 0x604e, 0xad05, 0x007c, 0x6803, + 0x0000, 0x6084, 0xa00d, 0x0040, 0x44e9, 0x2d00, 0x200a, 0x6086, + 0x007c, 0x2d00, 0x6086, 0x6082, 0x0078, 0x44e8, 0x127e, 0x0c7e, + 0x027e, 0x2091, 0x8000, 0x6218, 0x2260, 0x6200, 0xa005, 0x0040, + 0x44fc, 0xc285, 0x0078, 0x44fd, 0xc284, 0x6202, 0x027f, 0x0c7f, + 0x127f, 0x007c, 0x127e, 0x0c7e, 0x2091, 0x8000, 0x6218, 0x2260, + 0x6204, 0x007e, 0xa086, 0x0006, 0x00c0, 0x4521, 0x609c, 0xd0ac, + 0x0040, 0x4521, 0x2001, 0xa653, 0x2004, 0xd0a4, 0x0040, 0x4521, + 0xa284, 0xff00, 0x8007, 0xa086, 0x0007, 0x00c0, 0x4521, 0x2011, + 0x0600, 0x007f, 0xa294, 0xff00, 0xa215, 0x6206, 0x007e, 0xa086, + 0x0006, 0x00c0, 0x4531, 0x6290, 0x82ff, 0x00c0, 0x4531, 0x1078, + 0x1332, 0x007f, 0x0c7f, 0x127f, 0x007c, 0x127e, 0x0c7e, 0x2091, + 0x8000, 0x6218, 0x2260, 0x6204, 0x007e, 0xa086, 0x0006, 0x00c0, + 0x4553, 0x609c, 0xd0a4, 0x0040, 0x4553, 0x2001, 0xa653, 0x2004, + 0xd0ac, 0x00c0, 0x4553, 0xa284, 0x00ff, 0xa086, 0x0007, 0x00c0, + 0x4553, 0x2011, 0x0006, 0x007f, 0xa294, 0x00ff, 0x8007, 0xa215, + 0x6206, 0x0c7f, 0x127f, 0x007c, 0x027e, 0xa182, 0x00ff, 0x0048, + 0x4565, 0xa085, 0x0001, 0x0078, 0x457d, 0xa190, 0xa735, 0x2204, + 0xa065, 0x00c0, 0x457c, 0x017e, 0x0d7e, 0x1078, 0x1370, 0x2d60, + 0x0d7f, 0x017f, 0x0040, 0x4561, 0x2c00, 0x2012, 0x60a7, 0x0000, + 0x60ab, 0x0000, 0x1078, 0x42f8, 0xa006, 0x027f, 0x007c, 0x127e, + 0x2091, 0x8000, 0x027e, 0xa182, 0x00ff, 0x0048, 0x458b, 0xa085, + 0x0001, 0x0078, 0x45c1, 0x0d7e, 0xa190, 0xa735, 0x2204, 0xa06d, + 0x0040, 0x45bf, 0x2013, 0x0000, 0x0d7e, 0x0c7e, 0x2d60, 0x60a4, + 0xa06d, 0x0040, 0x459d, 0x1078, 0x13a4, 0x60a8, 0xa06d, 0x0040, + 0x45a3, 0x1078, 0x13a4, 0x0c7f, 0x0d7f, 0x0d7e, 0x0c7e, 0x68ac, + 0x2060, 0x8cff, 0x0040, 0x45bb, 0x600c, 0x007e, 0x6010, 0x2068, + 0x1078, 0x8d06, 0x0040, 0x45b6, 0x1078, 0x13b4, 0x1078, 0x772d, + 0x0c7f, 0x0078, 0x45a9, 0x0c7f, 0x0d7f, 0x1078, 0x13a4, 0x0d7f, + 0xa006, 0x027f, 0x127f, 0x007c, 0x017e, 0xa182, 0x00ff, 0x0048, + 0x45cd, 0xa085, 0x0001, 0x0078, 0x45d4, 0xa188, 0xa735, 0x2104, + 0xa065, 0x0040, 0x45c9, 0xa006, 0x017f, 0x007c, 0x0d7e, 0x157e, + 0x137e, 0x147e, 0x600b, 0x0000, 0x600f, 0x0000, 0x6000, 0xc08c, + 0x6002, 0x2069, 0xab8e, 0x6808, 0x605e, 0x6810, 0x6062, 0x6138, + 0xa10a, 0x0048, 0x45ec, 0x603a, 0x6814, 0x6066, 0x2099, 0xab96, + 0xac88, 0x000a, 0x21a0, 0x20a9, 0x0004, 0x53a3, 0x2099, 0xab9a, + 0xac88, 0x0006, 0x21a0, 0x20a9, 0x0004, 0x53a3, 0x2069, 0xabae, + 0x6808, 0x606a, 0x690c, 0x616e, 0x6810, 0x6072, 0x6818, 0x6076, + 0x60a0, 0xa086, 0x007e, 0x00c0, 0x4611, 0x2069, 0xab8e, 0x690c, + 0x616e, 0xa182, 0x0211, 0x00c8, 0x4619, 0x2009, 0x0008, 0x0078, + 0x4643, 0xa182, 0x0259, 0x00c8, 0x4621, 0x2009, 0x0007, 0x0078, + 0x4643, 0xa182, 0x02c1, 0x00c8, 0x4629, 0x2009, 0x0006, 0x0078, + 0x4643, 0xa182, 0x0349, 0x00c8, 0x4631, 0x2009, 0x0005, 0x0078, + 0x4643, 0xa182, 0x0421, 0x00c8, 0x4639, 0x2009, 0x0004, 0x0078, + 0x4643, 0xa182, 0x0581, 0x00c8, 0x4641, 0x2009, 0x0003, 0x0078, + 0x4643, 0x2009, 0x0002, 0x6192, 0x147f, 0x137f, 0x157f, 0x0d7f, + 0x007c, 0x017e, 0x027e, 0x0e7e, 0x2071, 0xab8d, 0x2e04, 0x6896, + 0x2071, 0xab8e, 0x7004, 0x689a, 0x701c, 0x689e, 0x6a00, 0x2009, + 0xa672, 0x210c, 0xd0bc, 0x0040, 0x4663, 0xd1ec, 0x0040, 0x4663, + 0xc2ad, 0x0078, 0x4664, 0xc2ac, 0xd0c4, 0x0040, 0x466d, 0xd1e4, + 0x0040, 0x466d, 0xc2bd, 0x0078, 0x466e, 0xc2bc, 0x6a02, 0x0e7f, + 0x027f, 0x017f, 0x007c, 0x0d7e, 0x127e, 0x2091, 0x8000, 0x60a4, + 0xa06d, 0x0040, 0x4697, 0x6900, 0x81ff, 0x00c0, 0x46ab, 0x6a04, + 0xa282, 0x0010, 0x00c8, 0x46b0, 0xad88, 0x0004, 0x20a9, 0x0010, + 0x2104, 0xa086, 0xffff, 0x0040, 0x4692, 0x8108, 0x00f0, 0x4688, + 0x1078, 0x1332, 0x260a, 0x8210, 0x6a06, 0x0078, 0x46ab, 0x1078, + 0x138b, 0x0040, 0x46b0, 0x2d00, 0x60a6, 0x6803, 0x0000, 0xad88, + 0x0004, 0x20a9, 0x0010, 0x200b, 0xffff, 0x8108, 0x00f0, 0x46a3, + 0x6807, 0x0001, 0x6e12, 0xa085, 0x0001, 0x127f, 0x0d7f, 0x007c, + 0xa006, 0x0078, 0x46ad, 0x127e, 0x2091, 0x8000, 0x0d7e, 0x60a4, + 0xa00d, 0x0040, 0x46d3, 0x2168, 0x6800, 0xa005, 0x00c0, 0x46cf, + 0x1078, 0x4817, 0x00c0, 0x46d3, 0x200b, 0xffff, 0x6804, 0xa08a, + 0x0002, 0x0048, 0x46cf, 0x8001, 0x6806, 0x0078, 0x46d3, 0x1078, + 0x13a4, 0x60a7, 0x0000, 0x0d7f, 0x127f, 0x007c, 0x127e, 0x2091, + 0x8000, 0x1078, 0x487f, 0x0078, 0x46df, 0x1078, 0x4484, 0x1078, + 0x4775, 0x00c0, 0x46dd, 0x1078, 0x472f, 0x127f, 0x007c, 0x0d7e, + 0x127e, 0x2091, 0x8000, 0x60a8, 0xa06d, 0x0040, 0x470b, 0x6950, + 0x81ff, 0x00c0, 0x471f, 0x6a54, 0xa282, 0x0010, 0x00c8, 0x472c, + 0xad88, 0x0018, 0x20a9, 0x0010, 0x2104, 0xa086, 0xffff, 0x0040, + 0x4706, 0x8108, 0x00f0, 0x46fc, 0x1078, 0x1332, 0x260a, 0x8210, + 0x6a56, 0x0078, 0x471f, 0x1078, 0x138b, 0x0040, 0x472c, 0x2d00, + 0x60aa, 0x6853, 0x0000, 0xad88, 0x0018, 0x20a9, 0x0010, 0x200b, + 0xffff, 0x8108, 0x00f0, 0x4717, 0x6857, 0x0001, 0x6e62, 0x0078, + 0x4723, 0x1078, 0x44df, 0x1078, 0x4739, 0x00c0, 0x4721, 0xa085, + 0x0001, 0x127f, 0x0d7f, 0x007c, 0xa006, 0x0078, 0x4729, 0x127e, + 0x2091, 0x8000, 0x1078, 0x5da9, 0x127f, 0x007c, 0xa01e, 0x0078, + 0x473b, 0x2019, 0x0001, 0xa00e, 0x127e, 0x2091, 0x8000, 0x604c, + 0x2068, 0x6000, 0xd0dc, 0x00c0, 0x4759, 0x8dff, 0x0040, 0x4770, + 0x83ff, 0x0040, 0x4751, 0x6848, 0xa606, 0x0040, 0x475e, 0x0078, + 0x4759, 0x683c, 0xa406, 0x00c0, 0x4759, 0x6840, 0xa506, 0x0040, + 0x475e, 0x2d08, 0x6800, 0x2068, 0x0078, 0x4745, 0x1078, 0x7233, + 0x6a00, 0x604c, 0xad06, 0x00c0, 0x4768, 0x624e, 0x0078, 0x476b, + 0xa180, 0x0000, 0x2202, 0x82ff, 0x00c0, 0x4770, 0x6152, 0x8dff, + 0x127f, 0x007c, 0xa01e, 0x0078, 0x4777, 0x2019, 0x0001, 0xa00e, + 0x6080, 0x2068, 0x8dff, 0x0040, 0x47a3, 0x83ff, 0x0040, 0x4786, + 0x6848, 0xa606, 0x0040, 0x4793, 0x0078, 0x478e, 0x683c, 0xa406, + 0x00c0, 0x478e, 0x6840, 0xa506, 0x0040, 0x4793, 0x2d08, 0x6800, + 0x2068, 0x0078, 0x477a, 0x6a00, 0x6080, 0xad06, 0x00c0, 0x479b, + 0x6282, 0x0078, 0x479e, 0xa180, 0x0000, 0x2202, 0x82ff, 0x00c0, + 0x47a3, 0x6186, 0x8dff, 0x007c, 0xa016, 0x1078, 0x4810, 0x00c0, + 0x47ab, 0x2011, 0x0001, 0x1078, 0x4863, 0x00c0, 0x47b1, 0xa295, + 0x0002, 0x007c, 0x1078, 0x489b, 0x0040, 0x47ba, 0x1078, 0x8dca, + 0x0078, 0x47bc, 0xa085, 0x0001, 0x007c, 0x1078, 0x489b, 0x0040, + 0x47c5, 0x1078, 0x8d62, 0x0078, 0x47c7, 0xa085, 0x0001, 0x007c, + 0x1078, 0x489b, 0x0040, 0x47d0, 0x1078, 0x8dac, 0x0078, 0x47d2, + 0xa085, 0x0001, 0x007c, 0x1078, 0x489b, 0x0040, 0x47db, 0x1078, + 0x8d7e, 0x0078, 0x47dd, 0xa085, 0x0001, 0x007c, 0x1078, 0x489b, + 0x0040, 0x47e6, 0x1078, 0x8de8, 0x0078, 0x47e8, 0xa085, 0x0001, + 0x007c, 0x127e, 0x007e, 0x0d7e, 0x2091, 0x8000, 0x6080, 0xa06d, + 0x0040, 0x4808, 0x6800, 0x007e, 0x6837, 0x0103, 0x6b4a, 0x6847, + 0x0000, 0x1078, 0x8f7d, 0x007e, 0x6000, 0xd0fc, 0x0040, 0x4802, + 0x1078, 0xa4ed, 0x007f, 0x1078, 0x4a73, 0x007f, 0x0078, 0x47ef, + 0x6083, 0x0000, 0x6087, 0x0000, 0x0d7f, 0x007f, 0x127f, 0x007c, + 0x60a4, 0xa00d, 0x00c0, 0x4817, 0xa085, 0x0001, 0x007c, 0x0e7e, + 0x2170, 0x7000, 0xa005, 0x00c0, 0x482c, 0x20a9, 0x0010, 0xae88, + 0x0004, 0x2104, 0xa606, 0x0040, 0x482c, 0x8108, 0x00f0, 0x4821, + 0xa085, 0x0001, 0x0078, 0x482d, 0xa006, 0x0e7f, 0x007c, 0x0d7e, + 0x127e, 0x2091, 0x8000, 0x60a4, 0xa06d, 0x00c0, 0x483d, 0x1078, + 0x138b, 0x0040, 0x484f, 0x2d00, 0x60a6, 0x6803, 0x0001, 0x6807, + 0x0000, 0xad88, 0x0004, 0x20a9, 0x0010, 0x200b, 0xffff, 0x8108, + 0x00f0, 0x4845, 0xa085, 0x0001, 0x127f, 0x0d7f, 0x007c, 0xa006, + 0x0078, 0x484c, 0x0d7e, 0x127e, 0x2091, 0x8000, 0x60a4, 0xa06d, + 0x0040, 0x4860, 0x60a7, 0x0000, 0x1078, 0x13a4, 0xa085, 0x0001, + 0x127f, 0x0d7f, 0x007c, 0x60a8, 0xa00d, 0x00c0, 0x486a, 0xa085, + 0x0001, 0x007c, 0x0e7e, 0x2170, 0x7050, 0xa005, 0x00c0, 0x487d, + 0x20a9, 0x0010, 0xae88, 0x0018, 0x2104, 0xa606, 0x0040, 0x487d, + 0x8108, 0x00f0, 0x4874, 0xa085, 0x0001, 0x0e7f, 0x007c, 0x127e, + 0x2091, 0x8000, 0x1078, 0x4863, 0x00c0, 0x4899, 0x200b, 0xffff, + 0x0d7e, 0x60a8, 0x2068, 0x6854, 0xa08a, 0x0002, 0x0048, 0x4894, + 0x8001, 0x6856, 0x0078, 0x4898, 0x1078, 0x13a4, 0x60ab, 0x0000, + 0x0d7f, 0x127f, 0x007c, 0x609c, 0xd0a4, 0x007c, 0x0f7e, 0x71b0, + 0x81ff, 0x00c0, 0x48b9, 0x71cc, 0xd19c, 0x0040, 0x48b9, 0x2001, + 0x007e, 0xa080, 0xa735, 0x2004, 0xa07d, 0x0040, 0x48b9, 0x7804, + 0xa084, 0x00ff, 0xa086, 0x0006, 0x00c0, 0x48b9, 0x7800, 0xc0ed, + 0x7802, 0x2079, 0xa652, 0x7804, 0xd0a4, 0x0040, 0x48df, 0x157e, + 0x0c7e, 0x20a9, 0x007f, 0x2009, 0x0000, 0x017e, 0x1078, 0x45c4, + 0x00c0, 0x48d9, 0x6004, 0xa084, 0xff00, 0x8007, 0xa096, 0x0004, + 0x0040, 0x48d6, 0xa086, 0x0006, 0x00c0, 0x48d9, 0x6000, 0xc0ed, + 0x6002, 0x017f, 0x8108, 0x00f0, 0x48c5, 0x0c7f, 0x157f, 0x1078, + 0x4967, 0x0040, 0x48e8, 0x2001, 0xa8a1, 0x200c, 0x0078, 0x48f0, + 0x2079, 0xa652, 0x7804, 0xd0a4, 0x0040, 0x48f4, 0x2009, 0x07d0, + 0x2011, 0x48f6, 0x1078, 0x5add, 0x0f7f, 0x007c, 0x2011, 0x48f6, + 0x1078, 0x5a45, 0x1078, 0x4967, 0x0040, 0x491e, 0x2001, 0xa7b3, + 0x2004, 0xa080, 0x0000, 0x200c, 0xc1ec, 0x2102, 0x2001, 0xa653, + 0x2004, 0xd0a4, 0x0040, 0x4912, 0x2009, 0x07d0, 0x2011, 0x48f6, + 0x1078, 0x5add, 0x0e7e, 0x2071, 0xa600, 0x706f, 0x0000, 0x7073, + 0x0000, 0x1078, 0x2677, 0x0e7f, 0x0078, 0x4956, 0x157e, 0x0c7e, + 0x20a9, 0x007f, 0x2009, 0x0000, 0x017e, 0x1078, 0x45c4, 0x00c0, + 0x4950, 0x6000, 0xd0ec, 0x0040, 0x4950, 0x047e, 0x62a0, 0xa294, + 0x00ff, 0x8227, 0xa006, 0x2009, 0x0029, 0x1078, 0xa21d, 0x6000, + 0xc0e5, 0xc0ec, 0x6002, 0x6004, 0xa084, 0x00ff, 0xa085, 0x0700, + 0x6006, 0x2019, 0x0029, 0x1078, 0x5f01, 0x077e, 0x2039, 0x0000, + 0x1078, 0x5e0a, 0x2009, 0x0000, 0x1078, 0x9f8b, 0x077f, 0x047f, + 0x017f, 0x8108, 0x00f0, 0x4924, 0x0c7f, 0x157f, 0x007c, 0x0c7e, + 0x6018, 0x2060, 0x6000, 0xc0ec, 0x6002, 0x0c7f, 0x007c, 0x7818, + 0x2004, 0xd0ac, 0x007c, 0x7818, 0x2004, 0xd0bc, 0x007c, 0x0f7e, + 0x2001, 0xa7b3, 0x2004, 0xa07d, 0x0040, 0x4970, 0x7800, 0xd0ec, + 0x0f7f, 0x007c, 0x127e, 0x027e, 0x2091, 0x8000, 0x007e, 0x62a0, + 0xa290, 0xa735, 0x2204, 0xac06, 0x10c0, 0x1332, 0x007f, 0x6200, + 0xa005, 0x0040, 0x4986, 0xc2fd, 0x0078, 0x4987, 0xc2fc, 0x6202, + 0x027f, 0x127f, 0x007c, 0x2011, 0xa633, 0x2204, 0xd0cc, 0x0040, + 0x4998, 0x2001, 0xa89f, 0x200c, 0x2011, 0x4999, 0x1078, 0x5add, + 0x007c, 0x2011, 0x4999, 0x1078, 0x5a45, 0x2011, 0xa633, 0x2204, + 0xc0cc, 0x2012, 0x007c, 0x2071, 0xa714, 0x7003, 0x0001, 0x7007, + 0x0000, 0x7013, 0x0000, 0x7017, 0x0000, 0x701b, 0x0000, 0x701f, + 0x0000, 0x700b, 0x0000, 0x704b, 0x0001, 0x704f, 0x0000, 0x705b, + 0x0020, 0x705f, 0x0040, 0x707f, 0x0000, 0x2071, 0xa87d, 0x7003, + 0xa714, 0x7007, 0x0000, 0x700b, 0x0000, 0x700f, 0xa85d, 0x7013, + 0x0020, 0x7017, 0x0040, 0x7037, 0x0000, 0x007c, 0x017e, 0x0e7e, + 0x2071, 0xa835, 0xa00e, 0x7186, 0x718a, 0x7097, 0x0001, 0x2001, + 0xa653, 0x2004, 0xd0fc, 0x00c0, 0x49e8, 0x2001, 0xa653, 0x2004, + 0xa00e, 0xd09c, 0x0040, 0x49e5, 0x8108, 0x7102, 0x0078, 0x4a3b, + 0x2001, 0xa672, 0x200c, 0xa184, 0x000f, 0x2009, 0xa673, 0x210c, + 0x0079, 0x49f2, 0x49dd, 0x4a13, 0x4a1b, 0x4a26, 0x4a2c, 0x49dd, + 0x49dd, 0x49dd, 0x4a02, 0x49dd, 0x49dd, 0x49dd, 0x49dd, 0x49dd, + 0x49dd, 0x49dd, 0x7003, 0x0004, 0x137e, 0x147e, 0x157e, 0x2099, + 0xa676, 0x20a1, 0xa886, 0x20a9, 0x0004, 0x53a3, 0x157f, 0x147f, + 0x137f, 0x0078, 0x4a3b, 0x708f, 0x0005, 0x7007, 0x0122, 0x2001, + 0x0002, 0x0078, 0x4a21, 0x708f, 0x0002, 0x7007, 0x0121, 0x2001, + 0x0003, 0x7002, 0x7097, 0x0001, 0x0078, 0x4a38, 0x7007, 0x0122, + 0x2001, 0x0002, 0x0078, 0x4a30, 0x7007, 0x0121, 0x2001, 0x0003, + 0x7002, 0xa006, 0x7096, 0x708e, 0xa184, 0xff00, 0x8007, 0x709a, + 0xa184, 0x00ff, 0x7092, 0x0e7f, 0x017f, 0x007c, 0x0e7e, 0x2071, + 0xa714, 0x684c, 0xa005, 0x00c0, 0x4a4c, 0x7028, 0xc085, 0x702a, + 0xa085, 0x0001, 0x0078, 0x4a71, 0x6a60, 0x7236, 0x6b64, 0x733a, + 0x6868, 0x703e, 0x7076, 0x686c, 0x7042, 0x707a, 0x684c, 0x702e, + 0x6844, 0x7032, 0x2009, 0x000d, 0x200a, 0x700b, 0x0000, 0x8007, + 0x8006, 0x8006, 0xa08c, 0x003f, 0xa084, 0xffc0, 0xa210, 0x2100, + 0xa319, 0x726e, 0x7372, 0x7028, 0xc084, 0x702a, 0x7007, 0x0001, + 0xa006, 0x0e7f, 0x007c, 0x0e7e, 0x027e, 0x6838, 0xd0fc, 0x00c0, + 0x4ac9, 0x6804, 0xa00d, 0x0040, 0x4a8f, 0x0d7e, 0x2071, 0xa600, + 0xa016, 0x702c, 0x2168, 0x6904, 0x206a, 0x8210, 0x2d00, 0x81ff, + 0x00c0, 0x4a82, 0x702e, 0x70ac, 0xa200, 0x70ae, 0x0d7f, 0x2071, + 0xa714, 0x701c, 0xa005, 0x00c0, 0x4adb, 0x0068, 0x4ad9, 0x2071, + 0xa835, 0x7200, 0x82ff, 0x0040, 0x4ad9, 0x6934, 0xa186, 0x0103, + 0x00c0, 0x4aec, 0x6948, 0x6844, 0xa105, 0x00c0, 0x4acc, 0x2009, + 0x8020, 0x2200, 0x0079, 0x4aac, 0x4ad9, 0x4ab1, 0x4b09, 0x4b17, + 0x4ad9, 0x2071, 0x0000, 0x7018, 0xd084, 0x00c0, 0x4ad9, 0x7122, + 0x683c, 0x7026, 0x6840, 0x702a, 0x701b, 0x0001, 0x2091, 0x4080, + 0x2071, 0xa600, 0x702c, 0x206a, 0x2d00, 0x702e, 0x70ac, 0x8000, + 0x70ae, 0x027f, 0x0e7f, 0x007c, 0x6844, 0xa086, 0x0100, 0x00c0, + 0x4ad9, 0x6868, 0xa005, 0x00c0, 0x4ad9, 0x2009, 0x8020, 0x0078, + 0x4aa9, 0x2071, 0xa714, 0x2d08, 0x206b, 0x0000, 0x7010, 0x8000, + 0x7012, 0x7018, 0xa06d, 0x711a, 0x0040, 0x4ae9, 0x6902, 0x0078, + 0x4aea, 0x711e, 0x0078, 0x4ac9, 0xa18c, 0x00ff, 0xa186, 0x0017, + 0x0040, 0x4afa, 0xa186, 0x001e, 0x0040, 0x4afa, 0xa18e, 0x001f, + 0x00c0, 0x4ad9, 0x684c, 0xd0cc, 0x0040, 0x4ad9, 0x6850, 0xa084, + 0x00ff, 0xa086, 0x0001, 0x00c0, 0x4ad9, 0x2009, 0x8021, 0x0078, + 0x4aa9, 0x7084, 0x8008, 0xa092, 0x001e, 0x00c8, 0x4ad9, 0x7186, + 0xae90, 0x0003, 0xa210, 0x683c, 0x2012, 0x0078, 0x4b27, 0x7084, + 0x8008, 0xa092, 0x000f, 0x00c8, 0x4ad9, 0x7186, 0xae90, 0x0003, + 0x8003, 0xa210, 0x683c, 0x2012, 0x8210, 0x6840, 0x2012, 0x7088, + 0xa10a, 0x0048, 0x4ac0, 0x718c, 0x7084, 0xa10a, 0x0048, 0x4ac0, + 0x2071, 0x0000, 0x7018, 0xd084, 0x00c0, 0x4ac0, 0x2071, 0xa835, + 0x7000, 0xa086, 0x0002, 0x00c0, 0x4b47, 0x1078, 0x4dc3, 0x2071, + 0x0000, 0x701b, 0x0001, 0x2091, 0x4080, 0x0078, 0x4ac0, 0x1078, + 0x4dee, 0x2071, 0x0000, 0x701b, 0x0001, 0x2091, 0x4080, 0x0078, + 0x4ac0, 0x007e, 0x684c, 0x007e, 0x6837, 0x0103, 0x20a9, 0x001c, + 0xad80, 0x0011, 0x20a0, 0x2001, 0x0000, 0x40a4, 0x007f, 0xa084, + 0x00ff, 0x684e, 0x007f, 0x684a, 0x6952, 0x007c, 0x2071, 0xa714, + 0x7004, 0x0079, 0x4b6b, 0x4b75, 0x4b86, 0x4d94, 0x4d95, 0x4dbc, + 0x4dc2, 0x4b76, 0x4d82, 0x4d23, 0x4da5, 0x007c, 0x127e, 0x2091, + 0x8000, 0x0068, 0x4b85, 0x2009, 0x000d, 0x7030, 0x200a, 0x2091, + 0x4080, 0x7007, 0x0001, 0x700b, 0x0000, 0x127f, 0x2069, 0xa8c4, + 0x6844, 0xa005, 0x0050, 0x4bae, 0x00c0, 0x4bae, 0x127e, 0x2091, + 0x8000, 0x2069, 0x0000, 0x6934, 0x2001, 0xa720, 0x2004, 0xa10a, + 0x0040, 0x4ba9, 0x0068, 0x4bad, 0x2069, 0x0000, 0x6818, 0xd084, + 0x00c0, 0x4bad, 0x2009, 0x8040, 0x6922, 0x681b, 0x0001, 0x2091, + 0x4080, 0x2069, 0xa8c4, 0x6847, 0xffff, 0x127f, 0x2069, 0xa600, + 0x6848, 0x6964, 0xa102, 0x2069, 0xa835, 0x688a, 0x6984, 0x701c, + 0xa06d, 0x0040, 0x4bc0, 0x81ff, 0x0040, 0x4c08, 0x0078, 0x4bd6, + 0x81ff, 0x0040, 0x4cda, 0x2071, 0xa835, 0x7184, 0x7088, 0xa10a, + 0x00c8, 0x4bd6, 0x7190, 0x2071, 0xa8c4, 0x7040, 0xa005, 0x0040, + 0x4bd6, 0x00d0, 0x4cda, 0x7142, 0x0078, 0x4cda, 0x2071, 0xa835, + 0x718c, 0x127e, 0x2091, 0x8000, 0x7084, 0xa10a, 0x0048, 0x4cf7, + 0x0068, 0x4c8c, 0x2071, 0x0000, 0x7018, 0xd084, 0x00c0, 0x4c8c, + 0x2001, 0xffff, 0x2071, 0xa8c4, 0x7042, 0x2071, 0xa835, 0x7000, + 0xa086, 0x0002, 0x00c0, 0x4bfe, 0x1078, 0x4dc3, 0x2071, 0x0000, + 0x701b, 0x0001, 0x2091, 0x4080, 0x0078, 0x4c8c, 0x1078, 0x4dee, + 0x2071, 0x0000, 0x701b, 0x0001, 0x2091, 0x4080, 0x0078, 0x4c8c, + 0x2071, 0xa835, 0x7000, 0xa005, 0x0040, 0x4cb9, 0x6934, 0xa186, + 0x0103, 0x00c0, 0x4c8f, 0x684c, 0xd0bc, 0x00c0, 0x4cb9, 0x6948, + 0x6844, 0xa105, 0x00c0, 0x4cac, 0x2009, 0x8020, 0x2071, 0xa835, + 0x7000, 0x0079, 0x4c23, 0x4cb9, 0x4c71, 0x4c49, 0x4c5b, 0x4c28, + 0x137e, 0x147e, 0x157e, 0x2099, 0xa676, 0x20a1, 0xa886, 0x20a9, + 0x0004, 0x53a3, 0x157f, 0x147f, 0x137f, 0x2071, 0xa87d, 0xad80, + 0x000f, 0x700e, 0x7013, 0x0002, 0x7007, 0x0002, 0x700b, 0x0000, + 0x2e10, 0x1078, 0x13db, 0x2071, 0xa714, 0x7007, 0x0009, 0x0078, + 0x4cda, 0x7084, 0x8008, 0xa092, 0x001e, 0x00c8, 0x4cda, 0xae90, + 0x0003, 0xa210, 0x683c, 0x2012, 0x7186, 0x2071, 0xa714, 0x1078, + 0x4e4c, 0x0078, 0x4cda, 0x7084, 0x8008, 0xa092, 0x000f, 0x00c8, + 0x4cda, 0xae90, 0x0003, 0x8003, 0xa210, 0x683c, 0x2012, 0x8210, + 0x6840, 0x2012, 0x7186, 0x2071, 0xa714, 0x1078, 0x4e4c, 0x0078, + 0x4cda, 0x127e, 0x2091, 0x8000, 0x0068, 0x4c8c, 0x2071, 0x0000, + 0x7018, 0xd084, 0x00c0, 0x4c8c, 0x7122, 0x683c, 0x7026, 0x6840, + 0x702a, 0x701b, 0x0001, 0x2091, 0x4080, 0x127f, 0x2071, 0xa714, + 0x1078, 0x4e4c, 0x0078, 0x4cda, 0x127f, 0x0078, 0x4cda, 0xa18c, + 0x00ff, 0xa186, 0x0017, 0x0040, 0x4c9d, 0xa186, 0x001e, 0x0040, + 0x4c9d, 0xa18e, 0x001f, 0x00c0, 0x4cb9, 0x684c, 0xd0cc, 0x0040, + 0x4cb9, 0x6850, 0xa084, 0x00ff, 0xa086, 0x0001, 0x00c0, 0x4cb9, + 0x2009, 0x8021, 0x0078, 0x4c1e, 0x6844, 0xa086, 0x0100, 0x00c0, + 0x4cb9, 0x6868, 0xa005, 0x00c0, 0x4cb9, 0x2009, 0x8020, 0x0078, + 0x4c1e, 0x2071, 0xa714, 0x1078, 0x4e60, 0x0040, 0x4cda, 0x2071, + 0xa714, 0x700f, 0x0001, 0x6934, 0xa184, 0x00ff, 0xa086, 0x0003, + 0x00c0, 0x4cd1, 0x810f, 0xa18c, 0x00ff, 0x8101, 0x0040, 0x4cd1, + 0x710e, 0x7007, 0x0003, 0x1078, 0x4e80, 0x7050, 0xa086, 0x0100, + 0x0040, 0x4d95, 0x127e, 0x2091, 0x8000, 0x2071, 0xa714, 0x7008, + 0xa086, 0x0001, 0x00c0, 0x4cf5, 0x0068, 0x4cf5, 0x2009, 0x000d, + 0x7030, 0x200a, 0x2091, 0x4080, 0x700b, 0x0000, 0x7004, 0xa086, + 0x0006, 0x00c0, 0x4cf5, 0x7007, 0x0001, 0x127f, 0x007c, 0x2071, + 0xa714, 0x1078, 0x4e60, 0x0040, 0x4d20, 0x2071, 0xa835, 0x7084, + 0x700a, 0x20a9, 0x0020, 0x2099, 0xa836, 0x20a1, 0xa85d, 0x53a3, + 0x7087, 0x0000, 0x2071, 0xa714, 0x2069, 0xa87d, 0x706c, 0x6826, + 0x7070, 0x682a, 0x7074, 0x682e, 0x7078, 0x6832, 0x2d10, 0x1078, + 0x13db, 0x7007, 0x0008, 0x2001, 0xffff, 0x2071, 0xa8c4, 0x7042, + 0x127f, 0x0078, 0x4cda, 0x2069, 0xa87d, 0x6808, 0xa08e, 0x0000, + 0x0040, 0x4d81, 0xa08e, 0x0200, 0x0040, 0x4d7f, 0xa08e, 0x0100, + 0x00c0, 0x4d81, 0x127e, 0x2091, 0x8000, 0x0068, 0x4d7c, 0x2069, + 0x0000, 0x6818, 0xd084, 0x00c0, 0x4d7c, 0x702c, 0x7130, 0x8108, + 0xa102, 0x0048, 0x4d4a, 0xa00e, 0x7034, 0x706e, 0x7038, 0x7072, + 0x0078, 0x4d54, 0x706c, 0xa080, 0x0040, 0x706e, 0x00c8, 0x4d54, + 0x7070, 0xa081, 0x0000, 0x7072, 0x7132, 0x6936, 0x700b, 0x0000, + 0x2001, 0xa85a, 0x2004, 0xa005, 0x00c0, 0x4d73, 0x6934, 0x2069, + 0xa835, 0x689c, 0x699e, 0x2069, 0xa8c4, 0xa102, 0x00c0, 0x4d6c, + 0x6844, 0xa005, 0x00d0, 0x4d7a, 0x2001, 0xa85b, 0x200c, 0x810d, + 0x6946, 0x0078, 0x4d7a, 0x2009, 0x8040, 0x6922, 0x681b, 0x0001, + 0x2091, 0x4080, 0x7007, 0x0001, 0x127f, 0x0078, 0x4d81, 0x7007, + 0x0005, 0x007c, 0x701c, 0xa06d, 0x0040, 0x4d93, 0x1078, 0x4e60, + 0x0040, 0x4d93, 0x7007, 0x0003, 0x1078, 0x4e80, 0x7050, 0xa086, + 0x0100, 0x0040, 0x4d95, 0x007c, 0x007c, 0x7050, 0xa09e, 0x0100, + 0x00c0, 0x4d9e, 0x7007, 0x0004, 0x0078, 0x4dbc, 0xa086, 0x0200, + 0x00c0, 0x4da4, 0x7007, 0x0005, 0x007c, 0x2001, 0xa87f, 0x2004, + 0xa08e, 0x0100, 0x00c0, 0x4db1, 0x7007, 0x0001, 0x1078, 0x4e4c, + 0x007c, 0xa08e, 0x0000, 0x0040, 0x4db0, 0xa08e, 0x0200, 0x00c0, + 0x4db0, 0x7007, 0x0005, 0x007c, 0x1078, 0x4e16, 0x7006, 0x1078, + 0x4e4c, 0x007c, 0x007c, 0x0e7e, 0x157e, 0x2071, 0xa835, 0x7184, + 0x81ff, 0x0040, 0x4deb, 0xa006, 0x7086, 0xae80, 0x0003, 0x2071, + 0x0000, 0x21a8, 0x2014, 0x7226, 0x8000, 0x0070, 0x4de8, 0x2014, + 0x722a, 0x8000, 0x0070, 0x4de8, 0x2014, 0x722e, 0x8000, 0x0070, + 0x4de8, 0x2014, 0x723a, 0x8000, 0x0070, 0x4de8, 0x2014, 0x723e, + 0xa180, 0x8030, 0x7022, 0x157f, 0x0e7f, 0x007c, 0x0e7e, 0x157e, + 0x2071, 0xa835, 0x7184, 0x81ff, 0x0040, 0x4e13, 0xa006, 0x7086, + 0xae80, 0x0003, 0x2071, 0x0000, 0x21a8, 0x2014, 0x7226, 0x8000, + 0x2014, 0x722a, 0x8000, 0x0070, 0x4e0c, 0x2014, 0x723a, 0x8000, + 0x2014, 0x723e, 0x0078, 0x4e10, 0x2001, 0x8020, 0x0078, 0x4e12, + 0x2001, 0x8042, 0x7022, 0x157f, 0x0e7f, 0x007c, 0x702c, 0x7130, + 0x8108, 0xa102, 0x0048, 0x4e23, 0xa00e, 0x7034, 0x706e, 0x7038, + 0x7072, 0x0078, 0x4e2d, 0x706c, 0xa080, 0x0040, 0x706e, 0x00c8, + 0x4e2d, 0x7070, 0xa081, 0x0000, 0x7072, 0x7132, 0x700c, 0x8001, + 0x700e, 0x00c0, 0x4e43, 0x127e, 0x2091, 0x8000, 0x0068, 0x4e46, + 0x2001, 0x000d, 0x2102, 0x2091, 0x4080, 0x2001, 0x0001, 0x700b, + 0x0000, 0x127f, 0x007c, 0x2001, 0x0007, 0x007c, 0x2001, 0x0006, + 0x700b, 0x0001, 0x127f, 0x007c, 0x701c, 0xa06d, 0x0040, 0x4e5f, + 0x127e, 0x2091, 0x8000, 0x7010, 0x8001, 0x7012, 0x2d04, 0x701e, + 0xa005, 0x00c0, 0x4e5c, 0x701a, 0x127f, 0x1078, 0x13a4, 0x007c, + 0x2019, 0x000d, 0x2304, 0x230c, 0xa10e, 0x0040, 0x4e6f, 0x2304, + 0x230c, 0xa10e, 0x0040, 0x4e6f, 0xa006, 0x0078, 0x4e7f, 0x732c, + 0x8319, 0x7130, 0xa102, 0x00c0, 0x4e79, 0x2300, 0xa005, 0x0078, + 0x4e7f, 0x0048, 0x4e7e, 0xa302, 0x0078, 0x4e7f, 0x8002, 0x007c, + 0x2d00, 0x7026, 0xa080, 0x000d, 0x7056, 0x7053, 0x0000, 0x127e, + 0x2091, 0x8000, 0x2009, 0xa8d6, 0x2104, 0xc08d, 0x200a, 0x127f, + 0x1078, 0x13f9, 0x007c, 0x2071, 0xa6e2, 0x7003, 0x0000, 0x7007, + 0x0000, 0x700f, 0x0000, 0x702b, 0x0001, 0x704f, 0x0000, 0x7053, + 0x0001, 0x705f, 0x0020, 0x7063, 0x0040, 0x7083, 0x0000, 0x708b, + 0x0000, 0x708f, 0x0001, 0x70bf, 0x0000, 0x007c, 0x0e7e, 0x2071, + 0xa6e2, 0x6848, 0xa005, 0x00c0, 0x4ebc, 0x7028, 0xc085, 0x702a, + 0xa085, 0x0001, 0x0078, 0x4ee1, 0x6a50, 0x7236, 0x6b54, 0x733a, + 0x6858, 0x703e, 0x707a, 0x685c, 0x7042, 0x707e, 0x6848, 0x702e, + 0x6840, 0x7032, 0x2009, 0x000c, 0x200a, 0x8007, 0x8006, 0x8006, + 0xa08c, 0x003f, 0xa084, 0xffc0, 0xa210, 0x2100, 0xa319, 0x7272, + 0x7376, 0x7028, 0xc084, 0x702a, 0x7007, 0x0001, 0x700f, 0x0000, + 0xa006, 0x0e7f, 0x007c, 0x2b78, 0x2071, 0xa6e2, 0x7004, 0x1079, + 0x4f41, 0x700c, 0x0079, 0x4eec, 0x4ef1, 0x4ee6, 0x4ee6, 0x4ee6, + 0x4ee6, 0x007c, 0x700c, 0x0079, 0x4ef5, 0x4efa, 0x4f3f, 0x4f3f, + 0x4f40, 0x4f40, 0x7830, 0x7930, 0xa106, 0x0040, 0x4f04, 0x7830, + 0x7930, 0xa106, 0x00c0, 0x4f2a, 0x7030, 0xa10a, 0x0040, 0x4f2a, + 0x00c8, 0x4f0c, 0x712c, 0xa10a, 0xa18a, 0x0002, 0x00c8, 0x4f2b, + 0x1078, 0x1370, 0x0040, 0x4f2a, 0x2d00, 0x705a, 0x7063, 0x0040, + 0x2001, 0x0003, 0x7057, 0x0000, 0x127e, 0x007e, 0x2091, 0x8000, + 0x2009, 0xa8d6, 0x2104, 0xc085, 0x200a, 0x007f, 0x700e, 0x127f, + 0x1078, 0x13f9, 0x007c, 0x1078, 0x1370, 0x0040, 0x4f2a, 0x2d00, + 0x705a, 0x1078, 0x1370, 0x00c0, 0x4f37, 0x0078, 0x4f16, 0x2d00, + 0x7086, 0x7063, 0x0080, 0x2001, 0x0004, 0x0078, 0x4f1a, 0x007c, + 0x007c, 0x4f52, 0x4f53, 0x4f8a, 0x4f8b, 0x4f3f, 0x4fc1, 0x4fc6, + 0x4ffd, 0x4ffe, 0x5019, 0x501a, 0x501b, 0x501c, 0x501d, 0x501e, + 0x509e, 0x50c8, 0x007c, 0x700c, 0x0079, 0x4f56, 0x4f5b, 0x4f5e, + 0x4f6e, 0x4f89, 0x4f89, 0x1078, 0x4ef2, 0x007c, 0x127e, 0x8001, + 0x700e, 0x7058, 0x007e, 0x1078, 0x5464, 0x0040, 0x4f6b, 0x2091, + 0x8000, 0x1078, 0x4ef2, 0x0d7f, 0x0078, 0x4f77, 0x127e, 0x8001, + 0x700e, 0x1078, 0x5464, 0x7058, 0x2068, 0x7084, 0x705a, 0x6803, + 0x0000, 0x6807, 0x0000, 0x6834, 0xa084, 0x00ff, 0xa08a, 0x0020, + 0x00c8, 0x4f86, 0x1079, 0x4fa1, 0x127f, 0x007c, 0x127f, 0x1078, + 0x501f, 0x007c, 0x007c, 0x007c, 0x0e7e, 0x2071, 0xa6e2, 0x700c, + 0x0079, 0x4f92, 0x4f97, 0x4f97, 0x4f97, 0x4f99, 0x4f9d, 0x0e7f, + 0x007c, 0x700f, 0x0001, 0x0078, 0x4f9f, 0x700f, 0x0002, 0x0e7f, + 0x007c, 0x501f, 0x501f, 0x503b, 0x501f, 0x5171, 0x501f, 0x501f, + 0x501f, 0x501f, 0x501f, 0x503b, 0x51bb, 0x5208, 0x5261, 0x5277, + 0x501f, 0x501f, 0x5057, 0x503b, 0x501f, 0x501f, 0x5078, 0x5338, + 0x5356, 0x501f, 0x5057, 0x501f, 0x501f, 0x501f, 0x501f, 0x506d, + 0x5356, 0x7020, 0x2068, 0x1078, 0x13a4, 0x007c, 0x700c, 0x0079, + 0x4fc9, 0x4fce, 0x4fd1, 0x4fe1, 0x4ffc, 0x4ffc, 0x1078, 0x4ef2, + 0x007c, 0x127e, 0x8001, 0x700e, 0x7058, 0x007e, 0x1078, 0x5464, + 0x0040, 0x4fde, 0x2091, 0x8000, 0x1078, 0x4ef2, 0x0d7f, 0x0078, + 0x4fea, 0x127e, 0x8001, 0x700e, 0x1078, 0x5464, 0x7058, 0x2068, + 0x7084, 0x705a, 0x6803, 0x0000, 0x6807, 0x0000, 0x6834, 0xa084, + 0x00ff, 0xa08a, 0x001a, 0x00c8, 0x4ff9, 0x1079, 0x4fff, 0x127f, + 0x007c, 0x127f, 0x1078, 0x501f, 0x007c, 0x007c, 0x007c, 0x501f, + 0x503b, 0x515b, 0x501f, 0x503b, 0x501f, 0x503b, 0x503b, 0x501f, + 0x503b, 0x515b, 0x503b, 0x503b, 0x503b, 0x503b, 0x503b, 0x501f, + 0x503b, 0x515b, 0x501f, 0x501f, 0x503b, 0x501f, 0x501f, 0x501f, + 0x503b, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x007c, 0x7007, + 0x0001, 0x6838, 0xa084, 0x00ff, 0xc0d5, 0x683a, 0x127e, 0x2091, + 0x8000, 0x1078, 0x4a73, 0x127f, 0x007c, 0x7007, 0x0001, 0x6838, + 0xa084, 0x00ff, 0xc0e5, 0x683a, 0x127e, 0x2091, 0x8000, 0x1078, + 0x4a73, 0x127f, 0x007c, 0x7007, 0x0001, 0x6838, 0xa084, 0x00ff, + 0xc0ed, 0x683a, 0x127e, 0x2091, 0x8000, 0x1078, 0x4a73, 0x127f, + 0x007c, 0x7007, 0x0001, 0x6838, 0xa084, 0x00ff, 0xc0dd, 0x683a, + 0x127e, 0x2091, 0x8000, 0x1078, 0x4a73, 0x127f, 0x007c, 0x6834, + 0x8007, 0xa084, 0x00ff, 0x0040, 0x502d, 0x8001, 0x00c0, 0x5064, + 0x7007, 0x0001, 0x0078, 0x513a, 0x7007, 0x0006, 0x7012, 0x2d00, + 0x7016, 0x701a, 0x704b, 0x513a, 0x007c, 0x684c, 0xa084, 0x00c0, + 0xa086, 0x00c0, 0x00c0, 0x5078, 0x7007, 0x0001, 0x0078, 0x5373, + 0x2d00, 0x7016, 0x701a, 0x20a9, 0x0004, 0xa080, 0x0024, 0x2098, + 0x20a1, 0xa70d, 0x53a3, 0x6858, 0x7012, 0xa082, 0x0401, 0x00c8, + 0x5049, 0x6884, 0xa08a, 0x0002, 0x00c8, 0x5049, 0x82ff, 0x00c0, + 0x509a, 0x6888, 0x698c, 0xa105, 0x0040, 0x509a, 0x2001, 0x510a, + 0x0078, 0x509d, 0xa280, 0x5100, 0x2004, 0x70c6, 0x7010, 0xa015, + 0x0040, 0x50e8, 0x1078, 0x1370, 0x00c0, 0x50a9, 0x7007, 0x000f, + 0x007c, 0x2d00, 0x7022, 0x70c4, 0x2060, 0x6000, 0x6836, 0x6004, + 0xad00, 0x7096, 0x6008, 0xa20a, 0x00c8, 0x50b8, 0xa00e, 0x2200, + 0x7112, 0x620c, 0x8003, 0x800b, 0xa296, 0x0004, 0x0040, 0x50c1, + 0xa108, 0x719a, 0x810b, 0x719e, 0xae90, 0x0022, 0x1078, 0x13db, + 0x7090, 0xa08e, 0x0100, 0x0040, 0x50dc, 0xa086, 0x0200, 0x0040, + 0x50d4, 0x7007, 0x0010, 0x007c, 0x7020, 0x2068, 0x1078, 0x13a4, + 0x7014, 0x2068, 0x0078, 0x5049, 0x7020, 0x2068, 0x7018, 0x6802, + 0x6807, 0x0000, 0x2d08, 0x2068, 0x6906, 0x711a, 0x0078, 0x509e, + 0x7014, 0x2068, 0x7007, 0x0001, 0x6884, 0xa005, 0x00c0, 0x50f7, + 0x6888, 0x698c, 0xa105, 0x0040, 0x50f7, 0x1078, 0x510e, 0x6834, + 0xa084, 0x00ff, 0xa086, 0x001e, 0x0040, 0x5373, 0x0078, 0x513a, + 0x5102, 0x5106, 0x0002, 0x0011, 0x0007, 0x0004, 0x000a, 0x000f, + 0x0005, 0x0006, 0x000a, 0x0011, 0x0005, 0x0004, 0x0f7e, 0x0e7e, + 0x0c7e, 0x077e, 0x067e, 0x6f88, 0x6e8c, 0x6804, 0x2060, 0xacf0, + 0x0021, 0xacf8, 0x0027, 0x2009, 0x0005, 0x700c, 0x7816, 0x7008, + 0x7812, 0x7004, 0x7806, 0x7000, 0x7802, 0x7e0e, 0x7f0a, 0x8109, + 0x0040, 0x5130, 0xaef2, 0x0004, 0xaffa, 0x0006, 0x0078, 0x511d, + 0x6004, 0xa065, 0x00c0, 0x5117, 0x067f, 0x077f, 0x0c7f, 0x0e7f, + 0x0f7f, 0x007c, 0x2009, 0xa62f, 0x210c, 0x81ff, 0x00c0, 0x5155, + 0x6838, 0xa084, 0x00ff, 0x683a, 0x1078, 0x4353, 0x00c0, 0x5149, + 0x007c, 0x1078, 0x4b51, 0x127e, 0x2091, 0x8000, 0x1078, 0x8f7d, + 0x1078, 0x4a73, 0x127f, 0x0078, 0x5148, 0x2001, 0x0028, 0x2009, + 0x0000, 0x0078, 0x5149, 0x7018, 0x6802, 0x2d08, 0x2068, 0x6906, + 0x711a, 0x7010, 0x8001, 0x7012, 0x0040, 0x516a, 0x7007, 0x0006, + 0x0078, 0x5170, 0x7014, 0x2068, 0x7007, 0x0001, 0x7048, 0x107a, + 0x007c, 0x7007, 0x0001, 0x6944, 0x810f, 0xa18c, 0x00ff, 0x6848, + 0xa084, 0x00ff, 0x20a9, 0x0001, 0xa096, 0x0001, 0x0040, 0x519a, + 0x2009, 0x0000, 0x20a9, 0x00ff, 0xa096, 0x0002, 0x0040, 0x519a, + 0xa005, 0x00c0, 0x51ad, 0x6944, 0x810f, 0xa18c, 0x00ff, 0x1078, + 0x45c4, 0x00c0, 0x51ad, 0x067e, 0x6e50, 0x1078, 0x46b3, 0x067f, + 0x0078, 0x51ad, 0x047e, 0x2011, 0xa60c, 0x2224, 0xc484, 0xc48c, + 0x2412, 0x047f, 0x0c7e, 0x1078, 0x45c4, 0x00c0, 0x51a9, 0x1078, + 0x4852, 0x8108, 0x00f0, 0x51a3, 0x0c7f, 0x684c, 0xd084, 0x00c0, + 0x51b4, 0x1078, 0x13a4, 0x007c, 0x127e, 0x2091, 0x8000, 0x1078, + 0x4a73, 0x127f, 0x007c, 0x127e, 0x2091, 0x8000, 0x7007, 0x0001, + 0x2001, 0xa653, 0x2004, 0xd0a4, 0x0040, 0x51ff, 0x2061, 0xa933, + 0x6100, 0xd184, 0x0040, 0x51df, 0x6858, 0xa084, 0x00ff, 0x00c0, + 0x5202, 0x6000, 0xd084, 0x0040, 0x51ff, 0x6004, 0xa005, 0x00c0, + 0x5205, 0x6003, 0x0000, 0x600b, 0x0000, 0x0078, 0x51fc, 0x2011, + 0x0001, 0x6860, 0xa005, 0x00c0, 0x51e7, 0x2001, 0x001e, 0x8000, + 0x6016, 0x6858, 0xa084, 0x00ff, 0x0040, 0x51ff, 0x6006, 0x6858, + 0x8007, 0xa084, 0x00ff, 0x0040, 0x51ff, 0x600a, 0x6858, 0x8000, + 0x00c0, 0x51fb, 0xc28d, 0x6202, 0x127f, 0x0078, 0x5453, 0x127f, + 0x0078, 0x544b, 0x127f, 0x0078, 0x5443, 0x127f, 0x0078, 0x5447, + 0x127e, 0x2091, 0x8000, 0x7007, 0x0001, 0x2001, 0xa653, 0x2004, + 0xd0a4, 0x0040, 0x525e, 0x2061, 0xa933, 0x6000, 0xd084, 0x0040, + 0x525e, 0x6204, 0x6308, 0xd08c, 0x00c0, 0x5250, 0x6c48, 0xa484, + 0x0003, 0x0040, 0x5236, 0x6958, 0xa18c, 0x00ff, 0x8001, 0x00c0, + 0x522f, 0x2100, 0xa210, 0x0048, 0x525b, 0x0078, 0x5236, 0x8001, + 0x00c0, 0x525b, 0x2100, 0xa212, 0x0048, 0x525b, 0xa484, 0x000c, + 0x0040, 0x5250, 0x6958, 0x810f, 0xa18c, 0x00ff, 0xa082, 0x0004, + 0x00c0, 0x5248, 0x2100, 0xa318, 0x0048, 0x525b, 0x0078, 0x5250, + 0xa082, 0x0004, 0x00c0, 0x525b, 0x2100, 0xa31a, 0x0048, 0x525b, + 0x6860, 0xa005, 0x0040, 0x5256, 0x8000, 0x6016, 0x6206, 0x630a, + 0x127f, 0x0078, 0x5453, 0x127f, 0x0078, 0x544f, 0x127f, 0x0078, + 0x544b, 0x127e, 0x2091, 0x8000, 0x7007, 0x0001, 0x2061, 0xa933, + 0x6300, 0xd38c, 0x00c0, 0x5271, 0x6308, 0x8318, 0x0048, 0x5274, + 0x630a, 0x127f, 0x0078, 0x5461, 0x127f, 0x0078, 0x544f, 0x127e, + 0x0c7e, 0x2091, 0x8000, 0x7007, 0x0001, 0x684c, 0xd0ac, 0x0040, + 0x528b, 0x0c7e, 0x2061, 0xa933, 0x6000, 0xa084, 0xfcff, 0x6002, + 0x0c7f, 0x0078, 0x52ba, 0x6858, 0xa005, 0x0040, 0x52d1, 0x685c, + 0xa065, 0x0040, 0x52cd, 0x2001, 0xa62f, 0x2004, 0xa005, 0x0040, + 0x529d, 0x1078, 0x8ec6, 0x0078, 0x52ab, 0x6013, 0x0400, 0x6037, + 0x0000, 0x694c, 0xd1a4, 0x0040, 0x52a7, 0x6950, 0x6136, 0x2009, + 0x0041, 0x1078, 0x775c, 0x6958, 0xa18c, 0xff00, 0xa186, 0x2000, + 0x00c0, 0x52ba, 0x027e, 0x2009, 0x0000, 0x2011, 0xfdff, 0x1078, + 0x5bf1, 0x027f, 0x684c, 0xd0c4, 0x0040, 0x52c9, 0x2061, 0xa933, + 0x6000, 0xd08c, 0x00c0, 0x52c9, 0x6008, 0x8000, 0x0048, 0x52cd, + 0x600a, 0x0c7f, 0x127f, 0x0078, 0x5453, 0x0c7f, 0x127f, 0x0078, + 0x544b, 0x6954, 0xa186, 0x0045, 0x0040, 0x5306, 0xa186, 0x002a, + 0x00c0, 0x52e1, 0x2001, 0xa60c, 0x200c, 0xc194, 0x2102, 0x0078, + 0x52ba, 0xa186, 0x0020, 0x0040, 0x52fa, 0xa186, 0x0029, 0x0040, + 0x52ed, 0xa186, 0x002d, 0x00c0, 0x52cd, 0x6944, 0xa18c, 0xff00, + 0x810f, 0x1078, 0x45c4, 0x00c0, 0x52ba, 0x6000, 0xc0e4, 0x6002, + 0x0078, 0x52ba, 0x685c, 0xa065, 0x0040, 0x52cd, 0x6007, 0x0024, + 0x2001, 0xa8a3, 0x2004, 0x6016, 0x0078, 0x52ba, 0x685c, 0xa065, + 0x0040, 0x52cd, 0x0e7e, 0x6860, 0xa075, 0x2001, 0xa62f, 0x2004, + 0xa005, 0x0040, 0x531e, 0x1078, 0x8ec6, 0x8eff, 0x0040, 0x531b, + 0x2e60, 0x1078, 0x8ec6, 0x0e7f, 0x0078, 0x52ba, 0x6024, 0xc0dc, + 0xc0d5, 0x6026, 0x2e60, 0x6007, 0x003a, 0x6870, 0xa005, 0x0040, + 0x532f, 0x6007, 0x003b, 0x6874, 0x602a, 0x6878, 0x6012, 0x6003, + 0x0001, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0e7f, 0x0078, 0x52ba, + 0x2061, 0xa933, 0x6000, 0xd084, 0x0040, 0x5352, 0xd08c, 0x00c0, + 0x5461, 0x2091, 0x8000, 0x6204, 0x8210, 0x0048, 0x534c, 0x6206, + 0x2091, 0x8001, 0x0078, 0x5461, 0x2091, 0x8001, 0x6853, 0x0016, + 0x0078, 0x545a, 0x6853, 0x0007, 0x0078, 0x545a, 0x6834, 0x8007, + 0xa084, 0x00ff, 0x00c0, 0x5360, 0x1078, 0x502d, 0x0078, 0x5372, + 0x2030, 0x8001, 0x00c0, 0x536a, 0x7007, 0x0001, 0x1078, 0x5373, + 0x0078, 0x5372, 0x7007, 0x0006, 0x7012, 0x2d00, 0x7016, 0x701a, + 0x704b, 0x5373, 0x007c, 0x0e7e, 0x127e, 0x2091, 0x8000, 0xa03e, + 0x2009, 0xa62f, 0x210c, 0x81ff, 0x00c0, 0x53ff, 0x2009, 0xa60c, + 0x210c, 0xd194, 0x00c0, 0x5431, 0x6848, 0x2070, 0xae82, 0xad00, + 0x0048, 0x53ef, 0x2001, 0xa616, 0x2004, 0xae02, 0x00c8, 0x53ef, + 0x2061, 0xa933, 0x6100, 0xa184, 0x0301, 0xa086, 0x0001, 0x00c0, + 0x53d2, 0x711c, 0xa186, 0x0006, 0x00c0, 0x53da, 0x7018, 0xa005, + 0x0040, 0x53ff, 0x2004, 0xd0e4, 0x00c0, 0x542b, 0x7024, 0xd0dc, + 0x00c0, 0x5435, 0x6853, 0x0000, 0x6803, 0x0000, 0x2d08, 0x7010, + 0xa005, 0x00c0, 0x53be, 0x7112, 0x684c, 0xd0f4, 0x00c0, 0x5439, + 0x2e60, 0x1078, 0x5b27, 0x127f, 0x0e7f, 0x007c, 0x2068, 0x6800, + 0xa005, 0x00c0, 0x53be, 0x6902, 0x2168, 0x684c, 0xd0f4, 0x00c0, + 0x5439, 0x127f, 0x0e7f, 0x007c, 0x127f, 0x0e7f, 0x6853, 0x0006, + 0x0078, 0x545a, 0xd184, 0x0040, 0x53cc, 0xd1c4, 0x00c0, 0x53f3, + 0x0078, 0x53f7, 0x6944, 0xa18c, 0xff00, 0x810f, 0x1078, 0x45c4, + 0x00c0, 0x542b, 0x6000, 0xd0e4, 0x00c0, 0x542b, 0x711c, 0xa186, + 0x0007, 0x00c0, 0x53ef, 0x6853, 0x0002, 0x0078, 0x542d, 0x6853, + 0x0008, 0x0078, 0x542d, 0x6853, 0x000e, 0x0078, 0x542d, 0x6853, + 0x0017, 0x0078, 0x542d, 0x6853, 0x0035, 0x0078, 0x542d, 0x2001, + 0xa672, 0x2004, 0xd0fc, 0x0040, 0x5427, 0x6848, 0x2070, 0xae82, + 0xad00, 0x0048, 0x5427, 0x6058, 0xae02, 0x00c8, 0x5427, 0x711c, + 0xa186, 0x0006, 0x00c0, 0x5427, 0x7018, 0xa005, 0x0040, 0x5427, + 0x2004, 0xd0bc, 0x0040, 0x5427, 0x2039, 0x0001, 0x7000, 0xa086, + 0x0007, 0x00c0, 0x537e, 0x7003, 0x0002, 0x0078, 0x537e, 0x6853, + 0x0028, 0x0078, 0x542d, 0x6853, 0x0029, 0x127f, 0x0e7f, 0x0078, + 0x545a, 0x6853, 0x002a, 0x0078, 0x542d, 0x6853, 0x0045, 0x0078, + 0x542d, 0x2e60, 0x2019, 0x0002, 0x6017, 0x0014, 0x1078, 0x9dc7, + 0x127f, 0x0e7f, 0x007c, 0x2009, 0x003e, 0x0078, 0x5455, 0x2009, + 0x0004, 0x0078, 0x5455, 0x2009, 0x0006, 0x0078, 0x5455, 0x2009, + 0x0016, 0x0078, 0x5455, 0x2009, 0x0001, 0x6854, 0xa084, 0xff00, + 0xa105, 0x6856, 0x2091, 0x8000, 0x1078, 0x4a73, 0x2091, 0x8001, + 0x007c, 0x1078, 0x13a4, 0x007c, 0x702c, 0x7130, 0x8108, 0xa102, + 0x0048, 0x5471, 0xa00e, 0x7034, 0x7072, 0x7038, 0x7076, 0x0078, + 0x547d, 0x7070, 0xa080, 0x0040, 0x7072, 0x00c8, 0x547d, 0x7074, + 0xa081, 0x0000, 0x7076, 0xa085, 0x0001, 0x7932, 0x7132, 0x007c, + 0x0d7e, 0x1078, 0x5b1e, 0x0d7f, 0x007c, 0x0d7e, 0x2011, 0x0004, + 0x2204, 0xa085, 0x8002, 0x2012, 0x0d7f, 0x007c, 0x20e1, 0x0002, + 0x3d08, 0x20e1, 0x2000, 0x3d00, 0xa084, 0x7000, 0x0040, 0x549c, + 0xa086, 0x1000, 0x00c0, 0x54d3, 0x20e1, 0x0000, 0x3d00, 0xa094, + 0xff00, 0x8217, 0xa084, 0xf000, 0xa086, 0x3000, 0x00c0, 0x54b7, + 0xa184, 0xff00, 0x8007, 0xa086, 0x0008, 0x00c0, 0x54d3, 0x1078, + 0x29bb, 0x00c0, 0x54d3, 0x1078, 0x56b2, 0x0078, 0x54ce, 0x20e1, + 0x0004, 0x3d60, 0xd1bc, 0x00c0, 0x54be, 0x3e60, 0xac84, 0x000f, + 0x00c0, 0x54d3, 0xac82, 0xad00, 0x0048, 0x54d3, 0x6858, 0xac02, + 0x00c8, 0x54d3, 0x2009, 0x0047, 0x1078, 0x775c, 0x7a1c, 0xd284, + 0x00c0, 0x548e, 0x007c, 0xa016, 0x1078, 0x15fa, 0x0078, 0x54ce, + 0x0078, 0x54d3, 0x781c, 0xd08c, 0x0040, 0x5502, 0x157e, 0x137e, + 0x147e, 0x20e1, 0x3000, 0x3d20, 0x3e28, 0xa584, 0x0076, 0x00c0, + 0x5518, 0xa484, 0x7000, 0xa086, 0x1000, 0x00c0, 0x5507, 0x1078, + 0x554e, 0x0040, 0x5518, 0x20e1, 0x3000, 0x7828, 0x7828, 0x1078, + 0x556c, 0x147f, 0x137f, 0x157f, 0x2009, 0xa8b9, 0x2104, 0xa005, + 0x00c0, 0x5503, 0x007c, 0x1078, 0x62d1, 0x0078, 0x5502, 0xa484, + 0x7000, 0x00c0, 0x5518, 0x1078, 0x554e, 0x0040, 0x552c, 0x7000, + 0xa084, 0xff00, 0xa086, 0x8100, 0x0040, 0x54f3, 0x0078, 0x552c, + 0x1078, 0xa54f, 0xd5a4, 0x0040, 0x5528, 0x047e, 0x1078, 0x1b22, + 0x047f, 0x20e1, 0x9010, 0x2001, 0x0138, 0x2202, 0x0078, 0x5530, + 0x1078, 0x554e, 0x6883, 0x0000, 0x20e1, 0x3000, 0x7828, 0x7828, + 0x1078, 0x5537, 0x147f, 0x137f, 0x157f, 0x0078, 0x5502, 0x2001, + 0xa60e, 0x2004, 0xd08c, 0x0040, 0x554d, 0x2001, 0xa600, 0x2004, + 0xa086, 0x0003, 0x00c0, 0x554d, 0x027e, 0x037e, 0x2011, 0x8048, + 0x2518, 0x1078, 0x361b, 0x037f, 0x027f, 0x007c, 0xa484, 0x01ff, + 0x6882, 0xa005, 0x0040, 0x5560, 0xa080, 0x001f, 0xa084, 0x03f8, + 0x80ac, 0x20e1, 0x1000, 0x2ea0, 0x2099, 0x020a, 0x53a5, 0x007c, + 0x20a9, 0x000c, 0x20e1, 0x1000, 0x2ea0, 0x2099, 0x020a, 0x53a5, + 0xa085, 0x0001, 0x0078, 0x555f, 0x7000, 0xa084, 0xff00, 0xa08c, + 0xf000, 0x8007, 0xa196, 0x0000, 0x00c0, 0x5579, 0x0078, 0x57ba, + 0x007c, 0xa196, 0x2000, 0x00c0, 0x558a, 0x6900, 0xa18e, 0x0001, + 0x00c0, 0x5586, 0x1078, 0x3aec, 0x0078, 0x5578, 0x1078, 0x5592, + 0x0078, 0x5578, 0xa196, 0x8000, 0x00c0, 0x5578, 0x1078, 0x5871, + 0x0078, 0x5578, 0x0c7e, 0x7110, 0xa18c, 0xff00, 0x810f, 0xa196, + 0x0001, 0x0040, 0x559f, 0xa196, 0x0023, 0x00c0, 0x56aa, 0xa08e, + 0x0023, 0x00c0, 0x55d4, 0x1078, 0x591d, 0x0040, 0x56aa, 0x7124, + 0x610a, 0x7030, 0xa08e, 0x0200, 0x00c0, 0x55b8, 0x7034, 0xa005, + 0x00c0, 0x56aa, 0x2009, 0x0015, 0x1078, 0x775c, 0x0078, 0x56aa, + 0xa08e, 0x0214, 0x0040, 0x55c0, 0xa08e, 0x0210, 0x00c0, 0x55c6, + 0x2009, 0x0015, 0x1078, 0x775c, 0x0078, 0x56aa, 0xa08e, 0x0100, + 0x00c0, 0x56aa, 0x7034, 0xa005, 0x00c0, 0x56aa, 0x2009, 0x0016, + 0x1078, 0x775c, 0x0078, 0x56aa, 0xa08e, 0x0022, 0x00c0, 0x56aa, + 0x7030, 0xa08e, 0x0300, 0x00c0, 0x55e5, 0x7034, 0xa005, 0x00c0, + 0x56aa, 0x2009, 0x0017, 0x0078, 0x5676, 0xa08e, 0x0500, 0x00c0, + 0x55f1, 0x7034, 0xa005, 0x00c0, 0x56aa, 0x2009, 0x0018, 0x0078, + 0x5676, 0xa08e, 0x2010, 0x00c0, 0x55f9, 0x2009, 0x0019, 0x0078, + 0x5676, 0xa08e, 0x2110, 0x00c0, 0x5601, 0x2009, 0x001a, 0x0078, + 0x5676, 0xa08e, 0x5200, 0x00c0, 0x560d, 0x7034, 0xa005, 0x00c0, + 0x56aa, 0x2009, 0x001b, 0x0078, 0x5676, 0xa08e, 0x5000, 0x00c0, + 0x5619, 0x7034, 0xa005, 0x00c0, 0x56aa, 0x2009, 0x001c, 0x0078, + 0x5676, 0xa08e, 0x1300, 0x00c0, 0x5621, 0x2009, 0x0034, 0x0078, + 0x5676, 0xa08e, 0x1200, 0x00c0, 0x562d, 0x7034, 0xa005, 0x00c0, + 0x56aa, 0x2009, 0x0024, 0x0078, 0x5676, 0xa08c, 0xff00, 0xa18e, + 0x2400, 0x00c0, 0x5637, 0x2009, 0x002d, 0x0078, 0x5676, 0xa08c, + 0xff00, 0xa18e, 0x5300, 0x00c0, 0x5641, 0x2009, 0x002a, 0x0078, + 0x5676, 0xa08e, 0x0f00, 0x00c0, 0x5649, 0x2009, 0x0020, 0x0078, + 0x5676, 0xa08e, 0x5300, 0x00c0, 0x564f, 0x0078, 0x566c, 0xa08e, + 0x6104, 0x00c0, 0x566c, 0x2011, 0xab8d, 0x8208, 0x2204, 0xa082, + 0x0004, 0x20a8, 0x95ac, 0x95ac, 0x2011, 0x8015, 0x211c, 0x8108, + 0x047e, 0x2124, 0x1078, 0x361b, 0x047f, 0x8108, 0x00f0, 0x565c, + 0x2009, 0x0023, 0x0078, 0x5676, 0xa08e, 0x6000, 0x00c0, 0x5674, + 0x2009, 0x003f, 0x0078, 0x5676, 0x2009, 0x001d, 0x017e, 0x2011, + 0xab83, 0x2204, 0x8211, 0x220c, 0x1078, 0x254d, 0x00c0, 0x56ac, + 0x1078, 0x455c, 0x00c0, 0x56ac, 0x6612, 0x6516, 0x86ff, 0x0040, + 0x569c, 0x017f, 0x017e, 0xa186, 0x0017, 0x00c0, 0x569c, 0x686c, + 0xa606, 0x00c0, 0x569c, 0x6870, 0xa506, 0xa084, 0xff00, 0x00c0, + 0x569c, 0x6000, 0xc0f5, 0x6002, 0x0c7e, 0x1078, 0x76c7, 0x0040, + 0x56af, 0x017f, 0x611a, 0x601f, 0x0004, 0x7120, 0x610a, 0x017f, + 0x1078, 0x775c, 0x0c7f, 0x007c, 0x017f, 0x0078, 0x56aa, 0x0c7f, + 0x0078, 0x56ac, 0x0c7e, 0x1078, 0x570f, 0x00c0, 0x570d, 0xa28e, + 0x0033, 0x00c0, 0x56de, 0x1078, 0x591d, 0x0040, 0x570d, 0x7124, + 0x610a, 0x7030, 0xa08e, 0x0200, 0x00c0, 0x56d0, 0x7034, 0xa005, + 0x00c0, 0x570d, 0x2009, 0x0015, 0x1078, 0x775c, 0x0078, 0x570d, + 0xa08e, 0x0100, 0x00c0, 0x570d, 0x7034, 0xa005, 0x00c0, 0x570d, + 0x2009, 0x0016, 0x1078, 0x775c, 0x0078, 0x570d, 0xa28e, 0x0032, + 0x00c0, 0x570d, 0x7030, 0xa08e, 0x1400, 0x00c0, 0x570d, 0x2009, + 0x0038, 0x017e, 0x2011, 0xab83, 0x2204, 0x8211, 0x220c, 0x1078, + 0x254d, 0x00c0, 0x570c, 0x1078, 0x455c, 0x00c0, 0x570c, 0x6612, + 0x6516, 0x0c7e, 0x1078, 0x76c7, 0x0040, 0x570b, 0x017f, 0x611a, + 0x601f, 0x0004, 0x7120, 0x610a, 0x017f, 0x1078, 0x775c, 0x1078, + 0x62d1, 0x0078, 0x570d, 0x0c7f, 0x017f, 0x0c7f, 0x007c, 0x0f7e, + 0x0d7e, 0x027e, 0x017e, 0x137e, 0x147e, 0x157e, 0x3c00, 0x007e, + 0x2079, 0x0030, 0x2069, 0x0200, 0x1078, 0x1c6a, 0x00c0, 0x5750, + 0x1078, 0x1b40, 0x0040, 0x575d, 0x7908, 0xa18c, 0x1fff, 0xa182, + 0x0011, 0x00c8, 0x575a, 0x20a9, 0x000c, 0x20e1, 0x0000, 0x2ea0, + 0x2099, 0x020a, 0x53a5, 0x20e1, 0x2000, 0x2001, 0x020a, 0x2004, + 0x7a0c, 0x7808, 0xa080, 0x0007, 0xa084, 0x1ff8, 0xa08a, 0x0140, + 0x10c8, 0x1332, 0x80ac, 0x20e1, 0x6000, 0x2099, 0x020a, 0x53a5, + 0x20e1, 0x7000, 0x6828, 0x6828, 0x7803, 0x0004, 0xa294, 0x0070, + 0x007f, 0x20e0, 0x157f, 0x147f, 0x137f, 0x017f, 0x027f, 0x0d7f, + 0x0f7f, 0x007c, 0xa016, 0x1078, 0x15fa, 0xa085, 0x0001, 0x0078, + 0x5750, 0x047e, 0x0e7e, 0x0d7e, 0x2028, 0x2130, 0xa696, 0x00ff, + 0x00c0, 0x5782, 0xa596, 0xfffd, 0x00c0, 0x5772, 0x2009, 0x007f, + 0x0078, 0x57b5, 0xa596, 0xfffe, 0x00c0, 0x577a, 0x2009, 0x007e, + 0x0078, 0x57b5, 0xa596, 0xfffc, 0x00c0, 0x5782, 0x2009, 0x0080, + 0x0078, 0x57b5, 0x2011, 0x0000, 0x2021, 0x0081, 0x20a9, 0x007e, + 0x2071, 0xa7b6, 0x2e1c, 0x83ff, 0x00c0, 0x5794, 0x82ff, 0x00c0, + 0x57a9, 0x2410, 0x0078, 0x57a9, 0x2368, 0x6f10, 0x007e, 0x2100, + 0xa706, 0x007f, 0x6b14, 0x00c0, 0x57a3, 0xa346, 0x00c0, 0x57a3, + 0x2408, 0x0078, 0x57b5, 0x87ff, 0x00c0, 0x57a9, 0x83ff, 0x0040, + 0x578e, 0x8420, 0x8e70, 0x00f0, 0x578a, 0x82ff, 0x00c0, 0x57b4, + 0xa085, 0x0001, 0x0078, 0x57b6, 0x2208, 0xa006, 0x0d7f, 0x0e7f, + 0x047f, 0x007c, 0xa084, 0x0007, 0x0079, 0x57bf, 0x007c, 0x57c7, + 0x57c7, 0x57c7, 0x5933, 0x57c7, 0x57c8, 0x57e1, 0x5858, 0x007c, + 0x7110, 0xd1bc, 0x0040, 0x57e0, 0x7120, 0x2160, 0xac8c, 0x000f, + 0x00c0, 0x57e0, 0xac8a, 0xad00, 0x0048, 0x57e0, 0x6858, 0xac02, + 0x00c8, 0x57e0, 0x7124, 0x610a, 0x2009, 0x0046, 0x1078, 0x775c, + 0x007c, 0x0c7e, 0xa484, 0x01ff, 0x0040, 0x5833, 0x7110, 0xd1bc, + 0x00c0, 0x5833, 0x2011, 0xab83, 0x2204, 0x8211, 0x220c, 0x1078, + 0x254d, 0x00c0, 0x5833, 0x1078, 0x455c, 0x00c0, 0x5833, 0x6612, + 0x6516, 0x6000, 0xd0ec, 0x00c0, 0x5833, 0x6204, 0xa294, 0xff00, + 0x8217, 0xa286, 0x0006, 0x00c0, 0x5818, 0x0c7e, 0x1078, 0x76c7, + 0x017f, 0x0040, 0x5835, 0x611a, 0x601f, 0x0006, 0x7120, 0x610a, + 0x7130, 0x6122, 0x2009, 0x0044, 0x1078, 0x775c, 0x0078, 0x5833, + 0x0c7e, 0x1078, 0x76c7, 0x017f, 0x0040, 0x5833, 0x611a, 0x601f, + 0x0004, 0x7120, 0x610a, 0xa286, 0x0004, 0x00c0, 0x582b, 0x6007, + 0x0005, 0x0078, 0x582d, 0x6007, 0x0001, 0x6003, 0x0001, 0x1078, + 0x5dd7, 0x1078, 0x62d1, 0x0c7f, 0x007c, 0x2001, 0xa60d, 0x2004, + 0xd0ec, 0x0040, 0x583f, 0x2011, 0x8049, 0x1078, 0x361b, 0x0c7e, + 0x1078, 0x9187, 0x017f, 0x0040, 0x5833, 0x611a, 0x601f, 0x0006, + 0x7120, 0x610a, 0x7130, 0x6122, 0x6013, 0x0300, 0x6003, 0x0001, + 0x6007, 0x0041, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0078, 0x5833, + 0x7110, 0xd1bc, 0x0040, 0x5870, 0x7020, 0x2060, 0xac84, 0x000f, + 0x00c0, 0x5870, 0xac82, 0xad00, 0x0048, 0x5870, 0x6858, 0xac02, + 0x00c8, 0x5870, 0x7124, 0x610a, 0x2009, 0x0045, 0x1078, 0x775c, + 0x007c, 0x007e, 0x1078, 0x29bb, 0x007f, 0x00c0, 0x5887, 0x7110, + 0xa18c, 0xff00, 0x810f, 0xa18e, 0x0000, 0x00c0, 0x5887, 0xa084, + 0x000f, 0xa08a, 0x0006, 0x00c8, 0x5887, 0x1079, 0x5888, 0x007c, + 0x588e, 0x588f, 0x588e, 0x588e, 0x58ff, 0x590e, 0x007c, 0x7110, + 0xd1bc, 0x0040, 0x5897, 0x702c, 0xd084, 0x0040, 0x58fe, 0x700c, + 0x7108, 0x1078, 0x254d, 0x00c0, 0x58fe, 0x1078, 0x455c, 0x00c0, + 0x58fe, 0x6612, 0x6516, 0x6204, 0x7110, 0xd1bc, 0x0040, 0x58c9, + 0xa28c, 0x00ff, 0xa186, 0x0004, 0x0040, 0x58b2, 0xa186, 0x0006, + 0x00c0, 0x58ef, 0x0c7e, 0x1078, 0x591d, 0x0c7f, 0x0040, 0x58fe, + 0x0c7e, 0x1078, 0x76c7, 0x017f, 0x0040, 0x58fe, 0x611a, 0x601f, + 0x0002, 0x7120, 0x610a, 0x2009, 0x0088, 0x1078, 0x775c, 0x0078, + 0x58fe, 0xa28c, 0x00ff, 0xa186, 0x0006, 0x0040, 0x58de, 0xa186, + 0x0004, 0x0040, 0x58de, 0xa294, 0xff00, 0x8217, 0xa286, 0x0004, + 0x0040, 0x58de, 0xa286, 0x0006, 0x00c0, 0x58ef, 0x0c7e, 0x1078, + 0x76c7, 0x017f, 0x0040, 0x58fe, 0x611a, 0x601f, 0x0005, 0x7120, + 0x610a, 0x2009, 0x0088, 0x1078, 0x775c, 0x0078, 0x58fe, 0x0c7e, + 0x1078, 0x76c7, 0x017f, 0x0040, 0x58fe, 0x611a, 0x601f, 0x0004, + 0x7120, 0x610a, 0x2009, 0x0001, 0x1078, 0x775c, 0x007c, 0x7110, + 0xd1bc, 0x0040, 0x590d, 0x1078, 0x591d, 0x0040, 0x590d, 0x7124, + 0x610a, 0x2009, 0x0089, 0x1078, 0x775c, 0x007c, 0x7110, 0xd1bc, + 0x0040, 0x591c, 0x1078, 0x591d, 0x0040, 0x591c, 0x7124, 0x610a, + 0x2009, 0x008a, 0x1078, 0x775c, 0x007c, 0x7020, 0x2060, 0xac84, + 0x000f, 0x00c0, 0x5930, 0xac82, 0xad00, 0x0048, 0x5930, 0x2001, + 0xa616, 0x2004, 0xac02, 0x00c8, 0x5930, 0xa085, 0x0001, 0x007c, + 0xa006, 0x0078, 0x592f, 0x7110, 0xd1bc, 0x00c0, 0x5949, 0x7024, + 0x2060, 0xac84, 0x000f, 0x00c0, 0x5949, 0xac82, 0xad00, 0x0048, + 0x5949, 0x6858, 0xac02, 0x00c8, 0x5949, 0x2009, 0x0051, 0x1078, + 0x775c, 0x007c, 0x2071, 0xa8c4, 0x7003, 0x0003, 0x700f, 0x0361, + 0xa006, 0x701a, 0x7012, 0x7017, 0xad00, 0x7007, 0x0000, 0x7026, + 0x702b, 0x6e1c, 0x7032, 0x7037, 0x6e70, 0x703b, 0x0002, 0x703f, + 0x0000, 0x7043, 0xffff, 0x7047, 0xffff, 0x007c, 0x2071, 0xa8c4, + 0x00e0, 0x5a32, 0x2091, 0x6000, 0x700c, 0x8001, 0x700e, 0x00c0, + 0x59de, 0x700f, 0x0361, 0x7007, 0x0001, 0x127e, 0x2091, 0x8000, + 0x7138, 0x8109, 0x713a, 0x00c0, 0x59dc, 0x703b, 0x0002, 0x2009, + 0x0100, 0x2104, 0xa082, 0x0003, 0x00c8, 0x59dc, 0x703c, 0xa086, + 0x0001, 0x00c0, 0x59b9, 0x0d7e, 0x2069, 0x0140, 0x6804, 0xa084, + 0x4000, 0x0040, 0x5997, 0x6803, 0x1000, 0x0078, 0x599e, 0x6804, + 0xa084, 0x1000, 0x0040, 0x599e, 0x6803, 0x0100, 0x6803, 0x0000, + 0x703f, 0x0000, 0x2069, 0xa8b1, 0x6804, 0xa082, 0x0006, 0x00c0, + 0x59ab, 0x6807, 0x0000, 0x6830, 0xa082, 0x0003, 0x00c0, 0x59b2, + 0x6833, 0x0000, 0x1078, 0x62d1, 0x1078, 0x639b, 0x0d7f, 0x0078, + 0x59dc, 0x0d7e, 0x2069, 0xa600, 0x6948, 0x6864, 0xa102, 0x00c8, + 0x59db, 0x2069, 0xa8b1, 0x6804, 0xa086, 0x0000, 0x00c0, 0x59db, + 0x6830, 0xa086, 0x0000, 0x00c0, 0x59db, 0x703f, 0x0001, 0x6807, + 0x0006, 0x6833, 0x0003, 0x2069, 0x0100, 0x6830, 0x689e, 0x2069, + 0x0140, 0x6803, 0x0600, 0x0d7f, 0x0078, 0x59e1, 0x127e, 0x2091, + 0x8000, 0x7024, 0xa00d, 0x0040, 0x59f9, 0x7020, 0x8001, 0x7022, + 0x00c0, 0x59f9, 0x7023, 0x0009, 0x8109, 0x7126, 0xa186, 0x03e8, + 0x00c0, 0x59f4, 0x7028, 0x107a, 0x81ff, 0x00c0, 0x59f9, 0x7028, + 0x107a, 0x7030, 0xa00d, 0x0040, 0x5a10, 0x702c, 0x8001, 0x702e, + 0x00c0, 0x5a10, 0x702f, 0x0009, 0x8109, 0x7132, 0x0040, 0x5a0e, + 0xa184, 0x007f, 0x1040, 0x6ea2, 0x0078, 0x5a10, 0x7034, 0x107a, + 0x7040, 0xa005, 0x0040, 0x5a18, 0x0050, 0x5a18, 0x8001, 0x7042, + 0x7044, 0xa005, 0x0040, 0x5a20, 0x0050, 0x5a20, 0x8001, 0x7046, + 0x7018, 0xa00d, 0x0040, 0x5a31, 0x7008, 0x8001, 0x700a, 0x00c0, + 0x5a31, 0x700b, 0x0009, 0x8109, 0x711a, 0x00c0, 0x5a31, 0x701c, + 0x107a, 0x127f, 0x7004, 0x0079, 0x5a35, 0x5a5c, 0x5a5d, 0x5a79, + 0x0e7e, 0x2071, 0xa8c4, 0x7018, 0xa005, 0x00c0, 0x5a43, 0x711a, + 0x721e, 0x700b, 0x0009, 0x0e7f, 0x007c, 0x0e7e, 0x007e, 0x2071, + 0xa8c4, 0x701c, 0xa206, 0x00c0, 0x5a4f, 0x701a, 0x701e, 0x007f, + 0x0e7f, 0x007c, 0x0e7e, 0x2071, 0xa8c4, 0x6088, 0xa102, 0x0048, + 0x5a5a, 0x618a, 0x0e7f, 0x007c, 0x007c, 0x7110, 0x1078, 0x45c4, + 0x00c0, 0x5a6f, 0x6088, 0x8001, 0x0048, 0x5a6f, 0x608a, 0x00c0, + 0x5a6f, 0x127e, 0x2091, 0x8000, 0x1078, 0x62d1, 0x127f, 0x8108, + 0xa182, 0x00ff, 0x0048, 0x5a77, 0xa00e, 0x7007, 0x0002, 0x7112, + 0x007c, 0x7014, 0x2060, 0x127e, 0x2091, 0x8000, 0x603c, 0xa005, + 0x0040, 0x5a88, 0x8001, 0x603e, 0x00c0, 0x5a88, 0x1078, 0x8f9c, + 0x6014, 0xa005, 0x0040, 0x5ab2, 0x8001, 0x6016, 0x00c0, 0x5ab2, + 0x611c, 0xa186, 0x0003, 0x0040, 0x5a99, 0xa186, 0x0006, 0x00c0, + 0x5ab0, 0x6010, 0x2068, 0x6854, 0xa08a, 0x199a, 0x0048, 0x5ab0, + 0xa082, 0x1999, 0x6856, 0xa08a, 0x199a, 0x0048, 0x5aa9, 0x2001, + 0x1999, 0x8003, 0x800b, 0x810b, 0xa108, 0x6116, 0x0078, 0x5ab2, + 0x1078, 0x8abe, 0x127f, 0xac88, 0x0010, 0x7116, 0x2001, 0xcd00, + 0xa102, 0x0048, 0x5abf, 0x7017, 0xad00, 0x7007, 0x0000, 0x007c, + 0x0e7e, 0x2071, 0xa8c4, 0x7027, 0x07d0, 0x7023, 0x0009, 0x703b, + 0x0002, 0x0e7f, 0x007c, 0x2001, 0xa8cd, 0x2003, 0x0000, 0x007c, + 0x0e7e, 0x2071, 0xa8c4, 0x7132, 0x702f, 0x0009, 0x0e7f, 0x007c, + 0x2011, 0xa8d0, 0x2013, 0x0000, 0x007c, 0x0e7e, 0x2071, 0xa8c4, + 0x711a, 0x721e, 0x700b, 0x0009, 0x0e7f, 0x007c, 0x027e, 0x0e7e, + 0x0f7e, 0x2079, 0xa600, 0x7a34, 0xd294, 0x0040, 0x5b15, 0x2071, + 0xa8ac, 0x2e14, 0xa0fe, 0x0000, 0x0040, 0x5b02, 0xa0fe, 0x0001, + 0x0040, 0x5b06, 0xa0fe, 0x0002, 0x00c0, 0x5b11, 0xa292, 0x0085, + 0x0078, 0x5b08, 0xa292, 0x0005, 0x0078, 0x5b08, 0xa292, 0x0002, + 0x2272, 0x0040, 0x5b0d, 0x00c8, 0x5b15, 0x2011, 0x8037, 0x1078, + 0x361b, 0x2011, 0xa8ab, 0x2204, 0x2072, 0x0f7f, 0x0e7f, 0x027f, + 0x007c, 0x0c7e, 0x2061, 0xa933, 0x0c7f, 0x007c, 0xa184, 0x000f, + 0x8003, 0x8003, 0x8003, 0xa080, 0xa933, 0x2060, 0x007c, 0x6854, + 0xa08a, 0x199a, 0x0048, 0x5b2e, 0x2001, 0x1999, 0xa005, 0x00c0, + 0x5b3d, 0x0c7e, 0x2061, 0xa933, 0x6014, 0x0c7f, 0xa005, 0x00c0, + 0x5b42, 0x2001, 0x001e, 0x0078, 0x5b42, 0xa08e, 0xffff, 0x00c0, + 0x5b42, 0xa006, 0x8003, 0x800b, 0x810b, 0xa108, 0x6116, 0x684c, + 0xa08c, 0x00c0, 0xa18e, 0x00c0, 0x0040, 0x5b9e, 0xd0b4, 0x00c0, + 0x5b59, 0xd0bc, 0x00c0, 0x5b8b, 0x2009, 0x0006, 0x1078, 0x5bc3, + 0x007c, 0xd0fc, 0x0040, 0x5b64, 0xa084, 0x0003, 0x0040, 0x5b64, + 0xa086, 0x0003, 0x00c0, 0x5bbc, 0x6024, 0xd0d4, 0x0040, 0x5b6e, + 0xc0d4, 0x6026, 0x6860, 0x602a, 0x685c, 0x602e, 0x2009, 0xa674, + 0x2104, 0xd084, 0x0040, 0x5b83, 0x6118, 0xa188, 0x0027, 0x2104, + 0xd08c, 0x00c0, 0x5b83, 0x87ff, 0x00c0, 0x5b82, 0x2009, 0x0042, + 0x1078, 0x775c, 0x007c, 0x87ff, 0x00c0, 0x5b8a, 0x2009, 0x0043, + 0x1078, 0x775c, 0x007c, 0xd0fc, 0x0040, 0x5b96, 0xa084, 0x0003, + 0x0040, 0x5b96, 0xa086, 0x0003, 0x00c0, 0x5bbc, 0x87ff, 0x00c0, + 0x5b9d, 0x2009, 0x0042, 0x1078, 0x775c, 0x007c, 0xd0fc, 0x0040, + 0x5baf, 0xa084, 0x0003, 0xa08e, 0x0002, 0x0040, 0x5bb3, 0x87ff, + 0x00c0, 0x5bae, 0x2009, 0x0041, 0x1078, 0x775c, 0x007c, 0x1078, + 0x5bc1, 0x0078, 0x5bae, 0x87ff, 0x00c0, 0x5bae, 0x2009, 0x0043, + 0x1078, 0x775c, 0x0078, 0x5bae, 0x2009, 0x0004, 0x1078, 0x5bc3, + 0x007c, 0x2009, 0x0001, 0x0d7e, 0x6010, 0xa0ec, 0xf000, 0x0040, + 0x5bef, 0x2068, 0x6952, 0x6800, 0x6012, 0xa186, 0x0001, 0x00c0, + 0x5be5, 0x694c, 0xa18c, 0x8100, 0xa18e, 0x8100, 0x00c0, 0x5be5, + 0x0c7e, 0x2061, 0xa933, 0x6200, 0xd28c, 0x00c0, 0x5be4, 0x6204, + 0x8210, 0x0048, 0x5be4, 0x6206, 0x0c7f, 0x1078, 0x4a73, 0x6010, + 0xa06d, 0x077e, 0x2039, 0x0000, 0x10c0, 0x5b27, 0x077f, 0x0d7f, + 0x007c, 0x157e, 0x0c7e, 0x2061, 0xa933, 0x6000, 0x81ff, 0x0040, + 0x5bfc, 0xa205, 0x0078, 0x5bfd, 0xa204, 0x6002, 0x0c7f, 0x157f, + 0x007c, 0x6800, 0xd08c, 0x00c0, 0x5c0d, 0x6808, 0xa005, 0x0040, + 0x5c0d, 0x8001, 0x680a, 0xa085, 0x0001, 0x007c, 0x20a9, 0x0010, + 0xa006, 0x8004, 0x8086, 0x818e, 0x00c8, 0x5c17, 0xa200, 0x00f0, + 0x5c12, 0x8086, 0x818e, 0x007c, 0x157e, 0x20a9, 0x0010, 0xa005, + 0x0040, 0x5c3d, 0xa11a, 0x00c8, 0x5c3d, 0x8213, 0x818d, 0x0048, + 0x5c30, 0xa11a, 0x00c8, 0x5c31, 0x00f0, 0x5c25, 0x0078, 0x5c35, + 0xa11a, 0x2308, 0x8210, 0x00f0, 0x5c25, 0x007e, 0x3200, 0xa084, + 0xf7ff, 0x2080, 0x007f, 0x157f, 0x007c, 0x007e, 0x3200, 0xa085, + 0x0800, 0x0078, 0x5c39, 0x127e, 0x2091, 0x2200, 0x2079, 0xa8b1, + 0x127f, 0x0d7e, 0x2069, 0xa8b1, 0x6803, 0x0005, 0x2069, 0x0004, + 0x2d04, 0xa085, 0x8001, 0x206a, 0x0d7f, 0x007c, 0x0c7e, 0x6027, + 0x0001, 0x7804, 0xa084, 0x0007, 0x0079, 0x5c5e, 0x5c68, 0x5c8d, + 0x5ce8, 0x5c6e, 0x5c8d, 0x5c68, 0x5c66, 0x5c66, 0x1078, 0x1332, + 0x1078, 0x5acb, 0x1078, 0x62d1, 0x0c7f, 0x007c, 0x62c0, 0x82ff, + 0x00c0, 0x5c74, 0x0c7f, 0x007c, 0x2011, 0x41dc, 0x1078, 0x5a45, + 0x7828, 0xa092, 0x00c8, 0x00c8, 0x5c83, 0x8000, 0x782a, 0x1078, + 0x421b, 0x0078, 0x5c72, 0x1078, 0x41dc, 0x7807, 0x0003, 0x7827, + 0x0000, 0x782b, 0x0000, 0x0078, 0x5c72, 0x1078, 0x5acb, 0x3c00, + 0x007e, 0x2011, 0x0209, 0x20e1, 0x4000, 0x2214, 0x007f, 0x20e0, + 0x82ff, 0x0040, 0x5cab, 0x62c0, 0x82ff, 0x00c0, 0x5cab, 0x782b, + 0x0000, 0x7824, 0xa065, 0x1040, 0x1332, 0x2009, 0x0013, 0x1078, + 0x775c, 0x0c7f, 0x007c, 0x3900, 0xa082, 0xa9e3, 0x00c8, 0x5cb2, + 0x1078, 0x747a, 0x0c7e, 0x7824, 0xa065, 0x1040, 0x1332, 0x7804, + 0xa086, 0x0004, 0x0040, 0x5d2d, 0x7828, 0xa092, 0x2710, 0x00c8, + 0x5cc8, 0x8000, 0x782a, 0x0c7f, 0x1078, 0x6e01, 0x0078, 0x5ca9, + 0x6104, 0xa186, 0x0003, 0x00c0, 0x5cdf, 0x0e7e, 0x2071, 0xa600, + 0x70d8, 0x0e7f, 0xd08c, 0x0040, 0x5cdf, 0x0c7e, 0x0e7e, 0x2061, + 0x0100, 0x2071, 0xa600, 0x1078, 0x4224, 0x0e7f, 0x0c7f, 0x1078, + 0xa5c4, 0x2009, 0x0014, 0x1078, 0x775c, 0x0c7f, 0x0078, 0x5ca9, + 0x2001, 0xa8cd, 0x2003, 0x0000, 0x62c0, 0x82ff, 0x00c0, 0x5cfc, + 0x782b, 0x0000, 0x7824, 0xa065, 0x1040, 0x1332, 0x2009, 0x0013, + 0x1078, 0x77b3, 0x0c7f, 0x007c, 0x0c7e, 0x0d7e, 0x3900, 0xa082, + 0xa9e3, 0x00c8, 0x5d05, 0x1078, 0x747a, 0x7824, 0xa005, 0x1040, + 0x1332, 0x781c, 0xa06d, 0x1040, 0x1332, 0x6800, 0xc0dc, 0x6802, + 0x7924, 0x2160, 0x1078, 0x772d, 0x693c, 0x81ff, 0x1040, 0x1332, + 0x8109, 0x693e, 0x6854, 0xa015, 0x0040, 0x5d21, 0x7a1e, 0x0078, + 0x5d23, 0x7918, 0x791e, 0x7807, 0x0000, 0x7827, 0x0000, 0x0d7f, + 0x0c7f, 0x1078, 0x62d1, 0x0078, 0x5cfa, 0x6104, 0xa186, 0x0002, + 0x0040, 0x5d38, 0xa186, 0x0004, 0x0040, 0x5d38, 0x0078, 0x5cbc, + 0x7808, 0xac06, 0x0040, 0x5cbc, 0x1078, 0x61cd, 0x1078, 0x5dd7, + 0x0c7f, 0x1078, 0x62d1, 0x0078, 0x5ca9, 0x0c7e, 0x6027, 0x0002, + 0x62c8, 0x82ff, 0x00c0, 0x5d61, 0x62c4, 0x82ff, 0x00c0, 0x5d61, + 0x793c, 0xa1e5, 0x0000, 0x0040, 0x5d5b, 0x2009, 0x0049, 0x1078, + 0x775c, 0x0c7f, 0x007c, 0x2011, 0xa8d0, 0x2013, 0x0000, 0x0078, + 0x5d59, 0x3908, 0xa192, 0xa9e3, 0x00c8, 0x5d68, 0x1078, 0x747a, + 0x6017, 0x0010, 0x793c, 0x81ff, 0x0040, 0x5d5b, 0x7944, 0xa192, + 0x7530, 0x00c8, 0x5d85, 0x8108, 0x7946, 0x793c, 0xa188, 0x0007, + 0x210c, 0xa18e, 0x0006, 0x00c0, 0x5d81, 0x6017, 0x0012, 0x0078, + 0x5d59, 0x6017, 0x0016, 0x0078, 0x5d59, 0x7848, 0xc085, 0x784a, + 0x0078, 0x5d59, 0x007e, 0x017e, 0x0c7e, 0x127e, 0x2091, 0x8000, + 0x600f, 0x0000, 0x2c08, 0x2061, 0xa8b1, 0x6020, 0x8000, 0x6022, + 0x6010, 0xa005, 0x0040, 0x5da5, 0xa080, 0x0003, 0x2102, 0x6112, + 0x127f, 0x0c7f, 0x017f, 0x007f, 0x007c, 0x6116, 0x6112, 0x0078, + 0x5da0, 0x0d7e, 0x2069, 0xa8b1, 0x6000, 0xd0d4, 0x0040, 0x5dbe, + 0x6820, 0x8000, 0x6822, 0xa086, 0x0001, 0x00c0, 0x5db9, 0x2c00, + 0x681e, 0x6804, 0xa084, 0x0007, 0x0079, 0x62d9, 0xc0d5, 0x6002, + 0x6818, 0xa005, 0x0040, 0x5dd0, 0x6056, 0x605b, 0x0000, 0x007e, + 0x2c00, 0x681a, 0x0d7f, 0x685a, 0x2069, 0xa8b1, 0x0078, 0x5db0, + 0x6056, 0x605a, 0x2c00, 0x681a, 0x681e, 0x0078, 0x5db0, 0x007e, + 0x017e, 0x0c7e, 0x127e, 0x2091, 0x8000, 0x600f, 0x0000, 0x2c08, + 0x2061, 0xa8b1, 0x6020, 0x8000, 0x6022, 0x6008, 0xa005, 0x0040, + 0x5df2, 0xa080, 0x0003, 0x2102, 0x610a, 0x127f, 0x0c7f, 0x017f, + 0x007f, 0x007c, 0x610e, 0x610a, 0x0078, 0x5ded, 0x0c7e, 0x600f, + 0x0000, 0x2c08, 0x2061, 0xa8b1, 0x6034, 0xa005, 0x0040, 0x5e06, + 0xa080, 0x0003, 0x2102, 0x6136, 0x0c7f, 0x007c, 0x613a, 0x6136, + 0x0078, 0x5e04, 0x0f7e, 0x0e7e, 0x0d7e, 0x0c7e, 0x067e, 0x057e, + 0x037e, 0x027e, 0x017e, 0x007e, 0x127e, 0xa02e, 0x2071, 0xa8b1, + 0x7638, 0x2660, 0x2678, 0x2091, 0x8000, 0x8cff, 0x0040, 0x5e8c, + 0x6018, 0xa080, 0x0028, 0x2004, 0xa206, 0x00c0, 0x5e87, 0x87ff, + 0x0040, 0x5e2e, 0x6020, 0xa106, 0x00c0, 0x5e87, 0x703c, 0xac06, + 0x00c0, 0x5e44, 0x037e, 0x2019, 0x0001, 0x1078, 0x7058, 0x7033, + 0x0000, 0x703f, 0x0000, 0x7043, 0x0000, 0x7047, 0x0000, 0x704b, + 0x0000, 0x037f, 0x2029, 0x0001, 0x7038, 0xac36, 0x00c0, 0x5e4a, + 0x660c, 0x763a, 0x7034, 0xac36, 0x00c0, 0x5e58, 0x2c00, 0xaf36, + 0x0040, 0x5e56, 0x2f00, 0x7036, 0x0078, 0x5e58, 0x7037, 0x0000, + 0x660c, 0x067e, 0x2c00, 0xaf06, 0x0040, 0x5e61, 0x7e0e, 0x0078, + 0x5e62, 0x2678, 0x600f, 0x0000, 0x1078, 0x8d06, 0x0040, 0x5e82, + 0x6010, 0x2068, 0x601c, 0xa086, 0x0003, 0x00c0, 0x5e9d, 0x6837, + 0x0103, 0x6b4a, 0x6847, 0x0000, 0x017e, 0x037e, 0x077e, 0x1078, + 0x8f7d, 0x1078, 0xa4e2, 0x1078, 0x4a73, 0x077f, 0x037f, 0x017f, + 0x1078, 0x8eb9, 0x1078, 0x8ec6, 0x0c7f, 0x0078, 0x5e1d, 0x2c78, + 0x600c, 0x2060, 0x0078, 0x5e1d, 0x85ff, 0x0040, 0x5e91, 0x1078, + 0x639b, 0x127f, 0x007f, 0x017f, 0x027f, 0x037f, 0x057f, 0x067f, + 0x0c7f, 0x0d7f, 0x0e7f, 0x0f7f, 0x007c, 0x601c, 0xa086, 0x0006, + 0x00c0, 0x5e6f, 0x017e, 0x037e, 0x077e, 0x1078, 0xa4e2, 0x1078, + 0xa1ca, 0x077f, 0x037f, 0x017f, 0x0078, 0x5e82, 0x007e, 0x067e, + 0x0c7e, 0x0d7e, 0x0f7e, 0x2031, 0x0000, 0x127e, 0x2091, 0x8000, + 0x2079, 0xa8b1, 0x7838, 0xa065, 0x0040, 0x5eef, 0x600c, 0x007e, + 0x600f, 0x0000, 0x783c, 0xac06, 0x00c0, 0x5ed6, 0x037e, 0x2019, + 0x0001, 0x1078, 0x7058, 0x7833, 0x0000, 0x783f, 0x0000, 0x7843, + 0x0000, 0x7847, 0x0000, 0x784b, 0x0000, 0x037f, 0x1078, 0x8d06, + 0x0040, 0x5eea, 0x6010, 0x2068, 0x601c, 0xa086, 0x0003, 0x00c0, + 0x5ef8, 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, 0x1078, 0x4a73, + 0x1078, 0x8eb9, 0x1078, 0x8ec6, 0x007f, 0x0078, 0x5ebb, 0x7e3a, + 0x7e36, 0x127f, 0x0f7f, 0x0d7f, 0x0c7f, 0x067f, 0x007f, 0x007c, + 0x601c, 0xa086, 0x0006, 0x00c0, 0x5ee1, 0x1078, 0xa1ca, 0x0078, + 0x5eea, 0x017e, 0x027e, 0x087e, 0x2041, 0x0000, 0x1078, 0x5f1b, + 0x1078, 0x5fdb, 0x087f, 0x027f, 0x017f, 0x007c, 0x0f7e, 0x127e, + 0x2079, 0xa8b1, 0x2091, 0x8000, 0x1078, 0x6076, 0x1078, 0x60ec, + 0x127f, 0x0f7f, 0x007c, 0x0f7e, 0x0e7e, 0x0d7e, 0x0c7e, 0x067e, + 0x017e, 0x007e, 0x127e, 0x2091, 0x8000, 0x2071, 0xa8b1, 0x7614, + 0x2660, 0x2678, 0x8cff, 0x0040, 0x5fb5, 0x6018, 0xa080, 0x0028, + 0x2004, 0xa206, 0x00c0, 0x5fb0, 0x88ff, 0x0040, 0x5f3b, 0x6020, + 0xa106, 0x00c0, 0x5fb0, 0x7024, 0xac06, 0x00c0, 0x5f6b, 0x2069, + 0x0100, 0x68c0, 0xa005, 0x0040, 0x5f66, 0x1078, 0x5acb, 0x1078, + 0x6e0f, 0x68c3, 0x0000, 0x1078, 0x7378, 0x7027, 0x0000, 0x037e, + 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, 0x0040, 0x5f5b, 0x6803, + 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, 0xd084, 0x0040, + 0x5f63, 0x6827, 0x0001, 0x037f, 0x0078, 0x5f6b, 0x6003, 0x0009, + 0x630a, 0x0078, 0x5fb0, 0x7014, 0xac36, 0x00c0, 0x5f71, 0x660c, + 0x7616, 0x7010, 0xac36, 0x00c0, 0x5f7f, 0x2c00, 0xaf36, 0x0040, + 0x5f7d, 0x2f00, 0x7012, 0x0078, 0x5f7f, 0x7013, 0x0000, 0x660c, + 0x067e, 0x2c00, 0xaf06, 0x0040, 0x5f88, 0x7e0e, 0x0078, 0x5f89, + 0x2678, 0x600f, 0x0000, 0x6010, 0x2068, 0x1078, 0x8d06, 0x0040, + 0x5fa9, 0x601c, 0xa086, 0x0003, 0x00c0, 0x5fbe, 0x6837, 0x0103, + 0x6b4a, 0x6847, 0x0000, 0x017e, 0x037e, 0x087e, 0x1078, 0x8f7d, + 0x1078, 0xa4e2, 0x1078, 0x4a73, 0x087f, 0x037f, 0x017f, 0x1078, + 0x8eb9, 0x1078, 0x8ec6, 0x1078, 0x7233, 0x0c7f, 0x0078, 0x5f2a, + 0x2c78, 0x600c, 0x2060, 0x0078, 0x5f2a, 0x127f, 0x007f, 0x017f, + 0x067f, 0x0c7f, 0x0d7f, 0x0e7f, 0x0f7f, 0x007c, 0x601c, 0xa086, + 0x0006, 0x00c0, 0x5fcf, 0x017e, 0x037e, 0x087e, 0x1078, 0xa4e2, + 0x1078, 0xa1ca, 0x087f, 0x037f, 0x017f, 0x0078, 0x5fa9, 0x601c, + 0xa086, 0x0002, 0x00c0, 0x5fa9, 0x6004, 0xa086, 0x0085, 0x0040, + 0x5f96, 0x0078, 0x5fa9, 0x0c7e, 0x007e, 0x127e, 0x2091, 0x8000, + 0xa280, 0xa735, 0x2004, 0xa065, 0x0040, 0x6072, 0x0f7e, 0x0e7e, + 0x0d7e, 0x067e, 0x2071, 0xa8b1, 0x6654, 0x7018, 0xac06, 0x00c0, + 0x5ff2, 0x761a, 0x701c, 0xac06, 0x00c0, 0x5ffe, 0x86ff, 0x00c0, + 0x5ffd, 0x7018, 0x701e, 0x0078, 0x5ffe, 0x761e, 0x6058, 0xa07d, + 0x0040, 0x6003, 0x7e56, 0xa6ed, 0x0000, 0x0040, 0x6009, 0x2f00, + 0x685a, 0x6057, 0x0000, 0x605b, 0x0000, 0x6000, 0xc0d4, 0xc0dc, + 0x6002, 0x1078, 0x44d3, 0x0040, 0x606e, 0x7624, 0x86ff, 0x0040, + 0x605c, 0xa680, 0x0004, 0x2004, 0xad06, 0x00c0, 0x605c, 0x0d7e, + 0x2069, 0x0100, 0x68c0, 0xa005, 0x0040, 0x6053, 0x1078, 0x5acb, + 0x1078, 0x6e0f, 0x68c3, 0x0000, 0x1078, 0x7378, 0x7027, 0x0000, + 0x037e, 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, 0x0040, 0x603c, + 0x6803, 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, 0xd084, + 0x0040, 0x6044, 0x6827, 0x0001, 0x037f, 0x0d7f, 0x0c7e, 0x603c, + 0xa005, 0x0040, 0x604d, 0x8001, 0x603e, 0x2660, 0x1078, 0x8ec6, + 0x0c7f, 0x0078, 0x605c, 0x0d7f, 0x0c7e, 0x2660, 0x6003, 0x0009, + 0x630a, 0x0c7f, 0x0078, 0x6011, 0x8dff, 0x0040, 0x606a, 0x6837, + 0x0103, 0x6b4a, 0x6847, 0x0000, 0x1078, 0x8f7d, 0x1078, 0xa4e2, + 0x1078, 0x4a73, 0x1078, 0x7233, 0x0078, 0x6011, 0x067f, 0x0d7f, + 0x0e7f, 0x0f7f, 0x127f, 0x007f, 0x0c7f, 0x007c, 0x007e, 0x067e, + 0x0c7e, 0x0d7e, 0x2031, 0x0000, 0x7814, 0xa065, 0x0040, 0x60d0, + 0x600c, 0x007e, 0x600f, 0x0000, 0x7824, 0xac06, 0x00c0, 0x60b5, + 0x2069, 0x0100, 0x68c0, 0xa005, 0x0040, 0x60af, 0x1078, 0x5acb, + 0x1078, 0x6e0f, 0x68c3, 0x0000, 0x1078, 0x7378, 0x7827, 0x0000, + 0x037e, 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, 0x0040, 0x60a4, + 0x6803, 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, 0xd084, + 0x0040, 0x60ac, 0x6827, 0x0001, 0x037f, 0x0078, 0x60b5, 0x6003, + 0x0009, 0x630a, 0x2c30, 0x0078, 0x60cd, 0x6010, 0x2068, 0x1078, + 0x8d06, 0x0040, 0x60c9, 0x601c, 0xa086, 0x0003, 0x00c0, 0x60d7, + 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, 0x1078, 0x4a73, 0x1078, + 0x8eb9, 0x1078, 0x8ec6, 0x1078, 0x7233, 0x007f, 0x0078, 0x607d, + 0x7e16, 0x7e12, 0x0d7f, 0x0c7f, 0x067f, 0x007f, 0x007c, 0x601c, + 0xa086, 0x0006, 0x00c0, 0x60e0, 0x1078, 0xa1ca, 0x0078, 0x60c9, + 0x601c, 0xa086, 0x0002, 0x00c0, 0x60c9, 0x6004, 0xa086, 0x0085, + 0x0040, 0x60c0, 0x0078, 0x60c9, 0x007e, 0x067e, 0x0c7e, 0x0d7e, + 0x7818, 0xa065, 0x0040, 0x615a, 0x6054, 0x007e, 0x6057, 0x0000, + 0x605b, 0x0000, 0x6000, 0xc0d4, 0xc0dc, 0x6002, 0x1078, 0x44d3, + 0x0040, 0x6157, 0x7e24, 0x86ff, 0x0040, 0x6149, 0xa680, 0x0004, + 0x2004, 0xad06, 0x00c0, 0x6149, 0x0d7e, 0x2069, 0x0100, 0x68c0, + 0xa005, 0x0040, 0x6140, 0x1078, 0x5acb, 0x1078, 0x6e0f, 0x68c3, + 0x0000, 0x1078, 0x7378, 0x7827, 0x0000, 0x037e, 0x2069, 0x0140, + 0x6b04, 0xa384, 0x1000, 0x0040, 0x6129, 0x6803, 0x0100, 0x6803, + 0x0000, 0x2069, 0x0100, 0x6824, 0xd084, 0x0040, 0x6131, 0x6827, + 0x0001, 0x037f, 0x0d7f, 0x0c7e, 0x603c, 0xa005, 0x0040, 0x613a, + 0x8001, 0x603e, 0x2660, 0x1078, 0x8ec6, 0x0c7f, 0x0078, 0x6149, + 0x0d7f, 0x0c7e, 0x2660, 0x6003, 0x0009, 0x630a, 0x0c7f, 0x0078, + 0x60fe, 0x8dff, 0x0040, 0x6153, 0x6837, 0x0103, 0x6b4a, 0x6847, + 0x0000, 0x1078, 0x4a73, 0x1078, 0x7233, 0x0078, 0x60fe, 0x007f, + 0x0078, 0x60f1, 0x781e, 0x781a, 0x0d7f, 0x0c7f, 0x067f, 0x007f, + 0x007c, 0x0e7e, 0x0d7e, 0x067e, 0x6000, 0xd0dc, 0x0040, 0x6181, + 0x604c, 0xa06d, 0x0040, 0x6181, 0x6848, 0xa606, 0x00c0, 0x6181, + 0x2071, 0xa8b1, 0x7024, 0xa035, 0x0040, 0x6181, 0xa080, 0x0004, + 0x2004, 0xad06, 0x00c0, 0x6181, 0x6000, 0xc0dc, 0x6002, 0x1078, + 0x6185, 0x067f, 0x0d7f, 0x0e7f, 0x007c, 0x0f7e, 0x2079, 0x0100, + 0x78c0, 0xa005, 0x00c0, 0x6194, 0x0c7e, 0x2660, 0x6003, 0x0009, + 0x630a, 0x0c7f, 0x0078, 0x61cb, 0x1078, 0x6e0f, 0x78c3, 0x0000, + 0x1078, 0x7378, 0x7027, 0x0000, 0x037e, 0x2079, 0x0140, 0x7b04, + 0xa384, 0x1000, 0x0040, 0x61a8, 0x7803, 0x0100, 0x7803, 0x0000, + 0x2079, 0x0100, 0x7824, 0xd084, 0x0040, 0x61b0, 0x7827, 0x0001, + 0x1078, 0x7378, 0x037f, 0x1078, 0x44d3, 0x0c7e, 0x603c, 0xa005, + 0x0040, 0x61bc, 0x8001, 0x603e, 0x2660, 0x1078, 0x772d, 0x0c7f, + 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, 0x1078, 0x8f7d, 0x1078, + 0x4a73, 0x1078, 0x7233, 0x0f7f, 0x007c, 0x0e7e, 0x0c7e, 0x2071, + 0xa8b1, 0x7004, 0xa084, 0x0007, 0x0079, 0x61d6, 0x61e0, 0x61e3, + 0x61fc, 0x6218, 0x6262, 0x61e0, 0x61e0, 0x61de, 0x1078, 0x1332, + 0x0c7f, 0x0e7f, 0x007c, 0x7024, 0xa065, 0x0040, 0x61f1, 0x7020, + 0x8001, 0x7022, 0x600c, 0xa015, 0x0040, 0x61f8, 0x7216, 0x600f, + 0x0000, 0x7007, 0x0000, 0x7027, 0x0000, 0x0c7f, 0x0e7f, 0x007c, + 0x7216, 0x7212, 0x0078, 0x61f1, 0x6018, 0x2060, 0x1078, 0x44d3, + 0x6000, 0xc0dc, 0x6002, 0x7020, 0x8001, 0x7022, 0x0040, 0x620d, + 0x6054, 0xa015, 0x0040, 0x6214, 0x721e, 0x7007, 0x0000, 0x7027, + 0x0000, 0x0c7f, 0x0e7f, 0x007c, 0x7218, 0x721e, 0x0078, 0x620d, + 0x7024, 0xa065, 0x0040, 0x625f, 0x700c, 0xac06, 0x00c0, 0x622f, + 0x1078, 0x7233, 0x600c, 0xa015, 0x0040, 0x622b, 0x720e, 0x600f, + 0x0000, 0x0078, 0x625d, 0x720e, 0x720a, 0x0078, 0x625d, 0x7014, + 0xac06, 0x00c0, 0x6242, 0x1078, 0x7233, 0x600c, 0xa015, 0x0040, + 0x623e, 0x7216, 0x600f, 0x0000, 0x0078, 0x625d, 0x7216, 0x7212, + 0x0078, 0x625d, 0x601c, 0xa086, 0x0003, 0x00c0, 0x625d, 0x6018, + 0x2060, 0x1078, 0x44d3, 0x6000, 0xc0dc, 0x6002, 0x1078, 0x7233, + 0x701c, 0xa065, 0x0040, 0x625d, 0x6054, 0xa015, 0x0040, 0x625b, + 0x721e, 0x0078, 0x625d, 0x7218, 0x721e, 0x7027, 0x0000, 0x0c7f, + 0x0e7f, 0x007c, 0x7024, 0xa065, 0x0040, 0x626f, 0x1078, 0x7233, + 0x600c, 0xa015, 0x0040, 0x6276, 0x720e, 0x600f, 0x0000, 0x1078, + 0x7378, 0x7027, 0x0000, 0x0c7f, 0x0e7f, 0x007c, 0x720e, 0x720a, + 0x0078, 0x626f, 0x0d7e, 0x2069, 0xa8b1, 0x6830, 0xa084, 0x0003, + 0x0079, 0x6282, 0x6288, 0x628a, 0x62b4, 0x6288, 0x1078, 0x1332, + 0x0d7f, 0x007c, 0x0c7e, 0x6840, 0xa086, 0x0001, 0x0040, 0x62aa, + 0x683c, 0xa065, 0x0040, 0x629b, 0x600c, 0xa015, 0x0040, 0x62a6, + 0x6a3a, 0x600f, 0x0000, 0x6833, 0x0000, 0x683f, 0x0000, 0x2011, + 0xa8d0, 0x2013, 0x0000, 0x0c7f, 0x0d7f, 0x007c, 0x683a, 0x6836, + 0x0078, 0x629b, 0x6843, 0x0000, 0x6838, 0xa065, 0x0040, 0x629b, + 0x6003, 0x0003, 0x0078, 0x629b, 0x0c7e, 0x6843, 0x0000, 0x6847, + 0x0000, 0x684b, 0x0000, 0x683c, 0xa065, 0x0040, 0x62ce, 0x600c, + 0xa015, 0x0040, 0x62ca, 0x6a3a, 0x600f, 0x0000, 0x683f, 0x0000, + 0x0078, 0x62ce, 0x683f, 0x0000, 0x683a, 0x6836, 0x0c7f, 0x0d7f, + 0x007c, 0x0d7e, 0x2069, 0xa8b1, 0x6804, 0xa084, 0x0007, 0x0079, + 0x62d9, 0x62e3, 0x638a, 0x638a, 0x638a, 0x638a, 0x638c, 0x638a, + 0x62e1, 0x1078, 0x1332, 0x6820, 0xa005, 0x00c0, 0x62e9, 0x0d7f, + 0x007c, 0x0c7e, 0x680c, 0xa065, 0x0040, 0x62f8, 0x6807, 0x0004, + 0x6826, 0x682b, 0x0000, 0x1078, 0x63d4, 0x0c7f, 0x0d7f, 0x007c, + 0x6814, 0xa065, 0x0040, 0x6306, 0x6807, 0x0001, 0x6826, 0x682b, + 0x0000, 0x1078, 0x63d4, 0x0c7f, 0x0d7f, 0x007c, 0x0e7e, 0x037e, + 0x6a1c, 0xa2f5, 0x0000, 0x0040, 0x6385, 0x704c, 0xa00d, 0x0040, + 0x6315, 0x7088, 0xa005, 0x0040, 0x632d, 0x7054, 0xa075, 0x0040, + 0x631e, 0xa20e, 0x0040, 0x6385, 0x0078, 0x6323, 0x6818, 0xa20e, + 0x0040, 0x6385, 0x2070, 0x704c, 0xa00d, 0x0040, 0x6315, 0x7088, + 0xa005, 0x00c0, 0x6315, 0x2e00, 0x681e, 0x733c, 0x7038, 0xa302, + 0x00c8, 0x6315, 0x1078, 0x76fc, 0x0040, 0x6385, 0x8318, 0x733e, + 0x6112, 0x2e10, 0x621a, 0xa180, 0x0014, 0x2004, 0xa084, 0x00ff, + 0x6032, 0xa180, 0x0014, 0x2003, 0x0000, 0xa180, 0x0015, 0x2004, + 0xa08a, 0x199a, 0x0048, 0x634e, 0x2001, 0x1999, 0x8003, 0x801b, + 0x831b, 0xa318, 0x6316, 0x037f, 0x0f7e, 0x2c78, 0x71a0, 0xd1bc, + 0x0040, 0x6367, 0x7100, 0xd1f4, 0x0040, 0x6363, 0x7114, 0xa18c, + 0x00ff, 0x0078, 0x636c, 0x2009, 0x0000, 0x0078, 0x636c, 0xa1e0, + 0x29c0, 0x2c0c, 0xa18c, 0x00ff, 0x2061, 0x0100, 0x619a, 0x1078, + 0x6965, 0x7300, 0xc3dd, 0x7302, 0x6807, 0x0002, 0x2f18, 0x6b26, + 0x682b, 0x0000, 0x781f, 0x0003, 0x7803, 0x0001, 0x7807, 0x0040, + 0x0f7f, 0x0e7f, 0x0c7f, 0x0d7f, 0x007c, 0x037f, 0x0e7f, 0x0c7f, + 0x0078, 0x6383, 0x0d7f, 0x007c, 0x0c7e, 0x680c, 0xa065, 0x0040, + 0x6398, 0x6807, 0x0004, 0x6826, 0x682b, 0x0000, 0x1078, 0x63d4, + 0x0c7f, 0x0d7f, 0x007c, 0x0f7e, 0x0d7e, 0x2069, 0xa8b1, 0x6830, + 0xa086, 0x0000, 0x00c0, 0x63bb, 0x6838, 0xa07d, 0x0040, 0x63bb, + 0x6833, 0x0001, 0x683e, 0x6847, 0x0000, 0x684b, 0x0000, 0x127e, + 0x0f7e, 0x2091, 0x2200, 0x027f, 0x1078, 0x1d6d, 0x00c0, 0x63be, + 0x127f, 0x1078, 0x6cb3, 0x0d7f, 0x0f7f, 0x007c, 0x127f, 0x6843, + 0x0000, 0x7803, 0x0002, 0x780c, 0xa015, 0x0040, 0x63d0, 0x6a3a, + 0x780f, 0x0000, 0x6833, 0x0000, 0x683f, 0x0000, 0x0078, 0x63bb, + 0x683a, 0x6836, 0x0078, 0x63ca, 0x601c, 0xa084, 0x000f, 0x1079, + 0x63da, 0x007c, 0x63e3, 0x63e8, 0x6809, 0x6922, 0x63e8, 0x6809, + 0x6922, 0x63e3, 0x63e8, 0x1078, 0x61cd, 0x1078, 0x62d1, 0x007c, + 0x157e, 0x137e, 0x147e, 0x0c7e, 0x0f7e, 0x6004, 0xa08a, 0x0044, + 0x10c8, 0x1332, 0x6118, 0x2178, 0x79a0, 0xd1bc, 0x0040, 0x6405, + 0x7900, 0xd1f4, 0x0040, 0x6401, 0x7914, 0xa18c, 0x00ff, 0x0078, + 0x640a, 0x2009, 0x0000, 0x0078, 0x640a, 0xa1f8, 0x29c0, 0x2f0c, + 0xa18c, 0x00ff, 0x2c78, 0x2061, 0x0100, 0x619a, 0xa08a, 0x0040, + 0x00c8, 0x645c, 0x1079, 0x641a, 0x0f7f, 0x0c7f, 0x147f, 0x137f, + 0x157f, 0x007c, 0x64c2, 0x650a, 0x6532, 0x65cd, 0x65fd, 0x6605, + 0x662c, 0x663d, 0x664e, 0x6656, 0x666e, 0x6656, 0x66d9, 0x663d, + 0x66fa, 0x6702, 0x664e, 0x6702, 0x6713, 0x645a, 0x645a, 0x645a, + 0x645a, 0x645a, 0x645a, 0x645a, 0x645a, 0x645a, 0x645a, 0x645a, + 0x6eef, 0x6f14, 0x6f29, 0x6f4c, 0x6f6d, 0x662c, 0x645a, 0x662c, + 0x6656, 0x645a, 0x6532, 0x65cd, 0x645a, 0x749c, 0x6656, 0x645a, + 0x74bc, 0x6656, 0x645a, 0x645a, 0x64bd, 0x646b, 0x645a, 0x74e1, + 0x7558, 0x7640, 0x645a, 0x7651, 0x6626, 0x766d, 0x645a, 0x6f82, + 0x645a, 0x645a, 0x1078, 0x1332, 0x2100, 0x1079, 0x6465, 0x0f7f, + 0x0c7f, 0x147f, 0x137f, 0x157f, 0x007c, 0x6469, 0x6469, 0x6469, + 0x649f, 0x1078, 0x1332, 0x0d7e, 0x20a1, 0x020b, 0x1078, 0x6731, + 0x7810, 0x2068, 0x20a3, 0x2414, 0x20a3, 0x0018, 0x20a3, 0x0800, + 0x683c, 0x20a2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x6850, 0x20a2, 0x6854, 0x20a2, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x60c3, 0x0018, 0x1078, 0x6dfb, 0x0d7f, 0x007c, + 0x0d7e, 0x7818, 0x2068, 0x68a0, 0xa082, 0x007e, 0x0048, 0x649c, + 0xa085, 0x0001, 0x0d7f, 0x007c, 0xa006, 0x0078, 0x649a, 0x0d7e, + 0x20a1, 0x020b, 0x1078, 0x6731, 0x20a3, 0x0500, 0x20a3, 0x0000, + 0x7810, 0xa0e8, 0x000f, 0x6808, 0x20a2, 0x680c, 0x20a2, 0x6810, + 0x20a2, 0x6814, 0x20a2, 0x6818, 0x20a2, 0x681c, 0x20a2, 0x60c3, + 0x0010, 0x1078, 0x6dfb, 0x0d7f, 0x007c, 0x6030, 0x609a, 0x1078, + 0x6dfb, 0x007c, 0x20a1, 0x020b, 0x1078, 0x6731, 0x20a3, 0x5200, + 0x20a3, 0x0000, 0x0d7e, 0x2069, 0xa652, 0x6804, 0xd084, 0x0040, + 0x64dc, 0x6828, 0x20a3, 0x0000, 0x017e, 0x1078, 0x2564, 0x21a2, + 0x017f, 0x0d7f, 0x0078, 0x64e1, 0x0d7f, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a9, 0x0004, 0x2099, 0xa605, 0x53a6, 0x20a9, 0x0004, + 0x2099, 0xa601, 0x53a6, 0x7818, 0xa080, 0x0028, 0x2004, 0xa082, + 0x007f, 0x0048, 0x64fb, 0x2001, 0xa61b, 0x20a6, 0x2001, 0xa61c, + 0x20a6, 0x0078, 0x6501, 0x20a3, 0x0000, 0x6030, 0xa084, 0x00ff, + 0x20a2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x001c, 0x1078, + 0x6dfb, 0x007c, 0x20a1, 0x020b, 0x1078, 0x6731, 0x20a3, 0x0500, + 0x20a3, 0x0000, 0x7818, 0xa080, 0x0028, 0x2004, 0xa082, 0x007f, + 0x0048, 0x6522, 0x2001, 0xa61b, 0x20a6, 0x2001, 0xa61c, 0x20a6, + 0x0078, 0x6528, 0x20a3, 0x0000, 0x6030, 0xa084, 0x00ff, 0x20a2, + 0x20a9, 0x0004, 0x2099, 0xa605, 0x53a6, 0x60c3, 0x0010, 0x1078, + 0x6dfb, 0x007c, 0x20a1, 0x020b, 0x1078, 0x6731, 0x0c7e, 0x7818, + 0x2060, 0x2001, 0x0000, 0x1078, 0x4972, 0x0c7f, 0x7818, 0xa080, + 0x0028, 0x2004, 0xa086, 0x007e, 0x00c0, 0x654d, 0x20a3, 0x0400, + 0x620c, 0xc2b4, 0x620e, 0x0078, 0x654f, 0x20a3, 0x0300, 0x20a3, + 0x0000, 0x7818, 0xa080, 0x0028, 0x2004, 0xa086, 0x007e, 0x00c0, + 0x659c, 0x2099, 0xa88d, 0x33a6, 0x9398, 0x33a6, 0x9398, 0x3304, + 0xa084, 0x3fff, 0x20a2, 0x9398, 0x33a6, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a9, 0x0004, 0x2099, + 0xa605, 0x53a6, 0x20a9, 0x0004, 0x2099, 0xa601, 0x53a6, 0x20a9, + 0x0010, 0x20a3, 0x0000, 0x00f0, 0x6579, 0x2099, 0xa895, 0x3304, + 0xc0dd, 0x20a2, 0x2001, 0xa672, 0x2004, 0xd0e4, 0x0040, 0x6594, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x9398, 0x9398, 0x9398, 0x33a6, + 0x20a9, 0x0004, 0x0078, 0x6596, 0x20a9, 0x0007, 0x20a3, 0x0000, + 0x00f0, 0x6596, 0x0078, 0x65bc, 0x2099, 0xa88d, 0x20a9, 0x0008, + 0x53a6, 0x20a9, 0x0004, 0x2099, 0xa605, 0x53a6, 0x20a9, 0x0004, + 0x2099, 0xa601, 0x53a6, 0x20a9, 0x0008, 0x20a3, 0x0000, 0x00f0, + 0x65ad, 0x20a9, 0x0008, 0x20a3, 0x0000, 0x00f0, 0x65b3, 0x2099, + 0xa895, 0x20a9, 0x0008, 0x53a6, 0x20a9, 0x0008, 0x20a3, 0x0000, + 0x00f0, 0x65be, 0x20a9, 0x000a, 0x20a3, 0x0000, 0x00f0, 0x65c4, + 0x60c3, 0x0074, 0x1078, 0x6dfb, 0x007c, 0x20a1, 0x020b, 0x1078, + 0x6731, 0x20a3, 0x2010, 0x20a3, 0x0014, 0x20a3, 0x0800, 0x20a3, + 0x2000, 0xa006, 0x20a2, 0x20a2, 0x20a2, 0x20a2, 0x20a2, 0x0f7e, + 0x2079, 0xa652, 0x7904, 0x0f7f, 0xd1ac, 0x00c0, 0x65e9, 0xa085, + 0x0020, 0xd1a4, 0x0040, 0x65ee, 0xa085, 0x0010, 0xa085, 0x0002, + 0x0d7e, 0x0078, 0x66b7, 0x20a2, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x60c3, 0x0014, 0x1078, 0x6dfb, 0x007c, 0x20a1, 0x020b, 0x1078, + 0x6731, 0x20a3, 0x5000, 0x0078, 0x654f, 0x20a1, 0x020b, 0x1078, + 0x6731, 0x20a3, 0x2110, 0x20a3, 0x0014, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x60c3, 0x0014, 0x1078, 0x6dfb, 0x007c, 0x20a1, 0x020b, + 0x1078, 0x67b9, 0x0078, 0x6630, 0x20a1, 0x020b, 0x1078, 0x67c2, + 0x20a3, 0x0200, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x60c3, 0x0004, 0x1078, 0x6dfb, 0x007c, 0x20a1, 0x020b, 0x1078, + 0x67c2, 0x20a3, 0x0100, 0x20a3, 0x0000, 0x20a3, 0x0003, 0x20a3, + 0x2a00, 0x60c3, 0x0008, 0x1078, 0x6dfb, 0x007c, 0x20a1, 0x020b, + 0x1078, 0x67c2, 0x20a3, 0x0200, 0x0078, 0x654f, 0x20a1, 0x020b, + 0x1078, 0x67c2, 0x20a3, 0x0100, 0x20a3, 0x0000, 0x7828, 0xa005, + 0x0040, 0x6665, 0x20a2, 0x0078, 0x6667, 0x20a3, 0x0003, 0x7810, + 0x20a2, 0x60c3, 0x0008, 0x1078, 0x6dfb, 0x007c, 0x0d7e, 0x20a1, + 0x020b, 0x1078, 0x67c2, 0x20a3, 0x0210, 0x20a3, 0x0014, 0x20a3, + 0x0800, 0x7818, 0x2068, 0x6894, 0xa086, 0x0014, 0x00c0, 0x6694, + 0x6998, 0xa184, 0xc000, 0x00c0, 0x6690, 0xd1ec, 0x0040, 0x668c, + 0x20a3, 0x2100, 0x0078, 0x6696, 0x20a3, 0x0100, 0x0078, 0x6696, + 0x20a3, 0x0400, 0x0078, 0x6696, 0x20a3, 0x0700, 0xa006, 0x20a2, + 0x20a2, 0x20a2, 0x20a2, 0x20a2, 0x0f7e, 0x2079, 0xa652, 0x7904, + 0x0f7f, 0xd1ac, 0x00c0, 0x66a6, 0xa085, 0x0020, 0xd1a4, 0x0040, + 0x66ab, 0xa085, 0x0010, 0x2009, 0xa674, 0x210c, 0xd184, 0x0040, + 0x66b5, 0x699c, 0xd18c, 0x0040, 0x66b7, 0xa085, 0x0002, 0x027e, + 0x2009, 0xa672, 0x210c, 0xd1e4, 0x0040, 0x66c5, 0xc0c5, 0xa094, + 0x0030, 0xa296, 0x0010, 0x0040, 0x66cf, 0xd1ec, 0x0040, 0x66cf, + 0xa094, 0x0030, 0xa296, 0x0010, 0x0040, 0x66cf, 0xc0bd, 0x027f, + 0x20a2, 0x20a2, 0x20a2, 0x60c3, 0x0014, 0x1078, 0x6dfb, 0x0d7f, + 0x007c, 0x20a1, 0x020b, 0x1078, 0x67c2, 0x20a3, 0x0210, 0x20a3, + 0x0014, 0x20a3, 0x0000, 0x20a3, 0x0100, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0014, 0x1078, + 0x6dfb, 0x007c, 0x20a1, 0x020b, 0x1078, 0x67c2, 0x20a3, 0x0200, + 0x0078, 0x64c8, 0x20a1, 0x020b, 0x1078, 0x67c2, 0x20a3, 0x0100, + 0x20a3, 0x0000, 0x20a3, 0x0003, 0x20a3, 0x2a00, 0x60c3, 0x0008, + 0x1078, 0x6dfb, 0x007c, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x20a1, + 0x020b, 0x1078, 0x67c2, 0x20a3, 0x0100, 0x20a3, 0x0000, 0x20a3, + 0x000b, 0x20a3, 0x0000, 0x60c3, 0x0008, 0x1078, 0x6dfb, 0x007c, + 0x027e, 0x037e, 0x047e, 0x2019, 0x3200, 0x2021, 0x0800, 0x0078, + 0x6738, 0x027e, 0x037e, 0x047e, 0x2019, 0x2200, 0x2021, 0x0100, + 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, 0x2014, + 0xa286, 0x007e, 0x00c0, 0x674b, 0xa385, 0x00ff, 0x20a2, 0x20a3, + 0xfffe, 0x0078, 0x6780, 0xa286, 0x007f, 0x00c0, 0x6757, 0x0d7e, + 0xa385, 0x00ff, 0x20a2, 0x20a3, 0xfffd, 0x0078, 0x676e, 0xd2bc, + 0x0040, 0x6776, 0xa286, 0x0080, 0x0d7e, 0x00c0, 0x6766, 0xa385, + 0x00ff, 0x20a2, 0x20a3, 0xfffc, 0x0078, 0x676e, 0xa2e8, 0xa735, + 0x2d6c, 0x6810, 0xa305, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xa61b, + 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x6784, 0x0d7e, 0xa2e8, + 0xa735, 0x2d6c, 0x6810, 0xa305, 0x20a2, 0x6814, 0x20a2, 0x0d7f, + 0x20a3, 0x0000, 0x6230, 0x22a2, 0xa485, 0x0029, 0x20a2, 0x047f, + 0x037f, 0x20a3, 0x0000, 0x1078, 0x6dea, 0x22a2, 0x20a3, 0x0000, + 0x2fa2, 0x20a3, 0xffff, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x027f, + 0x007c, 0x027e, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x20a3, 0x02ff, + 0x2011, 0xfffc, 0x22a2, 0x0d7e, 0x2069, 0xa61b, 0x2da6, 0x8d68, + 0x2da6, 0x0d7f, 0x20a3, 0x2029, 0x20a3, 0x0000, 0x0078, 0x678b, + 0x20a3, 0x0100, 0x20a3, 0x0000, 0x20a3, 0xfc02, 0x20a3, 0x0000, + 0x007c, 0x027e, 0x037e, 0x047e, 0x2019, 0x3300, 0x2021, 0x0800, + 0x0078, 0x67c9, 0x027e, 0x037e, 0x047e, 0x2019, 0x2300, 0x2021, + 0x0100, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, + 0x2004, 0xa092, 0x007e, 0x0048, 0x67e6, 0x0d7e, 0xa0e8, 0xa735, + 0x2d6c, 0x6810, 0xa305, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xa61b, + 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x67f4, 0x0d7e, 0xa0e8, + 0xa735, 0x2d6c, 0x6810, 0xa305, 0x20a2, 0x6814, 0x20a2, 0x0d7f, + 0x20a3, 0x0000, 0x6230, 0x22a2, 0xa485, 0x0098, 0x20a2, 0x20a3, + 0x0000, 0x047f, 0x037f, 0x1078, 0x6dea, 0x22a2, 0x20a3, 0x0000, + 0x7a08, 0x22a2, 0x2fa2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x027f, + 0x007c, 0x0c7e, 0x0f7e, 0x6004, 0xa08a, 0x0085, 0x1048, 0x1332, + 0xa08a, 0x008c, 0x10c8, 0x1332, 0x6118, 0x2178, 0x79a0, 0xd1bc, + 0x0040, 0x6827, 0x7900, 0xd1f4, 0x0040, 0x6823, 0x7914, 0xa18c, + 0x00ff, 0x0078, 0x682c, 0x2009, 0x0000, 0x0078, 0x682c, 0xa1f8, + 0x29c0, 0x2f0c, 0xa18c, 0x00ff, 0x2c78, 0x2061, 0x0100, 0x619a, + 0xa082, 0x0085, 0x1079, 0x6837, 0x0f7f, 0x0c7f, 0x007c, 0x6840, + 0x684b, 0x6866, 0x683e, 0x683e, 0x683e, 0x6840, 0x1078, 0x1332, + 0x147e, 0x20a1, 0x020b, 0x1078, 0x6879, 0x60c3, 0x0000, 0x1078, + 0x6dfb, 0x147f, 0x007c, 0x147e, 0x20a1, 0x020b, 0x1078, 0x68ad, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x7808, 0x20a2, 0x7810, 0x20a2, + 0x20a3, 0x0000, 0x20a3, 0xffff, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x60c3, 0x000c, 0x1078, 0x6dfb, 0x147f, 0x007c, 0x147e, 0x20a1, + 0x020b, 0x1078, 0x68ee, 0x20a3, 0x0003, 0x20a3, 0x0300, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0004, 0x1078, 0x6dfb, 0x147f, + 0x007c, 0x027e, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, + 0x0028, 0x2004, 0xa092, 0x007e, 0x0048, 0x6898, 0x0d7e, 0xa0e8, + 0xa735, 0x2d6c, 0x6810, 0xa085, 0x8100, 0x20a2, 0x6814, 0x20a2, + 0x2069, 0xa61b, 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x68a7, + 0x0d7e, 0xa0e8, 0xa735, 0x2d6c, 0x6810, 0xa085, 0x8100, 0x20a2, + 0x6814, 0x20a2, 0x0d7f, 0x20a3, 0x0000, 0x6230, 0x22a2, 0x20a3, + 0x0009, 0x20a3, 0x0000, 0x0078, 0x678b, 0x027e, 0x20e1, 0x9080, + 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, 0x2004, 0xa092, 0x007e, + 0x0048, 0x68cc, 0x0d7e, 0xa0e8, 0xa735, 0x2d6c, 0x6810, 0xa085, + 0x8400, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xa61b, 0x2da6, 0x8d68, + 0x2da6, 0x0d7f, 0x0078, 0x68db, 0x0d7e, 0xa0e8, 0xa735, 0x2d6c, + 0x6810, 0xa085, 0x8400, 0x20a2, 0x6814, 0x20a2, 0x0d7f, 0x20a3, + 0x0000, 0x6230, 0x22a2, 0x20a3, 0x0099, 0x20a3, 0x0000, 0x1078, + 0x6dea, 0x22a2, 0x20a3, 0x0000, 0x7a08, 0x22a2, 0x7a10, 0x22a2, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x027f, 0x007c, 0x027e, 0x20e1, + 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, 0x2004, 0xa092, + 0x007e, 0x0048, 0x690d, 0x0d7e, 0xa0e8, 0xa735, 0x2d6c, 0x6810, + 0xa085, 0x8500, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xa61b, 0x2da6, + 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x691c, 0x0d7e, 0xa0e8, 0xa735, + 0x2d6c, 0x6810, 0xa085, 0x8500, 0x20a2, 0x6814, 0x20a2, 0x0d7f, + 0x20a3, 0x0000, 0x6230, 0x22a2, 0x20a3, 0x0099, 0x20a3, 0x0000, + 0x0078, 0x68df, 0x0c7e, 0x0f7e, 0x2c78, 0x7804, 0xa08a, 0x0040, + 0x1048, 0x1332, 0xa08a, 0x0053, 0x10c8, 0x1332, 0x7918, 0x2160, + 0x61a0, 0xd1bc, 0x0040, 0x6941, 0x6100, 0xd1f4, 0x0040, 0x693d, + 0x6114, 0xa18c, 0x00ff, 0x0078, 0x6946, 0x2009, 0x0000, 0x0078, + 0x6946, 0xa1e0, 0x29c0, 0x2c0c, 0xa18c, 0x00ff, 0x2061, 0x0100, + 0x619a, 0xa082, 0x0040, 0x1079, 0x6950, 0x0f7f, 0x0c7f, 0x007c, + 0x6965, 0x6a73, 0x6a14, 0x6c27, 0x6963, 0x6963, 0x6963, 0x6963, + 0x6963, 0x6963, 0x6963, 0x714c, 0x715d, 0x716e, 0x717f, 0x6963, + 0x767e, 0x6963, 0x713b, 0x1078, 0x1332, 0x0d7e, 0x157e, 0x147e, + 0x780b, 0xffff, 0x20a1, 0x020b, 0x1078, 0x69d0, 0x7910, 0x2168, + 0x6948, 0x7922, 0x21a2, 0xa016, 0x22a2, 0x22a2, 0x22a2, 0x694c, + 0xa184, 0x000f, 0x00c0, 0x6980, 0x2001, 0x0005, 0x0078, 0x698a, + 0xd184, 0x0040, 0x6987, 0x2001, 0x0004, 0x0078, 0x698a, 0xa084, + 0x0006, 0x8004, 0x017e, 0x2008, 0x7830, 0xa084, 0x00ff, 0x8007, + 0xa105, 0x017f, 0x20a2, 0xd1ac, 0x0040, 0x699a, 0x20a3, 0x0002, + 0x0078, 0x69a6, 0xd1b4, 0x0040, 0x69a1, 0x20a3, 0x0001, 0x0078, + 0x69a6, 0x20a3, 0x0000, 0x2230, 0x0078, 0x69a8, 0x6a80, 0x6e7c, + 0x20a9, 0x0008, 0xad80, 0x0017, 0x200c, 0x810f, 0x21a2, 0x8000, + 0x00f0, 0x69ac, 0x22a2, 0x26a2, 0x60c3, 0x0020, 0x20e1, 0x9080, + 0x6014, 0xa084, 0x0004, 0xa085, 0x0009, 0x6016, 0x2001, 0xa8cd, + 0x2003, 0x07d0, 0x2001, 0xa8cc, 0x2003, 0x0009, 0x2001, 0xa8d2, + 0x2003, 0x0002, 0x1078, 0x158c, 0x147f, 0x157f, 0x0d7f, 0x007c, + 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7a18, 0xa280, 0x0023, 0x2014, + 0x8210, 0xa294, 0x00ff, 0x2202, 0x8217, 0x7818, 0xa080, 0x0028, + 0x2004, 0xd0bc, 0x0040, 0x69f6, 0x0d7e, 0xa0e8, 0xa735, 0x2d6c, + 0x6810, 0xa085, 0x0600, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xa61b, + 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x6a05, 0x0d7e, 0xa0e8, + 0xa735, 0x2d6c, 0x6810, 0xa085, 0x0600, 0x20a2, 0x6814, 0x20a2, + 0x0d7f, 0x20a3, 0x0000, 0x6130, 0x21a2, 0x20a3, 0x0829, 0x20a3, + 0x0000, 0x22a2, 0x20a3, 0x0000, 0x2fa2, 0x20a3, 0xffff, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x007c, 0x0d7e, 0x157e, 0x137e, 0x147e, + 0x20a1, 0x020b, 0x1078, 0x6a34, 0x7810, 0x2068, 0x6860, 0x20a2, + 0x685c, 0x20a2, 0x6880, 0x20a2, 0x687c, 0x20a2, 0xa006, 0x20a2, + 0x20a2, 0x20a2, 0x20a2, 0x60c3, 0x000c, 0x1078, 0x6dfb, 0x147f, + 0x137f, 0x157f, 0x0d7f, 0x007c, 0x027e, 0x20e1, 0x9080, 0x20e1, + 0x4000, 0x7818, 0xa080, 0x0028, 0x2004, 0xd0bc, 0x0040, 0x6a52, + 0x0d7e, 0xa0e8, 0xa735, 0x2d6c, 0x6810, 0xa085, 0x0500, 0x20a2, + 0x6814, 0x20a2, 0x2069, 0xa61b, 0x2da6, 0x8d68, 0x2da6, 0x0d7f, + 0x0078, 0x6a61, 0x0d7e, 0xa0e8, 0xa735, 0x2d6c, 0x6810, 0xa085, + 0x0500, 0x20a2, 0x6814, 0x20a2, 0x0d7f, 0x20a3, 0x0000, 0x6230, + 0x22a2, 0x20a3, 0x0889, 0x20a3, 0x0000, 0x1078, 0x6dea, 0x22a2, + 0x20a3, 0x0000, 0x7a08, 0x22a2, 0x2fa2, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x027f, 0x007c, 0x0d7e, 0x157e, 0x137e, 0x147e, 0x7810, + 0xa0ec, 0xf000, 0x0040, 0x6a8b, 0xa06d, 0x1078, 0x495f, 0x0040, + 0x6a8b, 0x684c, 0xa084, 0x2020, 0xa086, 0x2020, 0x00c0, 0x6a8b, + 0x7824, 0xc0cd, 0x7826, 0x20a1, 0x020b, 0x1078, 0x6be0, 0xa016, + 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x7810, 0xa084, 0xf000, + 0x00c0, 0x6aa2, 0x7810, 0xa084, 0x0700, 0x8007, 0x1079, 0x6aaa, + 0x0078, 0x6aa5, 0xa006, 0x1079, 0x6aaa, 0x147f, 0x137f, 0x157f, + 0x0d7f, 0x007c, 0x6ab4, 0x6b4c, 0x6b57, 0x6b81, 0x6b95, 0x6bb1, + 0x6bbc, 0x6ab2, 0x1078, 0x1332, 0x017e, 0x037e, 0x694c, 0xa18c, + 0x0003, 0x0040, 0x6abf, 0xa186, 0x0003, 0x00c0, 0x6ace, 0x6b78, + 0x7824, 0xd0cc, 0x0040, 0x6ac5, 0xc3e5, 0x23a2, 0x6868, 0x20a2, + 0x6864, 0x20a2, 0x037f, 0x017f, 0x0078, 0x6b8c, 0xa186, 0x0001, + 0x10c0, 0x1332, 0x6b78, 0x7824, 0xd0cc, 0x0040, 0x6ad8, 0xc3e5, + 0x23a2, 0x6868, 0x20a2, 0x6864, 0x20a2, 0x22a2, 0x6874, 0x20a2, + 0x22a2, 0x687c, 0x20a2, 0x2009, 0x0018, 0xa384, 0x0300, 0x0040, + 0x6b46, 0xd3c4, 0x0040, 0x6aee, 0x687c, 0xa108, 0xd3cc, 0x0040, + 0x6af3, 0x6874, 0xa108, 0x157e, 0x20a9, 0x000d, 0xad80, 0x0020, + 0x201c, 0x831f, 0x23a2, 0x8000, 0x00f0, 0x6af8, 0x157f, 0x22a2, + 0x22a2, 0x22a2, 0xa184, 0x0003, 0x0040, 0x6b46, 0x20a1, 0x020b, + 0x20e1, 0x9080, 0x20e1, 0x4000, 0x007e, 0x7818, 0xa080, 0x0028, + 0x2004, 0xd0bc, 0x0040, 0x6b26, 0x0d7e, 0xa0e8, 0xa735, 0x2d6c, + 0x6810, 0xa085, 0x0700, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xa61b, + 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x6b35, 0x0d7e, 0xa0e8, + 0xa735, 0x2d6c, 0x6810, 0xa085, 0x0700, 0x20a2, 0x6814, 0x20a2, + 0x0d7f, 0x20a3, 0x0000, 0x6230, 0x22a2, 0x007f, 0x7b24, 0xd3cc, + 0x0040, 0x6b3e, 0x20a3, 0x0889, 0x0078, 0x6b40, 0x20a3, 0x0898, + 0x20a2, 0x1078, 0x6dea, 0x22a2, 0x20a3, 0x0000, 0x61c2, 0x037f, + 0x017f, 0x1078, 0x6dfb, 0x007c, 0x2011, 0x0008, 0x7824, 0xd0cc, + 0x0040, 0x6b53, 0xc2e5, 0x22a2, 0xa016, 0x0078, 0x6b8a, 0x2011, + 0x0302, 0x7824, 0xd0cc, 0x0040, 0x6b5e, 0xc2e5, 0x22a2, 0xa016, + 0x22a2, 0x22a2, 0x22a2, 0x20a3, 0x0012, 0x22a2, 0x20a3, 0x0008, + 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x20a3, 0x7000, 0x20a3, 0x0500, + 0x22a2, 0x20a3, 0x000a, 0x22a2, 0x22a2, 0x20a3, 0x2500, 0x22a2, + 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x60c3, 0x0032, 0x1078, 0x6dfb, + 0x007c, 0x2011, 0x0028, 0x7824, 0xd0cc, 0x0040, 0x6b88, 0xc2e5, + 0x22a2, 0xa016, 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x22a2, + 0x60c3, 0x0018, 0x1078, 0x6dfb, 0x007c, 0x2011, 0x0100, 0x7824, + 0xd0cc, 0x0040, 0x6b9c, 0xc2e5, 0x22a2, 0xa016, 0x22a2, 0x22a2, + 0x22a2, 0x22a2, 0x22a2, 0x20a3, 0x0008, 0x22a2, 0x7834, 0xa084, + 0x00ff, 0x20a2, 0x22a2, 0x22a2, 0x60c3, 0x0020, 0x1078, 0x6dfb, + 0x007c, 0x2011, 0x0008, 0x7824, 0xd0cc, 0x0040, 0x6bb8, 0xc2e5, + 0x22a2, 0xa016, 0x0078, 0x6b8a, 0x037e, 0x7b10, 0xa384, 0xff00, + 0x7812, 0xa384, 0x00ff, 0x8001, 0x00c0, 0x6bcf, 0x7824, 0xd0cc, + 0x0040, 0x6bcb, 0xc2e5, 0x22a2, 0x037f, 0x0078, 0x6b8a, 0x047e, + 0x2021, 0x0800, 0x007e, 0x7824, 0xd0cc, 0x007f, 0x0040, 0x6bd9, + 0xc4e5, 0x24a2, 0x047f, 0x22a2, 0x20a2, 0x037f, 0x0078, 0x6b8c, + 0x027e, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, + 0x2004, 0xd0bc, 0x0040, 0x6bfe, 0x0d7e, 0xa0e8, 0xa735, 0x2d6c, + 0x6810, 0xa085, 0x0700, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xa61b, + 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x6c0d, 0x0d7e, 0xa0e8, + 0xa735, 0x2d6c, 0x6810, 0xa085, 0x0700, 0x20a2, 0x6814, 0x20a2, + 0x0d7f, 0x20a3, 0x0000, 0x6230, 0x22a2, 0x7824, 0xd0cc, 0x0040, + 0x6c15, 0x20a3, 0x0889, 0x0078, 0x6c17, 0x20a3, 0x0898, 0x20a3, + 0x0000, 0x1078, 0x6dea, 0x22a2, 0x20a3, 0x0000, 0x7a08, 0x22a2, + 0x2fa2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x027f, 0x007c, 0x0d7e, + 0x157e, 0x137e, 0x147e, 0x017e, 0x037e, 0x7810, 0xa084, 0x0700, + 0x8007, 0x1079, 0x6c3a, 0x037f, 0x017f, 0x147f, 0x137f, 0x157f, + 0x0d7f, 0x007c, 0x6c42, 0x6c42, 0x6c44, 0x6c42, 0x6c42, 0x6c42, + 0x6c69, 0x6c42, 0x1078, 0x1332, 0x7910, 0xa18c, 0xf8ff, 0xa18d, + 0x0600, 0x7912, 0x20a1, 0x020b, 0x2009, 0x0003, 0x1078, 0x6c73, + 0x0d7e, 0x2069, 0xa652, 0x6804, 0xd0bc, 0x0040, 0x6c5e, 0x682c, + 0xa084, 0x00ff, 0x8007, 0x20a2, 0x0078, 0x6c60, 0x20a3, 0x3f00, + 0x0d7f, 0x22a2, 0x22a2, 0x22a2, 0x60c3, 0x0001, 0x1078, 0x6dfb, + 0x007c, 0x20a1, 0x020b, 0x2009, 0x0003, 0x1078, 0x6c73, 0x20a3, + 0x7f00, 0x0078, 0x6c61, 0x027e, 0x20e1, 0x9080, 0x20e1, 0x4000, + 0x7818, 0xa080, 0x0028, 0x2004, 0xd0bc, 0x0040, 0x6c91, 0x0d7e, + 0xa0e8, 0xa735, 0x2d6c, 0x6810, 0xa085, 0x0100, 0x20a2, 0x6814, + 0x20a2, 0x2069, 0xa61b, 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, + 0x6ca0, 0x0d7e, 0xa0e8, 0xa735, 0x2d6c, 0x6810, 0xa085, 0x0100, + 0x20a2, 0x6814, 0x20a2, 0x0d7f, 0x20a3, 0x0000, 0x6230, 0x22a2, + 0x20a3, 0x0888, 0xa18d, 0x0008, 0x21a2, 0x1078, 0x6dea, 0x22a2, + 0x20a3, 0x0000, 0x7a08, 0x22a2, 0x2fa2, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x027f, 0x007c, 0x0e7e, 0x0d7e, 0x0c7e, 0x057e, 0x047e, + 0x037e, 0x2061, 0x0100, 0x2071, 0xa600, 0x6130, 0x7818, 0x2068, + 0x68a0, 0x2028, 0xd0bc, 0x00c0, 0x6cca, 0x6910, 0x6a14, 0x6430, + 0x0078, 0x6cce, 0x6910, 0x6a14, 0x736c, 0x7470, 0x781c, 0xa086, + 0x0006, 0x0040, 0x6d2d, 0xd5bc, 0x0040, 0x6cde, 0xa185, 0x0100, + 0x6062, 0x6266, 0x636a, 0x646e, 0x0078, 0x6ce5, 0xa185, 0x0100, + 0x6062, 0x6266, 0x606b, 0x0000, 0x646e, 0x6073, 0x0809, 0x6077, + 0x0008, 0x688c, 0x8000, 0xa084, 0x00ff, 0x688e, 0x8007, 0x607a, + 0x607f, 0x0000, 0x2f00, 0x6082, 0x7808, 0x6086, 0x7810, 0x2070, + 0x7014, 0x608a, 0x7010, 0x608e, 0x700c, 0x60c6, 0x7008, 0x60ca, + 0x686c, 0x60ce, 0x60ab, 0x0036, 0x60af, 0x95d5, 0x60d7, 0x0000, + 0xa582, 0x0080, 0x0048, 0x6d17, 0x6a00, 0xd2f4, 0x0040, 0x6d15, + 0x6a14, 0xa294, 0x00ff, 0x0078, 0x6d17, 0x2011, 0x0000, 0x629e, + 0x6017, 0x0016, 0x2009, 0x07d0, 0x60c4, 0xa084, 0xfff0, 0xa005, + 0x0040, 0x6d24, 0x2009, 0x1b58, 0x1078, 0x5ad0, 0x037f, 0x047f, + 0x057f, 0x0c7f, 0x0d7f, 0x0e7f, 0x007c, 0x7810, 0x2070, 0x704c, + 0xa084, 0x0003, 0xa086, 0x0002, 0x0040, 0x6d85, 0xd5bc, 0x0040, + 0x6d41, 0xa185, 0x0100, 0x6062, 0x6266, 0x636a, 0x646e, 0x0078, + 0x6d48, 0xa185, 0x0100, 0x6062, 0x6266, 0x606b, 0x0000, 0x646e, + 0x6073, 0x0880, 0x6077, 0x0008, 0x688c, 0x8000, 0xa084, 0x00ff, + 0x688e, 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00, 0x6086, 0x7808, + 0x6082, 0x7060, 0x608a, 0x705c, 0x608e, 0x7080, 0x60c6, 0x707c, + 0x60ca, 0x707c, 0x792c, 0xa108, 0x792e, 0x7080, 0x7928, 0xa109, + 0x792a, 0x686c, 0x60ce, 0x60ab, 0x0036, 0x60af, 0x95d5, 0x60d7, + 0x0000, 0xa582, 0x0080, 0x0048, 0x6d80, 0x6a00, 0xd2f4, 0x0040, + 0x6d7e, 0x6a14, 0xa294, 0x00ff, 0x0078, 0x6d80, 0x2011, 0x0000, + 0x629e, 0x6017, 0x0012, 0x0078, 0x6d1a, 0xd5bc, 0x0040, 0x6d90, + 0xa185, 0x0700, 0x6062, 0x6266, 0x636a, 0x646e, 0x0078, 0x6d97, + 0xa185, 0x0700, 0x6062, 0x6266, 0x606b, 0x0000, 0x646e, 0x1078, + 0x495f, 0x0040, 0x6dad, 0x0d7e, 0x7810, 0xa06d, 0x684c, 0x0d7f, + 0xa084, 0x2020, 0xa086, 0x2020, 0x00c0, 0x6dad, 0x7824, 0xc0cd, + 0x7826, 0x6073, 0x0889, 0x0078, 0x6daf, 0x6073, 0x0898, 0x6077, + 0x0000, 0x688c, 0x8000, 0xa084, 0x00ff, 0x688e, 0x8007, 0x607a, + 0x607f, 0x0000, 0x2f00, 0x6086, 0x7808, 0x6082, 0x7014, 0x608a, + 0x7010, 0x608e, 0x700c, 0x60c6, 0x7008, 0x60ca, 0x686c, 0x60ce, + 0x60ab, 0x0036, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xa582, 0x0080, + 0x0048, 0x6ddd, 0x6a00, 0xd2f4, 0x0040, 0x6ddb, 0x6a14, 0xa294, + 0x00ff, 0x0078, 0x6ddd, 0x2011, 0x0000, 0x629e, 0x7824, 0xd0cc, + 0x0040, 0x6de6, 0x6017, 0x0016, 0x0078, 0x6d1a, 0x6017, 0x0012, + 0x0078, 0x6d1a, 0x7a18, 0xa280, 0x0023, 0x2014, 0x8210, 0xa294, + 0x00ff, 0x2202, 0x8217, 0x007c, 0x0d7e, 0x2069, 0xa8b1, 0x6843, + 0x0001, 0x0d7f, 0x007c, 0x20e1, 0x9080, 0x60a3, 0x0056, 0x60a7, + 0x9575, 0x1078, 0x6e06, 0x1078, 0x5ac0, 0x007c, 0x007e, 0x6014, + 0xa084, 0x0004, 0xa085, 0x0009, 0x6016, 0x007f, 0x007c, 0x007e, + 0x0c7e, 0x2061, 0x0100, 0x6014, 0xa084, 0x0004, 0xa085, 0x0008, + 0x6016, 0x0c7f, 0x007f, 0x007c, 0x0c7e, 0x0d7e, 0x017e, 0x027e, + 0x2061, 0x0100, 0x2069, 0x0140, 0x6904, 0xa194, 0x4000, 0x0040, + 0x6e59, 0x1078, 0x6e0f, 0x6803, 0x1000, 0x6803, 0x0000, 0x0c7e, + 0x2061, 0xa8b1, 0x6128, 0xa192, 0x00c8, 0x00c8, 0x6e44, 0x8108, + 0x612a, 0x6124, 0x0c7f, 0x81ff, 0x0040, 0x6e54, 0x1078, 0x5ac0, + 0x1078, 0x6e06, 0x0078, 0x6e54, 0x6124, 0xa1e5, 0x0000, 0x0040, + 0x6e51, 0x1078, 0xa5c4, 0x1078, 0x5acb, 0x2009, 0x0014, 0x1078, + 0x775c, 0x0c7f, 0x0078, 0x6e54, 0x027f, 0x017f, 0x0d7f, 0x0c7f, + 0x007c, 0x2001, 0xa8cd, 0x2004, 0xa005, 0x00c0, 0x6e54, 0x0c7e, + 0x2061, 0xa8b1, 0x6128, 0xa192, 0x0003, 0x00c8, 0x6e44, 0x8108, + 0x612a, 0x0c7f, 0x1078, 0x5ac0, 0x1078, 0x4224, 0x0078, 0x6e54, + 0x0c7e, 0x0d7e, 0x0e7e, 0x017e, 0x027e, 0x1078, 0x5ad8, 0x2071, + 0xa8b1, 0x713c, 0x81ff, 0x0040, 0x6e9a, 0x2061, 0x0100, 0x2069, + 0x0140, 0x6904, 0xa194, 0x4000, 0x0040, 0x6ea0, 0x6803, 0x1000, + 0x6803, 0x0000, 0x037e, 0x2019, 0x0001, 0x1078, 0x7058, 0x037f, + 0x713c, 0x2160, 0x1078, 0xa5c4, 0x2009, 0x004a, 0x1078, 0x775c, + 0x0078, 0x6e9a, 0x027f, 0x017f, 0x0e7f, 0x0d7f, 0x0c7f, 0x007c, + 0x0078, 0x6e8a, 0x0e7e, 0x2071, 0xa8b1, 0x7048, 0xd084, 0x0040, + 0x6ebc, 0x713c, 0x81ff, 0x0040, 0x6ebc, 0x2071, 0x0100, 0xa188, + 0x0007, 0x210c, 0xa18e, 0x0006, 0x00c0, 0x6eba, 0x7017, 0x0012, + 0x0078, 0x6ebc, 0x7017, 0x0016, 0x0e7f, 0x007c, 0x0e7e, 0x0d7e, + 0x0c7e, 0x067e, 0x057e, 0x047e, 0x007e, 0x127e, 0x2091, 0x8000, + 0x6018, 0x2068, 0x6ca0, 0x2071, 0xa8b1, 0x7018, 0x2068, 0x8dff, + 0x0040, 0x6ee6, 0x68a0, 0xa406, 0x0040, 0x6eda, 0x6854, 0x2068, + 0x0078, 0x6ecf, 0x6010, 0x2060, 0x643c, 0x6540, 0x6648, 0x2d60, + 0x1078, 0x4736, 0x0040, 0x6ee6, 0xa085, 0x0001, 0x127f, 0x007f, + 0x047f, 0x057f, 0x067f, 0x0c7f, 0x0d7f, 0x0e7f, 0x007c, 0x20a1, + 0x020b, 0x1078, 0x6731, 0x20a3, 0x1200, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x781c, 0xa086, 0x0004, 0x00c0, 0x6f01, 0x6098, 0x0078, + 0x6f02, 0x6030, 0x20a2, 0x7834, 0x20a2, 0x7838, 0x20a2, 0x20a9, + 0x0010, 0xa006, 0x20a2, 0x00f0, 0x6f0a, 0x20a2, 0x20a2, 0x60c3, + 0x002c, 0x1078, 0x6dfb, 0x007c, 0x157e, 0x147e, 0x20a1, 0x020b, + 0x1078, 0x6731, 0x20a3, 0x0f00, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x7808, 0x20a2, 0x60c3, 0x0008, 0x1078, 0x6dfb, 0x147f, 0x157f, + 0x007c, 0x157e, 0x147e, 0x20a1, 0x020b, 0x1078, 0x67c2, 0x20a3, + 0x0200, 0x20a3, 0x0000, 0x20a9, 0x0006, 0x2011, 0xa640, 0x2019, + 0xa641, 0x23a6, 0x22a6, 0xa398, 0x0002, 0xa290, 0x0002, 0x00f0, + 0x6f39, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x001c, 0x1078, + 0x6dfb, 0x147f, 0x157f, 0x007c, 0x157e, 0x147e, 0x017e, 0x027e, + 0x20a1, 0x020b, 0x1078, 0x6799, 0x1078, 0x67b0, 0x7810, 0xa080, + 0x0000, 0x2004, 0xa080, 0x0015, 0x2098, 0x7808, 0xa088, 0x0002, + 0x21a8, 0x53a6, 0xa080, 0x0004, 0x8003, 0x60c2, 0x1078, 0x6dfb, + 0x027f, 0x017f, 0x147f, 0x157f, 0x007c, 0x157e, 0x147e, 0x20a1, + 0x020b, 0x1078, 0x6731, 0x20a3, 0x6200, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x7808, 0x20a2, 0x60c3, 0x0008, 0x1078, 0x6dfb, 0x147f, + 0x157f, 0x007c, 0x157e, 0x147e, 0x017e, 0x027e, 0x20a1, 0x020b, + 0x1078, 0x6731, 0x7810, 0xa080, 0x0000, 0x2004, 0xa080, 0x0017, + 0x2098, 0x7808, 0xa088, 0x0002, 0x21a8, 0x53a6, 0x8003, 0x60c2, + 0x1078, 0x6dfb, 0x027f, 0x017f, 0x147f, 0x157f, 0x007c, 0x0e7e, + 0x0c7e, 0x007e, 0x127e, 0x2091, 0x8000, 0x2071, 0xa8b1, 0x700c, + 0x2060, 0x8cff, 0x0040, 0x6fbb, 0x1078, 0x8f00, 0x00c0, 0x6fb2, + 0x1078, 0x7c83, 0x600c, 0x007e, 0x1078, 0x772d, 0x1078, 0x7233, + 0x0c7f, 0x0078, 0x6fa9, 0x700f, 0x0000, 0x700b, 0x0000, 0x127f, + 0x007f, 0x0c7f, 0x0e7f, 0x007c, 0x127e, 0x157e, 0x0f7e, 0x0e7e, + 0x0d7e, 0x0c7e, 0x027e, 0x017e, 0x007e, 0x2091, 0x8000, 0x2069, + 0x0100, 0x2079, 0x0140, 0x2071, 0xa8b1, 0x7024, 0x2060, 0x8cff, + 0x0040, 0x7014, 0x1078, 0x6e0f, 0x68c3, 0x0000, 0x1078, 0x5acb, + 0x2009, 0x0013, 0x1078, 0x775c, 0x20a9, 0x01f4, 0x6824, 0xd094, + 0x0040, 0x6ff7, 0x6827, 0x0004, 0x7804, 0xa084, 0x4000, 0x0040, + 0x7009, 0x7803, 0x1000, 0x7803, 0x0000, 0x0078, 0x7009, 0xd084, + 0x0040, 0x6ffe, 0x6827, 0x0001, 0x0078, 0x7000, 0x00f0, 0x6fe6, + 0x7804, 0xa084, 0x1000, 0x0040, 0x7009, 0x7803, 0x0100, 0x7803, + 0x0000, 0x6824, 0x007f, 0x017f, 0x027f, 0x0c7f, 0x0d7f, 0x0e7f, + 0x0f7f, 0x157f, 0x127f, 0x007c, 0x2001, 0xa600, 0x2004, 0xa096, + 0x0001, 0x0040, 0x704e, 0xa096, 0x0004, 0x0040, 0x704e, 0x1078, + 0x5acb, 0x6817, 0x0008, 0x68c3, 0x0000, 0x2011, 0x41dc, 0x1078, + 0x5a45, 0x20a9, 0x01f4, 0x6824, 0xd094, 0x0040, 0x703c, 0x6827, + 0x0004, 0x7804, 0xa084, 0x4000, 0x0040, 0x704e, 0x7803, 0x1000, + 0x7803, 0x0000, 0x0078, 0x704e, 0xd084, 0x0040, 0x7043, 0x6827, + 0x0001, 0x0078, 0x7045, 0x00f0, 0x702b, 0x7804, 0xa084, 0x1000, + 0x0040, 0x704e, 0x7803, 0x0100, 0x7803, 0x0000, 0x007f, 0x017f, + 0x027f, 0x0c7f, 0x0d7f, 0x0e7f, 0x0f7f, 0x157f, 0x127f, 0x007c, + 0x127e, 0x157e, 0x0f7e, 0x0e7e, 0x0d7e, 0x0c7e, 0x027e, 0x017e, + 0x007e, 0x2091, 0x8000, 0x2069, 0x0100, 0x2079, 0x0140, 0x2071, + 0xa8b1, 0x703c, 0x2060, 0x8cff, 0x0040, 0x70d6, 0x68af, 0x95f5, + 0x6817, 0x0010, 0x2009, 0x00fa, 0x8109, 0x00c0, 0x7074, 0x68c7, + 0x0000, 0x68cb, 0x0008, 0x1078, 0x5ad8, 0x1078, 0x1f7e, 0x047e, + 0x057e, 0x2009, 0x017f, 0x212c, 0x200b, 0x00a5, 0x2021, 0x0169, + 0x2404, 0xa084, 0x000f, 0xa086, 0x0004, 0x00c0, 0x70a5, 0x68c7, + 0x0000, 0x68cb, 0x0008, 0x0e7e, 0x0f7e, 0x2079, 0x0020, 0x2071, + 0xa908, 0x6814, 0xa084, 0x0004, 0xa085, 0x0012, 0x6816, 0x7803, + 0x0008, 0x7003, 0x0000, 0x0f7f, 0x0e7f, 0x250a, 0x057f, 0x047f, + 0xa39d, 0x0000, 0x00c0, 0x70b0, 0x2009, 0x0049, 0x1078, 0x775c, + 0x20a9, 0x03e8, 0x6824, 0xd094, 0x0040, 0x70c3, 0x6827, 0x0004, + 0x7804, 0xa084, 0x4000, 0x0040, 0x70d5, 0x7803, 0x1000, 0x7803, + 0x0000, 0x0078, 0x70d5, 0xd08c, 0x0040, 0x70ca, 0x6827, 0x0002, + 0x0078, 0x70cc, 0x00f0, 0x70b2, 0x7804, 0xa084, 0x1000, 0x0040, + 0x70d5, 0x7803, 0x0100, 0x7803, 0x0000, 0x6824, 0x007f, 0x017f, + 0x027f, 0x0c7f, 0x0d7f, 0x0e7f, 0x0f7f, 0x157f, 0x127f, 0x007c, + 0x0d7e, 0x127e, 0x2091, 0x8000, 0x2069, 0xa8b1, 0x6a06, 0x127f, + 0x0d7f, 0x007c, 0x0d7e, 0x127e, 0x2091, 0x8000, 0x2069, 0xa8b1, + 0x6a32, 0x127f, 0x0d7f, 0x007c, 0x0f7e, 0x0e7e, 0x0c7e, 0x067e, + 0x007e, 0x127e, 0x2071, 0xa8b1, 0x7614, 0x2660, 0x2678, 0x2091, + 0x8000, 0x8cff, 0x0040, 0x7134, 0x601c, 0xa206, 0x00c0, 0x712f, + 0x7014, 0xac36, 0x00c0, 0x710e, 0x660c, 0x7616, 0x7010, 0xac36, + 0x00c0, 0x711c, 0x2c00, 0xaf36, 0x0040, 0x711a, 0x2f00, 0x7012, + 0x0078, 0x711c, 0x7013, 0x0000, 0x660c, 0x067e, 0x2c00, 0xaf06, + 0x0040, 0x7125, 0x7e0e, 0x0078, 0x7126, 0x2678, 0x600f, 0x0000, + 0x1078, 0x8ec6, 0x1078, 0x7233, 0x0c7f, 0x0078, 0x7101, 0x2c78, + 0x600c, 0x2060, 0x0078, 0x7101, 0x127f, 0x007f, 0x067f, 0x0c7f, + 0x0e7f, 0x0f7f, 0x007c, 0x157e, 0x147e, 0x20a1, 0x020b, 0x1078, + 0x69d0, 0x7810, 0x20a2, 0xa006, 0x20a2, 0x20a2, 0x20a2, 0x20a2, + 0x20a3, 0x1000, 0x0078, 0x718e, 0x157e, 0x147e, 0x20a1, 0x020b, + 0x1078, 0x69d0, 0x7810, 0x20a2, 0xa006, 0x20a2, 0x20a2, 0x20a2, + 0x20a2, 0x20a3, 0x4000, 0x0078, 0x718e, 0x157e, 0x147e, 0x20a1, + 0x020b, 0x1078, 0x69d0, 0x7810, 0x20a2, 0xa006, 0x20a2, 0x20a2, + 0x20a2, 0x20a2, 0x20a3, 0x2000, 0x0078, 0x718e, 0x157e, 0x147e, + 0x20a1, 0x020b, 0x1078, 0x69d0, 0x7810, 0x20a2, 0xa006, 0x20a2, + 0x20a2, 0x20a2, 0x20a2, 0x20a3, 0x0400, 0x0078, 0x718e, 0x157e, + 0x147e, 0x20a1, 0x020b, 0x1078, 0x69d0, 0x7810, 0x20a2, 0xa006, + 0x20a2, 0x20a2, 0x20a2, 0x20a2, 0x20a3, 0x0200, 0x1078, 0x723e, + 0x60c3, 0x0020, 0x1078, 0x6dfb, 0x147f, 0x157f, 0x007c, 0x127e, + 0x0c7e, 0x2091, 0x8000, 0x2061, 0x0100, 0x6120, 0xd1b4, 0x00c0, + 0x71a6, 0xd1bc, 0x00c0, 0x71f0, 0x0078, 0x7230, 0x2009, 0x017f, + 0x200b, 0x00a1, 0x157e, 0x007e, 0x0d7e, 0x2069, 0x0140, 0x20a9, + 0x001e, 0x2009, 0x0169, 0x6804, 0xa084, 0x4000, 0x0040, 0x71e7, + 0x6020, 0xd0b4, 0x0040, 0x71e7, 0x6024, 0xd094, 0x00c0, 0x71e7, + 0x2104, 0xa084, 0x000f, 0xa086, 0x0004, 0x00c0, 0x71e7, 0x00f0, + 0x71b3, 0x027e, 0x6198, 0xa18c, 0x00ff, 0x8107, 0x6130, 0xa18c, + 0x00ff, 0xa10d, 0x6088, 0x628c, 0x618e, 0x608b, 0xbc91, 0x6043, + 0x0001, 0x6043, 0x0000, 0x608a, 0x628e, 0x6024, 0xd094, 0x00c0, + 0x71e6, 0x6a04, 0xa294, 0x4000, 0x00c0, 0x71dd, 0x027f, 0x0d7f, + 0x007f, 0x157f, 0x2009, 0x017f, 0x200b, 0x0000, 0x0078, 0x7230, + 0x2009, 0x017f, 0x200b, 0x00a1, 0x157e, 0x007e, 0x0d7e, 0x2069, + 0x0140, 0x20a9, 0x001e, 0x2009, 0x0169, 0x6804, 0xa084, 0x4000, + 0x0040, 0x7229, 0x6020, 0xd0bc, 0x0040, 0x7229, 0x2104, 0xa084, + 0x000f, 0xa086, 0x0004, 0x00c0, 0x7229, 0x00f0, 0x71fd, 0x027e, + 0x6164, 0xa18c, 0x00ff, 0x8107, 0x6130, 0xa18c, 0x00ff, 0xa10d, + 0x6088, 0x628c, 0x608b, 0xbc91, 0x618e, 0x6043, 0x0001, 0x6043, + 0x0000, 0x608a, 0x628e, 0x6a04, 0xa294, 0x4000, 0x00c0, 0x7223, + 0x027f, 0x0d7f, 0x007f, 0x157f, 0x2009, 0x017f, 0x200b, 0x0000, + 0x0c7f, 0x127f, 0x007c, 0x0e7e, 0x2071, 0xa8b1, 0x7020, 0xa005, + 0x0040, 0x723c, 0x8001, 0x7022, 0x0e7f, 0x007c, 0x20a9, 0x0008, + 0x20a2, 0x00f0, 0x7240, 0x20a2, 0x20a2, 0x007c, 0x0f7e, 0x0e7e, + 0x0d7e, 0x0c7e, 0x077e, 0x067e, 0x007e, 0x127e, 0x2091, 0x8000, + 0x2071, 0xa8b1, 0x7614, 0x2660, 0x2678, 0x2039, 0x0001, 0x87ff, + 0x0040, 0x72e2, 0x8cff, 0x0040, 0x72e2, 0x601c, 0xa086, 0x0006, + 0x00c0, 0x72dd, 0x88ff, 0x0040, 0x726d, 0x2800, 0xac06, 0x00c0, + 0x72dd, 0x2039, 0x0000, 0x0078, 0x7278, 0x6018, 0xa206, 0x00c0, + 0x72dd, 0x85ff, 0x0040, 0x7278, 0x6020, 0xa106, 0x00c0, 0x72dd, + 0x7024, 0xac06, 0x00c0, 0x72a8, 0x2069, 0x0100, 0x68c0, 0xa005, + 0x0040, 0x72a3, 0x1078, 0x5acb, 0x6817, 0x0008, 0x68c3, 0x0000, + 0x1078, 0x7378, 0x7027, 0x0000, 0x037e, 0x2069, 0x0140, 0x6b04, + 0xa384, 0x1000, 0x0040, 0x7298, 0x6803, 0x0100, 0x6803, 0x0000, + 0x2069, 0x0100, 0x6824, 0xd084, 0x0040, 0x72a0, 0x6827, 0x0001, + 0x037f, 0x0078, 0x72a8, 0x6003, 0x0009, 0x630a, 0x0078, 0x72dd, + 0x7014, 0xac36, 0x00c0, 0x72ae, 0x660c, 0x7616, 0x7010, 0xac36, + 0x00c0, 0x72bc, 0x2c00, 0xaf36, 0x0040, 0x72ba, 0x2f00, 0x7012, + 0x0078, 0x72bc, 0x7013, 0x0000, 0x660c, 0x067e, 0x2c00, 0xaf06, + 0x0040, 0x72c5, 0x7e0e, 0x0078, 0x72c6, 0x2678, 0x89ff, 0x00c0, + 0x72d5, 0x600f, 0x0000, 0x6010, 0x2068, 0x1078, 0x8d06, 0x0040, + 0x72d3, 0x1078, 0xa1ca, 0x1078, 0x8ec6, 0x1078, 0x7233, 0x88ff, + 0x00c0, 0x72ec, 0x0c7f, 0x0078, 0x7257, 0x2c78, 0x600c, 0x2060, + 0x0078, 0x7257, 0xa006, 0x127f, 0x007f, 0x067f, 0x077f, 0x0c7f, + 0x0d7f, 0x0e7f, 0x0f7f, 0x007c, 0x6017, 0x0000, 0x0c7f, 0xa8c5, + 0x0001, 0x0078, 0x72e3, 0x0f7e, 0x0e7e, 0x0d7e, 0x0c7e, 0x067e, + 0x027e, 0x007e, 0x127e, 0x2091, 0x8000, 0x2071, 0xa8b1, 0x7638, + 0x2660, 0x2678, 0x8cff, 0x0040, 0x7367, 0x601c, 0xa086, 0x0006, + 0x00c0, 0x7362, 0x87ff, 0x0040, 0x7313, 0x2700, 0xac06, 0x00c0, + 0x7362, 0x0078, 0x731e, 0x6018, 0xa206, 0x00c0, 0x7362, 0x85ff, + 0x0040, 0x731e, 0x6020, 0xa106, 0x00c0, 0x7362, 0x703c, 0xac06, + 0x00c0, 0x7332, 0x037e, 0x2019, 0x0001, 0x1078, 0x7058, 0x7033, + 0x0000, 0x703f, 0x0000, 0x7043, 0x0000, 0x7047, 0x0000, 0x704b, + 0x0000, 0x037f, 0x7038, 0xac36, 0x00c0, 0x7338, 0x660c, 0x763a, + 0x7034, 0xac36, 0x00c0, 0x7346, 0x2c00, 0xaf36, 0x0040, 0x7344, + 0x2f00, 0x7036, 0x0078, 0x7346, 0x7037, 0x0000, 0x660c, 0x067e, + 0x2c00, 0xaf06, 0x0040, 0x734f, 0x7e0e, 0x0078, 0x7350, 0x2678, + 0x600f, 0x0000, 0x6010, 0x2068, 0x1078, 0x8d06, 0x0040, 0x735a, + 0x1078, 0xa1ca, 0x1078, 0x8ec6, 0x87ff, 0x00c0, 0x7371, 0x0c7f, + 0x0078, 0x7302, 0x2c78, 0x600c, 0x2060, 0x0078, 0x7302, 0xa006, + 0x127f, 0x007f, 0x027f, 0x067f, 0x0c7f, 0x0d7f, 0x0e7f, 0x0f7f, + 0x007c, 0x6017, 0x0000, 0x0c7f, 0xa7bd, 0x0001, 0x0078, 0x7368, + 0x0e7e, 0x2071, 0xa8b1, 0x2001, 0xa600, 0x2004, 0xa086, 0x0002, + 0x00c0, 0x7386, 0x7007, 0x0005, 0x0078, 0x7388, 0x7007, 0x0000, + 0x0e7f, 0x007c, 0x0f7e, 0x0e7e, 0x0c7e, 0x067e, 0x027e, 0x007e, + 0x127e, 0x2091, 0x8000, 0x2071, 0xa8b1, 0x2c10, 0x7638, 0x2660, + 0x2678, 0x8cff, 0x0040, 0x73c8, 0x2200, 0xac06, 0x00c0, 0x73c3, + 0x7038, 0xac36, 0x00c0, 0x73a6, 0x660c, 0x763a, 0x7034, 0xac36, + 0x00c0, 0x73b4, 0x2c00, 0xaf36, 0x0040, 0x73b2, 0x2f00, 0x7036, + 0x0078, 0x73b4, 0x7037, 0x0000, 0x660c, 0x2c00, 0xaf06, 0x0040, + 0x73bc, 0x7e0e, 0x0078, 0x73bd, 0x2678, 0x600f, 0x0000, 0xa085, + 0x0001, 0x0078, 0x73c8, 0x2c78, 0x600c, 0x2060, 0x0078, 0x7399, + 0x127f, 0x007f, 0x027f, 0x067f, 0x0c7f, 0x0e7f, 0x0f7f, 0x007c, + 0x0f7e, 0x0e7e, 0x0d7e, 0x0c7e, 0x067e, 0x007e, 0x127e, 0x2091, + 0x8000, 0x2071, 0xa8b1, 0x760c, 0x2660, 0x2678, 0x8cff, 0x0040, + 0x7469, 0x6018, 0xa080, 0x0028, 0x2004, 0xa206, 0x00c0, 0x7464, + 0x7024, 0xac06, 0x00c0, 0x740f, 0x2069, 0x0100, 0x68c0, 0xa005, + 0x0040, 0x743d, 0x1078, 0x6e0f, 0x68c3, 0x0000, 0x1078, 0x7378, + 0x7027, 0x0000, 0x037e, 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, + 0x0040, 0x7406, 0x6803, 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, + 0x6824, 0xd084, 0x0040, 0x740e, 0x6827, 0x0001, 0x037f, 0x700c, + 0xac36, 0x00c0, 0x7415, 0x660c, 0x760e, 0x7008, 0xac36, 0x00c0, + 0x7423, 0x2c00, 0xaf36, 0x0040, 0x7421, 0x2f00, 0x700a, 0x0078, + 0x7423, 0x700b, 0x0000, 0x660c, 0x067e, 0x2c00, 0xaf06, 0x0040, + 0x742c, 0x7e0e, 0x0078, 0x742d, 0x2678, 0x600f, 0x0000, 0x1078, + 0x8eec, 0x00c0, 0x7441, 0x1078, 0x28a6, 0x1078, 0x8f00, 0x00c0, + 0x745d, 0x1078, 0x7c83, 0x0078, 0x745d, 0x1078, 0x7378, 0x0078, + 0x740f, 0x1078, 0x8f00, 0x00c0, 0x7449, 0x1078, 0x7c83, 0x0078, + 0x745d, 0x6010, 0x2068, 0x1078, 0x8d06, 0x0040, 0x745d, 0x601c, + 0xa086, 0x0003, 0x00c0, 0x7471, 0x6837, 0x0103, 0x6b4a, 0x6847, + 0x0000, 0x1078, 0x4a73, 0x1078, 0x8eb9, 0x1078, 0x8ec6, 0x1078, + 0x7233, 0x0c7f, 0x0078, 0x73de, 0x2c78, 0x600c, 0x2060, 0x0078, + 0x73de, 0x127f, 0x007f, 0x067f, 0x0c7f, 0x0d7f, 0x0e7f, 0x0f7f, + 0x007c, 0x601c, 0xa086, 0x0006, 0x00c0, 0x745d, 0x1078, 0xa1ca, + 0x0078, 0x745d, 0x037e, 0x157e, 0x137e, 0x147e, 0x3908, 0xa006, + 0xa190, 0x0020, 0x221c, 0xa39e, 0x2676, 0x00c0, 0x748b, 0x8210, + 0x8000, 0x0078, 0x7482, 0xa005, 0x0040, 0x7497, 0x20a9, 0x0020, + 0x2198, 0x8211, 0xa282, 0x0020, 0x20c8, 0x20a0, 0x53a3, 0x147f, + 0x137f, 0x157f, 0x037f, 0x007c, 0x0d7e, 0x20a1, 0x020b, 0x1078, + 0x67c2, 0x20a3, 0x0200, 0x20a3, 0x0014, 0x60c3, 0x0014, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x2099, 0xa8a5, 0x20a9, 0x0004, 0x53a6, + 0x20a3, 0x0004, 0x20a3, 0x7878, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x1078, 0x6dfb, 0x0d7f, 0x007c, 0x20a1, 0x020b, 0x1078, 0x67c2, + 0x20a3, 0x0214, 0x20a3, 0x0018, 0x20a3, 0x0800, 0x7810, 0xa084, + 0xff00, 0x20a2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x7810, 0xa084, 0x00ff, 0x20a2, 0x7828, 0x20a2, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0018, 0x1078, 0x6dfb, + 0x007c, 0x0d7e, 0x017e, 0x2f68, 0x2009, 0x0035, 0x1078, 0x91bc, + 0x00c0, 0x7551, 0x20a1, 0x020b, 0x1078, 0x6731, 0x20a3, 0x1300, + 0x20a3, 0x0000, 0x7828, 0x2068, 0x681c, 0xa086, 0x0003, 0x0040, + 0x752d, 0x7818, 0xa080, 0x0028, 0x2014, 0xa286, 0x007e, 0x00c0, + 0x7507, 0x20a3, 0x00ff, 0x20a3, 0xfffe, 0x0078, 0x7542, 0xa286, + 0x007f, 0x00c0, 0x7511, 0x20a3, 0x00ff, 0x20a3, 0xfffd, 0x0078, + 0x7542, 0xd2bc, 0x0040, 0x7527, 0xa286, 0x0080, 0x00c0, 0x751e, + 0x20a3, 0x00ff, 0x20a3, 0xfffc, 0x0078, 0x7542, 0xa2e8, 0xa735, + 0x2d6c, 0x6810, 0x20a2, 0x6814, 0x20a2, 0x0078, 0x7542, 0x20a3, + 0x0000, 0x6098, 0x20a2, 0x0078, 0x7542, 0x7818, 0xa080, 0x0028, + 0x2004, 0xa082, 0x007e, 0x0048, 0x753e, 0x0d7e, 0x2069, 0xa61b, + 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x7542, 0x20a3, 0x0000, + 0x6030, 0x20a2, 0x7834, 0x20a2, 0x7838, 0x20a2, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x60c3, 0x000c, 0x1078, 0x6dfb, 0x017f, 0x0d7f, + 0x007c, 0x7817, 0x0001, 0x7803, 0x0006, 0x017f, 0x0d7f, 0x007c, + 0x0d7e, 0x027e, 0x7928, 0x2168, 0x691c, 0xa186, 0x0006, 0x0040, + 0x757a, 0xa186, 0x0003, 0x0040, 0x75d5, 0xa186, 0x0005, 0x0040, + 0x75b8, 0xa186, 0x0004, 0x0040, 0x75a8, 0xa186, 0x0008, 0x0040, + 0x75c2, 0x7807, 0x0037, 0x7813, 0x1700, 0x1078, 0x7640, 0x027f, + 0x0d7f, 0x007c, 0x1078, 0x75fd, 0x2009, 0x4000, 0x6800, 0x0079, + 0x7581, 0x7594, 0x75a2, 0x7596, 0x75a2, 0x759d, 0x7594, 0x7594, + 0x75a2, 0x75a2, 0x75a2, 0x75a2, 0x7594, 0x7594, 0x7594, 0x7594, + 0x7594, 0x75a2, 0x7594, 0x75a2, 0x1078, 0x1332, 0x6824, 0xd0e4, + 0x0040, 0x759d, 0xd0cc, 0x0040, 0x75a0, 0xa00e, 0x0078, 0x75a2, + 0x2009, 0x2000, 0x6828, 0x20a2, 0x682c, 0x20a2, 0x0078, 0x75f3, + 0x1078, 0x75fd, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x2009, 0x4000, + 0x6a00, 0xa286, 0x0002, 0x00c0, 0x75b6, 0xa00e, 0x0078, 0x75f3, + 0x1078, 0x75fd, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x2009, 0x4000, + 0x0078, 0x75f3, 0x1078, 0x75fd, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x2009, 0x4000, 0xa286, 0x0005, 0x0040, 0x75d2, 0xa286, 0x0002, + 0x00c0, 0x75d3, 0xa00e, 0x0078, 0x75f3, 0x1078, 0x75fd, 0x6810, + 0x2068, 0x697c, 0x6810, 0xa112, 0x6980, 0x6814, 0xa103, 0x20a2, + 0x22a2, 0x7928, 0xa180, 0x0000, 0x2004, 0xa08e, 0x0002, 0x0040, + 0x75f1, 0xa08e, 0x0004, 0x0040, 0x75f1, 0x2009, 0x4000, 0x0078, + 0x75f3, 0x2009, 0x0000, 0x21a2, 0x20a3, 0x0000, 0x60c3, 0x0018, + 0x1078, 0x6dfb, 0x027f, 0x0d7f, 0x007c, 0x037e, 0x047e, 0x057e, + 0x067e, 0x20a1, 0x020b, 0x1078, 0x67c2, 0xa006, 0x20a3, 0x0200, + 0x20a2, 0x7934, 0x21a2, 0x7938, 0x21a2, 0x7818, 0xa080, 0x0028, + 0x2004, 0xa092, 0x007e, 0x0048, 0x7623, 0x0d7e, 0x2069, 0xa61b, + 0x2d2c, 0x8d68, 0x2d34, 0xa0e8, 0xa735, 0x2d6c, 0x6b10, 0x6c14, + 0x0d7f, 0x0078, 0x7629, 0x2019, 0x0000, 0x6498, 0x2029, 0x0000, + 0x6630, 0x7828, 0xa080, 0x0007, 0x2004, 0xa086, 0x0003, 0x00c0, + 0x7637, 0x25a2, 0x26a2, 0x23a2, 0x24a2, 0x0078, 0x763b, 0x23a2, + 0x24a2, 0x25a2, 0x26a2, 0x067f, 0x057f, 0x047f, 0x037f, 0x007c, + 0x20a1, 0x020b, 0x1078, 0x67c2, 0x20a3, 0x0100, 0x20a3, 0x0000, + 0x20a3, 0x0009, 0x7810, 0x20a2, 0x60c3, 0x0008, 0x1078, 0x6dfb, + 0x007c, 0x20a1, 0x020b, 0x1078, 0x6728, 0x20a3, 0x1400, 0x20a3, + 0x0000, 0x7834, 0x20a2, 0x7838, 0x20a2, 0x7828, 0x20a2, 0x782c, + 0x20a2, 0x7830, 0xa084, 0x00ff, 0x8007, 0x20a2, 0x20a3, 0x0000, + 0x60c3, 0x0010, 0x1078, 0x6dfb, 0x007c, 0x20a1, 0x020b, 0x1078, + 0x67b9, 0x20a3, 0x0100, 0x20a3, 0x0000, 0x7828, 0x20a2, 0x7810, + 0x20a2, 0x60c3, 0x0008, 0x1078, 0x6dfb, 0x007c, 0x147e, 0x20a1, + 0x020b, 0x1078, 0x7689, 0x60c3, 0x0000, 0x1078, 0x6dfb, 0x147f, + 0x007c, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, + 0x2004, 0xd0bc, 0x0040, 0x76a6, 0x0d7e, 0xa0e8, 0xa735, 0x2d6c, + 0x6810, 0xa085, 0x0300, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xa61b, + 0x2da6, 0x8d68, 0x2da6, 0x0d7f, 0x0078, 0x76ae, 0x20a3, 0x0300, + 0x6298, 0x22a2, 0x20a3, 0x0000, 0x6230, 0x22a2, 0x20a3, 0x0819, + 0x20a3, 0x0000, 0x1078, 0x6dea, 0x22a2, 0x20a3, 0x0000, 0x2fa2, + 0x7a08, 0x22a2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x007c, 0x2061, + 0xad00, 0x2a70, 0x7064, 0x704a, 0x704f, 0xad00, 0x007c, 0x0e7e, + 0x127e, 0x2071, 0xa600, 0x2091, 0x8000, 0x7548, 0xa582, 0x0010, + 0x0048, 0x76f9, 0x704c, 0x2060, 0x6000, 0xa086, 0x0000, 0x0040, + 0x76e5, 0xace0, 0x0010, 0x7058, 0xac02, 0x00c8, 0x76e1, 0x0078, + 0x76d4, 0x2061, 0xad00, 0x0078, 0x76d4, 0x6003, 0x0008, 0x8529, + 0x754a, 0xaca8, 0x0010, 0x7058, 0xa502, 0x00c8, 0x76f5, 0x754e, + 0xa085, 0x0001, 0x127f, 0x0e7f, 0x007c, 0x704f, 0xad00, 0x0078, + 0x76f0, 0xa006, 0x0078, 0x76f2, 0x0e7e, 0x2071, 0xa600, 0x7548, + 0xa582, 0x0010, 0x0048, 0x772a, 0x704c, 0x2060, 0x6000, 0xa086, + 0x0000, 0x0040, 0x7717, 0xace0, 0x0010, 0x7058, 0xac02, 0x00c8, + 0x7713, 0x0078, 0x7706, 0x2061, 0xad00, 0x0078, 0x7706, 0x6003, + 0x0008, 0x8529, 0x754a, 0xaca8, 0x0010, 0x7058, 0xa502, 0x00c8, + 0x7726, 0x754e, 0xa085, 0x0001, 0x0e7f, 0x007c, 0x704f, 0xad00, + 0x0078, 0x7722, 0xa006, 0x0078, 0x7724, 0xac82, 0xad00, 0x1048, + 0x1332, 0x2001, 0xa616, 0x2004, 0xac02, 0x10c8, 0x1332, 0xa006, + 0x6006, 0x600a, 0x600e, 0x6012, 0x6016, 0x601a, 0x601f, 0x0000, + 0x6003, 0x0000, 0x6022, 0x6026, 0x602a, 0x602e, 0x6032, 0x6036, + 0x603a, 0x603e, 0x2061, 0xa600, 0x6048, 0x8000, 0x604a, 0xa086, + 0x0001, 0x0040, 0x7754, 0x007c, 0x127e, 0x2091, 0x8000, 0x1078, + 0x62d1, 0x127f, 0x0078, 0x7753, 0x601c, 0xa084, 0x000f, 0x0079, + 0x7761, 0x776a, 0x777b, 0x7797, 0x77b3, 0x920e, 0x922a, 0x9246, + 0x776a, 0x777b, 0xa186, 0x0013, 0x00c0, 0x7773, 0x1078, 0x61cd, + 0x1078, 0x62d1, 0x007c, 0xa18e, 0x0047, 0x00c0, 0x777a, 0xa016, + 0x1078, 0x15fa, 0x007c, 0x067e, 0x6000, 0xa0b2, 0x0010, 0x10c8, + 0x1332, 0x1079, 0x7785, 0x067f, 0x007c, 0x7795, 0x7b00, 0x7cb2, + 0x7795, 0x7d36, 0x77cf, 0x7795, 0x7795, 0x7a92, 0x80f6, 0x7795, + 0x7795, 0x7795, 0x7795, 0x7795, 0x7795, 0x1078, 0x1332, 0x067e, + 0x6000, 0xa0b2, 0x0010, 0x10c8, 0x1332, 0x1079, 0x77a1, 0x067f, + 0x007c, 0x77b1, 0x87c3, 0x77b1, 0x77b1, 0x77b1, 0x77b1, 0x77b1, + 0x77b1, 0x8766, 0x8951, 0x77b1, 0x87f3, 0x8879, 0x87f3, 0x8879, + 0x77b1, 0x1078, 0x1332, 0x067e, 0x6000, 0xa0b2, 0x0010, 0x10c8, + 0x1332, 0x1079, 0x77bd, 0x067f, 0x007c, 0x77cd, 0x813d, 0x820e, + 0x8368, 0x84e4, 0x77cd, 0x77cd, 0x77cd, 0x8116, 0x870e, 0x8712, + 0x77cd, 0x77cd, 0x77cd, 0x77cd, 0x8742, 0x1078, 0x1332, 0xa1b6, + 0x0015, 0x00c0, 0x77d7, 0x1078, 0x772d, 0x0078, 0x77dd, 0xa1b6, + 0x0016, 0x10c0, 0x1332, 0x1078, 0x772d, 0x007c, 0x20a9, 0x000e, + 0x2e98, 0x6010, 0x20a0, 0x53a3, 0x20a9, 0x0006, 0x3310, 0x3420, + 0x9398, 0x94a0, 0x3318, 0x3428, 0x222e, 0x2326, 0xa290, 0x0002, + 0xa5a8, 0x0002, 0xa398, 0x0002, 0xa4a0, 0x0002, 0x00f0, 0x77ec, + 0x0e7e, 0x1078, 0x8d06, 0x0040, 0x7803, 0x6010, 0x2070, 0x7007, + 0x0000, 0x7037, 0x0103, 0x0e7f, 0x1078, 0x772d, 0x007c, 0x0d7e, + 0x037e, 0x7330, 0xa386, 0x0200, 0x00c0, 0x7814, 0x6018, 0x2068, + 0x6813, 0x00ff, 0x6817, 0xfffd, 0x6010, 0xa005, 0x0040, 0x781e, + 0x2068, 0x6807, 0x0000, 0x6837, 0x0103, 0x6b32, 0x1078, 0x772d, + 0x037f, 0x0d7f, 0x007c, 0x017e, 0x20a9, 0x002a, 0xae80, 0x000c, + 0x2098, 0x6010, 0xa080, 0x0002, 0x20a0, 0x53a3, 0x20a9, 0x002a, + 0x6010, 0xa080, 0x0001, 0x2004, 0xa080, 0x0002, 0x20a0, 0x53a3, + 0x0e7e, 0x6010, 0x2004, 0x2070, 0x7037, 0x0103, 0x0e7f, 0x1078, + 0x772d, 0x017f, 0x007c, 0x0e7e, 0x0d7e, 0x603f, 0x0000, 0x2c68, + 0x017e, 0x2009, 0x0035, 0x1078, 0x91bc, 0x017f, 0x00c0, 0x785f, + 0x027e, 0x6228, 0x2268, 0x027f, 0x2071, 0xab8c, 0x6b1c, 0xa386, + 0x0003, 0x0040, 0x7863, 0xa386, 0x0006, 0x0040, 0x7867, 0x1078, + 0x772d, 0x0078, 0x7869, 0x1078, 0x786c, 0x0078, 0x7869, 0x1078, + 0x7938, 0x0d7f, 0x0e7f, 0x007c, 0x0f7e, 0x6810, 0x2078, 0xa186, + 0x0015, 0x0040, 0x791d, 0xa18e, 0x0016, 0x00c0, 0x7936, 0x700c, + 0xa08c, 0xff00, 0xa186, 0x1700, 0x0040, 0x7882, 0xa186, 0x0300, + 0x00c0, 0x78f8, 0x8fff, 0x00c0, 0x788c, 0x6800, 0xa086, 0x000f, + 0x0040, 0x78db, 0x0078, 0x7934, 0x6808, 0xa086, 0xffff, 0x00c0, + 0x7921, 0x784c, 0xa084, 0x0060, 0xa086, 0x0020, 0x00c0, 0x78a2, + 0x797c, 0x7810, 0xa106, 0x00c0, 0x7921, 0x7980, 0x7814, 0xa106, + 0x00c0, 0x7921, 0x1078, 0x8eb9, 0x6830, 0x7852, 0x784c, 0xc0dc, + 0xc0f4, 0xc0d4, 0x784e, 0x027e, 0xa00e, 0x6a14, 0x2001, 0x000a, + 0x1078, 0x5c1c, 0x7854, 0xa20a, 0x0048, 0x78b7, 0x8011, 0x7a56, + 0x82ff, 0x027f, 0x00c0, 0x78c3, 0x0c7e, 0x2d60, 0x1078, 0x8ae0, + 0x0c7f, 0x0078, 0x7934, 0x0c7e, 0x0d7e, 0x2f68, 0x6838, 0xd0fc, + 0x00c0, 0x78ce, 0x1078, 0x4353, 0x0078, 0x78d0, 0x1078, 0x4431, + 0x0d7f, 0x0c7f, 0x00c0, 0x7921, 0x0c7e, 0x2d60, 0x1078, 0x772d, + 0x0c7f, 0x0078, 0x7934, 0x0c7e, 0x1078, 0x9187, 0x0040, 0x78f1, + 0x6013, 0x0000, 0x6818, 0x601a, 0x601f, 0x0003, 0x6904, 0x0c7e, + 0x2d60, 0x1078, 0x772d, 0x0c7f, 0x1078, 0x775c, 0x0c7f, 0x0078, + 0x7934, 0x2001, 0xa8a4, 0x2004, 0x683e, 0x0c7f, 0x0078, 0x7934, + 0x7008, 0xa086, 0x000b, 0x00c0, 0x7912, 0x6018, 0x200c, 0xc1bc, + 0x2102, 0x0c7e, 0x2d60, 0x7853, 0x0003, 0x6007, 0x0085, 0x6003, + 0x000b, 0x601f, 0x0002, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0c7f, + 0x0078, 0x7934, 0x700c, 0xa086, 0x2a00, 0x00c0, 0x7921, 0x2001, + 0xa8a4, 0x2004, 0x683e, 0x0078, 0x7934, 0x1078, 0x7953, 0x0078, + 0x7936, 0x8fff, 0x1040, 0x1332, 0x0c7e, 0x0d7e, 0x2d60, 0x2f68, + 0x6837, 0x0103, 0x684b, 0x0003, 0x1078, 0x89cf, 0x1078, 0x8eb9, + 0x1078, 0x8ec6, 0x0d7f, 0x0c7f, 0x1078, 0x772d, 0x0f7f, 0x007c, + 0xa186, 0x0015, 0x00c0, 0x7942, 0x2001, 0xa8a4, 0x2004, 0x683e, + 0x0078, 0x7950, 0xa18e, 0x0016, 0x00c0, 0x7952, 0x0c7e, 0x2d00, + 0x2060, 0x1078, 0xa495, 0x1078, 0x5bc1, 0x1078, 0x772d, 0x0c7f, + 0x1078, 0x772d, 0x007c, 0x027e, 0x037e, 0x047e, 0x7228, 0x7c80, + 0x7b7c, 0xd2f4, 0x0040, 0x7962, 0x2001, 0xa8a4, 0x2004, 0x683e, + 0x0078, 0x79c6, 0x0c7e, 0x2d60, 0x1078, 0x89f3, 0x0c7f, 0x6804, + 0xa086, 0x0050, 0x00c0, 0x797a, 0x0c7e, 0x2d00, 0x2060, 0x6003, + 0x0001, 0x6007, 0x0050, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0c7f, + 0x0078, 0x79c6, 0x6800, 0xa086, 0x000f, 0x0040, 0x799c, 0x8fff, + 0x1040, 0x1332, 0x6824, 0xd0dc, 0x00c0, 0x799c, 0x6800, 0xa086, + 0x0004, 0x00c0, 0x79a1, 0x784c, 0xd0ac, 0x0040, 0x79a1, 0x784c, + 0xc0dc, 0xc0f4, 0x784e, 0x7850, 0xc0f4, 0xc0fc, 0x7852, 0x2001, + 0x0001, 0x682e, 0x0078, 0x79c0, 0x2001, 0x0007, 0x682e, 0x0078, + 0x79c0, 0x784c, 0xd0b4, 0x00c0, 0x79ae, 0xd0ac, 0x0040, 0x799c, + 0x784c, 0xd0f4, 0x00c0, 0x799c, 0x0078, 0x798f, 0xd2ec, 0x00c0, + 0x799c, 0x7024, 0xa306, 0x00c0, 0x79b9, 0x7020, 0xa406, 0x0040, + 0x799c, 0x7020, 0x6836, 0x7024, 0x683a, 0x2001, 0x0005, 0x682e, + 0x1078, 0x8ff0, 0x1078, 0x62d1, 0x0078, 0x79c8, 0x1078, 0x772d, + 0x047f, 0x037f, 0x027f, 0x007c, 0x0e7e, 0x0d7e, 0x027e, 0x6034, + 0x2068, 0x6a1c, 0xa286, 0x0007, 0x0040, 0x7a35, 0xa286, 0x0002, + 0x0040, 0x7a35, 0xa286, 0x0000, 0x0040, 0x7a35, 0x6808, 0x6338, + 0xa306, 0x00c0, 0x7a35, 0x2071, 0xab8c, 0xa186, 0x0015, 0x0040, + 0x7a2f, 0xa18e, 0x0016, 0x00c0, 0x7a02, 0x6030, 0xa084, 0x00ff, + 0xa086, 0x0001, 0x00c0, 0x7a02, 0x700c, 0xa086, 0x2a00, 0x00c0, + 0x7a02, 0x6034, 0xa080, 0x0009, 0x200c, 0xc1dd, 0xc1f5, 0x2102, + 0x0078, 0x7a2f, 0x0c7e, 0x6034, 0x2060, 0x6104, 0xa186, 0x004b, + 0x0040, 0x7a22, 0xa186, 0x004c, 0x0040, 0x7a22, 0xa186, 0x004d, + 0x0040, 0x7a22, 0xa186, 0x004e, 0x0040, 0x7a22, 0xa186, 0x0052, + 0x0040, 0x7a22, 0x6010, 0x2068, 0x1078, 0x8d06, 0x1040, 0x1332, + 0x6853, 0x0003, 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, 0x0002, + 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0c7f, 0x0078, 0x7a35, 0x6034, + 0x2068, 0x2001, 0xa8a4, 0x2004, 0x683e, 0x1078, 0x772d, 0x027f, + 0x0d7f, 0x0e7f, 0x007c, 0x0d7e, 0x20a9, 0x000e, 0x2e98, 0x6010, + 0x20a0, 0x53a3, 0xa1b6, 0x0015, 0x00c0, 0x7a73, 0x6018, 0x2068, + 0x157e, 0x037e, 0x027e, 0xae90, 0x000c, 0xa290, 0x0004, 0x20a9, + 0x0004, 0xad98, 0x000a, 0x1078, 0x80de, 0x027f, 0x037f, 0x157f, + 0x00c0, 0x7a76, 0x157e, 0x037e, 0x027e, 0xae90, 0x000c, 0xa290, + 0x0008, 0x20a9, 0x0004, 0xad98, 0x0006, 0x1078, 0x80de, 0x027f, + 0x037f, 0x157f, 0x00c0, 0x7a76, 0x7038, 0x680a, 0x703c, 0x680e, + 0x6800, 0xc08d, 0x6802, 0x0d7f, 0x0078, 0x77f8, 0x1078, 0x2880, + 0x0c7e, 0x1078, 0x76c7, 0x2f00, 0x601a, 0x6013, 0x0000, 0x601f, + 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x2001, 0x0007, 0x1078, + 0x4502, 0x1078, 0x4535, 0x1078, 0x5dd7, 0x1078, 0x62d1, 0x0c7f, + 0x0078, 0x7a73, 0x2100, 0xa1b2, 0x0044, 0x10c8, 0x1332, 0xa1b2, + 0x0040, 0x00c8, 0x7af7, 0x0079, 0x7a9d, 0x7aeb, 0x7adf, 0x7aeb, + 0x7aeb, 0x7aeb, 0x7aeb, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, + 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, + 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, + 0x7add, 0x7add, 0x7add, 0x7add, 0x7aeb, 0x7add, 0x7aeb, 0x7aeb, + 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7aeb, 0x7add, 0x7add, + 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7aeb, + 0x7aeb, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, 0x7add, + 0x7add, 0x7add, 0x7aeb, 0x7add, 0x7add, 0x1078, 0x1332, 0x6003, + 0x0001, 0x6106, 0x1078, 0x5dd7, 0x127e, 0x2091, 0x8000, 0x1078, + 0x62d1, 0x127f, 0x007c, 0x6003, 0x0001, 0x6106, 0x1078, 0x5dd7, + 0x127e, 0x2091, 0x8000, 0x1078, 0x62d1, 0x127f, 0x007c, 0x2600, + 0x0079, 0x7afa, 0x7afe, 0x7afe, 0x7afe, 0x7aeb, 0x1078, 0x1332, + 0x6004, 0xa0b2, 0x0044, 0x10c8, 0x1332, 0xa1b6, 0x0013, 0x00c0, + 0x7b10, 0xa0b2, 0x0040, 0x00c8, 0x7c79, 0x2008, 0x0079, 0x7bbf, + 0xa1b6, 0x0027, 0x00c0, 0x7b7c, 0x1078, 0x61cd, 0x6004, 0x1078, + 0x8eec, 0x0040, 0x7b2d, 0x1078, 0x8f00, 0x0040, 0x7b74, 0xa08e, + 0x0021, 0x0040, 0x7b78, 0xa08e, 0x0022, 0x0040, 0x7b74, 0xa08e, + 0x003d, 0x0040, 0x7b78, 0x0078, 0x7b6f, 0x1078, 0x28a6, 0x2001, + 0x0007, 0x1078, 0x4502, 0x6018, 0xa080, 0x0028, 0x200c, 0x1078, + 0x7c83, 0xa186, 0x007e, 0x00c0, 0x7b42, 0x2001, 0xa633, 0x2014, + 0xc285, 0x2202, 0x017e, 0x027e, 0x037e, 0x2110, 0x027e, 0x2019, + 0x0028, 0x1078, 0x73d0, 0x027f, 0x1078, 0xa4f1, 0x037f, 0x027f, + 0x017f, 0x017e, 0x027e, 0x037e, 0x2110, 0x2019, 0x0028, 0x1078, + 0x5f01, 0x077e, 0x2039, 0x0000, 0x1078, 0x5e0a, 0x0c7e, 0x6018, + 0xa065, 0x0040, 0x7b65, 0x1078, 0x47e9, 0x0c7f, 0x2c08, 0x1078, + 0x9f8b, 0x077f, 0x037f, 0x027f, 0x017f, 0x1078, 0x457f, 0x1078, + 0x772d, 0x1078, 0x62d1, 0x007c, 0x1078, 0x7c83, 0x0078, 0x7b6f, + 0x1078, 0x7ca6, 0x0078, 0x7b6f, 0xa186, 0x0014, 0x00c0, 0x7b73, + 0x1078, 0x61cd, 0x1078, 0x2880, 0x1078, 0x8eec, 0x00c0, 0x7b9b, + 0x1078, 0x28a6, 0x6018, 0xa080, 0x0028, 0x200c, 0x1078, 0x7c83, + 0xa186, 0x007e, 0x00c0, 0x7b99, 0x2001, 0xa633, 0x200c, 0xc185, + 0x2102, 0x0078, 0x7b6f, 0x1078, 0x8f00, 0x00c0, 0x7ba3, 0x1078, + 0x7c83, 0x0078, 0x7b6f, 0x6004, 0xa08e, 0x0032, 0x00c0, 0x7bb4, + 0x0e7e, 0x0f7e, 0x2071, 0xa682, 0x2079, 0x0000, 0x1078, 0x2bd7, + 0x0f7f, 0x0e7f, 0x0078, 0x7b6f, 0x6004, 0xa08e, 0x0021, 0x0040, + 0x7b9f, 0xa08e, 0x0022, 0x1040, 0x7c83, 0x0078, 0x7b6f, 0x7c01, + 0x7c03, 0x7c07, 0x7c0b, 0x7c0f, 0x7c13, 0x7bff, 0x7bff, 0x7bff, + 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, + 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, + 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7c17, 0x7c29, 0x7bff, + 0x7c2b, 0x7c29, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7c29, + 0x7c29, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, 0x7bff, + 0x7bff, 0x7c5c, 0x7c29, 0x7bff, 0x7c23, 0x7bff, 0x7bff, 0x7bff, + 0x7c25, 0x7bff, 0x7bff, 0x7bff, 0x7c29, 0x7bff, 0x7bff, 0x1078, + 0x1332, 0x0078, 0x7c29, 0x2001, 0x000b, 0x0078, 0x7c36, 0x2001, + 0x0003, 0x0078, 0x7c36, 0x2001, 0x0005, 0x0078, 0x7c36, 0x2001, + 0x0001, 0x0078, 0x7c36, 0x2001, 0x0009, 0x0078, 0x7c36, 0x1078, + 0x61cd, 0x6003, 0x0005, 0x2001, 0xa8a4, 0x2004, 0x603e, 0x1078, + 0x62d1, 0x0078, 0x7c35, 0x0078, 0x7c29, 0x0078, 0x7c29, 0x1078, + 0x4502, 0x0078, 0x7c6e, 0x1078, 0x61cd, 0x6003, 0x0004, 0x2001, + 0xa8a2, 0x2004, 0x6016, 0x1078, 0x62d1, 0x007c, 0x1078, 0x4502, + 0x1078, 0x61cd, 0x2001, 0xa8a4, 0x2004, 0x603e, 0x6003, 0x0002, + 0x037e, 0x2019, 0xa65d, 0x2304, 0xa084, 0xff00, 0x00c0, 0x7c4d, + 0x2019, 0xa8a2, 0x231c, 0x0078, 0x7c56, 0x8007, 0xa09a, 0x0004, + 0x0048, 0x7c48, 0x8003, 0x801b, 0x831b, 0xa318, 0x6316, 0x037f, + 0x1078, 0x62d1, 0x0078, 0x7c35, 0x0e7e, 0x0f7e, 0x2071, 0xa682, + 0x2079, 0x0000, 0x1078, 0x2bd7, 0x0f7f, 0x0e7f, 0x1078, 0x61cd, + 0x1078, 0x772d, 0x1078, 0x62d1, 0x0078, 0x7c35, 0x1078, 0x61cd, + 0x6003, 0x0002, 0x2001, 0xa8a2, 0x2004, 0x6016, 0x1078, 0x62d1, + 0x007c, 0x2600, 0x2008, 0x0079, 0x7c7d, 0x7c81, 0x7c81, 0x7c81, + 0x7c6e, 0x1078, 0x1332, 0x0e7e, 0x1078, 0x8d06, 0x0040, 0x7c9f, + 0x6010, 0x2070, 0x7038, 0xd0fc, 0x0040, 0x7c9f, 0x7007, 0x0000, + 0x017e, 0x6004, 0xa08e, 0x0021, 0x0040, 0x7ca1, 0xa08e, 0x003d, + 0x0040, 0x7ca1, 0x017f, 0x7037, 0x0103, 0x7033, 0x0100, 0x0e7f, + 0x007c, 0x017f, 0x1078, 0x7ca6, 0x0078, 0x7c9f, 0x0e7e, 0xacf0, + 0x0004, 0x2e74, 0x7000, 0x2070, 0x7037, 0x0103, 0x7023, 0x8001, + 0x0e7f, 0x007c, 0x0d7e, 0x6618, 0x2668, 0x6804, 0xa084, 0x00ff, + 0x0d7f, 0xa0b2, 0x000c, 0x10c8, 0x1332, 0x6604, 0xa6b6, 0x0043, + 0x00c0, 0x7cc6, 0x1078, 0x9134, 0x0078, 0x7d25, 0x6604, 0xa6b6, + 0x0033, 0x00c0, 0x7ccf, 0x1078, 0x90d8, 0x0078, 0x7d25, 0x6604, + 0xa6b6, 0x0028, 0x00c0, 0x7cd8, 0x1078, 0x8f2f, 0x0078, 0x7d25, + 0x6604, 0xa6b6, 0x0029, 0x00c0, 0x7ce1, 0x1078, 0x8f49, 0x0078, + 0x7d25, 0x6604, 0xa6b6, 0x001f, 0x00c0, 0x7cea, 0x1078, 0x77de, + 0x0078, 0x7d25, 0x6604, 0xa6b6, 0x0000, 0x00c0, 0x7cf3, 0x1078, + 0x7a3b, 0x0078, 0x7d25, 0x6604, 0xa6b6, 0x0022, 0x00c0, 0x7cfc, + 0x1078, 0x7807, 0x0078, 0x7d25, 0x6604, 0xa6b6, 0x0035, 0x00c0, + 0x7d05, 0x1078, 0x7843, 0x0078, 0x7d25, 0x6604, 0xa6b6, 0x0039, + 0x00c0, 0x7d0e, 0x1078, 0x79cc, 0x0078, 0x7d25, 0x6604, 0xa6b6, + 0x003d, 0x00c0, 0x7d17, 0x1078, 0x7823, 0x0078, 0x7d25, 0xa1b6, + 0x0015, 0x00c0, 0x7d1f, 0x1079, 0x7d2a, 0x0078, 0x7d25, 0xa1b6, + 0x0016, 0x00c0, 0x7d26, 0x1079, 0x7e7f, 0x007c, 0x1078, 0x7773, + 0x0078, 0x7d25, 0x7d4e, 0x7d51, 0x7d4e, 0x7d9c, 0x7d4e, 0x7e13, + 0x7e8b, 0x7d4e, 0x7d4e, 0x7e57, 0x7d4e, 0x7e6d, 0xa1b6, 0x0048, + 0x0040, 0x7d42, 0x20e1, 0x0005, 0x3d18, 0x3e20, 0x2c10, 0x1078, + 0x15fa, 0x007c, 0x0e7e, 0xacf0, 0x0004, 0x2e74, 0x7000, 0x2070, + 0x7037, 0x0103, 0x0e7f, 0x1078, 0x772d, 0x007c, 0x0005, 0x0005, + 0x007c, 0x0e7e, 0x2071, 0xa600, 0x7080, 0xa086, 0x0074, 0x00c0, + 0x7d85, 0x1078, 0x9f5f, 0x00c0, 0x7d77, 0x0d7e, 0x6018, 0x2068, + 0x7030, 0xd08c, 0x0040, 0x7d6a, 0x6800, 0xd0bc, 0x0040, 0x7d6a, + 0xc0c5, 0x6802, 0x1078, 0x7d89, 0x0d7f, 0x2001, 0x0006, 0x1078, + 0x4502, 0x1078, 0x28a6, 0x1078, 0x772d, 0x0078, 0x7d87, 0x2001, + 0x000a, 0x1078, 0x4502, 0x1078, 0x28a6, 0x6003, 0x0001, 0x6007, + 0x0001, 0x1078, 0x5dd7, 0x0078, 0x7d87, 0x1078, 0x7dff, 0x0e7f, + 0x007c, 0x6800, 0xd084, 0x0040, 0x7d9b, 0x2001, 0x0000, 0x1078, + 0x44ee, 0x2069, 0xa652, 0x6804, 0xd0a4, 0x0040, 0x7d9b, 0x2001, + 0x0006, 0x1078, 0x4535, 0x007c, 0x0d7e, 0x2011, 0xa620, 0x2204, + 0xa086, 0x0074, 0x00c0, 0x7dfb, 0x6018, 0x2068, 0x6aa0, 0xa286, + 0x007e, 0x00c0, 0x7daf, 0x1078, 0x7f9b, 0x0078, 0x7dfd, 0x1078, + 0x7f91, 0x6018, 0x2068, 0xa080, 0x0028, 0x2014, 0xa286, 0x0080, + 0x00c0, 0x7dd3, 0x6813, 0x00ff, 0x6817, 0xfffc, 0x6010, 0xa005, + 0x0040, 0x7dc9, 0x2068, 0x6807, 0x0000, 0x6837, 0x0103, 0x6833, + 0x0200, 0x2001, 0x0006, 0x1078, 0x4502, 0x1078, 0x28a6, 0x1078, + 0x772d, 0x0078, 0x7dfd, 0x0e7e, 0x2071, 0xa633, 0x2e04, 0xd09c, + 0x0040, 0x7dee, 0x2071, 0xab80, 0x7108, 0x720c, 0xa18c, 0x00ff, + 0x00c0, 0x7de6, 0xa284, 0xff00, 0x0040, 0x7dee, 0x6018, 0x2070, + 0x70a0, 0xd0bc, 0x00c0, 0x7dee, 0x7112, 0x7216, 0x0e7f, 0x2001, + 0x0004, 0x1078, 0x4502, 0x6003, 0x0001, 0x6007, 0x0003, 0x1078, + 0x5dd7, 0x0078, 0x7dfd, 0x1078, 0x7dff, 0x0d7f, 0x007c, 0x2001, + 0x0007, 0x1078, 0x4502, 0x2001, 0xa600, 0x2004, 0xa086, 0x0003, + 0x00c0, 0x7e0e, 0x2001, 0x0007, 0x1078, 0x4535, 0x1078, 0x28a6, + 0x1078, 0x772d, 0x007c, 0x0e7e, 0x2071, 0xa600, 0x7080, 0xa086, + 0x0014, 0x00c0, 0x7e51, 0x7000, 0xa086, 0x0003, 0x00c0, 0x7e26, + 0x6010, 0xa005, 0x00c0, 0x7e26, 0x1078, 0x3699, 0x0d7e, 0x6018, + 0x2068, 0x1078, 0x4649, 0x1078, 0x7d89, 0x0d7f, 0x1078, 0x8043, + 0x00c0, 0x7e51, 0x0d7e, 0x6018, 0x2068, 0x6890, 0x0d7f, 0xa005, + 0x0040, 0x7e51, 0x2001, 0x0006, 0x1078, 0x4502, 0x0e7e, 0x6010, + 0xa005, 0x0040, 0x7e4a, 0x2070, 0x7007, 0x0000, 0x7037, 0x0103, + 0x7033, 0x0200, 0x0e7f, 0x1078, 0x28a6, 0x1078, 0x772d, 0x0078, + 0x7e55, 0x1078, 0x7c83, 0x1078, 0x7dff, 0x0e7f, 0x007c, 0x2011, + 0xa620, 0x2204, 0xa086, 0x0014, 0x00c0, 0x7e6a, 0x2001, 0x0002, + 0x1078, 0x4502, 0x6003, 0x0001, 0x6007, 0x0001, 0x1078, 0x5dd7, + 0x0078, 0x7e6c, 0x1078, 0x7dff, 0x007c, 0x2011, 0xa620, 0x2204, + 0xa086, 0x0004, 0x00c0, 0x7e7c, 0x2001, 0x0007, 0x1078, 0x4502, + 0x1078, 0x772d, 0x0078, 0x7e7e, 0x1078, 0x7dff, 0x007c, 0x7d4e, + 0x7e97, 0x7d4e, 0x7ed2, 0x7d4e, 0x7f44, 0x7e8b, 0x7d4e, 0x7d4e, + 0x7f59, 0x7d4e, 0x7f6c, 0x6604, 0xa686, 0x0003, 0x0040, 0x7e13, + 0xa6b6, 0x001e, 0x00c0, 0x7e96, 0x1078, 0x772d, 0x007c, 0x0d7e, + 0x0c7e, 0x1078, 0x7f7f, 0x00c0, 0x7ead, 0x2001, 0x0000, 0x1078, + 0x44ee, 0x2001, 0x0002, 0x1078, 0x4502, 0x6003, 0x0001, 0x6007, + 0x0002, 0x1078, 0x5dd7, 0x0078, 0x7ecf, 0x2009, 0xab8e, 0x2104, + 0xa086, 0x0009, 0x00c0, 0x7ec2, 0x6018, 0x2068, 0x6840, 0xa084, + 0x00ff, 0xa005, 0x0040, 0x7ecd, 0x8001, 0x6842, 0x6017, 0x000a, + 0x0078, 0x7ecf, 0x2009, 0xab8f, 0x2104, 0xa084, 0xff00, 0xa086, + 0x1900, 0x00c0, 0x7ecd, 0x0078, 0x7ea1, 0x1078, 0x7dff, 0x0c7f, + 0x0d7f, 0x007c, 0x1078, 0x7f8e, 0x00c0, 0x7ee6, 0x2001, 0x0000, + 0x1078, 0x44ee, 0x2001, 0x0002, 0x1078, 0x4502, 0x6003, 0x0001, + 0x6007, 0x0002, 0x1078, 0x5dd7, 0x0078, 0x7f12, 0x1078, 0x7c83, + 0x2009, 0xab8e, 0x2134, 0xa6b4, 0x00ff, 0xa686, 0x0005, 0x0040, + 0x7f13, 0xa686, 0x000b, 0x0040, 0x7f10, 0x2009, 0xab8f, 0x2104, + 0xa084, 0xff00, 0x00c0, 0x7f00, 0xa686, 0x0009, 0x0040, 0x7f13, + 0xa086, 0x1900, 0x00c0, 0x7f10, 0xa686, 0x0009, 0x0040, 0x7f13, + 0x2001, 0x0004, 0x1078, 0x4502, 0x1078, 0x772d, 0x0078, 0x7f12, + 0x1078, 0x7dff, 0x007c, 0x0d7e, 0x6010, 0x2068, 0x1078, 0x8d06, + 0x0040, 0x7f21, 0x6838, 0xd0fc, 0x0040, 0x7f21, 0x0d7f, 0x0078, + 0x7f10, 0x6018, 0x2068, 0x6840, 0xa084, 0x00ff, 0xa005, 0x0040, + 0x7f32, 0x8001, 0x6842, 0x6017, 0x000a, 0x6007, 0x0016, 0x0d7f, + 0x0078, 0x7f12, 0x68a0, 0xa086, 0x007e, 0x00c0, 0x7f3f, 0x0e7e, + 0x2071, 0xa600, 0x1078, 0x42b8, 0x0e7f, 0x0078, 0x7f41, 0x1078, + 0x2880, 0x0d7f, 0x0078, 0x7f10, 0x1078, 0x7f8e, 0x00c0, 0x7f54, + 0x2001, 0x0004, 0x1078, 0x4502, 0x6003, 0x0001, 0x6007, 0x0003, + 0x1078, 0x5dd7, 0x0078, 0x7f58, 0x1078, 0x7c83, 0x1078, 0x7dff, + 0x007c, 0x1078, 0x7f8e, 0x00c0, 0x7f69, 0x2001, 0x0008, 0x1078, + 0x4502, 0x6003, 0x0001, 0x6007, 0x0005, 0x1078, 0x5dd7, 0x0078, + 0x7f6b, 0x1078, 0x7dff, 0x007c, 0x1078, 0x7f8e, 0x00c0, 0x7f7c, + 0x2001, 0x000a, 0x1078, 0x4502, 0x6003, 0x0001, 0x6007, 0x0001, + 0x1078, 0x5dd7, 0x0078, 0x7f7e, 0x1078, 0x7dff, 0x007c, 0x2009, + 0xab8e, 0x2104, 0xa086, 0x0003, 0x00c0, 0x7f8d, 0x2009, 0xab8f, + 0x2104, 0xa084, 0xff00, 0xa086, 0x2a00, 0x007c, 0xa085, 0x0001, + 0x007c, 0x0c7e, 0x017e, 0xac88, 0x0006, 0x2164, 0x1078, 0x45d6, + 0x017f, 0x0c7f, 0x007c, 0x0f7e, 0x0e7e, 0x0d7e, 0x037e, 0x017e, + 0x6018, 0x2068, 0x2071, 0xa633, 0x2e04, 0xa085, 0x0003, 0x2072, + 0x1078, 0x8014, 0x0040, 0x7fd9, 0x2009, 0xa633, 0x2104, 0xc0cd, + 0x200a, 0x2001, 0xa653, 0x2004, 0xd0a4, 0x0040, 0x7fc2, 0xa006, + 0x2020, 0x2009, 0x002a, 0x1078, 0xa21d, 0x2001, 0xa60c, 0x200c, + 0xc195, 0x2102, 0x2019, 0x002a, 0x2009, 0x0001, 0x1078, 0x284f, + 0x2071, 0xa600, 0x1078, 0x2677, 0x0c7e, 0x157e, 0x20a9, 0x0081, + 0x2009, 0x007f, 0x1078, 0x298e, 0x8108, 0x00f0, 0x7fd2, 0x157f, + 0x0c7f, 0x1078, 0x7f91, 0x6813, 0x00ff, 0x6817, 0xfffe, 0x2071, + 0xab80, 0x2079, 0x0100, 0x2e04, 0xa084, 0x00ff, 0x2069, 0xa61b, + 0x206a, 0x78e6, 0x007e, 0x8e70, 0x2e04, 0x2069, 0xa61c, 0x206a, + 0x78ea, 0xa084, 0xff00, 0x017f, 0xa105, 0x2009, 0xa626, 0x200a, + 0x2069, 0xab8e, 0x2071, 0xa89e, 0x6810, 0x2072, 0x6814, 0x7006, + 0x6818, 0x700a, 0x681c, 0x700e, 0x1078, 0x906e, 0x2001, 0x0006, + 0x1078, 0x4502, 0x1078, 0x28a6, 0x1078, 0x772d, 0x017f, 0x037f, + 0x0d7f, 0x0e7f, 0x0f7f, 0x007c, 0x027e, 0x037e, 0x0e7e, 0x157e, + 0x2019, 0xa626, 0x231c, 0x83ff, 0x0040, 0x803e, 0x2071, 0xab80, + 0x2e14, 0xa294, 0x00ff, 0x7004, 0xa084, 0xff00, 0xa205, 0xa306, + 0x00c0, 0x803e, 0x2011, 0xab96, 0xad98, 0x000a, 0x20a9, 0x0004, + 0x1078, 0x80de, 0x00c0, 0x803e, 0x2011, 0xab9a, 0xad98, 0x0006, + 0x20a9, 0x0004, 0x1078, 0x80de, 0x00c0, 0x803e, 0x157f, 0x0e7f, + 0x037f, 0x027f, 0x007c, 0x0e7e, 0x2071, 0xab8c, 0x7004, 0xa086, + 0x0014, 0x00c0, 0x8066, 0x7008, 0xa086, 0x0800, 0x00c0, 0x8066, + 0x700c, 0xd0ec, 0x0040, 0x8064, 0xa084, 0x0f00, 0xa086, 0x0100, + 0x00c0, 0x8064, 0x7024, 0xd0a4, 0x00c0, 0x8061, 0xd0ac, 0x0040, + 0x8064, 0xa006, 0x0078, 0x8066, 0xa085, 0x0001, 0x0e7f, 0x007c, + 0x0e7e, 0x0d7e, 0x0c7e, 0x077e, 0x057e, 0x047e, 0x027e, 0x007e, + 0x127e, 0x2091, 0x8000, 0x2029, 0xa8ba, 0x252c, 0x2021, 0xa8c0, + 0x2424, 0x2061, 0xad00, 0x2071, 0xa600, 0x7248, 0x7064, 0xa202, + 0x00c8, 0x80cc, 0x1078, 0xa242, 0x0040, 0x80c4, 0x671c, 0xa786, + 0x0001, 0x0040, 0x80c4, 0xa786, 0x0007, 0x0040, 0x80c4, 0x2500, + 0xac06, 0x0040, 0x80c4, 0x2400, 0xac06, 0x0040, 0x80c4, 0x0c7e, + 0x6000, 0xa086, 0x0004, 0x00c0, 0x809f, 0x1078, 0x1757, 0xa786, + 0x0008, 0x00c0, 0x80ae, 0x1078, 0x8f00, 0x00c0, 0x80ae, 0x0c7f, + 0x1078, 0x7c83, 0x1078, 0x8ec6, 0x0078, 0x80c4, 0x6010, 0x2068, + 0x1078, 0x8d06, 0x0040, 0x80c1, 0xa786, 0x0003, 0x00c0, 0x80d6, + 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, 0x1078, 0x4a73, 0x1078, + 0x8eb9, 0x1078, 0x8ec6, 0x0c7f, 0xace0, 0x0010, 0x7058, 0xac02, + 0x00c8, 0x80cc, 0x0078, 0x807d, 0x127f, 0x007f, 0x027f, 0x047f, + 0x057f, 0x077f, 0x0c7f, 0x0d7f, 0x0e7f, 0x007c, 0xa786, 0x0006, + 0x00c0, 0x80b8, 0x1078, 0xa1ca, 0x0078, 0x80c1, 0x220c, 0x2304, + 0xa106, 0x00c0, 0x80e9, 0x8210, 0x8318, 0x00f0, 0x80de, 0xa006, + 0x007c, 0x2304, 0xa102, 0x0048, 0x80f1, 0x2001, 0x0001, 0x0078, + 0x80f3, 0x2001, 0x0000, 0xa18d, 0x0001, 0x007c, 0x6004, 0xa08a, + 0x0044, 0x10c8, 0x1332, 0x1078, 0x8eec, 0x0040, 0x8105, 0x1078, + 0x8f00, 0x0040, 0x8112, 0x0078, 0x810b, 0x1078, 0x28a6, 0x1078, + 0x8f00, 0x0040, 0x8112, 0x1078, 0x61cd, 0x1078, 0x772d, 0x1078, + 0x62d1, 0x007c, 0x1078, 0x7c83, 0x0078, 0x810b, 0xa182, 0x0040, + 0x0079, 0x811a, 0x812d, 0x812d, 0x812d, 0x812d, 0x812d, 0x812d, + 0x812d, 0x812d, 0x812d, 0x812d, 0x812d, 0x812f, 0x812f, 0x812f, + 0x812f, 0x812d, 0x812d, 0x812d, 0x812f, 0x1078, 0x1332, 0x600b, + 0xffff, 0x6003, 0x0001, 0x6106, 0x1078, 0x5d8a, 0x127e, 0x2091, + 0x8000, 0x1078, 0x62d1, 0x127f, 0x007c, 0xa186, 0x0013, 0x00c0, + 0x8146, 0x6004, 0xa082, 0x0040, 0x0079, 0x81d1, 0xa186, 0x0027, + 0x00c0, 0x8168, 0x1078, 0x61cd, 0x1078, 0x2880, 0x0d7e, 0x6110, + 0x2168, 0x1078, 0x8d06, 0x0040, 0x8162, 0x6837, 0x0103, 0x684b, + 0x0029, 0x6847, 0x0000, 0x694c, 0xc1c5, 0x694e, 0x1078, 0x4a73, + 0x1078, 0x8eb9, 0x0d7f, 0x1078, 0x772d, 0x1078, 0x62d1, 0x007c, + 0xa186, 0x0014, 0x00c0, 0x8171, 0x6004, 0xa082, 0x0040, 0x0079, + 0x8199, 0xa186, 0x0046, 0x0040, 0x817d, 0xa186, 0x0045, 0x0040, + 0x817d, 0xa186, 0x0047, 0x10c0, 0x1332, 0x2001, 0x0109, 0x2004, + 0xd084, 0x0040, 0x8196, 0x127e, 0x2091, 0x2200, 0x007e, 0x017e, + 0x027e, 0x1078, 0x5c56, 0x027f, 0x017f, 0x007f, 0x127f, 0x6000, + 0xa086, 0x0002, 0x00c0, 0x8196, 0x0078, 0x820e, 0x1078, 0x7773, + 0x007c, 0x81ae, 0x81ac, 0x81ac, 0x81ac, 0x81ac, 0x81ac, 0x81ac, + 0x81ac, 0x81ac, 0x81ac, 0x81ac, 0x81ca, 0x81ca, 0x81ca, 0x81ca, + 0x81ac, 0x81ca, 0x81ac, 0x81ca, 0x1078, 0x1332, 0x1078, 0x61cd, + 0x0d7e, 0x6110, 0x2168, 0x1078, 0x8d06, 0x0040, 0x81c4, 0x6837, + 0x0103, 0x684b, 0x0006, 0x6847, 0x0000, 0x6850, 0xc0ec, 0x6852, + 0x1078, 0x4a73, 0x1078, 0x8eb9, 0x0d7f, 0x1078, 0x772d, 0x1078, + 0x62d1, 0x007c, 0x1078, 0x61cd, 0x1078, 0x772d, 0x1078, 0x62d1, + 0x007c, 0x81e6, 0x81e4, 0x81e4, 0x81e4, 0x81e4, 0x81e4, 0x81e4, + 0x81e4, 0x81e4, 0x81e4, 0x81e4, 0x81f8, 0x81f8, 0x81f8, 0x81f8, + 0x81e4, 0x8207, 0x81e4, 0x81f8, 0x1078, 0x1332, 0x1078, 0x61cd, + 0x2001, 0xa8a4, 0x2004, 0x603e, 0x6003, 0x0002, 0x1078, 0x62d1, + 0x6010, 0xa088, 0x0013, 0x2104, 0xa085, 0x0400, 0x200a, 0x007c, + 0x1078, 0x61cd, 0x2001, 0xa8a2, 0x2004, 0x6016, 0x2001, 0xa8a4, + 0x2004, 0x603e, 0x6003, 0x000f, 0x1078, 0x62d1, 0x007c, 0x1078, + 0x61cd, 0x1078, 0x772d, 0x1078, 0x62d1, 0x007c, 0xa182, 0x0040, + 0x0079, 0x8212, 0x8225, 0x8225, 0x8225, 0x8225, 0x8225, 0x8227, + 0x8327, 0x8359, 0x8225, 0x8225, 0x8225, 0x8225, 0x8225, 0x8225, + 0x8225, 0x8225, 0x8225, 0x8225, 0x8225, 0x1078, 0x1332, 0x0e7e, + 0x0d7e, 0x603f, 0x0000, 0x2071, 0xab80, 0x7124, 0x610a, 0x2071, + 0xab8c, 0x6110, 0x2168, 0x7614, 0xa6b4, 0x0fff, 0x86ff, 0x0040, + 0x82e9, 0xa68c, 0x0c00, 0x0040, 0x825e, 0x0f7e, 0x2c78, 0x1078, + 0x4963, 0x0f7f, 0x0040, 0x825a, 0x684c, 0xd0ac, 0x0040, 0x825a, + 0x6024, 0xd0dc, 0x00c0, 0x825a, 0x6850, 0xd0bc, 0x00c0, 0x825a, + 0x7318, 0x6814, 0xa306, 0x00c0, 0x8301, 0x731c, 0x6810, 0xa306, + 0x00c0, 0x8301, 0x7318, 0x6b62, 0x731c, 0x6b5e, 0xa68c, 0x00ff, + 0xa186, 0x0002, 0x0040, 0x8291, 0xa186, 0x0028, 0x00c0, 0x826e, + 0x1078, 0x8eda, 0x684b, 0x001c, 0x0078, 0x8293, 0xd6dc, 0x0040, + 0x828a, 0x684b, 0x0015, 0x684c, 0xd0ac, 0x0040, 0x8288, 0x6914, + 0x6a10, 0x2100, 0xa205, 0x0040, 0x8288, 0x7018, 0xa106, 0x00c0, + 0x8285, 0x701c, 0xa206, 0x0040, 0x8288, 0x6962, 0x6a5e, 0xc6dc, + 0x0078, 0x8293, 0xd6d4, 0x0040, 0x8291, 0x684b, 0x0007, 0x0078, + 0x8293, 0x684b, 0x0000, 0x6837, 0x0103, 0x6e46, 0xa01e, 0xd6c4, + 0x0040, 0x82bc, 0xa686, 0x0100, 0x00c0, 0x82a7, 0x2001, 0xab99, + 0x2004, 0xa005, 0x00c0, 0x82a7, 0xc6c4, 0x0078, 0x8236, 0x7328, + 0x732c, 0x6b56, 0x83ff, 0x0040, 0x82bc, 0xa38a, 0x0009, 0x0048, + 0x82b3, 0x2019, 0x0008, 0x037e, 0x2308, 0x2019, 0xab98, 0xad90, + 0x0019, 0x1078, 0x89e2, 0x037f, 0xd6cc, 0x0040, 0x8317, 0x7124, + 0x695a, 0x81ff, 0x0040, 0x8317, 0xa192, 0x0021, 0x00c8, 0x82d5, + 0x2071, 0xab98, 0x831c, 0x2300, 0xae18, 0xad90, 0x001d, 0x1078, + 0x89e2, 0x1078, 0x91f4, 0x0078, 0x8317, 0x6838, 0xd0fc, 0x0040, + 0x82de, 0x2009, 0x0020, 0x695a, 0x0078, 0x82c8, 0x0f7e, 0x2d78, + 0x1078, 0x897a, 0x0f7f, 0x1078, 0x91f4, 0x1078, 0x89cf, 0x0078, + 0x8319, 0x0f7e, 0x2c78, 0x1078, 0x4963, 0x0f7f, 0x0040, 0x8307, + 0x684c, 0xd0ac, 0x0040, 0x8307, 0x6024, 0xd0dc, 0x00c0, 0x8307, + 0x6850, 0xd0bc, 0x00c0, 0x8307, 0x6810, 0x6914, 0xa105, 0x0040, + 0x8307, 0x1078, 0x8fbf, 0x0d7f, 0x0e7f, 0x0078, 0x8326, 0x684b, + 0x0000, 0x6837, 0x0103, 0x6e46, 0x684c, 0xd0ac, 0x0040, 0x8317, + 0x6810, 0x6914, 0xa115, 0x0040, 0x8317, 0x1078, 0x84d5, 0x1078, + 0x4a73, 0x6218, 0x2268, 0x6a3c, 0x8211, 0x6a3e, 0x1078, 0x8f89, + 0x0d7f, 0x0e7f, 0x00c0, 0x8326, 0x1078, 0x772d, 0x007c, 0x0f7e, + 0x6003, 0x0003, 0x2079, 0xab8c, 0x7c04, 0x7b00, 0x7e0c, 0x7d08, + 0x6010, 0x2078, 0x784c, 0xd0ac, 0x0040, 0x833e, 0x6003, 0x0002, + 0x0f7f, 0x007c, 0x2130, 0x2228, 0x0078, 0x834a, 0x2400, 0x797c, + 0xa10a, 0x2300, 0x7a80, 0xa213, 0x2600, 0xa102, 0x2500, 0xa203, + 0x0048, 0x833a, 0x7c12, 0x7b16, 0x7e0a, 0x7d0e, 0x0f7f, 0x603f, + 0x0000, 0x2c10, 0x1078, 0x1cf0, 0x1078, 0x5df6, 0x1078, 0x639b, + 0x007c, 0x2001, 0xa8a4, 0x2004, 0x603e, 0x6003, 0x0004, 0x6110, + 0x20e1, 0x0005, 0x3d18, 0x3e20, 0x2c10, 0x1078, 0x15fa, 0x007c, + 0xa182, 0x0040, 0x0079, 0x836c, 0x837f, 0x837f, 0x837f, 0x837f, + 0x837f, 0x8381, 0x8424, 0x837f, 0x837f, 0x843a, 0x84ab, 0x837f, + 0x837f, 0x837f, 0x837f, 0x84ba, 0x837f, 0x837f, 0x837f, 0x1078, + 0x1332, 0x077e, 0x0f7e, 0x0e7e, 0x0d7e, 0x2071, 0xab8c, 0x6110, + 0x2178, 0x7614, 0xa6b4, 0x0fff, 0x7e46, 0x7f4c, 0xc7e5, 0x7f4e, + 0x6218, 0x2268, 0x6a3c, 0x8211, 0x6a3e, 0x86ff, 0x0040, 0x841f, + 0xa694, 0xff00, 0xa284, 0x0c00, 0x0040, 0x83a2, 0x7018, 0x7862, + 0x701c, 0x785e, 0xa284, 0x0300, 0x0040, 0x841f, 0x1078, 0x138b, + 0x1040, 0x1332, 0x2d00, 0x784a, 0x7f4c, 0xc7cd, 0x7f4e, 0x6837, + 0x0103, 0x7838, 0x683a, 0x783c, 0x683e, 0x7840, 0x6842, 0x6e46, + 0xa68c, 0x0c00, 0x0040, 0x83c0, 0x7318, 0x6b62, 0x731c, 0x6b5e, + 0xa68c, 0x00ff, 0xa186, 0x0002, 0x0040, 0x83dc, 0xa186, 0x0028, + 0x00c0, 0x83ce, 0x684b, 0x001c, 0x0078, 0x83de, 0xd6dc, 0x0040, + 0x83d5, 0x684b, 0x0015, 0x0078, 0x83de, 0xd6d4, 0x0040, 0x83dc, + 0x684b, 0x0007, 0x0078, 0x83de, 0x684b, 0x0000, 0x6f4e, 0x7850, + 0x6852, 0x7854, 0x6856, 0xa01e, 0xd6c4, 0x0040, 0x83fc, 0x7328, + 0x732c, 0x6b56, 0x83ff, 0x0040, 0x83fc, 0xa38a, 0x0009, 0x0048, + 0x83f3, 0x2019, 0x0008, 0x037e, 0x2308, 0x2019, 0xab98, 0xad90, + 0x0019, 0x1078, 0x89e2, 0x037f, 0xd6cc, 0x0040, 0x841f, 0x7124, + 0x695a, 0x81ff, 0x0040, 0x841f, 0xa192, 0x0021, 0x00c8, 0x8413, + 0x2071, 0xab98, 0x831c, 0x2300, 0xae18, 0xad90, 0x001d, 0x1078, + 0x89e2, 0x0078, 0x841f, 0x7838, 0xd0fc, 0x0040, 0x841c, 0x2009, + 0x0020, 0x695a, 0x0078, 0x8408, 0x2d78, 0x1078, 0x897a, 0x0d7f, + 0x0e7f, 0x0f7f, 0x077f, 0x007c, 0x0f7e, 0x6003, 0x0003, 0x2079, + 0xab8c, 0x7c04, 0x7b00, 0x7e0c, 0x7d08, 0x6010, 0x2078, 0x7c12, + 0x7b16, 0x7e0a, 0x7d0e, 0x0f7f, 0x2c10, 0x1078, 0x1cf0, 0x1078, + 0x6df4, 0x007c, 0x0d7e, 0x0f7e, 0x2c78, 0x1078, 0x4963, 0x0f7f, + 0x0040, 0x8446, 0x2001, 0xa8a4, 0x2004, 0x603e, 0x6003, 0x0002, + 0x1078, 0x627a, 0x1078, 0x639b, 0x6110, 0x2168, 0x694c, 0xd1e4, + 0x0040, 0x84a9, 0xd1cc, 0x0040, 0x8480, 0x6948, 0x6838, 0xd0fc, + 0x0040, 0x8478, 0x017e, 0x684c, 0x007e, 0x6850, 0x007e, 0xad90, + 0x000d, 0xa198, 0x000d, 0x2009, 0x0020, 0x157e, 0x21a8, 0x2304, + 0x2012, 0x8318, 0x8210, 0x00f0, 0x8467, 0x157f, 0x007f, 0x6852, + 0x007f, 0x684e, 0x017f, 0x2168, 0x1078, 0x13b4, 0x0078, 0x84a3, + 0x017e, 0x1078, 0x13b4, 0x0d7f, 0x1078, 0x89cf, 0x0078, 0x84a3, + 0x6837, 0x0103, 0x6944, 0xa184, 0x00ff, 0xa0b6, 0x0002, 0x0040, + 0x849f, 0xa086, 0x0028, 0x00c0, 0x8491, 0x684b, 0x001c, 0x0078, + 0x84a1, 0xd1dc, 0x0040, 0x8498, 0x684b, 0x0015, 0x0078, 0x84a1, + 0xd1d4, 0x0040, 0x849f, 0x684b, 0x0007, 0x0078, 0x84a1, 0x684b, + 0x0000, 0x1078, 0x4a73, 0x1078, 0x8f89, 0x00c0, 0x84a9, 0x1078, + 0x772d, 0x0d7f, 0x007c, 0x2019, 0x0001, 0x1078, 0x7058, 0x6003, + 0x0002, 0x2001, 0xa8a4, 0x2004, 0x603e, 0x1078, 0x627a, 0x1078, + 0x639b, 0x007c, 0x1078, 0x627a, 0x1078, 0x2880, 0x0d7e, 0x6110, + 0x2168, 0x1078, 0x8d06, 0x0040, 0x84cf, 0x6837, 0x0103, 0x684b, + 0x0029, 0x6847, 0x0000, 0x1078, 0x4a73, 0x1078, 0x8eb9, 0x0d7f, + 0x1078, 0x772d, 0x1078, 0x639b, 0x007c, 0x684b, 0x0015, 0xd1fc, + 0x0040, 0x84e1, 0x684b, 0x0007, 0x8002, 0x8000, 0x810a, 0xa189, + 0x0000, 0x6962, 0x685e, 0x007c, 0xa182, 0x0040, 0x0079, 0x84e8, + 0x84fb, 0x84fb, 0x84fb, 0x84fb, 0x84fb, 0x84fd, 0x84fb, 0x85d0, + 0x85dc, 0x84fb, 0x84fb, 0x84fb, 0x84fb, 0x84fb, 0x84fb, 0x84fb, + 0x84fb, 0x84fb, 0x84fb, 0x1078, 0x1332, 0x077e, 0x0f7e, 0x0e7e, + 0x0d7e, 0x2071, 0xab8c, 0x6110, 0x2178, 0x7614, 0xa6b4, 0x0fff, + 0x0f7e, 0x2c78, 0x1078, 0x4963, 0x0f7f, 0x0040, 0x851b, 0xa684, + 0x00ff, 0x00c0, 0x851b, 0x6024, 0xd0f4, 0x0040, 0x851b, 0x1078, + 0x8fbf, 0x0078, 0x85cb, 0x7e46, 0x7f4c, 0xc7e5, 0x7f4e, 0x6218, + 0x2268, 0x6a3c, 0x8211, 0x6a3e, 0x86ff, 0x0040, 0x85c0, 0xa694, + 0xff00, 0xa284, 0x0c00, 0x0040, 0x8531, 0x7018, 0x7862, 0x701c, + 0x785e, 0xa284, 0x0300, 0x0040, 0x85bd, 0xa686, 0x0100, 0x00c0, + 0x8543, 0x2001, 0xab99, 0x2004, 0xa005, 0x00c0, 0x8543, 0xc6c4, + 0x7e46, 0x0078, 0x8524, 0x1078, 0x138b, 0x1040, 0x1332, 0x2d00, + 0x784a, 0x7f4c, 0xa7bd, 0x0200, 0x7f4e, 0x6837, 0x0103, 0x7838, + 0x683a, 0x783c, 0x683e, 0x7840, 0x6842, 0x6e46, 0xa68c, 0x0c00, + 0x0040, 0x855e, 0x7318, 0x6b62, 0x731c, 0x6b5e, 0xa68c, 0x00ff, + 0xa186, 0x0002, 0x0040, 0x857a, 0xa186, 0x0028, 0x00c0, 0x856c, + 0x684b, 0x001c, 0x0078, 0x857c, 0xd6dc, 0x0040, 0x8573, 0x684b, + 0x0015, 0x0078, 0x857c, 0xd6d4, 0x0040, 0x857a, 0x684b, 0x0007, + 0x0078, 0x857c, 0x684b, 0x0000, 0x6f4e, 0x7850, 0x6852, 0x7854, + 0x6856, 0xa01e, 0xd6c4, 0x0040, 0x859a, 0x7328, 0x732c, 0x6b56, + 0x83ff, 0x0040, 0x859a, 0xa38a, 0x0009, 0x0048, 0x8591, 0x2019, + 0x0008, 0x037e, 0x2308, 0x2019, 0xab98, 0xad90, 0x0019, 0x1078, + 0x89e2, 0x037f, 0xd6cc, 0x0040, 0x85bd, 0x7124, 0x695a, 0x81ff, + 0x0040, 0x85bd, 0xa192, 0x0021, 0x00c8, 0x85b1, 0x2071, 0xab98, + 0x831c, 0x2300, 0xae18, 0xad90, 0x001d, 0x1078, 0x89e2, 0x0078, + 0x85bd, 0x7838, 0xd0fc, 0x0040, 0x85ba, 0x2009, 0x0020, 0x695a, + 0x0078, 0x85a6, 0x2d78, 0x1078, 0x897a, 0xd6dc, 0x00c0, 0x85c3, + 0xa006, 0x0078, 0x85c9, 0x2001, 0x0001, 0x2071, 0xab8c, 0x7218, + 0x731c, 0x1078, 0x1653, 0x0d7f, 0x0e7f, 0x0f7f, 0x077f, 0x007c, + 0x2001, 0xa8a4, 0x2004, 0x603e, 0x20e1, 0x0005, 0x3d18, 0x3e20, + 0x2c10, 0x1078, 0x15fa, 0x007c, 0x2001, 0xa8a4, 0x2004, 0x603e, + 0x0d7e, 0x6003, 0x0002, 0x6110, 0x2168, 0x694c, 0xd1e4, 0x0040, + 0x870c, 0x603f, 0x0000, 0x0f7e, 0x2c78, 0x1078, 0x4963, 0x0f7f, + 0x0040, 0x8622, 0x6814, 0x6910, 0xa115, 0x0040, 0x8622, 0x6a60, + 0xa206, 0x00c0, 0x85ff, 0x685c, 0xa106, 0x0040, 0x8622, 0x684c, + 0xc0e4, 0x684e, 0x6847, 0x0000, 0x6863, 0x0000, 0x685f, 0x0000, + 0x6024, 0xd0f4, 0x00c0, 0x8617, 0x697c, 0x6810, 0xa102, 0x603a, + 0x6980, 0x6814, 0xa103, 0x6036, 0x6024, 0xc0f5, 0x6026, 0x0d7e, + 0x6018, 0x2068, 0x683c, 0x8000, 0x683e, 0x0d7f, 0x1078, 0x8fbf, + 0x0078, 0x870c, 0x694c, 0xd1cc, 0x0040, 0x86d1, 0x6948, 0x6838, + 0xd0fc, 0x0040, 0x8689, 0x017e, 0x684c, 0x007e, 0x6850, 0x007e, + 0x0f7e, 0x2178, 0x7944, 0xa184, 0x00ff, 0xa0b6, 0x0002, 0x0040, + 0x865c, 0xa086, 0x0028, 0x00c0, 0x8643, 0x684b, 0x001c, 0x784b, + 0x001c, 0x0078, 0x8667, 0xd1dc, 0x0040, 0x8653, 0x684b, 0x0015, + 0x784b, 0x0015, 0x1078, 0x916c, 0x0040, 0x8651, 0x7944, 0xc1dc, + 0x7946, 0x0078, 0x8667, 0xd1d4, 0x0040, 0x865c, 0x684b, 0x0007, + 0x784b, 0x0007, 0x0078, 0x8667, 0x684c, 0xd0ac, 0x0040, 0x8667, + 0x6810, 0x6914, 0xa115, 0x0040, 0x8667, 0x1078, 0x84d5, 0x6848, + 0x784a, 0x6860, 0x7862, 0x685c, 0x785e, 0xad90, 0x000d, 0xaf98, + 0x000d, 0x2009, 0x0020, 0x157e, 0x21a8, 0x2304, 0x2012, 0x8318, + 0x8210, 0x00f0, 0x8675, 0x157f, 0x0f7f, 0x007f, 0x6852, 0x007f, + 0x684e, 0x1078, 0x91f4, 0x017f, 0x2168, 0x1078, 0x13b4, 0x0078, + 0x8706, 0x017e, 0x0f7e, 0x2178, 0x7944, 0xa184, 0x00ff, 0xa0b6, + 0x0002, 0x0040, 0x86b6, 0xa086, 0x0028, 0x00c0, 0x869d, 0x684b, + 0x001c, 0x784b, 0x001c, 0x0078, 0x86c1, 0xd1dc, 0x0040, 0x86ad, + 0x684b, 0x0015, 0x784b, 0x0015, 0x1078, 0x916c, 0x0040, 0x86ab, + 0x7944, 0xc1dc, 0x7946, 0x0078, 0x86c1, 0xd1d4, 0x0040, 0x86b6, + 0x684b, 0x0007, 0x784b, 0x0007, 0x0078, 0x86c1, 0x684c, 0xd0ac, + 0x0040, 0x86c1, 0x6810, 0x6914, 0xa115, 0x0040, 0x86c1, 0x1078, + 0x84d5, 0x6860, 0x7862, 0x685c, 0x785e, 0x684c, 0x784e, 0x0f7f, + 0x1078, 0x13b4, 0x0d7f, 0x1078, 0x91f4, 0x1078, 0x89cf, 0x0078, + 0x8706, 0x6837, 0x0103, 0x6944, 0xa184, 0x00ff, 0xa0b6, 0x0002, + 0x0040, 0x86f7, 0xa086, 0x0028, 0x00c0, 0x86e2, 0x684b, 0x001c, + 0x0078, 0x8704, 0xd1dc, 0x0040, 0x86f0, 0x684b, 0x0015, 0x1078, + 0x916c, 0x0040, 0x86ee, 0x6944, 0xc1dc, 0x6946, 0x0078, 0x8704, + 0xd1d4, 0x0040, 0x86f7, 0x684b, 0x0007, 0x0078, 0x8704, 0x684b, + 0x0000, 0x684c, 0xd0ac, 0x0040, 0x8704, 0x6810, 0x6914, 0xa115, + 0x0040, 0x8704, 0x1078, 0x84d5, 0x1078, 0x4a73, 0x1078, 0x8f89, + 0x00c0, 0x870c, 0x1078, 0x772d, 0x0d7f, 0x007c, 0x1078, 0x61cd, + 0x0078, 0x8714, 0x1078, 0x627a, 0x1078, 0x8d06, 0x0040, 0x8733, + 0x0d7e, 0x6110, 0x2168, 0x6837, 0x0103, 0x2009, 0xa60c, 0x210c, + 0xd18c, 0x00c0, 0x873e, 0xd184, 0x00c0, 0x873a, 0x6108, 0x694a, + 0xa18e, 0x0029, 0x00c0, 0x872e, 0x1078, 0xa4e2, 0x6847, 0x0000, + 0x1078, 0x4a73, 0x0d7f, 0x1078, 0x772d, 0x1078, 0x62d1, 0x1078, + 0x639b, 0x007c, 0x684b, 0x0004, 0x0078, 0x872e, 0x684b, 0x0004, + 0x0078, 0x872e, 0xa182, 0x0040, 0x0079, 0x8746, 0x8759, 0x8759, + 0x8759, 0x8759, 0x8759, 0x875b, 0x8759, 0x875e, 0x8759, 0x8759, + 0x8759, 0x8759, 0x8759, 0x8759, 0x8759, 0x8759, 0x8759, 0x8759, + 0x8759, 0x1078, 0x1332, 0x1078, 0x772d, 0x007c, 0x007e, 0x027e, + 0xa016, 0x1078, 0x15fa, 0x027f, 0x007f, 0x007c, 0xa182, 0x0085, + 0x0079, 0x876a, 0x8773, 0x8771, 0x8771, 0x877f, 0x8771, 0x8771, + 0x8771, 0x1078, 0x1332, 0x6003, 0x0001, 0x6106, 0x1078, 0x5d8a, + 0x127e, 0x2091, 0x8000, 0x1078, 0x62d1, 0x127f, 0x007c, 0x027e, + 0x057e, 0x0d7e, 0x0e7e, 0x2071, 0xab80, 0x7224, 0x6212, 0x7220, + 0x1078, 0x8cf2, 0x0040, 0x87a4, 0x2268, 0x6800, 0xa086, 0x0000, + 0x0040, 0x87a4, 0x6018, 0x6d18, 0xa52e, 0x00c0, 0x87a4, 0x0c7e, + 0x2d60, 0x1078, 0x89f3, 0x0c7f, 0x0040, 0x87a4, 0x6803, 0x0002, + 0x6007, 0x0086, 0x0078, 0x87a6, 0x6007, 0x0087, 0x6003, 0x0001, + 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0f7e, 0x2278, 0x1078, 0x4963, + 0x0f7f, 0x0040, 0x87be, 0x6824, 0xd0ec, 0x0040, 0x87be, 0x0c7e, + 0x2260, 0x603f, 0x0000, 0x1078, 0x8fbf, 0x0c7f, 0x0e7f, 0x0d7f, + 0x057f, 0x027f, 0x007c, 0xa186, 0x0013, 0x00c0, 0x87d4, 0x6004, + 0xa08a, 0x0085, 0x1048, 0x1332, 0xa08a, 0x008c, 0x10c8, 0x1332, + 0xa082, 0x0085, 0x0079, 0x87e3, 0xa186, 0x0027, 0x0040, 0x87dc, + 0xa186, 0x0014, 0x10c0, 0x1332, 0x1078, 0x61cd, 0x1078, 0x8ec6, + 0x1078, 0x62d1, 0x007c, 0x87ea, 0x87ec, 0x87ec, 0x87ea, 0x87ea, + 0x87ea, 0x87ea, 0x1078, 0x1332, 0x1078, 0x61cd, 0x1078, 0x8ec6, + 0x1078, 0x62d1, 0x007c, 0xa186, 0x0013, 0x00c0, 0x87fd, 0x6004, + 0xa082, 0x0085, 0x2008, 0x0078, 0x8838, 0xa186, 0x0027, 0x00c0, + 0x8820, 0x1078, 0x61cd, 0x1078, 0x2880, 0x0d7e, 0x6010, 0x2068, + 0x1078, 0x8d06, 0x0040, 0x8816, 0x6837, 0x0103, 0x6847, 0x0000, + 0x684b, 0x0029, 0x1078, 0x4a73, 0x1078, 0x8eb9, 0x0d7f, 0x1078, + 0x772d, 0x1078, 0x62d1, 0x007c, 0x1078, 0x7773, 0x0078, 0x881b, + 0xa186, 0x0014, 0x00c0, 0x881c, 0x1078, 0x61cd, 0x0d7e, 0x6010, + 0x2068, 0x1078, 0x8d06, 0x0040, 0x8816, 0x6837, 0x0103, 0x6847, + 0x0000, 0x684b, 0x0006, 0x6850, 0xc0ec, 0x6852, 0x0078, 0x8812, + 0x0079, 0x883a, 0x8843, 0x8841, 0x8841, 0x8841, 0x8841, 0x8841, + 0x885e, 0x1078, 0x1332, 0x1078, 0x61cd, 0x6030, 0xa08c, 0xff00, + 0x810f, 0xa186, 0x0039, 0x0040, 0x8851, 0xa186, 0x0035, 0x00c0, + 0x8855, 0x2001, 0xa8a2, 0x0078, 0x8857, 0x2001, 0xa8a3, 0x2004, + 0x6016, 0x6003, 0x000c, 0x1078, 0x62d1, 0x007c, 0x1078, 0x61cd, + 0x6030, 0xa08c, 0xff00, 0x810f, 0xa186, 0x0039, 0x0040, 0x886c, + 0xa186, 0x0035, 0x00c0, 0x8870, 0x2001, 0xa8a2, 0x0078, 0x8872, + 0x2001, 0xa8a3, 0x2004, 0x6016, 0x6003, 0x000e, 0x1078, 0x62d1, + 0x007c, 0xa182, 0x008c, 0x00c8, 0x8883, 0xa182, 0x0085, 0x0048, + 0x8883, 0x0079, 0x8886, 0x1078, 0x7773, 0x007c, 0x888d, 0x888d, + 0x888d, 0x888d, 0x888f, 0x88ec, 0x888d, 0x1078, 0x1332, 0x0f7e, + 0x2c78, 0x1078, 0x4963, 0x0f7f, 0x0040, 0x88a2, 0x6030, 0xa08c, + 0xff00, 0x810f, 0xa186, 0x0039, 0x0040, 0x8903, 0xa186, 0x0035, + 0x0040, 0x8903, 0x0d7e, 0x1078, 0x8d06, 0x00c0, 0x88ab, 0x1078, + 0x8eb9, 0x0078, 0x88ce, 0x6010, 0x2068, 0x684c, 0xd0e4, 0x00c0, + 0x88b3, 0x1078, 0x8eb9, 0x6837, 0x0103, 0x6850, 0xd0b4, 0x0040, + 0x88bf, 0x684b, 0x0006, 0xc0ec, 0x6852, 0x0078, 0x88ca, 0xd0bc, + 0x0040, 0x88c6, 0x684b, 0x0002, 0x0078, 0x88ca, 0x684b, 0x0005, + 0x1078, 0x8f85, 0x6847, 0x0000, 0x1078, 0x4a73, 0x2c68, 0x1078, + 0x76c7, 0x0040, 0x88e7, 0x6003, 0x0001, 0x6007, 0x001e, 0x2009, + 0xab8e, 0x210c, 0x6136, 0x2009, 0xab8f, 0x210c, 0x613a, 0x6918, + 0x611a, 0x6920, 0x6122, 0x601f, 0x0001, 0x1078, 0x5d8a, 0x2d60, + 0x1078, 0x772d, 0x0d7f, 0x007c, 0x0f7e, 0x2c78, 0x1078, 0x4963, + 0x0f7f, 0x0040, 0x8929, 0x6030, 0xa08c, 0xff00, 0x810f, 0xa186, + 0x0035, 0x0040, 0x8903, 0xa186, 0x001e, 0x0040, 0x8903, 0xa186, + 0x0039, 0x00c0, 0x8929, 0x0d7e, 0x2c68, 0x1078, 0x91bc, 0x00c0, + 0x894d, 0x1078, 0x76c7, 0x0040, 0x8926, 0x6106, 0x6003, 0x0001, + 0x601f, 0x0001, 0x6918, 0x611a, 0x6928, 0x612a, 0x692c, 0x612e, + 0x6930, 0xa18c, 0x00ff, 0x6132, 0x6934, 0x6136, 0x6938, 0x613a, + 0x6920, 0x6122, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x2d60, 0x0078, + 0x894d, 0x0d7e, 0x6010, 0x2068, 0x1078, 0x8d06, 0x0040, 0x894d, + 0x6837, 0x0103, 0x6850, 0xd0b4, 0x0040, 0x893c, 0xc0ec, 0x6852, + 0x684b, 0x0006, 0x0078, 0x8947, 0xd0bc, 0x0040, 0x8943, 0x684b, + 0x0002, 0x0078, 0x8947, 0x684b, 0x0005, 0x1078, 0x8f85, 0x6847, + 0x0000, 0x1078, 0x4a73, 0x1078, 0x8eb9, 0x0d7f, 0x1078, 0x772d, + 0x007c, 0x017e, 0x0d7e, 0x6010, 0x2068, 0x1078, 0x8d06, 0x0040, + 0x8961, 0x6837, 0x0103, 0x684b, 0x0028, 0x6847, 0x0000, 0x1078, + 0x4a73, 0x0d7f, 0x017f, 0xa186, 0x0013, 0x0040, 0x8973, 0xa186, + 0x0014, 0x0040, 0x8973, 0xa186, 0x0027, 0x0040, 0x8973, 0x1078, + 0x7773, 0x0078, 0x8979, 0x1078, 0x61cd, 0x1078, 0x8ec6, 0x1078, + 0x62d1, 0x007c, 0x057e, 0x067e, 0x0d7e, 0x0f7e, 0x2029, 0x0001, + 0xa182, 0x0101, 0x00c8, 0x8986, 0x0078, 0x8988, 0x2009, 0x0100, + 0x2130, 0x2069, 0xab98, 0x831c, 0x2300, 0xad18, 0x2009, 0x0020, + 0xaf90, 0x001d, 0x1078, 0x89e2, 0xa6b2, 0x0020, 0x7804, 0xa06d, + 0x0040, 0x899c, 0x1078, 0x13b4, 0x1078, 0x138b, 0x0040, 0x89c6, + 0x8528, 0x6837, 0x0110, 0x683b, 0x0000, 0x2d20, 0x7c06, 0xa68a, + 0x003d, 0x00c8, 0x89b2, 0x2608, 0xad90, 0x000f, 0x1078, 0x89e2, + 0x0078, 0x89c6, 0xa6b2, 0x003c, 0x2009, 0x003c, 0x2d78, 0xad90, + 0x000f, 0x1078, 0x89e2, 0x0078, 0x899c, 0x0f7f, 0x852f, 0xa5ad, + 0x0003, 0x7d36, 0xa5ac, 0x0000, 0x0078, 0x89cb, 0x0f7f, 0x852f, + 0xa5ad, 0x0003, 0x7d36, 0x0d7f, 0x067f, 0x057f, 0x007c, 0x0f7e, + 0x8dff, 0x0040, 0x89e0, 0x6804, 0xa07d, 0x0040, 0x89de, 0x6807, + 0x0000, 0x1078, 0x4a73, 0x2f68, 0x0078, 0x89d3, 0x1078, 0x4a73, + 0x0f7f, 0x007c, 0x157e, 0xa184, 0x0001, 0x0040, 0x89e8, 0x8108, + 0x810c, 0x21a8, 0x2304, 0x8007, 0x2012, 0x8318, 0x8210, 0x00f0, + 0x89ea, 0x157f, 0x007c, 0x067e, 0x127e, 0x2091, 0x8000, 0x2031, + 0x0001, 0x601c, 0xa084, 0x000f, 0x1079, 0x8a0f, 0x127f, 0x067f, + 0x007c, 0x127e, 0x2091, 0x8000, 0x067e, 0x2031, 0x0000, 0x601c, + 0xa084, 0x000f, 0x1079, 0x8a0f, 0x067f, 0x127f, 0x007c, 0x8a29, + 0x8a17, 0x8a24, 0x8a45, 0x8a17, 0x8a24, 0x8a45, 0x8a24, 0x1078, + 0x1332, 0x037e, 0x2019, 0x0010, 0x1078, 0x9dc7, 0x601f, 0x0006, + 0x6003, 0x0007, 0x037f, 0x007c, 0xa006, 0x007c, 0xa085, 0x0001, + 0x007c, 0x0d7e, 0x86ff, 0x00c0, 0x8a40, 0x6010, 0x2068, 0x1078, + 0x8d06, 0x0040, 0x8a42, 0xa00e, 0x2001, 0x0005, 0x1078, 0x4b51, + 0x1078, 0x8f85, 0x1078, 0x4a73, 0x1078, 0x772d, 0xa085, 0x0001, + 0x0d7f, 0x007c, 0xa006, 0x0078, 0x8a40, 0x6000, 0xa08a, 0x0010, + 0x10c8, 0x1332, 0x1079, 0x8a4d, 0x007c, 0x8a5d, 0x8a82, 0x8a5f, + 0x8aa5, 0x8a7e, 0x8a5d, 0x8a24, 0x8a29, 0x8a29, 0x8a24, 0x8a24, + 0x8a24, 0x8a24, 0x8a24, 0x8a24, 0x8a24, 0x1078, 0x1332, 0x86ff, + 0x00c0, 0x8a7b, 0x601c, 0xa086, 0x0006, 0x0040, 0x8a7b, 0x0d7e, + 0x6010, 0x2068, 0x1078, 0x8d06, 0x0040, 0x8a70, 0x1078, 0x8f85, + 0x0d7f, 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, 0x0002, 0x1078, + 0x5d8a, 0x1078, 0x62d1, 0xa085, 0x0001, 0x007c, 0x1078, 0x1757, + 0x0078, 0x8a5f, 0x0e7e, 0x2071, 0xa8b1, 0x7024, 0xac06, 0x00c0, + 0x8a8b, 0x1078, 0x6fc4, 0x601c, 0xa084, 0x000f, 0xa086, 0x0006, + 0x00c0, 0x8a9d, 0x087e, 0x097e, 0x2049, 0x0001, 0x2c40, 0x1078, + 0x7246, 0x097f, 0x087f, 0x0078, 0x8a9f, 0x1078, 0x6ebe, 0x0e7f, + 0x00c0, 0x8a5f, 0x1078, 0x8a24, 0x007c, 0x037e, 0x0e7e, 0x2071, + 0xa8b1, 0x703c, 0xac06, 0x00c0, 0x8ab5, 0x2019, 0x0000, 0x1078, + 0x7058, 0x0e7f, 0x037f, 0x0078, 0x8a5f, 0x1078, 0x738a, 0x0e7f, + 0x037f, 0x00c0, 0x8a5f, 0x1078, 0x8a24, 0x007c, 0x0c7e, 0x601c, + 0xa084, 0x000f, 0x1079, 0x8ac6, 0x0c7f, 0x007c, 0x8ad5, 0x8b47, + 0x8c7f, 0x8ae0, 0x8ec6, 0x8ad5, 0x9db8, 0x772d, 0x8b47, 0x1078, + 0x8f00, 0x00c0, 0x8ad5, 0x1078, 0x7c83, 0x007c, 0x1078, 0x61cd, + 0x1078, 0x62d1, 0x1078, 0x772d, 0x007c, 0x6017, 0x0001, 0x007c, + 0x1078, 0x8d06, 0x0040, 0x8ae8, 0x6010, 0xa080, 0x0019, 0x2c02, + 0x6000, 0xa08a, 0x0010, 0x10c8, 0x1332, 0x1079, 0x8af0, 0x007c, + 0x8b00, 0x8b02, 0x8b24, 0x8b36, 0x8b43, 0x8b00, 0x8ad5, 0x8ad5, + 0x8ad5, 0x8b36, 0x8b36, 0x8b00, 0x8b00, 0x8b00, 0x8b00, 0x8b40, + 0x1078, 0x1332, 0x0e7e, 0x6010, 0x2070, 0x7050, 0xc0b5, 0x7052, + 0x2071, 0xa8b1, 0x7024, 0xac06, 0x0040, 0x8b20, 0x1078, 0x6ebe, + 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, 0x0002, 0x2001, 0xa8a3, + 0x2004, 0x6016, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0e7f, 0x007c, + 0x6017, 0x0001, 0x0078, 0x8b1e, 0x0d7e, 0x6010, 0x2068, 0x6850, + 0xc0b5, 0x6852, 0x0d7f, 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, + 0x0002, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x007c, 0x0d7e, 0x6017, + 0x0001, 0x6010, 0x2068, 0x6850, 0xc0b5, 0x6852, 0x0d7f, 0x007c, + 0x1078, 0x772d, 0x007c, 0x1078, 0x1757, 0x0078, 0x8b24, 0x6000, + 0xa08a, 0x0010, 0x10c8, 0x1332, 0x1079, 0x8b4f, 0x007c, 0x8b5f, + 0x8add, 0x8b61, 0x8b5f, 0x8b61, 0x8b61, 0x8ad6, 0x8b5f, 0x8acf, + 0x8acf, 0x8b5f, 0x8b5f, 0x8b5f, 0x8b5f, 0x8b5f, 0x8b5f, 0x1078, + 0x1332, 0x0d7e, 0x6018, 0x2068, 0x6804, 0xa084, 0x00ff, 0x0d7f, + 0xa08a, 0x000c, 0x10c8, 0x1332, 0x1079, 0x8b6f, 0x007c, 0x8b7b, + 0x8c23, 0x8b7d, 0x8bbd, 0x8b7d, 0x8bbd, 0x8b7d, 0x8b8a, 0x8b7b, + 0x8bbd, 0x8b7b, 0x8ba7, 0x1078, 0x1332, 0x6004, 0xa08e, 0x0016, + 0x0040, 0x8bb8, 0xa08e, 0x0004, 0x0040, 0x8bb8, 0xa08e, 0x0002, + 0x0040, 0x8bb8, 0x6004, 0x1078, 0x8f00, 0x0040, 0x8c3e, 0xa08e, + 0x0021, 0x0040, 0x8c42, 0xa08e, 0x0022, 0x0040, 0x8c3e, 0xa08e, + 0x003d, 0x0040, 0x8c42, 0xa08e, 0x0039, 0x0040, 0x8c46, 0xa08e, + 0x0035, 0x0040, 0x8c46, 0xa08e, 0x001e, 0x0040, 0x8bba, 0xa08e, + 0x0001, 0x00c0, 0x8bb6, 0x0d7e, 0x6018, 0x2068, 0x6804, 0xa084, + 0x00ff, 0x0d7f, 0xa086, 0x0006, 0x0040, 0x8bb8, 0x1078, 0x2880, + 0x1078, 0x7c83, 0x1078, 0x8ec6, 0x007c, 0x0c7e, 0x0d7e, 0x6104, + 0xa186, 0x0016, 0x0040, 0x8c13, 0xa186, 0x0002, 0x00c0, 0x8be6, + 0x6018, 0x2068, 0x68a0, 0xd0bc, 0x00c0, 0x8c6a, 0x6840, 0xa084, + 0x00ff, 0xa005, 0x0040, 0x8be6, 0x8001, 0x6842, 0x6013, 0x0000, + 0x601f, 0x0007, 0x6017, 0x0398, 0x1078, 0x76c7, 0x0040, 0x8be6, + 0x2d00, 0x601a, 0x601f, 0x0001, 0x0078, 0x8c13, 0x0d7f, 0x0c7f, + 0x6004, 0xa08e, 0x0002, 0x00c0, 0x8c04, 0x6018, 0xa080, 0x0028, + 0x2004, 0xa086, 0x007e, 0x00c0, 0x8c04, 0x2009, 0xa633, 0x2104, + 0xc085, 0x200a, 0x0e7e, 0x2071, 0xa600, 0x1078, 0x42b8, 0x0e7f, + 0x1078, 0x7c83, 0x0078, 0x8c08, 0x1078, 0x7c83, 0x1078, 0x2880, + 0x0e7e, 0x127e, 0x2091, 0x8000, 0x1078, 0x28a6, 0x127f, 0x0e7f, + 0x1078, 0x8ec6, 0x007c, 0x2001, 0x0002, 0x1078, 0x4502, 0x6003, + 0x0001, 0x6007, 0x0002, 0x1078, 0x5dd7, 0x1078, 0x62d1, 0x0d7f, + 0x0c7f, 0x0078, 0x8c12, 0x0c7e, 0x0d7e, 0x6104, 0xa186, 0x0016, + 0x0040, 0x8c13, 0x6018, 0x2068, 0x6840, 0xa084, 0x00ff, 0xa005, + 0x0040, 0x8be6, 0x8001, 0x6842, 0x6003, 0x0001, 0x1078, 0x5dd7, + 0x1078, 0x62d1, 0x0d7f, 0x0c7f, 0x0078, 0x8c12, 0x1078, 0x7c83, + 0x0078, 0x8bba, 0x1078, 0x7ca6, 0x0078, 0x8bba, 0x0d7e, 0x2c68, + 0x6104, 0x1078, 0x91bc, 0x0d7f, 0x0040, 0x8c52, 0x1078, 0x772d, + 0x0078, 0x8c69, 0x6004, 0x8007, 0x6130, 0xa18c, 0x00ff, 0xa105, + 0x6032, 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, 0x0002, 0x6038, + 0x600a, 0x2001, 0xa8a3, 0x2004, 0x6016, 0x1078, 0x5d8a, 0x1078, + 0x62d1, 0x007c, 0x0d7f, 0x0c7f, 0x1078, 0x7c83, 0x1078, 0x2880, + 0x0e7e, 0x127e, 0x2091, 0x8000, 0x1078, 0x28a6, 0x6013, 0x0000, + 0x601f, 0x0007, 0x6017, 0x0398, 0x127f, 0x0e7f, 0x007c, 0x6000, + 0xa08a, 0x0010, 0x10c8, 0x1332, 0x1079, 0x8c87, 0x007c, 0x8c97, + 0x8c97, 0x8c97, 0x8c97, 0x8c97, 0x8c97, 0x8c97, 0x8c97, 0x8c97, + 0x8ad5, 0x8c97, 0x8add, 0x8c99, 0x8add, 0x8ca7, 0x8c97, 0x1078, + 0x1332, 0x6004, 0xa086, 0x008b, 0x0040, 0x8ca7, 0x6007, 0x008b, + 0x6003, 0x000d, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x007c, 0x1078, + 0x8eb9, 0x1078, 0x8d06, 0x0040, 0x8cdf, 0x1078, 0x2880, 0x0d7e, + 0x1078, 0x8d06, 0x0040, 0x8cc1, 0x6010, 0x2068, 0x6837, 0x0103, + 0x684b, 0x0006, 0x6847, 0x0000, 0x6850, 0xc0ed, 0x6852, 0x1078, + 0x4a73, 0x2c68, 0x1078, 0x76c7, 0x0040, 0x8ccf, 0x6818, 0x601a, + 0x0c7e, 0x2d60, 0x1078, 0x8ec6, 0x0c7f, 0x0078, 0x8cd0, 0x2d60, + 0x0d7f, 0x6013, 0x0000, 0x601f, 0x0001, 0x6007, 0x0001, 0x6003, + 0x0001, 0x1078, 0x5dd7, 0x1078, 0x62d1, 0x0078, 0x8cf1, 0x6030, + 0xa08c, 0xff00, 0x810f, 0xa186, 0x0039, 0x0040, 0x8ceb, 0xa186, + 0x0035, 0x00c0, 0x8cef, 0x1078, 0x2880, 0x0078, 0x8cc1, 0x1078, + 0x8ec6, 0x007c, 0xa284, 0x000f, 0x00c0, 0x8d03, 0xa282, 0xad00, + 0x0048, 0x8d03, 0x2001, 0xa616, 0x2004, 0xa202, 0x00c8, 0x8d03, + 0xa085, 0x0001, 0x007c, 0xa006, 0x0078, 0x8d02, 0x027e, 0x0e7e, + 0x2071, 0xa600, 0x6210, 0x705c, 0xa202, 0x0048, 0x8d18, 0x7060, + 0xa202, 0x00c8, 0x8d18, 0xa085, 0x0001, 0x0e7f, 0x027f, 0x007c, + 0xa006, 0x0078, 0x8d15, 0x0e7e, 0x0c7e, 0x037e, 0x007e, 0x127e, + 0x2091, 0x8000, 0x2061, 0xad00, 0x2071, 0xa600, 0x7348, 0x7064, + 0xa302, 0x00c8, 0x8d45, 0x601c, 0xa206, 0x00c0, 0x8d3d, 0x1078, + 0x902b, 0x0040, 0x8d3d, 0x1078, 0x8f00, 0x00c0, 0x8d39, 0x1078, + 0x7c83, 0x0c7e, 0x1078, 0x772d, 0x0c7f, 0xace0, 0x0010, 0x7058, + 0xac02, 0x00c8, 0x8d45, 0x0078, 0x8d26, 0x127f, 0x007f, 0x037f, + 0x0c7f, 0x0e7f, 0x007c, 0x0e7e, 0x0c7e, 0x017e, 0xa188, 0xa735, + 0x210c, 0x81ff, 0x0040, 0x8d59, 0x2061, 0xa9b3, 0x611a, 0x1078, + 0x2880, 0xa006, 0x0078, 0x8d5e, 0xa085, 0x0001, 0x017f, 0x0c7f, + 0x0e7f, 0x007c, 0x0c7e, 0x057e, 0x127e, 0x2091, 0x8000, 0x0c7e, + 0x1078, 0x76c7, 0x057f, 0x0040, 0x8d7b, 0x6612, 0x651a, 0x601f, + 0x0003, 0x2009, 0x004b, 0x1078, 0x775c, 0xa085, 0x0001, 0x127f, + 0x057f, 0x0c7f, 0x007c, 0xa006, 0x0078, 0x8d77, 0x0c7e, 0x057e, + 0x127e, 0x2091, 0x8000, 0x62a0, 0x0c7e, 0x1078, 0x76c7, 0x057f, + 0x0040, 0x8da9, 0x6013, 0x0000, 0x651a, 0x601f, 0x0003, 0x0c7e, + 0x2560, 0x1078, 0x47e9, 0x0c7f, 0x1078, 0x5f01, 0x077e, 0x2039, + 0x0000, 0x1078, 0x5e0a, 0x2c08, 0x1078, 0x9f8b, 0x077f, 0x2009, + 0x004c, 0x1078, 0x775c, 0xa085, 0x0001, 0x127f, 0x057f, 0x0c7f, + 0x007c, 0xa006, 0x0078, 0x8da5, 0x0f7e, 0x0c7e, 0x047e, 0x0c7e, + 0x1078, 0x76c7, 0x2c78, 0x0c7f, 0x0040, 0x8dc6, 0x7e12, 0x2c00, + 0x781a, 0x781f, 0x0003, 0x2021, 0x0005, 0x1078, 0x8e11, 0x2f60, + 0x2009, 0x004d, 0x1078, 0x775c, 0xa085, 0x0001, 0x047f, 0x0c7f, + 0x0f7f, 0x007c, 0x0f7e, 0x0c7e, 0x047e, 0x0c7e, 0x1078, 0x76c7, + 0x2c78, 0x0c7f, 0x0040, 0x8de4, 0x7e12, 0x2c00, 0x781a, 0x781f, + 0x0003, 0x2021, 0x0005, 0x1078, 0x8e11, 0x2f60, 0x2009, 0x004e, + 0x1078, 0x775c, 0xa085, 0x0001, 0x047f, 0x0c7f, 0x0f7f, 0x007c, + 0x0f7e, 0x0c7e, 0x047e, 0x0c7e, 0x1078, 0x76c7, 0x2c78, 0x0c7f, + 0x0040, 0x8e0d, 0x7e12, 0x2c00, 0x781a, 0x781f, 0x0003, 0x2021, + 0x0004, 0x1078, 0x8e11, 0x2001, 0xa89d, 0x2004, 0xd0fc, 0x0040, + 0x8e06, 0x2f60, 0x1078, 0x772d, 0x0078, 0x8e0b, 0x2f60, 0x2009, + 0x0052, 0x1078, 0x775c, 0xa085, 0x0001, 0x047f, 0x0c7f, 0x0f7f, + 0x007c, 0x097e, 0x077e, 0x127e, 0x2091, 0x8000, 0x1078, 0x4775, + 0x0040, 0x8e1e, 0x2001, 0x8e16, 0x0078, 0x8e24, 0x1078, 0x4739, + 0x0040, 0x8e2d, 0x2001, 0x8e1e, 0x007e, 0xa00e, 0x2400, 0x1078, + 0x4b51, 0x1078, 0x4a73, 0x007f, 0x007a, 0x2418, 0x1078, 0x6161, + 0x62a0, 0x087e, 0x2041, 0x0001, 0x2039, 0x0001, 0x2608, 0x1078, + 0x5f1b, 0x087f, 0x1078, 0x5e0a, 0x2f08, 0x2648, 0x1078, 0x9f8b, + 0x613c, 0x81ff, 0x1040, 0x5fdb, 0x1078, 0x62d1, 0x127f, 0x077f, + 0x097f, 0x007c, 0x0c7e, 0x127e, 0x2091, 0x8000, 0x0c7e, 0x1078, + 0x76c7, 0x017f, 0x0040, 0x8e63, 0x660a, 0x611a, 0x601f, 0x0001, + 0x2d00, 0x6012, 0x2009, 0x001f, 0x1078, 0x775c, 0xa085, 0x0001, + 0x127f, 0x0c7f, 0x007c, 0xa006, 0x0078, 0x8e60, 0x0c7e, 0x127e, + 0x2091, 0x8000, 0x0c7e, 0x1078, 0x76c7, 0x017f, 0x0040, 0x8e7f, + 0x660a, 0x611a, 0x601f, 0x0008, 0x2d00, 0x6012, 0x2009, 0x0021, + 0x1078, 0x775c, 0xa085, 0x0001, 0x127f, 0x0c7f, 0x007c, 0xa006, + 0x0078, 0x8e7c, 0x0c7e, 0x127e, 0x2091, 0x8000, 0x0c7e, 0x1078, + 0x76c7, 0x017f, 0x0040, 0x8e9b, 0x660a, 0x611a, 0x601f, 0x0001, + 0x2d00, 0x6012, 0x2009, 0x003d, 0x1078, 0x775c, 0xa085, 0x0001, + 0x127f, 0x0c7f, 0x007c, 0xa006, 0x0078, 0x8e98, 0x0c7e, 0x127e, + 0x2091, 0x8000, 0x0c7e, 0x1078, 0x76c7, 0x017f, 0x0040, 0x8eb6, + 0x611a, 0x601f, 0x0001, 0x2d00, 0x6012, 0x2009, 0x0000, 0x1078, + 0x775c, 0xa085, 0x0001, 0x127f, 0x0c7f, 0x007c, 0xa006, 0x0078, + 0x8eb3, 0x027e, 0x0d7e, 0x6218, 0x2268, 0x6a3c, 0x82ff, 0x0040, + 0x8ec3, 0x8211, 0x6a3e, 0x0d7f, 0x027f, 0x007c, 0x007e, 0x6000, + 0xa086, 0x0000, 0x0040, 0x8ed8, 0x6013, 0x0000, 0x601f, 0x0007, + 0x2001, 0xa8a3, 0x2004, 0x6016, 0x1078, 0xa495, 0x603f, 0x0000, + 0x007f, 0x007c, 0x067e, 0x0c7e, 0x0d7e, 0x2031, 0xa653, 0x2634, + 0xd6e4, 0x0040, 0x8ee8, 0x6618, 0x2660, 0x6e48, 0x1078, 0x46e7, + 0x0d7f, 0x0c7f, 0x067f, 0x007c, 0x007e, 0x017e, 0x6004, 0xa08e, + 0x0002, 0x0040, 0x8efd, 0xa08e, 0x0003, 0x0040, 0x8efd, 0xa08e, + 0x0004, 0x0040, 0x8efd, 0xa085, 0x0001, 0x017f, 0x007f, 0x007c, + 0x007e, 0x0d7e, 0x6010, 0xa06d, 0x0040, 0x8f0d, 0x6838, 0xd0fc, + 0x0040, 0x8f0d, 0xa006, 0x0078, 0x8f0f, 0xa085, 0x0001, 0x0d7f, + 0x007f, 0x007c, 0x0c7e, 0x127e, 0x2091, 0x8000, 0x0c7e, 0x1078, + 0x76c7, 0x017f, 0x0040, 0x8f2c, 0x611a, 0x601f, 0x0001, 0x2d00, + 0x6012, 0x1078, 0x2880, 0x2009, 0x0028, 0x1078, 0x775c, 0xa085, + 0x0001, 0x127f, 0x0c7f, 0x007c, 0xa006, 0x0078, 0x8f29, 0xa186, + 0x0015, 0x00c0, 0x8f44, 0x2011, 0xa620, 0x2204, 0xa086, 0x0074, + 0x00c0, 0x8f44, 0x1078, 0x7f91, 0x6003, 0x0001, 0x6007, 0x0029, + 0x1078, 0x5dd7, 0x0078, 0x8f48, 0x1078, 0x7c83, 0x1078, 0x772d, + 0x007c, 0xa186, 0x0016, 0x00c0, 0x8f53, 0x2001, 0x0004, 0x1078, + 0x4502, 0x0078, 0x8f74, 0xa186, 0x0015, 0x00c0, 0x8f78, 0x2011, + 0xa620, 0x2204, 0xa086, 0x0014, 0x00c0, 0x8f78, 0x0d7e, 0x6018, + 0x2068, 0x1078, 0x4649, 0x0d7f, 0x1078, 0x8043, 0x00c0, 0x8f78, + 0x0d7e, 0x6018, 0x2068, 0x6890, 0x0d7f, 0xa005, 0x0040, 0x8f78, + 0x2001, 0x0006, 0x1078, 0x4502, 0x1078, 0x77f8, 0x0078, 0x8f7c, + 0x1078, 0x7c83, 0x1078, 0x772d, 0x007c, 0x6848, 0xa086, 0x0005, + 0x00c0, 0x8f84, 0x1078, 0x8f85, 0x007c, 0x6850, 0xc0ad, 0x6852, + 0x007c, 0x0e7e, 0x2071, 0xab8c, 0x7014, 0xd0e4, 0x0040, 0x8f9a, + 0x6013, 0x0000, 0x6003, 0x0001, 0x6007, 0x0050, 0x1078, 0x5d8a, + 0x1078, 0x62d1, 0x0e7f, 0x007c, 0x0c7e, 0x0f7e, 0x2c78, 0x1078, + 0x4963, 0x0f7f, 0x0040, 0x8fa9, 0x601c, 0xa084, 0x000f, 0x1079, + 0x8fab, 0x0c7f, 0x007c, 0x8ad5, 0x8fb6, 0x8fb9, 0x8fbc, 0xa25d, + 0xa279, 0xa27c, 0x8ad5, 0x8ad5, 0x1078, 0x1332, 0x0005, 0x0005, + 0x007c, 0x0005, 0x0005, 0x007c, 0x1078, 0x8fbf, 0x007c, 0x0f7e, + 0x2c78, 0x1078, 0x4963, 0x0040, 0x8fee, 0x1078, 0x76c7, 0x00c0, + 0x8fcf, 0x2001, 0xa8a4, 0x2004, 0x783e, 0x0078, 0x8fee, 0x7818, + 0x601a, 0x781c, 0xa086, 0x0003, 0x0040, 0x8fdc, 0x7808, 0x6036, + 0x2f00, 0x603a, 0x0078, 0x8fe0, 0x7808, 0x603a, 0x2f00, 0x6036, + 0x602a, 0x601f, 0x0001, 0x6007, 0x0035, 0x6003, 0x0001, 0x7920, + 0x6122, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x2f60, 0x0f7f, 0x007c, + 0x017e, 0x0f7e, 0x682c, 0x6032, 0xa08e, 0x0001, 0x0040, 0x9001, + 0xa086, 0x0005, 0x0040, 0x9005, 0xa006, 0x602a, 0x602e, 0x0078, + 0x9016, 0x6824, 0xc0f4, 0xc0d5, 0x6826, 0x6810, 0x2078, 0x787c, + 0x6938, 0xa102, 0x7880, 0x6934, 0xa103, 0x00c8, 0x8ffc, 0x6834, + 0x602a, 0x6838, 0xa084, 0xfffc, 0x683a, 0x602e, 0x2d00, 0x6036, + 0x6808, 0x603a, 0x6918, 0x611a, 0x6920, 0x6122, 0x601f, 0x0001, + 0x6007, 0x0039, 0x6003, 0x0001, 0x1078, 0x5d8a, 0x6803, 0x0002, + 0x0f7f, 0x017f, 0x007c, 0x007e, 0x017e, 0x6004, 0xa08e, 0x0034, + 0x0040, 0x9050, 0xa08e, 0x0035, 0x0040, 0x9050, 0xa08e, 0x0036, + 0x0040, 0x9050, 0xa08e, 0x0037, 0x0040, 0x9050, 0xa08e, 0x0038, + 0x0040, 0x9050, 0xa08e, 0x0039, 0x0040, 0x9050, 0xa08e, 0x003a, + 0x0040, 0x9050, 0xa08e, 0x003b, 0x0040, 0x9050, 0xa085, 0x0001, + 0x017f, 0x007f, 0x007c, 0x0f7e, 0x2c78, 0x1078, 0x4963, 0x00c0, + 0x905d, 0xa085, 0x0001, 0x0078, 0x906c, 0x6024, 0xd0f4, 0x00c0, + 0x906b, 0xc0f5, 0x6026, 0x6010, 0x2078, 0x7828, 0x603a, 0x782c, + 0x6036, 0x1078, 0x1757, 0xa006, 0x0f7f, 0x007c, 0x007e, 0x017e, + 0x027e, 0x037e, 0x0e7e, 0x2001, 0xa89e, 0x200c, 0x8000, 0x2014, + 0x2001, 0x0032, 0x1078, 0x5c1c, 0x2001, 0xa8a2, 0x82ff, 0x00c0, + 0x9083, 0x2011, 0x0014, 0x2202, 0x2001, 0xa8a0, 0x200c, 0x8000, + 0x2014, 0x2071, 0xa88d, 0x711a, 0x721e, 0x2001, 0x0064, 0x1078, + 0x5c1c, 0x2001, 0xa8a3, 0x82ff, 0x00c0, 0x9098, 0x2011, 0x0014, + 0x2202, 0x2009, 0xa8a4, 0xa280, 0x000a, 0x200a, 0x1078, 0x498b, + 0x0e7f, 0x037f, 0x027f, 0x017f, 0x007f, 0x007c, 0x007e, 0x0e7e, + 0x2001, 0xa8a2, 0x2003, 0x0028, 0x2001, 0xa8a3, 0x2003, 0x0014, + 0x2071, 0xa88d, 0x701b, 0x0000, 0x701f, 0x07d0, 0x2001, 0xa8a4, + 0x2003, 0x001e, 0x0e7f, 0x007f, 0x007c, 0x0c7e, 0x127e, 0x2091, + 0x8000, 0x0c7e, 0x1078, 0x76c7, 0x017f, 0x0040, 0x90d5, 0x611a, + 0x601f, 0x0001, 0x2d00, 0x6012, 0x2009, 0x0033, 0x1078, 0x775c, + 0xa085, 0x0001, 0x127f, 0x0c7f, 0x007c, 0xa006, 0x0078, 0x90d2, + 0x0d7e, 0x0e7e, 0x0f7e, 0x2071, 0xa600, 0xa186, 0x0015, 0x00c0, + 0x9107, 0x7080, 0xa086, 0x0018, 0x00c0, 0x9107, 0x6010, 0x2068, + 0x6a3c, 0xd2e4, 0x00c0, 0x90fb, 0x2c78, 0x1078, 0x6490, 0x0040, + 0x910f, 0x706c, 0x6a50, 0xa206, 0x00c0, 0x9103, 0x7070, 0x6a54, + 0xa206, 0x00c0, 0x9103, 0x6218, 0xa290, 0x0028, 0x2214, 0x2009, + 0x0000, 0x1078, 0x28c8, 0x1078, 0x77f8, 0x0078, 0x910b, 0x1078, + 0x7c83, 0x1078, 0x772d, 0x0f7f, 0x0e7f, 0x0d7f, 0x007c, 0x7050, + 0xa080, 0x29c0, 0x2004, 0x6a54, 0xa206, 0x0040, 0x90fb, 0x0078, + 0x9103, 0x0c7e, 0x127e, 0x2091, 0x8000, 0x0c7e, 0x1078, 0x76c7, + 0x017f, 0x0040, 0x9131, 0x611a, 0x601f, 0x0001, 0x2d00, 0x6012, + 0x2009, 0x0043, 0x1078, 0x775c, 0xa085, 0x0001, 0x127f, 0x0c7f, + 0x007c, 0xa006, 0x0078, 0x912e, 0x0d7e, 0x0e7e, 0x0f7e, 0x2071, + 0xa600, 0xa186, 0x0015, 0x00c0, 0x915a, 0x7080, 0xa086, 0x0004, + 0x00c0, 0x915a, 0x6010, 0xa0e8, 0x000f, 0x2c78, 0x1078, 0x6490, + 0x0040, 0x9162, 0x706c, 0x6a08, 0xa206, 0x00c0, 0x9156, 0x7070, + 0x6a0c, 0xa206, 0x00c0, 0x9156, 0x1078, 0x2880, 0x1078, 0x77f8, + 0x0078, 0x915e, 0x1078, 0x7c83, 0x1078, 0x772d, 0x0f7f, 0x0e7f, + 0x0d7f, 0x007c, 0x7050, 0xa080, 0x29c0, 0x2004, 0x6a0c, 0xa206, + 0x0040, 0x9154, 0x0078, 0x9156, 0x017e, 0x027e, 0x684c, 0xd0ac, + 0x0040, 0x9184, 0x6914, 0x6a10, 0x2100, 0xa205, 0x0040, 0x9184, + 0x6860, 0xa106, 0x00c0, 0x9180, 0x685c, 0xa206, 0x0040, 0x9184, + 0x6962, 0x6a5e, 0xa085, 0x0001, 0x027f, 0x017f, 0x007c, 0x0e7e, + 0x127e, 0x2071, 0xa600, 0x2091, 0x8000, 0x7548, 0xa582, 0x0001, + 0x0048, 0x91b9, 0x704c, 0x2060, 0x6000, 0xa086, 0x0000, 0x0040, + 0x91a5, 0xace0, 0x0010, 0x7058, 0xac02, 0x00c8, 0x91a1, 0x0078, + 0x9194, 0x2061, 0xad00, 0x0078, 0x9194, 0x6003, 0x0008, 0x8529, + 0x754a, 0xaca8, 0x0010, 0x7058, 0xa502, 0x00c8, 0x91b5, 0x754e, + 0xa085, 0x0001, 0x127f, 0x0e7f, 0x007c, 0x704f, 0xad00, 0x0078, + 0x91b0, 0xa006, 0x0078, 0x91b2, 0x0c7e, 0x027e, 0x017e, 0xa186, + 0x0035, 0x0040, 0x91c6, 0x6a34, 0x0078, 0x91c7, 0x6a28, 0x1078, + 0x8cf2, 0x0040, 0x91f0, 0x2260, 0x611c, 0xa186, 0x0003, 0x0040, + 0x91d5, 0xa186, 0x0006, 0x00c0, 0x91ec, 0x6834, 0xa206, 0x0040, + 0x91e4, 0x6838, 0xa206, 0x00c0, 0x91ec, 0x6108, 0x6834, 0xa106, + 0x00c0, 0x91ec, 0x0078, 0x91e9, 0x6008, 0x6938, 0xa106, 0x00c0, + 0x91ec, 0x6018, 0x6918, 0xa106, 0x017f, 0x027f, 0x0c7f, 0x007c, + 0xa085, 0x0001, 0x0078, 0x91ec, 0x6944, 0xd1cc, 0x0040, 0x920d, + 0xa18c, 0x00ff, 0xa18e, 0x0002, 0x00c0, 0x920d, 0xad88, 0x001e, + 0x210c, 0xa18c, 0x0f00, 0x810f, 0xa18e, 0x0001, 0x00c0, 0x920d, + 0x6810, 0x6914, 0xa115, 0x10c0, 0x84d5, 0x007c, 0x067e, 0x6000, + 0xa0b2, 0x0010, 0x10c8, 0x1332, 0x1079, 0x9218, 0x067f, 0x007c, + 0x9228, 0x96df, 0x97fb, 0x9228, 0x9228, 0x9228, 0x9228, 0x9228, + 0x9262, 0x988e, 0x9228, 0x9228, 0x9228, 0x9228, 0x9228, 0x9228, + 0x1078, 0x1332, 0x067e, 0x6000, 0xa0b2, 0x0010, 0x10c8, 0x1332, + 0x1079, 0x9234, 0x067f, 0x007c, 0x9244, 0x9d53, 0x9244, 0x9244, + 0x9244, 0x9244, 0x9244, 0x9244, 0x9d11, 0x9da1, 0x9244, 0xa3b0, + 0xa3e4, 0xa3b0, 0xa3e4, 0x9244, 0x1078, 0x1332, 0x067e, 0x6000, + 0xa0b2, 0x0010, 0x10c8, 0x1332, 0x1079, 0x9250, 0x067f, 0x007c, + 0x9260, 0x99eb, 0x9ac7, 0x9af5, 0x9b70, 0x9260, 0x9c76, 0x9c1e, + 0x989a, 0x9ce5, 0x9cfb, 0x9260, 0x9260, 0x9260, 0x9260, 0x9260, + 0x1078, 0x1332, 0xa1b2, 0x0044, 0x10c8, 0x1332, 0x2100, 0x0079, + 0x9269, 0x92a9, 0x9498, 0x92a9, 0x92a9, 0x92a9, 0x94a0, 0x92a9, + 0x92a9, 0x92a9, 0x92a9, 0x92a9, 0x92a9, 0x92a9, 0x92a9, 0x92a9, + 0x92a9, 0x92a9, 0x92a9, 0x92a9, 0x92a9, 0x92a9, 0x92a9, 0x92a9, + 0x92ab, 0x9311, 0x9320, 0x9377, 0x9396, 0x9415, 0x9485, 0x92a9, + 0x92a9, 0x94a4, 0x92a9, 0x92a9, 0x94b7, 0x94c2, 0x92a9, 0x92a9, + 0x92a9, 0x92a9, 0x92a9, 0x94fa, 0x92a9, 0x92a9, 0x9509, 0x92a9, + 0x92a9, 0x92a9, 0x92a9, 0x92a9, 0x92a9, 0x9522, 0x92a9, 0x92a9, + 0x92a9, 0x95af, 0x92a9, 0x92a9, 0x92a9, 0x92a9, 0x92a9, 0x92a9, + 0x9629, 0x1078, 0x1332, 0x1078, 0x4967, 0x00c0, 0x92bb, 0x2001, + 0xa633, 0x2004, 0xd0cc, 0x00c0, 0x92bb, 0xa084, 0x0009, 0xa086, + 0x0008, 0x00c0, 0x92c3, 0x6007, 0x0009, 0x602b, 0x0009, 0x6013, + 0x0000, 0x0078, 0x9493, 0x1078, 0x4957, 0x0e7e, 0x0c7e, 0x037e, + 0x027e, 0x017e, 0x6218, 0x2270, 0x72a0, 0x027e, 0x2019, 0x0029, + 0x1078, 0x5f01, 0x077e, 0x2039, 0x0000, 0x1078, 0x5e0a, 0x2c08, + 0x1078, 0x9f8b, 0x077f, 0x017f, 0x2e60, 0x1078, 0x47e9, 0x017f, + 0x027f, 0x037f, 0x0c7f, 0x0e7f, 0x6618, 0x0c7e, 0x2660, 0x1078, + 0x45d6, 0x0c7f, 0xa6b0, 0x0001, 0x2634, 0xa684, 0x00ff, 0xa082, + 0x0006, 0x0048, 0x9303, 0x1078, 0x9ebf, 0x00c0, 0x9371, 0x1078, + 0x9e50, 0x00c0, 0x92ff, 0x6007, 0x0008, 0x0078, 0x9493, 0x6007, + 0x0009, 0x0078, 0x9493, 0x1078, 0xa09f, 0x0040, 0x930d, 0x1078, + 0x9ebf, 0x0040, 0x92f7, 0x0078, 0x9371, 0x6013, 0x1900, 0x0078, + 0x92ff, 0x1078, 0x29bb, 0x00c0, 0x9664, 0x6106, 0x1078, 0x9e05, + 0x6007, 0x0006, 0x0078, 0x9493, 0x6007, 0x0007, 0x0078, 0x9493, + 0x1078, 0xa41c, 0x00c0, 0x9664, 0x1078, 0x29bb, 0x00c0, 0x9664, + 0x0d7e, 0x6618, 0x2668, 0x6e04, 0xa684, 0x00ff, 0xa082, 0x0006, + 0x00c8, 0x9336, 0x2001, 0x0001, 0x1078, 0x44ee, 0xa6b4, 0xff00, + 0x8637, 0xa686, 0x0006, 0x0040, 0x9353, 0xa686, 0x0004, 0x0040, + 0x9353, 0x6e04, 0xa6b4, 0x00ff, 0xa686, 0x0006, 0x0040, 0x9353, + 0xa686, 0x0004, 0x0040, 0x9353, 0xa686, 0x0005, 0x0040, 0x9353, + 0x0d7f, 0x0078, 0x9371, 0x1078, 0x9f25, 0x00c0, 0x936c, 0xa686, + 0x0006, 0x00c0, 0x9365, 0x027e, 0x6218, 0xa290, 0x0028, 0x2214, + 0x2009, 0x0000, 0x1078, 0x28c8, 0x027f, 0x1078, 0x4649, 0x6007, + 0x000a, 0x0d7f, 0x0078, 0x9493, 0x6007, 0x000b, 0x0d7f, 0x0078, + 0x9493, 0x1078, 0x2880, 0x6007, 0x0001, 0x0078, 0x9493, 0x1078, + 0xa41c, 0x00c0, 0x9664, 0x1078, 0x29bb, 0x00c0, 0x9664, 0x6618, + 0x0d7e, 0x2668, 0x6e04, 0x0d7f, 0xa686, 0x0707, 0x0040, 0x9371, + 0x027e, 0x6218, 0xa290, 0x0028, 0x2214, 0x2009, 0x0000, 0x1078, + 0x28c8, 0x027f, 0x6007, 0x000c, 0x0078, 0x9493, 0x1078, 0x4967, + 0x00c0, 0x93a3, 0x2001, 0xa633, 0x2004, 0xa084, 0x0009, 0xa086, + 0x0008, 0x00c0, 0x93ab, 0x6007, 0x0009, 0x602b, 0x0009, 0x6013, + 0x0000, 0x0078, 0x9493, 0x1078, 0x4957, 0x6618, 0xa6b0, 0x0001, + 0x2634, 0xa684, 0x00ff, 0xa082, 0x0006, 0x0048, 0x93ef, 0xa6b4, + 0xff00, 0x8637, 0xa686, 0x0004, 0x0040, 0x93c2, 0xa686, 0x0006, + 0x00c0, 0x9371, 0x1078, 0x9f34, 0x00c0, 0x93ca, 0x6007, 0x000e, + 0x0078, 0x9493, 0x047e, 0x6418, 0xa4a0, 0x0028, 0x2424, 0xa4a4, + 0x00ff, 0x8427, 0x047e, 0x1078, 0x2880, 0x047f, 0x017e, 0xa006, + 0x2009, 0xa653, 0x210c, 0xd1a4, 0x0040, 0x93e9, 0x2009, 0x0029, + 0x1078, 0xa21d, 0x6018, 0x0d7e, 0x2068, 0x6800, 0xc0e5, 0x6802, + 0x0d7f, 0x017f, 0x047f, 0x6007, 0x0001, 0x0078, 0x9493, 0x2001, + 0x0001, 0x1078, 0x44ee, 0x157e, 0x017e, 0x027e, 0x037e, 0x20a9, + 0x0004, 0x2019, 0xa605, 0x2011, 0xab90, 0x1078, 0x80de, 0x037f, + 0x027f, 0x017f, 0x157f, 0xa005, 0x0040, 0x940f, 0xa6b4, 0xff00, + 0x8637, 0xa686, 0x0006, 0x0040, 0x93c2, 0x0078, 0x9371, 0x6013, + 0x1900, 0x6007, 0x0009, 0x0078, 0x9493, 0x1078, 0x4967, 0x00c0, + 0x9422, 0x2001, 0xa633, 0x2004, 0xa084, 0x0009, 0xa086, 0x0008, + 0x00c0, 0x942a, 0x6007, 0x0009, 0x602b, 0x0009, 0x6013, 0x0000, + 0x0078, 0x9493, 0x1078, 0x4957, 0x6618, 0xa6b0, 0x0001, 0x2634, + 0xa684, 0x00ff, 0xa082, 0x0006, 0x0048, 0x9472, 0xa6b4, 0xff00, + 0x8637, 0xa686, 0x0004, 0x0040, 0x9441, 0xa686, 0x0006, 0x00c0, + 0x9371, 0x1078, 0x9f5f, 0x00c0, 0x944d, 0x1078, 0x9e50, 0x00c0, + 0x944d, 0x6007, 0x0010, 0x0078, 0x9493, 0x047e, 0x6418, 0xa4a0, + 0x0028, 0x2424, 0xa4a4, 0x00ff, 0x8427, 0x047e, 0x1078, 0x2880, + 0x047f, 0x017e, 0xa006, 0x2009, 0xa653, 0x210c, 0xd1a4, 0x0040, + 0x946c, 0x2009, 0x0029, 0x1078, 0xa21d, 0x6018, 0x0d7e, 0x2068, + 0x6800, 0xc0e5, 0x6802, 0x0d7f, 0x017f, 0x047f, 0x6007, 0x0001, + 0x0078, 0x9493, 0x1078, 0xa09f, 0x0040, 0x947f, 0xa6b4, 0xff00, + 0x8637, 0xa686, 0x0006, 0x0040, 0x9441, 0x0078, 0x9371, 0x6013, + 0x1900, 0x6007, 0x0009, 0x0078, 0x9493, 0x1078, 0x29bb, 0x00c0, + 0x9664, 0x1078, 0xa41c, 0x00c0, 0x9664, 0x1078, 0x9667, 0x00c0, + 0x9371, 0x6007, 0x0012, 0x6003, 0x0001, 0x1078, 0x5dd7, 0x007c, + 0x6007, 0x0001, 0x6003, 0x0001, 0x1078, 0x5dd7, 0x0078, 0x9497, + 0x6007, 0x0005, 0x0078, 0x949a, 0x1078, 0xa41c, 0x00c0, 0x9664, + 0x1078, 0x29bb, 0x00c0, 0x9664, 0x1078, 0x9667, 0x00c0, 0x9371, + 0x6007, 0x0020, 0x6003, 0x0001, 0x1078, 0x5dd7, 0x007c, 0x1078, + 0x29bb, 0x00c0, 0x9664, 0x6007, 0x0023, 0x6003, 0x0001, 0x1078, + 0x5dd7, 0x007c, 0x1078, 0xa41c, 0x00c0, 0x9664, 0x1078, 0x29bb, + 0x00c0, 0x9664, 0x1078, 0x9667, 0x00c0, 0x9371, 0x017e, 0x027e, + 0x2011, 0xab90, 0x2214, 0x2c08, 0xa006, 0x1078, 0xa1e6, 0x00c0, + 0x94e9, 0x2160, 0x6007, 0x0026, 0x6013, 0x1700, 0x2011, 0xab89, + 0x2214, 0xa296, 0xffff, 0x00c0, 0x94f3, 0x6007, 0x0025, 0x0078, + 0x94f3, 0x6004, 0xa086, 0x0024, 0x00c0, 0x94f0, 0x1078, 0x772d, + 0x2160, 0x6007, 0x0025, 0x6003, 0x0001, 0x1078, 0x5dd7, 0x027f, + 0x017f, 0x007c, 0x1078, 0x29bb, 0x00c0, 0x9664, 0x6106, 0x1078, + 0x9687, 0x6007, 0x002b, 0x0078, 0x9493, 0x6007, 0x002c, 0x0078, + 0x9493, 0x1078, 0xa41c, 0x00c0, 0x9664, 0x1078, 0x29bb, 0x00c0, + 0x9664, 0x1078, 0x9667, 0x00c0, 0x9371, 0x6106, 0x1078, 0x968c, + 0x00c0, 0x951e, 0x6007, 0x002e, 0x0078, 0x9493, 0x6007, 0x002f, + 0x0078, 0x9493, 0x1078, 0x29bb, 0x00c0, 0x9664, 0x0e7e, 0x0d7e, + 0x0c7e, 0x6018, 0xa080, 0x0001, 0x200c, 0xa184, 0x00ff, 0xa086, + 0x0006, 0x0040, 0x953f, 0xa184, 0xff00, 0x8007, 0xa086, 0x0006, + 0x0040, 0x953f, 0x0c7f, 0x0d7f, 0x0e7f, 0x0078, 0x9498, 0x2001, + 0xa672, 0x2004, 0xd0e4, 0x0040, 0x95ab, 0x2071, 0xab8c, 0x7010, + 0x6036, 0x7014, 0x603a, 0x7108, 0x720c, 0x2001, 0xa653, 0x2004, + 0xd0a4, 0x0040, 0x955d, 0x6018, 0x2068, 0x6810, 0xa106, 0x00c0, + 0x955d, 0x6814, 0xa206, 0x0040, 0x9581, 0x2001, 0xa653, 0x2004, + 0xd0ac, 0x00c0, 0x959f, 0x2069, 0xa600, 0x6870, 0xa206, 0x00c0, + 0x959f, 0x686c, 0xa106, 0x00c0, 0x959f, 0x7210, 0x1078, 0x8cf2, + 0x0040, 0x95a5, 0x1078, 0xa28e, 0x0040, 0x95a5, 0x622a, 0x6007, + 0x0036, 0x6003, 0x0001, 0x1078, 0x5d8a, 0x0c7f, 0x0d7f, 0x0e7f, + 0x007c, 0x7214, 0xa286, 0xffff, 0x0040, 0x9593, 0x1078, 0x8cf2, + 0x0040, 0x95a5, 0xa280, 0x0002, 0x2004, 0x7110, 0xa106, 0x00c0, + 0x95a5, 0x0078, 0x956e, 0x7210, 0x2c08, 0xa085, 0x0001, 0x1078, + 0xa1e6, 0x2c10, 0x2160, 0x0040, 0x95a5, 0x0078, 0x956e, 0x6007, + 0x0037, 0x6013, 0x1500, 0x0078, 0x9579, 0x6007, 0x0037, 0x6013, + 0x1700, 0x0078, 0x9579, 0x6007, 0x0012, 0x0078, 0x9579, 0x1078, + 0x29bb, 0x00c0, 0x9664, 0x6018, 0xa080, 0x0001, 0x2004, 0xa084, + 0xff00, 0x8007, 0xa086, 0x0006, 0x00c0, 0x9498, 0x0e7e, 0x0d7e, + 0x0c7e, 0x2001, 0xa672, 0x2004, 0xd0e4, 0x0040, 0x9621, 0x2069, + 0xa600, 0x2071, 0xab8c, 0x7008, 0x6036, 0x720c, 0x623a, 0xa286, + 0xffff, 0x00c0, 0x95de, 0x7208, 0x0c7e, 0x2c08, 0xa085, 0x0001, + 0x1078, 0xa1e6, 0x2c10, 0x0c7f, 0x0040, 0x9615, 0x1078, 0x8cf2, + 0x0040, 0x9615, 0x0c7e, 0x027e, 0x2260, 0x1078, 0x89f3, 0x027f, + 0x0c7f, 0x7118, 0xa18c, 0xff00, 0x810f, 0xa186, 0x0001, 0x0040, + 0x95ff, 0xa186, 0x0005, 0x0040, 0x95f9, 0xa186, 0x0007, 0x00c0, + 0x9609, 0xa280, 0x0004, 0x2004, 0xa005, 0x0040, 0x9609, 0x057e, + 0x7510, 0x7614, 0x1078, 0xa2a3, 0x057f, 0x0c7f, 0x0d7f, 0x0e7f, + 0x007c, 0x6007, 0x003b, 0x602b, 0x0009, 0x6013, 0x2a00, 0x6003, + 0x0001, 0x1078, 0x5d8a, 0x0078, 0x9605, 0x6007, 0x003b, 0x602b, + 0x0009, 0x6013, 0x1700, 0x6003, 0x0001, 0x1078, 0x5d8a, 0x0078, + 0x9605, 0x6007, 0x003b, 0x602b, 0x000b, 0x6013, 0x0000, 0x0078, + 0x9579, 0x0e7e, 0x027e, 0x1078, 0x4967, 0x0040, 0x965e, 0x1078, + 0x4957, 0x1078, 0xa4a9, 0x00c0, 0x965c, 0x2071, 0xa600, 0x70cc, + 0xc085, 0x70ce, 0x0f7e, 0x2079, 0x0100, 0x7298, 0xa284, 0x00ff, + 0x706e, 0x78e6, 0xa284, 0xff00, 0x7270, 0xa205, 0x7072, 0x78ea, + 0x0f7f, 0x70d7, 0x0000, 0x2001, 0xa653, 0x2004, 0xd0a4, 0x0040, + 0x9655, 0x2011, 0xa8ca, 0x2013, 0x07d0, 0xd0ac, 0x00c0, 0x965e, + 0x1078, 0x2677, 0x0078, 0x965e, 0x1078, 0xa4d9, 0x027f, 0x0e7f, + 0x1078, 0x772d, 0x0078, 0x9497, 0x1078, 0x772d, 0x007c, 0x0d7e, + 0x067e, 0x6618, 0x2668, 0x6e04, 0xa6b4, 0xff00, 0x8637, 0xa686, + 0x0006, 0x0040, 0x9684, 0xa686, 0x0004, 0x0040, 0x9684, 0x6e04, + 0xa6b4, 0x00ff, 0xa686, 0x0006, 0x0040, 0x9684, 0xa686, 0x0004, + 0x0040, 0x9684, 0xa085, 0x0001, 0x067f, 0x0d7f, 0x007c, 0x0d7e, + 0x1078, 0x96bb, 0x0d7f, 0x007c, 0x0d7e, 0x1078, 0x96ca, 0x00c0, + 0x96b4, 0x680c, 0xa08c, 0xff00, 0x6820, 0xa084, 0x00ff, 0xa115, + 0x6212, 0x6824, 0x602a, 0xd1e4, 0x0040, 0x96a2, 0x2009, 0x0001, + 0x0078, 0x96b0, 0xd1ec, 0x0040, 0x96b4, 0x6920, 0xa18c, 0x00ff, + 0x6824, 0x1078, 0x254d, 0x00c0, 0x96b4, 0x2110, 0x2009, 0x0000, + 0x1078, 0x28c8, 0x0078, 0x96b8, 0xa085, 0x0001, 0x0078, 0x96b9, + 0xa006, 0x0d7f, 0x007c, 0x2069, 0xab8d, 0x6800, 0xa082, 0x0010, + 0x00c8, 0x96c8, 0x6013, 0x0000, 0xa085, 0x0001, 0x0078, 0x96c9, + 0xa006, 0x007c, 0x6013, 0x0000, 0x2069, 0xab8c, 0x6808, 0xa084, + 0xff00, 0xa086, 0x0800, 0x00c0, 0x96de, 0x6800, 0xa084, 0x00ff, + 0xa08e, 0x0014, 0x0040, 0x96de, 0xa08e, 0x0010, 0x007c, 0x6004, + 0xa0b2, 0x0044, 0x10c8, 0x1332, 0xa1b6, 0x0013, 0x00c0, 0x96eb, + 0x2008, 0x0079, 0x96fe, 0xa1b6, 0x0027, 0x0040, 0x96f3, 0xa1b6, + 0x0014, 0x10c0, 0x1332, 0x2001, 0x0007, 0x1078, 0x4535, 0x1078, + 0x61cd, 0x1078, 0x8ec6, 0x1078, 0x62d1, 0x007c, 0x973e, 0x9740, + 0x973e, 0x973e, 0x973e, 0x9740, 0x974c, 0x97d6, 0x9799, 0x97d6, + 0x97ad, 0x97d6, 0x974c, 0x97d6, 0x97ce, 0x97d6, 0x97ce, 0x97d6, + 0x97d6, 0x973e, 0x973e, 0x973e, 0x973e, 0x973e, 0x973e, 0x973e, + 0x973e, 0x973e, 0x973e, 0x973e, 0x9740, 0x973e, 0x97d6, 0x973e, + 0x973e, 0x97d6, 0x973e, 0x97d6, 0x97d6, 0x973e, 0x973e, 0x973e, + 0x973e, 0x97d6, 0x97d6, 0x973e, 0x97d6, 0x97d6, 0x973e, 0x973e, + 0x973e, 0x973e, 0x973e, 0x9740, 0x97d6, 0x97d6, 0x973e, 0x973e, + 0x97d6, 0x97d6, 0x973e, 0x973e, 0x973e, 0x973e, 0x1078, 0x1332, + 0x1078, 0x61cd, 0x2001, 0xa8a2, 0x2004, 0x6016, 0x6003, 0x0002, + 0x1078, 0x62d1, 0x0078, 0x97dc, 0x0f7e, 0x2079, 0xa652, 0x7804, + 0x0f7f, 0xd0ac, 0x00c0, 0x97d6, 0x2001, 0x0000, 0x1078, 0x44ee, + 0x6018, 0xa080, 0x0004, 0x2004, 0xa086, 0x00ff, 0x0040, 0x97d6, + 0x0c7e, 0x6018, 0x2060, 0x6000, 0xd0f4, 0x00c0, 0x9770, 0x6010, + 0xa005, 0x0040, 0x9770, 0x0c7f, 0x1078, 0x3699, 0x0078, 0x97d6, + 0x0c7f, 0x2001, 0xa600, 0x2004, 0xa086, 0x0002, 0x00c0, 0x977f, + 0x0f7e, 0x2079, 0xa600, 0x7890, 0x8000, 0x7892, 0x0f7f, 0x2001, + 0x0002, 0x1078, 0x4502, 0x1078, 0x61cd, 0x601f, 0x0001, 0x6003, + 0x0001, 0x6007, 0x0002, 0x1078, 0x5dd7, 0x1078, 0x62d1, 0x0c7e, + 0x6118, 0x2160, 0x2009, 0x0001, 0x1078, 0x5a52, 0x0c7f, 0x0078, + 0x97dc, 0x6618, 0x0d7e, 0x2668, 0x6e04, 0x0d7f, 0xa6b4, 0xff00, + 0x8637, 0xa686, 0x0006, 0x0040, 0x97d6, 0xa686, 0x0004, 0x0040, + 0x97d6, 0x2001, 0x0004, 0x0078, 0x97d4, 0x2001, 0xa600, 0x2004, + 0xa086, 0x0003, 0x00c0, 0x97b6, 0x1078, 0x3699, 0x2001, 0x0006, + 0x1078, 0x97dd, 0x6618, 0x0d7e, 0x2668, 0x6e04, 0x0d7f, 0xa6b4, + 0xff00, 0x8637, 0xa686, 0x0006, 0x0040, 0x97d6, 0x2001, 0x0006, + 0x0078, 0x97d4, 0x2001, 0x0004, 0x0078, 0x97d4, 0x2001, 0x0006, + 0x1078, 0x97dd, 0x0078, 0x97d6, 0x1078, 0x4535, 0x1078, 0x61cd, + 0x1078, 0x772d, 0x1078, 0x62d1, 0x007c, 0x017e, 0x0d7e, 0x6118, + 0x2168, 0x6900, 0xd184, 0x0040, 0x97f8, 0x6104, 0xa18e, 0x000a, + 0x00c0, 0x97f0, 0x699c, 0xd1a4, 0x00c0, 0x97f0, 0x2001, 0x0007, + 0x1078, 0x4502, 0x2001, 0x0000, 0x1078, 0x44ee, 0x1078, 0x28a6, + 0x0d7f, 0x017f, 0x007c, 0x0d7e, 0x6618, 0x2668, 0x6804, 0xa084, + 0xff00, 0x8007, 0x0d7f, 0xa0b2, 0x000c, 0x10c8, 0x1332, 0xa1b6, + 0x0015, 0x00c0, 0x980f, 0x1079, 0x9816, 0x0078, 0x9815, 0xa1b6, + 0x0016, 0x10c0, 0x1332, 0x1079, 0x9822, 0x007c, 0x7d4e, 0x7d4e, + 0x7d4e, 0x7d4e, 0x7d4e, 0x7d4e, 0x9877, 0x982e, 0x7d4e, 0x7d4e, + 0x7d4e, 0x7d4e, 0x7d4e, 0x7d4e, 0x7d4e, 0x7d4e, 0x7d4e, 0x7d4e, + 0x9877, 0x987f, 0x7d4e, 0x7d4e, 0x7d4e, 0x7d4e, 0x0f7e, 0x2079, + 0xa652, 0x7804, 0xd0ac, 0x00c0, 0x9855, 0x6018, 0xa07d, 0x0040, + 0x9855, 0x7800, 0xd0f4, 0x00c0, 0x9841, 0x7810, 0xa005, 0x00c0, + 0x9855, 0x2001, 0x0000, 0x1078, 0x44ee, 0x2001, 0x0002, 0x1078, + 0x4502, 0x601f, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x1078, + 0x5dd7, 0x1078, 0x62d1, 0x0078, 0x9875, 0x2011, 0xab83, 0x2204, + 0x8211, 0x220c, 0x1078, 0x254d, 0x00c0, 0x9875, 0x0c7e, 0x1078, + 0x45c4, 0x0040, 0x9868, 0x0c7f, 0x1078, 0x772d, 0x0078, 0x9875, + 0x6010, 0x007e, 0x6014, 0x007e, 0x1078, 0x42f8, 0x007f, 0x6016, + 0x007f, 0x6012, 0x0c7f, 0x1078, 0x772d, 0x0f7f, 0x007c, 0x6604, + 0xa6b6, 0x001e, 0x00c0, 0x987e, 0x1078, 0x772d, 0x007c, 0x1078, + 0x7f8e, 0x00c0, 0x988b, 0x6003, 0x0001, 0x6007, 0x0001, 0x1078, + 0x5dd7, 0x0078, 0x988d, 0x1078, 0x772d, 0x007c, 0x6004, 0xa08a, + 0x0044, 0x10c8, 0x1332, 0x1078, 0x61cd, 0x1078, 0x8ec6, 0x1078, + 0x62d1, 0x007c, 0xa182, 0x0040, 0x0079, 0x989e, 0x98b1, 0x98b1, + 0x98b1, 0x98b1, 0x98b3, 0x98b1, 0x98b1, 0x98b1, 0x98b1, 0x98b1, + 0x98b1, 0x98b1, 0x98b1, 0x98b1, 0x98b1, 0x98b1, 0x98b1, 0x98b1, + 0x98b1, 0x1078, 0x1332, 0x0d7e, 0x0e7e, 0x0f7e, 0x157e, 0x047e, + 0x027e, 0x6218, 0xa280, 0x002b, 0x2004, 0xa005, 0x0040, 0x98c4, + 0x2021, 0x0000, 0x1078, 0xa472, 0x6106, 0x2071, 0xab80, 0x7444, + 0xa4a4, 0xff00, 0x0040, 0x991b, 0xa486, 0x2000, 0x00c0, 0x98d6, + 0x2009, 0x0001, 0x2011, 0x0200, 0x1078, 0x5bf1, 0x1078, 0x138b, + 0x1040, 0x1332, 0x6003, 0x0007, 0x2d00, 0x6837, 0x010d, 0x6803, + 0x0000, 0x683b, 0x0000, 0x6c5a, 0x2c00, 0x685e, 0x6008, 0x68b2, + 0x6018, 0x2078, 0x78a0, 0x8007, 0x7130, 0x694a, 0x017e, 0xa084, + 0xff00, 0x6846, 0x684f, 0x0000, 0x6857, 0x0036, 0x1078, 0x4a73, + 0x017f, 0xa486, 0x2000, 0x00c0, 0x9903, 0x2019, 0x0017, 0x1078, + 0xa195, 0x0078, 0x997d, 0xa486, 0x0400, 0x00c0, 0x990d, 0x2019, + 0x0002, 0x1078, 0xa146, 0x0078, 0x997d, 0xa486, 0x0200, 0x00c0, + 0x9913, 0x1078, 0xa12b, 0xa486, 0x1000, 0x00c0, 0x9919, 0x1078, + 0xa17a, 0x0078, 0x997d, 0x2069, 0xa933, 0x6a00, 0xd284, 0x0040, + 0x99e7, 0xa284, 0x0300, 0x00c0, 0x99df, 0x6804, 0xa005, 0x0040, + 0x99c5, 0x2d78, 0x6003, 0x0007, 0x1078, 0x1370, 0x0040, 0x9984, + 0x7800, 0xd08c, 0x00c0, 0x9937, 0x7804, 0x8001, 0x7806, 0x6013, + 0x0000, 0x6803, 0x0000, 0x6837, 0x0116, 0x683b, 0x0000, 0x6008, + 0x68b2, 0x2c00, 0x684a, 0x6018, 0x2078, 0x78a0, 0x8007, 0x7130, + 0x6986, 0x6846, 0x7928, 0x698a, 0x792c, 0x698e, 0x7930, 0x6992, + 0x7934, 0x6996, 0x6853, 0x003d, 0x7244, 0xa294, 0x0003, 0xa286, + 0x0002, 0x00c0, 0x995f, 0x684f, 0x0040, 0x0078, 0x9969, 0xa286, + 0x0001, 0x00c0, 0x9967, 0x684f, 0x0080, 0x0078, 0x9969, 0x684f, + 0x0000, 0x20a9, 0x000a, 0x2001, 0xab90, 0xad90, 0x0015, 0x200c, + 0x810f, 0x2112, 0x8000, 0x8210, 0x00f0, 0x996f, 0x200c, 0x6982, + 0x8000, 0x200c, 0x697e, 0x1078, 0x4a73, 0x027f, 0x047f, 0x157f, + 0x0f7f, 0x0e7f, 0x0d7f, 0x007c, 0x2001, 0xa60e, 0x2004, 0xd084, + 0x0040, 0x998e, 0x1078, 0x138b, 0x00c0, 0x9930, 0x6013, 0x0100, + 0x6003, 0x0001, 0x6007, 0x0041, 0x1078, 0x5d8a, 0x1078, 0x62d1, + 0x0078, 0x997d, 0x2069, 0xab92, 0x2d04, 0xa084, 0xff00, 0xa086, + 0x1200, 0x00c0, 0x99b9, 0x2069, 0xab80, 0x686c, 0xa084, 0x00ff, + 0x017e, 0x6110, 0xa18c, 0x0700, 0xa10d, 0x6112, 0x017f, 0x6003, + 0x0001, 0x6007, 0x0043, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0078, + 0x997d, 0x6013, 0x0200, 0x6003, 0x0001, 0x6007, 0x0041, 0x1078, + 0x5d8a, 0x1078, 0x62d1, 0x0078, 0x997d, 0x2001, 0xa60d, 0x2004, + 0xd0ec, 0x0040, 0x99cf, 0x2011, 0x8049, 0x1078, 0x361b, 0x6013, + 0x0300, 0x0078, 0x99d5, 0x6013, 0x0100, 0x6003, 0x0001, 0x6007, + 0x0041, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0078, 0x997d, 0x6013, + 0x0500, 0x0078, 0x99d5, 0x6013, 0x0600, 0x0078, 0x999a, 0x6013, + 0x0200, 0x0078, 0x999a, 0xa186, 0x0013, 0x00c0, 0x99fd, 0x6004, + 0xa08a, 0x0040, 0x1048, 0x1332, 0xa08a, 0x0053, 0x10c8, 0x1332, + 0xa082, 0x0040, 0x2008, 0x0079, 0x9a82, 0xa186, 0x0051, 0x0040, + 0x9a0a, 0xa186, 0x0047, 0x00c0, 0x9a23, 0x6004, 0xa086, 0x0041, + 0x0040, 0x9a31, 0x2001, 0x0109, 0x2004, 0xd084, 0x0040, 0x9a31, + 0x127e, 0x2091, 0x2200, 0x007e, 0x017e, 0x027e, 0x1078, 0x5c56, + 0x027f, 0x017f, 0x007f, 0x127f, 0x6000, 0xa086, 0x0002, 0x00c0, + 0x9a31, 0x0078, 0x9ac7, 0xa186, 0x0027, 0x0040, 0x9a2b, 0xa186, + 0x0014, 0x10c0, 0x1332, 0x6004, 0xa082, 0x0040, 0x2008, 0x0079, + 0x9a34, 0x1078, 0x7773, 0x007c, 0x9a47, 0x9a49, 0x9a49, 0x9a71, + 0x9a47, 0x9a47, 0x9a47, 0x9a47, 0x9a47, 0x9a47, 0x9a47, 0x9a47, + 0x9a47, 0x9a47, 0x9a47, 0x9a47, 0x9a47, 0x9a47, 0x9a47, 0x1078, + 0x1332, 0x1078, 0x61cd, 0x1078, 0x62d1, 0x037e, 0x0d7e, 0x6010, + 0xa06d, 0x0040, 0x9a6e, 0xad84, 0xf000, 0x0040, 0x9a6e, 0x6003, + 0x0002, 0x6018, 0x2004, 0xd0bc, 0x00c0, 0x9a6e, 0x2019, 0x0004, + 0x1078, 0xa1ca, 0x6013, 0x0000, 0x6014, 0xa005, 0x00c0, 0x9a6c, + 0x2001, 0xa8a3, 0x2004, 0x6016, 0x6003, 0x0007, 0x0d7f, 0x037f, + 0x007c, 0x0d7e, 0x1078, 0x61cd, 0x1078, 0x62d1, 0x1078, 0x8d06, + 0x0040, 0x9a7e, 0x6010, 0x2068, 0x1078, 0x13a4, 0x1078, 0x8ec6, + 0x0d7f, 0x007c, 0x9a95, 0x9ab4, 0x9a9e, 0x9ac1, 0x9a95, 0x9a95, + 0x9a95, 0x9a95, 0x9a95, 0x9a95, 0x9a95, 0x9a95, 0x9a95, 0x9a95, + 0x9a95, 0x9a95, 0x9a95, 0x9a95, 0x9a95, 0x1078, 0x1332, 0x6010, + 0xa088, 0x0013, 0x2104, 0xa085, 0x0400, 0x200a, 0x1078, 0x61cd, + 0x6010, 0xa080, 0x0013, 0x2004, 0xd0b4, 0x0040, 0x9aaf, 0x6003, + 0x0007, 0x2009, 0x0043, 0x1078, 0x775c, 0x0078, 0x9ab1, 0x6003, + 0x0002, 0x1078, 0x62d1, 0x007c, 0x1078, 0x61cd, 0x1078, 0xa423, + 0x00c0, 0x9abe, 0x1078, 0x5bc1, 0x1078, 0x772d, 0x1078, 0x62d1, + 0x007c, 0x1078, 0x61cd, 0x2009, 0x0041, 0x0078, 0x9c1e, 0xa182, + 0x0040, 0x0079, 0x9acb, 0x9ade, 0x9ae0, 0x9ade, 0x9ade, 0x9ade, + 0x9ade, 0x9ade, 0x9ae1, 0x9ade, 0x9ade, 0x9ade, 0x9ade, 0x9ade, + 0x9ade, 0x9ade, 0x9ade, 0x9ade, 0x9aec, 0x9ade, 0x1078, 0x1332, + 0x007c, 0x6003, 0x0004, 0x6110, 0x20e1, 0x0005, 0x3d18, 0x3e20, + 0x2c10, 0x1078, 0x15fa, 0x007c, 0x0d7e, 0x1078, 0x5bc1, 0x0d7f, + 0x1078, 0xa495, 0x1078, 0x772d, 0x007c, 0xa182, 0x0040, 0x0079, + 0x9af9, 0x9b0c, 0x9b0c, 0x9b0c, 0x9b0c, 0x9b0c, 0x9b0c, 0x9b0c, + 0x9b0e, 0x9b0c, 0x9b11, 0x9b3c, 0x9b0c, 0x9b0c, 0x9b0c, 0x9b0c, + 0x9b3c, 0x9b0c, 0x9b0c, 0x9b0c, 0x1078, 0x1332, 0x1078, 0x7773, + 0x007c, 0x1078, 0x627a, 0x1078, 0x639b, 0x6010, 0x0d7e, 0x2068, + 0x684c, 0xd0fc, 0x0040, 0x9b27, 0xa08c, 0x0003, 0xa18e, 0x0002, + 0x0040, 0x9b2f, 0x2009, 0x0041, 0x0d7f, 0x0078, 0x9c1e, 0x6003, + 0x0007, 0x6017, 0x0000, 0x1078, 0x5bc1, 0x0d7f, 0x007c, 0x1078, + 0xa423, 0x0040, 0x9b35, 0x0d7f, 0x007c, 0x1078, 0x5bc1, 0x1078, + 0x772d, 0x0d7f, 0x0078, 0x9b2e, 0x037e, 0x1078, 0x627a, 0x1078, + 0x639b, 0x6010, 0x0d7e, 0x2068, 0x6018, 0x2004, 0xd0bc, 0x0040, + 0x9b5c, 0x684c, 0xa084, 0x0003, 0xa086, 0x0002, 0x0040, 0x9b58, + 0x687c, 0x632c, 0xa31a, 0x632e, 0x6880, 0x6328, 0xa31b, 0x632a, + 0x6003, 0x0002, 0x0078, 0x9b6d, 0x2019, 0x0004, 0x1078, 0xa1ca, + 0x6014, 0xa005, 0x00c0, 0x9b69, 0x2001, 0xa8a3, 0x2004, 0x8003, + 0x6016, 0x6013, 0x0000, 0x6003, 0x0007, 0x0d7f, 0x037f, 0x007c, + 0xa186, 0x0013, 0x00c0, 0x9b7e, 0x6004, 0xa086, 0x0042, 0x10c0, + 0x1332, 0x1078, 0x61cd, 0x1078, 0x62d1, 0x007c, 0xa186, 0x0027, + 0x0040, 0x9b86, 0xa186, 0x0014, 0x00c0, 0x9b96, 0x6004, 0xa086, + 0x0042, 0x10c0, 0x1332, 0x2001, 0x0007, 0x1078, 0x4535, 0x1078, + 0x61cd, 0x1078, 0x8ec6, 0x1078, 0x62d1, 0x007c, 0xa182, 0x0040, + 0x0079, 0x9b9a, 0x9bad, 0x9bad, 0x9bad, 0x9bad, 0x9bad, 0x9bad, + 0x9bad, 0x9baf, 0x9bbb, 0x9bad, 0x9bad, 0x9bad, 0x9bad, 0x9bad, + 0x9bad, 0x9bad, 0x9bad, 0x9bad, 0x9bad, 0x1078, 0x1332, 0x037e, + 0x047e, 0x20e1, 0x0005, 0x3d18, 0x3e20, 0x2c10, 0x1078, 0x15fa, + 0x047f, 0x037f, 0x007c, 0x6010, 0x0d7e, 0x2068, 0x6810, 0x6a14, + 0x6118, 0x210c, 0xd1bc, 0x0040, 0x9bda, 0x6124, 0xd1f4, 0x00c0, + 0x9bda, 0x007e, 0x047e, 0x057e, 0x6c7c, 0xa422, 0x6d80, 0x2200, + 0xa52b, 0x602c, 0xa420, 0x642e, 0x6028, 0xa529, 0x652a, 0x057f, + 0x047f, 0x007f, 0xa20d, 0x00c0, 0x9bee, 0x684c, 0xd0fc, 0x0040, + 0x9be6, 0x2009, 0x0041, 0x0d7f, 0x0078, 0x9c1e, 0x6003, 0x0007, + 0x6017, 0x0000, 0x1078, 0x5bc1, 0x0d7f, 0x007c, 0x007e, 0x0f7e, + 0x2c78, 0x1078, 0x4963, 0x0f7f, 0x007f, 0x0040, 0x9bfb, 0x6003, + 0x0002, 0x0d7f, 0x007c, 0x2009, 0xa60d, 0x210c, 0xd19c, 0x0040, + 0x9c05, 0x6003, 0x0007, 0x0078, 0x9c07, 0x6003, 0x0006, 0x1078, + 0x9c0d, 0x1078, 0x5bc3, 0x0d7f, 0x007c, 0xd2fc, 0x0040, 0x9c19, + 0x8002, 0x8000, 0x8212, 0xa291, 0x0000, 0x2009, 0x0009, 0x0078, + 0x9c1b, 0x2009, 0x0015, 0x6a6a, 0x6866, 0x007c, 0xa182, 0x0040, + 0x0048, 0x9c24, 0x0079, 0x9c31, 0xa186, 0x0013, 0x0040, 0x9c2c, + 0xa186, 0x0014, 0x10c0, 0x1332, 0x6024, 0xd0dc, 0x1040, 0x1332, + 0x007c, 0x9c44, 0x9c4b, 0x9c57, 0x9c63, 0x9c44, 0x9c44, 0x9c44, + 0x9c72, 0x9c44, 0x9c46, 0x9c46, 0x9c44, 0x9c44, 0x9c44, 0x9c44, + 0x9c44, 0x9c44, 0x9c44, 0x9c44, 0x1078, 0x1332, 0x6024, 0xd0dc, + 0x1040, 0x1332, 0x007c, 0x6003, 0x0001, 0x6106, 0x1078, 0x5d8a, + 0x127e, 0x2091, 0x8000, 0x1078, 0x62d1, 0x127f, 0x007c, 0x6003, + 0x0001, 0x6106, 0x1078, 0x5d8a, 0x127e, 0x2091, 0x8000, 0x1078, + 0x62d1, 0x127f, 0x007c, 0x6003, 0x0003, 0x6106, 0x2c10, 0x1078, + 0x1cf0, 0x127e, 0x2091, 0x8000, 0x1078, 0x5df6, 0x1078, 0x639b, + 0x127f, 0x007c, 0xa016, 0x1078, 0x15fa, 0x007c, 0x127e, 0x2091, + 0x8000, 0x037e, 0x0d7e, 0xa182, 0x0040, 0x1079, 0x9c83, 0x0d7f, + 0x037f, 0x127f, 0x007c, 0x9c93, 0x9c95, 0x9caa, 0x9cc9, 0x9c93, + 0x9c93, 0x9c93, 0x9ce1, 0x9c93, 0x9c93, 0x9c93, 0x9c93, 0x9c93, + 0x9c93, 0x9c93, 0x9c93, 0x1078, 0x1332, 0x6010, 0x2068, 0x684c, + 0xd0fc, 0x0040, 0x9cbf, 0xa09c, 0x0003, 0xa39e, 0x0003, 0x0040, + 0x9cbf, 0x6003, 0x0001, 0x6106, 0x1078, 0x5d8a, 0x1078, 0x62d1, + 0x0078, 0x9ce4, 0x6010, 0x2068, 0x684c, 0xd0fc, 0x0040, 0x9cbf, + 0xa09c, 0x0003, 0xa39e, 0x0003, 0x0040, 0x9cbf, 0x6003, 0x0001, + 0x6106, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0078, 0x9ce4, 0x6013, + 0x0000, 0x6017, 0x0000, 0x2019, 0x0004, 0x1078, 0xa1ca, 0x0078, + 0x9ce4, 0x6010, 0x2068, 0x684c, 0xd0fc, 0x0040, 0x9cbf, 0xa09c, + 0x0003, 0xa39e, 0x0003, 0x0040, 0x9cbf, 0x6003, 0x0003, 0x6106, + 0x2c10, 0x1078, 0x1cf0, 0x1078, 0x5df6, 0x1078, 0x639b, 0x0078, + 0x9ce4, 0xa016, 0x1078, 0x15fa, 0x007c, 0x1078, 0x61cd, 0x6110, + 0x81ff, 0x0040, 0x9cf6, 0x0d7e, 0x2168, 0x1078, 0xa4e2, 0x037e, + 0x2019, 0x0029, 0x1078, 0xa1ca, 0x037f, 0x0d7f, 0x1078, 0x8ec6, + 0x1078, 0x62d1, 0x007c, 0x1078, 0x627a, 0x6110, 0x81ff, 0x0040, + 0x9d0c, 0x0d7e, 0x2168, 0x1078, 0xa4e2, 0x037e, 0x2019, 0x0029, + 0x1078, 0xa1ca, 0x037f, 0x0d7f, 0x1078, 0x8ec6, 0x1078, 0x639b, + 0x007c, 0xa182, 0x0085, 0x0079, 0x9d15, 0x9d1e, 0x9d1c, 0x9d1c, + 0x9d2a, 0x9d1c, 0x9d1c, 0x9d1c, 0x1078, 0x1332, 0x6003, 0x000b, + 0x6106, 0x1078, 0x5d8a, 0x127e, 0x2091, 0x8000, 0x1078, 0x62d1, + 0x127f, 0x007c, 0x027e, 0x0e7e, 0x1078, 0xa41c, 0x0040, 0x9d34, + 0x1078, 0x772d, 0x0078, 0x9d50, 0x2071, 0xab80, 0x7224, 0x6212, + 0x7220, 0x1078, 0xa069, 0x0040, 0x9d41, 0x6007, 0x0086, 0x0078, + 0x9d4a, 0x6007, 0x0087, 0x7224, 0xa296, 0xffff, 0x00c0, 0x9d4a, + 0x6007, 0x0086, 0x6003, 0x0001, 0x1078, 0x5d8a, 0x1078, 0x62d1, + 0x0e7f, 0x027f, 0x007c, 0xa186, 0x0013, 0x00c0, 0x9d64, 0x6004, + 0xa08a, 0x0085, 0x1048, 0x1332, 0xa08a, 0x008c, 0x10c8, 0x1332, + 0xa082, 0x0085, 0x0079, 0x9d7b, 0xa186, 0x0027, 0x0040, 0x9d70, + 0xa186, 0x0014, 0x0040, 0x9d70, 0x1078, 0x7773, 0x0078, 0x9d7a, + 0x2001, 0x0007, 0x1078, 0x4535, 0x1078, 0x61cd, 0x1078, 0x8ec6, + 0x1078, 0x62d1, 0x007c, 0x9d82, 0x9d84, 0x9d84, 0x9d82, 0x9d82, + 0x9d82, 0x9d82, 0x1078, 0x1332, 0x1078, 0x61cd, 0x1078, 0x8ec6, + 0x1078, 0x62d1, 0x007c, 0xa182, 0x0085, 0x1048, 0x1332, 0xa182, + 0x008c, 0x10c8, 0x1332, 0xa182, 0x0085, 0x0079, 0x9d97, 0x9d9e, + 0x9d9e, 0x9d9e, 0x9da0, 0x9d9e, 0x9d9e, 0x9d9e, 0x1078, 0x1332, + 0x007c, 0xa186, 0x0013, 0x0040, 0x9db1, 0xa186, 0x0014, 0x0040, + 0x9db1, 0xa186, 0x0027, 0x0040, 0x9db1, 0x1078, 0x7773, 0x0078, + 0x9db7, 0x1078, 0x61cd, 0x1078, 0x8ec6, 0x1078, 0x62d1, 0x007c, + 0x037e, 0x1078, 0xa495, 0x603f, 0x0000, 0x2019, 0x000b, 0x1078, + 0x9dc7, 0x601f, 0x0006, 0x6003, 0x0007, 0x037f, 0x007c, 0x127e, + 0x037e, 0x2091, 0x8000, 0x087e, 0x2c40, 0x097e, 0x2049, 0x0000, + 0x1078, 0x7246, 0x097f, 0x087f, 0x00c0, 0x9e02, 0x077e, 0x2c38, + 0x1078, 0x72f3, 0x077f, 0x00c0, 0x9e02, 0x6000, 0xa086, 0x0000, + 0x0040, 0x9e02, 0x601c, 0xa086, 0x0007, 0x0040, 0x9e02, 0x0d7e, + 0x6000, 0xa086, 0x0004, 0x00c0, 0x9df3, 0x1078, 0xa495, 0x601f, + 0x0007, 0x1078, 0x1757, 0x6010, 0x2068, 0x1078, 0x8d06, 0x0040, + 0x9dfb, 0x1078, 0xa1ca, 0x0d7f, 0x6013, 0x0000, 0x1078, 0xa495, + 0x601f, 0x0007, 0x037f, 0x127f, 0x007c, 0x0f7e, 0x0c7e, 0x037e, + 0x157e, 0x2079, 0xab80, 0x7938, 0x783c, 0x1078, 0x254d, 0x00c0, + 0x9e49, 0x017e, 0x0c7e, 0x1078, 0x45c4, 0x00c0, 0x9e49, 0x017f, + 0x027f, 0x027e, 0x017e, 0x2019, 0x0029, 0x1078, 0x73d0, 0x1078, + 0x5f01, 0x077e, 0x2039, 0x0000, 0x1078, 0x5e0a, 0x077f, 0x017f, + 0x077e, 0x2039, 0x0000, 0x1078, 0x9f8b, 0x077f, 0x1078, 0x47e9, + 0x027e, 0x6204, 0xa294, 0xff00, 0x8217, 0xa286, 0x0006, 0x0040, + 0x9e3d, 0xa286, 0x0004, 0x00c0, 0x9e40, 0x62a0, 0x1078, 0x2942, + 0x027f, 0x017f, 0x1078, 0x42f8, 0x6612, 0x6516, 0xa006, 0x0078, + 0x9e4b, 0x0c7f, 0x017f, 0x157f, 0x037f, 0x0c7f, 0x0f7f, 0x007c, + 0x0c7e, 0x0d7e, 0x0e7e, 0x017e, 0x2009, 0xa620, 0x2104, 0xa086, + 0x0074, 0x00c0, 0x9eb3, 0x2069, 0xab8e, 0x690c, 0xa182, 0x0100, + 0x0048, 0x9ea3, 0x6908, 0xa184, 0x8000, 0x0040, 0x9eaf, 0x6018, + 0x2070, 0x7010, 0xa084, 0x00ff, 0x0040, 0x9e72, 0x7000, 0xd0f4, + 0x0040, 0x9e76, 0xa184, 0x0800, 0x0040, 0x9eaf, 0x6910, 0xa18a, + 0x0001, 0x0048, 0x9ea7, 0x6914, 0x2069, 0xabae, 0x6904, 0x81ff, + 0x00c0, 0x9e9b, 0x690c, 0xa182, 0x0100, 0x0048, 0x9ea3, 0x6908, + 0x81ff, 0x00c0, 0x9e9f, 0x6910, 0xa18a, 0x0001, 0x0048, 0x9ea7, + 0x6918, 0xa18a, 0x0001, 0x0048, 0x9eaf, 0x0078, 0x9eb9, 0x6013, + 0x0100, 0x0078, 0x9eb5, 0x6013, 0x0300, 0x0078, 0x9eb5, 0x6013, + 0x0500, 0x0078, 0x9eb5, 0x6013, 0x0700, 0x0078, 0x9eb5, 0x6013, + 0x0900, 0x0078, 0x9eb5, 0x6013, 0x0b00, 0x0078, 0x9eb5, 0x6013, + 0x0f00, 0x0078, 0x9eb5, 0x6013, 0x2d00, 0xa085, 0x0001, 0x0078, + 0x9eba, 0xa006, 0x017f, 0x0e7f, 0x0d7f, 0x0c7f, 0x007c, 0x0c7e, + 0x0d7e, 0x027e, 0x037e, 0x157e, 0x6218, 0x2268, 0x6b04, 0xa394, + 0x00ff, 0xa286, 0x0006, 0x0040, 0x9ee3, 0xa286, 0x0004, 0x0040, + 0x9ee3, 0xa394, 0xff00, 0x8217, 0xa286, 0x0006, 0x0040, 0x9ee3, + 0xa286, 0x0004, 0x0040, 0x9ee3, 0x0c7e, 0x2d60, 0x1078, 0x45d6, + 0x0c7f, 0x0078, 0x9f1e, 0x2011, 0xab96, 0xad98, 0x000a, 0x20a9, + 0x0004, 0x1078, 0x80de, 0x00c0, 0x9f1f, 0x2011, 0xab9a, 0xad98, + 0x0006, 0x20a9, 0x0004, 0x1078, 0x80de, 0x00c0, 0x9f1f, 0x047e, + 0x017e, 0x6aa0, 0xa294, 0x00ff, 0x8227, 0xa006, 0x2009, 0xa653, + 0x210c, 0xd1a4, 0x0040, 0x9f0b, 0x2009, 0x0029, 0x1078, 0xa21d, + 0x6800, 0xc0e5, 0x6802, 0x2019, 0x0029, 0x1078, 0x5f01, 0x077e, + 0x2039, 0x0000, 0x1078, 0x5e0a, 0x2c08, 0x1078, 0x9f8b, 0x077f, + 0x2001, 0x0007, 0x1078, 0x4535, 0x017f, 0x047f, 0xa006, 0x157f, + 0x037f, 0x027f, 0x0d7f, 0x0c7f, 0x007c, 0x0d7e, 0x2069, 0xab8e, + 0x6800, 0xa086, 0x0800, 0x0040, 0x9f31, 0x6013, 0x0000, 0x0078, + 0x9f32, 0xa006, 0x0d7f, 0x007c, 0x0c7e, 0x0f7e, 0x017e, 0x027e, + 0x037e, 0x157e, 0x2079, 0xab8c, 0x7930, 0x7834, 0x1078, 0x254d, + 0x00c0, 0x9f58, 0x1078, 0x45c4, 0x00c0, 0x9f58, 0x2011, 0xab90, + 0xac98, 0x000a, 0x20a9, 0x0004, 0x1078, 0x80de, 0x00c0, 0x9f58, + 0x2011, 0xab94, 0xac98, 0x0006, 0x20a9, 0x0004, 0x1078, 0x80de, + 0x157f, 0x037f, 0x027f, 0x017f, 0x0f7f, 0x0c7f, 0x007c, 0x0c7e, + 0x007e, 0x017e, 0x027e, 0x037e, 0x157e, 0x2011, 0xab83, 0x2204, + 0x8211, 0x220c, 0x1078, 0x254d, 0x00c0, 0x9f84, 0x1078, 0x45c4, + 0x00c0, 0x9f84, 0x2011, 0xab96, 0xac98, 0x000a, 0x20a9, 0x0004, + 0x1078, 0x80de, 0x00c0, 0x9f84, 0x2011, 0xab9a, 0xac98, 0x0006, + 0x20a9, 0x0004, 0x1078, 0x80de, 0x157f, 0x037f, 0x027f, 0x017f, + 0x007f, 0x0c7f, 0x007c, 0x0e7e, 0x0c7e, 0x087e, 0x077e, 0x067e, + 0x057e, 0x047e, 0x027e, 0x127e, 0x2091, 0x8000, 0x2740, 0x2029, + 0xa8ba, 0x252c, 0x2021, 0xa8c0, 0x2424, 0x2061, 0xad00, 0x2071, + 0xa600, 0x7648, 0x7064, 0x81ff, 0x0040, 0x9fb2, 0x007e, 0xa186, + 0xa9b3, 0x007f, 0x0040, 0x9fb2, 0x8001, 0xa602, 0x00c8, 0xa01c, + 0x0078, 0x9fb5, 0xa606, 0x0040, 0xa01c, 0x2100, 0xac06, 0x0040, + 0xa012, 0x1078, 0xa242, 0x0040, 0xa012, 0x671c, 0xa786, 0x0001, + 0x0040, 0xa037, 0xa786, 0x0004, 0x0040, 0xa037, 0xa786, 0x0007, + 0x0040, 0xa012, 0x2500, 0xac06, 0x0040, 0xa012, 0x2400, 0xac06, + 0x0040, 0xa012, 0x1078, 0xa256, 0x00c0, 0xa012, 0x88ff, 0x0040, + 0x9fdd, 0x6020, 0xa906, 0x00c0, 0xa012, 0x0d7e, 0x6000, 0xa086, + 0x0004, 0x00c0, 0x9fe7, 0x017e, 0x1078, 0x1757, 0x017f, 0xa786, + 0x0008, 0x00c0, 0x9ff6, 0x1078, 0x8f00, 0x00c0, 0x9ff6, 0x1078, + 0x7c83, 0x0d7f, 0x1078, 0x8ec6, 0x0078, 0xa012, 0x6010, 0x2068, + 0x1078, 0x8d06, 0x0040, 0xa00f, 0xa786, 0x0003, 0x00c0, 0xa026, + 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, 0x1078, 0xa4e2, 0x017e, + 0x1078, 0x8f7d, 0x1078, 0x4a73, 0x017f, 0x1078, 0x8eb9, 0x0d7f, + 0x1078, 0x8ec6, 0xace0, 0x0010, 0x2001, 0xa616, 0x2004, 0xac02, + 0x00c8, 0xa01c, 0x0078, 0x9f9f, 0x127f, 0x027f, 0x047f, 0x057f, + 0x067f, 0x077f, 0x087f, 0x0c7f, 0x0e7f, 0x007c, 0xa786, 0x0006, + 0x00c0, 0xa000, 0xa386, 0x0005, 0x0040, 0xa034, 0x1078, 0xa4e2, + 0x1078, 0xa1ca, 0x0078, 0xa00f, 0x0d7f, 0x0078, 0xa012, 0x1078, + 0xa256, 0x00c0, 0xa012, 0x81ff, 0x0040, 0xa012, 0xa180, 0x0001, + 0x2004, 0xa086, 0x0018, 0x0040, 0xa04c, 0xa180, 0x0001, 0x2004, + 0xa086, 0x002d, 0x00c0, 0xa012, 0x6000, 0xa086, 0x0002, 0x00c0, + 0xa012, 0x1078, 0x8eec, 0x0040, 0xa05d, 0x1078, 0x8f00, 0x00c0, + 0xa012, 0x1078, 0x7c83, 0x0078, 0xa065, 0x1078, 0x28a6, 0x1078, + 0x8f00, 0x00c0, 0xa065, 0x1078, 0x7c83, 0x1078, 0x8ec6, 0x0078, + 0xa012, 0x0c7e, 0x0e7e, 0x017e, 0x2c08, 0x2170, 0xa006, 0x1078, + 0xa1e6, 0x017f, 0x0040, 0xa079, 0x601c, 0xa084, 0x000f, 0x1079, + 0xa07c, 0x0e7f, 0x0c7f, 0x007c, 0xa084, 0xa084, 0xa084, 0xa084, + 0xa084, 0xa084, 0xa086, 0xa084, 0xa006, 0x007c, 0x047e, 0x017e, + 0x7018, 0xa080, 0x0028, 0x2024, 0xa4a4, 0x00ff, 0x8427, 0x2c00, + 0x2009, 0x0020, 0x1078, 0xa21d, 0x017f, 0x047f, 0x037e, 0x2019, + 0x0002, 0x1078, 0x9dc7, 0x037f, 0xa085, 0x0001, 0x007c, 0x2001, + 0x0001, 0x1078, 0x44ee, 0x157e, 0x017e, 0x027e, 0x037e, 0x20a9, + 0x0004, 0x2019, 0xa605, 0x2011, 0xab96, 0x1078, 0x80de, 0x037f, + 0x027f, 0x017f, 0x157f, 0xa005, 0x007c, 0x0f7e, 0x0e7e, 0x0c7e, + 0x087e, 0x077e, 0x067e, 0x027e, 0x127e, 0x2091, 0x8000, 0x2740, + 0x2061, 0xad00, 0x2079, 0x0001, 0x8fff, 0x0040, 0xa11d, 0x2071, + 0xa600, 0x7648, 0x7064, 0x8001, 0xa602, 0x00c8, 0xa11d, 0x88ff, + 0x0040, 0xa0d8, 0x2800, 0xac06, 0x00c0, 0xa113, 0x2079, 0x0000, + 0x1078, 0xa242, 0x0040, 0xa113, 0x2400, 0xac06, 0x0040, 0xa113, + 0x671c, 0xa786, 0x0006, 0x00c0, 0xa113, 0xa786, 0x0007, 0x0040, + 0xa113, 0x88ff, 0x00c0, 0xa0f7, 0x6018, 0xa206, 0x00c0, 0xa113, + 0x85ff, 0x0040, 0xa0f7, 0x6020, 0xa106, 0x00c0, 0xa113, 0x0d7e, + 0x6000, 0xa086, 0x0004, 0x00c0, 0xa103, 0x1078, 0xa495, 0x601f, + 0x0007, 0x1078, 0x1757, 0x6010, 0x2068, 0x1078, 0x8d06, 0x0040, + 0xa10d, 0x047e, 0x1078, 0xa1ca, 0x047f, 0x0d7f, 0x1078, 0x8ec6, + 0x88ff, 0x00c0, 0xa127, 0xace0, 0x0010, 0x2001, 0xa616, 0x2004, + 0xac02, 0x00c8, 0xa11d, 0x0078, 0xa0c4, 0xa006, 0x127f, 0x027f, + 0x067f, 0x077f, 0x087f, 0x0c7f, 0x0e7f, 0x0f7f, 0x007c, 0xa8c5, + 0x0001, 0x0078, 0xa11e, 0x077e, 0x057e, 0x087e, 0x2041, 0x0000, + 0x2029, 0x0001, 0x2c20, 0x2019, 0x0002, 0x6218, 0x097e, 0x2049, + 0x0000, 0x1078, 0x7246, 0x097f, 0x087f, 0x2039, 0x0000, 0x1078, + 0x72f3, 0x1078, 0xa0b5, 0x057f, 0x077f, 0x007c, 0x027e, 0x047e, + 0x057e, 0x077e, 0x0c7e, 0x157e, 0x2c20, 0x2128, 0x20a9, 0x007f, + 0x2009, 0x0000, 0x017e, 0x037e, 0x1078, 0x45c4, 0x00c0, 0xa16e, + 0x2c10, 0x057e, 0x087e, 0x2041, 0x0000, 0x2508, 0x2029, 0x0001, + 0x097e, 0x2049, 0x0000, 0x1078, 0x7246, 0x097f, 0x087f, 0x2039, + 0x0000, 0x1078, 0x72f3, 0x1078, 0xa0b5, 0x057f, 0x037f, 0x017f, + 0x8108, 0x00f0, 0xa152, 0x157f, 0x0c7f, 0x077f, 0x057f, 0x047f, + 0x027f, 0x007c, 0x077e, 0x057e, 0x6218, 0x087e, 0x2041, 0x0000, + 0x2029, 0x0001, 0x2019, 0x0048, 0x097e, 0x2049, 0x0000, 0x1078, + 0x7246, 0x097f, 0x087f, 0x2039, 0x0000, 0x1078, 0x72f3, 0x2c20, + 0x1078, 0xa0b5, 0x057f, 0x077f, 0x007c, 0x027e, 0x047e, 0x057e, + 0x077e, 0x0c7e, 0x157e, 0x2c20, 0x20a9, 0x007f, 0x2009, 0x0000, + 0x017e, 0x037e, 0x1078, 0x45c4, 0x00c0, 0xa1be, 0x2c10, 0x087e, + 0x2041, 0x0000, 0x2828, 0x047e, 0x2021, 0x0001, 0x1078, 0xa472, + 0x047f, 0x097e, 0x2049, 0x0000, 0x1078, 0x7246, 0x097f, 0x087f, + 0x2039, 0x0000, 0x1078, 0x72f3, 0x1078, 0xa0b5, 0x037f, 0x017f, + 0x8108, 0x00f0, 0xa1a0, 0x157f, 0x0c7f, 0x077f, 0x057f, 0x047f, + 0x027f, 0x007c, 0x017e, 0x0f7e, 0xad82, 0xcd00, 0x0048, 0xa1e3, + 0xad82, 0xffff, 0x00c8, 0xa1e3, 0x6800, 0xa07d, 0x0040, 0xa1e0, + 0x6803, 0x0000, 0x6b52, 0x1078, 0x4a73, 0x2f68, 0x0078, 0xa1d4, + 0x6b52, 0x1078, 0x4a73, 0x0f7f, 0x017f, 0x007c, 0x0e7e, 0x047e, + 0x037e, 0x2061, 0xad00, 0xa005, 0x00c0, 0xa1f6, 0x2071, 0xa600, + 0x7448, 0x7064, 0x8001, 0xa402, 0x00c8, 0xa218, 0x2100, 0xac06, + 0x0040, 0xa20a, 0x6000, 0xa086, 0x0000, 0x0040, 0xa20a, 0x6008, + 0xa206, 0x00c0, 0xa20a, 0x6018, 0xa1a0, 0x0006, 0x2424, 0xa406, + 0x0040, 0xa214, 0xace0, 0x0010, 0x2001, 0xa616, 0x2004, 0xac02, + 0x00c8, 0xa218, 0x0078, 0xa1f6, 0xa085, 0x0001, 0x0078, 0xa219, + 0xa006, 0x037f, 0x047f, 0x0e7f, 0x007c, 0x0d7e, 0x007e, 0x1078, + 0x138b, 0x007f, 0x1040, 0x1332, 0x6837, 0x010d, 0x685e, 0x027e, + 0x2010, 0x1078, 0x8cf2, 0x2001, 0x0000, 0x0040, 0xa233, 0x2200, + 0xa080, 0x0008, 0x2004, 0x027f, 0x684a, 0x6956, 0x6c46, 0x684f, + 0x0000, 0xa006, 0x68b2, 0x6802, 0x683a, 0x685a, 0x1078, 0x4a73, + 0x0d7f, 0x007c, 0x6700, 0xa786, 0x0000, 0x0040, 0xa255, 0xa786, + 0x0001, 0x0040, 0xa255, 0xa786, 0x000a, 0x0040, 0xa255, 0xa786, + 0x0009, 0x0040, 0xa255, 0xa085, 0x0001, 0x007c, 0x0e7e, 0x6018, + 0x2070, 0x70a0, 0xa206, 0x0e7f, 0x007c, 0x017e, 0x6004, 0xa08e, + 0x001e, 0x00c0, 0xa277, 0x8007, 0x6130, 0xa18c, 0x00ff, 0xa105, + 0x6032, 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, 0x0005, 0x2001, + 0xa8a3, 0x2004, 0x6016, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x017f, + 0x007c, 0x0005, 0x0005, 0x007c, 0x6024, 0xd0e4, 0x0040, 0xa28d, + 0xd0cc, 0x0040, 0xa287, 0x1078, 0x8fbf, 0x0078, 0xa28d, 0x1078, + 0xa495, 0x1078, 0x5bc1, 0x1078, 0x772d, 0x007c, 0xa280, 0x0007, + 0x2004, 0xa084, 0x000f, 0x0079, 0xa295, 0xa29e, 0xa29e, 0xa29e, + 0xa2a0, 0xa29e, 0xa2a0, 0xa2a0, 0xa29e, 0xa2a0, 0xa006, 0x007c, + 0xa085, 0x0001, 0x007c, 0xa280, 0x0007, 0x2004, 0xa084, 0x000f, + 0x0079, 0xa2aa, 0xa2b3, 0xa2b3, 0xa2b3, 0xa2b3, 0xa2b3, 0xa2b3, + 0xa2be, 0xa2b3, 0xa2b3, 0x6007, 0x003b, 0x602b, 0x0009, 0x6013, + 0x2a00, 0x6003, 0x0001, 0x1078, 0x5d8a, 0x007c, 0x0c7e, 0x2260, + 0x1078, 0xa495, 0x603f, 0x0000, 0x6024, 0xc0f4, 0xc0cc, 0x6026, + 0x0c7f, 0x0d7e, 0x2268, 0xa186, 0x0007, 0x00c0, 0xa31f, 0x6810, + 0xa005, 0x0040, 0xa2dc, 0xa080, 0x0013, 0x2004, 0xd0fc, 0x00c0, + 0xa2dc, 0x0d7f, 0x0078, 0xa2b3, 0x6007, 0x003a, 0x6003, 0x0001, + 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0c7e, 0x2d60, 0x6100, 0xa186, + 0x0002, 0x00c0, 0xa3ad, 0x6010, 0xa005, 0x00c0, 0xa2f6, 0x6000, + 0xa086, 0x0007, 0x10c0, 0x1332, 0x0078, 0xa3ad, 0xa08c, 0xf000, + 0x00c0, 0xa302, 0x0078, 0xa302, 0x2068, 0x6800, 0xa005, 0x00c0, + 0xa2fc, 0x2d00, 0xa080, 0x0013, 0x2004, 0xa084, 0x0003, 0xa086, + 0x0002, 0x00c0, 0xa31b, 0x6010, 0x2068, 0x684c, 0xc0dc, 0xc0f4, + 0x684e, 0x6850, 0xc0f4, 0xc0fc, 0x6852, 0x2009, 0x0043, 0x1078, + 0x9c1e, 0x0078, 0xa3ad, 0x2009, 0x0041, 0x0078, 0xa3a7, 0xa186, + 0x0005, 0x00c0, 0xa366, 0x6810, 0xa080, 0x0013, 0x2004, 0xd0bc, + 0x00c0, 0xa32d, 0x0d7f, 0x0078, 0xa2b3, 0xd0b4, 0x0040, 0xa335, + 0xd0fc, 0x1040, 0x1332, 0x0078, 0xa2cf, 0x6007, 0x003a, 0x6003, + 0x0001, 0x1078, 0x5d8a, 0x1078, 0x62d1, 0x0c7e, 0x2d60, 0x6100, + 0xa186, 0x0002, 0x0040, 0xa348, 0xa186, 0x0004, 0x00c0, 0xa3ad, + 0x2071, 0xa8e7, 0x7000, 0xa086, 0x0003, 0x00c0, 0xa355, 0x7004, + 0xac06, 0x00c0, 0xa355, 0x7003, 0x0000, 0x6810, 0xa080, 0x0013, + 0x200c, 0xc1f4, 0xc1dc, 0x2102, 0x8000, 0x200c, 0xc1f4, 0xc1fc, + 0xc1bc, 0x2102, 0x2009, 0x0042, 0x0078, 0xa3a7, 0x037e, 0x0d7e, + 0x0d7e, 0x1078, 0x138b, 0x037f, 0x1040, 0x1332, 0x6837, 0x010d, + 0x6803, 0x0000, 0x683b, 0x0000, 0x685b, 0x0000, 0x6b5e, 0x6857, + 0x0045, 0x2c00, 0x6862, 0x6034, 0x6872, 0x2360, 0x6024, 0xc0dd, + 0x6026, 0x6018, 0xa080, 0x0028, 0x2004, 0xa084, 0x00ff, 0x8007, + 0x6320, 0x6b4a, 0x6846, 0x684f, 0x0000, 0x6d6a, 0x6e66, 0x686f, + 0x0001, 0x1078, 0x4a73, 0x2019, 0x0045, 0x6008, 0x2068, 0x1078, + 0x9dc7, 0x2d00, 0x600a, 0x601f, 0x0006, 0x6003, 0x0007, 0x6017, + 0x0000, 0x603f, 0x0000, 0x0d7f, 0x037f, 0x0078, 0xa3ae, 0x603f, + 0x0000, 0x6003, 0x0007, 0x1078, 0x9c1e, 0x0c7f, 0x0d7f, 0x007c, + 0xa186, 0x0013, 0x00c0, 0xa3ba, 0x6004, 0xa082, 0x0085, 0x2008, + 0x0079, 0xa3d4, 0xa186, 0x0027, 0x00c0, 0xa3cd, 0x1078, 0x61cd, + 0x037e, 0x0d7e, 0x6010, 0x2068, 0x2019, 0x0004, 0x1078, 0xa1ca, + 0x0d7f, 0x037f, 0x1078, 0x62d1, 0x007c, 0xa186, 0x0014, 0x0040, + 0xa3be, 0x1078, 0x7773, 0x007c, 0xa3dd, 0xa3db, 0xa3db, 0xa3db, + 0xa3db, 0xa3db, 0xa3dd, 0x1078, 0x1332, 0x1078, 0x61cd, 0x6003, + 0x000c, 0x1078, 0x62d1, 0x007c, 0xa182, 0x008c, 0x00c8, 0xa3ee, + 0xa182, 0x0085, 0x0048, 0xa3ee, 0x0079, 0xa3f1, 0x1078, 0x7773, + 0x007c, 0xa3f8, 0xa3f8, 0xa3f8, 0xa3f8, 0xa3fa, 0xa419, 0xa3f8, + 0x1078, 0x1332, 0x0d7e, 0x2c68, 0x1078, 0x76c7, 0x0040, 0xa414, + 0x6003, 0x0001, 0x6007, 0x001e, 0x2009, 0xab8e, 0x210c, 0x6136, + 0x2009, 0xab8f, 0x210c, 0x613a, 0x600b, 0xffff, 0x6918, 0x611a, + 0x601f, 0x0004, 0x1078, 0x5d8a, 0x2d60, 0x1078, 0x772d, 0x0d7f, + 0x007c, 0x1078, 0x772d, 0x007c, 0x0e7e, 0x6018, 0x2070, 0x7000, + 0xd0ec, 0x0e7f, 0x007c, 0x6010, 0xa08c, 0xf000, 0x0040, 0xa471, + 0xa080, 0x0013, 0x200c, 0xd1ec, 0x0040, 0xa471, 0x2001, 0xa672, + 0x2004, 0xd0ec, 0x0040, 0xa471, 0x6003, 0x0002, 0x6024, 0xc0e5, + 0x6026, 0xd1ac, 0x0040, 0xa44f, 0x0f7e, 0x2c78, 0x1078, 0x495f, + 0x0f7f, 0x0040, 0xa44f, 0x2001, 0xa8a4, 0x2004, 0x603e, 0x2009, + 0xa672, 0x210c, 0xd1f4, 0x00c0, 0xa46f, 0x0078, 0xa461, 0x2009, + 0xa672, 0x210c, 0xd1f4, 0x0040, 0xa45b, 0x6024, 0xc0e4, 0x6026, + 0xa006, 0x0078, 0xa471, 0x2001, 0xa8a4, 0x200c, 0x8103, 0xa100, + 0x603e, 0x6018, 0xa088, 0x002b, 0x2104, 0xa005, 0x0040, 0xa46c, + 0xa088, 0x0003, 0x0078, 0xa464, 0x2c0a, 0x600f, 0x0000, 0xa085, + 0x0001, 0x007c, 0x017e, 0x0c7e, 0x0e7e, 0x6120, 0xa2f0, 0x002b, + 0x2e04, 0x2060, 0x8cff, 0x0040, 0xa491, 0x84ff, 0x00c0, 0xa484, + 0x6020, 0xa106, 0x00c0, 0xa48c, 0x600c, 0x2072, 0x1078, 0x5bc1, + 0x1078, 0x772d, 0x0078, 0xa48e, 0xacf0, 0x0003, 0x2e64, 0x0078, + 0xa47a, 0x0e7f, 0x0c7f, 0x017f, 0x007c, 0x0d7e, 0x6018, 0xa0e8, + 0x002b, 0x2d04, 0xa005, 0x0040, 0xa4a7, 0xac06, 0x0040, 0xa4a5, + 0x2d04, 0xa0e8, 0x0003, 0x0078, 0xa499, 0x600c, 0x206a, 0x0d7f, + 0x007c, 0x027e, 0x037e, 0x157e, 0x2011, 0xa626, 0x2204, 0xa084, + 0x00ff, 0x2019, 0xab8e, 0x2334, 0xa636, 0x00c0, 0xa4d5, 0x8318, + 0x2334, 0x2204, 0xa084, 0xff00, 0xa636, 0x00c0, 0xa4d5, 0x2011, + 0xab90, 0x6018, 0xa098, 0x000a, 0x20a9, 0x0004, 0x1078, 0x80de, + 0x00c0, 0xa4d5, 0x2011, 0xab94, 0x6018, 0xa098, 0x0006, 0x20a9, + 0x0004, 0x1078, 0x80de, 0x00c0, 0xa4d5, 0x157f, 0x037f, 0x027f, + 0x007c, 0x0e7e, 0x2071, 0xa600, 0x1078, 0x42b8, 0x1078, 0x2677, + 0x0e7f, 0x007c, 0x0e7e, 0x6018, 0x2070, 0x7000, 0xd0fc, 0x0040, + 0xa4eb, 0x1078, 0xa4ed, 0x0e7f, 0x007c, 0x6850, 0xc0e5, 0x6852, + 0x007c, 0x0e7e, 0x0c7e, 0x077e, 0x067e, 0x057e, 0x047e, 0x027e, + 0x017e, 0x127e, 0x2091, 0x8000, 0x2029, 0xa8ba, 0x252c, 0x2021, + 0xa8c0, 0x2424, 0x2061, 0xad00, 0x2071, 0xa600, 0x7648, 0x7064, + 0xa606, 0x0040, 0xa545, 0x671c, 0xa786, 0x0001, 0x0040, 0xa514, + 0xa786, 0x0008, 0x00c0, 0xa53b, 0x2500, 0xac06, 0x0040, 0xa53b, + 0x2400, 0xac06, 0x0040, 0xa53b, 0x1078, 0xa242, 0x0040, 0xa53b, + 0x1078, 0xa256, 0x00c0, 0xa53b, 0x6000, 0xa086, 0x0004, 0x00c0, + 0xa52d, 0x017e, 0x1078, 0x1757, 0x017f, 0x1078, 0x8eec, 0x00c0, + 0xa533, 0x1078, 0x28a6, 0x1078, 0x8f00, 0x00c0, 0xa539, 0x1078, + 0x7c83, 0x1078, 0x8ec6, 0xace0, 0x0010, 0x2001, 0xa616, 0x2004, + 0xac02, 0x00c8, 0xa545, 0x0078, 0xa504, 0x127f, 0x017f, 0x027f, + 0x047f, 0x057f, 0x067f, 0x077f, 0x0c7f, 0x0e7f, 0x007c, 0x127e, + 0x007e, 0x0e7e, 0x017e, 0x2091, 0x8000, 0x2071, 0xa640, 0xd5a4, + 0x0040, 0xa55d, 0x7034, 0x8000, 0x7036, 0xd5b4, 0x0040, 0xa563, + 0x7030, 0x8000, 0x7032, 0xd5ac, 0x0040, 0xa579, 0x2500, 0xa084, + 0x0007, 0xa08e, 0x0003, 0x0040, 0xa579, 0xa08e, 0x0004, 0x0040, + 0xa579, 0xa08e, 0x0005, 0x0040, 0xa579, 0x2071, 0xa64a, 0x1078, + 0xa5ba, 0x017f, 0x0e7f, 0x007f, 0x127f, 0x007c, 0x127e, 0x007e, + 0x0e7e, 0x017e, 0x2091, 0x8000, 0x2071, 0xa640, 0xd5a4, 0x0040, + 0xa58c, 0x7034, 0x8000, 0x7036, 0xd5b4, 0x0040, 0xa592, 0x7030, + 0x8000, 0x7032, 0xd5ac, 0x0040, 0xa5a8, 0x2500, 0xa084, 0x0007, + 0xa08e, 0x0003, 0x0040, 0xa5a8, 0xa08e, 0x0004, 0x0040, 0xa5a8, + 0xa08e, 0x0005, 0x0040, 0xa5a8, 0x2071, 0xa64a, 0x1078, 0xa5ba, + 0x017f, 0x0e7f, 0x007f, 0x127f, 0x007c, 0x127e, 0x007e, 0x0e7e, + 0x2091, 0x8000, 0x2071, 0xa642, 0x1078, 0xa5ba, 0x0e7f, 0x007f, + 0x127f, 0x007c, 0x2e04, 0x8000, 0x2072, 0x00c8, 0xa5c3, 0x8e70, + 0x2e04, 0x8000, 0x2072, 0x007c, 0x0e7e, 0x2071, 0xa640, 0x1078, + 0xa5ba, 0x0e7f, 0x007c, 0x0e7e, 0x2071, 0xa644, 0x1078, 0xa5ba, + 0x0e7f, 0x007c, 0x127e, 0x007e, 0x0e7e, 0x2091, 0x8000, 0x2071, + 0xa640, 0x7044, 0x8000, 0x7046, 0x0e7f, 0x007f, 0x127f, 0x007c, + 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, + 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000, + 0xa50c +}; +#ifdef UNIQUE_FW_NAME +unsigned short fw2100tp_length01 = 0x95f1; +#else +unsigned short risc_code_length01 = 0x95f1; +#endif + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/ql2200_fw.c 999-mjb/drivers/scsi/qla2xxx/ql2200_fw.c --- 000-virgin/drivers/scsi/qla2xxx/ql2200_fw.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/ql2200_fw.c 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,5321 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + *************************************************************************/ + +/* + * Firmware Version 2.02.06 (08:46 Jun 26, 2003) + */ + +#ifdef UNIQUE_FW_NAME +unsigned short fw2200tp_version = 2*1024+2; +#else +unsigned short risc_code_version = 2*1024+2; +#endif + +#ifdef UNIQUE_FW_NAME +unsigned char fw2200tp_version_str[] = {2,2,6}; +#else +unsigned char firmware_version[] = {2,2,6}; +#endif + +#ifdef UNIQUE_FW_NAME +#define fw2200tp_VERSION_STRING "2.02.06" +#else +#define FW_VERSION_STRING "2.02.06" +#endif + +#ifdef UNIQUE_FW_NAME +unsigned short fw2200tp_addr01 = 0x1000 ; +#else +unsigned short risc_code_addr01 = 0x1000 ; +#endif + +#ifdef UNIQUE_FW_NAME +unsigned short fw2200tp_code01[] = { +#else +unsigned short risc_code01[] = { +#endif + 0x0470, 0x0000, 0x0000, 0xa46f, 0x0000, 0x0002, 0x0002, 0x0006, + 0x0017, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, + 0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, + 0x5449, 0x4f4e, 0x2049, 0x5350, 0x3232, 0x3030, 0x2046, 0x6972, + 0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030, + 0x322e, 0x3032, 0x2e30, 0x3620, 0x2020, 0x2020, 0x2400, 0x20c1, + 0x0005, 0x2001, 0x017f, 0x2003, 0x0000, 0x20c9, 0xbaff, 0x2091, + 0x2000, 0x2059, 0x0000, 0x2b78, 0x7823, 0x0004, 0x2089, 0x296a, + 0x2051, 0xb500, 0x2a70, 0x2029, 0xed00, 0x2031, 0xffff, 0x2039, + 0xece9, 0x2021, 0x0200, 0x0804, 0x1468, 0x20a1, 0xb46f, 0xa00e, + 0x20a9, 0x0891, 0x41a4, 0x3400, 0x7562, 0x7666, 0x775e, 0x746a, + 0x746e, 0x20a1, 0xbd00, 0x7164, 0x810d, 0x810d, 0x810d, 0x810d, + 0xa18c, 0x000f, 0x2001, 0x000b, 0xa112, 0xa00e, 0x21a8, 0x41a4, + 0x3400, 0x8211, 0x1dd8, 0x7164, 0x3400, 0xa102, 0x0120, 0x0218, + 0x20a8, 0xa00e, 0x41a4, 0x3800, 0xd08c, 0x01d8, 0x2009, 0xb500, + 0x810d, 0x810d, 0x810d, 0x810d, 0xa18c, 0x000f, 0x2001, 0x0001, + 0xa112, 0x20a1, 0x1000, 0xa00e, 0x21a8, 0x41a4, 0x8211, 0x1de0, + 0x2009, 0xb500, 0x3400, 0xa102, 0x0120, 0x0218, 0x20a8, 0xa00e, + 0x41a4, 0x080c, 0x1411, 0x080c, 0x1632, 0x080c, 0x17cf, 0x080c, + 0x1fa2, 0x080c, 0x4bff, 0x080c, 0x85bf, 0x080c, 0x15bb, 0x080c, + 0x2ec4, 0x080c, 0x5d8a, 0x080c, 0x5341, 0x080c, 0x68ce, 0x080c, + 0x2510, 0x080c, 0x6b61, 0x080c, 0x63bb, 0x080c, 0x23ca, 0x080c, + 0x24de, 0x2091, 0x3009, 0x7823, 0x0000, 0x1004, 0x10c5, 0x7820, + 0xa086, 0x0002, 0x1150, 0x7823, 0x4000, 0x0e04, 0x10bd, 0x781b, + 0x0001, 0x2091, 0x5000, 0x2091, 0x4080, 0x2a70, 0x7003, 0x0000, + 0x2a70, 0x7000, 0xa08e, 0x0003, 0x1158, 0x080c, 0x3f08, 0x080c, + 0x2eeb, 0x080c, 0x5dd8, 0x080c, 0x54f0, 0x080c, 0x68f9, 0x0c80, + 0x000b, 0x0c98, 0x10e4, 0x10e5, 0x1210, 0x10e2, 0x12dd, 0x140e, + 0x140f, 0x1410, 0x080c, 0x1515, 0x0005, 0x0126, 0x00f6, 0x2091, + 0x8000, 0x7000, 0xa086, 0x0001, 0x1904, 0x11ed, 0x080c, 0x1588, + 0x080c, 0x5acf, 0x0150, 0x080c, 0x5af5, 0x15c0, 0x2079, 0x0100, + 0x7828, 0xa085, 0x1800, 0x782a, 0x0488, 0x080c, 0x5a07, 0x7000, + 0xa086, 0x0001, 0x1904, 0x11ed, 0x708c, 0xa086, 0x0028, 0x1904, + 0x11ed, 0x2001, 0x0161, 0x2003, 0x0001, 0x2079, 0x0100, 0x7827, + 0xffff, 0x7a28, 0xa295, 0x1e2f, 0x7a2a, 0x2011, 0x59a2, 0x080c, + 0x699c, 0x2011, 0x5995, 0x080c, 0x6a5c, 0x2011, 0x59e4, 0x080c, + 0x699c, 0x2011, 0x4adc, 0x080c, 0x699c, 0x2011, 0x8030, 0x2019, + 0x0000, 0x708b, 0x0000, 0x080c, 0x1de9, 0x00e8, 0x080c, 0x448f, + 0x2079, 0x0100, 0x7844, 0xa005, 0x1904, 0x11ed, 0x2011, 0x4adc, + 0x080c, 0x699c, 0x2011, 0x59e4, 0x080c, 0x699c, 0x080c, 0x1de9, + 0x2001, 0xb78d, 0x2004, 0x780e, 0x7840, 0xa084, 0xfffb, 0x7842, + 0x2011, 0x8010, 0x73cc, 0x080c, 0x3ecc, 0x723c, 0xc284, 0x723e, + 0x2001, 0xb50c, 0x200c, 0xc1ac, 0x2102, 0x080c, 0x7f35, 0x2011, + 0x0004, 0x080c, 0x9c60, 0x080c, 0x524d, 0x080c, 0x5acf, 0x0158, + 0x080c, 0x4be8, 0x0140, 0x708b, 0x0001, 0x70c7, 0x0000, 0x080c, + 0x462c, 0x0804, 0x11ed, 0x080c, 0x5309, 0x0120, 0x7a0c, 0xc2b4, + 0x7a0e, 0x0060, 0x7073, 0x0000, 0x080c, 0xa008, 0x70d4, 0xd09c, + 0x1128, 0x70a0, 0xa005, 0x0110, 0x080c, 0x4bc6, 0x70df, 0x0000, + 0x70db, 0x0000, 0x72d4, 0x080c, 0x5acf, 0x1178, 0x2011, 0x0000, + 0x0016, 0x080c, 0x28eb, 0x2019, 0xb78f, 0x211a, 0x001e, 0x7053, + 0xffff, 0x7057, 0x00ef, 0x7077, 0x0000, 0x2079, 0xb552, 0x7804, + 0xd0ac, 0x0108, 0xc295, 0x72d6, 0x080c, 0x5acf, 0x0118, 0xa296, + 0x0004, 0x0548, 0x2011, 0x0001, 0x080c, 0x9c60, 0x709b, 0x0000, + 0x709f, 0xffff, 0x7003, 0x0002, 0x2079, 0x0100, 0x7827, 0x0003, + 0x7828, 0xa085, 0x0003, 0x782a, 0x00fe, 0x080c, 0x2ab8, 0x2011, + 0x0005, 0x080c, 0x8075, 0x080c, 0x7173, 0x080c, 0x5acf, 0x0148, + 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x28eb, 0x61e2, 0x001e, + 0x00ce, 0x012e, 0x0420, 0x709b, 0x0000, 0x709f, 0xffff, 0x7003, + 0x0002, 0x00f6, 0x2079, 0x0100, 0x7827, 0x0003, 0x7828, 0xa085, + 0x0003, 0x782a, 0x00fe, 0x2011, 0x0005, 0x080c, 0x8075, 0x080c, + 0x7173, 0x080c, 0x5acf, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, + 0x080c, 0x28eb, 0x61e2, 0x001e, 0x00ce, 0x00fe, 0x012e, 0x0005, + 0x00c6, 0x080c, 0x5acf, 0x1118, 0x20a9, 0x0100, 0x0010, 0x20a9, + 0x0082, 0x080c, 0x5acf, 0x1118, 0x2009, 0x0000, 0x0010, 0x2009, + 0x007e, 0x080c, 0x2d97, 0x8108, 0x1f04, 0x1201, 0x00ce, 0x7073, + 0x0000, 0x7074, 0xa084, 0x00ff, 0x7076, 0x70a3, 0x0000, 0x0005, + 0x0126, 0x2091, 0x8000, 0x7000, 0xa086, 0x0002, 0x1904, 0x12db, + 0x709c, 0xa086, 0xffff, 0x0130, 0x080c, 0x2ab8, 0x080c, 0x7173, + 0x0804, 0x12db, 0x70d4, 0xd0ac, 0x1110, 0xd09c, 0x0540, 0xd084, + 0x0530, 0x0006, 0x0016, 0x2001, 0x0103, 0x2009, 0xb78d, 0x210c, + 0x2102, 0x001e, 0x000e, 0xd08c, 0x01d0, 0x70d8, 0xa086, 0xffff, + 0x0190, 0x080c, 0x2c17, 0x080c, 0x7173, 0x70d4, 0xd094, 0x1904, + 0x12db, 0x2011, 0x0001, 0x2019, 0x0000, 0x080c, 0x2c4f, 0x080c, + 0x7173, 0x0804, 0x12db, 0x70dc, 0xa005, 0x1904, 0x12db, 0x7098, + 0xa005, 0x1904, 0x12db, 0x70d4, 0xd0a4, 0x0118, 0xd0b4, 0x0904, + 0x12db, 0x080c, 0x5309, 0x1904, 0x12db, 0x2001, 0xb553, 0x2004, + 0xd0ac, 0x01c8, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x2009, 0x0000, + 0x0016, 0x080c, 0x4fa9, 0x1118, 0x6000, 0xd0ec, 0x1138, 0x001e, + 0x8108, 0x1f04, 0x1268, 0x00ce, 0x015e, 0x0028, 0x001e, 0x00ce, + 0x015e, 0x0804, 0x12db, 0x0006, 0x0016, 0x2001, 0x0103, 0x2009, + 0xb78d, 0x210c, 0x2102, 0x001e, 0x000e, 0x71a8, 0x81ff, 0x11b0, + 0xa006, 0x2009, 0x0200, 0x20a9, 0x0002, 0x20a1, 0xb7de, 0x40a1, + 0x2009, 0x0700, 0x20a9, 0x0002, 0x20a1, 0xb7ce, 0x40a1, 0x7070, + 0x8007, 0x7174, 0x810f, 0x20a9, 0x0002, 0x40a1, 0x20a1, 0xb7d2, + 0x2009, 0x0000, 0x080c, 0x14fb, 0x2001, 0x0000, 0x810f, 0x20a9, + 0x0002, 0x40a1, 0x7030, 0xc08c, 0x7032, 0x7003, 0x0003, 0x709f, + 0xffff, 0x080c, 0x1581, 0xa006, 0x080c, 0x27c3, 0x080c, 0x3f3e, + 0x00f6, 0x2079, 0x0100, 0x080c, 0x5af5, 0x0150, 0x080c, 0x5acf, + 0x7828, 0x0118, 0xa084, 0xe1ff, 0x0010, 0xa084, 0xffdf, 0x782a, + 0x00fe, 0x2001, 0xb7e1, 0x2004, 0xa086, 0x0005, 0x1120, 0x2011, + 0x0000, 0x080c, 0x8075, 0x2011, 0x0000, 0x080c, 0x807f, 0x080c, + 0x7173, 0x080c, 0x7230, 0x012e, 0x0005, 0x0016, 0x0046, 0x00f6, + 0x0126, 0x2091, 0x8000, 0x2079, 0x0100, 0x2009, 0xb534, 0x2104, + 0xa005, 0x1110, 0x080c, 0x2917, 0x2009, 0x00f7, 0x080c, 0x4baf, + 0x7940, 0xa18c, 0x0010, 0x7942, 0x7924, 0xd1b4, 0x0110, 0x7827, + 0x0040, 0xd19c, 0x0110, 0x7827, 0x0008, 0x0006, 0x0036, 0x0156, + 0x7954, 0xd1ac, 0x1904, 0x134b, 0x080c, 0x5ae1, 0x0158, 0x080c, + 0x5af5, 0x1128, 0x2001, 0xb79e, 0x2003, 0x0000, 0x0070, 0x080c, + 0x5ad7, 0x0dc0, 0x2001, 0xb79e, 0x2003, 0xaaaa, 0x2001, 0xb79f, + 0x2003, 0x0001, 0x080c, 0x5a07, 0x0058, 0x080c, 0x5acf, 0x0140, + 0x2009, 0x00f8, 0x080c, 0x4baf, 0x7843, 0x0090, 0x7843, 0x0010, + 0x20a9, 0x09c4, 0x7820, 0xd09c, 0x1138, 0x080c, 0x5acf, 0x0138, + 0x7824, 0xd0ac, 0x1904, 0x13f5, 0x1f04, 0x132a, 0x0070, 0x7824, + 0x080c, 0x5aeb, 0x0118, 0xd0ac, 0x1904, 0x13f5, 0xa084, 0x1800, + 0x0d98, 0x7003, 0x0001, 0x0804, 0x13f5, 0x2001, 0x0001, 0x080c, + 0x27c3, 0x0804, 0x1404, 0x7850, 0xa084, 0x0180, 0x7852, 0x782f, + 0x0020, 0x20a9, 0x0046, 0x1d04, 0x1353, 0x080c, 0x6a44, 0x1f04, + 0x1353, 0x7850, 0xa084, 0x0180, 0xa085, 0x0400, 0x7852, 0x782f, + 0x0000, 0x080c, 0x5ae1, 0x0158, 0x080c, 0x5af5, 0x1128, 0x2001, + 0xb79e, 0x2003, 0x0000, 0x0070, 0x080c, 0x5ad7, 0x0dc0, 0x2001, + 0xb79e, 0x2003, 0xaaaa, 0x2001, 0xb79f, 0x2003, 0x0001, 0x080c, + 0x5a07, 0x0020, 0x2009, 0x00f8, 0x080c, 0x4baf, 0x20a9, 0x000e, + 0xe000, 0x1f04, 0x1380, 0x7850, 0xa084, 0x0180, 0xa085, 0x1400, + 0x7852, 0x080c, 0x5acf, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, + 0x2021, 0xe678, 0x2019, 0xea60, 0x7820, 0xd09c, 0x1558, 0x080c, + 0x5acf, 0x05d8, 0x7824, 0xd0ac, 0x1904, 0x13f5, 0x080c, 0x5af5, + 0x1508, 0x0046, 0x2021, 0x0190, 0x8421, 0x1df0, 0x004e, 0x8421, + 0x11c8, 0x7827, 0x0048, 0x20a9, 0x01f4, 0x1d04, 0x13ad, 0x080c, + 0x6a44, 0x1f04, 0x13ad, 0x7824, 0xa084, 0x0068, 0x15c8, 0x2001, + 0xb79e, 0x2003, 0xaaaa, 0x2001, 0xb79f, 0x2003, 0x0001, 0x7003, + 0x0001, 0x0498, 0x1d04, 0x13c6, 0x080c, 0x6a44, 0x8319, 0x1960, + 0x2009, 0xb534, 0x2104, 0x8000, 0x200a, 0xa084, 0xfff0, 0x0120, + 0x200b, 0x0000, 0x080c, 0x2917, 0x00d8, 0x080c, 0x5ae1, 0x1140, + 0xa4a2, 0x0064, 0x1128, 0x080c, 0x5aa6, 0x7003, 0x0001, 0x00a8, + 0x7827, 0x1800, 0xe000, 0xe000, 0x7824, 0x080c, 0x5aeb, 0x0110, + 0xd0ac, 0x1158, 0xa084, 0x1800, 0x09a8, 0x7003, 0x0001, 0x0028, + 0x2001, 0x0001, 0x080c, 0x27c3, 0x0048, 0x2001, 0xb534, 0x2003, + 0x0000, 0x7827, 0x0048, 0x7828, 0xc09d, 0x782a, 0x7850, 0xa084, + 0x0180, 0xa085, 0x0400, 0x7852, 0x015e, 0x003e, 0x000e, 0x080c, + 0x1558, 0x012e, 0x00fe, 0x004e, 0x001e, 0x0005, 0x0005, 0x0005, + 0x0005, 0x2a70, 0x2061, 0xb7c1, 0x2063, 0x0002, 0x6007, 0x0002, + 0x600b, 0x0006, 0x600f, 0x0017, 0x2001, 0xb79e, 0x2003, 0x0000, + 0x708b, 0x0000, 0x2009, 0x0100, 0x2104, 0xa082, 0x0002, 0x0218, + 0x7053, 0xffff, 0x0010, 0x7053, 0x0000, 0x705b, 0xffff, 0x7073, + 0x0000, 0x7077, 0x0000, 0x080c, 0xa008, 0x2061, 0xb78e, 0x6003, + 0x0909, 0x6007, 0x0000, 0x600b, 0x8800, 0x600f, 0x0200, 0x6013, + 0x00ff, 0x6017, 0x000f, 0x601b, 0x0000, 0x601f, 0x07d0, 0x2061, + 0xb796, 0x6003, 0x8000, 0x6007, 0x0000, 0x600b, 0x0000, 0x600f, + 0x0200, 0x6013, 0x00ff, 0x6017, 0x0000, 0x601b, 0x0001, 0x601f, + 0x0000, 0x2061, 0xb7b9, 0x6003, 0x514c, 0x6007, 0x4f47, 0x600b, + 0x4943, 0x600f, 0x2020, 0x2001, 0xb528, 0x2003, 0x0000, 0x0005, + 0x04a0, 0x2011, 0x0000, 0x81ff, 0x0570, 0xa186, 0x0001, 0x1148, + 0x2031, 0x8fff, 0x2039, 0xd501, 0x2021, 0x0100, 0x2029, 0xd500, + 0x00e8, 0xa186, 0x0002, 0x1118, 0x2011, 0x0000, 0x00b8, 0xa186, + 0x0005, 0x1118, 0x2011, 0x0001, 0x0088, 0xa186, 0x0009, 0x1118, + 0x2011, 0x0002, 0x0058, 0xa186, 0x000a, 0x1118, 0x2011, 0x0002, + 0x0028, 0xa186, 0x0055, 0x1110, 0x2011, 0x0003, 0x3800, 0xa084, + 0xfffc, 0xa205, 0x20c0, 0x0804, 0x104d, 0xa00e, 0x2011, 0x0003, + 0x2019, 0x14a4, 0x0804, 0x14f5, 0x2019, 0xaaaa, 0x2061, 0xffff, + 0x2c14, 0x2362, 0xe000, 0xe000, 0x2c04, 0xa306, 0x2262, 0x1110, + 0xc1b5, 0xc1a5, 0x2011, 0x0000, 0x2019, 0x14b7, 0x04f0, 0x2019, + 0xaaaa, 0x2061, 0xffff, 0x2c14, 0x2362, 0xe000, 0xe000, 0x2c1c, + 0x2061, 0x7fff, 0xe000, 0xe000, 0x2c04, 0x2061, 0xffff, 0x2262, + 0xa306, 0x0110, 0xc18d, 0x0008, 0xc185, 0x2011, 0x0002, 0x2019, + 0x14d2, 0x0418, 0x2061, 0xffff, 0x2019, 0xaaaa, 0x2c14, 0x2362, + 0xe000, 0xe000, 0x2c04, 0x2262, 0xa306, 0x1180, 0x2c14, 0x2362, + 0xe000, 0xe000, 0x2c1c, 0x2061, 0x7fff, 0x2c04, 0x2061, 0xffff, + 0x2262, 0xa306, 0x1110, 0xc195, 0x0008, 0xc19d, 0x2011, 0x0001, + 0x2019, 0x14f3, 0x0010, 0x0804, 0x1469, 0x3800, 0xa084, 0xfffc, + 0xa205, 0x20c0, 0x0837, 0x2011, 0x0000, 0x080c, 0x4fa9, 0x1178, + 0x6004, 0xa0c4, 0x00ff, 0xa8c6, 0x0006, 0x0128, 0xa0c4, 0xff00, + 0xa8c6, 0x0600, 0x1120, 0xa186, 0x0080, 0x0108, 0x8210, 0x8108, + 0xa186, 0x0100, 0x1d50, 0x2208, 0x0005, 0x2091, 0x8000, 0x0e04, + 0x1517, 0x0006, 0x0016, 0x2079, 0x0000, 0x7818, 0xd084, 0x1de8, + 0x001e, 0x792e, 0x000e, 0x782a, 0x000e, 0x7826, 0x3900, 0x783a, + 0x7823, 0x8002, 0x781b, 0x0001, 0x2091, 0x5000, 0x0126, 0x0156, + 0x0146, 0x20a9, 0x0010, 0x20a1, 0xb90c, 0x2091, 0x2000, 0x40a1, + 0x20a9, 0x0010, 0x2091, 0x2200, 0x40a1, 0x20a9, 0x0010, 0x2091, + 0x2400, 0x40a1, 0x20a9, 0x0010, 0x2091, 0x2600, 0x40a1, 0x20a9, + 0x0010, 0x2091, 0x2800, 0x40a1, 0x014e, 0x015e, 0x012e, 0x2079, + 0xb500, 0x7803, 0x0005, 0x2091, 0x4080, 0x04c9, 0x0cf8, 0x0005, + 0x0006, 0x080c, 0x15a3, 0x1518, 0x00f6, 0x2079, 0xb524, 0x2f04, + 0x8000, 0x207a, 0xa082, 0x000f, 0x0258, 0xa006, 0x207a, 0x2079, + 0xb526, 0x2f04, 0xa084, 0x0001, 0xa086, 0x0001, 0x207a, 0x0070, + 0x2079, 0xb526, 0x2f7c, 0x8fff, 0x1128, 0x2001, 0x0c03, 0x2003, + 0x0040, 0x0020, 0x2001, 0x0c03, 0x2003, 0x00c0, 0x00fe, 0x000e, + 0x0005, 0x0409, 0x1120, 0x2001, 0x0c03, 0x2003, 0x0080, 0x0005, + 0x00d1, 0x1120, 0x2001, 0x0c03, 0x2003, 0x0040, 0x0005, 0x0006, + 0x0091, 0x1178, 0x2001, 0x0c03, 0x2003, 0x0040, 0x2009, 0x0fff, + 0x00a1, 0x2001, 0x0c03, 0x2003, 0x0080, 0x2009, 0x0fff, 0x0069, + 0x0c88, 0x000e, 0x0005, 0x00c6, 0x2061, 0x0c00, 0x2c04, 0xa084, + 0x00ff, 0xa086, 0x00aa, 0x00ce, 0x0005, 0x0156, 0x0126, 0xa18c, + 0x0fff, 0x21a8, 0x1d04, 0x15b2, 0x2091, 0x6000, 0x1f04, 0x15b2, + 0x012e, 0x015e, 0x0005, 0x2071, 0xb500, 0x7160, 0x712e, 0x2021, + 0x0001, 0xa190, 0x0030, 0xa298, 0x0030, 0x0240, 0x7064, 0xa302, + 0x1228, 0x220a, 0x2208, 0x2310, 0x8420, 0x0ca8, 0x3800, 0xd08c, + 0x0148, 0x7064, 0xa086, 0xb500, 0x0128, 0x7067, 0xb500, 0x2011, + 0x1000, 0x0c48, 0x200b, 0x0000, 0x74b2, 0x74b6, 0x0005, 0x00e6, + 0x0126, 0x2091, 0x8000, 0x2071, 0xb500, 0x70b4, 0xa0ea, 0x0010, + 0x0268, 0x8001, 0x70b6, 0x702c, 0x2068, 0x2d04, 0x702e, 0x206b, + 0x0000, 0x6807, 0x0000, 0x012e, 0x00ee, 0x0005, 0xa06e, 0x0cd8, + 0x00e6, 0x2071, 0xb500, 0x0126, 0x2091, 0x8000, 0x70b4, 0x8001, + 0x0260, 0x70b6, 0x702c, 0x2068, 0x2d04, 0x702e, 0x206b, 0x0000, + 0x6807, 0x0000, 0x012e, 0x00ee, 0x0005, 0xa06e, 0x0cd8, 0x00e6, + 0x0126, 0x2091, 0x8000, 0x2071, 0xb500, 0x702c, 0x206a, 0x2d00, + 0x702e, 0x70b4, 0x8000, 0x70b6, 0x012e, 0x00ee, 0x0005, 0x8dff, + 0x0138, 0x6804, 0x6807, 0x0000, 0x0006, 0x0c49, 0x00de, 0x0cb8, + 0x0005, 0x00e6, 0x2071, 0xb500, 0x70b4, 0xa08a, 0x0010, 0xa00d, + 0x00ee, 0x0005, 0x00e6, 0x2071, 0xb812, 0x7007, 0x0000, 0x701b, + 0x0000, 0x701f, 0x0000, 0x2071, 0x0000, 0x7010, 0xa085, 0x8004, + 0x7012, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6, 0x2270, + 0x700b, 0x0000, 0x2071, 0xb812, 0x7018, 0xa088, 0xb81b, 0x220a, + 0x8000, 0xa084, 0x0007, 0x701a, 0x7004, 0xa005, 0x1128, 0x00f6, + 0x2079, 0x0010, 0x0089, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x00e6, + 0x2071, 0xb812, 0x7004, 0xa005, 0x1128, 0x00f6, 0x2079, 0x0010, + 0x0019, 0x00fe, 0x00ee, 0x0005, 0x7000, 0x0002, 0x1672, 0x16d6, + 0x16f3, 0x16f3, 0x7018, 0x711c, 0xa106, 0x1118, 0x7007, 0x0000, + 0x0005, 0x00d6, 0xa180, 0xb81b, 0x2004, 0x700a, 0x2068, 0x8108, + 0xa18c, 0x0007, 0x711e, 0x7803, 0x0026, 0x6824, 0x7832, 0x6828, + 0x7836, 0x682c, 0x783a, 0x6830, 0x783e, 0x6810, 0x700e, 0x680c, + 0x7016, 0x6804, 0x00de, 0xd084, 0x0120, 0x7007, 0x0001, 0x0029, + 0x0005, 0x7007, 0x0002, 0x00b1, 0x0005, 0x0016, 0x0026, 0x710c, + 0x2011, 0x0040, 0xa182, 0x0040, 0x1210, 0x2110, 0xa006, 0x700e, + 0x7212, 0x8203, 0x7822, 0x7803, 0x0020, 0x7803, 0x0041, 0x002e, + 0x001e, 0x0005, 0x0016, 0x0026, 0x0136, 0x0146, 0x0156, 0x7014, + 0x2098, 0x20a1, 0x0014, 0x7803, 0x0026, 0x710c, 0x2011, 0x0040, + 0xa182, 0x0040, 0x1210, 0x2110, 0xa006, 0x700e, 0x22a8, 0x53a6, + 0x8203, 0x7822, 0x7803, 0x0020, 0x3300, 0x7016, 0x7803, 0x0001, + 0x015e, 0x014e, 0x013e, 0x002e, 0x001e, 0x0005, 0x0136, 0x0146, + 0x0156, 0x2099, 0xb5fa, 0x20a1, 0x0018, 0x20a9, 0x0008, 0x53a3, + 0x7803, 0x0020, 0x0126, 0x2091, 0x8000, 0x7803, 0x0041, 0x7007, + 0x0003, 0x7000, 0xc084, 0x7002, 0x700b, 0xb5f5, 0x012e, 0x015e, + 0x014e, 0x013e, 0x0005, 0x0136, 0x0146, 0x0156, 0x2001, 0xb629, + 0x209c, 0x20a1, 0x0014, 0x7803, 0x0026, 0x2001, 0xb62a, 0x20ac, + 0x53a6, 0x2099, 0xb62b, 0x20a1, 0x0018, 0x20a9, 0x0008, 0x53a3, + 0x7803, 0x0020, 0x0126, 0x2091, 0x8000, 0x7803, 0x0001, 0x7007, + 0x0004, 0x7000, 0xc08c, 0x7002, 0x700b, 0xb626, 0x012e, 0x015e, + 0x014e, 0x013e, 0x0005, 0x0016, 0x00e6, 0x2071, 0xb812, 0x00f6, + 0x2079, 0x0010, 0x7904, 0x7803, 0x0002, 0xd1fc, 0x0120, 0xa18c, + 0x0700, 0x7004, 0x0023, 0x00fe, 0x00ee, 0x001e, 0x0005, 0x166c, + 0x1736, 0x1764, 0x178e, 0x17be, 0x1735, 0x0cf8, 0xa18c, 0x0700, + 0x1528, 0x0136, 0x0146, 0x0156, 0x7014, 0x20a0, 0x2099, 0x0014, + 0x7803, 0x0040, 0x7010, 0x20a8, 0x53a5, 0x3400, 0x7016, 0x015e, + 0x014e, 0x013e, 0x700c, 0xa005, 0x0570, 0x7830, 0x7832, 0x7834, + 0x7836, 0x080c, 0x169d, 0x0005, 0x7008, 0xa080, 0x0002, 0x2003, + 0x0100, 0x7007, 0x0000, 0x080c, 0x166c, 0x0005, 0x7008, 0xa080, + 0x0002, 0x2003, 0x0200, 0x0ca8, 0xa18c, 0x0700, 0x1150, 0x700c, + 0xa005, 0x0188, 0x7830, 0x7832, 0x7834, 0x7836, 0x080c, 0x16b2, + 0x0005, 0x7008, 0xa080, 0x0002, 0x2003, 0x0200, 0x7007, 0x0000, + 0x080c, 0x166c, 0x0005, 0x00d6, 0x7008, 0x2068, 0x7830, 0x6826, + 0x7834, 0x682a, 0x7838, 0x682e, 0x783c, 0x6832, 0x680b, 0x0100, + 0x00de, 0x7007, 0x0000, 0x080c, 0x166c, 0x0005, 0xa18c, 0x0700, + 0x1540, 0x0136, 0x0146, 0x0156, 0x2001, 0xb5f8, 0x2004, 0xa080, + 0x000d, 0x20a0, 0x2099, 0x0014, 0x7803, 0x0040, 0x20a9, 0x0020, + 0x53a5, 0x2001, 0xb5fa, 0x2004, 0xd0bc, 0x0148, 0x2001, 0xb603, + 0x2004, 0xa080, 0x000d, 0x20a0, 0x20a9, 0x0020, 0x53a5, 0x015e, + 0x014e, 0x013e, 0x7007, 0x0000, 0x080c, 0x5e6f, 0x080c, 0x166c, + 0x0005, 0x2011, 0x8003, 0x080c, 0x3ecc, 0x0cf8, 0xa18c, 0x0700, + 0x1148, 0x2001, 0xb628, 0x2003, 0x0100, 0x7007, 0x0000, 0x080c, + 0x166c, 0x0005, 0x2011, 0x8004, 0x080c, 0x3ecc, 0x0cf8, 0x0126, + 0x2091, 0x2200, 0x2079, 0x0030, 0x2071, 0xb823, 0x7003, 0x0000, + 0x700f, 0xb82f, 0x7013, 0xb82f, 0x780f, 0x00f6, 0x7803, 0x0004, + 0x012e, 0x0005, 0x6934, 0xa184, 0x0007, 0x0002, 0x17ee, 0x182c, + 0x17ee, 0x17ee, 0x17ee, 0x1814, 0x17fb, 0x17f2, 0xa085, 0x0001, + 0x0804, 0x1846, 0x684c, 0xd0bc, 0x0dc8, 0x6860, 0x682e, 0x685c, + 0x682a, 0x6858, 0x04c8, 0xa18c, 0x00ff, 0xa186, 0x001e, 0x1d70, + 0x684c, 0xd0bc, 0x0d58, 0x6860, 0x682e, 0x685c, 0x682a, 0x6804, + 0x681a, 0xa080, 0x000d, 0x2004, 0xa084, 0x000f, 0xa080, 0x22e5, + 0x2005, 0x6832, 0x6858, 0x0440, 0xa18c, 0x00ff, 0xa186, 0x0015, + 0x19a8, 0x684c, 0xd0ac, 0x0990, 0x6804, 0x681a, 0xa080, 0x000d, + 0x2004, 0xa084, 0x000f, 0xa080, 0x22e5, 0x2005, 0x6832, 0xa006, + 0x682e, 0x682a, 0x6858, 0x0080, 0x684c, 0xd0ac, 0x0904, 0x17ee, + 0xa006, 0x682e, 0x682a, 0x6858, 0xa18c, 0x000f, 0xa188, 0x22e5, + 0x210d, 0x6932, 0x2d08, 0x691a, 0x6826, 0x684c, 0xc0dd, 0x684e, + 0xa006, 0x680a, 0x697c, 0x6912, 0x6980, 0x6916, 0x0005, 0x684c, + 0xd0ac, 0x090c, 0x1515, 0x6833, 0x22e2, 0x2d08, 0x691a, 0x6858, + 0x8001, 0x6826, 0x684c, 0xc0dd, 0x684e, 0xa006, 0x680a, 0x682e, + 0x682a, 0x697c, 0x6912, 0x6980, 0x6916, 0x0005, 0x20e1, 0x0007, + 0x20e1, 0x2000, 0x2001, 0x020a, 0x2004, 0x82ff, 0x01e8, 0xa280, + 0x0004, 0x00d6, 0x206c, 0x684c, 0xd0dc, 0x1190, 0xa280, 0x0007, + 0x2004, 0xa086, 0x000a, 0x1110, 0x0891, 0x0010, 0x080c, 0x17e2, + 0x0138, 0x00de, 0xa280, 0x0000, 0x2003, 0x0002, 0xa016, 0x0020, + 0x6808, 0x8000, 0x680a, 0x00de, 0x0126, 0x0046, 0x0036, 0x0026, + 0x2091, 0x2200, 0x002e, 0x003e, 0x004e, 0x7000, 0xa005, 0x01d0, + 0x710c, 0x220a, 0x8108, 0x230a, 0x8108, 0x240a, 0x8108, 0xa182, + 0xb84a, 0x0210, 0x2009, 0xb82f, 0x710e, 0x7010, 0xa102, 0xa082, + 0x0009, 0x0118, 0xa080, 0x001b, 0x1118, 0x2009, 0x0138, 0x200a, + 0x012e, 0x0005, 0x7206, 0x2001, 0x18a8, 0x0006, 0x2260, 0x0804, + 0x19d5, 0x0126, 0x0026, 0x0036, 0x00c6, 0x0006, 0x2091, 0x2200, + 0x000e, 0x004e, 0x003e, 0x002e, 0x00d6, 0x00c6, 0x2460, 0x6110, + 0x2168, 0x6a62, 0x6b5e, 0xa005, 0x0904, 0x190a, 0x6808, 0xa005, + 0x0904, 0x1941, 0x7000, 0xa005, 0x1108, 0x0488, 0x700c, 0x7110, + 0xa106, 0x1904, 0x1949, 0x7004, 0xa406, 0x1548, 0x2001, 0x0005, + 0x2004, 0xd08c, 0x0168, 0x0046, 0x080c, 0x1b06, 0x004e, 0x2460, + 0x6010, 0xa080, 0x0002, 0x2004, 0xa005, 0x0904, 0x1941, 0x0c10, + 0x2001, 0x0207, 0x2004, 0xd09c, 0x1d48, 0x7804, 0xa084, 0x6000, + 0x0120, 0xa086, 0x6000, 0x0108, 0x0c08, 0x7818, 0x6812, 0x781c, + 0x6816, 0x7803, 0x0004, 0x7003, 0x0000, 0x7004, 0x2060, 0x6100, + 0xa18e, 0x0004, 0x1904, 0x1949, 0x2009, 0x0048, 0x080c, 0x864c, + 0x0804, 0x1949, 0x6808, 0xa005, 0x05a0, 0x7000, 0xa005, 0x0588, + 0x700c, 0x7110, 0xa106, 0x1118, 0x7004, 0xa406, 0x1550, 0x2001, + 0x0005, 0x2004, 0xd08c, 0x0160, 0x0046, 0x080c, 0x1b06, 0x004e, + 0x2460, 0x6010, 0xa080, 0x0002, 0x2004, 0xa005, 0x01d0, 0x0c28, + 0x2001, 0x0207, 0x2004, 0xd09c, 0x1d50, 0x2001, 0x0005, 0x2004, + 0xd08c, 0x1d50, 0x7804, 0xa084, 0x6000, 0x0118, 0xa086, 0x6000, + 0x19f0, 0x7818, 0x6812, 0x781c, 0x6816, 0x7803, 0x0004, 0x7003, + 0x0000, 0x6100, 0xa18e, 0x0004, 0x1120, 0x2009, 0x0048, 0x080c, + 0x864c, 0x00ce, 0x00de, 0x012e, 0x0005, 0x00f6, 0x00e6, 0x0026, + 0x0036, 0x0046, 0x0056, 0x2071, 0xb823, 0x7000, 0xa086, 0x0000, + 0x0904, 0x19b3, 0x7004, 0xac06, 0x1904, 0x19a5, 0x2079, 0x0030, + 0x7000, 0xa086, 0x0003, 0x0904, 0x19a5, 0x7804, 0xd0fc, 0x15c8, + 0x20e1, 0x6000, 0x2011, 0x0032, 0x2001, 0x0208, 0x200c, 0x2001, + 0x0209, 0x2004, 0xa106, 0x1d88, 0x8211, 0x1db0, 0x7804, 0xd0fc, + 0x1540, 0x080c, 0x1e6e, 0x0026, 0x0056, 0x7803, 0x0004, 0x7804, + 0xd0ac, 0x1de8, 0x7803, 0x0002, 0x7803, 0x0009, 0x7003, 0x0003, + 0x7007, 0x0000, 0x005e, 0x002e, 0x2001, 0x015d, 0x2003, 0x0000, + 0x080c, 0x5acf, 0x1138, 0x0066, 0x2031, 0x0001, 0x080c, 0x5b51, + 0x006e, 0x0058, 0x2001, 0x0160, 0x2502, 0x2001, 0x0138, 0x2202, + 0x0020, 0x080c, 0x1b06, 0x0804, 0x1955, 0x0156, 0x20a9, 0x0009, + 0x2009, 0xb82f, 0x2104, 0xac06, 0x1108, 0x200a, 0xa188, 0x0003, + 0x1f04, 0x19aa, 0x015e, 0x005e, 0x004e, 0x003e, 0x002e, 0x00ee, + 0x00fe, 0x0005, 0x700c, 0x7110, 0xa106, 0x0904, 0x1a49, 0x2104, + 0x7006, 0x2060, 0x8108, 0x211c, 0x8108, 0x2124, 0x8108, 0xa182, + 0xb84a, 0x0210, 0x2009, 0xb82f, 0x7112, 0x700c, 0xa106, 0x1128, + 0x080c, 0x28eb, 0x2001, 0x0138, 0x2102, 0x8cff, 0x0598, 0x6010, + 0x2068, 0x2d58, 0x6828, 0xa406, 0x1590, 0x682c, 0xa306, 0x1578, + 0x7004, 0x2060, 0x6020, 0xc0d4, 0x6022, 0x684c, 0xd0f4, 0x0128, + 0x6817, 0xffff, 0x6813, 0xffff, 0x00e8, 0x6850, 0xd0f4, 0x1130, + 0x7803, 0x0004, 0x6810, 0x781a, 0x6814, 0x781e, 0x6824, 0x2050, + 0x6818, 0x2060, 0x6830, 0x2040, 0x6034, 0xa0cc, 0x000f, 0x2009, + 0x0011, 0x080c, 0x1a4c, 0x0120, 0x2009, 0x0001, 0x080c, 0x1a4c, + 0x2d58, 0x0005, 0x080c, 0x1ddd, 0x0904, 0x19ba, 0x0cd0, 0x6020, + 0xd0f4, 0x11e0, 0xd0d4, 0x01b8, 0x6038, 0xa402, 0x6034, 0xa303, + 0x0108, 0x1288, 0x643a, 0x6336, 0x6c2a, 0x6b2e, 0x0046, 0x0036, + 0x2400, 0x6c7c, 0xa402, 0x6812, 0x2300, 0x6b80, 0xa303, 0x6816, + 0x003e, 0x004e, 0x0018, 0x080c, 0x9f9a, 0x09e0, 0x601c, 0xa08e, + 0x0008, 0x0904, 0x19e0, 0xa08e, 0x000a, 0x0904, 0x19e0, 0x2001, + 0xb574, 0x2004, 0xd0b4, 0x1140, 0x6018, 0x2004, 0xd0bc, 0x1120, + 0x6817, 0x7fff, 0x6813, 0xffff, 0x080c, 0x2305, 0x1918, 0x0804, + 0x19e0, 0x7003, 0x0000, 0x0005, 0x8aff, 0x0904, 0x1ae0, 0xa03e, + 0x2730, 0xc9fc, 0x6850, 0xd0fc, 0x11b8, 0xd0f4, 0x1528, 0x00d6, + 0x2805, 0xac68, 0x2900, 0x0002, 0x1a9e, 0x1a82, 0x1a82, 0x1a9e, + 0x1a9e, 0x1a96, 0x1a9e, 0x1a82, 0x1a9e, 0x1a87, 0x1a87, 0x1a9e, + 0x1a9e, 0x1a9e, 0x1a8e, 0x1a87, 0x7803, 0x0004, 0xc0fc, 0x6852, + 0x6b6c, 0x6a70, 0x6d1c, 0x6c20, 0x00d6, 0xd99c, 0x0550, 0x2805, + 0xac68, 0x6f08, 0x6e0c, 0x0430, 0xc0f4, 0x6852, 0x6b6c, 0x6a70, + 0x00d6, 0x0468, 0x6b08, 0x6a0c, 0x6d00, 0x6c04, 0x00d0, 0x6b10, + 0x6a14, 0x6d00, 0x6c04, 0x6f08, 0x6e0c, 0x00a0, 0x00de, 0x00d6, + 0x6834, 0xa084, 0x00ff, 0xa086, 0x001e, 0x1140, 0x00de, 0x080c, + 0x22a7, 0x1904, 0x1a4c, 0xa00e, 0x0804, 0x1ae0, 0x00de, 0x080c, + 0x1515, 0xc9fd, 0x7b22, 0x7a26, 0x7d32, 0x7c36, 0x7f3a, 0x7e3e, + 0x7316, 0x721a, 0x751e, 0x7422, 0x7726, 0x762a, 0x7902, 0x7100, + 0x8108, 0x7102, 0x00de, 0x6828, 0xa300, 0x682a, 0x682c, 0xa201, + 0x682e, 0x8109, 0x2d08, 0x1500, 0xd9fc, 0x0160, 0xc9fc, 0x080c, + 0x22a7, 0x01e8, 0x2805, 0xac68, 0x6800, 0xa506, 0x11c0, 0x6804, + 0xa406, 0x00a8, 0xc9fc, 0x080c, 0x22a7, 0x0188, 0x2805, 0xac68, + 0x6800, 0xa506, 0x1160, 0x6804, 0xa406, 0x1148, 0x6808, 0xa706, + 0x1130, 0x680c, 0xa606, 0x0018, 0xc9fc, 0x080c, 0x22a7, 0x2168, + 0x0005, 0x080c, 0x1515, 0x080c, 0x1f55, 0x7004, 0x2060, 0x00d6, + 0x6010, 0x2068, 0x7003, 0x0000, 0x080c, 0x1dfe, 0x080c, 0x9c5a, + 0x0170, 0x6808, 0x8001, 0x680a, 0x697c, 0x6912, 0x6980, 0x6916, + 0x682b, 0xffff, 0x682f, 0xffff, 0x6850, 0xc0bd, 0x6852, 0x00de, + 0x080c, 0x992a, 0x0804, 0x1d2b, 0x080c, 0x1515, 0x0126, 0x2091, + 0x2200, 0x0006, 0x0016, 0x2b68, 0x6818, 0x2060, 0x7904, 0x7803, + 0x0002, 0xa184, 0x0700, 0x1978, 0xa184, 0x0003, 0xa086, 0x0003, + 0x0d58, 0x7000, 0x0002, 0x1b23, 0x1b29, 0x1c3a, 0x1d06, 0x1d1a, + 0x1b23, 0x1b23, 0x1b23, 0x7804, 0xd09c, 0x1904, 0x1d2b, 0x080c, + 0x1515, 0x8001, 0x7002, 0xd1bc, 0x11a0, 0xd19c, 0x1904, 0x1bbe, + 0xd1dc, 0x1178, 0x8aff, 0x0904, 0x1bbe, 0x2009, 0x0001, 0x080c, + 0x1a4c, 0x0904, 0x1d2b, 0x2009, 0x0001, 0x080c, 0x1a4c, 0x0804, + 0x1d2b, 0x7803, 0x0004, 0x7003, 0x0000, 0xd1bc, 0x1904, 0x1b9e, + 0x0026, 0x0036, 0x7c20, 0x7d24, 0x7e30, 0x7f34, 0x7818, 0x6812, + 0x781c, 0x6816, 0x2001, 0x0201, 0x2004, 0xa005, 0x0140, 0x7808, + 0xd0ec, 0x1128, 0x7803, 0x0009, 0x7003, 0x0004, 0x0010, 0x080c, + 0x1d2f, 0x6b28, 0x6a2c, 0x2400, 0x686e, 0xa31a, 0x2500, 0x6872, + 0xa213, 0x6b2a, 0x6a2e, 0x00c6, 0x7004, 0x2060, 0x6020, 0xd0f4, + 0x1110, 0x633a, 0x6236, 0x00ce, 0x003e, 0x002e, 0x6e1e, 0x6f22, + 0x2500, 0xa405, 0x0128, 0x080c, 0x22bd, 0x6850, 0xc0fd, 0x6852, + 0x2a00, 0x6826, 0x2c00, 0x681a, 0x2800, 0x6832, 0x6808, 0x8001, + 0x680a, 0x1148, 0x684c, 0xd0e4, 0x0130, 0x7004, 0x2060, 0x2009, + 0x0048, 0x080c, 0x864c, 0x7000, 0xa086, 0x0004, 0x0904, 0x1d2b, + 0x7003, 0x0000, 0x080c, 0x19ba, 0x0804, 0x1d2b, 0x0056, 0x7d0c, + 0xd5bc, 0x1110, 0x080c, 0xb407, 0x005e, 0x080c, 0x1dfe, 0x00f6, + 0x7004, 0x2078, 0x080c, 0x5305, 0x0118, 0x7820, 0xc0f5, 0x7822, + 0x00fe, 0x682b, 0xffff, 0x682f, 0xffff, 0x6808, 0x8001, 0x680a, + 0x697c, 0x791a, 0x6980, 0x791e, 0x0804, 0x1d2b, 0x7004, 0x00c6, + 0x2060, 0x6020, 0x00ce, 0xd0f4, 0x0120, 0x6808, 0x8001, 0x680a, + 0x04c0, 0x7818, 0x6812, 0x7a1c, 0x6a16, 0xd19c, 0x0160, 0xa205, + 0x0150, 0x7004, 0xa080, 0x0007, 0x2004, 0xa084, 0xfffd, 0xa086, + 0x0008, 0x1904, 0x1b41, 0x684c, 0xc0f5, 0x684e, 0x7814, 0xa005, + 0x1520, 0x7003, 0x0000, 0x6808, 0x8001, 0x680a, 0x01a0, 0x7004, + 0x2060, 0x601c, 0xa086, 0x000a, 0x11a0, 0x0156, 0x20a9, 0x0009, + 0x2009, 0xb82f, 0x2104, 0xac06, 0x1108, 0x200a, 0xa188, 0x0003, + 0x1f04, 0x1bf2, 0x015e, 0x7004, 0x2060, 0x2009, 0x0048, 0x080c, + 0x864c, 0x080c, 0x19ba, 0x0804, 0x1d2b, 0x7818, 0x6812, 0x781c, + 0x6816, 0x7814, 0x7908, 0xa18c, 0x0fff, 0xa192, 0x0841, 0x1a04, + 0x1ae3, 0xa188, 0x0007, 0x8114, 0x8214, 0x8214, 0xa10a, 0x8104, + 0x8004, 0x8004, 0xa20a, 0x810b, 0x810b, 0x810b, 0x080c, 0x1e99, + 0x7803, 0x0004, 0x780f, 0xffff, 0x7803, 0x0001, 0x7804, 0xd0fc, + 0x0de8, 0x7803, 0x0002, 0x7803, 0x0004, 0x780f, 0x00f6, 0x7004, + 0x7007, 0x0000, 0x2060, 0x2009, 0x0048, 0x080c, 0x864c, 0x080c, + 0x1eef, 0x0838, 0x8001, 0x7002, 0xd194, 0x01b0, 0x7804, 0xd0fc, + 0x1904, 0x1cd6, 0xd09c, 0x0138, 0x7804, 0xd0fc, 0x1904, 0x1cd6, + 0xd09c, 0x1904, 0x1cda, 0x8aff, 0x0904, 0x1d2b, 0x2009, 0x0001, + 0x080c, 0x1a4c, 0x0804, 0x1d2b, 0xa184, 0x0888, 0x1148, 0x8aff, + 0x0904, 0x1d2b, 0x2009, 0x0001, 0x080c, 0x1a4c, 0x0804, 0x1d2b, + 0x7818, 0x6812, 0x7a1c, 0x6a16, 0xa205, 0x0904, 0x1bdb, 0x7803, + 0x0004, 0x7003, 0x0000, 0xd1bc, 0x1904, 0x1cb8, 0x6834, 0xa084, + 0x00ff, 0xa086, 0x0029, 0x1118, 0xd19c, 0x1904, 0x1bdb, 0x0026, + 0x0036, 0x7c20, 0x7d24, 0x7e30, 0x7f34, 0x7818, 0x6812, 0x781c, + 0x6816, 0x2001, 0x0201, 0x2004, 0xa005, 0x0140, 0x7808, 0xd0ec, + 0x1128, 0x7803, 0x0009, 0x7003, 0x0004, 0x0020, 0x0016, 0x080c, + 0x1d2f, 0x001e, 0x6b28, 0x6a2c, 0x080c, 0x22bd, 0x00d6, 0x2805, + 0xac68, 0x6034, 0xd09c, 0x1128, 0x6808, 0xa31a, 0x680c, 0xa213, + 0x0020, 0x6810, 0xa31a, 0x6814, 0xa213, 0x00de, 0xd194, 0x0904, + 0x1b63, 0x2a00, 0x6826, 0x2c00, 0x681a, 0x2800, 0x6832, 0x6808, + 0x8001, 0x680a, 0x6b2a, 0x6a2e, 0x003e, 0x002e, 0x0804, 0x1c01, + 0x0056, 0x7d0c, 0x080c, 0xb407, 0x005e, 0x080c, 0x1dfe, 0x00f6, + 0x7004, 0x2078, 0x080c, 0x5305, 0x0118, 0x7820, 0xc0f5, 0x7822, + 0x00fe, 0x682b, 0xffff, 0x682f, 0xffff, 0x6808, 0x8001, 0x680a, + 0x697c, 0x791a, 0x6980, 0x791e, 0x0804, 0x1d2b, 0x7804, 0xd09c, + 0x0904, 0x1b0e, 0x7c20, 0x7824, 0xa405, 0x1904, 0x1b0e, 0x7818, + 0x6812, 0x7c1c, 0x6c16, 0xa405, 0x1120, 0x7803, 0x0002, 0x0804, + 0x1bdb, 0x751c, 0x7420, 0x7724, 0x7628, 0x7014, 0xa528, 0x7018, + 0xa421, 0xa7b9, 0x0000, 0xa6b1, 0x0000, 0x7830, 0xa506, 0x1150, + 0x7834, 0xa406, 0x1138, 0x7838, 0xa706, 0x1120, 0x783c, 0xa606, + 0x0904, 0x1b0e, 0x7803, 0x0002, 0x0804, 0x1c67, 0x7803, 0x0004, + 0x7003, 0x0000, 0x7004, 0xa00d, 0x0150, 0x6808, 0x8001, 0x680a, + 0x1130, 0x7004, 0x2060, 0x2009, 0x0048, 0x080c, 0x864c, 0x080c, + 0x19ba, 0x0088, 0x7803, 0x0004, 0x7003, 0x0000, 0x7004, 0x2060, + 0x6010, 0xa005, 0x0da0, 0x2068, 0x6808, 0x8000, 0x680a, 0x6c28, + 0x6b2c, 0x080c, 0x19d5, 0x001e, 0x000e, 0x012e, 0x0005, 0x700c, + 0x7110, 0xa106, 0x0904, 0x1dd1, 0x7004, 0x0016, 0x210c, 0xa106, + 0x001e, 0x0904, 0x1dd1, 0x00d6, 0x00c6, 0x216c, 0x2d00, 0xa005, + 0x0904, 0x1dcf, 0x681c, 0xa086, 0x0008, 0x0904, 0x1dcf, 0x6820, + 0xd0d4, 0x1904, 0x1dcf, 0x6810, 0x2068, 0x6850, 0xd0fc, 0x05a8, + 0x8108, 0x2104, 0x6b2c, 0xa306, 0x1904, 0x1dcf, 0x8108, 0x2104, + 0x6a28, 0xa206, 0x1904, 0x1dcf, 0x6850, 0xc0fc, 0xc0f5, 0x6852, + 0x686c, 0x7822, 0x7016, 0x6870, 0x7826, 0x701a, 0x681c, 0x7832, + 0x701e, 0x6820, 0x7836, 0x7022, 0x6818, 0x2060, 0x6034, 0xd09c, + 0x0168, 0x6830, 0x2005, 0x00d6, 0xac68, 0x6808, 0x783a, 0x7026, + 0x680c, 0x783e, 0x702a, 0x00de, 0x0804, 0x1dc9, 0xa006, 0x783a, + 0x783e, 0x7026, 0x702a, 0x0804, 0x1dc9, 0x8108, 0x2104, 0xa005, + 0x1904, 0x1dcf, 0x6b2c, 0xa306, 0x1904, 0x1dcf, 0x8108, 0x2104, + 0xa005, 0x15e8, 0x6a28, 0xa206, 0x15d0, 0x6850, 0xc0f5, 0x6852, + 0x6830, 0x2005, 0x6918, 0xa160, 0xa180, 0x000d, 0x2004, 0xd09c, + 0x11a0, 0x6008, 0x7822, 0x7016, 0x686e, 0x600c, 0x7826, 0x701a, + 0x6872, 0x6000, 0x7832, 0x701e, 0x6004, 0x7836, 0x7022, 0xa006, + 0x783a, 0x783e, 0x7026, 0x702a, 0x00a0, 0x6010, 0x7822, 0x7016, + 0x686e, 0x6014, 0x7826, 0x701a, 0x6872, 0x6000, 0x7832, 0x701e, + 0x6004, 0x7836, 0x7022, 0x6008, 0x783a, 0x7026, 0x600c, 0x783e, + 0x702a, 0x6810, 0x781a, 0x6814, 0x781e, 0x7803, 0x0011, 0x00ce, + 0x00de, 0x0005, 0x2011, 0x0201, 0x2009, 0x003c, 0x2204, 0xa005, + 0x1118, 0x8109, 0x1dd8, 0x0005, 0x0005, 0x0ca1, 0x0118, 0x780c, + 0xd0a4, 0x0120, 0x00d9, 0xa085, 0x0001, 0x0010, 0x080c, 0x1eef, + 0x0005, 0x0126, 0x2091, 0x2200, 0x7000, 0xa086, 0x0003, 0x1160, + 0x700c, 0x7110, 0xa106, 0x0140, 0x080c, 0x295c, 0x20e1, 0x9028, + 0x700f, 0xb82f, 0x7013, 0xb82f, 0x012e, 0x0005, 0x00c6, 0x080c, + 0x5acf, 0x11b8, 0x2001, 0x0160, 0x2003, 0x0000, 0x2001, 0x0138, + 0x2003, 0x0000, 0x2011, 0x00c8, 0xe000, 0xe000, 0x8211, 0x1de0, + 0x04b1, 0x0066, 0x2031, 0x0000, 0x080c, 0x5b51, 0x006e, 0x00ce, + 0x0005, 0x080c, 0x1e6e, 0x080c, 0x295c, 0x20e1, 0x9028, 0x700c, + 0x7110, 0xa106, 0x01c0, 0x2104, 0xa005, 0x0130, 0x2060, 0x6010, + 0x2060, 0x6008, 0x8001, 0x600a, 0xa188, 0x0003, 0xa182, 0xb84a, + 0x0210, 0x2009, 0xb82f, 0x7112, 0x700c, 0xa106, 0x1d40, 0x080c, + 0x28eb, 0x2110, 0x0c20, 0x2001, 0x015d, 0x2003, 0x0000, 0x2001, + 0x0160, 0x2502, 0x2001, 0x0138, 0x2202, 0x00ce, 0x0005, 0x080c, + 0x295c, 0x20e1, 0x9028, 0x2001, 0x015d, 0x2003, 0x0000, 0x00e6, + 0x00c6, 0x0016, 0x2071, 0xb823, 0x700c, 0x7110, 0xa106, 0x0190, + 0x2104, 0xa005, 0x0130, 0x2060, 0x6010, 0x2060, 0x6008, 0x8001, + 0x600a, 0xa188, 0x0003, 0xa182, 0xb84a, 0x0210, 0x2009, 0xb82f, + 0x7112, 0x0c50, 0x001e, 0x00ce, 0x00ee, 0x0005, 0x2001, 0x0138, + 0x2014, 0x2003, 0x0000, 0x2001, 0x0160, 0x202c, 0x2003, 0x0000, + 0x080c, 0x5acf, 0x1148, 0x2021, 0x0002, 0x1d04, 0x1e7d, 0x2091, + 0x6000, 0x8421, 0x1dd0, 0x0005, 0x2021, 0xb015, 0x2001, 0x0141, + 0x201c, 0xd3dc, 0x1168, 0x2001, 0x0109, 0x201c, 0xa39c, 0x0048, + 0x1138, 0x2001, 0x0111, 0x201c, 0x83ff, 0x1110, 0x8421, 0x1d70, + 0x0005, 0x00e6, 0x2071, 0x0200, 0x7808, 0xa084, 0xf000, 0xa10d, + 0x0869, 0x2001, 0x0105, 0x2004, 0xa084, 0x0003, 0x1130, 0x2001, + 0xb84a, 0x2004, 0xa086, 0x0000, 0x0548, 0xa026, 0x2019, 0xf000, + 0x8319, 0x1148, 0x2001, 0x012b, 0x2003, 0x95f5, 0x2001, 0x0129, + 0x2003, 0x95f5, 0x00d8, 0x2001, 0x0105, 0x2004, 0xa084, 0x0003, + 0x1130, 0x2001, 0xb84a, 0x2004, 0xa086, 0x0000, 0x0178, 0x2001, + 0x0132, 0x2004, 0xa436, 0x0110, 0x2020, 0x0c00, 0x2001, 0x0021, + 0x2004, 0xd0fc, 0x09e8, 0x080c, 0x214a, 0x08c0, 0x20e1, 0x7000, + 0x7324, 0x7420, 0x7028, 0x7028, 0x7426, 0x7037, 0x0001, 0x810f, + 0x712e, 0x702f, 0x0100, 0x7037, 0x0008, 0x7326, 0x7422, 0x2001, + 0x0160, 0x2502, 0x2001, 0x0138, 0x2202, 0x00ee, 0x0005, 0x0026, + 0x2001, 0x015d, 0x2003, 0x0000, 0x7908, 0xa18c, 0x0fff, 0xa182, + 0x0ffd, 0x0210, 0x2009, 0x0000, 0xa190, 0x0007, 0xa294, 0x1ff8, + 0x8214, 0x8214, 0x8214, 0x2001, 0x020a, 0x82ff, 0x0140, 0x20e1, + 0x6000, 0x200c, 0x200c, 0x200c, 0x200c, 0x8211, 0x1dd0, 0x20e1, + 0x7000, 0x200c, 0x200c, 0x7003, 0x0000, 0x20e1, 0x6000, 0x2001, + 0x0208, 0x200c, 0x2001, 0x0209, 0x2004, 0xa106, 0x0158, 0x080c, + 0x1dd2, 0x0130, 0x7908, 0xd1ec, 0x1128, 0x790c, 0xd1a4, 0x0960, + 0x080c, 0x1dfe, 0xa006, 0x002e, 0x0005, 0x00f6, 0x00e6, 0x0016, + 0x0026, 0x2071, 0xb823, 0x2079, 0x0030, 0x2011, 0x0050, 0x7000, + 0xa086, 0x0000, 0x01a8, 0x8211, 0x0188, 0x2001, 0x0005, 0x2004, + 0xd08c, 0x0dc8, 0x7904, 0xa18c, 0x0780, 0x0016, 0x080c, 0x1b06, + 0x001e, 0x81ff, 0x1118, 0x2011, 0x0050, 0x0c48, 0xa085, 0x0001, + 0x002e, 0x001e, 0x00ee, 0x00fe, 0x0005, 0x7803, 0x0004, 0x2009, + 0x0064, 0x7804, 0xd0ac, 0x0904, 0x1fa1, 0x8109, 0x1dd0, 0x2009, + 0x0100, 0x210c, 0xa18a, 0x0003, 0x0a0c, 0x1515, 0x080c, 0x2251, + 0x00e6, 0x00f6, 0x2071, 0xb812, 0x2079, 0x0010, 0x7004, 0xa086, + 0x0000, 0x0538, 0x7800, 0x0006, 0x7820, 0x0006, 0x7830, 0x0006, + 0x7834, 0x0006, 0x7838, 0x0006, 0x783c, 0x0006, 0x7803, 0x0004, + 0xe000, 0xe000, 0x2079, 0x0030, 0x7804, 0xd0ac, 0x190c, 0x1515, + 0x2079, 0x0010, 0x000e, 0x783e, 0x000e, 0x783a, 0x000e, 0x7836, + 0x000e, 0x7832, 0x000e, 0x7822, 0x000e, 0x7802, 0x00fe, 0x00ee, + 0x0030, 0x00fe, 0x00ee, 0x7804, 0xd0ac, 0x190c, 0x1515, 0x080c, + 0x7230, 0x0005, 0x00e6, 0x2071, 0xb84a, 0x7003, 0x0000, 0x00ee, + 0x0005, 0x00d6, 0xa280, 0x0004, 0x206c, 0x694c, 0xd1dc, 0x1904, + 0x201f, 0x6934, 0xa184, 0x0007, 0x0002, 0x1fbd, 0x200a, 0x1fbd, + 0x1fbd, 0x1fbd, 0x1ff1, 0x1fd0, 0x1fbf, 0x080c, 0x1515, 0x684c, + 0xd0b4, 0x0904, 0x2107, 0x6860, 0x682e, 0x6816, 0x685c, 0x682a, + 0x6812, 0x687c, 0x680a, 0x6880, 0x680e, 0x6958, 0x0804, 0x2012, + 0x6834, 0xa084, 0x00ff, 0xa086, 0x001e, 0x1d38, 0x684c, 0xd0b4, + 0x0904, 0x2107, 0x6860, 0x682e, 0x6816, 0x685c, 0x682a, 0x6812, + 0x687c, 0x680a, 0x6880, 0x680e, 0x6804, 0x681a, 0xa080, 0x000d, + 0x2004, 0xa084, 0x000f, 0xa080, 0x22e5, 0x2005, 0x6832, 0x6958, + 0x0450, 0xa18c, 0x00ff, 0xa186, 0x0015, 0x1548, 0x684c, 0xd0b4, + 0x0904, 0x2107, 0x6804, 0x681a, 0xa080, 0x000d, 0x2004, 0xa084, + 0x000f, 0xa080, 0x22e5, 0x2005, 0x6832, 0x6958, 0xa006, 0x682e, + 0x682a, 0x0088, 0x684c, 0xd0b4, 0x0904, 0x1ae1, 0x6958, 0xa006, + 0x682e, 0x682a, 0x2d00, 0x681a, 0x6834, 0xa084, 0x000f, 0xa080, + 0x22e5, 0x2005, 0x6832, 0x6926, 0x684c, 0xc0dd, 0x684e, 0x00de, + 0x0005, 0x00f6, 0x2079, 0x0020, 0x7804, 0xd0fc, 0x190c, 0x214a, + 0x00e6, 0x00d6, 0x2071, 0xb84a, 0x7000, 0xa005, 0x1904, 0x2087, + 0x00c6, 0x7206, 0xa280, 0x0004, 0x205c, 0x7004, 0x2068, 0x7803, + 0x0004, 0x6818, 0x00d6, 0x2068, 0x686c, 0x7812, 0x6890, 0x00f6, + 0x20e1, 0x9040, 0x2079, 0x0200, 0x781a, 0x2079, 0x0100, 0x8004, + 0x78d6, 0x00fe, 0x00de, 0x2b68, 0x6824, 0x2050, 0x6818, 0x2060, + 0x6830, 0x2040, 0x6034, 0xa0cc, 0x000f, 0x6908, 0x791a, 0x7116, + 0x680c, 0x781e, 0x701a, 0xa006, 0x700e, 0x7012, 0x7004, 0x692c, + 0x6814, 0xa106, 0x1120, 0x6928, 0x6810, 0xa106, 0x0158, 0x0036, + 0x0046, 0x6b14, 0x6c10, 0x080c, 0x2305, 0x004e, 0x003e, 0x0110, + 0x00ce, 0x00a8, 0x8aff, 0x1120, 0x00ce, 0xa085, 0x0001, 0x0078, + 0x0126, 0x2091, 0x8000, 0x2079, 0x0020, 0x2009, 0x0001, 0x0059, + 0x0118, 0x2009, 0x0001, 0x0039, 0x012e, 0x00ce, 0xa006, 0x00de, + 0x00ee, 0x00fe, 0x0005, 0x0076, 0x0066, 0x0056, 0x0046, 0x0036, + 0x0026, 0x8aff, 0x0904, 0x2100, 0x700c, 0x7214, 0xa23a, 0x7010, + 0x7218, 0xa203, 0x0a04, 0x20ff, 0xa705, 0x0904, 0x20ff, 0xa03e, + 0x2730, 0x6850, 0xd0fc, 0x11a8, 0x00d6, 0x2805, 0xac68, 0x2900, + 0x0002, 0x20e2, 0x20c7, 0x20c7, 0x20e2, 0x20e2, 0x20db, 0x20e2, + 0x20c7, 0x20e2, 0x20cc, 0x20cc, 0x20e2, 0x20e2, 0x20e2, 0x20d3, + 0x20cc, 0xc0fc, 0x6852, 0x6b6c, 0x6a70, 0x6d1c, 0x6c20, 0xd99c, + 0x0528, 0x00d6, 0x2805, 0xac68, 0x6f08, 0x6e0c, 0x00f0, 0x6b08, + 0x6a0c, 0x6d00, 0x6c04, 0x00c8, 0x6b10, 0x6a14, 0x6d00, 0x6c04, + 0x6f08, 0x6e0c, 0x0090, 0x00de, 0x00d6, 0x6834, 0xa084, 0x00ff, + 0xa086, 0x001e, 0x1138, 0x00de, 0x080c, 0x22a7, 0x1904, 0x2091, + 0xa00e, 0x00f0, 0x00de, 0x080c, 0x1515, 0x00de, 0x7b22, 0x7a26, + 0x7d32, 0x7c36, 0x7f3a, 0x7e3e, 0x7902, 0x7000, 0x8000, 0x7002, + 0x6828, 0xa300, 0x682a, 0x682c, 0xa201, 0x682e, 0x700c, 0xa300, + 0x700e, 0x7010, 0xa201, 0x7012, 0x080c, 0x22a7, 0x0008, 0xa006, + 0x002e, 0x003e, 0x004e, 0x005e, 0x006e, 0x007e, 0x0005, 0x080c, + 0x1515, 0x0026, 0x2001, 0x0105, 0x2003, 0x0010, 0x20e1, 0x9040, + 0x7803, 0x0004, 0x7003, 0x0000, 0x7004, 0x2060, 0x00d6, 0x6010, + 0x2068, 0x080c, 0x9c5a, 0x0118, 0x6850, 0xc0bd, 0x6852, 0x601c, + 0xa086, 0x0006, 0x1180, 0x2061, 0x0100, 0x62c8, 0x2001, 0x00fa, + 0x8001, 0x1df0, 0x60c8, 0xa206, 0x1dc0, 0x60c4, 0x686a, 0x60c8, + 0x6866, 0x7004, 0x2060, 0x00de, 0x00c6, 0x080c, 0x992a, 0x00ce, + 0x2001, 0xb7ef, 0x2004, 0xac06, 0x1150, 0x20e1, 0x9040, 0x080c, + 0x825d, 0x2011, 0x0000, 0x080c, 0x807f, 0x080c, 0x7230, 0x002e, + 0x0804, 0x2204, 0x0126, 0x2091, 0x2400, 0x0006, 0x0016, 0x00f6, + 0x00e6, 0x00d6, 0x00c6, 0x2079, 0x0020, 0x2071, 0xb84a, 0x2b68, + 0x6818, 0x2060, 0x7904, 0x7803, 0x0002, 0xa184, 0x0700, 0x1904, + 0x2109, 0x7000, 0x0002, 0x2204, 0x2167, 0x21d7, 0x2202, 0x8001, + 0x7002, 0xd19c, 0x1170, 0x8aff, 0x05d0, 0x2009, 0x0001, 0x080c, + 0x208b, 0x0904, 0x2204, 0x2009, 0x0001, 0x080c, 0x208b, 0x0804, + 0x2204, 0x7803, 0x0004, 0xd194, 0x0148, 0x6850, 0xc0fc, 0x6852, + 0x8aff, 0x11d8, 0x684c, 0xc0f5, 0x684e, 0x00b8, 0x0026, 0x0036, + 0x6b28, 0x6a2c, 0x7820, 0x686e, 0xa31a, 0x7824, 0x6872, 0xa213, + 0x7830, 0x681e, 0x7834, 0x6822, 0x6b2a, 0x6a2e, 0x003e, 0x002e, + 0x080c, 0x22bd, 0x6850, 0xc0fd, 0x6852, 0x2a00, 0x6826, 0x2c00, + 0x681a, 0x2800, 0x6832, 0x7003, 0x0000, 0x0804, 0x2204, 0x00f6, + 0x0026, 0x781c, 0x0006, 0x7818, 0x0006, 0x2079, 0x0100, 0x7a14, + 0xa284, 0x0184, 0xa085, 0x0012, 0x7816, 0x0036, 0x2019, 0x1000, + 0x8319, 0x090c, 0x1515, 0x7820, 0xd0bc, 0x1dd0, 0x003e, 0x79c8, + 0x000e, 0xa102, 0x001e, 0x0006, 0x0016, 0x79c4, 0x000e, 0xa103, + 0x78c6, 0x000e, 0x78ca, 0xa284, 0x0184, 0xa085, 0x0012, 0x7816, + 0x002e, 0x00fe, 0x7803, 0x0008, 0x7003, 0x0000, 0x0468, 0x8001, + 0x7002, 0xd194, 0x0168, 0x7804, 0xd0fc, 0x1904, 0x215a, 0xd19c, + 0x11f8, 0x8aff, 0x0508, 0x2009, 0x0001, 0x080c, 0x208b, 0x00e0, + 0x0026, 0x0036, 0x6b28, 0x6a2c, 0x080c, 0x22bd, 0x00d6, 0x2805, + 0xac68, 0x6034, 0xd09c, 0x1128, 0x6808, 0xa31a, 0x680c, 0xa213, + 0x0020, 0x6810, 0xa31a, 0x6814, 0xa213, 0x00de, 0x0804, 0x218a, + 0x0804, 0x2186, 0x080c, 0x1515, 0x00ce, 0x00de, 0x00ee, 0x00fe, + 0x001e, 0x000e, 0x012e, 0x0005, 0x00f6, 0x00e6, 0x2071, 0xb84a, + 0x7000, 0xa086, 0x0000, 0x05d0, 0x2079, 0x0020, 0x0016, 0x2009, + 0x0207, 0x210c, 0xd194, 0x0198, 0x2009, 0x020c, 0x210c, 0xa184, + 0x0003, 0x0168, 0x080c, 0xb450, 0x2001, 0x0133, 0x2004, 0xa005, + 0x090c, 0x1515, 0x20e1, 0x9040, 0x2001, 0x020c, 0x2102, 0x2009, + 0x0206, 0x2104, 0x2009, 0x0203, 0x210c, 0xa106, 0x1110, 0x20e1, + 0x9040, 0x7804, 0xd0fc, 0x09d8, 0x080c, 0x214a, 0x7000, 0xa086, + 0x0000, 0x19a8, 0x001e, 0x7803, 0x0004, 0x7804, 0xd0ac, 0x1de8, + 0x20e1, 0x9040, 0x7803, 0x0002, 0x7003, 0x0000, 0x00ee, 0x00fe, + 0x0005, 0x0026, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2071, 0xb84a, + 0x2079, 0x0020, 0x7000, 0xa086, 0x0000, 0x0540, 0x7004, 0x2060, + 0x6010, 0x2068, 0x080c, 0x9c5a, 0x0158, 0x6850, 0xc0b5, 0x6852, + 0x680c, 0x7a1c, 0xa206, 0x1120, 0x6808, 0x7a18, 0xa206, 0x01e0, + 0x2001, 0x0105, 0x2003, 0x0010, 0x20e1, 0x9040, 0x7803, 0x0004, + 0x7003, 0x0000, 0x7004, 0x2060, 0x080c, 0x992a, 0x20e1, 0x9040, + 0x080c, 0x825d, 0x2011, 0x0000, 0x080c, 0x807f, 0x00fe, 0x00ee, + 0x00de, 0x00ce, 0x002e, 0x0005, 0x6810, 0x6a14, 0xa205, 0x1d00, + 0x684c, 0xc0dc, 0x684e, 0x2c10, 0x080c, 0x1fa9, 0x2001, 0x0105, + 0x2003, 0x0010, 0x20e1, 0x9040, 0x7803, 0x0004, 0x7003, 0x0000, + 0x2069, 0xb7e0, 0x6833, 0x0000, 0x683f, 0x0000, 0x08f8, 0x8840, + 0x2805, 0xa005, 0x1170, 0x6004, 0xa005, 0x0168, 0x681a, 0x2060, + 0x6034, 0xa084, 0x000f, 0xa080, 0x22e5, 0x2045, 0x88ff, 0x090c, + 0x1515, 0x8a51, 0x0005, 0x2050, 0x0005, 0x8a50, 0x8841, 0x2805, + 0xa005, 0x1190, 0x2c00, 0xad06, 0x0120, 0x6000, 0xa005, 0x1108, + 0x2d00, 0x2060, 0x681a, 0x6034, 0xa084, 0x000f, 0xa080, 0x22f5, + 0x2045, 0x88ff, 0x090c, 0x1515, 0x0005, 0x0000, 0x0011, 0x0015, + 0x0019, 0x001d, 0x0021, 0x0025, 0x0029, 0x0000, 0x000f, 0x0015, + 0x001b, 0x0021, 0x0027, 0x0000, 0x0000, 0x0000, 0x22da, 0x22d6, + 0x0000, 0x0000, 0x22e4, 0x0000, 0x22da, 0x0000, 0x22e1, 0x22de, + 0x0000, 0x0000, 0x0000, 0x22e4, 0x22e1, 0x0000, 0x22dc, 0x22dc, + 0x0000, 0x0000, 0x22e4, 0x0000, 0x22dc, 0x0000, 0x22e2, 0x22e2, + 0x0000, 0x0000, 0x0000, 0x22e4, 0x22e2, 0x00a6, 0x0096, 0x0086, + 0x6b2e, 0x6c2a, 0x6858, 0xa055, 0x0904, 0x2396, 0x2d60, 0x6034, + 0xa0cc, 0x000f, 0xa9c0, 0x22e5, 0xa986, 0x0007, 0x0130, 0xa986, + 0x000e, 0x0118, 0xa986, 0x000f, 0x1120, 0x605c, 0xa422, 0x6060, + 0xa31b, 0x2805, 0xa045, 0x1140, 0x0310, 0x0804, 0x2396, 0x6004, + 0xa065, 0x0904, 0x2396, 0x0c18, 0x2805, 0xa005, 0x01a8, 0xac68, + 0xd99c, 0x1128, 0x6808, 0xa422, 0x680c, 0xa31b, 0x0020, 0x6810, + 0xa422, 0x6814, 0xa31b, 0x0620, 0x2300, 0xa405, 0x0150, 0x8a51, + 0x0904, 0x2396, 0x8840, 0x0c40, 0x6004, 0xa065, 0x0904, 0x2396, + 0x0830, 0x8a51, 0x0904, 0x2396, 0x8840, 0x2805, 0xa005, 0x1158, + 0x6004, 0xa065, 0x0904, 0x2396, 0x6034, 0xa0cc, 0x000f, 0xa9c0, + 0x22e5, 0x2805, 0x2040, 0x2b68, 0x6850, 0xc0fc, 0x6852, 0x0458, + 0x8422, 0x8420, 0x831a, 0xa399, 0x0000, 0x00d6, 0x2b68, 0x6c6e, + 0x6b72, 0x00de, 0xd99c, 0x1168, 0x6908, 0x2400, 0xa122, 0x690c, + 0x2300, 0xa11b, 0x0a0c, 0x1515, 0x6800, 0xa420, 0x6804, 0xa319, + 0x0060, 0x6910, 0x2400, 0xa122, 0x6914, 0x2300, 0xa11b, 0x0a0c, + 0x1515, 0x6800, 0xa420, 0x6804, 0xa319, 0x2b68, 0x6c1e, 0x6b22, + 0x6850, 0xc0fd, 0x6852, 0x2c00, 0x681a, 0x2800, 0x6832, 0x2a00, + 0x6826, 0x000e, 0x000e, 0x000e, 0xa006, 0x0028, 0x008e, 0x009e, + 0x00ae, 0xa085, 0x0001, 0x0005, 0x2001, 0x0005, 0x2004, 0xa084, + 0x0007, 0x0002, 0x23aa, 0x23ab, 0x23ae, 0x23b1, 0x23b6, 0x23b9, + 0x23be, 0x23c3, 0x0005, 0x080c, 0x214a, 0x0005, 0x080c, 0x1b06, + 0x0005, 0x080c, 0x1b06, 0x080c, 0x214a, 0x0005, 0x080c, 0x171b, + 0x0005, 0x080c, 0x214a, 0x080c, 0x171b, 0x0005, 0x080c, 0x1b06, + 0x080c, 0x171b, 0x0005, 0x080c, 0x1b06, 0x080c, 0x214a, 0x080c, + 0x171b, 0x0005, 0x0126, 0x2091, 0x2600, 0x2079, 0x0200, 0x2071, + 0xbb80, 0x2069, 0xb500, 0x080c, 0x24c0, 0x080c, 0x24b0, 0x2009, + 0x0004, 0x7912, 0x7817, 0x0004, 0x080c, 0x27f8, 0x781b, 0x0002, + 0x20e1, 0x9080, 0x20e1, 0x4000, 0x20a9, 0x0080, 0x782f, 0x0000, + 0x1f04, 0x23e6, 0x20e1, 0x9080, 0x783b, 0x001f, 0x20e1, 0x8700, + 0x012e, 0x0005, 0x0126, 0x2091, 0x2600, 0x781c, 0xd0a4, 0x190c, + 0x24ad, 0xa084, 0x0007, 0x0002, 0x2416, 0x2404, 0x2407, 0x240a, + 0x240f, 0x2411, 0x2413, 0x2415, 0x080c, 0x63c4, 0x0078, 0x080c, + 0x6403, 0x0060, 0x080c, 0x63c4, 0x080c, 0x6403, 0x0038, 0x0041, + 0x0028, 0x0031, 0x0018, 0x0021, 0x0008, 0x0011, 0x012e, 0x0005, + 0x0006, 0x0016, 0x0026, 0x080c, 0xb450, 0x7930, 0xa184, 0x0003, + 0x01b0, 0x2001, 0xb7ef, 0x2004, 0xa005, 0x0170, 0x2001, 0x0133, + 0x2004, 0xa005, 0x090c, 0x1515, 0x00c6, 0x2001, 0xb7ef, 0x2064, + 0x080c, 0x992a, 0x00ce, 0x04b8, 0x20e1, 0x9040, 0x04a0, 0xa184, + 0x0030, 0x01e0, 0x6a00, 0xa286, 0x0003, 0x1108, 0x00a0, 0x080c, + 0x5acf, 0x1178, 0x2001, 0xb79f, 0x2003, 0x0001, 0x2001, 0xb500, + 0x2003, 0x0001, 0xa085, 0x0001, 0x080c, 0x5b13, 0x080c, 0x5a07, + 0x0010, 0x080c, 0x4b1f, 0x080c, 0x24b0, 0x00a8, 0xa184, 0x00c0, + 0x0168, 0x00e6, 0x0036, 0x0046, 0x0056, 0x2071, 0xb823, 0x080c, + 0x1dfe, 0x005e, 0x004e, 0x003e, 0x00ee, 0x0028, 0xa184, 0x0300, + 0x0110, 0x20e1, 0x9020, 0x7932, 0x002e, 0x001e, 0x000e, 0x0005, + 0x0016, 0x00e6, 0x00f6, 0x2071, 0xb500, 0x7128, 0x2001, 0xb791, + 0x2102, 0x2001, 0xb799, 0x2102, 0xa182, 0x0211, 0x1218, 0x2009, + 0x0008, 0x0400, 0xa182, 0x0259, 0x1218, 0x2009, 0x0007, 0x00d0, + 0xa182, 0x02c1, 0x1218, 0x2009, 0x0006, 0x00a0, 0xa182, 0x0349, + 0x1218, 0x2009, 0x0005, 0x0070, 0xa182, 0x0421, 0x1218, 0x2009, + 0x0004, 0x0040, 0xa182, 0x0581, 0x1218, 0x2009, 0x0003, 0x0010, + 0x2009, 0x0002, 0x2079, 0x0200, 0x7912, 0x7817, 0x0004, 0x080c, + 0x27f8, 0x00fe, 0x00ee, 0x001e, 0x0005, 0x7938, 0x080c, 0x1515, + 0x00e6, 0x0026, 0x2071, 0x0200, 0x20e1, 0x1000, 0x7220, 0x7028, + 0x7020, 0xa206, 0x0de0, 0x20e1, 0x9010, 0x002e, 0x00ee, 0x0005, + 0x20e1, 0xa000, 0x7837, 0x0001, 0x782f, 0x0000, 0x782f, 0x0000, + 0x782f, 0x0000, 0x782f, 0x0000, 0x7837, 0x0005, 0x20a9, 0x0210, + 0x7830, 0xd0bc, 0x1110, 0x1f04, 0x24d0, 0x7837, 0x0001, 0x7837, + 0x0000, 0xe000, 0xe000, 0x20e1, 0xa000, 0x0005, 0x0126, 0x2091, + 0x2800, 0x2061, 0x0100, 0x2071, 0xb500, 0x6024, 0x6026, 0x6053, + 0x0030, 0x080c, 0x2837, 0x6050, 0xa084, 0xfe7f, 0x6052, 0x2009, + 0x00ef, 0x6132, 0x6136, 0x080c, 0x2847, 0x60e7, 0x0000, 0x61ea, + 0x60e3, 0x0008, 0x604b, 0xf7f7, 0x6043, 0x0000, 0x602f, 0x0080, + 0x602f, 0x0000, 0x6007, 0x0e9f, 0x601b, 0x001e, 0x600f, 0x00ff, + 0x2001, 0xb78d, 0x2003, 0x00ff, 0x602b, 0x002f, 0x012e, 0x0005, + 0x2001, 0xb532, 0x2003, 0x0000, 0x2001, 0xb531, 0x2003, 0x0001, + 0x0005, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x6124, + 0xa184, 0x1e2c, 0x1118, 0xa184, 0x0007, 0x002a, 0xa195, 0x0004, + 0xa284, 0x0007, 0x0002, 0x254d, 0x2533, 0x2536, 0x2539, 0x253e, + 0x2540, 0x2544, 0x2548, 0x080c, 0x6b74, 0x00b8, 0x080c, 0x6c4f, + 0x00a0, 0x080c, 0x6c4f, 0x080c, 0x6b74, 0x0078, 0x0099, 0x0068, + 0x080c, 0x6b74, 0x0079, 0x0048, 0x080c, 0x6c4f, 0x0059, 0x0028, + 0x080c, 0x6c4f, 0x080c, 0x6b74, 0x0029, 0x002e, 0x001e, 0x000e, + 0x012e, 0x0005, 0x6124, 0x6028, 0xd09c, 0x0118, 0xd19c, 0x1904, + 0x2766, 0x080c, 0x5acf, 0x0578, 0x7000, 0xa086, 0x0003, 0x0198, + 0x6024, 0xa084, 0x1800, 0x0178, 0x080c, 0x5af5, 0x0118, 0x080c, + 0x5ae1, 0x1148, 0x6027, 0x0020, 0x6043, 0x0000, 0x2001, 0xb79e, + 0x2003, 0xaaaa, 0x0458, 0x080c, 0x5af5, 0x15d0, 0x6024, 0xa084, + 0x1800, 0x1108, 0x04a8, 0x2001, 0xb79e, 0x2003, 0xaaaa, 0x2001, + 0xb79f, 0x2003, 0x0001, 0x2001, 0xb500, 0x2003, 0x0001, 0x080c, + 0x5a07, 0x0804, 0x2766, 0xd1ac, 0x1518, 0x6024, 0xd0dc, 0x1170, + 0xd0e4, 0x1188, 0xd0d4, 0x11a0, 0xd0cc, 0x0130, 0x708c, 0xa086, + 0x0028, 0x1110, 0x080c, 0x5c5e, 0x0804, 0x2766, 0x2001, 0xb79f, + 0x2003, 0x0000, 0x0048, 0x2001, 0xb79f, 0x2003, 0x0002, 0x0020, + 0x080c, 0x5bd1, 0x0804, 0x2766, 0x080c, 0x5d03, 0x0804, 0x2766, + 0xd1ac, 0x0904, 0x26ae, 0x080c, 0x5acf, 0x11d8, 0x6027, 0x0020, + 0x0006, 0x0026, 0x0036, 0x080c, 0x5aeb, 0x1170, 0x2001, 0xb79f, + 0x2003, 0x0001, 0x2001, 0xb500, 0x2003, 0x0001, 0x080c, 0x5a07, + 0x003e, 0x002e, 0x000e, 0x0005, 0x003e, 0x002e, 0x000e, 0x080c, + 0x5aa6, 0x0016, 0x0046, 0x00c6, 0x644c, 0xa486, 0xf0f0, 0x1138, + 0x2061, 0x0100, 0x644a, 0x6043, 0x0090, 0x6043, 0x0010, 0x74ce, + 0xa48c, 0xff00, 0x7034, 0xd084, 0x0178, 0xa186, 0xf800, 0x1160, + 0x703c, 0xd084, 0x1148, 0xc085, 0x703e, 0x0036, 0x2418, 0x2011, + 0x8016, 0x080c, 0x3ecc, 0x003e, 0xa196, 0xff00, 0x05b8, 0x7054, + 0xa084, 0x00ff, 0x810f, 0xa116, 0x0588, 0x7130, 0xd184, 0x1570, + 0x2011, 0xb553, 0x2214, 0xd2ec, 0x0138, 0xc18d, 0x7132, 0x2011, + 0xb553, 0x2214, 0xd2ac, 0x1510, 0x6240, 0xa294, 0x0010, 0x0130, + 0x6248, 0xa294, 0xff00, 0xa296, 0xff00, 0x01c0, 0x7030, 0xd08c, + 0x0904, 0x267b, 0x7034, 0xd08c, 0x1140, 0x2001, 0xb50c, 0x200c, + 0xd1ac, 0x1904, 0x267b, 0xc1ad, 0x2102, 0x0036, 0x73cc, 0x2011, + 0x8013, 0x080c, 0x3ecc, 0x003e, 0x0804, 0x267b, 0x7034, 0xd08c, + 0x1140, 0x2001, 0xb50c, 0x200c, 0xd1ac, 0x1904, 0x267b, 0xc1ad, + 0x2102, 0x0036, 0x73cc, 0x2011, 0x8013, 0x080c, 0x3ecc, 0x003e, + 0x7130, 0xc185, 0x7132, 0x2011, 0xb553, 0x220c, 0xd1a4, 0x01d0, + 0x0016, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c, 0x6b1a, 0x2019, + 0x000e, 0x080c, 0xb065, 0xa484, 0x00ff, 0xa080, 0x2dc4, 0x200d, + 0xa18c, 0xff00, 0x810f, 0x8127, 0xa006, 0x2009, 0x000e, 0x080c, + 0xb0e8, 0x001e, 0xd1ac, 0x1148, 0x0016, 0x2009, 0x0000, 0x2019, + 0x0004, 0x080c, 0x2c6f, 0x001e, 0x0070, 0x0156, 0x20a9, 0x007f, + 0x2009, 0x0000, 0x080c, 0x4fa9, 0x1110, 0x080c, 0x4c0b, 0x8108, + 0x1f04, 0x2672, 0x015e, 0x00ce, 0x004e, 0x2011, 0x0003, 0x080c, + 0x8075, 0x2011, 0x0002, 0x080c, 0x807f, 0x080c, 0x7f59, 0x0036, + 0x2019, 0x0000, 0x080c, 0x7fe4, 0x003e, 0x60e3, 0x0000, 0x001e, + 0x2001, 0xb500, 0x2014, 0xa296, 0x0004, 0x1128, 0xd19c, 0x11b0, + 0x6228, 0xc29d, 0x622a, 0x2003, 0x0001, 0x2001, 0xb523, 0x2003, + 0x0000, 0x6027, 0x0020, 0x080c, 0x5af5, 0x1140, 0x0016, 0x2009, + 0x07d0, 0x2011, 0x59e4, 0x080c, 0x6a22, 0x001e, 0xd194, 0x0904, + 0x2766, 0x0016, 0x6220, 0xd2b4, 0x0904, 0x2717, 0x080c, 0x6a10, + 0x080c, 0x7d7a, 0x6027, 0x0004, 0x00f6, 0x2019, 0xb7e9, 0x2304, + 0xa07d, 0x0570, 0x7804, 0xa086, 0x0032, 0x1550, 0x00d6, 0x00c6, + 0x00e6, 0x2069, 0x0140, 0x618c, 0x6288, 0x7818, 0x608e, 0x7808, + 0x608a, 0x6043, 0x0002, 0x2001, 0x0003, 0x8001, 0x1df0, 0x6043, + 0x0000, 0x6803, 0x1000, 0x6803, 0x0000, 0x618e, 0x628a, 0x080c, + 0x7090, 0x080c, 0x7173, 0x7810, 0x2070, 0x7037, 0x0103, 0x2f60, + 0x080c, 0x861d, 0x00ee, 0x00ce, 0x00de, 0x00fe, 0x001e, 0x0005, + 0x00fe, 0x00d6, 0x2069, 0x0140, 0x6804, 0xa084, 0x4000, 0x0120, + 0x6803, 0x1000, 0x6803, 0x0000, 0x00de, 0x00c6, 0x2061, 0xb7e0, + 0x6028, 0xa09a, 0x00c8, 0x1238, 0x8000, 0x602a, 0x00ce, 0x080c, + 0x7d6d, 0x0804, 0x2765, 0x2019, 0xb7e9, 0x2304, 0xa065, 0x0120, + 0x2009, 0x0027, 0x080c, 0x864c, 0x00ce, 0x0804, 0x2765, 0xd2bc, + 0x0904, 0x2765, 0x080c, 0x6a1d, 0x6014, 0xa084, 0x0184, 0xa085, + 0x0010, 0x6016, 0x6027, 0x0004, 0x00d6, 0x2069, 0x0140, 0x6804, + 0xa084, 0x4000, 0x0120, 0x6803, 0x1000, 0x6803, 0x0000, 0x00de, + 0x00c6, 0x2061, 0xb7e0, 0x6044, 0xa09a, 0x00c8, 0x12f0, 0x8000, + 0x6046, 0x603c, 0x00ce, 0xa005, 0x0540, 0x2009, 0x07d0, 0x080c, + 0x6a15, 0xa080, 0x0007, 0x2004, 0xa086, 0x0006, 0x1138, 0x6114, + 0xa18c, 0x0184, 0xa18d, 0x0012, 0x6116, 0x00b8, 0x6114, 0xa18c, + 0x0184, 0xa18d, 0x0016, 0x6116, 0x0080, 0x0036, 0x2019, 0x0001, + 0x080c, 0x7fe4, 0x003e, 0x2019, 0xb7ef, 0x2304, 0xa065, 0x0120, + 0x2009, 0x004f, 0x080c, 0x864c, 0x00ce, 0x001e, 0xd19c, 0x0904, + 0x27bf, 0x7034, 0xd0ac, 0x1560, 0x0016, 0x0156, 0x6027, 0x0008, + 0x602f, 0x0020, 0x20a9, 0x0006, 0x1d04, 0x2774, 0x2091, 0x6000, + 0x1f04, 0x2774, 0x602f, 0x0000, 0x6150, 0xa185, 0x1400, 0x6052, + 0x20a9, 0x0366, 0x1d04, 0x2782, 0x2091, 0x6000, 0x6020, 0xd09c, + 0x1130, 0x015e, 0x6152, 0x001e, 0x6027, 0x0008, 0x0480, 0x080c, + 0x2907, 0x1f04, 0x2782, 0x015e, 0x6152, 0x001e, 0x6027, 0x0008, + 0x0016, 0x6028, 0xc09c, 0x602a, 0x2011, 0x0003, 0x080c, 0x8075, + 0x2011, 0x0002, 0x080c, 0x807f, 0x080c, 0x7f59, 0x0036, 0x2019, + 0x0000, 0x080c, 0x7fe4, 0x003e, 0x60e3, 0x0000, 0x080c, 0xb42f, + 0x080c, 0xb44a, 0xa085, 0x0001, 0x080c, 0x5b13, 0x2001, 0xb500, + 0x2003, 0x0004, 0x6027, 0x0008, 0x080c, 0x12dd, 0x001e, 0xa18c, + 0xffd0, 0x6126, 0x0005, 0x0006, 0x0016, 0x0026, 0x00e6, 0x00f6, + 0x0126, 0x2091, 0x8000, 0x2071, 0xb500, 0x71c4, 0x70c6, 0xa116, + 0x0500, 0x81ff, 0x0128, 0x2011, 0x8011, 0x080c, 0x3ecc, 0x00c8, + 0x2011, 0x8012, 0x080c, 0x3ecc, 0x2001, 0xb572, 0x2004, 0xd0fc, + 0x1180, 0x0036, 0x00c6, 0x080c, 0x2892, 0x080c, 0x7f35, 0x2061, + 0x0100, 0x2019, 0x0028, 0x2009, 0x0000, 0x080c, 0x2c6f, 0x00ce, + 0x003e, 0x012e, 0x00fe, 0x00ee, 0x002e, 0x001e, 0x000e, 0x0005, + 0x00c6, 0x00f6, 0x0006, 0x0026, 0x2061, 0x0100, 0xa190, 0x280b, + 0x2205, 0x60f2, 0x2011, 0x2818, 0x2205, 0x60ee, 0x002e, 0x000e, + 0x00fe, 0x00ce, 0x0005, 0x0840, 0x0840, 0x0840, 0x0580, 0x0420, + 0x0348, 0x02c0, 0x0258, 0x0210, 0x01a8, 0x01a8, 0x01a8, 0x01a8, + 0x0140, 0x00f8, 0x00d0, 0x00b0, 0x00a0, 0x2028, 0xa18c, 0x00ff, + 0x2130, 0xa094, 0xff00, 0x1110, 0x81ff, 0x0118, 0x080c, 0x66b1, + 0x0038, 0xa080, 0x2dc4, 0x200d, 0xa18c, 0xff00, 0x810f, 0xa006, + 0x0005, 0xa080, 0x2dc4, 0x200d, 0xa18c, 0x00ff, 0x0005, 0x00d6, + 0x2069, 0x0140, 0x2001, 0xb515, 0x2003, 0x00ef, 0x20a9, 0x0010, + 0xa006, 0x6852, 0x6856, 0x1f04, 0x2842, 0x00de, 0x0005, 0x0006, + 0x00d6, 0x0026, 0x2069, 0x0140, 0x2001, 0xb515, 0x2102, 0x8114, + 0x8214, 0x8214, 0x8214, 0x20a9, 0x0010, 0x6853, 0x0000, 0xa006, + 0x82ff, 0x1128, 0xa184, 0x000f, 0xa080, 0xb45e, 0x2005, 0x6856, + 0x8211, 0x1f04, 0x2857, 0x002e, 0x00de, 0x000e, 0x0005, 0x00c6, + 0x2061, 0xb500, 0x6030, 0x0110, 0xc09d, 0x0008, 0xc09c, 0x6032, + 0x00ce, 0x0005, 0x0156, 0x00d6, 0x0026, 0x0016, 0x0006, 0x2069, + 0x0140, 0x6980, 0xa116, 0x0180, 0xa112, 0x1230, 0x8212, 0x8210, + 0x22a8, 0x2001, 0x0402, 0x0018, 0x22a8, 0x2001, 0x0404, 0x680e, + 0x1f04, 0x2887, 0x680f, 0x0000, 0x000e, 0x001e, 0x002e, 0x00de, + 0x015e, 0x0005, 0x2001, 0xb553, 0x2004, 0xd0c4, 0x0150, 0xd0a4, + 0x0140, 0xa006, 0x0046, 0x2020, 0x2009, 0x002e, 0x080c, 0xb0e8, + 0x004e, 0x0005, 0x00f6, 0x0016, 0x0026, 0x2079, 0x0140, 0x78c4, + 0xd0dc, 0x0548, 0xa084, 0x0700, 0xa08e, 0x0300, 0x1520, 0x2011, + 0x0000, 0x2009, 0x0002, 0x2300, 0xa080, 0x0020, 0x2018, 0x2300, + 0x080c, 0x6b40, 0x2011, 0x0030, 0x2200, 0x8007, 0xa085, 0x004c, + 0x78c2, 0x2009, 0x0204, 0x210c, 0x2200, 0xa100, 0x2009, 0x0138, + 0x200a, 0x080c, 0x5acf, 0x1118, 0x2009, 0xb78f, 0x200a, 0x002e, + 0x001e, 0x00fe, 0x0005, 0x78c3, 0x0000, 0x0cc8, 0x0126, 0x2091, + 0x2800, 0x0006, 0x0016, 0x0026, 0x2001, 0x0170, 0x200c, 0x8000, + 0x2014, 0xa184, 0x0003, 0x0110, 0x0804, 0x1b04, 0x002e, 0x001e, + 0x000e, 0x012e, 0x0005, 0x0006, 0x2001, 0x0100, 0x2004, 0xa082, + 0x0005, 0x000e, 0x0268, 0x2001, 0x0170, 0x200c, 0xa18c, 0x00ff, + 0xa18e, 0x004c, 0x1128, 0x200c, 0xa18c, 0xff00, 0x810f, 0x0010, + 0x2009, 0x0000, 0x2001, 0x0204, 0x2004, 0xa108, 0x0005, 0x0006, + 0x0156, 0x00f6, 0x2079, 0x0100, 0x20a9, 0x000a, 0x7854, 0xd08c, + 0x1110, 0x1f04, 0x290e, 0x00fe, 0x015e, 0x000e, 0x0005, 0x0016, + 0x00c6, 0x0006, 0x2061, 0x0100, 0x6030, 0x0006, 0x6048, 0x0006, + 0x60e4, 0x0006, 0x60e8, 0x0006, 0x6050, 0x0006, 0x60f0, 0x0006, + 0x60ec, 0x0006, 0x600c, 0x0006, 0x6004, 0x0006, 0x6028, 0x0006, + 0x60e0, 0x0006, 0x602f, 0x0100, 0x602f, 0x0000, 0xe000, 0xe000, + 0xe000, 0xe000, 0x602f, 0x0040, 0x602f, 0x0000, 0x000e, 0x60e2, + 0x000e, 0x602a, 0x000e, 0x6006, 0x000e, 0x600e, 0x000e, 0x60ee, + 0x000e, 0x60f2, 0x000e, 0x6052, 0x000e, 0x60ea, 0x000e, 0x60e6, + 0x000e, 0x604a, 0x000e, 0x6032, 0x6036, 0x2008, 0x080c, 0x2847, + 0x000e, 0x00ce, 0x001e, 0x0005, 0x2009, 0x0171, 0x2104, 0xd0dc, + 0x0140, 0x2009, 0x0170, 0x2104, 0x200b, 0x0080, 0xe000, 0xe000, + 0x200a, 0x0005, 0x29fa, 0x29fe, 0x2a02, 0x2a08, 0x2a0e, 0x2a14, + 0x2a1a, 0x2a22, 0x2a2a, 0x2a30, 0x2a36, 0x2a3e, 0x2a46, 0x2a4e, + 0x2a56, 0x2a60, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, + 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, + 0x2aad, 0x2aad, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, + 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, + 0x2a6a, 0x2a6a, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, + 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, + 0x2aad, 0x2aad, 0x2a6c, 0x2a6c, 0x2a72, 0x2a72, 0x2a79, 0x2a79, + 0x2a80, 0x2a80, 0x2a89, 0x2a89, 0x2a90, 0x2a90, 0x2a99, 0x2a99, + 0x2aa2, 0x2aa2, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, + 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, + 0x2aad, 0x2aad, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, + 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, + 0x2a6a, 0x2a6a, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, + 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, 0x2aad, + 0x2aad, 0x2aad, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, + 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, 0x2a6a, + 0x2a6a, 0x2a6a, 0x0106, 0x0006, 0x0804, 0x2ab5, 0x0106, 0x0006, + 0x0804, 0x2ab5, 0x0106, 0x0006, 0x080c, 0x2519, 0x0804, 0x2ab5, + 0x0106, 0x0006, 0x080c, 0x2519, 0x0804, 0x2ab5, 0x0106, 0x0006, + 0x080c, 0x239c, 0x0804, 0x2ab5, 0x0106, 0x0006, 0x080c, 0x239c, + 0x0804, 0x2ab5, 0x0106, 0x0006, 0x080c, 0x2519, 0x080c, 0x239c, + 0x0804, 0x2ab5, 0x0106, 0x0006, 0x080c, 0x2519, 0x080c, 0x239c, + 0x0804, 0x2ab5, 0x0106, 0x0006, 0x080c, 0x23f2, 0x0804, 0x2ab5, + 0x0106, 0x0006, 0x080c, 0x23f2, 0x0804, 0x2ab5, 0x0106, 0x0006, + 0x080c, 0x2519, 0x080c, 0x23f2, 0x0804, 0x2ab5, 0x0106, 0x0006, + 0x080c, 0x2519, 0x080c, 0x23f2, 0x0804, 0x2ab5, 0x0106, 0x0006, + 0x080c, 0x239c, 0x080c, 0x23f2, 0x0804, 0x2ab5, 0x0106, 0x0006, + 0x080c, 0x239c, 0x080c, 0x23f2, 0x0804, 0x2ab5, 0x0106, 0x0006, + 0x080c, 0x2519, 0x080c, 0x239c, 0x080c, 0x23f2, 0x0804, 0x2ab5, + 0x0106, 0x0006, 0x080c, 0x2519, 0x080c, 0x239c, 0x080c, 0x23f2, + 0x0804, 0x2ab5, 0xe000, 0x0cf0, 0x0106, 0x0006, 0x080c, 0x28d6, + 0x0804, 0x2ab5, 0x0106, 0x0006, 0x080c, 0x28d6, 0x080c, 0x2519, + 0x04e0, 0x0106, 0x0006, 0x080c, 0x28d6, 0x080c, 0x239c, 0x04a8, + 0x0106, 0x0006, 0x080c, 0x28d6, 0x080c, 0x2519, 0x080c, 0x239c, + 0x0460, 0x0106, 0x0006, 0x080c, 0x28d6, 0x080c, 0x23f2, 0x0428, + 0x0106, 0x0006, 0x080c, 0x28d6, 0x080c, 0x2519, 0x080c, 0x23f2, + 0x00e0, 0x0106, 0x0006, 0x080c, 0x28d6, 0x080c, 0x239c, 0x080c, + 0x23f2, 0x0098, 0x0106, 0x0006, 0x080c, 0x28d6, 0x080c, 0x2519, + 0x080c, 0x239c, 0x080c, 0x23f2, 0x0040, 0x20d1, 0x0000, 0x20d1, + 0x0001, 0x20d1, 0x0000, 0x080c, 0x1515, 0x000e, 0x010e, 0x000d, + 0x00c6, 0x0026, 0x0046, 0x2021, 0x0000, 0x080c, 0x5309, 0x1904, + 0x2b95, 0x72d4, 0x2001, 0xb79e, 0x2004, 0xa005, 0x1110, 0xd29c, + 0x0148, 0xd284, 0x1138, 0xd2bc, 0x1904, 0x2b95, 0x080c, 0x2b99, + 0x0804, 0x2b95, 0xd2cc, 0x1904, 0x2b95, 0x080c, 0x5acf, 0x1120, + 0x709f, 0xffff, 0x0804, 0x2b95, 0xd294, 0x0120, 0x709f, 0xffff, + 0x0804, 0x2b95, 0x2001, 0xb515, 0x203c, 0x7288, 0xd284, 0x0904, + 0x2b37, 0xd28c, 0x1904, 0x2b37, 0x0036, 0x739c, 0xa38e, 0xffff, + 0x1110, 0x2019, 0x0001, 0x8314, 0xa2e0, 0xbcc0, 0x2c04, 0xa38c, + 0x0001, 0x0120, 0xa084, 0xff00, 0x8007, 0x0010, 0xa084, 0x00ff, + 0xa70e, 0x0560, 0xa08e, 0x0000, 0x0548, 0xa08e, 0x00ff, 0x1150, + 0x7230, 0xd284, 0x1538, 0x7288, 0xc28d, 0x728a, 0x709f, 0xffff, + 0x003e, 0x0428, 0x2009, 0x0000, 0x080c, 0x281d, 0x080c, 0x4f4d, + 0x11b8, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x1150, 0x7030, + 0xd08c, 0x0118, 0x6000, 0xd0bc, 0x0120, 0x080c, 0x2bac, 0x0140, + 0x0028, 0x080c, 0x2cdd, 0x080c, 0x2bda, 0x0110, 0x8318, 0x0818, + 0x739e, 0x0010, 0x709f, 0xffff, 0x003e, 0x0804, 0x2b95, 0xa780, + 0x2dc4, 0x203d, 0xa7bc, 0xff00, 0x873f, 0x2041, 0x007e, 0x709c, + 0xa096, 0xffff, 0x1120, 0x2009, 0x0000, 0x28a8, 0x0050, 0xa812, + 0x0220, 0x2008, 0xa802, 0x20a8, 0x0020, 0x709f, 0xffff, 0x0804, + 0x2b95, 0x2700, 0x0156, 0x0016, 0xa106, 0x05a0, 0xc484, 0x080c, + 0x4fa9, 0x0120, 0x080c, 0x4f4d, 0x15a8, 0x0008, 0xc485, 0x6004, + 0xa084, 0x00ff, 0xa086, 0x0006, 0x1130, 0x7030, 0xd08c, 0x01e8, + 0x6000, 0xd0bc, 0x11d0, 0x7288, 0xd28c, 0x0188, 0x6004, 0xa084, + 0x00ff, 0xa082, 0x0006, 0x02b0, 0xd484, 0x1118, 0x080c, 0x4f6c, + 0x0028, 0x080c, 0x2d6a, 0x0170, 0x080c, 0x2d97, 0x0058, 0x080c, + 0x2cdd, 0x080c, 0x2bda, 0x0170, 0x0028, 0x080c, 0x2d6a, 0x0110, + 0x0419, 0x0140, 0x001e, 0x8108, 0x015e, 0x1f04, 0x2b51, 0x709f, + 0xffff, 0x0018, 0x001e, 0x015e, 0x719e, 0x004e, 0x002e, 0x00ce, + 0x0005, 0x00c6, 0x0016, 0x709f, 0x0001, 0x2009, 0x007e, 0x080c, + 0x4f4d, 0x1138, 0x080c, 0x2cdd, 0x04a9, 0x0118, 0x70d4, 0xc0bd, + 0x70d6, 0x001e, 0x00ce, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, + 0x2c68, 0x2001, 0xb557, 0x2004, 0xa084, 0x00ff, 0x6842, 0x080c, + 0x9ed6, 0x01d8, 0x2d00, 0x601a, 0x080c, 0xa027, 0x601f, 0x0001, + 0x2001, 0x0000, 0x080c, 0x4eeb, 0x2001, 0x0000, 0x080c, 0x4efd, + 0x0126, 0x2091, 0x8000, 0x7098, 0x8000, 0x709a, 0x012e, 0x2009, + 0x0004, 0x080c, 0x864c, 0xa085, 0x0001, 0x00ce, 0x00de, 0x007e, + 0x001e, 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x2c68, 0x2001, + 0xb557, 0x2004, 0xa084, 0x00ff, 0x6842, 0x080c, 0x9ed6, 0x0550, + 0x2d00, 0x601a, 0x6800, 0xc0c4, 0x6802, 0x68a0, 0xa086, 0x007e, + 0x0140, 0x6804, 0xa084, 0x00ff, 0xa086, 0x0006, 0x1110, 0x080c, + 0x2c9c, 0x080c, 0xa027, 0x601f, 0x0001, 0x2001, 0x0000, 0x080c, + 0x4eeb, 0x2001, 0x0002, 0x080c, 0x4efd, 0x0126, 0x2091, 0x8000, + 0x7098, 0x8000, 0x709a, 0x012e, 0x2009, 0x0002, 0x080c, 0x864c, + 0xa085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00c6, + 0x0026, 0x2009, 0x0080, 0x080c, 0x4f4d, 0x1120, 0x0031, 0x0110, + 0x70db, 0xffff, 0x002e, 0x00ce, 0x0005, 0x0016, 0x0076, 0x00d6, + 0x00c6, 0x2c68, 0x080c, 0x85c7, 0x01e8, 0x2d00, 0x601a, 0x080c, + 0xa027, 0x601f, 0x0001, 0x2001, 0x0000, 0x080c, 0x4eeb, 0x2001, + 0x0002, 0x080c, 0x4efd, 0x0126, 0x2091, 0x8000, 0x080c, 0x2c9c, + 0x70dc, 0x8000, 0x70de, 0x012e, 0x2009, 0x0002, 0x080c, 0x864c, + 0xa085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00c6, + 0x00d6, 0x0126, 0x2091, 0x8000, 0x2009, 0x007f, 0x080c, 0x4f4d, + 0x1190, 0x2c68, 0x080c, 0x85c7, 0x0170, 0x2d00, 0x601a, 0x6312, + 0x601f, 0x0001, 0x620a, 0x080c, 0xa027, 0x2009, 0x0022, 0x080c, + 0x864c, 0xa085, 0x0001, 0x012e, 0x00de, 0x00ce, 0x0005, 0x00e6, + 0x00c6, 0x0066, 0x0036, 0x0026, 0x080c, 0x6e01, 0x080c, 0x6da4, + 0x080c, 0x906f, 0x2130, 0x81ff, 0x0128, 0x20a9, 0x007e, 0x2009, + 0x0000, 0x0020, 0x20a9, 0x007f, 0x2009, 0x0000, 0x0016, 0x080c, + 0x4fa9, 0x1120, 0x080c, 0x51aa, 0x080c, 0x4c0b, 0x001e, 0x8108, + 0x1f04, 0x2c86, 0x86ff, 0x1110, 0x080c, 0x11f0, 0x002e, 0x003e, + 0x006e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x00c6, 0x0036, 0x0026, + 0x0016, 0x6218, 0x2270, 0x72a0, 0x0026, 0x2019, 0x0029, 0x080c, + 0x6df5, 0x0076, 0x2039, 0x0000, 0x080c, 0x6d02, 0x2c08, 0x080c, + 0xae82, 0x007e, 0x001e, 0x2e60, 0x080c, 0x51aa, 0x6210, 0x6314, + 0x080c, 0x4c0b, 0x6212, 0x6316, 0x001e, 0x002e, 0x003e, 0x00ce, + 0x00ee, 0x0005, 0x00e6, 0x0006, 0x6018, 0xa080, 0x0028, 0x2004, + 0xa086, 0x0080, 0x0150, 0x2071, 0xb500, 0x7098, 0xa005, 0x0110, + 0x8001, 0x709a, 0x000e, 0x00ee, 0x0005, 0x2071, 0xb500, 0x70dc, + 0xa005, 0x0dc0, 0x8001, 0x70de, 0x0ca8, 0x6000, 0xc08c, 0x6002, + 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0036, 0x0026, 0x0016, 0x0156, + 0x2178, 0x81ff, 0x1118, 0x20a9, 0x0001, 0x0098, 0x2001, 0xb553, + 0x2004, 0xd0c4, 0x0150, 0xd0a4, 0x0140, 0xa006, 0x0046, 0x2020, + 0x2009, 0x002d, 0x080c, 0xb0e8, 0x004e, 0x20a9, 0x00ff, 0x2011, + 0x0000, 0x0026, 0xa28e, 0x007e, 0x0904, 0x2d49, 0xa28e, 0x007f, + 0x0904, 0x2d49, 0xa28e, 0x0080, 0x05e0, 0xa288, 0xb635, 0x210c, + 0x81ff, 0x05b8, 0x8fff, 0x1148, 0x2001, 0xb7be, 0x0006, 0x2003, + 0x0001, 0x04d9, 0x000e, 0x2003, 0x0000, 0x00c6, 0x2160, 0x2001, + 0x0001, 0x080c, 0x5313, 0x00ce, 0x2019, 0x0029, 0x080c, 0x6df5, + 0x0076, 0x2039, 0x0000, 0x080c, 0x6d02, 0x00c6, 0x0026, 0x2160, + 0x6204, 0xa294, 0x00ff, 0xa286, 0x0006, 0x1118, 0x6007, 0x0404, + 0x0028, 0x2001, 0x0004, 0x8007, 0xa215, 0x6206, 0x002e, 0x00ce, + 0x0016, 0x2c08, 0x080c, 0xae82, 0x001e, 0x007e, 0x2160, 0x080c, + 0x51aa, 0x002e, 0x8210, 0x1f04, 0x2d01, 0x015e, 0x001e, 0x002e, + 0x003e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0046, 0x0026, 0x0016, + 0x2001, 0xb553, 0x2004, 0xd0c4, 0x0148, 0xd0a4, 0x0138, 0xa006, + 0x2220, 0x8427, 0x2009, 0x0029, 0x080c, 0xb0e8, 0x001e, 0x002e, + 0x004e, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x7288, 0x82ff, + 0x01f8, 0x2011, 0xb553, 0x2214, 0xd2ac, 0x11d0, 0x2100, 0x080c, + 0x2831, 0x81ff, 0x01b8, 0x2019, 0x0001, 0x8314, 0xa2e0, 0xbcc0, + 0x2c04, 0xd384, 0x0120, 0xa084, 0xff00, 0x8007, 0x0010, 0xa084, + 0x00ff, 0xa116, 0x0138, 0xa096, 0x00ff, 0x0110, 0x8318, 0x0c68, + 0xa085, 0x0001, 0x00ce, 0x003e, 0x002e, 0x001e, 0x0005, 0x0016, + 0x00c6, 0x0126, 0x2091, 0x8000, 0x0016, 0x0026, 0x0036, 0x2110, + 0x0026, 0x2019, 0x0029, 0x080c, 0x8299, 0x002e, 0x080c, 0xb38d, + 0x003e, 0x002e, 0x001e, 0xa180, 0xb635, 0x2004, 0xa065, 0x0158, + 0x0016, 0x00c6, 0x2061, 0xb8f4, 0x001e, 0x611a, 0x080c, 0x2c9c, + 0x001e, 0x080c, 0x4f6c, 0x012e, 0x00ce, 0x001e, 0x0005, 0x2001, + 0xb535, 0x2004, 0xd0cc, 0x0005, 0x7eef, 0x7de8, 0x7ce4, 0x80e2, + 0x7be1, 0x80e0, 0x80dc, 0x80da, 0x7ad9, 0x80d6, 0x80d5, 0x80d4, + 0x80d3, 0x80d2, 0x80d1, 0x79ce, 0x78cd, 0x80cc, 0x80cb, 0x80ca, + 0x80c9, 0x80c7, 0x80c6, 0x77c5, 0x76c3, 0x80bc, 0x80ba, 0x75b9, + 0x80b6, 0x74b5, 0x73b4, 0x72b3, 0x80b2, 0x80b1, 0x80ae, 0x71ad, + 0x80ac, 0x70ab, 0x6faa, 0x6ea9, 0x80a7, 0x6da6, 0x6ca5, 0x6ba3, + 0x6a9f, 0x699e, 0x689d, 0x809b, 0x8098, 0x6797, 0x6690, 0x658f, + 0x6488, 0x6384, 0x6282, 0x8081, 0x8080, 0x617c, 0x607a, 0x8079, + 0x5f76, 0x8075, 0x8074, 0x8073, 0x8072, 0x8071, 0x806e, 0x5e6d, + 0x806c, 0x5d6b, 0x5c6a, 0x5b69, 0x8067, 0x5a66, 0x5965, 0x5863, + 0x575c, 0x565a, 0x5559, 0x8056, 0x8055, 0x5454, 0x5353, 0x5252, + 0x5151, 0x504e, 0x4f4d, 0x804c, 0x804b, 0x4e4a, 0x4d49, 0x8047, + 0x4c46, 0x8045, 0x8043, 0x803c, 0x803a, 0x8039, 0x8036, 0x4b35, + 0x8034, 0x4a33, 0x4932, 0x4831, 0x802e, 0x472d, 0x462c, 0x452b, + 0x442a, 0x4329, 0x4227, 0x8026, 0x8025, 0x4123, 0x401f, 0x3f1e, + 0x3e1d, 0x3d1b, 0x3c18, 0x8017, 0x8010, 0x3b0f, 0x3a08, 0x8004, + 0x3902, 0x8001, 0x8000, 0x8000, 0x3800, 0x3700, 0x3600, 0x8000, + 0x3500, 0x8000, 0x8000, 0x8000, 0x3400, 0x8000, 0x8000, 0x8000, + 0x8000, 0x8000, 0x8000, 0x3300, 0x3200, 0x8000, 0x8000, 0x8000, + 0x8000, 0x8000, 0x8000, 0x3100, 0x3000, 0x8000, 0x8000, 0x2f00, + 0x8000, 0x2e00, 0x2d00, 0x2c00, 0x8000, 0x8000, 0x8000, 0x2b00, + 0x8000, 0x2a00, 0x2900, 0x2800, 0x8000, 0x2700, 0x2600, 0x2500, + 0x2400, 0x2300, 0x2200, 0x8000, 0x8000, 0x2100, 0x2000, 0x1f00, + 0x1e00, 0x1d00, 0x1c00, 0x8000, 0x8000, 0x1b00, 0x1a00, 0x8000, + 0x1900, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x1800, + 0x8000, 0x1700, 0x1600, 0x1500, 0x8000, 0x1400, 0x1300, 0x1200, + 0x1100, 0x1000, 0x0f00, 0x8000, 0x8000, 0x0e00, 0x0d00, 0x0c00, + 0x0b00, 0x0a00, 0x0900, 0x8000, 0x8000, 0x0800, 0x0700, 0x8000, + 0x0600, 0x8000, 0x8000, 0x8000, 0x0500, 0x0400, 0x0300, 0x8000, + 0x0200, 0x8000, 0x8000, 0x8000, 0x0100, 0x8000, 0x8000, 0x8000, + 0x8000, 0x8000, 0x8000, 0x0000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x2071, 0xb582, 0x7003, 0x0002, + 0xa006, 0x7012, 0x7016, 0x703a, 0x703e, 0x7033, 0xb592, 0x7037, + 0xb592, 0x7007, 0x0001, 0x2061, 0xb5d2, 0x6003, 0x0002, 0x0005, + 0x1004, 0x2eea, 0x0e04, 0x2eea, 0x2071, 0xb582, 0x2b78, 0x7818, + 0xd084, 0x1140, 0x2a60, 0x7820, 0xa08e, 0x0069, 0x1904, 0x2fcf, + 0x0804, 0x2f68, 0x0005, 0x2071, 0xb582, 0x7004, 0x0002, 0x2ef3, + 0x2ef4, 0x2efd, 0x2f0e, 0x0005, 0x1004, 0x2efc, 0x0e04, 0x2efc, + 0x2b78, 0x7818, 0xd084, 0x01e8, 0x0005, 0x2b78, 0x2061, 0xb5d2, + 0x6008, 0xa08e, 0x0100, 0x0128, 0xa086, 0x0200, 0x0904, 0x2fc9, + 0x0005, 0x7014, 0x2068, 0x2a60, 0x7018, 0x0807, 0x7010, 0x2068, + 0x6834, 0xa086, 0x0103, 0x0108, 0x0005, 0x2a60, 0x2b78, 0x7018, + 0x0807, 0x2a60, 0x7820, 0xa08a, 0x0040, 0x1210, 0x61c4, 0x0042, + 0x2100, 0xa08a, 0x003f, 0x1a04, 0x2fc6, 0x61c4, 0x0804, 0x2f68, + 0x2faa, 0x2fd5, 0x2fdd, 0x2fe1, 0x2fe9, 0x2fef, 0x2ff3, 0x2fff, + 0x3002, 0x300c, 0x300f, 0x2fc6, 0x2fc6, 0x2fc6, 0x3012, 0x2fc6, + 0x3021, 0x3038, 0x304f, 0x30c9, 0x30ce, 0x30f7, 0x3148, 0x3159, + 0x3178, 0x31b0, 0x31ba, 0x31c7, 0x31da, 0x31fb, 0x3204, 0x323a, + 0x3240, 0x2fc6, 0x3269, 0x2fc6, 0x2fc6, 0x2fc6, 0x2fc6, 0x2fc6, + 0x3270, 0x327a, 0x2fc6, 0x2fc6, 0x2fc6, 0x2fc6, 0x2fc6, 0x2fc6, + 0x2fc6, 0x2fc6, 0x3282, 0x2fc6, 0x2fc6, 0x2fc6, 0x2fc6, 0x2fc6, + 0x3294, 0x329e, 0x2fc6, 0x2fc6, 0x2fc6, 0x2fc6, 0x2fc6, 0x2fc6, + 0x0002, 0x32c8, 0x331c, 0x3377, 0x3391, 0x2fc6, 0x33c2, 0x37f5, + 0x4233, 0x2fc6, 0x2fc6, 0x2fc6, 0x2fc6, 0x2fc6, 0x2fc6, 0x2fc6, + 0x2fc6, 0x300c, 0x300f, 0x37f7, 0x2fc6, 0x3804, 0x42cc, 0x4327, + 0x438b, 0x2fc6, 0x43ee, 0x4418, 0x4437, 0x4469, 0x2fc6, 0x2fc6, + 0x2fc6, 0x3808, 0x39ad, 0x39c7, 0x39e5, 0x3a46, 0x3aa6, 0x3ab1, + 0x3ae9, 0x3af8, 0x3b07, 0x3b0a, 0x3b2d, 0x3b79, 0x3bef, 0x3bfc, + 0x3cfd, 0x3e23, 0x3e4c, 0x3f4a, 0x3f6c, 0x3f78, 0x3fb1, 0x4075, + 0x2fc6, 0x2fc6, 0x2fc6, 0x2fc6, 0x40dd, 0x40f8, 0x416a, 0x421c, + 0x713c, 0x0000, 0x2021, 0x4000, 0x080c, 0x3ea9, 0x0126, 0x2091, + 0x8000, 0x0e04, 0x2fb6, 0x7818, 0xd084, 0x0110, 0x012e, 0x0cb0, + 0x7c22, 0x7926, 0x7a2a, 0x7b2e, 0x781b, 0x0001, 0x2091, 0x4080, + 0x7007, 0x0001, 0x2091, 0x5000, 0x012e, 0x0005, 0x2021, 0x4001, + 0x0c18, 0x2021, 0x4002, 0x0c00, 0x2021, 0x4003, 0x08e8, 0x2021, + 0x4005, 0x08d0, 0x2021, 0x4006, 0x08b8, 0xa02e, 0x2520, 0x7b28, + 0x7a2c, 0x7824, 0x7930, 0x0804, 0x3eb6, 0x7823, 0x0004, 0x7824, + 0x0807, 0xa02e, 0x2520, 0x7b28, 0x7a2c, 0x7824, 0x7930, 0x0804, + 0x3eb9, 0x7924, 0x7828, 0x2114, 0x200a, 0x0804, 0x2faa, 0x7924, + 0x2114, 0x0804, 0x2faa, 0x2099, 0x0009, 0x20a1, 0x0009, 0x20a9, + 0x0007, 0x53a3, 0x7924, 0x7a28, 0x7b2c, 0x0804, 0x2faa, 0x7824, + 0x2060, 0x0090, 0x2009, 0x0002, 0x2011, 0x0002, 0x2019, 0x0006, + 0x783b, 0x0017, 0x0804, 0x2faa, 0x7d38, 0x7c3c, 0x0840, 0x7d38, + 0x7c3c, 0x0888, 0x2061, 0x1000, 0xe10c, 0xa006, 0x2c15, 0xa200, + 0x8c60, 0x8109, 0x1dd8, 0x2010, 0xa005, 0x0904, 0x2faa, 0x0804, + 0x2fcc, 0x2069, 0xb552, 0x7824, 0x7930, 0xa11a, 0x1a04, 0x2fd2, + 0x8019, 0x0904, 0x2fd2, 0x684a, 0x6942, 0x782c, 0x6852, 0x7828, + 0x6856, 0xa006, 0x685a, 0x685e, 0x080c, 0x5da5, 0x0804, 0x2faa, + 0x2069, 0xb552, 0x7824, 0x7934, 0xa11a, 0x1a04, 0x2fd2, 0x8019, + 0x0904, 0x2fd2, 0x684e, 0x6946, 0x782c, 0x6862, 0x7828, 0x6866, + 0xa006, 0x686a, 0x686e, 0x080c, 0x53d5, 0x0804, 0x2faa, 0xa02e, + 0x2520, 0x81ff, 0x1904, 0x2fcf, 0x7924, 0x7b28, 0x7a2c, 0x20a9, + 0x0005, 0x20a1, 0xb589, 0x41a1, 0x080c, 0x3e75, 0x0904, 0x2fcf, + 0x2009, 0x0020, 0x080c, 0x3eb6, 0x701b, 0x3067, 0x0005, 0x6834, + 0x2008, 0xa084, 0x00ff, 0xa096, 0x0011, 0x0138, 0xa096, 0x0019, + 0x0120, 0xa096, 0x0015, 0x1904, 0x2fcf, 0x810f, 0xa18c, 0x00ff, + 0x0904, 0x2fcf, 0x710e, 0x700c, 0x8001, 0x0528, 0x700e, 0x080c, + 0x3e75, 0x0904, 0x2fcf, 0x2009, 0x0020, 0x2061, 0xb5d2, 0x6224, + 0x6328, 0x642c, 0x6530, 0xa290, 0x0040, 0xa399, 0x0000, 0xa4a1, + 0x0000, 0xa5a9, 0x0000, 0x080c, 0x3eb6, 0x701b, 0x3098, 0x0005, + 0x6834, 0xa084, 0x00ff, 0xa096, 0x0002, 0x0120, 0xa096, 0x000a, + 0x1904, 0x2fcf, 0x08c0, 0x7010, 0x2068, 0x6838, 0xc0fd, 0x683a, + 0x080c, 0x4e49, 0x1128, 0x7007, 0x0003, 0x701b, 0x30b2, 0x0005, + 0x080c, 0x54db, 0x0126, 0x2091, 0x8000, 0x20a9, 0x0005, 0x2099, + 0xb589, 0x530a, 0x2100, 0xa210, 0xa399, 0x0000, 0xa4a1, 0x0000, + 0xa5a9, 0x0000, 0xad80, 0x000d, 0x2009, 0x0020, 0x012e, 0x0804, + 0x3eb9, 0x61ac, 0x7824, 0x60ae, 0x0804, 0x2faa, 0x2091, 0x8000, + 0x7823, 0x4000, 0x7827, 0x4953, 0x782b, 0x5020, 0x782f, 0x2020, + 0x2009, 0x017f, 0x2104, 0x7832, 0x3f00, 0x7836, 0x2061, 0x0100, + 0x6200, 0x2061, 0x0200, 0x603c, 0x8007, 0xa205, 0x783a, 0x2009, + 0x04fd, 0x2104, 0x783e, 0x781b, 0x0001, 0x2091, 0x5000, 0x2091, + 0x4080, 0x2071, 0x0010, 0x20c1, 0x00f0, 0x0804, 0x0427, 0x81ff, + 0x1904, 0x2fcf, 0x7924, 0x810f, 0xa18c, 0x00ff, 0x080c, 0x4fa9, + 0x1904, 0x2fd2, 0x7e38, 0xa684, 0x3fff, 0xa082, 0x4000, 0x0210, + 0x0804, 0x2fd2, 0x7c28, 0x7d2c, 0x080c, 0x5171, 0xd28c, 0x1118, + 0x080c, 0x511a, 0x0010, 0x080c, 0x514a, 0x1518, 0x2061, 0xbd00, + 0x0126, 0x2091, 0x8000, 0x6000, 0xa086, 0x0000, 0x0148, 0x6010, + 0xa06d, 0x0130, 0x683c, 0xa406, 0x1118, 0x6840, 0xa506, 0x0150, + 0x012e, 0xace0, 0x0018, 0x2001, 0xb517, 0x2004, 0xac02, 0x1a04, + 0x2fcf, 0x0c30, 0x080c, 0x992a, 0x012e, 0x0904, 0x2fcf, 0x0804, + 0x2faa, 0xa00e, 0x2001, 0x0005, 0x080c, 0x54db, 0x0126, 0x2091, + 0x8000, 0x080c, 0x9ed2, 0x080c, 0x5408, 0x012e, 0x0804, 0x2faa, + 0x81ff, 0x1904, 0x2fcf, 0x080c, 0x3e8a, 0x0904, 0x2fd2, 0x080c, + 0x506f, 0x0904, 0x2fcf, 0x080c, 0x517d, 0x0904, 0x2fcf, 0x0804, + 0x2faa, 0x81ff, 0x1904, 0x2fcf, 0x080c, 0x3e9a, 0x0904, 0x2fd2, + 0x080c, 0x51e9, 0x0904, 0x2fcf, 0x2019, 0x0005, 0x7924, 0x080c, + 0x5198, 0x0904, 0x2fcf, 0x7828, 0xa08a, 0x1000, 0x1a04, 0x2fd2, + 0x8003, 0x800b, 0x810b, 0xa108, 0x080c, 0x69a8, 0x0804, 0x2faa, + 0x0126, 0x2091, 0x8000, 0x81ff, 0x0118, 0x2009, 0x0001, 0x0450, + 0x2029, 0x00ff, 0x6450, 0x2400, 0xa506, 0x01f8, 0x2508, 0x080c, + 0x4fa9, 0x11d8, 0x080c, 0x51e9, 0x1128, 0x2009, 0x0002, 0x62b4, + 0x2518, 0x00c0, 0x2019, 0x0004, 0xa00e, 0x080c, 0x5198, 0x1118, + 0x2009, 0x0006, 0x0078, 0x7824, 0xa08a, 0x1000, 0x1270, 0x8003, + 0x800b, 0x810b, 0xa108, 0x080c, 0x69a8, 0x8529, 0x1ae0, 0x012e, + 0x0804, 0x2faa, 0x012e, 0x0804, 0x2fcf, 0x012e, 0x0804, 0x2fd2, + 0x080c, 0x3e8a, 0x0904, 0x2fd2, 0x080c, 0x50d5, 0x080c, 0x5171, + 0x0804, 0x2faa, 0x81ff, 0x1904, 0x2fcf, 0x080c, 0x3e8a, 0x0904, + 0x2fd2, 0x080c, 0x50c6, 0x080c, 0x5171, 0x0804, 0x2faa, 0x81ff, + 0x1904, 0x2fcf, 0x080c, 0x3e8a, 0x0904, 0x2fd2, 0x080c, 0x514c, + 0x0904, 0x2fcf, 0x080c, 0x4e8d, 0x080c, 0x5113, 0x080c, 0x5171, + 0x0804, 0x2faa, 0x080c, 0x3e8a, 0x0904, 0x2fd2, 0x080c, 0x506f, + 0x0904, 0x2fcf, 0x62a0, 0x2019, 0x0005, 0x00c6, 0x080c, 0x51aa, + 0x2061, 0x0000, 0x080c, 0x6df5, 0x0076, 0x2039, 0x0000, 0x080c, + 0x6d02, 0x2009, 0x0000, 0x080c, 0xae82, 0x007e, 0x00ce, 0x080c, + 0x5171, 0x0804, 0x2faa, 0x080c, 0x3e8a, 0x0904, 0x2fd2, 0x080c, + 0x5171, 0x2208, 0x0804, 0x2faa, 0x0156, 0x00d6, 0x00e6, 0x2069, + 0xb614, 0x6810, 0x6914, 0xa10a, 0x1210, 0x2009, 0x0000, 0x6816, + 0x2011, 0x0000, 0x2019, 0x0000, 0x20a9, 0x007e, 0x2069, 0xb635, + 0x2d04, 0xa075, 0x0130, 0x704c, 0x0071, 0xa210, 0x7080, 0x0059, + 0xa318, 0x8d68, 0x1f04, 0x3218, 0x2300, 0xa218, 0x00ee, 0x00de, + 0x015e, 0x0804, 0x2faa, 0x00f6, 0x0016, 0xa07d, 0x0140, 0x2001, + 0x0000, 0x8000, 0x2f0c, 0x81ff, 0x0110, 0x2178, 0x0cd0, 0x001e, + 0x00fe, 0x0005, 0x2069, 0xb614, 0x6910, 0x62b0, 0x0804, 0x2faa, + 0x81ff, 0x1904, 0x2fcf, 0x6150, 0xa190, 0x2dc4, 0x2215, 0xa294, + 0x00ff, 0x6370, 0x83ff, 0x0108, 0x6274, 0x67d4, 0xd79c, 0x0118, + 0x2031, 0x0001, 0x0090, 0xd7ac, 0x0118, 0x2031, 0x0003, 0x0068, + 0xd7a4, 0x0118, 0x2031, 0x0002, 0x0040, 0x080c, 0x5acf, 0x1118, + 0x2031, 0x0004, 0x0010, 0x2031, 0x0000, 0x7e3a, 0x7f3e, 0x0804, + 0x2faa, 0x6140, 0x6244, 0x2019, 0xb7b6, 0x231c, 0x0804, 0x2faa, + 0x0126, 0x2091, 0x8000, 0x6134, 0xa006, 0x2010, 0x6338, 0x012e, + 0x0804, 0x2faa, 0x080c, 0x3e9a, 0x0904, 0x2fd2, 0x6244, 0x6338, + 0x0804, 0x2faa, 0x6140, 0x6244, 0x7824, 0x6042, 0x7b28, 0x6346, + 0x2069, 0xb552, 0x831f, 0xa305, 0x6816, 0x782c, 0x2069, 0xb7b6, + 0x2d1c, 0x206a, 0x0804, 0x2faa, 0x0126, 0x2091, 0x8000, 0x7824, + 0x6036, 0x782c, 0x603a, 0x012e, 0x0804, 0x2faa, 0x7838, 0xa005, + 0x01a8, 0x7828, 0xa025, 0x0904, 0x2fd2, 0x782c, 0xa02d, 0x0904, + 0x2fd2, 0xa00e, 0x080c, 0x4fa9, 0x1120, 0x6244, 0x6338, 0x6446, + 0x653a, 0xa186, 0x00ff, 0x0190, 0x8108, 0x0ca0, 0x080c, 0x3e9a, + 0x0904, 0x2fd2, 0x7828, 0xa00d, 0x0904, 0x2fd2, 0x782c, 0xa005, + 0x0904, 0x2fd2, 0x6244, 0x6146, 0x6338, 0x603a, 0x0804, 0x2faa, + 0x2001, 0xb500, 0x2004, 0xa086, 0x0003, 0x1904, 0x2fcf, 0x00c6, + 0x2061, 0x0100, 0x7924, 0x810f, 0xa18c, 0x00ff, 0xa196, 0x00ff, + 0x1130, 0x2001, 0xb515, 0x2004, 0xa085, 0xff00, 0x0078, 0xa182, + 0x007f, 0x16a0, 0xa188, 0x2dc4, 0x210d, 0xa18c, 0x00ff, 0x2001, + 0xb515, 0x2004, 0xa116, 0x0550, 0x810f, 0xa105, 0x0126, 0x2091, + 0x8000, 0x0006, 0x080c, 0x85c7, 0x000e, 0x01e0, 0x601a, 0x600b, + 0xbc09, 0x601f, 0x0001, 0x080c, 0x3e75, 0x01d8, 0x6837, 0x0000, + 0x7007, 0x0003, 0x6833, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x701b, + 0x3370, 0x2d00, 0x6012, 0x2009, 0x0032, 0x080c, 0x864c, 0x012e, + 0x00ce, 0x0005, 0x012e, 0x00ce, 0x0804, 0x2fcf, 0x00ce, 0x0804, + 0x2fd2, 0x080c, 0x861d, 0x0cb0, 0x2001, 0xb500, 0x2004, 0xa086, + 0x0003, 0x1904, 0x2fcf, 0x00c6, 0x2061, 0x0100, 0x7924, 0x810f, + 0xa18c, 0x00ff, 0xa196, 0x00ff, 0x1130, 0x2001, 0xb515, 0x2004, + 0xa085, 0xff00, 0x0078, 0xa182, 0x007f, 0x16a0, 0xa188, 0x2dc4, + 0x210d, 0xa18c, 0x00ff, 0x2001, 0xb515, 0x2004, 0xa116, 0x0550, + 0x810f, 0xa105, 0x0126, 0x2091, 0x8000, 0x0006, 0x080c, 0x85c7, + 0x000e, 0x01e0, 0x601a, 0x600b, 0xbc05, 0x601f, 0x0001, 0x080c, + 0x3e75, 0x01d8, 0x6837, 0x0000, 0x7007, 0x0003, 0x6833, 0x0000, + 0x6838, 0xc0fd, 0x683a, 0x701b, 0x3370, 0x2d00, 0x6012, 0x2009, + 0x0032, 0x080c, 0x864c, 0x012e, 0x00ce, 0x0005, 0x012e, 0x00ce, + 0x0804, 0x2fcf, 0x00ce, 0x0804, 0x2fd2, 0x080c, 0x861d, 0x0cb0, + 0x6830, 0xa086, 0x0100, 0x0904, 0x2fcf, 0x0804, 0x2faa, 0x2061, + 0xb874, 0x0126, 0x2091, 0x8000, 0x6000, 0xd084, 0x0178, 0x6104, + 0x6208, 0x2a60, 0x6068, 0x783a, 0x60b4, 0x783e, 0x60b0, 0x2019, + 0x0072, 0x201a, 0x6348, 0x012e, 0x0804, 0x2faa, 0xa00e, 0x2110, + 0x0c80, 0x81ff, 0x1904, 0x2fcf, 0x080c, 0x5acf, 0x0904, 0x2fcf, + 0x0126, 0x2091, 0x8000, 0x6248, 0x6068, 0xa202, 0x0248, 0xa085, + 0x0001, 0x080c, 0x2867, 0x080c, 0x462c, 0x012e, 0x0804, 0x2faa, + 0x012e, 0x0804, 0x2fd2, 0x0006, 0x0016, 0x00c6, 0x00e6, 0x2001, + 0xb7bf, 0x2070, 0x2061, 0xb552, 0x6008, 0x2072, 0x2009, 0x0000, + 0x2011, 0x1000, 0x080c, 0x6b40, 0x7206, 0x00ee, 0x00ce, 0x001e, + 0x000e, 0x0005, 0x0126, 0x2091, 0x8000, 0x7824, 0xa084, 0x0007, + 0x0002, 0x33d4, 0x33dd, 0x33e4, 0x33d1, 0x33d1, 0x33d1, 0x33d1, + 0x33d1, 0x012e, 0x0804, 0x2fd2, 0x2009, 0x0114, 0x2104, 0xa085, + 0x0800, 0x200a, 0x080c, 0x354f, 0x0070, 0x2009, 0x010b, 0x200b, + 0x0010, 0x080c, 0x354f, 0x0038, 0x81ff, 0x0128, 0x012e, 0x2021, + 0x400b, 0x0804, 0x2fac, 0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, + 0x00d6, 0x00e6, 0x00f6, 0x080c, 0x33ab, 0x2009, 0x0101, 0x210c, + 0x0016, 0x2001, 0x0138, 0x200c, 0x2003, 0x0001, 0x0016, 0x2001, + 0x007a, 0x2034, 0x2001, 0x007b, 0x202c, 0xa006, 0x2048, 0x2050, + 0x2058, 0x080c, 0x379a, 0x080c, 0x36fe, 0xa03e, 0x2720, 0x00f6, + 0x00e6, 0x00c6, 0x2d60, 0x2071, 0xb84a, 0x2079, 0x0020, 0x00d6, + 0x2069, 0x0000, 0x6824, 0xd0b4, 0x0140, 0x2001, 0x007d, 0x2004, + 0x783e, 0x2001, 0x007c, 0x2004, 0x783a, 0x00de, 0x2011, 0x0001, + 0x080c, 0x36aa, 0x080c, 0x36aa, 0x00ce, 0x00ee, 0x00fe, 0x080c, + 0x35f5, 0x080c, 0x36d2, 0x080c, 0x364f, 0x080c, 0x35b4, 0x080c, + 0x35e5, 0x00f6, 0x2079, 0x0100, 0x7824, 0xd094, 0x0530, 0x7814, + 0xa084, 0x0184, 0xa085, 0x0010, 0x7816, 0x2079, 0x0140, 0x080c, + 0x352d, 0x1110, 0x00fe, 0x0430, 0x7804, 0xd0dc, 0x0dc0, 0x2079, + 0x0100, 0x7827, 0x0086, 0x7814, 0xa084, 0x0184, 0xa085, 0x0032, + 0x7816, 0x080c, 0x352d, 0x1110, 0x00fe, 0x00a0, 0x7824, 0xd0bc, + 0x0dc0, 0x7827, 0x0080, 0xa026, 0x7c16, 0x7824, 0xd0ac, 0x0130, + 0x8b58, 0x080c, 0x3537, 0x00fe, 0x0804, 0x34f7, 0x00fe, 0x080c, + 0x352d, 0x1150, 0x8948, 0x2001, 0x007a, 0x2602, 0x2001, 0x007b, + 0x2502, 0x080c, 0x3537, 0x0088, 0x87ff, 0x0140, 0x2001, 0x0201, + 0x2004, 0xa005, 0x1904, 0x3431, 0x8739, 0x0038, 0x2001, 0xb823, + 0x2004, 0xa086, 0x0000, 0x1904, 0x3431, 0x2001, 0x0033, 0x2003, + 0x00f6, 0x8631, 0x1208, 0x8529, 0x2500, 0xa605, 0x0904, 0x34f7, + 0x7824, 0xd0bc, 0x0128, 0x2900, 0xaa05, 0xab05, 0x1904, 0x34f7, + 0x6033, 0x000d, 0x2001, 0x0030, 0x2003, 0x0004, 0x7824, 0xd0ac, + 0x1148, 0x2001, 0xb823, 0x2003, 0x0003, 0x2001, 0x0030, 0x2003, + 0x0009, 0x0040, 0x6027, 0x0001, 0x2001, 0x0075, 0x2004, 0xa005, + 0x0108, 0x6026, 0x2c00, 0x601a, 0x20e1, 0x9040, 0x2d00, 0x681a, + 0x6833, 0x000d, 0x7824, 0xd0a4, 0x1180, 0x6827, 0x0000, 0x00c6, + 0x20a9, 0x0004, 0x2061, 0x0020, 0x6003, 0x0008, 0x2001, 0x0203, + 0x2004, 0x1f04, 0x34cc, 0x00ce, 0x0040, 0x6827, 0x0001, 0x2001, + 0x0074, 0x2004, 0xa005, 0x0108, 0x6826, 0x00f6, 0x00c6, 0x2079, + 0x0100, 0x2061, 0x0020, 0x7827, 0x0002, 0x2001, 0x0072, 0x2004, + 0xa084, 0xfff8, 0x601a, 0x0006, 0x2001, 0x0073, 0x2004, 0x601e, + 0x78c6, 0x000e, 0x78ca, 0x00ce, 0x00fe, 0x0804, 0x340f, 0x2061, + 0x0100, 0x6027, 0x0002, 0x001e, 0x61e2, 0x001e, 0x6106, 0x7824, + 0xa084, 0x0003, 0xa086, 0x0002, 0x0188, 0x20e1, 0x9028, 0x6050, + 0xa084, 0xf7ef, 0x6052, 0x602f, 0x0000, 0x602c, 0xc0ac, 0x602e, + 0x604b, 0xf7f7, 0x6043, 0x0090, 0x6043, 0x0010, 0x2908, 0x2a10, + 0x2b18, 0x2b00, 0xaa05, 0xa905, 0x00fe, 0x00ee, 0x00de, 0x00ce, + 0x00be, 0x00ae, 0x009e, 0x008e, 0x1118, 0x012e, 0x0804, 0x2faa, + 0x012e, 0x2021, 0x400c, 0x0804, 0x2fac, 0xa085, 0x0001, 0x1d04, + 0x3536, 0x2091, 0x6000, 0x8420, 0xa486, 0x0064, 0x0005, 0x2001, + 0x0105, 0x2003, 0x0010, 0x2001, 0x0030, 0x2003, 0x0004, 0x2001, + 0x0020, 0x2003, 0x0004, 0x2001, 0xb823, 0x2003, 0x0000, 0x2001, + 0xb84a, 0x2003, 0x0000, 0x20e1, 0xf000, 0xa026, 0x0005, 0x00f6, + 0x2079, 0x0100, 0x2001, 0xb515, 0x200c, 0x7932, 0x7936, 0x080c, + 0x2847, 0x7850, 0xa084, 0x0980, 0xa085, 0x0030, 0x7852, 0x2019, + 0x01f4, 0x8319, 0x1df0, 0xa084, 0x0980, 0x7852, 0x782c, 0xc0ad, + 0x782e, 0x20a9, 0x0046, 0x1d04, 0x356b, 0x2091, 0x6000, 0x1f04, + 0x356b, 0x7850, 0xa085, 0x0400, 0x7852, 0x2001, 0x0009, 0x2004, + 0xa084, 0x0003, 0xa086, 0x0001, 0x1118, 0x782c, 0xc0ac, 0x782e, + 0x784b, 0xf7f7, 0x7843, 0x0090, 0x7843, 0x0010, 0x20a9, 0x000e, + 0xe000, 0x1f04, 0x3588, 0x7850, 0xa085, 0x1400, 0x7852, 0x2019, + 0x61a8, 0x7854, 0xe000, 0xe000, 0xd08c, 0x1110, 0x8319, 0x1dc8, + 0x7827, 0x0048, 0x7850, 0xa085, 0x0400, 0x7852, 0x7843, 0x0040, + 0x2019, 0x01f4, 0xe000, 0xe000, 0x8319, 0x1de0, 0x2001, 0x0140, + 0x2003, 0x0100, 0x7827, 0x0020, 0x7843, 0x0000, 0x2003, 0x0000, + 0x7827, 0x0048, 0x00fe, 0x0005, 0x7824, 0xd0ac, 0x11c8, 0x00f6, + 0x00e6, 0x2071, 0xb823, 0x2079, 0x0030, 0x2001, 0x0201, 0x2004, + 0xa005, 0x0160, 0x7000, 0xa086, 0x0000, 0x1140, 0x0051, 0xd0bc, + 0x0108, 0x8738, 0x7003, 0x0003, 0x7803, 0x0019, 0x00ee, 0x00fe, + 0x0005, 0x780c, 0xa08c, 0x0070, 0x0178, 0x2009, 0x007a, 0x260a, + 0x2009, 0x007b, 0x250a, 0xd0b4, 0x0108, 0x8a50, 0xd0ac, 0x0108, + 0x8948, 0xd0a4, 0x0108, 0x8b58, 0x0005, 0x00f6, 0x2079, 0x0200, + 0x781c, 0xd084, 0x0140, 0x20e1, 0x0007, 0x20e1, 0x2000, 0x2001, + 0x020a, 0x2004, 0x0ca8, 0x00fe, 0x0005, 0x00e6, 0x2071, 0x0100, + 0x2001, 0xb7c0, 0x2004, 0x70e2, 0x2009, 0xb515, 0x210c, 0x716e, + 0x7063, 0x0100, 0x7166, 0x719e, 0x706b, 0x0000, 0x7073, 0x0809, + 0x7077, 0x0008, 0x7078, 0xa080, 0x0100, 0x707a, 0x7080, 0x8000, + 0x7082, 0x7087, 0xaaaa, 0xa006, 0x708a, 0x708e, 0x707e, 0x70d6, + 0x70ab, 0x0036, 0x70af, 0x95d5, 0x7027, 0x0080, 0x7014, 0xa084, + 0x0184, 0xa085, 0x0032, 0x7016, 0x080c, 0x36d2, 0x080c, 0x352d, + 0x1110, 0x8421, 0x0028, 0x7024, 0xd0bc, 0x0db0, 0x7027, 0x0080, + 0x00f6, 0x00e6, 0x2071, 0xb823, 0x2079, 0x0030, 0x00d6, 0x2069, + 0x0000, 0x6824, 0xd0b4, 0x0120, 0x683c, 0x783e, 0x6838, 0x783a, + 0x00de, 0x2011, 0x0011, 0x080c, 0x36aa, 0x2011, 0x0001, 0x080c, + 0x36aa, 0x00ee, 0x00fe, 0x7017, 0x0000, 0x00ee, 0x0005, 0x00f6, + 0x00e6, 0x2071, 0xb823, 0x2079, 0x0030, 0x7904, 0xd1fc, 0x0904, + 0x36a7, 0x7803, 0x0002, 0xa026, 0xd19c, 0x1904, 0x36a3, 0x7000, + 0x0002, 0x36a7, 0x3665, 0x3689, 0x36a3, 0xd1bc, 0x1150, 0xd1dc, + 0x1150, 0x8001, 0x7002, 0x2011, 0x0001, 0x04e1, 0x05c0, 0x04d1, + 0x04b0, 0x780f, 0x0000, 0x7820, 0x7924, 0x7803, 0x0004, 0x7822, + 0x7926, 0x2001, 0x0201, 0x200c, 0x81ff, 0x0de8, 0x080c, 0x35d1, + 0x2009, 0x0001, 0x7808, 0xd0ec, 0x0110, 0x2009, 0x0011, 0x7902, + 0x00f0, 0x8001, 0x7002, 0xa184, 0x0880, 0x1138, 0x7804, 0xd0fc, + 0x1940, 0x2011, 0x0001, 0x00b1, 0x0090, 0x6030, 0xa092, 0x0004, + 0xa086, 0x0009, 0x1120, 0x6000, 0x601a, 0x2011, 0x0025, 0x6232, + 0xd1dc, 0x1988, 0x0870, 0x7803, 0x0004, 0x7003, 0x0000, 0x00ee, + 0x00fe, 0x0005, 0x6024, 0xa005, 0x0520, 0x8001, 0x6026, 0x6018, + 0x6130, 0xa140, 0x2804, 0x7832, 0x8840, 0x2804, 0x7836, 0x8840, + 0x2804, 0x7822, 0x8840, 0x2804, 0x7826, 0x8840, 0x7a02, 0x7000, + 0x8000, 0x7002, 0x6018, 0xa802, 0xa08a, 0x0029, 0x1138, 0x6018, + 0xa080, 0x0001, 0x2004, 0x601a, 0x2001, 0x000d, 0x6032, 0xa085, + 0x0001, 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x2071, 0xb84a, 0x2079, + 0x0020, 0x7904, 0xd1fc, 0x01f0, 0x7803, 0x0002, 0x2d60, 0xa026, + 0x7000, 0x0002, 0x36fa, 0x36e5, 0x36f1, 0x8001, 0x7002, 0xd19c, + 0x1188, 0x2011, 0x0001, 0x080c, 0x36aa, 0x0160, 0x080c, 0x36aa, + 0x0048, 0x8001, 0x7002, 0x7804, 0xd0fc, 0x1d30, 0x2011, 0x0001, + 0x080c, 0x36aa, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x00e6, + 0x00c6, 0x2061, 0x0200, 0x2001, 0xb7c0, 0x2004, 0x601a, 0x2061, + 0x0100, 0x2001, 0xb7bf, 0x2004, 0x60ce, 0x6004, 0xc0ac, 0xa085, + 0x0200, 0x6006, 0x2001, 0x0074, 0x2004, 0xa005, 0x01f8, 0x2038, + 0x2001, 0x0076, 0x2024, 0x2001, 0x0077, 0x201c, 0x080c, 0x3e75, + 0x6833, 0x000d, 0x6f26, 0x2d00, 0x681a, 0xa78a, 0x0007, 0x0220, + 0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0xa03e, 0x6818, 0xa080, + 0x000d, 0x04b1, 0x1d90, 0x2d00, 0x681a, 0x0088, 0x080c, 0x3e75, + 0x6833, 0x000d, 0x2070, 0x6827, 0x0001, 0x2d00, 0x681a, 0x2001, + 0x0076, 0x2004, 0x2072, 0x2001, 0x0077, 0x2004, 0x7006, 0x2061, + 0x0020, 0x2079, 0x0100, 0x2001, 0xb7bf, 0x2004, 0x6012, 0x20e1, + 0x9040, 0x2001, 0x0072, 0x2004, 0xa084, 0xfff8, 0x700a, 0x601a, + 0x0006, 0x2001, 0x0073, 0x2004, 0x700e, 0x601e, 0x78c6, 0x000e, + 0x78ca, 0xa006, 0x603a, 0x603e, 0x00ce, 0x00ee, 0x00fe, 0x0005, + 0x00e6, 0x2071, 0x0010, 0x20a0, 0x2099, 0x0014, 0x7003, 0x0026, + 0x7432, 0x7336, 0xa006, 0x703a, 0x703e, 0x810b, 0x810b, 0x21a8, + 0x810b, 0x7122, 0x7003, 0x0041, 0x7004, 0xd0fc, 0x0de8, 0x7003, + 0x0002, 0x7003, 0x0040, 0x53a5, 0x7430, 0x7334, 0x87ff, 0x0180, + 0x00c6, 0x00d6, 0x2d60, 0x00c6, 0x080c, 0x3e75, 0x00ce, 0x6018, + 0x2070, 0x2d00, 0x7006, 0x601a, 0x00de, 0x00ce, 0xa085, 0x0001, + 0x00ee, 0x0005, 0x00e6, 0x2001, 0x0075, 0x2004, 0xa005, 0x0508, + 0x2038, 0x2001, 0x0078, 0x2024, 0x2001, 0x0079, 0x201c, 0x080c, + 0x3e75, 0x2d60, 0x6833, 0x000d, 0x6f26, 0x2d00, 0x681a, 0xa78a, + 0x0007, 0x0220, 0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0xa03e, + 0x6818, 0xa080, 0x000d, 0x080c, 0x3768, 0x1d88, 0x2d00, 0x681a, + 0x00e0, 0x080c, 0x3e75, 0x2d60, 0x6033, 0x000d, 0x2070, 0x6027, + 0x0001, 0x2c00, 0x601a, 0x2001, 0x0078, 0x2004, 0x2072, 0x2001, + 0x0079, 0x2004, 0x7006, 0x2001, 0x0072, 0x2004, 0xa084, 0xfff8, + 0x700a, 0x2001, 0x0073, 0x2004, 0x700e, 0x2001, 0x0030, 0x2003, + 0x0004, 0x7824, 0xd0ac, 0x1178, 0x2001, 0x0101, 0x200c, 0xc1ed, + 0x2102, 0x6027, 0x0000, 0x2001, 0xb823, 0x2003, 0x0003, 0x2001, + 0x0030, 0x2003, 0x0009, 0x00ee, 0x0005, 0x0804, 0x2faa, 0x0126, + 0x2091, 0x8000, 0x20a9, 0x0012, 0x2001, 0xb540, 0x20a0, 0xa006, + 0x40a4, 0x012e, 0x0804, 0x2faa, 0x7d38, 0x7c3c, 0x0804, 0x3051, + 0x080c, 0x3e75, 0x0904, 0x2fcf, 0x080c, 0x5acf, 0x0110, 0x080c, + 0x4bf0, 0x2009, 0x001c, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x080c, + 0x3eb6, 0x701b, 0x381c, 0x0005, 0xade8, 0x000d, 0x6800, 0xa005, + 0x0904, 0x2fd2, 0x6804, 0xd0ac, 0x0118, 0xd0a4, 0x0904, 0x2fd2, + 0xd094, 0x00c6, 0x2061, 0x0100, 0x6104, 0x0138, 0x6200, 0xa292, + 0x0005, 0x0218, 0xa18c, 0xffdf, 0x0010, 0xa18d, 0x0020, 0x6106, + 0x00ce, 0xd08c, 0x00c6, 0x2061, 0x0100, 0x6104, 0x0118, 0xa18d, + 0x0010, 0x0010, 0xa18c, 0xffef, 0x6106, 0x00ce, 0x2009, 0x0100, + 0x210c, 0xa18a, 0x0002, 0x0268, 0xd084, 0x0158, 0x6a28, 0xa28a, + 0x007f, 0x1a04, 0x2fd2, 0xa288, 0x2dc4, 0x210d, 0xa18c, 0x00ff, + 0x615a, 0xd0dc, 0x0130, 0x6828, 0xa08a, 0x007f, 0x1a04, 0x2fd2, + 0x6052, 0x6808, 0xa08a, 0x0100, 0x0a04, 0x2fd2, 0xa08a, 0x0841, + 0x1a04, 0x2fd2, 0xa084, 0x0007, 0x1904, 0x2fd2, 0x680c, 0xa005, + 0x0904, 0x2fd2, 0x6810, 0xa005, 0x0904, 0x2fd2, 0x6848, 0x6940, + 0xa10a, 0x1a04, 0x2fd2, 0x8001, 0x0904, 0x2fd2, 0x684c, 0x6944, + 0xa10a, 0x1a04, 0x2fd2, 0x8001, 0x0904, 0x2fd2, 0x6804, 0xd0fc, + 0x0560, 0x080c, 0x3e75, 0x0904, 0x2fcf, 0x2009, 0x0014, 0x7a2c, + 0x7b28, 0x7c3c, 0x7d38, 0xa290, 0x0038, 0xa399, 0x0000, 0x080c, + 0x3eb6, 0x701b, 0x389c, 0x0005, 0xade8, 0x000d, 0x20a9, 0x0014, + 0x2d98, 0x2069, 0xb56e, 0x2da0, 0x53a3, 0x7010, 0xa0e8, 0x000d, + 0x2001, 0xb572, 0x200c, 0xd1e4, 0x0140, 0x00c6, 0x2061, 0x0100, + 0x6004, 0xa085, 0x0b00, 0x6006, 0x00ce, 0x2009, 0xb7b1, 0x200b, + 0x0000, 0x2001, 0xb574, 0x2004, 0xd0ac, 0x0158, 0x7824, 0x200a, + 0x2009, 0x017f, 0x200a, 0x3200, 0xa084, 0x003f, 0xa085, 0x3020, + 0x2090, 0x20a9, 0x001c, 0x2d98, 0x2069, 0xb552, 0x2da0, 0x53a3, + 0x6814, 0xa08c, 0x00ff, 0x6142, 0x8007, 0xa084, 0x00ff, 0x6046, + 0x080c, 0x5da5, 0x080c, 0x536c, 0x080c, 0x53d5, 0x6000, 0xa086, + 0x0000, 0x1904, 0x3997, 0x6808, 0x602a, 0x080c, 0x2470, 0x0006, + 0x2001, 0x0100, 0x2004, 0xa082, 0x0005, 0x000e, 0x0268, 0x2009, + 0x0170, 0x200b, 0x0080, 0xe000, 0xe000, 0x200b, 0x0000, 0x0036, + 0x6b08, 0x080c, 0x28a2, 0x003e, 0x6818, 0x691c, 0x6a20, 0x6b24, + 0x8007, 0x810f, 0x8217, 0x831f, 0x6016, 0x611a, 0x621e, 0x6322, + 0x6c04, 0xd4f4, 0x0148, 0x6830, 0x6934, 0x6a38, 0x6b3c, 0x8007, + 0x810f, 0x8217, 0x831f, 0x0010, 0xa084, 0xf0ff, 0x6006, 0x610a, + 0x620e, 0x6312, 0x8007, 0x810f, 0x8217, 0x831f, 0x20a9, 0x0004, + 0x20a1, 0xb7c6, 0x40a1, 0x080c, 0x6a68, 0x6904, 0xd1fc, 0x0520, + 0x00c6, 0x2009, 0x0000, 0x20a9, 0x0001, 0x6b70, 0xd384, 0x01c8, + 0x0020, 0x839d, 0x12b0, 0x3508, 0x8109, 0x080c, 0x635c, 0x6878, + 0x6016, 0x6874, 0x2008, 0xa084, 0xff00, 0x8007, 0x600a, 0xa184, + 0x00ff, 0x6006, 0x8108, 0x1118, 0x6003, 0x0003, 0x0010, 0x6003, + 0x0001, 0x1f04, 0x3931, 0x00ce, 0x2069, 0xb552, 0x2001, 0xb79e, + 0x6a80, 0xa294, 0x0030, 0xa28e, 0x0000, 0x0170, 0xa28e, 0x0010, + 0x0118, 0xa28e, 0x0020, 0x0140, 0x2003, 0xaaaa, 0x080c, 0x28eb, + 0x2001, 0xb78f, 0x2102, 0x0008, 0x2102, 0x00c6, 0x2061, 0x0100, + 0x602f, 0x0040, 0x602f, 0x0000, 0x00ce, 0x080c, 0x5acf, 0x0128, + 0x080c, 0x40cf, 0x0110, 0x080c, 0x2867, 0x60c8, 0xa005, 0x01d0, + 0x6003, 0x0001, 0x2009, 0x397d, 0x00e0, 0x080c, 0x5acf, 0x1178, + 0x2011, 0x59a2, 0x080c, 0x699c, 0x2011, 0x5995, 0x080c, 0x6a5c, + 0x2001, 0xb79f, 0x2003, 0x0000, 0x080c, 0x5a07, 0x0040, 0x080c, + 0x4b1f, 0x0028, 0x6003, 0x0004, 0x2009, 0x3997, 0x0010, 0x0804, + 0x2faa, 0x2001, 0x0100, 0x2004, 0xa082, 0x0005, 0x0258, 0x2001, + 0x0170, 0x2004, 0xa084, 0x00ff, 0xa086, 0x004c, 0x1118, 0x2091, + 0x309d, 0x0817, 0x2091, 0x301d, 0x0817, 0x6000, 0xa086, 0x0000, + 0x0904, 0x2fcf, 0x2069, 0xb552, 0x7830, 0x6842, 0x7834, 0x6846, + 0x6804, 0xd0fc, 0x0118, 0x2009, 0x0030, 0x0010, 0x2009, 0x001c, + 0x2d00, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x0804, 0x3eb9, 0xa006, + 0x080c, 0x2867, 0x81ff, 0x1904, 0x2fcf, 0x080c, 0x5acf, 0x1178, + 0x2001, 0xb79f, 0x2003, 0x0001, 0x2001, 0xb500, 0x2003, 0x0001, + 0xa085, 0x0001, 0x080c, 0x5b13, 0x080c, 0x5a07, 0x0020, 0x080c, + 0x4bf0, 0x080c, 0x4b1f, 0x0804, 0x2faa, 0x81ff, 0x1904, 0x2fcf, + 0x080c, 0x5acf, 0x1110, 0x0804, 0x2fcf, 0x6188, 0x81ff, 0x0198, + 0x703f, 0x0000, 0x2001, 0xbcc0, 0x2009, 0x0040, 0x7a2c, 0x7b28, + 0x7c3c, 0x7d38, 0x0126, 0x2091, 0x8000, 0x080c, 0x3eb9, 0x701b, + 0x2fa8, 0x012e, 0x0005, 0x703f, 0x0001, 0x00d6, 0x2069, 0xbcc0, + 0x20a9, 0x0040, 0x20a1, 0xbcc0, 0x2019, 0xffff, 0x43a4, 0x6550, + 0xa588, 0x2dc4, 0x210d, 0xa18c, 0x00ff, 0x216a, 0xa00e, 0x2011, + 0x0002, 0x2100, 0xa506, 0x01a8, 0x080c, 0x4fa9, 0x1190, 0x6014, + 0x821c, 0x0238, 0xa398, 0xbcc0, 0xa085, 0xff00, 0x8007, 0x201a, + 0x0038, 0xa398, 0xbcc0, 0x2324, 0xa4a4, 0xff00, 0xa405, 0x201a, + 0x8210, 0x8108, 0xa182, 0x0080, 0x1208, 0x0c18, 0x8201, 0x8007, + 0x2d0c, 0xa105, 0x206a, 0x00de, 0x20a9, 0x0040, 0x20a1, 0xbcc0, + 0x2099, 0xbcc0, 0x080c, 0x4b8f, 0x0804, 0x39f2, 0x080c, 0x3e9a, + 0x0904, 0x2fd2, 0x00c6, 0x080c, 0x3e75, 0x00ce, 0x1120, 0x2009, + 0x0002, 0x0804, 0x2fcf, 0x2001, 0xb553, 0x2004, 0xd0b4, 0x0550, + 0x7824, 0xa084, 0xff00, 0xa08e, 0x7e00, 0x0520, 0xa08e, 0x7f00, + 0x0508, 0xa08e, 0x8000, 0x01f0, 0x6000, 0xd08c, 0x11d8, 0x6004, + 0xa084, 0x00ff, 0xa086, 0x0006, 0x11a8, 0x6837, 0x0000, 0x6838, + 0xc0fd, 0x683a, 0x080c, 0x9dda, 0x1120, 0x2009, 0x0003, 0x0804, + 0x2fcf, 0x7007, 0x0003, 0x701b, 0x3a7e, 0x0005, 0x080c, 0x3e9a, + 0x0904, 0x2fd2, 0x20a9, 0x002b, 0x2c98, 0xade8, 0x0002, 0x2da0, + 0x53a3, 0x20a9, 0x0004, 0xac80, 0x0006, 0x2098, 0xad80, 0x0006, + 0x20a0, 0x080c, 0x4b8f, 0x20a9, 0x0004, 0xac80, 0x000a, 0x2098, + 0xad80, 0x000a, 0x20a0, 0x080c, 0x4b8f, 0x2d00, 0x2009, 0x002b, + 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x0804, 0x3eb9, 0x81ff, 0x1904, + 0x2fcf, 0x080c, 0x3e8a, 0x0904, 0x2fd2, 0x080c, 0x5186, 0x0804, + 0x2faa, 0x81ff, 0x1904, 0x2fcf, 0x7828, 0xa08a, 0x1000, 0x1a04, + 0x2fd2, 0x080c, 0x3e9a, 0x0904, 0x2fd2, 0x080c, 0x51e9, 0x0904, + 0x2fcf, 0x2019, 0x0004, 0xa00e, 0x080c, 0x5198, 0x7924, 0x810f, + 0x7a28, 0x0011, 0x0804, 0x2faa, 0xa186, 0x00ff, 0x0110, 0x0071, + 0x0060, 0x2029, 0x007e, 0x2061, 0xb500, 0x6450, 0x2400, 0xa506, + 0x0110, 0x2508, 0x0019, 0x8529, 0x1ec8, 0x0005, 0x080c, 0x4fa9, + 0x1138, 0x2200, 0x8003, 0x800b, 0x810b, 0xa108, 0x080c, 0x69a8, + 0x0005, 0x81ff, 0x1904, 0x2fcf, 0x080c, 0x3e8a, 0x0904, 0x2fd2, + 0x080c, 0x506f, 0x0904, 0x2fcf, 0x080c, 0x518f, 0x0804, 0x2faa, + 0x81ff, 0x1904, 0x2fcf, 0x080c, 0x3e8a, 0x0904, 0x2fd2, 0x080c, + 0x506f, 0x0904, 0x2fcf, 0x080c, 0x517d, 0x0804, 0x2faa, 0x6100, + 0x0804, 0x2faa, 0x080c, 0x3e9a, 0x0904, 0x2fd2, 0x2001, 0xb500, + 0x2004, 0xa086, 0x0003, 0x1904, 0x2fcf, 0x00d6, 0xace8, 0x000a, + 0x7924, 0xd184, 0x0110, 0xace8, 0x0006, 0x680c, 0x8007, 0x783e, + 0x6808, 0x8007, 0x783a, 0x6b04, 0x831f, 0x6a00, 0x8217, 0x00de, + 0x6100, 0xa18c, 0x0200, 0x0804, 0x2faa, 0x7824, 0xa09c, 0x0003, + 0xd0b4, 0x1160, 0xa39a, 0x0003, 0x1a04, 0x2fcf, 0x6250, 0xa294, + 0x00ff, 0xa084, 0xff00, 0x8007, 0xa206, 0x1150, 0x2001, 0xb540, + 0x2009, 0x000c, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x0804, 0x3eb9, + 0x81ff, 0x1904, 0x2fcf, 0x080c, 0x3e9a, 0x0904, 0x2fd2, 0x6004, + 0xa084, 0x00ff, 0xa086, 0x0006, 0x1904, 0x2fcf, 0x00c6, 0x080c, + 0x3e75, 0x00ce, 0x0904, 0x2fcf, 0x6837, 0x0000, 0x6838, 0xc0fd, + 0x683a, 0x080c, 0x9d86, 0x0904, 0x2fcf, 0x7007, 0x0003, 0x701b, + 0x3b6a, 0x0005, 0x6830, 0xa086, 0x0100, 0x0904, 0x2fcf, 0xad80, + 0x000e, 0x2009, 0x000c, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x0804, + 0x3eb9, 0xa006, 0x080c, 0x2867, 0x7824, 0xa084, 0x00ff, 0xa086, + 0x00ff, 0x0118, 0x81ff, 0x1904, 0x2fcf, 0x080c, 0x5acf, 0x0110, + 0x080c, 0x4bf0, 0x7828, 0xa08a, 0x1000, 0x1a04, 0x2fd2, 0x7924, + 0xa18c, 0xff00, 0x810f, 0xa186, 0x00ff, 0x0138, 0xa182, 0x007f, + 0x1a04, 0x2fd2, 0x2100, 0x080c, 0x2831, 0x0026, 0x00c6, 0x0126, + 0x2091, 0x8000, 0x2061, 0xb7f3, 0x601b, 0x0000, 0x601f, 0x0000, + 0x080c, 0x5acf, 0x1178, 0x2001, 0xb79f, 0x2003, 0x0001, 0x2001, + 0xb500, 0x2003, 0x0001, 0xa085, 0x0001, 0x080c, 0x5b13, 0x080c, + 0x5a07, 0x0420, 0x2011, 0x0003, 0x080c, 0x8075, 0x2011, 0x0002, + 0x080c, 0x807f, 0x080c, 0x7f59, 0x0036, 0x2019, 0x0000, 0x080c, + 0x7fe4, 0x003e, 0x2061, 0x0100, 0x2001, 0xb515, 0x2004, 0xa084, + 0x00ff, 0x810f, 0xa105, 0x604a, 0x6043, 0x0090, 0x6043, 0x0010, + 0x2009, 0x002d, 0x2011, 0x4b54, 0x080c, 0x6a22, 0x7924, 0xa18c, + 0xff00, 0x810f, 0x080c, 0x5acf, 0x1110, 0x2009, 0x00ff, 0x7a28, + 0x080c, 0x3acc, 0x012e, 0x00ce, 0x002e, 0x0804, 0x2faa, 0x7924, + 0xa18c, 0xff00, 0x810f, 0x00c6, 0x080c, 0x4f4d, 0x2c08, 0x00ce, + 0x1904, 0x2fd2, 0x0804, 0x2faa, 0x81ff, 0x0120, 0x2009, 0x0001, + 0x0804, 0x2fcf, 0x60d4, 0xd0ac, 0x1130, 0xd09c, 0x1120, 0x2009, + 0x0005, 0x0804, 0x2fcf, 0x080c, 0x3e75, 0x1120, 0x2009, 0x0002, + 0x0804, 0x2fcf, 0x7924, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x080c, + 0x3eb6, 0x701b, 0x3c1c, 0x0005, 0x2009, 0x0080, 0x080c, 0x4fa9, + 0x1130, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x0120, 0x2021, + 0x400a, 0x0804, 0x2fac, 0x00d6, 0xade8, 0x000d, 0x6900, 0x6a08, + 0x6b0c, 0x6c10, 0x6d14, 0x6e18, 0x6820, 0xa0be, 0x0100, 0x0904, + 0x3c93, 0xa0be, 0x0112, 0x0904, 0x3c93, 0xa0be, 0x0113, 0x0904, + 0x3c93, 0xa0be, 0x0114, 0x0904, 0x3c93, 0xa0be, 0x0117, 0x0904, + 0x3c93, 0xa0be, 0x011a, 0x0904, 0x3c93, 0xa0be, 0x011c, 0x0904, + 0x3c93, 0xa0be, 0x0121, 0x05b0, 0xa0be, 0x0131, 0x0598, 0xa0be, + 0x0171, 0x05c8, 0xa0be, 0x0173, 0x05b0, 0xa0be, 0x01a1, 0x1120, + 0x6830, 0x8007, 0x6832, 0x04a8, 0xa0be, 0x0212, 0x0540, 0xa0be, + 0x0213, 0x0528, 0xa0be, 0x0214, 0x01b0, 0xa0be, 0x0217, 0x0168, + 0xa0be, 0x021a, 0x1120, 0x6838, 0x8007, 0x683a, 0x00e0, 0xa0be, + 0x0300, 0x01c8, 0x00de, 0x0804, 0x2fd2, 0xad80, 0x0010, 0x20a9, + 0x0007, 0x080c, 0x3cd9, 0xad80, 0x000e, 0x20a9, 0x0001, 0x080c, + 0x3cd9, 0x0048, 0xad80, 0x000c, 0x080c, 0x3ce7, 0x0050, 0xad80, + 0x000e, 0x080c, 0x3ce7, 0xad80, 0x000c, 0x20a9, 0x0001, 0x080c, + 0x3cd9, 0x00c6, 0x080c, 0x3e75, 0x0568, 0x6838, 0xc0fd, 0x683a, + 0x6837, 0x0119, 0x6853, 0x0000, 0x684f, 0x0020, 0x685b, 0x0001, + 0x810b, 0x697e, 0x6883, 0x0000, 0x6a86, 0x6b8a, 0x6c8e, 0x6d92, + 0x6996, 0x689b, 0x0000, 0x00ce, 0x00de, 0x6837, 0x0000, 0x6838, + 0xc0fd, 0x683a, 0x6823, 0x0000, 0x6804, 0x2068, 0x080c, 0x9da2, + 0x1120, 0x2009, 0x0003, 0x0804, 0x2fcf, 0x7007, 0x0003, 0x701b, + 0x3cd0, 0x0005, 0x00ce, 0x00de, 0x2009, 0x0002, 0x0804, 0x2fcf, + 0x6820, 0xa086, 0x8001, 0x1904, 0x2faa, 0x2009, 0x0004, 0x0804, + 0x2fcf, 0x0016, 0x2008, 0x2044, 0x8000, 0x204c, 0x8000, 0x290a, + 0x8108, 0x280a, 0x8108, 0x1f04, 0x3cdb, 0x001e, 0x0005, 0x0016, + 0x00a6, 0x00b6, 0x2008, 0x2044, 0x8000, 0x204c, 0x8000, 0x2054, + 0x8000, 0x205c, 0x2b0a, 0x8108, 0x2a0a, 0x8108, 0x290a, 0x8108, + 0x280a, 0x00be, 0x00ae, 0x001e, 0x0005, 0x81ff, 0x0120, 0x2009, + 0x0001, 0x0804, 0x2fcf, 0x60d4, 0xd0ac, 0x1130, 0xd09c, 0x1120, + 0x2009, 0x0005, 0x0804, 0x2fcf, 0x7924, 0x2140, 0xa18c, 0xff00, + 0x810f, 0x60d4, 0xd0ac, 0x1120, 0xa182, 0x0080, 0x0a04, 0x2fd2, + 0xa182, 0x00ff, 0x1a04, 0x2fd2, 0x7a2c, 0x7b28, 0x6070, 0xa306, + 0x1140, 0x6074, 0xa24e, 0x0904, 0x2fd2, 0xa9cc, 0xff00, 0x0904, + 0x2fd2, 0x00c6, 0x080c, 0x3dc5, 0x2c68, 0x00ce, 0x0530, 0xa0c6, + 0x4000, 0x1178, 0x00c6, 0x0006, 0x2d60, 0xa00e, 0x080c, 0x524a, + 0x1108, 0xc185, 0x6000, 0xd0bc, 0x0108, 0xc18d, 0x000e, 0x00ce, + 0x0088, 0xa0c6, 0x4007, 0x1110, 0x2408, 0x0060, 0xa0c6, 0x4008, + 0x1118, 0x2708, 0x2610, 0x0030, 0xa0c6, 0x4009, 0x1108, 0x0010, + 0x2001, 0x4006, 0x2020, 0x0804, 0x2fac, 0x2d00, 0x7022, 0x0016, + 0x00b6, 0x00c6, 0x00e6, 0x2c70, 0x080c, 0x85c7, 0x05d8, 0x2d00, + 0x601a, 0x080c, 0xa027, 0x2e58, 0x00ee, 0x00e6, 0x00c6, 0x080c, + 0x3e75, 0x00ce, 0x2b70, 0x1150, 0x080c, 0x861d, 0x00ee, 0x00ce, + 0x00be, 0x001e, 0x2009, 0x0002, 0x0804, 0x2fcf, 0x6837, 0x0000, + 0x683b, 0x0000, 0x2d00, 0x6012, 0x6833, 0x0000, 0x6838, 0xc0fd, + 0xd88c, 0x0108, 0xc0f5, 0x683a, 0x0126, 0x2091, 0x8000, 0x080c, + 0x2c9c, 0x012e, 0x601f, 0x0001, 0x2001, 0x0000, 0x080c, 0x4eeb, + 0x2001, 0x0002, 0x080c, 0x4efd, 0x2009, 0x0002, 0x080c, 0x864c, + 0xa085, 0x0001, 0x00ee, 0x00ce, 0x00be, 0x001e, 0x1120, 0x2009, + 0x0003, 0x0804, 0x2fcf, 0x7007, 0x0003, 0x701b, 0x3da8, 0x0005, + 0x6830, 0xa086, 0x0100, 0x7020, 0x2060, 0x1138, 0x2009, 0x0004, + 0x6204, 0xa294, 0x00ff, 0x0804, 0x2fcf, 0x2009, 0x0000, 0x6838, + 0xd0f4, 0x1904, 0x2faa, 0x080c, 0x524a, 0x1108, 0xc185, 0x6000, + 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x2faa, 0x00e6, 0x00d6, 0xa02e, + 0x2001, 0xb535, 0x2004, 0xd0ac, 0x0130, 0xa026, 0x20a9, 0x00ff, + 0x2071, 0xb635, 0x0030, 0x2021, 0x0080, 0x20a9, 0x007f, 0x2071, + 0xb6b5, 0x2e04, 0xa005, 0x1130, 0x2100, 0xa406, 0x1570, 0x2428, + 0xc5fd, 0x0458, 0x2068, 0x6f10, 0x2700, 0xa306, 0x11b0, 0x6e14, + 0x2600, 0xa206, 0x1190, 0x2400, 0xa106, 0x1160, 0x2d60, 0xd884, + 0x0568, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x1538, 0x2001, + 0x4000, 0x0428, 0x2001, 0x4007, 0x0410, 0x2400, 0xa106, 0x1168, + 0x6e14, 0x87ff, 0x1138, 0x86ff, 0x09d0, 0x2001, 0xb535, 0x2004, + 0xd0ac, 0x19a8, 0x2001, 0x4008, 0x0090, 0x8420, 0x8e70, 0x1f04, + 0x3dd9, 0x85ff, 0x1130, 0x2001, 0x4009, 0x0048, 0x2001, 0x0001, + 0x0030, 0x080c, 0x4f4d, 0x1dd0, 0x6312, 0x6216, 0xa006, 0xa005, + 0x00de, 0x00ee, 0x0005, 0x81ff, 0x1904, 0x2fcf, 0x080c, 0x3e75, + 0x0904, 0x2fcf, 0x6837, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x7824, + 0xa005, 0x0904, 0x2fd2, 0xa096, 0x00ff, 0x0120, 0xa092, 0x0004, + 0x1a04, 0x2fd2, 0x2010, 0x2d18, 0x080c, 0x2c4f, 0x0904, 0x2fcf, + 0x7007, 0x0003, 0x701b, 0x3e45, 0x0005, 0x6830, 0xa086, 0x0100, + 0x0904, 0x2fcf, 0x0804, 0x2faa, 0x7924, 0xa18c, 0xff00, 0x810f, + 0x60d4, 0xd0ac, 0x1120, 0xa182, 0x0080, 0x0a04, 0x2fd2, 0xa182, + 0x00ff, 0x1a04, 0x2fd2, 0x0126, 0x2091, 0x8000, 0x080c, 0x9c8a, + 0x1188, 0xa190, 0xb635, 0x2204, 0xa065, 0x0160, 0x080c, 0x4c0b, + 0x2001, 0xb535, 0x2004, 0xd0ac, 0x0110, 0x6017, 0x0000, 0x012e, + 0x0804, 0x2faa, 0x012e, 0x0804, 0x2fcf, 0x080c, 0x15f8, 0x0188, + 0xa006, 0x6802, 0x7010, 0xa005, 0x1120, 0x2d00, 0x7012, 0x7016, + 0x0030, 0x7014, 0x6802, 0x2060, 0x2d00, 0x6006, 0x7016, 0xad80, + 0x000d, 0x0005, 0x7924, 0x810f, 0xa18c, 0x00ff, 0x080c, 0x4fa9, + 0x1130, 0x7e28, 0xa684, 0x3fff, 0xa082, 0x4000, 0x0208, 0xa066, + 0x8cff, 0x0005, 0x7e24, 0x860f, 0xa18c, 0x00ff, 0x080c, 0x4fa9, + 0x1128, 0xa6b4, 0x00ff, 0xa682, 0x4000, 0x0208, 0xa066, 0x8cff, + 0x0005, 0x0016, 0x7110, 0x81ff, 0x0128, 0x2168, 0x6904, 0x080c, + 0x160f, 0x0cc8, 0x7112, 0x7116, 0x001e, 0x0005, 0x2031, 0x0001, + 0x0010, 0x2031, 0x0000, 0x2061, 0xb5d2, 0x6606, 0x6112, 0x600e, + 0x6226, 0x632a, 0x642e, 0x6532, 0x2c10, 0x080c, 0x1643, 0x7007, + 0x0002, 0x701b, 0x2faa, 0x0005, 0x00f6, 0x0126, 0x2091, 0x8000, + 0x2079, 0x0000, 0x2001, 0xb590, 0x2004, 0xa005, 0x1168, 0x0e04, + 0x3ee4, 0x7818, 0xd084, 0x1140, 0x7a22, 0x7b26, 0x7c2a, 0x781b, + 0x0001, 0x2091, 0x4080, 0x0408, 0x0016, 0x00c6, 0x00e6, 0x2071, + 0xb582, 0x7138, 0xa182, 0x0010, 0x0218, 0x7030, 0x2060, 0x0078, + 0x7030, 0xa0e0, 0x0004, 0xac82, 0xb5d2, 0x0210, 0x2061, 0xb592, + 0x2c00, 0x7032, 0x81ff, 0x1108, 0x7036, 0x8108, 0x713a, 0x2262, + 0x6306, 0x640a, 0x00ee, 0x00ce, 0x001e, 0x012e, 0x00fe, 0x0005, + 0x00e6, 0x2071, 0xb582, 0x7038, 0xa005, 0x0570, 0x0126, 0x2091, + 0x8000, 0x0e04, 0x3f3b, 0x00f6, 0x2079, 0x0000, 0x7818, 0xd084, + 0x1508, 0x00c6, 0x7034, 0x2060, 0x2c04, 0x7822, 0x6004, 0x7826, + 0x6008, 0x782a, 0x781b, 0x0001, 0x2091, 0x4080, 0x7038, 0x8001, + 0x703a, 0xa005, 0x1130, 0x7033, 0xb592, 0x7037, 0xb592, 0x00ce, + 0x0048, 0xac80, 0x0004, 0xa0fa, 0xb5d2, 0x0210, 0x2001, 0xb592, + 0x7036, 0x00ce, 0x00fe, 0x012e, 0x00ee, 0x0005, 0x0026, 0x2001, + 0xb553, 0x2004, 0xd0c4, 0x0120, 0x2011, 0x8014, 0x080c, 0x3ecc, + 0x002e, 0x0005, 0x81ff, 0x1904, 0x2fcf, 0x0126, 0x2091, 0x8000, + 0x6030, 0xc08d, 0xc085, 0xc0ac, 0x6032, 0x080c, 0x5acf, 0x1178, + 0x2001, 0xb79f, 0x2003, 0x0001, 0x2001, 0xb500, 0x2003, 0x0001, + 0xa085, 0x0001, 0x080c, 0x5b13, 0x080c, 0x5a07, 0x0010, 0x080c, + 0x4b1f, 0x012e, 0x0804, 0x2faa, 0x7824, 0x2008, 0xa18c, 0xfffd, + 0x1128, 0x61e0, 0xa10d, 0x61e2, 0x0804, 0x2faa, 0x0804, 0x2fd2, + 0x81ff, 0x1904, 0x2fcf, 0x6000, 0xa086, 0x0003, 0x1904, 0x2fcf, + 0x2001, 0xb553, 0x2004, 0xd0ac, 0x1904, 0x2fcf, 0x080c, 0x3e9a, + 0x0904, 0x2fd2, 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x1120, + 0x7828, 0xa005, 0x0904, 0x2faa, 0x00c6, 0x080c, 0x3e75, 0x00ce, + 0x0904, 0x2fcf, 0x6837, 0x0000, 0x6833, 0x0000, 0x6838, 0xc0fd, + 0x683a, 0x080c, 0x9e6b, 0x0904, 0x2fcf, 0x7007, 0x0003, 0x701b, + 0x3faa, 0x0005, 0x6830, 0xa086, 0x0100, 0x0904, 0x2fcf, 0x0804, + 0x2faa, 0x2001, 0xb500, 0x2004, 0xa086, 0x0003, 0x1904, 0x2fcf, + 0x7f24, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x080c, 0x3e75, 0x0904, + 0x2fcf, 0x2009, 0x0000, 0x2031, 0x0000, 0x7023, 0x0000, 0x702f, + 0x0000, 0xad80, 0x0005, 0x7026, 0x20a0, 0x080c, 0x4fa9, 0x1904, + 0x4024, 0x6004, 0xa0c4, 0x00ff, 0xa8c6, 0x0006, 0x0130, 0xa0c4, + 0xff00, 0xa8c6, 0x0600, 0x1904, 0x4024, 0x2001, 0xb553, 0x2004, + 0xd0ac, 0x1128, 0x080c, 0x524a, 0x1110, 0xd79c, 0x05e8, 0xd794, + 0x1110, 0xd784, 0x0158, 0xac80, 0x0006, 0x2098, 0x3400, 0x20a9, + 0x0004, 0x53a3, 0x080c, 0x3ce7, 0xd794, 0x0148, 0xac80, 0x000a, + 0x2098, 0x3400, 0x20a9, 0x0004, 0x53a3, 0x080c, 0x3ce7, 0x21a2, + 0xd794, 0x01d8, 0xac80, 0x0000, 0x2098, 0x94a0, 0x20a9, 0x0002, + 0x53a3, 0xac80, 0x0003, 0x20a6, 0x94a0, 0xac80, 0x0004, 0x2098, + 0x3400, 0x20a9, 0x0002, 0x53a3, 0x080c, 0x3cd9, 0xac80, 0x0026, + 0x2098, 0x20a9, 0x0002, 0x53a3, 0x0008, 0x94a0, 0xd794, 0x0110, + 0xa6b0, 0x000b, 0xa6b0, 0x0005, 0x8108, 0x2001, 0xb535, 0x2004, + 0xd0ac, 0x0118, 0xa186, 0x0100, 0x0040, 0xd78c, 0x0120, 0xa186, + 0x0100, 0x0170, 0x0018, 0xa186, 0x007e, 0x0150, 0xd794, 0x0118, + 0xa686, 0x0020, 0x0010, 0xa686, 0x0028, 0x0150, 0x0804, 0x3fcd, + 0x86ff, 0x1120, 0x7120, 0x810b, 0x0804, 0x2faa, 0x702f, 0x0001, + 0x711e, 0x7020, 0xa600, 0x7022, 0x772a, 0x2061, 0xb5d2, 0x6007, + 0x0000, 0x6612, 0x7024, 0x600e, 0x6226, 0x632a, 0x642e, 0x6532, + 0x2c10, 0x080c, 0x1643, 0x7007, 0x0002, 0x701b, 0x4060, 0x0005, + 0x702c, 0xa005, 0x1170, 0x711c, 0x7024, 0x20a0, 0x7728, 0x2031, + 0x0000, 0x2061, 0xb5d2, 0x6224, 0x6328, 0x642c, 0x6530, 0x0804, + 0x3fcd, 0x7120, 0x810b, 0x0804, 0x2faa, 0x2029, 0x007e, 0x7924, + 0x7a28, 0x7b2c, 0x7c38, 0xa184, 0xff00, 0x8007, 0xa0e2, 0x0020, + 0x0a04, 0x2fd2, 0xa502, 0x0a04, 0x2fd2, 0xa184, 0x00ff, 0xa0e2, + 0x0020, 0x0a04, 0x2fd2, 0xa502, 0x0a04, 0x2fd2, 0xa284, 0xff00, + 0x8007, 0xa0e2, 0x0020, 0x0a04, 0x2fd2, 0xa502, 0x0a04, 0x2fd2, + 0xa284, 0x00ff, 0xa0e2, 0x0020, 0x0a04, 0x2fd2, 0xa502, 0x0a04, + 0x2fd2, 0xa384, 0xff00, 0x8007, 0xa0e2, 0x0020, 0x0a04, 0x2fd2, + 0xa502, 0x0a04, 0x2fd2, 0xa384, 0x00ff, 0xa0e2, 0x0020, 0x0a04, + 0x2fd2, 0xa502, 0x0a04, 0x2fd2, 0xa484, 0xff00, 0x8007, 0xa0e2, + 0x0020, 0x0a04, 0x2fd2, 0xa502, 0x0a04, 0x2fd2, 0xa484, 0x00ff, + 0xa0e2, 0x0020, 0x0a04, 0x2fd2, 0xa502, 0x0a04, 0x2fd2, 0x2061, + 0xb7b9, 0x6102, 0x6206, 0x630a, 0x640e, 0x0804, 0x2faa, 0x0006, + 0x2001, 0xb553, 0x2004, 0xd0cc, 0x000e, 0x0005, 0x0006, 0x2001, + 0xb572, 0x2004, 0xd0bc, 0x000e, 0x0005, 0x6168, 0x7a24, 0x6300, + 0x82ff, 0x1118, 0x7926, 0x0804, 0x2faa, 0x83ff, 0x1904, 0x2fd2, + 0x2001, 0xfff0, 0xa200, 0x1a04, 0x2fd2, 0x2019, 0xffff, 0x606c, + 0xa302, 0xa200, 0x0a04, 0x2fd2, 0x7926, 0x626a, 0x0804, 0x2faa, + 0x2001, 0xb500, 0x2004, 0xa086, 0x0003, 0x1904, 0x2fcf, 0x7c28, + 0x7d24, 0x7e38, 0x7f2c, 0x080c, 0x3e75, 0x0904, 0x2fcf, 0x2009, + 0x0000, 0x2019, 0x0000, 0x7023, 0x0000, 0x702f, 0x0000, 0xad80, + 0x0003, 0x7026, 0x20a0, 0xa1e0, 0xb635, 0x2c64, 0x8cff, 0x01b8, + 0x6004, 0xa084, 0x00ff, 0xa086, 0x0006, 0x0130, 0x6004, 0xa084, + 0xff00, 0xa086, 0x0600, 0x1158, 0x6014, 0x20a2, 0x94a0, 0x6010, + 0x8007, 0xa105, 0x8007, 0x20a2, 0x94a0, 0xa398, 0x0002, 0x8108, + 0xa182, 0x00ff, 0x0120, 0xa386, 0x002a, 0x0148, 0x08e0, 0x83ff, + 0x1120, 0x7120, 0x810c, 0x0804, 0x2faa, 0x702f, 0x0001, 0x711e, + 0x7020, 0xa300, 0x7022, 0x2061, 0xb5d2, 0x6007, 0x0000, 0x6312, + 0x7024, 0x600e, 0x6426, 0x652a, 0x662e, 0x6732, 0x2c10, 0x080c, + 0x1643, 0x7007, 0x0002, 0x701b, 0x4156, 0x0005, 0x702c, 0xa005, + 0x1168, 0x711c, 0x7024, 0x20a0, 0x2019, 0x0000, 0x2061, 0xb5d2, + 0x6424, 0x6528, 0x662c, 0x6730, 0x0804, 0x4113, 0x7120, 0x810c, + 0x0804, 0x2faa, 0x81ff, 0x1904, 0x2fcf, 0x60d4, 0xd0ac, 0x1118, + 0xd09c, 0x0904, 0x2fcf, 0x080c, 0x3e75, 0x0904, 0x2fcf, 0x7924, + 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x080c, 0x3eb6, 0x701b, 0x4181, + 0x0005, 0x00d6, 0xade8, 0x000d, 0x6828, 0xa0be, 0x7000, 0x0148, + 0xa0be, 0x7100, 0x0130, 0xa0be, 0x7200, 0x0118, 0x00de, 0x0804, + 0x2fd2, 0x6820, 0x6924, 0x080c, 0x281d, 0x1510, 0x080c, 0x4f4d, + 0x11f8, 0x7122, 0x6612, 0x6516, 0x6e18, 0x00c6, 0x080c, 0x3e75, + 0x01b8, 0x080c, 0x3e75, 0x01a0, 0x00ce, 0x00de, 0x6837, 0x0000, + 0x6838, 0xc0fd, 0x683a, 0x6823, 0x0000, 0x6804, 0x2068, 0x080c, + 0x9dbe, 0x0904, 0x2fcf, 0x7007, 0x0003, 0x701b, 0x41bb, 0x0005, + 0x00de, 0x0804, 0x2fcf, 0x7120, 0x080c, 0x2d97, 0x6820, 0xa086, + 0x8001, 0x0904, 0x2fcf, 0x2d00, 0x701e, 0x6804, 0xa080, 0x0002, + 0x0006, 0x20a9, 0x002a, 0x2098, 0x20a0, 0x080c, 0x4b8f, 0x000e, + 0xade8, 0x000d, 0x6a08, 0x6b0c, 0x6c10, 0x6d14, 0x2061, 0xb5d2, + 0x6007, 0x0000, 0x6e00, 0x6f28, 0xa7c6, 0x7000, 0x1108, 0x0018, + 0xa7c6, 0x7100, 0x1140, 0xa6c2, 0x0004, 0x0a04, 0x2fd2, 0x2009, + 0x0004, 0x0804, 0x3eb9, 0xa7c6, 0x7200, 0x1904, 0x2fd2, 0xa6c2, + 0x0054, 0x0a04, 0x2fd2, 0x600e, 0x6013, 0x002a, 0x6226, 0x632a, + 0x642e, 0x6532, 0x2c10, 0x080c, 0x1643, 0x7007, 0x0002, 0x701b, + 0x4202, 0x0005, 0x701c, 0x2068, 0x6804, 0xa080, 0x0001, 0x2004, + 0xa080, 0x0002, 0x0006, 0x20a9, 0x002a, 0x2098, 0x20a0, 0x080c, + 0x4b8f, 0x000e, 0x2009, 0x002a, 0x2061, 0xb5d2, 0x6224, 0x6328, + 0x642c, 0x6530, 0x0804, 0x3eb9, 0x81ff, 0x1904, 0x2fcf, 0x792c, + 0x2001, 0xb7a0, 0x2102, 0x080c, 0x3e8a, 0x0904, 0x2fd2, 0x080c, + 0x506f, 0x0904, 0x2fcf, 0x0126, 0x2091, 0x8000, 0x080c, 0x51a1, + 0x012e, 0x0804, 0x2faa, 0x7824, 0xd08c, 0x1118, 0xd084, 0x0904, + 0x3a46, 0x080c, 0x3e9a, 0x0904, 0x2fd2, 0x00c6, 0x080c, 0x3e75, + 0x00ce, 0x1120, 0x2009, 0x0002, 0x0804, 0x2fcf, 0x6004, 0xa084, + 0x00ff, 0xa086, 0x0006, 0x0128, 0xa08e, 0x0004, 0x0110, 0xa08e, + 0x0005, 0x15b8, 0x7824, 0xd08c, 0x0120, 0x6000, 0xc08c, 0x6002, + 0x0030, 0x2001, 0xb553, 0x2004, 0xd0b4, 0x0904, 0x3a82, 0x7824, + 0xa084, 0xff00, 0xa08e, 0x7e00, 0x0904, 0x3a82, 0xa08e, 0x7f00, + 0x0904, 0x3a82, 0xa08e, 0x8000, 0x0904, 0x3a82, 0x6000, 0xd08c, + 0x1904, 0x3a82, 0x6837, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x080c, + 0x9dda, 0x1120, 0x2009, 0x0003, 0x0804, 0x2fcf, 0x7007, 0x0003, + 0x701b, 0x4283, 0x0005, 0x080c, 0x3e9a, 0x0904, 0x2fd2, 0x0804, + 0x3a82, 0x2009, 0xb531, 0x210c, 0x81ff, 0x0120, 0x2009, 0x0001, + 0x0804, 0x2fcf, 0x2001, 0xb500, 0x2004, 0xa086, 0x0003, 0x0120, + 0x2009, 0x0007, 0x0804, 0x2fcf, 0x2001, 0xb553, 0x2004, 0xd0ac, + 0x0120, 0x2009, 0x0008, 0x0804, 0x2fcf, 0x609c, 0xd0a4, 0x1118, + 0xd0ac, 0x1904, 0x3a82, 0x6837, 0x0000, 0x6833, 0x0000, 0x6838, + 0xc0fd, 0x683a, 0x080c, 0x9e6b, 0x1120, 0x2009, 0x0003, 0x0804, + 0x2fcf, 0x7007, 0x0003, 0x701b, 0x42be, 0x0005, 0x6830, 0xa086, + 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x2fcf, 0x080c, 0x3e9a, + 0x0904, 0x2fd2, 0x0804, 0x4252, 0x81ff, 0x2009, 0x0001, 0x1904, + 0x2fcf, 0x6000, 0xa086, 0x0003, 0x2009, 0x0007, 0x1904, 0x2fcf, + 0x2001, 0xb553, 0x2004, 0xd0ac, 0x2009, 0x0008, 0x1904, 0x2fcf, + 0x080c, 0x3e9a, 0x0904, 0x2fd2, 0x6004, 0xa084, 0x00ff, 0xa086, + 0x0006, 0x2009, 0x0009, 0x1904, 0x2fcf, 0x00c6, 0x080c, 0x3e75, + 0x00ce, 0x2009, 0x0002, 0x0904, 0x2fcf, 0x6837, 0x0000, 0x6833, + 0x0000, 0x6838, 0xc0fd, 0x683a, 0x7928, 0xa194, 0xff00, 0xa18c, + 0x00ff, 0xa006, 0x82ff, 0x1128, 0xc0ed, 0x6952, 0x792c, 0x6956, + 0x0048, 0xa28e, 0x0100, 0x1904, 0x2fd2, 0xc0e5, 0x6853, 0x0000, + 0x6857, 0x0000, 0x683e, 0x080c, 0xa028, 0x2009, 0x0003, 0x0904, + 0x2fcf, 0x7007, 0x0003, 0x701b, 0x431e, 0x0005, 0x6830, 0xa086, + 0x0100, 0x2009, 0x0004, 0x0904, 0x2fcf, 0x0804, 0x2faa, 0x81ff, + 0x2009, 0x0001, 0x1904, 0x2fcf, 0x6000, 0xa086, 0x0003, 0x2009, + 0x0007, 0x1904, 0x2fcf, 0x080c, 0x3e9a, 0x0904, 0x2fd2, 0x6004, + 0xa084, 0x00ff, 0xa086, 0x0006, 0x2009, 0x0009, 0x1904, 0x2fcf, + 0x00c6, 0x080c, 0x3e75, 0x00ce, 0x2009, 0x0002, 0x0904, 0x2fcf, + 0xad80, 0x000f, 0x2009, 0x0008, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, + 0x080c, 0x3eb6, 0x701b, 0x4355, 0x0005, 0x00d6, 0xade8, 0x000f, + 0x6800, 0xa086, 0x0500, 0x1140, 0x6804, 0xa005, 0x1128, 0x6808, + 0xa084, 0xff00, 0x1108, 0x0018, 0x00de, 0x1904, 0x2fd2, 0x00de, + 0x6837, 0x0000, 0x6833, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x00c6, + 0x080c, 0x3e9a, 0x1118, 0x00ce, 0x0804, 0x2fd2, 0x080c, 0xa077, + 0x2009, 0x0003, 0x00ce, 0x0904, 0x2fcf, 0x7007, 0x0003, 0x701b, + 0x4382, 0x0005, 0x6830, 0xa086, 0x0100, 0x2009, 0x0004, 0x0904, + 0x2fcf, 0x0804, 0x2faa, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, + 0x2fcf, 0x6000, 0xa086, 0x0003, 0x0120, 0x2009, 0x0007, 0x0804, + 0x2fcf, 0x7e24, 0x860f, 0xa18c, 0x00ff, 0xa6b4, 0x00ff, 0x080c, + 0x4fa9, 0x1904, 0x2fd2, 0xa186, 0x007f, 0x0150, 0x6004, 0xa084, + 0x00ff, 0xa086, 0x0006, 0x0120, 0x2009, 0x0009, 0x0804, 0x2fcf, + 0x00c6, 0x080c, 0x3e75, 0x00ce, 0x1120, 0x2009, 0x0002, 0x0804, + 0x2fcf, 0x6837, 0x0000, 0x6838, 0xc0fd, 0x683a, 0x2001, 0x0100, + 0x8007, 0x680a, 0x080c, 0x9df5, 0x1120, 0x2009, 0x0003, 0x0804, + 0x2fcf, 0x7007, 0x0003, 0x701b, 0x43ce, 0x0005, 0x6808, 0x8007, + 0xa086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, 0x2fcf, 0x68b0, + 0x6836, 0x6810, 0x8007, 0xa084, 0x00ff, 0x800c, 0x6814, 0x8007, + 0xa084, 0x00ff, 0x8004, 0xa080, 0x0002, 0xa108, 0xad80, 0x0004, + 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x0804, 0x3eb9, 0x080c, 0x3e75, + 0x1120, 0x2009, 0x0002, 0x0804, 0x2fcf, 0x7924, 0xa194, 0xff00, + 0xa18c, 0x00ff, 0x8217, 0x82ff, 0x0110, 0x0804, 0x2fd2, 0x2009, + 0x001a, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x080c, 0x3eb6, 0x701b, + 0x440a, 0x0005, 0x2001, 0xb52a, 0x2003, 0x0001, 0xad80, 0x000d, + 0x2098, 0x20a9, 0x001a, 0x20a1, 0xb7c6, 0x53a3, 0x0804, 0x2faa, + 0x080c, 0x3e75, 0x1120, 0x2009, 0x0002, 0x0804, 0x2fcf, 0x7924, + 0xa194, 0xff00, 0xa18c, 0x00ff, 0x8217, 0x82ff, 0x0110, 0x0804, + 0x2fd2, 0x2099, 0xb7c6, 0x20a0, 0x20a9, 0x001a, 0x53a3, 0x2009, + 0x001a, 0x7a2c, 0x7b28, 0x7c3c, 0x7d38, 0x0804, 0x3eb9, 0x7824, + 0xa08a, 0x1000, 0x1a04, 0x2fd2, 0x0126, 0x2091, 0x8000, 0x8003, + 0x800b, 0x810b, 0xa108, 0x00c6, 0x2061, 0xb7f3, 0x6142, 0x00ce, + 0x012e, 0x0804, 0x2faa, 0x00c6, 0x080c, 0x5acf, 0x1188, 0x2001, + 0xb79f, 0x2003, 0x0001, 0x2001, 0xb500, 0x2003, 0x0001, 0xa085, + 0x0001, 0x080c, 0x5b13, 0x080c, 0x5a07, 0x080c, 0x1515, 0x0038, + 0x2061, 0xb500, 0x6030, 0xc09d, 0x6032, 0x080c, 0x4b1f, 0x00ce, + 0x0005, 0x0126, 0x2091, 0x8000, 0x00c6, 0x2061, 0xb7f3, 0x7924, + 0x6152, 0x614e, 0x6057, 0x0000, 0x604b, 0x0009, 0x7838, 0x606a, + 0x783c, 0x6066, 0x7828, 0x6062, 0x782c, 0x605e, 0x2061, 0xb7a1, + 0x2001, 0xb808, 0x600e, 0x6013, 0x0001, 0x6017, 0x0002, 0x6007, + 0x0000, 0x6037, 0x0000, 0x00ce, 0x012e, 0x0804, 0x2faa, 0x0126, + 0x00c6, 0x00e6, 0x2061, 0x0100, 0x2071, 0xb500, 0x6044, 0xd0a4, + 0x11b0, 0xd084, 0x0118, 0x080c, 0x4606, 0x0068, 0xd08c, 0x0118, + 0x080c, 0x4527, 0x0040, 0xd094, 0x0118, 0x080c, 0x44f8, 0x0018, + 0xd09c, 0x0108, 0x0061, 0x00ee, 0x00ce, 0x012e, 0x0005, 0x0016, + 0x6128, 0xd19c, 0x1110, 0xc19d, 0x612a, 0x001e, 0x0ca0, 0x624c, + 0xa286, 0xf0f0, 0x1150, 0x6048, 0xa086, 0xf0f0, 0x0130, 0x624a, + 0x6043, 0x0090, 0x6043, 0x0010, 0x0490, 0xa294, 0xff00, 0xa296, + 0xf700, 0x0178, 0x7134, 0xd1a4, 0x1160, 0x6240, 0xa295, 0x0100, + 0x6242, 0xa294, 0x0010, 0x0128, 0x2009, 0x00f7, 0x080c, 0x4baf, + 0x00f0, 0x6040, 0xa084, 0x0010, 0xa085, 0x0140, 0x6042, 0x6043, + 0x0000, 0x707b, 0x0000, 0x7097, 0x0001, 0x70bb, 0x0000, 0x70d7, + 0x0000, 0x2009, 0xbcc0, 0x200b, 0x0000, 0x708b, 0x0000, 0x707f, + 0x000a, 0x2009, 0x000a, 0x2011, 0x4ad5, 0x080c, 0x6a22, 0x0005, + 0x0156, 0x2001, 0xb574, 0x2004, 0xd08c, 0x0110, 0x7053, 0xffff, + 0x707c, 0xa005, 0x1510, 0x2011, 0x4ad5, 0x080c, 0x699c, 0x6040, + 0xa094, 0x0010, 0xa285, 0x0020, 0x6042, 0x20a9, 0x00c8, 0x6044, + 0xd08c, 0x1168, 0x1f04, 0x450f, 0x6242, 0x708f, 0x0000, 0x6040, + 0xa094, 0x0010, 0xa285, 0x0080, 0x6042, 0x6242, 0x0030, 0x6242, + 0x708f, 0x0000, 0x7083, 0x0000, 0x0000, 0x015e, 0x0005, 0x7080, + 0xa08a, 0x0003, 0x1210, 0x0023, 0x0010, 0x080c, 0x1515, 0x0005, + 0x4533, 0x4583, 0x4605, 0x00f6, 0x7083, 0x0001, 0x20e1, 0xa000, + 0xe000, 0x20e1, 0x8700, 0x080c, 0x2470, 0x20e1, 0x9080, 0x20e1, + 0x4000, 0x2079, 0xbb00, 0x207b, 0x2200, 0x7807, 0x00ef, 0x780b, + 0x0000, 0x780f, 0x00ef, 0x7813, 0x0138, 0x7817, 0x0000, 0x781b, + 0x0000, 0x781f, 0x0000, 0x7823, 0xffff, 0x7827, 0xffff, 0x782b, + 0x0000, 0x782f, 0x0000, 0x2079, 0xbb0c, 0x207b, 0x1101, 0x7807, + 0x0000, 0x2099, 0xb505, 0x20a1, 0xbb0e, 0x20a9, 0x0004, 0x53a3, + 0x2079, 0xbb12, 0x207b, 0x0000, 0x7807, 0x0000, 0x2099, 0xbb00, + 0x20a1, 0x020b, 0x20a9, 0x0014, 0x53a6, 0x60c3, 0x000c, 0x600f, + 0x0000, 0x080c, 0x4b06, 0x00fe, 0x7087, 0x0000, 0x6043, 0x0008, + 0x6043, 0x0000, 0x0005, 0x00d6, 0x7084, 0x7087, 0x0000, 0xa025, + 0x0904, 0x45ed, 0x6020, 0xd0b4, 0x1904, 0x45eb, 0x7194, 0x81ff, + 0x0904, 0x45db, 0xa486, 0x000c, 0x1904, 0x45e6, 0xa480, 0x0018, + 0x8004, 0x20a8, 0x2011, 0xbb80, 0x2019, 0xbb00, 0x220c, 0x2304, + 0xa106, 0x11b8, 0x8210, 0x8318, 0x1f04, 0x459e, 0x6043, 0x0004, + 0x608b, 0xbc94, 0x608f, 0xf0f0, 0x6043, 0x0006, 0x7083, 0x0002, + 0x708f, 0x0002, 0x2009, 0x07d0, 0x2011, 0x4adc, 0x080c, 0x6a22, + 0x0490, 0x2069, 0xbb80, 0x6930, 0xa18e, 0x1101, 0x1538, 0x6834, + 0xa005, 0x1520, 0x6900, 0xa18c, 0x00ff, 0x1118, 0x6804, 0xa005, + 0x0190, 0x2011, 0xbb8e, 0x2019, 0xb505, 0x20a9, 0x0004, 0x220c, + 0x2304, 0xa102, 0x0230, 0x1190, 0x8210, 0x8318, 0x1f04, 0x45cf, + 0x0068, 0x7097, 0x0000, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x2099, + 0xbb80, 0x20a1, 0x020b, 0x20a9, 0x0014, 0x53a6, 0x6043, 0x0008, + 0x6043, 0x0000, 0x0010, 0x00de, 0x0005, 0x6040, 0xa085, 0x0100, + 0x6042, 0x6020, 0xd0b4, 0x1db8, 0x60c3, 0x000c, 0x2011, 0xb7ea, + 0x2013, 0x0000, 0x7087, 0x0000, 0x20e1, 0x9080, 0x60a3, 0x0056, + 0x60a7, 0x9575, 0x080c, 0x7d71, 0x0c30, 0x0005, 0x708c, 0xa08a, + 0x001d, 0x1210, 0x0023, 0x0010, 0x080c, 0x1515, 0x0005, 0x4639, + 0x4648, 0x4670, 0x4689, 0x46ad, 0x46d5, 0x46f9, 0x472a, 0x474e, + 0x4776, 0x47ad, 0x47d5, 0x47f1, 0x4807, 0x4827, 0x483a, 0x4842, + 0x4872, 0x4896, 0x48be, 0x48e2, 0x4913, 0x4950, 0x497f, 0x499b, + 0x49da, 0x49fa, 0x4a13, 0x4a14, 0x00c6, 0x2061, 0xb500, 0x6003, + 0x0007, 0x2061, 0x0100, 0x6004, 0xa084, 0xfff9, 0x6006, 0x00ce, + 0x0005, 0x608b, 0xbc94, 0x608f, 0xf0f0, 0x6043, 0x0002, 0x708f, + 0x0001, 0x2009, 0x07d0, 0x2011, 0x4adc, 0x080c, 0x6a22, 0x0005, + 0x00f6, 0x7084, 0xa086, 0x0014, 0x1508, 0x6043, 0x0000, 0x6020, + 0xd0b4, 0x11e0, 0x2079, 0xbb80, 0x7a30, 0xa296, 0x1102, 0x11a0, + 0x7834, 0xa005, 0x1188, 0x7a38, 0xd2fc, 0x0128, 0x70b8, 0xa005, + 0x1110, 0x70bb, 0x0001, 0x2011, 0x4adc, 0x080c, 0x699c, 0x708f, + 0x0010, 0x080c, 0x4842, 0x0010, 0x080c, 0x4b1f, 0x00fe, 0x0005, + 0x708f, 0x0003, 0x6043, 0x0004, 0x2011, 0x4adc, 0x080c, 0x699c, + 0x080c, 0x4b97, 0x20a3, 0x1102, 0x20a3, 0x0000, 0x20a9, 0x000a, + 0x20a3, 0x0000, 0x1f04, 0x4680, 0x60c3, 0x0014, 0x080c, 0x4b06, + 0x0005, 0x00f6, 0x7084, 0xa005, 0x01f0, 0x2011, 0x4adc, 0x080c, + 0x699c, 0xa086, 0x0014, 0x11a8, 0x2079, 0xbb80, 0x7a30, 0xa296, + 0x1102, 0x1178, 0x7834, 0xa005, 0x1160, 0x7a38, 0xd2fc, 0x0128, + 0x70b8, 0xa005, 0x1110, 0x70bb, 0x0001, 0x708f, 0x0004, 0x0029, + 0x0010, 0x080c, 0x4b1f, 0x00fe, 0x0005, 0x708f, 0x0005, 0x080c, + 0x4b97, 0x20a3, 0x1103, 0x20a3, 0x0000, 0x3430, 0x2011, 0xbb8e, + 0x080c, 0x4be8, 0x1160, 0x7078, 0xa005, 0x1148, 0x7150, 0xa186, + 0xffff, 0x0128, 0x080c, 0x4aa0, 0x0110, 0x080c, 0x4bc6, 0x20a9, + 0x0008, 0x2298, 0x26a0, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x60c3, 0x0014, 0x080c, 0x4b06, 0x0005, 0x00f6, 0x7084, 0xa005, + 0x01f0, 0x2011, 0x4adc, 0x080c, 0x699c, 0xa086, 0x0014, 0x11a8, + 0x2079, 0xbb80, 0x7a30, 0xa296, 0x1103, 0x1178, 0x7834, 0xa005, + 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70b8, 0xa005, 0x1110, 0x70bb, + 0x0001, 0x708f, 0x0006, 0x0029, 0x0010, 0x080c, 0x4b1f, 0x00fe, + 0x0005, 0x708f, 0x0007, 0x080c, 0x4b97, 0x20a3, 0x1104, 0x20a3, + 0x0000, 0x3430, 0x2011, 0xbb8e, 0x080c, 0x4be8, 0x11a8, 0x7078, + 0xa005, 0x1190, 0x7158, 0xa186, 0xffff, 0x0170, 0xa180, 0x2dc4, + 0x200d, 0xa18c, 0xff00, 0x810f, 0x080c, 0x4aa0, 0x0128, 0x080c, + 0x40d6, 0x0110, 0x080c, 0x2867, 0x20a9, 0x0008, 0x2298, 0x26a0, + 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0014, 0x080c, + 0x4b06, 0x0005, 0x00f6, 0x7084, 0xa005, 0x01f0, 0x2011, 0x4adc, + 0x080c, 0x699c, 0xa086, 0x0014, 0x11a8, 0x2079, 0xbb80, 0x7a30, + 0xa296, 0x1104, 0x1178, 0x7834, 0xa005, 0x1160, 0x7a38, 0xd2fc, + 0x0128, 0x70b8, 0xa005, 0x1110, 0x70bb, 0x0001, 0x708f, 0x0008, + 0x0029, 0x0010, 0x080c, 0x4b1f, 0x00fe, 0x0005, 0x708f, 0x0009, + 0x080c, 0x4b97, 0x20a3, 0x1105, 0x20a3, 0x0100, 0x3430, 0x080c, + 0x4be8, 0x1150, 0x7078, 0xa005, 0x1138, 0x080c, 0x4a15, 0x1170, + 0xa085, 0x0001, 0x080c, 0x2867, 0x20a9, 0x0008, 0x2099, 0xbb8e, + 0x26a0, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0014, + 0x080c, 0x4b06, 0x0010, 0x080c, 0x462c, 0x0005, 0x00f6, 0x7084, + 0xa005, 0x0588, 0x2011, 0x4adc, 0x080c, 0x699c, 0xa086, 0x0014, + 0x1540, 0x2079, 0xbb80, 0x7a30, 0xa296, 0x1105, 0x1510, 0x7834, + 0x2011, 0x0100, 0xa21e, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70b8, + 0xa005, 0x1110, 0x70bb, 0x0001, 0x708f, 0x000a, 0x00b1, 0x0098, + 0xa005, 0x1178, 0x7a38, 0xd2fc, 0x0128, 0x70b8, 0xa005, 0x1110, + 0x70bb, 0x0001, 0x708b, 0x0000, 0x708f, 0x000e, 0x080c, 0x4827, + 0x0010, 0x080c, 0x4b1f, 0x00fe, 0x0005, 0x708f, 0x000b, 0x2011, + 0xbb0e, 0x22a0, 0x20a9, 0x0040, 0x2019, 0xffff, 0x43a4, 0x20a9, + 0x0002, 0x2009, 0x0000, 0x41a4, 0x080c, 0x4b97, 0x20a3, 0x1106, + 0x20a3, 0x0000, 0x080c, 0x4be8, 0x0118, 0x2013, 0x0000, 0x0020, + 0x7054, 0xa085, 0x0100, 0x2012, 0x2298, 0x20a9, 0x0042, 0x53a6, + 0x60c3, 0x0084, 0x080c, 0x4b06, 0x0005, 0x00f6, 0x7084, 0xa005, + 0x01b0, 0x2011, 0x4adc, 0x080c, 0x699c, 0xa086, 0x0084, 0x1168, + 0x2079, 0xbb80, 0x7a30, 0xa296, 0x1106, 0x1138, 0x7834, 0xa005, + 0x1120, 0x708f, 0x000c, 0x0029, 0x0010, 0x080c, 0x4b1f, 0x00fe, + 0x0005, 0x708f, 0x000d, 0x080c, 0x4b97, 0x20a3, 0x1107, 0x20a3, + 0x0000, 0x2099, 0xbb8e, 0x20a9, 0x0040, 0x53a6, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x60c3, 0x0084, 0x080c, 0x4b06, 0x0005, 0x00f6, + 0x7084, 0xa005, 0x01d0, 0x2011, 0x4adc, 0x080c, 0x699c, 0xa086, + 0x0084, 0x1188, 0x2079, 0xbb80, 0x7a30, 0xa296, 0x1107, 0x1158, + 0x7834, 0xa005, 0x1140, 0x708b, 0x0001, 0x080c, 0x4b89, 0x708f, + 0x000e, 0x0029, 0x0010, 0x080c, 0x4b1f, 0x00fe, 0x0005, 0x708f, + 0x000f, 0x7087, 0x0000, 0x608b, 0xbc85, 0x608f, 0xb5b5, 0x6043, + 0x0005, 0x6043, 0x0004, 0x2009, 0x07d0, 0x2011, 0x4adc, 0x080c, + 0x6990, 0x0005, 0x7084, 0xa005, 0x0120, 0x2011, 0x4adc, 0x080c, + 0x699c, 0x0005, 0x708f, 0x0011, 0x080c, 0x4be8, 0x11a0, 0x7170, + 0x81ff, 0x0188, 0x2009, 0x0000, 0x7074, 0xa084, 0x00ff, 0x080c, + 0x281d, 0xa186, 0x007e, 0x0138, 0xa186, 0x0080, 0x0120, 0x2011, + 0xbb8e, 0x080c, 0x4aa0, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x2099, + 0xbb80, 0x20a1, 0x020b, 0x7484, 0xa480, 0x0018, 0xa080, 0x0007, + 0xa084, 0x03f8, 0x8004, 0x20a8, 0x53a6, 0x60c3, 0x0014, 0x080c, + 0x4b06, 0x0005, 0x00f6, 0x7084, 0xa005, 0x01f0, 0x2011, 0x4adc, + 0x080c, 0x699c, 0xa086, 0x0014, 0x11a8, 0x2079, 0xbb80, 0x7a30, + 0xa296, 0x1103, 0x1178, 0x7834, 0xa005, 0x1160, 0x7a38, 0xd2fc, + 0x0128, 0x70b8, 0xa005, 0x1110, 0x70bb, 0x0001, 0x708f, 0x0012, + 0x0029, 0x0010, 0x080c, 0x4b1f, 0x00fe, 0x0005, 0x708f, 0x0013, + 0x080c, 0x4ba3, 0x20a3, 0x1103, 0x20a3, 0x0000, 0x3430, 0x2011, + 0xbb8e, 0x080c, 0x4be8, 0x1160, 0x7078, 0xa005, 0x1148, 0x7150, + 0xa186, 0xffff, 0x0128, 0x080c, 0x4aa0, 0x0110, 0x080c, 0x4bc6, + 0x20a9, 0x0008, 0x2298, 0x26a0, 0x53a6, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x60c3, 0x0014, 0x080c, 0x4b06, 0x0005, 0x00f6, 0x7084, + 0xa005, 0x01f0, 0x2011, 0x4adc, 0x080c, 0x699c, 0xa086, 0x0014, + 0x11a8, 0x2079, 0xbb80, 0x7a30, 0xa296, 0x1104, 0x1178, 0x7834, + 0xa005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70b8, 0xa005, 0x1110, + 0x70bb, 0x0001, 0x708f, 0x0014, 0x0029, 0x0010, 0x080c, 0x4b1f, + 0x00fe, 0x0005, 0x708f, 0x0015, 0x080c, 0x4ba3, 0x20a3, 0x1104, + 0x20a3, 0x0000, 0x3430, 0x2011, 0xbb8e, 0x080c, 0x4be8, 0x11a8, + 0x7078, 0xa005, 0x1190, 0x7158, 0xa186, 0xffff, 0x0170, 0xa180, + 0x2dc4, 0x200d, 0xa18c, 0xff00, 0x810f, 0x080c, 0x4aa0, 0x0128, + 0x080c, 0x40d6, 0x0110, 0x080c, 0x2867, 0x20a9, 0x0008, 0x2298, + 0x26a0, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0014, + 0x080c, 0x4b06, 0x0005, 0x00f6, 0x7084, 0xa005, 0x05b8, 0x2011, + 0x4adc, 0x080c, 0x699c, 0xa086, 0x0014, 0x1570, 0x2079, 0xbb80, + 0x7a30, 0xa296, 0x1105, 0x1540, 0x7834, 0x2011, 0x0100, 0xa21e, + 0x1148, 0x7a38, 0xd2fc, 0x0128, 0x70b8, 0xa005, 0x1110, 0x70bb, + 0x0001, 0x0060, 0xa005, 0x11c0, 0x7a38, 0xd2fc, 0x0128, 0x70b8, + 0xa005, 0x1110, 0x70bb, 0x0001, 0x708b, 0x0000, 0x7a38, 0xd2f4, + 0x0138, 0x2001, 0xb574, 0x2004, 0xd0a4, 0x1110, 0x70d7, 0x0008, + 0x708f, 0x0016, 0x0029, 0x0010, 0x080c, 0x4b1f, 0x00fe, 0x0005, + 0x20e1, 0x9080, 0x20e1, 0x4000, 0x2099, 0xbb80, 0x20a1, 0x020b, + 0x20a9, 0x000e, 0x53a6, 0x3430, 0x2011, 0xbb8e, 0x708f, 0x0017, + 0x080c, 0x4be8, 0x1150, 0x7078, 0xa005, 0x1138, 0x080c, 0x4a15, + 0x1170, 0xa085, 0x0001, 0x080c, 0x2867, 0x20a9, 0x0008, 0x2099, + 0xbb8e, 0x26a0, 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, + 0x0014, 0x080c, 0x4b06, 0x0010, 0x080c, 0x462c, 0x0005, 0x00f6, + 0x7084, 0xa005, 0x01b0, 0x2011, 0x4adc, 0x080c, 0x699c, 0xa086, + 0x0084, 0x1168, 0x2079, 0xbb80, 0x7a30, 0xa296, 0x1106, 0x1138, + 0x7834, 0xa005, 0x1120, 0x708f, 0x0018, 0x0029, 0x0010, 0x080c, + 0x4b1f, 0x00fe, 0x0005, 0x708f, 0x0019, 0x080c, 0x4ba3, 0x20a3, + 0x1106, 0x20a3, 0x0000, 0x3430, 0x2099, 0xbb8e, 0x2039, 0xbb0e, + 0x27a0, 0x20a9, 0x0040, 0x53a3, 0x080c, 0x4be8, 0x11e8, 0x2728, + 0x2514, 0x8207, 0xa084, 0x00ff, 0x8000, 0x2018, 0xa294, 0x00ff, + 0x8007, 0xa205, 0x202a, 0x7054, 0x2310, 0x8214, 0xa2a0, 0xbb0e, + 0x2414, 0xa38c, 0x0001, 0x0118, 0xa294, 0xff00, 0x0018, 0xa294, + 0x00ff, 0x8007, 0xa215, 0x2222, 0x2798, 0x26a0, 0x20a9, 0x0040, + 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0084, 0x080c, + 0x4b06, 0x0005, 0x00f6, 0x7084, 0xa005, 0x01d0, 0x2011, 0x4adc, + 0x080c, 0x699c, 0xa086, 0x0084, 0x1188, 0x2079, 0xbb80, 0x7a30, + 0xa296, 0x1107, 0x1158, 0x7834, 0xa005, 0x1140, 0x708b, 0x0001, + 0x080c, 0x4b89, 0x708f, 0x001a, 0x0029, 0x0010, 0x080c, 0x4b1f, + 0x00fe, 0x0005, 0x708f, 0x001b, 0x20e1, 0x9080, 0x20e1, 0x4000, + 0x2099, 0xbb80, 0x20a1, 0x020b, 0x7484, 0xa480, 0x0018, 0xa080, + 0x0007, 0xa084, 0x03f8, 0x8004, 0x20a8, 0x53a6, 0x60c3, 0x0084, + 0x080c, 0x4b06, 0x0005, 0x0005, 0x0005, 0x0086, 0x0096, 0x2029, + 0xb553, 0x252c, 0x20a9, 0x0008, 0x2041, 0xbb0e, 0x28a0, 0x2099, + 0xbb8e, 0x53a3, 0x20a9, 0x0008, 0x2011, 0x0007, 0xd5d4, 0x0110, + 0x2011, 0x0000, 0x2800, 0xa200, 0x200c, 0xa1a6, 0xffff, 0x1148, + 0xd5d4, 0x0110, 0x8210, 0x0008, 0x8211, 0x1f04, 0x4a2a, 0x0804, + 0x4a98, 0x82ff, 0x1160, 0xd5d4, 0x0120, 0xa1a6, 0x3fff, 0x0d90, + 0x0020, 0xa1a6, 0x3fff, 0x0904, 0x4a98, 0xa18d, 0xc000, 0x20a9, + 0x0010, 0x2019, 0x0001, 0xd5d4, 0x0110, 0x2019, 0x0010, 0x2120, + 0xd5d4, 0x0110, 0x8423, 0x0008, 0x8424, 0x1240, 0xd5d4, 0x0110, + 0x8319, 0x0008, 0x8318, 0x1f04, 0x4a50, 0x04d0, 0x23a8, 0x2021, + 0x0001, 0x8426, 0x8425, 0x1f04, 0x4a62, 0x2328, 0x8529, 0xa2be, + 0x0007, 0x0158, 0x0006, 0x2039, 0x0007, 0x2200, 0xa73a, 0x000e, + 0x27a8, 0xa5a8, 0x0010, 0x1f04, 0x4a71, 0x7552, 0xa5c8, 0x2dc4, + 0x292d, 0xa5ac, 0x00ff, 0x7576, 0x6532, 0x6536, 0x0016, 0x2508, + 0x080c, 0x2847, 0x001e, 0x60e7, 0x0000, 0x65ea, 0x2018, 0x2304, + 0xa405, 0x201a, 0x707b, 0x0001, 0x26a0, 0x2898, 0x20a9, 0x0008, + 0x53a6, 0x20a3, 0x0000, 0x20a3, 0x0000, 0xa085, 0x0001, 0x0028, + 0xa006, 0x0018, 0xa006, 0x080c, 0x1515, 0x009e, 0x008e, 0x0005, + 0x2118, 0x2021, 0x0000, 0x2001, 0x0007, 0xa39a, 0x0010, 0x0218, + 0x8420, 0x8001, 0x0cd0, 0x2118, 0x84ff, 0x0120, 0xa39a, 0x0010, + 0x8421, 0x1de0, 0x2021, 0x0001, 0x83ff, 0x0118, 0x8423, 0x8319, + 0x1de8, 0xa238, 0x2704, 0xa42c, 0x11b8, 0xa405, 0x203a, 0x7152, + 0xa1a0, 0x2dc4, 0x242d, 0xa5ac, 0x00ff, 0x7576, 0x6532, 0x6536, + 0x0016, 0x2508, 0x080c, 0x2847, 0x001e, 0x60e7, 0x0000, 0x65ea, + 0x707b, 0x0001, 0xa084, 0x0000, 0x0005, 0x00e6, 0x2071, 0xb500, + 0x707f, 0x0000, 0x00ee, 0x0005, 0x00e6, 0x00f6, 0x2079, 0x0100, + 0x2071, 0x0140, 0x080c, 0x7d7a, 0x7004, 0xa084, 0x4000, 0x0120, + 0x7003, 0x1000, 0x7003, 0x0000, 0x0126, 0x2091, 0x8000, 0x2071, + 0xb523, 0x2073, 0x0000, 0x7840, 0x0026, 0x0016, 0x2009, 0x00f7, + 0x080c, 0x4baf, 0x001e, 0xa094, 0x0010, 0xa285, 0x0080, 0x7842, + 0x7a42, 0x002e, 0x012e, 0x00fe, 0x00ee, 0x0005, 0x0126, 0x2091, + 0x8000, 0x2011, 0xb7ea, 0x2013, 0x0000, 0x7087, 0x0000, 0x012e, + 0x20e1, 0x9080, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0x7d71, + 0x2009, 0x07d0, 0x2011, 0x4adc, 0x080c, 0x6a22, 0x0005, 0x0016, + 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x2011, 0x0003, 0x080c, + 0x8075, 0x2011, 0x0002, 0x080c, 0x807f, 0x080c, 0x7f59, 0x0036, + 0x2019, 0x0000, 0x080c, 0x7fe4, 0x003e, 0x2009, 0x00f7, 0x080c, + 0x4baf, 0x2061, 0xb7f3, 0x601b, 0x0000, 0x601f, 0x0000, 0x2061, + 0xb500, 0x6003, 0x0001, 0x2061, 0x0100, 0x6043, 0x0090, 0x6043, + 0x0010, 0x2009, 0x002d, 0x2011, 0x4b54, 0x080c, 0x6990, 0x012e, + 0x00ce, 0x002e, 0x001e, 0x0005, 0x00e6, 0x0006, 0x0126, 0x2091, + 0x8000, 0x2071, 0x0100, 0x080c, 0x7d7a, 0x2071, 0x0140, 0x7004, + 0xa084, 0x4000, 0x0120, 0x7003, 0x1000, 0x7003, 0x0000, 0x080c, + 0x5ad7, 0x01a8, 0x080c, 0x5af5, 0x1190, 0x2001, 0xb79e, 0x2003, + 0xaaaa, 0x0016, 0x080c, 0x28eb, 0x2001, 0xb78f, 0x2102, 0x001e, + 0x2001, 0xb79f, 0x2003, 0x0000, 0x080c, 0x5a07, 0x0030, 0x2001, + 0x0001, 0x080c, 0x27c3, 0x080c, 0x4b1f, 0x012e, 0x000e, 0x00ee, + 0x0005, 0x20a9, 0x0040, 0x20a1, 0xbcc0, 0x2099, 0xbb8e, 0x3304, + 0x8007, 0x20a2, 0x9398, 0x94a0, 0x1f04, 0x4b8f, 0x0005, 0x20e1, + 0x9080, 0x20e1, 0x4000, 0x2099, 0xbb00, 0x20a1, 0x020b, 0x20a9, + 0x000c, 0x53a6, 0x0005, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x2099, + 0xbb80, 0x20a1, 0x020b, 0x20a9, 0x000c, 0x53a6, 0x0005, 0x00c6, + 0x0006, 0x2061, 0x0100, 0x810f, 0x2001, 0xb531, 0x2004, 0xa005, + 0x1138, 0x2001, 0xb515, 0x2004, 0xa084, 0x00ff, 0xa105, 0x0010, + 0xa185, 0x00f7, 0x604a, 0x000e, 0x00ce, 0x0005, 0x0016, 0x0046, + 0x2001, 0xb553, 0x2004, 0xd0a4, 0x0158, 0xa006, 0x2020, 0x2009, + 0x002a, 0x080c, 0xb0e8, 0x2001, 0xb50c, 0x200c, 0xc195, 0x2102, + 0x2019, 0x002a, 0x2009, 0x0000, 0x080c, 0x2c6f, 0x004e, 0x001e, + 0x0005, 0x080c, 0x4b1f, 0x708f, 0x0000, 0x7087, 0x0000, 0x0005, + 0x0006, 0x2001, 0xb50c, 0x2004, 0xd09c, 0x0100, 0x000e, 0x0005, + 0x0006, 0x0016, 0x0126, 0x2091, 0x8000, 0x2001, 0x0101, 0x200c, + 0xa18d, 0x0006, 0x2102, 0x012e, 0x001e, 0x000e, 0x0005, 0x0156, + 0x20a9, 0x00ff, 0x2009, 0xb635, 0xa006, 0x200a, 0x8108, 0x1f04, + 0x4c05, 0x015e, 0x0005, 0x00d6, 0x0036, 0x0156, 0x0136, 0x0146, + 0x2069, 0xb552, 0xa006, 0x6002, 0x6007, 0x0707, 0x600a, 0x600e, + 0x6012, 0xa198, 0x2dc4, 0x231d, 0xa39c, 0x00ff, 0x6316, 0x20a9, + 0x0004, 0xac98, 0x0006, 0x23a0, 0x40a4, 0x20a9, 0x0004, 0xac98, + 0x000a, 0x23a0, 0x40a4, 0x603e, 0x6042, 0x604e, 0x6052, 0x6056, + 0x605a, 0x605e, 0x6062, 0x6066, 0x606a, 0x606e, 0x6072, 0x6076, + 0x607a, 0x607e, 0x6082, 0x6086, 0x608a, 0x608e, 0x6092, 0x6096, + 0x609a, 0x609e, 0x60ae, 0x61a2, 0x00d6, 0x60a4, 0xa06d, 0x0110, + 0x080c, 0x160f, 0x60a7, 0x0000, 0x60a8, 0xa06d, 0x0110, 0x080c, + 0x160f, 0x60ab, 0x0000, 0x00de, 0xa006, 0x604a, 0x6810, 0x603a, + 0x680c, 0x6046, 0x6814, 0xa084, 0x00ff, 0x6042, 0x014e, 0x013e, + 0x015e, 0x003e, 0x00de, 0x0005, 0x0126, 0x2091, 0x8000, 0x6944, + 0x6e48, 0xa684, 0x3fff, 0xa082, 0x4000, 0x1a04, 0x4d1a, 0xa18c, + 0xff00, 0x810f, 0xa182, 0x00ff, 0x1a04, 0x4d1f, 0x2001, 0xb50c, + 0x2004, 0xa084, 0x0003, 0x01c0, 0x2001, 0xb50c, 0x2004, 0xd084, + 0x1904, 0x4d02, 0xa188, 0xb635, 0x2104, 0xa065, 0x0904, 0x4d02, + 0x6004, 0xa084, 0x00ff, 0xa08e, 0x0006, 0x1904, 0x4d02, 0x6000, + 0xd0c4, 0x0904, 0x4d02, 0x0068, 0xa188, 0xb635, 0x2104, 0xa065, + 0x0904, 0x4ce6, 0x6004, 0xa084, 0x00ff, 0xa08e, 0x0006, 0x1904, + 0x4ceb, 0x60a4, 0xa00d, 0x0118, 0x080c, 0x51d4, 0x05d0, 0x60a8, + 0xa00d, 0x0188, 0x080c, 0x521f, 0x1170, 0x694c, 0xd1fc, 0x1118, + 0x080c, 0x4ede, 0x0448, 0x080c, 0x4e8d, 0x694c, 0xd1ec, 0x1520, + 0x080c, 0x50c6, 0x0408, 0x694c, 0xa184, 0xa000, 0x0178, 0xd1ec, + 0x0140, 0xd1fc, 0x0118, 0x080c, 0x50d5, 0x0028, 0x080c, 0x50d5, + 0x0028, 0xd1fc, 0x0118, 0x080c, 0x4e8d, 0x0070, 0x6050, 0xa00d, + 0x0130, 0x2d00, 0x200a, 0x6803, 0x0000, 0x6052, 0x0028, 0x2d00, + 0x6052, 0x604e, 0x6803, 0x0000, 0x080c, 0x6caa, 0xa006, 0x012e, + 0x0005, 0x2001, 0x0005, 0x2009, 0x0000, 0x04e8, 0x2001, 0x0028, + 0x2009, 0x0000, 0x04c0, 0xa082, 0x0006, 0x12a0, 0x2001, 0xb535, + 0x2004, 0xd0ac, 0x1160, 0x60a0, 0xd0bc, 0x1148, 0x6100, 0xd1fc, + 0x0904, 0x4ca1, 0x2001, 0x0029, 0x2009, 0x1000, 0x0420, 0x2001, + 0x0028, 0x00a8, 0x2009, 0xb50c, 0x210c, 0xd18c, 0x0118, 0x2001, + 0x0004, 0x0068, 0xd184, 0x0118, 0x2001, 0x0004, 0x0040, 0x2001, + 0x0029, 0x6100, 0xd1fc, 0x0118, 0x2009, 0x1000, 0x0060, 0x2009, + 0x0000, 0x0048, 0x2001, 0x0029, 0x2009, 0x0000, 0x0020, 0x2001, + 0x0029, 0x2009, 0x0000, 0xa005, 0x012e, 0x0005, 0x00e6, 0x0126, + 0x2091, 0x8000, 0x6844, 0x8007, 0xa084, 0x00ff, 0x2008, 0xa182, + 0x00ff, 0x1a04, 0x4d79, 0xa188, 0xb635, 0x2104, 0xa065, 0x01c0, + 0x6004, 0xa084, 0x00ff, 0xa08e, 0x0006, 0x11a8, 0x2c70, 0x080c, + 0x85c7, 0x05e8, 0x2e00, 0x601a, 0x2d00, 0x6012, 0x600b, 0xffff, + 0x601f, 0x000a, 0x2009, 0x0003, 0x080c, 0x864c, 0xa006, 0x0460, + 0x2001, 0x0028, 0x0440, 0xa082, 0x0006, 0x1298, 0x2001, 0xb535, + 0x2004, 0xd0ac, 0x1158, 0x60a0, 0xd0bc, 0x1140, 0x6100, 0xd1fc, + 0x09e8, 0x2001, 0x0029, 0x2009, 0x1000, 0x00a8, 0x2001, 0x0028, + 0x0090, 0x2009, 0xb50c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, + 0x0050, 0xd184, 0x0118, 0x2001, 0x0004, 0x0028, 0x2001, 0x0029, + 0x0010, 0x2001, 0x0029, 0xa005, 0x012e, 0x00ee, 0x0005, 0x2001, + 0x002c, 0x0cc8, 0x00f6, 0x00e6, 0x0126, 0x2091, 0x8000, 0x2011, + 0x0000, 0x2079, 0xb500, 0x6944, 0xa18c, 0xff00, 0x810f, 0xa182, + 0x00ff, 0x1a04, 0x4e44, 0x080c, 0x4fa9, 0x11a0, 0x6004, 0xa084, + 0x00ff, 0xa082, 0x0006, 0x1270, 0x6864, 0xa0c6, 0x006f, 0x0150, + 0x2001, 0xb535, 0x2004, 0xd0ac, 0x1904, 0x4e2d, 0x60a0, 0xd0bc, + 0x1904, 0x4e2d, 0x6864, 0xa0c6, 0x006f, 0x0118, 0x2008, 0x0804, + 0x4df6, 0x6968, 0x2140, 0xa18c, 0xff00, 0x810f, 0x78d4, 0xd0ac, + 0x1118, 0xa182, 0x0080, 0x06d0, 0xa182, 0x00ff, 0x16b8, 0x6a70, + 0x6b6c, 0x7870, 0xa306, 0x1160, 0x7874, 0xa24e, 0x1118, 0x2208, + 0x2310, 0x0460, 0xa9cc, 0xff00, 0x1118, 0x2208, 0x2310, 0x0430, + 0x080c, 0x3dc5, 0x2c70, 0x0550, 0x2009, 0x0000, 0x2011, 0x0000, + 0xa0c6, 0x4000, 0x1160, 0x0006, 0x2e60, 0x080c, 0x524a, 0x1108, + 0xc185, 0x7000, 0xd0bc, 0x0108, 0xc18d, 0x000e, 0x0088, 0xa0c6, + 0x4007, 0x1110, 0x2408, 0x0060, 0xa0c6, 0x4008, 0x1118, 0x2708, + 0x2610, 0x0030, 0xa0c6, 0x4009, 0x1108, 0x0010, 0x2001, 0x4006, + 0x6866, 0x696a, 0x6a6e, 0x2001, 0x0030, 0x0450, 0x080c, 0x85c7, + 0x1138, 0x2001, 0x4005, 0x2009, 0x0003, 0x2011, 0x0000, 0x0c80, + 0x2e00, 0x601a, 0x080c, 0xa027, 0x2d00, 0x6012, 0x601f, 0x0001, + 0x6838, 0xd88c, 0x0108, 0xc0f5, 0x683a, 0x0126, 0x2091, 0x8000, + 0x080c, 0x2c9c, 0x012e, 0x2001, 0x0000, 0x080c, 0x4eeb, 0x2001, + 0x0002, 0x080c, 0x4efd, 0x2009, 0x0002, 0x080c, 0x864c, 0xa006, + 0xa005, 0x012e, 0x00ee, 0x00fe, 0x0005, 0x2001, 0x0028, 0x2009, + 0x0000, 0x0cb0, 0x2009, 0xb50c, 0x210c, 0xd18c, 0x0118, 0x2001, + 0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004, 0x0010, 0x2001, + 0x0029, 0x2009, 0x0000, 0x0c20, 0x2001, 0x0029, 0x2009, 0x0000, + 0x08f8, 0x6944, 0x6e48, 0xa684, 0x3fff, 0xa082, 0x4000, 0x16b8, + 0xa18c, 0xff00, 0x810f, 0xa182, 0x00ff, 0x12e0, 0xa188, 0xb635, + 0x2104, 0xa065, 0x01b8, 0x6004, 0xa084, 0x00ff, 0xa08e, 0x0006, + 0x11b0, 0x684c, 0xd0ec, 0x0120, 0x080c, 0x50d5, 0x0431, 0x0030, + 0x0421, 0x684c, 0xd0fc, 0x0110, 0x080c, 0x50c6, 0x080c, 0x5113, + 0xa006, 0x00c8, 0x2001, 0x0028, 0x2009, 0x0000, 0x00a0, 0xa082, + 0x0006, 0x1240, 0x6100, 0xd1fc, 0x0d20, 0x2001, 0x0029, 0x2009, + 0x1000, 0x0048, 0x2001, 0x0029, 0x2009, 0x0000, 0x0020, 0x2001, + 0x0029, 0x2009, 0x0000, 0xa005, 0x0005, 0x0126, 0x2091, 0x8000, + 0x6050, 0xa00d, 0x0138, 0x2d00, 0x200a, 0x6803, 0x0000, 0x6052, + 0x012e, 0x0005, 0x2d00, 0x6052, 0x604e, 0x6803, 0x0000, 0x0cc0, + 0x0126, 0x2091, 0x8000, 0x604c, 0xa005, 0x0170, 0x00e6, 0x2071, + 0xb7e0, 0x7004, 0xa086, 0x0002, 0x0168, 0x00ee, 0x604c, 0x6802, + 0x2d00, 0x604e, 0x012e, 0x0005, 0x2d00, 0x6052, 0x604e, 0x6803, + 0x0000, 0x0cc0, 0x701c, 0xac06, 0x1d80, 0x604c, 0x2070, 0x7000, + 0x6802, 0x2d00, 0x7002, 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, + 0x8000, 0x604c, 0xa06d, 0x0130, 0x6800, 0xa005, 0x1108, 0x6052, + 0x604e, 0xad05, 0x012e, 0x0005, 0x604c, 0xa06d, 0x0130, 0x6800, + 0xa005, 0x1108, 0x6052, 0x604e, 0xad05, 0x0005, 0x6803, 0x0000, + 0x6084, 0xa00d, 0x0120, 0x2d00, 0x200a, 0x6086, 0x0005, 0x2d00, + 0x6086, 0x6082, 0x0cd8, 0x0126, 0x00c6, 0x0026, 0x2091, 0x8000, + 0x6218, 0x2260, 0x6200, 0xa005, 0x0110, 0xc285, 0x0008, 0xc284, + 0x6202, 0x002e, 0x00ce, 0x012e, 0x0005, 0x0126, 0x00c6, 0x2091, + 0x8000, 0x6218, 0x2260, 0x6204, 0x0006, 0xa086, 0x0006, 0x1180, + 0x609c, 0xd0ac, 0x0168, 0x2001, 0xb553, 0x2004, 0xd0a4, 0x0140, + 0xa284, 0xff00, 0x8007, 0xa086, 0x0007, 0x1110, 0x2011, 0x0600, + 0x000e, 0xa294, 0xff00, 0xa215, 0x6206, 0x0006, 0xa086, 0x0006, + 0x1128, 0x6290, 0x82ff, 0x1110, 0x080c, 0x1515, 0x000e, 0x00ce, + 0x012e, 0x0005, 0x0126, 0x00c6, 0x2091, 0x8000, 0x6218, 0x2260, + 0x6204, 0x0006, 0xa086, 0x0006, 0x1178, 0x609c, 0xd0a4, 0x0160, + 0x2001, 0xb553, 0x2004, 0xd0ac, 0x1138, 0xa284, 0x00ff, 0xa086, + 0x0007, 0x1110, 0x2011, 0x0006, 0x000e, 0xa294, 0x00ff, 0x8007, + 0xa215, 0x6206, 0x00ce, 0x012e, 0x0005, 0x0026, 0xa182, 0x00ff, + 0x0218, 0xa085, 0x0001, 0x00b0, 0xa190, 0xb635, 0x2204, 0xa065, + 0x1180, 0x0016, 0x00d6, 0x080c, 0x15df, 0x2d60, 0x00de, 0x001e, + 0x0d80, 0x2c00, 0x2012, 0x60a7, 0x0000, 0x60ab, 0x0000, 0x080c, + 0x4c0b, 0xa006, 0x002e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0026, + 0xa182, 0x00ff, 0x0218, 0xa085, 0x0001, 0x0480, 0x00d6, 0xa190, + 0xb635, 0x2204, 0xa06d, 0x0540, 0x2013, 0x0000, 0x00d6, 0x00c6, + 0x2d60, 0x60a4, 0xa06d, 0x0110, 0x080c, 0x160f, 0x60a8, 0xa06d, + 0x0110, 0x080c, 0x160f, 0x00ce, 0x00de, 0x00d6, 0x00c6, 0x68ac, + 0x2060, 0x8cff, 0x0168, 0x600c, 0x0006, 0x6010, 0x2068, 0x080c, + 0x9c5a, 0x0110, 0x080c, 0x161f, 0x080c, 0x861d, 0x00ce, 0x0c88, + 0x00ce, 0x00de, 0x080c, 0x160f, 0x00de, 0xa006, 0x002e, 0x012e, + 0x0005, 0x0016, 0xa182, 0x00ff, 0x0218, 0xa085, 0x0001, 0x0030, + 0xa188, 0xb635, 0x2104, 0xa065, 0x0dc0, 0xa006, 0x001e, 0x0005, + 0x00d6, 0x0156, 0x0136, 0x0146, 0x600b, 0x0000, 0x600f, 0x0000, + 0x6000, 0xc08c, 0x6002, 0x080c, 0x5acf, 0x1558, 0x60a0, 0xa086, + 0x007e, 0x2069, 0xbb90, 0x0130, 0x2001, 0xb535, 0x2004, 0xd0ac, + 0x1500, 0x0098, 0x2d04, 0xd0e4, 0x01e0, 0x00d6, 0x2069, 0xbb8e, + 0x00c6, 0x2061, 0xb7b2, 0x6810, 0x2062, 0x6814, 0x6006, 0x6818, + 0x600a, 0x681c, 0x600e, 0x00ce, 0x00de, 0x8d69, 0x2d04, 0x2069, + 0x0140, 0xa005, 0x1110, 0x2001, 0x0001, 0x6886, 0x2069, 0xb500, + 0x68a6, 0x2069, 0xbb8e, 0x6808, 0x605e, 0x6810, 0x6062, 0x6138, + 0xa10a, 0x0208, 0x603a, 0x6814, 0x6066, 0x2099, 0xbb96, 0xac88, + 0x000a, 0x21a0, 0x20a9, 0x0004, 0x53a3, 0x2099, 0xbb9a, 0xac88, + 0x0006, 0x21a0, 0x20a9, 0x0004, 0x53a3, 0x2069, 0xbbae, 0x6808, + 0x606a, 0x690c, 0x616e, 0x6810, 0x6072, 0x6818, 0x6076, 0x60a0, + 0xa086, 0x007e, 0x1120, 0x2069, 0xbb8e, 0x690c, 0x616e, 0xa182, + 0x0211, 0x1218, 0x2009, 0x0008, 0x0400, 0xa182, 0x0259, 0x1218, + 0x2009, 0x0007, 0x00d0, 0xa182, 0x02c1, 0x1218, 0x2009, 0x0006, + 0x00a0, 0xa182, 0x0349, 0x1218, 0x2009, 0x0005, 0x0070, 0xa182, + 0x0421, 0x1218, 0x2009, 0x0004, 0x0040, 0xa182, 0x0581, 0x1218, + 0x2009, 0x0003, 0x0010, 0x2009, 0x0002, 0x6192, 0x014e, 0x013e, + 0x015e, 0x00de, 0x0005, 0x0016, 0x0026, 0x00e6, 0x2071, 0xbb8d, + 0x2e04, 0x6896, 0x2071, 0xbb8e, 0x7004, 0x689a, 0x701c, 0x689e, + 0x6a00, 0x2009, 0xb572, 0x210c, 0xd0bc, 0x0120, 0xd1ec, 0x0110, + 0xc2ad, 0x0008, 0xc2ac, 0xd0c4, 0x0120, 0xd1e4, 0x0110, 0xc2bd, + 0x0008, 0xc2bc, 0x6a02, 0x00ee, 0x002e, 0x001e, 0x0005, 0x00d6, + 0x0126, 0x2091, 0x8000, 0x60a4, 0xa06d, 0x01c0, 0x6900, 0x81ff, + 0x1540, 0x6a04, 0xa282, 0x0010, 0x1648, 0xad88, 0x0004, 0x20a9, + 0x0010, 0x2104, 0xa086, 0xffff, 0x0128, 0x8108, 0x1f04, 0x5081, + 0x080c, 0x1515, 0x260a, 0x8210, 0x6a06, 0x0098, 0x080c, 0x15f8, + 0x01a8, 0x2d00, 0x60a6, 0x6803, 0x0000, 0xad88, 0x0004, 0x20a9, + 0x0010, 0x200b, 0xffff, 0x8108, 0x1f04, 0x5099, 0x6807, 0x0001, + 0x6e12, 0xa085, 0x0001, 0x012e, 0x00de, 0x0005, 0xa006, 0x0cd8, + 0x0126, 0x2091, 0x8000, 0x00d6, 0x60a4, 0xa00d, 0x01a0, 0x2168, + 0x6800, 0xa005, 0x1160, 0x080c, 0x51d4, 0x1168, 0x200b, 0xffff, + 0x6804, 0xa08a, 0x0002, 0x0218, 0x8001, 0x6806, 0x0020, 0x080c, + 0x160f, 0x60a7, 0x0000, 0x00de, 0x012e, 0x0005, 0x0126, 0x2091, + 0x8000, 0x080c, 0x5232, 0x0010, 0x080c, 0x4e8d, 0x080c, 0x514c, + 0x1dd8, 0x080c, 0x5113, 0x012e, 0x0005, 0x00d6, 0x0126, 0x2091, + 0x8000, 0x60a8, 0xa06d, 0x01c0, 0x6950, 0x81ff, 0x1540, 0x6a54, + 0xa282, 0x0010, 0x1670, 0xad88, 0x0018, 0x20a9, 0x0010, 0x2104, + 0xa086, 0xffff, 0x0128, 0x8108, 0x1f04, 0x50e7, 0x080c, 0x1515, + 0x260a, 0x8210, 0x6a56, 0x0098, 0x080c, 0x15f8, 0x01d0, 0x2d00, + 0x60aa, 0x6853, 0x0000, 0xad88, 0x0018, 0x20a9, 0x0010, 0x200b, + 0xffff, 0x8108, 0x1f04, 0x50ff, 0x6857, 0x0001, 0x6e62, 0x0010, + 0x080c, 0x4ede, 0x0089, 0x1de0, 0xa085, 0x0001, 0x012e, 0x00de, + 0x0005, 0xa006, 0x0cd8, 0x0126, 0x2091, 0x8000, 0x080c, 0x6caa, + 0x012e, 0x0005, 0xa01e, 0x0010, 0x2019, 0x0001, 0xa00e, 0x0126, + 0x2091, 0x8000, 0x604c, 0x2068, 0x6000, 0xd0dc, 0x1170, 0x8dff, + 0x01f8, 0x83ff, 0x0120, 0x6848, 0xa606, 0x0158, 0x0030, 0x683c, + 0xa406, 0x1118, 0x6840, 0xa506, 0x0120, 0x2d08, 0x6800, 0x2068, + 0x0c70, 0x080c, 0x811e, 0x6a00, 0x604c, 0xad06, 0x1110, 0x624e, + 0x0018, 0xa180, 0x0000, 0x2202, 0x82ff, 0x1110, 0x6152, 0x8dff, + 0x012e, 0x0005, 0xa01e, 0x0010, 0x2019, 0x0001, 0xa00e, 0x6080, + 0x2068, 0x8dff, 0x01e8, 0x83ff, 0x0120, 0x6848, 0xa606, 0x0158, + 0x0030, 0x683c, 0xa406, 0x1118, 0x6840, 0xa506, 0x0120, 0x2d08, + 0x6800, 0x2068, 0x0c70, 0x6a00, 0x6080, 0xad06, 0x1110, 0x6282, + 0x0018, 0xa180, 0x0000, 0x2202, 0x82ff, 0x1110, 0x6186, 0x8dff, + 0x0005, 0xa016, 0x080c, 0x51ce, 0x1110, 0x2011, 0x0001, 0x080c, + 0x5219, 0x1110, 0xa295, 0x0002, 0x0005, 0x080c, 0x524a, 0x0118, + 0x080c, 0x9d0f, 0x0010, 0xa085, 0x0001, 0x0005, 0x080c, 0x524a, + 0x0118, 0x080c, 0x9c9f, 0x0010, 0xa085, 0x0001, 0x0005, 0x080c, + 0x524a, 0x0118, 0x080c, 0x9cf2, 0x0010, 0xa085, 0x0001, 0x0005, + 0x080c, 0x524a, 0x0118, 0x080c, 0x9cbb, 0x0010, 0xa085, 0x0001, + 0x0005, 0x080c, 0x524a, 0x0118, 0x080c, 0x9d2b, 0x0010, 0xa085, + 0x0001, 0x0005, 0x0126, 0x0006, 0x00d6, 0x2091, 0x8000, 0x6080, + 0xa06d, 0x01a0, 0x6800, 0x0006, 0x6837, 0x0103, 0x6b4a, 0x6847, + 0x0000, 0x080c, 0x9ecc, 0x0006, 0x6000, 0xd0fc, 0x0110, 0x080c, + 0xb389, 0x000e, 0x080c, 0x5408, 0x000e, 0x0c50, 0x6083, 0x0000, + 0x6087, 0x0000, 0x00de, 0x000e, 0x012e, 0x0005, 0x60a4, 0xa00d, + 0x1118, 0xa085, 0x0001, 0x0005, 0x00e6, 0x2170, 0x7000, 0xa005, + 0x1168, 0x20a9, 0x0010, 0xae88, 0x0004, 0x2104, 0xa606, 0x0130, + 0x8108, 0x1f04, 0x51dd, 0xa085, 0x0001, 0x0008, 0xa006, 0x00ee, + 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, 0x60a4, 0xa06d, 0x1128, + 0x080c, 0x15f8, 0x01a0, 0x2d00, 0x60a6, 0x6803, 0x0001, 0x6807, + 0x0000, 0xad88, 0x0004, 0x20a9, 0x0010, 0x200b, 0xffff, 0x8108, + 0x1f04, 0x51fd, 0xa085, 0x0001, 0x012e, 0x00de, 0x0005, 0xa006, + 0x0cd8, 0x00d6, 0x0126, 0x2091, 0x8000, 0x60a4, 0xa06d, 0x0130, + 0x60a7, 0x0000, 0x080c, 0x160f, 0xa085, 0x0001, 0x012e, 0x00de, + 0x0005, 0x60a8, 0xa00d, 0x1118, 0xa085, 0x0001, 0x0005, 0x00e6, + 0x2170, 0x7050, 0xa005, 0x1160, 0x20a9, 0x0010, 0xae88, 0x0018, + 0x2104, 0xa606, 0x0128, 0x8108, 0x1f04, 0x5228, 0xa085, 0x0001, + 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x0c19, 0x1188, 0x200b, + 0xffff, 0x00d6, 0x60a8, 0x2068, 0x6854, 0xa08a, 0x0002, 0x0218, + 0x8001, 0x6856, 0x0020, 0x080c, 0x160f, 0x60ab, 0x0000, 0x00de, + 0x012e, 0x0005, 0x609c, 0xd0a4, 0x0005, 0x00f6, 0x080c, 0x5acf, + 0x01b0, 0x71b8, 0x81ff, 0x1198, 0x71d4, 0xd19c, 0x0180, 0x2001, + 0x007e, 0xa080, 0xb635, 0x2004, 0xa07d, 0x0148, 0x7804, 0xa084, + 0x00ff, 0xa086, 0x0006, 0x1118, 0x7800, 0xc0ed, 0x7802, 0x2079, + 0xb552, 0x7804, 0xd0a4, 0x01e8, 0x0156, 0x00c6, 0x20a9, 0x007f, + 0x2009, 0x0000, 0x0016, 0x080c, 0x4fa9, 0x1168, 0x6004, 0xa084, + 0xff00, 0x8007, 0xa096, 0x0004, 0x0118, 0xa086, 0x0006, 0x1118, + 0x6000, 0xc0ed, 0x6002, 0x001e, 0x8108, 0x1f04, 0x5272, 0x00ce, + 0x015e, 0x080c, 0x5309, 0x0120, 0x2001, 0xb7b5, 0x200c, 0x0038, + 0x2079, 0xb552, 0x7804, 0xd0a4, 0x0130, 0x2009, 0x07d0, 0x2011, + 0x529d, 0x080c, 0x6a22, 0x00fe, 0x0005, 0x2011, 0x529d, 0x080c, + 0x699c, 0x080c, 0x5309, 0x01f0, 0x2001, 0xb6b3, 0x2004, 0xa080, + 0x0000, 0x200c, 0xc1ec, 0x2102, 0x2001, 0xb553, 0x2004, 0xd0a4, + 0x0130, 0x2009, 0x07d0, 0x2011, 0x529d, 0x080c, 0x6a22, 0x00e6, + 0x2071, 0xb500, 0x7073, 0x0000, 0x7077, 0x0000, 0x080c, 0x2ab8, + 0x00ee, 0x04b0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x2009, 0x0000, + 0x0016, 0x080c, 0x4fa9, 0x1530, 0x6000, 0xd0ec, 0x0518, 0x0046, + 0x62a0, 0xa294, 0x00ff, 0x8227, 0xa006, 0x2009, 0x0029, 0x080c, + 0xb0e8, 0x6000, 0xc0e5, 0xc0ec, 0x6002, 0x6004, 0xa084, 0x00ff, + 0xa085, 0x0700, 0x6006, 0x2019, 0x0029, 0x080c, 0x6df5, 0x0076, + 0x2039, 0x0000, 0x080c, 0x6d02, 0x2009, 0x0000, 0x080c, 0xae82, + 0x007e, 0x004e, 0x001e, 0x8108, 0x1f04, 0x52c8, 0x00ce, 0x015e, + 0x0005, 0x00c6, 0x6018, 0x2060, 0x6000, 0xc0ec, 0x6002, 0x00ce, + 0x0005, 0x7818, 0x2004, 0xd0ac, 0x0005, 0x7818, 0x2004, 0xd0bc, + 0x0005, 0x00f6, 0x2001, 0xb6b3, 0x2004, 0xa07d, 0x0110, 0x7800, + 0xd0ec, 0x00fe, 0x0005, 0x0126, 0x0026, 0x2091, 0x8000, 0x0006, + 0x62a0, 0xa290, 0xb635, 0x2204, 0xac06, 0x190c, 0x1515, 0x000e, + 0x6200, 0xa005, 0x0110, 0xc2fd, 0x0008, 0xc2fc, 0x6202, 0x002e, + 0x012e, 0x0005, 0x2011, 0xb535, 0x2204, 0xd0cc, 0x0138, 0x2001, + 0xb7b3, 0x200c, 0x2011, 0x5337, 0x080c, 0x6a22, 0x0005, 0x2011, + 0x5337, 0x080c, 0x699c, 0x2011, 0xb535, 0x2204, 0xc0cc, 0x2012, + 0x0005, 0x2071, 0xb614, 0x7003, 0x0001, 0x7007, 0x0000, 0x7013, + 0x0000, 0x7017, 0x0000, 0x701b, 0x0000, 0x701f, 0x0000, 0x700b, + 0x0000, 0x704b, 0x0001, 0x704f, 0x0000, 0x705b, 0x0020, 0x705f, + 0x0040, 0x707f, 0x0000, 0x2071, 0xb77d, 0x7003, 0xb614, 0x7007, + 0x0000, 0x700b, 0x0000, 0x700f, 0xb75d, 0x7013, 0x0020, 0x7017, + 0x0040, 0x7037, 0x0000, 0x0005, 0x0016, 0x00e6, 0x2071, 0xb735, + 0xa00e, 0x7186, 0x718a, 0x7097, 0x0001, 0x2001, 0xb553, 0x2004, + 0xd0fc, 0x1150, 0x2001, 0xb553, 0x2004, 0xa00e, 0xd09c, 0x0108, + 0x8108, 0x7102, 0x0804, 0x53d2, 0x2001, 0xb572, 0x200c, 0xa184, + 0x000f, 0x2009, 0xb573, 0x210c, 0x0002, 0x537a, 0x53ad, 0x53b4, + 0x53be, 0x53c3, 0x537a, 0x537a, 0x537a, 0x539d, 0x537a, 0x537a, + 0x537a, 0x537a, 0x537a, 0x537a, 0x537a, 0x7003, 0x0004, 0x0136, + 0x0146, 0x0156, 0x2099, 0xb576, 0x20a1, 0xb786, 0x20a9, 0x0004, + 0x53a3, 0x015e, 0x014e, 0x013e, 0x0428, 0x708f, 0x0005, 0x7007, + 0x0122, 0x2001, 0x0002, 0x0030, 0x708f, 0x0002, 0x7007, 0x0121, + 0x2001, 0x0003, 0x7002, 0x7097, 0x0001, 0x0088, 0x7007, 0x0122, + 0x2001, 0x0002, 0x0020, 0x7007, 0x0121, 0x2001, 0x0003, 0x7002, + 0xa006, 0x7096, 0x708e, 0xa184, 0xff00, 0x8007, 0x709a, 0xa184, + 0x00ff, 0x7092, 0x00ee, 0x001e, 0x0005, 0x00e6, 0x2071, 0xb614, + 0x684c, 0xa005, 0x1130, 0x7028, 0xc085, 0x702a, 0xa085, 0x0001, + 0x0428, 0x6a60, 0x7236, 0x6b64, 0x733a, 0x6868, 0x703e, 0x7076, + 0x686c, 0x7042, 0x707a, 0x684c, 0x702e, 0x6844, 0x7032, 0x2009, + 0x000d, 0x200a, 0x700b, 0x0000, 0x8007, 0x8006, 0x8006, 0xa08c, + 0x003f, 0xa084, 0xffc0, 0xa210, 0x2100, 0xa319, 0x726e, 0x7372, + 0x7028, 0xc084, 0x702a, 0x7007, 0x0001, 0xa006, 0x00ee, 0x0005, + 0x0156, 0x00e6, 0x0026, 0x6838, 0xd0fc, 0x1904, 0x5461, 0x6804, + 0xa00d, 0x0188, 0x00d6, 0x2071, 0xb500, 0xa016, 0x702c, 0x2168, + 0x6904, 0x206a, 0x8210, 0x2d00, 0x81ff, 0x1dc8, 0x702e, 0x70b4, + 0xa200, 0x70b6, 0x00de, 0x2071, 0xb614, 0x701c, 0xa005, 0x1904, + 0x5471, 0x20a9, 0x0032, 0x0f04, 0x546f, 0x0e04, 0x542b, 0x2071, + 0xb735, 0x7200, 0x82ff, 0x05d8, 0x6934, 0xa186, 0x0103, 0x1904, + 0x547f, 0x6948, 0x6844, 0xa105, 0x1540, 0x2009, 0x8020, 0x2200, + 0x0002, 0x546f, 0x5446, 0x5497, 0x54a3, 0x546f, 0x2071, 0x0000, + 0x20a9, 0x0032, 0x0f04, 0x546f, 0x7018, 0xd084, 0x1dd8, 0x7122, + 0x683c, 0x7026, 0x6840, 0x702a, 0x701b, 0x0001, 0x2091, 0x4080, + 0x2071, 0xb500, 0x702c, 0x206a, 0x2d00, 0x702e, 0x70b4, 0x8000, + 0x70b6, 0x002e, 0x00ee, 0x015e, 0x0005, 0x6844, 0xa086, 0x0100, + 0x1130, 0x6868, 0xa005, 0x1118, 0x2009, 0x8020, 0x0880, 0x2071, + 0xb614, 0x2d08, 0x206b, 0x0000, 0x7010, 0x8000, 0x7012, 0x7018, + 0xa06d, 0x711a, 0x0110, 0x6902, 0x0008, 0x711e, 0x0c10, 0xa18c, + 0x00ff, 0xa186, 0x0017, 0x0130, 0xa186, 0x001e, 0x0118, 0xa18e, + 0x001f, 0x1d28, 0x684c, 0xd0cc, 0x0d10, 0x6850, 0xa084, 0x00ff, + 0xa086, 0x0001, 0x19e0, 0x2009, 0x8021, 0x0804, 0x543f, 0x7084, + 0x8008, 0xa092, 0x001e, 0x1a98, 0x7186, 0xae90, 0x0003, 0xa210, + 0x683c, 0x2012, 0x0078, 0x7084, 0x8008, 0xa092, 0x000f, 0x1a38, + 0x7186, 0xae90, 0x0003, 0x8003, 0xa210, 0x683c, 0x2012, 0x8210, + 0x6840, 0x2012, 0x7088, 0xa10a, 0x0a04, 0x5458, 0x718c, 0x7084, + 0xa10a, 0x0a04, 0x5458, 0x2071, 0x0000, 0x7018, 0xd084, 0x1904, + 0x5458, 0x2071, 0xb735, 0x7000, 0xa086, 0x0002, 0x1150, 0x080c, + 0x5722, 0x2071, 0x0000, 0x701b, 0x0001, 0x2091, 0x4080, 0x0804, + 0x5458, 0x080c, 0x574c, 0x2071, 0x0000, 0x701b, 0x0001, 0x2091, + 0x4080, 0x0804, 0x5458, 0x0006, 0x684c, 0x0006, 0x6837, 0x0103, + 0x20a9, 0x001c, 0xad80, 0x0011, 0x20a0, 0x2001, 0x0000, 0x40a4, + 0x000e, 0xa084, 0x00ff, 0x684e, 0x000e, 0x684a, 0x6952, 0x0005, + 0x2071, 0xb614, 0x7004, 0x0002, 0x54fe, 0x550f, 0x570d, 0x570e, + 0x571b, 0x5721, 0x54ff, 0x56fe, 0x5694, 0x56ea, 0x0005, 0x0126, + 0x2091, 0x8000, 0x0e04, 0x550e, 0x2009, 0x000d, 0x7030, 0x200a, + 0x2091, 0x4080, 0x7007, 0x0001, 0x700b, 0x0000, 0x012e, 0x2069, + 0xb7f3, 0x683c, 0xa005, 0x03f8, 0x11f0, 0x0126, 0x2091, 0x8000, + 0x2069, 0x0000, 0x6934, 0x2001, 0xb620, 0x2004, 0xa10a, 0x0170, + 0x0e04, 0x5532, 0x2069, 0x0000, 0x6818, 0xd084, 0x1158, 0x2009, + 0x8040, 0x6922, 0x681b, 0x0001, 0x2091, 0x4080, 0x2069, 0xb7f3, + 0x683f, 0xffff, 0x012e, 0x2069, 0xb500, 0x6848, 0x6968, 0xa102, + 0x2069, 0xb735, 0x688a, 0x6984, 0x701c, 0xa06d, 0x0120, 0x81ff, + 0x0904, 0x5588, 0x00a0, 0x81ff, 0x0904, 0x564e, 0x2071, 0xb735, + 0x7184, 0x7088, 0xa10a, 0x1258, 0x7190, 0x2071, 0xb7f3, 0x7038, + 0xa005, 0x0128, 0x1b04, 0x564e, 0x713a, 0x0804, 0x564e, 0x2071, + 0xb735, 0x718c, 0x0126, 0x2091, 0x8000, 0x7084, 0xa10a, 0x0a04, + 0x5669, 0x0e04, 0x560a, 0x2071, 0x0000, 0x7018, 0xd084, 0x1904, + 0x560a, 0x2001, 0xffff, 0x2071, 0xb7f3, 0x703a, 0x2071, 0xb735, + 0x7000, 0xa086, 0x0002, 0x1150, 0x080c, 0x5722, 0x2071, 0x0000, + 0x701b, 0x0001, 0x2091, 0x4080, 0x0804, 0x560a, 0x080c, 0x574c, + 0x2071, 0x0000, 0x701b, 0x0001, 0x2091, 0x4080, 0x0804, 0x560a, + 0x2071, 0xb735, 0x7000, 0xa005, 0x0904, 0x5630, 0x6934, 0xa186, + 0x0103, 0x1904, 0x560d, 0x684c, 0xd0bc, 0x1904, 0x5630, 0x6948, + 0x6844, 0xa105, 0x1904, 0x5625, 0x2009, 0x8020, 0x2071, 0xb735, + 0x7000, 0x0002, 0x5630, 0x55f0, 0x55c8, 0x55da, 0x55a7, 0x0136, + 0x0146, 0x0156, 0x2099, 0xb576, 0x20a1, 0xb786, 0x20a9, 0x0004, + 0x53a3, 0x015e, 0x014e, 0x013e, 0x2071, 0xb77d, 0xad80, 0x000f, + 0x700e, 0x7013, 0x0002, 0x7007, 0x0002, 0x700b, 0x0000, 0x2e10, + 0x080c, 0x1643, 0x2071, 0xb614, 0x7007, 0x0009, 0x0804, 0x564e, + 0x7084, 0x8008, 0xa092, 0x001e, 0x1a04, 0x564e, 0xae90, 0x0003, + 0xa210, 0x683c, 0x2012, 0x7186, 0x2071, 0xb614, 0x080c, 0x57a3, + 0x0804, 0x564e, 0x7084, 0x8008, 0xa092, 0x000f, 0x1a04, 0x564e, + 0xae90, 0x0003, 0x8003, 0xa210, 0x683c, 0x2012, 0x8210, 0x6840, + 0x2012, 0x7186, 0x2071, 0xb614, 0x080c, 0x57a3, 0x0804, 0x564e, + 0x0126, 0x2091, 0x8000, 0x0e04, 0x560a, 0x2071, 0x0000, 0x7018, + 0xd084, 0x1180, 0x7122, 0x683c, 0x7026, 0x6840, 0x702a, 0x701b, + 0x0001, 0x2091, 0x4080, 0x012e, 0x2071, 0xb614, 0x080c, 0x57a3, + 0x0804, 0x564e, 0x012e, 0x0804, 0x564e, 0xa18c, 0x00ff, 0xa186, + 0x0017, 0x0130, 0xa186, 0x001e, 0x0118, 0xa18e, 0x001f, 0x11c0, + 0x684c, 0xd0cc, 0x01a8, 0x6850, 0xa084, 0x00ff, 0xa086, 0x0001, + 0x1178, 0x2009, 0x8021, 0x0804, 0x559e, 0x6844, 0xa086, 0x0100, + 0x1138, 0x6868, 0xa005, 0x1120, 0x2009, 0x8020, 0x0804, 0x559e, + 0x2071, 0xb614, 0x080c, 0x57b5, 0x01c8, 0x2071, 0xb614, 0x700f, + 0x0001, 0x6934, 0xa184, 0x00ff, 0xa086, 0x0003, 0x1130, 0x810f, + 0xa18c, 0x00ff, 0x8101, 0x0108, 0x710e, 0x7007, 0x0003, 0x080c, + 0x57ce, 0x7050, 0xa086, 0x0100, 0x0904, 0x570e, 0x0126, 0x2091, + 0x8000, 0x2071, 0xb614, 0x7008, 0xa086, 0x0001, 0x1180, 0x0e04, + 0x5667, 0x2009, 0x000d, 0x7030, 0x200a, 0x2091, 0x4080, 0x700b, + 0x0000, 0x7004, 0xa086, 0x0006, 0x1110, 0x7007, 0x0001, 0x012e, + 0x0005, 0x2071, 0xb614, 0x080c, 0x57b5, 0x0518, 0x2071, 0xb735, + 0x7084, 0x700a, 0x20a9, 0x0020, 0x2099, 0xb736, 0x20a1, 0xb75d, + 0x53a3, 0x7087, 0x0000, 0x2071, 0xb614, 0x2069, 0xb77d, 0x706c, + 0x6826, 0x7070, 0x682a, 0x7074, 0x682e, 0x7078, 0x6832, 0x2d10, + 0x080c, 0x1643, 0x7007, 0x0008, 0x2001, 0xffff, 0x2071, 0xb7f3, + 0x703a, 0x012e, 0x0804, 0x564e, 0x2069, 0xb77d, 0x6808, 0xa08e, + 0x0000, 0x0904, 0x56e9, 0xa08e, 0x0200, 0x0904, 0x56e7, 0xa08e, + 0x0100, 0x1904, 0x56e9, 0x0126, 0x2091, 0x8000, 0x0e04, 0x56e5, + 0x2069, 0x0000, 0x6818, 0xd084, 0x15c0, 0x702c, 0x7130, 0x8108, + 0xa102, 0x0230, 0xa00e, 0x7034, 0x706e, 0x7038, 0x7072, 0x0048, + 0x706c, 0xa080, 0x0040, 0x706e, 0x1220, 0x7070, 0xa081, 0x0000, + 0x7072, 0x7132, 0x6936, 0x700b, 0x0000, 0x2001, 0xb75a, 0x2004, + 0xa005, 0x1190, 0x6934, 0x2069, 0xb735, 0x689c, 0x699e, 0x2069, + 0xb7f3, 0xa102, 0x1118, 0x683c, 0xa005, 0x1368, 0x2001, 0xb75b, + 0x200c, 0x810d, 0x693e, 0x0038, 0x2009, 0x8040, 0x6922, 0x681b, + 0x0001, 0x2091, 0x4080, 0x7007, 0x0001, 0x012e, 0x0010, 0x7007, + 0x0005, 0x0005, 0x2001, 0xb77f, 0x2004, 0xa08e, 0x0100, 0x1128, + 0x7007, 0x0001, 0x080c, 0x57a3, 0x0005, 0xa08e, 0x0000, 0x0de0, + 0xa08e, 0x0200, 0x1dc8, 0x7007, 0x0005, 0x0005, 0x701c, 0xa06d, + 0x0158, 0x080c, 0x57b5, 0x0140, 0x7007, 0x0003, 0x080c, 0x57ce, + 0x7050, 0xa086, 0x0100, 0x0110, 0x0005, 0x0005, 0x7050, 0xa09e, + 0x0100, 0x1118, 0x7007, 0x0004, 0x0030, 0xa086, 0x0200, 0x1110, + 0x7007, 0x0005, 0x0005, 0x080c, 0x5771, 0x7006, 0x080c, 0x57a3, + 0x0005, 0x0005, 0x00e6, 0x0156, 0x2071, 0xb735, 0x7184, 0x81ff, + 0x0500, 0xa006, 0x7086, 0xae80, 0x0003, 0x2071, 0x0000, 0x21a8, + 0x2014, 0x7226, 0x8000, 0x0f04, 0x5746, 0x2014, 0x722a, 0x8000, + 0x0f04, 0x5746, 0x2014, 0x722e, 0x8000, 0x0f04, 0x5746, 0x2014, + 0x723a, 0x8000, 0x0f04, 0x5746, 0x2014, 0x723e, 0xa180, 0x8030, + 0x7022, 0x015e, 0x00ee, 0x0005, 0x00e6, 0x0156, 0x2071, 0xb735, + 0x7184, 0x81ff, 0x01d8, 0xa006, 0x7086, 0xae80, 0x0003, 0x2071, + 0x0000, 0x21a8, 0x2014, 0x7226, 0x8000, 0x2014, 0x722a, 0x8000, + 0x0f04, 0x5768, 0x2014, 0x723a, 0x8000, 0x2014, 0x723e, 0x0018, + 0x2001, 0x8020, 0x0010, 0x2001, 0x8042, 0x7022, 0x015e, 0x00ee, + 0x0005, 0x702c, 0x7130, 0x8108, 0xa102, 0x0230, 0xa00e, 0x7034, + 0x706e, 0x7038, 0x7072, 0x0048, 0x706c, 0xa080, 0x0040, 0x706e, + 0x1220, 0x7070, 0xa081, 0x0000, 0x7072, 0x7132, 0x700c, 0x8001, + 0x700e, 0x1180, 0x0126, 0x2091, 0x8000, 0x0e04, 0x579d, 0x2001, + 0x000d, 0x2102, 0x2091, 0x4080, 0x2001, 0x0001, 0x700b, 0x0000, + 0x012e, 0x0005, 0x2001, 0x0007, 0x0005, 0x2001, 0x0006, 0x700b, + 0x0001, 0x012e, 0x0005, 0x701c, 0xa06d, 0x0170, 0x0126, 0x2091, + 0x8000, 0x7010, 0x8001, 0x7012, 0x2d04, 0x701e, 0xa005, 0x1108, + 0x701a, 0x012e, 0x080c, 0x160f, 0x0005, 0x2019, 0x000d, 0x2304, + 0x230c, 0xa10e, 0x0130, 0x2304, 0x230c, 0xa10e, 0x0110, 0xa006, + 0x0060, 0x732c, 0x8319, 0x7130, 0xa102, 0x1118, 0x2300, 0xa005, + 0x0020, 0x0210, 0xa302, 0x0008, 0x8002, 0x0005, 0x2d00, 0x7026, + 0xa080, 0x000d, 0x7056, 0x7053, 0x0000, 0x0126, 0x2091, 0x8000, + 0x2009, 0xb812, 0x2104, 0xc08d, 0x200a, 0x012e, 0x080c, 0x165f, + 0x0005, 0x708c, 0xa08a, 0x0029, 0x1220, 0xa082, 0x001d, 0x0033, + 0x0010, 0x080c, 0x1515, 0x6027, 0x1e00, 0x0005, 0x58dc, 0x5857, + 0x586f, 0x58ac, 0x58cd, 0x5907, 0x5919, 0x586f, 0x58f3, 0x57fb, + 0x5829, 0x57fa, 0x0005, 0x00d6, 0x2069, 0x0200, 0x6804, 0xa005, + 0x1180, 0x6808, 0xa005, 0x1518, 0x708f, 0x0028, 0x2069, 0xb7c5, + 0x2d04, 0x7002, 0x080c, 0x5bd1, 0x6028, 0xa085, 0x0600, 0x602a, + 0x00b0, 0x708f, 0x0028, 0x2069, 0xb7c5, 0x2d04, 0x7002, 0x6028, + 0xa085, 0x0600, 0x602a, 0x00e6, 0x0036, 0x0046, 0x0056, 0x2071, + 0xb823, 0x080c, 0x1dfe, 0x005e, 0x004e, 0x003e, 0x00ee, 0x00de, + 0x0005, 0x00d6, 0x2069, 0x0200, 0x6804, 0xa005, 0x1180, 0x6808, + 0xa005, 0x1518, 0x708f, 0x0028, 0x2069, 0xb7c5, 0x2d04, 0x7002, + 0x080c, 0x5c5e, 0x6028, 0xa085, 0x0600, 0x602a, 0x00b0, 0x708f, + 0x0028, 0x2069, 0xb7c5, 0x2d04, 0x7002, 0x6028, 0xa085, 0x0600, + 0x602a, 0x00e6, 0x0036, 0x0046, 0x0056, 0x2071, 0xb823, 0x080c, + 0x1dfe, 0x005e, 0x004e, 0x003e, 0x00ee, 0x00de, 0x0005, 0x6803, + 0x0090, 0x6124, 0xd1e4, 0x1190, 0x080c, 0x5984, 0xd1d4, 0x1160, + 0xd1dc, 0x1138, 0xd1cc, 0x0150, 0x708f, 0x0020, 0x080c, 0x5984, + 0x0028, 0x708f, 0x001d, 0x0010, 0x708f, 0x001f, 0x0005, 0x6803, + 0x0088, 0x6124, 0xd1cc, 0x1590, 0xd1dc, 0x1568, 0xd1e4, 0x1540, + 0xa184, 0x1e00, 0x1580, 0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, + 0x080c, 0x5aff, 0x080c, 0x24b0, 0x0156, 0x6803, 0x0100, 0x20a9, + 0x0014, 0x6804, 0xd0dc, 0x1118, 0x1f04, 0x5889, 0x0048, 0x20a9, + 0x0014, 0x6803, 0x0080, 0x6804, 0xd0d4, 0x1130, 0x1f04, 0x5893, + 0x080c, 0x5b20, 0x015e, 0x0078, 0x015e, 0x708f, 0x0028, 0x0058, + 0x708f, 0x001e, 0x0040, 0x708f, 0x001d, 0x0028, 0x708f, 0x0020, + 0x0010, 0x708f, 0x001f, 0x0005, 0x60e3, 0x0001, 0x600c, 0xc0b4, + 0x600e, 0x080c, 0x5aff, 0x080c, 0x24b0, 0x6803, 0x0080, 0x6124, + 0xd1d4, 0x1180, 0xd1dc, 0x1158, 0xd1e4, 0x1130, 0xa184, 0x1e00, + 0x1158, 0x708f, 0x0028, 0x0040, 0x708f, 0x001e, 0x0028, 0x708f, + 0x001d, 0x0010, 0x708f, 0x001f, 0x0005, 0x6803, 0x00a0, 0x6124, + 0xd1dc, 0x1138, 0xd1e4, 0x0138, 0x080c, 0x1e47, 0x708f, 0x001e, + 0x0010, 0x708f, 0x001d, 0x0005, 0x080c, 0x59f6, 0x6124, 0xd1dc, + 0x1188, 0x080c, 0x5984, 0x0016, 0x080c, 0x1e47, 0x001e, 0xd1d4, + 0x1128, 0xd1e4, 0x0138, 0x708f, 0x001e, 0x0020, 0x708f, 0x001f, + 0x080c, 0x5984, 0x0005, 0x6803, 0x00a0, 0x6124, 0xd1d4, 0x1160, + 0xd1cc, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x708f, 0x001e, + 0x0028, 0x708f, 0x001d, 0x0010, 0x708f, 0x0021, 0x0005, 0x080c, + 0x59f6, 0x6124, 0xd1d4, 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, + 0x708f, 0x001e, 0x0028, 0x708f, 0x001d, 0x0010, 0x708f, 0x001f, + 0x0005, 0x6803, 0x0090, 0x6124, 0xd1d4, 0x1178, 0xd1cc, 0x1150, + 0xd1dc, 0x1128, 0xd1e4, 0x0158, 0x708f, 0x001e, 0x0040, 0x708f, + 0x001d, 0x0028, 0x708f, 0x0020, 0x0010, 0x708f, 0x001f, 0x0005, + 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x0126, 0x2061, 0x0100, 0x2069, + 0x0140, 0x2071, 0xb500, 0x2091, 0x8000, 0x080c, 0x5acf, 0x11e8, + 0x2001, 0xb50c, 0x200c, 0xd1b4, 0x01c0, 0xc1b4, 0x2102, 0x6027, + 0x0200, 0xe000, 0xe000, 0x6024, 0xd0cc, 0x0158, 0x6803, 0x00a0, + 0x2001, 0xb79f, 0x2003, 0x0001, 0x2001, 0xb500, 0x2003, 0x0001, + 0x0428, 0x6028, 0xc0cd, 0x602a, 0x0408, 0x080c, 0x5aeb, 0x0150, + 0x080c, 0x5ae1, 0x1138, 0x2001, 0x0001, 0x080c, 0x27c3, 0x080c, + 0x5aa6, 0x00a0, 0x080c, 0x59f3, 0x0178, 0x2001, 0x0001, 0x080c, + 0x27c3, 0x708c, 0xa086, 0x001e, 0x0120, 0x708c, 0xa086, 0x0022, + 0x1118, 0x708f, 0x0025, 0x0010, 0x708f, 0x0021, 0x012e, 0x00ee, + 0x00de, 0x00ce, 0x001e, 0x0005, 0x0026, 0x2011, 0x5995, 0x080c, + 0x6a5c, 0x002e, 0x0016, 0x0026, 0x2009, 0x0064, 0x2011, 0x5995, + 0x080c, 0x6a53, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00f6, 0x0016, + 0x080c, 0x7d7a, 0x2071, 0xb500, 0x080c, 0x5930, 0x001e, 0x00fe, + 0x00ee, 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, + 0x00f6, 0x0126, 0x080c, 0x7d7a, 0x2061, 0x0100, 0x2069, 0x0140, + 0x2071, 0xb500, 0x2091, 0x8000, 0x6028, 0xc09c, 0x602a, 0x2011, + 0x0003, 0x080c, 0x8075, 0x2011, 0x0002, 0x080c, 0x807f, 0x080c, + 0x7f59, 0x080c, 0x6a10, 0x0036, 0x2019, 0x0000, 0x080c, 0x7fe4, + 0x003e, 0x60e3, 0x0000, 0x080c, 0xb42f, 0x080c, 0xb44a, 0x2001, + 0xb500, 0x2003, 0x0004, 0x6027, 0x0008, 0x080c, 0x12dd, 0x2001, + 0x0001, 0x080c, 0x27c3, 0x012e, 0x00fe, 0x00ee, 0x00de, 0x00ce, + 0x003e, 0x002e, 0x001e, 0x0005, 0x2001, 0xb500, 0x2004, 0xa086, + 0x0004, 0x0140, 0x2001, 0xb79e, 0x2003, 0xaaaa, 0x2001, 0xb79f, + 0x2003, 0x0000, 0x0005, 0x6020, 0xd09c, 0x0005, 0x6800, 0xa086, + 0x00c0, 0x0160, 0x6803, 0x00c0, 0x0156, 0x20a9, 0x002d, 0x1d04, + 0x59ff, 0x2091, 0x6000, 0x1f04, 0x59ff, 0x015e, 0x0005, 0x00c6, + 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0xb500, + 0x2001, 0xb79f, 0x200c, 0xa186, 0x0000, 0x0158, 0xa186, 0x0001, + 0x0158, 0xa186, 0x0002, 0x0158, 0xa186, 0x0003, 0x0158, 0x0804, + 0x5a94, 0x708f, 0x0022, 0x0040, 0x708f, 0x0021, 0x0028, 0x708f, + 0x0023, 0x0020, 0x708f, 0x0024, 0x6043, 0x0000, 0x60e3, 0x0000, + 0x6887, 0x0001, 0x2001, 0x0001, 0x080c, 0x2872, 0x0026, 0x2011, + 0x0003, 0x080c, 0x8075, 0x2011, 0x0002, 0x080c, 0x807f, 0x080c, + 0x7f59, 0x0036, 0x2019, 0x0000, 0x080c, 0x7fe4, 0x003e, 0x002e, + 0x7000, 0xa08e, 0x0004, 0x0118, 0x602b, 0x0028, 0x0010, 0x602b, + 0x0020, 0x0156, 0x0126, 0x2091, 0x8000, 0x20a9, 0x0005, 0x6024, + 0xd0ac, 0x0120, 0x012e, 0x015e, 0x0804, 0x5aa2, 0x6800, 0xa084, + 0x00a0, 0xc0bd, 0x6802, 0x6904, 0xd1d4, 0x1130, 0x6803, 0x0100, + 0x1f04, 0x5a57, 0x080c, 0x5b20, 0x012e, 0x015e, 0x080c, 0x5ae1, + 0x01a8, 0x6044, 0xa005, 0x0168, 0x6050, 0x0006, 0xa085, 0x0020, + 0x6052, 0x080c, 0x5b20, 0xa006, 0x8001, 0x1df0, 0x000e, 0x6052, + 0x0028, 0x6804, 0xd0d4, 0x1110, 0x080c, 0x5b20, 0x0016, 0x0026, + 0x2009, 0x00c8, 0x2011, 0x59a2, 0x080c, 0x6a22, 0x002e, 0x001e, + 0x2001, 0xb79f, 0x2003, 0x0004, 0x080c, 0x57e1, 0x080c, 0x5ae1, + 0x0148, 0x6804, 0xd0d4, 0x1130, 0xd0dc, 0x1100, 0x2001, 0xb79f, + 0x2003, 0x0000, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, + 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0xb500, 0x2001, + 0xb79e, 0x2003, 0x0000, 0x2001, 0xb78f, 0x2003, 0x0000, 0x708f, + 0x0000, 0x60e3, 0x0000, 0x6887, 0x0000, 0x2001, 0x0000, 0x080c, + 0x2872, 0x6803, 0x0000, 0x6043, 0x0090, 0x6043, 0x0010, 0x6027, + 0xffff, 0x602b, 0x182f, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x0006, + 0x2001, 0xb79e, 0x2004, 0xa086, 0xaaaa, 0x000e, 0x0005, 0x0006, + 0x2001, 0xb572, 0x2004, 0xa084, 0x0030, 0xa086, 0x0000, 0x000e, + 0x0005, 0x0006, 0x2001, 0xb572, 0x2004, 0xa084, 0x0030, 0xa086, + 0x0030, 0x000e, 0x0005, 0x0006, 0x2001, 0xb572, 0x2004, 0xa084, + 0x0030, 0xa086, 0x0010, 0x000e, 0x0005, 0x0006, 0x2001, 0xb572, + 0x2004, 0xa084, 0x0030, 0xa086, 0x0020, 0x000e, 0x0005, 0x2001, + 0xb50c, 0x2004, 0xd0a4, 0x0170, 0x080c, 0x2892, 0x0036, 0x0016, + 0x2009, 0x0000, 0x2019, 0x0028, 0x080c, 0x2c6f, 0x001e, 0x003e, + 0xa006, 0x0009, 0x0005, 0x00e6, 0x2071, 0xb50c, 0x2e04, 0x0118, + 0xa085, 0x0010, 0x0010, 0xa084, 0xffef, 0x2072, 0x00ee, 0x0005, + 0x6050, 0x0006, 0x60f0, 0x0006, 0x60ec, 0x0006, 0x600c, 0x0006, + 0x6004, 0x0006, 0x6028, 0x0006, 0x602f, 0x0100, 0x602f, 0x0000, + 0x602f, 0x0040, 0x602f, 0x0000, 0x000e, 0x602a, 0x000e, 0x6006, + 0x000e, 0x600e, 0x000e, 0x60ee, 0x000e, 0x60f2, 0x60e3, 0x0000, + 0x6887, 0x0001, 0x2001, 0x0001, 0x080c, 0x2872, 0x6800, 0xa084, + 0x00a0, 0xc0bd, 0x6802, 0x6803, 0x00a0, 0x000e, 0x6052, 0x6050, + 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, + 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0xb500, 0x6020, 0xa084, + 0x0080, 0x0138, 0x2001, 0xb50c, 0x200c, 0xc1bd, 0x2102, 0x0804, + 0x5bc9, 0x2001, 0xb50c, 0x200c, 0xc1bc, 0x2102, 0x6028, 0xa084, + 0xe1ff, 0x602a, 0x6027, 0x0200, 0x6803, 0x0090, 0x20a9, 0x0384, + 0x6024, 0xd0cc, 0x1508, 0x1d04, 0x5b78, 0x2091, 0x6000, 0x1f04, + 0x5b78, 0x2011, 0x0003, 0x080c, 0x8075, 0x2011, 0x0002, 0x080c, + 0x807f, 0x080c, 0x7f59, 0x2019, 0x0000, 0x080c, 0x7fe4, 0x6803, + 0x00a0, 0x2001, 0xb79f, 0x2003, 0x0001, 0x2001, 0xb500, 0x2003, + 0x0001, 0xa085, 0x0001, 0x0468, 0x86ff, 0x1120, 0x080c, 0x1e47, + 0x080c, 0x24b0, 0x60e3, 0x0000, 0x2001, 0xb78f, 0x2004, 0x080c, + 0x2872, 0x60e2, 0x6803, 0x0080, 0x20a9, 0x0384, 0x6027, 0x1e00, + 0x2009, 0x1e00, 0xe000, 0x6024, 0xa10c, 0x0138, 0x1d04, 0x5bae, + 0x2091, 0x6000, 0x1f04, 0x5bae, 0x0820, 0x6028, 0xa085, 0x1e00, + 0x602a, 0x70a4, 0xa005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, + 0xa006, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, + 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, + 0x2061, 0x0100, 0x2071, 0xb500, 0x2069, 0x0140, 0x6020, 0xa084, + 0x00c0, 0x0120, 0x6884, 0xa005, 0x1904, 0x5c25, 0x6803, 0x0088, + 0x60e3, 0x0000, 0x6887, 0x0000, 0x2001, 0x0000, 0x080c, 0x2872, + 0x2069, 0x0200, 0x6804, 0xa005, 0x1118, 0x6808, 0xa005, 0x01c0, + 0x6028, 0xa084, 0xfbff, 0x602a, 0x6027, 0x0400, 0x2069, 0xb7c5, + 0x7000, 0x206a, 0x708f, 0x0026, 0x7003, 0x0001, 0x20a9, 0x0002, + 0x1d04, 0x5c08, 0x2091, 0x6000, 0x1f04, 0x5c08, 0x0804, 0x5c56, + 0x2069, 0x0140, 0x20a9, 0x0384, 0x6027, 0x1e00, 0x2009, 0x1e00, + 0xe000, 0x6024, 0xa10c, 0x0520, 0xa084, 0x1a00, 0x1508, 0x1d04, + 0x5c14, 0x2091, 0x6000, 0x1f04, 0x5c14, 0x2011, 0x0003, 0x080c, + 0x8075, 0x2011, 0x0002, 0x080c, 0x807f, 0x080c, 0x7f59, 0x2019, + 0x0000, 0x080c, 0x7fe4, 0x6803, 0x00a0, 0x2001, 0xb79f, 0x2003, + 0x0001, 0x2001, 0xb500, 0x2003, 0x0001, 0xa085, 0x0001, 0x00b0, + 0x080c, 0x24b0, 0x6803, 0x0080, 0x2069, 0x0140, 0x60e3, 0x0000, + 0x70a4, 0xa005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x2001, + 0xb78f, 0x2004, 0x080c, 0x2872, 0x60e2, 0xa006, 0x00ee, 0x00de, + 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, + 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071, + 0xb500, 0x6020, 0xa084, 0x00c0, 0x01e0, 0x2011, 0x0003, 0x080c, + 0x8075, 0x2011, 0x0002, 0x080c, 0x807f, 0x080c, 0x7f59, 0x2019, + 0x0000, 0x080c, 0x7fe4, 0x2069, 0x0140, 0x6803, 0x00a0, 0x2001, + 0xb79f, 0x2003, 0x0001, 0x2001, 0xb500, 0x2003, 0x0001, 0x0804, + 0x5cfb, 0x2001, 0xb50c, 0x200c, 0xd1b4, 0x1160, 0xc1b5, 0x2102, + 0x080c, 0x598a, 0x2069, 0x0140, 0x080c, 0x24b0, 0x6803, 0x0080, + 0x60e3, 0x0000, 0x2069, 0x0200, 0x6804, 0xa005, 0x1118, 0x6808, + 0xa005, 0x01c0, 0x6028, 0xa084, 0xfdff, 0x602a, 0x6027, 0x0200, + 0x2069, 0xb7c5, 0x7000, 0x206a, 0x708f, 0x0027, 0x7003, 0x0001, + 0x20a9, 0x0002, 0x1d04, 0x5cb2, 0x2091, 0x6000, 0x1f04, 0x5cb2, + 0x0804, 0x5cfb, 0x6027, 0x1e00, 0x2009, 0x1e00, 0xe000, 0x6024, + 0xa10c, 0x01c8, 0xa084, 0x1c00, 0x11b0, 0x1d04, 0x5cba, 0x0006, + 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x080c, 0x68f9, 0x00ee, 0x00de, + 0x00ce, 0x001e, 0x000e, 0x00e6, 0x2071, 0xb7f3, 0x7018, 0x00ee, + 0xa005, 0x1d00, 0x0500, 0x0026, 0x2011, 0x59a2, 0x080c, 0x699c, + 0x2011, 0x5995, 0x080c, 0x6a5c, 0x002e, 0x2069, 0x0140, 0x60e3, + 0x0000, 0x70a4, 0xa005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, + 0x2001, 0xb78f, 0x2004, 0x080c, 0x2872, 0x60e2, 0x2001, 0xb50c, + 0x200c, 0xc1b4, 0x2102, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, + 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x0046, + 0x00c6, 0x00e6, 0x2061, 0x0100, 0x2071, 0xb500, 0x7130, 0xd184, + 0x1180, 0x2011, 0xb553, 0x2214, 0xd2ec, 0x0138, 0xc18d, 0x7132, + 0x2011, 0xb553, 0x2214, 0xd2ac, 0x1120, 0x7030, 0xd08c, 0x0904, + 0x5d68, 0x7130, 0xc185, 0x7132, 0x2011, 0xb553, 0x220c, 0xd1a4, + 0x0530, 0x0016, 0x2019, 0x000e, 0x080c, 0xb065, 0x0156, 0x20a9, + 0x007f, 0x2009, 0x0000, 0xa186, 0x007e, 0x01a0, 0xa186, 0x0080, + 0x0188, 0x080c, 0x4fa9, 0x1170, 0x8127, 0xa006, 0x0016, 0x2009, + 0x000e, 0x080c, 0xb0e8, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c, + 0x6b1a, 0x001e, 0x8108, 0x1f04, 0x5d33, 0x015e, 0x001e, 0xd1ac, + 0x1148, 0x0016, 0x2009, 0x0000, 0x2019, 0x0004, 0x080c, 0x2c6f, + 0x001e, 0x0070, 0x0156, 0x20a9, 0x007f, 0x2009, 0x0000, 0x080c, + 0x4fa9, 0x1110, 0x080c, 0x4c0b, 0x8108, 0x1f04, 0x5d5f, 0x015e, + 0x080c, 0x1e47, 0x2011, 0x0003, 0x080c, 0x8075, 0x2011, 0x0002, + 0x080c, 0x807f, 0x080c, 0x7f59, 0x0036, 0x2019, 0x0000, 0x080c, + 0x7fe4, 0x003e, 0x60e3, 0x0000, 0x2001, 0xb500, 0x2003, 0x0001, + 0x080c, 0x5a07, 0x00ee, 0x00ce, 0x004e, 0x003e, 0x002e, 0x001e, + 0x015e, 0x0005, 0x2071, 0xb5e2, 0x7003, 0x0000, 0x7007, 0x0000, + 0x700f, 0x0000, 0x702b, 0x0001, 0x704f, 0x0000, 0x7053, 0x0001, + 0x705f, 0x0020, 0x7063, 0x0040, 0x7083, 0x0000, 0x708b, 0x0000, + 0x708f, 0x0001, 0x70bf, 0x0000, 0x0005, 0x00e6, 0x2071, 0xb5e2, + 0x6848, 0xa005, 0x1130, 0x7028, 0xc085, 0x702a, 0xa085, 0x0001, + 0x0428, 0x6a50, 0x7236, 0x6b54, 0x733a, 0x6858, 0x703e, 0x707a, + 0x685c, 0x7042, 0x707e, 0x6848, 0x702e, 0x6840, 0x7032, 0x2009, + 0x000c, 0x200a, 0x8007, 0x8006, 0x8006, 0xa08c, 0x003f, 0xa084, + 0xffc0, 0xa210, 0x2100, 0xa319, 0x7272, 0x7376, 0x7028, 0xc084, + 0x702a, 0x7007, 0x0001, 0x700f, 0x0000, 0xa006, 0x00ee, 0x0005, + 0x2b78, 0x2071, 0xb5e2, 0x7004, 0x0043, 0x700c, 0x0002, 0x5de4, + 0x5ddb, 0x5ddb, 0x5ddb, 0x5ddb, 0x0005, 0x5e3a, 0x5e3b, 0x5e6d, + 0x5e6e, 0x5e38, 0x5ebc, 0x5ec1, 0x5ef2, 0x5ef3, 0x5f0e, 0x5f0f, + 0x5f10, 0x5f11, 0x5f12, 0x5f13, 0x5fc9, 0x5ff0, 0x700c, 0x0002, + 0x5dfd, 0x5e38, 0x5e38, 0x5e39, 0x5e39, 0x7830, 0x7930, 0xa106, + 0x0120, 0x7830, 0x7930, 0xa106, 0x1510, 0x7030, 0xa10a, 0x01f8, + 0x1210, 0x712c, 0xa10a, 0xa18a, 0x0002, 0x12d0, 0x080c, 0x15df, + 0x01b0, 0x2d00, 0x705a, 0x7063, 0x0040, 0x2001, 0x0003, 0x7057, + 0x0000, 0x0126, 0x0006, 0x2091, 0x8000, 0x2009, 0xb812, 0x2104, + 0xc085, 0x200a, 0x000e, 0x700e, 0x012e, 0x080c, 0x165f, 0x0005, + 0x080c, 0x15df, 0x0de0, 0x2d00, 0x705a, 0x080c, 0x15df, 0x1108, + 0x0c10, 0x2d00, 0x7086, 0x7063, 0x0080, 0x2001, 0x0004, 0x08f8, + 0x0005, 0x0005, 0x0005, 0x700c, 0x0002, 0x5e42, 0x5e45, 0x5e53, + 0x5e6c, 0x5e6c, 0x080c, 0x5df6, 0x0005, 0x0126, 0x8001, 0x700e, + 0x7058, 0x0006, 0x080c, 0x6343, 0x0120, 0x2091, 0x8000, 0x080c, + 0x5df6, 0x00de, 0x0048, 0x0126, 0x8001, 0x700e, 0x080c, 0x6343, + 0x7058, 0x2068, 0x7084, 0x705a, 0x6803, 0x0000, 0x6807, 0x0000, + 0x6834, 0xa084, 0x00ff, 0xa08a, 0x003a, 0x1218, 0x00db, 0x012e, + 0x0005, 0x012e, 0x080c, 0x5f14, 0x0005, 0x0005, 0x0005, 0x00e6, + 0x2071, 0xb5e2, 0x700c, 0x0002, 0x5e79, 0x5e79, 0x5e79, 0x5e7b, + 0x5e7e, 0x00ee, 0x0005, 0x700f, 0x0001, 0x0010, 0x700f, 0x0002, + 0x00ee, 0x0005, 0x5f14, 0x5f14, 0x5f30, 0x5f14, 0x60ad, 0x5f14, + 0x5f14, 0x5f14, 0x5f14, 0x5f14, 0x5f30, 0x60ef, 0x6132, 0x617b, + 0x618f, 0x5f14, 0x5f14, 0x5f4c, 0x5f30, 0x5f14, 0x5f14, 0x5fa6, + 0x623b, 0x6256, 0x5f14, 0x5f4c, 0x5f14, 0x5f14, 0x5f14, 0x5f14, + 0x5f9c, 0x6256, 0x5f14, 0x5f14, 0x5f14, 0x5f14, 0x5f14, 0x5f14, + 0x5f14, 0x5f14, 0x5f14, 0x5f60, 0x5f14, 0x5f14, 0x5f14, 0x5f14, + 0x5f14, 0x5f14, 0x5f14, 0x5f14, 0x5f14, 0x6361, 0x5f14, 0x5f14, + 0x5f14, 0x5f14, 0x5f14, 0x5f75, 0x7020, 0x2068, 0x080c, 0x160f, + 0x0005, 0x700c, 0x0002, 0x5ec8, 0x5ecb, 0x5ed9, 0x5ef1, 0x5ef1, + 0x080c, 0x5df6, 0x0005, 0x0126, 0x8001, 0x700e, 0x7058, 0x0006, + 0x080c, 0x6343, 0x0120, 0x2091, 0x8000, 0x080c, 0x5df6, 0x00de, + 0x0048, 0x0126, 0x8001, 0x700e, 0x080c, 0x6343, 0x7058, 0x2068, + 0x7084, 0x705a, 0x6803, 0x0000, 0x6807, 0x0000, 0x6834, 0xa084, + 0x00ff, 0xa08a, 0x001a, 0x1218, 0x003b, 0x012e, 0x0005, 0x012e, + 0x0419, 0x0005, 0x0005, 0x0005, 0x5f14, 0x5f30, 0x6099, 0x5f14, + 0x5f30, 0x5f14, 0x5f30, 0x5f30, 0x5f14, 0x5f30, 0x6099, 0x5f30, + 0x5f30, 0x5f30, 0x5f30, 0x5f30, 0x5f14, 0x5f30, 0x6099, 0x5f14, + 0x5f14, 0x5f30, 0x5f14, 0x5f14, 0x5f14, 0x5f30, 0x0005, 0x0005, + 0x0005, 0x0005, 0x0005, 0x0005, 0x7007, 0x0001, 0x6838, 0xa084, + 0x00ff, 0xc0d5, 0x683a, 0x0126, 0x2091, 0x8000, 0x080c, 0x5408, + 0x012e, 0x0005, 0x7007, 0x0001, 0x6838, 0xa084, 0x00ff, 0xc0e5, + 0x683a, 0x0126, 0x2091, 0x8000, 0x080c, 0x5408, 0x012e, 0x0005, + 0x7007, 0x0001, 0x6838, 0xa084, 0x00ff, 0xc0ed, 0x683a, 0x0126, + 0x2091, 0x8000, 0x080c, 0x5408, 0x012e, 0x0005, 0x7007, 0x0001, + 0x6838, 0xa084, 0x00ff, 0xc0dd, 0x683a, 0x0126, 0x2091, 0x8000, + 0x080c, 0x5408, 0x012e, 0x0005, 0x6834, 0x8007, 0xa084, 0x00ff, + 0x0988, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, 0x6059, 0x7007, + 0x0006, 0x7012, 0x2d00, 0x7016, 0x701a, 0x704b, 0x6059, 0x0005, + 0x6834, 0x8007, 0xa084, 0x00ff, 0x0904, 0x5f22, 0x8001, 0x1120, + 0x7007, 0x0001, 0x0804, 0x6076, 0x7007, 0x0006, 0x7012, 0x2d00, + 0x7016, 0x701a, 0x704b, 0x6076, 0x0005, 0x6834, 0x8007, 0xa084, + 0x00ff, 0xa086, 0x0001, 0x1904, 0x5f22, 0x7007, 0x0001, 0x2009, + 0xb531, 0x210c, 0x81ff, 0x11a8, 0x6838, 0xa084, 0x00ff, 0x683a, + 0x6853, 0x0000, 0x080c, 0x4d82, 0x1108, 0x0005, 0x0126, 0x2091, + 0x8000, 0x6837, 0x0139, 0x684a, 0x6952, 0x080c, 0x5408, 0x012e, + 0x0ca0, 0x2001, 0x0028, 0x0c90, 0x684c, 0xa084, 0x00c0, 0xa086, + 0x00c0, 0x1120, 0x7007, 0x0001, 0x0804, 0x626e, 0x2d00, 0x7016, + 0x701a, 0x20a9, 0x0004, 0xa080, 0x0024, 0x2098, 0x20a1, 0xb60d, + 0x53a3, 0x6858, 0x7012, 0xa082, 0x0401, 0x1a04, 0x5f3e, 0x6a84, + 0xa28a, 0x0002, 0x1a04, 0x5f3e, 0x82ff, 0x1138, 0x6888, 0x698c, + 0xa105, 0x0118, 0x2001, 0x602c, 0x0018, 0xa280, 0x6022, 0x2005, + 0x70c6, 0x7010, 0xa015, 0x0904, 0x600e, 0x080c, 0x15df, 0x1118, + 0x7007, 0x000f, 0x0005, 0x2d00, 0x7022, 0x70c4, 0x2060, 0x2c05, + 0x6836, 0xe004, 0xad00, 0x7096, 0xe008, 0xa20a, 0x1210, 0xa00e, + 0x2200, 0x7112, 0xe20c, 0x8003, 0x800b, 0xa296, 0x0004, 0x0108, + 0xa108, 0x719a, 0x810b, 0x719e, 0xae90, 0x0022, 0x080c, 0x1643, + 0x7090, 0xa08e, 0x0100, 0x0170, 0xa086, 0x0200, 0x0118, 0x7007, + 0x0010, 0x0005, 0x7020, 0x2068, 0x080c, 0x160f, 0x7014, 0x2068, + 0x0804, 0x5f3e, 0x7020, 0x2068, 0x7018, 0x6802, 0x6807, 0x0000, + 0x2d08, 0x2068, 0x6906, 0x711a, 0x0804, 0x5fc9, 0x7014, 0x2068, + 0x7007, 0x0001, 0x6884, 0xa005, 0x1128, 0x6888, 0x698c, 0xa105, + 0x0108, 0x00b1, 0x6834, 0xa084, 0x00ff, 0xa086, 0x001e, 0x0904, + 0x626e, 0x04b8, 0x6024, 0x6028, 0x0002, 0x0011, 0x0007, 0x0004, + 0x000a, 0x000f, 0x0005, 0x0006, 0x000a, 0x0011, 0x0005, 0x0004, + 0x00f6, 0x00e6, 0x00c6, 0x0076, 0x0066, 0x6f88, 0x6e8c, 0x6804, + 0x2060, 0xacf0, 0x0021, 0xacf8, 0x0027, 0x2009, 0x0005, 0x700c, + 0x7816, 0x7008, 0x7812, 0x7004, 0x7806, 0x7000, 0x7802, 0x7e0e, + 0x7f0a, 0x8109, 0x0128, 0xaef2, 0x0004, 0xaffa, 0x0006, 0x0c78, + 0x6004, 0xa065, 0x1d30, 0x006e, 0x007e, 0x00ce, 0x00ee, 0x00fe, + 0x0005, 0x2009, 0xb531, 0x210c, 0x81ff, 0x1198, 0x6838, 0xa084, + 0x00ff, 0x683a, 0x080c, 0x4c64, 0x1108, 0x0005, 0x080c, 0x54db, + 0x0126, 0x2091, 0x8000, 0x080c, 0x9ecc, 0x080c, 0x5408, 0x012e, + 0x0ca0, 0x2001, 0x0028, 0x2009, 0x0000, 0x0c80, 0x2009, 0xb531, + 0x210c, 0x81ff, 0x11b0, 0x6858, 0xa005, 0x01c0, 0x6838, 0xa084, + 0x00ff, 0x683a, 0x6853, 0x0000, 0x080c, 0x4d26, 0x1108, 0x0005, + 0x0126, 0x2091, 0x8000, 0x684a, 0x6952, 0x080c, 0x5408, 0x012e, + 0x0cb0, 0x2001, 0x0028, 0x2009, 0x0000, 0x0c90, 0x2001, 0x0000, + 0x0c78, 0x7018, 0x6802, 0x2d08, 0x2068, 0x6906, 0x711a, 0x7010, + 0x8001, 0x7012, 0x0118, 0x7007, 0x0006, 0x0030, 0x7014, 0x2068, + 0x7007, 0x0001, 0x7048, 0x080f, 0x0005, 0x7007, 0x0001, 0x6944, + 0x810f, 0xa18c, 0x00ff, 0x6848, 0xa084, 0x00ff, 0x20a9, 0x0001, + 0xa096, 0x0001, 0x01b0, 0x2009, 0x0000, 0x20a9, 0x00ff, 0xa096, + 0x0002, 0x0178, 0xa005, 0x11f0, 0x6944, 0x810f, 0xa18c, 0x00ff, + 0x080c, 0x4fa9, 0x11b8, 0x0066, 0x6e50, 0x080c, 0x50a8, 0x006e, + 0x0088, 0x0046, 0x2011, 0xb50c, 0x2224, 0xc484, 0x2412, 0x004e, + 0x00c6, 0x080c, 0x4fa9, 0x1110, 0x080c, 0x5209, 0x8108, 0x1f04, + 0x60d9, 0x00ce, 0x684c, 0xd084, 0x1118, 0x080c, 0x160f, 0x0005, + 0x0126, 0x2091, 0x8000, 0x080c, 0x5408, 0x012e, 0x0005, 0x0126, + 0x2091, 0x8000, 0x7007, 0x0001, 0x2001, 0xb553, 0x2004, 0xd0a4, + 0x0580, 0x2061, 0xb874, 0x6100, 0xd184, 0x0178, 0x6858, 0xa084, + 0x00ff, 0x1550, 0x6000, 0xd084, 0x0520, 0x6004, 0xa005, 0x1538, + 0x6003, 0x0000, 0x600b, 0x0000, 0x00c8, 0x2011, 0x0001, 0x6860, + 0xa005, 0x1110, 0x2001, 0x001e, 0x8000, 0x6016, 0x6858, 0xa084, + 0x00ff, 0x0178, 0x6006, 0x6858, 0x8007, 0xa084, 0x00ff, 0x0148, + 0x600a, 0x6858, 0x8000, 0x1108, 0xc28d, 0x6202, 0x012e, 0x0804, + 0x6332, 0x012e, 0x0804, 0x632c, 0x012e, 0x0804, 0x6326, 0x012e, + 0x0804, 0x6329, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001, 0x2001, + 0xb553, 0x2004, 0xd0a4, 0x05e0, 0x2061, 0xb874, 0x6000, 0xd084, + 0x05b8, 0x6204, 0x6308, 0xd08c, 0x1530, 0x6c48, 0xa484, 0x0003, + 0x0170, 0x6958, 0xa18c, 0x00ff, 0x8001, 0x1120, 0x2100, 0xa210, + 0x0620, 0x0028, 0x8001, 0x1508, 0x2100, 0xa212, 0x02f0, 0xa484, + 0x000c, 0x0188, 0x6958, 0x810f, 0xa18c, 0x00ff, 0xa082, 0x0004, + 0x1120, 0x2100, 0xa318, 0x0288, 0x0030, 0xa082, 0x0004, 0x1168, + 0x2100, 0xa31a, 0x0250, 0x6860, 0xa005, 0x0110, 0x8000, 0x6016, + 0x6206, 0x630a, 0x012e, 0x0804, 0x6332, 0x012e, 0x0804, 0x632f, + 0x012e, 0x0804, 0x632c, 0x0126, 0x2091, 0x8000, 0x7007, 0x0001, + 0x2061, 0xb874, 0x6300, 0xd38c, 0x1120, 0x6308, 0x8318, 0x0220, + 0x630a, 0x012e, 0x0804, 0x6340, 0x012e, 0x0804, 0x632f, 0x0126, + 0x00c6, 0x2091, 0x8000, 0x7007, 0x0001, 0x684c, 0xd0ac, 0x0148, + 0x00c6, 0x2061, 0xb874, 0x6000, 0xa084, 0xfcff, 0x6002, 0x00ce, + 0x0448, 0x6858, 0xa005, 0x05d0, 0x685c, 0xa065, 0x0598, 0x2001, + 0xb531, 0x2004, 0xa005, 0x0118, 0x080c, 0x9e1d, 0x0068, 0x6013, + 0x0400, 0x6057, 0x0000, 0x694c, 0xd1a4, 0x0110, 0x6950, 0x6156, + 0x2009, 0x0041, 0x080c, 0x864c, 0x6958, 0xa18c, 0xff00, 0xa186, + 0x2000, 0x1140, 0x0026, 0x2009, 0x0000, 0x2011, 0xfdff, 0x080c, + 0x6b1a, 0x002e, 0x684c, 0xd0c4, 0x0148, 0x2061, 0xb874, 0x6000, + 0xd08c, 0x1120, 0x6008, 0x8000, 0x0208, 0x600a, 0x00ce, 0x012e, + 0x0804, 0x6332, 0x00ce, 0x012e, 0x0804, 0x632c, 0x6954, 0xa186, + 0x002e, 0x0d40, 0xa186, 0x002d, 0x0d28, 0xa186, 0x0045, 0x0528, + 0xa186, 0x002a, 0x1130, 0x2001, 0xb50c, 0x200c, 0xc194, 0x2102, + 0x08c8, 0xa186, 0x0020, 0x0170, 0xa186, 0x0029, 0x1d18, 0x6944, + 0xa18c, 0xff00, 0x810f, 0x080c, 0x4fa9, 0x1960, 0x6000, 0xc0e4, + 0x6002, 0x0840, 0x685c, 0xa065, 0x09a8, 0x6007, 0x0024, 0x2001, + 0xb7b6, 0x2004, 0x6016, 0x0804, 0x61ca, 0x685c, 0xa065, 0x0950, + 0x00e6, 0x6860, 0xa075, 0x2001, 0xb531, 0x2004, 0xa005, 0x0150, + 0x080c, 0x9e1d, 0x8eff, 0x0118, 0x2e60, 0x080c, 0x9e1d, 0x00ee, + 0x0804, 0x61ca, 0x6020, 0xc0dc, 0xc0d5, 0x6022, 0x2e60, 0x6007, + 0x003a, 0x6870, 0xa005, 0x0130, 0x6007, 0x003b, 0x6874, 0x602a, + 0x6878, 0x6012, 0x6003, 0x0001, 0x080c, 0x6c8d, 0x080c, 0x7173, + 0x00ee, 0x0804, 0x61ca, 0x2061, 0xb874, 0x6000, 0xd084, 0x0190, + 0xd08c, 0x1904, 0x6340, 0x0126, 0x2091, 0x8000, 0x6204, 0x8210, + 0x0220, 0x6206, 0x012e, 0x0804, 0x6340, 0x012e, 0x6853, 0x0016, + 0x0804, 0x6339, 0x6853, 0x0007, 0x0804, 0x6339, 0x6834, 0x8007, + 0xa084, 0x00ff, 0x1118, 0x080c, 0x5f22, 0x0078, 0x2030, 0x8001, + 0x1120, 0x7007, 0x0001, 0x0051, 0x0040, 0x7007, 0x0006, 0x7012, + 0x2d00, 0x7016, 0x701a, 0x704b, 0x626e, 0x0005, 0x00e6, 0x0126, + 0x2091, 0x8000, 0xa03e, 0x2009, 0xb531, 0x210c, 0x81ff, 0x1904, + 0x62ec, 0x2009, 0xb50c, 0x210c, 0xd194, 0x1904, 0x6316, 0x6848, + 0x2070, 0xae82, 0xbd00, 0x0a04, 0x62e0, 0x2001, 0xb517, 0x2004, + 0xae02, 0x1a04, 0x62e0, 0x711c, 0xa186, 0x0006, 0x1904, 0x62cf, + 0x7018, 0xa005, 0x0904, 0x62ec, 0x2004, 0xd0e4, 0x1904, 0x6311, + 0x2061, 0xb874, 0x6100, 0xa184, 0x0301, 0xa086, 0x0001, 0x1550, + 0x7020, 0xd0dc, 0x1904, 0x6319, 0x6853, 0x0000, 0x6803, 0x0000, + 0x2d08, 0x7010, 0xa005, 0x1158, 0x7112, 0x684c, 0xd0f4, 0x1904, + 0x631c, 0x2e60, 0x080c, 0x6a76, 0x012e, 0x00ee, 0x0005, 0x2068, + 0x6800, 0xa005, 0x1de0, 0x6902, 0x2168, 0x684c, 0xd0f4, 0x1904, + 0x631c, 0x012e, 0x00ee, 0x0005, 0x012e, 0x00ee, 0x6853, 0x0006, + 0x0804, 0x6339, 0xd184, 0x0dc0, 0xd1c4, 0x11a8, 0x00b8, 0x6944, + 0xa18c, 0xff00, 0x810f, 0x080c, 0x4fa9, 0x15d8, 0x6000, 0xd0e4, + 0x15c0, 0x711c, 0xa186, 0x0007, 0x1118, 0x6853, 0x0002, 0x0498, + 0x6853, 0x0008, 0x0480, 0x6853, 0x000e, 0x0468, 0x6853, 0x0017, + 0x0450, 0x6853, 0x0035, 0x0438, 0x2001, 0xb572, 0x2004, 0xd0fc, + 0x01e8, 0x6848, 0x2070, 0xae82, 0xbd00, 0x02c0, 0x605c, 0xae02, + 0x12a8, 0x711c, 0xa186, 0x0006, 0x1188, 0x7018, 0xa005, 0x0170, + 0x2004, 0xd0bc, 0x0158, 0x2039, 0x0001, 0x7000, 0xa086, 0x0007, + 0x1904, 0x6279, 0x7003, 0x0002, 0x0804, 0x6279, 0x6853, 0x0028, + 0x0010, 0x6853, 0x0029, 0x012e, 0x00ee, 0x0418, 0x6853, 0x002a, + 0x0cd0, 0x6853, 0x0045, 0x0cb8, 0x2e60, 0x2019, 0x0002, 0x6017, + 0x0014, 0x080c, 0xace0, 0x012e, 0x00ee, 0x0005, 0x2009, 0x003e, + 0x0058, 0x2009, 0x0004, 0x0040, 0x2009, 0x0006, 0x0028, 0x2009, + 0x0016, 0x0010, 0x2009, 0x0001, 0x6854, 0xa084, 0xff00, 0xa105, + 0x6856, 0x0126, 0x2091, 0x8000, 0x080c, 0x5408, 0x012e, 0x0005, + 0x080c, 0x160f, 0x0005, 0x702c, 0x7130, 0x8108, 0xa102, 0x0230, + 0xa00e, 0x7034, 0x7072, 0x7038, 0x7076, 0x0058, 0x7070, 0xa080, + 0x0040, 0x7072, 0x1230, 0x7074, 0xa081, 0x0000, 0x7076, 0xa085, + 0x0001, 0x7932, 0x7132, 0x0005, 0x00d6, 0x080c, 0x6a6d, 0x00de, + 0x0005, 0x00d6, 0x00c6, 0x0036, 0x0026, 0x0016, 0x7007, 0x0001, + 0x6a44, 0xa282, 0x0004, 0x1a04, 0x63ac, 0xd284, 0x0170, 0x6a4c, + 0xa290, 0xb635, 0x2204, 0xa065, 0x6004, 0x05e0, 0x8007, 0xa084, + 0x00ff, 0xa084, 0x0006, 0x1108, 0x04a8, 0x2c10, 0x080c, 0x85c7, + 0x1118, 0x080c, 0x9ed6, 0x05a0, 0x621a, 0x6844, 0x0002, 0x638b, + 0x6390, 0x6393, 0x6399, 0x2019, 0x0002, 0x080c, 0xb065, 0x0060, + 0x080c, 0xaffc, 0x0048, 0x2019, 0x0002, 0x6950, 0x080c, 0xb017, + 0x0018, 0x6950, 0x080c, 0xaffc, 0x080c, 0x861d, 0x6857, 0x0000, + 0x0126, 0x2091, 0x8000, 0x080c, 0x5408, 0x012e, 0x001e, 0x002e, + 0x003e, 0x00ce, 0x00de, 0x0005, 0x6857, 0x0006, 0x0c88, 0x6857, + 0x0002, 0x0c70, 0x6857, 0x0005, 0x0c58, 0x6857, 0x0004, 0x0c40, + 0x6857, 0x0007, 0x0c28, 0x00d6, 0x2011, 0x0004, 0x2204, 0xa085, + 0x8002, 0x2012, 0x00de, 0x0005, 0x20e1, 0x0002, 0x3d08, 0x20e1, + 0x2000, 0x3d00, 0xa084, 0x7000, 0x0118, 0xa086, 0x1000, 0x1570, + 0x20e1, 0x0000, 0x3d00, 0xa094, 0xff00, 0x8217, 0xa084, 0xf000, + 0xa086, 0x3000, 0x1160, 0xa184, 0xff00, 0x8007, 0xa086, 0x0008, + 0x11e8, 0x080c, 0x2dbf, 0x11d0, 0x080c, 0x6603, 0x0098, 0x20e1, + 0x0004, 0x3d60, 0xd1bc, 0x1108, 0x3e60, 0xac84, 0x0007, 0x1170, + 0xac82, 0xbd00, 0x0258, 0x685c, 0xac02, 0x1240, 0x2009, 0x0047, + 0x080c, 0x864c, 0x7a1c, 0xd284, 0x1938, 0x0005, 0xa016, 0x080c, + 0x185e, 0x0cc0, 0x0cd8, 0x781c, 0xd08c, 0x0500, 0x0156, 0x0136, + 0x0146, 0x20e1, 0x3000, 0x3d20, 0x3e28, 0xa584, 0x0076, 0x1538, + 0xa484, 0x7000, 0xa086, 0x1000, 0x11a8, 0x080c, 0x647e, 0x01f8, + 0x20e1, 0x3000, 0x7828, 0x7828, 0x080c, 0x649a, 0x014e, 0x013e, + 0x015e, 0x2009, 0xb7e8, 0x2104, 0xa005, 0x1108, 0x0005, 0x080c, + 0x7173, 0x0ce0, 0xa484, 0x7000, 0x1548, 0x080c, 0x647e, 0x01d8, + 0x7000, 0xa084, 0xff00, 0xa086, 0x8100, 0x0d10, 0x00a0, 0xd5a4, + 0x0178, 0x0056, 0x0046, 0x080c, 0x1e6e, 0x080c, 0x24b0, 0x2001, + 0x0160, 0x2502, 0x2001, 0x0138, 0x2202, 0x004e, 0x005e, 0x0048, + 0x04a9, 0x6887, 0x0000, 0x080c, 0xb3df, 0x20e1, 0x3000, 0x7828, + 0x7828, 0x00b9, 0x014e, 0x013e, 0x015e, 0x0880, 0x0439, 0x1130, + 0x7000, 0xa084, 0xff00, 0xa086, 0x8100, 0x1d68, 0x080c, 0xb3df, + 0x20e1, 0x3000, 0x7828, 0x7828, 0x0056, 0x080c, 0x6874, 0x005e, + 0x0c40, 0x2001, 0xb50e, 0x2004, 0xd08c, 0x0178, 0x2001, 0xb500, + 0x2004, 0xa086, 0x0003, 0x1148, 0x0026, 0x0036, 0x2011, 0x8048, + 0x2518, 0x080c, 0x3ecc, 0x003e, 0x002e, 0x0005, 0xa484, 0x01ff, + 0x6886, 0xa005, 0x0160, 0xa080, 0x001f, 0xa084, 0x03f8, 0x80ac, + 0x20e1, 0x1000, 0x2ea0, 0x2099, 0x020a, 0x53a5, 0x0005, 0x20a9, + 0x000c, 0x20e1, 0x1000, 0x2ea0, 0x2099, 0x020a, 0x53a5, 0xa085, + 0x0001, 0x0ca0, 0x7000, 0xa084, 0xff00, 0xa08c, 0xf000, 0x8007, + 0xa196, 0x0000, 0x1118, 0x0804, 0x6708, 0x0005, 0xa196, 0x2000, + 0x1148, 0x6900, 0xa18e, 0x0001, 0x1118, 0x080c, 0x448f, 0x0ca8, + 0x0039, 0x0c98, 0xa196, 0x8000, 0x1d80, 0x080c, 0x67b4, 0x0c68, + 0x00c6, 0x6a84, 0x82ff, 0x0904, 0x65fd, 0x7110, 0xa18c, 0xff00, + 0x810f, 0xa196, 0x0001, 0x0120, 0xa196, 0x0023, 0x1904, 0x65fd, + 0xa08e, 0x0023, 0x1570, 0x080c, 0x684f, 0x0904, 0x65fd, 0x7124, + 0x610a, 0x7030, 0xa08e, 0x0200, 0x1150, 0x7034, 0xa005, 0x1904, + 0x65fd, 0x2009, 0x0015, 0x080c, 0x864c, 0x0804, 0x65fd, 0xa08e, + 0x0214, 0x0118, 0xa08e, 0x0210, 0x1130, 0x2009, 0x0015, 0x080c, + 0x864c, 0x0804, 0x65fd, 0xa08e, 0x0100, 0x1904, 0x65fd, 0x7034, + 0xa005, 0x1904, 0x65fd, 0x2009, 0x0016, 0x080c, 0x864c, 0x0804, + 0x65fd, 0xa08e, 0x0022, 0x1904, 0x65fd, 0x7030, 0xa08e, 0x0300, + 0x1580, 0x68d4, 0xd0a4, 0x0528, 0xc0b5, 0x68d6, 0x7100, 0xa18c, + 0x00ff, 0x6972, 0x7004, 0x6876, 0x00f6, 0x2079, 0x0100, 0x79e6, + 0x78ea, 0x0006, 0xa084, 0x00ff, 0x0016, 0x2008, 0x080c, 0x2847, + 0x7932, 0x7936, 0x001e, 0x000e, 0x00fe, 0x080c, 0x281d, 0x6952, + 0x703c, 0x00e6, 0x2071, 0x0140, 0x7086, 0x2071, 0xb500, 0x70a6, + 0x00ee, 0x7034, 0xa005, 0x1904, 0x65fd, 0x2009, 0x0017, 0x0804, + 0x65c3, 0xa08e, 0x0400, 0x1158, 0x7034, 0xa005, 0x1904, 0x65fd, + 0x68d4, 0xc0a5, 0x68d6, 0x2009, 0x0030, 0x0804, 0x65c3, 0xa08e, + 0x0500, 0x1140, 0x7034, 0xa005, 0x1904, 0x65fd, 0x2009, 0x0018, + 0x0804, 0x65c3, 0xa08e, 0x2010, 0x1120, 0x2009, 0x0019, 0x0804, + 0x65c3, 0xa08e, 0x2110, 0x1120, 0x2009, 0x001a, 0x0804, 0x65c3, + 0xa08e, 0x5200, 0x1140, 0x7034, 0xa005, 0x1904, 0x65fd, 0x2009, + 0x001b, 0x0804, 0x65c3, 0xa08e, 0x5000, 0x1140, 0x7034, 0xa005, + 0x1904, 0x65fd, 0x2009, 0x001c, 0x0804, 0x65c3, 0xa08e, 0x1300, + 0x1120, 0x2009, 0x0034, 0x0804, 0x65c3, 0xa08e, 0x1200, 0x1140, + 0x7034, 0xa005, 0x1904, 0x65fd, 0x2009, 0x0024, 0x0804, 0x65c3, + 0xa08c, 0xff00, 0xa18e, 0x2400, 0x1118, 0x2009, 0x002d, 0x04d8, + 0xa08c, 0xff00, 0xa18e, 0x5300, 0x1118, 0x2009, 0x002a, 0x0498, + 0xa08e, 0x0f00, 0x1118, 0x2009, 0x0020, 0x0468, 0xa08e, 0x5300, + 0x1108, 0x00d8, 0xa08e, 0x6104, 0x11c0, 0x2011, 0xbb8d, 0x8208, + 0x2204, 0xa082, 0x0004, 0x20a8, 0x95ac, 0x95ac, 0x2011, 0x8015, + 0x211c, 0x8108, 0x0046, 0x2124, 0x080c, 0x3ecc, 0x004e, 0x8108, + 0x1f04, 0x65a6, 0x2009, 0x0023, 0x0070, 0xa08e, 0x6000, 0x1118, + 0x2009, 0x003f, 0x0040, 0xa08e, 0x7800, 0x1118, 0x2009, 0x0045, + 0x0010, 0x2009, 0x001d, 0x0016, 0x2011, 0xbb83, 0x2204, 0x8211, + 0x220c, 0x080c, 0x281d, 0x1598, 0x080c, 0x4f4d, 0x1580, 0x6612, + 0x6516, 0x86ff, 0x01e8, 0x001e, 0x0016, 0xa186, 0x0017, 0x1158, + 0x6870, 0xa606, 0x11a8, 0x6874, 0xa506, 0xa084, 0xff00, 0x1180, + 0x6000, 0xc0f5, 0x6002, 0xa186, 0x0046, 0x1150, 0x6870, 0xa606, + 0x1138, 0x6874, 0xa506, 0xa084, 0xff00, 0x1110, 0x001e, 0x0068, + 0x00c6, 0x080c, 0x85c7, 0x0168, 0x001e, 0x611a, 0x601f, 0x0004, + 0x7120, 0x610a, 0x001e, 0x080c, 0x864c, 0x00ce, 0x0005, 0x001e, + 0x0ce0, 0x00ce, 0x0ce0, 0x00c6, 0x0046, 0x080c, 0x6657, 0x1904, + 0x6654, 0xa28e, 0x0033, 0x11e8, 0x080c, 0x684f, 0x0904, 0x6654, + 0x7124, 0x610a, 0x7030, 0xa08e, 0x0200, 0x1140, 0x7034, 0xa005, + 0x15d8, 0x2009, 0x0015, 0x080c, 0x864c, 0x04b0, 0xa08e, 0x0100, + 0x1598, 0x7034, 0xa005, 0x1580, 0x2009, 0x0016, 0x080c, 0x864c, + 0x0458, 0xa28e, 0x0032, 0x1540, 0x7030, 0xa08e, 0x1400, 0x1520, + 0x2009, 0x0038, 0x0016, 0x2011, 0xbb83, 0x2204, 0x8211, 0x220c, + 0x080c, 0x281d, 0x11c0, 0x080c, 0x4f4d, 0x11a8, 0x6612, 0x6516, + 0x00c6, 0x080c, 0x85c7, 0x0170, 0x001e, 0x611a, 0x080c, 0xa027, + 0x601f, 0x0004, 0x7120, 0x610a, 0x001e, 0x080c, 0x864c, 0x080c, + 0x7173, 0x0010, 0x00ce, 0x001e, 0x004e, 0x00ce, 0x0005, 0x00f6, + 0x00d6, 0x0026, 0x0016, 0x0136, 0x0146, 0x0156, 0x3c00, 0x0006, + 0x2079, 0x0030, 0x2069, 0x0200, 0x080c, 0x1f2d, 0x1590, 0x080c, + 0x1dd2, 0x05e0, 0x04f1, 0x1130, 0x7908, 0xa18c, 0x1fff, 0xa182, + 0x0011, 0x1688, 0x20a9, 0x000c, 0x20e1, 0x0000, 0x2ea0, 0x2099, + 0x020a, 0x53a5, 0x20e1, 0x2000, 0x2001, 0x020a, 0x2004, 0x7a0c, + 0x7808, 0xa080, 0x0007, 0xa084, 0x1ff8, 0x0419, 0x1120, 0xa08a, + 0x0140, 0x1a0c, 0x1515, 0x80ac, 0x20e1, 0x6000, 0x2099, 0x020a, + 0x53a5, 0x20e1, 0x7000, 0x6828, 0x6828, 0x7803, 0x0004, 0xa294, + 0x0070, 0x000e, 0x20e0, 0x015e, 0x014e, 0x013e, 0x001e, 0x002e, + 0x00de, 0x00fe, 0x0005, 0xa016, 0x080c, 0x185e, 0xa085, 0x0001, + 0x0c80, 0x0006, 0x2001, 0x0111, 0x2004, 0xa084, 0x0003, 0x000e, + 0x0005, 0x0046, 0x00e6, 0x00d6, 0x2028, 0x2130, 0xa696, 0x00ff, + 0x1198, 0xa596, 0xfffd, 0x1120, 0x2009, 0x007f, 0x0804, 0x6703, + 0xa596, 0xfffe, 0x1118, 0x2009, 0x007e, 0x04e8, 0xa596, 0xfffc, + 0x1118, 0x2009, 0x0080, 0x04b8, 0x2011, 0x0000, 0x2019, 0xb535, + 0x231c, 0xd3ac, 0x0138, 0x2021, 0x0000, 0x20a9, 0x00ff, 0x2071, + 0xb635, 0x0030, 0x2021, 0x0081, 0x20a9, 0x007e, 0x2071, 0xb6b6, + 0x2e1c, 0x83ff, 0x1128, 0x82ff, 0x1198, 0x2410, 0xc2fd, 0x0080, + 0x2368, 0x6f10, 0x0006, 0x2100, 0xa706, 0x000e, 0x6b14, 0x1120, + 0xa346, 0x1110, 0x2408, 0x0078, 0x87ff, 0x1110, 0x83ff, 0x0d58, + 0x8420, 0x8e70, 0x1f04, 0x66e0, 0x82ff, 0x1118, 0xa085, 0x0001, + 0x0018, 0xc2fc, 0x2208, 0xa006, 0x00de, 0x00ee, 0x004e, 0x0005, + 0xa084, 0x0007, 0x000a, 0x0005, 0x6714, 0x6714, 0x6714, 0x6861, + 0x6714, 0x6715, 0x672a, 0x679f, 0x0005, 0x7110, 0xd1bc, 0x0188, + 0x7120, 0x2160, 0xac8c, 0x0007, 0x1160, 0xac8a, 0xbd00, 0x0248, + 0x685c, 0xac02, 0x1230, 0x7124, 0x610a, 0x2009, 0x0046, 0x080c, + 0x864c, 0x0005, 0x00c6, 0xa484, 0x01ff, 0x0904, 0x677d, 0x7110, + 0xd1bc, 0x1904, 0x677d, 0x2011, 0xbb83, 0x2204, 0x8211, 0x220c, + 0x080c, 0x281d, 0x1904, 0x677d, 0x080c, 0x4f4d, 0x15f0, 0x6612, + 0x6516, 0x6000, 0xd0ec, 0x15c8, 0x6204, 0xa294, 0xff00, 0x8217, + 0xa286, 0x0006, 0x0148, 0x6204, 0xa294, 0x00ff, 0xa286, 0x0006, + 0x11a0, 0xa295, 0x0600, 0x6206, 0x00c6, 0x080c, 0x85c7, 0x001e, + 0x0530, 0x611a, 0x601f, 0x0006, 0x7120, 0x610a, 0x7130, 0x6152, + 0x2009, 0x0044, 0x080c, 0x864c, 0x00c0, 0x00c6, 0x080c, 0x85c7, + 0x001e, 0x0198, 0x611a, 0x601f, 0x0004, 0x7120, 0x610a, 0xa286, + 0x0004, 0x1118, 0x6007, 0x0005, 0x0010, 0x6007, 0x0001, 0x6003, + 0x0001, 0x080c, 0x6cd3, 0x080c, 0x7173, 0x00ce, 0x0005, 0x2001, + 0xb50d, 0x2004, 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x3ecc, + 0x00c6, 0x080c, 0x9ed6, 0x001e, 0x0d80, 0x611a, 0x601f, 0x0006, + 0x7120, 0x610a, 0x7130, 0x6152, 0x6013, 0x0300, 0x6003, 0x0001, + 0x6007, 0x0041, 0x080c, 0x6c8d, 0x080c, 0x7173, 0x08f0, 0x7110, + 0xd1bc, 0x0188, 0x7020, 0x2060, 0xac84, 0x0007, 0x1160, 0xac82, + 0xbd00, 0x0248, 0x685c, 0xac02, 0x1230, 0x7124, 0x610a, 0x2009, + 0x0045, 0x080c, 0x864c, 0x0005, 0x0006, 0x080c, 0x2dbf, 0x000e, + 0x1168, 0x7110, 0xa18c, 0xff00, 0x810f, 0xa18e, 0x0000, 0x1130, + 0xa084, 0x000f, 0xa08a, 0x0006, 0x1208, 0x000b, 0x0005, 0x67cd, + 0x67ce, 0x67cd, 0x67cd, 0x6837, 0x6843, 0x0005, 0x7110, 0xd1bc, + 0x0120, 0x702c, 0xd084, 0x0904, 0x6836, 0x700c, 0x7108, 0x080c, + 0x281d, 0x1904, 0x6836, 0x080c, 0x4f4d, 0x1904, 0x6836, 0x6612, + 0x6516, 0x6204, 0x7110, 0xd1bc, 0x01f8, 0xa28c, 0x00ff, 0xa186, + 0x0004, 0x0118, 0xa186, 0x0006, 0x15c8, 0x00c6, 0x080c, 0x684f, + 0x00ce, 0x0904, 0x6836, 0x00c6, 0x080c, 0x85c7, 0x001e, 0x05f0, + 0x611a, 0x080c, 0xa027, 0x601f, 0x0002, 0x7120, 0x610a, 0x2009, + 0x0088, 0x080c, 0x864c, 0x0490, 0xa28c, 0x00ff, 0xa186, 0x0006, + 0x0160, 0xa186, 0x0004, 0x0148, 0xa294, 0xff00, 0x8217, 0xa286, + 0x0004, 0x0118, 0xa286, 0x0006, 0x1188, 0x00c6, 0x080c, 0x85c7, + 0x001e, 0x01e0, 0x611a, 0x080c, 0xa027, 0x601f, 0x0005, 0x7120, + 0x610a, 0x2009, 0x0088, 0x080c, 0x864c, 0x0080, 0x00c6, 0x080c, + 0x85c7, 0x001e, 0x0158, 0x611a, 0x080c, 0xa027, 0x601f, 0x0004, + 0x7120, 0x610a, 0x2009, 0x0001, 0x080c, 0x864c, 0x0005, 0x7110, + 0xd1bc, 0x0140, 0x00a1, 0x0130, 0x7124, 0x610a, 0x2009, 0x0089, + 0x080c, 0x864c, 0x0005, 0x7110, 0xd1bc, 0x0140, 0x0041, 0x0130, + 0x7124, 0x610a, 0x2009, 0x008a, 0x080c, 0x864c, 0x0005, 0x7020, + 0x2060, 0xac84, 0x0007, 0x1158, 0xac82, 0xbd00, 0x0240, 0x2001, + 0xb517, 0x2004, 0xac02, 0x1218, 0xa085, 0x0001, 0x0005, 0xa006, + 0x0ce8, 0x7110, 0xd1bc, 0x1178, 0x7024, 0x2060, 0xac84, 0x0007, + 0x1150, 0xac82, 0xbd00, 0x0238, 0x685c, 0xac02, 0x1220, 0x2009, + 0x0051, 0x080c, 0x864c, 0x0005, 0x2031, 0x0105, 0x0069, 0x0005, + 0x2031, 0x0206, 0x0049, 0x0005, 0x2031, 0x0207, 0x0029, 0x0005, + 0x2031, 0x0213, 0x0009, 0x0005, 0x00c6, 0x00d6, 0x00f6, 0x7000, + 0xa084, 0xf000, 0xa086, 0xc000, 0x05b0, 0x080c, 0x85c7, 0x0598, + 0x0066, 0x00c6, 0x0046, 0x2011, 0xbb83, 0x2204, 0x8211, 0x220c, + 0x080c, 0x281d, 0x1580, 0x080c, 0x4f4d, 0x1568, 0x6612, 0x6516, + 0x2c00, 0x004e, 0x00ce, 0x601a, 0x080c, 0xa027, 0x080c, 0x15f8, + 0x01f0, 0x2d00, 0x6056, 0x6803, 0x0000, 0x6837, 0x0000, 0x6c3a, + 0xadf8, 0x000f, 0x20a9, 0x000e, 0x2fa0, 0x2e98, 0x53a3, 0x006e, + 0x6612, 0x6007, 0x003e, 0x601f, 0x0001, 0x6003, 0x0001, 0x080c, + 0x6cd3, 0x080c, 0x7173, 0x00fe, 0x00de, 0x00ce, 0x0005, 0x080c, + 0x861d, 0x006e, 0x0cc0, 0x004e, 0x00ce, 0x0cc8, 0x2071, 0xb7f3, + 0x7003, 0x0003, 0x700f, 0x0361, 0xa006, 0x701a, 0x7076, 0x7012, + 0x7017, 0xbd00, 0x7007, 0x0000, 0x7026, 0x702b, 0x7d91, 0x7032, + 0x7037, 0x7df1, 0x703b, 0xffff, 0x703f, 0xffff, 0x7042, 0x7047, + 0x444b, 0x704a, 0x705b, 0x6a2b, 0x2001, 0xb7a1, 0x2003, 0x0003, + 0x2001, 0xb7a3, 0x2003, 0x0100, 0x3a00, 0xa084, 0x0005, 0x706e, + 0x0005, 0x2071, 0xb7f3, 0x1d04, 0x698b, 0x2091, 0x6000, 0x700c, + 0x8001, 0x700e, 0x1518, 0x700f, 0x0361, 0x7007, 0x0001, 0x0126, + 0x2091, 0x8000, 0x7040, 0xa00d, 0x0128, 0x8109, 0x7142, 0x1110, + 0x7044, 0x080f, 0x00c6, 0x2061, 0xb500, 0x6034, 0x00ce, 0xd0cc, + 0x0180, 0x3a00, 0xa084, 0x0005, 0x726c, 0xa216, 0x0150, 0x706e, + 0x2011, 0x8043, 0x2018, 0x080c, 0x3ecc, 0x0018, 0x0126, 0x2091, + 0x8000, 0x7024, 0xa00d, 0x0188, 0x7020, 0x8001, 0x7022, 0x1168, + 0x7023, 0x0009, 0x8109, 0x7126, 0xa186, 0x03e8, 0x1110, 0x7028, + 0x080f, 0x81ff, 0x1110, 0x7028, 0x080f, 0x7030, 0xa00d, 0x0180, + 0x702c, 0x8001, 0x702e, 0x1160, 0x702f, 0x0009, 0x8109, 0x7132, + 0x0128, 0xa184, 0x007f, 0x090c, 0x7e36, 0x0010, 0x7034, 0x080f, + 0x7038, 0xa005, 0x0118, 0x0310, 0x8001, 0x703a, 0x703c, 0xa005, + 0x0118, 0x0310, 0x8001, 0x703e, 0x704c, 0xa00d, 0x0168, 0x7048, + 0x8001, 0x704a, 0x1148, 0x704b, 0x0009, 0x8109, 0x714e, 0x1120, + 0x7150, 0x714e, 0x7058, 0x080f, 0x7018, 0xa00d, 0x01d8, 0x0016, + 0x7074, 0xa00d, 0x0158, 0x7070, 0x8001, 0x7072, 0x1138, 0x7073, + 0x0009, 0x8109, 0x7176, 0x1110, 0x7078, 0x080f, 0x001e, 0x7008, + 0x8001, 0x700a, 0x1138, 0x700b, 0x0009, 0x8109, 0x711a, 0x1110, + 0x701c, 0x080f, 0x012e, 0x7004, 0x0002, 0x69b1, 0x69b2, 0x69ca, + 0x00e6, 0x2071, 0xb7f3, 0x7018, 0xa005, 0x1120, 0x711a, 0x721e, + 0x700b, 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071, 0xb7f3, + 0x701c, 0xa206, 0x1110, 0x701a, 0x701e, 0x000e, 0x00ee, 0x0005, + 0x00e6, 0x2071, 0xb7f3, 0x6088, 0xa102, 0x0208, 0x618a, 0x00ee, + 0x0005, 0x0005, 0x7110, 0x080c, 0x4fa9, 0x1158, 0x6088, 0x8001, + 0x0240, 0x608a, 0x1130, 0x0126, 0x2091, 0x8000, 0x080c, 0x7173, + 0x012e, 0x8108, 0xa182, 0x00ff, 0x0218, 0xa00e, 0x7007, 0x0002, + 0x7112, 0x0005, 0x7014, 0x2060, 0x0126, 0x2091, 0x8000, 0x603c, + 0xa005, 0x0128, 0x8001, 0x603e, 0x1110, 0x080c, 0x9f15, 0x6014, + 0xa005, 0x0500, 0x8001, 0x6016, 0x11e8, 0x611c, 0xa186, 0x0003, + 0x0118, 0xa186, 0x0006, 0x11a0, 0x6010, 0x2068, 0x6854, 0xa08a, + 0x199a, 0x0270, 0xa082, 0x1999, 0x6856, 0xa08a, 0x199a, 0x0210, + 0x2001, 0x1999, 0x8003, 0x800b, 0x810b, 0xa108, 0x6116, 0x0010, + 0x080c, 0x99e5, 0x012e, 0xac88, 0x0018, 0x7116, 0x2001, 0xed00, + 0xa102, 0x0220, 0x7017, 0xbd00, 0x7007, 0x0000, 0x0005, 0x00e6, + 0x2071, 0xb7f3, 0x7027, 0x07d0, 0x7023, 0x0009, 0x00ee, 0x0005, + 0x2001, 0xb7fc, 0x2003, 0x0000, 0x0005, 0x00e6, 0x2071, 0xb7f3, + 0x7132, 0x702f, 0x0009, 0x00ee, 0x0005, 0x2011, 0xb7ff, 0x2013, + 0x0000, 0x0005, 0x00e6, 0x2071, 0xb7f3, 0x711a, 0x721e, 0x700b, + 0x0009, 0x00ee, 0x0005, 0x00c6, 0x0026, 0x7054, 0x8000, 0x7056, + 0x2061, 0xb7a1, 0x6008, 0xa086, 0x0000, 0x0158, 0x7068, 0x6032, + 0x7064, 0x602e, 0x7060, 0x602a, 0x705c, 0x6026, 0x2c10, 0x080c, + 0x1643, 0x002e, 0x00ce, 0x0005, 0x0006, 0x0016, 0x00c6, 0x00d6, + 0x00e6, 0x00f6, 0x080c, 0x68f9, 0x00fe, 0x00ee, 0x00de, 0x00ce, + 0x001e, 0x000e, 0x0005, 0x00e6, 0x2071, 0xb7f3, 0x7176, 0x727a, + 0x7073, 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071, 0xb7f3, + 0x7078, 0xa206, 0x1110, 0x7076, 0x707a, 0x000e, 0x00ee, 0x0005, + 0x00c6, 0x2061, 0xb874, 0x00ce, 0x0005, 0xa184, 0x000f, 0x8003, + 0x8003, 0x8003, 0xa080, 0xb874, 0x2060, 0x0005, 0x6854, 0xa08a, + 0x199a, 0x0210, 0x2001, 0x1999, 0xa005, 0x1150, 0x00c6, 0x2061, + 0xb874, 0x6014, 0x00ce, 0xa005, 0x1138, 0x2001, 0x001e, 0x0020, + 0xa08e, 0xffff, 0x1108, 0xa006, 0x8003, 0x800b, 0x810b, 0xa108, + 0x6116, 0x684c, 0xa08c, 0x00c0, 0xa18e, 0x00c0, 0x05e8, 0xd0b4, + 0x1138, 0xd0bc, 0x1550, 0x2009, 0x0006, 0x080c, 0x6af1, 0x0005, + 0xd0fc, 0x0138, 0xa084, 0x0003, 0x0120, 0xa086, 0x0003, 0x1904, + 0x6aeb, 0x6020, 0xd0d4, 0x0130, 0xc0d4, 0x6022, 0x6860, 0x602a, + 0x685c, 0x602e, 0x2009, 0xb574, 0x2104, 0xd084, 0x0138, 0x87ff, + 0x1120, 0x2009, 0x0042, 0x080c, 0x864c, 0x0005, 0x87ff, 0x1120, + 0x2009, 0x0043, 0x080c, 0x864c, 0x0005, 0xd0fc, 0x0130, 0xa084, + 0x0003, 0x0118, 0xa086, 0x0003, 0x11f0, 0x87ff, 0x1120, 0x2009, + 0x0042, 0x080c, 0x864c, 0x0005, 0xd0fc, 0x0160, 0xa084, 0x0003, + 0xa08e, 0x0002, 0x0148, 0x87ff, 0x1120, 0x2009, 0x0041, 0x080c, + 0x864c, 0x0005, 0x0061, 0x0ce8, 0x87ff, 0x1dd8, 0x2009, 0x0043, + 0x080c, 0x864c, 0x0cb0, 0x2009, 0x0004, 0x0019, 0x0005, 0x2009, + 0x0001, 0x00d6, 0x6010, 0xa0ec, 0xf000, 0x0510, 0x2068, 0x6952, + 0x6800, 0x6012, 0xa186, 0x0001, 0x1188, 0x694c, 0xa18c, 0x8100, + 0xa18e, 0x8100, 0x1158, 0x00c6, 0x2061, 0xb874, 0x6200, 0xd28c, + 0x1120, 0x6204, 0x8210, 0x0208, 0x6206, 0x00ce, 0x080c, 0x5408, + 0x6010, 0xa06d, 0x0076, 0x2039, 0x0000, 0x190c, 0x6a76, 0x007e, + 0x00de, 0x0005, 0x0156, 0x00c6, 0x2061, 0xb874, 0x6000, 0x81ff, + 0x0110, 0xa205, 0x0008, 0xa204, 0x6002, 0x00ce, 0x015e, 0x0005, + 0x6800, 0xd08c, 0x1138, 0x6808, 0xa005, 0x0120, 0x8001, 0x680a, + 0xa085, 0x0001, 0x0005, 0x20a9, 0x0010, 0xa006, 0x8004, 0x8086, + 0x818e, 0x1208, 0xa200, 0x1f04, 0x6b37, 0x8086, 0x818e, 0x0005, + 0x0156, 0x20a9, 0x0010, 0xa005, 0x01b8, 0xa11a, 0x12a8, 0x8213, + 0x818d, 0x0228, 0xa11a, 0x1220, 0x1f04, 0x6b47, 0x0028, 0xa11a, + 0x2308, 0x8210, 0x1f04, 0x6b47, 0x0006, 0x3200, 0xa084, 0xefff, + 0x2080, 0x000e, 0x015e, 0x0005, 0x0006, 0x3200, 0xa085, 0x1000, + 0x0cb8, 0x0126, 0x2091, 0x2800, 0x2079, 0xb7e0, 0x012e, 0x00d6, + 0x2069, 0xb7e0, 0x6803, 0x0005, 0x2069, 0x0004, 0x2d04, 0xa085, + 0x8001, 0x206a, 0x00de, 0x0005, 0x00c6, 0x6027, 0x0001, 0x7804, + 0xa084, 0x0007, 0x0002, 0x6b85, 0x6ba6, 0x6bf9, 0x6b8b, 0x6ba6, + 0x6b85, 0x6b83, 0x6b83, 0x080c, 0x1515, 0x080c, 0x6a10, 0x080c, + 0x7173, 0x00ce, 0x0005, 0x62c0, 0x82ff, 0x1110, 0x00ce, 0x0005, + 0x2011, 0x4adc, 0x080c, 0x699c, 0x7828, 0xa092, 0x00c8, 0x1228, + 0x8000, 0x782a, 0x080c, 0x4b16, 0x0c88, 0x080c, 0x4adc, 0x7807, + 0x0003, 0x7827, 0x0000, 0x782b, 0x0000, 0x0c40, 0x080c, 0x6a10, + 0x3c00, 0x0006, 0x2011, 0x0209, 0x20e1, 0x4000, 0x2214, 0x000e, + 0x20e0, 0x82ff, 0x0178, 0x62c0, 0x82ff, 0x1160, 0x782b, 0x0000, + 0x7824, 0xa065, 0x090c, 0x1515, 0x2009, 0x0013, 0x080c, 0x864c, + 0x00ce, 0x0005, 0x3900, 0xa082, 0xb92c, 0x1210, 0x080c, 0x8332, + 0x00c6, 0x7824, 0xa065, 0x090c, 0x1515, 0x7804, 0xa086, 0x0004, + 0x0904, 0x6c39, 0x7828, 0xa092, 0x2710, 0x1230, 0x8000, 0x782a, + 0x00ce, 0x080c, 0x7d6d, 0x0c20, 0x6104, 0xa186, 0x0003, 0x1188, + 0x00e6, 0x2071, 0xb500, 0x70e0, 0x00ee, 0xd08c, 0x0150, 0x00c6, + 0x00e6, 0x2061, 0x0100, 0x2071, 0xb500, 0x080c, 0x4b1f, 0x00ee, + 0x00ce, 0x080c, 0xb444, 0x2009, 0x0014, 0x080c, 0x864c, 0x00ce, + 0x0838, 0x2001, 0xb7fc, 0x2003, 0x0000, 0x62c0, 0x82ff, 0x1160, + 0x782b, 0x0000, 0x7824, 0xa065, 0x090c, 0x1515, 0x2009, 0x0013, + 0x080c, 0x86a0, 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x3900, 0xa082, + 0xb92c, 0x1210, 0x080c, 0x8332, 0x7824, 0xa005, 0x090c, 0x1515, + 0x781c, 0xa06d, 0x090c, 0x1515, 0x6800, 0xc0dc, 0x6802, 0x7924, + 0x2160, 0x080c, 0x861d, 0x693c, 0x81ff, 0x090c, 0x1515, 0x8109, + 0x693e, 0x6854, 0xa015, 0x0110, 0x7a1e, 0x0010, 0x7918, 0x791e, + 0x7807, 0x0000, 0x7827, 0x0000, 0x00de, 0x00ce, 0x080c, 0x7173, + 0x0888, 0x6104, 0xa186, 0x0002, 0x0128, 0xa186, 0x0004, 0x0110, + 0x0804, 0x6bd2, 0x7808, 0xac06, 0x0904, 0x6bd2, 0x080c, 0x7090, + 0x080c, 0x6cd3, 0x00ce, 0x080c, 0x7173, 0x0804, 0x6bc0, 0x00c6, + 0x6027, 0x0002, 0x62c8, 0x60c4, 0xa205, 0x1178, 0x793c, 0xa1e5, + 0x0000, 0x0130, 0x2009, 0x0049, 0x080c, 0x864c, 0x00ce, 0x0005, + 0x2011, 0xb7ff, 0x2013, 0x0000, 0x0cc8, 0x3908, 0xa192, 0xb92c, + 0x1210, 0x080c, 0x8332, 0x793c, 0x81ff, 0x0d90, 0x7944, 0xa192, + 0x7530, 0x12b8, 0x8108, 0x7946, 0x793c, 0xa188, 0x0007, 0x210c, + 0xa18e, 0x0006, 0x1138, 0x6014, 0xa084, 0x0184, 0xa085, 0x0012, + 0x6016, 0x08e0, 0x6014, 0xa084, 0x0184, 0xa085, 0x0016, 0x6016, + 0x08a8, 0x7848, 0xc085, 0x784a, 0x0888, 0x0006, 0x0016, 0x00c6, + 0x0126, 0x2091, 0x8000, 0x600f, 0x0000, 0x2c08, 0x2061, 0xb7e0, + 0x6020, 0x8000, 0x6022, 0x6010, 0xa005, 0x0148, 0xa080, 0x0003, + 0x2102, 0x6112, 0x012e, 0x00ce, 0x001e, 0x000e, 0x0005, 0x6116, + 0x6112, 0x0cc0, 0x00d6, 0x2069, 0xb7e0, 0x6000, 0xd0d4, 0x0168, + 0x6820, 0x8000, 0x6822, 0xa086, 0x0001, 0x1110, 0x2c00, 0x681e, + 0x6804, 0xa084, 0x0007, 0x0804, 0x7179, 0xc0d5, 0x6002, 0x6818, + 0xa005, 0x0158, 0x6056, 0x605b, 0x0000, 0x0006, 0x2c00, 0x681a, + 0x00de, 0x685a, 0x2069, 0xb7e0, 0x0c18, 0x6056, 0x605a, 0x2c00, + 0x681a, 0x681e, 0x08e8, 0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, + 0x8000, 0x600f, 0x0000, 0x2c08, 0x2061, 0xb7e0, 0x6020, 0x8000, + 0x6022, 0x6008, 0xa005, 0x0148, 0xa080, 0x0003, 0x2102, 0x610a, + 0x012e, 0x00ce, 0x001e, 0x000e, 0x0005, 0x610e, 0x610a, 0x0cc0, + 0x00c6, 0x600f, 0x0000, 0x2c08, 0x2061, 0xb7e0, 0x6034, 0xa005, + 0x0130, 0xa080, 0x0003, 0x2102, 0x6136, 0x00ce, 0x0005, 0x613a, + 0x6136, 0x0cd8, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066, + 0x0056, 0x0036, 0x0026, 0x0016, 0x0006, 0x0126, 0xa02e, 0x2071, + 0xb7e0, 0x7638, 0x2660, 0x2678, 0x2091, 0x8000, 0x8cff, 0x0904, + 0x6d7b, 0x6018, 0xa080, 0x0028, 0x2004, 0xa206, 0x1904, 0x6d76, + 0x87ff, 0x0120, 0x6050, 0xa106, 0x1904, 0x6d76, 0x703c, 0xac06, + 0x1190, 0x0036, 0x2019, 0x0001, 0x080c, 0x7fe4, 0x7033, 0x0000, + 0x703f, 0x0000, 0x7043, 0x0000, 0x7047, 0x0000, 0x704b, 0x0000, + 0x003e, 0x2029, 0x0001, 0x7038, 0xac36, 0x1110, 0x660c, 0x763a, + 0x7034, 0xac36, 0x1140, 0x2c00, 0xaf36, 0x0118, 0x2f00, 0x7036, + 0x0010, 0x7037, 0x0000, 0x660c, 0x0066, 0x2c00, 0xaf06, 0x0110, + 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0x9c5a, 0x01c8, + 0x6010, 0x2068, 0x601c, 0xa086, 0x0003, 0x1580, 0x6837, 0x0103, + 0x6b4a, 0x6847, 0x0000, 0x0016, 0x0036, 0x0076, 0x080c, 0x9ecc, + 0x080c, 0xb380, 0x080c, 0x5408, 0x007e, 0x003e, 0x001e, 0x080c, + 0x9e11, 0x080c, 0x9e1d, 0x00ce, 0x0804, 0x6d16, 0x2c78, 0x600c, + 0x2060, 0x0804, 0x6d16, 0x85ff, 0x0120, 0x0036, 0x080c, 0x7230, + 0x003e, 0x012e, 0x000e, 0x001e, 0x002e, 0x003e, 0x005e, 0x006e, + 0x007e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601c, 0xa086, + 0x0006, 0x1158, 0x0016, 0x0036, 0x0076, 0x080c, 0xb380, 0x080c, + 0xb099, 0x007e, 0x003e, 0x001e, 0x08a0, 0x601c, 0xa086, 0x000a, + 0x0904, 0x6d60, 0x0804, 0x6d5e, 0x0006, 0x0066, 0x00c6, 0x00d6, + 0x00f6, 0x2031, 0x0000, 0x0126, 0x2091, 0x8000, 0x2079, 0xb7e0, + 0x7838, 0xa065, 0x0568, 0x600c, 0x0006, 0x600f, 0x0000, 0x783c, + 0xac06, 0x1180, 0x0036, 0x2019, 0x0001, 0x080c, 0x7fe4, 0x7833, + 0x0000, 0x783f, 0x0000, 0x7843, 0x0000, 0x7847, 0x0000, 0x784b, + 0x0000, 0x003e, 0x080c, 0x9c5a, 0x0178, 0x6010, 0x2068, 0x601c, + 0xa086, 0x0003, 0x11b0, 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, + 0x080c, 0x5408, 0x080c, 0x9e11, 0x080c, 0x9e1d, 0x000e, 0x0888, + 0x7e3a, 0x7e36, 0x012e, 0x00fe, 0x00de, 0x00ce, 0x006e, 0x000e, + 0x0005, 0x601c, 0xa086, 0x0006, 0x1118, 0x080c, 0xb099, 0x0c60, + 0x601c, 0xa086, 0x000a, 0x0d08, 0x08f0, 0x0016, 0x0026, 0x0086, + 0x2041, 0x0000, 0x0099, 0x080c, 0x6ec3, 0x008e, 0x002e, 0x001e, + 0x0005, 0x00f6, 0x0126, 0x2079, 0xb7e0, 0x2091, 0x8000, 0x080c, + 0x6f50, 0x080c, 0x6fc2, 0x012e, 0x00fe, 0x0005, 0x00f6, 0x00e6, + 0x00d6, 0x00c6, 0x0066, 0x0016, 0x0006, 0x0126, 0x2091, 0x8000, + 0x2071, 0xb7e0, 0x7614, 0x2660, 0x2678, 0x8cff, 0x0904, 0x6e99, + 0x6018, 0xa080, 0x0028, 0x2004, 0xa206, 0x1904, 0x6e94, 0x88ff, + 0x0120, 0x6050, 0xa106, 0x1904, 0x6e94, 0x7024, 0xac06, 0x1538, + 0x2069, 0x0100, 0x68c0, 0xa005, 0x01f0, 0x080c, 0x6a10, 0x080c, + 0x7d7a, 0x68c3, 0x0000, 0x080c, 0x824d, 0x7027, 0x0000, 0x0036, + 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, 0x0120, 0x6803, 0x0100, + 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, + 0x0001, 0x003e, 0x0020, 0x6003, 0x0009, 0x630a, 0x04e8, 0x7014, + 0xac36, 0x1110, 0x660c, 0x7616, 0x7010, 0xac36, 0x1140, 0x2c00, + 0xaf36, 0x0118, 0x2f00, 0x7012, 0x0010, 0x7013, 0x0000, 0x660c, + 0x0066, 0x2c00, 0xaf06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, + 0x0000, 0x6010, 0x2068, 0x080c, 0x9c5a, 0x01b8, 0x601c, 0xa086, + 0x0003, 0x1540, 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, 0x0016, + 0x0036, 0x0086, 0x080c, 0x9ecc, 0x080c, 0xb380, 0x080c, 0x5408, + 0x008e, 0x003e, 0x001e, 0x080c, 0x9e11, 0x080c, 0x9e1d, 0x080c, + 0x811e, 0x00ce, 0x0804, 0x6e1d, 0x2c78, 0x600c, 0x2060, 0x0804, + 0x6e1d, 0x012e, 0x000e, 0x001e, 0x006e, 0x00ce, 0x00de, 0x00ee, + 0x00fe, 0x0005, 0x601c, 0xa086, 0x0006, 0x1158, 0x0016, 0x0036, + 0x0086, 0x080c, 0xb380, 0x080c, 0xb099, 0x008e, 0x003e, 0x001e, + 0x08e0, 0x601c, 0xa086, 0x0002, 0x1128, 0x6004, 0xa086, 0x0085, + 0x0908, 0x0898, 0x601c, 0xa086, 0x0005, 0x1978, 0x6004, 0xa086, + 0x0085, 0x0d20, 0x0850, 0x00c6, 0x0006, 0x0126, 0x2091, 0x8000, + 0xa280, 0xb635, 0x2004, 0xa065, 0x0904, 0x6f4c, 0x00f6, 0x00e6, + 0x00d6, 0x0066, 0x2071, 0xb7e0, 0x6654, 0x7018, 0xac06, 0x1108, + 0x761a, 0x701c, 0xac06, 0x1130, 0x86ff, 0x1118, 0x7018, 0x701e, + 0x0008, 0x761e, 0x6058, 0xa07d, 0x0108, 0x7e56, 0xa6ed, 0x0000, + 0x0110, 0x2f00, 0x685a, 0x6057, 0x0000, 0x605b, 0x0000, 0x6000, + 0xc0d4, 0xc0dc, 0x6002, 0x080c, 0x4ed4, 0x0904, 0x6f48, 0x7624, + 0x86ff, 0x05e8, 0xa680, 0x0004, 0x2004, 0xad06, 0x15c0, 0x00d6, + 0x2069, 0x0100, 0x68c0, 0xa005, 0x0548, 0x080c, 0x6a10, 0x080c, + 0x7d7a, 0x68c3, 0x0000, 0x080c, 0x824d, 0x7027, 0x0000, 0x0036, + 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, 0x0120, 0x6803, 0x0100, + 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, + 0x0001, 0x003e, 0x00de, 0x00c6, 0x603c, 0xa005, 0x0110, 0x8001, + 0x603e, 0x2660, 0x080c, 0x9e1d, 0x00ce, 0x0048, 0x00de, 0x00c6, + 0x2660, 0x6003, 0x0009, 0x630a, 0x00ce, 0x0804, 0x6ef3, 0x8dff, + 0x0158, 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, 0x080c, 0x9ecc, + 0x080c, 0xb380, 0x080c, 0x5408, 0x080c, 0x811e, 0x0804, 0x6ef3, + 0x006e, 0x00de, 0x00ee, 0x00fe, 0x012e, 0x000e, 0x00ce, 0x0005, + 0x0006, 0x0066, 0x00c6, 0x00d6, 0x2031, 0x0000, 0x7814, 0xa065, + 0x0904, 0x6fa2, 0x600c, 0x0006, 0x600f, 0x0000, 0x7824, 0xac06, + 0x1540, 0x2069, 0x0100, 0x68c0, 0xa005, 0x01f0, 0x080c, 0x6a10, + 0x080c, 0x7d7a, 0x68c3, 0x0000, 0x080c, 0x824d, 0x7827, 0x0000, + 0x0036, 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, 0x0120, 0x6803, + 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, + 0x6827, 0x0001, 0x003e, 0x0028, 0x6003, 0x0009, 0x630a, 0x2c30, + 0x00b0, 0x6010, 0x2068, 0x080c, 0x9c5a, 0x0168, 0x601c, 0xa086, + 0x0003, 0x11b8, 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, 0x080c, + 0x5408, 0x080c, 0x9e11, 0x080c, 0x9e1d, 0x080c, 0x811e, 0x000e, + 0x0804, 0x6f57, 0x7e16, 0x7e12, 0x00de, 0x00ce, 0x006e, 0x000e, + 0x0005, 0x601c, 0xa086, 0x0006, 0x1118, 0x080c, 0xb099, 0x0c58, + 0x601c, 0xa086, 0x0002, 0x1128, 0x6004, 0xa086, 0x0085, 0x09d0, + 0x0c10, 0x601c, 0xa086, 0x0005, 0x19f0, 0x6004, 0xa086, 0x0085, + 0x0d60, 0x08c8, 0x0006, 0x0066, 0x00c6, 0x00d6, 0x7818, 0xa065, + 0x0904, 0x7028, 0x6054, 0x0006, 0x6057, 0x0000, 0x605b, 0x0000, + 0x6000, 0xc0d4, 0xc0dc, 0x6002, 0x080c, 0x4ed4, 0x0904, 0x7025, + 0x7e24, 0x86ff, 0x05e8, 0xa680, 0x0004, 0x2004, 0xad06, 0x15c0, + 0x00d6, 0x2069, 0x0100, 0x68c0, 0xa005, 0x0548, 0x080c, 0x6a10, + 0x080c, 0x7d7a, 0x68c3, 0x0000, 0x080c, 0x824d, 0x7827, 0x0000, + 0x0036, 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, 0x0120, 0x6803, + 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, + 0x6827, 0x0001, 0x003e, 0x00de, 0x00c6, 0x603c, 0xa005, 0x0110, + 0x8001, 0x603e, 0x2660, 0x080c, 0x9e1d, 0x00ce, 0x0048, 0x00de, + 0x00c6, 0x2660, 0x6003, 0x0009, 0x630a, 0x00ce, 0x0804, 0x6fd4, + 0x8dff, 0x0138, 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, 0x080c, + 0x5408, 0x080c, 0x811e, 0x0804, 0x6fd4, 0x000e, 0x0804, 0x6fc7, + 0x781e, 0x781a, 0x00de, 0x00ce, 0x006e, 0x000e, 0x0005, 0x00e6, + 0x00d6, 0x0066, 0x6000, 0xd0dc, 0x01a0, 0x604c, 0xa06d, 0x0188, + 0x6848, 0xa606, 0x1170, 0x2071, 0xb7e0, 0x7024, 0xa035, 0x0148, + 0xa080, 0x0004, 0x2004, 0xad06, 0x1120, 0x6000, 0xc0dc, 0x6002, + 0x0021, 0x006e, 0x00de, 0x00ee, 0x0005, 0x00f6, 0x2079, 0x0100, + 0x78c0, 0xa005, 0x1138, 0x00c6, 0x2660, 0x6003, 0x0009, 0x630a, + 0x00ce, 0x04a0, 0x080c, 0x7d7a, 0x78c3, 0x0000, 0x080c, 0x824d, + 0x7027, 0x0000, 0x0036, 0x2079, 0x0140, 0x7b04, 0xa384, 0x1000, + 0x0120, 0x7803, 0x0100, 0x7803, 0x0000, 0x2079, 0x0100, 0x7824, + 0xd084, 0x0110, 0x7827, 0x0001, 0x080c, 0x824d, 0x003e, 0x080c, + 0x4ed4, 0x00c6, 0x603c, 0xa005, 0x0110, 0x8001, 0x603e, 0x2660, + 0x080c, 0x861d, 0x00ce, 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, + 0x080c, 0x9ecc, 0x080c, 0x5408, 0x080c, 0x811e, 0x00fe, 0x0005, + 0x00e6, 0x00c6, 0x2071, 0xb7e0, 0x7004, 0xa084, 0x0007, 0x0002, + 0x70a2, 0x70a5, 0x70bb, 0x70d4, 0x7111, 0x70a2, 0x70a0, 0x70a0, + 0x080c, 0x1515, 0x00ce, 0x00ee, 0x0005, 0x7024, 0xa065, 0x0148, + 0x7020, 0x8001, 0x7022, 0x600c, 0xa015, 0x0150, 0x7216, 0x600f, + 0x0000, 0x7007, 0x0000, 0x7027, 0x0000, 0x00ce, 0x00ee, 0x0005, + 0x7216, 0x7212, 0x0cb0, 0x6018, 0x2060, 0x080c, 0x4ed4, 0x6000, + 0xc0dc, 0x6002, 0x7020, 0x8001, 0x7022, 0x0120, 0x6054, 0xa015, + 0x0140, 0x721e, 0x7007, 0x0000, 0x7027, 0x0000, 0x00ce, 0x00ee, + 0x0005, 0x7218, 0x721e, 0x0cb0, 0x7024, 0xa065, 0x05b8, 0x700c, + 0xac06, 0x1160, 0x080c, 0x811e, 0x600c, 0xa015, 0x0120, 0x720e, + 0x600f, 0x0000, 0x0448, 0x720e, 0x720a, 0x0430, 0x7014, 0xac06, + 0x1160, 0x080c, 0x811e, 0x600c, 0xa015, 0x0120, 0x7216, 0x600f, + 0x0000, 0x00d0, 0x7216, 0x7212, 0x00b8, 0x601c, 0xa086, 0x0003, + 0x1198, 0x6018, 0x2060, 0x080c, 0x4ed4, 0x6000, 0xc0dc, 0x6002, + 0x080c, 0x811e, 0x701c, 0xa065, 0x0138, 0x6054, 0xa015, 0x0110, + 0x721e, 0x0010, 0x7218, 0x721e, 0x7027, 0x0000, 0x00ce, 0x00ee, + 0x0005, 0x7024, 0xa065, 0x0140, 0x080c, 0x811e, 0x600c, 0xa015, + 0x0150, 0x720e, 0x600f, 0x0000, 0x080c, 0x824d, 0x7027, 0x0000, + 0x00ce, 0x00ee, 0x0005, 0x720e, 0x720a, 0x0cb0, 0x00d6, 0x2069, + 0xb7e0, 0x6830, 0xa084, 0x0003, 0x0002, 0x7133, 0x7135, 0x7159, + 0x7131, 0x080c, 0x1515, 0x00de, 0x0005, 0x00c6, 0x6840, 0xa086, + 0x0001, 0x01b8, 0x683c, 0xa065, 0x0130, 0x600c, 0xa015, 0x0170, + 0x6a3a, 0x600f, 0x0000, 0x6833, 0x0000, 0x683f, 0x0000, 0x2011, + 0xb7ff, 0x2013, 0x0000, 0x00ce, 0x00de, 0x0005, 0x683a, 0x6836, + 0x0c90, 0x6843, 0x0000, 0x6838, 0xa065, 0x0d68, 0x6003, 0x0003, + 0x0c50, 0x00c6, 0x6843, 0x0000, 0x6847, 0x0000, 0x684b, 0x0000, + 0x683c, 0xa065, 0x0168, 0x600c, 0xa015, 0x0130, 0x6a3a, 0x600f, + 0x0000, 0x683f, 0x0000, 0x0020, 0x683f, 0x0000, 0x683a, 0x6836, + 0x00ce, 0x00de, 0x0005, 0x00d6, 0x2069, 0xb7e0, 0x6804, 0xa084, + 0x0007, 0x0002, 0x7184, 0x7220, 0x7220, 0x7220, 0x7220, 0x7222, + 0x7182, 0x7182, 0x080c, 0x1515, 0x6820, 0xa005, 0x1110, 0x00de, + 0x0005, 0x00c6, 0x680c, 0xa065, 0x0150, 0x6807, 0x0004, 0x6826, + 0x682b, 0x0000, 0x080c, 0x7272, 0x00ce, 0x00de, 0x0005, 0x6814, + 0xa065, 0x0150, 0x6807, 0x0001, 0x6826, 0x682b, 0x0000, 0x080c, + 0x7272, 0x00ce, 0x00de, 0x0005, 0x00e6, 0x0036, 0x6a1c, 0xa2f5, + 0x0000, 0x0904, 0x721c, 0x704c, 0xa00d, 0x0118, 0x7088, 0xa005, + 0x01a0, 0x7054, 0xa075, 0x0120, 0xa20e, 0x0904, 0x721c, 0x0028, + 0x6818, 0xa20e, 0x0904, 0x721c, 0x2070, 0x704c, 0xa00d, 0x0d88, + 0x7088, 0xa005, 0x1d70, 0x2e00, 0x681e, 0x733c, 0x7038, 0xa302, + 0x1e40, 0x080c, 0x85f4, 0x0904, 0x721c, 0x8318, 0x733e, 0x6112, + 0x2e10, 0x621a, 0xa180, 0x0014, 0x2004, 0xa084, 0x00ff, 0x605a, + 0xa180, 0x0014, 0x2003, 0x0000, 0xa180, 0x0015, 0x2004, 0xa08a, + 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x801b, 0x831b, 0xa318, + 0x6316, 0x003e, 0x00f6, 0x2c78, 0x71a0, 0x2001, 0xb535, 0x2004, + 0xd0ac, 0x1110, 0xd1bc, 0x0150, 0x7100, 0xd1f4, 0x0120, 0x7114, + 0xa18c, 0x00ff, 0x0040, 0x2009, 0x0000, 0x0028, 0xa1e0, 0x2dc4, + 0x2c0d, 0xa18c, 0x00ff, 0x2061, 0x0100, 0x619a, 0x080c, 0x78a2, + 0x7300, 0xc3dd, 0x7302, 0x6807, 0x0002, 0x2f18, 0x6b26, 0x682b, + 0x0000, 0x781f, 0x0003, 0x7803, 0x0001, 0x7807, 0x0040, 0x00fe, + 0x00ee, 0x00ce, 0x00de, 0x0005, 0x003e, 0x00ee, 0x00ce, 0x0cd0, + 0x00de, 0x0005, 0x00c6, 0x680c, 0xa065, 0x0138, 0x6807, 0x0004, + 0x6826, 0x682b, 0x0000, 0x080c, 0x7272, 0x00ce, 0x00de, 0x0005, + 0x00f6, 0x00d6, 0x2069, 0xb7e0, 0x6830, 0xa086, 0x0000, 0x11d0, + 0x2001, 0xb50c, 0x200c, 0xd1bc, 0x1560, 0x6838, 0xa07d, 0x0190, + 0x6833, 0x0001, 0x683e, 0x6847, 0x0000, 0x684b, 0x0000, 0x0126, + 0x00f6, 0x2091, 0x2400, 0x002e, 0x080c, 0x2021, 0x1130, 0x012e, + 0x080c, 0x7beb, 0x00de, 0x00fe, 0x0005, 0x012e, 0xe000, 0x6843, + 0x0000, 0x7803, 0x0002, 0x780c, 0xa015, 0x0140, 0x6a3a, 0x780f, + 0x0000, 0x6833, 0x0000, 0x683f, 0x0000, 0x0c60, 0x683a, 0x6836, + 0x0cc0, 0xc1bc, 0x2102, 0x0066, 0x2031, 0x0001, 0x080c, 0x5b51, + 0x006e, 0x0858, 0x601c, 0xa084, 0x000f, 0x000b, 0x0005, 0x7280, + 0x7285, 0x7743, 0x785f, 0x7285, 0x7743, 0x785f, 0x7280, 0x7285, + 0x080c, 0x7090, 0x080c, 0x7173, 0x0005, 0x0156, 0x0136, 0x0146, + 0x00c6, 0x00f6, 0x6004, 0xa08a, 0x0080, 0x1a0c, 0x1515, 0x6118, + 0x2178, 0x79a0, 0x2011, 0xb535, 0x2214, 0xd2ac, 0x1110, 0xd1bc, + 0x0150, 0x7900, 0xd1f4, 0x0120, 0x7914, 0xa18c, 0x00ff, 0x0040, + 0x2009, 0x0000, 0x0028, 0xa1f8, 0x2dc4, 0x2f0d, 0xa18c, 0x00ff, + 0x2c78, 0x2061, 0x0100, 0x619a, 0xa08a, 0x0040, 0x1a04, 0x72f9, + 0x0033, 0x00fe, 0x00ce, 0x014e, 0x013e, 0x015e, 0x0005, 0x73a8, + 0x73f3, 0x7420, 0x74ed, 0x751b, 0x7523, 0x7549, 0x755a, 0x756b, + 0x7573, 0x7589, 0x7573, 0x75ea, 0x755a, 0x760b, 0x7613, 0x756b, + 0x7613, 0x7624, 0x72f7, 0x72f7, 0x72f7, 0x72f7, 0x72f7, 0x72f7, + 0x72f7, 0x72f7, 0x72f7, 0x72f7, 0x72f7, 0x7e85, 0x7eaa, 0x7ebf, + 0x7ee2, 0x7f03, 0x7549, 0x72f7, 0x7549, 0x7573, 0x72f7, 0x7420, + 0x74ed, 0x72f7, 0x834f, 0x7573, 0x72f7, 0x836f, 0x7573, 0x72f7, + 0x756b, 0x73a1, 0x730c, 0x72f7, 0x8394, 0x8409, 0x84e0, 0x72f7, + 0x84f1, 0x7544, 0x850d, 0x72f7, 0x7f18, 0x8568, 0x72f7, 0x080c, + 0x1515, 0x2100, 0x0033, 0x00fe, 0x00ce, 0x014e, 0x013e, 0x015e, + 0x0005, 0x730a, 0x730a, 0x730a, 0x7340, 0x735e, 0x7374, 0x730a, + 0x730a, 0x730a, 0x080c, 0x1515, 0x00d6, 0x20a1, 0x020b, 0x080c, + 0x7641, 0x7810, 0x2068, 0x20a3, 0x2414, 0x20a3, 0x0018, 0x20a3, + 0x0800, 0x683c, 0x20a2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x6850, 0x20a2, 0x6854, 0x20a2, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0018, 0x080c, 0x7d67, 0x00de, + 0x0005, 0x00d6, 0x7818, 0x2068, 0x68a0, 0x2069, 0xb500, 0x6ad4, + 0xd2ac, 0x1110, 0xd0bc, 0x0110, 0xa085, 0x0001, 0x00de, 0x0005, + 0x00d6, 0x20a1, 0x020b, 0x080c, 0x7641, 0x20a3, 0x0500, 0x20a3, + 0x0000, 0x7810, 0xa0e8, 0x000f, 0x6808, 0x20a2, 0x680c, 0x20a2, + 0x6810, 0x20a2, 0x6814, 0x20a2, 0x6818, 0x20a2, 0x681c, 0x20a2, + 0x60c3, 0x0010, 0x080c, 0x7d67, 0x00de, 0x0005, 0x0156, 0x0146, + 0x20a1, 0x020b, 0x080c, 0x7641, 0x20a3, 0x7800, 0x20a3, 0x0000, + 0x7808, 0x8007, 0x20a2, 0x20a3, 0x0000, 0x60c3, 0x0008, 0x080c, + 0x7d67, 0x014e, 0x015e, 0x0005, 0x0156, 0x0146, 0x20a1, 0x020b, + 0x080c, 0x76dd, 0x20a3, 0x0200, 0x20a3, 0x0000, 0x20a3, 0xdf10, + 0x20a3, 0x0034, 0x2099, 0xb505, 0x20a9, 0x0004, 0x53a6, 0x2099, + 0xb501, 0x20a9, 0x0004, 0x53a6, 0x2099, 0xb7c6, 0x20a9, 0x001a, + 0x3304, 0x8007, 0x20a2, 0x9398, 0x1f04, 0x7390, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x60c3, 0x004c, 0x080c, 0x7d67, 0x014e, 0x015e, + 0x0005, 0x2001, 0xb515, 0x2004, 0x609a, 0x080c, 0x7d67, 0x0005, + 0x20a1, 0x020b, 0x080c, 0x7641, 0x20a3, 0x5200, 0x20a3, 0x0000, + 0x00d6, 0x2069, 0xb552, 0x6804, 0xd084, 0x0150, 0x6828, 0x20a3, + 0x0000, 0x0016, 0x080c, 0x2831, 0x21a2, 0x001e, 0x00de, 0x0028, + 0x00de, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a9, 0x0004, 0x2099, + 0xb505, 0x53a6, 0x20a9, 0x0004, 0x2099, 0xb501, 0x53a6, 0x2001, + 0xb535, 0x2004, 0xd0ac, 0x1138, 0x7818, 0xa080, 0x0028, 0x2004, + 0xa082, 0x007f, 0x0238, 0x2001, 0xb51c, 0x20a6, 0x2001, 0xb51d, + 0x20a6, 0x0040, 0x20a3, 0x0000, 0x2001, 0xb515, 0x2004, 0xa084, + 0x00ff, 0x20a2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x001c, + 0x080c, 0x7d67, 0x0005, 0x20a1, 0x020b, 0x080c, 0x7641, 0x20a3, + 0x0500, 0x20a3, 0x0000, 0x2001, 0xb535, 0x2004, 0xd0ac, 0x1138, + 0x7818, 0xa080, 0x0028, 0x2004, 0xa082, 0x007f, 0x0238, 0x2001, + 0xb51c, 0x20a6, 0x2001, 0xb51d, 0x20a6, 0x0040, 0x20a3, 0x0000, + 0x2001, 0xb515, 0x2004, 0xa084, 0x00ff, 0x20a2, 0x20a9, 0x0004, + 0x2099, 0xb505, 0x53a6, 0x60c3, 0x0010, 0x080c, 0x7d67, 0x0005, + 0x20a1, 0x020b, 0x080c, 0x7641, 0x00c6, 0x7818, 0x2060, 0x2001, + 0x0000, 0x080c, 0x5313, 0x00ce, 0x7818, 0xa080, 0x0028, 0x2004, + 0xa086, 0x007e, 0x1130, 0x20a3, 0x0400, 0x620c, 0xc2b4, 0x620e, + 0x0010, 0x20a3, 0x0300, 0x20a3, 0x0000, 0x7818, 0xa080, 0x0028, + 0x2004, 0xa086, 0x007e, 0x1904, 0x74af, 0x2001, 0xb535, 0x2004, + 0xd0a4, 0x01c8, 0x2099, 0xb78e, 0x33a6, 0x9398, 0x20a3, 0x0000, + 0x9398, 0x3304, 0xa084, 0x2000, 0x20a2, 0x9398, 0x33a6, 0x9398, + 0x20a3, 0x0000, 0x9398, 0x2001, 0x2710, 0x20a2, 0x9398, 0x33a6, + 0x9398, 0x33a6, 0x00d0, 0x2099, 0xb78e, 0x33a6, 0x9398, 0x33a6, + 0x9398, 0x3304, 0x080c, 0x5acf, 0x1118, 0xa084, 0x37ff, 0x0010, + 0xa084, 0x3fff, 0x20a2, 0x9398, 0x33a6, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a9, 0x0004, 0x2099, + 0xb505, 0x53a6, 0x20a9, 0x0004, 0x2099, 0xb501, 0x53a6, 0x20a9, + 0x0008, 0x20a3, 0x0000, 0x1f04, 0x7489, 0x20a9, 0x0008, 0x20a3, + 0x0000, 0x1f04, 0x748f, 0x2099, 0xb796, 0x3304, 0xc0dd, 0x20a2, + 0x2001, 0xb572, 0x2004, 0xd0e4, 0x0158, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x9398, 0x9398, 0x9398, 0x33a6, 0x20a9, 0x0004, 0x0010, + 0x20a9, 0x0007, 0x20a3, 0x0000, 0x1f04, 0x74aa, 0x0468, 0x2001, + 0xb535, 0x2004, 0xd0a4, 0x0140, 0x2001, 0xb78f, 0x2004, 0x60e3, + 0x0000, 0x080c, 0x2872, 0x60e2, 0x2099, 0xb78e, 0x20a9, 0x0008, + 0x53a6, 0x20a9, 0x0004, 0x2099, 0xb505, 0x53a6, 0x20a9, 0x0004, + 0x2099, 0xb501, 0x53a6, 0x20a9, 0x0008, 0x20a3, 0x0000, 0x1f04, + 0x74cd, 0x20a9, 0x0008, 0x20a3, 0x0000, 0x1f04, 0x74d3, 0x2099, + 0xb796, 0x20a9, 0x0008, 0x53a6, 0x20a9, 0x0008, 0x20a3, 0x0000, + 0x1f04, 0x74de, 0x20a9, 0x000a, 0x20a3, 0x0000, 0x1f04, 0x74e4, + 0x60c3, 0x0074, 0x080c, 0x7d67, 0x0005, 0x20a1, 0x020b, 0x080c, + 0x7641, 0x20a3, 0x2010, 0x20a3, 0x0014, 0x20a3, 0x0800, 0x20a3, + 0x2000, 0xa006, 0x20a2, 0x20a2, 0x20a2, 0x20a2, 0x20a2, 0x00f6, + 0x2079, 0xb552, 0x7904, 0x00fe, 0xd1ac, 0x1110, 0xa085, 0x0020, + 0xd1a4, 0x0110, 0xa085, 0x0010, 0xa085, 0x0002, 0x00d6, 0x0804, + 0x75cc, 0x20a2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0014, + 0x080c, 0x7d67, 0x0005, 0x20a1, 0x020b, 0x080c, 0x7641, 0x20a3, + 0x5000, 0x0804, 0x743b, 0x20a1, 0x020b, 0x080c, 0x7641, 0x20a3, + 0x2110, 0x20a3, 0x0014, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, + 0x0014, 0x080c, 0x7d67, 0x0005, 0x20a1, 0x020b, 0x080c, 0x76d5, + 0x0020, 0x20a1, 0x020b, 0x080c, 0x76dd, 0x20a3, 0x0200, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0004, 0x080c, + 0x7d67, 0x0005, 0x20a1, 0x020b, 0x080c, 0x76dd, 0x20a3, 0x0100, + 0x20a3, 0x0000, 0x20a3, 0x0003, 0x20a3, 0x2a00, 0x60c3, 0x0008, + 0x080c, 0x7d67, 0x0005, 0x20a1, 0x020b, 0x080c, 0x76dd, 0x20a3, + 0x0200, 0x0804, 0x743b, 0x20a1, 0x020b, 0x080c, 0x76dd, 0x20a3, + 0x0100, 0x20a3, 0x0000, 0x7828, 0xa005, 0x0110, 0x20a2, 0x0010, + 0x20a3, 0x0003, 0x7810, 0x20a2, 0x60c3, 0x0008, 0x080c, 0x7d67, + 0x0005, 0x00d6, 0x20a1, 0x020b, 0x080c, 0x76dd, 0x20a3, 0x0210, + 0x20a3, 0x0014, 0x20a3, 0x0800, 0x7818, 0x2068, 0x6894, 0xa086, + 0x0014, 0x1198, 0x699c, 0xa184, 0x0030, 0x0190, 0x6998, 0xa184, + 0xc000, 0x1140, 0xd1ec, 0x0118, 0x20a3, 0x2100, 0x0058, 0x20a3, + 0x0100, 0x0040, 0x20a3, 0x0400, 0x0028, 0x20a3, 0x0700, 0x0010, + 0x700f, 0x0800, 0xa006, 0x20a2, 0x20a2, 0x20a2, 0x20a2, 0x20a2, + 0x00f6, 0x2079, 0xb552, 0x7904, 0x00fe, 0xd1ac, 0x1110, 0xa085, + 0x0020, 0xd1a4, 0x0110, 0xa085, 0x0010, 0x2009, 0xb574, 0x210c, + 0xd184, 0x1110, 0xa085, 0x0002, 0x0026, 0x2009, 0xb572, 0x210c, + 0xd1e4, 0x0130, 0xc0c5, 0xa094, 0x0030, 0xa296, 0x0010, 0x0140, + 0xd1ec, 0x0130, 0xa094, 0x0030, 0xa296, 0x0010, 0x0108, 0xc0bd, + 0x002e, 0x20a2, 0x20a2, 0x20a2, 0x60c3, 0x0014, 0x080c, 0x7d67, + 0x00de, 0x0005, 0x20a1, 0x020b, 0x080c, 0x76dd, 0x20a3, 0x0210, + 0x20a3, 0x0014, 0x20a3, 0x0000, 0x20a3, 0x0100, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0014, + 0x080c, 0x7d67, 0x0005, 0x20a1, 0x020b, 0x080c, 0x76dd, 0x20a3, + 0x0200, 0x0804, 0x73ae, 0x20a1, 0x020b, 0x080c, 0x76dd, 0x20a3, + 0x0100, 0x20a3, 0x0000, 0x20a3, 0x0003, 0x20a3, 0x2a00, 0x60c3, + 0x0008, 0x080c, 0x7d67, 0x0005, 0x20e1, 0x9080, 0x20e1, 0x4000, + 0x20a1, 0x020b, 0x080c, 0x76dd, 0x20a3, 0x0100, 0x20a3, 0x0000, + 0x20a3, 0x000b, 0x20a3, 0x0000, 0x60c3, 0x0008, 0x080c, 0x7d67, + 0x0005, 0x0026, 0x0036, 0x0046, 0x2019, 0x3200, 0x2021, 0x0800, + 0x0038, 0x0026, 0x0036, 0x0046, 0x2019, 0x2200, 0x2021, 0x0100, + 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, 0x2014, + 0xa286, 0x007e, 0x11a0, 0xa385, 0x00ff, 0x20a2, 0x20a3, 0xfffe, + 0x20a3, 0x0000, 0x2011, 0xb515, 0x2214, 0x2001, 0xb79e, 0x2004, + 0xa005, 0x0118, 0x2011, 0xb51d, 0x2214, 0x22a2, 0x04d0, 0xa286, + 0x007f, 0x1138, 0x00d6, 0xa385, 0x00ff, 0x20a2, 0x20a3, 0xfffd, + 0x00c8, 0x2001, 0xb535, 0x2004, 0xd0ac, 0x1110, 0xd2bc, 0x01c8, + 0xa286, 0x0080, 0x00d6, 0x1130, 0xa385, 0x00ff, 0x20a2, 0x20a3, + 0xfffc, 0x0040, 0xa2e8, 0xb635, 0x2d6c, 0x6810, 0xa305, 0x20a2, + 0x6814, 0x20a2, 0x2069, 0xb51c, 0x2da6, 0x8d68, 0x2da6, 0x00de, + 0x0080, 0x00d6, 0xa2e8, 0xb635, 0x2d6c, 0x6810, 0xa305, 0x20a2, + 0x6814, 0x20a2, 0x00de, 0x20a3, 0x0000, 0x2011, 0xb515, 0x2214, + 0x22a2, 0xa485, 0x0029, 0x20a2, 0x004e, 0x003e, 0x20a3, 0x0000, + 0x080c, 0x7d56, 0x22a2, 0x20a3, 0x0000, 0x2fa2, 0x20a3, 0xffff, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x002e, 0x0005, 0x0026, 0x20e1, + 0x9080, 0x20e1, 0x4000, 0x20a3, 0x02ff, 0x2011, 0xfffc, 0x22a2, + 0x00d6, 0x2069, 0xb51c, 0x2da6, 0x8d68, 0x2da6, 0x00de, 0x20a3, + 0x2029, 0x20a3, 0x0000, 0x08e0, 0x20a3, 0x0100, 0x20a3, 0x0000, + 0x20a3, 0xfc02, 0x20a3, 0x0000, 0x0005, 0x0026, 0x0036, 0x0046, + 0x2019, 0x3300, 0x2021, 0x0800, 0x0038, 0x0026, 0x0036, 0x0046, + 0x2019, 0x2300, 0x2021, 0x0100, 0x20e1, 0x9080, 0x20e1, 0x4000, + 0x7818, 0xa080, 0x0028, 0x2004, 0x2011, 0xb535, 0x2214, 0xd2ac, + 0x1118, 0xa092, 0x007e, 0x02d8, 0x00d6, 0xa0e8, 0xb635, 0x2d6c, + 0x6810, 0xa305, 0x20a2, 0x6814, 0x20a2, 0x6810, 0xa005, 0x1140, + 0x6814, 0xa005, 0x1128, 0x20a3, 0x00ff, 0x20a3, 0xfffe, 0x0028, + 0x2069, 0xb51c, 0x2da6, 0x8d68, 0x2da6, 0x00de, 0x0080, 0x00d6, + 0xa0e8, 0xb635, 0x2d6c, 0x6810, 0xa305, 0x20a2, 0x6814, 0x20a2, + 0x00de, 0x20a3, 0x0000, 0x2011, 0xb515, 0x2214, 0x22a2, 0xa485, + 0x0098, 0x20a2, 0x20a3, 0x0000, 0x004e, 0x003e, 0x080c, 0x7d56, + 0x22a2, 0x20a3, 0x0000, 0x7a08, 0x22a2, 0x2fa2, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x002e, 0x0005, 0x080c, 0x7d56, 0x22a2, 0x20a3, + 0x0000, 0x7a08, 0x22a2, 0x7810, 0x20a2, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x002e, 0x0005, 0x00c6, 0x00f6, 0x6004, 0xa08a, 0x0085, + 0x0a0c, 0x1515, 0xa08a, 0x008c, 0x1a0c, 0x1515, 0x6118, 0x2178, + 0x79a0, 0x2011, 0xb535, 0x2214, 0xd2ac, 0x1110, 0xd1bc, 0x0150, + 0x7900, 0xd1f4, 0x0120, 0x7914, 0xa18c, 0x00ff, 0x0040, 0x2009, + 0x0000, 0x0028, 0xa1f8, 0x2dc4, 0x2f0d, 0xa18c, 0x00ff, 0x2c78, + 0x2061, 0x0100, 0x619a, 0xa082, 0x0085, 0x001b, 0x00fe, 0x00ce, + 0x0005, 0x777a, 0x7784, 0x779f, 0x7778, 0x7778, 0x7778, 0x777a, + 0x080c, 0x1515, 0x0146, 0x20a1, 0x020b, 0x04a1, 0x60c3, 0x0000, + 0x080c, 0x7d67, 0x014e, 0x0005, 0x0146, 0x20a1, 0x020b, 0x080c, + 0x77eb, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x7808, 0x20a2, 0x7810, + 0x20a2, 0x20a3, 0x0000, 0x20a3, 0xffff, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x60c3, 0x000c, 0x080c, 0x7d67, 0x014e, 0x0005, 0x0146, + 0x20a1, 0x020b, 0x080c, 0x7825, 0x20a3, 0x0003, 0x20a3, 0x0300, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, 0x0004, 0x080c, 0x7d67, + 0x014e, 0x0005, 0x0026, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, + 0xa080, 0x0028, 0x2004, 0x2011, 0xb535, 0x2214, 0xd2ac, 0x1118, + 0xa092, 0x007e, 0x0288, 0x00d6, 0xa0e8, 0xb635, 0x2d6c, 0x6810, + 0xa085, 0x8100, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xb51c, 0x2da6, + 0x8d68, 0x2da6, 0x00de, 0x0088, 0x00d6, 0xa0e8, 0xb635, 0x2d6c, + 0x6810, 0xa085, 0x8100, 0x20a2, 0x6814, 0x20a2, 0x00de, 0x20a3, + 0x0000, 0x2011, 0xb515, 0x2214, 0x22a2, 0x20a3, 0x0009, 0x20a3, + 0x0000, 0x0804, 0x76a8, 0x0026, 0x20e1, 0x9080, 0x20e1, 0x4000, + 0x7818, 0xa080, 0x0028, 0x2004, 0x2011, 0xb535, 0x2214, 0xd2ac, + 0x1118, 0xa092, 0x007e, 0x0288, 0x00d6, 0xa0e8, 0xb635, 0x2d6c, + 0x6810, 0xa085, 0x8400, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xb51c, + 0x2da6, 0x8d68, 0x2da6, 0x00de, 0x0088, 0x00d6, 0xa0e8, 0xb635, + 0x2d6c, 0x6810, 0xa085, 0x8400, 0x20a2, 0x6814, 0x20a2, 0x00de, + 0x20a3, 0x0000, 0x2011, 0xb515, 0x2214, 0x22a2, 0x2001, 0x0099, + 0x20a2, 0x20a3, 0x0000, 0x0804, 0x7734, 0x0026, 0x20e1, 0x9080, + 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, 0x2004, 0x2011, 0xb535, + 0x2214, 0xd2ac, 0x1118, 0xa092, 0x007e, 0x0288, 0x00d6, 0xa0e8, + 0xb635, 0x2d6c, 0x6810, 0xa085, 0x8500, 0x20a2, 0x6814, 0x20a2, + 0x2069, 0xb51c, 0x2da6, 0x8d68, 0x2da6, 0x00de, 0x0088, 0x00d6, + 0xa0e8, 0xb635, 0x2d6c, 0x6810, 0xa085, 0x8500, 0x20a2, 0x6814, + 0x20a2, 0x00de, 0x20a3, 0x0000, 0x2011, 0xb515, 0x2214, 0x22a2, + 0x2001, 0x0099, 0x20a2, 0x20a3, 0x0000, 0x0804, 0x7734, 0x00c6, + 0x00f6, 0x2c78, 0x7804, 0xa08a, 0x0040, 0x0a0c, 0x1515, 0xa08a, + 0x0053, 0x1a0c, 0x1515, 0x7918, 0x2160, 0x61a0, 0x2011, 0xb535, + 0x2214, 0xd2ac, 0x1110, 0xd1bc, 0x0150, 0x6100, 0xd1f4, 0x0120, + 0x6114, 0xa18c, 0x00ff, 0x0040, 0x2009, 0x0000, 0x0028, 0xa1e0, + 0x2dc4, 0x2c0d, 0xa18c, 0x00ff, 0x2061, 0x0100, 0x619a, 0xa082, + 0x0040, 0x001b, 0x00fe, 0x00ce, 0x0005, 0x78a2, 0x79ae, 0x794b, + 0x7b60, 0x78a0, 0x78a0, 0x78a0, 0x78a0, 0x78a0, 0x78a0, 0x78a0, + 0x80d7, 0x80e7, 0x80f7, 0x8107, 0x78a0, 0x851e, 0x78a0, 0x80c6, + 0x080c, 0x1515, 0x00d6, 0x0156, 0x0146, 0x780b, 0xffff, 0x20a1, + 0x020b, 0x080c, 0x7902, 0x7910, 0x2168, 0x6948, 0x7952, 0x21a2, + 0xa016, 0x22a2, 0x22a2, 0x22a2, 0x694c, 0xa184, 0x000f, 0x1118, + 0x2001, 0x0005, 0x0040, 0xd184, 0x0118, 0x2001, 0x0004, 0x0018, + 0xa084, 0x0006, 0x8004, 0x0016, 0x2008, 0x7858, 0xa084, 0x00ff, + 0x8007, 0xa105, 0x001e, 0x20a2, 0xd1ac, 0x0118, 0x20a3, 0x0002, + 0x0048, 0xd1b4, 0x0118, 0x20a3, 0x0001, 0x0020, 0x20a3, 0x0000, + 0x2230, 0x0010, 0x6a80, 0x6e7c, 0x20a9, 0x0008, 0x0136, 0xad88, + 0x0017, 0x2198, 0x20a1, 0x021b, 0x53a6, 0x013e, 0x20a1, 0x020b, + 0x22a2, 0x26a2, 0x60c3, 0x0020, 0x20e1, 0x9080, 0x6014, 0xa084, + 0x0004, 0xa085, 0x0009, 0x6016, 0x2001, 0xb7fc, 0x2003, 0x07d0, + 0x2001, 0xb7fb, 0x2003, 0x0009, 0x080c, 0x17e2, 0x014e, 0x015e, + 0x00de, 0x0005, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7a18, 0xa280, + 0x0023, 0x2014, 0x8210, 0xa294, 0x00ff, 0x2202, 0x8217, 0x7818, + 0xa080, 0x0028, 0x2004, 0x2019, 0xb535, 0x231c, 0xd3ac, 0x1110, + 0xd0bc, 0x0188, 0x00d6, 0xa0e8, 0xb635, 0x2d6c, 0x6810, 0xa085, + 0x0600, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xb51c, 0x2da6, 0x8d68, + 0x2da6, 0x00de, 0x0088, 0x00d6, 0xa0e8, 0xb635, 0x2d6c, 0x6810, + 0xa085, 0x0600, 0x20a2, 0x6814, 0x20a2, 0x00de, 0x20a3, 0x0000, + 0x2009, 0xb515, 0x210c, 0x21a2, 0x20a3, 0x0829, 0x20a3, 0x0000, + 0x22a2, 0x20a3, 0x0000, 0x2fa2, 0x20a3, 0xffff, 0x20a3, 0x0000, + 0x20a3, 0x0000, 0x0005, 0x00d6, 0x0156, 0x0136, 0x0146, 0x20a1, + 0x020b, 0x00c1, 0x7810, 0x2068, 0x6860, 0x20a2, 0x685c, 0x20a2, + 0x6880, 0x20a2, 0x687c, 0x20a2, 0xa006, 0x20a2, 0x20a2, 0x20a2, + 0x20a2, 0x60c3, 0x000c, 0x080c, 0x7d67, 0x014e, 0x013e, 0x015e, + 0x00de, 0x0005, 0x0026, 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, + 0xa080, 0x0028, 0x2004, 0x2011, 0xb535, 0x2214, 0xd2ac, 0x1110, + 0xd0bc, 0x0188, 0x00d6, 0xa0e8, 0xb635, 0x2d6c, 0x6810, 0xa085, + 0x0500, 0x20a2, 0x6814, 0x20a2, 0x2069, 0xb51c, 0x2da6, 0x8d68, + 0x2da6, 0x00de, 0x0088, 0x00d6, 0xa0e8, 0xb635, 0x2d6c, 0x6810, + 0xa085, 0x0500, 0x20a2, 0x6814, 0x20a2, 0x00de, 0x20a3, 0x0000, + 0x2011, 0xb515, 0x2214, 0x22a2, 0x20a3, 0x0889, 0x20a3, 0x0000, + 0x080c, 0x7d56, 0x22a2, 0x20a3, 0x0000, 0x7a08, 0x22a2, 0x2fa2, + 0x20a3, 0x0000, 0x20a3, 0x0000, 0x002e, 0x0005, 0x00d6, 0x0156, + 0x0136, 0x0146, 0x7810, 0xa0ec, 0xf000, 0x0168, 0xa06d, 0x080c, + 0x5301, 0x0148, 0x684c, 0xa084, 0x2020, 0xa086, 0x2020, 0x1118, + 0x7820, 0xc0cd, 0x7822, 0x20a1, 0x020b, 0x080c, 0x7b16, 0xa016, + 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x7810, 0xa084, 0xf000, + 0x1130, 0x7810, 0xa084, 0x0700, 0x8007, 0x0043, 0x0010, 0xa006, + 0x002b, 0x014e, 0x013e, 0x015e, 0x00de, 0x0005, 0x79e8, 0x7a7d, + 0x7a8d, 0x7abf, 0x7ad2, 0x7aed, 0x7af6, 0x79e6, 0x080c, 0x1515, + 0x0016, 0x0036, 0x694c, 0xa18c, 0x0003, 0x0118, 0xa186, 0x0003, + 0x1170, 0x6b78, 0x7820, 0xd0cc, 0x0108, 0xc3e5, 0x23a2, 0x6868, + 0x20a2, 0x6864, 0x20a2, 0x003e, 0x001e, 0x0804, 0x7ac9, 0xa186, + 0x0001, 0x190c, 0x1515, 0x6b78, 0x7820, 0xd0cc, 0x0108, 0xc3e5, + 0x23a2, 0x6868, 0x20a2, 0x6864, 0x20a2, 0x22a2, 0x6874, 0x20a2, + 0x22a2, 0x687c, 0x20a2, 0x2009, 0x0018, 0xa384, 0x0300, 0x0904, + 0x7a77, 0xd3c4, 0x0110, 0x687c, 0xa108, 0xd3cc, 0x0110, 0x6874, + 0xa108, 0x0156, 0x20a9, 0x000d, 0xad80, 0x0020, 0x201c, 0x831f, + 0x23a2, 0x8000, 0x1f04, 0x7a26, 0x015e, 0x22a2, 0x22a2, 0x22a2, + 0xa184, 0x0003, 0x0904, 0x7a77, 0x20a1, 0x020b, 0x20e1, 0x9080, + 0x20e1, 0x4000, 0x0006, 0x7818, 0xa080, 0x0028, 0x2004, 0x2011, + 0xb535, 0x2214, 0xd2ac, 0x1110, 0xd0bc, 0x0188, 0x00d6, 0xa0e8, + 0xb635, 0x2d6c, 0x6810, 0xa085, 0x0700, 0x20a2, 0x6814, 0x20a2, + 0x2069, 0xb51c, 0x2da6, 0x8d68, 0x2da6, 0x00de, 0x0088, 0x00d6, + 0xa0e8, 0xb635, 0x2d6c, 0x6810, 0xa085, 0x0700, 0x20a2, 0x6814, + 0x20a2, 0x00de, 0x20a3, 0x0000, 0x2011, 0xb515, 0x2214, 0x22a2, + 0x000e, 0x7b20, 0xd3cc, 0x0118, 0x20a3, 0x0889, 0x0010, 0x20a3, + 0x0898, 0x20a2, 0x080c, 0x7d56, 0x22a2, 0x20a3, 0x0000, 0x61c2, + 0x003e, 0x001e, 0x080c, 0x7d67, 0x0005, 0x2011, 0x0008, 0x2001, + 0xb50d, 0x2004, 0xd0f4, 0x0110, 0x2011, 0x0028, 0x7820, 0xd0cc, + 0x0108, 0xc2e5, 0x22a2, 0xa016, 0x04d0, 0x2011, 0x0302, 0x0016, + 0x0036, 0x7828, 0x792c, 0xa11d, 0x0108, 0xc2dd, 0x7b20, 0xd3cc, + 0x0108, 0xc2e5, 0x22a2, 0x20a2, 0x21a2, 0x003e, 0x001e, 0xa016, + 0x22a2, 0x20a3, 0x0012, 0x22a2, 0x20a3, 0x0008, 0x22a2, 0x22a2, + 0x22a2, 0x22a2, 0x20a3, 0x7000, 0x20a3, 0x0500, 0x22a2, 0x20a3, + 0x000a, 0x22a2, 0x22a2, 0x20a3, 0x2500, 0x22a2, 0x22a2, 0x22a2, + 0x22a2, 0x22a2, 0x60c3, 0x0032, 0x080c, 0x7d67, 0x0005, 0x2011, + 0x0028, 0x7820, 0xd0cc, 0x0108, 0xc2e5, 0x22a2, 0xa016, 0x22a2, + 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x60c3, 0x0018, 0x080c, + 0x7d67, 0x0005, 0x2011, 0x0100, 0x7820, 0xd0cc, 0x0108, 0xc2e5, + 0x22a2, 0xa016, 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x22a2, 0x20a3, + 0x0008, 0x22a2, 0x7854, 0xa084, 0x00ff, 0x20a2, 0x22a2, 0x22a2, + 0x60c3, 0x0020, 0x080c, 0x7d67, 0x0005, 0x2011, 0x0008, 0x7820, + 0xd0cc, 0x0108, 0xc2e5, 0x22a2, 0xa016, 0x0888, 0x0036, 0x7b10, + 0xa384, 0xff00, 0x7812, 0xa384, 0x00ff, 0x8001, 0x1138, 0x7820, + 0xd0cc, 0x0108, 0xc2e5, 0x22a2, 0x003e, 0x0808, 0x0046, 0x2021, + 0x0800, 0x0006, 0x7820, 0xd0cc, 0x000e, 0x0108, 0xc4e5, 0x24a2, + 0x004e, 0x22a2, 0x20a2, 0x003e, 0x0804, 0x7ac9, 0x0026, 0x20e1, + 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, 0x2004, 0x2011, + 0xb535, 0x2214, 0xd2ac, 0x1110, 0xd0bc, 0x0188, 0x00d6, 0xa0e8, + 0xb635, 0x2d6c, 0x6810, 0xa085, 0x0700, 0x20a2, 0x6814, 0x20a2, + 0x2069, 0xb51c, 0x2da6, 0x8d68, 0x2da6, 0x00de, 0x0088, 0x00d6, + 0xa0e8, 0xb635, 0x2d6c, 0x6810, 0xa085, 0x0700, 0x20a2, 0x6814, + 0x20a2, 0x00de, 0x20a3, 0x0000, 0x2011, 0xb515, 0x2214, 0x22a2, + 0x7820, 0xd0cc, 0x0118, 0x20a3, 0x0889, 0x0010, 0x20a3, 0x0898, + 0x20a3, 0x0000, 0x080c, 0x7d56, 0x22a2, 0x20a3, 0x0000, 0x7a08, + 0x22a2, 0x2fa2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x002e, 0x0005, + 0x00d6, 0x0156, 0x0136, 0x0146, 0x0016, 0x0036, 0x7810, 0xa084, + 0x0700, 0x8007, 0x003b, 0x003e, 0x001e, 0x014e, 0x013e, 0x015e, + 0x00de, 0x0005, 0x7b7a, 0x7b7a, 0x7b7c, 0x7b7a, 0x7b7a, 0x7b7a, + 0x7b9e, 0x7b7a, 0x080c, 0x1515, 0x7910, 0xa18c, 0xf8ff, 0xa18d, + 0x0600, 0x7912, 0x20a1, 0x020b, 0x2009, 0x0003, 0x00f9, 0x00d6, + 0x2069, 0xb552, 0x6804, 0xd0bc, 0x0130, 0x682c, 0xa084, 0x00ff, + 0x8007, 0x20a2, 0x0010, 0x20a3, 0x3f00, 0x00de, 0x22a2, 0x22a2, + 0x22a2, 0x60c3, 0x0001, 0x080c, 0x7d67, 0x0005, 0x20a1, 0x020b, + 0x2009, 0x0003, 0x0019, 0x20a3, 0x7f00, 0x0c80, 0x0026, 0x20e1, + 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, 0x2004, 0x2011, + 0xb535, 0x2214, 0xd2ac, 0x1110, 0xd0bc, 0x0188, 0x00d6, 0xa0e8, + 0xb635, 0x2d6c, 0x6810, 0xa085, 0x0100, 0x20a2, 0x6814, 0x20a2, + 0x2069, 0xb51c, 0x2da6, 0x8d68, 0x2da6, 0x00de, 0x0088, 0x00d6, + 0xa0e8, 0xb635, 0x2d6c, 0x6810, 0xa085, 0x0100, 0x20a2, 0x6814, + 0x20a2, 0x00de, 0x20a3, 0x0000, 0x2011, 0xb515, 0x2214, 0x22a2, + 0x20a3, 0x0888, 0xa18d, 0x0008, 0x21a2, 0x080c, 0x7d56, 0x22a2, + 0x20a3, 0x0000, 0x7a08, 0x22a2, 0x2fa2, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x002e, 0x0005, 0x00e6, 0x00d6, 0x00c6, 0x0056, 0x0046, + 0x0036, 0x2061, 0x0100, 0x2071, 0xb500, 0x7154, 0x7818, 0x2068, + 0x68a0, 0x2028, 0x76d4, 0xd6ac, 0x1130, 0xd0bc, 0x1120, 0x6910, + 0x6a14, 0x7454, 0x0020, 0x6910, 0x6a14, 0x7370, 0x7474, 0x781c, + 0xa0be, 0x0006, 0x0904, 0x7ca1, 0xa0be, 0x000a, 0x15e8, 0xa185, + 0x0200, 0x6062, 0x6266, 0x636a, 0x646e, 0x6073, 0x2029, 0x6077, + 0x0000, 0x688c, 0x8000, 0xa084, 0x00ff, 0x688e, 0x8007, 0x607a, + 0x607f, 0x0000, 0x2f00, 0x6082, 0x7808, 0x6086, 0x7810, 0x2070, + 0x7014, 0x608a, 0x7010, 0x608e, 0x700c, 0x60c6, 0x7008, 0x60ca, + 0x686c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0x609f, 0x0000, + 0x080c, 0x85b9, 0x2009, 0x07d0, 0x60c4, 0xa084, 0xfff0, 0xa005, + 0x0110, 0x2009, 0x1b58, 0x080c, 0x6a15, 0x003e, 0x004e, 0x005e, + 0x00ce, 0x00de, 0x00ee, 0x0005, 0x70d4, 0xd0ac, 0x1110, 0xd5bc, + 0x0138, 0xa185, 0x0100, 0x6062, 0x6266, 0x636a, 0x646e, 0x0038, + 0xa185, 0x0100, 0x6062, 0x6266, 0x606b, 0x0000, 0x646e, 0x6073, + 0x0809, 0x6077, 0x0008, 0x688c, 0x8000, 0xa084, 0x00ff, 0x688e, + 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00, 0x6082, 0x7808, 0x6086, + 0x7810, 0x2070, 0x7014, 0x608a, 0x7010, 0x608e, 0x700c, 0x60c6, + 0x7008, 0x60ca, 0x686c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, + 0xa582, 0x0080, 0x0248, 0x6a00, 0xd2f4, 0x0120, 0x6a14, 0xa294, + 0x00ff, 0x0010, 0x2011, 0x0000, 0x629e, 0x080c, 0x85b9, 0x2009, + 0x07d0, 0x60c4, 0xa084, 0xfff0, 0xa005, 0x0110, 0x2009, 0x1b58, + 0x080c, 0x6a15, 0x003e, 0x004e, 0x005e, 0x00ce, 0x00de, 0x00ee, + 0x0005, 0x7810, 0x2070, 0x704c, 0xa084, 0x0003, 0xa086, 0x0002, + 0x0904, 0x7cf7, 0x2001, 0xb535, 0x2004, 0xd0ac, 0x1110, 0xd5bc, + 0x0138, 0xa185, 0x0100, 0x6062, 0x6266, 0x636a, 0x646e, 0x0038, + 0xa185, 0x0100, 0x6062, 0x6266, 0x606b, 0x0000, 0x646e, 0x6073, + 0x0880, 0x6077, 0x0008, 0x688c, 0x8000, 0xa084, 0x00ff, 0x688e, + 0x8007, 0x607a, 0x7834, 0x607e, 0x2f00, 0x6086, 0x7808, 0x6082, + 0x7060, 0x608a, 0x705c, 0x608e, 0x7080, 0x60c6, 0x707c, 0x60ca, + 0x707c, 0x792c, 0xa108, 0x792e, 0x7080, 0x7928, 0xa109, 0x792a, + 0x686c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xa582, 0x0080, + 0x0248, 0x6a00, 0xd2f4, 0x0120, 0x6a14, 0xa294, 0x00ff, 0x0010, + 0x2011, 0x0000, 0x629e, 0x080c, 0x85b6, 0x0804, 0x7c8f, 0x2001, + 0xb535, 0x2004, 0xd0ac, 0x1110, 0xd5bc, 0x0138, 0xa185, 0x0700, + 0x6062, 0x6266, 0x636a, 0x646e, 0x0038, 0xa185, 0x0700, 0x6062, + 0x6266, 0x606b, 0x0000, 0x646e, 0x080c, 0x5301, 0x0180, 0x00d6, + 0x7810, 0xa06d, 0x684c, 0x00de, 0xa084, 0x2020, 0xa086, 0x2020, + 0x1130, 0x7820, 0xc0cd, 0x7822, 0x6073, 0x0889, 0x0010, 0x6073, + 0x0898, 0x6077, 0x0000, 0x688c, 0x8000, 0xa084, 0x00ff, 0x688e, + 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00, 0x6086, 0x7808, 0x6082, + 0x7014, 0x608a, 0x7010, 0x608e, 0x700c, 0x60c6, 0x7008, 0x60ca, + 0x686c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, 0xa582, 0x0080, + 0x0248, 0x6a00, 0xd2f4, 0x0120, 0x6a14, 0xa294, 0x00ff, 0x0010, + 0x2011, 0x0000, 0x629e, 0x7820, 0xd0cc, 0x0120, 0x080c, 0x85b9, + 0x0804, 0x7c8f, 0x080c, 0x85b6, 0x0804, 0x7c8f, 0x7a18, 0xa280, + 0x0023, 0x2014, 0x8210, 0xa294, 0x00ff, 0x2202, 0x8217, 0x0005, + 0x00d6, 0x2069, 0xb7e0, 0x6843, 0x0001, 0x00de, 0x0005, 0x20e1, + 0x9080, 0x60a3, 0x0056, 0x60a7, 0x9575, 0x0019, 0x080c, 0x6a07, + 0x0005, 0x0006, 0x6014, 0xa084, 0x0004, 0xa085, 0x0009, 0x6016, + 0x000e, 0x0005, 0x0016, 0x00c6, 0x0006, 0x2061, 0x0100, 0x61a4, + 0x60a7, 0x95f5, 0x6014, 0xa084, 0x0004, 0xa085, 0x0008, 0x6016, + 0x000e, 0xe000, 0xe000, 0xe000, 0xe000, 0x61a6, 0x00ce, 0x001e, + 0x0005, 0x00c6, 0x00d6, 0x0016, 0x0026, 0x2061, 0x0100, 0x2069, + 0x0140, 0x080c, 0x5acf, 0x1198, 0x2001, 0xb7fc, 0x2004, 0xa005, + 0x15b8, 0x0066, 0x2031, 0x0001, 0x080c, 0x5b51, 0x006e, 0x1118, + 0x080c, 0x6a07, 0x0468, 0x00c6, 0x2061, 0xb7e0, 0x00d8, 0x6904, + 0xa194, 0x4000, 0x0550, 0x0831, 0x6803, 0x1000, 0x6803, 0x0000, + 0x00c6, 0x2061, 0xb7e0, 0x6128, 0xa192, 0x00c8, 0x1258, 0x8108, + 0x612a, 0x6124, 0x00ce, 0x81ff, 0x0198, 0x080c, 0x6a07, 0x080c, + 0x7d71, 0x0070, 0x6124, 0xa1e5, 0x0000, 0x0140, 0x080c, 0xb444, + 0x080c, 0x6a10, 0x2009, 0x0014, 0x080c, 0x864c, 0x00ce, 0x0000, + 0x002e, 0x001e, 0x00de, 0x00ce, 0x0005, 0x2001, 0xb7fc, 0x2004, + 0xa005, 0x1db0, 0x00c6, 0x2061, 0xb7e0, 0x6128, 0xa192, 0x0003, + 0x1e08, 0x8108, 0x612a, 0x00ce, 0x080c, 0x6a07, 0x080c, 0x4b1f, + 0x0c38, 0x00c6, 0x00d6, 0x00e6, 0x0016, 0x0026, 0x080c, 0x6a1d, + 0x2071, 0xb7e0, 0x713c, 0x81ff, 0x0590, 0x2061, 0x0100, 0x2069, + 0x0140, 0x080c, 0x5acf, 0x11a8, 0x0036, 0x2019, 0x0002, 0x080c, + 0x7fe4, 0x003e, 0x713c, 0x2160, 0x080c, 0xb444, 0x2009, 0x004a, + 0x080c, 0x864c, 0x0066, 0x2031, 0x0001, 0x080c, 0x5b51, 0x006e, + 0x00b0, 0x6904, 0xa194, 0x4000, 0x01c0, 0x6803, 0x1000, 0x6803, + 0x0000, 0x0036, 0x2019, 0x0001, 0x080c, 0x7fe4, 0x003e, 0x713c, + 0x2160, 0x080c, 0xb444, 0x2009, 0x004a, 0x080c, 0x864c, 0x002e, + 0x001e, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x0c58, 0x0026, 0x00e6, + 0x2071, 0xb7e0, 0x7048, 0xd084, 0x01c0, 0x713c, 0x81ff, 0x01a8, + 0x2071, 0x0100, 0xa188, 0x0007, 0x2114, 0xa28e, 0x0006, 0x1138, + 0x7014, 0xa084, 0x0184, 0xa085, 0x0012, 0x7016, 0x0030, 0x7014, + 0xa084, 0x0184, 0xa085, 0x0016, 0x7016, 0x00ee, 0x002e, 0x0005, + 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0056, 0x0046, 0x0006, 0x0126, + 0x2091, 0x8000, 0x6018, 0x2068, 0x6ca0, 0x2071, 0xb7e0, 0x7018, + 0x2068, 0x8dff, 0x0188, 0x68a0, 0xa406, 0x0118, 0x6854, 0x2068, + 0x0cc0, 0x6010, 0x2060, 0x643c, 0x6540, 0x6648, 0x2d60, 0x080c, + 0x511a, 0x0110, 0xa085, 0x0001, 0x012e, 0x000e, 0x004e, 0x005e, + 0x006e, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x20a1, 0x020b, 0x080c, + 0x7641, 0x20a3, 0x1200, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x781c, + 0xa086, 0x0004, 0x1110, 0x6098, 0x0018, 0x2001, 0xb515, 0x2004, + 0x20a2, 0x7834, 0x20a2, 0x7838, 0x20a2, 0x20a9, 0x0010, 0xa006, + 0x20a2, 0x1f04, 0x7ea0, 0x20a2, 0x20a2, 0x60c3, 0x002c, 0x080c, + 0x7d67, 0x0005, 0x0156, 0x0146, 0x20a1, 0x020b, 0x080c, 0x7641, + 0x20a3, 0x0f00, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x7808, 0x20a2, + 0x60c3, 0x0008, 0x080c, 0x7d67, 0x014e, 0x015e, 0x0005, 0x0156, + 0x0146, 0x20a1, 0x020b, 0x080c, 0x76dd, 0x20a3, 0x0200, 0x20a3, + 0x0000, 0x20a9, 0x0006, 0x2011, 0xb540, 0x2019, 0xb541, 0x23a6, + 0x22a6, 0xa398, 0x0002, 0xa290, 0x0002, 0x1f04, 0x7ecf, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x60c3, 0x001c, 0x080c, 0x7d67, 0x014e, + 0x015e, 0x0005, 0x0156, 0x0146, 0x0016, 0x0026, 0x20a1, 0x020b, + 0x080c, 0x76b6, 0x080c, 0x76cc, 0x7810, 0xa080, 0x0000, 0x2004, + 0xa080, 0x0015, 0x2098, 0x7808, 0xa088, 0x0002, 0x21a8, 0x53a6, + 0xa080, 0x0004, 0x8003, 0x60c2, 0x080c, 0x7d67, 0x002e, 0x001e, + 0x014e, 0x015e, 0x0005, 0x0156, 0x0146, 0x20a1, 0x020b, 0x080c, + 0x7641, 0x20a3, 0x6200, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x7808, + 0x20a2, 0x60c3, 0x0008, 0x080c, 0x7d67, 0x014e, 0x015e, 0x0005, + 0x0156, 0x0146, 0x0016, 0x0026, 0x20a1, 0x020b, 0x080c, 0x7641, + 0x7810, 0xa080, 0x0000, 0x2004, 0xa080, 0x0017, 0x2098, 0x7808, + 0xa088, 0x0002, 0x21a8, 0x53a6, 0x8003, 0x60c2, 0x080c, 0x7d67, + 0x002e, 0x001e, 0x014e, 0x015e, 0x0005, 0x00e6, 0x00c6, 0x0006, + 0x0126, 0x2091, 0x8000, 0x2071, 0xb7e0, 0x700c, 0x2060, 0x8cff, + 0x0178, 0x080c, 0x9e58, 0x1110, 0x080c, 0x8c19, 0x600c, 0x0006, + 0x080c, 0xa01f, 0x080c, 0x861d, 0x080c, 0x811e, 0x00ce, 0x0c78, + 0x700f, 0x0000, 0x700b, 0x0000, 0x012e, 0x000e, 0x00ce, 0x00ee, + 0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0026, + 0x0016, 0x0006, 0x2091, 0x8000, 0x2069, 0x0100, 0x2079, 0x0140, + 0x2071, 0xb7e0, 0x7024, 0x2060, 0x8cff, 0x05a0, 0x080c, 0x7d7a, + 0x68c3, 0x0000, 0x080c, 0x6a10, 0x2009, 0x0013, 0x080c, 0x864c, + 0x20a9, 0x01f4, 0x6824, 0xd094, 0x0158, 0x6827, 0x0004, 0x7804, + 0xa084, 0x4000, 0x01a0, 0x7803, 0x1000, 0x7803, 0x0000, 0x0078, + 0xd084, 0x0118, 0x6827, 0x0001, 0x0010, 0x1f04, 0x7f7a, 0x7804, + 0xa084, 0x1000, 0x0120, 0x7803, 0x0100, 0x7803, 0x0000, 0x6824, + 0x000e, 0x001e, 0x002e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x015e, + 0x012e, 0x0005, 0x2001, 0xb500, 0x2004, 0xa096, 0x0001, 0x0590, + 0xa096, 0x0004, 0x0578, 0x080c, 0x6a10, 0x6814, 0xa084, 0x0001, + 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000, 0x2011, + 0x4adc, 0x080c, 0x699c, 0x20a9, 0x01f4, 0x6824, 0xd094, 0x0158, + 0x6827, 0x0004, 0x7804, 0xa084, 0x4000, 0x01a0, 0x7803, 0x1000, + 0x7803, 0x0000, 0x0078, 0xd084, 0x0118, 0x6827, 0x0001, 0x0010, + 0x1f04, 0x7fbd, 0x7804, 0xa084, 0x1000, 0x0120, 0x7803, 0x0100, + 0x7803, 0x0000, 0x000e, 0x001e, 0x002e, 0x00ce, 0x00de, 0x00ee, + 0x00fe, 0x015e, 0x012e, 0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, + 0x00d6, 0x00c6, 0x0026, 0x0016, 0x0006, 0x2091, 0x8000, 0x2069, + 0x0100, 0x2079, 0x0140, 0x2071, 0xb7e0, 0x703c, 0x2060, 0x8cff, + 0x0904, 0x806b, 0xa386, 0x0002, 0x1128, 0x6814, 0xa084, 0x0002, + 0x0904, 0x806b, 0x68af, 0x95f5, 0x6817, 0x0010, 0x2009, 0x00fa, + 0x8109, 0x1df0, 0x68c7, 0x0000, 0x68cb, 0x0008, 0x080c, 0x6a1d, + 0x080c, 0x220c, 0x0046, 0x2009, 0x017f, 0x200b, 0x00a5, 0x2021, + 0x0169, 0x2404, 0xa084, 0x000f, 0xa086, 0x0004, 0x1500, 0x68af, + 0x95f5, 0x68c7, 0x0000, 0x68cb, 0x0008, 0x00e6, 0x00f6, 0x2079, + 0x0020, 0x2071, 0xb84a, 0x6814, 0xa084, 0x0184, 0xa085, 0x0012, + 0x6816, 0x7803, 0x0008, 0x7003, 0x0000, 0x00fe, 0x00ee, 0xa386, + 0x0002, 0x1128, 0x7884, 0xa005, 0x1110, 0x7887, 0x0001, 0x2001, + 0xb7b1, 0x2004, 0x200a, 0x004e, 0xa39d, 0x0000, 0x1120, 0x2009, + 0x0049, 0x080c, 0x864c, 0x20a9, 0x03e8, 0x6824, 0xd094, 0x0158, + 0x6827, 0x0004, 0x7804, 0xa084, 0x4000, 0x01a0, 0x7803, 0x1000, + 0x7803, 0x0000, 0x0078, 0xd08c, 0x0118, 0x6827, 0x0002, 0x0010, + 0x1f04, 0x804d, 0x7804, 0xa084, 0x1000, 0x0120, 0x7803, 0x0100, + 0x7803, 0x0000, 0x6824, 0x000e, 0x001e, 0x002e, 0x00ce, 0x00de, + 0x00ee, 0x00fe, 0x015e, 0x012e, 0x0005, 0x00d6, 0x0126, 0x2091, + 0x8000, 0x2069, 0xb7e0, 0x6a06, 0x012e, 0x00de, 0x0005, 0x00d6, + 0x0126, 0x2091, 0x8000, 0x2069, 0xb7e0, 0x6a32, 0x012e, 0x00de, + 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0066, 0x0006, 0x0126, 0x2071, + 0xb7e0, 0x7614, 0x2660, 0x2678, 0x2091, 0x8000, 0x8cff, 0x0538, + 0x601c, 0xa206, 0x1500, 0x7014, 0xac36, 0x1110, 0x660c, 0x7616, + 0x7010, 0xac36, 0x1140, 0x2c00, 0xaf36, 0x0118, 0x2f00, 0x7012, + 0x0010, 0x7013, 0x0000, 0x660c, 0x0066, 0x2c00, 0xaf06, 0x0110, + 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0x9e1d, 0x080c, + 0x811e, 0x00ce, 0x08d8, 0x2c78, 0x600c, 0x2060, 0x08b8, 0x012e, + 0x000e, 0x006e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0156, 0x0146, + 0x20a1, 0x020b, 0x080c, 0x7902, 0x7810, 0x20a2, 0xa006, 0x20a2, + 0x20a2, 0x20a2, 0x20a2, 0x20a3, 0x1000, 0x0804, 0x8116, 0x0156, + 0x0146, 0x20a1, 0x020b, 0x080c, 0x7902, 0x7810, 0x20a2, 0xa006, + 0x20a2, 0x20a2, 0x20a2, 0x20a2, 0x20a3, 0x4000, 0x0478, 0x0156, + 0x0146, 0x20a1, 0x020b, 0x080c, 0x7902, 0x7810, 0x20a2, 0xa006, + 0x20a2, 0x20a2, 0x20a2, 0x20a2, 0x20a3, 0x2000, 0x00f8, 0x0156, + 0x0146, 0x20a1, 0x020b, 0x080c, 0x7902, 0x7810, 0x20a2, 0xa006, + 0x20a2, 0x20a2, 0x20a2, 0x20a2, 0x20a3, 0x0400, 0x0078, 0x0156, + 0x0146, 0x20a1, 0x020b, 0x080c, 0x7902, 0x7810, 0x20a2, 0xa006, + 0x20a2, 0x20a2, 0x20a2, 0x20a2, 0x20a3, 0x0200, 0x0089, 0x60c3, + 0x0020, 0x080c, 0x7d67, 0x014e, 0x015e, 0x0005, 0x00e6, 0x2071, + 0xb7e0, 0x7020, 0xa005, 0x0110, 0x8001, 0x7022, 0x00ee, 0x0005, + 0x20a9, 0x0008, 0x20a2, 0x1f04, 0x812a, 0x20a2, 0x20a2, 0x0005, + 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066, 0x0006, 0x0126, + 0x2091, 0x8000, 0x2071, 0xb7e0, 0x7614, 0x2660, 0x2678, 0x2039, + 0x0001, 0x87ff, 0x0904, 0x81c6, 0x8cff, 0x0904, 0x81c6, 0x601c, + 0xa086, 0x0006, 0x1904, 0x81c1, 0x88ff, 0x0138, 0x2800, 0xac06, + 0x1904, 0x81c1, 0x2039, 0x0000, 0x0050, 0x6018, 0xa206, 0x1904, + 0x81c1, 0x85ff, 0x0120, 0x6050, 0xa106, 0x1904, 0x81c1, 0x7024, + 0xac06, 0x1598, 0x2069, 0x0100, 0x68c0, 0xa005, 0x1160, 0x6824, + 0xd084, 0x0148, 0x6827, 0x0001, 0x080c, 0x6a10, 0x080c, 0x824d, + 0x7027, 0x0000, 0x0410, 0x080c, 0x6a10, 0x6820, 0xd0b4, 0x0110, + 0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000, 0x080c, 0x824d, + 0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, + 0x0120, 0x6803, 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, + 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x7014, 0xac36, 0x1110, + 0x660c, 0x7616, 0x7010, 0xac36, 0x1140, 0x2c00, 0xaf36, 0x0118, + 0x2f00, 0x7012, 0x0010, 0x7013, 0x0000, 0x660c, 0x0066, 0x2c00, + 0xaf06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x89ff, 0x1158, 0x600f, + 0x0000, 0x6010, 0x2068, 0x080c, 0x9c5a, 0x0110, 0x080c, 0xb099, + 0x080c, 0x9e1d, 0x080c, 0x811e, 0x88ff, 0x1190, 0x00ce, 0x0804, + 0x8141, 0x2c78, 0x600c, 0x2060, 0x0804, 0x8141, 0xa006, 0x012e, + 0x000e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, + 0x6017, 0x0000, 0x00ce, 0xa8c5, 0x0001, 0x0c88, 0x00f6, 0x00e6, + 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, + 0x2071, 0xb7e0, 0x7638, 0x2660, 0x2678, 0x8cff, 0x0904, 0x823d, + 0x601c, 0xa086, 0x0006, 0x1904, 0x8238, 0x87ff, 0x0128, 0x2700, + 0xac06, 0x1904, 0x8238, 0x0048, 0x6018, 0xa206, 0x1904, 0x8238, + 0x85ff, 0x0118, 0x6050, 0xa106, 0x15d8, 0x703c, 0xac06, 0x1180, + 0x0036, 0x2019, 0x0001, 0x080c, 0x7fe4, 0x7033, 0x0000, 0x703f, + 0x0000, 0x7043, 0x0000, 0x7047, 0x0000, 0x704b, 0x0000, 0x003e, + 0x7038, 0xac36, 0x1110, 0x660c, 0x763a, 0x7034, 0xac36, 0x1140, + 0x2c00, 0xaf36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, + 0x660c, 0x0066, 0x2c00, 0xaf06, 0x0110, 0x7e0e, 0x0008, 0x2678, + 0x600f, 0x0000, 0x6010, 0x2068, 0x080c, 0x9c5a, 0x0110, 0x080c, + 0xb099, 0x080c, 0x9e1d, 0x87ff, 0x1190, 0x00ce, 0x0804, 0x81e5, + 0x2c78, 0x600c, 0x2060, 0x0804, 0x81e5, 0xa006, 0x012e, 0x000e, + 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x6017, + 0x0000, 0x00ce, 0xa7bd, 0x0001, 0x0c88, 0x00e6, 0x2071, 0xb7e0, + 0x2001, 0xb500, 0x2004, 0xa086, 0x0002, 0x1118, 0x7007, 0x0005, + 0x0010, 0x7007, 0x0000, 0x00ee, 0x0005, 0x00f6, 0x00e6, 0x00c6, + 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0xb7e0, + 0x2c10, 0x7638, 0x2660, 0x2678, 0x8cff, 0x0518, 0x2200, 0xac06, + 0x11e0, 0x7038, 0xac36, 0x1110, 0x660c, 0x763a, 0x7034, 0xac36, + 0x1140, 0x2c00, 0xaf36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, + 0x0000, 0x660c, 0x2c00, 0xaf06, 0x0110, 0x7e0e, 0x0008, 0x2678, + 0x600f, 0x0000, 0xa085, 0x0001, 0x0020, 0x2c78, 0x600c, 0x2060, + 0x08d8, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x00ee, 0x00fe, + 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0006, 0x0126, + 0x2091, 0x8000, 0x2071, 0xb7e0, 0x760c, 0x2660, 0x2678, 0x8cff, + 0x0904, 0x8323, 0x6018, 0xa080, 0x0028, 0x2004, 0xa206, 0x1904, + 0x831e, 0x7024, 0xac06, 0x1508, 0x2069, 0x0100, 0x68c0, 0xa005, + 0x0904, 0x82fa, 0x080c, 0x7d7a, 0x68c3, 0x0000, 0x080c, 0x824d, + 0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0xa384, 0x1000, + 0x0120, 0x6803, 0x0100, 0x6803, 0x0000, 0x2069, 0x0100, 0x6824, + 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x700c, 0xac36, 0x1110, + 0x660c, 0x760e, 0x7008, 0xac36, 0x1140, 0x2c00, 0xaf36, 0x0118, + 0x2f00, 0x700a, 0x0010, 0x700b, 0x0000, 0x660c, 0x0066, 0x2c00, + 0xaf06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x080c, + 0x9e47, 0x1158, 0x080c, 0x2cc2, 0x080c, 0x9e58, 0x11f0, 0x080c, + 0x8c19, 0x00d8, 0x080c, 0x824d, 0x08c0, 0x080c, 0x9e58, 0x1118, + 0x080c, 0x8c19, 0x0090, 0x6010, 0x2068, 0x080c, 0x9c5a, 0x0168, + 0x601c, 0xa086, 0x0003, 0x11f8, 0x6837, 0x0103, 0x6b4a, 0x6847, + 0x0000, 0x080c, 0x5408, 0x080c, 0x9e11, 0x080c, 0xa01f, 0x080c, + 0x9e1d, 0x080c, 0x811e, 0x00ce, 0x0804, 0x82a7, 0x2c78, 0x600c, + 0x2060, 0x0804, 0x82a7, 0x012e, 0x000e, 0x006e, 0x00ce, 0x00de, + 0x00ee, 0x00fe, 0x0005, 0x601c, 0xa086, 0x0006, 0x1d30, 0x080c, + 0xb099, 0x0c18, 0x0036, 0x0156, 0x0136, 0x0146, 0x3908, 0xa006, + 0xa190, 0x0020, 0x221c, 0xa39e, 0x2ab7, 0x1118, 0x8210, 0x8000, + 0x0cc8, 0xa005, 0x0138, 0x20a9, 0x0020, 0x2198, 0xa110, 0x22a0, + 0x22c8, 0x53a3, 0x014e, 0x013e, 0x015e, 0x003e, 0x0005, 0x00d6, + 0x20a1, 0x020b, 0x080c, 0x76dd, 0x20a3, 0x0200, 0x20a3, 0x0014, + 0x60c3, 0x0014, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x2099, 0xb7b9, + 0x20a9, 0x0004, 0x53a6, 0x20a3, 0x0004, 0x20a3, 0x7878, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x080c, 0x7d67, 0x00de, 0x0005, 0x20a1, + 0x020b, 0x080c, 0x76dd, 0x20a3, 0x0214, 0x20a3, 0x0018, 0x20a3, + 0x0800, 0x7810, 0xa084, 0xff00, 0x20a2, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x7810, 0xa084, 0x00ff, + 0x20a2, 0x7828, 0x20a2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x60c3, + 0x0018, 0x080c, 0x7d67, 0x0005, 0x00d6, 0x0016, 0x2f68, 0x2009, + 0x0035, 0x080c, 0xa10a, 0x1904, 0x8402, 0x20a1, 0x020b, 0x080c, + 0x7641, 0x20a3, 0x1300, 0x20a3, 0x0000, 0x7828, 0x2068, 0x681c, + 0xa086, 0x0003, 0x0580, 0x7818, 0xa080, 0x0028, 0x2014, 0x2001, + 0xb535, 0x2004, 0xd0ac, 0x11d0, 0xa286, 0x007e, 0x1128, 0x20a3, + 0x00ff, 0x20a3, 0xfffe, 0x04b8, 0xa286, 0x007f, 0x1128, 0x20a3, + 0x00ff, 0x20a3, 0xfffd, 0x0478, 0xd2bc, 0x0180, 0xa286, 0x0080, + 0x1128, 0x20a3, 0x00ff, 0x20a3, 0xfffc, 0x0428, 0xa2e8, 0xb635, + 0x2d6c, 0x6810, 0x20a2, 0x6814, 0x20a2, 0x00e8, 0x20a3, 0x0000, + 0x6098, 0x20a2, 0x00c0, 0x2001, 0xb535, 0x2004, 0xd0ac, 0x1138, + 0x7818, 0xa080, 0x0028, 0x2004, 0xa082, 0x007e, 0x0240, 0x00d6, + 0x2069, 0xb51c, 0x2da6, 0x8d68, 0x2da6, 0x00de, 0x0020, 0x20a3, + 0x0000, 0x6034, 0x20a2, 0x7834, 0x20a2, 0x7838, 0x20a2, 0x20a3, + 0x0000, 0x20a3, 0x0000, 0x60c3, 0x000c, 0x080c, 0x7d67, 0x001e, + 0x00de, 0x0005, 0x7817, 0x0001, 0x7803, 0x0006, 0x001e, 0x00de, + 0x0005, 0x00d6, 0x0026, 0x7928, 0x2168, 0x691c, 0xa186, 0x0006, + 0x01c0, 0xa186, 0x0003, 0x0904, 0x8478, 0xa186, 0x0005, 0x0904, + 0x8461, 0xa186, 0x0004, 0x05b8, 0xa186, 0x0008, 0x0904, 0x8469, + 0x7807, 0x0037, 0x7813, 0x1700, 0x080c, 0x84e0, 0x002e, 0x00de, + 0x0005, 0x080c, 0x849c, 0x2009, 0x4000, 0x6800, 0x0002, 0x8442, + 0x844d, 0x8444, 0x844d, 0x8449, 0x8442, 0x8442, 0x844d, 0x844d, + 0x844d, 0x844d, 0x8442, 0x8442, 0x8442, 0x8442, 0x8442, 0x844d, + 0x8442, 0x844d, 0x080c, 0x1515, 0x6820, 0xd0e4, 0x0110, 0xd0cc, + 0x0110, 0xa00e, 0x0010, 0x2009, 0x2000, 0x6828, 0x20a2, 0x682c, + 0x20a2, 0x0804, 0x8492, 0x080c, 0x849c, 0x20a3, 0x0000, 0x20a3, + 0x0000, 0x2009, 0x4000, 0x6a00, 0xa286, 0x0002, 0x1108, 0xa00e, + 0x0488, 0x04d1, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x2009, 0x4000, + 0x0448, 0x0491, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x2009, 0x4000, + 0xa286, 0x0005, 0x0118, 0xa286, 0x0002, 0x1108, 0xa00e, 0x00d0, + 0x0419, 0x6810, 0x2068, 0x697c, 0x6810, 0xa112, 0x6980, 0x6814, + 0xa103, 0x20a2, 0x22a2, 0x7928, 0xa180, 0x0000, 0x2004, 0xa08e, + 0x0002, 0x0130, 0xa08e, 0x0004, 0x0118, 0x2009, 0x4000, 0x0010, + 0x2009, 0x0000, 0x21a2, 0x20a3, 0x0000, 0x60c3, 0x0018, 0x080c, + 0x7d67, 0x002e, 0x00de, 0x0005, 0x0036, 0x0046, 0x0056, 0x0066, + 0x20a1, 0x020b, 0x080c, 0x76dd, 0xa006, 0x20a3, 0x0200, 0x20a2, + 0x7934, 0x21a2, 0x7938, 0x21a2, 0x7818, 0xa080, 0x0028, 0x2004, + 0x2011, 0xb535, 0x2214, 0xd2ac, 0x1118, 0xa092, 0x007e, 0x0268, + 0x00d6, 0x2069, 0xb51c, 0x2d2c, 0x8d68, 0x2d34, 0xa0e8, 0xb635, + 0x2d6c, 0x6b10, 0x6c14, 0x00de, 0x0030, 0x2019, 0x0000, 0x6498, + 0x2029, 0x0000, 0x6634, 0x7828, 0xa080, 0x0007, 0x2004, 0xa086, + 0x0003, 0x1128, 0x25a2, 0x26a2, 0x23a2, 0x24a2, 0x0020, 0x23a2, + 0x24a2, 0x25a2, 0x26a2, 0x006e, 0x005e, 0x004e, 0x003e, 0x0005, + 0x20a1, 0x020b, 0x080c, 0x76dd, 0x20a3, 0x0100, 0x20a3, 0x0000, + 0x20a3, 0x0009, 0x7810, 0x20a2, 0x60c3, 0x0008, 0x080c, 0x7d67, + 0x0005, 0x20a1, 0x020b, 0x080c, 0x7639, 0x20a3, 0x1400, 0x20a3, + 0x0000, 0x7834, 0x20a2, 0x7838, 0x20a2, 0x7828, 0x20a2, 0x782c, + 0x20a2, 0x7830, 0xa084, 0x00ff, 0x8007, 0x20a2, 0x20a3, 0x0000, + 0x60c3, 0x0010, 0x080c, 0x7d67, 0x0005, 0x20a1, 0x020b, 0x080c, + 0x76d5, 0x20a3, 0x0100, 0x20a3, 0x0000, 0x7828, 0x20a2, 0x7810, + 0x20a2, 0x60c3, 0x0008, 0x080c, 0x7d67, 0x0005, 0x0146, 0x20a1, + 0x020b, 0x0031, 0x60c3, 0x0000, 0x080c, 0x7d67, 0x014e, 0x0005, + 0x20e1, 0x9080, 0x20e1, 0x4000, 0x7818, 0xa080, 0x0028, 0x2004, + 0x2011, 0xb535, 0x2214, 0xd2ac, 0x1110, 0xd0bc, 0x0188, 0x00d6, + 0xa0e8, 0xb635, 0x2d6c, 0x6810, 0xa085, 0x0300, 0x20a2, 0x6814, + 0x20a2, 0x2069, 0xb51c, 0x2da6, 0x8d68, 0x2da6, 0x00de, 0x0078, + 0x00d6, 0xa0e8, 0xb635, 0x2d6c, 0x6810, 0xa085, 0x0300, 0x20a2, + 0x6814, 0x20a2, 0x00de, 0x20a3, 0x0000, 0x6234, 0x22a2, 0x20a3, + 0x0819, 0x20a3, 0x0000, 0x080c, 0x7d56, 0x22a2, 0x20a3, 0x0000, + 0x2fa2, 0x7a08, 0x22a2, 0x20a3, 0x0000, 0x20a3, 0x0000, 0x0005, + 0x20a1, 0x020b, 0x0079, 0x7910, 0x21a2, 0x20a3, 0x0000, 0x60c3, + 0x0000, 0x20e1, 0x9080, 0x60a7, 0x9575, 0x080c, 0x7d71, 0x080c, + 0x6a07, 0x0005, 0x0156, 0x0136, 0x0036, 0x00d6, 0x00e6, 0x20e1, + 0x9080, 0x20e1, 0x4000, 0x7854, 0x2068, 0xadf0, 0x000f, 0x7210, + 0xa296, 0x00c0, 0xa294, 0xfffd, 0x7212, 0x7214, 0xa294, 0x0300, + 0x7216, 0x7100, 0xa194, 0x00ff, 0x7308, 0xa384, 0x00ff, 0xa08d, + 0xc200, 0x7102, 0xa384, 0xff00, 0xa215, 0x720a, 0x7004, 0x720c, + 0x700e, 0x7206, 0x20a9, 0x000a, 0x2e98, 0x53a6, 0x60a3, 0x0035, + 0x6a38, 0xa294, 0x7000, 0xa286, 0x3000, 0x0110, 0x60a3, 0x0037, + 0x00ee, 0x00de, 0x003e, 0x013e, 0x015e, 0x0005, 0x2009, 0x0092, + 0x0010, 0x2009, 0x0096, 0x60ab, 0x0036, 0x6116, 0x0005, 0x2061, + 0xbd00, 0x2a70, 0x7068, 0x704a, 0x704f, 0xbd00, 0x0005, 0x00e6, + 0x0126, 0x2071, 0xb500, 0x2091, 0x8000, 0x7548, 0xa582, 0x0010, + 0x0608, 0x704c, 0x2060, 0x6000, 0xa086, 0x0000, 0x0148, 0xace0, + 0x0018, 0x705c, 0xac02, 0x1208, 0x0cb0, 0x2061, 0xbd00, 0x0c98, + 0x6003, 0x0008, 0x8529, 0x754a, 0xaca8, 0x0018, 0x705c, 0xa502, + 0x1230, 0x754e, 0xa085, 0x0001, 0x012e, 0x00ee, 0x0005, 0x704f, + 0xbd00, 0x0cc0, 0xa006, 0x0cc0, 0x00e6, 0x2071, 0xb500, 0x7548, + 0xa582, 0x0010, 0x0600, 0x704c, 0x2060, 0x6000, 0xa086, 0x0000, + 0x0148, 0xace0, 0x0018, 0x705c, 0xac02, 0x1208, 0x0cb0, 0x2061, + 0xbd00, 0x0c98, 0x6003, 0x0008, 0x8529, 0x754a, 0xaca8, 0x0018, + 0x705c, 0xa502, 0x1228, 0x754e, 0xa085, 0x0001, 0x00ee, 0x0005, + 0x704f, 0xbd00, 0x0cc8, 0xa006, 0x0cc8, 0xac82, 0xbd00, 0x0a0c, + 0x1515, 0x2001, 0xb517, 0x2004, 0xac02, 0x1a0c, 0x1515, 0xa006, + 0x6006, 0x600a, 0x600e, 0x6012, 0x6016, 0x601a, 0x601f, 0x0000, + 0x6003, 0x0000, 0x6052, 0x6056, 0x6022, 0x6026, 0x602a, 0x602e, + 0x6032, 0x6036, 0x603a, 0x603e, 0x2061, 0xb500, 0x6048, 0x8000, + 0x604a, 0xa086, 0x0001, 0x0108, 0x0005, 0x0126, 0x2091, 0x8000, + 0x080c, 0x7173, 0x012e, 0x0cc0, 0x601c, 0xa084, 0x000f, 0x0002, + 0x865b, 0x866a, 0x8685, 0x86a0, 0xa152, 0xa16d, 0xa188, 0x865b, + 0x866a, 0x865b, 0x86bb, 0xa186, 0x0013, 0x1128, 0x080c, 0x7090, + 0x080c, 0x7173, 0x0005, 0xa18e, 0x0047, 0x1118, 0xa016, 0x080c, + 0x185e, 0x0005, 0x0066, 0x6000, 0xa0b2, 0x0010, 0x1a0c, 0x1515, + 0x0013, 0x006e, 0x0005, 0x8683, 0x8a9b, 0x8c53, 0x8683, 0x8cc8, + 0x8779, 0x8683, 0x8683, 0x8a2d, 0x90ef, 0x8683, 0x8683, 0x8683, + 0x8683, 0x8683, 0x8683, 0x080c, 0x1515, 0x0066, 0x6000, 0xa0b2, + 0x0010, 0x1a0c, 0x1515, 0x0013, 0x006e, 0x0005, 0x869e, 0x9722, + 0x869e, 0x869e, 0x869e, 0x869e, 0x869e, 0x869e, 0x96cd, 0x988e, + 0x869e, 0x974f, 0x97c6, 0x974f, 0x97c6, 0x869e, 0x080c, 0x1515, + 0x0066, 0x6000, 0xa0b2, 0x0010, 0x1a0c, 0x1515, 0x0013, 0x006e, + 0x0005, 0x86b9, 0x9130, 0x91fa, 0x9335, 0x9491, 0x86b9, 0x86b9, + 0x86b9, 0x910a, 0x967d, 0x9680, 0x86b9, 0x86b9, 0x86b9, 0x86b9, + 0x96aa, 0x080c, 0x1515, 0x0066, 0x6000, 0xa0b2, 0x0010, 0x1a0c, + 0x1515, 0x0013, 0x006e, 0x0005, 0x86d4, 0x86d4, 0x86d4, 0x8702, + 0x874f, 0x86d4, 0x86d4, 0x86d4, 0x86d6, 0x86d4, 0x86d4, 0x86d4, + 0x86d4, 0x86d4, 0x86d4, 0x86d4, 0x080c, 0x1515, 0xa186, 0x0003, + 0x190c, 0x1515, 0x00d6, 0x6003, 0x0003, 0x6106, 0x6010, 0x2068, + 0x684f, 0x0040, 0x687c, 0x680a, 0x6880, 0x680e, 0x6813, 0x0000, + 0x6817, 0x0000, 0x6854, 0xa092, 0x199a, 0x0210, 0x2001, 0x1999, + 0x8003, 0x8013, 0x8213, 0xa210, 0x6216, 0x00de, 0x2c10, 0x080c, + 0x1fa9, 0x080c, 0x6cf0, 0x0126, 0x2091, 0x8000, 0x080c, 0x7230, + 0x012e, 0x0005, 0xa182, 0x0047, 0x0002, 0x870e, 0x870e, 0x8710, + 0x8729, 0x870e, 0x870e, 0x870e, 0x870e, 0x873b, 0x080c, 0x1515, + 0x00d6, 0x0016, 0x080c, 0x7126, 0x080c, 0x7230, 0x6003, 0x0004, + 0x6110, 0x2168, 0x684f, 0x0020, 0x685c, 0x685a, 0x6874, 0x687e, + 0x6878, 0x6882, 0x6897, 0x0000, 0x689b, 0x0000, 0x001e, 0x00de, + 0x0005, 0x080c, 0x7126, 0x00d6, 0x6110, 0x2168, 0x080c, 0x9c5a, + 0x0120, 0x684b, 0x0006, 0x080c, 0x5408, 0x00de, 0x080c, 0x861d, + 0x080c, 0x7230, 0x0005, 0x080c, 0x7126, 0x080c, 0x2c9c, 0x00d6, + 0x6110, 0x2168, 0x080c, 0x9c5a, 0x0120, 0x684b, 0x0029, 0x080c, + 0x5408, 0x00de, 0x080c, 0x861d, 0x080c, 0x7230, 0x0005, 0xa182, + 0x0047, 0x0002, 0x875d, 0x876c, 0x875b, 0x875b, 0x875b, 0x875b, + 0x875b, 0x875b, 0x875b, 0x080c, 0x1515, 0x00d6, 0x6010, 0x2068, + 0x684c, 0xc0f4, 0x684e, 0x00de, 0x20e1, 0x0005, 0x3d18, 0x3e20, + 0x2c10, 0x080c, 0x185e, 0x0005, 0x00d6, 0x6110, 0x2168, 0x684b, + 0x0000, 0x6853, 0x0000, 0x080c, 0x5408, 0x00de, 0x080c, 0x861d, + 0x0005, 0xa1b6, 0x0015, 0x1118, 0x080c, 0x861d, 0x0030, 0xa1b6, + 0x0016, 0x190c, 0x1515, 0x080c, 0x861d, 0x0005, 0x20a9, 0x000e, + 0x2e98, 0x6010, 0x20a0, 0x53a3, 0x20a9, 0x0006, 0x3310, 0x3420, + 0x9398, 0x94a0, 0x3318, 0x3428, 0x222e, 0x2326, 0xa290, 0x0002, + 0xa5a8, 0x0002, 0xa398, 0x0002, 0xa4a0, 0x0002, 0x1f04, 0x8794, + 0x00e6, 0x080c, 0x9c5a, 0x0130, 0x6010, 0x2070, 0x7007, 0x0000, + 0x7037, 0x0103, 0x00ee, 0x080c, 0x861d, 0x0005, 0x00d6, 0x0036, + 0x7330, 0xa386, 0x0200, 0x1130, 0x6018, 0x2068, 0x6813, 0x00ff, + 0x6817, 0xfffd, 0x6010, 0xa005, 0x0130, 0x2068, 0x6807, 0x0000, + 0x6837, 0x0103, 0x6b32, 0x080c, 0x861d, 0x003e, 0x00de, 0x0005, + 0x0016, 0x20a9, 0x002a, 0xae80, 0x000c, 0x2098, 0x6010, 0xa080, + 0x0002, 0x20a0, 0x53a3, 0x20a9, 0x002a, 0x6010, 0xa080, 0x0001, + 0x2004, 0xa080, 0x0002, 0x20a0, 0x53a3, 0x00e6, 0x6010, 0x2004, + 0x2070, 0x7037, 0x0103, 0x00ee, 0x080c, 0x861d, 0x001e, 0x0005, + 0x0016, 0x2009, 0x0000, 0x7030, 0xa086, 0x0100, 0x0140, 0x7038, + 0xa084, 0x00ff, 0x800c, 0x703c, 0xa084, 0x00ff, 0x8004, 0xa080, + 0x0004, 0xa108, 0x21a8, 0xae80, 0x000c, 0x2098, 0x6010, 0xa080, + 0x0002, 0x20a0, 0x080c, 0x4b8f, 0x00e6, 0x080c, 0x9c5a, 0x0140, + 0x6010, 0x2070, 0x7007, 0x0000, 0x7034, 0x70b2, 0x7037, 0x0103, + 0x00ee, 0x080c, 0x861d, 0x001e, 0x0005, 0x00e6, 0x00d6, 0x603f, + 0x0000, 0x2c68, 0x0016, 0x2009, 0x0035, 0x080c, 0xa10a, 0x001e, + 0x1168, 0x0026, 0x6228, 0x2268, 0x002e, 0x2071, 0xbb8c, 0x6b1c, + 0xa386, 0x0003, 0x0130, 0xa386, 0x0006, 0x0128, 0x080c, 0x861d, + 0x0020, 0x0031, 0x0010, 0x080c, 0x88f6, 0x00de, 0x00ee, 0x0005, + 0x00f6, 0x6810, 0x2078, 0xa186, 0x0015, 0x0904, 0x88dd, 0xa18e, + 0x0016, 0x1904, 0x88f4, 0x700c, 0xa08c, 0xff00, 0xa186, 0x1700, + 0x0120, 0xa186, 0x0300, 0x1904, 0x88bc, 0x8fff, 0x1138, 0x6800, + 0xa086, 0x000f, 0x0904, 0x88a0, 0x0804, 0x88f2, 0x6808, 0xa086, + 0xffff, 0x1904, 0x88df, 0x784c, 0xa084, 0x0060, 0xa086, 0x0020, + 0x1150, 0x797c, 0x7810, 0xa106, 0x1904, 0x88df, 0x7980, 0x7814, + 0xa106, 0x1904, 0x88df, 0x080c, 0x9e11, 0x6858, 0x7852, 0x784c, + 0xc0dc, 0xc0f4, 0xc0d4, 0x784e, 0x0026, 0xa00e, 0x6a14, 0x2001, + 0x000a, 0x080c, 0x6b40, 0x7854, 0xa20a, 0x0208, 0x8011, 0x7a56, + 0x82ff, 0x002e, 0x1138, 0x00c6, 0x2d60, 0x080c, 0x9a09, 0x00ce, + 0x0804, 0x88f2, 0x00c6, 0x00d6, 0x2f68, 0x6838, 0xd0fc, 0x1118, + 0x080c, 0x4c64, 0x0010, 0x080c, 0x4e49, 0x00de, 0x00ce, 0x1904, + 0x88df, 0x00c6, 0x2d60, 0x080c, 0x861d, 0x00ce, 0x0804, 0x88f2, + 0x00c6, 0x080c, 0x9ed6, 0x0190, 0x6013, 0x0000, 0x6818, 0x601a, + 0x080c, 0xa027, 0x601f, 0x0003, 0x6904, 0x00c6, 0x2d60, 0x080c, + 0x861d, 0x00ce, 0x080c, 0x864c, 0x00ce, 0x04e0, 0x2001, 0xb7b8, + 0x2004, 0x683e, 0x00ce, 0x04b0, 0x7008, 0xa086, 0x000b, 0x11a0, + 0x6018, 0x200c, 0xc1bc, 0x2102, 0x00c6, 0x2d60, 0x7853, 0x0003, + 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, 0x0002, 0x080c, 0x6c8d, + 0x080c, 0x7173, 0x00ce, 0x00f0, 0x700c, 0xa086, 0x2a00, 0x1138, + 0x2001, 0xb7b8, 0x2004, 0x683e, 0x00a8, 0x0481, 0x00a8, 0x8fff, + 0x090c, 0x1515, 0x00c6, 0x00d6, 0x2d60, 0x2f68, 0x6837, 0x0103, + 0x684b, 0x0003, 0x080c, 0x98fd, 0x080c, 0x9e11, 0x080c, 0x9e1d, + 0x00de, 0x00ce, 0x080c, 0x861d, 0x00fe, 0x0005, 0xa186, 0x0015, + 0x1128, 0x2001, 0xb7b8, 0x2004, 0x683e, 0x0068, 0xa18e, 0x0016, + 0x1160, 0x00c6, 0x2d00, 0x2060, 0x080c, 0xb33a, 0x080c, 0x6aef, + 0x080c, 0x861d, 0x00ce, 0x080c, 0x861d, 0x0005, 0x0026, 0x0036, + 0x0046, 0x7228, 0x7c80, 0x7b7c, 0xd2f4, 0x0130, 0x2001, 0xb7b8, + 0x2004, 0x683e, 0x0804, 0x8970, 0x00c6, 0x2d60, 0x080c, 0x991d, + 0x00ce, 0x6804, 0xa086, 0x0050, 0x1168, 0x00c6, 0x2d00, 0x2060, + 0x6003, 0x0001, 0x6007, 0x0050, 0x080c, 0x6c8d, 0x080c, 0x7173, + 0x00ce, 0x04f0, 0x6800, 0xa086, 0x000f, 0x01c8, 0x8fff, 0x090c, + 0x1515, 0x6820, 0xd0dc, 0x1198, 0x6800, 0xa086, 0x0004, 0x1198, + 0x784c, 0xd0ac, 0x0180, 0x784c, 0xc0dc, 0xc0f4, 0x784e, 0x7850, + 0xc0f4, 0xc0fc, 0x7852, 0x2001, 0x0001, 0x682e, 0x00e0, 0x2001, + 0x0007, 0x682e, 0x00c0, 0x784c, 0xd0b4, 0x1130, 0xd0ac, 0x0db8, + 0x784c, 0xd0f4, 0x1da0, 0x0c38, 0xd2ec, 0x1d88, 0x7024, 0xa306, + 0x1118, 0x7020, 0xa406, 0x0d58, 0x7020, 0x6836, 0x7024, 0x683a, + 0x2001, 0x0005, 0x682e, 0x080c, 0x9f63, 0x080c, 0x7173, 0x0010, + 0x080c, 0x861d, 0x004e, 0x003e, 0x002e, 0x0005, 0x00e6, 0x00d6, + 0x0026, 0x6034, 0x2068, 0x6a1c, 0xa286, 0x0007, 0x0904, 0x89d4, + 0xa286, 0x0002, 0x0904, 0x89d4, 0xa286, 0x0000, 0x0904, 0x89d4, + 0x6808, 0x6338, 0xa306, 0x1904, 0x89d4, 0x2071, 0xbb8c, 0xa186, + 0x0015, 0x05e0, 0xa18e, 0x0016, 0x1190, 0x6030, 0xa084, 0x00ff, + 0xa086, 0x0001, 0x1160, 0x700c, 0xa086, 0x2a00, 0x1140, 0x6034, + 0xa080, 0x0008, 0x200c, 0xc1dd, 0xc1f5, 0x2102, 0x0438, 0x00c6, + 0x6034, 0x2060, 0x6104, 0xa186, 0x004b, 0x01a0, 0xa186, 0x004c, + 0x0188, 0xa186, 0x004d, 0x0170, 0xa186, 0x004e, 0x0158, 0xa186, + 0x0052, 0x0140, 0x6010, 0x2068, 0x080c, 0x9c5a, 0x090c, 0x1515, + 0x6853, 0x0003, 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, 0x0002, + 0x080c, 0x6c8d, 0x080c, 0x7173, 0x00ce, 0x0030, 0x6034, 0x2070, + 0x2001, 0xb7b8, 0x2004, 0x703e, 0x080c, 0x861d, 0x002e, 0x00de, + 0x00ee, 0x0005, 0x00d6, 0x20a9, 0x000e, 0x2e98, 0x6010, 0x20a0, + 0x53a3, 0xa1b6, 0x0015, 0x1558, 0x6018, 0x2068, 0x0156, 0x0036, + 0x0026, 0xae90, 0x000c, 0xa290, 0x0004, 0x20a9, 0x0004, 0xad98, + 0x000a, 0x080c, 0x90da, 0x002e, 0x003e, 0x015e, 0x11d8, 0x0156, + 0x0036, 0x0026, 0xae90, 0x000c, 0xa290, 0x0008, 0x20a9, 0x0004, + 0xad98, 0x0006, 0x080c, 0x90da, 0x002e, 0x003e, 0x015e, 0x1150, + 0x7038, 0x680a, 0x703c, 0x680e, 0x6800, 0xc08d, 0x6802, 0x00de, + 0x0804, 0x87a0, 0x080c, 0x2c9c, 0x00c6, 0x080c, 0x85c7, 0x2f00, + 0x601a, 0x6013, 0x0000, 0x601f, 0x0001, 0x6007, 0x0001, 0x6003, + 0x0001, 0x2001, 0x0007, 0x080c, 0x4efd, 0x080c, 0x4f2a, 0x080c, + 0x6cd3, 0x080c, 0x7173, 0x00ce, 0x0c10, 0x2100, 0xa1b2, 0x0080, + 0x1a0c, 0x1515, 0xa1b2, 0x0040, 0x1a04, 0x8a91, 0x0002, 0x8a85, + 0x8a79, 0x8a85, 0x8a85, 0x8a85, 0x8a85, 0x8a77, 0x8a77, 0x8a77, + 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a77, + 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a77, + 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a85, 0x8a77, + 0x8a85, 0x8a85, 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a85, + 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a77, + 0x8a77, 0x8a85, 0x8a85, 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a77, + 0x8a77, 0x8a77, 0x8a77, 0x8a77, 0x8a85, 0x8a77, 0x8a77, 0x080c, + 0x1515, 0x6003, 0x0001, 0x6106, 0x080c, 0x6cd3, 0x0126, 0x2091, + 0x8000, 0x080c, 0x7173, 0x012e, 0x0005, 0x6003, 0x0001, 0x6106, + 0x080c, 0x6cd3, 0x0126, 0x2091, 0x8000, 0x080c, 0x7173, 0x012e, + 0x0005, 0x2600, 0x0002, 0x8a85, 0x8a85, 0x8a99, 0x8a85, 0x8a85, + 0x8a99, 0x080c, 0x1515, 0x6004, 0xa0b2, 0x0080, 0x1a0c, 0x1515, + 0xa1b6, 0x0013, 0x0904, 0x8b4b, 0xa1b6, 0x0027, 0x1904, 0x8b11, + 0x080c, 0x7090, 0x6004, 0x080c, 0x9e47, 0x0190, 0x080c, 0x9e58, + 0x0904, 0x8b0b, 0xa08e, 0x0021, 0x0904, 0x8b0e, 0xa08e, 0x0022, + 0x0904, 0x8b0b, 0xa08e, 0x003d, 0x0904, 0x8b0e, 0x0804, 0x8b04, + 0x080c, 0x2cc2, 0x2001, 0x0007, 0x080c, 0x4efd, 0x6018, 0xa080, + 0x0028, 0x200c, 0x080c, 0x8c19, 0xa186, 0x007e, 0x1148, 0x2001, + 0xb535, 0x2014, 0xc285, 0x080c, 0x5acf, 0x1108, 0xc2ad, 0x2202, + 0x0016, 0x0026, 0x0036, 0x2110, 0x0026, 0x2019, 0x0028, 0x080c, + 0x8299, 0x002e, 0x080c, 0xb38d, 0x003e, 0x002e, 0x001e, 0x0016, + 0x0026, 0x0036, 0x2110, 0x2019, 0x0028, 0x080c, 0x6df5, 0x0076, + 0x2039, 0x0000, 0x080c, 0x6d02, 0x00c6, 0x6018, 0xa065, 0x0110, + 0x080c, 0x51aa, 0x00ce, 0x2c08, 0x080c, 0xae82, 0x007e, 0x003e, + 0x002e, 0x001e, 0x080c, 0x4f6c, 0x080c, 0xa01f, 0x080c, 0x861d, + 0x080c, 0x7173, 0x0005, 0x080c, 0x8c19, 0x0cb0, 0x080c, 0x8c47, + 0x0c98, 0xa186, 0x0014, 0x1db0, 0x080c, 0x7090, 0x080c, 0x2c9c, + 0x080c, 0x9e47, 0x1188, 0x080c, 0x2cc2, 0x6018, 0xa080, 0x0028, + 0x200c, 0x080c, 0x8c19, 0xa186, 0x007e, 0x1128, 0x2001, 0xb535, + 0x200c, 0xc185, 0x2102, 0x08c0, 0x080c, 0x9e58, 0x1118, 0x080c, + 0x8c19, 0x0890, 0x6004, 0xa08e, 0x0032, 0x1158, 0x00e6, 0x00f6, + 0x2071, 0xb582, 0x2079, 0x0000, 0x080c, 0x2fcf, 0x00fe, 0x00ee, + 0x0818, 0x6004, 0xa08e, 0x0021, 0x0d50, 0xa08e, 0x0022, 0x090c, + 0x8c19, 0x0804, 0x8b04, 0xa0b2, 0x0040, 0x1a04, 0x8c0e, 0x2008, + 0x0002, 0x8b93, 0x8b94, 0x8b97, 0x8b9a, 0x8b9d, 0x8ba0, 0x8b91, + 0x8b91, 0x8b91, 0x8b91, 0x8b91, 0x8b91, 0x8b91, 0x8b91, 0x8b91, + 0x8b91, 0x8b91, 0x8b91, 0x8b91, 0x8b91, 0x8b91, 0x8b91, 0x8b91, + 0x8b91, 0x8b91, 0x8b91, 0x8b91, 0x8b91, 0x8b91, 0x8b91, 0x8ba3, + 0x8bb2, 0x8b91, 0x8bb4, 0x8bb2, 0x8b91, 0x8b91, 0x8b91, 0x8b91, + 0x8b91, 0x8bb2, 0x8bb2, 0x8b91, 0x8b91, 0x8b91, 0x8b91, 0x8b91, + 0x8b91, 0x8b91, 0x8b91, 0x8bee, 0x8bb2, 0x8b91, 0x8bae, 0x8b91, + 0x8b91, 0x8b91, 0x8baf, 0x8b91, 0x8b91, 0x8b91, 0x8bb2, 0x8be5, + 0x8b91, 0x080c, 0x1515, 0x00f0, 0x2001, 0x000b, 0x0460, 0x2001, + 0x0003, 0x0448, 0x2001, 0x0005, 0x0430, 0x2001, 0x0001, 0x0418, + 0x2001, 0x0009, 0x0400, 0x080c, 0x7090, 0x6003, 0x0005, 0x2001, + 0xb7b8, 0x2004, 0x603e, 0x080c, 0x7173, 0x00a0, 0x0018, 0x0010, + 0x080c, 0x4efd, 0x0804, 0x8bff, 0x080c, 0x7090, 0x2001, 0xb7b6, + 0x2004, 0x6016, 0x2001, 0xb7b8, 0x2004, 0x603e, 0x6003, 0x0004, + 0x080c, 0x7173, 0x0005, 0x080c, 0x4efd, 0x080c, 0x7090, 0x6003, + 0x0002, 0x2001, 0xb7b8, 0x2004, 0x603e, 0x0036, 0x2019, 0xb55d, + 0x2304, 0xa084, 0xff00, 0x1120, 0x2001, 0xb7b6, 0x201c, 0x0040, + 0x8007, 0xa09a, 0x0004, 0x0ec0, 0x8003, 0x801b, 0x831b, 0xa318, + 0x6316, 0x003e, 0x080c, 0x7173, 0x08e8, 0x080c, 0x7090, 0x080c, + 0xa01f, 0x080c, 0x861d, 0x080c, 0x7173, 0x08a0, 0x00e6, 0x00f6, + 0x2071, 0xb582, 0x2079, 0x0000, 0x080c, 0x2fcf, 0x00fe, 0x00ee, + 0x080c, 0x7090, 0x080c, 0x861d, 0x080c, 0x7173, 0x0818, 0x080c, + 0x7090, 0x2001, 0xb7b8, 0x2004, 0x603e, 0x6003, 0x0002, 0x2001, + 0xb7b6, 0x2004, 0x6016, 0x080c, 0x7173, 0x0005, 0x2600, 0x2008, + 0x0002, 0x8c17, 0x8c17, 0x8c17, 0x8bff, 0x8bff, 0x8c17, 0x080c, + 0x1515, 0x00e6, 0x0026, 0x0016, 0x080c, 0x9c5a, 0x0508, 0x6010, + 0x2070, 0x7034, 0xa086, 0x0139, 0x1148, 0x2001, 0x0030, 0x2009, + 0x0000, 0x2011, 0x4005, 0x080c, 0xa0d6, 0x0090, 0x7038, 0xd0fc, + 0x0178, 0x7007, 0x0000, 0x0016, 0x6004, 0xa08e, 0x0021, 0x0160, + 0xa08e, 0x003d, 0x0148, 0x001e, 0x7037, 0x0103, 0x7033, 0x0100, + 0x001e, 0x002e, 0x00ee, 0x0005, 0x001e, 0x0009, 0x0cc8, 0x00e6, + 0xacf0, 0x0004, 0x2e74, 0x7000, 0x2070, 0x7037, 0x0103, 0x7023, + 0x8001, 0x00ee, 0x0005, 0x00d6, 0x6618, 0x2668, 0x6804, 0xa084, + 0x00ff, 0x00de, 0xa0b2, 0x000c, 0x1a0c, 0x1515, 0x6604, 0xa6b6, + 0x0043, 0x1120, 0x080c, 0xa092, 0x0804, 0x8cb8, 0x6604, 0xa6b6, + 0x0033, 0x1120, 0x080c, 0xa042, 0x0804, 0x8cb8, 0x6604, 0xa6b6, + 0x0028, 0x1120, 0x080c, 0x9e88, 0x0804, 0x8cb8, 0x6604, 0xa6b6, + 0x0029, 0x1118, 0x080c, 0x9e9f, 0x04d8, 0x6604, 0xa6b6, 0x001f, + 0x1118, 0x080c, 0x8786, 0x04a0, 0x6604, 0xa6b6, 0x0000, 0x1118, + 0x080c, 0x89da, 0x0468, 0x6604, 0xa6b6, 0x0022, 0x1118, 0x080c, + 0x87ae, 0x0430, 0x6604, 0xa6b6, 0x0035, 0x1118, 0x080c, 0x8815, + 0x00f8, 0x6604, 0xa6b6, 0x0039, 0x1118, 0x080c, 0x8976, 0x00c0, + 0x6604, 0xa6b6, 0x003d, 0x1118, 0x080c, 0x87c8, 0x0088, 0x6604, + 0xa6b6, 0x0044, 0x1118, 0x080c, 0x87e8, 0x0050, 0xa1b6, 0x0015, + 0x1110, 0x0053, 0x0028, 0xa1b6, 0x0016, 0x1118, 0x0804, 0x8e7c, + 0x0005, 0x080c, 0x8663, 0x0ce0, 0x8cdf, 0x8ce2, 0x8cdf, 0x8d24, + 0x8cdf, 0x8e09, 0x8e8a, 0x8cdf, 0x8cdf, 0x8e58, 0x8cdf, 0x8e6c, + 0xa1b6, 0x0048, 0x0140, 0x20e1, 0x0005, 0x3d18, 0x3e20, 0x2c10, + 0x080c, 0x185e, 0x0005, 0x00e6, 0xacf0, 0x0004, 0x2e74, 0x7000, + 0x2070, 0x7037, 0x0103, 0x00ee, 0x080c, 0x861d, 0x0005, 0xe000, + 0xe000, 0x0005, 0x00e6, 0x2071, 0xb500, 0x7084, 0xa086, 0x0074, + 0x1530, 0x080c, 0xae59, 0x11b0, 0x00d6, 0x6018, 0x2068, 0x7030, + 0xd08c, 0x0128, 0x6800, 0xd0bc, 0x0110, 0xc0c5, 0x6802, 0x00d9, + 0x00de, 0x2001, 0x0006, 0x080c, 0x4efd, 0x080c, 0x2cc2, 0x080c, + 0x861d, 0x0078, 0x2001, 0x000a, 0x080c, 0x4efd, 0x080c, 0x2cc2, + 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x6cd3, 0x0010, 0x080c, + 0x8df6, 0x00ee, 0x0005, 0x6800, 0xd084, 0x0168, 0x2001, 0x0000, + 0x080c, 0x4eeb, 0x2069, 0xb552, 0x6804, 0xd0a4, 0x0120, 0x2001, + 0x0006, 0x080c, 0x4f2a, 0x0005, 0x00d6, 0x2011, 0xb521, 0x2204, + 0xa086, 0x0074, 0x1904, 0x8df3, 0x6018, 0x2068, 0x6aa0, 0xa286, + 0x007e, 0x1120, 0x080c, 0x8fa2, 0x0804, 0x8d92, 0x080c, 0x8f98, + 0x6018, 0x2068, 0xa080, 0x0028, 0x2014, 0xa286, 0x0080, 0x11c0, + 0x6813, 0x00ff, 0x6817, 0xfffc, 0x6010, 0xa005, 0x0138, 0x2068, + 0x6807, 0x0000, 0x6837, 0x0103, 0x6833, 0x0200, 0x2001, 0x0006, + 0x080c, 0x4efd, 0x080c, 0x2cc2, 0x080c, 0x861d, 0x0804, 0x8df4, + 0x00e6, 0x2071, 0xb535, 0x2e04, 0xd09c, 0x0188, 0x2071, 0xbb80, + 0x7108, 0x720c, 0xa18c, 0x00ff, 0x1118, 0xa284, 0xff00, 0x0138, + 0x6018, 0x2070, 0x70a0, 0xd0bc, 0x1110, 0x7112, 0x7216, 0x00ee, + 0x6010, 0xa005, 0x0198, 0x2068, 0x6838, 0xd0f4, 0x0178, 0x6834, + 0xa084, 0x00ff, 0xa086, 0x0039, 0x1958, 0x2001, 0x0000, 0x2009, + 0x0000, 0x2011, 0x4000, 0x080c, 0xa0d6, 0x0840, 0x2001, 0x0004, + 0x080c, 0x4efd, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c, 0x6cd3, + 0x0804, 0x8df4, 0x685c, 0xd0e4, 0x01d8, 0x080c, 0x9fd2, 0x080c, + 0x5acf, 0x0118, 0xd0dc, 0x1904, 0x8d4e, 0x2011, 0xb535, 0x2204, + 0xc0ad, 0x2012, 0x2001, 0xb78f, 0x2004, 0x00f6, 0x2079, 0x0100, + 0x78e3, 0x0000, 0x080c, 0x2872, 0x78e2, 0x00fe, 0x0804, 0x8d4e, + 0x080c, 0xa008, 0x2011, 0xb535, 0x2204, 0xc0a5, 0x2012, 0x0006, + 0x080c, 0xaf7b, 0x000e, 0x1904, 0x8d4e, 0xc0b5, 0x2012, 0x2001, + 0x0006, 0x080c, 0x4efd, 0x2001, 0x0000, 0x080c, 0x4eeb, 0x00c6, + 0x2009, 0x00ef, 0x00f6, 0x2079, 0x0100, 0x79ea, 0x7932, 0x7936, + 0x00fe, 0x080c, 0x2847, 0x00f6, 0x2079, 0xb500, 0x7976, 0x2100, + 0x2009, 0x0000, 0x080c, 0x281d, 0x7952, 0x00fe, 0x8108, 0x080c, + 0x4f4d, 0x2c00, 0x00ce, 0x1904, 0x8d4e, 0x601a, 0x2001, 0x0002, + 0x080c, 0x4efd, 0x601f, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, + 0x080c, 0x6cd3, 0x0008, 0x0011, 0x00de, 0x0005, 0x2001, 0x0007, + 0x080c, 0x4efd, 0x2001, 0xb500, 0x2004, 0xa086, 0x0003, 0x1120, + 0x2001, 0x0007, 0x080c, 0x4f2a, 0x080c, 0x2cc2, 0x080c, 0x861d, + 0x0005, 0x00e6, 0x0026, 0x0016, 0x2071, 0xb500, 0x7084, 0xa086, + 0x0014, 0x15f0, 0x7000, 0xa086, 0x0003, 0x1128, 0x6010, 0xa005, + 0x1110, 0x080c, 0x3f3e, 0x00d6, 0x6018, 0x2068, 0x080c, 0x504b, + 0x080c, 0x8d13, 0x00de, 0x080c, 0x9051, 0x1550, 0x00d6, 0x6018, + 0x2068, 0x6890, 0x00de, 0xa005, 0x0518, 0x2001, 0x0006, 0x080c, + 0x4efd, 0x00e6, 0x6010, 0xa075, 0x01a8, 0x7034, 0xa084, 0x00ff, + 0xa086, 0x0039, 0x1148, 0x2001, 0x0000, 0x2009, 0x0000, 0x2011, + 0x4000, 0x080c, 0xa0d6, 0x0030, 0x7007, 0x0000, 0x7037, 0x0103, + 0x7033, 0x0200, 0x00ee, 0x080c, 0x2cc2, 0x080c, 0x861d, 0x0020, + 0x080c, 0x8c19, 0x080c, 0x8df6, 0x001e, 0x002e, 0x00ee, 0x0005, + 0x2011, 0xb521, 0x2204, 0xa086, 0x0014, 0x1158, 0x2001, 0x0002, + 0x080c, 0x4efd, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x6cd3, + 0x0010, 0x080c, 0x8df6, 0x0005, 0x2011, 0xb521, 0x2204, 0xa086, + 0x0004, 0x1138, 0x2001, 0x0007, 0x080c, 0x4efd, 0x080c, 0x861d, + 0x0010, 0x080c, 0x8df6, 0x0005, 0x000b, 0x0005, 0x8cdf, 0x8e95, + 0x8cdf, 0x8ec9, 0x8cdf, 0x8f54, 0x8e8a, 0x8cdf, 0x8cdf, 0x8f67, + 0x8cdf, 0x8f77, 0x6604, 0xa686, 0x0003, 0x0904, 0x8e09, 0xa6b6, + 0x001e, 0x1110, 0x080c, 0x861d, 0x0005, 0x00d6, 0x00c6, 0x080c, + 0x8f87, 0x1178, 0x2001, 0x0000, 0x080c, 0x4eeb, 0x2001, 0x0002, + 0x080c, 0x4efd, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x6cd3, + 0x00e8, 0x2009, 0xbb8e, 0x2104, 0xa086, 0x0009, 0x1160, 0x6018, + 0x2068, 0x6840, 0xa084, 0x00ff, 0xa005, 0x0170, 0x8001, 0x6842, + 0x6017, 0x000a, 0x0058, 0x2009, 0xbb8f, 0x2104, 0xa084, 0xff00, + 0xa086, 0x1900, 0x1108, 0x08d0, 0x080c, 0x8df6, 0x00ce, 0x00de, + 0x0005, 0x0026, 0x2011, 0x0000, 0x080c, 0x8f95, 0x00d6, 0x2069, + 0xb79e, 0x2d04, 0xa005, 0x0168, 0x6018, 0x2068, 0x68a0, 0xa086, + 0x007e, 0x1138, 0x2069, 0xb51d, 0x2d04, 0x8000, 0x206a, 0x00de, + 0x0010, 0x00de, 0x0078, 0x2001, 0x0000, 0x080c, 0x4eeb, 0x2001, + 0x0002, 0x080c, 0x4efd, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, + 0x6cd3, 0x0480, 0x00d6, 0x6010, 0x2068, 0x080c, 0x9c5a, 0x00de, + 0x0108, 0x6a34, 0x080c, 0x8c19, 0x2009, 0xbb8e, 0x2134, 0xa6b4, + 0x00ff, 0xa686, 0x0005, 0x0500, 0xa686, 0x000b, 0x01c8, 0x2009, + 0xbb8f, 0x2104, 0xa084, 0xff00, 0x1118, 0xa686, 0x0009, 0x01a0, + 0xa086, 0x1900, 0x1168, 0xa686, 0x0009, 0x0170, 0x2001, 0x0004, + 0x080c, 0x4efd, 0x2001, 0x0028, 0x6016, 0x6007, 0x004b, 0x0010, + 0x080c, 0x8df6, 0x002e, 0x0005, 0x00d6, 0xa286, 0x0139, 0x0160, + 0x6010, 0x2068, 0x080c, 0x9c5a, 0x0148, 0x6834, 0xa086, 0x0139, + 0x0118, 0x6838, 0xd0fc, 0x0110, 0x00de, 0x0c50, 0x6018, 0x2068, + 0x6840, 0xa084, 0x00ff, 0xa005, 0x0140, 0x8001, 0x6842, 0x6017, + 0x000a, 0x6007, 0x0016, 0x00de, 0x08e8, 0x68a0, 0xa086, 0x007e, + 0x1138, 0x00e6, 0x2071, 0xb500, 0x080c, 0x4bc6, 0x00ee, 0x0010, + 0x080c, 0x2c9c, 0x00de, 0x0860, 0x080c, 0x8f95, 0x1158, 0x2001, + 0x0004, 0x080c, 0x4efd, 0x6003, 0x0001, 0x6007, 0x0003, 0x080c, + 0x6cd3, 0x0020, 0x080c, 0x8c19, 0x080c, 0x8df6, 0x0005, 0x0469, + 0x1158, 0x2001, 0x0008, 0x080c, 0x4efd, 0x6003, 0x0001, 0x6007, + 0x0005, 0x080c, 0x6cd3, 0x0010, 0x080c, 0x8df6, 0x0005, 0x00e9, + 0x1158, 0x2001, 0x000a, 0x080c, 0x4efd, 0x6003, 0x0001, 0x6007, + 0x0001, 0x080c, 0x6cd3, 0x0010, 0x080c, 0x8df6, 0x0005, 0x2009, + 0xbb8e, 0x2104, 0xa086, 0x0003, 0x1138, 0x2009, 0xbb8f, 0x2104, + 0xa084, 0xff00, 0xa086, 0x2a00, 0x0005, 0xa085, 0x0001, 0x0005, + 0x00c6, 0x0016, 0xac88, 0x0006, 0x2164, 0x080c, 0x4fb8, 0x001e, + 0x00ce, 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x0036, 0x0016, 0x6018, + 0x2068, 0x2071, 0xb535, 0x2e04, 0xa085, 0x0003, 0x2072, 0x080c, + 0x9026, 0x0560, 0x2009, 0xb535, 0x2104, 0xc0cd, 0x200a, 0x2001, + 0xb553, 0x2004, 0xd0a4, 0x0158, 0xa006, 0x2020, 0x2009, 0x002a, + 0x080c, 0xb0e8, 0x2001, 0xb50c, 0x200c, 0xc195, 0x2102, 0x2019, + 0x002a, 0x2009, 0x0001, 0x080c, 0x2c6f, 0x2071, 0xb500, 0x080c, + 0x2ab8, 0x00c6, 0x0156, 0x20a9, 0x0081, 0x2009, 0x007f, 0x080c, + 0x2d97, 0x8108, 0x1f04, 0x8fd7, 0x015e, 0x00ce, 0x080c, 0x8f98, + 0x6813, 0x00ff, 0x6817, 0xfffe, 0x2071, 0xbb80, 0x2079, 0x0100, + 0x2e04, 0xa084, 0x00ff, 0x2069, 0xb51c, 0x206a, 0x78e6, 0x0006, + 0x8e70, 0x2e04, 0x2069, 0xb51d, 0x206a, 0x78ea, 0x7832, 0x7836, + 0x2010, 0xa084, 0xff00, 0x001e, 0xa105, 0x2009, 0xb528, 0x200a, + 0x2200, 0xa084, 0x00ff, 0x2008, 0x080c, 0x2847, 0x080c, 0x5acf, + 0x0170, 0x2069, 0xbb8e, 0x2071, 0xb7b2, 0x6810, 0x2072, 0x6814, + 0x7006, 0x6818, 0x700a, 0x681c, 0x700e, 0x080c, 0x9fd2, 0x0040, + 0x2001, 0x0006, 0x080c, 0x4efd, 0x080c, 0x2cc2, 0x080c, 0x861d, + 0x001e, 0x003e, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x0026, 0x0036, + 0x00e6, 0x0156, 0x2019, 0xb528, 0x231c, 0x83ff, 0x01e8, 0x2071, + 0xbb80, 0x2e14, 0xa294, 0x00ff, 0x7004, 0xa084, 0xff00, 0xa205, + 0xa306, 0x1190, 0x2011, 0xbb96, 0xad98, 0x000a, 0x20a9, 0x0004, + 0x080c, 0x90da, 0x1148, 0x2011, 0xbb9a, 0xad98, 0x0006, 0x20a9, + 0x0004, 0x080c, 0x90da, 0x1100, 0x015e, 0x00ee, 0x003e, 0x002e, + 0x0005, 0x00e6, 0x2071, 0xbb8c, 0x7004, 0xa086, 0x0014, 0x11a8, + 0x7008, 0xa086, 0x0800, 0x1188, 0x700c, 0xd0ec, 0x0160, 0xa084, + 0x0f00, 0xa086, 0x0100, 0x1138, 0x7024, 0xd0a4, 0x1110, 0xd0ac, + 0x0110, 0xa006, 0x0010, 0xa085, 0x0001, 0x00ee, 0x0005, 0x00e6, + 0x00d6, 0x00c6, 0x0076, 0x0056, 0x0046, 0x0026, 0x0006, 0x0126, + 0x2091, 0x8000, 0x2029, 0xb7e9, 0x252c, 0x2021, 0xb7ef, 0x2424, + 0x2061, 0xbd00, 0x2071, 0xb500, 0x7248, 0x7068, 0xa202, 0x16f0, + 0x080c, 0xb110, 0x05a0, 0x671c, 0xa786, 0x0001, 0x0580, 0xa786, + 0x0007, 0x0568, 0x2500, 0xac06, 0x0550, 0x2400, 0xac06, 0x0538, + 0x00c6, 0x6000, 0xa086, 0x0004, 0x1110, 0x080c, 0x194d, 0xa786, + 0x0008, 0x1148, 0x080c, 0x9e58, 0x1130, 0x00ce, 0x080c, 0x8c19, + 0x080c, 0x9e1d, 0x00a0, 0x6010, 0x2068, 0x080c, 0x9c5a, 0x0160, + 0xa786, 0x0003, 0x11e8, 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, + 0x080c, 0x5408, 0x080c, 0x9e11, 0x080c, 0x9e1d, 0x00ce, 0xace0, + 0x0018, 0x705c, 0xac02, 0x1210, 0x0804, 0x9084, 0x012e, 0x000e, + 0x002e, 0x004e, 0x005e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x0005, + 0xa786, 0x0006, 0x1118, 0x080c, 0xb099, 0x0c30, 0xa786, 0x000a, + 0x09e0, 0x08c8, 0x220c, 0x2304, 0xa106, 0x1130, 0x8210, 0x8318, + 0x1f04, 0x90da, 0xa006, 0x0005, 0x2304, 0xa102, 0x0218, 0x2001, + 0x0001, 0x0010, 0x2001, 0x0000, 0xa18d, 0x0001, 0x0005, 0x6004, + 0xa08a, 0x0080, 0x1a0c, 0x1515, 0x080c, 0x9e47, 0x0120, 0x080c, + 0x9e58, 0x0168, 0x0028, 0x080c, 0x2cc2, 0x080c, 0x9e58, 0x0138, + 0x080c, 0x7090, 0x080c, 0x861d, 0x080c, 0x7173, 0x0005, 0x080c, + 0x8c19, 0x0cb0, 0xa182, 0x0040, 0x0002, 0x9120, 0x9120, 0x9120, + 0x9120, 0x9120, 0x9120, 0x9120, 0x9120, 0x9120, 0x9120, 0x9120, + 0x9122, 0x9122, 0x9122, 0x9122, 0x9120, 0x9120, 0x9120, 0x9122, + 0x080c, 0x1515, 0x600b, 0xffff, 0x6003, 0x0001, 0x6106, 0x080c, + 0x6c8d, 0x0126, 0x2091, 0x8000, 0x080c, 0x7173, 0x012e, 0x0005, + 0xa186, 0x0013, 0x1128, 0x6004, 0xa082, 0x0040, 0x0804, 0x91bc, + 0xa186, 0x0027, 0x11e8, 0x080c, 0x7090, 0x080c, 0x2c9c, 0x00d6, + 0x6110, 0x2168, 0x080c, 0x9c5a, 0x0168, 0x6837, 0x0103, 0x684b, + 0x0029, 0x6847, 0x0000, 0x694c, 0xc1c5, 0x694e, 0x080c, 0x5408, + 0x080c, 0x9e11, 0x00de, 0x080c, 0x861d, 0x080c, 0x7173, 0x0005, + 0xa186, 0x0014, 0x1120, 0x6004, 0xa082, 0x0040, 0x0428, 0xa186, + 0x0046, 0x0138, 0xa186, 0x0045, 0x0120, 0xa186, 0x0047, 0x190c, + 0x1515, 0x2001, 0x0109, 0x2004, 0xd084, 0x0198, 0x0126, 0x2091, + 0x2800, 0x0006, 0x0016, 0x0026, 0x080c, 0x6b74, 0x002e, 0x001e, + 0x000e, 0x012e, 0xe000, 0x6000, 0xa086, 0x0002, 0x1110, 0x0804, + 0x91fa, 0x080c, 0x8663, 0x0005, 0x0002, 0x919a, 0x9198, 0x9198, + 0x9198, 0x9198, 0x9198, 0x9198, 0x9198, 0x9198, 0x9198, 0x9198, + 0x91b5, 0x91b5, 0x91b5, 0x91b5, 0x9198, 0x91b5, 0x9198, 0x91b5, + 0x080c, 0x1515, 0x080c, 0x7090, 0x00d6, 0x6110, 0x2168, 0x080c, + 0x9c5a, 0x0168, 0x6837, 0x0103, 0x684b, 0x0006, 0x6847, 0x0000, + 0x6850, 0xc0ec, 0x6852, 0x080c, 0x5408, 0x080c, 0x9e11, 0x00de, + 0x080c, 0x861d, 0x080c, 0x7173, 0x0005, 0x080c, 0x7090, 0x080c, + 0x861d, 0x080c, 0x7173, 0x0005, 0x0002, 0x91d2, 0x91d0, 0x91d0, + 0x91d0, 0x91d0, 0x91d0, 0x91d0, 0x91d0, 0x91d0, 0x91d0, 0x91d0, + 0x91e4, 0x91e4, 0x91e4, 0x91e4, 0x91d0, 0x91f3, 0x91d0, 0x91e4, + 0x080c, 0x1515, 0x080c, 0x7090, 0x2001, 0xb7b8, 0x2004, 0x603e, + 0x6003, 0x0002, 0x080c, 0x7173, 0x6010, 0xa088, 0x0013, 0x2104, + 0xa085, 0x0400, 0x200a, 0x0005, 0x080c, 0x7090, 0x2001, 0xb7b6, + 0x2004, 0x6016, 0x2001, 0xb7b8, 0x2004, 0x603e, 0x6003, 0x000f, + 0x080c, 0x7173, 0x0005, 0x080c, 0x7090, 0x080c, 0x861d, 0x080c, + 0x7173, 0x0005, 0xa182, 0x0040, 0x0002, 0x9210, 0x9210, 0x9210, + 0x9210, 0x9210, 0x9212, 0x92f7, 0x9326, 0x9210, 0x9210, 0x9210, + 0x9210, 0x9210, 0x9210, 0x9210, 0x9210, 0x9210, 0x9210, 0x9210, + 0x080c, 0x1515, 0x00e6, 0x00d6, 0x603f, 0x0000, 0x2071, 0xbb80, + 0x7124, 0x610a, 0x2071, 0xbb8c, 0x6110, 0x2168, 0x7614, 0xa6b4, + 0x0fff, 0x86ff, 0x0904, 0x92c0, 0xa68c, 0x0c00, 0x0518, 0x00f6, + 0x2c78, 0x080c, 0x5305, 0x00fe, 0x01c8, 0x684c, 0xd0ac, 0x01b0, + 0x6020, 0xd0dc, 0x1198, 0x6850, 0xd0bc, 0x1180, 0x7318, 0x6814, + 0xa306, 0x1904, 0x92d3, 0x731c, 0x6810, 0xa31e, 0x0138, 0xd6d4, + 0x0904, 0x92d3, 0x6b14, 0xa305, 0x1904, 0x92d3, 0x7318, 0x6b62, + 0x731c, 0x6b5e, 0xa68c, 0x00ff, 0xa186, 0x0002, 0x0518, 0xa186, + 0x0028, 0x1128, 0x080c, 0x9e36, 0x684b, 0x001c, 0x00e8, 0xd6dc, + 0x01a0, 0x684b, 0x0015, 0x684c, 0xd0ac, 0x0170, 0x6914, 0x6a10, + 0x2100, 0xa205, 0x0148, 0x7018, 0xa106, 0x1118, 0x701c, 0xa206, + 0x0118, 0x6962, 0x6a5e, 0xc6dc, 0x0038, 0xd6d4, 0x0118, 0x684b, + 0x0007, 0x0010, 0x684b, 0x0000, 0x6837, 0x0103, 0x6e46, 0xa01e, + 0xd6c4, 0x01f0, 0xa686, 0x0100, 0x1140, 0x2001, 0xbb99, 0x2004, + 0xa005, 0x1118, 0xc6c4, 0x0804, 0x9221, 0x7328, 0x732c, 0x6b56, + 0x83ff, 0x0170, 0xa38a, 0x0009, 0x0210, 0x2019, 0x0008, 0x0036, + 0x2308, 0x2019, 0xbb98, 0xad90, 0x0019, 0x080c, 0x990d, 0x003e, + 0xd6cc, 0x0904, 0x92e6, 0x7124, 0x695a, 0x81ff, 0x0904, 0x92e6, + 0xa192, 0x0021, 0x1260, 0x2071, 0xbb98, 0x831c, 0x2300, 0xae18, + 0xad90, 0x001d, 0x080c, 0x990d, 0x080c, 0xa137, 0x04b8, 0x6838, + 0xd0fc, 0x0120, 0x2009, 0x0020, 0x695a, 0x0c68, 0x00f6, 0x2d78, + 0x080c, 0x98b2, 0x00fe, 0x080c, 0xa137, 0x080c, 0x98fd, 0x0440, + 0x00f6, 0x2c78, 0x080c, 0x5305, 0x00fe, 0x0190, 0x684c, 0xd0ac, + 0x0178, 0x6020, 0xd0dc, 0x1160, 0x6850, 0xd0bc, 0x1148, 0x6810, + 0x6914, 0xa105, 0x0128, 0x080c, 0x9f35, 0x00de, 0x00ee, 0x00f0, + 0x684b, 0x0000, 0x6837, 0x0103, 0x6e46, 0x684c, 0xd0ac, 0x0130, + 0x6810, 0x6914, 0xa115, 0x0110, 0x080c, 0x9483, 0x080c, 0x5408, + 0x6218, 0x2268, 0x6a3c, 0x82ff, 0x0110, 0x8211, 0x6a3e, 0x080c, + 0x9f03, 0x00de, 0x00ee, 0x1110, 0x080c, 0x861d, 0x0005, 0x00f6, + 0x6003, 0x0003, 0x2079, 0xbb8c, 0x7c04, 0x7b00, 0x7e0c, 0x7d08, + 0x6010, 0x2078, 0x784c, 0xd0ac, 0x0138, 0x6003, 0x0002, 0x00fe, + 0x0005, 0x2130, 0x2228, 0x0058, 0x2400, 0x797c, 0xa10a, 0x2300, + 0x7a80, 0xa213, 0x2600, 0xa102, 0x2500, 0xa203, 0x0e90, 0x7c12, + 0x7b16, 0x7e0a, 0x7d0e, 0x00fe, 0x603f, 0x0000, 0x2c10, 0x080c, + 0x1fa9, 0x080c, 0x6cf0, 0x080c, 0x7230, 0x0005, 0x2001, 0xb7b8, + 0x2004, 0x603e, 0x6003, 0x0004, 0x6110, 0x20e1, 0x0005, 0x3d18, + 0x3e20, 0x2c10, 0x080c, 0x185e, 0x0005, 0xa182, 0x0040, 0x0002, + 0x934b, 0x934b, 0x934b, 0x934b, 0x934b, 0x934d, 0x93e0, 0x934b, + 0x934b, 0x93f6, 0x945a, 0x934b, 0x934b, 0x934b, 0x934b, 0x9469, + 0x934b, 0x934b, 0x934b, 0x080c, 0x1515, 0x0076, 0x00f6, 0x00e6, + 0x00d6, 0x2071, 0xbb8c, 0x6110, 0x2178, 0x7614, 0xa6b4, 0x0fff, + 0x7e46, 0x7f4c, 0xc7e5, 0x7f4e, 0x6218, 0x2268, 0x6a3c, 0x82ff, + 0x0110, 0x8211, 0x6a3e, 0x86ff, 0x0904, 0x93db, 0xa694, 0xff00, + 0xa284, 0x0c00, 0x0120, 0x7018, 0x7862, 0x701c, 0x785e, 0xa284, + 0x0300, 0x0904, 0x93db, 0x080c, 0x15f8, 0x090c, 0x1515, 0x2d00, + 0x784a, 0x7f4c, 0xc7cd, 0x7f4e, 0x6837, 0x0103, 0x7838, 0x683a, + 0x783c, 0x683e, 0x7840, 0x6842, 0x6e46, 0xa68c, 0x0c00, 0x0120, + 0x7318, 0x6b62, 0x731c, 0x6b5e, 0xa68c, 0x00ff, 0xa186, 0x0002, + 0x0180, 0xa186, 0x0028, 0x1118, 0x684b, 0x001c, 0x0060, 0xd6dc, + 0x0118, 0x684b, 0x0015, 0x0038, 0xd6d4, 0x0118, 0x684b, 0x0007, + 0x0010, 0x684b, 0x0000, 0x6f4e, 0x7850, 0x6852, 0x7854, 0x6856, + 0xa01e, 0xd6c4, 0x0198, 0x7328, 0x732c, 0x6b56, 0x83ff, 0x0170, + 0xa38a, 0x0009, 0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, + 0xbb98, 0xad90, 0x0019, 0x080c, 0x990d, 0x003e, 0xd6cc, 0x01d8, + 0x7124, 0x695a, 0x81ff, 0x01b8, 0xa192, 0x0021, 0x1250, 0x2071, + 0xbb98, 0x831c, 0x2300, 0xae18, 0xad90, 0x001d, 0x080c, 0x990d, + 0x0050, 0x7838, 0xd0fc, 0x0120, 0x2009, 0x0020, 0x695a, 0x0c78, + 0x2d78, 0x080c, 0x98b2, 0x00de, 0x00ee, 0x00fe, 0x007e, 0x0005, + 0x00f6, 0x6003, 0x0003, 0x2079, 0xbb8c, 0x7c04, 0x7b00, 0x7e0c, + 0x7d08, 0x6010, 0x2078, 0x7c12, 0x7b16, 0x7e0a, 0x7d0e, 0x00fe, + 0x2c10, 0x080c, 0x1fa9, 0x080c, 0x7d60, 0x0005, 0x00d6, 0x00f6, + 0x2c78, 0x080c, 0x5305, 0x00fe, 0x0120, 0x2001, 0xb7b8, 0x2004, + 0x603e, 0x6003, 0x0002, 0x080c, 0x7126, 0x080c, 0x7230, 0x6110, + 0x2168, 0x694c, 0xd1e4, 0x0904, 0x9458, 0xd1cc, 0x0540, 0x6948, + 0x6838, 0xd0fc, 0x01e8, 0x0016, 0x684c, 0x0006, 0x6850, 0x0006, + 0xad90, 0x000d, 0xa198, 0x000d, 0x2009, 0x0020, 0x0156, 0x21a8, + 0x2304, 0x2012, 0x8318, 0x8210, 0x1f04, 0x9420, 0x015e, 0x000e, + 0x6852, 0x000e, 0x684e, 0x001e, 0x2168, 0x080c, 0x161f, 0x0418, + 0x0016, 0x080c, 0x161f, 0x00de, 0x080c, 0x98fd, 0x00e0, 0x6837, + 0x0103, 0x6944, 0xa184, 0x00ff, 0xa0b6, 0x0002, 0x0180, 0xa086, + 0x0028, 0x1118, 0x684b, 0x001c, 0x0060, 0xd1dc, 0x0118, 0x684b, + 0x0015, 0x0038, 0xd1d4, 0x0118, 0x684b, 0x0007, 0x0010, 0x684b, + 0x0000, 0x080c, 0x5408, 0x080c, 0x9f03, 0x1110, 0x080c, 0x861d, + 0x00de, 0x0005, 0x2019, 0x0001, 0x080c, 0x7fe4, 0x6003, 0x0002, + 0x2001, 0xb7b8, 0x2004, 0x603e, 0x080c, 0x7126, 0x080c, 0x7230, + 0x0005, 0x080c, 0x7126, 0x080c, 0x2c9c, 0x00d6, 0x6110, 0x2168, + 0x080c, 0x9c5a, 0x0150, 0x6837, 0x0103, 0x684b, 0x0029, 0x6847, + 0x0000, 0x080c, 0x5408, 0x080c, 0x9e11, 0x00de, 0x080c, 0x861d, + 0x080c, 0x7230, 0x0005, 0x684b, 0x0015, 0xd1fc, 0x0138, 0x684b, + 0x0007, 0x8002, 0x8000, 0x810a, 0xa189, 0x0000, 0x6962, 0x685e, + 0x0005, 0xa182, 0x0040, 0x0002, 0x94a7, 0x94a7, 0x94a7, 0x94a7, + 0x94a7, 0x94a9, 0x94a7, 0x9564, 0x9570, 0x94a7, 0x94a7, 0x94a7, + 0x94a7, 0x94a7, 0x94a7, 0x94a7, 0x94a7, 0x94a7, 0x94a7, 0x080c, + 0x1515, 0x0076, 0x00f6, 0x00e6, 0x00d6, 0x2071, 0xbb8c, 0x6110, + 0x2178, 0x7614, 0xa6b4, 0x0fff, 0x00f6, 0x2c78, 0x080c, 0x5305, + 0x00fe, 0x0150, 0xa684, 0x00ff, 0x1138, 0x6020, 0xd0f4, 0x0120, + 0x080c, 0x9f35, 0x0804, 0x955f, 0x7e46, 0x7f4c, 0xc7e5, 0x7f4e, + 0x6218, 0x2268, 0x6a3c, 0x82ff, 0x0110, 0x8211, 0x6a3e, 0x86ff, + 0x0904, 0x9555, 0xa694, 0xff00, 0xa284, 0x0c00, 0x0120, 0x7018, + 0x7862, 0x701c, 0x785e, 0xa284, 0x0300, 0x0904, 0x9553, 0xa686, + 0x0100, 0x1140, 0x2001, 0xbb99, 0x2004, 0xa005, 0x1118, 0xc6c4, + 0x7e46, 0x0c28, 0x080c, 0x15f8, 0x090c, 0x1515, 0x2d00, 0x784a, + 0x7f4c, 0xa7bd, 0x0200, 0x7f4e, 0x6837, 0x0103, 0x7838, 0x683a, + 0x783c, 0x683e, 0x7840, 0x6842, 0x6e46, 0xa68c, 0x0c00, 0x0120, + 0x7318, 0x6b62, 0x731c, 0x6b5e, 0xa68c, 0x00ff, 0xa186, 0x0002, + 0x0180, 0xa186, 0x0028, 0x1118, 0x684b, 0x001c, 0x0060, 0xd6dc, + 0x0118, 0x684b, 0x0015, 0x0038, 0xd6d4, 0x0118, 0x684b, 0x0007, + 0x0010, 0x684b, 0x0000, 0x6f4e, 0x7850, 0x6852, 0x7854, 0x6856, + 0xa01e, 0xd6c4, 0x0198, 0x7328, 0x732c, 0x6b56, 0x83ff, 0x0170, + 0xa38a, 0x0009, 0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, + 0xbb98, 0xad90, 0x0019, 0x080c, 0x990d, 0x003e, 0xd6cc, 0x01d8, + 0x7124, 0x695a, 0x81ff, 0x01b8, 0xa192, 0x0021, 0x1250, 0x2071, + 0xbb98, 0x831c, 0x2300, 0xae18, 0xad90, 0x001d, 0x080c, 0x990d, + 0x0050, 0x7838, 0xd0fc, 0x0120, 0x2009, 0x0020, 0x695a, 0x0c78, + 0x2d78, 0x080c, 0x98b2, 0xd6dc, 0x1110, 0xa006, 0x0030, 0x2001, + 0x0001, 0x2071, 0xbb8c, 0x7218, 0x731c, 0x080c, 0x18b1, 0x00de, + 0x00ee, 0x00fe, 0x007e, 0x0005, 0x2001, 0xb7b8, 0x2004, 0x603e, + 0x20e1, 0x0005, 0x3d18, 0x3e20, 0x2c10, 0x080c, 0x185e, 0x0005, + 0x2001, 0xb7b8, 0x2004, 0x603e, 0x00d6, 0x6003, 0x0002, 0x6110, + 0x2168, 0x694c, 0xd1e4, 0x0904, 0x967b, 0x603f, 0x0000, 0x00f6, + 0x2c78, 0x080c, 0x5305, 0x00fe, 0x0560, 0x6814, 0x6910, 0xa115, + 0x0540, 0x6a60, 0xa206, 0x1118, 0x685c, 0xa106, 0x0510, 0x684c, + 0xc0e4, 0x684e, 0x6847, 0x0000, 0x6863, 0x0000, 0x685f, 0x0000, + 0x6020, 0xd0f4, 0x1158, 0x697c, 0x6810, 0xa102, 0x603a, 0x6980, + 0x6814, 0xa103, 0x6036, 0x6020, 0xc0f5, 0x6022, 0x00d6, 0x6018, + 0x2068, 0x683c, 0x8000, 0x683e, 0x00de, 0x080c, 0x9f35, 0x0804, + 0x967b, 0x694c, 0xd1cc, 0x0904, 0x964b, 0x6948, 0x6838, 0xd0fc, + 0x0904, 0x960e, 0x0016, 0x684c, 0x0006, 0x6850, 0x0006, 0x00f6, + 0x2178, 0x7944, 0xa184, 0x00ff, 0xa0b6, 0x0002, 0x01e0, 0xa086, + 0x0028, 0x1128, 0x684b, 0x001c, 0x784b, 0x001c, 0x00e8, 0xd1dc, + 0x0158, 0x684b, 0x0015, 0x784b, 0x0015, 0x080c, 0xa0bf, 0x0118, + 0x7944, 0xc1dc, 0x7946, 0x0080, 0xd1d4, 0x0128, 0x684b, 0x0007, + 0x784b, 0x0007, 0x0048, 0x684c, 0xd0ac, 0x0130, 0x6810, 0x6914, + 0xa115, 0x0110, 0x080c, 0x9483, 0x6848, 0x784a, 0x6860, 0x7862, + 0x685c, 0x785e, 0xad90, 0x000d, 0xaf98, 0x000d, 0x2009, 0x0020, + 0x0156, 0x21a8, 0x2304, 0x2012, 0x8318, 0x8210, 0x1f04, 0x95fa, + 0x015e, 0x00fe, 0x000e, 0x6852, 0x000e, 0x684e, 0x080c, 0xa137, + 0x001e, 0x2168, 0x080c, 0x161f, 0x0804, 0x9676, 0x0016, 0x00f6, + 0x2178, 0x7944, 0xa184, 0x00ff, 0xa0b6, 0x0002, 0x01e0, 0xa086, + 0x0028, 0x1128, 0x684b, 0x001c, 0x784b, 0x001c, 0x00e8, 0xd1dc, + 0x0158, 0x684b, 0x0015, 0x784b, 0x0015, 0x080c, 0xa0bf, 0x0118, + 0x7944, 0xc1dc, 0x7946, 0x0080, 0xd1d4, 0x0128, 0x684b, 0x0007, + 0x784b, 0x0007, 0x0048, 0x684c, 0xd0ac, 0x0130, 0x6810, 0x6914, + 0xa115, 0x0110, 0x080c, 0x9483, 0x6860, 0x7862, 0x685c, 0x785e, + 0x684c, 0x784e, 0x00fe, 0x080c, 0x161f, 0x00de, 0x080c, 0xa137, + 0x080c, 0x98fd, 0x0458, 0x6837, 0x0103, 0x6944, 0xa184, 0x00ff, + 0xa0b6, 0x0002, 0x01b0, 0xa086, 0x0028, 0x1118, 0x684b, 0x001c, + 0x00d8, 0xd1dc, 0x0148, 0x684b, 0x0015, 0x080c, 0xa0bf, 0x0118, + 0x6944, 0xc1dc, 0x6946, 0x0080, 0xd1d4, 0x0118, 0x684b, 0x0007, + 0x0058, 0x684b, 0x0000, 0x684c, 0xd0ac, 0x0130, 0x6810, 0x6914, + 0xa115, 0x0110, 0x080c, 0x9483, 0x080c, 0x5408, 0x080c, 0x9f03, + 0x1110, 0x080c, 0x861d, 0x00de, 0x0005, 0x080c, 0x7090, 0x0010, + 0x080c, 0x7126, 0x080c, 0x9c5a, 0x01c0, 0x00d6, 0x6110, 0x2168, + 0x6837, 0x0103, 0x2009, 0xb50c, 0x210c, 0xd18c, 0x11c0, 0xd184, + 0x1198, 0x6108, 0x694a, 0xa18e, 0x0029, 0x1110, 0x080c, 0xb380, + 0x6847, 0x0000, 0x080c, 0x5408, 0x00de, 0x080c, 0x861d, 0x080c, + 0x7173, 0x080c, 0x7230, 0x0005, 0x684b, 0x0004, 0x0c88, 0x684b, + 0x0004, 0x0c70, 0xa182, 0x0040, 0x0002, 0x96c0, 0x96c0, 0x96c0, + 0x96c0, 0x96c0, 0x96c2, 0x96c0, 0x96c5, 0x96c0, 0x96c0, 0x96c0, + 0x96c0, 0x96c0, 0x96c0, 0x96c0, 0x96c0, 0x96c0, 0x96c0, 0x96c0, + 0x080c, 0x1515, 0x080c, 0x861d, 0x0005, 0x0006, 0x0026, 0xa016, + 0x080c, 0x185e, 0x002e, 0x000e, 0x0005, 0xa182, 0x0085, 0x0002, + 0x96d9, 0x96d7, 0x96d7, 0x96e5, 0x96d7, 0x96d7, 0x96d7, 0x080c, + 0x1515, 0x6003, 0x0001, 0x6106, 0x080c, 0x6c8d, 0x0126, 0x2091, + 0x8000, 0x080c, 0x7173, 0x012e, 0x0005, 0x0026, 0x0056, 0x00d6, + 0x00e6, 0x2071, 0xbb80, 0x7224, 0x6212, 0x7220, 0x080c, 0x9c4a, + 0x01a0, 0x2268, 0x6800, 0xa086, 0x0000, 0x0178, 0x6018, 0x6d18, + 0xa52e, 0x1158, 0x00c6, 0x2d60, 0x080c, 0x991d, 0x00ce, 0x0128, + 0x6803, 0x0002, 0x6007, 0x0086, 0x0010, 0x6007, 0x0087, 0x6003, + 0x0001, 0x080c, 0x6c8d, 0x080c, 0x7173, 0x00f6, 0x2278, 0x080c, + 0x5305, 0x00fe, 0x0150, 0x6820, 0xd0ec, 0x0138, 0x00c6, 0x2260, + 0x603f, 0x0000, 0x080c, 0x9f35, 0x00ce, 0x00ee, 0x00de, 0x005e, + 0x002e, 0x0005, 0xa186, 0x0013, 0x1160, 0x6004, 0xa08a, 0x0085, + 0x0a0c, 0x1515, 0xa08a, 0x008c, 0x1a0c, 0x1515, 0xa082, 0x0085, + 0x0072, 0xa186, 0x0027, 0x0120, 0xa186, 0x0014, 0x190c, 0x1515, + 0x080c, 0x7090, 0x080c, 0x9e1d, 0x080c, 0x7173, 0x0005, 0x9746, + 0x9748, 0x9748, 0x9746, 0x9746, 0x9746, 0x9746, 0x080c, 0x1515, + 0x080c, 0x7090, 0x080c, 0x9e1d, 0x080c, 0x7173, 0x0005, 0xa186, + 0x0013, 0x1128, 0x6004, 0xa082, 0x0085, 0x2008, 0x04a8, 0xa186, + 0x0027, 0x11e8, 0x080c, 0x7090, 0x080c, 0x2c9c, 0x00d6, 0x6010, + 0x2068, 0x080c, 0x9c5a, 0x0150, 0x6837, 0x0103, 0x6847, 0x0000, + 0x684b, 0x0029, 0x080c, 0x5408, 0x080c, 0x9e11, 0x00de, 0x080c, + 0x861d, 0x080c, 0x7173, 0x0005, 0x080c, 0x8663, 0x0ce0, 0xa186, + 0x0014, 0x1dd0, 0x080c, 0x7090, 0x00d6, 0x6010, 0x2068, 0x080c, + 0x9c5a, 0x0d60, 0x6837, 0x0103, 0x6847, 0x0000, 0x684b, 0x0006, + 0x6850, 0xc0ec, 0x6852, 0x08f0, 0x0002, 0x9796, 0x9794, 0x9794, + 0x9794, 0x9794, 0x9794, 0x97ae, 0x080c, 0x1515, 0x080c, 0x7090, + 0x6030, 0xa08c, 0xff00, 0x810f, 0xa186, 0x0039, 0x0118, 0xa186, + 0x0035, 0x1118, 0x2001, 0xb7b6, 0x0010, 0x2001, 0xb7b7, 0x2004, + 0x6016, 0x6003, 0x000c, 0x080c, 0x7173, 0x0005, 0x080c, 0x7090, + 0x6030, 0xa08c, 0xff00, 0x810f, 0xa186, 0x0039, 0x0118, 0xa186, + 0x0035, 0x1118, 0x2001, 0xb7b6, 0x0010, 0x2001, 0xb7b7, 0x2004, + 0x6016, 0x6003, 0x000e, 0x080c, 0x7173, 0x0005, 0xa182, 0x008c, + 0x1220, 0xa182, 0x0085, 0x0208, 0x001a, 0x080c, 0x8663, 0x0005, + 0x97d7, 0x97d7, 0x97d7, 0x97d7, 0x97d9, 0x9832, 0x97d7, 0x080c, + 0x1515, 0x00d6, 0x00f6, 0x2c78, 0x080c, 0x5305, 0x00fe, 0x0168, + 0x6030, 0xa08c, 0xff00, 0x810f, 0xa186, 0x0039, 0x0118, 0xa186, + 0x0035, 0x1118, 0x00de, 0x0804, 0x9845, 0x080c, 0x9c5a, 0x1118, + 0x080c, 0x9e11, 0x00f0, 0x6010, 0x2068, 0x684c, 0xd0e4, 0x1110, + 0x080c, 0x9e11, 0x6837, 0x0103, 0x6850, 0xd0b4, 0x0128, 0x684b, + 0x0006, 0xc0ec, 0x6852, 0x0048, 0xd0bc, 0x0118, 0x684b, 0x0002, + 0x0020, 0x684b, 0x0005, 0x080c, 0x9ed2, 0x6847, 0x0000, 0x080c, + 0x5408, 0x2c68, 0x080c, 0x85c7, 0x01c0, 0x6003, 0x0001, 0x6007, + 0x001e, 0x600b, 0xffff, 0x2009, 0xbb8e, 0x210c, 0x6136, 0x2009, + 0xbb8f, 0x210c, 0x613a, 0x6918, 0x611a, 0x080c, 0xa027, 0x6950, + 0x6152, 0x601f, 0x0001, 0x080c, 0x6c8d, 0x2d60, 0x080c, 0x861d, + 0x00de, 0x0005, 0x00f6, 0x2c78, 0x080c, 0x5305, 0x00fe, 0x0598, + 0x6030, 0xa08c, 0xff00, 0x810f, 0xa186, 0x0035, 0x0130, 0xa186, + 0x001e, 0x0118, 0xa186, 0x0039, 0x1530, 0x00d6, 0x2c68, 0x080c, + 0xa10a, 0x1904, 0x988a, 0x080c, 0x85c7, 0x01d8, 0x6106, 0x6003, + 0x0001, 0x601f, 0x0001, 0x6918, 0x611a, 0x6928, 0x612a, 0x692c, + 0x612e, 0x6930, 0xa18c, 0x00ff, 0x6132, 0x6934, 0x6136, 0x6938, + 0x613a, 0x6950, 0x6152, 0x080c, 0xa027, 0x080c, 0x6c8d, 0x080c, + 0x7173, 0x2d60, 0x00f8, 0x00d6, 0x6010, 0x2068, 0x080c, 0x9c5a, + 0x01c8, 0x6837, 0x0103, 0x6850, 0xd0b4, 0x0128, 0xc0ec, 0x6852, + 0x684b, 0x0006, 0x0048, 0xd0bc, 0x0118, 0x684b, 0x0002, 0x0020, + 0x684b, 0x0005, 0x080c, 0x9ed2, 0x6847, 0x0000, 0x080c, 0x5408, + 0x080c, 0x9e11, 0x00de, 0x080c, 0x861d, 0x0005, 0x0016, 0x00d6, + 0x6010, 0x2068, 0x080c, 0x9c5a, 0x0140, 0x6837, 0x0103, 0x684b, + 0x0028, 0x6847, 0x0000, 0x080c, 0x5408, 0x00de, 0x001e, 0xa186, + 0x0013, 0x0148, 0xa186, 0x0014, 0x0130, 0xa186, 0x0027, 0x0118, + 0x080c, 0x8663, 0x0030, 0x080c, 0x7090, 0x080c, 0x9e1d, 0x080c, + 0x7173, 0x0005, 0x0056, 0x0066, 0x00d6, 0x00f6, 0x2029, 0x0001, + 0xa182, 0x0101, 0x1208, 0x0010, 0x2009, 0x0100, 0x2130, 0x2069, + 0xbb98, 0x831c, 0x2300, 0xad18, 0x2009, 0x0020, 0xaf90, 0x001d, + 0x080c, 0x990d, 0xa6b2, 0x0020, 0x7804, 0xa06d, 0x0110, 0x080c, + 0x161f, 0x080c, 0x15f8, 0x0500, 0x8528, 0x6837, 0x0110, 0x683b, + 0x0000, 0x2d20, 0x7c06, 0xa68a, 0x003d, 0x1228, 0x2608, 0xad90, + 0x000f, 0x0459, 0x0088, 0xa6b2, 0x003c, 0x2009, 0x003c, 0x2d78, + 0xad90, 0x000f, 0x0411, 0x0c28, 0x00fe, 0x852f, 0xa5ad, 0x0003, + 0x7d36, 0xa5ac, 0x0000, 0x0028, 0x00fe, 0x852f, 0xa5ad, 0x0003, + 0x7d36, 0x00de, 0x006e, 0x005e, 0x0005, 0x00f6, 0x8dff, 0x0158, + 0x6804, 0xa07d, 0x0130, 0x6807, 0x0000, 0x080c, 0x5408, 0x2f68, + 0x0cb8, 0x080c, 0x5408, 0x00fe, 0x0005, 0x0156, 0xa184, 0x0001, + 0x0108, 0x8108, 0x810c, 0x21a8, 0x2304, 0x8007, 0x2012, 0x8318, + 0x8210, 0x1f04, 0x9914, 0x015e, 0x0005, 0x0066, 0x0126, 0x2091, + 0x8000, 0x2031, 0x0001, 0x601c, 0xa084, 0x000f, 0x0083, 0x012e, + 0x006e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0066, 0x2031, 0x0000, + 0x601c, 0xa084, 0x000f, 0x001b, 0x006e, 0x012e, 0x0005, 0x9954, + 0x9954, 0x994f, 0x9976, 0x9942, 0x994f, 0x9976, 0x994f, 0x994f, + 0x9942, 0x994f, 0x080c, 0x1515, 0x0036, 0x2019, 0x0010, 0x080c, + 0xace0, 0x601f, 0x0006, 0x6003, 0x0007, 0x003e, 0x0005, 0xa006, + 0x0005, 0xa085, 0x0001, 0x0005, 0x00d6, 0x86ff, 0x11d8, 0x6010, + 0x2068, 0x080c, 0x9c5a, 0x01c0, 0x6834, 0xa086, 0x0139, 0x1128, + 0x684b, 0x0005, 0x6853, 0x0000, 0x0028, 0xa00e, 0x2001, 0x0005, + 0x080c, 0x54db, 0x080c, 0x9ed2, 0x080c, 0x5408, 0x080c, 0x861d, + 0xa085, 0x0001, 0x00de, 0x0005, 0xa006, 0x0ce0, 0x6000, 0xa08a, + 0x0010, 0x1a0c, 0x1515, 0x000b, 0x0005, 0x998d, 0x99ae, 0x998f, + 0x99cd, 0x99ab, 0x998d, 0x994f, 0x9954, 0x9954, 0x994f, 0x994f, + 0x994f, 0x994f, 0x994f, 0x994f, 0x994f, 0x080c, 0x1515, 0x86ff, + 0x11b8, 0x601c, 0xa086, 0x0006, 0x0198, 0x00d6, 0x6010, 0x2068, + 0x080c, 0x9c5a, 0x0110, 0x080c, 0x9ed2, 0x00de, 0x6007, 0x0085, + 0x6003, 0x000b, 0x601f, 0x0002, 0x080c, 0x6c8d, 0x080c, 0x7173, + 0xa085, 0x0001, 0x0005, 0x080c, 0x194d, 0x0c08, 0x00e6, 0x2071, + 0xb7e0, 0x7024, 0xac06, 0x1110, 0x080c, 0x7f59, 0x601c, 0xa084, + 0x000f, 0xa086, 0x0006, 0x1150, 0x0086, 0x0096, 0x2049, 0x0001, + 0x2c40, 0x080c, 0x8130, 0x009e, 0x008e, 0x0010, 0x080c, 0x7e58, + 0x00ee, 0x1928, 0x080c, 0x994f, 0x0005, 0x0036, 0x00e6, 0x2071, + 0xb7e0, 0x703c, 0xac06, 0x1140, 0x2019, 0x0000, 0x080c, 0x7fe4, + 0x00ee, 0x003e, 0x0804, 0x998f, 0x080c, 0x825d, 0x00ee, 0x003e, + 0x1904, 0x998f, 0x080c, 0x994f, 0x0005, 0x00c6, 0x601c, 0xa084, + 0x000f, 0x0013, 0x00ce, 0x0005, 0x99fe, 0x9a6b, 0x9bb9, 0x9a09, + 0x9e1d, 0x99fe, 0xacd2, 0xa14e, 0x9a6b, 0x99f7, 0x9c24, 0x080c, + 0x1515, 0x080c, 0x9e58, 0x1110, 0x080c, 0x8c19, 0x0005, 0x080c, + 0x7090, 0x080c, 0x7173, 0x080c, 0x861d, 0x0005, 0x6017, 0x0001, + 0x0005, 0x080c, 0x9c5a, 0x0120, 0x6010, 0xa080, 0x0019, 0x2c02, + 0x6000, 0xa08a, 0x0010, 0x1a0c, 0x1515, 0x000b, 0x0005, 0x9a27, + 0x9a29, 0x9a49, 0x9a5b, 0x9a68, 0x9a27, 0x99fe, 0x99fe, 0x99fe, + 0x9a5b, 0x9a5b, 0x9a27, 0x9a27, 0x9a27, 0x9a27, 0x9a65, 0x080c, + 0x1515, 0x00e6, 0x6010, 0x2070, 0x7050, 0xc0b5, 0x7052, 0x2071, + 0xb7e0, 0x7024, 0xac06, 0x0190, 0x080c, 0x7e58, 0x6007, 0x0085, + 0x6003, 0x000b, 0x601f, 0x0002, 0x2001, 0xb7b7, 0x2004, 0x6016, + 0x080c, 0x6c8d, 0x080c, 0x7173, 0x00ee, 0x0005, 0x6017, 0x0001, + 0x0cd8, 0x00d6, 0x6010, 0x2068, 0x6850, 0xc0b5, 0x6852, 0x00de, + 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, 0x0002, 0x080c, 0x6c8d, + 0x080c, 0x7173, 0x0005, 0x00d6, 0x6017, 0x0001, 0x6010, 0x2068, + 0x6850, 0xc0b5, 0x6852, 0x00de, 0x0005, 0x080c, 0x861d, 0x0005, + 0x080c, 0x194d, 0x08f0, 0x6000, 0xa08a, 0x0010, 0x1a0c, 0x1515, + 0x000b, 0x0005, 0x9a82, 0x9a06, 0x9a84, 0x9a82, 0x9a84, 0x9a84, + 0x99ff, 0x9a82, 0x99f9, 0x99f9, 0x9a82, 0x9a82, 0x9a82, 0x9a82, + 0x9a82, 0x9a82, 0x080c, 0x1515, 0x00d6, 0x6018, 0x2068, 0x6804, + 0xa084, 0x00ff, 0x00de, 0xa08a, 0x000c, 0x1a0c, 0x1515, 0x000b, + 0x0005, 0x9a9d, 0x9b5f, 0x9a9f, 0x9add, 0x9a9f, 0x9add, 0x9a9f, + 0x9aad, 0x9a9d, 0x9add, 0x9a9d, 0x9ac9, 0x080c, 0x1515, 0x6004, + 0xa08e, 0x0016, 0x05a8, 0xa08e, 0x0004, 0x0590, 0xa08e, 0x0002, + 0x0578, 0xa08e, 0x004b, 0x0904, 0x9b5b, 0x6004, 0x080c, 0x9e58, + 0x0904, 0x9b78, 0xa08e, 0x0021, 0x0904, 0x9b7c, 0xa08e, 0x0022, + 0x0904, 0x9b78, 0xa08e, 0x003d, 0x0904, 0x9b7c, 0xa08e, 0x0039, + 0x0904, 0x9b80, 0xa08e, 0x0035, 0x0904, 0x9b80, 0xa08e, 0x001e, + 0x0188, 0xa08e, 0x0001, 0x1150, 0x00d6, 0x6018, 0x2068, 0x6804, + 0xa084, 0x00ff, 0x00de, 0xa086, 0x0006, 0x0110, 0x080c, 0x2c9c, + 0x080c, 0x8c19, 0x080c, 0x9e1d, 0x0005, 0x00c6, 0x00d6, 0x6104, + 0xa186, 0x0016, 0x0904, 0x9b4c, 0xa186, 0x0002, 0x15d8, 0x2001, + 0xb535, 0x2004, 0xd08c, 0x1198, 0x080c, 0x5acf, 0x1180, 0x2001, + 0xb79f, 0x2003, 0x0001, 0x2001, 0xb500, 0x2003, 0x0001, 0xa085, + 0x0001, 0x080c, 0x5b13, 0x080c, 0x5a07, 0x0804, 0x9ba2, 0x6018, + 0x2068, 0x2001, 0xb535, 0x2004, 0xd0ac, 0x1904, 0x9ba2, 0x68a0, + 0xd0bc, 0x1904, 0x9ba2, 0x6840, 0xa084, 0x00ff, 0xa005, 0x0190, + 0x8001, 0x6842, 0x6013, 0x0000, 0x601f, 0x0007, 0x6017, 0x0398, + 0x603f, 0x0000, 0x080c, 0x85c7, 0x0128, 0x2d00, 0x601a, 0x601f, + 0x0001, 0x0450, 0x00de, 0x00ce, 0x6004, 0xa08e, 0x0002, 0x11a8, + 0x6018, 0xa080, 0x0028, 0x2004, 0xa086, 0x007e, 0x1170, 0x2009, + 0xb535, 0x2104, 0xc085, 0x200a, 0x00e6, 0x2071, 0xb500, 0x080c, + 0x4bc6, 0x00ee, 0x080c, 0x8c19, 0x0020, 0x080c, 0x8c19, 0x080c, + 0x2c9c, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x2cc2, 0x012e, + 0x00ee, 0x080c, 0x9e1d, 0x0005, 0x2001, 0x0002, 0x080c, 0x4efd, + 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x6cd3, 0x080c, 0x7173, + 0x00de, 0x00ce, 0x0c80, 0x080c, 0x2cc2, 0x0804, 0x9ad8, 0x00c6, + 0x00d6, 0x6104, 0xa186, 0x0016, 0x0d38, 0x6018, 0x2068, 0x6840, + 0xa084, 0x00ff, 0xa005, 0x0904, 0x9b22, 0x8001, 0x6842, 0x6003, + 0x0001, 0x080c, 0x6cd3, 0x080c, 0x7173, 0x00de, 0x00ce, 0x0898, + 0x080c, 0x8c19, 0x0804, 0x9ada, 0x080c, 0x8c47, 0x0804, 0x9ada, + 0x00d6, 0x2c68, 0x6104, 0x080c, 0xa10a, 0x00de, 0x0118, 0x080c, + 0x861d, 0x00b8, 0x6004, 0x8007, 0x6130, 0xa18c, 0x00ff, 0xa105, + 0x6032, 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, 0x0002, 0x6038, + 0x600a, 0x2001, 0xb7b7, 0x2004, 0x6016, 0x080c, 0x6c8d, 0x080c, + 0x7173, 0x0005, 0x00de, 0x00ce, 0x080c, 0x8c19, 0x080c, 0x2c9c, + 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x2cc2, 0x6013, 0x0000, + 0x601f, 0x0007, 0x6017, 0x0398, 0x603f, 0x0000, 0x012e, 0x00ee, + 0x0005, 0x6000, 0xa08a, 0x0010, 0x1a0c, 0x1515, 0x000b, 0x0005, + 0x9bd0, 0x9bd0, 0x9bd0, 0x9bd0, 0x9bd0, 0x9bd0, 0x9bd0, 0x9bd0, + 0x9bd0, 0x99fe, 0x9bd0, 0x9a06, 0x9bd2, 0x9a06, 0x9bdf, 0x9bd0, + 0x080c, 0x1515, 0x6004, 0xa086, 0x008b, 0x0148, 0x6007, 0x008b, + 0x6003, 0x000d, 0x080c, 0x6c8d, 0x080c, 0x7173, 0x0005, 0x080c, + 0x9e11, 0x080c, 0x9c5a, 0x0580, 0x080c, 0x2c9c, 0x00d6, 0x080c, + 0x9c5a, 0x0168, 0x6010, 0x2068, 0x6837, 0x0103, 0x684b, 0x0006, + 0x6847, 0x0000, 0x6850, 0xc0ed, 0x6852, 0x080c, 0x5408, 0x2c68, + 0x080c, 0x85c7, 0x0150, 0x6818, 0x601a, 0x080c, 0xa027, 0x00c6, + 0x2d60, 0x080c, 0x9e1d, 0x00ce, 0x0008, 0x2d60, 0x00de, 0x6013, + 0x0000, 0x601f, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, + 0x6cd3, 0x080c, 0x7173, 0x0078, 0x6030, 0xa08c, 0xff00, 0x810f, + 0xa186, 0x0039, 0x0118, 0xa186, 0x0035, 0x1118, 0x080c, 0x2c9c, + 0x08b0, 0x080c, 0x9e1d, 0x0005, 0x6000, 0xa08a, 0x0010, 0x1a0c, + 0x1515, 0x000b, 0x0005, 0x9c3b, 0x9c3b, 0x9c3b, 0x9c3d, 0x9c3d, + 0x9c3b, 0x9c3b, 0x9c3b, 0x9c3b, 0x9c3b, 0x9c3b, 0x9c3b, 0x9c3b, + 0x9c3b, 0x9c3b, 0x9c3b, 0x080c, 0x1515, 0x080c, 0x825d, 0x190c, + 0x1515, 0x6110, 0x2168, 0x684b, 0x0006, 0x080c, 0x5408, 0x080c, + 0x861d, 0x0005, 0xa284, 0x0007, 0x1158, 0xa282, 0xbd00, 0x0240, + 0x2001, 0xb517, 0x2004, 0xa202, 0x1218, 0xa085, 0x0001, 0x0005, + 0xa006, 0x0ce8, 0x0026, 0x6210, 0xa294, 0xf000, 0x002e, 0x0005, + 0x00e6, 0x00c6, 0x0036, 0x0006, 0x0126, 0x2091, 0x8000, 0x2061, + 0xbd00, 0x2071, 0xb500, 0x7348, 0x7068, 0xa302, 0x12a8, 0x601c, + 0xa206, 0x1160, 0x080c, 0x9fb2, 0x0148, 0x080c, 0x9e58, 0x1110, + 0x080c, 0x8c19, 0x00c6, 0x080c, 0x861d, 0x00ce, 0xace0, 0x0018, + 0x705c, 0xac02, 0x1208, 0x0c38, 0x012e, 0x000e, 0x003e, 0x00ce, + 0x00ee, 0x0005, 0x00e6, 0x00c6, 0x0016, 0xa188, 0xb635, 0x210c, + 0x81ff, 0x0128, 0x2061, 0xb8f4, 0x611a, 0x080c, 0x2c9c, 0xa006, + 0x0010, 0xa085, 0x0001, 0x001e, 0x00ce, 0x00ee, 0x0005, 0x00c6, + 0x0056, 0x0126, 0x2091, 0x8000, 0x00c6, 0x080c, 0x85c7, 0x005e, + 0x0180, 0x6612, 0x651a, 0x080c, 0xa027, 0x601f, 0x0003, 0x2009, + 0x004b, 0x080c, 0x864c, 0xa085, 0x0001, 0x012e, 0x005e, 0x00ce, + 0x0005, 0xa006, 0x0cd0, 0x00c6, 0x0056, 0x0126, 0x2091, 0x8000, + 0x62a0, 0x00c6, 0x080c, 0x9ed6, 0x005e, 0x0550, 0x6013, 0x0000, + 0x651a, 0x080c, 0xa027, 0x601f, 0x0003, 0x0016, 0x00c6, 0x2560, + 0x080c, 0x51aa, 0x00ce, 0x080c, 0x6df5, 0x0076, 0x2039, 0x0000, + 0x080c, 0x6d02, 0x2c08, 0x080c, 0xae82, 0x007e, 0x001e, 0xd184, + 0x0128, 0x080c, 0x861d, 0xa085, 0x0001, 0x0030, 0x2009, 0x004c, + 0x080c, 0x864c, 0xa085, 0x0001, 0x012e, 0x005e, 0x00ce, 0x0005, + 0xa006, 0x0cd0, 0x00f6, 0x00c6, 0x0046, 0x00c6, 0x080c, 0x85c7, + 0x2c78, 0x00ce, 0x0180, 0x7e12, 0x2c00, 0x781a, 0x781f, 0x0003, + 0x2021, 0x0005, 0x080c, 0x9d50, 0x2f60, 0x2009, 0x004d, 0x080c, + 0x864c, 0xa085, 0x0001, 0x004e, 0x00ce, 0x00fe, 0x0005, 0x00f6, + 0x00c6, 0x0046, 0x00c6, 0x080c, 0x85c7, 0x2c78, 0x00ce, 0x0178, + 0x7e12, 0x2c00, 0x781a, 0x781f, 0x0003, 0x2021, 0x0005, 0x0481, + 0x2f60, 0x2009, 0x004e, 0x080c, 0x864c, 0xa085, 0x0001, 0x004e, + 0x00ce, 0x00fe, 0x0005, 0x00f6, 0x00c6, 0x0046, 0x00c6, 0x080c, + 0x85c7, 0x2c78, 0x00ce, 0x01c0, 0x7e12, 0x2c00, 0x781a, 0x781f, + 0x0003, 0x2021, 0x0004, 0x00a1, 0x2001, 0xb7a0, 0x2004, 0xd0fc, + 0x0120, 0x2f60, 0x080c, 0x861d, 0x0028, 0x2f60, 0x2009, 0x0052, + 0x080c, 0x864c, 0xa085, 0x0001, 0x004e, 0x00ce, 0x00fe, 0x0005, + 0x0096, 0x0076, 0x0126, 0x2091, 0x8000, 0x080c, 0x514c, 0x0118, + 0x2001, 0x9d55, 0x0028, 0x080c, 0x511c, 0x0158, 0x2001, 0x9d5b, + 0x0006, 0xa00e, 0x2400, 0x080c, 0x54db, 0x080c, 0x5408, 0x000e, + 0x0807, 0x2418, 0x080c, 0x702f, 0x62a0, 0x0086, 0x2041, 0x0001, + 0x2039, 0x0001, 0x2608, 0x080c, 0x6e0e, 0x008e, 0x080c, 0x6d02, + 0x2f08, 0x2648, 0x080c, 0xae82, 0x613c, 0x81ff, 0x090c, 0x6ec3, + 0x080c, 0x7173, 0x012e, 0x007e, 0x009e, 0x0005, 0x00c6, 0x0126, + 0x2091, 0x8000, 0x00c6, 0x080c, 0x85c7, 0x001e, 0x0188, 0x660a, + 0x611a, 0x080c, 0xa027, 0x601f, 0x0001, 0x2d00, 0x6012, 0x2009, + 0x001f, 0x080c, 0x864c, 0xa085, 0x0001, 0x012e, 0x00ce, 0x0005, + 0xa006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0x00c6, 0x080c, + 0x85c7, 0x001e, 0x0188, 0x660a, 0x611a, 0x080c, 0xa027, 0x601f, + 0x0008, 0x2d00, 0x6012, 0x2009, 0x0021, 0x080c, 0x864c, 0xa085, + 0x0001, 0x012e, 0x00ce, 0x0005, 0xa006, 0x0cd8, 0x00c6, 0x0126, + 0x2091, 0x8000, 0x00c6, 0x080c, 0x85c7, 0x001e, 0x0188, 0x660a, + 0x611a, 0x080c, 0xa027, 0x601f, 0x0001, 0x2d00, 0x6012, 0x2009, + 0x003d, 0x080c, 0x864c, 0xa085, 0x0001, 0x012e, 0x00ce, 0x0005, + 0xa006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0x00c6, 0x080c, + 0x9ed6, 0x001e, 0x0180, 0x611a, 0x080c, 0xa027, 0x601f, 0x0001, + 0x2d00, 0x6012, 0x2009, 0x0000, 0x080c, 0x864c, 0xa085, 0x0001, + 0x012e, 0x00ce, 0x0005, 0xa006, 0x0cd8, 0x00c6, 0x0126, 0x2091, + 0x8000, 0x00c6, 0x080c, 0x85c7, 0x001e, 0x0188, 0x660a, 0x611a, + 0x080c, 0xa027, 0x601f, 0x0001, 0x2d00, 0x6012, 0x2009, 0x0044, + 0x080c, 0x864c, 0xa085, 0x0001, 0x012e, 0x00ce, 0x0005, 0xa006, + 0x0cd8, 0x0026, 0x00d6, 0x6218, 0x2268, 0x6a3c, 0x82ff, 0x0110, + 0x8211, 0x6a3e, 0x00de, 0x002e, 0x0005, 0x0006, 0x6000, 0xa086, + 0x0000, 0x0190, 0x6013, 0x0000, 0x601f, 0x0007, 0x2001, 0xb7b6, + 0x2004, 0x0006, 0xa082, 0x0051, 0x000e, 0x0208, 0x8004, 0x6016, + 0x080c, 0xb33a, 0x603f, 0x0000, 0x000e, 0x0005, 0x0066, 0x00c6, + 0x00d6, 0x2031, 0xb553, 0x2634, 0xd6e4, 0x0128, 0x6618, 0x2660, + 0x6e48, 0x080c, 0x50d5, 0x00de, 0x00ce, 0x006e, 0x0005, 0x0006, + 0x0016, 0x6004, 0xa08e, 0x0002, 0x0140, 0xa08e, 0x0003, 0x0128, + 0xa08e, 0x0004, 0x0110, 0xa085, 0x0001, 0x001e, 0x000e, 0x0005, + 0x0006, 0x00d6, 0x6010, 0xa06d, 0x0148, 0x6834, 0xa086, 0x0139, + 0x0138, 0x6838, 0xd0fc, 0x0110, 0xa006, 0x0010, 0xa085, 0x0001, + 0x00de, 0x000e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x00c6, + 0x080c, 0x85c7, 0x001e, 0x0190, 0x611a, 0x080c, 0xa027, 0x601f, + 0x0001, 0x2d00, 0x6012, 0x080c, 0x2c9c, 0x2009, 0x0028, 0x080c, + 0x864c, 0xa085, 0x0001, 0x012e, 0x00ce, 0x0005, 0xa006, 0x0cd8, + 0xa186, 0x0015, 0x1178, 0x2011, 0xb521, 0x2204, 0xa086, 0x0074, + 0x1148, 0x080c, 0x8f98, 0x6003, 0x0001, 0x6007, 0x0029, 0x080c, + 0x6cd3, 0x0020, 0x080c, 0x8c19, 0x080c, 0x861d, 0x0005, 0xa186, + 0x0016, 0x1128, 0x2001, 0x0004, 0x080c, 0x4efd, 0x00e8, 0xa186, + 0x0015, 0x11e8, 0x2011, 0xb521, 0x2204, 0xa086, 0x0014, 0x11b8, + 0x00d6, 0x6018, 0x2068, 0x080c, 0x504b, 0x00de, 0x080c, 0x9051, + 0x1170, 0x00d6, 0x6018, 0x2068, 0x6890, 0x00de, 0xa005, 0x0138, + 0x2001, 0x0006, 0x080c, 0x4efd, 0x080c, 0x87a0, 0x0020, 0x080c, + 0x8c19, 0x080c, 0x861d, 0x0005, 0x6848, 0xa086, 0x0005, 0x1108, + 0x0009, 0x0005, 0x6850, 0xc0ad, 0x6852, 0x0005, 0x00e6, 0x0126, + 0x2071, 0xb500, 0x2091, 0x8000, 0x7548, 0xa582, 0x0001, 0x0608, + 0x704c, 0x2060, 0x6000, 0xa086, 0x0000, 0x0148, 0xace0, 0x0018, + 0x705c, 0xac02, 0x1208, 0x0cb0, 0x2061, 0xbd00, 0x0c98, 0x6003, + 0x0008, 0x8529, 0x754a, 0xaca8, 0x0018, 0x705c, 0xa502, 0x1230, + 0x754e, 0xa085, 0x0001, 0x012e, 0x00ee, 0x0005, 0x704f, 0xbd00, + 0x0cc0, 0xa006, 0x0cc0, 0x00e6, 0x2071, 0xbb8c, 0x7014, 0xd0e4, + 0x0150, 0x6013, 0x0000, 0x6003, 0x0001, 0x6007, 0x0050, 0x080c, + 0x6c8d, 0x080c, 0x7173, 0x00ee, 0x0005, 0x00c6, 0x00f6, 0x2c78, + 0x080c, 0x5305, 0x00fe, 0x0120, 0x601c, 0xa084, 0x000f, 0x0013, + 0x00ce, 0x0005, 0x99fe, 0x9f2d, 0x9f30, 0x9f33, 0xb127, 0xb142, + 0xb145, 0x99fe, 0x99fe, 0x080c, 0x1515, 0xe000, 0xe000, 0x0005, + 0xe000, 0xe000, 0x0005, 0x0009, 0x0005, 0x00f6, 0x2c78, 0x080c, + 0x5305, 0x0538, 0x080c, 0x85c7, 0x1128, 0x2001, 0xb7b8, 0x2004, + 0x783e, 0x00f8, 0x7818, 0x601a, 0x080c, 0xa027, 0x781c, 0xa086, + 0x0003, 0x0128, 0x7808, 0x6036, 0x2f00, 0x603a, 0x0020, 0x7808, + 0x603a, 0x2f00, 0x6036, 0x602a, 0x601f, 0x0001, 0x6007, 0x0035, + 0x6003, 0x0001, 0x7950, 0x6152, 0x080c, 0x6c8d, 0x080c, 0x7173, + 0x2f60, 0x00fe, 0x0005, 0x0016, 0x00f6, 0x682c, 0x6032, 0xa08e, + 0x0001, 0x0138, 0xa086, 0x0005, 0x0140, 0xa006, 0x602a, 0x602e, + 0x00a0, 0x6820, 0xc0f4, 0xc0d5, 0x6822, 0x6810, 0x2078, 0x787c, + 0x6938, 0xa102, 0x7880, 0x6934, 0xa103, 0x1e78, 0x6834, 0x602a, + 0x6838, 0xa084, 0xfffc, 0x683a, 0x602e, 0x2d00, 0x6036, 0x6808, + 0x603a, 0x6918, 0x611a, 0x6950, 0x6152, 0x601f, 0x0001, 0x6007, + 0x0039, 0x6003, 0x0001, 0x080c, 0x6c8d, 0x6803, 0x0002, 0x00fe, + 0x001e, 0x0005, 0x00f6, 0x2c78, 0x080c, 0x5305, 0x1118, 0xa085, + 0x0001, 0x0070, 0x6020, 0xd0f4, 0x1150, 0xc0f5, 0x6022, 0x6010, + 0x2078, 0x7828, 0x603a, 0x782c, 0x6036, 0x080c, 0x194d, 0xa006, + 0x00fe, 0x0005, 0x0006, 0x0016, 0x6004, 0xa08e, 0x0034, 0x01b8, + 0xa08e, 0x0035, 0x01a0, 0xa08e, 0x0036, 0x0188, 0xa08e, 0x0037, + 0x0170, 0xa08e, 0x0038, 0x0158, 0xa08e, 0x0039, 0x0140, 0xa08e, + 0x003a, 0x0128, 0xa08e, 0x003b, 0x0110, 0xa085, 0x0001, 0x001e, + 0x000e, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00e6, 0x2001, + 0xb7b2, 0x200c, 0x8000, 0x2014, 0x2001, 0x0032, 0x080c, 0x6b40, + 0x2001, 0xb7b6, 0x82ff, 0x1110, 0x2011, 0x0014, 0x2202, 0x2001, + 0xb7b4, 0x200c, 0x8000, 0x2014, 0x2071, 0xb78e, 0x711a, 0x721e, + 0x2001, 0x0064, 0x080c, 0x6b40, 0x2001, 0xb7b7, 0x82ff, 0x1110, + 0x2011, 0x0014, 0x2202, 0x2009, 0xb7b8, 0xa280, 0x000a, 0x200a, + 0x080c, 0x532a, 0x00ee, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, + 0x0006, 0x00e6, 0x2001, 0xb7b6, 0x2003, 0x0028, 0x2001, 0xb7b7, + 0x2003, 0x0014, 0x2071, 0xb78e, 0x701b, 0x0000, 0x701f, 0x07d0, + 0x2001, 0xb7b8, 0x2003, 0x001e, 0x00ee, 0x000e, 0x0005, 0x00d6, + 0x6054, 0xa06d, 0x0110, 0x080c, 0x160f, 0x00de, 0x0005, 0x0005, + 0x00c6, 0x0126, 0x2091, 0x8000, 0x00c6, 0x080c, 0x85c7, 0x001e, + 0x0178, 0x611a, 0x0ca1, 0x601f, 0x0001, 0x2d00, 0x6012, 0x2009, + 0x0033, 0x080c, 0x864c, 0xa085, 0x0001, 0x012e, 0x00ce, 0x0005, + 0xa006, 0x0cd8, 0x00d6, 0x00e6, 0x00f6, 0x2071, 0xb500, 0xa186, + 0x0015, 0x1500, 0x7084, 0xa086, 0x0018, 0x11e0, 0x6010, 0x2068, + 0x6a3c, 0xd2e4, 0x1160, 0x2c78, 0x080c, 0x7331, 0x01d8, 0x7070, + 0x6a50, 0xa206, 0x1160, 0x7074, 0x6a54, 0xa206, 0x1140, 0x6218, + 0xa290, 0x0028, 0x2214, 0x2009, 0x0000, 0x080c, 0x2ce1, 0x080c, + 0x87a0, 0x0020, 0x080c, 0x8c19, 0x080c, 0x861d, 0x00fe, 0x00ee, + 0x00de, 0x0005, 0x7054, 0x6a54, 0xa206, 0x0d48, 0x0c80, 0x00c6, + 0x0126, 0x2091, 0x8000, 0x00c6, 0x080c, 0x85c7, 0x001e, 0x0180, + 0x611a, 0x080c, 0xa027, 0x601f, 0x0001, 0x2d00, 0x6012, 0x2009, + 0x0043, 0x080c, 0x864c, 0xa085, 0x0001, 0x012e, 0x00ce, 0x0005, + 0xa006, 0x0cd8, 0x00d6, 0x00e6, 0x00f6, 0x2071, 0xb500, 0xa186, + 0x0015, 0x11c0, 0x7084, 0xa086, 0x0004, 0x11a0, 0x6010, 0xa0e8, + 0x000f, 0x2c78, 0x080c, 0x7331, 0x01a8, 0x7070, 0x6a08, 0xa206, + 0x1130, 0x7074, 0x6a0c, 0xa206, 0x1110, 0x080c, 0x2c9c, 0x080c, + 0x87a0, 0x0020, 0x080c, 0x8c19, 0x080c, 0x861d, 0x00fe, 0x00ee, + 0x00de, 0x0005, 0x7054, 0x6a0c, 0xa206, 0x0d78, 0x0c80, 0x0016, + 0x0026, 0x684c, 0xd0ac, 0x0178, 0x6914, 0x6a10, 0x2100, 0xa205, + 0x0150, 0x6860, 0xa106, 0x1118, 0x685c, 0xa206, 0x0120, 0x6962, + 0x6a5e, 0xa085, 0x0001, 0x002e, 0x001e, 0x0005, 0x00d6, 0x0036, + 0x6310, 0x2368, 0x684a, 0x6952, 0xa29e, 0x4000, 0x11a0, 0x00c6, + 0x6318, 0x2360, 0x2009, 0x0000, 0x6838, 0xd0f4, 0x1140, 0x080c, + 0x524a, 0x1108, 0xc185, 0x6000, 0xd0bc, 0x0108, 0xc18d, 0x6a66, + 0x696a, 0x00ce, 0x0080, 0x6a66, 0x3918, 0xa398, 0x0006, 0x231c, + 0x686b, 0x0004, 0x6b72, 0x00c6, 0x6318, 0x2360, 0x6004, 0xa084, + 0x00ff, 0x686e, 0x00ce, 0x080c, 0x5408, 0x6013, 0x0000, 0x003e, + 0x00de, 0x0005, 0x00c6, 0x0026, 0x0016, 0xa186, 0x0035, 0x0110, + 0x6a34, 0x0008, 0x6a28, 0x080c, 0x9c4a, 0x01f0, 0x2260, 0x611c, + 0xa186, 0x0003, 0x0118, 0xa186, 0x0006, 0x1190, 0x6834, 0xa206, + 0x0140, 0x6838, 0xa206, 0x1160, 0x6108, 0x6834, 0xa106, 0x1140, + 0x0020, 0x6008, 0x6938, 0xa106, 0x1118, 0x6018, 0x6918, 0xa106, + 0x001e, 0x002e, 0x00ce, 0x0005, 0xa085, 0x0001, 0x0cc8, 0x6944, + 0xd1cc, 0x0198, 0xa18c, 0x00ff, 0xa18e, 0x0002, 0x1170, 0xad88, + 0x001e, 0x210c, 0xa18c, 0x0f00, 0x810f, 0xa18e, 0x0001, 0x1128, + 0x6810, 0x6914, 0xa115, 0x190c, 0x9483, 0x0005, 0x080c, 0x861d, + 0x0804, 0x7173, 0x0066, 0x6000, 0xa0b2, 0x0010, 0x1a0c, 0x1515, + 0x0013, 0x006e, 0x0005, 0xa16b, 0xa646, 0xa76c, 0xa16b, 0xa16b, + 0xa16b, 0xa16b, 0xa16b, 0xa1a3, 0xa7f0, 0xa16b, 0xa16b, 0xa16b, + 0xa16b, 0xa16b, 0xa16b, 0x080c, 0x1515, 0x0066, 0x6000, 0xa0b2, + 0x0010, 0x1a0c, 0x1515, 0x0013, 0x006e, 0x0005, 0xa186, 0xac77, + 0xa186, 0xa186, 0xa186, 0xa186, 0xa186, 0xa186, 0xac39, 0xacbf, + 0xa186, 0xb26c, 0xb29c, 0xb26c, 0xb29c, 0xa186, 0x080c, 0x1515, + 0x0066, 0x6000, 0xa0b2, 0x0010, 0x1a0c, 0x1515, 0x0013, 0x006e, + 0x0005, 0xa1a1, 0xa940, 0xaa0d, 0xaa3a, 0xaabe, 0xa1a1, 0xabab, + 0xab56, 0xa7fc, 0xac0f, 0xac24, 0xa1a1, 0xa1a1, 0xa1a1, 0xa1a1, + 0xa1a1, 0x080c, 0x1515, 0xa1b2, 0x0080, 0x1a0c, 0x1515, 0x2100, + 0xa1b2, 0x0040, 0x1a04, 0xa5ba, 0x0002, 0xa1ed, 0xa3b8, 0xa1ed, + 0xa1ed, 0xa1ed, 0xa3bf, 0xa1ed, 0xa1ed, 0xa1ed, 0xa1ed, 0xa1ed, + 0xa1ed, 0xa1ed, 0xa1ed, 0xa1ed, 0xa1ed, 0xa1ed, 0xa1ed, 0xa1ed, + 0xa1ed, 0xa1ed, 0xa1ed, 0xa1ed, 0xa1ef, 0xa24d, 0xa25c, 0xa2aa, + 0xa2c8, 0xa346, 0xa3a5, 0xa1ed, 0xa1ed, 0xa3c2, 0xa1ed, 0xa1ed, + 0xa3d5, 0xa3e0, 0xa1ed, 0xa1ed, 0xa1ed, 0xa1ed, 0xa1ed, 0xa46b, + 0xa1ed, 0xa1ed, 0xa47e, 0xa1ed, 0xa1ed, 0xa436, 0xa1ed, 0xa1ed, + 0xa1ed, 0xa496, 0xa1ed, 0xa1ed, 0xa1ed, 0xa510, 0xa1ed, 0xa1ed, + 0xa1ed, 0xa1ed, 0xa1ed, 0xa1ed, 0xa581, 0x080c, 0x1515, 0x080c, + 0x5309, 0x1150, 0x2001, 0xb535, 0x2004, 0xd0cc, 0x1128, 0xa084, + 0x0009, 0xa086, 0x0008, 0x1140, 0x6007, 0x0009, 0x602b, 0x0009, + 0x6013, 0x0000, 0x0804, 0xa3b3, 0x080c, 0x52f9, 0x00e6, 0x00c6, + 0x0036, 0x0026, 0x0016, 0x6218, 0x2270, 0x72a0, 0x0026, 0x2019, + 0x0029, 0x080c, 0x6df5, 0x0076, 0x2039, 0x0000, 0x080c, 0x6d02, + 0x2c08, 0x080c, 0xae82, 0x007e, 0x001e, 0x2e60, 0x080c, 0x51aa, + 0x001e, 0x002e, 0x003e, 0x00ce, 0x00ee, 0x6618, 0x00c6, 0x2660, + 0x080c, 0x4fb8, 0x00ce, 0xa6b0, 0x0001, 0x2634, 0xa684, 0x00ff, + 0xa082, 0x0006, 0x0278, 0x080c, 0xadc6, 0x1904, 0xa2a4, 0x080c, + 0xad66, 0x1120, 0x6007, 0x0008, 0x0804, 0xa3b3, 0x6007, 0x0009, + 0x0804, 0xa3b3, 0x080c, 0xaf7b, 0x0128, 0x080c, 0xadc6, 0x0d78, + 0x0804, 0xa2a4, 0x6013, 0x1900, 0x0c88, 0x080c, 0x2dbf, 0x1904, + 0xa5b7, 0x6106, 0x080c, 0xad20, 0x6007, 0x0006, 0x0804, 0xa3b3, + 0x6007, 0x0007, 0x0804, 0xa3b3, 0x080c, 0xb2d0, 0x1904, 0xa5b7, + 0x080c, 0x2dbf, 0x1904, 0xa5b7, 0x00d6, 0x6618, 0x2668, 0x6e04, + 0xa684, 0x00ff, 0xa082, 0x0006, 0x1220, 0x2001, 0x0001, 0x080c, + 0x4eeb, 0xa6b4, 0xff00, 0x8637, 0xa686, 0x0006, 0x0188, 0xa686, + 0x0004, 0x0170, 0x6e04, 0xa6b4, 0x00ff, 0xa686, 0x0006, 0x0140, + 0xa686, 0x0004, 0x0128, 0xa686, 0x0005, 0x0110, 0x00de, 0x00e0, + 0x080c, 0xae24, 0x11a0, 0xa686, 0x0006, 0x1150, 0x0026, 0x6218, + 0xa290, 0x0028, 0x2214, 0x2009, 0x0000, 0x080c, 0x2ce1, 0x002e, + 0x080c, 0x504b, 0x6007, 0x000a, 0x00de, 0x0804, 0xa3b3, 0x6007, + 0x000b, 0x00de, 0x0804, 0xa3b3, 0x080c, 0x2c9c, 0x6007, 0x0001, + 0x0804, 0xa3b3, 0x080c, 0xb2d0, 0x1904, 0xa5b7, 0x080c, 0x2dbf, + 0x1904, 0xa5b7, 0x6618, 0x00d6, 0x2668, 0x6e04, 0x00de, 0xa686, + 0x0707, 0x0d50, 0x0026, 0x6218, 0xa290, 0x0028, 0x2214, 0x2009, + 0x0000, 0x080c, 0x2ce1, 0x002e, 0x6007, 0x000c, 0x0804, 0xa3b3, + 0x080c, 0x5309, 0x1140, 0x2001, 0xb535, 0x2004, 0xa084, 0x0009, + 0xa086, 0x0008, 0x1110, 0x0804, 0xa1fc, 0x080c, 0x52f9, 0x6618, + 0xa6b0, 0x0001, 0x2634, 0xa684, 0x00ff, 0xa082, 0x0006, 0x06e8, + 0x1138, 0x0026, 0x2001, 0x0006, 0x080c, 0x4f2a, 0x002e, 0x0050, + 0xa6b4, 0xff00, 0x8637, 0xa686, 0x0004, 0x0120, 0xa686, 0x0006, + 0x1904, 0xa2a4, 0x080c, 0xae31, 0x1120, 0x6007, 0x000e, 0x0804, + 0xa3b3, 0x0046, 0x6418, 0xa4a0, 0x0028, 0x2424, 0xa4a4, 0x00ff, + 0x8427, 0x0046, 0x080c, 0x2c9c, 0x004e, 0x0016, 0xa006, 0x2009, + 0xb553, 0x210c, 0xd1a4, 0x0158, 0x2009, 0x0029, 0x080c, 0xb0e8, + 0x6018, 0x00d6, 0x2068, 0x6800, 0xc0e5, 0x6802, 0x00de, 0x001e, + 0x004e, 0x6007, 0x0001, 0x0804, 0xa3b3, 0x2001, 0x0001, 0x080c, + 0x4eeb, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, + 0xb505, 0x2011, 0xbb90, 0x080c, 0x90da, 0x003e, 0x002e, 0x001e, + 0x015e, 0xa005, 0x0168, 0xa6b4, 0xff00, 0x8637, 0xa682, 0x0004, + 0x0a04, 0xa2a4, 0xa682, 0x0007, 0x0a04, 0xa2f2, 0x0804, 0xa2a4, + 0x6013, 0x1900, 0x6007, 0x0009, 0x0804, 0xa3b3, 0x080c, 0x5309, + 0x1140, 0x2001, 0xb535, 0x2004, 0xa084, 0x0009, 0xa086, 0x0008, + 0x1110, 0x0804, 0xa1fc, 0x080c, 0x52f9, 0x6618, 0xa6b0, 0x0001, + 0x2634, 0xa684, 0x00ff, 0xa082, 0x0006, 0x06b8, 0xa6b4, 0xff00, + 0x8637, 0xa686, 0x0004, 0x0120, 0xa686, 0x0006, 0x1904, 0xa2a4, + 0x080c, 0xae59, 0x1138, 0x080c, 0xad66, 0x1120, 0x6007, 0x0010, + 0x0804, 0xa3b3, 0x0046, 0x6418, 0xa4a0, 0x0028, 0x2424, 0xa4a4, + 0x00ff, 0x8427, 0x0046, 0x080c, 0x2c9c, 0x004e, 0x0016, 0xa006, + 0x2009, 0xb553, 0x210c, 0xd1a4, 0x0158, 0x2009, 0x0029, 0x080c, + 0xb0e8, 0x6018, 0x00d6, 0x2068, 0x6800, 0xc0e5, 0x6802, 0x00de, + 0x001e, 0x004e, 0x6007, 0x0001, 0x00f0, 0x080c, 0xaf7b, 0x0140, + 0xa6b4, 0xff00, 0x8637, 0xa686, 0x0006, 0x0950, 0x0804, 0xa2a4, + 0x6013, 0x1900, 0x6007, 0x0009, 0x0070, 0x080c, 0x2dbf, 0x1904, + 0xa5b7, 0x080c, 0xb2d0, 0x1904, 0xa5b7, 0x080c, 0xa5df, 0x1904, + 0xa2a4, 0x6007, 0x0012, 0x6003, 0x0001, 0x080c, 0x6cd3, 0x0005, + 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x6cd3, 0x0cc0, 0x6007, + 0x0005, 0x0cc0, 0x080c, 0xb2d0, 0x1904, 0xa5b7, 0x080c, 0x2dbf, + 0x1904, 0xa5b7, 0x080c, 0xa5df, 0x1904, 0xa2a4, 0x6007, 0x0020, + 0x6003, 0x0001, 0x080c, 0x6cd3, 0x0005, 0x080c, 0x2dbf, 0x1904, + 0xa5b7, 0x6007, 0x0023, 0x6003, 0x0001, 0x080c, 0x6cd3, 0x0005, + 0x080c, 0xb2d0, 0x1904, 0xa5b7, 0x080c, 0x2dbf, 0x1904, 0xa5b7, + 0x080c, 0xa5df, 0x1904, 0xa2a4, 0x0016, 0x0026, 0x2011, 0xbb91, + 0x2214, 0xa286, 0xffff, 0x0190, 0x2c08, 0x080c, 0x9c4a, 0x01e0, + 0x2260, 0x2011, 0xbb90, 0x2214, 0x6008, 0xa206, 0x11a8, 0x6018, + 0xa190, 0x0006, 0x2214, 0xa206, 0x01e8, 0x0070, 0x2011, 0xbb90, + 0x2214, 0x2c08, 0xa006, 0x080c, 0xb0ba, 0x11a0, 0x2011, 0xbb91, + 0x2214, 0xa286, 0xffff, 0x01c0, 0x2160, 0x6007, 0x0026, 0x6013, + 0x1700, 0x2011, 0xbb89, 0x2214, 0xa296, 0xffff, 0x1180, 0x6007, + 0x0025, 0x0068, 0x601c, 0xa086, 0x0007, 0x1d70, 0x6004, 0xa086, + 0x0024, 0x1110, 0x080c, 0x861d, 0x2160, 0x6007, 0x0025, 0x6003, + 0x0001, 0x080c, 0x6cd3, 0x002e, 0x001e, 0x0005, 0x2001, 0x0001, + 0x080c, 0x4eeb, 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, + 0x2019, 0xb505, 0x2011, 0xbb96, 0x080c, 0x90da, 0x003e, 0x002e, + 0x001e, 0x015e, 0x0120, 0x6007, 0x0031, 0x0804, 0xa3b3, 0x080c, + 0x8df6, 0x080c, 0x5acf, 0x11b0, 0x0006, 0x0026, 0x0036, 0x080c, + 0x5aeb, 0x1158, 0x2001, 0xb79f, 0x2003, 0x0001, 0x2001, 0xb500, + 0x2003, 0x0001, 0x080c, 0x5a07, 0x0010, 0x080c, 0x5aa6, 0x003e, + 0x002e, 0x000e, 0x0005, 0x080c, 0x2dbf, 0x1904, 0xa5b7, 0x080c, + 0xa5df, 0x1904, 0xa2a4, 0x6106, 0x080c, 0xa5fb, 0x6007, 0x002b, + 0x0804, 0xa3b3, 0x6007, 0x002c, 0x0804, 0xa3b3, 0x080c, 0xb2d0, + 0x1904, 0xa5b7, 0x080c, 0x2dbf, 0x1904, 0xa5b7, 0x080c, 0xa5df, + 0x1904, 0xa2a4, 0x6106, 0x080c, 0xa5ff, 0x1120, 0x6007, 0x002e, + 0x0804, 0xa3b3, 0x6007, 0x002f, 0x0804, 0xa3b3, 0x080c, 0x2dbf, + 0x1904, 0xa5b7, 0x00e6, 0x00d6, 0x00c6, 0x6018, 0xa080, 0x0001, + 0x200c, 0xa184, 0x00ff, 0xa086, 0x0006, 0x0158, 0xa184, 0xff00, + 0x8007, 0xa086, 0x0006, 0x0128, 0x00ce, 0x00de, 0x00ee, 0x0804, + 0xa3b8, 0x2001, 0xb572, 0x2004, 0xd0e4, 0x0904, 0xa50d, 0x2071, + 0xbb8c, 0x7010, 0x6036, 0x7014, 0x603a, 0x7108, 0x720c, 0x2001, + 0xb553, 0x2004, 0xd0a4, 0x0140, 0x6018, 0x2068, 0x6810, 0xa106, + 0x1118, 0x6814, 0xa206, 0x01f8, 0x2001, 0xb553, 0x2004, 0xd0ac, + 0x1590, 0x2069, 0xb500, 0x6874, 0xa206, 0x1568, 0x6870, 0xa106, + 0x1550, 0x7210, 0x080c, 0x9c4a, 0x0558, 0x080c, 0xb154, 0x0540, + 0x622a, 0x6007, 0x0036, 0x6003, 0x0001, 0x080c, 0x6c8d, 0x00ce, + 0x00de, 0x00ee, 0x0005, 0x7214, 0xa286, 0xffff, 0x0150, 0x080c, + 0x9c4a, 0x01b0, 0xa280, 0x0002, 0x2004, 0x7110, 0xa106, 0x1180, + 0x0c08, 0x7210, 0x2c08, 0xa085, 0x0001, 0x080c, 0xb0ba, 0x2c10, + 0x2160, 0x0130, 0x08b8, 0x6007, 0x0037, 0x6013, 0x1500, 0x08d8, + 0x6007, 0x0037, 0x6013, 0x1700, 0x08b0, 0x6007, 0x0012, 0x0898, + 0x080c, 0x2dbf, 0x1904, 0xa5b7, 0x6018, 0xa080, 0x0001, 0x2004, + 0xa084, 0xff00, 0x8007, 0xa086, 0x0006, 0x1904, 0xa3b8, 0x00e6, + 0x00d6, 0x00c6, 0x2001, 0xb572, 0x2004, 0xd0e4, 0x0904, 0xa579, + 0x2069, 0xb500, 0x2071, 0xbb8c, 0x7008, 0x6036, 0x720c, 0x623a, + 0xa286, 0xffff, 0x1150, 0x7208, 0x00c6, 0x2c08, 0xa085, 0x0001, + 0x080c, 0xb0ba, 0x2c10, 0x00ce, 0x0588, 0x080c, 0x9c4a, 0x0570, + 0x00c6, 0x0026, 0x2260, 0x080c, 0x991d, 0x002e, 0x00ce, 0x7118, + 0xa18c, 0xff00, 0x810f, 0xa186, 0x0001, 0x0158, 0xa186, 0x0005, + 0x0118, 0xa186, 0x0007, 0x1178, 0xa280, 0x0004, 0x2004, 0xa005, + 0x0150, 0x0056, 0x7510, 0x7614, 0x080c, 0xb16b, 0x005e, 0x00ce, + 0x00de, 0x00ee, 0x0005, 0x6007, 0x003b, 0x602b, 0x0009, 0x6013, + 0x2a00, 0x6003, 0x0001, 0x080c, 0x6c8d, 0x0c88, 0x6007, 0x003b, + 0x602b, 0x0009, 0x6013, 0x1700, 0x6003, 0x0001, 0x080c, 0x6c8d, + 0x0c30, 0x6007, 0x003b, 0x602b, 0x000b, 0x6013, 0x0000, 0x0804, + 0xa4e3, 0x00e6, 0x0026, 0x080c, 0x5309, 0x0558, 0x080c, 0x52f9, + 0x080c, 0xb34b, 0x1520, 0x2071, 0xb500, 0x70d4, 0xc085, 0x70d6, + 0x00f6, 0x2079, 0x0100, 0x72a0, 0xa284, 0x00ff, 0x7072, 0x78e6, + 0xa284, 0xff00, 0x7274, 0xa205, 0x7076, 0x78ea, 0x00fe, 0x70df, + 0x0000, 0x2001, 0xb553, 0x2004, 0xd0a4, 0x0120, 0x2011, 0xb7f9, + 0x2013, 0x07d0, 0xd0ac, 0x1128, 0x080c, 0x2ab8, 0x0010, 0x080c, + 0xb377, 0x002e, 0x00ee, 0x080c, 0x861d, 0x0804, 0xa3b7, 0x080c, + 0x861d, 0x0005, 0x2600, 0x0002, 0xa5c5, 0xa5c5, 0xa5c5, 0xa5c5, + 0xa5c5, 0xa5c7, 0xa5c5, 0xa5c5, 0xa5c5, 0x080c, 0x1515, 0x080c, + 0xb2d0, 0x1d68, 0x080c, 0x2dbf, 0x1d50, 0x0089, 0x1138, 0x6007, + 0x0045, 0x6003, 0x0001, 0x080c, 0x6cd3, 0x0005, 0x080c, 0x2c9c, + 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x6cd3, 0x0005, 0x00d6, + 0x0066, 0x6618, 0x2668, 0x6e04, 0xa6b4, 0xff00, 0x8637, 0xa686, + 0x0006, 0x0170, 0xa686, 0x0004, 0x0158, 0x6e04, 0xa6b4, 0x00ff, + 0xa686, 0x0006, 0x0128, 0xa686, 0x0004, 0x0110, 0xa085, 0x0001, + 0x006e, 0x00de, 0x0005, 0x00d6, 0x0449, 0x00de, 0x0005, 0x00d6, + 0x0491, 0x11f0, 0x680c, 0xa08c, 0xff00, 0x6820, 0xa084, 0x00ff, + 0xa115, 0x6212, 0x6824, 0x602a, 0xd1e4, 0x0118, 0x2009, 0x0001, + 0x0060, 0xd1ec, 0x0168, 0x6920, 0xa18c, 0x00ff, 0x6824, 0x080c, + 0x281d, 0x1130, 0x2110, 0x2009, 0x0000, 0x080c, 0x2ce1, 0x0018, + 0xa085, 0x0001, 0x0008, 0xa006, 0x00de, 0x0005, 0x2069, 0xbb8d, + 0x6800, 0xa082, 0x0010, 0x1228, 0x6013, 0x0000, 0xa085, 0x0001, + 0x0008, 0xa006, 0x0005, 0x6013, 0x0000, 0x2069, 0xbb8c, 0x6808, + 0xa084, 0xff00, 0xa086, 0x0800, 0x1140, 0x6800, 0xa084, 0x00ff, + 0xa08e, 0x0014, 0x0110, 0xa08e, 0x0010, 0x0005, 0x6004, 0xa0b2, + 0x0080, 0x1a0c, 0x1515, 0xa1b6, 0x0013, 0x1130, 0x2008, 0xa1b2, + 0x0040, 0x1a04, 0xa746, 0x0092, 0xa1b6, 0x0027, 0x0120, 0xa1b6, + 0x0014, 0x190c, 0x1515, 0x2001, 0x0007, 0x080c, 0x4f2a, 0x080c, + 0x7090, 0x080c, 0x9e1d, 0x080c, 0x7173, 0x0005, 0xa6a6, 0xa6a8, + 0xa6a6, 0xa6a6, 0xa6a6, 0xa6a8, 0xa6ba, 0xa73f, 0xa70a, 0xa73f, + 0xa71b, 0xa73f, 0xa6ba, 0xa73f, 0xa737, 0xa73f, 0xa737, 0xa73f, + 0xa73f, 0xa6a6, 0xa6a6, 0xa6a6, 0xa6a6, 0xa6a6, 0xa6a6, 0xa6a6, + 0xa6a6, 0xa6a6, 0xa6a6, 0xa6a6, 0xa6a8, 0xa6a6, 0xa73f, 0xa6a6, + 0xa6a6, 0xa73f, 0xa6a6, 0xa73c, 0xa73f, 0xa6a6, 0xa6a6, 0xa6a6, + 0xa6a6, 0xa73f, 0xa73f, 0xa6a6, 0xa73f, 0xa73f, 0xa6a6, 0xa6b4, + 0xa6a6, 0xa6a6, 0xa6a6, 0xa6a6, 0xa73b, 0xa73f, 0xa6a6, 0xa6a6, + 0xa73f, 0xa73f, 0xa6a6, 0xa6a6, 0xa6a6, 0xa6a6, 0x080c, 0x1515, + 0x080c, 0x7090, 0x2001, 0xb7b6, 0x2004, 0x6016, 0x6003, 0x0002, + 0x080c, 0x7173, 0x0804, 0xa745, 0x2001, 0x0000, 0x080c, 0x4eeb, + 0x0804, 0xa73f, 0x00f6, 0x2079, 0xb552, 0x7804, 0x00fe, 0xd0ac, + 0x1904, 0xa73f, 0x2001, 0x0000, 0x080c, 0x4eeb, 0x6018, 0xa080, + 0x0004, 0x2004, 0xa086, 0x00ff, 0x1140, 0x00f6, 0x2079, 0xb500, + 0x7898, 0x8000, 0x789a, 0x00fe, 0x00e0, 0x00c6, 0x6018, 0x2060, + 0x6000, 0xd0f4, 0x1140, 0x6010, 0xa005, 0x0128, 0x00ce, 0x080c, + 0x3f3e, 0x0804, 0xa73f, 0x00ce, 0x2001, 0xb500, 0x2004, 0xa086, + 0x0002, 0x1138, 0x00f6, 0x2079, 0xb500, 0x7898, 0x8000, 0x789a, + 0x00fe, 0x2001, 0x0002, 0x080c, 0x4efd, 0x080c, 0x7090, 0x601f, + 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x6cd3, 0x080c, + 0x7173, 0x00c6, 0x6118, 0x2160, 0x2009, 0x0001, 0x080c, 0x69a8, + 0x00ce, 0x04d8, 0x6618, 0x00d6, 0x2668, 0x6e04, 0x00de, 0xa6b4, + 0xff00, 0x8637, 0xa686, 0x0006, 0x0550, 0xa686, 0x0004, 0x0538, + 0x2001, 0x0004, 0x0410, 0x2001, 0xb500, 0x2004, 0xa086, 0x0003, + 0x1110, 0x080c, 0x3f3e, 0x2001, 0x0006, 0x04a1, 0x6618, 0x00d6, + 0x2668, 0x6e04, 0x00de, 0xa6b4, 0xff00, 0x8637, 0xa686, 0x0006, + 0x0170, 0x2001, 0x0006, 0x0048, 0x2001, 0x0004, 0x0030, 0x2001, + 0x0006, 0x0401, 0x0020, 0x0018, 0x0010, 0x080c, 0x4f2a, 0x080c, + 0x7090, 0x080c, 0x861d, 0x080c, 0x7173, 0x0005, 0x2600, 0x0002, + 0xa751, 0xa751, 0xa751, 0xa751, 0xa751, 0xa753, 0xa751, 0xa751, + 0xa751, 0x080c, 0x1515, 0x080c, 0x7090, 0x080c, 0x861d, 0x080c, + 0x7173, 0x0005, 0x0016, 0x00d6, 0x6118, 0x2168, 0x6900, 0xd184, + 0x0140, 0x080c, 0x4efd, 0x2001, 0x0000, 0x080c, 0x4eeb, 0x080c, + 0x2cc2, 0x00de, 0x001e, 0x0005, 0x00d6, 0x6618, 0x2668, 0x6804, + 0xa084, 0xff00, 0x8007, 0x00de, 0xa0b2, 0x000c, 0x1a0c, 0x1515, + 0xa1b6, 0x0015, 0x1110, 0x003b, 0x0028, 0xa1b6, 0x0016, 0x190c, + 0x1515, 0x006b, 0x0005, 0x8cdf, 0x8cdf, 0x8cdf, 0x8cdf, 0x8cdf, + 0x8cdf, 0xa7dc, 0xa79b, 0x8cdf, 0x8cdf, 0x8cdf, 0x8cdf, 0x8cdf, + 0x8cdf, 0x8cdf, 0x8cdf, 0x8cdf, 0x8cdf, 0xa7dc, 0xa7e3, 0x8cdf, + 0x8cdf, 0x8cdf, 0x8cdf, 0x00f6, 0x2079, 0xb552, 0x7804, 0xd0ac, + 0x11e0, 0x6018, 0xa07d, 0x01c8, 0x7800, 0xd0f4, 0x1118, 0x7810, + 0xa005, 0x1198, 0x2001, 0x0000, 0x080c, 0x4eeb, 0x2001, 0x0002, + 0x080c, 0x4efd, 0x601f, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, + 0x080c, 0x6cd3, 0x080c, 0x7173, 0x00e8, 0x2011, 0xbb83, 0x2204, + 0x8211, 0x220c, 0x080c, 0x281d, 0x11a8, 0x00c6, 0x080c, 0x4fa9, + 0x0120, 0x00ce, 0x080c, 0x861d, 0x0068, 0x6010, 0x0006, 0x6014, + 0x0006, 0x080c, 0x4c0b, 0x000e, 0x6016, 0x000e, 0x6012, 0x00ce, + 0x080c, 0x861d, 0x00fe, 0x0005, 0x6604, 0xa6b6, 0x001e, 0x1110, + 0x080c, 0x861d, 0x0005, 0x080c, 0x8f95, 0x1138, 0x6003, 0x0001, + 0x6007, 0x0001, 0x080c, 0x6cd3, 0x0010, 0x080c, 0x861d, 0x0005, + 0x6004, 0xa08a, 0x0080, 0x1a0c, 0x1515, 0x080c, 0x7090, 0x080c, + 0x9e1d, 0x080c, 0x7173, 0x0005, 0xa182, 0x0040, 0x0002, 0xa812, + 0xa812, 0xa812, 0xa812, 0xa814, 0xa812, 0xa812, 0xa812, 0xa812, + 0xa812, 0xa812, 0xa812, 0xa812, 0xa812, 0xa812, 0xa812, 0xa812, + 0xa812, 0xa812, 0x080c, 0x1515, 0x00d6, 0x00e6, 0x00f6, 0x0156, + 0x0046, 0x0026, 0x6218, 0xa280, 0x002b, 0x2004, 0xa005, 0x0120, + 0x2021, 0x0000, 0x080c, 0xb31c, 0x6106, 0x2071, 0xbb80, 0x7444, + 0xa4a4, 0xff00, 0x0904, 0xa878, 0xa486, 0x2000, 0x1130, 0x2009, + 0x0001, 0x2011, 0x0200, 0x080c, 0x6b1a, 0x080c, 0x15f8, 0x090c, + 0x1515, 0x6003, 0x0007, 0x2d00, 0x6837, 0x010d, 0x6803, 0x0000, + 0x683b, 0x0000, 0x6c5a, 0x2c00, 0x685e, 0x6008, 0x68b2, 0x6018, + 0x2078, 0x78a0, 0x8007, 0x7130, 0x694a, 0x0016, 0xa084, 0xff00, + 0x6846, 0x684f, 0x0000, 0x6853, 0x0000, 0x6857, 0x0036, 0x080c, + 0x5408, 0x001e, 0xa486, 0x2000, 0x1130, 0x2019, 0x0017, 0x080c, + 0xb065, 0x0804, 0xa8d5, 0xa486, 0x0400, 0x1130, 0x2019, 0x0002, + 0x080c, 0xb017, 0x0804, 0xa8d5, 0xa486, 0x0200, 0x1110, 0x080c, + 0xaffc, 0xa486, 0x1000, 0x1110, 0x080c, 0xb04a, 0x0804, 0xa8d5, + 0x2069, 0xb874, 0x6a00, 0xd284, 0x0904, 0xa93c, 0xa284, 0x0300, + 0x1904, 0xa935, 0x6804, 0xa005, 0x0904, 0xa91d, 0x2d78, 0x6003, + 0x0007, 0x080c, 0x15df, 0x0904, 0xa8dc, 0x7800, 0xd08c, 0x1118, + 0x7804, 0x8001, 0x7806, 0x6013, 0x0000, 0x6803, 0x0000, 0x6837, + 0x0116, 0x683b, 0x0000, 0x6008, 0x68b2, 0x2c00, 0x684a, 0x6018, + 0x2078, 0x78a0, 0x8007, 0x7130, 0x6986, 0x6846, 0x7928, 0x698a, + 0x792c, 0x698e, 0x7930, 0x6992, 0x7934, 0x6996, 0x6853, 0x003d, + 0x7244, 0xa294, 0x0003, 0xa286, 0x0002, 0x1118, 0x684f, 0x0040, + 0x0040, 0xa286, 0x0001, 0x1118, 0x684f, 0x0080, 0x0010, 0x684f, + 0x0000, 0x20a9, 0x000a, 0x2001, 0xbb90, 0xad90, 0x0015, 0x200c, + 0x810f, 0x2112, 0x8000, 0x8210, 0x1f04, 0xa8c7, 0x200c, 0x6982, + 0x8000, 0x200c, 0x697e, 0x080c, 0x5408, 0x002e, 0x004e, 0x015e, + 0x00fe, 0x00ee, 0x00de, 0x0005, 0x2001, 0xb50e, 0x2004, 0xd084, + 0x0120, 0x080c, 0x15f8, 0x1904, 0xa88d, 0x6013, 0x0100, 0x6003, + 0x0001, 0x6007, 0x0041, 0x080c, 0x6c8d, 0x080c, 0x7173, 0x0c28, + 0x2069, 0xbb92, 0x2d04, 0xa084, 0xff00, 0xa086, 0x1200, 0x11a8, + 0x2069, 0xbb80, 0x686c, 0xa084, 0x00ff, 0x0016, 0x6110, 0xa18c, + 0x0700, 0xa10d, 0x6112, 0x001e, 0x6003, 0x0001, 0x6007, 0x0043, + 0x080c, 0x6c8d, 0x080c, 0x7173, 0x0840, 0x6868, 0x602a, 0x686c, + 0x602e, 0x6013, 0x0200, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, + 0x6c8d, 0x080c, 0x7173, 0x0804, 0xa8d5, 0x2001, 0xb50d, 0x2004, + 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x3ecc, 0x6013, 0x0300, + 0x0010, 0x6013, 0x0100, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, + 0x6c8d, 0x080c, 0x7173, 0x0804, 0xa8d5, 0x6013, 0x0500, 0x0c98, + 0x6013, 0x0600, 0x0804, 0xa8f0, 0x6013, 0x0200, 0x0804, 0xa8f0, + 0xa186, 0x0013, 0x1170, 0x6004, 0xa08a, 0x0040, 0x0a0c, 0x1515, + 0xa08a, 0x0053, 0x1a0c, 0x1515, 0xa082, 0x0040, 0x2008, 0x0804, + 0xa9ca, 0xa186, 0x0051, 0x0138, 0xa186, 0x0047, 0x11d8, 0x6004, + 0xa086, 0x0041, 0x0518, 0x2001, 0x0109, 0x2004, 0xd084, 0x01f0, + 0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x080c, 0x6b74, + 0x002e, 0x001e, 0x000e, 0x012e, 0x6000, 0xa086, 0x0002, 0x1170, + 0x0804, 0xaa0d, 0xa186, 0x0027, 0x0120, 0xa186, 0x0014, 0x190c, + 0x1515, 0x6004, 0xa082, 0x0040, 0x2008, 0x001a, 0x080c, 0x8663, + 0x0005, 0xa994, 0xa996, 0xa996, 0xa9ba, 0xa994, 0xa994, 0xa994, + 0xa994, 0xa994, 0xa994, 0xa994, 0xa994, 0xa994, 0xa994, 0xa994, + 0xa994, 0xa994, 0xa994, 0xa994, 0x080c, 0x1515, 0x080c, 0x7090, + 0x080c, 0x7173, 0x0036, 0x00d6, 0x6010, 0xa06d, 0x01c0, 0xad84, + 0xf000, 0x01a8, 0x6003, 0x0002, 0x6018, 0x2004, 0xd0bc, 0x1178, + 0x2019, 0x0004, 0x080c, 0xb099, 0x6013, 0x0000, 0x6014, 0xa005, + 0x1120, 0x2001, 0xb7b7, 0x2004, 0x6016, 0x6003, 0x0007, 0x00de, + 0x003e, 0x0005, 0x00d6, 0x080c, 0x7090, 0x080c, 0x7173, 0x080c, + 0x9c5a, 0x0120, 0x6010, 0x2068, 0x080c, 0x160f, 0x080c, 0x9e1d, + 0x00de, 0x0005, 0x0002, 0xa9de, 0xa9fb, 0xa9e7, 0xaa07, 0xa9de, + 0xa9de, 0xa9de, 0xa9de, 0xa9de, 0xa9de, 0xa9de, 0xa9de, 0xa9de, + 0xa9de, 0xa9de, 0xa9de, 0xa9de, 0xa9de, 0xa9de, 0x080c, 0x1515, + 0x6010, 0xa088, 0x0013, 0x2104, 0xa085, 0x0400, 0x200a, 0x080c, + 0x7090, 0x6010, 0xa080, 0x0013, 0x2004, 0xd0b4, 0x0138, 0x6003, + 0x0007, 0x2009, 0x0043, 0x080c, 0x864c, 0x0010, 0x6003, 0x0002, + 0x080c, 0x7173, 0x0005, 0x080c, 0x7090, 0x080c, 0xb2d7, 0x1120, + 0x080c, 0x6aef, 0x080c, 0x861d, 0x080c, 0x7173, 0x0005, 0x080c, + 0x7090, 0x2009, 0x0041, 0x0804, 0xab56, 0xa182, 0x0040, 0x0002, + 0xaa23, 0xaa25, 0xaa23, 0xaa23, 0xaa23, 0xaa23, 0xaa23, 0xaa26, + 0xaa23, 0xaa23, 0xaa23, 0xaa23, 0xaa23, 0xaa23, 0xaa23, 0xaa23, + 0xaa23, 0xaa31, 0xaa23, 0x080c, 0x1515, 0x0005, 0x6003, 0x0004, + 0x6110, 0x20e1, 0x0005, 0x3d18, 0x3e20, 0x2c10, 0x080c, 0x185e, + 0x0005, 0x00d6, 0x080c, 0x6aef, 0x00de, 0x080c, 0xb33a, 0x080c, + 0x861d, 0x0005, 0xa182, 0x0040, 0x0002, 0xaa50, 0xaa50, 0xaa50, + 0xaa50, 0xaa50, 0xaa50, 0xaa50, 0xaa52, 0xaa50, 0xaa55, 0xaa8e, + 0xaa50, 0xaa50, 0xaa50, 0xaa50, 0xaa8e, 0xaa50, 0xaa50, 0xaa50, + 0x080c, 0x1515, 0x080c, 0x8663, 0x0005, 0x2001, 0xb572, 0x2004, + 0xd0e4, 0x0158, 0x2001, 0x0100, 0x2004, 0xa082, 0x0005, 0x0228, + 0x2001, 0x011f, 0x2004, 0x6036, 0x0010, 0x6037, 0x0000, 0x080c, + 0x7126, 0x080c, 0x7230, 0x6010, 0x00d6, 0x2068, 0x684c, 0xd0fc, + 0x0150, 0xa08c, 0x0003, 0xa18e, 0x0002, 0x0168, 0x2009, 0x0041, + 0x00de, 0x0804, 0xab56, 0x6003, 0x0007, 0x6017, 0x0000, 0x080c, + 0x6aef, 0x00de, 0x0005, 0x080c, 0xb2d7, 0x0110, 0x00de, 0x0005, + 0x080c, 0x6aef, 0x080c, 0x861d, 0x00de, 0x0ca0, 0x0036, 0x080c, + 0x7126, 0x080c, 0x7230, 0x6010, 0x00d6, 0x2068, 0x6018, 0x2004, + 0xd0bc, 0x0188, 0x684c, 0xa084, 0x0003, 0xa086, 0x0002, 0x0140, + 0x687c, 0x632c, 0xa31a, 0x632e, 0x6880, 0x6328, 0xa31b, 0x632a, + 0x6003, 0x0002, 0x0080, 0x2019, 0x0004, 0x080c, 0xb099, 0x6014, + 0xa005, 0x1128, 0x2001, 0xb7b7, 0x2004, 0x8003, 0x6016, 0x6013, + 0x0000, 0x6003, 0x0007, 0x00de, 0x003e, 0x0005, 0xa186, 0x0013, + 0x1150, 0x6004, 0xa086, 0x0042, 0x190c, 0x1515, 0x080c, 0x7090, + 0x080c, 0x7173, 0x0005, 0xa186, 0x0027, 0x0118, 0xa186, 0x0014, + 0x1180, 0x6004, 0xa086, 0x0042, 0x190c, 0x1515, 0x2001, 0x0007, + 0x080c, 0x4f2a, 0x080c, 0x7090, 0x080c, 0x9e1d, 0x080c, 0x7173, + 0x0005, 0xa182, 0x0040, 0x0002, 0xaaf7, 0xaaf7, 0xaaf7, 0xaaf7, + 0xaaf7, 0xaaf7, 0xaaf7, 0xaaf9, 0xab05, 0xaaf7, 0xaaf7, 0xaaf7, + 0xaaf7, 0xaaf7, 0xaaf7, 0xaaf7, 0xaaf7, 0xaaf7, 0xaaf7, 0x080c, + 0x1515, 0x0036, 0x0046, 0x20e1, 0x0005, 0x3d18, 0x3e20, 0x2c10, + 0x080c, 0x185e, 0x004e, 0x003e, 0x0005, 0x6010, 0x00d6, 0x2068, + 0x6810, 0x6a14, 0x0006, 0x0046, 0x0056, 0x6c7c, 0xa422, 0x6d80, + 0x2200, 0xa52b, 0x602c, 0xa420, 0x642e, 0x6028, 0xa529, 0x652a, + 0x005e, 0x004e, 0x000e, 0xa20d, 0x1178, 0x684c, 0xd0fc, 0x0120, + 0x2009, 0x0041, 0x00de, 0x0490, 0x6003, 0x0007, 0x6017, 0x0000, + 0x080c, 0x6aef, 0x00de, 0x0005, 0x0006, 0x00f6, 0x2c78, 0x080c, + 0x5305, 0x00fe, 0x000e, 0x0120, 0x6003, 0x0002, 0x00de, 0x0005, + 0x2009, 0xb50d, 0x210c, 0xd19c, 0x0118, 0x6003, 0x0007, 0x0010, + 0x6003, 0x0006, 0x0021, 0x080c, 0x6af1, 0x00de, 0x0005, 0xd2fc, + 0x0140, 0x8002, 0x8000, 0x8212, 0xa291, 0x0000, 0x2009, 0x0009, + 0x0010, 0x2009, 0x0015, 0x6a6a, 0x6866, 0x0005, 0xa182, 0x0040, + 0x0208, 0x0062, 0xa186, 0x0013, 0x0120, 0xa186, 0x0014, 0x190c, + 0x1515, 0x6020, 0xd0dc, 0x090c, 0x1515, 0x0005, 0xab79, 0xab80, + 0xab8c, 0xab98, 0xab79, 0xab79, 0xab79, 0xaba7, 0xab79, 0xab7b, + 0xab7b, 0xab79, 0xab79, 0xab79, 0xab79, 0xab7b, 0xab79, 0xab7b, + 0xab79, 0x080c, 0x1515, 0x6020, 0xd0dc, 0x090c, 0x1515, 0x0005, + 0x6003, 0x0001, 0x6106, 0x080c, 0x6c8d, 0x0126, 0x2091, 0x8000, + 0x080c, 0x7173, 0x012e, 0x0005, 0x6003, 0x0001, 0x6106, 0x080c, + 0x6c8d, 0x0126, 0x2091, 0x8000, 0x080c, 0x7173, 0x012e, 0x0005, + 0x6003, 0x0003, 0x6106, 0x2c10, 0x080c, 0x1fa9, 0x0126, 0x2091, + 0x8000, 0x080c, 0x6cf0, 0x080c, 0x7230, 0x012e, 0x0005, 0xa016, + 0x080c, 0x185e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0036, 0x00d6, + 0xa182, 0x0040, 0x0023, 0x00de, 0x003e, 0x012e, 0x0005, 0xabc7, + 0xabc9, 0xabdb, 0xabf6, 0xabc7, 0xabc7, 0xabc7, 0xac0b, 0xabc7, + 0xabc7, 0xabc7, 0xabc7, 0xabc7, 0xabc7, 0xabc7, 0xabc7, 0x080c, + 0x1515, 0x6010, 0x2068, 0x684c, 0xd0fc, 0x01f8, 0xa09c, 0x0003, + 0xa39e, 0x0003, 0x01d0, 0x6003, 0x0001, 0x6106, 0x080c, 0x6c8d, + 0x080c, 0x7173, 0x0498, 0x6010, 0x2068, 0x684c, 0xd0fc, 0x0168, + 0xa09c, 0x0003, 0xa39e, 0x0003, 0x0140, 0x6003, 0x0001, 0x6106, + 0x080c, 0x6c8d, 0x080c, 0x7173, 0x0408, 0x6013, 0x0000, 0x6017, + 0x0000, 0x2019, 0x0004, 0x080c, 0xb099, 0x00c0, 0x6010, 0x2068, + 0x684c, 0xd0fc, 0x0d90, 0xa09c, 0x0003, 0xa39e, 0x0003, 0x0d68, + 0x6003, 0x0003, 0x6106, 0x2c10, 0x080c, 0x1fa9, 0x080c, 0x6cf0, + 0x080c, 0x7230, 0x0018, 0xa016, 0x080c, 0x185e, 0x0005, 0x080c, + 0x7090, 0x6110, 0x81ff, 0x0158, 0x00d6, 0x2168, 0x080c, 0xb380, + 0x0036, 0x2019, 0x0029, 0x080c, 0xb099, 0x003e, 0x00de, 0x080c, + 0x9e1d, 0x080c, 0x7173, 0x0005, 0x080c, 0x7126, 0x6110, 0x81ff, + 0x0158, 0x00d6, 0x2168, 0x080c, 0xb380, 0x0036, 0x2019, 0x0029, + 0x080c, 0xb099, 0x003e, 0x00de, 0x080c, 0x9e1d, 0x080c, 0x7230, + 0x0005, 0xa182, 0x0085, 0x0002, 0xac45, 0xac43, 0xac43, 0xac51, + 0xac43, 0xac43, 0xac43, 0x080c, 0x1515, 0x6003, 0x000b, 0x6106, + 0x080c, 0x6c8d, 0x0126, 0x2091, 0x8000, 0x080c, 0x7173, 0x012e, + 0x0005, 0x0026, 0x00e6, 0x080c, 0xb2d0, 0x0118, 0x080c, 0x861d, + 0x00d8, 0x2071, 0xbb80, 0x7224, 0x6212, 0x7220, 0x080c, 0xaf47, + 0x0118, 0x6007, 0x0086, 0x0040, 0x6007, 0x0087, 0x7224, 0xa296, + 0xffff, 0x1110, 0x6007, 0x0086, 0x6003, 0x0001, 0x080c, 0x6c8d, + 0x080c, 0x7173, 0x080c, 0x7230, 0x00ee, 0x002e, 0x0005, 0xa186, + 0x0013, 0x1160, 0x6004, 0xa08a, 0x0085, 0x0a0c, 0x1515, 0xa08a, + 0x008c, 0x1a0c, 0x1515, 0xa082, 0x0085, 0x00a2, 0xa186, 0x0027, + 0x0130, 0xa186, 0x0014, 0x0118, 0x080c, 0x8663, 0x0050, 0x2001, + 0x0007, 0x080c, 0x4f2a, 0x080c, 0x7090, 0x080c, 0x9e1d, 0x080c, + 0x7173, 0x0005, 0xaca1, 0xaca3, 0xaca3, 0xaca1, 0xaca1, 0xaca1, + 0xaca1, 0x080c, 0x1515, 0x080c, 0x7090, 0x080c, 0x9e1d, 0x080c, + 0x7173, 0x0005, 0xa182, 0x0085, 0x0a0c, 0x1515, 0xa182, 0x008c, + 0x1a0c, 0x1515, 0xa182, 0x0085, 0x0002, 0xacbc, 0xacbc, 0xacbc, + 0xacbe, 0xacbc, 0xacbc, 0xacbc, 0x080c, 0x1515, 0x0005, 0xa186, + 0x0013, 0x0148, 0xa186, 0x0014, 0x0130, 0xa186, 0x0027, 0x0118, + 0x080c, 0x8663, 0x0030, 0x080c, 0x7090, 0x080c, 0x9e1d, 0x080c, + 0x7173, 0x0005, 0x0036, 0x080c, 0xb33a, 0x603f, 0x0000, 0x2019, + 0x000b, 0x0031, 0x601f, 0x0006, 0x6003, 0x0007, 0x003e, 0x0005, + 0x0126, 0x0036, 0x2091, 0x8000, 0x0086, 0x2c40, 0x0096, 0x2049, + 0x0000, 0x080c, 0x8130, 0x009e, 0x008e, 0x1578, 0x0076, 0x2c38, + 0x080c, 0x81d6, 0x007e, 0x1548, 0x6000, 0xa086, 0x0000, 0x0528, + 0x601c, 0xa086, 0x0007, 0x0508, 0x00d6, 0x6000, 0xa086, 0x0004, + 0x1150, 0x080c, 0xb33a, 0x601f, 0x0007, 0x2001, 0xb7b6, 0x2004, + 0x6016, 0x080c, 0x194d, 0x6010, 0x2068, 0x080c, 0x9c5a, 0x0110, + 0x080c, 0xb099, 0x00de, 0x6013, 0x0000, 0x080c, 0xb33a, 0x601f, + 0x0007, 0x2001, 0xb7b6, 0x2004, 0x6016, 0x003e, 0x012e, 0x0005, + 0x00f6, 0x00c6, 0x0036, 0x0156, 0x2079, 0xbb80, 0x7938, 0x783c, + 0x080c, 0x281d, 0x15b0, 0x0016, 0x00c6, 0x080c, 0x4fa9, 0x1578, + 0x001e, 0x002e, 0x0026, 0x0016, 0x2019, 0x0029, 0x080c, 0x8299, + 0x080c, 0x6df5, 0x0076, 0x2039, 0x0000, 0x080c, 0x6d02, 0x007e, + 0x001e, 0x0076, 0x2039, 0x0000, 0x080c, 0xae82, 0x007e, 0x080c, + 0x51aa, 0x0026, 0x6204, 0xa294, 0xff00, 0x8217, 0xa286, 0x0006, + 0x0118, 0xa286, 0x0004, 0x1118, 0x62a0, 0x080c, 0x2d55, 0x002e, + 0x001e, 0x080c, 0x4c0b, 0x6612, 0x6516, 0xa006, 0x0010, 0x00ce, + 0x001e, 0x015e, 0x003e, 0x00ce, 0x00fe, 0x0005, 0x00c6, 0x00d6, + 0x00e6, 0x0016, 0x2009, 0xb521, 0x2104, 0xa086, 0x0074, 0x1904, + 0xadbb, 0x2069, 0xbb8e, 0x690c, 0xa182, 0x0100, 0x06c0, 0x6908, + 0xa184, 0x8000, 0x05e8, 0x2001, 0xb79e, 0x2004, 0xa005, 0x1160, + 0x6018, 0x2070, 0x7010, 0xa084, 0x00ff, 0x0118, 0x7000, 0xd0f4, + 0x0118, 0xa184, 0x0800, 0x0560, 0x6910, 0xa18a, 0x0001, 0x0610, + 0x6914, 0x2069, 0xbbae, 0x6904, 0x81ff, 0x1198, 0x690c, 0xa182, + 0x0100, 0x02a8, 0x6908, 0x81ff, 0x1178, 0x6910, 0xa18a, 0x0001, + 0x0288, 0x6918, 0xa18a, 0x0001, 0x0298, 0x00d0, 0x6013, 0x0100, + 0x00a0, 0x6013, 0x0300, 0x0088, 0x6013, 0x0500, 0x0070, 0x6013, + 0x0700, 0x0058, 0x6013, 0x0900, 0x0040, 0x6013, 0x0b00, 0x0028, + 0x6013, 0x0f00, 0x0010, 0x6013, 0x2d00, 0xa085, 0x0001, 0x0008, + 0xa006, 0x001e, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, + 0x0026, 0x0036, 0x0156, 0x6218, 0x2268, 0x6b04, 0xa394, 0x00ff, + 0xa286, 0x0006, 0x0190, 0xa286, 0x0004, 0x0178, 0xa394, 0xff00, + 0x8217, 0xa286, 0x0006, 0x0148, 0xa286, 0x0004, 0x0130, 0x00c6, + 0x2d60, 0x080c, 0x4fb8, 0x00ce, 0x04c0, 0x2011, 0xbb96, 0xad98, + 0x000a, 0x20a9, 0x0004, 0x080c, 0x90da, 0x1580, 0x2011, 0xbb9a, + 0xad98, 0x0006, 0x20a9, 0x0004, 0x080c, 0x90da, 0x1538, 0x0046, + 0x0016, 0x6aa0, 0xa294, 0x00ff, 0x8227, 0xa006, 0x2009, 0xb553, + 0x210c, 0xd1a4, 0x0138, 0x2009, 0x0029, 0x080c, 0xb0e8, 0x6800, + 0xc0e5, 0x6802, 0x2019, 0x0029, 0x080c, 0x6df5, 0x0076, 0x2039, + 0x0000, 0x080c, 0x6d02, 0x2c08, 0x080c, 0xae82, 0x007e, 0x2001, + 0x0007, 0x080c, 0x4f2a, 0x001e, 0x004e, 0xa006, 0x015e, 0x003e, + 0x002e, 0x00de, 0x00ce, 0x0005, 0x00d6, 0x2069, 0xbb8e, 0x6800, + 0xa086, 0x0800, 0x0118, 0x6013, 0x0000, 0x0008, 0xa006, 0x00de, + 0x0005, 0x00c6, 0x00f6, 0x0016, 0x0026, 0x0036, 0x0156, 0x2079, + 0xbb8c, 0x7930, 0x7834, 0x080c, 0x281d, 0x11a0, 0x080c, 0x4fa9, + 0x1188, 0x2011, 0xbb90, 0xac98, 0x000a, 0x20a9, 0x0004, 0x080c, + 0x90da, 0x1140, 0x2011, 0xbb94, 0xac98, 0x0006, 0x20a9, 0x0004, + 0x080c, 0x90da, 0x015e, 0x003e, 0x002e, 0x001e, 0x00fe, 0x00ce, + 0x0005, 0x00c6, 0x0006, 0x0016, 0x0026, 0x0036, 0x0156, 0x2011, + 0xbb83, 0x2204, 0x8211, 0x220c, 0x080c, 0x281d, 0x11a0, 0x080c, + 0x4fa9, 0x1188, 0x2011, 0xbb96, 0xac98, 0x000a, 0x20a9, 0x0004, + 0x080c, 0x90da, 0x1140, 0x2011, 0xbb9a, 0xac98, 0x0006, 0x20a9, + 0x0004, 0x080c, 0x90da, 0x015e, 0x003e, 0x002e, 0x001e, 0x000e, + 0x00ce, 0x0005, 0x00e6, 0x00c6, 0x0086, 0x0076, 0x0066, 0x0056, + 0x0046, 0x0026, 0x0126, 0x2091, 0x8000, 0x2740, 0x2029, 0xb7e9, + 0x252c, 0x2021, 0xb7ef, 0x2424, 0x2061, 0xbd00, 0x2071, 0xb500, + 0x7648, 0x7068, 0x81ff, 0x0150, 0x0006, 0xa186, 0xb8f4, 0x000e, + 0x0128, 0x8001, 0xa602, 0x1a04, 0xaf03, 0x0018, 0xa606, 0x0904, + 0xaf03, 0x2100, 0xac06, 0x0904, 0xaefa, 0x080c, 0xb110, 0x0904, + 0xaefa, 0x671c, 0xa786, 0x0001, 0x0904, 0xaf1e, 0xa786, 0x0004, + 0x0904, 0xaf1e, 0xa786, 0x0007, 0x05e8, 0x2500, 0xac06, 0x05d0, + 0x2400, 0xac06, 0x05b8, 0x080c, 0xb120, 0x15a0, 0x88ff, 0x0118, + 0x6050, 0xa906, 0x1578, 0x00d6, 0x6000, 0xa086, 0x0004, 0x1120, + 0x0016, 0x080c, 0x194d, 0x001e, 0xa786, 0x0008, 0x1148, 0x080c, + 0x9e58, 0x1130, 0x080c, 0x8c19, 0x00de, 0x080c, 0x9e1d, 0x00d0, + 0x6010, 0x2068, 0x080c, 0x9c5a, 0x0190, 0xa786, 0x0003, 0x1528, + 0x6837, 0x0103, 0x6b4a, 0x6847, 0x0000, 0x080c, 0xb380, 0x0016, + 0x080c, 0x9ecc, 0x080c, 0x5408, 0x001e, 0x080c, 0x9e11, 0x00de, + 0x080c, 0x9e1d, 0xace0, 0x0018, 0x2001, 0xb517, 0x2004, 0xac02, + 0x1210, 0x0804, 0xae96, 0x012e, 0x002e, 0x004e, 0x005e, 0x006e, + 0x007e, 0x008e, 0x00ce, 0x00ee, 0x0005, 0xa786, 0x0006, 0x1150, + 0xa386, 0x0005, 0x0128, 0x080c, 0xb380, 0x080c, 0xb099, 0x08f8, + 0x00de, 0x0c00, 0xa786, 0x000a, 0x0968, 0x0850, 0x080c, 0xb120, + 0x19c8, 0x81ff, 0x09b8, 0xa180, 0x0001, 0x2004, 0xa086, 0x0018, + 0x0130, 0xa180, 0x0001, 0x2004, 0xa086, 0x002d, 0x1958, 0x6000, + 0xa086, 0x0002, 0x1938, 0x080c, 0x9e47, 0x0130, 0x080c, 0x9e58, + 0x1908, 0x080c, 0x8c19, 0x0038, 0x080c, 0x2cc2, 0x080c, 0x9e58, + 0x1110, 0x080c, 0x8c19, 0x080c, 0x9e1d, 0x0804, 0xaefa, 0x00c6, + 0x00e6, 0x0016, 0x2c08, 0x2170, 0xa006, 0x080c, 0xb0ba, 0x001e, + 0x0120, 0x601c, 0xa084, 0x000f, 0x001b, 0x00ee, 0x00ce, 0x0005, + 0xaf60, 0xaf60, 0xaf60, 0xaf60, 0xaf60, 0xaf60, 0xaf62, 0xaf60, + 0xa006, 0x0005, 0x0046, 0x0016, 0x7018, 0xa080, 0x0028, 0x2024, + 0xa4a4, 0x00ff, 0x8427, 0x2c00, 0x2009, 0x0020, 0x080c, 0xb0e8, + 0x001e, 0x004e, 0x0036, 0x2019, 0x0002, 0x080c, 0xace0, 0x003e, + 0xa085, 0x0001, 0x0005, 0x2001, 0x0001, 0x080c, 0x4eeb, 0x0156, + 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0xb505, 0x2011, + 0xbb96, 0x080c, 0x90da, 0x003e, 0x002e, 0x001e, 0x015e, 0xa005, + 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0086, 0x0076, 0x0066, 0x0026, + 0x0126, 0x2091, 0x8000, 0x2740, 0x2061, 0xbd00, 0x2079, 0x0001, + 0x8fff, 0x0904, 0xafef, 0x2071, 0xb500, 0x7648, 0x7068, 0x8001, + 0xa602, 0x1a04, 0xafef, 0x88ff, 0x0128, 0x2800, 0xac06, 0x15b0, + 0x2079, 0x0000, 0x080c, 0xb110, 0x0588, 0x2400, 0xac06, 0x0570, + 0x671c, 0xa786, 0x0006, 0x1550, 0xa786, 0x0007, 0x0538, 0x88ff, + 0x1140, 0x6018, 0xa206, 0x1510, 0x85ff, 0x0118, 0x6050, 0xa106, + 0x11e8, 0x00d6, 0x6000, 0xa086, 0x0004, 0x1150, 0x080c, 0xb33a, + 0x601f, 0x0007, 0x2001, 0xb7b6, 0x2004, 0x6016, 0x080c, 0x194d, + 0x6010, 0x2068, 0x080c, 0x9c5a, 0x0120, 0x0046, 0x080c, 0xb099, + 0x004e, 0x00de, 0x080c, 0x9e1d, 0x88ff, 0x1198, 0xace0, 0x0018, + 0x2001, 0xb517, 0x2004, 0xac02, 0x1210, 0x0804, 0xafa0, 0xa006, + 0x012e, 0x002e, 0x006e, 0x007e, 0x008e, 0x00ce, 0x00ee, 0x00fe, + 0x0005, 0xa8c5, 0x0001, 0x0ca0, 0x0076, 0x0056, 0x0086, 0x2041, + 0x0000, 0x2029, 0x0001, 0x2c20, 0x2019, 0x0002, 0x6218, 0x0096, + 0x2049, 0x0000, 0x080c, 0x8130, 0x009e, 0x008e, 0x2039, 0x0000, + 0x080c, 0x81d6, 0x080c, 0xaf91, 0x005e, 0x007e, 0x0005, 0x0026, + 0x0046, 0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20, 0x2128, 0x20a9, + 0x007f, 0x2009, 0x0000, 0x0016, 0x0036, 0x080c, 0x4fa9, 0x11b0, + 0x2c10, 0x0056, 0x0086, 0x2041, 0x0000, 0x2508, 0x2029, 0x0001, + 0x0096, 0x2049, 0x0000, 0x080c, 0x8130, 0x009e, 0x008e, 0x2039, + 0x0000, 0x080c, 0x81d6, 0x080c, 0xaf91, 0x005e, 0x003e, 0x001e, + 0x8108, 0x1f04, 0xb023, 0x015e, 0x00ce, 0x007e, 0x005e, 0x004e, + 0x002e, 0x0005, 0x0076, 0x0056, 0x6218, 0x0086, 0x2041, 0x0000, + 0x2029, 0x0001, 0x2019, 0x0048, 0x0096, 0x2049, 0x0000, 0x080c, + 0x8130, 0x009e, 0x008e, 0x2039, 0x0000, 0x080c, 0x81d6, 0x2c20, + 0x080c, 0xaf91, 0x005e, 0x007e, 0x0005, 0x0026, 0x0046, 0x0056, + 0x0076, 0x00c6, 0x0156, 0x2c20, 0x20a9, 0x007f, 0x2009, 0x0000, + 0x0016, 0x0036, 0x080c, 0x4fa9, 0x11c0, 0x2c10, 0x0086, 0x2041, + 0x0000, 0x2828, 0x0046, 0x2021, 0x0001, 0x080c, 0xb31c, 0x004e, + 0x0096, 0x2049, 0x0000, 0x080c, 0x8130, 0x009e, 0x008e, 0x2039, + 0x0000, 0x080c, 0x81d6, 0x080c, 0xaf91, 0x003e, 0x001e, 0x8108, + 0x1f04, 0xb070, 0x015e, 0x00ce, 0x007e, 0x005e, 0x004e, 0x002e, + 0x0005, 0x0016, 0x00f6, 0x3800, 0xd08c, 0x0130, 0xad82, 0x1000, + 0x02b0, 0xad82, 0xb500, 0x0230, 0xad82, 0xed00, 0x0280, 0xad82, + 0xffff, 0x1268, 0x6800, 0xa07d, 0x0138, 0x6803, 0x0000, 0x6b52, + 0x080c, 0x5408, 0x2f68, 0x0cb0, 0x6b52, 0x080c, 0x5408, 0x00fe, + 0x001e, 0x0005, 0x00e6, 0x0046, 0x0036, 0x2061, 0xbd00, 0xa005, + 0x1138, 0x2071, 0xb500, 0x7448, 0x7068, 0x8001, 0xa402, 0x12d8, + 0x2100, 0xac06, 0x0168, 0x6000, 0xa086, 0x0000, 0x0148, 0x6008, + 0xa206, 0x1130, 0x6018, 0xa1a0, 0x0006, 0x2424, 0xa406, 0x0140, + 0xace0, 0x0018, 0x2001, 0xb517, 0x2004, 0xac02, 0x1220, 0x0c40, + 0xa085, 0x0001, 0x0008, 0xa006, 0x003e, 0x004e, 0x00ee, 0x0005, + 0x00d6, 0x0006, 0x080c, 0x15f8, 0x000e, 0x090c, 0x1515, 0x6837, + 0x010d, 0x685e, 0x0026, 0x2010, 0x080c, 0x9c4a, 0x2001, 0x0000, + 0x0120, 0x2200, 0xa080, 0x0014, 0x2004, 0x002e, 0x684a, 0x6956, + 0x6c46, 0x684f, 0x0000, 0x2001, 0xb7be, 0x2004, 0x6852, 0xa006, + 0x68b2, 0x6802, 0x683a, 0x685a, 0x080c, 0x5408, 0x00de, 0x0005, + 0x6700, 0xa786, 0x0000, 0x0158, 0xa786, 0x0001, 0x0140, 0xa786, + 0x000a, 0x0128, 0xa786, 0x0009, 0x0110, 0xa085, 0x0001, 0x0005, + 0x00e6, 0x6018, 0x2070, 0x70a0, 0xa206, 0x00ee, 0x0005, 0x0016, + 0x6004, 0xa08e, 0x001e, 0x11a0, 0x8007, 0x6130, 0xa18c, 0x00ff, + 0xa105, 0x6032, 0x6007, 0x0085, 0x6003, 0x000b, 0x601f, 0x0005, + 0x2001, 0xb7b7, 0x2004, 0x6016, 0x080c, 0x6c8d, 0x080c, 0x7173, + 0x001e, 0x0005, 0xe000, 0xe000, 0x0005, 0x6020, 0xd0e4, 0x0158, + 0xd0cc, 0x0118, 0x080c, 0x9f35, 0x0030, 0x080c, 0xb33a, 0x080c, + 0x6aef, 0x080c, 0x861d, 0x0005, 0xa280, 0x0007, 0x2004, 0xa084, + 0x000f, 0x0002, 0xb163, 0xb163, 0xb163, 0xb168, 0xb163, 0xb165, + 0xb165, 0xb163, 0xb165, 0xa006, 0x0005, 0x00c6, 0x2260, 0x00ce, + 0xa085, 0x0001, 0x0005, 0xa280, 0x0007, 0x2004, 0xa084, 0x000f, + 0x0002, 0xb17a, 0xb17a, 0xb17a, 0xb17a, 0xb17a, 0xb17a, 0xb185, + 0xb17a, 0xb17a, 0x6007, 0x003b, 0x602b, 0x0009, 0x6013, 0x2a00, + 0x6003, 0x0001, 0x080c, 0x6c8d, 0x0005, 0x00c6, 0x2260, 0x080c, + 0xb33a, 0x603f, 0x0000, 0x6020, 0xc0f4, 0xc0cc, 0x6022, 0x6037, + 0x0000, 0x00ce, 0x00d6, 0x2268, 0xa186, 0x0007, 0x1904, 0xb1e0, + 0x6810, 0xa005, 0x0138, 0xa080, 0x0013, 0x2004, 0xd0fc, 0x1110, + 0x00de, 0x08c0, 0x6007, 0x003a, 0x6003, 0x0001, 0x080c, 0x6c8d, + 0x080c, 0x7173, 0x00c6, 0x2d60, 0x6100, 0xa186, 0x0002, 0x1904, + 0xb269, 0x6010, 0xa005, 0x1138, 0x6000, 0xa086, 0x0007, 0x190c, + 0x1515, 0x0804, 0xb269, 0xa08c, 0xf000, 0x1130, 0x0028, 0x2068, + 0x6800, 0xa005, 0x1de0, 0x2d00, 0xa080, 0x0013, 0x2004, 0xa084, + 0x0003, 0xa086, 0x0002, 0x1180, 0x6010, 0x2068, 0x684c, 0xc0dc, + 0xc0f4, 0x684e, 0x6850, 0xc0f4, 0xc0fc, 0x6852, 0x2009, 0x0043, + 0x080c, 0xab56, 0x0804, 0xb269, 0x2009, 0x0041, 0x0804, 0xb263, + 0xa186, 0x0005, 0x15f0, 0x6810, 0xa080, 0x0013, 0x2004, 0xd0bc, + 0x1118, 0x00de, 0x0804, 0xb17a, 0xd0b4, 0x0128, 0xd0fc, 0x090c, + 0x1515, 0x0804, 0xb198, 0x6007, 0x003a, 0x6003, 0x0001, 0x080c, + 0x6c8d, 0x080c, 0x7173, 0x00c6, 0x2d60, 0x6100, 0xa186, 0x0002, + 0x0120, 0xa186, 0x0004, 0x1904, 0xb269, 0x2071, 0xb823, 0x7000, + 0xa086, 0x0003, 0x1128, 0x7004, 0xac06, 0x1110, 0x7003, 0x0000, + 0x6810, 0xa080, 0x0013, 0x200c, 0xc1f4, 0xc1dc, 0x2102, 0x8000, + 0x200c, 0xc1f4, 0xc1fc, 0xc1bc, 0x2102, 0x2009, 0x0042, 0x0804, + 0xb263, 0x0036, 0x00d6, 0x00d6, 0x080c, 0x15f8, 0x003e, 0x090c, + 0x1515, 0x6837, 0x010d, 0x6803, 0x0000, 0x683b, 0x0000, 0x685b, + 0x0000, 0x6b5e, 0x6857, 0x0045, 0x2c00, 0x6862, 0x6034, 0x6872, + 0x2360, 0x6020, 0xc0dd, 0x6022, 0x6018, 0xa080, 0x0028, 0x2004, + 0xa084, 0x00ff, 0x8007, 0x6350, 0x6b4a, 0x6846, 0x684f, 0x0000, + 0x6853, 0x0000, 0x6d6a, 0x6e66, 0x686f, 0x0001, 0x080c, 0x5408, + 0x2019, 0x0045, 0x6008, 0x2068, 0x080c, 0xace0, 0x2d00, 0x600a, + 0x601f, 0x0006, 0x6003, 0x0007, 0x6017, 0x0000, 0x603f, 0x0000, + 0x00de, 0x003e, 0x0038, 0x603f, 0x0000, 0x6003, 0x0007, 0x080c, + 0xab56, 0x00ce, 0x00de, 0x0005, 0xa186, 0x0013, 0x1128, 0x6004, + 0xa082, 0x0085, 0x2008, 0x00c2, 0xa186, 0x0027, 0x1178, 0x080c, + 0x7090, 0x0036, 0x00d6, 0x6010, 0x2068, 0x2019, 0x0004, 0x080c, + 0xb099, 0x00de, 0x003e, 0x080c, 0x7173, 0x0005, 0xa186, 0x0014, + 0x0d70, 0x080c, 0x8663, 0x0005, 0xb295, 0xb293, 0xb293, 0xb293, + 0xb293, 0xb293, 0xb295, 0x080c, 0x1515, 0x080c, 0x7090, 0x6003, + 0x000c, 0x080c, 0x7173, 0x0005, 0xa182, 0x008c, 0x1220, 0xa182, + 0x0085, 0x0208, 0x001a, 0x080c, 0x8663, 0x0005, 0xb2ad, 0xb2ad, + 0xb2ad, 0xb2ad, 0xb2af, 0xb2cd, 0xb2ad, 0x080c, 0x1515, 0x00d6, + 0x2c68, 0x080c, 0x85c7, 0x01a0, 0x6003, 0x0001, 0x6007, 0x001e, + 0x2009, 0xbb8e, 0x210c, 0x6136, 0x2009, 0xbb8f, 0x210c, 0x613a, + 0x600b, 0xffff, 0x6918, 0x611a, 0x601f, 0x0004, 0x080c, 0x6c8d, + 0x2d60, 0x080c, 0x861d, 0x00de, 0x0005, 0x080c, 0x861d, 0x0005, + 0x00e6, 0x6018, 0x2070, 0x7000, 0xd0ec, 0x00ee, 0x0005, 0x6010, + 0xa08c, 0xf000, 0x0904, 0xb31b, 0xa080, 0x0013, 0x200c, 0xd1ec, + 0x05d0, 0x2001, 0xb572, 0x2004, 0xd0ec, 0x05a8, 0x6003, 0x0002, + 0x6020, 0xc0e5, 0x6022, 0xd1ac, 0x0180, 0x00f6, 0x2c78, 0x080c, + 0x5301, 0x00fe, 0x0150, 0x2001, 0xb7b8, 0x2004, 0x603e, 0x2009, + 0xb572, 0x210c, 0xd1f4, 0x11e8, 0x0080, 0x2009, 0xb572, 0x210c, + 0xd1f4, 0x0128, 0x6020, 0xc0e4, 0x6022, 0xa006, 0x00a0, 0x2001, + 0xb7b8, 0x200c, 0x8103, 0xa100, 0x603e, 0x6018, 0xa088, 0x002b, + 0x2104, 0xa005, 0x0118, 0xa088, 0x0003, 0x0cd0, 0x2c0a, 0x600f, + 0x0000, 0xa085, 0x0001, 0x0005, 0x0016, 0x00c6, 0x00e6, 0x6150, + 0xa2f0, 0x002b, 0x2e04, 0x2060, 0x8cff, 0x0180, 0x84ff, 0x1118, + 0x6050, 0xa106, 0x1138, 0x600c, 0x2072, 0x080c, 0x6aef, 0x080c, + 0x861d, 0x0010, 0xacf0, 0x0003, 0x2e64, 0x0c70, 0x00ee, 0x00ce, + 0x001e, 0x0005, 0x00d6, 0x6018, 0xa0e8, 0x002b, 0x2d04, 0xa005, + 0x0140, 0xac06, 0x0120, 0x2d04, 0xa0e8, 0x0003, 0x0cb8, 0x600c, + 0x206a, 0x00de, 0x0005, 0x0026, 0x0036, 0x0156, 0x2011, 0xb528, + 0x2204, 0xa084, 0x00ff, 0x2019, 0xbb8e, 0x2334, 0xa636, 0x11d8, + 0x8318, 0x2334, 0x2204, 0xa084, 0xff00, 0xa636, 0x11a0, 0x2011, + 0xbb90, 0x6018, 0xa098, 0x000a, 0x20a9, 0x0004, 0x080c, 0x90da, + 0x1150, 0x2011, 0xbb94, 0x6018, 0xa098, 0x0006, 0x20a9, 0x0004, + 0x080c, 0x90da, 0x1100, 0x015e, 0x003e, 0x002e, 0x0005, 0x00e6, + 0x2071, 0xb500, 0x080c, 0x4bc6, 0x080c, 0x2ab8, 0x00ee, 0x0005, + 0x00e6, 0x6018, 0x2070, 0x7000, 0xd0fc, 0x0108, 0x0011, 0x00ee, + 0x0005, 0x6850, 0xc0e5, 0x6852, 0x0005, 0x00e6, 0x00c6, 0x0076, + 0x0066, 0x0056, 0x0046, 0x0026, 0x0016, 0x0126, 0x2091, 0x8000, + 0x2029, 0xb7e9, 0x252c, 0x2021, 0xb7ef, 0x2424, 0x2061, 0xbd00, + 0x2071, 0xb500, 0x7648, 0x7068, 0xa606, 0x0578, 0x671c, 0xa786, + 0x0001, 0x0118, 0xa786, 0x0008, 0x1500, 0x2500, 0xac06, 0x01e8, + 0x2400, 0xac06, 0x01d0, 0x080c, 0xb110, 0x01b8, 0x080c, 0xb120, + 0x11a0, 0x6000, 0xa086, 0x0004, 0x1120, 0x0016, 0x080c, 0x194d, + 0x001e, 0x080c, 0x9e47, 0x1110, 0x080c, 0x2cc2, 0x080c, 0x9e58, + 0x1110, 0x080c, 0x8c19, 0x080c, 0x9e1d, 0xace0, 0x0018, 0x2001, + 0xb517, 0x2004, 0xac02, 0x1208, 0x0858, 0x012e, 0x001e, 0x002e, + 0x004e, 0x005e, 0x006e, 0x007e, 0x00ce, 0x00ee, 0x0005, 0x0126, + 0x0006, 0x00e6, 0x0016, 0x2091, 0x8000, 0x2071, 0xb540, 0xd5a4, + 0x0118, 0x7034, 0x8000, 0x7036, 0xd5b4, 0x0118, 0x7030, 0x8000, + 0x7032, 0xd5ac, 0x0178, 0x2500, 0xa084, 0x0007, 0xa08e, 0x0003, + 0x0148, 0xa08e, 0x0004, 0x0130, 0xa08e, 0x0005, 0x0118, 0x2071, + 0xb54a, 0x04c9, 0x001e, 0x00ee, 0x000e, 0x012e, 0x0005, 0x0126, + 0x0006, 0x00e6, 0x0016, 0x2091, 0x8000, 0x2071, 0xb540, 0xd5a4, + 0x0118, 0x7034, 0x8000, 0x7036, 0xd5b4, 0x0118, 0x7030, 0x8000, + 0x7032, 0xd5ac, 0x0178, 0x2500, 0xa084, 0x0007, 0xa08e, 0x0003, + 0x0148, 0xa08e, 0x0004, 0x0130, 0xa08e, 0x0005, 0x0118, 0x2071, + 0xb54a, 0x0089, 0x001e, 0x00ee, 0x000e, 0x012e, 0x0005, 0x0126, + 0x0006, 0x00e6, 0x2091, 0x8000, 0x2071, 0xb542, 0x0021, 0x00ee, + 0x000e, 0x012e, 0x0005, 0x2e04, 0x8000, 0x2072, 0x1220, 0x8e70, + 0x2e04, 0x8000, 0x2072, 0x0005, 0x00e6, 0x2071, 0xb540, 0x0c99, + 0x00ee, 0x0005, 0x00e6, 0x2071, 0xb544, 0x0c69, 0x00ee, 0x0005, + 0x0126, 0x0006, 0x00e6, 0x2091, 0x8000, 0x2071, 0xb540, 0x7044, + 0x8000, 0x7046, 0x00ee, 0x000e, 0x012e, 0x0005, 0x0001, 0x0002, + 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, 0x0100, 0x0200, + 0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000, 0x2440 +}; +#ifdef UNIQUE_FW_NAME +unsigned short fw2200tp_length01 = 0xa46f; +#else +unsigned short risc_code_length01 = 0xa46f; +#endif + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/ql2300_fw.c 999-mjb/drivers/scsi/qla2xxx/ql2300_fw.c --- 000-virgin/drivers/scsi/qla2xxx/ql2300_fw.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/ql2300_fw.c 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,6695 @@ +/************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + *************************************************************************/ + +/* + * Firmware Version 3.02.18 (10:33 Nov 03, 2003) + */ + +#ifdef UNIQUE_FW_NAME +unsigned short fw2300tpx_version = 3*1024+2; +#else +unsigned short risc_code_version = 3*1024+2; +#endif + +#ifdef UNIQUE_FW_NAME +unsigned char fw2300tpx_version_str[] = {3, 2,18}; +#else +unsigned char firmware_version[] = {3, 2,18}; +#endif + +#ifdef UNIQUE_FW_NAME +#define fw2300tpx_VERSION_STRING "3.02.18" +#else +#define FW_VERSION_STRING "3.02.18" +#endif + +#ifdef UNIQUE_FW_NAME +unsigned short fw2300tpx_addr01 = 0x0800 ; +#else +unsigned short risc_code_addr01 = 0x0800 ; +#endif + +#ifdef UNIQUE_FW_NAME +unsigned short fw2300tpx_code01[] = { +#else +unsigned short risc_code01[] = { +#endif + 0x0470, 0x0000, 0x0000, 0xcf5b, 0x0000, 0x0003, 0x0002, 0x0012, + 0x0117, 0x2043, 0x4f50, 0x5952, 0x4947, 0x4854, 0x2032, 0x3030, + 0x3120, 0x514c, 0x4f47, 0x4943, 0x2043, 0x4f52, 0x504f, 0x5241, + 0x5449, 0x4f4e, 0x2049, 0x5350, 0x3233, 0x3030, 0x2046, 0x6972, + 0x6d77, 0x6172, 0x6520, 0x2056, 0x6572, 0x7369, 0x6f6e, 0x2030, + 0x332e, 0x3032, 0x2e31, 0x3820, 0x2020, 0x2020, 0x2400, 0x20a9, + 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2200, 0x20a9, 0x000f, + 0x2001, 0x0000, 0x400f, 0x2091, 0x2400, 0x20a9, 0x000f, 0x2001, + 0x0000, 0x400f, 0x2091, 0x2600, 0x20a9, 0x000f, 0x2001, 0x0000, + 0x400f, 0x2091, 0x2800, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, + 0x2091, 0x2a00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, + 0x2c00, 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2e00, + 0x20a9, 0x000f, 0x2001, 0x0000, 0x400f, 0x2091, 0x2000, 0x2001, + 0x0000, 0x20c1, 0x0004, 0x2001, 0x017f, 0x2003, 0x0000, 0x20c9, + 0x1bff, 0x2059, 0x0000, 0x2b78, 0x7883, 0x0004, 0x2089, 0x29be, + 0x2051, 0x1800, 0x2a70, 0x20e1, 0x0001, 0x20e9, 0x0001, 0x2029, + 0x4d00, 0x2031, 0xffff, 0x2039, 0x4cd0, 0x2021, 0x0200, 0x20e9, + 0x0001, 0x20a1, 0x0000, 0x20a9, 0x0800, 0x900e, 0x4104, 0x20e9, + 0x0001, 0x20a1, 0x1000, 0x900e, 0x2001, 0x0cc0, 0x9084, 0x0fff, + 0x20a8, 0x4104, 0x2001, 0x0000, 0x9086, 0x0000, 0x0120, 0x21a8, + 0x4104, 0x8001, 0x1de0, 0x7566, 0x766a, 0x7762, 0x746e, 0x7472, + 0x00e6, 0x2071, 0x1a8b, 0x2472, 0x00ee, 0x20a1, 0x1cd0, 0x7168, + 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x000f, 0x2001, 0x0001, + 0x9112, 0x900e, 0x21a8, 0x4104, 0x8211, 0x1de0, 0x7168, 0x3400, + 0x8001, 0x9102, 0x0120, 0x0218, 0x20a8, 0x900e, 0x4104, 0x2009, + 0x1800, 0x810d, 0x810d, 0x810d, 0x810d, 0x810d, 0x918c, 0x001f, + 0x2001, 0x0001, 0x9112, 0x20e9, 0x0001, 0x20a1, 0x0800, 0x900e, + 0x20a9, 0x0800, 0x4104, 0x8211, 0x1dd8, 0x080c, 0x0eed, 0x080c, + 0x5a2f, 0x080c, 0x996c, 0x080c, 0x10a4, 0x080c, 0x127c, 0x080c, + 0x196d, 0x080c, 0x0d4b, 0x080c, 0x1029, 0x080c, 0x3092, 0x080c, + 0x6f3e, 0x080c, 0x62c8, 0x080c, 0x7b85, 0x080c, 0x217b, 0x080c, + 0x7eaf, 0x080c, 0x757c, 0x080c, 0x1fb8, 0x080c, 0x20ec, 0x080c, + 0x2170, 0x2091, 0x3009, 0x7883, 0x0000, 0x1004, 0x091d, 0x7880, + 0x9086, 0x0002, 0x1190, 0x7883, 0x4000, 0x7837, 0x4000, 0x7833, + 0x0010, 0x0e04, 0x0911, 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, + 0x0089, 0x2004, 0xd084, 0x190c, 0x1167, 0x2071, 0x1800, 0x7003, + 0x0000, 0x2071, 0x1800, 0x7000, 0x908e, 0x0003, 0x1168, 0x080c, + 0x4737, 0x080c, 0x30b9, 0x080c, 0x6faf, 0x080c, 0x6787, 0x080c, + 0x7bae, 0x080c, 0x292b, 0x0c68, 0x000b, 0x0c88, 0x0940, 0x0941, + 0x0ad4, 0x093e, 0x0b94, 0x0d4a, 0x0d4a, 0x0d4a, 0x080c, 0x0db2, + 0x0005, 0x0126, 0x00f6, 0x2091, 0x8000, 0x7000, 0x9086, 0x0001, + 0x1904, 0x0aa7, 0x080c, 0x0e5a, 0x080c, 0x6c53, 0x0150, 0x080c, + 0x6c76, 0x1590, 0x2079, 0x0100, 0x7828, 0x9085, 0x1800, 0x782a, + 0x0458, 0x080c, 0x6b8a, 0x7000, 0x9086, 0x0001, 0x1904, 0x0aa7, + 0x7090, 0x9086, 0x0028, 0x1904, 0x0aa7, 0x080c, 0x7b7c, 0x2001, + 0x0161, 0x2003, 0x0001, 0x2079, 0x0100, 0x7827, 0xffff, 0x7a28, + 0x9295, 0x5e2f, 0x7a2a, 0x2011, 0x6ad9, 0x080c, 0x7c4a, 0x2011, + 0x6acc, 0x080c, 0x7d1b, 0x2011, 0x588a, 0x080c, 0x7c4a, 0x2011, + 0x8030, 0x901e, 0x738e, 0x04a0, 0x080c, 0x5137, 0x2079, 0x0100, + 0x7844, 0x9005, 0x1904, 0x0aa7, 0x2011, 0x588a, 0x080c, 0x7c4a, + 0x2011, 0x6ad9, 0x080c, 0x7c4a, 0x2011, 0x6acc, 0x080c, 0x7d1b, + 0x2001, 0x0265, 0x2001, 0x0205, 0x2003, 0x0000, 0x7840, 0x9084, + 0xfffb, 0x7842, 0x2001, 0x1975, 0x2004, 0x9005, 0x1140, 0x00c6, + 0x2061, 0x0100, 0x080c, 0x59d7, 0x00ce, 0x0804, 0x0aa7, 0x780f, + 0x006b, 0x7a28, 0x9295, 0x5e2f, 0x7a2a, 0x2011, 0x8010, 0x73d0, + 0x2001, 0x1976, 0x2003, 0x0001, 0x080c, 0x27f1, 0x080c, 0x4672, + 0x7240, 0xc284, 0x7242, 0x2001, 0x180c, 0x200c, 0xc1ac, 0xc1cc, + 0x2102, 0x080c, 0x91bb, 0x2011, 0x0004, 0x080c, 0xb60b, 0x080c, + 0x61a1, 0x080c, 0x6c53, 0x1120, 0x080c, 0x2835, 0x02e0, 0x0400, + 0x080c, 0x59de, 0x0140, 0x708f, 0x0001, 0x70cb, 0x0000, 0x080c, + 0x5304, 0x0804, 0x0aa7, 0x080c, 0x5113, 0xd094, 0x0188, 0x2011, + 0x180c, 0x2204, 0xc0cd, 0x2012, 0x080c, 0x5117, 0xd0d4, 0x1118, + 0x080c, 0x2835, 0x1270, 0x2011, 0x180c, 0x2204, 0xc0bc, 0x00a8, + 0x080c, 0x5117, 0xd0d4, 0x1db8, 0x2011, 0x180c, 0x2204, 0xc0bd, + 0x0060, 0x2011, 0x180c, 0x2204, 0xc0bd, 0x2012, 0x080c, 0x629c, + 0x1128, 0xd0a4, 0x0118, 0x2204, 0xc0fd, 0x2012, 0x080c, 0x6262, + 0x0120, 0x7a0c, 0xc2b4, 0x7a0e, 0x00a8, 0x7077, 0x0000, 0x080c, + 0x6c53, 0x1130, 0x70a8, 0x9005, 0x1168, 0x080c, 0xba40, 0x0050, + 0x080c, 0xba40, 0x70d4, 0xd09c, 0x1128, 0x70a8, 0x9005, 0x0110, + 0x080c, 0x59b4, 0x70df, 0x0000, 0x70db, 0x0000, 0x709f, 0x0000, + 0x080c, 0x283d, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c4, 0x2012, + 0x72d4, 0x080c, 0x6c53, 0x1178, 0x9016, 0x0016, 0x080c, 0x25ee, + 0x2019, 0x193e, 0x211a, 0x001e, 0x7057, 0xffff, 0x705b, 0x00ef, + 0x707b, 0x0000, 0x0020, 0x2019, 0x193e, 0x201b, 0x0000, 0x2079, + 0x1853, 0x7804, 0xd0ac, 0x0108, 0xc295, 0x72d6, 0x080c, 0x6c53, + 0x0118, 0x9296, 0x0004, 0x0548, 0x2011, 0x0001, 0x080c, 0xb60b, + 0x70a3, 0x0000, 0x70a7, 0xffff, 0x7003, 0x0002, 0x2079, 0x0100, + 0x7827, 0x0003, 0x7828, 0x9085, 0x0003, 0x782a, 0x00fe, 0x080c, + 0x2c2b, 0x2011, 0x0005, 0x080c, 0x92ec, 0x080c, 0x8582, 0x080c, + 0x6c53, 0x0148, 0x00c6, 0x2061, 0x0100, 0x0016, 0x080c, 0x25ee, + 0x61e2, 0x001e, 0x00ce, 0x012e, 0x0420, 0x70a3, 0x0000, 0x70a7, + 0xffff, 0x7003, 0x0002, 0x00f6, 0x2079, 0x0100, 0x7827, 0x0003, + 0x7828, 0x9085, 0x0003, 0x782a, 0x00fe, 0x2011, 0x0005, 0x080c, + 0x92ec, 0x080c, 0x8582, 0x080c, 0x6c53, 0x0148, 0x00c6, 0x2061, + 0x0100, 0x0016, 0x080c, 0x25ee, 0x61e2, 0x001e, 0x00ce, 0x00fe, + 0x012e, 0x0005, 0x00c6, 0x00b6, 0x080c, 0x6c53, 0x1118, 0x20a9, + 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c, 0x6c53, 0x1110, 0x900e, + 0x0010, 0x2009, 0x007e, 0x86ff, 0x0138, 0x9180, 0x1000, 0x2004, + 0x905d, 0x0110, 0xb800, 0xd0bc, 0x090c, 0x2f28, 0x8108, 0x1f04, + 0x0abb, 0x7077, 0x0000, 0x7078, 0x9084, 0x00ff, 0x707a, 0x70ab, + 0x0000, 0x00be, 0x00ce, 0x0005, 0x00b6, 0x0126, 0x2091, 0x8000, + 0x7000, 0x9086, 0x0002, 0x1904, 0x0b91, 0x70a4, 0x9086, 0xffff, + 0x0130, 0x080c, 0x2c2b, 0x080c, 0x8582, 0x0804, 0x0b91, 0x70d4, + 0xd0ac, 0x1110, 0xd09c, 0x0558, 0xd084, 0x0548, 0x0006, 0x2001, + 0x0103, 0x2003, 0x002b, 0x000e, 0xd08c, 0x0508, 0x080c, 0x2f8b, + 0x11d0, 0x70d8, 0x9086, 0xffff, 0x01b0, 0x080c, 0x2d9c, 0x080c, + 0x8582, 0x70d4, 0xd094, 0x1904, 0x0b91, 0x2011, 0x0001, 0x080c, + 0xbcec, 0x0110, 0x2011, 0x0003, 0x901e, 0x080c, 0x2dd6, 0x080c, + 0x8582, 0x0804, 0x0b91, 0x70dc, 0x9005, 0x1904, 0x0b91, 0x70a0, + 0x9005, 0x1904, 0x0b91, 0x70d4, 0xd0a4, 0x0118, 0xd0b4, 0x0904, + 0x0b91, 0x080c, 0x6262, 0x1904, 0x0b91, 0x080c, 0x62b5, 0x1904, + 0x0b91, 0x080c, 0x629c, 0x01c0, 0x0156, 0x00c6, 0x20a9, 0x007f, + 0x900e, 0x0016, 0x080c, 0x5f7e, 0x1118, 0xb800, 0xd0ec, 0x1138, + 0x001e, 0x8108, 0x1f04, 0x0b31, 0x00ce, 0x015e, 0x0028, 0x001e, + 0x00ce, 0x015e, 0x0804, 0x0b91, 0x0006, 0x2001, 0x0103, 0x2003, + 0x006b, 0x000e, 0x2011, 0x1982, 0x080c, 0x0f5d, 0x2011, 0x199c, + 0x080c, 0x0f5d, 0x7030, 0xc08c, 0x7032, 0x7003, 0x0003, 0x70a7, + 0xffff, 0x080c, 0x0e3c, 0x9006, 0x080c, 0x247f, 0x080c, 0x2f8b, + 0x0118, 0x080c, 0x480f, 0x0050, 0x0036, 0x0046, 0x2019, 0xffff, + 0x2021, 0x0006, 0x080c, 0x4829, 0x004e, 0x003e, 0x00f6, 0x2079, + 0x0100, 0x080c, 0x6c76, 0x0150, 0x080c, 0x6c53, 0x7828, 0x0118, + 0x9084, 0xe1ff, 0x0010, 0x9084, 0xffdf, 0x782a, 0x00fe, 0x2001, + 0x19b7, 0x2004, 0x9086, 0x0005, 0x1120, 0x2011, 0x0000, 0x080c, + 0x92ec, 0x2011, 0x0000, 0x080c, 0x92f6, 0x080c, 0x8582, 0x080c, + 0x865d, 0x012e, 0x00be, 0x0005, 0x0016, 0x0046, 0x00f6, 0x0126, + 0x2091, 0x8000, 0x2079, 0x0100, 0x7904, 0x918c, 0xfffd, 0x7906, + 0x2009, 0x00f7, 0x080c, 0x599d, 0x7940, 0x918c, 0x0010, 0x7942, + 0x7924, 0xd1b4, 0x0110, 0x7827, 0x0040, 0xd19c, 0x0110, 0x7827, + 0x0008, 0x0006, 0x0036, 0x0156, 0x7954, 0xd1ac, 0x1904, 0x0c21, + 0x2001, 0x1976, 0x2004, 0x9005, 0x1518, 0x080c, 0x28b8, 0x1148, + 0x2001, 0x0001, 0x080c, 0x2820, 0x2001, 0x0001, 0x080c, 0x2803, + 0x00b8, 0x080c, 0x28c0, 0x1138, 0x9006, 0x080c, 0x2820, 0x9006, + 0x080c, 0x2803, 0x0068, 0x080c, 0x28c8, 0x1d50, 0x2001, 0x1967, + 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x261a, 0x0804, 0x0d01, + 0x080c, 0x6c64, 0x0148, 0x080c, 0x6c76, 0x1118, 0x080c, 0x6f39, + 0x0050, 0x080c, 0x6c5b, 0x0dd0, 0x080c, 0x6f34, 0x080c, 0x6f2a, + 0x080c, 0x6b8a, 0x0058, 0x080c, 0x6c53, 0x0140, 0x2009, 0x00f8, + 0x080c, 0x599d, 0x7843, 0x0090, 0x7843, 0x0010, 0x20a9, 0x09c4, + 0x7820, 0xd09c, 0x1138, 0x080c, 0x6c53, 0x0138, 0x7824, 0xd0ac, + 0x1904, 0x0d06, 0x1f04, 0x0c00, 0x0070, 0x7824, 0x080c, 0x6c6d, + 0x0118, 0xd0ac, 0x1904, 0x0d06, 0x9084, 0x1800, 0x0d98, 0x7003, + 0x0001, 0x0804, 0x0d06, 0x2001, 0x0001, 0x080c, 0x247f, 0x0804, + 0x0d19, 0x2001, 0x1976, 0x2004, 0x9005, 0x1518, 0x080c, 0x28b8, + 0x1148, 0x2001, 0x0001, 0x080c, 0x2820, 0x2001, 0x0001, 0x080c, + 0x2803, 0x00b8, 0x080c, 0x28c0, 0x1138, 0x9006, 0x080c, 0x2820, + 0x9006, 0x080c, 0x2803, 0x0068, 0x080c, 0x28c8, 0x1d50, 0x2001, + 0x1967, 0x2004, 0xd0fc, 0x0108, 0x0020, 0x080c, 0x261a, 0x0804, + 0x0d01, 0x7850, 0x9085, 0x0040, 0x7852, 0x7938, 0x7850, 0x9084, + 0xfbcf, 0x7852, 0x080c, 0x28d0, 0x9085, 0x2000, 0x7852, 0x793a, + 0x20a9, 0x0046, 0x1d04, 0x0c5a, 0x080c, 0x7cfb, 0x1f04, 0x0c5a, + 0x7850, 0x9085, 0x0400, 0x9084, 0xdfbf, 0x7852, 0x793a, 0x080c, + 0x6c64, 0x0148, 0x080c, 0x6c76, 0x1118, 0x080c, 0x6f39, 0x0050, + 0x080c, 0x6c5b, 0x0dd0, 0x080c, 0x6f34, 0x080c, 0x6f2a, 0x080c, + 0x6b8a, 0x0020, 0x2009, 0x00f8, 0x080c, 0x599d, 0x20a9, 0x0028, + 0xa001, 0x1f04, 0x0c80, 0x7850, 0x9085, 0x1400, 0x7852, 0x080c, + 0x6c53, 0x0120, 0x7843, 0x0090, 0x7843, 0x0010, 0x2021, 0xe678, + 0x2019, 0xea60, 0x0d0c, 0x7cfb, 0x7820, 0xd09c, 0x1588, 0x080c, + 0x6c53, 0x0904, 0x0ce6, 0x7824, 0xd0ac, 0x1904, 0x0d06, 0x080c, + 0x6c76, 0x1530, 0x0046, 0x2021, 0x0320, 0x8421, 0x1df0, 0x004e, + 0x7827, 0x1800, 0x080c, 0x28d0, 0x7824, 0x9084, 0x1800, 0x1168, + 0x9484, 0x0fff, 0x1140, 0x2001, 0x180f, 0x2004, 0x9084, 0x9000, + 0x0110, 0x080c, 0x0d27, 0x8421, 0x1158, 0x1d04, 0x0cc1, 0x080c, + 0x7cfb, 0x080c, 0x6f34, 0x080c, 0x6f2a, 0x7003, 0x0001, 0x04f0, + 0x8319, 0x1940, 0x1d04, 0x0cce, 0x080c, 0x7cfb, 0x2009, 0x196a, + 0x2104, 0x9005, 0x0118, 0x8001, 0x200a, 0x1178, 0x200b, 0x000a, + 0x7827, 0x0048, 0x20a9, 0x0002, 0x080c, 0x28b1, 0x7924, 0x080c, + 0x28d0, 0xd19c, 0x0110, 0x080c, 0x27f1, 0x00d8, 0x080c, 0x6c64, + 0x1140, 0x94a2, 0x03e8, 0x1128, 0x080c, 0x6c2d, 0x7003, 0x0001, + 0x00a8, 0x7827, 0x1800, 0x080c, 0x28d0, 0x7824, 0x080c, 0x6c6d, + 0x0110, 0xd0ac, 0x1158, 0x9084, 0x1800, 0x0950, 0x7003, 0x0001, + 0x0028, 0x2001, 0x0001, 0x080c, 0x247f, 0x0078, 0x2009, 0x180c, + 0x210c, 0xd19c, 0x1120, 0x7904, 0x918d, 0x0002, 0x7906, 0x7827, + 0x0048, 0x7828, 0x9085, 0x0028, 0x782a, 0x7850, 0x9085, 0x0400, + 0x7852, 0x2001, 0x1976, 0x2003, 0x0000, 0x9006, 0x78f2, 0x015e, + 0x003e, 0x000e, 0x012e, 0x00fe, 0x004e, 0x001e, 0x0005, 0x0006, + 0x0016, 0x0036, 0x0046, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, + 0x0156, 0x0069, 0x0d0c, 0x7cfb, 0x015e, 0x00fe, 0x00ee, 0x00de, + 0x00ce, 0x00be, 0x004e, 0x003e, 0x001e, 0x000e, 0x0005, 0x00e6, + 0x2071, 0x1894, 0x7004, 0x9086, 0x0001, 0x1110, 0x080c, 0x30b9, + 0x00ee, 0x0005, 0x0005, 0x2a70, 0x2061, 0x197a, 0x2063, 0x0003, + 0x6007, 0x0002, 0x600b, 0x0012, 0x600f, 0x0117, 0x2001, 0x194d, + 0x900e, 0x2102, 0x718e, 0x2001, 0x0100, 0x2004, 0x9082, 0x0002, + 0x0218, 0x7057, 0xffff, 0x0008, 0x7156, 0x705f, 0xffff, 0x7176, + 0x717a, 0x080c, 0xba40, 0x70e3, 0x00c0, 0x2061, 0x193d, 0x6003, + 0x0909, 0x6106, 0x600b, 0x8800, 0x600f, 0x0200, 0x6013, 0x00ff, + 0x6017, 0x000f, 0x611a, 0x601f, 0x07d0, 0x2061, 0x1945, 0x6003, + 0x8000, 0x6106, 0x610a, 0x600f, 0x0200, 0x6013, 0x00ff, 0x6116, + 0x601b, 0x0001, 0x611e, 0x2061, 0x1958, 0x6003, 0x514c, 0x6007, + 0x4f47, 0x600b, 0x4943, 0x600f, 0x2020, 0x2001, 0x182a, 0x2102, + 0x0005, 0x9016, 0x080c, 0x5f7e, 0x1178, 0xb804, 0x90c4, 0x00ff, + 0x98c6, 0x0006, 0x0128, 0x90c4, 0xff00, 0x98c6, 0x0600, 0x1120, + 0x9186, 0x0080, 0x0108, 0x8210, 0x8108, 0x9186, 0x0800, 0x1d50, + 0x2208, 0x0005, 0x2091, 0x8000, 0x0e04, 0x0db4, 0x0006, 0x0016, + 0x2001, 0x8002, 0x0006, 0x2079, 0x0000, 0x000e, 0x7882, 0x7836, + 0x001e, 0x798e, 0x000e, 0x788a, 0x000e, 0x7886, 0x3900, 0x789a, + 0x7833, 0x0012, 0x2091, 0x5000, 0x0156, 0x00d6, 0x0036, 0x0026, + 0x2079, 0x0300, 0x2069, 0x1a66, 0x7a18, 0x226a, 0x8d68, 0x7a1c, + 0x226a, 0x782c, 0x2019, 0x1a73, 0x201a, 0x2019, 0x1a76, 0x9016, + 0x7808, 0xd09c, 0x0168, 0x7820, 0x201a, 0x8210, 0x8318, 0x9386, + 0x1a8b, 0x0108, 0x0ca8, 0x7808, 0xd09c, 0x0110, 0x2011, 0xdead, + 0x2019, 0x1a74, 0x782c, 0x201a, 0x8318, 0x221a, 0x7803, 0x0000, + 0x2069, 0x1a46, 0x901e, 0x20a9, 0x0020, 0x7b26, 0x7a28, 0x226a, + 0x8d68, 0x8318, 0x1f04, 0x0dfd, 0x002e, 0x003e, 0x00de, 0x015e, + 0x2079, 0x1800, 0x7803, 0x0005, 0x2091, 0x4080, 0x2001, 0x0089, + 0x2004, 0xd084, 0x0180, 0x2001, 0x19e8, 0x2004, 0x9005, 0x0128, + 0x2001, 0x008b, 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003, + 0x0002, 0x2003, 0x1001, 0x080c, 0x5122, 0x1108, 0x0011, 0x0cd8, + 0x0005, 0x0026, 0x0126, 0x2011, 0x0080, 0x080c, 0x0eb4, 0x20a9, + 0x0900, 0x080c, 0x0ed5, 0x2011, 0x0040, 0x080c, 0x0eb4, 0x20a9, + 0x0900, 0x080c, 0x0ed5, 0x0c78, 0x0026, 0x080c, 0x0ec1, 0x1118, + 0x2011, 0x0040, 0x0098, 0x2011, 0x010e, 0x2214, 0x9294, 0x0007, + 0x9296, 0x0007, 0x0118, 0x2011, 0xa880, 0x0010, 0x2011, 0x6840, + 0xd0e4, 0x70e7, 0x0000, 0x1128, 0x70e7, 0x0fa0, 0x080c, 0x0ec6, + 0x002e, 0x0005, 0x0026, 0x080c, 0x0ec1, 0x0128, 0xd0a4, 0x1138, + 0x2011, 0xcdd5, 0x0010, 0x2011, 0x0080, 0x080c, 0x0ec6, 0x002e, + 0x0005, 0x0026, 0x70e7, 0x0000, 0x080c, 0x0ec1, 0x1148, 0x080c, + 0x28c8, 0x1118, 0x2011, 0x8484, 0x0058, 0x2011, 0x8282, 0x0040, + 0x080c, 0x28c8, 0x1118, 0x2011, 0xcdc5, 0x0010, 0x2011, 0xcac2, + 0x080c, 0x0ec6, 0x002e, 0x0005, 0x00e6, 0x0006, 0x2071, 0x1800, + 0xd0b4, 0x70e0, 0x1110, 0xc0e4, 0x0048, 0x0006, 0x3b00, 0x9084, + 0xff3f, 0x20d8, 0x000e, 0x70e7, 0x0000, 0xc0e5, 0x0079, 0x000e, + 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0xd0e4, 0x70e0, 0x1110, + 0xc0dc, 0x0008, 0xc0dd, 0x0011, 0x00ee, 0x0005, 0x70e2, 0x7000, + 0x9084, 0x0007, 0x000b, 0x0005, 0x0e83, 0x0e5a, 0x0e5a, 0x0e3c, + 0x0e69, 0x0e5a, 0x0e5a, 0x0e69, 0x0016, 0x3b08, 0x3a00, 0x9104, + 0x918d, 0x00c0, 0x21d8, 0x9084, 0xff3f, 0x9205, 0x20d0, 0x001e, + 0x0005, 0x2001, 0x1838, 0x2004, 0xd0dc, 0x0005, 0x9e86, 0x1800, + 0x190c, 0x0db2, 0x70e0, 0xd0e4, 0x0108, 0xc2e5, 0x72e2, 0xd0e4, + 0x1118, 0x9294, 0x00c0, 0x0c01, 0x0005, 0x1d04, 0x0ed5, 0x2091, + 0x6000, 0x1f04, 0x0ed5, 0x0005, 0x890e, 0x810e, 0x810f, 0x9194, + 0x003f, 0x918c, 0xffc0, 0x0005, 0x0006, 0x2200, 0x914d, 0x894f, + 0x894d, 0x894d, 0x000e, 0x000e, 0x0005, 0x01d6, 0x0146, 0x0036, + 0x0096, 0x2061, 0x1883, 0x600b, 0x0000, 0x600f, 0x0000, 0x6003, + 0x0000, 0x6007, 0x0000, 0x2009, 0xffc0, 0x2105, 0x0006, 0x2001, + 0xaaaa, 0x200f, 0x2019, 0x5555, 0x9016, 0x2049, 0x0bff, 0xab02, + 0xa001, 0xa001, 0xa800, 0x9306, 0x1138, 0x2105, 0x9306, 0x0120, + 0x8210, 0x99c8, 0x0400, 0x0c98, 0x000e, 0x200f, 0x2001, 0x1893, + 0x928a, 0x000e, 0x1638, 0x928a, 0x0006, 0x2011, 0x0006, 0x1210, + 0x2011, 0x0000, 0x2202, 0x9006, 0x2008, 0x82ff, 0x01b0, 0x8200, + 0x600a, 0x600f, 0xffff, 0x6003, 0x0002, 0x6007, 0x0000, 0x0026, + 0x2019, 0x0010, 0x9280, 0x0001, 0x20e8, 0x21a0, 0x21a8, 0x4104, + 0x8319, 0x1de0, 0x8211, 0x1da0, 0x002e, 0x009e, 0x003e, 0x014e, + 0x01de, 0x0005, 0x2011, 0x000e, 0x08e8, 0x0016, 0x0026, 0x0096, + 0x3348, 0x080c, 0x0edc, 0x2100, 0x9300, 0x2098, 0x22e0, 0x009e, + 0x002e, 0x001e, 0x0036, 0x3518, 0x20a9, 0x0001, 0x4002, 0x8007, + 0x4004, 0x8319, 0x1dd8, 0x003e, 0x0005, 0x20e9, 0x0001, 0x71b0, + 0x81ff, 0x11c0, 0x9006, 0x2009, 0x0200, 0x20a9, 0x0002, 0x9298, + 0x0018, 0x23a0, 0x4001, 0x2009, 0x0700, 0x20a9, 0x0002, 0x9298, + 0x0008, 0x23a0, 0x4001, 0x7074, 0x8007, 0x7178, 0x810f, 0x20a9, + 0x0002, 0x4001, 0x9298, 0x000c, 0x23a0, 0x900e, 0x080c, 0x0d99, + 0x2001, 0x0000, 0x810f, 0x20a9, 0x0002, 0x4001, 0x0005, 0x89ff, + 0x0140, 0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x1007, 0x009e, + 0x0cb0, 0x0005, 0x00e6, 0x2071, 0x1800, 0x080c, 0x1080, 0x090c, + 0x0db2, 0x00ee, 0x0005, 0x0086, 0x00e6, 0x0006, 0x0026, 0x0036, + 0x0126, 0x2091, 0x8000, 0x00c9, 0x2071, 0x1800, 0x73b8, 0x702c, + 0x9016, 0x9045, 0x0158, 0x8210, 0x9906, 0x090c, 0x0db2, 0x2300, + 0x9202, 0x0120, 0x1a0c, 0x0db2, 0xa000, 0x0c98, 0x012e, 0x003e, + 0x002e, 0x000e, 0x00ee, 0x008e, 0x0005, 0x0086, 0x00e6, 0x0006, + 0x0126, 0x2091, 0x8000, 0x2071, 0x1906, 0x7010, 0x9005, 0x0140, + 0x7018, 0x9045, 0x0128, 0x9906, 0x090c, 0x0db2, 0xa000, 0x0cc8, + 0x012e, 0x000e, 0x00ee, 0x008e, 0x0005, 0x00e6, 0x2071, 0x1800, + 0x0126, 0x2091, 0x8000, 0x70b8, 0x8001, 0x0270, 0x70ba, 0x702c, + 0x2048, 0x9085, 0x0001, 0xa800, 0x702e, 0xa803, 0x0000, 0xa807, + 0x0000, 0x012e, 0x00ee, 0x0005, 0x904e, 0x0cd8, 0x00e6, 0x0126, + 0x2091, 0x8000, 0x2071, 0x1800, 0x70b8, 0x90ca, 0x0040, 0x0268, + 0x8001, 0x70ba, 0x702c, 0x2048, 0xa800, 0x702e, 0xa803, 0x0000, + 0xa807, 0x0000, 0x012e, 0x00ee, 0x0005, 0x904e, 0x0cd8, 0x00e6, + 0x0126, 0x2091, 0x8000, 0x0016, 0x890e, 0x810e, 0x810f, 0x9184, + 0x003f, 0xa862, 0x9184, 0xffc0, 0xa85e, 0x001e, 0x0020, 0x00e6, + 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, + 0x702e, 0x70b8, 0x8000, 0x70ba, 0x080c, 0x7b7c, 0x012e, 0x00ee, + 0x0005, 0x2071, 0x1800, 0x9026, 0x2009, 0x0000, 0x2049, 0x0400, + 0x2900, 0x702e, 0x8940, 0x2800, 0xa802, 0xa95e, 0xa863, 0x0001, + 0x8420, 0x9886, 0x0440, 0x0120, 0x2848, 0x9188, 0x0040, 0x0c90, + 0x2071, 0x1883, 0x7000, 0x9005, 0x11a0, 0x2001, 0x0534, 0xa802, + 0x2048, 0x2009, 0x4d00, 0x8940, 0x2800, 0xa802, 0xa95e, 0xa863, + 0x0001, 0x8420, 0x9886, 0x0800, 0x0120, 0x2848, 0x9188, 0x0040, + 0x0c90, 0x2071, 0x1883, 0x7104, 0x7200, 0x82ff, 0x01d0, 0x7308, + 0x8318, 0x831f, 0x831b, 0x831b, 0x7312, 0x8319, 0x2001, 0x0800, + 0xa802, 0x2048, 0x8900, 0xa802, 0x2040, 0xa95e, 0xaa62, 0x8420, + 0x2300, 0x9906, 0x0130, 0x2848, 0x9188, 0x0040, 0x9291, 0x0000, + 0x0c88, 0xa803, 0x0000, 0x2071, 0x1800, 0x74b6, 0x74ba, 0x0005, + 0x00e6, 0x0016, 0x9984, 0xfc00, 0x01e8, 0x908c, 0xf800, 0x1168, + 0x9982, 0x0400, 0x02b8, 0x9982, 0x0440, 0x0278, 0x9982, 0x0534, + 0x0288, 0x9982, 0x0800, 0x1270, 0x0040, 0x9982, 0x0800, 0x0250, + 0x2071, 0x1883, 0x7010, 0x9902, 0x1228, 0x9085, 0x0001, 0x001e, + 0x00ee, 0x0005, 0x9006, 0x0cd8, 0x00e6, 0x2071, 0x19e7, 0x7007, + 0x0000, 0x9006, 0x701e, 0x7022, 0x7002, 0x2071, 0x0000, 0x7010, + 0x9085, 0x8004, 0x7012, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, + 0x00e6, 0xa06f, 0x0000, 0x2071, 0x19e7, 0x701c, 0x9088, 0x19f1, + 0x280a, 0x8000, 0x9084, 0x003f, 0x701e, 0x7120, 0x9106, 0x090c, + 0x0db2, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080, 0x00a9, + 0x00fe, 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x00e6, + 0x2071, 0x19e7, 0x7004, 0x9005, 0x1128, 0x00f6, 0x2079, 0x0080, + 0x0021, 0x00fe, 0x00ee, 0x012e, 0x0005, 0x7004, 0x9086, 0x0000, + 0x1110, 0x7007, 0x0006, 0x7000, 0x0002, 0x10f7, 0x10f5, 0x10f5, + 0x10f5, 0x126b, 0x126b, 0x126b, 0x126b, 0x080c, 0x0db2, 0x701c, + 0x7120, 0x9106, 0x1148, 0x792c, 0x9184, 0x0001, 0x1120, 0xd1fc, + 0x1110, 0x7007, 0x0000, 0x0005, 0x0096, 0x9180, 0x19f1, 0x2004, + 0x700a, 0x2048, 0x8108, 0x918c, 0x003f, 0x7122, 0x782b, 0x0026, + 0xa88c, 0x7802, 0xa890, 0x7806, 0xa894, 0x780a, 0xa898, 0x780e, + 0xa878, 0x700e, 0xa870, 0x7016, 0xa874, 0x701a, 0xa868, 0x009e, + 0xd084, 0x0120, 0x7007, 0x0001, 0x0029, 0x0005, 0x7007, 0x0002, + 0x00b1, 0x0005, 0x0016, 0x0026, 0x710c, 0x2011, 0x0040, 0x9182, + 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x7212, 0x8203, 0x7812, + 0x782b, 0x0020, 0x782b, 0x0041, 0x002e, 0x001e, 0x0005, 0x0016, + 0x0026, 0x0136, 0x0146, 0x0156, 0x7014, 0x20e0, 0x7018, 0x2098, + 0x20e9, 0x0000, 0x20a1, 0x0088, 0x782b, 0x0026, 0x710c, 0x2011, + 0x0040, 0x9182, 0x0040, 0x1210, 0x2110, 0x9006, 0x700e, 0x22a8, + 0x4006, 0x8203, 0x7812, 0x782b, 0x0020, 0x3300, 0x701a, 0x782b, + 0x0001, 0x015e, 0x014e, 0x013e, 0x002e, 0x001e, 0x0005, 0x2009, + 0x19e7, 0x2104, 0xc095, 0x200a, 0x080c, 0x10d4, 0x0005, 0x0016, + 0x00e6, 0x2071, 0x19e7, 0x00f6, 0x2079, 0x0080, 0x792c, 0x782b, + 0x0002, 0xd1fc, 0x0120, 0x918c, 0x0700, 0x7004, 0x0023, 0x00fe, + 0x00ee, 0x001e, 0x0005, 0x10e5, 0x118a, 0x11be, 0x0db2, 0x0db2, + 0x1277, 0x0db2, 0x918c, 0x0700, 0x1550, 0x0136, 0x0146, 0x0156, + 0x7014, 0x20e8, 0x7018, 0x20a0, 0x20e1, 0x0000, 0x2099, 0x0088, + 0x782b, 0x0040, 0x7010, 0x20a8, 0x4005, 0x3400, 0x701a, 0x015e, + 0x014e, 0x013e, 0x700c, 0x9005, 0x0578, 0x7800, 0x7802, 0x7804, + 0x7806, 0x080c, 0x112a, 0x0005, 0x7008, 0x0096, 0x2048, 0xa86f, + 0x0100, 0x009e, 0x7007, 0x0000, 0x080c, 0x10e5, 0x0005, 0x7008, + 0x0096, 0x2048, 0xa86f, 0x0200, 0x009e, 0x0ca0, 0x918c, 0x0700, + 0x1150, 0x700c, 0x9005, 0x0180, 0x7800, 0x7802, 0x7804, 0x7806, + 0x080c, 0x113f, 0x0005, 0x7008, 0x0096, 0x2048, 0xa86f, 0x0200, + 0x009e, 0x7007, 0x0000, 0x0080, 0x0096, 0x7008, 0x2048, 0x7800, + 0xa88e, 0x7804, 0xa892, 0x7808, 0xa896, 0x780c, 0xa89a, 0xa86f, + 0x0100, 0x009e, 0x7007, 0x0000, 0x0096, 0x00d6, 0x7008, 0x2048, + 0x2001, 0x18af, 0x2004, 0x9906, 0x1128, 0xa89c, 0x080f, 0x00de, + 0x009e, 0x00a0, 0x00de, 0x009e, 0x0096, 0x00d6, 0x7008, 0x2048, + 0x0081, 0x0150, 0xa89c, 0x0086, 0x2940, 0x080f, 0x008e, 0x00de, + 0x009e, 0x080c, 0x10d4, 0x0005, 0x00de, 0x009e, 0x080c, 0x10d4, + 0x0005, 0xa8a8, 0xd08c, 0x0005, 0x0096, 0xa0a0, 0x904d, 0x090c, + 0x0db2, 0xa06c, 0x908e, 0x0100, 0x0130, 0xa87b, 0x0030, 0xa883, + 0x0000, 0xa897, 0x4002, 0x080c, 0x6529, 0xa09f, 0x0000, 0xa0a3, + 0x0000, 0x2848, 0x080c, 0x1007, 0x009e, 0x0005, 0x00a6, 0xa0a0, + 0x904d, 0x090c, 0x0db2, 0xa06c, 0x908e, 0x0100, 0x0128, 0xa87b, + 0x0001, 0xa883, 0x0000, 0x00c0, 0xa80c, 0x2050, 0xb004, 0x9005, + 0x0198, 0xa80e, 0x2050, 0x8006, 0x8006, 0x8007, 0x908c, 0x003f, + 0x9084, 0xffc0, 0x9080, 0x0002, 0xa076, 0xa172, 0xb000, 0xa07a, + 0x2810, 0x080c, 0x10b5, 0x00e8, 0xa97c, 0xa894, 0x0016, 0x0006, + 0x080c, 0x6529, 0x000e, 0x001e, 0xd1fc, 0x1138, 0xd1f4, 0x0128, + 0x00c6, 0x2060, 0x080c, 0x99d6, 0x00ce, 0x7008, 0x2048, 0xa89f, + 0x0000, 0xa8a3, 0x0000, 0x080c, 0x1007, 0x7007, 0x0000, 0x080c, + 0x10d4, 0x00ae, 0x0005, 0x0126, 0x2091, 0x8000, 0x782b, 0x1001, + 0x7007, 0x0005, 0x7000, 0xc094, 0x7002, 0x012e, 0x0005, 0x7007, + 0x0000, 0x080c, 0x10e5, 0x0005, 0x0126, 0x2091, 0x2200, 0x2079, + 0x0300, 0x2071, 0x1a31, 0x7003, 0x0000, 0x78bf, 0x00f6, 0x00c1, + 0x7803, 0x0003, 0x780f, 0x0000, 0x20a9, 0x01ed, 0x2061, 0xd372, + 0x2c0d, 0x7912, 0xe104, 0x9ce0, 0x0002, 0x7916, 0x1f04, 0x1290, + 0x7807, 0x0001, 0x7803, 0x0000, 0x7803, 0x0001, 0x012e, 0x0005, + 0x00c6, 0x7803, 0x0000, 0x7808, 0xd09c, 0x0110, 0x7820, 0x0cd8, + 0x2001, 0x1a32, 0x2003, 0x0000, 0x78ab, 0x0004, 0x78ac, 0xd0ac, + 0x1de8, 0x78ab, 0x0002, 0x7807, 0x0001, 0x7827, 0x0030, 0x782b, + 0x0400, 0x7827, 0x0031, 0x782b, 0x1a46, 0x781f, 0xff00, 0x781b, + 0xff00, 0x2001, 0x0200, 0x2004, 0xd0dc, 0x0110, 0x781f, 0x0303, + 0x2061, 0x1a46, 0x602f, 0x1cd0, 0x2001, 0x1818, 0x2004, 0x9082, + 0x1cd0, 0x6032, 0x603b, 0x1da2, 0x00ce, 0x0005, 0x0126, 0x2091, + 0x2200, 0x7808, 0xd09c, 0x0158, 0x7820, 0x908c, 0xf000, 0x1588, + 0x908a, 0x0021, 0x1a0c, 0x0db2, 0x0043, 0x012e, 0x0005, 0x9084, + 0x0070, 0x190c, 0x0db2, 0x012e, 0x0005, 0x130f, 0x130f, 0x1318, + 0x131d, 0x1321, 0x1326, 0x134e, 0x1352, 0x1360, 0x1364, 0x130f, + 0x13ee, 0x13f2, 0x1455, 0x130f, 0x130f, 0x130f, 0x130f, 0x130f, + 0x130f, 0x130f, 0x130f, 0x130f, 0x130f, 0x130f, 0x130f, 0x130f, + 0x1328, 0x130f, 0x130f, 0x130f, 0x130f, 0x130f, 0x130f, 0x080c, + 0x0db2, 0x2009, 0x0048, 0x2060, 0x080c, 0x9a50, 0x012e, 0x0005, + 0x7004, 0xc085, 0xc0b5, 0x7006, 0x0005, 0x7004, 0xc085, 0x7006, + 0x0005, 0x080c, 0x145c, 0x080c, 0x1518, 0x0005, 0x080c, 0x0db2, + 0x080c, 0x145c, 0x2060, 0x6014, 0x0096, 0x2048, 0xa83b, 0xffff, + 0x009e, 0x2009, 0x0048, 0x080c, 0x9a50, 0x2001, 0x015d, 0x2003, + 0x0000, 0x2009, 0x03e8, 0x8109, 0x0160, 0x2001, 0x0201, 0x2004, + 0x9005, 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, 0x080c, + 0x1461, 0x2001, 0x0307, 0x2003, 0x8000, 0x0005, 0x7004, 0xc095, + 0x7006, 0x0005, 0x080c, 0x145c, 0x2060, 0x6014, 0x0096, 0x2048, + 0xa83b, 0xffff, 0x009e, 0x2009, 0x0048, 0x080c, 0x9a50, 0x0005, + 0x080c, 0x145c, 0x080c, 0x0db2, 0x080c, 0x145c, 0x080c, 0x13d9, + 0x7827, 0x0018, 0x79ac, 0xd1dc, 0x0540, 0x7827, 0x0015, 0x7828, + 0x782b, 0x0000, 0x9065, 0x0138, 0x2001, 0x020d, 0x2003, 0x0050, + 0x2003, 0x0020, 0x0400, 0x7004, 0x9005, 0x1180, 0x78ab, 0x0004, + 0x7827, 0x0018, 0x782b, 0x0000, 0xd1bc, 0x090c, 0x0db2, 0x2001, + 0x020d, 0x2003, 0x0050, 0x2003, 0x0020, 0x0480, 0x78ab, 0x0004, + 0x7803, 0x0001, 0x080c, 0x13f2, 0x0005, 0x7828, 0x782b, 0x0000, + 0x9065, 0x090c, 0x0db2, 0x6014, 0x2048, 0x78ab, 0x0004, 0x918c, + 0x0700, 0x0198, 0x080c, 0x763f, 0x080c, 0x1872, 0x080c, 0xb5fb, + 0x0158, 0xa9ac, 0xa936, 0xa9b0, 0xa93a, 0xa83f, 0xffff, 0xa843, + 0xffff, 0xa880, 0xc0bd, 0xa882, 0x0005, 0x6010, 0x00b6, 0x2058, + 0xb800, 0x00be, 0xd0bc, 0x6024, 0x190c, 0xb9d9, 0x2029, 0x00c8, + 0x8529, 0x0128, 0x2001, 0x0201, 0x2004, 0x9005, 0x0dc8, 0x7dbc, + 0x080c, 0xd31b, 0xd5a4, 0x1118, 0x080c, 0x1461, 0x0005, 0x080c, + 0x763f, 0x080c, 0x1872, 0x0005, 0x781f, 0x0300, 0x7803, 0x0001, + 0x0005, 0x0016, 0x0066, 0x0076, 0x00f6, 0x2079, 0x0300, 0x7908, + 0x918c, 0x0007, 0x9186, 0x0003, 0x0120, 0x2001, 0x0016, 0x080c, + 0x14d2, 0x00fe, 0x007e, 0x006e, 0x001e, 0x0005, 0x7004, 0xc09d, + 0x7006, 0x0005, 0x7104, 0x9184, 0x0004, 0x190c, 0x0db2, 0xd184, + 0x1189, 0xd19c, 0x0158, 0xc19c, 0x7106, 0x2001, 0x020d, 0x2003, + 0x0050, 0x2003, 0x0020, 0x080c, 0x1461, 0x0005, 0x81ff, 0x190c, + 0x0db2, 0x0005, 0xc184, 0xd1b4, 0xc1b4, 0x7106, 0x0016, 0x00e6, + 0x15e0, 0x2071, 0x0200, 0x080c, 0x150c, 0x6014, 0x9005, 0x05a8, + 0x0096, 0x2048, 0xa864, 0x009e, 0x9084, 0x00ff, 0x908e, 0x0029, + 0x0160, 0x908e, 0x0048, 0x1548, 0x601c, 0xd084, 0x11d8, 0x00f6, + 0x2c78, 0x080c, 0x1582, 0x00fe, 0x00a8, 0x00f6, 0x2c78, 0x080c, + 0x16b6, 0x00fe, 0x2009, 0x01f4, 0x8109, 0x0160, 0x2001, 0x0201, + 0x2004, 0x9005, 0x0dc8, 0x2001, 0x0218, 0x2004, 0xd0ec, 0x1110, + 0x0401, 0x0040, 0x2001, 0x020d, 0x2003, 0x0020, 0x080c, 0x12a0, + 0x7803, 0x0001, 0x00ee, 0x001e, 0x0005, 0x2001, 0x020d, 0x2003, + 0x0050, 0x2003, 0x0020, 0x0069, 0x0ca8, 0x0031, 0x2060, 0x2009, + 0x0053, 0x080c, 0x9a50, 0x0005, 0x7808, 0xd09c, 0x0de8, 0x7820, + 0x0005, 0x080c, 0x13d9, 0x00d6, 0x2069, 0x0200, 0x2009, 0x01f4, + 0x8109, 0x0510, 0x6804, 0x9005, 0x0dd8, 0x2001, 0x015d, 0x2003, + 0x0000, 0x79bc, 0xd1a4, 0x1528, 0x79b8, 0x918c, 0x0fff, 0x0180, + 0x9182, 0x0841, 0x1268, 0x9188, 0x0007, 0x918c, 0x0ff8, 0x810c, + 0x810c, 0x810c, 0x080c, 0x14c4, 0x6827, 0x0001, 0x8109, 0x1dd0, + 0x04d9, 0x6827, 0x0002, 0x04c1, 0x6804, 0x9005, 0x1130, 0x682c, + 0xd0e4, 0x1500, 0x6804, 0x9005, 0x0de8, 0x79b8, 0xd1ec, 0x1130, + 0x08c0, 0x080c, 0x763f, 0x080c, 0x1872, 0x0090, 0x7827, 0x0015, + 0x782b, 0x0000, 0x7827, 0x0018, 0x782b, 0x0000, 0x2001, 0x020d, + 0x2003, 0x0020, 0x2001, 0x0307, 0x2003, 0x0300, 0x7803, 0x0001, + 0x00de, 0x0005, 0x682c, 0x9084, 0x5400, 0x9086, 0x5400, 0x0d30, + 0x7827, 0x0015, 0x782b, 0x0000, 0x7803, 0x0001, 0x6800, 0x9085, + 0x1800, 0x6802, 0x00de, 0x0005, 0x6824, 0x9084, 0x0003, 0x1de0, + 0x0005, 0x2001, 0x0030, 0x2c08, 0x621c, 0x0021, 0x7830, 0x9086, + 0x0041, 0x0005, 0x00f6, 0x2079, 0x0300, 0x0006, 0x7808, 0xd09c, + 0x0140, 0x0016, 0x0026, 0x00c6, 0x080c, 0x12d6, 0x00ce, 0x002e, + 0x001e, 0x000e, 0x0006, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, + 0x2009, 0xff00, 0x8109, 0x0130, 0x7818, 0xd0bc, 0x1dd8, 0x000e, + 0x00fe, 0x0005, 0x000e, 0x792c, 0x3900, 0x8000, 0x2004, 0x080c, + 0x0db2, 0x7832, 0x7936, 0x7a3a, 0x781b, 0x8080, 0x2009, 0xff00, + 0x8109, 0x0120, 0x7818, 0xd0bc, 0x1dd8, 0x0005, 0x792c, 0x3900, + 0x8000, 0x2004, 0x080c, 0x0db2, 0x7037, 0x0001, 0x7150, 0x7037, + 0x0002, 0x7050, 0x2060, 0xd1bc, 0x1110, 0x7054, 0x2060, 0x0005, + 0x00e6, 0x0016, 0x2071, 0x0200, 0x0c79, 0x6124, 0xd1dc, 0x01f8, + 0x701c, 0xd08c, 0x0904, 0x1577, 0x7017, 0x0000, 0x2001, 0x0264, + 0x2004, 0xd0bc, 0x0904, 0x1577, 0x2001, 0x0268, 0x00c6, 0x2064, + 0x6104, 0x6038, 0x00ce, 0x918e, 0x0039, 0x1904, 0x1577, 0x9c06, + 0x15f0, 0x0126, 0x2091, 0x2600, 0x080c, 0x7597, 0x012e, 0x7358, + 0x745c, 0x6014, 0x905d, 0x0598, 0x2b48, 0x6010, 0x00b6, 0x2058, + 0xb800, 0x00be, 0xd0bc, 0x190c, 0xb9b4, 0xab42, 0xac3e, 0x2001, + 0x1875, 0x2004, 0xd0b4, 0x1170, 0x601c, 0xd0e4, 0x1158, 0x6010, + 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1120, 0xa83b, 0x7fff, + 0xa837, 0xffff, 0x080c, 0x1dc2, 0x1190, 0x080c, 0x1705, 0x2a00, + 0xa816, 0x0130, 0x2800, 0xa80e, 0x2c05, 0xa80a, 0x2c00, 0xa812, + 0x7037, 0x0020, 0x781f, 0x0300, 0x001e, 0x00ee, 0x0005, 0x7037, + 0x0050, 0x7037, 0x0020, 0x001e, 0x00ee, 0x080c, 0x1461, 0x0005, + 0x080c, 0x0db2, 0x2ff0, 0x0126, 0x2091, 0x2200, 0x3e60, 0x6014, + 0x2048, 0x2940, 0x903e, 0x2730, 0xa864, 0x2068, 0xa81a, 0x9d84, + 0x000f, 0x9088, 0x1da2, 0x2165, 0x0002, 0x15ac, 0x15f9, 0x15ac, + 0x15ac, 0x15ac, 0x15db, 0x15ac, 0x15b0, 0x15a5, 0x15f0, 0x15ac, + 0x15ac, 0x15ac, 0x16b4, 0x15c4, 0x15ba, 0xa964, 0x918c, 0x00ff, + 0x918e, 0x0048, 0x0904, 0x15f0, 0x9085, 0x0001, 0x0804, 0x16ac, + 0xa87c, 0xd0bc, 0x0dc8, 0xa890, 0xa842, 0xa88c, 0xa83e, 0xa888, + 0x0804, 0x1600, 0xa87c, 0xd0bc, 0x0d78, 0xa890, 0xa842, 0xa88c, + 0xa83e, 0xa888, 0x0804, 0x164f, 0xa87c, 0xd0bc, 0x0d28, 0xa890, + 0xa842, 0xa88c, 0xa83e, 0xa804, 0x9045, 0x090c, 0x0db2, 0xa164, + 0xa91a, 0x91ec, 0x000f, 0x9d80, 0x1da2, 0x2065, 0xa888, 0xd19c, + 0x1904, 0x164f, 0x0428, 0xa87c, 0xd0ac, 0x0970, 0xa804, 0x9045, + 0x090c, 0x0db2, 0xa164, 0xa91a, 0x91ec, 0x000f, 0x9d80, 0x1da2, + 0x2065, 0x9006, 0xa842, 0xa83e, 0xd19c, 0x1904, 0x164f, 0x0080, + 0xa87c, 0xd0ac, 0x0904, 0x15ac, 0x9006, 0xa842, 0xa83e, 0x0804, + 0x164f, 0xa87c, 0xd0ac, 0x0904, 0x15ac, 0x9006, 0xa842, 0xa83e, + 0x2c05, 0x908a, 0x0036, 0x1a0c, 0x0db2, 0x9082, 0x001b, 0x0002, + 0x1623, 0x1623, 0x1625, 0x1623, 0x1623, 0x1623, 0x162b, 0x1623, + 0x1623, 0x1623, 0x1631, 0x1623, 0x1623, 0x1623, 0x1637, 0x1623, + 0x1623, 0x1623, 0x163d, 0x1623, 0x1623, 0x1623, 0x1643, 0x1623, + 0x1623, 0x1623, 0x1649, 0x080c, 0x0db2, 0xa574, 0xa478, 0xa37c, + 0xa280, 0x0804, 0x1694, 0xa584, 0xa488, 0xa38c, 0xa290, 0x0804, + 0x1694, 0xa594, 0xa498, 0xa39c, 0xa2a0, 0x0804, 0x1694, 0xa5a4, + 0xa4a8, 0xa3ac, 0xa2b0, 0x0804, 0x1694, 0xa5b4, 0xa4b8, 0xa3bc, + 0xa2c0, 0x0804, 0x1694, 0xa5c4, 0xa4c8, 0xa3cc, 0xa2d0, 0x0804, + 0x1694, 0xa5d4, 0xa4d8, 0xa3dc, 0xa2e0, 0x0804, 0x1694, 0x2c05, + 0x908a, 0x0034, 0x1a0c, 0x0db2, 0x9082, 0x001b, 0x0002, 0x1672, + 0x1670, 0x1670, 0x1670, 0x1670, 0x1670, 0x1679, 0x1670, 0x1670, + 0x1670, 0x1670, 0x1670, 0x1680, 0x1670, 0x1670, 0x1670, 0x1670, + 0x1670, 0x1687, 0x1670, 0x1670, 0x1670, 0x1670, 0x1670, 0x168e, + 0x080c, 0x0db2, 0xa56c, 0xa470, 0xa774, 0xa678, 0xa37c, 0xa280, + 0x00d8, 0xa584, 0xa488, 0xa78c, 0xa690, 0xa394, 0xa298, 0x00a0, + 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0, 0x0068, 0xa5b4, + 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, 0xa2c8, 0x0030, 0xa5cc, 0xa4d0, + 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, 0xab2e, 0xaa32, 0xad1e, 0xac22, + 0xaf26, 0xae2a, 0xa988, 0x8c60, 0x2c1d, 0xa8ac, 0xaab0, 0xa836, + 0xaa3a, 0x8109, 0xa916, 0x1150, 0x3e60, 0x601c, 0xc085, 0x601e, + 0xa87c, 0xc0dd, 0xa87e, 0x9006, 0x012e, 0x0005, 0x2800, 0xa80e, + 0xab0a, 0x2c00, 0xa812, 0x0c80, 0x0804, 0x15ac, 0x2ff0, 0x0126, + 0x2091, 0x2200, 0x3e60, 0x6014, 0x2048, 0x2940, 0xa80e, 0x2061, + 0x1d9d, 0xa80b, 0x1d9d, 0x2c05, 0xa812, 0xa964, 0xa91a, 0xa87c, + 0xd0ac, 0x090c, 0x0db2, 0x9006, 0xa842, 0xa83e, 0x2c05, 0x908a, + 0x0034, 0x1a0c, 0x0db2, 0xadcc, 0xacd0, 0xafd4, 0xaed8, 0xabdc, + 0xaae0, 0xab2e, 0xaa32, 0xad1e, 0xac22, 0xaf26, 0xae2a, 0xa8ac, + 0xaab0, 0xa836, 0xaa3a, 0xa988, 0x918a, 0x0002, 0xa916, 0x1150, + 0x3e60, 0x601c, 0xc085, 0x601e, 0xa87c, 0xc0dd, 0xa87e, 0x9006, + 0x012e, 0x0005, 0xa804, 0x9045, 0x090c, 0x0db2, 0xa80e, 0xa064, + 0xa81a, 0x9084, 0x000f, 0x9080, 0x1da2, 0x2015, 0x82ff, 0x090c, + 0x0db2, 0xaa0a, 0x2205, 0xa812, 0x0c18, 0x903e, 0x2730, 0xa880, + 0xd0fc, 0x1190, 0x2d00, 0x0002, 0x17fa, 0x175c, 0x175c, 0x17fa, + 0x17fa, 0x17f4, 0x17fa, 0x175c, 0x17fa, 0x17ab, 0x17ab, 0x17fa, + 0x17fa, 0x17fa, 0x17f1, 0x17ab, 0xc0fc, 0xa882, 0xab2c, 0xaa30, + 0xad1c, 0xac20, 0xdd9c, 0x0904, 0x17fc, 0x2c05, 0x908a, 0x0034, + 0x1a0c, 0x0db2, 0x9082, 0x001b, 0x0002, 0x1748, 0x1746, 0x1746, + 0x1746, 0x1746, 0x1746, 0x174c, 0x1746, 0x1746, 0x1746, 0x1746, + 0x1746, 0x1750, 0x1746, 0x1746, 0x1746, 0x1746, 0x1746, 0x1754, + 0x1746, 0x1746, 0x1746, 0x1746, 0x1746, 0x1758, 0x080c, 0x0db2, + 0xa774, 0xa678, 0x0804, 0x17fc, 0xa78c, 0xa690, 0x0804, 0x17fc, + 0xa7a4, 0xa6a8, 0x0804, 0x17fc, 0xa7bc, 0xa6c0, 0x0804, 0x17fc, + 0xa7d4, 0xa6d8, 0x0804, 0x17fc, 0x2c05, 0x908a, 0x0036, 0x1a0c, + 0x0db2, 0x9082, 0x001b, 0x0002, 0x177f, 0x177f, 0x1781, 0x177f, + 0x177f, 0x177f, 0x1787, 0x177f, 0x177f, 0x177f, 0x178d, 0x177f, + 0x177f, 0x177f, 0x1793, 0x177f, 0x177f, 0x177f, 0x1799, 0x177f, + 0x177f, 0x177f, 0x179f, 0x177f, 0x177f, 0x177f, 0x17a5, 0x080c, + 0x0db2, 0xa574, 0xa478, 0xa37c, 0xa280, 0x0804, 0x17fc, 0xa584, + 0xa488, 0xa38c, 0xa290, 0x0804, 0x17fc, 0xa594, 0xa498, 0xa39c, + 0xa2a0, 0x0804, 0x17fc, 0xa5a4, 0xa4a8, 0xa3ac, 0xa2b0, 0x0804, + 0x17fc, 0xa5b4, 0xa4b8, 0xa3bc, 0xa2c0, 0x0804, 0x17fc, 0xa5c4, + 0xa4c8, 0xa3cc, 0xa2d0, 0x0804, 0x17fc, 0xa5d4, 0xa4d8, 0xa3dc, + 0xa2e0, 0x0804, 0x17fc, 0x2c05, 0x908a, 0x0034, 0x1a0c, 0x0db2, + 0x9082, 0x001b, 0x0002, 0x17ce, 0x17cc, 0x17cc, 0x17cc, 0x17cc, + 0x17cc, 0x17d5, 0x17cc, 0x17cc, 0x17cc, 0x17cc, 0x17cc, 0x17dc, + 0x17cc, 0x17cc, 0x17cc, 0x17cc, 0x17cc, 0x17e3, 0x17cc, 0x17cc, + 0x17cc, 0x17cc, 0x17cc, 0x17ea, 0x080c, 0x0db2, 0xa56c, 0xa470, + 0xa774, 0xa678, 0xa37c, 0xa280, 0x0438, 0xa584, 0xa488, 0xa78c, + 0xa690, 0xa394, 0xa298, 0x0400, 0xa59c, 0xa4a0, 0xa7a4, 0xa6a8, + 0xa3ac, 0xa2b0, 0x00c8, 0xa5b4, 0xa4b8, 0xa7bc, 0xa6c0, 0xa3c4, + 0xa2c8, 0x0090, 0xa5cc, 0xa4d0, 0xa7d4, 0xa6d8, 0xa3dc, 0xa2e0, + 0x0058, 0x9d86, 0x000e, 0x1130, 0x080c, 0x1d60, 0x1904, 0x1705, + 0x900e, 0x0050, 0x080c, 0x0db2, 0xab2e, 0xaa32, 0xad1e, 0xac22, + 0xaf26, 0xae2a, 0x080c, 0x1d60, 0x0005, 0x6014, 0x2048, 0x6118, + 0x810c, 0x810c, 0x810c, 0x81ff, 0x1118, 0xa887, 0x0001, 0x0008, + 0xa986, 0x601b, 0x0002, 0xa974, 0xd1dc, 0x1108, 0x0005, 0xa934, + 0xa88c, 0x9106, 0x1158, 0xa938, 0xa890, 0x9106, 0x1138, 0x601c, + 0xc084, 0x601e, 0x2009, 0x0048, 0x0804, 0x9a50, 0x0005, 0x0126, + 0x00c6, 0x2091, 0x2200, 0x00ce, 0x7908, 0x918c, 0x0007, 0x9186, + 0x0000, 0x05b0, 0x9186, 0x0003, 0x0598, 0x6020, 0x6023, 0x0000, + 0x0006, 0x2031, 0x0008, 0x00c6, 0x781f, 0x0808, 0x7808, 0xd09c, + 0x0120, 0x080c, 0x12d6, 0x8631, 0x1db8, 0x00ce, 0x781f, 0x0800, + 0x2031, 0x0168, 0x00c6, 0x7808, 0xd09c, 0x190c, 0x12d6, 0x00ce, + 0x2001, 0x0038, 0x080c, 0x18ff, 0x7930, 0x9186, 0x0040, 0x0160, + 0x9186, 0x0042, 0x190c, 0x0db2, 0x2001, 0x001e, 0x8001, 0x1df0, + 0x8631, 0x1d40, 0x080c, 0x190e, 0x000e, 0x6022, 0x012e, 0x0005, + 0x080c, 0x18fb, 0x7827, 0x0015, 0x7828, 0x9c06, 0x1db8, 0x782b, + 0x0000, 0x0ca0, 0x00f6, 0x2079, 0x0300, 0x7803, 0x0000, 0x78ab, + 0x0004, 0x00fe, 0x080c, 0x6c53, 0x11b0, 0x2001, 0x0138, 0x2003, + 0x0000, 0x2001, 0x0160, 0x2003, 0x0000, 0x2011, 0x012c, 0xa001, + 0xa001, 0x8211, 0x1de0, 0x0081, 0x0066, 0x2031, 0x0000, 0x080c, + 0x6d03, 0x006e, 0x0005, 0x0479, 0x0039, 0x2001, 0x0160, 0x2502, + 0x2001, 0x0138, 0x2202, 0x0005, 0x00e6, 0x2071, 0x0200, 0x080c, + 0x28dc, 0x2009, 0x003c, 0x080c, 0x20d9, 0x2001, 0x015d, 0x2003, + 0x0000, 0x7000, 0x9084, 0x003c, 0x1de0, 0x080c, 0x7b7c, 0x70a0, + 0x70a2, 0x7098, 0x709a, 0x709c, 0x709e, 0x2001, 0x020d, 0x2003, + 0x0020, 0x00f6, 0x2079, 0x0300, 0x080c, 0x12a0, 0x7803, 0x0001, + 0x00fe, 0x00ee, 0x0005, 0x2001, 0x0138, 0x2014, 0x2003, 0x0000, + 0x2001, 0x0160, 0x202c, 0x2003, 0x0000, 0x080c, 0x6c53, 0x1108, + 0x0005, 0x2021, 0x0260, 0x2001, 0x0141, 0x201c, 0xd3dc, 0x1168, + 0x2001, 0x0109, 0x201c, 0x939c, 0x0048, 0x1160, 0x2001, 0x0111, + 0x201c, 0x83ff, 0x1110, 0x8421, 0x1d70, 0x2001, 0x015d, 0x2003, + 0x0000, 0x0005, 0x0046, 0x2021, 0x0019, 0x2003, 0x0048, 0xa001, + 0xa001, 0x201c, 0x939c, 0x0048, 0x0120, 0x8421, 0x1db0, 0x004e, + 0x0c60, 0x004e, 0x0c40, 0x601c, 0xc084, 0x601e, 0x0005, 0x2c08, + 0x621c, 0x080c, 0x14d2, 0x7930, 0x0005, 0x2c08, 0x621c, 0x080c, + 0x14f9, 0x7930, 0x0005, 0x8001, 0x1df0, 0x0005, 0x2031, 0x0005, + 0x781c, 0x9084, 0x0007, 0x0170, 0x2001, 0x0038, 0x0c41, 0x9186, + 0x0040, 0x0904, 0x196c, 0x2001, 0x001e, 0x0c69, 0x8631, 0x1d80, + 0x080c, 0x0db2, 0x781f, 0x0202, 0x2001, 0x015d, 0x2003, 0x0000, + 0x2001, 0x0b10, 0x0c01, 0x781c, 0xd084, 0x0110, 0x0861, 0x04e0, + 0x2001, 0x0030, 0x0891, 0x9186, 0x0040, 0x0568, 0x781c, 0xd084, + 0x1da8, 0x781f, 0x0101, 0x2001, 0x0014, 0x0869, 0x2001, 0x0037, + 0x0821, 0x9186, 0x0040, 0x0140, 0x2001, 0x0030, 0x080c, 0x1905, + 0x9186, 0x0040, 0x190c, 0x0db2, 0x00d6, 0x2069, 0x0200, 0x692c, + 0xd1f4, 0x1170, 0xd1c4, 0x0160, 0xd19c, 0x0130, 0x6800, 0x9085, + 0x1800, 0x6802, 0x00de, 0x0080, 0x6908, 0x9184, 0x0007, 0x1db0, + 0x00de, 0x781f, 0x0100, 0x791c, 0x9184, 0x0007, 0x090c, 0x0db2, + 0xa001, 0xa001, 0x781f, 0x0200, 0x0005, 0x0126, 0x2091, 0x2400, + 0x2071, 0x1a34, 0x2079, 0x0090, 0x012e, 0x0005, 0x9280, 0x0005, + 0x2004, 0x2048, 0xa97c, 0xd1dc, 0x1904, 0x19f1, 0xa964, 0x9184, + 0x0007, 0x0002, 0x198a, 0x19dc, 0x1991, 0x1991, 0x1991, 0x19c4, + 0x19a4, 0x1993, 0x2100, 0x9084, 0x00ff, 0x9086, 0x0048, 0x0904, + 0x19dc, 0x080c, 0x0db2, 0xa87c, 0xd0b4, 0x0904, 0x1ba3, 0xa890, + 0xa842, 0xa83a, 0xa88c, 0xa83e, 0xa836, 0xa8ac, 0xa846, 0xa8b0, + 0xa84a, 0xa988, 0x0804, 0x19e4, 0xa864, 0x9084, 0x00ff, 0x9086, + 0x001e, 0x1d38, 0xa87c, 0xd0b4, 0x0904, 0x1ba3, 0xa890, 0xa842, + 0xa83a, 0xa88c, 0xa83e, 0xa836, 0xa8ac, 0xa846, 0xa8b0, 0xa84a, + 0xa804, 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f, 0x9080, 0x1da2, + 0x2005, 0xa812, 0xa988, 0x0448, 0x918c, 0x00ff, 0x9186, 0x0015, + 0x1540, 0xa87c, 0xd0b4, 0x0904, 0x1ba3, 0xa804, 0xa85a, 0x2040, + 0xa064, 0x9084, 0x000f, 0x9080, 0x1da2, 0x2005, 0xa812, 0xa988, + 0x9006, 0xa842, 0xa83e, 0x0088, 0xa87c, 0xd0b4, 0x0904, 0x1ba3, + 0xa988, 0x9006, 0xa842, 0xa83e, 0x2900, 0xa85a, 0xa864, 0x9084, + 0x000f, 0x9080, 0x1da2, 0x2005, 0xa812, 0xa916, 0xa87c, 0xc0dd, + 0xa87e, 0x0005, 0x00f6, 0x2079, 0x0090, 0x782c, 0xd0fc, 0x190c, + 0x1be4, 0x00e6, 0x2071, 0x1a34, 0x7000, 0x9005, 0x1904, 0x1a4b, + 0x7206, 0x9280, 0x0005, 0x204c, 0x9280, 0x0004, 0x2004, 0x782b, + 0x0004, 0x00f6, 0x2079, 0x0200, 0x7803, 0x0040, 0x00fe, 0x00b6, + 0x2058, 0xb86c, 0x7836, 0xb890, 0x00be, 0x00f6, 0x2079, 0x0200, + 0x7803, 0x0040, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, + 0x781a, 0x2079, 0x0100, 0x8004, 0x78d6, 0x00fe, 0xa814, 0x2050, + 0xa858, 0x2040, 0xa810, 0x2060, 0xa064, 0x90ec, 0x000f, 0xa944, + 0x791a, 0x7116, 0xa848, 0x781e, 0x701a, 0x9006, 0x700e, 0x7012, + 0x7004, 0xa940, 0xa838, 0x9106, 0x1188, 0xa93c, 0xa834, 0x9106, + 0x1168, 0x8aff, 0x01a8, 0x0126, 0x2091, 0x8000, 0x00a1, 0x0108, + 0x0091, 0x012e, 0x9006, 0x00ee, 0x00fe, 0x0005, 0x0036, 0x0046, + 0xab38, 0xac34, 0x080c, 0x1dc2, 0x004e, 0x003e, 0x0d50, 0x0c98, + 0x9085, 0x0001, 0x0c80, 0x0076, 0x0066, 0x0056, 0x0046, 0x0036, + 0x0026, 0x8aff, 0x0904, 0x1b9c, 0x700c, 0x7214, 0x923a, 0x7010, + 0x7218, 0x9203, 0x0a04, 0x1b9b, 0x9705, 0x0904, 0x1b9b, 0x903e, + 0x2730, 0xa880, 0xd0fc, 0x1190, 0x2d00, 0x0002, 0x1b7f, 0x1ac6, + 0x1ac6, 0x1b7f, 0x1b7f, 0x1b62, 0x1b7f, 0x1ac6, 0x1b68, 0x1b15, + 0x1b15, 0x1b7f, 0x1b7f, 0x1b7f, 0x1b5c, 0x1b15, 0xc0fc, 0xa882, + 0xab2c, 0xaa30, 0xad1c, 0xac20, 0xdd9c, 0x0904, 0x1b81, 0x2c05, + 0x908a, 0x0034, 0x1a0c, 0x0db2, 0x9082, 0x001b, 0x0002, 0x1ab2, + 0x1ab0, 0x1ab0, 0x1ab0, 0x1ab0, 0x1ab0, 0x1ab6, 0x1ab0, 0x1ab0, + 0x1ab0, 0x1ab0, 0x1ab0, 0x1aba, 0x1ab0, 0x1ab0, 0x1ab0, 0x1ab0, + 0x1ab0, 0x1abe, 0x1ab0, 0x1ab0, 0x1ab0, 0x1ab0, 0x1ab0, 0x1ac2, + 0x080c, 0x0db2, 0xa774, 0xa678, 0x0804, 0x1b81, 0xa78c, 0xa690, + 0x0804, 0x1b81, 0xa7a4, 0xa6a8, 0x0804, 0x1b81, 0xa7bc, 0xa6c0, + 0x0804, 0x1b81, 0xa7d4, 0xa6d8, 0x0804, 0x1b81, 0x2c05, 0x908a, + 0x0036, 0x1a0c, 0x0db2, 0x9082, 0x001b, 0x0002, 0x1ae9, 0x1ae9, + 0x1aeb, 0x1ae9, 0x1ae9, 0x1ae9, 0x1af1, 0x1ae9, 0x1ae9, 0x1ae9, + 0x1af7, 0x1ae9, 0x1ae9, 0x1ae9, 0x1afd, 0x1ae9, 0x1ae9, 0x1ae9, + 0x1b03, 0x1ae9, 0x1ae9, 0x1ae9, 0x1b09, 0x1ae9, 0x1ae9, 0x1ae9, + 0x1b0f, 0x080c, 0x0db2, 0xa574, 0xa478, 0xa37c, 0xa280, 0x0804, + 0x1b81, 0xa584, 0xa488, 0xa38c, 0xa290, 0x0804, 0x1b81, 0xa594, + 0xa498, 0xa39c, 0xa2a0, 0x0804, 0x1b81, 0xa5a4, 0xa4a8, 0xa3ac, + 0xa2b0, 0x0804, 0x1b81, 0xa5b4, 0xa4b8, 0xa3bc, 0xa2c0, 0x0804, + 0x1b81, 0xa5c4, 0xa4c8, 0xa3cc, 0xa2d0, 0x0804, 0x1b81, 0xa5d4, + 0xa4d8, 0xa3dc, 0xa2e0, 0x0804, 0x1b81, 0x2c05, 0x908a, 0x0034, + 0x1a0c, 0x0db2, 0x9082, 0x001b, 0x0002, 0x1b38, 0x1b36, 0x1b36, + 0x1b36, 0x1b36, 0x1b36, 0x1b40, 0x1b36, 0x1b36, 0x1b36, 0x1b36, + 0x1b36, 0x1b47, 0x1b36, 0x1b36, 0x1b36, 0x1b36, 0x1b36, 0x1b4e, + 0x1b36, 0x1b36, 0x1b36, 0x1b36, 0x1b36, 0x1b55, 0x080c, 0x0db2, + 0xa56c, 0xa470, 0xa774, 0xa678, 0xa37c, 0xa280, 0x0804, 0x1b81, + 0xa584, 0xa488, 0xa78c, 0xa690, 0xa394, 0xa298, 0x04d0, 0xa59c, + 0xa4a0, 0xa7a4, 0xa6a8, 0xa3ac, 0xa2b0, 0x0498, 0xa5b4, 0xa4b8, + 0xa7bc, 0xa6c0, 0xa3c4, 0xa2c8, 0x0460, 0xa5cc, 0xa4d0, 0xa7d4, + 0xa6d8, 0xa3dc, 0xa2e0, 0x0428, 0xa864, 0x9084, 0x00ff, 0x9086, + 0x001e, 0x11e8, 0x080c, 0x1d60, 0x1904, 0x1a61, 0x900e, 0x04a0, + 0xa864, 0x9084, 0x00ff, 0x9086, 0x0048, 0x190c, 0x0db2, 0x00c6, + 0x7004, 0x2060, 0x6004, 0x9086, 0x0043, 0x00ce, 0x0904, 0x1b15, + 0xab9c, 0x9016, 0xad8c, 0xac90, 0xaf94, 0xae98, 0x0010, 0x080c, + 0x0db2, 0x7b12, 0x7a16, 0x7d02, 0x7c06, 0x7f0a, 0x7e0e, 0x782b, + 0x0001, 0x7000, 0x8000, 0x7002, 0xa83c, 0x9300, 0xa83e, 0xa840, + 0x9201, 0xa842, 0x700c, 0x9300, 0x700e, 0x7010, 0x9201, 0x7012, + 0x080c, 0x1d60, 0x0008, 0x9006, 0x002e, 0x003e, 0x004e, 0x005e, + 0x006e, 0x007e, 0x0005, 0x080c, 0x0db2, 0x0026, 0x2001, 0x0105, + 0x2003, 0x0010, 0x782b, 0x0004, 0x7003, 0x0000, 0x7004, 0x2060, + 0x6014, 0x2048, 0x080c, 0xb5fb, 0x0118, 0xa880, 0xc0bd, 0xa882, + 0x6020, 0x9086, 0x0006, 0x1180, 0x2061, 0x0100, 0x62c8, 0x2001, + 0x00fa, 0x8001, 0x1df0, 0x60c8, 0x9206, 0x1dc0, 0x60c4, 0xa89a, + 0x60c8, 0xa896, 0x7004, 0x2060, 0x00c6, 0x080c, 0xb251, 0x00ce, + 0x2001, 0x19c5, 0x2004, 0x9c06, 0x1160, 0x2009, 0x0040, 0x080c, + 0x20d9, 0x080c, 0x9479, 0x2011, 0x0000, 0x080c, 0x92f6, 0x080c, + 0x865d, 0x002e, 0x0804, 0x1d12, 0x0126, 0x2091, 0x2400, 0xa858, + 0x2040, 0x792c, 0x782b, 0x0002, 0x9184, 0x0700, 0x1904, 0x1ba5, + 0x7000, 0x0002, 0x1d12, 0x1bf6, 0x1c63, 0x1d10, 0x8001, 0x7002, + 0xd19c, 0x1150, 0x8aff, 0x05b0, 0x080c, 0x1a5b, 0x0904, 0x1d12, + 0x080c, 0x1a5b, 0x0804, 0x1d12, 0x782b, 0x0004, 0xd194, 0x0148, + 0xa880, 0xc0fc, 0xa882, 0x8aff, 0x11d8, 0xa87c, 0xc0f5, 0xa87e, + 0x00b8, 0x0026, 0x0036, 0xab3c, 0xaa40, 0x7810, 0xa82e, 0x931a, + 0x7814, 0xa832, 0x9213, 0x7800, 0xa81e, 0x7804, 0xa822, 0xab3e, + 0xaa42, 0x003e, 0x002e, 0x080c, 0x1d78, 0xa880, 0xc0fd, 0xa882, + 0x2a00, 0xa816, 0x2800, 0xa85a, 0x2c00, 0xa812, 0x7003, 0x0000, + 0x0804, 0x1d12, 0x00f6, 0x0026, 0x781c, 0x0006, 0x7818, 0x0006, + 0x2079, 0x0100, 0x7a14, 0x9284, 0x1984, 0x9085, 0x0012, 0x7816, + 0x0036, 0x2019, 0x1000, 0x8319, 0x090c, 0x0db2, 0x7820, 0xd0bc, + 0x1dd0, 0x003e, 0x79c8, 0x000e, 0x9102, 0x001e, 0x0006, 0x0016, + 0x79c4, 0x000e, 0x9103, 0x78c6, 0x000e, 0x78ca, 0x9284, 0x1984, + 0x9085, 0x0012, 0x7816, 0x002e, 0x00fe, 0x782b, 0x0008, 0x7003, + 0x0000, 0x0804, 0x1d12, 0x8001, 0x7002, 0xd194, 0x0170, 0x782c, + 0xd0fc, 0x1904, 0x1be9, 0xd19c, 0x1904, 0x1d0e, 0x8aff, 0x0904, + 0x1d12, 0x080c, 0x1a5b, 0x0804, 0x1d12, 0x0026, 0x0036, 0xab3c, + 0xaa40, 0x080c, 0x1d78, 0xdd9c, 0x1904, 0x1ccd, 0x2c05, 0x908a, + 0x0036, 0x1a0c, 0x0db2, 0x9082, 0x001b, 0x0002, 0x1ca1, 0x1ca1, + 0x1ca3, 0x1ca1, 0x1ca1, 0x1ca1, 0x1ca9, 0x1ca1, 0x1ca1, 0x1ca1, + 0x1caf, 0x1ca1, 0x1ca1, 0x1ca1, 0x1cb5, 0x1ca1, 0x1ca1, 0x1ca1, + 0x1cbb, 0x1ca1, 0x1ca1, 0x1ca1, 0x1cc1, 0x1ca1, 0x1ca1, 0x1ca1, + 0x1cc7, 0x080c, 0x0db2, 0xa07c, 0x931a, 0xa080, 0x9213, 0x0804, + 0x1c15, 0xa08c, 0x931a, 0xa090, 0x9213, 0x0804, 0x1c15, 0xa09c, + 0x931a, 0xa0a0, 0x9213, 0x0804, 0x1c15, 0xa0ac, 0x931a, 0xa0b0, + 0x9213, 0x0804, 0x1c15, 0xa0bc, 0x931a, 0xa0c0, 0x9213, 0x0804, + 0x1c15, 0xa0cc, 0x931a, 0xa0d0, 0x9213, 0x0804, 0x1c15, 0xa0dc, + 0x931a, 0xa0e0, 0x9213, 0x0804, 0x1c15, 0x2c05, 0x908a, 0x0034, + 0x1a0c, 0x0db2, 0x9082, 0x001b, 0x0002, 0x1cf0, 0x1cee, 0x1cee, + 0x1cee, 0x1cee, 0x1cee, 0x1cf6, 0x1cee, 0x1cee, 0x1cee, 0x1cee, + 0x1cee, 0x1cfc, 0x1cee, 0x1cee, 0x1cee, 0x1cee, 0x1cee, 0x1d02, + 0x1cee, 0x1cee, 0x1cee, 0x1cee, 0x1cee, 0x1d08, 0x080c, 0x0db2, + 0xa07c, 0x931a, 0xa080, 0x9213, 0x0804, 0x1c15, 0xa094, 0x931a, + 0xa098, 0x9213, 0x0804, 0x1c15, 0xa0ac, 0x931a, 0xa0b0, 0x9213, + 0x0804, 0x1c15, 0xa0c4, 0x931a, 0xa0c8, 0x9213, 0x0804, 0x1c15, + 0xa0dc, 0x931a, 0xa0e0, 0x9213, 0x0804, 0x1c15, 0x0804, 0x1c11, + 0x080c, 0x0db2, 0x012e, 0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a34, + 0x7000, 0x9086, 0x0000, 0x0904, 0x1d5d, 0x2079, 0x0090, 0x2009, + 0x0207, 0x210c, 0xd194, 0x01b8, 0x2009, 0x020c, 0x210c, 0x9184, + 0x0003, 0x0188, 0x080c, 0xd364, 0x2001, 0x0133, 0x2004, 0x9005, + 0x090c, 0x0db2, 0x0016, 0x2009, 0x0040, 0x080c, 0x20d9, 0x001e, + 0x2001, 0x020c, 0x2102, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203, + 0x210c, 0x9106, 0x1120, 0x2009, 0x0040, 0x080c, 0x20d9, 0x782c, + 0xd0fc, 0x09a8, 0x080c, 0x1be4, 0x7000, 0x9086, 0x0000, 0x1978, + 0x782b, 0x0004, 0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, + 0x20d9, 0x782b, 0x0002, 0x7003, 0x0000, 0x00ee, 0x00fe, 0x0005, + 0x8c60, 0x2c05, 0x9005, 0x0110, 0x8a51, 0x0005, 0xa004, 0x9005, + 0x0168, 0xa85a, 0x2040, 0xa064, 0x9084, 0x000f, 0x9080, 0x1da2, + 0x2065, 0x8cff, 0x090c, 0x0db2, 0x8a51, 0x0005, 0x2050, 0x0005, + 0x8a50, 0x8c61, 0x2c05, 0x9005, 0x1190, 0x2800, 0x9906, 0x0120, + 0xa000, 0x9005, 0x1108, 0x2900, 0x2040, 0xa85a, 0xa064, 0x9084, + 0x000f, 0x9080, 0x1db2, 0x2065, 0x8cff, 0x090c, 0x0db2, 0x0005, + 0x0000, 0x001d, 0x0021, 0x0025, 0x0029, 0x002d, 0x0031, 0x0035, + 0x0000, 0x001b, 0x0021, 0x0027, 0x002d, 0x0033, 0x0000, 0x0000, + 0x0023, 0x0000, 0x0000, 0x1d95, 0x1d91, 0x0000, 0x0000, 0x1d9f, + 0x0000, 0x1d95, 0x1d9c, 0x1d9c, 0x1d99, 0x0000, 0x0000, 0x0000, + 0x1d9f, 0x1d9c, 0x0000, 0x1d97, 0x1d97, 0x0000, 0x0000, 0x1d9f, + 0x0000, 0x1d97, 0x1d9d, 0x1d9d, 0x1d9d, 0x0000, 0x0000, 0x0000, + 0x1d9f, 0x1d9d, 0x00c6, 0x00d6, 0x0086, 0xab42, 0xac3e, 0xa888, + 0x9055, 0x0904, 0x1f99, 0x2940, 0xa064, 0x90ec, 0x000f, 0x9de0, + 0x1da2, 0x9d86, 0x0007, 0x0130, 0x9d86, 0x000e, 0x0118, 0x9d86, + 0x000f, 0x1120, 0xa08c, 0x9422, 0xa090, 0x931b, 0x2c05, 0x9065, + 0x1140, 0x0310, 0x0804, 0x1f99, 0xa004, 0x9045, 0x0904, 0x1f99, + 0x0c18, 0x2c05, 0x9005, 0x0904, 0x1e81, 0xdd9c, 0x1904, 0x1e3d, + 0x908a, 0x0036, 0x1a0c, 0x0db2, 0x9082, 0x001b, 0x0002, 0x1e12, + 0x1e12, 0x1e14, 0x1e12, 0x1e12, 0x1e12, 0x1e1a, 0x1e12, 0x1e12, + 0x1e12, 0x1e20, 0x1e12, 0x1e12, 0x1e12, 0x1e26, 0x1e12, 0x1e12, + 0x1e12, 0x1e2c, 0x1e12, 0x1e12, 0x1e12, 0x1e32, 0x1e12, 0x1e12, + 0x1e12, 0x1e38, 0x080c, 0x0db2, 0xa07c, 0x9422, 0xa080, 0x931b, + 0x0804, 0x1e77, 0xa08c, 0x9422, 0xa090, 0x931b, 0x0804, 0x1e77, + 0xa09c, 0x9422, 0xa0a0, 0x931b, 0x0804, 0x1e77, 0xa0ac, 0x9422, + 0xa0b0, 0x931b, 0x0804, 0x1e77, 0xa0bc, 0x9422, 0xa0c0, 0x931b, + 0x0804, 0x1e77, 0xa0cc, 0x9422, 0xa0d0, 0x931b, 0x0804, 0x1e77, + 0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x04d0, 0x908a, 0x0034, 0x1a0c, + 0x0db2, 0x9082, 0x001b, 0x0002, 0x1e5f, 0x1e5d, 0x1e5d, 0x1e5d, + 0x1e5d, 0x1e5d, 0x1e64, 0x1e5d, 0x1e5d, 0x1e5d, 0x1e5d, 0x1e5d, + 0x1e69, 0x1e5d, 0x1e5d, 0x1e5d, 0x1e5d, 0x1e5d, 0x1e6e, 0x1e5d, + 0x1e5d, 0x1e5d, 0x1e5d, 0x1e5d, 0x1e73, 0x080c, 0x0db2, 0xa07c, + 0x9422, 0xa080, 0x931b, 0x0098, 0xa094, 0x9422, 0xa098, 0x931b, + 0x0070, 0xa0ac, 0x9422, 0xa0b0, 0x931b, 0x0048, 0xa0c4, 0x9422, + 0xa0c8, 0x931b, 0x0020, 0xa0dc, 0x9422, 0xa0e0, 0x931b, 0x0630, + 0x2300, 0x9405, 0x0160, 0x8a51, 0x0904, 0x1f99, 0x8c60, 0x0804, + 0x1de9, 0xa004, 0x9045, 0x0904, 0x1f99, 0x0804, 0x1dcc, 0x8a51, + 0x0904, 0x1f99, 0x8c60, 0x2c05, 0x9005, 0x1158, 0xa004, 0x9045, + 0x0904, 0x1f99, 0xa064, 0x90ec, 0x000f, 0x9de0, 0x1da2, 0x2c05, + 0x2060, 0xa880, 0xc0fc, 0xa882, 0x0804, 0x1f8e, 0x2c05, 0x8422, + 0x8420, 0x831a, 0x9399, 0x0000, 0xac2e, 0xab32, 0xdd9c, 0x1904, + 0x1f2b, 0x9082, 0x001b, 0x0002, 0x1ec7, 0x1ec7, 0x1ec9, 0x1ec7, + 0x1ec7, 0x1ec7, 0x1ed7, 0x1ec7, 0x1ec7, 0x1ec7, 0x1ee5, 0x1ec7, + 0x1ec7, 0x1ec7, 0x1ef3, 0x1ec7, 0x1ec7, 0x1ec7, 0x1f01, 0x1ec7, + 0x1ec7, 0x1ec7, 0x1f0f, 0x1ec7, 0x1ec7, 0x1ec7, 0x1f1d, 0x080c, + 0x0db2, 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c, + 0x0db2, 0xa074, 0x9420, 0xa078, 0x9319, 0x0804, 0x1f89, 0xa18c, + 0x2400, 0x9122, 0xa190, 0x2300, 0x911b, 0x0a0c, 0x0db2, 0xa084, + 0x9420, 0xa088, 0x9319, 0x0804, 0x1f89, 0xa19c, 0x2400, 0x9122, + 0xa1a0, 0x2300, 0x911b, 0x0a0c, 0x0db2, 0xa094, 0x9420, 0xa098, + 0x9319, 0x0804, 0x1f89, 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300, + 0x911b, 0x0a0c, 0x0db2, 0xa0a4, 0x9420, 0xa0a8, 0x9319, 0x0804, + 0x1f89, 0xa1bc, 0x2400, 0x9122, 0xa1c0, 0x2300, 0x911b, 0x0a0c, + 0x0db2, 0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0804, 0x1f89, 0xa1cc, + 0x2400, 0x9122, 0xa1d0, 0x2300, 0x911b, 0x0a0c, 0x0db2, 0xa0c4, + 0x9420, 0xa0c8, 0x9319, 0x0804, 0x1f89, 0xa1dc, 0x2400, 0x9122, + 0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0db2, 0xa0d4, 0x9420, 0xa0d8, + 0x9319, 0x0804, 0x1f89, 0x9082, 0x001b, 0x0002, 0x1f49, 0x1f47, + 0x1f47, 0x1f47, 0x1f47, 0x1f47, 0x1f56, 0x1f47, 0x1f47, 0x1f47, + 0x1f47, 0x1f47, 0x1f63, 0x1f47, 0x1f47, 0x1f47, 0x1f47, 0x1f47, + 0x1f70, 0x1f47, 0x1f47, 0x1f47, 0x1f47, 0x1f47, 0x1f7d, 0x080c, + 0x0db2, 0xa17c, 0x2400, 0x9122, 0xa180, 0x2300, 0x911b, 0x0a0c, + 0x0db2, 0xa06c, 0x9420, 0xa070, 0x9319, 0x0498, 0xa194, 0x2400, + 0x9122, 0xa198, 0x2300, 0x911b, 0x0a0c, 0x0db2, 0xa084, 0x9420, + 0xa088, 0x9319, 0x0430, 0xa1ac, 0x2400, 0x9122, 0xa1b0, 0x2300, + 0x911b, 0x0a0c, 0x0db2, 0xa09c, 0x9420, 0xa0a0, 0x9319, 0x00c8, + 0xa1c4, 0x2400, 0x9122, 0xa1c8, 0x2300, 0x911b, 0x0a0c, 0x0db2, + 0xa0b4, 0x9420, 0xa0b8, 0x9319, 0x0060, 0xa1dc, 0x2400, 0x9122, + 0xa1e0, 0x2300, 0x911b, 0x0a0c, 0x0db2, 0xa0cc, 0x9420, 0xa0d0, + 0x9319, 0xac1e, 0xab22, 0xa880, 0xc0fd, 0xa882, 0x2800, 0xa85a, + 0x2c00, 0xa812, 0x2a00, 0xa816, 0x000e, 0x000e, 0x000e, 0x9006, + 0x0028, 0x008e, 0x00de, 0x00ce, 0x9085, 0x0001, 0x0005, 0x2001, + 0x0005, 0x2004, 0x9084, 0x0007, 0x0002, 0x1fb7, 0x1be4, 0x1fb7, + 0x1fad, 0x1fb0, 0x1fb3, 0x1fb0, 0x1fb3, 0x080c, 0x1be4, 0x0005, + 0x080c, 0x116f, 0x0005, 0x080c, 0x1be4, 0x080c, 0x116f, 0x0005, + 0x0126, 0x2091, 0x2600, 0x2079, 0x0200, 0x2071, 0x0260, 0x2069, + 0x1800, 0x7817, 0x0000, 0x789b, 0x0814, 0x78a3, 0x0406, 0x789f, + 0x0410, 0x2009, 0x013b, 0x200b, 0x0400, 0x781b, 0x0002, 0x783b, + 0x001f, 0x7837, 0x0020, 0x7803, 0x1600, 0x012e, 0x0005, 0x2091, + 0x2600, 0x781c, 0xd0a4, 0x190c, 0x20d6, 0x7900, 0xd1dc, 0x1118, + 0x9084, 0x0006, 0x001a, 0x9084, 0x000e, 0x0002, 0x1ffe, 0x1ff6, + 0x7597, 0x1ff6, 0x1ff8, 0x1ff8, 0x1ff8, 0x1ff8, 0x757d, 0x1ff6, + 0x1ffa, 0x1ff6, 0x1ff8, 0x1ff6, 0x1ff8, 0x1ff6, 0x080c, 0x0db2, + 0x0031, 0x0020, 0x080c, 0x757d, 0x080c, 0x7597, 0x0005, 0x0006, + 0x0016, 0x0026, 0x080c, 0xd364, 0x7930, 0x9184, 0x0003, 0x01c0, + 0x2001, 0x19c5, 0x2004, 0x9005, 0x0170, 0x2001, 0x0133, 0x2004, + 0x9005, 0x090c, 0x0db2, 0x00c6, 0x2001, 0x19c5, 0x2064, 0x080c, + 0xb251, 0x00ce, 0x00f8, 0x2009, 0x0040, 0x080c, 0x20d9, 0x00d0, + 0x9184, 0x0014, 0x01a0, 0x6a00, 0x9286, 0x0003, 0x0160, 0x080c, + 0x6c53, 0x1138, 0x080c, 0x6f2a, 0x080c, 0x5a21, 0x080c, 0x6b8a, + 0x0010, 0x080c, 0x58e0, 0x080c, 0x7635, 0x0041, 0x0018, 0x9184, + 0x9540, 0x1dc8, 0x002e, 0x001e, 0x000e, 0x0005, 0x00e6, 0x0036, + 0x0046, 0x0056, 0x2071, 0x1a31, 0x080c, 0x1872, 0x005e, 0x004e, + 0x003e, 0x00ee, 0x0005, 0x0126, 0x2091, 0x2e00, 0x2071, 0x1800, + 0x7128, 0x2001, 0x1940, 0x2102, 0x2001, 0x1948, 0x2102, 0x2001, + 0x013b, 0x2102, 0x2079, 0x0200, 0x2001, 0x0201, 0x789e, 0x78a3, + 0x0200, 0x9198, 0x0007, 0x831c, 0x831c, 0x831c, 0x9398, 0x0005, + 0x2320, 0x9182, 0x0204, 0x1230, 0x2011, 0x0008, 0x8423, 0x8423, + 0x8423, 0x0488, 0x9182, 0x024c, 0x1240, 0x2011, 0x0007, 0x8403, + 0x8003, 0x9400, 0x9400, 0x9420, 0x0430, 0x9182, 0x02bc, 0x1238, + 0x2011, 0x0006, 0x8403, 0x8003, 0x9400, 0x9420, 0x00e0, 0x9182, + 0x034c, 0x1230, 0x2011, 0x0005, 0x8403, 0x8003, 0x9420, 0x0098, + 0x9182, 0x042c, 0x1228, 0x2011, 0x0004, 0x8423, 0x8423, 0x0058, + 0x9182, 0x059c, 0x1228, 0x2011, 0x0003, 0x8403, 0x9420, 0x0018, + 0x2011, 0x0002, 0x8423, 0x9482, 0x0228, 0x8002, 0x8020, 0x8301, + 0x9402, 0x0110, 0x0208, 0x8321, 0x8217, 0x8203, 0x9405, 0x789a, + 0x012e, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6814, 0x9084, + 0xffc0, 0x910d, 0x6916, 0x00de, 0x000e, 0x0005, 0x00d6, 0x2069, + 0x0200, 0x9005, 0x6810, 0x0110, 0xc0a5, 0x0008, 0xc0a4, 0x6812, + 0x00de, 0x0005, 0x0006, 0x00d6, 0x2069, 0x0200, 0x6810, 0x9084, + 0xfff8, 0x910d, 0x6912, 0x00de, 0x000e, 0x0005, 0x7938, 0x080c, + 0x0db2, 0x00f6, 0x2079, 0x0200, 0x7902, 0xa001, 0xa001, 0xa001, + 0xa001, 0xa001, 0xa001, 0x7902, 0xa001, 0xa001, 0xa001, 0xa001, + 0xa001, 0xa001, 0x00fe, 0x0005, 0x0126, 0x2091, 0x2800, 0x2061, + 0x0100, 0x2071, 0x1800, 0x2009, 0x0000, 0x080c, 0x28d6, 0x080c, + 0x27f1, 0x6054, 0x8004, 0x8004, 0x8004, 0x8004, 0x9084, 0x000c, + 0x6150, 0x918c, 0xfff3, 0x9105, 0x6052, 0x6050, 0x9084, 0xb17f, + 0x9085, 0x2000, 0x6052, 0x2009, 0x196c, 0x2011, 0x196d, 0x6358, + 0x939c, 0x38f0, 0x2320, 0x080c, 0x2835, 0x1238, 0x939d, 0x4003, + 0x94a5, 0x8603, 0x230a, 0x2412, 0x0030, 0x939d, 0x0203, 0x94a5, + 0x8603, 0x230a, 0x2412, 0x9006, 0x080c, 0x2820, 0x9006, 0x080c, + 0x2803, 0x20a9, 0x0012, 0x1d04, 0x212b, 0x2091, 0x6000, 0x1f04, + 0x212b, 0x602f, 0x0100, 0x602f, 0x0000, 0x6050, 0x9085, 0x0400, + 0x9084, 0xdfff, 0x6052, 0x6024, 0x6026, 0x080c, 0x250f, 0x2009, + 0x00ef, 0x6132, 0x6136, 0x080c, 0x251f, 0x60e7, 0x0000, 0x61ea, + 0x60e3, 0x0008, 0x604b, 0xf7f7, 0x6043, 0x0000, 0x602f, 0x0080, + 0x602f, 0x0000, 0x6007, 0x049f, 0x60bb, 0x0000, 0x20a9, 0x0018, + 0x60bf, 0x0000, 0x1f04, 0x2158, 0x60bb, 0x0000, 0x60bf, 0x0108, + 0x60bf, 0x0012, 0x60bf, 0x0320, 0x60bf, 0x0018, 0x601b, 0x00f0, + 0x601f, 0x001e, 0x600f, 0x006b, 0x602b, 0x402f, 0x012e, 0x0005, + 0x00f6, 0x2079, 0x0140, 0x78c3, 0x0080, 0x78c3, 0x0083, 0x78c3, + 0x0000, 0x00fe, 0x0005, 0x2001, 0x1833, 0x2003, 0x0000, 0x2001, + 0x1832, 0x2003, 0x0001, 0x0005, 0x0126, 0x2091, 0x2800, 0x0006, + 0x0016, 0x0026, 0x6124, 0x9184, 0x5e2c, 0x1118, 0x9184, 0x0007, + 0x002a, 0x9195, 0x0004, 0x9284, 0x0007, 0x0002, 0x21b8, 0x219e, + 0x21a1, 0x21a4, 0x21a9, 0x21ab, 0x21af, 0x21b3, 0x080c, 0x7eec, + 0x00b8, 0x080c, 0x7fb9, 0x00a0, 0x080c, 0x7fb9, 0x080c, 0x7eec, + 0x0078, 0x0099, 0x0068, 0x080c, 0x7eec, 0x0079, 0x0048, 0x080c, + 0x7fb9, 0x0059, 0x0028, 0x080c, 0x7fb9, 0x080c, 0x7eec, 0x0029, + 0x002e, 0x001e, 0x000e, 0x012e, 0x0005, 0x00a6, 0x6124, 0x6028, + 0xd09c, 0x0118, 0xd19c, 0x1904, 0x2408, 0xd1f4, 0x0110, 0x080c, + 0x0db2, 0x080c, 0x6c53, 0x0904, 0x2214, 0x080c, 0xbcec, 0x1120, + 0x7000, 0x9086, 0x0003, 0x0570, 0x6024, 0x9084, 0x1800, 0x0550, + 0x080c, 0x6c76, 0x0118, 0x080c, 0x6c64, 0x1520, 0x6027, 0x0020, + 0x6043, 0x0000, 0x080c, 0xbcec, 0x0168, 0x080c, 0x6c76, 0x1150, + 0x2001, 0x1976, 0x2003, 0x0001, 0x6027, 0x1800, 0x080c, 0x6ad9, + 0x0804, 0x240b, 0x709c, 0x9005, 0x1150, 0x709f, 0x0001, 0x00d6, + 0x2069, 0x0140, 0x080c, 0x6caa, 0x00de, 0x1904, 0x240b, 0x080c, + 0x6f34, 0x0428, 0x080c, 0x6c76, 0x1590, 0x6024, 0x9084, 0x1800, + 0x1108, 0x0468, 0x080c, 0x6f34, 0x080c, 0x6f2a, 0x080c, 0x5a21, + 0x080c, 0x6b8a, 0x0804, 0x2408, 0xd1ac, 0x1508, 0x6024, 0xd0dc, + 0x1170, 0xd0e4, 0x1178, 0xd0d4, 0x1190, 0xd0cc, 0x0130, 0x7090, + 0x9086, 0x0028, 0x1110, 0x080c, 0x6e17, 0x0804, 0x2408, 0x080c, + 0x6f2f, 0x0048, 0x2001, 0x194e, 0x2003, 0x0002, 0x0020, 0x080c, + 0x6d8d, 0x0804, 0x2408, 0x080c, 0x6eb2, 0x0804, 0x2408, 0xd1ac, + 0x0904, 0x2329, 0x080c, 0x6c53, 0x11c0, 0x6027, 0x0020, 0x0006, + 0x0026, 0x0036, 0x080c, 0x6c6d, 0x1158, 0x080c, 0x6f2a, 0x080c, + 0x5a21, 0x080c, 0x6b8a, 0x003e, 0x002e, 0x000e, 0x00ae, 0x0005, + 0x003e, 0x002e, 0x000e, 0x080c, 0x6c2d, 0x0016, 0x0046, 0x00c6, + 0x644c, 0x9486, 0xf0f0, 0x1138, 0x2061, 0x0100, 0x644a, 0x6043, + 0x0090, 0x6043, 0x0010, 0x74d2, 0x948c, 0xff00, 0x7034, 0xd084, + 0x0178, 0x9186, 0xf800, 0x1160, 0x7040, 0xd084, 0x1148, 0xc085, + 0x7042, 0x0036, 0x2418, 0x2011, 0x8016, 0x080c, 0x4672, 0x003e, + 0x080c, 0xbce5, 0x1904, 0x2306, 0x9196, 0xff00, 0x05a8, 0x7058, + 0x9084, 0x00ff, 0x810f, 0x81ff, 0x0110, 0x9116, 0x0568, 0x7130, + 0xd184, 0x1550, 0x080c, 0x2f86, 0x0128, 0xc18d, 0x7132, 0x080c, + 0x629c, 0x1510, 0x6240, 0x9294, 0x0010, 0x0130, 0x6248, 0x9294, + 0xff00, 0x9296, 0xff00, 0x01c0, 0x7030, 0xd08c, 0x0904, 0x2306, + 0x7034, 0xd08c, 0x1140, 0x2001, 0x180c, 0x200c, 0xd1ac, 0x1904, + 0x2306, 0xc1ad, 0x2102, 0x0036, 0x73d0, 0x2011, 0x8013, 0x080c, + 0x4672, 0x003e, 0x0804, 0x2306, 0x7034, 0xd08c, 0x1140, 0x2001, + 0x180c, 0x200c, 0xd1ac, 0x1904, 0x2306, 0xc1ad, 0x2102, 0x0036, + 0x73d0, 0x2011, 0x8013, 0x080c, 0x4672, 0x003e, 0x7130, 0xc185, + 0x7132, 0x2011, 0x1854, 0x220c, 0xd1a4, 0x01f0, 0x0016, 0x2009, + 0x0001, 0x2011, 0x0100, 0x080c, 0x7e3e, 0x2019, 0x000e, 0x00c6, + 0x2061, 0x0000, 0x080c, 0xcf62, 0x00ce, 0x9484, 0x00ff, 0x9080, + 0x2f92, 0x200d, 0x918c, 0xff00, 0x810f, 0x2120, 0x9006, 0x2009, + 0x000e, 0x080c, 0xcfe6, 0x001e, 0xd1ac, 0x1148, 0x0016, 0x2009, + 0x0002, 0x2019, 0x0004, 0x080c, 0x2dfb, 0x001e, 0x0078, 0x0156, + 0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c, 0x5f7e, 0x1110, 0x080c, + 0x5a3b, 0x8108, 0x1f04, 0x22fc, 0x00be, 0x015e, 0x00ce, 0x004e, + 0x080c, 0x9947, 0x60e3, 0x0000, 0x001e, 0x2001, 0x1800, 0x2014, + 0x9296, 0x0004, 0x1170, 0xd19c, 0x11a0, 0x2011, 0x180c, 0x2214, + 0xd29c, 0x1120, 0x6204, 0x9295, 0x0002, 0x6206, 0x6228, 0xc29d, + 0x622a, 0x2003, 0x0001, 0x2001, 0x1824, 0x2003, 0x0000, 0x6027, + 0x0020, 0xd194, 0x0904, 0x2408, 0x0016, 0x6220, 0xd2b4, 0x0904, + 0x23b1, 0x080c, 0x7cc7, 0x080c, 0x8fbb, 0x6027, 0x0004, 0x00f6, + 0x2019, 0x19bf, 0x2304, 0x907d, 0x0904, 0x2380, 0x7804, 0x9086, + 0x0032, 0x15f0, 0x00d6, 0x00c6, 0x00e6, 0x0096, 0x2069, 0x0140, + 0x782c, 0x685e, 0x7808, 0x685a, 0x6043, 0x0002, 0x2001, 0x0003, + 0x8001, 0x1df0, 0x6043, 0x0000, 0x2001, 0x003c, 0x8001, 0x1df0, + 0x080c, 0x2997, 0x2001, 0x001e, 0x8001, 0x0240, 0x20a9, 0x0009, + 0x080c, 0x28b1, 0x6904, 0xd1dc, 0x1140, 0x0cb0, 0x2001, 0x0100, + 0x080c, 0x2987, 0x9006, 0x080c, 0x2987, 0x080c, 0x847d, 0x080c, + 0x8582, 0x7814, 0x2048, 0xa867, 0x0103, 0x2f60, 0x080c, 0x99d6, + 0x009e, 0x00ee, 0x00ce, 0x00de, 0x00fe, 0x001e, 0x00ae, 0x0005, + 0x00fe, 0x00d6, 0x2069, 0x0140, 0x6804, 0x9084, 0x4000, 0x0110, + 0x080c, 0x2997, 0x00de, 0x00c6, 0x2061, 0x19b6, 0x6028, 0x080c, + 0xbcec, 0x0120, 0x909a, 0x0003, 0x1258, 0x0018, 0x909a, 0x00c8, + 0x1238, 0x8000, 0x602a, 0x00ce, 0x080c, 0x8f97, 0x0804, 0x2407, + 0x2061, 0x0100, 0x62c0, 0x080c, 0x97d2, 0x2019, 0x19bf, 0x2304, + 0x9065, 0x0120, 0x2009, 0x0027, 0x080c, 0x9a50, 0x00ce, 0x0804, + 0x2407, 0xd2bc, 0x0904, 0x23f4, 0x080c, 0x7cd4, 0x6014, 0x9084, + 0x1984, 0x9085, 0x0010, 0x6016, 0x6027, 0x0004, 0x00d6, 0x2069, + 0x0140, 0x6804, 0x9084, 0x4000, 0x0110, 0x080c, 0x2997, 0x00de, + 0x00c6, 0x2061, 0x19b6, 0x6044, 0x080c, 0xbcec, 0x0120, 0x909a, + 0x0003, 0x1628, 0x0018, 0x909a, 0x00c8, 0x1608, 0x8000, 0x6046, + 0x603c, 0x00ce, 0x9005, 0x0558, 0x2009, 0x07d0, 0x080c, 0x7ccc, + 0x9080, 0x0008, 0x2004, 0x9086, 0x0006, 0x1138, 0x6114, 0x918c, + 0x1984, 0x918d, 0x0012, 0x6116, 0x00d0, 0x6114, 0x918c, 0x1984, + 0x918d, 0x0016, 0x6116, 0x0098, 0x6027, 0x0004, 0x0080, 0x0036, + 0x2019, 0x0001, 0x080c, 0x9254, 0x003e, 0x2019, 0x19c5, 0x2304, + 0x9065, 0x0120, 0x2009, 0x004f, 0x080c, 0x9a50, 0x00ce, 0x001e, + 0xd19c, 0x0904, 0x247a, 0x7034, 0xd0ac, 0x1904, 0x244f, 0x0016, + 0x0156, 0x6027, 0x0008, 0x6050, 0x9085, 0x0040, 0x6052, 0x6050, + 0x9084, 0xfbcf, 0x6052, 0x080c, 0x28d0, 0x9085, 0x2000, 0x6052, + 0x20a9, 0x0012, 0x1d04, 0x2422, 0x080c, 0x7cfb, 0x1f04, 0x2422, + 0x6050, 0x9085, 0x0400, 0x9084, 0xdfbf, 0x6052, 0x20a9, 0x0028, + 0xa001, 0x1f04, 0x2430, 0x6150, 0x9185, 0x1400, 0x6052, 0x20a9, + 0x0366, 0x1d04, 0x2439, 0x080c, 0x7cfb, 0x6020, 0xd09c, 0x1130, + 0x015e, 0x6152, 0x001e, 0x6027, 0x0008, 0x04a0, 0x080c, 0x2898, + 0x1f04, 0x2439, 0x015e, 0x6152, 0x001e, 0x6027, 0x0008, 0x0016, + 0x6028, 0xc09c, 0x602a, 0x080c, 0x9947, 0x60e3, 0x0000, 0x080c, + 0xd343, 0x080c, 0xd35e, 0x080c, 0x5117, 0xd0fc, 0x1138, 0x080c, + 0xbce5, 0x1120, 0x9085, 0x0001, 0x080c, 0x6c9a, 0x9006, 0x080c, + 0x2987, 0x2009, 0x0002, 0x080c, 0x28d6, 0x00e6, 0x2071, 0x1800, + 0x7003, 0x0004, 0x080c, 0x0e69, 0x00ee, 0x6027, 0x0008, 0x080c, + 0x0b94, 0x001e, 0x918c, 0xffd0, 0x6126, 0x00ae, 0x0005, 0x0006, + 0x0016, 0x0026, 0x0036, 0x00e6, 0x00f6, 0x0126, 0x2091, 0x8000, + 0x2071, 0x1800, 0x71c8, 0x70ca, 0x9116, 0x0904, 0x24ce, 0x81ff, + 0x01a0, 0x2009, 0x0000, 0x080c, 0x28d6, 0x2011, 0x8011, 0x2019, + 0x010e, 0x231c, 0x939e, 0x0007, 0x1118, 0x2019, 0x0001, 0x0010, + 0x2019, 0x0000, 0x080c, 0x4672, 0x0448, 0x2001, 0x1977, 0x200c, + 0x81ff, 0x1140, 0x2001, 0x0109, 0x2004, 0xd0b4, 0x0118, 0x2019, + 0x0003, 0x0008, 0x2118, 0x2011, 0x8012, 0x080c, 0x4672, 0x080c, + 0x0e69, 0x080c, 0x5117, 0xd0fc, 0x1188, 0x080c, 0xbce5, 0x1170, + 0x00c6, 0x080c, 0x256a, 0x080c, 0x91bb, 0x2061, 0x0100, 0x2019, + 0x0028, 0x2009, 0x0002, 0x080c, 0x2dfb, 0x00ce, 0x012e, 0x00fe, + 0x00ee, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x2028, 0x918c, + 0x00ff, 0x2130, 0x9094, 0xff00, 0x11f0, 0x2011, 0x1835, 0x2214, + 0xd2ac, 0x11c8, 0x81ff, 0x01e8, 0x2011, 0x181d, 0x2204, 0x9106, + 0x1190, 0x2011, 0x181e, 0x2214, 0x9294, 0xff00, 0x9584, 0xff00, + 0x9206, 0x1148, 0x2011, 0x181e, 0x2214, 0x9294, 0x00ff, 0x9584, + 0x00ff, 0x9206, 0x1120, 0x2500, 0x080c, 0x7876, 0x0048, 0x9584, + 0x00ff, 0x9080, 0x2f92, 0x200d, 0x918c, 0xff00, 0x810f, 0x9006, + 0x0005, 0x9080, 0x2f92, 0x200d, 0x918c, 0x00ff, 0x0005, 0x00d6, + 0x2069, 0x0140, 0x2001, 0x1816, 0x2003, 0x00ef, 0x20a9, 0x0010, + 0x9006, 0x6852, 0x6856, 0x1f04, 0x251a, 0x00de, 0x0005, 0x0006, + 0x00d6, 0x0026, 0x2069, 0x0140, 0x2001, 0x1816, 0x2102, 0x8114, + 0x8214, 0x8214, 0x8214, 0x20a9, 0x0010, 0x6853, 0x0000, 0x9006, + 0x82ff, 0x1128, 0x9184, 0x000f, 0x9080, 0xd74a, 0x2005, 0x6856, + 0x8211, 0x1f04, 0x252f, 0x002e, 0x00de, 0x000e, 0x0005, 0x00c6, + 0x2061, 0x1800, 0x6030, 0x0110, 0xc09d, 0x0008, 0xc09c, 0x6032, + 0x00ce, 0x0005, 0x0156, 0x00d6, 0x0026, 0x0016, 0x0006, 0x2069, + 0x0140, 0x6980, 0x9116, 0x0180, 0x9112, 0x1230, 0x8212, 0x8210, + 0x22a8, 0x2001, 0x0402, 0x0018, 0x22a8, 0x2001, 0x0404, 0x680e, + 0x1f04, 0x255f, 0x680f, 0x0000, 0x000e, 0x001e, 0x002e, 0x00de, + 0x015e, 0x0005, 0x080c, 0x5113, 0xd0c4, 0x0150, 0xd0a4, 0x0140, + 0x9006, 0x0046, 0x2020, 0x2009, 0x002e, 0x080c, 0xcfe6, 0x004e, + 0x0005, 0x00f6, 0x0016, 0x0026, 0x2079, 0x0140, 0x78c4, 0xd0dc, + 0x0904, 0x25d6, 0x080c, 0x2835, 0x0660, 0x9084, 0x0700, 0x908e, + 0x0600, 0x1120, 0x2011, 0x4000, 0x900e, 0x0458, 0x908e, 0x0500, + 0x1120, 0x2011, 0x8000, 0x900e, 0x0420, 0x908e, 0x0400, 0x1120, + 0x9016, 0x2009, 0x0001, 0x00e8, 0x908e, 0x0300, 0x1120, 0x9016, + 0x2009, 0x0002, 0x00b0, 0x908e, 0x0200, 0x1120, 0x9016, 0x2009, + 0x0004, 0x0078, 0x908e, 0x0100, 0x1548, 0x9016, 0x2009, 0x0008, + 0x0040, 0x9084, 0x0700, 0x908e, 0x0300, 0x1500, 0x2011, 0x0030, + 0x0058, 0x2300, 0x9080, 0x0020, 0x2018, 0x080c, 0x7e7f, 0x928c, + 0xff00, 0x0110, 0x2011, 0x00ff, 0x2200, 0x8007, 0x9085, 0x004c, + 0x78c2, 0x2009, 0x0138, 0x220a, 0x080c, 0x6c53, 0x1118, 0x2009, + 0x193e, 0x220a, 0x002e, 0x001e, 0x00fe, 0x0005, 0x78c3, 0x0000, + 0x0cc8, 0x0126, 0x2091, 0x2800, 0x0006, 0x0016, 0x0026, 0x2001, + 0x0170, 0x200c, 0x8000, 0x2014, 0x9184, 0x0003, 0x0110, 0x080c, + 0x0db2, 0x002e, 0x001e, 0x000e, 0x012e, 0x0005, 0x2001, 0x0171, + 0x2004, 0xd0dc, 0x0168, 0x2001, 0x0170, 0x200c, 0x918c, 0x00ff, + 0x918e, 0x004c, 0x1128, 0x200c, 0x918c, 0xff00, 0x810f, 0x0005, + 0x900e, 0x2001, 0x0227, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, + 0x9108, 0x2001, 0x0226, 0x2004, 0x8007, 0x9084, 0x00ff, 0x8004, + 0x9108, 0x0005, 0x0018, 0x000c, 0x0018, 0x0020, 0x1000, 0x0800, + 0x1000, 0x1800, 0x0156, 0x0006, 0x0016, 0x0026, 0x00e6, 0x2001, + 0x195f, 0x2004, 0x908a, 0x0007, 0x1a0c, 0x0db2, 0x0033, 0x00ee, + 0x002e, 0x001e, 0x000e, 0x015e, 0x0005, 0x2634, 0x2652, 0x2676, + 0x2678, 0x26a1, 0x26a3, 0x26a5, 0x2001, 0x0001, 0x080c, 0x247f, + 0x080c, 0x2893, 0x2001, 0x1961, 0x2003, 0x0000, 0x7828, 0x9084, + 0xe1d7, 0x782a, 0x9006, 0x20a9, 0x0009, 0x080c, 0x2851, 0x2001, + 0x195f, 0x2003, 0x0006, 0x2009, 0x001e, 0x2011, 0x26a6, 0x080c, + 0x7cd9, 0x0005, 0x2009, 0x1964, 0x200b, 0x0000, 0x2001, 0x1969, + 0x2003, 0x0036, 0x2001, 0x1968, 0x2003, 0x002a, 0x2001, 0x1961, + 0x2003, 0x0001, 0x9006, 0x080c, 0x2803, 0x2001, 0xffff, 0x20a9, + 0x0009, 0x080c, 0x2851, 0x2001, 0x195f, 0x2003, 0x0006, 0x2009, + 0x001e, 0x2011, 0x26a6, 0x080c, 0x7cd9, 0x0005, 0x080c, 0x0db2, + 0x2001, 0x1969, 0x2003, 0x0036, 0x2001, 0x1961, 0x2003, 0x0003, + 0x7a38, 0x9294, 0x0005, 0x9296, 0x0004, 0x0110, 0x9006, 0x0010, + 0x2001, 0x0001, 0x080c, 0x2803, 0x2001, 0x1965, 0x2003, 0x0000, + 0x2001, 0xffff, 0x20a9, 0x0009, 0x080c, 0x2851, 0x2001, 0x195f, + 0x2003, 0x0006, 0x2009, 0x001e, 0x2011, 0x26a6, 0x080c, 0x7cd9, + 0x0005, 0x080c, 0x0db2, 0x080c, 0x0db2, 0x0005, 0x0006, 0x0016, + 0x0026, 0x00e6, 0x00f6, 0x0156, 0x0126, 0x2091, 0x8000, 0x2079, + 0x0100, 0x2001, 0x1961, 0x2004, 0x908a, 0x0007, 0x1a0c, 0x0db2, + 0x0043, 0x012e, 0x015e, 0x00fe, 0x00ee, 0x002e, 0x001e, 0x000e, + 0x0005, 0x26c8, 0x26e8, 0x2728, 0x2758, 0x277c, 0x278c, 0x278e, + 0x080c, 0x2845, 0x11b0, 0x7850, 0x9084, 0xefff, 0x7852, 0x2009, + 0x1967, 0x2104, 0x7a38, 0x9294, 0x0005, 0x9296, 0x0004, 0x0110, + 0xc08d, 0x0008, 0xc085, 0x200a, 0x2001, 0x195f, 0x2003, 0x0001, + 0x0030, 0x080c, 0x27b2, 0x2001, 0xffff, 0x080c, 0x2643, 0x0005, + 0x080c, 0x2790, 0x05e0, 0x2009, 0x1968, 0x2104, 0x8001, 0x200a, + 0x080c, 0x2845, 0x1178, 0x7850, 0x9084, 0xefff, 0x7852, 0x7a38, + 0x9294, 0x0005, 0x9296, 0x0005, 0x0518, 0x2009, 0x1967, 0x2104, + 0xc085, 0x200a, 0x2009, 0x1964, 0x2104, 0x8000, 0x200a, 0x9086, + 0x0005, 0x0118, 0x080c, 0x2798, 0x00c0, 0x200b, 0x0000, 0x7a38, + 0x9294, 0x0006, 0x9296, 0x0004, 0x0110, 0x9006, 0x0010, 0x2001, + 0x0001, 0x080c, 0x2820, 0x2001, 0x1961, 0x2003, 0x0002, 0x0028, + 0x2001, 0x195f, 0x2003, 0x0003, 0x0010, 0x080c, 0x2665, 0x0005, + 0x080c, 0x2790, 0x0560, 0x2009, 0x1968, 0x2104, 0x8001, 0x200a, + 0x080c, 0x2845, 0x1168, 0x7850, 0x9084, 0xefff, 0x7852, 0x2001, + 0x195f, 0x2003, 0x0003, 0x2001, 0x1960, 0x2003, 0x0000, 0x00b8, + 0x2009, 0x1968, 0x2104, 0x9005, 0x1118, 0x080c, 0x27d5, 0x0010, + 0x080c, 0x27a5, 0x080c, 0x2798, 0x2009, 0x1964, 0x200b, 0x0000, + 0x2001, 0x1961, 0x2003, 0x0001, 0x080c, 0x2665, 0x0000, 0x0005, + 0x04b9, 0x0508, 0x080c, 0x2845, 0x11b8, 0x7850, 0x9084, 0xefff, + 0x7852, 0x2009, 0x1965, 0x2104, 0x8000, 0x200a, 0x9086, 0x0007, + 0x0108, 0x0078, 0x2001, 0x196a, 0x2003, 0x000a, 0x2009, 0x1967, + 0x2104, 0xc0fd, 0x200a, 0x0038, 0x0419, 0x2001, 0x1961, 0x2003, + 0x0004, 0x080c, 0x2690, 0x0005, 0x0099, 0x0168, 0x080c, 0x2845, + 0x1138, 0x7850, 0x9084, 0xefff, 0x7852, 0x080c, 0x267c, 0x0018, + 0x0079, 0x080c, 0x2690, 0x0005, 0x080c, 0x0db2, 0x080c, 0x0db2, + 0x2009, 0x1969, 0x2104, 0x8001, 0x200a, 0x090c, 0x27f1, 0x0005, + 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0110, 0x9006, 0x0010, + 0x2001, 0x0001, 0x080c, 0x2820, 0x0005, 0x7a38, 0x9294, 0x0006, + 0x9296, 0x0006, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x080c, + 0x2803, 0x0005, 0x2009, 0x1964, 0x2104, 0x8000, 0x200a, 0x9086, + 0x0005, 0x0108, 0x0068, 0x200b, 0x0000, 0x7a38, 0x9294, 0x0006, + 0x9296, 0x0006, 0x0110, 0x9006, 0x0010, 0x2001, 0x0001, 0x04d9, + 0x7a38, 0x9294, 0x0005, 0x9296, 0x0005, 0x0110, 0x9006, 0x0010, + 0x2001, 0x0001, 0x080c, 0x2820, 0x0005, 0x0086, 0x2001, 0x1967, + 0x2004, 0x9084, 0x7fff, 0x090c, 0x0db2, 0x2009, 0x1966, 0x2144, + 0x8846, 0x280a, 0x9844, 0x0dd8, 0xd08c, 0x1120, 0xd084, 0x1120, + 0x080c, 0x0db2, 0x9006, 0x0010, 0x2001, 0x0001, 0x00a1, 0x008e, + 0x0005, 0x0006, 0x0156, 0x2001, 0x195f, 0x20a9, 0x0009, 0x2003, + 0x0000, 0x8000, 0x1f04, 0x27f7, 0x2001, 0x1966, 0x2003, 0x8000, + 0x015e, 0x000e, 0x0005, 0x00f6, 0x2079, 0x0100, 0x9085, 0x0000, + 0x0158, 0x7838, 0x9084, 0xfff9, 0x9085, 0x0004, 0x783a, 0x2009, + 0x196c, 0x210c, 0x795a, 0x0050, 0x7838, 0x9084, 0xfffb, 0x9085, + 0x0006, 0x783a, 0x2009, 0x196d, 0x210c, 0x795a, 0x00fe, 0x0005, + 0x00f6, 0x2079, 0x0100, 0x9085, 0x0000, 0x0138, 0x7838, 0x9084, + 0xfffa, 0x9085, 0x0004, 0x783a, 0x0030, 0x7838, 0x9084, 0xfffb, + 0x9085, 0x0005, 0x783a, 0x00fe, 0x0005, 0x0006, 0x2001, 0x0100, + 0x2004, 0x9082, 0x0007, 0x000e, 0x0005, 0x0006, 0x2001, 0x0100, + 0x2004, 0x9082, 0x0009, 0x000e, 0x0005, 0x0156, 0x20a9, 0x0064, + 0x7820, 0x080c, 0x28d0, 0xd09c, 0x1110, 0x1f04, 0x2848, 0x015e, + 0x0005, 0x0126, 0x0016, 0x0006, 0x2091, 0x8000, 0x7850, 0x9085, + 0x0040, 0x7852, 0x7850, 0x9084, 0xfbcf, 0x7852, 0x080c, 0x28d0, + 0x9085, 0x2000, 0x7852, 0x000e, 0x2008, 0x9186, 0x0000, 0x1118, + 0x783b, 0x0007, 0x0090, 0x9186, 0x0001, 0x1118, 0x783b, 0x0006, + 0x0060, 0x9186, 0x0002, 0x1118, 0x783b, 0x0005, 0x0030, 0x9186, + 0x0003, 0x1118, 0x783b, 0x0004, 0x0000, 0x0006, 0x1d04, 0x287e, + 0x080c, 0x7cfb, 0x1f04, 0x287e, 0x7850, 0x9085, 0x0400, 0x9084, + 0xdfbf, 0x7852, 0x080c, 0x28d0, 0x9085, 0x1000, 0x7852, 0x000e, + 0x001e, 0x012e, 0x0005, 0x7850, 0x9084, 0xffcf, 0x7852, 0x0005, + 0x0006, 0x0156, 0x00f6, 0x2079, 0x0100, 0x20a9, 0x000a, 0x7854, + 0xd0ac, 0x1130, 0x7820, 0xd0e4, 0x1140, 0x1f04, 0x28a2, 0x0028, + 0x7854, 0xd08c, 0x1110, 0x1f04, 0x28a8, 0x00fe, 0x015e, 0x000e, + 0x0005, 0x1d04, 0x28b1, 0x080c, 0x7cfb, 0x1f04, 0x28b1, 0x0005, + 0x0006, 0x2001, 0x196b, 0x2004, 0x9086, 0x0000, 0x000e, 0x0005, + 0x0006, 0x2001, 0x196b, 0x2004, 0x9086, 0x0001, 0x000e, 0x0005, + 0x0006, 0x2001, 0x196b, 0x2004, 0x9086, 0x0002, 0x000e, 0x0005, + 0xa001, 0xa001, 0xa001, 0xa001, 0xa001, 0x0005, 0x0006, 0x2001, + 0x1977, 0x2102, 0x000e, 0x0005, 0x2009, 0x0171, 0x2104, 0xd0dc, + 0x0140, 0x2009, 0x0170, 0x2104, 0x200b, 0x0080, 0xa001, 0xa001, + 0x200a, 0x0005, 0x0036, 0x0046, 0x2001, 0x0141, 0x200c, 0x918c, + 0xff00, 0x9186, 0x2000, 0x0118, 0x9186, 0x0100, 0x1588, 0x2009, + 0x017f, 0x200b, 0x00a2, 0x2019, 0x0160, 0x2324, 0x2011, 0x0003, + 0x2009, 0x0169, 0x2104, 0x9084, 0x0007, 0x210c, 0x918c, 0x0007, + 0x910e, 0x1db0, 0x9086, 0x0003, 0x11b8, 0x2304, 0x9402, 0x02a0, + 0x1d60, 0x8211, 0x1d68, 0x84ff, 0x0170, 0x2001, 0x0141, 0x200c, + 0x918c, 0xff00, 0x9186, 0x0100, 0x0130, 0x2009, 0x180c, 0x2104, + 0xc0dd, 0x200a, 0x0008, 0x0419, 0x2001, 0x017f, 0x2003, 0x0000, + 0x004e, 0x003e, 0x0005, 0x2001, 0x180c, 0x2004, 0xd0dc, 0x01b0, + 0x2001, 0x0160, 0x2004, 0x9005, 0x0140, 0x2001, 0x0141, 0x2004, + 0x9084, 0xff00, 0x9086, 0x0100, 0x1148, 0x0126, 0x2091, 0x8000, + 0x0016, 0x0026, 0x0021, 0x002e, 0x001e, 0x012e, 0x0005, 0x00c6, + 0x2061, 0x0100, 0x6014, 0x0006, 0x2001, 0x0161, 0x2003, 0x0000, + 0x6017, 0x0018, 0xa001, 0xa001, 0x602f, 0x0008, 0x6104, 0x918e, + 0x0010, 0x6106, 0x918e, 0x0010, 0x6106, 0x6017, 0x0040, 0x04b9, + 0x001e, 0x9184, 0x0003, 0x01e0, 0x0036, 0x0016, 0x2019, 0x0141, + 0x6124, 0x918c, 0x0028, 0x1120, 0x2304, 0x9084, 0x2800, 0x0dc0, + 0x001e, 0x919c, 0xffe4, 0x9184, 0x0001, 0x0118, 0x9385, 0x0009, + 0x6016, 0x9184, 0x0002, 0x0118, 0x9385, 0x0012, 0x6016, 0x003e, + 0x2001, 0x180c, 0x200c, 0xc1dc, 0x2102, 0x00ce, 0x0005, 0x0016, + 0x0026, 0x080c, 0x6c6d, 0x0108, 0xc0bc, 0x2009, 0x0140, 0x2114, + 0x9294, 0x0001, 0x9215, 0x220a, 0x002e, 0x001e, 0x0005, 0x0016, + 0x0026, 0x2009, 0x0140, 0x2114, 0x9294, 0x0001, 0x9285, 0x1000, + 0x200a, 0x220a, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026, 0x2009, + 0x0140, 0x2114, 0x9294, 0x0001, 0x9215, 0x220a, 0x002e, 0x001e, + 0x0005, 0x0006, 0x0016, 0x2009, 0x0140, 0x2104, 0x1110, 0xc0bc, + 0x0008, 0xc0bd, 0x200a, 0x001e, 0x000e, 0x0005, 0x2c2a, 0x2c2a, + 0x2a4e, 0x2a4e, 0x2a5a, 0x2a5a, 0x2a66, 0x2a66, 0x2a74, 0x2a74, + 0x2a80, 0x2a80, 0x2a8e, 0x2a8e, 0x2a9c, 0x2a9c, 0x2aae, 0x2aae, + 0x2aba, 0x2aba, 0x2ac8, 0x2ac8, 0x2ae6, 0x2ae6, 0x2b06, 0x2b06, + 0x2ad6, 0x2ad6, 0x2af6, 0x2af6, 0x2b14, 0x2b14, 0x2aac, 0x2aac, + 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, + 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, + 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, + 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2b26, 0x2b26, + 0x2b32, 0x2b32, 0x2b40, 0x2b40, 0x2b4e, 0x2b4e, 0x2b5e, 0x2b5e, + 0x2b6c, 0x2b6c, 0x2b7c, 0x2b7c, 0x2b8c, 0x2b8c, 0x2b9e, 0x2b9e, + 0x2bac, 0x2bac, 0x2bbc, 0x2bbc, 0x2bde, 0x2bde, 0x2c00, 0x2c00, + 0x2bcc, 0x2bcc, 0x2bef, 0x2bef, 0x2c0f, 0x2c0f, 0x2aac, 0x2aac, + 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, + 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, + 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, + 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, + 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, + 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x2aac, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2184, + 0x0804, 0x2c22, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x1f9f, 0x0804, 0x2c22, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f9f, + 0x080c, 0x2184, 0x0804, 0x2c22, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1fd7, 0x0804, 0x2c22, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x2184, 0x080c, 0x1fd7, 0x0804, 0x2c22, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f9f, + 0x080c, 0x1fd7, 0x0804, 0x2c22, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f9f, 0x080c, 0x2184, + 0x080c, 0x1fd7, 0x0804, 0x2c22, 0xa001, 0x0cf0, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x12d6, + 0x0804, 0x2c22, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x2184, 0x080c, 0x12d6, 0x0804, 0x2c22, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x1f9f, 0x080c, 0x12d6, 0x0804, 0x2c22, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x2184, + 0x080c, 0x12d6, 0x080c, 0x1fd7, 0x0804, 0x2c22, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f9f, + 0x080c, 0x2184, 0x080c, 0x12d6, 0x0804, 0x2c22, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f9f, + 0x080c, 0x12d6, 0x080c, 0x1fd7, 0x0804, 0x2c22, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x12d6, + 0x080c, 0x1fd7, 0x0804, 0x2c22, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x1f9f, 0x080c, 0x2184, + 0x080c, 0x12d6, 0x080c, 0x1fd7, 0x0804, 0x2c22, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x25d9, + 0x0804, 0x2c22, 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, + 0x0146, 0x0156, 0x080c, 0x25d9, 0x080c, 0x2184, 0x0804, 0x2c22, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x25d9, 0x080c, 0x1f9f, 0x0804, 0x2c22, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x25d9, + 0x080c, 0x1f9f, 0x080c, 0x2184, 0x0804, 0x2c22, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x25d9, + 0x080c, 0x1fd7, 0x0804, 0x2c22, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x25d9, 0x080c, 0x2184, + 0x080c, 0x1fd7, 0x0804, 0x2c22, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x25d9, 0x080c, 0x1f9f, + 0x080c, 0x1fd7, 0x0804, 0x2c22, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x25d9, 0x080c, 0x1f9f, + 0x080c, 0x2184, 0x080c, 0x1fd7, 0x0804, 0x2c22, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x25d9, + 0x080c, 0x12d6, 0x0804, 0x2c22, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x25d9, 0x080c, 0x2184, + 0x080c, 0x12d6, 0x0804, 0x2c22, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x25d9, 0x080c, 0x1f9f, + 0x080c, 0x12d6, 0x0804, 0x2c22, 0x0106, 0x0006, 0x0126, 0x01c6, + 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x25d9, 0x080c, 0x2184, + 0x080c, 0x12d6, 0x080c, 0x1fd7, 0x0804, 0x2c22, 0x0106, 0x0006, + 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, 0x25d9, + 0x080c, 0x1f9f, 0x080c, 0x2184, 0x080c, 0x12d6, 0x0498, 0x0106, + 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, + 0x25d9, 0x080c, 0x1f9f, 0x080c, 0x12d6, 0x080c, 0x1fd7, 0x0410, + 0x0106, 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, + 0x080c, 0x25d9, 0x080c, 0x12d6, 0x080c, 0x1fd7, 0x0098, 0x0106, + 0x0006, 0x0126, 0x01c6, 0x01d6, 0x0136, 0x0146, 0x0156, 0x080c, + 0x25d9, 0x080c, 0x1f9f, 0x080c, 0x2184, 0x080c, 0x12d6, 0x080c, + 0x1fd7, 0x0000, 0x015e, 0x014e, 0x013e, 0x01de, 0x01ce, 0x012e, + 0x000e, 0x010e, 0x000d, 0x00b6, 0x00c6, 0x0026, 0x0046, 0x9026, + 0x080c, 0x6262, 0x1904, 0x2d17, 0x72d4, 0x2001, 0x194d, 0x2004, + 0x9005, 0x1110, 0xd29c, 0x0148, 0xd284, 0x1138, 0xd2bc, 0x1904, + 0x2d17, 0x080c, 0x2d1c, 0x0804, 0x2d17, 0xd2cc, 0x1904, 0x2d17, + 0x080c, 0x6c53, 0x1120, 0x70a7, 0xffff, 0x0804, 0x2d17, 0xd294, + 0x0120, 0x70a7, 0xffff, 0x0804, 0x2d17, 0x080c, 0x2f81, 0x0160, + 0x080c, 0xbcec, 0x0128, 0x2001, 0x1816, 0x203c, 0x0804, 0x2cb5, + 0x70a7, 0xffff, 0x0804, 0x2d17, 0x2001, 0x1816, 0x203c, 0x728c, + 0xd284, 0x0904, 0x2cb5, 0xd28c, 0x1904, 0x2cb5, 0x0036, 0x73a4, + 0x938e, 0xffff, 0x1110, 0x2019, 0x0001, 0x8314, 0x92e0, 0x1c80, + 0x2c04, 0x938c, 0x0001, 0x0120, 0x9084, 0xff00, 0x8007, 0x0010, + 0x9084, 0x00ff, 0x970e, 0x0540, 0x908e, 0x0000, 0x0528, 0x908e, + 0x00ff, 0x1150, 0x7230, 0xd284, 0x1518, 0x728c, 0xc28d, 0x728e, + 0x70a7, 0xffff, 0x003e, 0x0408, 0x900e, 0x080c, 0x24d6, 0x080c, + 0x5f1e, 0x11a0, 0x080c, 0x62a4, 0x1150, 0x7030, 0xd08c, 0x0118, + 0xb800, 0xd0bc, 0x0120, 0x080c, 0x2d35, 0x0140, 0x0028, 0x080c, + 0x2e71, 0x080c, 0x2d61, 0x0110, 0x8318, 0x0838, 0x73a6, 0x0010, + 0x70a7, 0xffff, 0x003e, 0x0804, 0x2d17, 0x9780, 0x2f92, 0x203d, + 0x97bc, 0xff00, 0x873f, 0x2041, 0x007e, 0x70a4, 0x9096, 0xffff, + 0x1118, 0x900e, 0x28a8, 0x0050, 0x9812, 0x0220, 0x2008, 0x9802, + 0x20a8, 0x0020, 0x70a7, 0xffff, 0x0804, 0x2d17, 0x2700, 0x0156, + 0x0016, 0x9106, 0x05c8, 0xc484, 0x080c, 0x5f7e, 0x0138, 0x080c, + 0xbcec, 0x1590, 0x080c, 0x5f1e, 0x15b8, 0x0008, 0xc485, 0x080c, + 0x62a4, 0x1130, 0x7030, 0xd08c, 0x01f8, 0xb800, 0xd0bc, 0x11e0, + 0x728c, 0xd28c, 0x0180, 0x080c, 0x62a4, 0x9082, 0x0006, 0x02e0, + 0xd484, 0x1118, 0x080c, 0x5f42, 0x0028, 0x080c, 0x2efd, 0x01a0, + 0x080c, 0x2f28, 0x0088, 0x080c, 0x2e71, 0x080c, 0xbcec, 0x1160, + 0x080c, 0x2d61, 0x0188, 0x0040, 0x080c, 0xbcec, 0x1118, 0x080c, + 0x2efd, 0x0110, 0x0451, 0x0140, 0x001e, 0x8108, 0x015e, 0x1f04, + 0x2cce, 0x70a7, 0xffff, 0x0018, 0x001e, 0x015e, 0x71a6, 0x004e, + 0x002e, 0x00ce, 0x00be, 0x0005, 0x00c6, 0x0016, 0x70a7, 0x0001, + 0x2009, 0x007e, 0x080c, 0x5f1e, 0x1168, 0xb813, 0x00ff, 0xb817, + 0xfffe, 0x080c, 0x2e71, 0x04a9, 0x0128, 0x70d4, 0xc0bd, 0x70d6, + 0x080c, 0xba40, 0x001e, 0x00ce, 0x0005, 0x0016, 0x0076, 0x00d6, + 0x00c6, 0x2001, 0x1858, 0x2004, 0x9084, 0x00ff, 0xb842, 0x080c, + 0x9a23, 0x01d0, 0x2b00, 0x6012, 0x080c, 0xba69, 0x6023, 0x0001, + 0x9006, 0x080c, 0x5ebb, 0x2001, 0x0000, 0x080c, 0x5ecf, 0x0126, + 0x2091, 0x8000, 0x70a0, 0x8000, 0x70a2, 0x012e, 0x2009, 0x0004, + 0x080c, 0x9a50, 0x9085, 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, + 0x0005, 0x0016, 0x0076, 0x00d6, 0x00c6, 0x2001, 0x1858, 0x2004, + 0x9084, 0x00ff, 0xb842, 0x080c, 0x9a23, 0x0548, 0x2b00, 0x6012, + 0xb800, 0xc0c4, 0xb802, 0xb8a0, 0x9086, 0x007e, 0x0140, 0xb804, + 0x9084, 0x00ff, 0x9086, 0x0006, 0x1110, 0x080c, 0x2e30, 0x080c, + 0xba69, 0x6023, 0x0001, 0x9006, 0x080c, 0x5ebb, 0x2001, 0x0002, + 0x080c, 0x5ecf, 0x0126, 0x2091, 0x8000, 0x70a0, 0x8000, 0x70a2, + 0x012e, 0x2009, 0x0002, 0x080c, 0x9a50, 0x9085, 0x0001, 0x00ce, + 0x00de, 0x007e, 0x001e, 0x0005, 0x00b6, 0x00c6, 0x0026, 0x2009, + 0x0080, 0x080c, 0x5f1e, 0x1140, 0xb813, 0x00ff, 0xb817, 0xfffc, + 0x0039, 0x0110, 0x70db, 0xffff, 0x002e, 0x00ce, 0x00be, 0x0005, + 0x0016, 0x0076, 0x00d6, 0x00c6, 0x080c, 0x9980, 0x01d0, 0x2b00, + 0x6012, 0x080c, 0xba69, 0x6023, 0x0001, 0x9006, 0x080c, 0x5ebb, + 0x2001, 0x0002, 0x080c, 0x5ecf, 0x0126, 0x2091, 0x8000, 0x70dc, + 0x8000, 0x70de, 0x012e, 0x2009, 0x0002, 0x080c, 0x9a50, 0x9085, + 0x0001, 0x00ce, 0x00de, 0x007e, 0x001e, 0x0005, 0x00c6, 0x00d6, + 0x0126, 0x2091, 0x8000, 0x2009, 0x007f, 0x080c, 0x5f1e, 0x11b8, + 0xb813, 0x00ff, 0xb817, 0xfffd, 0xb8bf, 0x0004, 0x080c, 0x9980, + 0x0170, 0x2b00, 0x6012, 0x6316, 0x6023, 0x0001, 0x620a, 0x080c, + 0xba69, 0x2009, 0x0022, 0x080c, 0x9a50, 0x9085, 0x0001, 0x012e, + 0x00de, 0x00ce, 0x0005, 0x00e6, 0x00c6, 0x0066, 0x0036, 0x0026, + 0x00b6, 0x21f0, 0x080c, 0x818b, 0x080c, 0x811a, 0x080c, 0x9819, + 0x080c, 0xa893, 0x3e08, 0x2130, 0x81ff, 0x0120, 0x20a9, 0x007e, + 0x900e, 0x0018, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x5f7e, + 0x1140, 0x9686, 0x0002, 0x1118, 0xb800, 0xd0bc, 0x1110, 0x080c, + 0x5a3b, 0x001e, 0x8108, 0x1f04, 0x2e15, 0x9686, 0x0001, 0x190c, + 0x2f55, 0x00be, 0x002e, 0x003e, 0x006e, 0x00ce, 0x00ee, 0x0005, + 0x00e6, 0x00c6, 0x0036, 0x0026, 0x0016, 0x00b6, 0x6210, 0x2258, + 0xbaa0, 0x0026, 0x2019, 0x0029, 0x080c, 0x8180, 0x0076, 0x2039, + 0x0000, 0x080c, 0x8078, 0x2c08, 0x080c, 0xcd62, 0x007e, 0x001e, + 0xba10, 0xbb14, 0x080c, 0x5a3b, 0xba12, 0xbb16, 0x00be, 0x001e, + 0x002e, 0x003e, 0x00ce, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x00b6, + 0x6010, 0x2058, 0xb8a0, 0x00be, 0x9086, 0x0080, 0x0150, 0x2071, + 0x1800, 0x70a0, 0x9005, 0x0110, 0x8001, 0x70a2, 0x000e, 0x00ee, + 0x0005, 0x2071, 0x1800, 0x70dc, 0x9005, 0x0dc0, 0x8001, 0x70de, + 0x0ca8, 0xb800, 0xc08c, 0xb802, 0x0005, 0x00f6, 0x00e6, 0x00c6, + 0x00b6, 0x0036, 0x0026, 0x0016, 0x0156, 0x2178, 0x81ff, 0x1118, + 0x20a9, 0x0001, 0x0088, 0x080c, 0x5113, 0xd0c4, 0x0150, 0xd0a4, + 0x0140, 0x9006, 0x0046, 0x2020, 0x2009, 0x002d, 0x080c, 0xcfe6, + 0x004e, 0x20a9, 0x0800, 0x9016, 0x0026, 0x928e, 0x007e, 0x0904, + 0x2edd, 0x928e, 0x007f, 0x0904, 0x2edd, 0x928e, 0x0080, 0x05e8, + 0x9288, 0x1000, 0x210c, 0x81ff, 0x05c0, 0x8fff, 0x1148, 0x2001, + 0x195d, 0x0006, 0x2003, 0x0001, 0x04e9, 0x000e, 0x2003, 0x0000, + 0x00b6, 0x00c6, 0x2158, 0x2001, 0x0001, 0x080c, 0x626e, 0x00ce, + 0x00be, 0x2019, 0x0029, 0x080c, 0x8180, 0x0076, 0x2039, 0x0000, + 0x080c, 0x8078, 0x00b6, 0x00c6, 0x0026, 0x2158, 0xba04, 0x9294, + 0x00ff, 0x9286, 0x0006, 0x1118, 0xb807, 0x0404, 0x0028, 0x2001, + 0x0004, 0x8007, 0x9215, 0xba06, 0x002e, 0x00ce, 0x00be, 0x0016, + 0x2c08, 0x080c, 0xcd62, 0x001e, 0x007e, 0x002e, 0x8210, 0x1f04, + 0x2e94, 0x015e, 0x001e, 0x002e, 0x003e, 0x00be, 0x00ce, 0x00ee, + 0x00fe, 0x0005, 0x0046, 0x0026, 0x0016, 0x080c, 0x5113, 0xd0c4, + 0x0140, 0xd0a4, 0x0130, 0x9006, 0x2220, 0x2009, 0x0029, 0x080c, + 0xcfe6, 0x001e, 0x002e, 0x004e, 0x0005, 0x0016, 0x0026, 0x0036, + 0x00c6, 0x728c, 0x82ff, 0x01e8, 0x080c, 0x629c, 0x11d0, 0x2100, + 0x080c, 0x2509, 0x81ff, 0x01b8, 0x2019, 0x0001, 0x8314, 0x92e0, + 0x1c80, 0x2c04, 0xd384, 0x0120, 0x9084, 0xff00, 0x8007, 0x0010, + 0x9084, 0x00ff, 0x9116, 0x0138, 0x9096, 0x00ff, 0x0110, 0x8318, + 0x0c68, 0x9085, 0x0001, 0x00ce, 0x003e, 0x002e, 0x001e, 0x0005, + 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x0036, 0x2019, 0x0029, + 0x00a9, 0x003e, 0x9180, 0x1000, 0x2004, 0x9065, 0x0158, 0x0016, + 0x00c6, 0x2061, 0x1a73, 0x001e, 0x6112, 0x080c, 0x2e30, 0x001e, + 0x080c, 0x5f42, 0x012e, 0x00ce, 0x001e, 0x0005, 0x0016, 0x0026, + 0x2110, 0x080c, 0x94b5, 0x080c, 0xd29b, 0x002e, 0x001e, 0x0005, + 0x2001, 0x1835, 0x2004, 0xd0cc, 0x0005, 0x00c6, 0x00b6, 0x080c, + 0x6c53, 0x1118, 0x20a9, 0x0800, 0x0010, 0x20a9, 0x0782, 0x080c, + 0x6c53, 0x1110, 0x900e, 0x0010, 0x2009, 0x007e, 0x9180, 0x1000, + 0x2004, 0x905d, 0x0130, 0x86ff, 0x0110, 0xb800, 0xd0bc, 0x090c, + 0x5f42, 0x8108, 0x1f04, 0x2f66, 0x2061, 0x1800, 0x6077, 0x0000, + 0x6078, 0x9084, 0x00ff, 0x607a, 0x60ab, 0x0000, 0x00be, 0x00ce, + 0x0005, 0x2001, 0x1875, 0x2004, 0xd0bc, 0x0005, 0x2011, 0x1854, + 0x2214, 0xd2ec, 0x0005, 0x0026, 0x2011, 0x1873, 0x2214, 0xd2dc, + 0x002e, 0x0005, 0x7eef, 0x7de8, 0x7ce4, 0x80e2, 0x7be1, 0x80e0, + 0x80dc, 0x80da, 0x7ad9, 0x80d6, 0x80d5, 0x80d4, 0x80d3, 0x80d2, + 0x80d1, 0x79ce, 0x78cd, 0x80cc, 0x80cb, 0x80ca, 0x80c9, 0x80c7, + 0x80c6, 0x77c5, 0x76c3, 0x80bc, 0x80ba, 0x75b9, 0x80b6, 0x74b5, + 0x73b4, 0x72b3, 0x80b2, 0x80b1, 0x80ae, 0x71ad, 0x80ac, 0x70ab, + 0x6faa, 0x6ea9, 0x80a7, 0x6da6, 0x6ca5, 0x6ba3, 0x6a9f, 0x699e, + 0x689d, 0x809b, 0x8098, 0x6797, 0x6690, 0x658f, 0x6488, 0x6384, + 0x6282, 0x8081, 0x8080, 0x617c, 0x607a, 0x8079, 0x5f76, 0x8075, + 0x8074, 0x8073, 0x8072, 0x8071, 0x806e, 0x5e6d, 0x806c, 0x5d6b, + 0x5c6a, 0x5b69, 0x8067, 0x5a66, 0x5965, 0x5863, 0x575c, 0x565a, + 0x5559, 0x8056, 0x8055, 0x5454, 0x5353, 0x5252, 0x5151, 0x504e, + 0x4f4d, 0x804c, 0x804b, 0x4e4a, 0x4d49, 0x8047, 0x4c46, 0x8045, + 0x8043, 0x803c, 0x803a, 0x8039, 0x8036, 0x4b35, 0x8034, 0x4a33, + 0x4932, 0x4831, 0x802e, 0x472d, 0x462c, 0x452b, 0x442a, 0x4329, + 0x4227, 0x8026, 0x8025, 0x4123, 0x401f, 0x3f1e, 0x3e1d, 0x3d1b, + 0x3c18, 0x8017, 0x8010, 0x3b0f, 0x3a08, 0x8004, 0x3902, 0x8001, + 0x8000, 0x8000, 0x3800, 0x3700, 0x3600, 0x8000, 0x3500, 0x8000, + 0x8000, 0x8000, 0x3400, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x8000, 0x3300, 0x3200, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x8000, 0x3100, 0x3000, 0x8000, 0x8000, 0x2f00, 0x8000, 0x2e00, + 0x2d00, 0x2c00, 0x8000, 0x8000, 0x8000, 0x2b00, 0x8000, 0x2a00, + 0x2900, 0x2800, 0x8000, 0x2700, 0x2600, 0x2500, 0x2400, 0x2300, + 0x2200, 0x8000, 0x8000, 0x2100, 0x2000, 0x1f00, 0x1e00, 0x1d00, + 0x1c00, 0x8000, 0x8000, 0x1b00, 0x1a00, 0x8000, 0x1900, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x1800, 0x8000, 0x1700, + 0x1600, 0x1500, 0x8000, 0x1400, 0x1300, 0x1200, 0x1100, 0x1000, + 0x0f00, 0x8000, 0x8000, 0x0e00, 0x0d00, 0x0c00, 0x0b00, 0x0a00, + 0x0900, 0x8000, 0x8000, 0x0800, 0x0700, 0x8000, 0x0600, 0x8000, + 0x8000, 0x8000, 0x0500, 0x0400, 0x0300, 0x8000, 0x0200, 0x8000, + 0x8000, 0x8000, 0x0100, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x8000, 0x0000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, + 0x8000, 0x8000, 0x2071, 0x1894, 0x7003, 0x0002, 0x9006, 0x7016, + 0x701a, 0x704a, 0x704e, 0x700e, 0x7042, 0x7046, 0x703b, 0x18b0, + 0x703f, 0x18b0, 0x7007, 0x0001, 0x080c, 0x0fee, 0x090c, 0x0db2, + 0x2900, 0x706a, 0xa867, 0x0002, 0xa8ab, 0xdcb0, 0x080c, 0x0fee, + 0x090c, 0x0db2, 0x2900, 0x706e, 0xa867, 0x0002, 0xa8ab, 0xdcb0, + 0x0005, 0x2071, 0x1894, 0x7004, 0x0002, 0x30c1, 0x30c2, 0x30d5, + 0x30e9, 0x0005, 0x1004, 0x30d2, 0x0e04, 0x30d2, 0x2079, 0x0000, + 0x0126, 0x2091, 0x8000, 0x700c, 0x9005, 0x1128, 0x700f, 0x0001, + 0x012e, 0x0468, 0x0005, 0x012e, 0x0ce8, 0x2079, 0x0000, 0x2061, + 0x18ae, 0x2c4c, 0xa86c, 0x908e, 0x0100, 0x0128, 0x9086, 0x0200, + 0x0904, 0x31bd, 0x0005, 0x7018, 0x2048, 0x2061, 0x1800, 0x701c, + 0x0807, 0x7014, 0x2048, 0xa864, 0x9094, 0x00ff, 0x9296, 0x0029, + 0x1120, 0xaa78, 0xd2fc, 0x0128, 0x0005, 0x9086, 0x0103, 0x0108, + 0x0005, 0x2079, 0x0000, 0x2061, 0x1800, 0x701c, 0x0807, 0x2061, + 0x1800, 0x7880, 0x908a, 0x0040, 0x1210, 0x61c8, 0x0042, 0x2100, + 0x908a, 0x003f, 0x1a04, 0x31ba, 0x61c8, 0x0804, 0x314f, 0x3191, + 0x31c9, 0x31d3, 0x31d7, 0x31e1, 0x31e7, 0x31eb, 0x31fb, 0x31fe, + 0x3208, 0x320d, 0x3212, 0x321d, 0x3228, 0x3237, 0x3246, 0x3254, + 0x326b, 0x3286, 0x31ba, 0x332f, 0x336d, 0x3413, 0x3424, 0x3447, + 0x31ba, 0x31ba, 0x31ba, 0x347f, 0x349b, 0x34a4, 0x34d3, 0x34d9, + 0x31ba, 0x351f, 0x31ba, 0x31ba, 0x31ba, 0x31ba, 0x31ba, 0x352a, + 0x3533, 0x353b, 0x353d, 0x31ba, 0x31ba, 0x31ba, 0x31ba, 0x31ba, + 0x31ba, 0x3569, 0x31ba, 0x31ba, 0x31ba, 0x31ba, 0x31ba, 0x3586, + 0x35e1, 0x31ba, 0x31ba, 0x31ba, 0x31ba, 0x31ba, 0x31ba, 0x0002, + 0x360b, 0x360e, 0x366d, 0x3686, 0x36b6, 0x3954, 0x31ba, 0x4cec, + 0x31ba, 0x31ba, 0x31ba, 0x31ba, 0x31ba, 0x31ba, 0x31ba, 0x31ba, + 0x3208, 0x320d, 0x3e75, 0x31ba, 0x3e8b, 0x4d7b, 0x4dcc, 0x4ecf, + 0x31ba, 0x4f31, 0x4f6d, 0x4f9e, 0x50a2, 0x4fcb, 0x5022, 0x31ba, + 0x3e8f, 0x404f, 0x4065, 0x408a, 0x40ef, 0x4163, 0x4183, 0x41fa, + 0x420b, 0x421c, 0x421f, 0x4244, 0x42b7, 0x431d, 0x4325, 0x4457, + 0x459c, 0x45d0, 0x4834, 0x31ba, 0x4852, 0x48fe, 0x49d4, 0x31ba, + 0x31ba, 0x31ba, 0x31ba, 0x4a3a, 0x4a55, 0x4325, 0x4c9b, 0x714c, + 0x0000, 0x2021, 0x4000, 0x080c, 0x464e, 0x0126, 0x2091, 0x8000, + 0x0e04, 0x319b, 0x0010, 0x012e, 0x0cc0, 0x7c36, 0x9486, 0x4000, + 0x0118, 0x7833, 0x0011, 0x0010, 0x7833, 0x0010, 0x7c82, 0x7986, + 0x7a8a, 0x7b8e, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, + 0x190c, 0x1167, 0x7007, 0x0001, 0x2091, 0x5000, 0x700f, 0x0000, + 0x012e, 0x0005, 0x2021, 0x4001, 0x08b0, 0x2021, 0x4002, 0x0898, + 0x2021, 0x4003, 0x0880, 0x2021, 0x4005, 0x0868, 0x2021, 0x4006, + 0x0850, 0x2039, 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884, + 0x7990, 0x0804, 0x465b, 0x7883, 0x0004, 0x7884, 0x0807, 0x2039, + 0x0001, 0x902e, 0x2520, 0x7b88, 0x7a8c, 0x7884, 0x7990, 0x0804, + 0x465e, 0x7984, 0x7888, 0x2114, 0x200a, 0x0804, 0x3191, 0x7984, + 0x2114, 0x0804, 0x3191, 0x20e1, 0x0000, 0x2099, 0x0021, 0x20e9, + 0x0000, 0x20a1, 0x0021, 0x20a9, 0x001f, 0x4003, 0x7984, 0x7a88, + 0x7b8c, 0x0804, 0x3191, 0x7884, 0x2060, 0x04d8, 0x2009, 0x0003, + 0x2011, 0x0002, 0x2019, 0x0012, 0x789b, 0x0117, 0x0804, 0x3191, + 0x2039, 0x0001, 0x7d98, 0x7c9c, 0x0800, 0x2039, 0x0001, 0x7d98, + 0x7c9c, 0x0848, 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x31c6, + 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x31cd, 0x79a0, 0x9182, 0x0040, + 0x0210, 0x0804, 0x31c6, 0x2138, 0x7d98, 0x7c9c, 0x0804, 0x31db, + 0x79a0, 0x9182, 0x0040, 0x0210, 0x0804, 0x31c6, 0x21e8, 0x7984, + 0x7888, 0x20a9, 0x0001, 0x21a0, 0x4004, 0x0804, 0x3191, 0x2061, + 0x0800, 0xe10c, 0x9006, 0x2c15, 0x9200, 0x8c60, 0x8109, 0x1dd8, + 0x2010, 0x9005, 0x0904, 0x3191, 0x0804, 0x31c0, 0x79a0, 0x9182, + 0x0040, 0x0210, 0x0804, 0x31c6, 0x21e0, 0x20a9, 0x0001, 0x7984, + 0x2198, 0x4012, 0x0804, 0x3191, 0x2069, 0x1853, 0x7884, 0x7990, + 0x911a, 0x1a04, 0x31c6, 0x8019, 0x0904, 0x31c6, 0x684a, 0x6942, + 0x788c, 0x6852, 0x7888, 0x6856, 0x9006, 0x685a, 0x685e, 0x080c, + 0x6f5b, 0x0804, 0x3191, 0x2069, 0x1853, 0x7884, 0x7994, 0x911a, + 0x1a04, 0x31c6, 0x8019, 0x0904, 0x31c6, 0x684e, 0x6946, 0x788c, + 0x6862, 0x7888, 0x6866, 0x9006, 0x686a, 0x686e, 0x0126, 0x2091, + 0x8000, 0x080c, 0x630e, 0x012e, 0x0804, 0x3191, 0x902e, 0x2520, + 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x31c3, 0x7984, 0x7b88, + 0x7a8c, 0x20a9, 0x0005, 0x20e9, 0x0001, 0x20a1, 0x189c, 0x4101, + 0x080c, 0x4612, 0x1120, 0x2009, 0x0002, 0x0804, 0x31c3, 0x2009, + 0x0020, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x465b, 0x701f, + 0x32aa, 0x0005, 0xa864, 0x2008, 0x9084, 0x00ff, 0x9096, 0x0011, + 0x0168, 0x9096, 0x0019, 0x0150, 0x9096, 0x0015, 0x0138, 0x9096, + 0x0048, 0x0120, 0x9096, 0x0029, 0x1904, 0x31c3, 0x810f, 0x918c, + 0x00ff, 0x0904, 0x31c3, 0x7112, 0x7010, 0x8001, 0x0560, 0x7012, + 0x080c, 0x4612, 0x1120, 0x2009, 0x0002, 0x0804, 0x31c3, 0x2009, + 0x0020, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494, 0xa598, 0x9290, + 0x0040, 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000, 0xa85c, + 0x9080, 0x0019, 0xaf60, 0x080c, 0x465b, 0x701f, 0x32e8, 0x0005, + 0xa864, 0x9084, 0x00ff, 0x9096, 0x0002, 0x0120, 0x9096, 0x000a, + 0x1904, 0x31c3, 0x0888, 0x7014, 0x2048, 0xa868, 0xc0fd, 0xa86a, + 0xa864, 0x9084, 0x00ff, 0x9096, 0x0029, 0x1160, 0xc2fd, 0xaa7a, + 0x080c, 0x5b2d, 0x0150, 0x0126, 0x2091, 0x8000, 0xa87a, 0xa982, + 0x012e, 0x0050, 0x080c, 0x5e34, 0x1128, 0x7007, 0x0003, 0x701f, + 0x3314, 0x0005, 0x080c, 0x6770, 0x0126, 0x2091, 0x8000, 0x20a9, + 0x0005, 0x20e1, 0x0001, 0x2099, 0x189c, 0x400a, 0x2100, 0x9210, + 0x9399, 0x0000, 0x94a1, 0x0000, 0x95a9, 0x0000, 0xa85c, 0x9080, + 0x0019, 0x2009, 0x0020, 0x012e, 0xaf60, 0x0804, 0x465e, 0x2091, + 0x8000, 0x7837, 0x4000, 0x7833, 0x0010, 0x7883, 0x4000, 0x7887, + 0x4953, 0x788b, 0x5020, 0x788f, 0x2020, 0x2009, 0x017f, 0x2104, + 0x7892, 0x3f00, 0x7896, 0x2061, 0x0100, 0x6200, 0x2061, 0x0200, + 0x603c, 0x8007, 0x9205, 0x789a, 0x2009, 0x04fd, 0x2104, 0x789e, + 0x2091, 0x5000, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, + 0x0180, 0x2001, 0x19e8, 0x2004, 0x9005, 0x0128, 0x2001, 0x008b, + 0x2004, 0xd0fc, 0x0dd8, 0x2001, 0x008a, 0x2003, 0x0002, 0x2003, + 0x1001, 0x2071, 0x0080, 0x0804, 0x0427, 0x81ff, 0x1904, 0x31c3, + 0x7984, 0x080c, 0x5f7e, 0x1904, 0x31c6, 0x7e98, 0x9684, 0x3fff, + 0x9082, 0x4000, 0x1a04, 0x31c6, 0x7c88, 0x7d8c, 0x080c, 0x60e1, + 0x080c, 0x60b0, 0x0000, 0x1518, 0x2061, 0x1cd0, 0x0126, 0x2091, + 0x8000, 0x6000, 0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130, + 0xa86c, 0x9406, 0x1118, 0xa870, 0x9506, 0x0150, 0x012e, 0x9ce0, + 0x0018, 0x2001, 0x1818, 0x2004, 0x9c02, 0x1a04, 0x31c3, 0x0c30, + 0x080c, 0xb251, 0x012e, 0x0904, 0x31c3, 0x0804, 0x3191, 0x900e, + 0x2001, 0x0005, 0x080c, 0x6770, 0x0126, 0x2091, 0x8000, 0x080c, + 0xb8e9, 0x080c, 0x6536, 0x012e, 0x0804, 0x3191, 0x00a6, 0x2950, + 0xb198, 0x080c, 0x5f7e, 0x1904, 0x3400, 0xb6a4, 0x9684, 0x3fff, + 0x9082, 0x4000, 0x16e8, 0xb49c, 0xb5a0, 0x080c, 0x60e1, 0x080c, + 0x60b0, 0x1520, 0x2061, 0x1cd0, 0x0126, 0x2091, 0x8000, 0x6000, + 0x9086, 0x0000, 0x0148, 0x6014, 0x904d, 0x0130, 0xa86c, 0x9406, + 0x1118, 0xa870, 0x9506, 0x0158, 0x012e, 0x9ce0, 0x0018, 0x2001, + 0x1818, 0x2004, 0x9c02, 0x2009, 0x000d, 0x12b0, 0x0c28, 0x080c, + 0xb251, 0x012e, 0x2009, 0x0003, 0x0178, 0x00e0, 0x900e, 0x2001, + 0x0005, 0x080c, 0x6770, 0x0126, 0x2091, 0x8000, 0x080c, 0xb8e9, + 0x080c, 0x6529, 0x012e, 0x0070, 0xb097, 0x4005, 0xb19a, 0x0010, + 0xb097, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x2a48, + 0x00ae, 0x0005, 0xb097, 0x4000, 0x9006, 0x918d, 0x0001, 0x2008, + 0x2a48, 0x00ae, 0x0005, 0x81ff, 0x1904, 0x31c3, 0x080c, 0x4629, + 0x0904, 0x31c6, 0x080c, 0x6045, 0x0904, 0x31c3, 0x080c, 0x60e7, + 0x0904, 0x31c3, 0x0804, 0x417a, 0x81ff, 0x1904, 0x31c3, 0x080c, + 0x4645, 0x0904, 0x31c6, 0x080c, 0x6175, 0x0904, 0x31c3, 0x2019, + 0x0005, 0x79a8, 0x080c, 0x6102, 0x0904, 0x31c3, 0x7888, 0x908a, + 0x1000, 0x1a04, 0x31c6, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, + 0x7c58, 0x7984, 0xd184, 0x1904, 0x3191, 0x0804, 0x417a, 0x0126, + 0x2091, 0x8000, 0x81ff, 0x0118, 0x2009, 0x0001, 0x0450, 0x2029, + 0x07ff, 0x6454, 0x2400, 0x9506, 0x01f8, 0x2508, 0x080c, 0x5f7e, + 0x11d8, 0x080c, 0x6175, 0x1128, 0x2009, 0x0002, 0x62b8, 0x2518, + 0x00c0, 0x2019, 0x0004, 0x900e, 0x080c, 0x6102, 0x1118, 0x2009, + 0x0006, 0x0078, 0x7884, 0x908a, 0x1000, 0x1270, 0x8003, 0x800b, + 0x810b, 0x9108, 0x080c, 0x7c58, 0x8529, 0x1ae0, 0x012e, 0x0804, + 0x3191, 0x012e, 0x0804, 0x31c3, 0x012e, 0x0804, 0x31c6, 0x080c, + 0x4629, 0x0904, 0x31c6, 0x080c, 0x6045, 0x0904, 0x31c3, 0xbaa0, + 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c, 0x8180, 0x0076, 0x903e, + 0x080c, 0x8078, 0x900e, 0x080c, 0xcd62, 0x007e, 0x00ce, 0x080c, + 0x60e1, 0x0804, 0x3191, 0x080c, 0x4629, 0x0904, 0x31c6, 0x080c, + 0x60e1, 0x2208, 0x0804, 0x3191, 0x0156, 0x00d6, 0x00e6, 0x2069, + 0x1906, 0x6810, 0x6914, 0x910a, 0x1208, 0x900e, 0x6816, 0x9016, + 0x901e, 0x20a9, 0x007e, 0x2069, 0x1000, 0x2d04, 0x905d, 0x0118, + 0xb84c, 0x0059, 0x9210, 0x8d68, 0x1f04, 0x34b5, 0x2300, 0x9218, + 0x00ee, 0x00de, 0x015e, 0x0804, 0x3191, 0x00f6, 0x0016, 0x907d, + 0x0138, 0x9006, 0x8000, 0x2f0c, 0x81ff, 0x0110, 0x2178, 0x0cd0, + 0x001e, 0x00fe, 0x0005, 0x2069, 0x1906, 0x6910, 0x62b4, 0x0804, + 0x3191, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x31c3, 0x0126, + 0x2091, 0x8000, 0x080c, 0x5127, 0x0128, 0x2009, 0x0007, 0x012e, + 0x0804, 0x31c3, 0x012e, 0x6154, 0x9190, 0x2f92, 0x2215, 0x9294, + 0x00ff, 0x6374, 0x83ff, 0x0108, 0x6278, 0x67d4, 0x97c4, 0x000a, + 0x98c6, 0x000a, 0x1118, 0x2031, 0x0001, 0x00e8, 0x97c4, 0x0022, + 0x98c6, 0x0022, 0x1118, 0x2031, 0x0003, 0x00a8, 0x97c4, 0x0012, + 0x98c6, 0x0012, 0x1118, 0x2031, 0x0002, 0x0068, 0x080c, 0x6c53, + 0x1118, 0x2031, 0x0004, 0x0038, 0xd79c, 0x0120, 0x2009, 0x0005, + 0x0804, 0x31c3, 0x9036, 0x7e9a, 0x7f9e, 0x0804, 0x3191, 0x6144, + 0x6248, 0x2019, 0x1955, 0x231c, 0x2001, 0x1956, 0x2004, 0x789a, + 0x0804, 0x3191, 0x0126, 0x2091, 0x8000, 0x6134, 0x6238, 0x633c, + 0x012e, 0x0804, 0x3191, 0x080c, 0x4645, 0x0904, 0x31c6, 0xba44, + 0xbb38, 0x0804, 0x3191, 0x080c, 0x0db2, 0x080c, 0x4645, 0x2110, + 0x0904, 0x31c6, 0xb804, 0x908c, 0x00ff, 0x918e, 0x0006, 0x0140, + 0x9084, 0xff00, 0x9086, 0x0600, 0x2009, 0x0009, 0x1904, 0x31c3, + 0x0126, 0x2091, 0x8000, 0x2019, 0x0005, 0x00c6, 0x9066, 0x080c, + 0x94b5, 0x080c, 0x8180, 0x0076, 0x903e, 0x080c, 0x8078, 0x900e, + 0x080c, 0xcd62, 0x007e, 0x00ce, 0xb807, 0x0407, 0x012e, 0x0804, + 0x3191, 0x6144, 0x6248, 0x7884, 0x6046, 0x7b88, 0x634a, 0x2069, + 0x1853, 0x831f, 0x9305, 0x6816, 0x788c, 0x2069, 0x1955, 0x2d1c, + 0x206a, 0x7e98, 0x9682, 0x0014, 0x1210, 0x2031, 0x07d0, 0x2069, + 0x1956, 0x2d04, 0x266a, 0x789a, 0x0804, 0x3191, 0x0126, 0x2091, + 0x8000, 0x6134, 0x7884, 0x6036, 0x910e, 0xd1b4, 0x190c, 0x0e84, + 0xd0c4, 0x01a8, 0x00d6, 0x78a8, 0x2009, 0x196c, 0x200a, 0x78ac, + 0x2011, 0x196d, 0x2012, 0x2069, 0x0100, 0x6838, 0x9086, 0x0007, + 0x1118, 0x2214, 0x6a5a, 0x0010, 0x210c, 0x695a, 0x00de, 0x7888, + 0x603a, 0x2011, 0x0114, 0x220c, 0x7888, 0xd08c, 0x0118, 0x918d, + 0x0080, 0x0010, 0x918c, 0xff7f, 0x2112, 0x613c, 0x788c, 0x603e, + 0x910e, 0xd1e4, 0x190c, 0x0e9a, 0x603c, 0xd0cc, 0x0120, 0x78b0, + 0x2011, 0x0114, 0x2012, 0x012e, 0x0804, 0x3191, 0x00f6, 0x2079, + 0x1800, 0x7a34, 0xa898, 0x9084, 0xfebf, 0x9215, 0xa89c, 0x9084, + 0xfebf, 0x8002, 0x9214, 0x7834, 0x9084, 0x0140, 0x9215, 0x7a36, + 0xa897, 0x4000, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x00fe, + 0x0005, 0x7898, 0x9005, 0x01a8, 0x7888, 0x9025, 0x0904, 0x31c6, + 0x788c, 0x902d, 0x0904, 0x31c6, 0x900e, 0x080c, 0x5f7e, 0x1120, + 0xba44, 0xbb38, 0xbc46, 0xbd3a, 0x9186, 0x07ff, 0x0190, 0x8108, + 0x0ca0, 0x080c, 0x4645, 0x0904, 0x31c6, 0x7888, 0x900d, 0x0904, + 0x31c6, 0x788c, 0x9005, 0x0904, 0x31c6, 0xba44, 0xb946, 0xbb38, + 0xb83a, 0x0804, 0x3191, 0x2011, 0xbc09, 0x0010, 0x2011, 0xbc05, + 0x080c, 0x5127, 0x1904, 0x31c3, 0x00c6, 0x2061, 0x0100, 0x7984, + 0x9186, 0x00ff, 0x1130, 0x2001, 0x1816, 0x2004, 0x9085, 0xff00, + 0x0088, 0x9182, 0x007f, 0x16e0, 0x9188, 0x2f92, 0x210d, 0x918c, + 0x00ff, 0x2001, 0x1816, 0x2004, 0x0026, 0x9116, 0x002e, 0x0580, + 0x810f, 0x9105, 0x0126, 0x2091, 0x8000, 0x0006, 0x080c, 0x9980, + 0x000e, 0x0510, 0x602e, 0x620a, 0x7984, 0x00b6, 0x080c, 0x5f24, + 0x2b08, 0x00be, 0x1500, 0x6112, 0x6023, 0x0001, 0x080c, 0x4612, + 0x01d0, 0x9006, 0xa866, 0x7007, 0x0003, 0xa832, 0xa868, 0xc0fd, + 0xa86a, 0x701f, 0x3666, 0x2900, 0x6016, 0x2009, 0x0032, 0x080c, + 0x9a50, 0x012e, 0x00ce, 0x0005, 0x012e, 0x00ce, 0x0804, 0x31c3, + 0x00ce, 0x0804, 0x31c6, 0x080c, 0x99d6, 0x0cb0, 0xa830, 0x9086, + 0x0100, 0x0904, 0x31c3, 0x0804, 0x3191, 0x2061, 0x1a3e, 0x0126, + 0x2091, 0x8000, 0x6000, 0xd084, 0x0170, 0x6104, 0x6208, 0x2061, + 0x1800, 0x634c, 0x606c, 0x789a, 0x60b8, 0x789e, 0x60b4, 0x78aa, + 0x012e, 0x0804, 0x3191, 0x900e, 0x2110, 0x0c88, 0x81ff, 0x1904, + 0x31c3, 0x080c, 0x6c53, 0x0904, 0x31c3, 0x0126, 0x2091, 0x8000, + 0x624c, 0x606c, 0x9202, 0x0248, 0x9085, 0x0001, 0x080c, 0x253f, + 0x080c, 0x5304, 0x012e, 0x0804, 0x3191, 0x012e, 0x0804, 0x31c6, + 0x0006, 0x0016, 0x00c6, 0x00e6, 0x2001, 0x1978, 0x2070, 0x2061, + 0x1853, 0x6008, 0x2072, 0x900e, 0x2011, 0x1400, 0x080c, 0x7e7f, + 0x7206, 0x00ee, 0x00ce, 0x001e, 0x000e, 0x0005, 0x0126, 0x2091, + 0x8000, 0x81ff, 0x0128, 0x012e, 0x2021, 0x400b, 0x0804, 0x3193, + 0x7884, 0xd0fc, 0x0148, 0x2001, 0x002a, 0x2004, 0x9082, 0x00e1, + 0x0288, 0x012e, 0x0804, 0x31c6, 0x2001, 0x002a, 0x2004, 0x2069, + 0x1853, 0x6908, 0x9102, 0x1230, 0x012e, 0x0804, 0x31c6, 0x012e, + 0x0804, 0x31c3, 0x080c, 0x9940, 0x0dd0, 0x7884, 0xd0fc, 0x0904, + 0x3731, 0x00c6, 0x080c, 0x4612, 0x00ce, 0x0d88, 0xa867, 0x0000, + 0x7884, 0xa80a, 0x7898, 0xa80e, 0x789c, 0xa812, 0x2001, 0x002e, + 0x2004, 0xa81a, 0x2001, 0x002f, 0x2004, 0xa81e, 0x2001, 0x0030, + 0x2004, 0xa822, 0x2001, 0x0031, 0x2004, 0xa826, 0x2001, 0x0034, + 0x2004, 0xa82a, 0x2001, 0x0035, 0x2004, 0xa82e, 0x2001, 0x002a, + 0x2004, 0x9080, 0x0003, 0x9084, 0x00fc, 0x8004, 0xa816, 0x080c, + 0x38b7, 0x0928, 0x7014, 0x2048, 0xad2c, 0xac28, 0xab1c, 0xaa18, + 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021, 0x0000, + 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, + 0x001b, 0x080c, 0x465b, 0x701f, 0x37f4, 0x7023, 0x0001, 0x012e, + 0x0005, 0x0046, 0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, + 0x00e6, 0x00f6, 0x080c, 0x36a0, 0x2001, 0x196e, 0x2003, 0x0000, + 0x2021, 0x000a, 0x2061, 0x0100, 0x6104, 0x0016, 0x60bb, 0x0000, + 0x60bf, 0x32e1, 0x60bf, 0x0012, 0x080c, 0x3926, 0x080c, 0x38e5, + 0x00f6, 0x00e6, 0x0086, 0x2940, 0x2071, 0x1a34, 0x2079, 0x0090, + 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0140, 0x2001, 0x0035, + 0x2004, 0x780e, 0x2001, 0x0034, 0x2004, 0x780a, 0x00de, 0x2011, + 0x0001, 0x080c, 0x3cb9, 0x008e, 0x00ee, 0x00fe, 0x080c, 0x3be6, + 0x080c, 0x3aeb, 0x05b8, 0x2001, 0x020b, 0x2004, 0x9084, 0x0140, + 0x1db8, 0x080c, 0x3d2d, 0x00f6, 0x2079, 0x0300, 0x78bc, 0x00fe, + 0x908c, 0x0070, 0x1560, 0x2071, 0x0200, 0x7037, 0x0000, 0x7050, + 0x9084, 0xff00, 0x9086, 0x3200, 0x1510, 0x7037, 0x0001, 0x7050, + 0x9084, 0xff00, 0x9086, 0xe100, 0x11d0, 0x7037, 0x0000, 0x7054, + 0x7037, 0x0000, 0x715c, 0x9106, 0x1190, 0x2001, 0x181e, 0x2004, + 0x9106, 0x1168, 0x00c6, 0x2061, 0x0100, 0x6024, 0x9084, 0x1e00, + 0x00ce, 0x0138, 0x080c, 0x3af5, 0x080c, 0x38e0, 0x0058, 0x080c, + 0x38e0, 0x080c, 0x3c51, 0x080c, 0x3bdc, 0x2001, 0x020b, 0x2004, + 0xd0e4, 0x0dd8, 0x2001, 0x032a, 0x2003, 0x0004, 0x2061, 0x0100, + 0x6027, 0x0002, 0x001e, 0x6106, 0x2011, 0x020d, 0x2013, 0x0020, + 0x60bb, 0x0000, 0x60bf, 0x0108, 0x60bf, 0x0012, 0x2001, 0x0004, + 0x200c, 0x918c, 0xfffd, 0x2102, 0x080c, 0x127c, 0x2009, 0x0028, + 0x080c, 0x20d9, 0x2001, 0x0227, 0x200c, 0x2102, 0x00fe, 0x00ee, + 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e, 0x004e, 0x2001, + 0x196e, 0x2004, 0x9005, 0x1118, 0x012e, 0x0804, 0x3191, 0x012e, + 0x2021, 0x400c, 0x0804, 0x3193, 0x0016, 0x0026, 0x0036, 0x0046, + 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6, 0x0156, 0x7014, 0x2048, + 0x7020, 0x20a8, 0x8000, 0x7022, 0xa804, 0x9005, 0x0904, 0x3850, + 0x2048, 0x1f04, 0x3804, 0x7068, 0x2040, 0xa28c, 0xa390, 0xa494, + 0xa598, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029, 0x0000, 0x2021, + 0x0000, 0x0096, 0x7014, 0x2048, 0xa864, 0x009e, 0x9086, 0x0103, + 0x0170, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, + 0x9080, 0x001b, 0x080c, 0x465b, 0x701f, 0x37f4, 0x00b0, 0x8906, + 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, + 0x21a8, 0x27e0, 0x2098, 0x27e8, 0x20a0, 0x0006, 0x080c, 0x0f52, + 0x000e, 0x080c, 0x465e, 0x701f, 0x37f4, 0x015e, 0x00de, 0x009e, + 0x008e, 0x007e, 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005, + 0x7014, 0x2048, 0xa864, 0x9086, 0x0103, 0x1118, 0x701f, 0x38b5, + 0x0450, 0x7014, 0x2048, 0xa868, 0xc0fd, 0xa86a, 0x2009, 0x007f, + 0x080c, 0x5f1e, 0x0110, 0x9006, 0x0030, 0xb813, 0x00ff, 0xb817, + 0xfffd, 0x080c, 0xbab8, 0x015e, 0x00de, 0x009e, 0x008e, 0x007e, + 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0904, 0x31c3, 0x0016, + 0x0026, 0x0036, 0x0046, 0x0056, 0x0076, 0x0086, 0x0096, 0x00d6, + 0x0156, 0x701f, 0x3887, 0x7007, 0x0003, 0x0804, 0x3845, 0x0076, + 0xa830, 0x9086, 0x0100, 0x2021, 0x400c, 0x0904, 0x3193, 0xad10, + 0xac0c, 0xab24, 0xaa20, 0xa930, 0xa808, 0xd0b4, 0x1120, 0x2029, + 0x0000, 0x2021, 0x0000, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, + 0x9084, 0xffc0, 0x9080, 0x001b, 0x21a8, 0x27e0, 0x2098, 0x27e8, + 0x20a0, 0x0006, 0x080c, 0x0f52, 0x000e, 0x080c, 0x465e, 0x007e, + 0x701f, 0x37f4, 0x7023, 0x0001, 0x0005, 0x0804, 0x3191, 0x0156, + 0x00c6, 0xa814, 0x908a, 0x001e, 0x0218, 0xa833, 0x001e, 0x0010, + 0xa832, 0x0078, 0x81ff, 0x0168, 0x0016, 0x080c, 0x4612, 0x001e, + 0x0130, 0xa800, 0x2040, 0xa008, 0xa80a, 0x2100, 0x0c58, 0x9006, + 0x0010, 0x9085, 0x0001, 0x00ce, 0x015e, 0x0005, 0x0006, 0x00f6, + 0x2079, 0x0000, 0x7880, 0x9086, 0x0044, 0x00fe, 0x000e, 0x0005, + 0x2001, 0x196e, 0x2003, 0x0001, 0x0005, 0x00f6, 0x00e6, 0x00c6, + 0x2061, 0x0200, 0x2001, 0x1979, 0x2004, 0x601a, 0x2061, 0x0100, + 0x2001, 0x1978, 0x2004, 0x60ce, 0x6104, 0xc1ac, 0x6106, 0x080c, + 0x4612, 0xa813, 0x0019, 0xa817, 0x0001, 0x2900, 0xa85a, 0x2001, + 0x002e, 0x2004, 0xa866, 0x2001, 0x002f, 0x2004, 0xa86a, 0x2061, + 0x0090, 0x2079, 0x0100, 0x2001, 0x1978, 0x2004, 0x6036, 0x2009, + 0x0040, 0x080c, 0x20d9, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, + 0xa86e, 0x601a, 0xa873, 0x0000, 0x601f, 0x0000, 0x78ca, 0x9006, + 0x600a, 0x600e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x00e6, 0x080c, + 0x4612, 0x2940, 0xa013, 0x0019, 0xa017, 0x0001, 0x2800, 0xa05a, + 0x2001, 0x0030, 0x2004, 0xa866, 0x2001, 0x0031, 0x2004, 0xa86a, + 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0xa86e, 0xa873, 0x0000, + 0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x0300, 0x2003, 0x0000, + 0x2001, 0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c, 0x918d, + 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x81ff, + 0x0148, 0x080c, 0x28c8, 0x1130, 0x9006, 0x080c, 0x2820, 0x9006, + 0x080c, 0x2803, 0x7884, 0x9084, 0x0007, 0x0002, 0x3971, 0x397a, + 0x3983, 0x396e, 0x396e, 0x396e, 0x396e, 0x396e, 0x012e, 0x0804, + 0x31c6, 0x2009, 0x0114, 0x2104, 0x9085, 0x0800, 0x200a, 0x080c, + 0x3b3f, 0x00c0, 0x2009, 0x0114, 0x2104, 0x9085, 0x4000, 0x200a, + 0x080c, 0x3b3f, 0x0078, 0x080c, 0x6c53, 0x1128, 0x012e, 0x2009, + 0x0016, 0x0804, 0x31c3, 0x81ff, 0x0128, 0x012e, 0x2021, 0x400b, + 0x0804, 0x3193, 0x0086, 0x0096, 0x00a6, 0x00b6, 0x00c6, 0x00d6, + 0x00e6, 0x00f6, 0x080c, 0x36a0, 0x2009, 0x0101, 0x210c, 0x0016, + 0x7ec8, 0x7dcc, 0x9006, 0x2068, 0x2060, 0x2058, 0x080c, 0x3e08, + 0x080c, 0x3d58, 0x903e, 0x2720, 0x00f6, 0x00e6, 0x0086, 0x2940, + 0x2071, 0x1a34, 0x2079, 0x0090, 0x00d6, 0x2069, 0x0000, 0x6884, + 0xd0b4, 0x0120, 0x68d4, 0x780e, 0x68d0, 0x780a, 0x00de, 0x2011, + 0x0001, 0x080c, 0x3cb9, 0x080c, 0x28d0, 0x080c, 0x28d0, 0x080c, + 0x28d0, 0x080c, 0x28d0, 0x080c, 0x3cb9, 0x008e, 0x00ee, 0x00fe, + 0x080c, 0x3be6, 0x2009, 0x0190, 0x8109, 0x11b0, 0x080c, 0x3af5, + 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd, 0x2102, 0x001e, 0x00fe, + 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x008e, 0x2009, + 0x0017, 0x080c, 0x31c3, 0x0cf8, 0x2001, 0x020b, 0x2004, 0x9084, + 0x0140, 0x1d10, 0x00f6, 0x2079, 0x0000, 0x7884, 0x00fe, 0xd0bc, + 0x0178, 0x2001, 0x0201, 0x200c, 0x81ff, 0x0150, 0x080c, 0x3bc4, + 0x2d00, 0x9c05, 0x9b05, 0x0120, 0x080c, 0x3af5, 0x0804, 0x3aa2, + 0x080c, 0x3d2d, 0x080c, 0x3c51, 0x080c, 0x3ba7, 0x080c, 0x3bdc, + 0x00f6, 0x2079, 0x0100, 0x7824, 0xd0ac, 0x0130, 0x8b58, 0x080c, + 0x3af5, 0x00fe, 0x0804, 0x3aa2, 0x00fe, 0x080c, 0x3aeb, 0x1150, + 0x8d68, 0x2001, 0x0032, 0x2602, 0x2001, 0x0033, 0x2502, 0x080c, + 0x3af5, 0x0080, 0x87ff, 0x0138, 0x2001, 0x0201, 0x2004, 0x9005, + 0x1908, 0x8739, 0x0038, 0x2001, 0x1a31, 0x2004, 0x9086, 0x0000, + 0x1904, 0x39f2, 0x2001, 0x032f, 0x2003, 0x00f6, 0x8631, 0x1208, + 0x8529, 0x2500, 0x9605, 0x0904, 0x3aa2, 0x7884, 0xd0bc, 0x0128, + 0x2d00, 0x9c05, 0x9b05, 0x1904, 0x3aa2, 0xa013, 0x0019, 0x2001, + 0x032a, 0x2003, 0x0004, 0x7884, 0xd0ac, 0x1148, 0x2001, 0x1a31, + 0x2003, 0x0003, 0x2001, 0x032a, 0x2003, 0x0009, 0x0030, 0xa017, + 0x0001, 0x78b4, 0x9005, 0x0108, 0xa016, 0x2800, 0xa05a, 0x2009, + 0x0040, 0x080c, 0x20d9, 0x2900, 0xa85a, 0xa813, 0x0019, 0x7884, + 0xd0a4, 0x1180, 0xa817, 0x0000, 0x00c6, 0x20a9, 0x0004, 0x2061, + 0x0090, 0x602b, 0x0008, 0x2001, 0x0203, 0x2004, 0x1f04, 0x3a79, + 0x00ce, 0x0030, 0xa817, 0x0001, 0x78b0, 0x9005, 0x0108, 0xa816, + 0x00f6, 0x00c6, 0x2079, 0x0100, 0x2061, 0x0090, 0x7827, 0x0002, + 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0x601a, 0x0006, 0x2001, + 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca, 0x00ce, 0x00fe, + 0x0804, 0x39ac, 0x001e, 0x00c6, 0x2001, 0x032a, 0x2003, 0x0004, + 0x2061, 0x0100, 0x6027, 0x0002, 0x6106, 0x2011, 0x020d, 0x2013, + 0x0020, 0x2001, 0x0004, 0x200c, 0x918c, 0xfffd, 0x2102, 0x080c, + 0x127c, 0x7884, 0x9084, 0x0003, 0x9086, 0x0002, 0x01a0, 0x2009, + 0x0028, 0x080c, 0x20d9, 0x2001, 0x0227, 0x200c, 0x2102, 0x6050, + 0x9084, 0xb7ef, 0x6052, 0x602f, 0x0000, 0x604b, 0xf7f7, 0x6043, + 0x0090, 0x6043, 0x0010, 0x00ce, 0x2d08, 0x2c10, 0x2b18, 0x2b00, + 0x9c05, 0x9d05, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, + 0x009e, 0x008e, 0x1118, 0x012e, 0x0804, 0x3191, 0x012e, 0x2021, + 0x400c, 0x0804, 0x3193, 0x9085, 0x0001, 0x1d04, 0x3af4, 0x2091, + 0x6000, 0x8420, 0x9486, 0x0064, 0x0005, 0x2001, 0x0105, 0x2003, + 0x0010, 0x2001, 0x032a, 0x2003, 0x0004, 0x2001, 0x1a31, 0x2003, + 0x0000, 0x0071, 0x2009, 0x0048, 0x080c, 0x20d9, 0x2001, 0x0227, + 0x2024, 0x2402, 0x2001, 0x0109, 0x2003, 0x4000, 0x9026, 0x0005, + 0x00f6, 0x00e6, 0x2071, 0x1a34, 0x7000, 0x9086, 0x0000, 0x0520, + 0x2079, 0x0090, 0x2009, 0x0206, 0x2104, 0x2009, 0x0203, 0x210c, + 0x9106, 0x1120, 0x2009, 0x0040, 0x080c, 0x20d9, 0x782c, 0xd0fc, + 0x0d88, 0x080c, 0x3d2d, 0x7000, 0x9086, 0x0000, 0x1d58, 0x782b, + 0x0004, 0x782c, 0xd0ac, 0x1de8, 0x2009, 0x0040, 0x080c, 0x20d9, + 0x782b, 0x0002, 0x7003, 0x0000, 0x00ee, 0x00fe, 0x0005, 0x00f6, + 0x2079, 0x0100, 0x2001, 0x1816, 0x200c, 0x7932, 0x7936, 0x080c, + 0x251f, 0x7850, 0x9084, 0xfbff, 0x9085, 0x0030, 0x7852, 0x2019, + 0x01f4, 0x8319, 0x1df0, 0x9084, 0xffcf, 0x9085, 0x2000, 0x7852, + 0x20a9, 0x0046, 0x1d04, 0x3b5a, 0x2091, 0x6000, 0x1f04, 0x3b5a, + 0x7850, 0x9085, 0x0400, 0x9084, 0xdfff, 0x7852, 0x2001, 0x0021, + 0x2004, 0x9084, 0x0003, 0x9086, 0x0001, 0x1120, 0x7850, 0x9084, + 0xdfff, 0x7852, 0x784b, 0xf7f7, 0x7843, 0x0090, 0x7843, 0x0010, + 0x20a9, 0x0028, 0xa001, 0x1f04, 0x3b7a, 0x7850, 0x9085, 0x1400, + 0x7852, 0x2019, 0x61a8, 0x7854, 0xa001, 0xa001, 0xd08c, 0x1110, + 0x8319, 0x1dc8, 0x7827, 0x0048, 0x7850, 0x9085, 0x0400, 0x7852, + 0x7843, 0x0040, 0x2019, 0x01f4, 0xa001, 0xa001, 0x8319, 0x1de0, + 0x2001, 0x0100, 0x080c, 0x2987, 0x7827, 0x0020, 0x7843, 0x0000, + 0x9006, 0x080c, 0x2987, 0x7827, 0x0048, 0x00fe, 0x0005, 0x7884, + 0xd0ac, 0x11c8, 0x00f6, 0x00e6, 0x2071, 0x1a31, 0x2079, 0x0320, + 0x2001, 0x0201, 0x2004, 0x9005, 0x0160, 0x7000, 0x9086, 0x0000, + 0x1140, 0x0051, 0xd0bc, 0x0108, 0x8738, 0x7003, 0x0003, 0x782b, + 0x0019, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0300, 0x78bc, + 0x00fe, 0x908c, 0x0070, 0x0178, 0x2009, 0x0032, 0x260a, 0x2009, + 0x0033, 0x250a, 0xd0b4, 0x0108, 0x8c60, 0xd0ac, 0x0108, 0x8d68, + 0xd0a4, 0x0108, 0x8b58, 0x0005, 0x00f6, 0x2079, 0x0200, 0x781c, + 0xd084, 0x0110, 0x7837, 0x0050, 0x00fe, 0x0005, 0x00e6, 0x2071, + 0x0100, 0x2001, 0x1979, 0x2004, 0x70e2, 0x080c, 0x38d6, 0x1188, + 0x2001, 0x181e, 0x2004, 0x2009, 0x181d, 0x210c, 0x918c, 0x00ff, + 0x706e, 0x716a, 0x7066, 0x918d, 0x3200, 0x7162, 0x7073, 0xe109, + 0x0080, 0x702c, 0x9085, 0x0002, 0x702e, 0x2009, 0x1816, 0x210c, + 0x716e, 0x7063, 0x0100, 0x7166, 0x719e, 0x706b, 0x0000, 0x7073, + 0x0809, 0x7077, 0x0008, 0x7078, 0x9080, 0x0100, 0x707a, 0x7080, + 0x8000, 0x7082, 0x7087, 0xaaaa, 0x9006, 0x708a, 0x708e, 0x707e, + 0x70d6, 0x70ab, 0x0036, 0x70af, 0x95d5, 0x7014, 0x9084, 0x1984, + 0x9085, 0x0092, 0x7016, 0x080c, 0x3d2d, 0x00f6, 0x2071, 0x1a31, + 0x2079, 0x0320, 0x00d6, 0x2069, 0x0000, 0x6884, 0xd0b4, 0x0120, + 0x689c, 0x780e, 0x6898, 0x780a, 0x00de, 0x2009, 0x03e8, 0x8109, + 0x1df0, 0x792c, 0xd1fc, 0x0110, 0x782b, 0x0004, 0x2011, 0x0011, + 0x080c, 0x3cb9, 0x2011, 0x0001, 0x080c, 0x3cb9, 0x00fe, 0x00ee, + 0x0005, 0x00f6, 0x00e6, 0x2071, 0x1a31, 0x2079, 0x0320, 0x792c, + 0xd1fc, 0x0904, 0x3cb6, 0x782b, 0x0002, 0x9026, 0xd19c, 0x1904, + 0x3cb2, 0x7000, 0x0002, 0x3cb6, 0x3c67, 0x3c97, 0x3cb2, 0xd1bc, + 0x1170, 0xd1dc, 0x1190, 0x8001, 0x7002, 0x2011, 0x0001, 0x080c, + 0x3cb9, 0x0904, 0x3cb6, 0x080c, 0x3cb9, 0x0804, 0x3cb6, 0x00f6, + 0x2079, 0x0300, 0x78bf, 0x0000, 0x00fe, 0x7810, 0x7914, 0x782b, + 0x0004, 0x7812, 0x7916, 0x2001, 0x0201, 0x200c, 0x81ff, 0x0de8, + 0x080c, 0x3bc4, 0x2009, 0x0001, 0x00f6, 0x2079, 0x0300, 0x78b8, + 0x00fe, 0xd0ec, 0x0110, 0x2009, 0x0011, 0x792a, 0x00f8, 0x8001, + 0x7002, 0x9184, 0x0880, 0x1140, 0x782c, 0xd0fc, 0x1904, 0x3c5b, + 0x2011, 0x0001, 0x00b1, 0x0090, 0xa010, 0x9092, 0x0004, 0x9086, + 0x0015, 0x1120, 0xa000, 0xa05a, 0x2011, 0x0031, 0xa212, 0xd1dc, + 0x1960, 0x0828, 0x782b, 0x0004, 0x7003, 0x0000, 0x00ee, 0x00fe, + 0x0005, 0xa014, 0x9005, 0x0550, 0x8001, 0x0036, 0x0096, 0xa016, + 0xa058, 0x2048, 0xa010, 0x2009, 0x0031, 0x911a, 0x831c, 0x831c, + 0x938a, 0x0007, 0x1a0c, 0x0db2, 0x9398, 0x3ce7, 0x231d, 0x083f, + 0x9080, 0x0004, 0x7a2a, 0x7100, 0x8108, 0x7102, 0x009e, 0x003e, + 0x908a, 0x0035, 0x1140, 0x0096, 0xa058, 0x2048, 0xa804, 0xa05a, + 0x2001, 0x0019, 0x009e, 0xa012, 0x9085, 0x0001, 0x0005, 0x3d24, + 0x3d1b, 0x3d12, 0x3d09, 0x3d00, 0x3cf7, 0x3cee, 0xa964, 0x7902, + 0xa968, 0x7906, 0xa96c, 0x7912, 0xa970, 0x7916, 0x0005, 0xa974, + 0x7902, 0xa978, 0x7906, 0xa97c, 0x7912, 0xa980, 0x7916, 0x0005, + 0xa984, 0x7902, 0xa988, 0x7906, 0xa98c, 0x7912, 0xa990, 0x7916, + 0x0005, 0xa994, 0x7902, 0xa998, 0x7906, 0xa99c, 0x7912, 0xa9a0, + 0x7916, 0x0005, 0xa9a4, 0x7902, 0xa9a8, 0x7906, 0xa9ac, 0x7912, + 0xa9b0, 0x7916, 0x0005, 0xa9b4, 0x7902, 0xa9b8, 0x7906, 0xa9bc, + 0x7912, 0xa9c0, 0x7916, 0x0005, 0xa9c4, 0x7902, 0xa9c8, 0x7906, + 0xa9cc, 0x7912, 0xa9d0, 0x7916, 0x0005, 0x00f6, 0x00e6, 0x0086, + 0x2071, 0x1a34, 0x2079, 0x0090, 0x792c, 0xd1fc, 0x01e8, 0x782b, + 0x0002, 0x2940, 0x9026, 0x7000, 0x0002, 0x3d54, 0x3d40, 0x3d4b, + 0x8001, 0x7002, 0xd19c, 0x1180, 0x2011, 0x0001, 0x080c, 0x3cb9, + 0x190c, 0x3cb9, 0x0048, 0x8001, 0x7002, 0x782c, 0xd0fc, 0x1d38, + 0x2011, 0x0001, 0x080c, 0x3cb9, 0x008e, 0x00ee, 0x00fe, 0x0005, + 0x00f6, 0x00e6, 0x00c6, 0x0086, 0x2061, 0x0200, 0x2001, 0x1979, + 0x2004, 0x601a, 0x2061, 0x0100, 0x2001, 0x1978, 0x2004, 0x60ce, + 0x6104, 0xc1ac, 0x6106, 0x2001, 0x002c, 0x2004, 0x9005, 0x0520, + 0x2038, 0x2001, 0x002e, 0x2024, 0x2001, 0x002f, 0x201c, 0x080c, + 0x4612, 0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, + 0x0220, 0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096, + 0xa858, 0x2048, 0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x3dd0, + 0x1d68, 0x2900, 0xa85a, 0x00d0, 0x080c, 0x4612, 0xa813, 0x0019, + 0xa817, 0x0001, 0x2900, 0xa85a, 0x2001, 0x002e, 0x2004, 0xa866, + 0x2001, 0x002f, 0x2004, 0xa86a, 0x2001, 0x002a, 0x2004, 0x9084, + 0xfff8, 0xa86e, 0x2001, 0x002b, 0x2004, 0xa872, 0x2061, 0x0090, + 0x2079, 0x0100, 0x2001, 0x1978, 0x2004, 0x6036, 0x2009, 0x0040, + 0x080c, 0x20d9, 0x2001, 0x002a, 0x2004, 0x9084, 0xfff8, 0x601a, + 0x0006, 0x2001, 0x002b, 0x2004, 0x601e, 0x78c6, 0x000e, 0x78ca, + 0x9006, 0x600a, 0x600e, 0x008e, 0x00ce, 0x00ee, 0x00fe, 0x0005, + 0x00e6, 0x2071, 0x0080, 0xaa60, 0x22e8, 0x20a0, 0x20e1, 0x0000, + 0x2099, 0x0088, 0x702b, 0x0026, 0x7402, 0x7306, 0x9006, 0x700a, + 0x700e, 0x810b, 0x810b, 0x21a8, 0x810b, 0x7112, 0x702b, 0x0041, + 0x702c, 0xd0fc, 0x0de8, 0x702b, 0x0002, 0x702b, 0x0040, 0x4005, + 0x7400, 0x7304, 0x87ff, 0x0190, 0x0086, 0x0096, 0x2940, 0x0086, + 0x080c, 0x4612, 0x008e, 0xa058, 0x00a6, 0x2050, 0x2900, 0xb006, + 0xa05a, 0x00ae, 0x009e, 0x008e, 0x9085, 0x0001, 0x00ee, 0x0005, + 0x00e6, 0x2001, 0x002d, 0x2004, 0x9005, 0x0528, 0x2038, 0x2001, + 0x0030, 0x2024, 0x2001, 0x0031, 0x201c, 0x080c, 0x4612, 0x2940, + 0xa813, 0x0019, 0xaf16, 0x2900, 0xa85a, 0x978a, 0x0007, 0x0220, + 0x2138, 0x2009, 0x0007, 0x0010, 0x2708, 0x903e, 0x0096, 0xa858, + 0x2048, 0xa85c, 0x9080, 0x0019, 0x009e, 0x080c, 0x3dd0, 0x1d68, + 0x2900, 0xa85a, 0x00d8, 0x080c, 0x4612, 0x2940, 0xa013, 0x0019, + 0xa017, 0x0001, 0x2800, 0xa05a, 0x2001, 0x0030, 0x2004, 0xa066, + 0x2001, 0x0031, 0x2004, 0xa06a, 0x2001, 0x002a, 0x2004, 0x9084, + 0xfff8, 0xa06e, 0x2001, 0x002b, 0x2004, 0xa072, 0x2001, 0x032a, + 0x2003, 0x0004, 0x7884, 0xd0ac, 0x1180, 0x2001, 0x0101, 0x200c, + 0x918d, 0x0200, 0x2102, 0xa017, 0x0000, 0x2001, 0x1a31, 0x2003, + 0x0003, 0x2001, 0x032a, 0x2003, 0x0009, 0x2001, 0x0300, 0x2003, + 0x0000, 0x2001, 0x020d, 0x2003, 0x0000, 0x2001, 0x0004, 0x200c, + 0x918d, 0x0002, 0x2102, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, + 0x20a9, 0x0013, 0x20a1, 0x1840, 0x20e9, 0x0001, 0x9006, 0x4004, + 0x2009, 0x013c, 0x200a, 0x012e, 0x7880, 0x9086, 0x0052, 0x0108, + 0x0005, 0x0804, 0x3191, 0x7d98, 0x7c9c, 0x0804, 0x3288, 0x080c, + 0x6c53, 0x190c, 0x59e6, 0x2069, 0x1853, 0x2d00, 0x2009, 0x0030, + 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0001, 0x080c, 0x465b, + 0x701f, 0x3ea3, 0x0005, 0x080c, 0x5122, 0x1130, 0x3b00, 0x3a08, + 0xc194, 0xc095, 0x20d8, 0x21d0, 0x2069, 0x1853, 0x6800, 0x9005, + 0x0904, 0x31c6, 0x6804, 0xd0ac, 0x0118, 0xd0a4, 0x0904, 0x31c6, + 0xd094, 0x00c6, 0x2061, 0x0100, 0x6104, 0x0138, 0x6200, 0x9292, + 0x0005, 0x0218, 0x918c, 0xffdf, 0x0010, 0x918d, 0x0020, 0x6106, + 0x00ce, 0xd08c, 0x00c6, 0x2061, 0x0100, 0x6104, 0x0118, 0x918d, + 0x0010, 0x0010, 0x918c, 0xffef, 0x6106, 0x00ce, 0xd084, 0x0158, + 0x6a28, 0x928a, 0x007f, 0x1a04, 0x31c6, 0x9288, 0x2f92, 0x210d, + 0x918c, 0x00ff, 0x615e, 0xd0dc, 0x0130, 0x6828, 0x908a, 0x007f, + 0x1a04, 0x31c6, 0x6056, 0x6888, 0x9084, 0x0030, 0x8004, 0x8004, + 0x8004, 0x8004, 0x0006, 0x2009, 0x1980, 0x9080, 0x2612, 0x2005, + 0x200a, 0x000e, 0x2009, 0x1981, 0x9080, 0x2616, 0x2005, 0x200a, + 0x6808, 0x908a, 0x0100, 0x0a04, 0x31c6, 0x908a, 0x0841, 0x1a04, + 0x31c6, 0x9084, 0x0007, 0x1904, 0x31c6, 0x680c, 0x9005, 0x0904, + 0x31c6, 0x6810, 0x9005, 0x0904, 0x31c6, 0x6848, 0x6940, 0x910a, + 0x1a04, 0x31c6, 0x8001, 0x0904, 0x31c6, 0x684c, 0x6944, 0x910a, + 0x1a04, 0x31c6, 0x8001, 0x0904, 0x31c6, 0x2009, 0x1950, 0x200b, + 0x0000, 0x2001, 0x1875, 0x2004, 0xd0c4, 0x0140, 0x7884, 0x200a, + 0x2009, 0x017f, 0x200a, 0x3b00, 0xc085, 0x20d8, 0x6814, 0x908c, + 0x00ff, 0x6146, 0x8007, 0x9084, 0x00ff, 0x604a, 0x080c, 0x6f5b, + 0x080c, 0x62da, 0x080c, 0x630e, 0x6808, 0x602a, 0x080c, 0x204b, + 0x2009, 0x0170, 0x200b, 0x0080, 0xa001, 0xa001, 0x200b, 0x0000, + 0x0036, 0x6b08, 0x080c, 0x2579, 0x003e, 0x6000, 0x9086, 0x0000, + 0x1904, 0x403f, 0x6818, 0x691c, 0x6a20, 0x6b24, 0x8007, 0x810f, + 0x8217, 0x831f, 0x6016, 0x611a, 0x621e, 0x6322, 0x6c04, 0xd4f4, + 0x0148, 0x6830, 0x6934, 0x6a38, 0x6b3c, 0x8007, 0x810f, 0x8217, + 0x831f, 0x0010, 0x9084, 0xf0ff, 0x6006, 0x610a, 0x620e, 0x6312, + 0x8007, 0x810f, 0x8217, 0x831f, 0x20a9, 0x0004, 0x20a1, 0x1982, + 0x20e9, 0x0001, 0x4001, 0x20a9, 0x0004, 0x20a1, 0x199c, 0x20e9, + 0x0001, 0x4001, 0x080c, 0x7d50, 0x00c6, 0x900e, 0x20a9, 0x0001, + 0x6b70, 0xd384, 0x0510, 0x0068, 0x2009, 0x0100, 0x210c, 0x918e, + 0x0008, 0x1110, 0x839d, 0x0010, 0x83f5, 0x3e18, 0x12b0, 0x3508, + 0x8109, 0x080c, 0x74e0, 0x6878, 0x6016, 0x6874, 0x2008, 0x9084, + 0xff00, 0x8007, 0x600a, 0x9184, 0x00ff, 0x6006, 0x8108, 0x1118, + 0x6003, 0x0003, 0x0010, 0x6003, 0x0001, 0x1f04, 0x3f94, 0x00ce, + 0x00c6, 0x2061, 0x196b, 0x6a88, 0x9284, 0xc000, 0x2010, 0x9286, + 0x0000, 0x1158, 0x2063, 0x0000, 0x2001, 0x0001, 0x080c, 0x2820, + 0x2001, 0x0001, 0x080c, 0x2803, 0x0088, 0x9286, 0x4000, 0x1148, + 0x2063, 0x0001, 0x9006, 0x080c, 0x2820, 0x9006, 0x080c, 0x2803, + 0x0028, 0x9286, 0x8000, 0x1d30, 0x2063, 0x0002, 0x00ce, 0x00e6, + 0x2c70, 0x080c, 0x0e69, 0x00ee, 0x6888, 0xd0ec, 0x0130, 0x2011, + 0x0114, 0x2204, 0x9085, 0x0100, 0x2012, 0x6a80, 0x9284, 0x0030, + 0x9086, 0x0030, 0x1128, 0x9294, 0xffcf, 0x9295, 0x0020, 0x6a82, + 0x2001, 0x194d, 0x6a80, 0x9294, 0x0030, 0x928e, 0x0000, 0x0170, + 0x928e, 0x0010, 0x0118, 0x928e, 0x0020, 0x0140, 0x2003, 0xaaaa, + 0x080c, 0x25ee, 0x2001, 0x193e, 0x2102, 0x0008, 0x2102, 0x00c6, + 0x2061, 0x0100, 0x602f, 0x0040, 0x602f, 0x0000, 0x00ce, 0x080c, + 0x6c53, 0x0128, 0x080c, 0x4a2e, 0x0110, 0x080c, 0x253f, 0x60cc, + 0x9005, 0x01c0, 0x6003, 0x0001, 0x2009, 0x4027, 0x00d0, 0x080c, + 0x6c53, 0x1168, 0x2011, 0x6ad9, 0x080c, 0x7c4a, 0x2011, 0x6acc, + 0x080c, 0x7d1b, 0x080c, 0x6f2f, 0x080c, 0x6b8a, 0x0040, 0x080c, + 0x58e0, 0x0028, 0x6003, 0x0004, 0x2009, 0x403f, 0x0010, 0x0804, + 0x3191, 0x2001, 0x0170, 0x2004, 0x9084, 0x00ff, 0x9086, 0x004c, + 0x1118, 0x2091, 0x30bd, 0x0817, 0x2091, 0x303d, 0x0817, 0x6000, + 0x9086, 0x0000, 0x0904, 0x31c3, 0x2069, 0x1853, 0x7890, 0x6842, + 0x7894, 0x6846, 0x2d00, 0x2009, 0x0030, 0x7a8c, 0x7b88, 0x7c9c, + 0x7d98, 0x2039, 0x0001, 0x0804, 0x465e, 0x9006, 0x080c, 0x253f, + 0x81ff, 0x1904, 0x31c3, 0x080c, 0x6c53, 0x11b0, 0x080c, 0x6f2a, + 0x080c, 0x5a21, 0x080c, 0x2f86, 0x0118, 0x6130, 0xc18d, 0x6132, + 0x080c, 0xbcec, 0x0130, 0x080c, 0x6c76, 0x1118, 0x080c, 0x6c2d, + 0x0038, 0x080c, 0x6b8a, 0x0020, 0x080c, 0x59e6, 0x080c, 0x58e0, + 0x0804, 0x3191, 0x81ff, 0x1904, 0x31c3, 0x080c, 0x6c53, 0x1110, + 0x0804, 0x31c3, 0x618c, 0x81ff, 0x01a8, 0x704f, 0x0000, 0x2001, + 0x1c80, 0x2009, 0x0040, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0126, + 0x2091, 0x8000, 0x2039, 0x0001, 0x080c, 0x465e, 0x701f, 0x318f, + 0x012e, 0x0005, 0x704f, 0x0001, 0x00d6, 0x2069, 0x1c80, 0x20a9, + 0x0040, 0x20e9, 0x0001, 0x20a1, 0x1c80, 0x2019, 0xffff, 0x4304, + 0x6554, 0x9588, 0x2f92, 0x210d, 0x918c, 0x00ff, 0x216a, 0x900e, + 0x2011, 0x0002, 0x2100, 0x9506, 0x01a8, 0x080c, 0x5f7e, 0x1190, + 0xb814, 0x821c, 0x0238, 0x9398, 0x1c80, 0x9085, 0xff00, 0x8007, + 0x201a, 0x0038, 0x9398, 0x1c80, 0x2324, 0x94a4, 0xff00, 0x9405, + 0x201a, 0x8210, 0x8108, 0x9182, 0x0080, 0x1208, 0x0c18, 0x8201, + 0x8007, 0x2d0c, 0x9105, 0x206a, 0x00de, 0x20a9, 0x0040, 0x20a1, + 0x1c80, 0x2099, 0x1c80, 0x080c, 0x5971, 0x0804, 0x4097, 0x080c, + 0x4645, 0x0904, 0x31c6, 0x080c, 0x4612, 0x1120, 0x2009, 0x0002, + 0x0804, 0x31c3, 0x080c, 0x5113, 0xd0b4, 0x0558, 0x7884, 0x908e, + 0x007e, 0x0538, 0x908e, 0x007f, 0x0520, 0x908e, 0x0080, 0x0508, + 0x080c, 0x2f81, 0x1148, 0xb800, 0xd08c, 0x11d8, 0xb804, 0x9084, + 0x00ff, 0x9086, 0x0006, 0x11a8, 0xa867, 0x0000, 0xa868, 0xc0fd, + 0xa86a, 0x080c, 0xb7bd, 0x1120, 0x2009, 0x0003, 0x0804, 0x31c3, + 0x7007, 0x0003, 0x701f, 0x4125, 0x0005, 0x080c, 0x4645, 0x0904, + 0x31c6, 0x20a9, 0x002b, 0xb8b4, 0x20e0, 0xb8b8, 0x2098, 0xa860, + 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x20a9, 0x0008, + 0x9080, 0x0006, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, + 0x2098, 0x080c, 0x0f52, 0x0070, 0x20a9, 0x0004, 0xa85c, 0x9080, + 0x000a, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x000a, 0x2098, + 0x080c, 0x0f52, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, + 0xffc0, 0x9080, 0x0002, 0x2009, 0x002b, 0x7a8c, 0x7b88, 0x7c9c, + 0x7d98, 0x0804, 0x465e, 0x81ff, 0x1904, 0x31c3, 0x080c, 0x4629, + 0x0904, 0x31c6, 0x080c, 0x60f0, 0x0904, 0x31c3, 0x0058, 0xa878, + 0x9005, 0x0120, 0x2009, 0x0004, 0x0804, 0x31c3, 0xa974, 0xaa94, + 0x0804, 0x3191, 0x080c, 0x511b, 0x0904, 0x3191, 0x701f, 0x416f, + 0x7007, 0x0003, 0x0005, 0x81ff, 0x1904, 0x31c3, 0x7888, 0x908a, + 0x1000, 0x1a04, 0x31c6, 0x080c, 0x4645, 0x0904, 0x31c6, 0x080c, + 0x62a4, 0x0120, 0x080c, 0x62ac, 0x1904, 0x31c6, 0x080c, 0x6175, + 0x0904, 0x31c3, 0x2019, 0x0004, 0x900e, 0x080c, 0x6102, 0x0904, + 0x31c3, 0x7984, 0x7a88, 0x04c9, 0x08a8, 0xa89c, 0x908a, 0x1000, + 0x12f8, 0x080c, 0x4643, 0x01e0, 0x080c, 0x62a4, 0x0118, 0x080c, + 0x62ac, 0x11b0, 0x080c, 0x6175, 0x2009, 0x0002, 0x0168, 0x2009, + 0x0002, 0x2019, 0x0004, 0x080c, 0x6102, 0x2009, 0x0003, 0x0120, + 0xa998, 0xaa9c, 0x00d1, 0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, + 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, + 0xa897, 0x4000, 0x080c, 0x511b, 0x0110, 0x9006, 0x0018, 0x900e, + 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x9186, 0x00ff, 0x0110, + 0x0071, 0x0060, 0x2029, 0x007e, 0x2061, 0x1800, 0x6454, 0x2400, + 0x9506, 0x0110, 0x2508, 0x0019, 0x8529, 0x1ec8, 0x0005, 0x080c, + 0x5f7e, 0x1138, 0x2200, 0x8003, 0x800b, 0x810b, 0x9108, 0x080c, + 0x7c58, 0x0005, 0x81ff, 0x1904, 0x31c3, 0x080c, 0x4629, 0x0904, + 0x31c6, 0x080c, 0x6045, 0x0904, 0x31c3, 0x080c, 0x60f9, 0x0904, + 0x31c3, 0x0804, 0x417a, 0x81ff, 0x1904, 0x31c3, 0x080c, 0x4629, + 0x0904, 0x31c6, 0x080c, 0x6045, 0x0904, 0x31c3, 0x080c, 0x60e7, + 0x0904, 0x31c3, 0x0804, 0x417a, 0x6100, 0x0804, 0x3191, 0x080c, + 0x4645, 0x0904, 0x31c6, 0x080c, 0x5127, 0x1904, 0x31c3, 0x79a8, + 0xd184, 0x1158, 0xb834, 0x8007, 0x789e, 0xb830, 0x8007, 0x789a, + 0xbb2c, 0x831f, 0xba28, 0x8217, 0x0050, 0xb824, 0x8007, 0x789e, + 0xb820, 0x8007, 0x789a, 0xbb1c, 0x831f, 0xba18, 0x8217, 0xb900, + 0x918c, 0x0200, 0x0804, 0x3191, 0x78a8, 0x909c, 0x0003, 0xd0b4, + 0x1140, 0x939a, 0x0003, 0x1a04, 0x31c3, 0x6254, 0x7884, 0x9206, + 0x1560, 0x2031, 0x1848, 0x2009, 0x013c, 0x2136, 0x2001, 0x1840, + 0x2009, 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x2039, 0x0001, + 0x0006, 0x78a8, 0x9084, 0x0080, 0x1118, 0x000e, 0x0804, 0x465e, + 0x000e, 0x2031, 0x0000, 0x2061, 0x18ae, 0x2c44, 0xa66a, 0xa17a, + 0xa772, 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x10b5, + 0x7007, 0x0002, 0x701f, 0x429d, 0x0005, 0x81ff, 0x1904, 0x31c3, + 0x080c, 0x4645, 0x0904, 0x31c6, 0x080c, 0x62a4, 0x1904, 0x31c3, + 0x00c6, 0x080c, 0x4612, 0x00ce, 0x0904, 0x31c3, 0xa867, 0x0000, + 0xa868, 0xc0fd, 0xa86a, 0x7ea8, 0x080c, 0xb763, 0x0904, 0x31c3, + 0x7007, 0x0003, 0x701f, 0x42a1, 0x0005, 0x080c, 0x3e75, 0x0804, + 0x3191, 0xa830, 0x9086, 0x0100, 0x0904, 0x31c3, 0x8906, 0x8006, + 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x001b, 0x2009, + 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, 0x465e, 0x9006, + 0x080c, 0x253f, 0x78a8, 0x9084, 0x00ff, 0x9086, 0x00ff, 0x0118, + 0x81ff, 0x1904, 0x31c3, 0x080c, 0x6c53, 0x0110, 0x080c, 0x59e6, + 0x7888, 0x908a, 0x1000, 0x1a04, 0x31c6, 0x7984, 0x9186, 0x00ff, + 0x0138, 0x9182, 0x007f, 0x1a04, 0x31c6, 0x2100, 0x080c, 0x2509, + 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x2061, 0x19c9, 0x601b, + 0x0000, 0x601f, 0x0000, 0x6073, 0x0000, 0x6077, 0x0000, 0x080c, + 0x6c53, 0x1158, 0x080c, 0x6f2a, 0x080c, 0x5a21, 0x9085, 0x0001, + 0x080c, 0x6c9a, 0x080c, 0x6b8a, 0x00d0, 0x080c, 0x9947, 0x2061, + 0x0100, 0x2001, 0x1816, 0x2004, 0x9084, 0x00ff, 0x810f, 0x9105, + 0x604a, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x1968, 0x200b, + 0x0000, 0x2009, 0x002d, 0x2011, 0x590c, 0x080c, 0x7cd9, 0x7984, + 0x080c, 0x6c53, 0x1110, 0x2009, 0x00ff, 0x7a88, 0x080c, 0x41dd, + 0x012e, 0x00ce, 0x002e, 0x0804, 0x3191, 0x7984, 0x080c, 0x5f1e, + 0x2b08, 0x1904, 0x31c6, 0x0804, 0x3191, 0x81ff, 0x0120, 0x2009, + 0x0001, 0x0804, 0x31c3, 0x60d4, 0xd0ac, 0x1130, 0xd09c, 0x1120, + 0x2009, 0x0005, 0x0804, 0x31c3, 0x080c, 0x4612, 0x1120, 0x2009, + 0x0002, 0x0804, 0x31c3, 0x7984, 0x9192, 0x0021, 0x1a04, 0x31c6, + 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xa85c, 0x9080, 0x0019, 0x702a, + 0xaf60, 0x7736, 0x080c, 0x465b, 0x701f, 0x4355, 0x7880, 0x9086, + 0x006e, 0x0110, 0x701f, 0x4be0, 0x0005, 0x2009, 0x0080, 0x080c, + 0x5f7e, 0x1118, 0x080c, 0x62a4, 0x0120, 0x2021, 0x400a, 0x0804, + 0x3193, 0x00d6, 0x0096, 0xa964, 0xaa6c, 0xab70, 0xac74, 0xad78, + 0xae7c, 0xa884, 0x90be, 0x0100, 0x0904, 0x43ee, 0x90be, 0x0112, + 0x0904, 0x43ee, 0x90be, 0x0113, 0x0904, 0x43ee, 0x90be, 0x0114, + 0x0904, 0x43ee, 0x90be, 0x0117, 0x0904, 0x43ee, 0x90be, 0x011a, + 0x0904, 0x43ee, 0x90be, 0x011c, 0x0904, 0x43ee, 0x90be, 0x0121, + 0x0904, 0x43d5, 0x90be, 0x0131, 0x0904, 0x43d5, 0x90be, 0x0171, + 0x0904, 0x43ee, 0x90be, 0x0173, 0x0904, 0x43ee, 0x90be, 0x01a1, + 0x1128, 0xa894, 0x8007, 0xa896, 0x0804, 0x43f9, 0x90be, 0x0212, + 0x0904, 0x43e2, 0x90be, 0x0213, 0x05e8, 0x90be, 0x0214, 0x0500, + 0x90be, 0x0217, 0x0188, 0x90be, 0x021a, 0x1120, 0xa89c, 0x8007, + 0xa89e, 0x04e0, 0x90be, 0x021f, 0x05c8, 0x90be, 0x0300, 0x05b0, + 0x009e, 0x00de, 0x0804, 0x31c6, 0x7028, 0x9080, 0x0010, 0x2098, + 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0007, 0x080c, 0x4437, + 0x7028, 0x9080, 0x000e, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, + 0x20a9, 0x0001, 0x080c, 0x4437, 0x00c8, 0x7028, 0x9080, 0x000c, + 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, + 0x4444, 0x00b8, 0x7028, 0x9080, 0x000e, 0x2098, 0x20a0, 0x7034, + 0x20e0, 0x20e8, 0x20a9, 0x0001, 0x080c, 0x4444, 0x7028, 0x9080, + 0x000c, 0x2098, 0x20a0, 0x7034, 0x20e0, 0x20e8, 0x20a9, 0x0001, + 0x04f1, 0x00c6, 0x080c, 0x4612, 0x0550, 0xa868, 0xc0fd, 0xa86a, + 0xa867, 0x0119, 0x9006, 0xa882, 0xa87f, 0x0020, 0xa88b, 0x0001, + 0x810b, 0xa9ae, 0xa8b2, 0xaab6, 0xabba, 0xacbe, 0xadc2, 0xa9c6, + 0xa8ca, 0x00ce, 0x009e, 0x00de, 0xa866, 0xa822, 0xa868, 0xc0fd, + 0xa86a, 0xa804, 0x2048, 0x080c, 0xb77e, 0x1120, 0x2009, 0x0003, + 0x0804, 0x31c3, 0x7007, 0x0003, 0x701f, 0x442e, 0x0005, 0x00ce, + 0x009e, 0x00de, 0x2009, 0x0002, 0x0804, 0x31c3, 0xa820, 0x9086, + 0x8001, 0x1904, 0x3191, 0x2009, 0x0004, 0x0804, 0x31c3, 0x0016, + 0x0026, 0x3510, 0x20a9, 0x0002, 0x4002, 0x4104, 0x4004, 0x8211, + 0x1dc8, 0x002e, 0x001e, 0x0005, 0x0016, 0x0026, 0x0036, 0x0046, + 0x3520, 0x20a9, 0x0004, 0x4002, 0x4304, 0x4204, 0x4104, 0x4004, + 0x8421, 0x1db8, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005, 0x81ff, + 0x0120, 0x2009, 0x0001, 0x0804, 0x31c3, 0x60d4, 0xd0ac, 0x1130, + 0xd09c, 0x1120, 0x2009, 0x0005, 0x0804, 0x31c3, 0x7984, 0x78a8, + 0x2040, 0x080c, 0x9940, 0x1120, 0x9182, 0x007f, 0x0a04, 0x31c6, + 0x9186, 0x00ff, 0x0904, 0x31c6, 0x9182, 0x0800, 0x1a04, 0x31c6, + 0x7a8c, 0x7b88, 0x6074, 0x9306, 0x1140, 0x6078, 0x924e, 0x0904, + 0x31c6, 0x99cc, 0xff00, 0x0904, 0x31c6, 0x0126, 0x2091, 0x8000, + 0x080c, 0x452c, 0x0560, 0x90c6, 0x4000, 0x1170, 0x00c6, 0x0006, + 0x900e, 0x080c, 0x619e, 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, + 0xc18d, 0x000e, 0x00ce, 0x00b8, 0x90c6, 0x4007, 0x1110, 0x2408, + 0x0090, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0060, 0x90c6, + 0x4009, 0x1108, 0x0040, 0x90c6, 0x4006, 0x1108, 0x0020, 0x2001, + 0x4005, 0x2009, 0x000a, 0x2020, 0x012e, 0x0804, 0x3193, 0x2b00, + 0x7026, 0x0016, 0x00b6, 0x00c6, 0x00e6, 0x2c70, 0x080c, 0x9a23, + 0x0904, 0x4501, 0x2b00, 0x6012, 0x080c, 0xba69, 0x2e58, 0x00ee, + 0x00e6, 0x00c6, 0x080c, 0x4612, 0x00ce, 0x2b70, 0x1158, 0x080c, + 0x99d6, 0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e, 0x2009, 0x0002, + 0x0804, 0x31c3, 0x900e, 0xa966, 0xa96a, 0x2900, 0x6016, 0xa932, + 0xa868, 0xc0fd, 0xd88c, 0x0108, 0xc0f5, 0xa86a, 0x080c, 0x2e30, + 0x6023, 0x0001, 0x9006, 0x080c, 0x5ebb, 0x2001, 0x0002, 0x080c, + 0x5ecf, 0x2009, 0x0002, 0x080c, 0x9a50, 0x78a8, 0xd094, 0x0138, + 0x00ee, 0x7024, 0x00e6, 0x2058, 0xb8bc, 0xc08d, 0xb8be, 0x9085, + 0x0001, 0x00ee, 0x00ce, 0x00be, 0x001e, 0x012e, 0x1120, 0x2009, + 0x0003, 0x0804, 0x31c3, 0x7007, 0x0003, 0x701f, 0x4510, 0x0005, + 0xa830, 0x9086, 0x0100, 0x7024, 0x2058, 0x1138, 0x2009, 0x0004, + 0xba04, 0x9294, 0x00ff, 0x0804, 0x5070, 0x900e, 0xa868, 0xd0f4, + 0x1904, 0x3191, 0x080c, 0x619e, 0x1108, 0xc185, 0xb800, 0xd0bc, + 0x0108, 0xc18d, 0x0804, 0x3191, 0x00e6, 0x00d6, 0x0096, 0x83ff, + 0x0904, 0x4574, 0x902e, 0x080c, 0x9940, 0x0130, 0x9026, 0x20a9, + 0x0800, 0x2071, 0x1000, 0x0030, 0x2021, 0x007f, 0x20a9, 0x0781, + 0x2071, 0x107f, 0x2e04, 0x9005, 0x11b0, 0x2100, 0x9406, 0x15e8, + 0x2428, 0x94ce, 0x007f, 0x1120, 0x92ce, 0xfffd, 0x1528, 0x0030, + 0x94ce, 0x0080, 0x1130, 0x92ce, 0xfffc, 0x11f0, 0x93ce, 0x00ff, + 0x11d8, 0xc5fd, 0x0450, 0x2058, 0xbf10, 0x2700, 0x9306, 0x11b8, + 0xbe14, 0x2600, 0x9206, 0x1198, 0x2400, 0x9106, 0x1150, 0xd884, + 0x0568, 0xd894, 0x1558, 0x080c, 0x62a4, 0x1540, 0x2001, 0x4000, + 0x0430, 0x2001, 0x4007, 0x0418, 0x2001, 0x4006, 0x0400, 0x2400, + 0x9106, 0x1158, 0xbe14, 0x87ff, 0x1128, 0x86ff, 0x0948, 0x080c, + 0x9940, 0x1930, 0x2001, 0x4008, 0x0090, 0x8420, 0x8e70, 0x1f04, + 0x4542, 0x85ff, 0x1130, 0x2001, 0x4009, 0x0048, 0x2001, 0x0001, + 0x0030, 0x080c, 0x5f1e, 0x1dd0, 0xbb12, 0xba16, 0x9006, 0x9005, + 0x009e, 0x00de, 0x00ee, 0x0005, 0x81ff, 0x0120, 0x2009, 0x0001, + 0x0804, 0x31c3, 0x080c, 0x4612, 0x1120, 0x2009, 0x0002, 0x0804, + 0x31c3, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x7884, 0x9005, + 0x0904, 0x31c6, 0x9096, 0x00ff, 0x0120, 0x9092, 0x0004, 0x1a04, + 0x31c6, 0x2010, 0x2918, 0x080c, 0x2dd6, 0x1120, 0x2009, 0x0003, + 0x0804, 0x31c3, 0x7007, 0x0003, 0x701f, 0x45c7, 0x0005, 0xa830, + 0x9086, 0x0100, 0x1904, 0x3191, 0x2009, 0x0004, 0x0804, 0x31c3, + 0x7984, 0x080c, 0x9940, 0x1120, 0x9182, 0x007f, 0x0a04, 0x31c6, + 0x9186, 0x00ff, 0x0904, 0x31c6, 0x9182, 0x0800, 0x1a04, 0x31c6, + 0x2001, 0x9000, 0x080c, 0x50cb, 0x1904, 0x31c3, 0x0804, 0x3191, + 0xa998, 0x080c, 0x9940, 0x1118, 0x9182, 0x007f, 0x0280, 0x9186, + 0x00ff, 0x0168, 0x9182, 0x0800, 0x1250, 0x2001, 0x9000, 0x080c, + 0x50cb, 0x11a8, 0x0060, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, + 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, + 0x4000, 0x900e, 0x9085, 0x0001, 0x2001, 0x0000, 0x0005, 0x2009, + 0x000a, 0x0c48, 0x080c, 0x0fd5, 0x0198, 0x9006, 0xa802, 0x7014, + 0x9005, 0x1120, 0x2900, 0x7016, 0x701a, 0x0040, 0x7018, 0xa802, + 0x0086, 0x2040, 0x2900, 0xa006, 0x701a, 0x008e, 0x9085, 0x0001, + 0x0005, 0x7984, 0x080c, 0x5f7e, 0x1130, 0x7e88, 0x9684, 0x3fff, + 0x9082, 0x4000, 0x0208, 0x905e, 0x8bff, 0x0005, 0xa998, 0x080c, + 0x5f7e, 0x1130, 0xae9c, 0x9684, 0x3fff, 0x9082, 0x4000, 0x0208, + 0x905e, 0x8bff, 0x0005, 0xae98, 0x0008, 0x7e84, 0x2608, 0x080c, + 0x5f7e, 0x1108, 0x0008, 0x905e, 0x8bff, 0x0005, 0x0016, 0x7114, + 0x81ff, 0x0128, 0x2148, 0xa904, 0x080c, 0x1007, 0x0cc8, 0x7116, + 0x711a, 0x001e, 0x0005, 0x2031, 0x0001, 0x0010, 0x2031, 0x0000, + 0x2061, 0x18ae, 0x2c44, 0xa66a, 0xa17a, 0xa772, 0xa076, 0xa28e, + 0xa392, 0xa496, 0xa59a, 0x080c, 0x10b5, 0x7007, 0x0002, 0x701f, + 0x3191, 0x0005, 0x00f6, 0x0126, 0x2091, 0x8000, 0x2079, 0x0000, + 0x2001, 0x18a6, 0x2004, 0x9005, 0x1190, 0x0e04, 0x468f, 0x7a36, + 0x7833, 0x0012, 0x7a82, 0x7b86, 0x7c8a, 0x2091, 0x4080, 0x2001, + 0x0089, 0x2004, 0xd084, 0x190c, 0x1167, 0x0804, 0x46f5, 0x0016, + 0x0086, 0x0096, 0x00c6, 0x00e6, 0x2071, 0x1894, 0x7044, 0x9005, + 0x1540, 0x7148, 0x9182, 0x0010, 0x0288, 0x7038, 0x2060, 0x080c, + 0x0fd5, 0x0904, 0x46ed, 0xa84b, 0x0000, 0x2900, 0x7046, 0x2001, + 0x0002, 0x9080, 0x1da2, 0x2005, 0xa846, 0x0098, 0x7038, 0x90e0, + 0x0004, 0x2001, 0x18b0, 0x9c82, 0x18f0, 0x0210, 0x2061, 0x18b0, + 0x2c00, 0x703a, 0x7148, 0x81ff, 0x1108, 0x703e, 0x8108, 0x714a, + 0x0460, 0x7148, 0x8108, 0x714a, 0x7044, 0x2040, 0xa144, 0x2105, + 0x0016, 0x908a, 0x0036, 0x1a0c, 0x0db2, 0x2060, 0x001e, 0x8108, + 0x2105, 0x9005, 0xa146, 0x1520, 0x080c, 0x0fd5, 0x1130, 0x8109, + 0xa946, 0x7148, 0x8109, 0x714a, 0x00d8, 0x9006, 0xa806, 0xa84a, + 0xa046, 0x2800, 0xa802, 0x2900, 0xa006, 0x7046, 0x2001, 0x0002, + 0x9080, 0x1da2, 0x2005, 0xa846, 0x0058, 0x2262, 0x6306, 0x640a, + 0x00ee, 0x00ce, 0x009e, 0x008e, 0x001e, 0x012e, 0x00fe, 0x0005, + 0x2c00, 0x9082, 0x001b, 0x0002, 0x4717, 0x4717, 0x4719, 0x4717, + 0x4717, 0x4717, 0x471d, 0x4717, 0x4717, 0x4717, 0x4721, 0x4717, + 0x4717, 0x4717, 0x4725, 0x4717, 0x4717, 0x4717, 0x4729, 0x4717, + 0x4717, 0x4717, 0x472d, 0x4717, 0x4717, 0x4717, 0x4732, 0x080c, + 0x0db2, 0xa276, 0xa37a, 0xa47e, 0x0898, 0xa286, 0xa38a, 0xa48e, + 0x0878, 0xa296, 0xa39a, 0xa49e, 0x0858, 0xa2a6, 0xa3aa, 0xa4ae, + 0x0838, 0xa2b6, 0xa3ba, 0xa4be, 0x0818, 0xa2c6, 0xa3ca, 0xa4ce, + 0x0804, 0x46f0, 0xa2d6, 0xa3da, 0xa4de, 0x0804, 0x46f0, 0x00e6, + 0x2071, 0x1894, 0x7048, 0x9005, 0x0904, 0x47c9, 0x0126, 0x2091, + 0x8000, 0x0e04, 0x47c8, 0x00f6, 0x2079, 0x0000, 0x00c6, 0x0096, + 0x0086, 0x0076, 0x9006, 0x2038, 0x7040, 0x2048, 0x9005, 0x0500, + 0xa948, 0x2105, 0x0016, 0x908a, 0x0036, 0x1a0c, 0x0db2, 0x2060, + 0x001e, 0x8108, 0x2105, 0x9005, 0xa94a, 0x1904, 0x47cb, 0xa804, + 0x9005, 0x090c, 0x0db2, 0x7042, 0x2938, 0x2040, 0xa003, 0x0000, + 0x2001, 0x0002, 0x9080, 0x1da2, 0x2005, 0xa04a, 0x0804, 0x47cb, + 0x703c, 0x2060, 0x2c14, 0x6304, 0x6408, 0x650c, 0x2200, 0x7836, + 0x7833, 0x0012, 0x7882, 0x2300, 0x7886, 0x2400, 0x788a, 0x2091, + 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1167, 0x87ff, + 0x0118, 0x2748, 0x080c, 0x1007, 0x7048, 0x8001, 0x704a, 0x9005, + 0x1170, 0x7040, 0x2048, 0x9005, 0x0128, 0x080c, 0x1007, 0x9006, + 0x7042, 0x7046, 0x703b, 0x18b0, 0x703f, 0x18b0, 0x0420, 0x7040, + 0x9005, 0x1508, 0x7238, 0x2c00, 0x9206, 0x0148, 0x9c80, 0x0004, + 0x90fa, 0x18f0, 0x0210, 0x2001, 0x18b0, 0x703e, 0x00a0, 0x9006, + 0x703e, 0x703a, 0x7044, 0x9005, 0x090c, 0x0db2, 0x2048, 0xa800, + 0x9005, 0x1de0, 0x2900, 0x7042, 0x2001, 0x0002, 0x9080, 0x1da2, + 0x2005, 0xa84a, 0x0000, 0x007e, 0x008e, 0x009e, 0x00ce, 0x00fe, + 0x012e, 0x00ee, 0x0005, 0x2c00, 0x9082, 0x001b, 0x0002, 0x47ea, + 0x47ea, 0x47ec, 0x47ea, 0x47ea, 0x47ea, 0x47f1, 0x47ea, 0x47ea, + 0x47ea, 0x47f6, 0x47ea, 0x47ea, 0x47ea, 0x47fb, 0x47ea, 0x47ea, + 0x47ea, 0x4800, 0x47ea, 0x47ea, 0x47ea, 0x4805, 0x47ea, 0x47ea, + 0x47ea, 0x480a, 0x080c, 0x0db2, 0xaa74, 0xab78, 0xac7c, 0x0804, + 0x4776, 0xaa84, 0xab88, 0xac8c, 0x0804, 0x4776, 0xaa94, 0xab98, + 0xac9c, 0x0804, 0x4776, 0xaaa4, 0xaba8, 0xacac, 0x0804, 0x4776, + 0xaab4, 0xabb8, 0xacbc, 0x0804, 0x4776, 0xaac4, 0xabc8, 0xaccc, + 0x0804, 0x4776, 0xaad4, 0xabd8, 0xacdc, 0x0804, 0x4776, 0x0016, + 0x0026, 0x0036, 0x00b6, 0x00c6, 0x2009, 0x007e, 0x080c, 0x5f7e, + 0x2019, 0x0001, 0xb85c, 0xd0ac, 0x0110, 0x2019, 0x0000, 0x2011, + 0x801b, 0x080c, 0x4672, 0x00ce, 0x00be, 0x003e, 0x002e, 0x001e, + 0x0005, 0x0026, 0x080c, 0x5113, 0xd0c4, 0x0120, 0x2011, 0x8014, + 0x080c, 0x4672, 0x002e, 0x0005, 0x81ff, 0x1904, 0x31c3, 0x0126, + 0x2091, 0x8000, 0x6030, 0xc08d, 0xc085, 0xc0ac, 0x6032, 0x080c, + 0x6c53, 0x1158, 0x080c, 0x6f2a, 0x080c, 0x5a21, 0x9085, 0x0001, + 0x080c, 0x6c9a, 0x080c, 0x6b8a, 0x0010, 0x080c, 0x58e0, 0x012e, + 0x0804, 0x3191, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x31c3, + 0x080c, 0x5127, 0x0120, 0x2009, 0x0007, 0x0804, 0x31c3, 0x080c, + 0x629c, 0x0120, 0x2009, 0x0008, 0x0804, 0x31c3, 0x080c, 0x2f81, + 0x0128, 0x7984, 0x080c, 0x5f1e, 0x1904, 0x31c6, 0x080c, 0x4645, + 0x0904, 0x31c6, 0x2b00, 0x7026, 0x080c, 0x62a4, 0x7888, 0x1170, + 0x9084, 0x0005, 0x1158, 0x900e, 0x080c, 0x619e, 0x1108, 0xc185, + 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x3191, 0x080c, 0x4612, + 0x0904, 0x31c3, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, + 0x080c, 0xb817, 0x0904, 0x31c3, 0x7888, 0xd094, 0x0118, 0xb8bc, + 0xc08d, 0xb8be, 0x7007, 0x0003, 0x701f, 0x48eb, 0x0005, 0x2061, + 0x1800, 0x080c, 0x5127, 0x2009, 0x0007, 0x1578, 0x080c, 0x629c, + 0x0118, 0x2009, 0x0008, 0x0448, 0x080c, 0x2f81, 0x0120, 0xa998, + 0x080c, 0x5f1e, 0x1530, 0x080c, 0x4643, 0x0518, 0x080c, 0x62a4, + 0xa89c, 0x1168, 0x9084, 0x0005, 0x1150, 0x900e, 0x080c, 0x619e, + 0x1108, 0xc185, 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x00d0, 0xa868, + 0xc0fc, 0xa86a, 0x080c, 0xb817, 0x11e0, 0xa89c, 0xd094, 0x0118, + 0xb8bc, 0xc08d, 0xb8be, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, + 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, + 0x0005, 0xa897, 0x4000, 0xa99a, 0x9006, 0x918d, 0x0001, 0x2008, + 0x0005, 0x9006, 0x0005, 0xa830, 0x9086, 0x0100, 0x7024, 0x2058, + 0x1110, 0x0804, 0x5070, 0x900e, 0x080c, 0x619e, 0x1108, 0xc185, + 0xb800, 0xd0bc, 0x0108, 0xc18d, 0x0804, 0x3191, 0x080c, 0x5127, + 0x0120, 0x2009, 0x0007, 0x0804, 0x31c3, 0x7f84, 0x7a8c, 0x7b88, + 0x7c9c, 0x7d98, 0x080c, 0x4612, 0x1120, 0x2009, 0x0002, 0x0804, + 0x31c3, 0x900e, 0x2130, 0x7126, 0x7132, 0xa860, 0x20e8, 0x7036, + 0xa85c, 0x9080, 0x0005, 0x702a, 0x20a0, 0x080c, 0x5f7e, 0x1904, + 0x4981, 0x080c, 0x62a4, 0x0120, 0x080c, 0x62ac, 0x1904, 0x4981, + 0x080c, 0x629c, 0x1130, 0x080c, 0x619e, 0x1118, 0xd79c, 0x0904, + 0x4981, 0xd794, 0x1110, 0xd784, 0x01a8, 0xb8b4, 0x20e0, 0xb8b8, + 0x9080, 0x0006, 0x2098, 0x3400, 0xd794, 0x0160, 0x20a9, 0x0008, + 0x4003, 0x2098, 0x20a0, 0x3d00, 0x20e0, 0x20a9, 0x0002, 0x080c, + 0x4444, 0x0048, 0x20a9, 0x0004, 0x4003, 0x2098, 0x20a0, 0x3d00, + 0x20e0, 0x080c, 0x4444, 0x4104, 0xd794, 0x0528, 0xb8b4, 0x20e0, + 0xb8b8, 0x2060, 0x9c80, 0x0000, 0x2098, 0x20a9, 0x0002, 0x4003, + 0x9c80, 0x0003, 0x2098, 0x20a9, 0x0001, 0x4005, 0x9c80, 0x0004, + 0x2098, 0x3400, 0x20a9, 0x0002, 0x4003, 0x2098, 0x20a0, 0x3d00, + 0x20e0, 0x080c, 0x4437, 0x9c80, 0x0026, 0x2098, 0xb8b4, 0x20e0, + 0x20a9, 0x0002, 0x4003, 0xd794, 0x0110, 0x96b0, 0x000b, 0x96b0, + 0x0005, 0x8108, 0x080c, 0x9940, 0x0118, 0x9186, 0x0800, 0x0040, + 0xd78c, 0x0120, 0x9186, 0x0800, 0x0170, 0x0018, 0x9186, 0x007e, + 0x0150, 0xd794, 0x0118, 0x9686, 0x0020, 0x0010, 0x9686, 0x0028, + 0x0150, 0x0804, 0x491d, 0x86ff, 0x1120, 0x7124, 0x810b, 0x0804, + 0x3191, 0x7033, 0x0001, 0x7122, 0x7024, 0x9600, 0x7026, 0x772e, + 0x2061, 0x18ae, 0x2c44, 0xa06b, 0x0000, 0xa67a, 0x7034, 0xa072, + 0x7028, 0xa076, 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x10b5, + 0x7007, 0x0002, 0x701f, 0x49bd, 0x0005, 0x7030, 0x9005, 0x1180, + 0x7120, 0x7028, 0x20a0, 0x772c, 0x9036, 0x7034, 0x20e8, 0x2061, + 0x18ae, 0x2c44, 0xa28c, 0xa390, 0xa494, 0xa598, 0x0804, 0x491d, + 0x7124, 0x810b, 0x0804, 0x3191, 0x2029, 0x007e, 0x7984, 0x7a88, + 0x7b8c, 0x7c98, 0x9184, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, + 0x31c6, 0x9502, 0x0a04, 0x31c6, 0x9184, 0x00ff, 0x90e2, 0x0020, + 0x0a04, 0x31c6, 0x9502, 0x0a04, 0x31c6, 0x9284, 0xff00, 0x8007, + 0x90e2, 0x0020, 0x0a04, 0x31c6, 0x9502, 0x0a04, 0x31c6, 0x9284, + 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x31c6, 0x9502, 0x0a04, 0x31c6, + 0x9384, 0xff00, 0x8007, 0x90e2, 0x0020, 0x0a04, 0x31c6, 0x9502, + 0x0a04, 0x31c6, 0x9384, 0x00ff, 0x90e2, 0x0020, 0x0a04, 0x31c6, + 0x9502, 0x0a04, 0x31c6, 0x9484, 0xff00, 0x8007, 0x90e2, 0x0020, + 0x0a04, 0x31c6, 0x9502, 0x0a04, 0x31c6, 0x9484, 0x00ff, 0x90e2, + 0x0020, 0x0a04, 0x31c6, 0x9502, 0x0a04, 0x31c6, 0x2061, 0x1958, + 0x6102, 0x6206, 0x630a, 0x640e, 0x0804, 0x3191, 0x0006, 0x080c, + 0x5113, 0xd0cc, 0x000e, 0x0005, 0x0006, 0x080c, 0x5117, 0xd0bc, + 0x000e, 0x0005, 0x616c, 0x7a84, 0x6300, 0x82ff, 0x1118, 0x7986, + 0x0804, 0x3191, 0x83ff, 0x1904, 0x31c6, 0x2001, 0xfff0, 0x9200, + 0x1a04, 0x31c6, 0x2019, 0xffff, 0x6070, 0x9302, 0x9200, 0x0a04, + 0x31c6, 0x7986, 0x626e, 0x0804, 0x3191, 0x080c, 0x5127, 0x1904, + 0x31c3, 0x7c88, 0x7d84, 0x7e98, 0x7f8c, 0x080c, 0x4612, 0x0904, + 0x31c3, 0x900e, 0x901e, 0x7326, 0x7332, 0xa860, 0x20e8, 0x7036, + 0xa85c, 0x9080, 0x0003, 0x702a, 0x20a0, 0x91d8, 0x1000, 0x2b5c, + 0x8bff, 0x0178, 0x080c, 0x62a4, 0x0118, 0x080c, 0x62ac, 0x1148, + 0x20a9, 0x0001, 0xb814, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398, + 0x0003, 0x8108, 0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x0170, + 0x0c20, 0x83ff, 0x1148, 0x7224, 0x900e, 0x2001, 0x0003, 0x080c, + 0x7e7f, 0x2208, 0x0804, 0x3191, 0x7033, 0x0001, 0x7122, 0x7024, + 0x9300, 0x7026, 0x2061, 0x18ae, 0x2c44, 0xa06b, 0x0000, 0xa37a, + 0x7028, 0xa076, 0x7034, 0xa072, 0xa48e, 0xa592, 0xa696, 0xa79a, + 0x080c, 0x10b5, 0x7007, 0x0002, 0x701f, 0x4aaf, 0x0005, 0x7030, + 0x9005, 0x1178, 0x7120, 0x7028, 0x20a0, 0x901e, 0x7034, 0x20e8, + 0x2061, 0x18ae, 0x2c44, 0xa48c, 0xa590, 0xa694, 0xa798, 0x0804, + 0x4a6d, 0x7224, 0x900e, 0x2001, 0x0003, 0x080c, 0x7e7f, 0x2208, + 0x0804, 0x3191, 0x00f6, 0x00e6, 0x080c, 0x5127, 0x2009, 0x0007, + 0x1904, 0x4b42, 0x2071, 0x1894, 0x745c, 0x84ff, 0x2009, 0x000e, + 0x1904, 0x4b42, 0xac9c, 0xad98, 0xaea4, 0xafa0, 0x0096, 0x080c, + 0x0fee, 0x2009, 0x0002, 0x0904, 0x4b42, 0x2900, 0x705e, 0x900e, + 0x901e, 0x7356, 0x7362, 0xa860, 0x7066, 0xa85c, 0x9080, 0x0003, + 0x705a, 0x20a0, 0x91d8, 0x1000, 0x2b5c, 0x8bff, 0x0178, 0x080c, + 0x62a4, 0x0118, 0x080c, 0x62ac, 0x1148, 0xb814, 0x20a9, 0x0001, + 0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003, 0x8108, 0x9182, + 0x0800, 0x0120, 0x9386, 0x003c, 0x01e8, 0x0c20, 0x83ff, 0x11c0, + 0x7254, 0x900e, 0x2001, 0x0003, 0x080c, 0x7e7f, 0x2208, 0x009e, + 0xa897, 0x4000, 0xa99a, 0x715c, 0x81ff, 0x090c, 0x0db2, 0x2148, + 0x080c, 0x1007, 0x9006, 0x705e, 0x918d, 0x0001, 0x2008, 0x0418, + 0x7063, 0x0001, 0x7152, 0x7054, 0x9300, 0x7056, 0x2061, 0x18af, + 0x2c44, 0xa37a, 0x7058, 0xa076, 0x7064, 0xa072, 0xa48e, 0xa592, + 0xa696, 0xa79a, 0xa09f, 0x4b4e, 0x000e, 0xa0a2, 0x080c, 0x10b5, + 0x9006, 0x0048, 0x009e, 0xa897, 0x4005, 0xa99a, 0x900e, 0x9085, + 0x0001, 0x2001, 0x0030, 0x00ee, 0x00fe, 0x0005, 0x00f6, 0xa0a0, + 0x904d, 0x090c, 0x0db2, 0x00e6, 0x2071, 0x1894, 0xa06c, 0x908e, + 0x0100, 0x0138, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4002, + 0x00d8, 0x7060, 0x9005, 0x1158, 0x7150, 0x7058, 0x20a0, 0x901e, + 0x7064, 0x20e8, 0xa48c, 0xa590, 0xa694, 0xa798, 0x0428, 0xa87b, + 0x0000, 0xa883, 0x0000, 0xa897, 0x4000, 0x7254, 0x900e, 0x2001, + 0x0003, 0x080c, 0x7e7f, 0xaa9a, 0x715c, 0x81ff, 0x090c, 0x0db2, + 0x2148, 0x080c, 0x1007, 0x705f, 0x0000, 0xa0a0, 0x2048, 0x0126, + 0x2091, 0x8000, 0x080c, 0x6536, 0x012e, 0xa09f, 0x0000, 0xa0a3, + 0x0000, 0x00ee, 0x00fe, 0x0005, 0x91d8, 0x1000, 0x2b5c, 0x8bff, + 0x0178, 0x080c, 0x62a4, 0x0118, 0x080c, 0x62ac, 0x1148, 0xb814, + 0x20a9, 0x0001, 0x4004, 0xb810, 0x4004, 0x4104, 0x9398, 0x0003, + 0x8108, 0x9182, 0x0800, 0x0120, 0x9386, 0x003c, 0x0518, 0x0c20, + 0x83ff, 0x11f0, 0x7154, 0x810c, 0xa99a, 0xa897, 0x4000, 0x715c, + 0x81ff, 0x090c, 0x0db2, 0x2148, 0x080c, 0x1007, 0x9006, 0x705e, + 0x918d, 0x0001, 0x2008, 0xa0a0, 0x2048, 0x0126, 0x2091, 0x8000, + 0x080c, 0x6536, 0x012e, 0xa09f, 0x0000, 0xa0a3, 0x0000, 0x0070, + 0x7063, 0x0001, 0x7152, 0x7054, 0x9300, 0x7056, 0xa37a, 0xa48e, + 0xa592, 0xa696, 0xa79a, 0x080c, 0x10b5, 0x9006, 0x00ee, 0x0005, + 0x0096, 0xa88c, 0x90be, 0x7000, 0x0148, 0x90be, 0x7100, 0x0130, + 0x90be, 0x7200, 0x0118, 0x009e, 0x0804, 0x31c6, 0xa884, 0xa988, + 0x080c, 0x24d6, 0x1518, 0x080c, 0x5f1e, 0x1500, 0x7126, 0xbe12, + 0xbd16, 0xae7c, 0x080c, 0x4612, 0x01c8, 0x080c, 0x4612, 0x01b0, + 0x009e, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0xa823, 0x0000, + 0xa804, 0x2048, 0x080c, 0xb79e, 0x1120, 0x2009, 0x0003, 0x0804, + 0x31c3, 0x7007, 0x0003, 0x701f, 0x4c1b, 0x0005, 0x009e, 0x2009, + 0x0002, 0x0804, 0x31c3, 0x7124, 0x080c, 0x2f28, 0xa820, 0x9086, + 0x8001, 0x1120, 0x2009, 0x0004, 0x0804, 0x31c3, 0x2900, 0x7022, + 0xa804, 0x0096, 0x2048, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, + 0x9084, 0xffc0, 0x009e, 0x9080, 0x0002, 0x0076, 0x0006, 0x2098, + 0x20a0, 0x27e0, 0x27e8, 0x20a9, 0x002a, 0x080c, 0x0f52, 0xaa6c, + 0xab70, 0xac74, 0xad78, 0x2061, 0x18ae, 0x2c44, 0xa06b, 0x0000, + 0xae64, 0xaf8c, 0x97c6, 0x7000, 0x0118, 0x97c6, 0x7100, 0x1148, + 0x96c2, 0x0004, 0x0600, 0x2009, 0x0004, 0x000e, 0x007e, 0x0804, + 0x465e, 0x97c6, 0x7200, 0x11b8, 0x96c2, 0x0054, 0x02a0, 0x000e, + 0x007e, 0x2061, 0x18ae, 0x2c44, 0xa076, 0xa772, 0xa07b, 0x002a, + 0xa28e, 0xa392, 0xa496, 0xa59a, 0x080c, 0x10b5, 0x7007, 0x0002, + 0x701f, 0x4c77, 0x0005, 0x000e, 0x007e, 0x0804, 0x31c6, 0x7020, + 0x2048, 0xa804, 0x2048, 0xa804, 0x2048, 0x8906, 0x8006, 0x8007, + 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2098, 0x20a0, + 0x27e0, 0x27e8, 0x20a9, 0x002a, 0x080c, 0x0f52, 0x2100, 0x2238, + 0x2061, 0x18ae, 0x2c44, 0xa28c, 0xa390, 0xa494, 0xa598, 0x2009, + 0x002a, 0x0804, 0x465e, 0x81ff, 0x1904, 0x31c3, 0x798c, 0x2001, + 0x194f, 0x2102, 0x080c, 0x4629, 0x0904, 0x31c6, 0x080c, 0x62a4, + 0x0120, 0x080c, 0x62ac, 0x1904, 0x31c6, 0x080c, 0x6045, 0x0904, + 0x31c3, 0x0126, 0x2091, 0x8000, 0x080c, 0x610b, 0x012e, 0x0904, + 0x31c3, 0x0804, 0x417a, 0xa9a0, 0x2001, 0x194f, 0xc18d, 0x2102, + 0x080c, 0x4636, 0x01a0, 0x080c, 0x62a4, 0x0118, 0x080c, 0x62ac, + 0x1170, 0x080c, 0x6045, 0x2009, 0x0002, 0x0128, 0x080c, 0x610b, + 0x1170, 0x2009, 0x0003, 0xa897, 0x4005, 0xa99a, 0x0010, 0xa897, + 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, 0x0005, 0xa897, + 0x4000, 0x080c, 0x511b, 0x0110, 0x9006, 0x0018, 0x900e, 0x9085, + 0x0001, 0x2001, 0x0000, 0x0005, 0x78a8, 0xd08c, 0x1118, 0xd084, + 0x0904, 0x40ef, 0x080c, 0x4645, 0x0904, 0x31c6, 0x080c, 0x4612, + 0x1120, 0x2009, 0x0002, 0x0804, 0x31c3, 0x080c, 0x62a4, 0x0130, + 0x908e, 0x0004, 0x0118, 0x908e, 0x0005, 0x15a0, 0x78a8, 0xd08c, + 0x0120, 0xb800, 0xc08c, 0xb802, 0x0028, 0x080c, 0x5113, 0xd0b4, + 0x0904, 0x4129, 0x7884, 0x908e, 0x007e, 0x0904, 0x4129, 0x908e, + 0x007f, 0x0904, 0x4129, 0x908e, 0x0080, 0x0904, 0x4129, 0xb800, + 0xd08c, 0x1904, 0x4129, 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, + 0x080c, 0xb7bd, 0x1120, 0x2009, 0x0003, 0x0804, 0x31c3, 0x7007, + 0x0003, 0x701f, 0x4d34, 0x0005, 0x080c, 0x4645, 0x0904, 0x31c6, + 0x0804, 0x4129, 0x080c, 0x2f81, 0x0108, 0x0005, 0x2009, 0x1832, + 0x210c, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x31c3, 0x080c, + 0x5127, 0x0120, 0x2009, 0x0007, 0x0804, 0x31c3, 0x080c, 0x629c, + 0x0120, 0x2009, 0x0008, 0x0804, 0x31c3, 0xb89c, 0xd0a4, 0x1118, + 0xd0ac, 0x1904, 0x4129, 0x9006, 0xa866, 0xa832, 0xa868, 0xc0fd, + 0xa86a, 0x080c, 0xb817, 0x1120, 0x2009, 0x0003, 0x0804, 0x31c3, + 0x7007, 0x0003, 0x701f, 0x4d6d, 0x0005, 0xa830, 0x9086, 0x0100, + 0x1120, 0x2009, 0x0004, 0x0804, 0x5070, 0x080c, 0x4645, 0x0904, + 0x31c6, 0x0804, 0x4d06, 0x81ff, 0x2009, 0x0001, 0x1904, 0x31c3, + 0x080c, 0x5127, 0x2009, 0x0007, 0x1904, 0x31c3, 0x080c, 0x629c, + 0x0120, 0x2009, 0x0008, 0x0804, 0x31c3, 0x080c, 0x4645, 0x0904, + 0x31c6, 0x080c, 0x62a4, 0x2009, 0x0009, 0x1904, 0x31c3, 0x080c, + 0x4612, 0x2009, 0x0002, 0x0904, 0x31c3, 0x9006, 0xa866, 0xa832, + 0xa868, 0xc0fd, 0xa86a, 0x7988, 0x9194, 0xff00, 0x918c, 0x00ff, + 0x9006, 0x82ff, 0x1128, 0xc0ed, 0xa952, 0x798c, 0xa956, 0x0038, + 0x928e, 0x0100, 0x1904, 0x31c6, 0xc0e5, 0xa952, 0xa956, 0xa83e, + 0x080c, 0xba6a, 0x2009, 0x0003, 0x0904, 0x31c3, 0x7007, 0x0003, + 0x701f, 0x4dc3, 0x0005, 0xa830, 0x9086, 0x0100, 0x2009, 0x0004, + 0x0904, 0x31c3, 0x0804, 0x3191, 0x7aa8, 0x9284, 0xc000, 0x0148, + 0xd2ec, 0x01a0, 0x080c, 0x5127, 0x1188, 0x2009, 0x0014, 0x0804, + 0x31c3, 0xd2dc, 0x1568, 0x81ff, 0x2009, 0x0001, 0x1904, 0x31c3, + 0x080c, 0x5127, 0x2009, 0x0007, 0x1904, 0x31c3, 0xd2f4, 0x0130, + 0x9284, 0x5000, 0x080c, 0x50ee, 0x0804, 0x3191, 0xd2fc, 0x0158, + 0x080c, 0x4645, 0x0904, 0x31c6, 0x7984, 0x9284, 0x9000, 0x080c, + 0x50cb, 0x0804, 0x3191, 0x080c, 0x4645, 0x0904, 0x31c6, 0xb804, + 0x9084, 0x00ff, 0x9086, 0x0006, 0x2009, 0x0009, 0x1904, 0x4eac, + 0x080c, 0x4612, 0x2009, 0x0002, 0x0904, 0x4eac, 0xa85c, 0x9080, + 0x001b, 0xaf60, 0x2009, 0x0008, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, + 0x080c, 0x465b, 0x701f, 0x4e1d, 0x0005, 0xa86c, 0x9086, 0x0500, + 0x1138, 0xa870, 0x9005, 0x1120, 0xa874, 0x9084, 0xff00, 0x0110, + 0x1904, 0x31c6, 0xa866, 0xa832, 0xa868, 0xc0fd, 0xa86a, 0x080c, + 0x4645, 0x1110, 0x0804, 0x31c6, 0x2009, 0x0043, 0x080c, 0xbad2, + 0x2009, 0x0003, 0x0904, 0x4eac, 0x7007, 0x0003, 0x701f, 0x4e41, + 0x0005, 0xa830, 0x9086, 0x0100, 0x2009, 0x0004, 0x0904, 0x4eac, + 0x7984, 0x7aa8, 0x9284, 0x1000, 0x080c, 0x50cb, 0x0804, 0x3191, + 0x00c6, 0xaab0, 0x9284, 0xc000, 0x0140, 0xd2ec, 0x0168, 0x080c, + 0x5127, 0x1150, 0x2009, 0x0014, 0x04f0, 0x2061, 0x1800, 0x080c, + 0x5127, 0x2009, 0x0007, 0x15b8, 0xd2f4, 0x0128, 0x9284, 0x5000, + 0x080c, 0x50ee, 0x0050, 0xd2fc, 0x0178, 0x080c, 0x4643, 0x0588, + 0xa998, 0x9284, 0x9000, 0x080c, 0x50cb, 0xa87b, 0x0000, 0xa883, + 0x0000, 0xa897, 0x4000, 0x0438, 0x080c, 0x4643, 0x0510, 0x080c, + 0x62a4, 0x2009, 0x0009, 0x11b8, 0xa8c4, 0x9086, 0x0500, 0x11c8, + 0xa8c8, 0x9005, 0x11b0, 0xa8cc, 0x9084, 0xff00, 0x1190, 0x080c, + 0x4643, 0x1108, 0x0070, 0x2009, 0x004b, 0x080c, 0xbad2, 0x2009, + 0x0003, 0x0108, 0x0078, 0x0429, 0x19c0, 0xa897, 0x4005, 0xa99a, + 0x0010, 0xa897, 0x4006, 0x900e, 0x9085, 0x0001, 0x2001, 0x0030, + 0x00ce, 0x0005, 0x9006, 0x0ce0, 0x7aa8, 0xd2dc, 0x0904, 0x31c3, + 0x0016, 0x7984, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x50cb, 0x001e, + 0x1904, 0x31c3, 0x0804, 0x3191, 0x00f6, 0x2d78, 0x0011, 0x00fe, + 0x0005, 0xaab0, 0xd2dc, 0x0150, 0x0016, 0xa998, 0x9284, 0x1000, + 0xc0fd, 0x080c, 0x50cb, 0x001e, 0x9085, 0x0001, 0x0005, 0x81ff, + 0x0120, 0x2009, 0x0001, 0x0804, 0x31c3, 0x080c, 0x5127, 0x0120, + 0x2009, 0x0007, 0x0804, 0x31c3, 0x7984, 0x7ea8, 0x96b4, 0x00ff, + 0x080c, 0x5f7e, 0x1904, 0x31c6, 0x9186, 0x007f, 0x0138, 0x080c, + 0x62a4, 0x0120, 0x2009, 0x0009, 0x0804, 0x31c3, 0x080c, 0x4612, + 0x1120, 0x2009, 0x0002, 0x0804, 0x31c3, 0xa867, 0x0000, 0xa868, + 0xc0fd, 0xa86a, 0x2001, 0x0100, 0x8007, 0xa80a, 0x080c, 0xb7d7, + 0x1120, 0x2009, 0x0003, 0x0804, 0x31c3, 0x7007, 0x0003, 0x701f, + 0x4f0a, 0x0005, 0xa808, 0x8007, 0x9086, 0x0100, 0x1120, 0x2009, + 0x0004, 0x0804, 0x31c3, 0xa8e0, 0xa866, 0xa810, 0x8007, 0x9084, + 0x00ff, 0x800c, 0xa814, 0x8007, 0x9084, 0x00ff, 0x8004, 0x9080, + 0x0002, 0x9108, 0x8906, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, + 0xffc0, 0x9080, 0x0004, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0x0804, + 0x465e, 0x080c, 0x4612, 0x1120, 0x2009, 0x0002, 0x0804, 0x31c3, + 0x7984, 0x9194, 0xff00, 0x918c, 0x00ff, 0x8217, 0x82ff, 0x1118, + 0x7023, 0x1982, 0x0040, 0x92c6, 0x0001, 0x1118, 0x7023, 0x199c, + 0x0010, 0x0804, 0x31c6, 0x2009, 0x001a, 0x7a8c, 0x7b88, 0x7c9c, + 0x7d98, 0xa85c, 0x9080, 0x0019, 0xaf60, 0x080c, 0x465b, 0x701f, + 0x4f5a, 0x0005, 0x2001, 0x182c, 0x2003, 0x0001, 0xa85c, 0x9080, + 0x0019, 0x2098, 0xa860, 0x20e0, 0x20a9, 0x001a, 0x7020, 0x20a0, + 0x20e9, 0x0001, 0x4003, 0x0804, 0x3191, 0x080c, 0x4612, 0x1120, + 0x2009, 0x0002, 0x0804, 0x31c3, 0x7984, 0x9194, 0xff00, 0x918c, + 0x00ff, 0x8217, 0x82ff, 0x1118, 0x2099, 0x1982, 0x0040, 0x92c6, + 0x0001, 0x1118, 0x2099, 0x199c, 0x0010, 0x0804, 0x31c6, 0xa85c, + 0x9080, 0x0019, 0x20a0, 0xa860, 0x20e8, 0x20a9, 0x001a, 0x20e1, + 0x0001, 0x4003, 0x2009, 0x001a, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, + 0xa85c, 0x9080, 0x0019, 0xaf60, 0x0804, 0x465e, 0x7884, 0x908a, + 0x1000, 0x1a04, 0x31c6, 0x0126, 0x2091, 0x8000, 0x8003, 0x800b, + 0x810b, 0x9108, 0x00c6, 0x2061, 0x19c9, 0x6142, 0x00ce, 0x012e, + 0x0804, 0x3191, 0x00c6, 0x080c, 0x6c53, 0x1160, 0x080c, 0x6f2a, + 0x080c, 0x5a21, 0x9085, 0x0001, 0x080c, 0x6c9a, 0x080c, 0x6b8a, + 0x080c, 0x0db2, 0x2061, 0x1800, 0x6030, 0xc09d, 0x6032, 0x080c, + 0x58e0, 0x00ce, 0x0005, 0x00c6, 0x2001, 0x1800, 0x2004, 0x908e, + 0x0000, 0x0904, 0x31c3, 0x7884, 0x9005, 0x0188, 0x7888, 0x2061, + 0x196b, 0x2c0c, 0x2062, 0x080c, 0x28b8, 0x01a0, 0x080c, 0x28c0, + 0x0188, 0x080c, 0x28c8, 0x0170, 0x2162, 0x0804, 0x31c6, 0x2061, + 0x0100, 0x6038, 0x9086, 0x0007, 0x1118, 0x2009, 0x0001, 0x0010, + 0x2009, 0x0000, 0x7884, 0x9086, 0x0002, 0x1548, 0x2061, 0x0100, + 0x6028, 0xc09c, 0x602a, 0x0026, 0x2011, 0x0003, 0x080c, 0x92ec, + 0x2011, 0x0002, 0x080c, 0x92f6, 0x002e, 0x080c, 0x91de, 0x0036, + 0x901e, 0x080c, 0x9254, 0x003e, 0x60e3, 0x0000, 0x080c, 0xd343, + 0x080c, 0xd35e, 0x9085, 0x0001, 0x080c, 0x6c9a, 0x9006, 0x080c, + 0x2987, 0x2001, 0x1800, 0x2003, 0x0004, 0x6027, 0x0008, 0x00ce, + 0x0804, 0x3191, 0x81ff, 0x0120, 0x2009, 0x0001, 0x0804, 0x31c3, + 0x080c, 0x5127, 0x0120, 0x2009, 0x0007, 0x0804, 0x31c3, 0x7984, + 0x7ea8, 0x96b4, 0x00ff, 0x080c, 0x5f7e, 0x1904, 0x31c6, 0x9186, + 0x007f, 0x0138, 0x080c, 0x62a4, 0x0120, 0x2009, 0x0009, 0x0804, + 0x31c3, 0x080c, 0x4612, 0x1120, 0x2009, 0x0002, 0x0804, 0x31c3, + 0xa867, 0x0000, 0xa868, 0xc0fd, 0xa86a, 0x080c, 0xb7da, 0x1120, + 0x2009, 0x0003, 0x0804, 0x31c3, 0x7007, 0x0003, 0x701f, 0x5059, + 0x0005, 0xa830, 0x9086, 0x0100, 0x1120, 0x2009, 0x0004, 0x0804, + 0x31c3, 0xa8e0, 0xa866, 0xa834, 0x8007, 0x800c, 0xa85c, 0x9080, + 0x000c, 0x7a8c, 0x7b88, 0x7c9c, 0x7d98, 0xaf60, 0x0804, 0x465e, + 0xa898, 0x9086, 0x000d, 0x1904, 0x31c3, 0x2021, 0x4005, 0x0126, + 0x2091, 0x8000, 0x0e04, 0x507d, 0x0010, 0x012e, 0x0cc0, 0x7c36, + 0x9486, 0x4000, 0x0118, 0x7833, 0x0011, 0x0010, 0x7833, 0x0010, + 0x7883, 0x4005, 0xa998, 0x7986, 0xa9a4, 0x799a, 0xa9a8, 0x799e, + 0x080c, 0x464e, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, + 0x190c, 0x1167, 0x7007, 0x0001, 0x2091, 0x5000, 0x700f, 0x0000, + 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x00c6, 0x2061, 0x19c9, + 0x7984, 0x6152, 0x614e, 0x6057, 0x0000, 0x604b, 0x0009, 0x7898, + 0x606a, 0x789c, 0x6066, 0x7888, 0x6062, 0x788c, 0x605e, 0x2001, + 0x19d7, 0x2044, 0x2001, 0x19de, 0xa076, 0xa060, 0xa072, 0xa07b, + 0x0001, 0xa07f, 0x0002, 0xa06b, 0x0000, 0xa09f, 0x0000, 0x00ce, + 0x012e, 0x0804, 0x3191, 0x0126, 0x2091, 0x8000, 0x00b6, 0x00c6, + 0x90e4, 0xc000, 0x0128, 0x0006, 0x080c, 0xb648, 0x000e, 0x1198, + 0xd0e4, 0x0160, 0x9180, 0x1000, 0x2004, 0x905d, 0x0160, 0x080c, + 0x5a3b, 0x080c, 0x9940, 0x0110, 0xb817, 0x0000, 0x9006, 0x00ce, + 0x00be, 0x012e, 0x0005, 0x9085, 0x0001, 0x0cc8, 0x0126, 0x2091, + 0x8000, 0x0156, 0x2010, 0x900e, 0x20a9, 0x0800, 0x0016, 0x9180, + 0x1000, 0x2004, 0x9005, 0x0180, 0x9186, 0x007e, 0x0168, 0x9186, + 0x007f, 0x0150, 0x9186, 0x0080, 0x0138, 0x9186, 0x00ff, 0x0120, + 0x0026, 0x2200, 0x0801, 0x002e, 0x001e, 0x8108, 0x1f04, 0x50f6, + 0x015e, 0x012e, 0x0005, 0x2001, 0x1854, 0x2004, 0x0005, 0x2001, + 0x1873, 0x2004, 0x0005, 0x0006, 0x2001, 0x180f, 0x2004, 0xd0d4, + 0x000e, 0x0005, 0x2001, 0x180d, 0x2004, 0xd0b4, 0x0005, 0x2001, + 0x1800, 0x2004, 0x9086, 0x0003, 0x0005, 0x0016, 0x00e6, 0x2071, + 0x1894, 0x7108, 0x910d, 0x710a, 0x00ee, 0x001e, 0x0005, 0x0126, + 0x0156, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6, + 0x00f6, 0x2061, 0x0100, 0x2069, 0x0200, 0x2071, 0x1800, 0x6044, + 0xd0a4, 0x11e8, 0xd084, 0x0118, 0x080c, 0x52e0, 0x0068, 0xd08c, + 0x0118, 0x080c, 0x51e9, 0x0040, 0xd094, 0x0118, 0x080c, 0x51b9, + 0x0018, 0xd09c, 0x0108, 0x0099, 0x00fe, 0x00ee, 0x00de, 0x00ce, + 0x01de, 0x01ce, 0x014e, 0x013e, 0x015e, 0x012e, 0x0005, 0x0016, + 0x6128, 0xd19c, 0x1110, 0xc19d, 0x612a, 0x001e, 0x0c68, 0x0006, + 0x7090, 0x9005, 0x000e, 0x0120, 0x7093, 0x0000, 0x708b, 0x0000, + 0x624c, 0x9286, 0xf0f0, 0x1150, 0x6048, 0x9086, 0xf0f0, 0x0130, + 0x624a, 0x6043, 0x0090, 0x6043, 0x0010, 0x0490, 0x9294, 0xff00, + 0x9296, 0xf700, 0x0178, 0x7134, 0xd1a4, 0x1160, 0x6240, 0x9295, + 0x0100, 0x6242, 0x9294, 0x0010, 0x0128, 0x2009, 0x00f7, 0x080c, + 0x599d, 0x00f0, 0x6040, 0x9084, 0x0010, 0x9085, 0x0140, 0x6042, + 0x6043, 0x0000, 0x707f, 0x0000, 0x709b, 0x0001, 0x70bf, 0x0000, + 0x70d7, 0x0000, 0x2009, 0x1c80, 0x200b, 0x0000, 0x708f, 0x0000, + 0x7083, 0x000f, 0x2009, 0x000f, 0x2011, 0x5883, 0x080c, 0x7cd9, + 0x0005, 0x2001, 0x1875, 0x2004, 0xd08c, 0x0110, 0x7057, 0xffff, + 0x7080, 0x9005, 0x1528, 0x2011, 0x5883, 0x080c, 0x7c4a, 0x6040, + 0x9094, 0x0010, 0x9285, 0x0020, 0x6042, 0x20a9, 0x00c8, 0x6044, + 0xd08c, 0x1168, 0x1f04, 0x51cf, 0x6242, 0x7093, 0x0000, 0x6040, + 0x9094, 0x0010, 0x9285, 0x0080, 0x6042, 0x6242, 0x0048, 0x6242, + 0x7093, 0x0000, 0x7087, 0x0000, 0x9006, 0x080c, 0x5a26, 0x0000, + 0x0005, 0x7084, 0x908a, 0x0003, 0x1a0c, 0x0db2, 0x000b, 0x0005, + 0x51f3, 0x5244, 0x52df, 0x00f6, 0x0016, 0x6900, 0x918c, 0x0800, + 0x7087, 0x0001, 0x2001, 0x015d, 0x2003, 0x0000, 0x6803, 0x00fc, + 0x20a9, 0x0004, 0x6800, 0x9084, 0x00fc, 0x0120, 0x1f04, 0x5202, + 0x080c, 0x0db2, 0x68a0, 0x68a2, 0x689c, 0x689e, 0x6898, 0x689a, + 0xa001, 0x918d, 0x1600, 0x6902, 0x001e, 0x6837, 0x0020, 0x080c, + 0x5a02, 0x2079, 0x1c00, 0x7833, 0x1101, 0x7837, 0x0000, 0x20e1, + 0x0001, 0x2099, 0x1805, 0x20e9, 0x0001, 0x20a1, 0x1c0e, 0x20a9, + 0x0004, 0x4003, 0x080c, 0x97ce, 0x20e1, 0x0001, 0x2099, 0x1c00, + 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014, 0x4003, 0x60c3, + 0x000c, 0x600f, 0x0000, 0x080c, 0x58b4, 0x00fe, 0x9006, 0x708a, + 0x6043, 0x0008, 0x6042, 0x0005, 0x00f6, 0x7088, 0x708b, 0x0000, + 0x9025, 0x0904, 0x52bc, 0x6020, 0xd0b4, 0x1904, 0x52ba, 0x7198, + 0x81ff, 0x0904, 0x52a8, 0x9486, 0x000c, 0x1904, 0x52b5, 0x9480, + 0x0018, 0x8004, 0x20a8, 0x080c, 0x59fb, 0x2011, 0x0260, 0x2019, + 0x1c00, 0x220c, 0x2304, 0x9106, 0x11e8, 0x8210, 0x8318, 0x1f04, + 0x5261, 0x6043, 0x0004, 0x2061, 0x0140, 0x605b, 0xbc94, 0x605f, + 0xf0f0, 0x2061, 0x0100, 0x6043, 0x0006, 0x7087, 0x0002, 0x7093, + 0x0002, 0x2009, 0x07d0, 0x2011, 0x588a, 0x080c, 0x7cd9, 0x080c, + 0x5a02, 0x04c0, 0x080c, 0x59fb, 0x2079, 0x0260, 0x7930, 0x918e, + 0x1101, 0x1558, 0x7834, 0x9005, 0x1540, 0x7900, 0x918c, 0x00ff, + 0x1118, 0x7804, 0x9005, 0x0190, 0x080c, 0x59fb, 0x2011, 0x026e, + 0x2019, 0x1805, 0x20a9, 0x0004, 0x220c, 0x2304, 0x9102, 0x0230, + 0x11a0, 0x8210, 0x8318, 0x1f04, 0x529c, 0x0078, 0x709b, 0x0000, + 0x080c, 0x59fb, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0001, + 0x20a1, 0x1c00, 0x20a9, 0x0014, 0x4003, 0x6043, 0x0008, 0x6043, + 0x0000, 0x0010, 0x00fe, 0x0005, 0x6040, 0x9085, 0x0100, 0x6042, + 0x6020, 0xd0b4, 0x1db8, 0x080c, 0x97ce, 0x20e1, 0x0001, 0x2099, + 0x1c00, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x0014, 0x4003, + 0x60c3, 0x000c, 0x2011, 0x19c0, 0x2013, 0x0000, 0x708b, 0x0000, + 0x60a3, 0x0056, 0x60a7, 0x9575, 0x080c, 0x8fb2, 0x08d8, 0x0005, + 0x7090, 0x908a, 0x001d, 0x1a0c, 0x0db2, 0x000b, 0x0005, 0x5311, + 0x5324, 0x534d, 0x536d, 0x5393, 0x53c2, 0x53e8, 0x5420, 0x5446, + 0x5474, 0x54af, 0x54e7, 0x5505, 0x5530, 0x5552, 0x556d, 0x5577, + 0x55ab, 0x55d1, 0x5600, 0x5626, 0x565e, 0x56a2, 0x56df, 0x5700, + 0x5759, 0x577b, 0x57a9, 0x57a9, 0x00c6, 0x2061, 0x1800, 0x6003, + 0x0007, 0x2061, 0x0100, 0x6004, 0x9084, 0xfff9, 0x6006, 0x00ce, + 0x0005, 0x2061, 0x0140, 0x605b, 0xbc94, 0x605f, 0xf0f0, 0x2061, + 0x0100, 0x6043, 0x0002, 0x7093, 0x0001, 0x2009, 0x07d0, 0x2011, + 0x588a, 0x080c, 0x7cd9, 0x0005, 0x00f6, 0x7088, 0x9086, 0x0014, + 0x1510, 0x6042, 0x6020, 0xd0b4, 0x11f0, 0x080c, 0x59fb, 0x2079, + 0x0260, 0x7a30, 0x9296, 0x1102, 0x11a0, 0x7834, 0x9005, 0x1188, + 0x7a38, 0xd2fc, 0x0128, 0x70bc, 0x9005, 0x1110, 0x70bf, 0x0001, + 0x2011, 0x588a, 0x080c, 0x7c4a, 0x7093, 0x0010, 0x080c, 0x5577, + 0x0010, 0x708b, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x7093, 0x0003, + 0x6043, 0x0004, 0x2011, 0x588a, 0x080c, 0x7c4a, 0x080c, 0x597f, + 0x2079, 0x0240, 0x7833, 0x1102, 0x7837, 0x0000, 0x20a9, 0x0008, + 0x9f88, 0x000e, 0x200b, 0x0000, 0x8108, 0x1f04, 0x5362, 0x60c3, + 0x0014, 0x080c, 0x58b4, 0x00fe, 0x0005, 0x00f6, 0x7088, 0x9005, + 0x0500, 0x2011, 0x588a, 0x080c, 0x7c4a, 0x9086, 0x0014, 0x11b8, + 0x080c, 0x59fb, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1102, 0x1178, + 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70bc, 0x9005, + 0x1110, 0x70bf, 0x0001, 0x7093, 0x0004, 0x0029, 0x0010, 0x080c, + 0x59d7, 0x00fe, 0x0005, 0x00f6, 0x7093, 0x0005, 0x080c, 0x597f, + 0x2079, 0x0240, 0x7833, 0x1103, 0x7837, 0x0000, 0x080c, 0x59fb, + 0x080c, 0x59de, 0x1170, 0x707c, 0x9005, 0x1158, 0x7154, 0x9186, + 0xffff, 0x0138, 0x2011, 0x0008, 0x080c, 0x5837, 0x0168, 0x080c, + 0x59b4, 0x20a9, 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, + 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x58b4, + 0x00fe, 0x0005, 0x00f6, 0x7088, 0x9005, 0x0500, 0x2011, 0x588a, + 0x080c, 0x7c4a, 0x9086, 0x0014, 0x11b8, 0x080c, 0x59fb, 0x2079, + 0x0260, 0x7a30, 0x9296, 0x1103, 0x1178, 0x7834, 0x9005, 0x1160, + 0x7a38, 0xd2fc, 0x0128, 0x70bc, 0x9005, 0x1110, 0x70bf, 0x0001, + 0x7093, 0x0006, 0x0029, 0x0010, 0x080c, 0x59d7, 0x00fe, 0x0005, + 0x00f6, 0x7093, 0x0007, 0x080c, 0x597f, 0x2079, 0x0240, 0x7833, + 0x1104, 0x7837, 0x0000, 0x080c, 0x59fb, 0x080c, 0x59de, 0x11b8, + 0x707c, 0x9005, 0x11a0, 0x715c, 0x9186, 0xffff, 0x0180, 0x9180, + 0x2f92, 0x200d, 0x918c, 0xff00, 0x810f, 0x2011, 0x0008, 0x080c, + 0x5837, 0x0180, 0x080c, 0x4a34, 0x0110, 0x080c, 0x253f, 0x20a9, + 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, + 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x58b4, 0x00fe, 0x0005, + 0x00f6, 0x7088, 0x9005, 0x0500, 0x2011, 0x588a, 0x080c, 0x7c4a, + 0x9086, 0x0014, 0x11b8, 0x080c, 0x59fb, 0x2079, 0x0260, 0x7a30, + 0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, + 0x0128, 0x70bc, 0x9005, 0x1110, 0x70bf, 0x0001, 0x7093, 0x0008, + 0x0029, 0x0010, 0x080c, 0x59d7, 0x00fe, 0x0005, 0x00f6, 0x7093, + 0x0009, 0x080c, 0x597f, 0x2079, 0x0240, 0x7833, 0x1105, 0x7837, + 0x0100, 0x080c, 0x59de, 0x1150, 0x707c, 0x9005, 0x1138, 0x080c, + 0x57aa, 0x1188, 0x9085, 0x0001, 0x080c, 0x253f, 0x20a9, 0x0008, + 0x080c, 0x59fb, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, + 0x20a1, 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x58b4, 0x0010, + 0x080c, 0x5304, 0x00fe, 0x0005, 0x00f6, 0x7088, 0x9005, 0x05a8, + 0x2011, 0x588a, 0x080c, 0x7c4a, 0x9086, 0x0014, 0x1560, 0x080c, + 0x59fb, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1105, 0x1520, 0x7834, + 0x9084, 0x0100, 0x2011, 0x0100, 0x921e, 0x1160, 0x7a38, 0xd2fc, + 0x0128, 0x70bc, 0x9005, 0x1110, 0x70bf, 0x0001, 0x7093, 0x000a, + 0x00b1, 0x0098, 0x9005, 0x1178, 0x7a38, 0xd2fc, 0x0128, 0x70bc, + 0x9005, 0x1110, 0x70bf, 0x0001, 0x708f, 0x0000, 0x7093, 0x000e, + 0x080c, 0x5552, 0x0010, 0x080c, 0x59d7, 0x00fe, 0x0005, 0x00f6, + 0x7093, 0x000b, 0x2011, 0x1c0e, 0x20e9, 0x0001, 0x22a0, 0x20a9, + 0x0040, 0x2019, 0xffff, 0x4304, 0x080c, 0x597f, 0x2079, 0x0240, + 0x7833, 0x1106, 0x7837, 0x0000, 0x080c, 0x59de, 0x0118, 0x2013, + 0x0000, 0x0020, 0x7058, 0x9085, 0x0100, 0x2012, 0x20a9, 0x0040, + 0x2009, 0x024e, 0x2011, 0x1c0e, 0x220e, 0x8210, 0x8108, 0x9186, + 0x0260, 0x1128, 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x1f04, + 0x54d4, 0x60c3, 0x0084, 0x080c, 0x58b4, 0x00fe, 0x0005, 0x00f6, + 0x7088, 0x9005, 0x01c0, 0x2011, 0x588a, 0x080c, 0x7c4a, 0x9086, + 0x0084, 0x1178, 0x080c, 0x59fb, 0x2079, 0x0260, 0x7a30, 0x9296, + 0x1106, 0x1138, 0x7834, 0x9005, 0x1120, 0x7093, 0x000c, 0x0029, + 0x0010, 0x080c, 0x59d7, 0x00fe, 0x0005, 0x00f6, 0x7093, 0x000d, + 0x080c, 0x597f, 0x2079, 0x0240, 0x7833, 0x1107, 0x7837, 0x0000, + 0x080c, 0x59fb, 0x20a9, 0x0040, 0x2011, 0x026e, 0x2009, 0x024e, + 0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1150, 0x6810, 0x8000, + 0x6812, 0x2009, 0x0240, 0x6814, 0x8000, 0x6816, 0x2011, 0x0260, + 0x1f04, 0x5518, 0x60c3, 0x0084, 0x080c, 0x58b4, 0x00fe, 0x0005, + 0x00f6, 0x7088, 0x9005, 0x01e0, 0x2011, 0x588a, 0x080c, 0x7c4a, + 0x9086, 0x0084, 0x1198, 0x080c, 0x59fb, 0x2079, 0x0260, 0x7a30, + 0x9296, 0x1107, 0x1158, 0x7834, 0x9005, 0x1140, 0x708f, 0x0001, + 0x080c, 0x5951, 0x7093, 0x000e, 0x0029, 0x0010, 0x080c, 0x59d7, + 0x00fe, 0x0005, 0x918d, 0x0001, 0x080c, 0x5a26, 0x7093, 0x000f, + 0x708b, 0x0000, 0x2061, 0x0140, 0x605b, 0xbc85, 0x605f, 0xb5b5, + 0x2061, 0x0100, 0x6043, 0x0005, 0x6043, 0x0004, 0x2009, 0x07d0, + 0x2011, 0x588a, 0x080c, 0x7c3e, 0x0005, 0x7088, 0x9005, 0x0130, + 0x2011, 0x588a, 0x080c, 0x7c4a, 0x7093, 0x0000, 0x0005, 0x7093, + 0x0011, 0x080c, 0x97ce, 0x080c, 0x59fb, 0x20e1, 0x0000, 0x2099, + 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x7488, 0x9480, 0x0018, + 0x9080, 0x0007, 0x9084, 0x03f8, 0x8004, 0x20a8, 0x4003, 0x080c, + 0x59de, 0x11a0, 0x7174, 0x81ff, 0x0188, 0x900e, 0x7078, 0x9084, + 0x00ff, 0x0160, 0x080c, 0x24d6, 0x9186, 0x007e, 0x0138, 0x9186, + 0x0080, 0x0120, 0x2011, 0x0008, 0x080c, 0x5837, 0x60c3, 0x0014, + 0x080c, 0x58b4, 0x0005, 0x00f6, 0x7088, 0x9005, 0x0500, 0x2011, + 0x588a, 0x080c, 0x7c4a, 0x9086, 0x0014, 0x11b8, 0x080c, 0x59fb, + 0x2079, 0x0260, 0x7a30, 0x9296, 0x1103, 0x1178, 0x7834, 0x9005, + 0x1160, 0x7a38, 0xd2fc, 0x0128, 0x70bc, 0x9005, 0x1110, 0x70bf, + 0x0001, 0x7093, 0x0012, 0x0029, 0x0010, 0x708b, 0x0000, 0x00fe, + 0x0005, 0x00f6, 0x7093, 0x0013, 0x080c, 0x598d, 0x2079, 0x0240, + 0x7833, 0x1103, 0x7837, 0x0000, 0x080c, 0x59fb, 0x080c, 0x59de, + 0x1170, 0x707c, 0x9005, 0x1158, 0x7154, 0x9186, 0xffff, 0x0138, + 0x2011, 0x0008, 0x080c, 0x5837, 0x0168, 0x080c, 0x59b4, 0x20a9, + 0x0008, 0x20e1, 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, + 0x024e, 0x4003, 0x60c3, 0x0014, 0x080c, 0x58b4, 0x00fe, 0x0005, + 0x00f6, 0x7088, 0x9005, 0x0500, 0x2011, 0x588a, 0x080c, 0x7c4a, + 0x9086, 0x0014, 0x11b8, 0x080c, 0x59fb, 0x2079, 0x0260, 0x7a30, + 0x9296, 0x1104, 0x1178, 0x7834, 0x9005, 0x1160, 0x7a38, 0xd2fc, + 0x0128, 0x70bc, 0x9005, 0x1110, 0x70bf, 0x0001, 0x7093, 0x0014, + 0x0029, 0x0010, 0x708b, 0x0000, 0x00fe, 0x0005, 0x00f6, 0x7093, + 0x0015, 0x080c, 0x598d, 0x2079, 0x0240, 0x7833, 0x1104, 0x7837, + 0x0000, 0x080c, 0x59fb, 0x080c, 0x59de, 0x11b8, 0x707c, 0x9005, + 0x11a0, 0x715c, 0x9186, 0xffff, 0x0180, 0x9180, 0x2f92, 0x200d, + 0x918c, 0xff00, 0x810f, 0x2011, 0x0008, 0x080c, 0x5837, 0x0180, + 0x080c, 0x4a34, 0x0110, 0x080c, 0x253f, 0x20a9, 0x0008, 0x20e1, + 0x0000, 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, + 0x60c3, 0x0014, 0x080c, 0x58b4, 0x00fe, 0x0005, 0x00f6, 0x7088, + 0x9005, 0x05f0, 0x2011, 0x588a, 0x080c, 0x7c4a, 0x9086, 0x0014, + 0x15a8, 0x080c, 0x59fb, 0x2079, 0x0260, 0x7a30, 0x9296, 0x1105, + 0x1568, 0x7834, 0x9084, 0x0100, 0x2011, 0x0100, 0x921e, 0x1168, + 0x9085, 0x0001, 0x080c, 0x5a26, 0x7a38, 0xd2fc, 0x0128, 0x70bc, + 0x9005, 0x1110, 0x70bf, 0x0001, 0x0080, 0x9005, 0x11b8, 0x7a38, + 0xd2fc, 0x0128, 0x70bc, 0x9005, 0x1110, 0x70bf, 0x0001, 0x9085, + 0x0001, 0x080c, 0x5a26, 0x708f, 0x0000, 0x7a38, 0xd2f4, 0x0110, + 0x70d7, 0x0008, 0x7093, 0x0016, 0x0029, 0x0010, 0x708b, 0x0000, + 0x00fe, 0x0005, 0x080c, 0x97ce, 0x080c, 0x59fb, 0x20e1, 0x0000, + 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, 0x0240, 0x20a9, 0x000e, + 0x4003, 0x2011, 0x026d, 0x2204, 0x9084, 0x0100, 0x2011, 0x024d, + 0x2012, 0x2011, 0x026e, 0x7093, 0x0017, 0x080c, 0x59de, 0x1150, + 0x707c, 0x9005, 0x1138, 0x080c, 0x57aa, 0x1188, 0x9085, 0x0001, + 0x080c, 0x253f, 0x20a9, 0x0008, 0x080c, 0x59fb, 0x20e1, 0x0000, + 0x2099, 0x026e, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x4003, 0x60c3, + 0x0014, 0x080c, 0x58b4, 0x0010, 0x080c, 0x5304, 0x0005, 0x00f6, + 0x7088, 0x9005, 0x01d8, 0x2011, 0x588a, 0x080c, 0x7c4a, 0x9086, + 0x0084, 0x1190, 0x080c, 0x59fb, 0x2079, 0x0260, 0x7a30, 0x9296, + 0x1106, 0x1150, 0x7834, 0x9005, 0x1138, 0x9006, 0x080c, 0x5a26, + 0x7093, 0x0018, 0x0029, 0x0010, 0x708b, 0x0000, 0x00fe, 0x0005, + 0x00f6, 0x7093, 0x0019, 0x080c, 0x598d, 0x2079, 0x0240, 0x7833, + 0x1106, 0x7837, 0x0000, 0x080c, 0x59fb, 0x2009, 0x026e, 0x2039, + 0x1c0e, 0x20a9, 0x0040, 0x213e, 0x8738, 0x8108, 0x9186, 0x0280, + 0x1128, 0x6814, 0x8000, 0x6816, 0x2009, 0x0260, 0x1f04, 0x5713, + 0x2039, 0x1c0e, 0x080c, 0x59de, 0x11e8, 0x2728, 0x2514, 0x8207, + 0x9084, 0x00ff, 0x8000, 0x2018, 0x9294, 0x00ff, 0x8007, 0x9205, + 0x202a, 0x7058, 0x2310, 0x8214, 0x92a0, 0x1c0e, 0x2414, 0x938c, + 0x0001, 0x0118, 0x9294, 0xff00, 0x0018, 0x9294, 0x00ff, 0x8007, + 0x9215, 0x2222, 0x20a9, 0x0040, 0x2009, 0x024e, 0x270e, 0x8738, + 0x8108, 0x9186, 0x0260, 0x1128, 0x6810, 0x8000, 0x6812, 0x2009, + 0x0240, 0x1f04, 0x5746, 0x60c3, 0x0084, 0x080c, 0x58b4, 0x00fe, + 0x0005, 0x00f6, 0x7088, 0x9005, 0x01e0, 0x2011, 0x588a, 0x080c, + 0x7c4a, 0x9086, 0x0084, 0x1198, 0x080c, 0x59fb, 0x2079, 0x0260, + 0x7a30, 0x9296, 0x1107, 0x1158, 0x7834, 0x9005, 0x1140, 0x708f, + 0x0001, 0x080c, 0x5951, 0x7093, 0x001a, 0x0029, 0x0010, 0x708b, + 0x0000, 0x00fe, 0x0005, 0x9085, 0x0001, 0x080c, 0x5a26, 0x7093, + 0x001b, 0x080c, 0x97ce, 0x080c, 0x59fb, 0x2011, 0x0260, 0x2009, + 0x0240, 0x7488, 0x9480, 0x0018, 0x9080, 0x0007, 0x9084, 0x03f8, + 0x8004, 0x20a8, 0x220e, 0x8210, 0x8108, 0x9186, 0x0260, 0x1150, + 0x6810, 0x8000, 0x6812, 0x2009, 0x0240, 0x6814, 0x8000, 0x6816, + 0x2011, 0x0260, 0x1f04, 0x5792, 0x60c3, 0x0084, 0x080c, 0x58b4, + 0x0005, 0x0005, 0x0086, 0x0096, 0x2029, 0x1854, 0x252c, 0x20a9, + 0x0008, 0x2041, 0x1c0e, 0x20e9, 0x0001, 0x28a0, 0x080c, 0x59fb, + 0x20e1, 0x0000, 0x2099, 0x026e, 0x4003, 0x20a9, 0x0008, 0x2011, + 0x0007, 0xd5d4, 0x0108, 0x9016, 0x2800, 0x9200, 0x200c, 0x91a6, + 0xffff, 0x1148, 0xd5d4, 0x0110, 0x8210, 0x0008, 0x8211, 0x1f04, + 0x57c4, 0x0804, 0x5833, 0x82ff, 0x1160, 0xd5d4, 0x0120, 0x91a6, + 0x3fff, 0x0d90, 0x0020, 0x91a6, 0x3fff, 0x0904, 0x5833, 0x918d, + 0xc000, 0x20a9, 0x0010, 0x2019, 0x0001, 0xd5d4, 0x0110, 0x2019, + 0x0010, 0x2120, 0xd5d4, 0x0110, 0x8423, 0x0008, 0x8424, 0x1240, + 0xd5d4, 0x0110, 0x8319, 0x0008, 0x8318, 0x1f04, 0x57ea, 0x04d8, + 0x23a8, 0x2021, 0x0001, 0x8426, 0x8425, 0x1f04, 0x57fc, 0x2328, + 0x8529, 0x92be, 0x0007, 0x0158, 0x0006, 0x2039, 0x0007, 0x2200, + 0x973a, 0x000e, 0x27a8, 0x95a8, 0x0010, 0x1f04, 0x580b, 0x7556, + 0x95c8, 0x2f92, 0x292d, 0x95ac, 0x00ff, 0x757a, 0x6532, 0x6536, + 0x0016, 0x2508, 0x080c, 0x251f, 0x001e, 0x60e7, 0x0000, 0x65ea, + 0x2018, 0x2304, 0x9405, 0x201a, 0x707f, 0x0001, 0x20e9, 0x0000, + 0x20a1, 0x024e, 0x20e1, 0x0001, 0x2898, 0x20a9, 0x0008, 0x4003, + 0x9085, 0x0001, 0x0008, 0x9006, 0x009e, 0x008e, 0x0005, 0x0156, + 0x01c6, 0x01d6, 0x0136, 0x0146, 0x22a8, 0x20e1, 0x0000, 0x2099, + 0x026e, 0x20e9, 0x0000, 0x2011, 0x024e, 0x22a0, 0x4003, 0x014e, + 0x013e, 0x01de, 0x01ce, 0x015e, 0x2118, 0x9026, 0x2001, 0x0007, + 0x939a, 0x0010, 0x0218, 0x8420, 0x8001, 0x0cd0, 0x2118, 0x84ff, + 0x0120, 0x939a, 0x0010, 0x8421, 0x1de0, 0x2021, 0x0001, 0x83ff, + 0x0118, 0x8423, 0x8319, 0x1de8, 0x9238, 0x2029, 0x026e, 0x9528, + 0x2504, 0x942c, 0x11b8, 0x9405, 0x203a, 0x7156, 0x91a0, 0x2f92, + 0x242d, 0x95ac, 0x00ff, 0x757a, 0x6532, 0x6536, 0x0016, 0x2508, + 0x080c, 0x251f, 0x001e, 0x60e7, 0x0000, 0x65ea, 0x707f, 0x0001, + 0x9084, 0x0000, 0x0005, 0x00e6, 0x2071, 0x1800, 0x7083, 0x0000, + 0x00ee, 0x0005, 0x00e6, 0x00f6, 0x2079, 0x0100, 0x2071, 0x0140, + 0x080c, 0x5940, 0x080c, 0x8fbb, 0x7004, 0x9084, 0x4000, 0x0110, + 0x080c, 0x2997, 0x0126, 0x2091, 0x8000, 0x2071, 0x1824, 0x2073, + 0x0000, 0x7840, 0x0026, 0x0016, 0x2009, 0x00f7, 0x080c, 0x599d, + 0x001e, 0x9094, 0x0010, 0x9285, 0x0080, 0x7842, 0x7a42, 0x002e, + 0x012e, 0x00fe, 0x00ee, 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, + 0x283d, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x2011, + 0x19c0, 0x2013, 0x0000, 0x708b, 0x0000, 0x012e, 0x60a3, 0x0056, + 0x60a7, 0x9575, 0x080c, 0x8fb2, 0x6144, 0xd184, 0x0120, 0x7190, + 0x918d, 0x2000, 0x0018, 0x7184, 0x918d, 0x1000, 0x2011, 0x1968, + 0x2112, 0x2009, 0x07d0, 0x2011, 0x588a, 0x080c, 0x7cd9, 0x0005, + 0x0016, 0x0026, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9947, + 0x2009, 0x00f7, 0x080c, 0x599d, 0x2061, 0x19c9, 0x900e, 0x611a, + 0x611e, 0x6172, 0x6176, 0x2061, 0x1800, 0x6003, 0x0001, 0x2061, + 0x0100, 0x6043, 0x0090, 0x6043, 0x0010, 0x2009, 0x1968, 0x200b, + 0x0000, 0x2009, 0x002d, 0x2011, 0x590c, 0x080c, 0x7c3e, 0x012e, + 0x00ce, 0x002e, 0x001e, 0x0005, 0x00e6, 0x0006, 0x0126, 0x2091, + 0x8000, 0x0471, 0x2071, 0x0100, 0x080c, 0x8fbb, 0x2071, 0x0140, + 0x7004, 0x9084, 0x4000, 0x0110, 0x080c, 0x2997, 0x080c, 0x6c5b, + 0x0188, 0x080c, 0x6c76, 0x1170, 0x080c, 0x6f34, 0x0016, 0x080c, + 0x25ee, 0x2001, 0x193e, 0x2102, 0x001e, 0x080c, 0x6f2f, 0x080c, + 0x6b8a, 0x0050, 0x2009, 0x0001, 0x080c, 0x28d6, 0x2001, 0x0001, + 0x080c, 0x247f, 0x080c, 0x58e0, 0x012e, 0x000e, 0x00ee, 0x0005, + 0x2001, 0x180d, 0x2004, 0xd0bc, 0x0158, 0x0026, 0x0036, 0x2011, + 0x8017, 0x2001, 0x1968, 0x201c, 0x080c, 0x4672, 0x003e, 0x002e, + 0x0005, 0x20a9, 0x0012, 0x20e9, 0x0001, 0x20a1, 0x1c80, 0x080c, + 0x59fb, 0x20e9, 0x0000, 0x2099, 0x026e, 0x0099, 0x20a9, 0x0020, + 0x080c, 0x59f5, 0x2099, 0x0260, 0x20a1, 0x1c92, 0x0051, 0x20a9, + 0x000e, 0x080c, 0x59f8, 0x2099, 0x0260, 0x20a1, 0x1cb2, 0x0009, + 0x0005, 0x0016, 0x0026, 0x3410, 0x3308, 0x2104, 0x8007, 0x2012, + 0x8108, 0x8210, 0x1f04, 0x5975, 0x002e, 0x001e, 0x0005, 0x080c, + 0x97ce, 0x20e1, 0x0001, 0x2099, 0x1c00, 0x20e9, 0x0000, 0x20a1, + 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005, 0x080c, 0x97ce, 0x080c, + 0x59fb, 0x20e1, 0x0000, 0x2099, 0x0260, 0x20e9, 0x0000, 0x20a1, + 0x0240, 0x20a9, 0x000c, 0x4003, 0x0005, 0x00c6, 0x0006, 0x2061, + 0x0100, 0x810f, 0x2001, 0x1832, 0x2004, 0x9005, 0x1138, 0x2001, + 0x1816, 0x2004, 0x9084, 0x00ff, 0x9105, 0x0010, 0x9185, 0x00f7, + 0x604a, 0x000e, 0x00ce, 0x0005, 0x0016, 0x0046, 0x080c, 0x62a0, + 0x0158, 0x9006, 0x2020, 0x2009, 0x002a, 0x080c, 0xcfe6, 0x2001, + 0x180c, 0x200c, 0xc195, 0x2102, 0x2019, 0x002a, 0x900e, 0x080c, + 0x2dfb, 0x080c, 0xbcec, 0x0140, 0x0036, 0x2019, 0xffff, 0x2021, + 0x0007, 0x080c, 0x4829, 0x003e, 0x004e, 0x001e, 0x0005, 0x080c, + 0x58e0, 0x7093, 0x0000, 0x708b, 0x0000, 0x0005, 0x0006, 0x2001, + 0x180c, 0x2004, 0xd09c, 0x0100, 0x000e, 0x0005, 0x0006, 0x0016, + 0x0126, 0x2091, 0x8000, 0x2001, 0x0101, 0x200c, 0x918d, 0x0006, + 0x2102, 0x012e, 0x001e, 0x000e, 0x0005, 0x2009, 0x0001, 0x0020, + 0x2009, 0x0002, 0x0008, 0x900e, 0x6814, 0x9084, 0xffc0, 0x910d, + 0x6916, 0x0005, 0x00f6, 0x0156, 0x0146, 0x01d6, 0x9006, 0x20a9, + 0x0080, 0x20e9, 0x0001, 0x20a1, 0x1c00, 0x4004, 0x2079, 0x1c00, + 0x7803, 0x2200, 0x7807, 0x00ef, 0x780f, 0x00ef, 0x7813, 0x0138, + 0x7823, 0xffff, 0x7827, 0xffff, 0x01de, 0x014e, 0x015e, 0x00fe, + 0x0005, 0x2001, 0x1800, 0x2003, 0x0001, 0x0005, 0x2001, 0x1975, + 0x0118, 0x2003, 0x0001, 0x0010, 0x2003, 0x0000, 0x0005, 0x0156, + 0x20a9, 0x0800, 0x2009, 0x1000, 0x9006, 0x200a, 0x8108, 0x1f04, + 0x5a35, 0x015e, 0x0005, 0x00d6, 0x0036, 0x0156, 0x0136, 0x0146, + 0x2069, 0x1853, 0x9006, 0xb802, 0xb8be, 0xb807, 0x0707, 0xb80a, + 0xb80e, 0xb812, 0x9198, 0x2f92, 0x231d, 0x939c, 0x00ff, 0xbb16, + 0x0016, 0x0026, 0xb8b2, 0x080c, 0x9940, 0x1120, 0x9192, 0x007e, + 0x1208, 0xbbb2, 0x20a9, 0x0004, 0xb8b4, 0x20e8, 0xb9b8, 0x9198, + 0x0006, 0x9006, 0x23a0, 0x4004, 0x20a9, 0x0004, 0x9198, 0x000a, + 0x23a0, 0x4004, 0x002e, 0x001e, 0xb83e, 0xb842, 0xb84e, 0xb852, + 0xb856, 0xb85a, 0xb85e, 0xb862, 0xb866, 0xb86a, 0xb86f, 0x0100, + 0xb872, 0xb876, 0xb87a, 0xb88a, 0xb88e, 0xb893, 0x0008, 0xb896, + 0xb89a, 0xb89e, 0xb8ae, 0xb9a2, 0x0096, 0xb8a4, 0x904d, 0x0110, + 0x080c, 0x1007, 0xb8a7, 0x0000, 0x009e, 0x9006, 0xb84a, 0x6810, + 0xb83a, 0x680c, 0xb846, 0x6814, 0x9084, 0x00ff, 0xb842, 0x014e, + 0x013e, 0x015e, 0x003e, 0x00de, 0x0005, 0x0126, 0x2091, 0x8000, + 0xa974, 0xae78, 0x9684, 0x3fff, 0x9082, 0x4000, 0x1a04, 0x5b0b, + 0x9182, 0x0800, 0x1a04, 0x5b0f, 0x2001, 0x180c, 0x2004, 0x9084, + 0x0003, 0x1904, 0x5b15, 0x9188, 0x1000, 0x2104, 0x905d, 0x0518, + 0xb804, 0x9084, 0x00ff, 0x908e, 0x0006, 0x1508, 0xb8a4, 0x900d, + 0x1904, 0x5b27, 0xb850, 0x900d, 0x1148, 0xa802, 0x2900, 0xb852, + 0xb84e, 0x080c, 0x801d, 0x9006, 0x012e, 0x0005, 0x00a6, 0x2150, + 0x2900, 0xb002, 0xa803, 0x0000, 0x00ae, 0xb852, 0x0c90, 0x2001, + 0x0005, 0x900e, 0x04b8, 0x2001, 0x0028, 0x900e, 0x0498, 0x9082, + 0x0006, 0x1290, 0x080c, 0x9940, 0x1160, 0xb8a0, 0x9084, 0xff80, + 0x1140, 0xb900, 0xd1fc, 0x0990, 0x2001, 0x0029, 0x2009, 0x1000, + 0x0408, 0x2001, 0x0028, 0x00a8, 0x2009, 0x180c, 0x210c, 0xd18c, + 0x0118, 0x2001, 0x0004, 0x0068, 0xd184, 0x0118, 0x2001, 0x0004, + 0x0040, 0x2001, 0x0029, 0xb900, 0xd1fc, 0x0118, 0x2009, 0x1000, + 0x0048, 0x900e, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018, 0x2001, + 0x0029, 0x900e, 0x9005, 0x012e, 0x0005, 0x2001, 0x180c, 0x2004, + 0xd084, 0x19d0, 0x9188, 0x1000, 0x2104, 0x905d, 0x09a8, 0x080c, + 0x62a4, 0x1990, 0xb800, 0xd0bc, 0x0978, 0x0804, 0x5abe, 0x080c, + 0x611a, 0x0904, 0x5ad7, 0x0804, 0x5ac2, 0x00b6, 0x00e6, 0x0126, + 0x2091, 0x8000, 0xa974, 0x9182, 0x0800, 0x1a04, 0x5ba8, 0x9188, + 0x1000, 0x2104, 0x905d, 0x0904, 0x5b80, 0xb8a0, 0x9086, 0x007f, + 0x0178, 0x080c, 0x62ac, 0x0160, 0xa994, 0x81ff, 0x0130, 0x908e, + 0x0004, 0x0130, 0x908e, 0x0005, 0x0118, 0x080c, 0x62a4, 0x1598, + 0xa87c, 0xd0fc, 0x01e0, 0xa894, 0x9005, 0x01c8, 0x2060, 0x0026, + 0x2010, 0x080c, 0xb5e9, 0x002e, 0x1120, 0x2001, 0x0008, 0x0804, + 0x5baa, 0x6020, 0x9086, 0x000a, 0x0120, 0x2001, 0x0008, 0x0804, + 0x5baa, 0x601a, 0x6003, 0x0008, 0x2900, 0x6016, 0x0058, 0x080c, + 0x9980, 0x05e8, 0x2b00, 0x6012, 0x2900, 0x6016, 0x600b, 0xffff, + 0x6023, 0x000a, 0x2009, 0x0003, 0x080c, 0x9a50, 0x9006, 0x0458, + 0x2001, 0x0028, 0x0438, 0x9082, 0x0006, 0x1290, 0x080c, 0x9940, + 0x1160, 0xb8a0, 0x9084, 0xff80, 0x1140, 0xb900, 0xd1fc, 0x0900, + 0x2001, 0x0029, 0x2009, 0x1000, 0x00a8, 0x2001, 0x0028, 0x0090, + 0x2009, 0x180c, 0x210c, 0xd18c, 0x0118, 0x2001, 0x0004, 0x0050, + 0xd184, 0x0118, 0x2001, 0x0004, 0x0028, 0x2001, 0x0029, 0x0010, + 0x2001, 0x0029, 0x9005, 0x012e, 0x00ee, 0x00be, 0x0005, 0x2001, + 0x002c, 0x0cc0, 0x00f6, 0x00b6, 0x0126, 0x2091, 0x8000, 0xa8e0, + 0x9005, 0x1550, 0xa8dc, 0x9082, 0x0101, 0x1630, 0xa8c8, 0x9005, + 0x1518, 0xa8c4, 0x9082, 0x0101, 0x12f8, 0xa974, 0x2079, 0x1800, + 0x9182, 0x0800, 0x12e8, 0x7830, 0x9084, 0x0003, 0x1130, 0xaa98, + 0xab94, 0xa878, 0x9084, 0x0007, 0x00ea, 0x7930, 0xd18c, 0x0118, + 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001, 0x0004, 0x0010, + 0x2001, 0x0029, 0x900e, 0x0038, 0x2001, 0x002c, 0x900e, 0x0018, + 0x2001, 0x0029, 0x900e, 0x9006, 0x0008, 0x9005, 0x012e, 0x00be, + 0x00fe, 0x0005, 0x5c3f, 0x5bfa, 0x5c11, 0x5c3f, 0x5c3f, 0x5c3f, + 0x5c3f, 0x5c3f, 0x2100, 0x9082, 0x007e, 0x1278, 0x080c, 0x5f1e, + 0x0148, 0x9046, 0xb810, 0x9306, 0x1904, 0x5c47, 0xb814, 0x9206, + 0x15f0, 0x0028, 0xbb12, 0xba16, 0x0010, 0x080c, 0x452c, 0x0150, + 0x04b0, 0x080c, 0x5f7e, 0x1598, 0xb810, 0x9306, 0x1580, 0xb814, + 0x9206, 0x1568, 0x080c, 0x9980, 0x0530, 0x2b00, 0x6012, 0x080c, + 0xba69, 0x2900, 0x6016, 0x600b, 0xffff, 0x6023, 0x000a, 0xa878, + 0x9086, 0x0001, 0x1170, 0x080c, 0x2e30, 0x9006, 0x080c, 0x5ebb, + 0x2001, 0x0002, 0x080c, 0x5ecf, 0x2001, 0x0200, 0xb86e, 0xb893, + 0x0002, 0x2009, 0x0003, 0x080c, 0x9a50, 0x9006, 0x0068, 0x2001, + 0x0001, 0x900e, 0x0038, 0x2001, 0x002c, 0x900e, 0x0018, 0x2001, + 0x0028, 0x900e, 0x9005, 0x0000, 0x012e, 0x00be, 0x00fe, 0x0005, + 0x00b6, 0x00f6, 0x00e6, 0x0126, 0x2091, 0x8000, 0xa894, 0x90c6, + 0x0015, 0x0904, 0x5e14, 0x90c6, 0x0056, 0x0904, 0x5e18, 0x90c6, + 0x0066, 0x0904, 0x5e1c, 0x90c6, 0x0071, 0x0904, 0x5e20, 0x90c6, + 0x0074, 0x0904, 0x5e24, 0x90c6, 0x007c, 0x0904, 0x5e28, 0x90c6, + 0x007e, 0x0904, 0x5e2c, 0x90c6, 0x0037, 0x0904, 0x5e30, 0x9016, + 0x2079, 0x1800, 0xa974, 0x9186, 0x00ff, 0x0904, 0x5e0f, 0x9182, + 0x0800, 0x1a04, 0x5e0f, 0x080c, 0x5f7e, 0x1198, 0xb804, 0x9084, + 0x00ff, 0x9082, 0x0006, 0x1268, 0xa894, 0x90c6, 0x006f, 0x0148, + 0x080c, 0x9940, 0x1904, 0x5df8, 0xb8a0, 0x9084, 0xff80, 0x1904, + 0x5df8, 0xa894, 0x90c6, 0x006f, 0x0158, 0x90c6, 0x005e, 0x0904, + 0x5d58, 0x90c6, 0x0064, 0x0904, 0x5d81, 0x2008, 0x0804, 0x5d1b, + 0xa998, 0xa8b0, 0x2040, 0x080c, 0x9940, 0x1120, 0x9182, 0x007f, + 0x0a04, 0x5d1b, 0x9186, 0x00ff, 0x0904, 0x5d1b, 0x9182, 0x0800, + 0x1a04, 0x5d1b, 0xaaa0, 0xab9c, 0x7874, 0x9306, 0x1188, 0x7878, + 0x0096, 0x924e, 0x1128, 0x2208, 0x2310, 0x009e, 0x0804, 0x5d1b, + 0x99cc, 0xff00, 0x009e, 0x1120, 0x2208, 0x2310, 0x0804, 0x5d1b, + 0x080c, 0x452c, 0x0904, 0x5d24, 0x900e, 0x9016, 0x90c6, 0x4000, + 0x1558, 0x0006, 0x080c, 0x619e, 0x1108, 0xc185, 0xb800, 0xd0bc, + 0x0108, 0xc18d, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, + 0x0031, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x0006, 0x2098, + 0x080c, 0x0f52, 0x20a9, 0x0004, 0xa860, 0x20e8, 0xa85c, 0x9080, + 0x0035, 0x20a0, 0xb8b4, 0x20e0, 0xb8b8, 0x9080, 0x000a, 0x2098, + 0x080c, 0x0f52, 0x000e, 0x00c8, 0x90c6, 0x4007, 0x1110, 0x2408, + 0x00a0, 0x90c6, 0x4008, 0x1118, 0x2708, 0x2610, 0x0070, 0x90c6, + 0x4009, 0x1108, 0x0050, 0x90c6, 0x4006, 0x0138, 0x2001, 0x4005, + 0x2009, 0x000a, 0x0010, 0x2001, 0x4006, 0xa896, 0xa99a, 0xaa9e, + 0x2001, 0x0030, 0x900e, 0x0470, 0x080c, 0x9980, 0x1130, 0x2001, + 0x4005, 0x2009, 0x0003, 0x9016, 0x0c80, 0x2b00, 0x6012, 0x080c, + 0xba69, 0x2900, 0x6016, 0x6023, 0x0001, 0xa868, 0xd88c, 0x0108, + 0xc0f5, 0xa86a, 0x0126, 0x2091, 0x8000, 0x080c, 0x2e30, 0x012e, + 0x9006, 0x080c, 0x5ebb, 0x2001, 0x0002, 0x080c, 0x5ecf, 0x2009, + 0x0002, 0x080c, 0x9a50, 0xa8b0, 0xd094, 0x0118, 0xb8bc, 0xc08d, + 0xb8be, 0x9006, 0x9005, 0x012e, 0x00ee, 0x00fe, 0x00be, 0x0005, + 0x080c, 0x5127, 0x0118, 0x2009, 0x0007, 0x00f8, 0xa998, 0xaeb0, + 0x080c, 0x5f7e, 0x1904, 0x5d16, 0x9186, 0x007f, 0x0130, 0x080c, + 0x62a4, 0x0118, 0x2009, 0x0009, 0x0080, 0x0096, 0x080c, 0x0fd5, + 0x1120, 0x009e, 0x2009, 0x0002, 0x0040, 0x2900, 0x009e, 0xa806, + 0x080c, 0xb7da, 0x19b0, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804, + 0x5d1d, 0xa998, 0xaeb0, 0x080c, 0x5f7e, 0x1904, 0x5d16, 0x0096, + 0x080c, 0x0fd5, 0x1128, 0x009e, 0x2009, 0x0002, 0x0804, 0x5dd5, + 0x2900, 0x009e, 0xa806, 0x0096, 0x2048, 0x20a9, 0x002b, 0xb8b4, + 0x20e0, 0xb8b8, 0x2098, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, + 0x20a0, 0x4003, 0x20a9, 0x0008, 0x9080, 0x0006, 0x20a0, 0xbbb8, + 0x9398, 0x0006, 0x2398, 0x080c, 0x0f52, 0x009e, 0xa87b, 0x0000, + 0xa883, 0x0000, 0xa897, 0x4000, 0xd684, 0x1168, 0x080c, 0x5113, + 0xd0b4, 0x1118, 0xa89b, 0x000b, 0x00e0, 0xb800, 0xd08c, 0x0118, + 0xa89b, 0x000c, 0x00b0, 0x080c, 0x62a4, 0x0118, 0xa89b, 0x0009, + 0x0080, 0x080c, 0x5127, 0x0118, 0xa89b, 0x0007, 0x0050, 0x080c, + 0xb7bd, 0x1904, 0x5d51, 0x2009, 0x0003, 0x2001, 0x4005, 0x0804, + 0x5d1d, 0xa87b, 0x0030, 0xa897, 0x4005, 0xa804, 0x8006, 0x8006, + 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, 0x2009, + 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, 0x2041, + 0x120c, 0x080c, 0x9ed6, 0x1904, 0x5d51, 0x2009, 0x0002, 0x08e8, + 0x2001, 0x0028, 0x900e, 0x0804, 0x5d52, 0x2009, 0x180c, 0x210c, + 0xd18c, 0x0118, 0x2001, 0x0004, 0x0038, 0xd184, 0x0118, 0x2001, + 0x0004, 0x0010, 0x2001, 0x0029, 0x900e, 0x0804, 0x5d52, 0x2001, + 0x0029, 0x900e, 0x0804, 0x5d52, 0x080c, 0x33b6, 0x0804, 0x5d53, + 0x080c, 0x4e50, 0x0804, 0x5d53, 0x080c, 0x41a5, 0x0804, 0x5d53, + 0x080c, 0x45e8, 0x0804, 0x5d53, 0x080c, 0x489f, 0x0804, 0x5d53, + 0x080c, 0x4aca, 0x0804, 0x5d53, 0x080c, 0x4cbb, 0x0804, 0x5d53, + 0x080c, 0x35c6, 0x0804, 0x5d53, 0x00b6, 0xa974, 0xae78, 0x9684, + 0x3fff, 0x9082, 0x4000, 0x1618, 0x9182, 0x0800, 0x1268, 0x9188, + 0x1000, 0x2104, 0x905d, 0x0140, 0x080c, 0x62a4, 0x1148, 0x00e9, + 0x080c, 0x60a9, 0x9006, 0x00b0, 0x2001, 0x0028, 0x900e, 0x0090, + 0x9082, 0x0006, 0x1240, 0xb900, 0xd1fc, 0x0d88, 0x2001, 0x0029, + 0x2009, 0x1000, 0x0038, 0x2001, 0x0029, 0x900e, 0x0018, 0x2001, + 0x0029, 0x900e, 0x9005, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000, + 0xb850, 0x900d, 0x0150, 0x2900, 0x0096, 0x2148, 0xa802, 0x009e, + 0xa803, 0x0000, 0xb852, 0x012e, 0x0005, 0x2900, 0xb852, 0xb84e, + 0xa803, 0x0000, 0x0cc0, 0x0126, 0x2091, 0x8000, 0xb84c, 0x9005, + 0x0170, 0x00e6, 0x2071, 0x19b6, 0x7004, 0x9086, 0x0002, 0x0168, + 0x00ee, 0xb84c, 0xa802, 0x2900, 0xb84e, 0x012e, 0x0005, 0x2900, + 0xb852, 0xb84e, 0xa803, 0x0000, 0x0cc0, 0x701c, 0x9b06, 0x1d80, + 0xb84c, 0x00a6, 0x2050, 0xb000, 0xa802, 0x2900, 0xb002, 0x00ae, + 0x00ee, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0xb84c, 0x904d, + 0x0130, 0xa800, 0x9005, 0x1108, 0xb852, 0xb84e, 0x9905, 0x012e, + 0x0005, 0xb84c, 0x904d, 0x0130, 0xa800, 0x9005, 0x1108, 0xb852, + 0xb84e, 0x9905, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x0026, 0x2091, + 0x8000, 0x6210, 0x2258, 0xba00, 0x9005, 0x0110, 0xc285, 0x0008, + 0xc284, 0xba02, 0x002e, 0x00ce, 0x012e, 0x00be, 0x0005, 0x00b6, + 0x0126, 0x00c6, 0x2091, 0x8000, 0x6210, 0x2258, 0xba04, 0x0006, + 0x9086, 0x0006, 0x1170, 0xb89c, 0xd0ac, 0x0158, 0x080c, 0x62a0, + 0x0140, 0x9284, 0xff00, 0x8007, 0x9086, 0x0007, 0x1110, 0x2011, + 0x0600, 0x000e, 0x9294, 0xff00, 0x9215, 0xba06, 0x0006, 0x9086, + 0x0006, 0x1120, 0xba90, 0x82ff, 0x090c, 0x0db2, 0x000e, 0x00ce, + 0x012e, 0x00be, 0x0005, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, + 0x6210, 0x2258, 0xba04, 0x0006, 0x9086, 0x0006, 0x1168, 0xb89c, + 0xd0a4, 0x0150, 0x080c, 0x629c, 0x1138, 0x9284, 0x00ff, 0x9086, + 0x0007, 0x1110, 0x2011, 0x0006, 0x000e, 0x9294, 0x00ff, 0x8007, + 0x9215, 0xba06, 0x00ce, 0x012e, 0x00be, 0x0005, 0x9182, 0x0800, + 0x0218, 0x9085, 0x0001, 0x0005, 0x00d6, 0x0026, 0x9190, 0x1000, + 0x2204, 0x905d, 0x1180, 0x0096, 0x080c, 0x0fd5, 0x2958, 0x009e, + 0x0160, 0x2b00, 0x2012, 0xb85c, 0xb8ba, 0xb860, 0xb8b6, 0x9006, + 0xb8a6, 0x080c, 0x5a3b, 0x9006, 0x0010, 0x9085, 0x0001, 0x002e, + 0x00de, 0x0005, 0x00b6, 0x0096, 0x0126, 0x2091, 0x8000, 0x0026, + 0x9182, 0x0800, 0x0218, 0x9085, 0x0001, 0x0458, 0x00d6, 0x9190, + 0x1000, 0x2204, 0x905d, 0x0518, 0x2013, 0x0000, 0xb8a4, 0x904d, + 0x0110, 0x080c, 0x1007, 0x00d6, 0x00c6, 0xb8ac, 0x2060, 0x8cff, + 0x0168, 0x600c, 0x0006, 0x6014, 0x2048, 0x080c, 0xb5fb, 0x0110, + 0x080c, 0x0f87, 0x080c, 0x99d6, 0x00ce, 0x0c88, 0x00ce, 0x00de, + 0x2b48, 0xb8b8, 0xb85e, 0xb8b4, 0xb862, 0x080c, 0x1017, 0x00de, + 0x9006, 0x002e, 0x012e, 0x009e, 0x00be, 0x0005, 0x0016, 0x9182, + 0x0800, 0x0218, 0x9085, 0x0001, 0x0030, 0x9188, 0x1000, 0x2104, + 0x905d, 0x0dc0, 0x9006, 0x001e, 0x0005, 0x00d6, 0x0156, 0x0136, + 0x0146, 0x9006, 0xb80a, 0xb80e, 0xb800, 0xc08c, 0xb802, 0x080c, + 0x6c53, 0x1510, 0xb8a0, 0x9086, 0x007e, 0x0120, 0x080c, 0x9940, + 0x11d8, 0x0078, 0x7040, 0xd0e4, 0x01b8, 0x00c6, 0x2061, 0x1951, + 0x7048, 0x2062, 0x704c, 0x6006, 0x7050, 0x600a, 0x7054, 0x600e, + 0x00ce, 0x703c, 0x2069, 0x0140, 0x9005, 0x1110, 0x2001, 0x0001, + 0x6886, 0x2069, 0x1800, 0x68ae, 0x7040, 0xb85e, 0x7048, 0xb862, + 0x704c, 0xb866, 0x20e1, 0x0000, 0x2099, 0x0276, 0xb8b4, 0x20e8, + 0xb8b8, 0x9088, 0x000a, 0x21a0, 0x20a9, 0x0004, 0x4003, 0x2099, + 0x027a, 0x9088, 0x0006, 0x21a0, 0x20a9, 0x0004, 0x4003, 0x2069, + 0x0200, 0x6817, 0x0001, 0x7040, 0xb86a, 0x7144, 0xb96e, 0x7048, + 0xb872, 0x7050, 0xb876, 0x2069, 0x0200, 0x6817, 0x0000, 0xb8a0, + 0x9086, 0x007e, 0x1110, 0x7144, 0xb96e, 0x9182, 0x0211, 0x1218, + 0x2009, 0x0008, 0x0400, 0x9182, 0x0259, 0x1218, 0x2009, 0x0007, + 0x00d0, 0x9182, 0x02c1, 0x1218, 0x2009, 0x0006, 0x00a0, 0x9182, + 0x0349, 0x1218, 0x2009, 0x0005, 0x0070, 0x9182, 0x0421, 0x1218, + 0x2009, 0x0004, 0x0040, 0x9182, 0x0581, 0x1218, 0x2009, 0x0003, + 0x0010, 0x2009, 0x0002, 0xb992, 0x014e, 0x013e, 0x015e, 0x00de, + 0x0005, 0x0016, 0x0026, 0x00e6, 0x2071, 0x0260, 0x7034, 0xb896, + 0x703c, 0xb89a, 0x7054, 0xb89e, 0x0036, 0xbbbc, 0xc384, 0xba00, + 0x2009, 0x1873, 0x210c, 0xd0bc, 0x0120, 0xd1ec, 0x0110, 0xc2ad, + 0x0008, 0xc2ac, 0xd0c4, 0x0148, 0xd1e4, 0x0138, 0xc2bd, 0xd0cc, + 0x0128, 0xd38c, 0x1108, 0xc385, 0x0008, 0xc2bc, 0xba02, 0xbbbe, + 0x003e, 0x00ee, 0x002e, 0x001e, 0x0005, 0x0096, 0x0126, 0x2091, + 0x8000, 0xb8a4, 0x904d, 0x0578, 0xa900, 0x81ff, 0x15c0, 0xaa04, + 0x9282, 0x0010, 0x16c8, 0x0136, 0x0146, 0x01c6, 0x01d6, 0x8906, + 0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0, 0x9080, + 0x0004, 0x2098, 0x2009, 0x0010, 0x20a9, 0x0001, 0x4002, 0x9086, + 0xffff, 0x0120, 0x8109, 0x1dd0, 0x080c, 0x0db2, 0x3c00, 0x20e8, + 0x3300, 0x8001, 0x20a0, 0x4604, 0x8210, 0xaa06, 0x01de, 0x01ce, + 0x014e, 0x013e, 0x0060, 0x080c, 0x0fd5, 0x0170, 0x2900, 0xb8a6, + 0xa803, 0x0000, 0x080c, 0x613a, 0xa807, 0x0001, 0xae12, 0x9085, + 0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0126, 0x2091, + 0x8000, 0x0096, 0xb8a4, 0x904d, 0x0188, 0xa800, 0x9005, 0x1150, + 0x080c, 0x6149, 0x1158, 0xa804, 0x908a, 0x0002, 0x0218, 0x8001, + 0xa806, 0x0020, 0x080c, 0x1007, 0xb8a7, 0x0000, 0x009e, 0x012e, + 0x0005, 0x0126, 0x2091, 0x8000, 0x080c, 0x801d, 0x012e, 0x0005, + 0x901e, 0x0010, 0x2019, 0x0001, 0x900e, 0x0126, 0x2091, 0x8000, + 0xb84c, 0x2048, 0xb800, 0xd0dc, 0x1170, 0x89ff, 0x0500, 0x83ff, + 0x0120, 0xa878, 0x9606, 0x0158, 0x0030, 0xa86c, 0x9406, 0x1118, + 0xa870, 0x9506, 0x0120, 0x2908, 0xa800, 0x2048, 0x0c70, 0x080c, + 0x933f, 0xaa00, 0xb84c, 0x9906, 0x1110, 0xba4e, 0x0020, 0x00a6, + 0x2150, 0xb202, 0x00ae, 0x82ff, 0x1110, 0xb952, 0x89ff, 0x012e, + 0x0005, 0x9016, 0x0489, 0x1110, 0x2011, 0x0001, 0x0005, 0x080c, + 0x619e, 0x0128, 0x080c, 0xb6c3, 0x0010, 0x9085, 0x0001, 0x0005, + 0x080c, 0x619e, 0x0128, 0x080c, 0xb65d, 0x0010, 0x9085, 0x0001, + 0x0005, 0x080c, 0x619e, 0x0128, 0x080c, 0xb6c0, 0x0010, 0x9085, + 0x0001, 0x0005, 0x080c, 0x619e, 0x0128, 0x080c, 0xb681, 0x0010, + 0x9085, 0x0001, 0x0005, 0x080c, 0x619e, 0x0128, 0x080c, 0xb6ed, + 0x0010, 0x9085, 0x0001, 0x0005, 0xb8a4, 0x900d, 0x1118, 0x9085, + 0x0001, 0x0005, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e, + 0x810e, 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, + 0x0004, 0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002, 0x9606, + 0x0128, 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0008, 0x9006, 0x01ce, + 0x013e, 0x0005, 0x0146, 0x01d6, 0xa860, 0x20e8, 0xa85c, 0x9080, + 0x0004, 0x20a0, 0x20a9, 0x0010, 0x2009, 0xffff, 0x4104, 0x01de, + 0x014e, 0x0136, 0x01c6, 0xa800, 0x9005, 0x11b8, 0x890e, 0x810e, + 0x810f, 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, 0x0004, + 0x2098, 0x20a9, 0x0001, 0x2009, 0x0010, 0x4002, 0x9606, 0x0128, + 0x8109, 0x1dd8, 0x9085, 0x0001, 0x0068, 0x0146, 0x01d6, 0x3300, + 0x8001, 0x20a0, 0x3c00, 0x20e8, 0x2001, 0xffff, 0x4004, 0x01de, + 0x014e, 0x9006, 0x01ce, 0x013e, 0x0005, 0x0096, 0x0126, 0x2091, + 0x8000, 0xb8a4, 0x904d, 0x1128, 0x080c, 0x0fd5, 0x0168, 0x2900, + 0xb8a6, 0x080c, 0x613a, 0xa803, 0x0001, 0xa807, 0x0000, 0x9085, + 0x0001, 0x012e, 0x009e, 0x0005, 0x9006, 0x0cd8, 0x0096, 0x0126, + 0x2091, 0x8000, 0xb8a4, 0x904d, 0x0130, 0xb8a7, 0x0000, 0x080c, + 0x1007, 0x9085, 0x0001, 0x012e, 0x009e, 0x0005, 0xb89c, 0xd0a4, + 0x0005, 0x00b6, 0x00f6, 0x080c, 0x6c53, 0x01b0, 0x71bc, 0x81ff, + 0x1198, 0x71d4, 0xd19c, 0x0180, 0x2001, 0x007e, 0x9080, 0x1000, + 0x2004, 0x905d, 0x0148, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, + 0x1118, 0xb800, 0xc0ed, 0xb802, 0x2079, 0x1853, 0x7804, 0xd0a4, + 0x01d0, 0x0156, 0x20a9, 0x007f, 0x900e, 0x0016, 0x080c, 0x5f7e, + 0x1168, 0xb804, 0x9084, 0xff00, 0x8007, 0x9096, 0x0004, 0x0118, + 0x9086, 0x0006, 0x1118, 0xb800, 0xc0ed, 0xb802, 0x001e, 0x8108, + 0x1f04, 0x61c5, 0x015e, 0x080c, 0x6262, 0x0120, 0x2001, 0x1954, + 0x200c, 0x0038, 0x2079, 0x1853, 0x7804, 0xd0a4, 0x0130, 0x2009, + 0x07d0, 0x2011, 0x61f0, 0x080c, 0x7cd9, 0x00fe, 0x00be, 0x0005, + 0x00b6, 0x2011, 0x61f0, 0x080c, 0x7c4a, 0x080c, 0x6262, 0x01d8, + 0x2001, 0x107e, 0x2004, 0x2058, 0xb900, 0xc1ec, 0xb902, 0x080c, + 0x62a0, 0x0130, 0x2009, 0x07d0, 0x2011, 0x61f0, 0x080c, 0x7cd9, + 0x00e6, 0x2071, 0x1800, 0x9006, 0x7076, 0x7058, 0x707a, 0x080c, + 0x2c2b, 0x00ee, 0x04b0, 0x0156, 0x00c6, 0x20a9, 0x007f, 0x900e, + 0x0016, 0x080c, 0x5f7e, 0x1538, 0xb800, 0xd0ec, 0x0520, 0x0046, + 0xbaa0, 0x2220, 0x9006, 0x2009, 0x0029, 0x080c, 0xcfe6, 0xb800, + 0xc0e5, 0xc0ec, 0xb802, 0x080c, 0x629c, 0x2001, 0x0707, 0x1128, + 0xb804, 0x9084, 0x00ff, 0x9085, 0x0700, 0xb806, 0x2019, 0x0029, + 0x080c, 0x8180, 0x0076, 0x903e, 0x080c, 0x8078, 0x900e, 0x080c, + 0xcd62, 0x007e, 0x004e, 0x001e, 0x8108, 0x1f04, 0x6218, 0x00ce, + 0x015e, 0x00be, 0x0005, 0x00b6, 0x6010, 0x2058, 0xb800, 0xc0ec, + 0xb802, 0x00be, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb800, 0x00be, + 0xd0ac, 0x0005, 0x6010, 0x00b6, 0x905d, 0x0108, 0xb800, 0x00be, + 0xd0bc, 0x0005, 0x00b6, 0x00f6, 0x2001, 0x107e, 0x2004, 0x905d, + 0x0110, 0xb800, 0xd0ec, 0x00fe, 0x00be, 0x0005, 0x0126, 0x0026, + 0x2091, 0x8000, 0x0006, 0xbaa0, 0x9290, 0x1000, 0x2204, 0x9b06, + 0x190c, 0x0db2, 0x000e, 0xba00, 0x9005, 0x0110, 0xc2fd, 0x0008, + 0xc2fc, 0xba02, 0x002e, 0x012e, 0x0005, 0x2011, 0x1835, 0x2204, + 0xd0cc, 0x0138, 0x2001, 0x1952, 0x200c, 0x2011, 0x6292, 0x080c, + 0x7cd9, 0x0005, 0x2011, 0x6292, 0x080c, 0x7c4a, 0x2011, 0x1835, + 0x2204, 0xc0cc, 0x2012, 0x0005, 0x080c, 0x5113, 0xd0ac, 0x0005, + 0x080c, 0x5113, 0xd0a4, 0x0005, 0x0016, 0xb904, 0x9184, 0x00ff, + 0x908e, 0x0006, 0x001e, 0x0005, 0x0016, 0xb904, 0x9184, 0xff00, + 0x8007, 0x908e, 0x0006, 0x001e, 0x0005, 0x00b6, 0x00f6, 0x080c, + 0xbcec, 0x0158, 0x70d4, 0x9084, 0x0028, 0x0138, 0x2001, 0x107f, + 0x2004, 0x905d, 0x0110, 0xb8bc, 0xd094, 0x00fe, 0x00be, 0x0005, + 0x2071, 0x1906, 0x7003, 0x0001, 0x7007, 0x0000, 0x9006, 0x7012, + 0x7016, 0x701a, 0x701e, 0x700a, 0x7046, 0x2001, 0x1919, 0x2003, + 0x0000, 0x0005, 0x0016, 0x00e6, 0x2071, 0x191a, 0x900e, 0x710a, + 0x080c, 0x5113, 0xd0fc, 0x1140, 0x080c, 0x5113, 0x900e, 0xd09c, + 0x0108, 0x8108, 0x7102, 0x00f8, 0x2001, 0x1873, 0x200c, 0x9184, + 0x0007, 0x0002, 0x62e4, 0x62e4, 0x62e4, 0x62e4, 0x62e4, 0x62fa, + 0x6308, 0x62e4, 0x7003, 0x0003, 0x2009, 0x1874, 0x210c, 0x9184, + 0xff00, 0x8007, 0x9005, 0x1110, 0x2001, 0x0002, 0x7006, 0x0018, + 0x7003, 0x0005, 0x0c88, 0x00ee, 0x001e, 0x0005, 0x00e6, 0x2071, + 0x0050, 0x684c, 0x9005, 0x1150, 0x00e6, 0x2071, 0x1906, 0x7028, + 0xc085, 0x702a, 0x00ee, 0x9085, 0x0001, 0x0488, 0x6844, 0x9005, + 0x0158, 0x080c, 0x6f9c, 0x6a60, 0x9200, 0x7002, 0x6864, 0x9101, + 0x7006, 0x9006, 0x7012, 0x7016, 0x6860, 0x7002, 0x6864, 0x7006, + 0x6868, 0x700a, 0x686c, 0x700e, 0x6844, 0x9005, 0x1110, 0x7012, + 0x7016, 0x684c, 0x701a, 0x701c, 0x9085, 0x0040, 0x701e, 0x7037, + 0x0019, 0x702b, 0x0001, 0x00e6, 0x2071, 0x1906, 0x7028, 0xc084, + 0x702a, 0x7007, 0x0001, 0x700b, 0x0000, 0x00ee, 0x9006, 0x00ee, + 0x0005, 0xa868, 0xd0fc, 0x11d8, 0x00e6, 0x0026, 0x2001, 0x191a, + 0x2004, 0x9005, 0x0904, 0x653b, 0xa87c, 0xd0bc, 0x1904, 0x653b, + 0xa978, 0xa874, 0x9105, 0x1904, 0x653b, 0x2001, 0x191a, 0x2004, + 0x0002, 0x653b, 0x6394, 0x63d0, 0x63d0, 0x653b, 0x63d0, 0x0005, + 0xa868, 0xd0fc, 0x1500, 0x00e6, 0x0026, 0x2009, 0x191a, 0x210c, + 0x81ff, 0x0904, 0x653b, 0xa87c, 0xd0cc, 0x0904, 0x653b, 0xa880, + 0x9084, 0x00ff, 0x9086, 0x0001, 0x1904, 0x653b, 0x9186, 0x0003, + 0x0904, 0x63d0, 0x9186, 0x0005, 0x0904, 0x63d0, 0xa84f, 0x8021, + 0xa853, 0x0017, 0x0028, 0x0005, 0xa84f, 0x8020, 0xa853, 0x0016, + 0x2071, 0x1906, 0x701c, 0x9005, 0x1904, 0x66fb, 0x0e04, 0x6746, + 0x2071, 0x0000, 0xa84c, 0x7082, 0xa850, 0x7032, 0xa86c, 0x7086, + 0x7036, 0xa870, 0x708a, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, + 0xd084, 0x190c, 0x1167, 0x2071, 0x1800, 0x2011, 0x0001, 0xa804, + 0x900d, 0x702c, 0x1158, 0xa802, 0x2900, 0x702e, 0x70b8, 0x9200, + 0x70ba, 0x080c, 0x7b7c, 0x002e, 0x00ee, 0x0005, 0x0096, 0x2148, + 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x009e, 0x0c58, + 0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050, 0x2071, 0x1906, 0xa803, + 0x0000, 0x7010, 0x9005, 0x1904, 0x64bf, 0x782c, 0x908c, 0x0780, + 0x190c, 0x686d, 0x8004, 0x8004, 0x8004, 0x9084, 0x0003, 0x0002, + 0x63ee, 0x64bf, 0x6413, 0x645a, 0x080c, 0x0db2, 0x2071, 0x1800, + 0x2900, 0x7822, 0xa804, 0x900d, 0x1170, 0x2071, 0x19c9, 0x703c, + 0x9005, 0x1328, 0x2001, 0x191b, 0x2004, 0x8005, 0x703e, 0x00fe, + 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, + 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70b8, 0x9200, 0x70ba, + 0x080c, 0x7b7c, 0x0c10, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, + 0x900d, 0x1580, 0x7824, 0x00e6, 0x2071, 0x0040, 0x712c, 0xd19c, + 0x1148, 0x2009, 0x182e, 0x210c, 0x918a, 0x0040, 0x0218, 0x7022, + 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, + 0x70b8, 0x8000, 0x70ba, 0x080c, 0x7b7c, 0x782c, 0x9094, 0x0780, + 0x190c, 0x686d, 0xd0a4, 0x19f0, 0x2071, 0x19c9, 0x703c, 0x9005, + 0x1328, 0x2001, 0x191b, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, + 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, + 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70b8, 0x9200, 0x70ba, 0x080c, + 0x7b7c, 0x0800, 0x0096, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, + 0x702c, 0xa802, 0x2900, 0x702e, 0x70b8, 0x8000, 0x70ba, 0x080c, + 0x7b7c, 0x782c, 0x9094, 0x0780, 0x190c, 0x686d, 0xd0a4, 0x1d60, + 0x00ee, 0x782c, 0x9094, 0x0780, 0x190c, 0x686d, 0xd09c, 0x11a0, + 0x009e, 0x2900, 0x7822, 0xa804, 0x900d, 0x1560, 0x2071, 0x19c9, + 0x703c, 0x9005, 0x1328, 0x2001, 0x191b, 0x2004, 0x8005, 0x703e, + 0x00fe, 0x002e, 0x00ee, 0x0005, 0x009e, 0x2908, 0x7010, 0x8000, + 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, + 0x2148, 0xa804, 0x900d, 0x1170, 0x2071, 0x19c9, 0x703c, 0x9005, + 0x1328, 0x2001, 0x191b, 0x2004, 0x8005, 0x703e, 0x00fe, 0x002e, + 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, + 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70b8, 0x9200, + 0x70ba, 0x080c, 0x7b7c, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2908, + 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, + 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1904, 0x6514, 0x782c, + 0x9094, 0x0780, 0x190c, 0x686d, 0xd09c, 0x1198, 0x701c, 0x904d, + 0x0180, 0x7010, 0x8001, 0x7012, 0x1108, 0x701a, 0xa800, 0x701e, + 0x2900, 0x7822, 0x782c, 0x9094, 0x0780, 0x190c, 0x686d, 0xd09c, + 0x0d68, 0x782c, 0x9094, 0x0780, 0x190c, 0x686d, 0xd0a4, 0x01b0, + 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, + 0x702e, 0x70b8, 0x8000, 0x70ba, 0x080c, 0x7b7c, 0x782c, 0x9094, + 0x0780, 0x190c, 0x686d, 0xd0a4, 0x1d60, 0x00ee, 0x2071, 0x19c9, + 0x703c, 0x9005, 0x1328, 0x2001, 0x191b, 0x2004, 0x8005, 0x703e, + 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, 0x1800, 0x9016, + 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, + 0x702e, 0x70b8, 0x9200, 0x70ba, 0x080c, 0x7b7c, 0x00ee, 0x0804, + 0x64cf, 0xa868, 0xd0fc, 0x1904, 0x6577, 0x0096, 0xa804, 0xa807, + 0x0000, 0x904d, 0x190c, 0x0f87, 0x009e, 0x0018, 0xa868, 0xd0fc, + 0x15f0, 0x00e6, 0x0026, 0xa84f, 0x0000, 0x00f6, 0x2079, 0x0050, + 0x2071, 0x1800, 0x70e4, 0x8001, 0x01d0, 0x1678, 0x2071, 0x1906, + 0xa803, 0x0000, 0x7010, 0x9005, 0x1904, 0x6675, 0x782c, 0x908c, + 0x0780, 0x190c, 0x686d, 0x8004, 0x8004, 0x8004, 0x9084, 0x0003, + 0x0002, 0x6578, 0x6675, 0x6593, 0x6604, 0x080c, 0x0db2, 0x70e7, + 0x0fa0, 0x71e0, 0x8107, 0x9106, 0x9094, 0x00c0, 0x9184, 0xff3f, + 0x9205, 0x70e2, 0x3b08, 0x3a00, 0x9104, 0x918d, 0x00c0, 0x21d8, + 0x9084, 0xff3f, 0x9205, 0x20d0, 0x0888, 0x70e6, 0x0878, 0x0005, + 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, 0x900d, 0x1120, 0x00fe, + 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, + 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70b8, 0x9200, 0x70ba, + 0x080c, 0x7b7c, 0x0c60, 0x2071, 0x1800, 0x2900, 0x7822, 0xa804, + 0x900d, 0x1904, 0x65f3, 0x7830, 0x8007, 0x9084, 0x001f, 0x9082, + 0x0005, 0x1220, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7824, 0x00e6, + 0x2071, 0x0040, 0x712c, 0xd19c, 0x1148, 0x2009, 0x182e, 0x210c, + 0x918a, 0x0040, 0x0218, 0x7022, 0x00ee, 0x0058, 0x00ee, 0x2048, + 0x702c, 0xa802, 0x2900, 0x702e, 0x70b8, 0x8000, 0x70ba, 0x080c, + 0x7b7c, 0x782c, 0x9094, 0x0780, 0x190c, 0x686d, 0xd0a4, 0x19f0, + 0x0e04, 0x65ea, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, + 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, 0x2001, 0x1917, 0x200c, + 0xc184, 0x2102, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, + 0x190c, 0x1167, 0x2009, 0x1919, 0x200b, 0x0000, 0x00fe, 0x002e, + 0x00ee, 0x0005, 0x2001, 0x1917, 0x200c, 0xc185, 0x2102, 0x00fe, + 0x002e, 0x00ee, 0x0005, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, + 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70b8, 0x9200, 0x70ba, + 0x080c, 0x7b7c, 0x0804, 0x65a6, 0x0096, 0x00e6, 0x7824, 0x2048, + 0x2071, 0x1800, 0x702c, 0xa802, 0x2900, 0x702e, 0x70b8, 0x8000, + 0x70ba, 0x080c, 0x7b7c, 0x782c, 0x9094, 0x0780, 0x190c, 0x686d, + 0xd0a4, 0x1d60, 0x00ee, 0x0e04, 0x6648, 0x7838, 0x7938, 0x910e, + 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, 0x00de, + 0x7044, 0xc084, 0x7046, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, + 0xd084, 0x190c, 0x1167, 0x2009, 0x1919, 0x200b, 0x0000, 0x782c, + 0x9094, 0x0780, 0x190c, 0x686d, 0xd09c, 0x1170, 0x009e, 0x2900, + 0x7822, 0xa804, 0x900d, 0x11e0, 0x00fe, 0x002e, 0x00ee, 0x0005, + 0x7044, 0xc085, 0x7046, 0x0c58, 0x009e, 0x2908, 0x7010, 0x8000, + 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, + 0x2148, 0xa804, 0x900d, 0x1120, 0x00fe, 0x002e, 0x00ee, 0x0005, + 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, + 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70b8, 0x9200, 0x70ba, 0x080c, + 0x7b7c, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x2908, 0x7010, 0x8000, + 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, + 0x2148, 0xa804, 0x900d, 0x1904, 0x66e6, 0x782c, 0x9094, 0x0780, + 0x190c, 0x686d, 0xd09c, 0x11b0, 0x701c, 0x904d, 0x0198, 0xa84c, + 0x9005, 0x1180, 0x7010, 0x8001, 0x7012, 0x1108, 0x701a, 0xa800, + 0x701e, 0x2900, 0x7822, 0x782c, 0x9094, 0x0780, 0x190c, 0x686d, + 0xd09c, 0x0d50, 0x782c, 0x9094, 0x0780, 0x190c, 0x686d, 0xd0a4, + 0x05c8, 0x00e6, 0x7824, 0x2048, 0x2071, 0x1800, 0x702c, 0xa802, + 0x2900, 0x702e, 0x70b8, 0x8000, 0x70ba, 0x080c, 0x7b7c, 0x782c, + 0x9094, 0x0780, 0x190c, 0x686d, 0xd0a4, 0x1d60, 0x00ee, 0x0e04, + 0x66df, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, + 0x6836, 0x6833, 0x0013, 0x00de, 0x7044, 0xc084, 0x7046, 0x2091, + 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1167, 0x2009, + 0x1919, 0x200b, 0x0000, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x7044, + 0xc085, 0x7046, 0x00fe, 0x002e, 0x00ee, 0x0005, 0x00e6, 0x2071, + 0x1800, 0x9016, 0x702c, 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, + 0x81ff, 0x1dc8, 0x702e, 0x70b8, 0x9200, 0x70ba, 0x080c, 0x7b7c, + 0x00ee, 0x0804, 0x6685, 0x2071, 0x1906, 0xa803, 0x0000, 0x2908, + 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, 0x711a, 0x0110, 0xa902, + 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, 0x1128, 0x1e04, 0x6726, + 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, 0x2148, + 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, 0x70b8, + 0x9200, 0x70ba, 0x080c, 0x7b7c, 0x0e04, 0x6710, 0x2071, 0x1906, + 0x701c, 0x2048, 0xa84c, 0x900d, 0x0d18, 0x2071, 0x0000, 0x7182, + 0xa850, 0x7032, 0xa86c, 0x7086, 0x7036, 0xa870, 0x708a, 0x2091, + 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1167, 0x2071, + 0x1906, 0x080c, 0x6859, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1906, + 0xa803, 0x0000, 0x2908, 0x7010, 0x8000, 0x7012, 0x7018, 0x904d, + 0x711a, 0x0110, 0xa902, 0x0008, 0x711e, 0x2148, 0xa804, 0x900d, + 0x1118, 0x002e, 0x00ee, 0x0005, 0x2071, 0x1800, 0x9016, 0x702c, + 0x2148, 0xa904, 0xa802, 0x8210, 0x2900, 0x81ff, 0x1dc8, 0x702e, + 0x70b8, 0x9200, 0x70ba, 0x080c, 0x7b7c, 0x002e, 0x00ee, 0x0005, + 0x0006, 0xa87c, 0x0006, 0xa867, 0x0103, 0x20a9, 0x001c, 0xa860, + 0x20e8, 0xa85c, 0x9080, 0x001d, 0x20a0, 0x9006, 0x4004, 0x000e, + 0x9084, 0x00ff, 0xa87e, 0x000e, 0xa87a, 0xa982, 0x0005, 0x2071, + 0x1906, 0x7004, 0x0002, 0x6791, 0x6792, 0x6858, 0x6792, 0x0db2, + 0x6858, 0x0005, 0x2001, 0x191a, 0x2004, 0x0002, 0x679c, 0x679c, + 0x67f1, 0x67f2, 0x679c, 0x67f2, 0x0126, 0x2091, 0x8000, 0x1e0c, + 0x6878, 0x701c, 0x904d, 0x01e0, 0xa84c, 0x9005, 0x01d8, 0x0e04, + 0x67c0, 0xa94c, 0x2071, 0x0000, 0x7182, 0xa850, 0x7032, 0xa86c, + 0x7086, 0x7036, 0xa870, 0x708a, 0x2091, 0x4080, 0x2001, 0x0089, + 0x2004, 0xd084, 0x190c, 0x1167, 0x2071, 0x1906, 0x080c, 0x6859, + 0x012e, 0x0470, 0x2001, 0x005b, 0x2004, 0x9094, 0x0780, 0x190c, + 0x686d, 0xd09c, 0x2071, 0x1906, 0x1510, 0x2071, 0x1906, 0x700f, + 0x0001, 0xa964, 0x9184, 0x00ff, 0x9086, 0x0003, 0x1130, 0x810f, + 0x918c, 0x00ff, 0x8101, 0x0108, 0x710e, 0x2900, 0x00d6, 0x2069, + 0x0050, 0x6822, 0x00de, 0x2071, 0x1906, 0x701c, 0x2048, 0x7010, + 0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e, + 0x0005, 0x0005, 0x00d6, 0x2008, 0x2069, 0x19c9, 0x683c, 0x9005, + 0x0760, 0x0158, 0x9186, 0x0003, 0x0540, 0x2001, 0x1813, 0x2004, + 0x2009, 0x1a8b, 0x210c, 0x9102, 0x1500, 0x0126, 0x2091, 0x8000, + 0x2069, 0x0050, 0x693c, 0x6838, 0x9106, 0x0190, 0x0e04, 0x6824, + 0x2069, 0x0000, 0x6837, 0x8040, 0x6833, 0x0012, 0x6883, 0x8040, + 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, 0x1167, + 0x2069, 0x19c9, 0x683f, 0xffff, 0x012e, 0x00de, 0x0126, 0x2091, + 0x8000, 0x1e0c, 0x68e9, 0x701c, 0x904d, 0x0540, 0x2001, 0x005b, + 0x2004, 0x9094, 0x0780, 0x15c9, 0xd09c, 0x1500, 0x2071, 0x1906, + 0x700f, 0x0001, 0xa964, 0x9184, 0x00ff, 0x9086, 0x0003, 0x1130, + 0x810f, 0x918c, 0x00ff, 0x8101, 0x0108, 0x710e, 0x2900, 0x00d6, + 0x2069, 0x0050, 0x6822, 0x00de, 0x701c, 0x2048, 0x7010, 0x8001, + 0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e, 0x0005, + 0x0005, 0x0126, 0x2091, 0x8000, 0x701c, 0x904d, 0x0160, 0x7010, + 0x8001, 0x7012, 0xa800, 0x701e, 0x9005, 0x1108, 0x701a, 0x012e, + 0x080c, 0x1007, 0x0005, 0x012e, 0x0005, 0x2091, 0x8000, 0x0e04, + 0x686f, 0x0006, 0x0016, 0x2001, 0x8004, 0x0006, 0x0804, 0x0dbb, + 0x0096, 0x00f6, 0x2079, 0x0050, 0x7044, 0xd084, 0x01e0, 0xc084, + 0x7046, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, + 0x6836, 0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, + 0x2004, 0xd084, 0x190c, 0x1167, 0x2009, 0x1919, 0x200b, 0x0000, + 0x00fe, 0x009e, 0x0005, 0x782c, 0x9094, 0x0780, 0x1971, 0xd0a4, + 0x0db8, 0x2009, 0x1919, 0x2104, 0x8000, 0x200a, 0x9082, 0x000f, + 0x0e78, 0x00e6, 0x2071, 0x1800, 0x7824, 0x00e6, 0x2071, 0x0040, + 0x712c, 0xd19c, 0x1148, 0x2009, 0x182e, 0x210c, 0x918a, 0x0040, + 0x0218, 0x7022, 0x00ee, 0x0058, 0x00ee, 0x2048, 0x702c, 0xa802, + 0x2900, 0x702e, 0x70b8, 0x8000, 0x70ba, 0x080c, 0x7b7c, 0x782c, + 0x9094, 0x0780, 0x190c, 0x686d, 0xd0a4, 0x19f0, 0x7838, 0x7938, + 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, 0x6836, 0x6833, 0x0013, + 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, 0x2004, 0xd084, 0x190c, + 0x1167, 0x2009, 0x1919, 0x200b, 0x0000, 0x00ee, 0x00fe, 0x009e, + 0x0005, 0x00f6, 0x2079, 0x0050, 0x7044, 0xd084, 0x01b8, 0xc084, + 0x7046, 0x7838, 0x7938, 0x910e, 0x1de0, 0x00d6, 0x2069, 0x0000, + 0x6836, 0x6833, 0x0013, 0x00de, 0x2091, 0x4080, 0x2001, 0x0089, + 0x2004, 0xd084, 0x190c, 0x1167, 0x00fe, 0x0005, 0x782c, 0x9094, + 0x0780, 0x190c, 0x686d, 0xd0a4, 0x0db8, 0x00e6, 0x2071, 0x1800, + 0x7824, 0x2048, 0x702c, 0xa802, 0x2900, 0x702e, 0x70b8, 0x8000, + 0x70ba, 0x080c, 0x7b7c, 0x782c, 0x9094, 0x0780, 0x190c, 0x686d, + 0xd0a4, 0x1d70, 0x00d6, 0x2069, 0x0050, 0x693c, 0x2069, 0x191a, + 0x6808, 0x690a, 0x2069, 0x19c9, 0x9102, 0x1118, 0x683c, 0x9005, + 0x1328, 0x2001, 0x191b, 0x200c, 0x810d, 0x693e, 0x00de, 0x00ee, + 0x00fe, 0x0005, 0x7090, 0x908a, 0x0029, 0x1a0c, 0x0db2, 0x9082, + 0x001d, 0x001b, 0x6027, 0x1e00, 0x0005, 0x6a0d, 0x6997, 0x69b3, + 0x69db, 0x69fc, 0x6a3c, 0x6a4e, 0x69b3, 0x6a24, 0x6952, 0x6980, + 0x6951, 0x0005, 0x00d6, 0x2069, 0x0200, 0x6804, 0x9005, 0x1180, + 0x6808, 0x9005, 0x1518, 0x7093, 0x0028, 0x2069, 0x195e, 0x2d04, + 0x7002, 0x080c, 0x6d8d, 0x6028, 0x9085, 0x0600, 0x602a, 0x00b0, + 0x7093, 0x0028, 0x2069, 0x195e, 0x2d04, 0x7002, 0x6028, 0x9085, + 0x0600, 0x602a, 0x00e6, 0x0036, 0x0046, 0x0056, 0x2071, 0x1a31, + 0x080c, 0x1872, 0x005e, 0x004e, 0x003e, 0x00ee, 0x00de, 0x0005, + 0x00d6, 0x2069, 0x0200, 0x6804, 0x9005, 0x1178, 0x6808, 0x9005, + 0x1160, 0x7093, 0x0028, 0x2069, 0x195e, 0x2d04, 0x7002, 0x080c, + 0x6e17, 0x6028, 0x9085, 0x0600, 0x602a, 0x00de, 0x0005, 0x0006, + 0x2001, 0x0090, 0x080c, 0x2987, 0x000e, 0x6124, 0xd1e4, 0x1190, + 0x080c, 0x6abb, 0xd1d4, 0x1160, 0xd1dc, 0x1138, 0xd1cc, 0x0150, + 0x7093, 0x0020, 0x080c, 0x6abb, 0x0028, 0x7093, 0x001d, 0x0010, + 0x7093, 0x001f, 0x0005, 0x2001, 0x0088, 0x080c, 0x2987, 0x6124, + 0xd1cc, 0x11d8, 0xd1dc, 0x11b0, 0xd1e4, 0x1188, 0x9184, 0x1e00, + 0x11c8, 0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, 0x080c, 0x6c7f, + 0x2001, 0x0080, 0x080c, 0x2987, 0x7093, 0x0028, 0x0058, 0x7093, + 0x001e, 0x0040, 0x7093, 0x001d, 0x0028, 0x7093, 0x0020, 0x0010, + 0x7093, 0x001f, 0x0005, 0x60e3, 0x0001, 0x600c, 0xc0b4, 0x600e, + 0x080c, 0x6c7f, 0x2001, 0x0080, 0x080c, 0x2987, 0x6124, 0xd1d4, + 0x1180, 0xd1dc, 0x1158, 0xd1e4, 0x1130, 0x9184, 0x1e00, 0x1158, + 0x7093, 0x0028, 0x0040, 0x7093, 0x001e, 0x0028, 0x7093, 0x001d, + 0x0010, 0x7093, 0x001f, 0x0005, 0x2001, 0x00a0, 0x080c, 0x2987, + 0x6124, 0xd1dc, 0x1138, 0xd1e4, 0x0138, 0x080c, 0x189c, 0x7093, + 0x001e, 0x0010, 0x7093, 0x001d, 0x0005, 0x080c, 0x6b3e, 0x6124, + 0xd1dc, 0x1188, 0x080c, 0x6abb, 0x0016, 0x080c, 0x189c, 0x001e, + 0xd1d4, 0x1128, 0xd1e4, 0x0138, 0x7093, 0x001e, 0x0020, 0x7093, + 0x001f, 0x080c, 0x6abb, 0x0005, 0x0006, 0x2001, 0x00a0, 0x080c, + 0x2987, 0x000e, 0x6124, 0xd1d4, 0x1160, 0xd1cc, 0x1150, 0xd1dc, + 0x1128, 0xd1e4, 0x0140, 0x7093, 0x001e, 0x0028, 0x7093, 0x001d, + 0x0010, 0x7093, 0x0021, 0x0005, 0x080c, 0x6b3e, 0x6124, 0xd1d4, + 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0140, 0x7093, 0x001e, 0x0028, + 0x7093, 0x001d, 0x0010, 0x7093, 0x001f, 0x0005, 0x0006, 0x2001, + 0x0090, 0x080c, 0x2987, 0x000e, 0x6124, 0xd1d4, 0x1178, 0xd1cc, + 0x1150, 0xd1dc, 0x1128, 0xd1e4, 0x0158, 0x7093, 0x001e, 0x0040, + 0x7093, 0x001d, 0x0028, 0x7093, 0x0020, 0x0010, 0x7093, 0x001f, + 0x0005, 0x0016, 0x00c6, 0x00d6, 0x00e6, 0x0126, 0x2061, 0x0100, + 0x2069, 0x0140, 0x2071, 0x1800, 0x2091, 0x8000, 0x080c, 0x6c53, + 0x11d8, 0x2001, 0x180c, 0x200c, 0xd1b4, 0x01b0, 0xc1b4, 0x2102, + 0x6027, 0x0200, 0x080c, 0x28d0, 0x6024, 0xd0cc, 0x0148, 0x2001, + 0x00a0, 0x080c, 0x2987, 0x080c, 0x6f2a, 0x080c, 0x5a21, 0x0428, + 0x6028, 0xc0cd, 0x602a, 0x0408, 0x080c, 0x6c6d, 0x0150, 0x080c, + 0x6c64, 0x1138, 0x2001, 0x0001, 0x080c, 0x247f, 0x080c, 0x6c2d, + 0x00a0, 0x080c, 0x6b3b, 0x0178, 0x2001, 0x0001, 0x080c, 0x247f, + 0x7090, 0x9086, 0x001e, 0x0120, 0x7090, 0x9086, 0x0022, 0x1118, + 0x7093, 0x0025, 0x0010, 0x7093, 0x0021, 0x012e, 0x00ee, 0x00de, + 0x00ce, 0x001e, 0x0005, 0x0026, 0x2011, 0x6acc, 0x080c, 0x7d1b, + 0x002e, 0x0016, 0x0026, 0x2009, 0x0064, 0x2011, 0x6acc, 0x080c, + 0x7d12, 0x002e, 0x001e, 0x0005, 0x00e6, 0x00f6, 0x0016, 0x080c, + 0x8fbb, 0x2071, 0x1800, 0x080c, 0x6a69, 0x001e, 0x00fe, 0x00ee, + 0x0005, 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x00f6, + 0x0126, 0x080c, 0x8fbb, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, + 0x1800, 0x2091, 0x8000, 0x6028, 0xc09c, 0x602a, 0x2011, 0x0003, + 0x080c, 0x92ec, 0x2011, 0x0002, 0x080c, 0x92f6, 0x080c, 0x91de, + 0x080c, 0x7cc7, 0x0036, 0x901e, 0x080c, 0x9254, 0x003e, 0x60e3, + 0x0000, 0x080c, 0xd343, 0x080c, 0xd35e, 0x2009, 0x0004, 0x080c, + 0x28d6, 0x080c, 0x27f1, 0x2001, 0x1800, 0x2003, 0x0004, 0x6027, + 0x0008, 0x2011, 0x6acc, 0x080c, 0x7d1b, 0x080c, 0x6c6d, 0x0118, + 0x9006, 0x080c, 0x2987, 0x080c, 0x0b94, 0x2001, 0x0001, 0x080c, + 0x247f, 0x012e, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, + 0x001e, 0x0005, 0x0026, 0x00e6, 0x2011, 0x6ad9, 0x2071, 0x19c9, + 0x701c, 0x9206, 0x1118, 0x7018, 0x9005, 0x0110, 0x9085, 0x0001, + 0x00ee, 0x002e, 0x0005, 0x6020, 0xd09c, 0x0005, 0x6800, 0x9084, + 0xfffe, 0x9086, 0x00c0, 0x01b8, 0x2001, 0x00c0, 0x080c, 0x2987, + 0x0156, 0x20a9, 0x002d, 0x1d04, 0x6b4b, 0x2091, 0x6000, 0x1f04, + 0x6b4b, 0x015e, 0x00d6, 0x2069, 0x1800, 0x6894, 0x8001, 0x0220, + 0x0118, 0x6896, 0x00de, 0x0005, 0x6897, 0x0014, 0x68e0, 0xd0dc, + 0x0dc8, 0x6800, 0x9086, 0x0001, 0x1da8, 0x080c, 0x7d27, 0x0c90, + 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, + 0x1800, 0x080c, 0x6f39, 0x2001, 0x193e, 0x2003, 0x0000, 0x9006, + 0x7092, 0x60e2, 0x6886, 0x080c, 0x254a, 0x9006, 0x080c, 0x2987, + 0x080c, 0x58e0, 0x6027, 0xffff, 0x602b, 0x182f, 0x00ee, 0x00de, + 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, + 0x0140, 0x2071, 0x1800, 0x2001, 0x194e, 0x200c, 0x9186, 0x0000, + 0x0158, 0x9186, 0x0001, 0x0158, 0x9186, 0x0002, 0x0158, 0x9186, + 0x0003, 0x0158, 0x0804, 0x6c1d, 0x7093, 0x0022, 0x0040, 0x7093, + 0x0021, 0x0028, 0x7093, 0x0023, 0x0010, 0x7093, 0x0024, 0x60e3, + 0x0000, 0x6887, 0x0001, 0x2001, 0x0001, 0x080c, 0x254a, 0x0026, + 0x080c, 0x9947, 0x002e, 0x7000, 0x908e, 0x0004, 0x0118, 0x602b, + 0x0028, 0x0010, 0x602b, 0x0020, 0x0156, 0x0126, 0x2091, 0x8000, + 0x20a9, 0x0005, 0x6024, 0xd0ac, 0x0150, 0x012e, 0x015e, 0x080c, + 0xbcec, 0x0118, 0x9006, 0x080c, 0x29b1, 0x0804, 0x6c29, 0x6800, + 0x9084, 0x00a1, 0xc0bd, 0x6802, 0x080c, 0x28d0, 0x6904, 0xd1d4, + 0x1140, 0x2001, 0x0100, 0x080c, 0x2987, 0x1f04, 0x6bca, 0x080c, + 0x6caa, 0x012e, 0x015e, 0x080c, 0x6c64, 0x01a8, 0x6044, 0x9005, + 0x0168, 0x6050, 0x0006, 0x9085, 0x0020, 0x6052, 0x080c, 0x6caa, + 0x9006, 0x8001, 0x1df0, 0x000e, 0x6052, 0x0028, 0x6804, 0xd0d4, + 0x1110, 0x080c, 0x6caa, 0x080c, 0xbcec, 0x0118, 0x9006, 0x080c, + 0x29b1, 0x0016, 0x0026, 0x7000, 0x908e, 0x0004, 0x0130, 0x2009, + 0x00c8, 0x2011, 0x6ad9, 0x080c, 0x7cd9, 0x002e, 0x001e, 0x080c, + 0x7b73, 0x2001, 0x194e, 0x2003, 0x0004, 0x080c, 0x693a, 0x080c, + 0x6c64, 0x0138, 0x6804, 0xd0d4, 0x1120, 0xd0dc, 0x1100, 0x080c, + 0x6f2f, 0x00ee, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00d6, 0x00e6, + 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, 0x080c, 0x7b7c, + 0x080c, 0x6f39, 0x2001, 0x193e, 0x2003, 0x0000, 0x9006, 0x7092, + 0x60e2, 0x6886, 0x080c, 0x254a, 0x9006, 0x080c, 0x2987, 0x6043, + 0x0090, 0x6043, 0x0010, 0x6027, 0xffff, 0x602b, 0x182f, 0x00ee, + 0x00de, 0x00ce, 0x0005, 0x0006, 0x2001, 0x194d, 0x2004, 0x9086, + 0xaaaa, 0x000e, 0x0005, 0x0006, 0x080c, 0x5117, 0x9084, 0x0030, + 0x9086, 0x0000, 0x000e, 0x0005, 0x0006, 0x080c, 0x5117, 0x9084, + 0x0030, 0x9086, 0x0030, 0x000e, 0x0005, 0x0006, 0x080c, 0x5117, + 0x9084, 0x0030, 0x9086, 0x0010, 0x000e, 0x0005, 0x0006, 0x080c, + 0x5117, 0x9084, 0x0030, 0x9086, 0x0020, 0x000e, 0x0005, 0x0036, + 0x0016, 0x2001, 0x180c, 0x2004, 0x908c, 0x0013, 0x0180, 0x0020, + 0x080c, 0x256a, 0x900e, 0x0028, 0x080c, 0x629c, 0x1dc8, 0x2009, + 0x0002, 0x2019, 0x0028, 0x080c, 0x2dfb, 0x9006, 0x0019, 0x001e, + 0x003e, 0x0005, 0x00e6, 0x2071, 0x180c, 0x2e04, 0x0130, 0x080c, + 0xbce5, 0x1128, 0x9085, 0x0010, 0x0010, 0x9084, 0xffef, 0x2072, + 0x00ee, 0x0005, 0x6050, 0x0006, 0x60ec, 0x0006, 0x600c, 0x0006, + 0x6004, 0x0006, 0x6028, 0x0006, 0x0016, 0x6138, 0x6050, 0x9084, + 0xfbff, 0x9085, 0x2000, 0x6052, 0x613a, 0x20a9, 0x0012, 0x1d04, + 0x6cbf, 0x2091, 0x6000, 0x1f04, 0x6cbf, 0x602f, 0x0100, 0x602f, + 0x0000, 0x6050, 0x9085, 0x0400, 0x9084, 0xdfff, 0x6052, 0x613a, + 0x001e, 0x602f, 0x0040, 0x602f, 0x0000, 0x000e, 0x602a, 0x000e, + 0x6006, 0x000e, 0x600e, 0x000e, 0x60ee, 0x60e3, 0x0000, 0x6887, + 0x0001, 0x2001, 0x0001, 0x080c, 0x254a, 0x2001, 0x00a0, 0x0006, + 0x080c, 0xbcec, 0x000e, 0x0130, 0x080c, 0x29a5, 0x9006, 0x080c, + 0x29b1, 0x0010, 0x080c, 0x2987, 0x000e, 0x6052, 0x6050, 0x0006, + 0xc0e5, 0x6052, 0x00f6, 0x2079, 0x0100, 0x080c, 0x2845, 0x00fe, + 0x000e, 0x6052, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x00c6, + 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2069, 0x0140, 0x2071, 0x1800, + 0x6020, 0x9084, 0x0080, 0x0138, 0x2001, 0x180c, 0x200c, 0xc1c5, + 0x2102, 0x0804, 0x6d7f, 0x2001, 0x180c, 0x200c, 0xc1c4, 0x2102, + 0x6028, 0x9084, 0xe1ff, 0x602a, 0x6027, 0x0200, 0x2001, 0x0090, + 0x080c, 0x2987, 0x20a9, 0x0366, 0x6024, 0xd0cc, 0x1518, 0x1d04, + 0x6d2c, 0x2091, 0x6000, 0x1f04, 0x6d2c, 0x2011, 0x0003, 0x080c, + 0x92ec, 0x2011, 0x0002, 0x080c, 0x92f6, 0x080c, 0x91de, 0x901e, + 0x080c, 0x9254, 0x2001, 0x00a0, 0x080c, 0x2987, 0x080c, 0x6f2a, + 0x080c, 0x5a21, 0x080c, 0xbcec, 0x0110, 0x080c, 0x0d27, 0x9085, + 0x0001, 0x0498, 0x86ff, 0x1110, 0x080c, 0x189c, 0x60e3, 0x0000, + 0x2001, 0x193e, 0x2004, 0x080c, 0x254a, 0x60e2, 0x2001, 0x0080, + 0x080c, 0x2987, 0x20a9, 0x0366, 0x6027, 0x1e00, 0x2009, 0x1e00, + 0x080c, 0x28d0, 0x6024, 0x910c, 0x0138, 0x1d04, 0x6d64, 0x2091, + 0x6000, 0x1f04, 0x6d64, 0x0808, 0x6028, 0x9085, 0x1e00, 0x602a, + 0x70ac, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x080c, + 0xbcec, 0x0110, 0x080c, 0x0d27, 0x9006, 0x00ee, 0x00de, 0x00ce, + 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, + 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, + 0x2069, 0x0140, 0x6020, 0x9084, 0x00c0, 0x0120, 0x6884, 0x9005, + 0x1904, 0x6de1, 0x2001, 0x0088, 0x080c, 0x2987, 0x9006, 0x60e2, + 0x6886, 0x080c, 0x254a, 0x2069, 0x0200, 0x6804, 0x9005, 0x1118, + 0x6808, 0x9005, 0x01c0, 0x6028, 0x9084, 0xfbff, 0x602a, 0x6027, + 0x0400, 0x2069, 0x195e, 0x7000, 0x206a, 0x7093, 0x0026, 0x7003, + 0x0001, 0x20a9, 0x0002, 0x1d04, 0x6dc3, 0x2091, 0x6000, 0x1f04, + 0x6dc3, 0x0804, 0x6e0f, 0x2069, 0x0140, 0x20a9, 0x0384, 0x6027, + 0x1e00, 0x2009, 0x1e00, 0x080c, 0x28d0, 0x6024, 0x910c, 0x0508, + 0x9084, 0x1a00, 0x11f0, 0x1d04, 0x6dcf, 0x2091, 0x6000, 0x1f04, + 0x6dcf, 0x2011, 0x0003, 0x080c, 0x92ec, 0x2011, 0x0002, 0x080c, + 0x92f6, 0x080c, 0x91de, 0x901e, 0x080c, 0x9254, 0x2001, 0x00a0, + 0x080c, 0x2987, 0x080c, 0x6f2a, 0x080c, 0x5a21, 0x9085, 0x0001, + 0x00b0, 0x2001, 0x0080, 0x080c, 0x2987, 0x2069, 0x0140, 0x60e3, + 0x0000, 0x70ac, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, + 0x2001, 0x193e, 0x2004, 0x080c, 0x254a, 0x60e2, 0x9006, 0x00ee, + 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, 0x015e, 0x0005, 0x0156, + 0x0016, 0x0026, 0x0036, 0x00c6, 0x00d6, 0x00e6, 0x2061, 0x0100, + 0x2071, 0x1800, 0x6020, 0x9084, 0x00c0, 0x01c8, 0x2011, 0x0003, + 0x080c, 0x92ec, 0x2011, 0x0002, 0x080c, 0x92f6, 0x080c, 0x91de, + 0x901e, 0x080c, 0x9254, 0x2069, 0x0140, 0x2001, 0x00a0, 0x080c, + 0x2987, 0x080c, 0x6f2a, 0x080c, 0x5a21, 0x0804, 0x6eaa, 0x2001, + 0x180c, 0x200c, 0xd1b4, 0x1160, 0xc1b5, 0x2102, 0x080c, 0x6ac1, + 0x2069, 0x0140, 0x2001, 0x0080, 0x080c, 0x2987, 0x60e3, 0x0000, + 0x2069, 0x0200, 0x6804, 0x9005, 0x1118, 0x6808, 0x9005, 0x0180, + 0x6028, 0x9084, 0xfdff, 0x602a, 0x6027, 0x0200, 0x2069, 0x195e, + 0x7000, 0x206a, 0x7093, 0x0027, 0x7003, 0x0001, 0x0804, 0x6eaa, + 0x6027, 0x1e00, 0x2009, 0x1e00, 0x080c, 0x28d0, 0x6024, 0x910c, + 0x01c8, 0x9084, 0x1c00, 0x11b0, 0x1d04, 0x6e68, 0x0006, 0x0016, + 0x00c6, 0x00d6, 0x00e6, 0x080c, 0x7bae, 0x00ee, 0x00de, 0x00ce, + 0x001e, 0x000e, 0x00e6, 0x2071, 0x19c9, 0x7018, 0x00ee, 0x9005, + 0x19f8, 0x0500, 0x0026, 0x2011, 0x6ad9, 0x080c, 0x7c4a, 0x2011, + 0x6acc, 0x080c, 0x7d1b, 0x002e, 0x2069, 0x0140, 0x60e3, 0x0000, + 0x70ac, 0x9005, 0x1118, 0x6887, 0x0001, 0x0008, 0x6886, 0x2001, + 0x193e, 0x2004, 0x080c, 0x254a, 0x60e2, 0x2001, 0x180c, 0x200c, + 0xc1b4, 0x2102, 0x00ee, 0x00de, 0x00ce, 0x003e, 0x002e, 0x001e, + 0x015e, 0x0005, 0x0156, 0x0016, 0x0026, 0x0036, 0x0046, 0x00c6, + 0x00e6, 0x2061, 0x0100, 0x2071, 0x1800, 0x080c, 0xbce5, 0x1904, + 0x6f18, 0x7130, 0xd184, 0x1170, 0x080c, 0x2f86, 0x0138, 0xc18d, + 0x7132, 0x2011, 0x1854, 0x2214, 0xd2ac, 0x1120, 0x7030, 0xd08c, + 0x0904, 0x6f18, 0x2011, 0x1854, 0x220c, 0xd1a4, 0x0538, 0x0016, + 0x2019, 0x000e, 0x080c, 0xcf62, 0x0156, 0x00b6, 0x20a9, 0x007f, + 0x900e, 0x9186, 0x007e, 0x01a0, 0x9186, 0x0080, 0x0188, 0x080c, + 0x5f7e, 0x1170, 0x2120, 0x9006, 0x0016, 0x2009, 0x000e, 0x080c, + 0xcfe6, 0x2009, 0x0001, 0x2011, 0x0100, 0x080c, 0x7e3e, 0x001e, + 0x8108, 0x1f04, 0x6ee1, 0x00be, 0x015e, 0x001e, 0xd1ac, 0x1148, + 0x0016, 0x2009, 0x0002, 0x2019, 0x0004, 0x080c, 0x2dfb, 0x001e, + 0x0078, 0x0156, 0x00b6, 0x20a9, 0x007f, 0x900e, 0x080c, 0x5f7e, + 0x1110, 0x080c, 0x5a3b, 0x8108, 0x1f04, 0x6f0e, 0x00be, 0x015e, + 0x080c, 0x189c, 0x080c, 0x9947, 0x60e3, 0x0000, 0x080c, 0x5a21, + 0x080c, 0x6b8a, 0x00ee, 0x00ce, 0x004e, 0x003e, 0x002e, 0x001e, + 0x015e, 0x0005, 0x2001, 0x194e, 0x2003, 0x0001, 0x0005, 0x2001, + 0x194e, 0x2003, 0x0000, 0x0005, 0x2001, 0x194d, 0x2003, 0xaaaa, + 0x0005, 0x2001, 0x194d, 0x2003, 0x0000, 0x0005, 0x2071, 0x18f0, + 0x7003, 0x0000, 0x7007, 0x0000, 0x080c, 0x0fee, 0x090c, 0x0db2, + 0xa8ab, 0xdcb0, 0x2900, 0x704e, 0x080c, 0x0fee, 0x090c, 0x0db2, + 0xa8ab, 0xdcb0, 0x2900, 0x7052, 0xa867, 0x0000, 0xa86b, 0x0001, + 0xa89f, 0x0000, 0x0005, 0x00e6, 0x2071, 0x0040, 0x6848, 0x9005, + 0x1118, 0x9085, 0x0001, 0x04b0, 0x6840, 0x9005, 0x0150, 0x04a1, + 0x6a50, 0x9200, 0x7002, 0x6854, 0x9101, 0x7006, 0x9006, 0x7012, + 0x7016, 0x6850, 0x7002, 0x6854, 0x7006, 0x6858, 0x700a, 0x685c, + 0x700e, 0x6840, 0x9005, 0x1110, 0x7012, 0x7016, 0x6848, 0x701a, + 0x701c, 0x9085, 0x0040, 0x701e, 0x2001, 0x0019, 0x7036, 0x702b, + 0x0001, 0x2001, 0x0004, 0x200c, 0x918c, 0xfff7, 0x918d, 0x8000, + 0x2102, 0x00d6, 0x2069, 0x18f0, 0x6807, 0x0001, 0x00de, 0x080c, + 0x74e5, 0x9006, 0x00ee, 0x0005, 0x900e, 0x0156, 0x20a9, 0x0006, + 0x8003, 0x2011, 0x0100, 0x2214, 0x9296, 0x0008, 0x1110, 0x818d, + 0x0010, 0x81f5, 0x3e08, 0x1f04, 0x6fa0, 0x015e, 0x0005, 0x2079, + 0x0040, 0x2071, 0x18f0, 0x7004, 0x0002, 0x6fbf, 0x6fc0, 0x6ff7, + 0x7052, 0x714d, 0x6fbd, 0x6fbd, 0x7177, 0x080c, 0x0db2, 0x0005, + 0x2079, 0x0040, 0x782c, 0x908c, 0x0780, 0x190c, 0x7571, 0xd0a4, + 0x01f0, 0x7824, 0x2048, 0x9006, 0xa802, 0xa806, 0xa864, 0x9084, + 0x00ff, 0x908a, 0x0040, 0x0608, 0x00b8, 0x2001, 0x1800, 0x200c, + 0x9186, 0x0003, 0x1160, 0x7104, 0x9186, 0x0004, 0x0140, 0x9186, + 0x0007, 0x0128, 0x9186, 0x0003, 0x19e8, 0x080c, 0x7052, 0x782c, + 0xd09c, 0x090c, 0x74e5, 0x0005, 0x9082, 0x005a, 0x1218, 0x2100, + 0x003b, 0x0c18, 0x080c, 0x7088, 0x0c90, 0x00e3, 0x08f0, 0x0005, + 0x7088, 0x7088, 0x7088, 0x7088, 0x7088, 0x7088, 0x7088, 0x7088, + 0x70aa, 0x7088, 0x7088, 0x7088, 0x7088, 0x7088, 0x7088, 0x7088, + 0x7088, 0x7088, 0x7088, 0x7088, 0x7088, 0x7088, 0x7088, 0x7088, + 0x7088, 0x7088, 0x7088, 0x7088, 0x7094, 0x7088, 0x724c, 0x7088, + 0x7088, 0x7088, 0x7088, 0x7088, 0x7094, 0x728d, 0x72ce, 0x7315, + 0x7329, 0x7088, 0x7088, 0x70aa, 0x7094, 0x7088, 0x7088, 0x7121, + 0x73d4, 0x73ef, 0x7088, 0x70aa, 0x7088, 0x7088, 0x7088, 0x7088, + 0x7117, 0x73ef, 0x7088, 0x7088, 0x7088, 0x7088, 0x7088, 0x7088, + 0x7088, 0x7088, 0x7088, 0x70be, 0x7088, 0x7088, 0x7088, 0x7088, + 0x7088, 0x7088, 0x7088, 0x7088, 0x7088, 0x7515, 0x7088, 0x7088, + 0x7088, 0x7088, 0x7088, 0x70d2, 0x7088, 0x7088, 0x7088, 0x7088, + 0x7088, 0x7088, 0x2079, 0x0040, 0x7004, 0x9086, 0x0003, 0x1198, + 0x782c, 0x080c, 0x750e, 0xd0a4, 0x0170, 0x7824, 0x2048, 0x9006, + 0xa802, 0xa806, 0xa864, 0x9084, 0x00ff, 0x908a, 0x001a, 0x1210, + 0x002b, 0x0c50, 0x00e9, 0x080c, 0x74e5, 0x0005, 0x7088, 0x7094, + 0x7238, 0x7088, 0x7094, 0x7088, 0x7094, 0x7094, 0x7088, 0x7094, + 0x7238, 0x7094, 0x7094, 0x7094, 0x7094, 0x7094, 0x7088, 0x7094, + 0x7238, 0x7088, 0x7088, 0x7094, 0x7088, 0x7088, 0x7088, 0x7094, + 0x00e6, 0x2071, 0x18f0, 0x2009, 0x0400, 0x0071, 0x00ee, 0x0005, + 0x2009, 0x1000, 0x0049, 0x0005, 0x2009, 0x2000, 0x0029, 0x0005, + 0x2009, 0x0800, 0x0009, 0x0005, 0x7007, 0x0001, 0xa868, 0x9084, + 0x00ff, 0x9105, 0xa86a, 0x0126, 0x2091, 0x8000, 0x080c, 0x6536, + 0x012e, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x0d08, 0x8001, + 0x1120, 0x7007, 0x0001, 0x0804, 0x71f6, 0x7007, 0x0003, 0x7012, + 0x2900, 0x7016, 0x701a, 0x704b, 0x71f6, 0x0005, 0xa864, 0x8007, + 0x9084, 0x00ff, 0x0968, 0x8001, 0x1120, 0x7007, 0x0001, 0x0804, + 0x7211, 0x7007, 0x0003, 0x7012, 0x2900, 0x7016, 0x701a, 0x704b, + 0x7211, 0x0005, 0xa864, 0x8007, 0x9084, 0x00ff, 0x9086, 0x0001, + 0x1904, 0x7090, 0x7007, 0x0001, 0x2009, 0x1832, 0x210c, 0x81ff, + 0x11a8, 0xa868, 0x9084, 0x00ff, 0xa86a, 0xa883, 0x0000, 0x080c, + 0x5c50, 0x1108, 0x0005, 0x0126, 0x2091, 0x8000, 0xa867, 0x0139, + 0xa87a, 0xa982, 0x080c, 0x6536, 0x012e, 0x0ca0, 0xa994, 0x9186, + 0x0071, 0x0d38, 0x9186, 0x0064, 0x0d20, 0x9186, 0x007c, 0x0d08, + 0x9186, 0x0028, 0x09f0, 0x9186, 0x0038, 0x09d8, 0x9186, 0x0078, + 0x09c0, 0x9186, 0x005f, 0x09a8, 0x9186, 0x0056, 0x0990, 0xa897, + 0x4005, 0xa89b, 0x0001, 0x2001, 0x0030, 0x900e, 0x08a0, 0xa87c, + 0x9084, 0x00c0, 0x9086, 0x00c0, 0x1120, 0x7007, 0x0001, 0x0804, + 0x7406, 0x2900, 0x7016, 0x701a, 0x20a9, 0x0004, 0xa860, 0x20e0, + 0xa85c, 0x9080, 0x0030, 0x2098, 0x7050, 0x2040, 0xa060, 0x20e8, + 0xa05c, 0x9080, 0x0023, 0x20a0, 0x4003, 0xa888, 0x7012, 0x9082, + 0x0401, 0x1a04, 0x7098, 0xaab4, 0x928a, 0x0002, 0x1a04, 0x7098, + 0x82ff, 0x1138, 0xa8b8, 0xa9bc, 0x9105, 0x0118, 0x2001, 0x71b4, + 0x0018, 0x9280, 0x71aa, 0x2005, 0x7056, 0x7010, 0x9015, 0x0904, + 0x7195, 0x080c, 0x0fee, 0x1118, 0x7007, 0x0004, 0x0005, 0x2900, + 0x7022, 0x7054, 0x2060, 0xe000, 0xa866, 0x7050, 0x2040, 0xa95c, + 0xe004, 0x9100, 0xa076, 0xa860, 0xa072, 0xe008, 0x920a, 0x1210, + 0x900e, 0x2200, 0x7112, 0xe20c, 0x8003, 0x800b, 0x9296, 0x0004, + 0x0108, 0x9108, 0xa17a, 0x810b, 0xa17e, 0x080c, 0x10b5, 0xa06c, + 0x908e, 0x0100, 0x0170, 0x9086, 0x0200, 0x0118, 0x7007, 0x0007, + 0x0005, 0x7020, 0x2048, 0x080c, 0x1007, 0x7014, 0x2048, 0x0804, + 0x7098, 0x7020, 0x2048, 0x7018, 0xa802, 0xa807, 0x0000, 0x2908, + 0x2048, 0xa906, 0x711a, 0x0804, 0x714d, 0x7014, 0x2048, 0x7007, + 0x0001, 0xa8b4, 0x9005, 0x1128, 0xa8b8, 0xa9bc, 0x9105, 0x0108, + 0x00b9, 0xa864, 0x9084, 0x00ff, 0x9086, 0x001e, 0x0904, 0x7406, + 0x0804, 0x71f6, 0x71ac, 0x71b0, 0x0002, 0x001d, 0x0007, 0x0004, + 0x000a, 0x001b, 0x0005, 0x0006, 0x000a, 0x001d, 0x0005, 0x0004, + 0x0076, 0x0066, 0xafb8, 0xaebc, 0xa804, 0x2050, 0xb0c0, 0xb0e2, + 0xb0bc, 0xb0de, 0xb0b8, 0xb0d2, 0xb0b4, 0xb0ce, 0xb6da, 0xb7d6, + 0xb0b0, 0xb0ca, 0xb0ac, 0xb0c6, 0xb0a8, 0xb0ba, 0xb0a4, 0xb0b6, + 0xb6c2, 0xb7be, 0xb0a0, 0xb0b2, 0xb09c, 0xb0ae, 0xb098, 0xb0a2, + 0xb094, 0xb09e, 0xb6aa, 0xb7a6, 0xb090, 0xb09a, 0xb08c, 0xb096, + 0xb088, 0xb08a, 0xb084, 0xb086, 0xb692, 0xb78e, 0xb080, 0xb082, + 0xb07c, 0xb07e, 0xb078, 0xb072, 0xb074, 0xb06e, 0xb67a, 0xb776, + 0xb004, 0x9055, 0x1958, 0x006e, 0x007e, 0x0005, 0x2009, 0x1832, + 0x210c, 0x81ff, 0x1178, 0x080c, 0x5a9d, 0x1108, 0x0005, 0x080c, + 0x6770, 0x0126, 0x2091, 0x8000, 0x080c, 0xb8e3, 0x080c, 0x6536, + 0x012e, 0x0ca0, 0x080c, 0xbce5, 0x1d70, 0x2001, 0x0028, 0x900e, + 0x0c70, 0x2009, 0x1832, 0x210c, 0x81ff, 0x11d8, 0xa888, 0x9005, + 0x01e0, 0xa883, 0x0000, 0xa87c, 0xd0f4, 0x0120, 0x080c, 0x5bb2, + 0x1138, 0x0005, 0x9006, 0xa87a, 0x080c, 0x5b2d, 0x1108, 0x0005, + 0x0126, 0x2091, 0x8000, 0xa87a, 0xa982, 0x080c, 0x6536, 0x012e, + 0x0cb0, 0x2001, 0x0028, 0x900e, 0x0c98, 0x2001, 0x0000, 0x0c80, + 0x7018, 0xa802, 0x2908, 0x2048, 0xa906, 0x711a, 0x7010, 0x8001, + 0x7012, 0x0118, 0x7007, 0x0003, 0x0030, 0x7014, 0x2048, 0x7007, + 0x0001, 0x7048, 0x080f, 0x0005, 0x00b6, 0x7007, 0x0001, 0xa974, + 0xa878, 0x9084, 0x00ff, 0x9096, 0x0004, 0x0540, 0x20a9, 0x0001, + 0x9096, 0x0001, 0x0190, 0x900e, 0x20a9, 0x0800, 0x9096, 0x0002, + 0x0160, 0x9005, 0x11d8, 0xa974, 0x080c, 0x5f7e, 0x11b8, 0x0066, + 0xae80, 0x080c, 0x608e, 0x006e, 0x0088, 0x0046, 0x2011, 0x180c, + 0x2224, 0xc484, 0x2412, 0x004e, 0x00c6, 0x080c, 0x5f7e, 0x1110, + 0x080c, 0x618e, 0x8108, 0x1f04, 0x7275, 0x00ce, 0xa87c, 0xd084, + 0x1120, 0x080c, 0x1007, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000, + 0x080c, 0x6536, 0x012e, 0x00be, 0x0005, 0x0126, 0x2091, 0x8000, + 0x7007, 0x0001, 0x080c, 0x62a0, 0x0580, 0x2061, 0x1a3e, 0x6100, + 0xd184, 0x0178, 0xa888, 0x9084, 0x00ff, 0x1550, 0x6000, 0xd084, + 0x0520, 0x6004, 0x9005, 0x1538, 0x6003, 0x0000, 0x600b, 0x0000, + 0x00c8, 0x2011, 0x0001, 0xa890, 0x9005, 0x1110, 0x2001, 0x001e, + 0x8000, 0x6016, 0xa888, 0x9084, 0x00ff, 0x0178, 0x6006, 0xa888, + 0x8007, 0x9084, 0x00ff, 0x0148, 0x600a, 0xa888, 0x8000, 0x1108, + 0xc28d, 0x6202, 0x012e, 0x0804, 0x74cf, 0x012e, 0x0804, 0x74c9, + 0x012e, 0x0804, 0x74c3, 0x012e, 0x0804, 0x74c6, 0x0126, 0x2091, + 0x8000, 0x7007, 0x0001, 0x080c, 0x62a0, 0x05e0, 0x2061, 0x1a3e, + 0x6000, 0xd084, 0x05b8, 0x6204, 0x6308, 0xd08c, 0x1530, 0xac78, + 0x9484, 0x0003, 0x0170, 0xa988, 0x918c, 0x00ff, 0x8001, 0x1120, + 0x2100, 0x9210, 0x0620, 0x0028, 0x8001, 0x1508, 0x2100, 0x9212, + 0x02f0, 0x9484, 0x000c, 0x0188, 0xa988, 0x810f, 0x918c, 0x00ff, + 0x9082, 0x0004, 0x1120, 0x2100, 0x9318, 0x0288, 0x0030, 0x9082, + 0x0004, 0x1168, 0x2100, 0x931a, 0x0250, 0xa890, 0x9005, 0x0110, + 0x8000, 0x6016, 0x6206, 0x630a, 0x012e, 0x0804, 0x74cf, 0x012e, + 0x0804, 0x74cc, 0x012e, 0x0804, 0x74c9, 0x0126, 0x2091, 0x8000, + 0x7007, 0x0001, 0x2061, 0x1a3e, 0x6300, 0xd38c, 0x1120, 0x6308, + 0x8318, 0x0220, 0x630a, 0x012e, 0x0804, 0x74dd, 0x012e, 0x0804, + 0x74cc, 0x00b6, 0x0126, 0x00c6, 0x2091, 0x8000, 0x7007, 0x0001, + 0xa87c, 0xd0ac, 0x0148, 0x00c6, 0x2061, 0x1a3e, 0x6000, 0x9084, + 0xfcff, 0x6002, 0x00ce, 0x0440, 0xa888, 0x9005, 0x05d8, 0xa88c, + 0x9065, 0x0598, 0x2001, 0x1832, 0x2004, 0x9005, 0x0118, 0x080c, + 0x9a06, 0x0068, 0x6017, 0xf400, 0x605b, 0x0000, 0xa97c, 0xd1a4, + 0x0110, 0xa980, 0x615a, 0x2009, 0x0041, 0x080c, 0x9a50, 0xa988, + 0x918c, 0xff00, 0x9186, 0x2000, 0x1138, 0x0026, 0x900e, 0x2011, + 0xfdff, 0x080c, 0x7e3e, 0x002e, 0xa87c, 0xd0c4, 0x0148, 0x2061, + 0x1a3e, 0x6000, 0xd08c, 0x1120, 0x6008, 0x8000, 0x0208, 0x600a, + 0x00ce, 0x012e, 0x00be, 0x0804, 0x74cf, 0x00ce, 0x012e, 0x00be, + 0x0804, 0x74c9, 0xa984, 0x9186, 0x002e, 0x0d30, 0x9186, 0x002d, + 0x0d18, 0x9186, 0x0045, 0x0510, 0x9186, 0x002a, 0x1130, 0x2001, + 0x180c, 0x200c, 0xc194, 0x2102, 0x08b8, 0x9186, 0x0020, 0x0158, + 0x9186, 0x0029, 0x1d10, 0xa974, 0x080c, 0x5f7e, 0x1968, 0xb800, + 0xc0e4, 0xb802, 0x0848, 0xa88c, 0x9065, 0x09b8, 0x6007, 0x0024, + 0x2001, 0x1955, 0x2004, 0x601a, 0x0804, 0x7364, 0xa88c, 0x9065, + 0x0960, 0x00e6, 0xa890, 0x9075, 0x2001, 0x1832, 0x2004, 0x9005, + 0x0150, 0x080c, 0x9a06, 0x8eff, 0x0118, 0x2e60, 0x080c, 0x9a06, + 0x00ee, 0x0804, 0x7364, 0x6024, 0xc0dc, 0xc0d5, 0x6026, 0x2e60, + 0x6007, 0x003a, 0xa8a0, 0x9005, 0x0130, 0x6007, 0x003b, 0xa8a4, + 0x602e, 0xa8a8, 0x6016, 0x6003, 0x0001, 0x080c, 0x8000, 0x080c, + 0x8582, 0x00ee, 0x0804, 0x7364, 0x2061, 0x1a3e, 0x6000, 0xd084, + 0x0190, 0xd08c, 0x1904, 0x74dd, 0x0126, 0x2091, 0x8000, 0x6204, + 0x8210, 0x0220, 0x6206, 0x012e, 0x0804, 0x74dd, 0x012e, 0xa883, + 0x0016, 0x0804, 0x74d6, 0xa883, 0x0007, 0x0804, 0x74d6, 0xa864, + 0x8007, 0x9084, 0x00ff, 0x0130, 0x8001, 0x1138, 0x7007, 0x0001, + 0x0069, 0x0005, 0x080c, 0x7090, 0x0040, 0x7007, 0x0003, 0x7012, + 0x2900, 0x7016, 0x701a, 0x704b, 0x7406, 0x0005, 0x00b6, 0x00e6, + 0x0126, 0x2091, 0x8000, 0x903e, 0x2061, 0x1800, 0x61c8, 0x81ff, + 0x1904, 0x7488, 0x6130, 0xd194, 0x1904, 0x74b2, 0xa878, 0x2070, + 0x9e82, 0x1cd0, 0x0a04, 0x747c, 0x6060, 0x9e02, 0x1a04, 0x747c, + 0x7120, 0x9186, 0x0006, 0x1904, 0x746e, 0x7010, 0x905d, 0x0904, + 0x7488, 0xb800, 0xd0e4, 0x1904, 0x74ac, 0x2061, 0x1a3e, 0x6100, + 0x9184, 0x0301, 0x9086, 0x0001, 0x15a0, 0x7024, 0xd0dc, 0x1904, + 0x74b5, 0xa883, 0x0000, 0xa803, 0x0000, 0x2908, 0x7014, 0x9005, + 0x1198, 0x7116, 0xa87c, 0xd0f4, 0x1904, 0x74b8, 0x080c, 0x5113, + 0xd09c, 0x1118, 0xa87c, 0xc0cc, 0xa87e, 0x2e60, 0x080c, 0x7d5e, + 0x012e, 0x00ee, 0x00be, 0x0005, 0x2048, 0xa800, 0x9005, 0x1de0, + 0xa902, 0x2148, 0xa87c, 0xd0f4, 0x1904, 0x74b8, 0x012e, 0x00ee, + 0x00be, 0x0005, 0x012e, 0x00ee, 0xa883, 0x0006, 0x00be, 0x0804, + 0x74d6, 0xd184, 0x0db8, 0xd1c4, 0x1190, 0x00a0, 0xa974, 0x080c, + 0x5f7e, 0x15d0, 0xb800, 0xd0e4, 0x15b8, 0x7120, 0x9186, 0x0007, + 0x1118, 0xa883, 0x0002, 0x0490, 0xa883, 0x0008, 0x0478, 0xa883, + 0x000e, 0x0460, 0xa883, 0x0017, 0x0448, 0xa883, 0x0035, 0x0430, + 0x080c, 0x5117, 0xd0fc, 0x01e8, 0xa878, 0x2070, 0x9e82, 0x1cd0, + 0x02c0, 0x6060, 0x9e02, 0x12a8, 0x7120, 0x9186, 0x0006, 0x1188, + 0x7010, 0x905d, 0x0170, 0xb800, 0xd0bc, 0x0158, 0x2039, 0x0001, + 0x7000, 0x9086, 0x0007, 0x1904, 0x7412, 0x7003, 0x0002, 0x0804, + 0x7412, 0xa883, 0x0028, 0x0010, 0xa883, 0x0029, 0x012e, 0x00ee, + 0x00be, 0x0420, 0xa883, 0x002a, 0x0cc8, 0xa883, 0x0045, 0x0cb0, + 0x2e60, 0x2019, 0x0002, 0x601b, 0x0014, 0x080c, 0xcbad, 0x012e, + 0x00ee, 0x00be, 0x0005, 0x2009, 0x003e, 0x0058, 0x2009, 0x0004, + 0x0040, 0x2009, 0x0006, 0x0028, 0x2009, 0x0016, 0x0010, 0x2009, + 0x0001, 0xa884, 0x9084, 0xff00, 0x9105, 0xa886, 0x0126, 0x2091, + 0x8000, 0x080c, 0x6536, 0x012e, 0x0005, 0x080c, 0x1007, 0x0005, + 0x00d6, 0x080c, 0x7d55, 0x00de, 0x0005, 0x00d6, 0x00e6, 0x0126, + 0x2091, 0x8000, 0x2071, 0x0040, 0x702c, 0xd084, 0x01d8, 0x908c, + 0x0780, 0x190c, 0x7571, 0xd09c, 0x11a8, 0x2071, 0x1800, 0x70b8, + 0x90ea, 0x0040, 0x0278, 0x8001, 0x70ba, 0x702c, 0x2048, 0xa800, + 0x702e, 0x9006, 0xa802, 0xa806, 0x2071, 0x0040, 0x2900, 0x7022, + 0x702c, 0x0c28, 0x012e, 0x00ee, 0x00de, 0x0005, 0x0006, 0x9084, + 0x0780, 0x190c, 0x7571, 0x000e, 0x0005, 0x00d6, 0x00c6, 0x0036, + 0x0026, 0x0016, 0x00b6, 0x7007, 0x0001, 0xaa74, 0x9282, 0x0004, + 0x1a04, 0x7562, 0xa97c, 0x9188, 0x1000, 0x2104, 0x905d, 0xb804, + 0xd284, 0x0140, 0x05e8, 0x8007, 0x9084, 0x00ff, 0x9084, 0x0006, + 0x1108, 0x04b0, 0x2b10, 0x080c, 0x9980, 0x1118, 0x080c, 0x9a23, + 0x05a8, 0x6212, 0xa874, 0x0002, 0x7540, 0x7545, 0x7548, 0x754e, + 0x2019, 0x0002, 0x080c, 0xcf62, 0x0060, 0x080c, 0xcefe, 0x0048, + 0x2019, 0x0002, 0xa980, 0x080c, 0xcf19, 0x0018, 0xa980, 0x080c, + 0xcefe, 0x080c, 0x99d6, 0xa887, 0x0000, 0x0126, 0x2091, 0x8000, + 0x080c, 0x6536, 0x012e, 0x00be, 0x001e, 0x002e, 0x003e, 0x00ce, + 0x00de, 0x0005, 0xa887, 0x0006, 0x0c80, 0xa887, 0x0002, 0x0c68, + 0xa887, 0x0005, 0x0c50, 0xa887, 0x0004, 0x0c38, 0xa887, 0x0007, + 0x0c20, 0x2091, 0x8000, 0x0e04, 0x7573, 0x0006, 0x0016, 0x2001, + 0x8003, 0x0006, 0x0804, 0x0dbb, 0x0005, 0x00f6, 0x2079, 0x0300, + 0x2001, 0x0200, 0x200c, 0xc1e5, 0xc1dc, 0x2102, 0x2009, 0x0218, + 0x210c, 0xd1ec, 0x1120, 0x080c, 0x1461, 0x00fe, 0x0005, 0x2001, + 0x020d, 0x2003, 0x0020, 0x781f, 0x0300, 0x00fe, 0x0005, 0x781c, + 0xd08c, 0x0904, 0x75dd, 0x68b8, 0x90aa, 0x0005, 0x0a04, 0x7b73, + 0x7d44, 0x7c40, 0x9584, 0x00f6, 0x1508, 0x9484, 0x7000, 0x0138, + 0x908a, 0x2000, 0x1258, 0x9584, 0x0700, 0x8007, 0x04a8, 0x7000, + 0x9084, 0xff00, 0x9086, 0x8100, 0x0db0, 0x00b0, 0x9484, 0x0fff, + 0x1130, 0x7000, 0x9084, 0xff00, 0x9086, 0x8100, 0x11c0, 0x080c, + 0xd31b, 0x080c, 0x7ab8, 0x7817, 0x0140, 0x00a8, 0x9584, 0x0076, + 0x1118, 0x080c, 0x7b16, 0x19c8, 0xd5a4, 0x0148, 0x0046, 0x0056, + 0x080c, 0x763f, 0x080c, 0x203e, 0x005e, 0x004e, 0x0020, 0x080c, + 0xd31b, 0x7817, 0x0140, 0x080c, 0x7620, 0x2001, 0x19bf, 0x2004, + 0x9005, 0x090c, 0x8582, 0x0005, 0x0002, 0x75f6, 0x78da, 0x75ed, + 0x75ed, 0x75ed, 0x75ed, 0x75ed, 0x75ed, 0x7817, 0x0140, 0x2001, + 0x19bf, 0x2004, 0x9005, 0x090c, 0x8582, 0x0005, 0x7000, 0x908c, + 0xff00, 0x9194, 0xf000, 0x810f, 0x9484, 0x0fff, 0x688a, 0x9286, + 0x2000, 0x1150, 0x6800, 0x9086, 0x0001, 0x1118, 0x080c, 0x5137, + 0x0070, 0x080c, 0x765f, 0x0058, 0x9286, 0x3000, 0x1118, 0x080c, + 0x7815, 0x0028, 0x9286, 0x8000, 0x1110, 0x080c, 0x79e8, 0x7817, + 0x0140, 0x2001, 0x19bf, 0x2004, 0x9005, 0x090c, 0x8582, 0x0005, + 0x2001, 0x180f, 0x2004, 0xd08c, 0x0178, 0x2001, 0x1800, 0x2004, + 0x9086, 0x0003, 0x1148, 0x0026, 0x0036, 0x2011, 0x8048, 0x2518, + 0x080c, 0x4672, 0x003e, 0x002e, 0x0005, 0x0036, 0x0046, 0x0056, + 0x00f6, 0x2079, 0x0200, 0x2019, 0xfffe, 0x7c30, 0x0050, 0x0036, + 0x0046, 0x0056, 0x00f6, 0x2079, 0x0200, 0x7d44, 0x7c40, 0x2019, + 0xffff, 0x2001, 0x180f, 0x2004, 0xd08c, 0x0160, 0x2001, 0x1800, + 0x2004, 0x9086, 0x0003, 0x1130, 0x0026, 0x2011, 0x8048, 0x080c, + 0x4672, 0x002e, 0x00fe, 0x005e, 0x004e, 0x003e, 0x0005, 0x00b6, + 0x00c6, 0x7010, 0x9084, 0xff00, 0x8007, 0x9096, 0x0001, 0x0120, + 0x9096, 0x0023, 0x1904, 0x77e6, 0x9186, 0x0023, 0x15c0, 0x080c, + 0x7a7d, 0x0904, 0x77e6, 0x6120, 0x9186, 0x0001, 0x0150, 0x9186, + 0x0004, 0x0138, 0x9186, 0x0008, 0x0120, 0x9186, 0x000a, 0x1904, + 0x77e6, 0x7124, 0x610a, 0x7030, 0x908e, 0x0200, 0x1130, 0x2009, + 0x0015, 0x080c, 0x9a50, 0x0804, 0x77e6, 0x908e, 0x0214, 0x0118, + 0x908e, 0x0210, 0x1130, 0x2009, 0x0015, 0x080c, 0x9a50, 0x0804, + 0x77e6, 0x908e, 0x0100, 0x1904, 0x77e6, 0x7034, 0x9005, 0x1904, + 0x77e6, 0x2009, 0x0016, 0x080c, 0x9a50, 0x0804, 0x77e6, 0x9186, + 0x0022, 0x1904, 0x77e6, 0x7030, 0x908e, 0x0300, 0x1580, 0x68d4, + 0xd0a4, 0x0528, 0xc0b5, 0x68d6, 0x7100, 0x918c, 0x00ff, 0x6976, + 0x7004, 0x687a, 0x00f6, 0x2079, 0x0100, 0x79e6, 0x78ea, 0x0006, + 0x9084, 0x00ff, 0x0016, 0x2008, 0x080c, 0x251f, 0x7932, 0x7936, + 0x001e, 0x000e, 0x00fe, 0x080c, 0x24d6, 0x6956, 0x703c, 0x00e6, + 0x2071, 0x0140, 0x7086, 0x2071, 0x1800, 0x70ae, 0x00ee, 0x7034, + 0x9005, 0x1904, 0x77e6, 0x2009, 0x0017, 0x0804, 0x77b3, 0x908e, + 0x0400, 0x1190, 0x7034, 0x9005, 0x1904, 0x77e6, 0x080c, 0x6c53, + 0x0120, 0x2009, 0x001d, 0x0804, 0x77b3, 0x68d4, 0xc0a5, 0x68d6, + 0x2009, 0x0030, 0x0804, 0x77b3, 0x908e, 0x0500, 0x1140, 0x7034, + 0x9005, 0x1904, 0x77e6, 0x2009, 0x0018, 0x0804, 0x77b3, 0x908e, + 0x2010, 0x1120, 0x2009, 0x0019, 0x0804, 0x77b3, 0x908e, 0x2110, + 0x1120, 0x2009, 0x001a, 0x0804, 0x77b3, 0x908e, 0x5200, 0x1140, + 0x7034, 0x9005, 0x1904, 0x77e6, 0x2009, 0x001b, 0x0804, 0x77b3, + 0x908e, 0x5000, 0x1140, 0x7034, 0x9005, 0x1904, 0x77e6, 0x2009, + 0x001c, 0x0804, 0x77b3, 0x908e, 0x1300, 0x1120, 0x2009, 0x0034, + 0x0804, 0x77b3, 0x908e, 0x1200, 0x1140, 0x7034, 0x9005, 0x1904, + 0x77e6, 0x2009, 0x0024, 0x0804, 0x77b3, 0x908c, 0xff00, 0x918e, + 0x2400, 0x1170, 0x2009, 0x002d, 0x2001, 0x180f, 0x2004, 0xd09c, + 0x0904, 0x77b3, 0x080c, 0xc384, 0x1904, 0x77e6, 0x0804, 0x77b1, + 0x908c, 0xff00, 0x918e, 0x5300, 0x1120, 0x2009, 0x002a, 0x0804, + 0x77b3, 0x908e, 0x0f00, 0x1120, 0x2009, 0x0020, 0x0804, 0x77b3, + 0x908e, 0x5300, 0x1108, 0x0440, 0x908e, 0x6104, 0x1528, 0x2029, + 0x0205, 0x2011, 0x026d, 0x8208, 0x2204, 0x9082, 0x0004, 0x8004, + 0x8004, 0x20a8, 0x2011, 0x8015, 0x211c, 0x8108, 0x0046, 0x2124, + 0x080c, 0x4672, 0x004e, 0x8108, 0x0f04, 0x777f, 0x9186, 0x0280, + 0x1d88, 0x2504, 0x8000, 0x202a, 0x2009, 0x0260, 0x0c58, 0x202b, + 0x0000, 0x2009, 0x0023, 0x0478, 0x908e, 0x6000, 0x1118, 0x2009, + 0x003f, 0x0448, 0x908e, 0x7800, 0x1118, 0x2009, 0x0045, 0x0418, + 0x908e, 0x1000, 0x1118, 0x2009, 0x004e, 0x00e8, 0x908e, 0x6300, + 0x1118, 0x2009, 0x004a, 0x00b8, 0x908c, 0xff00, 0x918e, 0x5600, + 0x1118, 0x2009, 0x004f, 0x0078, 0x908c, 0xff00, 0x918e, 0x5700, + 0x1118, 0x2009, 0x0050, 0x0038, 0x2009, 0x001d, 0x6834, 0xd0d4, + 0x0110, 0x2009, 0x004c, 0x0016, 0x2011, 0x0263, 0x2204, 0x8211, + 0x220c, 0x080c, 0x24d6, 0x1568, 0x080c, 0x5f1e, 0x1550, 0xbe12, + 0xbd16, 0x001e, 0x0016, 0xb8b0, 0x9005, 0x1168, 0x9186, 0x0046, + 0x1150, 0x6874, 0x9606, 0x1138, 0x6878, 0x9506, 0x9084, 0xff00, + 0x1110, 0x001e, 0x0098, 0x080c, 0x9980, 0x01a8, 0x2b08, 0x6112, + 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x9186, 0x004c, 0x1110, + 0x6023, 0x000a, 0x0016, 0x001e, 0x080c, 0x9a50, 0x00ce, 0x00be, + 0x0005, 0x001e, 0x0cd8, 0x2001, 0x180d, 0x2004, 0xd0ec, 0x0120, + 0x2011, 0x8049, 0x080c, 0x4672, 0x080c, 0x9a23, 0x0d90, 0x2b08, + 0x6112, 0x6023, 0x0004, 0x7120, 0x610a, 0x001e, 0x0016, 0x9186, + 0x0017, 0x0118, 0x9186, 0x0030, 0x1128, 0x6007, 0x0009, 0x6017, + 0x2900, 0x0020, 0x6007, 0x0051, 0x6017, 0x0000, 0x602f, 0x0009, + 0x6003, 0x0001, 0x080c, 0x8048, 0x08a0, 0x080c, 0x2f50, 0x1140, + 0x7010, 0x9084, 0xff00, 0x8007, 0x908e, 0x0008, 0x1108, 0x0009, + 0x0005, 0x00b6, 0x00c6, 0x0046, 0x7000, 0x908c, 0xff00, 0x810f, + 0x9186, 0x0033, 0x11e8, 0x080c, 0x7a7d, 0x0904, 0x7872, 0x7124, + 0x610a, 0x7030, 0x908e, 0x0200, 0x1140, 0x7034, 0x9005, 0x15d0, + 0x2009, 0x0015, 0x080c, 0x9a50, 0x04a8, 0x908e, 0x0100, 0x1590, + 0x7034, 0x9005, 0x1578, 0x2009, 0x0016, 0x080c, 0x9a50, 0x0450, + 0x9186, 0x0032, 0x1538, 0x7030, 0x908e, 0x1400, 0x1518, 0x2009, + 0x0038, 0x0016, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, + 0x24d6, 0x11b8, 0x080c, 0x5f1e, 0x11a0, 0xbe12, 0xbd16, 0x080c, + 0x9980, 0x0178, 0x2b08, 0x6112, 0x080c, 0xba69, 0x6023, 0x0004, + 0x7120, 0x610a, 0x001e, 0x080c, 0x9a50, 0x080c, 0x8582, 0x0010, + 0x00ce, 0x001e, 0x004e, 0x00ce, 0x00be, 0x0005, 0x00b6, 0x0046, + 0x00e6, 0x00d6, 0x2028, 0x2130, 0x9696, 0x00ff, 0x11b8, 0x9592, + 0xfffc, 0x02a0, 0x9596, 0xfffd, 0x1120, 0x2009, 0x007f, 0x0804, + 0x78d4, 0x9596, 0xfffe, 0x1120, 0x2009, 0x007e, 0x0804, 0x78d4, + 0x9596, 0xfffc, 0x1118, 0x2009, 0x0080, 0x04f0, 0x2011, 0x0000, + 0x2019, 0x1835, 0x231c, 0xd3ac, 0x0130, 0x9026, 0x20a9, 0x0800, + 0x2071, 0x1000, 0x0030, 0x2021, 0x0081, 0x20a9, 0x077f, 0x2071, + 0x1081, 0x2e1c, 0x93dd, 0x0000, 0x1140, 0x82ff, 0x11d0, 0x9496, + 0x00ff, 0x01b8, 0x2410, 0xc2fd, 0x00a0, 0xbf10, 0x2600, 0x9706, + 0xb814, 0x1120, 0x9546, 0x1110, 0x2408, 0x00b0, 0x9745, 0x1148, + 0x94c6, 0x007e, 0x0130, 0x94c6, 0x007f, 0x0118, 0x94c6, 0x0080, + 0x1d20, 0x8420, 0x8e70, 0x1f04, 0x78a9, 0x82ff, 0x1118, 0x9085, + 0x0001, 0x0018, 0xc2fc, 0x2208, 0x9006, 0x00de, 0x00ee, 0x004e, + 0x00be, 0x0005, 0x7000, 0x908c, 0xff00, 0x810f, 0x9184, 0x000f, + 0x0002, 0x78f1, 0x78f1, 0x78f1, 0x7a8f, 0x78f1, 0x78fa, 0x7925, + 0x79b3, 0x78f1, 0x78f1, 0x78f1, 0x78f1, 0x78f1, 0x78f1, 0x78f1, + 0x78f1, 0x7817, 0x0140, 0x2001, 0x19bf, 0x2004, 0x9005, 0x090c, + 0x8582, 0x0005, 0x00b6, 0x7110, 0xd1bc, 0x01e8, 0x7120, 0x2160, + 0x9c8c, 0x0007, 0x11c0, 0x9c8a, 0x1cd0, 0x02a8, 0x6860, 0x9c02, + 0x1290, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, + 0x1150, 0x700c, 0xb914, 0x9106, 0x1130, 0x7124, 0x610a, 0x2009, + 0x0046, 0x080c, 0x9a50, 0x7817, 0x0140, 0x2001, 0x19bf, 0x2004, + 0x9005, 0x090c, 0x8582, 0x00be, 0x0005, 0x00b6, 0x00c6, 0x9484, + 0x0fff, 0x0904, 0x7989, 0x7110, 0xd1bc, 0x1904, 0x7989, 0x7108, + 0x700c, 0x2028, 0x918c, 0x00ff, 0x2130, 0x9094, 0xff00, 0x15b0, + 0x81ff, 0x15a0, 0x9080, 0x2f92, 0x200d, 0x918c, 0xff00, 0x810f, + 0x2001, 0x0080, 0x9106, 0x0904, 0x7989, 0x080c, 0x5f1e, 0x1904, + 0x7989, 0xbe12, 0xbd16, 0xb800, 0xd0ec, 0x15d8, 0xba04, 0x9294, + 0xff00, 0x9286, 0x0600, 0x11a0, 0x080c, 0x9980, 0x05e8, 0x2b08, + 0x7028, 0x604a, 0x702c, 0x6046, 0x6112, 0x6023, 0x0006, 0x7120, + 0x610a, 0x7130, 0x6156, 0x2009, 0x0044, 0x080c, 0xc5dc, 0x0408, + 0x080c, 0x62a4, 0x1138, 0xb807, 0x0606, 0x0c30, 0x190c, 0x7876, + 0x11c0, 0x0898, 0x080c, 0x9980, 0x2b08, 0x0198, 0x6112, 0x6023, + 0x0004, 0x7120, 0x610a, 0x9286, 0x0400, 0x1118, 0x6007, 0x0005, + 0x0010, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x8048, 0x080c, + 0x8582, 0x7817, 0x0140, 0x2001, 0x19bf, 0x2004, 0x9005, 0x090c, + 0x8582, 0x00ce, 0x00be, 0x0005, 0x2001, 0x180d, 0x2004, 0xd0ec, + 0x0120, 0x2011, 0x8049, 0x080c, 0x4672, 0x080c, 0x9a23, 0x0d48, + 0x2b08, 0x6112, 0x6023, 0x0006, 0x7120, 0x610a, 0x7130, 0x6156, + 0x6017, 0xf300, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x8000, + 0x080c, 0x8582, 0x08b0, 0x00b6, 0x7110, 0xd1bc, 0x01e8, 0x7020, + 0x2060, 0x9c84, 0x0007, 0x11c0, 0x9c82, 0x1cd0, 0x02a8, 0x6860, + 0x9c02, 0x1290, 0x7008, 0x9084, 0x00ff, 0x6110, 0x2158, 0xb910, + 0x9106, 0x1150, 0x700c, 0xb914, 0x9106, 0x1130, 0x7124, 0x610a, + 0x2009, 0x0045, 0x080c, 0x9a50, 0x7817, 0x0140, 0x2001, 0x19bf, + 0x2004, 0x9005, 0x090c, 0x8582, 0x00be, 0x0005, 0x6120, 0x9186, + 0x0002, 0x0128, 0x9186, 0x0005, 0x0110, 0x9085, 0x0001, 0x0005, + 0x080c, 0x2f50, 0x1168, 0x7010, 0x9084, 0xff00, 0x8007, 0x9086, + 0x0000, 0x1130, 0x9184, 0x000f, 0x908a, 0x0006, 0x1208, 0x000b, + 0x0005, 0x79ff, 0x7a00, 0x79ff, 0x79ff, 0x7a5f, 0x7a6e, 0x0005, + 0x00b6, 0x7110, 0xd1bc, 0x0120, 0x702c, 0xd084, 0x0904, 0x7a5d, + 0x700c, 0x7108, 0x080c, 0x24d6, 0x1904, 0x7a5d, 0x080c, 0x5f1e, + 0x1904, 0x7a5d, 0xbe12, 0xbd16, 0x7110, 0xd1bc, 0x01d8, 0x080c, + 0x62a4, 0x0118, 0x9086, 0x0004, 0x1588, 0x00c6, 0x080c, 0x7a7d, + 0x00ce, 0x05d8, 0x080c, 0x9980, 0x2b08, 0x05b8, 0x6112, 0x080c, + 0xba69, 0x6023, 0x0002, 0x7120, 0x610a, 0x2009, 0x0088, 0x080c, + 0x9a50, 0x0458, 0x080c, 0x62a4, 0x0148, 0x9086, 0x0004, 0x0130, + 0x080c, 0x62ac, 0x0118, 0x9086, 0x0004, 0x1180, 0x080c, 0x9980, + 0x2b08, 0x01d8, 0x6112, 0x080c, 0xba69, 0x6023, 0x0005, 0x7120, + 0x610a, 0x2009, 0x0088, 0x080c, 0x9a50, 0x0078, 0x080c, 0x9980, + 0x2b08, 0x0158, 0x6112, 0x080c, 0xba69, 0x6023, 0x0004, 0x7120, + 0x610a, 0x2009, 0x0001, 0x080c, 0x9a50, 0x00be, 0x0005, 0x7110, + 0xd1bc, 0x0158, 0x00d1, 0x0148, 0x080c, 0x79de, 0x1130, 0x7124, + 0x610a, 0x2009, 0x0089, 0x080c, 0x9a50, 0x0005, 0x7110, 0xd1bc, + 0x0158, 0x0059, 0x0148, 0x080c, 0x79de, 0x1130, 0x7124, 0x610a, + 0x2009, 0x008a, 0x080c, 0x9a50, 0x0005, 0x7020, 0x2060, 0x9c84, + 0x0007, 0x1158, 0x9c82, 0x1cd0, 0x0240, 0x2001, 0x1818, 0x2004, + 0x9c02, 0x1218, 0x9085, 0x0001, 0x0005, 0x9006, 0x0ce8, 0x00b6, + 0x7110, 0xd1bc, 0x11d8, 0x7024, 0x2060, 0x9c84, 0x0007, 0x11b0, + 0x9c82, 0x1cd0, 0x0298, 0x6860, 0x9c02, 0x1280, 0x7008, 0x9084, + 0x00ff, 0x6110, 0x2158, 0xb910, 0x9106, 0x1140, 0x700c, 0xb914, + 0x9106, 0x1120, 0x2009, 0x0051, 0x080c, 0x9a50, 0x7817, 0x0140, + 0x2001, 0x19bf, 0x2004, 0x9005, 0x090c, 0x8582, 0x00be, 0x0005, + 0x2031, 0x0105, 0x0069, 0x0005, 0x2031, 0x0206, 0x0049, 0x0005, + 0x2031, 0x0207, 0x0029, 0x0005, 0x2031, 0x0213, 0x0009, 0x0005, + 0x00c6, 0x0096, 0x00f6, 0x7000, 0x9084, 0xf000, 0x9086, 0xc000, + 0x05d0, 0x080c, 0x9980, 0x05b8, 0x0066, 0x00c6, 0x0046, 0x2011, + 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x24d6, 0x15a0, 0x080c, + 0x5f1e, 0x1588, 0xbe12, 0xbd16, 0x2b00, 0x004e, 0x00ce, 0x6012, + 0x080c, 0xba69, 0x080c, 0x0fd5, 0x0510, 0x2900, 0x605a, 0x9006, + 0xa802, 0xa866, 0xac6a, 0xa85c, 0x90f8, 0x001b, 0x20a9, 0x000e, + 0xa860, 0x20e8, 0x20e1, 0x0000, 0x2fa0, 0x2e98, 0x4003, 0x006e, + 0x6616, 0x6007, 0x003e, 0x6023, 0x0001, 0x6003, 0x0001, 0x080c, + 0x8048, 0x080c, 0x8582, 0x00fe, 0x009e, 0x00ce, 0x0005, 0x080c, + 0x99d6, 0x006e, 0x0cc0, 0x004e, 0x00ce, 0x0cc8, 0x00c6, 0x7000, + 0x908c, 0xff00, 0x9184, 0xf000, 0x810f, 0x9086, 0x2000, 0x1904, + 0x7b6d, 0x9186, 0x0022, 0x15f0, 0x2001, 0x0111, 0x2004, 0x9005, + 0x1904, 0x7b6f, 0x7030, 0x908e, 0x0400, 0x0904, 0x7b6f, 0x908e, + 0x6000, 0x05e8, 0x908e, 0x5400, 0x05d0, 0x908e, 0x0300, 0x11d8, + 0x2009, 0x1835, 0x210c, 0xd18c, 0x1590, 0xd1a4, 0x1580, 0x080c, + 0x6262, 0x0558, 0x68a8, 0x9084, 0x00ff, 0x7100, 0x918c, 0x00ff, + 0x9106, 0x1518, 0x6878, 0x69a8, 0x918c, 0xff00, 0x9105, 0x7104, + 0x9106, 0x11d8, 0x00e0, 0x2009, 0x0103, 0x210c, 0xd1b4, 0x11a8, + 0x908e, 0x5200, 0x09e8, 0x908e, 0x0500, 0x09d0, 0x908e, 0x5000, + 0x09b8, 0x0058, 0x9186, 0x0023, 0x1140, 0x080c, 0x7a7d, 0x0128, + 0x6004, 0x9086, 0x0002, 0x0118, 0x0000, 0x9006, 0x0010, 0x9085, + 0x0001, 0x00ce, 0x0005, 0x00f6, 0x2079, 0x0200, 0x7800, 0xc0e5, + 0xc0cc, 0x7802, 0x00fe, 0x0005, 0x00f6, 0x2079, 0x0200, 0x7800, + 0x9085, 0x1200, 0x7802, 0x00fe, 0x0005, 0x2071, 0x19c9, 0x7003, + 0x0003, 0x700f, 0x0361, 0x9006, 0x701a, 0x7072, 0x7012, 0x7017, + 0x1cd0, 0x7007, 0x0000, 0x7026, 0x702b, 0x8fd1, 0x7032, 0x7037, + 0x903f, 0x703f, 0xffff, 0x7042, 0x7047, 0x4fb2, 0x704a, 0x705b, + 0x7ce2, 0x080c, 0x0fee, 0x090c, 0x0db2, 0x2900, 0x703a, 0xa867, + 0x0003, 0xa86f, 0x0100, 0xa8ab, 0xdcb0, 0x0005, 0x2071, 0x19c9, + 0x1d04, 0x7c39, 0x2091, 0x6000, 0x700c, 0x8001, 0x700e, 0x1510, + 0x2001, 0x1875, 0x2004, 0xd0c4, 0x0158, 0x3a00, 0xd08c, 0x1140, + 0x20d1, 0x0000, 0x20d1, 0x0001, 0x20d1, 0x0000, 0x080c, 0x0db2, + 0x700f, 0x0361, 0x7007, 0x0001, 0x0126, 0x2091, 0x8000, 0x080c, + 0x7d27, 0x7040, 0x900d, 0x0148, 0x8109, 0x7142, 0x1130, 0x7044, + 0x080f, 0x0018, 0x0126, 0x2091, 0x8000, 0x7024, 0x900d, 0x0188, + 0x7020, 0x8001, 0x7022, 0x1168, 0x7023, 0x0009, 0x8109, 0x7126, + 0x9186, 0x03e8, 0x1110, 0x7028, 0x080f, 0x81ff, 0x1110, 0x7028, + 0x080f, 0x7030, 0x900d, 0x0180, 0x702c, 0x8001, 0x702e, 0x1160, + 0x702f, 0x0009, 0x8109, 0x7132, 0x0128, 0x9184, 0x007f, 0x090c, + 0x90b9, 0x0010, 0x7034, 0x080f, 0x703c, 0x9005, 0x0118, 0x0310, + 0x8001, 0x703e, 0x704c, 0x900d, 0x0168, 0x7048, 0x8001, 0x704a, + 0x1148, 0x704b, 0x0009, 0x8109, 0x714e, 0x1120, 0x7150, 0x714e, + 0x7058, 0x080f, 0x7018, 0x900d, 0x01d8, 0x0016, 0x7070, 0x900d, + 0x0158, 0x706c, 0x8001, 0x706e, 0x1138, 0x706f, 0x0009, 0x8109, + 0x7172, 0x1110, 0x7074, 0x080f, 0x001e, 0x7008, 0x8001, 0x700a, + 0x1138, 0x700b, 0x0009, 0x8109, 0x711a, 0x1110, 0x701c, 0x080f, + 0x012e, 0x7004, 0x0002, 0x7c61, 0x7c62, 0x7c7e, 0x00e6, 0x2071, + 0x19c9, 0x7018, 0x9005, 0x1120, 0x711a, 0x721e, 0x700b, 0x0009, + 0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071, 0x19c9, 0x701c, 0x9206, + 0x1120, 0x701a, 0x701e, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005, + 0x00e6, 0x2071, 0x19c9, 0xb888, 0x9102, 0x0208, 0xb98a, 0x00ee, + 0x0005, 0x0005, 0x00b6, 0x7110, 0x080c, 0x5f7e, 0x1168, 0xb888, + 0x8001, 0x0250, 0xb88a, 0x1140, 0x0126, 0x2091, 0x8000, 0x0016, + 0x080c, 0x8582, 0x001e, 0x012e, 0x8108, 0x9182, 0x0800, 0x0218, + 0x900e, 0x7007, 0x0002, 0x7112, 0x00be, 0x0005, 0x7014, 0x2060, + 0x0126, 0x2091, 0x8000, 0x6040, 0x9005, 0x0128, 0x8001, 0x6042, + 0x1110, 0x080c, 0xb8fa, 0x6018, 0x9005, 0x0510, 0x8001, 0x601a, + 0x11f8, 0x6120, 0x9186, 0x0003, 0x0118, 0x9186, 0x0006, 0x11b0, + 0x6014, 0x2048, 0xa884, 0x908a, 0x199a, 0x0280, 0x9082, 0x1999, + 0xa886, 0x908a, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, 0x800b, + 0x810b, 0x9108, 0x611a, 0xa87c, 0xd0e4, 0x0110, 0x080c, 0xb313, + 0x012e, 0x9c88, 0x0018, 0x7116, 0x2001, 0x1818, 0x2004, 0x9102, + 0x0220, 0x7017, 0x1cd0, 0x7007, 0x0000, 0x0005, 0x00e6, 0x2071, + 0x19c9, 0x7027, 0x07d0, 0x7023, 0x0009, 0x00ee, 0x0005, 0x2001, + 0x19d2, 0x2003, 0x0000, 0x0005, 0x00e6, 0x2071, 0x19c9, 0x7132, + 0x702f, 0x0009, 0x00ee, 0x0005, 0x2011, 0x19d5, 0x2013, 0x0000, + 0x0005, 0x00e6, 0x2071, 0x19c9, 0x711a, 0x721e, 0x700b, 0x0009, + 0x00ee, 0x0005, 0x0086, 0x0026, 0x7054, 0x8000, 0x7056, 0x2001, + 0x19d7, 0x2044, 0xa06c, 0x9086, 0x0000, 0x0150, 0x7068, 0xa09a, + 0x7064, 0xa096, 0x7060, 0xa092, 0x705c, 0xa08e, 0x080c, 0x10b5, + 0x002e, 0x008e, 0x0005, 0x0006, 0x0016, 0x0096, 0x00a6, 0x00b6, + 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x0156, 0x080c, 0x7bae, 0x015e, + 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x00ae, 0x009e, 0x001e, + 0x000e, 0x0005, 0x00e6, 0x2071, 0x19c9, 0x7172, 0x7276, 0x706f, + 0x0009, 0x00ee, 0x0005, 0x00e6, 0x0006, 0x2071, 0x19c9, 0x7074, + 0x9206, 0x1110, 0x7072, 0x7076, 0x000e, 0x00ee, 0x0005, 0x2069, + 0x1800, 0x69e0, 0xd1e4, 0x1518, 0x0026, 0xd1ec, 0x0140, 0x6a4c, + 0x686c, 0x9202, 0x0288, 0x8117, 0x9294, 0x00c0, 0x0088, 0x9184, + 0x0007, 0x01a0, 0x8109, 0x9184, 0x0007, 0x0110, 0x69e2, 0x0070, + 0x8107, 0x9084, 0x0007, 0x910d, 0x8107, 0x9106, 0x9094, 0x00c0, + 0x9184, 0xff3f, 0x9205, 0x68e2, 0x080c, 0x0eb4, 0x002e, 0x0005, + 0x00c6, 0x2061, 0x1a3e, 0x00ce, 0x0005, 0x9184, 0x000f, 0x8003, + 0x8003, 0x8003, 0x9080, 0x1a3e, 0x2060, 0x0005, 0xa884, 0x908a, + 0x199a, 0x1638, 0x9005, 0x1150, 0x00c6, 0x2061, 0x1a3e, 0x6014, + 0x00ce, 0x9005, 0x1130, 0x2001, 0x001e, 0x0018, 0x908e, 0xffff, + 0x01b0, 0x8003, 0x800b, 0x810b, 0x9108, 0x611a, 0xa87c, 0x908c, + 0x00c0, 0x918e, 0x00c0, 0x0904, 0x7de8, 0xd0b4, 0x1168, 0xd0bc, + 0x1904, 0x7dc1, 0x2009, 0x0006, 0x080c, 0x7e15, 0x0005, 0x900e, + 0x0c60, 0x2001, 0x1999, 0x08b0, 0xd0fc, 0x0160, 0x908c, 0x0003, + 0x0120, 0x918e, 0x0003, 0x1904, 0x7e0f, 0x908c, 0x2020, 0x918e, + 0x2020, 0x01a8, 0x6024, 0xd0d4, 0x11e8, 0x2009, 0x1875, 0x2104, + 0xd084, 0x1138, 0x87ff, 0x1120, 0x2009, 0x0043, 0x0804, 0x9a50, + 0x0005, 0x87ff, 0x1de8, 0x2009, 0x0042, 0x0804, 0x9a50, 0x6110, + 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1ac, 0x0d20, 0x6024, 0xc0cd, + 0x6026, 0x0c00, 0xc0d4, 0x6026, 0xa890, 0x602e, 0xa88c, 0x6032, + 0x08e0, 0xd0fc, 0x0160, 0x908c, 0x0003, 0x0120, 0x918e, 0x0003, + 0x1904, 0x7e0f, 0x908c, 0x2020, 0x918e, 0x2020, 0x0170, 0x0076, + 0x00f6, 0x2c78, 0x080c, 0x1582, 0x00fe, 0x007e, 0x87ff, 0x1120, + 0x2009, 0x0042, 0x080c, 0x9a50, 0x0005, 0x6110, 0x00b6, 0x2158, + 0xb900, 0x00be, 0xd1ac, 0x0d58, 0x6124, 0xc1cd, 0x6126, 0x0c38, + 0xd0fc, 0x0188, 0x908c, 0x2020, 0x918e, 0x2020, 0x01a8, 0x9084, + 0x0003, 0x908e, 0x0002, 0x0148, 0x87ff, 0x1120, 0x2009, 0x0041, + 0x080c, 0x9a50, 0x0005, 0x00b9, 0x0ce8, 0x87ff, 0x1dd8, 0x2009, + 0x0043, 0x080c, 0x9a50, 0x0cb0, 0x6110, 0x00b6, 0x2158, 0xb900, + 0x00be, 0xd1ac, 0x0d20, 0x6124, 0xc1cd, 0x6126, 0x0c00, 0x2009, + 0x0004, 0x0019, 0x0005, 0x2009, 0x0001, 0x0096, 0x080c, 0xb5fb, + 0x0518, 0x6014, 0x2048, 0xa982, 0xa800, 0x6016, 0x9186, 0x0001, + 0x1188, 0xa97c, 0x918c, 0x8100, 0x918e, 0x8100, 0x1158, 0x00c6, + 0x2061, 0x1a3e, 0x6200, 0xd28c, 0x1120, 0x6204, 0x8210, 0x0208, + 0x6206, 0x00ce, 0x080c, 0x6370, 0x6014, 0x904d, 0x0076, 0x2039, + 0x0000, 0x190c, 0x7d5e, 0x007e, 0x009e, 0x0005, 0x0156, 0x00c6, + 0x2061, 0x1a3e, 0x6000, 0x81ff, 0x0110, 0x9205, 0x0008, 0x9204, + 0x6002, 0x00ce, 0x015e, 0x0005, 0x6800, 0xd08c, 0x1138, 0x6808, + 0x9005, 0x0120, 0x8001, 0x680a, 0x9085, 0x0001, 0x0005, 0x0126, + 0x2091, 0x8000, 0x0036, 0x0046, 0x20a9, 0x0010, 0x9006, 0x8004, + 0x2019, 0x0100, 0x231c, 0x93a6, 0x0008, 0x1118, 0x8086, 0x818e, + 0x0020, 0x80f6, 0x3e00, 0x81f6, 0x3e08, 0x1208, 0x9200, 0x1f04, + 0x7e60, 0x93a6, 0x0008, 0x1118, 0x8086, 0x818e, 0x0020, 0x80f6, + 0x3e00, 0x81f6, 0x3e08, 0x004e, 0x003e, 0x012e, 0x0005, 0x0126, + 0x2091, 0x8000, 0x0076, 0x0156, 0x20a9, 0x0010, 0x9005, 0x0510, + 0x911a, 0x1600, 0x8213, 0x2039, 0x0100, 0x273c, 0x97be, 0x0008, + 0x1110, 0x818d, 0x0010, 0x81f5, 0x3e08, 0x0228, 0x911a, 0x1220, + 0x1f04, 0x7e8a, 0x0028, 0x911a, 0x2308, 0x8210, 0x1f04, 0x7e8a, + 0x0006, 0x3200, 0x9084, 0xefff, 0x2080, 0x000e, 0x015e, 0x007e, + 0x012e, 0x0005, 0x0006, 0x3200, 0x9085, 0x1000, 0x0ca8, 0x0126, + 0x2091, 0x2800, 0x2079, 0x19b6, 0x012e, 0x00d6, 0x2069, 0x19b6, + 0x6803, 0x0005, 0x0156, 0x0146, 0x01d6, 0x20e9, 0x0000, 0x2069, + 0x0200, 0x080c, 0x97ce, 0x0401, 0x080c, 0x97b9, 0x00e9, 0x080c, + 0x97bc, 0x00d1, 0x080c, 0x97bf, 0x00b9, 0x080c, 0x97c2, 0x00a1, + 0x080c, 0x97c5, 0x0089, 0x080c, 0x97c8, 0x0071, 0x080c, 0x97cb, + 0x0059, 0x01de, 0x014e, 0x015e, 0x2069, 0x0004, 0x2d04, 0x9085, + 0x8001, 0x206a, 0x00de, 0x0005, 0x20a9, 0x0020, 0x20a1, 0x0240, + 0x2001, 0x0000, 0x4004, 0x0005, 0x00c6, 0x6027, 0x0001, 0x7804, + 0x9084, 0x0007, 0x0002, 0x7efd, 0x7f21, 0x7f60, 0x7f03, 0x7f21, + 0x7efd, 0x7efb, 0x7efb, 0x080c, 0x0db2, 0x080c, 0x7cc7, 0x080c, + 0x8582, 0x00ce, 0x0005, 0x62c0, 0x82ff, 0x1110, 0x00ce, 0x0005, + 0x2011, 0x588a, 0x080c, 0x7c4a, 0x7828, 0x9092, 0x00c8, 0x1228, + 0x8000, 0x782a, 0x080c, 0x58ca, 0x0c88, 0x62c0, 0x080c, 0x97d2, + 0x080c, 0x588a, 0x7807, 0x0003, 0x7827, 0x0000, 0x782b, 0x0000, + 0x0c28, 0x080c, 0x7cc7, 0x6220, 0xd2a4, 0x0160, 0x782b, 0x0000, + 0x7824, 0x9065, 0x090c, 0x0db2, 0x2009, 0x0013, 0x080c, 0x9a50, + 0x00ce, 0x0005, 0x00c6, 0x7824, 0x9065, 0x090c, 0x0db2, 0x7828, + 0x9092, 0xc350, 0x12c0, 0x8000, 0x782a, 0x00ce, 0x080c, 0x283d, + 0x0278, 0x00c6, 0x7924, 0x2160, 0x6010, 0x906d, 0x090c, 0x0db2, + 0x7807, 0x0000, 0x7827, 0x0000, 0x00ce, 0x080c, 0x8582, 0x0c00, + 0x080c, 0x8f97, 0x08e8, 0x2011, 0x0130, 0x2214, 0x080c, 0x97d2, + 0x080c, 0xd358, 0x2009, 0x0014, 0x080c, 0x9a50, 0x00ce, 0x0880, + 0x2001, 0x19d2, 0x2003, 0x0000, 0x62c0, 0x82ff, 0x1160, 0x782b, + 0x0000, 0x7824, 0x9065, 0x090c, 0x0db2, 0x2009, 0x0013, 0x080c, + 0x9aa2, 0x00ce, 0x0005, 0x00b6, 0x00c6, 0x00d6, 0x7824, 0x9005, + 0x090c, 0x0db2, 0x7828, 0x9092, 0xc350, 0x1648, 0x8000, 0x782a, + 0x00de, 0x00ce, 0x00be, 0x080c, 0x283d, 0x02f0, 0x00b6, 0x00c6, + 0x00d6, 0x781c, 0x905d, 0x090c, 0x0db2, 0xb800, 0xc0dc, 0xb802, + 0x7924, 0x2160, 0x080c, 0x99d6, 0xb93c, 0x81ff, 0x090c, 0x0db2, + 0x8109, 0xb93e, 0x7807, 0x0000, 0x7827, 0x0000, 0x00de, 0x00ce, + 0x00be, 0x080c, 0x8582, 0x0868, 0x080c, 0x8f97, 0x0850, 0x2011, + 0x0130, 0x2214, 0x080c, 0x97d2, 0x080c, 0xd358, 0x7824, 0x9065, + 0x2009, 0x0014, 0x080c, 0x9a50, 0x00de, 0x00ce, 0x00be, 0x0804, + 0x7f71, 0x00c6, 0x2001, 0x009b, 0x2004, 0xd0fc, 0x190c, 0x1be4, + 0x6024, 0x6027, 0x0002, 0xd0f4, 0x1580, 0x62c8, 0x60c4, 0x9205, + 0x1170, 0x783c, 0x9065, 0x0130, 0x2009, 0x0049, 0x080c, 0x9a50, + 0x00ce, 0x0005, 0x2011, 0x19d5, 0x2013, 0x0000, 0x0cc8, 0x793c, + 0x81ff, 0x0dc0, 0x7944, 0x9192, 0x7530, 0x12f0, 0x8108, 0x7946, + 0x793c, 0x9188, 0x0008, 0x210c, 0x918e, 0x0006, 0x1138, 0x6014, + 0x9084, 0x1984, 0x9085, 0x0012, 0x6016, 0x0c10, 0x6014, 0x9084, + 0x1984, 0x9085, 0x0016, 0x6016, 0x08d8, 0x793c, 0x2160, 0x2009, + 0x004a, 0x080c, 0x9a50, 0x08a0, 0x7848, 0xc085, 0x784a, 0x0880, + 0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f, 0x0000, + 0x2c08, 0x2061, 0x19b6, 0x6020, 0x8000, 0x6022, 0x6010, 0x9005, + 0x0148, 0x9080, 0x0003, 0x2102, 0x6112, 0x012e, 0x00ce, 0x001e, + 0x000e, 0x0005, 0x6116, 0x6112, 0x0cc0, 0x00d6, 0x2069, 0x19b6, + 0xb800, 0xd0d4, 0x0168, 0x6820, 0x8000, 0x6822, 0x9086, 0x0001, + 0x1110, 0x2b00, 0x681e, 0x00de, 0x0804, 0x8582, 0x00de, 0x0005, + 0xc0d5, 0xb802, 0x6818, 0x9005, 0x0168, 0xb856, 0xb85b, 0x0000, + 0x0086, 0x0006, 0x2b00, 0x681a, 0x008e, 0xa05a, 0x008e, 0x2069, + 0x19b6, 0x0c08, 0xb856, 0xb85a, 0x2b00, 0x681a, 0x681e, 0x08d8, + 0x0006, 0x0016, 0x00c6, 0x0126, 0x2091, 0x8000, 0x600f, 0x0000, + 0x2c08, 0x2061, 0x19b6, 0x6020, 0x8000, 0x6022, 0x6008, 0x9005, + 0x0148, 0x9080, 0x0003, 0x2102, 0x610a, 0x012e, 0x00ce, 0x001e, + 0x000e, 0x0005, 0x610e, 0x610a, 0x0cc0, 0x00c6, 0x600f, 0x0000, + 0x2c08, 0x2061, 0x19b6, 0x6034, 0x9005, 0x0130, 0x9080, 0x0003, + 0x2102, 0x6136, 0x00ce, 0x0005, 0x613a, 0x6136, 0x00ce, 0x0005, + 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00b6, 0x0096, 0x0076, 0x0066, + 0x0056, 0x0036, 0x0026, 0x0016, 0x0006, 0x0126, 0x902e, 0x2071, + 0x19b6, 0x7638, 0x2660, 0x2678, 0x2091, 0x8000, 0x8cff, 0x0904, + 0x80ef, 0x6010, 0x2058, 0xb8a0, 0x9206, 0x1904, 0x80ea, 0x87ff, + 0x0120, 0x6054, 0x9106, 0x1904, 0x80ea, 0x703c, 0x9c06, 0x1178, + 0x0036, 0x2019, 0x0001, 0x080c, 0x9254, 0x7033, 0x0000, 0x9006, + 0x703e, 0x7042, 0x7046, 0x704a, 0x003e, 0x2029, 0x0001, 0x7038, + 0x9c36, 0x1110, 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00, + 0x9f36, 0x0118, 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c, + 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, + 0x0000, 0x080c, 0xb5fb, 0x01c8, 0x6014, 0x2048, 0x6020, 0x9086, + 0x0003, 0x1590, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, + 0x0036, 0x0076, 0x080c, 0xb8e3, 0x080c, 0xd28c, 0x080c, 0x6536, + 0x007e, 0x003e, 0x001e, 0x080c, 0xb7dd, 0x080c, 0x9a06, 0x00ce, + 0x0804, 0x808e, 0x2c78, 0x600c, 0x2060, 0x0804, 0x808e, 0x85ff, + 0x0120, 0x0036, 0x080c, 0x865d, 0x003e, 0x012e, 0x000e, 0x001e, + 0x002e, 0x003e, 0x005e, 0x006e, 0x007e, 0x009e, 0x00be, 0x00ce, + 0x00de, 0x00ee, 0x00fe, 0x0005, 0x6020, 0x9086, 0x0006, 0x1158, + 0x0016, 0x0036, 0x0076, 0x080c, 0xd28c, 0x080c, 0xcf91, 0x007e, + 0x003e, 0x001e, 0x0890, 0x6020, 0x9086, 0x000a, 0x0904, 0x80d4, + 0x0804, 0x80d2, 0x0006, 0x0066, 0x0096, 0x00c6, 0x00d6, 0x00f6, + 0x9036, 0x0126, 0x2091, 0x8000, 0x2079, 0x19b6, 0x7838, 0x9065, + 0x0904, 0x816a, 0x600c, 0x0006, 0x600f, 0x0000, 0x783c, 0x9c06, + 0x1168, 0x0036, 0x2019, 0x0001, 0x080c, 0x9254, 0x7833, 0x0000, + 0x901e, 0x7b3e, 0x7b42, 0x7b46, 0x7b4a, 0x003e, 0x080c, 0xb5fb, + 0x0520, 0x6014, 0x2048, 0x6020, 0x9086, 0x0003, 0x1568, 0x3e08, + 0x918e, 0x0002, 0x1188, 0x6010, 0x9005, 0x0170, 0x00b6, 0x2058, + 0xb800, 0x00be, 0xd0bc, 0x0140, 0x6040, 0x9005, 0x1180, 0x2001, + 0x1957, 0x2004, 0x6042, 0x0058, 0xa867, 0x0103, 0xab7a, 0xa877, + 0x0000, 0x080c, 0x6529, 0x080c, 0xb7dd, 0x080c, 0x9a06, 0x000e, + 0x0804, 0x8127, 0x7e3a, 0x7e36, 0x012e, 0x00fe, 0x00de, 0x00ce, + 0x009e, 0x006e, 0x000e, 0x0005, 0x6020, 0x9086, 0x0006, 0x1118, + 0x080c, 0xcf91, 0x0c50, 0x6020, 0x9086, 0x000a, 0x09f8, 0x08e0, + 0x0016, 0x0026, 0x0086, 0x9046, 0x0099, 0x080c, 0x8269, 0x008e, + 0x002e, 0x001e, 0x0005, 0x00f6, 0x0126, 0x2079, 0x19b6, 0x2091, + 0x8000, 0x080c, 0x8300, 0x080c, 0x838e, 0x012e, 0x00fe, 0x0005, + 0x00b6, 0x0096, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0016, + 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, 0x19b6, 0x7614, 0x2660, + 0x2678, 0x8cff, 0x0904, 0x822e, 0x6010, 0x2058, 0xb8a0, 0x9206, + 0x1904, 0x8229, 0x88ff, 0x0120, 0x6054, 0x9106, 0x1904, 0x8229, + 0x7024, 0x9c06, 0x1558, 0x2069, 0x0100, 0x6820, 0xd0a4, 0x1508, + 0x080c, 0x7cc7, 0x080c, 0x8fbb, 0x68c3, 0x0000, 0x080c, 0x9469, + 0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, + 0x0138, 0x2001, 0x0100, 0x080c, 0x2987, 0x9006, 0x080c, 0x2987, + 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, + 0x0028, 0x6003, 0x0009, 0x630a, 0x0804, 0x8229, 0x7014, 0x9c36, + 0x1110, 0x660c, 0x7616, 0x7010, 0x9c36, 0x1140, 0x2c00, 0x9f36, + 0x0118, 0x2f00, 0x7012, 0x0010, 0x7013, 0x0000, 0x660c, 0x0066, + 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, + 0x6014, 0x2048, 0x080c, 0xb5fb, 0x01e8, 0x6020, 0x9086, 0x0003, + 0x1580, 0x080c, 0xb7fa, 0x1118, 0x080c, 0xa364, 0x0098, 0xa867, + 0x0103, 0xab7a, 0xa877, 0x0000, 0x0016, 0x0036, 0x0086, 0x080c, + 0xb8e3, 0x080c, 0xd28c, 0x080c, 0x6536, 0x008e, 0x003e, 0x001e, + 0x080c, 0xb7dd, 0x080c, 0x9a06, 0x080c, 0x933f, 0x00ce, 0x0804, + 0x81a9, 0x2c78, 0x600c, 0x2060, 0x0804, 0x81a9, 0x012e, 0x000e, + 0x001e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x009e, 0x00be, + 0x0005, 0x6020, 0x9086, 0x0006, 0x1158, 0x0016, 0x0036, 0x0086, + 0x080c, 0xd28c, 0x080c, 0xcf91, 0x008e, 0x003e, 0x001e, 0x08d0, + 0x080c, 0xa364, 0x6020, 0x9086, 0x0002, 0x1160, 0x6004, 0x0006, + 0x9086, 0x0085, 0x000e, 0x0904, 0x820f, 0x9086, 0x008b, 0x0904, + 0x820f, 0x0840, 0x6020, 0x9086, 0x0005, 0x1920, 0x6004, 0x0006, + 0x9086, 0x0085, 0x000e, 0x09c8, 0x9086, 0x008b, 0x09b0, 0x0804, + 0x8222, 0x00b6, 0x00a6, 0x0096, 0x00c6, 0x0006, 0x0126, 0x2091, + 0x8000, 0x9280, 0x1000, 0x2004, 0x905d, 0x0904, 0x82f9, 0x00f6, + 0x00e6, 0x00d6, 0x0066, 0x2071, 0x19b6, 0xbe54, 0x7018, 0x9b06, + 0x1108, 0x761a, 0x701c, 0x9b06, 0x1130, 0x86ff, 0x1118, 0x7018, + 0x701e, 0x0008, 0x761e, 0xb858, 0x904d, 0x0108, 0xae56, 0x96d5, + 0x0000, 0x0110, 0x2900, 0xb05a, 0xb857, 0x0000, 0xb85b, 0x0000, + 0xb800, 0xc0d4, 0xc0dc, 0xb802, 0x080c, 0x5eb1, 0x0904, 0x82f5, + 0x7624, 0x86ff, 0x0904, 0x82e4, 0x9680, 0x0005, 0x2004, 0x9906, + 0x15d8, 0x00d6, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0560, 0x080c, + 0x7cc7, 0x080c, 0x8fbb, 0x68c3, 0x0000, 0x080c, 0x9469, 0x7027, + 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, + 0x2001, 0x0100, 0x080c, 0x2987, 0x9006, 0x080c, 0x2987, 0x2069, + 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x00de, + 0x00c6, 0xb83c, 0x9005, 0x0110, 0x8001, 0xb83e, 0x2660, 0x080c, + 0x9a06, 0x00ce, 0x0048, 0x00de, 0x00c6, 0x2660, 0x6003, 0x0009, + 0x630a, 0x00ce, 0x0804, 0x829c, 0x89ff, 0x0158, 0xa867, 0x0103, + 0xab7a, 0xa877, 0x0000, 0x080c, 0xb8e3, 0x080c, 0xd28c, 0x080c, + 0x6536, 0x080c, 0x933f, 0x0804, 0x829c, 0x006e, 0x00de, 0x00ee, + 0x00fe, 0x012e, 0x000e, 0x00ce, 0x009e, 0x00ae, 0x00be, 0x0005, + 0x0096, 0x0006, 0x0066, 0x00c6, 0x00d6, 0x9036, 0x7814, 0x9065, + 0x0904, 0x8361, 0x600c, 0x0006, 0x600f, 0x0000, 0x7824, 0x9c06, + 0x1570, 0x2069, 0x0100, 0x6820, 0xd0a4, 0x1508, 0x080c, 0x7cc7, + 0x080c, 0x8fbb, 0x68c3, 0x0000, 0x080c, 0x9469, 0x7827, 0x0000, + 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, + 0x0100, 0x080c, 0x2987, 0x9006, 0x080c, 0x2987, 0x2069, 0x0100, + 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x0040, 0x080c, + 0x625a, 0x1520, 0x6003, 0x0009, 0x630a, 0x2c30, 0x00f8, 0x6014, + 0x2048, 0x080c, 0xb5f9, 0x01b0, 0x6020, 0x9086, 0x0003, 0x1508, + 0x080c, 0xb7fa, 0x1118, 0x080c, 0xa364, 0x0060, 0x080c, 0x625a, + 0x1168, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6536, + 0x080c, 0xb7dd, 0x080c, 0x9a06, 0x080c, 0x933f, 0x000e, 0x0804, + 0x8307, 0x7e16, 0x7e12, 0x00de, 0x00ce, 0x006e, 0x000e, 0x009e, + 0x0005, 0x6020, 0x9086, 0x0006, 0x1118, 0x080c, 0xcf91, 0x0c50, + 0x080c, 0xa364, 0x6020, 0x9086, 0x0002, 0x1150, 0x6004, 0x0006, + 0x9086, 0x0085, 0x000e, 0x0990, 0x9086, 0x008b, 0x0978, 0x08d0, + 0x6020, 0x9086, 0x0005, 0x19b0, 0x6004, 0x0006, 0x9086, 0x0085, + 0x000e, 0x0d18, 0x9086, 0x008b, 0x0d00, 0x0860, 0x0006, 0x0066, + 0x0096, 0x00b6, 0x00c6, 0x00d6, 0x7818, 0x905d, 0x0904, 0x840e, + 0xb854, 0x0006, 0x9006, 0xb856, 0xb85a, 0xb800, 0xc0d4, 0xc0dc, + 0xb802, 0x080c, 0x5eb1, 0x0904, 0x840b, 0x7e24, 0x86ff, 0x0904, + 0x83fe, 0x9680, 0x0005, 0x2004, 0x9906, 0x1904, 0x83fe, 0x00d6, + 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, 0x83f5, 0x080c, 0x7cc7, + 0x080c, 0x8fbb, 0x68c3, 0x0000, 0x080c, 0x9469, 0x7827, 0x0000, + 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, 0x2001, + 0x0100, 0x080c, 0x2987, 0x9006, 0x080c, 0x2987, 0x2069, 0x0100, + 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x00de, 0x00c6, + 0x3e08, 0x918e, 0x0002, 0x1168, 0xb800, 0xd0bc, 0x0150, 0x9680, + 0x0010, 0x200c, 0x81ff, 0x1518, 0x2009, 0x1957, 0x210c, 0x2102, + 0x00f0, 0xb83c, 0x9005, 0x0110, 0x8001, 0xb83e, 0x2660, 0x600f, + 0x0000, 0x080c, 0x9a06, 0x00ce, 0x0048, 0x00de, 0x00c6, 0x2660, + 0x6003, 0x0009, 0x630a, 0x00ce, 0x0804, 0x83a1, 0x89ff, 0x0138, + 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6536, 0x080c, + 0x933f, 0x0804, 0x83a1, 0x000e, 0x0804, 0x8395, 0x781e, 0x781a, + 0x00de, 0x00ce, 0x00be, 0x009e, 0x006e, 0x000e, 0x0005, 0x00e6, + 0x00d6, 0x0096, 0x0066, 0xb800, 0xd0dc, 0x01a0, 0xb84c, 0x904d, + 0x0188, 0xa878, 0x9606, 0x1170, 0x2071, 0x19b6, 0x7024, 0x9035, + 0x0148, 0x9080, 0x0005, 0x2004, 0x9906, 0x1120, 0xb800, 0xc0dc, + 0xb802, 0x0029, 0x006e, 0x009e, 0x00de, 0x00ee, 0x0005, 0x00f6, + 0x2079, 0x0100, 0x78c0, 0x9005, 0x1138, 0x00c6, 0x2660, 0x6003, + 0x0009, 0x630a, 0x00ce, 0x04b8, 0x080c, 0x8fbb, 0x78c3, 0x0000, + 0x080c, 0x9469, 0x7027, 0x0000, 0x0036, 0x2079, 0x0140, 0x7b04, + 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2987, 0x9006, + 0x080c, 0x2987, 0x2079, 0x0100, 0x7824, 0xd084, 0x0110, 0x7827, + 0x0001, 0x080c, 0x9469, 0x003e, 0x080c, 0x5eb1, 0x00c6, 0xb83c, + 0x9005, 0x0110, 0x8001, 0xb83e, 0x2660, 0x080c, 0x99d6, 0x00ce, + 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0xb8e3, 0x080c, + 0x6536, 0x080c, 0x933f, 0x00fe, 0x0005, 0x00b6, 0x00e6, 0x00c6, + 0x2011, 0x0101, 0x2204, 0xc0c4, 0x2012, 0x2001, 0x180c, 0x2014, + 0xc2e4, 0x2202, 0x2071, 0x19b6, 0x7004, 0x9084, 0x0007, 0x0002, + 0x849a, 0x849e, 0x84b5, 0x84de, 0x851c, 0x849a, 0x84b5, 0x8498, + 0x080c, 0x0db2, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x7024, 0x9065, + 0x0148, 0x7020, 0x8001, 0x7022, 0x600c, 0x9015, 0x0158, 0x7216, + 0x600f, 0x0000, 0x7007, 0x0000, 0x7027, 0x0000, 0x00ce, 0x00ee, + 0x00be, 0x0005, 0x7216, 0x7212, 0x0ca8, 0x6010, 0x2058, 0x080c, + 0x5eb1, 0xb800, 0xc0dc, 0xb802, 0x7007, 0x0000, 0x7027, 0x0000, + 0x7020, 0x8001, 0x7022, 0x1148, 0x2001, 0x180c, 0x2014, 0xd2ec, + 0x1180, 0x00ce, 0x00ee, 0x00be, 0x0005, 0xb854, 0x9015, 0x0120, + 0x721e, 0x080c, 0x8582, 0x0ca8, 0x7218, 0x721e, 0x080c, 0x8582, + 0x0c80, 0xc2ec, 0x2202, 0x080c, 0x865d, 0x0c58, 0x7024, 0x9065, + 0x05b8, 0x700c, 0x9c06, 0x1160, 0x080c, 0x933f, 0x600c, 0x9015, + 0x0120, 0x720e, 0x600f, 0x0000, 0x0448, 0x720e, 0x720a, 0x0430, + 0x7014, 0x9c06, 0x1160, 0x080c, 0x933f, 0x600c, 0x9015, 0x0120, + 0x7216, 0x600f, 0x0000, 0x00d0, 0x7216, 0x7212, 0x00b8, 0x6020, + 0x9086, 0x0003, 0x1198, 0x6010, 0x2058, 0x080c, 0x5eb1, 0xb800, + 0xc0dc, 0xb802, 0x080c, 0x933f, 0x701c, 0x9065, 0x0138, 0xb854, + 0x9015, 0x0110, 0x721e, 0x0010, 0x7218, 0x721e, 0x7027, 0x0000, + 0x00ce, 0x00ee, 0x00be, 0x0005, 0x7024, 0x9065, 0x0140, 0x080c, + 0x933f, 0x600c, 0x9015, 0x0158, 0x720e, 0x600f, 0x0000, 0x080c, + 0x9469, 0x7027, 0x0000, 0x00ce, 0x00ee, 0x00be, 0x0005, 0x720e, + 0x720a, 0x0ca8, 0x00d6, 0x2069, 0x19b6, 0x6830, 0x9084, 0x0003, + 0x0002, 0x853f, 0x8541, 0x8565, 0x853d, 0x080c, 0x0db2, 0x00de, + 0x0005, 0x00c6, 0x6840, 0x9086, 0x0001, 0x01b8, 0x683c, 0x9065, + 0x0130, 0x600c, 0x9015, 0x0170, 0x6a3a, 0x600f, 0x0000, 0x6833, + 0x0000, 0x683f, 0x0000, 0x2011, 0x19d5, 0x2013, 0x0000, 0x00ce, + 0x00de, 0x0005, 0x683a, 0x6836, 0x0c90, 0x6843, 0x0000, 0x6838, + 0x9065, 0x0d68, 0x6003, 0x0003, 0x0c50, 0x00c6, 0x9006, 0x6842, + 0x6846, 0x684a, 0x683c, 0x9065, 0x0160, 0x600c, 0x9015, 0x0130, + 0x6a3a, 0x600f, 0x0000, 0x683f, 0x0000, 0x0018, 0x683e, 0x683a, + 0x6836, 0x00ce, 0x00de, 0x0005, 0x2001, 0x180c, 0x200c, 0xc1e5, + 0x2102, 0x0005, 0x2001, 0x180c, 0x200c, 0xd1ec, 0x0120, 0xc1ec, + 0x2102, 0x080c, 0x865d, 0x2001, 0x19c2, 0x2004, 0x9086, 0x0001, + 0x0d58, 0x00d6, 0x2069, 0x19b6, 0x6804, 0x9084, 0x0007, 0x0002, + 0x85a2, 0x8645, 0x8645, 0x8645, 0x8645, 0x8647, 0x8645, 0x85a0, + 0x080c, 0x0db2, 0x6820, 0x9005, 0x1110, 0x00de, 0x0005, 0x00c6, + 0x680c, 0x9065, 0x0150, 0x6807, 0x0004, 0x6826, 0x682b, 0x0000, + 0x080c, 0x86b3, 0x00ce, 0x00de, 0x0005, 0x6814, 0x9065, 0x0150, + 0x6807, 0x0001, 0x6826, 0x682b, 0x0000, 0x080c, 0x86b3, 0x00ce, + 0x00de, 0x0005, 0x00b6, 0x00e6, 0x6a1c, 0x92dd, 0x0000, 0x0904, + 0x8631, 0xb84c, 0x900d, 0x0118, 0xb888, 0x9005, 0x01a0, 0xb854, + 0x905d, 0x0120, 0x920e, 0x0904, 0x8631, 0x0028, 0x6818, 0x920e, + 0x0904, 0x8631, 0x2058, 0xb84c, 0x900d, 0x0d88, 0xb888, 0x9005, + 0x1d70, 0x2b00, 0x681e, 0xbb3c, 0xb838, 0x9302, 0x1e40, 0x080c, + 0x99ad, 0x0904, 0x8631, 0x8318, 0xbb3e, 0x6116, 0x2b10, 0x6212, + 0x0096, 0x2148, 0xa880, 0x9084, 0x00ff, 0x605e, 0xa883, 0x0000, + 0xa884, 0x009e, 0x908a, 0x199a, 0x0210, 0x2001, 0x1999, 0x8003, + 0x801b, 0x831b, 0x9318, 0x631a, 0x6114, 0x0096, 0x2148, 0xa964, + 0x009e, 0x918c, 0x00ff, 0x918e, 0x0048, 0x0538, 0x00f6, 0x2c78, + 0x2061, 0x0100, 0xbab0, 0x629a, 0x2069, 0x0200, 0x2071, 0x0240, + 0x080c, 0x8bf2, 0x2069, 0x19b6, 0xbb00, 0xc3dd, 0xbb02, 0x6807, + 0x0002, 0x2f18, 0x6b26, 0x682b, 0x0000, 0x7823, 0x0003, 0x7803, + 0x0001, 0x7807, 0x0040, 0x00fe, 0x00ee, 0x00be, 0x00ce, 0x00de, + 0x0005, 0x00ee, 0x00be, 0x00ce, 0x0cd0, 0xbb00, 0xc3dd, 0xbb02, + 0x6807, 0x0006, 0x2f18, 0x6b26, 0x682b, 0x0000, 0x080c, 0x97f2, + 0x00ee, 0x00be, 0x00ce, 0x00de, 0x0005, 0x00de, 0x0005, 0x00c6, + 0x680c, 0x9065, 0x0138, 0x6807, 0x0004, 0x6826, 0x682b, 0x0000, + 0x080c, 0x86b3, 0x00ce, 0x00de, 0x0005, 0x2001, 0x180c, 0x2014, + 0xc2ed, 0x2202, 0x00de, 0x00fe, 0x0005, 0x00f6, 0x00d6, 0x2069, + 0x19b6, 0x6830, 0x9086, 0x0000, 0x1548, 0x2001, 0x180c, 0x2014, + 0xd2e4, 0x0130, 0xc2e4, 0x2202, 0x080c, 0x8591, 0x2069, 0x19b6, + 0x2001, 0x180c, 0x200c, 0xd1c4, 0x11e0, 0x6838, 0x907d, 0x01b0, + 0x6a04, 0x9296, 0x0000, 0x1588, 0x6833, 0x0001, 0x683e, 0x6847, + 0x0000, 0x684b, 0x0000, 0x0126, 0x00f6, 0x2091, 0x2400, 0x002e, + 0x080c, 0x19f2, 0x1178, 0x012e, 0x080c, 0x8e0a, 0x00de, 0x00fe, + 0x0005, 0xc1c4, 0x2102, 0x0066, 0x2031, 0x0001, 0x080c, 0x6d03, + 0x006e, 0x08d8, 0x012e, 0x6843, 0x0000, 0x7803, 0x0002, 0x780c, + 0x9015, 0x0140, 0x6a3a, 0x780f, 0x0000, 0x6833, 0x0000, 0x683f, + 0x0000, 0x0c20, 0x683a, 0x6836, 0x0cc0, 0x6a04, 0x9296, 0x0006, + 0x0958, 0x0804, 0x8655, 0x6020, 0x9084, 0x000f, 0x000b, 0x0005, + 0x86c7, 0x86cc, 0x8b2c, 0x8bbb, 0x86cc, 0x8b2c, 0x8bbb, 0x86c7, + 0x86cc, 0x86c7, 0x86c7, 0x86c7, 0x86c7, 0x86c7, 0x86c7, 0x080c, + 0x847d, 0x080c, 0x8582, 0x0005, 0x00b6, 0x0156, 0x0136, 0x0146, + 0x01c6, 0x01d6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2069, 0x0200, + 0x2071, 0x0240, 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0db2, 0x6110, + 0x2158, 0xb9b0, 0x2c78, 0x2061, 0x0100, 0x619a, 0x908a, 0x0040, + 0x1a04, 0x8738, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de, + 0x01ce, 0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0x88af, 0x88ea, + 0x8913, 0x89bb, 0x89dd, 0x89e3, 0x89f0, 0x89f8, 0x8a04, 0x8a0a, + 0x8a1b, 0x8a0a, 0x8a73, 0x89f8, 0x8a7f, 0x8a85, 0x8a04, 0x8a85, + 0x8a91, 0x8736, 0x8736, 0x8736, 0x8736, 0x8736, 0x8736, 0x8736, + 0x8736, 0x8736, 0x8736, 0x8736, 0x910b, 0x912e, 0x913f, 0x915f, + 0x9191, 0x89f0, 0x8736, 0x89f0, 0x8a0a, 0x8736, 0x8913, 0x89bb, + 0x8736, 0x9556, 0x8a0a, 0x8736, 0x9572, 0x8a0a, 0x8736, 0x8a04, + 0x88a9, 0x8759, 0x8736, 0x958e, 0x95fb, 0x96d2, 0x8736, 0x96df, + 0x89ed, 0x970a, 0x8736, 0x919b, 0x9737, 0x8736, 0x080c, 0x0db2, + 0x2100, 0x005b, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x01de, 0x01ce, + 0x014e, 0x013e, 0x015e, 0x00be, 0x0005, 0x8757, 0x8757, 0x8757, + 0x8780, 0x882c, 0x8837, 0x8757, 0x8757, 0x8757, 0x887e, 0x888a, + 0x879b, 0x8757, 0x87b6, 0x87ea, 0x98b4, 0x98f9, 0x8a0a, 0x080c, + 0x0db2, 0x00d6, 0x0096, 0x080c, 0x8aa4, 0x7003, 0x2414, 0x7007, + 0x0018, 0x700b, 0x0800, 0x7814, 0x2048, 0xa83c, 0x700e, 0xa850, + 0x7022, 0xa854, 0x7026, 0x60c3, 0x0018, 0x080c, 0x8f8f, 0x009e, + 0x00de, 0x0005, 0x7810, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x080c, + 0x9940, 0x1118, 0x9084, 0xff80, 0x0110, 0x9085, 0x0001, 0x0005, + 0x00d6, 0x0096, 0x080c, 0x8aa4, 0x7003, 0x0500, 0x7814, 0x2048, + 0xa874, 0x700a, 0xa878, 0x700e, 0xa87c, 0x7012, 0xa880, 0x7016, + 0xa884, 0x701a, 0xa888, 0x701e, 0x60c3, 0x0010, 0x080c, 0x8f8f, + 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, 0x080c, 0x8aa4, 0x7003, + 0x0500, 0x7814, 0x2048, 0xa8cc, 0x700a, 0xa8d0, 0x700e, 0xa8d4, + 0x7012, 0xa8d8, 0x7016, 0xa8dc, 0x701a, 0xa8e0, 0x701e, 0x60c3, + 0x0010, 0x080c, 0x8f8f, 0x009e, 0x00de, 0x0005, 0x00d6, 0x0096, + 0x0126, 0x2091, 0x8000, 0x080c, 0x8aa4, 0x20e9, 0x0000, 0x2001, + 0x1972, 0x2003, 0x0000, 0x7814, 0x2048, 0xa814, 0x8003, 0x60c2, + 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, + 0x2001, 0x1972, 0x0016, 0x200c, 0x2001, 0x0001, 0x080c, 0x20be, + 0x080c, 0xc2e6, 0x9006, 0x080c, 0x20be, 0x001e, 0xa804, 0x9005, + 0x0110, 0x2048, 0x0c28, 0x04d9, 0x080c, 0x8f8f, 0x012e, 0x009e, + 0x00de, 0x0005, 0x00d6, 0x0096, 0x0126, 0x2091, 0x8000, 0x080c, + 0x8aef, 0x20e9, 0x0000, 0x2001, 0x1972, 0x2003, 0x0000, 0x7814, + 0x2048, 0xa86f, 0x0200, 0xa873, 0x0000, 0xa814, 0x8003, 0x60c2, + 0xa830, 0x20a8, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, + 0x2001, 0x1972, 0x0016, 0x200c, 0x080c, 0xc2e6, 0x001e, 0xa804, + 0x9005, 0x0110, 0x2048, 0x0c60, 0x0051, 0x7814, 0x2048, 0x080c, + 0x0f87, 0x080c, 0x8f8f, 0x012e, 0x009e, 0x00de, 0x0005, 0x60c0, + 0x8004, 0x9084, 0x0003, 0x9005, 0x0130, 0x9082, 0x0004, 0x20a3, + 0x0000, 0x8000, 0x1de0, 0x0005, 0x080c, 0x8aa4, 0x7003, 0x7800, + 0x7808, 0x8007, 0x700a, 0x60c3, 0x0008, 0x0804, 0x8f8f, 0x00d6, + 0x00e6, 0x080c, 0x8aef, 0x7814, 0x9084, 0xff00, 0x2073, 0x0200, + 0x8e70, 0x8e70, 0x9095, 0x0010, 0x2272, 0x8e70, 0x2073, 0x0034, + 0x8e70, 0x2069, 0x1805, 0x20a9, 0x0004, 0x2d76, 0x8d68, 0x8e70, + 0x1f04, 0x884d, 0x2069, 0x1801, 0x20a9, 0x0004, 0x2d76, 0x8d68, + 0x8e70, 0x1f04, 0x8856, 0x2069, 0x1982, 0x9086, 0xdf00, 0x0110, + 0x2069, 0x199c, 0x20a9, 0x001a, 0x9e86, 0x0260, 0x1148, 0x00c6, + 0x2061, 0x0200, 0x6010, 0x8000, 0x6012, 0x00ce, 0x2071, 0x0240, + 0x2d04, 0x8007, 0x2072, 0x8d68, 0x8e70, 0x1f04, 0x8864, 0x60c3, + 0x004c, 0x080c, 0x8f8f, 0x00ee, 0x00de, 0x0005, 0x080c, 0x8aa4, + 0x7003, 0x6300, 0x7007, 0x0028, 0x7808, 0x700e, 0x60c3, 0x0008, + 0x0804, 0x8f8f, 0x00d6, 0x0026, 0x0016, 0x080c, 0x8aef, 0x7003, + 0x0200, 0x7814, 0x700e, 0x00e6, 0x9ef0, 0x0004, 0x2009, 0x0001, + 0x2011, 0x000c, 0x2073, 0x0800, 0x8e70, 0x2073, 0x0000, 0x00ee, + 0x7206, 0x710a, 0x62c2, 0x080c, 0x8f8f, 0x001e, 0x002e, 0x00de, + 0x0005, 0x2001, 0x1816, 0x2004, 0x609a, 0x0804, 0x8f8f, 0x080c, + 0x8aa4, 0x7003, 0x5200, 0x2069, 0x1853, 0x6804, 0xd084, 0x0130, + 0x6828, 0x0016, 0x080c, 0x2509, 0x710e, 0x001e, 0x20a9, 0x0004, + 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0250, + 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, 0x0254, 0x4003, + 0x080c, 0x9940, 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001, + 0x181d, 0x2004, 0x7032, 0x2001, 0x181e, 0x2004, 0x7036, 0x0030, + 0x2001, 0x1816, 0x2004, 0x9084, 0x00ff, 0x7036, 0x60c3, 0x001c, + 0x0804, 0x8f8f, 0x080c, 0x8aa4, 0x7003, 0x0500, 0x080c, 0x9940, + 0x1120, 0xb8a0, 0x9082, 0x007f, 0x0248, 0x2001, 0x181d, 0x2004, + 0x700a, 0x2001, 0x181e, 0x2004, 0x700e, 0x0030, 0x2001, 0x1816, + 0x2004, 0x9084, 0x00ff, 0x700e, 0x20a9, 0x0004, 0x20e1, 0x0001, + 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0250, 0x4003, 0x60c3, + 0x0010, 0x0804, 0x8f8f, 0x080c, 0x8aa4, 0x9006, 0x080c, 0x626e, + 0xb8a0, 0x9086, 0x007e, 0x1130, 0x7003, 0x0400, 0x620c, 0xc2b4, + 0x620e, 0x0058, 0x7814, 0x0096, 0x904d, 0x0120, 0x9006, 0xa89a, + 0xa8a6, 0xa8aa, 0x009e, 0x7003, 0x0300, 0xb8a0, 0x9086, 0x007e, + 0x1904, 0x8982, 0x00d6, 0x2069, 0x193d, 0x2001, 0x1835, 0x2004, + 0xd0a4, 0x0188, 0x6800, 0x700a, 0x6808, 0x9084, 0x2000, 0x7012, + 0x080c, 0x9957, 0x680c, 0x7016, 0x701f, 0x2710, 0x6818, 0x7022, + 0x681c, 0x7026, 0x0090, 0x6800, 0x700a, 0x6804, 0x700e, 0x6808, + 0x080c, 0x6c53, 0x1118, 0x9084, 0x37ff, 0x0010, 0x9084, 0x3fff, + 0x7012, 0x080c, 0x9957, 0x680c, 0x7016, 0x00de, 0x20a9, 0x0004, + 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, 0x20a1, 0x0256, + 0x4003, 0x20a9, 0x0004, 0x2099, 0x1801, 0x20a1, 0x025a, 0x4003, + 0x00d6, 0x080c, 0x97b9, 0x2069, 0x1945, 0x2071, 0x024e, 0x6800, + 0xc0dd, 0x7002, 0x080c, 0x5117, 0xd0e4, 0x0110, 0x680c, 0x700e, + 0x00de, 0x04a8, 0x2001, 0x1835, 0x2004, 0xd0a4, 0x0170, 0x0016, + 0x2001, 0x193e, 0x200c, 0x60e0, 0x9106, 0x0130, 0x2100, 0x60e3, + 0x0000, 0x080c, 0x254a, 0x61e2, 0x001e, 0x20e1, 0x0001, 0x2099, + 0x193d, 0x20e9, 0x0000, 0x20a1, 0x024e, 0x20a9, 0x0008, 0x4003, + 0x20a9, 0x0004, 0x2099, 0x1805, 0x20a1, 0x0256, 0x4003, 0x20a9, + 0x0004, 0x2099, 0x1801, 0x20a1, 0x025a, 0x4003, 0x080c, 0x97b9, + 0x20a1, 0x024e, 0x20a9, 0x0008, 0x2099, 0x1945, 0x4003, 0x60c3, + 0x0074, 0x0804, 0x8f8f, 0x080c, 0x8aa4, 0x7003, 0x2010, 0x7007, + 0x0014, 0x700b, 0x0800, 0x700f, 0x2000, 0x9006, 0x00f6, 0x2079, + 0x1853, 0x7904, 0x00fe, 0xd1ac, 0x1110, 0x9085, 0x0020, 0xd1a4, + 0x0110, 0x9085, 0x0010, 0x9085, 0x0002, 0x00d6, 0x0804, 0x8a54, + 0x7026, 0x60c3, 0x0014, 0x0804, 0x8f8f, 0x080c, 0x8aa4, 0x7003, + 0x5000, 0x0804, 0x892d, 0x080c, 0x8aa4, 0x7003, 0x2110, 0x7007, + 0x0014, 0x60c3, 0x0014, 0x0804, 0x8f8f, 0x080c, 0x8ae6, 0x0010, + 0x080c, 0x8aef, 0x7003, 0x0200, 0x60c3, 0x0004, 0x0804, 0x8f8f, + 0x080c, 0x8aef, 0x7003, 0x0100, 0x700b, 0x0003, 0x700f, 0x2a00, + 0x60c3, 0x0008, 0x0804, 0x8f8f, 0x080c, 0x8aef, 0x7003, 0x0200, + 0x0804, 0x892d, 0x080c, 0x8aef, 0x7003, 0x0100, 0x782c, 0x9005, + 0x0110, 0x700a, 0x0010, 0x700b, 0x0003, 0x7814, 0x700e, 0x60c3, + 0x0008, 0x0804, 0x8f8f, 0x00d6, 0x080c, 0x8aef, 0x7003, 0x0210, + 0x7007, 0x0014, 0x700b, 0x0800, 0xb894, 0x9086, 0x0014, 0x1198, + 0xb99c, 0x9184, 0x0030, 0x0190, 0xb998, 0x9184, 0xc000, 0x1140, + 0xd1ec, 0x0118, 0x700f, 0x2100, 0x0058, 0x700f, 0x0100, 0x0040, + 0x700f, 0x0400, 0x0028, 0x700f, 0x0700, 0x0010, 0x700f, 0x0800, + 0x00f6, 0x2079, 0x1853, 0x7904, 0x00fe, 0xd1ac, 0x1110, 0x9085, + 0x0020, 0xd1a4, 0x0110, 0x9085, 0x0010, 0x2009, 0x1875, 0x210c, + 0xd184, 0x1110, 0x9085, 0x0002, 0x0026, 0x2009, 0x1873, 0x210c, + 0xd1e4, 0x0150, 0xc0c5, 0xbabc, 0xd28c, 0x1108, 0xc0cd, 0x9094, + 0x0030, 0x9296, 0x0010, 0x0140, 0xd1ec, 0x0130, 0x9094, 0x0030, + 0x9296, 0x0010, 0x0108, 0xc0bd, 0x002e, 0x7026, 0x60c3, 0x0014, + 0x00de, 0x0804, 0x8f8f, 0x080c, 0x8aef, 0x7003, 0x0210, 0x7007, + 0x0014, 0x700f, 0x0100, 0x60c3, 0x0014, 0x0804, 0x8f8f, 0x080c, + 0x8aef, 0x7003, 0x0200, 0x0804, 0x88b3, 0x080c, 0x8aef, 0x7003, + 0x0100, 0x700b, 0x0003, 0x700f, 0x2a00, 0x60c3, 0x0008, 0x0804, + 0x8f8f, 0x080c, 0x8aef, 0x7003, 0x0100, 0x700b, 0x000b, 0x60c3, + 0x0008, 0x0804, 0x8f8f, 0x0026, 0x00d6, 0x0036, 0x0046, 0x2019, + 0x3200, 0x2021, 0x0800, 0x0040, 0x0026, 0x00d6, 0x0036, 0x0046, + 0x2019, 0x2200, 0x2021, 0x0100, 0x080c, 0x97ce, 0xb810, 0x9305, + 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6874, 0x700a, 0x6878, + 0x700e, 0x9485, 0x0029, 0x7012, 0x004e, 0x003e, 0x00de, 0x080c, + 0x8f7d, 0x721a, 0x9f95, 0x0000, 0x7222, 0x7027, 0xffff, 0x2071, + 0x024c, 0x002e, 0x0005, 0x0026, 0x080c, 0x97ce, 0x7003, 0x02ff, + 0x7007, 0xfffc, 0x00d6, 0x2069, 0x1800, 0x6874, 0x700a, 0x6878, + 0x700e, 0x00de, 0x7013, 0x2029, 0x0c10, 0x7003, 0x0100, 0x7007, + 0x0000, 0x700b, 0xfc02, 0x700f, 0x0000, 0x0005, 0x0026, 0x00d6, + 0x0036, 0x0046, 0x2019, 0x3300, 0x2021, 0x0800, 0x0040, 0x0026, + 0x00d6, 0x0036, 0x0046, 0x2019, 0x2300, 0x2021, 0x0100, 0x080c, + 0x97ce, 0xb810, 0x9305, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, + 0xb810, 0x9005, 0x1140, 0xb814, 0x9005, 0x1128, 0x700b, 0x00ff, + 0x700f, 0xfffe, 0x0020, 0x6874, 0x700a, 0x6878, 0x700e, 0x0000, + 0x9485, 0x0098, 0x7012, 0x004e, 0x003e, 0x00de, 0x080c, 0x8f7d, + 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071, 0x024c, 0x002e, + 0x0005, 0x080c, 0x8f7d, 0x721a, 0x7a08, 0x7222, 0x7814, 0x7026, + 0x2071, 0x024c, 0x002e, 0x0005, 0x00b6, 0x00c6, 0x00d6, 0x00e6, + 0x00f6, 0x2069, 0x0200, 0x2071, 0x0240, 0x6004, 0x908a, 0x0085, + 0x0a0c, 0x0db2, 0x908a, 0x0092, 0x1a0c, 0x0db2, 0x6110, 0x2158, + 0xb9b0, 0x2c78, 0x2061, 0x0100, 0x619a, 0x9082, 0x0085, 0x0033, + 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x00be, 0x0005, 0x8b5d, 0x8b6c, + 0x8b77, 0x8b5b, 0x8b5b, 0x8b5b, 0x8b5d, 0x8b5b, 0x8b5b, 0x8b5b, + 0x8b5b, 0x8b5b, 0x8b5b, 0x080c, 0x0db2, 0x0411, 0x60c3, 0x0000, + 0x0026, 0x080c, 0x283d, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, + 0x2012, 0x002e, 0x0804, 0x8f8f, 0x0431, 0x7808, 0x700a, 0x7814, + 0x700e, 0x7017, 0xffff, 0x60c3, 0x000c, 0x0804, 0x8f8f, 0x0479, + 0x7003, 0x0003, 0x7007, 0x0300, 0x60c3, 0x0004, 0x0804, 0x8f8f, + 0x0026, 0x080c, 0x97ce, 0xb810, 0x9085, 0x8100, 0x7002, 0xb814, + 0x7006, 0x2069, 0x1800, 0x6874, 0x700a, 0x6878, 0x700e, 0x7013, + 0x0009, 0x0804, 0x8abf, 0x0026, 0x080c, 0x97ce, 0xb810, 0x9085, + 0x8400, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6874, 0x700a, + 0x6878, 0x700e, 0x2001, 0x0099, 0x7012, 0x0804, 0x8b21, 0x0026, + 0x080c, 0x97ce, 0xb810, 0x9085, 0x8500, 0x7002, 0xb814, 0x7006, + 0x2069, 0x1800, 0x6874, 0x700a, 0x6878, 0x700e, 0x2001, 0x0099, + 0x7012, 0x0804, 0x8b21, 0x00b6, 0x00c6, 0x00d6, 0x00e6, 0x00f6, + 0x2c78, 0x2069, 0x0200, 0x2071, 0x0240, 0x7804, 0x908a, 0x0040, + 0x0a0c, 0x0db2, 0x908a, 0x0054, 0x1a0c, 0x0db2, 0x7910, 0x2158, + 0xb9b0, 0x2061, 0x0100, 0x619a, 0x9082, 0x0040, 0x0033, 0x00fe, + 0x00ee, 0x00de, 0x00ce, 0x00be, 0x0005, 0x8bf2, 0x8c99, 0x8c6c, + 0x8dbb, 0x8bf0, 0x8bf0, 0x8bf0, 0x8bf0, 0x8bf0, 0x8bf0, 0x8bf0, + 0x930c, 0x9318, 0x9324, 0x9330, 0x8bf0, 0x9716, 0x8bf0, 0x9300, + 0x080c, 0x0db2, 0x0096, 0x780b, 0xffff, 0x080c, 0x8c48, 0x7914, + 0x2148, 0xa978, 0x7956, 0x7132, 0xa97c, 0x9184, 0x000f, 0x1118, + 0x2001, 0x0005, 0x0040, 0xd184, 0x0118, 0x2001, 0x0004, 0x0018, + 0x9084, 0x0006, 0x8004, 0x2010, 0x785c, 0x9084, 0x00ff, 0x8007, + 0x9205, 0x7042, 0xd1ac, 0x0128, 0x7047, 0x0002, 0x080c, 0x1582, + 0x0050, 0xd1b4, 0x0118, 0x7047, 0x0001, 0x0028, 0x7047, 0x0000, + 0x9016, 0x2230, 0x0010, 0xaab0, 0xaeac, 0x726a, 0x766e, 0x20a9, + 0x0008, 0x20e9, 0x0000, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0023, + 0x2098, 0x20a1, 0x0252, 0x2069, 0x0200, 0x6813, 0x0018, 0x4003, + 0x6813, 0x0008, 0x60c3, 0x0020, 0x6017, 0x0009, 0x2001, 0x19d2, + 0x2003, 0x07d0, 0x2001, 0x19d1, 0x2003, 0x0009, 0x009e, 0x0005, + 0x6813, 0x0008, 0xba8c, 0x8210, 0xb8bc, 0xd084, 0x0128, 0x7a46, + 0x7b14, 0x7b4a, 0x722e, 0x732a, 0x9294, 0x00ff, 0xba8e, 0x8217, + 0x721a, 0xba10, 0x9295, 0x0600, 0x7202, 0xba14, 0x7206, 0x2069, + 0x1800, 0x6a74, 0x720a, 0x6a78, 0x720e, 0x7013, 0x0829, 0x2f10, + 0x7222, 0x7027, 0xffff, 0x0005, 0x00d6, 0x0096, 0x0081, 0x7814, + 0x2048, 0xa890, 0x7002, 0xa88c, 0x7006, 0xa8b0, 0x700a, 0xa8ac, + 0x700e, 0x60c3, 0x000c, 0x009e, 0x00de, 0x0804, 0x8f8f, 0x6813, + 0x0008, 0xb810, 0x9085, 0x0500, 0x7002, 0xb814, 0x7006, 0x2069, + 0x1800, 0x6874, 0x700a, 0x6878, 0x700e, 0x7013, 0x0889, 0x080c, + 0x8f7d, 0x721a, 0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071, 0x024c, + 0x0005, 0x00d6, 0x0096, 0x080c, 0x8d99, 0x7814, 0x2048, 0x080c, + 0xb5f9, 0x1130, 0x7814, 0x9084, 0x0700, 0x8007, 0x0033, 0x0010, + 0x9006, 0x001b, 0x009e, 0x00de, 0x0005, 0x8cb7, 0x8d20, 0x8d30, + 0x8d56, 0x8d62, 0x8d73, 0x8d7b, 0x8cb5, 0x080c, 0x0db2, 0x0016, + 0x0036, 0xa97c, 0x918c, 0x0003, 0x0118, 0x9186, 0x0003, 0x1198, + 0xaba8, 0x7824, 0xd0cc, 0x1168, 0x7316, 0xa898, 0x701a, 0xa894, + 0x701e, 0x003e, 0x001e, 0x2001, 0x1980, 0x2004, 0x60c2, 0x0804, + 0x8f8f, 0xc3e5, 0x0c88, 0x9186, 0x0001, 0x190c, 0x0db2, 0xaba8, + 0x7824, 0xd0cc, 0x1904, 0x8d1d, 0x7316, 0xa898, 0x701a, 0xa894, + 0x701e, 0xa8a4, 0x7026, 0xa8ac, 0x702e, 0x2009, 0x0018, 0x9384, + 0x0300, 0x0570, 0xd3c4, 0x0110, 0xa8ac, 0x9108, 0xd3cc, 0x0110, + 0xa8a4, 0x9108, 0x6810, 0x9085, 0x0010, 0x6812, 0x2011, 0x0258, + 0x20e9, 0x0000, 0x22a0, 0x0156, 0x20a9, 0x0008, 0xa860, 0x20e0, + 0xa85c, 0x9080, 0x002c, 0x2098, 0x4003, 0x6810, 0x8000, 0x6812, + 0x2011, 0x0240, 0x22a0, 0x20a9, 0x0005, 0x4003, 0x6810, 0xc084, + 0x6812, 0x015e, 0x9184, 0x0003, 0x0118, 0x2019, 0x0245, 0x201a, + 0x61c2, 0x003e, 0x001e, 0x0804, 0x8f8f, 0xc3e5, 0x0804, 0x8cdc, + 0x2011, 0x0008, 0x2001, 0x180e, 0x2004, 0xd0a4, 0x0110, 0x2011, + 0x0028, 0x7824, 0xd0cc, 0x1110, 0x7216, 0x0470, 0x0ce8, 0xc2e5, + 0x2011, 0x0302, 0x0016, 0x782c, 0x701a, 0x7930, 0x711e, 0x9105, + 0x0108, 0xc2dd, 0x001e, 0x7824, 0xd0cc, 0x0108, 0xc2e5, 0x7216, + 0x7027, 0x0012, 0x702f, 0x0008, 0x7043, 0x7000, 0x7047, 0x0500, + 0x704f, 0x000a, 0x2069, 0x0200, 0x6813, 0x0009, 0x2071, 0x0240, + 0x700b, 0x2500, 0x60c3, 0x0032, 0x0804, 0x8f8f, 0x2011, 0x0028, + 0x7824, 0xd0cc, 0x1128, 0x7216, 0x60c3, 0x0018, 0x0804, 0x8f8f, + 0x0cd0, 0xc2e5, 0x2011, 0x0100, 0x7824, 0xd0cc, 0x0108, 0xc2e5, + 0x7216, 0x702f, 0x0008, 0x7858, 0x9084, 0x00ff, 0x7036, 0x60c3, + 0x0020, 0x0804, 0x8f8f, 0x2011, 0x0008, 0x7824, 0xd0cc, 0x0108, + 0xc2e5, 0x7216, 0x0c08, 0x0036, 0x7b14, 0x9384, 0xff00, 0x7816, + 0x9384, 0x00ff, 0x8001, 0x1138, 0x7824, 0xd0cc, 0x0108, 0xc2e5, + 0x7216, 0x003e, 0x0888, 0x0046, 0x2021, 0x0800, 0x0006, 0x7824, + 0xd0cc, 0x000e, 0x0108, 0xc4e5, 0x7416, 0x004e, 0x701e, 0x003e, + 0x0818, 0x00d6, 0x6813, 0x0008, 0xb810, 0x9085, 0x0700, 0x7002, + 0xb814, 0x7006, 0x2069, 0x1800, 0x6874, 0x700a, 0x6878, 0x700e, + 0x7824, 0xd0cc, 0x1168, 0x7013, 0x0898, 0x080c, 0x8f7d, 0x721a, + 0x7a08, 0x7222, 0x2f10, 0x7226, 0x2071, 0x024c, 0x00de, 0x0005, + 0x7013, 0x0889, 0x0c90, 0x0016, 0x7814, 0x9084, 0x0700, 0x8007, + 0x0013, 0x001e, 0x0005, 0x8dcb, 0x8dcb, 0x8dcd, 0x8dcb, 0x8dcb, + 0x8dcb, 0x8de7, 0x8dcb, 0x080c, 0x0db2, 0x7914, 0x918c, 0x08ff, + 0x918d, 0xf600, 0x7916, 0x2009, 0x0003, 0x00b9, 0x2069, 0x1853, + 0x6804, 0xd0bc, 0x0130, 0x682c, 0x9084, 0x00ff, 0x8007, 0x7032, + 0x0010, 0x7033, 0x3f00, 0x60c3, 0x0001, 0x0804, 0x8f8f, 0x2009, + 0x0003, 0x0019, 0x7033, 0x7f00, 0x0cb0, 0x0016, 0x080c, 0x97ce, + 0x001e, 0xb810, 0x9085, 0x0100, 0x7002, 0xb814, 0x7006, 0x2069, + 0x1800, 0x6a74, 0x720a, 0x6a78, 0x720e, 0x7013, 0x0888, 0x918d, + 0x0008, 0x7116, 0x080c, 0x8f7d, 0x721a, 0x7a08, 0x7222, 0x2f10, + 0x7226, 0x0005, 0x00b6, 0x0096, 0x00e6, 0x00d6, 0x00c6, 0x0056, + 0x0046, 0x0036, 0x2061, 0x0100, 0x2071, 0x1800, 0x7810, 0x2058, + 0xb8a0, 0x2028, 0xb910, 0xba14, 0x7374, 0x7478, 0x7820, 0x90be, + 0x0006, 0x0904, 0x8eec, 0x90be, 0x000a, 0x1904, 0x8ea8, 0x609f, + 0x0000, 0x7814, 0x2048, 0xa87c, 0xd0fc, 0x05c8, 0xaf90, 0x9784, + 0xff00, 0x9105, 0x6062, 0x873f, 0x9784, 0xff00, 0x0006, 0x7814, + 0x2048, 0xa878, 0x9005, 0x000e, 0x1160, 0xaf94, 0x87ff, 0x0510, + 0x2039, 0x0098, 0x9705, 0x6072, 0x7808, 0x6082, 0x2f00, 0x6086, + 0x0038, 0x9185, 0x2200, 0x6062, 0x6073, 0x0129, 0x6077, 0x0000, + 0x609f, 0x0000, 0x2001, 0x1835, 0x2004, 0xd0ac, 0x11a8, 0xd09c, + 0x0130, 0x7814, 0x2048, 0xa874, 0x9082, 0x0080, 0x1268, 0xb814, + 0x609e, 0x0050, 0x2039, 0x0029, 0x9705, 0x6072, 0x0c48, 0x9185, + 0x0200, 0x6062, 0x6073, 0x2029, 0xa87c, 0xd0fc, 0x0118, 0xaf94, + 0x87ff, 0x1120, 0x2f00, 0x6082, 0x7808, 0x6086, 0x6266, 0x636a, + 0x646e, 0x6077, 0x0000, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, + 0x8007, 0x607a, 0x607f, 0x0000, 0xa838, 0x608a, 0xa834, 0x608e, + 0xa848, 0x60c6, 0xa844, 0x60ca, 0xb86c, 0x60ce, 0x60af, 0x95d5, + 0x60d7, 0x0000, 0x080c, 0x97b3, 0x2009, 0x07d0, 0x60c4, 0x9084, + 0xfff0, 0x9005, 0x0110, 0x2009, 0x1b58, 0x080c, 0x7ccc, 0x003e, + 0x004e, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x009e, 0x00be, 0x0005, + 0x7804, 0x9086, 0x0040, 0x0904, 0x8f28, 0x9185, 0x0100, 0x6062, + 0x6266, 0x636a, 0x646e, 0x6073, 0x0809, 0x6077, 0x0008, 0x60af, + 0x95d5, 0x60d7, 0x0000, 0xb88c, 0x8000, 0x9084, 0x00ff, 0xb88e, + 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00, 0x6082, 0x7808, 0x6086, + 0x7814, 0x2048, 0xa838, 0x608a, 0xa834, 0x608e, 0xa848, 0x60c6, + 0xa844, 0x60ca, 0xb86c, 0x60ce, 0xbab0, 0x629e, 0x080c, 0x97b3, + 0x2009, 0x07d0, 0x60c4, 0x9084, 0xfff0, 0x9005, 0x0110, 0x2009, + 0x1b58, 0x080c, 0x7ccc, 0x003e, 0x004e, 0x005e, 0x00ce, 0x00de, + 0x00ee, 0x009e, 0x00be, 0x0005, 0x7814, 0x2048, 0xa87c, 0x9084, + 0x0003, 0x9086, 0x0002, 0x0904, 0x8f44, 0x9185, 0x0100, 0x6062, + 0x6266, 0x636a, 0x646e, 0x6073, 0x0880, 0x6077, 0x0008, 0xb88c, + 0x8000, 0x9084, 0x00ff, 0xb88e, 0x8007, 0x607a, 0x7838, 0x607e, + 0x2f00, 0x6086, 0x7808, 0x6082, 0xa890, 0x608a, 0xa88c, 0x608e, + 0xa8b0, 0x60c6, 0xa8ac, 0x60ca, 0xa8ac, 0x7930, 0x9108, 0x7932, + 0xa8b0, 0x792c, 0x9109, 0x792e, 0xb86c, 0x60ce, 0x60af, 0x95d5, + 0x60d7, 0x0000, 0xbab0, 0x629e, 0x080c, 0x9790, 0x0804, 0x8ed8, + 0xb8bc, 0xd084, 0x0148, 0xb88c, 0x7814, 0x2048, 0xb88c, 0x7846, + 0xa836, 0x2900, 0xa83a, 0xb04a, 0x9185, 0x0600, 0x6062, 0x6266, + 0x636a, 0x646e, 0x6073, 0x0829, 0x6077, 0x0000, 0x60af, 0x9575, + 0x60d7, 0x0000, 0x0804, 0x8ebb, 0x9185, 0x0700, 0x6062, 0x6266, + 0x636a, 0x646e, 0x7824, 0xd0cc, 0x7826, 0x0118, 0x6073, 0x0889, + 0x0010, 0x6073, 0x0898, 0x6077, 0x0000, 0xb88c, 0x8000, 0x9084, + 0x00ff, 0xb88e, 0x8007, 0x607a, 0x607f, 0x0000, 0x2f00, 0x6086, + 0x7808, 0x6082, 0xa838, 0x608a, 0xa834, 0x608e, 0xa848, 0x60c6, + 0xa844, 0x60ca, 0xb86c, 0x60ce, 0x60af, 0x95d5, 0x60d7, 0x0000, + 0xbab0, 0x629e, 0x7824, 0xd0cc, 0x0120, 0x080c, 0x97b3, 0x0804, + 0x8ed8, 0x080c, 0x9790, 0x0804, 0x8ed8, 0x7a10, 0x00b6, 0x2258, + 0xba8c, 0x8210, 0x9294, 0x00ff, 0xba8e, 0x00be, 0x8217, 0x0005, + 0x00d6, 0x2069, 0x19b6, 0x6843, 0x0001, 0x00de, 0x0005, 0x60a3, + 0x0056, 0x60a7, 0x9575, 0x00f1, 0x080c, 0x7cbe, 0x0005, 0x0016, + 0x2001, 0x180c, 0x200c, 0x9184, 0x0600, 0x9086, 0x0600, 0x0128, + 0x0089, 0x080c, 0x7cbe, 0x001e, 0x0005, 0xc1e5, 0x2001, 0x180c, + 0x2102, 0x2001, 0x19b7, 0x2003, 0x0000, 0x2001, 0x19bf, 0x2003, + 0x0000, 0x0c88, 0x0006, 0x6014, 0x9084, 0x1804, 0x9085, 0x0009, + 0x6016, 0x000e, 0x0005, 0x0016, 0x00c6, 0x0006, 0x2061, 0x0100, + 0x61a4, 0x60a7, 0x95f5, 0x6014, 0x9084, 0x1804, 0x9085, 0x0008, + 0x6016, 0x000e, 0xa001, 0xa001, 0xa001, 0x61a6, 0x00ce, 0x001e, + 0x0005, 0x00c6, 0x00d6, 0x0016, 0x0026, 0x2061, 0x0100, 0x2069, + 0x0140, 0x080c, 0x6c53, 0x11e8, 0x2001, 0x19d2, 0x2004, 0x9005, + 0x1904, 0x9021, 0x0066, 0x2031, 0x0001, 0x080c, 0x6d03, 0x006e, + 0x1160, 0x2061, 0x0100, 0x6020, 0xd0b4, 0x1120, 0x6024, 0xd084, + 0x090c, 0x0db2, 0x080c, 0x7cbe, 0x0460, 0x00c6, 0x2061, 0x19b6, + 0x00d0, 0x6904, 0x9194, 0x4000, 0x0548, 0x080c, 0x8fbb, 0x080c, + 0x2997, 0x00c6, 0x2061, 0x19b6, 0x6128, 0x9192, 0x0008, 0x1258, + 0x8108, 0x612a, 0x6124, 0x00ce, 0x81ff, 0x0198, 0x080c, 0x7cbe, + 0x080c, 0x8fb2, 0x0070, 0x6124, 0x91e5, 0x0000, 0x0140, 0x080c, + 0xd358, 0x080c, 0x7cc7, 0x2009, 0x0014, 0x080c, 0x9a50, 0x00ce, + 0x0000, 0x002e, 0x001e, 0x00de, 0x00ce, 0x0005, 0x2001, 0x19d2, + 0x2004, 0x9005, 0x1db0, 0x00c6, 0x2061, 0x19b6, 0x6128, 0x9192, + 0x0003, 0x1e08, 0x8108, 0x612a, 0x00ce, 0x080c, 0x7cbe, 0x080c, + 0x58e0, 0x2009, 0x1852, 0x2114, 0x8210, 0x220a, 0x0c10, 0x0096, + 0x00c6, 0x00d6, 0x00e6, 0x0016, 0x0026, 0x080c, 0x7cd4, 0x2071, + 0x19b6, 0x713c, 0x81ff, 0x0904, 0x90ad, 0x2061, 0x0100, 0x2069, + 0x0140, 0x080c, 0x6c53, 0x11b0, 0x0036, 0x2019, 0x0002, 0x080c, + 0x9254, 0x003e, 0x713c, 0x2160, 0x080c, 0xd358, 0x2009, 0x004a, + 0x080c, 0x9a50, 0x0066, 0x2031, 0x0001, 0x080c, 0x6d03, 0x006e, + 0x0804, 0x90ad, 0x6904, 0xd1f4, 0x0904, 0x90b4, 0x080c, 0x2997, + 0x00c6, 0x703c, 0x9065, 0x090c, 0x0db2, 0x6020, 0x00ce, 0x9086, + 0x0006, 0x1528, 0x61c8, 0x60c4, 0x9105, 0x1508, 0x2009, 0x180c, + 0x2104, 0xd0d4, 0x01e0, 0x6214, 0x9294, 0x1800, 0x1128, 0x6224, + 0x9294, 0x0002, 0x1510, 0x0030, 0xc0d4, 0x200a, 0xd0cc, 0x0110, + 0x080c, 0x28ea, 0x6014, 0x9084, 0xe7fd, 0x9085, 0x0010, 0x6016, + 0x703c, 0x2060, 0x2009, 0x0049, 0x080c, 0x9a50, 0x0070, 0x0036, + 0x2019, 0x0001, 0x080c, 0x9254, 0x003e, 0x713c, 0x2160, 0x080c, + 0xd358, 0x2009, 0x004a, 0x080c, 0x9a50, 0x002e, 0x001e, 0x00ee, + 0x00de, 0x00ce, 0x009e, 0x0005, 0xd1ec, 0x1904, 0x906e, 0x0804, + 0x9070, 0x0026, 0x00e6, 0x2071, 0x19b6, 0x7048, 0xd084, 0x01c0, + 0x713c, 0x81ff, 0x01a8, 0x2071, 0x0100, 0x9188, 0x0008, 0x2114, + 0x928e, 0x0006, 0x1138, 0x7014, 0x9084, 0x1984, 0x9085, 0x0012, + 0x7016, 0x0030, 0x7014, 0x9084, 0x1984, 0x9085, 0x0016, 0x7016, + 0x00ee, 0x002e, 0x0005, 0x00b6, 0x00e6, 0x00d6, 0x00c6, 0x0066, + 0x0056, 0x0046, 0x0006, 0x0126, 0x2091, 0x8000, 0x6010, 0x2058, + 0xbca0, 0x2071, 0x19b6, 0x7018, 0x2058, 0x8bff, 0x0190, 0xb8a0, + 0x9406, 0x0118, 0xb854, 0x2058, 0x0cc0, 0x6014, 0x0096, 0x2048, + 0xac6c, 0xad70, 0xae78, 0x009e, 0x080c, 0x60b0, 0x0110, 0x9085, + 0x0001, 0x012e, 0x000e, 0x004e, 0x005e, 0x006e, 0x00ce, 0x00de, + 0x00ee, 0x00be, 0x0005, 0x080c, 0x8aa4, 0x7003, 0x1200, 0x7838, + 0x7012, 0x783c, 0x7016, 0x00c6, 0x7820, 0x9086, 0x0004, 0x1148, + 0x7810, 0x9005, 0x0130, 0x00b6, 0x2058, 0xb810, 0xb914, 0x00be, + 0x0020, 0x2061, 0x1800, 0x6074, 0x6178, 0x9084, 0x00ff, 0x700a, + 0x710e, 0x00ce, 0x60c3, 0x002c, 0x0804, 0x8f8f, 0x080c, 0x8aa4, + 0x7003, 0x0f00, 0x7808, 0xd09c, 0x0128, 0xb810, 0x9084, 0x00ff, + 0x700a, 0xb814, 0x700e, 0x60c3, 0x0008, 0x0804, 0x8f8f, 0x0156, + 0x080c, 0x8aef, 0x7003, 0x0200, 0x2011, 0x1848, 0x63f0, 0x2312, + 0x20a9, 0x0006, 0x2011, 0x1840, 0x2019, 0x1841, 0x9ef0, 0x0002, + 0x2376, 0x8e70, 0x2276, 0x8e70, 0x9398, 0x0002, 0x9290, 0x0002, + 0x1f04, 0x9150, 0x60c3, 0x001c, 0x015e, 0x0804, 0x8f8f, 0x0016, + 0x0026, 0x080c, 0x8acb, 0x080c, 0x8add, 0x9e80, 0x0004, 0x20e9, + 0x0000, 0x20a0, 0x7814, 0x0096, 0x2048, 0xa800, 0x2048, 0xa860, + 0x20e0, 0xa85c, 0x9080, 0x0021, 0x2098, 0x009e, 0x7808, 0x9088, + 0x0002, 0x21a8, 0x9192, 0x0010, 0x1250, 0x4003, 0x9080, 0x0004, + 0x8003, 0x60c2, 0x080c, 0x8f8f, 0x002e, 0x001e, 0x0005, 0x20a9, + 0x0010, 0x4003, 0x080c, 0x97b9, 0x20a1, 0x0240, 0x22a8, 0x4003, + 0x0c68, 0x080c, 0x8aa4, 0x7003, 0x6200, 0x7808, 0x700e, 0x60c3, + 0x0008, 0x0804, 0x8f8f, 0x0016, 0x0026, 0x080c, 0x8aa4, 0x20e9, + 0x0000, 0x20a1, 0x024c, 0x7814, 0x0096, 0x2048, 0xa800, 0x2048, + 0xa860, 0x20e0, 0xa85c, 0x9080, 0x0023, 0x2098, 0x009e, 0x7808, + 0x9088, 0x0002, 0x21a8, 0x4003, 0x8003, 0x60c2, 0x080c, 0x8f8f, + 0x002e, 0x001e, 0x0005, 0x00e6, 0x00c6, 0x0006, 0x0126, 0x2091, + 0x8000, 0x2071, 0x19b6, 0x700c, 0x2060, 0x8cff, 0x0178, 0x080c, + 0xb7fa, 0x1110, 0x080c, 0xa364, 0x600c, 0x0006, 0x080c, 0xba61, + 0x080c, 0x99d6, 0x080c, 0x933f, 0x00ce, 0x0c78, 0x2c00, 0x700e, + 0x700a, 0x012e, 0x000e, 0x00ce, 0x00ee, 0x0005, 0x0126, 0x0156, + 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0016, 0x0006, + 0x2091, 0x8000, 0x2001, 0x180c, 0x200c, 0x918c, 0xe7ff, 0x2102, + 0x2069, 0x0100, 0x2079, 0x0140, 0x2071, 0x19b6, 0x7024, 0x2060, + 0x8cff, 0x01f8, 0x080c, 0x8fbb, 0x6ac0, 0x68c3, 0x0000, 0x080c, + 0x7cc7, 0x00c6, 0x2061, 0x0100, 0x080c, 0x97d2, 0x00ce, 0x20a9, + 0x01f4, 0x0461, 0x2009, 0x0013, 0x080c, 0x9a50, 0x000e, 0x001e, + 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x015e, 0x012e, + 0x0005, 0x2001, 0x1800, 0x2004, 0x9096, 0x0001, 0x0d78, 0x9096, + 0x0004, 0x0d60, 0x080c, 0x7cc7, 0x6814, 0x9084, 0x0001, 0x0110, + 0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000, 0x2011, 0x588a, + 0x080c, 0x7c4a, 0x20a9, 0x01f4, 0x0009, 0x08c0, 0x6824, 0xd094, + 0x0140, 0x6827, 0x0004, 0x7804, 0x9084, 0x4000, 0x190c, 0x2997, + 0x0090, 0xd084, 0x0118, 0x6827, 0x0001, 0x0010, 0x1f04, 0x9236, + 0x7804, 0x9084, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2987, + 0x9006, 0x080c, 0x2987, 0x0005, 0x0126, 0x0156, 0x00f6, 0x00e6, + 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0016, 0x0006, 0x2091, 0x8000, + 0x2001, 0x180c, 0x200c, 0x918c, 0xdbff, 0x2102, 0x2069, 0x0100, + 0x2079, 0x0140, 0x2071, 0x19b6, 0x703c, 0x2060, 0x8cff, 0x0904, + 0x92e1, 0x9386, 0x0002, 0x1128, 0x6814, 0x9084, 0x0002, 0x0904, + 0x92e1, 0x68af, 0x95f5, 0x6817, 0x0010, 0x2009, 0x00fa, 0x8109, + 0x1df0, 0x69c6, 0x68cb, 0x0008, 0x080c, 0x7cd4, 0x080c, 0x1d14, + 0x0046, 0x2009, 0x017f, 0x200b, 0x00a5, 0x2021, 0x0169, 0x2404, + 0x9084, 0x000f, 0x9086, 0x0004, 0x11f8, 0x68af, 0x95f5, 0x68c6, + 0x68cb, 0x0008, 0x00e6, 0x00f6, 0x2079, 0x0090, 0x2071, 0x1a34, + 0x6814, 0x9084, 0x1984, 0x9085, 0x0012, 0x6816, 0x782b, 0x0008, + 0x7003, 0x0000, 0x00fe, 0x00ee, 0x9386, 0x0002, 0x1128, 0x7884, + 0x9005, 0x1110, 0x7887, 0x0001, 0x2001, 0x1950, 0x2004, 0x200a, + 0x004e, 0x20a9, 0x03e8, 0x6824, 0xd094, 0x0140, 0x6827, 0x0004, + 0x7804, 0x9084, 0x4000, 0x190c, 0x2997, 0x0090, 0xd08c, 0x0118, + 0x6827, 0x0002, 0x0010, 0x1f04, 0x92bb, 0x7804, 0x9084, 0x1000, + 0x0138, 0x2001, 0x0100, 0x080c, 0x2987, 0x9006, 0x080c, 0x2987, + 0x6827, 0x4000, 0x6824, 0x83ff, 0x1120, 0x2009, 0x0049, 0x080c, + 0x9a50, 0x000e, 0x001e, 0x002e, 0x006e, 0x00ce, 0x00de, 0x00ee, + 0x00fe, 0x015e, 0x012e, 0x0005, 0x00d6, 0x0126, 0x2091, 0x8000, + 0x2069, 0x19b6, 0x6a06, 0x012e, 0x00de, 0x0005, 0x00d6, 0x0126, + 0x2091, 0x8000, 0x2069, 0x19b6, 0x6a32, 0x012e, 0x00de, 0x0005, + 0x080c, 0x8c48, 0x7814, 0x080c, 0x511b, 0x0108, 0x782c, 0x7032, + 0x7042, 0x7047, 0x1000, 0x0478, 0x080c, 0x8c48, 0x7814, 0x080c, + 0x511b, 0x0108, 0x782c, 0x7032, 0x7042, 0x7047, 0x4000, 0x0418, + 0x080c, 0x8c48, 0x7814, 0x080c, 0x511b, 0x0108, 0x782c, 0x7032, + 0x7042, 0x7047, 0x2000, 0x00b8, 0x080c, 0x8c48, 0x7814, 0x080c, + 0x511b, 0x0108, 0x782c, 0x7032, 0x7042, 0x7047, 0x0400, 0x0058, + 0x080c, 0x8c48, 0x7814, 0x080c, 0x511b, 0x0108, 0x782c, 0x7032, + 0x7042, 0x7047, 0x0200, 0x60c3, 0x0020, 0x0804, 0x8f8f, 0x00e6, + 0x2071, 0x19b6, 0x7020, 0x9005, 0x0110, 0x8001, 0x7022, 0x00ee, + 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066, 0x0006, + 0x0126, 0x2091, 0x8000, 0x2071, 0x19b6, 0x7614, 0x2660, 0x2678, + 0x2039, 0x0001, 0x87ff, 0x0904, 0x93e4, 0x8cff, 0x0904, 0x93e4, + 0x6020, 0x9086, 0x0006, 0x1904, 0x93df, 0x88ff, 0x0138, 0x2800, + 0x9c06, 0x1904, 0x93df, 0x2039, 0x0000, 0x0050, 0x6010, 0x9b06, + 0x1904, 0x93df, 0x85ff, 0x0120, 0x6054, 0x9106, 0x1904, 0x93df, + 0x7024, 0x9c06, 0x15b0, 0x2069, 0x0100, 0x68c0, 0x9005, 0x1160, + 0x6824, 0xd084, 0x0148, 0x6827, 0x0001, 0x080c, 0x7cc7, 0x080c, + 0x9469, 0x7027, 0x0000, 0x0428, 0x080c, 0x7cc7, 0x6820, 0xd0b4, + 0x0110, 0x68a7, 0x95f5, 0x6817, 0x0008, 0x68c3, 0x0000, 0x080c, + 0x9469, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, + 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2987, 0x9006, 0x080c, + 0x2987, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, + 0x003e, 0x7014, 0x9c36, 0x1110, 0x660c, 0x7616, 0x7010, 0x9c36, + 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7012, 0x0010, 0x7013, + 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, + 0x2678, 0x89ff, 0x1168, 0x600f, 0x0000, 0x6014, 0x0096, 0x2048, + 0x080c, 0xb5f9, 0x0110, 0x080c, 0xcf91, 0x009e, 0x080c, 0x9a06, + 0x080c, 0x933f, 0x88ff, 0x1190, 0x00ce, 0x0804, 0x935a, 0x2c78, + 0x600c, 0x2060, 0x0804, 0x935a, 0x9006, 0x012e, 0x000e, 0x006e, + 0x007e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x601b, 0x0000, + 0x00ce, 0x98c5, 0x0001, 0x0c88, 0x00f6, 0x00e6, 0x00d6, 0x0096, + 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2071, + 0x19b6, 0x7638, 0x2660, 0x2678, 0x8cff, 0x0904, 0x9458, 0x6020, + 0x9086, 0x0006, 0x1904, 0x9453, 0x87ff, 0x0128, 0x2700, 0x9c06, + 0x1904, 0x9453, 0x0040, 0x6010, 0x9b06, 0x15e8, 0x85ff, 0x0118, + 0x6054, 0x9106, 0x15c0, 0x703c, 0x9c06, 0x1168, 0x0036, 0x2019, + 0x0001, 0x080c, 0x9254, 0x7033, 0x0000, 0x9006, 0x703e, 0x7042, + 0x7046, 0x704a, 0x003e, 0x7038, 0x9c36, 0x1110, 0x660c, 0x763a, + 0x7034, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x7036, + 0x0010, 0x7037, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, + 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x6014, 0x2048, 0x080c, + 0xb5f9, 0x0110, 0x080c, 0xcf91, 0x080c, 0x9a06, 0x87ff, 0x1198, + 0x00ce, 0x0804, 0x9404, 0x2c78, 0x600c, 0x2060, 0x0804, 0x9404, + 0x9006, 0x012e, 0x000e, 0x002e, 0x006e, 0x00ce, 0x009e, 0x00de, + 0x00ee, 0x00fe, 0x0005, 0x601b, 0x0000, 0x00ce, 0x97bd, 0x0001, + 0x0c80, 0x00e6, 0x2071, 0x19b6, 0x2001, 0x1800, 0x2004, 0x9086, + 0x0002, 0x1118, 0x7007, 0x0005, 0x0010, 0x7007, 0x0000, 0x00ee, + 0x0005, 0x00f6, 0x00e6, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, + 0x2091, 0x8000, 0x2071, 0x19b6, 0x2c10, 0x7638, 0x2660, 0x2678, + 0x8cff, 0x0518, 0x2200, 0x9c06, 0x11e0, 0x7038, 0x9c36, 0x1110, + 0x660c, 0x763a, 0x7034, 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, + 0x2f00, 0x7036, 0x0010, 0x7037, 0x0000, 0x660c, 0x2c00, 0x9f06, + 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, 0x0000, 0x9085, 0x0001, + 0x0020, 0x2c78, 0x600c, 0x2060, 0x08d8, 0x012e, 0x000e, 0x002e, + 0x006e, 0x00ce, 0x00ee, 0x00fe, 0x0005, 0x0096, 0x00f6, 0x00e6, + 0x00d6, 0x00c6, 0x0066, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, + 0x2071, 0x19b6, 0x760c, 0x2660, 0x2678, 0x8cff, 0x0904, 0x9545, + 0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x9206, 0x1904, 0x9540, + 0x7024, 0x9c06, 0x1520, 0x2069, 0x0100, 0x68c0, 0x9005, 0x0904, + 0x951c, 0x080c, 0x8fbb, 0x68c3, 0x0000, 0x080c, 0x9469, 0x7027, + 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, 0x9384, 0x1000, 0x0138, + 0x2001, 0x0100, 0x080c, 0x2987, 0x9006, 0x080c, 0x2987, 0x2069, + 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, 0x0001, 0x003e, 0x700c, + 0x9c36, 0x1110, 0x660c, 0x760e, 0x7008, 0x9c36, 0x1140, 0x2c00, + 0x9f36, 0x0118, 0x2f00, 0x700a, 0x0010, 0x700b, 0x0000, 0x660c, + 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, 0x0008, 0x2678, 0x600f, + 0x0000, 0x080c, 0xb7e9, 0x1158, 0x080c, 0x2e55, 0x080c, 0xb7fa, + 0x11f0, 0x080c, 0xa364, 0x00d8, 0x080c, 0x9469, 0x08c0, 0x080c, + 0xb7fa, 0x1118, 0x080c, 0xa364, 0x0090, 0x6014, 0x2048, 0x080c, + 0xb5f9, 0x0168, 0x6020, 0x9086, 0x0003, 0x1508, 0xa867, 0x0103, + 0xab7a, 0xa877, 0x0000, 0x080c, 0x6529, 0x080c, 0xb7dd, 0x080c, + 0xba61, 0x080c, 0x9a06, 0x080c, 0x933f, 0x00ce, 0x0804, 0x94c5, + 0x2c78, 0x600c, 0x2060, 0x0804, 0x94c5, 0x012e, 0x000e, 0x002e, + 0x006e, 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x009e, 0x0005, 0x6020, + 0x9086, 0x0006, 0x1d20, 0x080c, 0xcf91, 0x0c08, 0x00d6, 0x080c, + 0x8aef, 0x7003, 0x0200, 0x7007, 0x0014, 0x60c3, 0x0014, 0x20e1, + 0x0001, 0x2099, 0x1958, 0x20e9, 0x0000, 0x20a1, 0x0250, 0x20a9, + 0x0004, 0x4003, 0x7023, 0x0004, 0x7027, 0x7878, 0x080c, 0x8f8f, + 0x00de, 0x0005, 0x080c, 0x8aef, 0x700b, 0x0800, 0x7814, 0x9084, + 0xff00, 0x700e, 0x7814, 0x9084, 0x00ff, 0x7022, 0x782c, 0x7026, + 0x7858, 0x9084, 0x00ff, 0x9085, 0x0200, 0x7002, 0x7858, 0x9084, + 0xff00, 0x8007, 0x7006, 0x60c2, 0x0804, 0x8f8f, 0x00b6, 0x00d6, + 0x0016, 0x00d6, 0x2f68, 0x2009, 0x0035, 0x080c, 0xbc66, 0x00de, + 0x1904, 0x95f3, 0x080c, 0x8aa4, 0x7003, 0x1300, 0x782c, 0x080c, + 0x96f5, 0x2068, 0x6820, 0x9086, 0x0003, 0x0560, 0x7810, 0x2058, + 0xbaa0, 0x080c, 0x9940, 0x11d8, 0x9286, 0x007e, 0x1128, 0x700b, + 0x00ff, 0x700f, 0xfffe, 0x0498, 0x9286, 0x007f, 0x1128, 0x700b, + 0x00ff, 0x700f, 0xfffd, 0x0458, 0x9284, 0xff80, 0x0180, 0x9286, + 0x0080, 0x1128, 0x700b, 0x00ff, 0x700f, 0xfffc, 0x0400, 0x92d8, + 0x1000, 0x2b5c, 0xb810, 0x700a, 0xb814, 0x700e, 0x00c0, 0x6098, + 0x700e, 0x00a8, 0x080c, 0x9940, 0x1130, 0x7810, 0x2058, 0xb8a0, + 0x9082, 0x007e, 0x0250, 0x00d6, 0x2069, 0x181d, 0x2d04, 0x700a, + 0x8d68, 0x2d04, 0x700e, 0x00de, 0x0010, 0x6034, 0x700e, 0x7838, + 0x7012, 0x783c, 0x7016, 0x60c3, 0x000c, 0x001e, 0x00de, 0x080c, + 0x8f8f, 0x00be, 0x0005, 0x781b, 0x0001, 0x7803, 0x0006, 0x001e, + 0x00de, 0x00be, 0x0005, 0x792c, 0x9180, 0x0008, 0x200c, 0x9186, + 0x0006, 0x01c0, 0x9186, 0x0003, 0x0904, 0x966d, 0x9186, 0x0005, + 0x0904, 0x9656, 0x9186, 0x0004, 0x05d8, 0x9186, 0x0008, 0x0904, + 0x965e, 0x7807, 0x0037, 0x782f, 0x0003, 0x7817, 0x1700, 0x080c, + 0x96d2, 0x0005, 0x080c, 0x9693, 0x00d6, 0x0026, 0x792c, 0x2168, + 0x2009, 0x4000, 0x6800, 0x0002, 0x9637, 0x9642, 0x9639, 0x9642, + 0x963e, 0x9637, 0x9637, 0x9642, 0x9642, 0x9642, 0x9642, 0x9637, + 0x9637, 0x9637, 0x9637, 0x9637, 0x9642, 0x9637, 0x9642, 0x080c, + 0x0db2, 0x6824, 0xd0e4, 0x0110, 0xd0cc, 0x0110, 0x900e, 0x0010, + 0x2009, 0x2000, 0x682c, 0x7022, 0x6830, 0x7026, 0x0804, 0x968c, + 0x080c, 0x9693, 0x00d6, 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, + 0x6a00, 0x9286, 0x0002, 0x1108, 0x900e, 0x04b0, 0x04e1, 0x00d6, + 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x0470, 0x04a1, 0x00d6, + 0x0026, 0x792c, 0x2168, 0x2009, 0x4000, 0x9286, 0x0005, 0x0118, + 0x9286, 0x0002, 0x1108, 0x900e, 0x00f8, 0x0429, 0x00d6, 0x0026, + 0x792c, 0x2168, 0x6814, 0x0096, 0x2048, 0xa9ac, 0xa834, 0x9112, + 0xa9b0, 0xa838, 0x009e, 0x9103, 0x7022, 0x7226, 0x792c, 0x9180, + 0x0000, 0x2004, 0x908e, 0x0002, 0x0130, 0x908e, 0x0004, 0x0118, + 0x2009, 0x4000, 0x0008, 0x900e, 0x712a, 0x60c3, 0x0018, 0x002e, + 0x00de, 0x0804, 0x8f8f, 0x00b6, 0x0036, 0x0046, 0x0056, 0x0066, + 0x080c, 0x8aef, 0x9006, 0x7003, 0x0200, 0x7938, 0x710a, 0x793c, + 0x710e, 0x7810, 0x2058, 0xb8a0, 0x080c, 0x9940, 0x1118, 0x9092, + 0x007e, 0x0268, 0x00d6, 0x2069, 0x181d, 0x2d2c, 0x8d68, 0x2d34, + 0x90d8, 0x1000, 0x2b5c, 0xbb10, 0xbc14, 0x00de, 0x0028, 0x901e, + 0x6498, 0x2029, 0x0000, 0x6634, 0x782c, 0x9080, 0x0008, 0x2004, + 0x9086, 0x0003, 0x1128, 0x7512, 0x7616, 0x731a, 0x741e, 0x0020, + 0x7312, 0x7416, 0x751a, 0x761e, 0x006e, 0x005e, 0x004e, 0x003e, + 0x00be, 0x0005, 0x080c, 0x8aef, 0x7003, 0x0100, 0x782c, 0x700a, + 0x7814, 0x700e, 0x700e, 0x60c3, 0x0008, 0x0804, 0x8f8f, 0x080c, + 0x8a9b, 0x7003, 0x1400, 0x7838, 0x700a, 0x0079, 0x783c, 0x700e, + 0x782c, 0x7012, 0x7830, 0x7016, 0x7834, 0x9084, 0x00ff, 0x8007, + 0x701a, 0x60c3, 0x0010, 0x0804, 0x8f8f, 0x00e6, 0x2071, 0x0240, + 0x0006, 0x00f6, 0x2078, 0x7810, 0x00b6, 0x2058, 0xb8bc, 0xd084, + 0x0120, 0x7848, 0x702a, 0x7844, 0x702e, 0x00be, 0x00fe, 0x000e, + 0x00ee, 0x0005, 0x080c, 0x8ae6, 0x7003, 0x0100, 0x782c, 0x700a, + 0x7814, 0x700e, 0x60c3, 0x0008, 0x0804, 0x8f8f, 0x0021, 0x60c3, + 0x0000, 0x0804, 0x8f8f, 0x00d6, 0x080c, 0x97ce, 0xb810, 0x9085, + 0x0300, 0x7002, 0xb814, 0x7006, 0x2069, 0x1800, 0x6874, 0x700a, + 0x6878, 0x700e, 0x7013, 0x0819, 0x080c, 0x8f7d, 0x721a, 0x2f10, + 0x7222, 0x7a08, 0x7226, 0x2071, 0x024c, 0x00de, 0x0005, 0x00a9, + 0x7914, 0x712a, 0x60c3, 0x0000, 0x60a7, 0x9575, 0x0026, 0x080c, + 0x283d, 0x0228, 0x2011, 0x0101, 0x2204, 0xc0c5, 0x2012, 0x002e, + 0x080c, 0x8fb2, 0x080c, 0x7cbe, 0x0005, 0x0036, 0x0096, 0x00d6, + 0x00e6, 0x7858, 0x2048, 0xaa7c, 0x9296, 0x00c0, 0x9294, 0xfffd, + 0xaa7e, 0xaa80, 0x9294, 0x0300, 0xaa82, 0xa96c, 0x9194, 0x00ff, + 0xab74, 0x9384, 0x00ff, 0x908d, 0xc200, 0xa96e, 0x9384, 0xff00, + 0x9215, 0xaa76, 0xa870, 0xaa78, 0xa87a, 0xaa72, 0x00d6, 0x2069, + 0x0200, 0x080c, 0x97ce, 0x00de, 0x20e9, 0x0000, 0x20a1, 0x0240, + 0x20a9, 0x000a, 0xa860, 0x20e0, 0xa85c, 0x9080, 0x001b, 0x2098, + 0x4003, 0x60a3, 0x0035, 0xaa68, 0x9294, 0x7000, 0x9286, 0x3000, + 0x0110, 0x60a3, 0x0037, 0x00ee, 0x00de, 0x009e, 0x003e, 0x0005, + 0x900e, 0x7814, 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x01c0, 0x9084, + 0x0003, 0x11a8, 0x2001, 0x180c, 0x2004, 0xd0bc, 0x0180, 0x7824, + 0xd0cc, 0x1168, 0xd0c4, 0x1158, 0xa8a8, 0x9005, 0x1140, 0x2001, + 0x180c, 0x200c, 0xc1d5, 0x2102, 0x2009, 0x1981, 0x210c, 0x009e, + 0x918d, 0x0092, 0x0010, 0x2009, 0x0096, 0x60ab, 0x0036, 0x6116, + 0x0005, 0x2009, 0x0009, 0x00a0, 0x2009, 0x000a, 0x0088, 0x2009, + 0x000b, 0x0070, 0x2009, 0x000c, 0x0058, 0x2009, 0x000d, 0x0040, + 0x2009, 0x000e, 0x0028, 0x2009, 0x000f, 0x0010, 0x2009, 0x0008, + 0x6912, 0x0005, 0x00d6, 0x9290, 0x0018, 0x8214, 0x20e9, 0x0000, + 0x2069, 0x0200, 0x6813, 0x0000, 0x22a8, 0x9284, 0x00e0, 0x0128, + 0x20a9, 0x0020, 0x9292, 0x0020, 0x0008, 0x9016, 0x20a1, 0x0240, + 0x9006, 0x4004, 0x82ff, 0x0120, 0x6810, 0x8000, 0x6812, 0x0c60, + 0x00de, 0x0005, 0x00d6, 0x0096, 0x6014, 0x2048, 0xa878, 0x6056, + 0x9006, 0xa836, 0xa83a, 0xa99c, 0xa946, 0xa84a, 0x6023, 0x0003, + 0x6007, 0x0040, 0x6003, 0x0003, 0x600b, 0xffff, 0xa817, 0x0001, + 0xa842, 0xa83e, 0x2900, 0xa85a, 0xa813, 0x1da0, 0x080c, 0x8065, + 0x0126, 0x2091, 0x8000, 0x080c, 0x865d, 0x012e, 0x009e, 0x00de, + 0x0005, 0x00f6, 0x00e6, 0x00d6, 0x00c6, 0x00a6, 0x0096, 0x0066, + 0x0126, 0x2091, 0x8000, 0x2071, 0x19b6, 0x760c, 0x2660, 0x2678, + 0x8cff, 0x0904, 0x98a0, 0x7024, 0x9c06, 0x1520, 0x2069, 0x0100, + 0x68c0, 0x9005, 0x0904, 0x9877, 0x080c, 0x8fbb, 0x68c3, 0x0000, + 0x080c, 0x9469, 0x7027, 0x0000, 0x0036, 0x2069, 0x0140, 0x6b04, + 0x9384, 0x1000, 0x0138, 0x2001, 0x0100, 0x080c, 0x2987, 0x9006, + 0x080c, 0x2987, 0x2069, 0x0100, 0x6824, 0xd084, 0x0110, 0x6827, + 0x0001, 0x003e, 0x700c, 0x9c36, 0x1110, 0x660c, 0x760e, 0x7008, + 0x9c36, 0x1140, 0x2c00, 0x9f36, 0x0118, 0x2f00, 0x700a, 0x0010, + 0x700b, 0x0000, 0x660c, 0x0066, 0x2c00, 0x9f06, 0x0110, 0x7e0e, + 0x0008, 0x2678, 0x600f, 0x0000, 0x080c, 0xb7e9, 0x1158, 0x080c, + 0x2e55, 0x080c, 0xb7fa, 0x11f0, 0x080c, 0xa364, 0x00d8, 0x080c, + 0x9469, 0x08c0, 0x080c, 0xb7fa, 0x1118, 0x080c, 0xa364, 0x0090, + 0x6014, 0x2048, 0x080c, 0xb5f9, 0x0168, 0x6020, 0x9086, 0x0003, + 0x1520, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, 0x6536, + 0x080c, 0xb7dd, 0x080c, 0xba61, 0x080c, 0x9a06, 0x080c, 0x933f, + 0x00ce, 0x0804, 0x9828, 0x2c78, 0x600c, 0x2060, 0x0804, 0x9828, + 0x700f, 0x0000, 0x700b, 0x0000, 0x012e, 0x006e, 0x009e, 0x00ae, + 0x00ce, 0x00de, 0x00ee, 0x00fe, 0x0005, 0x6020, 0x9086, 0x0006, + 0x1d08, 0x080c, 0xcf91, 0x08f0, 0x00d6, 0x0156, 0x080c, 0x8aef, + 0x7a14, 0x82ff, 0x0138, 0x7003, 0x0100, 0x700b, 0x0003, 0x60c3, + 0x0008, 0x0490, 0x7003, 0x0200, 0x7007, 0x0000, 0x2069, 0x1800, + 0x901e, 0x6800, 0x9086, 0x0004, 0x1110, 0xc38d, 0x0060, 0x080c, + 0x6c53, 0x1110, 0xc3ad, 0x0008, 0xc3a5, 0x6ad4, 0xd29c, 0x1110, + 0xd2ac, 0x0108, 0xc39d, 0x730e, 0x2011, 0x1848, 0x63f0, 0x2312, + 0x20a9, 0x0006, 0x2011, 0x1840, 0x2019, 0x1841, 0x2071, 0x0250, + 0x2376, 0x8e70, 0x2276, 0x8e70, 0x9398, 0x0002, 0x9290, 0x0002, + 0x1f04, 0x98e8, 0x60c3, 0x0020, 0x080c, 0x8f8f, 0x015e, 0x00de, + 0x0005, 0x0156, 0x080c, 0x8aef, 0x7a14, 0x82ff, 0x0168, 0x9286, + 0xffff, 0x0118, 0x9282, 0x000e, 0x1238, 0x7003, 0x0100, 0x700b, + 0x0003, 0x60c3, 0x0008, 0x0488, 0x7003, 0x0200, 0x7007, 0x001c, + 0x700f, 0x0001, 0x2011, 0x198c, 0x2204, 0x8007, 0x701a, 0x8210, + 0x2204, 0x8007, 0x701e, 0x0421, 0x1120, 0xb8a0, 0x9082, 0x007f, + 0x0248, 0x2001, 0x181d, 0x2004, 0x7022, 0x2001, 0x181e, 0x2004, + 0x7026, 0x0030, 0x2001, 0x1816, 0x2004, 0x9084, 0x00ff, 0x7026, + 0x20a9, 0x0004, 0x20e1, 0x0001, 0x2099, 0x1805, 0x20e9, 0x0000, + 0x20a1, 0x0256, 0x4003, 0x60c3, 0x001c, 0x015e, 0x0804, 0x8f8f, + 0x0006, 0x2001, 0x1835, 0x2004, 0xd0ac, 0x000e, 0x0005, 0x2011, + 0x0003, 0x080c, 0x92ec, 0x2011, 0x0002, 0x080c, 0x92f6, 0x080c, + 0x91de, 0x0036, 0x901e, 0x080c, 0x9254, 0x003e, 0x0005, 0x080c, + 0x2f8b, 0x0188, 0x0016, 0x00b6, 0x00c6, 0x7010, 0x9085, 0x0020, + 0x7012, 0x2009, 0x007e, 0x080c, 0x5f7e, 0xb85c, 0xc0ac, 0xb85e, + 0x00ce, 0x00be, 0x001e, 0x0005, 0x2071, 0x1883, 0x7000, 0x9005, + 0x0140, 0x2001, 0x0976, 0x2071, 0x1800, 0x706e, 0x7072, 0x7063, + 0xffe0, 0x2071, 0x1800, 0x706c, 0x704e, 0x7053, 0x1cd0, 0x0005, + 0x00e6, 0x0126, 0x2071, 0x1800, 0x2091, 0x8000, 0x754c, 0x9582, + 0x0010, 0x0608, 0x7050, 0x2060, 0x6000, 0x9086, 0x0000, 0x0148, + 0x9ce0, 0x0018, 0x7060, 0x9c02, 0x1208, 0x0cb0, 0x2061, 0x1cd0, + 0x0c98, 0x6003, 0x0008, 0x8529, 0x754e, 0x9ca8, 0x0018, 0x7060, + 0x9502, 0x1230, 0x7552, 0x9085, 0x0001, 0x012e, 0x00ee, 0x0005, + 0x7053, 0x1cd0, 0x0cc0, 0x9006, 0x0cc0, 0x00e6, 0x2071, 0x1800, + 0x754c, 0x9582, 0x0010, 0x0600, 0x7050, 0x2060, 0x6000, 0x9086, + 0x0000, 0x0148, 0x9ce0, 0x0018, 0x7060, 0x9c02, 0x1208, 0x0cb0, + 0x2061, 0x1cd0, 0x0c98, 0x6003, 0x0008, 0x8529, 0x754e, 0x9ca8, + 0x0018, 0x7060, 0x9502, 0x1228, 0x7552, 0x9085, 0x0001, 0x00ee, + 0x0005, 0x7053, 0x1cd0, 0x0cc8, 0x9006, 0x0cc8, 0x9c82, 0x1cd0, + 0x0a0c, 0x0db2, 0x2001, 0x1818, 0x2004, 0x9c02, 0x1a0c, 0x0db2, + 0x9006, 0x6006, 0x600a, 0x600e, 0x6016, 0x601a, 0x6012, 0x6023, + 0x0000, 0x6003, 0x0000, 0x601e, 0x6056, 0x605a, 0x6026, 0x602a, + 0x602e, 0x6032, 0x6036, 0x603a, 0x603e, 0x6042, 0x2061, 0x1800, + 0x604c, 0x8000, 0x604e, 0x9086, 0x0001, 0x0108, 0x0005, 0x0126, + 0x2091, 0x8000, 0x080c, 0x8582, 0x012e, 0x0cc0, 0x0006, 0x6000, + 0x9086, 0x0000, 0x01b0, 0x601c, 0xd084, 0x190c, 0x1827, 0x6017, + 0x0000, 0x6023, 0x0007, 0x2001, 0x1955, 0x2004, 0x0006, 0x9082, + 0x0051, 0x000e, 0x0208, 0x8004, 0x601a, 0x080c, 0xd240, 0x6043, + 0x0000, 0x000e, 0x0005, 0x00e6, 0x0126, 0x2071, 0x1800, 0x2091, + 0x8000, 0x754c, 0x9582, 0x0001, 0x0608, 0x7050, 0x2060, 0x6000, + 0x9086, 0x0000, 0x0148, 0x9ce0, 0x0018, 0x7060, 0x9c02, 0x1208, + 0x0cb0, 0x2061, 0x1cd0, 0x0c98, 0x6003, 0x0008, 0x8529, 0x754e, + 0x9ca8, 0x0018, 0x7060, 0x9502, 0x1230, 0x7552, 0x9085, 0x0001, + 0x012e, 0x00ee, 0x0005, 0x7053, 0x1cd0, 0x0cc0, 0x9006, 0x0cc0, + 0x6020, 0x9084, 0x000f, 0x0002, 0x9a63, 0x9a6c, 0x9a87, 0x9aa2, + 0xbd12, 0xbd2f, 0xbd4a, 0x9a63, 0x9a6c, 0x9a63, 0x9abe, 0x9a63, + 0x9a63, 0x9a63, 0x9a63, 0x9186, 0x0013, 0x1128, 0x080c, 0x847d, + 0x080c, 0x8582, 0x0005, 0x0005, 0x0066, 0x6000, 0x90b2, 0x0016, + 0x1a0c, 0x0db2, 0x0013, 0x006e, 0x0005, 0x9a85, 0xa1dd, 0xa3ab, + 0x9a85, 0xa439, 0x9d9f, 0x9a85, 0x9a85, 0xa15f, 0xa947, 0x9a85, + 0x9a85, 0x9a85, 0x9a85, 0x9a85, 0x9a85, 0x080c, 0x0db2, 0x0066, + 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0db2, 0x0013, 0x006e, 0x0005, + 0x9aa0, 0xb012, 0x9aa0, 0x9aa0, 0x9aa0, 0x9aa0, 0x9aa0, 0x9aa0, + 0xafb7, 0xb194, 0x9aa0, 0xb053, 0xb0d2, 0xb053, 0xb0d2, 0x9aa0, + 0x080c, 0x0db2, 0x6000, 0x9082, 0x0016, 0x1a0c, 0x0db2, 0x6000, + 0x0002, 0x9abc, 0xa98e, 0xaa73, 0xaba3, 0xad45, 0x9abc, 0x9abc, + 0x9abc, 0xa962, 0xaf43, 0xaf46, 0x9abc, 0x9abc, 0x9abc, 0x9abc, + 0xaf75, 0x9abc, 0x9abc, 0x9abc, 0x080c, 0x0db2, 0x0066, 0x6000, + 0x90b2, 0x0016, 0x1a0c, 0x0db2, 0x0013, 0x006e, 0x0005, 0x9ad7, + 0x9ad7, 0x9b1a, 0x9bb8, 0x9c4c, 0x9ad7, 0x9ad7, 0x9ad7, 0x9ad9, + 0x9ad7, 0x9ad7, 0x9ad7, 0x9ad7, 0x9ad7, 0x9ad7, 0x9ad7, 0x080c, + 0x0db2, 0x9186, 0x004c, 0x0588, 0x9186, 0x0003, 0x190c, 0x0db2, + 0x0096, 0x601c, 0xc0ed, 0x601e, 0x6003, 0x0003, 0x6106, 0x6014, + 0x2048, 0xa87c, 0x9084, 0xa000, 0xc0b5, 0xa87e, 0xa8ac, 0xa846, + 0xa8b0, 0xa84a, 0x9006, 0xa836, 0xa83a, 0xa884, 0x9092, 0x199a, + 0x0210, 0x2001, 0x1999, 0x8003, 0x8013, 0x8213, 0x9210, 0x621a, + 0x009e, 0x2c10, 0x080c, 0x1976, 0x080c, 0x8065, 0x0126, 0x2091, + 0x8000, 0x080c, 0x865d, 0x012e, 0x0005, 0x6010, 0x00b6, 0x2058, + 0xbca0, 0x00be, 0x2c00, 0x080c, 0x9c6e, 0x080c, 0xbd04, 0x6003, + 0x0007, 0x0005, 0x00d6, 0x0096, 0x00f6, 0x2079, 0x1800, 0x7a88, + 0x6014, 0x2048, 0xa87c, 0xd0ec, 0x1110, 0x9290, 0x0018, 0xac78, + 0x0046, 0xa8e0, 0x9005, 0x1140, 0xa8dc, 0x921a, 0x0140, 0x0220, + 0xa87b, 0x0007, 0x2010, 0x0028, 0xa87b, 0x0015, 0x0010, 0xa87b, + 0x0000, 0x8214, 0xa883, 0x0000, 0xaa02, 0x0006, 0x0016, 0x0026, + 0x00c6, 0x00d6, 0x00e6, 0x00f6, 0x2400, 0x9005, 0x1108, 0x009a, + 0x2100, 0x9086, 0x0015, 0x1118, 0x2001, 0x0001, 0x0038, 0x2100, + 0x9086, 0x0016, 0x0118, 0x2001, 0x0001, 0x002a, 0x94a4, 0x0007, + 0x8423, 0x9405, 0x0002, 0x9b80, 0x9b80, 0x9b7b, 0x9b7e, 0x9b80, + 0x9b78, 0x9b6b, 0x9b6b, 0x9b6b, 0x9b6b, 0x9b6b, 0x9b6b, 0x9b6b, + 0x9b6b, 0x9b6b, 0x9b6b, 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e, + 0x001e, 0x000e, 0x004e, 0x00fe, 0x009e, 0x00de, 0x080c, 0x0db2, + 0x080c, 0xa5d7, 0x0028, 0x080c, 0xa6b5, 0x0010, 0x080c, 0xa7a4, + 0x00fe, 0x00ee, 0x00de, 0x00ce, 0x002e, 0x001e, 0x2c00, 0xa896, + 0x000e, 0x080c, 0x9d2c, 0x0530, 0xa804, 0xa80e, 0x00a6, 0x2050, + 0xb100, 0x00ae, 0x8006, 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, + 0xffc0, 0x9080, 0x0002, 0xaacc, 0xabd0, 0xacd4, 0xadd8, 0x2031, + 0x0000, 0x2041, 0x1226, 0x080c, 0x9ed6, 0x0160, 0x000e, 0x9005, + 0x0120, 0x00fe, 0x009e, 0x00de, 0x0005, 0x00fe, 0x009e, 0x00de, + 0x0804, 0x99d6, 0x2001, 0x002c, 0x900e, 0x080c, 0x9d92, 0x0c70, + 0x91b6, 0x0015, 0x0170, 0x91b6, 0x0016, 0x0158, 0x91b2, 0x0047, + 0x0a0c, 0x0db2, 0x91b2, 0x0050, 0x1a0c, 0x0db2, 0x9182, 0x0047, + 0x00ca, 0x2001, 0x0109, 0x2004, 0xd08c, 0x0198, 0x0126, 0x2091, + 0x2800, 0x0006, 0x0016, 0x0026, 0x080c, 0x7fb9, 0x002e, 0x001e, + 0x000e, 0x012e, 0xa001, 0x6000, 0x9086, 0x0002, 0x1110, 0x0804, + 0x9b1a, 0x0005, 0x9beb, 0x9beb, 0x9bed, 0x9c22, 0x9beb, 0x9beb, + 0x9beb, 0x9beb, 0x9c35, 0x080c, 0x0db2, 0x00d6, 0x0016, 0x0096, + 0x080c, 0x8532, 0x080c, 0x865d, 0x6003, 0x0004, 0x6114, 0x2148, + 0xa87c, 0xd0fc, 0x01b8, 0xa878, 0x9005, 0x1158, 0xa894, 0x9005, + 0x0140, 0x2001, 0x0000, 0x900e, 0x080c, 0x9d92, 0x080c, 0x99d6, + 0x00a8, 0x6003, 0x0002, 0xa8a4, 0xa9a8, 0x9105, 0x1178, 0xa8ae, + 0xa8b2, 0x0c78, 0xa87f, 0x0020, 0xa88c, 0xa88a, 0xa8a4, 0xa8ae, + 0xa8a8, 0xa8b2, 0xa8c7, 0x0000, 0xa8cb, 0x0000, 0x009e, 0x001e, + 0x00de, 0x0005, 0x080c, 0x8532, 0x00d6, 0x0096, 0x6114, 0x2148, + 0x080c, 0xb5fb, 0x0120, 0xa87b, 0x0006, 0x080c, 0x6536, 0x009e, + 0x00de, 0x080c, 0x99d6, 0x0804, 0x865d, 0x080c, 0x8532, 0x080c, + 0x2e30, 0x080c, 0xbd01, 0x00d6, 0x0096, 0x6114, 0x2148, 0x080c, + 0xb5fb, 0x0120, 0xa87b, 0x0029, 0x080c, 0x6536, 0x009e, 0x00de, + 0x080c, 0x99d6, 0x0804, 0x865d, 0x9182, 0x0047, 0x0002, 0x9c5c, + 0x9c5e, 0x9c5c, 0x9c5c, 0x9c5c, 0x9c5c, 0x9c5c, 0x9c5c, 0x9c5c, + 0x9c5c, 0x9c5c, 0x9c5c, 0x9c5e, 0x080c, 0x0db2, 0x00d6, 0x0096, + 0x080c, 0x14c9, 0x6114, 0x2148, 0xa87b, 0x0000, 0xa883, 0x0000, + 0x080c, 0x6536, 0x009e, 0x00de, 0x0804, 0x99d6, 0x0026, 0x0036, + 0x0056, 0x0066, 0x0096, 0x00a6, 0x00f6, 0x0006, 0x080c, 0x0fd5, + 0x000e, 0x090c, 0x0db2, 0xa960, 0x21e8, 0xa95c, 0x9188, 0x0019, + 0x21a0, 0x900e, 0x20a9, 0x0020, 0x4104, 0xa87a, 0x2079, 0x1800, + 0x7988, 0x9188, 0x0018, 0x918c, 0x0fff, 0xa972, 0xac76, 0x2950, + 0x00a6, 0x2001, 0x0205, 0x2003, 0x0000, 0x901e, 0x2029, 0x0001, + 0x9182, 0x0034, 0x1228, 0x2011, 0x001f, 0x080c, 0xb219, 0x04c0, + 0x2130, 0x2009, 0x0034, 0x2011, 0x001f, 0x080c, 0xb219, 0x96b2, + 0x0034, 0xb004, 0x904d, 0x0110, 0x080c, 0x0f87, 0x080c, 0x0fd5, + 0x01d0, 0x8528, 0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, 0xb406, + 0x968a, 0x003d, 0x1230, 0x2608, 0x2011, 0x001b, 0x080c, 0xb219, + 0x00b8, 0x96b2, 0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b, + 0x080c, 0xb219, 0x0c18, 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, + 0x852f, 0x95ad, 0x0050, 0xb566, 0xb070, 0xc0fd, 0xb072, 0x0048, + 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0050, + 0xb566, 0x2a48, 0xa804, 0xa807, 0x0000, 0x0006, 0x080c, 0x6536, + 0x000e, 0x2048, 0x9005, 0x1db0, 0x00fe, 0x00ae, 0x009e, 0x006e, + 0x005e, 0x003e, 0x002e, 0x0005, 0x00d6, 0x00f6, 0x0096, 0x0006, + 0x080c, 0x0fd5, 0x000e, 0x090c, 0x0db2, 0xa960, 0x21e8, 0xa95c, + 0x9188, 0x0019, 0x21a0, 0x900e, 0x20a9, 0x0020, 0x4104, 0xaa66, + 0xa87a, 0x2079, 0x1800, 0x7988, 0x810c, 0x9188, 0x000c, 0x9182, + 0x001a, 0x0210, 0x2009, 0x001a, 0x21a8, 0x810b, 0xa972, 0xac76, + 0x2e98, 0xa85c, 0x9080, 0x001f, 0x20a0, 0x2001, 0x0205, 0x200c, + 0x918d, 0x0080, 0x2102, 0x4003, 0x2003, 0x0000, 0x080c, 0x6536, + 0x009e, 0x00fe, 0x00de, 0x0005, 0x0016, 0x00d6, 0x00f6, 0x0096, + 0x0016, 0x2001, 0x0205, 0x200c, 0x918d, 0x0080, 0x2102, 0x001e, + 0x2079, 0x0200, 0x2e98, 0xa87c, 0xd0ec, 0x0118, 0x9e80, 0x000c, + 0x2098, 0x2021, 0x003e, 0x901e, 0x9282, 0x0020, 0x0218, 0x2011, + 0x0020, 0x2018, 0x9486, 0x003e, 0x1170, 0x0096, 0x080c, 0x0fd5, + 0x2900, 0x009e, 0x05c0, 0xa806, 0x2048, 0xa860, 0x20e8, 0xa85c, + 0x9080, 0x0002, 0x20a0, 0x3300, 0x908e, 0x0260, 0x0140, 0x2009, + 0x0280, 0x9102, 0x920a, 0x0218, 0x2010, 0x2100, 0x9318, 0x2200, + 0x9402, 0x1228, 0x2400, 0x9202, 0x2410, 0x9318, 0x9006, 0x2020, + 0x22a8, 0xa800, 0x9200, 0xa802, 0x20e1, 0x0000, 0x4003, 0x83ff, + 0x0180, 0x3300, 0x9086, 0x0280, 0x1130, 0x7814, 0x8000, 0x9085, + 0x0080, 0x7816, 0x2e98, 0x2310, 0x84ff, 0x0904, 0x9d41, 0x0804, + 0x9d43, 0x9085, 0x0001, 0x7817, 0x0000, 0x009e, 0x00fe, 0x00de, + 0x001e, 0x0005, 0x00d6, 0x0036, 0x0096, 0x6314, 0x2348, 0xa87a, + 0xa982, 0x080c, 0x6529, 0x009e, 0x003e, 0x00de, 0x0005, 0x91b6, + 0x0015, 0x1118, 0x080c, 0x99d6, 0x0030, 0x91b6, 0x0016, 0x190c, + 0x0db2, 0x080c, 0x99d6, 0x0005, 0x20a9, 0x000e, 0x20e1, 0x0000, + 0x2e98, 0x6014, 0x0096, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x20a0, + 0x009e, 0x4003, 0x0136, 0x9080, 0x001b, 0x2011, 0x0006, 0x20a9, + 0x0001, 0x3418, 0x8318, 0x23a0, 0x4003, 0x3318, 0x8318, 0x2398, + 0x8211, 0x1db8, 0x2011, 0x0006, 0x013e, 0x20a0, 0x3318, 0x8318, + 0x2398, 0x4003, 0x3418, 0x8318, 0x23a0, 0x8211, 0x1db8, 0x0096, + 0x080c, 0xb5fb, 0x0130, 0x6014, 0x2048, 0xa807, 0x0000, 0xa867, + 0x0103, 0x009e, 0x0804, 0x99d6, 0x0096, 0x00d6, 0x0036, 0x7330, + 0x9386, 0x0200, 0x11a8, 0x6010, 0x00b6, 0x2058, 0xb8bf, 0x0000, + 0x00be, 0x6014, 0x9005, 0x0130, 0x2048, 0xa807, 0x0000, 0xa867, + 0x0103, 0xab32, 0x080c, 0x99d6, 0x003e, 0x00de, 0x009e, 0x0005, + 0x0011, 0x1d48, 0x0cc8, 0x0006, 0x0016, 0x080c, 0xbcec, 0x0188, + 0x6014, 0x9005, 0x1170, 0x600b, 0x0003, 0x601b, 0x0000, 0x6043, + 0x0000, 0x2009, 0x0022, 0x080c, 0xa1b5, 0x9006, 0x001e, 0x000e, + 0x0005, 0x9085, 0x0001, 0x0cd0, 0x0096, 0x0016, 0x20a9, 0x0014, + 0x9e80, 0x000c, 0x20e1, 0x0000, 0x2098, 0x6014, 0x2048, 0xa860, + 0x20e8, 0xa85c, 0x9080, 0x0002, 0x20a0, 0x4003, 0x2001, 0x0205, + 0x2003, 0x0001, 0x2099, 0x0260, 0x20a9, 0x0016, 0x4003, 0x20a9, + 0x000a, 0xa804, 0x2048, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0002, + 0x20a0, 0x4003, 0x2001, 0x0205, 0x2003, 0x0002, 0x2099, 0x0260, + 0x20a9, 0x0020, 0x4003, 0x2003, 0x0000, 0x6014, 0x2048, 0xa800, + 0x2048, 0xa867, 0x0103, 0x080c, 0x99d6, 0x001e, 0x009e, 0x0005, + 0x0096, 0x0016, 0x900e, 0x7030, 0x9086, 0x0100, 0x0140, 0x7038, + 0x9084, 0x00ff, 0x800c, 0x703c, 0x9084, 0x00ff, 0x8004, 0x9080, + 0x0004, 0x9108, 0x810b, 0x2011, 0x0002, 0x2019, 0x000c, 0x6014, + 0x2048, 0x080c, 0xb219, 0x080c, 0xb5fb, 0x0140, 0x6014, 0x2048, + 0xa807, 0x0000, 0xa864, 0xa8e2, 0xa867, 0x0103, 0x080c, 0x99d6, + 0x001e, 0x009e, 0x0005, 0x0016, 0x0096, 0x7030, 0x9086, 0x0100, + 0x1118, 0x2009, 0x0004, 0x0010, 0x7034, 0x800c, 0x810b, 0x2011, + 0x000c, 0x2019, 0x000c, 0x6014, 0x2048, 0xa804, 0x0096, 0x9005, + 0x0108, 0x2048, 0x080c, 0xb219, 0x009e, 0x080c, 0xb5fb, 0x0148, + 0xa804, 0x9005, 0x1158, 0xa807, 0x0000, 0xa864, 0xa8e2, 0xa867, + 0x0103, 0x080c, 0x99d6, 0x009e, 0x001e, 0x0005, 0x0086, 0x2040, + 0xa030, 0x8007, 0x9086, 0x0100, 0x1118, 0x080c, 0xa364, 0x00e0, + 0xa034, 0x8007, 0x800c, 0x8806, 0x8006, 0x8007, 0x90bc, 0x003f, + 0x9084, 0xffc0, 0x9080, 0x000c, 0xa87b, 0x0000, 0xa883, 0x0000, + 0xa897, 0x4000, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, + 0x2041, 0x120c, 0x0019, 0x0d08, 0x008e, 0x0898, 0x0096, 0x0006, + 0x080c, 0x0fd5, 0x000e, 0x01b0, 0xa8ab, 0x0dcb, 0xa876, 0x000e, + 0xa8a2, 0x0006, 0xae6a, 0x2800, 0xa89e, 0xa97a, 0xaf72, 0xaa8e, + 0xab92, 0xac96, 0xad9a, 0x0086, 0x2940, 0x080c, 0x10b5, 0x008e, + 0x9085, 0x0001, 0x009e, 0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008, + 0x9084, 0x00ff, 0x6210, 0x00b6, 0x2258, 0xba10, 0x00be, 0x9206, + 0x1520, 0x700c, 0x6210, 0x00b6, 0x2258, 0xba14, 0x00be, 0x9206, + 0x11e0, 0x6043, 0x0000, 0x2c68, 0x0016, 0x2009, 0x0035, 0x080c, + 0xbc66, 0x001e, 0x1158, 0x622c, 0x2268, 0x2071, 0x026c, 0x6b20, + 0x9386, 0x0003, 0x0130, 0x9386, 0x0006, 0x0128, 0x080c, 0x99d6, + 0x0020, 0x0039, 0x0010, 0x080c, 0x9fe8, 0x002e, 0x00de, 0x00ee, + 0x0005, 0x0096, 0x6814, 0x2048, 0x9186, 0x0015, 0x0904, 0x9fd0, + 0x918e, 0x0016, 0x1904, 0x9fe6, 0x700c, 0x908c, 0xff00, 0x9186, + 0x1700, 0x0120, 0x9186, 0x0300, 0x1904, 0x9faa, 0x89ff, 0x1138, + 0x6800, 0x9086, 0x000f, 0x0904, 0x9f8d, 0x0804, 0x9fe4, 0x6808, + 0x9086, 0xffff, 0x1904, 0x9fd2, 0xa87c, 0x9084, 0x0060, 0x9086, + 0x0020, 0x1128, 0xa83c, 0xa940, 0x9105, 0x1904, 0x9fd2, 0x6824, + 0xd0b4, 0x1904, 0x9fd2, 0x080c, 0xb7dd, 0x685c, 0xa882, 0xa87c, + 0xc0dc, 0xc0f4, 0xc0d4, 0xa87e, 0x0026, 0x900e, 0x6a18, 0x2001, + 0x000a, 0x080c, 0x7e7f, 0xa884, 0x920a, 0x0208, 0x8011, 0xaa86, + 0x82ff, 0x002e, 0x1138, 0x00c6, 0x2d60, 0x080c, 0xb33a, 0x00ce, + 0x0804, 0x9fe4, 0x00c6, 0xa868, 0xd0fc, 0x1118, 0x080c, 0x5a9d, + 0x0010, 0x080c, 0x5e34, 0x00ce, 0x1904, 0x9fd2, 0x00c6, 0x2d60, + 0x080c, 0x99d6, 0x00ce, 0x0804, 0x9fe4, 0x00c6, 0x080c, 0x9a23, + 0x0198, 0x6017, 0x0000, 0x6810, 0x6012, 0x080c, 0xba69, 0x6023, + 0x0003, 0x6904, 0x00c6, 0x2d60, 0x080c, 0x99d6, 0x00ce, 0x080c, + 0x9a50, 0x00ce, 0x0804, 0x9fe4, 0x2001, 0x1957, 0x2004, 0x6842, + 0x00ce, 0x04d0, 0x7008, 0x9086, 0x000b, 0x11c8, 0x6010, 0x00b6, + 0x2058, 0xb900, 0xc1bc, 0xb902, 0x00be, 0x00c6, 0x2d60, 0xa883, + 0x0003, 0x080c, 0xbca8, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, + 0x0002, 0x080c, 0x8000, 0x080c, 0x8582, 0x00ce, 0x00e8, 0x700c, + 0x9086, 0x2a00, 0x1138, 0x2001, 0x1957, 0x2004, 0x6842, 0x00a0, + 0x0479, 0x00a0, 0x89ff, 0x090c, 0x0db2, 0x00c6, 0x00d6, 0x2d60, + 0xa867, 0x0103, 0xa87b, 0x0003, 0x080c, 0x6351, 0x080c, 0xb7dd, + 0x080c, 0x9a06, 0x00de, 0x00ce, 0x080c, 0x99d6, 0x009e, 0x0005, + 0x9186, 0x0015, 0x1128, 0x2001, 0x1957, 0x2004, 0x6842, 0x0068, + 0x918e, 0x0016, 0x1160, 0x00c6, 0x2d00, 0x2060, 0x080c, 0xd240, + 0x080c, 0x7e13, 0x080c, 0x99d6, 0x00ce, 0x080c, 0x99d6, 0x0005, + 0x0026, 0x0036, 0x0046, 0x7228, 0xacb0, 0xabac, 0xd2f4, 0x0130, + 0x2001, 0x1957, 0x2004, 0x6842, 0x0804, 0xa064, 0x00c6, 0x2d60, + 0x080c, 0xb244, 0x00ce, 0x6804, 0x9086, 0x0050, 0x1170, 0x00c6, + 0x2d00, 0x2060, 0x6003, 0x0001, 0x6007, 0x0050, 0x080c, 0x8000, + 0x080c, 0x8582, 0x00ce, 0x0804, 0xa064, 0x6800, 0x9086, 0x000f, + 0x01b0, 0x89ff, 0x090c, 0x0db2, 0x6800, 0x9086, 0x0004, 0x1198, + 0xa87c, 0xd0ac, 0x0180, 0xa843, 0x0fff, 0xa83f, 0x0fff, 0xa880, + 0xc0f4, 0xc0fc, 0xa882, 0x2001, 0x0001, 0x6832, 0x0400, 0x2001, + 0x0007, 0x6832, 0x00e0, 0xa87c, 0xd0b4, 0x1150, 0xd0ac, 0x0db8, + 0x6824, 0xd0f4, 0x1d40, 0xa838, 0xa934, 0x9105, 0x0d80, 0x0c18, + 0xd2ec, 0x1d68, 0x7024, 0x9306, 0x1118, 0x7020, 0x9406, 0x0d38, + 0x7020, 0x683e, 0x7024, 0x683a, 0x2001, 0x0005, 0x6832, 0x080c, + 0xb960, 0x080c, 0x8582, 0x0010, 0x080c, 0x99d6, 0x004e, 0x003e, + 0x002e, 0x0005, 0x00e6, 0x00d6, 0x0026, 0x7008, 0x9084, 0x00ff, + 0x6210, 0x00b6, 0x2258, 0xba10, 0x00be, 0x9206, 0x1904, 0xa0cf, + 0x700c, 0x6210, 0x00b6, 0x2258, 0xba14, 0x00be, 0x9206, 0x1904, + 0xa0cf, 0x6038, 0x2068, 0x6824, 0xc0dc, 0x6826, 0x6a20, 0x9286, + 0x0007, 0x0904, 0xa0cf, 0x9286, 0x0002, 0x0904, 0xa0cf, 0x9286, + 0x0000, 0x05e8, 0x6808, 0x633c, 0x9306, 0x15c8, 0x2071, 0x026c, + 0x9186, 0x0015, 0x0570, 0x918e, 0x0016, 0x1100, 0x00c6, 0x6038, + 0x2060, 0x6104, 0x9186, 0x004b, 0x01c0, 0x9186, 0x004c, 0x01a8, + 0x9186, 0x004d, 0x0190, 0x9186, 0x004e, 0x0178, 0x9186, 0x0052, + 0x0160, 0x6014, 0x0096, 0x2048, 0x080c, 0xb5fb, 0x090c, 0x0db2, + 0xa883, 0x0003, 0x009e, 0x080c, 0xbca8, 0x6007, 0x0085, 0x6003, + 0x000b, 0x6023, 0x0002, 0x080c, 0x8000, 0x080c, 0x8582, 0x00ce, + 0x0030, 0x6038, 0x2070, 0x2001, 0x1957, 0x2004, 0x7042, 0x080c, + 0x99d6, 0x002e, 0x00de, 0x00ee, 0x0005, 0x00b6, 0x0096, 0x00f6, + 0x6014, 0x2048, 0x6010, 0x2058, 0x91b6, 0x0015, 0x0130, 0xba08, + 0xbb0c, 0xbc00, 0xc48c, 0xbc02, 0x0460, 0x0096, 0x0156, 0x0036, + 0x0026, 0x2b48, 0x9e90, 0x0010, 0x2019, 0x000a, 0x20a9, 0x0004, + 0x080c, 0xa91d, 0x002e, 0x003e, 0x015e, 0x009e, 0x1904, 0xa13e, + 0x0096, 0x0156, 0x0036, 0x0026, 0x2b48, 0x9e90, 0x0014, 0x2019, + 0x0006, 0x20a9, 0x0004, 0x080c, 0xa91d, 0x002e, 0x003e, 0x015e, + 0x009e, 0x15a0, 0x7238, 0xba0a, 0x733c, 0xbb0e, 0xbc00, 0xc48d, + 0xbc02, 0xa804, 0x9005, 0x1128, 0x00fe, 0x009e, 0x00be, 0x0804, + 0x9dd7, 0x0096, 0x2048, 0xaa12, 0xab16, 0xac0a, 0x009e, 0x8006, + 0x8006, 0x8007, 0x90bc, 0x003f, 0x9084, 0xffc0, 0x9080, 0x0002, + 0x2009, 0x002b, 0xaaa0, 0xab9c, 0xaca8, 0xada4, 0x2031, 0x0000, + 0x2041, 0x120c, 0x080c, 0x9ed6, 0x0130, 0x00fe, 0x009e, 0x080c, + 0x99d6, 0x00be, 0x0005, 0x080c, 0xa364, 0x0cb8, 0x2b78, 0x00f6, + 0x080c, 0x2e30, 0x080c, 0xbd01, 0x00fe, 0x00c6, 0x080c, 0x9980, + 0x2f00, 0x6012, 0x6017, 0x0000, 0x6023, 0x0001, 0x6007, 0x0001, + 0x6003, 0x0001, 0x2001, 0x0007, 0x080c, 0x5ecf, 0x080c, 0x5efb, + 0x080c, 0x8048, 0x080c, 0x8582, 0x00ce, 0x0804, 0xa111, 0x2100, + 0x91b2, 0x0053, 0x1a0c, 0x0db2, 0x91b2, 0x0040, 0x1a04, 0xa1c7, + 0x0002, 0xa1b5, 0xa1b5, 0xa1ab, 0xa1b5, 0xa1b5, 0xa1b5, 0xa1a9, + 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, + 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, + 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, + 0xa1b5, 0xa1a9, 0xa1b5, 0xa1b5, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, + 0xa1a9, 0xa1ab, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, + 0xa1a9, 0xa1a9, 0xa1a9, 0xa1b5, 0xa1b5, 0xa1a9, 0xa1a9, 0xa1a9, + 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1a9, 0xa1b5, 0xa1a9, + 0xa1a9, 0x080c, 0x0db2, 0x0066, 0x00b6, 0x6610, 0x2658, 0xb8bc, + 0xc08c, 0xb8be, 0x00be, 0x006e, 0x0000, 0x6003, 0x0001, 0x6106, + 0x9186, 0x0032, 0x0118, 0x080c, 0x8048, 0x0010, 0x080c, 0x8000, + 0x0126, 0x2091, 0x8000, 0x080c, 0x8582, 0x012e, 0x0005, 0x2600, + 0x0002, 0xa1db, 0xa1db, 0xa1db, 0xa1b5, 0xa1b5, 0xa1db, 0xa1db, + 0xa1db, 0xa1db, 0xa1b5, 0xa1db, 0xa1b5, 0xa1db, 0xa1b5, 0xa1db, + 0xa1db, 0xa1db, 0xa1db, 0x080c, 0x0db2, 0x6004, 0x90b2, 0x0053, + 0x1a0c, 0x0db2, 0x91b6, 0x0013, 0x0904, 0xa29f, 0x91b6, 0x0027, + 0x1904, 0xa25a, 0x080c, 0x847d, 0x6004, 0x080c, 0xb7e9, 0x01b0, + 0x080c, 0xb7fa, 0x01a8, 0x908e, 0x0021, 0x0904, 0xa257, 0x908e, + 0x0022, 0x1130, 0x080c, 0x9e03, 0x0904, 0xa253, 0x0804, 0xa254, + 0x908e, 0x003d, 0x0904, 0xa257, 0x0804, 0xa24d, 0x080c, 0x2e55, + 0x2001, 0x0007, 0x080c, 0x5ecf, 0x6010, 0x00b6, 0x2058, 0xb9a0, + 0x00be, 0x080c, 0xa364, 0x9186, 0x007e, 0x1148, 0x2001, 0x1835, + 0x2014, 0xc285, 0x080c, 0x6c53, 0x1108, 0xc2ad, 0x2202, 0x0036, + 0x0026, 0x2019, 0x0028, 0x2110, 0x080c, 0xd29b, 0x002e, 0x003e, + 0x0016, 0x0026, 0x0036, 0x2110, 0x2019, 0x0028, 0x080c, 0x8180, + 0x0076, 0x903e, 0x080c, 0x8078, 0x6010, 0x00b6, 0x905d, 0x0100, + 0x00be, 0x2c08, 0x080c, 0xcd62, 0x007e, 0x003e, 0x002e, 0x001e, + 0x080c, 0xbd01, 0x0016, 0x080c, 0xba61, 0x080c, 0x99d6, 0x001e, + 0x080c, 0x2f28, 0x080c, 0x8582, 0x0030, 0x080c, 0xba61, 0x080c, + 0x99d6, 0x080c, 0x8582, 0x0005, 0x080c, 0xa364, 0x0cb0, 0x080c, + 0xa3a0, 0x0c98, 0x9186, 0x0014, 0x1db0, 0x080c, 0x847d, 0x6004, + 0x908e, 0x0022, 0x1118, 0x080c, 0x9e03, 0x0d68, 0x080c, 0x2e30, + 0x080c, 0xbd01, 0x080c, 0xb7e9, 0x1190, 0x080c, 0x2e55, 0x6010, + 0x00b6, 0x2058, 0xb9a0, 0x00be, 0x080c, 0xa364, 0x9186, 0x007e, + 0x1128, 0x2001, 0x1835, 0x200c, 0xc185, 0x2102, 0x0870, 0x080c, + 0xb7fa, 0x1118, 0x080c, 0xa364, 0x0840, 0x6004, 0x908e, 0x0032, + 0x1160, 0x00e6, 0x00f6, 0x2071, 0x1894, 0x2079, 0x0000, 0x080c, + 0x31c3, 0x00fe, 0x00ee, 0x0804, 0xa24d, 0x6004, 0x908e, 0x0021, + 0x0d48, 0x908e, 0x0022, 0x090c, 0xa364, 0x0804, 0xa24d, 0x90b2, + 0x0040, 0x1a04, 0xa34d, 0x2008, 0x0002, 0xa2e7, 0xa2e8, 0xa2eb, + 0xa2ee, 0xa2f1, 0xa2f4, 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, + 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, + 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, + 0xa2e5, 0xa2e5, 0xa2e5, 0xa2f7, 0xa302, 0xa2e5, 0xa304, 0xa302, + 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, 0xa302, 0xa302, 0xa2e5, + 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, 0xa2e5, 0xa334, + 0xa302, 0xa2e5, 0xa2fe, 0xa2e5, 0xa2e5, 0xa2e5, 0xa2ff, 0xa2e5, + 0xa2e5, 0xa2e5, 0xa302, 0xa32b, 0xa2e5, 0x080c, 0x0db2, 0x00d0, + 0x2001, 0x000b, 0x0410, 0x2001, 0x0003, 0x00f8, 0x2001, 0x0005, + 0x00e0, 0x2001, 0x0001, 0x00c8, 0x2001, 0x0009, 0x00b0, 0x080c, + 0x847d, 0x6003, 0x0005, 0x080c, 0x8582, 0x0070, 0x0018, 0x0010, + 0x080c, 0x5ecf, 0x0804, 0xa345, 0x080c, 0x847d, 0x080c, 0xbd04, + 0x6003, 0x0004, 0x080c, 0x8582, 0x0005, 0x080c, 0x5ecf, 0x080c, + 0x847d, 0x6003, 0x0002, 0x0036, 0x2019, 0x185e, 0x2304, 0x9084, + 0xff00, 0x1120, 0x2001, 0x1955, 0x201c, 0x0040, 0x8007, 0x909a, + 0x0004, 0x0ec0, 0x8003, 0x801b, 0x831b, 0x9318, 0x631a, 0x003e, + 0x080c, 0x8582, 0x0c08, 0x080c, 0x847d, 0x080c, 0xba61, 0x080c, + 0x99d6, 0x080c, 0x8582, 0x08c0, 0x00e6, 0x00f6, 0x2071, 0x1894, + 0x2079, 0x0000, 0x080c, 0x31c3, 0x00fe, 0x00ee, 0x080c, 0x847d, + 0x080c, 0x99d6, 0x080c, 0x8582, 0x0838, 0x080c, 0x847d, 0x6003, + 0x0002, 0x080c, 0xbd04, 0x0804, 0x8582, 0x2600, 0x2008, 0x0002, + 0xa362, 0xa362, 0xa362, 0xa345, 0xa345, 0xa362, 0xa362, 0xa362, + 0xa362, 0xa345, 0xa362, 0xa345, 0xa362, 0xa345, 0xa362, 0xa362, + 0xa362, 0xa362, 0x080c, 0x0db2, 0x00e6, 0x0096, 0x0026, 0x0016, + 0x080c, 0xb5fb, 0x0568, 0x6014, 0x2048, 0xa864, 0x9086, 0x0139, + 0x11a8, 0xa894, 0x9086, 0x0056, 0x1148, 0x080c, 0x4ebc, 0x0130, + 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x0028, 0x2001, 0x0030, + 0x900e, 0x2011, 0x4005, 0x080c, 0xbbcd, 0x0090, 0xa868, 0xd0fc, + 0x0178, 0xa807, 0x0000, 0x0016, 0x6004, 0x908e, 0x0021, 0x0168, + 0x908e, 0x003d, 0x0150, 0x001e, 0xa867, 0x0103, 0xa833, 0x0100, + 0x001e, 0x002e, 0x009e, 0x00ee, 0x0005, 0x001e, 0x0009, 0x0cc0, + 0x0096, 0x6014, 0x2048, 0xa800, 0x2048, 0xa867, 0x0103, 0xa823, + 0x8001, 0x009e, 0x0005, 0x00b6, 0x6610, 0x2658, 0xb804, 0x9084, + 0x00ff, 0x90b2, 0x000c, 0x1a0c, 0x0db2, 0x6604, 0x96b6, 0x004d, + 0x1120, 0x080c, 0xbaed, 0x0804, 0xa428, 0x6604, 0x96b6, 0x0043, + 0x1120, 0x080c, 0xbb36, 0x0804, 0xa428, 0x6604, 0x96b6, 0x004b, + 0x1120, 0x080c, 0xbb62, 0x0804, 0xa428, 0x6604, 0x96b6, 0x0033, + 0x1120, 0x080c, 0xba83, 0x0804, 0xa428, 0x6604, 0x96b6, 0x0028, + 0x1120, 0x080c, 0xb833, 0x0804, 0xa428, 0x6604, 0x96b6, 0x0029, + 0x1120, 0x080c, 0xb874, 0x0804, 0xa428, 0x6604, 0x96b6, 0x001f, + 0x1118, 0x080c, 0x9dac, 0x04e0, 0x6604, 0x96b6, 0x0000, 0x1118, + 0x080c, 0xa0d5, 0x04a8, 0x6604, 0x96b6, 0x0022, 0x1118, 0x080c, + 0x9de4, 0x0470, 0x6604, 0x96b6, 0x0035, 0x1118, 0x080c, 0x9ef4, + 0x0438, 0x6604, 0x96b6, 0x0039, 0x1118, 0x080c, 0xa06a, 0x0400, + 0x6604, 0x96b6, 0x003d, 0x1118, 0x080c, 0x9e1c, 0x00c8, 0x6604, + 0x96b6, 0x0044, 0x1118, 0x080c, 0x9e58, 0x0090, 0x6604, 0x96b6, + 0x0049, 0x1118, 0x080c, 0x9e83, 0x0058, 0x91b6, 0x0015, 0x1110, + 0x0063, 0x0030, 0x91b6, 0x0016, 0x1128, 0x00be, 0x0804, 0xa65e, + 0x00be, 0x0005, 0x080c, 0x9a6b, 0x0cd8, 0xa445, 0xa448, 0xa445, + 0xa48d, 0xa445, 0xa5d7, 0xa66b, 0xa445, 0xa445, 0xa638, 0xa445, + 0xa64c, 0x0096, 0x080c, 0x14c9, 0x6014, 0x2048, 0xa800, 0x2048, + 0xa867, 0x0103, 0x009e, 0x0804, 0x99d6, 0xa001, 0xa001, 0x0005, + 0x00e6, 0x2071, 0x1800, 0x7088, 0x9086, 0x0074, 0x1540, 0x080c, + 0xcd33, 0x11b0, 0x6010, 0x00b6, 0x2058, 0x7030, 0xd08c, 0x0128, + 0xb800, 0xd0bc, 0x0110, 0xc0c5, 0xb802, 0x00e9, 0x00be, 0x2001, + 0x0006, 0x080c, 0x5ecf, 0x080c, 0x2e55, 0x080c, 0x99d6, 0x0088, + 0x2001, 0x000a, 0x080c, 0x5ecf, 0x080c, 0x2e55, 0x6003, 0x0001, + 0x6007, 0x0001, 0x080c, 0x8048, 0x080c, 0x8582, 0x0010, 0x080c, + 0xa5c2, 0x00ee, 0x0005, 0x00d6, 0xb800, 0xd084, 0x0160, 0x9006, + 0x080c, 0x5ebb, 0x2069, 0x1853, 0x6804, 0xd0a4, 0x0120, 0x2001, + 0x0006, 0x080c, 0x5efb, 0x00de, 0x0005, 0x00b6, 0x0096, 0x00d6, + 0x2011, 0x1822, 0x2204, 0x9086, 0x0074, 0x1904, 0xa59b, 0x6010, + 0x2058, 0xbaa0, 0x9286, 0x007e, 0x1120, 0x080c, 0xa7af, 0x0804, + 0xa4ff, 0x080c, 0xa7a4, 0x6010, 0x2058, 0xbaa0, 0x9286, 0x0080, + 0x1510, 0x6014, 0x9005, 0x01a8, 0x2048, 0xa864, 0x9084, 0x00ff, + 0x9086, 0x0039, 0x1140, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, + 0x080c, 0xbbcd, 0x0030, 0xa807, 0x0000, 0xa867, 0x0103, 0xa833, + 0x0200, 0x2001, 0x0006, 0x080c, 0x5ecf, 0x080c, 0x2e55, 0x080c, + 0x99d6, 0x0804, 0xa59c, 0x080c, 0xa5aa, 0x6014, 0x9005, 0x0190, + 0x2048, 0xa868, 0xd0f4, 0x01e8, 0xa864, 0x9084, 0x00ff, 0x9086, + 0x0039, 0x1d08, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x080c, + 0xbbcd, 0x08f8, 0x080c, 0xa5a0, 0x0160, 0x9006, 0x080c, 0x5ebb, + 0x2001, 0x0004, 0x080c, 0x5efb, 0x2001, 0x0007, 0x080c, 0x5ecf, + 0x08a0, 0x2001, 0x0004, 0x080c, 0x5ecf, 0x6003, 0x0001, 0x6007, + 0x0003, 0x080c, 0x8048, 0x080c, 0x8582, 0x0804, 0xa59c, 0xb85c, + 0xd0e4, 0x01d8, 0x080c, 0xba03, 0x080c, 0x6c53, 0x0118, 0xd0dc, + 0x1904, 0xa4c1, 0x2011, 0x1835, 0x2204, 0xc0ad, 0x2012, 0x2001, + 0x193e, 0x2004, 0x00f6, 0x2079, 0x0100, 0x78e3, 0x0000, 0x080c, + 0x254a, 0x78e2, 0x00fe, 0x0804, 0xa4c1, 0x080c, 0xba40, 0x2011, + 0x1835, 0x2204, 0xc0a5, 0x2012, 0x0006, 0x080c, 0xce81, 0x000e, + 0x1904, 0xa4c1, 0xc0b5, 0x2012, 0x2001, 0x0006, 0x080c, 0x5ecf, + 0x9006, 0x080c, 0x5ebb, 0x00c6, 0x2001, 0x180e, 0x2004, 0xd09c, + 0x0520, 0x00f6, 0x2079, 0x0100, 0x00e6, 0x2071, 0x1800, 0x700c, + 0x9084, 0x00ff, 0x78e6, 0x7076, 0x7010, 0x78ea, 0x707a, 0x908c, + 0x00ff, 0x00ee, 0x780c, 0xc0b5, 0x780e, 0x00fe, 0x080c, 0x251f, + 0x00f6, 0x2100, 0x900e, 0x080c, 0x24d6, 0x7956, 0x00fe, 0x9186, + 0x0081, 0x01d8, 0x2009, 0x0081, 0x00c8, 0x2009, 0x00ef, 0x00f6, + 0x2079, 0x0100, 0x79ea, 0x7932, 0x7936, 0x780c, 0xc0b5, 0x780e, + 0x00fe, 0x080c, 0x251f, 0x00f6, 0x2079, 0x1800, 0x797a, 0x2100, + 0x900e, 0x080c, 0x24d6, 0x7956, 0x00fe, 0x8108, 0x080c, 0x5f1e, + 0x2b00, 0x00ce, 0x1904, 0xa4c1, 0x6012, 0x2009, 0x180e, 0x210c, + 0xd19c, 0x0150, 0x2009, 0x027c, 0x210c, 0x918c, 0x00ff, 0xb912, + 0x2009, 0x027d, 0x210c, 0xb916, 0x2001, 0x0002, 0x080c, 0x5ecf, + 0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x8048, + 0x080c, 0x8582, 0x0008, 0x0431, 0x00de, 0x009e, 0x00be, 0x0005, + 0x2001, 0x180f, 0x2004, 0xd0a4, 0x0120, 0x2001, 0x1854, 0x2004, + 0xd0ac, 0x0005, 0x00e6, 0x080c, 0xd2f4, 0x0190, 0x2071, 0x0260, + 0x7108, 0x720c, 0x918c, 0x00ff, 0x1118, 0x9284, 0xff00, 0x0140, + 0x6010, 0x2058, 0xb8a0, 0x9084, 0xff80, 0x1110, 0xb912, 0xba16, + 0x00ee, 0x0005, 0x2030, 0x2001, 0x0007, 0x080c, 0x5ecf, 0x080c, + 0x5127, 0x1120, 0x2001, 0x0007, 0x080c, 0x5efb, 0x080c, 0x2e55, + 0x6020, 0x9086, 0x000a, 0x1108, 0x0005, 0x0804, 0x99d6, 0x00b6, + 0x00e6, 0x0026, 0x0016, 0x2071, 0x1800, 0x7088, 0x9086, 0x0014, + 0x1904, 0xa62f, 0x080c, 0x5127, 0x1170, 0x6014, 0x9005, 0x1158, + 0x0036, 0x0046, 0x6010, 0x2058, 0xbba0, 0x2021, 0x0006, 0x080c, + 0x4829, 0x004e, 0x003e, 0x00d6, 0x6010, 0x2058, 0x080c, 0x6019, + 0x080c, 0xa47b, 0x00de, 0x080c, 0xa875, 0x1588, 0x6010, 0x2058, + 0xb890, 0x9005, 0x0560, 0x2001, 0x0006, 0x080c, 0x5ecf, 0x0096, + 0x6014, 0x904d, 0x01d0, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, + 0x1140, 0x2001, 0x0000, 0x900e, 0x2011, 0x4000, 0x080c, 0xbbcd, + 0x0060, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0029, 0x0130, 0xa807, + 0x0000, 0xa867, 0x0103, 0xa833, 0x0200, 0x009e, 0x080c, 0x2e55, + 0x6020, 0x9086, 0x000a, 0x0138, 0x080c, 0x99d6, 0x0020, 0x080c, + 0xa364, 0x080c, 0xa5c2, 0x001e, 0x002e, 0x00ee, 0x00be, 0x0005, + 0x2011, 0x1822, 0x2204, 0x9086, 0x0014, 0x1160, 0x2001, 0x0002, + 0x080c, 0x5ecf, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x8048, + 0x0804, 0x8582, 0x0804, 0xa5c2, 0x2030, 0x2011, 0x1822, 0x2204, + 0x9086, 0x0004, 0x1148, 0x96b6, 0x000b, 0x1120, 0x2001, 0x0007, + 0x080c, 0x5ecf, 0x0804, 0x99d6, 0x0804, 0xa5c2, 0x0002, 0xa445, + 0xa676, 0xa445, 0xa6b5, 0xa445, 0xa760, 0xa66b, 0xa445, 0xa445, + 0xa773, 0xa445, 0xa783, 0x6604, 0x9686, 0x0003, 0x0904, 0xa5d7, + 0x96b6, 0x001e, 0x1110, 0x080c, 0x99d6, 0x0005, 0x00b6, 0x00d6, + 0x00c6, 0x080c, 0xa793, 0x11a0, 0x9006, 0x080c, 0x5ebb, 0x080c, + 0x2e30, 0x080c, 0xbd01, 0x2001, 0x0002, 0x080c, 0x5ecf, 0x6003, + 0x0001, 0x6007, 0x0002, 0x080c, 0x8048, 0x080c, 0x8582, 0x0408, + 0x2009, 0x026e, 0x2104, 0x9086, 0x0009, 0x1160, 0x6010, 0x2058, + 0xb840, 0x9084, 0x00ff, 0x9005, 0x0170, 0x8001, 0xb842, 0x601b, + 0x000a, 0x0078, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x9086, + 0x1900, 0x1108, 0x08a0, 0x080c, 0x2e30, 0x080c, 0xbd01, 0x080c, + 0xa5c2, 0x00ce, 0x00de, 0x00be, 0x0005, 0x0096, 0x00b6, 0x0026, + 0x9016, 0x080c, 0xa7a1, 0x00d6, 0x2069, 0x194d, 0x2d04, 0x9005, + 0x0168, 0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e, 0x1138, 0x2069, + 0x181e, 0x2d04, 0x8000, 0x206a, 0x00de, 0x0010, 0x00de, 0x0088, + 0x9006, 0x080c, 0x5ebb, 0x2001, 0x0002, 0x080c, 0x5ecf, 0x6003, + 0x0001, 0x6007, 0x0002, 0x080c, 0x8048, 0x080c, 0x8582, 0x0804, + 0xa730, 0x080c, 0xb5fb, 0x01b0, 0x6014, 0x2048, 0xa864, 0x2010, + 0x9086, 0x0139, 0x1138, 0x6007, 0x0016, 0x2001, 0x0002, 0x080c, + 0xbc27, 0x00b0, 0x6014, 0x2048, 0xa864, 0xd0fc, 0x0118, 0x2001, + 0x0001, 0x0ca8, 0x2001, 0x180d, 0x2004, 0xd0dc, 0x0148, 0x6010, + 0x2058, 0xb840, 0x9084, 0x00ff, 0x9005, 0x1110, 0x9006, 0x0c38, + 0x080c, 0xa364, 0x2009, 0x026e, 0x2134, 0x96b4, 0x00ff, 0x9686, + 0x0005, 0x0510, 0x9686, 0x000b, 0x01c8, 0x2009, 0x026f, 0x2104, + 0x9084, 0xff00, 0x1118, 0x9686, 0x0009, 0x01b0, 0x9086, 0x1900, + 0x1168, 0x9686, 0x0009, 0x0180, 0x2001, 0x0004, 0x080c, 0x5ecf, + 0x2001, 0x0028, 0x601a, 0x6007, 0x0052, 0x0010, 0x080c, 0xa5c2, + 0x002e, 0x00be, 0x009e, 0x0005, 0x9286, 0x0139, 0x0160, 0x6014, + 0x2048, 0x080c, 0xb5fb, 0x0140, 0xa864, 0x9086, 0x0139, 0x0118, + 0xa868, 0xd0fc, 0x0108, 0x0c50, 0x6010, 0x2058, 0xb840, 0x9084, + 0x00ff, 0x9005, 0x0138, 0x8001, 0xb842, 0x601b, 0x000a, 0x6007, + 0x0016, 0x08f0, 0xb8a0, 0x9086, 0x007e, 0x1138, 0x00e6, 0x2071, + 0x1800, 0x080c, 0x59b4, 0x00ee, 0x0010, 0x080c, 0x2e30, 0x0870, + 0x080c, 0xa7a1, 0x1160, 0x2001, 0x0004, 0x080c, 0x5ecf, 0x6003, + 0x0001, 0x6007, 0x0003, 0x080c, 0x8048, 0x0804, 0x8582, 0x080c, + 0xa364, 0x0804, 0xa5c2, 0x0469, 0x1160, 0x2001, 0x0008, 0x080c, + 0x5ecf, 0x6003, 0x0001, 0x6007, 0x0005, 0x080c, 0x8048, 0x0804, + 0x8582, 0x0804, 0xa5c2, 0x00e9, 0x1160, 0x2001, 0x000a, 0x080c, + 0x5ecf, 0x6003, 0x0001, 0x6007, 0x0001, 0x080c, 0x8048, 0x0804, + 0x8582, 0x0804, 0xa5c2, 0x2009, 0x026e, 0x2104, 0x9086, 0x0003, + 0x1138, 0x2009, 0x026f, 0x2104, 0x9084, 0xff00, 0x9086, 0x2a00, + 0x0005, 0x9085, 0x0001, 0x0005, 0x00b6, 0x00c6, 0x0016, 0x6110, + 0x2158, 0x080c, 0x5f8d, 0x001e, 0x00ce, 0x00be, 0x0005, 0x00b6, + 0x00f6, 0x00e6, 0x00d6, 0x0036, 0x0016, 0x6010, 0x2058, 0x2009, + 0x1835, 0x2104, 0x9085, 0x0003, 0x200a, 0x080c, 0xa847, 0x0560, + 0x2009, 0x1835, 0x2104, 0xc0cd, 0x200a, 0x080c, 0x62a0, 0x0158, + 0x9006, 0x2020, 0x2009, 0x002a, 0x080c, 0xcfe6, 0x2001, 0x180c, + 0x200c, 0xc195, 0x2102, 0x2019, 0x002a, 0x2009, 0x0001, 0x080c, + 0x2dfb, 0x00e6, 0x2071, 0x1800, 0x080c, 0x2c2b, 0x00ee, 0x00c6, + 0x0156, 0x20a9, 0x0781, 0x2009, 0x007f, 0x080c, 0x2f28, 0x8108, + 0x1f04, 0xa7e5, 0x015e, 0x00ce, 0x080c, 0xa7a4, 0x2071, 0x0260, + 0x2079, 0x0200, 0x7817, 0x0001, 0x2001, 0x1835, 0x200c, 0xc1c5, + 0x7018, 0xd0fc, 0x0110, 0xd0dc, 0x0118, 0x7038, 0xd0dc, 0x1108, + 0xc1c4, 0x7817, 0x0000, 0x2001, 0x1835, 0x2102, 0x2079, 0x0100, + 0x2e04, 0x9084, 0x00ff, 0x2069, 0x181d, 0x206a, 0x78e6, 0x0006, + 0x8e70, 0x2e04, 0x2069, 0x181e, 0x206a, 0x78ea, 0x7832, 0x7836, + 0x2010, 0x9084, 0xff00, 0x001e, 0x9105, 0x2009, 0x182a, 0x200a, + 0x2200, 0x9084, 0x00ff, 0x2008, 0x080c, 0x251f, 0x080c, 0x6c53, + 0x0170, 0x2071, 0x0260, 0x2069, 0x1951, 0x7048, 0x206a, 0x704c, + 0x6806, 0x7050, 0x680a, 0x7054, 0x680e, 0x080c, 0xba03, 0x0040, + 0x2001, 0x0006, 0x080c, 0x5ecf, 0x080c, 0x2e55, 0x080c, 0x99d6, + 0x001e, 0x003e, 0x00de, 0x00ee, 0x00fe, 0x00be, 0x0005, 0x0096, + 0x0026, 0x0036, 0x00e6, 0x0156, 0x2019, 0x182a, 0x231c, 0x83ff, + 0x01f0, 0x2071, 0x0260, 0x7200, 0x9294, 0x00ff, 0x7004, 0x9084, + 0xff00, 0x9205, 0x9306, 0x1198, 0x2011, 0x0276, 0x20a9, 0x0004, + 0x2b48, 0x2019, 0x000a, 0x080c, 0xa91d, 0x1148, 0x2011, 0x027a, + 0x20a9, 0x0004, 0x2019, 0x0006, 0x080c, 0xa91d, 0x1100, 0x015e, + 0x00ee, 0x003e, 0x002e, 0x009e, 0x0005, 0x00e6, 0x2071, 0x0260, + 0x7034, 0x9086, 0x0014, 0x11a8, 0x7038, 0x9086, 0x0800, 0x1188, + 0x703c, 0xd0ec, 0x0160, 0x9084, 0x0f00, 0x9086, 0x0100, 0x1138, + 0x7054, 0xd0a4, 0x1110, 0xd0ac, 0x0110, 0x9006, 0x0010, 0x9085, + 0x0001, 0x00ee, 0x0005, 0x00e6, 0x0096, 0x00c6, 0x0076, 0x0056, + 0x0046, 0x0026, 0x0006, 0x0126, 0x2091, 0x8000, 0x2029, 0x19bf, + 0x252c, 0x2021, 0x19c5, 0x2424, 0x2061, 0x1cd0, 0x2071, 0x1800, + 0x724c, 0x706c, 0x9202, 0x1a04, 0xa8f5, 0x080c, 0xd012, 0x05f0, + 0x6720, 0x9786, 0x0007, 0x05d0, 0x2500, 0x9c06, 0x05b8, 0x2400, + 0x9c06, 0x05a0, 0x3e08, 0x9186, 0x0002, 0x1148, 0x6010, 0x9005, + 0x0130, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1538, 0x00c6, + 0x6000, 0x9086, 0x0004, 0x1110, 0x080c, 0x1827, 0x9786, 0x000a, + 0x0148, 0x080c, 0xb7fa, 0x1130, 0x00ce, 0x080c, 0xa364, 0x080c, + 0x9a06, 0x00a0, 0x6014, 0x2048, 0x080c, 0xb5fb, 0x0160, 0x9786, + 0x0003, 0x11e8, 0xa867, 0x0103, 0xab7a, 0xa877, 0x0000, 0x080c, + 0x6529, 0x080c, 0xb7dd, 0x080c, 0x9a06, 0x00ce, 0x9ce0, 0x0018, + 0x7060, 0x9c02, 0x1210, 0x0804, 0xa8a8, 0x012e, 0x000e, 0x002e, + 0x004e, 0x005e, 0x007e, 0x00ce, 0x009e, 0x00ee, 0x0005, 0x9786, + 0x0006, 0x1118, 0x080c, 0xcf91, 0x0c30, 0x9786, 0x000a, 0x09e0, + 0x08c8, 0x220c, 0x2304, 0x9106, 0x1130, 0x8210, 0x8318, 0x1f04, + 0xa909, 0x9006, 0x0005, 0x2304, 0x9102, 0x0218, 0x2001, 0x0001, + 0x0008, 0x9006, 0x918d, 0x0001, 0x0005, 0x0136, 0x01c6, 0x0016, + 0x8906, 0x8006, 0x8007, 0x908c, 0x003f, 0x21e0, 0x9084, 0xffc0, + 0x9300, 0x2098, 0x3518, 0x20a9, 0x0001, 0x220c, 0x4002, 0x910e, + 0x1140, 0x8210, 0x8319, 0x1dc8, 0x9006, 0x001e, 0x01ce, 0x013e, + 0x0005, 0x220c, 0x9102, 0x0218, 0x2001, 0x0001, 0x0010, 0x2001, + 0x0000, 0x918d, 0x0001, 0x001e, 0x01ce, 0x013e, 0x0005, 0x6004, + 0x908a, 0x0053, 0x1a0c, 0x0db2, 0x080c, 0xb7e9, 0x0120, 0x080c, + 0xb7fa, 0x0168, 0x0028, 0x080c, 0x2e55, 0x080c, 0xb7fa, 0x0138, + 0x080c, 0x847d, 0x080c, 0x99d6, 0x080c, 0x8582, 0x0005, 0x080c, + 0xa364, 0x0cb0, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040, 0x0208, + 0x000a, 0x0005, 0xa97e, 0xa97e, 0xa97e, 0xa97e, 0xa97e, 0xa97e, + 0xa97e, 0xa97e, 0xa97e, 0xa97e, 0xa97e, 0xa980, 0xa980, 0xa980, + 0xa980, 0xa97e, 0xa97e, 0xa97e, 0xa980, 0xa97e, 0x080c, 0x0db2, + 0x600b, 0xffff, 0x6003, 0x0001, 0x6106, 0x080c, 0x8000, 0x0126, + 0x2091, 0x8000, 0x080c, 0x8582, 0x012e, 0x0005, 0x9186, 0x0013, + 0x1128, 0x6004, 0x9082, 0x0040, 0x0804, 0xaa35, 0x9186, 0x0027, + 0x1520, 0x080c, 0x847d, 0x080c, 0x2e30, 0x080c, 0xbd01, 0x0096, + 0x6114, 0x2148, 0x080c, 0xb5fb, 0x0198, 0x080c, 0xb7fa, 0x1118, + 0x080c, 0xa364, 0x0068, 0xa867, 0x0103, 0xa87b, 0x0029, 0xa877, + 0x0000, 0xa97c, 0xc1c5, 0xa97e, 0x080c, 0x6536, 0x080c, 0xb7dd, + 0x009e, 0x080c, 0x99d6, 0x0804, 0x8582, 0x9186, 0x0014, 0x1120, + 0x6004, 0x9082, 0x0040, 0x04a0, 0x9186, 0x0046, 0x0150, 0x9186, + 0x0045, 0x0138, 0x9186, 0x0053, 0x0120, 0x9186, 0x0048, 0x190c, + 0x0db2, 0x2001, 0x0109, 0x2004, 0xd084, 0x0508, 0x0126, 0x2091, + 0x2800, 0x0006, 0x0016, 0x0026, 0x0036, 0x00f6, 0x00e6, 0x00c6, + 0x2079, 0x19b6, 0x2071, 0x1800, 0x2061, 0x0100, 0x080c, 0x7eec, + 0x00ce, 0x00ee, 0x00fe, 0x003e, 0x002e, 0x001e, 0x000e, 0x012e, + 0xa001, 0x6000, 0x9086, 0x0002, 0x1110, 0x0804, 0xaa73, 0x0005, + 0x0002, 0xaa0f, 0xaa0d, 0xaa0d, 0xaa0d, 0xaa0d, 0xaa0d, 0xaa0d, + 0xaa0d, 0xaa0d, 0xaa0d, 0xaa0d, 0xaa2a, 0xaa2a, 0xaa2a, 0xaa2a, + 0xaa0d, 0xaa2a, 0xaa0d, 0xaa2a, 0xaa0d, 0x080c, 0x0db2, 0x080c, + 0x847d, 0x0096, 0x6114, 0x2148, 0x080c, 0xb5fb, 0x0168, 0xa867, + 0x0103, 0xa87b, 0x0006, 0xa877, 0x0000, 0xa880, 0xc0ec, 0xa882, + 0x080c, 0x6536, 0x080c, 0xb7dd, 0x009e, 0x080c, 0x99d6, 0x080c, + 0x8582, 0x0005, 0x080c, 0x847d, 0x080c, 0xb7fa, 0x090c, 0xa364, + 0x080c, 0x99d6, 0x080c, 0x8582, 0x0005, 0x0002, 0xaa4c, 0xaa4a, + 0xaa4a, 0xaa4a, 0xaa4a, 0xaa4a, 0xaa4a, 0xaa4a, 0xaa4a, 0xaa4a, + 0xaa4a, 0xaa63, 0xaa63, 0xaa63, 0xaa63, 0xaa4a, 0xaa6d, 0xaa4a, + 0xaa63, 0xaa4a, 0x080c, 0x0db2, 0x0096, 0x080c, 0x847d, 0x6014, + 0x2048, 0x2001, 0x1957, 0x2004, 0x6042, 0xa97c, 0xd1ac, 0x0140, + 0x6003, 0x0004, 0xa87c, 0x9085, 0x0400, 0xa87e, 0x009e, 0x0005, + 0x6003, 0x0002, 0x0cb8, 0x080c, 0x847d, 0x080c, 0xbd04, 0x080c, + 0xbd09, 0x6003, 0x000f, 0x0804, 0x8582, 0x080c, 0x847d, 0x080c, + 0x99d6, 0x0804, 0x8582, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040, + 0x0208, 0x000a, 0x0005, 0xaa8f, 0xaa8f, 0xaa8f, 0xaa8f, 0xaa8f, + 0xaa91, 0xab6e, 0xaa8f, 0xaba2, 0xaa8f, 0xaa8f, 0xaa8f, 0xaa8f, + 0xaa8f, 0xaa8f, 0xaa8f, 0xaa8f, 0xaa8f, 0xaa8f, 0xaba2, 0x080c, + 0x0db2, 0x00b6, 0x0096, 0x6114, 0x2148, 0x7644, 0x96b4, 0x0fff, + 0x86ff, 0x1528, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904, 0xab5d, + 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0xa87c, 0xd0ac, 0x0128, + 0xa834, 0xa938, 0x9115, 0x190c, 0xad37, 0x080c, 0x6351, 0x6210, + 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0x7044, 0xd0e4, + 0x1904, 0xab41, 0x080c, 0x99d6, 0x009e, 0x00be, 0x0005, 0x968c, + 0x0c00, 0x0150, 0x6010, 0x2058, 0xb800, 0xd0bc, 0x1904, 0xab45, + 0x7348, 0xab92, 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, + 0x0508, 0x9186, 0x0028, 0x1118, 0xa87b, 0x001c, 0x00e8, 0xd6dc, + 0x01a0, 0xa87b, 0x0015, 0xa87c, 0xd0ac, 0x0170, 0xa938, 0xaa34, + 0x2100, 0x9205, 0x0148, 0x7048, 0x9106, 0x1118, 0x704c, 0x9206, + 0x0118, 0xa992, 0xaa8e, 0xc6dc, 0x0038, 0xd6d4, 0x0118, 0xa87b, + 0x0007, 0x0010, 0xa87b, 0x0000, 0xa867, 0x0103, 0xae76, 0x901e, + 0xd6c4, 0x01d8, 0x9686, 0x0100, 0x1130, 0x7064, 0x9005, 0x1118, + 0xc6c4, 0x0804, 0xaa98, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, + 0x0009, 0x0210, 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018, + 0x2011, 0x0025, 0x080c, 0xb219, 0x003e, 0xd6cc, 0x0904, 0xaaad, + 0x7154, 0xa98a, 0x81ff, 0x0904, 0xaaad, 0x9192, 0x0021, 0x1278, + 0x8304, 0x9098, 0x0018, 0x2011, 0x0029, 0x080c, 0xb219, 0x2011, + 0x0205, 0x2013, 0x0000, 0x080c, 0xbc93, 0x0804, 0xaaad, 0xa868, + 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a, 0x0c50, 0x00a6, 0x2950, + 0x080c, 0xb1b8, 0x00ae, 0x080c, 0xbc93, 0x080c, 0xb209, 0x0804, + 0xaaaf, 0x080c, 0xb8ed, 0x0804, 0xaabc, 0xa87c, 0xd0ac, 0x0904, + 0xaac8, 0xa880, 0xd0bc, 0x1904, 0xaac8, 0x7348, 0xa838, 0x9306, + 0x11c8, 0x734c, 0xa834, 0x931e, 0x0904, 0xaac8, 0xd6d4, 0x0190, + 0xab38, 0x9305, 0x0904, 0xaac8, 0x0068, 0xa87c, 0xd0ac, 0x0904, + 0xaaa0, 0xa838, 0xa934, 0x9105, 0x0904, 0xaaa0, 0xa880, 0xd0bc, + 0x1904, 0xaaa0, 0x080c, 0xb927, 0x0804, 0xaabc, 0x0096, 0x00f6, + 0x6003, 0x0003, 0x6007, 0x0043, 0x2079, 0x026c, 0x7c04, 0x7b00, + 0x7e0c, 0x7d08, 0x6014, 0x2048, 0xa87c, 0xd0ac, 0x0140, 0x6003, + 0x0002, 0x00fe, 0x009e, 0x0005, 0x2130, 0x2228, 0x0058, 0x2400, + 0xa9ac, 0x910a, 0x2300, 0xaab0, 0x9213, 0x2600, 0x9102, 0x2500, + 0x9203, 0x0e90, 0xac36, 0xab3a, 0xae46, 0xad4a, 0x00fe, 0x6043, + 0x0000, 0x2c10, 0x080c, 0x1976, 0x080c, 0x8065, 0x080c, 0x865d, + 0x009e, 0x0005, 0x0005, 0x9182, 0x0054, 0x1220, 0x9182, 0x0040, + 0x0208, 0x000a, 0x0005, 0xabbf, 0xabbf, 0xabbf, 0xabbf, 0xabbf, + 0xabc1, 0xac57, 0xabbf, 0xabbf, 0xac6e, 0xacfa, 0xabbf, 0xabbf, + 0xabbf, 0xabbf, 0xad0f, 0xabbf, 0xabbf, 0xabbf, 0xabbf, 0x080c, + 0x0db2, 0x0076, 0x00a6, 0x00e6, 0x0096, 0x2071, 0x0260, 0x6114, + 0x2150, 0x7644, 0xb676, 0x96b4, 0x0fff, 0xb77c, 0xc7e5, 0xb77e, + 0x6210, 0x00b6, 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, + 0x00be, 0x86ff, 0x0904, 0xac52, 0x9694, 0xff00, 0x9284, 0x0c00, + 0x0120, 0x7048, 0xb092, 0x704c, 0xb08e, 0x9284, 0x0300, 0x0904, + 0xac52, 0x080c, 0x0fd5, 0x090c, 0x0db2, 0x2900, 0xb07a, 0xb77c, + 0xc7cd, 0xb77e, 0xa867, 0x0103, 0xb068, 0xa86a, 0xb06c, 0xa86e, + 0xb070, 0xa872, 0xae76, 0x968c, 0x0c00, 0x0120, 0x7348, 0xab92, + 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0180, 0x9186, + 0x0028, 0x1118, 0xa87b, 0x001c, 0x0060, 0xd6dc, 0x0118, 0xa87b, + 0x0015, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, + 0x0000, 0xaf7e, 0xb080, 0xa882, 0xb084, 0xa886, 0x901e, 0xd6c4, + 0x0190, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, + 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011, 0x0025, + 0x080c, 0xb219, 0x003e, 0xd6cc, 0x01e8, 0x7154, 0xa98a, 0x81ff, + 0x01c8, 0x9192, 0x0021, 0x1260, 0x8304, 0x9098, 0x0018, 0x2011, + 0x0029, 0x080c, 0xb219, 0x2011, 0x0205, 0x2013, 0x0000, 0x0050, + 0xb068, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a, 0x0c68, 0x2950, + 0x080c, 0xb1b8, 0x009e, 0x00ee, 0x00ae, 0x007e, 0x0005, 0x00f6, + 0x00a6, 0x6003, 0x0003, 0x2079, 0x026c, 0x7c04, 0x7b00, 0x7e0c, + 0x7d08, 0x6014, 0x2050, 0xb436, 0xb33a, 0xb646, 0xb54a, 0x00ae, + 0x00fe, 0x2c10, 0x080c, 0x1976, 0x0804, 0x8f88, 0x6003, 0x0002, + 0x6004, 0x9086, 0x0040, 0x11c8, 0x0096, 0x6014, 0x2048, 0xa87c, + 0xd0ac, 0x0160, 0x601c, 0xd084, 0x1130, 0x00f6, 0x2c00, 0x2078, + 0x080c, 0x1582, 0x00fe, 0x6003, 0x0004, 0x0010, 0x6003, 0x0002, + 0x009e, 0x080c, 0x847d, 0x080c, 0x8582, 0x0096, 0x2001, 0x1957, + 0x2004, 0x6042, 0x080c, 0x8532, 0x080c, 0x865d, 0x6114, 0x2148, + 0xa97c, 0xd1e4, 0x0904, 0xacf5, 0xd1cc, 0x05a8, 0xa978, 0xa868, + 0xd0fc, 0x0538, 0x0016, 0xa87c, 0x0006, 0xa880, 0x0006, 0xa860, + 0x20e8, 0xa85c, 0x9080, 0x0019, 0x20a0, 0x810e, 0x810e, 0x810f, + 0x9184, 0x003f, 0x20e0, 0x9184, 0xffc0, 0x9080, 0x0019, 0x2098, + 0x0156, 0x20a9, 0x0020, 0x4003, 0x015e, 0x000e, 0xa882, 0x000e, + 0xa87e, 0x001e, 0xa874, 0x0006, 0x2148, 0x080c, 0x0f87, 0x001e, + 0x0440, 0x0016, 0x080c, 0x0f87, 0x009e, 0xa974, 0x0016, 0x080c, + 0xb209, 0x001e, 0x00f0, 0xa867, 0x0103, 0xa974, 0x9184, 0x00ff, + 0x90b6, 0x0002, 0x0180, 0x9086, 0x0028, 0x1118, 0xa87b, 0x001c, + 0x0060, 0xd1dc, 0x0118, 0xa87b, 0x0015, 0x0038, 0xd1d4, 0x0118, + 0xa87b, 0x0007, 0x0010, 0xa87b, 0x0000, 0x0016, 0x080c, 0x6351, + 0x001e, 0xd1e4, 0x1120, 0x080c, 0x99d6, 0x009e, 0x0005, 0x080c, + 0xb8ed, 0x0cd8, 0x6004, 0x9086, 0x0040, 0x1120, 0x080c, 0x847d, + 0x080c, 0x8582, 0x2019, 0x0001, 0x080c, 0x9254, 0x6003, 0x0002, + 0x080c, 0xbd09, 0x080c, 0x8532, 0x080c, 0x865d, 0x0005, 0x6004, + 0x9086, 0x0040, 0x1120, 0x080c, 0x847d, 0x080c, 0x8582, 0x2019, + 0x0001, 0x080c, 0x9254, 0x080c, 0x8532, 0x080c, 0x2e30, 0x080c, + 0xbd01, 0x0096, 0x6114, 0x2148, 0x080c, 0xb5fb, 0x0150, 0xa867, + 0x0103, 0xa87b, 0x0029, 0xa877, 0x0000, 0x080c, 0x6536, 0x080c, + 0xb7dd, 0x009e, 0x080c, 0x99d6, 0x080c, 0x865d, 0x0005, 0xa87b, + 0x0015, 0xd1fc, 0x0138, 0xa87b, 0x0007, 0x8002, 0x8000, 0x810a, + 0x9189, 0x0000, 0xa992, 0xa88e, 0x0005, 0x9182, 0x0054, 0x1220, + 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xad61, 0xad61, 0xad61, + 0xad61, 0xad61, 0xad63, 0xad61, 0xad61, 0xae09, 0xad61, 0xad61, + 0xad61, 0xad61, 0xad61, 0xad61, 0xad61, 0xad61, 0xad61, 0xad61, + 0xaf3a, 0x080c, 0x0db2, 0x0076, 0x00a6, 0x00e6, 0x0096, 0x2071, + 0x0260, 0x6114, 0x2150, 0x7644, 0xb676, 0x96b4, 0x0fff, 0xb77c, + 0xc7e5, 0xb77e, 0x6210, 0x00b6, 0x2258, 0xba3c, 0x82ff, 0x0110, + 0x8211, 0xba3e, 0x00be, 0x86ff, 0x0904, 0xae02, 0x9694, 0xff00, + 0x9284, 0x0c00, 0x0120, 0x7048, 0xb092, 0x704c, 0xb08e, 0x9284, + 0x0300, 0x0904, 0xae02, 0x9686, 0x0100, 0x1130, 0x7064, 0x9005, + 0x1118, 0xc6c4, 0xb676, 0x0c38, 0x080c, 0x0fd5, 0x090c, 0x0db2, + 0x2900, 0xb07a, 0xb77c, 0x97bd, 0x0200, 0xb77e, 0xa867, 0x0103, + 0xb068, 0xa86a, 0xb06c, 0xa86e, 0xb070, 0xa872, 0x7044, 0x9084, + 0xf000, 0x9635, 0xae76, 0x968c, 0x0c00, 0x0120, 0x7348, 0xab92, + 0x734c, 0xab8e, 0x968c, 0x00ff, 0x9186, 0x0002, 0x0180, 0x9186, + 0x0028, 0x1118, 0xa87b, 0x001c, 0x0060, 0xd6dc, 0x0118, 0xa87b, + 0x0015, 0x0038, 0xd6d4, 0x0118, 0xa87b, 0x0007, 0x0010, 0xa87b, + 0x0000, 0xaf7e, 0xb080, 0xa882, 0xb084, 0xa886, 0x901e, 0xd6c4, + 0x0190, 0x735c, 0xab86, 0x83ff, 0x0170, 0x938a, 0x0009, 0x0210, + 0x2019, 0x0008, 0x0036, 0x2308, 0x2019, 0x0018, 0x2011, 0x0025, + 0x080c, 0xb219, 0x003e, 0xd6cc, 0x01e8, 0x7154, 0xa98a, 0x81ff, + 0x01c8, 0x9192, 0x0021, 0x1260, 0x8304, 0x9098, 0x0018, 0x2011, + 0x0029, 0x080c, 0xb219, 0x2011, 0x0205, 0x2013, 0x0000, 0x0050, + 0xb068, 0xd0fc, 0x0120, 0x2009, 0x0020, 0xa98a, 0x0c68, 0x2950, + 0x080c, 0xb1b8, 0x080c, 0x1805, 0x009e, 0x00ee, 0x00ae, 0x007e, + 0x0005, 0x2001, 0x1957, 0x2004, 0x6042, 0x0096, 0x6114, 0x2148, + 0xa83c, 0xa940, 0x9105, 0x1118, 0xa87c, 0xc0dc, 0xa87e, 0x6003, + 0x0002, 0xa97c, 0xd1e4, 0x0904, 0xaf35, 0x6043, 0x0000, 0x6010, + 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x1500, 0xd1cc, 0x0904, + 0xaf04, 0xa978, 0xa868, 0xd0fc, 0x0904, 0xaec5, 0x0016, 0xa87c, + 0x0006, 0xa880, 0x0006, 0x00a6, 0x2150, 0xb174, 0x9184, 0x00ff, + 0x90b6, 0x0002, 0x0904, 0xae93, 0x9086, 0x0028, 0x1904, 0xae7f, + 0xa87b, 0x001c, 0xb07b, 0x001c, 0x0804, 0xae9b, 0x6024, 0xd0f4, + 0x11d0, 0xa838, 0xaa34, 0x9205, 0x09c8, 0xa838, 0xaa90, 0x9206, + 0x1120, 0xa88c, 0xaa34, 0x9206, 0x0988, 0x6024, 0xd0d4, 0x1148, + 0xa9ac, 0xa834, 0x9102, 0x603a, 0xa9b0, 0xa838, 0x9103, 0x603e, + 0x6024, 0xc0f5, 0x6026, 0x6010, 0x00b6, 0x2058, 0xb83c, 0x8000, + 0xb83e, 0x00be, 0x9006, 0xa876, 0xa892, 0xa88e, 0xa87c, 0xc0e4, + 0xa87e, 0xd0cc, 0x0140, 0xc0cc, 0xa87e, 0x0096, 0xa878, 0x2048, + 0x080c, 0x0f87, 0x009e, 0x080c, 0xb927, 0x0804, 0xaf35, 0xd1dc, + 0x0158, 0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xbbb6, 0x0118, + 0xb174, 0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007, + 0xb07b, 0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, + 0x9115, 0x190c, 0xad37, 0xa87c, 0xb07e, 0xa890, 0xb092, 0xa88c, + 0xb08e, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0019, 0x20a0, 0x20a9, + 0x0020, 0x8a06, 0x8006, 0x8007, 0x9094, 0x003f, 0x22e0, 0x9084, + 0xffc0, 0x9080, 0x0019, 0x2098, 0x4003, 0x00ae, 0x000e, 0xa882, + 0x000e, 0xa87e, 0x080c, 0xbc93, 0x001e, 0xa874, 0x0006, 0x2148, + 0x080c, 0x0f87, 0x001e, 0x0804, 0xaf31, 0x0016, 0x00a6, 0x2150, + 0xb174, 0x9184, 0x00ff, 0x90b6, 0x0002, 0x01e0, 0x9086, 0x0028, + 0x1128, 0xa87b, 0x001c, 0xb07b, 0x001c, 0x00e0, 0xd1dc, 0x0158, + 0xa87b, 0x0015, 0xb07b, 0x0015, 0x080c, 0xbbb6, 0x0118, 0xb174, + 0xc1dc, 0xb176, 0x0078, 0xd1d4, 0x0128, 0xa87b, 0x0007, 0xb07b, + 0x0007, 0x0040, 0xa87c, 0xd0ac, 0x0128, 0xa834, 0xa938, 0x9115, + 0x190c, 0xad37, 0xa890, 0xb092, 0xa88c, 0xb08e, 0xa87c, 0xb07e, + 0x00ae, 0x080c, 0x0f87, 0x009e, 0x080c, 0xbc93, 0xa974, 0x0016, + 0x080c, 0xb209, 0x001e, 0x0468, 0xa867, 0x0103, 0xa974, 0x9184, + 0x00ff, 0x90b6, 0x0002, 0x01b0, 0x9086, 0x0028, 0x1118, 0xa87b, + 0x001c, 0x00d0, 0xd1dc, 0x0148, 0xa87b, 0x0015, 0x080c, 0xbbb6, + 0x0118, 0xa974, 0xc1dc, 0xa976, 0x0078, 0xd1d4, 0x0118, 0xa87b, + 0x0007, 0x0050, 0xa87b, 0x0000, 0xa87c, 0xd0ac, 0x0128, 0xa834, + 0xa938, 0x9115, 0x190c, 0xad37, 0xa974, 0x0016, 0x080c, 0x6351, + 0x001e, 0xd1e4, 0x1120, 0x080c, 0x99d6, 0x009e, 0x0005, 0x080c, + 0xb8ed, 0x0cd8, 0x6114, 0x0096, 0x2148, 0xa97c, 0xd1e4, 0x190c, + 0x1813, 0x009e, 0x0005, 0x080c, 0x847d, 0x0010, 0x080c, 0x8532, + 0x080c, 0xb5fb, 0x01f0, 0x0096, 0x6114, 0x2148, 0x080c, 0xb7fa, + 0x1118, 0x080c, 0xa364, 0x00a0, 0xa867, 0x0103, 0x2009, 0x180c, + 0x210c, 0xd18c, 0x11b8, 0xd184, 0x1190, 0x6108, 0xa97a, 0x918e, + 0x0029, 0x1110, 0x080c, 0xd28c, 0xa877, 0x0000, 0x080c, 0x6536, + 0x009e, 0x080c, 0x99d6, 0x080c, 0x8582, 0x0804, 0x865d, 0xa87b, + 0x0004, 0x0c90, 0xa87b, 0x0004, 0x0c78, 0x9182, 0x0054, 0x1220, + 0x9182, 0x0040, 0x0208, 0x000a, 0x0005, 0xaf91, 0xaf91, 0xaf91, + 0xaf91, 0xaf91, 0xaf93, 0xaf91, 0xaf91, 0xaf91, 0xaf91, 0xaf91, + 0xaf91, 0xaf91, 0xaf91, 0xaf91, 0xaf91, 0xaf91, 0xaf91, 0xaf91, + 0xaf91, 0x080c, 0x0db2, 0x080c, 0x511b, 0x01f8, 0x6014, 0x7144, + 0x918c, 0x0fff, 0x9016, 0xd1c4, 0x0118, 0x7264, 0x9294, 0x00ff, + 0x0096, 0x904d, 0x0188, 0xa87b, 0x0000, 0xa864, 0x9086, 0x0139, + 0x0128, 0xa867, 0x0103, 0xa976, 0xaa96, 0x0030, 0xa897, 0x4000, + 0xa99a, 0xaa9e, 0x080c, 0x6536, 0x009e, 0x0804, 0x99d6, 0x9182, + 0x0085, 0x0002, 0xafc9, 0xafc7, 0xafc7, 0xafd5, 0xafc7, 0xafc7, + 0xafc7, 0xafc7, 0xafc7, 0xafc7, 0xafc7, 0xafc7, 0xafc7, 0x080c, + 0x0db2, 0x6003, 0x0001, 0x6106, 0x080c, 0x8000, 0x0126, 0x2091, + 0x8000, 0x080c, 0x8582, 0x012e, 0x0005, 0x0026, 0x0056, 0x00d6, + 0x00e6, 0x2071, 0x0260, 0x7224, 0x6216, 0x7220, 0x080c, 0xb5e9, + 0x01a0, 0x2268, 0x6800, 0x9086, 0x0000, 0x0178, 0x6010, 0x6d10, + 0x952e, 0x1158, 0x00c6, 0x2d60, 0x080c, 0xb244, 0x00ce, 0x0128, + 0x6803, 0x0002, 0x6007, 0x0086, 0x0010, 0x6007, 0x0087, 0x6003, + 0x0001, 0x080c, 0x8000, 0x080c, 0x8582, 0x9280, 0x0004, 0x00b6, + 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0140, 0x6824, 0xd0ec, 0x0128, + 0x00c6, 0x2260, 0x080c, 0xb927, 0x00ce, 0x00ee, 0x00de, 0x005e, + 0x002e, 0x0005, 0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085, + 0x0a0c, 0x0db2, 0x908a, 0x0092, 0x1a0c, 0x0db2, 0x9082, 0x0085, + 0x00e2, 0x9186, 0x0027, 0x0120, 0x9186, 0x0014, 0x190c, 0x0db2, + 0x080c, 0x847d, 0x0096, 0x6014, 0x2048, 0x080c, 0xb5fb, 0x0140, + 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0029, 0x080c, 0x6536, + 0x009e, 0x080c, 0x9a06, 0x0804, 0x8582, 0xb04a, 0xb04c, 0xb04c, + 0xb04a, 0xb04a, 0xb04a, 0xb04a, 0xb04a, 0xb04a, 0xb04a, 0xb04a, + 0xb04a, 0xb04a, 0x080c, 0x0db2, 0x080c, 0x847d, 0x080c, 0x9a06, + 0x080c, 0x8582, 0x0005, 0x9186, 0x0013, 0x1128, 0x6004, 0x9082, + 0x0085, 0x2008, 0x04b8, 0x9186, 0x0027, 0x11f8, 0x080c, 0x847d, + 0x080c, 0x2e30, 0x080c, 0xbd01, 0x0096, 0x6014, 0x2048, 0x080c, + 0xb5fb, 0x0150, 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0029, + 0x080c, 0x6536, 0x080c, 0xb7dd, 0x009e, 0x080c, 0x99d6, 0x080c, + 0x8582, 0x0005, 0x080c, 0x9a6b, 0x0ce0, 0x9186, 0x0014, 0x1dd0, + 0x080c, 0x847d, 0x0096, 0x6014, 0x2048, 0x080c, 0xb5fb, 0x0d60, + 0xa867, 0x0103, 0xa877, 0x0000, 0xa87b, 0x0006, 0xa880, 0xc0ec, + 0xa882, 0x08f0, 0x0002, 0xb0a2, 0xb0a0, 0xb0a0, 0xb0a0, 0xb0a0, + 0xb0a0, 0xb0ba, 0xb0a0, 0xb0a0, 0xb0a0, 0xb0a0, 0xb0a0, 0xb0a0, + 0x080c, 0x0db2, 0x080c, 0x847d, 0x6034, 0x908c, 0xff00, 0x810f, + 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x2001, 0x1955, + 0x0010, 0x2001, 0x1956, 0x2004, 0x601a, 0x6003, 0x000c, 0x080c, + 0x8582, 0x0005, 0x080c, 0x847d, 0x6034, 0x908c, 0xff00, 0x810f, + 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x2001, 0x1955, + 0x0010, 0x2001, 0x1956, 0x2004, 0x601a, 0x6003, 0x000e, 0x080c, + 0x8582, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085, 0x0208, + 0x0012, 0x0804, 0x9a6b, 0xb0e8, 0xb0e8, 0xb0e8, 0xb0e8, 0xb0ea, + 0xb137, 0xb0e8, 0xb0e8, 0xb0e8, 0xb0e8, 0xb0e8, 0xb0e8, 0xb0e8, + 0x080c, 0x0db2, 0x0096, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, + 0xd0bc, 0x0168, 0x6034, 0x908c, 0xff00, 0x810f, 0x9186, 0x0039, + 0x0118, 0x9186, 0x0035, 0x1118, 0x009e, 0x0804, 0xb14b, 0x080c, + 0xb5fb, 0x1118, 0x080c, 0xb7dd, 0x0068, 0x6014, 0x2048, 0xa87c, + 0xd0e4, 0x1110, 0x080c, 0xb7dd, 0xa867, 0x0103, 0x080c, 0xbccc, + 0x080c, 0x6536, 0x00d6, 0x2c68, 0x080c, 0x9980, 0x01d0, 0x6003, + 0x0001, 0x6007, 0x001e, 0x600b, 0xffff, 0x2009, 0x026e, 0x210c, + 0x613a, 0x2009, 0x026f, 0x210c, 0x613e, 0x6910, 0x6112, 0x080c, + 0xba69, 0x6954, 0x6156, 0x6023, 0x0001, 0x080c, 0x8000, 0x080c, + 0x8582, 0x2d60, 0x00de, 0x080c, 0x99d6, 0x009e, 0x0005, 0x6010, + 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x05a0, 0x6034, 0x908c, + 0xff00, 0x810f, 0x9186, 0x0035, 0x0130, 0x9186, 0x001e, 0x0118, + 0x9186, 0x0039, 0x1538, 0x00d6, 0x2c68, 0x080c, 0xbc66, 0x11f0, + 0x080c, 0x9980, 0x01d8, 0x6106, 0x6003, 0x0001, 0x6023, 0x0001, + 0x6910, 0x6112, 0x692c, 0x612e, 0x6930, 0x6132, 0x6934, 0x918c, + 0x00ff, 0x6136, 0x6938, 0x613a, 0x693c, 0x613e, 0x6954, 0x6156, + 0x080c, 0xba69, 0x080c, 0x8000, 0x080c, 0x8582, 0x2d60, 0x00de, + 0x0804, 0x99d6, 0x0096, 0x6014, 0x2048, 0x080c, 0xb5fb, 0x01c8, + 0xa867, 0x0103, 0xa880, 0xd0b4, 0x0128, 0xc0ec, 0xa882, 0xa87b, + 0x0006, 0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, 0x0020, 0xa87b, + 0x0005, 0x080c, 0xb8e9, 0xa877, 0x0000, 0x080c, 0x6536, 0x080c, + 0xb7dd, 0x009e, 0x0804, 0x99d6, 0x0016, 0x0096, 0x6014, 0x2048, + 0x080c, 0xb5fb, 0x0140, 0xa867, 0x0103, 0xa87b, 0x0028, 0xa877, + 0x0000, 0x080c, 0x6536, 0x009e, 0x001e, 0x9186, 0x0013, 0x0148, + 0x9186, 0x0014, 0x0130, 0x9186, 0x0027, 0x0118, 0x080c, 0x9a6b, + 0x0030, 0x080c, 0x847d, 0x080c, 0x9a06, 0x080c, 0x8582, 0x0005, + 0x0056, 0x0066, 0x0096, 0x00a6, 0x2029, 0x0001, 0x9182, 0x0101, + 0x1208, 0x0010, 0x2009, 0x0100, 0x2130, 0x8304, 0x9098, 0x0018, + 0x2009, 0x0020, 0x2011, 0x0029, 0x080c, 0xb219, 0x96b2, 0x0020, + 0xb004, 0x904d, 0x0110, 0x080c, 0x0f87, 0x080c, 0x0fd5, 0x0520, + 0x8528, 0xa867, 0x0110, 0xa86b, 0x0000, 0x2920, 0xb406, 0x968a, + 0x003d, 0x1228, 0x2608, 0x2011, 0x001b, 0x0499, 0x00a8, 0x96b2, + 0x003c, 0x2009, 0x003c, 0x2950, 0x2011, 0x001b, 0x0451, 0x0c28, + 0x2001, 0x0205, 0x2003, 0x0000, 0x00ae, 0x852f, 0x95ad, 0x0003, + 0xb566, 0x95ac, 0x0000, 0x0048, 0x2001, 0x0205, 0x2003, 0x0000, + 0x00ae, 0x852f, 0x95ad, 0x0003, 0xb566, 0x009e, 0x006e, 0x005e, + 0x0005, 0x00a6, 0x89ff, 0x0158, 0xa804, 0x9055, 0x0130, 0xa807, + 0x0000, 0x080c, 0x6536, 0x2a48, 0x0cb8, 0x080c, 0x6536, 0x00ae, + 0x0005, 0x00f6, 0x2079, 0x0200, 0x7814, 0x9085, 0x0080, 0x7816, + 0xd184, 0x0108, 0x8108, 0x810c, 0x20a9, 0x0001, 0xa860, 0x20e8, + 0xa85c, 0x9200, 0x20a0, 0x20e1, 0x0000, 0x2300, 0x9e00, 0x2098, + 0x4003, 0x8318, 0x9386, 0x0020, 0x1148, 0x2018, 0x2300, 0x9e00, + 0x2098, 0x7814, 0x8000, 0x9085, 0x0080, 0x7816, 0x8109, 0x1d80, + 0x7817, 0x0000, 0x00fe, 0x0005, 0x0066, 0x0126, 0x2091, 0x8000, + 0x2031, 0x0001, 0x6020, 0x9084, 0x000f, 0x0083, 0x012e, 0x006e, + 0x0005, 0x0126, 0x2091, 0x8000, 0x0066, 0x2031, 0x0000, 0x6020, + 0x9084, 0x000f, 0x001b, 0x006e, 0x012e, 0x0005, 0xb27f, 0xb27f, + 0xb27a, 0xb2a1, 0xb26d, 0xb27a, 0xb2a1, 0xb27a, 0xb26d, 0xb26d, + 0xb27a, 0xb27a, 0xb27a, 0xb26d, 0xb26d, 0x080c, 0x0db2, 0x0036, + 0x2019, 0x0010, 0x080c, 0xcbad, 0x6023, 0x0006, 0x6003, 0x0007, + 0x003e, 0x0005, 0x9006, 0x0005, 0x9085, 0x0001, 0x0005, 0x0096, + 0x86ff, 0x11d8, 0x6014, 0x2048, 0x080c, 0xb5fb, 0x01c0, 0xa864, + 0x9086, 0x0139, 0x1128, 0xa87b, 0x0005, 0xa883, 0x0000, 0x0028, + 0x900e, 0x2001, 0x0005, 0x080c, 0x6770, 0x080c, 0xb8e9, 0x080c, + 0x6529, 0x080c, 0x9a06, 0x9085, 0x0001, 0x009e, 0x0005, 0x9006, + 0x0ce0, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0db2, 0x0002, 0xb2b7, + 0xb2dc, 0xb2b9, 0xb2fd, 0xb2d7, 0xb2b7, 0xb27a, 0xb27f, 0xb27f, + 0xb27a, 0xb27a, 0xb27a, 0xb27a, 0xb27a, 0xb27a, 0xb27a, 0x080c, + 0x0db2, 0x86ff, 0x11c8, 0x6020, 0x9086, 0x0006, 0x01a8, 0x0096, + 0x6014, 0x2048, 0x080c, 0xb5fb, 0x0110, 0x080c, 0xb8e9, 0x009e, + 0x080c, 0xbca8, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, + 0x080c, 0x8000, 0x080c, 0x8582, 0x9085, 0x0001, 0x0005, 0x0066, + 0x080c, 0x1827, 0x006e, 0x08e8, 0x00e6, 0x2071, 0x19b6, 0x7024, + 0x9c06, 0x1120, 0x080c, 0x91de, 0x00ee, 0x0898, 0x6020, 0x9084, + 0x000f, 0x9086, 0x0006, 0x1150, 0x0086, 0x0096, 0x2049, 0x0001, + 0x2c40, 0x080c, 0x9349, 0x009e, 0x008e, 0x0010, 0x080c, 0x90db, + 0x00ee, 0x1904, 0xb2b9, 0x0804, 0xb27a, 0x0036, 0x00e6, 0x2071, + 0x19b6, 0x703c, 0x9c06, 0x1138, 0x901e, 0x080c, 0x9254, 0x00ee, + 0x003e, 0x0804, 0xb2b9, 0x080c, 0x9479, 0x00ee, 0x003e, 0x1904, + 0xb2b9, 0x0804, 0xb27a, 0x00c6, 0x6020, 0x9084, 0x000f, 0x0013, + 0x00ce, 0x0005, 0xb330, 0xb3df, 0xb546, 0xb33a, 0x9a06, 0xb330, + 0xcb9f, 0xbd0e, 0xb3df, 0xb329, 0xb5c5, 0xb329, 0xb329, 0xb329, + 0xb329, 0x080c, 0x0db2, 0x080c, 0xb7fa, 0x1110, 0x080c, 0xa364, + 0x0005, 0x080c, 0x847d, 0x080c, 0x8582, 0x0804, 0x99d6, 0x601b, + 0x0001, 0x0005, 0x080c, 0xb5fb, 0x0130, 0x6014, 0x0096, 0x2048, + 0x2c00, 0xa896, 0x009e, 0x6000, 0x908a, 0x0016, 0x1a0c, 0x0db2, + 0x0002, 0xb359, 0xb35b, 0xb37f, 0xb393, 0xb3b7, 0xb359, 0xb330, + 0xb330, 0xb330, 0xb393, 0xb393, 0xb359, 0xb359, 0xb359, 0xb359, + 0xb39d, 0x080c, 0x0db2, 0x00e6, 0x6014, 0x0096, 0x2048, 0xa880, + 0xc0b5, 0xa882, 0x009e, 0x2071, 0x19b6, 0x7024, 0x9c06, 0x01a0, + 0x080c, 0x90db, 0x080c, 0xbca8, 0x6007, 0x0085, 0x6003, 0x000b, + 0x6023, 0x0002, 0x2001, 0x1956, 0x2004, 0x601a, 0x080c, 0x8000, + 0x080c, 0x8582, 0x00ee, 0x0005, 0x601b, 0x0001, 0x0cd8, 0x0096, + 0x6014, 0x2048, 0xa880, 0xc0b5, 0xa882, 0x009e, 0x080c, 0xbca8, + 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, 0x080c, 0x8000, + 0x080c, 0x8582, 0x0005, 0x0096, 0x601b, 0x0001, 0x6014, 0x2048, + 0xa880, 0xc0b5, 0xa882, 0x009e, 0x0005, 0x080c, 0x511b, 0x01a8, + 0x6014, 0x0096, 0x904d, 0x0180, 0xa864, 0xa867, 0x0103, 0xa87b, + 0x0006, 0x9086, 0x0139, 0x1140, 0xa867, 0x0139, 0xa897, 0x4005, + 0xa89b, 0x0004, 0x080c, 0x6536, 0x009e, 0x0804, 0x99d6, 0x6014, + 0x0096, 0x904d, 0x01f8, 0xa97c, 0xd1e4, 0x01e0, 0x2001, 0x180e, + 0x2004, 0xd0c4, 0x0110, 0x009e, 0x0005, 0xa884, 0x009e, 0x8003, + 0x800b, 0x810b, 0x9108, 0x611a, 0x2001, 0x0037, 0x2c08, 0x080c, + 0x14d2, 0x6000, 0x9086, 0x0004, 0x1120, 0x2009, 0x0048, 0x080c, + 0x9a50, 0x0005, 0x009e, 0x080c, 0x1827, 0x0804, 0xb37f, 0x6000, + 0x908a, 0x0016, 0x1a0c, 0x0db2, 0x000b, 0x0005, 0xb3f6, 0xb337, + 0xb3f8, 0xb3f6, 0xb3f8, 0xb3f8, 0xb331, 0xb3f6, 0xb32b, 0xb32b, + 0xb3f6, 0xb3f6, 0xb3f6, 0xb3f6, 0xb3f6, 0xb3f6, 0x080c, 0x0db2, + 0x6010, 0x00b6, 0x2058, 0xb804, 0x9084, 0x00ff, 0x00be, 0x908a, + 0x000c, 0x1a0c, 0x0db2, 0x00b6, 0x0013, 0x00be, 0x0005, 0xb413, + 0xb4e0, 0xb415, 0xb455, 0xb415, 0xb455, 0xb415, 0xb423, 0xb413, + 0xb455, 0xb413, 0xb444, 0x080c, 0x0db2, 0x6004, 0x908e, 0x0016, + 0x05c0, 0x908e, 0x0004, 0x05a8, 0x908e, 0x0002, 0x0590, 0x908e, + 0x0052, 0x0904, 0xb4dc, 0x6004, 0x080c, 0xb7fa, 0x0904, 0xb4f9, + 0x908e, 0x0004, 0x1110, 0x080c, 0x2e55, 0x908e, 0x0021, 0x0904, + 0xb4fd, 0x908e, 0x0022, 0x0904, 0xb541, 0x908e, 0x003d, 0x0904, + 0xb4fd, 0x908e, 0x0039, 0x0904, 0xb501, 0x908e, 0x0035, 0x0904, + 0xb501, 0x908e, 0x001e, 0x0178, 0x908e, 0x0001, 0x1140, 0x6010, + 0x2058, 0xb804, 0x9084, 0x00ff, 0x9086, 0x0006, 0x0110, 0x080c, + 0x2e30, 0x080c, 0xa364, 0x0804, 0x9a06, 0x00c6, 0x00d6, 0x6104, + 0x9186, 0x0016, 0x0904, 0xb4cd, 0x9186, 0x0002, 0x1904, 0xb4a2, + 0x2001, 0x1835, 0x2004, 0xd08c, 0x11c8, 0x080c, 0x6c53, 0x11b0, + 0x080c, 0xbcec, 0x0138, 0x080c, 0x6c76, 0x1120, 0x080c, 0x6b68, + 0x0804, 0xb52a, 0x2001, 0x194e, 0x2003, 0x0001, 0x2001, 0x1800, + 0x2003, 0x0001, 0x080c, 0x6b8a, 0x0804, 0xb52a, 0x6010, 0x2058, + 0x2001, 0x1835, 0x2004, 0xd0ac, 0x1904, 0xb52a, 0xb8a0, 0x9084, + 0xff80, 0x1904, 0xb52a, 0xb840, 0x9084, 0x00ff, 0x9005, 0x0190, + 0x8001, 0xb842, 0x6017, 0x0000, 0x6023, 0x0007, 0x601b, 0x0398, + 0x6043, 0x0000, 0x080c, 0x9980, 0x0128, 0x2b00, 0x6012, 0x6023, + 0x0001, 0x0458, 0x00de, 0x00ce, 0x6004, 0x908e, 0x0002, 0x11a0, + 0x6010, 0x2058, 0xb8a0, 0x9086, 0x007e, 0x1170, 0x2009, 0x1835, + 0x2104, 0xc085, 0x200a, 0x00e6, 0x2071, 0x1800, 0x080c, 0x59b4, + 0x00ee, 0x080c, 0xa364, 0x0030, 0x080c, 0xa364, 0x080c, 0x2e30, + 0x080c, 0xbd01, 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x2e55, + 0x012e, 0x00ee, 0x080c, 0x9a06, 0x0005, 0x2001, 0x0002, 0x080c, + 0x5ecf, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x8048, 0x080c, + 0x8582, 0x00de, 0x00ce, 0x0c80, 0x080c, 0x2e55, 0x0804, 0xb451, + 0x00c6, 0x00d6, 0x6104, 0x9186, 0x0016, 0x0d38, 0x6010, 0x2058, + 0xb840, 0x9084, 0x00ff, 0x9005, 0x0904, 0xb4a2, 0x8001, 0xb842, + 0x6003, 0x0001, 0x080c, 0x8048, 0x080c, 0x8582, 0x00de, 0x00ce, + 0x0898, 0x080c, 0xa364, 0x0804, 0xb453, 0x080c, 0xa3a0, 0x0804, + 0xb453, 0x00d6, 0x2c68, 0x6104, 0x080c, 0xbc66, 0x00de, 0x0118, + 0x080c, 0x99d6, 0x00f0, 0x6004, 0x8007, 0x6134, 0x918c, 0x00ff, + 0x9105, 0x6036, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, 0x0002, + 0x603c, 0x600a, 0x2001, 0x1956, 0x2004, 0x601a, 0x602c, 0x2c08, + 0x2060, 0x6024, 0xc0b5, 0x6026, 0x2160, 0x080c, 0x8000, 0x080c, + 0x8582, 0x0005, 0x00de, 0x00ce, 0x080c, 0xa364, 0x080c, 0x2e30, + 0x00e6, 0x0126, 0x2091, 0x8000, 0x080c, 0x2e55, 0x6017, 0x0000, + 0x6023, 0x0007, 0x601b, 0x0398, 0x6043, 0x0000, 0x012e, 0x00ee, + 0x0005, 0x080c, 0x9e03, 0x1904, 0xb4f9, 0x0005, 0x6000, 0x908a, + 0x0016, 0x1a0c, 0x0db2, 0x0096, 0x00d6, 0x001b, 0x00de, 0x009e, + 0x0005, 0xb561, 0xb561, 0xb561, 0xb561, 0xb561, 0xb561, 0xb561, + 0xb561, 0xb561, 0xb330, 0xb561, 0xb337, 0xb563, 0xb337, 0xb570, + 0xb561, 0x080c, 0x0db2, 0x6004, 0x9086, 0x008b, 0x0148, 0x6007, + 0x008b, 0x6003, 0x000d, 0x080c, 0x8000, 0x080c, 0x8582, 0x0005, + 0x080c, 0xbce0, 0x0118, 0x080c, 0xbcf3, 0x0010, 0x080c, 0xbd01, + 0x080c, 0xb7dd, 0x080c, 0xb5fb, 0x0570, 0x080c, 0x2e30, 0x080c, + 0xb5fb, 0x0168, 0x6014, 0x2048, 0xa867, 0x0103, 0xa87b, 0x0006, + 0xa877, 0x0000, 0xa880, 0xc0ed, 0xa882, 0x080c, 0x6536, 0x2c68, + 0x080c, 0x9980, 0x0150, 0x6810, 0x6012, 0x080c, 0xba69, 0x00c6, + 0x2d60, 0x080c, 0x9a06, 0x00ce, 0x0008, 0x2d60, 0x6017, 0x0000, + 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, 0x8048, + 0x080c, 0x8582, 0x00c8, 0x080c, 0xbce0, 0x0138, 0x6034, 0x9086, + 0x4000, 0x1118, 0x080c, 0x2e30, 0x08d0, 0x6034, 0x908c, 0xff00, + 0x810f, 0x9186, 0x0039, 0x0118, 0x9186, 0x0035, 0x1118, 0x080c, + 0x2e30, 0x0868, 0x080c, 0x9a06, 0x0005, 0x6000, 0x908a, 0x0016, + 0x1a0c, 0x0db2, 0x0002, 0xb5db, 0xb5db, 0xb5dd, 0xb5dd, 0xb5dd, + 0xb5db, 0xb5db, 0x9a06, 0xb5db, 0xb5db, 0xb5db, 0xb5db, 0xb5db, + 0xb5db, 0xb5db, 0xb5db, 0x080c, 0x0db2, 0x080c, 0x9479, 0x6114, + 0x0096, 0x2148, 0xa87b, 0x0006, 0x080c, 0x6536, 0x009e, 0x0804, + 0x99d6, 0x9284, 0x0007, 0x1158, 0x9282, 0x1cd0, 0x0240, 0x2001, + 0x1818, 0x2004, 0x9202, 0x1218, 0x9085, 0x0001, 0x0005, 0x9006, + 0x0ce8, 0x0096, 0x0028, 0x0096, 0x0006, 0x6014, 0x2048, 0x000e, + 0x0006, 0x9984, 0xf000, 0x9086, 0xf000, 0x0110, 0x080c, 0x1080, + 0x000e, 0x009e, 0x0005, 0x00e6, 0x00c6, 0x0036, 0x0006, 0x0126, + 0x2091, 0x8000, 0x2061, 0x1cd0, 0x2071, 0x1800, 0x734c, 0x706c, + 0x9302, 0x1640, 0x6020, 0x9206, 0x11f8, 0x080c, 0xbcec, 0x0180, + 0x9286, 0x0001, 0x1168, 0x6004, 0x9086, 0x0004, 0x1148, 0x080c, + 0x2e30, 0x080c, 0xbd01, 0x00c6, 0x080c, 0x9a06, 0x00ce, 0x0060, + 0x080c, 0xb9e3, 0x0148, 0x080c, 0xb7fa, 0x1110, 0x080c, 0xa364, + 0x00c6, 0x080c, 0x99d6, 0x00ce, 0x9ce0, 0x0018, 0x7060, 0x9c02, + 0x1208, 0x08a0, 0x012e, 0x000e, 0x003e, 0x00ce, 0x00ee, 0x0005, + 0x00e6, 0x00c6, 0x0016, 0x9188, 0x1000, 0x210c, 0x81ff, 0x0128, + 0x2061, 0x1a73, 0x6112, 0x080c, 0x2e30, 0x9006, 0x0010, 0x9085, + 0x0001, 0x001e, 0x00ce, 0x00ee, 0x0005, 0x00c6, 0x0126, 0x2091, + 0x8000, 0x080c, 0x9980, 0x01d8, 0x080c, 0x511b, 0x0110, 0x662e, + 0x0008, 0x6616, 0x2b00, 0x6012, 0x080c, 0x511b, 0x0118, 0x080c, + 0xb721, 0x0168, 0x080c, 0xba69, 0x6023, 0x0003, 0x2009, 0x004b, + 0x080c, 0x9a50, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, + 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0xbaa0, 0x080c, 0x9a23, + 0x0590, 0x080c, 0x511b, 0x0118, 0x602f, 0x0000, 0x0010, 0x6017, + 0x0000, 0x2b00, 0x6012, 0x080c, 0xba69, 0x6023, 0x0003, 0x0016, + 0x080c, 0x8180, 0x0076, 0x903e, 0x080c, 0x8078, 0x2c08, 0x080c, + 0xcd62, 0x007e, 0x001e, 0xd184, 0x0128, 0x080c, 0x99d6, 0x9085, + 0x0001, 0x0070, 0x080c, 0x511b, 0x0128, 0xd18c, 0x1170, 0x080c, + 0xb721, 0x0148, 0x2009, 0x004c, 0x080c, 0x9a50, 0x9085, 0x0001, + 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2900, 0x6016, 0x0c90, + 0x2009, 0x004d, 0x0010, 0x2009, 0x004e, 0x00f6, 0x00c6, 0x0046, + 0x0016, 0x080c, 0x9980, 0x2c78, 0x01d8, 0x080c, 0x511b, 0x0110, + 0x7e2e, 0x0008, 0x7e16, 0x2b00, 0x7812, 0x7823, 0x0003, 0x2021, + 0x0005, 0x080c, 0xb733, 0x2f60, 0x080c, 0x511b, 0x0118, 0x080c, + 0xb721, 0x0130, 0x001e, 0x0016, 0x080c, 0x9a50, 0x9085, 0x0001, + 0x001e, 0x004e, 0x00ce, 0x00fe, 0x0005, 0x00f6, 0x00c6, 0x0046, + 0x080c, 0x9980, 0x2c78, 0x0530, 0x080c, 0x511b, 0x0110, 0x7e2e, + 0x0008, 0x7e16, 0x2b00, 0x7812, 0x7823, 0x0003, 0x0096, 0x2021, + 0x0004, 0x0489, 0x009e, 0x2001, 0x194f, 0x200c, 0xd1fc, 0x0120, + 0x2f60, 0x080c, 0x99d6, 0x0060, 0x2f60, 0x080c, 0x511b, 0x0120, + 0xd18c, 0x1160, 0x0071, 0x0130, 0x2009, 0x0052, 0x080c, 0x9a50, + 0x9085, 0x0001, 0x004e, 0x00ce, 0x00fe, 0x0005, 0x2900, 0x7816, + 0x0c98, 0x00c6, 0x080c, 0x4612, 0x00ce, 0x1120, 0x080c, 0x99d6, + 0x9006, 0x0005, 0xa867, 0x0000, 0xa86b, 0x8000, 0x2900, 0x6016, + 0x9085, 0x0001, 0x0005, 0x0096, 0x0076, 0x0126, 0x2091, 0x8000, + 0x080c, 0x60b2, 0x0158, 0x2001, 0xb738, 0x0006, 0x900e, 0x2400, + 0x080c, 0x6770, 0x080c, 0x6536, 0x000e, 0x0807, 0x2418, 0x080c, + 0x8417, 0xbaa0, 0x0086, 0x2041, 0x0001, 0x2039, 0x0001, 0x2608, + 0x080c, 0x8198, 0x008e, 0x080c, 0x8078, 0x2f08, 0x2648, 0x080c, + 0xcd62, 0xb93c, 0x81ff, 0x090c, 0x8269, 0x080c, 0x8582, 0x012e, + 0x007e, 0x009e, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, + 0x9980, 0x0190, 0x660a, 0x2b08, 0x6112, 0x080c, 0xba69, 0x6023, + 0x0001, 0x2900, 0x6016, 0x2009, 0x001f, 0x080c, 0x9a50, 0x9085, + 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x00c6, 0x0126, + 0x2091, 0x8000, 0x080c, 0x9a23, 0x01b8, 0x660a, 0x2b08, 0x6112, + 0x080c, 0xba69, 0x6023, 0x0008, 0x2900, 0x6016, 0x00f6, 0x2c78, + 0x080c, 0x1582, 0x00fe, 0x2009, 0x0021, 0x080c, 0x9a50, 0x9085, + 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, 0x003d, + 0x00c6, 0x0126, 0x0016, 0x2091, 0x8000, 0x080c, 0x9980, 0x0198, + 0x660a, 0x2b08, 0x6112, 0x080c, 0xba69, 0x6023, 0x0001, 0x2900, + 0x6016, 0x001e, 0x0016, 0x080c, 0x9a50, 0x9085, 0x0001, 0x001e, + 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd0, 0x00c6, 0x0126, 0x2091, + 0x8000, 0x080c, 0x9a23, 0x0188, 0x2b08, 0x6112, 0x080c, 0xba69, + 0x6023, 0x0001, 0x2900, 0x6016, 0x2009, 0x0000, 0x080c, 0x9a50, + 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, 0x9006, 0x0cd8, 0x2009, + 0x0044, 0x0830, 0x2009, 0x0049, 0x0818, 0x0026, 0x00b6, 0x6210, + 0x2258, 0xba3c, 0x82ff, 0x0110, 0x8211, 0xba3e, 0x00be, 0x002e, + 0x0005, 0x0006, 0x0016, 0x6004, 0x908e, 0x0002, 0x0140, 0x908e, + 0x0003, 0x0128, 0x908e, 0x0004, 0x0110, 0x9085, 0x0001, 0x001e, + 0x000e, 0x0005, 0x0006, 0x0096, 0x6020, 0x9086, 0x0004, 0x0190, + 0x6014, 0x904d, 0x080c, 0xb5fb, 0x0168, 0xa864, 0x9086, 0x0139, + 0x0158, 0x6020, 0x9086, 0x0003, 0x0128, 0xa868, 0xd0fc, 0x0110, + 0x9006, 0x0010, 0x9085, 0x0001, 0x009e, 0x000e, 0x0005, 0x00c6, + 0x0126, 0x2091, 0x8000, 0x080c, 0x9a23, 0x0198, 0x2b08, 0x6112, + 0x080c, 0xba69, 0x6023, 0x0001, 0x2900, 0x6016, 0x080c, 0x2e30, + 0x2009, 0x0028, 0x080c, 0x9a50, 0x9085, 0x0001, 0x012e, 0x00ce, + 0x0005, 0x9006, 0x0cd8, 0x9186, 0x0015, 0x11a8, 0x2011, 0x1822, + 0x2204, 0x9086, 0x0074, 0x1178, 0x00b6, 0x080c, 0xa5aa, 0x00be, + 0x080c, 0xa7a4, 0x6003, 0x0001, 0x6007, 0x0029, 0x080c, 0x8048, + 0x080c, 0x8582, 0x0078, 0x6014, 0x0096, 0x2048, 0xa868, 0x009e, + 0xd0fc, 0x0148, 0x2001, 0x0001, 0x080c, 0xbc27, 0x080c, 0xa364, + 0x080c, 0x99d6, 0x0005, 0x0096, 0x6014, 0x904d, 0x090c, 0x0db2, + 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, + 0xa867, 0x0139, 0x0126, 0x2091, 0x8000, 0x080c, 0x6536, 0x012e, + 0x009e, 0x080c, 0x99d6, 0x0c30, 0x0096, 0x9186, 0x0016, 0x1128, + 0x2001, 0x0004, 0x080c, 0x5ecf, 0x00e8, 0x9186, 0x0015, 0x1510, + 0x2011, 0x1822, 0x2204, 0x9086, 0x0014, 0x11e0, 0x6010, 0x00b6, + 0x2058, 0x080c, 0x6019, 0x00be, 0x080c, 0xa875, 0x1198, 0x6010, + 0x00b6, 0x2058, 0xb890, 0x00be, 0x9005, 0x0160, 0x2001, 0x0006, + 0x080c, 0x5ecf, 0x6014, 0x2048, 0xa868, 0xd0fc, 0x0170, 0x080c, + 0x9dd7, 0x0048, 0x6014, 0x2048, 0xa868, 0xd0fc, 0x0528, 0x080c, + 0xa364, 0x080c, 0x99d6, 0x009e, 0x0005, 0x6014, 0x6310, 0x2358, + 0x904d, 0x090c, 0x0db2, 0xa87b, 0x0000, 0xa883, 0x0000, 0xa897, + 0x4000, 0x900e, 0x080c, 0x619e, 0x1108, 0xc185, 0xb800, 0xd0bc, + 0x0108, 0xc18d, 0xa99a, 0x0126, 0x2091, 0x8000, 0x080c, 0x6536, + 0x012e, 0x080c, 0x99d6, 0x08f8, 0x6014, 0x904d, 0x090c, 0x0db2, + 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, 0x4005, 0xa89b, 0x0004, + 0xa867, 0x0139, 0x0126, 0x2091, 0x8000, 0x080c, 0x6536, 0x012e, + 0x080c, 0x99d6, 0x0840, 0xa878, 0x9086, 0x0005, 0x1108, 0x0009, + 0x0005, 0xa880, 0xc0ad, 0xa882, 0x0005, 0x6043, 0x0000, 0x6017, + 0x0000, 0x6003, 0x0001, 0x6007, 0x0050, 0x080c, 0x8000, 0x080c, + 0x8582, 0x0005, 0x00c6, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, + 0xd0bc, 0x0120, 0x6020, 0x9084, 0x000f, 0x0013, 0x00ce, 0x0005, + 0xb330, 0xb919, 0xb919, 0xb91c, 0xd030, 0xd04b, 0xd04e, 0xb330, + 0xb330, 0xb330, 0xb330, 0xb330, 0xb330, 0xb330, 0xb330, 0x080c, + 0x0db2, 0xa001, 0xa001, 0x0005, 0x0096, 0x6014, 0x904d, 0x0118, + 0xa87c, 0xd0e4, 0x1110, 0x009e, 0x0010, 0x009e, 0x0005, 0x6010, + 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0bc, 0x0550, 0x2001, 0x1832, + 0x2004, 0x9005, 0x1540, 0x00f6, 0x2c78, 0x080c, 0x9980, 0x0508, + 0x7810, 0x6012, 0x080c, 0xba69, 0x7820, 0x9086, 0x0003, 0x0128, + 0x7808, 0x603a, 0x2f00, 0x603e, 0x0020, 0x7808, 0x603e, 0x2f00, + 0x603a, 0x602e, 0x6023, 0x0001, 0x6007, 0x0035, 0x6003, 0x0001, + 0x7954, 0x6156, 0x080c, 0x8000, 0x080c, 0x8582, 0x2f60, 0x00fe, + 0x0005, 0x2f60, 0x00fe, 0x2001, 0x1957, 0x2004, 0x6042, 0x0005, + 0x0016, 0x0096, 0x6814, 0x2048, 0xa87c, 0xd0e4, 0x0180, 0xc0e4, + 0xa87e, 0xa877, 0x0000, 0xa893, 0x0000, 0xa88f, 0x0000, 0xd0cc, + 0x0130, 0xc0cc, 0xa87e, 0xa878, 0x2048, 0x080c, 0x0f87, 0x6830, + 0x6036, 0x908e, 0x0001, 0x0148, 0x6803, 0x0002, 0x9086, 0x0005, + 0x0170, 0x9006, 0x602e, 0x6032, 0x00d0, 0x681c, 0xc085, 0x681e, + 0x6803, 0x0004, 0x6824, 0xc0f4, 0x9085, 0x0c00, 0x6826, 0x6814, + 0x2048, 0xa8ac, 0x6938, 0x9102, 0xa8b0, 0x693c, 0x9103, 0x1e48, + 0x683c, 0x602e, 0x6838, 0x9084, 0xfffc, 0x683a, 0x6032, 0x2d00, + 0x603a, 0x6808, 0x603e, 0x6910, 0x6112, 0x6954, 0x6156, 0x6023, + 0x0001, 0x6007, 0x0039, 0x6003, 0x0001, 0x080c, 0x8000, 0x080c, + 0x8582, 0x009e, 0x001e, 0x0005, 0x6024, 0xd0d4, 0x0510, 0xd0f4, + 0x11f8, 0x6038, 0x940a, 0x603c, 0x9303, 0x0230, 0x9105, 0x0120, + 0x6024, 0xc0d4, 0xc0f5, 0x0098, 0x643a, 0x633e, 0xac3e, 0xab42, + 0x0046, 0x0036, 0x2400, 0xacac, 0x9402, 0xa836, 0x2300, 0xabb0, + 0x9303, 0xa83a, 0x003e, 0x004e, 0x6024, 0xc0d4, 0x0000, 0x6026, + 0x0005, 0xd0f4, 0x1138, 0xa83c, 0x603a, 0xa840, 0x603e, 0x6024, + 0xc0f5, 0x6026, 0x0005, 0x0006, 0x0016, 0x6004, 0x908e, 0x0034, + 0x01b8, 0x908e, 0x0035, 0x01a0, 0x908e, 0x0036, 0x0188, 0x908e, + 0x0037, 0x0170, 0x908e, 0x0038, 0x0158, 0x908e, 0x0039, 0x0140, + 0x908e, 0x003a, 0x0128, 0x908e, 0x003b, 0x0110, 0x9085, 0x0001, + 0x001e, 0x000e, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00e6, + 0x2001, 0x1951, 0x200c, 0x8000, 0x2014, 0x2001, 0x0032, 0x080c, + 0x7e7f, 0x2001, 0x1955, 0x82ff, 0x1110, 0x2011, 0x0014, 0x2202, + 0x2001, 0x1953, 0x200c, 0x8000, 0x2014, 0x2071, 0x193d, 0x711a, + 0x721e, 0x2001, 0x0064, 0x080c, 0x7e7f, 0x2001, 0x1956, 0x82ff, + 0x1110, 0x2011, 0x0014, 0x2202, 0x2001, 0x1957, 0x9288, 0x000a, + 0x2102, 0x2001, 0x1a55, 0x2102, 0x2001, 0x0032, 0x080c, 0x14d2, + 0x080c, 0x6285, 0x00ee, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, + 0x0006, 0x0016, 0x00e6, 0x2001, 0x1955, 0x2003, 0x0028, 0x2001, + 0x1956, 0x2003, 0x0014, 0x2071, 0x193d, 0x701b, 0x0000, 0x701f, + 0x07d0, 0x2001, 0x1957, 0x2009, 0x001e, 0x2102, 0x2001, 0x1a55, + 0x2102, 0x2001, 0x0032, 0x080c, 0x14d2, 0x00ee, 0x001e, 0x000e, + 0x0005, 0x0096, 0x6058, 0x904d, 0x0110, 0x080c, 0x1007, 0x009e, + 0x0005, 0x0005, 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9980, + 0x0180, 0x2b08, 0x6112, 0x0ca9, 0x6023, 0x0001, 0x2900, 0x6016, + 0x2009, 0x0033, 0x080c, 0x9a50, 0x9085, 0x0001, 0x012e, 0x00ce, + 0x0005, 0x9006, 0x0cd8, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, + 0x9186, 0x0015, 0x1500, 0x7088, 0x9086, 0x0018, 0x11e0, 0x6014, + 0x2048, 0xaa3c, 0xd2e4, 0x1160, 0x2c78, 0x080c, 0x8772, 0x01d8, + 0x7074, 0xaa50, 0x9206, 0x1160, 0x7078, 0xaa54, 0x9206, 0x1140, + 0x6210, 0x00b6, 0x2258, 0xbaa0, 0x00be, 0x900e, 0x080c, 0x2e75, + 0x080c, 0x9dd7, 0x0020, 0x080c, 0xa364, 0x080c, 0x99d6, 0x00fe, + 0x00ee, 0x009e, 0x0005, 0x7058, 0xaa54, 0x9206, 0x0d48, 0x0c80, + 0x00c6, 0x0126, 0x2091, 0x8000, 0x080c, 0x9980, 0x0188, 0x2b08, + 0x6112, 0x080c, 0xba69, 0x6023, 0x0001, 0x2900, 0x6016, 0x2009, + 0x004d, 0x080c, 0x9a50, 0x9085, 0x0001, 0x012e, 0x00ce, 0x0005, + 0x9006, 0x0cd8, 0x00c6, 0x0126, 0x2091, 0x8000, 0x0016, 0x080c, + 0x9980, 0x0180, 0x2b08, 0x6112, 0x080c, 0xba69, 0x6023, 0x0001, + 0x2900, 0x6016, 0x001e, 0x080c, 0x9a50, 0x9085, 0x0001, 0x012e, + 0x00ce, 0x0005, 0x001e, 0x9006, 0x0cd0, 0x0016, 0x0026, 0x0036, + 0x0046, 0x0056, 0x0066, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, + 0x9186, 0x0015, 0x1568, 0x7188, 0x6014, 0x2048, 0xa814, 0x8003, + 0x9106, 0x1530, 0x20e1, 0x0000, 0x2001, 0x196f, 0x2003, 0x0000, + 0x6014, 0x2048, 0xa830, 0x20a8, 0x8906, 0x8006, 0x8007, 0x9094, + 0x003f, 0x22e8, 0x9084, 0xffc0, 0x9080, 0x001b, 0x20a0, 0x2001, + 0x196f, 0x0016, 0x200c, 0x080c, 0xc29a, 0x001e, 0xa804, 0x9005, + 0x0110, 0x2048, 0x0c38, 0x6014, 0x2048, 0xa867, 0x0103, 0x0010, + 0x080c, 0xa364, 0x080c, 0x99d6, 0x00fe, 0x00ee, 0x009e, 0x006e, + 0x005e, 0x004e, 0x003e, 0x002e, 0x001e, 0x0005, 0x0096, 0x00e6, + 0x00f6, 0x2071, 0x1800, 0x9186, 0x0015, 0x11b8, 0x7088, 0x9086, + 0x0004, 0x1198, 0x6014, 0x2048, 0x2c78, 0x080c, 0x8772, 0x01a8, + 0x7074, 0xaa74, 0x9206, 0x1130, 0x7078, 0xaa78, 0x9206, 0x1110, + 0x080c, 0x2e30, 0x080c, 0x9dd7, 0x0020, 0x080c, 0xa364, 0x080c, + 0x99d6, 0x00fe, 0x00ee, 0x009e, 0x0005, 0x7058, 0xaa78, 0x9206, + 0x0d78, 0x0c80, 0x0096, 0x00e6, 0x00f6, 0x2071, 0x1800, 0x9186, + 0x0015, 0x1550, 0x7088, 0x9086, 0x0004, 0x1530, 0x6014, 0x2048, + 0x2c78, 0x080c, 0x8772, 0x05e8, 0x7074, 0xaacc, 0x9206, 0x1180, + 0x7078, 0xaad0, 0x9206, 0x1160, 0x080c, 0x2e30, 0x0016, 0xa998, + 0xaab0, 0x9284, 0x1000, 0xc0fd, 0x080c, 0x50cb, 0x001e, 0x0010, + 0x080c, 0x4ebc, 0x080c, 0xb5fb, 0x0500, 0xa87b, 0x0000, 0xa883, + 0x0000, 0xa897, 0x4000, 0x0078, 0x080c, 0x4ebc, 0x080c, 0xb5fb, + 0x01a0, 0x6014, 0x2048, 0xa87b, 0x0030, 0xa883, 0x0000, 0xa897, + 0x4005, 0xa89b, 0x0004, 0x0126, 0x2091, 0x8000, 0xa867, 0x0139, + 0x080c, 0x6536, 0x012e, 0x080c, 0x99d6, 0x00fe, 0x00ee, 0x009e, + 0x0005, 0x7058, 0xaad0, 0x9206, 0x0938, 0x0890, 0x0016, 0x0026, + 0xa87c, 0xd0ac, 0x0178, 0xa938, 0xaa34, 0x2100, 0x9205, 0x0150, + 0xa890, 0x9106, 0x1118, 0xa88c, 0x9206, 0x0120, 0xa992, 0xaa8e, + 0x9085, 0x0001, 0x002e, 0x001e, 0x0005, 0x00b6, 0x00d6, 0x0036, + 0x080c, 0xb5fb, 0x0904, 0xbc23, 0x0096, 0x6314, 0x2348, 0xa87a, + 0xa982, 0x929e, 0x4000, 0x1580, 0x6310, 0x00c6, 0x2358, 0x2009, + 0x0000, 0xa868, 0xd0f4, 0x1140, 0x080c, 0x619e, 0x1108, 0xc185, + 0xb800, 0xd0bc, 0x0108, 0xc18d, 0xaa96, 0xa99a, 0x20a9, 0x0004, + 0xa860, 0x20e8, 0xa85c, 0x9080, 0x0031, 0x20a0, 0xb8b4, 0x20e0, + 0xb8b8, 0x9080, 0x0006, 0x2098, 0x080c, 0x0f52, 0x20a9, 0x0004, + 0xa85c, 0x9080, 0x0035, 0x20a0, 0xb8b8, 0x9080, 0x000a, 0x2098, + 0x080c, 0x0f52, 0x00ce, 0x0090, 0xaa96, 0x3918, 0x9398, 0x0007, + 0x231c, 0x6004, 0x9086, 0x0016, 0x0110, 0xa89b, 0x0004, 0xaba2, + 0x6310, 0x2358, 0xb804, 0x9084, 0x00ff, 0xa89e, 0x080c, 0x6529, + 0x6017, 0x0000, 0x009e, 0x003e, 0x00de, 0x00be, 0x0005, 0x0026, + 0x0036, 0x0046, 0x00b6, 0x0096, 0x00f6, 0x6214, 0x2248, 0x6210, + 0x2258, 0x2079, 0x0260, 0x9096, 0x0000, 0x11a0, 0xb814, 0x9084, + 0x00ff, 0x900e, 0x080c, 0x24d6, 0x2118, 0x831f, 0x939c, 0xff00, + 0x7838, 0x9084, 0x00ff, 0x931d, 0x7c3c, 0x2011, 0x8018, 0x080c, + 0x4672, 0x00a8, 0x9096, 0x0001, 0x1148, 0x89ff, 0x0180, 0xa89b, + 0x000d, 0x7838, 0xa8a6, 0x783c, 0xa8aa, 0x0048, 0x9096, 0x0002, + 0x1130, 0xa89b, 0x000d, 0x7838, 0xa8a6, 0x783c, 0xa8aa, 0x00fe, + 0x009e, 0x00be, 0x004e, 0x003e, 0x002e, 0x0005, 0x00c6, 0x0026, + 0x0016, 0x9186, 0x0035, 0x0110, 0x6a38, 0x0008, 0x6a2c, 0x080c, + 0xb5e9, 0x01f0, 0x2260, 0x6120, 0x9186, 0x0003, 0x0118, 0x9186, + 0x0006, 0x1190, 0x6838, 0x9206, 0x0140, 0x683c, 0x9206, 0x1160, + 0x6108, 0x6838, 0x9106, 0x1140, 0x0020, 0x6008, 0x693c, 0x9106, + 0x1118, 0x6010, 0x6910, 0x9106, 0x001e, 0x002e, 0x00ce, 0x0005, + 0x9085, 0x0001, 0x0cc8, 0xa974, 0xd1cc, 0x0188, 0x918c, 0x00ff, + 0x918e, 0x0002, 0x1160, 0xa9a8, 0x918c, 0x0f00, 0x810f, 0x918e, + 0x0001, 0x1128, 0xa834, 0xa938, 0x9115, 0x190c, 0xad37, 0x0005, + 0x0036, 0x2019, 0x0001, 0x0010, 0x0036, 0x901e, 0x0489, 0x01d0, + 0x080c, 0xb5fb, 0x01b8, 0x6037, 0x4000, 0x6014, 0x6017, 0x0000, + 0x0096, 0x2048, 0xa87c, 0x080c, 0xb7fa, 0x1118, 0x080c, 0xa364, + 0x0040, 0xa867, 0x0103, 0xa877, 0x0000, 0x83ff, 0x1129, 0x080c, + 0x6536, 0x009e, 0x003e, 0x0005, 0xa880, 0xd0b4, 0x0128, 0xa87b, + 0x0006, 0xc0ec, 0xa882, 0x0048, 0xd0bc, 0x0118, 0xa87b, 0x0002, + 0x0020, 0xa87b, 0x0005, 0x080c, 0xb8e9, 0xa877, 0x0000, 0x0005, + 0x2001, 0x180f, 0x2004, 0xd0ec, 0x0005, 0x0006, 0x2001, 0x180f, + 0x2004, 0xd0f4, 0x000e, 0x0005, 0x0006, 0x2001, 0x180f, 0x2004, + 0xd0e4, 0x000e, 0x0005, 0x0036, 0x0046, 0x6010, 0x00b6, 0x2058, + 0xbba0, 0x00be, 0x2021, 0x0007, 0x080c, 0x4829, 0x004e, 0x003e, + 0x0005, 0x0c51, 0x1d81, 0x0005, 0x2001, 0x1955, 0x2004, 0x601a, + 0x0005, 0x2001, 0x1957, 0x2004, 0x6042, 0x0005, 0x080c, 0x99d6, + 0x0804, 0x8582, 0x00b6, 0x0066, 0x6000, 0x90b2, 0x0016, 0x1a0c, + 0x0db2, 0x001b, 0x006e, 0x00be, 0x0005, 0xbd2d, 0xc3f7, 0xc552, + 0xbd2d, 0xbd2d, 0xbd2d, 0xbd2d, 0xbd2d, 0xbd64, 0xc5d0, 0xbd2d, + 0xbd2d, 0xbd2d, 0xbd2d, 0xbd2d, 0xbd2d, 0x080c, 0x0db2, 0x0066, + 0x6000, 0x90b2, 0x0016, 0x1a0c, 0x0db2, 0x0013, 0x006e, 0x0005, + 0xbd48, 0xcb38, 0xbd48, 0xbd48, 0xbd48, 0xbd48, 0xbd48, 0xbd48, + 0xcae5, 0xcb8c, 0xbd48, 0xd16d, 0xd1a3, 0xd16d, 0xd1a3, 0xbd48, + 0x080c, 0x0db2, 0x6000, 0x9082, 0x0016, 0x1a0c, 0x0db2, 0x6000, + 0x000a, 0x0005, 0xbd62, 0xc7ad, 0xc89d, 0xc8bf, 0xc97e, 0xbd62, + 0xca5c, 0xca06, 0xc5dc, 0xcabb, 0xcad0, 0xbd62, 0xbd62, 0xbd62, + 0xbd62, 0xbd62, 0x080c, 0x0db2, 0x91b2, 0x0053, 0x1a0c, 0x0db2, + 0x2100, 0x91b2, 0x0040, 0x1a04, 0xc19a, 0x0002, 0xbdae, 0xbf8b, + 0xbdae, 0xbdae, 0xbdae, 0xbf94, 0xbdae, 0xbdae, 0xbdae, 0xbdae, + 0xbdae, 0xbdae, 0xbdae, 0xbdae, 0xbdae, 0xbdae, 0xbdae, 0xbdae, + 0xbdae, 0xbdae, 0xbdae, 0xbdae, 0xbdae, 0xbdb0, 0xbe06, 0xbe15, + 0xbe79, 0xbea4, 0xbf1d, 0xbf76, 0xbdae, 0xbdae, 0xbf97, 0xbdae, + 0xbdae, 0xbfac, 0xbfb9, 0xbdae, 0xbdae, 0xbdae, 0xbdae, 0xbdae, + 0xc03c, 0xbdae, 0xbdae, 0xc050, 0xbdae, 0xbdae, 0xc00b, 0xbdae, + 0xbdae, 0xbdae, 0xc068, 0xbdae, 0xbdae, 0xbdae, 0xc0e5, 0xbdae, + 0xbdae, 0xbdae, 0xbdae, 0xbdae, 0xbdae, 0xc162, 0x080c, 0x0db2, + 0x080c, 0x6262, 0x1150, 0x2001, 0x1835, 0x2004, 0xd0cc, 0x1128, + 0x9084, 0x0009, 0x9086, 0x0008, 0x1140, 0x6007, 0x0009, 0x602f, + 0x0009, 0x6017, 0x0000, 0x0804, 0xbf84, 0x080c, 0x624b, 0x00e6, + 0x00c6, 0x0036, 0x0026, 0x0016, 0x6210, 0x2258, 0xbaa0, 0x0026, + 0x2019, 0x0029, 0x080c, 0x8180, 0x0076, 0x903e, 0x080c, 0x8078, + 0x2c08, 0x080c, 0xcd62, 0x007e, 0x001e, 0x001e, 0x002e, 0x003e, + 0x00ce, 0x00ee, 0x6610, 0x2658, 0x080c, 0x5f8d, 0xbe04, 0x9684, + 0x00ff, 0x9082, 0x0006, 0x0278, 0x080c, 0xcc94, 0x1904, 0xbe71, + 0x080c, 0xcc30, 0x1120, 0x6007, 0x0008, 0x0804, 0xbf84, 0x6007, + 0x0009, 0x0804, 0xbf84, 0x080c, 0xce81, 0x0128, 0x080c, 0xcc94, + 0x0d78, 0x0804, 0xbe71, 0x6017, 0x1900, 0x0c88, 0x080c, 0x2f50, + 0x1904, 0xc197, 0x6106, 0x080c, 0xcbe7, 0x6007, 0x0006, 0x0804, + 0xbf84, 0x6007, 0x0007, 0x0804, 0xbf84, 0x080c, 0xd1df, 0x1904, + 0xc197, 0x080c, 0x2f50, 0x1904, 0xc197, 0x00d6, 0x6610, 0x2658, + 0xbe04, 0x9684, 0x00ff, 0x9082, 0x0006, 0x1220, 0x2001, 0x0001, + 0x080c, 0x5ebb, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0188, + 0x9686, 0x0004, 0x0170, 0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006, + 0x0140, 0x9686, 0x0004, 0x0128, 0x9686, 0x0005, 0x0110, 0x00de, + 0x0480, 0x00e6, 0x2071, 0x0260, 0x7034, 0x9084, 0x0003, 0x1140, + 0x7034, 0x9082, 0x0014, 0x0220, 0x7030, 0x9084, 0x0003, 0x0130, + 0x00ee, 0x6017, 0x0000, 0x602f, 0x0007, 0x00b0, 0x00ee, 0x080c, + 0xccf8, 0x1190, 0x9686, 0x0006, 0x1140, 0x0026, 0x6210, 0x2258, + 0xbaa0, 0x900e, 0x080c, 0x2e75, 0x002e, 0x080c, 0x6019, 0x6007, + 0x000a, 0x00de, 0x0804, 0xbf84, 0x6007, 0x000b, 0x00de, 0x0804, + 0xbf84, 0x080c, 0x2e30, 0x080c, 0xbd01, 0x6007, 0x0001, 0x0804, + 0xbf84, 0x080c, 0xd1df, 0x1904, 0xc197, 0x080c, 0x2f50, 0x1904, + 0xc197, 0x2071, 0x0260, 0x7034, 0x90b4, 0x0003, 0x1948, 0x90b2, + 0x0014, 0x0a30, 0x7030, 0x9084, 0x0003, 0x1910, 0x6610, 0x2658, + 0xbe04, 0x9686, 0x0707, 0x09e8, 0x0026, 0x6210, 0x2258, 0xbaa0, + 0x900e, 0x080c, 0x2e75, 0x002e, 0x6007, 0x000c, 0x2001, 0x0001, + 0x080c, 0xd2fb, 0x0804, 0xbf84, 0x080c, 0x6262, 0x1140, 0x2001, + 0x1835, 0x2004, 0x9084, 0x0009, 0x9086, 0x0008, 0x1110, 0x0804, + 0xbdbd, 0x080c, 0x624b, 0x6610, 0x2658, 0xbe04, 0x9684, 0x00ff, + 0x9082, 0x0006, 0x06c8, 0x1138, 0x0026, 0x2001, 0x0006, 0x080c, + 0x5efb, 0x002e, 0x0050, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0004, + 0x0120, 0x9686, 0x0006, 0x1904, 0xbe71, 0x080c, 0xcd05, 0x1120, + 0x6007, 0x000e, 0x0804, 0xbf84, 0x0046, 0x6410, 0x2458, 0xbca0, + 0x0046, 0x080c, 0x2e30, 0x080c, 0xbd01, 0x004e, 0x0016, 0x9006, + 0x2009, 0x1854, 0x210c, 0xd1a4, 0x0148, 0x2009, 0x0029, 0x080c, + 0xcfe6, 0x6010, 0x2058, 0xb800, 0xc0e5, 0xb802, 0x001e, 0x004e, + 0x6007, 0x0001, 0x0804, 0xbf84, 0x2001, 0x0001, 0x080c, 0x5ebb, + 0x0156, 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805, + 0x2011, 0x0270, 0x080c, 0xa909, 0x003e, 0x002e, 0x001e, 0x015e, + 0x9005, 0x0168, 0x96b4, 0xff00, 0x8637, 0x9682, 0x0004, 0x0a04, + 0xbe71, 0x9682, 0x0007, 0x0a04, 0xbecd, 0x0804, 0xbe71, 0x6017, + 0x1900, 0x6007, 0x0009, 0x0804, 0xbf84, 0x080c, 0x6262, 0x1140, + 0x2001, 0x1835, 0x2004, 0x9084, 0x0009, 0x9086, 0x0008, 0x1110, + 0x0804, 0xbdbd, 0x080c, 0x624b, 0x6610, 0x2658, 0xbe04, 0x9684, + 0x00ff, 0x9082, 0x0006, 0x0690, 0x96b4, 0xff00, 0x8637, 0x9686, + 0x0004, 0x0120, 0x9686, 0x0006, 0x1904, 0xbe71, 0x080c, 0xcd33, + 0x1130, 0x080c, 0xcc30, 0x1118, 0x6007, 0x0010, 0x04e8, 0x0046, + 0x6410, 0x2458, 0xbca0, 0x0046, 0x080c, 0x2e30, 0x080c, 0xbd01, + 0x004e, 0x0016, 0x9006, 0x2009, 0x1854, 0x210c, 0xd1a4, 0x0148, + 0x2009, 0x0029, 0x080c, 0xcfe6, 0x6010, 0x2058, 0xb800, 0xc0e5, + 0xb802, 0x001e, 0x004e, 0x6007, 0x0001, 0x00f0, 0x080c, 0xce81, + 0x0140, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0978, 0x0804, + 0xbe71, 0x6017, 0x1900, 0x6007, 0x0009, 0x0070, 0x080c, 0x2f50, + 0x1904, 0xc197, 0x080c, 0xd1df, 0x1904, 0xc197, 0x080c, 0xc335, + 0x1904, 0xbe71, 0x6007, 0x0012, 0x6003, 0x0001, 0x080c, 0x8048, + 0x080c, 0x8582, 0x0005, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, + 0x8048, 0x080c, 0x8582, 0x0cb0, 0x6007, 0x0005, 0x0c68, 0x080c, + 0xd1df, 0x1904, 0xc197, 0x080c, 0x2f50, 0x1904, 0xc197, 0x080c, + 0xc335, 0x1904, 0xbe71, 0x6007, 0x0020, 0x6003, 0x0001, 0x080c, + 0x8048, 0x080c, 0x8582, 0x0005, 0x080c, 0x2f50, 0x1904, 0xc197, + 0x6007, 0x0023, 0x6003, 0x0001, 0x080c, 0x8048, 0x080c, 0x8582, + 0x0005, 0x080c, 0xd1df, 0x1904, 0xc197, 0x080c, 0x2f50, 0x1904, + 0xc197, 0x080c, 0xc335, 0x1904, 0xbe71, 0x0016, 0x0026, 0x00e6, + 0x2071, 0x0260, 0x7244, 0x9286, 0xffff, 0x0180, 0x2c08, 0x080c, + 0xb5e9, 0x01b0, 0x2260, 0x7240, 0x6008, 0x9206, 0x1188, 0x6010, + 0x9190, 0x0004, 0x2214, 0x9206, 0x01b8, 0x0050, 0x7240, 0x2c08, + 0x9006, 0x080c, 0xcfb8, 0x1180, 0x7244, 0x9286, 0xffff, 0x01b0, + 0x2160, 0x6007, 0x0026, 0x6017, 0x1700, 0x7214, 0x9296, 0xffff, + 0x1180, 0x6007, 0x0025, 0x0068, 0x6020, 0x9086, 0x0007, 0x1d80, + 0x6004, 0x9086, 0x0024, 0x1110, 0x080c, 0x99d6, 0x2160, 0x6007, + 0x0025, 0x6003, 0x0001, 0x080c, 0x8048, 0x080c, 0x8582, 0x00ee, + 0x002e, 0x001e, 0x0005, 0x2001, 0x0001, 0x080c, 0x5ebb, 0x0156, + 0x0016, 0x0026, 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, + 0x0276, 0x080c, 0xa909, 0x003e, 0x002e, 0x001e, 0x015e, 0x0120, + 0x6007, 0x0031, 0x0804, 0xbf84, 0x080c, 0xa5c2, 0x080c, 0x6c53, + 0x1190, 0x0006, 0x0026, 0x0036, 0x080c, 0x6c6d, 0x1138, 0x080c, + 0x6f2a, 0x080c, 0x5a21, 0x080c, 0x6b8a, 0x0010, 0x080c, 0x6c2d, + 0x003e, 0x002e, 0x000e, 0x0005, 0x080c, 0x2f50, 0x1904, 0xc197, + 0x080c, 0xc335, 0x1904, 0xbe71, 0x6106, 0x080c, 0xc351, 0x1120, + 0x6007, 0x002b, 0x0804, 0xbf84, 0x6007, 0x002c, 0x0804, 0xbf84, + 0x080c, 0xd1df, 0x1904, 0xc197, 0x080c, 0x2f50, 0x1904, 0xc197, + 0x080c, 0xc335, 0x1904, 0xbe71, 0x6106, 0x080c, 0xc356, 0x1120, + 0x6007, 0x002e, 0x0804, 0xbf84, 0x6007, 0x002f, 0x0804, 0xbf84, + 0x080c, 0x2f50, 0x1904, 0xc197, 0x00e6, 0x00d6, 0x00c6, 0x6010, + 0x2058, 0xb904, 0x9184, 0x00ff, 0x9086, 0x0006, 0x0158, 0x9184, + 0xff00, 0x8007, 0x9086, 0x0006, 0x0128, 0x00ce, 0x00de, 0x00ee, + 0x0804, 0xbf8b, 0x080c, 0x5117, 0xd0e4, 0x0904, 0xc0e2, 0x2071, + 0x026c, 0x7010, 0x603a, 0x7014, 0x603e, 0x7108, 0x720c, 0x080c, + 0x62a0, 0x0140, 0x6010, 0x2058, 0xb810, 0x9106, 0x1118, 0xb814, + 0x9206, 0x0510, 0x080c, 0x629c, 0x15b8, 0x2069, 0x1800, 0x6878, + 0x9206, 0x1590, 0x6874, 0x9106, 0x1578, 0x7210, 0x080c, 0xb5e9, + 0x0590, 0x080c, 0xc222, 0x0578, 0x080c, 0xd05d, 0x0560, 0x622e, + 0x6007, 0x0036, 0x6003, 0x0001, 0x080c, 0x8000, 0x080c, 0x8582, + 0x00ce, 0x00de, 0x00ee, 0x0005, 0x7214, 0x9286, 0xffff, 0x0150, + 0x080c, 0xb5e9, 0x01c0, 0x9280, 0x0002, 0x2004, 0x7110, 0x9106, + 0x1190, 0x08e0, 0x7210, 0x2c08, 0x9085, 0x0001, 0x080c, 0xcfb8, + 0x2c10, 0x2160, 0x0140, 0x0890, 0x6007, 0x0037, 0x602f, 0x0009, + 0x6017, 0x1500, 0x08b8, 0x6007, 0x0037, 0x602f, 0x0003, 0x6017, + 0x1700, 0x0880, 0x6007, 0x0012, 0x0868, 0x080c, 0x2f50, 0x1904, + 0xc197, 0x6010, 0x2058, 0xb804, 0x9084, 0xff00, 0x8007, 0x9086, + 0x0006, 0x1904, 0xbf8b, 0x00e6, 0x00d6, 0x00c6, 0x080c, 0x5117, + 0xd0e4, 0x0904, 0xc15a, 0x2069, 0x1800, 0x2071, 0x026c, 0x7008, + 0x603a, 0x720c, 0x623e, 0x9286, 0xffff, 0x1150, 0x7208, 0x00c6, + 0x2c08, 0x9085, 0x0001, 0x080c, 0xcfb8, 0x2c10, 0x00ce, 0x05e8, + 0x080c, 0xb5e9, 0x05d0, 0x7108, 0x9280, 0x0002, 0x2004, 0x9106, + 0x15a0, 0x00c6, 0x0026, 0x2260, 0x080c, 0xb244, 0x002e, 0x00ce, + 0x7118, 0x918c, 0xff00, 0x810f, 0x9186, 0x0001, 0x0178, 0x9186, + 0x0005, 0x0118, 0x9186, 0x0007, 0x1198, 0x9280, 0x0005, 0x2004, + 0x9005, 0x0170, 0x080c, 0xc222, 0x0904, 0xc0db, 0x0056, 0x7510, + 0x7614, 0x080c, 0xd076, 0x005e, 0x00ce, 0x00de, 0x00ee, 0x0005, + 0x6007, 0x003b, 0x602f, 0x0009, 0x6017, 0x2a00, 0x6003, 0x0001, + 0x080c, 0x8000, 0x080c, 0x8582, 0x0c78, 0x6007, 0x003b, 0x602f, + 0x0003, 0x6017, 0x0300, 0x6003, 0x0001, 0x080c, 0x8000, 0x080c, + 0x8582, 0x0c10, 0x6007, 0x003b, 0x602f, 0x000b, 0x6017, 0x0000, + 0x0804, 0xc0b2, 0x00e6, 0x0026, 0x080c, 0x6262, 0x0550, 0x080c, + 0x624b, 0x080c, 0xd251, 0x1518, 0x2071, 0x1800, 0x70d4, 0x9085, + 0x0003, 0x70d6, 0x00f6, 0x2079, 0x0100, 0x72a8, 0x9284, 0x00ff, + 0x7076, 0x78e6, 0x9284, 0xff00, 0x7278, 0x9205, 0x707a, 0x78ea, + 0x00fe, 0x70df, 0x0000, 0x080c, 0x62a0, 0x0120, 0x2011, 0x19cf, + 0x2013, 0x07d0, 0xd0ac, 0x1128, 0x080c, 0x2c2b, 0x0010, 0x080c, + 0xd283, 0x002e, 0x00ee, 0x080c, 0x99d6, 0x0804, 0xbf8a, 0x080c, + 0x99d6, 0x0005, 0x2600, 0x0002, 0xc1ae, 0xc1ae, 0xc1ae, 0xc1ae, + 0xc1ae, 0xc1b0, 0xc1ae, 0xc1ae, 0xc1ae, 0xc1ae, 0xc1cd, 0xc1ae, + 0xc1ae, 0xc1ae, 0xc1df, 0xc1ec, 0xc21d, 0xc1ae, 0x080c, 0x0db2, + 0x080c, 0xd1df, 0x1d20, 0x080c, 0x2f50, 0x1d08, 0x080c, 0xc335, + 0x1148, 0x7038, 0x6016, 0x6007, 0x0045, 0x6003, 0x0001, 0x080c, + 0x8048, 0x0005, 0x080c, 0x2e30, 0x080c, 0xbd01, 0x6007, 0x0001, + 0x6003, 0x0001, 0x080c, 0x8048, 0x0005, 0x080c, 0xd1df, 0x1938, + 0x080c, 0x2f50, 0x1920, 0x080c, 0xc335, 0x1d60, 0x703c, 0x6016, + 0x6007, 0x004a, 0x6003, 0x0001, 0x080c, 0x8048, 0x0005, 0x080c, + 0xc23d, 0x0904, 0xc197, 0x6007, 0x004e, 0x6003, 0x0001, 0x080c, + 0x8048, 0x080c, 0x8582, 0x0005, 0x6007, 0x004f, 0x6017, 0x0000, + 0x7134, 0x918c, 0x00ff, 0x81ff, 0x0508, 0x9186, 0x0001, 0x1160, + 0x7140, 0x2001, 0x198c, 0x2004, 0x9106, 0x11b0, 0x7144, 0x2001, + 0x198d, 0x2004, 0x9106, 0x0190, 0x9186, 0x0002, 0x1168, 0x2011, + 0x0276, 0x20a9, 0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x000a, + 0x080c, 0xa91d, 0x009e, 0x0110, 0x6017, 0x0001, 0x6003, 0x0001, + 0x080c, 0x8048, 0x080c, 0x8582, 0x0005, 0x6007, 0x0050, 0x703c, + 0x6016, 0x0ca0, 0x00e6, 0x2071, 0x0260, 0x00b6, 0x00c6, 0x2260, + 0x6010, 0x2058, 0xb8bc, 0xd084, 0x0150, 0x7128, 0x6048, 0x9106, + 0x1120, 0x712c, 0x6044, 0x9106, 0x0110, 0x9006, 0x0010, 0x9085, + 0x0001, 0x00ce, 0x00be, 0x00ee, 0x0005, 0x0016, 0x0096, 0x0086, + 0x00e6, 0x01c6, 0x01d6, 0x0126, 0x2091, 0x8000, 0x2071, 0x1800, + 0x7088, 0x908a, 0x00f9, 0x16e8, 0x20e1, 0x0000, 0x2001, 0x196f, + 0x2003, 0x0000, 0x080c, 0x0fee, 0x05a0, 0x2900, 0x6016, 0x7088, + 0x8004, 0xa816, 0x908a, 0x001e, 0x02d0, 0xa833, 0x001e, 0x20a9, + 0x001e, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0, 0x2001, + 0x196f, 0x0016, 0x200c, 0x0471, 0x001e, 0x2940, 0x080c, 0x0fee, + 0x01c0, 0x2900, 0xa006, 0x2100, 0x81ff, 0x0180, 0x0c18, 0xa832, + 0x20a8, 0xa860, 0x20e8, 0xa85c, 0x9080, 0x001b, 0x20a0, 0x2001, + 0x196f, 0x0016, 0x200c, 0x00b1, 0x001e, 0x0000, 0x9085, 0x0001, + 0x0048, 0x2071, 0x1800, 0x708b, 0x0000, 0x6014, 0x2048, 0x080c, + 0x0f87, 0x9006, 0x012e, 0x01de, 0x01ce, 0x00ee, 0x008e, 0x009e, + 0x001e, 0x0005, 0x0006, 0x0016, 0x0026, 0x0036, 0x00c6, 0x918c, + 0xffff, 0x11a8, 0x080c, 0x20b2, 0x2099, 0x026c, 0x2001, 0x0014, + 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, 0x00f8, 0x20a8, 0x4003, + 0x22a8, 0x8108, 0x080c, 0x20b2, 0x2099, 0x0260, 0x0ca8, 0x080c, + 0x20b2, 0x2061, 0x196f, 0x6004, 0x2098, 0x6008, 0x3518, 0x9312, + 0x1218, 0x23a8, 0x4003, 0x0048, 0x20a8, 0x4003, 0x22a8, 0x8108, + 0x080c, 0x20b2, 0x2099, 0x0260, 0x0ca8, 0x2061, 0x196f, 0x2019, + 0x0280, 0x3300, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001, 0x0260, + 0x6006, 0x8108, 0x2162, 0x9292, 0x0021, 0x9296, 0xffff, 0x620a, + 0x00ce, 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x0006, 0x0016, + 0x0026, 0x0036, 0x00c6, 0x81ff, 0x11b8, 0x080c, 0x20ca, 0x20a1, + 0x024c, 0x2001, 0x0014, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, + 0x0418, 0x20a8, 0x4003, 0x82ff, 0x01f8, 0x22a8, 0x8108, 0x080c, + 0x20ca, 0x20a1, 0x0240, 0x0c98, 0x080c, 0x20ca, 0x2061, 0x1972, + 0x6004, 0x20a0, 0x6008, 0x3518, 0x9312, 0x1218, 0x23a8, 0x4003, + 0x0058, 0x20a8, 0x4003, 0x82ff, 0x0138, 0x22a8, 0x8108, 0x080c, + 0x20ca, 0x20a1, 0x0240, 0x0c98, 0x2061, 0x1972, 0x2019, 0x0260, + 0x3400, 0x931e, 0x0110, 0x6006, 0x0020, 0x2001, 0x0240, 0x6006, + 0x8108, 0x2162, 0x9292, 0x0021, 0x9296, 0xffff, 0x620a, 0x00ce, + 0x003e, 0x002e, 0x001e, 0x000e, 0x0005, 0x00b6, 0x0066, 0x6610, + 0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637, 0x9686, 0x0006, 0x0170, + 0x9686, 0x0004, 0x0158, 0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006, + 0x0128, 0x9686, 0x0004, 0x0110, 0x9085, 0x0001, 0x006e, 0x00be, + 0x0005, 0x00d6, 0x080c, 0xc3cd, 0x00de, 0x0005, 0x00d6, 0x080c, + 0xc3da, 0x1520, 0x680c, 0x908c, 0xff00, 0x6820, 0x9084, 0x00ff, + 0x9115, 0x6216, 0x6824, 0x602e, 0xd1e4, 0x0130, 0x9006, 0x080c, + 0xd2fb, 0x2009, 0x0001, 0x0078, 0xd1ec, 0x0180, 0x6920, 0x918c, + 0x00ff, 0x6824, 0x080c, 0x24d6, 0x1148, 0x2001, 0x0001, 0x080c, + 0xd2fb, 0x2110, 0x900e, 0x080c, 0x2e75, 0x0018, 0x9085, 0x0001, + 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6, 0x00c6, 0x080c, 0x9a23, + 0x05a8, 0x0016, 0x0026, 0x00c6, 0x2011, 0x0263, 0x2204, 0x8211, + 0x220c, 0x080c, 0x24d6, 0x1578, 0x080c, 0x5f1e, 0x1560, 0xbe12, + 0xbd16, 0x00ce, 0x002e, 0x001e, 0x2b00, 0x6012, 0x080c, 0xd1df, + 0x11d8, 0x080c, 0x2f50, 0x11c0, 0x080c, 0xc335, 0x0510, 0x2001, + 0x0007, 0x080c, 0x5ecf, 0x2001, 0x0007, 0x080c, 0x5efb, 0x6017, + 0x0000, 0x6023, 0x0001, 0x6007, 0x0001, 0x6003, 0x0001, 0x080c, + 0x8048, 0x080c, 0x8582, 0x0010, 0x080c, 0x99d6, 0x9085, 0x0001, + 0x00ce, 0x00be, 0x0005, 0x080c, 0x99d6, 0x00ce, 0x002e, 0x001e, + 0x0ca8, 0x080c, 0x99d6, 0x9006, 0x0c98, 0x2069, 0x026d, 0x6800, + 0x9082, 0x0010, 0x1228, 0x6017, 0x0000, 0x9085, 0x0001, 0x0008, + 0x9006, 0x0005, 0x6017, 0x0000, 0x2069, 0x026c, 0x6808, 0x9084, + 0xff00, 0x9086, 0x0800, 0x1190, 0x6904, 0x9186, 0x0018, 0x0118, + 0x9186, 0x0014, 0x1158, 0x810f, 0x6800, 0x9084, 0x00ff, 0x910d, + 0x615a, 0x908e, 0x0014, 0x0110, 0x908e, 0x0010, 0x0005, 0x6004, + 0x90b2, 0x0053, 0x1a0c, 0x0db2, 0x91b6, 0x0013, 0x1130, 0x2008, + 0x91b2, 0x0040, 0x1a04, 0xc522, 0x0092, 0x91b6, 0x0027, 0x0120, + 0x91b6, 0x0014, 0x190c, 0x0db2, 0x2001, 0x0007, 0x080c, 0x5efb, + 0x080c, 0x847d, 0x080c, 0x9a06, 0x080c, 0x8582, 0x0005, 0xc457, + 0xc459, 0xc457, 0xc457, 0xc457, 0xc459, 0xc468, 0xc51b, 0xc4ba, + 0xc51b, 0xc4cc, 0xc51b, 0xc468, 0xc51b, 0xc513, 0xc51b, 0xc513, + 0xc51b, 0xc51b, 0xc457, 0xc457, 0xc457, 0xc457, 0xc457, 0xc457, + 0xc457, 0xc457, 0xc457, 0xc457, 0xc457, 0xc459, 0xc457, 0xc51b, + 0xc457, 0xc457, 0xc51b, 0xc457, 0xc518, 0xc51b, 0xc457, 0xc457, + 0xc457, 0xc457, 0xc51b, 0xc51b, 0xc457, 0xc51b, 0xc51b, 0xc457, + 0xc463, 0xc457, 0xc457, 0xc457, 0xc457, 0xc517, 0xc51b, 0xc457, + 0xc457, 0xc51b, 0xc51b, 0xc457, 0xc457, 0xc457, 0xc457, 0x080c, + 0x0db2, 0x080c, 0x847d, 0x080c, 0xbd04, 0x6003, 0x0002, 0x080c, + 0x8582, 0x0804, 0xc521, 0x9006, 0x080c, 0x5ebb, 0x0804, 0xc51b, + 0x080c, 0x629c, 0x1904, 0xc51b, 0x9006, 0x080c, 0x5ebb, 0x6010, + 0x2058, 0xb810, 0x9086, 0x00ff, 0x1140, 0x00f6, 0x2079, 0x1800, + 0x78a0, 0x8000, 0x78a2, 0x00fe, 0x0428, 0x6010, 0x2058, 0xb8b0, + 0x9005, 0x1178, 0x080c, 0xbcec, 0x1904, 0xc51b, 0x0036, 0x0046, + 0xbba0, 0x2021, 0x0007, 0x080c, 0x4829, 0x004e, 0x003e, 0x0804, + 0xc51b, 0x080c, 0x2f81, 0x1904, 0xc51b, 0x2001, 0x1800, 0x2004, + 0x9086, 0x0002, 0x1138, 0x00f6, 0x2079, 0x1800, 0x78a0, 0x8000, + 0x78a2, 0x00fe, 0x2001, 0x0002, 0x080c, 0x5ecf, 0x080c, 0x847d, + 0x6023, 0x0001, 0x6003, 0x0001, 0x6007, 0x0002, 0x080c, 0x8048, + 0x080c, 0x8582, 0x6110, 0x2158, 0x2009, 0x0001, 0x080c, 0x7c58, + 0x0804, 0xc521, 0x6610, 0x2658, 0xbe04, 0x96b4, 0xff00, 0x8637, + 0x9686, 0x0006, 0x0904, 0xc51b, 0x9686, 0x0004, 0x0904, 0xc51b, + 0x2001, 0x0004, 0x0804, 0xc519, 0x2001, 0x1800, 0x2004, 0x9086, + 0x0003, 0x1158, 0x0036, 0x0046, 0x6010, 0x2058, 0xbba0, 0x2021, + 0x0006, 0x080c, 0x4829, 0x004e, 0x003e, 0x2001, 0x0006, 0x080c, + 0xc53f, 0x6610, 0x2658, 0xbe04, 0x0066, 0x96b4, 0xff00, 0x8637, + 0x9686, 0x0006, 0x006e, 0x0168, 0x2001, 0x0006, 0x080c, 0x5efb, + 0x9284, 0x00ff, 0x908e, 0x0007, 0x1120, 0x2001, 0x0006, 0x080c, + 0x5ecf, 0x080c, 0x629c, 0x11f8, 0x2001, 0x1835, 0x2004, 0xd0a4, + 0x01d0, 0xbe04, 0x96b4, 0x00ff, 0x9686, 0x0006, 0x01a0, 0x00f6, + 0x2079, 0x1800, 0x78a0, 0x8000, 0x78a2, 0x00fe, 0x0804, 0xc4a2, + 0x2001, 0x0004, 0x0030, 0x2001, 0x0006, 0x0449, 0x0020, 0x0018, + 0x0010, 0x080c, 0x5efb, 0x080c, 0x847d, 0x080c, 0x99d6, 0x080c, + 0x8582, 0x0005, 0x2600, 0x0002, 0xc536, 0xc536, 0xc536, 0xc536, + 0xc536, 0xc538, 0xc536, 0xc536, 0xc536, 0xc536, 0xc538, 0xc536, + 0xc536, 0xc536, 0xc538, 0xc538, 0xc538, 0xc538, 0x080c, 0x0db2, + 0x080c, 0x847d, 0x080c, 0x99d6, 0x080c, 0x8582, 0x0005, 0x0016, + 0x00b6, 0x00d6, 0x6110, 0x2158, 0xb900, 0xd184, 0x0138, 0x080c, + 0x5ecf, 0x9006, 0x080c, 0x5ebb, 0x080c, 0x2e55, 0x00de, 0x00be, + 0x001e, 0x0005, 0x6610, 0x2658, 0xb804, 0x9084, 0xff00, 0x8007, + 0x90b2, 0x000c, 0x1a0c, 0x0db2, 0x91b6, 0x0015, 0x1110, 0x003b, + 0x0028, 0x91b6, 0x0016, 0x190c, 0x0db2, 0x006b, 0x0005, 0xa445, + 0xa445, 0xa445, 0xa445, 0xa445, 0xa445, 0xc5ba, 0xc57f, 0xa445, + 0xa445, 0xa445, 0xa445, 0xa445, 0xa445, 0xa445, 0xa445, 0xa445, + 0xa445, 0xc5ba, 0xc5c1, 0xa445, 0xa445, 0xa445, 0xa445, 0x00f6, + 0x080c, 0x629c, 0x11d8, 0x080c, 0xbcec, 0x11c0, 0x6010, 0x905d, + 0x01a8, 0xb8b0, 0x9005, 0x0190, 0x9006, 0x080c, 0x5ebb, 0x2001, + 0x0002, 0x080c, 0x5ecf, 0x6023, 0x0001, 0x6003, 0x0001, 0x6007, + 0x0002, 0x080c, 0x8048, 0x080c, 0x8582, 0x00d0, 0x2011, 0x0263, + 0x2204, 0x8211, 0x220c, 0x080c, 0x24d6, 0x1190, 0x080c, 0x5f7e, + 0x0118, 0x080c, 0x99d6, 0x0060, 0xb810, 0x0006, 0xb814, 0x0006, + 0x080c, 0x5a3b, 0x000e, 0xb816, 0x000e, 0xb812, 0x080c, 0x99d6, + 0x00fe, 0x0005, 0x6604, 0x96b6, 0x001e, 0x1110, 0x080c, 0x99d6, + 0x0005, 0x080c, 0xa7a1, 0x1148, 0x6003, 0x0001, 0x6007, 0x0001, + 0x080c, 0x8048, 0x080c, 0x8582, 0x0010, 0x080c, 0x99d6, 0x0005, + 0x6004, 0x908a, 0x0053, 0x1a0c, 0x0db2, 0x080c, 0x847d, 0x080c, + 0x9a06, 0x080c, 0x8582, 0x0005, 0x9182, 0x0040, 0x0002, 0xc5f2, + 0xc5f2, 0xc5f2, 0xc5f2, 0xc5f4, 0xc5f2, 0xc5f2, 0xc5f2, 0xc5f2, + 0xc5f2, 0xc5f2, 0xc5f2, 0xc5f2, 0xc5f2, 0xc5f2, 0xc5f2, 0xc5f2, + 0xc5f2, 0xc5f2, 0x080c, 0x0db2, 0x0096, 0x00b6, 0x00d6, 0x00e6, + 0x00f6, 0x0046, 0x0026, 0x6210, 0x2258, 0xb8ac, 0x9005, 0x11a8, + 0x6106, 0x2071, 0x0260, 0x7444, 0x94a4, 0xff00, 0x0904, 0xc65a, + 0x080c, 0xd2ef, 0x1170, 0x9486, 0x2000, 0x1158, 0x2009, 0x0001, + 0x2011, 0x0200, 0x080c, 0x7e3e, 0x0020, 0x9026, 0x080c, 0xd224, + 0x0c38, 0x080c, 0x0fd5, 0x090c, 0x0db2, 0x6003, 0x0007, 0xa867, + 0x010d, 0x9006, 0xa802, 0xa86a, 0xac8a, 0x2c00, 0xa88e, 0x6008, + 0xa8e2, 0x6010, 0x2058, 0xb8a0, 0x7130, 0xa97a, 0x0016, 0xa876, + 0xa87f, 0x0000, 0xa883, 0x0000, 0xa887, 0x0036, 0x080c, 0x6536, + 0x001e, 0x080c, 0xd2ef, 0x1904, 0xc6ba, 0x9486, 0x2000, 0x1130, + 0x2019, 0x0017, 0x080c, 0xcf62, 0x0804, 0xc6ba, 0x9486, 0x0200, + 0x1120, 0x080c, 0xcefe, 0x0804, 0xc6ba, 0x9486, 0x0400, 0x0120, + 0x9486, 0x1000, 0x1904, 0xc6ba, 0x2019, 0x0002, 0x080c, 0xcf19, + 0x0804, 0xc6ba, 0x2069, 0x1a3e, 0x6a00, 0xd284, 0x0904, 0xc724, + 0x9284, 0x0300, 0x1904, 0xc71d, 0x6804, 0x9005, 0x0904, 0xc705, + 0x2d78, 0x6003, 0x0007, 0x080c, 0x0fee, 0x0904, 0xc6c6, 0x7800, + 0xd08c, 0x1118, 0x7804, 0x8001, 0x7806, 0x6017, 0x0000, 0x2001, + 0x180e, 0x2004, 0xd084, 0x1904, 0xc728, 0x9006, 0xa802, 0xa867, + 0x0116, 0xa86a, 0x6008, 0xa8e2, 0x2c00, 0xa87a, 0x6010, 0x2058, + 0xb8a0, 0x7130, 0xa9b6, 0xa876, 0xb928, 0xa9ba, 0xb92c, 0xa9be, + 0xb930, 0xa9c2, 0xb934, 0xa9c6, 0xa883, 0x003d, 0x7044, 0x9084, + 0x0003, 0x9080, 0xc6c2, 0x2005, 0xa87e, 0x20a9, 0x000a, 0x2001, + 0x0270, 0xaa5c, 0x9290, 0x0021, 0x2009, 0x0205, 0x200b, 0x0080, + 0x20e1, 0x0000, 0xab60, 0x23e8, 0x2098, 0x22a0, 0x4003, 0x200b, + 0x0000, 0x2001, 0x027a, 0x200c, 0xa9b2, 0x8000, 0x200c, 0xa9ae, + 0x080c, 0x6536, 0x002e, 0x004e, 0x00fe, 0x00ee, 0x00de, 0x00be, + 0x009e, 0x0005, 0x0000, 0x0080, 0x0040, 0x0000, 0x2001, 0x180f, + 0x2004, 0xd084, 0x0120, 0x080c, 0x0fd5, 0x1904, 0xc66f, 0x6017, + 0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, 0x8000, 0x080c, + 0x8582, 0x0c00, 0x2069, 0x0260, 0x6848, 0x9084, 0xff00, 0x9086, + 0x1200, 0x1198, 0x686c, 0x9084, 0x00ff, 0x0016, 0x6114, 0x918c, + 0xf700, 0x910d, 0x6116, 0x001e, 0x6003, 0x0001, 0x6007, 0x0043, + 0x080c, 0x8000, 0x080c, 0x8582, 0x0828, 0x6868, 0x602e, 0x686c, + 0x6032, 0x6017, 0xf200, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, + 0x8000, 0x080c, 0x8582, 0x0804, 0xc6ba, 0x2001, 0x180d, 0x2004, + 0xd0ec, 0x0120, 0x2011, 0x8049, 0x080c, 0x4672, 0x6017, 0xf300, + 0x0010, 0x6017, 0xf100, 0x6003, 0x0001, 0x6007, 0x0041, 0x080c, + 0x8000, 0x080c, 0x8582, 0x0804, 0xc6ba, 0x6017, 0xf500, 0x0c98, + 0x6017, 0xf600, 0x0804, 0xc6da, 0x6017, 0xf200, 0x0804, 0xc6da, + 0xa867, 0x0146, 0xa86b, 0x0000, 0x6008, 0xa886, 0x2c00, 0xa87a, + 0x7044, 0x9084, 0x0003, 0x9080, 0xc6c2, 0x2005, 0xa87e, 0x2928, + 0x6010, 0x2058, 0xb8a0, 0xa876, 0xb828, 0xa88a, 0xb82c, 0xa88e, + 0xb830, 0xa892, 0xb834, 0xa896, 0xa883, 0x003d, 0x2009, 0x0205, + 0x2104, 0x9085, 0x0080, 0x200a, 0x20e1, 0x0000, 0x2011, 0x0210, + 0x2214, 0x9294, 0x0fff, 0xaaa2, 0x9282, 0x0111, 0x1a0c, 0x0db2, + 0x8210, 0x821c, 0x2001, 0x026c, 0x2098, 0xa860, 0x20e8, 0xa85c, + 0x9080, 0x0029, 0x20a0, 0x2011, 0xc7a4, 0x2041, 0x0001, 0x223d, + 0x9784, 0x00ff, 0x9322, 0x1208, 0x2300, 0x20a8, 0x4003, 0x931a, + 0x0530, 0x8210, 0xd7fc, 0x1130, 0x8d68, 0x2d0a, 0x2001, 0x0260, + 0x2098, 0x0c68, 0x2950, 0x080c, 0x0fee, 0x0170, 0x2900, 0xb002, + 0xa867, 0x0147, 0xa86b, 0x0000, 0xa860, 0x20e8, 0xa85c, 0x9080, + 0x001b, 0x20a0, 0x8840, 0x08d8, 0x2548, 0xa800, 0x902d, 0x0118, + 0x080c, 0x1007, 0x0cc8, 0x080c, 0x1007, 0x0804, 0xc6c6, 0x2548, + 0x8847, 0x9885, 0x0046, 0xa866, 0x2009, 0x0205, 0x200b, 0x0000, + 0x080c, 0xcf91, 0x0804, 0xc6ba, 0x8010, 0x0004, 0x801a, 0x0006, + 0x8018, 0x0008, 0x8016, 0x000a, 0x8014, 0x9186, 0x0013, 0x1160, + 0x6004, 0x908a, 0x0054, 0x1a0c, 0x0db2, 0x9082, 0x0040, 0x0a0c, + 0x0db2, 0x2008, 0x0804, 0xc855, 0x9186, 0x0051, 0x0108, 0x00c0, + 0x2001, 0x0109, 0x2004, 0xd084, 0x0904, 0xc806, 0x0126, 0x2091, + 0x2800, 0x0006, 0x0016, 0x0026, 0x080c, 0x7eec, 0x002e, 0x001e, + 0x000e, 0x012e, 0x6000, 0x9086, 0x0002, 0x1580, 0x0804, 0xc89d, + 0x9186, 0x0027, 0x0530, 0x9186, 0x0048, 0x0128, 0x9186, 0x0014, + 0x0500, 0x190c, 0x0db2, 0x2001, 0x0109, 0x2004, 0xd084, 0x01f0, + 0x00c6, 0x0126, 0x2091, 0x2800, 0x00c6, 0x2061, 0x0100, 0x0006, + 0x0016, 0x0026, 0x080c, 0x7eec, 0x002e, 0x001e, 0x000e, 0x00ce, + 0x012e, 0x00ce, 0x6000, 0x9086, 0x0004, 0x190c, 0x0db2, 0x0804, + 0xc97e, 0x6004, 0x9082, 0x0040, 0x2008, 0x001a, 0x080c, 0x9a6b, + 0x0005, 0xc81c, 0xc81e, 0xc81e, 0xc845, 0xc81c, 0xc81c, 0xc81c, + 0xc81c, 0xc81c, 0xc81c, 0xc81c, 0xc81c, 0xc81c, 0xc81c, 0xc81c, + 0xc81c, 0xc81c, 0xc81c, 0xc81c, 0x080c, 0x0db2, 0x080c, 0x847d, + 0x080c, 0x8582, 0x0036, 0x0096, 0x6014, 0x904d, 0x01d8, 0x080c, + 0xb5fb, 0x01c0, 0x6003, 0x0002, 0x6010, 0x00b6, 0x2058, 0xb800, + 0x00be, 0xd0bc, 0x1178, 0x2019, 0x0004, 0x080c, 0xcf91, 0x6017, + 0x0000, 0x6018, 0x9005, 0x1120, 0x2001, 0x1956, 0x2004, 0x601a, + 0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x0096, 0x080c, 0x847d, + 0x080c, 0x8582, 0x080c, 0xb5fb, 0x0120, 0x6014, 0x2048, 0x080c, + 0x1007, 0x080c, 0x9a06, 0x009e, 0x0005, 0x0002, 0xc869, 0xc880, + 0xc86b, 0xc897, 0xc869, 0xc869, 0xc869, 0xc869, 0xc869, 0xc869, + 0xc869, 0xc869, 0xc869, 0xc869, 0xc869, 0xc869, 0xc869, 0xc869, + 0xc869, 0x080c, 0x0db2, 0x0096, 0x080c, 0x847d, 0x6014, 0x2048, + 0xa87c, 0xd0b4, 0x0138, 0x6003, 0x0007, 0x2009, 0x0043, 0x080c, + 0x9a50, 0x0010, 0x6003, 0x0004, 0x080c, 0x8582, 0x009e, 0x0005, + 0x080c, 0x847d, 0x080c, 0xb5fb, 0x0138, 0x6114, 0x0096, 0x2148, + 0xa97c, 0x009e, 0xd1ec, 0x1138, 0x080c, 0x7e13, 0x080c, 0x99d6, + 0x080c, 0x8582, 0x0005, 0x080c, 0xd1e8, 0x0db0, 0x0cc8, 0x080c, + 0x847d, 0x2009, 0x0041, 0x0804, 0xca06, 0x9182, 0x0040, 0x0002, + 0xc8b3, 0xc8b5, 0xc8b3, 0xc8b3, 0xc8b3, 0xc8b3, 0xc8b3, 0xc8b3, + 0xc8b3, 0xc8b3, 0xc8b3, 0xc8b3, 0xc8b3, 0xc8b3, 0xc8b3, 0xc8b3, + 0xc8b3, 0xc8b6, 0xc8b3, 0x080c, 0x0db2, 0x0005, 0x00d6, 0x080c, + 0x7e13, 0x00de, 0x080c, 0xd240, 0x080c, 0x99d6, 0x0005, 0x9182, + 0x0040, 0x0002, 0xc8d5, 0xc8d5, 0xc8d5, 0xc8d5, 0xc8d5, 0xc8d5, + 0xc8d5, 0xc8d5, 0xc8d5, 0xc8d7, 0xc946, 0xc8d5, 0xc8d5, 0xc8d5, + 0xc8d5, 0xc946, 0xc8d5, 0xc8d5, 0xc8d5, 0x080c, 0x0db2, 0x2001, + 0x0105, 0x2004, 0x9084, 0x1800, 0x01c8, 0x2001, 0x0132, 0x200c, + 0x2001, 0x0131, 0x2004, 0x9105, 0x1904, 0xc946, 0x2009, 0x180c, + 0x2104, 0xd0d4, 0x0904, 0xc946, 0xc0d4, 0x200a, 0x2009, 0x0105, + 0x2104, 0x9084, 0xe7fd, 0x9085, 0x0010, 0x200a, 0x2001, 0x1873, + 0x2004, 0xd0e4, 0x1528, 0x603b, 0x0000, 0x080c, 0x8532, 0x6014, + 0x0096, 0x2048, 0xa87c, 0xd0fc, 0x0188, 0x908c, 0x0003, 0x918e, + 0x0002, 0x0508, 0x2001, 0x180c, 0x2004, 0xd0d4, 0x11e0, 0x080c, + 0x865d, 0x2009, 0x0041, 0x009e, 0x0804, 0xca06, 0x080c, 0x865d, + 0x6003, 0x0007, 0x601b, 0x0000, 0x080c, 0x7e13, 0x009e, 0x0005, + 0x2001, 0x0100, 0x2004, 0x9082, 0x0005, 0x0aa8, 0x2001, 0x011f, + 0x2004, 0x603a, 0x0890, 0x2001, 0x180c, 0x200c, 0xc1d4, 0x2102, + 0xd1cc, 0x0110, 0x080c, 0x28ea, 0x080c, 0x865d, 0x6014, 0x2048, + 0xa97c, 0xd1ec, 0x1130, 0x080c, 0x7e13, 0x080c, 0x99d6, 0x009e, + 0x0005, 0x080c, 0xd1e8, 0x0db8, 0x009e, 0x0005, 0x2001, 0x180c, + 0x200c, 0xc1d4, 0x2102, 0x0036, 0x080c, 0x8532, 0x080c, 0x865d, + 0x6014, 0x0096, 0x2048, 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, + 0xd0bc, 0x0188, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x0140, + 0xa8ac, 0x6330, 0x931a, 0x6332, 0xa8b0, 0x632c, 0x931b, 0x632e, + 0x6003, 0x0002, 0x0080, 0x2019, 0x0004, 0x080c, 0xcf91, 0x6018, + 0x9005, 0x1128, 0x2001, 0x1956, 0x2004, 0x8003, 0x601a, 0x6017, + 0x0000, 0x6003, 0x0007, 0x009e, 0x003e, 0x0005, 0x9182, 0x0040, + 0x0002, 0xc995, 0xc995, 0xc995, 0xc995, 0xc995, 0xc995, 0xc995, + 0xc995, 0xc997, 0xc995, 0xc995, 0xc995, 0xc995, 0xc995, 0xc995, + 0xc995, 0xc995, 0xc995, 0xc995, 0xc9e2, 0x080c, 0x0db2, 0x6014, + 0x0096, 0x2048, 0xa834, 0xaa38, 0x6110, 0x00b6, 0x2058, 0xb900, + 0x00be, 0xd1bc, 0x1190, 0x920d, 0x1518, 0xa87c, 0xd0fc, 0x0128, + 0x2009, 0x0041, 0x009e, 0x0804, 0xca06, 0x6003, 0x0007, 0x601b, + 0x0000, 0x080c, 0x7e13, 0x009e, 0x0005, 0x6124, 0xd1f4, 0x1d58, + 0x0006, 0x0046, 0xacac, 0x9422, 0xa9b0, 0x2200, 0x910b, 0x6030, + 0x9420, 0x6432, 0x602c, 0x9109, 0x612e, 0x004e, 0x000e, 0x08d8, + 0x6110, 0x00b6, 0x2158, 0xb900, 0x00be, 0xd1bc, 0x1178, 0x2009, + 0x180d, 0x210c, 0xd19c, 0x0118, 0x6003, 0x0007, 0x0010, 0x6003, + 0x0006, 0x00e9, 0x080c, 0x7e15, 0x009e, 0x0005, 0x6003, 0x0002, + 0x009e, 0x0005, 0x6024, 0xd0f4, 0x0128, 0x080c, 0x14c9, 0x1904, + 0xc997, 0x0005, 0x6014, 0x0096, 0x2048, 0xa834, 0xa938, 0x009e, + 0x9105, 0x1120, 0x080c, 0x14c9, 0x1904, 0xc997, 0x0005, 0xd2fc, + 0x0140, 0x8002, 0x8000, 0x8212, 0x9291, 0x0000, 0x2009, 0x0009, + 0x0010, 0x2009, 0x0015, 0xaa9a, 0xa896, 0x0005, 0x9182, 0x0040, + 0x0208, 0x0062, 0x9186, 0x0013, 0x0120, 0x9186, 0x0014, 0x190c, + 0x0db2, 0x6024, 0xd0dc, 0x090c, 0x0db2, 0x0005, 0xca29, 0xca35, + 0xca41, 0xca4d, 0xca29, 0xca29, 0xca29, 0xca29, 0xca30, 0xca2b, + 0xca2b, 0xca29, 0xca29, 0xca29, 0xca29, 0xca2b, 0xca29, 0xca2b, + 0xca29, 0x080c, 0x0db2, 0x6024, 0xd0dc, 0x090c, 0x0db2, 0x0005, + 0x6014, 0x9005, 0x190c, 0x0db2, 0x0005, 0x6003, 0x0001, 0x6106, + 0x080c, 0x8000, 0x0126, 0x2091, 0x8000, 0x080c, 0x8582, 0x012e, + 0x0005, 0x6003, 0x0001, 0x6106, 0x080c, 0x8000, 0x0126, 0x2091, + 0x8000, 0x080c, 0x8582, 0x012e, 0x0005, 0x6003, 0x0003, 0x6106, + 0x2c10, 0x080c, 0x1976, 0x0126, 0x2091, 0x8000, 0x080c, 0x8065, + 0x080c, 0x865d, 0x012e, 0x0005, 0x0126, 0x2091, 0x8000, 0x0036, + 0x0096, 0x9182, 0x0040, 0x0023, 0x009e, 0x003e, 0x012e, 0x0005, + 0xca78, 0xca7a, 0xca8c, 0xcaa6, 0xca78, 0xca78, 0xca78, 0xca78, + 0xca78, 0xca78, 0xca78, 0xca78, 0xca78, 0xca78, 0xca78, 0xca78, + 0x080c, 0x0db2, 0x6014, 0x2048, 0xa87c, 0xd0fc, 0x01f8, 0x909c, + 0x0003, 0x939e, 0x0003, 0x01d0, 0x6003, 0x0001, 0x6106, 0x080c, + 0x8000, 0x080c, 0x8582, 0x0470, 0x6014, 0x2048, 0xa87c, 0xd0fc, + 0x0168, 0x909c, 0x0003, 0x939e, 0x0003, 0x0140, 0x6003, 0x0001, + 0x6106, 0x080c, 0x8000, 0x080c, 0x8582, 0x00e0, 0x901e, 0x6316, + 0x631a, 0x2019, 0x0004, 0x080c, 0xcf91, 0x00a0, 0x6014, 0x2048, + 0xa87c, 0xd0fc, 0x0d98, 0x909c, 0x0003, 0x939e, 0x0003, 0x0d70, + 0x6003, 0x0003, 0x6106, 0x2c10, 0x080c, 0x1976, 0x080c, 0x8065, + 0x080c, 0x865d, 0x0005, 0x080c, 0x847d, 0x6114, 0x81ff, 0x0158, + 0x0096, 0x2148, 0x080c, 0xd28c, 0x0036, 0x2019, 0x0029, 0x080c, + 0xcf91, 0x003e, 0x009e, 0x080c, 0x9a06, 0x080c, 0x8582, 0x0005, + 0x080c, 0x8532, 0x6114, 0x81ff, 0x0158, 0x0096, 0x2148, 0x080c, + 0xd28c, 0x0036, 0x2019, 0x0029, 0x080c, 0xcf91, 0x003e, 0x009e, + 0x080c, 0x9a06, 0x080c, 0x865d, 0x0005, 0x9182, 0x0085, 0x0002, + 0xcaf7, 0xcaf5, 0xcaf5, 0xcb03, 0xcaf5, 0xcaf5, 0xcaf5, 0xcaf5, + 0xcaf5, 0xcaf5, 0xcaf5, 0xcaf5, 0xcaf5, 0x080c, 0x0db2, 0x6003, + 0x000b, 0x6106, 0x080c, 0x8000, 0x0126, 0x2091, 0x8000, 0x080c, + 0x8582, 0x012e, 0x0005, 0x0026, 0x00e6, 0x080c, 0xd1df, 0x0118, + 0x080c, 0x99d6, 0x0450, 0x2071, 0x0260, 0x7224, 0x6216, 0x2001, + 0x180d, 0x2004, 0xd0e4, 0x0150, 0x6010, 0x00b6, 0x2058, 0xbca0, + 0x00be, 0x2c00, 0x2011, 0x014e, 0x080c, 0x9cf4, 0x7220, 0x080c, + 0xce37, 0x0118, 0x6007, 0x0086, 0x0040, 0x6007, 0x0087, 0x7224, + 0x9296, 0xffff, 0x1110, 0x6007, 0x0086, 0x6003, 0x0001, 0x080c, + 0x8000, 0x080c, 0x8582, 0x080c, 0x865d, 0x00ee, 0x002e, 0x0005, + 0x9186, 0x0013, 0x1160, 0x6004, 0x908a, 0x0085, 0x0a0c, 0x0db2, + 0x908a, 0x0092, 0x1a0c, 0x0db2, 0x9082, 0x0085, 0x00a2, 0x9186, + 0x0027, 0x0130, 0x9186, 0x0014, 0x0118, 0x080c, 0x9a6b, 0x0050, + 0x2001, 0x0007, 0x080c, 0x5efb, 0x080c, 0x847d, 0x080c, 0x9a06, + 0x080c, 0x8582, 0x0005, 0xcb68, 0xcb6a, 0xcb6a, 0xcb68, 0xcb68, + 0xcb68, 0xcb68, 0xcb68, 0xcb68, 0xcb68, 0xcb68, 0xcb68, 0xcb68, + 0x080c, 0x0db2, 0x080c, 0x847d, 0x080c, 0x9a06, 0x080c, 0x8582, + 0x0005, 0x9182, 0x0085, 0x0a0c, 0x0db2, 0x9182, 0x0092, 0x1a0c, + 0x0db2, 0x9182, 0x0085, 0x0002, 0xcb89, 0xcb89, 0xcb89, 0xcb8b, + 0xcb89, 0xcb89, 0xcb89, 0xcb89, 0xcb89, 0xcb89, 0xcb89, 0xcb89, + 0xcb89, 0x080c, 0x0db2, 0x0005, 0x9186, 0x0013, 0x0148, 0x9186, + 0x0014, 0x0130, 0x9186, 0x0027, 0x0118, 0x080c, 0x9a6b, 0x0030, + 0x080c, 0x847d, 0x080c, 0x9a06, 0x080c, 0x8582, 0x0005, 0x0036, + 0x080c, 0xd240, 0x6043, 0x0000, 0x2019, 0x000b, 0x0031, 0x6023, + 0x0006, 0x6003, 0x0007, 0x003e, 0x0005, 0x0126, 0x0036, 0x2091, + 0x8000, 0x0086, 0x2c40, 0x0096, 0x904e, 0x080c, 0x9349, 0x009e, + 0x008e, 0x1550, 0x0076, 0x2c38, 0x080c, 0x93f4, 0x007e, 0x1520, + 0x6000, 0x9086, 0x0000, 0x0500, 0x6020, 0x9086, 0x0007, 0x01e0, + 0x0096, 0x601c, 0xd084, 0x0140, 0x080c, 0xd240, 0x080c, 0xbd04, + 0x080c, 0x1827, 0x6023, 0x0007, 0x6014, 0x2048, 0x080c, 0xb5fb, + 0x0110, 0x080c, 0xcf91, 0x009e, 0x6017, 0x0000, 0x080c, 0xd240, + 0x6023, 0x0007, 0x080c, 0xbd04, 0x003e, 0x012e, 0x0005, 0x00f6, + 0x00c6, 0x00b6, 0x0036, 0x0156, 0x2079, 0x0260, 0x7938, 0x783c, + 0x080c, 0x24d6, 0x15b8, 0x0016, 0x00c6, 0x080c, 0x5f7e, 0x1580, + 0x001e, 0x00c6, 0x2160, 0x080c, 0xbd01, 0x00ce, 0x002e, 0x0026, + 0x0016, 0x2019, 0x0029, 0x080c, 0x94b5, 0x080c, 0x8180, 0x0076, + 0x903e, 0x080c, 0x8078, 0x007e, 0x001e, 0x0076, 0x903e, 0x080c, + 0xcd62, 0x007e, 0x0026, 0xba04, 0x9294, 0xff00, 0x8217, 0x9286, + 0x0006, 0x0118, 0x9286, 0x0004, 0x1118, 0xbaa0, 0x080c, 0x2eea, + 0x002e, 0x001e, 0x080c, 0x5a3b, 0xbe12, 0xbd16, 0x9006, 0x0010, + 0x00ce, 0x001e, 0x015e, 0x003e, 0x00be, 0x00ce, 0x00fe, 0x0005, + 0x00c6, 0x00d6, 0x00b6, 0x0016, 0x2009, 0x1822, 0x2104, 0x9086, + 0x0074, 0x1904, 0xcc89, 0x2069, 0x0260, 0x6944, 0x9182, 0x0100, + 0x06e0, 0x6940, 0x9184, 0x8000, 0x0904, 0xcc86, 0x2001, 0x194d, + 0x2004, 0x9005, 0x1140, 0x6010, 0x2058, 0xb8b0, 0x9005, 0x0118, + 0x9184, 0x0800, 0x0598, 0x6948, 0x918a, 0x0001, 0x0648, 0x080c, + 0xd2f4, 0x0118, 0x6978, 0xd1fc, 0x11b8, 0x2009, 0x0205, 0x200b, + 0x0001, 0x693c, 0x81ff, 0x1198, 0x6944, 0x9182, 0x0100, 0x02a8, + 0x6940, 0x81ff, 0x1178, 0x6948, 0x918a, 0x0001, 0x0288, 0x6950, + 0x918a, 0x0001, 0x0298, 0x00d0, 0x6017, 0x0100, 0x00a0, 0x6017, + 0x0300, 0x0088, 0x6017, 0x0500, 0x0070, 0x6017, 0x0700, 0x0058, + 0x6017, 0x0900, 0x0040, 0x6017, 0x0b00, 0x0028, 0x6017, 0x0f00, + 0x0010, 0x6017, 0x2d00, 0x9085, 0x0001, 0x0008, 0x9006, 0x001e, + 0x00be, 0x00de, 0x00ce, 0x0005, 0x00c6, 0x00b6, 0x0026, 0x0036, + 0x0156, 0x6210, 0x2258, 0xbb04, 0x9394, 0x00ff, 0x9286, 0x0006, + 0x0180, 0x9286, 0x0004, 0x0168, 0x9394, 0xff00, 0x8217, 0x9286, + 0x0006, 0x0138, 0x9286, 0x0004, 0x0120, 0x080c, 0x5f8d, 0x0804, + 0xccf1, 0x2011, 0x0276, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, + 0x000a, 0x080c, 0xa91d, 0x009e, 0x15a8, 0x2011, 0x027a, 0x20a9, + 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, 0x080c, 0xa91d, 0x009e, + 0x1548, 0x0046, 0x0016, 0xbaa0, 0x2220, 0x9006, 0x2009, 0x1854, + 0x210c, 0xd1a4, 0x0138, 0x2009, 0x0029, 0x080c, 0xcfe6, 0xb800, + 0xc0e5, 0xb802, 0x2019, 0x0029, 0x080c, 0x8180, 0x0076, 0x2039, + 0x0000, 0x080c, 0x8078, 0x2c08, 0x080c, 0xcd62, 0x007e, 0x2001, + 0x0007, 0x080c, 0x5efb, 0x2001, 0x0007, 0x080c, 0x5ecf, 0x001e, + 0x004e, 0x9006, 0x015e, 0x003e, 0x002e, 0x00be, 0x00ce, 0x0005, + 0x00d6, 0x2069, 0x026e, 0x6800, 0x9086, 0x0800, 0x0118, 0x6017, + 0x0000, 0x0008, 0x9006, 0x00de, 0x0005, 0x00b6, 0x00f6, 0x0016, + 0x0026, 0x0036, 0x0156, 0x2079, 0x026c, 0x7930, 0x7834, 0x080c, + 0x24d6, 0x11d0, 0x080c, 0x5f7e, 0x11b8, 0x2011, 0x0270, 0x20a9, + 0x0004, 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xa91d, 0x009e, + 0x1158, 0x2011, 0x0274, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, + 0x0006, 0x080c, 0xa91d, 0x009e, 0x015e, 0x003e, 0x002e, 0x001e, + 0x00fe, 0x00be, 0x0005, 0x00b6, 0x0006, 0x0016, 0x0026, 0x0036, + 0x0156, 0x2011, 0x0263, 0x2204, 0x8211, 0x220c, 0x080c, 0x24d6, + 0x11d0, 0x080c, 0x5f7e, 0x11b8, 0x2011, 0x0276, 0x20a9, 0x0004, + 0x0096, 0x2b48, 0x2019, 0x000a, 0x080c, 0xa91d, 0x009e, 0x1158, + 0x2011, 0x027a, 0x20a9, 0x0004, 0x0096, 0x2b48, 0x2019, 0x0006, + 0x080c, 0xa91d, 0x009e, 0x015e, 0x003e, 0x002e, 0x001e, 0x000e, + 0x00be, 0x0005, 0x00e6, 0x00c6, 0x0086, 0x0076, 0x0066, 0x0056, + 0x0046, 0x0026, 0x0126, 0x2091, 0x8000, 0x2740, 0x2029, 0x19bf, + 0x252c, 0x2021, 0x19c5, 0x2424, 0x2061, 0x1cd0, 0x2071, 0x1800, + 0x764c, 0x706c, 0x81ff, 0x0150, 0x0006, 0x9186, 0x1a73, 0x000e, + 0x0128, 0x8001, 0x9602, 0x1a04, 0xcdf0, 0x0018, 0x9606, 0x0904, + 0xcdf0, 0x2100, 0x9c06, 0x0904, 0xcde7, 0x080c, 0xd022, 0x1904, + 0xcde7, 0x080c, 0xd311, 0x0904, 0xcde7, 0x080c, 0xd012, 0x0904, + 0xcde7, 0x6720, 0x9786, 0x0001, 0x1148, 0x080c, 0x2f81, 0x0904, + 0xce0b, 0x6004, 0x9086, 0x0000, 0x1904, 0xce0b, 0x9786, 0x0004, + 0x0904, 0xce0b, 0x9786, 0x0007, 0x05d0, 0x2500, 0x9c06, 0x05b8, + 0x2400, 0x9c06, 0x05a0, 0x88ff, 0x0118, 0x6054, 0x9906, 0x1578, + 0x0096, 0x6000, 0x9086, 0x0004, 0x1120, 0x0016, 0x080c, 0x1827, + 0x001e, 0x9786, 0x000a, 0x0148, 0x080c, 0xb7fa, 0x1130, 0x080c, + 0xa364, 0x009e, 0x080c, 0x9a06, 0x00d0, 0x6014, 0x2048, 0x080c, + 0xb5fb, 0x0190, 0x9786, 0x0003, 0x1528, 0xa867, 0x0103, 0xab7a, + 0xa877, 0x0000, 0x080c, 0xd28c, 0x0016, 0x080c, 0xb8e3, 0x080c, + 0x6529, 0x001e, 0x080c, 0xb7dd, 0x009e, 0x080c, 0x9a06, 0x9ce0, + 0x0018, 0x2001, 0x1818, 0x2004, 0x9c02, 0x1210, 0x0804, 0xcd76, + 0x012e, 0x002e, 0x004e, 0x005e, 0x006e, 0x007e, 0x008e, 0x00ce, + 0x00ee, 0x0005, 0x9786, 0x0006, 0x1150, 0x9386, 0x0005, 0x0128, + 0x080c, 0xd28c, 0x080c, 0xcf91, 0x08f8, 0x009e, 0x0c00, 0x9786, + 0x000a, 0x0968, 0x0850, 0x81ff, 0x09d0, 0x9180, 0x0001, 0x2004, + 0x9086, 0x0018, 0x0130, 0x9180, 0x0001, 0x2004, 0x9086, 0x002d, + 0x1970, 0x6000, 0x9086, 0x0002, 0x1950, 0x080c, 0xb7e9, 0x0130, + 0x080c, 0xb7fa, 0x1920, 0x080c, 0xa364, 0x0038, 0x080c, 0x2e55, + 0x080c, 0xb7fa, 0x1110, 0x080c, 0xa364, 0x080c, 0x9a06, 0x0804, + 0xcde7, 0xa864, 0x9084, 0x00ff, 0x9086, 0x0039, 0x0005, 0x00c6, + 0x00e6, 0x0016, 0x2c08, 0x2170, 0x9006, 0x080c, 0xcfb8, 0x001e, + 0x0120, 0x6020, 0x9084, 0x000f, 0x001b, 0x00ee, 0x00ce, 0x0005, + 0xce56, 0xce56, 0xce56, 0xce56, 0xce56, 0xce56, 0xce58, 0xce56, + 0xce56, 0xce56, 0xce56, 0x9a06, 0x9a06, 0xce56, 0x9006, 0x0005, + 0x0036, 0x0046, 0x0016, 0x7010, 0x00b6, 0x2058, 0xbca0, 0x00be, + 0x2c00, 0x2009, 0x0020, 0x080c, 0xcfe6, 0x001e, 0x004e, 0x2019, + 0x0002, 0x080c, 0xcbad, 0x003e, 0x9085, 0x0001, 0x0005, 0x0096, + 0x080c, 0xb5fb, 0x0140, 0x6014, 0x904d, 0x080c, 0xb251, 0x687b, + 0x0005, 0x080c, 0x6536, 0x009e, 0x080c, 0x9a06, 0x9085, 0x0001, + 0x0005, 0x2001, 0x0001, 0x080c, 0x5ebb, 0x0156, 0x0016, 0x0026, + 0x0036, 0x20a9, 0x0004, 0x2019, 0x1805, 0x2011, 0x0276, 0x080c, + 0xa909, 0x003e, 0x002e, 0x001e, 0x015e, 0x9005, 0x0005, 0x00f6, + 0x00e6, 0x00c6, 0x0086, 0x0076, 0x0066, 0x00b6, 0x0126, 0x2091, + 0x8000, 0x2740, 0x2061, 0x1cd0, 0x2079, 0x0001, 0x8fff, 0x0904, + 0xcef1, 0x2071, 0x1800, 0x764c, 0x706c, 0x8001, 0x9602, 0x1a04, + 0xcef1, 0x88ff, 0x0120, 0x2800, 0x9c06, 0x1590, 0x2078, 0x080c, + 0xd012, 0x0570, 0x2400, 0x9c06, 0x0558, 0x6720, 0x9786, 0x0006, + 0x1538, 0x9786, 0x0007, 0x0520, 0x88ff, 0x1140, 0x6010, 0x9b06, + 0x11f8, 0x85ff, 0x0118, 0x6054, 0x9106, 0x11d0, 0x0096, 0x601c, + 0xd084, 0x0140, 0x080c, 0xd240, 0x080c, 0xbd04, 0x080c, 0x1827, + 0x6023, 0x0007, 0x6014, 0x2048, 0x080c, 0xb5fb, 0x0120, 0x0046, + 0x080c, 0xcf91, 0x004e, 0x009e, 0x080c, 0x9a06, 0x88ff, 0x1198, + 0x9ce0, 0x0018, 0x2001, 0x1818, 0x2004, 0x9c02, 0x1210, 0x0804, + 0xcea6, 0x9006, 0x012e, 0x00be, 0x006e, 0x007e, 0x008e, 0x00ce, + 0x00ee, 0x00fe, 0x0005, 0x98c5, 0x0001, 0x0ca0, 0x00b6, 0x0076, + 0x0056, 0x0086, 0x9046, 0x2029, 0x0001, 0x2c20, 0x2019, 0x0002, + 0x6210, 0x2258, 0x0096, 0x904e, 0x080c, 0x9349, 0x009e, 0x008e, + 0x903e, 0x080c, 0x93f4, 0x080c, 0xce97, 0x005e, 0x007e, 0x00be, + 0x0005, 0x00b6, 0x0046, 0x0056, 0x0076, 0x00c6, 0x0156, 0x2c20, + 0x2128, 0x20a9, 0x007f, 0x900e, 0x0016, 0x0036, 0x080c, 0x5f7e, + 0x1190, 0x0056, 0x0086, 0x9046, 0x2508, 0x2029, 0x0001, 0x0096, + 0x904e, 0x080c, 0x9349, 0x009e, 0x008e, 0x903e, 0x080c, 0x93f4, + 0x080c, 0xce97, 0x005e, 0x003e, 0x001e, 0x8108, 0x1f04, 0xcf24, + 0x015e, 0x00ce, 0x007e, 0x005e, 0x004e, 0x00be, 0x0005, 0x00b6, + 0x0076, 0x0056, 0x6210, 0x2258, 0x0086, 0x9046, 0x2029, 0x0001, + 0x2019, 0x0048, 0x0096, 0x904e, 0x080c, 0x9349, 0x009e, 0x008e, + 0x903e, 0x080c, 0x93f4, 0x2c20, 0x080c, 0xce97, 0x005e, 0x007e, + 0x00be, 0x0005, 0x00b6, 0x0046, 0x0056, 0x0076, 0x00c6, 0x0156, + 0x2c20, 0x20a9, 0x0800, 0x900e, 0x0016, 0x0036, 0x080c, 0x5f7e, + 0x11a0, 0x0086, 0x9046, 0x2828, 0x0046, 0x2021, 0x0001, 0x080c, + 0xd224, 0x004e, 0x0096, 0x904e, 0x080c, 0x9349, 0x009e, 0x008e, + 0x903e, 0x080c, 0x93f4, 0x080c, 0xce97, 0x003e, 0x001e, 0x8108, + 0x1f04, 0xcf6c, 0x015e, 0x00ce, 0x007e, 0x005e, 0x004e, 0x00be, + 0x0005, 0x0016, 0x00f6, 0x080c, 0xb5f9, 0x0198, 0xa864, 0x9084, + 0x00ff, 0x9086, 0x0046, 0x0180, 0xa800, 0x907d, 0x0138, 0xa803, + 0x0000, 0xab82, 0x080c, 0x6536, 0x2f48, 0x0cb0, 0xab82, 0x080c, + 0x6536, 0x00fe, 0x001e, 0x0005, 0xa800, 0x907d, 0x0130, 0xa803, + 0x0000, 0x080c, 0x6536, 0x2f48, 0x0cb8, 0x080c, 0x6536, 0x0c88, + 0x00e6, 0x0046, 0x0036, 0x2061, 0x1cd0, 0x9005, 0x1138, 0x2071, + 0x1800, 0x744c, 0x706c, 0x8001, 0x9402, 0x12d8, 0x2100, 0x9c06, + 0x0168, 0x6000, 0x9086, 0x0000, 0x0148, 0x6008, 0x9206, 0x1130, + 0x6010, 0x91a0, 0x0004, 0x2424, 0x9406, 0x0140, 0x9ce0, 0x0018, + 0x2001, 0x1818, 0x2004, 0x9c02, 0x1220, 0x0c40, 0x9085, 0x0001, + 0x0008, 0x9006, 0x003e, 0x004e, 0x00ee, 0x0005, 0x0096, 0x0006, + 0x080c, 0x0fd5, 0x000e, 0x090c, 0x0db2, 0xa867, 0x010d, 0xa88e, + 0x0026, 0x2010, 0x080c, 0xb5e9, 0x2001, 0x0000, 0x0120, 0x2200, + 0x9080, 0x0015, 0x2004, 0x002e, 0xa87a, 0xa986, 0xac76, 0xa87f, + 0x0000, 0x2001, 0x195d, 0x2004, 0xa882, 0x9006, 0xa8e2, 0xa802, + 0xa86a, 0xa88a, 0x0126, 0x2091, 0x8000, 0x080c, 0x6536, 0x012e, + 0x009e, 0x0005, 0x6700, 0x9786, 0x0000, 0x0158, 0x9786, 0x0001, + 0x0140, 0x9786, 0x000a, 0x0128, 0x9786, 0x0009, 0x0110, 0x9085, + 0x0001, 0x0005, 0x00e6, 0x6010, 0x9075, 0x0138, 0x00b6, 0x2058, + 0xb8a0, 0x00be, 0x9206, 0x00ee, 0x0005, 0x9085, 0x0001, 0x0cd8, + 0x0016, 0x6004, 0x908e, 0x001e, 0x11a0, 0x8007, 0x6134, 0x918c, + 0x00ff, 0x9105, 0x6036, 0x6007, 0x0085, 0x6003, 0x000b, 0x6023, + 0x0005, 0x2001, 0x1956, 0x2004, 0x601a, 0x080c, 0x8000, 0x080c, + 0x8582, 0x001e, 0x0005, 0xa001, 0xa001, 0x0005, 0x6024, 0xd0e4, + 0x0158, 0xd0cc, 0x0118, 0x080c, 0xb927, 0x0030, 0x080c, 0xd240, + 0x080c, 0x7e13, 0x080c, 0x99d6, 0x0005, 0x9280, 0x0008, 0x2004, + 0x9084, 0x000f, 0x0002, 0xd071, 0xd071, 0xd071, 0xd073, 0xd071, + 0xd073, 0xd073, 0xd071, 0xd073, 0xd071, 0xd071, 0xd071, 0xd071, + 0xd071, 0x9006, 0x0005, 0x9085, 0x0001, 0x0005, 0x9280, 0x0008, + 0x2004, 0x9084, 0x000f, 0x0002, 0xd08a, 0xd08a, 0xd08a, 0xd08a, + 0xd08a, 0xd08a, 0xd097, 0xd08a, 0xd08a, 0xd08a, 0xd08a, 0xd08a, + 0xd08a, 0xd08a, 0x6007, 0x003b, 0x602f, 0x0009, 0x6017, 0x2a00, + 0x6003, 0x0001, 0x080c, 0x8000, 0x080c, 0x8582, 0x0005, 0x0096, + 0x00c6, 0x2260, 0x080c, 0xd240, 0x6043, 0x0000, 0x6024, 0xc0f4, + 0xc0e4, 0x6026, 0x603b, 0x0000, 0x00ce, 0x00d6, 0x2268, 0x9186, + 0x0007, 0x1904, 0xd0f1, 0x6814, 0x9005, 0x0138, 0x2048, 0xa87c, + 0xd0fc, 0x1118, 0x00de, 0x009e, 0x08a8, 0x6007, 0x003a, 0x6003, + 0x0001, 0x080c, 0x8000, 0x080c, 0x8582, 0x00c6, 0x2d60, 0x6100, + 0x9186, 0x0002, 0x1904, 0xd169, 0x6014, 0x9005, 0x1138, 0x6000, + 0x9086, 0x0007, 0x190c, 0x0db2, 0x0804, 0xd169, 0x2048, 0x080c, + 0xb5fb, 0x1130, 0x0028, 0x2048, 0xa800, 0x9005, 0x1de0, 0x2900, + 0x2048, 0xa87c, 0x9084, 0x0003, 0x9086, 0x0002, 0x1170, 0xa87c, + 0xc0dc, 0xc0f4, 0xa87e, 0xa880, 0xc0f4, 0xc0fc, 0xa882, 0x2009, + 0x0043, 0x080c, 0xca06, 0x0804, 0xd169, 0x2009, 0x0041, 0x0804, + 0xd163, 0x9186, 0x0005, 0x15a8, 0x6814, 0x2048, 0xa87c, 0xd0bc, + 0x1120, 0x00de, 0x009e, 0x0804, 0xd08a, 0xd0b4, 0x0128, 0xd0fc, + 0x090c, 0x0db2, 0x0804, 0xd0ab, 0x6007, 0x003a, 0x6003, 0x0001, + 0x080c, 0x8000, 0x080c, 0x8582, 0x00c6, 0x2d60, 0x6100, 0x9186, + 0x0002, 0x0120, 0x9186, 0x0004, 0x1904, 0xd169, 0x6814, 0x2048, + 0xa97c, 0xc1f4, 0xc1dc, 0xa97e, 0xa980, 0xc1f4, 0xc1fc, 0xc1bc, + 0xa982, 0x00f6, 0x2c78, 0x080c, 0x1582, 0x00fe, 0x2009, 0x0042, + 0x04d0, 0x0036, 0x080c, 0x0fd5, 0x090c, 0x0db2, 0xa867, 0x010d, + 0x9006, 0xa802, 0xa86a, 0xa88a, 0x2d18, 0xab8e, 0xa887, 0x0045, + 0x2c00, 0xa892, 0x6038, 0xa8a2, 0x2360, 0x6024, 0xc0dd, 0x6026, + 0x6010, 0x00b6, 0x2058, 0xb8a0, 0x00be, 0x2004, 0x6354, 0xab7a, + 0xa876, 0x9006, 0xa87e, 0xa882, 0xad9a, 0xae96, 0xa89f, 0x0001, + 0x080c, 0x6536, 0x2019, 0x0045, 0x6008, 0x2068, 0x080c, 0xcbad, + 0x2d00, 0x600a, 0x6023, 0x0006, 0x6003, 0x0007, 0x901e, 0x631a, + 0x6342, 0x003e, 0x0038, 0x6043, 0x0000, 0x6003, 0x0007, 0x080c, + 0xca06, 0x00ce, 0x00de, 0x009e, 0x0005, 0x9186, 0x0013, 0x1128, + 0x6004, 0x9082, 0x0085, 0x2008, 0x00c2, 0x9186, 0x0027, 0x1178, + 0x080c, 0x847d, 0x0036, 0x0096, 0x6014, 0x2048, 0x2019, 0x0004, + 0x080c, 0xcf91, 0x009e, 0x003e, 0x080c, 0x8582, 0x0005, 0x9186, + 0x0014, 0x0d70, 0x080c, 0x9a6b, 0x0005, 0xd19c, 0xd19a, 0xd19a, + 0xd19a, 0xd19a, 0xd19a, 0xd19c, 0xd19a, 0xd19a, 0xd19a, 0xd19a, + 0xd19a, 0xd19a, 0x080c, 0x0db2, 0x080c, 0x847d, 0x6003, 0x000c, + 0x080c, 0x8582, 0x0005, 0x9182, 0x0092, 0x1220, 0x9182, 0x0085, + 0x0208, 0x001a, 0x080c, 0x9a6b, 0x0005, 0xd1ba, 0xd1ba, 0xd1ba, + 0xd1ba, 0xd1bc, 0xd1dc, 0xd1ba, 0xd1ba, 0xd1ba, 0xd1ba, 0xd1ba, + 0xd1ba, 0xd1ba, 0x080c, 0x0db2, 0x00d6, 0x2c68, 0x080c, 0x9980, + 0x01b0, 0x6003, 0x0001, 0x6007, 0x001e, 0x2009, 0x026e, 0x210c, + 0x613a, 0x2009, 0x026f, 0x210c, 0x613e, 0x600b, 0xffff, 0x6910, + 0x6112, 0x6023, 0x0004, 0x080c, 0x8000, 0x080c, 0x8582, 0x2d60, + 0x080c, 0x99d6, 0x00de, 0x0005, 0x080c, 0x99d6, 0x0005, 0x00e6, + 0x6010, 0x00b6, 0x2058, 0xb800, 0x00be, 0xd0ec, 0x00ee, 0x0005, + 0x2009, 0x1873, 0x210c, 0xd1ec, 0x05b0, 0x6003, 0x0002, 0x6024, + 0xc0e5, 0x6026, 0xd0cc, 0x0150, 0x2001, 0x1957, 0x2004, 0x6042, + 0x2009, 0x1873, 0x210c, 0xd1f4, 0x1520, 0x00a0, 0x2009, 0x1873, + 0x210c, 0xd1f4, 0x0128, 0x6024, 0xc0e4, 0x6026, 0x9006, 0x00d8, + 0x2001, 0x1957, 0x200c, 0x2001, 0x1955, 0x2004, 0x9100, 0x9080, + 0x000a, 0x6042, 0x6010, 0x00b6, 0x2058, 0xb8ac, 0x00be, 0x0008, + 0x2104, 0x9005, 0x0118, 0x9088, 0x0003, 0x0cd0, 0x2c0a, 0x600f, + 0x0000, 0x9085, 0x0001, 0x0005, 0x0016, 0x00c6, 0x00e6, 0x6154, + 0xb8ac, 0x2060, 0x8cff, 0x0180, 0x84ff, 0x1118, 0x6054, 0x9106, + 0x1138, 0x600c, 0x2072, 0x080c, 0x7e13, 0x080c, 0x99d6, 0x0010, + 0x9cf0, 0x0003, 0x2e64, 0x0c70, 0x00ee, 0x00ce, 0x001e, 0x0005, + 0x00d6, 0x00b6, 0x6010, 0x2058, 0xb8ac, 0x2068, 0x9005, 0x0130, + 0x9c06, 0x0110, 0x680c, 0x0cd0, 0x600c, 0x680e, 0x00be, 0x00de, + 0x0005, 0x0026, 0x0036, 0x0156, 0x2011, 0x182a, 0x2204, 0x9084, + 0x00ff, 0x2019, 0x026e, 0x2334, 0x9636, 0x1508, 0x8318, 0x2334, + 0x2204, 0x9084, 0xff00, 0x9636, 0x11d0, 0x2011, 0x0270, 0x20a9, + 0x0004, 0x6010, 0x0096, 0x2048, 0x2019, 0x000a, 0x080c, 0xa91d, + 0x009e, 0x1168, 0x2011, 0x0274, 0x20a9, 0x0004, 0x6010, 0x0096, + 0x2048, 0x2019, 0x0006, 0x080c, 0xa91d, 0x009e, 0x1100, 0x015e, + 0x003e, 0x002e, 0x0005, 0x00e6, 0x2071, 0x1800, 0x080c, 0x59b4, + 0x080c, 0x2c2b, 0x00ee, 0x0005, 0x00e6, 0x6010, 0x00b6, 0x2058, + 0xb800, 0x00be, 0xd0fc, 0x0108, 0x0011, 0x00ee, 0x0005, 0xa880, + 0xc0e5, 0xa882, 0x0005, 0x00e6, 0x00d6, 0x00c6, 0x0076, 0x0066, + 0x0056, 0x0046, 0x0026, 0x0016, 0x0126, 0x2091, 0x8000, 0x2029, + 0x19bf, 0x252c, 0x2021, 0x19c5, 0x2424, 0x2061, 0x1cd0, 0x2071, + 0x1800, 0x764c, 0x706c, 0x9606, 0x0578, 0x6720, 0x9786, 0x0001, + 0x0118, 0x9786, 0x0008, 0x1500, 0x2500, 0x9c06, 0x01e8, 0x2400, + 0x9c06, 0x01d0, 0x080c, 0xd012, 0x01b8, 0x080c, 0xd022, 0x11a0, + 0x6000, 0x9086, 0x0004, 0x1120, 0x0016, 0x080c, 0x1827, 0x001e, + 0x080c, 0xb7e9, 0x1110, 0x080c, 0x2e55, 0x080c, 0xb7fa, 0x1110, + 0x080c, 0xa364, 0x080c, 0x9a06, 0x9ce0, 0x0018, 0x2001, 0x1818, + 0x2004, 0x9c02, 0x1208, 0x0858, 0x012e, 0x001e, 0x002e, 0x004e, + 0x005e, 0x006e, 0x007e, 0x00ce, 0x00de, 0x00ee, 0x0005, 0x2001, + 0x180f, 0x2004, 0xd0dc, 0x0005, 0x0006, 0x2001, 0x1835, 0x2004, + 0xd09c, 0x000e, 0x0005, 0x0006, 0x0036, 0x0046, 0x080c, 0xbcec, + 0x0168, 0x2019, 0xffff, 0x9005, 0x0128, 0x6010, 0x00b6, 0x2058, + 0xbba0, 0x00be, 0x2021, 0x0004, 0x080c, 0x4829, 0x004e, 0x003e, + 0x000e, 0x6004, 0x9086, 0x0001, 0x1128, 0x080c, 0x94b5, 0x080c, + 0x9a06, 0x9006, 0x0005, 0x0126, 0x0006, 0x00e6, 0x0016, 0x2091, + 0x8000, 0x2071, 0x1840, 0xd5a4, 0x0118, 0x7034, 0x8000, 0x7036, + 0xd5b4, 0x0118, 0x7030, 0x8000, 0x7032, 0xd5ac, 0x0178, 0x2500, + 0x9084, 0x0007, 0x908e, 0x0003, 0x0148, 0x908e, 0x0004, 0x0130, + 0x908e, 0x0005, 0x0118, 0x2071, 0x184a, 0x0089, 0x001e, 0x00ee, + 0x000e, 0x012e, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091, 0x8000, + 0x2071, 0x1842, 0x0021, 0x00ee, 0x000e, 0x012e, 0x0005, 0x2e04, + 0x8000, 0x2072, 0x1220, 0x8e70, 0x2e04, 0x8000, 0x2072, 0x0005, + 0x00e6, 0x2071, 0x1840, 0x0c99, 0x00ee, 0x0005, 0x00e6, 0x2071, + 0x1844, 0x0c69, 0x00ee, 0x0005, 0x0126, 0x0006, 0x00e6, 0x2091, + 0x8000, 0x2071, 0x1840, 0x7044, 0x8000, 0x7046, 0x00ee, 0x000e, + 0x012e, 0x0005, 0x0002, 0x0003, 0x03d8, 0x0000, 0x8064, 0x0008, + 0x0010, 0x0000, 0x8066, 0x0000, 0x0101, 0x0008, 0x4406, 0x000b, + 0x8060, 0x0000, 0x0400, 0x0000, 0x580c, 0x0003, 0x7933, 0x0003, + 0x5090, 0x000b, 0x4c09, 0x0003, 0xbac0, 0x0009, 0x008a, 0x0000, + 0x0c09, 0x000b, 0x15fe, 0x0008, 0x3409, 0x0003, 0x808c, 0x0008, + 0x0001, 0x0000, 0x0000, 0x0007, 0x4047, 0x000a, 0x808c, 0x0008, + 0x0002, 0x0000, 0x081b, 0x0003, 0x4022, 0x0000, 0x001c, 0x0003, + 0x4122, 0x0008, 0x4447, 0x0002, 0x0de8, 0x0003, 0x0bfe, 0x0008, + 0x11a0, 0x0001, 0x11ca, 0x000b, 0x0ca0, 0x0001, 0x11ca, 0x000b, + 0x9180, 0x0001, 0x0004, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, + 0x7f62, 0x0008, 0x8066, 0x0000, 0x0009, 0x0008, 0x442a, 0x0003, + 0x808c, 0x0008, 0x0000, 0x0008, 0x0060, 0x0008, 0x8062, 0x0008, + 0x0004, 0x0000, 0x8066, 0x0000, 0x0411, 0x0000, 0x4432, 0x0003, + 0x03fe, 0x0000, 0x43e0, 0x0001, 0x0dc7, 0x000b, 0xc2c0, 0x0009, + 0x00ff, 0x0008, 0x02e0, 0x0001, 0x0dc7, 0x000b, 0x9180, 0x0001, + 0x0005, 0x0008, 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, + 0x8066, 0x0000, 0x0019, 0x0000, 0x4441, 0x000b, 0x0240, 0x0002, + 0x09c4, 0x0003, 0x00fe, 0x0000, 0x31c7, 0x000b, 0x112a, 0x0000, + 0x002e, 0x0008, 0x022c, 0x0008, 0x3a44, 0x0002, 0x0c09, 0x000b, + 0x808c, 0x0008, 0x0002, 0x0000, 0x1760, 0x0008, 0x8062, 0x0008, + 0x000f, 0x0008, 0x8066, 0x0000, 0x0011, 0x0008, 0x4452, 0x0003, + 0x01fe, 0x0008, 0x42e0, 0x0009, 0x0dba, 0x000b, 0x00fe, 0x0000, + 0x43e0, 0x0001, 0x0dba, 0x000b, 0x1734, 0x0000, 0x1530, 0x0000, + 0x1632, 0x0008, 0x0d2a, 0x0008, 0x9880, 0x0001, 0x0010, 0x0000, + 0x8060, 0x0000, 0x0400, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, + 0x1e0a, 0x0008, 0x4464, 0x0003, 0x808a, 0x0008, 0x0003, 0x0008, + 0x1a60, 0x0000, 0x8062, 0x0008, 0x0002, 0x0000, 0x586a, 0x0003, + 0x8066, 0x0000, 0x3679, 0x0000, 0x446d, 0x0003, 0x586e, 0x000b, + 0x8054, 0x0008, 0x0011, 0x0008, 0x8074, 0x0000, 0x1010, 0x0008, + 0x1efe, 0x0000, 0x3009, 0x000b, 0x0077, 0x0004, 0x0009, 0x000b, + 0x1c60, 0x0000, 0x1b62, 0x0000, 0x8066, 0x0000, 0x0231, 0x0008, + 0x447b, 0x000b, 0x587c, 0x000b, 0x0140, 0x0008, 0x0242, 0x0000, + 0x1f43, 0x0002, 0x0c86, 0x0003, 0x0d44, 0x0000, 0x0d46, 0x0008, + 0x0348, 0x0008, 0x044a, 0x0008, 0x008a, 0x0003, 0x0344, 0x0008, + 0x0446, 0x0008, 0x0548, 0x0008, 0x064a, 0x0000, 0x588a, 0x000b, + 0x8054, 0x0008, 0x0001, 0x0000, 0x8074, 0x0000, 0x2020, 0x0008, + 0x4000, 0x000f, 0x3a40, 0x000a, 0x0c0c, 0x000b, 0x2b24, 0x0008, + 0x2b24, 0x0008, 0x5894, 0x000b, 0x8054, 0x0008, 0x0002, 0x0000, + 0x1242, 0x0002, 0x08d8, 0x0003, 0x3a45, 0x000a, 0x08c9, 0x0003, + 0x1e10, 0x000a, 0x7f3c, 0x0000, 0x08c6, 0x0003, 0x1d00, 0x0002, + 0x7f3a, 0x0000, 0x0d60, 0x0000, 0x7f62, 0x0008, 0x8066, 0x0000, + 0x0009, 0x0008, 0x44a4, 0x0003, 0x00fe, 0x0000, 0x34c3, 0x0003, + 0x1c60, 0x0000, 0x8062, 0x0008, 0x0001, 0x0000, 0x8066, 0x0000, + 0x0009, 0x0008, 0x44ac, 0x000b, 0x00fe, 0x0000, 0x31a3, 0x0003, + 0x0038, 0x0000, 0x0060, 0x0008, 0x8062, 0x0008, 0x0019, 0x0000, + 0x8066, 0x0000, 0x0009, 0x0008, 0x44b5, 0x0003, 0x80c0, 0x0009, + 0x00ff, 0x0008, 0x7f3e, 0x0008, 0x0d60, 0x0000, 0x0efe, 0x0008, + 0x1f80, 0x0001, 0x7f62, 0x0008, 0x8066, 0x0000, 0x0009, 0x0008, + 0x44bf, 0x0003, 0x003a, 0x0008, 0x1dfe, 0x0000, 0x00a0, 0x000b, + 0x0036, 0x0008, 0x0077, 0x0004, 0x00d8, 0x000b, 0x8074, 0x0000, + 0x2000, 0x0000, 0x00d8, 0x000b, 0x3a44, 0x0002, 0x09cd, 0x0003, + 0x8074, 0x0000, 0x1000, 0x0000, 0x2d0e, 0x0000, 0x2d0e, 0x0000, + 0x35a3, 0x000b, 0x26fe, 0x0008, 0x26fe, 0x0008, 0x2700, 0x0008, + 0x2700, 0x0008, 0x00d0, 0x0009, 0x0ce6, 0x0003, 0x8074, 0x0000, + 0x4040, 0x0008, 0x58d8, 0x0003, 0x5090, 0x000b, 0x3a46, 0x000a, + 0x0ce6, 0x0003, 0x3a47, 0x0002, 0x08e3, 0x000b, 0x8054, 0x0008, + 0x0004, 0x0000, 0x8074, 0x0000, 0x8000, 0x0000, 0x0127, 0x0003, + 0x92c0, 0x0009, 0x0f88, 0x0008, 0x0809, 0x0003, 0x1a60, 0x0000, + 0x8062, 0x0008, 0x0002, 0x0000, 0x8066, 0x0000, 0x362a, 0x0000, + 0x44eb, 0x000b, 0x2000, 0x0000, 0x2000, 0x0000, 0x2102, 0x0000, + 0x2102, 0x0000, 0x2204, 0x0000, 0x2204, 0x0000, 0x2306, 0x0000, + 0x2306, 0x0000, 0x2408, 0x0000, 0x2408, 0x0000, 0x250a, 0x0000, + 0x250a, 0x0000, 0x260c, 0x0000, 0x260c, 0x0000, 0x270e, 0x0000, + 0x270e, 0x0000, 0x2810, 0x0000, 0x2810, 0x0000, 0x2912, 0x0000, + 0x2912, 0x0000, 0x1a60, 0x0000, 0x8062, 0x0008, 0x0007, 0x0000, + 0x8066, 0x0000, 0x0052, 0x0000, 0x4505, 0x0003, 0x92c0, 0x0009, + 0x0780, 0x0008, 0x0db4, 0x0003, 0x124b, 0x0002, 0x090e, 0x0003, + 0x2e4d, 0x0002, 0x2e4d, 0x0002, 0x09a3, 0x000b, 0x3a46, 0x000a, + 0x0d1b, 0x0003, 0x5910, 0x0003, 0x8054, 0x0008, 0x0004, 0x0000, + 0x1243, 0x000a, 0x0925, 0x0003, 0x8010, 0x0008, 0x000d, 0x0000, + 0x0194, 0x0004, 0x1810, 0x0000, 0x0194, 0x0004, 0x0125, 0x000b, + 0x194d, 0x000a, 0x091f, 0x0003, 0x1243, 0x000a, 0x09aa, 0x000b, + 0x591f, 0x0003, 0x8054, 0x0008, 0x0004, 0x0000, 0x0189, 0x0004, + 0x1810, 0x0000, 0x0194, 0x0004, 0x8074, 0x0000, 0xf000, 0x0008, + 0x0d30, 0x0000, 0x3a42, 0x0002, 0x0d2d, 0x0003, 0x15fe, 0x0008, + 0x344b, 0x0003, 0x0009, 0x000b, 0x8074, 0x0000, 0x0501, 0x0000, + 0x8010, 0x0008, 0x000c, 0x0008, 0x0194, 0x0004, 0x0009, 0x000b, + 0xbbe0, 0x0009, 0x0030, 0x0008, 0x0d43, 0x000b, 0x18fe, 0x0000, + 0x3ce0, 0x0009, 0x0940, 0x0003, 0x15fe, 0x0008, 0x3ce0, 0x0009, + 0x0940, 0x0003, 0x0184, 0x000c, 0x8076, 0x0008, 0x0040, 0x0000, + 0x0181, 0x0003, 0x8076, 0x0008, 0x0041, 0x0008, 0x0181, 0x0003, + 0xbbe0, 0x0009, 0x0032, 0x0000, 0x0d48, 0x0003, 0x3c1e, 0x0008, + 0x0181, 0x0003, 0xbbe0, 0x0009, 0x0037, 0x0000, 0x0d66, 0x0003, + 0x18fe, 0x0000, 0x3ce0, 0x0009, 0x0d40, 0x000b, 0x8076, 0x0008, + 0x0040, 0x0000, 0x1a60, 0x0000, 0x8062, 0x0008, 0x000d, 0x0000, + 0x2604, 0x0008, 0x2604, 0x0008, 0x2706, 0x0008, 0x2706, 0x0008, + 0x2808, 0x0000, 0x2808, 0x0000, 0x290a, 0x0000, 0x290a, 0x0000, + 0x8066, 0x0000, 0x0422, 0x0000, 0x455d, 0x000b, 0x0189, 0x0004, + 0x8054, 0x0008, 0x0004, 0x0000, 0x8074, 0x0000, 0xf000, 0x0008, + 0x8072, 0x0000, 0x8000, 0x0000, 0x0127, 0x0003, 0xbbe0, 0x0009, + 0x0038, 0x0000, 0x0d78, 0x0003, 0x18fe, 0x0000, 0x3ce0, 0x0009, + 0x0975, 0x0003, 0x15fe, 0x0008, 0x3ce0, 0x0009, 0x0d3c, 0x0003, + 0x0184, 0x000c, 0x8076, 0x0008, 0x0040, 0x0000, 0x8072, 0x0000, + 0x8000, 0x0000, 0x01c4, 0x000b, 0x8076, 0x0008, 0x0042, 0x0008, + 0x0181, 0x0003, 0xbbe0, 0x0009, 0x0016, 0x0000, 0x0d81, 0x0003, + 0x3a44, 0x0002, 0x0c0b, 0x0003, 0x8072, 0x0000, 0x8000, 0x0000, + 0x8000, 0x000f, 0x0009, 0x000b, 0x8072, 0x0000, 0x8000, 0x0000, + 0x0009, 0x000b, 0x3d30, 0x000a, 0x7f00, 0x0000, 0xbc80, 0x0001, + 0x0007, 0x0000, 0x018d, 0x0003, 0x1930, 0x000a, 0x7f00, 0x0000, + 0x9880, 0x0001, 0x0007, 0x0000, 0x8060, 0x0000, 0x0400, 0x0000, + 0x7f62, 0x0008, 0x8066, 0x0000, 0x000a, 0x0008, 0x4592, 0x000b, + 0x4000, 0x000f, 0x2194, 0x0003, 0x0870, 0x0008, 0x4000, 0x000f, + 0xbac0, 0x0009, 0x0090, 0x0008, 0x099d, 0x0003, 0x8074, 0x0000, + 0x0706, 0x0000, 0x019f, 0x0003, 0x8074, 0x0000, 0x0703, 0x0000, + 0x4000, 0x000f, 0x8010, 0x0008, 0x0008, 0x0000, 0x01d2, 0x0003, + 0x0189, 0x0004, 0x8010, 0x0008, 0x0007, 0x0000, 0x0194, 0x0004, + 0x1810, 0x0000, 0x0194, 0x0004, 0x01dc, 0x000b, 0x0189, 0x0004, + 0x8010, 0x0008, 0x001b, 0x0008, 0x0194, 0x0004, 0x1810, 0x0000, + 0x0194, 0x0004, 0x8074, 0x0000, 0xf080, 0x0000, 0x0d30, 0x0000, + 0x0009, 0x000b, 0x8010, 0x0008, 0x0009, 0x0008, 0x01d2, 0x0003, + 0x8010, 0x0008, 0x0005, 0x0008, 0x01d2, 0x0003, 0x808c, 0x0008, + 0x0001, 0x0000, 0x8010, 0x0008, 0x0004, 0x0000, 0x4143, 0x000a, + 0x0859, 0x0003, 0x3a44, 0x0002, 0x0c09, 0x000b, 0x0d2a, 0x0008, + 0x01d2, 0x0003, 0x8010, 0x0008, 0x0003, 0x0008, 0x01d4, 0x0003, + 0x8010, 0x0008, 0x000b, 0x0000, 0x01d4, 0x0003, 0x8010, 0x0008, + 0x0002, 0x0000, 0x01d4, 0x0003, 0x3a47, 0x0002, 0x0cd8, 0x000b, + 0x8010, 0x0008, 0x0006, 0x0008, 0x01d4, 0x0003, 0x8074, 0x0000, + 0xf000, 0x0008, 0x0194, 0x0004, 0x0197, 0x0004, 0x3a40, 0x000a, + 0x0809, 0x0003, 0x8010, 0x0008, 0x000c, 0x0008, 0x0194, 0x0004, + 0x0009, 0x000b, 0x8074, 0x0000, 0xf080, 0x0000, 0x0d30, 0x0000, + 0x2e4d, 0x0002, 0x2e4d, 0x0002, 0x09e5, 0x0003, 0x8054, 0x0008, + 0x0019, 0x0000, 0x0009, 0x000b, 0x8054, 0x0008, 0x0009, 0x0008, + 0x0009, 0x000b, 0x3a44, 0x0002, 0x0c09, 0x000b, 0x01c7, 0x000b, + 0x55d0, 0xf6d9, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, + 0x0040, 0x0080, 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, + 0x4000, 0x8000, 0xac74 +}; +#ifdef UNIQUE_FW_NAME +unsigned short fw2300tpx_length01 = 0xcf5b; +#else +unsigned short risc_code_length01 = 0xcf5b; +#endif + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_cfg.c 999-mjb/drivers/scsi/qla2xxx/qla_cfg.c --- 000-virgin/drivers/scsi/qla2xxx/qla_cfg.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_cfg.c 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,3371 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + +/* + * QLogic ISP2x00 Multi-path LUN Support Driver + * + */ + +#include "qla_os.h" +#include "qla_def.h" + +#include "qlfo.h" +#include "qlfolimits.h" + +/* + * Local Function Prototypes. + */ + +static uint32_t qla2x00_add_portname_to_mp_dev(mp_device_t *, uint8_t *); + +static mp_device_t * qla2x00_allocate_mp_dev(uint8_t *, uint8_t *); +static mp_path_t * qla2x00_allocate_path(mp_host_t *, uint16_t, fc_port_t *, + uint16_t); +static mp_path_list_t * qla2x00_allocate_path_list(void); + +static mp_host_t * qla2x00_find_host_by_name(uint8_t *); + +static mp_device_t * qla2x00_find_or_allocate_mp_dev (mp_host_t *, uint16_t, + fc_port_t *); +static mp_path_t * qla2x00_find_or_allocate_path(mp_host_t *, mp_device_t *, + uint16_t, uint16_t, fc_port_t *); + +static uint32_t qla2x00_cfg_register_failover_lun(mp_device_t *,srb_t *, + fc_lun_t *); +static uint32_t qla2x00_send_failover_notify(mp_device_t *, uint8_t, + mp_path_t *, mp_path_t *); +static mp_path_t * qla2x00_select_next_path(mp_host_t *, mp_device_t *, + uint8_t); + +static uint8_t qla2x00_update_mp_host(mp_host_t *); +static uint32_t qla2x00_update_mp_tree (void); + +static fc_lun_t *qla2x00_find_matching_lun(uint8_t , mp_path_t *); +static mp_path_t *qla2x00_find_path_by_id(mp_device_t *, uint8_t); +static mp_device_t *qla2x00_find_mp_dev_by_id(mp_host_t *, uint8_t); +static mp_device_t *qla2x00_find_mp_dev_by_nodename(mp_host_t *, uint8_t *); +static mp_device_t *qla2x00_find_mp_dev_by_portname(mp_host_t *, uint8_t *, + uint16_t *); +static mp_device_t *qla2x00_find_dp_by_pn_from_all_hosts(uint8_t *, uint16_t *); + +static mp_path_t *qla2x00_get_visible_path(mp_device_t *dp); +static void qla2x00_map_os_targets(mp_host_t *); +static void qla2x00_map_os_luns(mp_host_t *, mp_device_t *, uint16_t); +static uint8_t qla2x00_map_a_oslun(mp_host_t *, mp_device_t *, uint16_t, uint16_t); + +static uint8_t qla2x00_is_ww_name_zero(uint8_t *); +static void qla2x00_add_path(mp_path_list_t *, mp_path_t *); +static void qla2x00_failback_single_lun(mp_device_t *, uint8_t, uint8_t); +static void qla2x00_failback_luns(mp_host_t *); +static void qla2x00_setup_new_path(mp_device_t *, mp_path_t *); + +/* + * Global data items + */ +mp_host_t *mp_hosts_base = NULL; +uint8_t mp_config_required = FALSE; +static int mp_num_hosts = 0; +static uint8_t mp_initialized = FALSE; + + +/* + * ENTRY ROUTINES + */ + +/* + * qla2x00_cfg_init + * Initialize configuration structures to handle an instance of + * an HBA, QLA2x000 card. + * + * Input: + * ha = adapter state pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_cfg_init(scsi_qla_host_t *ha) +{ + int rval; + + ENTER("qla2x00_cfg_init"); + set_bit(CFG_ACTIVE, &ha->cfg_flags); + if (!mp_initialized) { + /* First HBA, initialize the failover global properties */ + qla2x00_fo_init_params(ha); + + /* If the user specified a device configuration then + * it is use as the configuration. Otherwise, we wait + * for path discovery. + */ + if ( mp_config_required ) + qla2x00_cfg_build_path_tree(ha); + } + rval = qla2x00_cfg_path_discovery(ha); + clear_bit(CFG_ACTIVE, &ha->cfg_flags); + LEAVE("qla2x00_cfg_init"); + return rval; +} + +/* + * qla2x00_cfg_path_discovery + * Discover the path configuration from the device configuration + * for the specified host adapter and build the path search tree. + * This function is called after the lower level driver has + * completed its port and lun discovery. + * + * Input: + * ha = adapter state pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_cfg_path_discovery(scsi_qla_host_t *ha) +{ + int rval = QLA_SUCCESS; + mp_host_t *host; + uint8_t *name; + + ENTER("qla2x00_cfg_path_discovery"); + + name = &ha->init_cb->node_name[0]; + + set_bit(CFG_ACTIVE, &ha->cfg_flags); + /* Initialize the path tree for this adapter */ + host = qla2x00_find_host_by_name(name); + if ( mp_config_required ) { + if (host == NULL ) { + DEBUG4(printk("cfg_path_discovery: host not found, " + "node name = " + "%02x%02x%02x%02x%02x%02x%02x%02x\n", + name[0], name[1], name[2], name[3], + name[4], name[5], name[6], name[7]);) + rval = QLA_FUNCTION_FAILED; + } else if (ha->instance != host->instance) { + DEBUG4(printk("cfg_path_discovery: host instance " + "don't match - instance=%ld.\n", + ha->instance);) + rval = QLA_FUNCTION_FAILED; + } + } else if ( host == NULL ) { + /* New host adapter so allocate it */ + DEBUG3(printk("%s: found new ha inst %ld. alloc host.\n", + __func__, ha->instance);) + if ( (host = qla2x00_alloc_host(ha)) == NULL ) { + printk(KERN_INFO + "qla2x00(%d): Couldn't allocate " + "host - ha = %p.\n", + (int)ha->instance, ha); + rval = QLA_FUNCTION_FAILED; + } + } + + /* Fill in information about host */ + if (host != NULL ) { + host->flags |= MP_HOST_FLAG_NEEDS_UPDATE; + host->flags |= MP_HOST_FLAG_LUN_FO_ENABLED; + host->fcports = &ha->fcports; + + /* Check if multipath is enabled */ + DEBUG3(printk("%s: updating mp host for ha inst %ld.\n", + __func__, ha->instance);) + if (!qla2x00_update_mp_host(host)) { + rval = QLA_FUNCTION_FAILED; + } + host->flags &= ~MP_HOST_FLAG_LUN_FO_ENABLED; + } + + if (rval != QLA_SUCCESS) { + /* EMPTY */ + DEBUG4(printk("qla2x00_path_discovery: Exiting FAILED\n");) + } else { + LEAVE("qla2x00_cfg_path_discovery"); + } + clear_bit(CFG_ACTIVE, &ha->cfg_flags); + + return rval; +} + +/* + * qla2x00_cfg_event_notifiy + * Callback for host driver to notify us of configuration changes. + * + * Input: + * ha = adapter state pointer. + * i_type = event type + * + * Returns: + * + * Context: + * Kernel context. + */ +int +qla2x00_cfg_event_notify(scsi_qla_host_t *ha, uint32_t i_type) +{ + mp_host_t *host; /* host adapter pointer */ + + ENTER("qla2x00_cfg_event_notify"); + + set_bit(CFG_ACTIVE, &ha->cfg_flags); + switch (i_type) { + case MP_NOTIFY_RESET_DETECTED: + DEBUG(printk("scsi%ld: MP_NOTIFY_RESET_DETECTED " + "- no action\n", + ha->host_no);) + break; + case MP_NOTIFY_PWR_LOSS: + DEBUG(printk("scsi%ld: MP_NOTIFY_PWR_LOSS - " + "update tree\n", + ha->host_no);) + /* + * Update our path tree in case we are + * losing the adapter + */ + qla2x00_update_mp_tree(); + /* Free our resources for adapter */ + break; + case MP_NOTIFY_LOOP_UP: + DEBUG(printk("scsi%ld: MP_NOTIFY_LOOP_UP - " + "update host tree\n", + ha->host_no);) + /* Adapter is back up with new configuration */ + if ((host = qla2x00_cfg_find_host(ha)) != NULL) { + host->flags |= MP_HOST_FLAG_NEEDS_UPDATE; + host->fcports = &ha->fcports; + qla2x00_update_mp_tree(); + } + break; + case MP_NOTIFY_LOOP_DOWN: + case MP_NOTIFY_BUS_RESET: + DEBUG(printk("scsi%ld: MP_NOTIFY_OTHERS - " + "no action\n", + ha->host_no);) + break; + default: + break; + + } + clear_bit(CFG_ACTIVE, &ha->cfg_flags); + + LEAVE("qla2x00_cfg_event_notify"); + + return QLA_SUCCESS; +} + +/* + * qla2x00_cfg_failover + * A problem has been detected with the current path for this + * lun. Select the next available path as the current path + * for this device. + * + * Inputs: + * ha = pointer to host adapter + * fp - pointer to failed fc_lun (failback lun) + * tgt - pointer to target + * + * Returns: + * pointer to new fc_lun_t, or NULL if failover fails. + */ +fc_lun_t * +qla2x00_cfg_failover(scsi_qla_host_t *ha, fc_lun_t *fp, + os_tgt_t *tgt, srb_t *sp) +{ + mp_host_t *host; /* host adapter pointer */ + mp_device_t *dp; /* virtual device pointer */ + mp_path_t *new_path; /* new path pointer */ + fc_lun_t *new_fp = NULL; + + ENTER("qla2x00_cfg_failover"); + set_bit(CFG_ACTIVE, &ha->cfg_flags); + if ((host = qla2x00_cfg_find_host(ha)) != NULL) { + if ((dp = qla2x00_find_mp_dev_by_nodename( + host, tgt->node_name)) != NULL ) { + + DEBUG3(printk("qla2x00_cfg_failover: dp = %p\n", dp);) + /* + * Point at the next path in the path list if there is + * one, and if it hasn't already been failed over by + * another I/O. If there is only one path continuer + * to point at it. + */ + new_path = qla2x00_select_next_path(host, dp, fp->lun); + DEBUG3(printk("cfg_failover: new path @ %p\n", + new_path);) + new_fp = qla2x00_find_matching_lun(fp->lun, new_path); + DEBUG3(printk("cfg_failover: new fp lun @ %p\n", + new_fp);) + + qla2x00_cfg_register_failover_lun(dp, sp, new_fp); + } else { + printk(KERN_INFO + "qla2x00(%d): Couldn't find device " + "to failover\n", + host->instance); + } + } + clear_bit(CFG_ACTIVE, &ha->cfg_flags); + + LEAVE("qla2x00_cfg_failover"); + + return new_fp; +} + +/* + * IOCTL support + */ +#define CFG_IOCTL +#if defined(CFG_IOCTL) +/* + * qla2x00_cfg_get_paths + * Get list of paths EXT_FO_GET_PATHS. + * + * Input: + * ha = pointer to adapter + * bp = pointer to buffer + * cmd = Pointer to kernel copy of EXT_IOCTL. + * + * Return; + * 0 on success or errno. + * driver ioctl errors are returned via cmd->Status. + * + * Context: + * Kernel context. + */ +int +qla2x00_cfg_get_paths(EXT_IOCTL *cmd, FO_GET_PATHS *bp, int mode) +{ + int cnt; + int rval = 0; + uint16_t idx; + + FO_PATHS_INFO *paths, *u_paths; + FO_PATH_ENTRY *entry; + EXT_DEST_ADDR *sap = &bp->HbaAddr; + mp_host_t *host = NULL; /* host adapter pointer */ + mp_device_t *dp; /* virtual device pointer */ + mp_path_t *path; /* path pointer */ + mp_path_list_t *path_list; /* path list pointer */ + scsi_qla_host_t *ha; + + + DEBUG9(printk("%s: entered.\n", __func__);) + + u_paths = (FO_PATHS_INFO *) cmd->ResponseAdr; + ha = qla2x00_get_hba((int)bp->HbaInstance); + + if (!ha) { + DEBUG2_9_10(printk(KERN_INFO "%s: no ha matching inst %d.\n", + __func__, bp->HbaInstance);) + + cmd->Status = EXT_STATUS_DEV_NOT_FOUND; + return (rval); + } + DEBUG9(printk("%s(%ld): found matching ha inst %d.\n", + __func__, ha->host_no, bp->HbaInstance);) + + if (ha->flags.failover_enabled) + if ((host = qla2x00_cfg_find_host(ha)) == NULL) { + cmd->Status = EXT_STATUS_DEV_NOT_FOUND; + cmd->DetailStatus = EXT_DSTATUS_HBA_INST; + DEBUG4(printk("%s: cannot find target (%ld)\n", + __func__, ha->instance);) + DEBUG9_10(printk("%s: cannot find host inst(%ld).\n", + __func__, ha->instance);) + + return rval; + } + + paths = (FO_PATHS_INFO *)qla2x00_kmem_zalloc( + sizeof(FO_PATHS_INFO), GFP_ATOMIC, 20); + if (paths == NULL) { + DEBUG4(printk("%s: failed to allocate memory of size (%d)\n", + __func__, (int)sizeof(FO_PATHS_INFO));) + DEBUG9_10(printk("%s: failed allocate memory size(%d).\n", + __func__, (int)sizeof(FO_PATHS_INFO));) + + cmd->Status = EXT_STATUS_NO_MEMORY; + + return -ENOMEM; + } + DEBUG9(printk("%s(%ld): found matching ha inst %d.\n", + __func__, ha->host_no, bp->HbaInstance);) + + if (!ha->flags.failover_enabled) { + /* non-fo case. There's only one path. */ + + mp_path_list_t *ptmp_plist; +#define STD_MAX_PATH_CNT 1 +#define STD_VISIBLE_INDEX 0 + int found; + struct list_head *fcpl; + fc_port_t *fcport; + + DEBUG9(printk("%s: non-fo case.\n", __func__);) + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&ptmp_plist, + sizeof(mp_path_list_t))) { + /* not enough memory */ + DEBUG9_10(printk( + "%s(%ld): inst=%ld scrap not big enough. " + "lun_mask requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(mp_path_list_t));) + cmd->Status = EXT_STATUS_NO_MEMORY; + + return -ENOMEM; + } + + found = 0; + fcport = NULL; + list_for_each(fcpl, &ha->fcports) { + fcport = list_entry(fcpl, fc_port_t, list); + + if (memcmp(fcport->node_name, sap->DestAddr.WWNN, + EXT_DEF_WWN_NAME_SIZE) == 0) { + found++; + break; + } + } + + if (found) { + DEBUG9(printk("%s: found fcport:" + "(%02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x)\n.", + __func__, + sap->DestAddr.WWNN[0], sap->DestAddr.WWNN[1], + sap->DestAddr.WWNN[2], sap->DestAddr.WWNN[3], + sap->DestAddr.WWNN[4], sap->DestAddr.WWNN[5], + sap->DestAddr.WWNN[6], sap->DestAddr.WWNN[7]);) + + paths->HbaInstance = bp->HbaInstance; + paths->PathCount = STD_MAX_PATH_CNT; + paths->VisiblePathIndex = STD_VISIBLE_INDEX; + + /* Copy current path, which is the first one (0). */ + memcpy(paths->CurrentPathIndex, + ptmp_plist->current_path, + sizeof(paths->CurrentPathIndex)); + + entry = &(paths->PathEntry[STD_VISIBLE_INDEX]); + + entry->Visible = TRUE; + entry->HbaInstance = bp->HbaInstance; + + memcpy(entry->PortName, fcport->port_name, + EXT_DEF_WWP_NAME_SIZE); + + rval = verify_area(VERIFY_WRITE, (void *)u_paths, + cmd->ResponseLen); + if (rval) { + /* error */ + DEBUG9_10(printk("%s: u_paths %p verify write" + " error. paths->PathCount=%d.\n", + __func__, u_paths, paths->PathCount);) + } + + /* Copy data to user */ + if (rval == 0) + rval = copy_to_user(&u_paths->PathCount, + &paths->PathCount, 4); + if (rval == 0) + rval = copy_to_user(&u_paths->CurrentPathIndex, + &paths->CurrentPathIndex, + sizeof(paths->CurrentPathIndex)); + if (rval == 0) + rval = copy_to_user(&u_paths->PathEntry, + &paths->PathEntry, + sizeof(paths->PathEntry)); + + if (rval) { /* if any of the above failed */ + DEBUG9_10(printk("%s: data copy failed.\n", + __func__);) + + cmd->Status = EXT_STATUS_COPY_ERR; + } + } else { + cmd->Status = EXT_STATUS_DEV_NOT_FOUND; + cmd->DetailStatus = EXT_DSTATUS_TARGET; + + DEBUG10(printk("%s: cannot find fcport " + "(%02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x)\n.", + __func__, + sap->DestAddr.WWNN[0], + sap->DestAddr.WWNN[1], + sap->DestAddr.WWNN[2], + sap->DestAddr.WWNN[3], + sap->DestAddr.WWNN[4], + sap->DestAddr.WWNN[5], + sap->DestAddr.WWNN[6], + sap->DestAddr.WWNN[7]);) + DEBUG4(printk("%s: cannot find fcport " + "(%02x-%02x-%02x-%02x-%02x-%02x-%02x-%02x)\n.", + __func__, + sap->DestAddr.WWNN[0], + sap->DestAddr.WWNN[1], + sap->DestAddr.WWNN[2], + sap->DestAddr.WWNN[3], + sap->DestAddr.WWNN[4], + sap->DestAddr.WWNN[5], + sap->DestAddr.WWNN[6], + sap->DestAddr.WWNN[7]);) + } + + qla2x00_free_ioctl_scrap_mem(ha); + /* end of non-fo case. */ + + } else if (sap->DestType != EXT_DEF_DESTTYPE_WWNN && + sap->DestType != EXT_DEF_DESTTYPE_WWPN) { + /* Scan for mp_dev by nodename or portname *ONLY* */ + + cmd->Status = EXT_STATUS_INVALID_PARAM; + cmd->DetailStatus = EXT_DSTATUS_TARGET; + + DEBUG4(printk("%s: target can be accessed by NodeName only.", + __func__);) + DEBUG9_10(printk("%s: target can be accessed by NodeName or " + " PortName only. Got type %d.\n", + __func__, sap->DestType);) + + } else if ((sap->DestType == EXT_DEF_DESTTYPE_WWNN && + (dp = qla2x00_find_mp_dev_by_nodename(host, + sap->DestAddr.WWNN)) != NULL) || + (sap->DestType == EXT_DEF_DESTTYPE_WWPN && + (dp = qla2x00_find_mp_dev_by_portname(host, + sap->DestAddr.WWPN, &idx)) != NULL)) { + + DEBUG9(printk("%s(%ld): Found mp_dev. nodename=" + "%02x%02x%02x%02x%02x%02x%02x%02x portname=" + "%02x%02x%02x%02x%02x%02x%02x%02x.\n.", + __func__, host->ha->host_no, + sap->DestAddr.WWNN[0], sap->DestAddr.WWNN[1], + sap->DestAddr.WWNN[2], sap->DestAddr.WWNN[3], + sap->DestAddr.WWNN[4], sap->DestAddr.WWNN[5], + sap->DestAddr.WWNN[6], sap->DestAddr.WWNN[7], + sap->DestAddr.WWPN[0], sap->DestAddr.WWPN[1], + sap->DestAddr.WWPN[2], sap->DestAddr.WWPN[3], + sap->DestAddr.WWPN[4], sap->DestAddr.WWPN[5], + sap->DestAddr.WWPN[6], sap->DestAddr.WWPN[7]);) + + path_list = dp->path_list; + + paths->HbaInstance = bp->HbaInstance; + paths->PathCount = path_list->path_cnt; + paths->VisiblePathIndex = path_list->visible; + + /* copy current paths */ + memcpy(paths->CurrentPathIndex, + path_list->current_path, + sizeof(paths->CurrentPathIndex)); + + path = path_list->last; + for (cnt = 0; cnt < path_list->path_cnt; cnt++) { + entry = &(paths->PathEntry[path->id]); + + entry->Visible = (path->id == path_list->visible); + entry->HbaInstance = path->host->instance; + DEBUG9(printk("%s: entry %d ha %d path id %d, pn=" + "%02x%02x%02x%02x%02x%02x%02x%02x. visible=%d.\n", + __func__, cnt, path->host->instance, path->id, + path->portname[0], path->portname[1], + path->portname[2], path->portname[3], + path->portname[4], path->portname[5], + path->portname[6], path->portname[7], + entry->Visible);) + + memcpy(entry->PortName, + path->portname, + EXT_DEF_WWP_NAME_SIZE); + + path = path->next; + } + DEBUG9(printk("%s: path cnt=%d, visible path=%d.\n", + __func__, path_list->path_cnt, path_list->visible);) + + rval = verify_area(VERIFY_WRITE, (void *)u_paths, + cmd->ResponseLen); + if (rval) { + /* error */ + DEBUG9_10(printk("%s: u_paths %p verify write" + " error. paths->PathCount=%d.\n", + __func__, u_paths, paths->PathCount);) + } + DEBUG9(printk("%s: path cnt=%d, visible path=%d.\n", + __func__, path_list->path_cnt, path_list->visible);) + + /* copy data to user */ + if (rval == 0) + rval = copy_to_user(&u_paths->PathCount, + &paths->PathCount, 4); + if (rval == 0) + rval = copy_to_user(&u_paths->CurrentPathIndex, + &paths->CurrentPathIndex, + sizeof(paths->CurrentPathIndex)); + if (rval == 0) + rval = copy_to_user(&u_paths->PathEntry, + &paths->PathEntry, + sizeof(paths->PathEntry)); + + if (rval != 0) { /* if any of the above failed */ + DEBUG9_10(printk("%s: u_paths %p copy" + " error. paths->PathCount=%d.\n", + __func__, u_paths, paths->PathCount);) + cmd->Status = EXT_STATUS_COPY_ERR; + } + + } else { + + cmd->Status = EXT_STATUS_DEV_NOT_FOUND; + cmd->DetailStatus = EXT_DSTATUS_TARGET; + + DEBUG9_10(printk("%s: DestType=%x.\n", + __func__, sap->DestType);) + DEBUG9_10(printk("%s: return DEV_NOT_FOUND for node=%02x%02x" + "%02x%02x%02x%02x%02x%02x port=%02x%02x%02x%02x%02x%02x" + "%02x%02x.\n", + __func__, + sap->DestAddr.WWNN[0], sap->DestAddr.WWNN[1], + sap->DestAddr.WWNN[2], sap->DestAddr.WWNN[3], + sap->DestAddr.WWNN[4], sap->DestAddr.WWNN[5], + sap->DestAddr.WWNN[6], sap->DestAddr.WWNN[7], + sap->DestAddr.WWPN[0], sap->DestAddr.WWPN[1], + sap->DestAddr.WWPN[2], sap->DestAddr.WWPN[3], + sap->DestAddr.WWPN[4], sap->DestAddr.WWPN[5], + sap->DestAddr.WWPN[6], sap->DestAddr.WWPN[7]);) + + DEBUG4(printk("%s: return DEV_NOT_FOUND for node=%02x%02x" + "%02x%02x%02x%02x%02x%02x port=%02x%02x%02x%02x%02x%02x" + "%02x%02x.\n", + __func__, + sap->DestAddr.WWNN[0], sap->DestAddr.WWNN[1], + sap->DestAddr.WWNN[2], sap->DestAddr.WWNN[3], + sap->DestAddr.WWNN[4], sap->DestAddr.WWNN[5], + sap->DestAddr.WWNN[6], sap->DestAddr.WWNN[7], + sap->DestAddr.WWPN[0], sap->DestAddr.WWPN[1], + sap->DestAddr.WWPN[2], sap->DestAddr.WWPN[3], + sap->DestAddr.WWPN[4], sap->DestAddr.WWPN[5], + sap->DestAddr.WWPN[6], sap->DestAddr.WWPN[7]);) + } + + KMEM_FREE(paths, sizeof(FO_PATHS_INFO)); + + DEBUG9(printk("%s: exiting. rval=%d.\n", __func__, rval);) + + return rval; + +} /* qla2x00_cfg_get_paths */ + +/* + * qla2x00_cfg_set_current_path + * Set the current failover path EXT_FO_GET_PATHS IOCTL call. + * + * Input: + * ha = pointer to adapter + * bp = pointer to buffer + * cmd = Pointer to kernel copy of EXT_IOCTL. + * + * Return; + * 0 on success or errno. + * + * Context: + * Kernel context. + */ +int +qla2x00_cfg_set_current_path(EXT_IOCTL *cmd, FO_SET_CURRENT_PATH *bp, int mode ) +{ + uint8_t orig_id, new_id; + uint16_t idx; + mp_host_t *host, *new_host; + mp_device_t *dp; + mp_path_list_t *path_list; + EXT_DEST_ADDR *sap = &bp->HbaAddr; + uint32_t rval = 0; + scsi_qla_host_t *ha; + mp_path_t *new_path, *old_path; + + DEBUG9(printk("%s: entered.\n", __func__);) + + /* First find the adapter with the instance number. */ + ha = qla2x00_get_hba((int)bp->HbaInstance); + if (!ha) { + DEBUG2_9_10(printk(KERN_INFO "%s: no ha matching inst %d.\n", + __func__, bp->HbaInstance);) + + cmd->Status = EXT_STATUS_DEV_NOT_FOUND; + return (rval); + } + + if (!ha->flags.failover_enabled) { + /* non-failover mode. nothing to be done. */ + DEBUG9_10(printk("%s(%ld): non-failover driver mode.\n", + __func__, ha->host_no);) + + return 0; + } + + if ((host = qla2x00_cfg_find_host(ha)) == NULL) { + cmd->Status = EXT_STATUS_DEV_NOT_FOUND; + cmd->DetailStatus = EXT_DSTATUS_HBA_INST; + DEBUG4(printk("%s: cannot find adapter.\n", + __func__);) + DEBUG9_10(printk("%s(%ld): cannot find mphost.\n", + __func__, ha->host_no);) + return (rval); + } + + set_bit(CFG_ACTIVE, &ha->cfg_flags); + sap = &bp->HbaAddr; + /* Scan for mp_dev by nodename *ONLY* */ + if (sap->DestType != EXT_DEF_DESTTYPE_WWNN && + sap->DestType != EXT_DEF_DESTTYPE_WWPN) { + cmd->Status = EXT_STATUS_DEV_NOT_FOUND; + cmd->DetailStatus = EXT_DSTATUS_TARGET; + DEBUG4(printk("%s: target can be accessed by NodeName only.", + __func__);) + DEBUG9_10(printk("%s(%ld): target can be accessed by NodeName " + " or PortName only.\n", + __func__, ha->host_no);) + } else if ((sap->DestType == EXT_DEF_DESTTYPE_WWNN && + (dp = qla2x00_find_mp_dev_by_nodename(host, + sap->DestAddr.WWNN)) != NULL) || + (sap->DestType == EXT_DEF_DESTTYPE_WWPN && + (dp = qla2x00_find_mp_dev_by_portname(host, + sap->DestAddr.WWPN, &idx)) != NULL)) { + + if (sap->DestType == EXT_DEF_DESTTYPE_WWNN) { + DEBUG9_10(printk("%s(%ld): found mpdev with matching " + " NodeName.\n", + __func__, ha->host_no);) + } else { + DEBUG9_10(printk("%s(%ld): found mpdev with matching " + " PortName.\n", + __func__, ha->host_no);) + } + + path_list = dp->path_list; + + if (bp->NewCurrentPathIndex < MAX_PATHS_PER_DEVICE && + sap->Lun < MAX_LUNS && + bp->NewCurrentPathIndex < path_list->path_cnt) { + + orig_id = path_list->current_path[sap->Lun]; + + DEBUG(printk("%s: dev no %d, lun %d, " + "newindex %d, oldindex %d " + "nn=%02x%02x%02x%02x%02x%02x%02x%02x\n", + __func__, dp->dev_id, sap->Lun, + bp->NewCurrentPathIndex, orig_id, + host->nodename[0], host->nodename[1], + host->nodename[2], host->nodename[3], + host->nodename[4], host->nodename[5], + host->nodename[6], host->nodename[7]);) + + if (bp->NewCurrentPathIndex != orig_id) { + /* Acquire the update spinlock. */ + + /* Set the new current path. */ + new_id = path_list-> current_path[sap->Lun] = + bp->NewCurrentPathIndex; + + /* Release the update spinlock. */ + old_path = qla2x00_find_path_by_id( + dp, orig_id); + new_path = qla2x00_find_path_by_id(dp, new_id); + new_host = new_path->host; + + /* remap the lun */ + qla2x00_map_a_oslun(new_host, dp, + dp->dev_id, sap->Lun); + + qla2x00_send_failover_notify(dp, + sap->Lun, old_path, new_path); + } else { + /* EMPTY */ + DEBUG4(printk("%s: path index not changed.\n", + __func__);) + DEBUG9(printk("%s(%ld): path id not changed.\n", + __func__, ha->host_no);) + } + } else { + cmd->Status = EXT_STATUS_INVALID_PARAM; + cmd->DetailStatus = EXT_DSTATUS_PATH_INDEX; + DEBUG4(printk("%s: invalid index for device.\n", + __func__);) + DEBUG9_10(printk("%s: invalid index for device.\n", + __func__);) + } + } else { + cmd->Status = EXT_STATUS_DEV_NOT_FOUND; + cmd->DetailStatus = EXT_DSTATUS_TARGET; + DEBUG4(printk("%s: cannot find device.\n", + __func__);) + DEBUG9_10(printk("%s: DestType=%x.\n", + __func__, sap->DestType);) + DEBUG9_10(printk("%s: return DEV_NOT_FOUND for node=%02x%02x" + "%02x%02x%02x%02x%02x%02x port=%02x%02x%02x%02x%02x%02x" + "%02x%02x.\n", + __func__, + sap->DestAddr.WWNN[0], sap->DestAddr.WWNN[1], + sap->DestAddr.WWNN[2], sap->DestAddr.WWNN[3], + sap->DestAddr.WWNN[4], sap->DestAddr.WWNN[5], + sap->DestAddr.WWNN[6], sap->DestAddr.WWNN[7], + sap->DestAddr.WWPN[0], sap->DestAddr.WWPN[1], + sap->DestAddr.WWPN[2], sap->DestAddr.WWPN[3], + sap->DestAddr.WWPN[4], sap->DestAddr.WWPN[5], + sap->DestAddr.WWPN[6], sap->DestAddr.WWPN[7]);) + } + clear_bit(CFG_ACTIVE, &ha->cfg_flags); + + DEBUG9(printk("%s: exiting. rval = %d.\n", __func__, rval);) + + return rval; +} +#endif + +/* + * MP SUPPORT ROUTINES + */ + +/* + * qla2x00_add_mp_host + * Add the specified host the host list. + * + * Input: + * node_name = pointer to node name + * + * Returns: + * + * Context: + * Kernel context. + */ +mp_host_t * +qla2x00_add_mp_host(uint8_t *node_name) +{ + mp_host_t *host, *temp; + + host = (mp_host_t *) KMEM_ZALLOC(sizeof(mp_host_t), 1); + if (host != NULL) { + memcpy(host->nodename, node_name, WWN_SIZE); + host->next = NULL; + /* add to list */ + if (mp_hosts_base == NULL) { + mp_hosts_base = host; + } else { + temp = mp_hosts_base; + while (temp->next != NULL) + temp = temp->next; + temp->next = host; + } + mp_num_hosts++; + } + return host; +} + +/* + * qla2x00_alloc_host + * Allocate and initialize an mp host structure. + * + * Input: + * ha = pointer to base driver's adapter structure. + * + * Returns: + * Pointer to host structure or null on error. + * + * Context: + * Kernel context. + */ +mp_host_t * +qla2x00_alloc_host(scsi_qla_host_t *ha) +{ + mp_host_t *host, *temp; + uint8_t *name, *portname; + + name = &ha->init_cb->node_name[0]; + portname = &ha->init_cb->port_name[0]; + + ENTER("qla2x00_alloc_host"); + + host = (mp_host_t *) KMEM_ZALLOC(sizeof(mp_host_t), 2); + + if (host != NULL) { + host->ha = ha; + memcpy(host->nodename, name, WWN_SIZE); + memcpy(host->portname, portname, WWN_SIZE); + host->next = NULL; + host->flags = MP_HOST_FLAG_NEEDS_UPDATE; + host->instance = ha->instance; + /* host->MaxLunsPerTarget = qla_fo_params.MaxLunsPerTarget; */ + + if (qla2x00_fo_enabled(host->ha, host->instance)) { + host->flags |= MP_HOST_FLAG_FO_ENABLED; + DEBUG4(printk("%s: Failover enabled.\n", + __func__);) + } else { + /* EMPTY */ + DEBUG4(printk("%s: Failover disabled.\n", + __func__);) + } + /* add to list */ + if (mp_hosts_base == NULL) { + mp_hosts_base = host; + } else { + temp = mp_hosts_base; + while (temp->next != NULL) + temp = temp->next; + temp->next = host; + } + mp_num_hosts++; + + DEBUG4(printk("%s: Alloc host @ %p\n", __func__, host);) + } else { + /* EMPTY */ + DEBUG4(printk("%s: Failed\n", __func__);) + } + + return host; +} + +/* + * qla2x00_add_portname_to_mp_dev + * Add the specific port name to the list of port names for a + * multi-path device. + * + * Input: + * dp = pointer ti virtual device + * portname = Port name to add to device + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +static uint32_t +qla2x00_add_portname_to_mp_dev(mp_device_t *dp, uint8_t *portname) +{ + uint8_t index; + uint32_t rval = QLA_SUCCESS; + + ENTER("qla2x00_add_portname_to_mp_dev"); + + /* Look for an empty slot and add the specified portname. */ + for (index = 0; index < MAX_NUMBER_PATHS; index++) { + if (qla2x00_is_ww_name_zero(&dp->portnames[index][0])) { + DEBUG4(printk("%s: adding portname to dp = " + "%p at index = %d\n", + __func__, dp, index);) + memcpy(&dp->portnames[index][0], portname, WWN_SIZE); + break; + } + } + if (index == MAX_NUMBER_PATHS) { + rval = QLA_FUNCTION_FAILED; + DEBUG4(printk("%s: Fail no room\n", __func__);) + } else { + /* EMPTY */ + DEBUG4(printk("%s: Exit OK\n", __func__);) + } + + LEAVE("qla2x00_add_portname_to_mp_dev"); + + return rval; +} + + +/* + * qla2x00_allocate_mp_dev + * Allocate an fc_mp_dev, clear the memory, and log a system + * error if the allocation fails. After fc_mp_dev is allocated + * + * Inputs: + * nodename = pointer to nodename of new device + * portname = pointer to portname of new device + * + * Returns: + * Pointer to new mp_device_t, or NULL if the allocation fails. + * + * Context: + * Kernel context. + */ +static mp_device_t * +qla2x00_allocate_mp_dev(uint8_t *nodename, uint8_t *portname) +{ + mp_device_t *dp; /* Virtual device pointer */ + + ENTER("qla2x00_allocate_mp_dev"); + DEBUG3(printk("%s: entered.\n", __func__);) + + dp = (mp_device_t *)KMEM_ZALLOC(sizeof(mp_device_t), 3); + + if (dp != NULL) { + DEBUG3(printk("%s: mp_device_t allocated at %p\n", + __func__, dp);) + + /* + * Copy node name into the mp_device_t. + */ + if (nodename) + { + DEBUG3(printk("%s: copying node name %02x%02x%02x" + "%02x%02x%02x%02x%02x.\n", + __func__, nodename[0], nodename[1], + nodename[2], nodename[3], nodename[4], + nodename[5], nodename[6], nodename[7]);) + memcpy(dp->nodename, nodename, WWN_SIZE); + } + + /* + * Since this is the first port, it goes at + * index zero. + */ + if (portname) + { + DEBUG3(printk("%s: copying port name %02x%02x%02x" + "%02x%02x%02x%02x%02x.\n", + __func__, portname[0], portname[1], + portname[2], portname[3], portname[4], + portname[5], portname[6], portname[7]);) + memcpy(&dp->portnames[0][0], portname, PORT_NAME_SIZE); + } + + /* Allocate an PATH_LIST for the fc_mp_dev. */ + if ((dp->path_list = qla2x00_allocate_path_list()) == NULL) { + DEBUG4(printk("%s: allocate path_list Failed.\n", + __func__);) + KMEM_FREE(dp, sizeof(mp_device_t)); + dp = NULL; + } else { + DEBUG4(printk("%s: mp_path_list_t allocated at %p\n", + __func__, dp->path_list);) + /* EMPTY */ + DEBUG4(printk("qla2x00_allocate_mp_dev: Exit Okay\n");) + } + } else { + /* EMPTY */ + DEBUG4(printk("%s: Allocate failed.\n", __func__);) + } + + DEBUG3(printk("%s: exiting.\n", __func__);) + LEAVE("qla2x00_allocate_mp_dev"); + + return dp; +} + +/* + * qla2x00_allocate_path + * Allocate a PATH. + * + * Inputs: + * host Host adapter for the device. + * path_id path number + * port port for device. + * dev_id device number + * + * Returns: + * Pointer to new PATH, or NULL if the allocation failed. + * + * Context: + * Kernel context. + */ +static mp_path_t * +qla2x00_allocate_path(mp_host_t *host, uint16_t path_id, + fc_port_t *port, uint16_t dev_id) +{ + mp_path_t *path; + uint16_t lun; + + ENTER("qla2x00_allocate_path"); + + path = (mp_path_t *) KMEM_ZALLOC(sizeof(mp_path_t), 4); + if (path != NULL) { + + DEBUG3(printk("%s(%ld): allocated path %p at path id %d.\n", + __func__, host->ha->host_no, path, path_id);) + + /* Copy the supplied information into the MP_PATH. */ + path->host = host; + + if (!(port->flags & FCF_CONFIG) && + port->loop_id != FC_NO_LOOP_ID) { + + path->port = port; + DEBUG3(printk("%s(%ld): assigned port pointer %p " + "to path id %d.\n", + __func__, host->ha->host_no, port, path_id);) + } + + path->id = path_id; + port->cur_path = path->id; + path->mp_byte = port->mp_byte; + path->next = NULL; + memcpy(path->portname, port->port_name, WWN_SIZE); + + DEBUG3(printk("%s(%ld): path id %d copied portname " + "%02x%02x%02x%02x%02x%02x%02x%02x. enabling all LUNs.\n", + __func__, host->ha->host_no, path->id, + port->port_name[0], port->port_name[1], + port->port_name[2], port->port_name[3], + port->port_name[4], port->port_name[5], + port->port_name[6], port->port_name[7]);) + + for (lun = 0; lun < MAX_LUNS; lun++) { + path->lun_data.data[lun] |= LUN_DATA_ENABLED; + } + } else { + /* EMPTY */ + DEBUG4(printk("%s: Failed\n", __func__);) + } + + return path; +} + + +/* + * qla2x00_allocate_path_list + * Allocate a PATH_LIST + * + * Input: + * None + * + * Returns: + * Pointer to new PATH_LIST, or NULL if the allocation fails. + * + * Context: + * Kernel context. + */ +static mp_path_list_t * +qla2x00_allocate_path_list( void ) +{ + mp_path_list_t *path_list; + uint16_t i; + uint8_t l; + + path_list = (mp_path_list_t *) KMEM_ZALLOC(sizeof(mp_path_list_t), 5); + + if (path_list != NULL) { + DEBUG4(printk("%s: allocated at %p\n", + __func__, path_list);) + + path_list->visible = PATH_INDEX_INVALID; + /* Initialized current path */ + for (i = 0; i < MAX_LUNS_PER_DEVICE; i++) { + l = (uint8_t)(i & 0xFF); + path_list->current_path[l] = PATH_INDEX_INVALID; + } + path_list->last = NULL; + + } else { + /* EMPTY */ + DEBUG4(printk("%s: Alloc pool failed for MP_PATH_LIST.\n", + __func__);) + } + + return path_list; +} + +/* + * qla2x00_cfg_find_host + * Look through the existing multipath tree, and find + * a host adapter to match the specified ha. + * + * Input: + * ha = pointer to host adapter + * + * Return: + * Pointer to new host, or NULL if no match found. + * + * Context: + * Kernel context. + */ +mp_host_t * +qla2x00_cfg_find_host(scsi_qla_host_t *ha) +{ + mp_host_t *host = NULL; /* Host found and null if not */ + mp_host_t *tmp_host; + + ENTER("qla2x00_cfg_find_host"); + + for (tmp_host = mp_hosts_base; (tmp_host); tmp_host = tmp_host->next) { + if (tmp_host->ha == ha) { + host = tmp_host; + DEBUG3(printk("%s: Found host =%p, instance %d\n", + __func__, host, host->instance);) + break; + } + } + + LEAVE("qla2x00_cfg_find_host"); + + return host; +} + +/* + * qla2x00_find_host_by_name + * Look through the existing multipath tree, and find + * a host adapter to match the specified name. + * + * Input: + * name = node name to match. + * + * Return: + * Pointer to new host, or NULL if no match found. + * + * Context: + * Kernel context. + */ +mp_host_t * +qla2x00_find_host_by_name(uint8_t *name) +{ + mp_host_t *host; /* Host found and null if not */ + + for (host = mp_hosts_base; (host); host = host->next) { + if (memcmp(host->nodename, name, WWN_SIZE) == 0) + break; + } + return host; +} + +/* + * qla2x00_found_hidden_path + * This is called only when the port trying to figure out whether + * to bind to this mp_device has mpbyte of zero. It doesn't matter + * if the path we check on is first path or not because if + * more than one path has mpbyte zero and not all are zero, it is + * invalid and unsupported configuration which we don't handle. + * + * Input: + * dp = mp_device pointer + * + * Returns: + * TRUE - first path in dp is hidden. + * FALSE - no hidden path. + * + * Context: + * Kernel context. + */ +static inline uint8_t +qla2x00_found_hidden_path(mp_device_t *dp) +{ + uint8_t ret = FALSE; + mp_path_list_t *path_list = dp->path_list; +#ifdef QL_DEBUG_LEVEL_2 + mp_path_t *tmp_path; + uint8_t cnt = 0; +#endif + + /* Sanity check */ + if (path_list == NULL) { + /* ERROR? Just print debug and return */ + DEBUG2_3(printk("%s: ERROR No path list found on dp.\n", + __func__);) + return (FALSE); + } + + if (path_list->last != NULL && + path_list->last->mp_byte & MP_MASK_HIDDEN) { + ret = TRUE; + } + +#ifdef QL_DEBUG_LEVEL_2 + /* If any path is visible, return FALSE right away, otherwise check + * through to make sure all existing paths in this mpdev are hidden. + */ + for (tmp_path = path_list->last; tmp_path && cnt < path_list->path_cnt; + tmp_path = tmp_path->next, cnt++) { + if (!(tmp_path->mp_byte & MP_MASK_HIDDEN)) { + printk("%s: found visible path.\n", __func__); + } + } +#endif + + return (ret); +} + +/* + * qla2x00_default_bind_mpdev + * + * Input: + * host = mp_host of current adapter + * port = fc_port of current port + * + * Returns: + * mp_device pointer + * NULL - not found. + * + * Context: + * Kernel context. + */ +static inline mp_device_t * +qla2x00_default_bind_mpdev(mp_host_t *host, fc_port_t *port) +{ + /* Default search case */ + int devid = 0; + mp_device_t *temp_dp = NULL; /* temporary pointer */ + mp_host_t *temp_host; /* temporary pointer */ + + DEBUG3(printk("%s: entered.\n", __func__);) + + for (temp_host = mp_hosts_base; (temp_host); + temp_host = temp_host->next) { + for (devid = 0; devid < MAX_MP_DEVICES; devid++) { + temp_dp = temp_host->mp_devs[devid]; + + if (temp_dp == NULL) + continue; + + if (qla2x00_is_nodename_equal(temp_dp->nodename, + port->node_name)) { + DEBUG3(printk( + "%s: Found matching dp @ host %p id %d:\n", + __func__, temp_host, devid);) + break; + } + } + if (temp_dp != NULL) { + /* found a match. */ + break; + } + } + + if (temp_dp) { + DEBUG3(printk("%s(%ld): update mpdev " + "on Matching node at dp %p. " + "dev_id %d adding new port %p-%02x" + "%02x%02x%02x%02x%02x%02x%02x\n", + __func__, host->ha->host_no, + temp_dp, devid, port, + port->port_name[0], port->port_name[1], + port->port_name[2], port->port_name[3], + port->port_name[4], port->port_name[5], + port->port_name[6], port->port_name[7]);) + + qla2x00_add_portname_to_mp_dev(temp_dp, + port->port_name); + + /* + * Set the flag that we have + * found the device. + */ + host->mp_devs[devid] = temp_dp; + temp_dp->use_cnt++; + + /* Fixme(dg) + * Copy the LUN info into + * the mp_device_t + */ + } + + return (temp_dp); +} + +/* + * qla2x00_find_or_allocate_mp_dev + * Look through the existing multipath control tree, and find + * an mp_device_t with the supplied world-wide node name. If + * one cannot be found, allocate one. + * + * Input: + * host Adapter to add device to. + * dev_id Index of device on adapter. + * port port database information. + * + * Returns: + * Pointer to new mp_device_t, or NULL if the allocation fails. + * + * Side Effects: + * If the MP HOST does not already point to the mp_device_t, + * a pointer is added at the proper port offset. + * + * Context: + * Kernel context. + */ +static mp_device_t * +qla2x00_find_or_allocate_mp_dev(mp_host_t *host, uint16_t dev_id, + fc_port_t *port) +{ + mp_device_t *dp = NULL; /* pointer to multi-path device */ + uint8_t node_found; /* Found matching node name. */ + uint8_t port_found; /* Found matching port name. */ + uint8_t names_valid; /* Node name and port name are not zero */ + mp_host_t *temp_host; /* pointer to temporary host */ + + uint16_t j; + mp_device_t *temp_dp; + + ENTER("qla2x00_find_or_allocate_mp_dev"); + + DEBUG3(printk("%s(%ld): entered. host=%p, port =%p, dev_id = %d\n", + __func__, host->ha->host_no, host, port, dev_id);) + + temp_dp = qla2x00_find_mp_dev_by_id(host,dev_id); + + DEBUG3(printk("%s: temp dp =%p\n", __func__, temp_dp);) + /* if Device already known at this port. */ + if (temp_dp != NULL) { + node_found = qla2x00_is_nodename_equal(temp_dp->nodename, + port->node_name); + port_found = qla2x00_is_portname_in_device(temp_dp, + port->port_name); + + if (node_found && port_found) { + DEBUG3(printk("%s: mp dev %02x%02x%02x%02x%02x%02x" + "%02x%02x exists on %p. dev id %d. path cnt=%d.\n", + __func__, + port->port_name[0], port->port_name[1], + port->port_name[2], port->port_name[3], + port->port_name[4], port->port_name[5], + port->port_name[6], port->port_name[7], + temp_dp, dev_id, temp_dp->path_list->path_cnt);) + dp = temp_dp; + + /* + * Copy the LUN configuration data + * into the mp_device_t. + */ + } + } + + + /* Sanity check the port information */ + names_valid = (!qla2x00_is_ww_name_zero(port->node_name) && + !qla2x00_is_ww_name_zero(port->port_name)); + + /* + * If the optimized check failed, loop through each known + * device on each known adapter looking for the node name. + */ + if (dp == NULL && names_valid) { + DEBUG3(printk("%s: Searching each adapter for the device...\n", + __func__);) + + /* Check for special cases. */ + if (port->flags & FCF_CONFIG) { + /* Here the search is done only for ports that + * are found in config file, so we can count on + * mp_byte value when binding the paths. + */ + DEBUG3(printk("%s(%ld): mpbyte=%02x process configured " + "portname=%02x%02x%02x%02x%02x%02x%02x%02x.\n", + __func__, host->ha->host_no, port->mp_byte, + port->port_name[0], port->port_name[1], + port->port_name[2], port->port_name[3], + port->port_name[4], port->port_name[5], + port->port_name[6], port->port_name[7]);) + DEBUG3(printk("%s(%ld): nodename %02x%02x%02x%02x%02x" + "%02x%02x%02x.\n", + __func__, host->ha->host_no, + port->node_name[0], port->node_name[1], + port->node_name[2], port->node_name[3], + port->node_name[4], port->node_name[5], + port->node_name[6], port->node_name[7]);) + + if (port->mp_byte == 0) { + DEBUG3(printk("%s(%ld): port visible.\n", + __func__, host->ha->host_no);) + + /* This device in conf file is set to visible */ + for (temp_host = mp_hosts_base; (temp_host); + temp_host = temp_host->next) { + /* Search all hosts with given tgt id + * for any previously created dp with + * matching node name. + */ + temp_dp = temp_host->mp_devs[dev_id]; + if (temp_dp == NULL) { + continue; + } + + node_found = + qla2x00_is_nodename_equal( + temp_dp->nodename, port->node_name); + + if (node_found && + qla2x00_found_hidden_path( + temp_dp)) { + DEBUG3(printk( + "%s(%ld): found " + "mpdev of matching " + "node %02x%02x%02x" + "%02x%02x%02x%02x" + "%02x w/ hidden " + "paths. dp=%p " + "dev_id=%d.\n", + __func__, + host->ha->host_no, + port->port_name[0], + port->port_name[1], + port->port_name[2], + port->port_name[3], + port->port_name[4], + port->port_name[5], + port->port_name[6], + port->port_name[7], + temp_dp, dev_id);) + /* + * Found the mpdev. + * Treat this same as + * default case. + */ + qla2x00_add_portname_to_mp_dev( + temp_dp, port->port_name); + dp = temp_dp; + host->mp_devs[dev_id] = dp; + dp->use_cnt++; + + break; + } + } + + } else if (port->mp_byte & MP_MASK_OVERRIDE) { + /* Bind on port name */ + DEBUG3(printk( + "%s(%ld): port has override bit.\n", + __func__, host->ha->host_no);) + + temp_dp = qla2x00_find_dp_by_pn_from_all_hosts( + port->port_name, &j); + + if (temp_dp) { + /* Found match */ + DEBUG3(printk("%s(%ld): update mpdev " + "on Matching port %02x%02x%02x" + "%02x%02x%02x%02x%02x " + "dp %p dev_id %d\n", + __func__, host->ha->host_no, + port->port_name[0], + port->port_name[1], + port->port_name[2], + port->port_name[3], + port->port_name[4], + port->port_name[5], + port->port_name[6], + port->port_name[7], + temp_dp, j);) + /* + * Set the flag that we have + * found the device. + */ + dp = temp_dp; + host->mp_devs[j] = dp; + dp->use_cnt++; + } + } else { + DEBUG3(printk("%s(%ld): default case.\n", + __func__, host->ha->host_no);) + /* Default case. Search and bind mp_dev with + * matching node name. + */ + dp = qla2x00_default_bind_mpdev(host, port); + } + + } else { + DEBUG3(printk("%s(%ld): process discovered port " + "%02x%02x%02x%02x%02x%02x%02x%02x.\n", + __func__, host->ha->host_no, + port->port_name[0], port->port_name[1], + port->port_name[2], port->port_name[3], + port->port_name[4], port->port_name[5], + port->port_name[6], port->port_name[7]);) + DEBUG3(printk("%s(%ld): nodename %02x%02x%02x%02x%02x" + "%02x%02x%02x.\n", + __func__, host->ha->host_no, + port->node_name[0], port->node_name[1], + port->node_name[2], port->node_name[3], + port->node_name[4], port->node_name[5], + port->node_name[6], port->node_name[7]);) + + /* Here we try to match ports found to any previously + * built mp_dev list. mp_byte value is not valid yet. + * First search for matching port name in current + * host. This is necessary in case the port name was + * specified in the config file with the override + * bit and saved in our mpdev tree already. + */ + temp_dp = qla2x00_find_mp_dev_by_portname(host, + port->port_name, &j); + + if (temp_dp) { + /* Found match. This mpdev port was created + * from config file. + */ + DEBUG3(printk("%s(%ld): update mpdev " + "on Matching port %02x%02x%02x" + "%02x%02x%02x%02x%02x " + "dp %p dev_id %d\n", + __func__, host->ha->host_no, + port->port_name[0], + port->port_name[1], + port->port_name[2], + port->port_name[3], + port->port_name[4], + port->port_name[5], + port->port_name[6], + port->port_name[7], + temp_dp, j);) + + dp = temp_dp; + } else if (!mp_config_required) { + + DEBUG3(printk("%s(%ld): default case.\n", + __func__, host->ha->host_no);) + /* Default case. Search and bind mp_dev with + * matching node name. + */ + dp = qla2x00_default_bind_mpdev(host, port); + } + } + + } + + /* If we couldn't find one, allocate one. */ + if (dp == NULL && + ((port->flags & FCF_CONFIG) || !mp_config_required)) { + + DEBUG3(printk("%s(%ld): No match. adding new mpdev on " + "dev_id %d. node %02x%02x%02x%02x%02x%02x%02x%02x " + "port %02x%02x%02x%02x%02x%02x%02x%02x\n", + __func__, host->ha->host_no, dev_id, + port->node_name[0], port->node_name[1], + port->node_name[2], port->node_name[3], + port->node_name[4], port->node_name[5], + port->node_name[6], port->node_name[7], + port->port_name[0], port->port_name[1], + port->port_name[2], port->port_name[3], + port->port_name[4], port->port_name[5], + port->port_name[6], port->port_name[7]);) + dp = qla2x00_allocate_mp_dev(port->node_name, port->port_name); + +#ifdef QL_DEBUG_LEVEL_2 + if (host->mp_devs[dev_id] != NULL) { + printk(KERN_WARNING + "qla2x00: invalid/unsupported configuration found. " + "overwriting target id %d.\n", + dev_id); + } +#endif + host->mp_devs[dev_id] = dp; + dp->dev_id = dev_id; + dp->use_cnt++; + } + + DEBUG3(printk("%s(%ld): exiting. return dp=%p.\n", + __func__, host->ha->host_no, dp);) + LEAVE("qla2x00_find_or_allocate_mp_dev"); + + return dp; +} + + +/* + * qla2x00_find_or_allocate_path + * Look through the path list for the supplied device, and either + * find the supplied adapter (path) for the adapter, or create + * a new one and add it to the path list. + * + * Input: + * host Adapter (path) for the device. + * dp Device and path list for the device. + * dev_id Index of device on adapter. + * port Device data from port database. + * + * Returns: + * Pointer to new PATH, or NULL if the allocation fails. + * + * Side Effects: + * 1. If the PATH_LIST does not already point to the PATH, + * a new PATH is added to the PATH_LIST. + * 2. If the new path is found to be a second visible path, it is + * marked as hidden, and the device database is updated to be + * hidden as well, to keep the miniport synchronized. + * + * Context: + * Kernel context. + */ +/* ARGSUSED */ +static mp_path_t * +qla2x00_find_or_allocate_path(mp_host_t *host, mp_device_t *dp, + uint16_t dev_id, uint16_t pathid, fc_port_t *port) +{ + mp_path_list_t *path_list = dp->path_list; + mp_path_t *path; + uint8_t id; + + + ENTER("qla2x00_find_or_allocate_path"); + + DEBUG4(printk("%s: host =%p, port =%p, dp=%p, dev id = %d\n", + __func__, host, port, dp, dev_id);) + /* + * Loop through each known path in the path list. Look for + * a PATH that matches both the adapter and the port name. + */ + path = qla2x00_find_path_by_name(host, path_list, port->port_name); + + + if (path != NULL ) { + DEBUG3(printk("%s: Found an existing " + "path %p- host %p inst=%d, port =%p, path id = %d\n", + __func__, path, host, host->instance, path->port, + path->id);) + DEBUG3(printk("%s: Luns for path_id %d, instance %d\n", + __func__, path->id, host->instance);) + DEBUG3(qla2x00_dump_buffer( + (char *)&path->lun_data.data[0], 64);) + + /* If we found an existing path, look for any changes to it. */ + if (path->port == NULL) { + DEBUG3(printk("%s: update path %p w/ port %p, path id=" + "%d, path mp_byte=0x%x port mp_byte=0x%x.\n", + __func__, path, port, path->id, + path->mp_byte, port->mp_byte);) + path->port = port; + port->mp_byte = path->mp_byte; + } else { + DEBUG3(printk("%s: update path %p port %p path id %d, " + "path mp_byte=0x%x port mp_byte=0x%x.\n", + __func__, path, path->port, path->id, + path->mp_byte, port->mp_byte);) + + if ((path->mp_byte & MP_MASK_HIDDEN) && + !(port->mp_byte & MP_MASK_HIDDEN)) { + + DEBUG3(printk("%s: Adapter(%p) " + "Device (%p) Path (%d) " + "has become visible.\n", + __func__, host, dp, path->id);) + + path->mp_byte &= ~MP_MASK_HIDDEN; + } + + if (!(path->mp_byte & MP_MASK_HIDDEN) && + (port->mp_byte & MP_MASK_HIDDEN)) { + + DEBUG3(printk("%s(%ld): Adapter(%p) " + "Device (%p) Path (%d) " + "has become hidden.\n", + __func__, host->ha->host_no, host, + dp, path->id);) + + path->mp_byte |= MP_MASK_HIDDEN; + } + } + + } else { + /* + * If we couldn't find an existing path, and there is still + * room to add one, allocate one and put it in the list. + */ + if (path_list->path_cnt < MAX_PATHS_PER_DEVICE && + path_list->path_cnt < qla_fo_params.MaxPathsPerDevice) { + + if (port->flags & FCF_CONFIG) { + /* Use id specified in config file. */ + id = pathid; + DEBUG3(printk("%s(%ld): using path id %d from " + "config file.\n", + __func__, host->ha->host_no, id);) + } else { + /* Assign one. */ + id = path_list->path_cnt; + DEBUG3(printk( + "%s(%ld): assigning path id %d.\n", + __func__, host->ha->host_no, id);) + } + + /* Update port with bitmask info */ + path = qla2x00_allocate_path(host, id, port, dev_id); + DEBUG3(printk("%s: allocated new path %p, adding " + "path id %d, mp_byte=0x%x " + "port=%p-%02x%02x%02x%02x%02x%02x%02x%02x\n", + __func__, path, id, + path->mp_byte, + path->port, + path->port->port_name[0], path->port->port_name[1], + path->port->port_name[2], path->port->port_name[3], + path->port->port_name[4], path->port->port_name[5], + path->port->port_name[6], path->port->port_name[7] + );) + qla2x00_add_path(path_list, path); + + /* Reconcile the new path against the existing ones. */ + qla2x00_setup_new_path(dp, path); + } else { + /* EMPTY */ + DEBUG4(printk("%s: Err exit, no space to add path.\n", + __func__);) + } + + } + + LEAVE("qla2x00_find_or_allocate_path"); + + return path; +} + +static uint32_t +qla2x00_cfg_register_failover_lun(mp_device_t *dp, srb_t *sp, fc_lun_t *new_lp) +{ + uint32_t status = QLA_SUCCESS; + os_tgt_t *tq; + os_lun_t *lq; + fc_lun_t *old_lp; + + DEBUG2(printk(KERN_INFO "%s: NEW fclun = %p, sp = %p\n", + __func__, new_lp, sp);) + + /* + * Fix lun descriptors to point to new fclun which is a new fcport. + */ + if (new_lp == NULL) { + DEBUG2(printk(KERN_INFO "%s: Failed new lun %p\n", + __func__, new_lp);) + return QLA_FUNCTION_FAILED; + } + + tq = sp->tgt_queue; + lq = sp->lun_queue; + if (tq == NULL) { + DEBUG2(printk(KERN_INFO "%s: Failed to get old tq %p\n", + __func__, tq);) + return QLA_FUNCTION_FAILED; + } + if (lq == NULL) { + DEBUG2(printk(KERN_INFO "%s: Failed to get old lq %p\n", + __func__, lq);) + return QLA_FUNCTION_FAILED; + } + old_lp = lq->fclun; + lq->fclun = new_lp; + + /* Log the failover to console */ + printk(KERN_INFO + "qla2x00: FAILOVER device %d from " + "%02x%02x%02x%02x%02x%02x%02x%02x -> " + "%02x%02x%02x%02x%02x%02x%02x%02x - " + "LUN %02x, reason=0x%x\n", + dp->dev_id, + old_lp->fcport->port_name[0], old_lp->fcport->port_name[1], + old_lp->fcport->port_name[2], old_lp->fcport->port_name[3], + old_lp->fcport->port_name[4], old_lp->fcport->port_name[5], + old_lp->fcport->port_name[6], old_lp->fcport->port_name[7], + new_lp->fcport->port_name[0], new_lp->fcport->port_name[1], + new_lp->fcport->port_name[2], new_lp->fcport->port_name[3], + new_lp->fcport->port_name[4], new_lp->fcport->port_name[5], + new_lp->fcport->port_name[6], new_lp->fcport->port_name[7], + new_lp->lun, sp->err_id); + printk(KERN_INFO + "qla2x00: FROM HBA %ld to HBA %ld\n", + old_lp->fcport->ha->instance, new_lp->fcport->ha->instance); + + DEBUG3(printk("%s: NEW fclun = %p , port =%p, " + "loop_id =0x%x, instance %ld\n", + __func__, + new_lp, new_lp->fcport, + new_lp->fcport->loop_id, + new_lp->fcport->ha->instance);) + + return status; +} + + +/* + * qla2x00_send_failover_notify + * A failover operation has just been done from an old path + * index to a new index. Call lower level driver + * to perform the failover notification. + * + * Inputs: + * device Device being failed over. + * lun LUN being failed over. + * newpath path that was failed over too. + * oldpath path that was failed over from. + * + * Return: + * Local function status code. + * + * Context: + * Kernel context. + */ +/* ARGSUSED */ +static uint32_t +qla2x00_send_failover_notify(mp_device_t *dp, + uint8_t lun, mp_path_t *newpath, mp_path_t *oldpath) +{ + fc_lun_t *old_lp, *new_lp; + uint32_t status = QLA_SUCCESS; + + ENTER("qla2x00_send_failover_notify"); + + old_lp = qla2x00_find_matching_lun(lun, oldpath); + new_lp = qla2x00_find_matching_lun(lun, newpath); + + /* + * If the target is the same target, but a new HBA has been selected, + * send a third party logout if required. + */ + if ((qla_fo_params.FailoverNotifyType & + FO_NOTIFY_TYPE_LOGOUT_OR_LUN_RESET || + qla_fo_params.FailoverNotifyType & + FO_NOTIFY_TYPE_LOGOUT_OR_CDB) && + qla2x00_is_portname_equal( + oldpath->portname, newpath->portname)) { + + status = qla2x00_send_fo_notification(old_lp, new_lp); + if (status == QLA_SUCCESS) { + /* EMPTY */ + DEBUG4(printk("%s: Logout succeded\n", + __func__);) + } else { + /* EMPTY */ + DEBUG4(printk("%s: Logout Failed\n", + __func__);) + } + } else if ((qla_fo_params.FailoverNotifyType & + FO_NOTIFY_TYPE_LUN_RESET) || + (qla_fo_params.FailoverNotifyType & + FO_NOTIFY_TYPE_LOGOUT_OR_LUN_RESET)) { + + /* + * If desired, send a LUN reset as the + * failover notification type. + */ + if (newpath->lun_data.data[lun] & LUN_DATA_ENABLED) { + status = qla2x00_send_fo_notification(old_lp, new_lp); + if (status == QLA_SUCCESS) { + /* EMPTY */ + DEBUG4(printk("%s: LUN reset succeeded.\n", + __func__);) + } else { + /* EMPTY */ + DEBUG4(printk("%s: Failed reset LUN.\n", + __func__);) + } + } + + } else if (qla_fo_params.FailoverNotifyType == FO_NOTIFY_TYPE_CDB || + qla_fo_params.FailoverNotifyType == + FO_NOTIFY_TYPE_LOGOUT_OR_CDB) { + + if (newpath->lun_data.data[lun] & LUN_DATA_ENABLED) { + status = qla2x00_send_fo_notification(old_lp, new_lp); + if (status == QLA_SUCCESS) { + /* EMPTY */ + DEBUG4(printk("%s: Send CDB succeeded.\n", + __func__);) + } else { + /* EMPTY */ + DEBUG4(printk("%s: Send CDB Error " + "lun=(%d).\n", __func__, lun);) + } + } + } else if (qla_fo_params.FailoverNotifyType == FO_NOTIFY_TYPE_SPINUP) { + if (newpath->lun_data.data[lun] & LUN_DATA_ENABLED) { + status = qla2x00_send_fo_notification(old_lp, new_lp); + if (status == QLA_SUCCESS) { + /* EMPTY */ + DEBUG(printk("%s: Send CDB succeeded.\n", + __func__);) + } else { + /* EMPTY */ + DEBUG(printk("%s: Send CDB Error " + "lun=(%d).\n", __func__, lun);) + } + } + } else { + /* EMPTY */ + DEBUG4(printk("%s: failover disabled or no notify routine " + "defined.\n", __func__);) + } + + return status; +} + +/* + * qla2x00_select_next_path + * A problem has been detected with the current path for this + * device. Try to select the next available path as the current + * path for this device. If there are no more paths, the same + * path will still be selected. + * + * Inputs: + * dp pointer of device structure. + * lun LUN to failover. + * + * Return Value: + * new path or same path + * + * Context: + * Kernel context. + */ +static mp_path_t * +qla2x00_select_next_path(mp_host_t *host, mp_device_t *dp, uint8_t lun) +{ + mp_path_t *path = NULL; + mp_path_list_t *path_list; + mp_path_t *orig_path; + int id; + uint32_t status; + mp_host_t *new_host; + + ENTER("qla2x00_select_next_path:"); + + path_list = dp->path_list; + if (path_list == NULL) + return NULL; + + /* Get current path */ + id = path_list->current_path[lun]; + + /* Get path for current path id */ + if ((orig_path = qla2x00_find_path_by_id(dp, id)) != NULL) { + + /* select next path */ + path = orig_path->next; + new_host = path->host; + + /* FIXME may need to check for HBA being reset */ + DEBUG3(printk("%s: orig path = %p new path = %p " + "curr idx = %d, new idx = %d\n", + __func__, orig_path, path, orig_path->id, path->id);) + DEBUG3(printk(" FAILOVER: device nodename: " + "%02x%02x%02x%02x%02x%02x%02x%02x\n", + dp->nodename[0], dp->nodename[1], + dp->nodename[2], dp->nodename[3], + dp->nodename[4], dp->nodename[5], + dp->nodename[6], dp->nodename[7]);) + DEBUG3(printk(" Original - host nodename: " + "%02x%02x%02x%02x%02x%02x%02x%02x\n", + orig_path->host->nodename[0], + orig_path->host->nodename[1], + orig_path->host->nodename[2], + orig_path->host->nodename[3], + orig_path->host->nodename[4], + orig_path->host->nodename[5], + orig_path->host->nodename[6], + orig_path->host->nodename[7]);) + DEBUG3(printk(" portname: " + "%02x%02x%02x%02x%02x%02x%02x%02x\n", + orig_path->port->port_name[0], + orig_path->port->port_name[1], + orig_path->port->port_name[2], + orig_path->port->port_name[3], + orig_path->port->port_name[4], + orig_path->port->port_name[5], + orig_path->port->port_name[6], + orig_path->port->port_name[7]);) + DEBUG3(printk(" New - host nodename: " + "%02x%02x%02x%02x%02x%02x%02x%02x\n", + new_host->nodename[0], new_host->nodename[1], + new_host->nodename[2], new_host->nodename[3], + new_host->nodename[4], new_host->nodename[5], + new_host->nodename[6], new_host->nodename[7]);) + DEBUG3(printk(" portname: " + "%02x%02x%02x%02x%02x%02x%02x%02x\n", + path->port->port_name[0], + path->port->port_name[1], + path->port->port_name[2], + path->port->port_name[3], + path->port->port_name[4], + path->port->port_name[5], + path->port->port_name[6], + path->port->port_name[7]);) + + path_list->current_path[lun] = path->id; + + /* If we selected a new path, do failover notification. */ + if (path != orig_path) { + status = qla2x00_send_failover_notify( + dp, lun, path, orig_path); + + /* + * Currently we ignore the returned status from + * the notify. however, if failover notify fails + */ + } + } + + LEAVE("qla2x00_select_next_path:"); + + return path ; +} + + + +/* + * qla2x00_update_mp_host + * Update the multipath control information from the port + * database for that adapter. + * + * Input: + * host Adapter to update. Devices that are new are + * known to be attached to this adapter. + * + * Returns: + * TRUE if updated successfully; FALSE if error. + * + */ +static uint8_t +qla2x00_update_mp_host(mp_host_t *host) +{ + uint8_t success = TRUE; + uint16_t dev_id; + struct list_head *fcpl; + fc_port_t *fcport; + scsi_qla_host_t *ha = host->ha; + + ENTER("qla2x00_update_mp_host"); + + /* + * We make sure each port is attached to some virtual device. + */ + dev_id = 0; + fcport = NULL; + list_for_each(fcpl, &ha->fcports) { + fcport = list_entry(fcpl, fc_port_t, list); + + success |= qla2x00_update_mp_device(host, fcport, dev_id, 0); + + dev_id++; + } + if (success) { + DEBUG2(printk(KERN_INFO "%s: Exit OK\n", __func__);) + qla2x00_map_os_targets(host); + } else { + /* EMPTY */ + DEBUG2(printk(KERN_INFO "%s: Exit FAILED\n", __func__);) + } + + DEBUG3(printk("%s: inst %ld exiting.\n", __func__, ha->instance);) + LEAVE("qla2x00_update_mp_host"); + + return success; +} + +/* + * qla2x00_update_mp_device + * Update the multipath control information from the port + * database for that adapter. + * + * Inputs: + * host Host adapter structure + * port Device to add to the path tree. + * dev_id Device id + * + * Synchronization: + * The Adapter Lock should have already been acquired + * before calling this routine. + * + * Return + * TRUE if updated successfully; FALSE if error. + * + */ +uint8_t +qla2x00_update_mp_device(mp_host_t *host, + fc_port_t *port, uint16_t dev_id, uint16_t pathid) +{ + uint8_t success = TRUE; + mp_device_t *dp; + mp_path_t *path; + + ENTER("qla2x00_update_mp_device"); + + DEBUG3(printk("%s(%ld): entered. host %p inst=%d, port =%p-%02x%02x" + "%02x%02x%02x%02x%02x%02x, dev id = %d\n", + __func__, host->ha->host_no, host, host->instance, port, + port->port_name[0], port->port_name[1], + port->port_name[2], port->port_name[3], + port->port_name[4], port->port_name[5], + port->port_name[6], port->port_name[7], + dev_id);) + + if (!qla2x00_is_ww_name_zero(port->port_name)) { + + /* + * Search for a device with a matching node name, + * or create one. + */ + dp = qla2x00_find_or_allocate_mp_dev(host, dev_id, port); + + /* + * We either have found or created a path list. Find this + * host's path in the path list or allocate a new one + * and add it to the list. + */ + if (dp == NULL) { + /* We did not create a mp_dev for this port. */ + port->mp_byte |= MP_MASK_UNCONFIGURED; + DEBUG4(printk("%s: Device NOT found or created at " + " dev_id=%d.\n", + __func__, dev_id);) + return FALSE; + } + + /* + * Find the path in the current path list, or allocate + * a new one and put it in the list if it doesn't exist. + * Note that we do NOT set bSuccess to FALSE in the case + * of failure here. We must tolerate the situation where + * the customer has more paths to a device than he can + * get into a PATH_LIST. + */ + + path = qla2x00_find_or_allocate_path(host, dp, dev_id, + pathid, port); + if (path == NULL) { + DEBUG4(printk("%s:Path NOT found or created.\n", + __func__);) + return FALSE; + } + + /* Set the PATH flag to match the device flag + * of whether this device needs a relogin. If any + * device needs relogin, set the relogin countdown. + */ + if (port->flags & FCF_CONFIG) + path->config = TRUE; + + if (atomic_read(&port->state) != FCS_ONLINE) { + path->relogin = TRUE; + if (host->relogin_countdown == 0) + host->relogin_countdown = 30; + } else { + path->relogin = FALSE; + } + + } else { + /* EMPTY */ + DEBUG4(printk("%s: Failed portname empty.\n", + __func__);) + } + + DEBUG3(printk("%s(%ld): exiting.\n", + __func__, host->ha->host_no);) + LEAVE("qla2x00_update_mp_device"); + + return success; +} + +/* + * qla2x00_update_mp_tree + * Get port information from each adapter, and build or rebuild + * the multipath control tree from this data. This is called + * from init and during port database notification. + * + * Input: + * None + * + * Return: + * Local function return code. + * + */ +static uint32_t +qla2x00_update_mp_tree(void) +{ + mp_host_t *host; + uint32_t rval = QLA_SUCCESS; + + ENTER("qla2x00_update_mp_tree:"); + + /* Loop through each adapter and see what needs updating. */ + for (host = mp_hosts_base; (host) ; host = host->next) { + + DEBUG4(printk("%s: hba(%d) flags (%x)\n", + __func__, host->instance, host->flags);) + /* Clear the countdown; it may be reset in the update. */ + host->relogin_countdown = 0; + + /* Override the NEEDS_UPDATE flag if disabled. */ + if (host->flags & MP_HOST_FLAG_DISABLE || + list_empty(host->fcports)) + host->flags &= ~MP_HOST_FLAG_NEEDS_UPDATE; + + if (host->flags & MP_HOST_FLAG_NEEDS_UPDATE) { + + /* + * Perform the actual updates. If this succeeds, clear + * the flag that an update is needed, and failback all + * devices that are visible on this path to use this + * path. If the update fails, leave set the flag that + * an update is needed, and it will be picked back up + * during the next timer routine. + */ + if (qla2x00_update_mp_host(host)) { + host->flags &= ~MP_HOST_FLAG_NEEDS_UPDATE; + + qla2x00_failback_luns(host); + } else + rval = QLA_FUNCTION_FAILED; + + } + + } + + if (rval != QLA_SUCCESS) { + /* EMPTY */ + DEBUG4(printk("%s: Exit FAILED.\n", __func__);) + + } else { + /* EMPTY */ + DEBUG4(printk("%s: Exit OK.\n", __func__);) + } + return rval; +} + + + +/* + * qla2x00_find_matching_lun + * Find the lun in the path that matches the + * specified lun number. + * + * Input: + * lun = lun number + * newpath = path to search for lun + * + * Returns: + * NULL or pointer to lun + * + * Context: + * Kernel context. + * (dg) + */ +static fc_lun_t * +qla2x00_find_matching_lun(uint8_t lun, mp_path_t *newpath) +{ + fc_lun_t *lp = NULL; /* lun ptr */ + struct list_head *fcll; + fc_lun_t *nlp; /* Next lun ptr */ + fc_port_t *fcport; /* port ptr */ + + if ((fcport = newpath->port) != NULL) { + list_for_each(fcll, &fcport->fcluns) { + nlp = list_entry(fcll, fc_lun_t, list); + + if (lun == nlp->lun) { + lp = nlp; + break; + } + } + } + return lp; +} + +/* + * qla2x00_find_path_by_name + * Find the path specified portname from the pathlist + * + * Input: + * host = host adapter pointer. + * pathlist = multi-path path list + * portname portname to search for + * + * Returns: + * pointer to the path or NULL + * + * Context: + * Kernel context. + */ +mp_path_t * +qla2x00_find_path_by_name(mp_host_t *host, mp_path_list_t *plp, + uint8_t *portname) +{ + mp_path_t *path = NULL; /* match if not NULL */ + mp_path_t *tmp_path; + int cnt; + + if ((tmp_path = plp->last) != NULL) { + for (cnt = 0; cnt < plp->path_cnt; cnt++) { + if (tmp_path->host == host && + qla2x00_is_portname_equal( + tmp_path->portname, portname)) { + + path = tmp_path; + break; + } + tmp_path = tmp_path->next; + } + } + return path ; +} + +/* + * qla2x00_find_path_by_id + * Find the path for the specified path id. + * + * Input: + * dp multi-path device + * id path id + * + * Returns: + * pointer to the path or NULL + * + * Context: + * Kernel context. + */ +static mp_path_t * +qla2x00_find_path_by_id(mp_device_t *dp, uint8_t id) +{ + mp_path_t *path = NULL; + mp_path_t *tmp_path; + mp_path_list_t *path_list; + int cnt; + + path_list = dp->path_list; + tmp_path = path_list->last; + for (cnt = 0; (tmp_path) && cnt < path_list->path_cnt; cnt++) { + if (tmp_path->id == id) { + path = tmp_path; + break; + } + tmp_path = tmp_path->next; + } + return path ; +} + +/* + * qla2x00_find_mp_dev_by_id + * Find the mp_dev for the specified target id. + * + * Input: + * host = host adapter pointer. + * tgt = Target id + * + * Returns: + * + * Context: + * Kernel context. + */ +static mp_device_t * +qla2x00_find_mp_dev_by_id(mp_host_t *host, uint8_t id ) +{ + if (id < MAX_MP_DEVICES) + return host->mp_devs[id]; + else + return NULL; +} + +/* + * qla2x00_find_mp_dev_by_nodename + * Find the mp_dev for the specified target name. + * + * Input: + * host = host adapter pointer. + * name = Target name + * + * Returns: + * + * Context: + * Kernel context. + */ +static mp_device_t * +qla2x00_find_mp_dev_by_nodename(mp_host_t *host, uint8_t *name ) +{ + int id; + mp_device_t *dp; + + ENTER("qla2x00_find_mp_dev_by_nodename"); + + for (id= 0; id < MAX_MP_DEVICES; id++) { + if ((dp = host->mp_devs[id] ) == NULL) + continue; + + if (qla2x00_is_nodename_equal(dp->nodename, name)) { + DEBUG3(printk("%s: Found matching device @ index %d:\n", + __func__, id);) + return dp; + } + } + + LEAVE("qla2x00_find_mp_dev_by_name"); + + return NULL; +} + +/* + * qla2x00_find_mp_dev_by_portname + * Find the mp_dev for the specified target name. + * + * Input: + * host = host adapter pointer. + * name = port name + * + * Returns: + * + * Context: + * Kernel context. + */ +static mp_device_t * +qla2x00_find_mp_dev_by_portname(mp_host_t *host, uint8_t *name, uint16_t *pidx) +{ + int id; + mp_device_t *dp; + + DEBUG3(printk("%s: entered.\n", __func__);) + + for (id= 0; id < MAX_MP_DEVICES; id++) { + if ((dp = host->mp_devs[id] ) == NULL) + continue; + + if (qla2x00_is_portname_in_device(dp, name)) { + DEBUG3(printk("%s: Found matching device @ index %d:\n", + __func__, id);) + *pidx = id; + return dp; + } + } + + DEBUG3(printk("%s: exiting.\n", __func__);) + + return NULL; + } + +/* + * qla2x00_find_dp_by_pn_from_all_hosts + * Search through all mp hosts to find the mp_dev for the + * specified port name. + * + * Input: + * pn = port name + * + * Returns: + * + * Context: + * Kernel context. + */ +static mp_device_t * +qla2x00_find_dp_by_pn_from_all_hosts(uint8_t *pn, uint16_t *pidx) +{ + int id; + mp_device_t *ret_dp = NULL; + mp_device_t *temp_dp = NULL; /* temporary pointer */ + mp_host_t *temp_host; /* temporary pointer */ + + DEBUG3(printk("%s: entered.\n", __func__);) + + for (temp_host = mp_hosts_base; (temp_host); + temp_host = temp_host->next) { + for (id= 0; id < MAX_MP_DEVICES; id++) { + temp_dp = temp_host->mp_devs[id]; + + if (temp_dp == NULL) + continue; + + if (qla2x00_is_portname_in_device(temp_dp, pn)) { + DEBUG3(printk( + "%s: Found matching dp @ host %p id %d:\n", + __func__, temp_host, id);) + ret_dp = temp_dp; + *pidx = id; + break; + } + } + if (ret_dp != NULL) { + /* found a match. */ + break; + } + } + + DEBUG3(printk("%s: exiting.\n", __func__);) + + return ret_dp; +} + +/* + * qla2x00_get_visible_path + * Find the the visible path for the specified device. + * + * Input: + * dp = device pointer + * + * Returns: + * NULL or path + * + * Context: + * Kernel context. + */ +static mp_path_t * +qla2x00_get_visible_path(mp_device_t *dp) +{ + uint16_t id; + mp_path_list_t *path_list; + mp_path_t *path; + + path_list = dp->path_list; + /* if we don't have a visible path skip it */ + if ((id = path_list->visible) == PATH_INDEX_INVALID) { + return NULL; + } + + if ((path = qla2x00_find_path_by_id(dp,id))== NULL) + return NULL; + + return path ; +} + +/* + * qla2x00_map_os_targets + * Allocate the luns and setup the OS target. + * + * Input: + * host = host adapter pointer. + * + * Returns: + * None + * + * Context: + * Kernel context. + */ +static void +qla2x00_map_os_targets(mp_host_t *host) +{ + scsi_qla_host_t *ha = host->ha; + mp_path_t *path; + mp_device_t *dp; + os_tgt_t *tgt; + int t; + + ENTER("qla2x00_map_os_targets "); + + for (t = 0; t < MAX_TARGETS; t++ ) { + dp = host->mp_devs[t]; + if (dp != NULL) { + DEBUG3(printk("%s: (%d) found a dp=%p, " + "host=%p, ha=%p\n", + __func__, t, dp, host,ha);) + + if ((path = qla2x00_get_visible_path(dp)) == NULL) { + printk(KERN_INFO + "qla_cfg(%d): No visible path " + "for target %d, dp = %p\n", + host->instance, t, dp); + continue; + } + + /* if not the visible path skip it */ + if (path->host == host) { + if (TGT_Q(ha, t) == NULL) { + tgt = qla2x00_tgt_alloc(ha, t); + memcpy(tgt->node_name, + dp->nodename, + WWN_SIZE); + tgt->fcport = path->port; + } + DEBUG3(printk("%s(%ld): host=%d, " + "device= %p has VISIBLE " + "path=%p, path id=%d\n", + __func__, ha->host_no, + host->instance, + dp, path, path->id);) + } else { + /* EMPTY */ + DEBUG3(printk("%s(%ld): host=%d, " + "device= %p has HIDDEN " + "path=%p, path id=%d\n", + __func__, ha->host_no, + host->instance, dp, path,path->id);) + } + qla2x00_map_os_luns(host, dp, t); + } else { + if ((tgt= TGT_Q(ha,t)) != NULL) { + qla2x00_tgt_free(ha,t); + } + } + } + + LEAVE("qla2x00_map_os_targets "); +} + +/* + * qla2x00_map_os_luns + * Allocate the luns for the OS target. + * + * Input: + * dp = pointer to device + * t = OS target number. + * + * Returns: + * None + * + * Context: + * Kernel context. + */ +static void +qla2x00_map_os_luns(mp_host_t *host, mp_device_t *dp, uint16_t t) +{ + uint16_t lun; + int i; + + for (lun = 0; lun < MAX_LUNS; lun++ ) { + if ( qla2x00_map_a_oslun(host, dp, t, lun) && + (host->flags & MP_HOST_FLAG_LUN_FO_ENABLED) ){ + /* find a path for us to use */ + for ( i = 0; i < dp->path_list->path_cnt; i++ ){ + qla2x00_select_next_path(host, dp, lun); + if( !qla2x00_map_a_oslun(host, dp, t, lun)) + break; + } + } + } +} + +/* + * qla2x00_map_a_osluns + * Map the OS lun to the current path + * + * Input: + * host = pointer to host + * dp = pointer to device + * lun = OS lun number. + * + * Returns: + * None + * + * Context: + * Kernel context. + */ + +static uint8_t +qla2x00_map_a_oslun(mp_host_t *host, mp_device_t *dp, uint16_t t, uint16_t lun) +{ + fc_port_t *fcport; + fc_lun_t *fclun; + os_lun_t *lq; + uint16_t id; + mp_path_t *path, *vis_path; + mp_host_t *vis_host; + uint8_t status = FALSE; + + if ((id = dp->path_list->current_path[lun]) != PATH_INDEX_INVALID) { + path = qla2x00_find_path_by_id(dp,id); + if (path) { + fcport = path->port; + if (fcport) { + /* dg 04/26/02 */ + fcport->cur_path = id; + fclun = qla2x00_find_matching_lun(lun,path); + + /* Always map all luns if they are enabled */ + if (fclun && + (path->lun_data.data[lun] & + LUN_DATA_ENABLED) ) { + + /* + * Mapped lun on the visible path + */ + if ((vis_path = + qla2x00_get_visible_path(dp)) == + NULL ) { + + printk(KERN_INFO + "qla2x00(%d): No visible " + "path for target %d, " + "dp = %p\n", + host->instance, + t, dp); + + return FALSE; + } + + vis_host = vis_path->host; + + /* ra 11/30/01 */ + /* + * Always alloc LUN 0 so kernel + * will scan past LUN 0. + */ + if (lun != 0 && + (EXT_IS_LUN_BIT_SET( + &(fcport->lun_mask), lun))) { + + /* mask this LUN */ + return FALSE; + } + + if ((lq = qla2x00_lun_alloc( + vis_host->ha, + t, lun)) != NULL) { + + lq->fclun = fclun; + } + } + } + else + status = TRUE; + } + } + return status; +} + +/* + * qla2x00_is_ww_name_zero + * + * Input: + * ww_name = Pointer to WW name to check + * + * Returns: + * TRUE if name is 0 else FALSE + * + * Context: + * Kernel context. + */ +static uint8_t +qla2x00_is_ww_name_zero(uint8_t *nn) +{ + int cnt; + + /* Check for zero node name */ + for (cnt = 0; cnt < WWN_SIZE ; cnt++, nn++) { + if (*nn != 0) + break; + } + /* if zero return TRUE */ + if (cnt == WWN_SIZE) + return TRUE; + else + return FALSE; +} + +/* + * qla2x00_add_path + * Add a path to the pathlist + * + * Input: + * pathlist -- path list of paths + * path -- path to be added to list + * + * Returns: + * None + * + * Context: + * Kernel context. + */ +static void +qla2x00_add_path( mp_path_list_t *pathlist, mp_path_t *path ) +{ + mp_path_t *last = pathlist->last; + + ENTER("qla2x00_add_path"); + DEBUG3(printk("%s: entered for path id %d.\n", + __func__, path->id);) + + DEBUG3(printk("%s: pathlist =%p, path =%p, cnt = %d\n", + __func__, pathlist, path, pathlist->path_cnt);) + if (last == NULL) { + last = path; + } else { + path->next = last->next; + } + + last->next = path; + pathlist->last = path; + pathlist->path_cnt++; + + DEBUG3(printk("%s: exiting. path cnt=%d.\n", + __func__, pathlist->path_cnt);) + LEAVE("qla2x00_add_path"); +} + + +/* + * qla2x00_is_portname_in_device + * Search for the specified "portname" in the device list. + * + * Input: + * dp = device pointer + * portname = portname to searched for in device + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +uint8_t +qla2x00_is_portname_in_device(mp_device_t *dp, uint8_t *portname) +{ + int idx; + + for (idx = 0; idx < MAX_PATHS_PER_DEVICE; idx++) { + if (memcmp(&dp->portnames[idx][0], portname, WWN_SIZE) == 0) + return TRUE; + } + return FALSE; +} + + +/* + * qla2x00_set_lun_data_from_bitmask + * Set or clear the LUN_DATA_ENABLED bits in the LUN_DATA from + * a LUN bitmask provided from the miniport driver. + * + * Inputs: + * lun_data = Extended LUN_DATA buffer to set. + * lun_mask = Pointer to lun bit mask union. + * + * Return Value: none. + */ +void +qla2x00_set_lun_data_from_bitmask(mp_lun_data_t *lun_data, + lun_bit_mask_t *lun_mask) +{ + int16_t lun; + + ENTER("qla2x00_set_lun_data_from_bitmask"); + + for (lun = 0; lun < MAX_LUNS; lun++) { + /* our bit mask is inverted */ + if (!(EXT_IS_LUN_BIT_SET(lun_mask,lun))) + lun_data->data[lun] |= LUN_DATA_ENABLED; + else + lun_data->data[lun] &= ~LUN_DATA_ENABLED; + + DEBUG5(printk("%s: lun data[%d] = 0x%x\n", + __func__, lun, lun_data->data[lun]);) + } + + LEAVE("qla2x00_set_lun_data_from_bitmask"); + + return; +} + +static void +qla2x00_failback_single_lun(mp_device_t *dp, uint8_t lun, uint8_t new) +{ + mp_path_list_t *pathlist; + mp_path_t *new_path, *old_path; + uint8_t old; + mp_host_t *host; + os_lun_t *lq; + mp_path_t *vis_path; + mp_host_t *vis_host; + + /* Failback and update statistics. */ + if ((pathlist = dp->path_list) == NULL) + return; + + old = pathlist->current_path[lun]; + pathlist->current_path[lun] = new; + + if ((new_path = qla2x00_find_path_by_id(dp, new)) == NULL) + return; + if ((old_path = qla2x00_find_path_by_id(dp, old)) == NULL) + return; + + /* An fclun should exist for the failbacked lun */ + if (qla2x00_find_matching_lun(lun, new_path) == NULL) + return; + if (qla2x00_find_matching_lun(lun, old_path) == NULL) + return; + + /* Log to console and to event log. */ + printk(KERN_INFO + "qla2x00: FAILBACK device %d -> " + "%02x%02x%02x%02x%02x%02x%02x%02x LUN %02x\n", + dp->dev_id, + dp->nodename[0], dp->nodename[1], + dp->nodename[2], dp->nodename[3], + dp->nodename[4], dp->nodename[5], + dp->nodename[6], dp->nodename[7], + lun); + + printk(KERN_INFO + "qla2x00: FROM HBA %d to HBA %d \n", + old_path->host->instance, + new_path->host->instance); + + + /* Send a failover notification. */ + qla2x00_send_failover_notify(dp, lun, new_path, old_path); + + host = new_path->host; + + /* remap the lun */ + qla2x00_map_a_oslun(host, dp, dp->dev_id, lun); + + /* 7/16 + * Reset counts on the visible path + */ + if ((vis_path = qla2x00_get_visible_path(dp)) == NULL) { + printk(KERN_INFO + "qla2x00(%d): No visible path for " + "target %d, dp = %p\n", + host->instance, + dp->dev_id, dp); + return; + } + + vis_host = vis_path->host; + if ((lq = qla2x00_lun_alloc(vis_host->ha, dp->dev_id, lun)) != NULL) { + qla2x00_delay_lun(vis_host->ha, lq, recoveryTime); + qla2x00_flush_failover_q(vis_host->ha, lq); + qla2x00_reset_lun_fo_counts(vis_host->ha, lq); + } +} + +/* +* qla2x00_failback_luns +* This routine looks through the devices on an adapter, and +* for each device that has this adapter as the visible path, +* it forces that path to be the current path. This allows us +* to keep some semblance of static load balancing even after +* an adapter goes away and comes back. +* +* Arguments: +* host Adapter that has just come back online. +* +* Return: +* None. +*/ +static void +qla2x00_failback_luns( mp_host_t *host) +{ + uint16_t dev_no; + uint8_t l; + uint16_t lun; + int i; + mp_device_t *dp; + mp_path_list_t *path_list; + mp_path_t *path; + fc_lun_t *new_fp; + + ENTER("qla2x00_failback_luns"); + + for (dev_no = 0; dev_no < MAX_MP_DEVICES; dev_no++) { + dp = host->mp_devs[dev_no]; + + if (dp == NULL) + continue; + + path_list = dp->path_list; + for (path = path_list->last, i= 0; + i < path_list->path_cnt; + i++, path = path->next) { + + if (path->host != host ) + continue; + + if (path->port == NULL) + continue; + + if (atomic_read(&path->port->state) == FCS_DEVICE_DEAD) + continue; + + /* + * Failback all the paths for this host, + * the luns could be preferred across all paths + */ + DEBUG(printk("%s(%d): Lun Data for device %p, " + "id=%d, path id=%d\n", + __func__, host->instance, dp, dp->dev_id, + path->id);) + DEBUG4(qla2x00_dump_buffer( + (char *)&path->lun_data.data[0], 64);) + DEBUG4(printk("%s(%d): Perferrred Path data:\n", + __func__, host->instance);) + DEBUG4(qla2x00_dump_buffer( + (char *)&path_list->current_path[0], 64);) + + for (lun = 0; lun < MAX_LUNS_PER_DEVICE; lun++) { + l = (uint8_t)(lun & 0xFF); + + /* + * if this is the preferred lun and not + * the current path then failback lun. + */ + DEBUG4(printk("%s: target=%d, cur path id =%d, " + "lun data[%d] = %d)\n", + __func__, dp->dev_id, path->id, + lun, path->lun_data.data[lun]);) + + if ((path->lun_data.data[l] & + LUN_DATA_PREFERRED_PATH) && + /* !path->relogin && */ + path_list->current_path[l] != + path->id) { + /* No point in failing back a + disconnected lun */ + new_fp = qla2x00_find_matching_lun( + l, path); + + if (new_fp == NULL) + continue; + + qla2x00_failback_single_lun( + dp, l, path->id); + } + } + } + + } + + LEAVE("qla2x00_failback_luns"); + + return; +} + +/* + * qla2x00_setup_new_path + * Checks the path against the existing paths to see if there + * are any incompatibilities. It then checks and sets up the + * current path indices. + * + * Inputs: + * dp = pointer to device + * path = new path + * + * Returns: + * None + */ +static void +qla2x00_setup_new_path( mp_device_t *dp, mp_path_t *path) +{ + mp_path_list_t *path_list = dp->path_list; + mp_path_t *tmp_path, *first_path; + mp_host_t *first_host; + mp_host_t *tmp_host; + + uint16_t lun; + uint8_t l; + int i; + + ENTER("qla2x00_setup_new_path"); + + /* If this is a visible path, and there is not already a + * visible path, save it as the visible path. If there + * is already a visible path, log an error and make this + * path invisible. + */ + if (!(path->mp_byte & (MP_MASK_HIDDEN | MP_MASK_UNCONFIGURED))) { + + /* No known visible path */ + if (path_list->visible == PATH_INDEX_INVALID) { + DEBUG3(printk("%s: No know visible path - make this " + "path visible\n", + __func__);) + + path_list->visible = path->id; + path->mp_byte &= ~MP_MASK_HIDDEN; + } else { + DEBUG3(printk("%s: Second visible path found- make " + "this one hidden\n", + __func__);) + + path->mp_byte |= MP_MASK_HIDDEN; + } + if (path->port) + path->port->mp_byte = path->mp_byte; + } + + /* + * If this is not the first path added, and the setting for + * MaxLunsPerTarget does not match that of the first path + * then disable qla_cfg for all adapters. + */ + first_path = qla2x00_find_path_by_id(dp, 0); + + if (first_path != NULL) { + first_host = first_path->host; + if ((path->id != 0) && + (first_host->MaxLunsPerTarget != + path->host->MaxLunsPerTarget)) { + + for (tmp_path = path_list->last, i = 0; + (tmp_path) && i <= path->id; i++) { + + tmp_host = tmp_path->host; + if (!(tmp_host->flags & + MP_HOST_FLAG_DISABLE)) { + + DEBUG4(printk("%s: 2nd visible " + "path (%p)\n", + __func__, tmp_host);) + + tmp_host->flags |= MP_HOST_FLAG_DISABLE; + } + } + } + } + + /* + * For each LUN, evaluate whether the new path that is added + * is better than the existing path. If it is, make it the + * current path for the LUN. + */ + for (lun = 0; lun < MAX_LUNS_PER_DEVICE; lun++) { + l = (uint8_t)(lun & 0xFF); + + /* If this is the first path added, it is the only + * available path, so make it the current path. + */ + + DEBUG4(printk("%s: lun_data 0x%x, LUN %d\n", + __func__, path->lun_data.data[l], lun);) + + if (first_path == path) { + path_list->current_path[l] = 0; + path->lun_data.data[l] |= LUN_DATA_PREFERRED_PATH; + } else if (path->lun_data.data[l] & LUN_DATA_PREFERRED_PATH) { + /* + * If this is not the first path added, if this is + * the preferred path, make it the current path. + */ + path_list->current_path[l] = path->id; + } + } + + LEAVE("qla2x00_setup_new_path"); + + return; +} + +/* + * qla2x00_cfg_mem_free + * Free all configuration structures. + * + * Input: + * ha = adapter state pointer. + * + * Context: + * Kernel context. + */ +void +qla2x00_cfg_mem_free(scsi_qla_host_t *ha) +{ + mp_device_t *dp; + mp_path_list_t *path_list; + mp_path_t *tmp_path, *path; + mp_host_t *host, *temp; + int id, cnt; + + if ((host = qla2x00_cfg_find_host(ha)) != NULL) { + if( mp_num_hosts == 0 ) + return; + + for (id= 0; id < MAX_MP_DEVICES; id++) { + if ((dp = host->mp_devs[id]) == NULL) + continue; + if ((path_list = dp->path_list) == NULL) + continue; + if ((tmp_path = path_list->last) == NULL) + continue; + for (cnt = 0; cnt < path_list->path_cnt; cnt++) { + path = tmp_path; + tmp_path = tmp_path->next; + DEBUG(printk(KERN_INFO + "host%d - Removing path[%d] " + "= %p\n", + host->instance, + cnt, path);) + KMEM_FREE(path,sizeof(mp_path_t)); + } + KMEM_FREE(path_list, sizeof(mp_path_list_t)); + host->mp_devs[id] = NULL; + /* remove dp from other hosts */ + for (temp = mp_hosts_base; (temp); temp = temp->next) { + if (temp->mp_devs[id] == dp) { + DEBUG(printk(KERN_INFO + "host%d - Removing host[%d] = " + "%p\n", + host->instance, + temp->instance,temp);) + temp->mp_devs[id] = NULL; + } + } + KMEM_FREE(dp, sizeof(mp_device_t)); + } + + /* remove this host from host list */ + temp = mp_hosts_base; + if (temp != NULL) { + /* Remove from top of queue */ + if (temp == host) { + mp_hosts_base = host->next; + } else { + /* + * Remove from middle of queue + * or bottom of queue + */ + for (temp = mp_hosts_base; + temp != NULL; + temp = temp->next) { + + if (temp->next == host) { + temp->next = host->next; + break; + } + } + } + } + KMEM_FREE(host, sizeof(mp_host_t)); + mp_num_hosts--; + } +} + +int +qla2x00_is_fcport_in_config(scsi_qla_host_t *ha, fc_port_t *fcport) +{ + if (!ha->flags.failover_enabled) { + if (fcport->flags & FCF_PERSISTENT_BOUND) + return(TRUE); + } else { + mp_device_t *dp; + mp_host_t *host; + mp_path_t *path; + mp_path_list_t *pathlist; + uint16_t dev_no; + + if ((host = qla2x00_cfg_find_host(ha)) == NULL) { + /* no configured devices */ + return (FALSE); + } + + for (dev_no = 0; dev_no < MAX_MP_DEVICES; dev_no++) { + dp = host->mp_devs[dev_no]; + + if (dp == NULL) + continue; + + /* Sanity check */ + if (qla2x00_is_wwn_zero(dp->nodename)) + continue; + + if ((pathlist = dp->path_list) == NULL) + continue; + + path = qla2x00_find_path_by_name(host, dp->path_list, + fcport->port_name); + if (path != NULL) { + /* found path for port */ + if (path->config == TRUE) { + return (TRUE); + } else { + break; + } + } + } + + } + + return (FALSE); +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_cfg.h 999-mjb/drivers/scsi/qla2xxx/qla_cfg.h --- 000-virgin/drivers/scsi/qla2xxx/qla_cfg.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_cfg.h 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,182 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + +/* + * QLogic ISP2x00 Multi-path LUN Support + * Multi-path include file. + */ + +#if !defined(_QLA_CFG_H) +#define _QLA_CFG_H + +#if defined(__cplusplus) +extern "C" +{ +#endif + +/* + * Failover definitions + */ +#define FAILOVER_TYPE_COUNT 4 +#define MP_NOTIFY_RESET_DETECTED 1 +#define MP_NOTIFY_PWR_LOSS 2 +#define MP_NOTIFY_LOOP_UP 3 +#define MP_NOTIFY_LOOP_DOWN 4 +#define MP_NOTIFY_BUS_RESET 5 +#define FAILOVER_TYPE_ERROR_RETRY 1 +#define MAX_NUMBER_PATHS FO_MAX_PATHS +#define PORT_NAME_SIZE WWN_SIZE +#define FAILOVER_NOTIFY_STATUS_ERROR QLA_SUCCESS +#define FAILOVER_NOTIFY_STATUS_SUCCESS QLA_SUCCESS +#define FAILOVER_NOTIFY_CDB_LENGTH_MAX FO_NOTIFY_CDB_LENGTH_MAX +#define MAX_TARGETS_PER_DEVICE SDM_DEF_MAX_TARGETS_PER_DEVICE + +/* + * Limits definitions. + */ +#define MAX_LUNS_PER_DEVICE MAX_LUNS /* Maximum # of luns */ +#define MAX_MP_DEVICES MAX_TARGETS /* Maximum # of virtual devs */ +#define MAX_PATHS_PER_DEVICE 8 /* Maximum # of paths */ +#if !defined(MAX_LUNS) +#define MAX_LUNS 256 +#endif +#define MAX_HOSTS MAX_HOST_COUNT + +/* Async notification types */ +#define NOTIFY_EVENT_LINK_DOWN 1 /* Link went down */ +#define NOTIFY_EVENT_LINK_UP 2 /* Link is back up */ +#define NOTIFY_EVENT_RESET_DETECTED 3 /* Reset detected */ + +/* MACROS */ +#define qla2x00_is_portname_equal(N1,N2) \ + ((memcmp((N1),(N2),WWN_SIZE)==0?TRUE:FALSE)) +#define qla2x00_is_nodename_equal(N1,N2) \ + ((memcmp((N1),(N2),WWN_SIZE)==0?TRUE:FALSE)) +#if 0 +#define qla2x00_allocate_path_list() \ + ((mp_path_list_t *)KMEM_ZALLOC(sizeof(mp_path_list_t))) +#endif + +/* + * Per-multipath driver parameters + */ +typedef struct _mp_lun_data { + uint8_t data[MAX_LUNS]; +#define LUN_DATA_ENABLED BIT_7 +#define LUN_DATA_PREFERRED_PATH BIT_6 +} +mp_lun_data_t; + + +#define PATH_INDEX_INVALID 0xff + +/* + * Per-device collection of all paths. + */ +typedef struct _mp_path_list { + struct _mp_path *last; /* ptrs to end of circular list of paths */ + uint8_t path_cnt; /* number of paths */ + uint8_t visible; /* visible path */ + uint16_t reserved1; /* Memory alignment */ + uint32_t reserved2; /* Memory alignment */ + uint8_t current_path[ MAX_LUNS_PER_DEVICE ]; /* current path for a given lun */ + uint16_t failover_cnt[ FAILOVER_TYPE_COUNT ]; +} +mp_path_list_t; + +/* + * Definitions for failover notify SRBs. These SRBs contain failover notify + * CDBs to notify a target that a failover has occurred. + * + */ +typedef struct _failover_notify_srb { + srb_t *srb; + uint16_t status; + uint16_t reserved; +} +failover_notify_srb_t; + +/* + * Per-device multipath control data. + */ +typedef struct _mp_device { + mp_path_list_t *path_list; /* Path list for device. */ + int dev_id; + int use_cnt; /* number of users */ + uint8_t nodename[WWN_SIZE]; /* World-wide node name. */ + /* World-wide port names. */ + uint8_t portnames[MAX_PATHS_PER_DEVICE][WWN_SIZE]; +} +mp_device_t; + +/* + * Per-adapter multipath Host + */ +typedef struct _mp_host { + struct _mp_host *next; /* ptr to next host adapter in list */ + scsi_qla_host_t *ha; /* ptr to lower-level driver adapter struct */ + int instance; /* OS instance number */ + struct list_head *fcports; /* Port chain for this adapter */ + mp_device_t *mp_devs[MAX_MP_DEVICES]; /* Multipath devices */ + + uint32_t flags; +#define MP_HOST_FLAG_NEEDS_UPDATE BIT_0 /* Need to update device data. */ +#define MP_HOST_FLAG_FO_ENABLED BIT_1 /* Failover enabled for this host */ +#define MP_HOST_FLAG_DISABLE BIT_2 /* Bypass qla_cfg. */ +#define MP_HOST_FLAG_LUN_FO_ENABLED BIT_3 /* lun Failover enabled */ + + uint8_t nodename[WWN_SIZE]; + uint8_t portname[WWN_SIZE]; + uint16_t MaxLunsPerTarget; + + uint16_t relogin_countdown; +} +mp_host_t; + +/* + * Describes path a single. + */ +typedef struct _mp_path { + struct _mp_path *next; /* next path in list */ + struct _mp_host *host; /* Pointer to adapter */ + fc_port_t *port; /* FC port info */ + uint16_t id; /* Path id (index) */ + uint8_t mp_byte; /* Multipath control byte */ +#define MP_MASK_HIDDEN 0x80 +#define MP_MASK_UNCONFIGURED 0x40 +#define MP_MASK_OVERRIDE 0x10 /* MC_MASK_SEPARATE_TARGETS */ +#define MP_MASK_PRIORITY 0x07 + + uint8_t relogin; /* Need to relogin to port */ + uint8_t config; /* User configured path */ + uint8_t reserved[3]; + mp_lun_data_t lun_data; /* Lun data information */ + uint8_t portname[WWN_SIZE]; /* Port name of this target. */ +} +mp_path_t; + +/* + * Failover notification requests from host driver. + */ +typedef struct failover_notify_entry { + struct scsi_address *os_addr; +} +failover_notify_t; + +#endif /* _QLA_CFG_H */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_cfgln.c 999-mjb/drivers/scsi/qla2xxx/qla_cfgln.c --- 000-virgin/drivers/scsi/qla2xxx/qla_cfgln.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_cfgln.c 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,742 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + +/* + * QLogic ISP2x00 Multi-path LUN Support Driver + * Solaris specific functions + * + */ + +#include "qla_os.h" +#include "qla_def.h" + +#include "qlfo.h" + +#define MAX_SEARCH_STR_SIZE 512 + +/* + * qla2x00_set_lun_data_from_config + * Set lun_data byte from the configuration parameters. + * + * Input: + * host -- pointer to host adapter structure. + * port -- pointer to port + * tgt -- target number + * dev_no -- device number + */ +void +qla2x00_set_lun_data_from_config(mp_host_t *host, fc_port_t *port, + uint16_t tgt, uint16_t dev_no) +{ + char *propbuf; /* As big as largest search string */ + int rval; + int16_t lun, l; + scsi_qla_host_t *ha = host->ha; + mp_device_t *dp; + lun_bit_mask_t *plun_mask; + lun_bit_mask_t *mask_ptr; + mp_path_list_t *pathlist; +#if 0 + uint8_t control_byte; +#endif + + mp_path_t *path; + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&propbuf, + MAX_SEARCH_STR_SIZE)) { + /* not enough memory */ + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "propbuf requested=%d.\n", + __func__, ha->host_no, ha->instance, + MAX_SEARCH_STR_SIZE);) + return; + } + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&plun_mask, + sizeof(lun_bit_mask_t))) { + /* not enough memory */ + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "lun_mask requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(lun_bit_mask_t));) + qla2x00_free_ioctl_scrap_mem(ha); + return; + } + mask_ptr = plun_mask; + + dp = host->mp_devs[tgt]; + if (dp == NULL) { + printk("qla2x00_set_lun_data_from_config: Target %d " + "not found for hba %d\n",tgt, host->instance); + qla2x00_free_ioctl_scrap_mem(ha); + return; + } + if ( (pathlist = dp->path_list) == NULL ) { + printk("qla2x00_set_lun_data_from_config: path list " + "not found for target %d\n", tgt); + qla2x00_free_ioctl_scrap_mem(ha); + return; + } + + if ((path = qla2x00_find_path_by_name(host, pathlist, + port->port_name)) == NULL ) { + printk("qla2x00_set_lun_data_from_config: No path found " + "for target %d\n", tgt); + qla2x00_free_ioctl_scrap_mem(ha); + return; + } + + /* Get "target-N-device-N-preferred" as a 256 bit lun_mask*/ + sprintf(propbuf, "scsi-qla%ld-tgt-%d-di-%d-preferred", + ha->instance, tgt, dev_no); + DEBUG2(printk("build_tree: %s\n",propbuf);) + + rval = qla2x00_get_prop_xstr(ha, propbuf, + (uint8_t *)(plun_mask), sizeof(lun_bit_mask_t)); + + if (rval == -1) { + /* EMPTY */ + DEBUG2(printk("%s(%ld): no preferred mask entry found for " + "path id %d on port %02x%02x%02x%02x%02x%02x%02x%02x.\n", + __func__, ha->host_no, path->id, + path->portname[0], path->portname[1], + path->portname[2], path->portname[3], + path->portname[4], path->portname[5], + path->portname[6], path->portname[7]);) + } else { + if (rval != sizeof(lun_bit_mask_t)) { + /* EMPTY */ + printk("qla2x00_set_lun_data_from_config: " + "Preferred mask len %d is incorrect.\n", rval); + } + + DEBUG3(printk("%s(%ld): reading Preferred Mask for path id %d " + "on port %02x%02x%02x%02x%02x%02x%02x%02x:\n", + __func__, ha->host_no, path->id, + path->portname[0], path->portname[1], + path->portname[2], path->portname[3], + path->portname[4], path->portname[5], + path->portname[6], path->portname[7]);) + DEBUG3(qla2x00_dump_buffer((char *)plun_mask, + sizeof(lun_bit_mask_t));) + + for (lun = MAX_LUNS-1, l =0; lun >= 0; lun--, l++ ) { + if (EXT_IS_LUN_BIT_SET(mask_ptr, lun)) { + path->lun_data.data[l] |= + LUN_DATA_PREFERRED_PATH; + pathlist->current_path[l] = path->id; + } else { + path->lun_data.data[l] &= + ~LUN_DATA_PREFERRED_PATH; + } + } + + } + + /* Get "target-N-device-N-lun-disable" as a 256 bit lun_mask*/ + sprintf(propbuf, "scsi-qla%ld-tgt-%d-di-%d-lun-disabled", + ha->instance, tgt, dev_no); + DEBUG3(printk("build_tree: %s\n",propbuf);) + + rval = qla2x00_get_prop_xstr(ha, propbuf, + (uint8_t *)plun_mask, sizeof(lun_bit_mask_t)); + if (rval == -1) { + /* default: all luns enabled */ + DEBUG3(printk("%s(%ld): no entry found for path id %d. " + "Assume all LUNs enabled on port %02x%02x%02x%02x%02x%" + "02x%02x%02x.\n", + __func__, ha->host_no, path->id, + path->portname[0], path->portname[1], + path->portname[2], path->portname[3], + path->portname[4], path->portname[5], + path->portname[6], path->portname[7]);) + + for (lun = 0; lun < MAX_LUNS; lun++) { + path->lun_data.data[lun] |= LUN_DATA_ENABLED; + } + } else { + if (rval != sizeof(lun_bit_mask_t)) { + printk("qla2x00_set_lun_data_from_config: Enable " + "mask has wrong size %d != %ld\n", + rval, (ulong)sizeof(lun_bit_mask_t)); + } else { + for (lun = MAX_LUNS-1, l =0; lun >= 0; lun--, l++) { + /* our bit mask is inverted */ + if (!EXT_IS_LUN_BIT_SET(mask_ptr,lun)) + path->lun_data.data[l] |= + LUN_DATA_ENABLED; + else + path->lun_data.data[l] &= + ~LUN_DATA_ENABLED; + } + DEBUG3(printk("%s(%ld): got lun mask for path id %d " + "port %02x%02x%02x%02x%02x%02x%02x%02x:\n", + __func__, ha->host_no, path->id, + path->portname[0], path->portname[1], + path->portname[2], path->portname[3], + path->portname[4], path->portname[5], + path->portname[6], path->portname[7]);) + DEBUG3(qla2x00_dump_buffer( + (uint8_t *)&path->lun_data.data[0], 64);) + } + } + + DEBUG3(printk("qla2x00_set_lun_data_from_config: Luns data for " + "device %p, instance %d, path id=%d\n", + dp,host->instance,path->id);) + DEBUG3(qla2x00_dump_buffer((char *)&path->lun_data.data[0], 64);) + + qla2x00_free_ioctl_scrap_mem(ha); + LEAVE("qla2x00_set_lun_data_from_config"); +} + + + +/* + * qla2x00_cfg_build_path_tree + * Find all path properties and build a path tree. The + * resulting tree has no actual port assigned to it + * until the port discovery is done by the lower level. + * + * Input: + * ha = adapter block pointer. + * + * Context: + * Kernel context. + */ +void +qla2x00_cfg_build_path_tree(scsi_qla_host_t *ha) +{ + char *propbuf; + uint8_t node_name[WWN_SIZE]; + uint8_t port_name[WWN_SIZE]; + fc_port_t *port; + uint16_t dev_no = 0, tgt; + int instance, rval; + mp_host_t *host = NULL; + uint8_t *name; + int done; + uint8_t control_byte; + + + ENTER("qla2x00_cfg_build_path_tree"); + + printk(KERN_INFO + "qla02%d: ConfigRequired is set. \n", (int)ha->instance); + DEBUG(printk("qla2x00_cfg_build_path_tree: hba =%d", + (int)ha->instance);) + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&propbuf, + MAX_SEARCH_STR_SIZE)) { + /* not enough memory */ + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "propbuf requested=%d.\n", + __func__, ha->host_no, ha->instance, + MAX_SEARCH_STR_SIZE);) + return; + } + + /* Look for adapter nodename in properties */ + sprintf(propbuf, "scsi-qla%ld-adapter-port", ha->instance); + DEBUG(printk("build_tree: %s\n",propbuf);) + + rval = qla2x00_get_prop_xstr(ha, propbuf, port_name, WWN_SIZE); + if (rval != WWN_SIZE) { + qla2x00_free_ioctl_scrap_mem(ha); + return; + } + + /* Does nodename match the host adapter nodename? */ + name = &ha->init_cb->port_name[0]; + if (!qla2x00_is_nodename_equal(name, port_name)) { + printk(KERN_INFO + "scsi(%d): Adapter nodenames don't match - ha = %p.\n", + (int)ha->instance,ha); + DEBUG(printk("qla(%d): Adapter nodenames don't match - " + "ha=%p. port name=%02x%02x%02x%02x%02x%02x%02x%02x\n", + (int)ha->instance,ha, + name[0], name[1], name[2], name[3], + name[4], name[5], name[6], name[7]);) + qla2x00_free_ioctl_scrap_mem(ha); + return; + } + + DEBUG(printk("%s: found entry for adapter port %02x%02x%02x%02x" + "%02x%02x%02x%02x.\n", + __func__, + port_name[0], port_name[1], port_name[2], + port_name[3], port_name[4], port_name[5], + port_name[6], port_name[7]);) + + instance = ha->instance; + if ((host = qla2x00_alloc_host(ha)) == NULL) { + printk(KERN_INFO + "scsi(%d): Couldn't allocate host - ha = %p.\n", + (int)instance,ha); + } else { + /* create a dummy port */ + port = (fc_port_t *)KMEM_ZALLOC(sizeof (fc_port_t),9); + if (port == NULL) { + printk(KERN_INFO + "scsi(%d): Couldn't allocate port.\n", + (int)instance); + DEBUG(printk("qla(%d): Couldn't allocate port.\n", + (int)host->instance);) + /* remove host */ + qla2x00_free_ioctl_scrap_mem(ha); + return; + } + + done = 0; + + /* For each target on the host bus adapter */ + for (tgt= 0; tgt< MAX_MP_DEVICES && !done; tgt++) { + + /* get all paths for this target */ + for (dev_no = 0; dev_no < MAX_PATHS_PER_DEVICE && + !done ; dev_no++) { + + /* + * O(N*M) scan, should ideally check if there + * are any tgt entries present, if not, then + * continue. + * + * sprintf(propbuf, + * "scsi-qla%d-tgt-%d-", + * instance, tgt_no); + * if (strstr(ha->cmdline, propbuf) == NULL) + * continue; + * + */ + memset(port, 0, sizeof (fc_port_t)); + + /* + * Get "target-N-device-N-node" is a 16-chars + * number + */ + sprintf(propbuf, "scsi-qla%d-tgt-%d-di-%d-node", + instance, tgt, dev_no); + DEBUG(printk("build_tree: %s\n",propbuf);) + + rval = qla2x00_get_prop_xstr(ha, propbuf, + node_name, WWN_SIZE); + if (rval != WWN_SIZE) + /* + * di values may not be contiguous for + * override case. + */ + continue; + + memcpy(port->node_name, node_name, WWN_SIZE); + + /* + * Get "target-N-device-N-port" is a 16-chars + * number + */ + sprintf(propbuf, "scsi-qla%d-tgt-%d-di-%d-port", + instance, tgt, dev_no); + DEBUG(printk("build_tree: %s\n",propbuf);) + + rval = qla2x00_get_prop_xstr(ha, propbuf, + port_name, WWN_SIZE); + if (rval != WWN_SIZE) + continue; + + memcpy(port->node_name, node_name, WWN_SIZE); + memcpy(port->port_name, port_name, WWN_SIZE); + port->flags |= FCF_CONFIG; + + /* + * Get "target-N-device-N-control" if property + * is present then all luns are visible. + */ + sprintf(propbuf, + "scsi-qla%d-tgt-%d-di-%d-control", + instance, tgt, dev_no); + DEBUG3(printk("build_tree: %s\n",propbuf);) + + rval = qla2x00_get_prop_xstr(ha, propbuf, + (uint8_t *)(&control_byte), + sizeof(control_byte)); + if (rval == -1) { + /* error getting string. go to next. */ + DEBUG2(printk( + "%s: string parsing failed.\n", + __func__);) + continue; + } + + DEBUG(printk("build_tree: control byte 0x%x\n", + control_byte);) + + port->mp_byte = control_byte; + DEBUG(printk("%s(%ld): calling update_mp_device" + " for host %p port %p-%02x%02x%02x%02x%02x" + "%02x%02x%02x tgt=%d mpbyte=%02x.\n", + __func__, ha->host_no, host, port, + port->port_name[0], port->port_name[1], + port->port_name[2], port->port_name[3], + port->port_name[4], port->port_name[5], + port->port_name[6], port->port_name[7], + tgt, port->mp_byte);) + + qla2x00_update_mp_device(host, + port, tgt, dev_no); + qla2x00_set_lun_data_from_config(host, + port, tgt, dev_no); + } + } + KMEM_FREE(port, sizeof (fc_port_t)); + } + + qla2x00_free_ioctl_scrap_mem(ha); + + LEAVE("qla2x00_cfg_build_path_tree"); + DEBUG(printk("Leaving: qla2x00_cfg_build_path_tree\n");) +} + +/* + * qla2x00_cfg_display_devices + * This routine will the node names of the different devices found + * after port inquiry. + * + * Input: + * + * Returns: + * None. + */ +void qla2x00_cfg_display_devices(void) +{ + mp_host_t *host; + int id; + mp_device_t *dp; + mp_path_t *path; + mp_path_list_t *path_list; + int cnt, i, dev_no; + int instance; + lun_bit_mask_t lun_mask; + int mask_set; + uint8_t l; + + printk("qla2x00_cfg_display_devices\n"); + for (host = mp_hosts_base; (host); host = host->next) { + + instance = (int) host->instance; + /* Display the node name for adapter */ + printk(KERN_INFO + "scsi-qla%d-adapter-port=" + "%02x%02x%02x%02x%02x%02x%02x%02x\\;\n", + instance, + host->portname[0], + host->portname[1], + host->portname[2], + host->portname[3], + host->portname[4], + host->portname[5], + host->portname[6], + host->portname[7]); + + for (id = 0; id < MAX_MP_DEVICES; id++) { + if( (dp = host->mp_devs[id] ) == NULL ) + continue; + + path_list = dp->path_list; + + + if( (path = path_list->last) != NULL ) { + /* Print out device port names */ + path = path->next; /* first path */ + for (dev_no = 0, cnt = 0; + cnt < path_list->path_cnt; + path = path->next, cnt++) { + + /* skip others if not our host */ + if (host != path->host) + continue; + printk(KERN_INFO + "scsi-qla%d-tgt-%d-di-%d-node=" + "%02x%02x%02x%02x" + "%02x%02x%02x%02x\\;\n", + instance, id, path->id, + dp->nodename[0], + dp->nodename[1], + dp->nodename[2], + dp->nodename[3], + dp->nodename[4], + dp->nodename[5], + dp->nodename[6], + dp->nodename[7]); + + /* port_name */ + printk(KERN_INFO + "scsi-qla%d-tgt-%d-di-%d-port=" + "%02x%02x%02x%02x" + "%02x%02x%02x%02x\\;\n", + instance, id, path->id, + path->portname[0], + path->portname[1], + path->portname[2], + path->portname[3], + path->portname[4], + path->portname[5], + path->portname[6], + path->portname[7]); + + /* control byte */ + printk(KERN_INFO + "scsi-qla%d-tgt-%d-di-%d-" + "control=%02x\\;\n", + instance, id, path->id, + path->mp_byte); + + /* + * Build preferred bit mask for this + * path */ + memset(&lun_mask, 0, sizeof(lun_mask)); + mask_set = 0; + for (i = 0; i < MAX_LUNS; i++) { + l = (uint8_t)(i & 0xFF); + if (path_list->current_path[l] == path->id ) { + EXT_SET_LUN_BIT((&lun_mask),l); + mask_set++; + } + } + if (mask_set) { + printk(KERN_INFO + "scsi-qla%d-tgt-%d-di-%d-preferred=%08x%08x%08x%08x%08x%08x%08x%08x\\;\n", + instance, id, path->id, + *((uint32_t *) &lun_mask.mask[28]), + *((uint32_t *) &lun_mask.mask[24]), + *((uint32_t *) &lun_mask.mask[20]), + *((uint32_t *) &lun_mask.mask[16]), + *((uint32_t *) &lun_mask.mask[12]), + *((uint32_t *) &lun_mask.mask[8]), + *((uint32_t *) &lun_mask.mask[4]), + *((uint32_t *) &lun_mask.mask[0]) ); + } + /* + * Build disable bit mask for this path + */ + mask_set = 0; + for (i = 0; i < MAX_LUNS; i++) { + l = (uint8_t)(i & 0xFF); + if (!(path->lun_data.data[l] & + LUN_DATA_ENABLED) ) { + + mask_set++; + } + } + if (mask_set) { + printk(KERN_INFO + "scsi-qla%d-tgt-%d-di-%d-lun-disable=%08x%08x%08x%08x%08x%08x%08x%08x\\;\n", + instance, id, path->id, + *((uint32_t *) &lun_mask.mask[28]), + *((uint32_t *) &lun_mask.mask[24]), + *((uint32_t *) &lun_mask.mask[20]), + *((uint32_t *) &lun_mask.mask[16]), + *((uint32_t *) &lun_mask.mask[12]), + *((uint32_t *) &lun_mask.mask[8]), + *((uint32_t *) &lun_mask.mask[4]), + *((uint32_t *) &lun_mask.mask[0]) ); + } + dev_no++; + } + + } + } + } +} + +#if 0 +int qla2x00_cfg_build_range( mp_path_t *path, uint8_t *buf, int siz, uint8_t mask ) +{ + int i; + int max, min; + int colonflg = FALSE; + int len = 0; + + max = -1; + min = 0; + for (i = 0; i < MAX_LUNS; i++) { + if( (path->lun_data.data[i] & mask) ) { + max = i; + } else { + if( colonflg && max >= min ) { + len += sprintf(&buf[len],":"); + if( len > siz) + return len; + colonflg = FALSE; + } + if (max > min ) { + len += sprintf(&buf[len],"%02x-%02x",min,max); + if( len > siz) + return len; + colonflg = TRUE; + } else if ( max == min ) { + len += sprintf(&buf[len],"%02x",max); + if( len > siz) + return len; + colonflg = TRUE; + } + min = i + 1; + max = i; + } + } + DEBUG4(printk("build_range: return len =%d\n",len);) + return(len); +} +#endif + +#if 0 +/* + * qla2x00_cfg_proc_display_devices + * This routine will the node names of the different devices found + * after port inquiry. + * + * Input: + * + * Returns: + * None. + */ +int qla2x00_cfg_proc_display_devices(scsi_qla_host_t *ha) +{ + mp_host_t *host; + int id; + mp_device_t *dp; + mp_path_t *path; + mp_path_list_t *path_list; + int cnt, i; + int instance; + lun_bit_mask_t lun_mask; + int mask_set; + uint8_t l; + fc_port_t *port; + int len = 0; + + for (host = mp_hosts_base; (host); host = host->next) { + + if( host->ha != ha ) + continue; + + instance = (int) host->instance; + + /* Display the node name for adapter */ + len += sprintf(PROC_BUF, + "scsi-qla%d-adapter-node=" + "%02x%02x%02x%02x%02x%02x%02x%02x;\n", + instance, + host->nodename[0], + host->nodename[1], + host->nodename[2], + host->nodename[3], + host->nodename[4], + host->nodename[5], + host->nodename[6], + host->nodename[7]); + + + for (id = 0; id < MAX_MP_DEVICES; id++) { + if( (dp = host->mp_devs[id] ) == NULL ) + continue; + + path_list = dp->path_list; + + if( (path = path_list->last) != NULL ) { + /* Print out device port names */ + path = path->next; /* first path */ + for (cnt = 0; cnt < path_list->path_cnt; path = path->next, cnt++) { + /* skip others if not our host */ + if (host != path->host) + continue; + len += sprintf(PROC_BUF, + "scsi-qla%d-target-%d-path-%d-node=%02x%02x%02x%02x%02x%02x%02x%02x;\n", + instance, id, path->id, + dp->nodename[0], + dp->nodename[1], + dp->nodename[2], + dp->nodename[3], + dp->nodename[4], + dp->nodename[5], + dp->nodename[6], + dp->nodename[7]); + + /* port_name */ + len += sprintf(PROC_BUF, + "scsi-qla%d-target-%d-path-%d-port=%02x%02x%02x%02x%02x%02x%02x%02x;\n", + instance, id, path->id, + path->portname[0], + path->portname[1], + path->portname[2], + path->portname[3], + path->portname[4], + path->portname[5], + path->portname[6], + path->portname[7]); + + if( path_list->visible == path->id ) { + len += sprintf(PROC_BUF, "scsi-qla%d-target-%d-path-%d-visible=%02x;\n", + instance, id, path->id, path->id); + } + + len +=sprintf(PROC_BUF, "scsi-qla%d-target-%d-path-%d-control=%02x;\n", + instance, id, path->id, path->mp_byte); + + /* Build preferred bit mask for this path */ + memset(&lun_mask, 0, sizeof(lun_mask)); + mask_set = 0; + for (i = 0; i < MAX_LUNS_PER_DEVICE; i++) { + l = (uint8_t)(i & 0xFF); + if( path_list->current_path[l] == path->id ) { + EXT_SET_LUN_BIT((&lun_mask),l); + mask_set++; + } + } + if( mask_set && EXT_DEF_MAX_LUNS <= 256 ) { + len += sprintf(PROC_BUF, + "scsi-qla%d-target-%d-path-%d-preferred=%08x%08x%08x%08x%08x%08x%08x%08x;\n", + instance, id, path->id, + *((uint32_t *) &lun_mask.mask[0]), + *((uint32_t *) &lun_mask.mask[4]), + *((uint32_t *) &lun_mask.mask[8]), + *((uint32_t *) &lun_mask.mask[12]), + *((uint32_t *) &lun_mask.mask[16]), + *((uint32_t *) &lun_mask.mask[20]), + *((uint32_t *) &lun_mask.mask[24]), + *((uint32_t *) &lun_mask.mask[28]) ); + } + + len += sprintf(PROC_BUF, + "scsi-qla%d-target-%d-path-%d-lun-enable=%08x%08x%08x%08x%08x%08x%08x%08x;\n", + instance, id, path->id, + *((uint32_t *) &path->lun_data.data[0]), + *((uint32_t *) &path->lun_data.data[4]), + *((uint32_t *) &path->lun_data.data[8]), + *((uint32_t *) &path->lun_data.data[12]), + *((uint32_t *) &path->lun_data.data[16]), + *((uint32_t *) &path->lun_data.data[20]), + *((uint32_t *) &path->lun_data.data[24]), + *((uint32_t *) &path->lun_data.data[28]) ); + + } /* for */ + } + } + } + return( len ); +} +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_dbg.c 999-mjb/drivers/scsi/qla2xxx/qla_dbg.c --- 000-virgin/drivers/scsi/qla2xxx/qla_dbg.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_dbg.c 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,1236 @@ +/* + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ +#include "qla_os.h" + +#include "qla_def.h" + +static int qla_uprintf(char **, char *, ...); + +#if defined(ISP2300) +/** + * qla2x00_fw_dump() - Dumps binary data from the 2300 firmware. + * @ha: HA context + * @hardware_locked: Called with the hardware_lock + */ +void +qla2x00_fw_dump(scsi_qla_host_t *ha, int hardware_locked) +{ + int rval; + uint32_t cnt, timer; + uint32_t risc_address; + uint16_t mb0, mb2; + + uint32_t stat; + device_reg_t *reg; + uint16_t *dmp_reg; + unsigned long flags; + struct fw_dump *fw; + + reg = ha->iobase; + risc_address = 0; + mb0 = mb2 = 0; + flags = 0; + + if (!hardware_locked) + spin_lock_irqsave(&ha->hardware_lock, flags); + + if (ha->fw_dump != NULL) { + qla_printk(KERN_WARNING, ha, + "Firmware has been previously dumped (%p) -- ignoring " + "request...\n", ha->fw_dump); + return; + } + + /* Allocate (large) dump buffer. */ + ha->fw_dump_order = get_order(sizeof(struct fw_dump)); + ha->fw_dump = (struct fw_dump *) __get_free_pages(GFP_ATOMIC, + ha->fw_dump_order); + if (ha->fw_dump == NULL) { + qla_printk(KERN_WARNING, ha, + "Unable to allocated memory for firmware dump (%d/%d).\n", + ha->fw_dump_order, sizeof(struct fw_dump)); + return; + } + fw = ha->fw_dump; + + rval = QLA_SUCCESS; + fw->hccr = RD_REG_WORD(®->hccr); + + /* Pause RISC. */ + WRT_REG_WORD(®->hccr, HCCR_PAUSE_RISC); + if (ha->pdev->device != QLA2312_DEVICE_ID || + ha->pdev->device != QLA2322_DEVICE_ID) { + for (cnt = 30000; + (RD_REG_WORD(®->hccr) & HCCR_RISC_PAUSE) == 0 && + rval == QLA_SUCCESS; cnt--) { + if (cnt) + udelay(100); + else + rval = QLA_FUNCTION_TIMEOUT; + } + } else { + udelay(10); + } + + if (rval == QLA_SUCCESS) { + dmp_reg = (uint16_t *)(reg + 0); + for (cnt = 0; cnt < sizeof(fw->pbiu_reg) / 2; cnt++) + fw->pbiu_reg[cnt] = RD_REG_WORD(dmp_reg++); + + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x10); + for (cnt = 0; cnt < sizeof(fw->risc_host_reg) / 2; cnt++) + fw->risc_host_reg[cnt] = RD_REG_WORD(dmp_reg++); + + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x40); + for (cnt = 0; cnt < sizeof(fw->mailbox_reg) / 2; cnt++) + fw->mailbox_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->ctrl_status, 0x40); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->resp_dma_reg) / 2; cnt++) + fw->resp_dma_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->ctrl_status, 0x50); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->dma_reg) / 2; cnt++) + fw->dma_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->ctrl_status, 0x00); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0xA0); + for (cnt = 0; cnt < sizeof(fw->risc_hdw_reg) / 2; cnt++) + fw->risc_hdw_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->pcr, 0x2000); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->risc_gp0_reg) / 2; cnt++) + fw->risc_gp0_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->pcr, 0x2200); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->risc_gp1_reg) / 2; cnt++) + fw->risc_gp1_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->pcr, 0x2400); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->risc_gp2_reg) / 2; cnt++) + fw->risc_gp2_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->pcr, 0x2600); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->risc_gp3_reg) / 2; cnt++) + fw->risc_gp3_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->pcr, 0x2800); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->risc_gp4_reg) / 2; cnt++) + fw->risc_gp4_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->pcr, 0x2A00); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->risc_gp5_reg) / 2; cnt++) + fw->risc_gp5_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->pcr, 0x2C00); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->risc_gp6_reg) / 2; cnt++) + fw->risc_gp6_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->pcr, 0x2E00); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->risc_gp7_reg) / 2; cnt++) + fw->risc_gp7_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->ctrl_status, 0x10); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->frame_buf_hdw_reg) / 2; cnt++) + fw->frame_buf_hdw_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->ctrl_status, 0x20); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->fpm_b0_reg) / 2; cnt++) + fw->fpm_b0_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->ctrl_status, 0x30); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->fpm_b1_reg) / 2; cnt++) + fw->fpm_b1_reg[cnt] = RD_REG_WORD(dmp_reg++); + + /* Reset RISC. */ + WRT_REG_WORD(®->ctrl_status, CSR_ISP_SOFT_RESET); + for (cnt = 0; cnt < 30000; cnt++) { + if ((RD_REG_WORD(®->ctrl_status) & + CSR_ISP_SOFT_RESET) == 0) + break; + + udelay(10); + } + } + + if (ha->pdev->device != QLA2312_DEVICE_ID || + ha->pdev->device != QLA2322_DEVICE_ID) { + for (cnt = 30000; RD_REG_WORD(®->mailbox0) != 0 && + rval == QLA_SUCCESS; cnt--) { + if (cnt) + udelay(100); + else + rval = QLA_FUNCTION_TIMEOUT; + } + } + + if (rval == QLA_SUCCESS) { + /* Get RISC SRAM. */ + risc_address = 0x800; + WRT_REG_WORD(®->mailbox0, MBC_READ_RAM_WORD); + clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); + } + for (cnt = 0; cnt < sizeof(fw->risc_ram) / 2 && rval == QLA_SUCCESS; + cnt++) { + WRT_REG_WORD(®->mailbox1, (uint16_t)risc_address++); + WRT_REG_WORD(®->hccr, HCCR_SET_HOST_INT); + + for (timer = 6000000; timer; timer--) { + /* Check for pending interrupts. */ + stat = RD_REG_DWORD(®->host_status); + if (stat & HSR_RISC_INT) { + stat &= 0xff; + + if (stat == 0x1 || stat == 0x2) { + set_bit(MBX_INTERRUPT, + &ha->mbx_cmd_flags); + + mb0 = RD_REG_WORD(®->mailbox0); + mb2 = RD_REG_WORD(®->mailbox2); + + /* Release mailbox registers. */ + WRT_REG_WORD(®->semaphore, 0); + WRT_REG_WORD(®->hccr, + HCCR_CLR_RISC_INT); + break; + } else if (stat == 0x10 || stat == 0x11) { + set_bit(MBX_INTERRUPT, + &ha->mbx_cmd_flags); + + mb0 = RD_REG_WORD(®->mailbox0); + mb2 = RD_REG_WORD(®->mailbox2); + + WRT_REG_WORD(®->hccr, + HCCR_CLR_RISC_INT); + break; + } + + /* clear this intr; it wasn't a mailbox intr */ + WRT_REG_WORD(®->hccr, HCCR_CLR_RISC_INT); + } + udelay(5); + } + + if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) { + rval = mb0 & MBS_MASK; + fw->risc_ram[cnt] = mb2; + } else { + rval = QLA_FUNCTION_FAILED; + } + } + + if (rval == QLA_SUCCESS) { + /* Get stack SRAM. */ + risc_address = 0x10000; + WRT_REG_WORD(®->mailbox0, MBC_READ_RAM_EXTENDED); + clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); + } + for (cnt = 0; cnt < sizeof(fw->stack_ram) / 2 && rval == QLA_SUCCESS; + cnt++) { + WRT_REG_WORD(®->mailbox1, LSW(risc_address)); + WRT_REG_WORD(®->mailbox8, MSW(risc_address++)); + WRT_REG_WORD(®->hccr, HCCR_SET_HOST_INT); + + for (timer = 6000000; timer; timer--) { + /* Check for pending interrupts. */ + stat = RD_REG_DWORD(®->host_status); + if (stat & HSR_RISC_INT) { + stat &= 0xff; + + if (stat == 0x1 || stat == 0x2) { + set_bit(MBX_INTERRUPT, + &ha->mbx_cmd_flags); + + mb0 = RD_REG_WORD(®->mailbox0); + mb2 = RD_REG_WORD(®->mailbox2); + + /* Release mailbox registers. */ + WRT_REG_WORD(®->semaphore, 0); + WRT_REG_WORD(®->hccr, + HCCR_CLR_RISC_INT); + break; + } else if (stat == 0x10 || stat == 0x11) { + set_bit(MBX_INTERRUPT, + &ha->mbx_cmd_flags); + + mb0 = RD_REG_WORD(®->mailbox0); + mb2 = RD_REG_WORD(®->mailbox2); + + WRT_REG_WORD(®->hccr, + HCCR_CLR_RISC_INT); + break; + } + + /* clear this intr; it wasn't a mailbox intr */ + WRT_REG_WORD(®->hccr, HCCR_CLR_RISC_INT); + } + udelay(5); + } + + if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) { + rval = mb0 & MBS_MASK; + fw->stack_ram[cnt] = mb2; + } else { + rval = QLA_FUNCTION_FAILED; + } + } + + if (rval == QLA_SUCCESS) { + /* Get data SRAM. */ + risc_address = 0x11000; + WRT_REG_WORD(®->mailbox0, MBC_READ_RAM_EXTENDED); + clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); + } + for (cnt = 0; cnt < sizeof(fw->data_ram) / 2 && rval == QLA_SUCCESS; + cnt++) { + WRT_REG_WORD(®->mailbox1, LSW(risc_address)); + WRT_REG_WORD(®->mailbox8, MSW(risc_address++)); + WRT_REG_WORD(®->hccr, HCCR_SET_HOST_INT); + + for (timer = 6000000; timer; timer--) { + /* Check for pending interrupts. */ + stat = RD_REG_DWORD(®->host_status); + if (stat & HSR_RISC_INT) { + stat &= 0xff; + + if (stat == 0x1 || stat == 0x2) { + set_bit(MBX_INTERRUPT, + &ha->mbx_cmd_flags); + + mb0 = RD_REG_WORD(®->mailbox0); + mb2 = RD_REG_WORD(®->mailbox2); + + /* Release mailbox registers. */ + WRT_REG_WORD(®->semaphore, 0); + WRT_REG_WORD(®->hccr, + HCCR_CLR_RISC_INT); + break; + } else if (stat == 0x10 || stat == 0x11) { + set_bit(MBX_INTERRUPT, + &ha->mbx_cmd_flags); + + mb0 = RD_REG_WORD(®->mailbox0); + mb2 = RD_REG_WORD(®->mailbox2); + + WRT_REG_WORD(®->hccr, + HCCR_CLR_RISC_INT); + break; + } + + /* clear this intr; it wasn't a mailbox intr */ + WRT_REG_WORD(®->hccr, HCCR_CLR_RISC_INT); + } + udelay(5); + } + + if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) { + rval = mb0 & MBS_MASK; + fw->data_ram[cnt] = mb2; + } else { + rval = QLA_FUNCTION_FAILED; + } + } + + + if (rval != QLA_SUCCESS) { + qla_printk(KERN_WARNING, ha, + "Failed to dump firmware (%d)!!!\n", rval); + + free_pages((unsigned long)ha->fw_dump, ha->fw_dump_order); + ha->fw_dump = NULL; + } else { + qla_printk(KERN_INFO, ha, + "Firmware dump saved to temp buffer (%ld/%p).\n", + ha->host_no, ha->fw_dump); + } + + if (!hardware_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); +} + +/** + * qla2x00_ascii_fw_dump() - Converts a binary firmware dump to ASCII. + * @ha: HA context + */ +void +qla2x00_ascii_fw_dump(scsi_qla_host_t *ha) +{ + uint32_t cnt; + char *uiter; + char fw_info[30]; + struct fw_dump *fw; + + uiter = ha->fw_dump_buffer; + fw = ha->fw_dump; + + qla_uprintf(&uiter, "%s Firmware Version %s\n", ha->brd_info->name, + qla2x00_get_fw_version_str(ha, fw_info)); + + qla_uprintf(&uiter, "\n[==>BEG]\n"); + + qla_uprintf(&uiter, "HCCR Register:\n%04x\n\n", fw->hccr); + + qla_uprintf(&uiter, "PBIU Registers:"); + for (cnt = 0; cnt < sizeof (fw->pbiu_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->pbiu_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nReqQ-RspQ-Risc2Host Status registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_host_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_host_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nMailbox Registers:"); + for (cnt = 0; cnt < sizeof (fw->mailbox_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->mailbox_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nAuto Request Response DMA Registers:"); + for (cnt = 0; cnt < sizeof (fw->resp_dma_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->resp_dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nDMA Registers:"); + for (cnt = 0; cnt < sizeof (fw->dma_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC Hardware Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_hdw_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_hdw_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP0 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp0_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp0_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP1 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp1_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp1_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP2 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp2_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp2_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP3 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp3_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp3_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP4 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp4_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp4_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP5 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp5_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp5_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP6 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp6_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp6_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP7 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp7_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp7_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nFrame Buffer Hardware Registers:"); + for (cnt = 0; cnt < sizeof (fw->frame_buf_hdw_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->frame_buf_hdw_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nFPM B0 Registers:"); + for (cnt = 0; cnt < sizeof (fw->fpm_b0_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->fpm_b0_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nFPM B1 Registers:"); + for (cnt = 0; cnt < sizeof (fw->fpm_b1_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->fpm_b1_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nCode RAM Dump:"); + for (cnt = 0; cnt < sizeof (fw->risc_ram) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n%04x: ", cnt + 0x0800); + } + qla_uprintf(&uiter, "%04x ", fw->risc_ram[cnt]); + } + + qla_uprintf(&uiter, "\n\nStack RAM Dump:"); + for (cnt = 0; cnt < sizeof (fw->stack_ram) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n%05x: ", cnt + 0x10000); + } + qla_uprintf(&uiter, "%04x ", fw->stack_ram[cnt]); + } + + qla_uprintf(&uiter, "\n\nData RAM Dump:"); + for (cnt = 0; cnt < sizeof (fw->data_ram) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n%05x: ", cnt + 0x11000); + } + qla_uprintf(&uiter, "%04x ", fw->data_ram[cnt]); + } + + qla_uprintf(&uiter, "\n\n[<==END] ISP Debug Dump."); +} + +#else + +/** + * qla2x00_fw_dump() - Dumps binary data from the 2100/2200 firmware. + * @ha: HA context + * @hardware_locked: Called with the hardware_lock + */ +void +qla2x00_fw_dump(scsi_qla_host_t *ha, int hardware_locked) +{ + int rval; + uint32_t cnt, timer; + uint32_t risc_address; + uint16_t mb0, mb2; + + device_reg_t *reg; + uint16_t *dmp_reg; + unsigned long flags; + struct fw_dump *fw; + + reg = ha->iobase; + risc_address = 0; + mb0 = mb2 = 0; + flags = 0; + + if (!hardware_locked) + spin_lock_irqsave(&ha->hardware_lock, flags); + + if (ha->fw_dump != NULL) { + qla_printk(KERN_WARNING, ha, + "Firmware has been previously dumped (%p) -- ignoring " + "request...\n", ha->fw_dump); + return; + } + + /* Allocate (large) dump buffer. */ + ha->fw_dump_order = get_order(sizeof(struct fw_dump)); + ha->fw_dump = (struct fw_dump *) __get_free_pages(GFP_ATOMIC, + ha->fw_dump_order); + if (ha->fw_dump == NULL) { + qla_printk(KERN_WARNING, ha, + "Unable to allocated memory for firmware dump (%d/%d).\n", + ha->fw_dump_order, sizeof(struct fw_dump)); + return; + } + fw = ha->fw_dump; + + rval = QLA_SUCCESS; + fw->hccr = RD_REG_WORD(®->hccr); + + /* Pause RISC. */ + WRT_REG_WORD(®->hccr, HCCR_PAUSE_RISC); + for (cnt = 30000; (RD_REG_WORD(®->hccr) & HCCR_RISC_PAUSE) == 0 && + rval == QLA_SUCCESS; cnt--) { + if (cnt) + udelay(100); + else + rval = QLA_FUNCTION_TIMEOUT; + } + + if (rval == QLA_SUCCESS) { + dmp_reg = (uint16_t *)(reg + 0); + for (cnt = 0; cnt < sizeof(fw->pbiu_reg) / 2; cnt++) + fw->pbiu_reg[cnt] = RD_REG_WORD(dmp_reg++); + + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x10); + for (cnt = 0; cnt < sizeof(fw->mailbox_reg) / 2; cnt++) { + if (cnt == 8) { + dmp_reg = (uint16_t *)((uint8_t *)reg + 0xe0); + } + fw->mailbox_reg[cnt] = RD_REG_WORD(dmp_reg++); + } + + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x20); + for (cnt = 0; cnt < sizeof(fw->dma_reg) / 2; cnt++) + fw->dma_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->ctrl_status, 0x00); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0xA0); + for (cnt = 0; cnt < sizeof(fw->risc_hdw_reg) / 2; cnt++) + fw->risc_hdw_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->pcr, 0x2000); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->risc_gp0_reg) / 2; cnt++) + fw->risc_gp0_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->pcr, 0x2100); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->risc_gp1_reg) / 2; cnt++) + fw->risc_gp1_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->pcr, 0x2200); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->risc_gp2_reg) / 2; cnt++) + fw->risc_gp2_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->pcr, 0x2300); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->risc_gp3_reg) / 2; cnt++) + fw->risc_gp3_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->pcr, 0x2400); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->risc_gp4_reg) / 2; cnt++) + fw->risc_gp4_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->pcr, 0x2500); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->risc_gp5_reg) / 2; cnt++) + fw->risc_gp5_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->pcr, 0x2600); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->risc_gp6_reg) / 2; cnt++) + fw->risc_gp6_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->pcr, 0x2700); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->risc_gp7_reg) / 2; cnt++) + fw->risc_gp7_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->ctrl_status, 0x10); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->frame_buf_hdw_reg) / 2; cnt++) + fw->frame_buf_hdw_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->ctrl_status, 0x20); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->fpm_b0_reg) / 2; cnt++) + fw->fpm_b0_reg[cnt] = RD_REG_WORD(dmp_reg++); + + WRT_REG_WORD(®->ctrl_status, 0x30); + dmp_reg = (uint16_t *)((uint8_t *)reg + 0x80); + for (cnt = 0; cnt < sizeof(fw->fpm_b1_reg) / 2; cnt++) + fw->fpm_b1_reg[cnt] = RD_REG_WORD(dmp_reg++); + + /* Disable ISP interrupts. */ + WRT_REG_WORD(®->ictrl, 0); + + /* Reset RISC module. */ + WRT_REG_WORD(®->hccr, HCCR_RESET_RISC); + + /* Release RISC module. */ + WRT_REG_WORD(®->hccr, HCCR_RELEASE_RISC); + + /* Insure mailbox registers are free. */ + WRT_REG_WORD(®->hccr, HCCR_CLR_RISC_INT); + WRT_REG_WORD(®->hccr, HCCR_CLR_HOST_INT); + } + + for (cnt = 30000; RD_REG_WORD(®->mailbox0) != 0 && + rval == QLA_SUCCESS; cnt--) { + if (cnt) + udelay(100); + else + rval = QLA_FUNCTION_TIMEOUT; + } + + /* Pause RISC. */ + if (rval == QLA_SUCCESS && (ha->pdev->device == QLA2200_DEVICE_ID || + (ha->pdev->device == QLA2100_DEVICE_ID && + (RD_REG_WORD(®->mctr) & (BIT_1 | BIT_0)) != 0))) { + + WRT_REG_WORD(®->hccr, HCCR_PAUSE_RISC); + for (cnt = 30000; + (RD_REG_WORD(®->hccr) & HCCR_RISC_PAUSE) == 0 && + rval == QLA_SUCCESS; cnt--) { + if (cnt) + udelay(100); + else + rval = QLA_FUNCTION_TIMEOUT; + } + + if (rval == QLA_SUCCESS) { + /* Set memory configuration and timing. */ + if (ha->pdev->device == QLA2100_DEVICE_ID) + WRT_REG_WORD(®->mctr, 0xf1); + else + WRT_REG_WORD(®->mctr, 0xf2); + + /* Release RISC. */ + WRT_REG_WORD(®->hccr, HCCR_RELEASE_RISC); + } + } + + if (rval == QLA_SUCCESS) { + /* Get RISC SRAM. */ + risc_address = 0x1000; + WRT_REG_WORD(®->mailbox0, MBC_READ_RAM_WORD); + clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); + } + for (cnt = 0; cnt < sizeof(fw->risc_ram) / 2 && rval == QLA_SUCCESS; + cnt++) { + WRT_REG_WORD(®->mailbox1, (uint16_t)risc_address++); + WRT_REG_WORD(®->hccr, HCCR_SET_HOST_INT); + + for (timer = 6000000; timer != 0; timer--) { + /* Check for pending interrupts. */ + if (RD_REG_WORD(®->istatus) & ISR_RISC_INT) { + if (RD_REG_WORD(®->semaphore) & BIT_0) { + set_bit(MBX_INTERRUPT, + &ha->mbx_cmd_flags); + + mb0 = RD_REG_WORD(®->mailbox0); + mb2 = RD_REG_WORD(®->mailbox2); + + WRT_REG_WORD(®->semaphore, 0); + WRT_REG_WORD(®->hccr, + HCCR_CLR_RISC_INT); + break; + } + WRT_REG_WORD(®->hccr, HCCR_CLR_RISC_INT); + } + udelay(5); + } + + if (test_and_clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags)) { + rval = mb0 & MBS_MASK; + fw->risc_ram[cnt] = mb2; + } else { + rval = QLA_FUNCTION_FAILED; + } + } + + if (rval != QLA_SUCCESS) { + qla_printk(KERN_WARNING, ha, + "Failed to dump firmware (%d)!!!\n", rval); + + free_pages((unsigned long)ha->fw_dump, ha->fw_dump_order); + ha->fw_dump = NULL; + } else { + qla_printk(KERN_INFO, ha, + "Firmware dump saved to temp buffer (%ld/%p).\n", + ha->host_no, ha->fw_dump); + } + + if (!hardware_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); +} + +/** + * qla2x00_ascii_fw_dump() - Converts a binary firmware dump to ASCII. + * @ha: HA context + */ +void +qla2x00_ascii_fw_dump(scsi_qla_host_t *ha) +{ + uint32_t cnt; + char *uiter; + char fw_info[30]; + struct fw_dump *fw; + + uiter = ha->fw_dump_buffer; + fw = ha->fw_dump; + + qla_uprintf(&uiter, "%s Firmware Version %s\n", ha->brd_info->name, + qla2x00_get_fw_version_str(ha, fw_info)); + + qla_uprintf(&uiter, "\n[==>BEG]\n"); + + qla_uprintf(&uiter, "HCCR Register:\n%04x\n\n", fw->hccr); + + qla_uprintf(&uiter, "PBIU Registers:"); + for (cnt = 0; cnt < sizeof (fw->pbiu_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->pbiu_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nMailbox Registers:"); + for (cnt = 0; cnt < sizeof (fw->mailbox_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->mailbox_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nDMA Registers:"); + for (cnt = 0; cnt < sizeof (fw->dma_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->dma_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC Hardware Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_hdw_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_hdw_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP0 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp0_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp0_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP1 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp1_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp1_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP2 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp2_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp2_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP3 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp3_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp3_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP4 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp4_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp4_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP5 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp5_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp5_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP6 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp6_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp6_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC GP7 Registers:"); + for (cnt = 0; cnt < sizeof (fw->risc_gp7_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->risc_gp7_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nFrame Buffer Hardware Registers:"); + for (cnt = 0; cnt < sizeof (fw->frame_buf_hdw_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->frame_buf_hdw_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nFPM B0 Registers:"); + for (cnt = 0; cnt < sizeof (fw->fpm_b0_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->fpm_b0_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nFPM B1 Registers:"); + for (cnt = 0; cnt < sizeof (fw->fpm_b1_reg) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n"); + } + qla_uprintf(&uiter, "%04x ", fw->fpm_b1_reg[cnt]); + } + + qla_uprintf(&uiter, "\n\nRISC SRAM:"); + for (cnt = 0; cnt < sizeof (fw->risc_ram) / 2; cnt++) { + if (cnt % 8 == 0) { + qla_uprintf(&uiter, "\n%04x: ", cnt + 0x1000); + } + qla_uprintf(&uiter, "%04x ", fw->risc_ram[cnt]); + } + + qla_uprintf(&uiter, "\n\n[<==END] ISP Debug Dump."); + + return; +} +#endif /* if defined(ISP2300) */ + +static int +qla_uprintf(char **uiter, char *fmt, ...) +{ + int iter, len; + char buf[128]; + va_list args; + + va_start(args, fmt); + len = vsprintf(buf, fmt, args); + va_end(args); + + for (iter = 0; iter < len; iter++, *uiter += 1) + *uiter[0] = buf[iter]; + + return (len); +} + +//FIXME + +/****************************************************************************/ +/* Driver Debug Functions. */ +/****************************************************************************/ + +void +qla2x00_dump_regs(scsi_qla_host_t *ha) +{ + device_reg_t *reg; + + reg = ha->iobase; + + printk("Mailbox registers:\n"); + printk("scsi(%ld): mbox 0 0x%04x \n", + ha->host_no, RD_REG_WORD(®->mailbox0)); + printk("scsi(%ld): mbox 1 0x%04x \n", + ha->host_no, RD_REG_WORD(®->mailbox1)); + printk("scsi(%ld): mbox 2 0x%04x \n", + ha->host_no, RD_REG_WORD(®->mailbox2)); + printk("scsi(%ld): mbox 3 0x%04x \n", + ha->host_no, RD_REG_WORD(®->mailbox3)); + printk("scsi(%ld): mbox 4 0x%04x \n", + ha->host_no, RD_REG_WORD(®->mailbox4)); + printk("scsi(%ld): mbox 5 0x%04x \n", + ha->host_no, RD_REG_WORD(®->mailbox5)); +} + + +void +qla2x00_dump_buffer(uint8_t * b, uint32_t size) +{ + uint32_t cnt; + uint8_t c; + + printk(" 0 1 2 3 4 5 6 7 8 9 " + "Ah Bh Ch Dh Eh Fh\n"); + printk("----------------------------------------" + "----------------------\n"); + + for (cnt = 0; cnt < size;) { + c = *b++; + printk("%02x",(uint32_t) c); + cnt++; + if (!(cnt % 16)) + printk("\n"); + else + printk(" "); + } + if (cnt % 16) + printk("\n"); +} + +/************************************************************************** + * qla2x00_print_scsi_cmd + * Dumps out info about the scsi cmd and srb. + * Input + * cmd : struct scsi_cmnd + **************************************************************************/ +void +qla2x00_print_scsi_cmd(struct scsi_cmnd * cmd) +{ + int i; + struct scsi_qla_host *ha; + srb_t *sp; + + ha = (struct scsi_qla_host *)cmd->device->host->hostdata; + + sp = (srb_t *) cmd->SCp.ptr; + printk("SCSI Command @=0x%p, Handle=0x%p\n", cmd, cmd->host_scribble); + printk(" chan=0x%02x, target=0x%02x, lun=0x%02x, cmd_len=0x%02x\n", + cmd->device->channel, cmd->device->id, cmd->device->lun, + cmd->cmd_len); + printk(" CDB: "); + for (i = 0; i < cmd->cmd_len; i++) { + printk("0x%02x ", cmd->cmnd[i]); + } + printk("\n seg_cnt=%d, allowed=%d, retries=%d, " + "serial_number_at_timeout=0x%lx\n", + cmd->use_sg, cmd->allowed, cmd->retries, + cmd->serial_number_at_timeout); + printk(" request buffer=0x%p, request buffer len=0x%x\n", + cmd->request_buffer, cmd->request_bufflen); + printk(" tag=%d, transfersize=0x%x\n", + cmd->tag, cmd->transfersize); + printk(" serial_number=%lx, SP=%p\n", cmd->serial_number, sp); + printk(" data direction=%d\n", cmd->sc_data_direction); + + if (!sp) + return; + + printk(" sp flags=0x%x\n", sp->flags); + printk(" r_start=0x%lx, u_start=0x%lx, f_start=0x%lx, state=%d\n", + sp->r_start, sp->u_start, sp->f_start, sp->state); + + printk(" e_start= 0x%lx, ext_history=%d, fo retry=%d, loopid=%x, " + "port path=%d\n", sp->e_start, sp->ext_history, sp->fo_retry_cnt, + sp->lun_queue->fclun->fcport->loop_id, + sp->lun_queue->fclun->fcport->cur_path); +} + +/* + * qla2x00_print_q_info + * Prints queue info + * Input + * q: lun queue + */ +void +qla2x00_print_q_info(struct os_lun *q) +{ + printk("Queue info: flags=0x%lx\n", q->q_flag); +} + +#if defined(QL_DEBUG_ROUTINES) +/* + * qla2x00_formatted_dump_buffer + * Prints string plus buffer. + * + * Input: + * string = Null terminated string (no newline at end). + * buffer = buffer address. + * wd_size = word size 8, 16, 32 or 64 bits + * count = number of words. + */ +void +qla2x00_formatted_dump_buffer(char *string, uint8_t * buffer, + uint8_t wd_size, uint32_t count) +{ + uint32_t cnt; + uint16_t *buf16; + uint32_t *buf32; + + if (strcmp(string, "") != 0) + printk("%s\n",string); + + switch (wd_size) { + case 8: + printk(" 0 1 2 3 4 5 6 7 " + "8 9 Ah Bh Ch Dh Eh Fh\n"); + printk("-----------------------------------------" + "-------------------------------------\n"); + + for (cnt = 1; cnt <= count; cnt++, buffer++) { + printk("%02x",*buffer); + if (cnt % 16 == 0) + printk("\n"); + else + printk(" "); + } + if (cnt % 16 != 0) + printk("\n"); + break; + case 16: + printk(" 0 2 4 6 8 Ah " + " Ch Eh\n"); + printk("-----------------------------------------" + "-------------\n"); + + buf16 = (uint16_t *) buffer; + for (cnt = 1; cnt <= count; cnt++, buf16++) { + printk("%4x",*buf16); + + if (cnt % 8 == 0) + printk("\n"); + else if (*buf16 < 10) + printk(" "); + else + printk(" "); + } + if (cnt % 8 != 0) + printk("\n"); + break; + case 32: + printk(" 0 4 8 Ch\n"); + printk("------------------------------------------\n"); + + buf32 = (uint32_t *) buffer; + for (cnt = 1; cnt <= count; cnt++, buf32++) { + printk("%8x", *buf32); + + if (cnt % 4 == 0) + printk("\n"); + else if (*buf32 < 10) + printk(" "); + else + printk(" "); + } + if (cnt % 4 != 0) + printk("\n"); + break; + default: + break; + } +} + +#endif + + +#if STOP_ON_ERROR +/************************************************************************** +* qla2x00_panic +* +**************************************************************************/ +static void +qla2x00_panic(char *cp, struct Scsi_Host *host) +{ + struct scsi_qla_host *ha; + long *fp; + + ha = (struct scsi_qla_host *) host->hostdata; + DEBUG2(ql2x_debug_print = 1;); + printk("qla2100 - PANIC: %s\n", cp); + printk("Current time=0x%lx\n", jiffies); + printk("Number of pending commands =0x%lx\n", ha->actthreads); + printk("Number of queued commands =0x%lx\n", ha->qthreads); + printk("Number of free entries = (%d)\n", ha->req_q_cnt); + printk("Request Queue @ 0x%lx, Response Queue @ 0x%lx\n", + ha->request_dma, ha->response_dma); + printk("Request In Ptr %d\n", ha->req_ring_index); + fp = (long *) &ha->flags; + printk("HA flags =0x%lx\n", *fp); + qla2x00_dump_requests(ha); + qla2x00_dump_regs(ha); + cli(); + for (;;) { + udelay(2); + barrier(); + /* cpu_relax();*/ + } + sti(); +} + +#endif + +/************************************************************************** +* qla2x00_dump_requests +* +**************************************************************************/ +void +qla2x00_dump_requests(scsi_qla_host_t *ha) +{ + + struct scsi_cmnd *cp; + srb_t *sp; + int i; + + printk("Outstanding Commands on controller:\n"); + + for (i = 1; i < MAX_OUTSTANDING_COMMANDS; i++) { + if ((sp = ha->outstanding_cmds[i]) == NULL) + continue; + if ((cp = sp->cmd) == NULL) + continue; + + printk("(%d): Pid=%ld, sp flags=0x%x, cmd=0x%p\n", + i, sp->cmd->serial_number, sp->flags, CMD_SP(sp->cmd)); + } +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_dbg.h 999-mjb/drivers/scsi/qla2xxx/qla_dbg.h --- 000-virgin/drivers/scsi/qla2xxx/qla_dbg.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_dbg.h 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,205 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + +/* + * Firmware Dump structure definition + */ +#define FW_DUMP_SIZE 0xBC000 /* bytes */ + +#if defined(ISP2300) +struct fw_dump { + uint16_t hccr; + uint16_t pbiu_reg[8]; + uint16_t risc_host_reg[8]; + uint16_t mailbox_reg[32]; + uint16_t resp_dma_reg[32]; + uint16_t dma_reg[48]; + uint16_t risc_hdw_reg[16]; + uint16_t risc_gp0_reg[16]; + uint16_t risc_gp1_reg[16]; + uint16_t risc_gp2_reg[16]; + uint16_t risc_gp3_reg[16]; + uint16_t risc_gp4_reg[16]; + uint16_t risc_gp5_reg[16]; + uint16_t risc_gp6_reg[16]; + uint16_t risc_gp7_reg[16]; + uint16_t frame_buf_hdw_reg[64]; + uint16_t fpm_b0_reg[64]; + uint16_t fpm_b1_reg[64]; + uint16_t risc_ram[0xf800]; + uint16_t stack_ram[0x1000]; + uint16_t data_ram[0xF000]; +}; +#else /* defined(ISP2300) */ +struct fw_dump { + uint16_t hccr; + uint16_t pbiu_reg[8]; +#if defined(ISP2200) + uint16_t mailbox_reg[32]; +#else + uint16_t mailbox_reg[8]; +#endif + uint16_t dma_reg[48]; + uint16_t risc_hdw_reg[16]; + uint16_t risc_gp0_reg[16]; + uint16_t risc_gp1_reg[16]; + uint16_t risc_gp2_reg[16]; + uint16_t risc_gp3_reg[16]; + uint16_t risc_gp4_reg[16]; + uint16_t risc_gp5_reg[16]; + uint16_t risc_gp6_reg[16]; + uint16_t risc_gp7_reg[16]; + uint16_t frame_buf_hdw_reg[16]; + uint16_t fpm_b0_reg[64]; + uint16_t fpm_b1_reg[64]; + uint16_t risc_ram[0xf000]; +}; +#endif /* defined(ISP2300) */ + +/* +* Macros use for debugging the driver. +*/ +#undef ENTER_TRACE +#if defined(ENTER_TRACE) +#define ENTER(x) do { printk("qla2100 : Entering %s()\n", x); } while (0) +#define LEAVE(x) do { printk("qla2100 : Leaving %s()\n", x); } while (0) +#define ENTER_INTR(x) do { printk("qla2100 : Entering %s()\n", x); } while (0) +#define LEAVE_INTR(x) do { printk("qla2100 : Leaving %s()\n", x); } while (0) +#else +#define ENTER(x) do {} while (0) +#define LEAVE(x) do {} while (0) +#define ENTER_INTR(x) do {} while (0) +#define LEAVE_INTR(x) do {} while (0) +#endif + +#if DEBUG_QLA2100 +#define DEBUG(x) do {x;} while (0); +#else +#define DEBUG(x) do {} while (0); +#endif + +#if defined(QL_DEBUG_LEVEL_1) +#define DEBUG1(x) do {x;} while (0); +#else +#define DEBUG1(x) do {} while (0); +#endif + +#if defined(QL_DEBUG_LEVEL_2) +#define DEBUG2(x) do {x;} while (0); +#define DEBUG2_3(x) do {x;} while (0); +#define DEBUG2_3_11(x) do {x;} while (0); +#define DEBUG2_9_10(x) do {x;} while (0); +#define DEBUG2_11(x) do {x;} while (0); +#else +#define DEBUG2(x) do {} while (0); +#endif + +#if defined(QL_DEBUG_LEVEL_3) +#define DEBUG3(x) do {x;} while (0); +#define DEBUG2_3(x) do {x;} while (0); +#define DEBUG2_3_11(x) do {x;} while (0); +#define DEBUG3_11(x) do {x;} while (0); +#else +#define DEBUG3(x) do {} while (0); + #if !defined(QL_DEBUG_LEVEL_2) + #define DEBUG2_3(x) do {} while (0); + #endif +#endif + +#if defined(QL_DEBUG_LEVEL_4) +#define DEBUG4(x) do {x;} while (0); +#else +#define DEBUG4(x) do {} while (0); +#endif + +#if defined(QL_DEBUG_LEVEL_5) +#define DEBUG5(x) do {x;} while (0); +#else +#define DEBUG5(x) do {} while (0); +#endif + +#if defined(QL_DEBUG_LEVEL_7) +#define DEBUG7(x) do {x;} while (0); +#else +#define DEBUG7(x) do {} while (0); +#endif + +#if defined(QL_DEBUG_LEVEL_9) +#define DEBUG9(x) do {x;} while (0); +#define DEBUG9_10(x) do {x;} while (0); +#define DEBUG2_9_10(x) do {x;} while (0); +#else +#define DEBUG9(x) do {} while (0); +#endif + +#if defined(QL_DEBUG_LEVEL_10) +#define DEBUG10(x) do {x;} while (0); +#define DEBUG2_9_10(x) do {x;} while (0); +#define DEBUG9_10(x) do {x;} while (0); +#else +#define DEBUG10(x) do {} while (0); + #if !defined(DEBUG2_9_10) + #define DEBUG2_9_10(x) do {} while (0); + #endif + #if !defined(DEBUG9_10) + #define DEBUG9_10(x) do {} while (0); + #endif +#endif + +#if defined(QL_DEBUG_LEVEL_11) +#define DEBUG11(x) do{x;} while(0); +#if !defined(DEBUG2_11) +#define DEBUG2_11(x) do{x;} while(0); +#endif +#if !defined(DEBUG2_3_11) +#define DEBUG2_3_11(x) do{x;} while(0); +#endif +#if !defined(DEBUG3_11) +#define DEBUG3_11(x) do{x;} while(0); +#endif +#else +#define DEBUG11(x) do{} while(0); + #if !defined(QL_DEBUG_LEVEL_2) + #define DEBUG2_11(x) do{} while(0); + #if !defined(QL_DEBUG_LEVEL_3) + #define DEBUG2_3_11(x) do{} while(0); + #endif + #endif + #if !defined(QL_DEBUG_LEVEL_3) + #define DEBUG3_11(x) do{} while(0); + #endif +#endif + +#if defined(QL_DEBUG_LEVEL_12) +#define DEBUG12(x) do {x;} while (0); +#else +#define DEBUG12(x) do {} while (0); +#endif + +#if defined(QL_DEBUG_LEVEL_13) +#define DEBUG13(x) do {x;} while (0) +#else +#define DEBUG13(x) do {} while (0) +#endif + +#if defined(QL_DEBUG_LEVEL_14) +#define DEBUG14(x) do {x;} while (0) +#else +#define DEBUG14(x) do {} while (0) +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_def.h 999-mjb/drivers/scsi/qla2xxx/qla_def.h --- 000-virgin/drivers/scsi/qla2xxx/qla_def.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_def.h 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,2495 @@ +/******************************************************************************** +* QLOGIC LINUX SOFTWARE +* +* QLogic ISP2x00 device driver for Linux 2.6.x +* Copyright (C) 2003 QLogic Corporation +* (www.qlogic.com) +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2, or (at your option) any +* later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +** +******************************************************************************/ + +#ifndef __QLA_DEF_H +#define __QLA_DEF_H + +#if defined(qla23xx) + #define MAILBOX_REGISTER_COUNT 32 + #define ISP_NAME "23xx" + #define DRIVER_NAME "qla2300" + #define ISP2300 + #undef ISP2322 + #define EXTENDED_IDS +#elif defined(qla22xx) + #define MAILBOX_REGISTER_COUNT 32 + #define ISP_NAME "22xx" + #define DRIVER_NAME "qla2200" + #define ISP2200 +#elif defined(qla21xx) + #define MAILBOX_REGISTER_COUNT 8 + #define ISP_NAME "21xx" + #define DRIVER_NAME "qla2100" + #define ISP2100 +#else +#warning Please define an ISP type for compilation!!! +#endif + +/*****************************************/ +/* ISP Boards supported by this driver */ +/*****************************************/ +#define QLA2X00_VENDOR_ID 0x1077 + +#define QLA2100_DEVICE_ID 0x2100 + +#define QLA2200_DEVICE_ID 0x2200 +#define QLA2200A_RISC_ROM_VER 4 + +#define QLA2300_DEVICE_ID 0x2300 +#define QLA2312_DEVICE_ID 0x2312 +#define QLA2322_DEVICE_ID 0x2322 +#define FPM_2300 6 +#define FPM_2310 7 + +#include "qla_settings.h" +#include "exioct.h" +#include "inioct.h" + +/* + * Data bit definitions + */ +#define BIT_0 0x1 +#define BIT_1 0x2 +#define BIT_2 0x4 +#define BIT_3 0x8 +#define BIT_4 0x10 +#define BIT_5 0x20 +#define BIT_6 0x40 +#define BIT_7 0x80 +#define BIT_8 0x100 +#define BIT_9 0x200 +#define BIT_10 0x400 +#define BIT_11 0x800 +#define BIT_12 0x1000 +#define BIT_13 0x2000 +#define BIT_14 0x4000 +#define BIT_15 0x8000 +#define BIT_16 0x10000 +#define BIT_17 0x20000 +#define BIT_18 0x40000 +#define BIT_19 0x80000 +#define BIT_20 0x100000 +#define BIT_21 0x200000 +#define BIT_22 0x400000 +#define BIT_23 0x800000 +#define BIT_24 0x1000000 +#define BIT_25 0x2000000 +#define BIT_26 0x4000000 +#define BIT_27 0x8000000 +#define BIT_28 0x10000000 +#define BIT_29 0x20000000 +#define BIT_30 0x40000000 +#define BIT_31 0x80000000 + +#define LSB(x) ((uint8_t)(x)) +#define MSB(x) ((uint8_t)((uint16_t)(x) >> 8)) + +#define LSW(x) ((uint16_t)(x)) +#define MSW(x) ((uint16_t)((uint32_t)(x) >> 16)) + +#define LSD(x) ((uint32_t)((uint64_t)(x))) +#define MSD(x) ((uint32_t)((((uint64_t)(x)) >> 16) >> 16)) + + +/* + * I/O register +*/ + +#if MEMORY_MAPPED_IO +#define RD_REG_BYTE(addr) readb(addr) +#define RD_REG_WORD(addr) readw(addr) +#define RD_REG_DWORD(addr) readl(addr) +#define WRT_REG_BYTE(addr, data) writeb(data,addr) +#define WRT_REG_WORD(addr, data) writew(data,addr) +#define WRT_REG_DWORD(addr, data) writel(data,addr) +#else /* MEMORY_MAPPED_IO */ +#define RD_REG_BYTE(addr) (inb((unsigned long)addr)) +#define RD_REG_WORD(addr) (inw((unsigned long)addr)) +#define RD_REG_DWORD(addr) (inl((unsigned long)addr)) +#define WRT_REG_BYTE(addr, data) (outb(data,(unsigned long)addr)) +#define WRT_REG_WORD(addr, data) (outw(data,(unsigned long)addr)) +#define WRT_REG_DWORD(addr, data) (outl(data,(unsigned long)addr)) +#endif /* MEMORY_MAPPED_IO */ + +/* + * Fibre Channel device definitions. + */ +#define WWN_SIZE 8 /* Size of WWPN, WWN & WWNN */ +#define MAX_FIBRE_DEVICES 512 +#define MAX_FIBRE_LUNS 256 +#define MAX_RSCN_COUNT 32 +#define MAX_HOST_COUNT 16 + +/* + * Host adapter default definitions. + */ +#define MAX_BUSES 1 /* We only have one bus today */ +#define MAX_TARGETS_2100 MAX_FIBRE_DEVICES +#define MAX_TARGETS_2200 MAX_FIBRE_DEVICES +#define MAX_TARGETS MAX_FIBRE_DEVICES +#define MIN_LUNS 8 +#define MAX_LUNS MAX_FIBRE_LUNS +#define MAX_CMDS_PER_LUN 255 + +/* + * Fibre Channel device definitions. + */ +#if defined(EXTENDED_IDS) +#define SNS_LAST_LOOP_ID 0x7ff +#else +#define SNS_LAST_LOOP_ID 0xfe +#endif + +#define LAST_LOCAL_LOOP_ID 0x7d +#define SNS_FL_PORT 0x7e +#define FABRIC_CONTROLLER 0x7f +#define SIMPLE_NAME_SERVER 0x80 +#define SNS_FIRST_LOOP_ID 0x81 +#define MANAGEMENT_SERVER 0xfe +#define BROADCAST 0xff + +#define RESERVED_LOOP_ID(x) ((x > LAST_LOCAL_LOOP_ID && \ + x < SNS_FIRST_LOOP_ID) || \ + x == MANAGEMENT_SERVER || \ + x == BROADCAST) + +/* + * Timeout timer counts in seconds + */ +#define PORT_RETRY_TIME 2 +#define LOOP_DOWN_TIMEOUT 60 +#define LOOP_DOWN_TIME 255 /* 240 */ +#define LOOP_DOWN_RESET (LOOP_DOWN_TIME - 30) + +/* Maximum outstanding commands in ISP queues (1-65535) */ +#define MAX_OUTSTANDING_COMMANDS 1024 + +/* ISP request and response entry counts (37-65535) */ +#define REQUEST_ENTRY_CNT 1024 /* Number of request entries. */ +#if defined(ISP2100) || defined(ISP2200) +#define RESPONSE_ENTRY_CNT 64 /* Number of response entries.*/ +#else +#define RESPONSE_ENTRY_CNT 512 /* Number of response entries.*/ +#endif + +/* Calculations for SG segments */ +#define SEGS_PER_REQUEST_32 3 +#define SEGS_PER_CONT_32 7 +#define SG_SEGMENTS_32 (SEGS_PER_REQUEST_32 + \ + (SEGS_PER_CONT_32 * (REQUEST_ENTRY_CNT - 2))) +#define SEGS_PER_REQUEST_64 2 +#define SEGS_PER_CONT_64 5 +#define SG_SEGMENTS_64 (SEGS_PER_REQUEST_64 + \ + (SEGS_PER_CONT_64 * (REQUEST_ENTRY_CNT - 2))) + +/* + * SCSI Request Block + */ +typedef struct srb { + struct list_head list; + + struct scsi_qla_host *ha; /* HA the SP is queued on */ + + struct scsi_cmnd *cmd; /* Linux SCSI command pkt */ + + struct timer_list timer; /* Command timer */ + atomic_t ref_count; /* Reference count for this structure */ + uint16_t flags; + + /* Request state */ + uint16_t state; + + /* Target/LUN queue pointers. */ + struct os_tgt *tgt_queue; /* ptr to visible ha's target */ + struct os_lun *lun_queue; /* ptr to visible ha's lun */ + struct fc_lun *fclun; /* FC LUN context pointer. */ + + /* Timing counts. */ + unsigned long e_start; /* Start of extend timeout */ + unsigned long r_start; /* Start of request */ + unsigned long u_start; /* When sent to RISC */ + unsigned long f_start; /* When placed in FO queue*/ + + /* Single transfer DMA context */ + dma_addr_t dma_handle; + + uint32_t request_sense_length; + uint8_t *request_sense_ptr; + + int ext_history; + + /* Suspend delay */ + int delay; + + /* Raw completion info for use by failover ? */ + uint8_t fo_retry_cnt; /* Retry count this request */ + uint8_t err_id; /* error id */ + + /* SRB magic number */ + uint16_t magic; +#define SRB_MAGIC 0x10CB +} srb_t; + +/* + * SRB flag definitions + */ +#define SRB_TIMEOUT BIT_0 /* Command timed out */ +#define SRB_DMA_VALID BIT_1 /* Command sent to ISP */ +#define SRB_WATCHDOG BIT_2 /* Command on watchdog list */ +#define SRB_ABORT_PENDING BIT_3 /* Command abort sent to device */ + +#define SRB_ABORTED BIT_4 /* Command aborted command already */ +#define SRB_RETRY BIT_5 /* Command needs retrying */ +#define SRB_GOT_SENSE BIT_6 /* Command has sense data */ +#define SRB_FAILOVER BIT_7 /* Command in failover state */ + +#define SRB_BUSY BIT_8 /* Command is in busy retry state */ +#define SRB_FO_CANCEL BIT_9 /* Command don't need to do failover */ +#define SRB_IOCTL BIT_10 /* IOCTL command. */ + +/* + * SRB state definitions + */ +#define SRB_FREE_STATE 0 /* returned back */ +#define SRB_PENDING_STATE 1 /* queued in LUN Q */ +#define SRB_ACTIVE_STATE 2 /* in Active Array */ +#define SRB_DONE_STATE 3 /* queued in Done Queue */ +#define SRB_RETRY_STATE 4 /* in Retry Queue */ +#define SRB_SUSPENDED_STATE 5 /* in suspended state */ +#define SRB_NO_QUEUE_STATE 6 /* is in between states */ +#define SRB_ACTIVE_TIMEOUT_STATE 7 /* in Active Array but timed out */ +#define SRB_FAILOVER_STATE 8 /* in Failover Queue */ +#define SRB_SCSI_RETRY_STATE 9 /* in Scsi Retry Queue */ + + +/* + * ISP I/O Register Set structure definitions. + */ +typedef volatile struct { + volatile uint16_t flash_address; /* Flash BIOS address */ + volatile uint16_t flash_data; /* Flash BIOS data */ + uint16_t unused_1[1]; /* Gap */ + volatile uint16_t ctrl_status; /* Control/Status */ +#define CSR_FLASH_64K_BANK BIT_3 /* Flash upper 64K bank select */ +#define CSR_FLASH_ENABLE BIT_1 /* Flash BIOS Read/Write enable */ +#define CSR_ISP_SOFT_RESET BIT_0 /* ISP soft reset */ + + volatile uint16_t ictrl; /* Interrupt control */ +#define ICR_EN_INT BIT_15 /* ISP enable interrupts. */ +#define ICR_EN_RISC BIT_3 /* ISP enable RISC interrupts. */ + + volatile uint16_t istatus; /* Interrupt status */ +#define ISR_RISC_INT BIT_3 /* RISC interrupt */ + + volatile uint16_t semaphore; /* Semaphore */ + volatile uint16_t nvram; /* NVRAM register. */ +#define NVR_DESELECT 0 +#define NVR_BUSY BIT_15 +#define NVR_DATA_IN BIT_3 +#define NVR_DATA_OUT BIT_2 +#define NVR_SELECT BIT_1 +#define NVR_CLOCK BIT_0 + +#if defined(ISP2100) || defined(ISP2200) + volatile uint16_t mailbox0; + volatile uint16_t mailbox1; + volatile uint16_t mailbox2; + volatile uint16_t mailbox3; + volatile uint16_t mailbox4; +#define ISP_REQ_Q_IN(reg) (&(reg)->mailbox4) +#define ISP_REQ_Q_OUT(reg) (&(reg)->mailbox4) + volatile uint16_t mailbox5; +#define ISP_RSP_Q_IN(reg) (&(reg)->mailbox5) +#define ISP_RSP_Q_OUT(reg) (&(reg)->mailbox5) + volatile uint16_t mailbox6; + volatile uint16_t mailbox7; + uint16_t unused_2[0x3b]; /* Gap */ +#else /* defined(ISP2300) */ + volatile uint16_t req_q_in; /* Request Queue In-Pointer */ +#define ISP_REQ_Q_IN(reg) (&(reg)->req_q_in) + volatile uint16_t req_q_out; /* Request Queue Out-Pointer */ +#define ISP_REQ_Q_OUT(reg) (&(reg)->req_q_out) + volatile uint16_t rsp_q_in; /* Response Queue In-Pointer */ +#define ISP_RSP_Q_IN(reg) (&(reg)->rsp_q_in) + volatile uint16_t rsp_q_out; /* Response Queue Out-Pointer */ +#define ISP_RSP_Q_OUT(reg) (&(reg)->rsp_q_out) + + volatile uint32_t host_status; /* RISC to Host Status */ +#define HSR_RISC_INT BIT_15 /* RISC interrupt */ +#define HSR_RISC_PAUSED BIT_8 /* RISC Paused */ + + volatile uint16_t host_semaphore; /* Host to Host Semaphore */ + uint16_t unused_3[0x11]; /* Gap */ + volatile uint16_t mailbox0; + volatile uint16_t mailbox1; + volatile uint16_t mailbox2; + volatile uint16_t mailbox3; + volatile uint16_t mailbox4; + volatile uint16_t mailbox5; + volatile uint16_t mailbox6; + volatile uint16_t mailbox7; + volatile uint16_t mailbox8; + volatile uint16_t mailbox9; + volatile uint16_t mailbox10; + volatile uint16_t mailbox11; + volatile uint16_t mailbox12; + volatile uint16_t mailbox13; + volatile uint16_t mailbox14; + volatile uint16_t mailbox15; + volatile uint16_t mailbox16; + volatile uint16_t mailbox17; + volatile uint16_t mailbox18; + volatile uint16_t mailbox19; + volatile uint16_t mailbox20; + volatile uint16_t mailbox21; + volatile uint16_t mailbox22; + volatile uint16_t mailbox23; + volatile uint16_t mailbox24; + volatile uint16_t mailbox25; + volatile uint16_t mailbox26; + volatile uint16_t mailbox27; + volatile uint16_t mailbox28; + volatile uint16_t mailbox29; + volatile uint16_t mailbox30; + volatile uint16_t mailbox31; + volatile uint16_t fb_cmd; + uint16_t unused_4[0xa]; /* Gap */ +#endif /* defined(ISP2100) || defined(ISP2200) */ + volatile uint16_t fpm_diag_config; + uint16_t unused_5[0x6]; /* Gap */ + volatile uint16_t pcr; /* Processor Control Register. */ + uint16_t unused_6[0x5]; /* Gap */ + volatile uint16_t mctr; /* Memory Configuration and Timing. */ + uint16_t unused_7[0x3]; /* Gap */ +#if defined(ISP2100) || defined(ISP2200) + volatile uint16_t fb_cmd; +#else /* defined(ISP2300) */ + uint16_t unused_11; +#endif /* defined(ISP2100) || defined(ISP2200) */ + uint16_t unused_8[0x3]; /* Gap */ + volatile uint16_t hccr; /* Host command & control register. */ +#define HCCR_HOST_INT BIT_7 /* Host interrupt bit */ +#define HCCR_RISC_PAUSE BIT_5 /* Pause mode bit */ + /* HCCR commands */ +#define HCCR_RESET_RISC 0x1000 /* Reset RISC */ +#define HCCR_PAUSE_RISC 0x2000 /* Pause RISC */ +#define HCCR_RELEASE_RISC 0x3000 /* Release RISC from reset. */ +#define HCCR_SET_HOST_INT 0x5000 /* Set host interrupt */ +#define HCCR_CLR_HOST_INT 0x6000 /* Clear HOST interrupt */ +#define HCCR_CLR_RISC_INT 0x7000 /* Clear RISC interrupt */ +#define HCCR_DISABLE_PARITY_PAUSE 0x4001 /* Disable parity error RISC pause. */ +#define HCCR_ENABLE_PARITY 0xA000 /* Enable PARITY interrupt */ + + uint16_t unused_9[5]; /* Gap */ + volatile uint16_t gpiod; /* GPIO Data register. */ + volatile uint16_t gpioe; /* GPIO Enable register. */ +#define GPIO_LED_MASK 0x00C0 +#define GPIO_LED_GREEN_OFF_AMBER_OFF 0x0000 +#define GPIO_LED_GREEN_ON_AMBER_OFF 0x0040 +#define GPIO_LED_GREEN_OFF_AMBER_ON 0x0080 +#define GPIO_LED_GREEN_ON_AMBER_ON 0x00C0 + +#if defined(ISP2200) + uint16_t unused_10[8]; /* Gap */ + volatile uint16_t mailbox8; + volatile uint16_t mailbox9; + volatile uint16_t mailbox10; + volatile uint16_t mailbox11; + volatile uint16_t mailbox12; + volatile uint16_t mailbox13; + volatile uint16_t mailbox14; + volatile uint16_t mailbox15; + volatile uint16_t mailbox16; + volatile uint16_t mailbox17; + volatile uint16_t mailbox18; + volatile uint16_t mailbox19; + volatile uint16_t mailbox20; + volatile uint16_t mailbox21; + volatile uint16_t mailbox22; + volatile uint16_t mailbox23; /* Also probe reg. */ +#endif /* defined(ISP2200) */ +} device_reg_t; + +typedef struct { + uint32_t out_mb; /* outbound from driver */ + uint32_t in_mb; /* Incoming from RISC */ + uint16_t mb[MAILBOX_REGISTER_COUNT]; + long buf_size; + void *bufp; + uint32_t tov; + uint8_t flags; +#define MBX_DMA_IN BIT_0 +#define MBX_DMA_OUT BIT_1 +#define IOCTL_CMD BIT_2 +} mbx_cmd_t; + +#define MBX_TOV_SECONDS 30 + +/* + * ISP product identification definitions in mailboxes after reset. + */ +#define PROD_ID_1 0x4953 +#define PROD_ID_2 0x0000 +#define PROD_ID_2a 0x5020 +#define PROD_ID_3 0x2020 + +/* + * ISP mailbox Self-Test status codes + */ +#define MBS_FRM_ALIVE 0 /* Firmware Alive. */ +#define MBS_CHKSUM_ERR 1 /* Checksum Error. */ +#define MBS_BUSY 4 /* Busy. */ + +/* + * ISP mailbox command complete status codes + */ +#define MBS_COMMAND_COMPLETE 0x4000 +#define MBS_INVALID_COMMAND 0x4001 +#define MBS_HOST_INTERFACE_ERROR 0x4002 +#define MBS_TEST_FAILED 0x4003 +#define MBS_COMMAND_ERROR 0x4005 +#define MBS_COMMAND_PARAMETER_ERROR 0x4006 +#define MBS_PORT_ID_USED 0x4007 +#define MBS_LOOP_ID_USED 0x4008 +#define MBS_ALL_IDS_IN_USE 0x4009 +#define MBS_NOT_LOGGED_IN 0x400A + +/* + * ISP mailbox asynchronous event status codes + */ +#define MBA_ASYNC_EVENT 0x8000 /* Asynchronous event. */ +#define MBA_RESET 0x8001 /* Reset Detected. */ +#define MBA_SYSTEM_ERR 0x8002 /* System Error. */ +#define MBA_REQ_TRANSFER_ERR 0x8003 /* Request Transfer Error. */ +#define MBA_RSP_TRANSFER_ERR 0x8004 /* Response Transfer Error. */ +#define MBA_WAKEUP_THRES 0x8005 /* Request Queue Wake-up. */ +#define MBA_LIP_OCCURRED 0x8010 /* Loop Initialization Procedure */ + /* occurred. */ +#define MBA_LOOP_UP 0x8011 /* FC Loop UP. */ +#define MBA_LOOP_DOWN 0x8012 /* FC Loop Down. */ +#define MBA_LIP_RESET 0x8013 /* LIP reset occurred. */ +#define MBA_PORT_UPDATE 0x8014 /* Port Database update. */ +#define MBA_RSCN_UPDATE 0x8015 /* Register State Chg Notification. */ +#define MBA_LIP_F8 0x8016 /* Received a LIP F8. */ +#define MBA_LOOP_INIT_ERR 0x8017 /* Loop Initialization Error. */ +#define MBA_FABRIC_AUTH_REQ 0x801b /* Fabric Authentication Required. */ +#define MBA_SCSI_COMPLETION 0x8020 /* SCSI Command Complete. */ +#define MBA_CTIO_COMPLETION 0x8021 /* CTIO Complete. */ +#define MBA_IP_COMPLETION 0x8022 /* IP Transmit Command Complete. */ +#define MBA_IP_RECEIVE 0x8023 /* IP Received. */ +#define MBA_IP_BROADCAST 0x8024 /* IP Broadcast Received. */ +#define MBA_IP_LOW_WATER_MARK 0x8025 /* IP Low Water Mark reached. */ +#define MBA_IP_RCV_BUFFER_EMPTY 0x8026 /* IP receive buffer queue empty. */ +#define MBA_IP_HDR_DATA_SPLIT 0x8027 /* IP header/data splitting feature */ + /* used. */ +#define MBA_POINT_TO_POINT 0x8030 /* Point to point mode. */ +#define MBA_CMPLT_1_16BIT 0x8031 /* Completion 1 16bit IOSB. */ +#define MBA_CMPLT_2_16BIT 0x8032 /* Completion 2 16bit IOSB. */ +#define MBA_CMPLT_3_16BIT 0x8033 /* Completion 3 16bit IOSB. */ +#define MBA_CMPLT_4_16BIT 0x8034 /* Completion 4 16bit IOSB. */ +#define MBA_CMPLT_5_16BIT 0x8035 /* Completion 5 16bit IOSB. */ +#define MBA_CHG_IN_CONNECTION 0x8036 /* Change in connection mode. */ +#define MBA_RIO_RESPONSE 0x8040 /* RIO response queue update. */ +#define MBA_ZIO_RESPONSE 0x8040 /* ZIO response queue update. */ +#define MBA_CMPLT_2_32BIT 0x8042 /* Completion 2 32bit IOSB. */ +#define MBA_BYPASS_NOTIFICATION 0x8043 /* Auto bypass notification. */ +#define MBA_DISCARD_RND_FRAME 0x8048 /* discard RND frame due to error. */ +#define MBA_REJECTED_FCP_CMD 0x8049 /* rejected FCP_CMD. */ + +/* + * Firmware options 1, 2, 3. + */ +#define FO1_AE_ON_LIPF8 BIT_0 +#define FO1_AE_ALL_LIP_RESET BIT_1 +#define FO1_CTIO_RETRY BIT_3 +#define FO1_DISABLE_LIP_F7_SW BIT_4 +#define FO1_DISABLE_100MS_LOS_WAIT BIT_5 +#define FO1_DISABLE_GPIO6_7 BIT_6 +#define FO1_AE_ON_LOOP_INIT_ERR BIT_7 +#define FO1_SET_EMPHASIS_SWING BIT_8 +#define FO1_AE_AUTO_BYPASS BIT_9 +#define FO1_ENABLE_PURE_IOCB BIT_10 +#define FO1_AE_PLOGI_RJT BIT_11 +#define FO1_ENABLE_ABORT_SEQUENCE BIT_12 +#define FO1_AE_QUEUE_FULL BIT_13 + +#define FO2_ENABLE_ATIO_TYPE_3 BIT_0 +#define FO2_REV_LOOPBACK BIT_1 + +#define FO3_ENABLE_EMERG_IOCB BIT_0 +#define FO3_AE_RND_ERROR BIT_1 + +/* + * ISP mailbox commands + */ +#define MBC_LOAD_RAM 1 /* Load RAM. */ +#define MBC_EXECUTE_FIRMWARE 2 /* Execute firmware. */ +#define MBC_WRITE_RAM_WORD 4 /* Write RAM word. */ +#define MBC_READ_RAM_WORD 5 /* Read RAM word. */ +#define MBC_MAILBOX_REGISTER_TEST 6 /* Wrap incoming mailboxes */ +#define MBC_VERIFY_CHECKSUM 7 /* Verify checksum. */ +#define MBC_GET_FIRMWARE_VERSION 8 /* Get firmware revision. */ +#define MBC_LOAD_RISC_RAM 9 /* Load RAM command. */ +#define MBC_DUMP_RISC_RAM 0xa /* Dump RAM command. */ +#define MBC_LOAD_RISC_RAM_EXTENDED 0xb /* Load RAM extended. */ +#define MBC_DUMP_RISC_RAM_EXTENDED 0xc /* Dump RAM extended. */ +#define MBC_WRITE_RAM_WORD_EXTENDED 0xd /* Write RAM word extended */ +#define MBC_READ_RAM_EXTENDED 0xf /* Read RAM extended. */ +#define MBC_IOCB_COMMAND 0x12 /* Execute IOCB command. */ +#define MBC_ABORT_COMMAND 0x15 /* Abort IOCB command. */ +#define MBC_ABORT_DEVICE 0x16 /* Abort device (ID/LUN). */ +#define MBC_ABORT_TARGET 0x17 /* Abort target (ID). */ +#define MBC_RESET 0x18 /* Reset. */ +#define MBC_GET_ADAPTER_LOOP_ID 0x20 /* Get loop id of ISP2200. */ +#define MBC_GET_RETRY_COUNT 0x22 /* Get f/w retry cnt/delay. */ +#define MBC_DISABLE_VI 0x24 /* Disable VI operation. */ +#define MBC_ENABLE_VI 0x25 /* Enable VI operation. */ +#define MBC_GET_FIRMWARE_OPTION 0x28 /* Get Firmware Options. */ +#define MBC_SET_FIRMWARE_OPTION 0x38 /* Set Firmware Options. */ +#define MBC_LOOP_PORT_BYPASS 0x40 /* Loop Port Bypass. */ +#define MBC_LOOP_PORT_ENABLE 0x41 /* Loop Port Enable. */ +#define MBC_GET_RESOURCE_COUNTS 0x42 /* Get Resource Counts. */ +#define MBC_NON_PARTICIPATE 0x43 /* Non-Participating Mode. */ +#define MBC_DIAGNOSTIC_ECHO 0x44 /* Diagnostic echo. */ +#define MBC_DIAGNOSTIC_LOOP_BACK 0x45 /* Diagnostic loop back. */ +#define MBC_ONLINE_SELF_TEST 0x46 /* Online self-test. */ +#define MBC_ENHANCED_GET_PORT_DATABASE 0x47 /* Get port database + login */ +#define MBC_RESET_LINK_STATUS 0x52 /* Reset Link Error Status */ +#define MBC_IOCB_COMMAND_A64 0x54 /* Execute IOCB command (64) */ +#define MBC_SEND_RNID_ELS 0x57 /* Send RNID ELS request */ +#define MBC_SET_RNID_PARAMS 0x59 /* Set RNID parameters */ +#define MBC_GET_RNID_PARAMS 0x5a /* Data Rate */ +#define MBC_DATA_RATE 0x5d /* Get RNID parameters */ +#define MBC_INITIALIZE_FIRMWARE 0x60 /* Initialize firmware */ +#define MBC_INITIATE_LIP 0x62 /* Initiate Loop */ + /* Initialization Procedure */ +#define MBC_GET_FC_AL_POSITION_MAP 0x63 /* Get FC_AL Position Map. */ +#define MBC_GET_PORT_DATABASE 0x64 /* Get Port Database. */ +#define MBC_CLEAR_ACA 0x65 /* Clear ACA. */ +#define MBC_TARGET_RESET 0x66 /* Target Reset. */ +#define MBC_CLEAR_TASK_SET 0x67 /* Clear Task Set. */ +#define MBC_ABORT_TASK_SET 0x68 /* Abort Task Set. */ +#define MBC_GET_FIRMWARE_STATE 0x69 /* Get firmware state. */ +#define MBC_GET_PORT_NAME 0x6a /* Get port name. */ +#define MBC_GET_LINK_STATUS 0x6b /* Get port link status. */ +#define MBC_LIP_RESET 0x6c /* LIP reset. */ +#define MBC_SEND_SNS_COMMAND 0x6e /* Send Simple Name Server */ + /* commandd. */ +#define MBC_LOGIN_FABRIC_PORT 0x6f /* Login fabric port. */ +#define MBC_SEND_CHANGE_REQUEST 0x70 /* Send Change Request. */ +#define MBC_LOGOUT_FABRIC_PORT 0x71 /* Logout fabric port. */ +#define MBC_LIP_FULL_LOGIN 0x72 /* Full login LIP. */ +#define MBC_LOGIN_LOOP_PORT 0x74 /* Login Loop Port. */ +#define MBC_PORT_NODE_NAME_LIST 0x75 /* Get port/node name list. */ +#define MBC_INITIALIZE_RECEIVE_QUEUE 0x77 /* Initialize receive queue */ +#define MBC_UNLOAD_IP 0x79 /* Shutdown IP */ +#define MBC_GET_ID_LIST 0x7C /* Get Port ID list. */ +#define MBC_SEND_LFA_COMMAND 0x7D /* Send Loop Fabric Address */ +#define MBC_LUN_RESET 0x7E /* Send LUN reset */ + +/* Firmware return data sizes */ +#define FCAL_MAP_SIZE 128 + +/* Mailbox bit definitions for out_mb and in_mb */ +#define MBX_31 BIT_31 +#define MBX_30 BIT_30 +#define MBX_29 BIT_29 +#define MBX_28 BIT_28 +#define MBX_27 BIT_27 +#define MBX_26 BIT_26 +#define MBX_25 BIT_25 +#define MBX_24 BIT_24 +#define MBX_23 BIT_23 +#define MBX_22 BIT_22 +#define MBX_21 BIT_21 +#define MBX_20 BIT_20 +#define MBX_19 BIT_19 +#define MBX_18 BIT_18 +#define MBX_17 BIT_17 +#define MBX_16 BIT_16 +#define MBX_15 BIT_15 +#define MBX_14 BIT_14 +#define MBX_13 BIT_13 +#define MBX_12 BIT_12 +#define MBX_11 BIT_11 +#define MBX_10 BIT_10 +#define MBX_9 BIT_9 +#define MBX_8 BIT_8 +#define MBX_7 BIT_7 +#define MBX_6 BIT_6 +#define MBX_5 BIT_5 +#define MBX_4 BIT_4 +#define MBX_3 BIT_3 +#define MBX_2 BIT_2 +#define MBX_1 BIT_1 +#define MBX_0 BIT_0 + +/* + * Firmware state codes from get firmware state mailbox command + */ +#define FSTATE_CONFIG_WAIT 0 +#define FSTATE_WAIT_AL_PA 1 +#define FSTATE_WAIT_LOGIN 2 +#define FSTATE_READY 3 +#define FSTATE_LOSS_OF_SYNC 4 +#define FSTATE_ERROR 5 +#define FSTATE_REINIT 6 +#define FSTATE_NON_PART 7 + +#define FSTATE_CONFIG_CORRECT 0 +#define FSTATE_P2P_RCV_LIP 1 +#define FSTATE_P2P_CHOOSE_LOOP 2 +#define FSTATE_P2P_RCV_UNIDEN_LIP 3 +#define FSTATE_FATAL_ERROR 4 +#define FSTATE_LOOP_BACK_CONN 5 + +/* + * Port Database structure definition + * Little endian except where noted. + */ +#define PORT_DATABASE_SIZE 128 /* bytes */ +typedef struct { + uint8_t options; + uint8_t control; + uint8_t master_state; + uint8_t slave_state; + uint8_t reserved[2]; + uint8_t hard_address; + uint8_t reserved_1; + uint8_t port_id[4]; + uint8_t node_name[WWN_SIZE]; /* Big endian. */ + uint8_t port_name[WWN_SIZE]; /* Big endian. */ + uint16_t execution_throttle; + uint16_t execution_count; + uint8_t reset_count; + uint8_t reserved_2; + uint16_t resource_allocation; + uint16_t current_allocation; + uint16_t queue_head; + uint16_t queue_tail; + uint16_t transmit_execution_list_next; + uint16_t transmit_execution_list_previous; + uint16_t common_features; + uint16_t total_concurrent_sequences; + uint16_t RO_by_information_category; + uint8_t recipient; + uint8_t initiator; + uint16_t receive_data_size; + uint16_t concurrent_sequences; + uint16_t open_sequences_per_exchange; + uint16_t lun_abort_flags; + uint16_t lun_stop_flags; + uint16_t stop_queue_head; + uint16_t stop_queue_tail; + uint16_t port_retry_timer; + uint16_t next_sequence_id; + uint16_t frame_count; + uint16_t PRLI_payload_length; + uint8_t prli_svc_param_word_0[2]; /* Big endian */ + /* Bits 15-0 of word 0 */ + uint8_t prli_svc_param_word_3[2]; /* Big endian */ + /* Bits 15-0 of word 3 */ + uint16_t loop_id; + uint16_t extended_lun_info_list_pointer; + uint16_t extended_lun_stop_list_pointer; +} port_database_t; + +/* + * Port database slave/master states + */ +#define PD_STATE_DISCOVERY 0 +#define PD_STATE_WAIT_DISCOVERY_ACK 1 +#define PD_STATE_PORT_LOGIN 2 +#define PD_STATE_WAIT_PORT_LOGIN_ACK 3 +#define PD_STATE_PROCESS_LOGIN 4 +#define PD_STATE_WAIT_PROCESS_LOGIN_ACK 5 +#define PD_STATE_PORT_LOGGED_IN 6 +#define PD_STATE_PORT_UNAVAILABLE 7 +#define PD_STATE_PROCESS_LOGOUT 8 +#define PD_STATE_WAIT_PROCESS_LOGOUT_ACK 9 +#define PD_STATE_PORT_LOGOUT 10 +#define PD_STATE_WAIT_PORT_LOGOUT_ACK 11 + + +/* + * ISP Initialization Control Block. + */ +#define SO_DATA_RATE_1GB 0 +#define SO_DATA_RATE_2GB 1 +#define SO_DATA_RATE_AUTO 2 + +/* + * ISP Initialization Control Block. + * Little endian except where noted. + */ +#define ICB_VERSION 1 +typedef struct { + uint8_t version; + uint8_t reserved_1; + + /* + * LSB BIT 0 = Enable Hard Loop Id + * LSB BIT 1 = Enable Fairness + * LSB BIT 2 = Enable Full-Duplex + * LSB BIT 3 = Enable Fast Posting + * LSB BIT 4 = Enable Target Mode + * LSB BIT 5 = Disable Initiator Mode + * LSB BIT 6 = Enable ADISC + * LSB BIT 7 = Enable Target Inquiry Data + * + * MSB BIT 0 = Enable PDBC Notify + * MSB BIT 1 = Non Participating LIP + * MSB BIT 2 = Descending Loop ID Search + * MSB BIT 3 = Acquire Loop ID in LIPA + * MSB BIT 4 = Stop PortQ on Full Status + * MSB BIT 5 = Full Login after LIP + * MSB BIT 6 = Node Name Option + * MSB BIT 7 = Ext IFWCB enable bit + */ + uint8_t firmware_options[2]; + + uint16_t frame_payload_size; + uint16_t max_iocb_allocation; + uint16_t execution_throttle; + uint8_t retry_count; + uint8_t retry_delay; /* unused */ + uint8_t port_name[WWN_SIZE]; /* Big endian. */ + uint16_t hard_address; + uint8_t inquiry_data; + uint8_t login_timeout; + uint8_t node_name[WWN_SIZE]; /* Big endian. */ + + uint16_t request_q_outpointer; + uint16_t response_q_inpointer; + uint16_t request_q_length; + uint16_t response_q_length; + uint32_t request_q_address[2]; + uint32_t response_q_address[2]; + + uint16_t lun_enables; + uint8_t command_resource_count; + uint8_t immediate_notify_resource_count; + uint16_t timeout; + uint8_t reserved_2[2]; + + /* + * LSB BIT 0 = Timer Operation mode bit 0 + * LSB BIT 1 = Timer Operation mode bit 1 + * LSB BIT 2 = Timer Operation mode bit 2 + * LSB BIT 3 = Timer Operation mode bit 3 + * LSB BIT 4 = Init Config Mode bit 0 + * LSB BIT 5 = Init Config Mode bit 1 + * LSB BIT 6 = Init Config Mode bit 2 + * LSB BIT 7 = Enable Non part on LIHA failure + * + * MSB BIT 0 = Enable class 2 + * MSB BIT 1 = Enable ACK0 + * MSB BIT 2 = + * MSB BIT 3 = + * MSB BIT 4 = FC Tape Enable + * MSB BIT 5 = Enable FC Confirm + * MSB BIT 6 = Enable command queuing in target mode + * MSB BIT 7 = No Logo On Link Down + */ + uint8_t add_firmware_options[2]; + + uint8_t response_accumulation_timer; + uint8_t interrupt_delay_timer; + + /* + * LSB BIT 0 = Enable Read xfr_rdy + * LSB BIT 1 = Soft ID only + * LSB BIT 2 = + * LSB BIT 3 = + * LSB BIT 4 = FCP RSP Payload [0] + * LSB BIT 5 = FCP RSP Payload [1] / Sbus enable - 2200 + * LSB BIT 6 = Enable Out-of-Order frame handling + * LSB BIT 7 = Disable Automatic PLOGI on Local Loop + * + * MSB BIT 0 = Sbus enable - 2300 + * MSB BIT 1 = + * MSB BIT 2 = + * MSB BIT 3 = + * MSB BIT 4 = + * MSB BIT 5 = enable 50 ohm termination + * MSB BIT 6 = Data Rate (2300 only) + * MSB BIT 7 = Data Rate (2300 only) + */ + uint8_t special_options[2]; + + uint8_t reserved_3[26]; +} init_cb_t; + +/* + * ISP Get/Set Target Parameters mailbox command control flags. + */ + +/* + * Get Link Status mailbox command return buffer. + */ +typedef struct { + uint32_t link_fail_cnt; + uint32_t loss_sync_cnt; + uint32_t loss_sig_cnt; + uint32_t prim_seq_err_cnt; + uint32_t inval_xmit_word_cnt; + uint32_t inval_crc_cnt; +} link_stat_t; + +/* + * NVRAM Command values. + */ +#define NV_START_BIT BIT_2 +#define NV_WRITE_OP (BIT_26+BIT_24) +#define NV_READ_OP (BIT_26+BIT_25) +#define NV_ERASE_OP (BIT_26+BIT_25+BIT_24) +#define NV_MASK_OP (BIT_26+BIT_25+BIT_24) +#define NV_DELAY_COUNT 10 + +/* + * QLogic ISP2100, ISP2200 and ISP2300 NVRAM structure definition. + */ +typedef struct { + /* + * NVRAM header + */ + uint8_t id[4]; + uint8_t nvram_version; + uint8_t reserved_0; + + /* + * NVRAM RISC parameter block + */ + uint8_t parameter_block_version; + uint8_t reserved_1; + + /* + * LSB BIT 0 = Enable Hard Loop Id + * LSB BIT 1 = Enable Fairness + * LSB BIT 2 = Enable Full-Duplex + * LSB BIT 3 = Enable Fast Posting + * LSB BIT 4 = Enable Target Mode + * LSB BIT 5 = Disable Initiator Mode + * LSB BIT 6 = Enable ADISC + * LSB BIT 7 = Enable Target Inquiry Data + * + * MSB BIT 0 = Enable PDBC Notify + * MSB BIT 1 = Non Participating LIP + * MSB BIT 2 = Descending Loop ID Search + * MSB BIT 3 = Acquire Loop ID in LIPA + * MSB BIT 4 = Stop PortQ on Full Status + * MSB BIT 5 = Full Login after LIP + * MSB BIT 6 = Node Name Option + * MSB BIT 7 = Ext IFWCB enable bit + */ + uint8_t firmware_options[2]; + + uint16_t frame_payload_size; + uint16_t max_iocb_allocation; + uint16_t execution_throttle; + uint8_t retry_count; + uint8_t retry_delay; /* unused */ + uint8_t port_name[WWN_SIZE]; /* Big endian. */ + uint16_t hard_address; + uint8_t inquiry_data; + uint8_t login_timeout; + uint8_t node_name[WWN_SIZE]; /* Big endian. */ + + /* + * LSB BIT 0 = Timer Operation mode bit 0 + * LSB BIT 1 = Timer Operation mode bit 1 + * LSB BIT 2 = Timer Operation mode bit 2 + * LSB BIT 3 = Timer Operation mode bit 3 + * LSB BIT 4 = Init Config Mode bit 0 + * LSB BIT 5 = Init Config Mode bit 1 + * LSB BIT 6 = Init Config Mode bit 2 + * LSB BIT 7 = Enable Non part on LIHA failure + * + * MSB BIT 0 = Enable class 2 + * MSB BIT 1 = Enable ACK0 + * MSB BIT 2 = + * MSB BIT 3 = + * MSB BIT 4 = FC Tape Enable + * MSB BIT 5 = Enable FC Confirm + * MSB BIT 6 = Enable command queuing in target mode + * MSB BIT 7 = No Logo On Link Down + */ + uint8_t add_firmware_options[2]; + + uint8_t response_accumulation_timer; + uint8_t interrupt_delay_timer; + + /* + * LSB BIT 0 = Enable Read xfr_rdy + * LSB BIT 1 = Soft ID only + * LSB BIT 2 = + * LSB BIT 3 = + * LSB BIT 4 = FCP RSP Payload [0] + * LSB BIT 5 = FCP RSP Payload [1] / Sbus enable - 2200 + * LSB BIT 6 = Enable Out-of-Order frame handling + * LSB BIT 7 = Disable Automatic PLOGI on Local Loop + * + * MSB BIT 0 = Sbus enable - 2300 + * MSB BIT 1 = + * MSB BIT 2 = + * MSB BIT 3 = + * MSB BIT 4 = + * MSB BIT 5 = enable 50 ohm termination + * MSB BIT 6 = Data Rate (2300 only) + * MSB BIT 7 = Data Rate (2300 only) + */ + uint8_t special_options[2]; + + /* Reserved for expanded RISC parameter block */ + uint8_t reserved_2[24]; + + /* + * LSB BIT 0 = Output Swing 1G bit 0 + * LSB BIT 1 = Output Swing 1G bit 1 + * LSB BIT 2 = Output Swing 1G bit 2 + * LSB BIT 3 = Output Emphasis 1G bit 0 + * LSB BIT 4 = Output Emphasis 1G bit 1 + * LSB BIT 5 = Output Swing 2G bit 0 + * LSB BIT 6 = Output Swing 2G bit 1 + * LSB BIT 7 = Output Swing 2G bit 2 + * + * MSB BIT 0 = Output Emphasis 2G bit 0 + * MSB BIT 1 = Output Emphasis 2G bit 1 + * MSB BIT 2 = Output Enable + * MSB BIT 3 = + * MSB BIT 4 = + * MSB BIT 5 = + * MSB BIT 6 = + * MSB BIT 7 = + */ + uint8_t seriallink_options[2]; + + /* + * NVRAM host parameter block + * + * LSB BIT 0 = Enable spinup delay + * LSB BIT 1 = Disable BIOS + * LSB BIT 2 = Enable Memory Map BIOS + * LSB BIT 3 = Enable Selectable Boot + * LSB BIT 4 = Disable RISC code load + * LSB BIT 5 = Set cache line size 1 + * LSB BIT 6 = PCI Parity Disable + * LSB BIT 7 = Enable extended logging + * + * MSB BIT 0 = Enable 64bit addressing + * MSB BIT 1 = Enable lip reset + * MSB BIT 2 = Enable lip full login + * MSB BIT 3 = Enable target reset + * MSB BIT 4 = Enable database storage + * MSB BIT 5 = Enable cache flush read + * MSB BIT 6 = Enable database load + * MSB BIT 7 = Enable alternate WWN + */ + uint8_t host_p[2]; + + uint8_t boot_node_name[WWN_SIZE]; + uint8_t boot_lun_number; + uint8_t reset_delay; + uint8_t port_down_retry_count; + uint8_t boot_id_number; + uint16_t max_luns_per_target; + uint8_t fcode_boot_port_name[WWN_SIZE]; + uint8_t alternate_port_name[WWN_SIZE]; + uint8_t alternate_node_name[WWN_SIZE]; + + /* + * BIT 0 = Boot Zoning + * BIT 1 = Alt-Boot Enable + * BIT 2 = Report SCSI Path + * BIT 3 = unused + * BIT 4 = unused + * BIT 5 = unused + * BIT 6 = unused + * BIT 7 = unused + */ + uint8_t efi_parameters; + + uint8_t link_down_timeout; + + uint8_t adapter_id_0[4]; + uint8_t adapter_id_1[4]; + uint8_t adapter_id_2[4]; + uint8_t adapter_id_3[4]; + + uint8_t alt1_boot_node_name[WWN_SIZE]; + uint16_t alt1_boot_lun_number; + uint8_t alt2_boot_node_name[WWN_SIZE]; + uint16_t alt2_boot_lun_number; + uint8_t alt3_boot_node_name[WWN_SIZE]; + uint16_t alt3_boot_lun_number; + uint8_t alt4_boot_node_name[WWN_SIZE]; + uint16_t alt4_boot_lun_number; + uint8_t alt5_boot_node_name[WWN_SIZE]; + uint16_t alt5_boot_lun_number; + uint8_t alt6_boot_node_name[WWN_SIZE]; + uint16_t alt6_boot_lun_number; + uint8_t alt7_boot_node_name[WWN_SIZE]; + uint16_t alt7_boot_lun_number; + + uint8_t reserved_3[2]; + + /* Offset 200-215 : Model Number */ + uint8_t model_number[16]; + + /* OEM related items */ + uint8_t oem_specific[16]; + + /* + * NVRAM Adapter Features offset 232-239 + * + * LSB BIT 0 = External GBIC + * LSB BIT 1 = Risc RAM parity + * LSB BIT 2 = Buffer Plus Module + * LSB BIT 3 = Multi Chip Adapter + * LSB BIT 4 = Internal connector + * LSB BIT 5 = + * LSB BIT 6 = + * LSB BIT 7 = + * + * MSB BIT 0 = + * MSB BIT 1 = + * MSB BIT 2 = + * MSB BIT 3 = + * MSB BIT 4 = + * MSB BIT 5 = + * MSB BIT 6 = + * MSB BIT 7 = + */ + uint8_t adapter_features[2]; + + uint8_t reserved_4[16]; + + /* Subsystem vendor ID for ISP2200 */ + uint16_t subsystem_vendor_id_2200; + + /* Subsystem device ID for ISP2200 */ + uint16_t subsystem_device_id_2200; + + uint8_t reserved_5; + uint8_t checksum; +} nvram_t; + +/* + * ISP queue - response queue entry definition. + */ +typedef struct { + uint8_t data[60]; + uint32_t signature; +#define RESPONSE_PROCESSED 0xDEADDEAD /* Signature */ +} response_t; + + +/* + * ISP queue - command entry structure definition. + */ +#define COMMAND_TYPE 0x11 /* Command entry */ +#define MAX_CMDSZ 16 /* SCSI maximum CDB size. */ +typedef struct { + uint8_t entry_type; /* Entry type. */ + uint8_t entry_count; /* Entry count. */ + uint8_t sys_define; /* System defined. */ + uint8_t entry_status; /* Entry Status. */ + uint32_t handle; /* System handle. */ +#if defined(EXTENDED_IDS) + uint16_t target; /* SCSI ID */ +#else + uint8_t reserved; + uint8_t target; /* SCSI ID */ +#endif + uint16_t lun; /* SCSI LUN */ + uint16_t control_flags; /* Control flags. */ +#define CF_WRITE BIT_6 +#define CF_READ BIT_5 +#define CF_SIMPLE_TAG BIT_3 +#define CF_ORDERED_TAG BIT_2 +#define CF_HEAD_TAG BIT_1 + uint16_t reserved_1; + uint16_t timeout; /* Command timeout. */ + uint16_t dseg_count; /* Data segment count. */ + uint8_t scsi_cdb[MAX_CMDSZ]; /* SCSI command words. */ + uint32_t byte_count; /* Total byte count. */ + uint32_t dseg_0_address; /* Data segment 0 address. */ + uint32_t dseg_0_length; /* Data segment 0 length. */ + uint32_t dseg_1_address; /* Data segment 1 address. */ + uint32_t dseg_1_length; /* Data segment 1 length. */ + uint32_t dseg_2_address; /* Data segment 2 address. */ + uint32_t dseg_2_length; /* Data segment 2 length. */ +} cmd_entry_t; + +/* + * ISP queue - 64-Bit addressing, command entry structure definition. + */ +#define COMMAND_A64_TYPE 0x19 /* Command A64 entry */ +typedef struct { + uint8_t entry_type; /* Entry type. */ + uint8_t entry_count; /* Entry count. */ + uint8_t sys_define; /* System defined. */ + uint8_t entry_status; /* Entry Status. */ + uint32_t handle; /* System handle. */ +#if defined(EXTENDED_IDS) + uint16_t target; /* SCSI ID */ +#else + uint8_t reserved; + uint8_t target; /* SCSI ID */ +#endif + uint16_t lun; /* SCSI LUN */ + uint16_t control_flags; /* Control flags. */ + uint16_t reserved_1; + uint16_t timeout; /* Command timeout. */ + uint16_t dseg_count; /* Data segment count. */ + uint8_t scsi_cdb[MAX_CMDSZ]; /* SCSI command words. */ + uint32_t byte_count; /* Total byte count. */ + uint32_t dseg_0_address[2]; /* Data segment 0 address. */ + uint32_t dseg_0_length; /* Data segment 0 length. */ + uint32_t dseg_1_address[2]; /* Data segment 1 address. */ + uint32_t dseg_1_length; /* Data segment 1 length. */ +} cmd_a64_entry_t, request_t; + +/* + * ISP queue - continuation entry structure definition. + */ +#define CONTINUE_TYPE 0x02 /* Continuation entry. */ +typedef struct { + uint8_t entry_type; /* Entry type. */ + uint8_t entry_count; /* Entry count. */ + uint8_t sys_define; /* System defined. */ + uint8_t entry_status; /* Entry Status. */ + uint32_t reserved; + uint32_t dseg_0_address; /* Data segment 0 address. */ + uint32_t dseg_0_length; /* Data segment 0 length. */ + uint32_t dseg_1_address; /* Data segment 1 address. */ + uint32_t dseg_1_length; /* Data segment 1 length. */ + uint32_t dseg_2_address; /* Data segment 2 address. */ + uint32_t dseg_2_length; /* Data segment 2 length. */ + uint32_t dseg_3_address; /* Data segment 3 address. */ + uint32_t dseg_3_length; /* Data segment 3 length. */ + uint32_t dseg_4_address; /* Data segment 4 address. */ + uint32_t dseg_4_length; /* Data segment 4 length. */ + uint32_t dseg_5_address; /* Data segment 5 address. */ + uint32_t dseg_5_length; /* Data segment 5 length. */ + uint32_t dseg_6_address; /* Data segment 6 address. */ + uint32_t dseg_6_length; /* Data segment 6 length. */ +} cont_entry_t; + +/* + * ISP queue - 64-Bit addressing, continuation entry structure definition. + */ +#define CONTINUE_A64_TYPE 0x0A /* Continuation A64 entry. */ +typedef struct { + uint8_t entry_type; /* Entry type. */ + uint8_t entry_count; /* Entry count. */ + uint8_t sys_define; /* System defined. */ + uint8_t entry_status; /* Entry Status. */ + uint32_t dseg_0_address[2]; /* Data segment 0 address. */ + uint32_t dseg_0_length; /* Data segment 0 length. */ + uint32_t dseg_1_address[2]; /* Data segment 1 address. */ + uint32_t dseg_1_length; /* Data segment 1 length. */ + uint32_t dseg_2_address [2]; /* Data segment 2 address. */ + uint32_t dseg_2_length; /* Data segment 2 length. */ + uint32_t dseg_3_address[2]; /* Data segment 3 address. */ + uint32_t dseg_3_length; /* Data segment 3 length. */ + uint32_t dseg_4_address[2]; /* Data segment 4 address. */ + uint32_t dseg_4_length; /* Data segment 4 length. */ +} cont_a64_entry_t; + +/* + * ISP queue - status entry structure definition. + */ +#define STATUS_TYPE 0x03 /* Status entry. */ +typedef struct { + uint8_t entry_type; /* Entry type. */ + uint8_t entry_count; /* Entry count. */ + uint8_t sys_define; /* System defined. */ + uint8_t entry_status; /* Entry Status. */ + uint32_t handle; /* System handle. */ + uint16_t scsi_status; /* SCSI status. */ + uint16_t comp_status; /* Completion status. */ + uint16_t state_flags; /* State flags. */ + uint16_t status_flags; /* Status flags. */ + uint16_t rsp_info_len; /* Response Info Length. */ + uint16_t req_sense_length; /* Request sense data length. */ + uint32_t residual_length; /* Residual transfer length. */ + uint8_t rsp_info[8]; /* FCP response information. */ + uint8_t req_sense_data[32]; /* Request sense data. */ +} sts_entry_t; + +/* + * Status entry entry status + */ +#define RF_INV_E_ORDER BIT_5 /* Invalid entry order. */ +#define RF_INV_E_COUNT BIT_4 /* Invalid entry count. */ +#define RF_INV_E_PARAM BIT_3 /* Invalid entry parameter. */ +#define RF_INV_E_TYPE BIT_2 /* Invalid entry type. */ +#define RF_BUSY BIT_1 /* Busy */ + +/* + * Status entry SCSI status bit definitions. + */ +#define SS_MASK 0xfff /* Reserved bits BIT_12-BIT_15*/ +#define SS_RESIDUAL_UNDER BIT_11 +#define SS_RESIDUAL_OVER BIT_10 +#define SS_SENSE_LEN_VALID BIT_9 +#if defined(ISP2100) +#define SS_RESIDUAL_LEN_VALID BIT_8 +#else +#define SS_RESPONSE_INFO_LEN_VALID BIT_8 +#endif + +#define SS_RESERVE_CONFLICT (BIT_4 | BIT_3) +#define SS_BUSY_CONDITION BIT_3 +#define SS_CONDITION_MET BIT_2 +#define SS_CHECK_CONDITION BIT_1 + +/* + * Status entry completion status + */ +#define CS_COMPLETE 0x0 /* No errors */ +#define CS_INCOMPLETE 0x1 /* Incomplete transfer of cmd. */ +#define CS_DMA 0x2 /* A DMA direction error. */ +#define CS_TRANSPORT 0x3 /* Transport error. */ +#define CS_RESET 0x4 /* SCSI bus reset occurred */ +#define CS_ABORTED 0x5 /* System aborted command. */ +#define CS_TIMEOUT 0x6 /* Timeout error. */ +#define CS_DATA_OVERRUN 0x7 /* Data overrun. */ + +#define CS_DATA_UNDERRUN 0x15 /* Data Underrun. */ +#define CS_QUEUE_FULL 0x1C /* Queue Full. */ +#define CS_PORT_UNAVAILABLE 0x28 /* Port unavailable */ + /* (selection timeout) */ +#define CS_PORT_LOGGED_OUT 0x29 /* Port Logged Out */ +#define CS_PORT_CONFIG_CHG 0x2A /* Port Configuration Changed */ +#define CS_PORT_BUSY 0x2B /* Port Busy */ +#define CS_COMPLETE_CHKCOND 0x30 /* Error? */ +#define CS_BAD_PAYLOAD 0x80 /* Driver defined */ +#define CS_UNKNOWN 0x81 /* Driver defined */ +#define CS_RETRY 0x82 /* Driver defined */ +#define CS_LOOP_DOWN_ABORT 0x83 /* Driver defined */ + +/* + * Status entry status flags + */ +#define SF_LOGOUT_SENT BIT_13 + +/* + * ISP queue - status continuation entry structure definition. + */ +#define STATUS_CONT_TYPE 0x10 /* Status continuation entry. */ +typedef struct { + uint8_t entry_type; /* Entry type. */ + uint8_t entry_count; /* Entry count. */ + uint8_t sys_define; /* System defined. */ + uint8_t entry_status; /* Entry Status. */ + uint8_t data[60]; /* data */ +} sts_cont_entry_t; + +/* + * ISP queue - RIO Type 1 status entry (32 bit I/O entry handles) + * structure definition. + */ +#define STATUS_TYPE_21 0x21 /* Status entry. */ +typedef struct { + uint8_t entry_type; /* Entry type. */ + uint8_t entry_count; /* Entry count. */ + uint8_t handle_count; /* Handle count. */ + uint8_t entry_status; /* Entry Status. */ + uint32_t handle[15]; /* System handles. */ +} sts21_entry_t; + +/* + * ISP queue - RIO Type 2 status entry (16 bit I/O entry handles) + * structure definition. + */ +#define STATUS_TYPE_22 0x22 /* Status entry. */ +typedef struct { + uint8_t entry_type; /* Entry type. */ + uint8_t entry_count; /* Entry count. */ + uint8_t handle_count; /* Handle count. */ + uint8_t entry_status; /* Entry Status. */ + uint16_t handle[30]; /* System handles. */ +} sts22_entry_t; + +/* + * ISP queue - marker entry structure definition. + */ +#define MARKER_TYPE 0x04 /* Marker entry. */ +typedef struct { + uint8_t entry_type; /* Entry type. */ + uint8_t entry_count; /* Entry count. */ + uint8_t handle_count; /* Handle count. */ + uint8_t entry_status; /* Entry Status. */ + uint32_t sys_define_2; /* System defined. */ +#if defined(EXTENDED_IDS) + uint16_t target; /* SCSI ID */ +#else + uint8_t reserved; + uint8_t target; /* SCSI ID */ +#endif + uint8_t modifier; /* Modifier (7-0). */ +#define MK_SYNC_ID_LUN 0 /* Synchronize ID/LUN */ +#define MK_SYNC_ID 1 /* Synchronize ID */ +#define MK_SYNC_ALL 2 /* Synchronize all ID/LUN */ +#define MK_SYNC_LIP 3 /* Synchronize all ID/LUN, */ + /* clear port changed, */ + /* use sequence number. */ + uint8_t reserved_1; + uint16_t sequence_number; /* Sequence number of event */ + uint16_t lun; /* SCSI LUN */ + uint8_t reserved_2[48]; +} mrk_entry_t; + +/* + * ISP queue - Management Server entry structure definition. + */ +#define MS_IOCB_TYPE 0x29 /* Management Server IOCB entry */ +typedef struct { + uint8_t entry_type; /* Entry type. */ + uint8_t entry_count; /* Entry count. */ + uint8_t handle_count; /* Handle count. */ + uint8_t entry_status; /* Entry Status. */ + uint32_t handle1; /* System handle. */ +#if defined(EXTENDED_IDS) + uint16_t loop_id; +#else + uint8_t reserved; + uint8_t loop_id; +#endif + uint16_t status; + uint16_t control_flags; /* Control flags. */ + uint16_t reserved2; + uint16_t timeout; + uint16_t cmd_dsd_count; + uint16_t total_dsd_count; + uint8_t type; + uint8_t r_ctl; + uint16_t rx_id; + uint16_t reserved3; + uint32_t handle2; + uint32_t rsp_bytecount; + uint32_t req_bytecount; + uint32_t dseg_req_address[2]; /* Data segment 0 address. */ + uint32_t dseg_req_length; /* Data segment 0 length. */ + uint32_t dseg_rsp_address[2]; /* Data segment 1 address. */ + uint32_t dseg_rsp_length; /* Data segment 1 length. */ +} ms_iocb_entry_t; + + +/* + * ISP queue - Mailbox Command entry structure definition. + */ +#define MBX_IOCB_TYPE 0x39 +struct mbx_entry { + uint8_t entry_type; + uint8_t entry_count; + uint8_t sys_define1; + /* Use sys_define1 for source type */ +#define SOURCE_SCSI 0x00 +#define SOURCE_IP 0x01 +#define SOURCE_VI 0x02 +#define SOURCE_SCTP 0x03 +#define SOURCE_MP 0x04 +#define SOURCE_MPIOCTL 0x05 +#define SOURCE_ASYNC_IOCB 0x07 + + uint8_t entry_status; + + uint32_t handle; +#if defined(EXTENDED_IDS) + uint16_t loop_id; +#else + uint8_t reserved_1; + uint8_t loop_id; +#endif + + uint16_t status; + uint16_t state_flags; + uint16_t status_flags; + + uint32_t sys_define2[2]; + + uint16_t mb0; + uint16_t mb1; + uint16_t mb2; + uint16_t mb3; + uint16_t mb6; + uint16_t mb7; +#if defined(EXTENDED_IDS) + uint16_t mb9; + uint16_t mb10; + uint32_t reserved_2[2]; +#else + uint32_t reserved_2[3]; +#endif + uint8_t node_name[WWN_SIZE]; + uint8_t port_name[WWN_SIZE]; +}; + +/* + * ISP request and response queue entry sizes + */ +#define RESPONSE_ENTRY_SIZE (sizeof(response_t)) +#define REQUEST_ENTRY_SIZE (sizeof(request_t)) + + +/* + * 24 bit port ID type definition. + */ +typedef union { + uint32_t b24 : 24; + + struct { + uint8_t d_id[3]; + uint8_t rsvd_1; + } r; + + struct { + uint8_t al_pa; + uint8_t area; + uint8_t domain; + uint8_t rsvd_1; + } b; +} port_id_t; +#define INVALID_PORT_ID 0xFFFFFF + +/* + * Switch info gathering structure. + */ +typedef struct { + port_id_t d_id; + uint8_t node_name[WWN_SIZE]; + uint8_t port_name[WWN_SIZE]; + uint32_t type; +#define SW_TYPE_IP BIT_1 +#define SW_TYPE_SCSI BIT_0 +} sw_info_t; + +/* + * Inquiry command structure. + */ +#define INQ_DATA_SIZE 8 + +/* + * Inquiry mailbox IOCB packet definition. + */ +typedef struct { + union { + cmd_a64_entry_t cmd; + sts_entry_t rsp; + } p; + uint8_t inq[INQ_DATA_SIZE]; +} inq_cmd_rsp_t; + +/* + * Report LUN command structure. + */ +#define CHAR_TO_SHORT(a, b) (uint16_t)((uint8_t)b << 8 | (uint8_t)a) + +typedef struct { + uint32_t len; + uint32_t rsrv; +} rpt_hdr_t; + +typedef struct { + struct { + uint8_t b : 6; + uint8_t address_method : 2; + } msb; + uint8_t lsb; + uint8_t unused[6]; +} rpt_lun_t; + +typedef struct { + rpt_hdr_t hdr; + rpt_lun_t lst[MAX_LUNS]; +} rpt_lun_lst_t; + +/* + * Report Lun mailbox IOCB packet definition. + */ +typedef struct { + union { + cmd_a64_entry_t cmd; + sts_entry_t rsp; + } p; + rpt_lun_lst_t list; +} rpt_lun_cmd_rsp_t; + +/* + * SCSI Target Queue structure + */ +typedef struct os_tgt { + struct os_lun *olun[MAX_LUNS]; /* LUN context pointer. */ + struct fc_port *fcport; + uint32_t flags; + uint8_t port_down_retry_count; + uint32_t down_timer; + struct scsi_qla_host *ha; + + /* Persistent binding information */ + port_id_t d_id; + uint8_t node_name[WWN_SIZE]; + uint8_t port_name[WWN_SIZE]; +} os_tgt_t; + +/* + * SCSI Target Queue flags + */ +#define TQF_QUEUE_SUSPENDED BIT_0 /* Queue suspended. */ +#define TQF_BOOT_DEVICE BIT_1 /* Boot device. */ +#define TQF_ONLINE BIT_2 /* Device online to OS. */ +#define TQF_TGT_RST_NEEDED BIT_3 + +/* + * SCSI LUN Queue structure + */ +typedef struct os_lun { + struct fc_lun *fclun; /* FC LUN context pointer. */ + spinlock_t q_lock; /* Lun Lock */ + + unsigned long q_flag; +#define LUN_MPIO_BUSY 2 /* Lun is changing paths */ +#define LUN_EXEC_DELAYED 7 /* Lun execution is delayed */ + + u_long q_timeout; /* total command timeouts */ + atomic_t q_timer; /* suspend timer */ + uint32_t q_count; /* current count */ + uint32_t q_max; /* maxmum count lun can be suspended */ + uint8_t q_state; /* lun State */ +#define LUN_STATE_READY 1 /* lun is ready for i/o */ +#define LUN_STATE_RUN 2 /* lun has a timer running */ +#define LUN_STATE_WAIT 3 /* lun is suspended */ +#define LUN_STATE_TIMEOUT 4 /* lun has timed out */ + + u_long io_cnt; /* total xfer count since boot */ + u_long out_cnt; /* total outstanding IO count */ + u_long w_cnt; /* total writes */ + u_long r_cnt; /* total reads */ + u_long avg_time; /* */ +} os_lun_t; + + +/* LUN BitMask structure definition, array of 32bit words, + * 1 bit per lun. When bit == 1, the lun is masked. + * Most significant bit of mask[0] is lun 0, bit 24 is lun 7. + */ +typedef struct lun_bit_mask { + /* Must allocate at least enough bits to accomodate all LUNs */ +#if ((MAX_FIBRE_LUNS & 0x7) == 0) + uint8_t mask[MAX_FIBRE_LUNS >> 3]; +#else + uint8_t mask[(MAX_FIBRE_LUNS + 8) >> 3]; +#endif +} lun_bit_mask_t; + +/* + * Fibre channel port type. + */ + typedef enum { + FCT_UNKNOWN, + FCT_RSCN, + FCT_SWITCH, + FCT_BROADCAST, + FCT_INITIATOR, + FCT_TARGET +} fc_port_type_t; + +/* + * Fibre channel port structure. + */ +typedef struct fc_port { + struct list_head list; + struct list_head fcluns; + + struct scsi_qla_host *ha; + struct scsi_qla_host *vis_ha; /* only used when suspending lun */ + + uint8_t node_name[WWN_SIZE]; + uint8_t port_name[WWN_SIZE]; + port_id_t d_id; + uint16_t loop_id; + uint16_t old_loop_id; + + fc_port_type_t port_type; + + atomic_t state; + uint32_t flags; + + os_tgt_t *tgt_queue; + uint16_t os_target_id; + + uint16_t iodesc_idx_sent; + + int port_login_retry_count; + int login_retry; + atomic_t port_down_timer; + + uint8_t device_type; + uint8_t unused; + + uint8_t mp_byte; /* multi-path byte (not used) */ + uint8_t cur_path; /* current path id */ + + lun_bit_mask_t lun_mask; +} fc_port_t; + +/* + * Fibre channel port/lun states. + */ +#define FCS_UNCONFIGURED 1 +#define FCS_DEVICE_DEAD 2 +#define FCS_DEVICE_LOST 3 +#define FCS_ONLINE 4 +#define FCS_NOT_SUPPORTED 5 +#define FCS_FAILOVER 6 +#define FCS_FAILOVER_FAILED 7 + +/* + * FC port flags. + */ +#define FCF_FABRIC_DEVICE BIT_0 +#define FCF_LOGIN_NEEDED BIT_1 +#define FCF_FO_MASKED BIT_2 +#define FCF_FAILOVER_NEEDED BIT_3 +#define FCF_RESET_NEEDED BIT_4 +#define FCF_PERSISTENT_BOUND BIT_5 +#define FCF_TAPE_PRESENT BIT_6 +#define FCF_FARP_DONE BIT_7 +#define FCF_FARP_FAILED BIT_8 +#define FCF_FARP_REPLY_NEEDED BIT_9 +#define FCF_AUTH_REQ BIT_10 +#define FCF_SEND_AUTH_REQ BIT_11 +#define FCF_RECEIVE_AUTH_REQ BIT_12 +#define FCF_AUTH_SUCCESS BIT_13 +#define FCF_RLC_SUPPORT BIT_14 +#define FCF_CONFIG BIT_15 /* Needed? */ +#define FCF_RESCAN_NEEDED BIT_16 + +/* No loop ID flag. */ +#define FC_NO_LOOP_ID 0x1000 + +/* + * Fibre channel LUN structure. + */ +typedef struct fc_lun { + struct list_head list; + + fc_port_t *fcport; + fc_port_t *o_fcport; + uint16_t lun; + atomic_t state; + uint8_t device_type; + uint8_t max_path_retries; +} fc_lun_t; + + +/* + * FC-CT interface + * + * NOTE: All structures are big-endian in form. + */ + +#define CT_REJECT_RESPONSE 0x8001 +#define CT_ACCEPT_RESPONSE 0x8002 + +#define NS_N_PORT_TYPE 0x01 +#define NS_NL_PORT_TYPE 0x02 +#define NS_NX_PORT_TYPE 0x7F + +#define GA_NXT_CMD 0x100 +#define GA_NXT_REQ_SIZE (16 + 4) +#define GA_NXT_RSP_SIZE (16 + 620) + +#define GID_PT_CMD 0x1A1 +#define GID_PT_REQ_SIZE (16 + 4) +#define GID_PT_RSP_SIZE (16 + (MAX_FIBRE_DEVICES * 4)) + +#define GPN_ID_CMD 0x112 +#define GPN_ID_REQ_SIZE (16 + 4) +#define GPN_ID_RSP_SIZE (16 + 8) + +#define GNN_ID_CMD 0x113 +#define GNN_ID_REQ_SIZE (16 + 4) +#define GNN_ID_RSP_SIZE (16 + 8) + +#define GFT_ID_CMD 0x117 +#define GFT_ID_REQ_SIZE (16 + 4) +#define GFT_ID_RSP_SIZE (16 + 32) + +#define RFT_ID_CMD 0x217 +#define RFT_ID_REQ_SIZE (16 + 4 + 32) +#define RFT_ID_RSP_SIZE 16 + +#define RFF_ID_CMD 0x21F +#define RFF_ID_REQ_SIZE (16 + 4 + 2 + 1 + 1) +#define RFF_ID_RSP_SIZE 16 + +#define RNN_ID_CMD 0x213 +#define RNN_ID_REQ_SIZE (16 + 4 + 8) +#define RNN_ID_RSP_SIZE 16 + +#define RSNN_NN_CMD 0x239 +#define RSNN_NN_REQ_SIZE (16 + 8 + 1 + 255) +#define RSNN_NN_RSP_SIZE 16 + +/* CT command header -- request/response common fields */ +struct ct_cmd_hdr { + uint8_t revision; + uint8_t in_id[3]; + uint8_t gs_type; + uint8_t gs_subtype; + uint8_t options; + uint8_t reserved; +}; + +/* CT command request */ +struct ct_sns_req { + struct ct_cmd_hdr header; + uint16_t command; + uint16_t max_rsp_size; + uint8_t fragment_id; + uint8_t reserved[3]; + + union { + /* GA_NXT, GPN_ID, GNN_ID, GFT_ID */ + struct { + uint8_t reserved; + uint8_t port_id[3]; + } port_id; + + struct { + uint8_t port_type; + uint8_t domain; + uint8_t area; + uint8_t reserved; + } gid_pt; + + struct { + uint8_t reserved; + uint8_t port_id[3]; + uint8_t fc4_types[32]; + } rft_id; + + struct { + uint8_t reserved; + uint8_t port_id[3]; + uint16_t reserved2; + uint8_t fc4_feature; + uint8_t fc4_type; + } rff_id; + + struct { + uint8_t reserved; + uint8_t port_id[3]; + uint8_t node_name[8]; + } rnn_id; + + struct { + uint8_t node_name[8]; + uint8_t name_len; + uint8_t sym_node_name[255]; + } rsnn_nn; + } req; +}; + +/* CT command response header */ +struct ct_rsp_hdr { + struct ct_cmd_hdr header; + uint16_t response; + uint16_t residual; + uint8_t fragment_id; + uint8_t reason_code; + uint8_t explanation_code; + uint8_t vendor_unique; +}; + +struct ct_sns_gid_pt_data { + uint8_t control_byte; + uint8_t port_id[3]; +}; + +struct ct_sns_rsp { + struct ct_rsp_hdr header; + + union { + struct { + uint8_t port_type; + uint8_t port_id[3]; + uint8_t port_name[8]; + uint8_t sym_port_name_len; + uint8_t sym_port_name[255]; + uint8_t node_name[8]; + uint8_t sym_node_name_len; + uint8_t sym_node_name[255]; + uint8_t init_proc_assoc[8]; + uint8_t node_ip_addr[16]; + uint8_t class_of_service[4]; + uint8_t fc4_types[32]; + uint8_t ip_address[16]; + uint8_t fabric_port_name[8]; + uint8_t reserved; + uint8_t hard_address[3]; + } ga_nxt; + + struct { + struct ct_sns_gid_pt_data entries[MAX_FIBRE_DEVICES]; + } gid_pt; + + struct { + uint8_t port_name[8]; + } gpn_id; + + struct { + uint8_t node_name[8]; + } gnn_id; + + struct { + uint8_t fc4_types[32]; + } gft_id; + } rsp; +}; + +struct ct_sns_pkt { + union { + struct ct_sns_req req; + struct ct_sns_rsp rsp; + } p; +}; + + +/* IO descriptors */ +#define MAX_IO_DESCRIPTORS 32 + +#define ABORT_IOCB_CB 0 +#define ADISC_PORT_IOCB_CB 1 +#define LOGOUT_PORT_IOCB_CB 2 +#define LOGIN_PORT_IOCB_CB 3 +#define LAST_IOCB_CB 4 + +#define IODESC_INVALID_INDEX 0xFFFF +#define IODESC_ADISC_NEEDED 0xFFFE +#define IODESC_LOGIN_NEEDED 0xFFFD + +struct io_descriptor { + uint16_t used:1; + uint16_t idx:11; + uint16_t cb_idx:4; + + struct timer_list timer; + + struct scsi_qla_host *ha; + + port_id_t d_id; + fc_port_t *remote_fcport; + + uint32_t signature; +}; + + +//TODO Complete Formatting... + +#define MAX_IOCTL_WAIT_THREADS 32 +typedef struct _wait_q_t { + uint8_t flags; +#define WQ_IN_USE 0x1 + + struct semaphore wait_q_sem; + struct _wait_q_t *pnext; +} wait_q_t; + +typedef struct hba_ioctl{ + + /* Ioctl cmd serialization */ + uint16_t access_bits; /* bits should be used atomically */ +#define IOCTL_ACTIVE 1 /* first bit */ +#define IOCTL_WANT 2 /* 2nd bit */ + + spinlock_t wait_q_lock; /* IOCTL wait_q Queue Lock */ + wait_q_t wait_q_arr[MAX_IOCTL_WAIT_THREADS]; + wait_q_t *wait_q_head; + wait_q_t *wait_q_tail; + + /* Passthru cmd/completion */ + struct semaphore cmpl_sem; + struct timer_list cmpl_timer; + uint8_t ioctl_tov; + uint8_t SCSIPT_InProgress; + uint8_t MSIOCB_InProgress; + + os_tgt_t *ioctl_tq; + os_lun_t *ioctl_lq; + + /* AEN queue */ + void *aen_tracking_queue;/* points to async events buffer */ + uint8_t aen_q_head; /* index to the current head of q */ + uint8_t aen_q_tail; /* index to the current tail of q */ + + /* Misc. */ + uint32_t flags; +#define IOCTL_OPEN BIT_0 +#define IOCTL_AEN_TRACKING_ENABLE BIT_1 + uint8_t *scrap_mem; /* per ha scrap buf for ioctl usage */ + uint32_t scrap_mem_size; /* total size */ + uint32_t scrap_mem_used; /* portion used */ + +} hba_ioctl_context; + +/* Mailbox command semaphore queue for command serialization */ +typedef struct _mbx_cmdq_t { + struct semaphore cmd_sem; + struct _mbx_cmdq_t *pnext; +} mbx_cmdq_t; + + +/* Linux PCI interface definitions */ +struct qla_fw_info { + unsigned short addressing; /* addressing method used to load fw */ +#define FW_INFO_ADDR_NORMAL 0 +#define FW_INFO_ADDR_EXTENDED 1 +#define FW_INFO_ADDR_NOMORE 0xffff + unsigned short *fwcode; /* pointer to FW array */ + unsigned short *fwlen; /* number of words in array */ + unsigned short *fwstart; /* start address for F/W */ + unsigned long *lfwstart; /* start address (long) for F/W */ +}; +struct qla_board_info { + char name[9]; /* Board ID String */ + struct qla_fw_info *fwinfo; +}; + + +/* + * Linux Host Adapter structure + */ +typedef struct scsi_qla_host { + struct list_head list; + + /* Commonly used flags and state information. */ + + struct Scsi_Host *host; + struct pci_dev *pdev; + + unsigned long host_no; + unsigned long instance; + + uint16_t nvram_base; + + struct qla_board_info *brd_info; + uint16_t fw_major_version; + uint16_t fw_minor_version; + uint16_t fw_subminor_version; + uint16_t fw_attributes; + uint32_t fw_transfer_size; + + uint16_t fw_options[16]; /* slots: 1,2,3,10,11 */ + uint8_t fw_seriallink_options[2]; + + /* SRB cache. */ + kmem_cache_t *srb_cachep; + + ms_iocb_entry_t *ms_iocb; + dma_addr_t ms_iocb_dma; + struct ct_sns_pkt *ct_sns; + dma_addr_t ct_sns_dma; + + /* This spinlock is used to protect "io transactions", you must + * aquire it before doing any IO to the card, eg with RD_REG*() and + * WRT_REG*() for the duration of your entire commandtransaction. + * + * This spinlock is of lower priority than the io request lock. + */ + + spinlock_t hardware_lock ____cacheline_aligned; + + device_reg_t *iobase; /* Base I/O address */ + unsigned long pio_address; + unsigned long pio_length; + void * mmio_address; + unsigned long mmio_length; +#define MIN_IOBASE_LEN 0x100 + + /* ISP ring lock, rings, and indexes */ + dma_addr_t request_dma; /* Physical address. */ + request_t *request_ring; /* Base virtual address */ + request_t *request_ring_ptr; /* Current address. */ + uint16_t req_ring_index; /* Current index. */ + uint16_t req_q_cnt; /* Number of available entries. */ + + dma_addr_t response_dma; /* Physical address. */ + response_t *response_ring; /* Base virtual address */ + response_t *response_ring_ptr; /* Current address. */ + uint16_t rsp_ring_index; /* Current index. */ + + /* Outstandings ISP commands. */ + srb_t *outstanding_cmds[MAX_OUTSTANDING_COMMANDS]; + uint32_t current_outstanding_cmd; + + uint16_t (*calc_request_entries)(uint16_t); + void (*build_scsi_iocbs)(srb_t *, cmd_entry_t *, uint16_t); + + uint16_t revision; + uint8_t ports; + u_long actthreads; + u_long ipreq_cnt; + u_long qthreads; + + unsigned long last_irq_cpu; /* cpu where we got our last irq */ + uint32_t total_isr_cnt; /* Interrupt count */ + uint32_t total_isp_aborts; /* controller err cnt */ + uint32_t total_lip_cnt; /* LIP cnt */ + uint32_t total_dev_errs; /* device error cnt */ + uint32_t total_ios; /* IO cnt */ + uint64_t total_bytes; /* xfr byte cnt */ + uint32_t total_mbx_timeout; /* mailbox timeout cnt */ + uint32_t total_loop_resync; /* loop resyn cnt */ + + /* Adapter I/O statistics for failover */ + uint64_t IosRequested; + uint64_t BytesRequested; + uint64_t IosExecuted; + uint64_t BytesExecuted; + + /* ISP connection configuration data */ + uint16_t max_public_loop_ids; + uint16_t min_external_loopid; /* First external loop Id */ + uint8_t current_topology; /* Current ISP configuration */ + uint8_t prev_topology; /* Previous ISP configuration */ + #define ISP_CFG_NL 1 + #define ISP_CFG_N 2 + #define ISP_CFG_FL 4 + #define ISP_CFG_F 8 + uint16_t loop_id; /* Host adapter loop id */ + port_id_t d_id; /* Host adapter port id */ + + uint8_t operating_mode; /* current F/W operating mode */ + #define LOOP 0 + #define P2P 1 + #define LOOP_P2P 2 + #define P2P_LOOP 3 + + uint8_t active_fc4_types;/* active fc4 types */ + uint8_t current_speed; /* current F/W operating speed */ + + /* NVRAM configuration data */ + uint16_t loop_reset_delay; /* Loop reset delay. */ + uint16_t minimum_timeout; /* Minimum timeout. */ + uint8_t retry_count; + uint8_t login_timeout; + uint16_t r_a_tov; + int port_down_retry_count; + uint8_t loop_down_timeout; + uint16_t max_probe_luns; + uint16_t max_luns; + uint16_t max_targets; + + /* Fibre Channel Device List. */ + struct list_head fcports; + + struct list_head rscn_fcports; + + struct io_descriptor io_descriptors[MAX_IO_DESCRIPTORS]; + uint16_t iodesc_signature; + + port_database_t *iodesc_pd; + dma_addr_t iodesc_pd_dma; + + /* OS target queue pointers. */ + os_tgt_t *otgt[MAX_FIBRE_DEVICES]; + + /* RSCN queue. */ + uint32_t rscn_queue[MAX_RSCN_COUNT]; + uint8_t rscn_in_ptr; + uint8_t rscn_out_ptr; + + /* + * Need to hold the list_lock with irq's disabled in order to + * access the following list. + * This list_lock is of lower priority than the io_request_lock. + */ + /*********************************************************/ + spinlock_t list_lock ____cacheline_aligned; + /* lock to guard lists which + * hold srb_t's */ + struct list_head retry_queue; /* watchdog queue */ + struct list_head done_queue; /* job on done queue */ + struct list_head failover_queue; /* failover list link. */ + struct list_head scsi_retry_queue; /* SCSI retry queue */ + + struct list_head pending_queue; /* SCSI command pending queue */ + + /*********************************************************/ + + pid_t dpc_pid; + int dpc_should_die; + struct completion dpc_inited; + struct completion dpc_exited; + struct semaphore *dpc_wait; + + uint8_t dpc_active; /* DPC routine is active */ + + /* Received ISP mailbox data. */ + volatile uint16_t mailbox_out[MAILBOX_REGISTER_COUNT]; + + /* Firmware Initialization Control Block data */ + dma_addr_t init_cb_dma; /* Physical address. */ + init_cb_t *init_cb; + + /* Timeout timers. */ + uint8_t queue_restart_timer; + atomic_t loop_down_timer; /* loop down timer */ + uint8_t loop_down_abort_time; /* port down timer */ + uint8_t link_down_timeout; /* link down timeout */ + uint32_t timer_active; + uint32_t forceLip; + struct timer_list timer; + + /* These are used by mailbox operations. */ + mbx_cmd_t *mcp; + unsigned long mbx_cmd_flags; +#define MBX_CMD_ACTIVE 1 /* first bit */ +#define MBX_CMD_WANT 2 /* 2nd bit */ +#define MBX_INTERRUPT 3 /* 3rd bit */ +#define MBX_INTR_WAIT 4 /* 4rd bit */ + + spinlock_t mbx_reg_lock; /* Mbx Cmd Register Lock */ + spinlock_t mbx_q_lock; /* Mbx Active Cmd Queue Lock */ + spinlock_t mbx_bits_lock; /* Mailbox access bits Lock */ + + uint32_t mbx_lock_bits; /* controlled by mbx_bits_lock */ +#define MBX_CMD_LOCK 1 /* first bit */ +#define MBX_CMD_WANT 2 /* 2nd bit */ + + struct semaphore mbx_intr_sem; /* Used for completion notification */ + + mbx_cmdq_t *mbx_sem_pool_head; /* Head Pointer to a list of + * recyclable mbx semaphore pool + * to be used during run time. + */ + mbx_cmdq_t *mbx_sem_pool_tail; /* Tail Pointer to semaphore pool*/ +#define MBQ_INIT_LEN 16 /* initial mbx sem pool q len. actual len may vary */ + + mbx_cmdq_t *mbx_q_head; /* Head Pointer to sem q for active cmds */ + mbx_cmdq_t *mbx_q_tail; /* Tail Pointer to sem q for active cmds */ + + + uint32_t retry_q_cnt; + uint32_t scsi_retry_q_cnt; + uint32_t failover_cnt; + + uint8_t *cmdline; + + uint32_t login_retry_count; + + volatile struct + { + uint32_t online :1; /* 0 */ + uint32_t enable_64bit_addressing :1; /* 1 */ + uint32_t mbox_int :1; /* 2 */ + uint32_t mbox_busy :1; /* 3 */ + + // UNUSED and UNASSIGNED + uint32_t port_name_used :1; /* 4 */ + + uint32_t failover_enabled :1; /* 5 */ + uint32_t watchdog_enabled :1; /* 6 */ + uint32_t cfg_suspended :1; /* 7 */ + + uint32_t disable_host_adapter :1; /* 8 */ + uint32_t rscn_queue_overflow :1; /* 9 */ + uint32_t reset_active :1; /* 10 */ + + // UNUSED and UNASSIGNED + uint32_t link_down_error_enable :1; /* 11 */ + + uint32_t disable_risc_code_load :1; /* 12 */ + uint32_t set_cache_line_size_1 :1; /* 13 */ + + // UNUSED and UNASSIGNED + uint32_t enable_target_mode :1; /* 14 */ + + uint32_t disable_luns :1; /* 15 */ + + uint32_t enable_lip_reset :1; /* 16 */ + uint32_t enable_lip_full_login :1; /* 17 */ + uint32_t enable_target_reset :1; /* 18 */ + + // UNUSED and UNASSIGNED + uint32_t updated_fc_db :1; /* 19 */ + + uint32_t enable_flash_db_update :1; /* 20 */ + uint32_t in_isr :1; /* 21 */ + uint32_t dpc_sched :1; /* 23 */ + + // UNUSED and UNASSIGNED + uint32_t nvram_config_done :1; /* 24 */ + + // UNUSED and UNASSIGNED + uint32_t update_config_needed :1; /* 25 */ + uint32_t management_server_logged_in :1; /* 26 */ + uint32_t process_response_queue :1; /* 27 */ + } flags; + + uint32_t device_flags; +#define DFLG_LOCAL_DEVICES BIT_0 +#define DFLG_RETRY_LOCAL_DEVICES BIT_1 +#define DFLG_FABRIC_DEVICES BIT_2 +#define SWITCH_FOUND BIT_3 +#define DFLG_NO_CABLE BIT_4 + + uint8_t marker_needed; + uint8_t sns_retry_cnt; + uint8_t mem_err; + + unsigned long dpc_flags; +#define RESET_MARKER_NEEDED 0 /* initiate sending a marker to ISP */ +#define RESET_ACTIVE 1 +#define ISP_ABORT_NEEDED 2 /* initiate ISP Abort */ +#define ABORT_ISP_ACTIVE 3 /* isp abort in progress */ + +#define LOOP_RESYNC_NEEDED 4 /* initiate a configure fabric sequence */ +#define LOOP_RESYNC_ACTIVE 5 + +/* UNUSED BITS */ +/* +#define COMMAND_WAIT_NEEDED 6 +#define COMMAND_WAIT_ACTIVE 7 +*/ + +#define LOCAL_LOOP_UPDATE 8 /* Perform a local loop update */ +#define RSCN_UPDATE 9 /* Perform a RSCN update */ +#define MAILBOX_RETRY 10 +#define ISP_RESET_NEEDED 11 /* Initiate a ISP reset ??? */ + +#define FAILOVER_EVENT_NEEDED 12 +#define FAILOVER_EVENT 13 +#define FAILOVER_NEEDED 14 + +/* UNUSED BITS */ +/* +#define LOOP_RESET_NEEDED 15 +#define DEVICE_RESET_NEEDED 16 +#define DEVICE_ABORT_NEEDED 17 + */ + +#define SCSI_RESTART_NEEDED 18 /* Processes any requests in scsi retry queue */ +#define PORT_RESTART_NEEDED 19 /* Processes any requests in retry queue */ + +#define RESTART_QUEUES_NEEDED 20 /* Restarts requeusts in the lun queue */ +#define ABORT_QUEUES_NEEDED 21 +#define RELOGIN_NEEDED 22 +#define LOGIN_RETRY_NEEDED 23 /* initiates any fabric logins that are required */ +#define REGISTER_FC4_NEEDED 24 /* set when need to register again.*/ + +/* UNUSED BITS */ +/* +#define TASKLET_SCHED 25 +#define DONE_RUNNING 26 + */ + +#define ISP_ABORT_RETRY 27 /* ISP aborted. */ + +#define FCPORT_RESCAN_NEEDED 28 /* IO descriptor processing needed */ +#define IODESC_PROCESS_NEEDED 29 /* IO descriptor processing needed */ + + uint8_t interrupts_on; + uint8_t init_done; + + volatile uint16_t loop_state; +#define LOOP_TIMEOUT 0x01 +#define LOOP_DOWN 0x02 +#define LOOP_UP 0x04 +#define LOOP_UPDATE 0x08 +#define LOOP_READY 0x10 +#define LOOP_DEAD 0x20 /* Link Down Timer expires */ + + mbx_cmd_t mc; + uint32_t mbx_flags; +#define MBX_IN_PROGRESS BIT_0 +#define MBX_BUSY BIT_1 /* Got the Access */ +#define MBX_SLEEPING_ON_SEM BIT_2 +#define MBX_POLLING_FOR_COMP BIT_3 +#define MBX_COMPLETED BIT_4 +#define MBX_TIMEDOUT BIT_5 +#define MBX_ACCESS_TIMEDOUT BIT_6 + +/* following are new and needed for IOCTL support */ + hba_ioctl_context *ioctl; + uint8_t node_name[WWN_SIZE]; + + uint8_t optrom_major; + uint8_t optrom_minor; + + uint8_t nvram_version; + + void *ioctl_mem; + dma_addr_t ioctl_mem_phys; + uint32_t ioctl_mem_size; + uint32_t isp_abort_cnt; + + /* HBA serial number */ + uint8_t serial0; + uint8_t serial1; + uint8_t serial2; + +#if defined(ISP2300) + uint16_t fb_rev; +#endif + + /* HBA Model Number */ + uint8_t model_number[16+1]; +#define BINZERO "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" + + /* OEM related items */ + uint8_t oem_specific[16]; + + uint32_t dump_done; + unsigned long done_q_cnt; + unsigned long pending_in_q; + + uint32_t failover_type; + uint32_t failback_delay; + unsigned long cfg_flags; +#define CFG_ACTIVE 0 /* CFG during a failover, event update, or ioctl */ + + uint32_t binding_type; +#define BIND_BY_PORT_NAME 0 +#define BIND_BY_PORT_ID 1 +#define BIND_BY_NODE_NAME 2 + + srb_t *status_srb; /* Keep track of Status Continuation Entries */ + + uint32_t dropped_frame_error_cnt; + +#if defined(ISP2300) + /* Needed for BEACON */ + uint16_t beacon_blink_led; + uint16_t beacon_green_on; +#endif + + uint8_t host_str[16]; + uint16_t pci_attr; + uint16_t xchg_buf_cnt; + uint16_t iocb_buf_cnt; + + struct fw_dump *fw_dump; + int fw_dump_order; + int fw_dump_reading; + char *fw_dump_buffer; +} scsi_qla_host_t; + + +/* + * Macros to help code, maintain, etc. + */ +#define LOOP_TRANSITION(ha) \ + (test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || \ + test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)) + +#define LOOP_NOT_READY(ha) \ + ((test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || \ + test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || \ + test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \ + test_bit(LOOP_RESYNC_ACTIVE, &ha->dpc_flags)) || \ + ha->loop_state == LOOP_DOWN) + +#define LOOP_RDY(ha) (!LOOP_NOT_READY(ha)) + +#define TGT_Q(ha, t) (ha->otgt[t]) +#define LUN_Q(ha, t, l) (TGT_Q(ha, t)->olun[l]) +#define GET_LU_Q(ha, t, l) ((TGT_Q(ha,t) != NULL)? TGT_Q(ha, t)->olun[l] : NULL) + +#define KMEM_ZALLOC(siz,id) qla2x00_kmem_zalloc((siz), GFP_ATOMIC, (id)) +#define KMEM_FREE(ip,siz) kfree((ip)) + +#define QLA_HA(x) ((scsi_qla_host_t *) x->hostdata) + +#define qla_printk(level, ha, format, arg...) \ + dev_printk(level , &((ha)->pdev->dev) , format , ## arg) + +/* + * qla2x00 local function return status codes + */ +#define MBS_MASK 0x3fff + +#define QLA_SUCCESS (MBS_COMMAND_COMPLETE & MBS_MASK) +#define QLA_INVALID_COMMAND (MBS_INVALID_COMMAND & MBS_MASK) +#define QLA_INTERFACE_ERROR (MBS_HOST_INTERFACE_ERROR & MBS_MASK) +#define QLA_TEST_FAILED (MBS_TEST_FAILED & MBS_MASK) +#define QLA_COMMAND_ERROR (MBS_COMMAND_ERROR & MBS_MASK) +#define QLA_PARAMETER_ERROR (MBS_COMMAND_PARAMETER_ERROR & MBS_MASK) +#define QLA_PORT_ID_USED (MBS_PORT_ID_USED & MBS_MASK) +#define QLA_LOOP_ID_USED (MBS_LOOP_ID_USED & MBS_MASK) +#define QLA_ALL_IDS_IN_USE (MBS_ALL_IDS_IN_USE & MBS_MASK) +#define QLA_NOT_LOGGED_IN (MBS_NOT_LOGGED_IN & MBS_MASK) + +#define QLA_FUNCTION_TIMEOUT 0x100 +#define QLA_FUNCTION_PARAMETER_ERROR 0x101 +#define QLA_FUNCTION_FAILED 0x102 +#define QLA_MEMORY_ALLOC_FAILED 0x103 +#define QLA_LOCK_TIMEOUT 0x104 +#define QLA_ABORTED 0x105 +#define QLA_SUSPENDED 0x106 +#define QLA_BUSY 0x107 +#define QLA_RSCNS_HANDLED 0x108 + +/* + * LOCK MACROS + */ +#define QLA_MBX_REG_LOCK(ha) \ + spin_lock_irqsave(&(ha)->mbx_reg_lock, mbx_flags) +#define QLA_MBX_REG_UNLOCK(ha) \ + spin_unlock_irqrestore(&(ha)->mbx_reg_lock, mbx_flags) + +/* +* Stat info for all adpaters +*/ +struct _qla2x00stats { + unsigned long mboxtout; /* mailbox timeouts */ + unsigned long mboxerr; /* mailbox errors */ + unsigned long ispAbort; /* ISP aborts */ + unsigned long debugNo; + unsigned long loop_resync; + unsigned long outarray_full; + unsigned long retry_q_cnt; +}; + +#define SYS_DELAY(x) udelay(x);barrier() +#define QLA2100_DELAY(sec) mdelay(sec * HZ) +#define NVRAM_DELAY() udelay(10) +#define UDELAY(x) udelay(x) + +#define CACHE_FLUSH(a) (RD_REG_WORD(a)) +#define INVALID_HANDLE (MAX_OUTSTANDING_COMMANDS+1) + +/* + * Flash support definitions + */ +#define FLASH_IMAGE_SIZE 131072 + +#include "qla_fo.h" +#include "qla_cfg.h" +#include "qla_gbl.h" +#include "qla_dbg.h" +#include "qla_inline.h" +#include "qla_listops.h" + +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_devtbl.h 999-mjb/drivers/scsi/qla2xxx/qla_devtbl.h --- 000-virgin/drivers/scsi/qla2xxx/qla_devtbl.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_devtbl.h 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,32 @@ +#define QLA_MODEL_NAMES 0x19 + +/* + * Adapter model names. + */ +char *qla2x00_model_name[QLA_MODEL_NAMES] = { + "QLA2340", /* 0x100 */ + "QLA2342", /* 0x101 */ + "QLA2344", /* 0x102 */ + "QLA2342", /* 0x103 */ + "QLA2340", /* 0x104 */ + "QLA2342", /* 0x105 */ + "QLA2310", /* 0x106 */ + "QLA2332", /* 0x107 */ + "QCP2332", /* 0x108 */ + "QCP2340", /* 0x109 */ + "QLA2342", /* 0x10a */ + "QCP2342", /* 0x10b */ + "QLA2350", /* 0x10c */ + "QLA2352", /* 0x10d */ + "QLA2352", /* 0x10e */ + "HPQSVS ", /* 0x10f */ + "HPQSVS ", /* 0x110 */ + "QLA4010", /* 0x111 */ + "QLA4010", /* 0x112 */ + "QLA4010", /* 0x113 */ + "QLA4010", /* 0x114 */ + "QLA2360", /* 0x115 */ + "QLA2362", /* 0x116 */ + "QLA2350", /* 0x117 */ + "QLA2352" /* 0x118 */ +}; diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_fo.c 999-mjb/drivers/scsi/qla2xxx/qla_fo.c --- 000-virgin/drivers/scsi/qla2xxx/qla_fo.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_fo.c 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,2630 @@ +/******************************************************************************** +* QLOGIC LINUX SOFTWARE +* +* QLogic ISP2x00 device driver for Linux 2.6.x +* Copyright (C) 2003 QLogic Corporation +* (www.qlogic.com) +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2, or (at your option) any +* later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +****************************************************************************** +* Failover include file +******************************************************************************/ + +#include "qla_os.h" +#include "qla_def.h" + +#include "qlfo.h" +#include "qlfolimits.h" + +//TODO Why?? +#include "qla_fo.cfg" + +/* This type is used to create a temporary list of port names */ +typedef struct _portname_list { + struct _portname_list *pnext; + uint8_t portname[8]; +} portname_list; + +/* + * Global variables + */ +SysFoParams_t qla_fo_params; + +/* + * Local routines + */ +#if !defined(linux) +static int qla2x00_sdm_setup(EXT_IOCTL *cmd_stp, void *arg, int mode); +#endif +static uint32_t qla2x00_fo_get_params(PFO_PARAMS pp); +static uint32_t qla2x00_fo_set_params(PFO_PARAMS pp); +static uint8_t qla2x00_fo_count_retries(scsi_qla_host_t *ha, srb_t *sp); +static int qla2x00_fo_get_lun_data(EXT_IOCTL *pext, + FO_LUN_DATA_INPUT *bp, int mode); +static int qla2x00_fo_set_lun_data(EXT_IOCTL *pext, + FO_LUN_DATA_INPUT *bp, int mode); +static uint32_t qla2x00_fo_stats(FO_HBA_STAT *stat_p, uint8_t reset); +static int qla2x00_fo_get_target_data(EXT_IOCTL *pext, + FO_TARGET_DATA_INPUT *bp, int mode); + +static int qla2x00_std_get_tgt(scsi_qla_host_t *, EXT_IOCTL *, + FO_DEVICE_DATA *); +static int qla2x00_fo_get_tgt(mp_host_t *, scsi_qla_host_t *, EXT_IOCTL *, + FO_DEVICE_DATA *); +static int qla2x00_fo_set_target_data(EXT_IOCTL *pext, + FO_TARGET_DATA_INPUT *bp, int mode); + +static int qla2x00_port_name_in_list(uint8_t *, portname_list *); +static int qla2x00_add_to_portname_list(uint8_t *, portname_list **); +static void qla2x00_free_portname_list(portname_list **); + +/* + * qla2x00_get_hba + * Searches the hba structure chain for the requested instance + * aquires the mutex and returns a pointer to the hba structure. + * + * Input: + * inst = adapter instance number. + * + * Returns: + * Return value is a pointer to the adapter structure or + * NULL if instance not found. + * + * Context: + * Kernel context. + */ +scsi_qla_host_t * +qla2x00_get_hba(unsigned long instance) +{ + int found; + struct list_head *hal; + scsi_qla_host_t *ha; + + ha = NULL; + found = 0; + read_lock(&qla_hostlist_lock); + list_for_each(hal, &qla_hostlist) { + ha = list_entry(hal, scsi_qla_host_t, list); + + if (ha->instance == instance) { + found++; + break; + } + } + read_unlock(&qla_hostlist_lock); + + return (found ? ha : NULL); +} + +/* + * qla2x00_fo_stats + * Searches the hba structure chan for the requested instance + * aquires the mutex and returns a pointer to the hba structure. + * + * Input: + * stat_p = Pointer to FO_HBA_STAT union. + * reset = Flag, TRUE = reset statistics. + * FALSE = return statistics values. + * + * Returns: + * 0 = success + * + * Context: + * Kernel context. + */ +static uint32_t +qla2x00_fo_stats(FO_HBA_STAT *stat_p, uint8_t reset) +{ + int32_t inst, idx; + uint32_t rval = 0; + struct list_head *hal; + scsi_qla_host_t *ha; + + DEBUG9(printk("%s: entered.\n", __func__);) + + inst = stat_p->input.HbaInstance; + stat_p->info.HbaCount = 0; + + ha = NULL; + + read_lock(&qla_hostlist_lock); + list_for_each(hal, &qla_hostlist) { + ha = list_entry(hal, scsi_qla_host_t, list); + + if (inst == FO_ADAPTER_ALL) { + stat_p->info.HbaCount++; + idx = ha->instance; + } else if (ha->instance == inst) { + stat_p->info.HbaCount = 1; + idx = inst; + } + if (reset == TRUE) { + DEBUG9(printk("%s: reset stats.\n", __func__);) + ha->IosRequested = 0; + ha->BytesRequested = 0; + ha->IosExecuted = 0; + ha->BytesExecuted = 0; + } else { + DEBUG9(printk("%s: get stats for inst %d.\n", + __func__, inst);) + +#if 0 + stat_p->info.StatEntry[idx].IosRequested = + ha->IosRequested; + stat_p->info.StatEntry[idx].BytesRequested = + ha->BytesRequested; + stat_p->info.StatEntry[idx].IosExecuted = + ha->IosExecuted; + stat_p->info.StatEntry[idx].BytesExecuted = + ha->BytesExecuted; +#endif + } + if (inst != FO_ADAPTER_ALL) + break; + } + read_unlock(&qla_hostlist_lock); + + DEBUG9(printk("%s: exiting.\n", __func__);) + + return rval; +} + +/* + * qla2x00_fo_get_lun_data + * Get lun data from all devices attached to a HBA (FO_GET_LUN_DATA). + * Gets lun mask if failover not enabled. + * + * Input: + * ha = pointer to adapter + * bp = pointer to buffer + * + * Return; + * 0 on success or errno. + * + * Context: + * Kernel context. + */ +static int +qla2x00_fo_get_lun_data(EXT_IOCTL *pext, FO_LUN_DATA_INPUT *bp, int mode) +{ + scsi_qla_host_t *ha; + struct list_head *fcports; + fc_port_t *fcport; + int ret = 0; + mp_host_t *host = NULL; + mp_device_t *dp; + mp_path_t *path; + mp_path_list_t *pathlist; + os_tgt_t *ostgt; + uint8_t path_id; + uint16_t dev_no; + uint16_t cnt; + uint16_t lun; + FO_EXTERNAL_LUN_DATA_ENTRY *u_entry, *entry; + FO_LUN_DATA_LIST *u_list, *list; + + + DEBUG9(printk("%s: entered.\n", __func__);) + + ha = qla2x00_get_hba((unsigned long)bp->HbaInstance); + + if (!ha) { + DEBUG2_9_10(printk("%s: no ha matching inst %d.\n", + __func__, bp->HbaInstance);) + + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + return (ret); + } + + DEBUG9(printk("%s: ha inst %ld, buff %p.\n", + __func__, ha->instance, bp);) + DEBUG4(printk("%s: hba %p, buff %p bp->HbaInstance(%x).\n", + __func__, ha, bp, (int)bp->HbaInstance)); + + if (ha->flags.failover_enabled) { + if ((host = qla2x00_cfg_find_host(ha)) == NULL) { + if (list_empty(&ha->fcports)) { + DEBUG2_9_10(printk( + "%s: no HOST for ha inst %ld.\n", + __func__, ha->instance);) + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + return (ret); + } + + /* Since all ports are unconfigured, return a dummy + * entry for each of them. + */ + list = (FO_LUN_DATA_LIST *)qla2x00_kmem_zalloc( + sizeof(FO_LUN_DATA_LIST), GFP_ATOMIC, 12); + if (list == NULL) { + DEBUG2_9_10(printk("%s: failed to alloc " + "memory of size (%d)\n", __func__, + (int)sizeof(FO_LUN_DATA_LIST));) + pext->Status = EXT_STATUS_NO_MEMORY; + return (-ENOMEM); + } + + entry = &list->DataEntry[0]; + + u_list = (FO_LUN_DATA_LIST *)pext->ResponseAdr; + u_entry = &u_list->DataEntry[0]; + + fcport = NULL; + list_for_each_entry(fcport, &ha->fcports, list) { + memcpy(entry->NodeName, fcport->node_name, + EXT_DEF_WWN_NAME_SIZE); + memcpy(entry->PortName, fcport->port_name, + EXT_DEF_WWN_NAME_SIZE); + + DEBUG9(printk("%s(%ld): entry %d for " + "unconfigured portname=%02x%02x" + "%02x%02x%02x%02x%02x%02x, " + "tgt_id=%d.\n", + __func__, ha->host_no, + list->EntryCount, + entry->PortName[0], + entry->PortName[1], + entry->PortName[2], + entry->PortName[3], + entry->PortName[4], + entry->PortName[5], + entry->PortName[6], + entry->PortName[7], + entry->TargetId);) + + list->EntryCount++; + + ret = verify_area(VERIFY_WRITE, + (void *)u_entry, + sizeof(FO_EXTERNAL_LUN_DATA_ENTRY)); + if (ret) { + /* error */ + DEBUG2_9_10(printk( + "%s: u_entry %p verify " + "wrt err. EntryCount=%d.\n", __func__, u_entry, + list->EntryCount);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + ret = copy_to_user(u_entry, entry, + sizeof(FO_EXTERNAL_LUN_DATA_ENTRY)); + if (ret) { /* error */ + DEBUG2_9_10(printk( + "%s: u_entry %p copy out " + "err. EntryCount=%d.\n", + __func__, u_entry, + list->EntryCount);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + u_entry++; + } + + if (ret == 0) { + ret = verify_area(VERIFY_WRITE, + (void *)&u_list->EntryCount, + sizeof(list->EntryCount)); + if (ret) { + /* error */ + DEBUG2_9_10(printk( + "%s: u_list->EntryCount %p verify " + " write error. " + "list->EntryCount=%d.\n", + __func__, u_entry, + list->EntryCount);) + pext->Status = EXT_STATUS_COPY_ERR; + } else { + /* copy number of entries */ + ret = copy_to_user(&u_list->EntryCount, + &list->EntryCount, + sizeof(list->EntryCount)); + } + } + + KMEM_FREE(list, sizeof(FO_LUN_DATA_LIST)); + + return (ret); + } + } + + list = (FO_LUN_DATA_LIST *)qla2x00_kmem_zalloc( + sizeof(FO_LUN_DATA_LIST), GFP_ATOMIC, 12); + if (list == NULL) { + DEBUG2_9_10(printk("%s: failed to alloc memory of size (%d)\n", + __func__, (int)sizeof(FO_LUN_DATA_LIST));) + pext->Status = EXT_STATUS_NO_MEMORY; + return (-ENOMEM); + } + + entry = &list->DataEntry[0]; + + u_list = (FO_LUN_DATA_LIST *)pext->ResponseAdr; + u_entry = &u_list->DataEntry[0]; + + /* find the correct fcport list */ + if (!ha->flags.failover_enabled) + fcports = &ha->fcports; + else + fcports = host->fcports; + + /* Check thru this adapter's fcport list */ + fcport = NULL; + list_for_each_entry(fcport, fcports, list) { + if ((atomic_read(&fcport->state) != FCS_ONLINE) && + !qla2x00_is_fcport_in_config(ha, fcport)) { + /* no need to report */ + DEBUG2_9_10(printk("%s(%ld): not reporting fcport " + "%02x%02x%02x%02x%02x%02x%02x%02x. state=%i," + " flags=%02x.\n", + __func__, ha->host_no, fcport->port_name[0], + fcport->port_name[1], fcport->port_name[2], + fcport->port_name[3], fcport->port_name[4], + fcport->port_name[5], fcport->port_name[6], + fcport->port_name[7], atomic_read(&fcport->state), + fcport->flags);) + continue; + } + + memcpy(entry->NodeName, + fcport->node_name, EXT_DEF_WWN_NAME_SIZE); + memcpy(entry->PortName, + fcport->port_name, EXT_DEF_WWN_NAME_SIZE); + + /* Return dummy entry for unconfigured ports */ + if (fcport->mp_byte & MP_MASK_UNCONFIGURED) { + for (lun = 0; lun < MAX_LUNS; lun++) { + entry->Data[lun] = 0; + } + entry->TargetId = 0; + + DEBUG9(printk("%s(%ld): entry %d for unconfigured " + "portname=%02x%02x%02x%02x%02x%02x%02x%02x, " + "tgt_id=%d.\n", + __func__, ha->host_no, + list->EntryCount, + entry->PortName[0], entry->PortName[1], + entry->PortName[2], entry->PortName[3], + entry->PortName[4], entry->PortName[5], + entry->PortName[6], entry->PortName[7], + entry->TargetId);) + + list->EntryCount++; + + ret = verify_area(VERIFY_WRITE, (void *)u_entry, + sizeof(FO_EXTERNAL_LUN_DATA_ENTRY)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s: u_entry %p " + "verify wrt err. EntryCount=%d.\n", + __func__, u_entry, list->EntryCount);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + ret = copy_to_user(u_entry, entry, + sizeof(FO_EXTERNAL_LUN_DATA_ENTRY)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s: u_entry %p " + "copy out err. EntryCount=%d.\n", + __func__, u_entry, list->EntryCount);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + u_entry++; + + continue; + } + + if (!ha->flags.failover_enabled) { + /* + * Failover disabled. Just return LUN mask info + * in lun data entry of this port. + */ + entry->TargetId = 0; + for (cnt = 0; cnt < MAX_FIBRE_DEVICES; cnt++) { + if (!(ostgt = ha->otgt[cnt])) { + continue; + } + + if (ostgt->fcport == fcport) { + entry->TargetId = cnt; + break; + } + } + if (cnt == MAX_FIBRE_DEVICES) { + /* Not found? For now just go to next port. */ +#if defined(QL_DEBUG_LEVEL_2) || defined(QL_DEBUG_LEVEL_10) + uint8_t *tmp_name; + + tmp_name = fcport->port_name; + + printk("%s(%ld): ERROR - port " + "%02x%02x%02x%02x%02x%02x%02x%02x " + "not configured.\n", + __func__, ha->host_no, + tmp_name[0], tmp_name[1], tmp_name[2], + tmp_name[3], tmp_name[4], tmp_name[5], + tmp_name[6], tmp_name[7]); +#endif /* DEBUG */ + + continue; + } + + /* Got a valid port */ + list->EntryCount++; + + for (lun = 0; lun < MAX_LUNS; lun++) { + /* set MSB if masked */ + entry->Data[lun] = LUN_DATA_PREFERRED_PATH; + if (!EXT_IS_LUN_BIT_SET(&(fcport->lun_mask), + lun)) { + entry->Data[lun] |= LUN_DATA_ENABLED; + } + } + + DEBUG9(printk("%s: got lun_mask for tgt %d\n", + __func__, cnt);) + DEBUG9(qla2x00_dump_buffer((char *)&(fcport->lun_mask), + sizeof(lun_bit_mask_t));) + + ret = verify_area(VERIFY_WRITE, (void *)u_entry, + sizeof(FO_EXTERNAL_LUN_DATA_ENTRY)); + if (ret) { + /* error */ + DEBUG9_10(printk("%s: u_entry %p verify write" + " error. list->EntryCount=%d.\n", + __func__, u_entry, list->EntryCount);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + ret = copy_to_user(u_entry, entry, + sizeof(FO_EXTERNAL_LUN_DATA_ENTRY)); + + if (ret) { + /* error */ + DEBUG9_10(printk("%s: u_entry %p copy " + "error. list->EntryCount=%d.\n", + __func__, u_entry, list->EntryCount);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + copy_to_user(u_entry, entry, + sizeof(FO_EXTERNAL_LUN_DATA_ENTRY)); + + /* Go to next port */ + u_entry++; + continue; + } + + /* + * Failover is enabled. Go through the mp_devs list and return + * lun data in configured path. + */ + for (dev_no = 0; dev_no < MAX_MP_DEVICES; dev_no++) { + dp = host->mp_devs[dev_no]; + + if (dp == NULL) + continue; + + /* Lookup entry name */ + if (!qla2x00_is_portname_in_device(dp, entry->PortName)) + continue; + + if ((pathlist = dp->path_list) == NULL) + continue; + + path = pathlist->last; + for (path_id = 0; path_id < pathlist->path_cnt; + path_id++, path = path->next) { + + if (path->host != host) + continue; + + if (!qla2x00_is_portname_equal(path->portname, + entry->PortName)) + continue; + + /* Got an entry */ + entry->TargetId = dp->dev_id; + entry->Dev_No = path->id; + list->EntryCount++; + + DEBUG9_10(printk( + "%s(%ld): got lun_mask for tgt %d\n", + __func__, ha->host_no, entry->TargetId);) + DEBUG9(qla2x00_dump_buffer( + (char *)&(fcport->lun_mask), + sizeof(lun_bit_mask_t));) + + for (lun = 0; lun < MAX_LUNS; lun++) { + entry->Data[lun] = + path->lun_data.data[lun]; + } + + ret = verify_area(VERIFY_WRITE, (void *)u_entry, + sizeof(FO_EXTERNAL_LUN_DATA_ENTRY)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s: u_entry %p " + "verify wrt err. EntryCount=%d.\n", + __func__, u_entry, list->EntryCount);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + ret = copy_to_user(u_entry, entry, + sizeof(FO_EXTERNAL_LUN_DATA_ENTRY)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s: u_entry %p " + "copy out err. EntryCount=%d.\n", + __func__, u_entry, list->EntryCount);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + u_entry++; + + DEBUG9_10(printk("%s: get_lun_data for tgt " + "%d- u_entry(%p) - lun entry[%d] :\n", + __func__, entry->TargetId, + u_entry,list->EntryCount - 1);) + + DEBUG9(qla2x00_dump_buffer((void *)entry, 64);) + + /* + * We found the right path for this port. + * Continue with next port. + */ + break; + } + + /* Continue with next port. */ + break; + } + } + + DEBUG9(printk("%s: get_lun_data - entry count = [%d]\n", + __func__, list->EntryCount);) + DEBUG4(printk("%s: get_lun_data - entry count = [%d]\n", + __func__, list->EntryCount);) + + if (ret == 0) { + ret = verify_area(VERIFY_WRITE, (void *)&u_list->EntryCount, + sizeof(list->EntryCount)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s: u_list->EntryCount %p verify " + " write error. list->EntryCount=%d.\n", + __func__, u_entry, list->EntryCount);) + pext->Status = EXT_STATUS_COPY_ERR; + } else { + /* copy number of entries */ + ret = copy_to_user(&u_list->EntryCount, &list->EntryCount, + sizeof(list->EntryCount)); + pext->ResponseLen = FO_LUN_DATA_LIST_MAX_SIZE; + } + } + + KMEM_FREE(list, sizeof(FO_LUN_DATA_LIST)); + + DEBUG9(printk("%s: exiting. ret=%d.\n", __func__, ret);) + + return ret; +} + +/* + * qla2x00_fo_set_lun_data + * Set lun data for the specified device on the attached hba + * (FO_SET_LUN_DATA). + * Sets lun mask if failover not enabled. + * + * Input: + * bp = pointer to buffer + * + * Return; + * 0 on success or errno. + * + * Context: + * Kernel context. + */ +static int +qla2x00_fo_set_lun_data(EXT_IOCTL *pext, FO_LUN_DATA_INPUT *bp, int mode) +{ + scsi_qla_host_t *ha; + fc_port_t *fcport; + int i; + int ret = 0; + mp_host_t *host = NULL; + mp_device_t *dp; + mp_path_t *path; + mp_path_list_t *pathlist; + os_tgt_t *ostgt; + uint8_t path_id; + uint16_t dev_no; + uint16_t lun; + FO_LUN_DATA_LIST *u_list, *list; + FO_EXTERNAL_LUN_DATA_ENTRY *u_entry, *entry; + + typedef struct _tagStruct { + FO_LUN_DATA_INPUT foLunDataInput; + FO_LUN_DATA_LIST foLunDataList; + } + com_struc; + com_struc *com_iter; + + + DEBUG9(printk("%s: entered.\n", __func__);) + + ha = qla2x00_get_hba((unsigned long)bp->HbaInstance); + + if (!ha) { + DEBUG2_9_10(printk("%s: no ha matching inst %d.\n", + __func__, bp->HbaInstance);) + + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + return (ret); + } + + DEBUG9(printk("%s: ha inst %ld, buff %p.\n", + __func__, ha->instance, bp);) + + if (ha->flags.failover_enabled) + if ((host = qla2x00_cfg_find_host(ha)) == NULL) { + DEBUG2_9_10(printk("%s: no HOST for ha inst %ld.\n", + __func__, ha->instance);) + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + return (ret); + } + + list = (FO_LUN_DATA_LIST *)qla2x00_kmem_zalloc( + sizeof(FO_LUN_DATA_LIST), GFP_ATOMIC, 13); + if (list == NULL) { + DEBUG2_9_10(printk("%s: failed to alloc memory of size (%d)\n", + __func__, (int)sizeof(FO_LUN_DATA_LIST));) + pext->Status = EXT_STATUS_NO_MEMORY; + return (-ENOMEM); + } + + entry = &list->DataEntry[0]; + + /* get lun data list from user */ + com_iter = (com_struc *)pext->RequestAdr; + u_list = &(com_iter->foLunDataList); + u_entry = &u_list->DataEntry[0]; + + ret = verify_area(VERIFY_READ, (void *)u_list, + sizeof(FO_LUN_DATA_LIST)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s: u_list %p verify read error.\n", + __func__, u_list);) + pext->Status = EXT_STATUS_COPY_ERR; + KMEM_FREE(list, FO_LUN_DATA_LIST); + return (ret); + } + + ret = copy_from_user(list, u_list, sizeof(FO_LUN_DATA_LIST)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s: u_list %p copy error.\n", + __func__, u_list);) + pext->Status = EXT_STATUS_COPY_ERR; + KMEM_FREE(list, FO_LUN_DATA_LIST); + return (ret); + } + + DEBUG2(printk("qla_fo_set_lun_data: pext->RequestAdr(%p) u_list (%p) " + "sizeof(FO_LUN_DATA_INPUT) =(%d) and 64 bytes...\n", + pext->RequestAdr, u_list, + (int)sizeof(FO_LUN_DATA_INPUT));) + DEBUG2(qla2x00_dump_buffer((void *)u_list, 64);) + + for (i = 0; i < list->EntryCount; i++, u_entry++) { + + ret = verify_area(VERIFY_READ, (void *)u_entry, + sizeof(FO_EXTERNAL_LUN_DATA_ENTRY)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s: u_entry %p verify " + " read error.\n", + __func__, u_entry);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + ret = copy_from_user(entry, u_entry, + sizeof(FO_EXTERNAL_LUN_DATA_ENTRY)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s: u_entry %p copy error.\n", + __func__, u_entry);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + if (!ha->flags.failover_enabled) { + /* + * Failover disabled. Just find the port and set + * LUN mask values in lun_mask field of this port. + */ + + if (entry->TargetId >= MAX_FIBRE_DEVICES) + /* ERROR */ + continue; + + if (!(ostgt = ha->otgt[entry->TargetId])) + /* ERROR */ + continue; + + if (!(fcport = ostgt->fcport)) + /* ERROR */ + continue; + + for (lun = 0; lun < MAX_LUNS; lun++) { + /* set MSB if masked */ + if (entry->Data[lun] | LUN_DATA_ENABLED) { + EXT_CLR_LUN_BIT(&(fcport->lun_mask), + lun); + } else { + EXT_SET_LUN_BIT(&(fcport->lun_mask), + lun); + } + } + + /* Go to next entry */ + continue; + } + + /* + * Failover is enabled. Go through the mp_devs list and set lun + * data in configured path. + */ + for (dev_no = 0; dev_no < MAX_MP_DEVICES; dev_no++) { + dp = host->mp_devs[dev_no]; + + if (dp == NULL) + continue; + + /* Lookup entry name */ + if (!qla2x00_is_portname_in_device(dp, entry->PortName)) + continue; + + if ((pathlist = dp->path_list) == NULL) + continue; + + path = pathlist->last; + for (path_id = 0; path_id < pathlist->path_cnt; + path_id++, path = path->next) { + + if (path->host != host) + continue; + + if (!qla2x00_is_portname_equal(path->portname, + entry->PortName)) + continue; + + for (lun = 0; lun < MAX_LUNS; lun++) { + path->lun_data.data[lun] = + entry->Data[lun]; + DEBUG4(printk("cfg_set_lun_data: lun " + "data[%d] = 0x%x \n", lun, + path->lun_data.data[lun]);) + } + + break; + } + break; + } + } + + KMEM_FREE(list, FO_LUN_DATA_LIST); + + DEBUG9(printk("%s: exiting. ret = %d.\n", __func__, ret);) + + return ret; +} + +/* + * qla2x00_fo_get_target_data + * Get the target control byte for all devices attached to a HBA. + * + * Input: + * bp = pointer to buffer + * + * Return; + * 0 on success or errno. + * + * Context: + * Kernel context. + */ +static int +qla2x00_fo_get_target_data(EXT_IOCTL *pext, FO_TARGET_DATA_INPUT *bp, int mode) +{ + scsi_qla_host_t *ha; + int ret = 0; + mp_host_t *host = NULL; + FO_DEVICE_DATA *entry; + + + DEBUG9(printk("%s: entered.\n", __func__);) + + ha = qla2x00_get_hba((unsigned long)bp->HbaInstance); + + if (!ha) { + DEBUG2_9_10(printk("%s: no ha matching inst %d.\n", + __func__, bp->HbaInstance);) + + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + return (ret); + } + + DEBUG9(printk("%s: ha inst %ld, buff %p.\n", + __func__, ha->instance, bp);) + + if (ha->flags.failover_enabled) + if ((host = qla2x00_cfg_find_host(ha)) == NULL && + list_empty(&ha->fcports)) { + DEBUG2_9_10(printk("%s: no HOST for ha inst %ld.\n", + __func__, ha->instance);) + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + return (ret); + } + + if ((entry = (FO_DEVICE_DATA *)kmalloc(sizeof(FO_DEVICE_DATA), + GFP_ATOMIC)) == NULL) { + DEBUG2_9_10(printk("%s: failed to alloc memory of size (%d)\n", + __func__, (int)sizeof(FO_DEVICE_DATA));) + pext->Status = EXT_STATUS_NO_MEMORY; + return (-ENOMEM); + } + + /* Return data accordingly. */ + if (!ha->flags.failover_enabled) + ret = qla2x00_std_get_tgt(ha, pext, entry); + else + ret = qla2x00_fo_get_tgt(host, ha, pext, entry); + + + if (ret == 0) { + pext->ResponseLen = sizeof(FO_DEVICE_DATABASE); + } + + KMEM_FREE(entry, sizeof(FO_DEVICE_DATA)); + + DEBUG9(printk("%s: exiting. ret = %d.\n", __func__, ret);) + + return (ret); +} + +static int +qla2x00_std_get_tgt(scsi_qla_host_t *ha, EXT_IOCTL *pext, FO_DEVICE_DATA *entry) +{ + int ret = 0; + uint8_t i, cnt; + uint32_t b; + fc_port_t *fcport; + os_tgt_t *ostgt; + FO_DEVICE_DATA *u_entry; + + DEBUG9(printk("%s(%ld): entered.\n", __func__, ha->host_no);) + + u_entry = (FO_DEVICE_DATA *) pext->ResponseAdr; + + if (pext->ResponseLen < sizeof(FO_DEVICE_DATA)) { + pext->Status = EXT_STATUS_BUFFER_TOO_SMALL; + DEBUG9_10(printk("%s: ERROR ResponseLen %d too small.\n", + __func__, pext->ResponseLen);) + + return (ret); + } + + DEBUG9(printk("%s(%ld): user buffer size=%d. Copying fcport list\n", + __func__, ha->host_no, pext->ResponseLen);) + + /* Loop through and return ports found. */ + /* Check thru this adapter's fcport list */ + i = 0; + fcport = NULL; + list_for_each_entry(fcport, &ha->fcports, list) { + if (i >= MAX_TARGETS) + break; + + /* clear for a new entry */ + memset(entry, 0, sizeof(FO_DEVICE_DATA)); + + memcpy(entry->WorldWideName, + fcport->node_name, EXT_DEF_WWN_NAME_SIZE); + memcpy(entry->PortName, + fcport->port_name, EXT_DEF_WWN_NAME_SIZE); + + for (b = 0; b < 3 ; b++) + entry->PortId[b] = fcport->d_id.r.d_id[2-b]; + + DEBUG9(printk("%s(%ld): found fcport %p:%02x%02x%02x%02x" + "%02x%02x%02x%02x.\n", + __func__, ha->host_no, + fcport, + fcport->port_name[0], + fcport->port_name[1], + fcport->port_name[2], + fcport->port_name[3], + fcport->port_name[4], + fcport->port_name[5], + fcport->port_name[6], + fcport->port_name[7]);) + + /* + * Just find the port and return target info. + */ + for (cnt = 0; cnt < MAX_FIBRE_DEVICES; cnt++) { + if (!(ostgt = ha->otgt[cnt])) { + continue; + } + + if (ostgt->fcport == fcport) { + DEBUG9(printk("%s(%ld): Found target %d.\n", + __func__, ha->host_no, cnt);) + + entry->TargetId = cnt; + break; + } + } + + if (cnt == MAX_FIBRE_DEVICES) { + /* Not bound, this target is unconfigured. */ + entry->MultipathControl = MP_MASK_UNCONFIGURED; + } else { + entry->MultipathControl = 0; /* always configured */ + } + + ret = verify_area(VERIFY_WRITE, (void *)u_entry, + sizeof(FO_DEVICE_DATA)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s(%ld): u_entry %p verify " + " wrt err. tgt id=%d.\n", + __func__, ha->host_no, u_entry, cnt);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + ret = copy_to_user(u_entry, entry, + sizeof(FO_DEVICE_DATA)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s(%ld): u_entry %p copy " + "out err. tgt id=%d.\n", + __func__, ha->host_no, u_entry, cnt);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + u_entry++; + } + + DEBUG9(printk("%s(%ld): done copying fcport list entries.\n", + __func__, ha->host_no);) + + DEBUG9(printk("%s(%ld): exiting. ret = %d.\n", + __func__, ha->host_no, ret);) + + return (ret); +} + +static int +qla2x00_fo_get_tgt(mp_host_t *host, scsi_qla_host_t *ha, EXT_IOCTL *pext, + FO_DEVICE_DATA *entry) +{ + int ret = 0; + uint8_t path_id; + uint16_t dev_no; + uint32_t b; + uint16_t cnt; + + fc_port_t *fcport; + mp_device_t *dp; + mp_path_list_t *pathlist; + mp_path_t *path; + + FO_DEVICE_DATA *u_entry; + + DEBUG9(printk("%s(%ld): entered.\n", __func__, host->ha->host_no);) + + u_entry = (FO_DEVICE_DATA *) pext->ResponseAdr; + + /* If host is NULL then report all online fcports of the corresponding + * ha as unconfigured devices. ha should never be NULL. + */ + if (host == NULL) { + /* Loop through and return ports found. */ + /* Check thru this adapter's fcport list */ + cnt = 0; + fcport = NULL; + list_for_each_entry(fcport, &ha->fcports, list) { + + if (atomic_read(&fcport->state) != FCS_ONLINE) { + /* no need to report */ + DEBUG2_9_10(printk("%s(%ld): not reporting " + "fcport %02x%02x%02x%02x%02x%02x%02x%02x. " + "state=%i, flags=%02x.\n", + __func__, ha->host_no, + fcport->port_name[0], fcport->port_name[1], + fcport->port_name[2], fcport->port_name[3], + fcport->port_name[4], fcport->port_name[5], + fcport->port_name[6], fcport->port_name[7], + atomic_read(&fcport->state), + fcport->flags);) + continue; + } + + cnt++; + if (cnt >= MAX_TARGETS) + break; + + /* clear for a new entry */ + memset(entry, 0, sizeof(FO_DEVICE_DATA)); + + memcpy(entry->WorldWideName, + fcport->node_name, EXT_DEF_WWN_NAME_SIZE); + memcpy(entry->PortName, + fcport->port_name, EXT_DEF_WWN_NAME_SIZE); + + DEBUG10(printk("%s(%ld): found fcport %p:%02x%02x%02x" + "%02x%02x%02x%02x%02x.\n", + __func__, host->ha->host_no, + fcport, + fcport->port_name[0], + fcport->port_name[1], + fcport->port_name[2], + fcport->port_name[3], + fcport->port_name[4], + fcport->port_name[5], + fcport->port_name[6], + fcport->port_name[7]);) + + for (b = 0; b < 3 ; b++) + entry->PortId[b] = fcport->d_id.r.d_id[2-b]; + + DEBUG9_10(printk("%s(%ld): fcport mpbyte=%02x. " + "return unconfigured. ", + __func__, host->ha->host_no, fcport->mp_byte);) + + entry->TargetId = 0; + entry->Dev_No = 0; + entry->MultipathControl = MP_MASK_UNCONFIGURED; + + DEBUG9_10(printk("tgtid=%d dev_no=%d, mpdata=0x%x.\n", + entry->TargetId, entry->Dev_No, + entry->MultipathControl);) + + ret = verify_area(VERIFY_WRITE, (void *)u_entry, + sizeof(FO_DEVICE_DATA)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s(%ld): u_entry %p " + "verify wrt err. no tgt id.\n", + __func__, host->ha->host_no, u_entry);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + ret = copy_to_user(u_entry, entry, + sizeof(FO_DEVICE_DATA)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s(%ld): u_entry %p " + "copy out err. no tgt id.\n", + __func__, host->ha->host_no, u_entry);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + u_entry++; + } + + DEBUG9(printk("%s(%ld): after returning unconfigured fcport " + "list. got %d entries.\n", + __func__, host->ha->host_no, cnt);) + + return (ret); + } + + /* Check thru fcport list on host */ + /* Loop through and return online ports found. */ + /* Check thru this adapter's fcport list */ + cnt = 0; + fcport = NULL; + list_for_each_entry(fcport, host->fcports, list) { + + if ((atomic_read(&fcport->state) != FCS_ONLINE) && + !qla2x00_is_fcport_in_config(ha, fcport)) { + /* no need to report */ + DEBUG2_9_10(printk("%s(%ld): not reporting " + "fcport %02x%02x%02x%02x%02x%02x%02x%02x. " + "state=%i, flags=%02x.\n", + __func__, ha->host_no, fcport->port_name[0], + fcport->port_name[1], fcport->port_name[2], + fcport->port_name[3], fcport->port_name[4], + fcport->port_name[5], fcport->port_name[6], + fcport->port_name[7], + atomic_read(&fcport->state), + fcport->flags);) + continue; + } + + cnt++; + if (cnt >= MAX_TARGETS) + break; + + /* clear for a new entry */ + memset(entry, 0, sizeof(FO_DEVICE_DATA)); + + memcpy(entry->WorldWideName, + fcport->node_name, EXT_DEF_WWN_NAME_SIZE); + memcpy(entry->PortName, + fcport->port_name, EXT_DEF_WWN_NAME_SIZE); + + DEBUG10(printk("%s(%ld): found fcport %p:%02x%02x%02x%02x" + "%02x%02x%02x%02x.\n", + __func__, host->ha->host_no, + fcport, + fcport->port_name[0], + fcport->port_name[1], + fcport->port_name[2], + fcport->port_name[3], + fcport->port_name[4], + fcport->port_name[5], + fcport->port_name[6], + fcport->port_name[7]);) + + for (b = 0; b < 3 ; b++) + entry->PortId[b] = fcport->d_id.r.d_id[2-b]; + + if (fcport->mp_byte & MP_MASK_UNCONFIGURED) { + DEBUG9_10(printk("%s(%ld): fcport mpbyte=%02x. " + "return unconfigured. ", + __func__, host->ha->host_no, fcport->mp_byte);) + + entry->TargetId = fcport->os_target_id; + entry->Dev_No = 0; + entry->MultipathControl = MP_MASK_UNCONFIGURED; + + DEBUG9_10(printk("tgtid=%d dev_no=%d, mpdata=0x%x.\n", + entry->TargetId, entry->Dev_No, + entry->MultipathControl);) + + ret = verify_area(VERIFY_WRITE, (void *)u_entry, + sizeof(FO_DEVICE_DATA)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s(%ld): u_entry %p " + "verify wrt err. tgt id=%d.\n", + __func__, host->ha->host_no, u_entry, + fcport->os_target_id);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + ret = copy_to_user(u_entry, entry, + sizeof(FO_DEVICE_DATA)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s(%ld): u_entry %p " + "copy out err. tgt id=%d.\n", + __func__, host->ha->host_no, u_entry, + fcport->os_target_id);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + u_entry++; + continue; + } + + /* + * Port was configured. Go through the mp_devs list and + * get target data in configured path. + */ + for (dev_no = 0; dev_no < MAX_MP_DEVICES; dev_no++) { + dp = host->mp_devs[dev_no]; + + if (dp == NULL) + continue; + + /* Lookup entry name */ + if (!qla2x00_is_portname_in_device(dp, entry->PortName)) + continue; + + if ((pathlist = dp->path_list) == NULL) + continue; + + path = pathlist->last; + for (path_id = 0; path_id < pathlist->path_cnt; + path_id++, path= path->next) { + + if (path->host != host) + continue; + + if (!qla2x00_is_portname_equal(path->portname, + entry->PortName)) + continue; + + entry->TargetId = dp->dev_id; + entry->Dev_No = path->id; + entry->MultipathControl = path->mp_byte; + + if (path->config == TRUE || + !mp_config_required) { + entry->MultipathControl = path->mp_byte; + } else { + entry->MultipathControl = + MP_MASK_UNCONFIGURED; + } + + DEBUG9_10(printk("%s(%ld): fcport path->id " + "= %d, target/mpbyte data = 0x%02x.\n", + __func__, host->ha->host_no, + path->id, entry->MultipathControl);) + + ret = verify_area(VERIFY_WRITE, (void *)u_entry, + sizeof(FO_DEVICE_DATA)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s(%ld): u_entry %p" + " verify wrt err. tgt id=%d.\n", + __func__, host->ha->host_no, + u_entry, dp->dev_id);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + ret = copy_to_user(u_entry, entry, + sizeof(FO_DEVICE_DATA)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s(%ld): u_entry %p " + "copy out err. tgt id=%d.\n", + __func__, host->ha->host_no, + u_entry, dp->dev_id);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + u_entry++; + + /* Path found. Continue with next fcport */ + break; + } + break; + } + } + + DEBUG9(printk("%s(%ld): after checking fcport list. got %d entries.\n", + __func__, host->ha->host_no, cnt);) + + /* For ports not found but were in config file, return unconfigured + * status so agent will try to issue commands to it and GUI will display + * them as missing. + */ + for (dev_no = 0; dev_no < MAX_MP_DEVICES; dev_no++) { + dp = host->mp_devs[dev_no]; + + if (dp == NULL) + continue; + + /* Sanity check */ + if (qla2x00_is_wwn_zero(dp->nodename)) + continue; + + if ((pathlist = dp->path_list) == NULL) + continue; + + path = pathlist->last; + for (path_id = 0; path_id < pathlist->path_cnt; + path_id++, path = path->next) { + + /* Sanity check */ + if (qla2x00_is_wwn_zero(path->portname)) + continue; + + if (path->port == NULL) { + if (path->host != host) { + /* path on other host. no need to + * report + */ + DEBUG10(printk("%s(%ld): path host %p " + "not for current host %p.\n", + __func__, host->ha->host_no, + path->host, host);) + + continue; + } + + /* clear for a new entry */ + memset(entry, 0, sizeof(FO_DEVICE_DATA)); + + /* This device was not found. Return + * unconfigured. + */ + memcpy(entry->WorldWideName, + dp->nodename, EXT_DEF_WWN_NAME_SIZE); + memcpy(entry->PortName, + path->portname, EXT_DEF_WWN_NAME_SIZE); + + entry->TargetId = dp->dev_id; + entry->Dev_No = path->id; + /* + entry->MultipathControl = path->mp_byte + | MP_MASK_UNCONFIGURED; + */ + entry->MultipathControl = MP_MASK_UNCONFIGURED; + cnt++; + + DEBUG9_10(printk("%s: found missing device. " + "return tgtid=%d dev_no=%d, mpdata=0x%x for" + " port %02x%02x%02x%02x%02x%02x%02x%02x\n", + __func__, entry->TargetId, entry->Dev_No, + entry->MultipathControl, + path->portname[0], path->portname[1], + path->portname[2], path->portname[3], + path->portname[4], path->portname[5], + path->portname[6], path->portname[7]);) + + ret = verify_area(VERIFY_WRITE, (void *)u_entry, + sizeof(FO_DEVICE_DATA)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s: u_entry %p " + "verify wrt err. tgt id=%d.\n", + __func__, u_entry, dp->dev_id);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + ret = copy_to_user(u_entry, entry, + sizeof(FO_DEVICE_DATA)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s: u_entry %p " + "copy out err. tgt id=%d.\n", + __func__, u_entry, dp->dev_id);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + u_entry++; + } + } + } + + DEBUG9(printk("%s(%ld): after checking missing devs. got %d entries.\n", + __func__, host->ha->host_no, cnt);) + + DEBUG9(printk("%s(%ld): exiting. ret = %d.\n", + __func__, host->ha->host_no, ret);) + + return (ret); + +} /* qla2x00_get_fo_tgt */ + +/* + * qla2x00_fo_set_target_data + * Set multipath control byte for all devices on the attached hba + * + * Input: + * bp = pointer to buffer + * + * Return; + * 0 on success or errno. + * + * Context: + * Kernel context. + */ +static int +qla2x00_fo_set_target_data(EXT_IOCTL *pext, FO_TARGET_DATA_INPUT *bp, int mode) +{ + scsi_qla_host_t *ha; + int i; + int ret = 0; + mp_host_t *host; + mp_device_t *dp; + mp_path_t *path; + mp_path_list_t *pathlist; + uint16_t dev_no; + uint8_t path_id; + FO_DEVICE_DATA *entry, *u_entry; + + DEBUG9(printk("%s: entered.\n", __func__);) + + ha = qla2x00_get_hba((unsigned long)bp->HbaInstance); + + if (!ha) { + DEBUG2_9_10(printk("%s: no ha matching inst %d.\n", + __func__, bp->HbaInstance);) + + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + return (ret); + } + + DEBUG9(printk("%s: ha inst %ld, buff %p.\n", + __func__, ha->instance, bp);) + + if (!ha->flags.failover_enabled) + /* non-failover mode. nothing to be done. */ + return 0; + + if ((host = qla2x00_cfg_find_host(ha)) == NULL) { + DEBUG2_9_10(printk("%s: no HOST for ha inst %ld.\n", + __func__, ha->instance);) + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + return (ret); + } + + entry = (FO_DEVICE_DATA *)qla2x00_kmem_zalloc( + sizeof(FO_DEVICE_DATA), GFP_ATOMIC, 15); + if (entry == NULL) { + DEBUG2_9_10(printk("%s: failed to alloc memory of size (%d)\n", + __func__, (int)sizeof(FO_DEVICE_DATA));) + pext->Status = EXT_STATUS_NO_MEMORY; + return (-ENOMEM); + } + + u_entry = (FO_DEVICE_DATA *)(pext->RequestAdr + + sizeof(FO_TARGET_DATA_INPUT)); + + for (i = 0; i < MAX_TARGETS; i++, u_entry++) { + ret = verify_area(VERIFY_READ, (void *)u_entry, + sizeof(FO_DEVICE_DATA)); + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s: u_entry %p verify read err.\n", + __func__, u_entry);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + ret = copy_from_user(entry, u_entry, sizeof(FO_DEVICE_DATA)); + + if (ret) { + /* error */ + DEBUG2_9_10(printk("%s: u_entry %p copy error.\n", + __func__, u_entry);) + pext->Status = EXT_STATUS_COPY_ERR; + break; + } + + for (dev_no = 0; dev_no < MAX_MP_DEVICES; dev_no++) { + dp = host->mp_devs[dev_no]; + + if (dp == NULL) + continue; + + /* Lookup entry name */ + if (!qla2x00_is_portname_in_device(dp, entry->PortName)) + continue; + + if ((pathlist = dp->path_list) == NULL) + continue; + + path = pathlist->last; + for (path_id = 0; path_id < pathlist->path_cnt; + path_id++, path= path->next) { + + if (path->host != host) + continue; + + if (!qla2x00_is_portname_equal(path->portname, + entry->PortName)) + continue; + + path->mp_byte = entry->MultipathControl; + + DEBUG9(printk("cfg_set_target_data: %d target " + "data = 0x%x \n", + path->id,path->mp_byte);) + + /* + * If this is the visible path, then make it + * available on next reboot. + */ + if (!((path->mp_byte & MP_MASK_HIDDEN) || + (path->mp_byte & MP_MASK_UNCONFIGURED))) { + pathlist->visible = path->id; + } + + /* Found path. Go to next entry. */ + break; + } + break; + } + } + + KMEM_FREE(entry, sizeof(FO_DEVICE_DATA)); + + DEBUG9(printk("%s: exiting. ret = %d.\n", __func__, ret);) + + return (ret); + +} + +/* + * qla2x00_fo_ioctl + * Provides functions for failover ioctl() calls. + * + * Input: + * ha = adapter state pointer. + * ioctl_code = ioctl function to perform + * arg = Address of application EXT_IOCTL cmd data + * mode = flags + * + * Returns: + * Return value is the ioctl rval_p return value. + * 0 = success + * + * Context: + * Kernel context. + */ +/* ARGSUSED */ +int +qla2x00_fo_ioctl(scsi_qla_host_t *ha, int ioctl_code, EXT_IOCTL *pext, int mode) +{ + int rval = 0; + size_t in_size, out_size; + static union { + FO_PARAMS params; + FO_GET_PATHS path; + FO_SET_CURRENT_PATH set_path; + /* FO_HBA_STAT_INPUT stat; */ + FO_HBA_STAT stat; + FO_LUN_DATA_INPUT lun_data; + FO_TARGET_DATA_INPUT target_data; + } buff; + + ENTER("qla2x00_fo_ioctl"); + DEBUG9(printk("%s: entered. arg (%p):\n", __func__, pext);) + + /* + * default case for this switch not needed, + * ioctl_code validated by caller. + */ + in_size = out_size = 0; + switch (ioctl_code) { + case FO_CC_GET_PARAMS: + out_size = sizeof(FO_PARAMS); + break; + case FO_CC_SET_PARAMS: + in_size = sizeof(FO_PARAMS); + break; + case FO_CC_GET_PATHS: + in_size = sizeof(FO_GET_PATHS); + break; + case FO_CC_SET_CURRENT_PATH: + in_size = sizeof(FO_SET_CURRENT_PATH); + break; + case FO_CC_GET_HBA_STAT: + case FO_CC_RESET_HBA_STAT: + in_size = sizeof(FO_HBA_STAT_INPUT); + break; + case FO_CC_GET_LUN_DATA: + in_size = sizeof(FO_LUN_DATA_INPUT); + break; + case FO_CC_SET_LUN_DATA: + in_size = sizeof(FO_LUN_DATA_INPUT); + break; + case FO_CC_GET_TARGET_DATA: + in_size = sizeof(FO_TARGET_DATA_INPUT); + break; + case FO_CC_SET_TARGET_DATA: + in_size = sizeof(FO_TARGET_DATA_INPUT); + break; + + } + if (in_size != 0) { + if ((int)pext->RequestLen < in_size) { + pext->Status = EXT_STATUS_INVALID_PARAM; + pext->DetailStatus = EXT_DSTATUS_REQUEST_LEN; + DEBUG10(printk("%s: got invalie req len (%d).\n", + __func__, pext->RequestLen);) + + } else { + + rval = verify_area(VERIFY_READ, + (void *)pext->RequestAdr, in_size); + if (rval) { + /* error */ + DEBUG2_9_10(printk("%s: req buf verify read " + "error. size=%ld.\n", + __func__, (ulong)in_size);) + pext->Status = EXT_STATUS_COPY_ERR; + } + rval = copy_from_user(&buff, + (void *)pext->RequestAdr, in_size); + + if (rval) { + DEBUG2_9_10(printk("%s: req buf copy error. " + "size=%ld.\n", + __func__, (ulong)in_size);) + + pext->Status = EXT_STATUS_COPY_ERR; + } else { + DEBUG9(printk("qla2x00_fo_ioctl: req buf " + "copied ok.\n")); + } + } + } else if (out_size != 0 && (ulong)pext->ResponseLen < out_size) { + pext->Status = EXT_STATUS_BUFFER_TOO_SMALL; + pext->DetailStatus = out_size; + DEBUG10(printk("%s: got invalie resp len (%d).\n", + __func__, pext->ResponseLen);) + } + + if (rval != 0 || pext->Status != 0) + goto done_fo_ioctl; + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + + switch (ioctl_code) { + case FO_CC_GET_PARAMS: + rval = qla2x00_fo_get_params(&buff.params); + break; + case FO_CC_SET_PARAMS: + rval = qla2x00_fo_set_params(&buff.params); + break; + case FO_CC_GET_PATHS: + rval = qla2x00_cfg_get_paths(pext, + &buff.path,mode); + if (rval != 0) + out_size = 0; + break; + case FO_CC_SET_CURRENT_PATH: + rval = qla2x00_cfg_set_current_path(pext, + &buff.set_path,mode); + break; + case FO_CC_RESET_HBA_STAT: + rval = qla2x00_fo_stats(&buff.stat, TRUE); + break; + case FO_CC_GET_HBA_STAT: + rval = qla2x00_fo_stats(&buff.stat, FALSE); + break; + case FO_CC_GET_LUN_DATA: + + DEBUG4(printk("calling qla2x00_fo_get_lun_data\n");) + DEBUG4(printk("pext->RequestAdr (%p):\n", + pext->RequestAdr);) + + rval = qla2x00_fo_get_lun_data(pext, + &buff.lun_data, mode); + + if (rval != 0) + out_size = 0; + break; + case FO_CC_SET_LUN_DATA: + + DEBUG4(printk("calling qla2x00_fo_set_lun_data\n");) + DEBUG4(printk(" pext->RequestAdr (%p):\n", + pext->RequestAdr);) + + rval = qla2x00_fo_set_lun_data(pext, + &buff.lun_data, mode); + break; + case FO_CC_GET_TARGET_DATA: + DEBUG4(printk("calling qla2x00_fo_get_target_data\n");) + DEBUG4(printk("pext->RequestAdr (%p):\n", + pext->RequestAdr);) + + rval = qla2x00_fo_get_target_data(pext, + &buff.target_data, mode); + + if (rval != 0) { + out_size = 0; + } + break; + case FO_CC_SET_TARGET_DATA: + DEBUG4(printk("calling qla2x00_fo_set_target_data\n");) + DEBUG4(printk(" pext->RequestAdr (%p):\n", + pext->RequestAdr);) + rval = qla2x00_fo_set_target_data(pext, + &buff.target_data, mode); + break; + + } + + if (rval == 0 && (pext->ResponseLen = out_size) != 0) { + rval = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr, + out_size); + if (rval != 0) { + DEBUG10(printk("%s: resp buf very write error.\n", + __func__);) + pext->Status = EXT_STATUS_COPY_ERR; + } + } + + if (rval == 0) { + rval = copy_to_user((void *)pext->ResponseAdr, + &buff, out_size); + + if (rval != 0) { + DEBUG10(printk("%s: resp buf copy error. size=%ld.\n", + __func__, (ulong)out_size);) + pext->Status = EXT_STATUS_COPY_ERR; + } + } + +done_fo_ioctl: + + if (rval != 0) { + /*EMPTY*/ + DEBUG10(printk("%s: **** FAILED ****\n", __func__);) + } else { + /*EMPTY*/ + DEBUG9(printk("%s: exiting normally\n", __func__);) + } + + return rval; +} + + +/* + * qla2x00_fo_count_retries + * Increment the retry counter for the command. + * Set or reset the SRB_RETRY flag. + * + * Input: + * sp = Pointer to command. + * + * Returns: + * TRUE -- retry + * FALSE -- don't retry + * + * Context: + * Kernel context. + */ +static uint8_t +qla2x00_fo_count_retries(scsi_qla_host_t *ha, srb_t *sp) +{ + uint8_t retry = TRUE; + os_lun_t *lq; + os_tgt_t *tq; + + DEBUG9(printk("%s: entered.\n", __func__);) + + if (++sp->fo_retry_cnt > qla_fo_params.MaxRetriesPerIo) { + /* no more failovers for this request */ + retry = FALSE; + sp->fo_retry_cnt = 0; + printk(KERN_INFO + "qla2x00: no more failovers for request - pid= %ld\n", + sp->cmd->serial_number); + } else { + /* + * We haven't exceeded the max retries for this request, check + * max retries this path + */ + if ((sp->fo_retry_cnt % qla_fo_params.MaxRetriesPerPath) == 0) { + DEBUG(printk("qla2x00_fo_count_retries: FAILOVER - " + "queuing ha=%ld, sp=%p, pid =%ld, fo retry= %d\n", + ha->host_no, sp, sp->cmd->serial_number, + sp->fo_retry_cnt);) + + /* + * Note: we don't want it to timeout, so it is + * recycling on the retry queue and the fialover queue. + */ + lq = sp->lun_queue; + tq = sp->tgt_queue; + set_bit(LUN_MPIO_BUSY, &lq->q_flag); + + /* + * ??? We can get a path error on any ha, but always + * queue failover on originating ha. This will allow us + * to syncronized the requests for a given lun. + */ + sp->f_start=jiffies; /*ra 10/29/01*/ + /* Now queue it on to be failover */ + sp->ha = ha; + add_to_failover_queue(ha, sp); + } + } + + DEBUG9(printk("%s: exiting. retry = %d.\n", __func__, retry);) + + return retry ; +} + + +/* + * qla2x00_fo_check + * This function is called from the done routine to see if + * the SRB requires a failover. + * + * This function examines the available os returned status and + * if meets condition, the command(srb) is placed ont the failover + * queue for processing. + * + * Input: + * sp = Pointer to the SCSI Request Block + * + * Output: + * sp->flags SRB_RETRY bit id command is to + * be retried otherwise bit is reset. + * + * Returns: + * None. + * + * Context: + * Kernel/Interrupt context. + */ +uint8_t +qla2x00_fo_check(scsi_qla_host_t *ha, srb_t *sp) +{ + uint8_t retry = FALSE; + int host_status; +#if DEBUG_QLA2100 + static char *reason[] = { + "DID_OK", + "DID_NO_CONNECT", + "DID_BUS_BUSY", + "DID_TIME_OUT", + "DID_BAD_TARGET", + "DID_ABORT", + "DID_PARITY", + "DID_ERROR", + "DID_RESET", + "DID_BAD_INTR" + }; +#endif + + DEBUG9(printk("%s: entered.\n", __func__);) + + /* we failover on selction timeouts only */ + host_status = host_byte(sp->cmd->result); + if (host_status == DID_NO_CONNECT) { + if (qla2x00_fo_count_retries(ha, sp)) { + /* Force a retry on this request, it will + * cause the LINUX timer to get reset, while we + * we are processing the failover. + */ + sp->cmd->result = DID_BUS_BUSY << 16; + retry = TRUE; + } + DEBUG(printk("qla2x00_fo_check: pid= %ld sp %p retry count=%d, " + "retry flag = %d, host status (%s)\n", + sp->cmd->serial_number, sp, sp->fo_retry_cnt, retry, + reason[host_status]);) + } + + DEBUG9(printk("%s: exiting. retry = %d.\n", __func__, retry);) + + return retry; +} + +/* + * qla2x00_fo_path_change + * This function is called from configuration mgr to notify + * of a path change. + * + * Input: + * type = Failover notify type, FO_NOTIFY_LUN_RESET or FO_NOTIFY_LOGOUT + * newlunp = Pointer to the fc_lun struct for current path. + * oldlunp = Pointer to fc_lun struct for previous path. + * + * Returns: + * + * Context: + * Kernel context. + */ +uint32_t +qla2x00_fo_path_change(uint32_t type, fc_lun_t *newlunp, fc_lun_t *oldlunp) +{ + uint32_t ret = QLA_SUCCESS; + + newlunp->max_path_retries = 0; + return ret; +} + +/* + * qla2x00_fo_get_params + * Process an ioctl request to get system wide failover parameters. + * + * Input: + * pp = Pointer to FO_PARAMS structure. + * + * Returns: + * EXT_STATUS code. + * + * Context: + * Kernel context. + */ +static uint32_t +qla2x00_fo_get_params(PFO_PARAMS pp) +{ + DEBUG9(printk("%s: entered.\n", __func__);) + + pp->MaxPathsPerDevice = qla_fo_params.MaxPathsPerDevice; + pp->MaxRetriesPerPath = qla_fo_params.MaxRetriesPerPath; + pp->MaxRetriesPerIo = qla_fo_params.MaxRetriesPerIo; + pp->Flags = qla_fo_params.Flags; + pp->FailoverNotifyType = qla_fo_params.FailoverNotifyType; + pp->FailoverNotifyCdbLength = qla_fo_params.FailoverNotifyCdbLength; + memset(pp->FailoverNotifyCdb, 0, sizeof(pp->FailoverNotifyCdb)); + memcpy(pp->FailoverNotifyCdb, + &qla_fo_params.FailoverNotifyCdb[0], sizeof(pp->FailoverNotifyCdb)); + + DEBUG9(printk("%s: exiting.\n", __func__);) + + return EXT_STATUS_OK; +} + +/* + * qla2x00_fo_set_params + * Process an ioctl request to set system wide failover parameters. + * + * Input: + * pp = Pointer to FO_PARAMS structure. + * + * Returns: + * EXT_STATUS code. + * + * Context: + * Kernel context. + */ +static uint32_t +qla2x00_fo_set_params(PFO_PARAMS pp) +{ + DEBUG9(printk("%s: entered.\n", __func__);) + + /* Check values for defined MIN and MAX */ + if ((pp->MaxPathsPerDevice > SDM_DEF_MAX_PATHS_PER_DEVICE) || + (pp->MaxRetriesPerPath < FO_MAX_RETRIES_PER_PATH_MIN) || + (pp->MaxRetriesPerPath > FO_MAX_RETRIES_PER_PATH_MAX) || + (pp->MaxRetriesPerIo < FO_MAX_RETRIES_PER_IO_MIN) || + (pp->MaxRetriesPerPath > FO_MAX_RETRIES_PER_IO_MAX)) { + DEBUG2_9_10(printk("%s: got invalid params.\n", __func__);) + return EXT_STATUS_INVALID_PARAM; + } + + /* Update the global structure. */ + qla_fo_params.MaxPathsPerDevice = pp->MaxPathsPerDevice; + qla_fo_params.MaxRetriesPerPath = pp->MaxRetriesPerPath; + qla_fo_params.MaxRetriesPerIo = pp->MaxRetriesPerIo; + qla_fo_params.Flags = pp->Flags; + qla_fo_params.FailoverNotifyType = pp->FailoverNotifyType; + qla_fo_params.FailoverNotifyCdbLength = pp->FailoverNotifyCdbLength; + if (pp->FailoverNotifyType & FO_NOTIFY_TYPE_CDB) { + if (pp->FailoverNotifyCdbLength > + sizeof(qla_fo_params.FailoverNotifyCdb)) { + DEBUG2_9_10(printk("%s: got invalid cdb length.\n", + __func__);) + return EXT_STATUS_INVALID_PARAM; + } + + memcpy(qla_fo_params.FailoverNotifyCdb, + pp->FailoverNotifyCdb, + sizeof(qla_fo_params.FailoverNotifyCdb)); + } + + DEBUG9(printk("%s: exiting.\n", __func__);) + + return EXT_STATUS_OK; +} + + +/* + * qla2x00_fo_init_params + * Gets driver configuration file failover properties to initalize + * the global failover parameters structure. + * + * Input: + * ha = adapter block pointer. + * + * Context: + * Kernel context. + */ +void +qla2x00_fo_init_params(scsi_qla_host_t *ha) +{ + DEBUG3(printk("%s: entered.\n", __func__);) + + /* For parameters that are not completely implemented yet, */ + + memset(&qla_fo_params, 0, sizeof(qla_fo_params)); + + if(MaxPathsPerDevice) { + qla_fo_params.MaxPathsPerDevice = MaxPathsPerDevice; + } else + qla_fo_params.MaxPathsPerDevice =FO_MAX_PATHS_PER_DEVICE_DEF ; + if(MaxRetriesPerPath) { + qla_fo_params.MaxRetriesPerPath = MaxRetriesPerPath; + } else + qla_fo_params.MaxRetriesPerPath =FO_MAX_RETRIES_PER_PATH_DEF; + if(MaxRetriesPerIo) { + qla_fo_params.MaxRetriesPerIo =MaxRetriesPerIo; + } else + qla_fo_params.MaxRetriesPerIo =FO_MAX_RETRIES_PER_IO_DEF; + + qla_fo_params.Flags = 0; + qla_fo_params.FailoverNotifyType = FO_NOTIFY_TYPE_NONE; + + /* Set it to whatever user specified on the cmdline */ + if (qlFailoverNotifyType != FO_NOTIFY_TYPE_NONE) + qla_fo_params.FailoverNotifyType = qlFailoverNotifyType; + + + DEBUG3(printk("%s: exiting.\n", __func__);) +} + +static int +qla2x00_spinup(scsi_qla_host_t *ha, fc_port_t *fcport, uint16_t lun) +{ + inq_cmd_rsp_t *pkt; + int rval, count, retry; + dma_addr_t phys_address = 0; + uint16_t comp_status; + uint16_t scsi_status; + + ENTER(__func__); + + pkt = pci_alloc_consistent(ha->pdev, + sizeof(inq_cmd_rsp_t), &phys_address); + + if (pkt == NULL) { + printk(KERN_WARNING + "scsi(%ld): Memory Allocation failed - INQ\n", + ha->host_no); + } + + count = 100; + retry = 10; + do { + /* issue spinup */ + memset(pkt, 0, sizeof(inq_cmd_rsp_t)); + pkt->p.cmd.entry_type = COMMAND_A64_TYPE; + pkt->p.cmd.entry_count = 1; + pkt->p.cmd.lun = cpu_to_le16(lun); + pkt->p.cmd.target = (uint8_t)fcport->loop_id; + /* no direction for this command */ + pkt->p.cmd.control_flags = + __constant_cpu_to_le16(CF_SIMPLE_TAG); + pkt->p.cmd.scsi_cdb[0] = START_STOP; + pkt->p.cmd.scsi_cdb[4] = 1; /* start spin cycle */ + pkt->p.cmd.dseg_count = __constant_cpu_to_le16(0); + pkt->p.cmd.timeout = __constant_cpu_to_le16(10); + pkt->p.cmd.byte_count = __constant_cpu_to_le32(0); + + rval = qla2x00_issue_iocb(ha, pkt, + phys_address, sizeof(inq_cmd_rsp_t)); + + comp_status = le16_to_cpu(pkt->p.rsp.comp_status); + scsi_status = le16_to_cpu(pkt->p.rsp.scsi_status); + + if ( (scsi_status & SS_CHECK_CONDITION) ) { + DEBUG2(printk("%s(%ld): SS_CHECK_CONDITION " + "Sense Data " + "%02x %02x %02x %02x " + "%02x %02x %02x %02x\n", + __func__, + ha->host_no, + pkt->p.rsp.req_sense_data[0], + pkt->p.rsp.req_sense_data[1], + pkt->p.rsp.req_sense_data[2], + pkt->p.rsp.req_sense_data[3], + pkt->p.rsp.req_sense_data[4], + pkt->p.rsp.req_sense_data[5], + pkt->p.rsp.req_sense_data[6], + pkt->p.rsp.req_sense_data[7]);) + if (pkt->p.rsp.req_sense_data[2] == + NOT_READY && + (pkt->p.rsp.req_sense_data[12] == 4 ) && + (pkt->p.rsp.req_sense_data[13] == 3 ) ) { + + current->state = TASK_UNINTERRUPTIBLE; + schedule_timeout(HZ); + printk("."); + count--; + } else + retry--; + } + + printk("qla_fo: Sending Start - count %d, retry=%d" + "comp status 0x%x, " + "scsi status 0x%x, rval=%d\n", + count, + retry, + comp_status, + scsi_status, + rval); + + if (rval != QLA_SUCCESS || comp_status != CS_COMPLETE) + retry--; + + } while ( count && retry && + (rval != QLA_SUCCESS || comp_status != CS_COMPLETE || + (scsi_status & SS_CHECK_CONDITION))); + + if (rval != QLA_SUCCESS || + comp_status != CS_COMPLETE || + (scsi_status & SS_CHECK_CONDITION)) { + + DEBUG(printk("qla_fo: Failed spinup - " + "comp status 0x%x, " + "scsi status 0x%x. loop_id=%d\n", + comp_status, + scsi_status, + fcport->loop_id);) + } + + pci_free_consistent(ha->pdev, sizeof(rpt_lun_cmd_rsp_t), + pkt, phys_address); + + + LEAVE(__func__); + + return( rval ); + +} + + +/* + * qla2x00_send_fo_notification + * Sends failover notification if needed. Change the fc_lun pointer + * in the old path lun queue. + * + * Input: + * old_lp = Pointer to old fc_lun. + * new_lp = Pointer to new fc_lun. + * + * Returns: + * Local function status code. + * + * Context: + * Kernel context. + */ +uint32_t +qla2x00_send_fo_notification(fc_lun_t *old_lp, fc_lun_t *new_lp) +{ + scsi_qla_host_t *old_ha = old_lp->fcport->ha; + int rval = QLA_SUCCESS; + inq_cmd_rsp_t *pkt; + uint16_t loop_id, lun; + dma_addr_t phys_address; + + + ENTER("qla2x00_send_fo_notification"); + DEBUG3(printk("%s: entered.\n", __func__);) + + loop_id = new_lp->fcport->loop_id; + lun = new_lp->lun; + + if (qla_fo_params.FailoverNotifyType == FO_NOTIFY_TYPE_LUN_RESET) { + rval = qla2x00_lun_reset(old_ha, loop_id, lun); + if (rval == QLA_SUCCESS) { + DEBUG4(printk("qla2x00_send_fo_notification: LUN " + "reset succeded\n");) + } else { + DEBUG4(printk("qla2x00_send_fo_notification: LUN " + "reset failed\n");) + } + + } + if ( (qla_fo_params.FailoverNotifyType == + FO_NOTIFY_TYPE_LOGOUT_OR_LUN_RESET) || + (qla_fo_params.FailoverNotifyType == + FO_NOTIFY_TYPE_LOGOUT_OR_CDB) ) { + + rval = qla2x00_fabric_logout(old_ha, loop_id); + if (rval == QLA_SUCCESS) { + DEBUG4(printk("qla2x00_send_fo_failover_notify: " + "logout succeded\n");) + } else { + DEBUG4(printk("qla2x00_send_fo_failover_notify: " + "logout failed\n");) + } + + } + + if (qla_fo_params.FailoverNotifyType == FO_NOTIFY_TYPE_SPINUP) { + qla2x00_spinup(new_lp->fcport->ha, new_lp->fcport, new_lp->lun); + } + + if (qla_fo_params.FailoverNotifyType == FO_NOTIFY_TYPE_CDB) { + pkt = pci_alloc_consistent(old_ha->pdev, + sizeof(inq_cmd_rsp_t), &phys_address); + if (pkt == NULL) { + DEBUG4(printk("qla2x00_send_fo_failover_notify: " + "memory allocation failed\n");) + + return(QLA_FUNCTION_FAILED); + } + + memset(pkt,0, sizeof(inq_cmd_rsp_t)); + pkt->p.cmd.entry_type = COMMAND_A64_TYPE; + pkt->p.cmd.entry_count = 1; + pkt->p.cmd.lun = cpu_to_le16(lun); +#if defined(EXTENDED_IDS) + pkt->p.cmd.target = cpu_to_le16(loop_id); +#else + pkt->p.cmd.target = loop_id; +#endif + /* FIXME: How do you know the direction ???? */ + /* This has same issues as passthur commands - you + * need more than just the CDB. + */ + pkt->p.cmd.control_flags = + __constant_cpu_to_le16(CF_SIMPLE_TAG); + memcpy(pkt->p.cmd.scsi_cdb, + qla_fo_params.FailoverNotifyCdb, + qla_fo_params.FailoverNotifyCdbLength); + pkt->p.cmd.dseg_count = __constant_cpu_to_le16(1); + pkt->p.cmd.byte_count = __constant_cpu_to_le32(0); + pkt->p.cmd.dseg_0_address[0] = cpu_to_le32( + LSD(phys_address + sizeof (sts_entry_t))); + pkt->p.cmd.dseg_0_address[1] = cpu_to_le32( + MSD(phys_address + sizeof (sts_entry_t))); + pkt->p.cmd.dseg_0_length = __constant_cpu_to_le32(0); + + rval = qla2x00_issue_iocb(old_ha, + pkt, phys_address, sizeof (inq_cmd_rsp_t)); + + if (rval != QLA_SUCCESS || + pkt->p.rsp.comp_status != CS_COMPLETE || + pkt->p.rsp.scsi_status & SS_CHECK_CONDITION || + pkt->inq[0] == 0x7f) { + + DEBUG4(printk("qla2x00_fo_notification: send CDB " + "failed: comp_status = %x" + "scsi_status = %x inq[0] = %x\n", + pkt->p.rsp.comp_status, + pkt->p.rsp.scsi_status, + pkt->inq[0]);) + } + + pci_free_consistent(old_ha->pdev, + sizeof(inq_cmd_rsp_t), pkt, phys_address); + } + + DEBUG3(printk("%s: exiting. rval = %d.\n", __func__, rval);) + + return rval; +} + + +/* + * qla2100_fo_enabled + * Reads and validates the failover enabled property. + * + * Input: + * ha = adapter state pointer. + * instance = HBA number. + * + * Returns: + * TRUE when failover is authorized else FALSE + * + * Context: + * Kernel context. + */ +uint8_t +qla2x00_fo_enabled(scsi_qla_host_t *ha, int instance) +{ + uint8_t enable = FALSE; + + if (ha->flags.failover_enabled) + enable = TRUE; + + return enable; +} + +/* + * qla2x00_fo_missing_port_summary + * Returns values of devices not connected but found in configuration + * file in user's dd_entry list. + * + * Input: + * ha = adapter state pointer. + * pdd_entry = pointer to a temporary EXT_DEVICEDATAENTRY struct + * pstart_of_entry_list = start of user addr of buffer for dd_entry entries + * max_entries = max number of entries allowed by user buffer + * pentry_cnt = pointer to total number of entries so far + * ret_status = pointer to ioctl status field + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +int +qla2x00_fo_missing_port_summary(scsi_qla_host_t *ha, + EXT_DEVICEDATAENTRY *pdd_entry, void *pstart_of_entry_list, + uint32_t max_entries, uint32_t *pentry_cnt, uint32_t *ret_status) +{ + int ret = 0; + uint8_t path_id; + uint8_t *usr_temp, *kernel_tmp; + uint16_t dev_no; + uint32_t b; + uint32_t current_offset; + uint32_t transfer_size; + mp_device_t *dp; + mp_host_t *host; + mp_path_list_t *pathlist; + mp_path_t *path; + portname_list *portname_used = NULL; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + if ((host = qla2x00_cfg_find_host(ha)) == NULL) { + DEBUG2_9_10(printk("%s(%ld): no HOST for ha inst %ld.\n", + __func__, ha->host_no, ha->instance);) + *ret_status = EXT_STATUS_DEV_NOT_FOUND; + return (ret); + } + + /* Assumption: each port name cannot appear in more than one mpdev + * structure. + */ + for (dev_no = 0; dev_no < MAX_MP_DEVICES && *pentry_cnt < max_entries; + dev_no++) { + dp = host->mp_devs[dev_no]; + + if (dp == NULL) + continue; + + /* Sanity check */ + if (qla2x00_is_wwn_zero(dp->nodename)) + continue; + + if ((pathlist = dp->path_list) == NULL) + continue; + + path = pathlist->last; + for (path_id = 0; path_id < pathlist->path_cnt && + *pentry_cnt < max_entries; path_id++, path = path->next) { + + /* Sanity check */ + if (qla2x00_is_wwn_zero(path->portname)) + continue; + + if (path->config == TRUE && path->port == NULL) { + /* This path was created from config file + * but has not been configured. + */ + if (path->host != host) { + /* path on other host. don't report */ + DEBUG10(printk("%s(%ld): path host %p " + "not for current host %p.\n", + __func__, ha->host_no, path->host, + host);) + + continue; + } + + /* Check whether we've copied info on this + * port name before. If this is a new port + * name, save the port name so we won't copy + * it again if it's also found on other hosts. + */ + if (qla2x00_port_name_in_list(path->portname, + portname_used)) { + DEBUG10(printk("%s(%ld): found previously " + "reported portname=%02x%02x%02x" + "%02x%02x%02x%02x%02x.\n", + __func__, ha->host_no, + path->portname[0], + path->portname[1], + path->portname[2], + path->portname[3], + path->portname[4], + path->portname[5], + path->portname[6], + path->portname[7]);) + continue; + } + + if ((ret = qla2x00_add_to_portname_list( + path->portname, &portname_used))) { + /* mem alloc error? */ + *ret_status = EXT_STATUS_NO_MEMORY; + break; + } + + DEBUG10(printk("%s(%ld): returning missing device " + "%02x%02x%02x%02x%02x%02x%02x%02x.\n", + __func__, ha->host_no, + path->portname[0], path->portname[1], + path->portname[2], path->portname[3], + path->portname[4], path->portname[5], + path->portname[6], path->portname[7]);) + + /* This device was not found. Return + * as unconfigured. + */ + memcpy(pdd_entry->NodeWWN, dp->nodename, + WWN_SIZE); + memcpy(pdd_entry->PortWWN, path->portname, + WWN_SIZE); + + for (b = 0; b < 3 ; b++) + pdd_entry->PortID[b] = 0; + + /* assume fabric dev so api won't translate the portid from loopid */ + pdd_entry->ControlFlags = EXT_DEF_GET_FABRIC_DEVICE; + + pdd_entry->TargetAddress.Bus = 0; + pdd_entry->TargetAddress.Target = dp->dev_id; + pdd_entry->TargetAddress.Lun = 0; + pdd_entry->DeviceFlags = 0; + pdd_entry->LoopID = 0; + pdd_entry->BaseLunNumber = 0; + + current_offset = *pentry_cnt * + sizeof(EXT_DEVICEDATAENTRY); + + transfer_size = sizeof(EXT_DEVICEDATAENTRY); + ret = verify_area(VERIFY_WRITE, + (void *)(pstart_of_entry_list + + current_offset), transfer_size); + + if (ret) { + *ret_status = EXT_STATUS_COPY_ERR; + DEBUG10(printk("%s(%ld): inst=%ld " + "ERROR verify wrt rsp bufaddr=%p\n", + __func__, ha->host_no, ha->instance, + (void *)(pstart_of_entry_list + + current_offset));) + break; + } + + /* now copy up this dd_entry to user */ + usr_temp = (uint8_t *)pstart_of_entry_list + + current_offset; + kernel_tmp = (uint8_t *)pdd_entry; + ret = copy_to_user(usr_temp, kernel_tmp, + transfer_size); + if (ret) { + *ret_status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld " + "ERROR copy rsp list buffer.\n", + __func__, ha->host_no, + ha->instance);) + break; + } + *pentry_cnt+=1; + } + + } + + if (ret || *ret_status) { + break; + } + } + + DEBUG9(printk("%s(%ld): ending entry cnt=%d.\n", + __func__, ha->host_no, *pentry_cnt);) + + qla2x00_free_portname_list(&portname_used); + + DEBUG9(printk("%s(%ld): inst=%ld exiting. ret=%d.\n", + __func__, ha->host_no, ha->instance, ret);) + + return (ret); +} + +/* + * qla2x00_port_name_in_list + * Returns whether we found the specified port name in the list given. + * + * Input: + * wwpn = pointer to ww port name. + * list = pointer to a portname_list list. + * + * Returns: + * 1 = found portname in list + * 0 = portname not in list + * + * Context: + * Kernel context. + */ +static int +qla2x00_port_name_in_list(uint8_t *wwpn, portname_list *list) +{ + int found_name = 0; + portname_list *ptmp; + + for (ptmp = list; ptmp; ptmp = ptmp->pnext) { + if (qla2x00_is_nodename_equal(ptmp->portname, wwpn)) { + found_name = 1; + break; + } + } + + return (found_name); +} + +/* + * qla2x00_add_to_portname_list + * Allocates a portname_list member and adds it to the list given + * with the specified port name. + * + * Input: + * wwpn = pointer to ww port name. + * plist = pointer to a pointer of portname_list list. + * + * Returns: + * 0 = success + * others = errno indicating error + * + * Context: + * Kernel context. + */ +static int +qla2x00_add_to_portname_list(uint8_t *wwpn, portname_list **plist) +{ + int ret = 0; + portname_list *ptmp; + portname_list *plast; + + if ((ptmp = (portname_list *)KMEM_ZALLOC(sizeof(portname_list), 50))) { + + memcpy(ptmp->portname, wwpn, EXT_DEF_WWN_NAME_SIZE); + + if (*plist) { + /* Add to tail of list */ + for (plast = *plist; plast->pnext; plast=plast->pnext) { + /* empty */ + } + plast->pnext = ptmp; + } else { + *plist = ptmp; + } + + } else { + DEBUG2_9_10(printk("%s: failed to alloc memory of size (%d)\n", + __func__, (int)sizeof(FO_LUN_DATA_LIST));) + ret = -ENOMEM; + } + + return (ret); +} + +/* + * qla2x00_free_portname_list + * Free the list given. + * + * Input: + * plist = pointer to a pointer of portname_list list to free. + * + * Returns: + * + * Context: + * Kernel context. + */ +static void +qla2x00_free_portname_list(portname_list **plist) +{ + portname_list *ptmp; + portname_list *ptmpnext; + + for (ptmp = *plist; ptmp; ptmp = ptmpnext) { + ptmpnext = ptmp->pnext; + KMEM_FREE(ptmp, sizeof(portname_list)); + } + *plist = NULL; +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_fo.cfg 999-mjb/drivers/scsi/qla2xxx/qla_fo.cfg --- 000-virgin/drivers/scsi/qla2xxx/qla_fo.cfg 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_fo.cfg 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,33 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.4.x + * Copyright (C) 2003 Qlogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + +/* + * QLogic ISP2x00 Multi-path LUN Support Driver + */ +int MaxPathsPerDevice = 0; +int MaxRetriesPerPath = 0; +int MaxRetriesPerIo = 0; +int qlFailoverNotifyType = 0; +#if defined(MODULE) +/* insmod qla2100 ql2xopts= */ +MODULE_PARM(MaxPathsPerDevice, "i"); +MODULE_PARM(MaxRetriesPerPath, "i"); +MODULE_PARM(MaxRetriesPerIo, "i"); +MODULE_PARM(qlFailoverNotifyType, "i"); +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_fo.h 999-mjb/drivers/scsi/qla2xxx/qla_fo.h --- 000-virgin/drivers/scsi/qla2xxx/qla_fo.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_fo.h 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,75 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + +/* + * QLogic ISP2x00 Failover Header + * + */ +#ifndef _QLA_FO_H +#define _QLA_FO_H + +#if defined(__cplusplus) +extern "C" +{ +#endif + +#include "qlfo.h" + /* + * This structure definition is for a scsi I/O request NOT subject to + * failover re-routing. It is for the use of configuration operations + * and diagnostics functions as definted in ExIoct.h + */ + typedef struct scsi_cdb_request { + struct adapter_state *ha; + uint16_t target; + uint16_t lun; + uint8_t *cdb_ptr; /* Pointer to cdb to be sent */ + uint8_t cdb_len; /* cdb length */ + uint8_t direction; /* Direction of I/O for buffer */ + uint8_t scb_len; /* Scsi completion block length */ + uint8_t *scb_ptr; /* Scsi completion block pointer */ + uint8_t *buf_ptr; /* Pointer to I/O buffer */ + uint16_t buf_len; /* Buffer size */ + } + SCSI_REQ_t, *SCSI_REQ_p; + + + /* + * Special defines + */ + typedef union _FO_HBA_STAT { + FO_HBA_STAT_INPUT input; + FO_HBA_STAT_INFO info; + } FO_HBA_STAT; + + typedef union _FO_LUN_DATA { + FO_LUN_DATA_INPUT input; + FO_LUN_DATA_LIST list; + } FO_LUN_DATA; + + typedef union _FO_TARGET_DATA { + FO_TARGET_DATA_INPUT input; + FO_DEVICE_DATABASE list; + } FO_TARGET_DATA; + +#if defined(__cplusplus) +} +#endif + +#endif /* ifndef _QLA_FO_H */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_gbl.h 999-mjb/drivers/scsi/qla2xxx/qla_gbl.h --- 000-virgin/drivers/scsi/qla2xxx/qla_gbl.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_gbl.h 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,441 @@ +/******************************************************************************** +* QLOGIC LINUX SOFTWARE +* +* QLogic ISP2x00 device driver for Linux 2.6.x +* Copyright (C) 2003 QLogic Corporation +* (www.qlogic.com) +* +* This program is free software; you can redistribute it and/or modify it +* under the terms of the GNU General Public License as published by the +* Free Software Foundation; either version 2, or (at your option) any +* later version. +* +* This program is distributed in the hope that it will be useful, but +* WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* General Public License for more details. +* +****************************************************************************** +* Global include file. +******************************************************************************/ + + +#ifndef __QLA_GBL_H +#define __QLA_GBL_H + +/* + * Global Data in FW files. + */ +extern unsigned char fw2100tp_version[]; +extern unsigned char fw2100tp_version_str[]; +extern unsigned short fw2100tp_addr01; +extern unsigned short fw2100tp_code01[]; +extern unsigned short fw2100tp_length01; + +extern unsigned char fw2200tp_version[]; +extern unsigned char fw2200tp_version_str[]; +extern unsigned short fw2200tp_addr01; +extern unsigned short fw2200tp_code01[]; +extern unsigned short fw2200tp_length01; + +extern unsigned char fw2300tpx_version[]; +extern unsigned char fw2300tpx_version_str[]; +extern unsigned short fw2300tpx_addr01; +extern unsigned short fw2300tpx_code01[]; +extern unsigned short fw2300tpx_length01; + +#if defined(ISP2322) +extern unsigned char fw2322tpx_version[]; +extern unsigned char fw2322tpx_version_str[]; +extern unsigned short fw2322tpx_addr01; +extern unsigned short fw2322tpx_code01[]; +extern unsigned short fw2322tpx_length01; +extern unsigned long rseqtpx_code_addr01; +extern unsigned short rseqtpx_code01[]; +extern unsigned short rseqtpx_code_length01; +extern unsigned long xseqtpx_code_addr01; +extern unsigned short xseqtpx_code01[]; +extern unsigned short xseqtpx_code_length01; +#endif + +/* + * Global Function Prototypes in qla_init.c source file. + */ +extern int qla2x00_initialize_adapter(scsi_qla_host_t *); +extern fc_port_t *qla2x00_alloc_fcport(scsi_qla_host_t *, int); + +extern int qla2x00_loop_resync(scsi_qla_host_t *); + +extern int qla2x00_find_new_loop_id(scsi_qla_host_t *, fc_port_t *); +extern int qla2x00_fabric_login(scsi_qla_host_t *, fc_port_t *, uint16_t *); +extern int qla2x00_local_device_login(scsi_qla_host_t *, uint16_t); + +extern void qla2x00_restart_queues(scsi_qla_host_t *, uint8_t); + +extern void qla2x00_rescan_fcports(scsi_qla_host_t *); + +extern void qla2x00_tgt_free(scsi_qla_host_t *ha, uint16_t t); +extern os_tgt_t *qla2x00_tgt_alloc(scsi_qla_host_t *, uint16_t); +extern os_lun_t * qla2x00_lun_alloc(scsi_qla_host_t *, uint16_t, uint16_t); + +extern int qla2x00_abort_isp(scsi_qla_host_t *); + + +/* + * Global Data in qla_os.c source file. + */ +extern char qla2x00_version_str[]; +extern unsigned long qla2x00_verbose; +extern unsigned long qla2x00_reinit; +extern unsigned long qla2x00_req_dmp; + +extern int num_hosts; +extern int apiHBAInstance; + +extern struct _qla2x00stats qla2x00_stats; +extern char *ql2xdevconf; +extern int ql2xretrycount; +extern int qla2xenbinq; +extern int ql2xlogintimeout; +extern int qlport_down_retry; +extern int ql2xmaxqdepth; +extern int displayConfig; +extern int ql2xplogiabsentdevice; +#if defined(ISP2300) +extern int ql2xintrdelaytimer; +#endif + +extern int ql2xfailover; + +extern int ConfigRequired; +extern int recoveryTime; +extern int failbackTime; + +extern int Bind; +extern int ql2xsuspendcount; +extern int qla2x00_retryq_dmp; +#if defined(MODULE) +extern char *ql2xopts; +#endif +extern struct list_head qla_hostlist; +extern rwlock_t qla_hostlist_lock; + +extern char *qla2x00_get_fw_version_str(struct scsi_qla_host *, char *); + +extern int qla2x00_queuecommand(struct scsi_cmnd *, + void (*)(struct scsi_cmnd *)); + +extern int __qla2x00_suspend_lun(scsi_qla_host_t *, os_lun_t *, int, int, int); + +extern void qla2x00_done(scsi_qla_host_t *); +extern void qla2x00_next(scsi_qla_host_t *); +extern void qla2x00_flush_failover_q(scsi_qla_host_t *, os_lun_t *); +extern void qla2x00_reset_lun_fo_counts(scsi_qla_host_t *, os_lun_t *); + +extern int qla2x00_check_tgt_status(scsi_qla_host_t *, struct scsi_cmnd *); +extern int qla2x00_check_port_status(scsi_qla_host_t *, fc_port_t *); + +extern void qla2x00_extend_timeout(struct scsi_cmnd *, int); +extern srb_t * qla2x00_get_new_sp (scsi_qla_host_t *ha); + +extern void qla2x00_mark_device_lost(scsi_qla_host_t *, fc_port_t *, int); +extern void qla2x00_mark_all_devices_lost(scsi_qla_host_t *); + +extern int qla2x00_get_prop_xstr(scsi_qla_host_t *, char *, uint8_t *, int); + +extern void qla2x00_abort_queues(scsi_qla_host_t *, uint8_t); + +extern void qla2x00_blink_led(scsi_qla_host_t *); + +/* + * Global Function Prototypes in qla_iocb.c source file. + */ +extern request_t *qla2x00_req_pkt(scsi_qla_host_t *); +extern request_t *qla2x00_ms_req_pkt(scsi_qla_host_t *, srb_t *); +extern void qla2x00_isp_cmd(scsi_qla_host_t *); + +extern uint16_t qla2x00_calc_iocbs_32(uint16_t); +extern uint16_t qla2x00_calc_iocbs_64(uint16_t); +extern void qla2x00_build_scsi_iocbs_32(srb_t *, cmd_entry_t *, uint16_t); +extern void qla2x00_build_scsi_iocbs_64(srb_t *, cmd_entry_t *, uint16_t); +extern int qla2x00_start_scsi(srb_t *sp); +int qla2x00_marker(scsi_qla_host_t *, uint16_t, uint16_t, uint8_t); +int __qla2x00_marker(scsi_qla_host_t *, uint16_t, uint16_t, uint8_t); + +/* + * Global Function Prototypes in qla_mbx.c source file. + */ +extern int +qla2x00_mailbox_command(scsi_qla_host_t *, mbx_cmd_t *); + +extern int +qla2x00_load_ram(scsi_qla_host_t *, dma_addr_t, uint16_t, uint16_t); + +extern int +qla2x00_load_ram_ext(scsi_qla_host_t *, dma_addr_t, uint32_t, uint16_t); + +extern int +qla2x00_execute_fw(scsi_qla_host_t *); + +extern void +qla2x00_get_fw_version(scsi_qla_host_t *, uint16_t *, + uint16_t *, uint16_t *, uint16_t *); + +extern int +qla2x00_get_fw_options(scsi_qla_host_t *, uint16_t *); + +extern int +qla2x00_set_fw_options(scsi_qla_host_t *, uint16_t *); + +extern int +qla2x00_read_ram_word(scsi_qla_host_t *, uint16_t, uint16_t *); +extern int +qla2x00_write_ram_word(scsi_qla_host_t *, uint16_t, uint16_t); +extern int +qla2x00_write_ram_word_ext(scsi_qla_host_t *, uint32_t, uint16_t); + +extern int +qla2x00_mbx_reg_test(scsi_qla_host_t *); + +extern int +qla2x00_verify_checksum(scsi_qla_host_t *); + +extern int +qla2x00_issue_iocb(scsi_qla_host_t *, void *, dma_addr_t, size_t); + +extern int +qla2x00_abort_command(scsi_qla_host_t *, srb_t *); + +extern int +qla2x00_abort_device(scsi_qla_host_t *, uint16_t, uint16_t); + +#if USE_ABORT_TGT +extern int +qla2x00_abort_target(fc_port_t *fcport); +#endif + +extern int +qla2x00_target_reset(scsi_qla_host_t *, uint16_t, uint16_t); + +extern int +qla2x00_get_adapter_id(scsi_qla_host_t *, uint16_t *, uint8_t *, uint8_t *, + uint8_t *, uint16_t *); + +extern int +qla2x00_get_retry_cnt(scsi_qla_host_t *, uint8_t *, uint8_t *, uint16_t *); + +extern int +qla2x00_loopback_test(scsi_qla_host_t *, INT_LOOPBACK_REQ *, uint16_t *); + +extern int +qla2x00_echo_test(scsi_qla_host_t *, INT_LOOPBACK_REQ *, uint16_t *); + +extern int +qla2x00_init_firmware(scsi_qla_host_t *, uint16_t); + +extern int +qla2x00_get_port_database(scsi_qla_host_t *, fc_port_t *, uint8_t); + +extern int +qla2x00_get_firmware_state(scsi_qla_host_t *, uint16_t *); + +extern int +qla2x00_get_port_name(scsi_qla_host_t *, uint16_t, uint8_t *, uint8_t); + +extern uint8_t +qla2x00_get_link_status(scsi_qla_host_t *, uint8_t, void *, uint16_t *); + +extern int +qla2x00_lip_reset(scsi_qla_host_t *); + +extern int +qla2x00_send_sns(scsi_qla_host_t *, dma_addr_t, uint16_t, size_t); + +extern int +qla2x00_login_fabric(scsi_qla_host_t *, uint16_t, uint8_t, uint8_t, uint8_t, + uint16_t *, uint8_t); + +extern int +qla2x00_login_local_device(scsi_qla_host_t *, uint16_t, uint16_t *, uint8_t); + +extern int +qla2x00_fabric_logout(scsi_qla_host_t *ha, uint16_t loop_id); + +extern int +qla2x00_full_login_lip(scsi_qla_host_t *ha); + +extern int +qla2x00_get_id_list(scsi_qla_host_t *, void *, dma_addr_t, uint16_t *); + +#if 0 /* not yet needed */ +extern int +qla2x00_dump_ram(scsi_qla_host_t *, uint32_t, dma_addr_t, uint32_t); +#endif + +extern int +qla2x00_lun_reset(scsi_qla_host_t *, uint16_t, uint16_t); + +extern int +qla2x00_send_rnid_mbx(scsi_qla_host_t *, uint16_t, uint8_t, dma_addr_t, + size_t, uint16_t *); + +extern int +qla2x00_set_rnid_params_mbx(scsi_qla_host_t *, dma_addr_t, size_t, uint16_t *); + +extern int +qla2x00_get_rnid_params_mbx(scsi_qla_host_t *, dma_addr_t, size_t, uint16_t *); + +extern int +qla2x00_get_resource_cnts(scsi_qla_host_t *, uint16_t *, uint16_t *, uint16_t *, + uint16_t *); + +#if defined(QL_DEBUG_LEVEL_3) +extern int +qla2x00_get_fcal_position_map(scsi_qla_host_t *ha, char *pos_map); +#endif + +/* + * Global Data in qla_fo.c source file. + */ +extern SysFoParams_t qla_fo_params; + +/* + * Global Function Prototypes in qla_fo.c source file. + */ +extern scsi_qla_host_t *qla2x00_get_hba(unsigned long); +extern uint32_t qla2x00_send_fo_notification(fc_lun_t *fclun_p, fc_lun_t *olun_p); +extern void qla2x00_fo_init_params(scsi_qla_host_t *ha); +extern uint8_t qla2x00_fo_enabled(scsi_qla_host_t *ha, int instance); + +/* + * Global Data in qla_cfg.c source file. + */ +extern mp_host_t *mp_hosts_base; +extern uint8_t mp_config_required; +/* + * Global Function Prototypes in qla_cfg.c source file. + */ +extern mp_host_t * qla2x00_cfg_find_host(scsi_qla_host_t *); +extern uint8_t qla2x00_is_portname_in_device(mp_device_t *, uint8_t *); +extern int qla2x00_cfg_init (scsi_qla_host_t *ha); +extern int qla2x00_cfg_path_discovery(scsi_qla_host_t *ha); +extern int qla2x00_cfg_event_notify(scsi_qla_host_t *ha, uint32_t i_type); +extern fc_lun_t *qla2x00_cfg_failover(scsi_qla_host_t *ha, fc_lun_t *fp, + os_tgt_t *tgt, srb_t *sp); +extern int qla2x00_cfg_get_paths( EXT_IOCTL *, FO_GET_PATHS *, int); +extern int qla2x00_cfg_set_current_path( EXT_IOCTL *, + FO_SET_CURRENT_PATH *, int); +extern void qla2x00_fo_properties(scsi_qla_host_t *ha); +extern mp_host_t * qla2x00_add_mp_host(uint8_t *); +extern void qla2x00_cfg_mem_free(scsi_qla_host_t *ha); +extern mp_host_t * qla2x00_alloc_host(scsi_qla_host_t *); +extern uint8_t qla2x00_fo_check(scsi_qla_host_t *ha, srb_t *sp); +extern mp_path_t *qla2x00_find_path_by_name(mp_host_t *, mp_path_list_t *, + uint8_t *name); +extern int qla2x00_is_fcport_in_config(scsi_qla_host_t *, fc_port_t *); + +/* + * Global Function Prototypes in qla_cfgln.c source file. + */ +extern void qla2x00_cfg_build_path_tree( scsi_qla_host_t *ha); +extern uint8_t qla2x00_update_mp_device(mp_host_t *, + fc_port_t *, uint16_t, uint16_t); +extern void qla2x00_cfg_display_devices(void); + +/* + * Global Function Prototypes in qla_xioctl.c source file. + */ +extern void qla2x00_enqueue_aen(scsi_qla_host_t *, uint16_t, void *); +extern int qla2x00_fo_ioctl(scsi_qla_host_t *, int, EXT_IOCTL *, int); +extern int qla2x00_fo_missing_port_summary(scsi_qla_host_t *, + EXT_DEVICEDATAENTRY *, void *, uint32_t, uint32_t *, uint32_t *); +extern int qla2x00_alloc_ioctl_mem(scsi_qla_host_t *); +extern void qla2x00_free_ioctl_mem(scsi_qla_host_t *); +extern int qla2x00_get_ioctl_scrap_mem(scsi_qla_host_t *, void **, uint32_t); +extern void qla2x00_free_ioctl_scrap_mem(scsi_qla_host_t *); + +/* + * Global Function Prototypes in qla_inioctl.c source file. + */ +extern int qla2x00_read_nvram(scsi_qla_host_t *, EXT_IOCTL *, int); +extern int qla2x00_update_nvram(scsi_qla_host_t *, EXT_IOCTL *, int); +extern int qla2x00_write_nvram_word(scsi_qla_host_t *, uint8_t, uint16_t); +extern int qla2x00_send_loopback(scsi_qla_host_t *, EXT_IOCTL *, int); +extern int qla2x00_read_option_rom(scsi_qla_host_t *, EXT_IOCTL *, int); +extern int qla2x00_update_option_rom(scsi_qla_host_t *, EXT_IOCTL *, int); + + +/* + * Global Function Prototypes in qla_isr.c source file. + */ +extern irqreturn_t qla2x00_intr_handler(int, void *, struct pt_regs *); +extern void qla2x00_process_response_queue(struct scsi_qla_host *); + + +/* + * Global Function Prototypes in qla_sup.c source file. + */ + +extern uint16_t qla2x00_get_nvram_word(scsi_qla_host_t *, uint32_t); +extern void qla2x00_nv_write(scsi_qla_host_t *, uint16_t); +extern void qla2x00_nv_deselect(scsi_qla_host_t *); +extern void qla2x00_flash_enable(scsi_qla_host_t *); +extern void qla2x00_flash_disable(scsi_qla_host_t *); +extern uint8_t qla2x00_read_flash_byte(scsi_qla_host_t *, uint32_t); +extern uint8_t qla2x00_get_flash_manufacturer(scsi_qla_host_t *); +extern uint16_t qla2x00_get_flash_version(scsi_qla_host_t *); +extern uint16_t qla2x00_get_flash_image(scsi_qla_host_t *, uint8_t *); +extern uint16_t qla2x00_set_flash_image(scsi_qla_host_t *, uint8_t *); + +/* + * Global Function Prototypes in qla_vendor.c source file. + */ +void qla2x00_set_vend_direction(scsi_qla_host_t *, struct scsi_cmnd *, + cmd_entry_t *); + +/* + * Global Function Prototypes in qla_dbg.c source file. + */ +extern void qla2x00_fw_dump(scsi_qla_host_t *, int); +extern void qla2x00_ascii_fw_dump(scsi_qla_host_t *); +extern void qla2x00_dump_regs(scsi_qla_host_t *); +extern void qla2x00_dump_buffer(uint8_t *, uint32_t); +extern void qla2x00_print_scsi_cmd(struct scsi_cmnd *); +extern void qla2x00_print_q_info(struct os_lun *); + +/* + * Global Function Prototypes in qla_ip.c source file. + */ +extern int qla2x00_ip_initialize(scsi_qla_host_t *); +extern int qla2x00_update_ip_device_data(scsi_qla_host_t *, fc_port_t *); +extern void qla2x00_ip_send_complete(scsi_qla_host_t *, uint32_t, uint16_t); +extern void qla2x00_ip_receive(scsi_qla_host_t *, sts_entry_t *); +extern void qla2x00_ip_receive_fastpost(scsi_qla_host_t *, uint16_t); +extern void qla2x00_ip_mailbox_iocb_done(scsi_qla_host_t *, struct mbx_entry *); + +/* + * Global Function Prototypes in qla_gs.c source file. + */ +extern int qla2x00_ga_nxt(scsi_qla_host_t *, fc_port_t *); +extern int qla2x00_gid_pt(scsi_qla_host_t *, sw_info_t *); +extern int qla2x00_gpn_id(scsi_qla_host_t *, sw_info_t *); +extern int qla2x00_gnn_id(scsi_qla_host_t *, sw_info_t *); +extern int qla2x00_gft_id(scsi_qla_host_t *, sw_info_t *); +extern int qla2x00_rft_id(scsi_qla_host_t *); +extern int qla2x00_rff_id(scsi_qla_host_t *); +extern int qla2x00_rnn_id(scsi_qla_host_t *); +extern int qla2x00_rsnn_nn(scsi_qla_host_t *); + +/* + * Global Function Prototypes in qla_rscn.c source file. + */ + +#if defined(ISP2300) +extern fc_port_t *qla2x00_alloc_rscn_fcport(scsi_qla_host_t *, int); +extern int qla2x00_handle_port_rscn(scsi_qla_host_t *, uint32_t, fc_port_t *, + int); +extern void qla2x00_process_iodesc(scsi_qla_host_t *, struct mbx_entry *); +extern void qla2x00_cancel_io_descriptors(scsi_qla_host_t *); +#endif + +#endif /* _QLA_GBL_H */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_gs.c 999-mjb/drivers/scsi/qla2xxx/qla_gs.c --- 000-virgin/drivers/scsi/qla2xxx/qla_gs.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_gs.c 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,673 @@ +/* + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ +#include "qla_os.h" + +#include "qla_def.h" + + +static inline ms_iocb_entry_t * +qla2x00_prep_ms_iocb(scsi_qla_host_t *, uint32_t, uint32_t); + +static inline struct ct_sns_req * +qla2x00_prep_ct_req(struct ct_sns_req *, uint16_t, uint16_t); + +/** + * qla2x00_prep_ms_iocb() - Prepare common MS IOCB fields for SNS CT query. + * @ha: HA context + * @req_size: request size in bytes + * @rsp_size: response size in bytes + * + * Returns a pointer to the @ha's ms_iocb. + */ +static inline ms_iocb_entry_t * +qla2x00_prep_ms_iocb(scsi_qla_host_t *ha, uint32_t req_size, uint32_t rsp_size) +{ + ms_iocb_entry_t *ms_pkt; + + ms_pkt = ha->ms_iocb; + memset(ms_pkt, 0, sizeof(ms_iocb_entry_t)); + + ms_pkt->entry_type = MS_IOCB_TYPE; + ms_pkt->entry_count = 1; +#if defined(EXTENDED_IDS) + ms_pkt->loop_id = __constant_cpu_to_le16(SIMPLE_NAME_SERVER); +#else + ms_pkt->loop_id = SIMPLE_NAME_SERVER; +#endif + ms_pkt->control_flags = __constant_cpu_to_le16(CF_READ | CF_HEAD_TAG); + ms_pkt->timeout = __constant_cpu_to_le16(25); + ms_pkt->cmd_dsd_count = __constant_cpu_to_le16(1); + ms_pkt->total_dsd_count = __constant_cpu_to_le16(2); + ms_pkt->rsp_bytecount = cpu_to_le32(rsp_size); + ms_pkt->req_bytecount = cpu_to_le32(req_size); + + ms_pkt->dseg_req_address[0] = cpu_to_le32(LSD(ha->ct_sns_dma)); + ms_pkt->dseg_req_address[1] = cpu_to_le32(MSD(ha->ct_sns_dma)); + ms_pkt->dseg_req_length = ms_pkt->req_bytecount; + + ms_pkt->dseg_rsp_address[0] = cpu_to_le32(LSD(ha->ct_sns_dma)); + ms_pkt->dseg_rsp_address[1] = cpu_to_le32(MSD(ha->ct_sns_dma)); + ms_pkt->dseg_rsp_length = ms_pkt->rsp_bytecount; + + return (ms_pkt); +} + +/** + * qla2x00_prep_ct_req() - Prepare common CT request fields for SNS query. + * @ct_req: CT request buffer + * @cmd: GS command + * @rsp_size: response size in bytes + * + * Returns a pointer to the intitialized @ct_req. + */ +static inline struct ct_sns_req * +qla2x00_prep_ct_req(struct ct_sns_req *ct_req, uint16_t cmd, uint16_t rsp_size) +{ + memset(ct_req, 0, sizeof(struct ct_sns_pkt)); + + ct_req->header.revision = 0x01; + ct_req->header.gs_type = 0xFC; + ct_req->header.gs_subtype = 0x02; + ct_req->command = cpu_to_be16(cmd); + ct_req->max_rsp_size = cpu_to_be16((rsp_size - 16) / 4); + + return (ct_req); +} + +/** + * qla2x00_ga_nxt() - SNS scan for fabric devices via GA_NXT command. + * @ha: HA context + * @fcport: fcport entry to updated + * + * Returns 0 on success. + */ +int +qla2x00_ga_nxt(scsi_qla_host_t *ha, fc_port_t *fcport) +{ + int rval; + + ms_iocb_entry_t *ms_pkt; + struct ct_sns_req *ct_req; + struct ct_sns_rsp *ct_rsp; + + /* Issue GA_NXT */ + /* Prepare common MS IOCB */ + ms_pkt = qla2x00_prep_ms_iocb(ha, GA_NXT_REQ_SIZE, GA_NXT_RSP_SIZE); + + /* Prepare CT request */ + ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, GA_NXT_CMD, + GA_NXT_RSP_SIZE); + ct_rsp = &ha->ct_sns->p.rsp; + + /* Prepare CT arguments -- port_id */ + ct_req->req.port_id.port_id[0] = fcport->d_id.b.domain; + ct_req->req.port_id.port_id[1] = fcport->d_id.b.area; + ct_req->req.port_id.port_id[2] = fcport->d_id.b.al_pa; + + /* Execute MS IOCB */ + rval = qla2x00_issue_iocb(ha, ha->ms_iocb, ha->ms_iocb_dma, + sizeof(ms_iocb_entry_t)); + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3(printk("scsi(%ld): GA_NXT issue IOCB failed (%d).\n", + ha->host_no, rval)); + } else if (ct_rsp->header.response != + __constant_cpu_to_be16(CT_ACCEPT_RESPONSE)) { + DEBUG2_3(printk("scsi(%ld): GA_NXT failed, rejected request, " + "ga_nxt_rsp:\n", ha->host_no)); + DEBUG2_3(qla2x00_dump_buffer((uint8_t *)&ct_rsp->header, + sizeof(struct ct_rsp_hdr))); + rval = QLA_FUNCTION_FAILED; + } else { + /* Populate fc_port_t entry. */ + fcport->d_id.b.domain = ct_rsp->rsp.ga_nxt.port_id[0]; + fcport->d_id.b.area = ct_rsp->rsp.ga_nxt.port_id[1]; + fcport->d_id.b.al_pa = ct_rsp->rsp.ga_nxt.port_id[2]; + + memcpy(fcport->node_name, ct_rsp->rsp.ga_nxt.node_name, + WWN_SIZE); + memcpy(fcport->port_name, ct_rsp->rsp.ga_nxt.port_name, + WWN_SIZE); + + if (ct_rsp->rsp.ga_nxt.port_type != NS_N_PORT_TYPE && + ct_rsp->rsp.ga_nxt.port_type != NS_NL_PORT_TYPE) + fcport->d_id.b.domain = 0xf0; + + DEBUG2_3(printk("scsi(%ld): GA_NXT entry - " + "nn %02x%02x%02x%02x%02x%02x%02x%02x " + "pn %02x%02x%02x%02x%02x%02x%02x%02x " + "portid=%02x%02x%02x.\n", + ha->host_no, + fcport->node_name[0], fcport->node_name[1], + fcport->node_name[2], fcport->node_name[3], + fcport->node_name[4], fcport->node_name[5], + fcport->node_name[6], fcport->node_name[7], + fcport->port_name[0], fcport->port_name[1], + fcport->port_name[2], fcport->port_name[3], + fcport->port_name[4], fcport->port_name[5], + fcport->port_name[6], fcport->port_name[7], + fcport->d_id.b.domain, fcport->d_id.b.area, + fcport->d_id.b.al_pa)); + } + + return (rval); +} + +/** + * qla2x00_gid_pt() - SNS scan for fabric devices via GID_PT command. + * @ha: HA context + * @list: switch info entries to populate + * + * NOTE: Non-Nx_Ports are not requested. + * + * Returns 0 on success. + */ +int +qla2x00_gid_pt(scsi_qla_host_t *ha, sw_info_t *list) +{ + int rval; + uint16_t i; + + ms_iocb_entry_t *ms_pkt; + struct ct_sns_req *ct_req; + struct ct_sns_rsp *ct_rsp; + + struct ct_sns_gid_pt_data *gid_data; + + gid_data = NULL; + + /* Issue GID_PT */ + /* Prepare common MS IOCB */ + ms_pkt = qla2x00_prep_ms_iocb(ha, GID_PT_REQ_SIZE, GID_PT_RSP_SIZE); + + /* Prepare CT request */ + ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, GID_PT_CMD, + GID_PT_RSP_SIZE); + ct_rsp = &ha->ct_sns->p.rsp; + + /* Prepare CT arguments -- port_type */ + ct_req->req.gid_pt.port_type = NS_NX_PORT_TYPE; + + /* Execute MS IOCB */ + rval = qla2x00_issue_iocb(ha, ha->ms_iocb, ha->ms_iocb_dma, + sizeof(ms_iocb_entry_t)); + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3(printk("scsi(%ld): GID_PT issue IOCB failed (%d).\n", + ha->host_no, rval)); + } else if (ct_rsp->header.response != + __constant_cpu_to_be16(CT_ACCEPT_RESPONSE)) { + DEBUG2_3(printk("scsi(%ld): GID_PT failed, rejected request, " + "gid_pt_rsp:\n", ha->host_no)); + DEBUG2_3(qla2x00_dump_buffer((uint8_t *)&ct_rsp->header, + sizeof(struct ct_rsp_hdr))); + rval = QLA_FUNCTION_FAILED; + } else { + /* Set port IDs in switch info list. */ + for (i = 0; i < MAX_FIBRE_DEVICES; i++) { + memset(&list[i], 0, sizeof(sw_info_t)); + gid_data = &ct_rsp->rsp.gid_pt.entries[i]; + list[i].d_id.b.domain = gid_data->port_id[0]; + list[i].d_id.b.area = gid_data->port_id[1]; + list[i].d_id.b.al_pa = gid_data->port_id[2]; + + /* Last one exit. */ + if (gid_data->control_byte & BIT_7) { + list[i].d_id.b.rsvd_1 = gid_data->control_byte; + break; + } + } + } + + return (rval); +} + +/** + * qla2x00_gpn_id() - SNS Get Port Name (GPN_ID) query. + * @ha: HA context + * @list: switch info entries to populate + * + * Returns 0 on success. + */ +int +qla2x00_gpn_id(scsi_qla_host_t *ha, sw_info_t *list) +{ + int rval; + uint16_t i; + + ms_iocb_entry_t *ms_pkt; + struct ct_sns_req *ct_req; + struct ct_sns_rsp *ct_rsp; + + for (i = 0; i < MAX_FIBRE_DEVICES; i++) { + /* Issue GPN_ID */ + /* Prepare common MS IOCB */ + ms_pkt = qla2x00_prep_ms_iocb(ha, GPN_ID_REQ_SIZE, + GPN_ID_RSP_SIZE); + + /* Prepare CT request */ + ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, GPN_ID_CMD, + GPN_ID_RSP_SIZE); + ct_rsp = &ha->ct_sns->p.rsp; + + /* Prepare CT arguments -- port_id */ + ct_req->req.port_id.port_id[0] = list[i].d_id.b.domain; + ct_req->req.port_id.port_id[1] = list[i].d_id.b.area; + ct_req->req.port_id.port_id[2] = list[i].d_id.b.al_pa; + + /* Execute MS IOCB */ + rval = qla2x00_issue_iocb(ha, ha->ms_iocb, ha->ms_iocb_dma, + sizeof(ms_iocb_entry_t)); + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3(printk("scsi(%ld): GPN_ID issue IOCB failed " + "(%d).\n", ha->host_no, rval)); + } else if (ct_rsp->header.response != + __constant_cpu_to_be16(CT_ACCEPT_RESPONSE)) { + DEBUG2_3(printk("scsi(%ld): GPN_ID failed, rejected " + "request, gpn_id_rsp:\n", ha->host_no)); + DEBUG2_3(qla2x00_dump_buffer((uint8_t *)&ct_rsp->header, + sizeof(struct ct_rsp_hdr))); + rval = QLA_FUNCTION_FAILED; + } else { + /* Save portname */ + memcpy(list[i].port_name, + ct_rsp->rsp.gpn_id.port_name, WWN_SIZE); + } + + /* Last device exit. */ + if (list[i].d_id.b.rsvd_1 != 0) + break; + } + + return (rval); +} + +/** + * qla2x00_gnn_id() - SNS Get Node Name (GPN_ID) query. + * @ha: HA context + * @list: switch info entries to populate + * + * Returns 0 on success. + */ +int +qla2x00_gnn_id(scsi_qla_host_t *ha, sw_info_t *list) +{ + int rval; + uint16_t i; + + ms_iocb_entry_t *ms_pkt; + struct ct_sns_req *ct_req; + struct ct_sns_rsp *ct_rsp; + + for (i = 0; i < MAX_FIBRE_DEVICES; i++) { + /* Issue GNN_ID */ + /* Prepare common MS IOCB */ + ms_pkt = qla2x00_prep_ms_iocb(ha, GNN_ID_REQ_SIZE, + GNN_ID_RSP_SIZE); + + /* Prepare CT request */ + ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, GNN_ID_CMD, + GNN_ID_RSP_SIZE); + ct_rsp = &ha->ct_sns->p.rsp; + + /* Prepare CT arguments -- port_id */ + ct_req->req.port_id.port_id[0] = list[i].d_id.b.domain; + ct_req->req.port_id.port_id[1] = list[i].d_id.b.area; + ct_req->req.port_id.port_id[2] = list[i].d_id.b.al_pa; + + /* Execute MS IOCB */ + rval = qla2x00_issue_iocb(ha, ha->ms_iocb, ha->ms_iocb_dma, + sizeof(ms_iocb_entry_t)); + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3(printk("scsi(%ld): GNN_ID issue IOCB failed " + "(%d).\n", ha->host_no, rval)); + } else if (ct_rsp->header.response != + __constant_cpu_to_be16(CT_ACCEPT_RESPONSE)) { + DEBUG2_3(printk("scsi(%ld): GNN_ID failed, rejected " + "request, gnn_id_rsp:\n", ha->host_no)); + DEBUG2_3(qla2x00_dump_buffer((uint8_t *)&ct_rsp->header, + sizeof(struct ct_rsp_hdr))); + rval = QLA_FUNCTION_FAILED; + } else { + /* Save nodename */ + memcpy(list[i].node_name, + ct_rsp->rsp.gnn_id.node_name, WWN_SIZE); + + DEBUG2_3(printk("scsi(%ld): GID_PT entry - " + "nn %02x%02x%02x%02x%02x%02x%02x%02x " + "pn %02x%02x%02x%02x%02x%02x%02x%02x " + "portid=%02x%02x%02x.\n", + ha->host_no, + list[i].node_name[0], list[i].node_name[1], + list[i].node_name[2], list[i].node_name[3], + list[i].node_name[4], list[i].node_name[5], + list[i].node_name[6], list[i].node_name[7], + list[i].port_name[0], list[i].port_name[1], + list[i].port_name[2], list[i].port_name[3], + list[i].port_name[4], list[i].port_name[5], + list[i].port_name[6], list[i].port_name[7], + list[i].d_id.b.domain, list[i].d_id.b.area, + list[i].d_id.b.al_pa)); + } + + /* Last device exit. */ + if (list[i].d_id.b.rsvd_1 != 0) + break; + } + + return (rval); +} + +/** + * qla2x00_gft_id() - SNS Get FC-4 TYPEs (GFT_ID) query. + * @ha: HA context + * @list: switch info entries to populate + * + * Returns 0 on success. + */ +int +qla2x00_gft_id(scsi_qla_host_t *ha, sw_info_t *list) +{ + int rval; + uint16_t i; + + ms_iocb_entry_t *ms_pkt; + struct ct_sns_req *ct_req; + struct ct_sns_rsp *ct_rsp; + + for (i = 0; i < MAX_FIBRE_DEVICES; i++) { + /* Issue GFT_ID */ + /* Prepare common MS IOCB */ + ms_pkt = qla2x00_prep_ms_iocb(ha, GFT_ID_REQ_SIZE, + GFT_ID_RSP_SIZE); + + /* Prepare CT request */ + ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, GFT_ID_CMD, + GFT_ID_RSP_SIZE); + ct_rsp = &ha->ct_sns->p.rsp; + + /* Prepare CT arguments -- port_id */ + ct_req->req.port_id.port_id[0] = list[i].d_id.b.domain; + ct_req->req.port_id.port_id[1] = list[i].d_id.b.area; + ct_req->req.port_id.port_id[2] = list[i].d_id.b.al_pa; + + /* Execute MS IOCB */ + rval = qla2x00_issue_iocb(ha, ha->ms_iocb, ha->ms_iocb_dma, + sizeof(ms_iocb_entry_t)); + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3(printk("scsi(%ld): GFT_ID issue IOCB failed " + "(%d).\n", ha->host_no, rval)); + } else if (ct_rsp->header.response != + __constant_cpu_to_be16(CT_ACCEPT_RESPONSE)) { + DEBUG2_3(printk("scsi(%ld): GFT_ID failed, rejected " + "request, gft_id_rsp:\n", ha->host_no)); + DEBUG2_3(qla2x00_dump_buffer((uint8_t *)&ct_rsp->header, + sizeof(struct ct_rsp_hdr))); + rval = QLA_FUNCTION_FAILED; + } else { + /* FCP-3 check necessary? No, assume FCP-3 */ + /*if (ct_rsp->rsp.gft_id.fc4_types[2] & 0x01)*/ + list[i].type = SW_TYPE_SCSI; + if (ct_rsp->rsp.gft_id.fc4_types[3] & 0x20) + list[i].type |= SW_TYPE_IP; + } + + /* Last device exit. */ + if (list[i].d_id.b.rsvd_1 != 0) + break; + } + + return (rval); +} + +/** + * qla2x00_rft_id() - SNS Register FC-4 TYPEs (RFT_ID) supported by the HBA. + * @ha: HA context + * + * Returns 0 on success. + */ +int +qla2x00_rft_id(scsi_qla_host_t *ha) +{ + int rval; + + ms_iocb_entry_t *ms_pkt; + struct ct_sns_req *ct_req; + struct ct_sns_rsp *ct_rsp; + + /* Issue RFT_ID */ + /* Prepare common MS IOCB */ + ms_pkt = qla2x00_prep_ms_iocb(ha, RFT_ID_REQ_SIZE, RFT_ID_RSP_SIZE); + + /* Prepare CT request */ + ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RFT_ID_CMD, + RFT_ID_RSP_SIZE); + ct_rsp = &ha->ct_sns->p.rsp; + + /* Prepare CT arguments -- port_id, FC-4 types */ + ct_req->req.rft_id.port_id[0] = ha->d_id.b.domain; + ct_req->req.rft_id.port_id[1] = ha->d_id.b.area; + ct_req->req.rft_id.port_id[2] = ha->d_id.b.al_pa; + + ct_req->req.rft_id.fc4_types[2] = 0x01; /* FCP-3 */ + ha->active_fc4_types = EXT_DEF_FC4_TYPE_SCSI; + + /* Execute MS IOCB */ + rval = qla2x00_issue_iocb(ha, ha->ms_iocb, ha->ms_iocb_dma, + sizeof(ms_iocb_entry_t)); + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3(printk("scsi(%ld): RFT_ID issue IOCB failed (%d).\n", + ha->host_no, rval)); + } else if (ct_rsp->header.response != + __constant_cpu_to_be16(CT_ACCEPT_RESPONSE)) { + DEBUG2_3(printk("scsi(%ld): RFT_ID failed, rejected " + "request, rft_id_rsp:\n", ha->host_no)); + DEBUG2_3(qla2x00_dump_buffer((uint8_t *)&ct_rsp->header, + sizeof(struct ct_rsp_hdr))); + rval = QLA_FUNCTION_FAILED; + } else { + DEBUG2(printk("scsi(%ld): RFT_ID exiting normally.\n", + ha->host_no)); + } + + return (rval); +} + +/** + * qla2x00_rff_id() - SNS Register FC-4 Features (RFF_ID) supported by the HBA. + * @ha: HA context + * + * Returns 0 on success. + */ +int +qla2x00_rff_id(scsi_qla_host_t *ha) +{ + int rval; + + ms_iocb_entry_t *ms_pkt; + struct ct_sns_req *ct_req; + struct ct_sns_rsp *ct_rsp; + + /* Issue RFF_ID */ + /* Prepare common MS IOCB */ + ms_pkt = qla2x00_prep_ms_iocb(ha, RFF_ID_REQ_SIZE, RFF_ID_RSP_SIZE); + + /* Prepare CT request */ + ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RFF_ID_CMD, + RFF_ID_RSP_SIZE); + ct_rsp = &ha->ct_sns->p.rsp; + + /* Prepare CT arguments -- port_id, FC-4 feature, FC-4 type */ + ct_req->req.rff_id.port_id[0] = ha->d_id.b.domain; + ct_req->req.rff_id.port_id[1] = ha->d_id.b.area; + ct_req->req.rff_id.port_id[2] = ha->d_id.b.al_pa; + + ct_req->req.rff_id.fc4_type = 0x08; /* SCSI - FCP */ + + /* Execute MS IOCB */ + rval = qla2x00_issue_iocb(ha, ha->ms_iocb, ha->ms_iocb_dma, + sizeof(ms_iocb_entry_t)); + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3(printk("scsi(%ld): RFF_ID issue IOCB failed (%d).\n", + ha->host_no, rval)); + } else if (ct_rsp->header.response != + __constant_cpu_to_be16(CT_ACCEPT_RESPONSE)) { + DEBUG2_3(printk("scsi(%ld): RFF_ID failed, rejected " + "request, rff_id_rsp:\n", ha->host_no)); + DEBUG2_3(qla2x00_dump_buffer((uint8_t *)&ct_rsp->header, + sizeof(struct ct_rsp_hdr))); + rval = QLA_FUNCTION_FAILED; + } else { + DEBUG2(printk("scsi(%ld): RFF_ID exiting normally.\n", + ha->host_no)); + } + + return (rval); +} + +/** + * qla2x00_rnn_id() - SNS Register Node Name (RNN_ID) of the HBA. + * @ha: HA context + * + * Returns 0 on success. + */ +int +qla2x00_rnn_id(scsi_qla_host_t *ha) +{ + int rval; + + ms_iocb_entry_t *ms_pkt; + struct ct_sns_req *ct_req; + struct ct_sns_rsp *ct_rsp; + + /* Issue RNN_ID */ + /* Prepare common MS IOCB */ + ms_pkt = qla2x00_prep_ms_iocb(ha, RNN_ID_REQ_SIZE, RNN_ID_RSP_SIZE); + + /* Prepare CT request */ + ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RNN_ID_CMD, + RNN_ID_RSP_SIZE); + ct_rsp = &ha->ct_sns->p.rsp; + + /* Prepare CT arguments -- port_id, node_name */ + ct_req->req.rnn_id.port_id[0] = ha->d_id.b.domain; + ct_req->req.rnn_id.port_id[1] = ha->d_id.b.area; + ct_req->req.rnn_id.port_id[2] = ha->d_id.b.al_pa; + + memcpy(ct_req->req.rnn_id.node_name, ha->init_cb->node_name, WWN_SIZE); + + /* Execute MS IOCB */ + rval = qla2x00_issue_iocb(ha, ha->ms_iocb, ha->ms_iocb_dma, + sizeof(ms_iocb_entry_t)); + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3(printk("scsi(%ld): RNN_ID issue IOCB failed (%d).\n", + ha->host_no, rval)); + } else if (ct_rsp->header.response != + __constant_cpu_to_be16(CT_ACCEPT_RESPONSE)) { + DEBUG2_3(printk("scsi(%ld): RNN_ID failed, rejected " + "request, rnn_id_rsp:\n", ha->host_no)); + DEBUG2_3(qla2x00_dump_buffer((uint8_t *)&ct_rsp->header, + sizeof(struct ct_rsp_hdr))); + rval = QLA_FUNCTION_FAILED; + } else { + DEBUG2(printk("scsi(%ld): RNN_ID exiting normally.\n", + ha->host_no)); + } + + return (rval); +} + +/** + * qla2x00_rsnn_nn() - SNS Register Symbolic Node Name (RSNN_NN) of the HBA. + * @ha: HA context + * + * Returns 0 on success. + */ +int +qla2x00_rsnn_nn(scsi_qla_host_t *ha) +{ + int rval; + uint8_t *snn; + uint8_t version[20]; + + ms_iocb_entry_t *ms_pkt; + struct ct_sns_req *ct_req; + struct ct_sns_rsp *ct_rsp; + + /* Issue RSNN_NN */ + /* Prepare common MS IOCB */ + /* Request size adjusted after CT preparation */ + ms_pkt = qla2x00_prep_ms_iocb(ha, 0, RSNN_NN_RSP_SIZE); + + /* Prepare CT request */ + ct_req = qla2x00_prep_ct_req(&ha->ct_sns->p.req, RSNN_NN_CMD, + RSNN_NN_RSP_SIZE); + ct_rsp = &ha->ct_sns->p.rsp; + + /* Prepare CT arguments -- node_name, symbolic node_name, size */ + memcpy(ct_req->req.rsnn_nn.node_name, ha->init_cb->node_name, WWN_SIZE); + + /* Prepare the Symbolic Node Name */ + /* Board type */ + snn = ct_req->req.rsnn_nn.sym_node_name; + strcpy(snn, ha->model_number); + /* Firmware version */ + strcat(snn, " FW:v"); + sprintf(version, "%d.%02d.%02d", ha->fw_major_version, + ha->fw_minor_version, ha->fw_subminor_version); + strcat(snn, version); + /* Driver version */ + strcat(snn, " DVR:v"); + strcat(snn, qla2x00_version_str); + + /* Calculate SNN length */ + ct_req->req.rsnn_nn.name_len = (uint8_t)strlen(snn); + + /* Update MS IOCB request */ + ms_pkt->req_bytecount = + cpu_to_le32(24 + 1 + ct_req->req.rsnn_nn.name_len); + ms_pkt->dseg_req_length = ms_pkt->req_bytecount; + + /* Execute MS IOCB */ + rval = qla2x00_issue_iocb(ha, ha->ms_iocb, ha->ms_iocb_dma, + sizeof(ms_iocb_entry_t)); + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3(printk("scsi(%ld): RSNN_NN issue IOCB failed (%d).\n", + ha->host_no, rval)); + } else if (ct_rsp->header.response != + __constant_cpu_to_be16(CT_ACCEPT_RESPONSE)) { + DEBUG2_3(printk("scsi(%ld): RSNN_NN failed, rejected " + "request, rsnn_id_rsp:\n", ha->host_no)); + DEBUG2_3(qla2x00_dump_buffer((uint8_t *)&ct_rsp->header, + sizeof(struct ct_rsp_hdr))); + rval = QLA_FUNCTION_FAILED; + } else { + DEBUG2(printk("scsi(%ld): RSNN_NN exiting normally.\n", + ha->host_no)); + } + + return (rval); +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_inioct.c 999-mjb/drivers/scsi/qla2xxx/qla_inioct.c --- 000-virgin/drivers/scsi/qla2xxx/qla_inioct.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_inioct.c 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,602 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + +#include "qla_os.h" +#include "qla_def.h" + +#include "inioct.h" + +extern int qla2x00_loopback_test(scsi_qla_host_t *ha, INT_LOOPBACK_REQ *req, + uint16_t *ret_mb); + +int qla2x00_read_nvram(scsi_qla_host_t *, EXT_IOCTL *, int); +int qla2x00_update_nvram(scsi_qla_host_t *, EXT_IOCTL *, int); +int qla2x00_write_nvram_word(scsi_qla_host_t *, uint8_t, uint16_t); +int qla2x00_send_loopback(scsi_qla_host_t *, EXT_IOCTL *, int); +int qla2x00_read_option_rom(scsi_qla_host_t *, EXT_IOCTL *, int); +int qla2x00_update_option_rom(scsi_qla_host_t *, EXT_IOCTL *, int); + +int +qla2x00_read_nvram(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int ret = 0; + char *ptmp_buf; +#if defined(ISP2300) + device_reg_t *reg = ha->iobase; + uint16_t data; +#endif + uint16_t cnt; + uint16_t *wptr; + uint32_t transfer_size; + + DEBUG9(printk("qla2x00_read_nvram: entered.\n");) + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&ptmp_buf, + sizeof(nvram_t))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%d.\n", + __func__, ha->host_no, ha->instance, + sizeof(nvram_t));) + return (ret); + } + + if (pext->ResponseLen < sizeof(nvram_t)) + transfer_size = pext->ResponseLen / 2; + else + transfer_size = sizeof(nvram_t) / 2; + + /* Dump NVRAM. */ +#if defined(ISP2300) + if (ha->pdev->device == QLA2312_DEVICE_ID || + ha->pdev->device == QLA2322_DEVICE_ID) { + data = RD_REG_WORD(®->nvram); + while (data & NVR_BUSY) { + udelay(100); + data = RD_REG_WORD(®->nvram); + } + + /* Lock resource */ + WRT_REG_WORD(®->host_semaphore, 0x1); + udelay(5); + data = RD_REG_WORD(®->host_semaphore); + while ((data & BIT_0) == 0) { + /* Lock failed */ + udelay(100); + WRT_REG_WORD(®->host_semaphore, 0x1); + udelay(5); + data = RD_REG_WORD(®->host_semaphore); + } + } +#endif + + wptr = (uint16_t *)ptmp_buf; + for (cnt = 0; cnt < transfer_size; cnt++) { + *wptr = cpu_to_le16(qla2x00_get_nvram_word(ha, + cnt+ha->nvram_base)); + wptr++; + } + +#if defined(ISP2300) + if (ha->pdev->device == QLA2312_DEVICE_ID || + ha->pdev->device == QLA2322_DEVICE_ID) { + /* Unlock resource */ + WRT_REG_WORD(®->host_semaphore, 0); + } +#endif + + ret = copy_to_user((uint8_t *)pext->ResponseAdr, ptmp_buf, + transfer_size * 2); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy rsp buffer.\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + + qla2x00_free_ioctl_scrap_mem(ha); + + DEBUG9(printk("qla2x00_read_nvram: exiting.\n");) + + return (ret); +} + +/* + * qla2x00_update_nvram + * Write data to NVRAM. + * + * Input: + * ha = adapter block pointer. + * pext = pointer to driver internal IOCTL structure. + * + * Returns: + * + * Context: + * Kernel context. + */ +int +qla2x00_update_nvram(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ +#if defined(ISP2300) + device_reg_t *reg = ha->iobase; +#endif + uint8_t i, cnt; + uint8_t *usr_tmp, *kernel_tmp; + nvram_t *pnew_nv; + uint16_t *wptr; + uint16_t data; + uint32_t transfer_size; + uint8_t chksum = 0; + int ret = 0; + + DEBUG9(printk("qla2x00_update_nvram: entered.\n");) + + if (pext->RequestLen < sizeof(nvram_t)) + transfer_size = pext->RequestLen; + else + transfer_size = sizeof(nvram_t); + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&pnew_nv, + sizeof(nvram_t))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(nvram_t));) + return (ret); + } + + /* Read from user buffer */ + kernel_tmp = (uint8_t *)pnew_nv; + usr_tmp = (uint8_t *)pext->RequestAdr; + + ret = verify_area(VERIFY_READ, (void *)usr_tmp, transfer_size); + if (ret) { + DEBUG9_10(printk( + "qla2x00_update_nvram: ERROR in buffer verify READ. " + "RequestAdr=%p\n", pext->RequestAdr);) + qla2x00_free_ioctl_scrap_mem(ha); + return ret; + } + + copy_from_user(kernel_tmp, usr_tmp, transfer_size); + + kernel_tmp = (uint8_t *)pnew_nv; + + /* we need to checksum the nvram */ + for (i = 0; i < sizeof(nvram_t) - 1; i++) { + chksum += *kernel_tmp; + kernel_tmp++; + } + + chksum = ~chksum + 1; + + *kernel_tmp = chksum; + + /* Write to NVRAM */ +#if defined(ISP2300) + if (ha->pdev->device == QLA2312_DEVICE_ID || + ha->pdev->device == QLA2322_DEVICE_ID) { + data = RD_REG_WORD(®->nvram); + while (data & NVR_BUSY) { + udelay(100); + data = RD_REG_WORD(®->nvram); + } + + /* Lock resource */ + WRT_REG_WORD(®->host_semaphore, 0x1); + udelay(5); + data = RD_REG_WORD(®->host_semaphore); + while ((data & BIT_0) == 0) { + /* Lock failed */ + udelay(100); + WRT_REG_WORD(®->host_semaphore, 0x1); + udelay(5); + data = RD_REG_WORD(®->host_semaphore); + } + } +#endif + + wptr = (uint16_t *)pnew_nv; + for (cnt = 0; cnt < transfer_size / 2; cnt++) { + data = cpu_to_le16(*wptr++); + qla2x00_write_nvram_word(ha, cnt+ha->nvram_base, data); + } + +#if defined(ISP2300) + if (ha->pdev->device == QLA2312_DEVICE_ID || + ha->pdev->device == QLA2322_DEVICE_ID) { + /* Unlock resource */ + WRT_REG_WORD(®->host_semaphore, 0); + } +#endif + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + + qla2x00_free_ioctl_scrap_mem(ha); + + DEBUG9(printk("qla2x00_update_nvram: exiting.\n");) + + return 0; +} + +int +qla2x00_write_nvram_word(scsi_qla_host_t *ha, uint8_t addr, uint16_t data) +{ + int count; + uint16_t word; + uint32_t nv_cmd; + device_reg_t *reg = ha->iobase; + + qla2x00_nv_write(ha, NVR_DATA_OUT); + qla2x00_nv_write(ha, 0); + qla2x00_nv_write(ha, 0); + + for (word = 0; word < 8; word++) + qla2x00_nv_write(ha, NVR_DATA_OUT); + + qla2x00_nv_deselect(ha); + + /* Erase Location */ + nv_cmd = (addr << 16) | NV_ERASE_OP; + nv_cmd <<= 5; + for (count = 0; count < 11; count++) { + if (nv_cmd & BIT_31) + qla2x00_nv_write(ha, NVR_DATA_OUT); + else + qla2x00_nv_write(ha, 0); + + nv_cmd <<= 1; + } + + qla2x00_nv_deselect(ha); + + /* Wait for Erase to Finish */ + WRT_REG_WORD(®->nvram, NVR_SELECT); + do { + NVRAM_DELAY(); + word = RD_REG_WORD(®->nvram); + } while ((word & NVR_DATA_IN) == 0); + + qla2x00_nv_deselect(ha); + + /* Write data */ + nv_cmd = (addr << 16) | NV_WRITE_OP; + nv_cmd |= data; + nv_cmd <<= 5; + for (count = 0; count < 27; count++) { + if (nv_cmd & BIT_31) + qla2x00_nv_write(ha, NVR_DATA_OUT); + else + qla2x00_nv_write(ha, 0); + + nv_cmd <<= 1; + } + + qla2x00_nv_deselect(ha); + + /* Wait for NVRAM to become ready */ + WRT_REG_WORD(®->nvram, NVR_SELECT); + do { + NVRAM_DELAY(); + word = RD_REG_WORD(®->nvram); + } while ((word & NVR_DATA_IN) == 0); + + qla2x00_nv_deselect(ha); + + /* Disable writes */ + qla2x00_nv_write(ha, NVR_DATA_OUT); + for (count = 0; count < 10; count++) + qla2x00_nv_write(ha, 0); + + qla2x00_nv_deselect(ha); + + DEBUG9(printk("qla2x00_write_nvram_word: exiting.\n");) + + return 0; +} + +int +qla2x00_send_loopback(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int status; + uint16_t ret_mb[MAILBOX_REGISTER_COUNT]; + INT_LOOPBACK_REQ req; + INT_LOOPBACK_RSP rsp; + + DEBUG9(printk("qla2x00_send_loopback: entered.\n");) + + + if (pext->RequestLen != sizeof(INT_LOOPBACK_REQ)) { + pext->Status = EXT_STATUS_INVALID_PARAM; + DEBUG9_10(printk( + "qla2x00_send_loopback: invalid RequestLen =%d.\n", + pext->RequestLen);) + return pext->Status; + } + + if (pext->ResponseLen != sizeof(INT_LOOPBACK_RSP)) { + pext->Status = EXT_STATUS_INVALID_PARAM; + DEBUG9_10(printk( + "qla2x00_send_loopback: invalid ResponseLen =%d.\n", + pext->ResponseLen);) + return pext->Status; + } + + status = verify_area(VERIFY_READ, (void *)pext->RequestAdr, + pext->RequestLen); + if (status) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("qla2x00_send_loopback: ERROR verify read of " + "request buffer.\n");) + return pext->Status; + } + + copy_from_user((uint8_t *)&req, (uint8_t *)pext->RequestAdr, + pext->RequestLen); + + status = verify_area(VERIFY_READ, (void *)pext->ResponseAdr, + pext->ResponseLen); + if (status) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("qla2x00_send_loopback: ERROR verify read of " + "response buffer.\n");) + return pext->Status; + } + + copy_from_user((uint8_t *)&rsp, (uint8_t *)pext->ResponseAdr, + pext->ResponseLen); + + if (req.TransferCount > req.BufferLength || + req.TransferCount > rsp.BufferLength) { + + /* Buffer lengths not large enough. */ + pext->Status = EXT_STATUS_INVALID_PARAM; + + DEBUG9_10(printk( + "qla2x00_send_loopback: invalid TransferCount =%d. " + "req BufferLength =%d rspBufferLength =%d.\n", + req.TransferCount, req.BufferLength, rsp.BufferLength);) + + return pext->Status; + } + + status = verify_area(VERIFY_READ, (void *)req.BufferAddress, + req.TransferCount); + if (status) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("qla2x00_send_loopback: ERROR verify read of " + "user loopback data buffer.\n");) + return pext->Status; + } + + copy_from_user((uint8_t *)ha->ioctl_mem, (uint8_t *)req.BufferAddress, + req.TransferCount); + + DEBUG9(printk("qla2x00_send_loopback: req -- bufadr=%p, buflen=%x, " + "xfrcnt=%x, rsp -- bufadr=%p, buflen=%x.\n", + req.BufferAddress, req.BufferLength, req.TransferCount, + rsp.BufferAddress, rsp.BufferLength);) + + /* + * AV - the caller of this IOCTL expects the FW to handle + * a loopdown situation and return a good status for the + * call function and a LOOPDOWN status for the test operations + */ + /*if (ha->loop_state != LOOP_READY || */ + if (test_bit(CFG_ACTIVE, &ha->cfg_flags) || + test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || + test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || ha->dpc_active) { + + pext->Status = EXT_STATUS_BUSY; + DEBUG9_10(printk("qla2x00_send_loopback(%ld): " + "loop not ready.\n", ha->host_no);) + return pext->Status; + } + + if (ha->current_topology == ISP_CFG_F) { +#if defined(ISP2300) + status = qla2x00_echo_test(ha, &req, ret_mb); +#else + pext->Status = EXT_STATUS_INVALID_REQUEST ; + DEBUG9_10(printk("qla2x00_send_loopback: ERROR " + "command only supported for QLA23xx.\n");) + return 0; +#endif + } else { + status = qla2x00_loopback_test(ha, &req, ret_mb); + } + + if (status) { + if (status == QLA_FUNCTION_TIMEOUT ) { + pext->Status = EXT_STATUS_BUSY; + DEBUG9_10(printk("qla2x00_send_loopback: ERROR " + "command timed out.\n");) + return 0; + } else { + /* EMPTY. Just proceed to copy back mailbox reg + * values for users to interpret. + */ + DEBUG10(printk("qla2x00_send_loopback: ERROR " + "loopback command failed 0x%x.\n", ret_mb[0]);) + } + } + + status = verify_area(VERIFY_WRITE, (void *)rsp.BufferAddress, + req.TransferCount); + if (status) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("qla2x00_send_loopback: ERROR verify " + "write of return data buffer.\n");) + return status; + } + + DEBUG9(printk("qla2x00_send_loopback: loopback mbx cmd ok. " + "copying data.\n");) + + /* put loopback return data in user buffer */ + copy_to_user((uint8_t *)rsp.BufferAddress, + (uint8_t *)ha->ioctl_mem, req.TransferCount); + + rsp.CompletionStatus = ret_mb[0]; + if (ha->current_topology == ISP_CFG_F) { + rsp.CommandSent = INT_DEF_LB_ECHO_CMD; + } else { + if (rsp.CompletionStatus == INT_DEF_LB_COMPLETE || + rsp.CompletionStatus == INT_DEF_LB_CMD_ERROR) { + rsp.CrcErrorCount = ret_mb[1]; + rsp.DisparityErrorCount = ret_mb[2]; + rsp.FrameLengthErrorCount = ret_mb[3]; + rsp.IterationCountLastError = + (ret_mb[19] << 16) | ret_mb[18]; + } + } + + status = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr, + pext->ResponseLen); + if (status) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("qla2x00_send_loopback: ERROR verify " + "write of response buffer.\n");) + return pext->Status; + } + + copy_to_user((uint8_t *)pext->ResponseAdr, (uint8_t *)&rsp, + pext->ResponseLen); + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + + DEBUG9(printk("qla2x00_send_loopback: exiting.\n");) + + return pext->Status; +} + +int qla2x00_read_option_rom(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + uint8_t *usr_tmp; + uint32_t addr; + uint32_t midpoint; + uint32_t transfer_size; + uint8_t data; + device_reg_t *reg = ha->iobase; + unsigned long cpu_flags; + + DEBUG9(printk("%s: entered.\n", __func__);) + + if (pext->ResponseLen != FLASH_IMAGE_SIZE) { + pext->Status = EXT_STATUS_BUFFER_TOO_SMALL; + return (1); + } + + transfer_size = FLASH_IMAGE_SIZE; + + midpoint = FLASH_IMAGE_SIZE / 2; + usr_tmp = (uint8_t *)pext->ResponseAdr; + + /* Dump FLASH. */ + spin_lock_irqsave(&ha->hardware_lock, cpu_flags); + qla2x00_flash_enable(ha); + WRT_REG_WORD(®->nvram, 0); + for (addr = 0; addr < transfer_size; addr++, usr_tmp++) { + if (addr == midpoint) + WRT_REG_WORD(®->nvram, NVR_SELECT); + + data = qla2x00_read_flash_byte(ha, addr); + if (addr % 100) + udelay(10); + __put_user(data, usr_tmp); + } + qla2x00_flash_disable(ha); + spin_unlock_irqrestore(&ha->hardware_lock, cpu_flags); + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + + DEBUG9(printk("%s: exiting.\n", __func__);) + + return (0); +} + +int qla2x00_update_option_rom(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int ret; + uint8_t *usr_tmp; + uint8_t *kern_tmp; + uint16_t status; + unsigned long cpu_flags; + + DEBUG9(printk("%s: entered.\n", __func__);) + + if (pext->RequestLen != FLASH_IMAGE_SIZE) { + pext->Status = EXT_STATUS_COPY_ERR; + return (1); + } + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + + /* Read from user buffer */ + usr_tmp = (uint8_t *)pext->RequestAdr; + ret = verify_area(VERIFY_READ, (void *)usr_tmp, FLASH_IMAGE_SIZE); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s: ERROR in buffer verify READ. " + "RequestAdr=%p\n", + __func__, pext->RequestAdr);) + return (ret); + } + + kern_tmp = (uint8_t *)KMEM_ZALLOC(FLASH_IMAGE_SIZE, 30); + if (kern_tmp == NULL) { + pext->Status = EXT_STATUS_COPY_ERR; + printk(KERN_WARNING + "%s: ERROR in flash allocation.\n", __func__); + return (1); + } + copy_from_user(kern_tmp, usr_tmp, FLASH_IMAGE_SIZE); + + /* Go with update */ + spin_lock_irqsave(&ha->hardware_lock, cpu_flags); + status = qla2x00_set_flash_image(ha, kern_tmp); + spin_unlock_irqrestore(&ha->hardware_lock, cpu_flags); + + /* Schedule DPC to restart the RISC */ + set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + up(ha->dpc_wait); + + KMEM_FREE(kern_tmp, FLASH_IMAGE_SIZE); + + if (status) { + ret = 1; + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s: ERROR updating flash.\n", __func__);) + } + + DEBUG9(printk("%s: exiting.\n", __func__);) + + return (ret); +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_init.c 999-mjb/drivers/scsi/qla2xxx/qla_init.c --- 000-virgin/drivers/scsi/qla2xxx/qla_init.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_init.c 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,4366 @@ +/* + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ +#include "qla_os.h" + +#include "qla_def.h" + +#if defined(ISP2300) +#include "qla_devtbl.h" +#endif + +/* +* QLogic ISP2x00 Hardware Support Function Prototypes. +*/ +static int qla2x00_pci_config(scsi_qla_host_t *); +static int qla2x00_isp_firmware(scsi_qla_host_t *); +static void qla2x00_reset_chip(scsi_qla_host_t *); +static int qla2x00_chip_diag(scsi_qla_host_t *); +static int qla2x00_setup_chip(scsi_qla_host_t *); +static void qla2x00_init_response_q_entries(scsi_qla_host_t *); +static int qla2x00_init_rings(scsi_qla_host_t *); +static int qla2x00_fw_ready(scsi_qla_host_t *); +static int qla2x00_configure_hba(scsi_qla_host_t *); +static int qla2x00_nvram_config(scsi_qla_host_t *); +static void qla2x00_init_tgt_map(scsi_qla_host_t *); +static int qla2x00_configure_loop(scsi_qla_host_t *); +static int qla2x00_configure_local_loop(scsi_qla_host_t *); +static void qla2x00_update_fcport(scsi_qla_host_t *, fc_port_t *); +static void qla2x00_lun_discovery(scsi_qla_host_t *, fc_port_t *); +static int qla2x00_rpt_lun_discovery(scsi_qla_host_t *, fc_port_t *, + inq_cmd_rsp_t *, dma_addr_t); +static int qla2x00_report_lun(scsi_qla_host_t *, fc_port_t *, + rpt_lun_cmd_rsp_t *, dma_addr_t); +static fc_lun_t *qla2x00_cfg_lun(scsi_qla_host_t *, fc_port_t *, uint16_t, + inq_cmd_rsp_t *, dma_addr_t); +static fc_lun_t * qla2x00_add_lun(fc_port_t *, uint16_t); +static int qla2x00_inquiry(scsi_qla_host_t *, fc_port_t *, uint16_t, + inq_cmd_rsp_t *, dma_addr_t); +static int qla2x00_configure_fabric(scsi_qla_host_t *); +static int qla2x00_find_all_fabric_devs(scsi_qla_host_t *, struct list_head *); +static int qla2x00_device_resync(scsi_qla_host_t *); +static int qla2x00_fabric_dev_login(scsi_qla_host_t *, fc_port_t *, + uint16_t *); +static void qla2x00_config_os(scsi_qla_host_t *ha); +static uint16_t qla2x00_fcport_bind(scsi_qla_host_t *ha, fc_port_t *fcport); +static os_lun_t * qla2x00_fclun_bind(scsi_qla_host_t *, fc_port_t *, + fc_lun_t *); +static void qla2x00_lun_free(scsi_qla_host_t *, uint16_t, uint16_t); +static void qla2x00_get_lun_mask_from_config(scsi_qla_host_t *, fc_port_t *, + uint16_t, uint16_t); + +static int qla2x00_bstr_to_hex(char *, uint8_t *, int); +static int qla2x00_find_propname(scsi_qla_host_t *, + char *, char *, char *, int); +static int qla2x00_get_prop_16chars(scsi_qla_host_t *, + char *, char *, char *); +static void qla2x00_get_properties(scsi_qla_host_t *, char *); + +static void qla2x00_cfg_persistent_binding(scsi_qla_host_t *); +static os_tgt_t *qla2x00_persistent_bind(scsi_qla_host_t *, uint8_t *, + uint8_t *, port_id_t *, uint16_t); + +static int qla2x00_restart_isp(scsi_qla_host_t *); +static void qla2x00_reset_adapter(scsi_qla_host_t *); + +/****************************************************************************/ +/* QLogic ISP2x00 Hardware Support Functions. */ +/****************************************************************************/ + +/* +* qla2x00_initialize_adapter +* Initialize board. +* +* Input: +* ha = adapter block pointer. +* +* Returns: +* 0 = success +*/ +int +qla2x00_initialize_adapter(scsi_qla_host_t *ha) +{ + int rval; + uint8_t isp_init = 0; + uint8_t restart_risc = 0; + uint8_t retry; + + /* Clear adapter flags. */ + ha->forceLip = 0; + ha->flags.online = FALSE; + ha->flags.disable_host_adapter = FALSE; + ha->flags.reset_active = FALSE; + ha->flags.watchdog_enabled = FALSE; + atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); + ha->loop_state = LOOP_DOWN; + ha->device_flags = 0; + ha->sns_retry_cnt = 0; + ha->dpc_flags = 0; + ha->failback_delay = 0; + ha->flags.management_server_logged_in = 0; + ha->marker_needed = 0; + ha->mbx_flags = 0; + ha->isp_abort_cnt = 0; +#if defined(ISP2300) + ha->beacon_blink_led = 0; +#endif + + rval = qla2x00_pci_config(ha); + if (rval) { + DEBUG2(printk("scsi(%ld): Unable to configure PCI space=n", + ha->host_no)); + return (rval); + } + + qla2x00_reset_chip(ha); + + /* Initialize target map database. */ + qla2x00_init_tgt_map(ha); + + /* Get Flash Version */ + qla2x00_get_flash_version(ha); + + qla_printk(KERN_INFO, ha, "Configure NVRAM parameters...\n"); + qla2x00_nvram_config(ha); + + ha->retry_count = ql2xretrycount; + + qla_printk(KERN_INFO, ha, "Verifying loaded RISC code...\n"); + + /* + * If the user specified a device configuration on the command line + * then use it as the configuration. Otherwise, we scan for all + * devices. + */ + if (ql2xdevconf) { + ha->cmdline = ql2xdevconf; + if (!ha->flags.failover_enabled) + qla2x00_get_properties(ha, ql2xdevconf); + } + + retry = 10; + /* + * Try to configure the loop. + */ + do { + restart_risc = 0; + isp_init = 0; + + /* If firmware needs to be loaded */ + if (qla2x00_isp_firmware(ha) != QLA_SUCCESS) { + if ((rval = qla2x00_chip_diag(ha)) == QLA_SUCCESS) { + rval = qla2x00_setup_chip(ha); + } + } + + /* Retrieve firmware information */ + qla2x00_get_fw_version(ha, &ha->fw_major_version, + &ha->fw_minor_version, &ha->fw_subminor_version, + &ha->fw_attributes); + qla2x00_get_resource_cnts(ha, NULL, &ha->xchg_buf_cnt, + &ha->iocb_buf_cnt, NULL); + + if (rval == QLA_SUCCESS && + (rval = qla2x00_init_rings(ha)) == QLA_SUCCESS) { +check_fw_ready_again: + /* + * Wait for a successful LIP up to a maximum + * of (in seconds): RISC login timeout value, + * RISC retry count value, and port down retry + * value OR a minimum of 4 seconds OR If no + * cable, only 5 seconds. + */ + if (!qla2x00_fw_ready(ha)) { + clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); + + /* + * Go setup flash database devices with proper + * Loop ID's. + */ + do { + clear_bit(LOOP_RESYNC_NEEDED, + &ha->dpc_flags); + rval = qla2x00_configure_loop(ha); + + if (test_bit(ISP_ABORT_NEEDED, + &ha->dpc_flags)) { + + restart_risc = 1; + break; + } + + /* + * If loop state change while we were + * discoverying devices then wait for + * LIP to complete + */ + + if (ha->loop_state == LOOP_DOWN && retry--) { + goto check_fw_ready_again; + } + } while (!atomic_read(&ha->loop_down_timer) && + retry && + (test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags))); + } + + if (ha->mem_err) { + restart_risc = 1; + } + isp_init = 1; + + } + } while (restart_risc && retry--); + + if (isp_init) { + clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); + ha->marker_needed = 1; + qla2x00_marker(ha, 0, 0, MK_SYNC_ALL); + ha->marker_needed = 0; + + ha->flags.online = TRUE; + } + + if (rval) { + DEBUG2_3(printk("%s(): **** FAILED ****\n", __func__)); + } + + return (rval); +} + +/** + * qla2x00_pci_config() - Setup device PCI configuration registers. + * @ha: HA context + * + * Returns 0 on success. + */ +static int +qla2x00_pci_config(scsi_qla_host_t *ha) +{ + uint16_t w, mwi; + unsigned long flags = 0; +#if defined(ISP2300) + uint32_t cnt; +#endif + + qla_printk(KERN_INFO, ha, "Configuring PCI space...\n"); + + /* + * Turn on PCI master; for system BIOSes that don't turn it on by + * default. + */ + pci_set_master(ha->pdev); + mwi = 0; + if (pci_set_mwi(ha->pdev)) + mwi = PCI_COMMAND_INVALIDATE; + pci_read_config_word(ha->pdev, PCI_REVISION_ID, &ha->revision); + + if (!ha->iobase) + return (QLA_FUNCTION_FAILED); + + /* + * We want to respect framework's setting of PCI configuration space + * command register and also want to make sure that all bits of + * interest to us are properly set in command register. + */ + pci_read_config_word(ha->pdev, PCI_COMMAND, &w); + w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR); + + /* Get PCI bus information. */ + spin_lock_irqsave(&ha->hardware_lock, flags); + ha->pci_attr = RD_REG_WORD(&ha->iobase->ctrl_status); + spin_unlock_irqrestore(&ha->hardware_lock, flags); + +#if defined(ISP2300) + pci_write_config_byte(ha->pdev, PCI_LATENCY_TIMER, 0x80); + + /* PCI Specification Revision 2.3 changes */ + if (ha->pdev->device == QLA2322_DEVICE_ID) { + /* Command Register -- Reset Interrupt Disable -- BIT_10 */ + w &= ~BIT_10; + } + + /* + * If this is a 2300 card and not 2312, reset the COMMAND_INVALIDATE + * due to a bug in the 2300. Unfortunately, the 2310 also reports + * itself as a 2300 so we need to get the fb revision level -- a 6 + * indicates it really is a 2300 and not a 2310. + */ + if (ha->pdev->device == QLA2300_DEVICE_ID) { + spin_lock_irqsave(&ha->hardware_lock, flags); + + /* Pause RISC. */ + WRT_REG_WORD(&ha->iobase->hccr, HCCR_PAUSE_RISC); + for (cnt = 0; cnt < 30000; cnt++) { + if ((RD_REG_WORD(&ha->iobase->hccr) & + HCCR_RISC_PAUSE) != 0) + break; + + udelay(10); + } + + /* Select FPM registers. */ + WRT_REG_WORD(&ha->iobase->ctrl_status, 0x20); + + /* Get the fb rev level */ + ha->fb_rev = RD_REG_WORD(&ha->iobase->fb_cmd); + + if (ha->fb_rev == FPM_2300) + w &= ~PCI_COMMAND_INVALIDATE; + + /* Deselect FPM registers. */ + WRT_REG_WORD(&ha->iobase->ctrl_status, 0x0); + + /* Release RISC module. */ + WRT_REG_WORD(&ha->iobase->hccr, HCCR_RELEASE_RISC); + for (cnt = 0; cnt < 30000; cnt++) { + if ((RD_REG_WORD(&ha->iobase->hccr) & + HCCR_RISC_PAUSE) == 0) + break; + + udelay(10); + } + + spin_unlock_irqrestore(&ha->hardware_lock, flags); + } +#endif + + pci_write_config_word(ha->pdev, PCI_COMMAND, w); + + /* Reset expansion ROM address decode enable */ + pci_read_config_word(ha->pdev, PCI_ROM_ADDRESS, &w); + w &= ~PCI_ROM_ADDRESS_ENABLE; + pci_write_config_word(ha->pdev, PCI_ROM_ADDRESS, w); + + return (QLA_SUCCESS); +} + +/** + * qla2x00_isp_firmware() - Choose firmware image. + * @ha: HA context + * + * Returns 0 on success. + */ +static int +qla2x00_isp_firmware(scsi_qla_host_t *ha) +{ + int rval; + + /* Assume loading risc code */ + rval = QLA_FUNCTION_FAILED; + + if (ha->flags.disable_risc_code_load) { + DEBUG2(printk("scsi(%ld): RISC CODE NOT loaded\n", + ha->host_no)); + qla_printk(KERN_INFO, ha, "RISC CODE NOT loaded\n"); + + /* Verify checksum of loaded RISC code. */ + rval = qla2x00_verify_checksum(ha); + } + + if (rval) { + DEBUG2_3(printk("scsi(%ld): **** Load RISC code ****\n", + ha->host_no)); + } + + return (rval); +} + +/** + * qla2x00_reset_chip() - Reset ISP chip. + * @ha: HA context + * + * Returns 0 on success. + */ +static void +qla2x00_reset_chip(scsi_qla_host_t *ha) +{ + unsigned long flags = 0; + device_reg_t *reg = ha->iobase; + uint32_t cnt; + unsigned long mbx_flags = 0; + uint16_t cmd; + + /* Disable ISP interrupts. */ + qla2x00_disable_intrs(ha); + + spin_lock_irqsave(&ha->hardware_lock, flags); + + /* Turn off master enable */ + cmd = 0; + pci_read_config_word(ha->pdev, PCI_COMMAND, &cmd); + cmd &= ~PCI_COMMAND_MASTER; + pci_write_config_word(ha->pdev, PCI_COMMAND, cmd); + +#if defined(ISP2200) || defined(ISP2300) + /* Pause RISC. */ + WRT_REG_WORD(®->hccr, HCCR_PAUSE_RISC); + if (ha->pdev->device != QLA2312_DEVICE_ID || + ha->pdev->device != QLA2322_DEVICE_ID) { + for (cnt = 0; cnt < 30000; cnt++) { + if ((RD_REG_WORD(®->hccr) & HCCR_RISC_PAUSE) != 0) + break; + udelay(100); + } + } else { + udelay(10); + } + + /* Select FPM registers. */ + WRT_REG_WORD(®->ctrl_status, 0x20); + + /* FPM Soft Reset. */ + WRT_REG_WORD(®->fpm_diag_config, 0x100); + +#if defined(ISP2300) + /* Toggle Fpm Reset. */ + WRT_REG_WORD(®->fpm_diag_config, 0x0); +#endif + + /* Select frame buffer registers. */ + WRT_REG_WORD(®->ctrl_status, 0x10); + + /* Reset frame buffer FIFOs. */ +#if defined(ISP2200) + WRT_REG_WORD(®->fb_cmd, 0xa000); +#else + WRT_REG_WORD(®->fb_cmd, 0x00fc); + + /* Read back fb_cmd until zero or 3 seconds max */ + for (cnt = 0; cnt < 3000; cnt++) { + if ((RD_REG_WORD(®->fb_cmd) & 0xff) == 0) + break; + udelay(100); + } +#endif /* defined(ISP2200) */ + + /* Select RISC module registers. */ + WRT_REG_WORD(®->ctrl_status, 0); + + /* Reset RISC processor. */ + WRT_REG_WORD(®->hccr, HCCR_RESET_RISC); + + /* Release RISC processor. */ + WRT_REG_WORD(®->hccr, HCCR_RELEASE_RISC); + +#endif /* defined(ISP2200) || defined(ISP2300) */ + + WRT_REG_WORD(®->hccr, HCCR_CLR_RISC_INT); + WRT_REG_WORD(®->hccr, HCCR_CLR_HOST_INT); + + /* Reset ISP chip. */ + WRT_REG_WORD(®->ctrl_status, CSR_ISP_SOFT_RESET); + + /* Wait for RISC to recover from reset. */ + if (ha->pdev->device == QLA2312_DEVICE_ID || + ha->pdev->device == QLA2322_DEVICE_ID) { + udelay(10); + } else { + for (cnt = 30000; cnt; cnt--) { + if ((RD_REG_WORD(®->ctrl_status) & + CSR_ISP_SOFT_RESET) == 0) + break; + udelay(100); + } + } + + /* Reset RISC processor. */ + WRT_REG_WORD(®->hccr, HCCR_RESET_RISC); + + WRT_REG_WORD(®->semaphore, 0); + + /* Release RISC processor. */ + WRT_REG_WORD(®->hccr, HCCR_RELEASE_RISC); + + if (ha->pdev->device == QLA2312_DEVICE_ID || + ha->pdev->device == QLA2322_DEVICE_ID) { + udelay(100); + } else { + for (cnt = 0; cnt < 30000; cnt++) { + if (!(test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags))) + QLA_MBX_REG_LOCK(ha); + + if (RD_REG_WORD(®->mailbox0) != MBS_BUSY) { + if (!(test_bit(ABORT_ISP_ACTIVE, + &ha->dpc_flags))) + QLA_MBX_REG_UNLOCK(ha); + break; + } + + if (!(test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags))) + QLA_MBX_REG_UNLOCK(ha); + + udelay(100); + } + } + + /* Turn on master enable */ + cmd |= PCI_COMMAND_MASTER; + pci_write_config_word(ha->pdev, PCI_COMMAND, cmd); + +#if defined(ISP2200) || defined(ISP2300) + /* Disable RISC pause on FPM parity error. */ + WRT_REG_WORD(®->hccr, HCCR_DISABLE_PARITY_PAUSE); +#endif + + spin_unlock_irqrestore(&ha->hardware_lock, flags); +} + +/** + * qla2x00_chip_diag() - Test chip for proper operation. + * @ha: HA context + * + * Returns 0 on success. + */ +static int +qla2x00_chip_diag(scsi_qla_host_t *ha) +{ + int rval; + device_reg_t *reg = ha->iobase; + unsigned long flags = 0; + uint16_t data; + uint32_t cnt; + uint16_t mb[5]; + + /* Assume a failed state */ + rval = QLA_FUNCTION_FAILED; + + DEBUG3(printk("scsi(%ld): Testing device at %lx.\n", + ha->host_no, (u_long)®->flash_address)); + + spin_lock_irqsave(&ha->hardware_lock, flags); + + /* Reset ISP chip. */ + WRT_REG_WORD(®->ctrl_status, CSR_ISP_SOFT_RESET); + data = qla2x00_debounce_register(®->ctrl_status); + for (cnt = 6000000 ; cnt && (data & CSR_ISP_SOFT_RESET); cnt--) { + udelay(5); + data = RD_REG_WORD(®->ctrl_status); + barrier(); + } + + if (!cnt) + goto chip_diag_failed; + + DEBUG3(printk("scsi(%ld): Reset register cleared by chip reset\n", + ha->host_no)); + + /* Reset RISC processor. */ + WRT_REG_WORD(®->hccr, HCCR_RESET_RISC); + WRT_REG_WORD(®->hccr, HCCR_RELEASE_RISC); + +#if defined(ISP2300) + /* Workaround for QLA2312 PCI parity error */ + if (ha->pdev->device == QLA2312_DEVICE_ID || + ha->pdev->device == QLA2322_DEVICE_ID) { + udelay(10); + } else { + data = qla2x00_debounce_register(®->mailbox0); + for (cnt = 6000000; cnt && (data == MBS_BUSY); cnt--) { + udelay(5); + data = RD_REG_WORD(®->mailbox0); + barrier(); + } + } +#else + data = qla2x00_debounce_register(®->mailbox0); + for (cnt = 6000000; cnt && (data == MBS_BUSY); cnt--) { + udelay(5); + data = RD_REG_WORD(®->mailbox0); + barrier(); + } +#endif + if (!cnt) + goto chip_diag_failed; + + /* Check product ID of chip */ + DEBUG3(printk("scsi(%ld): Checking product ID of chip\n", ha->host_no)); + + mb[1] = RD_REG_WORD(®->mailbox1); + mb[2] = RD_REG_WORD(®->mailbox2); + mb[3] = RD_REG_WORD(®->mailbox3); + + if (mb[1] != PROD_ID_1 || (mb[2] != PROD_ID_2 && mb[2] != PROD_ID_2a) || + mb[3] != PROD_ID_3) { + qla_printk(KERN_WARNING, ha, + "Wrong product ID = 0x%x,0x%x,0x%x\n", mb[1], mb[2], mb[3]); + + goto chip_diag_failed; + } + + /* Adjust fw RISC transfer size */ + ha->fw_transfer_size = REQUEST_ENTRY_SIZE * REQUEST_ENTRY_CNT; +#if defined(ISP2200) + if (ha->pdev->device == QLA2200_DEVICE_ID && + RD_REG_WORD(®->mailbox7) == QLA2200A_RISC_ROM_VER) { + + /* Limit firmware transfer size with a 2200A */ + DEBUG3(printk("scsi(%ld): Found QLA2200A chip.\n", + ha->host_no)); + + ha->fw_transfer_size = 128; + } +#endif + + /* Wrap Incoming Mailboxes Test. */ + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + DEBUG3(printk("scsi(%ld): Checking mailboxes.\n", ha->host_no)); + rval = qla2x00_mbx_reg_test(ha); + if (rval) { + DEBUG(printk("scsi(%ld): Failed mailbox send register test\n", + ha->host_no)); + qla_printk(KERN_WARNING, ha, + "Failed mailbox send register test\n"); + } + else { + /* Flag a successful rval */ + rval = QLA_SUCCESS; + } + spin_lock_irqsave(&ha->hardware_lock, flags); + +chip_diag_failed: + if (rval) + DEBUG2_3(printk("scsi(%ld): Chip diagnostics **** FAILED " + "****\n", ha->host_no)); + + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + return (rval); +} + +/** + * qla2x00_setup_chip() - Load and start RISC firmware. + * @ha: HA context + * + * Returns 0 on success. + */ +static int +qla2x00_setup_chip(scsi_qla_host_t *ha) +{ + int rval; + uint16_t cnt; + uint16_t *risc_code; + unsigned long risc_address; + unsigned long risc_code_size; + int num; + int i; + uint16_t *req_ring; + struct qla_fw_info *fw_iter; + + rval = QLA_SUCCESS; + + /* Load firmware sequences */ + fw_iter = ha->brd_info->fwinfo; + while (fw_iter->addressing != FW_INFO_ADDR_NOMORE) { + risc_code = fw_iter->fwcode; + risc_code_size = *fw_iter->fwlen; + + if (fw_iter->addressing == FW_INFO_ADDR_NORMAL) { + risc_address = *fw_iter->fwstart; + } else { + /* Extended address */ + risc_address = *fw_iter->lfwstart; + } + + num = 0; + rval = 0; + while (risc_code_size > 0 && !rval) { + cnt = (uint16_t)(ha->fw_transfer_size >> 1); + if (cnt > risc_code_size) + cnt = risc_code_size; + + DEBUG7(printk("scsi(%ld): Loading risc segment@ " + "addr %p, number of bytes 0x%x, offset 0x%lx.\n", + ha->host_no, risc_code, cnt, risc_address)); + + req_ring = (uint16_t *)ha->request_ring; + for (i = 0; i < cnt; i++) + req_ring[i] = cpu_to_le16(risc_code[i]); + + /* + * Flush written firmware to the ha->request_ring buffer + * before DMA. + */ + flush_cache_all(); + + if (fw_iter->addressing == FW_INFO_ADDR_NORMAL) { + rval = qla2x00_load_ram(ha, + ha->request_dma, risc_address, cnt); + } else { + rval = qla2x00_load_ram_ext(ha, + ha->request_dma, risc_address, cnt); + } + if (rval) { + DEBUG(printk("scsi(%ld): [ERROR] Failed to " + "load segment %d of firmware\n", + ha->host_no, num)); + qla_printk(KERN_WARNING, ha, + "[ERROR] Failed to load " + "segment %d of firmware\n", num); + + qla2x00_dump_regs(ha); + break; + } + + risc_code += cnt; + risc_address += cnt; + risc_code_size -= cnt; + num++; + } + + /* Next firmware sequence */ + fw_iter++; + } + + /* Verify checksum of loaded RISC code. */ + if (!rval) { + DEBUG(printk("scsi(%ld): Verifying Checksum of loaded RISC " + "code.\n", ha->host_no)); + + rval = qla2x00_verify_checksum(ha); + if (rval == QLA_SUCCESS) { + /* Start firmware execution. */ + DEBUG(printk("scsi(%ld): Checksum OK, start " + "firmware.\n", ha->host_no)); + + rval = qla2x00_execute_fw(ha); + } + else { + DEBUG2(printk(KERN_INFO + "scsi(%ld): ISP Firmware failed checksum.\n", + ha->host_no)); + } + } + + if (rval) { + DEBUG2_3(printk("scsi(%ld): Setup chip **** FAILED ****.\n", + ha->host_no)); + } + + return (rval); +} + +/** + * qla2x00_init_response_q_entries() - Initializes response queue entries. + * @ha: HA context + * + * Beginning of request ring has initialization control block already built + * by nvram config routine. + * + * Returns 0 on success. + */ +static void +qla2x00_init_response_q_entries(scsi_qla_host_t *ha) +{ + uint16_t cnt; + response_t *pkt; + + pkt = ha->response_ring_ptr; + for (cnt = 0; cnt < RESPONSE_ENTRY_CNT; cnt++) { + pkt->signature = RESPONSE_PROCESSED; + pkt++; + } + +} + +/** + * qla2x00_init_rings() - Initializes firmware. + * @ha: HA context + * + * Beginning of request ring has initialization control block already built + * by nvram config routine. + * + * Returns 0 on success. + */ +static int +qla2x00_init_rings(scsi_qla_host_t *ha) +{ + int rval; + unsigned long flags = 0; + int cnt; + device_reg_t *reg = ha->iobase; + + spin_lock_irqsave(&ha->hardware_lock, flags); + + /* Clear outstanding commands array. */ + for (cnt = 0; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) + ha->outstanding_cmds[cnt] = 0; + + ha->current_outstanding_cmd = 0; + + /* Clear RSCN queue. */ + ha->rscn_in_ptr = 0; + ha->rscn_out_ptr = 0; + + /* Initialize firmware. */ + ha->request_ring_ptr = ha->request_ring; + ha->req_ring_index = 0; + ha->req_q_cnt = REQUEST_ENTRY_CNT; + ha->response_ring_ptr = ha->response_ring; + ha->rsp_ring_index = 0; + + /* Initialize response queue entries */ + qla2x00_init_response_q_entries(ha); + + WRT_REG_WORD(ISP_REQ_Q_IN(reg), 0); + WRT_REG_WORD(ISP_REQ_Q_OUT(reg), 0); + WRT_REG_WORD(ISP_RSP_Q_IN(reg), 0); + WRT_REG_WORD(ISP_RSP_Q_OUT(reg), 0); + + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + DEBUG(printk("scsi(%ld): Issue init firmware.\n", ha->host_no)); + rval = qla2x00_init_firmware(ha, sizeof(init_cb_t)); + if (rval) { + DEBUG2_3(printk("scsi(%ld): Init firmware **** FAILED ****.\n", + ha->host_no)); + } else { + /* Setup seriallink options */ + uint16_t swing, emphasis; + + DEBUG3(printk("scsi(%ld): Serial link options:\n", + ha->host_no)); + DEBUG3(qla2x00_dump_buffer( + (uint8_t *)&ha->fw_seriallink_options, + sizeof(ha->fw_seriallink_options))); + + memset(ha->fw_options, 0, sizeof(ha->fw_options)); + qla2x00_get_fw_options(ha, ha->fw_options); + + ha->fw_options[1] &= ~FO1_SET_EMPHASIS_SWING; + if (ha->fw_seriallink_options[1] & BIT_2) + ha->fw_options[1] |= FO1_SET_EMPHASIS_SWING; + + /* 1G settings */ + swing = ha->fw_seriallink_options[0] & (BIT_2 | BIT_1 | BIT_0); + emphasis = ha->fw_seriallink_options[0] & (BIT_4 | BIT_3); + emphasis >>= 3; + ha->fw_options[10] = (emphasis << 14) | (swing << 8) | 0x3; + + /* 2G settings */ + swing = ha->fw_seriallink_options[0] & (BIT_7 | BIT_6 | BIT_5); + swing >>= 5; + emphasis = ha->fw_seriallink_options[1] & (BIT_1 | BIT_0); + ha->fw_options[11] = (emphasis << 14) | (swing << 8) | 0x3; + + qla2x00_set_fw_options(ha, ha->fw_options); + + DEBUG3(printk("scsi(%ld): Init firmware -- success.\n", + ha->host_no)); + } + + return (rval); +} + +/** + * qla2x00_fw_ready() - Waits for firmware ready. + * @ha: HA context + * + * Returns 0 on success. + */ +static int +qla2x00_fw_ready(scsi_qla_host_t *ha) +{ + int rval; + unsigned long wtime, mtime; + uint16_t min_wait; /* Minimum wait time if loop is down */ + uint16_t wait_time; /* Wait time if loop is coming ready */ + uint16_t fw_state; + + rval = QLA_SUCCESS; + + /* 20 seconds for loop down. */ + min_wait = 20; + + /* + * Firmware should take at most one RATOV to login, plus 5 seconds for + * our own processing. + */ + if ((wait_time = (ha->retry_count*ha->login_timeout) + 5) < min_wait) { + wait_time = min_wait; + } + + /* Min wait time if loop down */ + mtime = jiffies + (min_wait * HZ); + + /* wait time before firmware ready */ + wtime = jiffies + (wait_time * HZ); + + /* Wait for ISP to finish LIP */ + if (!ha->init_done || qla2x00_verbose) + qla_printk(KERN_INFO, ha, "Waiting for LIP to complete...\n"); + + DEBUG3(printk("scsi(%ld): Waiting for LIP to complete...\n", + ha->host_no)); + + do { + rval = qla2x00_get_firmware_state(ha, &fw_state); + if (rval == QLA_SUCCESS) { + if (fw_state < FSTATE_LOSS_OF_SYNC) { + ha->device_flags &= ~DFLG_NO_CABLE; + } + if (fw_state == FSTATE_READY) { + DEBUG(printk("scsi(%ld): F/W Ready - OK \n", + ha->host_no)); + + qla2x00_get_retry_cnt(ha, &ha->retry_count, + &ha->login_timeout, &ha->r_a_tov); + + rval = QLA_SUCCESS; + break; + } + + rval = QLA_FUNCTION_FAILED; + + if (atomic_read(&ha->loop_down_timer) && + fw_state >= FSTATE_LOSS_OF_SYNC) { + /* Loop down. Timeout on min_wait for states + * other than Wait for Login. + */ + if (time_after_eq(jiffies, mtime)) { + qla_printk(KERN_INFO, ha, + "Cable is unplugged...\n"); + + ha->device_flags |= DFLG_NO_CABLE; + break; + } + } + } else { + /* Mailbox cmd failed. Timeout on min_wait. */ + if (time_after_eq(jiffies, mtime)) + break; + } + + if (time_after_eq(jiffies, wtime)) + break; + + /* Delay for a while */ + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ / 2); + + DEBUG3(printk("scsi(%ld): fw_state=%x curr time=%lx.\n", + ha->host_no, fw_state, jiffies)); + } while (1); + + DEBUG(printk("scsi(%ld): fw_state=%x curr time=%lx.\n", + ha->host_no, fw_state, jiffies)); + + if (rval) { + DEBUG2_3(printk("scsi(%ld): Firmware ready **** FAILED ****.\n", + ha->host_no)); + } + + return (rval); +} + +/* +* qla2x00_configure_hba +* Setup adapter context. +* +* Input: +* ha = adapter state pointer. +* +* Returns: +* 0 = success +* +* Context: +* Kernel context. +*/ +static int +qla2x00_configure_hba(scsi_qla_host_t *ha) +{ + int rval; + uint16_t loop_id; + uint16_t topo; + uint8_t al_pa; + uint8_t area; + uint8_t domain; + char connect_type[22]; + + /* Get host addresses. */ + rval = qla2x00_get_adapter_id(ha, + &loop_id, &al_pa, &area, &domain, &topo); + if (rval != QLA_SUCCESS) { + qla_printk(KERN_WARNING, ha, + "ERROR -- Unable to get host loop ID.\n"); + return (rval); + } + + if (topo == 4) { + qla_printk(KERN_INFO, ha, + "Cannot get topology - retrying.\n"); + return (QLA_FUNCTION_FAILED); + } + + ha->loop_id = loop_id; + +#if defined(ISP2100) + /* Make sure 2100 only has loop, in case of any firmware bug. */ + topo = 0; +#endif + + /* initialize */ + ha->min_external_loopid = SNS_FIRST_LOOP_ID; + ha->operating_mode = LOOP; + + switch (topo) { + case 0: + DEBUG3(printk("scsi(%ld): HBA in NL topology.\n", + ha->host_no)); + ha->current_topology = ISP_CFG_NL; + strcpy(connect_type, "(Loop)"); + break; + + case 1: + DEBUG3(printk("scsi(%ld): HBA in FL topology.\n", + ha->host_no)); + ha->current_topology = ISP_CFG_FL; + strcpy(connect_type, "(FL_Port)"); + break; + + case 2: + DEBUG3(printk("scsi(%ld): HBA in N P2P topology.\n", + ha->host_no)); + ha->operating_mode = P2P; + ha->current_topology = ISP_CFG_N; + strcpy(connect_type, "(N_Port-to-N_Port)"); + break; + + case 3: + DEBUG3(printk("scsi(%ld): HBA in F P2P topology.\n", + ha->host_no)); + ha->operating_mode = P2P; + ha->current_topology = ISP_CFG_F; + strcpy(connect_type, "(F_Port)"); + break; + + default: + DEBUG3(printk("scsi(%ld): HBA in unknown topology %x. " + "Using NL.\n", + ha->host_no, topo)); + ha->current_topology = ISP_CFG_NL; + strcpy(connect_type, "(Loop)"); + break; + } + + /* Save Host port and loop ID. */ + /* byte order - Big Endian */ + ha->d_id.b.domain = domain; + ha->d_id.b.area = area; + ha->d_id.b.al_pa = al_pa; + + if (!ha->init_done || qla2x00_verbose) + qla_printk(KERN_INFO, ha, + "Topology - %s, Host Loop address 0x%x\n", + connect_type, ha->loop_id); + + if (rval) { + DEBUG2_3(printk("scsi(%ld): FAILED.\n", ha->host_no)); + } else { + DEBUG3(printk("scsi(%ld): exiting normally.\n", ha->host_no)); + } + + return(rval); +} + +/* +* NVRAM configuration for ISP 2xxx +* +* Input: +* ha = adapter block pointer. +* +* Output: +* initialization control block in response_ring +* host adapters parameters in host adapter block +* +* Returns: +* 0 = success. +*/ +static int +qla2x00_nvram_config(scsi_qla_host_t *ha) +{ + int rval; + uint8_t chksum = 0; + uint16_t cnt; + uint8_t *dptr1, *dptr2; + init_cb_t *icb = ha->init_cb; + nvram_t *nv = (nvram_t *)ha->request_ring; + uint16_t *wptr = (uint16_t *)ha->request_ring; +#if defined(ISP2300) + device_reg_t *reg = ha->iobase; + uint16_t data; + uint16_t timer_mode; +#endif + + rval = QLA_SUCCESS; + + if (ha->init_done) + return (rval); + + /* Determine NVRAM starting address. */ + ha->nvram_base = 0; +#if defined(ISP2300) + if (ha->pdev->device == QLA2312_DEVICE_ID || + ha->pdev->device == QLA2322_DEVICE_ID) { + data = RD_REG_WORD(®->ctrl_status); + if ((data >> 14) == 1) + ha->nvram_base = 0x80; + + data = RD_REG_WORD(®->nvram); + while (data & NVR_BUSY) { + udelay(100); + data = RD_REG_WORD(®->nvram); + } + + /* Lock resource */ + WRT_REG_WORD(®->host_semaphore, 0x1); + udelay(5); + data = RD_REG_WORD(®->host_semaphore); + while ((data & BIT_0) == 0) { + /* Lock failed */ + udelay(100); + WRT_REG_WORD(®->host_semaphore, 0x1); + udelay(5); + data = RD_REG_WORD(®->host_semaphore); + } + } +#endif + + /* Get NVRAM data and calculate checksum. */ + for (cnt = 0; cnt < sizeof(nvram_t)/2; cnt++) { + *wptr = cpu_to_le16(qla2x00_get_nvram_word(ha, + (cnt+ha->nvram_base))); + chksum += (uint8_t)*wptr; + chksum += (uint8_t)(*wptr >> 8); + wptr++; + } + +#if defined(ISP2300) + if (ha->pdev->device == QLA2312_DEVICE_ID || + ha->pdev->device == QLA2322_DEVICE_ID) { + /* Unlock resource */ + WRT_REG_WORD(®->host_semaphore, 0); + } +#endif + + DEBUG5(printk("scsi(%ld): Contents of NVRAM\n", ha->host_no)); + DEBUG5(qla2x00_dump_buffer((uint8_t *)ha->request_ring, + sizeof(nvram_t))); + + /* Bad NVRAM data, set defaults parameters. */ + if (chksum || nv->id[0] != 'I' || nv->id[1] != 'S' || + nv->id[2] != 'P' || nv->id[3] != ' ' || nv->nvram_version < 1) { + + /* Reset NVRAM data. */ + DEBUG(printk("scsi(%ld): Using defaults for NVRAM - " + "checksum=0x%x, Id=%c, version=0x%x\n", + ha->host_no, chksum, nv->id[0], nv->nvram_version)); + + memset(nv, 0, sizeof(nvram_t)); + + /* + * Set default initialization control block. + */ + nv->parameter_block_version = ICB_VERSION; + +#if defined(ISP2300) + nv->firmware_options[0] = BIT_2 | BIT_1; + nv->firmware_options[1] = BIT_7 | BIT_5; + nv->add_firmware_options[0] = BIT_5; + nv->add_firmware_options[1] = BIT_5 | BIT_4; + nv->frame_payload_size = __constant_cpu_to_le16(2048); +#elif defined(ISP2200) + nv->firmware_options[0] = BIT_2 | BIT_1; + nv->firmware_options[1] = BIT_7 | BIT_5; + nv->add_firmware_options[0] = BIT_5 | BIT_4; + nv->add_firmware_options[1] = BIT_5 | BIT_4; + nv->frame_payload_size = __constant_cpu_to_le16(1024); +#else /* defined(ISP2100) */ + nv->firmware_options[0] = BIT_3 | BIT_1; + nv->firmware_options[1] = BIT_5; + nv->frame_payload_size = __constant_cpu_to_le16(1024); +#endif + + nv->max_iocb_allocation = __constant_cpu_to_le16(256); + nv->execution_throttle = __constant_cpu_to_le16(16); + nv->retry_count = 8; + nv->retry_delay = 1; + + nv->port_name[0] = 33; + nv->port_name[3] = 224; + nv->port_name[4] = 139; + + nv->login_timeout = 4; + + /* + * Set default host adapter parameters + */ + nv->host_p[1] = BIT_2; + nv->reset_delay = 5; + nv->port_down_retry_count = 8; + nv->max_luns_per_target = __constant_cpu_to_le16(8); + nv->link_down_timeout = 60; + + rval = 1; + } + + /* Reset Initialization control block */ + memset(icb, 0, sizeof(init_cb_t)); + + /* + * Setup driver NVRAM options. + */ + nv->firmware_options[0] |= (BIT_6 | BIT_1); + nv->firmware_options[0] &= ~(BIT_5 | BIT_4); + nv->firmware_options[1] |= (BIT_5 | BIT_0); + nv->firmware_options[1] &= ~BIT_4; +#if defined(ISP2300) + nv->firmware_options[0] |= BIT_2; + nv->firmware_options[0] &= ~BIT_3; + + if (ha->pdev->device == QLA2300_DEVICE_ID) { + if (ha->fb_rev == FPM_2310) { + strcpy(ha->model_number, "QLA2310"); + } else { + strcpy(ha->model_number, "QLA2300"); + } + } else if (ha->pdev->device == QLA2312_DEVICE_ID || + ha->pdev->device == QLA2322_DEVICE_ID) { + if (rval == 0 && + memcmp(nv->model_number, BINZERO, + sizeof(nv->model_number)) != 0) { + char *st, *en; + + strncpy(ha->model_number, nv->model_number, + sizeof(nv->model_number)); + st = en = ha->model_number; + en += sizeof(nv->model_number) - 1; + while (en > st) { + if (*en != 0x20) + break; + *en-- = '\0'; + } + } else { + uint16_t index; + + index = (ha->pdev->subsystem_device & 0xff); + if (index < QLA_MODEL_NAMES) { + strcpy(ha->model_number, + qla2x00_model_name[index]); + } else { + strcpy(ha->model_number, "QLA23xx"); + } + } + } else { + strcpy(ha->model_number, "QLA23xx"); + } + +#elif defined(ISP2200) + nv->firmware_options[0] |= BIT_2; + strcpy(ha->model_number, "QLA22xx"); +#else /* defined(ISP2100) */ + strcpy(ha->model_number, "QLA2100"); +#endif + + /* + * Copy over NVRAM RISC parameter block to initialization control block. + */ + dptr1 = (uint8_t *)icb; + dptr2 = (uint8_t *)&nv->parameter_block_version; + cnt = (uint8_t *)&icb->request_q_outpointer - (uint8_t *)&icb->version; + while (cnt--) + *dptr1++ = *dptr2++; + + /* Copy 2nd half. */ + dptr1 = (uint8_t *)icb->add_firmware_options; + cnt = (uint8_t *)icb->reserved_3 - (uint8_t *)icb->add_firmware_options; + while (cnt--) + *dptr1++ = *dptr2++; + + /* Prepare nodename */ + if ((icb->firmware_options[1] & BIT_6) == 0) { + /* + * Firmware will apply the following mask if the nodename was + * not provided. + */ + memcpy(icb->node_name, icb->port_name, WWN_SIZE); + icb->node_name[0] &= 0xF0; + } + + /* + * Set host adapter parameters. + */ + ha->nvram_version = nv->nvram_version; + + ha->flags.disable_luns = ((nv->host_p[0] & BIT_2) ? 1 : 0); + ha->flags.disable_risc_code_load = ((nv->host_p[0] & BIT_4) ? 1 : 0); + ha->flags.set_cache_line_size_1 = ((nv->host_p[0] & BIT_5) ? 1 : 0); + ha->flags.enable_64bit_addressing = ((nv->host_p[1] & BIT_0) ? 1 : 0); + ha->flags.enable_lip_reset = ((nv->host_p[1] & BIT_1) ? 1 : 0); + ha->flags.enable_lip_full_login = ((nv->host_p[1] & BIT_2) ? 1 : 0); + ha->flags.enable_target_reset = ((nv->host_p[1] & BIT_3) ? 1 : 0); + ha->flags.enable_flash_db_update = ((nv->host_p[1] & BIT_4) ? 1 : 0); + + ha->operating_mode = + (icb->add_firmware_options[0] & (BIT_6 | BIT_5 | BIT_4)) >> 4; + + qla2x00_config_dma_addressing(ha); + + ha->fw_seriallink_options[0] = nv->seriallink_options[0]; + ha->fw_seriallink_options[1] = nv->seriallink_options[1]; + + /* save HBA serial number */ + ha->serial0 = icb->port_name[5]; + ha->serial1 = icb->port_name[6]; + ha->serial2 = icb->port_name[7]; + memcpy(ha->node_name, icb->node_name, WWN_SIZE); + + icb->execution_throttle = __constant_cpu_to_le16(0xFFFF); + + ha->retry_count = nv->retry_count; + + /* Set minimum login_timeout to 4 seconds. */ + if (nv->login_timeout < ql2xlogintimeout) + nv->login_timeout = ql2xlogintimeout; + if (nv->login_timeout < 4) + nv->login_timeout = 4; + ha->login_timeout = nv->login_timeout; + icb->login_timeout = nv->login_timeout; + + /* Set minimum RATOV to 200 tenths of a second. */ + ha->r_a_tov = 200; + +/* FIXME + * + * port_down_retry_count updated twice + * + */ + ha->port_down_retry_count = nv->port_down_retry_count; + ha->minimum_timeout = + (ha->login_timeout * ha->retry_count) + ha->port_down_retry_count; + ha->loop_reset_delay = nv->reset_delay; + + /* Will get the value from NVRAM. */ + ha->loop_down_timeout = LOOP_DOWN_TIMEOUT; + + /* Link Down Timeout = 0: + * + * When Port Down timer expires we will start returning + * I/O's to OS with "DID_NO_CONNECT". + * + * Link Down Timeout != 0: + * + * The driver waits for the link to come up after link down + * before returning I/Os to OS with "DID_NO_CONNECT". + */ + if (nv->link_down_timeout == 0) { + ha->loop_down_abort_time = + (LOOP_DOWN_TIME - ha->loop_down_timeout); + } else { + ha->link_down_timeout = nv->link_down_timeout; + ha->loop_down_abort_time = + (LOOP_DOWN_TIME - ha->link_down_timeout); + } + + /* save OEM related items for QLA2200s and QLA2300s */ + memcpy(ha->oem_specific, nv->oem_specific, sizeof(ha->oem_specific)); + + ha->max_probe_luns = le16_to_cpu(nv->max_luns_per_target); + if (ha->max_probe_luns == 0) + ha->max_probe_luns = MIN_LUNS; + +#if USE_BIOS_MAX_LUNS + ha->max_luns = le16_to_cpu(nv->max_luns_per_target); + if (ha->max_luns == 0) + ha->max_luns = MAX_LUNS; + else if (ha->max_luns > MAX_LUNS) + ha->max_luns = MAX_LUNS; +#else + ha->max_luns = MAX_LUNS; +#endif + +/* FIXME + * + * port_down_retry_count updated twice + * + */ + /* + * Need enough time to try and get the port back. + */ + if (qlport_down_retry) + ha->port_down_retry_count = qlport_down_retry; + /* Set login_retry_count */ + ha->login_retry_count = nv->retry_count; + if (ha->port_down_retry_count == nv->port_down_retry_count && + ha->port_down_retry_count > 3) + ha->login_retry_count = ha->port_down_retry_count; + else if (ha->port_down_retry_count > (int)ha->login_retry_count) + ha->login_retry_count = ha->port_down_retry_count; + + ha->binding_type = Bind; + if ((ha->binding_type != BIND_BY_PORT_NAME) && + (ha->binding_type != BIND_BY_PORT_ID) && + (ha->binding_type != BIND_BY_NODE_NAME)) { + + qla_printk(KERN_WARNING, ha, + "Invalid binding type specified (%d), " + "defaulting to BIND_BY_PORT_NAME!!!\n", ha->binding_type); + + ha->binding_type = BIND_BY_PORT_NAME; + } + + /* + * Setup ring parameters in initialization control block + */ + icb->request_q_outpointer = __constant_cpu_to_le16(0); + icb->response_q_inpointer = __constant_cpu_to_le16(0); + icb->request_q_length = __constant_cpu_to_le16(REQUEST_ENTRY_CNT); + icb->response_q_length = __constant_cpu_to_le16(RESPONSE_ENTRY_CNT); + icb->request_q_address[0] = cpu_to_le32(LSD(ha->request_dma)); + icb->request_q_address[1] = cpu_to_le32(MSD(ha->request_dma)); + icb->response_q_address[0] = cpu_to_le32(LSD(ha->response_dma)); + icb->response_q_address[1] = cpu_to_le32(MSD(ha->response_dma)); + + icb->lun_enables = __constant_cpu_to_le16(0); + icb->command_resource_count = 0; + icb->immediate_notify_resource_count = 0; + icb->timeout = __constant_cpu_to_le16(0); + +#if defined(ISP2100) || defined(ISP2200) + /* Enable RIO */ + icb->firmware_options[0] &= ~BIT_3; + icb->add_firmware_options[0] &= ~(BIT_3 | BIT_2 | BIT_1 | BIT_0); + icb->add_firmware_options[0] |= (BIT_1 | BIT_0); + icb->response_accumulation_timer = 3; + icb->interrupt_delay_timer = 5; + + ha->flags.process_response_queue = 1; +#elif defined(ISP2300) + /* TEST ZIO: + * + * icb->add_firmware_options[0] &= ~(BIT_3 | BIT_2 | BIT_1 | BIT_0); + * icb->add_firmware_options[0] |= (BIT_2 | BIT_0); + */ + timer_mode = icb->add_firmware_options[0] & + (BIT_3 | BIT_2 | BIT_1 | BIT_0); + if (timer_mode == 5) { + DEBUG2(printk("scsi(%ld): ZIO enabled; timer delay (%d).\n", + ha->host_no, ql2xintrdelaytimer)); + qla_printk(KERN_INFO, ha, + "ZIO enabled; timer delay (%d).\n", ql2xintrdelaytimer); + + icb->interrupt_delay_timer = ql2xintrdelaytimer; + + ha->flags.process_response_queue = 1; + } +#endif + + if (rval) { + DEBUG2_3(printk(KERN_WARNING + "scsi(%ld): NVRAM configuration failed!\n", ha->host_no)); + } + + LEAVE(__func__); + + return (rval); +} + +/* +* qla2x00_init_tgt_map +* Initializes target map. +* +* Input: +* ha = adapter block pointer. +* +* Output: +* TGT_Q initialized +*/ +static void +qla2x00_init_tgt_map(scsi_qla_host_t *ha) +{ + uint32_t t; + + ENTER(__func__); + + for (t = 0; t < MAX_TARGETS; t++) + TGT_Q(ha, t) = (os_tgt_t *)NULL; + + LEAVE(__func__); +} + +/** + * qla2x00_alloc_fcport() - Allocate a generic fcport. + * @ha: HA context + * @flags: allocation flags + * + * Returns a pointer to the allocated fcport, or NULL, if none available. + */ +fc_port_t * +qla2x00_alloc_fcport(scsi_qla_host_t *ha, int flags) +{ + fc_port_t *fcport; + + fcport = kmalloc(sizeof(fc_port_t), flags); + if (fcport == NULL) + return (fcport); + + /* Setup fcport template structure. */ + memset(fcport, 0, sizeof (fc_port_t)); + fcport->ha = ha; + fcport->port_type = FCT_UNKNOWN; + fcport->loop_id = FC_NO_LOOP_ID; + fcport->iodesc_idx_sent = IODESC_INVALID_INDEX; + atomic_set(&fcport->state, FCS_UNCONFIGURED); + fcport->flags = FCF_RLC_SUPPORT; + INIT_LIST_HEAD(&fcport->fcluns); + + return (fcport); +} + +/* + * qla2x00_configure_loop + * Updates Fibre Channel Device Database with what is actually on loop. + * + * Input: + * ha = adapter block pointer. + * + * Returns: + * 0 = success. + * 1 = error. + * 2 = database was full and device was not configured. + */ +static int +qla2x00_configure_loop(scsi_qla_host_t *ha) +{ + int rval; + uint8_t rval1 = 0; + static unsigned long flags, save_flags; + + rval = QLA_SUCCESS; + + /* Get Initiator ID */ + if (qla2x00_configure_hba(ha)) { + DEBUG(printk("scsi(%ld): Unable to configure HBA.\n", + ha->host_no)); + return (QLA_FUNCTION_FAILED); + } + + save_flags = flags = ha->dpc_flags; + DEBUG(printk("scsi(%ld): Configure loop -- dpc flags =0x%lx\n", + ha->host_no, flags)); + + /* dg 02/26/02 ha->dpc_flags &= ~(LOCAL_LOOP_UPDATE | RSCN_UPDATE); */ + + /* + * If we have both an RSCN and PORT UPDATE pending then handle them + * both at the same time. + */ + clear_bit(LOCAL_LOOP_UPDATE, &ha->dpc_flags); + clear_bit(RSCN_UPDATE, &ha->dpc_flags); + ha->mem_err = 0 ; + + /* Determine what we need to do */ + if (ha->current_topology == ISP_CFG_FL && + (test_bit(LOCAL_LOOP_UPDATE, &flags))) { + + ha->flags.rscn_queue_overflow = TRUE; + set_bit(RSCN_UPDATE, &flags); + + } else if (ha->current_topology == ISP_CFG_F && + (test_bit(LOCAL_LOOP_UPDATE, &flags))) { + + ha->flags.rscn_queue_overflow = TRUE; + set_bit(RSCN_UPDATE, &flags); + clear_bit(LOCAL_LOOP_UPDATE, &flags); + + } else if (!ha->flags.online || + (test_bit(ABORT_ISP_ACTIVE, &flags))) { + + ha->flags.rscn_queue_overflow = TRUE; + set_bit(RSCN_UPDATE, &flags); + set_bit(LOCAL_LOOP_UPDATE, &flags); + } + + do { + if (test_bit(LOCAL_LOOP_UPDATE, &flags)) { + rval = rval | qla2x00_configure_local_loop(ha); + } + + if (test_bit(RSCN_UPDATE, &flags)) { + rval1 = qla2x00_configure_fabric(ha); + if ((rval1 & BIT_0) && ha->sns_retry_cnt < 8) { + ha->sns_retry_cnt++; + set_bit(LOGIN_RETRY_NEEDED, &ha->dpc_flags); + } + } + + /* Isolate error status. */ + if (rval & BIT_0) { + rval = 1; + } else { + rval = QLA_SUCCESS; + } + + } while (rval != QLA_SUCCESS); + + if (!atomic_read(&ha->loop_down_timer) && + !(test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags))) { + + if (!ha->flags.failover_enabled) + qla2x00_config_os(ha); + + /* If we found all devices then go ready */ + if (!(test_bit(LOGIN_RETRY_NEEDED, &ha->dpc_flags))) { + ha->loop_state = LOOP_READY; + + if (ha->flags.failover_enabled) { + DEBUG(printk("scsi(%ld): schedule FAILBACK " + "EVENT\n", ha->host_no)); + if (!(test_and_set_bit(FAILOVER_EVENT_NEEDED, + &ha->dpc_flags))) { + ha->failback_delay = failbackTime; + } + ha->failover_type = MP_NOTIFY_LOOP_UP; + } + + DEBUG(printk("scsi(%ld): LOOP READY\n", ha->host_no)); + } else { + if (test_bit(LOCAL_LOOP_UPDATE, &save_flags)) + set_bit(LOCAL_LOOP_UPDATE, &ha->dpc_flags); + if (test_bit(RSCN_UPDATE, &save_flags)) + set_bit(RSCN_UPDATE, &ha->dpc_flags); + } + } else { + DEBUG(printk("scsi(%ld): Loop down counter running= %d or " + "Resync needed- dpc flags= %ld\n", + ha->host_no, + atomic_read(&ha->loop_down_timer), ha->dpc_flags)); + /* ???? dg 02/26/02 rval = 1; */ + } + + if (rval) { + DEBUG2_3(printk("%s(%ld): *** FAILED ***\n", + __func__, ha->host_no)); + } else { + DEBUG3(printk("%s: exiting normally\n", __func__)); + } + + return (rval); +} + +/* + * qla2x00_configure_local_loop + * Updates Fibre Channel Device Database with local loop devices. + * + * Input: + * ha = adapter block pointer. + * + * Returns: + * 0 = success. + * BIT_0 = error. + */ +static int +qla2x00_configure_local_loop(scsi_qla_host_t *ha) +{ + int rval, rval2; + uint16_t localdevices; + + uint16_t index; + uint16_t entries; + uint16_t loop_id; + struct dev_id { + uint8_t al_pa; + uint8_t area; + uint8_t domain; +#if defined(EXTENDED_IDS) + uint8_t reserved; + uint16_t loop_id; +#else + uint8_t loop_id; +#endif + } *id_list; +#define MAX_ID_LIST_SIZE (sizeof(struct dev_id) * MAX_FIBRE_DEVICES) + dma_addr_t id_list_dma; + + int found; + fc_port_t *fcport, *new_fcport; + + rval = QLA_SUCCESS; + localdevices = 0; + new_fcport = NULL; + + /* + * No point in continuing if the loop is in a volatile state -- + * reschedule LOCAL_LOOP_UPDATE for later processing + */ + if (test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)) { + set_bit(LOCAL_LOOP_UPDATE, &ha->dpc_flags); + return (rval); + } + + entries = MAX_FIBRE_DEVICES; + id_list = pci_alloc_consistent(ha->pdev, MAX_ID_LIST_SIZE, + &id_list_dma); + if (id_list == NULL) { + DEBUG2(printk("scsi(%ld): Failed to allocate memory, No local " + "loop\n", ha->host_no)); + + qla_printk(KERN_WARNING, ha, + "Memory Allocation failed - port_list"); + + ha->mem_err++; + return (BIT_0); + } + memset(id_list, 0, MAX_ID_LIST_SIZE); + + DEBUG3(printk("scsi(%ld): Getting FCAL position map\n", ha->host_no)); + DEBUG3(qla2x00_get_fcal_position_map(ha, NULL)); + + /* Get list of logged in devices. */ + rval = qla2x00_get_id_list(ha, id_list, id_list_dma, &entries); + if (rval) { + rval = BIT_0; + goto cleanup_allocation; + } + + DEBUG3(printk("scsi(%ld): Entries in ID list (%d)\n", + ha->host_no, entries)); + DEBUG3(qla2x00_dump_buffer((uint8_t *)id_list, + entries * sizeof(struct dev_id))); + + /* Allocate temporary fcport for any new fcports discovered. */ + new_fcport = qla2x00_alloc_fcport(ha, GFP_KERNEL); + if (new_fcport == NULL) { + rval = BIT_0; + goto cleanup_allocation; + } + new_fcport->flags &= ~FCF_FABRIC_DEVICE; + + /* + * Mark local devices that were present with FCF_DEVICE_LOST for now. + */ + list_for_each_entry(fcport, &ha->fcports, list) { + if (atomic_read(&fcport->state) == FCS_ONLINE && + fcport->port_type != FCT_BROADCAST && + (fcport->flags & FCF_FABRIC_DEVICE) == 0) { + + DEBUG(printk("scsi(%ld): Marking port lost, " + "loop_id=0x%04x\n", + ha->host_no, fcport->loop_id)); + + atomic_set(&fcport->state, FCS_DEVICE_LOST); + fcport->flags &= ~FCF_FARP_DONE; + } + } + + /* Add devices to port list. */ + for (index = 0; index < entries; index++) { + /* Bypass reserved domain fields. */ + if ((id_list[index].domain & 0xf0) == 0xf0) + continue; + + /* Bypass if not same domain and area of adapter. */ + if (id_list[index].area != ha->d_id.b.area || + id_list[index].domain != ha->d_id.b.domain) + continue; + + /* Bypass invalid local loop ID. */ +#if defined(EXTENDED_IDS) + loop_id = le16_to_cpu(id_list[index].loop_id); +#else + loop_id = (uint16_t)id_list[index].loop_id; +#endif + if (loop_id > LAST_LOCAL_LOOP_ID) + continue; + + /* Fill in member data. */ + new_fcport->d_id.b.domain = id_list[index].domain; + new_fcport->d_id.b.area = id_list[index].area; + new_fcport->d_id.b.al_pa = id_list[index].al_pa; + new_fcport->loop_id = loop_id; + rval2 = qla2x00_get_port_database(ha, new_fcport, 0); + if (rval2 != QLA_SUCCESS) { + DEBUG2(printk("scsi(%ld): Failed to retrieve fcport " + "information -- get_port_database=%x, " + "loop_id=0x%04x\n", + ha->host_no, rval2, new_fcport->loop_id)); + continue; + } + + /* Check for matching device in port list. */ + found = 0; + fcport = NULL; + list_for_each_entry(fcport, &ha->fcports, list) { + if (memcmp(new_fcport->port_name, fcport->port_name, + WWN_SIZE)) + continue; + + fcport->flags &= ~(FCF_FABRIC_DEVICE | + FCF_PERSISTENT_BOUND); + fcport->loop_id = new_fcport->loop_id; + fcport->port_type = new_fcport->port_type; + fcport->d_id.b24 = new_fcport->d_id.b24; + memcpy(fcport->node_name, new_fcport->node_name, + WWN_SIZE); + + found++; + break; + } + + if (!found) { + /* New device, add to fcports list. */ + new_fcport->flags &= ~FCF_PERSISTENT_BOUND; + list_add_tail(&new_fcport->list, &ha->fcports); + + /* Allocate a new replacement fcport. */ + fcport = new_fcport; + new_fcport = qla2x00_alloc_fcport(ha, GFP_KERNEL); + if (new_fcport == NULL) { + rval = BIT_0; + goto cleanup_allocation; + } + new_fcport->flags &= ~FCF_FABRIC_DEVICE; + } + + qla2x00_update_fcport(ha, fcport); + + localdevices++; + } + +cleanup_allocation: + pci_free_consistent(ha->pdev, MAX_ID_LIST_SIZE, id_list, id_list_dma); + + if (new_fcport) + kfree(new_fcport); + + if (rval & BIT_0) { + DEBUG2(printk("scsi(%ld): Configure local loop error exit: " + "rval=%x\n", ha->host_no, rval)); + } + + if (localdevices > 0) { + ha->device_flags |= DFLG_LOCAL_DEVICES; + ha->device_flags &= ~DFLG_RETRY_LOCAL_DEVICES; + } + + return (rval); +} + +/* + * qla2x00_update_fcport + * Updates device on list. + * + * Input: + * ha = adapter block pointer. + * fcport = port structure pointer. + * + * Return: + * 0 - Success + * BIT_0 - error + * + * Context: + * Kernel context. + */ +static void +qla2x00_update_fcport(scsi_qla_host_t *ha, fc_port_t *fcport) +{ + uint16_t index; + unsigned long flags; + srb_t *sp; + + fcport->ha = ha; + fcport->login_retry = 0; + fcport->port_login_retry_count = ha->port_down_retry_count * + PORT_RETRY_TIME; + atomic_set(&fcport->port_down_timer, ha->port_down_retry_count * + PORT_RETRY_TIME); + fcport->flags &= ~(FCF_FAILOVER_NEEDED | FCF_LOGIN_NEEDED); + + /* + * Check for outstanding cmd on tape Bypass LUN discovery if active + * command on tape. + */ + if (fcport->flags & FCF_TAPE_PRESENT) { + spin_lock_irqsave(&ha->hardware_lock, flags); + for (index = 1; index < MAX_OUTSTANDING_COMMANDS; index++) { + if ((sp = ha->outstanding_cmds[index]) != 0) { + if (sp->fclun->fcport == fcport) { + atomic_set(&fcport->state, FCS_ONLINE); + spin_unlock_irqrestore( + &ha->hardware_lock, flags); + return; + } + } + } + spin_unlock_irqrestore(&ha->hardware_lock, flags); + } + + /* Do LUN discovery. */ + if (fcport->port_type == FCT_INITIATOR || + fcport->port_type == FCT_BROADCAST) { + fcport->device_type = TYPE_PROCESSOR; + } else { + qla2x00_lun_discovery(ha, fcport); + } + atomic_set(&fcport->state, FCS_ONLINE); +} + +/* + * qla2x00_lun_discovery + * Issue SCSI inquiry command for LUN discovery. + * + * Input: + * ha: adapter state pointer. + * fcport: FC port structure pointer. + * + * Context: + * Kernel context. + */ +static void +qla2x00_lun_discovery(scsi_qla_host_t *ha, fc_port_t *fcport) +{ + inq_cmd_rsp_t *inq; + dma_addr_t inq_dma; + uint16_t lun; + + inq = pci_alloc_consistent(ha->pdev, sizeof(inq_cmd_rsp_t), &inq_dma); + if (inq == NULL) { + qla_printk(KERN_WARNING, ha, + "Memory Allocation failed - INQ\n"); + return; + } + + /* If report LUN works, exit. */ + if (qla2x00_rpt_lun_discovery(ha, fcport, inq, inq_dma) != + QLA_SUCCESS) { + for (lun = 0; lun < ha->max_probe_luns; lun++) { + /* Configure LUN. */ + qla2x00_cfg_lun(ha, fcport, lun, inq, inq_dma); + } + } + + pci_free_consistent(ha->pdev, sizeof(inq_cmd_rsp_t), inq, inq_dma); +} + +/* + * qla2x00_rpt_lun_discovery + * Issue SCSI report LUN command for LUN discovery. + * + * Input: + * ha: adapter state pointer. + * fcport: FC port structure pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +static int +qla2x00_rpt_lun_discovery(scsi_qla_host_t *ha, fc_port_t *fcport, + inq_cmd_rsp_t *inq, dma_addr_t inq_dma) +{ + int rval; + uint32_t len, cnt; + uint16_t lun; + rpt_lun_cmd_rsp_t *rlc; + dma_addr_t rlc_dma; + + /* Assume a failed status */ + rval = QLA_FUNCTION_FAILED; + + /* No point in continuing if the device doesn't support RLC */ + if ((fcport->flags & FCF_RLC_SUPPORT) == 0) + return (rval); + + rlc = pci_alloc_consistent(ha->pdev, sizeof(rpt_lun_cmd_rsp_t), + &rlc_dma); + if (rlc == NULL) { + qla_printk(KERN_WARNING, ha, + "Memory Allocation failed - RLC"); + return QLA_MEMORY_ALLOC_FAILED; + } + + rval = qla2x00_report_lun(ha, fcport, rlc, rlc_dma); + if (rval != QLA_SUCCESS) { + pci_free_consistent(ha->pdev, sizeof(rpt_lun_cmd_rsp_t), rlc, + rlc_dma); + return (rval); + } + + /* Always add a fc_lun_t structure for lun 0 -- mid-layer requirement */ + qla2x00_add_lun(fcport, 0); + + /* Configure LUN list. */ + len = be32_to_cpu(rlc->list.hdr.len); + len /= 8; + for (cnt = 0; cnt < len; cnt++) { + lun = CHAR_TO_SHORT(rlc->list.lst[cnt].lsb, + rlc->list.lst[cnt].msb.b); + + DEBUG3(printk("scsi(%ld): RLC lun = (%d)\n", ha->host_no, lun)); + + /* We only support 0 through MAX_LUNS-1 range */ + if (lun < MAX_LUNS) { + qla2x00_cfg_lun(ha, fcport, lun, inq, inq_dma); + } + } + atomic_set(&fcport->state, FCS_ONLINE); + + pci_free_consistent(ha->pdev, sizeof(rpt_lun_cmd_rsp_t), rlc, rlc_dma); + + return (rval); +} + +/* + * qla2x00_report_lun + * Issue SCSI report LUN command. + * + * Input: + * ha: adapter state pointer. + * fcport: FC port structure pointer. + * mem: pointer to dma memory object for report LUN IOCB + * packet. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +static int +qla2x00_report_lun(scsi_qla_host_t *ha, + fc_port_t *fcport, rpt_lun_cmd_rsp_t *rlc, dma_addr_t rlc_dma) +{ + int rval; + uint16_t retries; + uint16_t comp_status; + uint16_t scsi_status; + + rval = QLA_FUNCTION_FAILED; + + for (retries = 3; retries; retries--) { + memset(rlc, 0, sizeof(rpt_lun_cmd_rsp_t)); + rlc->p.cmd.entry_type = COMMAND_A64_TYPE; + rlc->p.cmd.entry_count = 1; +#if defined(EXTENDED_IDS) + rlc->p.cmd.target = cpu_to_le16(fcport->loop_id); +#else + rlc->p.cmd.target = (uint8_t)fcport->loop_id; +#endif + rlc->p.cmd.control_flags = + __constant_cpu_to_le16(CF_READ | CF_SIMPLE_TAG); + rlc->p.cmd.scsi_cdb[0] = REPORT_LUNS; + rlc->p.cmd.scsi_cdb[8] = MSB(sizeof(rpt_lun_lst_t)); + rlc->p.cmd.scsi_cdb[9] = LSB(sizeof(rpt_lun_lst_t)); + rlc->p.cmd.dseg_count = __constant_cpu_to_le16(1); + rlc->p.cmd.timeout = __constant_cpu_to_le16(10); + rlc->p.cmd.byte_count = + __constant_cpu_to_le32(sizeof(rpt_lun_lst_t)); + rlc->p.cmd.dseg_0_address[0] = cpu_to_le32( + LSD(rlc_dma + sizeof(sts_entry_t))); + rlc->p.cmd.dseg_0_address[1] = cpu_to_le32( + MSD(rlc_dma + sizeof(sts_entry_t))); + rlc->p.cmd.dseg_0_length = + __constant_cpu_to_le32(sizeof(rpt_lun_lst_t)); + + rval = qla2x00_issue_iocb(ha, rlc, rlc_dma, + sizeof(rpt_lun_cmd_rsp_t)); + + comp_status = le16_to_cpu(rlc->p.rsp.comp_status); + scsi_status = le16_to_cpu(rlc->p.rsp.scsi_status); + + if (rval != QLA_SUCCESS || comp_status != CS_COMPLETE || + scsi_status & SS_CHECK_CONDITION) { + + /* Device underrun, treat as OK. */ + if (rval == QLA_SUCCESS && + comp_status == CS_DATA_UNDERRUN && + scsi_status & SS_RESIDUAL_UNDER) { + + rval = QLA_SUCCESS; + break; + } + + DEBUG(printk("scsi(%ld): RLC failed to issue iocb! " + "fcport=[%04x/%p] rval=%x cs=%x ss=%x\n", + ha->host_no, fcport->loop_id, fcport, rval, + comp_status, scsi_status)); + + rval = QLA_FUNCTION_FAILED; + if (scsi_status & SS_CHECK_CONDITION) { + DEBUG2(printk("scsi(%ld): RLC " + "SS_CHECK_CONDITION Sense Data " + "%02x %02x %02x %02x %02x %02x %02x %02x\n", + ha->host_no, + rlc->p.rsp.req_sense_data[0], + rlc->p.rsp.req_sense_data[1], + rlc->p.rsp.req_sense_data[2], + rlc->p.rsp.req_sense_data[3], + rlc->p.rsp.req_sense_data[4], + rlc->p.rsp.req_sense_data[5], + rlc->p.rsp.req_sense_data[6], + rlc->p.rsp.req_sense_data[7])); + if (rlc->p.rsp.req_sense_data[2] == + ILLEGAL_REQUEST) { + fcport->flags &= ~(FCF_RLC_SUPPORT); + break; + } + } + } else { + break; + } + } + + return (rval); +} + +/* + * qla2x00_cfg_lun + * Configures LUN into fcport LUN list. + * + * Input: + * fcport: FC port structure pointer. + * lun: LUN number. + * + * Context: + * Kernel context. + */ +static fc_lun_t * +qla2x00_cfg_lun(scsi_qla_host_t *ha, fc_port_t *fcport, uint16_t lun, + inq_cmd_rsp_t *inq, dma_addr_t inq_dma) +{ + fc_lun_t *fclun; + + /* Bypass LUNs that failed. */ + if (qla2x00_inquiry(ha, fcport, lun, inq, inq_dma) != QLA_SUCCESS) { + DEBUG2(printk("scsi(%ld): Failed inquiry - loop id=0x%04x " + "lun=%d\n", ha->host_no, fcport->loop_id, lun)); + + return (NULL); + } + + switch (inq->inq[0]) { + case TYPE_DISK: + case TYPE_PROCESSOR: + case TYPE_WORM: + case TYPE_ROM: + case TYPE_SCANNER: + case TYPE_MOD: + case TYPE_MEDIUM_CHANGER: + case TYPE_ENCLOSURE: + case 0x20: + break; + case TYPE_TAPE: + fcport->flags |= FCF_TAPE_PRESENT; + break; + default: + DEBUG2(printk("scsi(%ld): Unsupported lun type -- " + "loop id=0x%04x lun=%d type=%x\n", + ha->host_no, fcport->loop_id, lun, inq->inq[0])); + return (NULL); + } + + fcport->device_type = inq->inq[0]; + fclun = qla2x00_add_lun(fcport, lun); + + if (fclun != NULL) { + atomic_set(&fcport->state, FCS_ONLINE); + } + + return (fclun); +} + +/* + * qla2x00_add_lun + * Adds LUN to database + * + * Input: + * fcport: FC port structure pointer. + * lun: LUN number. + * + * Context: + * Kernel context. + */ +static fc_lun_t * +qla2x00_add_lun(fc_port_t *fcport, uint16_t lun) +{ + int found; + fc_lun_t *fclun; + + if (fcport == NULL) { + DEBUG(printk("scsi: Unable to add lun to NULL port\n")); + return (NULL); + } + + /* Allocate LUN if not already allocated. */ + found = 0; + list_for_each_entry(fclun, &fcport->fcluns, list) { + if (fclun->lun == lun) { + found++; + break; + } + } + if (found) + return (NULL); + + fclun = kmalloc(sizeof(fc_lun_t), GFP_ATOMIC); + if (fclun == NULL) { + printk(KERN_WARNING + "%s(): Memory Allocation failed - FCLUN\n", + __func__); + return (NULL); + } + + /* Setup LUN structure. */ + memset(fclun, 0, sizeof(fc_lun_t)); + fclun->lun = lun; + fclun->fcport = fcport; + fclun->o_fcport = fcport; + fclun->device_type = fcport->device_type; + atomic_set(&fcport->state, FCS_UNCONFIGURED); + + list_add_tail(&fclun->list, &fcport->fcluns); + + return (fclun); +} + +/* + * qla2x00_inquiry + * Issue SCSI inquiry command. + * + * Input: + * ha = adapter block pointer. + * fcport = FC port structure pointer. + * + * Return: + * 0 - Success + * BIT_0 - error + * + * Context: + * Kernel context. + */ +static int +qla2x00_inquiry(scsi_qla_host_t *ha, + fc_port_t *fcport, uint16_t lun, inq_cmd_rsp_t *inq, dma_addr_t inq_dma) +{ + int rval; + uint16_t retries; + uint16_t comp_status; + uint16_t scsi_status; + + rval = QLA_FUNCTION_FAILED; + + for (retries = 3; retries; retries--) { + memset(inq, 0, sizeof(inq_cmd_rsp_t)); + inq->p.cmd.entry_type = COMMAND_A64_TYPE; + inq->p.cmd.entry_count = 1; + inq->p.cmd.lun = cpu_to_le16(lun); +#if defined(EXTENDED_IDS) + inq->p.cmd.target = cpu_to_le16(fcport->loop_id); +#else + inq->p.cmd.target = (uint8_t)fcport->loop_id; +#endif + inq->p.cmd.control_flags = + __constant_cpu_to_le16(CF_READ | CF_SIMPLE_TAG); + inq->p.cmd.scsi_cdb[0] = INQUIRY; + inq->p.cmd.scsi_cdb[4] = INQ_DATA_SIZE; + inq->p.cmd.dseg_count = __constant_cpu_to_le16(1); + inq->p.cmd.timeout = __constant_cpu_to_le16(10); + inq->p.cmd.byte_count = + __constant_cpu_to_le32(INQ_DATA_SIZE); + inq->p.cmd.dseg_0_address[0] = cpu_to_le32( + LSD(inq_dma + sizeof(sts_entry_t))); + inq->p.cmd.dseg_0_address[1] = cpu_to_le32( + MSD(inq_dma + sizeof(sts_entry_t))); + inq->p.cmd.dseg_0_length = + __constant_cpu_to_le32(INQ_DATA_SIZE); + + DEBUG5(printk("scsi(%ld): Lun Inquiry - fcport=[%04x/%p]," + " lun (%d)\n", + ha->host_no, fcport->loop_id, fcport, lun)); + + rval = qla2x00_issue_iocb(ha, inq, inq_dma, + sizeof(inq_cmd_rsp_t)); + + comp_status = le16_to_cpu(inq->p.rsp.comp_status); + scsi_status = le16_to_cpu(inq->p.rsp.scsi_status); + + DEBUG5(printk("scsi(%ld): lun (%d) inquiry - " + "inq[0]= 0x%x, comp status 0x%x, scsi status 0x%x, " + "rval=%d\n", + ha->host_no, lun, inq->inq[0], comp_status, scsi_status, + rval)); + + if (rval != QLA_SUCCESS || comp_status != CS_COMPLETE || + scsi_status & SS_CHECK_CONDITION) { + + DEBUG(printk("scsi(%ld): INQ failed to issue iocb! " + "fcport=[%04x/%p] rval=%x cs=%x ss=%x\n", + ha->host_no, fcport->loop_id, fcport, rval, + comp_status, scsi_status)); + + if (rval == QLA_SUCCESS) + rval = QLA_FUNCTION_FAILED; + + if (scsi_status & SS_CHECK_CONDITION) { + DEBUG2(printk("scsi(%ld): INQ " + "SS_CHECK_CONDITION Sense Data " + "%02x %02x %02x %02x %02x %02x %02x %02x\n", + ha->host_no, + inq->p.rsp.req_sense_data[0], + inq->p.rsp.req_sense_data[1], + inq->p.rsp.req_sense_data[2], + inq->p.rsp.req_sense_data[3], + inq->p.rsp.req_sense_data[4], + inq->p.rsp.req_sense_data[5], + inq->p.rsp.req_sense_data[6], + inq->p.rsp.req_sense_data[7])); + } + + /* Device underrun drop LUN. */ + if (comp_status == CS_DATA_UNDERRUN && + scsi_status & SS_RESIDUAL_UNDER) { + break; + } + } else { + break; + } + } + + return (rval); +} + + +/* + * qla2x00_configure_fabric + * Setup SNS devices with loop ID's. + * + * Input: + * ha = adapter block pointer. + * + * Returns: + * 0 = success. + * BIT_0 = error + */ +static int +qla2x00_configure_fabric(scsi_qla_host_t *ha) +{ + int rval, rval2; + fc_port_t *fcport, *fcptemp; + uint16_t next_loopid; + LIST_HEAD(new_fcports); + + /* If FL port exists, then SNS is present */ + rval = qla2x00_get_port_name(ha, SNS_FL_PORT, NULL, 0); + if (rval != QLA_SUCCESS) { + DEBUG2(printk("scsi(%ld): MBC_GET_PORT_NAME Failed, No FL " + "Port\n", ha->host_no)); + + ha->device_flags &= ~SWITCH_FOUND; + return (QLA_SUCCESS); + } + + /* Mark devices that need re-synchronization. */ + rval2 = qla2x00_device_resync(ha); + if (rval2 == QLA_RSCNS_HANDLED) { + /* No, point doing the scan, just continue. */ + return (QLA_SUCCESS); + } + do { + if (test_and_clear_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags)) { + if (qla2x00_rft_id(ha)) { + /* EMPTY */ + DEBUG2(printk("scsi(%ld): Register FC-4 " + "TYPE failed.\n", ha->host_no)); + } + if (qla2x00_rff_id(ha)) { + /* EMPTY */ + DEBUG2(printk("scsi(%ld): Register FC-4 " + "Features failed.\n", ha->host_no)); + } + if (qla2x00_rnn_id(ha)) { + /* EMPTY */ + DEBUG2(printk("scsi(%ld): Register Node Name " + "failed.\n", ha->host_no)); + } else if (qla2x00_rsnn_nn(ha)) { + /* EMPTY */ + DEBUG2(printk("scsi(%ld): Register Symbolic " + "Node Name failed.\n", ha->host_no)); + } + } + + rval = qla2x00_find_all_fabric_devs(ha, &new_fcports); + if (rval != QLA_SUCCESS) + break; + + /* + * Logout all previous fabric devices marked lost, except + * tape devices. + */ + list_for_each_entry(fcport, &ha->fcports, list) { + if (test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)) + break; + + if ((fcport->flags & FCF_FABRIC_DEVICE) == 0) + continue; + + if (atomic_read(&fcport->state) == FCS_DEVICE_LOST) { + qla2x00_mark_device_lost(ha, fcport, + ql2xplogiabsentdevice); + if (fcport->loop_id != FC_NO_LOOP_ID && + (fcport->flags & FCF_TAPE_PRESENT) == 0 && + fcport->port_type != FCT_INITIATOR && + fcport->port_type != FCT_BROADCAST) { + + qla2x00_fabric_logout(ha, + fcport->loop_id); + fcport->loop_id = FC_NO_LOOP_ID; + } + } + } + + /* Starting free loop ID. */ + next_loopid = ha->min_external_loopid; + + /* + * Scan through our port list and login entries that need to be + * logged in. + */ + list_for_each_entry(fcport, &ha->fcports, list) { + if (atomic_read(&ha->loop_down_timer) || + test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)) + break; + + if ((fcport->flags & FCF_FABRIC_DEVICE) == 0 || + (fcport->flags & FCF_LOGIN_NEEDED) == 0) + continue; + + if (fcport->loop_id == FC_NO_LOOP_ID) { + fcport->loop_id = next_loopid; + rval = qla2x00_find_new_loop_id(ha, fcport); + if (rval != QLA_SUCCESS) { + /* Ran out of IDs to use */ + break; + } + } + + /* Login and update database */ + qla2x00_fabric_dev_login(ha, fcport, &next_loopid); + } + + /* Exit if out of loop IDs. */ + if (rval != QLA_SUCCESS) { + break; + } + + /* + * Login and add the new devices to our port list. + */ + list_for_each_entry_safe(fcport, fcptemp, &new_fcports, list) { + if (atomic_read(&ha->loop_down_timer) || + test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)) + break; + + /* Find a new loop ID to use. */ + fcport->loop_id = next_loopid; + rval = qla2x00_find_new_loop_id(ha, fcport); + if (rval != QLA_SUCCESS) { + /* Ran out of IDs to use */ + break; + } + + /* Login and update database */ + qla2x00_fabric_dev_login(ha, fcport, &next_loopid); + + /* Remove device from the new list and add it to DB */ + list_del(&fcport->list); + list_add_tail(&fcport->list, &ha->fcports); + } + } while (0); + + /* Free all new device structures not processed. */ + list_for_each_entry_safe(fcport, fcptemp, &new_fcports, list) { + list_del(&fcport->list); + kfree(fcport); + } + + if (rval) { + DEBUG2(printk("scsi(%ld): Configure fabric error exit: " + "rval=%d\n", ha->host_no, rval)); + } + + return (rval); +} + + +/* + * qla2x00_find_all_fabric_devs + * + * Input: + * ha = adapter block pointer. + * dev = database device entry pointer. + * + * Returns: + * 0 = success. + * BIT_0 = error. + * + * Context: + * Kernel context. + */ +static int +qla2x00_find_all_fabric_devs(scsi_qla_host_t *ha, struct list_head *new_fcports) +{ + int rval; + uint16_t loop_id; + fc_port_t *fcport, *new_fcport; + int found; + + sw_info_t *swl; + int swl_idx; + int first_dev, last_dev; + port_id_t wrap; + + rval = QLA_SUCCESS; + + /* Try GID_PT to get device list, else GAN. */ + swl = kmalloc(sizeof(sw_info_t) * MAX_FIBRE_DEVICES, GFP_ATOMIC); + if (swl == NULL) { + /*EMPTY*/ + DEBUG2(printk("scsi(%ld): GID_PT allocations failed, fallback " + "on GA_NXT\n", ha->host_no)); + } else if (qla2x00_gid_pt(ha, swl) != QLA_SUCCESS) { + kfree(swl); + swl = NULL; + } else if (qla2x00_gpn_id(ha, swl) != QLA_SUCCESS) { + kfree(swl); + swl = NULL; + } else if (qla2x00_gnn_id(ha, swl) != QLA_SUCCESS) { + kfree(swl); + swl = NULL; + } + swl_idx = 0; + + /* Allocate temporary fcport for any new fcports discovered. */ + new_fcport = qla2x00_alloc_fcport(ha, GFP_KERNEL); + if (new_fcport == NULL) { + if (swl) + kfree(swl); + return (QLA_MEMORY_ALLOC_FAILED); + } + new_fcport->flags |= (FCF_FABRIC_DEVICE | FCF_LOGIN_NEEDED); + + /* Set start port ID scan at adapter ID. */ + first_dev = 1; + last_dev = 0; + + /* Starting free loop ID. */ + loop_id = ha->min_external_loopid; + + for (; loop_id <= SNS_LAST_LOOP_ID; loop_id++) { + if (RESERVED_LOOP_ID(loop_id)) + continue; + + if (atomic_read(&ha->loop_down_timer) || + test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)) + break; + + if (swl != NULL) { + if (last_dev) { + wrap.b24 = new_fcport->d_id.b24; + } else { + new_fcport->d_id.b24 = swl[swl_idx].d_id.b24; + memcpy(new_fcport->node_name, + swl[swl_idx].node_name, WWN_SIZE); + memcpy(new_fcport->port_name, + swl[swl_idx].port_name, WWN_SIZE); + + if (swl[swl_idx].d_id.b.rsvd_1 != 0) { + last_dev = 1; + } + swl_idx++; + } + } else { + /* Send GA_NXT to the switch */ + rval = qla2x00_ga_nxt(ha, new_fcport); + if (rval != QLA_SUCCESS) { + break; + } + } + + /* If wrap on switch device list, exit. */ + if (first_dev) { + wrap.b24 = new_fcport->d_id.b24; + first_dev = 0; + } else if (new_fcport->d_id.b24 == wrap.b24) { + DEBUG2(printk("scsi(%ld): device wrap (%02x%02x%02x)\n", + ha->host_no, new_fcport->d_id.b.domain, + new_fcport->d_id.b.area, new_fcport->d_id.b.al_pa)); + break; + } + + /* Bypass if host adapter. */ + if (new_fcport->d_id.b24 == ha->d_id.b24) + continue; + + /* Bypass reserved domain fields. */ + if ((new_fcport->d_id.b.domain & 0xf0) == 0xf0) + continue; + + /* Bypass if same domain and area of adapter. */ + if ((new_fcport->d_id.b24 & 0xffff00) == + (ha->d_id.b24 & 0xffff00)) + continue; + + /* Locate matching device in database. */ + found = 0; + list_for_each_entry(fcport, &ha->fcports, list) { + if (memcmp(new_fcport->port_name, fcport->port_name, + WWN_SIZE)) + continue; + + found++; + + /* + * If device was not a fabric device before. + */ + if ((fcport->flags & FCF_FABRIC_DEVICE) == 0) { + fcport->d_id.b24 = new_fcport->d_id.b24; + fcport->loop_id = FC_NO_LOOP_ID; + fcport->flags |= (FCF_FABRIC_DEVICE | + FCF_LOGIN_NEEDED); + fcport->flags &= ~FCF_PERSISTENT_BOUND; + break; + } + + /* + * If address the same and state FCS_ONLINE, nothing + * changed. + */ + if (fcport->d_id.b24 == new_fcport->d_id.b24 && + atomic_read(&fcport->state) == FCS_ONLINE) { + break; + } + + /* + * Port ID changed or device was marked to be updated; + * Log it out if still logged in and mark it for + * relogin later. + */ + fcport->d_id.b24 = new_fcport->d_id.b24; + fcport->flags |= FCF_LOGIN_NEEDED; + if (fcport->loop_id != FC_NO_LOOP_ID && + (fcport->flags & FCF_TAPE_PRESENT) == 0 && + fcport->port_type != FCT_INITIATOR && + fcport->port_type != FCT_BROADCAST) { + qla2x00_fabric_logout(ha, fcport->loop_id); + fcport->loop_id = FC_NO_LOOP_ID; + } + + break; + } + + if (found) + continue; + + /* If device was not in our fcports list, then add it. */ + list_add_tail(&new_fcport->list, new_fcports); + + /* Allocate a new replacement fcport. */ + new_fcport = qla2x00_alloc_fcport(ha, GFP_KERNEL); + if (new_fcport == NULL) { + if (swl) + kfree(swl); + return (QLA_MEMORY_ALLOC_FAILED); + } + new_fcport->flags |= (FCF_FABRIC_DEVICE | FCF_LOGIN_NEEDED); + } + + if (swl) + kfree(swl); + + if (new_fcport) + kfree(new_fcport); + + if (!list_empty(new_fcports)) + ha->device_flags |= DFLG_FABRIC_DEVICES; + + return (rval); +} + +/* + * qla2x00_find_new_loop_id + * Scan through our port list and find a new usable loop ID. + * + * Input: + * ha: adapter state pointer. + * dev: port structure pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_find_new_loop_id(scsi_qla_host_t *ha, fc_port_t *dev) +{ + int rval; + int found; + fc_port_t *fcport; + uint16_t first_loop_id; + + rval = QLA_SUCCESS; + + /* Save starting loop ID. */ + first_loop_id = dev->loop_id; + + for (;;) { + /* Skip loop ID if already used by adapter. */ + if (dev->loop_id == ha->loop_id) { + dev->loop_id++; + } + + /* Skip reserved loop IDs. */ + while (RESERVED_LOOP_ID(dev->loop_id)) { + dev->loop_id++; + } + + /* Reset loop ID if passed the end. */ + if (dev->loop_id > SNS_LAST_LOOP_ID) { + /* first loop ID. */ + dev->loop_id = ha->min_external_loopid; + } + + /* Check for loop ID being already in use. */ + found = 0; + fcport = NULL; + list_for_each_entry(fcport, &ha->fcports, list) { + if (fcport->loop_id == dev->loop_id && fcport != dev) { + /* ID possibly in use */ + found++; + break; + } + } + + /* If not in use then it is free to use. */ + if (!found) { + break; + } + + /* ID in use. Try next value. */ + dev->loop_id++; + + /* If wrap around. No free ID to use. */ + if (dev->loop_id == first_loop_id) { + dev->loop_id = FC_NO_LOOP_ID; + rval = QLA_FUNCTION_FAILED; + break; + } + } + + return (rval); +} + +/* + * qla2x00_device_resync + * Marks devices in the database that needs resynchronization. + * + * Input: + * ha = adapter block pointer. + * + * Context: + * Kernel context. + */ +static int +qla2x00_device_resync(scsi_qla_host_t *ha) +{ + int rval; +#if defined(ISP2300) + int rval2; +#endif + uint32_t mask; + fc_port_t *fcport; + uint32_t rscn_entry; + uint8_t rscn_out_iter; + uint8_t format; + port_id_t d_id; + + rval = QLA_RSCNS_HANDLED; + + while (ha->rscn_out_ptr != ha->rscn_in_ptr || + ha->flags.rscn_queue_overflow) { + + rscn_entry = ha->rscn_queue[ha->rscn_out_ptr]; + format = MSB(MSW(rscn_entry)); + d_id.b.domain = LSB(MSW(rscn_entry)); + d_id.b.area = MSB(LSW(rscn_entry)); + d_id.b.al_pa = LSB(LSW(rscn_entry)); + + DEBUG(printk("scsi(%ld): RSCN queue entry[%d] = " + "[%02x/%02x%02x%02x].\n", + ha->host_no, ha->rscn_out_ptr, format, d_id.b.domain, + d_id.b.area, d_id.b.al_pa)); + + ha->rscn_out_ptr++; + if (ha->rscn_out_ptr == MAX_RSCN_COUNT) + ha->rscn_out_ptr = 0; + + /* Skip duplicate entries. */ + for (rscn_out_iter = ha->rscn_out_ptr; + !ha->flags.rscn_queue_overflow && + rscn_out_iter != ha->rscn_in_ptr; + rscn_out_iter = (rscn_out_iter == + (MAX_RSCN_COUNT - 1)) ? 0: rscn_out_iter + 1) { + + if (rscn_entry != ha->rscn_queue[rscn_out_iter]) + break; + + DEBUG(printk("scsi(%ld): Skipping duplicate RSCN queue " + "entry found at [%d].\n", ha->host_no, + rscn_out_iter)); + + ha->rscn_out_ptr = rscn_out_iter; + } + + /* Queue overflow, set switch default case. */ + if (ha->flags.rscn_queue_overflow) { + DEBUG(printk("scsi(%ld): device_resync: rscn " + "overflow.\n", ha->host_no)); + + format = 3; + ha->flags.rscn_queue_overflow = 0; + } + + switch (format) { + case 0: +#if defined(ISP2300) + if (ha->init_done) { + /* Handle port RSCN via asyncronous IOCBs */ + rval2 = qla2x00_handle_port_rscn(ha, rscn_entry, + NULL, 0); + if (rval2 == QLA_SUCCESS) + continue; + } +#endif + mask = 0xffffff; + break; + case 1: + mask = 0xffff00; + break; + case 2: + mask = 0xff0000; + break; + default: + mask = 0x0; + d_id.b24 = 0; + ha->rscn_out_ptr = ha->rscn_in_ptr; + break; + } + + rval = QLA_SUCCESS; +#if defined(ISP2300) + /* Abort any outstanding IO descriptors. */ + qla2x00_cancel_io_descriptors(ha); +#endif + + list_for_each_entry(fcport, &ha->fcports, list) { + if ((fcport->flags & FCF_FABRIC_DEVICE) == 0 || + (fcport->d_id.b24 & mask) != d_id.b24 || + fcport->port_type == FCT_BROADCAST) + continue; + + if (atomic_read(&fcport->state) == FCS_ONLINE) { + if (format != 3 || + fcport->port_type != FCT_INITIATOR) { + atomic_set(&fcport->state, + FCS_DEVICE_LOST); + } + } + fcport->flags &= ~FCF_FARP_DONE; + } + } + return (rval); +} + +/* + * qla2x00_fabric_dev_login + * Login fabric target device and update FC port database. + * + * Input: + * ha: adapter state pointer. + * fcport: port structure list pointer. + * next_loopid: contains value of a new loop ID that can be used + * by the next login attempt. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +static int +qla2x00_fabric_dev_login(scsi_qla_host_t *ha, fc_port_t *fcport, + uint16_t *next_loopid) +{ + int rval; + int retry; + + rval = QLA_SUCCESS; + retry = 0; + + rval = qla2x00_fabric_login(ha, fcport, next_loopid); + if (rval == QLA_SUCCESS) { + rval = qla2x00_get_port_database(ha, fcport, BIT_1 | BIT_0); + if (rval != QLA_SUCCESS) { + qla2x00_fabric_logout(ha, fcport->loop_id); + } else { + qla2x00_update_fcport(ha, fcport); + } + } + + return (rval); +} + +/* + * qla2x00_fabric_login + * Issue fabric login command. + * + * Input: + * ha = adapter block pointer. + * device = pointer to FC device type structure. + * + * Returns: + * 0 - Login successfully + * 1 - Login failed + * 2 - Initiator device + * 3 - Fatal error + */ +int +qla2x00_fabric_login(scsi_qla_host_t *ha, fc_port_t *fcport, + uint16_t *next_loopid) +{ + int rval; + int retry; + uint16_t tmp_loopid; + uint16_t mb[MAILBOX_REGISTER_COUNT]; + + retry = 0; + tmp_loopid = 0; + + for (;;) { + DEBUG(printk("scsi(%ld): Trying Fabric Login w/loop id 0x%04x " + "for port %02x%02x%02x.\n", + ha->host_no, fcport->loop_id, fcport->d_id.b.domain, + fcport->d_id.b.area, fcport->d_id.b.al_pa)); + + /* Login fcport on switch. */ + qla2x00_login_fabric(ha, fcport->loop_id, + fcport->d_id.b.domain, fcport->d_id.b.area, + fcport->d_id.b.al_pa, mb, BIT_0); + if (mb[0] == MBS_PORT_ID_USED) { + /* + * Device has another loop ID. The firmware team + * recommends us to perform an implicit login with the + * specified ID again. The ID we just used is save here + * so we return with an ID that can be tried by the + * next login. + */ + retry++; + tmp_loopid = fcport->loop_id; + fcport->loop_id = mb[1]; + + DEBUG(printk("Fabric Login: port in use - next " + "loop id=0x%04x, port Id=%02x%02x%02x.\n", + fcport->loop_id, fcport->d_id.b.domain, + fcport->d_id.b.area, fcport->d_id.b.al_pa)); + + } else if (mb[0] == MBS_COMMAND_COMPLETE) { + /* + * Login succeeded. + */ + if (retry) { + /* A retry occurred before. */ + *next_loopid = tmp_loopid; + } else { + /* + * No retry occurred before. Just increment the + * ID value for next login. + */ + *next_loopid = (fcport->loop_id + 1); + } + + if (mb[1] & BIT_0) { + fcport->port_type = FCT_INITIATOR; + } else { + fcport->port_type = FCT_TARGET; + if (mb[1] & BIT_1) { + fcport->flags |= FCF_TAPE_PRESENT; + } + } + + rval = QLA_SUCCESS; + break; + } else if (mb[0] == MBS_LOOP_ID_USED) { + /* + * Loop ID already used, try next loop ID. + */ + fcport->loop_id++; + rval = qla2x00_find_new_loop_id(ha, fcport); + if (rval != QLA_SUCCESS) { + /* Ran out of loop IDs to use */ + break; + } + } else if (mb[0] == MBS_COMMAND_ERROR) { + /* + * Firmware possibly timed out during login. If NO + * retries are left to do then the device is declared + * dead. + */ + *next_loopid = fcport->loop_id; + qla2x00_fabric_logout(ha, fcport->loop_id); + fcport->loop_id = FC_NO_LOOP_ID; + + rval = 3; + break; + } else { + /* + * unrecoverable / not handled error + */ + DEBUG2(printk("%s(%ld): failed=%x port_id=%02x%02x%02x " + "loop_id=%x jiffies=%lx.\n", + __func__, ha->host_no, mb[0], + fcport->d_id.b.domain, fcport->d_id.b.area, + fcport->d_id.b.al_pa, fcport->loop_id, jiffies)); + + *next_loopid = fcport->loop_id; + qla2x00_fabric_logout(ha, fcport->loop_id); + fcport->loop_id = FC_NO_LOOP_ID; + atomic_set(&fcport->state, FCS_DEVICE_DEAD); + + rval = 1; + break; + } + } + + return (rval); +} + +/* + * qla2x00_local_device_login + * Issue local device login command. + * + * Input: + * ha = adapter block pointer. + * loop_id = loop id of device to login to. + * + * Returns (Where's the #define!!!!): + * 0 - Login successfully + * 1 - Login failed + * 3 - Fatal error + */ +int +qla2x00_local_device_login(scsi_qla_host_t *ha, uint16_t loop_id) +{ + int rval; + uint16_t mb[MAILBOX_REGISTER_COUNT]; + + memset(mb, 0, sizeof(mb)); + rval = qla2x00_login_local_device(ha, loop_id, mb, BIT_0); + if (rval == QLA_SUCCESS) { + /* Interrogate mailbox registers for any errors */ + if (mb[0] == MBS_COMMAND_ERROR) + rval = 1; + else if (mb[0] == MBS_COMMAND_PARAMETER_ERROR) + /* device not in PCB table */ + rval = 3; + } + + return (rval); +} + +/* + * qla2x00_loop_resync + * Resync with fibre channel devices. + * + * Input: + * ha = adapter block pointer. + * + * Returns: + * 0 = success + */ +int +qla2x00_loop_resync(scsi_qla_host_t *ha) +{ + int rval; + + rval = QLA_SUCCESS; + + ha->loop_state = LOOP_UPDATE; + qla2x00_stats.loop_resync++; + clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags); + if (ha->flags.online) { + if (!(rval = qla2x00_fw_ready(ha))) { + do { + /* v2.19.05b6 */ + ha->loop_state = LOOP_UPDATE; + + /* + * Issue marker command only when we are going + * to start the I/O . + */ + ha->marker_needed = 1; + + /* Remap devices on Loop. */ + clear_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags); + + qla2x00_configure_loop(ha); + + } while (!atomic_read(&ha->loop_down_timer) && + !(test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags)) && + (test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags))); + } + qla2x00_restart_queues(ha,TRUE); + } + + if (test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags)) { + return (QLA_FUNCTION_FAILED); + } + + if (rval) { + DEBUG2_3(printk("%s(): **** FAILED ****\n", __func__)); + } + + return (rval); +} + +/* + * qla2x00_restart_queues + * Restart device queues. + * + * Input: + * ha = adapter block pointer. + * + * Context: + * Kernel/Interrupt context. + */ +void +qla2x00_restart_queues(scsi_qla_host_t *ha, uint8_t flush) +{ + srb_t *sp; + int retry_q_cnt = 0; + int pending_q_cnt = 0; + struct list_head *list, *temp; + unsigned long flags = 0; + struct list_head *hal; + scsi_qla_host_t *vis_ha; + + + ENTER(__func__); + + clear_bit(RESTART_QUEUES_NEEDED, &ha->dpc_flags); + + /* + * start pending queue + */ + pending_q_cnt = ha->qthreads; + if (flush) { + spin_lock_irqsave(&ha->list_lock,flags); + list_for_each_safe(list, temp, &ha->pending_queue) { + sp = list_entry(list, srb_t, list); + /* + * When time expire return request back to OS as BUSY + */ + __del_from_pending_queue(ha, sp); + sp->cmd->result = DID_BUS_BUSY << 16; + sp->cmd->host_scribble = (unsigned char *)NULL; + __add_to_done_queue(ha, sp); + } + spin_unlock_irqrestore(&ha->list_lock, flags); + } else { + if (!list_empty(&ha->pending_queue)) + qla2x00_next(ha); + } + + /* + * Clear out our retry queue + */ + if (flush) { + spin_lock_irqsave(&ha->list_lock, flags); + retry_q_cnt = ha->retry_q_cnt; + list_for_each_safe(list, temp, &ha->retry_queue) { + sp = list_entry(list, srb_t, list); + /* when time expire return request back to OS as BUSY */ + __del_from_retry_queue(ha, sp); + sp->cmd->result = DID_BUS_BUSY << 16; + sp->cmd->host_scribble = (unsigned char *)NULL; + __add_to_done_queue(ha, sp); + } + spin_unlock_irqrestore(&ha->list_lock, flags); + + DEBUG2(printk("%s(%ld): callback %d commands.\n", + __func__, + ha->host_no, + retry_q_cnt);) + } + + DEBUG2(printk("%s(%ld): active=%ld, retry=%d, pending=%d, " + "done=%ld, failover=%d, scsi retry=%d commands.\n", + __func__, + ha->host_no, + ha->actthreads, + ha->retry_q_cnt, + pending_q_cnt, + ha->done_q_cnt, + ha->failover_cnt, + ha->scsi_retry_q_cnt);) + + if (ha->flags.failover_enabled) { + /* Try and start all visible adapters */ + read_lock(&qla_hostlist_lock); + list_for_each(hal, &qla_hostlist) { + vis_ha = list_entry(hal, scsi_qla_host_t, list); + + if (!list_empty(&vis_ha->pending_queue)) + qla2x00_next(vis_ha); + + DEBUG2(printk("host(%ld):Commands busy=%d " + "failed=%d\neh_active=%d\n ", + vis_ha->host_no, + vis_ha->host->host_busy, + vis_ha->host->host_failed, + vis_ha->host->eh_active);) + } + read_unlock(&qla_hostlist_lock); + } + + if (!list_empty(&ha->done_queue)) + qla2x00_done(ha); + + LEAVE(__func__); +} + +//FIXME - Document +void +qla2x00_rescan_fcports(scsi_qla_host_t *ha) +{ + int rescan_done; + fc_port_t *fcport; + + rescan_done = 0; + list_for_each_entry(fcport, &ha->fcports, list) { + if ((fcport->flags & FCF_RESCAN_NEEDED) == 0) + continue; + + qla2x00_update_fcport(ha, fcport); + fcport->flags &= ~FCF_RESCAN_NEEDED; + + rescan_done = 1; + } + + /* Update OS target and lun structures if necessary. */ + if (rescan_done) + qla2x00_config_os(ha); +} + + +/* + * qla2x00_config_os + * Setup OS target and LUN structures. + * + * Input: + * ha = adapter state pointer. + * + * Context: + * Kernel context. + */ +static void +qla2x00_config_os(scsi_qla_host_t *ha) +{ + fc_port_t *fcport; + fc_lun_t *fclun; + os_tgt_t *tq; + uint16_t tgt; + + + for (tgt = 0; tgt < MAX_TARGETS; tgt++) { + if ((tq = TGT_Q(ha, tgt)) == NULL) + continue; + + tq->flags &= ~TQF_ONLINE; + } + + list_for_each_entry(fcport, &ha->fcports, list) { + if (atomic_read(&fcport->state) != FCS_ONLINE || + fcport->port_type == FCT_INITIATOR || + fcport->port_type == FCT_BROADCAST) { + fcport->os_target_id = MAX_TARGETS; + continue; + } + + if (fcport->flags & FCF_FO_MASKED) { + continue; + } + + /* Bind FC port to OS target number. */ + if (qla2x00_fcport_bind(ha, fcport) == MAX_TARGETS) { + continue; + } + + /* Bind FC LUN to OS LUN number. */ + list_for_each_entry(fclun, &fcport->fcluns, list) { + qla2x00_fclun_bind(ha, fcport, fclun); + } + } +} + +/* + * qla2x00_fcport_bind + * Locates a target number for FC port. + * + * Input: + * ha = adapter state pointer. + * fcport = FC port structure pointer. + * + * Returns: + * target number + * + * Context: + * Kernel context. + */ +static uint16_t +qla2x00_fcport_bind(scsi_qla_host_t *ha, fc_port_t *fcport) +{ + uint16_t tgt; + os_tgt_t *tq; + + /* Check for persistent binding. */ + for (tgt = 0; tgt < MAX_TARGETS; tgt++) { + if ((tq = TGT_Q(ha, tgt)) == NULL) + continue; + + if (ha->binding_type == BIND_BY_PORT_ID && + fcport->d_id.b24 == tq->d_id.b24) { + memcpy(tq->node_name, fcport->node_name, WWN_SIZE); + memcpy(tq->port_name, fcport->port_name, WWN_SIZE); + break; + } + + if (memcmp(fcport->port_name, tq->port_name, WWN_SIZE) == 0) { + /* In case of persistent binding, update the WWNN */ + memcpy(tq->node_name, fcport->node_name, WWN_SIZE); + break; + } + } + + /* TODO: honor the ConfigRequired flag */ + if (tgt == MAX_TARGETS) { + /* Check if targetID 0 available. */ + tgt = 0; + + if (TGT_Q(ha, tgt) != NULL) { + /* Locate first free target for device. */ + for (tgt = 0; tgt < MAX_TARGETS; tgt++) { + if (TGT_Q(ha, tgt) == NULL) { + break; + } + } + } + if (tgt != MAX_TARGETS) { + if ((tq = qla2x00_tgt_alloc(ha, tgt)) != NULL) { + memcpy(tq->node_name, fcport->node_name, + WWN_SIZE); + memcpy(tq->port_name, fcport->port_name, + WWN_SIZE); + tq->d_id.b24 = fcport->d_id.b24; + } + } + } + + /* Reset target numbers incase it changed. */ + fcport->os_target_id = tgt; + if (tgt != MAX_TARGETS && tq != NULL) { + DEBUG2(printk("scsi(%ld): Assigning target ID=%02d @ %p to " + "loop id=0x%04x, port state=0x%x, port down retry=%d\n", + ha->host_no, tgt, tq, fcport->loop_id, + atomic_read(&fcport->state), + atomic_read(&fcport->port_down_timer))); + + fcport->tgt_queue = tq; + fcport->flags |= FCF_PERSISTENT_BOUND; + tq->fcport = fcport; + tq->flags |= TQF_ONLINE; + tq->port_down_retry_count = ha->port_down_retry_count; + + if (!ha->flags.failover_enabled) + qla2x00_get_lun_mask_from_config(ha, fcport, tgt, 0); + } + + if (tgt == MAX_TARGETS) { + qla_printk(KERN_WARNING, ha, + "Unable to bind fcport, loop_id=%x\n", fcport->loop_id); + } + + return (tgt); +} + +/* + * qla2x00_fclun_bind + * Binds all FC device LUNS to OS LUNS. + * + * Input: + * ha: adapter state pointer. + * fcport: FC port structure pointer. + * + * Returns: + * target number + * + * Context: + * Kernel context. + */ +static os_lun_t * +qla2x00_fclun_bind(scsi_qla_host_t *ha, fc_port_t *fcport, fc_lun_t *fclun) +{ + os_lun_t *lq; + uint16_t tgt; + uint16_t lun; + + tgt = fcport->os_target_id; + lun = fclun->lun; + + /* Allocate LUNs */ + if (lun >= MAX_LUNS) { + DEBUG2(printk("scsi(%ld): Unable to bind lun, invalid " + "lun=(%x).\n", ha->host_no, lun)); + return (NULL); + } + + /* Always alloc LUN 0 so kernel will scan past LUN 0. */ + if (lun != 0 && (EXT_IS_LUN_BIT_SET(&(fcport->lun_mask), lun))) { + return (NULL); + } + + if ((lq = qla2x00_lun_alloc(ha, tgt, lun)) == NULL) { + qla_printk(KERN_WARNING, ha, + "Unable to bind fclun, loop_id=%x lun=%x\n", + fcport->loop_id, lun); + return (NULL); + } + + lq->fclun = fclun; + + return (lq); +} + +/* + * qla2x00_tgt_alloc + * Allocate and pre-initialize target queue. + * + * Input: + * ha = adapter block pointer. + * t = SCSI target number. + * + * Returns: + * NULL = failure + * + * Context: + * Kernel context. + */ +os_tgt_t * +qla2x00_tgt_alloc(scsi_qla_host_t *ha, uint16_t tgt) +{ + os_tgt_t *tq; + + /* + * If SCSI addressing OK, allocate TGT queue and lock. + */ + if (tgt >= MAX_TARGETS) { + DEBUG2(printk("scsi(%ld): Unable to allocate target, invalid " + "target number %d.\n", ha->host_no, tgt)); + return (NULL); + } + + tq = TGT_Q(ha, tgt); + if (tq == NULL) { + tq = kmalloc(sizeof(os_tgt_t), GFP_ATOMIC); + if (tq != NULL) { + DEBUG2(printk("scsi(%ld): Alloc Target %d @ %p\n", + ha->host_no, tgt, tq)); + + memset(tq, 0, sizeof(os_tgt_t)); + tq->ha = ha; + + TGT_Q(ha, tgt) = tq; + } + } + if (tq != NULL) { + tq->port_down_retry_count = ha->port_down_retry_count; + } else { + qla_printk(KERN_WARNING, ha, + "Unable to allocate target.\n"); + ha->mem_err++; + } + + return (tq); +} + +/* + * qla2x00_tgt_free + * Frees target and LUN queues. + * + * Input: + * ha = adapter block pointer. + * t = SCSI target number. + * + * Context: + * Kernel context. + */ +void +qla2x00_tgt_free(scsi_qla_host_t *ha, uint16_t tgt) +{ + os_tgt_t *tq; + uint16_t lun; + + /* + * If SCSI addressing OK, allocate TGT queue and lock. + */ + if (tgt >= MAX_TARGETS) { + DEBUG2(printk("scsi(%ld): Unable to de-allocate target, " + "invalid target number %d.\n", ha->host_no, tgt)); + + return; + } + + tq = TGT_Q(ha, tgt); + if (tq != NULL) { + TGT_Q(ha, tgt) = NULL; + + /* Free LUN structures. */ + for (lun = 0; lun < MAX_LUNS; lun++) + qla2x00_lun_free(ha, tgt, lun); + + kfree(tq); + } + + return; +} + +/* + * qla2x00_lun_alloc + * Allocate and initialize LUN queue. + * + * Input: + * ha = adapter block pointer. + * t = SCSI target number. + * l = LUN number. + * + * Returns: + * NULL = failure + * + * Context: + * Kernel context. + */ +os_lun_t * +qla2x00_lun_alloc(scsi_qla_host_t *ha, uint16_t tgt, uint16_t lun) +{ + os_lun_t *lq; + + /* + * If SCSI addressing OK, allocate LUN queue. + */ + if (tgt >= MAX_TARGETS || lun >= MAX_LUNS || TGT_Q(ha, tgt) == NULL) { + DEBUG2(printk("scsi(%ld): Unable to allocate lun, invalid " + "parameter.\n", ha->host_no)); + + return (NULL); + } + + lq = LUN_Q(ha, tgt, lun); + if (lq == NULL) { + lq = kmalloc(sizeof(os_lun_t), GFP_ATOMIC); + if (lq != NULL) { + DEBUG2(printk("scsi(%ld): Alloc Lun %d @ tgt %d.\n", + ha->host_no, lun, tgt)); + + memset(lq, 0, sizeof (os_lun_t)); + LUN_Q(ha, tgt, lun) = lq; + + /* + * The following lun queue initialization code + * must be duplicated in alloc_ioctl_mem function + * for ioctl_lq. + */ + lq->q_state = LUN_STATE_READY; + spin_lock_init(&lq->q_lock); + } + } + + if (lq == NULL) { + qla_printk(KERN_WARNING, ha, "Unable to allocate lun.\n"); + } + + return (lq); +} + +/* + * qla2x00_lun_free + * Frees LUN queue. + * + * Input: + * ha = adapter block pointer. + * t = SCSI target number. + * + * Context: + * Kernel context. + */ +static void +qla2x00_lun_free(scsi_qla_host_t *ha, uint16_t tgt, uint16_t lun) +{ + os_lun_t *lq; + + /* + * If SCSI addressing OK, allocate TGT queue and lock. + */ + if (tgt >= MAX_TARGETS || lun >= MAX_LUNS) { + DEBUG2(printk("scsi(%ld): Unable to deallocate lun, invalid " + "parameter.\n", ha->host_no)); + + return; + } + + if (TGT_Q(ha, tgt) != NULL && (lq = LUN_Q(ha, tgt, lun)) != NULL) { + LUN_Q(ha, tgt, lun) = NULL; + kfree(lq); + } + + return; +} + + +/* + * qla2x00_get_lun_mask_from_config + * Get lun mask from the configuration parameters. + * Bit order is little endian. + * + * Input: + * ha -- Host adapter + * tgt -- target/device number + * port -- pointer to port + */ +static void +qla2x00_get_lun_mask_from_config(scsi_qla_host_t *ha, + fc_port_t *fcport, uint16_t tgt, uint16_t dev_no) +{ + char propbuf[60]; /* size of search string */ + int rval, lun, bit; + lun_bit_mask_t lun_mask, *mask_ptr = &lun_mask; + + /* Get "target-N-device-N-lun-mask" as a 256 bit lun_mask*/ + sprintf(propbuf, "scsi-qla%ld-tgt-%d-di-%d-lun-disabled", + ha->instance, tgt, dev_no); + + rval = qla2x00_get_prop_xstr(ha, propbuf, + (uint8_t *)&lun_mask, sizeof(lun_bit_mask_t)); + if (rval == sizeof(lun_bit_mask_t)) { + memset(&fcport->lun_mask, 0, sizeof(lun_bit_mask_t)); + for (lun = 8 * sizeof(lun_bit_mask_t) - 1, bit = 0; + lun >= 0; lun--, bit++) { + if (EXT_IS_LUN_BIT_SET(mask_ptr, lun)) + EXT_SET_LUN_BIT((&fcport->lun_mask), bit); + } + + DEBUG3(printk("scsi(%ld): returning lun mask for fcport " + "%02x%02x%02x%02x%02x%02x%02x%02x:\n", + ha->host_no, + fcport->port_name[0], fcport->port_name[1], + fcport->port_name[2], fcport->port_name[3], + fcport->port_name[4], fcport->port_name[5], + fcport->port_name[6], fcport->port_name[7])); + DEBUG3(qla2x00_dump_buffer((uint8_t *)&fcport->lun_mask, + sizeof(lun_bit_mask_t));) + } +} + +/* + * qla2x00_bstr_to_hex + * Convert hex byte string to number. + * + * Input: + * s = byte string pointer. + * bp = byte pointer for number. + * size = number of bytes. + * + * Context: + * Kernel/Interrupt context. + */ +static int +qla2x00_bstr_to_hex(char *s, uint8_t *bp, int size) +{ + int cnt; + uint8_t n; + + for (cnt = 0; *s != '\0' && cnt / 2 < size; cnt++) { + if (*s >= 'A' && *s <= 'F') { + n = (*s++ - 'A') + 10; + } else if (*s >= 'a' && *s <= 'f') { + n = (*s++ - 'a') + 10; + } else if (*s >= '0' && *s <= '9') { + n = *s++ - '0'; + } else { + cnt = 0; + break; + } + + if (cnt & BIT_0) + *bp++ |= n; + else + *bp = n << 4; + } + + /* fixme(dg) Need to swap data little endian */ + + return (cnt / 2); +} + +/* + * qla2x00_get_prop_xstr + * Get a string property value for the specified property name and + * convert from the property string found in the configuration file, + * which are ASCII characters representing nibbles, 2 characters represent + * the hexdecimal value for a byte in the byte array. + * The byte array is initialized to zero. + * The resulting converted value is in big endian format (MSB at byte0). + * + * Input: + * ha = adapter state pointer. + * propname = property name pointer. + * propval = pointer where to store converted property val. + * size = max or expected size of 'propval' array. + * + * Returns: + * 0 = empty value string or invalid character in string + * >0 = count of characters converted + * -1 = property not found + * + * Context: + * Kernel context. + */ +int +qla2x00_get_prop_xstr(scsi_qla_host_t *ha, + char *propname, uint8_t *propval, int size) +{ + char *propstr; + int rval = -1; + static char buf[LINESIZE]; + + /* Get the requested property string */ + rval = qla2x00_find_propname(ha, propname, buf, ha->cmdline, size*2); + DEBUG3(printk("%s(): Ret rval from find propname = %d\n", + __func__, + rval);) + + propstr = &buf[0]; + if (*propstr == '=') + propstr++; /* ignore equal sign */ + + if (rval == 0) { /* not found */ + LEAVE(__func__); + return (-1); + } + + rval = qla2x00_bstr_to_hex(propstr, (uint8_t *)propval, size); + if (rval == 0) { + /* Invalid character in value string */ + qla_printk(KERN_INFO, ha, + "%s(): %s Invalid hex string for property\n", + __func__, + propname); + qla_printk(KERN_INFO, ha, + " Invalid string - %s\n", + propstr); + } + + return (rval); +} + +/* + * qla2x00_find_propname + * Get property in database. + * + * Input: + * ha = adapter structure pointer. + * db = pointer to database + * propstr = pointer to dest array for string + * propname = name of property to search for. + * siz = size of property + * + * Returns: + * 0 = no property + * size = index of property + * + * Context: + * Kernel context. + */ +static int +qla2x00_find_propname(scsi_qla_host_t *ha, + char *propname, char *propstr, + char *db, int siz) +{ + char *cp; + + /* find the specified string */ + if (db) { + /* find the property name */ + if ((cp = strstr(db,propname)) != NULL) { + while ((*cp) && *cp != '=') + cp++; + if (*cp) { + strncpy(propstr, cp, siz+1); + propstr[siz+1] = '\0'; + DEBUG(printk("qla2x00_find_propname: found " + "property = {%s}\n", + propstr);) + return (siz); /* match */ + } + } + } + + return (0); +} + + +/* + * qla2x00_get_prop_16chars + * Get an 8-byte property value for the specified property name by + * converting from the property string found in the configuration file. + * The resulting converted value is in big endian format (MSB at byte0). + * + * Input: + * ha = adapter state pointer. + * propname = property name pointer. + * propval = pointer to location for the converted property val. + * db = pointer to database + * + * Returns: + * 0 = value returned successfully. + * + * Context: + * Kernel context. + */ +static int +qla2x00_get_prop_16chars(scsi_qla_host_t *ha, + char *propname, char *propval, char *db) +{ + char *propstr; + int i, k; + int rval; + uint8_t nval; + uint8_t *pchar; + uint8_t *ret_byte; + uint8_t *tmp_byte; + uint8_t *retval = (uint8_t*)propval; + uint8_t tmpval[8] = {0, 0, 0, 0, 0, 0, 0, 0}; + uint16_t max_byte_cnt = 8; /* 16 chars = 8 bytes */ + uint16_t max_strlen = 16; + static char buf[LINESIZE]; + + rval = qla2x00_find_propname(ha, propname, buf, db, max_strlen); + + propstr = &buf[0]; + if (*propstr == '=') + propstr++; /* ignore equal sign */ + + if (rval == 0) { + return (1); + } + + /* Convert string to numbers. */ + pchar = (uint8_t *)propstr; + tmp_byte = (uint8_t *)tmpval; + + rval = 0; + for (i = 0; i < max_strlen; i++) { + /* + * Check for invalid character, two at a time, + * then convert them starting with first byte. + */ + + if ((pchar[i] >= '0') && (pchar[i] <= '9')) { + nval = pchar[i] - '0'; + } else if ((pchar[i] >= 'A') && (pchar[i] <= 'F')) { + nval = pchar[i] - 'A' + 10; + } else if ((pchar[i] >= 'a') && (pchar[i] <= 'f')) { + nval = pchar[i] - 'a' + 10; + } else { + /* invalid character */ + rval = 1; + break; + } + + if (i & BIT_0) { + *tmp_byte = *tmp_byte | nval; + tmp_byte++; + } else { + *tmp_byte = *tmp_byte | nval << 4; + } + } + + if (rval != 0) { + /* Encountered invalid character. */ + return (rval); + } + + /* Copy over the converted value. */ + ret_byte = retval; + tmp_byte = tmpval; + + i = max_byte_cnt; + k = 0; + while (i--) { + *ret_byte++ = *tmp_byte++; + } + + /* big endian retval[0]; */ + return (0); +} + +/* +* qla2x00_get_properties +* Find all properties for the specified adapeter in +* command line. +* +* Input: +* ha = adapter block pointer. +* cmdline = pointer to command line string +* +* Context: +* Kernel context. +*/ +static void +qla2x00_get_properties(scsi_qla_host_t *ha, char *cmdline) +{ + int rval; + static char propbuf[LINESIZE]; + uint8_t fc_name[8]; + + /* Adapter FC node names. */ + sprintf(propbuf, "scsi-qla%d-adapter-node", (int) ha->instance); + rval = qla2x00_get_prop_16chars(ha, propbuf, fc_name, cmdline); + if (rval == QLA_SUCCESS) + memcpy(ha->init_cb->node_name, fc_name, WWN_SIZE); + + /* DG 04/07 check portname of adapter */ + sprintf(propbuf, "scsi-qla%d-adapter-port", (int)ha->instance); + rval = qla2x00_get_prop_16chars(ha, propbuf, fc_name, cmdline); + if (rval == QLA_SUCCESS && + memcmp(ha->init_cb->port_name, fc_name, WWN_SIZE)) { + /* + * Adapter port name is WWN, and cannot be changed. + * Inform users of the mismatch, then just continue driver + * loading using the original adapter port name in NVRAM. + */ + qla_printk(KERN_WARNING, ha, + "Found mismatch in adapter port names.\n"); + qla_printk(KERN_INFO, ha, + " qla%ld port name found in NVRAM -> " + "%02x%02x%02x%02x%02x%02x%02x%02x\n", + ha->instance, + ha->init_cb->port_name[0], + ha->init_cb->port_name[1], + ha->init_cb->port_name[2], + ha->init_cb->port_name[3], + ha->init_cb->port_name[4], + ha->init_cb->port_name[5], + ha->init_cb->port_name[6], + ha->init_cb->port_name[7]); + qla_printk(KERN_INFO, ha, + " qla%ld port name found on command line -> " + "%02x%02x%02x%02x%02x%02x%02x%02x\n", + ha->instance, + fc_name[0], fc_name[1], fc_name[2], fc_name[3], + fc_name[4], fc_name[5], fc_name[6], fc_name[7]); + qla_printk(KERN_INFO, ha, + " Using port name from NVRAM.\n"); + } + + qla2x00_cfg_persistent_binding(ha); +} + +/* + * qla2x00_cfg_persistent_binding + * Get driver configuration file target persistent binding entries. + * + * Input: + * ha = adapter block pointer. + * + * Context: + * Kernel context. + */ +static void +qla2x00_cfg_persistent_binding(scsi_qla_host_t *ha) +{ + int rval; + static char propbuf[LINESIZE]; + char *cmdline = ha->cmdline; + uint16_t tgt; + port_id_t d_id; + uint8_t portid[3]; + uint8_t port_name[8]; + + for (tgt = 0; tgt < MAX_TARGETS; tgt++) { + if (ha->binding_type == BIND_BY_PORT_ID) { + sprintf(propbuf, "scsi-qla%d-tgt-%d-di-0-pid", + (int)ha->instance, tgt); + rval = qla2x00_get_prop_xstr(ha, + propbuf, portid, sizeof(portid)); + if (rval != sizeof(portid)) + continue; + + memset(&d_id, 0, sizeof(port_id_t)); + d_id.r.d_id[0] = portid[2]; + d_id.r.d_id[1] = portid[1]; + d_id.r.d_id[2] = portid[0]; + } else { + sprintf(propbuf, "scsi-qla%d-tgt-%d-di-0-port", + (int)ha->instance, tgt); + rval = qla2x00_get_prop_16chars(ha, + propbuf, port_name, cmdline); + if (rval != QLA_SUCCESS) + continue; + + /* Fallthru since port_name already populated */ + } + + /* + * Create target context for device. + */ + if (ha->binding_type == BIND_BY_PORT_ID) { + qla2x00_persistent_bind(ha, NULL, NULL, &d_id, tgt); + } else { + qla2x00_persistent_bind(ha, NULL, port_name, NULL, tgt); + } + } +} + +/* + * qla2x00_persistent_bind + * Allocates target and fcport. + * + * Input: + * ha: adapter state pointer. + * node_name: node name pointer. + * port_name: port name pointer. + * d_id: port ID pointer. + * tgt: OS target number. + * + * Returns: + * success = target queue pointer. + * failure = NULL. + * + * Context: + * Kernel context. + */ +static os_tgt_t * +qla2x00_persistent_bind(scsi_qla_host_t *ha, uint8_t *node_name, + uint8_t *port_name, port_id_t *d_id, uint16_t tgt) +{ + os_tgt_t *tq; + uint16_t tgt2; + + /* + * Check for duplicates. + */ + for (tgt2 = 0; tgt2 < MAX_TARGETS; tgt2++) { + if ((tq = TGT_Q(ha, tgt2)) == NULL) { + continue; + } + + if (ha->binding_type == BIND_BY_PORT_ID) { + if (tq->d_id.b24 != d_id->b24) { + continue; + } + } else if (memcmp(tq->port_name, port_name, WWN_SIZE) != 0) { + continue; + } + + qla_printk(KERN_WARNING, ha, + "Duplicate persistent bindings found for " + "WWPN: %02x%02x%02x%02x%02x%02x%02x%02x.\n", + port_name[0], port_name[1], port_name[2], port_name[3], + port_name[4], port_name[5], port_name[6], port_name[7]); + + return (tq); + } + + tq = qla2x00_tgt_alloc(ha, tgt); + if (tq == NULL) { + return (NULL); + } + + if (node_name != NULL) { + memcpy(tq->node_name, node_name, WWN_SIZE); + } + if (port_name != NULL) { + memcpy(tq->port_name, port_name, WWN_SIZE); + } + if (d_id != NULL) { + tq->d_id.b24 = d_id->b24; + } + + return (tq); +} + +/* +* qla2x00_abort_isp +* Resets ISP and aborts all outstanding commands. +* +* Input: +* ha = adapter block pointer. +* +* Returns: +* 0 = success +*/ +int +qla2x00_abort_isp(scsi_qla_host_t *ha) +{ + unsigned long flags = 0; + uint16_t cnt; + srb_t *sp; + uint8_t status = 0; + + ENTER("qla2x00_abort_isp"); + + if (ha->flags.online) { + ha->flags.online = FALSE; + clear_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + qla2x00_stats.ispAbort++; + ha->total_isp_aborts++; /* used by ioctl */ + ha->sns_retry_cnt = 0; + + qla_printk(KERN_INFO, ha, + "Performing ISP error recovery - ha= %p.\n", ha); + qla2x00_reset_chip(ha); + + if (ha->loop_state != LOOP_DOWN) { + ha->loop_state = LOOP_DOWN; + atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); + qla2x00_mark_all_devices_lost(ha); + } + + spin_lock_irqsave(&ha->hardware_lock, flags); + /* Requeue all commands in outstanding command list. */ + for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) { + sp = ha->outstanding_cmds[cnt]; + if (sp) { + ha->outstanding_cmds[cnt] = 0; + if (ha->actthreads) + ha->actthreads--; + sp->lun_queue->out_cnt--; + sp->flags = 0; + + /* + * Set the cmd host_byte status depending on + * whether the scsi_error_handler is + * active or not. + */ + if (ha->host->eh_active != EH_ACTIVE) { + sp->cmd->result = DID_BUS_BUSY << 16; + } else { + sp->cmd->result = DID_RESET << 16; + } + sp->cmd->host_scribble = (unsigned char *)NULL; + add_to_done_queue(ha, sp); + } + } + + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + qla2x00_nvram_config(ha); + + if (!qla2x00_restart_isp(ha)) { + clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); + + if (!atomic_read(&ha->loop_down_timer)) { + /* + * Issue marker command only when we are going + * to start the I/O . + */ + ha->marker_needed = 1; + } + + ha->flags.online = TRUE; + + /* Enable ISP interrupts. */ + qla2x00_enable_intrs(ha); + + /* v2.19.5b6 Return all commands */ + qla2x00_abort_queues(ha, TRUE); + + /* Restart queues that may have been stopped. */ + qla2x00_restart_queues(ha,TRUE); + ha->isp_abort_cnt = 0; + clear_bit(ISP_ABORT_RETRY, &ha->dpc_flags); + } else { /* failed the ISP abort */ + ha->flags.online = TRUE; + if (test_bit(ISP_ABORT_RETRY, &ha->dpc_flags)) { + if (ha->isp_abort_cnt == 0) { + qla_printk(KERN_WARNING, ha, + "ISP error recovery failed - " + "board disabled\n"); + /* + * The next call disables the board + * completely. + */ + qla2x00_reset_adapter(ha); + qla2x00_abort_queues(ha, FALSE); + ha->flags.online = FALSE; + clear_bit(ISP_ABORT_RETRY, + &ha->dpc_flags); + status = 0; + } else { /* schedule another ISP abort */ + ha->isp_abort_cnt--; + DEBUG(printk("qla%ld: ISP abort - " + "retry remainning %d\n", + ha->host_no, ha->isp_abort_cnt);) + status = 1; + } + } else { + ha->isp_abort_cnt = MAX_RETRIES_OF_ISP_ABORT; + DEBUG(printk("qla2x00(%ld): ISP error recovery " + "- retrying (%d) more times\n", + ha->host_no, ha->isp_abort_cnt);) + set_bit(ISP_ABORT_RETRY, &ha->dpc_flags); + status = 1; + } + } + + } + + if (status) { + qla_printk(KERN_INFO, ha, + "qla2x00_abort_isp: **** FAILED ****\n"); + } else { + DEBUG(printk(KERN_INFO + "qla2x00_abort_isp(%ld): exiting.\n", + ha->host_no);) + } + + return(status); +} + +/* +* qla2x00_restart_isp +* restarts the ISP after a reset +* +* Input: +* ha = adapter block pointer. +* +* Returns: +* 0 = success +*/ +static int +qla2x00_restart_isp(scsi_qla_host_t *ha) +{ + uint8_t status = 0; +#if defined(ISP2300) + device_reg_t *reg; + unsigned long flags = 0; +#endif + + /* If firmware needs to be loaded */ + if (qla2x00_isp_firmware(ha)) { + ha->flags.online = FALSE; + if (!(status = qla2x00_chip_diag(ha))) { +#if defined(ISP2300) + reg = ha->iobase; + spin_lock_irqsave(&ha->hardware_lock, flags); + /* Disable SRAM, Instruction RAM and GP RAM parity. */ + WRT_REG_WORD(®->hccr, (HCCR_ENABLE_PARITY + 0x0)); + spin_unlock_irqrestore(&ha->hardware_lock, flags); +#endif + status = qla2x00_setup_chip(ha); +#if defined(ISP2300) + spin_lock_irqsave(&ha->hardware_lock, flags); + + /* Enable proper parity */ + if (ha->pdev->device == QLA2312_DEVICE_ID || + ha->pdev->device == QLA2322_DEVICE_ID) + /* SRAM, Instruction RAM and GP RAM parity */ + WRT_REG_WORD(®->hccr, + (HCCR_ENABLE_PARITY + 0x7)); + else + /* SRAM parity */ + WRT_REG_WORD(®->hccr, + (HCCR_ENABLE_PARITY + 0x1)); + + spin_unlock_irqrestore(&ha->hardware_lock, flags); +#endif + } + } + if (!status && !(status = qla2x00_init_rings(ha))) { + clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); + if (!(status = qla2x00_fw_ready(ha))) { + DEBUG(printk("%s(): Start configure loop, " + "status = %d\n", + __func__, + status);) + ha->flags.online = TRUE; + do { + clear_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags); + qla2x00_configure_loop(ha); + } while (!atomic_read(&ha->loop_down_timer) && + !(test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags)) && + (test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags))); + } + + /* if no cable then assume it's good */ + if ((ha->device_flags & DFLG_NO_CABLE)) + status = 0; + + DEBUG(printk("%s(): Configure loop done, status = 0x%x\n", + __func__, + status);) + } + return (status); +} + +/* +* qla2x00_reset_adapter +* Reset adapter. +* +* Input: +* ha = adapter block pointer. +*/ +static void +qla2x00_reset_adapter(scsi_qla_host_t *ha) +{ + unsigned long flags = 0; + device_reg_t *reg = ha->iobase; + + ENTER(__func__); + + ha->flags.online = FALSE; + qla2x00_disable_intrs(ha); + /* Reset RISC processor. */ + spin_lock_irqsave(&ha->hardware_lock, flags); + WRT_REG_WORD(®->hccr, HCCR_RESET_RISC); + WRT_REG_WORD(®->hccr, HCCR_RELEASE_RISC); + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + LEAVE(__func__); +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_inline.h 999-mjb/drivers/scsi/qla2xxx/qla_inline.h --- 000-virgin/drivers/scsi/qla2xxx/qla_inline.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_inline.h 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,330 @@ +/* + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ + + +static __inline__ uint16_t qla2x00_debounce_register(volatile uint16_t *); +/* + * qla2x00_debounce_register + * Debounce register. + * + * Input: + * port = register address. + * + * Returns: + * register value. + */ +static __inline__ uint16_t +qla2x00_debounce_register(volatile uint16_t *addr) +{ + volatile uint16_t first; + volatile uint16_t second; + + do { + first = RD_REG_WORD(addr); + barrier(); + cpu_relax(); + second = RD_REG_WORD(addr); + } while (first != second); + + return (first); +} + +static __inline__ void qla2x00_config_dma_addressing(scsi_qla_host_t *ha); + +/** + * qla2x00_config_dma_addressing() - Configure OS DMA addressing method. + * @ha: HA context + * + * At exit, the @ha's flags.enable_64bit_addressing set to indicated + * supported addressing method. + */ +static __inline__ void +qla2x00_config_dma_addressing(scsi_qla_host_t *ha) +{ + /* Assume 32bit DMA address */ + ha->flags.enable_64bit_addressing = 0; + ha->calc_request_entries = qla2x00_calc_iocbs_32; + ha->build_scsi_iocbs = qla2x00_build_scsi_iocbs_32; + + /* + * Given the two variants pci_set_dma_mask(), allow the compiler to + * assist in setting the proper dma mask. + */ + if (sizeof(dma_addr_t) > 4) { + /* Update our PCI device dma_mask for full 64 bits */ + if (pci_set_dma_mask(ha->pdev, 0xffffffffffffffffULL) == 0) { + ha->flags.enable_64bit_addressing = 1; + ha->calc_request_entries = qla2x00_calc_iocbs_64; + ha->build_scsi_iocbs = qla2x00_build_scsi_iocbs_64; + ha->host->sg_tablesize = SG_SEGMENTS_64; + } else { + printk(KERN_DEBUG + "scsi(%ld): Failed to set 64 bit PCI DMA mask, " + "falling back to 32 bit MASK.\n", ha->host_no); + pci_set_dma_mask(ha->pdev, 0xffffffff); + } + } else { + pci_set_dma_mask(ha->pdev, 0xffffffff); + } +} + + +static __inline__ int qla2x00_normalize_dma_addr( + dma_addr_t *e_addr, uint32_t *e_len, + dma_addr_t *ne_addr, uint32_t *ne_len); + +/** + * qla2x00_normalize_dma_addr() - Normalize an DMA address. + * @e_addr: Raw DMA address + * @e_len: Raw DMA length + * @ne_addr: Normalized second DMA address + * @ne_len: Normalized second DMA length + * + * If the address does not span a 4GB page boundary, the contents of @ne_addr + * and @ne_len are undefined. @e_len is updated to reflect a normalization. + * + * Example: + * + * ffffabc0ffffeeee (e_addr) start of DMA address + * 0000000020000000 (e_len) length of DMA transfer + * ffffabc11fffeeed end of DMA transfer + * + * Is the 4GB boundary crossed? + * + * ffffabc0ffffeeee (e_addr) + * ffffabc11fffeeed (e_addr + e_len - 1) + * 00000001e0000003 ((e_addr ^ (e_addr + e_len - 1)) + * 0000000100000000 ((e_addr ^ (e_addr + e_len - 1)) & ~(0xffffffff) + * + * Compute start of second DMA segment: + * + * ffffabc0ffffeeee (e_addr) + * ffffabc1ffffeeee (0x100000000 + e_addr) + * ffffabc100000000 (0x100000000 + e_addr) & ~(0xffffffff) + * ffffabc100000000 (ne_addr) + * + * Compute length of second DMA segment: + * + * 00000000ffffeeee (e_addr & 0xffffffff) + * 0000000000001112 (0x100000000 - (e_addr & 0xffffffff)) + * 000000001fffeeee (e_len - (0x100000000 - (e_addr & 0xffffffff)) + * 000000001fffeeee (ne_len) + * + * Adjust length of first DMA segment + * + * 0000000020000000 (e_len) + * 0000000000001112 (e_len - ne_len) + * 0000000000001112 (e_len) + * + * Returns non-zero if the specified address was normalized, else zero. + */ +static __inline__ int +qla2x00_normalize_dma_addr( + dma_addr_t *e_addr, uint32_t *e_len, + dma_addr_t *ne_addr, uint32_t *ne_len) +{ + int normalized; + + normalized = 0; + if ((*e_addr ^ (*e_addr + *e_len - 1)) & ~(0xFFFFFFFFULL)) { + /* Compute normalized crossed address and len */ + *ne_addr = (0x100000000ULL + *e_addr) & ~(0xFFFFFFFFULL); + *ne_len = *e_len - (0x100000000ULL - (*e_addr & 0xFFFFFFFFULL)); + *e_len -= *ne_len; + + normalized++; + } + return (normalized); +} + +static __inline__ void qla2x00_poll(scsi_qla_host_t *); +static inline void +qla2x00_poll(scsi_qla_host_t *ha) +{ + qla2x00_intr_handler(0, ha, NULL); +} + + +static __inline__ void qla2x00_enable_intrs(scsi_qla_host_t *); +static __inline__ void qla2x00_disable_intrs(scsi_qla_host_t *); + +static inline void +qla2x00_enable_intrs(scsi_qla_host_t *ha) +{ + unsigned long flags = 0; + device_reg_t *reg; + + spin_lock_irqsave(&ha->hardware_lock, flags); + reg = ha->iobase; + ha->interrupts_on = 1; + /* enable risc and host interrupts */ + WRT_REG_WORD(®->ictrl, ICR_EN_INT | ICR_EN_RISC); + CACHE_FLUSH(®->ictrl); + spin_unlock_irqrestore(&ha->hardware_lock, flags); + +} + +static inline void +qla2x00_disable_intrs(scsi_qla_host_t *ha) +{ + unsigned long flags = 0; + device_reg_t *reg; + + spin_lock_irqsave(&ha->hardware_lock, flags); + reg = ha->iobase; + ha->interrupts_on = 0; + /* disable risc and host interrupts */ + WRT_REG_WORD(®->ictrl, 0); + CACHE_FLUSH(®->ictrl); + spin_unlock_irqrestore(&ha->hardware_lock, flags); +} + + +static __inline__ int qla2x00_is_wwn_zero(uint8_t *); + +/* + * qla2x00_is_wwn_zero - Check for zero node name + * + * Input: + * wwn = Pointer to WW name to check + * + * Returns: + * TRUE if name is 0 else FALSE + * + * Context: + * Kernel context. + */ +static __inline__ int +qla2x00_is_wwn_zero(uint8_t *wwn) +{ + int cnt; + + for (cnt = 0; cnt < WWN_SIZE ; cnt++, wwn++) { + if (*wwn != 0) + break; + } + /* if zero return TRUE */ + if (cnt == WWN_SIZE) + return (1); + else + return (0); +} + +static __inline__ uint8_t +qla2x00_suspend_lun(scsi_qla_host_t *, os_lun_t *, int, int); +static __inline__ uint8_t +qla2x00_delay_lun(scsi_qla_host_t *, os_lun_t *, int); + +static __inline__ uint8_t +qla2x00_suspend_lun(scsi_qla_host_t *ha, os_lun_t *lq, int time, int count) +{ + return (__qla2x00_suspend_lun(ha, lq, time, count, 0)); +} + +static __inline__ uint8_t +qla2x00_delay_lun(scsi_qla_host_t *ha, os_lun_t *lq, int time) +{ + return (__qla2x00_suspend_lun(ha, lq, time, 1, 1)); +} + +static __inline__ void qla2x00_check_fabric_devices(scsi_qla_host_t *); +/* + * This routine will wait for fabric devices for + * the reset delay. + */ +static __inline__ void qla2x00_check_fabric_devices(scsi_qla_host_t *ha) +{ + uint16_t fw_state; + + qla2x00_get_firmware_state(ha, &fw_state); +} + +static inline void qla2x00_filter_command(scsi_qla_host_t *ha, srb_t *sp); +static inline void +qla2x00_filter_command(scsi_qla_host_t *ha, srb_t *sp) +{ + /* NOTE: 20/08/2003 + * + * The SCSI lun-scanning code in 2.6 has changed such that the + * following workaround code is no longer necessary. If the device + * returns 011b for the PQ, the mid-layer will revert to a standard + * sequential lun scan. + * + * Special case considertaion on an Inquiry command (0x12) for Lun 0, + * device responds with no devices (0x7F), then Linux will not scan + * further Luns. While reporting that some device exists on Lun 0 Linux + * will scan all devices on this target. + */ +#if 0 + struct scsi_cmnd *cp = sp->cmd; + uint8_t *strp; + + if (qla2xenbinq && cp->cmnd[0] == INQUIRY && cp->device->lun == 0) { + strp = (uint8_t *)cp->request_buffer; + if (*strp == 0x7f) { + /* Make lun unassigned and processor type */ + *strp = 0x23; + } + } +#endif +} + +static __inline__ void * qla2x00_kmem_zalloc(int, int, int); +/* + * qla2x00_kmem_zalloc + * Allocate and zero out the block of memory + */ +static __inline__ void * +qla2x00_kmem_zalloc(int siz, int code, int id) +{ + uint8_t *bp; + + if ((bp = kmalloc(siz, code)) != NULL) { + memset(bp, 0, siz); + } + + return ((void *)bp); +} + +static inline int qla2x00_issue_marker(scsi_qla_host_t *, int); +/** + * qla2x00_issue_marker() - Issue a Marker IOCB if necessary. + * @ha: HA context + * @ha_locked: is function called with the hardware lock + * + * Returns non-zero if a failure occured, else zero. + */ +static inline int +qla2x00_issue_marker(scsi_qla_host_t *ha, int ha_locked) +{ + /* Send marker if required */ + if (ha->marker_needed != 0) { + if (ha_locked) { + if (__qla2x00_marker(ha, 0, 0, MK_SYNC_ALL) != + QLA_SUCCESS) + return (QLA_FUNCTION_FAILED); + } else { + if (qla2x00_marker(ha, 0, 0, MK_SYNC_ALL) != + QLA_SUCCESS) + return (QLA_FUNCTION_FAILED); + } + ha->marker_needed = 0; + } + return (QLA_SUCCESS); +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_iocb.c 999-mjb/drivers/scsi/qla2xxx/qla_iocb.c --- 000-virgin/drivers/scsi/qla2xxx/qla_iocb.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_iocb.c 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,782 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + +#include "qla_os.h" +#include "qla_def.h" + +static inline uint16_t qla2x00_get_cmd_direction(struct scsi_cmnd *cmd); +static inline cont_entry_t *qla2x00_prep_cont_type0_iocb(scsi_qla_host_t *); +static inline cont_a64_entry_t *qla2x00_prep_cont_type1_iocb(scsi_qla_host_t *); + +/** + * qla2x00_get_cmd_direction() - Determine control_flag data direction. + * @cmd: SCSI command + * + * Returns the proper CF_* direction based on CDB. + */ +static inline uint16_t +qla2x00_get_cmd_direction(struct scsi_cmnd *cmd) +{ + uint16_t cflags; + + cflags = 0; + + /* Set transfer direction */ + if (cmd->sc_data_direction == SCSI_DATA_WRITE) + cflags = CF_WRITE; + else if (cmd->sc_data_direction == SCSI_DATA_READ) + cflags = CF_READ; + else { + switch (cmd->data_cmnd[0]) { + case WRITE_6: + case WRITE_10: + case WRITE_12: + case WRITE_BUFFER: + case WRITE_LONG: + case WRITE_SAME: + case WRITE_VERIFY: + case WRITE_VERIFY_12: + case FORMAT_UNIT: + case SEND_VOLUME_TAG: + case MODE_SELECT: + case SEND_DIAGNOSTIC: + case MODE_SELECT_10: + cflags = CF_WRITE; + break; + default: + cflags = CF_READ; + break; + } + } + return (cflags); +} + +/** + * qla2x00_calc_iocbs_32() - Determine number of Command Type 2 and + * Continuation Type 0 IOCBs to allocate. + * + * @dsds: number of data segment decriptors needed + * + * Returns the number of IOCB entries needed to store @dsds. + */ +uint16_t +qla2x00_calc_iocbs_32(uint16_t dsds) +{ + uint16_t iocbs; + + iocbs = 1; + if (dsds > 3) { + iocbs += (dsds - 3) / 7; + if ((dsds - 3) % 7) + iocbs++; + } + return (iocbs); +} + +/** + * qla2x00_calc_iocbs_64() - Determine number of Command Type 3 and + * Continuation Type 1 IOCBs to allocate. + * + * @dsds: number of data segment decriptors needed + * + * Returns the number of IOCB entries needed to store @dsds. + */ +uint16_t +qla2x00_calc_iocbs_64(uint16_t dsds) +{ + uint16_t iocbs; + + iocbs = 1; + if (dsds > 2) { + iocbs += (dsds - 2) / 5; + if ((dsds - 2) % 5) + iocbs++; + } + return (iocbs); +} + +/** + * qla2x00_prep_cont_type0_iocb() - Initialize a Continuation Type 0 IOCB. + * @ha: HA context + * + * Returns a pointer to the Continuation Type 0 IOCB packet. + */ +static inline cont_entry_t * +qla2x00_prep_cont_type0_iocb(scsi_qla_host_t *ha) +{ + cont_entry_t *cont_pkt; + + /* Adjust ring index. */ + ha->req_ring_index++; + if (ha->req_ring_index == REQUEST_ENTRY_CNT) { + ha->req_ring_index = 0; + ha->request_ring_ptr = ha->request_ring; + } else { + ha->request_ring_ptr++; + } + + cont_pkt = (cont_entry_t *)ha->request_ring_ptr; + + /* Load packet defaults. */ + *((uint32_t *)(&cont_pkt->entry_type)) = + __constant_cpu_to_le32(CONTINUE_TYPE); + + return (cont_pkt); +} + +/** + * qla2x00_prep_cont_type1_iocb() - Initialize a Continuation Type 1 IOCB. + * @ha: HA context + * + * Returns a pointer to the continuation type 1 IOCB packet. + */ +static inline cont_a64_entry_t * +qla2x00_prep_cont_type1_iocb(scsi_qla_host_t *ha) +{ + cont_a64_entry_t *cont_pkt; + + /* Adjust ring index. */ + ha->req_ring_index++; + if (ha->req_ring_index == REQUEST_ENTRY_CNT) { + ha->req_ring_index = 0; + ha->request_ring_ptr = ha->request_ring; + } else { + ha->request_ring_ptr++; + } + + cont_pkt = (cont_a64_entry_t *)ha->request_ring_ptr; + + /* Load packet defaults. */ + *((uint32_t *)(&cont_pkt->entry_type)) = + __constant_cpu_to_le32(CONTINUE_A64_TYPE); + + return (cont_pkt); +} + +/** + * qla2x00_build_scsi_iocbs_32() - Build IOCB command utilizing 32bit + * capable IOCB types. + * + * @sp: SRB command to process + * @cmd_pkt: Command type 2 IOCB + * @tot_dsds: Total number of segments to transfer + */ +void qla2x00_build_scsi_iocbs_32(srb_t *sp, cmd_entry_t *cmd_pkt, + uint16_t tot_dsds) +{ + uint16_t avail_dsds; + uint32_t *cur_dsd; + scsi_qla_host_t *ha; + struct scsi_cmnd *cmd; + + cmd = sp->cmd; + + /* Update entry type to indicate Command Type 2 IOCB */ + *((uint32_t *)(&cmd_pkt->entry_type)) = + __constant_cpu_to_le32(COMMAND_TYPE); + + /* No data transfer */ + if (cmd->request_bufflen == 0 || + cmd->sc_data_direction == SCSI_DATA_NONE) { + cmd_pkt->byte_count = __constant_cpu_to_le32(0); + return; + } + + ha = sp->ha; + + cmd_pkt->control_flags |= cpu_to_le16(qla2x00_get_cmd_direction(cmd)); + + /* Three DSDs are available in the Command Type 2 IOCB */ + avail_dsds = 3; + cur_dsd = (uint32_t *)&cmd_pkt->dseg_0_address; + + /* Load data segments */ + if (cmd->use_sg != 0) { + struct scatterlist *cur_seg; + struct scatterlist *end_seg; + + cur_seg = (struct scatterlist *)cmd->request_buffer; + end_seg = cur_seg + tot_dsds; + while (cur_seg < end_seg) { + cont_entry_t *cont_pkt; + + /* Allocate additional continuation packets? */ + if (avail_dsds == 0) { + /* + * Seven DSDs are available in the Continuation + * Type 0 IOCB. + */ + cont_pkt = qla2x00_prep_cont_type0_iocb(ha); + cur_dsd = (uint32_t *)&cont_pkt->dseg_0_address; + avail_dsds = 7; + } + + *cur_dsd++ = cpu_to_le32(sg_dma_address(cur_seg)); + *cur_dsd++ = cpu_to_le32(sg_dma_len(cur_seg)); + avail_dsds--; + + cur_seg++; + } + } else { + dma_addr_t req_dma; + struct page *page; + unsigned long offset; + + page = virt_to_page(cmd->request_buffer); + offset = ((unsigned long)cmd->request_buffer & ~PAGE_MASK); + req_dma = pci_map_page(ha->pdev, page, offset, + cmd->request_bufflen, + scsi_to_pci_dma_dir(cmd->sc_data_direction)); + + sp->dma_handle = req_dma; + + *cur_dsd++ = cpu_to_le32(req_dma); + *cur_dsd++ = cpu_to_le32(cmd->request_bufflen); + } +} + +/** + * qla2x00_build_scsi_iocbs_64() - Build IOCB command utilizing 64bit + * capable IOCB types. + * + * @sp: SRB command to process + * @cmd_pkt: Command type 3 IOCB + * @tot_dsds: Total number of segments to transfer + */ +void qla2x00_build_scsi_iocbs_64(srb_t *sp, cmd_entry_t *cmd_pkt, + uint16_t tot_dsds) +{ + uint16_t avail_dsds; + uint32_t *cur_dsd; + scsi_qla_host_t *ha; + struct scsi_cmnd *cmd; + + cmd = sp->cmd; + + /* Update entry type to indicate Command Type 3 IOCB */ + *((uint32_t *)(&cmd_pkt->entry_type)) = + __constant_cpu_to_le32(COMMAND_A64_TYPE); + + /* No data transfer */ + if (cmd->request_bufflen == 0 || + cmd->sc_data_direction == SCSI_DATA_NONE) { + cmd_pkt->byte_count = __constant_cpu_to_le32(0); + return; + } + + ha = sp->ha; + + cmd_pkt->control_flags |= cpu_to_le16(qla2x00_get_cmd_direction(cmd)); + + /* Two DSDs are available in the Command Type 3 IOCB */ + avail_dsds = 2; + cur_dsd = (uint32_t *)&cmd_pkt->dseg_0_address; + + /* Load data segments */ + if (cmd->use_sg != 0) { + struct scatterlist *cur_seg; + struct scatterlist *end_seg; + + cur_seg = (struct scatterlist *)cmd->request_buffer; + end_seg = cur_seg + tot_dsds; + while (cur_seg < end_seg) { + dma_addr_t sle_dma; + cont_a64_entry_t *cont_pkt; + + /* Allocate additional continuation packets? */ + if (avail_dsds == 0) { + /* + * Five DSDs are available in the Continuation + * Type 1 IOCB. + */ + cont_pkt = qla2x00_prep_cont_type1_iocb(ha); + cur_dsd = (uint32_t *)cont_pkt->dseg_0_address; + avail_dsds = 5; + } + + sle_dma = sg_dma_address(cur_seg); + *cur_dsd++ = cpu_to_le32(LSD(sle_dma)); + *cur_dsd++ = cpu_to_le32(MSD(sle_dma)); + *cur_dsd++ = cpu_to_le32(sg_dma_len(cur_seg)); + avail_dsds--; + + cur_seg++; + } + } else { + dma_addr_t req_dma; + struct page *page; + unsigned long offset; + + page = virt_to_page(cmd->request_buffer); + offset = ((unsigned long)cmd->request_buffer & ~PAGE_MASK); + req_dma = pci_map_page(ha->pdev, page, offset, + cmd->request_bufflen, + scsi_to_pci_dma_dir(cmd->sc_data_direction)); + + sp->dma_handle = req_dma; + + *cur_dsd++ = cpu_to_le32(LSD(req_dma)); + *cur_dsd++ = cpu_to_le32(MSD(req_dma)); + *cur_dsd++ = cpu_to_le32(cmd->request_bufflen); + } +} + +/** + * qla2x00_start_scsi() - Send a SCSI command to the ISP + * @sp: command to send to the ISP + * + * Returns non-zero if a failure occured, else zero. + */ +int +qla2x00_start_scsi(srb_t *sp) +{ + int ret; + unsigned long flags; + scsi_qla_host_t *ha; + fc_lun_t *fclun; + struct scsi_cmnd *cmd; + uint32_t *clr_ptr; + uint32_t index; + uint32_t handle; + uint16_t cnt, tot_dsds, req_cnt; + cmd_entry_t *cmd_pkt; + uint32_t timeout; + struct scatterlist *sg; + + device_reg_t *reg; + uint16_t reg_flushed; + + /* Setup device pointers. */ + ret = 0; + fclun = sp->lun_queue->fclun; + ha = fclun->fcport->ha; + cmd = sp->cmd; + reg = ha->iobase; + + /* Send marker if required */ + if (ha->marker_needed != 0) { + if (qla2x00_marker(ha, 0, 0, MK_SYNC_ALL) != QLA_SUCCESS) { + return (QLA_FUNCTION_FAILED); + } + ha->marker_needed = 0; + } + + /* Calculate number of segments and entries required */ + tot_dsds = 0; + if (cmd->use_sg) { + sg = (struct scatterlist *) cmd->request_buffer; + tot_dsds = pci_map_sg(ha->pdev, sg, cmd->use_sg, + scsi_to_pci_dma_dir(cmd->sc_data_direction)); + } else if (cmd->request_bufflen) { /* Single segment transfer */ + tot_dsds++; + } + req_cnt = (ha->calc_request_entries)(tot_dsds); + + /* Acquire ring specific lock */ + spin_lock_irqsave(&ha->hardware_lock, flags); + + if (ha->req_q_cnt < (req_cnt + 2)) { + /* Calculate number of free request entries */ + cnt = RD_REG_WORD(ISP_REQ_Q_OUT(reg)); + if (ha->req_ring_index < cnt) + ha->req_q_cnt = cnt - ha->req_ring_index; + else + ha->req_q_cnt = REQUEST_ENTRY_CNT - + (ha->req_ring_index - cnt); + } + + /* If no room for request in request ring */ + if (ha->req_q_cnt < (req_cnt + 2)) { + DEBUG5(printk("scsi(%ld): in-ptr=%x req_q_cnt=%x " + "tot_dsds=%x.\n", + ha->host_no, ha->req_ring_index, ha->req_q_cnt, tot_dsds)); + + goto queuing_error; + } + + /* Check for room in outstanding command list. */ + handle = ha->current_outstanding_cmd; + for (index = 1; index < MAX_OUTSTANDING_COMMANDS; index++) { + handle++; + if (handle == MAX_OUTSTANDING_COMMANDS) + handle = 1; + if (ha->outstanding_cmds[handle] == 0) { + ha->current_outstanding_cmd = handle; + break; + } + } + if (index == MAX_OUTSTANDING_COMMANDS) { + DEBUG5(printk("scsi(%ld): Unable to queue command -- NO ROOM " + "IN OUTSTANDING ARRAY (req_q_cnt=%x).\n", + ha->host_no, ha->req_q_cnt)); + goto queuing_error; + } + + /* Build command packet */ + ha->outstanding_cmds[handle] = sp; + sp->ha = ha; + sp->cmd->host_scribble = (unsigned char *)(unsigned long)handle; + ha->req_q_cnt -= req_cnt; + + cmd_pkt = (cmd_entry_t *)ha->request_ring_ptr; + cmd_pkt->handle = handle; + /* Zero out remaining portion of packet. */ + clr_ptr = (uint32_t *)cmd_pkt + 2; + memset(clr_ptr, 0, REQUEST_ENTRY_SIZE - 8); + cmd_pkt->dseg_count = cpu_to_le16(tot_dsds); + + /* Set target ID */ +#if defined(EXTENDED_IDS) + cmd_pkt->target = cpu_to_le16(fclun->fcport->loop_id); +#else + cmd_pkt->target = (uint8_t)fclun->fcport->loop_id; +#endif + + /* Set LUN number*/ + cmd_pkt->lun = cpu_to_le16(fclun->lun); + + /* Update tagged queuing modifier */ + cmd_pkt->control_flags = __constant_cpu_to_le16(CF_SIMPLE_TAG); + if (cmd->device->tagged_supported) { + switch (cmd->tag) { + case HEAD_OF_QUEUE_TAG: + cmd_pkt->control_flags = + __constant_cpu_to_le16(CF_HEAD_TAG); + break; + case ORDERED_QUEUE_TAG: + cmd_pkt->control_flags = + __constant_cpu_to_le16(CF_ORDERED_TAG); + break; + } + } + + /* + * Allocate at least 5 (+ QLA_CMD_TIMER_DELTA) seconds for RISC timeout. + */ + timeout = (uint32_t)(cmd->timeout_per_command / HZ); + if (timeout > 65535) + cmd_pkt->timeout = __constant_cpu_to_le16(0); + else if (timeout > 25) + cmd_pkt->timeout = cpu_to_le16((uint16_t)timeout - + (5 + QLA_CMD_TIMER_DELTA)); + else + cmd_pkt->timeout = cpu_to_le16((uint16_t)timeout); + + /* Load SCSI command packet. */ + memcpy(cmd_pkt->scsi_cdb, cmd->cmnd, cmd->cmd_len); + cmd_pkt->byte_count = cpu_to_le32((uint32_t)cmd->request_bufflen); + + /* Build IOCB segments */ + (ha->build_scsi_iocbs)(sp, cmd_pkt, tot_dsds); + + /* Set total data segment count. */ + cmd_pkt->entry_count = (uint8_t)req_cnt; + + /* Adjust ring index. */ + ha->req_ring_index++; + if (ha->req_ring_index == REQUEST_ENTRY_CNT) { + ha->req_ring_index = 0; + ha->request_ring_ptr = ha->request_ring; + } else + ha->request_ring_ptr++; + + ha->actthreads++; + ha->total_ios++; + sp->lun_queue->out_cnt++; + sp->flags |= SRB_DMA_VALID; + sp->state = SRB_ACTIVE_STATE; + sp->u_start = jiffies; + + /* Set chip new ring index. */ + reg_flushed = CACHE_FLUSH(ISP_REQ_Q_IN(reg)); + WRT_REG_WORD(ISP_REQ_Q_IN(reg), ha->req_ring_index); + + spin_unlock_irqrestore(&ha->hardware_lock, flags); + return (QLA_SUCCESS); + +queuing_error: + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + if (cmd->use_sg) { + pci_unmap_sg(ha->pdev, sg, cmd->use_sg, + scsi_to_pci_dma_dir(cmd->sc_data_direction)); + } + + return (QLA_FUNCTION_FAILED); +} + +/** + * qla2x00_marker() - Send a marker IOCB to the firmware. + * @ha: HA context + * @loop_id: loop ID + * @lun: LUN + * @type: marker modifier + * + * Can be called from both normal and interrupt context. + * + * Returns non-zero if a failure occured, else zero. + */ +int +__qla2x00_marker(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun, + uint8_t type) +{ + mrk_entry_t *pkt; + + ENTER(__func__); + + pkt = (mrk_entry_t *)qla2x00_req_pkt(ha); + if (pkt == NULL) { + DEBUG2_3(printk("%s(): **** FAILED ****\n", __func__)); + + return (QLA_FUNCTION_FAILED); + } + + pkt->entry_type = MARKER_TYPE; + pkt->modifier = type; + + if (type != MK_SYNC_ALL) { + pkt->lun = cpu_to_le16(lun); +#if defined(EXTENDED_IDS) + pkt->target = cpu_to_le16(loop_id); +#else + pkt->target = (uint8_t)loop_id; +#endif + } + + /* Issue command to ISP */ + qla2x00_isp_cmd(ha); + + LEAVE(__func__); + + return (QLA_SUCCESS); +} + +int +qla2x00_marker(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun, + uint8_t type) +{ + int ret; + unsigned long flags = 0; + + spin_lock_irqsave(&ha->hardware_lock, flags); + ret = __qla2x00_marker(ha, loop_id, lun, type); + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + return (ret); +} + +/** + * qla2x00_req_pkt() - Retrieve a request packet from the request ring. + * @ha: HA context + * + * Note: The caller must hold the hardware lock before calling this routine. + * + * Returns NULL if function failed, else, a pointer to the request packet. + */ +request_t * +qla2x00_req_pkt(scsi_qla_host_t *ha) +{ + device_reg_t *reg = ha->iobase; + request_t *pkt = NULL; + uint16_t cnt; + uint32_t *dword_ptr; + uint32_t timer; + uint16_t req_cnt = 1; + + ENTER(__func__); + + /* Wait 1 second for slot. */ + for (timer = HZ; timer; timer--) { + if ((req_cnt + 2) >= ha->req_q_cnt) { + /* Calculate number of free request entries. */ + cnt = qla2x00_debounce_register(ISP_REQ_Q_OUT(reg)); + if (ha->req_ring_index < cnt) + ha->req_q_cnt = cnt - ha->req_ring_index; + else + ha->req_q_cnt = REQUEST_ENTRY_CNT - + (ha->req_ring_index - cnt); + } + /* If room for request in request ring. */ + if ((req_cnt + 2) < ha->req_q_cnt) { + ha->req_q_cnt--; + pkt = ha->request_ring_ptr; + + /* Zero out packet. */ + dword_ptr = (uint32_t *)pkt; + for (cnt = 0; cnt < REQUEST_ENTRY_SIZE / 4; cnt++) + *dword_ptr++ = 0; + + /* Set system defined field. */ + pkt->sys_define = (uint8_t)ha->req_ring_index; + + /* Set entry count. */ + pkt->entry_count = 1; + + break; + } + + /* Release ring specific lock */ + spin_unlock(&ha->hardware_lock); + + udelay(2); /* 2 us */ + + /* Check for pending interrupts. */ + /* During init we issue marker directly */ + if (!ha->marker_needed) + qla2x00_poll(ha); + + spin_lock_irq(&ha->hardware_lock); + } + if (!pkt) { + DEBUG2_3(printk("%s(): **** FAILED ****\n", __func__)); + } + + LEAVE(__func__); + + return (pkt); +} + +/** + * qla2x00_ms_req_pkt() - Retrieve a Management Server request packet from + * the request ring. + * @ha: HA context + * @sp: pointer to handle post function call + * + * Note: The caller must hold the hardware lock before calling this routine. + * + * Returns NULL if function failed, else, a pointer to the request packet. + */ +request_t * +qla2x00_ms_req_pkt(scsi_qla_host_t *ha, srb_t *sp) +{ + device_reg_t *reg = ha->iobase; + request_t *pkt = NULL; + uint16_t cnt, i, index; + uint32_t *dword_ptr; + uint32_t timer; + uint8_t found = 0; + uint16_t req_cnt = 1; + + ENTER(__func__); + + /* Wait 1 second for slot. */ + for (timer = HZ; timer; timer--) { + if ((req_cnt + 2) >= ha->req_q_cnt) { + /* Calculate number of free request entries. */ + cnt = qla2x00_debounce_register(ISP_REQ_Q_OUT(reg)); + if (ha->req_ring_index < cnt) { + ha->req_q_cnt = cnt - ha->req_ring_index; + } else { + ha->req_q_cnt = REQUEST_ENTRY_CNT - + (ha->req_ring_index - cnt); + } + } + + /* Check for room in outstanding command list. */ + cnt = ha->current_outstanding_cmd; + for (index = 1; index < MAX_OUTSTANDING_COMMANDS; index++) { + cnt++; + if (cnt == MAX_OUTSTANDING_COMMANDS) + cnt = 1; + + if (ha->outstanding_cmds[cnt] == 0) { + found = 1; + ha->current_outstanding_cmd = cnt; + break; + } + } + + /* If room for request in request ring. */ + if (found && (req_cnt + 2) < ha->req_q_cnt) { + pkt = ha->request_ring_ptr; + + /* Zero out packet. */ + dword_ptr = (uint32_t *)pkt; + for (i = 0; i < REQUEST_ENTRY_SIZE / 4; i++ ) + *dword_ptr++ = 0; + + DEBUG5(printk("%s(): putting sp=%p in " + "outstanding_cmds[%x]\n", + __func__, + sp, cnt)); + + ha->outstanding_cmds[cnt] = sp; + + /* save the handle */ + sp->cmd->host_scribble = (unsigned char *) (u_long) cnt; + CMD_SP(sp->cmd) = (void *)sp; + + ha->req_q_cnt--; + pkt->handle = (uint32_t)cnt; + + /* Set system defined field. */ + pkt->sys_define = (uint8_t)ha->req_ring_index; + pkt->entry_status = 0; + + break; + } + + /* Release ring specific lock */ + spin_unlock(&ha->hardware_lock); + udelay(20); + + /* Check for pending interrupts. */ + qla2x00_poll(ha); + + spin_lock_irq(&ha->hardware_lock); + } + if (!pkt) { + DEBUG2_3(printk("%s(): **** FAILED ****\n", __func__)); + } + + LEAVE(__func__); + + return (pkt); +} + +/** + * qla2x00_isp_cmd() - Modify the request ring pointer. + * @ha: HA context + * + * Note: The caller must hold the hardware lock before calling this routine. + */ +void +qla2x00_isp_cmd(scsi_qla_host_t *ha) +{ + device_reg_t *reg = ha->iobase; + + ENTER(__func__); + + DEBUG5(printk("%s(): IOCB data:\n", __func__)); + DEBUG5(qla2x00_dump_buffer( + (uint8_t *)ha->request_ring_ptr, REQUEST_ENTRY_SIZE)); + + /* Adjust ring index. */ + ha->req_ring_index++; + if (ha->req_ring_index == REQUEST_ENTRY_CNT) { + ha->req_ring_index = 0; + ha->request_ring_ptr = ha->request_ring; + } else + ha->request_ring_ptr++; + + /* Set chip new ring index. */ + WRT_REG_WORD(ISP_REQ_Q_IN(reg), ha->req_ring_index); + + LEAVE(__func__); +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_isr.c 999-mjb/drivers/scsi/qla2xxx/qla_isr.c --- 000-virgin/drivers/scsi/qla2xxx/qla_isr.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_isr.c 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,1434 @@ +/* + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ + +#include "qla_os.h" + +#include "qla_def.h" + +static void qla2x00_mbx_completion(scsi_qla_host_t *, uint16_t); +static void qla2x00_async_event(scsi_qla_host_t *, uint32_t); +static void qla2x00_process_completed_request(struct scsi_qla_host *, int); +void qla2x00_process_response_queue(struct scsi_qla_host *); +static void qla2x00_status_entry(scsi_qla_host_t *, sts_entry_t *); +static void qla2x00_status_cont_entry(scsi_qla_host_t *, sts_cont_entry_t *); +static void qla2x00_error_entry(scsi_qla_host_t *, sts_entry_t *); +static void qla2x00_ms_entry(scsi_qla_host_t *, ms_iocb_entry_t *); + +static int qla2x00_check_sense(struct scsi_cmnd *cp, os_lun_t *); + +/** + * qla2x00_intr_handler() - Process interrupts for the ISP. + * @irq: + * @dev_id: SCSI driver HA context + * @regs: + * + * Called by system whenever the host adapter generates an interrupt. + * + * Returns handled flag. + */ +irqreturn_t +qla2x00_intr_handler(int irq, void *dev_id, struct pt_regs *regs) +{ + scsi_qla_host_t *ha; + device_reg_t *reg; + uint32_t mbx; + int status = 0; + unsigned long flags = 0; + unsigned long mbx_flags = 0; + unsigned long intr_iter; +#if defined(ISP2300) + uint32_t stat; + uint16_t hccr; +#endif + + /* Don't loop forever, interrupt are OFF */ + intr_iter = 50; + + ha = (scsi_qla_host_t *) dev_id; + if (!ha) { + printk(KERN_INFO + "%s(): NULL host pointer\n", __func__); + return (IRQ_NONE); + } + + reg = ha->iobase; + + spin_lock_irqsave(&ha->hardware_lock, flags); + + for (;;) { + /* Relax CPU! */ + if (!(intr_iter--)) + break; + +#if defined(ISP2100) || defined(ISP2200) + if ((RD_REG_WORD(®->istatus) & ISR_RISC_INT) == 0) { + break; + } + + if (RD_REG_WORD(®->semaphore) & BIT_0) { + WRT_REG_WORD(®->hccr, HCCR_CLR_RISC_INT); + + /* Get mailbox data. */ + mbx = RD_REG_WORD(®->mailbox0); + if (mbx > 0x3fff && mbx < 0x8000) { + qla2x00_mbx_completion(ha, (uint16_t)mbx); + status |= MBX_INTERRUPT; + } else if (mbx > 0x7fff && mbx < 0xc000) { + qla2x00_async_event(ha, mbx); + } else { + /*EMPTY*/ + DEBUG2(printk("scsi(%ld): Unrecognized " + "interrupt type (%d)\n", + ha->host_no, mbx)); + } + /* Release mailbox registers. */ + WRT_REG_WORD(®->semaphore, 0); + } else { + qla2x00_process_response_queue(ha); + + WRT_REG_WORD(®->hccr, HCCR_CLR_RISC_INT); + } + +#else /* ISP2300 */ + stat = RD_REG_DWORD(®->host_status); + if ((stat & HSR_RISC_INT) == 0) { + break; + } + + mbx = MSW(stat); + switch (stat & 0xff) { + case 0x13: + qla2x00_process_response_queue(ha); + break; + case 0x1: + case 0x2: + case 0x10: + case 0x11: + qla2x00_mbx_completion(ha, (uint16_t)mbx); + status |= MBX_INTERRUPT; + + /* Release mailbox registers. */ + WRT_REG_WORD(®->semaphore, 0); + break; + case 0x12: + qla2x00_async_event(ha, mbx); + break; + case 0x15: + mbx = mbx << 16 | MBA_CMPLT_1_16BIT; + qla2x00_async_event(ha, mbx); + break; + case 0x16: + mbx = mbx << 16 | MBA_SCSI_COMPLETION; + qla2x00_async_event(ha, mbx); + break; + default: + hccr = RD_REG_WORD(®->hccr); + if (hccr & HCCR_RISC_PAUSE) { + qla_printk(KERN_INFO, ha, + "RISC paused, dumping HCCR=%x\n", hccr); + + /* + * Issue a "HARD" reset in order for the RISC + * interrupt bit to be cleared. Schedule a big + * hammmer to get out of the RISC PAUSED state. + */ + WRT_REG_WORD(®->hccr, HCCR_RESET_RISC); + set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + break; + } else { + DEBUG2(printk("scsi(%ld): Unrecognized " + "interrupt type (%d)\n", + ha->host_no, stat & 0xff)); + } + break; + } + + WRT_REG_WORD(®->hccr, HCCR_CLR_RISC_INT); +#endif + } + + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + qla2x00_next(ha); + ha->last_irq_cpu = smp_processor_id(); + ha->total_isr_cnt++; + + if (test_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags) && + (status & MBX_INTERRUPT) && ha->flags.mbox_int) { + + /* There was a mailbox completion */ + DEBUG3(printk("%s(%ld): Going to get mbx reg lock.\n", + __func__, ha->host_no)); + + QLA_MBX_REG_LOCK(ha); + + if (ha->mcp == NULL) { + DEBUG3(printk("%s(%ld): Error mbx pointer.\n", + __func__, ha->host_no)); + } else { + DEBUG3(printk("%s(%ld): Going to set mbx intr flags. " + "cmd=%x.\n", + __func__, ha->host_no, ha->mcp->mb[0])); + } + set_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); + + DEBUG3(printk("%s(%ld): Going to wake up mbx function for " + "completion.\n", + __func__, ha->host_no)); + + up(&ha->mbx_intr_sem); + + DEBUG3(printk("%s(%ld): Going to release mbx reg lock.\n", + __func__, ha->host_no)); + QLA_MBX_REG_UNLOCK(ha); + } + + if (!list_empty(&ha->done_queue)) + qla2x00_done(ha); + + /* Wakeup the DPC routine */ + if ((!ha->flags.mbox_busy && + (test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || + test_bit(RESET_MARKER_NEEDED, &ha->dpc_flags) || + test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags))) && + ha->dpc_wait && !ha->dpc_active) { + + up(ha->dpc_wait); + } + + return (IRQ_HANDLED); +} + +/** + * qla2x00_mbx_completion() - Process mailbox command completions. + * @ha: SCSI driver HA context + * @mb0: Mailbox0 register + */ +static void +qla2x00_mbx_completion(scsi_qla_host_t *ha, uint16_t mb0) +{ + uint16_t cnt; + uint16_t *wptr; + device_reg_t *reg = ha->iobase; + + /* Load return mailbox registers. */ + ha->flags.mbox_int = TRUE; + ha->mailbox_out[0] = mb0; + wptr = (uint16_t *)®->mailbox1; + + for (cnt = 1; cnt < MAILBOX_REGISTER_COUNT; cnt++) { +#if defined(ISP2200) + if (cnt == 8) + wptr = (uint16_t *)®->mailbox8; +#endif + if (cnt == 4 || cnt == 5) + ha->mailbox_out[cnt] = qla2x00_debounce_register(wptr); + else + ha->mailbox_out[cnt] = RD_REG_WORD(wptr); + + wptr++; + } + + if (ha->mcp) { + DEBUG3(printk("%s(%ld): Got mailbox completion. cmd=%x.\n", + __func__, ha->host_no, ha->mcp->mb[0])); + } else { + DEBUG2_3(printk("%s(%ld): MBX pointer ERROR!\n", + __func__, ha->host_no)); + } +} + +/** + * qla2x00_async_event() - Process aynchronous events. + * @ha: SCSI driver HA context + * @mb0: Mailbox0 register + */ +static void +qla2x00_async_event(scsi_qla_host_t *ha, uint32_t mbx) +{ + static char *link_speeds[5] = { "1", "2", "4", "?", "10" }; + char *link_speed; + uint16_t mb[4]; + uint16_t handle_cnt; + uint16_t cnt; + uint32_t handles[5]; + device_reg_t *reg = ha->iobase; + uint32_t rscn_entry, host_pid; + uint8_t rscn_queue_index; + + /* Setup to process RIO completion. */ + handle_cnt = 0; + mb[0] = LSW(mbx); + switch (mb[0]) { + case MBA_SCSI_COMPLETION: +#if defined(ISP2100) || defined(ISP2200) + handles[0] = RD_REG_WORD(®->mailbox1); +#else + handles[0] = MSW(mbx); +#endif + handles[0] |= (uint32_t)(RD_REG_WORD(®->mailbox2) << 16); + handle_cnt = 1; + break; + case MBA_CMPLT_1_16BIT: +#if defined(ISP2100) || defined(ISP2200) + handles[0] = (uint32_t)RD_REG_WORD(®->mailbox1); +#else + handles[0] = MSW(mbx); +#endif + handle_cnt = 1; + mb[0] = MBA_SCSI_COMPLETION; + break; + case MBA_CMPLT_2_16BIT: + handles[0] = (uint32_t)RD_REG_WORD(®->mailbox1); + handles[1] = (uint32_t)RD_REG_WORD(®->mailbox2); + handle_cnt = 2; + mb[0] = MBA_SCSI_COMPLETION; + break; + case MBA_CMPLT_3_16BIT: + handles[0] = (uint32_t)RD_REG_WORD(®->mailbox1); + handles[1] = (uint32_t)RD_REG_WORD(®->mailbox2); + handles[2] = (uint32_t)RD_REG_WORD(®->mailbox3); + handle_cnt = 3; + mb[0] = MBA_SCSI_COMPLETION; + break; + case MBA_CMPLT_4_16BIT: + handles[0] = (uint32_t)RD_REG_WORD(®->mailbox1); + handles[1] = (uint32_t)RD_REG_WORD(®->mailbox2); + handles[2] = (uint32_t)RD_REG_WORD(®->mailbox3); + handles[3] = (uint32_t)RD_REG_WORD(®->mailbox6); + handle_cnt = 4; + mb[0] = MBA_SCSI_COMPLETION; + break; + case MBA_CMPLT_5_16BIT: + handles[0] = (uint32_t)RD_REG_WORD(®->mailbox1); + handles[1] = (uint32_t)RD_REG_WORD(®->mailbox2); + handles[2] = (uint32_t)RD_REG_WORD(®->mailbox3); + handles[3] = (uint32_t)RD_REG_WORD(®->mailbox6); + handles[4] = (uint32_t)RD_REG_WORD(®->mailbox7); + handle_cnt = 5; + mb[0] = MBA_SCSI_COMPLETION; + break; + case MBA_CMPLT_2_32BIT: + handles[0] = (uint32_t)((RD_REG_WORD(®->mailbox2) << 16) | + RD_REG_WORD(®->mailbox1)); + handles[1] = (uint32_t)((RD_REG_WORD(®->mailbox7) << 16) | + RD_REG_WORD(®->mailbox6)); + handle_cnt = 2; + mb[0] = MBA_SCSI_COMPLETION; + break; + default: + break; + } + + mb[0] = LSW(mbx); + switch (mb[0]) { + case MBA_SCSI_COMPLETION: /* Fast Post */ + if (!ha->flags.online) + break; + + for (cnt = 0; cnt < handle_cnt; cnt++) + qla2x00_process_completed_request(ha, handles[cnt]); + break; + + case MBA_RESET: /* Reset */ + DEBUG2(printk("scsi(%ld): Asynchronous RESET.\n", ha->host_no)); + + set_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); + break; + + case MBA_SYSTEM_ERR: /* System Error */ + mb[1] = RD_REG_WORD(®->mailbox1); + mb[2] = RD_REG_WORD(®->mailbox2); + mb[3] = RD_REG_WORD(®->mailbox3); + + qla_printk(KERN_INFO, ha, + "ISP System Error - mbx1=%xh mbx2=%xh mbx3=%xh.\n", + mb[1], mb[2], mb[3]); + + qla2x00_fw_dump(ha, 1); + set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + break; + + case MBA_REQ_TRANSFER_ERR: /* Request Transfer Error */ + DEBUG2(printk("scsi(%ld): ISP Request Transfer Error.\n", + ha->host_no)); + qla_printk(KERN_WARNING, ha, "ISP Request Transfer Error.\n"); + + set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + break; + + case MBA_RSP_TRANSFER_ERR: /* Response Transfer Error */ + DEBUG2(printk("scsi(%ld): ISP Response Transfer Error.\n", + ha->host_no)); + qla_printk(KERN_WARNING, ha, "ISP Response Transfer Error.\n"); + + set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + break; + + case MBA_WAKEUP_THRES: /* Request Queue Wake-up */ + DEBUG2(printk("scsi(%ld): Asynchronous WAKEUP_THRES.\n", + ha->host_no)); + break; + + case MBA_LIP_OCCURRED: /* Loop Initialization Procedure */ + mb[1] = RD_REG_WORD(®->mailbox1); + + DEBUG2(printk("scsi(%ld): LIP occured (%x).\n", ha->host_no, + mb[1])); + qla_printk(KERN_INFO, ha, "LIP occured (%x).\n", mb[1]); + + if (ha->loop_state != LOOP_DOWN) { + ha->loop_state = LOOP_DOWN; + atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); + qla2x00_mark_all_devices_lost(ha); + } + + set_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags); + + ha->flags.management_server_logged_in = 0; + + /* Update AEN queue. */ + if (ha->ioctl->flags & IOCTL_AEN_TRACKING_ENABLE) { + qla2x00_enqueue_aen(ha, MBA_LIP_OCCURRED, NULL); + } + + ha->total_lip_cnt++; + break; + + case MBA_LOOP_UP: /* Loop Up Event */ + mb[1] = RD_REG_WORD(®->mailbox1); + + ha->current_speed = EXT_DEF_PORTSPEED_1GBIT; +#if defined(ISP2100) || defined(ISP2200) + link_speed = link_speeds[0]; +#elif defined(ISP2300) + link_speed = link_speeds[3]; + if (mb[1] < 5) + link_speed = link_speeds[mb[1]]; + /* Save the current speed for use by ioctl and IP driver */ + if (mb[1] == 1) + ha->current_speed = EXT_DEF_PORTSPEED_2GBIT; +#endif + DEBUG2(printk("scsi(%ld): Asynchronous LOOP UP (%s Gbps).\n", + ha->host_no, link_speed)); + qla_printk(KERN_INFO, ha, "LOOP UP detected (%s Gbps).\n", + link_speed); + + ha->flags.management_server_logged_in = 0; + + /* Update AEN queue. */ + if (ha->ioctl->flags & IOCTL_AEN_TRACKING_ENABLE) { + qla2x00_enqueue_aen(ha, MBA_LOOP_UP, NULL); + } + break; + + case MBA_LOOP_DOWN: /* Loop Down Event */ + DEBUG2(printk("scsi(%ld): Asynchronous LOOP DOWN.\n", + ha->host_no)); + qla_printk(KERN_INFO, ha, "LOOP DOWN detected.\n"); + + if (ha->loop_state != LOOP_DOWN) { + ha->loop_state = LOOP_DOWN; + atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); + qla2x00_mark_all_devices_lost(ha); + } + + ha->flags.management_server_logged_in = 0; + ha->current_speed = 0; /* reset value */ + + /* Update AEN queue. */ + if (ha->ioctl->flags & IOCTL_AEN_TRACKING_ENABLE) { + qla2x00_enqueue_aen(ha, MBA_LOOP_DOWN, NULL); + } + break; + + case MBA_LIP_RESET: /* LIP reset occurred */ + mb[1] = RD_REG_WORD(®->mailbox1); + + DEBUG2(printk("scsi(%ld): Asynchronous LIP RESET (%x).\n", + ha->host_no, mb[1])); + qla_printk(KERN_INFO, ha, + "LIP reset occured (%x).\n", mb[1]); + + if (ha->loop_state != LOOP_DOWN) { + ha->loop_state = LOOP_DOWN; + atomic_set(&ha->loop_down_timer, LOOP_DOWN_TIME); + qla2x00_mark_all_devices_lost(ha); + } + + set_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); + + ha->operating_mode = LOOP; + ha->flags.management_server_logged_in = 0; + + /* Update AEN queue. */ + if (ha->ioctl->flags & IOCTL_AEN_TRACKING_ENABLE) { + qla2x00_enqueue_aen(ha, MBA_LIP_RESET, NULL); + } + + ha->total_lip_cnt++; + break; + +#if !defined(ISP2100) + case MBA_POINT_TO_POINT: /* Point-to-Point */ + DEBUG2(printk("scsi(%ld): Asynchronous P2P MODE received.\n", + ha->host_no)); + + /* + * Until there's a transition from loop down to loop up, treat + * this as loop down only. + */ + if (ha->loop_state != LOOP_DOWN) { + ha->loop_state = LOOP_DOWN; + if (!atomic_read(&ha->loop_down_timer)) + atomic_set(&ha->loop_down_timer, + LOOP_DOWN_TIME); + qla2x00_mark_all_devices_lost(ha); + } + + if (!(test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags))) { + set_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); + } + set_bit(REGISTER_FC4_NEEDED, &ha->dpc_flags); + break; + + case MBA_CHG_IN_CONNECTION: /* Change in connection mode */ + mb[1] = RD_REG_WORD(®->mailbox1); + + DEBUG2(printk("scsi(%ld): Asynchronous Change In Connection " + "received.\n", + ha->host_no)); + qla_printk(KERN_INFO, ha, + "Configuration change detected: value=%x.\n", mb[1]); + + if (ha->loop_state != LOOP_DOWN) { + ha->loop_state = LOOP_DOWN; + if (!atomic_read(&ha->loop_down_timer)) + atomic_set(&ha->loop_down_timer, + LOOP_DOWN_TIME); + qla2x00_mark_all_devices_lost(ha); + } + + set_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags); + set_bit(LOCAL_LOOP_UPDATE, &ha->dpc_flags); + break; +#endif /* #if !defined(ISP2100) */ + + case MBA_PORT_UPDATE: /* Port database update */ + mb[1] = RD_REG_WORD(®->mailbox1); + mb[2] = RD_REG_WORD(®->mailbox2); + +#if defined(ISP2300) + /* + * If a single remote port just logged into (or logged out of) + * us, create a new entry in our rscn fcports list and handle + * the event like an RSCN. + */ + if (ha->init_done && mb[1] != 0xffff && + ((ha->operating_mode == P2P && mb[1] != 0) || + (ha->operating_mode != P2P && mb[1] != + SNS_FIRST_LOOP_ID)) && (mb[2] == 6 || mb[2] == 7)) { + int rval; + fc_port_t *rscn_fcport; + + /* Create new fcport for login. */ + rscn_fcport = qla2x00_alloc_rscn_fcport(ha, GFP_ATOMIC); + if (rscn_fcport) { + DEBUG14(printk("scsi(%ld): Port Update -- " + "creating RSCN fcport %p for login.\n", + ha->host_no, rscn_fcport)); + + rscn_fcport->loop_id = mb[1]; + rscn_fcport->d_id.b24 = INVALID_PORT_ID; + atomic_set(&rscn_fcport->state, + FCS_DEVICE_LOST); + list_add_tail(&rscn_fcport->list, + &ha->rscn_fcports); + + rval = qla2x00_handle_port_rscn(ha, 0, + rscn_fcport, 1); + if (rval == QLA_SUCCESS) + break; + } else { + DEBUG14(printk("scsi(%ld): Port Update -- " + "-- unable to allocate RSCN fcport " + "login.\n", ha->host_no)); + } + } +#endif + /* + * If PORT UPDATE is global (recieved LIP_OCCURED/LIP_RESET + * event etc. earlier indicating loop is down) then process + * it. Otherwise ignore it and Wait for RSCN to come in. + */ + if (ha->loop_state != LOOP_DOWN) { + DEBUG2(printk("scsi(%ld): Asynchronous PORT UPDATE " + "ignored.\n", ha->host_no)); + break; + } + + DEBUG2(printk("scsi(%ld): Asynchronous PORT UPDATE.\n", + ha->host_no)); + DEBUG(printk(KERN_INFO + "scsi(%ld): Port database changed %04x %04x.\n", + ha->host_no, mb[1], mb[2])); + + /* + * Mark all devices as missing so we will login again. + */ + ha->loop_state = LOOP_UP; + + atomic_set(&ha->loop_down_timer, 0); + qla2x00_mark_all_devices_lost(ha); + + ha->flags.rscn_queue_overflow = 1; + + set_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags); + set_bit(LOCAL_LOOP_UPDATE, &ha->dpc_flags); + + /* Update AEN queue. */ + if (ha->ioctl->flags & IOCTL_AEN_TRACKING_ENABLE) { + qla2x00_enqueue_aen(ha, MBA_PORT_UPDATE, NULL); + } + break; + + case MBA_RSCN_UPDATE: /* State Change Registration */ + mb[1] = RD_REG_WORD(®->mailbox1); + mb[2] = RD_REG_WORD(®->mailbox2); + + DEBUG2(printk("scsi(%ld): Asynchronous RSCR UPDATE.\n", + ha->host_no)); + DEBUG(printk(KERN_INFO + "scsi(%ld): RSCN database changed -- %04x %04x.\n", + ha->host_no, mb[1], mb[2])); + + rscn_entry = (mb[1] << 16) | mb[2]; + host_pid = (ha->d_id.b.domain << 16) | (ha->d_id.b.area << 8) | + ha->d_id.b.al_pa; + if (rscn_entry == host_pid) { + DEBUG(printk(KERN_INFO + "scsi(%ld): Ignoring RSCN update to local host " + "port ID (%06x)\n", + ha->host_no, host_pid)); + break; + } + + rscn_queue_index = ha->rscn_in_ptr + 1; + if (rscn_queue_index == MAX_RSCN_COUNT) + rscn_queue_index = 0; + if (rscn_queue_index != ha->rscn_out_ptr) { + ha->rscn_queue[ha->rscn_in_ptr] = rscn_entry; + ha->rscn_in_ptr = rscn_queue_index; + } else { + ha->flags.rscn_queue_overflow = 1; + } + + ha->loop_state = LOOP_UPDATE; + atomic_set(&ha->loop_down_timer, 0); + ha->flags.management_server_logged_in = 0; + + set_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags); + set_bit(RSCN_UPDATE, &ha->dpc_flags); + + /* Update AEN queue. */ + if (ha->ioctl->flags & IOCTL_AEN_TRACKING_ENABLE) { + qla2x00_enqueue_aen(ha, MBA_RSCN_UPDATE, &mb[0]); + } + break; + + /* case MBA_RIO_RESPONSE: */ + case MBA_ZIO_RESPONSE: + DEBUG2(printk("scsi(%ld): [R|Z]IO update completion.\n", + ha->host_no)); + DEBUG(printk(KERN_INFO + "scsi(%ld): [R|Z]IO update completion.\n", + ha->host_no)); + + qla2x00_process_response_queue(ha); + break; + } +} + +/** + * qla2x00_process_completed_request() - Process a Fast Post response. + * @ha: SCSI driver HA context + * @index: SRB index + */ +static void +qla2x00_process_completed_request(struct scsi_qla_host *ha, int index) +{ + srb_t *sp; + + /* Validate handle. */ + if (index >= MAX_OUTSTANDING_COMMANDS) { + DEBUG2(printk("scsi(%ld): Invalid SCSI completion handle %d.\n", + ha->host_no, index)); + qla_printk(KERN_WARNING, ha, + "Invalid SCSI completion handle %d.\n", index); + + set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + return; + } + + sp = ha->outstanding_cmds[index]; + if (sp) { + /* Free outstanding command slot. */ + ha->outstanding_cmds[index] = 0; + + /* Perform any post command processing */ + qla2x00_filter_command(ha, sp); + + if (ha->actthreads) + ha->actthreads--; + sp->lun_queue->out_cnt--; + CMD_COMPL_STATUS(sp->cmd) = 0L; + CMD_SCSI_STATUS(sp->cmd) = 0L; + + /* Save ISP completion status */ + sp->cmd->result = DID_OK << 16; + sp->fo_retry_cnt = 0; + add_to_done_queue(ha, sp); + } else { + DEBUG2(printk("scsi(%ld): Invalid ISP SCSI completion handle\n", + ha->host_no)); + qla_printk(KERN_WARNING, ha, + "Invalid ISP SCSI completion handle\n"); + + set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + } +} + +/** + * qla2x00_process_response_queue() - Process response queue entries. + * @ha: SCSI driver HA context + */ +void +qla2x00_process_response_queue(struct scsi_qla_host *ha) +{ + device_reg_t *reg = ha->iobase; + sts_entry_t *pkt; + + if (!ha->flags.online) + return; + + while (ha->response_ring_ptr->signature != RESPONSE_PROCESSED) { + pkt = (sts_entry_t *)ha->response_ring_ptr; + + ha->rsp_ring_index++; + if (ha->rsp_ring_index == RESPONSE_ENTRY_CNT) { + ha->rsp_ring_index = 0; + ha->response_ring_ptr = ha->response_ring; + } else { + ha->response_ring_ptr++; + } + + if (pkt->entry_status != 0) { + DEBUG3(printk(KERN_INFO + "scsi(%ld): Process error entry.\n", ha->host_no)); + + qla2x00_error_entry(ha, pkt); + ((response_t *)pkt)->signature = RESPONSE_PROCESSED; + continue; + } + + switch (pkt->entry_type) { + case STATUS_TYPE: +#if defined(ISP2100) || defined(ISP2200) + case STATUS_TYPE_21: + case STATUS_TYPE_22: +#endif + qla2x00_status_entry(ha, pkt); + break; + case STATUS_CONT_TYPE: + qla2x00_status_cont_entry(ha, (sts_cont_entry_t *)pkt); + break; + case MS_IOCB_TYPE: + qla2x00_ms_entry(ha, (ms_iocb_entry_t *)pkt); + break; +#if defined(ISP2300) + case MBX_IOCB_TYPE: + if (pkt->sys_define == SOURCE_ASYNC_IOCB) { + qla2x00_process_iodesc(ha, + (struct mbx_entry *)pkt); + } else { + /* MBX IOCB Type Not Supported. */ + DEBUG4(printk(KERN_WARNING + "scsi(%ld): Received unknown MBX IOCB " + "response pkt type=%x source=%x entry " + "status=%x.\n", ha->host_no, + pkt->entry_type, pkt->sys_define, + pkt->entry_status)); + } + break; +#endif + default: + /* Type Not Supported. */ + DEBUG4(printk(KERN_WARNING + "scsi(%ld): Received unknown response pkt type %x " + "entry status=%x.\n", + ha->host_no, pkt->entry_type, pkt->entry_status)); + break; + } + ((response_t *)pkt)->signature = RESPONSE_PROCESSED; + } + + /* Adjust ring index */ + WRT_REG_WORD(ISP_RSP_Q_OUT(reg), ha->rsp_ring_index); +} + +/** + * qla2x00_status_entry() - Process a Status IOCB entry. + * @ha: SCSI driver HA context + * @pkt: Entry pointer + */ +static void +qla2x00_status_entry(scsi_qla_host_t *ha, sts_entry_t *pkt) +{ + int ret; + unsigned b, t, l; + srb_t *sp; + os_lun_t *lq; + os_tgt_t *tq; + fc_port_t *fcport; + struct scsi_cmnd *cp; + uint16_t comp_status; + uint16_t scsi_status; + uint8_t lscsi_status; + uint32_t resid; + uint8_t sense_sz = 0; +#if defined(ISP2100) || defined(ISP2200) + uint16_t handle_cnt; + uint16_t cnt; + + switch (pkt->entry_type) { + case STATUS_TYPE_22: + handle_cnt = ((sts22_entry_t *)pkt)->handle_count; + for (cnt = 0; cnt < handle_cnt; cnt++) { + qla2x00_process_completed_request(ha, + (uint32_t)((sts22_entry_t *)pkt)->handle[cnt]); + } + return; + break; + case STATUS_TYPE_21: + handle_cnt = ((sts21_entry_t *)pkt)->handle_count; + for (cnt = 0; cnt < handle_cnt; cnt++) { + qla2x00_process_completed_request(ha, + (uint32_t)((sts21_entry_t *)pkt)->handle[cnt]); + } + return; + break; + } +#endif + + /* Fast path completion. */ + if (le16_to_cpu(pkt->comp_status) == CS_COMPLETE && + (le16_to_cpu(pkt->scsi_status) & SS_MASK) == 0) { + qla2x00_process_completed_request(ha, pkt->handle); + + return; + } + + /* Validate handle. */ + if (pkt->handle < MAX_OUTSTANDING_COMMANDS) { + sp = ha->outstanding_cmds[pkt->handle]; + ha->outstanding_cmds[pkt->handle] = 0; + } else + sp = NULL; + + if (sp == NULL) { + DEBUG2(printk("scsi(%ld): Status Entry invalid handle.\n", + ha->host_no)); + qla_printk(KERN_WARNING, ha, "Status Entry invalid handle.\n"); + + set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + if (ha->dpc_wait && !ha->dpc_active) + up(ha->dpc_wait); + + return; + } + cp = sp->cmd; + if (cp == NULL) { + DEBUG2(printk("scsi(%ld): Command already returned back to OS " + "pkt->handle=%d sp=%p sp->state:%d\n", + ha->host_no, pkt->handle, sp, sp->state)); + qla_printk(KERN_WARNING, ha, + "Command is NULL: already returned to OS (sp=%p)\n", sp); + + return; + } + + if (ha->actthreads) + ha->actthreads--; + + if (sp->lun_queue == NULL) { + DEBUG2(printk("scsi(%ld): Status Entry invalid lun pointer.\n", + ha->host_no)); + qla_printk(KERN_WARNING, ha, + "Status Entry invalid lun pointer.\n"); + + set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + if (ha->dpc_wait && !ha->dpc_active) + up(ha->dpc_wait); + + return; + } + + sp->lun_queue->out_cnt--; + + comp_status = le16_to_cpu(pkt->comp_status); + /* Mask of reserved bits 12-15, before we examine the scsi status */ + scsi_status = le16_to_cpu(pkt->scsi_status) & SS_MASK; + lscsi_status = scsi_status & STATUS_MASK; + + CMD_ENTRY_STATUS(cp) = pkt->entry_status; + CMD_COMPL_STATUS(cp) = comp_status; + CMD_SCSI_STATUS(cp) = scsi_status; + + /* Generate LU queue on cntrl, target, LUN */ + b = cp->device->channel; + t = cp->device->id; + l = cp->device->lun, + + tq = sp->tgt_queue; + lq = sp->lun_queue; + + /* + * If loop is in transient state Report DID_BUS_BUSY + */ + if ((comp_status != CS_COMPLETE || scsi_status != 0)) { + if (!(sp->flags & SRB_IOCTL) && + (atomic_read(&ha->loop_down_timer) || + ha->loop_state != LOOP_READY)) { + + DEBUG2(printk("scsi(%ld:%d:%d:%d): Loop Not Ready - " + "pid=%lx.\n", + ha->host_no, b, t, l, cp->serial_number)); + + qla2x00_extend_timeout(cp, EXTEND_CMD_TIMEOUT); + add_to_retry_queue(ha, sp); + return; + } + } + + /* + * Based on Host and scsi status generate status code for Linux + */ + switch (comp_status) { + case CS_COMPLETE: + if (scsi_status == 0) { + cp->result = DID_OK << 16; + + /* Perform any post command processing */ + qla2x00_filter_command(ha, sp); + break; + } + if (lscsi_status == SS_BUSY_CONDITION) { + cp->result = DID_BUS_BUSY << 16 | lscsi_status; + break; + } + + cp->result = DID_OK << 16 | lscsi_status; + + if (lscsi_status != SS_CHECK_CONDITION) + break; + + /* + * Copy Sense Data into sense buffer + */ + memset(cp->sense_buffer, 0, sizeof(cp->sense_buffer)); + + if (!(scsi_status & SS_SENSE_LEN_VALID)) + break; + + if (le16_to_cpu(pkt->req_sense_length) < + sizeof(cp->sense_buffer)) + sense_sz = le16_to_cpu(pkt->req_sense_length); + else + sense_sz = sizeof(cp->sense_buffer) - 1; + + CMD_ACTUAL_SNSLEN(cp) = sense_sz; + sp->request_sense_length = sense_sz; + sp->request_sense_ptr = cp->sense_buffer; + + if (sp->request_sense_length > 32) + sense_sz = 32; + + memcpy(cp->sense_buffer, pkt->req_sense_data, sense_sz); + + sp->request_sense_ptr += sense_sz; + sp->request_sense_length -= sense_sz; + if (sp->request_sense_length != 0) + ha->status_srb = sp; + + if (!(sp->flags & SRB_IOCTL) && + qla2x00_check_sense(cp, lq) == QLA_SUCCESS) { + /* Throw away status_cont if any */ + ha->status_srb = NULL; + add_to_scsi_retry_queue(ha, sp); + return; + } + + DEBUG5(printk("%s(): Check condition Sense data, " + "scsi(%ld:%d:%d:%d) cmd=%p pid=%ld\n", + __func__, ha->host_no, b, t, l, cp, + cp->serial_number)); + if (sense_sz) + DEBUG5(qla2x00_dump_buffer(cp->sense_buffer, + CMD_ACTUAL_SNSLEN(cp))); + break; + + case CS_DATA_UNDERRUN: + DEBUG2(printk(KERN_INFO + "scsi(%ld:%d:%d) UNDERRUN status detected 0x%x-0x%x.\n", + ha->host_no, t, l, comp_status, scsi_status)); + + resid = le32_to_cpu(pkt->residual_length); + CMD_RESID_LEN(cp) = resid; + + /* + * Check to see if SCSI Status is non zero. If so report SCSI + * Status. + */ + if (lscsi_status != 0) { + if (lscsi_status == SS_BUSY_CONDITION) { + cp->result = DID_BUS_BUSY << 16 | + lscsi_status; + break; + } + + cp->result = DID_OK << 16 | lscsi_status; + + if (lscsi_status != SS_CHECK_CONDITION) + break; + + /* Copy Sense Data into sense buffer */ + memset(cp->sense_buffer, 0, sizeof(cp->sense_buffer)); + + if (!(scsi_status & SS_SENSE_LEN_VALID)) + break; + + if (le16_to_cpu(pkt->req_sense_length) < + sizeof(cp->sense_buffer)) + sense_sz = le16_to_cpu(pkt->req_sense_length); + else + sense_sz = sizeof(cp->sense_buffer) - 1; + + CMD_ACTUAL_SNSLEN(cp) = sense_sz; + sp->request_sense_length = sense_sz; + sp->request_sense_ptr = cp->sense_buffer; + + if (sp->request_sense_length > 32) + sense_sz = 32; + + memcpy(cp->sense_buffer, pkt->req_sense_data, sense_sz); + + sp->request_sense_ptr += sense_sz; + sp->request_sense_length -= sense_sz; + if (sp->request_sense_length != 0) + ha->status_srb = sp; + + if (!(sp->flags & SRB_IOCTL) && + (qla2x00_check_sense(cp, lq) == QLA_SUCCESS)) { + ha->status_srb = NULL; + add_to_scsi_retry_queue(ha, sp); + return; + } + DEBUG5(printk("%s(): Check condition Sense data, " + "scsi(%ld:%d:%d:%d) cmd=%p pid=%ld\n", + __func__, ha->host_no, b, t, l, cp, + cp->serial_number)); + if (sense_sz) + DEBUG5(qla2x00_dump_buffer(cp->sense_buffer, + CMD_ACTUAL_SNSLEN(cp))); + } else { + /* + * If RISC reports underrun and target does not report + * it then we must have a lost frame, so tell upper + * layer to retry it by reporting a bus busy. + */ + if (!(scsi_status & SS_RESIDUAL_UNDER)) { + DEBUG2(printk("scsi(%ld:%d:%d:%d) Dropped " + "frame(s) detected (%x of %x bytes)..." + "retrying command.\n", + ha->host_no, b, t, l, resid, + cp->request_bufflen)); + + cp->result = DID_BUS_BUSY << 16; + ha->dropped_frame_error_cnt++; + break; + } + + /* Handle mid-layer underflow */ + cp->resid = resid; + if ((unsigned)(cp->request_bufflen - resid) < + cp->underflow) { + qla_printk(KERN_INFO, ha, + "scsi(%ld:%d:%d:%d): Mid-layer underflow " + "detected (%x of %x bytes)...returning " + "error status.\n", + ha->host_no, b, t, l, resid, + cp->request_bufflen); + + cp->result = DID_ERROR << 16; + break; + } + + /* Everybody online, looking good... */ + cp->result = DID_OK << 16; + + /* Perform any post command processing */ + qla2x00_filter_command(ha, sp); + } + break; + + case CS_DATA_OVERRUN: + DEBUG2(printk(KERN_INFO + "scsi(%ld:%d:%d): OVERRUN status detected 0x%x-0x%x\n", + ha->host_no, t, l, comp_status, scsi_status)); + DEBUG2(printk(KERN_INFO + "CDB: 0x%x 0x%x 0x%x 0x%x 0x%x 0x%x\n", + cp->cmnd[0], cp->cmnd[1], cp->cmnd[2], cp->cmnd[3], + cp->cmnd[4], cp->cmnd[5])); + DEBUG2(printk(KERN_INFO + "PID=0x%lx req=0x%x xtra=0x%x -- returning DID_ERROR " + "status!\n", + cp->serial_number, cp->request_bufflen, + le32_to_cpu(pkt->residual_length))); + + cp->result = DID_ERROR << 16; + break; + + case CS_PORT_LOGGED_OUT: + case CS_PORT_CONFIG_CHG: + case CS_PORT_BUSY: + case CS_INCOMPLETE: + case CS_PORT_UNAVAILABLE: + /* + * If the port is in Target Down state, return all IOs for this + * Target with DID_NO_CONNECT ELSE Queue the IOs in the + * retry_queue. + */ + fcport = sp->fclun->fcport; + DEBUG2(printk("scsi(%ld:%d:%d): status_entry: Port Down " + "pid=%ld, compl status=0x%x, port state=0x%x\n", + ha->host_no, t, l, cp->serial_number, comp_status, + atomic_read(&fcport->state))); + + if ((sp->flags & SRB_IOCTL) || + atomic_read(&fcport->state) == FCS_DEVICE_DEAD) { + cp->result = DID_NO_CONNECT << 16; + add_to_done_queue(ha, sp); + } else { + qla2x00_extend_timeout(cp, EXTEND_CMD_TIMEOUT); + add_to_retry_queue(ha, sp); + } + + if (atomic_read(&fcport->state) == FCS_ONLINE) { + qla2x00_mark_device_lost(ha, fcport, 1); + } + + return; + break; + + case CS_RESET: + DEBUG2(printk(KERN_INFO + "scsi(%ld): RESET status detected 0x%x-0x%x.\n", + ha->host_no, comp_status, scsi_status)); + + if (sp->flags & SRB_IOCTL) { + cp->result = DID_RESET << 16; + } else { + qla2x00_extend_timeout(cp, EXTEND_CMD_TIMEOUT); + add_to_retry_queue(ha, sp); + return; + } + break; + + case CS_ABORTED: + /* + * hv2.19.12 - DID_ABORT does not retry the request if we + * aborted this request then abort otherwise it must be a + * reset. + */ + DEBUG2(printk(KERN_INFO + "scsi(%ld): ABORT status detected 0x%x-0x%x.\n", + ha->host_no, comp_status, scsi_status)); + + cp->result = DID_RESET << 16; + break; + + case CS_TIMEOUT: + DEBUG2(printk(KERN_INFO + "scsi(%ld:%d:%d:%d): TIMEOUT status detected 0x%x-0x%x.\n", + ha->host_no, b, t, l, comp_status, scsi_status)); + + cp->result = DID_BUS_BUSY << 16; + + fcport = lq->fclun->fcport; + + /* Check to see if logout occurred */ + if ((le16_to_cpu(pkt->status_flags) & SF_LOGOUT_SENT)) { + qla2x00_mark_device_lost(ha, fcport, 1); + } + break; + + case CS_QUEUE_FULL: + DEBUG2(printk(KERN_INFO + "scsi(%ld): QUEUE FULL status detected 0x%x-0x%x.\n", + ha->host_no, comp_status, scsi_status)); + + /* SCSI Mid-Layer handles device queue full */ + + cp->result = DID_OK << 16 | lscsi_status; + + /* TODO: ??? */ + /* Adjust queue depth */ + ret = scsi_track_queue_full(cp->device, + sp->lun_queue->out_cnt - 1); + if (ret) { + qla_printk(KERN_INFO, ha, + "scsi(%ld:%d:%d:%d): Queue depth adjusted to %d.\n", + ha->host_no, cp->device->channel, cp->device->id, + cp->device->lun, ret); + } + break; + + default: + DEBUG3(printk("scsi(%ld): Error detected (unknown status) " + "0x%x-0x%x.\n", + ha->host_no, comp_status, scsi_status)); + qla_printk(KERN_INFO, ha, + "Unknown status detected 0x%x-0x%x.\n", + comp_status, scsi_status); + + cp->result = DID_ERROR << 16; + break; + } + + /* Place command on done queue. */ + if (ha->status_srb == NULL) + add_to_done_queue(ha, sp); +} + +/** + * qla2x00_status_cont_entry() - Process a Status Continuations entry. + * @ha: SCSI driver HA context + * @pkt: Entry pointer + * + * Extended sense data. + */ +static void +qla2x00_status_cont_entry(scsi_qla_host_t *ha, sts_cont_entry_t *pkt) +{ + uint8_t sense_sz = 0; + srb_t *sp = ha->status_srb; + struct scsi_cmnd *cp; + + if (sp != NULL && sp->request_sense_length != 0) { + cp = sp->cmd; + if (cp == NULL) { + DEBUG2(printk("%s(): Cmd already returned back to OS " + "sp=%p sp->state:%d\n", __func__, sp, sp->state)); + qla_printk(KERN_INFO, ha, + "cmd is NULL: already returned to OS (sp=%p)\n", + sp); + + ha->status_srb = NULL; + return; + } + + if (sp->request_sense_length > sizeof(pkt->data)) { + sense_sz = sizeof(pkt->data); + } else { + sense_sz = sp->request_sense_length; + } + + /* Move sense data. */ + memcpy(sp->request_sense_ptr, pkt->data, sense_sz); + DEBUG5(qla2x00_dump_buffer(sp->request_sense_ptr, sense_sz)); + + sp->request_sense_ptr += sense_sz; + sp->request_sense_length -= sense_sz; + + /* Place command on done queue. */ + if (sp->request_sense_length == 0) { + add_to_done_queue(ha, sp); + ha->status_srb = NULL; + } + } +} + +/** + * qla2x00_error_entry() - Process an error entry. + * @ha: SCSI driver HA context + * @pkt: Entry pointer + */ +static void +qla2x00_error_entry(scsi_qla_host_t *ha, sts_entry_t *pkt) +{ + srb_t *sp; + +#if defined(QL_DEBUG_LEVEL_2) + if (pkt->entry_status & RF_INV_E_ORDER) + qla_printk(KERN_ERR, ha, "%s: Invalid Entry Order\n", __func__); + else if (pkt->entry_status & RF_INV_E_COUNT) + qla_printk(KERN_ERR, ha, "%s: Invalid Entry Count\n", __func__); + else if (pkt->entry_status & RF_INV_E_PARAM) + qla_printk(KERN_ERR, ha, + "%s: Invalid Entry Parameter\n", __func__); + else if (pkt->entry_status & RF_INV_E_TYPE) + qla_printk(KERN_ERR, ha, "%s: Invalid Entry Type\n", __func__); + else if (pkt->entry_status & RF_BUSY) + qla_printk(KERN_ERR, ha, "%s: Busy\n", __func__); + else + qla_printk(KERN_ERR, ha, "%s: UNKNOWN flag error\n", __func__); +#endif + + /* Validate handle. */ + if (pkt->handle < MAX_OUTSTANDING_COMMANDS) + sp = ha->outstanding_cmds[pkt->handle]; + else + sp = NULL; + + if (sp) { + /* Free outstanding command slot. */ + ha->outstanding_cmds[pkt->handle] = 0; + if (ha->actthreads) + ha->actthreads--; + sp->lun_queue->out_cnt--; + + /* Bad payload or header */ + if (pkt->entry_status & + (RF_INV_E_ORDER | RF_INV_E_COUNT | + RF_INV_E_PARAM | RF_INV_E_TYPE)) { + sp->cmd->result = DID_ERROR << 16; + } else if (pkt->entry_status & RF_BUSY) { + sp->cmd->result = DID_BUS_BUSY << 16; + } else { + sp->cmd->result = DID_ERROR << 16; + } + /* Place command on done queue. */ + add_to_done_queue(ha, sp); + + } else if (pkt->entry_type == COMMAND_A64_TYPE || + pkt->entry_type == COMMAND_TYPE) { + DEBUG2(printk("scsi(%ld): Error entry - invalid handle\n", + ha->host_no)); + qla_printk(KERN_WARNING, ha, + "Error entry - invalid handle\n"); + + set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + if (ha->dpc_wait && !ha->dpc_active) + up(ha->dpc_wait); + } +} + +/** + * qla2x00_ms_entry() - Process a Management Server entry. + * @ha: SCSI driver HA context + * @index: Response queue out pointer + */ +static void +qla2x00_ms_entry(scsi_qla_host_t *ha, ms_iocb_entry_t *pkt) +{ + srb_t *sp; + + DEBUG3(printk("%s(%ld): pkt=%p pkthandle=%d.\n", + __func__, ha->host_no, pkt, pkt->handle1)); + + /* Validate handle. */ + if (pkt->handle1 < MAX_OUTSTANDING_COMMANDS) + sp = ha->outstanding_cmds[pkt->handle1]; + else + sp = NULL; + + if (sp == NULL) { + DEBUG2(printk("scsi(%ld): MS entry - invalid handle\n", + ha->host_no)); + qla_printk(KERN_WARNING, ha, "MS entry - invalid handle\n"); + + set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + return; + } + + CMD_COMPL_STATUS(sp->cmd) = le16_to_cpu(pkt->status); + CMD_ENTRY_STATUS(sp->cmd) = pkt->entry_status; + + /* Free outstanding command slot. */ + ha->outstanding_cmds[pkt->handle1] = 0; + + add_to_done_queue(ha, sp); +} + +/** + * qla2x00_check_sense() - Perform any sense data interrogation. + * @cp: SCSI Command + * @lq: Lun queue + * + * Returns QLA_SUCCESS if the lun queue is suspended, else + * QLA_FUNCTION_FAILED (lun queue not suspended). + */ +static int +qla2x00_check_sense(struct scsi_cmnd *cp, os_lun_t *lq) +{ + scsi_qla_host_t *ha; + srb_t *sp; + fc_port_t *fcport; + + ha = (scsi_qla_host_t *) cp->device->host->hostdata; + if ((cp->sense_buffer[0] & 0x70) != 0x70) { + return (QLA_FUNCTION_FAILED); + } + + sp = (srb_t * )CMD_SP(cp); + sp->flags |= SRB_GOT_SENSE; + + switch (cp->sense_buffer[2] & 0xf) { + case RECOVERED_ERROR: + cp->result = DID_OK << 16; + cp->sense_buffer[0] = 0; + break; + + case NOT_READY: + fcport = lq->fclun->fcport; + + /* + * Suspend the lun only for hard disk device type. + */ + if ((fcport->flags & FCF_TAPE_PRESENT) == 0 && + lq->q_state != LUN_STATE_TIMEOUT) { + /* + * If target is in process of being ready then suspend + * lun for 6 secs and retry all the commands. + */ + if (cp->sense_buffer[12] == 0x4 && + cp->sense_buffer[13] == 0x1) { + + /* Suspend the lun for 6 secs */ + qla2x00_suspend_lun(ha, lq, 6, + ql2xsuspendcount); + + return (QLA_SUCCESS); + } + } + break; + } + + return (QLA_FUNCTION_FAILED); +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_listops.h 999-mjb/drivers/scsi/qla2xxx/qla_listops.h --- 000-virgin/drivers/scsi/qla2xxx/qla_listops.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_listops.h 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,358 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + +/* Management functions for various lists */ + +/* __add_to_done_queue() + * + * Place SRB command on done queue. + * + * Input: + * ha = host pointer + * sp = srb pointer. + * Locking: + * this function assumes the ha->list_lock is already taken + */ +static inline void +__add_to_done_queue(struct scsi_qla_host * ha, srb_t * sp) +{ + /* + if (sp->state != SRB_NO_QUEUE_STATE && + sp->state != SRB_ACTIVE_STATE) + BUG(); + */ + + /* Place block on done queue */ + sp->cmd->host_scribble = (unsigned char *) NULL; + sp->state = SRB_DONE_STATE; + list_add_tail(&sp->list,&ha->done_queue); + ha->done_q_cnt++; + sp->ha = ha; +} + +static inline void +__add_to_retry_queue(struct scsi_qla_host * ha, srb_t * sp) +{ + /* + if( sp->state != SRB_NO_QUEUE_STATE && + sp->state != SRB_ACTIVE_STATE) + BUG(); + */ + + /* Place block on retry queue */ + list_add_tail(&sp->list,&ha->retry_queue); + ha->retry_q_cnt++; + sp->flags |= SRB_WATCHDOG; + ha->flags.watchdog_enabled = TRUE; + sp->state = SRB_RETRY_STATE; + sp->ha = ha; +} + +static inline void +__add_to_scsi_retry_queue(struct scsi_qla_host * ha, srb_t * sp) +{ + /* + if( sp->state != SRB_NO_QUEUE_STATE && + sp->state != SRB_ACTIVE_STATE) + BUG(); + */ + + /* Place block on retry queue */ + list_add_tail(&sp->list,&ha->scsi_retry_queue); + ha->scsi_retry_q_cnt++; + sp->state = SRB_SCSI_RETRY_STATE; + sp->ha = ha; +} + +static inline void +add_to_done_queue(struct scsi_qla_host * ha, srb_t * sp) +{ + unsigned long flags; + + spin_lock_irqsave(&ha->list_lock, flags); + __add_to_done_queue(ha,sp); + spin_unlock_irqrestore(&ha->list_lock, flags); +} + +static inline void +add_to_free_queue(struct scsi_qla_host * ha, srb_t * sp) +{ + unsigned long flags; + + spin_lock_irqsave(&ha->list_lock, flags); + kmem_cache_free(ha->srb_cachep, sp); + spin_unlock_irqrestore(&ha->list_lock, flags); +} + +static inline void +add_to_retry_queue(struct scsi_qla_host * ha, srb_t * sp) +{ + unsigned long flags; + + spin_lock_irqsave(&ha->list_lock, flags); + __add_to_retry_queue(ha,sp); + spin_unlock_irqrestore(&ha->list_lock, flags); +} + +static inline void +add_to_scsi_retry_queue(struct scsi_qla_host * ha, srb_t * sp) +{ + unsigned long flags; + + spin_lock_irqsave(&ha->list_lock, flags); + __add_to_scsi_retry_queue(ha,sp); + spin_unlock_irqrestore(&ha->list_lock, flags); +} + +/* + * __del_from_retry_queue + * Function used to remove a command block from the + * watchdog timer queue. + * + * Note: Must insure that command is on watchdog + * list before calling del_from_retry_queue + * if (sp->flags & SRB_WATCHDOG) + * + * Input: + * ha = adapter block pointer. + * sp = srb pointer. + * Locking: + * this function assumes the list_lock is already taken + */ +static inline void +__del_from_retry_queue(struct scsi_qla_host * ha, srb_t * sp) +{ + list_del_init(&sp->list); + + if (list_empty(&ha->retry_queue)) + ha->flags.watchdog_enabled = FALSE; + sp->flags &= ~(SRB_WATCHDOG | SRB_BUSY); + sp->state = SRB_NO_QUEUE_STATE; + ha->retry_q_cnt--; +} + +/* + * __del_from_scsi_retry_queue + * Function used to remove a command block from the + * scsi retry queue. + * + * Input: + * ha = adapter block pointer. + * sp = srb pointer. + * Locking: + * this function assumes the list_lock is already taken + */ +static inline void +__del_from_scsi_retry_queue(struct scsi_qla_host * ha, srb_t * sp) +{ + list_del_init(&sp->list); + + ha->scsi_retry_q_cnt--; + sp->state = SRB_NO_QUEUE_STATE; +} + +/* + * del_from_retry_queue + * Function used to remove a command block from the + * watchdog timer queue. + * + * Note: Must insure that command is on watchdog + * list before calling del_from_retry_queue + * if (sp->flags & SRB_WATCHDOG) + * + * Input: + * ha = adapter block pointer. + * sp = srb pointer. + * Locking: + * this function takes and releases the list_lock + */ +static inline void +del_from_retry_queue(struct scsi_qla_host * ha, srb_t * sp) +{ + unsigned long flags; + + /* if (unlikely(!(sp->flags & SRB_WATCHDOG))) + BUG();*/ + spin_lock_irqsave(&ha->list_lock, flags); + + /* if (unlikely(list_empty(&ha->retry_queue))) + BUG();*/ + + __del_from_retry_queue(ha,sp); + + spin_unlock_irqrestore(&ha->list_lock, flags); +} +/* + * del_from_scsi_retry_queue + * Function used to remove a command block from the + * scsi retry queue. + * + * Input: + * ha = adapter block pointer. + * sp = srb pointer. + * Locking: + * this function takes and releases the list_lock + */ +static inline void +del_from_scsi_retry_queue(struct scsi_qla_host * ha, srb_t * sp) +{ + unsigned long flags; + + spin_lock_irqsave(&ha->list_lock, flags); + + /* if (unlikely(list_empty(&ha->scsi_retry_queue))) + BUG();*/ + + __del_from_scsi_retry_queue(ha,sp); + + spin_unlock_irqrestore(&ha->list_lock, flags); +} + +/* + * __add_to_pending_queue + * Add the standard SCB job to the bottom of standard SCB commands. + * + * Input: + * COMPLETE!!! + * q = SCSI LU pointer. + * sp = srb pointer. + * SCSI_LU_Q lock must be already obtained. + */ +static inline int +__add_to_pending_queue(struct scsi_qla_host *ha, srb_t * sp) +{ + int empty; + /* + if( sp->state != SRB_NO_QUEUE_STATE && + sp->state != SRB_FREE_STATE && + sp->state != SRB_ACTIVE_STATE) + BUG(); + */ + + empty = list_empty(&ha->pending_queue); + list_add_tail(&sp->list, &ha->pending_queue); + ha->qthreads++; + sp->state = SRB_PENDING_STATE; + + return (empty); +} + +static inline void +__add_to_pending_queue_head(struct scsi_qla_host *ha, srb_t * sp) +{ + /* + if( sp->state != SRB_NO_QUEUE_STATE && + sp->state != SRB_FREE_STATE && + sp->state != SRB_ACTIVE_STATE) + BUG(); + */ + + list_add(&sp->list, &ha->pending_queue); + ha->qthreads++; + sp->state = SRB_PENDING_STATE; +} + +static inline int +add_to_pending_queue(struct scsi_qla_host *ha, srb_t *sp) +{ + int empty; + unsigned long flags; + + spin_lock_irqsave(&ha->list_lock, flags); + empty = __add_to_pending_queue(ha, sp); + spin_unlock_irqrestore(&ha->list_lock, flags); + + return (empty); +} +static inline void +add_to_pending_queue_head(struct scsi_qla_host *ha, srb_t *sp) +{ + unsigned long flags; + + spin_lock_irqsave(&ha->list_lock, flags); + __add_to_pending_queue_head(ha, sp); + spin_unlock_irqrestore(&ha->list_lock, flags); +} + +static inline void +__del_from_pending_queue(struct scsi_qla_host *ha, srb_t *sp) +{ + list_del_init(&sp->list); + ha->qthreads--; + sp->state = SRB_NO_QUEUE_STATE; +} + +/* + * Failover Stuff. + */ +static inline void +__add_to_failover_queue(struct scsi_qla_host * ha, srb_t * sp) +{ + /* + if( sp->state != SRB_NO_QUEUE_STATE && + sp->state != SRB_ACTIVE_STATE) + BUG(); + */ + + list_add_tail(&sp->list,&ha->failover_queue); + ha->failover_cnt++; + sp->state = SRB_FAILOVER_STATE; + sp->ha = ha; +} + +static inline void add_to_failover_queue(struct scsi_qla_host * ha, srb_t * sp) +{ + unsigned long flags; + + spin_lock_irqsave(&ha->list_lock, flags); + + __add_to_failover_queue(ha,sp); + + spin_unlock_irqrestore(&ha->list_lock, flags); +} +static inline void __del_from_failover_queue(struct scsi_qla_host * ha, srb_t * + sp) +{ + ha->failover_cnt--; + list_del_init(&sp->list); + sp->state = SRB_NO_QUEUE_STATE; +} + +static inline void del_from_failover_queue(struct scsi_qla_host * ha, srb_t * sp) +{ + unsigned long flags; + + spin_lock_irqsave(&ha->list_lock, flags); + + __del_from_failover_queue(ha,sp); + + spin_unlock_irqrestore(&ha->list_lock, flags); +} + +static inline void +del_from_pending_queue(struct scsi_qla_host * ha, srb_t * sp) +{ + unsigned long flags; + + spin_lock_irqsave(&ha->list_lock, flags); + + __del_from_pending_queue(ha,sp); + + spin_unlock_irqrestore(&ha->list_lock, flags); +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_mbx.c 999-mjb/drivers/scsi/qla2xxx/qla_mbx.c --- 000-virgin/drivers/scsi/qla2xxx/qla_mbx.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_mbx.c 2003-11-25 14:18:47.000000000 -0800 @@ -0,0 +1,2936 @@ +/* + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ + +#include "qla_os.h" + +#include "qla_def.h" + +/* + * Local Function Prototypes. + */ +static void +qla2x00_mbx_sem_timeout(unsigned long); + +static int +qla2x00_get_mbx_access(scsi_qla_host_t *, uint32_t); + +static int +qla2x00_release_mbx_access(scsi_qla_host_t *, uint32_t); + +static int +qla2x00_mbx_q_add(scsi_qla_host_t *, mbx_cmdq_t **); + +static void +qla2x00_mbx_q_get(scsi_qla_host_t *, mbx_cmdq_t **); + +static void +qla2x00_mbx_q_memb_alloc(scsi_qla_host_t *, mbx_cmdq_t **); + +static void +qla2x00_mbx_q_memb_free(scsi_qla_host_t *, mbx_cmdq_t *); + +/***************************/ +/* Function implementation */ +/***************************/ + +static void +qla2x00_mbx_sem_timeout(unsigned long data) +{ + struct semaphore *sem_ptr = (struct semaphore *)data; + + DEBUG11(printk("qla2x00_sem_timeout: entered.\n");) + + if (sem_ptr != NULL) { + up(sem_ptr); + } + + DEBUG11(printk("qla2x00_mbx_sem_timeout: exiting.\n");) +} + +/* + * tov = timeout value in seconds + */ +static int +qla2x00_get_mbx_access(scsi_qla_host_t *ha, uint32_t tov) +{ + int ret; + int prev_val = 1; /* assume no access yet */ + mbx_cmdq_t *ptmp_mbq; + struct timer_list tmp_cmd_timer; + unsigned long cpu_flags; + + + DEBUG11(printk("qla2x00_get_mbx_access(%ld): entered.\n", + ha->host_no);) + + while (1) { + if (test_bit(MBX_CMD_WANT, &ha->mbx_cmd_flags) == 0) { + + DEBUG11(printk("qla2x00_get_mbx_access(%ld): going " + " to test access flags.\n", ha->host_no);) + + /* No one else is waiting. Go ahead and try to + * get access. + */ + if ((prev_val = test_and_set_bit(MBX_CMD_ACTIVE, + &ha->mbx_cmd_flags)) == 0) { + break; + } + } + + /* wait for previous command to finish */ + DEBUG(printk("qla2x00_get_mbx_access(%ld): access " + "flags=%lx. busy. Waiting for access. curr time=0x%lx.\n", + ha->host_no, ha->mbx_cmd_flags, jiffies);) + + DEBUG11(printk("qla2x00_get_mbx_access(%ld): access " + "flags=%lx. busy. Waiting for access. curr time=0x%lx.\n", + ha->host_no, ha->mbx_cmd_flags, jiffies);) + + /* + * Init timer and get semaphore from mbx q. After we got valid + * semaphore pointer the MBX_CMD_WANT flag would also had + * been set. + */ + qla2x00_mbx_q_add(ha, &ptmp_mbq); + + if (ptmp_mbq == NULL) { + /* queue full? problem? can't proceed. */ + DEBUG2_3_11(printk("qla2x00_get_mbx_access(%ld): ERROR " + "no more mbx_q allowed. exiting.\n", ha->host_no);) + + break; + } + + /* init timer and semaphore */ + init_timer(&tmp_cmd_timer); + tmp_cmd_timer.data = (unsigned long)&ptmp_mbq->cmd_sem; + tmp_cmd_timer.function = + (void (*)(unsigned long))qla2x00_mbx_sem_timeout; + tmp_cmd_timer.expires = jiffies + tov * HZ; + + DEBUG11(printk("get_mbx_access(%ld): adding timer. " + "curr time=0x%lx timeoutval=0x%lx.\n", + ha->host_no, jiffies, tmp_cmd_timer.expires);) + + /* wait. */ +/* add_timer(&tmp_cmd_timer);*/ + DEBUG11(printk("get_mbx_access(%ld): going to sleep. " + "current time=0x%lx.\n", ha->host_no, jiffies);) + + down_interruptible(&ptmp_mbq->cmd_sem); + + DEBUG11(printk("get_mbx_access(%ld): woke up. current " + "time=0x%lx.\n", + ha->host_no, jiffies);) + +/* del_timer(&tmp_cmd_timer);*/ + + /* try to get lock again. we'll test later to see + * if we actually got the lock. + */ + prev_val = test_and_set_bit(MBX_CMD_ACTIVE, + &ha->mbx_cmd_flags); + + /* + * After we tried to get access then we check to see + * if we need to clear the MBX_CMD_WANT flag. Don't clear + * this flag before trying to get access or else another + * new thread might grab it before we did. + */ + spin_lock_irqsave(&ha->mbx_q_lock, cpu_flags); + if (ha->mbx_q_head == NULL) { + /* We're the last thread in queue. */ + clear_bit(MBX_CMD_WANT, &ha->mbx_cmd_flags); + } + qla2x00_mbx_q_memb_free(ha, ptmp_mbq); + spin_unlock_irqrestore(&ha->mbx_q_lock, cpu_flags); + + break; + } + + if (prev_val == 0) { + /* We got the lock */ + DEBUG11(printk("qla2x00_get_mbx_access(%ld): success.\n", + ha->host_no);) + + ret = QLA_SUCCESS; + } else { + /* Timeout or resource error. */ + DEBUG2_3_11(printk("qla2x00_get_mbx_access(%ld): timed out.\n", + ha->host_no);) + + ret = QLA_FUNCTION_TIMEOUT; + } + + return ret; +} + +static int +qla2x00_release_mbx_access(scsi_qla_host_t *ha, uint32_t tov) +{ + mbx_cmdq_t *next_thread; + + DEBUG11(printk("qla2x00_release_mbx_access:(%ld): entered.\n", + ha->host_no);) + + clear_bit(MBX_CMD_ACTIVE, &ha->mbx_cmd_flags); + + /* Wake up one pending mailbox cmd thread in queue. */ + qla2x00_mbx_q_get(ha, &next_thread); + if (next_thread) { + DEBUG11(printk("qla2x00_release_mbx_access: found pending " + "mbx cmd. Waking up sem in %p.\n", &next_thread);) + up(&next_thread->cmd_sem); + } + + DEBUG11(printk("qla2x00_release_mbx_access:(%ld): exiting.\n", + ha->host_no);) + + return QLA_SUCCESS; +} + +/* Allocates a mbx_cmdq_t struct and add to the mbx_q list. */ +static int +qla2x00_mbx_q_add(scsi_qla_host_t *ha, mbx_cmdq_t **ret_mbq) +{ + int ret; + unsigned long cpu_flags; + mbx_cmdq_t *ptmp = NULL; + + spin_lock_irqsave(&ha->mbx_q_lock, cpu_flags); + + DEBUG11(printk("qla2x00_mbx_q_add: got mbx_q spinlock. " + "Inst=%d.\n", apiHBAInstance);) + + qla2x00_mbx_q_memb_alloc(ha, &ptmp); + if (ptmp == NULL) { + /* can't add any more threads */ + DEBUG2_3_11(printk("qla2x00_mbx_q_add: ERROR no more " + "ioctl threads allowed. Inst=%d.\n", apiHBAInstance);) + + ret = QLA_MEMORY_ALLOC_FAILED; + } else { + if (ha->mbx_q_tail == NULL) { + /* First thread to queue. */ + set_bit(IOCTL_WANT, &ha->mbx_cmd_flags); + + ha->mbx_q_head = ptmp; + } else { + ha->mbx_q_tail->pnext = ptmp; + } + ha->mbx_q_tail = ptmp; + + /* Now init the semaphore */ + init_MUTEX_LOCKED(&ptmp->cmd_sem); + ret = QLA_SUCCESS; + } + + *ret_mbq = ptmp; + + DEBUG11(printk("qla2x00_mbx_q_add: going to release spinlock. " + "ret_mbq=%p, ret=%d. Inst=%d.\n", *ret_mbq, ret, apiHBAInstance);) + + spin_unlock_irqrestore(&ha->mbx_q_lock, cpu_flags); + + return ret; +} + +/* Just remove and return first member from mbx_cmdq. Don't free anything. */ +static void +qla2x00_mbx_q_get(scsi_qla_host_t *ha, mbx_cmdq_t **ret_mbq) +{ + unsigned long cpu_flags; + + spin_lock_irqsave(&ha->mbx_q_lock, cpu_flags); + + DEBUG11(printk("qla2x00_mbx_q_get: got mbx_q spinlock. " + "Inst=%d.\n", apiHBAInstance);) + + /* Remove from head */ + *ret_mbq = ha->mbx_q_head; + if (ha->mbx_q_head != NULL) { + ha->mbx_q_head = ha->mbx_q_head->pnext; + if (ha->mbx_q_head == NULL) { + /* That's the last one in queue. */ + ha->mbx_q_tail = NULL; + } + (*ret_mbq)->pnext = NULL; + } + + DEBUG11(printk("qla2x00_mbx_q_remove: return ret_mbq=%p. Going to " + "release spinlock. Inst=%d.\n", *ret_mbq, apiHBAInstance);) + + spin_unlock_irqrestore(&ha->mbx_q_lock, cpu_flags); +} + +/* Find a free mbx_q member from the array. Must already got the + * mbx_q_lock spinlock. + */ +static void +qla2x00_mbx_q_memb_alloc(scsi_qla_host_t *ha, mbx_cmdq_t **ret_mbx_q_memb) +{ + mbx_cmdq_t *ptmp = NULL; + + DEBUG11(printk("qla2x00_mbx_q_memb_alloc: entered. " + "Inst=%d.\n", apiHBAInstance);) + + ptmp = ha->mbx_sem_pool_head; + if (ptmp != NULL) { + ha->mbx_sem_pool_head = ptmp->pnext; + ptmp->pnext = NULL; + if (ha->mbx_sem_pool_head == NULL) { + ha->mbx_sem_pool_tail = NULL; + } + } else { + /* We ran out of pre-allocated semaphores. Try to allocate + * a new one. + */ + ptmp = (void *)KMEM_ZALLOC(sizeof(mbx_cmdq_t), 40); + } + + *ret_mbx_q_memb = ptmp; + + DEBUG11(printk("qla2x00_mbx_q_memb_alloc: return waitq_memb=%p. " + "Inst=%d.\n", *ret_mbx_q_memb, apiHBAInstance);) +} + +/* Add the specified mbx_q member back to the free semaphore pool. Must + * already got the mbx_q_lock spinlock. + */ +static void +qla2x00_mbx_q_memb_free(scsi_qla_host_t *ha, mbx_cmdq_t *pfree_mbx_q_memb) +{ + DEBUG11(printk("qla2x00_mbx_q_memb_free: entered. Inst=%d.\n", + apiHBAInstance);) + + if (pfree_mbx_q_memb != NULL) { + if (ha->mbx_sem_pool_tail != NULL) { + /* Add to tail */ + ha->mbx_sem_pool_tail->pnext = pfree_mbx_q_memb; + } else { + ha->mbx_sem_pool_head = pfree_mbx_q_memb; + } + ha->mbx_sem_pool_tail = pfree_mbx_q_memb; + } + + /* put it back to the free pool. */ + + DEBUG11(printk("qla2x00_mbx_q_memb_free: exiting. " + "Inst=%d.\n", apiHBAInstance);) +} + +/* + * qla2x00_mailbox_command + * Issue mailbox command and waits for completion. + * + * Input: + * ha = adapter block pointer. + * mcp = driver internal mbx struct pointer. + * + * Output: + * mb[MAX_MAILBOX_REGISTER_COUNT] = returned mailbox data. + * + * Returns: + * 0 : QLA_SUCCESS = cmd performed success + * 1 : QLA_FUNCTION_FAILED (error encountered) + * 6 : QLA_FUNCTION_TIMEOUT (timeout condition encountered) + * + * Context: + * Kernel context. + */ +int +qla2x00_mailbox_command(scsi_qla_host_t *ha, mbx_cmd_t *mcp) +{ + int rval; + unsigned long flags = 0; + device_reg_t *reg = ha->iobase; + struct timer_list tmp_intr_timer; + uint8_t abort_active = test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags); + uint8_t io_lock_on = ha->init_done; + uint8_t mbx_count; + uint8_t tmp_stat = 0; + uint16_t command; + uint16_t *iptr, *optr; + uint32_t cnt; + uint32_t mboxes; + unsigned long mbx_flags = 0; + unsigned long wait_time; + + rval = QLA_SUCCESS; + + DEBUG11(printk("qla2x00_mailbox_command(%ld): entered.\n", + ha->host_no);) + /* + * Wait for active mailbox commands to finish by waiting at most + * tov seconds. This is to serialize actual issuing of mailbox cmds + * during non ISP abort time. + */ + if (!abort_active) { + tmp_stat = qla2x00_get_mbx_access(ha, mcp->tov); + if (tmp_stat != QLA_SUCCESS) { + /* Timeout occurred. Return error. */ + DEBUG2_3_11(printk("qla2x00_mailbox_command(%ld): cmd " + "access timeout. Exiting.\n", ha->host_no);) + return QLA_FUNCTION_TIMEOUT; + } + } + + ha->flags.mbox_busy = TRUE; + /* Save mailbox command for debug */ + ha->mcp = mcp; + + /* Try to get mailbox register access */ + if (!abort_active) + QLA_MBX_REG_LOCK(ha); + + DEBUG11(printk("scsi%d: prepare to issue mbox cmd=0x%x.\n", + (int)ha->host_no, mcp->mb[0]);) + + spin_lock_irqsave(&ha->hardware_lock, flags); + + /* Load mailbox registers. */ + optr = (uint16_t *)®->mailbox0; + mbx_count = MAILBOX_REGISTER_COUNT; + + iptr = mcp->mb; + command = mcp->mb[0]; + mboxes = mcp->out_mb; + + for (cnt = 0; cnt < mbx_count; cnt++) { +#if defined(ISP2200) + if (cnt == 8) { + optr = (uint16_t *)®->mailbox8; + } +#endif + if (mboxes & BIT_0) { + WRT_REG_WORD(optr, *iptr); + } + + mboxes >>= 1; + optr++; + iptr++; + } + +#if defined(QL_DEBUG_LEVEL_1) + printk("qla2x00_mailbox_command: Loaded MBX registers " + "(displayed in bytes) = \n"); + qla2x00_dump_buffer((uint8_t *)mcp->mb, 16); + printk("\n"); + qla2x00_dump_buffer(((uint8_t *)mcp->mb + 0x10), 16); + printk("\n"); + qla2x00_dump_buffer(((uint8_t *)mcp->mb + 0x20), 8); + printk("\n"); + printk("qla2x00_mailbox_command: I/O address = %lx.\n", + (u_long)optr); + qla2x00_dump_regs(ha); +#endif + + /* Issue set host interrupt command to send cmd out. */ + ha->flags.mbox_int = FALSE; + clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); + + /* Unlock mbx registers and wait for interrupt */ + + DEBUG11(printk("qla2x00_mailbox_command: going to unlock irq & " + "waiting for interrupt. jiffies=%lx.\n", jiffies);) + + /* Wait for mbx cmd completion until timeout */ + + if (!abort_active && io_lock_on) { + /* sleep on completion semaphore */ + DEBUG11(printk("qla2x00_mailbox_command(%ld): " + "INTERRUPT MODE. Initializing timer.\n", + ha->host_no);) + + init_timer(&tmp_intr_timer); + tmp_intr_timer.data = (unsigned long)&ha->mbx_intr_sem; + tmp_intr_timer.expires = jiffies + mcp->tov * HZ; + tmp_intr_timer.function = + (void (*)(unsigned long))qla2x00_mbx_sem_timeout; + + DEBUG11(printk("qla2x00_mailbox_command(%ld): " + "Adding timer.\n", ha->host_no);) + add_timer(&tmp_intr_timer); + + DEBUG11(printk("qla2x00_mailbox_command: going to " + "unlock & sleep. time=0x%lx.\n", jiffies);) + + set_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); + + WRT_REG_WORD(®->hccr, HCCR_SET_HOST_INT); + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + if (!abort_active) + QLA_MBX_REG_UNLOCK(ha); + + /* Wait for either the timer to expire + * or the mbox completion interrupt + */ + down_interruptible(&ha->mbx_intr_sem); + + DEBUG11(printk("qla2x00_mailbox_command:" + "waking up." + "time=0x%lx\n", jiffies);) + clear_bit(MBX_INTR_WAIT, &ha->mbx_cmd_flags); + + /* delete the timer */ + del_timer(&tmp_intr_timer); +#if QLA2100_LIPTEST + if (mbxtimeout) { + DEBUG(printk("qla2x00_mailbox_command(%ld): " + "INTERRUPT MODE - testing timeout handling.\n", + ha->host_no);) + ha->flags.mbox_int= FALSE; + } + mbxtimeout= 0; +#endif + + } else { + + DEBUG3_11(printk("qla2x00_mailbox_command(%ld): cmd=%x " + "POLLING MODE.\n", ha->host_no, command);) + + WRT_REG_WORD(®->hccr, HCCR_SET_HOST_INT); + spin_unlock_irqrestore(&ha->hardware_lock, flags); + if (!abort_active) + QLA_MBX_REG_UNLOCK(ha); + + + wait_time = jiffies + mcp->tov * HZ; /* wait at most tov secs */ + while (!ha->flags.mbox_int) { + if (time_after(jiffies, wait_time)) + break; + + /* Check for pending interrupts. */ + qla2x00_poll(ha); + + udelay(10); /* v4.27 */ + } /* while */ + } + + if (!abort_active) + QLA_MBX_REG_LOCK(ha); + + /* Check whether we timed out */ + if (ha->flags.mbox_int) { + + DEBUG3_11(printk("qla2x00_mailbox_cmd: cmd %x completed.\n", + command);) + + /* Got interrupt. Clear the flag. */ + ha->flags.mbox_int = FALSE; + clear_bit(MBX_INTERRUPT, &ha->mbx_cmd_flags); + + if (ha->mailbox_out[0] != MBS_COMMAND_COMPLETE) { + qla2x00_stats.mboxerr++; + rval = QLA_FUNCTION_FAILED; + } + + /* Load return mailbox registers. */ + optr = mcp->mb; + iptr = (uint16_t *)&ha->mailbox_out[0]; + mboxes = mcp->in_mb; + for (cnt = 0; cnt < mbx_count; cnt++) { + + if (mboxes & BIT_0) + *optr = *iptr; + + mboxes >>= 1; + optr++; + iptr++; + } + } else { + +#if defined(QL_DEBUG_LEVEL_2) || defined(QL_DEBUG_LEVEL_3) || \ + defined(QL_DEBUG_LEVEL_11) + printk("qla2x00_mailbox_command(%ld): **** MB Command Timeout " + "for cmd %x ****\n", ha->host_no, command); + printk("qla2x00_mailbox_command: icontrol=%x jiffies=%lx\n", + RD_REG_WORD(®->ictrl), jiffies); + printk("qla2x00_mailbox_command: *** mailbox[0] = 0x%x ***\n", + RD_REG_WORD(optr)); + qla2x00_dump_regs(ha); +#endif + + qla2x00_stats.mboxtout++; + ha->total_mbx_timeout++; + rval = QLA_FUNCTION_TIMEOUT; + } + + if (!abort_active) + QLA_MBX_REG_UNLOCK(ha); + + ha->flags.mbox_busy = FALSE; + + /* Clean up */ + ha->mcp = NULL; + + if (!abort_active) { + DEBUG11(printk("qla2x00_mailbox_cmd: checking for additional " + "resp interrupt.\n");) + + /* polling mode for non isp_abort commands. */ + qla2x00_poll(ha); + } + + if (rval == QLA_FUNCTION_TIMEOUT) { + if (!io_lock_on || (mcp->flags & IOCTL_CMD)) { + /* not in dpc. schedule it for dpc to take over. */ + DEBUG(printk("qla2x00_mailbox_command(%ld): timeout " + "schedule isp_abort_needed.\n", + ha->host_no);) + DEBUG2_3_11(printk("qla2x00_mailbox_command(%ld): " + "timeout schedule isp_abort_needed.\n", + ha->host_no);) + set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + if (ha->dpc_wait && !ha->dpc_active) + up(ha->dpc_wait); + + } else if (!abort_active) { + + /* call abort directly since we are in the DPC thread */ + DEBUG(printk("qla2x00_mailbox_command(%ld): timeout " + "calling abort_isp\n", ha->host_no);) + DEBUG2_3_11(printk("qla2x00_mailbox_command(%ld): " + "timeout calling abort_isp\n", ha->host_no);) + + set_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags); + clear_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + if (qla2x00_abort_isp(ha)) { + /* failed. retry later. */ + set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + } + clear_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags); + + DEBUG(printk("qla2x00_mailbox_command: finished " + "abort_isp\n");) + DEBUG2_3_11(printk("qla2x00_mailbox_command: finished " + "abort_isp\n");) + } + } + + /* Allow next mbx cmd to come in. */ + if (!abort_active) { + tmp_stat = qla2x00_release_mbx_access(ha, mcp->tov); + + if (rval == 0) + rval = tmp_stat; + } + + if (rval) { + DEBUG2_3_11(printk("qla2x00_mailbox_command(%ld): **** FAILED. " + "mbx0=%x, mbx1=%x, mbx2=%x, cmd=%x ****\n", + ha->host_no, mcp->mb[0], mcp->mb[1], mcp->mb[2], command);) + } else { + DEBUG11(printk("qla2x00_mailbox_command(%ld): done.\n", + ha->host_no);) + } + + DEBUG11(printk("qla2x00_mailbox_command(%ld): exiting.\n", + ha->host_no);) + + return rval; +} + +/* + * qla2x00_load_ram + * Load adapter RAM using DMA. + * + * Input: + * ha = adapter block pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_load_ram(scsi_qla_host_t *ha, dma_addr_t req_dma, uint16_t risc_addr, + uint16_t risc_code_size) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + uint32_t req_len; + dma_addr_t nml_dma; + uint32_t nml_len; + uint32_t normalized; + + DEBUG11(printk("qla2x00_load_ram(%ld): entered.\n", + ha->host_no);) + + req_len = risc_code_size; + nml_dma = 0; + nml_len = 0; + + normalized = qla2x00_normalize_dma_addr(&req_dma, &req_len, &nml_dma, + &nml_len); + + /* Load first segment */ + mcp->mb[0] = MBC_LOAD_RISC_RAM; + mcp->mb[1] = risc_addr; + mcp->mb[2] = MSW(req_dma); + mcp->mb[3] = LSW(req_dma); + mcp->mb[4] = (uint16_t)req_len; + mcp->mb[6] = MSW(MSD(req_dma)); + mcp->mb[7] = LSW(MSD(req_dma)); + mcp->out_mb = MBX_7|MBX_6|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + /* Load second segment - if necessary */ + if (normalized && (rval == QLA_SUCCESS)) { + mcp->mb[0] = MBC_LOAD_RISC_RAM; + mcp->mb[1] = risc_addr + (uint16_t)req_len; + mcp->mb[2] = MSW(nml_dma); + mcp->mb[3] = LSW(nml_dma); + mcp->mb[4] = (uint16_t)nml_len; + mcp->mb[6] = MSW(MSD(nml_dma)); + mcp->mb[7] = LSW(MSD(nml_dma)); + mcp->out_mb = MBX_7|MBX_6|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + } + + if (rval == QLA_SUCCESS) { + /* Empty */ + DEBUG11(printk("qla2x00_load_ram(%ld): done.\n", ha->host_no);) + } else { + /* Empty */ + DEBUG2_3_11(printk("qla2x00_load_ram(%ld): failed. rval=%x " + "mb[0]=%x.\n", ha->host_no, rval, mcp->mb[0]);) + } + return rval; +} + +/* + * qla2x00_load_ram_ext + * Load adapter extended RAM using DMA. + * + * Input: + * ha = adapter block pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_load_ram_ext(scsi_qla_host_t *ha, dma_addr_t req_dma, + uint32_t risc_addr, uint16_t risc_code_size) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + uint32_t req_len; + dma_addr_t nml_dma; + uint32_t nml_len; + uint32_t normalized; + + DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); + + req_len = risc_code_size; + nml_dma = 0; + nml_len = 0; + + normalized = qla2x00_normalize_dma_addr(&req_dma, &req_len, &nml_dma, + &nml_len); + + /* Load first segment */ + mcp->mb[0] = MBC_LOAD_RISC_RAM_EXTENDED; + mcp->mb[1] = LSW(risc_addr); + mcp->mb[2] = MSW(req_dma); + mcp->mb[3] = LSW(req_dma); + mcp->mb[4] = (uint16_t)req_len; + mcp->mb[6] = MSW(MSD(req_dma)); + mcp->mb[7] = LSW(MSD(req_dma)); + mcp->mb[8] = MSW(risc_addr); + mcp->out_mb = MBX_8|MBX_7|MBX_6|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + /* Load second segment - if necessary */ + if (normalized && (rval == QLA_SUCCESS)) { + risc_addr += req_len; + mcp->mb[0] = MBC_LOAD_RISC_RAM_EXTENDED; + mcp->mb[1] = LSW(risc_addr); + mcp->mb[2] = MSW(nml_dma); + mcp->mb[3] = LSW(nml_dma); + mcp->mb[4] = (uint16_t)nml_len; + mcp->mb[6] = MSW(MSD(nml_dma)); + mcp->mb[7] = LSW(MSD(nml_dma)); + mcp->mb[8] = MSW(risc_addr); + mcp->out_mb = MBX_8|MBX_7|MBX_6|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + } + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("%s(%ld): failed=%x mb[0]=%x.\n", + __func__, ha->host_no, rval, mcp->mb[0])); + } else { + /*EMPTY*/ + DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); + } + + return rval; +} + +/* + * qla2x00_execute_fw + * Start adapter firmware. + * + * Input: + * ha = adapter block pointer. + * TARGET_QUEUE_LOCK must be released. + * ADAPTER_STATE_LOCK must be released. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_execute_fw(scsi_qla_host_t *ha) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_execute_fw(%ld): entered.\n", ha->host_no);) + + mcp->mb[0] = MBC_EXECUTE_FIRMWARE; + mcp->mb[1] = *ha->brd_info->fwinfo[0].fwstart; + mcp->out_mb = MBX_1|MBX_0; +#if defined(ISP2300) + if (ha->pdev->device == QLA2322_DEVICE_ID) { + mcp->mb[2] = 0; + mcp->out_mb |= MBX_2; + } +#endif + mcp->in_mb = MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + DEBUG11(printk("qla2x00_execute_fw(%ld): done.\n", ha->host_no);) + + return rval; +} + +/* + * qla2x00_get_fw_version + * Get firmware version. + * + * Input: + * ha: adapter state pointer. + * major: pointer for major number. + * minor: pointer for minor number. + * subminor: pointer for subminor number. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +void +qla2x00_get_fw_version(scsi_qla_host_t *ha, uint16_t *major, uint16_t *minor, + uint16_t *subminor, uint16_t *attributes) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); + + mcp->mb[0] = MBC_GET_FIRMWARE_VERSION; + mcp->out_mb = MBX_0; + mcp->in_mb = MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->flags = 0; + mcp->tov = 30; + rval = qla2x00_mailbox_command(ha, mcp); + + /* Return mailbox data. */ + *major = mcp->mb[1]; + *minor = mcp->mb[2]; + *subminor = mcp->mb[3]; + *attributes = mcp->mb[6]; + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, + ha->host_no, rval)); + } else { + /*EMPTY*/ + DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); + } +} + +/* + * qla2x00_get_fw_options + * Set firmware options. + * + * Input: + * ha = adapter block pointer. + * fwopt = pointer for firmware options. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_get_fw_options(scsi_qla_host_t *ha, uint16_t *fwopts) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); + + mcp->mb[0] = MBC_GET_FIRMWARE_OPTION; + mcp->out_mb = MBX_0; + mcp->in_mb = MBX_3|MBX_2|MBX_1|MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, + ha->host_no, rval)); + } else { + fwopts[1] = mcp->mb[1]; + fwopts[2] = mcp->mb[2]; + fwopts[3] = mcp->mb[3]; + + DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); + } + + return rval; +} + + +/* + * qla2x00_set_fw_options + * Set firmware options. + * + * Input: + * ha = adapter block pointer. + * fwopt = pointer for firmware options. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_set_fw_options(scsi_qla_host_t *ha, uint16_t *fwopts) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); + + mcp->mb[0] = MBC_SET_FIRMWARE_OPTION; + mcp->mb[1] = fwopts[1]; + mcp->mb[2] = fwopts[2]; + mcp->mb[3] = fwopts[3]; + mcp->mb[10] = fwopts[10]; + mcp->mb[11] = fwopts[11]; + mcp->mb[12] = 0; /* Undocumented, but used */ + mcp->out_mb = MBX_12|MBX_11|MBX_10|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, + ha->host_no, rval)); + } else { + /*EMPTY*/ + DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); + } + + return rval; +} + +/* + * qla2x00_read_ram_word + * + * Input: + * ha = adapter block pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_read_ram_word(scsi_qla_host_t *ha, uint16_t addr, uint16_t *data) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_read_ram_word(%ld): entered.\n", ha->host_no);) + + mcp->mb[0] = MBC_READ_RAM_WORD; + mcp->mb[1] = addr; + mcp->out_mb = MBX_1|MBX_0; + mcp->in_mb = MBX_0|MBX_2; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("qla2x00_read_ram_word(%ld): failed=%x.\n", + ha->host_no, rval);) + } else { + *data = mcp->mb[2]; + DEBUG11(printk("qla2x00_read_ram_word(%ld): done.\n", + ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_write_ram_word + * + * Input: + * ha = adapter block pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_write_ram_word(scsi_qla_host_t *ha, uint16_t addr, uint16_t data) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_write_ram_word(%ld): entered.\n", + ha->host_no);) + + mcp->mb[0] = MBC_WRITE_RAM_WORD; + mcp->mb[1] = addr; + mcp->mb[2] = data; + mcp->out_mb = MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("qla2x00_write_ram_word(%ld): failed=%x.\n", + ha->host_no, rval);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_write_ram_word(%ld): done.\n", + ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_write_ram_word_ext + * + * Input: + * ha = adapter block pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_write_ram_word_ext(scsi_qla_host_t *ha, uint32_t addr, uint16_t data) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); + + mcp->mb[0] = MBC_WRITE_RAM_WORD_EXTENDED; + mcp->mb[1] = LSW(addr); + mcp->mb[2] = data; + mcp->mb[8] = MSW(addr); + mcp->out_mb = MBX_8|MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, + ha->host_no, rval)); + } else { + /*EMPTY*/ + DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); + } + + return rval; +} + +/* + * qla2x00_mbx_reg_test + * Mailbox register wrap test. + * + * Input: + * ha = adapter block pointer. + * TARGET_QUEUE_LOCK must be released. + * ADAPTER_STATE_LOCK must be released. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_mbx_reg_test(scsi_qla_host_t *ha) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_mbx_reg_test(%ld): entered.\n", ha->host_no);) + + mcp->mb[0] = MBC_MAILBOX_REGISTER_TEST; + mcp->mb[1] = 0xAAAA; + mcp->mb[2] = 0x5555; + mcp->mb[3] = 0xAA55; + mcp->mb[4] = 0x55AA; + mcp->mb[5] = 0xA5A5; + mcp->mb[6] = 0x5A5A; + mcp->mb[7] = 0x2525; + mcp->out_mb = MBX_7|MBX_6|MBX_5|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_7|MBX_6|MBX_5|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval == QLA_SUCCESS) { + if (mcp->mb[1] != 0xAAAA || mcp->mb[2] != 0x5555 || + mcp->mb[3] != 0xAA55 || mcp->mb[4] != 0x55AA) + rval = QLA_FUNCTION_FAILED; + if (mcp->mb[5] != 0xA5A5 || mcp->mb[6] != 0x5A5A || + mcp->mb[7] != 0x2525) + rval = QLA_FUNCTION_FAILED; + } + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("qla2x00_mbx_reg_test(%ld): failed=%x.\n", + ha->host_no, rval);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_mbx_reg_test(%ld): done.\n", + ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_verify_checksum + * Verify firmware checksum. + * + * Input: + * ha = adapter block pointer. + * TARGET_QUEUE_LOCK must be released. + * ADAPTER_STATE_LOCK must be released. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_verify_checksum(scsi_qla_host_t *ha) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_verify_checksum(%ld): entered.\n", + ha->host_no);) + + mcp->mb[0] = MBC_VERIFY_CHECKSUM; + mcp->mb[1] = *ha->brd_info->fwinfo[0].fwstart; + mcp->out_mb = MBX_1|MBX_0; + mcp->in_mb = MBX_2|MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("qla2x00_verify_checksum(%ld): failed=%x.\n", + ha->host_no, rval);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_verify_checksum(%ld): done.\n", + ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_issue_iocb + * Issue IOCB using mailbox command + * + * Input: + * ha = adapter state pointer. + * buffer = buffer pointer. + * phys_addr = physical address of buffer. + * size = size of buffer. + * TARGET_QUEUE_LOCK must be released. + * ADAPTER_STATE_LOCK must be released. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_issue_iocb(scsi_qla_host_t *ha, void* buffer, dma_addr_t phys_addr, + size_t size) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + ENTER("qla2x00_issue_iocb: started"); + + mcp->mb[0] = MBC_IOCB_COMMAND_A64; + mcp->mb[1] = 0; + mcp->mb[2] = MSW(phys_addr); + mcp->mb[3] = LSW(phys_addr); + mcp->mb[6] = MSW(MSD(phys_addr)); + mcp->mb[7] = LSW(MSD(phys_addr)); + mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_2|MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG(printk("qla2x00_issue_iocb(%ld): failed rval 0x%x", + ha->host_no,rval);) + DEBUG2(printk("qla2x00_issue_iocb(%ld): failed rval 0x%x", + ha->host_no,rval);) + } else { + /*EMPTY*/ + LEAVE("qla2x00_issue_iocb: exiting normally"); + } + + return rval; +} + +/* + * qla2x00_abort_command + * Abort command aborts a specified IOCB. + * + * Input: + * ha = adapter block pointer. + * sp = SB structure pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_abort_command(scsi_qla_host_t *ha, srb_t *sp) +{ + unsigned long flags = 0; + fc_port_t *fcport; + int rval; + uint32_t handle; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_abort_command(%ld): entered.\n", ha->host_no);) + + fcport = sp->fclun->fcport; + + if (ha->loop_state == LOOP_DOWN || + atomic_read(&fcport->state) == FCS_DEVICE_LOST) { + /* v2.19.8 Ignore abort request if port is down */ + return 1; + } + + spin_lock_irqsave(&ha->hardware_lock, flags); + for (handle = 1; handle < MAX_OUTSTANDING_COMMANDS; handle++) { + if (ha->outstanding_cmds[handle] == sp) + break; + } + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + if (handle == MAX_OUTSTANDING_COMMANDS) { + /* command not found */ + return QLA_FUNCTION_FAILED; + } + + mcp->mb[0] = MBC_ABORT_COMMAND; +#if defined(EXTENDED_IDS) + mcp->mb[1] = fcport->loop_id; +#else + mcp->mb[1] = fcport->loop_id << 8; +#endif + mcp->mb[2] = (uint16_t)handle; + mcp->mb[3] = (uint16_t)(handle >> 16); + mcp->mb[6] = (uint16_t)sp->fclun->lun; + mcp->out_mb = MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + DEBUG2_3_11(printk("qla2x00_abort_command(%ld): failed=%x.\n", + ha->host_no, rval);) + } else { + sp->flags |= SRB_ABORT_PENDING; + DEBUG11(printk("qla2x00_abort_command(%ld): done.\n", + ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_abort_device + * + * Input: + * ha = adapter block pointer. + * loop_id = FC loop ID + * lun = SCSI LUN. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_abort_device(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_abort_device(%ld): entered.\n", ha->host_no);) + + mcp->mb[0] = MBC_ABORT_DEVICE; +#if defined(EXTENDED_IDS) + mcp->mb[1] = loop_id; +#else + mcp->mb[1] = loop_id << 8; +#endif + mcp->mb[2] = lun; + mcp->out_mb = MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + /* Issue marker command. */ + qla2x00_marker(ha, loop_id, lun, MK_SYNC_ID_LUN); + + if (rval != QLA_SUCCESS) { + set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + if (ha->dpc_wait && !ha->dpc_active) + up(ha->dpc_wait); + DEBUG2_3_11(printk("qla2x00_abort_device(%ld): failed=%x.\n", + ha->host_no, rval);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_abort_device(%ld): done.\n", + ha->host_no);) + } + + return rval; +} + +#if USE_ABORT_TGT +/* + * qla2x00_abort_target + * Issue abort target mailbox command. + * + * Input: + * ha = adapter block pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_abort_target(fc_port_t *fcport) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_abort_target(%ld): entered.\n", + fcport->ha->host_no);) + + if (fcport == NULL) { + /* no target to abort */ + return 0; + } + + mcp->mb[0] = MBC_ABORT_TARGET; +#if defined(EXTENDED_IDS) + mcp->mb[1] = fcport->loop_id; +#else + mcp->mb[1] = fcport->loop_id << 8; +#endif + mcp->mb[2] = fcport->ha->loop_reset_delay; + mcp->out_mb = MBX_2|MBX_1|MBX_0; +#if defined(EXTENDED_IDS) + mcp->mb[10] = 0; + mcp->out_mb |= MBX_10; +#endif + mcp->in_mb = MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(fcport->ha, mcp); + + /* Issue marker command. */ + fcport->ha->marker_needed = 1; + + if (rval != QLA_SUCCESS) { + DEBUG2_3_11(printk("qla2x00_abort_target(%ld): failed=%x.\n", + fcport->ha->host_no, rval);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_abort_target(%ld): done.\n", + fcport->ha->host_no);) + } + + return rval; +} +#endif + +/* + * qla2x00_target_reset + * Issue target reset mailbox command. + * + * Input: + * ha = adapter block pointer. + * TARGET_QUEUE_LOCK must be released. + * ADAPTER_STATE_LOCK must be released. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_target_reset(scsi_qla_host_t *ha, uint16_t b, uint16_t t) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + os_tgt_t *tgt; + + DEBUG11(printk("qla2x00_target_reset(%ld): entered.\n", ha->host_no);) + + tgt = TGT_Q(ha, t); + if (tgt->fcport == NULL) { + /* no target to abort */ + return 0; + } + if (atomic_read(&tgt->fcport->state) != FCS_ONLINE) { + /* target not online */ + return 0; + } + + mcp->mb[0] = MBC_TARGET_RESET; +#if defined(EXTENDED_IDS) + mcp->mb[1] = tgt->fcport->loop_id; +#else + mcp->mb[1] = tgt->fcport->loop_id << 8; +#endif + mcp->mb[2] = ha->loop_reset_delay; + mcp->out_mb = MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("qla2x00_target_reset(%ld): failed=%x.\n", + ha->host_no, rval);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_target_reset(%ld): done.\n", + ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_get_adapter_id + * Get adapter ID and topology. + * + * Input: + * ha = adapter block pointer. + * id = pointer for loop ID. + * al_pa = pointer for AL_PA. + * area = pointer for area. + * domain = pointer for domain. + * top = pointer for topology. + * TARGET_QUEUE_LOCK must be released. + * ADAPTER_STATE_LOCK must be released. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_get_adapter_id(scsi_qla_host_t *ha, uint16_t *id, uint8_t *al_pa, + uint8_t *area, uint8_t *domain, uint16_t *top) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_get_adapter_id(%ld): entered.\n", + ha->host_no);) + + mcp->mb[0] = MBC_GET_ADAPTER_LOOP_ID; + mcp->out_mb = MBX_0; + mcp->in_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + /* Return data. */ + *id = mcp->mb[1]; + *al_pa = LSB(mcp->mb[2]); + *area = MSB(mcp->mb[2]); + *domain = LSB(mcp->mb[3]); + *top = mcp->mb[6]; + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("qla2x00_get_adapter_id(%ld): failed=%x.\n", + ha->host_no, rval);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_get_adapter_id(%ld): done.\n", + ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_get_retry_cnt + * Get current firmware login retry count and delay. + * + * Input: + * ha = adapter block pointer. + * retry_cnt = pointer to login retry count. + * tov = pointer to login timeout value. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_get_retry_cnt(scsi_qla_host_t *ha, uint8_t *retry_cnt, uint8_t *tov, + uint16_t *r_a_tov) +{ + int rval; + uint16_t ratov; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_get_retry_cnt(%ld): entered.\n", + ha->host_no);) + + mcp->mb[0] = MBC_GET_RETRY_COUNT; + mcp->out_mb = MBX_0; + mcp->in_mb = MBX_3|MBX_2|MBX_1|MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("qla2x00_get_retry_cnt(%ld): failed = %x.\n", + ha->host_no, mcp->mb[0]);) + } else { + /* Convert returned data and check our values. */ + *r_a_tov = mcp->mb[3] / 2; + ratov = (mcp->mb[3]/2) / 10; /* mb[3] value is in 100ms */ + if (mcp->mb[1] * ratov > (*retry_cnt) * (*tov)) { + /* Update to the larger values */ + *retry_cnt = (uint8_t)mcp->mb[1]; + *tov = ratov; + } + + DEBUG11(printk("qla2x00_get_retry_cnt(%ld): done. mb3=%d " + "ratov=%d.\n", ha->host_no, mcp->mb[3], ratov);) + } + + return rval; +} + +/* + * qla2x00_loopback_test + * Send out a LOOPBACK mailbox command. + * + * Input: + * ha = adapter block pointer. + * retry_cnt = pointer to login retry count. + * tov = pointer to login timeout value. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_loopback_test(scsi_qla_host_t *ha, INT_LOOPBACK_REQ *req, + uint16_t *ret_mb) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_send_loopback: req.Options=%x iterations=%x " + "MAILBOX_CNT=%d.\n", req->Options, req->IterationCount, + MAILBOX_REGISTER_COUNT);) + + memset(mcp->mb, 0 , sizeof(mcp->mb)); + + mcp->mb[0] = MBC_DIAGNOSTIC_LOOP_BACK; + mcp->mb[1] = req->Options | MBX_6; + mcp->mb[10] = LSW(req->TransferCount); + mcp->mb[11] = MSW(req->TransferCount); + mcp->mb[14] = LSW(ha->ioctl_mem_phys); /* send data address */ + mcp->mb[15] = MSW(ha->ioctl_mem_phys); + mcp->mb[20] = LSW(MSD(ha->ioctl_mem_phys)); + mcp->mb[21] = MSW(MSD(ha->ioctl_mem_phys)); + mcp->mb[16] = LSW(ha->ioctl_mem_phys); /* rcv data address */ + mcp->mb[17] = MSW(ha->ioctl_mem_phys); + mcp->mb[6] = LSW(MSD(ha->ioctl_mem_phys)); + mcp->mb[7] = MSW(MSD(ha->ioctl_mem_phys)); + mcp->mb[18] = LSW(req->IterationCount); /* iteration count lsb */ + mcp->mb[19] = MSW(req->IterationCount); /* iteration count msb */ + mcp->out_mb = MBX_21|MBX_20|MBX_19|MBX_18|MBX_17|MBX_16|MBX_15| + MBX_14|MBX_13|MBX_12|MBX_11|MBX_10|MBX_7|MBX_6|MBX_1|MBX_0; + mcp->in_mb = MBX_19|MBX_18|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->buf_size = req->TransferCount; + mcp->flags = MBX_DMA_OUT|MBX_DMA_IN|IOCTL_CMD; + mcp->tov = 30; + rval = qla2x00_mailbox_command(ha, mcp); + + /* Always copy back return mailbox values. */ + memcpy((void *)ret_mb, (void *)mcp->mb, sizeof(mcp->mb)); + + if (rval != QLA_SUCCESS) { + /* Empty. */ + DEBUG2_3_11(printk( + "qla2x00_loopback_test(%ld): mailbox command FAILED=%x.\n", + ha->host_no, mcp->mb[0]);) + } else { + /* Empty. */ + DEBUG11(printk( + "qla2x00_loopback_test(%ld): done.\n", ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_echo_test + * Send out a DIAGNOSTIC ECHO mailbox command. + * + * Input: + * ha = adapter block pointer. + * retry_cnt = pointer to login retry count. + * tov = pointer to login timeout value. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_echo_test(scsi_qla_host_t *ha, INT_LOOPBACK_REQ *req, uint16_t *ret_mb) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + memset(mcp->mb, 0 , sizeof(mcp->mb)); + + mcp->mb[0] = MBC_DIAGNOSTIC_ECHO; + mcp->mb[1] = BIT_6; /* use 64bit DMA addr */ + mcp->mb[10] = req->TransferCount; + mcp->mb[14] = LSW(ha->ioctl_mem_phys); /* send data address */ + mcp->mb[15] = MSW(ha->ioctl_mem_phys); + mcp->mb[20] = LSW(MSD(ha->ioctl_mem_phys)); + mcp->mb[21] = MSW(MSD(ha->ioctl_mem_phys)); + mcp->mb[16] = LSW(ha->ioctl_mem_phys); /* rcv data address */ + mcp->mb[17] = MSW(ha->ioctl_mem_phys); + mcp->mb[6] = LSW(MSD(ha->ioctl_mem_phys)); + mcp->mb[7] = MSW(MSD(ha->ioctl_mem_phys)); + mcp->out_mb = MBX_21|MBX_20|MBX_17|MBX_16|MBX_15|MBX_14|MBX_10| + MBX_7|MBX_6|MBX_1|MBX_0; + mcp->in_mb = MBX_0; + mcp->buf_size = req->TransferCount; + mcp->flags = MBX_DMA_OUT|MBX_DMA_IN|IOCTL_CMD; + mcp->tov = 30; + rval = qla2x00_mailbox_command(ha, mcp); + + /* Always copy back return mailbox values. */ + memcpy((void *)ret_mb, (void *)mcp->mb, sizeof(mcp->mb)); + + if (rval != QLA_SUCCESS) { + /* Empty. */ + DEBUG2_3_11(printk( + "%s(%ld): mailbox command FAILED=%x.\n", __func__, + ha->host_no, mcp->mb[0]);) + } else { + /* Empty. */ + DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_init_firmware + * Initialize adapter firmware. + * + * Input: + * ha = adapter block pointer. + * dptr = Initialization control block pointer. + * size = size of initialization control block. + * TARGET_QUEUE_LOCK must be released. + * ADAPTER_STATE_LOCK must be released. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_init_firmware(scsi_qla_host_t *ha, uint16_t size) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_init_firmware(%ld): entered.\n", + ha->host_no);) + + mcp->mb[0] = MBC_INITIALIZE_FIRMWARE; + mcp->mb[2] = MSW(ha->init_cb_dma); + mcp->mb[3] = LSW(ha->init_cb_dma); + mcp->mb[4] = 0; + mcp->mb[5] = 0; + mcp->mb[6] = MSW(MSD(ha->init_cb_dma)); + mcp->mb[7] = LSW(MSD(ha->init_cb_dma)); + mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_0; + mcp->in_mb = MBX_5|MBX_4|MBX_0; + mcp->buf_size = size; + mcp->flags = MBX_DMA_OUT; + mcp->tov = 30; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("qla2x00_init_firmware(%ld): failed=%x " + "mb0=%x.\n", + ha->host_no, rval, mcp->mb[0]);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_init_firmware(%ld): done.\n", + ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_get_port_database + * Issue normal/enhanced get port database mailbox command + * and copy device name as necessary. + * + * Input: + * ha = adapter state pointer. + * dev = structure pointer. + * opt = enhanced cmd option byte. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_get_port_database(scsi_qla_host_t *ha, fc_port_t *fcport, uint8_t opt) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + port_database_t *pd; + dma_addr_t pd_dma; + + DEBUG11(printk("qla2x00_get_port_database(%ld): entered.\n", + ha->host_no);) + + pd = pci_alloc_consistent(ha->pdev, PORT_DATABASE_SIZE, &pd_dma); + if (pd == NULL) { + DEBUG2_3_11(printk("qla2x00_get_port_database(%ld): **** " + "Mem Alloc Failed ****", ha->host_no);) + return QLA_MEMORY_ALLOC_FAILED; + } + memset(pd, 0, PORT_DATABASE_SIZE); + + if (opt != 0) + mcp->mb[0] = MBC_ENHANCED_GET_PORT_DATABASE; + else + mcp->mb[0] = MBC_GET_PORT_DATABASE; + +#if defined(EXTENDED_IDS) + mcp->mb[1] = fcport->loop_id; +#else + mcp->mb[1] = fcport->loop_id << 8 | opt; +#endif + mcp->mb[2] = MSW(pd_dma); + mcp->mb[3] = LSW(pd_dma); + mcp->mb[6] = MSW(MSD(pd_dma)); + mcp->mb[7] = LSW(MSD(pd_dma)); + mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; +#if defined(EXTENDED_IDS) + mcp->mb[10] = opt; + mcp->out_mb |= MBX_10; +#endif + mcp->in_mb = MBX_0; + mcp->buf_size = PORT_DATABASE_SIZE; + mcp->flags = MBX_DMA_IN; + mcp->tov = ha->login_timeout * 2; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval == QLA_SUCCESS) { + /* Names are big endian. */ + memcpy(fcport->node_name, pd->node_name, WWN_SIZE); + memcpy(fcport->port_name, pd->port_name, WWN_SIZE); + + /* Get port_id of device. */ + fcport->d_id.b.al_pa = pd->port_id[2]; + fcport->d_id.b.area = pd->port_id[3]; + fcport->d_id.b.domain = pd->port_id[0]; + fcport->d_id.b.rsvd_1 = 0; + + /* Check for device require authentication. */ + pd->common_features & BIT_5 ? (fcport->flags |= FCF_AUTH_REQ) : + (fcport->flags &= ~FCF_AUTH_REQ); + + /* If not target must be initiator or unknown type. */ + if ((pd->prli_svc_param_word_3[0] & BIT_4) == 0) { + fcport->port_type = FCT_INITIATOR; + } else { + fcport->port_type = FCT_TARGET; + + /* Check for logged in. */ + if (pd->master_state != PD_STATE_PORT_LOGGED_IN && + pd->slave_state != PD_STATE_PORT_LOGGED_IN) + rval = QLA_FUNCTION_FAILED; + } + } + + pci_free_consistent(ha->pdev, PORT_DATABASE_SIZE, pd, pd_dma); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("qla2x00_get_port_database(%ld): " + "failed=%x.\n", ha->host_no, rval);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_get_port_database(%ld): done.\n", + ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_get_firmware_state + * Get adapter firmware state. + * + * Input: + * ha = adapter block pointer. + * dptr = pointer for firmware state. + * TARGET_QUEUE_LOCK must be released. + * ADAPTER_STATE_LOCK must be released. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_get_firmware_state(scsi_qla_host_t *ha, uint16_t *dptr) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_get_firmware_state(%ld): entered.\n", + ha->host_no);) + + mcp->mb[0] = MBC_GET_FIRMWARE_STATE; + mcp->out_mb = MBX_0; + mcp->in_mb = MBX_2|MBX_1|MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + /* Return firmware state. */ + *dptr = mcp->mb[1]; + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("qla2x00_get_firmware_state(%ld): " + "failed=%x.\n", ha->host_no, rval);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_get_firmware_state(%ld): done.\n", + ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_get_port_name + * Issue get port name mailbox command. + * Returned name is in big endian format. + * + * Input: + * ha = adapter block pointer. + * loop_id = loop ID of device. + * name = pointer for name. + * TARGET_QUEUE_LOCK must be released. + * ADAPTER_STATE_LOCK must be released. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_get_port_name(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t *name, + uint8_t opt) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_get_port_name(%ld): entered.\n", + ha->host_no);) + + mcp->mb[0] = MBC_GET_PORT_NAME; +#if defined(EXTENDED_IDS) + mcp->mb[1] = loop_id; +#else + mcp->mb[1] = loop_id << 8 | opt; +#endif + mcp->out_mb = MBX_1|MBX_0; +#if defined(EXTENDED_IDS) + mcp->mb[10] = opt; + mcp->out_mb |= MBX_10; +#endif + mcp->in_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("qla2x00_get_port_name(%ld): failed=%x.\n", + ha->host_no, rval);) + } else { + if (name != NULL) { + /* This function returns name in big endian. */ + name[0] = LSB(mcp->mb[2]); + name[1] = MSB(mcp->mb[2]); + name[2] = LSB(mcp->mb[3]); + name[3] = MSB(mcp->mb[3]); + name[4] = LSB(mcp->mb[6]); + name[5] = MSB(mcp->mb[6]); + name[6] = LSB(mcp->mb[7]); + name[7] = MSB(mcp->mb[7]); + } + + DEBUG11(printk("qla2x00_get_port_name(%ld): done.\n", + ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_get_link_status + * + * Input: + * ha = adapter block pointer. + * loop_id = device loop ID. + * ret_buf = pointer to link status return buffer. + * + * Returns: + * 0 = success. + * BIT_0 = mem alloc error. + * BIT_1 = mailbox error. + */ +uint8_t +qla2x00_get_link_status(scsi_qla_host_t *ha, uint8_t loop_id, void *ret_buf, + uint16_t *status) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + link_stat_t *stat_buf; + dma_addr_t phys_address = 0; + + + DEBUG11(printk("qla2x00_get_link_status(%ld): entered.\n", + ha->host_no);) + + stat_buf = pci_alloc_consistent(ha->pdev, sizeof(link_stat_t), + &phys_address); + if (stat_buf == NULL) { + DEBUG2_3_11(printk("qla2x00_get_link_status(%ld): Failed to " + "allocate memory.\n", ha->host_no)); + return BIT_0; + } + memset(stat_buf, 0, sizeof(link_stat_t)); + + mcp->mb[0] = MBC_GET_LINK_STATUS; +#if defined(EXTENDED_IDS) + mcp->mb[1] = loop_id; +#else + mcp->mb[1] = loop_id << 8; +#endif + mcp->mb[2] = MSW(phys_address); + mcp->mb[3] = LSW(phys_address); + mcp->mb[6] = MSW(MSD(phys_address)); + mcp->mb[7] = LSW(MSD(phys_address)); + mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; +#if defined(EXTENDED_IDS) + mcp->mb[10] = 0; + mcp->out_mb |= MBX_10; +#endif + mcp->in_mb = MBX_0; + mcp->tov = 30; + mcp->flags = IOCTL_CMD; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval == QLA_SUCCESS) { + if (mcp->mb[0] != MBS_COMMAND_COMPLETE) { + DEBUG2_3_11(printk("qla2x00_get_link_status(%ld): cmd " + "failed. mbx0=%x.\n", ha->host_no, mcp->mb[0]);) + status[0] = mcp->mb[0]; + rval = BIT_1; + } else { + /* copy over data */ + memcpy(ret_buf, stat_buf,sizeof(link_stat_t)); + DEBUG(printk("qla2x00_get_link_status(%ld): stat dump: " + "fail_cnt=%d loss_sync=%d loss_sig=%d seq_err=%d " + "inval_xmt_word=%d inval_crc=%d.\n", + ha->host_no, + stat_buf->link_fail_cnt, stat_buf->loss_sync_cnt, + stat_buf->loss_sig_cnt, stat_buf->prim_seq_err_cnt, + stat_buf->inval_xmit_word_cnt, + stat_buf->inval_crc_cnt);) + DEBUG11(printk("qla2x00_get_link_status(%ld): stat " + "dump: fail_cnt=%d loss_sync=%d loss_sig=%d " + "seq_err=%d inval_xmt_word=%d inval_crc=%d.\n", + ha->host_no, + stat_buf->link_fail_cnt, stat_buf->loss_sync_cnt, + stat_buf->loss_sig_cnt, stat_buf->prim_seq_err_cnt, + stat_buf->inval_xmit_word_cnt, + stat_buf->inval_crc_cnt);) + } + } else { + /* Failed. */ + DEBUG2_3_11(printk("qla2x00_get_link_status(%ld): failed=%x.\n", + ha->host_no, rval);) + rval = BIT_1; + } + + pci_free_consistent(ha->pdev, sizeof(link_stat_t), + stat_buf, phys_address); + + return rval; +} + +/* + * qla2x00_lip_reset + * Issue LIP reset mailbox command. + * + * Input: + * ha = adapter block pointer. + * TARGET_QUEUE_LOCK must be released. + * ADAPTER_STATE_LOCK must be released. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_lip_reset(scsi_qla_host_t *ha) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_lip_reset(%ld): entered.\n", + ha->host_no);) + + mcp->mb[0] = MBC_LIP_RESET; +#if defined(EXTENDED_IDS) + mcp->mb[1] = 0x00ff; +#else + mcp->mb[1] = 0xff00; +#endif + mcp->mb[2] = ha->loop_reset_delay; + mcp->mb[3] = 0; + mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; +#if defined(EXTENDED_IDS) + mcp->mb[10] = 0; + mcp->out_mb |= MBX_10; +#endif + mcp->in_mb = MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("qla2x00_lip_reset(%ld): failed=%x.\n", + ha->host_no, rval);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_lip_reset(%ld): done.\n", ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_send_sns + * Send SNS command. + * + * Input: + * ha = adapter block pointer. + * sns = pointer for command. + * cmd_size = command size. + * buf_size = response/command size. + * TARGET_QUEUE_LOCK must be released. + * ADAPTER_STATE_LOCK must be released. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_send_sns(scsi_qla_host_t *ha, dma_addr_t sns_phys_address, + uint16_t cmd_size, size_t buf_size) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_send_sns(%ld): entered.\n", + ha->host_no);) + + DEBUG11(printk("qla2x00_send_sns: retry cnt=%d ratov=%d total " + "tov=%d.\n", ha->retry_count, ha->login_timeout, mcp->tov);) + + mcp->mb[0] = MBC_SEND_SNS_COMMAND; + mcp->mb[1] = cmd_size; + mcp->mb[2] = MSW(sns_phys_address); + mcp->mb[3] = LSW(sns_phys_address); + mcp->mb[6] = MSW(MSD(sns_phys_address)); + mcp->mb[7] = LSW(MSD(sns_phys_address)); + mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_0|MBX_1; + mcp->buf_size = buf_size; + mcp->flags = MBX_DMA_OUT|MBX_DMA_IN; + /*mcp->tov = ha->retry_count * ha->login_timeout * 2;*/ + mcp->tov = ha->login_timeout * 2; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG(printk("qla2x00_send_sns(%ld): failed=%x mb[0]=%x " + "mb[1]=%x.\n", ha->host_no, rval, mcp->mb[0], mcp->mb[1]);) + DEBUG2_3_11(printk("qla2x00_send_sns(%ld): failed=%x mb[0]=%x " + "mb[1]=%x.\n", ha->host_no, rval, mcp->mb[0], mcp->mb[1]);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_send_sns(%ld): done.\n", ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_login_fabric + * Issue login fabric port mailbox command. + * + * Input: + * ha = adapter block pointer. + * loop_id = device loop ID. + * domain = device domain. + * area = device area. + * al_pa = device AL_PA. + * status = pointer for return status. + * opt = command options. + * TARGET_QUEUE_LOCK must be released. + * ADAPTER_STATE_LOCK must be released. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_login_fabric(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t domain, + uint8_t area, uint8_t al_pa, uint16_t *mb, uint8_t opt) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_login_fabric(%ld): entered.\n", ha->host_no);) + + mcp->mb[0] = MBC_LOGIN_FABRIC_PORT; +#if defined(EXTENDED_IDS) + mcp->mb[1] = loop_id; +#else + mcp->mb[1] = (loop_id << 8) | opt; +#endif + mcp->mb[2] = domain; + mcp->mb[3] = area << 8 | al_pa; + mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; +#if defined(EXTENDED_IDS) + mcp->mb[10] = opt; + mcp->out_mb |= MBX_10; +#endif + mcp->in_mb = MBX_7|MBX_6|MBX_2|MBX_1|MBX_0; + /*mcp->tov = ha->retry_count * ha->login_timeout * 2;*/ + mcp->tov = ha->login_timeout * 2; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + /* Return mailbox statuses. */ + if (mb != NULL) { + mb[0] = mcp->mb[0]; + mb[1] = mcp->mb[1]; + mb[2] = mcp->mb[2]; + mb[6] = mcp->mb[6]; + mb[7] = mcp->mb[7]; + } + + if (rval != QLA_SUCCESS) { + /* RLU tmp code: need to change main mailbox_command function to + * return ok even when the mailbox completion value is not + * SUCCESS. The caller needs to be responsible to interpret + * the return values of this mailbox command if we're not + * to change too much of the existing code. + */ + if (mcp->mb[0] == 0x4001 || mcp->mb[0] == 0x4002 || + mcp->mb[0] == 0x4003 || mcp->mb[0] == 0x4005 || + mcp->mb[0] == 0x4006) + rval = QLA_SUCCESS; + + /*EMPTY*/ + DEBUG2_3_11(printk("qla2x00_login_fabric(%ld): failed=%x " + "mb[0]=%x mb[1]=%x mb[2]=%x.\n", ha->host_no, rval, + mcp->mb[0], mcp->mb[1], mcp->mb[2]);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_login_fabric(%ld): done.\n", + ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_login_local_device + * Issue login loop port mailbox command. + * + * Input: + * ha = adapter block pointer. + * loop_id = device loop ID. + * opt = command options. + * + * Returns: + * Return status code. + * + * Context: + * Kernel context. + * + */ +int +qla2x00_login_local_device(scsi_qla_host_t *ha, uint16_t loop_id, + uint16_t *mb_ret, uint8_t opt) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG3(printk("%s(%ld): entered.\n", __func__, ha->host_no);) + + mcp->mb[0] = MBC_LOGIN_LOOP_PORT; +#if defined(EXTENDED_IDS) + mcp->mb[1] = loop_id; +#else + mcp->mb[1] = (loop_id << 8); +#endif + mcp->mb[2] = opt; + mcp->out_mb = MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_7|MBX_6|MBX_1|MBX_0; + mcp->tov = ha->login_timeout * 2; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + /* Return mailbox statuses. */ + if (mb_ret != NULL) { + mb_ret[0] = mcp->mb[0]; + mb_ret[1] = mcp->mb[1]; + mb_ret[6] = mcp->mb[6]; + mb_ret[7] = mcp->mb[7]; + } + + if (rval != QLA_SUCCESS) { + /* AV tmp code: need to change main mailbox_command function to + * return ok even when the mailbox completion value is not + * SUCCESS. The caller needs to be responsible to interpret + * the return values of this mailbox command if we're not + * to change too much of the existing code. + */ + if (mcp->mb[0] == 0x4005 || mcp->mb[0] == 0x4006) + rval = QLA_SUCCESS; + + DEBUG(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x " + "mb[6]=%x mb[7]=%x.\n", __func__, ha->host_no, rval, + mcp->mb[0], mcp->mb[1], mcp->mb[6], mcp->mb[7]);) + DEBUG2_3(printk("%s(%ld): failed=%x mb[0]=%x mb[1]=%x " + "mb[6]=%x mb[7]=%x.\n", __func__, ha->host_no, rval, + mcp->mb[0], mcp->mb[1], mcp->mb[6], mcp->mb[7]);) + } else { + /*EMPTY*/ + DEBUG3(printk("%s(%ld): done.\n", __func__, ha->host_no);) + } + + return (rval); +} + +/* + * qla2x00_fabric_logout + * Issue logout fabric port mailbox command. + * + * Input: + * ha = adapter block pointer. + * loop_id = device loop ID. + * TARGET_QUEUE_LOCK must be released. + * ADAPTER_STATE_LOCK must be released. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_fabric_logout(scsi_qla_host_t *ha, uint16_t loop_id) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_fabric_logout(%ld): entered.\n", + ha->host_no);) + + mcp->mb[0] = MBC_LOGOUT_FABRIC_PORT; +#if defined(EXTENDED_IDS) + mcp->mb[1] = loop_id; +#else + mcp->mb[1] = loop_id << 8; +#endif + mcp->out_mb = MBX_1|MBX_0; +#if defined(EXTENDED_IDS) + mcp->mb[10] = 0; + mcp->out_mb |= MBX_10; +#endif + mcp->in_mb = MBX_1|MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("qla2x00_fabric_logout(%ld): failed=%x " + "mbx1=%x.\n", ha->host_no, rval, mcp->mb[1]);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_fabric_logout(%ld): done.\n", + ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_full_login_lip + * Issue full login LIP mailbox command. + * + * Input: + * ha = adapter block pointer. + * TARGET_QUEUE_LOCK must be released. + * ADAPTER_STATE_LOCK must be released. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_full_login_lip(scsi_qla_host_t *ha) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_full_login_lip(%ld): entered.\n", + ha->host_no);) + + mcp->mb[0] = MBC_LIP_FULL_LOGIN; + mcp->mb[1] = 0; + mcp->mb[2] = 0; + mcp->mb[3] = 0; + mcp->out_mb = MBX_3|MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("qla2x00_full_login_lip(%ld): failed=%x.\n", + ha->instance, rval);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_full_login_lip(%ld): done.\n", + ha->host_no);) + } + + return rval; +} + +/* + * qla2x00_get_id_list + * + * Input: + * ha = adapter block pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_get_id_list(scsi_qla_host_t *ha, void *id_list, dma_addr_t id_list_dma, + uint16_t *entries) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_get_id_list(%ld): entered.\n", + ha->host_no);) + + if (id_list == NULL) + return QLA_FUNCTION_FAILED; + + mcp->mb[0] = MBC_GET_ID_LIST; + mcp->mb[1] = MSW(id_list_dma); + mcp->mb[2] = LSW(id_list_dma); + mcp->mb[3] = MSW(MSD(id_list_dma)); + mcp->mb[6] = LSW(MSD(id_list_dma)); + mcp->out_mb = MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_1|MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("qla2x00_get_id_list(%ld): failed=%x.\n", + ha->host_no, rval);) + } else { + *entries = mcp->mb[1]; + DEBUG11(printk("qla2x00_get_id_list(%ld): done.\n", + ha->host_no);) + } + + return rval; +} + +#if 0 /* not yet needed */ +int +qla2x00_dump_ram(scsi_qla_host_t *ha, uint32_t risc_address, + dma_addr_t ispdump_dma, uint32_t size) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + mcp->mb[0] = MBC_DUMP_RAM; + mcp->mb[1] = risc_address & 0xffff; + mcp->mb[2] = MSW(ispdump_dma); + mcp->mb[3] = LSW(ispdump_dma); + mcp->mb[4] = 0; + mcp->mb[6] = MSW(MSD(ispdump_dma)); + mcp->mb[7] = LSW(MSD(ispdump_dma)); + mcp->out_mb = MBX_7|MBX_6|MBX_4|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + return rval; +} +#endif + +/* + * qla2x00_lun_reset + * Issue lun reset mailbox command. + * + * Input: + * ha = adapter block pointer. + * loop_id = device loop ID. + * lun = lun to be reset. + * TARGET_QUEUE_LOCK must be released. + * ADAPTER_STATE_LOCK must be released. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_lun_reset(scsi_qla_host_t *ha, uint16_t loop_id, uint16_t lun) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + ENTER("qla2x00_lun_reset"); + + mcp->mb[0] = MBC_LUN_RESET; +#if defined(EXTENDED_IDS) + mcp->mb[1] = loop_id; +#else + mcp->mb[1] = loop_id << 8; +#endif + mcp->mb[2] = lun; + mcp->out_mb = MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + printk(KERN_WARNING "qla2x00_lun_reset(%d): failed = %d", + (int)ha->instance, rval); + } else { + /*EMPTY*/ + LEAVE("qla2x00_lun_reset: exiting normally"); + } + + return rval; +} + +/* + * qla2x00_send_rnid_mbx + * Issue RNID ELS using mailbox command + * + * Input: + * ha = adapter state pointer. + * loop_id = loop ID of the target device. + * data_fmt = currently supports only 0xDF. + * buffer = buffer pointer. + * buf_size = size of buffer. + * mb_reg = pointer to return mailbox registers. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_send_rnid_mbx(scsi_qla_host_t *ha, uint16_t loop_id, uint8_t data_fmt, + dma_addr_t buf_phys_addr, size_t buf_size, uint16_t *mb_reg) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_send_rnid_mbx(%ld): entered.\n", + ha->host_no);) + + mcp->mb[0] = MBC_SEND_RNID_ELS; +#if defined(EXTENDED_IDS) + mcp->mb[1] = loop_id; +#else + mcp->mb[1] = (loop_id << 8) | data_fmt; +#endif + mcp->mb[2] = MSW(buf_phys_addr); + mcp->mb[3] = LSW(buf_phys_addr); + mcp->mb[6] = MSW(MSD(buf_phys_addr)); + mcp->mb[7] = LSW(MSD(buf_phys_addr)); + mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; +#if defined(EXTENDED_IDS) + mcp->mb[10] = data_fmt; + mcp->out_mb |= MBX_10; +#endif + mcp->in_mb = MBX_1|MBX_0; + mcp->buf_size = buf_size; + mcp->flags = MBX_DMA_IN; + mcp->tov = 30; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + memcpy(mb_reg, mcp->mb, 2 * 2); /* 2 status regs */ + + DEBUG2_3_11(printk("qla2x00_send_rnid_mbx(%ld): failed=%x " + "mb[1]=%x.\n", + ha->host_no, mcp->mb[0], mcp->mb[1]);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_send_rnid_mbx(%ld): done.\n", + ha->host_no);) + } + + return (rval); +} + +/* + * qla2x00_set_rnid_params_mbx + * Set RNID parameters using mailbox command + * + * Input: + * ha = adapter state pointer. + * buffer = buffer pointer. + * buf_size = size of buffer. + * mb_reg = pointer to return mailbox registers. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_set_rnid_params_mbx(scsi_qla_host_t *ha, dma_addr_t buf_phys_addr, + size_t buf_size, uint16_t *mb_reg) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_set_rnid_params_mbx(%ld): entered.\n", + ha->host_no);) + + mcp->mb[0] = MBC_SET_RNID_PARAMS; + mcp->mb[1] = 0; + mcp->mb[2] = MSW(buf_phys_addr); + mcp->mb[3] = LSW(buf_phys_addr); + mcp->mb[6] = MSW(MSD(buf_phys_addr)); + mcp->mb[7] = LSW(MSD(buf_phys_addr)); + mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_1|MBX_0; + mcp->buf_size = buf_size; + mcp->flags = MBX_DMA_OUT; + mcp->tov = 30; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + memcpy(mb_reg, mcp->mb, 2 * 2); /* 2 status regs */ + + DEBUG2_3_11(printk("qla2x00_set_rnid_params_mbx(%ld): " + "failed=%x mb[1]=%x.\n", ha->host_no, mcp->mb[0], + mcp->mb[1]);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_set_rnid_params_mbx(%ld): done.\n", + ha->host_no);) + } + + return (rval); +} + +/* + * qla2x00_get_rnid_params_mbx + * Get RNID parameters using mailbox command + * + * Input: + * ha = adapter state pointer. + * buffer = buffer pointer. + * buf_size = size of buffer. + * mb_reg = pointer to return mailbox registers. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_get_rnid_params_mbx(scsi_qla_host_t *ha, dma_addr_t buf_phys_addr, + size_t buf_size, uint16_t *mb_reg) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("qla2x00_get_rnid_params_mbx(%ld): entered.\n", + ha->host_no);) + + mcp->mb[0] = MBC_GET_RNID_PARAMS; + mcp->mb[1] = 0; + mcp->mb[2] = MSW(buf_phys_addr); + mcp->mb[3] = LSW(buf_phys_addr); + mcp->mb[6] = MSW(MSD(buf_phys_addr)); + mcp->mb[7] = LSW(MSD(buf_phys_addr)); + mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->in_mb = MBX_1|MBX_0; + mcp->buf_size = buf_size; + mcp->flags = MBX_DMA_IN; + mcp->tov = 30; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + memcpy(mb_reg, mcp->mb, 2 * 2); /* 2 status regs */ + + DEBUG2_3_11(printk("qla2x00_get_rnid_params_mbx(%ld): " + "failed=%x mb[1]=%x.\n", ha->host_no, mcp->mb[0], + mcp->mb[1]);) + } else { + /*EMPTY*/ + DEBUG11(printk("qla2x00_get_rnid_params_mbx(%ld): done.\n", + ha->host_no);) + } + + return (rval); +} + +/* + * qla2x00_get_resource_cnts + * Get current firmware resource counts. + * + * Input: + * ha = adapter block pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_get_resource_cnts(scsi_qla_host_t *ha, uint16_t *cur_xchg_cnt, + uint16_t *orig_xchg_cnt, uint16_t *cur_iocb_cnt, uint16_t *orig_iocb_cnt) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + + DEBUG11(printk("%s(%ld): entered.\n", __func__, ha->host_no)); + + mcp->mb[0] = MBC_GET_RESOURCE_COUNTS; + mcp->out_mb = MBX_0; + mcp->in_mb = MBX_10|MBX_7|MBX_6|MBX_3|MBX_2|MBX_1|MBX_0; + mcp->tov = 30; + mcp->flags = 0; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval != QLA_SUCCESS) { + /*EMPTY*/ + DEBUG2_3_11(printk("%s(%ld): failed = %x.\n", __func__, + ha->host_no, mcp->mb[0]);) + } else { + DEBUG11(printk("%s(%ld): done. mb1=%x mb2=%x mb3=%x mb6=%x " + "mb7=%x mb10=%x.\n", __func__, ha->host_no, + mcp->mb[1], mcp->mb[2], mcp->mb[3], mcp->mb[6], mcp->mb[7], + mcp->mb[10])); + + if (cur_xchg_cnt) + *cur_xchg_cnt = mcp->mb[3]; + if (orig_xchg_cnt) + *orig_xchg_cnt = mcp->mb[6]; + if (cur_iocb_cnt) + *cur_iocb_cnt = mcp->mb[7]; + if (orig_iocb_cnt) + *orig_iocb_cnt = mcp->mb[10]; + } + + return (rval); +} + +#if defined(QL_DEBUG_LEVEL_3) +/* + * qla2x00_get_fcal_position_map + * Get FCAL (LILP) position map using mailbox command + * + * Input: + * ha = adapter state pointer. + * pos_map = buffer pointer (can be NULL). + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_get_fcal_position_map(scsi_qla_host_t *ha, char *pos_map) +{ + int rval; + mbx_cmd_t mc; + mbx_cmd_t *mcp = &mc; + char *pmap; + dma_addr_t pmap_dma; + + pmap = pci_alloc_consistent(ha->pdev, FCAL_MAP_SIZE, &pmap_dma); + if (pmap == NULL) { + DEBUG2_3_11(printk("%s(%ld): **** Mem Alloc Failed ****", + __func__, ha->host_no)); + return QLA_MEMORY_ALLOC_FAILED; + } + memset(pmap, 0, FCAL_MAP_SIZE); + + mcp->mb[0] = MBC_GET_FC_AL_POSITION_MAP; + mcp->mb[2] = MSW(pmap_dma); + mcp->mb[3] = LSW(pmap_dma); + mcp->mb[6] = MSW(MSD(pmap_dma)); + mcp->mb[7] = LSW(MSD(pmap_dma)); + mcp->out_mb = MBX_7|MBX_6|MBX_3|MBX_2|MBX_0; + mcp->in_mb = MBX_1|MBX_0; + mcp->buf_size = FCAL_MAP_SIZE; + mcp->flags = MBX_DMA_IN; + mcp->tov = ha->login_timeout * 2; + rval = qla2x00_mailbox_command(ha, mcp); + + if (rval == QLA_SUCCESS) { + DEBUG11(printk("%s(%ld): (mb0=%x/mb1=%x) FC/AL Position Map " + "size (%x)\n", __func__, ha->host_no, mcp->mb[0], + mcp->mb[1], (unsigned)pmap[0])); + DEBUG11(qla2x00_dump_buffer(pmap, pmap[0] + 1)); + + if (pos_map) + memcpy(pos_map, pmap, FCAL_MAP_SIZE); + } + pci_free_consistent(ha->pdev, FCAL_MAP_SIZE, pmap, pmap_dma); + + if (rval != QLA_SUCCESS) { + DEBUG2_3_11(printk("%s(%ld): failed=%x.\n", __func__, + ha->host_no, rval)); + } else { + DEBUG11(printk("%s(%ld): done.\n", __func__, ha->host_no)); + } + + return rval; +} +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_os.c 999-mjb/drivers/scsi/qla2xxx/qla_os.c --- 000-virgin/drivers/scsi/qla2xxx/qla_os.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_os.c 2003-11-25 14:18:48.000000000 -0800 @@ -0,0 +1,5561 @@ +/* + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ +#define QLA_MODVERSION +#include "qla_os.h" + +#include "qla_def.h" + +/* + * Driver version + */ +char qla2x00_version_str[40] = { 0 }; + +/* +* Command line options. +*/ +unsigned long qla2x00_verbose = 0; +unsigned long qla2x00_reinit = 1; +unsigned long qla2x00_req_dmp = 0; + +/* + * Stats for all adpaters. + */ +struct _qla2x00stats qla2x00_stats; + +/* + * Ioctl related information. + */ +int num_hosts = 0; +int apiHBAInstance = 0; + +/* + * Module parameter information and variables + */ + +char *ql2xdevconf = NULL; +#if MPIO_SUPPORT +int ql2xretrycount = 30; +#else +int ql2xretrycount = 20; +#endif +int qla2xenbinq = 1; +int ql2xlogintimeout = 20; +int qlport_down_retry = 0; +int ql2xmaxqdepth = 0; +int displayConfig = 0; +int ql2xplogiabsentdevice = 0; +#if defined(ISP2300) +int ql2xintrdelaytimer = 10; +#endif + +/* Enable for failover */ +#if MPIO_SUPPORT +int ql2xfailover = 1; +#else +int ql2xfailover = 0; +#endif + +int ConfigRequired = 0; +int recoveryTime = MAX_RECOVERYTIME; +int failbackTime = MAX_FAILBACKTIME; + +/* Persistent binding type */ +int Bind = BIND_BY_PORT_NAME; + +int ql2xsuspendcount = SUSPEND_COUNT; + +int ql2xdoinitscan = 1; + +int qla2x00_retryq_dmp = 0; + +#if defined(MODULE) +char *ql2xopts = NULL; + +/* insmod qla2100 ql2xopts=verbose" */ +MODULE_PARM(ql2xopts, "s"); +MODULE_PARM_DESC(ql2xopts, + "Additional driver options."); + +MODULE_PARM(ql2xfailover, "i"); +MODULE_PARM_DESC(ql2xfailover, + "Driver failover support: 0 to disable; 1 to enable. " + "Default behaviour based on compile-time option " + "MPIO_SUPPORT."); + +MODULE_PARM(ql2xmaxqdepth, "i"); +MODULE_PARM_DESC(ql2xmaxqdepth, + "Maximum queue depth to report for target devices."); + +MODULE_PARM(ql2xlogintimeout,"i"); +MODULE_PARM_DESC(ql2xlogintimeout, + "Login timeout value in seconds."); + +MODULE_PARM(qlport_down_retry,"i"); +MODULE_PARM_DESC(qlport_down_retry, + "Maximum number of command retries to a port that returns" + "a PORT-DOWN status."); + +MODULE_PARM(ql2xretrycount,"i"); +MODULE_PARM_DESC(ql2xretrycount, + "Maximum number of mid-layer retries allowed for a command. " + "Default value in non-failover mode is 20, " + "in failover mode, 30."); + +MODULE_PARM(displayConfig, "i"); +MODULE_PARM_DESC(displayConfig, + "If 1 then display the configuration used in " + "/etc/modules.conf."); +MODULE_PARM(ql2xplogiabsentdevice, "i"); +MODULE_PARM_DESC(ql2xplogiabsentdevice, + "Option to enable PLOGI to devices that are not present after " + "a Fabric scan. This is needed for several broken switches." + "Default is 0 - no PLOGI. 1 - perfom PLOGI."); + +#if defined(ISP2300) +MODULE_PARM(ql2xintrdelaytimer,"i"); +MODULE_PARM_DESC(ql2xintrdelaytimer, + "ZIO: Waiting time for Firmware before it generates an " + "interrupt to the host to notify completion of request."); +#endif + +MODULE_PARM(ConfigRequired, "i"); +MODULE_PARM_DESC(ConfigRequired, + "If 1, then only configured devices passed in through the" + "ql2xopts parameter will be presented to the OS"); + +MODULE_PARM(recoveryTime, "i"); +MODULE_PARM_DESC(recoveryTime, + "Recovery time in seconds before a target device is sent I/O " + "after a failback is performed."); + +MODULE_PARM(failbackTime, "i"); +MODULE_PARM_DESC(failbackTime, + "Delay in seconds before a failback is performed."); + +MODULE_PARM(Bind, "i"); +MODULE_PARM_DESC(Bind, + "Target persistent binding method: " + "0 by Portname (default); 1 by PortID; 2 by Nodename. "); + +MODULE_PARM(ql2xsuspendcount,"i"); +MODULE_PARM_DESC(ql2xsuspendcount, + "Number of 6-second suspend iterations to perform while a " + "target returns a status. Default is 10 " + "iterations."); + +MODULE_PARM(ql2xdoinitscan, "i"); +MODULE_PARM_DESC(ql2xdoinitscan, + "Signal mid-layer to perform scan after driver load: 0 -- no " + "signal sent to mid-layer."); +#endif + +MODULE_AUTHOR("QLogic Corporation"); +MODULE_DESCRIPTION("QLogic " ISP_NAME " FC-SCSI Host Bus Adapter driver"); +MODULE_LICENSE("GPL"); + + +/* + * Proc structures and functions + */ +struct info_str { + char *buffer; + int length; + off_t offset; + int pos; +}; + +static void copy_mem_info(struct info_str *, char *, int); +static int copy_info(struct info_str *, char *, ...); + + +/* + * List of host adapters + */ +LIST_HEAD(qla_hostlist); +rwlock_t qla_hostlist_lock = RW_LOCK_UNLOCKED; + + +/* + * PCI driver interface definitions + */ +#define ISP21XX_FW_INDEX 0 +#define ISP22XX_FW_INDEX 0 +#define ISP23XX_FW_INDEX 0 +#define ISP232X_FW_INDEX 2 + +static struct qla_fw_info qla_fw_tbl[] = { +#if defined(ISP2100) + /* Start of 21xx firmware list */ + { + .addressing = FW_INFO_ADDR_NORMAL, + .fwcode = &fw2100tp_code01[0], + .fwlen = &fw2100tp_length01, + .fwstart = &fw2100tp_addr01, + }, +#endif + +#if defined(ISP2200) + /* Start of 22xx firmware list */ + { + .addressing = FW_INFO_ADDR_NORMAL, + .fwcode = &fw2200tp_code01[0], + .fwlen = &fw2200tp_length01, + .fwstart = &fw2200tp_addr01, + }, +#endif + +#if defined(ISP2300) + /* Start of 23xx firmware list */ + { + .addressing = FW_INFO_ADDR_NORMAL, + .fwcode = &fw2300tpx_code01[0], + .fwlen = &fw2300tpx_length01, + .fwstart = &fw2300tpx_addr01, + }, + +#if defined(ISP2322) + /* End of 23xx firmware list */ + { FW_INFO_ADDR_NOMORE, }, + + /* Start of 232x firmware list */ + { + .addressing = FW_INFO_ADDR_NORMAL, + .fwcode = &fw2322tpx_code01[0], + .fwlen = &fw2322tpx_length01, + .fwstart = &fw2322tpx_addr01, + }, + { + .addressing = FW_INFO_ADDR_EXTENDED, + .fwcode = &rseqtpx_code01[0], + .fwlen = &rseqtpx_code_length01, + .lfwstart = &rseqtpx_code_addr01, + }, + { + .addressing = FW_INFO_ADDR_EXTENDED, + .fwcode = &xseqtpx_code01[0], + .fwlen = &xseqtpx_code_length01, + .lfwstart = &xseqtpx_code_addr01, + }, +#endif + +#endif + + /* End of firmware list */ + { FW_INFO_ADDR_NOMORE, }, +}; + +#define ISP21XX_BRD_INDEX 0 +#define ISP22XX_BRD_INDEX 0 +#define ISP23XX_BRD_INDEX 0 +#define ISP2312_BRD_INDEX 1 +#define ISP2322_BRD_INDEX 2 + +static struct qla_board_info qla_board_tbl[] = { +#if defined(ISP2100) + { + .name = "ISP2100", + .fwinfo = &qla_fw_tbl[ISP21XX_FW_INDEX], + } +#endif + +#if defined(ISP2200) + { + .name = "ISP2200", + .fwinfo = &qla_fw_tbl[ISP22XX_FW_INDEX], + } +#endif + +#if defined(ISP2300) + { + .name = "ISP2300", + .fwinfo = &qla_fw_tbl[ISP23XX_FW_INDEX], + }, + + { + .name = "ISP2312", + .fwinfo = &qla_fw_tbl[ISP23XX_FW_INDEX], + }, + +#if defined(ISP2322) + { + .name = "ISP2322", + .fwinfo = &qla_fw_tbl[ISP232X_FW_INDEX], + } +#endif +#endif +}; + +static struct pci_device_id qla_pci_tbl[] __devinitdata = { +#if defined(ISP2100) + { + .vendor = QLA2X00_VENDOR_ID, + .device = QLA2100_DEVICE_ID, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data + = (unsigned long)&qla_board_tbl[ISP21XX_BRD_INDEX], + }, +#endif + +#if defined(ISP2200) + { + .vendor = QLA2X00_VENDOR_ID, + .device = QLA2200_DEVICE_ID, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data + = (unsigned long)&qla_board_tbl[ISP22XX_BRD_INDEX], + }, +#endif + +#if defined(ISP2300) + { + .vendor = QLA2X00_VENDOR_ID, + .device = QLA2300_DEVICE_ID, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data + = (unsigned long)&qla_board_tbl[ISP23XX_BRD_INDEX], + }, + + { + .vendor = QLA2X00_VENDOR_ID, + .device = QLA2312_DEVICE_ID, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data + = (unsigned long)&qla_board_tbl[ISP2312_BRD_INDEX], + }, +#if defined(ISP2322) + { + .vendor = QLA2X00_VENDOR_ID, + .device = QLA2322_DEVICE_ID, + .subvendor = PCI_ANY_ID, + .subdevice = PCI_ANY_ID, + .driver_data + = (unsigned long)&qla_board_tbl[ISP2322_BRD_INDEX], + }, +#endif +#endif + {0 , 0} +}; +MODULE_DEVICE_TABLE(pci, qla_pci_tbl); + +static int __devinit qla2x00_probe_device(struct pci_dev *, + const struct pci_device_id *); +static void __devexit qla2x00_remove_device(struct pci_dev *); +static void qla2x00_free_device(scsi_qla_host_t *); + +struct pci_driver qla2x00_pci_driver = { + .name = DRIVER_NAME, + .id_table = qla_pci_tbl, + + .probe = qla2x00_probe_device, + .remove = __devexit_p(qla2x00_remove_device), +}; + + +/* + * SCSI host template entry points + */ +static int qla2xxx_slave_configure(struct scsi_device * device); +extern int qla2x00_ioctl(struct scsi_device *, int , void *); +static int qla2xxx_eh_abort(struct scsi_cmnd *); +static int qla2xxx_eh_device_reset(struct scsi_cmnd *); +static int qla2xxx_eh_bus_reset(struct scsi_cmnd *); +static int qla2xxx_eh_host_reset(struct scsi_cmnd *); +static uint8_t qla2x00_loop_reset(scsi_qla_host_t *ha); +static int qla2x00_device_reset(scsi_qla_host_t *, fc_port_t *); + +static int qla2x00_proc_info(struct Scsi_Host *, char *, char **, + off_t, int, int); + +static uint8_t qla2x00_register_with_Linux(scsi_qla_host_t *, uint8_t); + +#if defined (CONFIG_SCSIFCHOTSWAP) || defined(CONFIG_GAMAP) +int qla2x00_get_scsi_info_from_wwn(int mode, unsigned long long wwn, int *host, int *channel, int *lun, int *id); +int qla2x00_get_wwn_from_scsi_info(int host, int id, unsigned long long *wwn); +#endif /* CONFIG_SCSIFCHOTSWAP || CONFIG_GAMAP */ + +#if !defined(MODULE) +static int __init qla2x00_setup(char *); +#else +static void qla2x00_setup(char *); +#endif +static char *qla2x00_get_line(char *, char *); +static int qla2x00_get_tokens(char *, char **, int); + +static struct scsi_host_template qla2x00_driver_template = { + .module = THIS_MODULE, + .name = DRIVER_NAME, + .proc_name = DRIVER_NAME, + .proc_info = qla2x00_proc_info, + .queuecommand = qla2x00_queuecommand, + + .eh_abort_handler = qla2xxx_eh_abort, + .eh_device_reset_handler = qla2xxx_eh_device_reset, + .eh_bus_reset_handler = qla2xxx_eh_bus_reset, + .eh_host_reset_handler = qla2xxx_eh_host_reset, + + .slave_configure = qla2xxx_slave_configure, + + .this_id = -1, + .can_queue = REQUEST_ENTRY_CNT+128, + .cmd_per_lun = 3, + + /* + * At this time, we limit the S/G table size to the maximum number of + * entries possible given the use of IOCBs that are capable of 32bit + * DMA addressing. + * + * We will update this value after we've determined the appropriate DMA + * mask (qla2x00_config_dma_addressing()). + */ + .sg_tablesize = SG_SEGMENTS_32, + + /* + * The RISC allows for each command to transfer (2^32-1) bytes of data, + * which equates to 0x800000 sectors. + */ + .max_sectors = 0xFFFF, +}; + +static void qla2x00_display_fc_names(scsi_qla_host_t *); + +void qla2x00_blink_led(scsi_qla_host_t *); + +/* TODO Convert to inlines + * + * Timer routines + */ +#define WATCH_INTERVAL 1 /* number of seconds */ + +static void qla2x00_timer(scsi_qla_host_t *); + +static __inline__ void qla2x00_start_timer(scsi_qla_host_t *, + void *, unsigned long); +static __inline__ void qla2x00_restart_timer(scsi_qla_host_t *, unsigned long); +static __inline__ void qla2x00_stop_timer(scsi_qla_host_t *); + +static inline void +qla2x00_start_timer(scsi_qla_host_t *ha, void *func, unsigned long interval) +{ + init_timer(&ha->timer); + ha->timer.expires = jiffies + interval * HZ; + ha->timer.data = (unsigned long)ha; + ha->timer.function = (void (*)(unsigned long))func; + add_timer(&ha->timer); + ha->timer_active = 1; +} + +static inline void +qla2x00_restart_timer(scsi_qla_host_t *ha, unsigned long interval) +{ + mod_timer(&ha->timer, jiffies + interval * HZ); +} + +static __inline__ void +qla2x00_stop_timer(scsi_qla_host_t *ha) +{ + del_timer_sync(&ha->timer); + ha->timer_active = 0; +} + + +static void qla2x00_cmd_timeout(srb_t *sp); +static __inline__ void qla2x00_add_timer_to_cmd(srb_t *sp, int timeout); +static __inline__ void qla2x00_delete_timer_from_cmd(srb_t *sp); + +/************************************************************************** +* qla2x00_add_timer_to_cmd +* +* Description: +* Creates a timer for the specified command. The timeout is usually +* the command time from kernel minus 2 secs. +* +* Input: +* sp - pointer to validate +* +* Returns: +* None. +**************************************************************************/ +static inline void +qla2x00_add_timer_to_cmd(srb_t *sp, int timeout) +{ + init_timer(&sp->timer); + sp->timer.expires = jiffies + timeout * HZ; + sp->timer.data = (unsigned long) sp; + sp->timer.function = (void (*) (unsigned long))qla2x00_cmd_timeout; + add_timer(&sp->timer); +} + +/************************************************************************** +* qla2x00_delete_timer_from_cmd +* +* Description: +* Delete the timer for the specified command. +* +* Input: +* sp - pointer to validate +* +* Returns: +* None. +**************************************************************************/ +static inline void +qla2x00_delete_timer_from_cmd(srb_t *sp) +{ + if (sp->timer.function != NULL) { + del_timer(&sp->timer); + sp->timer.function = NULL; + sp->timer.data = (unsigned long) NULL; + } +} + +static __inline__ void qla2x00_callback(scsi_qla_host_t *, struct scsi_cmnd *); +static __inline__ void sp_put(struct scsi_qla_host * ha, srb_t *sp); +static __inline__ void sp_get(struct scsi_qla_host * ha, srb_t *sp); +static __inline__ void +qla2x00_delete_from_done_queue(scsi_qla_host_t *, srb_t *); + +/************************************************************************** +* sp_put +* +* Description: +* Decrement reference count and call the callback if we're the last +* owner of the specified sp. Will get io_request_lock before calling +* the callback. +* +* Input: +* ha - pointer to the scsi_qla_host_t where the callback is to occur. +* sp - pointer to srb_t structure to use. +* +* Returns: +* +**************************************************************************/ +static inline void +sp_put(struct scsi_qla_host * ha, srb_t *sp) +{ + if (atomic_read(&sp->ref_count) == 0) { + qla_printk(KERN_INFO, ha, + "%s(): **** SP->ref_count not zero\n", + __func__); + DEBUG2(BUG();) + + return; + } + + if (!atomic_dec_and_test(&sp->ref_count)) { + return; + } + + qla2x00_callback(ha, sp->cmd); +} + +/************************************************************************** +* sp_get +* +* Description: +* Increment reference count of the specified sp. +* +* Input: +* sp - pointer to srb_t structure to use. +* +* Returns: +* +**************************************************************************/ +static inline void +sp_get(struct scsi_qla_host * ha, srb_t *sp) +{ + atomic_inc(&sp->ref_count); + + if (atomic_read(&sp->ref_count) > 2) { + qla_printk(KERN_INFO, ha, + "%s(): **** SP->ref_count greater than two\n", + __func__); + DEBUG2(BUG();) + + return; + } +} + +/* +* qla2x00_callback +* Returns the completed SCSI command to LINUX. +* +* Input: +* ha -- Host adapter structure +* cmd -- SCSI mid-level command structure. +* Returns: +* None +* Note:From failover point of view we always get the sp +* from vis_ha pool in queuecommand.So when we put it +* back to the pool it has to be the vis_ha. +* So rely on struct scsi_cmnd to get the vis_ha and not on sp. +*/ +static inline void +qla2x00_callback(scsi_qla_host_t *ha, struct scsi_cmnd *cmd) +{ + srb_t *sp = (srb_t *) CMD_SP(cmd); + scsi_qla_host_t *vis_ha; + os_lun_t *lq; + int got_sense; + unsigned long cpu_flags = 0; + + ENTER(__func__); + + cmd->host_scribble = (unsigned char *) NULL; + vis_ha = (scsi_qla_host_t *) cmd->device->host->hostdata; + + if (sp == NULL) { + qla_printk(KERN_INFO, ha, + "%s(): **** CMD derives a NULL SP\n", + __func__); + DEBUG2(BUG();) + return; + } + + /* + * If command status is not DID_BUS_BUSY then go ahead and freed sp. + */ + /* + * Cancel command timeout + */ + qla2x00_delete_timer_from_cmd(sp); + + /* + * Put SP back in the free queue + */ + sp->cmd = NULL; + CMD_SP(cmd) = NULL; + lq = sp->lun_queue; + got_sense = (sp->flags & SRB_GOT_SENSE)? 1: 0; + add_to_free_queue(vis_ha, sp); + + if (host_byte(cmd->result) == DID_OK) { + /* device ok */ + ha->total_bytes += cmd->bufflen; + if (!got_sense) { + /* If lun was suspended then clear retry count */ + spin_lock_irqsave(&lq->q_lock, cpu_flags); + if (!test_bit(LUN_EXEC_DELAYED, &lq->q_flag)) + lq->q_state = LUN_STATE_READY; + spin_unlock_irqrestore(&lq->q_lock, cpu_flags); + } + } else if (host_byte(cmd->result) == DID_ERROR) { + /* device error */ + ha->total_dev_errs++; + } + + /* Call the mid-level driver interrupt handler */ + (*(cmd)->scsi_done)(cmd); + + LEAVE(__func__); +} + +static inline void +qla2x00_delete_from_done_queue(scsi_qla_host_t *dest_ha, srb_t *sp) +{ + /* remove command from done list */ + list_del_init(&sp->list); + dest_ha->done_q_cnt--; + sp->state = SRB_NO_QUEUE_STATE; + + if (sp->flags & SRB_DMA_VALID) { + sp->flags &= ~SRB_DMA_VALID; + + /* Release memory used for this I/O */ + if (sp->cmd->use_sg) { + pci_unmap_sg(dest_ha->pdev, sp->cmd->request_buffer, + sp->cmd->use_sg, + scsi_to_pci_dma_dir(sp->cmd->sc_data_direction)); + } else if (sp->cmd->request_bufflen) { + pci_unmap_page(dest_ha->pdev, sp->dma_handle, + sp->cmd->request_bufflen, + scsi_to_pci_dma_dir(sp->cmd->sc_data_direction)); + } + } +} + +static int qla2x00_do_dpc(void *data); +static uint8_t qla2x00_check_for_devices_online(scsi_qla_host_t *); + +static void qla2x00_rst_aen(scsi_qla_host_t *); + +static void qla2x00_process_failover(scsi_qla_host_t *); + +static uint8_t qla2x00_mem_alloc(scsi_qla_host_t *); +static void qla2x00_mem_free(scsi_qla_host_t *ha); +int qla2x00_allocate_sp_pool( scsi_qla_host_t *ha); +void qla2x00_free_sp_pool(scsi_qla_host_t *ha); + + +#define to_qla_host(x) ((scsi_qla_host_t *) (x)->hostdata) + +static ssize_t qla2x00_read_fw_dump(struct kobject *, char *, loff_t, size_t); +static ssize_t qla2x00_write_fw_dump(struct kobject *, char *, loff_t, size_t); + +static struct bin_attribute fw_dump_attr = { + .attr = { + .name = "fw_dump", + .mode = S_IRUSR | S_IWUSR, + }, + .size = 0, + .read = qla2x00_read_fw_dump, + .write = qla2x00_write_fw_dump, +}; + +/************************************************************************* +* qla2x00_set_info +* +* Description: +* Set parameters for the driver from the /proc filesystem. +* +* Returns: +*************************************************************************/ +int +qla2x00_set_info(char *buffer, int length, struct Scsi_Host *shost) +{ + return (-ENOSYS); /* Currently this is a no-op */ +} + +static ssize_t qla2x00_read_fw_dump(struct kobject *kobj, char *buf, loff_t off, + size_t count) +{ + struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, + struct device, kobj))); + + if (ha->fw_dump_reading == 0) + return 0; + if (off > strlen(ha->fw_dump_buffer)) + return 0; + if (off + count > strlen(ha->fw_dump_buffer)) + count = strlen(ha->fw_dump_buffer) - off; + + memcpy(buf, &ha->fw_dump_buffer[off], count); + + return (count); +} + +static ssize_t qla2x00_write_fw_dump(struct kobject *kobj, char *buf, + loff_t off, size_t count) +{ + struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, + struct device, kobj))); + int reading; + + if (off != 0) + return (0); + + reading = simple_strtol(buf, NULL, 10); + switch (reading) { + case 0: + if (ha->fw_dump_reading == 1) { + qla_printk(KERN_INFO, ha, + "Firmware dump cleared on (%ld).\n", + ha->host_no); + + vfree(ha->fw_dump_buffer); + free_pages((unsigned long)ha->fw_dump, + ha->fw_dump_order); + + ha->fw_dump_reading = 0; + ha->fw_dump_buffer = NULL; + ha->fw_dump = NULL; + } + break; + case 1: + if (ha->fw_dump != NULL && !ha->fw_dump_reading) { + ha->fw_dump_reading = 1; + + ha->fw_dump_buffer = (char *)vmalloc(FW_DUMP_SIZE); + if (ha->fw_dump_buffer == NULL) { + qla_printk(KERN_WARNING, ha, + "Unable to allocate memory for firmware " + "dump buffer (%d).\n", FW_DUMP_SIZE); + + ha->fw_dump_reading = 0; + return (count); + } + qla_printk(KERN_INFO, ha, + "Firmware dump ready for read on (%ld).\n", + ha->host_no); + memset(ha->fw_dump_buffer, 0, FW_DUMP_SIZE); + qla2x00_ascii_fw_dump(ha); + } + break; + } + return (count); +} + +/* TODO: Complete module_param() */ +#if 0 +/************************************************************************** +* qla2x00_detect +* +* Description: +* This routine will probe for Qlogic FC SCSI host adapters. +* It returns the number of host adapters of a particular +* type that were found. It also initialize all data necessary for +* the driver. It is passed-in the host number, so that it +* knows where its first entry is in the scsi_hosts[] array. +* +* Input: +* template - pointer to SCSI template +* +* Returns: +* num - number of host adapters found. +**************************************************************************/ +int +qla2x00_detect(struct scsi_host_template *template) +{ + /* + * If we are called as a module, the qla2100 pointer may not be null + * and it would point to our bootup string, just like on the lilo + * command line. IF not NULL, then process this config string with + * qla2x00_setup + * + * Boot time Options To add options at boot time add a line to your + * lilo.conf file like: + * append="qla2100=verbose,tag_info:{{32,32,32,32},{32,32,32,32}}" + * which will result in the first four devices on the first two + * controllers being set to a tagged queue depth of 32. + */ + if (ql2xopts) + qla2x00_setup(ql2xopts); + if (dummy_buffer[0] != 'P') + printk(KERN_WARNING + "qla2x00: Please read the file " + "/usr/src/linux/drivers/scsi/README.qla2x00\n" + "qla2x00: to see the proper way to specify options to " + "the qla2x00 module\n" + "qla2x00: Specifically, don't use any commas when passing " + "arguments to\n" + "qla2x00: insmod or else it might trash certain memory " + "areas.\n"); +} +#endif + +/************************************************************************** +* qla2x00_register_with_Linux +* +* Description: +* Free the passed in Scsi_Host memory structures prior to unloading the +* module. +* +* Input: +* ha - pointer to host adapter structure +* maxchannels - MAX number of channels. +* +* Returns: +* 0 - Sucessfully reserved resources. +* 1 - Failed to reserved a resource. +**************************************************************************/ +static uint8_t +qla2x00_register_with_Linux(scsi_qla_host_t *ha, uint8_t maxchannels) +{ + struct Scsi_Host *host = ha->host; + + host->cmd_per_lun = 3; + host->max_cmd_len = MAX_CMDSZ; + + host->max_channel = maxchannels; + host->max_lun = ha->max_luns; + host->unique_id = ha->instance; + host->max_id = ha->max_targets; + + /* set our host ID (need to do something about our two IDs) */ + host->this_id = 255; + + /* Register the IRQ with Linux (sharable) */ + if (request_irq(host->irq, qla2x00_intr_handler, + SA_INTERRUPT|SA_SHIRQ, DRIVER_NAME, ha)) { + qla_printk(KERN_WARNING, ha, + "Failed to reserve interrupt %d already in use.\n", + host->irq); + return 1; + } + + /* Initialized the timer */ + qla2x00_start_timer(ha, qla2x00_timer, WATCH_INTERVAL); + + return 0; +} + +char * +qla2x00_get_pci_info_str(struct scsi_qla_host *ha, char *str) +{ + static char *pci_bus_modes[] = { + "33", + "66", + "100", + "133", + }; + uint16_t pci_bus; + + strcpy(str, "PCI"); + pci_bus = (ha->pci_attr & (BIT_9 | BIT_10)) >> 9; + if (pci_bus) { + strcat(str, "-X ("); + strcat(str, pci_bus_modes[pci_bus]); + } else { + pci_bus = (ha->pci_attr & BIT_8) >> 8; + strcat(str, " ("); + strcat(str, pci_bus_modes[pci_bus]); + } + strcat(str, " MHz)"); + + return (str); +} + +char * +qla2x00_get_fw_version_str(struct scsi_qla_host *ha, char *str) +{ + char un_str[10]; + + sprintf(str, "%d.%02d.%02d ", ha->fw_major_version, + ha->fw_minor_version, + ha->fw_subminor_version); + + switch (ha->fw_attributes & 0xFF) { + case 0x7: + strcat(str, "EF"); + break; + case 0x17: + strcat(str, "TP"); + break; + case 0x37: + strcat(str, "IP"); + break; + case 0x77: + strcat(str, "VI"); + break; + default: + sprintf(un_str, "(%x)", ha->fw_attributes); + strcat(str, un_str); + break; + } + if (ha->fw_attributes & 0x100) + strcat(str, "X"); + + return (str); +} + +/************************************************************************** +* qla2x00_queuecommand +* +* Description: +* Queue a command to the controller. +* +* Input: +* cmd - pointer to Scsi cmd structure +* fn - pointer to Scsi done function +* +* Returns: +* 0 - Always +* +* Note: +* The mid-level driver tries to ensures that queuecommand never gets invoked +* concurrently with itself or the interrupt handler (although the +* interrupt handler may call this routine as part of request-completion +* handling). +**************************************************************************/ +int +qla2x00_queuecommand(struct scsi_cmnd *cmd, void (*fn)(struct scsi_cmnd *)) +{ + fc_port_t *fcport; + os_lun_t *lq; + os_tgt_t *tq; + scsi_qla_host_t *ha, *ha2; + srb_t *sp; + struct Scsi_Host *host; + unsigned int b, t, l; + unsigned long handle; + int was_empty; + + host = cmd->device->host; + ha = (scsi_qla_host_t *) host->hostdata; + + cmd->scsi_done = fn; + + spin_unlock_irq(ha->host->host_lock); + + /* + * Allocate a command packet from the "sp" pool. If we cant get back + * one then let scsi layer come back later. + */ + if ((sp = qla2x00_get_new_sp(ha)) == NULL) { + qla_printk(KERN_WARNING, ha, + "Couldn't allocate memory for sp - retried.\n"); + + spin_lock_irq(ha->host->host_lock); + + LEAVE(__func__); + return (1); + } + + sp->cmd = cmd; + CMD_SP(cmd) = (void *)sp; + + sp->flags = 0; + if (CMD_RESID_LEN(cmd) & SRB_IOCTL) { + /* Need to set sp->flags */ + sp->flags |= SRB_IOCTL; + CMD_RESID_LEN(cmd) = 0; /* Clear it since no more use. */ + } + + sp->fo_retry_cnt = 0; + + /* Generate LU queue on bus, target, LUN */ + b = cmd->device->channel; + t = cmd->device->id; + l = cmd->device->lun; + + /* + * Start Command Timer. Typically it will be 2 seconds less than what + * is requested by the Host such that we can return the IO before + * aborts are called. + */ + if ((cmd->timeout_per_command / HZ) > QLA_CMD_TIMER_DELTA) + qla2x00_add_timer_to_cmd(sp, + (cmd->timeout_per_command / HZ) - QLA_CMD_TIMER_DELTA); + else + qla2x00_add_timer_to_cmd(sp, cmd->timeout_per_command / HZ); + + if (l >= ha->max_luns) { + cmd->result = DID_NO_CONNECT << 16; + + spin_lock_irq(ha->host->host_lock); + + sp_put(ha, sp); + LEAVE(__func__); + + return (0); + } + + if ((tq = (os_tgt_t *) TGT_Q(ha, t)) != NULL && + (lq = (os_lun_t *) LUN_Q(ha, t, l)) != NULL ) { + + fcport = lq->fclun->fcport; + ha2 = fcport->ha; + } else { + lq = NULL; + fcport = NULL; + ha2 = ha; + } + + /* Set an invalid handle until we issue the command to ISP */ + /* then we will set the real handle value. */ + handle = INVALID_HANDLE; + cmd->host_scribble = (unsigned char *)handle; + + /* Bookkeeping information */ + sp->r_start = jiffies; /* time the request was recieved */ + sp->u_start = 0; + + /* Setup device queue pointers. */ + sp->tgt_queue = tq; + sp->lun_queue = lq; + + /* + * NOTE : q is NULL + * + * 1. When device is added from persistent binding but has not been + * discovered yet.The state of loopid == PORT_AVAIL. + * 2. When device is never found on the bus.(loopid == UNUSED) + * + * IF Device Queue is not created, or device is not in a valid state + * and link down error reporting is enabled, reject IO. + */ + if (fcport == NULL) { + DEBUG3(printk("scsi(%ld:%2d:%2d): port unavailable\n", + ha->host_no,t,l)); + + cmd->result = DID_NO_CONNECT << 16; + + spin_lock_irq(ha->host->host_lock); + + sp_put(ha, sp); + + return (0); + } + + /* Only modify the allowed count if the target is a *non* tape device */ + if ((fcport->flags & FCF_TAPE_PRESENT) == 0) { + if (cmd->allowed < ql2xretrycount) { + cmd->allowed = ql2xretrycount; + } + } + + DEBUG5(printk("scsi(%ld:%2d:%2d): (queuecmd) queue sp = %p, " + "flags=0x%x fo retry=%d, pid=%ld\n", + ha->host_no, t, l, sp, sp->flags, sp->fo_retry_cnt, + cmd->serial_number)); + DEBUG5(qla2x00_print_scsi_cmd(cmd)); + + sp->fclun = lq->fclun; + sp->ha = ha2; + + if (cmd->sc_data_direction == SCSI_DATA_UNKNOWN && + cmd->request_bufflen != 0) { + + DEBUG2(printk(KERN_WARNING + "scsi(%ld): Incorrect data direction - transfer " + "length=%d, direction=%d, pid=%ld, opcode=%x\n", + ha->host_no, cmd->request_bufflen, cmd->sc_data_direction, + cmd->serial_number, cmd->cmnd[0])); + } + + /* Final pre-check : + * + * Either PORT_DOWN_TIMER OR LINK_DOWN_TIMER Expired. + */ + if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD || + ha->loop_state == LOOP_DEAD) { + /* + * Add the command to the done-queue for later failover + * processing + */ + cmd->result = DID_NO_CONNECT << 16; + add_to_done_queue(ha, sp); + if (!list_empty(&ha->done_queue)) + qla2x00_done(ha); + + spin_lock_irq(ha->host->host_lock); + return (0); + } + was_empty = add_to_pending_queue(ha, sp); + +#if defined(ISP2100) || defined(ISP2200) + if (ha->flags.online) { + unsigned long flags; + device_reg_t *reg; + reg = ha->iobase; + + if (RD_REG_WORD(ISP_RSP_Q_IN(reg)) != ha->rsp_ring_index) { + spin_lock_irqsave(&ha->hardware_lock, flags); + qla2x00_process_response_queue(ha); + spin_unlock_irqrestore(&ha->hardware_lock, flags); + } + } +#endif + + /* We submit to the hardware if: + * + * 1) we're on the cpu the irq's arrive on or + * 2) there are very few io's outstanding. + * + * In all other cases we'll let an irq pick up our IO and submit it + * to the controller to improve affinity. + */ + if (smp_processor_id() == ha->last_irq_cpu || was_empty) + qla2x00_next(ha); + + spin_lock_irq(ha->host->host_lock); + + return (0); +} + +/* + * qla2x00_eh_wait_on_command + * Waits for the command to be returned by the Firmware for some + * max time. + * + * Input: + * ha = actual ha whose done queue will contain the command + * returned by firmware. + * cmd = Scsi Command to wait on. + * flag = Abort/Reset(Bus or Device Reset) + * + * Return: + * Not Found : 0 + * Found : 1 + */ +static int +qla2x00_eh_wait_on_command(scsi_qla_host_t *ha, struct scsi_cmnd *cmd) +{ +#define ABORT_WAIT_TIME 10 /* seconds */ + + int found = 0; + int done = 0; + srb_t *rp; + struct list_head *list, *temp; + u_long cpu_flags = 0; + u_long max_wait_time = ABORT_WAIT_TIME; + + ENTER(__func__); + + do { + /* Check on done queue */ + if (!found) { + spin_lock_irqsave(&ha->list_lock, cpu_flags); + list_for_each_safe(list, temp, &ha->done_queue) { + rp = list_entry(list, srb_t, list); + + /* + * Found command. Just exit and wait for the + * cmd sent to OS. + */ + if (cmd == rp->cmd) { + found++; + DEBUG3(printk("%s: found in done " + "queue.\n", __func__);) + break; + } + } + spin_unlock_irqrestore(&ha->list_lock, cpu_flags); + } + + /* Checking to see if its returned to OS */ + rp = (srb_t *) CMD_SP(cmd); + if (rp == NULL ) { + done++; + break; + } + + spin_unlock_irq(ha->host->host_lock); + + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(2*HZ); + + spin_lock_irq(ha->host->host_lock); + + } while ((max_wait_time--)); + + if (done) { + DEBUG2(printk(KERN_INFO "%s: found cmd=%p.\n", __func__, cmd)); + } else if (found) { + /* Immediately return command to the mid-layer */ + qla2x00_delete_from_done_queue(ha, rp); + sp_put(ha, rp); + done++; + } + + LEAVE(__func__); + + return (done); +} + +/* + * qla2x00_wait_for_hba_online + * Wait till the HBA is online after going through + * <= MAX_RETRIES_OF_ISP_ABORT or + * finally HBA is disabled ie marked offline + * + * Input: + * ha - pointer to host adapter structure + * + * Note: + * Does context switching-Release SPIN_LOCK + * (if any) before calling this routine. + * + * Return: + * Success (Adapter is online) : 0 + * Failed (Adapter is offline/disabled) : 1 + */ +static inline int +qla2x00_wait_for_hba_online(scsi_qla_host_t *ha) +{ + int return_status ; + + while ((test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags)) || + test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || + test_bit(ISP_ABORT_RETRY, &ha->dpc_flags)) { + + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(3 * HZ); + } + if (ha->flags.online == TRUE) + return_status = QLA_SUCCESS; + else + /* Adapter is disabled/offline */ + return_status = QLA_FUNCTION_FAILED; + + DEBUG2(printk("%s return_status=%d\n",__func__,return_status)); + + return (return_status); +} + +/* + * qla2x00_wait_for_loop_ready + * Wait for MAX_LOOP_TIMEOUT(5 min) value for loop + * to be in LOOP_READY state. + * Input: + * ha - pointer to host adapter structure + * + * Note: + * Does context switching-Release SPIN_LOCK + * (if any) before calling this routine. + * + * + * Return: + * Success (LOOP_READY) : 0 + * Failed (LOOP_NOT_READY) : 1 + */ +static inline int +qla2x00_wait_for_loop_ready(scsi_qla_host_t *ha) +{ + int return_status = QLA_SUCCESS; + unsigned long loop_timeout ; + + /* wait for 5 min at the max for loop to be ready */ + loop_timeout = jiffies + (MAX_LOOP_TIMEOUT * HZ); + + while ((!atomic_read(&ha->loop_down_timer) && + ha->loop_state == LOOP_DOWN) || + test_bit(CFG_ACTIVE, &ha->cfg_flags) || + ha->loop_state != LOOP_READY) { + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(3 * HZ); + if (time_after_eq(jiffies, loop_timeout)) { + return_status = QLA_FUNCTION_FAILED; + break; + } + } + return (return_status); +} + + +/************************************************************************** +* qla2xxx_eh_abort +* +* Description: +* The abort function will abort the specified command. +* +* Input: +* cmd = Linux SCSI command packet to be aborted. +* +* Returns: +* Either SUCCESS or FAILED. +* +* Note: +**************************************************************************/ +int +qla2xxx_eh_abort(struct scsi_cmnd *cmd) +{ + int i; + int return_status = FAILED; + os_lun_t *q; + scsi_qla_host_t *ha; + scsi_qla_host_t *vis_ha; + srb_t *sp; + srb_t *rp; + struct list_head *list, *temp; + struct Scsi_Host *host; + uint8_t found = 0; + unsigned int b, t, l; + unsigned long flags; + + + ENTER(__func__); + + /* Get the SCSI request ptr */ + sp = (srb_t *) CMD_SP(cmd); + + /* + * If sp is NULL, command is already returned. + * sp is NULLED just before we call back scsi_done + * + */ + if ((sp == NULL)) { + /* no action - we don't have command */ + qla_printk(KERN_INFO, QLA_HA(cmd->device->host), + "qla2xxx_eh_abort: cmd already done sp=%p\n", sp); + DEBUG(printk("qla2xxx_eh_abort: cmd already done sp=%p\n", sp);) + return(SUCCESS); + } + if (sp) { + DEBUG(printk("qla2xxx_eh_abort: refcount %i \n", + atomic_read(&sp->ref_count));) + } + + vis_ha = (scsi_qla_host_t *) cmd->device->host->hostdata; + if (vis_ha->flags.failover_enabled) + /* Get Actual HA pointer */ + ha = (scsi_qla_host_t *)sp->ha; + else + ha = (scsi_qla_host_t *)cmd->device->host->hostdata; + + host = ha->host; + + /* Generate LU queue on bus, target, LUN */ + b = cmd->device->channel; + t = cmd->device->id; + l = cmd->device->lun; + q = GET_LU_Q(vis_ha, t, l); + + qla_printk(KERN_INFO, ha, + "%s scsi(%ld:%d:%d:%d): cmd_timeout_in_sec=0x%x.\n", __func__, + ha->host_no, (int)b, (int)t, (int)l, + cmd->timeout_per_command / HZ); + + /* + * if no LUN queue then something is very wrong!!! + */ + if (q == NULL) { + qla_printk(KERN_WARNING, ha, + "qla2x00: (%x:%x:%x) No LUN queue.\n", b, t, l); + + /* no action - we don't have command */ + return(FAILED); + } + + DEBUG2(printk("scsi(%ld): ABORTing cmd=%p sp=%p jiffies = 0x%lx, " + "timeout=%x, dpc_flags=%lx, vis_ha->dpc_flags=%lx\n", + ha->host_no, cmd, sp, jiffies, cmd->timeout_per_command / HZ, + ha->dpc_flags, vis_ha->dpc_flags)); + DEBUG2(qla2x00_print_scsi_cmd(cmd)); + DEBUG2(qla2x00_print_q_info(q);) + + spin_unlock_irq(ha->host->host_lock); + /* Blocking call-Does context switching if abort isp is active etc */ + if (qla2x00_wait_for_hba_online(ha) != QLA_SUCCESS) { + DEBUG2(printk("%s failed:board disabled\n", __func__);) + spin_lock_irq(ha->host->host_lock); + return (FAILED); + } + spin_lock_irq(ha->host->host_lock); + + /* Search done queue */ + spin_lock_irqsave(&ha->list_lock,flags); + list_for_each_safe(list, temp, &ha->done_queue) { + rp = list_entry(list, srb_t, list); + + if (cmd != rp->cmd) + continue; + + /* + * Found command.Remove it from done list. + * And proceed to post completion to scsi mid layer. + */ + return_status = SUCCESS; + found++; + qla2x00_delete_from_done_queue(ha, sp); + + break; + } /* list_for_each_safe() */ + spin_unlock_irqrestore(&ha->list_lock, flags); + + /* + * Return immediately if the aborted command was already in the done + * queue + */ + if (found) { + qla_printk(KERN_INFO, ha, + "qla2xxx_eh_abort: Returning completed command=%p sp=%p\n", + cmd, sp); + sp_put(ha, sp); + return (return_status); + } + + + /* + * See if this command is in the retry queue + */ + if (!found) { + DEBUG3(printk("qla2xxx_eh_abort: searching sp %p in retry " + "queue.\n", sp);) + + spin_lock_irqsave(&ha->list_lock, flags); + list_for_each_safe(list, temp, &ha->retry_queue) { + rp = list_entry(list, srb_t, list); + + if (cmd != rp->cmd) + continue; + + + DEBUG2(printk("qla2xxx_eh_abort: found " + "in retry queue. SP=%p\n", sp);) + + __del_from_retry_queue(ha, rp); + cmd->result = DID_ABORT << 16; + __add_to_done_queue(ha, rp); + + return_status = SUCCESS; + found++; + + break; + + } /* list_for_each_safe() */ + spin_unlock_irqrestore(&ha->list_lock, flags); + } + + /* + * Search failover queue + */ + if (ha->flags.failover_enabled) { + if (!found) { + DEBUG3(printk("qla2xxx_eh_abort: searching sp %p in " + "failover queue.\n", sp);) + + spin_lock_irqsave(&ha->list_lock, flags); + list_for_each_safe(list, temp, &ha->failover_queue) { + rp = list_entry(list, srb_t, list); + + if (cmd != rp->cmd) + continue; + + DEBUG2(printk(KERN_WARNING + "qla2xxx_eh_abort: found in failover " + "queue. SP=%p\n", sp);) + + /* Remove srb from failover queue. */ + __del_from_failover_queue(ha, rp); + cmd->result = DID_ABORT << 16; + __add_to_done_queue(ha, rp); + + return_status = SUCCESS; + found++; + + break; + + } /* list_for_each_safe() */ + spin_unlock_irqrestore(&ha->list_lock, flags); + } /*End of if !found */ + } + + /* + * Our SP pointer points at the command we want to remove from the + * pending queue providing we haven't already sent it to the adapter. + */ + if (!found) { + DEBUG3(printk("qla2xxx_eh_abort: searching sp %p " + "in pending queue.\n", sp);) + + spin_lock_irqsave(&vis_ha->list_lock, flags); + list_for_each_safe(list, temp, &vis_ha->pending_queue) { + rp = list_entry(list, srb_t, list); + + if (rp->cmd != cmd) + continue; + + /* Remove srb from LUN queue. */ + rp->flags |= SRB_ABORTED; + + DEBUG2(printk("qla2xxx_eh_abort: Cmd in pending queue." + " serial_number %ld.\n", + sp->cmd->serial_number);) + + __del_from_pending_queue(vis_ha, rp); + cmd->result = DID_ABORT << 16; + + __add_to_done_queue(vis_ha, rp); + + return_status = SUCCESS; + + found++; + break; + } /* list_for_each_safe() */ + spin_unlock_irqrestore(&vis_ha->list_lock, flags); + } /*End of if !found */ + + if (!found) { /* find the command in our active list */ + DEBUG3(printk("qla2xxx_eh_abort: searching sp %p " + "in outstanding queue.\n", sp);) + + spin_lock_irqsave(&ha->hardware_lock, flags); + for (i = 1; i < MAX_OUTSTANDING_COMMANDS; i++) { + sp = ha->outstanding_cmds[i]; + + if (sp == NULL) + continue; + + if (sp->cmd != cmd) + continue; + + DEBUG2(printk("qla2xxx_eh_abort(%ld): aborting sp %p " + "from RISC. pid=%ld sp->state=%x\n", + ha->host_no, sp, sp->cmd->serial_number, + sp->state);) + DEBUG(qla2x00_print_scsi_cmd(cmd);) + DEBUG(qla2x00_print_q_info(q);) + + /* Get a reference to the sp and drop the lock.*/ + sp_get(ha, sp); + + spin_unlock_irqrestore(&ha->hardware_lock, flags); + spin_unlock(ha->host->host_lock); + + if (qla2x00_abort_command(ha, sp)) { + DEBUG2(printk("qla2xxx_eh_abort: abort_command " + "mbx failed.\n");) + return_status = FAILED; + } else { + DEBUG3(printk("qla2xxx_eh_abort: abort_command " + " mbx success.\n");) + return_status = SUCCESS; + } + + sp_put(ha,sp); + + spin_lock_irq(ha->host->host_lock); + spin_lock_irqsave(&ha->hardware_lock, flags); + + /* + * Regardless of mailbox command status, go check on + * done queue just in case the sp is already done. + */ + break; + + }/*End of for loop */ + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + } /*End of if !found */ + + /*Waiting for our command in done_queue to be returned to OS.*/ + if (qla2x00_eh_wait_on_command(ha, cmd) != 0) { + DEBUG2(printk("qla2xxx_eh_abort: cmd returned back to OS.\n");) + return_status = SUCCESS; + } + + if (return_status == FAILED) { + qla_printk(KERN_INFO, ha, + "qla2xxx_eh_abort Exiting: status=Failed\n"); + return FAILED; + } + + DEBUG2(printk("qla2xxx_eh_abort: Exiting. return_status=0x%x.\n", + return_status)); + + LEAVE("qla2xxx_eh_abort"); + + return(return_status); +} + +/************************************************************************** +* qla2x00_eh_wait_for_pending_target_commands +* +* Description: +* Waits for all the commands to come back from the specified target. +* +* Input: +* ha - pointer to scsi_qla_host structure. +* t - target +* Returns: +* Either SUCCESS or FAILED. +* +* Note: +**************************************************************************/ +int +qla2x00_eh_wait_for_pending_target_commands(scsi_qla_host_t *ha, unsigned int t) +{ + int cnt; + int status; + unsigned long flags; + srb_t *sp; + struct scsi_cmnd *cmd; + + status = 0; + + /* + * Waiting for all commands for the designated target in the active + * array + */ + for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) { + spin_lock_irqsave(&ha->hardware_lock, flags); + sp = ha->outstanding_cmds[cnt]; + if (sp) { + cmd = sp->cmd; + spin_unlock_irqrestore(&ha->hardware_lock, flags); + if (cmd->device->id == t) { + if (!qla2x00_eh_wait_on_command(ha, cmd)) { + status = 1; + break; + } + } + } + else { + spin_unlock_irqrestore(&ha->hardware_lock, flags); + } + } + return (status); +} + + +/************************************************************************** +* qla2xxx_eh_device_reset +* +* Description: +* The device reset function will reset the target and abort any +* executing commands. +* +* NOTE: The use of SP is undefined within this context. Do *NOT* +* attempt to use this value, even if you determine it is +* non-null. +* +* Input: +* cmd = Linux SCSI command packet of the command that cause the +* bus device reset. +* +* Returns: +* SUCCESS/FAILURE (defined as macro in scsi.h). +* +**************************************************************************/ +int +qla2xxx_eh_device_reset(struct scsi_cmnd *cmd) +{ + int return_status; + unsigned int b, t, l; + scsi_qla_host_t *ha; + os_tgt_t *tq; + os_lun_t *lq; + fc_port_t *fcport_to_reset; + + return_status = FAILED; + if (cmd == NULL) { + printk(KERN_INFO + "%s(): **** SCSI mid-layer passing in NULL cmd\n", + __func__); + + return (return_status); + } + + b = cmd->device->channel; + t = cmd->device->id; + l = cmd->device->lun; + ha = (scsi_qla_host_t *)cmd->device->host->hostdata; + + tq = TGT_Q(ha, t); + if (tq == NULL) { + qla_printk(KERN_INFO, ha, + "%s(): **** CMD derives a NULL TGT_Q\n", __func__); + + return (return_status); + } + lq = (os_lun_t *)LUN_Q(ha, t, l); + if (lq == NULL) { + printk(KERN_INFO + "%s(): **** CMD derives a NULL LUN_Q\n", __func__); + + return (return_status); + } + fcport_to_reset = lq->fclun->fcport; + +#if STOP_ON_RESET + qla2x00_panic(__func__, ha->host); +#endif + + qla_printk(KERN_INFO, ha, + "scsi(%ld:%d:%d:%d): DEVICE RESET ISSUED.\n", ha->host_no, b, t, l); + + DEBUG2(printk(KERN_INFO + "scsi(%ld): DEVICE_RESET cmd=%p jiffies = 0x%lx, timeout=%x, " + "dpc_flags=%lx, status=%x allowed=%d cmd.state=%x\n", + ha->host_no, cmd, jiffies, cmd->timeout_per_command / HZ, + ha->dpc_flags, cmd->result, cmd->allowed, cmd->state)); + + spin_unlock_irq(ha->host->host_lock); + + /* Blocking call-Does context switching if abort isp is active etc */ + if (qla2x00_wait_for_hba_online(ha) != QLA_SUCCESS) { + DEBUG2(printk(KERN_INFO + "%s failed:board disabled\n",__func__)); + + spin_lock_irq(ha->host->host_lock); + goto eh_dev_reset_done; + } + + /* Blocking call-Does context switching if loop is Not Ready */ + if (qla2x00_wait_for_loop_ready(ha) == QLA_SUCCESS) { + if (qla2x00_device_reset(ha, fcport_to_reset) == 0) { + return_status = SUCCESS; + } + +#if defined(LOGOUT_AFTER_DEVICE_RESET) + if (return_status == SUCCESS) { + if (fcport_to_reset->flags & FC_FABRIC_DEVICE) { + qla2x00_fabric_logout(ha, + fcport_to_reset->loop_id); + qla2x00_mark_device_lost(ha, fcport_to_reset); + } + } +#endif + } else { + DEBUG2(printk(KERN_INFO + "%s failed: loop not ready\n",__func__);) + } + + spin_lock_irq(ha->host->host_lock); + + if (return_status == FAILED) { + DEBUG3(printk("%s(%ld): device reset failed\n", + __func__,ha->host_no)); + qla_printk(KERN_INFO, ha, "%s: device reset failed\n", + __func__); + + goto eh_dev_reset_done; + } + + /* + * If we are coming down the EH path, wait for all commands to + * complete for the device. + */ + if (cmd->device->host->eh_active) { + if (qla2x00_eh_wait_for_pending_target_commands(ha, t)) + return_status = FAILED; + + if (return_status == FAILED) { + DEBUG3(printk("%s(%ld): failed while waiting for " + "commands\n", __func__, ha->host_no)); + qla_printk(KERN_INFO, ha, + "%s: failed while waiting for commands\n", + __func__); + + goto eh_dev_reset_done; + } + } + + qla_printk(KERN_INFO, ha, + "scsi(%ld:%d:%d:%d): DEVICE RESET SUCCEEDED.\n", + ha->host_no, b, t, l); + +eh_dev_reset_done: + + return (return_status); +} + +/************************************************************************** +* qla2x00_eh_wait_for_pending_commands +* +* Description: +* Waits for all the commands to come back from the specified host. +* +* Input: +* ha - pointer to scsi_qla_host structure. +* +* Returns: +* 1 : SUCCESS +* 0 : FAILED +* +* Note: +**************************************************************************/ +int +qla2x00_eh_wait_for_pending_commands(scsi_qla_host_t *ha) +{ + int cnt; + int status; + unsigned long flags; + srb_t *sp; + struct scsi_cmnd *cmd; + + status = 1; + + /* + * Waiting for all commands for the designated target in the active + * array + */ + for (cnt = 1; cnt < MAX_OUTSTANDING_COMMANDS; cnt++) { + spin_lock_irqsave(&ha->hardware_lock, flags); + sp = ha->outstanding_cmds[cnt]; + if (sp) { + cmd = sp->cmd; + spin_unlock_irqrestore(&ha->hardware_lock, flags); + status = qla2x00_eh_wait_on_command(ha, cmd); + if (status == 0) + break; + } + else { + spin_unlock_irqrestore(&ha->hardware_lock, flags); + } + } + return (status); +} + + +/************************************************************************** +* qla2xxx_eh_bus_reset +* +* Description: +* The bus reset function will reset the bus and abort any executing +* commands. +* +* Input: +* cmd = Linux SCSI command packet of the command that cause the +* bus reset. +* +* Returns: +* SUCCESS/FAILURE (defined as macro in scsi.h). +* +**************************************************************************/ +int +qla2xxx_eh_bus_reset(struct scsi_cmnd *cmd) +{ + int return_status = SUCCESS; + unsigned int b, t, l; + srb_t *sp; + int found; + struct list_head *hal; + scsi_qla_host_t *ha, *search_ha; + + + ENTER("qla2xxx_eh_bus_reset"); + + if (cmd == NULL) { + printk(KERN_INFO + "%s(): **** SCSI mid-layer passing in NULL cmd\n", + __func__); + DEBUG2(BUG();) + + return (FAILED); + } + + b = cmd->device->channel; + t = cmd->device->id; + l = cmd->device->lun; + + ha = (scsi_qla_host_t *) cmd->device->host->hostdata; + sp = (srb_t *) CMD_SP(cmd); + + if (ha == NULL) { + qla_printk(KERN_INFO, ha, + "%s(): **** CMD derives a NULL HA\n", + __func__); + DEBUG2(BUG();) + + return (FAILED); + } + + found = 0; + read_lock(&qla_hostlist_lock); + list_for_each(hal, &qla_hostlist) { + search_ha = list_entry(hal, scsi_qla_host_t, list); + + if (search_ha == ha) { + found ++; + break; + } + } + read_unlock(&qla_hostlist_lock); + + if (!found) { + qla_printk(KERN_INFO, ha, + "%s(): **** CMD derives a NULL search HA\n", + __func__); + DEBUG2(BUG();) + + return (FAILED); + } + +#if STOP_ON_RESET + printk("Resetting the Bus= 0x%x\n", (int)cmd); + qla2x00_print_scsi_cmd(cmd); + qla2x00_panic("qla2100_reset", ha->host); +#endif + + qla_printk(KERN_INFO, ha, + "scsi(%ld:%d:%d:%d): LOOP RESET ISSUED.\n", ha->host_no, b, t, l); + + spin_unlock_irq(ha->host->host_lock); + + /* Blocking call-Does context switching if abort isp is active etc*/ + if (qla2x00_wait_for_hba_online(ha) != QLA_SUCCESS) { + DEBUG2(printk("%s failed:board disabled\n",__func__)); + spin_lock_irq(ha->host->host_lock); + return (FAILED); + } + + /* Blocking call-Does context switching if loop is Not Ready */ + if (qla2x00_wait_for_loop_ready(ha) == QLA_SUCCESS) { + if (qla2x00_loop_reset(ha) != 0) + return_status = FAILED; + } else { + return_status = FAILED; + } + spin_lock_irq(ha->host->host_lock); + + if (return_status == FAILED) { + DEBUG2(printk("%s(%ld): reset failed\n", + __func__,ha->host_no);) + qla_printk(KERN_INFO, ha, "%s: reset failed\n", + __func__); + return FAILED; + } + + /* Blocking Call. It goes to sleep waiting for cmd to get to done q */ + /* Waiting for our command in done_queue to be returned to OS.*/ + + if ( qla2x00_eh_wait_for_pending_commands(ha) == 0) { + return_status = FAILED; + } + + if(return_status == FAILED) { + DEBUG2(printk("%s(%ld): reset failed\n", + __func__,ha->host_no)); + qla_printk(KERN_INFO, ha, "%s: reset failed\n", + __func__); + return FAILED; + } else { + DEBUG2(printk("%s(%ld): reset succeded\n", + __func__,ha->host_no)); + qla_printk(KERN_INFO, ha, "%s: reset succeded\n", + __func__); + } + + LEAVE("qla2xxx_eh_bus_reset"); + + return (return_status); +} + +/************************************************************************** +* qla2xxx_eh_host_reset +* +* Description: +* The reset function will reset the Adapter. +* +* Input: +* cmd = Linux SCSI command packet of the command that cause the +* adapter reset. +* +* Returns: +* Either SUCCESS or FAILED. +* +* Note: +**************************************************************************/ +int +qla2xxx_eh_host_reset(struct scsi_cmnd *cmd) +{ + int return_status = SUCCESS; + srb_t *sp; + unsigned int b, t, l; + int found; + struct list_head *hal; + scsi_qla_host_t *ha, *search_ha; + + ENTER("qla2xxx_eh_host_reset"); + + if (cmd == NULL) { + printk(KERN_INFO + "%s(): **** SCSI mid-layer passing in NULL cmd\n", + __func__); + DEBUG2(BUG();) + + return (FAILED); + } + + ha = (scsi_qla_host_t *)cmd->device->host->hostdata; + /* Find actual ha */ + sp = (srb_t *)CMD_SP(cmd); + if (ha->flags.failover_enabled && sp != NULL && + ha->host->eh_active == EH_ACTIVE) + ha = sp->ha; + else + ha = (scsi_qla_host_t *)cmd->device->host->hostdata; + + if (ha == NULL) { + qla_printk(KERN_INFO, ha, + "%s(): **** CMD derives a NULL HA\n", + __func__); + DEBUG2(BUG();) + + return (FAILED); + } + + found = 0; + read_lock(&qla_hostlist_lock); + list_for_each(hal, &qla_hostlist) { + search_ha = list_entry(hal, scsi_qla_host_t, list); + + if (search_ha == ha) { + found ++; + break; + } + } + read_unlock(&qla_hostlist_lock); + + if (!found) { + qla_printk(KERN_INFO, ha, + "%s(): **** CMD derives a NULL search HA\n", + __func__); + DEBUG2(BUG();) + + return (FAILED); + } + + /* Display which one we're actually resetting for debug. */ + DEBUG(printk("qla2xxx_eh_host_reset:Resetting scsi(%ld).\n", + ha->host_no)); + +#if STOP_ON_RESET + qla_printk(KERN_INFO, ha, "Host Reset... Command=\n"); + qla2x00_print_scsi_cmd(cmd); + qla2x00_panic("qla2xxx_eh_host_reset", ha->host); +#endif + + /* + * Now issue reset. + */ + b = cmd->device->channel; + t = cmd->device->id; + l = cmd->device->lun; + + qla_printk(KERN_INFO, ha, + "scsi(%ld:%d:%d:%d): ADAPTER RESET issued.\n", ha->host_no, b, t, + l); + + spin_unlock_irq(ha->host->host_lock); + + /* Blocking call-Does context switching if abort isp is active etc*/ + if (qla2x00_wait_for_hba_online(ha) != QLA_SUCCESS) { + spin_lock_irq(ha->host->host_lock); + + DEBUG2(printk("%s(%ld): failed:board disabled\n", + __func__,ha->host_no);) + qla_printk(KERN_INFO, ha, + "%s: failed:board disabled\n", __func__); + return (FAILED); + } else { + /* Fixme-may be dpc thread is active and processing + * loop_resync,so wait a while for it to + * be completed and then issue big hammer.Otherwise + * it may cause I/O failure as big hammer marks the + * devices as lost kicking of the port_down_timer + * while dpc is stuck for the mailbox to complete. + */ + /* Blocking call-Does context switching if loop is Not Ready */ + qla2x00_wait_for_loop_ready(ha); + set_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags); + if (qla2x00_abort_isp(ha)) { + clear_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags); + /* failed. schedule dpc to try */ + set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + + if (qla2x00_wait_for_hba_online(ha) != QLA_SUCCESS){ + return_status = FAILED; + DEBUG2(printk("%s(%ld): failed:board" + " disabled\n", + __func__,ha->host_no);) + qla_printk(KERN_INFO, ha, + "%s: failed:board disabled\n", + __func__); + } + } + + clear_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags); + } + + spin_lock_irq(ha->host->host_lock); + + if (return_status == FAILED) { + DEBUG2(printk("%s(%ld): reset failed\n", + __func__,ha->host_no);) + qla_printk(KERN_INFO, ha, "%s: reset failed\n", + __func__); + return FAILED; + } + + /* Waiting for our command in done_queue to be returned to OS.*/ + if (qla2x00_eh_wait_for_pending_commands(ha) == 0) { + return_status = FAILED; + } + + if (return_status == FAILED) { + DEBUG2(printk("%s(%ld): reset failed\n", + __func__,ha->host_no);) + qla_printk(KERN_INFO, ha, "%s: reset failed\n", + __func__); + return FAILED; + } else { + DEBUG2(printk("%s(%ld): reset succeded\n", + __func__,ha->host_no);) + qla_printk(KERN_INFO, ha, "%s: reset succeded\n", + __func__); + } + LEAVE("qla2xxx_eh_host_reset"); + + return (return_status); +} + + +/* +* qla2x00_loop_reset +* Issue loop reset. +* +* Input: +* ha = adapter block pointer. +* +* Returns: +* 0 = success +*/ +static uint8_t +qla2x00_loop_reset(scsi_qla_host_t *ha) +{ + uint8_t status = QLA_SUCCESS; + uint16_t t; + os_tgt_t *tq; + + ENTER(__func__); + + if (ha->flags.enable_lip_reset) { + status = qla2x00_lip_reset(ha); + } + + if (status == QLA_SUCCESS && ha->flags.enable_target_reset) { + for (t = 0; t < MAX_FIBRE_DEVICES; t++) { + if ((tq = TGT_Q(ha, t)) == NULL) + continue; + + if (tq->fcport == NULL) + continue; + + status = qla2x00_target_reset(ha, 0, t); + if (status != QLA_SUCCESS) { + break; + } + } + } + + if (status == QLA_SUCCESS && + ((!ha->flags.enable_target_reset && + !ha->flags.enable_lip_reset) || + ha->flags.enable_lip_full_login)) { + + status = qla2x00_full_login_lip(ha); + } + + /* Issue marker command only when we are going to start the I/O */ + ha->marker_needed = 1; + + if (status) { + /* Empty */ + DEBUG2_3(printk("%s(%ld): **** FAILED ****\n", + __func__, + ha->host_no);) + } else { + /* Empty */ + DEBUG3(printk("%s(%ld): exiting normally.\n", + __func__, + ha->host_no);) + } + + LEAVE(__func__); + + return(status); +} + +/* + * qla2x00_device_reset + * Issue bus device reset message to the target. + * + * Input: + * ha = adapter block pointer. + * t = SCSI ID. + * TARGET_QUEUE_LOCK must be released. + * ADAPTER_STATE_LOCK must be released. + * + * Context: + * Kernel context. + */ +static int +qla2x00_device_reset(scsi_qla_host_t *ha, fc_port_t *reset_fcport) +{ + uint8_t status = 0; + + /* Abort Target command will clear Reservation */ + status = qla2x00_abort_target(reset_fcport); + + return( status ); +} + +/************************************************************************** +* qla2x00_slave_configure +* +* Description: +**************************************************************************/ +int +qla2xxx_slave_configure(struct scsi_device *sdev) +{ + scsi_qla_host_t *ha; + int queue_depth; + +#if defined(ISP2300) + queue_depth = 32; +#else + queue_depth = 16; +#endif + if (sdev->tagged_supported) { +#if defined(MODULE) + if (!(ql2xmaxqdepth == 0 || ql2xmaxqdepth > 256)) + queue_depth = ql2xmaxqdepth; +#endif + ql2xmaxqdepth = queue_depth; + + scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, queue_depth); + ha = QLA_HA(sdev->host); + + qla_printk(KERN_INFO, ha, + "scsi(%d:%d:%d:%d): Enabled tagged queuing, queue " + "depth %d.\n", + sdev->host->host_no, sdev->channel, sdev->id, sdev->lun, + sdev->queue_depth); + } else { + scsi_adjust_queue_depth(sdev, 0 /* TCQ off */, + sdev->host->hostt->cmd_per_lun /* 3 */); + } + + return (0); +} + +static int +qla2x00_iospace_config(scsi_qla_host_t *ha) +{ + unsigned long pio, pio_len, pio_flags; + unsigned long mmio, mmio_len, mmio_flags; + + pio = pci_resource_start(ha->pdev, 0); + pio_len = pci_resource_len(ha->pdev, 0); + pio_flags = pci_resource_flags(ha->pdev, 0); + + mmio = pci_resource_start(ha->pdev, 1); + mmio_len = pci_resource_len(ha->pdev, 1); + mmio_flags = pci_resource_flags(ha->pdev, 1); + +#if MEMORY_MAPPED_IO + if (!(mmio_flags & IORESOURCE_MEM)) { + qla_printk(KERN_ERR, ha, + "region #0 not an MMIO resource (%s), aborting\n", + ha->pdev->slot_name); + goto iospace_error_exit; + } + if (mmio_len < MIN_IOBASE_LEN) { + qla_printk(KERN_ERR, ha, + "Invalid PCI mem region size (%s), aborting\n", + ha->pdev->slot_name); + goto iospace_error_exit; + } +#else + if (!(pio_flags & IORESOURCE_IO)) { + qla_printk(KERN_ERR, ha, + "region #0 not a PIO resource (%s), aborting\n", + ha->pdev->slot_name); + goto iospace_error_exit; + } + if (pio_len < MIN_IOBASE_LEN) { + qla_printk(KERN_ERR, ha, + "Invalid PCI I/O region size (%s), aborting\n", + ha->pdev->slot_name); + goto iospace_error_exit; + } +#endif + + if (pci_request_regions(ha->pdev, DRIVER_NAME)) { + qla_printk(KERN_WARNING, ha, + "Failed to reserve PIO/MMIO regions (%s)\n", + ha->pdev->slot_name); + + goto iospace_error_exit; + } + + /* Assume PIO */ + ha->iobase = (device_reg_t *) pio; + ha->pio_address = pio; + ha->pio_length = pio_len; + ha->mmio_address = NULL; +#if MEMORY_MAPPED_IO + ha->mmio_address = ioremap(mmio, MIN_IOBASE_LEN); + if (!ha->mmio_address) { + qla_printk(KERN_ERR, ha, + "cannot remap MMIO (%s), aborting\n", ha->pdev->slot_name); + + goto iospace_error_exit; + } + ha->iobase = (device_reg_t *) ha->mmio_address; + ha->mmio_length = mmio_len; +#endif + + return (0); + +iospace_error_exit: + return (-ENOMEM); +} + +/* + * PCI driver interface + */ +static int __devinit +qla2x00_probe_device(struct pci_dev *pdev, const struct pci_device_id *ent) +{ + int ret; + device_reg_t *reg; + struct Scsi_Host *host; + scsi_qla_host_t *ha; + unsigned long flags = 0; + unsigned long wait_switch = 0; + char pci_info[20]; + char fw_info[30]; + + if (pci_enable_device(pdev)) + return -1; + + host = scsi_host_alloc(&qla2x00_driver_template, + sizeof(scsi_qla_host_t)); + if (host == NULL) { + printk(KERN_WARNING + "%s: Couldn't register with scsi layer!\n", DRIVER_NAME); + return -1; + } + + /* Clear our data area */ + ha = (scsi_qla_host_t *)host->hostdata; + memset(ha, 0, sizeof(scsi_qla_host_t)); + + ha->host_no = host->host_no; + sprintf(ha->host_str, "%s_%ld", DRIVER_NAME, ha->host_no); + ha->pdev = pdev; + ha->host = host; + + /* Configure PCI I/O space */ + ret = qla2x00_iospace_config(ha); + if (ret != 0) { + goto probe_failed; + } + + /* Sanitize the information from PCI BIOS. */ + host->irq = pdev->irq; + + ha->brd_info = (struct qla_board_info *)ent->driver_data; + + qla_printk(KERN_INFO, ha, + "Found an %s, irq %d, iobase 0x%p\n", ha->brd_info->name, + host->irq, ha->iobase); + + spin_lock_init(&ha->hardware_lock); + + /* 4.23 Initialize /proc/scsi/qla2x00 counters */ + ha->actthreads = 0; + ha->qthreads = 0; + ha->dump_done = 0; + ha->total_isr_cnt = 0; + ha->total_isp_aborts = 0; + ha->total_lip_cnt = 0; + ha->total_dev_errs = 0; + ha->total_ios = 0; + ha->total_bytes = 0; + + ha->prev_topology = 0; + ha->ports = MAX_BUSES; + +#if defined(ISP2100) + ha->max_targets = MAX_TARGETS_2100; +#else + ha->max_targets = MAX_TARGETS_2200; +#endif + + /* load the F/W, read paramaters, and init the H/W */ + ha->instance = num_hosts; + + init_MUTEX_LOCKED(&ha->mbx_intr_sem); + + INIT_LIST_HEAD(&ha->list); + INIT_LIST_HEAD(&ha->fcports); + INIT_LIST_HEAD(&ha->rscn_fcports); + INIT_LIST_HEAD(&ha->done_queue); + INIT_LIST_HEAD(&ha->retry_queue); + INIT_LIST_HEAD(&ha->scsi_retry_queue); + INIT_LIST_HEAD(&ha->failover_queue); + INIT_LIST_HEAD(&ha->pending_queue); + + if (ql2xfailover) + ha->flags.failover_enabled = 1; + else + ha->flags.failover_enabled = 0; + + /* + * These locks are used to prevent more than one CPU + * from modifying the queue at the same time. The + * higher level "io_request_lock" will reduce most + * contention for these locks. + */ + spin_lock_init(&ha->mbx_bits_lock); + spin_lock_init(&ha->mbx_reg_lock); + spin_lock_init(&ha->mbx_q_lock); + spin_lock_init(&ha->list_lock); + + init_completion(&ha->dpc_inited); + init_completion(&ha->dpc_exited); + + DEBUG2(printk(KERN_INFO, + "scsi(%ld): Scatter/Gather Entries (0x%x).\n", + ha->host_no, ha->host->sg_tablesize)); + + if (qla2x00_mem_alloc(ha)) { + qla_printk(KERN_WARNING, ha, + "[ERROR] Failed to allocate memory for adapter\n"); + + goto probe_failed; + } + + if (qla2x00_initialize_adapter(ha) && + !(ha->device_flags & DFLG_NO_CABLE)) { + + qla_printk(KERN_WARNING, ha, + "Failed to initialize adapter\n"); + + DEBUG2(printk("scsi(%ld): Failed to initialize adapter - " + "Adapter flags %x.\n", + ha->host_no, ha->device_flags)); + + goto probe_failed; + } + + /* + * Startup the kernel thread for this host adapter + */ + ha->dpc_should_die = 0; + ha->dpc_pid = kernel_thread(qla2x00_do_dpc, ha, 0); + if (ha->dpc_pid < 0) { + qla_printk(KERN_WARNING, ha, + "Unable to start DPC thread!\n"); + + goto probe_failed; + } + wait_for_completion(&ha->dpc_inited); + + /* Register our resources with Linux */ + if (qla2x00_register_with_Linux(ha, ha->ports - 1)) { + qla_printk(KERN_WARNING, ha, + "Failed to register resources.\n"); + + goto probe_failed; + } + + DEBUG2(printk("DEBUG: detect hba %ld at address = %p\n", + ha->host_no, ha)); + + reg = ha->iobase; + + /* Disable ISP interrupts. */ + qla2x00_disable_intrs(ha); + + /* Ensure mailbox registers are free. */ + spin_lock_irqsave(&ha->hardware_lock, flags); + WRT_REG_WORD(®->semaphore, 0); + WRT_REG_WORD(®->hccr, HCCR_CLR_RISC_INT); + WRT_REG_WORD(®->hccr, HCCR_CLR_HOST_INT); + + /* Enable proper parity */ +#if defined(ISP2300) + if (ha->pdev->device == QLA2312_DEVICE_ID || + ha->pdev->device == QLA2322_DEVICE_ID) + /* SRAM, Instruction RAM and GP RAM parity */ + WRT_REG_WORD(®->hccr, (HCCR_ENABLE_PARITY + 0x7)); + else + /* SRAM parity */ + WRT_REG_WORD(®->hccr, (HCCR_ENABLE_PARITY + 0x1)); +#endif + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + /* + * if failover is enabled read the user configuration + */ + if (ha->flags.failover_enabled) { + if (ConfigRequired > 0) + mp_config_required = 1; + else + mp_config_required = 0; + + DEBUG(printk("qla2x00_detect: qla2x00_cfg_init for hba %ld\n", + ha->instance)); + + qla2x00_cfg_init(ha); + } + + /* Enable chip interrupts. */ + qla2x00_enable_intrs(ha); + + /* Insert new entry into the list of adapters */ + write_lock(&qla_hostlist_lock); + list_add_tail(&ha->list, &qla_hostlist); + write_unlock(&qla_hostlist_lock); + + /* v2.19.5b6 */ + /* + * Wait around max loop_reset_delay secs for the devices to come + * on-line. We don't want Linux scanning before we are ready. + * + */ + for (wait_switch = jiffies + (ha->loop_reset_delay * HZ); + time_before(jiffies,wait_switch) && + !(ha->device_flags & (DFLG_NO_CABLE | DFLG_FABRIC_DEVICES)) + && (ha->device_flags & SWITCH_FOUND) ;) { + + qla2x00_check_fabric_devices(ha); + + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(5); + } + + /* List the target we have found */ + if (displayConfig && (!ha->flags.failover_enabled)) + qla2x00_display_fc_names(ha); + + pci_set_drvdata(pdev, ha); + ha->init_done = 1; + num_hosts++; + + if (displayConfig && ha->flags.failover_enabled) + qla2x00_cfg_display_devices(); + + if (scsi_add_host(host, &pdev->dev)) + goto probe_failed; + + sysfs_create_bin_file(&host->shost_gendev.kobj, &fw_dump_attr); + + qla_printk(KERN_INFO, ha, "\n" + " QLogic QLA" ISP_NAME " PCI/PCI-X Fibre Channel HBA Driver: %s\n" + " QLogic %s\n" + " %s: %s @ %s hdma%c, host#=%ld, fw=%s\n", qla2x00_version_str, + ha->model_number, ha->brd_info->name, + qla2x00_get_pci_info_str(ha, pci_info), pci_name(ha->pdev), + ha->flags.enable_64bit_addressing ? '+': '-', ha->host_no, + qla2x00_get_fw_version_str(ha, fw_info)); + + if (ql2xdoinitscan) + scsi_scan_host(host); + + return 0; + +probe_failed: + qla2x00_free_device(ha); + + scsi_host_put(host); + + return -1; +} + +static void __devexit +qla2x00_remove_device(struct pci_dev *pdev) +{ + scsi_qla_host_t *ha; + + ha = pci_get_drvdata(pdev); + + write_lock(&qla_hostlist_lock); + list_del(&ha->list); + write_unlock(&qla_hostlist_lock); + + sysfs_remove_bin_file(&ha->host->shost_gendev.kobj, &fw_dump_attr); + + scsi_remove_host(ha->host); + + qla2x00_free_device(ha); + + scsi_host_put(ha->host); + + pci_set_drvdata(pdev, NULL); +} + +static void +qla2x00_free_device(scsi_qla_host_t *ha) +{ + int ret; + +#if defined(ISP2300) + /* Abort any outstanding IO descriptors. */ + qla2x00_cancel_io_descriptors(ha); +#endif + + /* turn-off interrupts on the card */ + if (ha->interrupts_on) + qla2x00_disable_intrs(ha); + + /* Disable timer */ + if (ha->timer_active) + qla2x00_stop_timer(ha); + + /* Kill the kernel thread for this host */ + if (ha->dpc_pid >= 0) { + ha->dpc_should_die = 1; + wmb(); + ret = kill_proc(ha->dpc_pid, SIGHUP, 1); + if (ret) { + qla_printk(KERN_ERR, ha, + "Unable to signal DPC thread -- (%d)\n", ret); + + /* TODO: SOMETHING MORE??? */ + } else { + wait_for_completion(&ha->dpc_exited); + } + } + + qla2x00_mem_free(ha); + + if (ha->flags.failover_enabled) + qla2x00_cfg_mem_free(ha); + + ha->flags.online = FALSE; + + /* Detach interrupts */ + if (ha->pdev->irq) + free_irq(ha->pdev->irq, ha); + + /* release io space registers */ + pci_release_regions(ha->pdev); + +#if MEMORY_MAPPED_IO + if (ha->mmio_address) + iounmap(ha->mmio_address); +#endif +} + + +/* + * The following support functions are adopted to handle + * the re-entrant qla2x00_proc_info correctly. + */ +static void +copy_mem_info(struct info_str *info, char *data, int len) +{ + if (info->pos + len > info->offset + info->length) + len = info->offset + info->length - info->pos; + + if (info->pos + len < info->offset) { + info->pos += len; + return; + } + + if (info->pos < info->offset) { + off_t partial; + + partial = info->offset - info->pos; + data += partial; + info->pos += partial; + len -= partial; + } + + if (len > 0) { + memcpy(info->buffer, data, len); + info->pos += len; + info->buffer += len; + } +} + +static int +copy_info(struct info_str *info, char *fmt, ...) +{ + va_list args; + char buf[256]; + int len; + + va_start(args, fmt); + len = vsprintf(buf, fmt, args); + va_end(args); + + copy_mem_info(info, buf, len); + + return (len); +} + +/************************************************************************* +* qla2x00_proc_info +* +* Description: +* Return information to handle /proc support for the driver. +* +* inout : decides the direction of the dataflow and the meaning of the +* variables +* buffer: If inout==FALSE data is being written to it else read from it +* (ptr to a page buffer) +* *start: If inout==FALSE start of the valid data in the buffer +* offset: If inout==FALSE starting offset from the beginning of all +* possible data to return. +* length: If inout==FALSE max number of bytes to be written into the buffer +* else number of bytes in "buffer" +* Returns: +* < 0: error. errno value. +* >= 0: sizeof data returned. +*************************************************************************/ +int +qla2x00_proc_info(struct Scsi_Host *shost, char *buffer, + char **start, off_t offset, int length, int inout) +{ + struct info_str info; + int i; + int retval = -EINVAL; + os_lun_t *up; + os_tgt_t *tq; + unsigned int t, l; + uint32_t tmp_sn; + unsigned long *flags; + uint8_t *loop_state; + int found; + scsi_qla_host_t *ha; + char fw_info[30]; + + DEBUG3(printk(KERN_INFO + "Entering proc_info buff_in=%p, offset=0x%lx, length=0x%x\n", + buffer, offset, length);) + + ha = NULL; + + /* Find the host that was specified */ + found = 0; + read_lock(&qla_hostlist_lock); + list_for_each_entry(ha, &qla_hostlist, list) { + if (ha->host == shost) { + found++; + break; + } + } + read_unlock(&qla_hostlist_lock); + + /* if host wasn't found then exit */ + if (!found) { + DEBUG2_3(printk(KERN_WARNING + "%s: Can't find adapter for host %p\n", + __func__, shost);) + + return (retval); + } + + if (inout == TRUE) { + /* Has data been written to the file? */ + DEBUG3(printk( + "%s: has data been written to the file. \n", + __func__);) + + return (qla2x00_set_info(buffer, length, shost)); + } + + if (start) { + *start = buffer; + } + + info.buffer = buffer; + info.length = length; + info.offset = offset; + info.pos = 0; + + /* start building the print buffer */ + copy_info(&info, + "QLogic PCI to Fibre Channel Host Adapter for %s:\n" + " Firmware version %s, ", + ha->model_number, qla2x00_get_fw_version_str(ha, fw_info)); + + copy_info(&info, "Driver version %s\n", qla2x00_version_str); + + copy_info(&info, "Entry address = %p\n", qla2x00_set_info); + + tmp_sn = ((ha->serial0 & 0x1f) << 16) | (ha->serial2 << 8) | + ha->serial1; + copy_info(&info, "ISP: %s, Serial# %c%05d\n", + ha->brd_info->name, ('A' + tmp_sn/100000), (tmp_sn%100000)); + + copy_info(&info, + "Request Queue = 0x%p, Response Queue = 0x%p\n", + (void *)ha->request_dma, (void *)ha->response_dma); + + copy_info(&info, + "Request Queue count = %ld, Response Queue count = %ld\n", + (long)REQUEST_ENTRY_CNT, (long)RESPONSE_ENTRY_CNT); + + copy_info(&info, + "Total number of active commands = %ld\n", + ha->actthreads); + + copy_info(&info, + "Total number of interrupts = %ld\n", + (long)ha->total_isr_cnt); + + copy_info(&info, + " Device queue depth = 0x%x\n", + (ql2xmaxqdepth == 0) ? 16 : ql2xmaxqdepth); + + copy_info(&info, + "Number of free request entries = %d\n", ha->req_q_cnt); + + copy_info(&info, + "Number of mailbox timeouts = %ld\n", ha->total_mbx_timeout); + + copy_info(&info, + "Number of ISP aborts = %ld\n", ha->total_isp_aborts); + + copy_info(&info, + "Number of loop resyncs = %ld\n", ha->total_loop_resync); + + copy_info(&info, + "Number of retries for empty slots = %ld\n", + qla2x00_stats.outarray_full); + + copy_info(&info, + "Number of reqs in pending_q= %ld, retry_q= %d, " + "done_q= %ld, scsi_retry_q= %d\n", + ha->qthreads, ha->retry_q_cnt, + ha->done_q_cnt, ha->scsi_retry_q_cnt); + + if (ha->flags.failover_enabled) { + copy_info(&info, + "Number of reqs in failover_q= %d\n", + ha->failover_cnt); + } + + flags = (unsigned long *) &ha->flags; + + if (ha->loop_state == LOOP_DOWN) { + loop_state = "DOWN"; + } else if (ha->loop_state == LOOP_UP) { + loop_state = "UP"; + } else if (ha->loop_state == LOOP_READY) { + loop_state = "READY"; + } else if (ha->loop_state == LOOP_TIMEOUT) { + loop_state = "TIMEOUT"; + } else if (ha->loop_state == LOOP_UPDATE) { + loop_state = "UPDATE"; + } else { + loop_state = "UNKNOWN"; + } + + copy_info(&info, + "Host adapter:loop state = <%s>, flags = 0x%lx\n", + loop_state , *flags); + + copy_info(&info, "Dpc flags = 0x%lx\n", ha->dpc_flags); + + copy_info(&info, "MBX flags = 0x%x\n", ha->mbx_flags); + + copy_info(&info, "Link down Timeout = %3.3d\n", + ha->link_down_timeout); + + copy_info(&info, "Port down retry = %3.3d\n", + ha->port_down_retry_count); + + copy_info(&info, "Login retry count = %3.3d\n", + ha->login_retry_count); + + copy_info(&info, + "Commands retried with dropped frame(s) = %d\n", + ha->dropped_frame_error_cnt); + + copy_info(&info, + "Info -- pci=%x xchgs=0x%x iocbs=0x%x\n", ha->pci_attr, + ha->xchg_buf_cnt, ha->iocb_buf_cnt); + + copy_info(&info, "\n"); + + /* 2.25 node/port display to proc */ + /* Display the node name for adapter */ + copy_info(&info, "\nSCSI Device Information:\n"); + copy_info(&info, + "scsi-qla%d-adapter-node=" + "%02x%02x%02x%02x%02x%02x%02x%02x;\n", + (int)ha->instance, + ha->init_cb->node_name[0], + ha->init_cb->node_name[1], + ha->init_cb->node_name[2], + ha->init_cb->node_name[3], + ha->init_cb->node_name[4], + ha->init_cb->node_name[5], + ha->init_cb->node_name[6], + ha->init_cb->node_name[7]); + + /* display the port name for adapter */ + copy_info(&info, + "scsi-qla%d-adapter-port=" + "%02x%02x%02x%02x%02x%02x%02x%02x;\n", + (int)ha->instance, + ha->init_cb->port_name[0], + ha->init_cb->port_name[1], + ha->init_cb->port_name[2], + ha->init_cb->port_name[3], + ha->init_cb->port_name[4], + ha->init_cb->port_name[5], + ha->init_cb->port_name[6], + ha->init_cb->port_name[7]); + + /* Print out device port names */ + for (i = 0; i < MAX_TARGETS; i++) { + if ((tq = TGT_Q(ha, i)) == NULL) + continue; + + if (ha->flags.failover_enabled) { + copy_info(&info, + "scsi-qla%d-port-%d=" + "%02x%02x%02x%02x%02x%02x%02x%02x:" + "%02x%02x%02x%02x%02x%02x%02x%02x;\n", + (int)ha->instance, i, + tq->node_name[0], tq->node_name[1], + tq->node_name[2], tq->node_name[3], + tq->node_name[4], tq->node_name[5], + tq->node_name[6], tq->node_name[7], + tq->port_name[0], tq->port_name[1], + tq->port_name[2], tq->port_name[3], + tq->port_name[4], tq->port_name[5], + tq->port_name[6], tq->port_name[7]); + } else { + copy_info(&info, + "scsi-qla%d-target-%d=" + "%02x%02x%02x%02x%02x%02x%02x%02x;\n", + (int)ha->instance, i, + tq->port_name[0], tq->port_name[1], + tq->port_name[2], tq->port_name[3], + tq->port_name[4], tq->port_name[5], + tq->port_name[6], tq->port_name[7]); + } + + } /* 2.25 node/port display to proc */ + + copy_info(&info, "\nSCSI LUN Information:\n"); + copy_info(&info, + "(Id:Lun) * - indicates lun is not registered with the OS.\n"); + + /* scan for all equipment stats */ + for (t = 0; t < MAX_FIBRE_DEVICES; t++) { + /* scan all luns */ + for (l = 0; l < ha->max_luns; l++) { + up = (os_lun_t *) GET_LU_Q(ha, t, l); + + if (up == NULL) { + continue; + } + if (up->fclun == NULL) { + continue; + } + + copy_info(&info, + "(%2d:%2d): Total reqs %ld,", + t,l,up->io_cnt); + + copy_info(&info, + " Pending reqs %ld,", + up->out_cnt); + + if (up->io_cnt < 4) { + copy_info(&info, + " flags 0x%x*,", + (int)up->q_flag); + } else { + copy_info(&info, + " flags 0x%x,", + (int)up->q_flag); + } + + copy_info(&info, + " %ld:%d:%02x %02x", + up->fclun->fcport->ha->instance, + up->fclun->fcport->cur_path, + up->fclun->fcport->loop_id, + up->fclun->device_type); + + copy_info(&info, "\n"); + + if (info.pos >= info.offset + info.length) { + /* No need to continue */ + goto profile_stop; + } + } + + if (info.pos >= info.offset + info.length) { + /* No need to continue */ + break; + } + } + +profile_stop: + + retval = info.pos > info.offset ? info.pos - info.offset : 0; + + DEBUG3(printk(KERN_INFO + "Exiting proc_info: info.pos=%d, offset=0x%lx, " + "length=0x%x\n", info.pos, offset, length);) + +#if QLA2100_LIPTEST + qla2x00_lip = 1; +#endif + + return (retval); +} + +/************************************************************************** +* qla2x00_setup +* +* Handle Linux boot parameters. This routine allows for assigning a value +* to a parameter with a ';' between the parameter and the value. +* ie. qla2x00=arg0;arg1;...;argN; OR +* via the command line. +* ie. qla2x00 ql2xopts=arg0;arg1;...;argN; +**************************************************************************/ +#if !defined(MODULE) +static int __init +qla2x00_setup(char *s) +#else +void +qla2x00_setup(char *s) +#endif +{ + char *cp, *np; + char *slots[MAXARGS]; + char **argv = &slots[0]; + static char buf[LINESIZE]; + int argc, opts; + +#if !defined(MODULE) + if (s == NULL || *s == '\0') + return 0; +#endif + + /* + * Determine if we have any properties. + */ + cp = s; + opts = 1; + while (*cp && (np = qla2x00_get_line(cp, buf)) != NULL) { + if (strncmp("scsi-qla",buf,8) == 0) { + DEBUG(printk("qla2100: devconf=%s\n",cp);) + + ql2xdevconf = cp; + (opts > 0)? opts-- : 0; + break; + } + opts++; + cp = np; + } + + /* + * Parse the args before the properties + */ + if (opts) { + opts = (opts > MAXARGS-1)? MAXARGS-1: opts; + argc = qla2x00_get_tokens(s, argv, opts); + while (argc > 0) { + cp = *argv; + DEBUG(printk("scsi: found cmd arg =[%s]\n", cp)); + + if (strcmp(cp, "verbose") == 0) { + DEBUG(printk("qla2100: verbose\n")); + qla2x00_verbose++; + } else if (strcmp(cp, "reinit_on_loopdown") == 0) { + qla2x00_reinit++; + DEBUG(printk("qla2100: reinit_on_loopdown\n")); + } + argc--, argv++; + } + } + +#if !defined(MODULE) + if (ql2xdevconf) + return 1; + else + return 0; +#endif +} + +#if !defined(MODULE) +__setup("ql2xopts=", qla2x00_setup); +#endif + +/********************** qla2x00_get_line ********************* +* qla2x00_get_line +* Copy a substring from the specified string. The substring +* consists of any number of chars seperated by white spaces (i.e. spaces) +* and ending with a newline '\n' or a semicolon ';'. +* +* Enter: +* str - orig string +* line - substring +* +* Returns: +* cp - pointer to next string +* or +* null - End of string +*************************************************************/ +static char * +qla2x00_get_line(char *str, char *line) +{ + register char *cp = str; + register char *sp = line; + + /* skip preceeding spaces */ + while (*cp && *cp == ' ') + ++cp; + while ((*cp) && *cp != '\n' && *cp != ';') /* end of line */ + *sp++ = *cp++; + + *sp = '\0'; + + DEBUG5(printk("%s(): %s\n", __func__, line)); + + if( (*cp) ) { + cp++; + return (cp); + } + + return (NULL); +} + + +/**************************** get_tokens ********************* +* Parse command line into argv1, argv2, ... argvX +* Arguments are seperated by white spaces and colons and end +* with a NULL. +*************************************************************/ +static int +qla2x00_get_tokens(char *line, char **argv, int maxargs) +{ + register char *cp = line; + int count = 0; + + while (*cp && count < maxargs) { + /* skip preceeding spaces */ + while ((*cp) && *cp == ' ') + ++cp; + /* symbol starts here */ + argv[count++] = cp; + /* skip symbols */ + while ((*cp) && !(*cp == ' ' || *cp == ';' || *cp == ':')) + cp++; + /* replace comma or space with a null */ + if((*cp) && (*cp ==' ' ) && argv[count-1] != cp) + *cp++ = '\0'; + } + return (count); +} + +/* +* qla2x00_display_fc_names +* This routine will the node names of the different devices found +* after port inquiry. +* +* Input: +* cmd = SCSI command structure +* +* Returns: +* None. +*/ +static void +qla2x00_display_fc_names(scsi_qla_host_t *ha) +{ + uint16_t tgt; + os_tgt_t *tq; + + /* Display the node name for adapter */ + qla_printk(KERN_INFO, ha, + "scsi-qla%d-adapter-node=%02x%02x%02x%02x%02x%02x%02x%02x\\;\n", + (int)ha->instance, + ha->init_cb->node_name[0], + ha->init_cb->node_name[1], + ha->init_cb->node_name[2], + ha->init_cb->node_name[3], + ha->init_cb->node_name[4], + ha->init_cb->node_name[5], + ha->init_cb->node_name[6], + ha->init_cb->node_name[7]); + + /* display the port name for adapter */ + qla_printk(KERN_INFO, ha, + "scsi-qla%d-adapter-port=%02x%02x%02x%02x%02x%02x%02x%02x\\;\n", + (int)ha->instance, + ha->init_cb->port_name[0], + ha->init_cb->port_name[1], + ha->init_cb->port_name[2], + ha->init_cb->port_name[3], + ha->init_cb->port_name[4], + ha->init_cb->port_name[5], + ha->init_cb->port_name[6], + ha->init_cb->port_name[7]); + + /* Print out device port names */ + for (tgt = 0; tgt < MAX_TARGETS; tgt++) { + if ((tq = ha->otgt[tgt]) == NULL) + continue; + + if (tq->fcport == NULL) + continue; + + switch (ha->binding_type) { + case BIND_BY_PORT_NAME: + qla_printk(KERN_INFO, ha, + "scsi-qla%d-tgt-%d-di-0-port=" + "%02x%02x%02x%02x%02x%02x%02x%02x\\;\n", + (int)ha->instance, + tgt, + tq->port_name[0], + tq->port_name[1], + tq->port_name[2], + tq->port_name[3], + tq->port_name[4], + tq->port_name[5], + tq->port_name[6], + tq->port_name[7]); + + break; + + case BIND_BY_PORT_ID: + qla_printk(KERN_INFO, ha, + "scsi-qla%d-tgt-%d-di-0-pid=" + "%02x%02x%02x\\;\n", + (int)ha->instance, + tgt, + tq->d_id.b.domain, + tq->d_id.b.area, + tq->d_id.b.al_pa); + break; + + case BIND_BY_NODE_NAME: + qla_printk(KERN_INFO, ha, + "scsi-qla%d-tgt-%d-di-0-node=" + "%02x%02x%02x%02x%02x%02x%02x%02x\\;\n", + (int)ha->instance, + tgt, + tq->node_name[0], + tq->node_name[1], + tq->node_name[2], + tq->node_name[3], + tq->node_name[4], + tq->node_name[5], + tq->node_name[6], + tq->node_name[7]); + break; + } + +#if VSA + qla_printk(KERN_INFO, ha, + "scsi-qla%d-target-%d-vsa=01;\n", (int)ha->instance, tgt); +#endif + } +} + +/* + * qla2x00_suspend_lun + * Suspend lun and start port down timer + * + * Input: + * ha = visable adapter block pointer. + * lq = lun queue + * cp = Scsi command pointer + * time = time in seconds + * count = number of times to let time expire + * delay_lun = non-zero, if lun should be delayed rather than suspended + * + * Return: + * QLA_SUCCESS -- suspended lun + * QLA_FUNCTION_FAILED -- Didn't suspend lun + * + * Context: + * Interrupt context. + */ +int +__qla2x00_suspend_lun(scsi_qla_host_t *ha, + os_lun_t *lq, int time, int count, int delay_lun) +{ + int rval; + srb_t *sp; + struct list_head *list, *temp; + unsigned long flags; + + rval = QLA_SUCCESS; + + /* if the lun_q is already suspended then don't do it again */ + if (lq->q_state == LUN_STATE_READY ||lq->q_state == LUN_STATE_RUN) { + + spin_lock_irqsave(&lq->q_lock, flags); + if (lq->q_state == LUN_STATE_READY) { + lq->q_max = count; + lq->q_count = 0; + } + /* Set the suspend time usually 6 secs */ + atomic_set(&lq->q_timer, time); + + /* now suspend the lun */ + lq->q_state = LUN_STATE_WAIT; + + if (delay_lun) { + set_bit(LUN_EXEC_DELAYED, &lq->q_flag); + DEBUG(printk(KERN_INFO + "scsi(%ld): Delay lun execution for %d secs, " + "count=%d, max count=%d, state=%d\n", + ha->host_no, + time, + lq->q_count, lq->q_max, lq->q_state)); + } else { + DEBUG(printk(KERN_INFO + "scsi(%ld): Suspend lun for %d secs, count=%d, " + "max count=%d, state=%d\n", + ha->host_no, + time, + lq->q_count, lq->q_max, lq->q_state)); + } + spin_unlock_irqrestore(&lq->q_lock, flags); + + /* + * Remove all pending commands from request queue and put them + * in the scsi_retry queue. + */ + spin_lock_irqsave(&ha->list_lock, flags); + list_for_each_safe(list, temp, &ha->pending_queue) { + sp = list_entry(list, srb_t, list); + if (sp->lun_queue != lq) + continue; + + __del_from_pending_queue(ha, sp); + + if (sp->cmd->allowed < count) + sp->cmd->allowed = count; + __add_to_scsi_retry_queue(ha, sp); + + } /* list_for_each_safe */ + spin_unlock_irqrestore(&ha->list_lock, flags); + rval = QLA_SUCCESS; + } else { + rval = QLA_FUNCTION_FAILED; + } + + return (rval); +} + +/* + * qla2x00_mark_device_lost Updates fcport state when device goes offline. + * + * Input: ha = adapter block pointer. fcport = port structure pointer. + * + * Return: None. + * + * Context: + */ +void qla2x00_mark_device_lost(scsi_qla_host_t *ha, fc_port_t *fcport, + int do_login) +{ + /* + * We may need to retry the login, so don't change the state of the + * port but do the retries. + */ + if (atomic_read(&fcport->state) != FCS_DEVICE_DEAD) + atomic_set(&fcport->state, FCS_DEVICE_LOST); + + if (!do_login) + return; + + if (fcport->login_retry == 0) { + fcport->login_retry = ha->login_retry_count; + set_bit(RELOGIN_NEEDED, &ha->dpc_flags); + + DEBUG(printk("scsi(%ld): Port login retry: " + "%02x%02x%02x%02x%02x%02x%02x%02x, " + "id = 0x%04x retry cnt=%d\n", + ha->host_no, + fcport->port_name[0], + fcport->port_name[1], + fcport->port_name[2], + fcport->port_name[3], + fcport->port_name[4], + fcport->port_name[5], + fcport->port_name[6], + fcport->port_name[7], + fcport->loop_id, + fcport->login_retry)); + } +} + +/* + * qla2x00_mark_all_devices_lost + * Updates fcport state when device goes offline. + * + * Input: + * ha = adapter block pointer. + * fcport = port structure pointer. + * + * Return: + * None. + * + * Context: + */ +void +qla2x00_mark_all_devices_lost(scsi_qla_host_t *ha) +{ + struct list_head *fcpl; + fc_port_t *fcport; + + list_for_each(fcpl, &ha->fcports) { + fcport = list_entry(fcpl, fc_port_t, list); + + /* + * No point in marking the device as lost, if the device is + * already DEAD. + */ + if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD) + continue; + + atomic_set(&fcport->state, FCS_DEVICE_LOST); + } +} + +/* +* qla2x00_mem_alloc +* Allocates adapter memory. +* +* Returns: +* 0 = success. +* 1 = failure. +*/ +static uint8_t +qla2x00_mem_alloc(scsi_qla_host_t *ha) +{ + uint8_t status = 1; + uint8_t i; + int retry= 10; + mbx_cmdq_t *ptmp; + mbx_cmdq_t *tmp_q_head; + mbx_cmdq_t *tmp_q_tail; + + ENTER(__func__); + + do { + /* + * This will loop only once if everything goes well, else some + * number of retries will be performed to get around a kernel + * bug where available mem is not allocated until after a + * little delay and a retry. + */ + ha->request_ring = pci_alloc_consistent(ha->pdev, + ((REQUEST_ENTRY_CNT + 1) * (sizeof(request_t))), + &ha->request_dma); + if (ha->request_ring == NULL) { + qla_printk(KERN_WARNING, ha, + "Memory Allocation failed - request_ring\n"); + + qla2x00_mem_free(ha); + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ/10); + + continue; + } + + ha->response_ring = pci_alloc_consistent(ha->pdev, + ((RESPONSE_ENTRY_CNT + 1) * (sizeof(response_t))), + &ha->response_dma); + if (ha->response_ring == NULL) { + qla_printk(KERN_WARNING, ha, + "Memory Allocation failed - response_ring\n"); + + qla2x00_mem_free(ha); + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ/10); + + continue; + } + + /* get consistent memory allocated for init control block */ + ha->init_cb = pci_alloc_consistent(ha->pdev, + sizeof(init_cb_t), &ha->init_cb_dma); + if (ha->init_cb == NULL) { + qla_printk(KERN_WARNING, ha, + "Memory Allocation failed - init_cb\n"); + + qla2x00_mem_free(ha); + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ/10); + + continue; + } + memset(ha->init_cb, 0, sizeof(init_cb_t)); + + /* Allocate ioctl related memory. */ + if (qla2x00_alloc_ioctl_mem(ha)) { + qla_printk(KERN_WARNING, ha, + "Memory Allocation failed - ioctl_mem\n"); + + qla2x00_mem_free(ha); + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ/10); + + continue; + } + + if (qla2x00_allocate_sp_pool(ha)) { + qla_printk(KERN_WARNING, ha, + "Memory Allocation failed - " + "qla2x00_allocate_sp_pool()\n"); + + qla2x00_mem_free(ha); + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ/10); + + continue; + } + + /* + * Allocate an initial list of mailbox semaphore queue to be + * used for serialization of the mailbox commands. + */ + tmp_q_head = (void *)KMEM_ZALLOC(sizeof(mbx_cmdq_t), 20); + if (tmp_q_head == NULL) { + /* error */ + qla_printk(KERN_WARNING, ha, + "Memory Allocation failed - mbx_cmd_q"); + + qla2x00_mem_free(ha); + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ/10); + + continue; + } + ha->mbx_sem_pool_head = tmp_q_head; + tmp_q_tail = tmp_q_head; + + /* Now try to allocate more */ + for (i = 1; i < MBQ_INIT_LEN; i++) { + ptmp = (void *)KMEM_ZALLOC(sizeof(mbx_cmdq_t), 20 + i); + if (ptmp == NULL) { + /* + * Error. Just exit. If more is needed later + * they will be allocated at that time. + */ + break; + } + tmp_q_tail->pnext = ptmp; + tmp_q_tail = ptmp; + } + ha->mbx_sem_pool_tail = tmp_q_tail; + + /* Get consistent memory allocated for MS IOCB */ + ha->ms_iocb = pci_alloc_consistent(ha->pdev, + sizeof(ms_iocb_entry_t), &ha->ms_iocb_dma); + if (ha->ms_iocb == NULL) { + /* error */ + qla_printk(KERN_WARNING, ha, + "Memory Allocation failed - ms_iocb\n"); + + qla2x00_mem_free(ha); + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ/10); + + continue; + } + memset(ha->ms_iocb, 0, sizeof(ms_iocb_entry_t)); + + /* Get consistent memory allocated for CT SNS commands */ + ha->ct_sns = pci_alloc_consistent(ha->pdev, + sizeof(struct ct_sns_pkt), &ha->ct_sns_dma); + if (ha->ct_sns == NULL) { + /* error */ + qla_printk(KERN_WARNING, ha, + "Memory Allocation failed - ct_sns\n"); + + qla2x00_mem_free(ha); + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ/10); + + continue; + } + memset(ha->ct_sns, 0, sizeof(struct ct_sns_pkt)); + + /* Get consistent memory allocated for Get Port Database cmd */ + ha->iodesc_pd = pci_alloc_consistent(ha->pdev, + PORT_DATABASE_SIZE, &ha->iodesc_pd_dma); + if (ha->iodesc_pd == NULL) { + /* error */ + qla_printk(KERN_WARNING, ha, + "Memory Allocation failed - iodesc_pd\n"); + + qla2x00_mem_free(ha); + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ/10); + + continue; + } + memset(ha->iodesc_pd, 0, PORT_DATABASE_SIZE); + + /* Done all allocations without any error. */ + status = 0; + + } while (retry-- && status != 0); + + if (status) { + printk(KERN_WARNING + "%s(): **** FAILED ****\n", __func__); + } + + LEAVE(__func__); + + return(status); +} + +/* +* qla2x00_mem_free +* Frees all adapter allocated memory. +* +* Input: +* ha = adapter block pointer. +*/ +static void +qla2x00_mem_free(scsi_qla_host_t *ha) +{ + uint32_t t; + struct list_head *fcpl, *fcptemp; + fc_port_t *fcport; + struct list_head *fcll, *fcltemp; + fc_lun_t *fclun; + mbx_cmdq_t *ptmp; + mbx_cmdq_t *tmp_q_head; + unsigned long wtime;/* max wait time if mbx cmd is busy. */ + + ENTER(__func__); + + if (ha == NULL) { + /* error */ + DEBUG2(printk("%s(): ERROR invalid ha pointer.\n", __func__)); + return; + } + + /* Free the target queues */ + for (t = 0; t < MAX_TARGETS; t++) { + qla2x00_tgt_free(ha, t); + } + + /* Make sure all other threads are stopped. */ + wtime = 60 * HZ; + while ((ha->dpc_wait != NULL || ha->mbx_q_head != NULL) && wtime) { + set_current_state(TASK_INTERRUPTIBLE); + wtime = schedule_timeout(wtime); + } + + /* Now free the mbx sem pool */ + tmp_q_head = ha->mbx_sem_pool_head; + while (tmp_q_head != NULL) { + ptmp = tmp_q_head->pnext; + KMEM_FREE(tmp_q_head, sizeof(mbx_cmdq_t)); + tmp_q_head = ptmp; + } + ha->mbx_sem_pool_head = NULL; + + /* free ioctl memory */ + qla2x00_free_ioctl_mem(ha); + + /* free sp pool */ + qla2x00_free_sp_pool(ha); + + if (ha->iodesc_pd) { + pci_free_consistent(ha->pdev, PORT_DATABASE_SIZE, + ha->iodesc_pd, ha->iodesc_pd_dma); + } + if (ha->ct_sns) { + pci_free_consistent(ha->pdev, + sizeof(struct ct_sns_pkt), ha->ct_sns, ha->ct_sns_dma); + } + if (ha->ms_iocb) { + pci_free_consistent(ha->pdev, + sizeof(ms_iocb_entry_t), ha->ms_iocb, ha->ms_iocb_dma); + } + + if (ha->init_cb) { + pci_free_consistent(ha->pdev, + sizeof(init_cb_t), ha->init_cb, ha->init_cb_dma); + } + + if (ha->request_ring) { + pci_free_consistent(ha->pdev, + ((REQUEST_ENTRY_CNT + 1) * (sizeof(request_t))), + ha->request_ring, ha->request_dma); + } + + if (ha->response_ring) { + pci_free_consistent(ha->pdev, + ((RESPONSE_ENTRY_CNT + 1) * (sizeof(response_t))), + ha->response_ring, ha->response_dma); + } + + ha->iodesc_pd = NULL; + ha->iodesc_pd_dma = 0; + ha->ct_sns = NULL; + ha->ms_iocb = NULL; + + ha->init_cb = NULL; + ha->request_ring = NULL; + ha->request_dma = 0; + ha->response_ring = NULL; + ha->response_dma = 0; + + list_for_each_safe(fcpl, fcptemp, &ha->fcports) { + fcport = list_entry(fcpl, fc_port_t, list); + + /* fc luns */ + list_for_each_safe(fcll, fcltemp, &fcport->fcluns) { + fclun = list_entry(fcll, fc_lun_t, list); + + list_del_init(&fclun->list); + kfree(fclun); + } + + /* fc ports */ + list_del_init(&fcport->list); + kfree(fcport); + } + INIT_LIST_HEAD(&ha->fcports); + + if (ha->fw_dump) { + free_pages((unsigned long)ha->fw_dump, ha->fw_dump_order); + ha->fw_dump = NULL; + } + + if (ha->fw_dump_buffer) { + vfree(ha->fw_dump_buffer); + ha->fw_dump_reading = 0; + ha->fw_dump_buffer = NULL; + } + + LEAVE(__func__); +} + +/* + * qla2x00_allocate_sp_pool + * This routine is called during initialization to allocate + * memory for local srb_t. + * + * Input: + * ha = adapter block pointer. + * + * Context: + * Kernel context. + * + * Note: Sets the ref_count for non Null sp to one. + */ +int +qla2x00_allocate_sp_pool(scsi_qla_host_t *ha) +{ + int rval; + + rval = QLA_SUCCESS; + ha->srb_cachep = kmem_cache_create(ha->host_str, sizeof(srb_t), 0, + SLAB_HWCACHE_ALIGN, NULL, NULL); + if (ha->srb_cachep == NULL) { + qla_printk(KERN_INFO, ha, "Unable to allocate SRB cache.\n"); + rval = QLA_FUNCTION_FAILED; + + } + return (rval); +} + +/* + * This routine frees all adapter allocated memory. + * + */ +void +qla2x00_free_sp_pool( scsi_qla_host_t *ha) +{ + if (ha->srb_cachep) { + if (kmem_cache_destroy(ha->srb_cachep) != 0) { + qla_printk(KERN_ERR, ha, + "Did not free all srbs, before destroying " + "cache!!!\n"); + } + ha->srb_cachep = NULL; + } +} + + + +/************************************************************************** +* qla2x00_do_dpc +* This kernel thread is a task that is schedule by the interrupt handler +* to perform the background processing for interrupts. +* +* Notes: +* This task always run in the context of a kernel thread. It +* is kick-off by the driver's detect code and starts up +* up one per adapter. It immediately goes to sleep and waits for +* some fibre event. When either the interrupt handler or +* the timer routine detects a event it will one of the task +* bits then wake us up. +**************************************************************************/ +static int +qla2x00_do_dpc(void *data) +{ + DECLARE_MUTEX_LOCKED(sem); + scsi_qla_host_t *ha; + struct list_head *fcpl; + fc_port_t *fcport; + os_lun_t *q; + srb_t *sp; + uint8_t status; + unsigned long flags = 0; + struct list_head *list, *templist; + int dead_cnt, online_cnt; + uint16_t next_loopid; + + ha = (scsi_qla_host_t *)data; + + lock_kernel(); + + daemonize("%s_dpc", ha->host_str); + allow_signal(SIGHUP); + + ha->dpc_wait = &sem; + + set_user_nice(current, -20); + + unlock_kernel(); + + complete(&ha->dpc_inited); + + while (1) { + DEBUG3(printk("qla2x00: DPC handler sleeping\n")); + + if (down_interruptible(&sem)) + break; + + if (ha->dpc_should_die) + break; + + if (!list_empty(&ha->done_queue)) + qla2x00_done(ha); + + DEBUG3(printk("qla2x00: DPC handler waking up\n")); + + /* Initialization not yet finished. Don't do anything yet. */ + if (!ha->init_done || ha->dpc_active) + continue; + + DEBUG3(printk("scsi(%ld): DPC handler\n", ha->host_no)); + + /* spin_lock_irqsave(&io_request_lock, ha->cpu_flags);*/ + ha->dpc_active = 1; + + /* Determine what action is necessary */ + + /* Process commands in retry queue */ + if (test_and_clear_bit(PORT_RESTART_NEEDED, &ha->dpc_flags)) { + DEBUG(printk("scsi(%ld): DPC checking retry_q. " + "total=%d\n", + ha->host_no, ha->retry_q_cnt)); + + spin_lock_irqsave(&ha->list_lock, flags); + dead_cnt = online_cnt = 0; + list_for_each_safe(list, templist, &ha->retry_queue) { + sp = list_entry(list, srb_t, list); + q = sp->lun_queue; + DEBUG3(printk("scsi(%ld): pid=%ld sp=%p, " + "spflags=0x%x, q_flag= 0x%lx\n", + ha->host_no, sp->cmd->serial_number, sp, + sp->flags, q->q_flag)); + + if (q == NULL) + continue; + fcport = q->fclun->fcport; + + if (atomic_read(&fcport->state) == + FCS_DEVICE_DEAD || + (ha->loop_state == LOOP_DEAD)) { + + __del_from_retry_queue(ha, sp); + sp->cmd->result = DID_NO_CONNECT << 16; + sp->cmd->host_scribble = + (unsigned char *) NULL; + __add_to_done_queue(ha, sp); + dead_cnt++; + } else if (atomic_read(&fcport->state) != + FCS_DEVICE_LOST) { + + __del_from_retry_queue(ha, sp); + sp->cmd->result = DID_BUS_BUSY << 16; + sp->cmd->host_scribble = + (unsigned char *) NULL; + __add_to_done_queue(ha, sp); + online_cnt++; + } + } /* list_for_each_safe() */ + spin_unlock_irqrestore(&ha->list_lock, flags); + + DEBUG(printk("scsi(%ld): done processing retry queue " + "- dead=%d, online=%d\n ", + ha->host_no, dead_cnt, online_cnt)); + } + + /* Process commands in scsi retry queue */ + if (test_and_clear_bit(SCSI_RESTART_NEEDED, &ha->dpc_flags)) { + /* + * Any requests we want to delay for some period is put + * in the scsi retry queue with a delay added. The + * timer will schedule a "scsi_restart_needed" every + * second as long as there are requests in the scsi + * queue. + */ + DEBUG(printk("scsi(%ld): DPC checking scsi " + "retry_q.total=%d\n", + ha->host_no, ha->scsi_retry_q_cnt)); + + online_cnt = 0; + spin_lock_irqsave(&ha->list_lock, flags); + list_for_each_safe(list, templist, + &ha->scsi_retry_queue) { + + sp = list_entry(list, srb_t, list); + q = sp->lun_queue; + + DEBUG3(printk("scsi(%ld): scsi_retry_q: " + "pid=%ld sp=%p, spflags=0x%x, " + "q_flag= 0x%lx,q_state=%d\n", + ha->host_no, sp->cmd->serial_number, + sp, sp->flags, q->q_flag, q->q_state)); + + /* Was this lun suspended */ + if (q->q_state != LUN_STATE_WAIT) { + online_cnt++; + __del_from_scsi_retry_queue(ha, sp); + __add_to_retry_queue(ha,sp); + } + + /* Was this command suspended for N secs */ + if (sp->delay != 0) { + sp->delay--; + if (sp->delay == 0) { + online_cnt++; + __del_from_scsi_retry_queue( + ha, sp); + __add_to_retry_queue(ha,sp); + } + } + } + spin_unlock_irqrestore(&ha->list_lock, flags); + + DEBUG(if (online_cnt > 0)) + DEBUG(printk("scsi(%ld): dpc() found scsi reqs to " + "restart= %d\n", + ha->host_no, online_cnt)); + } + + if (ha->flags.mbox_busy) { + if (!list_empty(&ha->done_queue)) + qla2x00_done(ha); + + ha->dpc_active = 0; + continue; + } + + if (test_and_clear_bit(ISP_ABORT_NEEDED, &ha->dpc_flags)) { + + DEBUG(printk("scsi(%ld): dpc: sched " + "qla2x00_abort_isp ha = %p\n", + ha->host_no, ha)); + if (!(test_and_set_bit(ABORT_ISP_ACTIVE, + &ha->dpc_flags))) { + + if (qla2x00_abort_isp(ha)) { + /* failed. retry later */ + set_bit(ISP_ABORT_NEEDED, + &ha->dpc_flags); + } + clear_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags); + } + DEBUG(printk("scsi(%ld): dpc: qla2x00_abort_isp end\n", + ha->host_no)); + } + + if (test_and_clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags) && + (!(test_and_set_bit(RESET_ACTIVE, &ha->dpc_flags)))) { + + DEBUG(printk("scsi(%ld): qla2x00_reset_marker()\n", + ha->host_no)); + + qla2x00_rst_aen(ha); + clear_bit(RESET_ACTIVE, &ha->dpc_flags); + } + + /* Retry each device up to login retry count */ + if ((test_and_clear_bit(RELOGIN_NEEDED, &ha->dpc_flags)) && + !test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) && + ha->loop_state != LOOP_DOWN) { + + DEBUG(printk("scsi(%ld): qla2x00_port_login()\n", + ha->host_no)); + + next_loopid = 0; + list_for_each(fcpl, &ha->fcports) { + fcport = list_entry(fcpl, fc_port_t, list); + + /* + * If the port is not ONLINE then try to login + * to it if we haven't run out of retries. + */ + if (atomic_read(&fcport->state) != FCS_ONLINE && + fcport->login_retry) { + + fcport->login_retry--; + if (fcport->flags & FCF_FABRIC_DEVICE) + status = qla2x00_fabric_login( + ha, fcport, &next_loopid); + else + status = + qla2x00_local_device_login( + ha, fcport->loop_id); + + if (status == QLA_SUCCESS) { + fcport->old_loop_id = fcport->loop_id; + + DEBUG(printk("scsi(%ld): port login OK: logged in ID 0x%x\n", + ha->host_no, fcport->loop_id)); + + fcport->port_login_retry_count = + ha->port_down_retry_count * PORT_RETRY_TIME; + atomic_set(&fcport->state, FCS_ONLINE); + atomic_set(&fcport->port_down_timer, + ha->port_down_retry_count * PORT_RETRY_TIME); + + fcport->login_retry = 0; + } else if (status == 1) { + set_bit(RELOGIN_NEEDED, &ha->dpc_flags); + /* retry the login again */ + DEBUG(printk("scsi(%ld): Retrying %d login again loop_id 0x%x\n", + ha->host_no, + fcport->login_retry, fcport->loop_id)); + } else { + fcport->login_retry = 0; + } + } + if (test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)) + break; + } + DEBUG(printk("scsi(%ld): qla2x00_port_login - end\n", + ha->host_no)); + } + + if ((test_bit(LOGIN_RETRY_NEEDED, &ha->dpc_flags)) && + ha->loop_state != LOOP_DOWN ) { + + clear_bit(LOGIN_RETRY_NEEDED, &ha->dpc_flags); + DEBUG(printk("scsi(%ld): qla2x00_login_retry()\n", + ha->host_no)); + + set_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags); + + DEBUG(printk("scsi(%ld): qla2x00_login_retry - end\n", + ha->host_no)); + } + + if (test_and_clear_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags)) { + + DEBUG(printk("scsi(%ld): qla2x00_loop_resync()\n", + ha->host_no)); + + if (!(test_and_set_bit(LOOP_RESYNC_ACTIVE, + &ha->dpc_flags))) { + + qla2x00_loop_resync(ha); + + clear_bit(LOOP_RESYNC_ACTIVE, &ha->dpc_flags); + } + + DEBUG(printk("scsi(%ld): qla2x00_loop_resync - end\n", + ha->host_no)); + } + + if (ha->flags.failover_enabled) { + /* + * If we are not processing a ioctl or one of + * the ports are still MISSING or need a resync + * then process the failover event. + */ + if (!test_bit(CFG_ACTIVE, &ha->cfg_flags)) { + if (qla2x00_check_for_devices_online(ha)) { + if (test_and_clear_bit(FAILOVER_EVENT, &ha->dpc_flags)) { + + DEBUG(printk("scsi(%ld): qla2x00_cfg_event_notify()\n", + ha->host_no)); + + if (ha->flags.online) { + qla2x00_cfg_event_notify(ha, ha->failover_type); + } + + DEBUG(printk("scsi(%ld): qla2x00_cfg_event_notify - end\n", + ha->host_no)); + } + } + + if (test_and_clear_bit(FAILOVER_NEEDED, &ha->dpc_flags)) { + /* + * Get any requests from failover queue + */ + DEBUG(printk("scsi(%ld): qla2x00_process_failover()\n", + ha->host_no)); + + qla2x00_process_failover(ha); + + DEBUG(printk("scsi(%ld): qla2x00_process_failover - end\n", + ha->host_no)); + } + } + } + + if (test_bit(RESTART_QUEUES_NEEDED, &ha->dpc_flags)) { + DEBUG(printk("scsi(%ld): qla2x00_restart_queues()\n", + ha->host_no)); + + qla2x00_restart_queues(ha,FALSE); + + DEBUG(printk("scsi(%ld): qla2x00_restart_queues - end\n", + ha->host_no)); + } + + if (test_bit(ABORT_QUEUES_NEEDED, &ha->dpc_flags)) { + + DEBUG(printk("scsi(%ld): qla2x00_abort_queues()\n", + ha->host_no)); + + qla2x00_abort_queues(ha, FALSE); + + DEBUG(printk("scsi(%ld): qla2x00_abort_queues - end\n", + ha->host_no)); + } + + if (test_and_clear_bit(FCPORT_RESCAN_NEEDED, &ha->dpc_flags)) { + + DEBUG(printk("scsi(%ld): Rescan flagged fcports...\n", + ha->host_no)); + + qla2x00_rescan_fcports(ha); + + DEBUG(printk("scsi(%ld): Rescan flagged fcports..." + "end.\n", + ha->host_no)); + } + + + if (!ha->interrupts_on) + qla2x00_enable_intrs(ha); + + if (!list_empty(&ha->done_queue)) + qla2x00_done(ha); + + ha->dpc_active = 0; + } /* End of while(1) */ + + DEBUG(printk("scsi(%ld): DPC handler exiting\n", ha->host_no)); + + /* + * Make sure that nobody tries to wake us up again. + */ + ha->dpc_wait = NULL; + ha->dpc_active = 0; + + complete_and_exit(&ha->dpc_exited, 0); +} + +/* + * qla2x00_abort_queues + * Abort all commands on queues on device + * + * Input: + * ha = adapter block pointer. + * + * Context: + * Interrupt context. + */ +void +qla2x00_abort_queues(scsi_qla_host_t *ha, uint8_t doneqflg) +{ + + srb_t *sp; + struct list_head *list, *temp; + unsigned long flags; + + ENTER(__func__); + + clear_bit(ABORT_QUEUES_NEEDED, &ha->dpc_flags); + + /* Return all commands device queues. */ + spin_lock_irqsave(&ha->list_lock,flags); + list_for_each_safe(list, temp, &ha->pending_queue) { + sp = list_entry(list, srb_t, list); + + if (sp->flags & SRB_ABORTED) + continue; + + /* Remove srb from LUN queue. */ + __del_from_pending_queue(ha, sp); + + /* Set ending status. */ + sp->cmd->result = DID_BUS_BUSY << 16; + + __add_to_done_queue(ha, sp); + } + spin_unlock_irqrestore(&ha->list_lock, flags); + + LEAVE(__func__); +} + +/* + * qla2x00_check_for_devices_online + * + * Check fcport state of all devices to make sure online. + * + * Input: + * ha = adapter block pointer. + * + * Return: + * None. + * + * Context: + */ +static uint8_t +qla2x00_check_for_devices_online(scsi_qla_host_t *ha) +{ + struct list_head *fcpl; + fc_port_t *fcport; + int found, cnt; + + found = 0; + cnt = 0; + + list_for_each(fcpl, &ha->fcports) { + fcport = list_entry(fcpl, fc_port_t, list); + + if ((atomic_read(&fcport->state) == FCS_ONLINE) || + (atomic_read(&fcport->state) == FCS_DEVICE_DEAD)) + found++; + + cnt++; + } + if (cnt == found) { + DEBUG5(printk("%s(%ld): all online\n", + __func__, + ha->host_no);) + return 1; + } else + return 0; +} + +/* +* qla2x00_rst_aen +* Processes asynchronous reset. +* +* Input: +* ha = adapter block pointer. +*/ +static void +qla2x00_rst_aen(scsi_qla_host_t *ha) +{ + ENTER(__func__); + + if (ha->flags.online && !ha->flags.reset_active && + !atomic_read(&ha->loop_down_timer) && + !(test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags))) { + + /* 10/15 ha->flags.reset_active = TRUE; */ + do { + clear_bit(RESET_MARKER_NEEDED, &ha->dpc_flags); + + /* + * Issue marker command only when we are going to start + * the I/O. + */ + ha->marker_needed = 1; + } while (!atomic_read(&ha->loop_down_timer) && + (test_bit(RESET_MARKER_NEEDED, &ha->dpc_flags))); + + /* 10/15 ha->flags.reset_active = FALSE; */ + } + + LEAVE(__func__); +} + + +/* + * This routine will alloacte SP from the free queue + * input: + * scsi_qla_host_t * + * output: + * srb_t * or NULL + */ +srb_t * +qla2x00_get_new_sp(scsi_qla_host_t *ha) +{ + srb_t *sp = NULL; + unsigned long flags; + + spin_lock_irqsave(&ha->list_lock, flags); + sp = kmem_cache_alloc(ha->srb_cachep, GFP_ATOMIC); + spin_unlock_irqrestore(&ha->list_lock, flags); + if (sp) { + atomic_set(&sp->ref_count, 1); + } + return (sp); +} + +#if defined(ISP2300) +/************************************************************************** + * qla2x00_blink_led + * + * Description: + * This function sets the colour of the LED while preserving the + * unsued GPIO pins every sec. + * + * Input: + * ha - Host adapter structure + * + * Return: + * None + * + * Context: qla2x00_timer() Interrupt + ***************************************************************************/ +void +qla2x00_blink_led(scsi_qla_host_t *ha) +{ + uint16_t gpio_enable, gpio_data, led_color; + unsigned long cpu_flags = 0; + device_reg_t *reg = ha->iobase; + + ENTER(__func__); + + /* Save the Original GPIOE */ + spin_lock_irqsave(&ha->hardware_lock, cpu_flags); + gpio_enable = RD_REG_WORD(®->gpioe); + gpio_data = RD_REG_WORD(®->gpiod); + spin_unlock_irqrestore(&ha->hardware_lock, cpu_flags); + + DEBUG2(printk("%s Original data of gpio_enable_reg=0x%x" + " gpio_data_reg=0x%x\n", + __func__,gpio_enable,gpio_data)); + + if (ha->beacon_green_on){ + led_color = GPIO_LED_GREEN_ON_AMBER_OFF; + ha->beacon_green_on = 0; + } else { + led_color = GPIO_LED_GREEN_OFF_AMBER_OFF; + ha->beacon_green_on = 1; + } + + /* Set the modified gpio_enable values */ + gpio_enable |= GPIO_LED_GREEN_ON_AMBER_OFF; + + DEBUG2(printk("%s Before writing enable : gpio_enable_reg=0x%x" + " gpio_data_reg=0x%x led_color=0x%x\n", + __func__, gpio_enable, gpio_data, led_color)); + + spin_lock_irqsave(&ha->hardware_lock, cpu_flags); + WRT_REG_WORD(®->gpioe,gpio_enable); + spin_unlock_irqrestore(&ha->hardware_lock, cpu_flags); + + /* Clear out the previously set LED colour */ + gpio_data &= ~GPIO_LED_GREEN_ON_AMBER_OFF; + + /* Set the new input LED colour to GPIOD */ + gpio_data |= led_color; + + DEBUG2(printk("%s Before writing data: gpio_enable_reg=0x%x" + " gpio_data_reg=0x%x led_color=0x%x\n", + __func__,gpio_enable,gpio_data,led_color)); + + /* Set the modified gpio_data values */ + spin_lock_irqsave(&ha->hardware_lock, cpu_flags); + WRT_REG_WORD(®->gpiod,gpio_data); + spin_unlock_irqrestore(&ha->hardware_lock, cpu_flags); + + LEAVE(__func__); +} +#endif + +/************************************************************************** +* qla2x00_timer +* +* Description: +* One second timer +* +* Context: Interrupt +***************************************************************************/ +static void +qla2x00_timer(scsi_qla_host_t *ha) +{ + int t,l; + unsigned long cpu_flags = 0; + struct list_head *fcpl; + fc_port_t *fcport; + os_lun_t *lq; + os_tgt_t *tq; + int start_dpc = 0; + + /* + * We try and restart any request in the retry queue every second. + */ + if (!list_empty(&ha->retry_queue)) { + set_bit(PORT_RESTART_NEEDED, &ha->dpc_flags); + start_dpc++; + } + + /* + * We try and restart any request in the scsi_retry queue every second. + */ + if (!list_empty(&ha->scsi_retry_queue)) { + set_bit(SCSI_RESTART_NEEDED, &ha->dpc_flags); + start_dpc++; + } + +#if defined(ISP2300) + /* Check if beacon LED needs to be blinked */ + if (ha->beacon_blink_led) + qla2x00_blink_led(ha); +#endif + + /* + * We try and failover any request in the failover queue every second. + */ + if (!list_empty(&ha->failover_queue)) { + set_bit(FAILOVER_NEEDED, &ha->dpc_flags); + start_dpc++; + } + + /* + * Ports - Port down timer. + * + * Whenever, a port is in the LOST state we start decrementing its port + * down timer every second until it reaches zero. Once it reaches zero + * the port it marked DEAD. + */ + t = 0; + list_for_each(fcpl, &ha->fcports) { + fcport = list_entry(fcpl, fc_port_t, list); + + if (atomic_read(&fcport->state) == FCS_DEVICE_LOST) { + + if (atomic_read(&fcport->port_down_timer) == 0) + continue; + + if (atomic_dec_and_test(&fcport->port_down_timer) != 0) + atomic_set(&fcport->state, FCS_DEVICE_DEAD); + + DEBUG(printk("scsi(%ld): fcport-%d - port retry count: " + "%d remainning\n", + ha->host_no, + t, atomic_read(&fcport->port_down_timer))); + } + t++; + } /* End of for fcport */ + + /* + * LUNS - lun suspend timer. + * + * Whenever, a lun is suspended the timer starts decrementing its + * suspend timer every second until it reaches zero. Once it reaches + * zero the lun retry count is decremented. + */ + + /* + * FIXME(dg) - Need to convert this linear search of luns into a search + * of a list of suspended luns. + */ + for (t = 0; t < ha->max_targets; t++) { + if ((tq = ha->otgt[t]) == NULL) + continue; + + for (l = 0; l < ha->max_luns; l++) { + if ((lq = (os_lun_t *) tq->olun[l]) == NULL) + continue; + + spin_lock_irqsave(&lq->q_lock, cpu_flags); + if (lq->q_state == LUN_STATE_WAIT && + atomic_read(&lq->q_timer) != 0) { + + if (atomic_dec_and_test(&lq->q_timer) != 0) { + /* + * A delay should immediately + * transition to a READY state + */ + if (test_and_clear_bit(LUN_EXEC_DELAYED, + &lq->q_flag)) { + lq->q_state = LUN_STATE_READY; + } + else { + lq->q_count++; + if (lq->q_count == lq->q_max) + lq->q_state = + LUN_STATE_TIMEOUT; + else + lq->q_state = + LUN_STATE_RUN; + } + } + DEBUG3(printk("scsi(%ld): lun%d - timer %d, " + "count=%d, max=%d, state=%d\n", + ha->host_no, + l, + atomic_read(&lq->q_timer), + lq->q_count, lq->q_max, lq->q_state)); + } + spin_unlock_irqrestore(&lq->q_lock, cpu_flags); + } /* End of for luns */ + } /* End of for targets */ + + /* Loop down handler. */ + if (atomic_read(&ha->loop_down_timer) > 0 && + !(test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags)) && ha->flags.online) { + + /* dg 10/30 if (atomic_read(&ha->loop_down_timer) == LOOP_DOWN_TIME) { */ + if (atomic_read(&ha->loop_down_timer) == + ha->loop_down_abort_time) { + + DEBUG(printk("scsi(%ld): Loop Down - aborting the " + "queues before time expire\n", + ha->host_no)); + +#if !defined(ISP2100) + if (ha->link_down_timeout) + ha->loop_state = LOOP_DEAD; +#endif + + set_bit(ABORT_QUEUES_NEEDED, &ha->dpc_flags); + start_dpc++; + } + + /* if the loop has been down for 4 minutes, reinit adapter */ + if (atomic_dec_and_test(&ha->loop_down_timer) != 0) { + DEBUG(printk("scsi(%ld): Loop down exceed 4 mins - " + "restarting queues.\n", + ha->host_no)); + + set_bit(RESTART_QUEUES_NEEDED, &ha->dpc_flags); + start_dpc++; + if (!(ha->device_flags & DFLG_NO_CABLE) && + qla2x00_reinit && !ha->flags.failover_enabled) { + + DEBUG(printk("scsi(%ld): Loop down - " + "aborting ISP.\n", + ha->host_no)); + + set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + } + } + DEBUG3(printk("scsi(%ld): Loop Down - seconds remainning %d\n", + ha->host_no, + atomic_read(&ha->loop_down_timer))); + } + + /* + * Done Q Handler -- dgFIXME This handler will kick off doneq if we + * haven't process it in 2 seconds. + */ + if (!list_empty(&ha->done_queue)) + qla2x00_done(ha); + +#if QLA2100_LIPTEST + /* + * This block is used to periodically schedule isp abort after + * qla2x00_lip flag is set. + */ + + /* + if (qla2x00_lip && (ha->forceLip++) == (60*2)) { + printk("timer: schedule isp abort.\n"); + set_bit(ISP_ABORT_NEEDED, &ha->dpc_flags); + ha->forceLip = 0; + } + */ + + /* + * This block is used to periodically schedule mailbox cmd timeout + * simulation + */ + if (qla2x00_lip && (ha->forceLip++) == (60*6)) { + qla_printk(KERN_INFO, ha, + "qla2x00_timer: Going to force mbx timeout\n"); + + ha->forceLip = 0; + mbxtimeout = 1; + } +#endif + + if (test_bit(FAILOVER_EVENT_NEEDED, &ha->dpc_flags)) { + if (ha->failback_delay) { + ha->failback_delay--; + if (ha->failback_delay == 0) { + set_bit(FAILOVER_EVENT, &ha->dpc_flags); + clear_bit(FAILOVER_EVENT_NEEDED, + &ha->dpc_flags); + } + } else { + set_bit(FAILOVER_EVENT, &ha->dpc_flags); + clear_bit(FAILOVER_EVENT_NEEDED, &ha->dpc_flags); + } + } + + /* Schedule the DPC routine if needed */ + if ((test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || + test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || + start_dpc || + test_bit(LOGIN_RETRY_NEEDED, &ha->dpc_flags) || + test_bit(RELOGIN_NEEDED, &ha->dpc_flags) || + test_bit(FAILOVER_EVENT, &ha->dpc_flags) || + test_bit(FAILOVER_NEEDED, &ha->dpc_flags)) && + ha->dpc_wait && !ha->dpc_active) { + + up(ha->dpc_wait); + } + + qla2x00_restart_timer(ha, WATCH_INTERVAL); +} + +/* + * qla2x00_extend_timeout + * This routine will extend the timeout to the specified value. + * + * Input: + * cmd = SCSI command structure + * + * Returns: + * None. + */ +void +qla2x00_extend_timeout(struct scsi_cmnd *cmd, int timeout) +{ + srb_t *sp = (srb_t *) CMD_SP(cmd); + u_long our_jiffies = (timeout * HZ) + jiffies; + + sp->ext_history= 0; + sp->e_start = jiffies; + if (cmd->eh_timeout.function) { + mod_timer(&cmd->eh_timeout,our_jiffies); + sp->ext_history |= 1; + } + if (sp->timer.function != NULL) { + /* + * Our internal timer should timeout before the midlayer has a + * chance begin the abort process + */ + mod_timer(&sp->timer,our_jiffies - (QLA_CMD_TIMER_DELTA * HZ)); + + sp->ext_history |= 2; + } +} + +/************************************************************************** +* qla2x00_cmd_timeout +* +* Description: +* Handles the command if it times out in any state. +* +* Input: +* sp - pointer to validate +* +* Returns: +* None. +* Note:Need to add the support for if( sp->state == SRB_FAILOVER_STATE). +**************************************************************************/ +static void +qla2x00_cmd_timeout(srb_t *sp) +{ + int t, l; + int processed; + scsi_qla_host_t *vis_ha, *dest_ha; + struct scsi_cmnd *cmd; + ulong flags; +#if defined(QL_DEBUG_LEVEL_3) + ulong cpu_flags; +#endif + fc_port_t *fcport; + + cmd = sp->cmd; + vis_ha = (scsi_qla_host_t *)cmd->device->host->hostdata; + + DEBUG3(printk("cmd_timeout: Entering sp->state = %x\n", sp->state)); + + t = cmd->device->id; + l = cmd->device->lun; + fcport = sp->fclun->fcport; + dest_ha = sp->ha; + + /* + * If IO is found either in retry Queue + * OR in Lun Queue + * Return this IO back to host + */ + spin_lock_irqsave(&vis_ha->list_lock, flags); + processed = 0; + if (sp->state == SRB_PENDING_STATE) { + __del_from_pending_queue(vis_ha, sp); + DEBUG2(printk("scsi(%ld): Found in Pending queue pid %ld, " + "State = %x., fcport state=%d jiffies=%lx\n", + vis_ha->host_no, cmd->serial_number, sp->state, + atomic_read(&fcport->state), jiffies)); + + /* + * If FC_DEVICE is marked as dead return the cmd with + * DID_NO_CONNECT status. Otherwise set the host_byte to + * DID_BUS_BUSY to let the OS retry this cmd. + */ + if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD || + (vis_ha->loop_state == LOOP_DEAD)) { + cmd->result = DID_NO_CONNECT << 16; + } else { + cmd->result = DID_BUS_BUSY << 16; + } + __add_to_done_queue(vis_ha, sp); + processed++; + } + spin_unlock_irqrestore(&vis_ha->list_lock, flags); + + if (processed) { + qla2x00_done(vis_ha); + return; + } + + spin_lock_irqsave(&dest_ha->list_lock, flags); + if ((sp->state == SRB_RETRY_STATE) || + (sp->state == SRB_SCSI_RETRY_STATE) || + (sp->state == SRB_FAILOVER_STATE)) { + + DEBUG2(printk("scsi(%ld): Found in (Scsi) Retry queue or " + "failover Q pid %ld, State = %x., fcport state=%d " + "jiffies=%lx retried=%d\n", + dest_ha->host_no, cmd->serial_number, sp->state, + atomic_read(&fcport->state), jiffies, cmd->retries)); + + if ((sp->state == SRB_RETRY_STATE)) { + __del_from_retry_queue(dest_ha, sp); + } else if ((sp->state == SRB_SCSI_RETRY_STATE)) { + __del_from_scsi_retry_queue(dest_ha, sp); + } else if ((sp->state == SRB_FAILOVER_STATE)) { + __del_from_failover_queue(dest_ha, sp); + } + + /* + * If FC_DEVICE is marked as dead return the cmd with + * DID_NO_CONNECT status. Otherwise set the host_byte to + * DID_BUS_BUSY to let the OS retry this cmd. + */ + if (dest_ha->flags.failover_enabled) { + cmd->result = DID_BUS_BUSY << 16; + } else { + if ((atomic_read(&fcport->state) == FCS_DEVICE_DEAD) || + (dest_ha->loop_state == LOOP_DEAD)) { + qla2x00_extend_timeout(cmd, EXTEND_CMD_TIMEOUT); + cmd->result = DID_NO_CONNECT << 16; + } else { + cmd->result = DID_BUS_BUSY << 16; + } + } + + __add_to_done_queue(dest_ha, sp); + processed++; + } + spin_unlock_irqrestore(&dest_ha->list_lock, flags); + + if (processed) { + qla2x00_done(dest_ha); + + return; + } +/* TODO: Remove this code!!! */ +#if defined(QL_DEBUG_LEVEL_3) + spin_lock_irqsave(&dest_ha->list_lock, cpu_flags); + if (sp->state == SRB_DONE_STATE) { + /* IO in done_q -- leave it */ + DEBUG(printk("scsi(%ld): Found in Done queue pid %ld sp=%p.\n", + dest_ha->host_no, cmd->serial_number, sp)); + } else if (sp->state == SRB_SUSPENDED_STATE) { + DEBUG(printk("scsi(%ld): Found SP %p in suspended state " + "- pid %ld:\n", + dest_ha->host_no, sp, cmd->serial_number)); + DEBUG(qla2x00_dump_buffer((uint8_t *)sp, sizeof(srb_t));) + } else if (sp->state == SRB_ACTIVE_STATE) { + /* + * IO is with ISP find the command in our active list. + */ + spin_unlock_irqrestore(&dest_ha->list_lock, cpu_flags); + spin_lock_irqsave(&dest_ha->hardware_lock, flags); + if (sp == + dest_ha->outstanding_cmds[(u_long)sp->cmd->host_scribble]) { + + DEBUG(printk("cmd_timeout: Found in ISP \n");) + + sp->state = SRB_ACTIVE_TIMEOUT_STATE; + spin_unlock_irqrestore(&dest_ha->hardware_lock, flags); + } else { + spin_unlock_irqrestore(&dest_ha->hardware_lock, flags); + printk(KERN_INFO + "qla_cmd_timeout: State indicates it is with " + "ISP, But not in active array\n"); + } + spin_lock_irqsave(&dest_ha->list_lock, cpu_flags); /* 01/03 */ + } else if (sp->state == SRB_ACTIVE_TIMEOUT_STATE) { + DEBUG(printk("qla2100%ld: Found in Active timeout state" + "pid %ld, State = %x., \n", + dest_ha->host_no, + sp->cmd->serial_number, sp->state);) + } else { + /* EMPTY */ + DEBUG2(printk("cmd_timeout%ld: LOST command state = " + "0x%x, sp=%p\n", + vis_ha->host_no, sp->state,sp);) + + qla_printk(KERN_INFO, vis_ha, + "cmd_timeout: LOST command state = 0x%x\n", sp->state); + } + spin_unlock_irqrestore(&dest_ha->list_lock, cpu_flags); +#endif + + DEBUG3(printk("cmd_timeout: Leaving\n");) +} + +/************************************************************************** +* qla2x00_done +* Process completed commands. +* +* Input: +* old_ha = adapter block pointer. +* +**************************************************************************/ +void +qla2x00_done(scsi_qla_host_t *old_ha) +{ + os_lun_t *lq; + struct scsi_cmnd *cmd; + unsigned long flags = 0; + scsi_qla_host_t *ha; + scsi_qla_host_t *vis_ha; + int send_marker_once = 0; + srb_t *sp, *sptemp; + LIST_HEAD(local_sp_list); + + /* + * Get into local queue such that we do not wind up calling done queue + * tasklet for the same IOs from DPC or any other place. + */ + spin_lock_irqsave(&old_ha->list_lock, flags); + list_splice_init(&old_ha->done_queue, &local_sp_list); + spin_unlock_irqrestore(&old_ha->list_lock, flags); + + /* + * All done commands are in the local queue, now do the call back. + */ + list_for_each_entry_safe(sp, sptemp, &local_sp_list, list) { + old_ha->done_q_cnt--; + sp->state = SRB_NO_QUEUE_STATE; + + /* remove command from local list */ + list_del_init(&sp->list); + + cmd = sp->cmd; + if (cmd == NULL) + continue; + + vis_ha = (scsi_qla_host_t *)cmd->device->host->hostdata; + lq = sp->lun_queue; + ha = sp->ha; + + if (sp->flags & SRB_DMA_VALID) { + sp->flags &= ~SRB_DMA_VALID; + + /* Release memory used for this I/O */ + if (cmd->use_sg) { + pci_unmap_sg(ha->pdev, cmd->request_buffer, + cmd->use_sg, scsi_to_pci_dma_dir( + cmd->sc_data_direction)); + } else if (cmd->request_bufflen) { + pci_unmap_page(ha->pdev, sp->dma_handle, + cmd->request_bufflen, scsi_to_pci_dma_dir( + cmd->sc_data_direction)); + } + } + + if (!(sp->flags & SRB_IOCTL) && ha->flags.failover_enabled) { + /* + * This routine checks for DID_NO_CONNECT to decide + * whether to failover to another path or not. We only + * failover on that status. + */ + if (qla2x00_fo_check(ha, sp)) { + if ((sp->state != SRB_FAILOVER_STATE)) { + /* + * Retry the command on this path + * several times before selecting a new + * path. + */ + add_to_pending_queue_head(vis_ha, sp); + qla2x00_next(vis_ha); + } + else { + /* we failover this path */ + qla2x00_extend_timeout(cmd, + EXTEND_CMD_TIMEOUT); + } + continue; + } + + } + + switch (host_byte(cmd->result)) { + case DID_OK: + case DID_ERROR: + break; + + case DID_RESET: + /* + * Set marker needed, so we don't have to + * send multiple markers + */ + if (!send_marker_once) { + ha->marker_needed = 1; + send_marker_once++; + } + + /* + * WORKAROUND + * + * A backdoor device-reset requires different + * error handling. This code differentiates + * between normal error handling and the + * backdoor method. + * + */ + if (ha->host->eh_active != EH_ACTIVE) + cmd->result = DID_BUS_BUSY << 16; + break; + + + case DID_ABORT: + sp->flags &= ~SRB_ABORT_PENDING; + sp->flags |= SRB_ABORTED; + + if (sp->flags & SRB_TIMEOUT) + cmd->result = DID_TIME_OUT << 16; + + break; + + default: + DEBUG2(printk("scsi(%ld:%d:%d) %s: did_error " + "= %d, comp-scsi= 0x%x-0x%x.\n", + vis_ha->host_no, + cmd->device->id, cmd->device->lun, + __func__, + host_byte(cmd->result), + CMD_COMPL_STATUS(cmd), + CMD_SCSI_STATUS(cmd))); + break; + } + + /* + * Call the mid-level driver interrupt handler -- via sp_put() + */ + sp_put(ha, sp); + } /* end of while */ +} + +#if defined(ISP2300) +/* + * qla2x00_process_response_queue_in_zio_mode + * Process response queue completion as fast as possible + * to achieve Zero Interrupt Opertions-ZIO + * + * Input: + * ha = adapter block pointer. + * + * Context: + * Kernel context. + */ +static inline void +qla2x00_process_response_queue_in_zio_mode(scsi_qla_host_t *ha) +{ + unsigned long flags; + + /* Check for unprocessed commands in response queue. */ + if (!ha->flags.process_response_queue) + return; + if (!ha->flags.online) + return; + if (ha->response_ring_ptr->signature == RESPONSE_PROCESSED) + return; + + spin_lock_irqsave(&ha->hardware_lock,flags); + qla2x00_process_response_queue(ha); + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + if (!list_empty(&ha->done_queue)) + qla2x00_done(ha); +} +#endif + +/* + * qla2x00_next + * Retrieve and process next job in the LUN queue. + * + * Input: + * tq = SCSI target queue pointer. + * lq = SCSI LUN queue pointer. + * TGT_LOCK must be already obtained. + * + * Output: + * Releases TGT_LOCK upon exit. + * + * Context: + * Kernel/Interrupt context. + * + * Note: This routine will always try to start I/O from visible HBA. + */ +void +qla2x00_next(scsi_qla_host_t *vis_ha) +{ + int rval; + unsigned long flags; + scsi_qla_host_t *dest_ha; + fc_port_t *fcport; + srb_t *sp, *sptemp; + LIST_HEAD(local_sp_list); + + dest_ha = NULL; + + spin_lock_irqsave(&vis_ha->list_lock, flags); + list_splice_init(&vis_ha->pending_queue, &local_sp_list); + vis_ha->qthreads = 0; + spin_unlock_irqrestore(&vis_ha->list_lock, flags); + + list_for_each_entry_safe(sp, sptemp, &local_sp_list, list) { + list_del_init(&sp->list); + sp->state = SRB_NO_QUEUE_STATE; + + fcport = sp->fclun->fcport; + dest_ha = fcport->ha; + + /* If device is dead then send request back to OS */ + if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD) { + + sp->cmd->result = DID_NO_CONNECT << 16; + + if (!atomic_read(&dest_ha->loop_down_timer) && + dest_ha->loop_state == LOOP_DOWN) { + sp->err_id = 2; + } else { + sp->err_id = 1; + } + DEBUG3(printk("scsi(%ld): loop/port is down - " + "pid=%ld, sp=%p loopid=0x%x queued to dest HBA " + "scsi%ld.\n", + dest_ha->host_no, + sp->cmd->serial_number, sp, + fcport->loop_id, dest_ha->host_no)); + /* + * Initiate a failover - done routine will initiate. + */ + add_to_done_queue(vis_ha, sp); + + continue; + } + + /* + * SCSI Kluge: Whenever, we need to wait for an event such as + * loop down (i.e. loop_down_timer ) or port down (i.e. LUN + * request qeueue is suspended) then we will recycle new + * commands back to the SCSI layer. We do this because this is + * normally a temporary condition and we don't want the + * mid-level scsi.c driver to get upset and start aborting + * commands. The timeout value is extracted from the command + * minus 1-second and put on a retry queue (watchdog). Once the + * command timeout it is returned to the mid-level with a BUSY + * status, so the mid-level will retry it. This process + * continues until the LOOP DOWN time expires or the condition + * goes away. + */ + if (!(sp->flags & SRB_IOCTL) && + (atomic_read(&fcport->state) != FCS_ONLINE || + test_bit(ABORT_ISP_ACTIVE, &dest_ha->dpc_flags) || + (dest_ha->loop_state != LOOP_READY) || + (sp->flags & SRB_FAILOVER))) { + + DEBUG3(printk("scsi(%ld): port=(0x%x) retry_q(%d) " + "loop state = %d, loop counter = 0x%x dpc flags " + "= 0x%lx\n", + dest_ha->host_no, + fcport->loop_id, + atomic_read(&fcport->state), + dest_ha->loop_state, + atomic_read(&dest_ha->loop_down_timer), + dest_ha->dpc_flags)); + + qla2x00_extend_timeout(sp->cmd, EXTEND_CMD_TIMEOUT); + add_to_retry_queue(vis_ha, sp); + + continue; + } + + /* + * If this request's lun is suspended then put the request on + * the scsi_retry queue. + */ + if (!(sp->flags & SRB_IOCTL) && + sp->lun_queue->q_state == LUN_STATE_WAIT) { + DEBUG3(printk("scsi(%ld): lun wait state - pid=%ld, " + "opcode=%d, allowed=%d, retries=%d\n", + dest_ha->host_no, + sp->cmd->serial_number, + sp->cmd->cmnd[0], + sp->cmd->allowed, + sp->cmd->retries)); + + add_to_scsi_retry_queue(vis_ha, sp); + + continue; + } + + sp->lun_queue->io_cnt++; + + rval = qla2x00_start_scsi(sp); + if (rval != QLA_SUCCESS) { + /* Place request back on top of device queue */ + /* add to the top of queue */ + add_to_pending_queue_head(vis_ha, sp); + + sp->lun_queue->io_cnt--; + } + } + +#if defined(ISP2300) + /* Process response_queue if ZIO support is enabled*/ + qla2x00_process_response_queue_in_zio_mode(vis_ha); + + if (dest_ha && dest_ha->flags.failover_enabled) + qla2x00_process_response_queue_in_zio_mode(dest_ha); +#endif +} + +/* + * qla2x00_flush_failover_queue + * Return cmds of a "specific" LUN from the failover queue with + * DID_BUS_BUSY status. + * + * Input: + * ha = adapter block pointer. + * q = lun queue. + * + * Context: + * Interrupt context. + */ +void +qla2x00_flush_failover_q(scsi_qla_host_t *ha, os_lun_t *q) +{ + srb_t *sp; + struct list_head *list, *temp; + unsigned long flags; + + spin_lock_irqsave(&ha->list_lock, flags); + list_for_each_safe(list, temp, &ha->failover_queue) { + sp = list_entry(list, srb_t, list); + /* + * If request originated from the same lun_q then delete it + * from the failover queue + */ + if (q == sp->lun_queue) { + /* Remove srb from failover queue. */ + __del_from_failover_queue(ha, sp); + sp->cmd->result = DID_BUS_BUSY << 16; + sp->cmd->host_scribble = (unsigned char *) NULL; + __add_to_done_queue(ha, sp); + } + } + spin_unlock_irqrestore(&ha->list_lock, flags); +} + + +/* + * qla2x00_reset_lun_fo_counts + * Reset failover retry counts + * + * Input: + * ha = adapter block pointer. + * + * Context: + * Interrupt context. + */ +void +qla2x00_reset_lun_fo_counts(scsi_qla_host_t *ha, os_lun_t *lq) +{ + srb_t *tsp; + os_lun_t *orig_lq; + struct list_head *list; + unsigned long flags ; + + spin_lock_irqsave(&ha->list_lock, flags); + /* + * the pending queue. + */ + list_for_each(list,&ha->pending_queue) { + tsp = list_entry(list, srb_t, list); + orig_lq = tsp->lun_queue; + if (orig_lq == lq) + tsp->fo_retry_cnt = 0; + } + /* + * the retry queue. + */ + list_for_each(list,&ha->retry_queue) { + tsp = list_entry(list, srb_t, list); + orig_lq = tsp->lun_queue; + if (orig_lq == lq) + tsp->fo_retry_cnt = 0; + } + + /* + * the done queue. + */ + list_for_each(list, &ha->done_queue) { + tsp = list_entry(list, srb_t, list); + orig_lq = tsp->lun_queue; + if (orig_lq == lq) + tsp->fo_retry_cnt = 0; + } + spin_unlock_irqrestore(&ha->list_lock, flags); +} + +/* + * qla2x00_failover_cleanup + * Cleanup queues after a failover. + * + * Input: + * sp = command pointer + * + * Context: + * Interrupt context. + */ +static void +qla2x00_failover_cleanup(srb_t *sp) +{ + sp->cmd->result = DID_BUS_BUSY << 16; + sp->cmd->host_scribble = (unsigned char *) NULL; + + /* turn-off all failover flags */ + sp->flags = sp->flags & ~(SRB_RETRY|SRB_FAILOVER|SRB_FO_CANCEL); +} + + +/* + * qla2x00_process_failover + * Process any command on the failover queue. + * + * Input: + * ha = adapter block pointer. + * + * Context: + * Interrupt context. + */ +static void +qla2x00_process_failover(scsi_qla_host_t *ha) +{ + + os_tgt_t *tq; + os_lun_t *lq; + srb_t *sp; + fc_port_t *fcport; + struct list_head *list, *temp; + unsigned long flags; + unsigned int t, l; + scsi_qla_host_t *vis_ha = NULL; + + DEBUG(printk("scsi(%ld): Processing failover for hba.\n", ha->host_no)); + + /* + * Process all the commands in the failover queue. Attempt to failover + * then either complete the command as is or requeue for retry. + */ + + /* Prevent or allow acceptance of new I/O requests. */ + spin_lock_irqsave(&ha->list_lock, flags); + + /* + * Get first entry to find our visible adapter. We could never get + * here if the list is empty + */ + list = ha->failover_queue.next; + sp = list_entry(list, srb_t, list); + vis_ha = (scsi_qla_host_t *) sp->cmd->device->host->hostdata; + list_for_each_safe(list, temp, &ha->failover_queue) { + sp = list_entry(list, srb_t, list); + + tq = sp->tgt_queue; + lq = sp->lun_queue; + fcport = lq->fclun->fcport; + + /* Remove srb from failover queue. */ + __del_from_failover_queue(ha, sp); + + DEBUG2(printk("%s(): pid %ld retrycnt=%d\n", + __func__, sp->cmd->serial_number, sp->cmd->retries)); + + /*** Select an alternate path ***/ + /* + * If the path has already been change by a previous request + * sp->fclun != lq->fclun + */ + if (sp->fclun != lq->fclun || + atomic_read(&fcport->state) != FCS_DEVICE_DEAD) { + + qla2x00_failover_cleanup(sp); + + } else if (qla2x00_cfg_failover(ha, lq->fclun, tq, sp) == + NULL) { + /* + * We ran out of paths, so just post the status which + * is already set in the cmd. + */ + printk(KERN_INFO + "scsi(%ld): Ran out of paths - pid %ld\n", + ha->host_no, sp->cmd->serial_number); + } else { + qla2x00_failover_cleanup(sp); + + } + __add_to_done_queue(ha, sp); + } /* list_for_each_safe */ + spin_unlock_irqrestore(&ha->list_lock, flags); + + for (t = 0; t < vis_ha->max_targets; t++) { + if ((tq = vis_ha->otgt[t]) == NULL) + continue; + for (l = 0; l < vis_ha->max_luns; l++) { + if ((lq = (os_lun_t *) tq->olun[l]) == NULL) + continue; + + if( test_and_clear_bit(LUN_MPIO_BUSY, &lq->q_flag) ) { + /* EMPTY */ + DEBUG(printk("scsi(%ld): remove suspend for " + "lun %d\n", ha->host_no, lq->fclun->lun)); + } + } + } + + //qla2x00_restart_queues(ha,TRUE); + qla2x00_restart_queues(ha, FALSE); + + DEBUG(printk("%s() - done", __func__)); +} + +/************************************************************************** +* qla2x00_check_tgt_status +* +* Description: +* Checks to see if the target or loop is down. +* +* Input: +* cmd - pointer to Scsi cmd structure +* +* Returns: +* 1 - if target is present +* 0 - if target is not present +* +**************************************************************************/ +int +qla2x00_check_tgt_status(scsi_qla_host_t *ha, struct scsi_cmnd *cmd) +{ + os_lun_t *lq; + unsigned int b, t, l; + fc_port_t *fcport; + + /* Generate LU queue on bus, target, LUN */ + b = cmd->device->channel; + t = cmd->device->id; + l = cmd->device->lun; + + if ((lq = GET_LU_Q(ha,t,l)) == NULL) { + return (QLA_FUNCTION_FAILED); + } + + fcport = lq->fclun->fcport; + + if (TGT_Q(ha, t) == NULL || + l >= ha->max_luns || + (atomic_read(&fcport->state) == FCS_DEVICE_DEAD) || + ha->loop_state == LOOP_DEAD || + (!atomic_read(&ha->loop_down_timer) && + ha->loop_state == LOOP_DOWN) || + test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || + test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || + ha->loop_state != LOOP_READY) { + + DEBUG(printk(KERN_INFO + "scsi(%ld:%2d:%2d:%2d): %s connection is down\n", + ha->host_no, + b, t, l, + __func__)); + + cmd->result = DID_NO_CONNECT << 16; + return (QLA_FUNCTION_FAILED); + } + return (QLA_SUCCESS); +} + +/************************************************************************** +* qla2x00_check_port_status +* +* Description: +* Checks to see if the port or loop is down. +* +* Input: +* fcport - pointer to fc_port_t structure. +* +* Returns: +* 1 - if port is present +* 0 - if port is not present +* +**************************************************************************/ +int +qla2x00_check_port_status(scsi_qla_host_t *ha, fc_port_t *fcport) +{ + if (fcport == NULL) { + return (QLA_FUNCTION_FAILED); + } + + if (atomic_read(&fcport->state) == FCS_DEVICE_DEAD || + ha->loop_state == LOOP_DEAD) { + return (QLA_FUNCTION_FAILED); + } + + if ((atomic_read(&fcport->state) != FCS_ONLINE) || + (!atomic_read(&ha->loop_down_timer) && + ha->loop_state == LOOP_DOWN) || + (test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags)) || + test_bit(CFG_ACTIVE, &ha->cfg_flags) || + test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || + ha->loop_state != LOOP_READY) { + + DEBUG(printk(KERN_INFO + "scsi(%ld): Connection is down. fcport=%p.\n", + ha->host_no, fcport)); + + return (QLA_BUSY); + } + + return (QLA_SUCCESS); +} + +/** + * qla2x00_module_init - Module initialization. + **/ +static int __init +qla2x00_module_init(void) +{ + DEBUG2(printk("DEBUG: qla2x00_set_info() starts at address = %p\n", + qla2x00_set_info)); + printk(KERN_INFO + "qla2x00_set_info() starts at address = %p\n", + qla2x00_set_info); + + /* Derive version string */ + strcpy(qla2x00_version_str, QLA2100_VERSION); +#if DEBUG_QLA2100 + strcat(qla2x00_version_str, "-debug"); +#endif + if (ql2xfailover) + strcat(qla2x00_version_str, "-fo"); + + return (pci_module_init(&qla2x00_pci_driver)); +} + + +/** + * qla2x00_module_exit - Module cleanup. + **/ +static void __exit +qla2x00_module_exit(void) +{ + pci_unregister_driver(&qla2x00_pci_driver); +} + +module_init(qla2x00_module_init); +module_exit(qla2x00_module_exit); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_os.h 999-mjb/drivers/scsi/qla2xxx/qla_os.h --- 000-virgin/drivers/scsi/qla2xxx/qla_os.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_os.h 2003-11-25 14:18:48.000000000 -0800 @@ -0,0 +1,123 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * Portions (C) Arjan van de Ven for Red Hat, Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + +#ifndef __QLA_OS_H +#define __QLA_OS_H + +/* + * Driver debug definitions. + */ +/* #define QL_DEBUG_LEVEL_1 */ /* Output register accesses to COM1 */ +/* #define QL_DEBUG_LEVEL_2 */ /* Output error msgs to COM1 */ +/* #define QL_DEBUG_LEVEL_3 */ /* Output function trace msgs to COM1 */ +/* #define QL_DEBUG_LEVEL_4 */ /* Output NVRAM trace msgs to COM1 */ +/* #define QL_DEBUG_LEVEL_5 */ /* Output ring trace msgs to COM1 */ +/* #define QL_DEBUG_LEVEL_6 */ /* Output WATCHDOG timer trace to COM1 */ +/* #define QL_DEBUG_LEVEL_7 */ /* Output RISC load trace msgs to COM1 */ +/* #define QL_DEBUG_LEVEL_8 */ /* Output ring saturation msgs to COM1 */ +/* #define QL_DEBUG_LEVEL_9 */ /* Output IOCTL trace msgs */ +/* #define QL_DEBUG_LEVEL_10 */ /* Output IOCTL error msgs */ +/* #define QL_DEBUG_LEVEL_11 */ /* Output Mbx Cmd trace msgs */ +/* #define QL_DEBUG_LEVEL_12 */ /* Output IP trace msgs */ +/* #define QL_DEBUG_LEVEL_13 */ /* Output fdmi function trace msgs */ +/* #define QL_DEBUG_LEVEL_14 */ /* Output RSCN trace msgs */ +/* + * Local Macro Definitions. + */ +#if defined(QL_DEBUG_LEVEL_1) || defined(QL_DEBUG_LEVEL_2) || \ + defined(QL_DEBUG_LEVEL_3) || defined(QL_DEBUG_LEVEL_4) || \ + defined(QL_DEBUG_LEVEL_5) || defined(QL_DEBUG_LEVEL_6) || \ + defined(QL_DEBUG_LEVEL_7) || defined(QL_DEBUG_LEVEL_8) || \ + defined(QL_DEBUG_LEVEL_9) || defined(QL_DEBUG_LEVEL_10) || \ + defined(QL_DEBUG_LEVEL_11) || defined(QL_DEBUG_LEVEL_12) || \ + defined(QL_DEBUG_LEVEL_13) || defined(QL_DEBUG_LEVEL_14) + #define QL_DEBUG_ROUTINES +#endif + +#include +#ifndef QLA_MODVERSION +#define __NO_VERSION__ +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#define __KERNEL_SYSCALLS__ +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include "scsi.h" +#include "hosts.h" + +#include +#include + +//TODO Fix this!!! +/* +* String arrays +*/ +#define LINESIZE 256 +#define MAXARGS 26 + +/*********************************************************************** +* We use the struct scsi_pointer structure that's included with each +* command SCSI_Cmnd as a scratchpad. +* +* SCp is defined as follows: +* - SCp.ptr -- > pointer to the SRB +* - SCp.this_residual -- > HBA completion status for ioctl code. +* +* Cmnd->host_scribble --> Used to hold the hba actived handle (1..255). +***********************************************************************/ +#define CMD_SP(Cmnd) ((Cmnd)->SCp.ptr) +#define CMD_COMPL_STATUS(Cmnd) ((Cmnd)->SCp.this_residual) +/* Additional fields used by ioctl passthru */ +#define CMD_RESID_LEN(Cmnd) ((Cmnd)->SCp.buffers_residual) +#define CMD_SCSI_STATUS(Cmnd) ((Cmnd)->SCp.Status) +#define CMD_ACTUAL_SNSLEN(Cmnd) ((Cmnd)->SCp.Message) +#define CMD_ENTRY_STATUS(Cmnd) ((Cmnd)->SCp.have_data_in) + +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_rscn.c 999-mjb/drivers/scsi/qla2xxx/qla_rscn.c --- 000-virgin/drivers/scsi/qla2xxx/qla_rscn.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_rscn.c 2003-11-25 14:18:48.000000000 -0800 @@ -0,0 +1,1458 @@ +/* + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + */ +#include "qla_os.h" + +#include "qla_def.h" + +/** + * IO descriptor handle definitions. + * + * Signature form: + * + * |31------28|27-------------------12|11-------0| + * | Type | Rolling Signature | Index | + * |----------|-----------------------|----------| + * + **/ + +#define HDL_TYPE_SCSI 0 +#define HDL_TYPE_ASYNC_IOCB 0x0A + +#define HDL_INDEX_BITS 12 +#define HDL_ITER_BITS 16 +#define HDL_TYPE_BITS 4 + +#define HDL_INDEX_MASK ((1UL << HDL_INDEX_BITS) - 1) +#define HDL_ITER_MASK ((1UL << HDL_ITER_BITS) - 1) +#define HDL_TYPE_MASK ((1UL << HDL_TYPE_BITS) - 1) + +#define HDL_INDEX_SHIFT 0 +#define HDL_ITER_SHIFT (HDL_INDEX_SHIFT + HDL_INDEX_BITS) +#define HDL_TYPE_SHIFT (HDL_ITER_SHIFT + HDL_ITER_BITS) + +/* Local Prototypes. */ +static inline uint32_t qla2x00_to_handle(uint16_t, uint16_t, uint16_t); +static inline uint16_t qla2x00_handle_to_idx(uint32_t); +static inline uint16_t qla2x00_handle_to_iter(uint32_t); +static inline uint16_t qla2x00_handle_to_type(uint32_t); +static inline uint32_t qla2x00_iodesc_to_handle(struct io_descriptor *); +static inline struct io_descriptor *qla2x00_handle_to_iodesc(scsi_qla_host_t *, + uint32_t); + +static inline struct io_descriptor *qla2x00_alloc_iodesc(scsi_qla_host_t *); +static inline void qla2x00_free_iodesc(struct io_descriptor *); +static inline void qla2x00_init_io_descriptors(scsi_qla_host_t *); + +static void qla2x00_iodesc_timeout(unsigned long); +static inline void qla2x00_add_iodesc_timer(struct io_descriptor *); +static inline void qla2x00_remove_iodesc_timer(struct io_descriptor *); + +static inline void qla2x00_update_login_fcport(scsi_qla_host_t *, + struct mbx_entry *, fc_port_t *); + +static int qla2x00_send_abort_iocb(scsi_qla_host_t *, struct io_descriptor *, + uint32_t, int); +static int qla2x00_send_abort_iocb_cb(scsi_qla_host_t *, struct io_descriptor *, + struct mbx_entry *); + +static int qla2x00_send_adisc_iocb(scsi_qla_host_t *, struct io_descriptor *, + int); +static int qla2x00_send_adisc_iocb_cb(scsi_qla_host_t *, struct io_descriptor *, + struct mbx_entry *); + +static int qla2x00_send_logout_iocb(scsi_qla_host_t *, struct io_descriptor *, + int); +static int qla2x00_send_logout_iocb_cb(scsi_qla_host_t *, + struct io_descriptor *, struct mbx_entry *); + +static int qla2x00_send_login_iocb(scsi_qla_host_t *, struct io_descriptor *, + port_id_t *, int); +static int qla2x00_send_login_iocb_cb(scsi_qla_host_t *, struct io_descriptor *, + struct mbx_entry *); + +/** + * Mailbox IOCB callback array. + **/ +int (*iocb_function_cb_list[LAST_IOCB_CB]) + (scsi_qla_host_t *, struct io_descriptor *, struct mbx_entry *) = { + + qla2x00_send_abort_iocb_cb, + qla2x00_send_adisc_iocb_cb, + qla2x00_send_logout_iocb_cb, + qla2x00_send_login_iocb_cb, +}; + + +/** + * Generic IO descriptor handle routines. + **/ + +/** + * qla2x00_to_handle() - Create a descriptor handle. + * @type: descriptor type + * @iter: descriptor rolling signature + * @idx: index to the descriptor array + * + * Returns a composite handle based in the @type, @iter, and @idx. + */ +static inline uint32_t +qla2x00_to_handle(uint16_t type, uint16_t iter, uint16_t idx) +{ + return ((uint32_t)(((uint32_t)type << HDL_TYPE_SHIFT) | + ((uint32_t)iter << HDL_ITER_SHIFT) | + ((uint32_t)idx << HDL_INDEX_SHIFT))); +} + +/** + * qla2x00_handle_to_idx() - Retrive the index for a given handle. + * @handle: descriptor handle + * + * Returns the index specified by the @handle. + */ +static inline uint16_t +qla2x00_handle_to_idx(uint32_t handle) +{ + return ((uint16_t)(((handle) >> HDL_INDEX_SHIFT) & HDL_INDEX_MASK)); +} + +/** + * qla2x00_handle_to_type() - Retrive the descriptor type for a given handle. + * @handle: descriptor handle + * + * Returns the descriptor type specified by the @handle. + */ +static inline uint16_t +qla2x00_handle_to_type(uint32_t handle) +{ + return ((uint16_t)(((handle) >> HDL_TYPE_SHIFT) & HDL_TYPE_MASK)); +} + +/** + * qla2x00_handle_to_iter() - Retrive the rolling signature for a given handle. + * @handle: descriptor handle + * + * Returns the signature specified by the @handle. + */ +static inline uint16_t +qla2x00_handle_to_iter(uint32_t handle) +{ + return ((uint16_t)(((handle) >> HDL_ITER_SHIFT) & HDL_ITER_MASK)); +} + +/** + * qla2x00_iodesc_to_handle() - Convert an IO descriptor to a unique handle. + * @iodesc: io descriptor + * + * Returns a unique handle for @iodesc. + */ +static inline uint32_t +qla2x00_iodesc_to_handle(struct io_descriptor *iodesc) +{ + uint32_t handle; + + handle = qla2x00_to_handle(HDL_TYPE_ASYNC_IOCB, + ++iodesc->ha->iodesc_signature, iodesc->idx); + iodesc->signature = handle; + + return (handle); +} + +/** + * qla2x00_handle_to_iodesc() - Retrieve an IO descriptor given a unique handle. + * @ha: HA context + * @handle: handle to io descriptor + * + * Returns a pointer to the io descriptor, or NULL, if the io descriptor does + * not exist or the io descriptors signature does not @handle. + */ +static inline struct io_descriptor * +qla2x00_handle_to_iodesc(scsi_qla_host_t *ha, uint32_t handle) +{ + uint16_t idx; + struct io_descriptor *iodesc; + + idx = qla2x00_handle_to_idx(handle); + iodesc = &ha->io_descriptors[idx]; + if (iodesc) + if (iodesc->signature != handle) + iodesc = NULL; + + return (iodesc); +} + + +/** + * IO descriptor allocation routines. + **/ + +/** + * qla2x00_alloc_iodesc() - Allocate an IO descriptor from the pool. + * @ha: HA context + * + * Returns a pointer to the allocated io descriptor, or NULL, if none available. + */ +static inline struct io_descriptor * +qla2x00_alloc_iodesc(scsi_qla_host_t *ha) +{ + uint16_t iter; + struct io_descriptor *iodesc; + + iodesc = NULL; + for (iter = 0; iter < MAX_IO_DESCRIPTORS; iter++) { + if (ha->io_descriptors[iter].used) + continue; + + iodesc = &ha->io_descriptors[iter]; + iodesc->used = 1; + iodesc->idx = iter; + init_timer(&iodesc->timer); + iodesc->ha = ha; + iodesc->signature = qla2x00_iodesc_to_handle(iodesc); + break; + } + + return (iodesc); +} + +/** + * qla2x00_free_iodesc() - Free an IO descriptor. + * @iodesc: io descriptor + * + * NOTE: The io descriptors timer *must* be stopped before it can be free'd. + */ +static inline void +qla2x00_free_iodesc(struct io_descriptor *iodesc) +{ + iodesc->used = 0; + iodesc->signature = 0; +} + +/** + * qla2x00_init_io_descriptors() - Initialize the pool of IO descriptors. + * @ha: HA context + */ +static inline void +qla2x00_init_io_descriptors(scsi_qla_host_t *ha) +{ + uint16_t iter; + + for (iter = 0; iter < MAX_IO_DESCRIPTORS; iter++) { + if (!ha->io_descriptors[iter].used) + continue; + + qla2x00_remove_iodesc_timer(&ha->io_descriptors[iter]); + qla2x00_free_iodesc(&ha->io_descriptors[iter]); + } +} + + +/** + * IO descriptor timer routines. + **/ + +/** + * qla2x00_iodesc_timeout() - Timeout IO descriptor handler. + * @data: io descriptor + */ +static void +qla2x00_iodesc_timeout(unsigned long data) +{ + struct io_descriptor *iodesc; + + iodesc = (struct io_descriptor *) data; + + DEBUG14(printk("scsi(%ld): IO descriptor timeout, index=%x " + "signature=%08x, scheduling ISP abort.\n", iodesc->ha->host_no, + iodesc->idx, iodesc->signature)); + + qla2x00_free_iodesc(iodesc); + + set_bit(ISP_ABORT_NEEDED, &iodesc->ha->dpc_flags); +} + +/** + * qla2x00_add_iodesc_timer() - Add and start a timer for an IO descriptor. + * @iodesc: io descriptor + * + * NOTE: + * The firmware shall timeout an outstanding mailbox IOCB in 2 * R_A_TOV (in + * tenths of a second). The driver will wait 2.5 * R_A_TOV before scheduling + * a recovery (big hammer). + */ +static inline void +qla2x00_add_iodesc_timer(struct io_descriptor *iodesc) +{ + unsigned long timeout; + + timeout = ((iodesc->ha->r_a_tov * 2) + (iodesc->ha->r_a_tov / 2)) / 10; + init_timer(&iodesc->timer); + iodesc->timer.data = (unsigned long) iodesc; + iodesc->timer.expires = jiffies + (timeout * HZ); + iodesc->timer.function = + (void (*) (unsigned long)) qla2x00_iodesc_timeout; + add_timer(&iodesc->timer); +} + +/** + * qla2x00_remove_iodesc_timer() - Remove an active timer from an IO descriptor. + * @iodesc: io descriptor + */ +static inline void +qla2x00_remove_iodesc_timer(struct io_descriptor *iodesc) +{ + if (iodesc->timer.function != NULL) { + del_timer_sync(&iodesc->timer); + iodesc->timer.data = (unsigned long) NULL; + iodesc->timer.function = NULL; + } +} + +/** + * IO descriptor support routines. + **/ + +/** + * qla2x00_update_login_fcport() - Update fcport data after login processing. + * @ha: HA context + * @mbxstat: Mailbox command status IOCB + * @fcport: port to update + */ +static inline void +qla2x00_update_login_fcport(scsi_qla_host_t *ha, struct mbx_entry *mbxstat, + fc_port_t *fcport) +{ + if (le16_to_cpu(mbxstat->mb1) & BIT_0) { + fcport->port_type = FCT_INITIATOR; + } else { + fcport->port_type = FCT_TARGET; + if (le16_to_cpu(mbxstat->mb1) & BIT_1) { + fcport->flags |= FCF_TAPE_PRESENT; + } + } + fcport->login_retry = 0; + fcport->port_login_retry_count = ha->port_down_retry_count * + PORT_RETRY_TIME; + atomic_set(&fcport->port_down_timer, ha->port_down_retry_count * + PORT_RETRY_TIME); + fcport->flags |= FCF_FABRIC_DEVICE; + fcport->flags &= ~FCF_FAILOVER_NEEDED; + fcport->iodesc_idx_sent = IODESC_INVALID_INDEX; + atomic_set(&fcport->state, FCS_ONLINE); +} + + +/** + * Mailbox IOCB commands. + **/ + +/** + * qla2x00_get_mbx_iocb_entry() - Retrieve an IOCB from the request queue. + * @ha: HA context + * @handle: handle to io descriptor + * + * Returns a pointer to the reqest entry, or NULL, if none were available. + */ +static inline struct mbx_entry * +qla2x00_get_mbx_iocb_entry(scsi_qla_host_t *ha, uint32_t handle) +{ + uint16_t cnt; + device_reg_t *reg; + struct mbx_entry *mbxentry; + + reg = ha->iobase; + mbxentry = NULL; + + if (ha->req_q_cnt < 3) { + cnt = qla2x00_debounce_register(ISP_REQ_Q_OUT(reg)); + if (ha->req_ring_index < cnt) + ha->req_q_cnt = cnt - ha->req_ring_index; + else + ha->req_q_cnt = REQUEST_ENTRY_CNT - + (ha->req_ring_index - cnt); + } + if (ha->req_q_cnt >= 3) { + mbxentry = (struct mbx_entry *)ha->request_ring_ptr; + + memset(mbxentry, 0, sizeof(struct mbx_entry)); + mbxentry->entry_type = MBX_IOCB_TYPE; + mbxentry->entry_count = 1; + mbxentry->sys_define1 = SOURCE_ASYNC_IOCB; + mbxentry->handle = handle; + } + return (mbxentry); +} + +/** + * qla2x00_send_abort_iocb() - Issue an abort IOCB to the firmware. + * @ha: HA context + * @iodesc: io descriptor + * @handle_to_abort: firmware handle to abort + * @ha_locked: is function called with the hardware lock + * + * Returns QLA_SUCCESS if the IOCB was issued. + */ +static int +qla2x00_send_abort_iocb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, + uint32_t handle_to_abort, int ha_locked) +{ + unsigned long flags = 0; + struct mbx_entry *mbxentry; + + /* Send marker if required. */ + if (qla2x00_issue_marker(ha, ha_locked) != QLA_SUCCESS) + return (QLA_FUNCTION_FAILED); + + if (!ha_locked) + spin_lock_irqsave(&ha->hardware_lock, flags); + + /* Build abort mailbox IOCB. */ + mbxentry = qla2x00_get_mbx_iocb_entry(ha, iodesc->signature); + if (mbxentry == NULL) { + if (!ha_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + return (QLA_FUNCTION_FAILED); + } + mbxentry->mb0 = __constant_cpu_to_le16(MBC_ABORT_COMMAND); + mbxentry->loop_id = mbxentry->mb1 = + cpu_to_le16(iodesc->remote_fcport->loop_id); + mbxentry->mb2 = LSW(handle_to_abort); + mbxentry->mb3 = MSW(handle_to_abort); + + qla2x00_add_iodesc_timer(iodesc); + + /* Issue command to ISP. */ + qla2x00_isp_cmd(ha); + + if (!ha_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + DEBUG14(printk("scsi(%ld): Sending Abort IOCB (%08x) to [%x], aborting " + "%08x.\n", ha->host_no, iodesc->signature, + iodesc->remote_fcport->loop_id, handle_to_abort)); + + return (QLA_SUCCESS); +} + +/** + * qla2x00_send_abort_iocb_cb() - Abort IOCB callback. + * @ha: HA context + * @iodesc: io descriptor + * @mbxstat: mailbox status IOCB + * + * Returns QLA_SUCCESS if @iodesc can be freed by the caller, else, @iodesc + * will be used for a retry. + */ +static int +qla2x00_send_abort_iocb_cb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, + struct mbx_entry *mbxstat) +{ + DEBUG14(printk("scsi(%ld): Abort IOCB -- sent to [%x/%02x%02x%02x], " + "status=%x mb0=%x.\n", ha->host_no, iodesc->remote_fcport->loop_id, + iodesc->d_id.b.domain, iodesc->d_id.b.area, iodesc->d_id.b.al_pa, + le16_to_cpu(mbxstat->status), le16_to_cpu(mbxstat->mb0))); + + return (QLA_SUCCESS); +} + + +/** + * qla2x00_send_adisc_iocb() - Issue a Get Port Database IOCB to the firmware. + * @ha: HA context + * @iodesc: io descriptor + * @ha_locked: is function called with the hardware lock + * + * Returns QLA_SUCCESS if the IOCB was issued. + */ +static int +qla2x00_send_adisc_iocb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, + int ha_locked) +{ + unsigned long flags = 0; + struct mbx_entry *mbxentry; + + /* Send marker if required. */ + if (qla2x00_issue_marker(ha, ha_locked) != QLA_SUCCESS) + return (QLA_FUNCTION_FAILED); + + if (!ha_locked) + spin_lock_irqsave(&ha->hardware_lock, flags); + + /* Build Get Port Database IOCB. */ + mbxentry = qla2x00_get_mbx_iocb_entry(ha, iodesc->signature); + if (mbxentry == NULL) { + if (!ha_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + return (QLA_FUNCTION_FAILED); + } + mbxentry->mb0 = __constant_cpu_to_le16(MBC_GET_PORT_DATABASE); + mbxentry->loop_id = mbxentry->mb1 = + cpu_to_le16(iodesc->remote_fcport->loop_id); + mbxentry->mb2 = cpu_to_le16(MSW(LSD(ha->iodesc_pd_dma))); + mbxentry->mb3 = cpu_to_le16(LSW(LSD(ha->iodesc_pd_dma))); + mbxentry->mb6 = cpu_to_le16(MSW(MSD(ha->iodesc_pd_dma))); + mbxentry->mb7 = cpu_to_le16(LSW(MSD(ha->iodesc_pd_dma))); + mbxentry->mb10 = __constant_cpu_to_le16(BIT_0); + + qla2x00_add_iodesc_timer(iodesc); + + /* Issue command to ISP. */ + qla2x00_isp_cmd(ha); + + if (!ha_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + DEBUG14(printk("scsi(%ld): Sending Adisc IOCB (%08x) to [%x].\n", + ha->host_no, iodesc->signature, iodesc->remote_fcport->loop_id)); + + return (QLA_SUCCESS); +} + +/** + * qla2x00_send_adisc_iocb_cb() - Get Port Database IOCB callback. + * @ha: HA context + * @iodesc: io descriptor + * @mbxstat: mailbox status IOCB + * + * Returns QLA_SUCCESS if @iodesc can be freed by the caller, else, @iodesc + * will be used for a retry. + */ +static int +qla2x00_send_adisc_iocb_cb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, + struct mbx_entry *mbxstat) +{ + fc_port_t *remote_fcport; + + remote_fcport = iodesc->remote_fcport; + + /* Ensure the port IDs are consistent. */ + if (remote_fcport->d_id.b24 != iodesc->d_id.b24) { + DEBUG14(printk("scsi(%ld): Adisc IOCB -- ignoring, remote port " + "id changed from [%02x%02x%02x] to [%02x%02x%02x].\n", + ha->host_no, remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, remote_fcport->d_id.b.al_pa, + iodesc->d_id.b.domain, iodesc->d_id.b.area, + iodesc->d_id.b.al_pa)); + + return (QLA_SUCCESS); + } + + /* Only process the last command. */ + if (remote_fcport->iodesc_idx_sent != iodesc->idx) { + DEBUG14(printk("scsi(%ld): Adisc IOCB -- ignoring, sent to " + "[%02x%02x%02x], expected %x, received %x.\n", ha->host_no, + iodesc->d_id.b.domain, iodesc->d_id.b.area, + iodesc->d_id.b.al_pa, remote_fcport->iodesc_idx_sent, + iodesc->idx)); + + return (QLA_SUCCESS); + } + + if (le16_to_cpu(mbxstat->status) == CS_COMPLETE) { + DEBUG14(printk("scsi(%ld): Adisc IOCB -- marking " + "[%x/%02x%02x%02x] online.\n", ha->host_no, + remote_fcport->loop_id, remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, remote_fcport->d_id.b.al_pa)); + + atomic_set(&remote_fcport->state, FCS_ONLINE); + } else { + DEBUG14(printk("scsi(%ld): Adisc IOCB -- marking " + "[%x/%02x%02x%02x] lost, status=%x mb0=%x.\n", ha->host_no, + remote_fcport->loop_id, remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, remote_fcport->d_id.b.al_pa, + le16_to_cpu(mbxstat->status), le16_to_cpu(mbxstat->mb0))); + + if (atomic_read(&remote_fcport->state) != FCS_DEVICE_DEAD) + atomic_set(&remote_fcport->state, FCS_DEVICE_LOST); + } + remote_fcport->iodesc_idx_sent = IODESC_INVALID_INDEX; + + return (QLA_SUCCESS); +} + + +/** + * qla2x00_send_logout_iocb() - Issue a fabric port logout IOCB to the firmware. + * @ha: HA context + * @iodesc: io descriptor + * @ha_locked: is function called with the hardware lock + * + * Returns QLA_SUCCESS if the IOCB was issued. + */ +static int +qla2x00_send_logout_iocb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, + int ha_locked) +{ + unsigned long flags = 0; + struct mbx_entry *mbxentry; + + /* Send marker if required. */ + if (qla2x00_issue_marker(ha, ha_locked) != QLA_SUCCESS) + return (QLA_FUNCTION_FAILED); + + if (!ha_locked) + spin_lock_irqsave(&ha->hardware_lock, flags); + + /* Build fabric port logout mailbox IOCB. */ + mbxentry = qla2x00_get_mbx_iocb_entry(ha, iodesc->signature); + if (mbxentry == NULL) { + if (!ha_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + return (QLA_FUNCTION_FAILED); + } + mbxentry->mb0 = __constant_cpu_to_le16(MBC_LOGOUT_FABRIC_PORT); + mbxentry->loop_id = mbxentry->mb1 = + cpu_to_le16(iodesc->remote_fcport->loop_id); + + qla2x00_add_iodesc_timer(iodesc); + + /* Issue command to ISP. */ + qla2x00_isp_cmd(ha); + + if (!ha_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + DEBUG14(printk("scsi(%ld): Sending Logout IOCB (%08x) to [%x].\n", + ha->host_no, iodesc->signature, iodesc->remote_fcport->loop_id)); + + return (QLA_SUCCESS); +} + +/** + * qla2x00_send_logout_iocb_cb() - Fabric port logout IOCB callback. + * @ha: HA context + * @iodesc: io descriptor + * @mbxstat: mailbox status IOCB + * + * Returns QLA_SUCCESS if @iodesc can be freed by the caller, else, @iodesc + * will be used for a retry. + */ +static int +qla2x00_send_logout_iocb_cb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, + struct mbx_entry *mbxstat) +{ + DEBUG14(printk("scsi(%ld): Logout IOCB -- sent to [%x/%02x%02x%02x], " + "status=%x mb0=%x mb1=%x.\n", ha->host_no, + iodesc->remote_fcport->loop_id, + iodesc->remote_fcport->d_id.b.domain, + iodesc->remote_fcport->d_id.b.area, + iodesc->remote_fcport->d_id.b.al_pa, le16_to_cpu(mbxstat->status), + le16_to_cpu(mbxstat->mb0), le16_to_cpu(mbxstat->mb1))); + + return (QLA_SUCCESS); +} + + +/** + * qla2x00_send_login_iocb() - Issue a fabric port login IOCB to the firmware. + * @ha: HA context + * @iodesc: io descriptor + * @d_id: port id for device + * @ha_locked: is function called with the hardware lock + * + * Returns QLA_SUCCESS if the IOCB was issued. + */ +static int +qla2x00_send_login_iocb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, + port_id_t *d_id, int ha_locked) +{ + unsigned long flags = 0; + struct mbx_entry *mbxentry; + + /* Send marker if required. */ + if (qla2x00_issue_marker(ha, ha_locked) != QLA_SUCCESS) + return (QLA_FUNCTION_FAILED); + + if (!ha_locked) + spin_lock_irqsave(&ha->hardware_lock, flags); + + /* Build fabric port login mailbox IOCB. */ + mbxentry = qla2x00_get_mbx_iocb_entry(ha, iodesc->signature); + if (mbxentry == NULL) { + if (!ha_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + return (QLA_FUNCTION_FAILED); + } + mbxentry->mb0 = __constant_cpu_to_le16(MBC_LOGIN_FABRIC_PORT); + mbxentry->loop_id = mbxentry->mb1 = + cpu_to_le16(iodesc->remote_fcport->loop_id); + mbxentry->mb2 = cpu_to_le16(d_id->b.domain); + mbxentry->mb3 = cpu_to_le16(d_id->b.area << 8 | d_id->b.al_pa); + mbxentry->mb10 = __constant_cpu_to_le16(BIT_0); + + qla2x00_add_iodesc_timer(iodesc); + + /* Issue command to ISP. */ + qla2x00_isp_cmd(ha); + + if (!ha_locked) + spin_unlock_irqrestore(&ha->hardware_lock, flags); + + DEBUG14(printk("scsi(%ld): Sending Login IOCB (%08x) to " + "[%x/%02x%02x%02x].\n", ha->host_no, iodesc->signature, + iodesc->remote_fcport->loop_id, d_id->b.domain, d_id->b.area, + d_id->b.al_pa)); + + return (QLA_SUCCESS); +} + +/** + * qla2x00_send_login_iocb_cb() - Fabric port logout IOCB callback. + * @ha: HA context + * @iodesc: io descriptor + * @mbxstat: mailbox status IOCB + * + * Returns QLA_SUCCESS if @iodesc can be freed by the caller, else, @iodesc + * will be used for a retry. + */ +static int +qla2x00_send_login_iocb_cb(scsi_qla_host_t *ha, struct io_descriptor *iodesc, + struct mbx_entry *mbxstat) +{ + int rval; + fc_port_t *fcport, *remote_fcport, *exist_fcport; + struct io_descriptor *abort_iodesc, *login_iodesc; + uint16_t status, mb[8]; + uint16_t reuse; + uint16_t remote_loopid; + port_id_t remote_did, inuse_did; + + remote_fcport = iodesc->remote_fcport; + + /* Only process the last command. */ + if (remote_fcport->iodesc_idx_sent != iodesc->idx) { + DEBUG14(printk("scsi(%ld): Login IOCB -- ignoring, sent to " + "[%02x%02x%02x], expected %x, received %x.\n", + ha->host_no, iodesc->d_id.b.domain, iodesc->d_id.b.area, + iodesc->d_id.b.al_pa, remote_fcport->iodesc_idx_sent, + iodesc->idx)); + + /* Free RSCN fcport resources. */ + if (remote_fcport->port_type == FCT_RSCN) { + DEBUG14(printk("scsi(%ld): Login IOCB -- Freeing RSCN " + "fcport %p [%x/%02x%02x%02x] given ignored Login " + "IOCB.\n", ha->host_no, remote_fcport, + remote_fcport->loop_id, + remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, + remote_fcport->d_id.b.al_pa)); + + list_del(&remote_fcport->list); + kfree(remote_fcport); + } + return (QLA_SUCCESS); + } + + status = le16_to_cpu(mbxstat->status); + mb[0] = le16_to_cpu(mbxstat->mb0); + mb[1] = le16_to_cpu(mbxstat->mb1); + mb[2] = le16_to_cpu(mbxstat->mb2); + mb[6] = le16_to_cpu(mbxstat->mb6); + mb[7] = le16_to_cpu(mbxstat->mb7); + + /* Good status? */ + if ((status == CS_COMPLETE || status == CS_COMPLETE_CHKCOND) && + mb[0] == MBS_COMMAND_COMPLETE) { + + DEBUG14(printk("scsi(%ld): Login IOCB -- status=%x mb1=%x pn=" + "%02x%02x%02x%02x%02x%02x%02x%02x.\n", ha->host_no, status, + mb[1], mbxstat->port_name[0], mbxstat->port_name[1], + mbxstat->port_name[2], mbxstat->port_name[3], + mbxstat->port_name[4], mbxstat->port_name[5], + mbxstat->port_name[6], mbxstat->port_name[7])); + + memcpy(remote_fcport->node_name, mbxstat->node_name, WWN_SIZE); + memcpy(remote_fcport->port_name, mbxstat->port_name, WWN_SIZE); + + /* Is the device already in our fcports list? */ + if (remote_fcport->port_type != FCT_RSCN) { + DEBUG14(printk("scsi(%ld): Login IOCB -- marking " + "[%x/%02x%02x%02x] online.\n", ha->host_no, + remote_fcport->loop_id, + remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, + remote_fcport->d_id.b.al_pa)); + + qla2x00_update_login_fcport(ha, mbxstat, remote_fcport); + + return (QLA_SUCCESS); + } + + /* Does the RSCN portname already exist in our fcports list? */ + exist_fcport = NULL; + list_for_each_entry(fcport, &ha->fcports, list) { + if (memcmp(remote_fcport->port_name, fcport->port_name, + WWN_SIZE) == 0) { + exist_fcport = fcport; + break; + } + } + if (exist_fcport != NULL) { + DEBUG14(printk("scsi(%ld): Login IOCB -- found RSCN " + "fcport in fcports list [%p].\n", ha->host_no, + exist_fcport)); + + /* Abort any ADISC that could have been sent. */ + if (exist_fcport->iodesc_idx_sent != iodesc->idx && + exist_fcport->iodesc_idx_sent < + MAX_IO_DESCRIPTORS && + ha->io_descriptors[exist_fcport->iodesc_idx_sent]. + cb_idx == ADISC_PORT_IOCB_CB) { + + abort_iodesc = qla2x00_alloc_iodesc(ha); + if (abort_iodesc) { + DEBUG14(printk("scsi(%ld): Login IOCB " + "-- issuing abort to outstanding " + "Adisc [%x/%02x%02x%02x].\n", + ha->host_no, remote_fcport->loop_id, + exist_fcport->d_id.b.domain, + exist_fcport->d_id.b.area, + exist_fcport->d_id.b.al_pa)); + + abort_iodesc->cb_idx = ABORT_IOCB_CB; + abort_iodesc->d_id.b24 = + exist_fcport->d_id.b24; + abort_iodesc->remote_fcport = + exist_fcport; + exist_fcport->iodesc_idx_sent = + abort_iodesc->idx; + qla2x00_send_abort_iocb(ha, + abort_iodesc, ha->io_descriptors[ + exist_fcport->iodesc_idx_sent]. + signature, 1); + } else { + DEBUG14(printk("scsi(%ld): Login IOCB " + "-- unable to abort outstanding " + "Adisc [%x/%02x%02x%02x].\n", + ha->host_no, remote_fcport->loop_id, + exist_fcport->d_id.b.domain, + exist_fcport->d_id.b.area, + exist_fcport->d_id.b.al_pa)); + } + } + + /* + * If the existing fcport is waiting to send an ADISC + * or LOGIN, then reuse remote fcport (RSCN) to + * continue waiting. + */ + reuse = 0; + remote_loopid = remote_fcport->loop_id; + remote_did.b24 = remote_fcport->d_id.b24; + if (exist_fcport->iodesc_idx_sent == + IODESC_ADISC_NEEDED || + exist_fcport->iodesc_idx_sent == + IODESC_LOGIN_NEEDED) { + DEBUG14(printk("scsi(%ld): Login IOCB -- " + "existing fcport [%x/%02x%02x%02x] " + "waiting for IO descriptor, reuse RSCN " + "fcport.\n", ha->host_no, + exist_fcport->loop_id, + exist_fcport->d_id.b.domain, + exist_fcport->d_id.b.area, + exist_fcport->d_id.b.al_pa)); + + reuse++; + remote_fcport->iodesc_idx_sent = + exist_fcport->iodesc_idx_sent; + exist_fcport->iodesc_idx_sent = + IODESC_INVALID_INDEX; + remote_fcport->loop_id = exist_fcport->loop_id; + remote_fcport->d_id.b24 = + exist_fcport->d_id.b24; + } + + /* Logout the old loopid. */ + if (!reuse && + exist_fcport->loop_id != remote_fcport->loop_id && + exist_fcport->loop_id != FC_NO_LOOP_ID) { + login_iodesc = qla2x00_alloc_iodesc(ha); + if (login_iodesc) { + DEBUG14(printk("scsi(%ld): Login IOCB " + "-- issuing logout to free old " + "loop id [%x/%02x%02x%02x].\n", + ha->host_no, exist_fcport->loop_id, + exist_fcport->d_id.b.domain, + exist_fcport->d_id.b.area, + exist_fcport->d_id.b.al_pa)); + + login_iodesc->cb_idx = + LOGOUT_PORT_IOCB_CB; + login_iodesc->d_id.b24 = + exist_fcport->d_id.b24; + login_iodesc->remote_fcport = + exist_fcport; + exist_fcport->iodesc_idx_sent = + login_iodesc->idx; + qla2x00_send_logout_iocb(ha, + login_iodesc, 1); + } else { + /* Ran out of IO descriptiors. */ + DEBUG14(printk("scsi(%ld): Login IOCB " + "-- unable to logout to free old " + "loop id [%x/%02x%02x%02x].\n", + ha->host_no, exist_fcport->loop_id, + exist_fcport->d_id.b.domain, + exist_fcport->d_id.b.area, + exist_fcport->d_id.b.al_pa)); + + exist_fcport->iodesc_idx_sent = + IODESC_INVALID_INDEX; + } + + } + + /* Update existing fcport with remote fcport info. */ + DEBUG14(printk("scsi(%ld): Login IOCB -- marking " + "existing fcport [%x/%02x%02x%02x] online.\n", + ha->host_no, remote_loopid, remote_did.b.domain, + remote_did.b.area, remote_did.b.al_pa)); + + memcpy(exist_fcport->node_name, + remote_fcport->node_name, WWN_SIZE); + exist_fcport->loop_id = remote_loopid; + exist_fcport->d_id.b24 = remote_did.b24; + qla2x00_update_login_fcport(ha, mbxstat, exist_fcport); + + /* Finally, free the remote (RSCN) fcport. */ + if (!reuse) { + DEBUG14(printk("scsi(%ld): Login IOCB -- " + "Freeing RSCN fcport %p " + "[%x/%02x%02x%02x].\n", ha->host_no, + remote_fcport, remote_fcport->loop_id, + remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, + remote_fcport->d_id.b.al_pa)); + + list_del(&remote_fcport->list); + kfree(remote_fcport); + } + + return (QLA_SUCCESS); + } + + /* + * A new device has been added, move the RSCN fcport to our + * fcports list. + */ + DEBUG14(printk("scsi(%ld): Login IOCB -- adding RSCN fcport " + "[%x/%02x%02x%02x] to fcports list.\n", ha->host_no, + remote_fcport->loop_id, remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, remote_fcport->d_id.b.al_pa)); + + list_del(&remote_fcport->list); + remote_fcport->flags = (FCF_RLC_SUPPORT | FCF_RESCAN_NEEDED); + qla2x00_update_login_fcport(ha, mbxstat, remote_fcport); + list_add_tail(&remote_fcport->list, &ha->fcports); + set_bit(FCPORT_RESCAN_NEEDED, &ha->dpc_flags); + } else { + /* Handle login failure. */ + if (remote_fcport->login_retry != 0) { + if (mb[0] == MBS_LOOP_ID_USED) { + inuse_did.b.domain = LSB(mb[1]); + inuse_did.b.area = MSB(mb[2]); + inuse_did.b.al_pa = LSB(mb[2]); + + DEBUG14(printk("scsi(%ld): Login IOCB -- loop " + "id [%x] used by port id [%02x%02x%02x].\n", + ha->host_no, remote_fcport->loop_id, + inuse_did.b.domain, inuse_did.b.area, + inuse_did.b.al_pa)); + + if (remote_fcport->d_id.b24 == + INVALID_PORT_ID) { + /* + * Invalid port id means we are trying + * to login to a remote port with just + * a loop id without knowing about the + * port id. Copy the port id and try + * again. + */ + remote_fcport->d_id.b24 = inuse_did.b24; + iodesc->d_id.b24 = inuse_did.b24; + } else { + remote_fcport->loop_id++; + rval = qla2x00_find_new_loop_id(ha, + remote_fcport); + if (rval == QLA_FUNCTION_FAILED) { + /* No more loop ids. */ + return (QLA_SUCCESS); + } + } + } else if (mb[0] == MBS_PORT_ID_USED) { + /* + * Device has another loop ID. The firmware + * group recommends the driver perform an + * implicit login with the specified ID. + */ + DEBUG14(printk("scsi(%ld): Login IOCB -- port " + "id [%02x%02x%02x] already assigned to " + "loop id [%x].\n", ha->host_no, + iodesc->d_id.b.domain, iodesc->d_id.b.area, + iodesc->d_id.b.al_pa, mb[1])); + + remote_fcport->loop_id = mb[1]; + + } else { + /* Unable to perform login, try again. */ + DEBUG14(printk("scsi(%ld): Login IOCB -- " + "failed login [%x/%02x%02x%02x], status=%x " + "mb0=%x mb1=%x mb2=%x mb6=%x mb7=%x.\n", + ha->host_no, remote_fcport->loop_id, + iodesc->d_id.b.domain, iodesc->d_id.b.area, + iodesc->d_id.b.al_pa, status, mb[0], mb[1], + mb[2], mb[6], mb[7])); + } + + /* Reissue Login with the same IO descriptor. */ + iodesc->signature = + qla2x00_iodesc_to_handle(iodesc); + iodesc->cb_idx = LOGIN_PORT_IOCB_CB; + iodesc->d_id.b24 = remote_fcport->d_id.b24; + remote_fcport->iodesc_idx_sent = iodesc->idx; + remote_fcport->login_retry--; + + DEBUG14(printk("scsi(%ld): Login IOCB -- retrying " + "login to [%x/%02x%02x%02x] (%d).\n", ha->host_no, + remote_fcport->loop_id, + remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, + remote_fcport->d_id.b.al_pa, + remote_fcport->login_retry)); + + qla2x00_send_login_iocb(ha, iodesc, + &remote_fcport->d_id, 1); + + return (QLA_FUNCTION_FAILED); + } else { + /* No more logins, mark device dead. */ + DEBUG14(printk("scsi(%ld): Login IOCB -- failed " + "login [%x/%02x%02x%02x] after retries, status=%x " + "mb0=%x mb1=%x mb2=%x mb6=%x mb7=%x.\n", + ha->host_no, remote_fcport->loop_id, + iodesc->d_id.b.domain, iodesc->d_id.b.area, + iodesc->d_id.b.al_pa, status, mb[0], mb[1], + mb[2], mb[6], mb[7])); + + atomic_set(&remote_fcport->state, FCS_DEVICE_DEAD); + if (remote_fcport->port_type == FCT_RSCN) { + DEBUG14(printk("scsi(%ld): Login IOCB -- " + "Freeing dead RSCN fcport %p " + "[%x/%02x%02x%02x].\n", ha->host_no, + remote_fcport, remote_fcport->loop_id, + remote_fcport->d_id.b.domain, + remote_fcport->d_id.b.area, + remote_fcport->d_id.b.al_pa)); + + list_del(&remote_fcport->list); + kfree(remote_fcport); + } + } + } + + return (QLA_SUCCESS); +} + + +/** + * IO descriptor processing routines. + **/ + +/** + * qla2x00_alloc_rscn_fcport() - Allocate an RSCN type fcport. + * @ha: HA context + * @flags: allocation flags + * + * Returns a pointer to the allocated RSCN fcport, or NULL, if none available. + */ +fc_port_t * +qla2x00_alloc_rscn_fcport(scsi_qla_host_t *ha, int flags) +{ + fc_port_t *fcport; + + fcport = qla2x00_alloc_fcport(ha, flags); + if (fcport == NULL) + return (fcport); + + /* Setup RSCN fcport structure. */ + fcport->port_type = FCT_RSCN; + + return (fcport); +} + +/** + * qla2x00_handle_port_rscn() - Handle port RSCN. + * @ha: HA context + * @rscn_entry: RSCN entry + * @fcport: fcport entry to updated + * + * Returns QLA_SUCCESS if the port RSCN was handled. + */ +int +qla2x00_handle_port_rscn(scsi_qla_host_t *ha, uint32_t rscn_entry, + fc_port_t *known_fcport, int ha_locked) +{ + int rval; + port_id_t rscn_pid; + fc_port_t *fcport, *remote_fcport, *rscn_fcport; + struct io_descriptor *iodesc; + + remote_fcport = NULL; + rscn_fcport = NULL; + + /* Prepare port id based on incoming entries. */ + if (known_fcport) { + rscn_pid.b24 = known_fcport->d_id.b24; + remote_fcport = known_fcport; + + DEBUG14(printk("scsi(%ld): Handle RSCN -- process RSCN for " + "fcport [%02x%02x%02x].\n", ha->host_no, + remote_fcport->d_id.b.domain, remote_fcport->d_id.b.area, + remote_fcport->d_id.b.al_pa)); + } else { + rscn_pid.b.domain = LSB(MSW(rscn_entry)); + rscn_pid.b.area = MSB(LSW(rscn_entry)); + rscn_pid.b.al_pa = LSB(LSW(rscn_entry)); + + DEBUG14(printk("scsi(%ld): Handle RSCN -- process RSCN for " + "port id [%02x%02x%02x].\n", ha->host_no, + rscn_pid.b.domain, rscn_pid.b.area, rscn_pid.b.al_pa)); + + /* + * Search fcport lists for a known entry at the specified port + * ID. + */ + list_for_each_entry(fcport, &ha->fcports, list) { + if (rscn_pid.b24 == fcport->d_id.b24) { + remote_fcport = fcport; + break; + } + } + list_for_each_entry(fcport, &ha->rscn_fcports, list) { + if (rscn_pid.b24 == fcport->d_id.b24) { + rscn_fcport = fcport; + break; + } + } + if (remote_fcport == NULL) + remote_fcport = rscn_fcport; + } + + /* + * If the port is already in our fcport list and online, send an ADISC + * to see if it's still alive. Issue login if a new fcport or the known + * fcport is currently offline. + */ + if (remote_fcport) { + /* + * No need to send request if the remote fcport is currently + * waiting for an available io descriptor. + */ + if (known_fcport == NULL && + (remote_fcport->iodesc_idx_sent == IODESC_ADISC_NEEDED || + remote_fcport->iodesc_idx_sent == IODESC_LOGIN_NEEDED)) { + /* + * If previous waiting io descriptor is an ADISC, then + * the new RSCN may come from a new remote fcport being + * plugged into the same location. + */ + if (remote_fcport->port_type == FCT_RSCN) { + remote_fcport->iodesc_idx_sent = + IODESC_LOGIN_NEEDED; + } else if (remote_fcport->iodesc_idx_sent == + IODESC_ADISC_NEEDED) { + fc_port_t *new_fcport; + + remote_fcport->iodesc_idx_sent = + IODESC_INVALID_INDEX; + + /* Create new fcport for later login. */ + new_fcport = qla2x00_alloc_rscn_fcport(ha, + ha_locked ? GFP_ATOMIC: GFP_KERNEL); + if (new_fcport) { + DEBUG14(printk("scsi(%ld): Handle RSCN " + "-- creating RSCN fcport %p for " + "future login.\n", ha->host_no, + new_fcport)); + + new_fcport->d_id.b24 = + remote_fcport->d_id.b24; + new_fcport->iodesc_idx_sent = + IODESC_LOGIN_NEEDED; + + list_add_tail(&new_fcport->list, + &ha->rscn_fcports); + set_bit(IODESC_PROCESS_NEEDED, + &ha->dpc_flags); + } else { + DEBUG14(printk("scsi(%ld): Handle RSCN " + "-- unable to allocate RSCN fcport " + "for future login.\n", + ha->host_no)); + } + } + return (QLA_SUCCESS); + } + + /* Send ADISC if the fcport is online */ + if (atomic_read(&remote_fcport->state) == FCS_ONLINE || + remote_fcport->iodesc_idx_sent == IODESC_ADISC_NEEDED) { + + atomic_set(&remote_fcport->state, FCS_DEVICE_LOST); + + iodesc = qla2x00_alloc_iodesc(ha); + if (iodesc == NULL) { + /* Mark fcport for later adisc processing */ + DEBUG14(printk("scsi(%ld): Handle RSCN -- not " + "enough IO descriptors for Adisc, flag " + "for later processing.\n", ha->host_no)); + + remote_fcport->iodesc_idx_sent = + IODESC_ADISC_NEEDED; + set_bit(IODESC_PROCESS_NEEDED, &ha->dpc_flags); + + return (QLA_SUCCESS); + } + + iodesc->cb_idx = ADISC_PORT_IOCB_CB; + iodesc->d_id.b24 = rscn_pid.b24; + iodesc->remote_fcport = remote_fcport; + remote_fcport->iodesc_idx_sent = iodesc->idx; + qla2x00_send_adisc_iocb(ha, iodesc, ha_locked); + + return (QLA_SUCCESS); + } else if (remote_fcport->iodesc_idx_sent < + MAX_IO_DESCRIPTORS && + ha->io_descriptors[remote_fcport->iodesc_idx_sent].cb_idx == + ADISC_PORT_IOCB_CB) { + /* + * Receiving another RSCN while an ADISC is pending, + * abort the IOCB. Use the same descriptor for the + * abort. + */ + uint32_t handle_to_abort; + + iodesc = &ha->io_descriptors[ + remote_fcport->iodesc_idx_sent]; + qla2x00_remove_iodesc_timer(iodesc); + handle_to_abort = iodesc->signature; + iodesc->signature = qla2x00_iodesc_to_handle(iodesc); + iodesc->cb_idx = ABORT_IOCB_CB; + iodesc->d_id.b24 = remote_fcport->d_id.b24; + iodesc->remote_fcport = remote_fcport; + remote_fcport->iodesc_idx_sent = iodesc->idx; + + DEBUG14(printk("scsi(%ld): Handle RSCN -- issuing " + "abort to outstanding Adisc [%x/%02x%02x%02x].\n", + ha->host_no, remote_fcport->loop_id, + iodesc->d_id.b.domain, iodesc->d_id.b.area, + iodesc->d_id.b.al_pa)); + + qla2x00_send_abort_iocb(ha, iodesc, handle_to_abort, + ha_locked); + } + } + + /* We need to login to the remote port, find it. */ + if (known_fcport) { + remote_fcport = known_fcport; + } else if (rscn_fcport && rscn_fcport->d_id.b24 != INVALID_PORT_ID && + rscn_fcport->iodesc_idx_sent < MAX_IO_DESCRIPTORS && + ha->io_descriptors[rscn_fcport->iodesc_idx_sent].cb_idx == + LOGIN_PORT_IOCB_CB) { + /* + * Ignore duplicate RSCN on fcport which has already + * initiated a login IOCB. + */ + DEBUG14(printk("scsi(%ld): Handle RSCN -- ignoring, login " + "already sent to [%02x%02x%02x].\n", ha->host_no, + rscn_fcport->d_id.b.domain, rscn_fcport->d_id.b.area, + rscn_fcport->d_id.b.al_pa)); + + return (QLA_SUCCESS); + } else if (rscn_fcport && rscn_fcport->d_id.b24 != INVALID_PORT_ID && + rscn_fcport != remote_fcport) { + /* Reuse same rscn fcport. */ + DEBUG14(printk("scsi(%ld): Handle RSCN -- reusing RSCN fcport " + "[%02x%02x%02x].\n", ha->host_no, + rscn_fcport->d_id.b.domain, rscn_fcport->d_id.b.area, + rscn_fcport->d_id.b.al_pa)); + + remote_fcport = rscn_fcport; + } else { + /* Create new fcport for later login. */ + remote_fcport = qla2x00_alloc_rscn_fcport(ha, + ha_locked ? GFP_ATOMIC: GFP_KERNEL); + list_add_tail(&remote_fcport->list, &ha->rscn_fcports); + } + if (remote_fcport == NULL) + return (QLA_SUCCESS); + + /* Prepare fcport for login. */ + atomic_set(&remote_fcport->state, FCS_DEVICE_LOST); + remote_fcport->login_retry = 3; /* ha->login_retry_count; */ + remote_fcport->d_id.b24 = rscn_pid.b24; + + iodesc = qla2x00_alloc_iodesc(ha); + if (iodesc == NULL) { + /* Mark fcport for later adisc processing. */ + DEBUG14(printk("scsi(%ld): Handle RSCN -- not enough IO " + "descriptors for Login, flag for later processing.\n", + ha->host_no)); + + remote_fcport->iodesc_idx_sent = IODESC_LOGIN_NEEDED; + set_bit(IODESC_PROCESS_NEEDED, &ha->dpc_flags); + + return (QLA_SUCCESS); + } + + if (known_fcport == NULL || rscn_pid.b24 != INVALID_PORT_ID) { + remote_fcport->loop_id = ha->min_external_loopid; + + rval = qla2x00_find_new_loop_id(ha, remote_fcport); + if (rval == QLA_FUNCTION_FAILED) { + /* No more loop ids, failed. */ + DEBUG14(printk("scsi(%ld): Handle RSCN -- no available " + "loop id to perform Login, failed.\n", + ha->host_no)); + + return (rval); + } + } + + iodesc->cb_idx = LOGIN_PORT_IOCB_CB; + iodesc->d_id.b24 = rscn_pid.b24; + iodesc->remote_fcport = remote_fcport; + remote_fcport->iodesc_idx_sent = iodesc->idx; + + DEBUG14(printk("scsi(%ld): Handle RSCN -- attempting login to " + "[%x/%02x%02x%02x].\n", ha->host_no, remote_fcport->loop_id, + iodesc->d_id.b.domain, iodesc->d_id.b.area, iodesc->d_id.b.al_pa)); + + qla2x00_send_login_iocb(ha, iodesc, &rscn_pid, ha_locked); + + return (QLA_SUCCESS); +} + +/** + * qla2x00_process_iodesc() - Complete IO descriptor processing. + * @ha: HA context + * @mbxstat: Mailbox IOCB status + */ +void +qla2x00_process_iodesc(scsi_qla_host_t *ha, struct mbx_entry *mbxstat) +{ + int rval; + uint32_t signature; + fc_port_t *fcport; + struct io_descriptor *iodesc; + + signature = mbxstat->handle; + + DEBUG14(printk("scsi(%ld): Process IODesc -- processing %08x.\n", + ha->host_no, signature)); + + /* Retrieve proper IO descriptor. */ + iodesc = qla2x00_handle_to_iodesc(ha, signature); + if (iodesc == NULL) { + DEBUG14(printk("scsi(%ld): Process IODesc -- ignoring, " + "incorrect signature %08x.\n", ha->host_no, signature)); + + return; + } + + /* Stop IO descriptor timer. */ + qla2x00_remove_iodesc_timer(iodesc); + + /* Verify signature match. */ + if (iodesc->signature != signature) { + DEBUG14(printk("scsi(%ld): Process IODesc -- ignoring, " + "signature mismatch, sent %08x, received %08x.\n", + ha->host_no, iodesc->signature, signature)); + + return; + } + + /* Go with IOCB callback. */ + rval = iocb_function_cb_list[iodesc->cb_idx](ha, iodesc, mbxstat); + if (rval != QLA_SUCCESS) { + /* IO descriptor reused by callback. */ + return; + } + + qla2x00_free_iodesc(iodesc); + + if (test_bit(IODESC_PROCESS_NEEDED, &ha->dpc_flags)) { + /* Scan our fcports list for any RSCN requests. */ + list_for_each_entry(fcport, &ha->fcports, list) { + if (fcport->iodesc_idx_sent == IODESC_ADISC_NEEDED || + fcport->iodesc_idx_sent == IODESC_LOGIN_NEEDED) { + qla2x00_handle_port_rscn(ha, 0, fcport, 1); + return; + } + } + + /* Scan our RSCN fcports list for any RSCN requests. */ + list_for_each_entry(fcport, &ha->rscn_fcports, list) { + if (fcport->iodesc_idx_sent == IODESC_ADISC_NEEDED || + fcport->iodesc_idx_sent == IODESC_LOGIN_NEEDED) { + qla2x00_handle_port_rscn(ha, 0, fcport, 1); + return; + } + } + } + clear_bit(IODESC_PROCESS_NEEDED, &ha->dpc_flags); +} + +/** + * qla2x00_cancel_io_descriptors() - Cancel all outstanding io descriptors. + * @ha: HA context + * + * This routine will also delete any RSCN entries related to the outstanding + * IO descriptors. + */ +void +qla2x00_cancel_io_descriptors(scsi_qla_host_t *ha) +{ + fc_port_t *fcport, *fcptemp; + + clear_bit(IODESC_PROCESS_NEEDED, &ha->dpc_flags); + + /* Abort all IO descriptors. */ + qla2x00_init_io_descriptors(ha); + + /* Reset all pending IO descriptors in fcports list. */ + list_for_each_entry(fcport, &ha->fcports, list) { + fcport->iodesc_idx_sent = IODESC_INVALID_INDEX; + } + + /* Reset all pending IO descriptors in rscn fcports list. */ + list_for_each_entry_safe(fcport, fcptemp, &ha->rscn_fcports, list) { + DEBUG14(printk("scsi(%ld): Cancel IOs -- Freeing RSCN fcport " + "%p [%x/%02x%02x%02x].\n", ha->host_no, fcport, + fcport->loop_id, fcport->d_id.b.domain, fcport->d_id.b.area, + fcport->d_id.b.al_pa)); + + list_del(&fcport->list); + kfree(fcport); + } +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_settings.h 999-mjb/drivers/scsi/qla2xxx/qla_settings.h --- 000-virgin/drivers/scsi/qla2xxx/qla_settings.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_settings.h 2003-11-25 14:18:48.000000000 -0800 @@ -0,0 +1,74 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ +/* + * Compile time Options: + * 0 - Disable and 1 - Enable + */ +#define DEBUG_QLA2100 0 /* For Debug of qla2x00 */ + +#define MEMORY_MAPPED_IO 1 +#define STOP_ON_ERROR 0 /* Stop on aborts and resets */ +#define STOP_ON_RESET 0 +#define STOP_ON_ABORT 0 +#define QLA_SCSI_VENDOR_DIR 0 /* + * Decode vendor specific opcodes for + * direction + */ +#define QLA2100_LIPTEST 0 +#define REQ_TRACE 1 +#define USE_ABORT_TGT 1 /* Use Abort Target mbx cmd */ + +#define VSA 0 /* Volume Set Addressing */ + +/* Failover options */ +#define MPIO_SUPPORT 0 +#define MAX_RECOVERYTIME 10 /* + * Max suspend time for a lun recovery + * time + */ +#define MAX_FAILBACKTIME 5 /* Max suspend time before fail back */ + +#define QLA_CMD_TIMER_DELTA 3 + +/* + * When a lun is suspended for the "Not Ready" condition then it will suspend + * the lun for increments of 6 sec delays. SUSPEND_COUNT is that count. + */ +#define SUSPEND_COUNT 10 /* 6 secs * 10 retries = 60 secs */ + +/* + * Defines the time in seconds that the driver extends the command timeout to + * get around the problem where the mid-layer only allows 5 retries for + * commands that return BUS_BUSY + */ +#define EXTEND_CMD_TIMEOUT 60 + +#define MAX_RETRIES_OF_ISP_ABORT 5 + +/* Max time to wait for the loop to be in LOOP_READY state */ +#define MAX_LOOP_TIMEOUT (60 * 5) +#define EH_ACTIVE 1 /* Error handler active */ + +/* + * Some vendor subsystems do not recover properly after a device reset. Define + * the following to force a logout after a successful device reset. + */ +#undef LOGOUT_AFTER_DEVICE_RESET + +#include "qla_version.h" diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_sup.c 999-mjb/drivers/scsi/qla2xxx/qla_sup.c --- 000-virgin/drivers/scsi/qla2xxx/qla_sup.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_sup.c 2003-11-25 14:18:48.000000000 -0800 @@ -0,0 +1,557 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + +#include "qla_os.h" +#include "qla_def.h" + +static uint16_t qla2x00_nvram_request(scsi_qla_host_t *, uint32_t); + +uint8_t qla2x00_read_flash_byte(scsi_qla_host_t *, uint32_t); +static void qla2x00_write_flash_byte(scsi_qla_host_t *, uint32_t, uint8_t); +static uint8_t qla2x00_poll_flash(scsi_qla_host_t *ha, + uint32_t addr, uint8_t poll_data, uint8_t mid); +static uint8_t qla2x00_program_flash_address(scsi_qla_host_t *ha, + uint32_t addr, uint8_t data, uint8_t mid); +static uint8_t qla2x00_erase_flash_sector(scsi_qla_host_t *ha, + uint32_t addr, uint32_t sec_mask, uint8_t mid); + +uint8_t qla2x00_get_flash_manufacturer(scsi_qla_host_t *ha); +uint16_t qla2x00_get_flash_version(scsi_qla_host_t *); +uint16_t qla2x00_get_flash_image(scsi_qla_host_t *ha, uint8_t *image); +uint16_t qla2x00_set_flash_image(scsi_qla_host_t *ha, uint8_t *image); + + +/* + * NVRAM support routines + */ + +/** + * qla2x00_get_nvram_word() - Calculates word position in NVRAM and calls the + * request routine to get the word from NVRAM. + * @ha: HA context + * @addr: Address in NVRAM to read + * + * Returns the word read from nvram @addr. + */ +uint16_t +qla2x00_get_nvram_word(scsi_qla_host_t *ha, uint32_t addr) +{ + uint16_t data; + uint32_t nv_cmd; + + ENTER(__func__); + + nv_cmd = addr << 16; + nv_cmd |= NV_READ_OP; + data = qla2x00_nvram_request(ha, nv_cmd); + + DEBUG4(printk("%s(%ld): NVRAM[%lx]=%lx.\n", + __func__, ha->host_no, (u_long)addr, (u_long)data)); + + LEAVE(__func__); + + return (data); +} + +/** + * qla2x00_nvram_request() - Sends read command to NVRAM and gets data from + * NVRAM. + * @ha: HA context + * @nv_cmd: NVRAM command + * + * Bit definitions for NVRAM command: + * + * Bit 26 = start bit + * Bit 25, 24 = opcode + * Bit 23-16 = address + * Bit 15-0 = write data + * + * Returns the word read from nvram @addr. + */ +static uint16_t +qla2x00_nvram_request(scsi_qla_host_t *ha, uint32_t nv_cmd) +{ + uint8_t cnt; + device_reg_t *reg = ha->iobase; + uint16_t data = 0; + uint16_t reg_data; + + /* Send command to NVRAM. */ + nv_cmd <<= 5; + for (cnt = 0; cnt < 11; cnt++) { + if (nv_cmd & BIT_31) + qla2x00_nv_write(ha, NVR_DATA_OUT); + else + qla2x00_nv_write(ha, 0); + nv_cmd <<= 1; + } + + /* Read data from NVRAM. */ + for (cnt = 0; cnt < 16; cnt++) { + WRT_REG_WORD(®->nvram, NVR_SELECT | NVR_CLOCK); + NVRAM_DELAY(); + data <<= 1; + reg_data = RD_REG_WORD(®->nvram); + if (reg_data & NVR_DATA_IN) + data |= BIT_0; + WRT_REG_WORD(®->nvram, NVR_SELECT); + NVRAM_DELAY(); + } + + /* Deselect chip. */ + WRT_REG_WORD(®->nvram, NVR_DESELECT); + NVRAM_DELAY(); + + return (data); +} + +/** + * qla2x00_nv_write() - Clean NVRAM operations. + * @ha: HA context + */ +void +qla2x00_nv_deselect(scsi_qla_host_t *ha) +{ + device_reg_t *reg = ha->iobase; + + WRT_REG_WORD(®->nvram, NVR_DESELECT); + NVRAM_DELAY(); +} + +/** + * qla2x00_nv_write() - Prepare for NVRAM read/write operation. + * @ha: HA context + * @data: Serial interface selector + */ +void +qla2x00_nv_write(scsi_qla_host_t *ha, uint16_t data) +{ + device_reg_t *reg = ha->iobase; + + WRT_REG_WORD(®->nvram, data | NVR_SELECT); + NVRAM_DELAY(); + WRT_REG_WORD(®->nvram, data | NVR_SELECT | NVR_CLOCK); + NVRAM_DELAY(); + WRT_REG_WORD(®->nvram, data | NVR_SELECT); + NVRAM_DELAY(); +} + +/* + * Flash support routines + */ + +/** + * qla2x00_flash_enable() - Setup flash for reading and writing. + * @ha: HA context + */ +void +qla2x00_flash_enable(scsi_qla_host_t *ha) +{ + uint16_t data; + device_reg_t *reg = ha->iobase; + + data = RD_REG_WORD(®->ctrl_status); + data |= CSR_FLASH_ENABLE; + WRT_REG_WORD(®->ctrl_status, data); +} + +/** + * qla2x00_flash_disable() - Disable flash and allow RISC to run. + * @ha: HA context + */ +void +qla2x00_flash_disable(scsi_qla_host_t *ha) +{ + uint16_t data; + device_reg_t *reg = ha->iobase; + + data = RD_REG_WORD(®->ctrl_status); + data &= ~(CSR_FLASH_ENABLE); + WRT_REG_WORD(®->ctrl_status, data); +} + +/** + * qla2x00_read_flash_byte() - Reads a byte from flash + * @ha: HA context + * @addr: Address in flash to read + * + * A word is read from the chip, but, only the lower byte is valid. + * + * Returns the byte read from flash @addr. + */ +uint8_t +qla2x00_read_flash_byte(scsi_qla_host_t *ha, uint32_t addr) +{ + uint16_t data; + uint16_t bank_select; + device_reg_t *reg = ha->iobase; + + /* Setup bit 16 of flash address. */ + bank_select = RD_REG_WORD(®->ctrl_status); + if ((addr & BIT_16) && ((bank_select & CSR_FLASH_64K_BANK) == 0)) { + bank_select |= CSR_FLASH_64K_BANK; + WRT_REG_WORD(®->ctrl_status, bank_select); + } else if (((addr & BIT_16) == 0) && + (bank_select & CSR_FLASH_64K_BANK)) { + bank_select &= ~(CSR_FLASH_64K_BANK); + WRT_REG_WORD(®->ctrl_status, bank_select); + } + WRT_REG_WORD(®->flash_address, (uint16_t)addr); + data = qla2x00_debounce_register(®->flash_data); + + return ((uint8_t)data); +} + +/** + * qla2x00_write_flash_byte() - Write a byte to flash + * @ha: HA context + * @addr: Address in flash to write + * @data: Data to write + */ +static void +qla2x00_write_flash_byte(scsi_qla_host_t *ha, uint32_t addr, uint8_t data) +{ + uint16_t bank_select; + device_reg_t *reg = ha->iobase; + + /* Setup bit 16 of flash address. */ + bank_select = RD_REG_WORD(®->ctrl_status); + if ((addr & BIT_16) && ((bank_select & CSR_FLASH_64K_BANK) == 0)) { + bank_select |= CSR_FLASH_64K_BANK; + WRT_REG_WORD(®->ctrl_status, bank_select); + } else if (((addr & BIT_16) == 0) && + (bank_select & CSR_FLASH_64K_BANK)) { + bank_select &= ~(CSR_FLASH_64K_BANK); + WRT_REG_WORD(®->ctrl_status, bank_select); + } + WRT_REG_WORD(®->flash_address, (uint16_t)addr); + WRT_REG_WORD(®->flash_data, (uint16_t)data); +} + +/** + * qla2x00_poll_flash() - Polls flash for completion. + * @ha: HA context + * @addr: Address in flash to poll + * @poll_data: Data to be polled + * @mid: Flash manufacturer ID + * + * This function polls the device until bit 7 of what is read matches data + * bit 7 or until data bit 5 becomes a 1. If that hapens, the flash ROM timed + * out (a fatal error). The flash book recommeds reading bit 7 again after + * reading bit 5 as a 1. + * + * Returns 0 on success, else non-zero. + */ +static uint8_t +qla2x00_poll_flash(scsi_qla_host_t *ha, + uint32_t addr, uint8_t poll_data, uint8_t mid) +{ + uint8_t status; + uint8_t flash_data; + uint32_t cnt; + int failed_pass; + + status = 1; + failed_pass = 1; + + /* Wait for 30 seconds for command to finish. */ + poll_data &= BIT_7; + for (cnt = 3000000; cnt; cnt--) { + flash_data = qla2x00_read_flash_byte(ha, addr); + if ((flash_data & BIT_7) == poll_data) { + status = 0; + break; + } + + if (mid != 0x40 && mid != 0xda) { + if (flash_data & BIT_5) + failed_pass--; + if (failed_pass < 0) + break; + } + udelay(10); + barrier(); + } + return (status); +} + +/** + * qla2x00_program_flash_address() - Programs a flash address + * @ha: HA context + * @addr: Address in flash to program + * @data: Data to be written in flash + * @mid: Flash manufacturer ID + * + * Returns 0 on success, else non-zero. + */ +static uint8_t +qla2x00_program_flash_address(scsi_qla_host_t *ha, + uint32_t addr, uint8_t data, uint8_t mid) +{ + /* Write Program Command Sequence */ + qla2x00_write_flash_byte(ha, 0x5555, 0xaa); + qla2x00_write_flash_byte(ha, 0x2aaa, 0x55); + qla2x00_write_flash_byte(ha, 0x5555, 0xa0); + qla2x00_write_flash_byte(ha, addr, data); + + /* Wait for write to complete. */ + return (qla2x00_poll_flash(ha, addr, data, mid)); +} + +/** + * qla2x00_erase_flash_sector() - Erase a flash sector. + * @ha: HA context + * @addr: Flash sector to erase + * @sec_mask: Sector address mask + * @mid: Flash manufacturer ID + * + * Returns 0 on success, else non-zero. + */ +static uint8_t +qla2x00_erase_flash_sector(scsi_qla_host_t *ha, + uint32_t addr, uint32_t sec_mask, uint8_t mid) +{ + /* Individual Sector Erase Command Sequence */ + qla2x00_write_flash_byte(ha, 0x5555, 0xaa); + qla2x00_write_flash_byte(ha, 0x2aaa, 0x55); + qla2x00_write_flash_byte(ha, 0x5555, 0x80); + qla2x00_write_flash_byte(ha, 0x5555, 0xaa); + qla2x00_write_flash_byte(ha, 0x2aaa, 0x55); + + if (mid == 0xda) + qla2x00_write_flash_byte(ha, addr & sec_mask, 0x10); + else + qla2x00_write_flash_byte(ha, addr & sec_mask, 0x30); + + udelay(150); + + /* Wait for erase to complete. */ + return (qla2x00_poll_flash(ha, addr, 0x80, mid)); +} + +/** + * qla2x00_get_flash_manufacturer() - Read manufacturer ID from flash chip. + * @ha: HA context + * + * Returns the manufacturer's ID read from the flash chip. + */ +uint8_t +qla2x00_get_flash_manufacturer(scsi_qla_host_t *ha) +{ + uint8_t manuf_id; + + qla2x00_write_flash_byte(ha, 0x5555, 0xaa); + qla2x00_write_flash_byte(ha, 0x2aaa, 0x55); + qla2x00_write_flash_byte(ha, 0x5555, 0x90); + manuf_id = qla2x00_read_flash_byte(ha, 0x0001); + + return (manuf_id); +} + +/** + * qla2x00_get_flash_version() - Read version information from flash. + * @ha: HA context + * + * Returns QLA_SUCCESS on successful retrieval of flash version. + */ +uint16_t +qla2x00_get_flash_version(scsi_qla_host_t *ha) +{ + uint16_t ret = QLA_SUCCESS; + uint32_t loop_cnt = 1; /* this is for error exit only */ + uint32_t pcir_adr; + + ENTER(__func__); + + qla2x00_flash_enable(ha); + do { /* Loop once to provide quick error exit */ + /* Match signature */ + if (!(qla2x00_read_flash_byte(ha, 0) == 0x55 && + qla2x00_read_flash_byte(ha, 1) == 0xaa)) { + /* No signature */ + DEBUG2(printk("scsi(%ld): No matching FLASH " + "signature.\n", ha->host_no)); + ret = QLA_FUNCTION_FAILED; + break; + } + + pcir_adr = qla2x00_read_flash_byte(ha, 0x18) & 0xff; + + /* validate signature of PCI data structure */ + if ((qla2x00_read_flash_byte(ha, pcir_adr)) == 'P' && + (qla2x00_read_flash_byte(ha, pcir_adr + 1)) == 'C' && + (qla2x00_read_flash_byte(ha, pcir_adr + 2)) == 'I' && + (qla2x00_read_flash_byte(ha, pcir_adr + 3)) == 'R') { + + /* Read version */ + ha->optrom_minor = + qla2x00_read_flash_byte(ha, pcir_adr + 0x12); + ha->optrom_major = + qla2x00_read_flash_byte(ha, pcir_adr + 0x13); + DEBUG3(printk("%s(): got %d.%d.\n", + __func__, ha->optrom_major, ha->optrom_minor)); + } else { + /* error */ + DEBUG2(printk("%s(): PCI data struct not found. " + "pcir_adr=%x.\n", + __func__, pcir_adr)); + ret = QLA_FUNCTION_FAILED; + break; + } + + } while (--loop_cnt); + qla2x00_flash_disable(ha); + + LEAVE(__func__); + + return (ret); +} + +/** + * qla2x00_get_flash_image() - Read image from flash chip. + * @ha: HA context + * @image: Buffer to receive flash image + * + * Returns 0 on success, else non-zero. + */ +uint16_t +qla2x00_get_flash_image(scsi_qla_host_t *ha, uint8_t *image) +{ + uint32_t addr; + uint32_t midpoint; + uint8_t *data; + device_reg_t *reg = ha->iobase; + + midpoint = FLASH_IMAGE_SIZE / 2; + + qla2x00_flash_enable(ha); + WRT_REG_WORD(®->nvram, 0); + for (addr = 0, data = image; addr < FLASH_IMAGE_SIZE; addr++, data++) { + if (addr == midpoint) + WRT_REG_WORD(®->nvram, NVR_SELECT); + + *data = qla2x00_read_flash_byte(ha, addr); + } + qla2x00_flash_disable(ha); + + return (0); +} + +/** + * qla2x00_set_flash_image() - Write image to flash chip. + * @ha: HA context + * @image: Source image to write to flash + * + * Returns 0 on success, else non-zero. + */ +uint16_t +qla2x00_set_flash_image(scsi_qla_host_t *ha, uint8_t *image) +{ + uint16_t status; + uint32_t addr; + uint32_t midpoint; + uint32_t sec_mask; + uint32_t rest_addr; + uint8_t mid; + uint8_t sec_number; + uint8_t data; + device_reg_t *reg = ha->iobase; + + status = 0; + sec_number = 0; + + /* Reset ISP chip. */ + WRT_REG_WORD(®->ctrl_status, CSR_ISP_SOFT_RESET); + + qla2x00_flash_enable(ha); + do { /* Loop once to provide quick error exit */ + /* Structure of flash memory based on manufacturer */ + mid = qla2x00_get_flash_manufacturer(ha); + if (mid == 0x6d) { + // Am29LV001 part + rest_addr = 0x1fff; + sec_mask = 0x1e000; + } + else if (mid == 0x40) { + // Mostel v29c51001 part + rest_addr = 0x1ff; + sec_mask = 0x1fe00; + } + else if (mid == 0xbf) { + // SST39sf10 part + rest_addr = 0xfff; + sec_mask = 0x1f000; + } + else if (mid == 0xda) { + // Winbond W29EE011 part + rest_addr = 0x7f; + sec_mask = 0x1ff80; + addr = 0; + if (qla2x00_erase_flash_sector(ha, + addr, sec_mask, mid)) { + status = 1; + break; + } + } + else { + // Am29F010 part + rest_addr = 0x3fff; + sec_mask = 0x1c000; + } + + midpoint = FLASH_IMAGE_SIZE / 2; + for (addr = 0; addr < FLASH_IMAGE_SIZE; addr++) { + data = *image++; + /* Are we at the beginning of a sector? */ + if (!(addr & rest_addr)) { + if (addr == midpoint) + WRT_REG_WORD(®->nvram, NVR_SELECT); + + /* Then erase it */ + if (qla2x00_erase_flash_sector(ha, + addr, sec_mask, mid)) { + status = 1; + break; + } + + sec_number++; + } + if (mid == 0x6d) { + if (sec_number == 1 && + (addr == (rest_addr - 1))) { + rest_addr = 0x0fff; + sec_mask = 0x1f000; + } + else if (sec_number == 3 && (addr & 0x7ffe)) { + rest_addr = 0x3fff; + sec_mask = 0x1c000; + } + } + + if (qla2x00_program_flash_address(ha, + addr, data, mid)) { + status = 1; + break; + } + } + } while (0); + qla2x00_flash_disable(ha); + + return (status); +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_vendor.c 999-mjb/drivers/scsi/qla2xxx/qla_vendor.c --- 000-virgin/drivers/scsi/qla2xxx/qla_vendor.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_vendor.c 2003-11-25 14:18:48.000000000 -0800 @@ -0,0 +1,193 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + +#include "qla_os.h" +#include "qla_def.h" + +/* + * vendor specific op codes. +*/ +#define UCSCSI_DCMD 0x20 /* vendor specific command */ +#define DAC_CDB_LEN 12 +#define DAC_SENSE_LEN 64 + +#define DACMD_WRITE_CONF_ONDISK 0x4B +#define DACMD_WRITE_CONFIG 0x06 +#define DACMD_WRITE_CONF2 0x3C +#define DACMD_WRITE_CONFLABEL 0x49 /* Write configuration label */ +#define DACMD_WRITE_CONFIG_V3x 0x4F +#define DACMD_ADD_CONFIG_V2x 0x18 +#define DACMD_ADD_CONFIG_V3x 0x4C +#define DACMD_STORE_IMAGE 0x21 +#define DACMD_ADD_CAPACITY 0x2A /* add physical drives to existing array */ +#define DACMD_WRITE_IOPORT 0x3A /* write port B */ +#define DACMD_S2S_WRITEFULLCONF 0x60 /* write full configuration */ +#define DACMD_S2S_ADDFULLCONF 0x62 /* add full configuration */ +#define DACMD_S2S_WRITELUNMAP_OLD 0x58 /* write LUN map information */ +#define DACMD_S2S_WRITELUNMAP 0xD2 /* Write LUN MAP Information */ +#define DACMD_S2S_WRITE_IOPORT 0x66 /* write expanded IO port */ +#define DACMD_WRITE_V3x 0x34 /* write data from plain memory */ +#define DACMD_S2S_WRITESIG 0x4D /* write signature information */ + +#if !defined(s08bits) +#define s08bits char +#define s16bits short +#define s32bits int +#define u08bits unsigned s08bits +#define u16bits unsigned s16bits +#define u32bits unsigned s32bits +#endif + +typedef struct dac_command +{ + u08bits mb_Command; /* Mail Box register 0 */ + u08bits mb_CmdID; /* Mail Box register 1 */ + u08bits mb_ChannelNo; /* Mail Box register 2 */ + u08bits mb_TargetID; /* Mail Box register 3 */ + u08bits mb_DevState; /* Mail Box register 4 */ + u08bits mb_MailBox5; /* Mail Box register 5 */ + u08bits mb_MailBox6; /* Mail Box register 6 */ + u08bits mb_SysDevNo; /* Mail Box register 7 */ + u32bits mb_Datap; /* Mail Box register 8-B */ + u08bits mb_MailBoxC; /* Mail Box register C */ + u08bits mb_StatusID; /* Mail box register D */ + u16bits mb_Status; /* Mail Box Register E,F */ +} +dac_command_t; + +typedef struct dac_scdb +{ + u08bits db_ChannelTarget; /* ChannelNo 7..4 & Target 3..0 */ + u08bits db_DATRET; /* different bits, see below */ + u16bits db_TransferSize; /* Request/done size in bytes */ + u32bits db_PhysDatap; /* Physical addr in host memory */ + u08bits db_CdbLen; /* 6, 10 or 12 */ + u08bits db_SenseLen; /* If returned from DAC (<= 64) */ + u08bits db_Cdb[DAC_CDB_LEN]; /* The CDB itself */ + u08bits db_SenseData[DAC_SENSE_LEN];/* Result of request sense */ + u08bits db_StatusIn; /* SCSI status returned */ + u08bits db_Reserved1; +} +dac_scdb_t; + +typedef struct dga_scdb +{ + u08bits dsc_osreq[1024]; /* OS related buffer:sizeof(mdac_req_t) */ + + u08bits dsc_familyctlno; /* Controller number within family */ + u08bits dsc_ctlno; /* Controller number */ + u08bits dsc_chno; /* Channel number */ + u08bits dsc_tgt; /* target ID */ + + u08bits dsc_lun; /* Lun ID */ + u08bits dsc_rebuildflag; /* current rebuild flag */ + u16bits dsc_status; /* completion status */ + + u08bits dsc_scsiversion; /* SCSI protocol version */ + u08bits dsc_hostctlno; /* host system controller number */ + u16bits dsc_reqsenseseqno; /* request sense sequence number */ + + u32bits dsc_events; /* # events at start */ + + u32bits dsc_pollwaitchan; /* sleep/wakeup channel */ + u32bits dsc_poll; /* polling value, if =0 op complete */ + + struct dga_ctldev *dsc_ctp; /* pointer back to controller */ + void *dsc_pdp; /* pointer back to physical device */ + void *dsc_ldp; /* pointer back to logical device */ + void (*dsc_intr)(void); /* completion call back function */ + + /* all save functions are used in S2S */ + u08bits dsc_savedcdb[DAC_CDB_LEN];/* 12 bytes saved CDB from SCSI CDB */ + u32bits (*dsc_statsintr)(struct dga_scdb *); /* statistics completion function */ + + void (*dsc_savedintr)(void); /* completion call back function */ + void *dsc_savedctp; /* pointer back to controller */ + u08bits dsc_savedfamilyctlno; /* Controller number within family */ + u08bits dsc_savedctlno; /* Controller number */ + u08bits dsc_savedchno; /* Channel number */ + u08bits dsc_savedtgt; /* target ID */ + + u08bits dsc_savedlun; /* Lun ID */ + u08bits dsc_savedcdblen; /* saved CDB len for SCDB */ + u08bits dsc_scanmode; + u08bits dsc_pageno; /* pageno for data > 4K */ + u32bits dsc_residue; + u32bits dsc_Reserved4; + + dac_command_t dsc_dcmd; /* DCMD space, 16 bytes */ + dac_scdb_t dsc_scdb; /* SCDB space */ + u32bits dsc_EventSeqNo; + u32bits dsc_ReqSenseNo; + + u32bits dsc_Reserved64[16]; /* leave this for OLD SCO driver bug */ + + u08bits dsc_data[256]; /* Rest is data */ +} +dga_scdb_t; + +/* +* qla2100_set_scsi_direction +* This routine will set the proper direction for vendor specific +* commands. +* +* Note: Vendors should modify this routine to set the proper +* direction of the transfer if they used vendor specific commands. +* +* Input: +* ha = adapter block pointer. +* sp = SCSI Request Block structure pointer. +* +* Returns: +* 0 = success, was able to issue command. +*/ +void +qla2x00_set_vend_direction(scsi_qla_host_t *ha, + struct scsi_cmnd *cmd, cmd_entry_t *pkt) +{ + dga_scdb_t *dsp = (dga_scdb_t *) cmd; + + if (cmd->data_cmnd[0] == UCSCSI_DCMD) { + switch( dsp->dsc_dcmd.mb_Command ) { + case DACMD_WRITE_CONF_ONDISK: + case DACMD_WRITE_CONFIG: + case DACMD_WRITE_CONF2: + case DACMD_WRITE_CONFLABEL: + case DACMD_WRITE_CONFIG_V3x: + case DACMD_ADD_CONFIG_V2x: + case DACMD_ADD_CONFIG_V3x: + case DACMD_STORE_IMAGE: + case DACMD_ADD_CAPACITY: + case DACMD_WRITE_IOPORT: + case DACMD_S2S_WRITEFULLCONF: + case DACMD_S2S_ADDFULLCONF: + case DACMD_S2S_WRITELUNMAP_OLD: + case DACMD_S2S_WRITELUNMAP: + case DACMD_S2S_WRITE_IOPORT: + case DACMD_WRITE_V3x: + case DACMD_S2S_WRITESIG: + pkt->control_flags |= BIT_6; + break; + default: + pkt->control_flags |= BIT_5; + } + } else + pkt->control_flags |= BIT_5; +} + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_version.h 999-mjb/drivers/scsi/qla2xxx/qla_version.h --- 000-virgin/drivers/scsi/qla2xxx/qla_version.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_version.h 2003-11-25 14:18:48.000000000 -0800 @@ -0,0 +1,27 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ +/* + * Driver version + */ +#define QLA2100_VERSION "8.00.00b6" + +#define QLA_DRIVER_MAJOR_VER 8 +#define QLA_DRIVER_MINOR_VER 0 +#define QLA_DRIVER_PATCH_VER 0 +#define QLA_DRIVER_BETA_VER 6 diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qla_xioct.c 999-mjb/drivers/scsi/qla2xxx/qla_xioct.c --- 000-virgin/drivers/scsi/qla2xxx/qla_xioct.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qla_xioct.c 2003-11-25 14:18:48.000000000 -0800 @@ -0,0 +1,6401 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + + +#include "qla_os.h" +#include "qla_def.h" + +#include "inioct.h" + +#define QLA_PT_CMD_TOV (60) /* firmware timeout */ +#define QLA_PT_CMD_DRV_TOV (QLA_PT_CMD_TOV + 1) /* drvr timeout */ +#define QLA_IOCTL_ACCESS_WAIT_TIME (QLA_PT_CMD_DRV_TOV + 2) /* wait_q tov */ +#define QLA_INITIAL_IOCTLMEM_SIZE (2 * PAGE_SIZE) +#define QLA_IOCTL_SCRAP_SIZE 2048 /* scrap memory for local use. */ + +/* ELS related defines */ +#define FC_HEADER_LEN 24 +#define ELS_RJT_LENGTH 0x08 /* 8 */ +#define ELS_RPS_ACC_LENGTH 0x40 /* 64 */ +#define ELS_RLS_ACC_LENGTH 0x1C /* 28 */ + +/* ELS cmd Reply Codes */ +#define ELS_STAT_LS_RJT 0x01 +#define ELS_STAT_LS_ACC 0x02 + +#define IOCTL_INVALID_STATUS 0xffff + + +int qla2x00_alloc_ioctl_mem(scsi_qla_host_t *); +void qla2x00_free_ioctl_mem(scsi_qla_host_t *); + +int qla2x00_get_ioctl_scrap_mem(scsi_qla_host_t *, void **, uint32_t); +void qla2x00_free_ioctl_scrap_mem(scsi_qla_host_t *); + +/* + * Local prototypes + */ +static int qla2x00_get_new_ioctl_dma_mem(scsi_qla_host_t *, uint32_t); + +static int qla2x00_find_curr_ha(uint16_t, scsi_qla_host_t **); + +static int qla2x00_get_driver_specifics(EXT_IOCTL *); + +static int qla2x00_aen_reg(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_aen_get(scsi_qla_host_t *, EXT_IOCTL *, int); + +static int qla2x00_query(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_query_hba_node(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_query_hba_port(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_query_disc_port(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_query_disc_tgt(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_query_chip(scsi_qla_host_t *, EXT_IOCTL *, int); + +static int qla2x00_get_data(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_get_statistics(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_get_fc_statistics(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_get_port_summary(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_get_fcport_summary(scsi_qla_host_t *, EXT_DEVICEDATAENTRY *, + void *, uint32_t, uint32_t *, uint32_t *); +#if 0 +static int qla2x00_std_missing_port_summary(scsi_qla_host_t *, + EXT_DEVICEDATAENTRY *, void *, uint32_t, uint32_t *, uint32_t *); +#endif + +static int qla2x00_query_driver(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_query_fw(scsi_qla_host_t *, EXT_IOCTL *, int); + +static int qla2x00_msiocb_passthru(scsi_qla_host_t *, EXT_IOCTL *, int, int); + +#if defined(ISP2300) +static int qla2x00_send_els_passthru(scsi_qla_host_t *, EXT_IOCTL *, + struct scsi_cmnd *, fc_port_t *, fc_lun_t *, int); +static int qla2x00_get_led_state(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_set_led_state(scsi_qla_host_t *, EXT_IOCTL *, int); +#endif +static int qla2x00_send_fcct(scsi_qla_host_t *, EXT_IOCTL *, + struct scsi_cmnd *, fc_port_t *, fc_lun_t *, int); +static int qla2x00_ioctl_ms_queuecommand(scsi_qla_host_t *, EXT_IOCTL *, + struct scsi_cmnd *, fc_port_t *, fc_lun_t *, EXT_ELS_PT_REQ *); + +static int qla2x00_start_ms_cmd(scsi_qla_host_t *, EXT_IOCTL *, srb_t *, + EXT_ELS_PT_REQ *); + +static int qla2x00_wwpn_to_scsiaddr(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_scsi_passthru(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_sc_scsi_passthru(scsi_qla_host_t *, EXT_IOCTL *, + struct scsi_cmnd *, struct scsi_device *, int); +static int qla2x00_sc_fc_scsi_passthru(scsi_qla_host_t *, EXT_IOCTL *, + struct scsi_cmnd *, struct scsi_device *, int); +static int qla2x00_sc_scsi3_passthru(scsi_qla_host_t *, EXT_IOCTL *, + struct scsi_cmnd *, struct scsi_device *, int); +static int qla2x00_ioctl_scsi_queuecommand(scsi_qla_host_t *, EXT_IOCTL *, + struct scsi_cmnd *, struct scsi_device *, fc_port_t *, fc_lun_t *); + +static int qla2x00_send_els_rnid(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_get_rnid_params(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_set_host_data(scsi_qla_host_t *, EXT_IOCTL *, int); +static int qla2x00_set_rnid_params(scsi_qla_host_t *, EXT_IOCTL *, int); + +static void qla2x00_waitq_sem_timeout(unsigned long); +static int qla2x00_get_ioctl_access(scsi_qla_host_t *, uint32_t); +static int qla2x00_release_ioctl_access(scsi_qla_host_t *); + +static void qla2x00_wait_q_memb_alloc(scsi_qla_host_t *, wait_q_t **); +static void qla2x00_wait_q_memb_free(scsi_qla_host_t *, wait_q_t *); +static int qla2x00_wait_q_add(scsi_qla_host_t *, wait_q_t **); +static void qla2x00_wait_q_get_next(scsi_qla_host_t *, wait_q_t **); +static void qla2x00_wait_q_remove(scsi_qla_host_t *, wait_q_t *); + +/* + * qla2x00_ioctl_sleep_done + * + * Description: + * This is the callback function to wakeup ioctl completion semaphore + * for the ioctl request that is waiting. + * + * Input: + * sem - pointer to the ioctl completion semaphore. + * + * Returns: + */ +static void +qla2x00_ioctl_sleep_done(struct semaphore * sem) +{ + DEBUG9(printk("%s: entered.\n", __func__);) + + if (sem != NULL){ + DEBUG9(printk("ioctl_sleep: wake up sem.\n");) + up(sem); + } + + DEBUG9(printk("%s: exiting.\n", __func__);) +} + +/* + * qla2x00_ioctl_sem_init + * + * Description: + * Initialize the ioctl timer and semaphore used to wait for passthru + * completion. + * + * Input: + * ha - pointer to scsi_qla_host_t structure used for initialization. + * + * Returns: + * None. + */ +static void +qla2x00_ioctl_sem_init(scsi_qla_host_t *ha) +{ + init_MUTEX_LOCKED(&ha->ioctl->cmpl_sem); + init_timer(&(ha->ioctl->cmpl_timer)); + ha->ioctl->cmpl_timer.data = (unsigned long)&ha->ioctl->cmpl_sem; + ha->ioctl->cmpl_timer.function = + (void (*)(unsigned long))qla2x00_ioctl_sleep_done; +} + +/* + * qla2x00_scsi_pt_done + * + * Description: + * Resets ioctl progress flag and wakes up the ioctl completion semaphore. + * + * Input: + * pscsi_cmd - pointer to the passthru Scsi cmd structure which has completed. + * + * Returns: + */ +static void +qla2x00_scsi_pt_done(struct scsi_cmnd *pscsi_cmd) +{ + struct Scsi_Host *host; + scsi_qla_host_t *ha; + + host = pscsi_cmd->device->host; + ha = (scsi_qla_host_t *) host->hostdata; + + DEBUG9(printk("%s post function called OK\n", __func__);) + + /* save detail status for IOCTL reporting */ + ha->ioctl->SCSIPT_InProgress = 0; + ha->ioctl->ioctl_tov = 0; + + up(&ha->ioctl->cmpl_sem); + + DEBUG9(printk("%s: exiting.\n", __func__);) + + return; +} + +/* + * qla2x00_msiocb_done + * + * Description: + * Resets MSIOCB ioctl progress flag and wakes up the ioctl completion + * semaphore. + * + * Input: + * cmd - pointer to the passthru Scsi cmd structure which has completed. + * + * Returns: + */ +static void +qla2x00_msiocb_done(struct scsi_cmnd *pscsi_cmd) +{ + struct Scsi_Host *host; + scsi_qla_host_t *ha; + + host = pscsi_cmd->device->host; + ha = (scsi_qla_host_t *) host->hostdata; + + DEBUG9(printk("%s post function called OK\n", __func__);) + + ha->ioctl->MSIOCB_InProgress = 0; + ha->ioctl->ioctl_tov = 0; + + up(&ha->ioctl->cmpl_sem); + + DEBUG9(printk("%s: exiting.\n", __func__);) + + return; +} + +/************************************************************************* + * qla2x00_ioctl + * + * Description: + * Performs additional ioctl requests not satisfied by the upper levels. + * + * Returns: + * ret = 0 Success + * ret != 0 Failed; detailed status copied to EXT_IOCTL structure + * if possible + *************************************************************************/ +int +qla2x00_ioctl(struct scsi_device *dev, int cmd, void *arg) +{ + int mode = 0; + int tmp_rval = 0; + int ret = -EINVAL; + + uint8_t *temp; + uint8_t tempbuf[8]; + uint32_t i; + uint32_t status; + + EXT_IOCTL *pext; + + scsi_qla_host_t *ha; + + + DEBUG9(printk("%s: entry to command (%x), arg (%p)\n", + __func__, cmd, arg);) + + /* Catch any non-exioct ioctls */ + if (_IOC_TYPE(cmd) != QLMULTIPATH_MAGIC) { + return (ret); + } + + ret = verify_area(VERIFY_READ, (void *)arg, sizeof(EXT_IOCTL)); + if (ret) { + DEBUG9_10(printk("%s: ERROR VERIFY_READ EXT_IOCTL " + "sturct. cmd=%x arg=%p.\n", __func__, cmd, arg);) + return (ret); + } + + /* Allocate ioctl structure buffer to support multiple concurrent + * entries. + */ + pext = KMEM_ZALLOC(sizeof(EXT_IOCTL), 16); + if (pext == NULL) { + /* error */ + printk(KERN_WARNING + "qla2x00: ERROR in main ioctl buffer allocation.\n"); + return (-ENOMEM); + } + + /* copy in application layer EXT_IOCTL */ + ret = copy_from_user(pext, arg, sizeof(EXT_IOCTL)); + if (ret) { + DEBUG9_10(printk("%s: ERROR COPY_FROM_USER " + "EXT_IOCTL sturct. cmd=%x arg=%p.\n", + __func__, cmd, arg);) + + KMEM_FREE(pext, sizeof(EXT_IOCTL)); + return (ret); + } + + /* Verify before update status fields in EXT_IOCTL struct. */ + ret = verify_area(VERIFY_WRITE, (void *)arg, sizeof(EXT_IOCTL)); + if (ret) { + DEBUG9_10(printk("%s: ERROR VERIFY_WRITE EXT_IOCTL " + "sturct. cmd=%x arg=%p.\n", __func__, cmd, arg);) + + KMEM_FREE(pext, sizeof(EXT_IOCTL)); + return (ret); + } + + /* check signature of this ioctl */ + temp = (uint8_t *) &pext->Signature; + + for (i = 0; i < 4; i++, temp++) + tempbuf[i] = *temp; + + if ((tempbuf[0] == 'Q') && (tempbuf[1] == 'L') && + (tempbuf[2] == 'O') && (tempbuf[3] == 'G')) + status = 0; + else + status = 1; + + if (status != 0) { + DEBUG9_10(printk("%s: signature did not match. " + "cmd=%x arg=%p.\n", __func__, cmd, arg);) + pext->Status = EXT_STATUS_INVALID_PARAM; + copy_to_user((void *)arg, (void *)pext, sizeof(EXT_IOCTL)); + + KMEM_FREE(pext, sizeof(EXT_IOCTL)); + return (-EINVAL); + } + + /* check version of this ioctl */ + if (pext->Version > EXT_VERSION) { + printk(KERN_WARNING + "qla2x00: ioctl interface version not supported = %d.\n", + pext->Version); + pext->Status = EXT_STATUS_UNSUPPORTED_VERSION; + copy_to_user((void *)arg, (void *)pext, sizeof(EXT_IOCTL)); + + KMEM_FREE(pext, sizeof(EXT_IOCTL)); + return (-EINVAL); + } + + /* check for special cmds used during application's setup time. */ + switch (cmd) { + case EXT_CC_STARTIOCTL: + DEBUG9(printk("%s: got startioctl command.\n", __func__);) + + pext->Instance = num_hosts; + pext->Status = EXT_STATUS_OK; + ret = copy_to_user((void *)arg, (void *)pext, + sizeof(EXT_IOCTL)); + + KMEM_FREE(pext, sizeof(EXT_IOCTL)); + return (ret); + + case EXT_CC_SETINSTANCE: + /* This call is used to return the HBA's host number to + * ioctl caller. All subsequent ioctl commands will put + * the host number in HbaSelect field to tell us which + * HBA is the destination. + */ + if (pext->Instance < num_hosts) { + if (!((ulong)pext->VendorSpecificData & + EXT_DEF_USE_HBASELECT)) { + DEBUG9(printk( + "%s: got setinstance cmd w/o HbaSelect.\n", + __func__);) + /* Backward compatible code. */ + apiHBAInstance = pext->Instance; + } + + /* + * Return host number via pext->HbaSelect for + * specified API instance number. + */ + if (qla2x00_find_curr_ha(pext->Instance, &ha) != 0) { + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + ret = copy_to_user(arg, pext, sizeof(EXT_IOCTL)); + DEBUG9_10(printk("%s: SETINSTANCE invalid inst " + "%d. num_hosts=%d ha=%p ret=%d.\n", + __func__, pext->Instance, num_hosts, ha, + ret);) + + KMEM_FREE(pext, sizeof(EXT_IOCTL)); + return (ret); /* ioctl completed ok */ + } + + pext->HbaSelect = ha->host_no; + pext->Status = EXT_STATUS_OK; + + DEBUG9(printk("%s: Matching instance %d to hba " + "%ld.\n", __func__, pext->Instance, ha->host_no);) + } else { + DEBUG9_10(printk("%s: ERROR EXT_SETINSTANCE." + " Instance=%d num_hosts=%d ha=%p.\n", + __func__, pext->Instance, num_hosts, ha);) + + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + } + ret = copy_to_user(arg, pext, sizeof(EXT_IOCTL)); + KMEM_FREE(pext, sizeof(EXT_IOCTL)); + + DEBUG9(printk("%s: SETINSTANCE exiting. ret=%d.\n", + __func__, ret);) + + return (ret); + + case EXT_CC_DRIVER_SPECIFIC: + ret = qla2x00_get_driver_specifics(pext); + tmp_rval = copy_to_user(arg, (void *)pext, sizeof(EXT_IOCTL)); + + if (ret == 0) + ret = tmp_rval; + + KMEM_FREE(pext, sizeof(EXT_IOCTL)); + return (ret); + + default: + break; + } + + if (!((ulong)pext->VendorSpecificData & EXT_DEF_USE_HBASELECT)) { + /* Backward compatible code. */ + /* Will phase out soon. */ + + /* Check for valid apiHBAInstance (set previously by + * EXT_SETINSTANCE or default 0) and set ha context + * for this IOCTL. + */ + DEBUG9(printk("%s: not using HbaSelect. apiHBAInstance=%d.\n", + __func__, apiHBAInstance);) + if (qla2x00_find_curr_ha(apiHBAInstance, &ha) != 0) { + + DEBUG9_10(printk("%s: ERROR matching apiHBAInstance " + "%d to an HBA Instance.\n", + __func__, apiHBAInstance);) + + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + copy_to_user(arg, pext, sizeof(EXT_IOCTL)); + + KMEM_FREE(pext, sizeof(EXT_IOCTL)); + return (-EINVAL); + } + + DEBUG9(printk("%s: active apiHBAInstance=%d host_no=%ld " + "CC=%x SC=%x.\n", + __func__, apiHBAInstance, ha->host_no, cmd, pext->SubCode);) + + } else { + /* Use HbaSelect value to get a matching ha instance + * for this ioctl command. + */ + if (qla2x00_find_curr_ha(pext->HbaSelect, &ha) != 0) { + + DEBUG9_10(printk("%s: ERROR matching pext->HbaSelect " + "%d to an HBA Instance.\n", + __func__, pext->HbaSelect);) + + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + copy_to_user(arg, pext, sizeof(EXT_IOCTL)); + + KMEM_FREE(pext, sizeof(EXT_IOCTL)); + return (-EINVAL); + } + + DEBUG9(printk("%s: active host_inst=%ld CC=%x SC=%x.\n", + __func__, ha->instance, cmd, pext->SubCode);) + } + + /* + * Get permission to process ioctl command. Only one will proceed + * at a time. + */ + if (qla2x00_get_ioctl_access(ha, QLA_IOCTL_ACCESS_WAIT_TIME) != 0) { + /* error timed out */ + DEBUG9_10(printk("%s: ERROR timeout getting ioctl " + "access. host no=%d.\n", __func__, pext->HbaSelect);) + + pext->Status = EXT_STATUS_BUSY; + copy_to_user(arg, pext, sizeof(EXT_IOCTL)); + + KMEM_FREE(pext, sizeof(EXT_IOCTL)); + return (-EBUSY); + } + + + while (test_bit(CFG_ACTIVE, &ha->cfg_flags) || ha->dpc_active) { + if( signal_pending(current) ) + break; /* get out */ + + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ); + } + + switch (cmd) { /* switch on EXT IOCTL COMMAND CODE */ + + case EXT_CC_QUERY: + DEBUG9(printk("%s: got query command.\n", __func__);) + + ret = qla2x00_query(ha, pext, 0); + + break; + + case EXT_CC_GET_DATA: + DEBUG9(printk("%s: got get_data command.\n", __func__);) + + ret = qla2x00_get_data(ha, pext, 0); + + break; + + case EXT_CC_SEND_SCSI_PASSTHRU: + DEBUG9(printk("%s: got SCSI passthru cmd.\n", __func__)); + + ret = qla2x00_scsi_passthru(ha, pext, mode); + + break; + + case EXT_CC_REG_AEN: + ret = qla2x00_aen_reg(ha, pext, mode); + + break; + + case EXT_CC_GET_AEN: + ret = qla2x00_aen_get(ha, pext, mode); + + break; + + case EXT_CC_WWPN_TO_SCSIADDR: + ret = qla2x00_wwpn_to_scsiaddr(ha, pext, 0); + break; + + case EXT_CC_SEND_ELS_RNID: + DEBUG9(printk("%s: got ELS RNID cmd.\n", __func__)); + + ret = qla2x00_send_els_rnid(ha, pext, mode); + break; + + case EXT_CC_SET_DATA: + ret = qla2x00_set_host_data(ha, pext, mode); + break; + + case INT_CC_READ_NVRAM: + ret = qla2x00_read_nvram(ha, pext, mode); + + break; + + case INT_CC_UPDATE_NVRAM: + ret = qla2x00_update_nvram(ha, pext, mode); + + break; + + case INT_CC_LOOPBACK: + ret = qla2x00_send_loopback(ha, pext, mode); + + break; + + case INT_CC_READ_OPTION_ROM: + ret = qla2x00_read_option_rom(ha, pext, mode); + + break; + + case INT_CC_UPDATE_OPTION_ROM: + ret = qla2x00_update_option_rom(ha, pext, mode); + + break; + + case EXT_CC_SEND_FCCT_PASSTHRU: + +#if defined(ISP2300) + case EXT_CC_SEND_ELS_PASSTHRU: +#endif + ret = qla2x00_msiocb_passthru(ha, pext, cmd, mode); + + break; + + /* all others go here */ + /* + case EXT_CC_PLATFORM_REG: + break; + */ + + /* Failover IOCTLs */ + case FO_CC_GET_PARAMS: + case FO_CC_SET_PARAMS: + case FO_CC_GET_PATHS: + case FO_CC_SET_CURRENT_PATH: + case FO_CC_RESET_HBA_STAT: + case FO_CC_GET_HBA_STAT: + case FO_CC_GET_LUN_DATA: + case FO_CC_SET_LUN_DATA: + case FO_CC_GET_TARGET_DATA: + case FO_CC_SET_TARGET_DATA: + DEBUG9(printk("%s: failover arg (%p):\n", __func__, arg);) + + qla2x00_fo_ioctl(ha, cmd, pext, mode); + + break; + + default: + pext->Status = EXT_STATUS_INVALID_REQUEST; + break; + + } /* end of CC decode switch */ + + /* Always try to copy values back regardless what happened before. */ + tmp_rval = copy_to_user(arg, (void *)pext, sizeof(EXT_IOCTL)); + + if (ret == 0) + ret = tmp_rval; + + DEBUG9(printk("%s: exiting. tmp_rval(%d) ret(%d)\n", + __func__, tmp_rval, ret);) + + qla2x00_release_ioctl_access(ha); + + KMEM_FREE(pext, sizeof(EXT_IOCTL)); + + return (ret); +} + +/* + * qla2x00_alloc_ioctl_mem + * Allocates memory needed by IOCTL code. + * + * Input: + * ha = adapter state pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_alloc_ioctl_mem(scsi_qla_host_t *ha) +{ + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + if (qla2x00_get_new_ioctl_dma_mem(ha, QLA_INITIAL_IOCTLMEM_SIZE) != + QLA_SUCCESS) { + printk(KERN_WARNING + "qla2x00: ERROR in ioctl physical memory allocation\n"); + + return QLA_MEMORY_ALLOC_FAILED; + } + + /* Allocate context memory buffer */ + ha->ioctl = KMEM_ZALLOC(sizeof(hba_ioctl_context), 11); + if (ha->ioctl == NULL) { + /* error */ + printk(KERN_WARNING + "qla2x00: ERROR in ioctl context allocation.\n"); + return QLA_MEMORY_ALLOC_FAILED; + } + + /* Allocate AEN tracking buffer */ + ha->ioctl->aen_tracking_queue = + KMEM_ZALLOC(EXT_DEF_MAX_AEN_QUEUE * sizeof(EXT_ASYNC_EVENT), 12); + if (ha->ioctl->aen_tracking_queue == NULL) { + printk(KERN_WARNING + "qla2x00: ERROR in ioctl aen_queue allocation.\n"); + return QLA_MEMORY_ALLOC_FAILED; + } + + ha->ioctl->ioctl_tq = KMEM_ZALLOC(sizeof(os_tgt_t), 13); + if (ha->ioctl->ioctl_tq == NULL) { + printk(KERN_WARNING + "qla2x00: ERROR in ioctl tgt queue allocation.\n"); + return QLA_MEMORY_ALLOC_FAILED; + } + + ha->ioctl->ioctl_lq = KMEM_ZALLOC(sizeof(os_lun_t), 14); + if (ha->ioctl->ioctl_lq == NULL) { + printk(KERN_WARNING + "qla2x00: ERROR in ioctl lun queue allocation.\n"); + return QLA_MEMORY_ALLOC_FAILED; + } + /*INIT_LIST_HEAD(&(ha->ioctl->ioctl_lq->cmd));*/ + + /* Pick the largest size we'll need per ha of all ioctl cmds. + * Use this size when freeing. + */ + ha->ioctl->scrap_mem = KMEM_ZALLOC(QLA_IOCTL_SCRAP_SIZE, 15); + if (ha->ioctl->scrap_mem == NULL) { + printk(KERN_WARNING + "qla2x00: ERROR in ioctl scrap_mem allocation.\n"); + return QLA_MEMORY_ALLOC_FAILED; + } + ha->ioctl->scrap_mem_size = QLA_IOCTL_SCRAP_SIZE; + ha->ioctl->scrap_mem_used = 0; + DEBUG9(printk("%s(%ld): scrap_mem_size=%d.\n", + __func__, ha->host_no, ha->ioctl->scrap_mem_size);) + + ha->ioctl->ioctl_lq->q_state = LUN_STATE_READY; + ha->ioctl->ioctl_lq->q_lock = SPIN_LOCK_UNLOCKED; + + /* Init wait_q fields */ + ha->ioctl->wait_q_lock = SPIN_LOCK_UNLOCKED; + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return QLA_SUCCESS; +} + +/* + * qla2x00_get_new_ioctl_dma_mem + * Allocates dma memory of the specified size. + * This is done to replace any previously allocated ioctl dma buffer. + * + * Input: + * ha = adapter state pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +static int +qla2x00_get_new_ioctl_dma_mem(scsi_qla_host_t *ha, uint32_t size) +{ + DEBUG9(printk("%s entered.\n", __func__);) + + if (ha->ioctl_mem) { + DEBUG9(printk("%s: ioctl_mem was previously allocated. " + "Dealloc old buffer.\n", __func__);) + + /* free the memory first */ + pci_free_consistent(ha->pdev, ha->ioctl_mem_size, ha->ioctl_mem, + ha->ioctl_mem_phys); + } + + /* Get consistent memory allocated for ioctl I/O operations. */ + ha->ioctl_mem = pci_alloc_consistent(ha->pdev, + size, &ha->ioctl_mem_phys); + + if (ha->ioctl_mem == NULL) { + printk(KERN_WARNING + "%s: ERROR in ioctl physical memory allocation. " + "Requested length=%x.\n", __func__, size); + + ha->ioctl_mem_size = 0; + return QLA_MEMORY_ALLOC_FAILED; + } + ha->ioctl_mem_size = size; + + DEBUG9(printk("%s exiting.\n", __func__);) + + return QLA_SUCCESS; +} + +/* + * qla2x00_free_ioctl_mem + * Frees memory used by IOCTL code for the specified ha. + * + * Input: + * ha = adapter state pointer. + * + * Context: + * Kernel context. + */ +void +qla2x00_free_ioctl_mem(scsi_qla_host_t *ha) +{ + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + if (ha->ioctl != NULL) { + + if (ha->ioctl->scrap_mem != NULL) { + /* The size here must match up to what we + * allocated before. + */ + KMEM_FREE(ha->ioctl->scrap_mem, + ha->ioctl->scrap_mem_size); + ha->ioctl->scrap_mem = NULL; + ha->ioctl->scrap_mem_size = 0; + } + + if (ha->ioctl->ioctl_tq != NULL) { + KMEM_FREE(ha->ioctl->ioctl_tq, sizeof(os_tgt_t)); + ha->ioctl->ioctl_tq = NULL; + } + + if (ha->ioctl->ioctl_lq != NULL) { + KMEM_FREE(ha->ioctl->ioctl_lq, sizeof(os_lun_t)); + ha->ioctl->ioctl_lq = NULL; + } + + if (ha->ioctl->aen_tracking_queue != NULL) { + KMEM_FREE(ha->ioctl->aen_tracking_queue, + EXT_DEF_MAX_AEN_QUEUE * sizeof(EXT_ASYNC_EVENT)); + ha->ioctl->aen_tracking_queue = NULL; + } + + KMEM_FREE(ha->ioctl, sizeof(hba_ioctl_context)); + ha->ioctl = NULL; + } + + /* free memory allocated for ioctl operations */ + pci_free_consistent(ha->pdev, ha->ioctl_mem_size, ha->ioctl_mem, + ha->ioctl_mem_phys); + ha->ioctl_mem = NULL; + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + +} + +/* + * qla2x00_get_ioctl_scrap_mem + * Returns pointer to memory of the specified size from the scrap buffer. + * This can be called multiple times before the free call as long + * as the memory is to be used by the same ioctl command and + * there's still memory left in the scrap buffer. + * + * Input: + * ha = adapter state pointer. + * ppmem = pointer to return a buffer pointer. + * size = size of buffer to return. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +int +qla2x00_get_ioctl_scrap_mem(scsi_qla_host_t *ha, void **ppmem, uint32_t size) +{ + int ret = QLA_SUCCESS; + uint32_t free_mem; + + DEBUG9(printk("%s(%ld): inst=%ld entered. size=%d.\n", + __func__, ha->host_no, ha->instance, size);) + + free_mem = ha->ioctl->scrap_mem_size - ha->ioctl->scrap_mem_used; + if (free_mem >= size) { + *ppmem = ha->ioctl->scrap_mem + ha->ioctl->scrap_mem_used; + ha->ioctl->scrap_mem_used += size; + } else { + DEBUG10(printk("%s(%ld): no more scrap memory.\n", + __func__, ha->host_no);) + + ret = QLA_FUNCTION_FAILED; + } + + DEBUG9(printk("%s(%ld): exiting. ret=%d.\n", + __func__, ha->host_no, ret);) + + return (ret); +} + +/* + * qla2x00_free_ioctl_scrap_mem + * Makes the entire scrap buffer free for use. + * + * Input: + * ha = adapter state pointer. + * + * Returns: + * qla2x00 local function return status code. + * + */ +void +qla2x00_free_ioctl_scrap_mem(scsi_qla_host_t *ha) +{ + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + memset(ha->ioctl->scrap_mem, 0, ha->ioctl->scrap_mem_size); + ha->ioctl->scrap_mem_used = 0; + + DEBUG9(printk("%s(%ld): exiting.\n", + __func__, ha->host_no);) +} + +/* + * qla2x00_find_curr_ha + * Searches and returns the pointer to the adapter host_no specified. + * + * Input: + * host_inst = driver internal adapter instance number to search. + * ha = adapter state pointer of the instance requested. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +static int +qla2x00_find_curr_ha(uint16_t host_inst, scsi_qla_host_t **ret_ha) +{ + int rval = QLA_SUCCESS; + int found; + struct list_head *hal; + scsi_qla_host_t *search_ha = NULL; + + /* + * Set ha context for this IOCTL by matching host_no. + */ + found = 0; + read_lock(&qla_hostlist_lock); + list_for_each(hal, &qla_hostlist) { + search_ha = list_entry(hal, scsi_qla_host_t, list); + + if (search_ha->instance == host_inst) { + found++; + break; + } + } + read_unlock(&qla_hostlist_lock); + + if (!found) { + DEBUG10(printk("%s: ERROR matching host_inst " + "%d to an HBA Instance.\n", __func__, host_inst);) + rval = QLA_FUNCTION_FAILED; + } else { + DEBUG9(printk("%s: found matching host_inst " + "%d to an HBA Instance.\n", __func__, host_inst);) + *ret_ha = search_ha; + } + + return rval; +} + +/* + * qla2x00_get_driver_specifics + * Returns driver specific data in the response buffer. + * + * Input: + * pext = pointer to EXT_IOCTL structure containing values from user. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_get_driver_specifics(EXT_IOCTL *pext) +{ + int ret = 0; + EXT_LN_DRIVER_DATA data; + + DEBUG9(printk("%s: entered.\n", + __func__);) + + if (pext->ResponseLen < sizeof(EXT_LN_DRIVER_DATA)) { + pext->Status = EXT_STATUS_BUFFER_TOO_SMALL; + DEBUG9_10(printk("%s: ERROR ResponseLen too small.\n", + __func__);) + + return (ret); + } + + data.DrvVer.Major = QLA_DRIVER_MAJOR_VER; + data.DrvVer.Minor = QLA_DRIVER_MINOR_VER; + data.DrvVer.Patch = QLA_DRIVER_PATCH_VER; + data.DrvVer.Beta = QLA_DRIVER_BETA_VER; + + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr, + sizeof(EXT_LN_DRIVER_DATA)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s: ERROR verify write resp buf\n", + __func__);) + + return (ret); + } + + ret = copy_to_user(pext->ResponseAdr, &data, sizeof(EXT_LN_DRIVER_DATA)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s: ERROR copy resp buf\n", + __func__);) + } + + DEBUG9(printk("%s: exiting. ret=%d.\n", + __func__, ret);) + + return (ret); +} + +/* + * qla2x00_aen_reg + * IOCTL management server Asynchronous Event Tracking Enable/Disable. + * + * Input: + * ha = pointer to the adapter struct of the adapter to register. + * cmd = pointer to EXT_IOCTL structure containing values from user. + * mode = flags. not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_aen_reg(scsi_qla_host_t *ha, EXT_IOCTL *cmd, int mode) +{ + int rval = 0; + EXT_REG_AEN reg_struct; + + DEBUG9(printk("%s(%ld): inst %ld entered.\n", + __func__, ha->host_no, ha->instance);) + + rval = verify_area(VERIFY_READ, (void *)cmd->RequestAdr, + sizeof(EXT_REG_AEN)); + if (rval) { + cmd->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst %ld ERROR verify read req buf\n", + __func__, ha->host_no, ha->instance);) + + return (rval); + } + + rval = copy_from_user(®_struct, cmd->RequestAdr, sizeof(EXT_REG_AEN)); + if (rval == 0) { + cmd->Status = EXT_STATUS_OK; + if (reg_struct.Enable) { + ha->ioctl->flags |= IOCTL_AEN_TRACKING_ENABLE; + } else { + ha->ioctl->flags &= ~IOCTL_AEN_TRACKING_ENABLE; + } + } else { + cmd->Status = EXT_STATUS_COPY_ERR; + } + + DEBUG9(printk("%s(%ld): inst %ld reg_struct.Enable(%d) " + "ha->ioctl_flag(%x) cmd->Status(%d).", + __func__, ha->host_no, ha->instance, reg_struct.Enable, + ha->ioctl->flags, cmd->Status);) + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (rval); +} + +/* + * qla2x00_aen_get + * Asynchronous Event Record Transfer to user. + * The entire queue will be emptied and transferred back. + * + * Input: + * ha = pointer to the adapter struct of the specified adapter. + * pext = pointer to EXT_IOCTL structure containing values from user. + * mode = flags. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + * + * NOTE: Need to use hardware lock to protect the queues from updates + * via isr/enqueue_aen after we get rid of io_request_lock. + */ +static int +qla2x00_aen_get(scsi_qla_host_t *ha, EXT_IOCTL *cmd, int mode) +{ + int rval = 0; + EXT_ASYNC_EVENT *tmp_q; + EXT_ASYNC_EVENT *paen; + uint8_t i; + uint8_t queue_cnt; + uint8_t request_cnt; + uint32_t stat = EXT_STATUS_OK; + uint32_t ret_len = 0; + unsigned long cpu_flags = 0; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + request_cnt = (uint8_t)(cmd->ResponseLen / sizeof(EXT_ASYNC_EVENT)); + + if (request_cnt < EXT_DEF_MAX_AEN_QUEUE) { + /* We require caller to alloc for the maximum request count */ + cmd->Status = EXT_STATUS_BUFFER_TOO_SMALL; + DEBUG9_10(printk("%s(%ld): inst=%ld Buffer too small. " + "Exiting normally.", + __func__, ha->host_no, ha->instance);) + + return (rval); + } + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&paen, + sizeof(EXT_ASYNC_EVENT) * EXT_DEF_MAX_AEN_QUEUE)) { + /* not enough memory */ + cmd->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(EXT_ASYNC_EVENT)*EXT_DEF_MAX_AEN_QUEUE);) + return (rval); + } + + /* 1st: Make a local copy of the entire queue content. */ + tmp_q = (EXT_ASYNC_EVENT *)ha->ioctl->aen_tracking_queue; + queue_cnt = 0; + + spin_lock_irqsave(&ha->hardware_lock, cpu_flags); + i = ha->ioctl->aen_q_head; + + for (; queue_cnt < EXT_DEF_MAX_AEN_QUEUE;) { + if (tmp_q[i].AsyncEventCode != 0) { + memcpy(&paen[queue_cnt], &tmp_q[i], + sizeof(EXT_ASYNC_EVENT)); + queue_cnt++; + tmp_q[i].AsyncEventCode = 0; /* empty out the slot */ + } + + if (i == ha->ioctl->aen_q_tail) { + /* done. */ + break; + } + + i++; + + if (i == EXT_DEF_MAX_AEN_QUEUE) { + i = 0; + } + } + + /* Empty the queue. */ + ha->ioctl->aen_q_head = 0; + ha->ioctl->aen_q_tail = 0; + + spin_unlock_irqrestore(&ha->hardware_lock, cpu_flags); + + /* 2nd: Now transfer the queue content to user buffer */ + /* Copy the entire queue to user's buffer. */ + ret_len = (uint32_t)(queue_cnt * sizeof(EXT_ASYNC_EVENT)); + if (queue_cnt != 0) { + rval = verify_area(VERIFY_WRITE, (void *)cmd->ResponseAdr, + ret_len); + if (rval != 0) { + cmd->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk( + "%s(%ld): inst=%ld ERROR verify write resp buf.\n", + __func__, ha->host_no, ha->instance);) + + qla2x00_free_ioctl_scrap_mem(ha); + return (rval); + } + + rval = copy_to_user(cmd->ResponseAdr, paen, ret_len); + } + cmd->ResponseLen = ret_len; + + if (rval != 0) { + stat = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld FAILED. error = %d\n", + __func__, ha->host_no, ha->instance, stat);) + } else { + stat = EXT_STATUS_OK; + } + + cmd->Status = stat; + qla2x00_free_ioctl_scrap_mem(ha); + + DEBUG9(printk("%s(%ld): inst=%ld exiting. rval=%d.\n", + __func__, ha->host_no, ha->instance, rval);) + + return (rval); +} + +/* + * qla2x00_enqueue_aen + * + * Input: + * ha = adapter state pointer. + * event_code = async event code of the event to add to queue. + * payload = event payload for the queue. + * + * Context: + * Interrupt context. + * NOTE: Need to hold the hardware lock to protect the queues from + * aen_get after we get rid of the io_request_lock. + */ +void +qla2x00_enqueue_aen(scsi_qla_host_t *ha, uint16_t event_code, void *payload) +{ + uint8_t new_entry; /* index to current entry */ + uint16_t *mbx; + EXT_ASYNC_EVENT *aen_queue; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + aen_queue = (EXT_ASYNC_EVENT *)ha->ioctl->aen_tracking_queue; + if (aen_queue[ha->ioctl->aen_q_tail].AsyncEventCode != 0) { + /* Need to change queue pointers to make room. */ + + /* Increment tail for adding new entry. */ + ha->ioctl->aen_q_tail++; + if (ha->ioctl->aen_q_tail == EXT_DEF_MAX_AEN_QUEUE) { + ha->ioctl->aen_q_tail = 0; + } + + if (ha->ioctl->aen_q_head == ha->ioctl->aen_q_tail) { + /* + * We're overwriting the oldest entry, so need to + * update the head pointer. + */ + ha->ioctl->aen_q_head++; + if (ha->ioctl->aen_q_head == EXT_DEF_MAX_AEN_QUEUE) { + ha->ioctl->aen_q_head = 0; + } + } + } + + DEBUG(printk("%s(%ld): inst=%ld Adding code 0x%x to aen_q %p @ %d\n", + __func__, ha->host_no, ha->instance, event_code, aen_queue, + ha->ioctl->aen_q_tail);) + + new_entry = ha->ioctl->aen_q_tail; + aen_queue[new_entry].AsyncEventCode = event_code; + + /* Update payload */ + switch (event_code) { + case MBA_LIP_OCCURRED: + case MBA_LOOP_UP: + case MBA_LOOP_DOWN: + case MBA_LIP_RESET: + case MBA_PORT_UPDATE: + /* empty */ + break; + + case MBA_RSCN_UPDATE: + mbx = (uint16_t *)payload; + aen_queue[new_entry].Payload.RSCN.AddrFormat = MSB(mbx[1]); + /* domain */ + aen_queue[new_entry].Payload.RSCN.RSCNInfo[0] = LSB(mbx[1]); + /* area */ + aen_queue[new_entry].Payload.RSCN.RSCNInfo[1] = MSB(mbx[2]); + /* al_pa */ + aen_queue[new_entry].Payload.RSCN.RSCNInfo[2] = LSB(mbx[2]); + + break; + + default: + /* Not supported */ + aen_queue[new_entry].AsyncEventCode = 0; + break; + } + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) +} + +/* + * qla2x00_query + * Handles all subcommands of the EXT_CC_QUERY command. + * + * Input: + * ha = adapter state pointer. + * pext = EXT_IOCTL structure pointer. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_query(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int rval = 0; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + /* All Query type ioctls are done here */ + switch(pext->SubCode) { + + case EXT_SC_QUERY_HBA_NODE: + /* fill in HBA NODE Information */ + rval = qla2x00_query_hba_node(ha, pext, mode); + break; + + case EXT_SC_QUERY_HBA_PORT: + /* return HBA PORT related info */ + rval = qla2x00_query_hba_port(ha, pext, mode); + break; + + case EXT_SC_QUERY_DISC_PORT: + /* return discovered port information */ + rval = qla2x00_query_disc_port(ha, pext, mode); + break; + + case EXT_SC_QUERY_DISC_TGT: + /* return discovered target information */ + rval = qla2x00_query_disc_tgt(ha, pext, mode); + break; + + case EXT_SC_QUERY_CHIP: + rval = qla2x00_query_chip(ha, pext, mode); + break; + + case EXT_SC_QUERY_DISC_LUN: + pext->Status = EXT_STATUS_UNSUPPORTED_SUBCODE; + break; + + default: + DEBUG9_10(printk("%s(%ld): inst=%ld unknown SubCode %d.\n", + __func__, ha->host_no, ha->instance, pext->SubCode);) + pext->Status = EXT_STATUS_UNSUPPORTED_SUBCODE; + break; + } + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + return rval; +} + +/* + * qla2x00_query_hba_node + * Handles EXT_SC_QUERY_HBA_NODE subcommand. + * + * Input: + * ha = adapter state pointer. + * pext = EXT_IOCTL structure pointer. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_query_hba_node(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int ret = 0; + uint32_t i, transfer_size; + EXT_HBA_NODE *ptmp_hba_node; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&ptmp_hba_node, + sizeof(EXT_HBA_NODE))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(EXT_HBA_NODE));) + return (ret); + } + + /* fill all available HBA NODE Information */ + for (i = 0; i < 8 ; i++) + ptmp_hba_node->WWNN[i] = ha->node_name[i]; + + sprintf((char *)(ptmp_hba_node->Manufacturer),"Qlogic Corp."); + sprintf((char *)(ptmp_hba_node->Model), ha->model_number); + + ptmp_hba_node->SerialNum[0] = ha->serial0; + ptmp_hba_node->SerialNum[1] = ha->serial1; + ptmp_hba_node->SerialNum[2] = ha->serial2; + sprintf((char *)(ptmp_hba_node->DriverVersion), qla2x00_version_str); + sprintf((char *)(ptmp_hba_node->FWVersion),"%2d.%02d.%02d", + ha->fw_major_version, + ha->fw_minor_version, + ha->fw_subminor_version); + + sprintf((char *)(ptmp_hba_node->OptRomVersion),"%d.%d", + ha->optrom_major, ha->optrom_minor); + + ptmp_hba_node->InterfaceType = EXT_DEF_FC_INTF_TYPE; + ptmp_hba_node->PortCount = 1; + + + ptmp_hba_node->DriverAttr = (ha->flags.failover_enabled) ? + DRVR_FO_ENABLED : 0; + + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr, + sizeof(EXT_HBA_NODE)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify wrt rsp buf\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + /* now copy up the HBA_NODE to user */ + if (pext->ResponseLen < sizeof(EXT_HBA_NODE)) + transfer_size = pext->ResponseLen; + else + transfer_size = sizeof(EXT_HBA_NODE); + + ret = copy_to_user((uint8_t *)pext->ResponseAdr, + (uint8_t *)ptmp_hba_node, transfer_size); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy rsp buffer.\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); +} + +/* + * qla2x00_query_hba_port + * Handles EXT_SC_QUERY_HBA_PORT subcommand. + * + * Input: + * ha = adapter state pointer. + * pext = EXT_IOCTL structure pointer. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_query_hba_port(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int ret = 0; + uint32_t tgt_cnt, tgt, transfer_size; + uint32_t port_cnt; + fc_port_t *fcport; + EXT_HBA_PORT *ptmp_hba_port; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&ptmp_hba_port, + sizeof(EXT_HBA_PORT))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(EXT_HBA_PORT));) + return (ret); + } + + /* reflect all HBA PORT related info */ + ptmp_hba_port->WWPN[7] = ha->init_cb->port_name[7]; + ptmp_hba_port->WWPN[6] = ha->init_cb->port_name[6]; + ptmp_hba_port->WWPN[5] = ha->init_cb->port_name[5]; + ptmp_hba_port->WWPN[4] = ha->init_cb->port_name[4]; + ptmp_hba_port->WWPN[3] = ha->init_cb->port_name[3]; + ptmp_hba_port->WWPN[2] = ha->init_cb->port_name[2]; + ptmp_hba_port->WWPN[1] = ha->init_cb->port_name[1]; + ptmp_hba_port->WWPN[0] = ha->init_cb->port_name[0]; + ptmp_hba_port->Id[0] = 0; + ptmp_hba_port->Id[1] = ha->d_id.r.d_id[2]; + ptmp_hba_port->Id[2] = ha->d_id.r.d_id[1]; + ptmp_hba_port->Id[3] = ha->d_id.r.d_id[0]; + ptmp_hba_port->Type = EXT_DEF_INITIATOR_DEV; + + switch (ha->current_topology) { + case ISP_CFG_NL: + case ISP_CFG_FL: + ptmp_hba_port->Mode = EXT_DEF_LOOP_MODE; + break; + + case ISP_CFG_N: + case ISP_CFG_F: + ptmp_hba_port->Mode = EXT_DEF_P2P_MODE; + break; + + default: + ptmp_hba_port->Mode = EXT_DEF_UNKNOWN_MODE; + break; + } + + port_cnt = 0; + list_for_each_entry(fcport, &ha->fcports, list) { + /* if removed or missing */ + if (atomic_read(&fcport->state) != FCS_ONLINE) { + DEBUG9_10(printk( + "%s(%ld): inst=%ld port " + "%02x%02x%02x%02x%02x%02x%02x%02x not online\n", + __func__, ha->host_no, ha->instance, + fcport->port_name[0], fcport->port_name[1], + fcport->port_name[2], fcport->port_name[3], + fcport->port_name[4], fcport->port_name[5], + fcport->port_name[6], fcport->port_name[7])); + continue; + } + port_cnt++; + } + + tgt_cnt = 0; + for (tgt = 0; tgt < MAX_TARGETS; tgt++) { + if (ha->otgt[tgt] == NULL) { + continue; + } + if (ha->otgt[tgt]->fcport == NULL) { + /* port doesn't exist */ + DEBUG9(printk("%s(%ld): tgt %d port not exist.\n", + __func__, ha->host_no, tgt);) + continue; + } + tgt_cnt++; + } + + DEBUG9_10(printk("%s(%ld): inst=%ld disc_port cnt=%d, tgt cnt=%d.\n", + __func__, ha->host_no, ha->instance, + port_cnt, tgt_cnt);) + ptmp_hba_port->DiscPortCount = port_cnt; + ptmp_hba_port->DiscTargetCount = tgt_cnt; + + if (ha->loop_state == LOOP_DOWN) { + ptmp_hba_port->State = EXT_DEF_HBA_LOOP_DOWN; + } else if (ha->loop_state != LOOP_READY || + test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || + test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || + test_bit(CFG_ACTIVE, &ha->cfg_flags)) { + + ptmp_hba_port->State = EXT_DEF_HBA_SUSPENDED; + } else { + ptmp_hba_port->State = EXT_DEF_HBA_OK; + } + + ptmp_hba_port->DiscPortNameType = EXT_DEF_USE_PORT_NAME; + + /* Return supported FC4 type depending on driver support. */ + ptmp_hba_port->PortSupportedFC4Types = EXT_DEF_FC4_TYPE_SCSI; + + ptmp_hba_port->PortActiveFC4Types = ha->active_fc4_types; + + /* Return supported speed depending on adapter type */ +#if defined(ISP2100) + + ptmp_hba_port->PortSupportedSpeed = EXT_DEF_PORTSPEED_1GBIT; +#elif defined(ISP2200) + + ptmp_hba_port->PortSupportedSpeed = EXT_DEF_PORTSPEED_1GBIT; +#elif defined(ISP2300) + + ptmp_hba_port->PortSupportedSpeed = EXT_DEF_PORTSPEED_2GBIT; +#else + /* invalid */ + ptmp_hba_port->PortSupportedSpeed = 0; +#endif + + ptmp_hba_port->PortSpeed = ha->current_speed; + + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr , + sizeof(EXT_HBA_PORT)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify wrt rsp buf\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + /* now copy up the HBA_PORT to user */ + if (pext->ResponseLen < sizeof(EXT_HBA_PORT)) + transfer_size = pext->ResponseLen; + else + transfer_size = sizeof(EXT_HBA_PORT); + + ret = copy_to_user((uint8_t *)pext->ResponseAdr, + (uint8_t *)ptmp_hba_port, transfer_size); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy rsp buffer.\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + qla2x00_free_ioctl_scrap_mem(ha); + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return ret; +} + +/* + * qla2x00_query_disc_port + * Handles EXT_SC_QUERY_DISC_PORT subcommand. + * + * Input: + * ha = adapter state pointer. + * pext = EXT_IOCTL structure pointer. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_query_disc_port(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int ret = 0; + int found; + uint32_t tgt, transfer_size, inst; + fc_port_t *fcport; + os_tgt_t *tq; + EXT_DISC_PORT *ptmp_disc_port; + + DEBUG9(printk("%s(%ld): inst=%ld entered. Port inst=%02d.\n", + __func__, ha->host_no, ha->instance, pext->Instance);) + + inst = 0; + found = 0; + fcport = NULL; + list_for_each_entry(fcport, &ha->fcports, list) { + if (atomic_read(&fcport->state) != FCS_ONLINE) { + /* port does not exist anymore */ + DEBUG9(printk("%s(%ld): fcport marked lost. " + "port=%02x%02x%02x%02x%02x%02x%02x%02x " + "loop_id=%02x not online.\n", + __func__, ha->host_no, + fcport->port_name[0], fcport->port_name[1], + fcport->port_name[2], fcport->port_name[3], + fcport->port_name[4], fcport->port_name[5], + fcport->port_name[6], fcport->port_name[7], + fcport->loop_id);) + continue; + } + + if (inst != pext->Instance) { + DEBUG9(printk("%s(%ld): found fcport %02d " + "d_id=%02x%02x%02x. Skipping.\n", + __func__, ha->host_no, inst, + fcport->d_id.b.domain, + fcport->d_id.b.area, + fcport->d_id.b.al_pa)); + + inst++; + continue; + } + + DEBUG9(printk("%s(%ld): inst=%ld found matching fcport %02d " + "online. d_id=%02x%02x%02x loop_id=%02x online.\n", + __func__, ha->host_no, ha->instance, inst, + fcport->d_id.b.domain, + fcport->d_id.b.area, + fcport->d_id.b.al_pa, + fcport->loop_id);) + + /* Found the matching port still connected. */ + found++; + break; + } + + if (!found) { + DEBUG9_10(printk("%s(%ld): inst=%ld dev not found.\n", + __func__, ha->host_no, ha->instance);) + + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + return (ret); + } + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&ptmp_disc_port, + sizeof(EXT_DISC_PORT))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(EXT_DISC_PORT));) + return (ret); + } + + memcpy(ptmp_disc_port->WWNN, fcport->node_name, WWN_SIZE); + memcpy(ptmp_disc_port->WWPN, fcport->port_name, WWN_SIZE); + + ptmp_disc_port->Id[0] = 0; + ptmp_disc_port->Id[1] = fcport->d_id.r.d_id[2]; + ptmp_disc_port->Id[2] = fcport->d_id.r.d_id[1]; + ptmp_disc_port->Id[3] = fcport->d_id.r.d_id[0]; + + /* Currently all devices on fcport list are target capable devices */ + /* This default value may need to be changed after we add non target + * devices also to this list. + */ + ptmp_disc_port->Type = EXT_DEF_TARGET_DEV; + + if (fcport->flags & FCF_FABRIC_DEVICE) { + ptmp_disc_port->Type |= EXT_DEF_FABRIC_DEV; + } + if (fcport->flags & FCF_TAPE_PRESENT) { + ptmp_disc_port->Type |= EXT_DEF_TAPE_DEV; + } + if (fcport->port_type == FCT_INITIATOR) { + ptmp_disc_port->Type |= EXT_DEF_INITIATOR_DEV; + } + + ptmp_disc_port->LoopID = fcport->loop_id; + ptmp_disc_port->Status = 0; + ptmp_disc_port->Bus = 0; + + for (tgt = 0; tgt < MAX_TARGETS; tgt++) { + if ((tq = ha->otgt[tgt]) == NULL) { + continue; + } + + if (tq->fcport == NULL) /* dg 08/14/01 */ + continue; + + if (memcmp(fcport->port_name, tq->fcport->port_name, + EXT_DEF_WWN_NAME_SIZE) == 0) { + ptmp_disc_port->TargetId = tgt; + break; + } + } + + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr , + sizeof(EXT_DISC_PORT)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify wrt rsp buf\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + /* now copy up the DISC_PORT to user */ + if (pext->ResponseLen < sizeof(EXT_DISC_PORT)) + transfer_size = pext->ResponseLen; + else + transfer_size = sizeof(EXT_DISC_PORT); + + ret = copy_to_user((uint8_t *)pext->ResponseAdr, + (uint8_t *)ptmp_disc_port, transfer_size); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy rsp buffer.\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + qla2x00_free_ioctl_scrap_mem(ha); + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} + +/* + * qla2x00_query_disc_tgt + * Handles EXT_SC_QUERY_DISC_TGT subcommand. + * + * Input: + * ha = adapter state pointer. + * pext = EXT_IOCTL structure pointer. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_query_disc_tgt(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int ret = 0; + uint32_t tgt, transfer_size, inst; + uint32_t cnt, i; + fc_port_t *tgt_fcport; + os_tgt_t *tq; + EXT_DISC_TARGET *ptmp_disc_target; + + DEBUG9(printk("%s(%ld): inst=%ld entered for tgt inst %d.\n", + __func__, ha->host_no, ha->instance, pext->Instance);) + + tq = NULL; + for (tgt = 0, inst = 0; tgt < MAX_TARGETS; tgt++) { + if (ha->otgt[tgt] == NULL) { + continue; + } + /* if wrong target id then skip to next entry */ + if (inst != pext->Instance) { + inst++; + continue; + } + tq = ha->otgt[tgt]; + break; + } + + if (tq == NULL || tgt == MAX_TARGETS) { + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + DEBUG9_10(printk("%s(%ld): inst=%ld target dev not found. " + "tq=%p, tgt=%d.\n", + __func__, ha->host_no, ha->instance, tq, tgt);) + return (ret); + } + + if (tq->fcport == NULL) { /* dg 08/14/01 */ + pext->Status = EXT_STATUS_BUSY; + DEBUG9_10(printk("%s(%ld): inst=%ld target %d port not found. " + "tq=%p.\n", + __func__, ha->host_no, ha->instance, tgt, tq);) + return (ret); + } + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&ptmp_disc_target, + sizeof(EXT_DISC_TARGET))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(EXT_DISC_TARGET));) + return (ret); + } + + tgt_fcport = tq->fcport; + memcpy(ptmp_disc_target->WWNN, tgt_fcport->node_name, WWN_SIZE); + memcpy(ptmp_disc_target->WWPN, tgt_fcport->port_name, WWN_SIZE); + + ptmp_disc_target->Id[0] = 0; + ptmp_disc_target->Id[1] = tgt_fcport->d_id.r.d_id[2]; + ptmp_disc_target->Id[2] = tgt_fcport->d_id.r.d_id[1]; + ptmp_disc_target->Id[3] = tgt_fcport->d_id.r.d_id[0]; + + /* All devices on ha->otgt list are target capable devices. */ + ptmp_disc_target->Type = EXT_DEF_TARGET_DEV; + + if (tgt_fcport->flags & FCF_FABRIC_DEVICE) { + ptmp_disc_target->Type |= EXT_DEF_FABRIC_DEV; + } + if (tgt_fcport->flags & FCF_TAPE_PRESENT) { + ptmp_disc_target->Type |= EXT_DEF_TAPE_DEV; + } + if (tgt_fcport->port_type & FCT_INITIATOR) { + ptmp_disc_target->Type |= EXT_DEF_INITIATOR_DEV; + } + + ptmp_disc_target->LoopID = tgt_fcport->loop_id; + ptmp_disc_target->Status = 0; + if (atomic_read(&tq->fcport->state) != FCS_ONLINE) { + ptmp_disc_target->Status |= EXT_DEF_TGTSTAT_OFFLINE; + } + if (qla2x00_is_fcport_in_config(ha, tq->fcport)) { + ptmp_disc_target->Status |= EXT_DEF_TGTSTAT_IN_CFG; + } + + ptmp_disc_target->Bus = 0; + ptmp_disc_target->TargetId = tgt; + + cnt = 0; + /* enumerate available LUNs under this TGT (if any) */ + if (ha->otgt[tgt] != NULL) { + for (i = 0; i < MAX_LUNS ; i++) { + if ((ha->otgt[tgt])->olun[i] !=0) + cnt++; + } + } + + ptmp_disc_target->LunCount = cnt; + + DEBUG9(printk("%s(%ld): copying data for tgt id %d. ", + __func__, ha->host_no, tgt);) + DEBUG9(printk("port=%p:%02x%02x%02x%02x%02x%02x%02x%02x. " + "lun cnt=%d.\n", + tgt_fcport, + tgt_fcport->port_name[0], + tgt_fcport->port_name[1], + tgt_fcport->port_name[2], + tgt_fcport->port_name[3], + tgt_fcport->port_name[4], + tgt_fcport->port_name[5], + tgt_fcport->port_name[6], + tgt_fcport->port_name[7], + cnt);) + + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr, + sizeof(EXT_DISC_TARGET)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify wrt rsp buf\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + /* now copy up the DISC_PORT to user */ + if (pext->ResponseLen < sizeof(EXT_DISC_PORT)) + transfer_size = pext->ResponseLen; + else + transfer_size = sizeof(EXT_DISC_TARGET); + + ret = copy_to_user((uint8_t *)pext->ResponseAdr, + (uint8_t *)ptmp_disc_target, transfer_size); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy rsp buffer.\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + qla2x00_free_ioctl_scrap_mem(ha); + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} + +/* + * qla2x00_query_chip + * Handles EXT_SC_QUERY_CHIP subcommand. + * + * Input: + * ha = adapter state pointer. + * pext = EXT_IOCTL structure pointer. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_query_chip(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int ret = 0; + uint32_t transfer_size, i; + EXT_CHIP *ptmp_isp; + struct Scsi_Host *host; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&ptmp_isp, + sizeof(EXT_CHIP))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(EXT_CHIP));) + return (ret); + } + + host = ha->host; + ptmp_isp->VendorId = ha->pdev->vendor; + ptmp_isp->DeviceId = ha->pdev->device; + ptmp_isp->SubVendorId = ha->pdev->subsystem_vendor; + ptmp_isp->SubSystemId = ha->pdev->subsystem_device; + ptmp_isp->PciBusNumber = ha->pdev->bus->number; + ptmp_isp->PciDevFunc = ha->pdev->devfn; + ptmp_isp->PciSlotNumber = PCI_SLOT(ha->pdev->devfn); + ptmp_isp->IoAddr = (UINT32)ha->pio_address; + ptmp_isp->IoAddrLen = (UINT32)ha->pio_length; + ptmp_isp->MemAddr = (UINT32)ha->mmio_address; + ptmp_isp->MemAddrLen = (UINT32)ha->mmio_length; + ptmp_isp->ChipType = 0; /* ? */ + ptmp_isp->InterruptLevel = host->irq; + + for (i = 0; i < 8; i++) + ptmp_isp->OutMbx[i] = 0; + + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr, + sizeof(EXT_CHIP)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify wrt rsp buf\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + /* now copy up the ISP to user */ + if (pext->ResponseLen < sizeof(EXT_CHIP)) + transfer_size = pext->ResponseLen; + else + transfer_size = sizeof(EXT_CHIP); + + ret = copy_to_user((uint8_t *)pext->ResponseAdr, (uint8_t *)ptmp_isp, + transfer_size); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy rsp buffer.\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + qla2x00_free_ioctl_scrap_mem(ha); + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} + +/* + * qla2x00_get_data + * Handles all subcommands of the EXT_CC_GET_DATA command. + * + * Input: + * ha = adapter state pointer. + * pext = EXT_IOCTL structure pointer. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_get_data(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int tmp_rval = 0; + + switch(pext->SubCode) { + case EXT_SC_GET_STATISTICS: + tmp_rval = qla2x00_get_statistics(ha, pext, mode); + break; + + case EXT_SC_GET_FC_STATISTICS: + tmp_rval = qla2x00_get_fc_statistics(ha, pext, mode); + break; + + case EXT_SC_GET_PORT_SUMMARY: + tmp_rval = qla2x00_get_port_summary(ha, pext, mode); + break; + + case EXT_SC_QUERY_DRIVER: + tmp_rval = qla2x00_query_driver(ha, pext, mode); + break; + + case EXT_SC_QUERY_FW: + tmp_rval = qla2x00_query_fw(ha, pext, mode); + break; + + case EXT_SC_GET_RNID: + tmp_rval = qla2x00_get_rnid_params(ha, pext, mode); + break; + +#if defined(ISP2300) + case EXT_SC_GET_BEACON_STATE: + tmp_rval = qla2x00_get_led_state(ha, pext, mode); + break; +#endif + + default: + DEBUG10(printk("%s(%ld): inst=%ld unknown SubCode %d.\n", + __func__, ha->host_no, ha->instance, pext->SubCode);) + pext->Status = EXT_STATUS_UNSUPPORTED_SUBCODE; + break; + } + + return (tmp_rval); +} + +/* + * qla2x00_get_statistics + * Issues get_link_status mbx cmd and returns statistics + * relavent to the specified adapter. + * + * Input: + * ha = pointer to adapter struct of the specified adapter. + * pext = pointer to EXT_IOCTL structure containing values from user. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_get_statistics(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + EXT_HBA_PORT_STAT *ptmp_stat; + int ret = 0; + link_stat_t stat_buf; + uint8_t rval; + uint8_t *usr_temp, *kernel_tmp; + uint16_t mb_stat[1]; + uint32_t transfer_size; + + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr, + sizeof(EXT_HBA_PORT_STAT)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR VERIFY_WRITE " + "EXT_HBA_PORT_STAT.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + /* check on loop down */ + if (ha->loop_state != LOOP_READY || + test_bit(CFG_ACTIVE, &ha->cfg_flags) || + test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || + test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || + ha->dpc_active) { + + pext->Status = EXT_STATUS_BUSY; + DEBUG9_10(printk("%s(%ld): inst=%ld loop not ready.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); + } + + /* Send mailbox cmd to get more. */ + if ((rval = qla2x00_get_link_status(ha, ha->loop_id, &stat_buf, + mb_stat)) != QLA_SUCCESS) { + + if (rval == BIT_0) { + pext->Status = EXT_STATUS_NO_MEMORY; + } else if (rval == BIT_1) { + pext->Status = EXT_STATUS_MAILBOX; + pext->DetailStatus = EXT_DSTATUS_NOADNL_INFO; + } else { + pext->Status = EXT_STATUS_ERR; + } + + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR mailbox failed. " + "mb[0]=%x.\n", + __func__, ha->host_no, ha->instance, mb_stat[0]);) + printk(KERN_WARNING + "%s(%ld): inst=%ld ERROR mailbox failed. mb[0]=%x.\n", + __func__, ha->host_no, ha->instance, mb_stat[0]); + + return (ret); + } + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&ptmp_stat, + sizeof(EXT_HBA_PORT_STAT))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(EXT_HBA_PORT_STAT));) + return (ret); + } + + ptmp_stat->ControllerErrorCount = ha->total_isp_aborts; + ptmp_stat->DeviceErrorCount = ha->total_dev_errs; + ptmp_stat->TotalIoCount = ha->total_ios; + ptmp_stat->TotalMBytes = ha->total_bytes >> 20; + ptmp_stat->TotalLipResets = ha->total_lip_cnt; + /* + ptmp_stat->TotalInterrupts = ha->total_isr_cnt; + */ + + ptmp_stat->TotalLinkFailures = stat_buf.link_fail_cnt; + ptmp_stat->TotalLossOfSync = stat_buf.loss_sync_cnt; + ptmp_stat->TotalLossOfSignals = stat_buf.loss_sig_cnt; + ptmp_stat->PrimitiveSeqProtocolErrorCount = stat_buf.prim_seq_err_cnt; + ptmp_stat->InvalidTransmissionWordCount = stat_buf.inval_xmit_word_cnt; + ptmp_stat->InvalidCRCCount = stat_buf.inval_crc_cnt; + + /* now copy up the STATISTICS to user */ + if (pext->ResponseLen < sizeof(EXT_HBA_PORT_STAT)) + transfer_size = pext->ResponseLen; + else + transfer_size = sizeof(EXT_HBA_PORT_STAT); + + usr_temp = (uint8_t *)pext->ResponseAdr; + kernel_tmp = (uint8_t *)ptmp_stat; + ret = copy_to_user(usr_temp, kernel_tmp, transfer_size); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy rsp buffer.\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + qla2x00_free_ioctl_scrap_mem(ha); + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} + +/* + * qla2x00_get_fc_statistics + * Issues get_link_status mbx cmd to the target device with + * the specified WWN and returns statistics relavent to the + * device. + * + * Input: + * ha = pointer to adapter struct of the specified device. + * pext = pointer to EXT_IOCTL structure containing values from user. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_get_fc_statistics(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + EXT_HBA_PORT_STAT *ptmp_stat; + EXT_DEST_ADDR addr_struct; + fc_port_t *fcport; + int port_found; + link_stat_t stat_buf; + int ret = 0; + uint8_t rval; + uint8_t *usr_temp, *kernel_tmp; + uint8_t *req_name; + uint16_t mb_stat[1]; + uint32_t transfer_size; + + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr, + sizeof(EXT_HBA_PORT_STAT)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR VERIFY_WRITE.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + ret = copy_from_user(&addr_struct, pext->RequestAdr, pext->RequestLen); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy req buf.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + /* find the device's loop_id */ + port_found = 0; + fcport = NULL; + switch (addr_struct.DestType) { + case EXT_DEF_DESTTYPE_WWPN: + req_name = addr_struct.DestAddr.WWPN; + list_for_each_entry(fcport, &ha->fcports, list) { + if (memcmp(fcport->port_name, req_name, + EXT_DEF_WWN_NAME_SIZE) == 0) { + port_found = 1; + break; + } + } + break; + + case EXT_DEF_DESTTYPE_WWNN: + case EXT_DEF_DESTTYPE_PORTID: + case EXT_DEF_DESTTYPE_FABRIC: + case EXT_DEF_DESTTYPE_SCSI: + default: + pext->Status = EXT_STATUS_INVALID_PARAM; + pext->DetailStatus = EXT_DSTATUS_NOADNL_INFO; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR Unsupported subcode " + "address type.\n", __func__, ha->host_no, ha->instance);) + return (ret); + + break; + } + + if (!port_found) { + /* not found */ + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + pext->DetailStatus = EXT_DSTATUS_TARGET; + return (ret); + } + + /* check for suspended/lost device */ + /* + if (ha->fcport is suspended/lost) { + pext->Status = EXT_STATUS_SUSPENDED; + pext->DetailStatus = EXT_DSTATUS_TARGET; + return pext->Status; + } + */ + + /* check on loop down */ + if (ha->loop_state != LOOP_READY || + test_bit(CFG_ACTIVE, &ha->cfg_flags) || + test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || + test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || + ha->dpc_active) { + + pext->Status = EXT_STATUS_BUSY; + DEBUG9_10(printk("%s(%ld): inst=%ld loop not ready.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + /* Send mailbox cmd to get more. */ + if ((rval = qla2x00_get_link_status(ha, fcport->loop_id, + &stat_buf, mb_stat)) != QLA_SUCCESS) { + if (rval == BIT_0) { + pext->Status = EXT_STATUS_NO_MEMORY; + } else if (rval == BIT_1) { + pext->Status = EXT_STATUS_MAILBOX; + pext->DetailStatus = EXT_DSTATUS_NOADNL_INFO; + } else { + pext->Status = EXT_STATUS_ERR; + } + + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR mailbox failed. " + "mb[0]=%x.\n", + __func__, ha->host_no, ha->instance, mb_stat[0]);) + return (ret); + } + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&ptmp_stat, + sizeof(EXT_HBA_PORT_STAT))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(EXT_HBA_PORT_STAT));) + return (ret); + } + + ptmp_stat->ControllerErrorCount = ha->total_isp_aborts; + ptmp_stat->DeviceErrorCount = ha->total_dev_errs; + ptmp_stat->TotalIoCount = ha->total_ios; + ptmp_stat->TotalMBytes = ha->total_bytes >> 20; + ptmp_stat->TotalLipResets = ha->total_lip_cnt; + /* + ptmp_stat->TotalInterrupts = ha->total_isr_cnt; + */ + + ptmp_stat->TotalLinkFailures = stat_buf.link_fail_cnt; + ptmp_stat->TotalLossOfSync = stat_buf.loss_sync_cnt; + ptmp_stat->TotalLossOfSignals = stat_buf.loss_sig_cnt; + ptmp_stat->PrimitiveSeqProtocolErrorCount = stat_buf.prim_seq_err_cnt; + ptmp_stat->InvalidTransmissionWordCount = stat_buf.inval_xmit_word_cnt; + ptmp_stat->InvalidCRCCount = stat_buf.inval_crc_cnt; + + /* now copy up the STATISTICS to user */ + if (pext->ResponseLen < sizeof(EXT_HBA_PORT_STAT)) + transfer_size = pext->ResponseLen; + else + transfer_size = sizeof(EXT_HBA_PORT_STAT); + + usr_temp = (uint8_t *)pext->ResponseAdr; + kernel_tmp = (uint8_t *)ptmp_stat; + ret = copy_to_user(usr_temp, kernel_tmp, transfer_size); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy rsp buffer.\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + qla2x00_free_ioctl_scrap_mem(ha); + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} + +/* + * qla2x00_get_port_summary + * Handles EXT_SC_GET_PORT_SUMMARY subcommand. + * Returns values of devicedata and dd_entry list. + * + * Input: + * ha = adapter state pointer. + * pext = EXT_IOCTL structure pointer. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_get_port_summary(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int ret = 0; + uint8_t *usr_temp, *kernel_tmp; + uint32_t entry_cnt = 0; + uint32_t port_cnt = 0; + uint32_t top_xfr_size; + uint32_t usr_no_of_entries = 0; + void *start_of_entry_list; + fc_port_t *fcport; + + EXT_DEVICEDATA *pdevicedata; + EXT_DEVICEDATAENTRY *pdd_entry; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&pdevicedata, + sizeof(EXT_DEVICEDATA))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "pdevicedata requested=%d.\n", + __func__, ha->host_no, ha->instance, + sizeof(EXT_DEVICEDATA));) + return (ret); + } + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&pdd_entry, + sizeof(EXT_DEVICEDATAENTRY))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "pdd_entry requested=%d.\n", + __func__, ha->host_no, ha->instance, + sizeof(EXT_DEVICEDATAENTRY));) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + /* Get maximum number of entries allowed in response buf */ + usr_no_of_entries = pext->ResponseLen / sizeof(EXT_DEVICEDATAENTRY); + + /* reserve some spaces to be filled in later. */ + top_xfr_size = sizeof(pdevicedata->ReturnListEntryCount) + + sizeof(pdevicedata->TotalDevices); + + start_of_entry_list = (void *)(pext->ResponseAdr) + top_xfr_size; + + /* Start copying from devices that exist. */ + ret = qla2x00_get_fcport_summary(ha, pdd_entry, + start_of_entry_list, usr_no_of_entries, + &entry_cnt, &pext->Status); + + DEBUG9(printk("%s(%ld): after get_fcport_summary, entry_cnt=%d.\n", + __func__, ha->host_no, entry_cnt);) + + /* If there's still space in user buffer, return devices found + * in config file which don't actually exist (missing). + */ + if (ret == 0) { + if (!ha->flags.failover_enabled) { +#if 0 + ret = qla2x00_std_missing_port_summary(ha, pdd_entry, + start_of_entry_list, usr_no_of_entries, + &entry_cnt, &pext->Status); +#endif + } else { + ret = qla2x00_fo_missing_port_summary(ha, pdd_entry, + start_of_entry_list, usr_no_of_entries, + &entry_cnt, &pext->Status); + + } + } + + DEBUG9(printk( + "%s(%ld): after get_missing_port_summary. entry_cnt=%d.\n", + __func__, ha->host_no, entry_cnt);) + + if (ret) { + DEBUG9_10(printk("%s(%ld): failed getting port info.\n", + __func__, ha->host_no);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + pdevicedata->ReturnListEntryCount = entry_cnt; + list_for_each_entry(fcport, &ha->fcports, list) { + port_cnt++; + } + if (port_cnt > entry_cnt) + pdevicedata->TotalDevices = port_cnt; + else + pdevicedata->TotalDevices = entry_cnt; + + DEBUG9(printk("%s(%ld): inst=%ld EXT_SC_GET_PORT_SUMMARY " + "return entry cnt=%d port_cnt=%d.\n", + __func__, ha->host_no, ha->instance, + entry_cnt, port_cnt);) + + /* copy top of devicedata, which is everything other than the + * actual entry list data. + */ + ret = verify_area(VERIFY_WRITE, (void *)(pext->ResponseAdr), + top_xfr_size); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify wrt rsp buf\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + usr_temp = (uint8_t *)pext->ResponseAdr; + kernel_tmp = (uint8_t *)pdevicedata; + ret = copy_to_user(usr_temp, kernel_tmp, top_xfr_size); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy rsp " + "devicedata buffer.\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + + qla2x00_free_ioctl_scrap_mem(ha); + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} + +/* + * qla2x00_get_fcport_summary + * Returns port values in user's dd_entry list. + * + * Input: + * ha = adapter state pointer. + * pdd_entry = pointer to a temporary EXT_DEVICEDATAENTRY struct + * pstart_of_entry_list = start of user addr of buffer for dd_entry entries + * max_entries = max number of entries allowed by user buffer + * pentry_cnt = pointer to total number of entries so far + * ret_status = pointer to ioctl status field + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_get_fcport_summary(scsi_qla_host_t *ha, EXT_DEVICEDATAENTRY *pdd_entry, + void *pstart_of_entry_list, uint32_t max_entries, uint32_t *pentry_cnt, + uint32_t *ret_status) +{ + int ret = QLA_SUCCESS; + uint8_t *usr_temp, *kernel_tmp; + uint32_t b; + uint32_t current_offset; + uint32_t tgt; + uint32_t transfer_size; + fc_port_t *fcport; + os_tgt_t *tq; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + list_for_each_entry(fcport, &ha->fcports, list) { + if (*pentry_cnt >= max_entries) + break; + + if ((atomic_read(&fcport->state) != FCS_ONLINE) && + !qla2x00_is_fcport_in_config(ha, fcport)) { + /* no need to report */ + DEBUG2_9_10(printk("%s(%ld): not reporting " + "fcport %02x%02x%02x%02x%02x%02x%02x%02x. " + "state=%i, flags=%02x.\n", + __func__, ha->host_no, fcport->port_name[0], + fcport->port_name[1], fcport->port_name[2], + fcport->port_name[3], fcport->port_name[4], + fcport->port_name[5], fcport->port_name[6], + fcport->port_name[7], atomic_read(&fcport->state), + fcport->flags)); + continue; + } + + /* copy from fcport to dd_entry */ + memcpy(pdd_entry->NodeWWN, fcport->node_name, WWN_SIZE); + memcpy(pdd_entry->PortWWN, fcport->port_name, WWN_SIZE); + + for (b = 0; b < 3 ; b++) + pdd_entry->PortID[b] = fcport->d_id.r.d_id[2-b]; + + if (fcport->flags & FCF_FABRIC_DEVICE) { + pdd_entry->ControlFlags = EXT_DEF_GET_FABRIC_DEVICE; + } else { + pdd_entry->ControlFlags = 0; + } + + pdd_entry->TargetAddress.Bus = 0; + /* Retrieve 'Target' number for port */ + for (tgt = 0; tgt < MAX_TARGETS; tgt++) { + if ((tq = ha->otgt[tgt]) == NULL) { + continue; + } + + if (tq->fcport == NULL) + continue; + + if (memcmp(fcport->port_name, tq->fcport->port_name, + EXT_DEF_WWN_NAME_SIZE) == 0) { + pdd_entry->TargetAddress.Target = tgt; + break; + } + } + pdd_entry->TargetAddress.Lun = 0; + pdd_entry->DeviceFlags = 0; + pdd_entry->LoopID = fcport->loop_id; + pdd_entry->BaseLunNumber = 0; + + DEBUG9_10(printk("%s(%ld): reporting " + "fcport %02x%02x%02x%02x%02x%02x%02x%02x.\n", + __func__, ha->host_no, fcport->port_name[0], + fcport->port_name[1], fcport->port_name[2], + fcport->port_name[3], fcport->port_name[4], + fcport->port_name[5], fcport->port_name[6], + fcport->port_name[7])); + + current_offset = *pentry_cnt * sizeof(EXT_DEVICEDATAENTRY); + + transfer_size = sizeof(EXT_DEVICEDATAENTRY); + ret = verify_area(VERIFY_WRITE, + (uint8_t *)pstart_of_entry_list + current_offset, + transfer_size); + + if (ret) { + *ret_status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify WRITE " + "rsp bufaddr=%p\n", + __func__, ha->host_no, ha->instance, + (uint8_t *)pstart_of_entry_list + current_offset);) + return (ret); + } + + /* now copy up this dd_entry to user */ + usr_temp = (uint8_t *)pstart_of_entry_list + current_offset; + kernel_tmp = (uint8_t *)pdd_entry; + ret = copy_to_user(usr_temp, kernel_tmp, transfer_size); + if (ret) { + *ret_status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy rsp " + "entry list buffer.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + *pentry_cnt += 1; + } + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} + +/* + * qla2x00_fo_missing_port_summary is in qla_fo.c + */ + +//RUBY: Do we need this with the new consolidated fcports list? This will +// be handled transparently in qla2x00_get_fcport_summary(). +#if 0 +/* + * qla2x00_std_missing_port_summary + * Returns values of devices not connected but found in configuration + * file in user's dd_entry list. + * + * Input: + * ha = adapter state pointer. + * pdd_entry = pointer to a temporary EXT_DEVICEDATAENTRY struct + * pstart_of_entry_list = start of user addr of buffer for dd_entry entries + * max_entries = max number of entries allowed by user buffer + * pentry_cnt = pointer to total number of entries so far + * ret_status = pointer to ioctl status field + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_std_missing_port_summary(scsi_qla_host_t *ha, + EXT_DEVICEDATAENTRY *pdd_entry, void *pstart_of_entry_list, + uint32_t max_entries, uint32_t *pentry_cnt, uint32_t *ret_status) +{ + int ret = QLA_SUCCESS; + uint8_t *usr_temp, *kernel_tmp; + uint16_t idx; + uint32_t b; + uint32_t current_offset; + uint32_t transfer_size; + fcdev_t *pdev; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + for (idx = 0; idx < MAX_FIBRE_DEVICES && *pentry_cnt < max_entries; + idx++) { + pdev = &ha->fc_db[idx]; + + if (pdev->loop_id == PORT_UNUSED) + continue; + + /* RLU: sanity check */ + /* + if (qla2x00_is_wwn_zero(pdev->wwn) && + qla2x00_is_wwn_zero(pdev->name) && pdev->d_id.b24 == 0) { + continue; + } + */ + + if (pdev->loop_id == PORT_AVAILABLE) { + DEBUG10(printk("%s: returning missing device " + "%02x%02x%02x%02x%02x%02x%02x%02x.\n", + __func__, + pdev->wwn[0], pdev->wwn[1], + pdev->wwn[2], pdev->wwn[3], + pdev->wwn[4], pdev->wwn[5], + pdev->wwn[6], pdev->wwn[7]);) + + /* This device was not found. Return + * as unconfigured. + */ + memcpy(pdd_entry->NodeWWN, pdev->name, WWN_SIZE); + memcpy(pdd_entry->PortWWN, pdev->wwn, WWN_SIZE); + + for (b = 0; b < 3 ; b++) + pdd_entry->PortID[b] = 0; + + /* assume fabric dev so api won't translate the portid from loopid */ + pdd_entry->ControlFlags = EXT_DEF_GET_FABRIC_DEVICE; + + pdd_entry->TargetAddress.Bus = 0; + pdd_entry->TargetAddress.Target = idx; + pdd_entry->TargetAddress.Lun = 0; + pdd_entry->DeviceFlags = 0; + pdd_entry->LoopID = 0; + pdd_entry->BaseLunNumber = 0; + + current_offset = *pentry_cnt * + sizeof(EXT_DEVICEDATAENTRY); + + transfer_size = sizeof(EXT_DEVICEDATAENTRY); + ret = verify_area(VERIFY_WRITE, + (uint8_t *)pstart_of_entry_list + current_offset, + transfer_size); + + if (ret == 0) { + + /* now copy up this dd_entry to user */ + usr_temp = (uint8_t *)pstart_of_entry_list + + current_offset; + kernel_tmp = (uint8_t *)pdd_entry; + ret = copy_to_user(usr_temp, kernel_tmp, + transfer_size); + if (ret) { + *ret_status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld " + "ERROR copy rsp list buffer.\n", + __func__, ha->host_no, + ha->instance);) + break; + } else { + *pentry_cnt+=1; + } + } else { + *ret_status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld " + "ERROR verify wrt rsp bufaddr=%p\n", + __func__, ha->host_no, ha->instance, + (uint8_t *)pstart_of_entry_list + + current_offset);) + break; + } + } + + if (ret || *ret_status) { + break; + } + } + + DEBUG9(printk("%s(%ld): inst=%ld exiting. ret=%d.\n", + __func__, ha->host_no, ha->instance, ret);) + + return (ret); +} +#endif + +/* + * qla2x00_query_driver + * Handles EXT_SC_QUERY_DRIVER subcommand. + * + * Input: + * ha = adapter state pointer. + * pext = EXT_IOCTL structure pointer. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_query_driver(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int ret = 0; + uint8_t *usr_temp, *kernel_tmp; + uint32_t transfer_size; + EXT_DRIVER *pdriver_prop; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&pdriver_prop, + sizeof(EXT_DRIVER))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(EXT_DRIVER));) + return (ret); + } + + sprintf(pdriver_prop->Version, qla2x00_version_str); + pdriver_prop->NumOfBus = MAX_BUSES; + pdriver_prop->TargetsPerBus = MAX_FIBRE_DEVICES; + pdriver_prop->LunsPerTarget = MAX_LUNS; + pdriver_prop->MaxTransferLen = 0xffffffff; + pdriver_prop->MaxDataSegments = 0xffffffff; + + if (ha->flags.enable_64bit_addressing == 1) + pdriver_prop->DmaBitAddresses = 64; + else + pdriver_prop->DmaBitAddresses = 32; + + if (pext->ResponseLen < sizeof(EXT_DRIVER)) + transfer_size = pext->ResponseLen; + else + transfer_size = sizeof(EXT_DRIVER); + + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr , + transfer_size); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG10(printk("%s(%ld): inst=%ld ERROR verify wrt rsp buf.\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + /* now copy up the ISP to user */ + usr_temp = (uint8_t *)pext->ResponseAdr; + kernel_tmp = (uint8_t *)pdriver_prop; + ret = copy_to_user(usr_temp, kernel_tmp, transfer_size); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy rsp buffer.\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + qla2x00_free_ioctl_scrap_mem(ha); + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} + +/* + * qla2x00_query_fw + * Handles EXT_SC_QUERY_FW subcommand. + * + * Input: + * ha = adapter state pointer. + * pext = EXT_IOCTL structure pointer. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_query_fw(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int ret = 0; + uint8_t *usr_temp, *kernel_tmp; + uint32_t transfer_size; + EXT_FW *pfw_prop; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&pfw_prop, + sizeof(EXT_FW))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(EXT_FW));) + return (ret); + } + + pfw_prop->Version[0] = ha->fw_major_version; + pfw_prop->Version[1] = ha->fw_minor_version; + pfw_prop->Version[2] = ha->fw_subminor_version; + + transfer_size = sizeof(EXT_FW); + + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr , + transfer_size); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG10(printk("%s(%ld): inst=%ld ERROR verify wrt rsp buf.\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + usr_temp = (uint8_t *)pext->ResponseAdr; + kernel_tmp = (uint8_t *)pfw_prop; + ret = copy_to_user(usr_temp, kernel_tmp, transfer_size); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy rsp buffer.\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + qla2x00_free_ioctl_scrap_mem(ha); + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} + +static int +qla2x00_msiocb_passthru(scsi_qla_host_t *ha, EXT_IOCTL *pext, int cmd, + int mode) +{ + int ret = 0; + fc_lun_t *ptemp_fclun = NULL; /* buf from scrap mem */ + fc_port_t *ptemp_fcport = NULL; /* buf from scrap mem */ + struct scsi_cmnd *pscsi_cmd = NULL; /* buf from scrap mem */ + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + /* check on current topology */ + if ((ha->current_topology != ISP_CFG_F) && + (ha->current_topology != ISP_CFG_FL)) { + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR not in F/FL mode\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + if (ha->ioctl_mem_size <= 0) { + if (qla2x00_get_new_ioctl_dma_mem(ha, + QLA_INITIAL_IOCTLMEM_SIZE) != QLA_SUCCESS) { + + DEBUG9_10(printk("%s: ERROR cannot alloc DMA " + "buffer size=%lx.\n", + __func__, QLA_INITIAL_IOCTLMEM_SIZE);) + + pext->Status = EXT_STATUS_NO_MEMORY; + return (ret); + } + } + + if (pext->ResponseLen > ha->ioctl_mem_size) { + if (qla2x00_get_new_ioctl_dma_mem(ha, pext->ResponseLen) != + QLA_SUCCESS) { + + DEBUG9_10(printk("%s: ERROR cannot alloc requested" + "DMA buffer size %x.\n", + __func__, pext->ResponseLen);) + + pext->Status = EXT_STATUS_NO_MEMORY; + return (ret); + } + + DEBUG9(printk("%s(%ld): inst=%ld rsp buf length larger than " + "existing size. Additional mem alloc successful.\n", + __func__, ha->host_no, ha->instance);) + } + + ret = verify_area(VERIFY_READ, (void *)pext->RequestAdr, + pext->RequestLen); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk( + "%s(%ld): inst=%ld ERROR verify read req buf\n", + __func__, ha->host_no, ha->instance);) + + return (ret); + } + + DEBUG9(printk("%s(%ld): inst=%ld req buf verified.\n", + __func__, ha->host_no, ha->instance);) + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&pscsi_cmd, + sizeof(struct scsi_cmnd))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "cmd size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(struct scsi_cmnd));) + return (ret); + } + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&ptemp_fcport, + sizeof(fc_port_t))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "fcport size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(fc_port_t));) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&ptemp_fclun, + sizeof(fc_lun_t))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "fclun size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(fc_lun_t));) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + /* initialize */ + memset(ha->ioctl_mem, 0, ha->ioctl_mem_size); + + switch (cmd) { + case EXT_CC_SEND_FCCT_PASSTHRU: + DEBUG9(printk("%s: got CT passthru cmd.\n", __func__)); + ret = qla2x00_send_fcct(ha, pext, pscsi_cmd, ptemp_fcport, + ptemp_fclun, mode); + break; +#if defined(ISP2300) + case EXT_CC_SEND_ELS_PASSTHRU: + DEBUG9(printk("%s: got ELS passthru cmd.\n", __func__)); + ret = qla2x00_send_els_passthru(ha, pext, pscsi_cmd, + ptemp_fcport, ptemp_fclun, mode); + break; +#endif + default: + DEBUG9_10(printk("%s: got invalid cmd.\n", __func__)); + break; + } + + qla2x00_free_ioctl_scrap_mem(ha); + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} + +#if defined(ISP2300) +/* + * qla2x00_send_els_passthru + * Passes the ELS command down to firmware as MSIOCB and + * copies the response back when it completes. + * + * Input: + * ha = adapter state pointer. + * pext = EXT_IOCTL structure pointer. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_send_els_passthru(scsi_qla_host_t *ha, EXT_IOCTL *pext, + struct scsi_cmnd *pscsi_cmd, fc_port_t *ptmp_fcport, fc_lun_t *ptmp_fclun, + int mode) +{ + int ret = 0; + + uint8_t invalid_wwn = FALSE; + uint8_t *ptmp_stat; + uint8_t *pusr_req_buf; + uint8_t *presp_payload; + uint32_t payload_len; + uint32_t usr_req_len; + + int found; + uint16_t next_loop_id; + fc_port_t *fcport; + + EXT_ELS_PT_REQ *pels_pt_req; + + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + usr_req_len = pext->RequestLen - sizeof(EXT_ELS_PT_REQ); + if (usr_req_len > ha->ioctl_mem_size) { + pext->Status = EXT_STATUS_INVALID_PARAM; + + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR ReqLen too big=%x.\n", + __func__, ha->host_no, ha->instance, pext->RequestLen);) + + return (ret); + } + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&pels_pt_req, + sizeof(EXT_ELS_PT_REQ))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "els_pt_req size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(EXT_ELS_PT_REQ));) + return (ret); + } + + /* copy request buffer */ + + ret = copy_from_user(pels_pt_req, pext->RequestAdr, + sizeof(EXT_ELS_PT_REQ)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR" + "copy_from_user() of struct failed (%d).\n", + __func__, ha->host_no, ha->instance, ret);) + + return (ret); + } + + pusr_req_buf = (uint8_t *)pext->RequestAdr + sizeof(EXT_ELS_PT_REQ); + + ret = copy_from_user(ha->ioctl_mem, pusr_req_buf, usr_req_len); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR" + "copy_from_user() of request buf failed (%d).\n", + __func__, ha->host_no, ha->instance, ret);) + + return (ret); + } + + DEBUG9(printk("%s(%ld): inst=%ld after copy request.\n", + __func__, ha->host_no, ha->instance);) + + /* check on loop down (1) */ + if (ha->loop_state != LOOP_READY || + test_bit(CFG_ACTIVE, &ha->cfg_flags) || + test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || + test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags)) { + + DEBUG9_10(printk( + "%s(%ld): inst=%ld before dest port validation- loop not " + "ready; cannot proceed.\n", + __func__, ha->host_no, ha->instance);) + + pext->Status = EXT_STATUS_BUSY; + + return (ret); + } + + /*********************************/ + /* Validate the destination port */ + /*********************************/ + + /* first: WWN cannot be zero if no PID is specified */ + invalid_wwn = qla2x00_is_wwn_zero(pels_pt_req->WWPN); + if (invalid_wwn && !(pels_pt_req->ValidMask & EXT_DEF_PID_VALID)) { + /* error: both are not set. */ + pext->Status = EXT_STATUS_INVALID_PARAM; + + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR no valid WWPN/PID\n", + __func__, ha->host_no, ha->instance);) + + return (ret); + } + + /* second: it cannot be the local/current HBA itself */ + if (!invalid_wwn) { + if (memcmp(ha->init_cb->port_name, pels_pt_req->WWPN, + EXT_DEF_WWN_NAME_SIZE) == 0) { + + /* local HBA specified. */ + + pext->Status = EXT_STATUS_INVALID_PARAM; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR local HBA's " + "WWPN found.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); + } + } else { /* using PID */ + if (pels_pt_req->Id[1] == ha->d_id.r.d_id[2] + && pels_pt_req->Id[2] == ha->d_id.r.d_id[1] + && pels_pt_req->Id[3] == ha->d_id.r.d_id[0]) { + + /* local HBA specified. */ + + pext->Status = EXT_STATUS_INVALID_PARAM; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR local HBA's " + "PID found.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); + } + } + + /************************/ + /* Now find the loop ID */ + /************************/ + + found = 0; + fcport = NULL; + list_for_each_entry(fcport, &ha->fcports, list) { + if (fcport->port_type != FCT_INITIATOR || + fcport->port_type != FCT_TARGET) + continue; + + if (!invalid_wwn) { + /* search with WWPN */ + if (memcmp(pels_pt_req->WWPN, fcport->port_name, + EXT_DEF_WWN_NAME_SIZE)) + continue; + } else { + /* search with PID */ + if (pels_pt_req->Id[1] != fcport->d_id.r.d_id[2] + || pels_pt_req->Id[2] != fcport->d_id.r.d_id[1] + || pels_pt_req->Id[3] != fcport->d_id.r.d_id[0]) + continue; + } + + found++; + } + + if (!found) { + /* invalid WWN or PID specified */ + pext->Status = EXT_STATUS_INVALID_PARAM; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR WWPN/PID invalid.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); + } + + /* If this is for a host device, check if we need to perform login */ + if (fcport->port_type == FCT_INITIATOR && + fcport->loop_id >= SNS_LAST_LOOP_ID) { + + next_loop_id = 0; + ret = qla2x00_fabric_login(ha, fcport, &next_loop_id); + if (ret != QLA_SUCCESS) { + /* login failed. */ + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR login to " + "host port failed. loop_id=%02x pid=%02x%02x%02x " + "ret=%d.\n", + __func__, ha->host_no, ha->instance, + fcport->loop_id, fcport->d_id.b.domain, + fcport->d_id.b.area, fcport->d_id.b.al_pa, ret);) + + return (ret); + } + } + + /* queue command */ + pels_pt_req->Lid = fcport->loop_id; + + if ((ret = qla2x00_ioctl_ms_queuecommand(ha, pext, pscsi_cmd, + ptmp_fcport, ptmp_fclun, pels_pt_req))) { + return (ret); + } + + /* check on data returned */ + ptmp_stat = (uint8_t *)ha->ioctl_mem + FC_HEADER_LEN; + + if (*ptmp_stat == ELS_STAT_LS_RJT) { + payload_len = FC_HEADER_LEN + ELS_RJT_LENGTH; + + } else if (*ptmp_stat == ELS_STAT_LS_ACC) { + payload_len = pext->ResponseLen - sizeof(EXT_ELS_PT_REQ); + + } else { + /* invalid. just copy the status word. */ + DEBUG9_10(printk("%s(%ld): inst=%ld invalid stat " + "returned =0x%x.\n", + __func__, ha->host_no, ha->instance, *ptmp_stat);) + + payload_len = FC_HEADER_LEN + 4; + } + + DEBUG9(printk("%s(%ld): inst=%ld data dump-\n", + __func__, ha->host_no, ha->instance);) + DEBUG9(qla2x00_dump_buffer((uint8_t *)ptmp_stat, + pext->ResponseLen - sizeof(EXT_ELS_PT_REQ) - FC_HEADER_LEN);) + + /* Verify response buffer to be written */ + /* The data returned include FC frame header */ + presp_payload = (uint8_t *)pext->ResponseAdr + sizeof(EXT_ELS_PT_REQ); + + ret = verify_area(VERIFY_WRITE, (void *)presp_payload, payload_len); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify wrt rsp " + "buffer. ha=%p.\n", + __func__, ha->host_no, ha->instance, ha);) + + return (ret); + } + + /* copy back data returned to response buffer */ + ret = copy_to_user(presp_payload, (uint8_t *)ha->ioctl_mem, + payload_len); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy rsp buffer.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + DEBUG9(printk("%s(%ld): inst=%ld exiting normally.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} +#endif + +/* + * qla2x00_send_fcct + * Passes the FC CT command down to firmware as MSIOCB and + * copies the response back when it completes. + * + * Input: + * ha = adapter state pointer. + * pext = EXT_IOCTL structure pointer. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_send_fcct(scsi_qla_host_t *ha, EXT_IOCTL *pext, + struct scsi_cmnd *pscsi_cmd, fc_port_t *ptmp_fcport, fc_lun_t *ptmp_fclun, + int mode) +{ + int ret = 0; + int tmp_rval = 0; + uint16_t mb[MAILBOX_REGISTER_COUNT]; + + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + if (pext->RequestLen > ha->ioctl_mem_size) { + pext->Status = EXT_STATUS_INVALID_PARAM; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR ReqLen too big=%x.\n", + __func__, ha->host_no, ha->instance, pext->RequestLen);) + + return (ret); + } + + /* copy request buffer */ + ret = copy_from_user(ha->ioctl_mem, pext->RequestAdr, pext->RequestLen); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk( + "%s(%ld): inst=%ld ERROR copy req buf. ret=%d\n", + __func__, ha->host_no, ha->instance, ret);) + + + return (ret); + } + + DEBUG9(printk("%s(%ld): inst=%ld after copy request.\n", + __func__, ha->host_no, ha->instance);) + + /* check on management server login status */ + if (ha->flags.management_server_logged_in == 0) { + /* login to management server device */ + + tmp_rval = qla2x00_login_fabric(ha, MANAGEMENT_SERVER, + 0xff, 0xff, 0xfa, &mb[0], BIT_1); + + if (tmp_rval != 0 || mb[0] != 0x4000) { + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + + DEBUG9_10(printk( + "%s(%ld): inst=%ld ERROR login to MS.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); + } + + ha->flags.management_server_logged_in = 1; + } + + DEBUG9(printk("%s(%ld): success login to MS.\n", + __func__, ha->host_no);) + + /* queue command */ + if ((ret = qla2x00_ioctl_ms_queuecommand(ha, pext, pscsi_cmd, + ptmp_fcport, ptmp_fclun, NULL))) { + return (ret); + } + + if (CMD_COMPL_STATUS(pscsi_cmd) != 0 || + CMD_ENTRY_STATUS(pscsi_cmd) != 0) { + DEBUG9_10(printk("%s(%ld): inst=%ld cmd returned error=%x.\n", + __func__, ha->host_no, ha->instance, + CMD_COMPL_STATUS(pscsi_cmd));) + pext->Status = EXT_STATUS_ERR; + return (ret); + } + + /* getting device data and putting in pext->ResponseAdr */ + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr , + pext->ResponseLen); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify wrt rsp " + "buffer. ha=%p.\n", + __func__, ha->host_no, ha->instance, ha);) + return (ret); + } + + /* sending back data returned from Management Server */ + ret = copy_to_user((uint8_t *)pext->ResponseAdr, + (uint8_t *)ha->ioctl_mem, pext->ResponseLen); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy rsp buffer.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} + +static int +qla2x00_ioctl_ms_queuecommand(scsi_qla_host_t *ha, EXT_IOCTL *pext, + struct scsi_cmnd *pscsi_cmd, fc_port_t *pfcport, fc_lun_t *pfclun, + EXT_ELS_PT_REQ *pels_pt_req) +{ + int ret = 0; + int tmp_rval = 0; + os_lun_t *plq; + os_tgt_t *ptq; + + srb_t *sp = NULL; + + /* alloc sp */ + if ((sp = qla2x00_get_new_sp(ha)) == NULL) { + + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s: ERROR cannot alloc sp %p.\n", + __func__, sp);) + + return (ret); + } + + DEBUG9(printk("%s(%ld): inst=%ld after alloc sp.\n", + __func__, ha->host_no, ha->instance);) + + /* setup sp for this command */ + ptq = ha->ioctl->ioctl_tq; + plq = ha->ioctl->ioctl_lq; + sp->cmd = pscsi_cmd; + sp->flags = SRB_IOCTL; + sp->lun_queue = plq; + sp->tgt_queue = ptq; + pfclun->fcport = pfcport; + pfclun->lun = 0; + plq->fclun = pfclun; + plq->fclun->fcport->ha = ha; + + /* init scsi_cmd */ + pscsi_cmd->device->host = ha->host; + pscsi_cmd->scsi_done = qla2x00_msiocb_done; + + /* check on loop down (2)- check again just before sending cmd out. */ + if (ha->loop_state != LOOP_READY || + test_bit(CFG_ACTIVE, &ha->cfg_flags) || + test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || + test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags)) { + + DEBUG9_10(printk("%s(%ld): inst=%ld before issue cmd- loop " + "not ready.\n", + __func__, ha->host_no, ha->instance);) + + pext->Status = EXT_STATUS_BUSY; + + atomic_set(&sp->ref_count, 0); + add_to_free_queue (ha, sp); + + return (ret); + } + + DEBUG9(printk("%s(%ld): inst=%ld going to issue command.\n", + __func__, ha->host_no, ha->instance);) + + tmp_rval = qla2x00_start_ms_cmd(ha, pext, sp, pels_pt_req); + + DEBUG9(printk("%s(%ld): inst=%ld after issue command.\n", + __func__, ha->host_no, ha->instance);) + + if (tmp_rval != 0) { + /* We waited and post function did not get called */ + DEBUG9_10(printk("%s(%ld): inst=%ld command timed out.\n", + __func__, ha->host_no, ha->instance);) + + pext->Status = EXT_STATUS_MS_NO_RESPONSE; + + atomic_set(&sp->ref_count, 0); + add_to_free_queue (ha, sp); + + return (ret); + } + + return (ret); +} + + +/* + * qla2x00_start_ms_cmd + * Allocates an MSIOCB request pkt and sends out the passthru cmd. + * + * Input: + * ha = adapter state pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +static int +qla2x00_start_ms_cmd(scsi_qla_host_t *ha, EXT_IOCTL *pext, srb_t *sp, + EXT_ELS_PT_REQ *pels_pt_req) +{ +#define ELS_REQUEST_RCTL 0x22 +#define ELS_REPLY_RCTL 0x23 + + uint32_t usr_req_len; + uint32_t usr_resp_len; + + ms_iocb_entry_t *pkt; + unsigned long cpu_flags = 0; + + + /* get spin lock for this operation */ + spin_lock_irqsave(&ha->hardware_lock, cpu_flags); + + /* Get MS request packet. */ + pkt = (ms_iocb_entry_t *)qla2x00_ms_req_pkt(ha, sp); + if (pkt == NULL) { + /* release spin lock and return error. */ + spin_unlock_irqrestore(&ha->hardware_lock, cpu_flags); + + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld MSIOCB PT - could not get " + "Request Packet.\n", __func__, ha->host_no, ha->instance);) + return (QLA_MEMORY_ALLOC_FAILED); + } + + pkt->entry_type = MS_IOCB_TYPE; + pkt->entry_count = 1; + + if (pels_pt_req != NULL) { + /* process ELS passthru command */ + usr_req_len = pext->RequestLen - sizeof(EXT_ELS_PT_REQ); + usr_resp_len = pext->ResponseLen - sizeof(EXT_ELS_PT_REQ); + + pkt->control_flags = BIT_15; /* ELS passthru enabled */ + pkt->loop_id = pels_pt_req->Lid; + pkt->type = 1; /* ELS frame */ + + if (pext->ResponseLen != 0) { + pkt->r_ctl = ELS_REQUEST_RCTL; + pkt->rx_id = 0; + } else { + pkt->r_ctl = ELS_REPLY_RCTL; + pkt->rx_id = pels_pt_req->Rxid; + } + } else { + usr_req_len = pext->RequestLen; + usr_resp_len = pext->ResponseLen; + pkt->loop_id = MANAGEMENT_SERVER; + } + + DEBUG9_10(printk("%s(%ld): inst=%ld using loop_id=%02x req_len=%d, " + "resp_len=%d. Initializing pkt.\n", + __func__, ha->host_no, ha->instance, + pkt->loop_id, usr_req_len, usr_resp_len);) + + pkt->timeout = QLA_PT_CMD_TOV; + pkt->cmd_dsd_count = 1; + pkt->total_dsd_count = 2; /* no continuation */ + pkt->rsp_bytecount = usr_resp_len; + pkt->req_bytecount = usr_req_len; + + /* + * Loading command payload address. user request is assumed to have + * been copied to ioctl_mem. + */ + pkt->dseg_req_address[0] = LSD(ha->ioctl_mem_phys); + pkt->dseg_req_address[1] = MSD(ha->ioctl_mem_phys); + pkt->dseg_req_length = usr_req_len; + + /* loading response payload address */ + pkt->dseg_rsp_address[0] = LSD(ha->ioctl_mem_phys); + pkt->dseg_rsp_address[1] = MSD(ha->ioctl_mem_phys); + pkt->dseg_rsp_length = usr_resp_len; + + /* set flag to indicate IOCTL MSIOCB cmd in progress */ + ha->ioctl->MSIOCB_InProgress = 1; + ha->ioctl->ioctl_tov = pkt->timeout + 1; /* 1 second more */ + + /* prepare for receiving completion. */ + qla2x00_ioctl_sem_init(ha); + + /* Issue command to ISP */ + qla2x00_isp_cmd(ha); + + ha->ioctl->cmpl_timer.expires = jiffies + ha->ioctl->ioctl_tov * HZ; + add_timer(&ha->ioctl->cmpl_timer); + + DEBUG9(printk("%s(%ld): inst=%ld releasing hardware_lock.\n", + __func__, ha->host_no, ha->instance);) + spin_unlock_irqrestore(&ha->hardware_lock, cpu_flags); + + DEBUG9(printk("%s(%ld): inst=%ld sleep for completion.\n", + __func__, ha->host_no, ha->instance);) + + down(&ha->ioctl->cmpl_sem); + + del_timer(&ha->ioctl->cmpl_timer); + + if (ha->ioctl->MSIOCB_InProgress == 1) { + DEBUG9_10(printk("%s(%ld): inst=%ld timed out. exiting.\n", + __func__, ha->host_no, ha->instance);) + return QLA_FUNCTION_FAILED; + } + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return QLA_SUCCESS; +} + +/* + * qla2x00_wwpn_to_scsiaddr + * Handles the EXT_CC_WWPN_TO_SCSIADDR command. + * + * Input: + * ha = adapter state pointer. + * pext = EXT_IOCTL structure pointer. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_wwpn_to_scsiaddr(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int ret = 0; + fc_port_t *tgt_fcport; + os_tgt_t *tq; + uint8_t tmp_wwpn[EXT_DEF_WWN_NAME_SIZE]; + uint32_t b, tgt, l; + EXT_SCSI_ADDR tmp_addr; + + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + if (pext->RequestLen != EXT_DEF_WWN_NAME_SIZE || + pext->ResponseLen < sizeof(EXT_SCSI_ADDR)) { + /* error */ + DEBUG9_10(printk("%s(%ld): inst=%ld invalid WWN buffer size %d " + "received.\n", + __func__, ha->host_no, ha->instance, pext->ResponseLen);) + pext->Status = EXT_STATUS_INVALID_PARAM; + + return (ret); + } + + ret = verify_area(VERIFY_READ, (void *)pext->RequestAdr, + pext->RequestLen); + if (ret) { + DEBUG9_10(printk( + "%s(%ld): inst=%ld ERROR VERIFY_READ req buf\n", + __func__, ha->host_no, ha->instance);) + pext->Status = EXT_STATUS_COPY_ERR; + return (ret); + } + + ret = copy_from_user(tmp_wwpn, pext->RequestAdr, pext->RequestLen); + if (ret) { + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy_from_user " + "failed(%d) on request buf.\n", + __func__, ha->host_no, ha->instance, ret);) + pext->Status = EXT_STATUS_COPY_ERR; + return (ret); + } + + tq = NULL; + for (tgt = 0; tgt < MAX_TARGETS; tgt++) { + if (ha->otgt[tgt] == NULL) { + continue; + } + + tq = ha->otgt[tgt]; + if (tq->fcport == NULL) { + break; + } + + tgt_fcport = tq->fcport; + if (memcmp(tmp_wwpn, tgt_fcport->port_name, + EXT_DEF_WWN_NAME_SIZE) == 0) { + break; + } + } + + if (tq == NULL || tgt >= MAX_TARGETS) { + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + DEBUG9_10(printk("%s(%ld): inst=%ld target dev not found. " + "tq=%p, tgt=%x.\n", __func__, ha->host_no, ha->instance, + tq, tgt);) + return (ret); + } + + if (tq->fcport == NULL) { /* dg 08/14/01 */ + pext->Status = EXT_STATUS_BUSY; + DEBUG9_10(printk("%s(%ld): inst=%ld target port not found. " + "tq=%p, tgt=%x.\n", + __func__, ha->host_no, ha->instance, tq, tgt);) + return (ret); + } + + /* Currently we only have bus 0 and no translation on LUN */ + b = 0; + l = 0; + + /* + * Return SCSI address. Currently no translation is done for + * LUN. + */ + tmp_addr.Bus = b; + tmp_addr.Target = tgt; + tmp_addr.Lun = l; + if (pext->ResponseLen > sizeof(EXT_SCSI_ADDR)) + pext->ResponseLen = sizeof(EXT_SCSI_ADDR); + + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr, + pext->ResponseLen); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR VERIFY wrt rsp buf\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + ret = copy_to_user((uint8_t *)pext->ResponseAdr, &tmp_addr, + pext->ResponseLen); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy rsp buffer.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + DEBUG9(printk(KERN_INFO + "%s(%ld): Found t%d l%d for %02x%02x%02x%02x%02x%02x%02x%02x.\n", + __func__, ha->host_no, + tmp_addr.Target, tmp_addr.Lun, + tmp_wwpn[0], tmp_wwpn[1], tmp_wwpn[2], tmp_wwpn[3], + tmp_wwpn[4], tmp_wwpn[5], tmp_wwpn[6], tmp_wwpn[7]);) + + pext->Status = EXT_STATUS_OK; + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} + +/* + * qla2x00_scsi_passthru + * Handles all subcommands of the EXT_CC_SEND_SCSI_PASSTHRU command. + * + * Input: + * ha = adapter state pointer. + * pext = EXT_IOCTL structure pointer. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_scsi_passthru(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int ret = 0; + struct scsi_cmnd *pscsi_cmd = NULL; + struct scsi_device *pscsi_device = NULL; + + DEBUG9(printk("%s(%ld): entered.\n", + __func__, ha->host_no);) + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&pscsi_cmd, + sizeof(struct scsi_cmnd))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(struct scsi_cmnd));) + return (ret); + } + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&pscsi_device, + sizeof(struct scsi_device))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(struct scsi_device));) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + switch(pext->SubCode) { + case EXT_SC_SEND_SCSI_PASSTHRU: + DEBUG9(printk("%s(%ld): got SCSI passthru cmd.\n", + __func__, ha->host_no);) + ret = qla2x00_sc_scsi_passthru(ha, pext, pscsi_cmd, + pscsi_device, mode); + break; + case EXT_SC_SEND_FC_SCSI_PASSTHRU: + DEBUG9(printk("%s(%ld): got FC SCSI passthru cmd.\n", + __func__, ha->host_no);) + ret = qla2x00_sc_fc_scsi_passthru(ha, pext, pscsi_cmd, + pscsi_device, mode); + break; + case EXT_SC_SCSI3_PASSTHRU: + DEBUG9(printk("%s(%ld): got SCSI3 passthru cmd.\n", + __func__, ha->host_no);) + ret = qla2x00_sc_scsi3_passthru(ha, pext, pscsi_cmd, + pscsi_device, mode); + break; + default: + DEBUG9_10(printk("%s: got invalid cmd.\n", __func__)); + break; + } + + qla2x00_free_ioctl_scrap_mem(ha); + DEBUG9(printk("%s(%ld): exiting.\n", + __func__, ha->host_no);) + + return (ret); +} + +static int +qla2x00_ioctl_scsi_queuecommand(scsi_qla_host_t *ha, EXT_IOCTL *pext, + struct scsi_cmnd *pscsi_cmd, struct scsi_device *pscsi_dev, + fc_port_t *pfcport, fc_lun_t *pfclun) +{ + int ret = 0; + int ret2 = 0; + uint8_t *usr_temp, *kernel_tmp; + uint32_t lun = 0, tgt = 0; +#if defined(QL_DEBUG_LEVEL_9) + uint32_t b, t, l; +#endif + os_lun_t *lq = NULL; + os_tgt_t *tq = NULL; + srb_t *sp = NULL; + + + DEBUG9(printk("%s(%ld): entered.\n", + __func__, ha->host_no);) + + if ((sp = qla2x00_get_new_sp(ha)) == NULL) { + + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR cannot alloc sp.\n", + __func__, ha->host_no, ha->instance);) + + pext->Status = EXT_STATUS_NO_MEMORY; + return (ret); + } + + switch(pext->SubCode) { + case EXT_SC_SEND_SCSI_PASSTHRU: + + tgt = pscsi_cmd->device->id; + lun = pscsi_cmd->device->lun; + + tq = (os_tgt_t *)TGT_Q(ha, tgt); + lq = (os_lun_t *)LUN_Q(ha, tgt, lun); + + break; + case EXT_SC_SEND_FC_SCSI_PASSTHRU: + if (pfcport == NULL || pfclun == NULL) { + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + DEBUG9_10(printk("%s(%ld): inst=%ld received invalid " + "pointers. fcport=%p fclun=%p.\n", + __func__, ha->host_no, ha->instance, pfcport, pfclun);) + atomic_set(&sp->ref_count, 0); + add_to_free_queue (ha, sp); + return (ret); + } + + if (pscsi_cmd->cmd_len != 6 && pscsi_cmd->cmd_len != 0x0A && + pscsi_cmd->cmd_len != 0x0C && pscsi_cmd->cmd_len != 0x10) { + DEBUG9_10(printk(KERN_WARNING + "%s(%ld): invalid Cdb Length 0x%x received.\n", + __func__, ha->host_no, + pscsi_cmd->cmd_len);) + pext->Status = EXT_STATUS_INVALID_PARAM; + atomic_set(&sp->ref_count, 0); + add_to_free_queue (ha, sp); + return (ret); + } + tq = ha->ioctl->ioctl_tq; + lq = ha->ioctl->ioctl_lq; + + break; + case EXT_SC_SCSI3_PASSTHRU: + if (pfcport == NULL || pfclun == NULL) { + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + DEBUG9_10(printk("%s(%ld): inst=%ld received invalid " + "pointers. fcport=%p fclun=%p.\n", + __func__, + ha->host_no, ha->instance, pfcport, pfclun);) + atomic_set(&sp->ref_count, 0); + add_to_free_queue (ha, sp); + return (ret); + } + + tq = ha->ioctl->ioctl_tq; + lq = ha->ioctl->ioctl_lq; + + break; + default: + break; + } + + sp->ha = ha; + sp->cmd = pscsi_cmd; + sp->flags = SRB_IOCTL; + + /* set local fc_scsi_cmd's sp pointer to sp */ + CMD_SP(pscsi_cmd) = (void *) sp; + + if (pscsi_cmd->sc_data_direction == SCSI_DATA_WRITE) { + /* sending user data from pext->ResponseAdr to device */ + ret = verify_area(VERIFY_READ, (void *)pext->ResponseAdr, + pext->ResponseLen); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify read " + "ResponseAdr.\n", + __func__, ha->host_no, ha->instance);) + atomic_set(&sp->ref_count, 0); + add_to_free_queue (ha, sp); + + return (ret); + } + + usr_temp = (uint8_t *)pext->ResponseAdr; + kernel_tmp = (uint8_t *)ha->ioctl_mem; + ret = copy_from_user(kernel_tmp, usr_temp, pext->ResponseLen); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy " + "failed(%d) on rsp buf.\n", + __func__, ha->host_no, ha->instance, ret);) + atomic_set(&sp->ref_count, 0); + add_to_free_queue (ha, sp); + + return (ret); + } + } + + pscsi_cmd->device->host = ha->host; + + /* mark this as a special delivery and collection command */ + pscsi_cmd->scsi_done = qla2x00_scsi_pt_done; + + pscsi_cmd->device = pscsi_dev; + pscsi_cmd->device->tagged_supported = 0; + pscsi_cmd->use_sg = 0; /* no ScatterGather */ + pscsi_cmd->request_bufflen = pext->ResponseLen; + pscsi_cmd->request_buffer = ha->ioctl_mem; + pscsi_cmd->timeout_per_command = QLA_PT_CMD_TOV * HZ; + + if (tq && lq) { + if (pext->SubCode == EXT_SC_SEND_SCSI_PASSTHRU) { + pfcport = lq->fclun->fcport; + pfclun = lq->fclun; + + if (pfcport == NULL || pfclun == NULL) { + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + DEBUG9_10(printk("%s(%ld): inst=%ld scsi pt " + "rcvd invalid ptrs. fcport=%p fclun=%p.\n", + __func__, ha->host_no, ha->instance, + pfcport, pfclun);) + atomic_set(&sp->ref_count, 0); + add_to_free_queue (ha, sp); + return (ret); + } + + } else { + if (pext->SubCode == EXT_SC_SCSI3_PASSTHRU) + /* The LUN value is of FCP LUN format */ + tq->olun[pfclun->lun & 0xff] = lq; + else + tq->olun[pfclun->lun] = lq; + + tq->ha = ha; + lq->fclun = pfclun; + } + + sp->lun_queue = lq; + sp->tgt_queue = tq; + sp->fclun = pfclun; + } else { + /* cannot send command without a queue. force error. */ + pfcport = NULL; + DEBUG9_10(printk("%s(%ld): error dev q not found. tq=%p lq=%p.\n", + __func__, ha->host_no, tq, lq);) + } + + DEBUG9({ + b = pscsi_cmd->device->channel; + t = pscsi_cmd->device->id; + l = pscsi_cmd->device->lun; + }) + DEBUG9(printk("%s(%ld): ha instance=%ld tq=%p lq=%p " + "pfclun=%p pfcport=%p.\n", + __func__, ha->host_no, ha->instance, tq, lq, pfclun, + pfcport);) + DEBUG9(printk("\tCDB=%02x %02x %02x %02x; b=%x t=%x l=%x.\n", + pscsi_cmd->cmnd[0], pscsi_cmd->cmnd[1], pscsi_cmd->cmnd[2], + pscsi_cmd->cmnd[3], b, t, l);) + + /* + * Check the status of the port + */ + if (pext->SubCode == EXT_SC_SEND_SCSI_PASSTHRU) { + if (qla2x00_check_tgt_status(ha, pscsi_cmd)) { + DEBUG9_10(printk("%s(%ld): inst=%ld check_tgt_status " + "failed.\n", + __func__, ha->host_no, ha->instance);) + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + atomic_set(&sp->ref_count, 0); + add_to_free_queue (ha, sp); + return (ret); + } + } else { + ret2 = qla2x00_check_port_status(ha, pfcport); + if (ret2 != QLA_SUCCESS) { + DEBUG9_10(printk("%s(%ld): inst=%ld check_port_status " + "failed.\n", + __func__, ha->host_no, ha->instance);) + if (ret2 == QLA_BUSY) + pext->Status = EXT_STATUS_BUSY; + else + pext->Status = EXT_STATUS_ERR; + atomic_set(&sp->ref_count, 0); + add_to_free_queue (ha, sp); + return (ret); + } + } + + /* set flag to indicate IOCTL SCSI PassThru in progress */ + ha->ioctl->SCSIPT_InProgress = 1; + ha->ioctl->ioctl_tov = (int)QLA_PT_CMD_DRV_TOV; + + /* prepare for receiving completion. */ + qla2x00_ioctl_sem_init(ha); + CMD_COMPL_STATUS(pscsi_cmd) = (int) IOCTL_INVALID_STATUS; + + /* send command to adapter */ + DEBUG9(printk("%s(%ld): inst=%ld sending command.\n", + __func__, ha->host_no, ha->instance);) + + add_to_pending_queue(ha, sp); + + qla2x00_next(ha); + + DEBUG9(printk("%s(%ld): exiting.\n", + __func__, ha->host_no);) + return (ret); +} + +/* + * qla2x00_sc_scsi_passthru + * Handles EXT_SC_SEND_SCSI_PASSTHRU subcommand. + * + * Input: + * ha = adapter state pointer. + * pext = EXT_IOCTL structure pointer. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_sc_scsi_passthru(scsi_qla_host_t *ha, EXT_IOCTL *pext, + struct scsi_cmnd *pscsi_cmd, struct scsi_device *pscsi_device, int mode) +{ + int ret = 0; + uint8_t *usr_temp, *kernel_tmp; + uint32_t i; + + uint32_t transfer_len; + + EXT_SCSI_PASSTHRU *pscsi_pass; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + ret = verify_area(VERIFY_READ, (void *)pext->RequestAdr, + sizeof(EXT_SCSI_PASSTHRU)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify READ " + "req buf.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + if (pext->ResponseLen > ha->ioctl_mem_size) { + if (qla2x00_get_new_ioctl_dma_mem(ha, pext->ResponseLen) != + QLA_SUCCESS) { + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR cannot alloc " + "requested DMA buffer size %x.\n", + __func__, ha->host_no, ha->instance, + pext->ResponseLen);) + pext->Status = EXT_STATUS_NO_MEMORY; + return (ret); + } + } + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&pscsi_pass, + sizeof(EXT_SCSI_PASSTHRU))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(EXT_SCSI_PASSTHRU));) + return (ret); + } + + /* clear ioctl_mem to be used */ + memset(ha->ioctl_mem, 0, ha->ioctl_mem_size); + + /* Copy request buffer */ + usr_temp = (uint8_t *)pext->RequestAdr; + kernel_tmp = (uint8_t *)pscsi_pass; + ret = copy_from_user(kernel_tmp, usr_temp, sizeof(EXT_SCSI_PASSTHRU)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk( + "%s(%ld): inst=%ld ERROR copy req buf ret=%d\n", + __func__, ha->host_no, ha->instance, ret);) + return (ret); + } + + /* set target coordinates */ + pscsi_cmd->device->id = pscsi_pass->TargetAddr.Target; + pscsi_cmd->device->lun = pscsi_pass->TargetAddr.Lun; + + /* Verify target exists */ + if (TGT_Q(ha, pscsi_cmd->device->id) == NULL) { + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR tgt %d not found.\n", + __func__, + ha->host_no, ha->instance, pscsi_cmd->device->id)); + return (ret); + } + + /* Copy over cdb */ + + if (pscsi_pass->CdbLength == 6) { + pscsi_cmd->cmd_len = 6; + + } else if (pscsi_pass->CdbLength == 10) { + pscsi_cmd->cmd_len = 0x0A; + + } else if (pscsi_pass->CdbLength == 12) { + pscsi_cmd->cmd_len = 0x0C; + + } else { + printk(KERN_WARNING + "%s: Unsupported Cdb Length=%x.\n", + __func__, pscsi_pass->CdbLength); + + pext->Status = EXT_STATUS_INVALID_PARAM; + + return (ret); + } + + memcpy(pscsi_cmd->data_cmnd, pscsi_pass->Cdb, pscsi_cmd->cmd_len); + memcpy(pscsi_cmd->cmnd, pscsi_pass->Cdb, pscsi_cmd->cmd_len); + + DEBUG9(printk("%s Dump of cdb buffer:\n", __func__);) + DEBUG9(qla2x00_dump_buffer((uint8_t *)&pscsi_cmd->data_cmnd[0], + pscsi_cmd->cmd_len);) + + if (pscsi_pass->Direction == EXT_DEF_SCSI_PASSTHRU_DATA_OUT) { + pscsi_cmd->sc_data_direction = SCSI_DATA_WRITE; + } else { + pscsi_cmd->sc_data_direction = SCSI_DATA_READ; + } + + /* send command to adapter */ + DEBUG9(printk("%s(%ld): inst=%ld sending command.\n", + __func__, ha->host_no, ha->instance);) + + if ((ret = qla2x00_ioctl_scsi_queuecommand(ha, pext, pscsi_cmd, + pscsi_device, NULL, NULL))) { + return (ret); + } + + ha->ioctl->cmpl_timer.expires = jiffies + ha->ioctl->ioctl_tov * HZ; + add_timer(&ha->ioctl->cmpl_timer); + + DEBUG9(printk("%s(%ld): inst=%ld waiting for completion.\n", + __func__, ha->host_no, ha->instance);) + + down(&ha->ioctl->cmpl_sem); + + del_timer(&ha->ioctl->cmpl_timer); + + DEBUG9(printk("%s(%ld): inst=%ld completed.\n", + __func__, ha->host_no, ha->instance);) + + if (ha->ioctl->SCSIPT_InProgress == 1) { + + printk(KERN_WARNING + "qla2x00: scsi%ld ERROR passthru command timeout.\n", + ha->host_no); + + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + return (ret); + } + + if (CMD_COMPL_STATUS(pscsi_cmd) == (int)IOCTL_INVALID_STATUS) { + + DEBUG9(printk("%s(%ld): inst=%ld ERROR - cmd not completed.\n", + __func__, ha->host_no, ha->instance);) + + pext->Status = EXT_STATUS_ERR; + return (ret); + } + + switch (CMD_COMPL_STATUS(pscsi_cmd)) { + case CS_INCOMPLETE: + case CS_ABORTED: + case CS_PORT_UNAVAILABLE: + case CS_PORT_LOGGED_OUT: + case CS_PORT_CONFIG_CHG: + case CS_PORT_BUSY: + DEBUG9_10(printk("%s(%ld): inst=%ld cs err = %x.\n", + __func__, ha->host_no, ha->instance, + CMD_COMPL_STATUS(pscsi_cmd));) + pext->Status = EXT_STATUS_BUSY; + + return (ret); + } + + if ((CMD_SCSI_STATUS(pscsi_cmd) & 0xff) != 0) { + + /* have done the post function */ + pext->Status = EXT_STATUS_SCSI_STATUS; + pext->DetailStatus = CMD_SCSI_STATUS(pscsi_cmd) & 0xff; + + DEBUG9_10(printk(KERN_INFO "%s(%ld): inst=%ld scsi err. " + "host status =0x%x, scsi status = 0x%x.\n", + __func__, ha->host_no, ha->instance, + CMD_COMPL_STATUS(pscsi_cmd), CMD_SCSI_STATUS(pscsi_cmd));) + } else { + if (CMD_COMPL_STATUS(pscsi_cmd) == CS_DATA_OVERRUN) { + pext->Status = EXT_STATUS_DATA_OVERRUN; + + DEBUG9_10(printk(KERN_INFO + "%s(%ld): inst=%ld return overrun.\n", + __func__, ha->host_no, ha->instance);) + + } else if (CMD_COMPL_STATUS(pscsi_cmd) == CS_DATA_UNDERRUN && + (CMD_SCSI_STATUS(pscsi_cmd) & SS_RESIDUAL_UNDER)) { + pext->Status = EXT_STATUS_DATA_UNDERRUN; + + DEBUG9_10(printk(KERN_INFO + "%s(%ld): inst=%ld return underrun.\n", + __func__, ha->host_no, ha->instance);) + + } else if (CMD_COMPL_STATUS(pscsi_cmd) != 0 || + CMD_SCSI_STATUS(pscsi_cmd) != 0) { + pext->Status = EXT_STATUS_ERR; + + DEBUG9_10(printk(KERN_INFO + "%s(%ld): inst=%ld, cs err=%x, scsi err=%x.\n", + __func__, ha->host_no, ha->instance, + CMD_COMPL_STATUS(pscsi_cmd), + CMD_SCSI_STATUS(pscsi_cmd));) + + return (ret); + } + } + + /* copy up structure to make sense data available to user */ + pscsi_pass->SenseLength = CMD_ACTUAL_SNSLEN(pscsi_cmd); + if (CMD_ACTUAL_SNSLEN(pscsi_cmd)) { + for (i = 0; i < CMD_ACTUAL_SNSLEN(pscsi_cmd); i++) + pscsi_pass->SenseData[i] = pscsi_cmd->sense_buffer[i]; + + DEBUG10(printk("%s Dump of sense buffer:\n", __func__);) + DEBUG10(qla2x00_dump_buffer( + (uint8_t *)&pscsi_pass->SenseData[0], + CMD_ACTUAL_SNSLEN(pscsi_cmd));) + + ret = verify_area(VERIFY_WRITE, (void *)pext->RequestAdr, + sizeof(EXT_SCSI_PASSTHRU)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify WRITE " + "req buf.\n", __func__, ha->host_no, ha->instance);) + return (ret); + } + + usr_temp = (uint8_t *)pext->RequestAdr; + kernel_tmp = (uint8_t *)pscsi_pass; + ret = copy_to_user(usr_temp, kernel_tmp, + sizeof(EXT_SCSI_PASSTHRU)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy sense " + "buffer.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + } + + if (pscsi_pass->Direction == EXT_DEF_SCSI_PASSTHRU_DATA_IN) { + DEBUG9(printk("%s(%ld): inst=%ld copying data.\n", + __func__, ha->host_no, ha->instance);) + + /* getting device data and putting in pext->ResponseAdr */ + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr , + pext->ResponseLen); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify write " + "ResponseAdr.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + /* now copy up the READ data to user */ + if ((CMD_COMPL_STATUS(pscsi_cmd) == CS_DATA_UNDERRUN) && + (CMD_RESID_LEN(pscsi_cmd))) { + + transfer_len = pext->ResponseLen - + CMD_RESID_LEN(pscsi_cmd); + + pext->ResponseLen = transfer_len; + } else { + transfer_len = pext->ResponseLen; + } + + DEBUG9_10(printk(KERN_INFO + "%s(%ld): final transferlen=%d.\n", + __func__, ha->host_no, transfer_len);) + + usr_temp = (uint8_t *)pext->ResponseAdr; + kernel_tmp = (uint8_t *)ha->ioctl_mem; + ret = copy_to_user(usr_temp, kernel_tmp, transfer_len); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk( + "%s(%ld): inst=%ld ERROR copy rsp buf\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + } + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} + +/* + * qla2x00_sc_fc_scsi_passthru + * Handles EXT_SC_SEND_FC_SCSI_PASSTHRU subcommand. + * + * Input: + * ha = adapter state pointer. + * pext = EXT_IOCTL structure pointer. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_sc_fc_scsi_passthru(scsi_qla_host_t *ha, EXT_IOCTL *pext, + struct scsi_cmnd *pfc_scsi_cmd, struct scsi_device *pfc_scsi_device, + int mode) +{ + int ret = 0; + int port_found, lun_found; + fc_lun_t temp_fclun; + struct list_head *fcpl; + fc_port_t *fcport; + struct list_head *fcll; + fc_lun_t *fclun; + uint8_t *usr_temp, *kernel_tmp; + uint32_t i; + + uint32_t transfer_len; + + EXT_FC_SCSI_PASSTHRU *pfc_scsi_pass; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + DEBUG9_10( + if (!pfc_scsi_cmd || !pfc_scsi_device) { + printk("%s(%ld): invalid pointer received. " + "pfc_scsi_cmd=%p, pfc_scsi_device=%p.\n", + __func__, ha->host_no, pfc_scsi_cmd, + pfc_scsi_device); + return (ret); + } + ) + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&pfc_scsi_pass, + sizeof(EXT_FC_SCSI_PASSTHRU))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(EXT_FC_SCSI_PASSTHRU));) + return (ret); + } + + /* clear ioctl_mem to be used */ + memset(ha->ioctl_mem, 0, ha->ioctl_mem_size); + + ret = verify_area(VERIFY_READ, (void *)pext->RequestAdr, + sizeof(EXT_FC_SCSI_PASSTHRU)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk( + "%s(%ld): inst=%ld ERROR verify READ req buf.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); + } + + if (pext->ResponseLen > ha->ioctl_mem_size) { + if (qla2x00_get_new_ioctl_dma_mem(ha, pext->ResponseLen) != + QLA_SUCCESS) { + + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR cannot alloc " + "requested DMA buffer size %x.\n", + __func__, ha->host_no, ha->instance, + pext->ResponseLen);) + + pext->Status = EXT_STATUS_NO_MEMORY; + return (ret); + } + } + + /* Copy request buffer */ + usr_temp = (uint8_t *)pext->RequestAdr; + kernel_tmp = (uint8_t *)pfc_scsi_pass; + ret = copy_from_user(kernel_tmp, usr_temp, + sizeof(EXT_FC_SCSI_PASSTHRU)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk( + "%s(%ld): inst=%ld ERROR copy req buf ret=%d\n", + __func__, ha->host_no, ha->instance, ret);) + + return (ret); + } + + if (pfc_scsi_pass->FCScsiAddr.DestType != EXT_DEF_DESTTYPE_WWPN) { + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR -wrong Dest type. \n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + fcport = NULL; + fclun = NULL; + port_found = lun_found = 0; + list_for_each(fcpl, &ha->fcports) { + fcport = list_entry(fcpl, fc_port_t, list); + + if (memcmp(fcport->port_name, + pfc_scsi_pass->FCScsiAddr.DestAddr.WWPN, 8) != 0) { + continue; + + } + port_found++; + + list_for_each(fcll, &fcport->fcluns) { + fclun = list_entry(fcll, fc_lun_t, list); + + if (fclun->lun == pfc_scsi_pass->FCScsiAddr.Lun) { + /* Found the right LUN */ + lun_found++; + break; + } + } + break; + } + + if (!port_found) { + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + DEBUG9_10(printk("%s(%ld): inst=%ld FC AddrFormat - DID NOT " + "FIND Port matching WWPN.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + /* v5.21b9 - use a temporary fclun */ + if (!lun_found) { + fclun = &temp_fclun; + fclun->fcport = fcport; + fclun->lun = pfc_scsi_pass->FCScsiAddr.Lun; + } + + /* set target coordinates */ + pfc_scsi_cmd->device->id = 0xff; /* not used. just put something there. */ + pfc_scsi_cmd->device->lun = pfc_scsi_pass->FCScsiAddr.Lun; + + DEBUG9(printk("%s(%ld): inst=%ld cmd for loopid=%04x L=%04x " + "WWPN=%02x%02x%02x%02x%02x%02x%02x%02x.\n", + __func__, ha->host_no, ha->instance, fclun->fcport->loop_id, + pfc_scsi_cmd->device->lun, + pfc_scsi_pass->FCScsiAddr.DestAddr.WWPN[0], + pfc_scsi_pass->FCScsiAddr.DestAddr.WWPN[1], + pfc_scsi_pass->FCScsiAddr.DestAddr.WWPN[2], + pfc_scsi_pass->FCScsiAddr.DestAddr.WWPN[3], + pfc_scsi_pass->FCScsiAddr.DestAddr.WWPN[4], + pfc_scsi_pass->FCScsiAddr.DestAddr.WWPN[5], + pfc_scsi_pass->FCScsiAddr.DestAddr.WWPN[6], + pfc_scsi_pass->FCScsiAddr.DestAddr.WWPN[7]);) + + if (pfc_scsi_pass->CdbLength == 6) { + pfc_scsi_cmd->cmd_len = 6; + + } else if (pfc_scsi_pass->CdbLength == 0x0A) { + pfc_scsi_cmd->cmd_len = 0x0A; + + } else if (pfc_scsi_pass->CdbLength == 0x0C) { + pfc_scsi_cmd->cmd_len = 0x0C; + + } else if (pfc_scsi_pass->CdbLength == 0x10) { + pfc_scsi_cmd->cmd_len = 0x10; + } else { + printk(KERN_WARNING + "qla2x00_ioctl: FC_SCSI_PASSTHRU Unknown Cdb Length=%x.\n", + pfc_scsi_pass->CdbLength); + pext->Status = EXT_STATUS_INVALID_PARAM; + + return (ret); + } + + memcpy(pfc_scsi_cmd->data_cmnd, pfc_scsi_pass->Cdb, + pfc_scsi_cmd->cmd_len); + memcpy(pfc_scsi_cmd->cmnd, pfc_scsi_pass->Cdb, + pfc_scsi_cmd->cmd_len); + + DEBUG9(printk("%s Dump of cdb buffer:\n", __func__);) + DEBUG9(qla2x00_dump_buffer((uint8_t *)&pfc_scsi_cmd->data_cmnd[0], 16);) + + if (pfc_scsi_pass->Direction == EXT_DEF_SCSI_PASSTHRU_DATA_OUT) { + pfc_scsi_cmd->sc_data_direction = SCSI_DATA_WRITE; + } else { + pfc_scsi_cmd->sc_data_direction = SCSI_DATA_READ; + } + + /* send command to adapter */ + DEBUG9(printk("%s(%ld): inst=%ld queuing command.\n", + __func__, ha->host_no, ha->instance);) + + if ((ret = qla2x00_ioctl_scsi_queuecommand(ha, pext, pfc_scsi_cmd, + pfc_scsi_device, fcport, fclun))) { + return (ret); + } + + /* Wait for comletion */ + ha->ioctl->cmpl_timer.expires = jiffies + ha->ioctl->ioctl_tov * HZ; + add_timer(&ha->ioctl->cmpl_timer); + + down(&ha->ioctl->cmpl_sem); + + del_timer(&ha->ioctl->cmpl_timer); + + if (ha->ioctl->SCSIPT_InProgress == 1) { + + printk(KERN_WARNING + "qla2x00: scsi%ld ERROR passthru command timeout.\n", + ha->host_no); + + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + return (ret); + } + + if (CMD_COMPL_STATUS(pfc_scsi_cmd) == (int)IOCTL_INVALID_STATUS) { + + DEBUG9(printk("%s(%ld): inst=%ld ERROR. cmd not completed.\n", + __func__, ha->host_no, ha->instance);) + + pext->Status = EXT_STATUS_ERR; + return (ret); + } + + switch (CMD_COMPL_STATUS(pfc_scsi_cmd)) { + case CS_INCOMPLETE: + case CS_ABORTED: + case CS_PORT_UNAVAILABLE: + case CS_PORT_LOGGED_OUT: + case CS_PORT_CONFIG_CHG: + case CS_PORT_BUSY: + DEBUG9_10(printk("%s(%ld): inst=%ld cs err = %x.\n", + __func__, ha->host_no, ha->instance, + CMD_COMPL_STATUS(pfc_scsi_cmd));) + pext->Status = EXT_STATUS_BUSY; + + return (ret); + } + + if ((CMD_COMPL_STATUS(pfc_scsi_cmd) == CS_DATA_UNDERRUN) || + (CMD_SCSI_STATUS(pfc_scsi_cmd) != 0)) { + + /* have done the post function */ + pext->Status = EXT_STATUS_SCSI_STATUS; + /* The SDMAPI is only concerned with the low-order byte */ + pext->DetailStatus = CMD_SCSI_STATUS(pfc_scsi_cmd) & 0xff; + + DEBUG9_10(printk("%s(%ld): inst=%ld data underrun or scsi err. " + "host status =0x%x, scsi status = 0x%x.\n", + __func__, ha->host_no, ha->instance, + CMD_COMPL_STATUS(pfc_scsi_cmd), + CMD_SCSI_STATUS(pfc_scsi_cmd));) + + } else if (CMD_COMPL_STATUS(pfc_scsi_cmd) != 0) { + DEBUG9_10(printk("%s(%ld): inst=%ld cs err=%x.\n", + __func__, ha->host_no, ha->instance, + CMD_COMPL_STATUS(pfc_scsi_cmd));) + pext->Status = EXT_STATUS_ERR; + + return (ret); + } + + /* Process completed command */ + DEBUG9(printk("%s(%ld): inst=%ld done. host status=0x%x, " + "scsi status=0x%x.\n", + __func__, ha->host_no, ha->instance, CMD_COMPL_STATUS(pfc_scsi_cmd), + CMD_SCSI_STATUS(pfc_scsi_cmd));) + + /* copy up structure to make sense data available to user */ + pfc_scsi_pass->SenseLength = CMD_ACTUAL_SNSLEN(pfc_scsi_cmd); + if (CMD_ACTUAL_SNSLEN(pfc_scsi_cmd)) { + DEBUG9_10(printk("%s(%ld): inst=%ld sense[0]=%x sense[2]=%x.\n", + __func__, ha->host_no, ha->instance, + pfc_scsi_cmd->sense_buffer[0], + pfc_scsi_cmd->sense_buffer[2]);) + + for (i = 0; i < CMD_ACTUAL_SNSLEN(pfc_scsi_cmd); i++) { + pfc_scsi_pass->SenseData[i] = + pfc_scsi_cmd->sense_buffer[i]; + } + + ret = verify_area(VERIFY_WRITE, (void *)pext->RequestAdr, + sizeof(EXT_FC_SCSI_PASSTHRU)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify WRITE " + "RequestAdr.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + usr_temp = (uint8_t *)pext->RequestAdr; + kernel_tmp = (uint8_t *)pfc_scsi_pass; + ret = copy_to_user(usr_temp, kernel_tmp, + sizeof(EXT_FC_SCSI_PASSTHRU)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy sense " + "buffer.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + } + + if (pfc_scsi_pass->Direction == EXT_DEF_SCSI_PASSTHRU_DATA_IN) { + + DEBUG9(printk("%s(%ld): inst=%ld copying data.\n", + __func__, ha->host_no, ha->instance);) + + /* getting device data and putting in pext->ResponseAdr */ + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr, + pext->ResponseLen); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify write " + "ResponseAdr.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); + } + + /* now copy up the READ data to user */ + if ((CMD_COMPL_STATUS(pfc_scsi_cmd) == CS_DATA_UNDERRUN) && + (CMD_RESID_LEN(pfc_scsi_cmd))) { + + transfer_len = pext->ResponseLen - + CMD_RESID_LEN(pfc_scsi_cmd); + + pext->ResponseLen = transfer_len; + } else { + transfer_len = pext->ResponseLen; + } + + usr_temp = (uint8_t *)pext->ResponseAdr; + kernel_tmp = (uint8_t *)ha->ioctl_mem; + ret = copy_to_user(usr_temp, kernel_tmp, transfer_len); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk( + "%s(%ld): inst=%ld ERROR copy rsp buf\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + } + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} + +/* + * qla2x00_sc_scsi3_passthru + * Handles EXT_SC_SCSI3_PASSTHRU subcommand. + * + * Input: + * ha = adapter state pointer. + * pext = EXT_IOCTL structure pointer. + * mode = not used. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_sc_scsi3_passthru(scsi_qla_host_t *ha, EXT_IOCTL *pext, + struct scsi_cmnd *pscsi3_cmd, struct scsi_device *pscsi3_device, int mode) +{ +#define MAX_SCSI3_CDB_LEN 16 + + int ret = 0; + int found; + fc_lun_t temp_fclun; + fc_lun_t *fclun = NULL; + struct list_head *fcpl; + fc_port_t *fcport; + uint8_t *usr_temp, *kernel_tmp; + uint32_t transfer_len; + uint32_t i; + + EXT_FC_SCSI_PASSTHRU *pscsi3_pass; + + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + DEBUG9_10( + if (!pscsi3_cmd || !pscsi3_device) { + printk("%s(%ld): invalid pointer received. " + "pfc_scsi_cmd=%p, pfc_scsi_device=%p.\n", + __func__, ha->host_no, pscsi3_cmd, + pscsi3_device); + return (ret); + } + ) + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&pscsi3_pass, + sizeof(EXT_FC_SCSI_PASSTHRU))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(EXT_FC_SCSI_PASSTHRU));) + return (ret); + } + + + /* clear ioctl_mem to be used */ + memset(ha->ioctl_mem, 0, ha->ioctl_mem_size); + + ret = verify_area(VERIFY_READ, (void *)pext->RequestAdr, + sizeof(EXT_FC_SCSI_PASSTHRU)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify READ " + "req buf.\n", __func__, ha->host_no, ha->instance);) + return (ret); + } + + if (pext->ResponseLen > ha->ioctl_mem_size) { + if (qla2x00_get_new_ioctl_dma_mem(ha, pext->ResponseLen) != + QLA_SUCCESS) { + + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR cannot " + "alloc requested DMA buffer size=%x.\n", + __func__, ha->host_no, ha->instance, + pext->ResponseLen);) + + pext->Status = EXT_STATUS_NO_MEMORY; + return (ret); + } + } + + /* Copy request buffer */ + usr_temp = (uint8_t *)pext->RequestAdr; + kernel_tmp = (uint8_t *)pscsi3_pass; + ret = copy_from_user(kernel_tmp, usr_temp, + sizeof(EXT_FC_SCSI_PASSTHRU)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk( + "%s(%ld): inst=%ld ERROR copy req buf ret=%d\n", + __func__, ha->host_no, ha->instance, ret);) + return (ret); + } + + if (pscsi3_pass->FCScsiAddr.DestType != EXT_DEF_DESTTYPE_WWPN) { + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR - wrong Dest type.\n", + __func__, ha->host_no, ha->instance);) + ret = EXT_STATUS_ERR; + + return (ret); + } + + /* + * For this ioctl command we always assume all 16 bytes are + * initialized. + */ + if (pscsi3_pass->CdbLength != MAX_SCSI3_CDB_LEN) { + pext->Status = EXT_STATUS_INVALID_PARAM; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR -wrong Cdb Len %d.\n", + __func__, ha->host_no, ha->instance, + pscsi3_pass->CdbLength);) + return (ret); + } + + fcport = NULL; + found = 0; + list_for_each(fcpl, &ha->fcports) { + fcport = list_entry(fcpl, fc_port_t, list); + + if (memcmp(fcport->port_name, + pscsi3_pass->FCScsiAddr.DestAddr.WWPN, 8) == 0) { + found++; + break; + } + } + if (!found) { + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + + DEBUG9_10(printk("%s(%ld): inst=%ld DID NOT FIND Port for WWPN " + "%02x%02x%02x%02x%02x%02x%02x%02x.\n", + __func__, ha->host_no, ha->instance, + pscsi3_pass->FCScsiAddr.DestAddr.WWPN[0], + pscsi3_pass->FCScsiAddr.DestAddr.WWPN[1], + pscsi3_pass->FCScsiAddr.DestAddr.WWPN[2], + pscsi3_pass->FCScsiAddr.DestAddr.WWPN[3], + pscsi3_pass->FCScsiAddr.DestAddr.WWPN[4], + pscsi3_pass->FCScsiAddr.DestAddr.WWPN[5], + pscsi3_pass->FCScsiAddr.DestAddr.WWPN[6], + pscsi3_pass->FCScsiAddr.DestAddr.WWPN[7]);) + + return (ret); + } + + /* Use a temporary fclun to send out the command. */ + fclun = &temp_fclun; + fclun->fcport = fcport; + fclun->lun = pscsi3_pass->FCScsiAddr.Lun; + + /* set target coordinates */ + pscsi3_cmd->device->id = 0xff; /* not used. just put something there. */ + pscsi3_cmd->device->lun = pscsi3_pass->FCScsiAddr.Lun; + + DEBUG9(printk("%s(%ld): inst=%ld cmd for loopid=%04x L=%04x " + "WWPN=%02x%02x%02x%02x%02x%02x%02x%02x.\n", + __func__, ha->host_no, ha->instance, + fclun->fcport->loop_id, pscsi3_cmd->device->lun, + pscsi3_pass->FCScsiAddr.DestAddr.WWPN[0], + pscsi3_pass->FCScsiAddr.DestAddr.WWPN[1], + pscsi3_pass->FCScsiAddr.DestAddr.WWPN[2], + pscsi3_pass->FCScsiAddr.DestAddr.WWPN[3], + pscsi3_pass->FCScsiAddr.DestAddr.WWPN[4], + pscsi3_pass->FCScsiAddr.DestAddr.WWPN[5], + pscsi3_pass->FCScsiAddr.DestAddr.WWPN[6], + pscsi3_pass->FCScsiAddr.DestAddr.WWPN[7]);) + + pscsi3_cmd->cmd_len = MAX_SCSI3_CDB_LEN; + memcpy(pscsi3_cmd->data_cmnd, pscsi3_pass->Cdb, pscsi3_cmd->cmd_len); + memcpy(pscsi3_cmd->cmnd, pscsi3_pass->Cdb, pscsi3_cmd->cmd_len); + + DEBUG9(printk("%s(%ld): inst=%ld cdb buffer dump:\n", + __func__, ha->host_no, ha->instance);) + DEBUG9(qla2x00_dump_buffer((uint8_t *)&pscsi3_cmd->data_cmnd[0], 16);) + + if ((ret = qla2x00_ioctl_scsi_queuecommand(ha, pext, pscsi3_cmd, + pscsi3_device, fcport, fclun))) { + return (ret); + } + + /* Wait for comletion */ + ha->ioctl->cmpl_timer.expires = jiffies + ha->ioctl->ioctl_tov * HZ; + add_timer(&ha->ioctl->cmpl_timer); + + down(&ha->ioctl->cmpl_sem); + + del_timer(&ha->ioctl->cmpl_timer); + + if (ha->ioctl->SCSIPT_InProgress == 1) { + + printk(KERN_WARNING + "qla2x00: inst=%ld scsi%ld ERROR PT command timeout.\n", + ha->host_no, ha->instance); + + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + return (ret); + + } + if (CMD_COMPL_STATUS(pscsi3_cmd) == (int)IOCTL_INVALID_STATUS) { + + DEBUG9(printk("%s(%ld): inst=%ld ERROR - cmd not completed.\n", + __func__, ha->host_no, ha->instance);) + + pext->Status = EXT_STATUS_ERR; + return (ret); + } + + if ((CMD_SCSI_STATUS(pscsi3_cmd) & 0xff) != 0) { + + /* have done the post function */ + pext->Status = EXT_STATUS_SCSI_STATUS; + pext->DetailStatus = CMD_SCSI_STATUS(pscsi3_cmd) & 0xff; + + DEBUG9_10(printk(KERN_INFO "%s(%ld): inst=%ld scsi err. " + "host status =0x%x, scsi status = 0x%x.\n", + __func__, ha->host_no, ha->instance, + CMD_COMPL_STATUS(pscsi3_cmd), CMD_SCSI_STATUS(pscsi3_cmd));) + + } else { + if (CMD_COMPL_STATUS(pscsi3_cmd) == CS_DATA_OVERRUN) { + pext->Status = EXT_STATUS_DATA_OVERRUN; + + DEBUG9_10(printk(KERN_INFO + "%s(%ld): inst=%ld return overrun.\n", + __func__, ha->host_no, ha->instance);) + + } else if (CMD_COMPL_STATUS(pscsi3_cmd) == CS_DATA_UNDERRUN && + (CMD_SCSI_STATUS(pscsi3_cmd) & SS_RESIDUAL_UNDER)) { + pext->Status = EXT_STATUS_DATA_UNDERRUN; + + DEBUG9_10(printk(KERN_INFO + "%s(%ld): inst=%ld return underrun.\n", + __func__, ha->host_no, ha->instance);) + + } else if (CMD_COMPL_STATUS(pscsi3_cmd) != 0 || + CMD_SCSI_STATUS(pscsi3_cmd) != 0) { + pext->Status = EXT_STATUS_ERR; + + DEBUG9_10(printk(KERN_INFO + "%s(%ld): inst=%ld, cs err=%x, scsi err=%x.\n", + __func__, ha->host_no, ha->instance, + CMD_COMPL_STATUS(pscsi3_cmd), + CMD_SCSI_STATUS(pscsi3_cmd));) + + return (ret); + } + } + + /* Process completed command */ + DEBUG9(printk("%s(%ld): inst=%ld done. host status=0x%x, " + "scsi status=0x%x.\n", + __func__, ha->host_no, ha->instance, CMD_COMPL_STATUS(pscsi3_cmd), + CMD_SCSI_STATUS(pscsi3_cmd));) + + /* copy up structure to make sense data available to user */ + pscsi3_pass->SenseLength = CMD_ACTUAL_SNSLEN(pscsi3_cmd); + if (CMD_ACTUAL_SNSLEN(pscsi3_cmd)) { + DEBUG9_10(printk("%s(%ld): inst=%ld sense[0]=%x sense[2]=%x.\n", + __func__, ha->host_no, ha->instance, + pscsi3_cmd->sense_buffer[0], + pscsi3_cmd->sense_buffer[2]);) + + for (i = 0; i < CMD_ACTUAL_SNSLEN(pscsi3_cmd); i++) { + pscsi3_pass->SenseData[i] = + pscsi3_cmd->sense_buffer[i]; + } + + ret = verify_area(VERIFY_WRITE, (void *)pext->RequestAdr, + sizeof(EXT_FC_SCSI_PASSTHRU)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify WRITE " + "RequestAdr.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + usr_temp = (uint8_t *)pext->RequestAdr; + kernel_tmp = (uint8_t *)pscsi3_pass; + ret = copy_to_user(usr_temp, kernel_tmp, + sizeof(EXT_FC_SCSI_PASSTHRU)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy sense " + "buffer.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + } + + if (pscsi3_pass->Direction == EXT_DEF_SCSI_PASSTHRU_DATA_IN) { + + DEBUG9(printk("%s(%ld): inst=%ld copying data.\n", + __func__, ha->host_no, ha->instance);) + + /* getting device data and putting in pext->ResponseAdr */ + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr, + pext->ResponseLen); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR verify write " + "ResponseAdr.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); + } + + /* now copy up the READ data to user */ + if ((CMD_COMPL_STATUS(pscsi3_cmd) == CS_DATA_UNDERRUN) && + (CMD_RESID_LEN(pscsi3_cmd))) { + + transfer_len = pext->ResponseLen - + CMD_RESID_LEN(pscsi3_cmd); + + pext->ResponseLen = transfer_len; + } else { + transfer_len = pext->ResponseLen; + } + + DEBUG9_10(printk(KERN_INFO + "%s(%ld): final transferlen=%d.\n", + __func__, ha->host_no, transfer_len);) + + usr_temp = (uint8_t *)pext->ResponseAdr; + kernel_tmp = (uint8_t *)ha->ioctl_mem; + ret = copy_to_user(usr_temp, kernel_tmp, transfer_len); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk( + "%s(%ld): inst=%ld ERROR copy rsp buf\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + } + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} + +/* + * qla2x00_send_els_rnid + * IOCTL to send extended link service RNID command to a target. + * + * Input: + * ha = adapter state pointer. + * pext = User space CT arguments pointer. + * mode = flags. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_send_els_rnid(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + EXT_RNID_REQ *tmp_rnid; + int ret = 0; + uint16_t mb[MAILBOX_REGISTER_COUNT]; + uint32_t copy_len; + int found; + uint16_t next_loop_id; + fc_port_t *fcport; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + if (ha->ioctl_mem_size < SEND_RNID_RSP_SIZE) { + if (qla2x00_get_new_ioctl_dma_mem(ha, + SEND_RNID_RSP_SIZE) != QLA_SUCCESS) { + + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR cannot alloc " + "DMA buffer. size=%x.\n", + __func__, ha->host_no, ha->instance, + SEND_RNID_RSP_SIZE);) + + pext->Status = EXT_STATUS_NO_MEMORY; + return (ret); + } + } + + if (pext->RequestLen != sizeof(EXT_RNID_REQ)) { + /* parameter error */ + DEBUG9_10(printk("%s(%ld): inst=%ld invalid req length %d.\n", + __func__, ha->host_no, ha->instance, pext->RequestLen);) + pext->Status = EXT_STATUS_INVALID_PARAM; + return (ret); + } + + ret = verify_area(VERIFY_READ, (void *)pext->RequestAdr, + pext->RequestLen); + + if (ret != 0) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk( + "%s(%ld): inst=%ld req buf verify READ FAILED\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + DEBUG9(printk("%s(%ld): inst=%ld req buf verified. Copying req data.\n", + __func__, ha->host_no, ha->instance);) + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&tmp_rnid, + sizeof(EXT_RNID_REQ))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(EXT_RNID_REQ));) + return (ret); + } + + ret = copy_from_user(tmp_rnid, pext->RequestAdr, pext->RequestLen); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk( + "%s(%ld): inst=%ld ERROR copy req buf ret=%d\n", + __func__, ha->host_no, ha->instance, ret);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + /* Find loop ID of the device */ + found = 0; + fcport = NULL; + switch (tmp_rnid->Addr.Type) { + case EXT_DEF_TYPE_WWNN: + DEBUG9(printk("%s(%ld): inst=%ld got node name.\n", + __func__, ha->host_no, ha->instance);) + + list_for_each_entry(fcport, &ha->fcports, list) { + if (fcport->port_type != FCT_INITIATOR || + fcport->port_type != FCT_TARGET) + continue; + + if (memcmp(tmp_rnid->Addr.FcAddr.WWNN, + fcport->node_name, EXT_DEF_WWN_NAME_SIZE)) + continue; + + if (fcport->port_type == FCT_TARGET) { + if (atomic_read(&fcport->state) != FCS_ONLINE) + continue; + } else { /* FCT_INITIATOR */ + if (!fcport->d_id.b24) + continue; + } + + found++; + } + break; + + case EXT_DEF_TYPE_WWPN: + DEBUG9(printk("%s(%ld): inst=%ld got port name.\n", + __func__, ha->host_no, ha->instance);) + + list_for_each_entry(fcport, &ha->fcports, list) { + if (fcport->port_type != FCT_INITIATOR || + fcport->port_type != FCT_TARGET) + continue; + + if (memcmp(tmp_rnid->Addr.FcAddr.WWPN, + fcport->port_name, EXT_DEF_WWN_NAME_SIZE)) + continue; + + if (fcport->port_type == FCT_TARGET) { + if (atomic_read(&fcport->state) != FCS_ONLINE) + continue; + } else { /* FCT_INITIATOR */ + if (!fcport->d_id.b24) + continue; + } + + found++; + } + break; + + case EXT_DEF_TYPE_PORTID: + DEBUG9(printk("%s(%ld): inst=%ld got port ID.\n", + __func__, ha->host_no, ha->instance);) + + list_for_each_entry(fcport, &ha->fcports, list) { + if (fcport->port_type != FCT_INITIATOR || + fcport->port_type != FCT_TARGET) + continue; + + /* PORTID bytes entered must already be big endian */ + if (memcmp(&tmp_rnid->Addr.FcAddr.Id[1], + &fcport->d_id, EXT_DEF_PORTID_SIZE_ACTUAL)) + continue; + + if (fcport->port_type == FCT_TARGET) { + if (atomic_read(&fcport->state) != FCS_ONLINE) + continue; + } + + found++; + } + break; + default: + /* parameter error */ + pext->Status = EXT_STATUS_INVALID_PARAM; + DEBUG9_10(printk("%s(%ld): inst=%ld invalid addressing type.\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + if (!found || (fcport->port_type == FCT_TARGET && + fcport->loop_id > SNS_LAST_LOOP_ID)) { + /* + * No matching device or the target device is not configured; + * just return error. + */ + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + /* check on loop down */ + if (ha->loop_state != LOOP_READY || + test_bit(CFG_ACTIVE, &ha->cfg_flags) || + test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || + test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || ha->dpc_active) { + + pext->Status = EXT_STATUS_BUSY; + DEBUG9_10(printk("%s(%ld): inst=%ld loop not ready.\n", + __func__, ha->host_no, ha->instance);) + + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + /* If this is for a host device, check if we need to perform login */ + if (fcport->port_type == FCT_INITIATOR && + fcport->loop_id >= SNS_LAST_LOOP_ID) { + next_loop_id = 0; + ret = qla2x00_fabric_login(ha, fcport, &next_loop_id); + if (ret != QLA_SUCCESS) { + /* login failed. */ + pext->Status = EXT_STATUS_DEV_NOT_FOUND; + + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR login to " + "host port failed. loop_id=%02x pid=%02x%02x%02x " + "ret=%d.\n", + __func__, ha->host_no, ha->instance, + fcport->loop_id, fcport->d_id.b.domain, + fcport->d_id.b.area, fcport->d_id.b.al_pa, ret);) + + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + } + + /* Send command */ + DEBUG9(printk("%s(%ld): inst=%ld sending rnid cmd.\n", + __func__, ha->host_no, ha->instance);) + + ret = qla2x00_send_rnid_mbx(ha, fcport->loop_id, + (uint8_t)tmp_rnid->DataFormat, ha->ioctl_mem_phys, + SEND_RNID_RSP_SIZE, &mb[0]); + + if (ret != QLA_SUCCESS) { + /* error */ + pext->Status = EXT_STATUS_ERR; + + DEBUG9_10(printk("%s(%ld): inst=%ld FAILED. rval = %x.\n", + __func__, ha->host_no, ha->instance, mb[0]);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + DEBUG9(printk("%s(%ld): inst=%ld rnid cmd sent ok.\n", + __func__, ha->host_no, ha->instance);) + + /* Copy the response */ + copy_len = (pext->ResponseLen > SEND_RNID_RSP_SIZE) ? + SEND_RNID_RSP_SIZE : pext->ResponseLen; + + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr, + copy_len); + + if (ret != 0) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk( + "%s(%ld): inst=%ld rsp buf verify WRITE error\n", + __func__, ha->host_no, ha->instance);) + } else { + ret = copy_to_user((uint8_t *)pext->ResponseAdr, + (uint8_t *)ha->ioctl_mem, copy_len); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk( + "%s(%ld): inst=%ld ERROR copy rsp buf\n", + __func__, ha->host_no, ha->instance);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + if (SEND_RNID_RSP_SIZE > pext->ResponseLen) { + pext->Status = EXT_STATUS_DATA_OVERRUN; + DEBUG9(printk("%s(%ld): inst=%ld data overrun. " + "exiting normally.\n", + __func__, ha->host_no, ha->instance);) + } else { + pext->Status = EXT_STATUS_OK; + DEBUG9(printk("%s(%ld): inst=%ld exiting normally.\n", + __func__, ha->host_no, ha->instance);) + } + pext->ResponseLen = copy_len; + } + + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); +} + +/* + * qla2x00_get_rnid_params + * IOCTL to get RNID parameters of the adapter. + * + * Input: + * ha = adapter state pointer. + * pext = User space CT arguments pointer. + * mode = flags. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_get_rnid_params(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int ret = 0; + int tmp_rval = 0; + uint32_t copy_len; + uint16_t mb[MAILBOX_REGISTER_COUNT]; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + /* check on loop down */ + if (ha->loop_state != LOOP_READY || + test_bit(CFG_ACTIVE, &ha->cfg_flags) || + test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || + test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || ha->dpc_active) { + + pext->Status = EXT_STATUS_BUSY; + DEBUG9_10(printk("%s(%ld): inst=%ld loop not ready.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); + } + + /* Send command */ + tmp_rval = qla2x00_get_rnid_params_mbx(ha, ha->ioctl_mem_phys, + sizeof(EXT_RNID_DATA), &mb[0]); + + if (tmp_rval != QLA_SUCCESS) { + /* error */ + pext->Status = EXT_STATUS_ERR; + + DEBUG9_10(printk("%s(%ld): inst=%ld cmd FAILED=%x.\n", + __func__, ha->host_no, ha->instance, mb[0]);) + return (ret); + } + + /* Copy the response */ + copy_len = (pext->ResponseLen > sizeof(EXT_RNID_DATA)) ? + (uint32_t)sizeof(EXT_RNID_DATA) : pext->ResponseLen; + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr, + copy_len); + + if (ret != 0) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld verify WRITE rsp buf error\n", + __func__, ha->host_no, ha->instance);) + } else { + ret = copy_to_user((void *)pext->ResponseAdr, + (void *)ha->ioctl_mem, copy_len); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy rsp buf\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + pext->ResponseLen = copy_len; + if (copy_len < sizeof(EXT_RNID_DATA)) { + pext->Status = EXT_STATUS_DATA_OVERRUN; + DEBUG9_10(printk("%s(%ld): inst=%ld data overrun. " + "exiting normally.\n", + __func__, ha->host_no, ha->instance);) + } else if (pext->ResponseLen > sizeof(EXT_RNID_DATA)) { + pext->Status = EXT_STATUS_DATA_UNDERRUN; + DEBUG9_10(printk("%s(%ld): inst=%ld data underrun. " + "exiting normally.\n", + __func__, ha->host_no, ha->instance);) + } else { + pext->Status = EXT_STATUS_OK; + DEBUG9(printk("%s(%ld): inst=%ld exiting normally.\n", + __func__, ha->host_no, ha->instance);) + } + } + + return (ret); +} + +#if defined(ISP2300) +/* + *qla2x00_get_led_state + * IOCTL to get QLA2XXX HBA LED state + * + * Input: + * ha = adapter state pointer. + * pext = User space CT arguments pointer. + * mode = flags. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_get_led_state(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int ret = 0; + EXT_BEACON_CONTROL ptmp_led_state; + + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + ret = verify_area(VERIFY_WRITE, (void *)pext->ResponseAdr, + sizeof(EXT_BEACON_CONTROL)); + + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR VERIFY_WRITE " + "EXT_HBA_PORT_STAT.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + if (test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags)) { + pext->Status = EXT_STATUS_BUSY; + DEBUG9_10(printk("%s(%ld): inst=%ld loop not ready.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + if (ha->beacon_blink_led) { + ptmp_led_state.State = EXT_DEF_GRN_BLINK_ON; + } else { + ptmp_led_state.State = EXT_DEF_GRN_BLINK_OFF; + + } + + ret = copy_to_user(pext->ResponseAdr, + &ptmp_led_state, sizeof(EXT_BEACON_CONTROL)); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy rsp buffer.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); + +} +#endif + +/* + * qla2x00_set_host_data + * IOCTL command to set host/adapter related data. + * + * Input: + * ha = adapter state pointer. + * pext = User space CT arguments pointer. + * mode = flags. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_set_host_data(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int ret = 0; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + /* switch on command subcode */ + switch (pext->SubCode) { + case EXT_SC_SET_RNID: + ret = qla2x00_set_rnid_params(ha, pext, mode); + break; +#if defined(ISP2300) + case EXT_SC_SET_BEACON_STATE: + ret = qla2x00_set_led_state(ha, pext, mode); + break; +#endif + default: + /* function not supported. */ + pext->Status = EXT_STATUS_UNSUPPORTED_SUBCODE; + break; + } + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} + +/* + * qla2x00_set_rnid_params + * IOCTL to set RNID parameters of the adapter. + * + * Input: + * ha = adapter state pointer. + * pext = User space CT arguments pointer. + * mode = flags. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_set_rnid_params(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + EXT_SET_RNID_REQ *tmp_set; + EXT_RNID_DATA *tmp_buf; + int ret = 0; + int tmp_rval = 0; + uint16_t mb[MAILBOX_REGISTER_COUNT]; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + /* check on loop down */ + if (ha->loop_state != LOOP_READY || + test_bit(CFG_ACTIVE, &ha->cfg_flags) || + test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || + test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || ha->dpc_active) { + + pext->Status = EXT_STATUS_BUSY; + DEBUG9_10(printk("%s(%ld): inst=%ld loop not ready.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); + } + + if (pext->RequestLen != sizeof(EXT_SET_RNID_REQ)) { + /* parameter error */ + pext->Status = EXT_STATUS_INVALID_PARAM; + DEBUG9_10(printk("%s(%ld): inst=%ld invalid request length.\n", + __func__, ha->host_no, ha->instance);) + return(ret); + } + + ret = verify_area(VERIFY_READ, (void *)pext->RequestAdr, + pext->RequestLen); + + if (ret != 0) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld verify READ request buf.\n", + __func__, ha->host_no, ha->instance);) + return(ret); + } + + if (qla2x00_get_ioctl_scrap_mem(ha, (void **)&tmp_set, + sizeof(EXT_SET_RNID_REQ))) { + /* not enough memory */ + pext->Status = EXT_STATUS_NO_MEMORY; + DEBUG9_10(printk("%s(%ld): inst=%ld scrap not big enough. " + "size requested=%ld.\n", + __func__, ha->host_no, ha->instance, + (ulong)sizeof(EXT_SET_RNID_REQ));) + return (ret); + } + + ret = copy_from_user(tmp_set, pext->RequestAdr, pext->RequestLen); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk( + "%s(%ld): inst=%ld ERROR copy req buf ret=%d\n", + __func__, ha->host_no, ha->instance, ret);) + qla2x00_free_ioctl_scrap_mem(ha); + return(ret); + } + + tmp_rval = qla2x00_get_rnid_params_mbx(ha, ha->ioctl_mem_phys, + sizeof(EXT_RNID_DATA), &mb[0]); + if (tmp_rval != QLA_SUCCESS) { + /* error */ + pext->Status = EXT_STATUS_ERR; + + DEBUG9_10(printk("%s(%ld): inst=%ld read cmd FAILED=%x.\n", + __func__, ha->host_no, ha->instance, mb[0]);) + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); + } + + tmp_buf = (EXT_RNID_DATA *)ha->ioctl_mem; + /* Now set the params. */ + memcpy(tmp_buf->IPVersion, tmp_set->IPVersion, 2); + memcpy(tmp_buf->UDPPortNumber, tmp_set->UDPPortNumber, 2); + memcpy(tmp_buf->IPAddress, tmp_set->IPAddress, 16); + tmp_rval = qla2x00_set_rnid_params_mbx(ha, ha->ioctl_mem_phys, + sizeof(EXT_RNID_DATA), &mb[0]); + + if (tmp_rval != QLA_SUCCESS) { + /* error */ + pext->Status = EXT_STATUS_ERR; + + DEBUG9_10(printk("%s(%ld): inst=%ld set cmd FAILED=%x.\n", + __func__, ha->host_no, ha->instance, mb[0]);) + } else { + pext->Status = EXT_STATUS_OK; + DEBUG9(printk("%s(%ld): inst=%ld exiting normally.\n", + __func__, ha->host_no, ha->instance);) + } + + qla2x00_free_ioctl_scrap_mem(ha); + return (ret); +} + +#if defined(ISP2300) +/* + *qla2x00_set_led_state + * IOCTL to set QLA2XXX HBA LED state + * + * Input: + * ha = adapter state pointer. + * pext = User space CT arguments pointer. + * mode = flags. + * + * Returns: + * 0 = success + * others = errno value + * + * Context: + * Kernel context. + */ +static int +qla2x00_set_led_state(scsi_qla_host_t *ha, EXT_IOCTL *pext, int mode) +{ + int ret = 0; + EXT_BEACON_CONTROL ptmp_led_state; + device_reg_t *reg = ha->iobase; + uint8_t gpio_enable, gpio_data; + unsigned long cpu_flags = 0; + + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + ret = verify_area(VERIFY_READ, (void *)pext->RequestAdr, + sizeof(EXT_BEACON_CONTROL)); + + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR VERIFY_WRITE " + "EXT_HBA_PORT_STAT.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + if (test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags)) { + pext->Status = EXT_STATUS_BUSY; + DEBUG9_10(printk("%s(%ld): inst=%ld abort isp active.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + ret = copy_from_user(&ptmp_led_state, + pext->RequestAdr, pext->RequestLen); + if (ret) { + pext->Status = EXT_STATUS_COPY_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR copy req buf.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + if (ptmp_led_state.State != EXT_DEF_GRN_BLINK_ON && + ptmp_led_state.State != EXT_DEF_GRN_BLINK_OFF) { + pext->Status = EXT_STATUS_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld Unknown Led State set " + "operation.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + if (ptmp_led_state.State == EXT_DEF_GRN_BLINK_ON) { + + DEBUG9_10(printk("%s(%ld): inst=%ld start blinking led \n", + __func__, ha->host_no, ha->instance);) + + DEBUG9_10(printk("%s(%ld): inst=%ld firmware options " + "fw_options1=0x%x fw_options2=0x%x fw_options3=0x%x.\n", + __func__, ha->host_no, ha->instance, ha->fw_options[1], + ha->fw_options[2], ha->fw_options[3]);) + + ha->fw_options[1] &= ~FO1_SET_EMPHASIS_SWING; + ha->fw_options[1] |= FO1_DISABLE_GPIO6_7; + + if (qla2x00_set_fw_options(ha, ha->fw_options) != QLA_SUCCESS) { + pext->Status = EXT_STATUS_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld set" + "firmware options failed.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + + /* Turn of both LEDs */ + spin_lock_irqsave(&ha->hardware_lock, cpu_flags); + gpio_enable = RD_REG_WORD(®->gpioe); + gpio_data = RD_REG_WORD(®->gpiod); + gpio_enable |= GPIO_LED_MASK; + + /* Set the modified gpio_enable values */ + WRT_REG_WORD(®->gpioe,gpio_enable); + + /* Clear out previously set LED colour */ + gpio_data &= ~GPIO_LED_MASK; + WRT_REG_WORD(®->gpiod,gpio_data); + spin_unlock_irqrestore(&ha->hardware_lock, cpu_flags); + + /* Let the per HBA timer kick off the blinking process*/ + ha->beacon_blink_led = 1; + ha->beacon_green_on = 0; + } /* end of if(ptmp_led_state.State == EXT_DEF_GRN_BLINK_ON) ) */ + + if (ptmp_led_state.State == EXT_DEF_GRN_BLINK_OFF) { + DEBUG9_10(printk("%s(%ld): inst=%ld stop blinking led \n", + __func__, ha->host_no, ha->instance);) + ha->beacon_blink_led = 0; + ha->beacon_green_on = 1; /* Turn green led on */ + qla2x00_blink_led(ha); + + DEBUG9_10(printk("%s(%ld): inst=%ld firmware" + " options fw_options1=0x%x fw_options2=0x%x " + "fw_options3=0x%x.\n", + __func__, ha->host_no, ha->instance, ha->fw_options[1], + ha->fw_options[2], ha->fw_options[3]);) + + ha->fw_options[1] &= ~FO1_SET_EMPHASIS_SWING; + ha->fw_options[1] &= ~FO1_DISABLE_GPIO6_7; + + if (qla2x00_set_fw_options(ha, ha->fw_options) != QLA_SUCCESS) { + pext->Status = EXT_STATUS_ERR; + DEBUG9_10(printk("%s(%ld): inst=%ld set" + "firmware options failed.\n", + __func__, ha->host_no, ha->instance);) + return (ret); + } + } /* end of if(ptmp_led_state.State == EXT_DEF_GRN_BLINK_OFF) */ + + pext->Status = EXT_STATUS_OK; + pext->DetailStatus = EXT_STATUS_OK; + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return (ret); +} +#endif + +/* + * qla2x00_waitq_sem_timeout + * Timeout function to be called when a thread on the wait_q + * queue timed out. + * + * Input: + * data = data pointer for timeout function. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +static void +qla2x00_waitq_sem_timeout(unsigned long data) +{ + wait_q_t *tmp_ptr = (wait_q_t *)data; + + DEBUG9(printk("%s: entered.\n", __func__);) + + if (tmp_ptr != NULL) { + DEBUG9(printk("%s: wait_q thread=%p.\n", __func__, tmp_ptr);) + up(&tmp_ptr->wait_q_sem); + } + + DEBUG9(printk("%s: exiting.\n", __func__);) + +} + +/* + * qla2x00_get_ioctl_access + * Serialization routine for the ioctl commands. + * When succeeded the exiting thread gains "access" and + * proceeds, otherwise it gives up and returns error. + * Each thread would wait tov seconds before giving up. + * + * Input: + * ha = adapter state pointer. + * tov = timeout value in seconds + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +static int +qla2x00_get_ioctl_access(scsi_qla_host_t *ha, uint32_t tov) +{ + int rval; + int prev_val = 1; + unsigned long cpu_flags; + struct timer_list tmp_access_timer; + wait_q_t *ptmp_wq = NULL; + + rval = QLA_SUCCESS; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + while (1) { + if (test_bit(IOCTL_WANT, (void *)&(ha->ioctl->access_bits)) == + 0) { + + DEBUG9(printk("%s(%ld): going to test access_bits.\n", + __func__, ha->host_no);) + + /* No one else is waiting. Go ahead and try to + * get access. + */ + if ((prev_val = test_and_set_bit(IOCTL_ACTIVE, + (void *)&ha->ioctl->access_bits)) == 0) { + break; + } + } + + /* wait for previous command to finish */ + DEBUG9(printk("%s(%ld): inst=%ld access_bits=%x. busy. " + "Waiting for access. curr time=0x%lx.\n", + __func__, ha->host_no, ha->instance, + ha->ioctl->access_bits, jiffies);) + + /* + * Init timer and get semaphore from wait_q. if we got valid + * semaphore pointer the IOCTL_WANT flag would also had + * been set. + */ + qla2x00_wait_q_add(ha, &ptmp_wq); + + if (ptmp_wq == NULL) { + /* queue full? problem? can't proceed. */ + DEBUG9_10(printk("%s(%ld): ERROR no more wait_q " + "allowed. exiting.\n", __func__, ha->host_no);) + + break; + } + + init_timer(&tmp_access_timer); + + tmp_access_timer.data = (unsigned long)ptmp_wq; + tmp_access_timer.function = + (void (*)(unsigned long))qla2x00_waitq_sem_timeout; + tmp_access_timer.expires = jiffies + tov * HZ; + + DEBUG9(printk("%s(%ld): adding timer. " + "curr time=0x%lx timeoutval=0x%lx.\n", + __func__, ha->host_no, jiffies, tmp_access_timer.expires);) + + /* wait. */ + add_timer(&tmp_access_timer); + + DEBUG9(printk("%s(%ld): inst=%ld wait_q %p going to sleep. " + "current time=0x%lx.\n", + __func__, ha->host_no, ha->instance, ptmp_wq, jiffies);) + + if (down_interruptible(&ptmp_wq->wait_q_sem)) { + DEBUG9_10(printk("%s(%ld): inst=%ld signal received " + "while spleeping.\n", __func__, ha->host_no, + ha->instance);) + del_timer(&tmp_access_timer); + prev_val = 1; + break; + } + + DEBUG9(printk("%s(%ld): inst=%ld wait_q %p woke up. current " + "time=0x%lx.\n", + __func__, ha->host_no, ha->instance, ptmp_wq, jiffies);) + + del_timer(&tmp_access_timer); + + /* try to get lock again. we'll test later to see + * if we actually got the lock. + */ + prev_val = test_and_set_bit(IOCTL_ACTIVE, + (void *)&(ha->ioctl->access_bits)); + + /* + * After we tried to get access then we check to see + * if we need to clear the IOCTL_WANT flag. Don't clear + * this flag before trying to get access or another + * new thread might grab it before we did. + */ + spin_lock_irqsave(&ha->ioctl->wait_q_lock, cpu_flags); + if (prev_val != 0) { + /* We'll return with error. + * Make sure we remove ourselves from wait_q. + */ + qla2x00_wait_q_remove(ha, ptmp_wq); + } + if (ha->ioctl->wait_q_head == NULL) { + /* We're the last thread in wait_q queue. */ + clear_bit(IOCTL_WANT, (void *)&ha->ioctl->access_bits); + } + qla2x00_wait_q_memb_free(ha, ptmp_wq); + spin_unlock_irqrestore(&ha->ioctl->wait_q_lock, cpu_flags); + + break; + } + + if (prev_val == 0) { + /* We got the lock */ + DEBUG9(printk("%s(%ld): inst=%ld got access.\n", + __func__, ha->host_no, ha->instance);) + + } else { + /* Timeout or resource error. */ + DEBUG9_10(printk("%s(%ld): inst=%ld timed out " + "or wait_q error.\n", __func__, ha->host_no, ha->instance);) + + rval = QLA_FUNCTION_TIMEOUT; + } + + return (rval); +} + +/* + * qla2x00_release_ioctl_access + * Serialization routine for the ioctl commands. + * This releases "access" and checks on wai_q queue. If there's + * another thread waiting then wakes it up. + * + * Input: + * ha = adapter state pointer. + * tov = timeout value in seconds + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +static int +qla2x00_release_ioctl_access(scsi_qla_host_t *ha) +{ + wait_q_t *next_thread = NULL; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + clear_bit(IOCTL_ACTIVE, (void *)&(ha->ioctl->access_bits)); + + /* Wake up one pending ioctl thread in wait_q */ + qla2x00_wait_q_get_next(ha, &next_thread); + if (next_thread) { + DEBUG9(printk( + "%s(%ld): inst=%ld found wait_q. Wake up waitq %p\n", + __func__, ha->host_no, ha->instance, &next_thread);) + up(&next_thread->wait_q_sem); + } + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) + + return QLA_SUCCESS; +} + +/* + * qla2x00_wait_q_memb_alloc + * Finds a free wait_q member from the array. Must already got the + * wait_q_lock spinlock. + * + * Input: + * ha = adapter state pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +static void +qla2x00_wait_q_memb_alloc(scsi_qla_host_t *ha, wait_q_t **ret_wait_q_memb) +{ + uint8_t i; + wait_q_t *ptmp = NULL; + + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + for (i = 0; i < MAX_IOCTL_WAIT_THREADS; i++) { + if (!(ha->ioctl->wait_q_arr[i].flags & WQ_IN_USE)) { + ha->ioctl->wait_q_arr[i].flags |= WQ_IN_USE; + ptmp = &ha->ioctl->wait_q_arr[i]; + break; + } + } + + *ret_wait_q_memb = ptmp; + + DEBUG9(printk("%s(%ld): inst=%ld return waitq_memb=%p.\n", + __func__, ha->host_no, ha->instance, *ret_wait_q_memb);) +} + +/* + * qla2x00_wait_q_memb_free + * Frees the specified wait_q member. Must already got the wait_q_lock + * spinlock. + * + * Input: + * ha = adapter state pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +static void +qla2x00_wait_q_memb_free(scsi_qla_host_t *ha, wait_q_t *pfree_wait_q_memb) +{ + DEBUG9(printk("%s(%ld): inst=%ld entered.\n", + __func__, ha->host_no, ha->instance);) + + if (pfree_wait_q_memb != NULL) { + DEBUG9(printk("%s(%ld): freeing %p.\n", + __func__, ha->host_no, pfree_wait_q_memb);) + pfree_wait_q_memb->flags &= ~WQ_IN_USE; + } + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) +} + +/* + * qla2x00_wait_q_add + * Allocates a wait_q_t struct and add to the wait_q list. + * + * Input: + * ha = adapter state pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +static int +qla2x00_wait_q_add(scsi_qla_host_t *ha, wait_q_t **ret_wq) +{ + int rval; + unsigned long cpu_flags; + wait_q_t *ptmp = NULL; + + rval = QLA_SUCCESS; + + spin_lock_irqsave(&ha->ioctl->wait_q_lock, cpu_flags); + + DEBUG9(printk("%s(%ld): inst=%ld got wait_q spinlock.\n", + __func__, ha->host_no, ha->instance);) + + qla2x00_wait_q_memb_alloc(ha, &ptmp); + if (ptmp == NULL) { + /* can't add any more threads */ + DEBUG9_10(printk("%s(%ld): inst=%ld ERROR no more ioctl " + "threads allowed.\n", + __func__, ha->host_no, ha->instance);) + + rval = QLA_MEMORY_ALLOC_FAILED; + } else { + if (ha->ioctl->wait_q_tail == NULL) { + /* First thread to queue. */ + set_bit(IOCTL_WANT, (void *)&ha->ioctl->access_bits); + + ha->ioctl->wait_q_head = ptmp; + } else { + ha->ioctl->wait_q_tail->pnext = ptmp; + } + ha->ioctl->wait_q_tail = ptmp; + + *ret_wq = ptmp; + + /* Now init the semaphore */ + + init_MUTEX_LOCKED(&ptmp->wait_q_sem); + + rval = QLA_SUCCESS; + } + + DEBUG9(printk("%s(%ld): inst=%ld going to release spinlock. " + "ret_wq=%p, rval=%d.\n", + __func__, ha->host_no, ha->instance, *ret_wq, rval);) + + spin_unlock_irqrestore(&ha->ioctl->wait_q_lock, cpu_flags); + + return rval; +} + +/* + * qla2x00_wait_q_get_next + * This just removes one member from head of wait_q. + * + * Input: + * ha = adapter state pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +static void +qla2x00_wait_q_get_next(scsi_qla_host_t *ha, wait_q_t **ret_wq) +{ + unsigned long cpu_flags; + + if (test_bit(IOCTL_ACTIVE, (void *)&(ha->ioctl->access_bits)) != 0) { + /* Another thread just became active. Exit. */ + *ret_wq = NULL; + return; + } + + /* Find the next thread to wake up */ + spin_lock_irqsave(&ha->ioctl->wait_q_lock, cpu_flags); + + DEBUG9(printk("%s(%ld): inst=%ld got wait_q spinlock.\n", + __func__, ha->host_no, ha->instance);) + + /* Remove from head */ + *ret_wq = ha->ioctl->wait_q_head; + if (ha->ioctl->wait_q_head != NULL) { + + ha->ioctl->wait_q_head = ha->ioctl->wait_q_head->pnext; + + if (ha->ioctl->wait_q_head == NULL) { + /* That's the last one in queue. */ + ha->ioctl->wait_q_tail = NULL; + } + + (*ret_wq)->pnext = NULL; + } + + DEBUG9(printk("%s(%ld): inst=%ld return ret_wq=%p. Going to release " + "spinlock.\n", + __func__, ha->host_no, ha->instance, *ret_wq);) + spin_unlock_irqrestore(&ha->ioctl->wait_q_lock, cpu_flags); +} + +/* + * qla2x00_wait_q_remove + * Removes the specified member from wait_q. + * Must already got the wait_q_lock spin lock. + * + * Input: + * ha = adapter state pointer. + * + * Returns: + * qla2x00 local function return status code. + * + * Context: + * Kernel context. + */ +static void +qla2x00_wait_q_remove(scsi_qla_host_t *ha, wait_q_t *rem_wq) +{ + wait_q_t *ptmp_wq; + wait_q_t *ptmp_prev; + + DEBUG9(printk("%s(%ld): inst=%ld rem_wq=%p.\n", + __func__, ha->host_no, ha->instance, rem_wq);) + + /* Search then remove */ + ptmp_prev = NULL; + for (ptmp_wq = ha->ioctl->wait_q_head; ptmp_wq != NULL; + ptmp_wq = ptmp_wq->pnext) { + + if (ptmp_wq == rem_wq) { + /* Found it in wait_q. Remove. */ + + DEBUG9(printk("%s(%ld): inst=%ld removing.\n", + __func__, ha->host_no, ha->instance);) + + if (ha->ioctl->wait_q_head == ptmp_wq) { + ha->ioctl->wait_q_head = ptmp_wq->pnext; + } else { + ptmp_prev->pnext = ptmp_wq->pnext; + } + + if (ha->ioctl->wait_q_tail == ptmp_wq) { + ha->ioctl->wait_q_tail = ptmp_prev; + } + + ptmp_wq->pnext = NULL; + + break; + } + ptmp_prev = ptmp_wq; + } + + DEBUG9(printk("%s(%ld): inst=%ld exiting.\n", + __func__, ha->host_no, ha->instance);) +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qlfo.h 999-mjb/drivers/scsi/qla2xxx/qlfo.h --- 000-virgin/drivers/scsi/qla2xxx/qlfo.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qlfo.h 2003-11-25 14:18:48.000000000 -0800 @@ -0,0 +1,415 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + +/* + * San/Device Management Failover Ioctl Header + * File is created to adhere to Solaris requirement using 8-space tabs. + * + * !!!!! PLEASE DO NOT REMOVE THE TABS !!!!! + * !!!!! PLEASE NO SINGLE LINE COMMENTS: // !!!!! + * !!!!! PLEASE NO MORE THAN 80 CHARS PER LINE !!!!! + * + * Revision History: + * + * Rev. 0.00 August 8, 2000 + * WTR - Created. + * + * Rev. 0.01 August 8, 2000 + * WTR - Made size of HbaInstance fields consistant as UINT8. + * Made command codes as 300 upward to be consistant with definitions + * in ExIoct.h. + * Rev. 0.01 October 3, 2000 + * TLE - Exclusion of ExIoct.h + * + * Rev. 0.01 October 6, 2000 + * TLE - Made size of HbaInstance fields UINT8 + * + * Rev. 0.01 October 10, 2000 + * TLE - Add _FO_DRIVER_VERSION data structure + */ + + + +#ifndef _FO_H +#define _FO_H + +/* + * *********************************************************************** + * X OS type definitions + * *********************************************************************** + */ +#ifdef _MSC_VER /* NT */ + +#pragma pack(1) +#include "qlfont.h" + +#elif defined(linux) /* Linux */ + +#include "qlfoln.h" + +#elif defined(sun) || defined(__sun) /* Solaris */ + +#include "qlfoso.h" + +#endif + +#define SDM_DEF_MAX_DEVICES 16 +#define SDM_DEF_MAX_PATHS_PER_TARGET 4 +#define SDM_DEF_MAX_TARGETS_PER_DEVICE 4 +#define SDM_DEF_MAX_PATHS_PER_DEVICE (SDM_DEF_MAX_PATHS_PER_TARGET * SDM_DEF_MAX_TARGETS_PER_DEVICE) + +#define FO_MAX_LUNS_PER_DEVICE MAX_LUNS_OS +#define FO_MAX_PATHS (SDM_DEF_MAX_PATHS_PER_DEVICE * SDM_DEF_MAX_DEVICES) +#define FO_MAX_ADAPTERS 32 +#define FO_ADAPTER_ALL 0xFF +#define FO_DEF_WWN_SIZE 8 +#define FO_MAX_GEN_INFO_STRING_LEN 32 + +#if 0 /* defined in qlfolimits.h */ +#define FO_NOTIFY_TYPE_NONE 0 +#define FO_NOTIFY_TYPE_LUN_RESET 1 +#define FO_NOTIFY_TYPE_CDB 2 +#define FO_NOTIFY_TYPE_LOGOUT_OR_LUN_RESET 3 +#define FO_NOTIFY_TYPE_LOGOUT_OR_CDB 4 +#define FO_NOTIFY_TYPE_SPINUP 5 + +#define FO_NOTIFY_TYPE_MIN FO_NOTIFY_TYPE_NONE +#define FO_NOTIFY_TYPE_MAX FO_NOTIFY_TYPE_LOGOUT_OR_CDB +#define FO_NOTIFY_TYPE_DEF FO_NOTIFY_TYPE_SPINUP + +#define FO_NOTIFY_CDB_LENGTH_MIN 6 +#define FO_NOTIFY_CDB_LENGTH_MAX 16 +#endif + +/* + * IOCTL Commands + */ + +#define FO_CC_GET_PARAMS FO_CC_GET_PARAMS_OS +#define FO_CC_SET_PARAMS FO_CC_SET_PARAMS_OS +#define FO_CC_GET_PATHS FO_CC_GET_PATHS_OS +#define FO_CC_SET_CURRENT_PATH FO_CC_SET_CURRENT_PATH_OS +#define FO_CC_GET_HBA_STAT FO_CC_GET_HBA_STAT_OS +#define FO_CC_RESET_HBA_STAT FO_CC_RESET_HBA_STAT_OS +#define FO_CC_GET_LUN_DATA FO_CC_GET_LUN_DATA_OS +#define FO_CC_SET_LUN_DATA FO_CC_SET_LUN_DATA_OS +#define FO_CC_GET_TARGET_DATA FO_CC_GET_TARGET_DATA_OS +#define FO_CC_SET_TARGET_DATA FO_CC_SET_TARGET_DATA_OS +#define FO_CC_GET_FO_DRIVER_VERSION FO_CC_GET_FO_DRIVER_VERSION_OS + + +/* Systemwide failover parameters. */ + +typedef struct _FO_PARAMS +{ + UINT32 InspectionInterval; /* Timer interval to check for failover.*/ + UINT8 MaxPathsPerDevice; /* Max paths to any single device. */ + UINT8 MaxRetriesPerPath; /* Max retries on a path before */ + + /* Failover. */ + UINT8 MaxRetriesPerIo; /* Max retries per i/o request. */ + UINT8 Reserved1; + UINT32 Flags; /* Control flags. */ + UINT8 DeviceErrorThreshold; /* Max device errors. */ + UINT8 DeviceTimeoutThreshold; /* Max device timeouts.*/ + UINT8 FrameErrorThreshold; /* Max frame errors.*/ + UINT8 LinkErrorThreshold; /* Max link errors.*/ + UINT32 Reserved2[4]; /* Spares.*/ + + /* Load balancing parameters.*/ + + UINT8 RollingAverageIntervals;/* Intervals to sum for rolling average.*/ + UINT8 MaxDevicesToMigrate; /* Max devices to migrate in any interval.*/ + UINT8 BalanceMethod; /* Method to use for load balancing.*/ + UINT8 Reserved3; /* Memory alignment.*/ + + UINT16 LoadShareMinPercentage; /* Load balancing parameter.*/ + UINT16 LoadShareMaxPercentage; /* Load balancing parameter.*/ + + /* Failover notify parameters. */ + + UINT8 FailoverNotifyType; /* Type of notification. */ + UINT8 FailoverNotifyCdbLength;/* Length of notification CDB. */ + UINT16 Reserved4; + UINT8 FailoverNotifyCdb[16]; /* CDB if notification by CDB. */ + UINT32 Reserved5; + +} +FO_PARAMS, *PFO_PARAMS, SysFoParams_t, *SysFoParams_p; + +extern SysFoParams_t qla_fo_params; + +typedef struct _FO_GET_PATHS +{ + UINT8 HbaInstance; + EXT_DEST_ADDR HbaAddr; /* Lun field is ignored */ + UINT32 Reserved[5]; + +} +FO_GET_PATHS, *PFO_GET_PATHS; + + +typedef struct _FO_PATH_ENTRY +{ + UINT8 Reserved1; + UINT8 Visible; /* Path is visible path. */ + UINT8 Priority; + UINT8 Reserved2; + UINT8 HbaInstance; + UINT8 PortName[EXT_DEF_WWN_NAME_SIZE]; + UINT16 Reserved3; + UINT32 Reserved[3]; + +} +FO_PATH_ENTRY, *PFO_PATH_ENTRY; + + +typedef struct _FO_PATHS_INFO +{ + /* These first fields in the output buffer are specifically the + * same as the fields in the input buffer. This is because the + * same system buffer holds both, and this allows us to reference + * the input buffer parameters while filling the output buffer. */ + + UINT8 HbaInstance; + EXT_DEST_ADDR HbaAddr; + UINT32 Reserved[5]; + UINT8 PathCount; /* Number of Paths in PathEntry array */ + UINT8 Reserved3; + UINT8 VisiblePathIndex; /* Which index has BOOLEAN "visible" flag set */ + UINT8 Reserved4; + + UINT8 CurrentPathIndex[FO_MAX_LUNS_PER_DEVICE]; /* Current Path Index for each Lun */ + + FO_PATH_ENTRY PathEntry[FO_MAX_PATHS]; + + UINT32 Reserved5[4]; + +} +FO_PATHS_INFO, *PFO_PATHS_INFO; + +typedef struct _FO_SET_CURRENT_PATH +{ + UINT8 HbaInstance; + EXT_DEST_ADDR HbaAddr; + UINT8 NewCurrentPathIndex; /* Path index to make current path. */ + UINT8 FailoverType; /* Reason for failover. */ + UINT32 Reserved[3]; + +} +FO_SET_CURRENT_PATH, *PFO_SET_CURRENT_PATH; + +typedef union _FO_PATHS { + FO_GET_PATHS input; + FO_SET_CURRENT_PATH set + ; + FO_PATHS_INFO info; +} FO_PATHS; + + +typedef struct _FO_HBA_STAT_INPUT +{ + /* The first field in the input buffer is specifically the + * same as the field in the output buffer. This is because the + * same system buffer holds both, and this allows us to reference + * the input buffer parameters while filling the output buffer. */ + + UINT8 HbaInstance; /* Port number or ADAPTER_ALL. */ + UINT8 Reserved1[3]; + UINT32 Reserved2[7]; + +} +FO_HBA_STAT_INPUT, *PFO_HBA_STAT_INPUT; + + +typedef struct _FO_HBA_STAT_ENTRY +{ + UINT8 HbaInstance; + UINT8 Reserved1[3]; + UINT32 Reserved2; + UINT64 IosRequested; /* IOs requested on this adapter. */ + UINT64 BytesRequested; /* Bytes requested on this adapter. */ + UINT64 IosExecuted; /* IOs executed on this adapter. */ + UINT64 BytesExecuted; /* Bytes executed on this adapter. */ + UINT32 Reserved3[22]; + +} +FO_HBA_STAT_ENTRY, *PFO_HBA_STAT_ENTRY; + + +typedef struct _FO_HBA_STAT_INFO +{ + /* The first fields in the output buffer is specifically the + * same as the field in the input buffer. This is because the + * same system buffer holds both, and this allows us to reference + * the input buffer parameters while filling the output buffer. */ + + UINT8 HbaInstance; /* Port number or ADAPTER_ALL. */ + UINT8 HbaCount; /* Count of adapters returned. */ + UINT8 Reserved1[2]; + UINT32 Reserved2[7]; + + FO_HBA_STAT_ENTRY StatEntry[FO_MAX_ADAPTERS]; + +} +FO_HBA_STAT_INFO, *PFO_HBA_STAT_INFO; + + + +/* The "external" LUN data refers to the LUNs as represented in our + configuration utility, where one physical target can support up to + 2048 LUNs, which are mapped around internally. This is in comparison + to an "internal" LUN data, which is 256 LUNs, after being mapped + inside the driver to multiple target slots. */ + +#define EXTERNAL_LUN_COUNT 2048 + +/* Structure as used in the IOCTL.*/ + +typedef struct _FO_EXTERNAL_LUN_DATA_ENTRY +{ + UINT8 NodeName[EXT_DEF_WWN_NAME_SIZE]; + UINT8 PortName[EXT_DEF_WWP_NAME_SIZE]; //sri + + UINT16 LunCount; /* Entries in Lun Data array. */ + UINT8 TargetId; + UINT8 Dev_No; + UINT32 Reserved3; + UINT32 Reserved4; + UINT32 Reserved5; /* Pad to 32-byte header.*/ + + UINT8 Data[EXTERNAL_LUN_COUNT]; +} +FO_EXTERNAL_LUN_DATA_ENTRY, *PFO_EXTERNAL_LUN_DATA_ENTRY; + +// Structure as it is stored in the NT registry. + +typedef struct _FO_LUN_DATA_LIST +{ + UINT16 Version; /* Should be LUN_DATA_REGISTRY_VERSION.*/ + UINT16 EntryCount; /* Count of variable entries following.*/ + UINT32 Reserved1; + UINT32 Reserved2; + UINT32 Reserved3; + UINT32 Reserved4; + UINT32 Reserved5; + UINT32 Reserved6; + UINT32 Reserved7; /* Pad to 32-byte header.*/ + + FO_EXTERNAL_LUN_DATA_ENTRY DataEntry[1]; /* Variable-length data.*/ + +} +FO_LUN_DATA_LIST, *PFO_LUN_DATA_LIST; + +typedef struct _FO_LUN_DATA_INPUT +{ + /* The first field in the input buffer is specifically the + * same as the field in the output buffer. This is because the + * same system buffer holds both, and this allows us to reference + * the input buffer parameters while filling the output buffer. */ + + UINT8 HbaInstance; /* Port number */ + UINT8 Reserved1[3]; + UINT32 Reserved2[7]; + +} +FO_LUN_DATA_INPUT, *PFO_LUN_DATA_INPUT; + +typedef struct _FO_REQUEST_ADDR +{ + UINT8 HbaInstance; + EXT_DEST_ADDR TargetAddr; + UINT32 Reserved[5]; + +} +FO_REQUEST_ADDR, *PFO_REQUEST_ADDR; + +typedef struct _FO_TARGET_DATA_INPUT +{ + UINT8 HbaInstance; /* Port number */ + UINT8 Reserved1[3]; + UINT32 Reserved2[7]; + +} +FO_TARGET_DATA_INPUT, *PFO_TARGET_DATA_INPUT; + +#define FO_INTERNAL_LUN_COUNT 256 +#define FO_INTERNAL_LUN_BITMASK_BYTES (FO_INTERNAL_LUN_COUNT / 8) + +typedef struct _FO_INTERNAL_LUN_BITMASK +{ + UINT8 Bitmask[FO_INTERNAL_LUN_BITMASK_BYTES]; +} +FO_INTERNAL_LUN_BITMASK, *PFO_INTERNAL_LUN_BITMASK; + +typedef struct _FO_DEVICE_DATA +{ + UINT32 DeviceFlags; /* Device flags */ + UINT16 LoopId; /* Current loop ID */ + UINT16 BaseLunNumber; /* Base LUN number */ + UINT8 WorldWideName[8]; /* World Wide Name for device */ + UINT8 PortId[3]; /* Port ID */ + UINT8 MultipathControl; /* Multipath control byte. */ + UINT16 DeviceState; /* Device state */ + UINT16 LoginRetryCount; /* Number of login retries */ + UINT8 PortName[8]; /* Port name for device */ + UINT16 TimeoutCount; /* Command timeout count */ + UINT8 TargetId; + UINT8 Dev_No; + FO_INTERNAL_LUN_BITMASK LunBitmask; /* LUN bitmask */ +} +FO_DEVICE_DATA, *PFO_DEVICE_DATA; + +typedef struct _FO_DEVICE_DATABASE +{ + FO_DEVICE_DATA DeviceData[256]; +} +FO_DEVICE_DATABASE, *PFO_DEVICE_DATABASE; + +typedef struct _FO_DRIVER_VERSION +{ + // Numeric version. + UINT8 Version; // Major version number. + UINT8 Revision; // Minor version number. + UINT8 Subrevision; // Subminor version number. + UINT8 Reserved1; // Memory alignment. + + // String version. + UINT8 VersionStr[FO_MAX_GEN_INFO_STRING_LEN]; + + // Reserved fields. + UINT32 Reserved2[16]; + +} +FO_DRIVER_VERSION, *PFO_DRIVER_VERSION; + + +#define FO_LUN_DATA_LIST_MIN_ENTRIES 1 +#define FO_LUN_DATA_LIST_MAX_ENTRIES 256 +#ifdef _WIN64 +#define FO_LUN_DATA_LIST_HEADER_SIZE 32 +#else +#define FO_LUN_DATA_LIST_HEADER_SIZE offsetof(FO_LUN_DATA_LIST, DataEntry) +#endif + +#define FO_LUN_DATA_LIST_MIN_SIZE (FO_LUN_DATA_LIST_HEADER_SIZE + (sizeof(FO_EXTERNAL_LUN_DATA_ENTRY) * FO_LUN_DATA_LIST_MIN_ENTRIES)) +#define FO_LUN_DATA_LIST_MAX_SIZE (FO_LUN_DATA_LIST_HEADER_SIZE + (sizeof(FO_EXTERNAL_LUN_DATA_ENTRY) * FO_LUN_DATA_LIST_MAX_ENTRIES)) + + +#endif /* ifndef _FO_H */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qlfolimits.h 999-mjb/drivers/scsi/qla2xxx/qlfolimits.h --- 000-virgin/drivers/scsi/qla2xxx/qlfolimits.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qlfolimits.h 2003-11-25 14:18:48.000000000 -0800 @@ -0,0 +1,93 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + +/* + * Minimums, maximums, defaults, and other definitions for MC_PARAMS. + */ + +#define FO_INSPECTION_INTERVAL_MIN 0 +#define FO_INSPECTION_INTERVAL_MAX 1000000 +#define FO_INSPECTION_INTERVAL_DEF 600 + +#define FO_MAX_PATHS_PER_DEVICE_MIN 1 +#define FO_MAX_PATHS_PER_DEVICE_MAX 8 +#define FO_MAX_PATHS_PER_DEVICE_DEF 8 + +#define FO_MAX_RETRIES_PER_PATH_MIN 1 +#define FO_MAX_RETRIES_PER_PATH_MAX 8 +#define FO_MAX_RETRIES_PER_PATH_DEF 3 + +#define FO_MAX_RETRIES_PER_IO_MIN ((FO_MAX_PATHS_PER_DEVICE_MIN * FO_MAX_RETRIES_PER_PATH_MIN) + 1) +#define FO_MAX_RETRIES_PER_IO_MAX ((FO_MAX_PATHS_PER_DEVICE_MAX * FO_MAX_RETRIES_PER_PATH_MAX) + 1) +#define FO_MAX_RETRIES_PER_IO_DEF ((FO_MAX_PATHS_PER_DEVICE_DEF * FO_MAX_RETRIES_PER_PATH_DEF) + 1) + +#define FO_DEVICE_ERROR_THRESHOLD_MIN 1 +#define FO_DEVICE_ERROR_THRESHOLD_MAX 255 +#define FO_DEVICE_ERROR_THRESHOLD_DEF 4 + +#define FO_DEVICE_TIMEOUT_THRESHOLD_MIN 1 +#define FO_DEVICE_TIMEOUT_THRESHOLD_MAX 255 +#define FO_DEVICE_TIMEOUT_THRESHOLD_DEF 4 + +#define FO_FRAME_ERROR_THRESHOLD_MIN 1 +#define FO_FRAME_ERROR_THRESHOLD_MAX 255 +#define FO_FRAME_ERROR_THRESHOLD_DEF 4 + +#define FO_LINK_ERROR_THRESHOLD_MIN 1 +#define FO_LINK_ERROR_THRESHOLD_MAX 255 +#define FO_LINK_ERROR_THRESHOLD_DEF 4 + +#define FO_ROLLING_AVERAGE_INTERVALS_MIN 1 +#define FO_ROLLING_AVERAGE_INTERVALS_MAX 10 +#define FO_ROLLING_AVERAGE_INTERVALS_DEF 1 + +#define FO_MAX_DEVICES_TO_MIGRATE_MIN 0 +#define FO_MAX_DEVICES_TO_MIGRATE_MAX 255 +#define FO_MAX_DEVICES_TO_MIGRATE_DEF 4 + +#define FO_BALANCE_METHOD_NONE 0 +#define FO_BALANCE_METHOD_IOS 1 +#define FO_BALANCE_METHOD_MBS 2 + +#define FO_BALANCE_METHOD_MIN FO_BALANCE_METHOD_NONE +#define FO_BALANCE_METHOD_MAX FO_BALANCE_METHOD_MBS +#define FO_BALANCE_METHOD_DEF FO_BALANCE_METHOD_IOS + +#define FO_LOAD_SHARE_MIN_PERCENTAGE_MIN 25 +#define FO_LOAD_SHARE_MIN_PERCENTAGE_MAX 99 +#define FO_LOAD_SHARE_MIN_PERCENTAGE_DEF 75 + +#define FO_LOAD_SHARE_MAX_PERCENTAGE_MIN 101 +#define FO_LOAD_SHARE_MAX_PERCENTAGE_MAX 500 +#define FO_LOAD_SHARE_MAX_PERCENTAGE_DEF 150 + +#define FO_NOTIFY_TYPE_NONE 0 +#define FO_NOTIFY_TYPE_LUN_RESET 1 +#define FO_NOTIFY_TYPE_CDB 2 +#define FO_NOTIFY_TYPE_LOGOUT_OR_LUN_RESET 3 +#define FO_NOTIFY_TYPE_LOGOUT_OR_CDB 4 +#define FO_NOTIFY_TYPE_SPINUP 5 + +#define FO_NOTIFY_TYPE_MIN FO_NOTIFY_TYPE_NONE +#define FO_NOTIFY_TYPE_MAX FO_NOTIFY_TYPE_LOGOUT_OR_CDB +#define FO_NOTIFY_TYPE_DEF FO_NOTIFY_TYPE_NONE + +#define FO_NOTIFY_CDB_LENGTH_MIN 6 +#define FO_NOTIFY_CDB_LENGTH_MAX 16 + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/qlfoln.h 999-mjb/drivers/scsi/qla2xxx/qlfoln.h --- 000-virgin/drivers/scsi/qla2xxx/qlfoln.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/qlfoln.h 2003-11-25 14:18:48.000000000 -0800 @@ -0,0 +1,76 @@ +/****************************************************************************** + * QLOGIC LINUX SOFTWARE + * + * QLogic ISP2x00 device driver for Linux 2.6.x + * Copyright (C) 2003 QLogic Corporation + * (www.qlogic.com) + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2, or (at your option) any + * later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + ******************************************************************************/ + + +#define QLMULTIPATH_MAGIC 'y' +/********************************************************/ +/* Failover ioctl command codes range from 0xc0 to 0xdf */ +/********************************************************/ + + +#define FO_CC_GET_PARAMS_OS \ + _IOWR_BAD(QLMULTIPATH_MAGIC, 200, sizeof(EXT_IOCTL)) /* 0xc8 */ +#define FO_CC_SET_PARAMS_OS \ + _IOWR_BAD(QLMULTIPATH_MAGIC, 201, sizeof(EXT_IOCTL)) /* 0xc9 */ +#define FO_CC_GET_PATHS_OS \ + _IOWR_BAD(QLMULTIPATH_MAGIC, 202, sizeof(EXT_IOCTL)) /* 0xca */ +#define FO_CC_SET_CURRENT_PATH_OS \ + _IOWR_BAD(QLMULTIPATH_MAGIC, 203, sizeof(EXT_IOCTL)) /* 0xcb */ +#define FO_CC_GET_HBA_STAT_OS \ + _IOWR_BAD(QLMULTIPATH_MAGIC, 204, sizeof(EXT_IOCTL)) /* 0xcc */ +#define FO_CC_RESET_HBA_STAT_OS \ + _IOWR_BAD(QLMULTIPATH_MAGIC, 205, sizeof(EXT_IOCTL)) /* 0xcd */ +#define FO_CC_GET_LUN_DATA_OS \ + _IOWR_BAD(QLMULTIPATH_MAGIC, 206, sizeof(EXT_IOCTL)) /* 0xce */ +#define FO_CC_SET_LUN_DATA_OS \ + _IOWR_BAD(QLMULTIPATH_MAGIC, 207, sizeof(EXT_IOCTL)) /* 0xcf */ +#define FO_CC_GET_TARGET_DATA_OS \ + _IOWR_BAD(QLMULTIPATH_MAGIC, 208, sizeof(EXT_IOCTL)) /* 0xd0 */ +#define FO_CC_SET_TARGET_DATA_OS \ + _IOWR_BAD(QLMULTIPATH_MAGIC, 209, sizeof(EXT_IOCTL)) /* 0xd1 */ +#define FO_CC_GET_FO_DRIVER_VERSION_OS \ + _IOWR_BAD(QLMULTIPATH_MAGIC, 210, sizeof(EXT_IOCTL)) /* 0xd2 */ + + +#define BOOLEAN uint8_t +#define MAX_LUNS_OS 256 + +/* Driver attributes bits */ +#define DRVR_FO_ENABLED 0x1 /* bit 0 */ + + +/* + * Overrides for Emacs so that we almost follow Linus's tabbing style. + * Emacs will notice this stuff at the end of the file and automatically + * adjust the settings for this buffer only. This must remain at the end + * of the file. + * --------------------------------------------------------------------------- + * Local variables: + * c-indent-level: 2 + * c-brace-imaginary-offset: 0 + * c-brace-offset: -2 + * c-argdecl-indent: 2 + * c-label-offset: -2 + * c-continued-statement-offset: 2 + * c-continued-brace-offset: 0 + * indent-tabs-mode: nil + * tab-width: 8 + * End: + */ + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/qla2xxx/revision.notes 999-mjb/drivers/scsi/qla2xxx/revision.notes --- 000-virgin/drivers/scsi/qla2xxx/revision.notes 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/drivers/scsi/qla2xxx/revision.notes 2003-11-25 14:18:48.000000000 -0800 @@ -0,0 +1,382 @@ +/* + * QLogic ISP2200 and ISP2300 Linux Driver Revision List File. + * + ******************************************************************** + * + * Revision History + * + * Rev 8.00.00b6 November 4, 2003 AV + * - Add new 2300 TPX firmware (3.02.18). + * + * Rev 8.00.00b6-pre25 October 20, 2003 RA/AV + * - Resync with Linux Kernel 2.6.0-test9. + * - Rework firmware dump process: + * - Use binary attribute within sysfs tree. + * - Add user-space tool (gdump.sh) to retrieve formatted + * buffer. + * - Add ISP2100 support. + * - Use a slab cache for SRB allocations to reduce memory + * pressure. + * - Initial conversion of driver logging methods to a new + * qla_printk() function which uses dev_printk (Daniel + * Stekloff, IBM). + * - Further reduce stack usage in qla2x00_configure_local_loop() + * and qla2x00_find_all_fabric_devs(). + * - Separate port state used for routing of I/O's from port + * mgmt-login retry etc. + * + * Rev 8.00.00b6-pre19 October 13, 2003 AV + * - Resync with Linux Kernel 2.6.0-test7-bk5. + * - Add intelligent RSCN event handling: + * - reduce scan time during 'port' RSCN events by only + * querying specified port ids. + * - Available on ISP23xx cards only. + * - Increase maximum number of recognizable targets from 256 + * to 512. + * - Backend changes were previously added to support TPX + * (2K logins) firmware. Mid-layer can now scan for targets + * (H, B, T, L) where 512 < T >= 0. + * - Remove IP support from driver. + * - Switch firmware types from IP->TP for ISP22xx and + * IPX->TPX for ISP23xx cards. + * - Remove files qla_ip.[ch]. + * - Remove type designations from firmware filenames. + * + * Rev 8.00.00b6-pre11 September 15, 2003 DG/AV + * - Resync with 6.06.00. + * - Resync with Linux Kernel 2.6.0-test5-bk3. + * - Add new 2300 IPX firmware (3.02.15). + * + * Rev 8.00.00b5 July 31, 2003 AV + * - Always create an fc_lun_t entry for lun 0 - as the mid- + * layer requires access to this lun for discovery to occur. + * - General sanitizing: + * - Add generic firmware option definitions. + * - Generalize retrieval/update of firmware options. + * - Fix compile errors which occur with extended debug. + * - Handle failure cases for scsi_add_host() and + * down_interruptible(). + * - Host template updates: + * - Use standard bios_param callback function. + * - Disable clustering. + * - Remove unchecked_is_dma entry. + * + * Rev 8.00.00b5-pre5 July 29, 2003 DG/AV + * - Resync with 6.06.00b13. + * - Resync with Linux Kernel 2.6.0-test2. + * - Pass the complete loop_id, not the masked (0xff) value + * while issuing mailbox commands (qla_mbx.c/qla_fo.c/ + * qla_iocb.c/qla_init.c). + * - Properly handle zero-length return status for an RLC CDB. + * - Create an fclun_t structure for 'disconnected' luns, + * peripheral-qualifier of 001b. + * - Remove unused LIP-sequence register access during AE 8010. + * - Generalize qla2x00_mark_device_lost() to handle forced + * login request -- modify all direct/indirect invocations + * with proper flag. + * - Save RSCN notification (AE 8015h) data in a proper and + * consistent format (domain, area, al_pa). + * - General sanitizing: + * - scsi_qla_host structure member reordering for cache-line + * coherency. + * - Remove unused SCSI opcodes, endian-swap definitions. + * - Remove CMD_* pre-processor defines. + * - Remove unused SCSIFCHOTSWAP/GAMAP/MULTIHOST codes. + * - Backout patch which added a per-scsi_qla_host scsi host + * spinlock, since mid-layer already defines one. + * - Add new 2300 IPX firmware (3.02.15). + * + * Rev 8.00.00b4 July 14, 2003 RA/DG/AV + * - Resync with 6.06.00b12. + * - Resync with Linux Kernel 2.6.0-test1. + * - Remove IOCB throttling code -- originally #if'd. + * - Remove apidev_*() routines since proc_mknod() has been + * removed -- need alternate IOCTL interface. + * - Merge several performance/fix patches from Arjan van de + * Ven: + * - Undefined operation >> 32. + * - No need to acquire mid-layer lock during command + * callback. + * - Use a per-HBA mid-layer lock. + * - Use a non-locked cycle for setting the count of the + * newly allocated sp (qla2x00_get_new_sp()). + * - Modify semantic behavior of qla2x00_queuecommand(): + * - Reduce cacheline bouncing by having I/Os submitted + * by the IRQ handler. + * - Remove extraneous calls to qla2x00_next() during I/O + * queuing. + * - Use list_splice_init() during qla2x00_done() handling + * of commands to reduce list_lock contention. + * - RIO mode support for ISP2200: + * - Implementation differs slightly from original patch. + * - Do not use bottom-half handler (tasklet/work queue) + * for qla2x00_done() processing. + * + * Rev 8.00.00b4-pre22 July 12, 2003 AV + * - Check for 'Process Response Queue' requests early during + * the Host Status check. + * - General sanitizing: + * - srb_t structure rewrite, removal of unused members. + * - Remove unused fcdev array, fabricid, and PORT_* + * definitions. + * - Remove unused config_reg_t PCI definitions. + * - Add new 2200 IP firmware (2.02.06). + * - Add new 2300 IPX firmware (3.02.14). + * + * Rev 8.00.00b4-pre19 June 30, 2003 AV + * - Resync with Linux Kernel 2.5.73-bk8. + * - Rework IOCB command queuing methods: + * - Upper-layer driver *MUST* properly set the direction + * bit of SCSI commands. + * - Generalize 32bit/64bit queuing path functions. + * - Remove costly page-boundary cross check when using + * 64bit address capable IOCBs. + * + * Rev 8.00.00b4-pre15 June 19, 2003 AV + * - Resync with 6.06.00b11. + * - Continue fcport list consolidation work: + * - Updated IOCTL implementations to use new fcports + * list. + * - Modified product ID check to not verify ISP chip + * revision -- ISP2312 v3 (qla2x00_chip_diag()). + * - Add new 2300 IPX firmware (3.02.13): + * + * Rev 8.00.00b4-pre13 June 19, 2003 AV + * - Fix build process for qla2100 driver -- no support + * for IP. + * - SCSI host template modifications: + * - Set sg_tablesize based on the derived DMA mask. + * - Increase max_sectors since only limit within RISC + * is transfer of (((2^32) - 1) >> 9) sectors. + * + * Rev 8.00.00b4-pre12 June 18, 2003 RA, DG, RL, AV + * - Resync with 6.06.00b10. + * - Resync with Linux Kernel 2.5.72. + * - Initial fcport list consolidation work: + * - fcports/fcinitiators/fcdev/fc_ip --> ha->fcports + * list. + * + * Rev 8.00.00b4-pre7 June 05, 2003 AV + * - Properly release PCI resouces in init-failure case. + * - Reconcile disparite function return code definitions. + * + * Rev 8.00.00b4-pre4 June 03, 2003 AV + * - Resync with Linux Kernel 2.5.70-bk8: + * - SHT proc_info() changes. + * - Restructure SNS Generic Services routines: + * - Add qla_gs.c file to driver distribution. + * - Configure PCI latency timer for ISP23xx. + * + * Rev 8.00.00b4-pre3 June 02, 2003 RA, DG, RL, AV + * - Resync with 6.06.00b5. + * - Rework (again) PCI I/O space configuration + * (Anton Blanchard): + * - Use pci_set_mwi() routine; + * - Remove uneeded qla2x00_set_cache_line() function. + * - Remove extraneous modification of PCI_COMMAND word. + * + * Rev 8.00.00b3 May 29, 2003 AV + * - Resync with Linux Kernel 2.5.70. + * - Move RISC paused check from ISR fast-path. + * + * Rev 8.00.00b3-pre8 May 26, 2003 AV + * - Add new 2300 IPX firmware (3.02.12): + * - Rework PCI I/O space configuration. + * + * Rev 8.00.00b3-pre6 May 22, 2003 RA, DG, RL, AV + * - Resync with 6.06.00b3. + * + * Rev 8.00.00b3-pre4 May 21 2003 AV + * - Add new 2300 IPX firmware (3.02.11): + * - Remove 2300 TPX firmware from distribution. + * + * Rev 8.00.00b3-pre3 May 21 2003 AV + * - Properly setup PCI configuation space during + * initialization: + * - Properly configure Memory-Mapped I/O during early + * configuration stage. + * - Rework IP functionality to support 2k logins. + * - Add new 2300 IPX firmware (3.02.11): + * - Remove 2300 TPX firmware from distribution. + * + * Rev 8.00.00b3-pre2 May ??, 2003 RA, DG, RL, AV + * - Resync with 6.06.00b1. + * + * Rev 8.00.00b3-pre1 May ??, 2003 RA, DG, RL, AV + * - Resync with 6.05.00. + * + * Rev 8.00.00b2 May 19, 2003 AV + * - Simplify dma_addr_t handling during command queuing given + * new block-layer defined restrictions: + * - Physical addresses not spanning 4GB boundaries. + * - Firmware versions: 2100 TP (1.19.24), 2200 IP (2.02.05), + * 2300 TPX (3.02.10). + * + * Rev 8.00.00b2-pre1 May 13, 2003 AV + * - Add support for new 'Hotplug initialization' model. + * - Simplify host template by removing unused callbacks. + * - Use scsicam facilities to determine geometry. + * - Fix compilation issues for non-ISP23xx builds: + * - Correct register references in qla_dbg.c. + * - Correct Makefile build process. + * + * Rev 8.00.00b1 May 05, 2003 AV + * - Resync with Linux Kernel 2.5.69. + * - Firmware versions: 2100 TP (1.19.24), 2200 TP (2.02.05), + * 2300 TPX (3.02.10). + * + * Rev 8.00.00b1-pre45 April ??, 2003 AV + * - Resync with Linux Kernel 2.5.68-bk11: + * - Fix improper return-code assignment during fabric + * discovery. + * - Remove additional extraneous #defines from + * qla_settings.h. + * - USE_PORTNAME -- FO will always use portname. + * - Default queue depth size set to 64. + * + * Rev 8.00.00b1-pre42 April ??, 2003 AV + * - Convert bottom-half tasklet to a work_queue. + * - Initial basic coding of dynamic queue depth handling + * during QUEUE FULL statuses. + * - Fix mailbox interface problem with + * qla2x00_get_retry_cnt(). + * + * Rev 8.00.00b1-pre41 April ??, 2003 AV + * - Convert build defines qla2[1|2|3]00 macros to + * qla2[1|2|3]xx due to module name stringification clashes. + * - Add additional ISP2322 checks during board configuration. + * + * Rev 8.00.00b1-pre40 April ??, 2003 AV + * - Resync with Linux Kernel 2.5.68-bk8: + * - Updated IRQ handler interface. + * - Add ISP dump code (stub) in case of SYSTEM_ERROR on + * ISP2100. + * - Add new 2200 IP firmware (2.02.05). + * + * Rev 8.00.00b1-pre39 April ??, 2003 AV + * - Resync with Linux Kernel 2.5.68. + * - Add simple build.sh script to aid in external compilation. + * - Clean-break with Kernel 2.4 compatibility. + * - Rework DPC routine -- completion routines for signaling. + * - Re-add HBAAPI character device node for IOCTL support. + * - Remove residual QLA2X_PERFORMANCE defines. + * - Allocate SP pool via __get_free_pages() rather than + * individual kmalloc()'s. + * - Inform SCSI mid-layer of 16-byte CDB support + * (host->max_cmd_len): + * - Remove unecessary 'more_cdb' handling code from + * qla_iocb.c and qla_xioct.c. + * - Reduce duplicate code in fabric scanning logic (MS IOCB + * preparation). + * - Add ISP dump code in case of SYSTEM_ERROR. + * - Remove 2300 VIX firmware from distribution: + * - Add initial code for IPX support. + * - Add new 2300 TPX firmware (3.02.10). + * + * Rev 8.00.00b1-pre34 April ??, 2003 AV + * - Resync with Linux Kernel 2.5.67. + * - Use domain/area/al_pa fields when displaying PortID + * values -- addresses endianess issues. + * - Rework large case statement to check 'common' CDB commands + * early in qla2x00_get_cmd_direction(). + * + * Rev 8.00.00b1-pre31 April ??, 2003 AV + * - Update makefile to support PPC64 build. + * - Retool NVRAM configuration routine and structures: + * - Consoldate ISP21xx/ISP22xx/ISP23xx configuration + * (struct nvram_t). + * - Remove big/little endian support structures in favor of + * simplified bit-operations within byte fields. + * - Fix long-standing 'static' buffer sharing problem in + * qla2x00_configure_fabric(). + * + * Rev 8.00.00b1-pre30 April ??, 2003 AV + * - Complete implementation of GID_PT scan. + * - Use consistent MS IOCB invocation method to query SNS: + * - Add RNN_ID and RSNN_NN registrations in a fabric. + * - Remove unused Mailbox Command 6Eh (Send SNS) support + * structures. + * - Use 64bit safe IOCBs while issuing INQUIRY and RLC during + * topology scan. + * - Until reimplementation of fcdev_t/fcport list + * consolidation, valid loop_id ranges are still limited from + * 0x00 through 0xFF -- enforce this within the code. + * + * Rev 8.00.00b1-pre27 March ??, 2003 AV + * - Resync with 6.05.00b9. + * - Retool HBA PCI configuration -- qla2x00_pci_config(). + * - Remove inconsistent use of delay routines (UDELAY/SYS*). + * - Continue to teardown/clean/add comments and debug + * routines. + * - Properly swap bytes of the device's nodename in + * qla2x00_configure_local_loop(). + * + * Rev 8.00.00b1-pre25 March ??, 2003 AV + * - Resync with 6.05.00b8. + * + * Rev 8.00.00b1-pre23 March ??, 2003 AV + * - Remove (#define) IOCB usage throttling. + * - Abstract interrupt polling with qla2x00_poll(). + * - Modify lun scanning logic: + * - If the device does not support the SCSI Report Luns + * command, the driver will now only scan from 0 to the + * max#-luns as defined in the NVRAM (BIOS), rather than + * blindly scanning from 0 to 255 -- which could result in + * an increase in startup time when running against slow + * (JBOD) devices. + * - Rework reset logic in qla2x00_reset_chip() (spec). + * + * Rev 8.00.00b1-pre22 March ??, 2003 AV + * - Resync with 6.05.00b7. + * - Cleanup (rewrite) ISR handler. + * - Rename kmem_zalloc --> qla2x00_kmem_zalloc(): + * - This function will eventually be removed. + * - Add new 2300 VIX firmware (3.02.09): + * - Support for Tape, Fabric, 2K logins, IP, and VI. + * + * Rev 8.00.00b1-pre18 March ??, 2003 AV + * - Support 232x type ISPs. + * - Support single firmware for each ISP type: + * - Restructure brd_info/fw_info methods. + * - Streamline firmware load process. + * - Properly query firmware for version information. + * - Remove extraneous scsi_qla_host members: + * - device_id ==> pdev->device + * - Fix fc4 features (RFF_ID) registration. + * - Convert kmem_zalloc --> qla2x00_kmem_zalloc(). + * - Remove unused/extraneous #defines (USE_PORTNAME). + * + * Rev 8.00.00b1-pre14 March ??, 2003 AV + * - Resync with 6.05.00b6. + * - Initial source-code restructuring effort. + * - Build procedure. + * - Source file layout -- intuitive component layout. + * - Remove unused #defines (*PERFORMANCE, WORD_FW_LOAD, etc). + * - Add support for 2K logins (TPX -- firmware). + * - Add module parameter ql2xsuspendcount. + * - Add new 2200 IP/TP firmware (2.02.04). + * + * Rev 8.00.00b1-pre9 March ??, 2003 RL/DG/RA/AV + * - Use kernel struct list_head for fcport and fclun lists. + * - Remove extraneous (L|M)S_64BITS() and QL21_64*() defines. + * + * Rev 8.00.00b1-pre8 February 28, 2003 RL/DG/RA/AV + * - Resync with 6.05.00b3. + * + * Rev 8.00.00b1-pre7 February 23, 2003 RL/DG/RA/AV + * - Add alternate fabric scanning logic (GID_PT/GNN_ID/GPN_ID). + * - Remove use of deprecated function check_region(). + * - Add new 2300 IP/TP firmware (3.02.08). + * + * Rev 8.00.00b1-pre5 January 28, 2003 RL/DG/RA/AV + * - Resync with 6.05.00b3. + * - Consolidate device_reg structure definitions for ISP types. + * - Add support for new queue-depth selection. + * - Add new 2300 IP/TP firmware (3.02.07). + * + * Rev 8.00.00b1-pre1 January 17, 2003 AV + * - Initial branch from 6.04.00b8 driver. + * - Remove VMWARE specific code. + * - Add support for pci_driver interface. + * + ********************************************************************/ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/scsi_priv.h 999-mjb/drivers/scsi/scsi_priv.h --- 000-virgin/drivers/scsi/scsi_priv.h 2003-10-27 10:41:12.000000000 -0800 +++ 999-mjb/drivers/scsi/scsi_priv.h 2003-11-25 23:01:25.000000000 -0800 @@ -130,7 +130,6 @@ extern void scsi_exit_procfs(void); extern int scsi_scan_host_selected(struct Scsi_Host *, unsigned int, unsigned int, unsigned int, int); extern void scsi_forget_host(struct Scsi_Host *); -extern void scsi_free_sdev(struct scsi_device *); extern void scsi_rescan_device(struct device *); /* scsi_sysctl.c */ @@ -143,7 +142,8 @@ extern void scsi_exit_sysctl(void); #endif /* CONFIG_SYSCTL */ /* scsi_sysfs.c */ -extern int scsi_device_register(struct scsi_device *); +extern void scsi_device_dev_release(struct device *); +extern int scsi_sysfs_add_sdev(struct scsi_device *); extern int scsi_sysfs_add_host(struct Scsi_Host *); extern int scsi_sysfs_register(void); extern void scsi_sysfs_unregister(void); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/scsi_scan.c 999-mjb/drivers/scsi/scsi_scan.c --- 000-virgin/drivers/scsi/scsi_scan.c 2003-11-24 16:12:31.000000000 -0800 +++ 999-mjb/drivers/scsi/scsi_scan.c 2003-11-25 23:01:25.000000000 -0800 @@ -236,6 +236,25 @@ static struct scsi_device *scsi_alloc_sd goto out_free_queue; } + if (get_device(&sdev->host->shost_gendev)) { + + device_initialize(&sdev->sdev_gendev); + sdev->sdev_gendev.parent = &sdev->host->shost_gendev; + sdev->sdev_gendev.bus = &scsi_bus_type; + sdev->sdev_gendev.release = scsi_device_dev_release; + sprintf(sdev->sdev_gendev.bus_id,"%d:%d:%d:%d", + sdev->host->host_no, sdev->channel, sdev->id, + sdev->lun); + + class_device_initialize(&sdev->sdev_classdev); + sdev->sdev_classdev.dev = &sdev->sdev_gendev; + sdev->sdev_classdev.class = &sdev_class; + snprintf(sdev->sdev_classdev.class_id, BUS_ID_SIZE, + "%d:%d:%d:%d", sdev->host->host_no, + sdev->channel, sdev->id, sdev->lun); + } else + goto out_free_queue; + /* * If there are any same target siblings, add this to the * sibling list @@ -273,36 +292,6 @@ out: } /** - * scsi_free_sdev - cleanup and free a scsi_device - * @sdev: cleanup and free this scsi_device - * - * Description: - * Undo the actions in scsi_alloc_sdev, including removing @sdev from - * the list, and freeing @sdev. - **/ -void scsi_free_sdev(struct scsi_device *sdev) -{ - unsigned long flags; - - spin_lock_irqsave(sdev->host->host_lock, flags); - list_del(&sdev->siblings); - list_del(&sdev->same_target_siblings); - spin_unlock_irqrestore(sdev->host->host_lock, flags); - - if (sdev->request_queue) - scsi_free_queue(sdev->request_queue); - - spin_lock_irqsave(sdev->host->host_lock, flags); - list_del(&sdev->starved_entry); - if (sdev->single_lun && --sdev->sdev_target->starget_refcnt == 0) - kfree(sdev->sdev_target); - spin_unlock_irqrestore(sdev->host->host_lock, flags); - - kfree(sdev->inquiry); - kfree(sdev); -} - -/** * scsi_probe_lun - probe a single LUN using a SCSI INQUIRY * @sreq: used to send the INQUIRY * @inq_result: area to store the INQUIRY result @@ -642,7 +631,7 @@ static int scsi_add_lun(struct scsi_devi * register it and tell the rest of the kernel * about it. */ - scsi_device_register(sdev); + scsi_sysfs_add_sdev(sdev); return SCSI_SCAN_LUN_PRESENT; } @@ -748,8 +737,11 @@ static int scsi_probe_and_add_lun(struct if (res == SCSI_SCAN_LUN_PRESENT) { if (sdevp) *sdevp = sdev; - } else - scsi_free_sdev(sdev); + } else { + if (sdev->host->hostt->slave_destroy) + sdev->host->hostt->slave_destroy(sdev); + put_device(&sdev->sdev_gendev); + } out: return res; } @@ -1301,5 +1293,8 @@ struct scsi_device *scsi_get_host_dev(st void scsi_free_host_dev(struct scsi_device *sdev) { BUG_ON(sdev->id != sdev->host->this_id); - scsi_free_sdev(sdev); + + if (sdev->host->hostt->slave_destroy) + sdev->host->hostt->slave_destroy(sdev); + put_device(&sdev->sdev_gendev); } diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/scsi/scsi_sysfs.c 999-mjb/drivers/scsi/scsi_sysfs.c --- 000-virgin/drivers/scsi/scsi_sysfs.c 2003-11-24 16:12:31.000000000 -0800 +++ 999-mjb/drivers/scsi/scsi_sysfs.c 2003-11-25 23:01:25.000000000 -0800 @@ -115,14 +115,29 @@ static void scsi_device_cls_release(stru put_device(&sdev->sdev_gendev); } -static void scsi_device_dev_release(struct device *dev) +void scsi_device_dev_release(struct device *dev) { struct scsi_device *sdev; struct device *parent; + unsigned long flags; parent = dev->parent; sdev = to_scsi_device(dev); - scsi_free_sdev(sdev); + + spin_lock_irqsave(sdev->host->host_lock, flags); + list_del(&sdev->siblings); + list_del(&sdev->same_target_siblings); + list_del(&sdev->starved_entry); + if (sdev->single_lun && --sdev->sdev_target->starget_refcnt == 0) + kfree(sdev->sdev_target); + spin_unlock_irqrestore(sdev->host->host_lock, flags); + + if (sdev->request_queue) + scsi_free_queue(sdev->request_queue); + + kfree(sdev->inquiry); + kfree(sdev); + put_device(parent); } @@ -321,29 +336,18 @@ static int attr_add(struct device *dev, } /** - * scsi_device_register - register a scsi device with the scsi bus - * @sdev: scsi_device to register + * scsi_sysfs_add_sdev - add scsi device to sysfs + * @sdev: scsi_device to add * * Return value: * 0 on Success / non-zero on Failure **/ -int scsi_device_register(struct scsi_device *sdev) +int scsi_sysfs_add_sdev(struct scsi_device *sdev) { - int error = 0, i; + int error = -EINVAL, i; - set_bit(SDEV_ADD, &sdev->sdev_state); - device_initialize(&sdev->sdev_gendev); - sprintf(sdev->sdev_gendev.bus_id,"%d:%d:%d:%d", - sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); - sdev->sdev_gendev.parent = &sdev->host->shost_gendev; - sdev->sdev_gendev.bus = &scsi_bus_type; - sdev->sdev_gendev.release = scsi_device_dev_release; - - class_device_initialize(&sdev->sdev_classdev); - sdev->sdev_classdev.dev = &sdev->sdev_gendev; - sdev->sdev_classdev.class = &sdev_class; - snprintf(sdev->sdev_classdev.class_id, BUS_ID_SIZE, "%d:%d:%d:%d", - sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); + if (test_and_set_bit(SDEV_ADD, &sdev->sdev_state)) + return error; error = device_add(&sdev->sdev_gendev); if (error) { @@ -351,8 +355,6 @@ int scsi_device_register(struct scsi_dev return error; } - get_device(sdev->sdev_gendev.parent); - error = class_device_add(&sdev->sdev_classdev); if (error) { printk(KERN_INFO "error 2\n"); @@ -396,12 +398,14 @@ clean_device: **/ void scsi_remove_device(struct scsi_device *sdev) { - class_device_unregister(&sdev->sdev_classdev); - set_bit(SDEV_DEL, &sdev->sdev_state); - if (sdev->host->hostt->slave_destroy) - sdev->host->hostt->slave_destroy(sdev); - device_del(&sdev->sdev_gendev); - put_device(&sdev->sdev_gendev); + if (test_and_clear_bit(SDEV_ADD, &sdev->sdev_state)) { + set_bit(SDEV_DEL, &sdev->sdev_state); + class_device_unregister(&sdev->sdev_classdev); + device_del(&sdev->sdev_gendev); + if (sdev->host->hostt->slave_destroy) + sdev->host->hostt->slave_destroy(sdev); + put_device(&sdev->sdev_gendev); + } } int scsi_register_driver(struct device_driver *drv) diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/serial/8250.c 999-mjb/drivers/serial/8250.c --- 000-virgin/drivers/serial/8250.c 2003-10-27 10:41:12.000000000 -0800 +++ 999-mjb/drivers/serial/8250.c 2003-11-24 16:14:01.000000000 -0800 @@ -844,7 +844,7 @@ receive_chars(struct uart_8250_port *up, if (unlikely(tty->flip.count >= TTY_FLIPBUF_SIZE)) { tty->flip.work.func((void *)tty); if (tty->flip.count >= TTY_FLIPBUF_SIZE) - return; // if TTY_DONT_FLIP is set + return; /* if TTY_DONT_FLIP is set */ } ch = serial_inp(up, UART_RX); *tty->flip.char_buf_ptr = ch; @@ -1205,12 +1205,21 @@ static void serial8250_break_ctl(struct spin_unlock_irqrestore(&up->port.lock, flags); } +#ifdef CONFIG_KGDB +static int kgdb_irq = -1; +#endif + static int serial8250_startup(struct uart_port *port) { struct uart_8250_port *up = (struct uart_8250_port *)port; unsigned long flags; int retval; +#ifdef CONFIG_KGDB + if (up->port.irq == kgdb_irq) + return -EBUSY; +#endif + up->capabilities = uart_config[up->port.type].flags; if (up->port.type == PORT_16C950) { @@ -1876,6 +1885,10 @@ static void __init serial8250_register_p for (i = 0; i < UART_NR; i++) { struct uart_8250_port *up = &serial8250_ports[i]; +#ifdef CONFIG_KGDB + if (up->port.irq == kgdb_irq) + up->port.kgdb = 1; +#endif up->port.line = i; up->port.ops = &serial8250_pops; init_timer(&up->timer); @@ -2145,6 +2158,31 @@ void serial8250_resume_port(int line) uart_resume_port(&serial8250_reg, &serial8250_ports[line].port); } +#ifdef CONFIG_KGDB +/* + * Find all the ports using the given irq and shut them down. + * Result should be that the irq will be released. + */ +void shutdown_for_kgdb(struct async_struct * info) +{ + int irq = info->state->irq; + struct uart_8250_port *up; + int ttyS; + + kgdb_irq = irq; /* save for later init */ + for (ttyS = 0; ttyS < UART_NR; ttyS++){ + up = &serial8250_ports[ttyS]; + if (up->port.irq == irq && (irq_lists + irq)->head) { +#ifdef CONFIG_DEBUG_SPINLOCK /* ugly business... */ + if(up->port.lock.magic != SPINLOCK_MAGIC) + spin_lock_init(&up->port.lock); +#endif + serial8250_shutdown(&up->port); + } + } +} +#endif /* CONFIG_KGDB */ + static int __init serial8250_init(void) { int ret, i; diff -purN -X /home/mbligh/.diff.exclude 000-virgin/drivers/serial/serial_core.c 999-mjb/drivers/serial/serial_core.c --- 000-virgin/drivers/serial/serial_core.c 2003-11-24 16:12:31.000000000 -0800 +++ 999-mjb/drivers/serial/serial_core.c 2003-11-24 16:14:01.000000000 -0800 @@ -1975,6 +1975,11 @@ uart_configure_port(struct uart_driver * { unsigned int flags; +#ifdef CONFIG_KGDB + if (port->kgdb) + return; +#endif + /* * If there isn't a port here, don't do anything further. */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/fs/aio.c 999-mjb/fs/aio.c --- 000-virgin/fs/aio.c 2003-11-24 16:12:31.000000000 -0800 +++ 999-mjb/fs/aio.c 2003-11-24 16:33:28.000000000 -0800 @@ -203,6 +203,7 @@ static struct kioctx *ioctx_alloc(unsign { struct mm_struct *mm; struct kioctx *ctx; + int ret = 0; /* Prevent overflows */ if ((nr_events > (0x10000000U / sizeof(struct io_event))) || @@ -232,7 +233,8 @@ static struct kioctx *ioctx_alloc(unsign INIT_LIST_HEAD(&ctx->run_list); INIT_WORK(&ctx->wq, aio_kick_handler, ctx); - if (aio_setup_ring(ctx) < 0) + ret = aio_setup_ring(ctx); + if (unlikely(ret < 0)) goto out_freectx; /* limit the number of system wide aios */ @@ -259,7 +261,7 @@ out_cleanup: out_freectx: mmdrop(mm); kmem_cache_free(kioctx_cachep, ctx); - ctx = ERR_PTR(-ENOMEM); + ctx = ERR_PTR(ret); dprintk("aio: error allocating ioctx %p\n", ctx); return ctx; diff -purN -X /home/mbligh/.diff.exclude 000-virgin/fs/binfmt_aout.c 999-mjb/fs/binfmt_aout.c --- 000-virgin/fs/binfmt_aout.c 2003-10-01 11:48:15.000000000 -0700 +++ 999-mjb/fs/binfmt_aout.c 2003-11-24 16:34:48.000000000 -0800 @@ -309,7 +309,7 @@ static int load_aout_binary(struct linux (current->mm->start_brk = N_BSSADDR(ex)); current->mm->free_area_cache = TASK_UNMAPPED_BASE; - current->mm->rss = 0; + zero_rss(current->mm); current->mm->mmap = NULL; compute_creds(bprm); current->flags &= ~PF_FORKNOEXEC; diff -purN -X /home/mbligh/.diff.exclude 000-virgin/fs/binfmt_elf.c 999-mjb/fs/binfmt_elf.c --- 000-virgin/fs/binfmt_elf.c 2003-10-27 10:41:13.000000000 -0800 +++ 999-mjb/fs/binfmt_elf.c 2003-11-25 14:24:37.000000000 -0800 @@ -7,6 +7,7 @@ * Tools". * * Copyright 1993, 1994: Eric Youngdale (ericy@cais.com). + * Top-down vma allocation support, William Irwin, IBM, 2003 */ #include @@ -329,8 +330,13 @@ static unsigned long load_elf_interp(str if (retval < 0) goto out_close; +#ifndef CONFIG_MMAP_TOPDOWN eppnt = elf_phdata; for (i=0; ie_phnum; i++, eppnt++) { +#else + eppnt = &elf_phdata[interp_elf_ex->e_phnum - 1]; + for (i = interp_elf_ex->e_phnum - 1; i >= 0; --i, --eppnt) { +#endif if (eppnt->p_type == PT_LOAD) { int elf_type = MAP_PRIVATE | MAP_DENYWRITE; int elf_prot = 0; @@ -344,7 +350,8 @@ static unsigned long load_elf_interp(str if (interp_elf_ex->e_type == ET_EXEC || load_addr_set) elf_type |= MAP_FIXED; - map_addr = elf_map(interpreter, load_addr + vaddr, eppnt, elf_prot, elf_type); + map_addr = load_addr_set ? load_addr + vaddr : 0; + map_addr = elf_map(interpreter, map_addr, eppnt, elf_prot, elf_type); if (BAD_ADDR(map_addr)) goto out_close; @@ -644,7 +651,7 @@ static int load_elf_binary(struct linux_ /* Do this so that we can load the interpreter, if need be. We will change some of these later */ - current->mm->rss = 0; + zero_rss(current->mm); current->mm->free_area_cache = TASK_UNMAPPED_BASE; retval = setup_arg_pages(bprm); if (retval < 0) { diff -purN -X /home/mbligh/.diff.exclude 000-virgin/fs/binfmt_flat.c 999-mjb/fs/binfmt_flat.c --- 000-virgin/fs/binfmt_flat.c 2003-10-01 11:35:23.000000000 -0700 +++ 999-mjb/fs/binfmt_flat.c 2003-11-24 16:34:48.000000000 -0800 @@ -643,7 +643,7 @@ static int load_flat_file(struct linux_b current->mm->start_brk = datapos + data_len + bss_len; current->mm->brk = (current->mm->start_brk + 3) & ~3; current->mm->context.end_brk = memp + ksize((void *) memp) - stack_len; - current->mm->rss = 0; + zero_rss(current->mm); } if (flags & FLAT_FLAG_KTRACE) diff -purN -X /home/mbligh/.diff.exclude 000-virgin/fs/binfmt_som.c 999-mjb/fs/binfmt_som.c --- 000-virgin/fs/binfmt_som.c 2003-02-13 16:36:36.000000000 -0800 +++ 999-mjb/fs/binfmt_som.c 2003-11-24 16:34:49.000000000 -0800 @@ -259,7 +259,7 @@ load_som_binary(struct linux_binprm * bp create_som_tables(bprm); current->mm->start_stack = bprm->p; - current->mm->rss = 0; + zero_rss(current->mm); #if 0 printk("(start_brk) %08lx\n" , (unsigned long) current->mm->start_brk); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/fs/buffer.c 999-mjb/fs/buffer.c --- 000-virgin/fs/buffer.c 2003-10-14 15:50:28.000000000 -0700 +++ 999-mjb/fs/buffer.c 2003-11-24 16:35:33.000000000 -0800 @@ -865,14 +865,14 @@ int __set_page_dirty_buffers(struct page spin_unlock(&mapping->private_lock); if (!TestSetPageDirty(page)) { - spin_lock(&mapping->page_lock); + mapping_wrlock(&mapping->page_lock); if (page->mapping) { /* Race with truncate? */ if (!mapping->backing_dev_info->memory_backed) inc_page_state(nr_dirty); list_del(&page->list); list_add(&page->list, &mapping->dirty_pages); } - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); } diff -purN -X /home/mbligh/.diff.exclude 000-virgin/fs/exec.c 999-mjb/fs/exec.c --- 000-virgin/fs/exec.c 2003-10-21 11:16:09.000000000 -0700 +++ 999-mjb/fs/exec.c 2003-11-24 16:34:49.000000000 -0800 @@ -323,10 +323,11 @@ void put_dirty_page(struct task_struct * } lru_cache_add_active(page); flush_dcache_page(page); + SetPageAnon(page); set_pte(pte, pte_mkdirty(pte_mkwrite(mk_pte(page, prot)))); pte_chain = page_add_rmap(page, pte, pte_chain); pte_unmap(pte); - tsk->mm->rss++; + inc_rss(tsk->mm, page); spin_unlock(&tsk->mm->page_table_lock); /* no need for flush_tlb */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/fs/fs-writeback.c 999-mjb/fs/fs-writeback.c --- 000-virgin/fs/fs-writeback.c 2003-10-14 15:50:28.000000000 -0700 +++ 999-mjb/fs/fs-writeback.c 2003-11-24 16:35:33.000000000 -0800 @@ -152,10 +152,10 @@ __sync_single_inode(struct inode *inode, * read speculatively by this cpu before &= ~I_DIRTY -- mikulas */ - spin_lock(&mapping->page_lock); + mapping_wrlock(&mapping->page_lock); if (wait || !wbc->for_kupdate || list_empty(&mapping->io_pages)) list_splice_init(&mapping->dirty_pages, &mapping->io_pages); - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); spin_unlock(&inode_lock); do_writepages(mapping, wbc); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/fs/inode.c 999-mjb/fs/inode.c --- 000-virgin/fs/inode.c 2003-10-21 11:16:09.000000000 -0700 +++ 999-mjb/fs/inode.c 2003-11-24 16:35:33.000000000 -0800 @@ -147,6 +147,9 @@ static struct inode *alloc_inode(struct mapping->dirtied_when = 0; mapping->assoc_mapping = NULL; mapping->backing_dev_info = &default_backing_dev_info; +#ifdef CONFIG_NUMA + mapping->binding = NULL; +#endif if (sb->s_bdev) mapping->backing_dev_info = sb->s_bdev->bd_inode->i_mapping->backing_dev_info; memset(&inode->u, 0, sizeof(inode->u)); @@ -184,7 +187,7 @@ void inode_init_once(struct inode *inode INIT_LIST_HEAD(&inode->i_devices); sema_init(&inode->i_sem, 1); INIT_RADIX_TREE(&inode->i_data.page_tree, GFP_ATOMIC); - spin_lock_init(&inode->i_data.page_lock); + mapping_rwlock_init(&inode->i_data.page_lock); init_MUTEX(&inode->i_data.i_shared_sem); atomic_set(&inode->i_data.truncate_count, 0); INIT_LIST_HEAD(&inode->i_data.private_list); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/fs/mpage.c 999-mjb/fs/mpage.c --- 000-virgin/fs/mpage.c 2003-10-01 11:41:13.000000000 -0700 +++ 999-mjb/fs/mpage.c 2003-11-24 16:35:33.000000000 -0800 @@ -635,7 +635,7 @@ mpage_writepages(struct address_space *m if (get_block == NULL) writepage = mapping->a_ops->writepage; - spin_lock(&mapping->page_lock); + mapping_wrlock(&mapping->page_lock); while (!list_empty(&mapping->io_pages) && !done) { struct page *page = list_entry(mapping->io_pages.prev, struct page, list); @@ -655,7 +655,7 @@ mpage_writepages(struct address_space *m list_add(&page->list, &mapping->locked_pages); page_cache_get(page); - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); /* * At this point we hold neither mapping->page_lock nor @@ -695,12 +695,12 @@ mpage_writepages(struct address_space *m unlock_page(page); } page_cache_release(page); - spin_lock(&mapping->page_lock); + mapping_wrlock(&mapping->page_lock); } /* * Leave any remaining dirty pages on ->io_pages */ - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); if (bio) mpage_bio_submit(WRITE, bio); return ret; diff -purN -X /home/mbligh/.diff.exclude 000-virgin/fs/proc/array.c 999-mjb/fs/proc/array.c --- 000-virgin/fs/proc/array.c 2003-10-21 11:16:10.000000000 -0700 +++ 999-mjb/fs/proc/array.c 2003-11-24 16:36:16.000000000 -0800 @@ -345,7 +345,7 @@ int proc_pid_stat(struct task_struct *ta read_unlock(&tasklist_lock); res = sprintf(buffer,"%d (%s) %c %d %d %d %d %d %lu %lu \ %lu %lu %lu %lu %lu %ld %ld %ld %ld %d %ld %llu %lu %ld %lu %lu %lu %lu %lu \ -%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu\n", +%lu %lu %lu %lu %lu %lu %lu %lu %d %d %lu %lu %lu %lu %lu\n", task->pid, task->comm, state, @@ -391,7 +391,14 @@ int proc_pid_stat(struct task_struct *ta task->exit_signal, task_cpu(task), task->rt_priority, +#ifdef CONFIG_SCHEDSTATS + task->policy, + task->sched_info.cpu_time, + task->sched_info.run_delay, + task->sched_info.pcnt); +#else task->policy); +#endif /* CONFIG_SCHEDSTATS */ if(mm) mmput(mm); return res; diff -purN -X /home/mbligh/.diff.exclude 000-virgin/fs/proc/proc_misc.c 999-mjb/fs/proc/proc_misc.c --- 000-virgin/fs/proc/proc_misc.c 2003-10-01 11:48:19.000000000 -0700 +++ 999-mjb/fs/proc/proc_misc.c 2003-11-24 16:36:16.000000000 -0800 @@ -51,6 +51,10 @@ #include #include +#ifdef CONFIG_MCOUNT +#include +#endif + #define LOAD_INT(x) ((x) >> FSHIFT) #define LOAD_FRAC(x) LOAD_INT(((x) & (FIXED_1-1)) * 100) /* @@ -134,6 +138,41 @@ static struct vmalloc_info get_vmalloc_i return vmi; } +static int real_loadavg_read_proc(char *page, char **start, off_t off, + int count, int *eof, void *data) +{ + int a, b, c, cpu; + int len; + + a = tasks_running[0] + (FIXED_1/200); + b = tasks_running[1] + (FIXED_1/200); + c = tasks_running[2] + (FIXED_1/200); + len = sprintf(page,"Domain load1 load2 load3 nr_run/nr_thrd\n"); + len += sprintf(page+len,"SYSTEM %5d.%02d %5d.%02d %5d.%02d %7ld/%7d\n", + LOAD_INT(a), LOAD_FRAC(a), + LOAD_INT(b), LOAD_FRAC(b), + LOAD_INT(c), LOAD_FRAC(c), + nr_running(), nr_threads); + for (cpu = 0; cpu < NR_CPUS; ++cpu) { + unsigned long nr_running; + if (!cpu_online(cpu)) + continue; + preempt_disable(); + a = per_cpu(cpu_tasks_running,cpu)[0] + (FIXED_1/200); + b = per_cpu(cpu_tasks_running,cpu)[1] + (FIXED_1/200); + c = per_cpu(cpu_tasks_running,cpu)[2] + (FIXED_1/200); + nr_running = nr_running_cpu(cpu); + preempt_enable(); + len += sprintf(page+len, "%5d %5d.%02d %5d.%02d %5d.%02d %7ld/%7d\n", + cpu, + LOAD_INT(a), LOAD_FRAC(a), + LOAD_INT(b), LOAD_FRAC(b), + LOAD_INT(c), LOAD_FRAC(c), + nr_running, nr_threads); + } + return proc_calc_metrics(page, start, off, count, eof, len); +} + static int uptime_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data) { @@ -286,6 +325,10 @@ static struct file_operations proc_vmsta .release = seq_release, }; +#ifdef CONFIG_SCHEDSTATS +extern struct file_operations proc_schedstat_operations; +#endif + #ifdef CONFIG_PROC_HARDWARE static int hardware_read_proc(char *page, char **start, off_t off, int count, int *eof, void *data) @@ -342,6 +385,71 @@ static struct file_operations proc_modul }; #endif +#ifdef CONFIG_NUMA +#define K(x) ((x) << (PAGE_SHIFT - 10)) +static int show_meminfo_numa (struct seq_file *m, void *v) +{ + int *d = v; + int nid = *d; + struct sysinfo i; + si_meminfo_node(&i, nid); + seq_printf(m, "\n" + "Node %d MemTotal: %8lu kB\n" + "Node %d MemFree: %8lu kB\n" + "Node %d MemUsed: %8lu kB\n" + "Node %d HighTotal: %8lu kB\n" + "Node %d HighFree: %8lu kB\n" + "Node %d LowTotal: %8lu kB\n" + "Node %d LowFree: %8lu kB\n", + nid, K(i.totalram), + nid, K(i.freeram), + nid, K(i.totalram-i.freeram), + nid, K(i.totalhigh), + nid, K(i.freehigh), + nid, K(i.totalram-i.totalhigh), + nid, K(i.freeram-i.freehigh)); + + return 0; +} +#undef K + +extern struct seq_operations meminfo_numa_op; +static int meminfo_numa_open(struct inode *inode, struct file *file) +{ + return seq_open(file,&meminfo_numa_op); +} + +static struct file_operations proc_meminfo_numa_operations = { + open: meminfo_numa_open, + read: seq_read, + llseek: seq_lseek, + release: seq_release, +}; + +static void *meminfo_numa_start(struct seq_file *m, loff_t *pos) +{ + return *pos < numnodes ? pos : NULL; +} + +static void *meminfo_numa_next(struct seq_file *m, void *v, loff_t *pos) +{ + ++*pos; + return meminfo_numa_start(m, pos); +} + +static void meminfo_numa_stop(struct seq_file *m, void *v) +{ +} + +struct seq_operations meminfo_numa_op = { + .start = meminfo_numa_start, + .next = meminfo_numa_next, + .stop = meminfo_numa_stop, + .show = show_meminfo_numa, +}; + +#endif + extern struct seq_operations slabinfo_op; extern ssize_t slabinfo_write(struct file *, const char __user *, size_t, loff_t *); static int slabinfo_open(struct inode *inode, struct file *file) @@ -638,6 +746,36 @@ static void create_seq_entry(char *name, entry->proc_fops = f; } +#ifdef CONFIG_LOCKMETER +extern ssize_t get_lockmeter_info(char *, size_t, loff_t *); +extern ssize_t put_lockmeter_info(const char *, size_t); +extern int get_lockmeter_info_size(void); + +/* + * This function accesses lock metering information. + */ +static ssize_t read_lockmeter(struct file *file, char *buf, + size_t count, loff_t *ppos) +{ + return get_lockmeter_info(buf, count, ppos); +} + +/* + * Writing to /proc/lockmeter resets the counters + */ +static ssize_t write_lockmeter(struct file * file, const char * buf, + size_t count, loff_t *ppos) +{ + return put_lockmeter_info(buf, count); +} + +static struct file_operations proc_lockmeter_operations = { + NULL, /* lseek */ + read: read_lockmeter, + write: write_lockmeter, +}; +#endif /* CONFIG_LOCKMETER */ + void __init proc_misc_init(void) { struct proc_dir_entry *entry; @@ -646,6 +784,7 @@ void __init proc_misc_init(void) int (*read_proc)(char*,char**,off_t,int,int*,void*); } *p, simple_ones[] = { {"loadavg", loadavg_read_proc}, + {"real_loadavg",real_loadavg_read_proc}, {"uptime", uptime_read_proc}, {"meminfo", meminfo_read_proc}, {"version", version_read_proc}, @@ -685,6 +824,12 @@ void __init proc_misc_init(void) #ifdef CONFIG_MODULES create_seq_entry("modules", 0, &proc_modules_operations); #endif +#ifdef CONFIG_SCHEDSTATS + create_seq_entry("schedstat", 0, &proc_schedstat_operations); +#endif +#ifdef CONFIG_NUMA + create_seq_entry("meminfo.numa",0,&proc_meminfo_numa_operations); +#endif #ifdef CONFIG_PROC_KCORE proc_root_kcore = create_proc_entry("kcore", S_IRUSR, NULL); if (proc_root_kcore) { @@ -705,6 +850,13 @@ void __init proc_misc_init(void) if (entry) entry->proc_fops = &proc_sysrq_trigger_operations; #endif +#ifdef CONFIG_LOCKMETER + entry = create_proc_entry("lockmeter", S_IWUSR | S_IRUGO, NULL); + if (entry) { + entry->proc_fops = &proc_lockmeter_operations; + entry->size = get_lockmeter_info_size(); + } +#endif #ifdef CONFIG_PPC32 { extern struct file_operations ppc_htab_operations; @@ -713,4 +865,13 @@ void __init proc_misc_init(void) entry->proc_fops = &ppc_htab_operations; } #endif +#ifdef CONFIG_MCOUNT + { + extern struct file_operations mcount_operations; + extern struct proc_dir_entry *mcount_pde; + mcount_pde = create_proc_entry("mcount", S_IRUGO|S_IWUSR, NULL); + if (mcount_pde) + mcount_pde->proc_fops = &mcount_operations; + } +#endif } diff -purN -X /home/mbligh/.diff.exclude 000-virgin/fs/proc/task_mmu.c 999-mjb/fs/proc/task_mmu.c --- 000-virgin/fs/proc/task_mmu.c 2003-10-01 11:47:04.000000000 -0700 +++ 999-mjb/fs/proc/task_mmu.c 2003-11-24 16:34:49.000000000 -0800 @@ -3,6 +3,22 @@ #include #include +#ifdef CONFIG_NUMA +char *task_mem_pernode(struct mm_struct *mm, char *buffer) +{ + int nid; + + for (nid = 0; nid < MAX_NUMNODES; nid++){ + buffer += sprintf(buffer, "VmRSS-node_%d:\t%8lu kb\n", + nid, mm->pernode_rss[nid] << (PAGE_SHIFT-10)); + } + + return buffer; +} +#else /* !CONFIG_NUMA */ +#define task_mem_pernode(mm, buffer) (buffer) +#endif /* CONFIG_NUMA */ + char *task_mem(struct mm_struct *mm, char *buffer) { unsigned long data = 0, stack = 0, exec = 0, lib = 0; @@ -39,6 +55,7 @@ char *task_mem(struct mm_struct *mm, cha mm->rss << (PAGE_SHIFT-10), data - stack, stack, exec - lib, lib); + buffer = task_mem_pernode(mm, buffer); up_read(&mm->mmap_sem); return buffer; } diff -purN -X /home/mbligh/.diff.exclude 000-virgin/fs/sysfs/dir.c 999-mjb/fs/sysfs/dir.c --- 000-virgin/fs/sysfs/dir.c 2003-10-01 11:48:19.000000000 -0700 +++ 999-mjb/fs/sysfs/dir.c 2003-11-25 14:24:49.000000000 -0800 @@ -122,8 +122,8 @@ void sysfs_remove_dir(struct kobject * k node = dentry->d_subdirs.next; while (node != &dentry->d_subdirs) { struct dentry * d = list_entry(node,struct dentry,d_child); - list_del_init(node); + node = node->next; pr_debug(" o %s (%d): ",d->d_name.name,atomic_read(&d->d_count)); if (d->d_inode) { d = dget_locked(d); @@ -139,9 +139,7 @@ void sysfs_remove_dir(struct kobject * k spin_lock(&dcache_lock); } pr_debug(" done\n"); - node = dentry->d_subdirs.next; } - list_del_init(&dentry->d_child); spin_unlock(&dcache_lock); up(&dentry->d_inode->i_sem); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-alpha/lockmeter.h 999-mjb/include/asm-alpha/lockmeter.h --- 000-virgin/include/asm-alpha/lockmeter.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/include/asm-alpha/lockmeter.h 2003-11-24 16:27:18.000000000 -0800 @@ -0,0 +1,90 @@ +/* + * Written by John Hawkes (hawkes@sgi.com) + * Based on klstat.h by Jack Steiner (steiner@sgi.com) + * + * Modified by Peter Rival (frival@zk3.dec.com) + */ + +#ifndef _ALPHA_LOCKMETER_H +#define _ALPHA_LOCKMETER_H + +#include +#define CPU_CYCLE_FREQUENCY hwrpb->cycle_freq + +#define get_cycles64() get_cycles() + +#define THIS_CPU_NUMBER smp_processor_id() + +#include +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) +#define local_irq_save(x) \ + __save_and_cli(x) +#define local_irq_restore(x) \ + __restore_flags(x) +#endif /* Linux version 2.2.x */ + +#define SPINLOCK_MAGIC_INIT /**/ + +/* + * Macros to cache and retrieve an index value inside of a lock + * these macros assume that there are less than 65536 simultaneous + * (read mode) holders of a rwlock. + * We also assume that the hash table has less than 32767 entries. + * the high order bit is used for write locking a rw_lock + * Note: although these defines and macros are the same as what is being used + * in include/asm-i386/lockmeter.h, they are present here to easily + * allow an alternate Alpha implementation. + */ +/* + * instrumented spinlock structure -- never used to allocate storage + * only used in macros below to overlay a spinlock_t + */ +typedef struct inst_spinlock_s { + /* remember, Alpha is little endian */ + unsigned short lock; + unsigned short index; +} inst_spinlock_t; +#define PUT_INDEX(lock_ptr,indexv) ((inst_spinlock_t *)(lock_ptr))->index = indexv +#define GET_INDEX(lock_ptr) ((inst_spinlock_t *)(lock_ptr))->index + +/* + * macros to cache and retrieve an index value in a read/write lock + * as well as the cpu where a reader busy period started + * we use the 2nd word (the debug word) for this, so require the + * debug word to be present + */ +/* + * instrumented rwlock structure -- never used to allocate storage + * only used in macros below to overlay a rwlock_t + */ +typedef struct inst_rwlock_s { + volatile int lock; + unsigned short index; + unsigned short cpu; +} inst_rwlock_t; +#define PUT_RWINDEX(rwlock_ptr,indexv) ((inst_rwlock_t *)(rwlock_ptr))->index = indexv +#define GET_RWINDEX(rwlock_ptr) ((inst_rwlock_t *)(rwlock_ptr))->index +#define PUT_RW_CPU(rwlock_ptr,cpuv) ((inst_rwlock_t *)(rwlock_ptr))->cpu = cpuv +#define GET_RW_CPU(rwlock_ptr) ((inst_rwlock_t *)(rwlock_ptr))->cpu + +/* + * return true if rwlock is write locked + * (note that other lock attempts can cause the lock value to be negative) + */ +#define RWLOCK_IS_WRITE_LOCKED(rwlock_ptr) (((inst_rwlock_t *)rwlock_ptr)->lock & 1) +#define IABS(x) ((x) > 0 ? (x) : -(x)) + +#define RWLOCK_READERS(rwlock_ptr) rwlock_readers(rwlock_ptr) +extern inline int rwlock_readers(rwlock_t *rwlock_ptr) +{ + int tmp = (int) ((inst_rwlock_t *)rwlock_ptr)->lock; + /* readers subtract 2, so we have to: */ + /* - andnot off a possible writer (bit 0) */ + /* - get the absolute value */ + /* - divide by 2 (right shift by one) */ + /* to find the number of readers */ + if (tmp == 0) return(0); + else return(IABS(tmp & ~1)>>1); +} + +#endif /* _ALPHA_LOCKMETER_H */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-alpha/spinlock.h 999-mjb/include/asm-alpha/spinlock.h --- 000-virgin/include/asm-alpha/spinlock.h 2003-06-05 14:55:52.000000000 -0700 +++ 999-mjb/include/asm-alpha/spinlock.h 2003-11-24 16:27:18.000000000 -0800 @@ -6,6 +6,10 @@ #include #include +#ifdef CONFIG_LOCKMETER +#undef DEBUG_SPINLOCK +#undef DEBUG_RWLOCK +#endif /* * Simple spin lock operations. There are two variants, one clears IRQ's @@ -95,9 +99,18 @@ static inline int _raw_spin_trylock(spin typedef struct { volatile int write_lock:1, read_counter:31; +#ifdef CONFIG_LOCKMETER + /* required for LOCKMETER since all bits in lock are used */ + /* need this storage for CPU and lock INDEX ............. */ + unsigned magic; +#endif } /*__attribute__((aligned(32)))*/ rwlock_t; +#ifdef CONFIG_LOCKMETER +#define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0, 0 } +#else #define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0 } +#endif #define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0) #define rwlock_is_locked(x) (*(volatile int *)(x) != 0) @@ -169,4 +182,41 @@ static inline void _raw_read_unlock(rwlo : "m" (*lock) : "memory"); } +#ifdef CONFIG_LOCKMETER +static inline int _raw_write_trylock(rwlock_t *lock) +{ + long temp,result; + + __asm__ __volatile__( + " ldl_l %1,%0\n" + " mov $31,%2\n" + " bne %1,1f\n" + " or $31,1,%2\n" + " stl_c %2,%0\n" + "1: mb\n" + : "=m" (*(volatile int *)lock), "=&r" (temp), "=&r" (result) + : "m" (*(volatile int *)lock) + ); + + return (result); +} + +static inline int _raw_read_trylock(rwlock_t *lock) +{ + unsigned long temp,result; + + __asm__ __volatile__( + " ldl_l %1,%0\n" + " mov $31,%2\n" + " blbs %1,1f\n" + " subl %1,2,%2\n" + " stl_c %2,%0\n" + "1: mb\n" + : "=m" (*(volatile int *)lock), "=&r" (temp), "=&r" (result) + : "m" (*(volatile int *)lock) + ); + return (result); +} +#endif /* CONFIG_LOCKMETER */ + #endif /* _ALPHA_SPINLOCK_H */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-generic/tlb.h 999-mjb/include/asm-generic/tlb.h --- 000-virgin/include/asm-generic/tlb.h 2003-10-01 11:41:15.000000000 -0700 +++ 999-mjb/include/asm-generic/tlb.h 2003-11-24 16:34:49.000000000 -0800 @@ -39,7 +39,6 @@ struct mmu_gather { unsigned int nr; /* set to ~0U means fast mode */ unsigned int need_flush;/* Really unmapped some ptes? */ unsigned int fullmm; /* non-zero means full mm flush */ - unsigned long freed; struct page * pages[FREE_PTE_NR]; }; @@ -60,7 +59,6 @@ tlb_gather_mmu(struct mm_struct *mm, uns tlb->nr = num_online_cpus() > 1 ? 0U : ~0U; tlb->fullmm = full_mm_flush; - tlb->freed = 0; return tlb; } @@ -85,13 +83,6 @@ tlb_flush_mmu(struct mmu_gather *tlb, un static inline void tlb_finish_mmu(struct mmu_gather *tlb, unsigned long start, unsigned long end) { - int freed = tlb->freed; - struct mm_struct *mm = tlb->mm; - int rss = mm->rss; - - if (rss < freed) - freed = rss; - mm->rss = rss - freed; tlb_flush_mmu(tlb, start, end); /* keep the page table cache within bounds */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-i386/a.out.h 999-mjb/include/asm-i386/a.out.h --- 000-virgin/include/asm-i386/a.out.h 2002-12-09 18:45:54.000000000 -0800 +++ 999-mjb/include/asm-i386/a.out.h 2003-11-25 14:24:37.000000000 -0800 @@ -19,7 +19,16 @@ struct exec #ifdef __KERNEL__ +/* + * Typical ELF load address is 0x8048000, which is 128MB + 288KB. + * Shoving the stack very close to it lets smaller programs fit in + * a single pagetable page's worth of virtualspace. + */ +#ifdef CONFIG_MMAP_TOPDOWN +#define STACK_TOP ((128 << 20) + (256 << 10)) +#else #define STACK_TOP TASK_SIZE +#endif #endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-i386/atomic.h 999-mjb/include/asm-i386/atomic.h --- 000-virgin/include/asm-i386/atomic.h 2003-10-01 11:41:15.000000000 -0700 +++ 999-mjb/include/asm-i386/atomic.h 2003-11-24 16:35:58.000000000 -0800 @@ -58,6 +58,17 @@ static __inline__ void atomic_add(int i, :"ir" (i), "m" (v->counter)); } +/* Like the above but also returns the result */ +static __inline__ int atomic_add_return(int i, atomic_t *v) +{ + register int oldval; + __asm__ __volatile__( + LOCK "xaddl %2,%0" + :"=m" (v->counter), "=r" (oldval) + :"1" (i), "m" (v->counter) : "memory"); + return oldval + i; +} + /** * atomic_sub - subtract the atomic variable * @i: integer value to subtract diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-i386/bugs.h 999-mjb/include/asm-i386/bugs.h --- 000-virgin/include/asm-i386/bugs.h 2003-10-01 11:47:09.000000000 -0700 +++ 999-mjb/include/asm-i386/bugs.h 2003-11-24 16:14:01.000000000 -0800 @@ -1,11 +1,11 @@ /* * include/asm-i386/bugs.h * - * Copyright (C) 1994 Linus Torvalds + * Copyright (C) 1994 Linus Torvalds * * Cyrix stuff, June 1998 by: * - Rafael R. Reilova (moved everything from head.S), - * + * * - Channing Corn (tests & fixes), * - Andrew D. Balsa (code cleanup). * @@ -25,7 +25,20 @@ #include #include #include - +#ifdef CONFIG_KGDB +/* + * Provied the command line "gdb" initial break + */ +int __init kgdb_initial_break(char * str) +{ + if (*str == '\0'){ + breakpoint(); + return 1; + } + return 0; +} +__setup("gdb",kgdb_initial_break); +#endif static int __init no_halt(char *s) { boot_cpu_data.hlt_works_ok = 0; @@ -140,7 +153,7 @@ static void __init check_popad(void) : "ecx", "edi" ); /* If this fails, it means that any user program may lock the CPU hard. Too bad. */ if (res != 12345678) printk( "Buggy.\n" ); - else printk( "OK.\n" ); + else printk( "OK.\n" ); #endif } diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-i386/early_printk.h 999-mjb/include/asm-i386/early_printk.h --- 000-virgin/include/asm-i386/early_printk.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/include/asm-i386/early_printk.h 2003-11-24 16:19:08.000000000 -0800 @@ -0,0 +1,8 @@ +#ifndef __X86_EARLY_PRINTK_H_I386_ +#define __X86_EARLY_PRINTK_H_I386_ + +#define VGABASE 0xB8000 +#define SERIAL_BASES { 0x3f8, 0x2f8 } +#define SERIAL_BASES_LEN 2 + +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-i386/kgdb.h 999-mjb/include/asm-i386/kgdb.h --- 000-virgin/include/asm-i386/kgdb.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/include/asm-i386/kgdb.h 2003-11-24 16:14:01.000000000 -0800 @@ -0,0 +1,76 @@ +#ifndef __KGDB +#define __KGDB + +/* + * This file should not include ANY others. This makes it usable + * most anywhere without the fear of include order or inclusion. + * Make it so! + * + * This file may be included all the time. It is only active if + * CONFIG_KGDB is defined, otherwise it stubs out all the macros + * and entry points. + */ +#if defined(CONFIG_KGDB) && !defined(__ASSEMBLY__) + +extern void breakpoint(void); +#define INIT_KGDB_INTS kgdb_enable_ints() + +#ifndef BREAKPOINT +#define BREAKPOINT asm(" int $3") +#endif + +struct sk_buff; + +extern int kgdb_eth; +extern unsigned kgdb_remoteip; +extern unsigned short kgdb_listenport; +extern unsigned short kgdb_sendport; +extern unsigned char kgdb_remotemac[6]; +extern unsigned char kgdb_localmac[6]; +extern int kgdb_eth_need_breakpoint[]; + +extern int kgdb_tty_hook(void); +extern int kgdb_eth_hook(void); +extern int gdb_net_interrupt(struct sk_buff *skb); + +/* + * GDB debug stub (or any debug stub) can point the 'linux_debug_hook' + * pointer to its routine and it will be entered as the first thing + * when a trap occurs. + * + * Return values are, at present, undefined. + * + * The debug hook routine does not necessarily return to its caller. + * It has the register image and thus may choose to resume execution + * anywhere it pleases. + */ +struct pt_regs; +struct sk_buff; + +extern int kgdb_handle_exception(int trapno, + int signo, int err_code, struct pt_regs *regs); +extern int in_kgdb(struct pt_regs *regs); +extern int kgdb_net_interrupt(struct sk_buff *skb); + +#ifdef CONFIG_KGDB_TS +void kgdb_tstamp(int line, char *source, int data0, int data1); +/* + * This is the time stamp function. The macro adds the source info and + * does a cast on the data to allow most any 32-bit value. + */ + +#define kgdb_ts(data0,data1) kgdb_tstamp(__LINE__,__FILE__,(int)data0,(int)data1) +#else +#define kgdb_ts(data0,data1) +#endif +#else /* CONFIG_KGDB && ! __ASSEMBLY__ ,stubs follow... */ +#ifndef BREAKPOINT +#define BREAKPOINT +#endif +#define kgdb_ts(data0,data1) +#define in_kgdb +#define kgdb_handle_exception +#define breakpoint +#define INIT_KGDB_INTS +#endif +#endif /* __KGDB */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-i386/kgdb_local.h 999-mjb/include/asm-i386/kgdb_local.h --- 000-virgin/include/asm-i386/kgdb_local.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/include/asm-i386/kgdb_local.h 2003-11-24 16:14:01.000000000 -0800 @@ -0,0 +1,102 @@ +#ifndef __KGDB_LOCAL +#define ___KGDB_LOCAL +#include +#include +#include +#include +#include +#include +#include +#include + +#define PORT 0x3f8 +#ifdef CONFIG_KGDB_PORT +#undef PORT +#define PORT CONFIG_KGDB_PORT +#endif +#define IRQ 4 +#ifdef CONFIG_KGDB_IRQ +#undef IRQ +#define IRQ CONFIG_KGDB_IRQ +#endif +#define SB_CLOCK 1843200 +#define SB_BASE (SB_CLOCK/16) +#define SB_BAUD9600 SB_BASE/9600 +#define SB_BAUD192 SB_BASE/19200 +#define SB_BAUD384 SB_BASE/38400 +#define SB_BAUD576 SB_BASE/57600 +#define SB_BAUD1152 SB_BASE/115200 +#ifdef CONFIG_KGDB_9600BAUD +#define SB_BAUD SB_BAUD9600 +#endif +#ifdef CONFIG_KGDB_19200BAUD +#define SB_BAUD SB_BAUD192 +#endif +#ifdef CONFIG_KGDB_38400BAUD +#define SB_BAUD SB_BAUD384 +#endif +#ifdef CONFIG_KGDB_57600BAUD +#define SB_BAUD SB_BAUD576 +#endif +#ifdef CONFIG_KGDB_115200BAUD +#define SB_BAUD SB_BAUD1152 +#endif +#ifndef SB_BAUD +#define SB_BAUD SB_BAUD1152 /* Start with this if not given */ +#endif + +#ifndef CONFIG_X86_TSC +#undef rdtsc +#define rdtsc(a,b) if (a++ > 10000){a = 0; b++;} +#undef rdtscll +#define rdtscll(s) s++ +#endif + +#ifdef _raw_read_unlock /* must use a name that is "define"ed, not an inline */ +#undef spin_lock +#undef spin_trylock +#undef spin_unlock +#define spin_lock _raw_spin_lock +#define spin_trylock _raw_spin_trylock +#define spin_unlock _raw_spin_unlock +#else +#endif +#undef spin_unlock_wait +#define spin_unlock_wait(x) do { cpu_relax(); barrier();} \ + while(spin_is_locked(x)) + +#define SB_IER 1 +#define SB_MCR UART_MCR_OUT2 | UART_MCR_DTR | UART_MCR_RTS + +#define FLAGS 0 +#define SB_STATE { \ + magic: SSTATE_MAGIC, \ + baud_base: SB_BASE, \ + port: PORT, \ + irq: IRQ, \ + flags: FLAGS, \ + custom_divisor:SB_BAUD} +#define SB_INFO { \ + magic: SERIAL_MAGIC, \ + port: PORT,0,FLAGS, \ + state: &state, \ + tty: (struct tty_struct *)&state, \ + IER: SB_IER, \ + MCR: SB_MCR} +extern void putDebugChar(int); +/* RTAI support needs us to really stop/start interrupts */ + +#define kgdb_sti() __asm__ __volatile__("sti": : :"memory") +#define kgdb_cli() __asm__ __volatile__("cli": : :"memory") +#define kgdb_local_save_flags(x) __asm__ __volatile__(\ + "pushfl ; popl %0":"=g" (x): /* no input */) +#define kgdb_local_irq_restore(x) __asm__ __volatile__(\ + "pushl %0 ; popfl": \ + /* no output */ :"g" (x):"memory", "cc") +#define kgdb_local_irq_save(x) kgdb_local_save_flags(x); kgdb_cli() + +#ifdef CONFIG_SERIAL +extern void shutdown_for_kgdb(struct async_struct *info); +#endif +#define INIT_KDEBUG putDebugChar("+"); +#endif /* __KGDB_LOCAL */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-i386/lockmeter.h 999-mjb/include/asm-i386/lockmeter.h --- 000-virgin/include/asm-i386/lockmeter.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/include/asm-i386/lockmeter.h 2003-11-24 16:27:18.000000000 -0800 @@ -0,0 +1,127 @@ +/* + * Copyright (C) 1999,2000 Silicon Graphics, Inc. + * + * Written by John Hawkes (hawkes@sgi.com) + * Based on klstat.h by Jack Steiner (steiner@sgi.com) + * + * Modified by Ray Bryant (raybry@us.ibm.com) + * Changes Copyright (C) 2000 IBM, Inc. + * Added save of index in spinlock_t to improve efficiency + * of "hold" time reporting for spinlocks. + * Added support for hold time statistics for read and write + * locks. + * Moved machine dependent code here from include/lockmeter.h. + * + */ + +#ifndef _I386_LOCKMETER_H +#define _I386_LOCKMETER_H + +#include +#include + +#include + +#ifdef __KERNEL__ +extern unsigned long cpu_khz; +#define CPU_CYCLE_FREQUENCY (cpu_khz * 1000) +#else +#define CPU_CYCLE_FREQUENCY 450000000 +#endif + +#define THIS_CPU_NUMBER smp_processor_id() + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) +#define local_irq_save(x) \ + __asm__ __volatile__("pushfl ; popl %0 ; cli":"=g" (x): /* no input */ :"memory") + +#define local_irq_restore(x) \ + __asm__ __volatile__("pushl %0 ; popfl": /* no output */ :"g" (x):"memory") +#endif /* Linux version 2.2.x */ + +/* + * macros to cache and retrieve an index value inside of a spin lock + * these macros assume that there are less than 65536 simultaneous + * (read mode) holders of a rwlock. Not normally a problem!! + * we also assume that the hash table has less than 65535 entries. + */ +/* + * instrumented spinlock structure -- never used to allocate storage + * only used in macros below to overlay a spinlock_t + */ +typedef struct inst_spinlock_s { + /* remember, Intel is little endian */ + unsigned short lock; + unsigned short index; +} inst_spinlock_t; +#define PUT_INDEX(lock_ptr,indexv) ((inst_spinlock_t *)(lock_ptr))->index = indexv +#define GET_INDEX(lock_ptr) ((inst_spinlock_t *)(lock_ptr))->index + +/* + * macros to cache and retrieve an index value in a read/write lock + * as well as the cpu where a reader busy period started + * we use the 2nd word (the debug word) for this, so require the + * debug word to be present + */ +/* + * instrumented rwlock structure -- never used to allocate storage + * only used in macros below to overlay a rwlock_t + */ +typedef struct inst_rwlock_s { + volatile int lock; + unsigned short index; + unsigned short cpu; +} inst_rwlock_t; +#define PUT_RWINDEX(rwlock_ptr,indexv) ((inst_rwlock_t *)(rwlock_ptr))->index = indexv +#define GET_RWINDEX(rwlock_ptr) ((inst_rwlock_t *)(rwlock_ptr))->index +#define PUT_RW_CPU(rwlock_ptr,cpuv) ((inst_rwlock_t *)(rwlock_ptr))->cpu = cpuv +#define GET_RW_CPU(rwlock_ptr) ((inst_rwlock_t *)(rwlock_ptr))->cpu + +/* + * return the number of readers for a rwlock_t + */ +#define RWLOCK_READERS(rwlock_ptr) rwlock_readers(rwlock_ptr) + +extern inline int rwlock_readers(rwlock_t *rwlock_ptr) +{ + int tmp = (int) rwlock_ptr->lock; + /* read and write lock attempts may cause the lock value to temporarily */ + /* be negative. Until it is >= 0 we know nothing (i. e. can't tell if */ + /* is -1 because it was write locked and somebody tried to read lock it */ + /* or if it is -1 because it was read locked and somebody tried to write*/ + /* lock it. ........................................................... */ + do { + tmp = (int) rwlock_ptr->lock; + } while (tmp < 0); + if (tmp == 0) return(0); + else return(RW_LOCK_BIAS-tmp); +} + +/* + * return true if rwlock is write locked + * (note that other lock attempts can cause the lock value to be negative) + */ +#define RWLOCK_IS_WRITE_LOCKED(rwlock_ptr) ((rwlock_ptr)->lock <= 0) +#define IABS(x) ((x) > 0 ? (x) : -(x)) +#define RWLOCK_IS_READ_LOCKED(rwlock_ptr) ((IABS((rwlock_ptr)->lock) % RW_LOCK_BIAS) != 0) + +/* this is a lot of typing just to get gcc to emit "rdtsc" */ +static inline long long get_cycles64 (void) +{ +#ifndef CONFIG_X86_TSC + #error this code requires CONFIG_X86_TSC +#else + union longlong_u { + long long intlong; + struct intint_s { + uint32_t eax; + uint32_t edx; + } intint; + } longlong; + + rdtsc(longlong.intint.eax,longlong.intint.edx); + return longlong.intlong; +#endif +} + +#endif /* _I386_LOCKMETER_H */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-i386/mmzone.h 999-mjb/include/asm-i386/mmzone.h --- 000-virgin/include/asm-i386/mmzone.h 2003-10-01 11:48:22.000000000 -0700 +++ 999-mjb/include/asm-i386/mmzone.h 2003-11-24 16:35:00.000000000 -0800 @@ -10,7 +10,49 @@ #ifdef CONFIG_DISCONTIGMEM +#ifdef CONFIG_NUMA + #ifdef CONFIG_X86_NUMAQ + #include + #else /* summit or generic arch */ + #include + #endif +#else /* !CONFIG_NUMA */ + #define get_memcfg_numa get_memcfg_numa_flat + #define get_zholes_size(n) (0) +#endif /* CONFIG_NUMA */ + extern struct pglist_data *node_data[]; +#define NODE_DATA(nid) (node_data[nid]) + +/* + * generic node memory support, the following assumptions apply: + * + * 1) memory comes in 256Mb contigious chunks which are either present or not + * 2) we will not have more than 64Gb in total + * + * for now assume that 64Gb is max amount of RAM for whole system + * 64Gb / 4096bytes/page = 16777216 pages + */ +#define MAX_NR_PAGES 16777216 +#define MAX_ELEMENTS 256 +#define PAGES_PER_ELEMENT (MAX_NR_PAGES/MAX_ELEMENTS) + +extern u8 physnode_map[]; + +static inline int pfn_to_nid(unsigned long pfn) +{ +#ifdef CONFIG_NUMA + return(physnode_map[(pfn) / PAGES_PER_ELEMENT]); +#else + return 0; +#endif +} + +static inline struct pglist_data *pfn_to_pgdat(unsigned long pfn) +{ + return(NODE_DATA(pfn_to_nid(pfn))); +} + /* * Following are macros that are specific to this numa platform. @@ -43,11 +85,6 @@ extern struct pglist_data *node_data[]; */ #define kvaddr_to_nid(kaddr) pfn_to_nid(__pa(kaddr) >> PAGE_SHIFT) -/* - * Return a pointer to the node data for node n. - */ -#define NODE_DATA(nid) (node_data[nid]) - #define node_mem_map(nid) (NODE_DATA(nid)->node_mem_map) #define node_start_pfn(nid) (NODE_DATA(nid)->node_start_pfn) #define node_end_pfn(nid) \ @@ -93,40 +130,6 @@ extern struct pglist_data *node_data[]; */ #define pfn_valid(pfn) ((pfn) < num_physpages) -/* - * generic node memory support, the following assumptions apply: - * - * 1) memory comes in 256Mb contigious chunks which are either present or not - * 2) we will not have more than 64Gb in total - * - * for now assume that 64Gb is max amount of RAM for whole system - * 64Gb / 4096bytes/page = 16777216 pages - */ -#define MAX_NR_PAGES 16777216 -#define MAX_ELEMENTS 256 -#define PAGES_PER_ELEMENT (MAX_NR_PAGES/MAX_ELEMENTS) - -extern u8 physnode_map[]; - -static inline int pfn_to_nid(unsigned long pfn) -{ - return(physnode_map[(pfn) / PAGES_PER_ELEMENT]); -} -static inline struct pglist_data *pfn_to_pgdat(unsigned long pfn) -{ - return(NODE_DATA(pfn_to_nid(pfn))); -} - -#ifdef CONFIG_X86_NUMAQ -#include -#elif CONFIG_ACPI_SRAT -#include -#elif CONFIG_X86_PC -#define get_zholes_size(n) (0) -#else -#define pfn_to_nid(pfn) (0) -#endif /* CONFIG_X86_NUMAQ */ - extern int get_memcfg_numa_flat(void ); /* * This allows any one NUMA architecture to be compiled diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-i386/page.h 999-mjb/include/asm-i386/page.h --- 000-virgin/include/asm-i386/page.h 2003-04-09 11:48:05.000000000 -0700 +++ 999-mjb/include/asm-i386/page.h 2003-11-24 16:26:38.000000000 -0800 @@ -115,9 +115,26 @@ static __inline__ int get_order(unsigned #endif /* __ASSEMBLY__ */ #ifdef __ASSEMBLY__ -#define __PAGE_OFFSET (0xC0000000) +#include +#ifdef CONFIG_05GB +#define __PAGE_OFFSET (0xE0000000) +#elif defined(CONFIG_1GB) +#define __PAGE_OFFSET (0xC0000000) +#elif defined(CONFIG_2GB) +#define __PAGE_OFFSET (0x80000000) +#elif defined(CONFIG_3GB) +#define __PAGE_OFFSET (0x40000000) +#endif #else -#define __PAGE_OFFSET (0xC0000000UL) +#ifdef CONFIG_05GB +#define __PAGE_OFFSET (0xE0000000UL) +#elif defined(CONFIG_1GB) +#define __PAGE_OFFSET (0xC0000000UL) +#elif defined(CONFIG_2GB) +#define __PAGE_OFFSET (0x80000000UL) +#elif defined(CONFIG_3GB) +#define __PAGE_OFFSET (0x40000000UL) +#endif #endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-i386/param.h 999-mjb/include/asm-i386/param.h --- 000-virgin/include/asm-i386/param.h 2002-12-09 18:45:45.000000000 -0800 +++ 999-mjb/include/asm-i386/param.h 2003-11-24 16:26:35.000000000 -0800 @@ -2,11 +2,19 @@ #define _ASMi386_PARAM_H #ifdef __KERNEL__ -# define HZ 1000 /* Internal kernel timer frequency */ -# define USER_HZ 100 /* .. some user interfaces are in "ticks" */ -# define CLOCKS_PER_SEC (USER_HZ) /* like times() */ +#include + +#ifdef CONFIG_1000HZ +# define HZ 1000 /* Internal kernel timer frequency */ +#else +# define HZ 100 #endif +#define USER_HZ 100 /* .. some user interfaces are in "ticks" */ +#define CLOCKS_PER_SEC (USER_HZ) /* like times() */ + +#endif /* __KERNEL__ */ + #ifndef HZ #define HZ 100 #endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-i386/pgtable.h 999-mjb/include/asm-i386/pgtable.h --- 000-virgin/include/asm-i386/pgtable.h 2003-10-14 15:50:32.000000000 -0700 +++ 999-mjb/include/asm-i386/pgtable.h 2003-11-25 14:24:37.000000000 -0800 @@ -25,6 +25,10 @@ #include #include +#ifdef CONFIG_MMAP_TOPDOWN +#define HAVE_ARCH_UNMAPPED_AREA +#endif + /* * ZERO_PAGE is a global shared page that is always zero: used * for zero-mapped memory areas etc.. diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-i386/processor.h 999-mjb/include/asm-i386/processor.h --- 000-virgin/include/asm-i386/processor.h 2003-10-21 11:16:11.000000000 -0700 +++ 999-mjb/include/asm-i386/processor.h 2003-11-24 16:26:38.000000000 -0800 @@ -299,7 +299,11 @@ extern unsigned int mca_pentium_flag; /* This decides where the kernel will search for a free chunk of vm * space during mmap's. */ +#ifdef CONFIG_05GB +#define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 16)) +#else #define TASK_UNMAPPED_BASE (PAGE_ALIGN(TASK_SIZE / 3)) +#endif /* * Size of io_bitmap, covering ports 0 to 0x3ff. diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-i386/rwlock.h 999-mjb/include/asm-i386/rwlock.h --- 000-virgin/include/asm-i386/rwlock.h 2002-12-09 18:46:25.000000000 -0800 +++ 999-mjb/include/asm-i386/rwlock.h 2003-11-24 16:26:59.000000000 -0800 @@ -20,28 +20,52 @@ #define RW_LOCK_BIAS 0x01000000 #define RW_LOCK_BIAS_STR "0x01000000" -#define __build_read_lock_ptr(rw, helper) \ - asm volatile(LOCK "subl $1,(%0)\n\t" \ - "js 2f\n" \ - "1:\n" \ - LOCK_SECTION_START("") \ - "2:\tcall " helper "\n\t" \ - "jmp 1b\n" \ - LOCK_SECTION_END \ - ::"a" (rw) : "memory") - -#define __build_read_lock_const(rw, helper) \ - asm volatile(LOCK "subl $1,%0\n\t" \ - "js 2f\n" \ - "1:\n" \ - LOCK_SECTION_START("") \ - "2:\tpushl %%eax\n\t" \ - "leal %0,%%eax\n\t" \ - "call " helper "\n\t" \ - "popl %%eax\n\t" \ - "jmp 1b\n" \ - LOCK_SECTION_END \ - :"=m" (*(volatile int *)rw) : : "memory") +#ifdef CONFIG_SPINLINE + + #define __build_read_lock_ptr(rw, helper) \ + asm volatile(LOCK "subl $1,(%0)\n\t" \ + "jns 1f\n\t" \ + "call " helper "\n\t" \ + "1:\t" \ + ::"a" (rw) : "memory") + + #define __build_read_lock_const(rw, helper) \ + asm volatile(LOCK "subl $1,%0\n\t" \ + "jns 1f\n\t" \ + "pushl %%eax\n\t" \ + "leal %0,%%eax\n\t" \ + "call " helper "\n\t" \ + "popl %%eax\n\t" \ + "1:\t" \ + :"=m" (*(volatile int *)rw) : : "memory") + +#else /* !CONFIG_SPINLINE */ + + #define __build_read_lock_ptr(rw, helper) \ + asm volatile(LOCK "subl $1,(%0)\n\t" \ + "js 2f\n" \ + "1:\n" \ + LOCK_SECTION_START("") \ + "2:\tcall " helper "\n\t" \ + "jmp 1b\n" \ + LOCK_SECTION_END \ + ::"a" (rw) : "memory") + + #define __build_read_lock_const(rw, helper) \ + asm volatile(LOCK "subl $1,%0\n\t" \ + "js 2f\n" \ + "1:\n" \ + LOCK_SECTION_START("") \ + "2:\tpushl %%eax\n\t" \ + "leal %0,%%eax\n\t" \ + "call " helper "\n\t" \ + "popl %%eax\n\t" \ + "jmp 1b\n" \ + LOCK_SECTION_END \ + :"=m" (*(volatile int *)rw) : : "memory") + +#endif /* CONFIG_SPINLINE */ + #define __build_read_lock(rw, helper) do { \ if (__builtin_constant_p(rw)) \ @@ -50,28 +74,51 @@ __build_read_lock_ptr(rw, helper); \ } while (0) -#define __build_write_lock_ptr(rw, helper) \ - asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \ - "jnz 2f\n" \ - "1:\n" \ - LOCK_SECTION_START("") \ - "2:\tcall " helper "\n\t" \ - "jmp 1b\n" \ - LOCK_SECTION_END \ - ::"a" (rw) : "memory") - -#define __build_write_lock_const(rw, helper) \ - asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",%0\n\t" \ - "jnz 2f\n" \ - "1:\n" \ - LOCK_SECTION_START("") \ - "2:\tpushl %%eax\n\t" \ - "leal %0,%%eax\n\t" \ - "call " helper "\n\t" \ - "popl %%eax\n\t" \ - "jmp 1b\n" \ - LOCK_SECTION_END \ - :"=m" (*(volatile int *)rw) : : "memory") +#ifdef CONFIG_SPINLINE + + #define __build_write_lock_ptr(rw, helper) \ + asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \ + "jz 1f\n\t" \ + "call " helper "\n\t" \ + "1:\n" \ + ::"a" (rw) : "memory") + + #define __build_write_lock_const(rw, helper) \ + asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",%0\n\t" \ + "jz 1f\n\t" \ + "pushl %%eax\n\t" \ + "leal %0,%%eax\n\t" \ + "call " helper "\n\t" \ + "popl %%eax\n\t" \ + "1:\n" \ + :"=m" (*(volatile int *)rw) : : "memory") + +#else /* !CONFIG_SPINLINE */ + + #define __build_write_lock_ptr(rw, helper) \ + asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \ + "jnz 2f\n" \ + "1:\n" \ + LOCK_SECTION_START("") \ + "2:\tcall " helper "\n\t" \ + "jmp 1b\n" \ + LOCK_SECTION_END \ + ::"a" (rw) : "memory") + + #define __build_write_lock_const(rw, helper) \ + asm volatile(LOCK "subl $" RW_LOCK_BIAS_STR ",%0\n\t" \ + "jnz 2f\n" \ + "1:\n" \ + LOCK_SECTION_START("") \ + "2:\tpushl %%eax\n\t" \ + "leal %0,%%eax\n\t" \ + "call " helper "\n\t" \ + "popl %%eax\n\t" \ + "jmp 1b\n" \ + LOCK_SECTION_END \ + :"=m" (*(volatile int *)rw) : : "memory") + +#endif /* CONFIG_SPINLINE */ #define __build_write_lock(rw, helper) do { \ if (__builtin_constant_p(rw)) \ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-i386/spinlock.h 999-mjb/include/asm-i386/spinlock.h --- 000-virgin/include/asm-i386/spinlock.h 2003-06-05 14:56:10.000000000 -0700 +++ 999-mjb/include/asm-i386/spinlock.h 2003-11-24 16:27:18.000000000 -0800 @@ -43,18 +43,35 @@ typedef struct { #define spin_is_locked(x) (*(volatile signed char *)(&(x)->lock) <= 0) #define spin_unlock_wait(x) do { barrier(); } while(spin_is_locked(x)) -#define spin_lock_string \ - "\n1:\t" \ - "lock ; decb %0\n\t" \ - "js 2f\n" \ - LOCK_SECTION_START("") \ - "2:\t" \ - "rep;nop\n\t" \ - "cmpb $0,%0\n\t" \ - "jle 2b\n\t" \ - "jmp 1b\n" \ - LOCK_SECTION_END +#ifdef CONFIG_SPINLINE + #define spin_lock_string \ + "\n1:\t" \ + "lock ; decb %0\n\t" \ + "js 2f\n" \ + "jmp 3f\n" \ + "2:\t" \ + "rep;nop\n\t" \ + "cmpb $0,%0\n\t" \ + "jle 2b\n\t" \ + "jmp 1b\n" \ + "3:\t" + +#else /* !CONFIG_SPINLINE */ + + #define spin_lock_string \ + "\n1:\t" \ + "lock ; decb %0\n\t" \ + "js 2f\n" \ + LOCK_SECTION_START("") \ + "2:\t" \ + "rep;nop\n\t" \ + "cmpb $0,%0\n\t" \ + "jle 2b\n\t" \ + "jmp 1b\n" \ + LOCK_SECTION_END + +#endif /* CONFIG_SPINLINE */ /* * This works. Despite all the confusion. * (except on PPro SMP or if we are using OOSTORE) @@ -138,6 +155,11 @@ here: */ typedef struct { volatile unsigned int lock; +#ifdef CONFIG_LOCKMETER + /* required for LOCKMETER since all bits in lock are used */ + /* and we need this storage for CPU and lock INDEX */ + unsigned lockmeter_magic; +#endif #ifdef CONFIG_DEBUG_SPINLOCK unsigned magic; #endif @@ -145,11 +167,19 @@ typedef struct { #define RWLOCK_MAGIC 0xdeaf1eed +#ifdef CONFIG_LOCKMETER +#ifdef CONFIG_DEBUG_SPINLOCK +#define RWLOCK_MAGIC_INIT , 0, RWLOCK_MAGIC +#else +#define RWLOCK_MAGIC_INIT , 0 +#endif +#else /* !CONFIG_LOCKMETER */ #ifdef CONFIG_DEBUG_SPINLOCK #define RWLOCK_MAGIC_INIT , RWLOCK_MAGIC #else #define RWLOCK_MAGIC_INIT /* */ #endif +#endif /* !CONFIG_LOCKMETER */ #define RW_LOCK_UNLOCKED (rwlock_t) { RW_LOCK_BIAS RWLOCK_MAGIC_INIT } @@ -196,4 +226,58 @@ static inline int _raw_write_trylock(rwl return 0; } +#ifdef CONFIG_LOCKMETER +static inline int _raw_read_trylock(rwlock_t *lock) +{ +/* FIXME -- replace with assembler */ + atomic_t *count = (atomic_t *)lock; + atomic_dec(count); + if (count->counter > 0) + return 1; + atomic_inc(count); + return 0; +} +#endif + +#if defined(CONFIG_LOCKMETER) && defined(CONFIG_HAVE_DEC_LOCK) +extern void _metered_spin_lock (spinlock_t *lock); +extern void _metered_spin_unlock(spinlock_t *lock); + +/* + * Matches what is in arch/i386/lib/dec_and_lock.c, except this one is + * "static inline" so that the spin_lock(), if actually invoked, is charged + * against the real caller, not against the catch-all atomic_dec_and_lock + */ +static inline int atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) +{ + int counter; + int newcount; + +repeat: + counter = atomic_read(atomic); + newcount = counter-1; + + if (!newcount) + goto slow_path; + + asm volatile("lock; cmpxchgl %1,%2" + :"=a" (newcount) + :"r" (newcount), "m" (atomic->counter), "0" (counter)); + + /* If the above failed, "eax" will have changed */ + if (newcount != counter) + goto repeat; + return 0; + +slow_path: + _metered_spin_lock(lock); + if (atomic_dec_and_test(atomic)) + return 1; + _metered_spin_unlock(lock); + return 0; +} + +#define ATOMIC_DEC_AND_LOCK +#endif + #endif /* __ASM_SPINLOCK_H */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-i386/unistd.h 999-mjb/include/asm-i386/unistd.h --- 000-virgin/include/asm-i386/unistd.h 2003-10-14 15:50:32.000000000 -0700 +++ 999-mjb/include/asm-i386/unistd.h 2003-11-24 16:34:32.000000000 -0800 @@ -228,7 +228,7 @@ #define __NR_madvise1 219 /* delete when C lib stub is removed */ #define __NR_getdents64 220 #define __NR_fcntl64 221 -/* 223 is unused */ +#define __NR_mbind 223 #define __NR_gettid 224 #define __NR_readahead 225 #define __NR_setxattr 226 diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-ia64/lockmeter.h 999-mjb/include/asm-ia64/lockmeter.h --- 000-virgin/include/asm-ia64/lockmeter.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/include/asm-ia64/lockmeter.h 2003-11-24 16:27:18.000000000 -0800 @@ -0,0 +1,72 @@ +/* + * Copyright (C) 1999,2000 Silicon Graphics, Inc. + * + * Written by John Hawkes (hawkes@sgi.com) + * Based on klstat.h by Jack Steiner (steiner@sgi.com) + */ + +#ifndef _IA64_LOCKMETER_H +#define _IA64_LOCKMETER_H + +#ifdef local_cpu_data +#define CPU_CYCLE_FREQUENCY local_cpu_data->itc_freq +#else +#define CPU_CYCLE_FREQUENCY my_cpu_data.itc_freq +#endif +#define get_cycles64() get_cycles() + +#define THIS_CPU_NUMBER smp_processor_id() + +/* + * macros to cache and retrieve an index value inside of a lock + * these macros assume that there are less than 65536 simultaneous + * (read mode) holders of a rwlock. + * we also assume that the hash table has less than 32767 entries. + */ +/* + * instrumented spinlock structure -- never used to allocate storage + * only used in macros below to overlay a spinlock_t + */ +typedef struct inst_spinlock_s { + /* remember, Intel is little endian */ + volatile unsigned short lock; + volatile unsigned short index; +} inst_spinlock_t; +#define PUT_INDEX(lock_ptr,indexv) ((inst_spinlock_t *)(lock_ptr))->index = indexv +#define GET_INDEX(lock_ptr) ((inst_spinlock_t *)(lock_ptr))->index + +/* + * macros to cache and retrieve an index value in a read/write lock + * as well as the cpu where a reader busy period started + * we use the 2nd word (the debug word) for this, so require the + * debug word to be present + */ +/* + * instrumented rwlock structure -- never used to allocate storage + * only used in macros below to overlay a rwlock_t + */ +typedef struct inst_rwlock_s { + volatile int read_counter:31; + volatile int write_lock:1; + volatile unsigned short index; + volatile unsigned short cpu; +} inst_rwlock_t; +#define PUT_RWINDEX(rwlock_ptr,indexv) ((inst_rwlock_t *)(rwlock_ptr))->index = indexv +#define GET_RWINDEX(rwlock_ptr) ((inst_rwlock_t *)(rwlock_ptr))->index +#define PUT_RW_CPU(rwlock_ptr,cpuv) ((inst_rwlock_t *)(rwlock_ptr))->cpu = cpuv +#define GET_RW_CPU(rwlock_ptr) ((inst_rwlock_t *)(rwlock_ptr))->cpu + +/* + * return the number of readers for a rwlock_t + */ +#define RWLOCK_READERS(rwlock_ptr) ((rwlock_ptr)->read_counter) + +/* + * return true if rwlock is write locked + * (note that other lock attempts can cause the lock value to be negative) + */ +#define RWLOCK_IS_WRITE_LOCKED(rwlock_ptr) ((rwlock_ptr)->write_lock) +#define RWLOCK_IS_READ_LOCKED(rwlock_ptr) ((rwlock_ptr)->read_counter) + +#endif /* _IA64_LOCKMETER_H */ + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-ia64/spinlock.h 999-mjb/include/asm-ia64/spinlock.h --- 000-virgin/include/asm-ia64/spinlock.h 2003-10-01 11:48:23.000000000 -0700 +++ 999-mjb/include/asm-ia64/spinlock.h 2003-11-24 16:27:18.000000000 -0800 @@ -110,8 +110,18 @@ do { \ typedef struct { volatile int read_counter : 31; volatile int write_lock : 1; +#ifdef CONFIG_LOCKMETER + /* required for LOCKMETER since all bits in lock are used */ + /* and we need this storage for CPU and lock INDEX */ + unsigned lockmeter_magic; +#endif } rwlock_t; + +#ifdef CONFIG_LOCKMETER +#define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0, 0 } +#else #define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0 } +#endif #define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0) #define rwlock_is_locked(x) (*(volatile int *) (x) != 0) @@ -127,6 +137,48 @@ do { \ } \ } while (0) +#ifdef CONFIG_LOCKMETER +/* + * HACK: This works, but still have a timing window that affects performance: + * we see that no one owns the Write lock, then someone * else grabs for Write + * lock before we do a read_lock(). + * This means that on rare occasions our read_lock() will stall and spin-wait + * until we acquire for Read, instead of simply returning a trylock failure. + */ +static inline int _raw_read_trylock(rwlock_t *rw) +{ + if (rw->write_lock) { + return 0; + } else { + _raw_read_lock(rw); + return 1; + } +} + +static inline int _raw_write_trylock(rwlock_t *rw) +{ + if (!(rw->write_lock)) { + /* isn't currently write-locked... that looks promising... */ + if (test_and_set_bit(31, rw) == 0) { + /* now it is write-locked by me... */ + if (rw->read_counter) { + /* really read-locked, so release write-lock and fail */ + clear_bit(31, rw); + } else { + /* we've the the write-lock, no read-lockers... success! */ + barrier(); + return 1; + } + + } + } + + /* falls through ... fails to write-lock */ + barrier(); + return 0; +} +#endif + #define _raw_read_unlock(rw) \ do { \ rwlock_t *__read_lock_ptr = (rw); \ @@ -190,4 +242,25 @@ do { \ clear_bit(31, (x)); \ }) +#ifdef CONFIG_LOCKMETER +extern void _metered_spin_lock (spinlock_t *lock); +extern void _metered_spin_unlock(spinlock_t *lock); + +/* + * Use a less efficient, and inline, atomic_dec_and_lock() if lockmetering + * so we can see the callerPC of who is actually doing the spin_lock(). + * Otherwise, all we see is the generic rollup of all locks done by + * atomic_dec_and_lock(). + */ +static inline int atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) +{ + _metered_spin_lock(lock); + if (atomic_dec_and_test(atomic)) + return 1; + _metered_spin_unlock(lock); + return 0; +} +#define ATOMIC_DEC_AND_LOCK +#endif + #endif /* _ASM_IA64_SPINLOCK_H */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-mips/lockmeter.h 999-mjb/include/asm-mips/lockmeter.h --- 000-virgin/include/asm-mips/lockmeter.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/include/asm-mips/lockmeter.h 2003-11-24 16:27:18.000000000 -0800 @@ -0,0 +1,126 @@ +/* + * Copyright (C) 1999,2000 Silicon Graphics, Inc. + * + * Written by John Hawkes (hawkes@sgi.com) + * Based on klstat.h by Jack Steiner (steiner@sgi.com) + * Ported to mips32 for Asita Technologies + * by D.J. Barrow ( dj.barrow@asitatechnologies.com ) + */ +#ifndef _ASM_LOCKMETER_H +#define _ASM_LOCKMETER_H + +/* do_gettimeoffset is a function pointer on mips */ +/* & it is not included by */ +#include +#include +#include + +#define SPINLOCK_MAGIC_INIT /* */ + +#define CPU_CYCLE_FREQUENCY get_cpu_cycle_frequency() + +#define THIS_CPU_NUMBER smp_processor_id() + +static uint32_t cpu_cycle_frequency = 0; + +static uint32_t get_cpu_cycle_frequency(void) +{ + /* a total hack, slow and invasive, but ... it works */ + int sec; + uint32_t start_cycles; + struct timeval tv; + + if (cpu_cycle_frequency == 0) { /* uninitialized */ + do_gettimeofday(&tv); + sec = tv.tv_sec; /* set up to catch the tv_sec rollover */ + while (sec == tv.tv_sec) { do_gettimeofday(&tv); } + sec = tv.tv_sec; /* rolled over to a new sec value */ + start_cycles = get_cycles(); + while (sec == tv.tv_sec) { do_gettimeofday(&tv); } + cpu_cycle_frequency = get_cycles() - start_cycles; + } + + return cpu_cycle_frequency; +} + +extern struct timeval xtime; + +static uint64_t get_cycles64(void) +{ + static uint64_t last_get_cycles64 = 0; + uint64_t ret; + unsigned long sec; + unsigned long usec, usec_offset; + +again: + sec = xtime.tv_sec; + usec = xtime.tv_usec; + usec_offset = do_gettimeoffset(); + if ((xtime.tv_sec != sec) || + (xtime.tv_usec != usec)|| + (usec_offset >= 20000)) + goto again; + + ret = ((uint64_t)(usec + usec_offset) * cpu_cycle_frequency); + /* We can't do a normal 64 bit division on mips without libgcc.a */ + do_div(ret,1000000); + ret += ((uint64_t)sec * cpu_cycle_frequency); + + /* XXX why does time go backwards? do_gettimeoffset? general time adj? */ + if (ret <= last_get_cycles64) + ret = last_get_cycles64+1; + last_get_cycles64 = ret; + + return ret; +} + +/* + * macros to cache and retrieve an index value inside of a lock + * these macros assume that there are less than 65536 simultaneous + * (read mode) holders of a rwlock. + * we also assume that the hash table has less than 32767 entries. + * the high order bit is used for write locking a rw_lock + */ +#define INDEX_MASK 0x7FFF0000 +#define READERS_MASK 0x0000FFFF +#define INDEX_SHIFT 16 +#define PUT_INDEX(lockp,index) \ + lockp->lock = (((lockp->lock) & ~INDEX_MASK) | (index) << INDEX_SHIFT) +#define GET_INDEX(lockp) \ + (((lockp->lock) & INDEX_MASK) >> INDEX_SHIFT) + +/* + * macros to cache and retrieve an index value in a read/write lock + * as well as the cpu where a reader busy period started + * we use the 2nd word (the debug word) for this, so require the + * debug word to be present + */ +/* + * instrumented rwlock structure -- never used to allocate storage + * only used in macros below to overlay a rwlock_t + */ +typedef struct inst_rwlock_s { + volatile int lock; + unsigned short index; + unsigned short cpu; +} inst_rwlock_t; +#define PUT_RWINDEX(rwlock_ptr,indexv) ((inst_rwlock_t *)(rwlock_ptr))->index = indexv +#define GET_RWINDEX(rwlock_ptr) ((inst_rwlock_t *)(rwlock_ptr))->index +#define PUT_RW_CPU(rwlock_ptr,cpuv) ((inst_rwlock_t *)(rwlock_ptr))->cpu = cpuv +#define GET_RW_CPU(rwlock_ptr) ((inst_rwlock_t *)(rwlock_ptr))->cpu + +/* + * return the number of readers for a rwlock_t + */ +#define RWLOCK_READERS(rwlock_ptr) rwlock_readers(rwlock_ptr) + +extern inline int rwlock_readers(rwlock_t *rwlock_ptr) +{ + int tmp = (int) rwlock_ptr->lock; + return (tmp >= 0) ? tmp : 0; +} + +#define RWLOCK_IS_WRITE_LOCKED(rwlock_ptr) ((rwlock_ptr)->lock < 0) +#define RWLOCK_IS_READ_LOCKED(rwlock_ptr) ((rwlock_ptr)->lock > 0) + +#endif /* _ASM_LOCKMETER_H */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-mips/spinlock.h 999-mjb/include/asm-mips/spinlock.h --- 000-virgin/include/asm-mips/spinlock.h 2003-07-02 14:44:56.000000000 -0700 +++ 999-mjb/include/asm-mips/spinlock.h 2003-11-24 16:27:18.000000000 -0800 @@ -91,9 +91,18 @@ static inline unsigned int _raw_spin_try typedef struct { volatile unsigned int lock; +#ifdef CONFIG_LOCKMETER + /* required for LOCKMETER since all bits in lock are used */ + /* and we need this storage for CPU and lock INDEX */ + unsigned lockmeter_magic; +#endif } rwlock_t; +#ifdef CONFIG_LOCKMETER +#define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0 } +#else #define RW_LOCK_UNLOCKED (rwlock_t) { 0 } +#endif #define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0) diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-sparc64/lockmeter.h 999-mjb/include/asm-sparc64/lockmeter.h --- 000-virgin/include/asm-sparc64/lockmeter.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/include/asm-sparc64/lockmeter.h 2003-11-24 16:27:18.000000000 -0800 @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2000 Anton Blanchard (anton@linuxcare.com) + * Copyright (C) 2003 David S. Miller (davem@redhat.com) + */ + +#ifndef _SPARC64_LOCKMETER_H +#define _SPARC64_LOCKMETER_H + +#include +#include +#include +#include + +/* Actually, this is not the CPU frequency by the system tick + * frequency which is good enough for lock metering. + */ +#define CPU_CYCLE_FREQUENCY (timer_tick_offset * HZ) +#define THIS_CPU_NUMBER smp_processor_id() + +#define PUT_INDEX(lock_ptr,indexv) (lock_ptr)->index = (indexv) +#define GET_INDEX(lock_ptr) (lock_ptr)->index + +#define PUT_RWINDEX(rwlock_ptr,indexv) (rwlock_ptr)->index = (indexv) +#define GET_RWINDEX(rwlock_ptr) (rwlock_ptr)->index +#define PUT_RW_CPU(rwlock_ptr,cpuv) (rwlock_ptr)->cpu = (cpuv) +#define GET_RW_CPU(rwlock_ptr) (rwlock_ptr)->cpu + +#define RWLOCK_READERS(rwlock_ptr) rwlock_readers(rwlock_ptr) + +extern inline int rwlock_readers(rwlock_t *rwlock_ptr) +{ + signed int tmp = rwlock_ptr->lock; + + if (tmp > 0) + return tmp; + else + return 0; +} + +#define RWLOCK_IS_WRITE_LOCKED(rwlock_ptr) ((signed int)((rwlock_ptr)->lock) < 0) +#define RWLOCK_IS_READ_LOCKED(rwlock_ptr) ((signed int)((rwlock_ptr)->lock) > 0) + +#define get_cycles64() get_cycles() + +#endif /* _SPARC64_LOCKMETER_H */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-sparc64/spinlock.h 999-mjb/include/asm-sparc64/spinlock.h --- 000-virgin/include/asm-sparc64/spinlock.h 2003-11-24 16:12:32.000000000 -0800 +++ 999-mjb/include/asm-sparc64/spinlock.h 2003-11-24 16:27:18.000000000 -0800 @@ -30,15 +30,23 @@ #ifndef CONFIG_DEBUG_SPINLOCK -typedef unsigned char spinlock_t; -#define SPIN_LOCK_UNLOCKED 0 +typedef struct { + unsigned char lock; + unsigned int index; +} spinlock_t; -#define spin_lock_init(lock) (*((unsigned char *)(lock)) = 0) -#define spin_is_locked(lock) (*((volatile unsigned char *)(lock)) != 0) +#ifdef CONFIG_LOCKMETER +#define SPIN_LOCK_UNLOCKED (spinlock_t) {0, 0} +#else +#define SPIN_LOCK_UNLOCKED (spinlock_t) { 0 } +#endif -#define spin_unlock_wait(lock) \ +#define spin_lock_init(__lock) do { *(__lock) = SPIN_LOCK_UNLOCKED; } while(0) +#define spin_is_locked(__lock) (*((volatile unsigned char *)(&((__lock)->lock))) != 0) + +#define spin_unlock_wait(__lock) \ do { membar("#LoadLoad"); \ -} while(*((volatile unsigned char *)lock)) +} while(*((volatile unsigned char *)(&(((spinlock_t *)__lock)->lock)))) static __inline__ void _raw_spin_lock(spinlock_t *lock) { diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/asm-x86_64/early_printk.h 999-mjb/include/asm-x86_64/early_printk.h --- 000-virgin/include/asm-x86_64/early_printk.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/include/asm-x86_64/early_printk.h 2003-11-24 16:19:08.000000000 -0800 @@ -0,0 +1,8 @@ +#ifndef __X86_EARLY_PRINTK_H_X86_64_ +#define __X86_EARLY_PRINTK_H_X86_64_ + +#define VGABASE 0xffffffff800b8000UL +#define SERIAL_BASES { 0x3f8, 0x2f8 } +#define SERIAL_BASES_LEN 2 + +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/config.h 999-mjb/include/linux/config.h --- 000-virgin/include/linux/config.h 2002-12-09 18:46:24.000000000 -0800 +++ 999-mjb/include/linux/config.h 2003-11-24 16:14:01.000000000 -0800 @@ -2,5 +2,8 @@ #define _LINUX_CONFIG_H #include +#if defined(__i386__) && !defined(IN_BOOTLOADER) +#include +#endif #endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/dwarf2-lang.h 999-mjb/include/linux/dwarf2-lang.h --- 000-virgin/include/linux/dwarf2-lang.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/include/linux/dwarf2-lang.h 2003-11-24 16:14:01.000000000 -0800 @@ -0,0 +1,132 @@ +#ifndef DWARF2_LANG +#define DWARF2_LANG +#include + +/* + * This is free software; you can redistribute it and/or modify it under + * the terms of the GNU General Public License as published by the Free + * Software Foundation; either version 2, or (at your option) any later + * version. + */ +/* + * This file defines macros that allow generation of DWARF debug records + * for asm files. This file is platform independent. Register numbers + * (which are about the only thing that is platform dependent) are to be + * supplied by a platform defined file. + */ +#define DWARF_preamble() .section .debug_frame,"",@progbits +/* + * This macro starts a debug frame section. The debug_frame describes + * where to find the registers that the enclosing function saved on + * entry. + * + * ORD is use by the label generator and should be the same as what is + * passed to CFI_postamble. + * + * pc, pc register gdb ordinal. + * + * code_align this is the factor used to define locations or regions + * where the given definitions apply. If you use labels to define these + * this should be 1. + * + * data_align this is the factor used to define register offsets. If + * you use struct offset, this should be the size of the register in + * bytes or the negative of that. This is how it is used: you will + * define a register as the reference register, say the stack pointer, + * then you will say where a register is located relative to this + * reference registers value, say 40 for register 3 (the gdb register + * number). The <40> will be multiplied by to define the + * byte offset of the given register (3, in this example). So if your + * <40> is the byte offset and the reference register points at the + * begining, you would want 1 for the data_offset. If <40> was the 40th + * 4-byte element in that structure you would want 4. And if your + * reference register points at the end of the structure you would want + * a negative data_align value(and you would have to do other math as + * well). + */ + +#define CFI_preamble(ORD, pc, code_align, data_align) \ +.section .debug_frame,"",@progbits ; \ +frame/**/_/**/ORD: \ + .long end/**/_/**/ORD-start/**/_/**/ORD; \ +start/**/_/**/ORD: \ + .long DW_CIE_ID; \ + .byte DW_CIE_VERSION; \ + .byte 0 ; \ + .uleb128 code_align; \ + .sleb128 data_align; \ + .byte pc; + +/* + * After the above macro and prior to the CFI_postamble, you need to + * define the initial state. This starts with defining the reference + * register and, usually the pc. Here are some helper macros: + */ + +#define CFA_define_reference(reg, offset) \ + .byte DW_CFA_def_cfa; \ + .uleb128 reg; \ + .uleb128 (offset); + +#define CFA_define_offset(reg, offset) \ + .byte (DW_CFA_offset + reg); \ + .uleb128 (offset); + +#define CFI_postamble(ORD) \ + .align 4; \ +end/**/_/**/ORD: +/* + * So now your code pushs stuff on the stack, you need a new location + * and the rules for what to do. This starts a running description of + * the call frame. You need to describe what changes with respect to + * the call registers as the location of the pc moves through the code. + * The following builds an FDE (fram descriptor entry?). Like the + * above, it has a preamble and a postamble. It also is tied to the CFI + * above. + * The first entry after the preamble must be the location in the code + * that the call frame is being described for. + */ +#define FDE_preamble(ORD, fde_no, initial_address, length) \ + .long FDE_end/**/_/**/fde_no-FDE_start/**/_/**/fde_no; \ +FDE_start/**/_/**/fde_no: \ + .long frame/**/_/**/ORD; \ + .long initial_address; \ + .long length; + +#define FDE_postamble(fde_no) \ + .align 4; \ +FDE_end/**/_/**/fde_no: +/* + * That done, you can now add registers, subtract registers, move the + * reference and even change the reference. You can also define a new + * area of code the info applies to. For discontinuous bits you should + * start a new FDE. You may have as many as you like. + */ + +/* + * To advance the address by + */ + +#define FDE_advance(bytes) \ + .byte DW_CFA_advance_loc4 \ + .long bytes + + + +/* + * With the above you can define all the register locations. But + * suppose the reference register moves... Takes the new offset NOT an + * increment. This is how esp is tracked if it is not saved. + */ + +#define CFA_define_cfa_offset(offset) \ + .byte $DW_CFA_def_cfa_offset; \ + .uleb128 (offset); +/* + * Or suppose you want to use a different reference register... + */ +#define CFA_define_cfa_register(reg) \ + .byte DW_CFA_def_cfa_register; \ + .uleb128 reg; + +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/dwarf2.h 999-mjb/include/linux/dwarf2.h --- 000-virgin/include/linux/dwarf2.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/include/linux/dwarf2.h 2003-11-24 16:14:01.000000000 -0800 @@ -0,0 +1,738 @@ +/* Declarations and definitions of codes relating to the DWARF2 symbolic + debugging information format. + Copyright (C) 1992, 1993, 1995, 1996, 1997, 1999, 2000, 2001, 2002 + Free Software Foundation, Inc. + + Written by Gary Funck (gary@intrepid.com) The Ada Joint Program + Office (AJPO), Florida State Unviversity and Silicon Graphics Inc. + provided support for this effort -- June 21, 1995. + + Derived from the DWARF 1 implementation written by Ron Guilmette + (rfg@netcom.com), November 1990. + + This file is part of GCC. + + GCC is free software; you can redistribute it and/or modify it under + the terms of the GNU General Public License as published by the Free + Software Foundation; either version 2, or (at your option) any later + version. + + GCC is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public + License for more details. + + You should have received a copy of the GNU General Public License + along with GCC; see the file COPYING. If not, write to the Free + Software Foundation, 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. */ + +/* This file is derived from the DWARF specification (a public document) + Revision 2.0.0 (July 27, 1993) developed by the UNIX International + Programming Languages Special Interest Group (UI/PLSIG) and distributed + by UNIX International. Copies of this specification are available from + UNIX International, 20 Waterview Boulevard, Parsippany, NJ, 07054. + + This file also now contains definitions from the DWARF 3 specification. */ + +/* This file is shared between GCC and GDB, and should not contain + prototypes. */ + +#ifndef _ELF_DWARF2_H +#define _ELF_DWARF2_H + +/* Structure found in the .debug_line section. */ +#ifndef __ASSEMBLY__ +typedef struct +{ + unsigned char li_length [4]; + unsigned char li_version [2]; + unsigned char li_prologue_length [4]; + unsigned char li_min_insn_length [1]; + unsigned char li_default_is_stmt [1]; + unsigned char li_line_base [1]; + unsigned char li_line_range [1]; + unsigned char li_opcode_base [1]; +} +DWARF2_External_LineInfo; + +typedef struct +{ + unsigned long li_length; + unsigned short li_version; + unsigned int li_prologue_length; + unsigned char li_min_insn_length; + unsigned char li_default_is_stmt; + int li_line_base; + unsigned char li_line_range; + unsigned char li_opcode_base; +} +DWARF2_Internal_LineInfo; + +/* Structure found in .debug_pubnames section. */ +typedef struct +{ + unsigned char pn_length [4]; + unsigned char pn_version [2]; + unsigned char pn_offset [4]; + unsigned char pn_size [4]; +} +DWARF2_External_PubNames; + +typedef struct +{ + unsigned long pn_length; + unsigned short pn_version; + unsigned long pn_offset; + unsigned long pn_size; +} +DWARF2_Internal_PubNames; + +/* Structure found in .debug_info section. */ +typedef struct +{ + unsigned char cu_length [4]; + unsigned char cu_version [2]; + unsigned char cu_abbrev_offset [4]; + unsigned char cu_pointer_size [1]; +} +DWARF2_External_CompUnit; + +typedef struct +{ + unsigned long cu_length; + unsigned short cu_version; + unsigned long cu_abbrev_offset; + unsigned char cu_pointer_size; +} +DWARF2_Internal_CompUnit; + +typedef struct +{ + unsigned char ar_length [4]; + unsigned char ar_version [2]; + unsigned char ar_info_offset [4]; + unsigned char ar_pointer_size [1]; + unsigned char ar_segment_size [1]; +} +DWARF2_External_ARange; + +typedef struct +{ + unsigned long ar_length; + unsigned short ar_version; + unsigned long ar_info_offset; + unsigned char ar_pointer_size; + unsigned char ar_segment_size; +} +DWARF2_Internal_ARange; + +#define ENUM(name) enum name { +#define IF_NOT_ASM(a) a +#define COMMA , +#else +#define ENUM(name) +#define IF_NOT_ASM(a) +#define COMMA + +#endif + +/* Tag names and codes. */ +ENUM(dwarf_tag) + + DW_TAG_padding = 0x00 COMMA + DW_TAG_array_type = 0x01 COMMA + DW_TAG_class_type = 0x02 COMMA + DW_TAG_entry_point = 0x03 COMMA + DW_TAG_enumeration_type = 0x04 COMMA + DW_TAG_formal_parameter = 0x05 COMMA + DW_TAG_imported_declaration = 0x08 COMMA + DW_TAG_label = 0x0a COMMA + DW_TAG_lexical_block = 0x0b COMMA + DW_TAG_member = 0x0d COMMA + DW_TAG_pointer_type = 0x0f COMMA + DW_TAG_reference_type = 0x10 COMMA + DW_TAG_compile_unit = 0x11 COMMA + DW_TAG_string_type = 0x12 COMMA + DW_TAG_structure_type = 0x13 COMMA + DW_TAG_subroutine_type = 0x15 COMMA + DW_TAG_typedef = 0x16 COMMA + DW_TAG_union_type = 0x17 COMMA + DW_TAG_unspecified_parameters = 0x18 COMMA + DW_TAG_variant = 0x19 COMMA + DW_TAG_common_block = 0x1a COMMA + DW_TAG_common_inclusion = 0x1b COMMA + DW_TAG_inheritance = 0x1c COMMA + DW_TAG_inlined_subroutine = 0x1d COMMA + DW_TAG_module = 0x1e COMMA + DW_TAG_ptr_to_member_type = 0x1f COMMA + DW_TAG_set_type = 0x20 COMMA + DW_TAG_subrange_type = 0x21 COMMA + DW_TAG_with_stmt = 0x22 COMMA + DW_TAG_access_declaration = 0x23 COMMA + DW_TAG_base_type = 0x24 COMMA + DW_TAG_catch_block = 0x25 COMMA + DW_TAG_const_type = 0x26 COMMA + DW_TAG_constant = 0x27 COMMA + DW_TAG_enumerator = 0x28 COMMA + DW_TAG_file_type = 0x29 COMMA + DW_TAG_friend = 0x2a COMMA + DW_TAG_namelist = 0x2b COMMA + DW_TAG_namelist_item = 0x2c COMMA + DW_TAG_packed_type = 0x2d COMMA + DW_TAG_subprogram = 0x2e COMMA + DW_TAG_template_type_param = 0x2f COMMA + DW_TAG_template_value_param = 0x30 COMMA + DW_TAG_thrown_type = 0x31 COMMA + DW_TAG_try_block = 0x32 COMMA + DW_TAG_variant_part = 0x33 COMMA + DW_TAG_variable = 0x34 COMMA + DW_TAG_volatile_type = 0x35 COMMA + /* DWARF 3. */ + DW_TAG_dwarf_procedure = 0x36 COMMA + DW_TAG_restrict_type = 0x37 COMMA + DW_TAG_interface_type = 0x38 COMMA + DW_TAG_namespace = 0x39 COMMA + DW_TAG_imported_module = 0x3a COMMA + DW_TAG_unspecified_type = 0x3b COMMA + DW_TAG_partial_unit = 0x3c COMMA + DW_TAG_imported_unit = 0x3d COMMA + /* SGI/MIPS Extensions. */ + DW_TAG_MIPS_loop = 0x4081 COMMA + /* GNU extensions. */ + DW_TAG_format_label = 0x4101 COMMA /* For FORTRAN 77 and Fortran 90. */ + DW_TAG_function_template = 0x4102 COMMA /* For C++. */ + DW_TAG_class_template = 0x4103 COMMA /* For C++. */ + DW_TAG_GNU_BINCL = 0x4104 COMMA + DW_TAG_GNU_EINCL = 0x4105 COMMA + /* Extensions for UPC. See: http://upc.gwu.edu/~upc. */ + DW_TAG_upc_shared_type = 0x8765 COMMA + DW_TAG_upc_strict_type = 0x8766 COMMA + DW_TAG_upc_relaxed_type = 0x8767 +IF_NOT_ASM(};) + +#define DW_TAG_lo_user 0x4080 +#define DW_TAG_hi_user 0xffff + +/* Flag that tells whether entry has a child or not. */ +#define DW_children_no 0 +#define DW_children_yes 1 + +/* Form names and codes. */ +ENUM(dwarf_form) + + DW_FORM_addr = 0x01 COMMA + DW_FORM_block2 = 0x03 COMMA + DW_FORM_block4 = 0x04 COMMA + DW_FORM_data2 = 0x05 COMMA + DW_FORM_data4 = 0x06 COMMA + DW_FORM_data8 = 0x07 COMMA + DW_FORM_string = 0x08 COMMA + DW_FORM_block = 0x09 COMMA + DW_FORM_block1 = 0x0a COMMA + DW_FORM_data1 = 0x0b COMMA + DW_FORM_flag = 0x0c COMMA + DW_FORM_sdata = 0x0d COMMA + DW_FORM_strp = 0x0e COMMA + DW_FORM_udata = 0x0f COMMA + DW_FORM_ref_addr = 0x10 COMMA + DW_FORM_ref1 = 0x11 COMMA + DW_FORM_ref2 = 0x12 COMMA + DW_FORM_ref4 = 0x13 COMMA + DW_FORM_ref8 = 0x14 COMMA + DW_FORM_ref_udata = 0x15 COMMA + DW_FORM_indirect = 0x16 +IF_NOT_ASM(};) + +/* Attribute names and codes. */ + +ENUM(dwarf_attribute) + + DW_AT_sibling = 0x01 COMMA + DW_AT_location = 0x02 COMMA + DW_AT_name = 0x03 COMMA + DW_AT_ordering = 0x09 COMMA + DW_AT_subscr_data = 0x0a COMMA + DW_AT_byte_size = 0x0b COMMA + DW_AT_bit_offset = 0x0c COMMA + DW_AT_bit_size = 0x0d COMMA + DW_AT_element_list = 0x0f COMMA + DW_AT_stmt_list = 0x10 COMMA + DW_AT_low_pc = 0x11 COMMA + DW_AT_high_pc = 0x12 COMMA + DW_AT_language = 0x13 COMMA + DW_AT_member = 0x14 COMMA + DW_AT_discr = 0x15 COMMA + DW_AT_discr_value = 0x16 COMMA + DW_AT_visibility = 0x17 COMMA + DW_AT_import = 0x18 COMMA + DW_AT_string_length = 0x19 COMMA + DW_AT_common_reference = 0x1a COMMA + DW_AT_comp_dir = 0x1b COMMA + DW_AT_const_value = 0x1c COMMA + DW_AT_containing_type = 0x1d COMMA + DW_AT_default_value = 0x1e COMMA + DW_AT_inline = 0x20 COMMA + DW_AT_is_optional = 0x21 COMMA + DW_AT_lower_bound = 0x22 COMMA + DW_AT_producer = 0x25 COMMA + DW_AT_prototyped = 0x27 COMMA + DW_AT_return_addr = 0x2a COMMA + DW_AT_start_scope = 0x2c COMMA + DW_AT_stride_size = 0x2e COMMA + DW_AT_upper_bound = 0x2f COMMA + DW_AT_abstract_origin = 0x31 COMMA + DW_AT_accessibility = 0x32 COMMA + DW_AT_address_class = 0x33 COMMA + DW_AT_artificial = 0x34 COMMA + DW_AT_base_types = 0x35 COMMA + DW_AT_calling_convention = 0x36 COMMA + DW_AT_count = 0x37 COMMA + DW_AT_data_member_location = 0x38 COMMA + DW_AT_decl_column = 0x39 COMMA + DW_AT_decl_file = 0x3a COMMA + DW_AT_decl_line = 0x3b COMMA + DW_AT_declaration = 0x3c COMMA + DW_AT_discr_list = 0x3d COMMA + DW_AT_encoding = 0x3e COMMA + DW_AT_external = 0x3f COMMA + DW_AT_frame_base = 0x40 COMMA + DW_AT_friend = 0x41 COMMA + DW_AT_identifier_case = 0x42 COMMA + DW_AT_macro_info = 0x43 COMMA + DW_AT_namelist_items = 0x44 COMMA + DW_AT_priority = 0x45 COMMA + DW_AT_segment = 0x46 COMMA + DW_AT_specification = 0x47 COMMA + DW_AT_static_link = 0x48 COMMA + DW_AT_type = 0x49 COMMA + DW_AT_use_location = 0x4a COMMA + DW_AT_variable_parameter = 0x4b COMMA + DW_AT_virtuality = 0x4c COMMA + DW_AT_vtable_elem_location = 0x4d COMMA + /* DWARF 3 values. */ + DW_AT_allocated = 0x4e COMMA + DW_AT_associated = 0x4f COMMA + DW_AT_data_location = 0x50 COMMA + DW_AT_stride = 0x51 COMMA + DW_AT_entry_pc = 0x52 COMMA + DW_AT_use_UTF8 = 0x53 COMMA + DW_AT_extension = 0x54 COMMA + DW_AT_ranges = 0x55 COMMA + DW_AT_trampoline = 0x56 COMMA + DW_AT_call_column = 0x57 COMMA + DW_AT_call_file = 0x58 COMMA + DW_AT_call_line = 0x59 COMMA + /* SGI/MIPS extensions. */ + DW_AT_MIPS_fde = 0x2001 COMMA + DW_AT_MIPS_loop_begin = 0x2002 COMMA + DW_AT_MIPS_tail_loop_begin = 0x2003 COMMA + DW_AT_MIPS_epilog_begin = 0x2004 COMMA + DW_AT_MIPS_loop_unroll_factor = 0x2005 COMMA + DW_AT_MIPS_software_pipeline_depth = 0x2006 COMMA + DW_AT_MIPS_linkage_name = 0x2007 COMMA + DW_AT_MIPS_stride = 0x2008 COMMA + DW_AT_MIPS_abstract_name = 0x2009 COMMA + DW_AT_MIPS_clone_origin = 0x200a COMMA + DW_AT_MIPS_has_inlines = 0x200b COMMA + /* GNU extensions. */ + DW_AT_sf_names = 0x2101 COMMA + DW_AT_src_info = 0x2102 COMMA + DW_AT_mac_info = 0x2103 COMMA + DW_AT_src_coords = 0x2104 COMMA + DW_AT_body_begin = 0x2105 COMMA + DW_AT_body_end = 0x2106 COMMA + DW_AT_GNU_vector = 0x2107 COMMA + /* VMS extensions. */ + DW_AT_VMS_rtnbeg_pd_address = 0x2201 COMMA + /* UPC extension. */ + DW_AT_upc_threads_scaled = 0x3210 +IF_NOT_ASM(};) + +#define DW_AT_lo_user 0x2000 /* Implementation-defined range start. */ +#define DW_AT_hi_user 0x3ff0 /* Implementation-defined range end. */ + +/* Location atom names and codes. */ +ENUM(dwarf_location_atom) + + DW_OP_addr = 0x03 COMMA + DW_OP_deref = 0x06 COMMA + DW_OP_const1u = 0x08 COMMA + DW_OP_const1s = 0x09 COMMA + DW_OP_const2u = 0x0a COMMA + DW_OP_const2s = 0x0b COMMA + DW_OP_const4u = 0x0c COMMA + DW_OP_const4s = 0x0d COMMA + DW_OP_const8u = 0x0e COMMA + DW_OP_const8s = 0x0f COMMA + DW_OP_constu = 0x10 COMMA + DW_OP_consts = 0x11 COMMA + DW_OP_dup = 0x12 COMMA + DW_OP_drop = 0x13 COMMA + DW_OP_over = 0x14 COMMA + DW_OP_pick = 0x15 COMMA + DW_OP_swap = 0x16 COMMA + DW_OP_rot = 0x17 COMMA + DW_OP_xderef = 0x18 COMMA + DW_OP_abs = 0x19 COMMA + DW_OP_and = 0x1a COMMA + DW_OP_div = 0x1b COMMA + DW_OP_minus = 0x1c COMMA + DW_OP_mod = 0x1d COMMA + DW_OP_mul = 0x1e COMMA + DW_OP_neg = 0x1f COMMA + DW_OP_not = 0x20 COMMA + DW_OP_or = 0x21 COMMA + DW_OP_plus = 0x22 COMMA + DW_OP_plus_uconst = 0x23 COMMA + DW_OP_shl = 0x24 COMMA + DW_OP_shr = 0x25 COMMA + DW_OP_shra = 0x26 COMMA + DW_OP_xor = 0x27 COMMA + DW_OP_bra = 0x28 COMMA + DW_OP_eq = 0x29 COMMA + DW_OP_ge = 0x2a COMMA + DW_OP_gt = 0x2b COMMA + DW_OP_le = 0x2c COMMA + DW_OP_lt = 0x2d COMMA + DW_OP_ne = 0x2e COMMA + DW_OP_skip = 0x2f COMMA + DW_OP_lit0 = 0x30 COMMA + DW_OP_lit1 = 0x31 COMMA + DW_OP_lit2 = 0x32 COMMA + DW_OP_lit3 = 0x33 COMMA + DW_OP_lit4 = 0x34 COMMA + DW_OP_lit5 = 0x35 COMMA + DW_OP_lit6 = 0x36 COMMA + DW_OP_lit7 = 0x37 COMMA + DW_OP_lit8 = 0x38 COMMA + DW_OP_lit9 = 0x39 COMMA + DW_OP_lit10 = 0x3a COMMA + DW_OP_lit11 = 0x3b COMMA + DW_OP_lit12 = 0x3c COMMA + DW_OP_lit13 = 0x3d COMMA + DW_OP_lit14 = 0x3e COMMA + DW_OP_lit15 = 0x3f COMMA + DW_OP_lit16 = 0x40 COMMA + DW_OP_lit17 = 0x41 COMMA + DW_OP_lit18 = 0x42 COMMA + DW_OP_lit19 = 0x43 COMMA + DW_OP_lit20 = 0x44 COMMA + DW_OP_lit21 = 0x45 COMMA + DW_OP_lit22 = 0x46 COMMA + DW_OP_lit23 = 0x47 COMMA + DW_OP_lit24 = 0x48 COMMA + DW_OP_lit25 = 0x49 COMMA + DW_OP_lit26 = 0x4a COMMA + DW_OP_lit27 = 0x4b COMMA + DW_OP_lit28 = 0x4c COMMA + DW_OP_lit29 = 0x4d COMMA + DW_OP_lit30 = 0x4e COMMA + DW_OP_lit31 = 0x4f COMMA + DW_OP_reg0 = 0x50 COMMA + DW_OP_reg1 = 0x51 COMMA + DW_OP_reg2 = 0x52 COMMA + DW_OP_reg3 = 0x53 COMMA + DW_OP_reg4 = 0x54 COMMA + DW_OP_reg5 = 0x55 COMMA + DW_OP_reg6 = 0x56 COMMA + DW_OP_reg7 = 0x57 COMMA + DW_OP_reg8 = 0x58 COMMA + DW_OP_reg9 = 0x59 COMMA + DW_OP_reg10 = 0x5a COMMA + DW_OP_reg11 = 0x5b COMMA + DW_OP_reg12 = 0x5c COMMA + DW_OP_reg13 = 0x5d COMMA + DW_OP_reg14 = 0x5e COMMA + DW_OP_reg15 = 0x5f COMMA + DW_OP_reg16 = 0x60 COMMA + DW_OP_reg17 = 0x61 COMMA + DW_OP_reg18 = 0x62 COMMA + DW_OP_reg19 = 0x63 COMMA + DW_OP_reg20 = 0x64 COMMA + DW_OP_reg21 = 0x65 COMMA + DW_OP_reg22 = 0x66 COMMA + DW_OP_reg23 = 0x67 COMMA + DW_OP_reg24 = 0x68 COMMA + DW_OP_reg25 = 0x69 COMMA + DW_OP_reg26 = 0x6a COMMA + DW_OP_reg27 = 0x6b COMMA + DW_OP_reg28 = 0x6c COMMA + DW_OP_reg29 = 0x6d COMMA + DW_OP_reg30 = 0x6e COMMA + DW_OP_reg31 = 0x6f COMMA + DW_OP_breg0 = 0x70 COMMA + DW_OP_breg1 = 0x71 COMMA + DW_OP_breg2 = 0x72 COMMA + DW_OP_breg3 = 0x73 COMMA + DW_OP_breg4 = 0x74 COMMA + DW_OP_breg5 = 0x75 COMMA + DW_OP_breg6 = 0x76 COMMA + DW_OP_breg7 = 0x77 COMMA + DW_OP_breg8 = 0x78 COMMA + DW_OP_breg9 = 0x79 COMMA + DW_OP_breg10 = 0x7a COMMA + DW_OP_breg11 = 0x7b COMMA + DW_OP_breg12 = 0x7c COMMA + DW_OP_breg13 = 0x7d COMMA + DW_OP_breg14 = 0x7e COMMA + DW_OP_breg15 = 0x7f COMMA + DW_OP_breg16 = 0x80 COMMA + DW_OP_breg17 = 0x81 COMMA + DW_OP_breg18 = 0x82 COMMA + DW_OP_breg19 = 0x83 COMMA + DW_OP_breg20 = 0x84 COMMA + DW_OP_breg21 = 0x85 COMMA + DW_OP_breg22 = 0x86 COMMA + DW_OP_breg23 = 0x87 COMMA + DW_OP_breg24 = 0x88 COMMA + DW_OP_breg25 = 0x89 COMMA + DW_OP_breg26 = 0x8a COMMA + DW_OP_breg27 = 0x8b COMMA + DW_OP_breg28 = 0x8c COMMA + DW_OP_breg29 = 0x8d COMMA + DW_OP_breg30 = 0x8e COMMA + DW_OP_breg31 = 0x8f COMMA + DW_OP_regx = 0x90 COMMA + DW_OP_fbreg = 0x91 COMMA + DW_OP_bregx = 0x92 COMMA + DW_OP_piece = 0x93 COMMA + DW_OP_deref_size = 0x94 COMMA + DW_OP_xderef_size = 0x95 COMMA + DW_OP_nop = 0x96 COMMA + /* DWARF 3 extensions. */ + DW_OP_push_object_address = 0x97 COMMA + DW_OP_call2 = 0x98 COMMA + DW_OP_call4 = 0x99 COMMA + DW_OP_call_ref = 0x9a COMMA + /* GNU extensions. */ + DW_OP_GNU_push_tls_address = 0xe0 +IF_NOT_ASM(};) + +#define DW_OP_lo_user 0xe0 /* Implementation-defined range start. */ +#define DW_OP_hi_user 0xff /* Implementation-defined range end. */ + +/* Type encodings. */ +ENUM(dwarf_type) + + DW_ATE_void = 0x0 COMMA + DW_ATE_address = 0x1 COMMA + DW_ATE_boolean = 0x2 COMMA + DW_ATE_complex_float = 0x3 COMMA + DW_ATE_float = 0x4 COMMA + DW_ATE_signed = 0x5 COMMA + DW_ATE_signed_char = 0x6 COMMA + DW_ATE_unsigned = 0x7 COMMA + DW_ATE_unsigned_char = 0x8 COMMA + /* DWARF 3. */ + DW_ATE_imaginary_float = 0x9 +IF_NOT_ASM(};) + +#define DW_ATE_lo_user 0x80 +#define DW_ATE_hi_user 0xff + +/* Array ordering names and codes. */ +ENUM(dwarf_array_dim_ordering) + + DW_ORD_row_major = 0 COMMA + DW_ORD_col_major = 1 +IF_NOT_ASM(};) + +/* Access attribute. */ +ENUM(dwarf_access_attribute) + + DW_ACCESS_public = 1 COMMA + DW_ACCESS_protected = 2 COMMA + DW_ACCESS_private = 3 +IF_NOT_ASM(};) + +/* Visibility. */ +ENUM(dwarf_visibility_attribute) + + DW_VIS_local = 1 COMMA + DW_VIS_exported = 2 COMMA + DW_VIS_qualified = 3 +IF_NOT_ASM(};) + +/* Virtuality. */ +ENUM(dwarf_virtuality_attribute) + + DW_VIRTUALITY_none = 0 COMMA + DW_VIRTUALITY_virtual = 1 COMMA + DW_VIRTUALITY_pure_virtual = 2 +IF_NOT_ASM(};) + +/* Case sensitivity. */ +ENUM(dwarf_id_case) + + DW_ID_case_sensitive = 0 COMMA + DW_ID_up_case = 1 COMMA + DW_ID_down_case = 2 COMMA + DW_ID_case_insensitive = 3 +IF_NOT_ASM(};) + +/* Calling convention. */ +ENUM(dwarf_calling_convention) + + DW_CC_normal = 0x1 COMMA + DW_CC_program = 0x2 COMMA + DW_CC_nocall = 0x3 +IF_NOT_ASM(};) + +#define DW_CC_lo_user 0x40 +#define DW_CC_hi_user 0xff + +/* Inline attribute. */ +ENUM(dwarf_inline_attribute) + + DW_INL_not_inlined = 0 COMMA + DW_INL_inlined = 1 COMMA + DW_INL_declared_not_inlined = 2 COMMA + DW_INL_declared_inlined = 3 +IF_NOT_ASM(};) + +/* Discriminant lists. */ +ENUM(dwarf_discrim_list) + + DW_DSC_label = 0 COMMA + DW_DSC_range = 1 +IF_NOT_ASM(};) + +/* Line number opcodes. */ +ENUM(dwarf_line_number_ops) + + DW_LNS_extended_op = 0 COMMA + DW_LNS_copy = 1 COMMA + DW_LNS_advance_pc = 2 COMMA + DW_LNS_advance_line = 3 COMMA + DW_LNS_set_file = 4 COMMA + DW_LNS_set_column = 5 COMMA + DW_LNS_negate_stmt = 6 COMMA + DW_LNS_set_basic_block = 7 COMMA + DW_LNS_const_add_pc = 8 COMMA + DW_LNS_fixed_advance_pc = 9 COMMA + /* DWARF 3. */ + DW_LNS_set_prologue_end = 10 COMMA + DW_LNS_set_epilogue_begin = 11 COMMA + DW_LNS_set_isa = 12 +IF_NOT_ASM(};) + +/* Line number extended opcodes. */ +ENUM(dwarf_line_number_x_ops) + + DW_LNE_end_sequence = 1 COMMA + DW_LNE_set_address = 2 COMMA + DW_LNE_define_file = 3 +IF_NOT_ASM(};) + +/* Call frame information. */ +ENUM(dwarf_call_frame_info) + + DW_CFA_advance_loc = 0x40 COMMA + DW_CFA_offset = 0x80 COMMA + DW_CFA_restore = 0xc0 COMMA + DW_CFA_nop = 0x00 COMMA + DW_CFA_set_loc = 0x01 COMMA + DW_CFA_advance_loc1 = 0x02 COMMA + DW_CFA_advance_loc2 = 0x03 COMMA + DW_CFA_advance_loc4 = 0x04 COMMA + DW_CFA_offset_extended = 0x05 COMMA + DW_CFA_restore_extended = 0x06 COMMA + DW_CFA_undefined = 0x07 COMMA + DW_CFA_same_value = 0x08 COMMA + DW_CFA_register = 0x09 COMMA + DW_CFA_remember_state = 0x0a COMMA + DW_CFA_restore_state = 0x0b COMMA + DW_CFA_def_cfa = 0x0c COMMA + DW_CFA_def_cfa_register = 0x0d COMMA + DW_CFA_def_cfa_offset = 0x0e COMMA + + /* DWARF 3. */ + DW_CFA_def_cfa_expression = 0x0f COMMA + DW_CFA_expression = 0x10 COMMA + DW_CFA_offset_extended_sf = 0x11 COMMA + DW_CFA_def_cfa_sf = 0x12 COMMA + DW_CFA_def_cfa_offset_sf = 0x13 COMMA + + /* SGI/MIPS specific. */ + DW_CFA_MIPS_advance_loc8 = 0x1d COMMA + + /* GNU extensions. */ + DW_CFA_GNU_window_save = 0x2d COMMA + DW_CFA_GNU_args_size = 0x2e COMMA + DW_CFA_GNU_negative_offset_extended = 0x2f +IF_NOT_ASM(};) + +#define DW_CIE_ID 0xffffffff +#define DW_CIE_VERSION 1 + +#define DW_CFA_extended 0 +#define DW_CFA_lo_user 0x1c +#define DW_CFA_hi_user 0x3f + +#define DW_CHILDREN_no 0x00 +#define DW_CHILDREN_yes 0x01 + +#define DW_ADDR_none 0 + +/* Source language names and codes. */ +ENUM(dwarf_source_language) + + DW_LANG_C89 = 0x0001 COMMA + DW_LANG_C = 0x0002 COMMA + DW_LANG_Ada83 = 0x0003 COMMA + DW_LANG_C_plus_plus = 0x0004 COMMA + DW_LANG_Cobol74 = 0x0005 COMMA + DW_LANG_Cobol85 = 0x0006 COMMA + DW_LANG_Fortran77 = 0x0007 COMMA + DW_LANG_Fortran90 = 0x0008 COMMA + DW_LANG_Pascal83 = 0x0009 COMMA + DW_LANG_Modula2 = 0x000a COMMA + DW_LANG_Java = 0x000b COMMA + /* DWARF 3. */ + DW_LANG_C99 = 0x000c COMMA + DW_LANG_Ada95 = 0x000d COMMA + DW_LANG_Fortran95 = 0x000e COMMA + /* MIPS. */ + DW_LANG_Mips_Assembler = 0x8001 COMMA + /* UPC. */ + DW_LANG_Upc = 0x8765 +IF_NOT_ASM(};) + +#define DW_LANG_lo_user 0x8000 /* Implementation-defined range start. */ +#define DW_LANG_hi_user 0xffff /* Implementation-defined range start. */ + +/* Names and codes for macro information. */ +ENUM(dwarf_macinfo_record_type) + + DW_MACINFO_define = 1 COMMA + DW_MACINFO_undef = 2 COMMA + DW_MACINFO_start_file = 3 COMMA + DW_MACINFO_end_file = 4 COMMA + DW_MACINFO_vendor_ext = 255 +IF_NOT_ASM(};) + +/* @@@ For use with GNU frame unwind information. */ + +#define DW_EH_PE_absptr 0x00 +#define DW_EH_PE_omit 0xff + +#define DW_EH_PE_uleb128 0x01 +#define DW_EH_PE_udata2 0x02 +#define DW_EH_PE_udata4 0x03 +#define DW_EH_PE_udata8 0x04 +#define DW_EH_PE_sleb128 0x09 +#define DW_EH_PE_sdata2 0x0A +#define DW_EH_PE_sdata4 0x0B +#define DW_EH_PE_sdata8 0x0C +#define DW_EH_PE_signed 0x08 + +#define DW_EH_PE_pcrel 0x10 +#define DW_EH_PE_textrel 0x20 +#define DW_EH_PE_datarel 0x30 +#define DW_EH_PE_funcrel 0x40 +#define DW_EH_PE_aligned 0x50 + +#define DW_EH_PE_indirect 0x80 + +#endif /* _ELF_DWARF2_H */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/early_printk.h 999-mjb/include/linux/early_printk.h --- 000-virgin/include/linux/early_printk.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/include/linux/early_printk.h 2003-11-24 16:19:08.000000000 -0800 @@ -0,0 +1,47 @@ +#ifndef __X86_EARLY_PRINTK_H_ +#define __X86_EARLY_PRINTK_H_ + +#ifdef CONFIG_X86_EARLY_PRINTK +#include +#include +#include +#include +#include +#include + +/* Simple VGA output */ + +#define MAX_YPOS 25 +#define MAX_XPOS 80 + +/* Simple serial port output */ + +#define DEFAULT_BAUD 57600 +#define XMTRDY 0x20 + +#define DLAB 0x80 + +#define TXR 0 /* Transmit register (WRITE) */ +#define RXR 0 /* Receive register (READ) */ +#define IER 1 /* Interrupt Enable */ +#define IIR 2 /* Interrupt ID */ +#define FCR 2 /* FIFO control */ +#define LCR 3 /* Line control */ +#define MCR 4 /* Modem control */ +#define LSR 5 /* Line Status */ +#define MSR 6 /* Modem Status */ +#define DLL 0 /* Divisor Latch Low */ +#define DLH 1 /* Divisor latch High */ + + +void early_printk(const char *fmt, ...); +int __init setup_early_printk(); + +#else + +#define early_printk(...) do {} while(0) +#define setup_early_printk() do {} while(0) + +#endif + +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/fs.h 999-mjb/include/linux/fs.h --- 000-virgin/include/linux/fs.h 2003-10-01 11:48:25.000000000 -0700 +++ 999-mjb/include/linux/fs.h 2003-11-24 16:35:33.000000000 -0800 @@ -19,6 +19,8 @@ #include #include #include +#include +#include #include struct iovec; @@ -315,11 +317,29 @@ struct address_space_operations { loff_t offset, unsigned long nr_segs); }; +#if NR_CPUS > 8 +typedef rwlock_t mapping_rwlock_t; +#define mapping_rdlock(lock) read_lock(lock) +#define mapping_rdunlock(lock) read_unlock(lock) +#define mapping_wrlock(lock) write_lock(lock) +#define mapping_wrunlock(lock) write_unlock(lock) +#define mapping_rwlock_init(lock) rwlock_init(lock) +#define MAPPING_RW_LOCK_UNLOCKED RW_LOCK_UNLOCKED +#else +typedef spinlock_t mapping_rwlock_t; +#define mapping_rdlock(lock) spin_lock(lock) +#define mapping_rdunlock(lock) spin_unlock(lock) +#define mapping_wrlock(lock) spin_lock(lock) +#define mapping_wrunlock(lock) spin_unlock(lock) +#define mapping_rwlock_init(lock) spin_lock_init(lock) +#define MAPPING_RW_LOCK_UNLOCKED SPIN_LOCK_UNLOCKED +#endif + struct backing_dev_info; struct address_space { struct inode *host; /* owner: inode, block_device */ struct radix_tree_root page_tree; /* radix tree of all pages */ - spinlock_t page_lock; /* and spinlock protecting it */ + mapping_rwlock_t page_lock; /* and spinlock protecting it */ struct list_head clean_pages; /* list of clean pages */ struct list_head dirty_pages; /* list of dirty pages */ struct list_head locked_pages; /* list of locked pages */ @@ -336,6 +356,9 @@ struct address_space { spinlock_t private_lock; /* for use by the address_space */ struct list_head private_list; /* ditto */ struct address_space *assoc_mapping; /* ditto */ +#ifdef CONFIG_NUMA + struct binding *binding; /* for memory bindings */ +#endif }; struct block_device { diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/gfp.h 999-mjb/include/linux/gfp.h --- 000-virgin/include/linux/gfp.h 2003-10-01 11:41:17.000000000 -0700 +++ 999-mjb/include/linux/gfp.h 2003-11-24 16:35:28.000000000 -0800 @@ -32,6 +32,7 @@ #define __GFP_NOFAIL 0x800 /* Retry for ever. Cannot fail */ #define __GFP_NORETRY 0x1000 /* Do not retry. Might fail */ #define __GFP_NO_GROW 0x2000 /* Slab internal usage */ +#define __GFP_NODE_STRICT 0x4000 /* Do not fall back to other nodes */ #define __GFP_BITS_SHIFT 16 /* Room for 16 __GFP_FOO bits */ #define __GFP_BITS_MASK ((1 << __GFP_BITS_SHIFT) - 1) @@ -69,7 +70,7 @@ static inline struct page * alloc_pages_ if (unlikely(order >= MAX_ORDER)) return NULL; - return __alloc_pages(gfp_mask, order, NODE_DATA(nid)->node_zonelists + (gfp_mask & GFP_ZONEMASK)); + return __alloc_pages(gfp_mask, order, get_node_zonelist(nid, gfp_mask)); } #define alloc_pages(gfp_mask, order) \ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/lockmeter.h 999-mjb/include/linux/lockmeter.h --- 000-virgin/include/linux/lockmeter.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/include/linux/lockmeter.h 2003-11-24 16:27:18.000000000 -0800 @@ -0,0 +1,320 @@ +/* + * Copyright (C) 1999-2002 Silicon Graphics, Inc. + * + * Written by John Hawkes (hawkes@sgi.com) + * Based on klstat.h by Jack Steiner (steiner@sgi.com) + * + * Modified by Ray Bryant (raybry@us.ibm.com) Feb-Apr 2000 + * Changes Copyright (C) 2000 IBM, Inc. + * Added save of index in spinlock_t to improve efficiency + * of "hold" time reporting for spinlocks + * Added support for hold time statistics for read and write + * locks. + * Moved machine dependent code to include/asm/lockmeter.h. + * + */ + +#ifndef _LINUX_LOCKMETER_H +#define _LINUX_LOCKMETER_H + + +/*--------------------------------------------------- + * architecture-independent lockmeter.h + *-------------------------------------------------*/ + +/* + * raybry -- version 2: added efficient hold time statistics + * requires lstat recompile, so flagged as new version + * raybry -- version 3: added global reader lock data + * hawkes -- version 4: removed some unnecessary fields to simplify mips64 port + */ +#define LSTAT_VERSION 5 + +int lstat_update(void*, void*, int); +int lstat_update_time(void*, void*, int, uint32_t); + +/* + * Currently, the mips64 and sparc64 kernels talk to a 32-bit lockstat, so we + * need to force compatibility in the inter-communication data structure. + */ + +#if defined(CONFIG_MIPS32_COMPAT) +#define TIME_T uint32_t +#elif defined(CONFIG_SPARC) || defined(CONFIG_SPARC64) +#define TIME_T uint64_t +#else +#define TIME_T time_t +#endif + +#if defined(__KERNEL__) || (!defined(CONFIG_MIPS32_COMPAT) && !defined(CONFIG_SPARC) && !defined(CONFIG_SPARC64)) || (_MIPS_SZLONG==32) +#define POINTER void * +#else +#define POINTER int64_t +#endif + +/* + * Values for the "action" parameter passed to lstat_update. + * ZZZ - do we want a try-success status here??? + */ +#define LSTAT_ACT_NO_WAIT 0 +#define LSTAT_ACT_SPIN 1 +#define LSTAT_ACT_REJECT 2 +#define LSTAT_ACT_WW_SPIN 3 +#define LSTAT_ACT_SLEPT 4 /* UNUSED */ + +#define LSTAT_ACT_MAX_VALUES 4 /* NOTE: Increase to 5 if use ACT_SLEPT */ + +/* + * Special values for the low 2 bits of an RA passed to + * lstat_update. + */ +/* we use these values to figure out what kind of lock data */ +/* is stored in the statistics table entry at index ....... */ +#define LSTAT_RA_SPIN 0 /* spin lock data */ +#define LSTAT_RA_READ 1 /* read lock statistics */ +#define LSTAT_RA_SEMA 2 /* RESERVED */ +#define LSTAT_RA_WRITE 3 /* write lock statistics*/ + +#define LSTAT_RA(n) \ + ((void*)( ((unsigned long)__builtin_return_address(0) & ~3) | n) ) + +/* + * Constants used for lock addresses in the lstat_directory + * to indicate special values of the lock address. + */ +#define LSTAT_MULTI_LOCK_ADDRESS NULL + +/* + * Maximum size of the lockstats tables. Increase this value + * if its not big enough. (Nothing bad happens if its not + * big enough although some locks will not be monitored.) + * We record overflows of this quantity in lstat_control.dir_overflows + * + * Note: The max value here must fit into the field set + * and obtained by the macro's PUT_INDEX() and GET_INDEX(). + * This value depends on how many bits are available in the + * lock word in the particular machine implementation we are on. + */ +#define LSTAT_MAX_STAT_INDEX 2000 + +/* + * Size and mask for the hash table into the directory. + */ +#define LSTAT_HASH_TABLE_SIZE 4096 /* must be 2**N */ +#define LSTAT_HASH_TABLE_MASK (LSTAT_HASH_TABLE_SIZE-1) + +#define DIRHASH(ra) ((unsigned long)(ra)>>2 & LSTAT_HASH_TABLE_MASK) + +/* + * This defines an entry in the lockstat directory. It contains + * information about a lock being monitored. + * A directory entry only contains the lock identification - + * counts on usage of the lock are kept elsewhere in a per-cpu + * data structure to minimize cache line pinging. + */ +typedef struct { + POINTER caller_ra; /* RA of code that set lock */ + POINTER lock_ptr; /* lock address */ + ushort next_stat_index; /* Used to link multiple locks that have the same hash table value */ +} lstat_directory_entry_t; + +/* + * A multi-dimensioned array used to contain counts for lock accesses. + * The array is 3-dimensional: + * - CPU number. Keep from thrashing cache lines between CPUs + * - Directory entry index. Identifies the lock + * - Action. Indicates what kind of contention occurred on an + * access to the lock. + * + * The index of an entry in the directory is the same as the 2nd index + * of the entry in the counts array. + */ +/* + * This table contains data for spin_locks, write locks, and read locks + * Not all data is used for all cases. In particular, the hold time + * information is not stored here for read locks since that is a global + * (e. g. cannot be separated out by return address) quantity. + * See the lstat_read_lock_counts_t structure for the global read lock + * hold time. + */ +typedef struct { + uint64_t cum_wait_ticks; /* sum of wait times */ + /* for write locks, sum of time a */ + /* writer is waiting for a reader */ + int64_t cum_hold_ticks; /* cumulative sum of holds */ + /* not used for read mode locks */ + /* must be signed. ............... */ + uint32_t max_wait_ticks; /* max waiting time */ + uint32_t max_hold_ticks; /* max holding time */ + uint64_t cum_wait_ww_ticks; /* sum times writer waits on writer*/ + uint32_t max_wait_ww_ticks; /* max wait time writer vs writer */ + /* prev 2 only used for write locks*/ + uint32_t acquire_time; /* time lock acquired this CPU */ + uint32_t count[LSTAT_ACT_MAX_VALUES]; +} lstat_lock_counts_t; + +typedef lstat_lock_counts_t lstat_cpu_counts_t[LSTAT_MAX_STAT_INDEX]; + +/* + * User request to: + * - turn statistic collection on/off, or to reset + */ +#define LSTAT_OFF 0 +#define LSTAT_ON 1 +#define LSTAT_RESET 2 +#define LSTAT_RELEASE 3 + +#define LSTAT_MAX_READ_LOCK_INDEX 1000 +typedef struct { + POINTER lock_ptr; /* address of lock for output stats */ + uint32_t read_lock_count; + int64_t cum_hold_ticks; /* sum of read lock hold times over */ + /* all callers. ....................*/ + uint32_t write_index; /* last write lock hash table index */ + uint32_t busy_periods; /* count of busy periods ended this */ + uint64_t start_busy; /* time this busy period started. ..*/ + uint64_t busy_ticks; /* sum of busy periods this lock. ..*/ + uint64_t max_busy; /* longest busy period for this lock*/ + uint32_t max_readers; /* maximum number of readers ...... */ +#ifdef USER_MODE_TESTING + rwlock_t entry_lock; /* lock for this read lock entry... */ + /* avoid having more than one rdr at*/ + /* needed for user space testing... */ + /* not needed for kernel 'cause it */ + /* is non-preemptive. ............. */ +#endif +} lstat_read_lock_counts_t; +typedef lstat_read_lock_counts_t lstat_read_lock_cpu_counts_t[LSTAT_MAX_READ_LOCK_INDEX]; + +#if defined(__KERNEL__) || defined(USER_MODE_TESTING) + +#ifndef USER_MODE_TESTING +#include +#else +#include "asm_newlockmeter.h" +#endif + +/* + * Size and mask for the hash table into the directory. + */ +#define LSTAT_HASH_TABLE_SIZE 4096 /* must be 2**N */ +#define LSTAT_HASH_TABLE_MASK (LSTAT_HASH_TABLE_SIZE-1) + +#define DIRHASH(ra) ((unsigned long)(ra)>>2 & LSTAT_HASH_TABLE_MASK) + +/* + * This version eliminates the per processor lock stack. What we do is to + * store the index of the lock hash structure in unused bits in the lock + * itself. Then on unlock we can find the statistics record without doing + * any additional hash or lock stack lookup. This works for spin_locks. + * Hold time reporting is now basically as cheap as wait time reporting + * so we ignore the difference between LSTAT_ON_HOLD and LSTAT_ON_WAIT + * as in version 1.1.* of lockmeter. + * + * For rw_locks, we store the index of a global reader stats structure in + * the lock and the writer index is stored in the latter structure. + * For read mode locks we hash at the time of the lock to find an entry + * in the directory for reader wait time and the like. + * At unlock time for read mode locks, we update just the global structure + * so we don't need to know the reader directory index value at unlock time. + * + */ + +/* + * Protocol to change lstat_control.state + * This is complicated because we don't want the cum_hold_time for + * a rw_lock to be decremented in _read_lock_ without making sure it + * is incremented in _read_lock_ and vice versa. So here is the + * way we change the state of lstat_control.state: + * I. To Turn Statistics On + * After allocating storage, set lstat_control.state non-zero. + * This works because we don't start updating statistics for in use + * locks until the reader lock count goes to zero. + * II. To Turn Statistics Off: + * (0) Disable interrupts on this CPU + * (1) Seize the lstat_control.directory_lock + * (2) Obtain the current value of lstat_control.next_free_read_lock_index + * (3) Store a zero in lstat_control.state. + * (4) Release the lstat_control.directory_lock + * (5) For each lock in the read lock list up to the saved value + * (well, -1) of the next_free_read_lock_index, do the following: + * (a) Check validity of the stored lock address + * by making sure that the word at the saved addr + * has an index that matches this entry. If not + * valid, then skip this entry. + * (b) If there is a write lock already set on this lock, + * skip to (d) below. + * (c) Set a non-metered write lock on the lock + * (d) set the cached INDEX in the lock to zero + * (e) Release the non-metered write lock. + * (6) Re-enable interrupts + * + * These rules ensure that a read lock will not have its statistics + * partially updated even though the global lock recording state has + * changed. See put_lockmeter_info() for implementation. + * + * The reason for (b) is that there may be write locks set on the + * syscall path to put_lockmeter_info() from user space. If we do + * not do this check, then we can deadlock. A similar problem would + * occur if the lock was read locked by the current CPU. At the + * moment this does not appear to happen. + */ + +/* + * Main control structure for lockstat. Used to turn statistics on/off + * and to maintain directory info. + */ +typedef struct { + int state; + spinlock_t control_lock; /* used to serialize turning statistics on/off */ + spinlock_t directory_lock; /* for serialize adding entries to directory */ + volatile int next_free_dir_index;/* next free entry in the directory */ + /* FIXME not all of these fields are used / needed .............. */ + /* the following fields represent data since */ + /* first "lstat on" or most recent "lstat reset" */ + TIME_T first_started_time; /* time when measurement first enabled */ + TIME_T started_time; /* time when measurement last started */ + TIME_T ending_time; /* time when measurement last disabled */ + uint64_t started_cycles64; /* cycles when measurement last started */ + uint64_t ending_cycles64; /* cycles when measurement last disabled */ + uint64_t enabled_cycles64; /* total cycles with measurement enabled */ + int intervals; /* number of measurement intervals recorded */ + /* i. e. number of times did lstat on;lstat off */ + lstat_directory_entry_t *dir; /* directory */ + int dir_overflow; /* count of times ran out of space in directory */ + int rwlock_overflow; /* count of times we couldn't allocate a rw block*/ + ushort *hashtab; /* hash table for quick dir scans */ + lstat_cpu_counts_t *counts[NR_CPUS]; /* Array of pointers to per-cpu stats */ + int next_free_read_lock_index; /* next rwlock reader (global) stats block */ + lstat_read_lock_cpu_counts_t *read_lock_counts[NR_CPUS]; /* per cpu read lock stats */ +} lstat_control_t; + +#endif /* defined(__KERNEL__) || defined(USER_MODE_TESTING) */ + +typedef struct { + short lstat_version; /* version of the data */ + short state; /* the current state is returned */ + int maxcpus; /* Number of cpus present */ + int next_free_dir_index; /* index of the next free directory entry */ + TIME_T first_started_time; /* when measurement enabled for first time */ + TIME_T started_time; /* time in secs since 1969 when stats last turned on */ + TIME_T ending_time; /* time in secs since 1969 when stats last turned off */ + uint32_t cycleval; /* cycles per second */ +#ifdef notyet + void *kernel_magic_addr; /* address of kernel_magic */ + void *kernel_end_addr; /* contents of kernel magic (points to "end") */ +#endif + int next_free_read_lock_index; /* index of next (global) read lock stats struct */ + uint64_t started_cycles64; /* cycles when measurement last started */ + uint64_t ending_cycles64; /* cycles when stats last turned off */ + uint64_t enabled_cycles64; /* total cycles with measurement enabled */ + int intervals; /* number of measurement intervals recorded */ + /* i.e. number of times we did lstat on;lstat off*/ + int dir_overflow; /* number of times we wanted more space in directory */ + int rwlock_overflow; /* # of times we wanted more space in read_locks_count */ + struct new_utsname uts; /* info about machine where stats are measured */ + /* -T option of lockstat allows data to be */ + /* moved to another machine. ................. */ +} lstat_user_request_t; + +#endif /* _LINUX_LOCKMETER_H */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/mcount.h 999-mjb/include/linux/mcount.h --- 000-virgin/include/linux/mcount.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/include/linux/mcount.h 2003-11-24 16:35:58.000000000 -0800 @@ -0,0 +1,63 @@ +/* + * include/linux/mcount.h + * + * Implementation of kernel mcount handler and supporting functions. + * + * Code based on kernprof http://oss.sgi.com/projects/kernprof/ + * Copyright (C) SGI 1999, 2000, 2001 + * Written by Dimitris Michailidis (dimitris@engr.sgi.com) + * Modified by John Hawkes (hawkes@engr.sgi.com) + * Contributions from Niels Christiansen (nchr@us.ibm.com) + * Adapted for stand-alone call graphing by Adam Litke (agl@us.ibm.com) + */ + +#ifndef __MCOUNT_H +#define __MCOUNT_H + +#include +#include +#include + +#define DFL_PC_RES 4 /* default PC resolution for this platform */ +#define CG_MAX_ARCS (1 << (8 * sizeof(short))) +#define FUNCTIONPC(func) (*(unsigned long *)&(func)) + +#define pc_out_of_range(pc) \ + ((pc) < (unsigned long) &_stext || (pc) >= (unsigned long) &_etext) + +struct prof_mem_map +{ + unsigned long kernel_buckets; /* number of kernel buckets */ + unsigned long nr_cpus; /* number of processors whether profiled or not */ + unsigned long cg_from_size; /* size of one cg_from array */ + unsigned long cg_to_size; /* size of one cg_to array */ + unsigned long cg_to_offset; /* offset of cg_to array */ + unsigned long kernel_start; /* lowest text address in kernel */ + unsigned long kernel_end; /* highest text address in kernel */ +}; + +struct cg_arc_dest { + unsigned long address; + atomic_t count; + unsigned short link; + unsigned short pad; +}; + +#ifdef CONFIG_X86 +void cg_record_arc(unsigned long frompc, unsigned long selfpc) __attribute__((regparm(2))); +#endif + +int mcount_init(void); + +ssize_t mcount_write(struct file * file, const char * buf, + size_t count, loff_t *ppos); + +ssize_t mcount_read(struct file * file, char * buf, + size_t count, loff_t *ppos); + +static struct file_operations mcount_operations = { + write: mcount_write, + read: mcount_read, +}; + +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/mm.h 999-mjb/include/linux/mm.h --- 000-virgin/include/linux/mm.h 2003-10-14 15:50:34.000000000 -0700 +++ 999-mjb/include/linux/mm.h 2003-11-24 16:34:49.000000000 -0800 @@ -180,6 +180,7 @@ struct page { struct pte_chain *chain;/* Reverse pte mapping pointer. * protected by PG_chainlock */ pte_addr_t direct; + int mapcount; } pte; unsigned long private; /* mapping-private opaque data */ @@ -615,6 +616,39 @@ extern struct page * follow_page(struct extern int remap_page_range(struct vm_area_struct *vma, unsigned long from, unsigned long to, unsigned long size, pgprot_t prot); +/* + * Given a struct page, determine which node's memory it is from. + * TODO: There's probably a more efficient way to do this... + */ +static inline int page_to_nid(struct page *page) +{ + return pfn_to_nid(page_to_pfn(page)); +} + +#ifdef CONFIG_NUMA +static inline void zero_rss(struct mm_struct *mm) +{ + mm->rss = 0; + memset(mm->pernode_rss, 0, MAX_NUMNODES * sizeof(*mm->pernode_rss)); +} + +static inline void inc_rss(struct mm_struct *mm, struct page *page) +{ + mm->rss++; + mm->pernode_rss[page_to_nid(page)]++; +} + +static inline void dec_rss(struct mm_struct *mm, struct page *page) +{ + mm->rss--; + mm->pernode_rss[page_to_nid(page)]--; +} +#else /* !CONFIG_NUMA */ +#define zero_rss(mm) ((mm)->rss = 0) +#define inc_rss(mm, page) ((mm)->rss++) +#define dec_rss(mm, page) ((mm)->rss--) +#endif /* CONFIG_NUMA */ + #ifndef CONFIG_DEBUG_PAGEALLOC static inline void kernel_map_pages(struct page *page, int numpages, int enable) diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/mmzone.h 999-mjb/include/linux/mmzone.h --- 000-virgin/include/linux/mmzone.h 2003-10-14 15:50:34.000000000 -0700 +++ 999-mjb/include/linux/mmzone.h 2003-11-24 16:35:00.000000000 -0800 @@ -303,7 +303,7 @@ extern struct pglist_data contig_page_da #define NODE_DATA(nid) (&contig_page_data) #define NODE_MEM_MAP(nid) mem_map #define MAX_NODES_SHIFT 0 - +#define pfn_to_nid(pfn) (0) #else /* CONFIG_DISCONTIGMEM */ #include @@ -379,6 +379,19 @@ static inline unsigned int num_online_me #define num_online_memblks() 1 #endif /* CONFIG_DISCONTIGMEM || CONFIG_NUMA */ + +static inline struct zonelist *get_node_zonelist(int nid, int gfp_mask) +{ + return NODE_DATA(nid)->node_zonelists + (gfp_mask & GFP_ZONEMASK); +} + +#define get_zonelist(gfp_mask) get_node_zonelist(numa_node_id(), gfp_mask) + +/* Structure to keep track of memory segment (VMA) bindings */ +struct binding { + struct zonelist zonelist; +}; + #endif /* !__ASSEMBLY__ */ #endif /* __KERNEL__ */ #endif /* _LINUX_MMZONE_H */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/module.h 999-mjb/include/linux/module.h --- 000-virgin/include/linux/module.h 2003-07-28 15:33:25.000000000 -0700 +++ 999-mjb/include/linux/module.h 2003-11-24 16:35:16.000000000 -0800 @@ -257,6 +257,11 @@ struct module /* The command line arguments (may be mangled). People like keeping pointers to this stuff */ char *args; + +#ifdef CONFIG_GCOV_PROFILE + const char *ctors_start; /* Pointer to start of .ctors-section */ + const char *ctors_end; /* Pointer to end of .ctors-section */ +#endif }; /* FIXME: It'd be nice to isolate modules during init, too, so they diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/netdevice.h 999-mjb/include/linux/netdevice.h --- 000-virgin/include/linux/netdevice.h 2003-11-24 16:12:32.000000000 -0800 +++ 999-mjb/include/linux/netdevice.h 2003-11-24 16:14:01.000000000 -0800 @@ -456,6 +456,13 @@ struct net_device /* bridge stuff */ struct net_bridge_port *br_port; +#ifdef CONFIG_KGDB + int kgdb_is_trapped; +#endif +#ifdef CONFIG_NET_POLL_CONTROLLER + void (*poll_controller)(struct net_device *); +#endif + #ifdef CONFIG_NET_FASTROUTE #define NETDEV_FASTROUTE_HMASK 0xF /* Semi-private data. Keep it at the end of device struct. */ @@ -533,6 +540,11 @@ extern int dev_new_index(void); extern struct net_device *dev_get_by_index(int ifindex); extern struct net_device *__dev_get_by_index(int ifindex); extern int dev_restart(struct net_device *dev); +#ifdef CONFIG_KGDB +extern int kgdb_eth_is_trapped(void); +extern int kgdb_net_interrupt(struct sk_buff *skb); +extern void kgdb_send_arp_request(void); +#endif typedef int gifconf_func_t(struct net_device * dev, char * bufptr, int len); extern int register_gifconf(unsigned int family, gifconf_func_t * gifconf); @@ -591,12 +603,22 @@ static inline void netif_start_queue(str static inline void netif_wake_queue(struct net_device *dev) { +#ifdef CONFIG_KGDB + if (kgdb_eth_is_trapped()) { + return; + } +#endif if (test_and_clear_bit(__LINK_STATE_XOFF, &dev->state)) __netif_schedule(dev); } static inline void netif_stop_queue(struct net_device *dev) { +#ifdef CONFIG_KGDB + if (kgdb_eth_is_trapped()) { + return; + } +#endif set_bit(__LINK_STATE_XOFF, &dev->state); } diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/page-flags.h 999-mjb/include/linux/page-flags.h --- 000-virgin/include/linux/page-flags.h 2003-10-01 11:47:13.000000000 -0700 +++ 999-mjb/include/linux/page-flags.h 2003-11-24 16:26:52.000000000 -0800 @@ -75,6 +75,7 @@ #define PG_mappedtodisk 17 /* Has blocks allocated on-disk */ #define PG_reclaim 18 /* To be reclaimed asap */ #define PG_compound 19 /* Part of a compound page */ +#define PG_anon 20 /* Anonymous page */ /* @@ -269,6 +270,10 @@ extern void get_full_page_state(struct p #define SetPageCompound(page) set_bit(PG_compound, &(page)->flags) #define ClearPageCompound(page) clear_bit(PG_compound, &(page)->flags) +#define PageAnon(page) test_bit(PG_anon, &(page)->flags) +#define SetPageAnon(page) set_bit(PG_anon, &(page)->flags) +#define ClearPageAnon(page) clear_bit(PG_anon, &(page)->flags) + /* * The PageSwapCache predicate doesn't use a PG_flag at this time, * but it may again do so one day. diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/pagemap.h 999-mjb/include/linux/pagemap.h --- 000-virgin/include/linux/pagemap.h 2003-10-01 11:41:17.000000000 -0700 +++ 999-mjb/include/linux/pagemap.h 2003-11-24 16:34:32.000000000 -0800 @@ -50,14 +50,37 @@ static inline void mapping_set_gfp_mask( #define page_cache_release(page) put_page(page) void release_pages(struct page **pages, int nr, int cold); +#ifndef CONFIG_NUMA + +static inline struct page *__page_cache_alloc(struct address_space *x, int gfp_mask) +{ + return alloc_pages(gfp_mask, 0); +} + +#else /* CONFIG_NUMA */ + +static inline struct page *__page_cache_alloc(struct address_space *x, int gfp_mask) +{ + struct zonelist *zonelist; + + if (!x->binding) + zonelist = get_zonelist(gfp_mask); + else + zonelist = &x->binding->zonelist; + + return __alloc_pages(gfp_mask, 0, zonelist); +} + +#endif /* !CONFIG_NUMA */ + static inline struct page *page_cache_alloc(struct address_space *x) { - return alloc_pages(mapping_gfp_mask(x), 0); + return __page_cache_alloc(x, mapping_gfp_mask(x)); } static inline struct page *page_cache_alloc_cold(struct address_space *x) { - return alloc_pages(mapping_gfp_mask(x)|__GFP_COLD, 0); + return __page_cache_alloc(x, mapping_gfp_mask(x)|__GFP_COLD); } typedef int filler_t(void *, struct page *); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/pci.h 999-mjb/include/linux/pci.h --- 000-virgin/include/linux/pci.h 2003-10-14 15:50:35.000000000 -0700 +++ 999-mjb/include/linux/pci.h 2003-11-25 23:01:43.000000000 -0800 @@ -461,17 +461,19 @@ struct pci_bus { void *sysdata; /* hook for sys-specific extension */ struct proc_dir_entry *procdir; /* directory entry in /proc/bus/pci */ - unsigned char number; /* bus number */ - unsigned char primary; /* number of primary bridge */ - unsigned char secondary; /* number of secondary bridge */ - unsigned char subordinate; /* max number of subordinate buses */ + unsigned int number; /* bus number */ + unsigned int primary; /* number of primary bridge */ + unsigned int secondary; /* number of secondary bridge */ + unsigned int subordinate; /* max number of subordinate buses */ char name[48]; - struct device * dev; + struct device *bridge; + struct class_device class_dev; }; -#define pci_bus_b(n) list_entry(n, struct pci_bus, node) +#define pci_bus_b(n) list_entry(n, struct pci_bus, node) +#define to_pci_bus(n) container_of(n, struct pci_bus, class_dev) /* * Error values that may be returned by PCI functions. diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/sched.h 999-mjb/include/linux/sched.h --- 000-virgin/include/linux/sched.h 2003-11-24 16:12:32.000000000 -0800 +++ 999-mjb/include/linux/sched.h 2003-11-24 16:36:16.000000000 -0800 @@ -71,7 +71,11 @@ struct exec_domain; * the EXP_n values would be 1981, 2034 and 2043 if still using only * 11 bit fractions. */ -extern unsigned long avenrun[]; /* Load averages */ +extern unsigned long avenrun[]; /* Load averages */ +extern unsigned long tasks_running[3]; /* Real load averages */ +DECLARE_PER_CPU(unsigned long[3],cpu_tasks_running); /* Real load averages per cpu */ + +extern unsigned long tasks_running[]; /* Real load averages */ #define FSHIFT 11 /* nr of bits of precision */ #define FIXED_1 (1< #include #include @@ -192,7 +207,7 @@ struct mm_struct { atomic_t mm_count; /* How many references to "struct mm_struct" (users count as 1) */ int map_count; /* number of VMAs */ struct rw_semaphore mmap_sem; - spinlock_t page_table_lock; /* Protects task page tables and mm->rss */ + spinlock_t page_table_lock; /* Protects task page tables and RSS data */ struct list_head mmlist; /* List of all active mm's. These are globally strung * together off init_mm.mmlist, and are protected @@ -202,7 +217,11 @@ struct mm_struct { unsigned long start_code, end_code, start_data, end_data; unsigned long start_brk, brk, start_stack; unsigned long arg_start, arg_end, env_start, env_end; - unsigned long rss, total_vm, locked_vm; + unsigned long total_vm, locked_vm; + unsigned long rss; +#ifdef CONFIG_NUMA + unsigned long pernode_rss[MAX_NUMNODES]; +#endif unsigned long def_flags; cpumask_t cpu_vm_mask; unsigned long swap_address; @@ -326,6 +345,18 @@ struct k_itimer { struct sigqueue *sigq; /* signal queue entry. */ }; +#ifdef CONFIG_SCHEDSTATS +struct sched_info { + /* cumulative counters */ + unsigned long cpu_time, /* time spent on the cpu */ + run_delay, /* time spent waiting on a runqueue */ + pcnt; /* # of timeslices run on this cpu */ + + /* timestamps */ + unsigned long last_arrival, /* when we last ran on a cpu */ + last_queued; /* when we were last queued to run */ +}; +#endif /* CONFIG_SCHEDSTATS */ struct io_context; /* See blkdev.h */ void exit_io_context(void); @@ -352,6 +383,10 @@ struct task_struct { cpumask_t cpus_allowed; unsigned int time_slice, first_time_slice; +#ifdef CONFIG_SCHEDSTATS + struct sched_info sched_info; +#endif /* CONFIG_SCHEDSTATS */ + struct list_head tasks; struct list_head ptrace_children; struct list_head ptrace_list; diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/serial_core.h 999-mjb/include/linux/serial_core.h --- 000-virgin/include/linux/serial_core.h 2003-10-01 11:48:26.000000000 -0700 +++ 999-mjb/include/linux/serial_core.h 2003-11-24 16:14:01.000000000 -0800 @@ -158,7 +158,9 @@ struct uart_port { unsigned char x_char; /* xon/xoff char */ unsigned char regshift; /* reg offset shift */ unsigned char iotype; /* io access style */ - +#ifdef CONFIG_KGDB + int kgdb; /* in use by kgdb */ +#endif #define UPIO_PORT (0) #define UPIO_HUB6 (1) #define UPIO_MEM (2) diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/spinlock.h 999-mjb/include/linux/spinlock.h --- 000-virgin/include/linux/spinlock.h 2003-07-02 14:45:00.000000000 -0700 +++ 999-mjb/include/linux/spinlock.h 2003-11-24 16:27:18.000000000 -0800 @@ -15,6 +15,12 @@ #include /* for cpu relax */ #include +#ifdef CONFIG_KGDB +#include +#define SET_WHO(x, him) (x)->who = him; +#else +#define SET_WHO(x, him) +#endif /* * Must define these before including other files, inline functions need them @@ -55,6 +61,9 @@ typedef struct { const char *module; char *owner; int oline; +#ifdef CONFIG_KGDB + struct task_struct *who; +#endif } spinlock_t; #define SPIN_LOCK_UNLOCKED (spinlock_t) { SPINLOCK_MAGIC, 0, 10, __FILE__ , NULL, 0} @@ -66,6 +75,7 @@ typedef struct { (x)->module = __FILE__; \ (x)->owner = NULL; \ (x)->oline = 0; \ + SET_WHO(x, NULL) \ } while (0) #define CHECK_LOCK(x) \ @@ -88,6 +98,7 @@ typedef struct { (x)->lock = 1; \ (x)->owner = __FILE__; \ (x)->oline = __LINE__; \ + SET_WHO(x, current) \ } while (0) /* without debugging, spin_is_locked on UP always says @@ -118,6 +129,7 @@ typedef struct { (x)->lock = 1; \ (x)->owner = __FILE__; \ (x)->oline = __LINE__; \ + SET_WHO(x, current) \ 1; \ }) @@ -184,6 +196,17 @@ typedef struct { #endif /* !SMP */ +#ifdef CONFIG_LOCKMETER +extern void _metered_spin_lock (spinlock_t *lock); +extern void _metered_spin_unlock (spinlock_t *lock); +extern int _metered_spin_trylock(spinlock_t *lock); +extern void _metered_read_lock (rwlock_t *lock); +extern void _metered_read_unlock (rwlock_t *lock); +extern void _metered_write_lock (rwlock_t *lock); +extern void _metered_write_unlock (rwlock_t *lock); +extern int _metered_write_trylock(rwlock_t *lock); +#endif + /* * Define the various spin_lock and rw_lock methods. Note we define these * regardless of whether CONFIG_SMP or CONFIG_PREEMPT are set. The various @@ -389,6 +412,141 @@ do { \ _raw_spin_trylock(lock) ? 1 : \ ({preempt_enable(); local_bh_enable(); 0;});}) +#ifdef CONFIG_LOCKMETER +#undef spin_lock +#undef spin_trylock +#undef spin_unlock +#undef spin_lock_irqsave +#undef spin_lock_irq +#undef spin_lock_bh +#undef read_lock +#undef read_unlock +#undef write_lock +#undef write_unlock +#undef write_trylock +#undef spin_unlock_bh +#undef read_lock_irqsave +#undef read_lock_irq +#undef read_lock_bh +#undef read_unlock_bh +#undef write_lock_irqsave +#undef write_lock_irq +#undef write_lock_bh +#undef write_unlock_bh + +#define spin_lock(lock) \ +do { \ + preempt_disable(); \ + _metered_spin_lock(lock); \ +} while(0) + +#define spin_trylock(lock) ({preempt_disable(); _metered_spin_trylock(lock) ? \ + 1 : ({preempt_enable(); 0;});}) +#define spin_unlock(lock) \ +do { \ + _metered_spin_unlock(lock); \ + preempt_enable(); \ +} while (0) + +#define spin_lock_irqsave(lock, flags) \ +do { \ + local_irq_save(flags); \ + preempt_disable(); \ + _metered_spin_lock(lock); \ +} while (0) + +#define spin_lock_irq(lock) \ +do { \ + local_irq_disable(); \ + preempt_disable(); \ + _metered_spin_lock(lock); \ +} while (0) + +#define spin_lock_bh(lock) \ +do { \ + local_bh_disable(); \ + preempt_disable(); \ + _metered_spin_lock(lock); \ +} while (0) + +#define spin_unlock_bh(lock) \ +do { \ + _metered_spin_unlock(lock); \ + preempt_enable(); \ + local_bh_enable(); \ +} while (0) + + +#define read_lock(lock) ({preempt_disable(); _metered_read_lock(lock);}) +#define read_unlock(lock) ({_metered_read_unlock(lock); preempt_enable();}) +#define write_lock(lock) ({preempt_disable(); _metered_write_lock(lock);}) +#define write_unlock(lock) ({_metered_write_unlock(lock); preempt_enable();}) +#define write_trylock(lock) ({preempt_disable();_metered_write_trylock(lock) ? \ + 1 : ({preempt_enable(); 0;});}) +#define spin_unlock_no_resched(lock) \ +do { \ + _metered_spin_unlock(lock); \ + preempt_enable_no_resched(); \ +} while (0) + +#define read_lock_irqsave(lock, flags) \ +do { \ + local_irq_save(flags); \ + preempt_disable(); \ + _metered_read_lock(lock); \ +} while (0) + +#define read_lock_irq(lock) \ +do { \ + local_irq_disable(); \ + preempt_disable(); \ + _metered_read_lock(lock); \ +} while (0) + +#define read_lock_bh(lock) \ +do { \ + local_bh_disable(); \ + preempt_disable(); \ + _metered_read_lock(lock); \ +} while (0) + +#define read_unlock_bh(lock) \ +do { \ + _metered_read_unlock(lock); \ + preempt_enable(); \ + local_bh_enable(); \ +} while (0) + +#define write_lock_irqsave(lock, flags) \ +do { \ + local_irq_save(flags); \ + preempt_disable(); \ + _metered_write_lock(lock); \ +} while (0) + +#define write_lock_irq(lock) \ +do { \ + local_irq_disable(); \ + preempt_disable(); \ + _metered_write_lock(lock); \ +} while (0) + +#define write_lock_bh(lock) \ +do { \ + local_bh_disable(); \ + preempt_disable(); \ + _metered_write_lock(lock); \ +} while (0) + +#define write_unlock_bh(lock) \ +do { \ + _metered_write_unlock(lock); \ + preempt_enable(); \ + local_bh_enable(); \ +} while (0) + +#endif /* !CONFIG_LOCKMETER */ + /* "lock on reference count zero" */ #ifndef ATOMIC_DEC_AND_LOCK #include diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/swap.h 999-mjb/include/linux/swap.h --- 000-virgin/include/linux/swap.h 2003-10-14 15:50:35.000000000 -0700 +++ 999-mjb/include/linux/swap.h 2003-11-24 16:26:52.000000000 -0800 @@ -185,6 +185,8 @@ struct pte_chain *FASTCALL(page_add_rmap void FASTCALL(page_remove_rmap(struct page *, pte_t *)); int FASTCALL(try_to_unmap(struct page *)); +int page_convert_anon(struct page *); + /* linux/mm/shmem.c */ extern int shmem_unuse(swp_entry_t entry, struct page *page); #else diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/sysctl.h 999-mjb/include/linux/sysctl.h --- 000-virgin/include/linux/sysctl.h 2003-11-24 16:12:33.000000000 -0800 +++ 999-mjb/include/linux/sysctl.h 2003-11-24 16:26:49.000000000 -0800 @@ -61,7 +61,8 @@ enum CTL_DEV=7, /* Devices */ CTL_BUS=8, /* Busses */ CTL_ABI=9, /* Binary emulation */ - CTL_CPU=10 /* CPU stuff (speed scaling, etc) */ + CTL_CPU=10, /* CPU stuff (speed scaling, etc) */ + CTL_SCHED=11, /* scheduler tunables */ }; /* CTL_BUS names: */ @@ -156,6 +157,21 @@ enum VM_MIN_FREE_KBYTES=21, /* Minimum free kilobytes to maintain */ }; +/* Tunable scheduler parameters in /proc/sys/sched/ */ +enum { + SCHED_MIN_TIMESLICE=1, /* minimum process timeslice */ + SCHED_MAX_TIMESLICE=2, /* maximum process timeslice */ + SCHED_CHILD_PENALTY=3, /* penalty on fork to child */ + SCHED_PARENT_PENALTY=4, /* penalty on fork to parent */ + SCHED_EXIT_WEIGHT=5, /* penalty to parent of CPU hog child */ + SCHED_PRIO_BONUS_RATIO=6, /* percent of max prio given as bonus */ + SCHED_INTERACTIVE_DELTA=7, /* delta used to scale interactivity */ + SCHED_MAX_SLEEP_AVG=8, /* maximum sleep avg attainable */ + SCHED_STARVATION_LIMIT=9, /* no re-active if expired is starved */ + SCHED_NODE_THRESHOLD=10, /* NUMA node rebalance threshold */ + SCHED_IDLE_NODE_REBALANCE_RATIO=11, /* how often to global balance */ + SCHED_BUSY_NODE_REBALANCE_RATIO=12, /* how often to global balance */ +}; /* CTL_NET names: */ enum diff -purN -X /home/mbligh/.diff.exclude 000-virgin/include/linux/timex.h 999-mjb/include/linux/timex.h --- 000-virgin/include/linux/timex.h 2003-10-27 10:41:15.000000000 -0800 +++ 999-mjb/include/linux/timex.h 2003-11-24 16:26:35.000000000 -0800 @@ -78,7 +78,7 @@ #elif HZ >= 768 && HZ < 1536 # define SHIFT_HZ 10 #else -# error You lose. +# error Please use a HZ value which is between 12 and 1536 #endif /* diff -purN -X /home/mbligh/.diff.exclude 000-virgin/init/main.c 999-mjb/init/main.c --- 000-virgin/init/main.c 2003-10-27 10:41:16.000000000 -0800 +++ 999-mjb/init/main.c 2003-11-24 16:35:16.000000000 -0800 @@ -38,6 +38,7 @@ #include #include #include +#include #include #include @@ -114,6 +115,10 @@ char *execute_command; /* Setup configured maximum number of CPUs to activate */ static unsigned int max_cpus = NR_CPUS; +#if defined(CONFIG_GCOV_PROFILE) && (defined(CONFIG_PPC32) || defined(CONFIG_PPC64)) +void __bb_fork_func (void) { } +#endif + /* * Setup routine for controlling SMP activation * @@ -394,6 +399,8 @@ asmlinkage void __init start_kernel(void */ lock_kernel(); printk(linux_banner); + setup_early_printk(); + setup_arch(&command_line); setup_per_zone_pages_min(); setup_per_cpu_areas(); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/ipc/shm.c 999-mjb/ipc/shm.c --- 000-virgin/ipc/shm.c 2003-10-01 11:47:15.000000000 -0700 +++ 999-mjb/ipc/shm.c 2003-11-24 16:35:33.000000000 -0800 @@ -380,9 +380,9 @@ static void shm_get_stat(unsigned long * if (is_file_hugepages(shp->shm_file)) { struct address_space *mapping = inode->i_mapping; - spin_lock(&mapping->page_lock); + mapping_wrlock(&mapping->page_lock); *rss += (HPAGE_SIZE/PAGE_SIZE)*mapping->nrpages; - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); } else { struct shmem_inode_info *info = SHMEM_I(inode); spin_lock(&info->lock); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/kernel/Makefile 999-mjb/kernel/Makefile --- 000-virgin/kernel/Makefile 2003-10-14 15:50:35.000000000 -0700 +++ 999-mjb/kernel/Makefile 2003-11-24 16:35:58.000000000 -0800 @@ -8,9 +8,16 @@ obj-y = sched.o fork.o exec_domain.o signal.o sys.o kmod.o workqueue.o pid.o \ rcupdate.o intermodule.o extable.o params.o posix-timers.o +ifdef CONFIG_GCOV_PROFILE +obj-y += gcov.o +export-objs += gcov.o +CFLAGS_gcov.o := -DGCOV_PATH='"$(TOPDIR)"' +endif + obj-$(CONFIG_FUTEX) += futex.o obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o obj-$(CONFIG_SMP) += cpu.o +obj-$(CONFIG_LOCKMETER) += lockmeter.o obj-$(CONFIG_UID16) += uid16.o obj-$(CONFIG_MODULES) += module.o obj-$(CONFIG_KALLSYMS) += kallsyms.o @@ -19,6 +26,18 @@ obj-$(CONFIG_BSD_PROCESS_ACCT) += acct.o obj-$(CONFIG_COMPAT) += compat.o obj-$(CONFIG_IKCONFIG) += configs.o obj-$(CONFIG_IKCONFIG_PROC) += configs.o +obj-$(CONFIG_X86_EARLY_PRINTK) += early_printk.o +obj-$(CONFIG_MCOUNT) += mcount.o + +ifeq ($(CONFIG_MCOUNT),y) +quiet_cmd_nopg = CC $@ + cmd_nopg = $(CC) $(subst -pg,,$(CFLAGS)) -c $(src)/$(*F).c -o $@ + +$(obj)/mcount.o: alwayscc + $(call cmd,nopg) +alwayscc: + $(Q)rm -f $(obj)/mcount.o +endif ifneq ($(CONFIG_IA64),y) # According to Alan Modra , the -fno-omit-frame-pointer is diff -purN -X /home/mbligh/.diff.exclude 000-virgin/kernel/early_printk.c 999-mjb/kernel/early_printk.c --- 000-virgin/kernel/early_printk.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/kernel/early_printk.c 2003-11-24 16:19:08.000000000 -0800 @@ -0,0 +1,218 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +/* Simple VGA output */ + +#define MAX_YPOS 25 +#define MAX_XPOS 80 + +static int current_ypos = 1, current_xpos = 0; + +static void early_vga_write(struct console *con, const char *str, unsigned n) +{ + char c; + int i, k, j; + + while ((c = *str++) != '\0' && n-- > 0) { + if (current_ypos >= MAX_YPOS) { + /* scroll 1 line up */ + for(k = 1, j = 0; k < MAX_YPOS; k++, j++) { + for(i = 0; i < MAX_XPOS; i++) { + writew(readw(VGABASE + 2*(MAX_XPOS*k + i)), + VGABASE + 2*(MAX_XPOS*j + i)); + } + } + for(i = 0; i < MAX_XPOS; i++) { + writew(0x720, VGABASE + 2*(MAX_XPOS*j + i)); + } + current_ypos = MAX_YPOS-1; + } + if (c == '\n') { + current_xpos = 0; + current_ypos++; + } else if (c != '\r') { + writew(((0x7 << 8) | (unsigned short) c), + VGABASE + 2*(MAX_XPOS*current_ypos + current_xpos++)); + if (current_xpos >= MAX_XPOS) { + current_xpos = 0; + current_ypos++; + } + } + } +} + +static struct console early_vga_console = { + .name = "earlyvga", + .write = early_vga_write, + .flags = CON_PRINTBUFFER, + .index = -1, +}; + +/* Serial functions losely based on a similar package from Klaus P. Gerlicher */ + +int early_serial_base; /* ttyS0 */ + +static int early_serial_putc(unsigned char ch) +{ + unsigned timeout = 0xffff; + while ((inb(early_serial_base + LSR) & XMTRDY) == 0 && --timeout) + rep_nop(); + outb(ch, early_serial_base + TXR); + return timeout ? 0 : -1; +} + +static void early_serial_write(struct console *con, const char *s, unsigned n) +{ + while (*s && n-- > 0) { + early_serial_putc(*s); + if (*s == '\n') + early_serial_putc('\r'); + s++; + } +} + +static __init void early_serial_init(char *opt) +{ + unsigned char c; + unsigned divisor, baud = DEFAULT_BAUD; + static int bases[] = SERIAL_BASES; + char *s, *e; + + early_serial_base = bases[0]; + + if (*opt == ',') + ++opt; + + s = strsep(&opt, ","); + if (s != NULL) { + unsigned port; + if (!strncmp(s,"0x",2)) + early_serial_base = simple_strtoul(s, &e, 16); + else { + if (!strncmp(s,"ttyS",4)) + s+=4; + port = simple_strtoul(s, &e, 10); + if (port > (SERIAL_BASES_LEN-1) || s == e) + port = 0; + early_serial_base = bases[port]; + } + } + + outb(0x3, early_serial_base + LCR); /* 8n1 */ + outb(0, early_serial_base + IER); /* no interrupt */ + outb(0, early_serial_base + FCR); /* no fifo */ + outb(0x3, early_serial_base + MCR); /* DTR + RTS */ + + s = strsep(&opt, ","); + if (s != NULL) { + baud = simple_strtoul(s, &e, 0); + if (baud == 0 || s == e) + baud = DEFAULT_BAUD; + } + + divisor = 115200 / baud; + c = inb(early_serial_base + LCR); + outb(c | DLAB, early_serial_base + LCR); + outb(divisor & 0xff, early_serial_base + DLL); + outb((divisor >> 8) & 0xff, early_serial_base + DLH); + outb(c & ~DLAB, early_serial_base + LCR); +} + +static struct console early_serial_console = { + .name = "earlyser", + .write = early_serial_write, + .flags = CON_PRINTBUFFER, + .index = -1, +}; + +/* Direct interface for emergencies */ +struct console *early_console = &early_vga_console; +static int early_console_initialized = 0; + +void early_printk(const char *fmt, ...) +{ + char buf[512]; + int n; + va_list ap; + va_start(ap,fmt); + n = vsnprintf(buf,512,fmt,ap); + early_console->write(early_console,buf,n); + va_end(ap); +} + +static int keep_early; + +int __init setup_early_printk(void) +{ + char *space, *s; + char buf[256]; + char cmd[COMMAND_LINE_SIZE]; + char *opt; + + /* Get our own copy of the cmd line */ + memcpy(cmd, COMMAND_LINE, COMMAND_LINE_SIZE); + cmd[COMMAND_LINE_SIZE-1] = '\0'; + opt = cmd; + + s = strstr(opt, "earlyprintk="); + if (s == NULL) + return -1; + opt = s+12; + + if (early_console_initialized) + return -1; + + strncpy(buf,opt,256); + buf[255] = 0; + space = strchr(buf, ' '); + if (space) + *space = 0; + + if (strstr(buf,"keep")) + keep_early = 1; + + if (!strncmp(buf, "serial", 6)) { + early_serial_init(buf + 6); + early_console = &early_serial_console; + } else if (!strncmp(buf, "ttyS", 4)) { + early_serial_init(buf); + early_console = &early_serial_console; + } else if (!strncmp(buf, "vga", 3)) { + early_console = &early_vga_console; + } else { + early_console = NULL; + return -1; + } + early_console_initialized = 1; + register_console(early_console); + printk("early printk console registered\n"); + return 0; +} + +void __init disable_early_printk(void) +{ + if (!early_console_initialized || !early_console) + return; + if (!keep_early) { + printk("disabling early console...\n"); + unregister_console(early_console); + early_console_initialized = 0; + } else { + printk("keeping early console.\n"); + } +} + +/* syntax: earlyprintk=vga + earlyprintk=serial[,ttySn[,baudrate]] + Append ,keep to not disable it when the real console takes over. + Only vga or serial at a time, not both. + Currently only ttyS0 and ttyS1 are supported. + Interaction with the standard serial driver is not very good. + The VGA output is eventually overwritten by the real console. */ +__setup("earlyprintk=", setup_early_printk); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/kernel/fork.c 999-mjb/kernel/fork.c --- 000-virgin/kernel/fork.c 2003-10-21 11:16:13.000000000 -0700 +++ 999-mjb/kernel/fork.c 2003-11-24 16:36:16.000000000 -0800 @@ -248,7 +248,7 @@ static inline int dup_mmap(struct mm_str mm->mmap_cache = NULL; mm->free_area_cache = TASK_UNMAPPED_BASE; mm->map_count = 0; - mm->rss = 0; + zero_rss(mm); cpus_clear(mm->cpu_vm_mask); pprev = &mm->mmap; @@ -903,6 +903,9 @@ struct task_struct *copy_process(unsigne p->start_time = get_jiffies_64(); p->security = NULL; p->io_context = NULL; + #ifdef CONFIG_SCHEDSTATS + memset(&p->sched_info, 0, sizeof(p->sched_info)); + #endif /* CONFIG_SCHEDSTATS */ retval = -ENOMEM; if ((retval = security_task_alloc(p))) diff -purN -X /home/mbligh/.diff.exclude 000-virgin/kernel/gcov.c 999-mjb/kernel/gcov.c --- 000-virgin/kernel/gcov.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/kernel/gcov.c 2003-11-24 16:35:16.000000000 -0800 @@ -0,0 +1,158 @@ +/* + * Coverage support under Linux + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * Copyright (c) International Business Machines Corp., 2002 + * + * Author: Hubertus Franke + * Rajan Ravindran + * + * Modified by + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +struct bb +{ + long zero_word; + const char *filename; + long *counts; + long ncounts; + struct bb *next; + const unsigned long *addresses; + + /* Older GCC's did not emit these fields. */ + long nwords; + const char **functions; + const long *line_nums; + const char **filenames; + char *flags; +}; + +struct bb *bb_head; +struct module *bb_context_address; +void (*gcov_callback)(int cmd, struct bb *bbptr) = NULL; + +#ifdef GCOV_PATH +char *gcov_kernelpath = GCOV_PATH; +#else +char *gcov_kernelpath = __FILE__; +#endif + + +void +__bb_init_func (struct bb *blocks) +{ + if (blocks->zero_word) + return; + + /* Set up linked list. */ + blocks->zero_word = 1; + + /* Store the address of the module of which this object-file is a part + of (set in do_global_ctors). */ + blocks->addresses = (unsigned long *) bb_context_address; + + blocks->next = bb_head; + bb_head = blocks; + + if (gcov_callback && bb_context_address) + (*gcov_callback)(1,blocks); +} + +/* Call constructors for all kernel objects and dynamic modules. This function + * is called both during module initialization and when the gcov kernel + * module is insmod'ed. The list of constructors is compiled into the + * kernel at &__CTOR_LIST__ to &__DTOR_LIST__ (labels are defined in + * head.S). In the case of a dynamic module the list is located at + * ctors_start to ctors_end. + * + * The constructors in turn call __bb_init_func, reporting the respective + * struct bb for each object file. + */ + +void +do_global_ctors (char *ctors_start, char *ctors_end, struct module *addr, int mod_flag) +{ + extern char __CTOR_LIST__; + extern char __DTOR_LIST__; + typedef void (*func_ptr)(void) ; + func_ptr *constructor_ptr=NULL; + + if (!mod_flag) { + /* Set start and end ptr from global kernel constructor list. */ + ctors_start = &__CTOR_LIST__; + ctors_end = &__DTOR_LIST__; + bb_context_address = NULL; + } else { + /* Set context to current module address. */ + bb_context_address = addr; + } + + if (!ctors_start) + return; + + /* Call all constructor functions until either the end of the + list is reached or until a NULL is encountered. */ + for (constructor_ptr = (func_ptr *) ctors_start; + (constructor_ptr != (func_ptr *) ctors_end) && + (*constructor_ptr != NULL); + constructor_ptr++) { + (*constructor_ptr) (); + } +} + + +/* When a module is unloaded, this function is called to remove + * the respective bb entries from our list. context specifies + * the address of the module that is unloaded. */ + +void +remove_bb_link (struct module *context) +{ + struct bb *bbptr; + struct bb *prev = NULL; + + /* search for all the module's bbptrs */ + for (bbptr = bb_head; bbptr ; bbptr = bbptr->next) { + if (bbptr->addresses == (unsigned long *) context) { + if (gcov_callback) + (*gcov_callback)(0,bbptr); + if (prev == NULL) + bb_head = bbptr->next; + else + prev->next = bbptr->next; + } + else + prev = bbptr; + } +} + +EXPORT_SYMBOL(bb_head); +EXPORT_SYMBOL(__bb_init_func); +EXPORT_SYMBOL(do_global_ctors); +EXPORT_SYMBOL(gcov_kernelpath); +EXPORT_SYMBOL(gcov_callback); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/kernel/lockmeter.c 999-mjb/kernel/lockmeter.c --- 000-virgin/kernel/lockmeter.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/kernel/lockmeter.c 2003-11-24 16:27:19.000000000 -0800 @@ -0,0 +1,1177 @@ +/* + * Copyright (C) 1999,2000 Silicon Graphics, Inc. + * + * Written by John Hawkes (hawkes@sgi.com) + * Based on klstat.c by Jack Steiner (steiner@sgi.com) + * + * Modified by Ray Bryant (raybry@us.ibm.com) + * Changes Copyright (C) 2000 IBM, Inc. + * Added save of index in spinlock_t to improve efficiency + * of "hold" time reporting for spinlocks + * Added support for hold time statistics for read and write + * locks. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define ASSERT(cond) +#define bzero(loc,size) memset(loc,0,size) + +/*<---------------------------------------------------*/ +/* lockmeter.c */ +/*>---------------------------------------------------*/ + +static lstat_control_t lstat_control __cacheline_aligned = + { LSTAT_OFF, SPIN_LOCK_UNLOCKED, SPIN_LOCK_UNLOCKED, + 19 * 0, NR_CPUS * 0, 0, NR_CPUS * 0 }; + +static ushort lstat_make_dir_entry(void *, void *); + +/* + * lstat_lookup + * + * Given a RA, locate the directory entry for the lock. + */ +static ushort +lstat_lookup(void *lock_ptr, void *caller_ra) +{ + ushort index; + lstat_directory_entry_t *dirp; + + dirp = lstat_control.dir; + + index = lstat_control.hashtab[DIRHASH(caller_ra)]; + while (dirp[index].caller_ra != caller_ra) { + if (index == 0) { + return lstat_make_dir_entry(lock_ptr, caller_ra); + } + index = dirp[index].next_stat_index; + } + + if (dirp[index].lock_ptr != NULL && dirp[index].lock_ptr != lock_ptr) { + dirp[index].lock_ptr = NULL; + } + + return index; +} + +/* + * lstat_make_dir_entry + * Called to add a new lock to the lock directory. + */ +static ushort +lstat_make_dir_entry(void *lock_ptr, void *caller_ra) +{ + lstat_directory_entry_t *dirp; + ushort index, hindex; + unsigned long flags; + + /* lock the table without recursively reentering this metering code */ + local_irq_save(flags); + _raw_spin_lock(&lstat_control.directory_lock); + + hindex = DIRHASH(caller_ra); + index = lstat_control.hashtab[hindex]; + dirp = lstat_control.dir; + while (index && dirp[index].caller_ra != caller_ra) + index = dirp[index].next_stat_index; + + if (index == 0) { + if (lstat_control.next_free_dir_index < LSTAT_MAX_STAT_INDEX) { + index = lstat_control.next_free_dir_index++; + lstat_control.dir[index].caller_ra = caller_ra; + lstat_control.dir[index].lock_ptr = lock_ptr; + lstat_control.dir[index].next_stat_index = + lstat_control.hashtab[hindex]; + lstat_control.hashtab[hindex] = index; + } else { + lstat_control.dir_overflow++; + } + } + _raw_spin_unlock(&lstat_control.directory_lock); + local_irq_restore(flags); + return index; +} + +int +lstat_update(void *lock_ptr, void *caller_ra, int action) +{ + int index; + int cpu; + + ASSERT(action < LSTAT_ACT_MAX_VALUES); + + if (lstat_control.state == LSTAT_OFF) + return 0; + + index = lstat_lookup(lock_ptr, caller_ra); + cpu = THIS_CPU_NUMBER; + (*lstat_control.counts[cpu])[index].count[action]++; + (*lstat_control.counts[cpu])[index].acquire_time = get_cycles(); + + return index; +} + +int +lstat_update_time(void *lock_ptr, void *caller_ra, int action, uint32_t ticks) +{ + ushort index; + int cpu; + + ASSERT(action < LSTAT_ACT_MAX_VALUES); + + if (lstat_control.state == LSTAT_OFF) + return 0; + + index = lstat_lookup(lock_ptr, caller_ra); + cpu = THIS_CPU_NUMBER; + (*lstat_control.counts[cpu])[index].count[action]++; + (*lstat_control.counts[cpu])[index].cum_wait_ticks += (uint64_t) ticks; + if ((*lstat_control.counts[cpu])[index].max_wait_ticks < ticks) + (*lstat_control.counts[cpu])[index].max_wait_ticks = ticks; + + (*lstat_control.counts[cpu])[index].acquire_time = get_cycles(); + + return index; +} + +void +_metered_spin_lock(spinlock_t * lock_ptr) +{ + if (lstat_control.state == LSTAT_OFF) { + _raw_spin_lock(lock_ptr); /* do the real lock */ + PUT_INDEX(lock_ptr, 0); /* clean index in case lockmetering */ + /* gets turned on before unlock */ + } else { + void *this_pc = LSTAT_RA(LSTAT_RA_SPIN); + int index; + + if (_raw_spin_trylock(lock_ptr)) { + index = lstat_update(lock_ptr, this_pc, + LSTAT_ACT_NO_WAIT); + } else { + uint32_t start_cycles = get_cycles(); + _raw_spin_lock(lock_ptr); /* do the real lock */ + index = lstat_update_time(lock_ptr, this_pc, + LSTAT_ACT_SPIN, get_cycles() - start_cycles); + } + /* save the index in the lock itself for use in spin unlock */ + PUT_INDEX(lock_ptr, index); + } +} + +int +_metered_spin_trylock(spinlock_t * lock_ptr) +{ + if (lstat_control.state == LSTAT_OFF) { + return _raw_spin_trylock(lock_ptr); + } else { + int retval; + void *this_pc = LSTAT_RA(LSTAT_RA_SPIN); + + if ((retval = _raw_spin_trylock(lock_ptr))) { + int index = lstat_update(lock_ptr, this_pc, + LSTAT_ACT_NO_WAIT); + /* + * save the index in the lock itself for use in spin + * unlock + */ + PUT_INDEX(lock_ptr, index); + } else { + lstat_update(lock_ptr, this_pc, LSTAT_ACT_REJECT); + } + + return retval; + } +} + +void +_metered_spin_unlock(spinlock_t * lock_ptr) +{ + int index = -1; + + if (lstat_control.state != LSTAT_OFF) { + index = GET_INDEX(lock_ptr); + /* + * If statistics were turned off when we set the lock, + * then the index can be zero. If that is the case, + * then collect no stats on this call. + */ + if (index > 0) { + uint32_t hold_time; + int cpu = THIS_CPU_NUMBER; + hold_time = get_cycles() - + (*lstat_control.counts[cpu])[index].acquire_time; + (*lstat_control.counts[cpu])[index].cum_hold_ticks += + (uint64_t) hold_time; + if ((*lstat_control.counts[cpu])[index].max_hold_ticks < + hold_time) + (*lstat_control.counts[cpu])[index]. + max_hold_ticks = hold_time; + } + } + + /* make sure we don't have a stale index value saved */ + PUT_INDEX(lock_ptr, 0); + _raw_spin_unlock(lock_ptr); /* do the real unlock */ +} + +/* + * allocate the next global read lock structure and store its index + * in the rwlock at "lock_ptr". + */ +uint32_t +alloc_rwlock_struct(rwlock_t * rwlock_ptr) +{ + int index; + unsigned long flags; + int cpu = THIS_CPU_NUMBER; + + /* If we've already overflowed, then do a quick exit */ + if (lstat_control.next_free_read_lock_index > + LSTAT_MAX_READ_LOCK_INDEX) { + lstat_control.rwlock_overflow++; + return 0; + } + + local_irq_save(flags); + _raw_spin_lock(&lstat_control.directory_lock); + + /* It is possible this changed while we were waiting for the directory_lock */ + if (lstat_control.state == LSTAT_OFF) { + index = 0; + goto unlock; + } + + /* It is possible someone else got here first and set the index */ + if ((index = GET_RWINDEX(rwlock_ptr)) == 0) { + /* + * we can't turn on read stats for this lock while there are + * readers (this would mess up the running hold time sum at + * unlock time) + */ + if (RWLOCK_READERS(rwlock_ptr) != 0) { + index = 0; + goto unlock; + } + + /* + * if stats are turned on after being off, we may need to + * return an old index from when the statistics were on last + * time. + */ + for (index = 1; index < lstat_control.next_free_read_lock_index; + index++) + if ((*lstat_control.read_lock_counts[cpu])[index]. + lock_ptr == rwlock_ptr) + goto put_index_and_unlock; + + /* allocate the next global read lock structure */ + if (lstat_control.next_free_read_lock_index >= + LSTAT_MAX_READ_LOCK_INDEX) { + lstat_control.rwlock_overflow++; + index = 0; + goto unlock; + } + index = lstat_control.next_free_read_lock_index++; + + /* + * initialize the global read stats data structure for each + * cpu + */ + for (cpu = 0; cpu < num_online_cpus(); cpu++) { + (*lstat_control.read_lock_counts[cpu])[index].lock_ptr = + rwlock_ptr; + } +put_index_and_unlock: + /* store the index for the read lock structure into the lock */ + PUT_RWINDEX(rwlock_ptr, index); + } + +unlock: + _raw_spin_unlock(&lstat_control.directory_lock); + local_irq_restore(flags); + return index; +} + +void +_metered_read_lock(rwlock_t * rwlock_ptr) +{ + void *this_pc; + uint32_t start_cycles; + int index; + int cpu; + unsigned long flags; + int readers_before, readers_after; + uint64_t cycles64; + + if (lstat_control.state == LSTAT_OFF) { + _raw_read_lock(rwlock_ptr); + /* clean index in case lockmetering turns on before an unlock */ + PUT_RWINDEX(rwlock_ptr, 0); + return; + } + + this_pc = LSTAT_RA(LSTAT_RA_READ); + cpu = THIS_CPU_NUMBER; + index = GET_RWINDEX(rwlock_ptr); + + /* allocate the global stats entry for this lock, if needed */ + if (index == 0) + index = alloc_rwlock_struct(rwlock_ptr); + + readers_before = RWLOCK_READERS(rwlock_ptr); + if (_raw_read_trylock(rwlock_ptr)) { + /* + * We have decremented the lock to count a new reader, + * and have confirmed that no writer has it locked. + */ + /* update statistics if enabled */ + if (index > 0) { + local_irq_save(flags); + lstat_update((void *) rwlock_ptr, this_pc, + LSTAT_ACT_NO_WAIT); + /* preserve value of TSC so cum_hold_ticks and start_busy use same value */ + cycles64 = get_cycles64(); + (*lstat_control.read_lock_counts[cpu])[index]. + cum_hold_ticks -= cycles64; + + /* record time and cpu of start of busy period */ + /* this is not perfect (some race conditions are possible) */ + if (readers_before == 0) { + (*lstat_control.read_lock_counts[cpu])[index]. + start_busy = cycles64; + PUT_RW_CPU(rwlock_ptr, cpu); + } + readers_after = RWLOCK_READERS(rwlock_ptr); + if (readers_after > + (*lstat_control.read_lock_counts[cpu])[index]. + max_readers) + (*lstat_control.read_lock_counts[cpu])[index]. + max_readers = readers_after; + local_irq_restore(flags); + } + + return; + } + /* If we get here, then we could not quickly grab the read lock */ + + start_cycles = get_cycles(); /* start counting the wait time */ + + /* Now spin until read_lock is successful */ + _raw_read_lock(rwlock_ptr); + + lstat_update_time((void *) rwlock_ptr, this_pc, LSTAT_ACT_SPIN, + get_cycles() - start_cycles); + + /* update statistics if they are enabled for this lock */ + if (index > 0) { + local_irq_save(flags); + cycles64 = get_cycles64(); + (*lstat_control.read_lock_counts[cpu])[index].cum_hold_ticks -= + cycles64; + + /* this is not perfect (some race conditions are possible) */ + if (readers_before == 0) { + (*lstat_control.read_lock_counts[cpu])[index]. + start_busy = cycles64; + PUT_RW_CPU(rwlock_ptr, cpu); + } + readers_after = RWLOCK_READERS(rwlock_ptr); + if (readers_after > + (*lstat_control.read_lock_counts[cpu])[index].max_readers) + (*lstat_control.read_lock_counts[cpu])[index]. + max_readers = readers_after; + local_irq_restore(flags); + } +} + +void +_metered_read_unlock(rwlock_t * rwlock_ptr) +{ + int index; + int cpu; + unsigned long flags; + uint64_t busy_length; + uint64_t cycles64; + + if (lstat_control.state == LSTAT_OFF) { + _raw_read_unlock(rwlock_ptr); + return; + } + + index = GET_RWINDEX(rwlock_ptr); + cpu = THIS_CPU_NUMBER; + + if (index > 0) { + local_irq_save(flags); + /* + * preserve value of TSC so cum_hold_ticks and busy_ticks are + * consistent. + */ + cycles64 = get_cycles64(); + (*lstat_control.read_lock_counts[cpu])[index].cum_hold_ticks += + cycles64; + (*lstat_control.read_lock_counts[cpu])[index].read_lock_count++; + + /* + * once again, this is not perfect (some race conditions are + * possible) + */ + if (RWLOCK_READERS(rwlock_ptr) == 1) { + int cpu1 = GET_RW_CPU(rwlock_ptr); + uint64_t last_start_busy = + (*lstat_control.read_lock_counts[cpu1])[index]. + start_busy; + (*lstat_control.read_lock_counts[cpu])[index]. + busy_periods++; + if (cycles64 > last_start_busy) { + busy_length = cycles64 - last_start_busy; + (*lstat_control.read_lock_counts[cpu])[index]. + busy_ticks += busy_length; + if (busy_length > + (*lstat_control. + read_lock_counts[cpu])[index]. + max_busy) + (*lstat_control. + read_lock_counts[cpu])[index]. + max_busy = busy_length; + } + } + local_irq_restore(flags); + } + _raw_read_unlock(rwlock_ptr); +} + +void +_metered_write_lock(rwlock_t * rwlock_ptr) +{ + uint32_t start_cycles; + void *this_pc; + uint32_t spin_ticks = 0; /* in anticipation of a potential wait */ + int index; + int write_index = 0; + int cpu; + enum { + writer_writer_conflict, + writer_reader_conflict + } why_wait = writer_writer_conflict; + + if (lstat_control.state == LSTAT_OFF) { + _raw_write_lock(rwlock_ptr); + /* clean index in case lockmetering turns on before an unlock */ + PUT_RWINDEX(rwlock_ptr, 0); + return; + } + + this_pc = LSTAT_RA(LSTAT_RA_WRITE); + cpu = THIS_CPU_NUMBER; + index = GET_RWINDEX(rwlock_ptr); + + /* allocate the global stats entry for this lock, if needed */ + if (index == 0) { + index = alloc_rwlock_struct(rwlock_ptr); + } + + if (_raw_write_trylock(rwlock_ptr)) { + /* We acquired the lock on the first try */ + write_index = lstat_update((void *) rwlock_ptr, this_pc, + LSTAT_ACT_NO_WAIT); + /* save the write_index for use in unlock if stats enabled */ + if (index > 0) + (*lstat_control.read_lock_counts[cpu])[index]. + write_index = write_index; + return; + } + + /* If we get here, then we could not quickly grab the write lock */ + start_cycles = get_cycles(); /* start counting the wait time */ + + why_wait = RWLOCK_READERS(rwlock_ptr) ? + writer_reader_conflict : writer_writer_conflict; + + /* Now set the lock and wait for conflicts to disappear */ + _raw_write_lock(rwlock_ptr); + + spin_ticks = get_cycles() - start_cycles; + + /* update stats -- if enabled */ + if (index > 0 && spin_ticks) { + if (why_wait == writer_reader_conflict) { + /* waited due to a reader holding the lock */ + write_index = lstat_update_time((void *)rwlock_ptr, + this_pc, LSTAT_ACT_SPIN, spin_ticks); + } else { + /* + * waited due to another writer holding the lock + */ + write_index = lstat_update_time((void *)rwlock_ptr, + this_pc, LSTAT_ACT_WW_SPIN, spin_ticks); + (*lstat_control.counts[cpu])[write_index]. + cum_wait_ww_ticks += spin_ticks; + if (spin_ticks > + (*lstat_control.counts[cpu])[write_index]. + max_wait_ww_ticks) { + (*lstat_control.counts[cpu])[write_index]. + max_wait_ww_ticks = spin_ticks; + } + } + + /* save the directory index for use on write_unlock */ + (*lstat_control.read_lock_counts[cpu])[index]. + write_index = write_index; + } +} + +void +_metered_write_unlock(rwlock_t * rwlock_ptr) +{ + int index; + int cpu; + int write_index; + uint32_t hold_time; + + if (lstat_control.state == LSTAT_OFF) { + _raw_write_unlock(rwlock_ptr); + return; + } + + cpu = THIS_CPU_NUMBER; + index = GET_RWINDEX(rwlock_ptr); + + /* update statistics if stats enabled for this lock */ + if (index > 0) { + write_index = + (*lstat_control.read_lock_counts[cpu])[index].write_index; + + hold_time = get_cycles() - + (*lstat_control.counts[cpu])[write_index].acquire_time; + (*lstat_control.counts[cpu])[write_index].cum_hold_ticks += + (uint64_t) hold_time; + if ((*lstat_control.counts[cpu])[write_index].max_hold_ticks < + hold_time) + (*lstat_control.counts[cpu])[write_index]. + max_hold_ticks = hold_time; + } + _raw_write_unlock(rwlock_ptr); +} + +int +_metered_write_trylock(rwlock_t * rwlock_ptr) +{ + int retval; + void *this_pc = LSTAT_RA(LSTAT_RA_WRITE); + + if ((retval = _raw_write_trylock(rwlock_ptr))) { + lstat_update(rwlock_ptr, this_pc, LSTAT_ACT_NO_WAIT); + } else { + lstat_update(rwlock_ptr, this_pc, LSTAT_ACT_REJECT); + } + + return retval; +} + +static void +init_control_space(void) +{ + /* Set all control space pointers to null and indices to "empty" */ + int cpu; + + /* + * Access CPU_CYCLE_FREQUENCY at the outset, which in some + * architectures may trigger a runtime calculation that uses a + * spinlock. Let's do this before lockmetering is turned on. + */ + if (CPU_CYCLE_FREQUENCY == 0) + BUG(); + + lstat_control.hashtab = NULL; + lstat_control.dir = NULL; + for (cpu = 0; cpu < NR_CPUS; cpu++) { + lstat_control.counts[cpu] = NULL; + lstat_control.read_lock_counts[cpu] = NULL; + } +} + +static int +reset_lstat_data(void) +{ + int cpu, flags; + + flags = 0; + lstat_control.next_free_dir_index = 1; /* 0 is for overflows */ + lstat_control.next_free_read_lock_index = 1; + lstat_control.dir_overflow = 0; + lstat_control.rwlock_overflow = 0; + + lstat_control.started_cycles64 = 0; + lstat_control.ending_cycles64 = 0; + lstat_control.enabled_cycles64 = 0; + lstat_control.first_started_time = 0; + lstat_control.started_time = 0; + lstat_control.ending_time = 0; + lstat_control.intervals = 0; + + /* + * paranoia -- in case someone does a "lockstat reset" before + * "lockstat on" + */ + if (lstat_control.hashtab) { + bzero(lstat_control.hashtab, + LSTAT_HASH_TABLE_SIZE * sizeof (short)); + bzero(lstat_control.dir, LSTAT_MAX_STAT_INDEX * + sizeof (lstat_directory_entry_t)); + + for (cpu = 0; cpu < num_online_cpus(); cpu++) { + bzero(lstat_control.counts[cpu], + sizeof (lstat_cpu_counts_t)); + bzero(lstat_control.read_lock_counts[cpu], + sizeof (lstat_read_lock_cpu_counts_t)); + } + } +#ifdef NOTDEF + _raw_spin_unlock(&lstat_control.directory_lock); + local_irq_restore(flags); +#endif + return 1; +} + +static void +release_control_space(void) +{ + /* + * Called when either (1) allocation of kmem + * or (2) when user writes LSTAT_RELEASE to /pro/lockmeter. + * Assume that all pointers have been initialized to zero, + * i.e., nonzero pointers are valid addresses. + */ + int cpu; + + if (lstat_control.hashtab) { + kfree(lstat_control.hashtab); + lstat_control.hashtab = NULL; + } + + if (lstat_control.dir) { + vfree(lstat_control.dir); + lstat_control.dir = NULL; + } + + for (cpu = 0; cpu < NR_CPUS; cpu++) { + if (lstat_control.counts[cpu]) { + vfree(lstat_control.counts[cpu]); + lstat_control.counts[cpu] = NULL; + } + if (lstat_control.read_lock_counts[cpu]) { + kfree(lstat_control.read_lock_counts[cpu]); + lstat_control.read_lock_counts[cpu] = NULL; + } + } +} + +int +get_lockmeter_info_size(void) +{ + return sizeof (lstat_user_request_t) + + num_online_cpus() * sizeof (lstat_cpu_counts_t) + + num_online_cpus() * sizeof (lstat_read_lock_cpu_counts_t) + + (LSTAT_MAX_STAT_INDEX * sizeof (lstat_directory_entry_t)); +} + +ssize_t +get_lockmeter_info(char *buffer, size_t max_len, loff_t * last_index) +{ + lstat_user_request_t req; + struct timeval tv; + ssize_t next_ret_bcount; + ssize_t actual_ret_bcount = 0; + int cpu; + + *last_index = 0; /* a one-shot read */ + + req.lstat_version = LSTAT_VERSION; + req.state = lstat_control.state; + req.maxcpus = num_online_cpus(); + req.cycleval = CPU_CYCLE_FREQUENCY; +#ifdef notyet + req.kernel_magic_addr = (void *) &_etext; + req.kernel_end_addr = (void *) &_etext; +#endif + req.uts = system_utsname; + req.intervals = lstat_control.intervals; + + req.first_started_time = lstat_control.first_started_time; + req.started_time = lstat_control.started_time; + req.started_cycles64 = lstat_control.started_cycles64; + + req.next_free_dir_index = lstat_control.next_free_dir_index; + req.next_free_read_lock_index = lstat_control.next_free_read_lock_index; + req.dir_overflow = lstat_control.dir_overflow; + req.rwlock_overflow = lstat_control.rwlock_overflow; + + if (lstat_control.state == LSTAT_OFF) { + if (req.intervals == 0) { + /* mesasurement is off and no valid data present */ + next_ret_bcount = sizeof (lstat_user_request_t); + req.enabled_cycles64 = 0; + + if ((actual_ret_bcount + next_ret_bcount) > max_len) + return actual_ret_bcount; + + copy_to_user(buffer, (void *) &req, next_ret_bcount); + actual_ret_bcount += next_ret_bcount; + return actual_ret_bcount; + } else { + /* + * measurement is off but valid data present + * fetch time info from lstat_control + */ + req.ending_time = lstat_control.ending_time; + req.ending_cycles64 = lstat_control.ending_cycles64; + req.enabled_cycles64 = lstat_control.enabled_cycles64; + } + } else { + /* + * this must be a read while data active--use current time, + * etc + */ + do_gettimeofday(&tv); + req.ending_time = tv.tv_sec; + req.ending_cycles64 = get_cycles64(); + req.enabled_cycles64 = req.ending_cycles64 - + req.started_cycles64 + lstat_control.enabled_cycles64; + } + + next_ret_bcount = sizeof (lstat_user_request_t); + if ((actual_ret_bcount + next_ret_bcount) > max_len) + return actual_ret_bcount; + + copy_to_user(buffer, (void *) &req, next_ret_bcount); + actual_ret_bcount += next_ret_bcount; + + if (!lstat_control.counts[0]) /* not initialized? */ + return actual_ret_bcount; + + next_ret_bcount = sizeof (lstat_cpu_counts_t); + for (cpu = 0; cpu < num_online_cpus(); cpu++) { + if ((actual_ret_bcount + next_ret_bcount) > max_len) + return actual_ret_bcount; /* leave early */ + copy_to_user(buffer + actual_ret_bcount, + lstat_control.counts[cpu], next_ret_bcount); + actual_ret_bcount += next_ret_bcount; + } + + next_ret_bcount = LSTAT_MAX_STAT_INDEX * + sizeof (lstat_directory_entry_t); + if (((actual_ret_bcount + next_ret_bcount) > max_len) + || !lstat_control.dir) + return actual_ret_bcount; /* leave early */ + + copy_to_user(buffer + actual_ret_bcount, lstat_control.dir, + next_ret_bcount); + actual_ret_bcount += next_ret_bcount; + + next_ret_bcount = sizeof (lstat_read_lock_cpu_counts_t); + for (cpu = 0; cpu < num_online_cpus(); cpu++) { + if (actual_ret_bcount + next_ret_bcount > max_len) + return actual_ret_bcount; + copy_to_user(buffer + actual_ret_bcount, + lstat_control.read_lock_counts[cpu], + next_ret_bcount); + actual_ret_bcount += next_ret_bcount; + } + + return actual_ret_bcount; +} + +/* + * Writing to the /proc lockmeter node enables or disables metering. + * based upon the first byte of the "written" data. + * The following values are defined: + * LSTAT_ON: 1st call: allocates storage, intializes and turns on measurement + * subsequent calls just turn on measurement + * LSTAT_OFF: turns off measurement + * LSTAT_RESET: resets statistics + * LSTAT_RELEASE: releases statistics storage + * + * This allows one to accumulate statistics over several lockstat runs: + * + * lockstat on + * lockstat off + * ...repeat above as desired... + * lockstat get + * ...now start a new set of measurements... + * lockstat reset + * lockstat on + * ... + * + */ +ssize_t +put_lockmeter_info(const char *buffer, size_t len) +{ + int error = 0; + int dirsize, countsize, read_lock_countsize, hashsize; + int cpu; + char put_char; + int i, read_lock_blocks; + unsigned long flags; + rwlock_t *lock_ptr; + struct timeval tv; + + if (len <= 0) + return -EINVAL; + + _raw_spin_lock(&lstat_control.control_lock); + + get_user(put_char, buffer); + switch (put_char) { + + case LSTAT_OFF: + if (lstat_control.state != LSTAT_OFF) { + /* + * To avoid seeing read lock hold times in an + * inconsisent state, we have to follow this protocol + * to turn off statistics + */ + local_irq_save(flags); + /* + * getting this lock will stop any read lock block + * allocations + */ + _raw_spin_lock(&lstat_control.directory_lock); + /* + * keep any more read lock blocks from being + * allocated + */ + lstat_control.state = LSTAT_OFF; + /* record how may read lock blocks there are */ + read_lock_blocks = + lstat_control.next_free_read_lock_index; + _raw_spin_unlock(&lstat_control.directory_lock); + /* now go through the list of read locks */ + cpu = THIS_CPU_NUMBER; + for (i = 1; i < read_lock_blocks; i++) { + lock_ptr = + (*lstat_control.read_lock_counts[cpu])[i]. + lock_ptr; + /* is this saved lock address still valid? */ + if (GET_RWINDEX(lock_ptr) == i) { + /* + * lock address appears to still be + * valid because we only hold one lock + * at a time, this can't cause a + * deadlock unless this is a lock held + * as part of the current system call + * path. At the moment there + * are no READ mode locks held to get + * here from user space, so we solve + * this by skipping locks held in + * write mode. + */ + if (RWLOCK_IS_WRITE_LOCKED(lock_ptr)) { + PUT_RWINDEX(lock_ptr, 0); + continue; + } + /* + * now we know there are no read + * holders of this lock! stop + * statistics collection for this + * lock + */ + _raw_write_lock(lock_ptr); + PUT_RWINDEX(lock_ptr, 0); + _raw_write_unlock(lock_ptr); + } + /* + * it may still be possible for the hold time + * sum to be negative e.g. if a lock is + * reallocated while "busy" we will have to fix + * this up in the data reduction program. + */ + } + local_irq_restore(flags); + lstat_control.intervals++; + lstat_control.ending_cycles64 = get_cycles64(); + lstat_control.enabled_cycles64 += + lstat_control.ending_cycles64 - + lstat_control.started_cycles64; + do_gettimeofday(&tv); + lstat_control.ending_time = tv.tv_sec; + /* + * don't deallocate the structures -- we may do a + * lockstat on to add to the data that is already + * there. Use LSTAT_RELEASE to release storage + */ + } else { + error = -EBUSY; /* already OFF */ + } + break; + + case LSTAT_ON: + if (lstat_control.state == LSTAT_OFF) { +#ifdef DEBUG_LOCKMETER + printk("put_lockmeter_info(cpu=%d): LSTAT_ON\n", + THIS_CPU_NUMBER); +#endif + lstat_control.next_free_dir_index = 1; /* 0 is for overflows */ + + dirsize = LSTAT_MAX_STAT_INDEX * + sizeof (lstat_directory_entry_t); + hashsize = + (1 + LSTAT_HASH_TABLE_SIZE) * sizeof (ushort); + countsize = sizeof (lstat_cpu_counts_t); + read_lock_countsize = + sizeof (lstat_read_lock_cpu_counts_t); +#ifdef DEBUG_LOCKMETER + printk(" dirsize:%d", dirsize); + printk(" hashsize:%d", hashsize); + printk(" countsize:%d", countsize); + printk(" read_lock_countsize:%d\n", + read_lock_countsize); +#endif +#ifdef DEBUG_LOCKMETER + { + int secs; + unsigned long cycles; + uint64_t cycles64; + + do_gettimeofday(&tv); + secs = tv.tv_sec; + do { + do_gettimeofday(&tv); + } while (secs == tv.tv_sec); + cycles = get_cycles(); + cycles64 = get_cycles64(); + secs = tv.tv_sec; + do { + do_gettimeofday(&tv); + } while (secs == tv.tv_sec); + cycles = get_cycles() - cycles; + cycles64 = get_cycles64() - cycles; + printk("lockmeter: cycleFrequency:%d " + "cycles:%d cycles64:%d\n", + CPU_CYCLE_FREQUENCY, cycles, cycles64); + } +#endif + + /* + * if this is the first call, allocate storage and + * initialize + */ + if (!lstat_control.hashtab) { + + spin_lock_init(&lstat_control.directory_lock); + + /* guarantee all pointers at zero */ + init_control_space(); + + lstat_control.hashtab = + kmalloc(hashsize, GFP_KERNEL); + if (!lstat_control.hashtab) { + error = -ENOSPC; +#ifdef DEBUG_LOCKMETER + printk("!!error kmalloc of hashtab\n"); +#endif + } + lstat_control.dir = vmalloc(dirsize); + if (!lstat_control.dir) { + error = -ENOSPC; +#ifdef DEBUG_LOCKMETER + printk("!!error kmalloc of dir\n"); +#endif + } + + for (cpu = 0; cpu < num_online_cpus(); cpu++) { + lstat_control.counts[cpu] = + vmalloc(countsize); + if (!lstat_control.counts[cpu]) { + error = -ENOSPC; +#ifdef DEBUG_LOCKMETER + printk("!!error vmalloc of " + "counts[%d]\n", cpu); +#endif + } + lstat_control.read_lock_counts[cpu] = + (lstat_read_lock_cpu_counts_t *) + kmalloc(read_lock_countsize, + GFP_KERNEL); + if (!lstat_control. + read_lock_counts[cpu]) { + error = -ENOSPC; +#ifdef DEBUG_LOCKMETER + printk("!!error kmalloc of " + "read_lock_counts[%d]\n", + cpu); +#endif + } + } + } + + if (error) { + /* + * One or more kmalloc failures -- free + * everything + */ + release_control_space(); + } else { + + if (!reset_lstat_data()) { + error = -EINVAL; + break; + }; + + /* + * record starting and ending times and the + * like + */ + if (lstat_control.intervals == 0) { + do_gettimeofday(&tv); + lstat_control.first_started_time = + tv.tv_sec; + } + lstat_control.started_cycles64 = get_cycles64(); + do_gettimeofday(&tv); + lstat_control.started_time = tv.tv_sec; + + lstat_control.state = LSTAT_ON; + } + } else { + error = -EBUSY; /* already ON */ + } + break; + + case LSTAT_RESET: + if (lstat_control.state == LSTAT_OFF) { + if (!reset_lstat_data()) + error = -EINVAL; + } else { + error = -EBUSY; /* still on; can't reset */ + } + break; + + case LSTAT_RELEASE: + if (lstat_control.state == LSTAT_OFF) { + release_control_space(); + lstat_control.intervals = 0; + lstat_control.enabled_cycles64 = 0; + } else { + error = -EBUSY; + } + break; + + default: + error = -EINVAL; + } /* switch */ + + _raw_spin_unlock(&lstat_control.control_lock); + return error ? error : len; +} + +#ifdef USER_MODE_TESTING +/* following used for user mode testing */ +void +lockmeter_init() +{ + int dirsize, hashsize, countsize, read_lock_countsize, cpu; + + printf("lstat_control is at %x size=%d\n", &lstat_control, + sizeof (lstat_control)); + printf("sizeof(spinlock_t)=%d\n", sizeof (spinlock_t)); + lstat_control.state = LSTAT_ON; + + lstat_control.directory_lock = SPIN_LOCK_UNLOCKED; + lstat_control.next_free_dir_index = 1; /* 0 is for overflows */ + lstat_control.next_free_read_lock_index = 1; + + dirsize = LSTAT_MAX_STAT_INDEX * sizeof (lstat_directory_entry_t); + hashsize = (1 + LSTAT_HASH_TABLE_SIZE) * sizeof (ushort); + countsize = sizeof (lstat_cpu_counts_t); + read_lock_countsize = sizeof (lstat_read_lock_cpu_counts_t); + + lstat_control.hashtab = (ushort *) malloc(hashsize); + + if (lstat_control.hashtab == 0) { + printf("malloc failure for at line %d in lockmeter.c\n", + __LINE__); + exit(0); + } + + lstat_control.dir = (lstat_directory_entry_t *) malloc(dirsize); + + if (lstat_control.dir == 0) { + printf("malloc failure for at line %d in lockmeter.c\n", cpu, + __LINE__); + exit(0); + } + + for (cpu = 0; cpu < num_online_cpus(); cpu++) { + int j, k; + j = (int) (lstat_control.counts[cpu] = + (lstat_cpu_counts_t *) malloc(countsize)); + k = (int) (lstat_control.read_lock_counts[cpu] = + (lstat_read_lock_cpu_counts_t *) + malloc(read_lock_countsize)); + if (j * k == 0) { + printf("malloc failure for cpu=%d at line %d in " + "lockmeter.c\n", cpu, __LINE__); + exit(0); + } + } + + memset(lstat_control.hashtab, 0, hashsize); + memset(lstat_control.dir, 0, dirsize); + + for (cpu = 0; cpu < num_online_cpus(); cpu++) { + memset(lstat_control.counts[cpu], 0, countsize); + memset(lstat_control.read_lock_counts[cpu], 0, + read_lock_countsize); + } +} + +asm(" \ +.align 4 \ +.globl __write_lock_failed \ +__write_lock_failed: \ + " LOCK "addl $" RW_LOCK_BIAS_STR ",(%eax) \ +1: cmpl $" RW_LOCK_BIAS_STR ",(%eax) \ + jne 1b \ +\ + " LOCK "subl $" RW_LOCK_BIAS_STR ",(%eax) \ + jnz __write_lock_failed \ + ret \ +\ +\ +.align 4 \ +.globl __read_lock_failed \ +__read_lock_failed: \ + lock ; incl (%eax) \ +1: cmpl $1,(%eax) \ + js 1b \ +\ + lock ; decl (%eax) \ + js __read_lock_failed \ + ret \ +"); +#endif + +EXPORT_SYMBOL(_metered_spin_lock); +EXPORT_SYMBOL(_metered_spin_unlock); +EXPORT_SYMBOL(_metered_spin_trylock); +EXPORT_SYMBOL(_metered_read_lock); +EXPORT_SYMBOL(_metered_read_unlock); +EXPORT_SYMBOL(_metered_write_lock); +EXPORT_SYMBOL(_metered_write_unlock); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/kernel/mcount.c 999-mjb/kernel/mcount.c --- 000-virgin/kernel/mcount.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/kernel/mcount.c 2003-11-24 16:35:58.000000000 -0800 @@ -0,0 +1,203 @@ +/* + * kernel/mcount.c + * + * Implementation of kernel mcount handler and supporting functions. + * + * Code based on kernprof http://oss.sgi.com/projects/kernprof/ + * Copyright (C) SGI 1999, 2000, 2001 + * Written by Dimitris Michailidis (dimitris@engr.sgi.com) + * Modified by John Hawkes (hawkes@engr.sgi.com) + * Contributions from Niels Christiansen (nchr@us.ibm.com) + * Adapted for stand-alone call graphing by Adam Litke (agl@us.ibm.com) + */ + +#include +#include +#include +#include +#include +#include + +void UNKNOWN_KERNEL(void) {} /* Dummy functions to make profiles more */ +void UNKNOWN_MODULE(void) {} /* descriptive */ + +unsigned int mcount_shift, PC_resolution = DFL_PC_RES; + +char* memory_start = NULL; +unsigned short *cg_from_base = NULL; +struct cg_arc_dest *cg_to_base = NULL; +int cg_arc_overflow = 0; /* set when no new arcs can be added to the call graph */ +int n_buckets = 0; +size_t mem_needed; /* space needed for the call graph and the PC samples */ +extern char _stext, _etext, _sinittext, _einittext; + +void (*mcount_hook)(unsigned long, unsigned long) = NULL; +struct proc_dir_entry *mcount_pde; + +static int mcount_alloc_mem(void) +{ + unsigned long cg_from_size, cg_to_size; + size_t text_size = (unsigned long) &_etext - (unsigned long) &_stext; + struct prof_mem_map *memory_map; + + for (mcount_shift = 0; (1 << mcount_shift) < PC_resolution; mcount_shift++); + n_buckets = text_size >> mcount_shift; + cg_from_size = n_buckets * sizeof(short); + cg_to_size = CG_MAX_ARCS * sizeof(struct cg_arc_dest); + mem_needed = sizeof(struct prof_mem_map) + + ((cg_from_size + cg_to_size) * num_online_cpus()); + if ((memory_start = vmalloc(mem_needed)) == NULL) { + return -ENOMEM; + } + memset(memory_start, 0, mem_needed); + + cg_from_base = (unsigned short *) (memory_start + sizeof(struct prof_mem_map)); + cg_to_base = (struct cg_arc_dest *) (memory_start + sizeof(struct prof_mem_map) + + (cg_from_size * num_online_cpus())); + + memory_map = (struct prof_mem_map*) memory_start; + memory_map->kernel_buckets = n_buckets; + memory_map->nr_cpus = num_online_cpus(); + memory_map->cg_from_size = cg_from_size; + memory_map->cg_to_size = cg_to_size; + memory_map->cg_to_offset = cg_from_size * num_online_cpus(); + memory_map->kernel_start = (unsigned long)&_stext; + memory_map->kernel_end = (unsigned long)&_etext; + return 0; +} + +static void mcount_free_mem(void) +{ + vfree(memory_start); + memory_start = NULL; +} + +void mcount_entry(void) +{ + unsigned long frompc, selfpc; + + if(mcount_hook) { + frompc = (unsigned long)__builtin_return_address(2); + selfpc = (unsigned long)__builtin_return_address(1); + mcount_hook(frompc, selfpc); + } + return; +} + +/* Record an arc traversal in the call graph. Called by mcount(). SMP safe */ +void cg_record_arc(unsigned long frompc, unsigned long selfpc) +{ + static spinlock_t cg_record_lock = SPIN_LOCK_UNLOCKED; + unsigned long flags; + int toindex, fromindex, cpu; + unsigned short *q, *cg_from; + struct cg_arc_dest *p, *cg_to; + + cpu = smp_processor_id(); + + cg_from = &cg_from_base[n_buckets * cpu]; + cg_to = &cg_to_base[CG_MAX_ARCS * cpu]; + + if (pc_out_of_range(frompc)) + fromindex = (FUNCTIONPC(UNKNOWN_KERNEL) - (unsigned long) &_stext) + >> mcount_shift; + else + fromindex = (frompc - (unsigned long) &_stext) >> mcount_shift; + q = &cg_from[fromindex]; + + /* Easy case: the arc is already in the call graph */ + for (toindex = *q; toindex != 0; ) { + p = &cg_to[toindex]; + if (p->address == selfpc) { + atomic_inc(&p->count); + return; + } + toindex = p->link; + } + /* + * No luck. We need to add a new arc. Since cg_to[0] is unused, + * we use cg_to[0].count to keep track of the next available arc. + */ + if (cg_arc_overflow) { + return; + } + toindex = atomic_add_return(1, &cg_to->count); + if (toindex >= CG_MAX_ARCS) { + /* + * We have run out of space for arcs. We'll keep incrementing + * the existing ones but we won't try to add any more. + */ + cg_arc_overflow = 1; + atomic_set(&cg_to->count, CG_MAX_ARCS - 1); + return; + } + /* + * We have a secured slot for a new arc and all we need to do is + * initialize it and add it to a hash bucket. We use compare&swap, if + * possible, to avoid any spinlocks whatsoever. + */ + p = &cg_to[toindex]; + p->address = selfpc; + atomic_set(&p->count, 1); + + spin_lock_irqsave(&cg_record_lock, flags); + p->link = *q; + *q = toindex; + spin_unlock_irqrestore(&cg_record_lock, flags); + return; +} + +int mcount_start(void) +{ + if (!memory_start) { + if(mcount_alloc_mem()) + return -ENOMEM; + mcount_pde->size = mem_needed; + } + mcount_hook = cg_record_arc; + return 0; +} + +int mcount_stop(void) +{ + mcount_hook = NULL; + return 0; +} + +int mcount_cleanup(void) +{ + mcount_stop(); + mcount_pde->size = 0; + mcount_free_mem(); + return 0; +} + +ssize_t mcount_read(struct file * file, char * buf, + size_t count, loff_t *ppos) +{ + count = (count + *ppos >= mcount_pde->size) ? + mcount_pde->size - *ppos : count; + copy_to_user(buf, memory_start + *ppos, count); + *ppos += count; + return count; +} + +ssize_t mcount_write(struct file * file, const char * buf, + size_t count, loff_t *ppos) +{ + int ret; + + switch (buf[0]) { + case '0': + ret = mcount_cleanup(); + break; + case '1': + ret = mcount_stop(); + break; + case '2': + ret = mcount_start(); + default: + ret = -EINVAL; + } + return (ret == 0) ? count : ret; +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/kernel/module.c 999-mjb/kernel/module.c --- 000-virgin/kernel/module.c 2003-11-24 16:12:33.000000000 -0800 +++ 999-mjb/kernel/module.c 2003-11-24 16:35:18.000000000 -0800 @@ -83,6 +83,11 @@ int unregister_module_notifier(struct no } EXPORT_SYMBOL(unregister_module_notifier); +#ifdef CONFIG_GCOV_PROFILE +extern void remove_bb_link (struct module *); +extern void do_global_ctors (char *, char *, struct module *, int); +#endif + /* We require a truly strong try_module_get() */ static inline int strong_try_module_get(struct module *mod) { @@ -1087,6 +1092,11 @@ static void free_module(struct module *m /* Arch-specific cleanup. */ module_arch_cleanup(mod); +#ifdef CONFIG_GCOV_PROFILE + if (mod->ctors_start && mod->ctors_end) + remove_bb_link(mod); +#endif + /* Module unload stuff */ module_unload_free(mod); @@ -1580,6 +1590,13 @@ static struct module *load_module(void _ /* Module has been moved. */ mod = (void *)sechdrs[modindex].sh_addr; +#ifdef CONFIG_GCOV_PROFILE + modindex = find_sec(hdr, sechdrs, secstrings, ".ctors"); + mod->ctors_start = (char *)sechdrs[modindex].sh_addr; + mod->ctors_end = (char *)(mod->ctors_start + + sechdrs[modindex].sh_size); +#endif + /* Now we've moved module, initialize linked lists, etc. */ module_unload_init(mod); @@ -1731,6 +1748,12 @@ sys_init_module(void __user *umod, /* Start the module */ ret = mod->init(); + +#ifdef CONFIG_GCOV_PROFILE + if (mod->ctors_start && mod->ctors_end) { + do_global_ctors(mod->ctors_start, mod->ctors_end, mod, 1); + } +#endif if (ret < 0) { /* Init routine failed: abort. Try to protect us from buggy refcounters. */ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/kernel/pid.c 999-mjb/kernel/pid.c --- 000-virgin/kernel/pid.c 2003-10-21 11:16:13.000000000 -0700 +++ 999-mjb/kernel/pid.c 2003-11-24 16:14:01.000000000 -0800 @@ -268,6 +268,9 @@ void switch_exec_pids(task_t *leader, ta * machine. From a minimum of 16 slots up to 4096 slots at one gigabyte or * more. */ +#ifdef CONFIG_KGDB +int kgdb_pid_init_done; /* so we don't call prior to... */ +#endif void __init pidhash_init(void) { int i, j, pidhash_size; @@ -289,6 +292,9 @@ void __init pidhash_init(void) for (j = 0; j < pidhash_size; j++) INIT_LIST_HEAD(&pid_hash[i][j]); } +#ifdef CONFIG_KGDB + kgdb_pid_init_done++; +#endif } void __init pidmap_init(void) diff -purN -X /home/mbligh/.diff.exclude 000-virgin/kernel/sched.c 999-mjb/kernel/sched.c --- 000-virgin/kernel/sched.c 2003-11-24 16:12:33.000000000 -0800 +++ 999-mjb/kernel/sched.c 2003-11-25 14:24:30.000000000 -0800 @@ -37,6 +37,8 @@ #include #include #include +#include +#include #ifdef CONFIG_NUMA #define cpu_to_node_mask(cpu) node_to_cpumask(cpu_to_node(cpu)) @@ -77,19 +79,28 @@ * maximum timeslice is 200 msecs. Timeslices get refilled after * they expire. */ -#define MIN_TIMESLICE ( 10 * HZ / 1000) -#define MAX_TIMESLICE (200 * HZ / 1000) + +int min_timeslice = (10 * HZ) / 1000; +#define MIN_TIMESLICE (min_timeslice) +int max_timeslice = (200 * HZ) / 1000; +#define MAX_TIMESLICE (max_timeslice) #define ON_RUNQUEUE_WEIGHT 30 -#define CHILD_PENALTY 95 -#define PARENT_PENALTY 100 -#define EXIT_WEIGHT 3 -#define PRIO_BONUS_RATIO 25 +int child_penalty = 95; +#define CHILD_PENALTY (child_penalty) +int parent_penalty = 100; +#define PARENT_PENALTY (parent_penalty) +int exit_weight = 3; +#define EXIT_WEIGHT (exit_weight) +int prio_bonus_ratio = 25; +#define PRIO_BONUS_RATIO (prio_bonus_ratio) #define MAX_BONUS (MAX_USER_PRIO * PRIO_BONUS_RATIO / 100) -#define INTERACTIVE_DELTA 2 +int interactive_delta = 2; +#define INTERACTIVE_DELTA (interactive_delta) #define MAX_SLEEP_AVG (AVG_TIMESLICE * MAX_BONUS) #define STARVATION_LIMIT (MAX_SLEEP_AVG) #define NS_MAX_SLEEP_AVG (JIFFIES_TO_NS(MAX_SLEEP_AVG)) -#define NODE_THRESHOLD 125 +int node_threshold = 125; +#define NODE_THRESHOLD (node_threshold) #define CREDIT_LIMIT 100 /* @@ -201,6 +212,9 @@ struct runqueue { unsigned long nr_running, nr_switches, expired_timestamp, nr_uninterruptible; task_t *curr, *idle; +#ifdef CONFIG_SCHEDSTATS + int cpu; /* to make easy reverse-lookups with per-cpu runqueues */ +#endif struct mm_struct *prev_mm; prio_array_t *active, *expired, arrays[2]; int prev_cpu_load[NR_CPUS]; @@ -212,6 +226,10 @@ struct runqueue { struct list_head migration_queue; atomic_t nr_iowait; + +#ifdef CONFIG_SCHEDSTATS + struct sched_info info; +#endif }; static DEFINE_PER_CPU(struct runqueue, runqueues); @@ -275,6 +293,140 @@ __init void node_nr_running_init(void) #endif /* CONFIG_NUMA */ + +#ifdef CONFIG_SCHEDSTATS +struct schedstat { + /* sys_sched_yield stats */ + unsigned long yld_exp_empty; + unsigned long yld_act_empty; + unsigned long yld_both_empty; + unsigned long yld_cnt; + + /* schedule stats */ + unsigned long sched_noswitch; + unsigned long sched_switch; + unsigned long sched_cnt; + + /* load_balance stats */ + unsigned long lb_imbalance; + unsigned long lb_idle; + unsigned long lb_busy; + unsigned long lb_resched; + unsigned long lb_cnt; + unsigned long lb_nobusy; + unsigned long lb_bnode; + + /* pull_task stats */ + unsigned long pt_gained; + unsigned long pt_lost; + unsigned long pt_node_gained; + unsigned long pt_node_lost; + + /* balance_node stats */ + unsigned long bn_cnt; + unsigned long bn_idle; +} ____cacheline_aligned; + +/* + * bump this up when changing the output format or the meaning of an existing + * format, so that tools can adapt (or abort) + */ +#define SCHEDSTAT_VERSION 4 + +struct schedstat schedstats[NR_CPUS]; + +static int show_schedstat(struct seq_file *seq, void *v) +{ + struct schedstat sums; + int i; + + memset(&sums, 0, sizeof(sums)); + seq_printf(seq, "version %d\n", SCHEDSTAT_VERSION); + seq_printf(seq, "timestamp %lu\n", jiffies); + for (i = 0; i < NR_CPUS; i++) { + + struct sched_info info; + + if (!cpu_online(i)) continue; + + cpu_sched_info(&info, i); + + sums.yld_exp_empty += schedstats[i].yld_exp_empty; + sums.yld_act_empty += schedstats[i].yld_act_empty; + sums.yld_both_empty += schedstats[i].yld_both_empty; + sums.yld_cnt += schedstats[i].yld_cnt; + sums.sched_noswitch += schedstats[i].sched_noswitch; + sums.sched_switch += schedstats[i].sched_switch; + sums.sched_cnt += schedstats[i].sched_cnt; + sums.lb_idle += schedstats[i].lb_idle; + sums.lb_busy += schedstats[i].lb_busy; + sums.lb_resched += schedstats[i].lb_resched; + sums.lb_cnt += schedstats[i].lb_cnt; + sums.lb_imbalance += schedstats[i].lb_imbalance; + sums.lb_nobusy += schedstats[i].lb_nobusy; + sums.lb_bnode += schedstats[i].lb_bnode; + sums.pt_node_gained += schedstats[i].pt_node_gained; + sums.pt_node_lost += schedstats[i].pt_node_lost; + sums.pt_gained += schedstats[i].pt_gained; + sums.pt_lost += schedstats[i].pt_lost; + sums.bn_cnt += schedstats[i].bn_cnt; + sums.bn_idle += schedstats[i].bn_idle; + seq_printf(seq, + "cpu%d %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu " + "%lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu\n", + i, schedstats[i].yld_both_empty, + schedstats[i].yld_act_empty, schedstats[i].yld_exp_empty, + schedstats[i].yld_cnt, schedstats[i].sched_noswitch, + schedstats[i].sched_switch, schedstats[i].sched_cnt, + schedstats[i].lb_idle, schedstats[i].lb_busy, + schedstats[i].lb_resched, + schedstats[i].lb_cnt, schedstats[i].lb_imbalance, + schedstats[i].lb_nobusy, schedstats[i].lb_bnode, + schedstats[i].pt_gained, schedstats[i].pt_lost, + schedstats[i].pt_node_gained, schedstats[i].pt_node_lost, + schedstats[i].bn_cnt, schedstats[i].bn_idle, + info.cpu_time, info.run_delay, info.pcnt); + } + seq_printf(seq, + "totals %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu %lu " + "%lu %lu %lu %lu %lu %lu %lu\n", + sums.yld_both_empty, sums.yld_act_empty, sums.yld_exp_empty, + sums.yld_cnt, sums.sched_noswitch, sums.sched_switch, + sums.sched_cnt, sums.lb_idle, sums.lb_busy, sums.lb_resched, + sums.lb_cnt, sums.lb_imbalance, sums.lb_nobusy, sums.lb_bnode, + sums.pt_gained, sums.pt_lost, sums.pt_node_gained, + sums.pt_node_lost, sums.bn_cnt, sums.bn_idle); + + return 0; +} + +static int schedstat_open(struct inode *inode, struct file *file) +{ + unsigned size = 4096 * (1 + num_online_cpus() / 32); + char *buf = kmalloc(size, GFP_KERNEL); + struct seq_file *m; + int res; + + if (!buf) + return -ENOMEM; + res = single_open(file, show_schedstat, NULL); + if (!res) { + m = file->private_data; + m->buf = buf; + m->size = size; + } else + kfree(buf); + return res; +} + +struct file_operations proc_schedstat_operations = { + .open = schedstat_open, + .read = seq_read, + .llseek = seq_lseek, + .release = single_release, +}; +#endif + /* * task_rq_lock - lock the runqueue a given task resides on and disable * interrupts. Note the ordering: we can safely lookup the task_rq without @@ -319,6 +471,113 @@ static inline void rq_unlock(runqueue_t spin_unlock_irq(&rq->lock); } +#ifdef CONFIG_SCHEDSTATS +/* + * Called when a process is dequeued from the active array and given + * the cpu. We should note that with the exception of interactive + * tasks, the expired queue will become the active queue after the active + * queue is empty, without explicitly dequeuing and requeuing tasks in the + * expired queue. (Interactive tasks may be requeued directly to the + * active queue, thus delaying tasks in the expired queue from running; + * see scheduler_tick()). + * + * This function is only called from sched_info_arrive(), rather than + * dequeue_task(). Even though a task may be queued and dequeued multiple + * times as it is shuffled about, we're really interested in knowing how + * long it was from the *first* time it was queued to the time that it + * finally hit a cpu. + */ +static inline void sched_info_dequeued(task_t *t) +{ + t->sched_info.last_queued = 0; +} + +/* + * Called when a task finally hits the cpu. We can now calculate how + * long it was waiting to run. We also note when it began so that we + * can keep stats on how long its timeslice is. + */ +static inline void sched_info_arrive(task_t *t) +{ + unsigned long now = jiffies; + unsigned long diff = 0; + struct runqueue *rq = task_rq(t); + + if (t->sched_info.last_queued) + diff = now - t->sched_info.last_queued; + sched_info_dequeued(t); + t->sched_info.run_delay += diff; + t->sched_info.last_arrival = now; + t->sched_info.pcnt++; + + if (!rq) + return; + + rq->info.run_delay += diff; + rq->info.pcnt++; +} + +/* + * Called when a process is queued into either the active or expired + * array. The time is noted and later used to determine how long we + * had to wait for us to reach the cpu. Since the expired queue will + * become the active queue after active queue is empty, without dequeuing + * and requeuing any tasks, we are interested in queuing to either. It + * is unusual but not impossible for tasks to be dequeued and immediately + * requeued in the same or another array: this can happen in sched_yield(), + * set_user_nice(), and even load_balance() as it moves tasks from runqueue + * to runqueue. + * + * This function is only called from enqueue_task(), but also only updates + * the timestamp if it is already not set. It's assumed that + * sched_info_dequeued() will clear that stamp when appropriate. + */ +static inline void sched_info_queued(task_t *t) +{ + if (!t->sched_info.last_queued) + t->sched_info.last_queued = jiffies; +} + +/* + * Called when a process ceases being the active-running process, either + * voluntarily or involuntarily. Now we can calculate how long we ran. + */ +static inline void sched_info_depart(task_t *t) +{ + struct runqueue *rq = task_rq(t); + unsigned long diff = jiffies - t->sched_info.last_arrival; + + t->sched_info.cpu_time += diff; + + if (rq) + rq->info.cpu_time += diff; +} + +/* + * Called when tasks are switched involuntarily due, typically, to expiring + * their time slice. (This may also be called when switching to or from + * the idle task.) We are only called when prev != next. + */ +static inline void sched_info_switch(task_t *prev, task_t *next) +{ + struct runqueue *rq = task_rq(prev); + + /* + * prev now departs the cpu. It's not interesting to record + * stats about how efficient we were at scheduling the idle + * process, however. + */ + if (prev != rq->idle) + sched_info_depart(prev); + + if (next != rq->idle) + sched_info_arrive(next); +} +#else +#define sched_info_queued(t) {} +#define sched_info_switch(t, next) {} +#endif /* CONFIG_SCHEDSTATS */ + /* * Adding/removing a task to/from a priority array: */ @@ -332,6 +591,7 @@ static inline void dequeue_task(struct t static inline void enqueue_task(struct task_struct *p, prio_array_t *array) { + sched_info_queued(p); list_add_tail(&p->run_list, array->queue + p->prio); __set_bit(p->prio, array->bitmap); array->nr_active++; @@ -840,6 +1100,11 @@ unsigned long nr_running(void) return sum; } +unsigned long nr_running_cpu(int cpu) +{ + return cpu_rq(cpu)->nr_running; +} + unsigned long nr_uninterruptible(void) { unsigned long i, sum = 0; @@ -876,6 +1141,13 @@ unsigned long nr_iowait(void) return sum; } +#ifdef CONFIG_SCHEDSTATS +void cpu_sched_info(struct sched_info *info, int cpu) +{ + memcpy(info, &cpu_rq(cpu)->info, sizeof(struct sched_info)); +} +#endif /* CONFIG_SCHEDSTATS */ + /* * double_rq_lock - safely lock two runqueues * @@ -937,36 +1209,72 @@ static void sched_migrate_task(task_t *p */ static int sched_best_cpu(struct task_struct *p) { - int i, minload, load, best_cpu, node = 0; + int cpu, node, minload, load, best_cpu, best_node; + int this_cpu, this_node, this_node_load; cpumask_t cpumask; - best_cpu = task_cpu(p); - if (cpu_rq(best_cpu)->nr_running <= 2) - return best_cpu; + this_cpu = best_cpu = task_cpu(p); + if (cpu_rq(this_cpu)->nr_running <= 2) + return this_cpu; + this_node = best_node = cpu_to_node(this_cpu); + + /* + * First look for any node-local idle queue and use that. + * This improves performance under light loads (mbligh). + * In case this node turns out to be the lightest node, store the best + * cpu that we find, so we don't go sniffing the same runqueues again. + */ + minload = 10000000; + cpumask = node_to_cpumask(this_node); + for (cpu = 0; cpu < NR_CPUS; ++cpu) { + if (!cpu_isset(cpu, cpumask)) + continue; + load = cpu_rq(cpu)->nr_running; + if (load == 0) + return cpu; + if (load < minload) { + minload = load; + best_cpu = cpu; + } + } + /* + * Now find the lightest loaded node, and put it in best_node + * + * Node load is always divided by nr_cpus_node to normalise load + * values in case cpu count differs from node to node. We first + * multiply node_nr_running by 16 to get a little better resolution. + */ minload = 10000000; - for_each_node_with_cpus(i) { - /* - * Node load is always divided by nr_cpus_node to normalise - * load values in case cpu count differs from node to node. - * We first multiply node_nr_running by 10 to get a little - * better resolution. - */ - load = 10 * atomic_read(&node_nr_running[i]) / nr_cpus_node(i); + this_node_load = 16 * atomic_read(&node_nr_running[this_node]) + / nr_cpus_node(this_node); + for_each_node_with_cpus(node) { + if (node == this_node) + load = this_node_load; + else + load = 16 * atomic_read(&node_nr_running[node]) + / nr_cpus_node(node); if (load < minload) { minload = load; - node = i; + best_node = node; } } + /* If we chose this node, we already did the legwork earlier */ + if (best_node == this_node) + return best_cpu; + + /* Now find the lightest loaded cpu on best_node, and use that */ minload = 10000000; - cpumask = node_to_cpumask(node); - for (i = 0; i < NR_CPUS; ++i) { - if (!cpu_isset(i, cpumask)) + best_cpu = this_cpu; + cpumask = node_to_cpumask(best_node); + for (cpu = 0; cpu < NR_CPUS; ++cpu) { + if (!cpu_isset(cpu, cpumask)) continue; - if (cpu_rq(i)->nr_running < minload) { - best_cpu = i; - minload = cpu_rq(i)->nr_running; + load = cpu_rq(cpu)->nr_running; + if (load < minload) { + minload = load; + best_cpu = cpu; } } return best_cpu; @@ -1019,6 +1327,9 @@ static int find_busiest_node(int this_no #endif /* CONFIG_NUMA */ +int idle_node_rebalance_ratio = 10; +int busy_node_rebalance_ratio = 2; + #ifdef CONFIG_SMP /* @@ -1130,6 +1441,16 @@ out: */ static inline void pull_task(runqueue_t *src_rq, prio_array_t *src_array, task_t *p, runqueue_t *this_rq, int this_cpu) { +#ifdef CONFIG_SCHEDSTATS +#ifdef CONFIG_NUMA + if (cpu_to_node(this_cpu) != cpu_to_node(src_rq->cpu)) { + SCHEDSTAT_INC(this_cpu, pt_node_gained); + SCHEDSTAT_INC(src_rq->cpu, pt_node_lost); + } +#endif + SCHEDSTAT_INC(this_cpu, pt_gained); + SCHEDSTAT_INC(src_rq->cpu, pt_lost); +#endif dequeue_task(p, src_array); nr_running_dec(src_rq); set_task_cpu(p, this_cpu); @@ -1153,11 +1474,16 @@ static inline void pull_task(runqueue_t */ static inline int -can_migrate_task(task_t *tsk, runqueue_t *rq, int this_cpu, int idle) +can_migrate_task(task_t *tsk, runqueue_t *rq, int this_cpu, int idle, int crossnode) { unsigned long delta = sched_clock() - tsk->timestamp; + int task_is_warm = (delta <= JIFFIES_TO_NS(cache_decay_ticks)) ? 1 : 0; - if (!idle && (delta <= JIFFIES_TO_NS(cache_decay_ticks))) + /* only idle processors may steal warm tasks ... */ + if (!idle && task_is_warm) + return 0; + /* ... but no stealing warm tasks cross node on NUMA systems */ + if (crossnode && task_is_warm) return 0; if (task_running(rq, tsk)) return 0; @@ -1174,7 +1500,7 @@ can_migrate_task(task_t *tsk, runqueue_t * We call this with the current runqueue locked, * irqs disabled. */ -static void load_balance(runqueue_t *this_rq, int idle, cpumask_t cpumask) +static void load_balance(runqueue_t *this_rq, int idle, int crossnode, cpumask_t cpumask) { int imbalance, idx, this_cpu = smp_processor_id(); runqueue_t *busiest; @@ -1182,9 +1508,14 @@ static void load_balance(runqueue_t *thi struct list_head *head, *curr; task_t *tmp; + SCHEDSTAT_INC(this_cpu, lb_cnt); busiest = find_busiest_queue(this_rq, this_cpu, idle, &imbalance, cpumask); - if (!busiest) - goto out; + if (!busiest) { + SCHEDSTAT_INC(this_cpu, lb_nobusy); + goto out; + } + + SCHEDSTAT_ADD(this_cpu, lb_imbalance, imbalance); /* * We only want to steal a number of tasks equal to 1/2 the imbalance, @@ -1233,7 +1564,7 @@ skip_queue: curr = curr->prev; - if (!can_migrate_task(tmp, busiest, this_cpu, idle)) { + if (!can_migrate_task(tmp, busiest, this_cpu, idle, crossnode)) { if (curr != head) goto skip_queue; idx++; @@ -1265,19 +1596,21 @@ out: */ #define IDLE_REBALANCE_TICK (HZ/1000 ?: 1) #define BUSY_REBALANCE_TICK (HZ/5 ?: 1) -#define IDLE_NODE_REBALANCE_TICK (IDLE_REBALANCE_TICK * 5) -#define BUSY_NODE_REBALANCE_TICK (BUSY_REBALANCE_TICK * 2) +#define IDLE_NODE_REBALANCE_TICK (IDLE_REBALANCE_TICK * idle_node_rebalance_ratio) +#define BUSY_NODE_REBALANCE_TICK (BUSY_REBALANCE_TICK * busy_node_rebalance_ratio) #ifdef CONFIG_NUMA static void balance_node(runqueue_t *this_rq, int idle, int this_cpu) { int node = find_busiest_node(cpu_to_node(this_cpu)); + SCHEDSTAT_INC(this_cpu, bn_cnt); if (node >= 0) { cpumask_t cpumask = node_to_cpumask(node); + SCHEDSTAT_INC(this_cpu, lb_bnode); cpu_set(this_cpu, cpumask); spin_lock(&this_rq->lock); - load_balance(this_rq, idle, cpumask); + load_balance(this_rq, idle, 1, cpumask); spin_unlock(&this_rq->lock); } } @@ -1285,9 +1618,7 @@ static void balance_node(runqueue_t *thi static void rebalance_tick(runqueue_t *this_rq, int idle) { -#ifdef CONFIG_NUMA int this_cpu = smp_processor_id(); -#endif unsigned long j = jiffies; /* @@ -1300,12 +1631,15 @@ static void rebalance_tick(runqueue_t *t */ if (idle) { #ifdef CONFIG_NUMA - if (!(j % IDLE_NODE_REBALANCE_TICK)) + if (!(j % IDLE_NODE_REBALANCE_TICK)) { + SCHEDSTAT_INC(this_cpu, bn_idle); balance_node(this_rq, idle, this_cpu); + } #endif if (!(j % IDLE_REBALANCE_TICK)) { spin_lock(&this_rq->lock); - load_balance(this_rq, idle, cpu_to_node_mask(this_cpu)); + SCHEDSTAT_INC(this_cpu, lb_idle); + load_balance(this_rq, idle, 0, cpu_to_node_mask(this_cpu)); spin_unlock(&this_rq->lock); } return; @@ -1316,7 +1650,8 @@ static void rebalance_tick(runqueue_t *t #endif if (!(j % BUSY_REBALANCE_TICK)) { spin_lock(&this_rq->lock); - load_balance(this_rq, idle, cpu_to_node_mask(this_cpu)); + SCHEDSTAT_INC(this_cpu, lb_busy); + load_balance(this_rq, idle, 0, cpu_to_node_mask(this_cpu)); spin_unlock(&this_rq->lock); } } @@ -1476,13 +1811,14 @@ asmlinkage void schedule(void) struct list_head *queue; unsigned long long now; unsigned long run_time; - int idx; + int idx, this_cpu = smp_processor_id(); /* * Test if we are atomic. Since do_exit() needs to call into * schedule() atomically, we ignore that path for now. * Otherwise, whine if we are scheduling when we should not be. */ + SCHEDSTAT_INC(this_cpu, sched_cnt); if (likely(!(current->state & (TASK_DEAD | TASK_ZOMBIE)))) { if (unlikely(in_atomic())) { printk(KERN_ERR "bad: scheduling while atomic!\n"); @@ -1535,7 +1871,8 @@ need_resched: pick_next_task: if (unlikely(!rq->nr_running)) { #ifdef CONFIG_SMP - load_balance(rq, 1, cpu_to_node_mask(smp_processor_id())); + SCHEDSTAT_INC(this_cpu, lb_resched); + load_balance(rq, 1, 0, cpu_to_node_mask(smp_processor_id())); if (rq->nr_running) goto pick_next_task; #endif @@ -1549,11 +1886,13 @@ pick_next_task: /* * Switch the active and expired arrays. */ + SCHEDSTAT_INC(this_cpu, sched_switch); rq->active = rq->expired; rq->expired = array; array = rq->active; rq->expired_timestamp = 0; } + SCHEDSTAT_INC(this_cpu, sched_noswitch); idx = sched_find_first_bit(array->bitmap); queue = array->queue + idx; @@ -1584,6 +1923,7 @@ switch_tasks: } prev->timestamp = now; + sched_info_switch(prev, next); if (likely(prev != next)) { next->timestamp = now; rq->nr_switches++; @@ -1891,6 +2231,13 @@ out_unlock: EXPORT_SYMBOL(set_user_nice); +#if defined( CONFIG_KGDB) +struct task_struct * kgdb_get_idle(int this_cpu) +{ + return cpu_rq(this_cpu)->idle; +} +#endif + #ifndef __alpha__ /* @@ -2264,6 +2611,9 @@ asmlinkage long sys_sched_yield(void) { runqueue_t *rq = this_rq_lock(); prio_array_t *array = current->array; +#ifdef CONFIG_SCHEDSTATS + int this_cpu = smp_processor_id(); +#endif /* CONFIG_SCHEDSTATS */ /* * We implement yielding by moving the task into the expired @@ -2272,7 +2622,16 @@ asmlinkage long sys_sched_yield(void) * (special rule: RT tasks will just roundrobin in the active * array.) */ + SCHEDSTAT_INC(this_cpu, yld_cnt); if (likely(!rt_task(current))) { + if (current->array->nr_active == 1) { + SCHEDSTAT_INC(this_cpu, yld_act_empty); + if (!rq->expired->nr_active) { + SCHEDSTAT_INC(this_cpu, yld_both_empty); + } + } else if (!rq->expired->nr_active) { + SCHEDSTAT_INC(this_cpu, yld_exp_empty); + } dequeue_task(current, array); enqueue_task(current, rq->expired); } else { @@ -2814,6 +3173,9 @@ void __init sched_init(void) rq = cpu_rq(i); rq->active = rq->arrays; rq->expired = rq->arrays + 1; +#ifdef CONFIG_SCHEDSTATS + rq->cpu = i; +#endif /* CONFIG_SCHEDSTATS */ spin_lock_init(&rq->lock); INIT_LIST_HEAD(&rq->migration_queue); atomic_set(&rq->nr_iowait, 0); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/kernel/sys.c 999-mjb/kernel/sys.c --- 000-virgin/kernel/sys.c 2003-10-27 10:41:16.000000000 -0800 +++ 999-mjb/kernel/sys.c 2003-11-24 16:34:32.000000000 -0800 @@ -251,6 +251,7 @@ cond_syscall(sys_epoll_ctl) cond_syscall(sys_epoll_wait) cond_syscall(sys_pciconfig_read) cond_syscall(sys_pciconfig_write) +cond_syscall(sys_mbind) static int set_one_prio(struct task_struct *p, int niceval, int error) { diff -purN -X /home/mbligh/.diff.exclude 000-virgin/kernel/sysctl.c 999-mjb/kernel/sysctl.c --- 000-virgin/kernel/sysctl.c 2003-10-14 15:50:36.000000000 -0700 +++ 999-mjb/kernel/sysctl.c 2003-11-24 16:36:43.000000000 -0800 @@ -60,6 +60,16 @@ extern int cad_pid; extern int pid_max; extern int sysctl_lower_zone_protection; extern int min_free_kbytes; +extern int min_timeslice; +extern int max_timeslice; +extern int child_penalty; +extern int parent_penalty; +extern int exit_weight; +extern int prio_bonus_ratio; +extern int interactive_delta; +extern int node_threshold; +extern int idle_node_rebalance_ratio; +extern int busy_node_rebalance_ratio; /* this is needed for the proc_dointvec_minmax for [fs_]overflow UID and GID */ static int maxolduid = 65535; @@ -122,6 +132,7 @@ static struct ctl_table_header root_tabl static ctl_table kern_table[]; static ctl_table vm_table[]; +static ctl_table sched_table[]; #ifdef CONFIG_NET extern ctl_table net_table[]; #endif @@ -198,6 +209,12 @@ static ctl_table root_table[] = { .mode = 0555, .child = dev_table, }, + { + .ctl_name = CTL_SCHED, + .procname = "sched", + .mode = 0555, + .child = sched_table, + }, { .ctl_name = 0 } }; @@ -585,6 +602,7 @@ static ctl_table kern_table[] = { /* Constants for minimum and maximum testing in vm_table. We use these as one-element integer vectors. */ static int zero; +static int one = 1; static int one_hundred = 100; @@ -664,11 +682,8 @@ static ctl_table vm_table[] = { .procname = "swappiness", .data = &vm_swappiness, .maxlen = sizeof(vm_swappiness), - .mode = 0644, - .proc_handler = &proc_dointvec_minmax, - .strategy = &sysctl_intvec, - .extra1 = &zero, - .extra2 = &one_hundred, + .mode = 0444 /* read-only*/, + .proc_handler = &proc_dointvec, }, #ifdef CONFIG_HUGETLB_PAGE { @@ -805,6 +820,42 @@ static ctl_table dev_table[] = { { .ctl_name = 0 } }; +static ctl_table sched_table[] = { + {SCHED_MAX_TIMESLICE, "max_timeslice", &max_timeslice, + sizeof(int), 0644, NULL, &proc_dointvec_minmax, + &sysctl_intvec, NULL, &one, NULL}, + {SCHED_MIN_TIMESLICE, "min_timeslice", &min_timeslice, + sizeof(int), 0644, NULL, &proc_dointvec_minmax, + &sysctl_intvec, NULL, &one, NULL}, + {SCHED_CHILD_PENALTY, "child_penalty", &child_penalty, + sizeof(int), 0644, NULL, &proc_dointvec_minmax, + &sysctl_intvec, NULL, &zero, NULL}, + {SCHED_PARENT_PENALTY, "parent_penalty", &parent_penalty, + sizeof(int), 0644, NULL, &proc_dointvec_minmax, + &sysctl_intvec, NULL, &zero, NULL}, + {SCHED_EXIT_WEIGHT, "exit_weight", &exit_weight, + sizeof(int), 0644, NULL, &proc_dointvec_minmax, + &sysctl_intvec, NULL, &zero, NULL}, + {SCHED_PRIO_BONUS_RATIO, "prio_bonus_ratio", &prio_bonus_ratio, + sizeof(int), 0644, NULL, &proc_dointvec_minmax, + &sysctl_intvec, NULL, &zero, NULL}, + {SCHED_INTERACTIVE_DELTA, "interactive_delta", &interactive_delta, + sizeof(int), 0644, NULL, &proc_dointvec_minmax, + &sysctl_intvec, NULL, &zero, NULL}, + {SCHED_NODE_THRESHOLD, "node_threshold", &node_threshold, + sizeof(int), 0644, NULL, &proc_dointvec_minmax, + sysctl_intvec, NULL, &one, NULL}, + {SCHED_IDLE_NODE_REBALANCE_RATIO, "idle_node_rebalance_ratio", + &idle_node_rebalance_ratio, + sizeof(int), 0644, NULL, &proc_dointvec_minmax, + &sysctl_intvec, NULL, &zero, NULL}, + {SCHED_BUSY_NODE_REBALANCE_RATIO, "busy_node_rebalance_ratio", + &busy_node_rebalance_ratio, + sizeof(int), 0644, NULL, &proc_dointvec_minmax, + &sysctl_intvec, NULL, &zero, NULL}, + {0} +}; + extern void init_irq_proc (void); void __init sysctl_init(void) diff -purN -X /home/mbligh/.diff.exclude 000-virgin/kernel/timer.c 999-mjb/kernel/timer.c --- 000-virgin/kernel/timer.c 2003-11-24 16:12:33.000000000 -0800 +++ 999-mjb/kernel/timer.c 2003-11-24 16:33:45.000000000 -0800 @@ -768,6 +768,8 @@ static unsigned long count_active_tasks( * Requires xtime_lock to access. */ unsigned long avenrun[3]; +unsigned long tasks_running[3]; +DEFINE_PER_CPU(unsigned long[3],cpu_tasks_running); /* * calc_load - given tick count, update the avenrun load estimates. @@ -775,7 +777,7 @@ unsigned long avenrun[3]; */ static inline void calc_load(unsigned long ticks) { - unsigned long active_tasks; /* fixed-point */ + unsigned long active_tasks, running_tasks; /* fixed-point */ static int count = LOAD_FREQ; count -= ticks; @@ -785,9 +787,39 @@ static inline void calc_load(unsigned lo CALC_LOAD(avenrun[0], EXP_1, active_tasks); CALC_LOAD(avenrun[1], EXP_5, active_tasks); CALC_LOAD(avenrun[2], EXP_15, active_tasks); + running_tasks = nr_running() * FIXED_1; + CALC_LOAD(tasks_running[0], EXP_1, running_tasks); + CALC_LOAD(tasks_running[1], EXP_5, running_tasks); + CALC_LOAD(tasks_running[2], EXP_15, running_tasks); } } +/* + * This does the frequency calculation a little bit different from the + * global version above. It doesn't ever look at the kernel's concept + * of time, it just updates that stats every LOAD_FREQ times into the + * function. + * + * Using jiffies is more accurate, but there _are_ just statistics, so + * they're not worth messing with xtime_lock and company. If we miss + * an interrupt or two, big deal. + */ +void calc_load_cpu(int cpu) +{ + unsigned long running_tasks; + static DEFINE_PER_CPU(int, count) = { LOAD_FREQ }; + + per_cpu(count, cpu)--; + if (per_cpu(count, cpu) != 0) + return; + + per_cpu(count, cpu) += LOAD_FREQ; + running_tasks = nr_running_cpu(cpu) * FIXED_1; + CALC_LOAD(per_cpu(cpu_tasks_running, cpu)[0], EXP_1, running_tasks); + CALC_LOAD(per_cpu(cpu_tasks_running, cpu)[1], EXP_5, running_tasks); + CALC_LOAD(per_cpu(cpu_tasks_running, cpu)[2], EXP_15, running_tasks); +} + /* jiffies at the most recent update of wall time */ unsigned long wall_jiffies = INITIAL_JIFFIES; diff -purN -X /home/mbligh/.diff.exclude 000-virgin/mm/Makefile 999-mjb/mm/Makefile --- 000-virgin/mm/Makefile 2003-10-01 11:47:15.000000000 -0700 +++ 999-mjb/mm/Makefile 2003-11-24 16:34:32.000000000 -0800 @@ -7,8 +7,10 @@ mmu-$(CONFIG_MMU) := fremap.o highmem.o mlock.o mmap.o mprotect.o mremap.o msync.o rmap.o \ shmem.o vmalloc.o -obj-y := bootmem.o filemap.o mempool.o oom_kill.o fadvise.o \ +obj-y := bootmem.o fadvise.o filemap.o mempool.o oom_kill.o \ page_alloc.o page-writeback.o pdflush.o readahead.o \ slab.o swap.o truncate.o vmscan.o $(mmu-y) obj-$(CONFIG_SWAP) += page_io.o swap_state.o swapfile.o + +obj-$(CONFIG_NUMA) += mbind.o diff -purN -X /home/mbligh/.diff.exclude 000-virgin/mm/filemap.c 999-mjb/mm/filemap.c --- 000-virgin/mm/filemap.c 2003-11-24 16:12:33.000000000 -0800 +++ 999-mjb/mm/filemap.c 2003-11-24 16:35:33.000000000 -0800 @@ -73,6 +73,9 @@ * ->mmap_sem * ->i_sem (msync) * + * ->lock_page + * ->i_shared_sem (page_convert_anon) + * * ->inode_lock * ->sb_lock (fs/fs-writeback.c) * ->mapping->page_lock (__sync_single_inode) @@ -111,9 +114,9 @@ void remove_from_page_cache(struct page if (unlikely(!PageLocked(page))) PAGE_BUG(page); - spin_lock(&mapping->page_lock); + mapping_wrlock(&mapping->page_lock); __remove_from_page_cache(page); - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); } static inline int sync_page(struct page *page) @@ -145,9 +148,9 @@ static int __filemap_fdatawrite(struct a if (mapping->backing_dev_info->memory_backed) return 0; - spin_lock(&mapping->page_lock); + mapping_wrlock(&mapping->page_lock); list_splice_init(&mapping->dirty_pages, &mapping->io_pages); - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); ret = do_writepages(mapping, &wbc); return ret; } @@ -180,7 +183,7 @@ int filemap_fdatawait(struct address_spa restart: progress = 0; - spin_lock(&mapping->page_lock); + mapping_wrlock(&mapping->page_lock); while (!list_empty(&mapping->locked_pages)) { struct page *page; @@ -194,7 +197,7 @@ restart: if (!PageWriteback(page)) { if (++progress > 32) { if (need_resched()) { - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); __cond_resched(); goto restart; } @@ -204,16 +207,16 @@ restart: progress = 0; page_cache_get(page); - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); wait_on_page_writeback(page); if (PageError(page)) ret = -EIO; page_cache_release(page); - spin_lock(&mapping->page_lock); + mapping_wrlock(&mapping->page_lock); } - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); /* Check for outstanding write errors */ if (test_and_clear_bit(AS_ENOSPC, &mapping->flags)) @@ -250,7 +253,7 @@ int add_to_page_cache(struct page *page, if (error == 0) { page_cache_get(page); - spin_lock(&mapping->page_lock); + mapping_wrlock(&mapping->page_lock); error = radix_tree_insert(&mapping->page_tree, offset, page); if (!error) { SetPageLocked(page); @@ -258,7 +261,7 @@ int add_to_page_cache(struct page *page, } else { page_cache_release(page); } - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); radix_tree_preload_end(); } return error; @@ -394,11 +397,11 @@ struct page * find_get_page(struct addre * We scan the hash list read-only. Addition to and removal from * the hash-list needs a held write-lock. */ - spin_lock(&mapping->page_lock); + mapping_rdlock(&mapping->page_lock); page = radix_tree_lookup(&mapping->page_tree, offset); if (page) page_cache_get(page); - spin_unlock(&mapping->page_lock); + mapping_rdunlock(&mapping->page_lock); return page; } @@ -411,11 +414,11 @@ struct page *find_trylock_page(struct ad { struct page *page; - spin_lock(&mapping->page_lock); + mapping_rdlock(&mapping->page_lock); page = radix_tree_lookup(&mapping->page_tree, offset); if (page && TestSetPageLocked(page)) page = NULL; - spin_unlock(&mapping->page_lock); + mapping_rdunlock(&mapping->page_lock); return page; } @@ -437,15 +440,15 @@ struct page *find_lock_page(struct addre { struct page *page; - spin_lock(&mapping->page_lock); + mapping_rdlock(&mapping->page_lock); repeat: page = radix_tree_lookup(&mapping->page_tree, offset); if (page) { page_cache_get(page); if (TestSetPageLocked(page)) { - spin_unlock(&mapping->page_lock); + mapping_rdunlock(&mapping->page_lock); lock_page(page); - spin_lock(&mapping->page_lock); + mapping_rdlock(&mapping->page_lock); /* Has the page been truncated while we slept? */ if (page->mapping != mapping || page->index != offset) { @@ -455,7 +458,7 @@ repeat: } } } - spin_unlock(&mapping->page_lock); + mapping_rdunlock(&mapping->page_lock); return page; } @@ -529,12 +532,12 @@ unsigned int find_get_pages(struct addre unsigned int i; unsigned int ret; - spin_lock(&mapping->page_lock); + mapping_rdlock(&mapping->page_lock); ret = radix_tree_gang_lookup(&mapping->page_tree, (void **)pages, start, nr_pages); for (i = 0; i < ret; i++) page_cache_get(pages[i]); - spin_unlock(&mapping->page_lock); + mapping_rdunlock(&mapping->page_lock); return ret; } diff -purN -X /home/mbligh/.diff.exclude 000-virgin/mm/fremap.c 999-mjb/mm/fremap.c --- 000-virgin/mm/fremap.c 2003-10-01 11:48:28.000000000 -0700 +++ 999-mjb/mm/fremap.c 2003-11-24 16:34:49.000000000 -0800 @@ -38,7 +38,7 @@ static inline int zap_pte(struct mm_stru set_page_dirty(page); page_remove_rmap(page, ptep); page_cache_release(page); - mm->rss--; + dec_rss(mm, page); } } return 1; @@ -63,10 +63,26 @@ int install_page(struct mm_struct *mm, s pmd_t *pmd; pte_t pte_val; struct pte_chain *pte_chain; + unsigned long pgidx; pte_chain = pte_chain_alloc(GFP_KERNEL); if (!pte_chain) goto err; + + /* + * Convert this page to anon for objrmap if it's nonlinear + */ + pgidx = (addr - vma->vm_start) >> PAGE_SHIFT; + pgidx += vma->vm_pgoff; + pgidx >>= PAGE_CACHE_SHIFT - PAGE_SHIFT; + if (!PageAnon(page) && (page->index != pgidx)) { + lock_page(page); + err = page_convert_anon(page); + unlock_page(page); + if (err < 0) + goto err_free; + } + pgd = pgd_offset(mm, addr); spin_lock(&mm->page_table_lock); @@ -80,7 +96,7 @@ int install_page(struct mm_struct *mm, s flush = zap_pte(mm, vma, addr, pte); - mm->rss++; + inc_rss(mm, page); flush_icache_page(vma, page); set_pte(pte, mk_pte(page, prot)); pte_chain = page_add_rmap(page, pte, pte_chain); @@ -89,12 +105,11 @@ int install_page(struct mm_struct *mm, s if (flush) flush_tlb_page(vma, addr); update_mmu_cache(vma, addr, pte_val); - spin_unlock(&mm->page_table_lock); - pte_chain_free(pte_chain); - return 0; + err = 0; err_unlock: spin_unlock(&mm->page_table_lock); +err_free: pte_chain_free(pte_chain); err: return err; diff -purN -X /home/mbligh/.diff.exclude 000-virgin/mm/mbind.c 999-mjb/mm/mbind.c --- 000-virgin/mm/mbind.c 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/mm/mbind.c 2003-11-24 16:34:32.000000000 -0800 @@ -0,0 +1,147 @@ +/* + * mm/mbind.c + * + * Written by: Matthew Dobson, IBM Corporation + * + * Copyright (C) 2003, IBM Corp. + * + * All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE, GOOD TITLE or + * NON INFRINGEMENT. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Send feedback to + */ +#include +#include +#include +#include +#include + +/* Translate a cpumask to a nodemask */ +static inline void cpumask_to_nodemask(unsigned long * cpumask, unsigned long * nodemask) +{ + int i; + + for (i = 0; i < NR_CPUS; i++) + if (test_bit(i, cpumask)) + set_bit(cpu_to_node(i), nodemask); +} + +/* + * Adds the zones belonging to @pgdat to @zonelist. Returns the next + * index in @zonelist. + */ +static inline int add_node(pg_data_t *pgdat, struct zonelist *zonelist, int zone_num) +{ + int i; + struct zone *zone; + + for (i = MAX_NR_ZONES-1; i >=0 ; i--) { + zone = pgdat->node_zones + i; + if (zone->present_pages) + zonelist->zones[zone_num++] = zone; + } + return zone_num; +} + +/* Builds a binding for a region of memory, based on a bitmask of nodes. */ +static inline int build_binding(unsigned long * nodemask, struct binding *binding) +{ + int node, zone_num; + + memset(binding, 0, sizeof(struct binding)); + + /* Build binding zonelist */ + for (node = 0, zone_num = 0; node < MAX_NUMNODES; node++) + if (test_bit(node, nodemask) && node_online(node)) + zone_num = add_node(NODE_DATA(node), + &binding->zonelist, zone_num); + binding->zonelist.zones[zone_num] = NULL; + + if (zone_num == 0) + /* No zones were added to the zonelist. Let the caller know. */ + return -EINVAL; + + return 0; +} + + +/* + * mbind - Bind a range of a process' VM space to a set of memory blocks according to + * a predefined policy. + * @start: beginning address of memory region to bind + * @len: length of memory region to bind + * @mask_ptr: pointer to bitmask of cpus + * @mask_len: length of the bitmask + * @policy: flag specifying the policy to use for the segment + */ +asmlinkage unsigned long sys_mbind(unsigned long start, unsigned long len, + unsigned long *mask_ptr, unsigned int mask_len, unsigned long policy) +{ + DECLARE_BITMAP(cpu_mask, NR_CPUS); + DECLARE_BITMAP(node_mask, MAX_NUMNODES); + struct vm_area_struct *vma = NULL; + struct address_space *mapping; + int copy_len, error = 0; + + /* Deal with getting cpu_mask from userspace & translating to node_mask */ + CLEAR_BITMAP(cpu_mask, NR_CPUS); + CLEAR_BITMAP(node_mask, MAX_NUMNODES); + copy_len = min(mask_len, (unsigned int)NR_CPUS); + if (copy_from_user(cpu_mask, mask_ptr, (copy_len+7)/8)) { + error = -EFAULT; + goto out; + } + cpumask_to_nodemask(cpu_mask, node_mask); + + down_read(¤t->mm->mmap_sem); + vma = find_vma(current->mm, start); + up_read(¤t->mm->mmap_sem); + /* This is an ugly, gross hack. This is purely because I've hurt my + * brain trying to come up with a brilliant way of implementing this + * for VMA's in general. Shared Memory VMA's lend themselves to binding + * both because of how they're implemented, and their actual uses. + * If anyone has a great place to squirrel-away some data about the + * requested binding, and a way to easily force the allocator to respect + * these bindings, then send a patch, or let me know. Otherwise, this + * will have to wait for a stroke of insight. + */ + if (!(vma && vma->vm_file && vma->vm_ops && + vma->vm_ops->nopage == shmem_nopage)) { + /* This isn't a shm segment. For now, we bail. */ + error = -EINVAL; + goto out; + } + + mapping = vma->vm_file->f_dentry->d_inode->i_mapping; + if (mapping->binding) { + kfree(mapping->binding); + mapping->binding = NULL; + } + mapping->binding = kmalloc(sizeof(struct binding), GFP_KERNEL); + if (!mapping->binding) { + error = -ENOMEM; + goto out; + } + error = build_binding(node_mask, mapping->binding); + if (error) { + kfree(mapping->binding); + mapping->binding = NULL; + } + +out: + return error; +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/mm/memory.c 999-mjb/mm/memory.c --- 000-virgin/mm/memory.c 2003-11-24 16:12:33.000000000 -0800 +++ 999-mjb/mm/memory.c 2003-11-24 16:34:49.000000000 -0800 @@ -109,8 +109,7 @@ static inline void free_one_pmd(struct m static inline void free_one_pgd(struct mmu_gather *tlb, pgd_t * dir) { - int j; - pmd_t * pmd; + pmd_t * pmd, * md, * emd; if (pgd_none(*dir)) return; @@ -121,8 +120,21 @@ static inline void free_one_pgd(struct m } pmd = pmd_offset(dir, 0); pgd_clear(dir); - for (j = 0; j < PTRS_PER_PMD ; j++) - free_one_pmd(tlb, pmd+j); + /* + * Beware if changing the loop below. It once used int j, + * for (j = 0; j < PTRS_PER_PMD; j++) + * free_one_pmd(pmd+j); + * but some older i386 compilers (e.g. egcs-2.91.66, gcc-2.95.3) + * terminated the loop with a _signed_ address comparison + * using "jle", when configured for HIGHMEM64GB (X86_PAE). + * If also configured for 3GB of kernel virtual address space, + * if page at physical 0x3ffff000 virtual 0x7ffff000 is used as + * a pmd, when that mm exits the loop goes on to free "entries" + * found at 0x80000000 onwards. The loop below compiles instead + * to be terminated by unsigned address comparison using "jb". + */ + for (md = pmd, emd = pmd + PTRS_PER_PMD; md < emd; md++) + free_one_pmd(tlb,md); pmd_free_tlb(tlb, pmd); } @@ -326,7 +338,7 @@ skip_copy_pte_range: pte = pte_mkclean(pte); pte = pte_mkold(pte); get_page(page); - dst->rss++; + inc_rss(dst, page); set_pte(dst_pte, pte); pte_chain = page_add_rmap(page, dst_pte, @@ -418,7 +430,14 @@ zap_pte_range(struct mmu_gather *tlb, pm if (page->mapping && pte_young(pte) && !PageSwapCache(page)) mark_page_accessed(page); - tlb->freed++; + /* + * While we have the page that is being + * freed handy, make sure we decrement + * the mm's RSS accordingly. This is + * only important for NUMA per-node + * RSS accounting. + */ + dec_rss(tlb->mm, page); page_remove_rmap(page, ptep); tlb_remove_page(tlb, page); } @@ -1052,9 +1071,10 @@ static int do_wp_page(struct mm_struct * page_table = pte_offset_map(pmd, address); if (pte_same(*page_table, pte)) { if (PageReserved(old_page)) - ++mm->rss; + inc_rss(mm, new_page); page_remove_rmap(old_page, page_table); break_cow(vma, new_page, address, page_table); + SetPageAnon(new_page); pte_chain = page_add_rmap(new_page, page_table, pte_chain); lru_cache_add_active(new_page); @@ -1286,7 +1306,7 @@ static int do_swap_page(struct mm_struct if (vm_swap_full()) remove_exclusive_swap_page(page); - mm->rss++; + inc_rss(mm, page); pte = mk_pte(page, vma->vm_page_prot); if (write_access && can_share_swap_page(page)) pte = pte_mkdirty(pte_mkwrite(pte)); @@ -1294,6 +1314,7 @@ static int do_swap_page(struct mm_struct flush_icache_page(vma, page); set_pte(page_table, pte); + SetPageAnon(page); pte_chain = page_add_rmap(page, page_table, pte_chain); /* No need to invalidate - it was non-present before */ @@ -1355,10 +1376,11 @@ do_anonymous_page(struct mm_struct *mm, ret = VM_FAULT_MINOR; goto out; } - mm->rss++; + inc_rss(mm, page); entry = pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot))); lru_cache_add_active(page); mark_page_accessed(page); + SetPageAnon(page); } set_pte(page_table, entry); @@ -1426,6 +1448,10 @@ retry: if (!pte_chain) goto oom; + /* See if nopage returned an anon page */ + if (!new_page->mapping || PageSwapCache(new_page)) + SetPageAnon(new_page); + /* * Should we do an early C-O-W break? */ @@ -1438,6 +1464,7 @@ retry: copy_user_highpage(page, new_page, address); page_cache_release(new_page); lru_cache_add_active(page); + SetPageAnon(page); new_page = page; } @@ -1470,7 +1497,7 @@ retry: /* Only go through if we didn't race with anybody else... */ if (pte_none(*page_table)) { if (!PageReserved(new_page)) - ++mm->rss; + inc_rss(mm, new_page); flush_icache_page(vma, new_page); entry = mk_pte(new_page, vma->vm_page_prot); if (write_access) diff -purN -X /home/mbligh/.diff.exclude 000-virgin/mm/mmap.c 999-mjb/mm/mmap.c --- 000-virgin/mm/mmap.c 2003-10-27 10:41:16.000000000 -0800 +++ 999-mjb/mm/mmap.c 2003-11-24 16:34:49.000000000 -0800 @@ -268,9 +268,7 @@ static void vma_link(struct mm_struct *m if (mapping) down(&mapping->i_shared_sem); - spin_lock(&mm->page_table_lock); __vma_link(mm, vma, prev, rb_link, rb_parent); - spin_unlock(&mm->page_table_lock); if (mapping) up(&mapping->i_shared_sem); @@ -319,6 +317,22 @@ static inline int is_mergeable_vma(struc return 1; } +/* requires that the relevant i_shared_sem be held by the caller */ +static void move_vma_start(struct vm_area_struct *vma, unsigned long addr) +{ + struct inode *inode = NULL; + + if (vma->vm_file) + inode = vma->vm_file->f_dentry->d_inode; + if (inode) + __remove_shared_vm_struct(vma, inode); + /* If no vm_file, perhaps we should always keep vm_pgoff at 0?? */ + vma->vm_pgoff += (long)(addr - vma->vm_start) >> PAGE_SHIFT; + vma->vm_start = addr; + if (inode) + __vma_link_file(vma); +} + /* * Return true if we can merge this (vm_flags,file,vm_pgoff,size) * in front of (at a lower virtual address and file offset than) the vma. @@ -371,7 +385,6 @@ static int vma_merge(struct mm_struct *m unsigned long end, unsigned long vm_flags, struct file *file, unsigned long pgoff) { - spinlock_t *lock = &mm->page_table_lock; struct inode *inode = file ? file->f_dentry->d_inode : NULL; struct semaphore *i_shared_sem; @@ -403,7 +416,6 @@ static int vma_merge(struct mm_struct *m down(i_shared_sem); need_up = 1; } - spin_lock(lock); prev->vm_end = end; /* @@ -416,7 +428,6 @@ static int vma_merge(struct mm_struct *m prev->vm_end = next->vm_end; __vma_unlink(mm, next, prev); __remove_shared_vm_struct(next, inode); - spin_unlock(lock); if (need_up) up(i_shared_sem); if (file) @@ -426,7 +437,6 @@ static int vma_merge(struct mm_struct *m kmem_cache_free(vm_area_cachep, next); return 1; } - spin_unlock(lock); if (need_up) up(i_shared_sem); return 1; @@ -444,10 +454,7 @@ static int vma_merge(struct mm_struct *m if (end == prev->vm_start) { if (file) down(i_shared_sem); - spin_lock(lock); - prev->vm_start = addr; - prev->vm_pgoff -= (end - addr) >> PAGE_SHIFT; - spin_unlock(lock); + move_vma_start(prev, addr); if (file) up(i_shared_sem); return 1; @@ -901,19 +908,16 @@ int expand_stack(struct vm_area_struct * */ address += 4 + PAGE_SIZE - 1; address &= PAGE_MASK; - spin_lock(&vma->vm_mm->page_table_lock); grow = (address - vma->vm_end) >> PAGE_SHIFT; /* Overcommit.. */ if (security_vm_enough_memory(grow)) { - spin_unlock(&vma->vm_mm->page_table_lock); return -ENOMEM; } if (address - vma->vm_start > current->rlim[RLIMIT_STACK].rlim_cur || ((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) > current->rlim[RLIMIT_AS].rlim_cur) { - spin_unlock(&vma->vm_mm->page_table_lock); vm_unacct_memory(grow); return -ENOMEM; } @@ -921,7 +925,6 @@ int expand_stack(struct vm_area_struct * vma->vm_mm->total_vm += grow; if (vma->vm_flags & VM_LOCKED) vma->vm_mm->locked_vm += grow; - spin_unlock(&vma->vm_mm->page_table_lock); return 0; } @@ -955,19 +958,16 @@ int expand_stack(struct vm_area_struct * * the spinlock only before relocating the vma range ourself. */ address &= PAGE_MASK; - spin_lock(&vma->vm_mm->page_table_lock); grow = (vma->vm_start - address) >> PAGE_SHIFT; /* Overcommit.. */ if (security_vm_enough_memory(grow)) { - spin_unlock(&vma->vm_mm->page_table_lock); return -ENOMEM; } if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur || ((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) > current->rlim[RLIMIT_AS].rlim_cur) { - spin_unlock(&vma->vm_mm->page_table_lock); vm_unacct_memory(grow); return -ENOMEM; } @@ -976,7 +976,6 @@ int expand_stack(struct vm_area_struct * vma->vm_mm->total_vm += grow; if (vma->vm_flags & VM_LOCKED) vma->vm_mm->locked_vm += grow; - spin_unlock(&vma->vm_mm->page_table_lock); return 0; } @@ -1139,8 +1138,6 @@ static void unmap_region(struct mm_struc /* * Create a list of vma's touched by the unmap, removing them from the mm's * vma list as we go.. - * - * Called with the page_table_lock held. */ static void detach_vmas_to_be_unmapped(struct mm_struct *mm, struct vm_area_struct *vma, @@ -1203,10 +1200,9 @@ int split_vma(struct mm_struct * mm, str down(&mapping->i_shared_sem); spin_lock(&mm->page_table_lock); - if (new_below) { - vma->vm_start = addr; - vma->vm_pgoff += ((addr - new->vm_start) >> PAGE_SHIFT); - } else + if (new_below) + move_vma_start(vma, addr); + else vma->vm_end = addr; __insert_vm_struct(mm, new); @@ -1280,8 +1276,8 @@ int do_munmap(struct mm_struct *mm, unsi /* * Remove the vma's, and unmap the actual pages */ - spin_lock(&mm->page_table_lock); detach_vmas_to_be_unmapped(mm, mpnt, prev, end); + spin_lock(&mm->page_table_lock); unmap_region(mm, mpnt, prev, start, end); spin_unlock(&mm->page_table_lock); @@ -1437,7 +1433,7 @@ void exit_mmap(struct mm_struct *mm) vma = mm->mmap; mm->mmap = mm->mmap_cache = NULL; mm->mm_rb = RB_ROOT; - mm->rss = 0; + zero_rss(mm); mm->total_vm = 0; mm->locked_vm = 0; diff -purN -X /home/mbligh/.diff.exclude 000-virgin/mm/page-writeback.c 999-mjb/mm/page-writeback.c --- 000-virgin/mm/page-writeback.c 2003-10-21 11:16:13.000000000 -0700 +++ 999-mjb/mm/page-writeback.c 2003-11-24 16:35:33.000000000 -0800 @@ -469,12 +469,12 @@ int write_one_page(struct page *page, in if (wait) wait_on_page_writeback(page); - spin_lock(&mapping->page_lock); + mapping_wrlock(&mapping->page_lock); list_del(&page->list); if (test_clear_page_dirty(page)) { list_add(&page->list, &mapping->locked_pages); page_cache_get(page); - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); ret = mapping->a_ops->writepage(page, &wbc); if (ret == 0 && wait) { wait_on_page_writeback(page); @@ -484,7 +484,7 @@ int write_one_page(struct page *page, in page_cache_release(page); } else { list_add(&page->list, &mapping->clean_pages); - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); unlock_page(page); } return ret; @@ -512,7 +512,7 @@ int __set_page_dirty_nobuffers(struct pa struct address_space *mapping = page->mapping; if (mapping) { - spin_lock(&mapping->page_lock); + mapping_wrlock(&mapping->page_lock); if (page->mapping) { /* Race with truncate? */ BUG_ON(page->mapping != mapping); if (!mapping->backing_dev_info->memory_backed) @@ -520,7 +520,7 @@ int __set_page_dirty_nobuffers(struct pa list_del(&page->list); list_add(&page->list, &mapping->dirty_pages); } - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); if (!PageSwapCache(page)) __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/mm/page_alloc.c 999-mjb/mm/page_alloc.c --- 000-virgin/mm/page_alloc.c 2003-10-14 15:50:36.000000000 -0700 +++ 999-mjb/mm/page_alloc.c 2003-11-24 16:35:28.000000000 -0800 @@ -225,6 +225,8 @@ static inline void free_pages_check(cons bad_page(function, page); if (PageDirty(page)) ClearPageDirty(page); + if (PageAnon(page)) + ClearPageAnon(page); } /* @@ -562,6 +564,10 @@ __alloc_pages(unsigned int gfp_mask, uns struct zone *z = zones[i]; unsigned long local_low; + if ((__GFP_NODE_STRICT & gfp_mask) && + (pfn_to_nid(z->zone_start_pfn) != numa_node_id())) + continue; + /* * This is the fabled 'incremental min'. We let real-time tasks * dip their real-time paws a little deeper into reserves. diff -purN -X /home/mbligh/.diff.exclude 000-virgin/mm/readahead.c 999-mjb/mm/readahead.c --- 000-virgin/mm/readahead.c 2003-10-14 15:50:36.000000000 -0700 +++ 999-mjb/mm/readahead.c 2003-11-24 16:35:33.000000000 -0800 @@ -229,7 +229,7 @@ __do_page_cache_readahead(struct address /* * Preallocate as many pages as we will need. */ - spin_lock(&mapping->page_lock); + mapping_rdlock(&mapping->page_lock); for (page_idx = 0; page_idx < nr_to_read; page_idx++) { unsigned long page_offset = offset + page_idx; @@ -240,16 +240,16 @@ __do_page_cache_readahead(struct address if (page) continue; - spin_unlock(&mapping->page_lock); + mapping_rdunlock(&mapping->page_lock); page = page_cache_alloc_cold(mapping); - spin_lock(&mapping->page_lock); + mapping_rdlock(&mapping->page_lock); if (!page) break; page->index = page_offset; list_add(&page->list, &page_pool); ret++; } - spin_unlock(&mapping->page_lock); + mapping_rdunlock(&mapping->page_lock); /* * Now start the IO. We ignore I/O errors - if the page is not diff -purN -X /home/mbligh/.diff.exclude 000-virgin/mm/rmap.c 999-mjb/mm/rmap.c --- 000-virgin/mm/rmap.c 2003-10-01 11:47:15.000000000 -0700 +++ 999-mjb/mm/rmap.c 2003-11-24 16:34:49.000000000 -0800 @@ -102,6 +102,136 @@ pte_chain_encode(struct pte_chain *pte_c **/ /** + * find_pte - Find a pte pointer given a vma and a struct page. + * @vma: the vma to search + * @page: the page to find + * + * Determine if this page is mapped in this vma. If it is, map and rethrn + * the pte pointer associated with it. Return null if the page is not + * mapped in this vma for any reason. + * + * This is strictly an internal helper function for the object-based rmap + * functions. + * + * It is the caller's responsibility to unmap the pte if it is returned. + */ +static inline pte_t * +find_pte(struct vm_area_struct *vma, struct page *page, unsigned long *addr) +{ + struct mm_struct *mm = vma->vm_mm; + pgd_t *pgd; + pmd_t *pmd; + pte_t *pte; + unsigned long loffset; + unsigned long address; + + loffset = (page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT)); + address = vma->vm_start + ((loffset - vma->vm_pgoff) << PAGE_SHIFT); + if (address < vma->vm_start || address >= vma->vm_end) + goto out; + + pgd = pgd_offset(mm, address); + if (!pgd_present(*pgd)) + goto out; + + pmd = pmd_offset(pgd, address); + if (!pmd_present(*pmd)) + goto out; + + pte = pte_offset_map(pmd, address); + if (!pte_present(*pte)) + goto out_unmap; + + if (page_to_pfn(page) != pte_pfn(*pte)) + goto out_unmap; + + if (addr) + *addr = address; + + return pte; + +out_unmap: + pte_unmap(pte); +out: + return NULL; +} + +/** + * page_referenced_obj_one - referenced check for object-based rmap + * @vma: the vma to look in. + * @page: the page we're working on. + * + * Find a pte entry for a page/vma pair, then check and clear the referenced + * bit. + * + * This is strictly a helper function for page_referenced_obj. + */ +static int +page_referenced_obj_one(struct vm_area_struct *vma, struct page *page) +{ + struct mm_struct *mm = vma->vm_mm; + pte_t *pte; + int referenced = 0; + + if (!spin_trylock(&mm->page_table_lock)) + return 1; + + pte = find_pte(vma, page, NULL); + if (pte) { + if (ptep_test_and_clear_young(pte)) + referenced++; + pte_unmap(pte); + } + + spin_unlock(&mm->page_table_lock); + return referenced; +} + +/** + * page_referenced_obj_one - referenced check for object-based rmap + * @page: the page we're checking references on. + * + * For an object-based mapped page, find all the places it is mapped and + * check/clear the referenced flag. This is done by following the page->mapping + * pointer, then walking the chain of vmas it holds. It returns the number + * of references it found. + * + * This function is only called from page_referenced for object-based pages. + * + * The semaphore address_space->i_shared_sem is tried. If it can't be gotten, + * assume a reference count of 1. + */ +static int +page_referenced_obj(struct page *page) +{ + struct address_space *mapping = page->mapping; + struct vm_area_struct *vma; + int referenced = 0; + + if (!page->pte.mapcount) + return 0; + + if (!mapping) + BUG(); + + if (PageSwapCache(page)) + BUG(); + + if (down_trylock(&mapping->i_shared_sem)) + return 1; + + list_for_each_entry(vma, &mapping->i_mmap, shared) + referenced += page_referenced_obj_one(vma, page); + + list_for_each_entry(vma, &mapping->i_mmap_shared, shared) + referenced += page_referenced_obj_one(vma, page); + + up(&mapping->i_shared_sem); + + return referenced; +} + +/** * page_referenced - test if the page was referenced * @page: the page to test * @@ -120,6 +250,10 @@ int page_referenced(struct page * page) if (TestClearPageReferenced(page)) referenced++; + if (!PageAnon(page)) { + referenced += page_referenced_obj(page); + goto out; + } if (PageDirect(page)) { pte_t *pte = rmap_ptep_map(page->pte.direct); if (ptep_test_and_clear_young(pte)) @@ -153,6 +287,7 @@ int page_referenced(struct page * page) __pte_chain_free(pc); } } +out: return referenced; } @@ -175,6 +310,21 @@ page_add_rmap(struct page *page, pte_t * pte_chain_lock(page); + /* + * If this is an object-based page, just count it. We can + * find the mappings by walking the object vma chain for that object. + */ + if (!PageAnon(page)) { + if (!page->mapping) + BUG(); + if (PageSwapCache(page)) + BUG(); + if (!page->pte.mapcount) + inc_page_state(nr_mapped); + page->pte.mapcount++; + goto out; + } + if (page->pte.direct == 0) { page->pte.direct = pte_paddr; SetPageDirect(page); @@ -231,8 +381,25 @@ void page_remove_rmap(struct page *page, pte_chain_lock(page); if (!page_mapped(page)) - goto out_unlock; /* remap_page_range() from a driver? */ + goto out_unlock; + /* + * If this is an object-based page, just uncount it. We can + * find the mappings by walking the object vma chain for that object. + */ + if (!PageAnon(page)) { + if (!page->mapping) + BUG(); + if (PageSwapCache(page)) + BUG(); + if (!page->pte.mapcount) + BUG(); + page->pte.mapcount--; + if (!page->pte.mapcount) + dec_page_state(nr_mapped); + goto out_unlock; + } + if (PageDirect(page)) { if (page->pte.direct == pte_paddr) { page->pte.direct = 0; @@ -279,6 +446,102 @@ out_unlock: } /** + * try_to_unmap_obj - unmap a page using the object-based rmap method + * @page: the page to unmap + * + * Determine whether a page is mapped in a given vma and unmap it if it's found. + * + * This function is strictly a helper function for try_to_unmap_obj. + */ +static inline int +try_to_unmap_obj_one(struct vm_area_struct *vma, struct page *page) +{ + struct mm_struct *mm = vma->vm_mm; + unsigned long address; + pte_t *pte; + pte_t pteval; + int ret = SWAP_AGAIN; + + if (!spin_trylock(&mm->page_table_lock)) + return ret; + + pte = find_pte(vma, page, &address); + if (!pte) + goto out; + + if (vma->vm_flags & VM_LOCKED) { + ret = SWAP_FAIL; + goto out_unmap; + } + + flush_cache_page(vma, address); + pteval = ptep_get_and_clear(pte); + flush_tlb_page(vma, address); + + if (pte_dirty(pteval)) + set_page_dirty(page); + + if (!page->pte.mapcount) + BUG(); + + mm->rss--; + page->pte.mapcount--; + page_cache_release(page); + +out_unmap: + pte_unmap(pte); + +out: + spin_unlock(&mm->page_table_lock); + return ret; +} + +/** + * try_to_unmap_obj - unmap a page using the object-based rmap method + * @page: the page to unmap + * + * Find all the mappings of a page using the mapping pointer and the vma chains + * contained in the address_space struct it points to. + * + * This function is only called from try_to_unmap for object-based pages. + * + * The semaphore address_space->i_shared_sem is tried. If it can't be gotten, + * return a temporary error. + */ +static int +try_to_unmap_obj(struct page *page) +{ + struct address_space *mapping = page->mapping; + struct vm_area_struct *vma; + int ret = SWAP_AGAIN; + + if (!mapping) + BUG(); + + if (PageSwapCache(page)) + BUG(); + + if (down_trylock(&mapping->i_shared_sem)) + return ret; + + list_for_each_entry(vma, &mapping->i_mmap, shared) { + ret = try_to_unmap_obj_one(vma, page); + if (ret == SWAP_FAIL || !page->pte.mapcount) + goto out; + } + + list_for_each_entry(vma, &mapping->i_mmap_shared, shared) { + ret = try_to_unmap_obj_one(vma, page); + if (ret == SWAP_FAIL || !page->pte.mapcount) + goto out; + } + +out: + up(&mapping->i_shared_sem); + return ret; +} + +/** * try_to_unmap_one - worker function for try_to_unmap * @page: page to unmap * @ptep: page table entry to unmap from page @@ -360,7 +623,7 @@ static int try_to_unmap_one(struct page if (pte_dirty(pte)) set_page_dirty(page); - mm->rss--; + dec_rss(mm, page); page_cache_release(page); ret = SWAP_SUCCESS; @@ -397,6 +660,15 @@ int try_to_unmap(struct page * page) if (!page->mapping) BUG(); + /* + * If it's an object-based page, use the object vma chain to find all + * the mappings. + */ + if (!PageAnon(page)) { + ret = try_to_unmap_obj(page); + goto out; + } + if (PageDirect(page)) { ret = try_to_unmap_one(page, page->pte.direct); if (ret == SWAP_SUCCESS) { @@ -452,12 +724,115 @@ int try_to_unmap(struct page * page) } } out: - if (!page_mapped(page)) + if (!page_mapped(page)) { dec_page_state(nr_mapped); + ret = SWAP_SUCCESS; + } return ret; } /** + * page_convert_anon - Convert an object-based mapped page to pte_chain-based. + * @page: the page to convert + * + * Find all the mappings for an object-based page and convert them + * to 'anonymous', ie create a pte_chain and store all the pte pointers there. + * + * This function takes the address_space->i_shared_sem, sets the PageAnon flag, + * then sets the mm->page_table_lock for each vma and calls page_add_rmap. This + * means there is a period when PageAnon is set, but still has some mappings + * with no pte_chain entry. This is in fact safe, since page_remove_rmap will + * simply not find it. try_to_unmap might erroneously return success, but it + * will never be called because the page_convert_anon() caller has locked the + * page. + * + * page_referenced() may fail to scan all the appropriate pte's and may return + * an inaccurate result. This is so rare that it does not matter. + */ +int page_convert_anon(struct page *page) +{ + struct address_space *mapping; + struct vm_area_struct *vma; + struct pte_chain *pte_chain = NULL; + pte_t *pte; + int err = 0; + + mapping = page->mapping; + if (mapping == NULL) + goto out; /* truncate won the lock_page() race */ + + down(&mapping->i_shared_sem); + pte_chain_lock(page); + + /* + * Has someone else done it for us before we got the lock? + * If so, pte.direct or pte.chain has replaced pte.mapcount. + */ + if (PageAnon(page)) { + pte_chain_unlock(page); + goto out_unlock; + } + + SetPageAnon(page); + if (page->pte.mapcount == 0) { + pte_chain_unlock(page); + goto out_unlock; + } + /* This is gonna get incremented by page_add_rmap */ + dec_page_state(nr_mapped); + page->pte.mapcount = 0; + + /* + * Now that the page is marked as anon, unlock it. page_add_rmap will + * lock it as necessary. + */ + pte_chain_unlock(page); + + list_for_each_entry(vma, &mapping->i_mmap, shared) { + if (!pte_chain) { + pte_chain = pte_chain_alloc(GFP_KERNEL); + if (!pte_chain) { + err = -ENOMEM; + goto out_unlock; + } + } + spin_lock(&vma->vm_mm->page_table_lock); + pte = find_pte(vma, page, NULL); + if (pte) { + /* Make sure this isn't a duplicate */ + page_remove_rmap(page, pte); + pte_chain = page_add_rmap(page, pte, pte_chain); + pte_unmap(pte); + } + spin_unlock(&vma->vm_mm->page_table_lock); + } + list_for_each_entry(vma, &mapping->i_mmap_shared, shared) { + if (!pte_chain) { + pte_chain = pte_chain_alloc(GFP_KERNEL); + if (!pte_chain) { + err = -ENOMEM; + goto out_unlock; + } + } + spin_lock(&vma->vm_mm->page_table_lock); + pte = find_pte(vma, page, NULL); + if (pte) { + /* Make sure this isn't a duplicate */ + page_remove_rmap(page, pte); + pte_chain = page_add_rmap(page, pte, pte_chain); + pte_unmap(pte); + } + spin_unlock(&vma->vm_mm->page_table_lock); + } + +out_unlock: + pte_chain_free(pte_chain); + up(&mapping->i_shared_sem); +out: + return err; +} + +/** ** No more VM stuff below this comment, only pte_chain helper ** functions. **/ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/mm/slab.c 999-mjb/mm/slab.c --- 000-virgin/mm/slab.c 2003-10-27 10:41:16.000000000 -0800 +++ 999-mjb/mm/slab.c 2003-11-25 14:19:02.000000000 -0800 @@ -479,6 +479,19 @@ static struct cache_names { #undef CACHE }; +/* Adjustments to cache size limit based on memory size */ +static int cache_limit_multiplier_norm; +static int cache_limit_multiplier_dma; + +struct cache_multipliers { + int memsize; + int mult; +} cache_multipliers[] = { + {0x40000, 4}, + {0x10000, 2}, + {0x0, 1} +}; + struct arraycache_init initarray_cache __initdata = { { 0, BOOT_CPUCACHE_ENTRIES, 1, 0} }; struct arraycache_init initarray_generic __initdata = { { 0, BOOT_CPUCACHE_ENTRIES, 1, 0} }; @@ -661,6 +674,9 @@ void __init kmem_cache_init(void) size_t left_over; struct cache_sizes *sizes; struct cache_names *names; + unsigned long dmasize, normsize; + pg_data_t *pgdat; + int i; /* * Fragmentation resistance on low memory - only use bigger @@ -669,7 +685,21 @@ void __init kmem_cache_init(void) if (num_physpages > (32 << 20) >> PAGE_SHIFT) slab_break_gfp_order = BREAK_GFP_ORDER_HI; - + /* + * Increase cache limits based on the amount of memory in various + * zones. + */ + dmasize = normsize = 0; + for_each_pgdat(pgdat) { + dmasize += pgdat->node_zones[ZONE_DMA].present_pages; + normsize += pgdat->node_zones[ZONE_NORMAL].present_pages; + } + for (i = 0; dmasize < cache_multipliers[i].memsize; i++); + cache_limit_multiplier_dma = cache_multipliers[i].mult; + normsize += dmasize; + for (i = 0; normsize < cache_multipliers[i].memsize; i++); + cache_limit_multiplier_norm = cache_multipliers[i].mult; + /* Bootstrap is tricky, because several objects are allocated * from caches that do not exist yet: * 1) initialize the cache_cache cache: it contains the kmem_cache_t @@ -2356,6 +2386,11 @@ static void enable_cpucache (kmem_cache_ else limit = 120; + if (cachep->gfpflags & GFP_DMA) + limit *= cache_limit_multiplier_dma; + else + limit *= cache_limit_multiplier_norm; + /* Cpu bound tasks (e.g. network routing) can exhibit cpu bound * allocation behaviour: Most allocs on one cpu, most free operations * on another cpu. For these cases, an efficient object passing between @@ -2544,7 +2579,7 @@ static void *s_start(struct seq_file *m, seq_puts(m, "slabinfo - version: 2.0\n"); #endif seq_puts(m, "# name "); - seq_puts(m, " : tunables "); + seq_puts(m, " : tunables "); seq_puts(m, " : slabdata "); #if STATS seq_puts(m, " : globalstat "); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/mm/swap_state.c 999-mjb/mm/swap_state.c --- 000-virgin/mm/swap_state.c 2003-10-01 11:35:37.000000000 -0700 +++ 999-mjb/mm/swap_state.c 2003-11-24 16:35:33.000000000 -0800 @@ -25,7 +25,7 @@ extern struct address_space_operations s struct address_space swapper_space = { .page_tree = RADIX_TREE_INIT(GFP_ATOMIC), - .page_lock = SPIN_LOCK_UNLOCKED, + .page_lock = MAPPING_RW_LOCK_UNLOCKED, .clean_pages = LIST_HEAD_INIT(swapper_space.clean_pages), .dirty_pages = LIST_HEAD_INIT(swapper_space.dirty_pages), .io_pages = LIST_HEAD_INIT(swapper_space.io_pages), @@ -182,9 +182,9 @@ void delete_from_swap_cache(struct page entry.val = page->index; - spin_lock(&swapper_space.page_lock); + mapping_wrlock(&swapper_space.page_lock); __delete_from_swap_cache(page); - spin_unlock(&swapper_space.page_lock); + mapping_wrunlock(&swapper_space.page_lock); swap_free(entry); page_cache_release(page); @@ -195,8 +195,8 @@ int move_to_swap_cache(struct page *page struct address_space *mapping = page->mapping; int err; - spin_lock(&swapper_space.page_lock); - spin_lock(&mapping->page_lock); + mapping_wrlock(&swapper_space.page_lock); + mapping_wrlock(&mapping->page_lock); err = radix_tree_insert(&swapper_space.page_tree, entry.val, page); if (!err) { @@ -204,8 +204,8 @@ int move_to_swap_cache(struct page *page ___add_to_page_cache(page, &swapper_space, entry.val); } - spin_unlock(&mapping->page_lock); - spin_unlock(&swapper_space.page_lock); + mapping_wrunlock(&mapping->page_lock); + mapping_wrunlock(&swapper_space.page_lock); if (!err) { if (!swap_duplicate(entry)) @@ -231,8 +231,8 @@ int move_from_swap_cache(struct page *pa entry.val = page->index; - spin_lock(&swapper_space.page_lock); - spin_lock(&mapping->page_lock); + mapping_wrlock(&swapper_space.page_lock); + mapping_wrlock(&mapping->page_lock); err = radix_tree_insert(&mapping->page_tree, index, page); if (!err) { @@ -240,8 +240,8 @@ int move_from_swap_cache(struct page *pa ___add_to_page_cache(page, mapping, index); } - spin_unlock(&mapping->page_lock); - spin_unlock(&swapper_space.page_lock); + mapping_wrunlock(&mapping->page_lock); + mapping_wrunlock(&swapper_space.page_lock); if (!err) { swap_free(entry); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/mm/swapfile.c 999-mjb/mm/swapfile.c --- 000-virgin/mm/swapfile.c 2003-10-21 11:16:13.000000000 -0700 +++ 999-mjb/mm/swapfile.c 2003-11-24 16:35:33.000000000 -0800 @@ -253,10 +253,10 @@ static int exclusive_swap_page(struct pa /* Is the only swap cache user the cache itself? */ if (p->swap_map[swp_offset(entry)] == 1) { /* Recheck the page count with the pagecache lock held.. */ - spin_lock(&swapper_space.page_lock); + mapping_rdlock(&swapper_space.page_lock); if (page_count(page) - !!PagePrivate(page) == 2) retval = 1; - spin_unlock(&swapper_space.page_lock); + mapping_rdunlock(&swapper_space.page_lock); } swap_info_put(p); } @@ -324,13 +324,13 @@ int remove_exclusive_swap_page(struct pa retval = 0; if (p->swap_map[swp_offset(entry)] == 1) { /* Recheck the page count with the pagecache lock held.. */ - spin_lock(&swapper_space.page_lock); + mapping_wrlock(&swapper_space.page_lock); if ((page_count(page) == 2) && !PageWriteback(page)) { __delete_from_swap_cache(page); SetPageDirty(page); retval = 1; } - spin_unlock(&swapper_space.page_lock); + mapping_wrunlock(&swapper_space.page_lock); } swap_info_put(p); @@ -387,9 +387,10 @@ static void unuse_pte(struct vm_area_struct *vma, unsigned long address, pte_t *dir, swp_entry_t entry, struct page *page, struct pte_chain **pte_chainp) { - vma->vm_mm->rss++; + inc_rss(vma->vm_mm, page); get_page(page); set_pte(dir, pte_mkold(mk_pte(page, vma->vm_page_prot))); + SetPageAnon(page); *pte_chainp = page_add_rmap(page, dir, *pte_chainp); swap_free(entry); } @@ -498,6 +499,7 @@ static int unuse_process(struct mm_struc /* * Go through process' page directory. */ + down_read(&mm->mmap_sem); spin_lock(&mm->page_table_lock); for (vma = mm->mmap; vma; vma = vma->vm_next) { pgd_t * pgd = pgd_offset(mm, vma->vm_start); @@ -505,6 +507,7 @@ static int unuse_process(struct mm_struc break; } spin_unlock(&mm->page_table_lock); + up_read(&mm->mmap_sem); pte_chain_free(pte_chain); return 0; } diff -purN -X /home/mbligh/.diff.exclude 000-virgin/mm/truncate.c 999-mjb/mm/truncate.c --- 000-virgin/mm/truncate.c 2003-10-14 15:50:36.000000000 -0700 +++ 999-mjb/mm/truncate.c 2003-11-24 16:35:33.000000000 -0800 @@ -74,13 +74,13 @@ invalidate_complete_page(struct address_ if (PagePrivate(page) && !try_to_release_page(page, 0)) return 0; - spin_lock(&mapping->page_lock); + mapping_wrlock(&mapping->page_lock); if (PageDirty(page)) { - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); return 0; } __remove_from_page_cache(page); - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); ClearPageUptodate(page); page_cache_release(page); /* pagecache ref */ return 1; diff -purN -X /home/mbligh/.diff.exclude 000-virgin/mm/vmscan.c 999-mjb/mm/vmscan.c --- 000-virgin/mm/vmscan.c 2003-10-14 15:50:36.000000000 -0700 +++ 999-mjb/mm/vmscan.c 2003-11-24 16:36:43.000000000 -0800 @@ -47,7 +47,7 @@ /* * From 0 .. 100. Higher means more swappy. */ -int vm_swappiness = 60; +int vm_swappiness = 0; static long total_memory; #ifdef ARCH_HAS_PREFETCH @@ -358,7 +358,7 @@ shrink_list(struct list_head *page_list, goto keep_locked; if (!may_write_to_queue(mapping->backing_dev_info)) goto keep_locked; - spin_lock(&mapping->page_lock); + mapping_wrlock(&mapping->page_lock); if (test_clear_page_dirty(page)) { int res; struct writeback_control wbc = { @@ -369,7 +369,7 @@ shrink_list(struct list_head *page_list, }; list_move(&page->list, &mapping->locked_pages); - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); SetPageReclaim(page); res = mapping->a_ops->writepage(page, &wbc); @@ -385,7 +385,7 @@ shrink_list(struct list_head *page_list, } goto keep; } - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); } /* @@ -419,7 +419,7 @@ shrink_list(struct list_head *page_list, if (!mapping) goto keep_locked; /* truncate got there first */ - spin_lock(&mapping->page_lock); + mapping_wrlock(&mapping->page_lock); /* * The non-racy check for busy page. It is critical to check @@ -427,7 +427,7 @@ shrink_list(struct list_head *page_list, * not in use by anybody. (pagecache + us == 2) */ if (page_count(page) != 2 || PageDirty(page)) { - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); goto keep_locked; } @@ -435,7 +435,7 @@ shrink_list(struct list_head *page_list, if (PageSwapCache(page)) { swp_entry_t swap = { .val = page->index }; __delete_from_swap_cache(page); - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); swap_free(swap); __put_page(page); /* The pagecache ref */ goto free_it; @@ -443,7 +443,7 @@ shrink_list(struct list_head *page_list, #endif /* CONFIG_SWAP */ __remove_from_page_cache(page); - spin_unlock(&mapping->page_lock); + mapping_wrunlock(&mapping->page_lock); __put_page(page); free_it: @@ -600,6 +600,7 @@ refill_inactive_zone(struct zone *zone, LIST_HEAD(l_active); /* Pages to go onto the active_list */ struct page *page; struct pagevec pvec; + struct sysinfo i; int reclaim_mapped = 0; long mapped_ratio; long distress; @@ -642,6 +643,14 @@ refill_inactive_zone(struct zone *zone, mapped_ratio = (ps->nr_mapped * 100) / total_memory; /* + * Autoregulate vm_swappiness to be equal to the percentage of + * pages in physical ram that are application pages. -ck + */ + si_meminfo(&i); + vm_swappiness = 100 - (((i.freeram + get_page_cache_size() - + swapper_space.nrpages) * 100) / i.totalram); + + /* * Now decide how much we really want to unmap some pages. The mapped * ratio is downgraded - just because there's a lot of mapped memory * doesn't necessarily mean that page reclaim isn't succeeding. diff -purN -X /home/mbligh/.diff.exclude 000-virgin/net/core/dev.c 999-mjb/net/core/dev.c --- 000-virgin/net/core/dev.c 2003-11-24 16:12:33.000000000 -0800 +++ 999-mjb/net/core/dev.c 2003-11-24 16:14:01.000000000 -0800 @@ -111,6 +111,10 @@ #endif /* CONFIG_NET_RADIO */ #include +#ifdef CONFIG_KGDB +#include +#endif + /* This define, if set, will randomly drop a packet when congestion * is more than moderate. It helps fairness in the multi-interface * case when one of them is a hog, but it kills performance for the @@ -1380,7 +1384,6 @@ static void sample_queue(unsigned long d } #endif - /** * netif_rx - post buffer to the network code * @skb: buffer to post @@ -1405,6 +1408,21 @@ int netif_rx(struct sk_buff *skb) struct softnet_data *queue; unsigned long flags; +#ifdef CONFIG_KGDB + /* See if kgdb_eth wants this packet */ + if (!kgdb_net_interrupt(skb)) { + /* No.. if we're 'trapped' then junk it */ + if (kgdb_eth_is_trapped()) { + kfree_skb(skb); + return NET_RX_DROP; + } + } else { + /* kgdb_eth ate the packet... drop it silently */ + kfree_skb(skb); + return NET_RX_DROP; + } +#endif + if (!skb->stamp.tv_sec) do_gettimeofday(&skb->stamp); diff -purN -X /home/mbligh/.diff.exclude 000-virgin/net/ipv4/esp4.c 999-mjb/net/ipv4/esp4.c --- 000-virgin/net/ipv4/esp4.c 2003-10-01 11:41:19.000000000 -0700 +++ 999-mjb/net/ipv4/esp4.c 2003-11-25 14:18:53.000000000 -0800 @@ -10,6 +10,7 @@ #include #include #include +#include #define MAX_SG_ONSTACK 4 @@ -325,7 +326,15 @@ int esp_input(struct xfrm_state *x, stru skb->h.raw = skb_pull(skb, sizeof(struct ip_esp_hdr) + esp->conf.ivlen); skb->nh.raw += encap_len + sizeof(struct ip_esp_hdr) + esp->conf.ivlen; memcpy(skb->nh.raw, workbuf, iph->ihl*4); - skb->nh.iph->tot_len = htons(skb->len); + iph = skb->nh.iph; + iph->tot_len = htons(skb->len + (skb->data - skb->nh.raw)); + iph->check = 0; + iph->check = ip_fast_csum(skb->nh.raw, iph->ihl); + { + unsigned char *oldmac = skb->mac.raw; + skb->mac.raw += encap_len + sizeof(struct ip_esp_hdr) + esp->conf.ivlen; + memmove(skb->mac.raw, oldmac, skb->nh.raw - skb->mac.raw); + } } return 0; diff -purN -X /home/mbligh/.diff.exclude 000-virgin/net/ipv4/xfrm4_input.c 999-mjb/net/ipv4/xfrm4_input.c --- 000-virgin/net/ipv4/xfrm4_input.c 2003-10-01 11:41:20.000000000 -0700 +++ 999-mjb/net/ipv4/xfrm4_input.c 2003-11-25 14:18:53.000000000 -0800 @@ -93,13 +93,18 @@ int xfrm4_rcv_encap(struct sk_buff *skb, iph = skb->nh.iph; if (x->props.mode) { - if (iph->protocol != IPPROTO_IPIP) + if (iph->protocol == IPPROTO_IPIP) { + skb->nh.raw = skb->data; + if (!(x->props.flags & XFRM_STATE_NOECN)) + ipip_ecn_decapsulate(iph, skb); + iph = skb->nh.iph; + memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options)); + } else if (iph->protocol == 254) { + skb_push(skb, skb->data - skb->nh.raw); + } + else { goto drop; - skb->nh.raw = skb->data; - if (!(x->props.flags & XFRM_STATE_NOECN)) - ipip_ecn_decapsulate(iph, skb); - iph = skb->nh.iph; - memset(&(IPCB(skb)->opt), 0, sizeof(struct ip_options)); + } decaps = 1; break; } diff -purN -X /home/mbligh/.diff.exclude 000-virgin/scripts/Makefile.build 999-mjb/scripts/Makefile.build --- 000-virgin/scripts/Makefile.build 2003-10-14 15:50:40.000000000 -0700 +++ 999-mjb/scripts/Makefile.build 2003-11-24 16:35:18.000000000 -0800 @@ -128,7 +128,16 @@ cmd_cc_i_c = $(CPP) $(c_flags) - quiet_cmd_cc_o_c = CC $(quiet_modtag) $@ ifndef CONFIG_MODVERSIONS -cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< +new1_c_flags = $(c_flags:-I%=-I$(TOPDIR)/%) +new2_c_flags = $(new1_c_flags:-Wp%=) +PWD = $(TOPDIR) + +quiet_cmd_cc_o_c = CC $(quiet_modtag) $@ +cmd_cc_o_c = $(CC) $(c_flags) -E -o $@ $< \ + && cd $(dir $<) \ + && $(CC) $(new2_c_flags) -c -o $(notdir $@) $(notdir $<) \ + && cd $(TOPDIR) +#cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< else # When module versioning is enabled the following steps are executed: @@ -143,12 +152,21 @@ else # replace the unresolved symbols __crc_exported_symbol with # the actual value of the checksum generated by genksyms -cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $< +new1_c_flags = $(c_flags:-I%=-I$(TOPDIR)/%) +new2_c_flags = $(new1_c_flags:-Wp%=) +PWD = $(TOPDIR) + +quiet_cmd_cc_o_c = CC $(quiet_modtag) $@ +cmd_cc_o_c = $(CC) $(c_flags) -E -o $@ $< \ + && cd $(dir $<) \ + && $(CC) $(new2_c_flags) -c -o .tmp_$(@F) $(notdir $<) \ + && cd $(TOPDIR) +#cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $< cmd_modversions = \ if ! $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ mv $(@D)/.tmp_$(@F) $@; \ else \ - $(CPP) -D__GENKSYMS__ $(c_flags) $< \ + $(CPP) -D__GENKSYMS__ $(new2_c_flags) $< \ | $(GENKSYMS) \ > $(@D)/.tmp_$(@F:.o=.ver); \ \ diff -purN -X /home/mbligh/.diff.exclude 000-virgin/scripts/readcg-0.3/Makefile 999-mjb/scripts/readcg-0.3/Makefile --- 000-virgin/scripts/readcg-0.3/Makefile 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/scripts/readcg-0.3/Makefile 2003-11-24 16:35:58.000000000 -0800 @@ -0,0 +1,43 @@ +###################################################### +# readcg - Makefile # +# A super-simplistic make process. Any help making # +# this better is welcomed. # +###################################################### + +CROSS_COMPILE = /usr +CC = $(CROSS_COMPILE)/bin/g++ +CFLAGS = -g -Wall + +# Uncomment this for ppc64 machines +# CFLAGS += -D__powerpc64__ + +CPP_FILES = call_graph.cpp functions.cpp raw_graph.cpp readcg.cpp system_map.cpp +OBJ_FILES = call_graph.o functions.o raw_graph.o main.o system_map.o +CLEAN_FILES = $(OBJ_FILES) readcg +INSTALLROOT = /usr + +all: readcg + +readcg: $(OBJ_FILES) + $(CC) $(OBJ_FILES) -o $@ + +call_graph.o: call_graph.cpp + $(CC) $(CFLAGS) -c $< + +functions.o: functions.cpp + $(CC) $(CFLAGS) -c $< + +raw_graph.o: raw_graph.cpp + $(CC) $(CFLAGS) -c $< + +main.o: main.cpp + $(CC) $(CFLAGS) -c $< + +system_map.o: system_map.cpp + $(CC) $(CFLAGS) -c $< + +install: + install -s -m 0755 readcg $(INSTALLROOT)/sbin + +clean: + rm -f $(CLEAN_FILES) diff -purN -X /home/mbligh/.diff.exclude 000-virgin/scripts/readcg-0.3/README 999-mjb/scripts/readcg-0.3/README --- 000-virgin/scripts/readcg-0.3/README 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/scripts/readcg-0.3/README 2003-11-24 16:35:58.000000000 -0800 @@ -0,0 +1,44 @@ +READNE - readcg-0.2 + +10-14-03: Initial Release +10-20-03: Code rewrite in C++ to improve readabiliy and + flexibility. +10-30-03: Add support for 64-bit architectures (ppc64 for now). + +readcg is the utility for printing kernel call graphs. This +tool is in its early stages and most certainly has bugs. +Please email me to report bugs or to submit +patches. + + +KNOWN ISSUES: + +Some kernel functions call the same function from different +places. For this reason, seemingly duplicate entries can show +up in the call graph. There is some value in distinguishing +between these calls and I am currently working out the best +solution for displaying this case. Suggestions are welcome. + + +QUICK START: + +(1.) Obtain readcg-xx.tar.gz and kcg-X.X.X-V.patch from the lse + project page (www.sf.net/projects/lse). + +(2.) Patch your kernel and build it. Make sure 'Generate + function call graph' in the 'Kernel Hacking' section is + turned on. Install your kernel and boot it. + +(3.) Unpack readcg and descend into the readcg directory. + Edit the Makefile. Set CROSS_COMPILE to find the correct + g++ (the default should work for most people). If you + will be generating call graphs from a 64-bit kernel, + uncomment the line documented in the Makefile. Build the + tool by typing 'make'. + +(4.) To generate a call graph do the following: + readcg -c # Clear counters + readcg -e # Enable profiling + + readcg -d # Disable profiling + readcg -m # Generate call graph diff -purN -X /home/mbligh/.diff.exclude 000-virgin/scripts/readcg-0.3/call_graph.cpp 999-mjb/scripts/readcg-0.3/call_graph.cpp --- 000-virgin/scripts/readcg-0.3/call_graph.cpp 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/scripts/readcg-0.3/call_graph.cpp 2003-11-24 16:35:58.000000000 -0800 @@ -0,0 +1,103 @@ +#include +#include +#include +#include "call_graph.h" +#include "functions.h" + +call_graph::call_graph(string _graph_file, string map_file) +{ + graph_file = _graph_file; + raw_data = raw_graph(graph_file); + a2n = system_map(map_file); + parse_raw_graph(); +} + +void call_graph::cmd(const char c) +{ + ofstream out (graph_file.c_str()); + + if (!out.is_open()) { + perror(graph_file.c_str()); + exit(1); + } + + out.put(c); + out.close(); + return; +} + + +void call_graph::parse_raw_graph() +{ + unsigned long findex; + unsigned short from_bucket; + cg_arc_dest *to_bucket; + src_function src; + dest_function dest; + kaddress_t src_addr, dest_addr; + + for (findex = 0; findex < raw_data.get_num_buckets(); ++findex) { + src_addr = raw_data.get_from_address(findex); + from_bucket = raw_data.get_from_bucket(0, findex); + to_bucket = raw_data.get_to_bucket(0, from_bucket); + while (to_bucket) { + dest_addr = to_bucket->address; + src = src_function(a2n.lookup(src_addr)); + dest = dest_function(a2n.lookup(dest_addr), to_bucket->count); + insert(src, dest); + to_bucket = raw_data.get_to_bucket(0, to_bucket->link); + } + } + sort_graph(mapping); + sort_graph(rmapping); +} + +void call_graph::insert(src_function src, dest_function dest) +{ + vector *to_list; + src_function rsrc; + dest_function rdest; + + to_list = &mapping[src]; + to_list->insert(to_list->end(), dest); + + rsrc = src_function(dest.name); + rdest = dest_function(src.name, dest.count); + to_list = &rmapping[rsrc]; + to_list->insert(to_list->end(), rdest); +} + +void call_graph::sort_graph(map > &mapping) +{ + map >::iterator it; + + for (it = mapping.begin(); it != mapping.end(); ++it) + sort(it->second.begin(), it->second.end()); +} + +void call_graph::print_vec(vector vec) const +{ + unsigned int i; + string prev_name = ""; + for (i = 0; i < vec.size(); ++i) + printf(" %10u %s\n", vec[i].count, vec[i].name.c_str()); +} + +void call_graph::print() const +{ + map >::const_iterator it; + map >::const_iterator rit; + vector callee_list; + vector caller_list; + + for (it = mapping.begin(); it != mapping.end(); it++) { + callee_list = it->second; + rit = rmapping.find(it->first); + caller_list = rit->second; + + printf("==================================================\n"); + print_vec(caller_list); + printf("%s\n", it->first.name.c_str()); + print_vec(callee_list); + } +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/scripts/readcg-0.3/call_graph.h 999-mjb/scripts/readcg-0.3/call_graph.h --- 000-virgin/scripts/readcg-0.3/call_graph.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/scripts/readcg-0.3/call_graph.h 2003-11-24 16:35:58.000000000 -0800 @@ -0,0 +1,77 @@ +#ifndef __CALL_GRAPH_H +#define __CALL_GRAPH_H + +#include +#include +#include "readcg.h" +#include "functions.h" +#include "raw_graph.h" +#include "system_map.h" +using namespace std; + +#define CMD_CLEAR '0' +#define CMD_DISABLE '1' +#define CMD_ENABLE '2' + +/* + * A container for the object -- making the data easier to work with + */ +class call_graph { +private: + map > mapping; + map > rmapping; + string graph_file; + raw_graph raw_data; + system_map a2n; + + /* + * Create mapping and rmapping from raw data + */ + void parse_raw_graph(); + + /* + * Sort all vectors in a mapping + */ + void sort_graph(map > &mapping); + + /* + * Insert a function call into both msppings + */ + void insert(src_function src, dest_function dest); + + /* + * Print out the given vector + */ + void print_vec(vector vec) const; + + /* + * Send a command to kcg through the /proc interface + */ + void cmd(const char c); +public: + call_graph() { } + call_graph(string _graph_file) { graph_file = _graph_file; } + call_graph(string _graph_file, string map_file); + + /* + * Print a call graph report + */ + void print() const; + + /* + * Stop profiling and reset all data + */ + void clear() { cmd(CMD_CLEAR); } + + /* + * Start profiling + */ + void enable() { cmd(CMD_ENABLE); } + + /* + * Stop profiling + */ + void disable() { cmd(CMD_DISABLE); } +}; + +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/scripts/readcg-0.3/functions.cpp 999-mjb/scripts/readcg-0.3/functions.cpp --- 000-virgin/scripts/readcg-0.3/functions.cpp 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/scripts/readcg-0.3/functions.cpp 2003-11-24 16:35:58.000000000 -0800 @@ -0,0 +1,22 @@ +#include "functions.h" + +bool src_function::operator<(const src_function &RHS) const +{ + return name < RHS.name; +} + + +dest_function::dest_function(string _name, unsigned int _count) +{ + name = _name; + count = _count; +} + +bool dest_function::operator<(const dest_function &RHS) const +{ + if (count > RHS.count) + return true; + if ((count == RHS.count) && (name < RHS.name)) + return true; + return false; +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/scripts/readcg-0.3/functions.h 999-mjb/scripts/readcg-0.3/functions.h --- 000-virgin/scripts/readcg-0.3/functions.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/scripts/readcg-0.3/functions.h 2003-11-24 16:35:58.000000000 -0800 @@ -0,0 +1,29 @@ +#ifndef __FUNCTIONS_H +#define __FUNCTIONS_H + +#include +using namespace std; + +class src_function { +private: + +public: + string name; + src_function() { name = ""; } + src_function(string _name) { name = _name; } + bool operator<(const src_function &RHS) const; +}; + +class dest_function { +private: + +public: + string name; + unsigned int count; + dest_function() { name = ""; count = 0; } + dest_function(string _name) { name = _name; } + dest_function(string _name, unsigned int _count); + bool operator<(const dest_function &RHS) const; +}; + +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/scripts/readcg-0.3/main.cpp 999-mjb/scripts/readcg-0.3/main.cpp --- 000-virgin/scripts/readcg-0.3/main.cpp 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/scripts/readcg-0.3/main.cpp 2003-11-24 16:35:58.000000000 -0800 @@ -0,0 +1,77 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "readcg.h" +#include "call_graph.h" +using namespace std; + +#define CG_FILE "/proc/mcount" +#define MAP_FILE "System.map" + +void usage(char *prgname) +{ + cerr << "Usage: " << prgname << " [ -e | -d | -c | -m ]\n"; + cerr << "\t-m Print profile\n"; + cerr << "\t-e Enable profiler\n"; + cerr << "\t-d Disable profiler\n"; + cerr << "\t-c Clear profile data\n"; + exit(1); +} + +int main(int argc, char **argv) +{ + int c; + char *mapfile = NULL; + call_graph kcg; + bool print_flag = false, cmd_flag = false; + char cmd; + + while ((c = getopt(argc, argv, "edcm:")) != -1) { + switch(c) { + case 'm': + mapfile = optarg; + print_flag = true; + break; + case 'e': + cmd = CMD_ENABLE; + cmd_flag = true; + break; + case 'd': + cmd = CMD_DISABLE; + cmd_flag = true; + break; + case 'c': + cmd = CMD_CLEAR; + cmd_flag = true; + break; + default: + usage(argv[0]); + } + } + + if (print_flag) { + kcg = call_graph(CG_FILE, mapfile); + kcg.print(); + } else if (cmd_flag) { + kcg = call_graph(CG_FILE); + switch(cmd) { + case CMD_ENABLE: + kcg.enable(); + break; + case CMD_DISABLE: + kcg.disable(); + break; + case CMD_CLEAR: + kcg.clear(); + } + } else { + usage(argv[0]); + } + return 0; +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/scripts/readcg-0.3/raw_graph.cpp 999-mjb/scripts/readcg-0.3/raw_graph.cpp --- 000-virgin/scripts/readcg-0.3/raw_graph.cpp 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/scripts/readcg-0.3/raw_graph.cpp 2003-11-24 16:35:58.000000000 -0800 @@ -0,0 +1,144 @@ +#include +#include +#include "raw_graph.h" + +raw_graph::raw_graph(const string filename) { + graph_file = filename; + read(); + merge(); +} + +void raw_graph::read() +{ + ifstream file; + long size; + + file.open(graph_file.c_str(), ios::in|ios::binary|ios::ate); + + if (!file.is_open()) { + perror(graph_file.c_str()); + exit(1); + } + + size = file.tellg(); + file.seekg(0, ios::beg); + + // Get file header + file.read((char*) &header, sizeof(graph_header)); + + // Get raw data + data = new char[size - sizeof(graph_header)]; + + if (!data) { + perror("new"); + exit(1); + } + + file.read(data, size - sizeof(graph_header)); + file.close(); +} + +kaddress_t raw_graph::get_from_address(unsigned long index) { + return header.kernel_start + index * PC_RES; +} + +unsigned short raw_graph::get_from_bucket(int cpu, unsigned long index) { + unsigned short *from_segment; /* first bucket on this cpu */ + + if (index >= header.kernel_buckets) + return 0; + from_segment = (unsigned short *)\ + (data + cpu * header.cg_from_size); + return from_segment[index]; +} + +void raw_graph::set_from_bucket(int cpu, unsigned long index, unsigned short val) +{ + unsigned short *from_segment; /* first bucket on this cpu */ + + if (index >= header.kernel_buckets) + return; + from_segment = (unsigned short *)\ + (data + cpu * header.cg_from_size); + from_segment[index] = val; + return; +} + +cg_arc_dest *raw_graph::get_to_bucket(int cpu, int index) { + cg_arc_dest *to_segment; /* first bucket on this cpu */ + + if (index == 0) // bucket 0 is reserved + return NULL; // use get_to_count() + to_segment = (cg_arc_dest *)\ + (data + header.cg_to_offset + cpu * header.cg_to_size); + return &to_segment[index]; +} + +int raw_graph::get_to_count(int cpu) { + cg_arc_dest *to_segment; /* first bucket on this cpu */ + + to_segment = (cg_arc_dest *)\ + (data + header.cg_to_offset + cpu * header.cg_to_size); + return to_segment[0].count; +} + +void raw_graph::set_to_count(int cpu, int val) { + cg_arc_dest *to_segment; /* first bucket on this cpu */ + + to_segment = (cg_arc_dest *)\ + (data + header.cg_to_offset + cpu * header.cg_to_size); + to_segment[0].count = val; + return; +} + +cg_arc_dest *raw_graph::get_free_to_bucket(int cpu) { + int to_count; + + to_count = get_to_count(cpu); + if (to_count >= CG_MAX_ARCS) + return NULL; + else { + set_to_count(cpu, ++to_count); + return get_to_bucket(cpu, to_count); + } +} + +void raw_graph::combine_to_entries(const unsigned long findex, int cpu) { + cg_arc_dest *src, *base, *dst; + + src = get_to_bucket(cpu, get_from_bucket(cpu, findex)); + + while (src) { + base = get_to_bucket(0, get_from_bucket(0, findex)); + dst = base; + + /* Try to find a match on cpu 0 */ + while (dst) { + if (dst->address == src->address) { + dst->count += src->count; + break; + } + dst = get_to_bucket(0, dst->link); + } + /* No luck, try to add a new bucket */ + if (!dst) { + dst = get_free_to_bucket(0); + if (dst) { + dst->link = get_from_bucket(0, findex); + dst->address = src->address; + dst->count = src->count; + set_from_bucket(0, findex, get_to_count(0)); + } + } + src = get_to_bucket(cpu, src->link); + } +} + +void raw_graph::merge() +{ + unsigned long findex, cpu; + + for (findex = 0; findex < header.kernel_buckets; ++findex) + for(cpu = 1; cpu < header.nr_cpus; ++cpu) + combine_to_entries(findex, cpu); +} diff -purN -X /home/mbligh/.diff.exclude 000-virgin/scripts/readcg-0.3/raw_graph.h 999-mjb/scripts/readcg-0.3/raw_graph.h --- 000-virgin/scripts/readcg-0.3/raw_graph.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/scripts/readcg-0.3/raw_graph.h 2003-11-24 16:35:58.000000000 -0800 @@ -0,0 +1,138 @@ +#ifndef __RAW_GRAPH_H +#define __RAW_GRAPH_H + +#include "readcg.h" +#include +using namespace std; + +#define PC_RES 4 +#define CG_MAX_ARCS (1 << (8 * sizeof(short))) + + +struct graph_header { + /* Number of from_buckets needed to cover kernel text */ + kaddress_t kernel_buckets; + + /* Number of cpus profiled */ + kaddress_t nr_cpus; + + /* Bytes needed for from_buckets on one cpu */ + kaddress_t cg_from_size; + + /* Bytes needed for to_buckets on one cpu */ + kaddress_t cg_to_size; + + /* offset into file where first to_bucket starts */ + kaddress_t cg_to_offset; + + /* start address of kernel text */ + kaddress_t kernel_start; + + /* first address after end of kernel text */ + kaddress_t kernel_end; +}; + +struct cg_arc_dest { + kaddress_t address; + int count; + unsigned short link; + unsigned short pad; +}; + +/******************************************************************** + * raw_graph - representation of the data as stored in /proc/mcount * + * The data format is fairly complex and almost impossible to * + * figure out from the code so hopefully the following diagram will * + * help explain the format. * + * * + * /---------------------------------\ ... * + * | | F = Offset into * + * |T T->T T->T | CPU 1 array of T's * + * |I T T->T T->T T T->T->T->T | for on same CPU * + * |---------------------------------| * + * | | I = A 'T' used to * + * | | CPU 0 hold index of * + * |I T->T->T T T T->T T T T | next free slot * + * |---------------------------------| * + * | .... | ... T = cg_arg_dest: * + * |---------------------------------| 'to' address and * + * |FF F FFF F F F FFFFFFF | CPU 1 number of calls * + * |---------------------------------| * + * |FFF F FFF FFFFFF FFF F FFF| CPU 0 The offset into the * + * |---------------------------------| array of 'Fs' * + * | graph_header | translates into the * + * \---------------------------------/ from address * + * * + * A per-cpu hash table in a buffer 'Ts' belonging to * + * same 'F' are linked * + ********************************************************************/ + +class raw_graph { +private: + graph_header header; /* The first part is the header */ + char* data; /* Store the rest of the buffer */ + string graph_file; /* filename of raw graph */ + + /* + * Combine data from all CPUs into the CPU0 part of the table + */ + void merge(); + + /* + * Combine the hash buckets pointed to by findex on a cpu + * with the buckets at findex on CPU 0 + */ + void combine_to_entries(const unsigned long findex, int cpu); + + /* + * Return a pointer to the next available to_bucket on a cpu + */ + cg_arc_dest *get_free_to_bucket(int cpu); + + /* + * Return the number of to_buckets in use on a cpu + */ + int get_to_count(int cpu); + + /* + * Set the number of to_buckets in use on a cpu + */ + void set_to_count(int cpu, int val); + +public: + raw_graph() {} + raw_graph(const string filename); + + /* + * Read in a raw graph from the file 'graph_file' + */ + void read(); + + /* + * Return the total number of from buckets needed to cover the + * kernel text. + */ + unsigned long get_num_buckets() { return header.kernel_buckets; } + + /* + * Return the to_bucket on a cpu given an index from a from_bucket + */ + cg_arc_dest *get_to_bucket(int cpu, int index); + + /* + * Get the value of a from_bucket on a cpu + */ + unsigned short get_from_bucket(int cpu, unsigned long index); + + /* + * Set the value of a from_bucket on a cpu + */ + void set_from_bucket(int cpu, unsigned long index, unsigned short val); + + /* + * Given an index, calculate the approximate from address in kernel text + */ + kaddress_t get_from_address(unsigned long index); +}; + +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/scripts/readcg-0.3/readcg.h 999-mjb/scripts/readcg-0.3/readcg.h --- 000-virgin/scripts/readcg-0.3/readcg.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/scripts/readcg-0.3/readcg.h 2003-11-24 16:35:58.000000000 -0800 @@ -0,0 +1,10 @@ +#ifndef __READCG_H +#define __READCG_H + +#if defined(__powerpc64__) +typedef unsigned long long kaddress_t; +#else +typedef unsigned long kaddress_t; +#endif + +#endif diff -purN -X /home/mbligh/.diff.exclude 000-virgin/scripts/readcg-0.3/system_map.cpp 999-mjb/scripts/readcg-0.3/system_map.cpp --- 000-virgin/scripts/readcg-0.3/system_map.cpp 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/scripts/readcg-0.3/system_map.cpp 2003-11-24 16:35:58.000000000 -0800 @@ -0,0 +1,48 @@ +#include +#include +#include "system_map.h" + +void system_map::read(const string filename) +{ + ifstream mapfile(filename.c_str()); + pair tuple; + char line[LINE_LEN], mode[5], name[NAME_LEN]; + kaddress_t address; + + if (!mapfile.is_open()) { + perror(filename.c_str()); + exit(1); + } + + while (!mapfile.eof()) { + mapfile.getline(line, LINE_LEN); + sscanf(line, MAP_FMT, &address, mode, name); + if (*mode != 'T' && *mode != 't' && + *mode != 'W' && *mode != 'w') continue; + tuple.first = address; + tuple.second = string(name); + mapping.insert(mapping.end(), tuple); + } +} + +string system_map::lookup(const kaddress_t address) +{ + unsigned long low, high, mid; + + low = 0; + high = mapping.size(); + + while (low <= high) { + mid = low + (high - low) / 2; + if (mapping[mid].first == address || + (mapping[mid].first < address && + mapping[mid + 1].first > address)) + return mapping[mid].second; + else if (mapping[mid].first > address) + high = mid - 1; + else + low = mid + 1; + } + return ""; +} + diff -purN -X /home/mbligh/.diff.exclude 000-virgin/scripts/readcg-0.3/system_map.h 999-mjb/scripts/readcg-0.3/system_map.h --- 000-virgin/scripts/readcg-0.3/system_map.h 1969-12-31 16:00:00.000000000 -0800 +++ 999-mjb/scripts/readcg-0.3/system_map.h 2003-11-24 16:35:58.000000000 -0800 @@ -0,0 +1,40 @@ +#ifndef __SYSTEM_MAP_H +#define __SYSTEM_MAP_H + +#include +#include +#include "readcg.h" +using namespace std; + +#define LINE_LEN 100 +#define NAME_LEN 35 + +#ifdef __powerpc64__ +#define MAP_FMT "%llx %s %s" +#else +#define MAP_FMT "%lx %s %s" +#endif + +/* + * Mapping of kernel text addresses to function names + */ +class system_map { +private: + vector > mapping; + + /* + * Read data from a System.map file + */ + void read(const string filename); +public: + system_map() { } + system_map(const string filename) { read(filename); } + + /* + * Return a function name corresponding to the given address + * A match is defined as: map[n] <= addr && map[n+1] > addr + */ + string lookup(const kaddress_t address); +}; + +#endif