diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/CREDITS linux.20p6/CREDITS --- linux.vanilla/CREDITS Sun Mar 25 17:37:29 2001 +++ linux.20p6/CREDITS Mon Jun 25 14:28:39 2001 @@ -1833,14 +1833,15 @@ S: France N: Rik van Riel -E: riel@nl.linux.org -W: http://www.nl.linux.org/~riel/ +E: riel@conectiva.com.br +W: http://www.surriel.com/ D: Linux-MM site, Documentation/sysctl/*, swap/mm readaround D: clustering contributor, kswapd fixes, random kernel hacker, -D: nl.linux.org maintainer, minor scheduler additions -S: IJsselstraat 23a -S: 9725 GA Groningen -S: The Netherlands +D: nl.linux.org administrator, minor scheduler additions +S: Conectiva S.A. +S: R. Tocantins, 89 - Cristo Rei +S: 80050-430 - Curitiba - Paraná +S: Brazil N: William E. Roadcap E: roadcapw@cfw.com @@ -2299,7 +2300,7 @@ S: The Netherlands N: Tim Waugh -E: tim@cyberelk.demon.co.uk +E: tim@cyberelk.net D: Co-architect of the parallel-port sharing system S: 17 Curling Vale S: GUILDFORD @@ -2398,8 +2399,8 @@ E: jwoithe@physics.adelaide.edu.au W: http://www.physics.adelaide.edu.au/~jwoithe D: ALS-007 sound card extensions to Sound Blaster driver -S: 4/36 Trevelyan St -S: Wayville SA 5034 +S: 20 Jordan St +S: Valley View, SA 5093 S: Australia N: Clifford Wolf diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/Configure.help linux.20p6/Documentation/Configure.help --- linux.vanilla/Documentation/Configure.help Sun Mar 25 17:37:29 2001 +++ linux.20p6/Documentation/Configure.help Mon Jun 25 14:28:07 2001 @@ -758,6 +758,39 @@ say M here and read Documentation/modules.txt. The module will be called DAC960.o. +3ware Hardware ATA-RAID support +CONFIG_BLK_DEV_3W_XXXX_RAID + 3ware is the only hardware ATA-Raid product in Linux to date. + This card is 2,4, or 8 channel master mode support only. + SCSI support required!!! + + + + Please read the comments at the top of drivers/scsi/3w-xxxx.c + +RapIDE interface support +CONFIG_BLK_DEV_IDE_RAPIDE + Say Y here if you want to support the Yellowstone RapIDE controller + manufactured for use with Acorn computers. + +WarpEngine SCSI support +CONFIG_WARPENGINE_SCSI + Support for MacroSystem Development's WarpEngine Amiga SCSI-2 controller. + Info at . + +PowerMac IDE DMA support +CONFIG_BLK_DEV_IDEDMA_PMAC + This option allows the driver for the built-in IDE controller on + Power Macintoshes and PowerBooks to use DMA (direct memory access) + to transfer data to and from memory. Saying Y is safe and improves + performance. + +ICS IDE interface support +CONFIG_BLK_DEV_IDE_ICSIDE + On Acorn systems, say Y here if you wish to use the ICS IDE + interface card. This is not required for ICS partition support. + If you are unsure, say N to this. + Parallel port IDE device support CONFIG_PARIDE There are many external CD-ROM and disk devices that connect through @@ -1123,6 +1156,34 @@ board uses the R4300 and a R5230 CPUs. For more information about this board see http://www.algor.co.uk. +Support for BAGET MIPS series +CONFIG_BAGET_MIPS + This enables support for the Baget, a Russian embedded system. For + more details about the Baget see the Linux/MIPS FAQ on + . + +Baget AMD LANCE support +CONFIG_BAGETLANCE + Say Y to enable kernel support for AMD Lance Ethernet cards on the + MIPS-32-based Baget embedded system. This chipset is better known + via the NE2100 cards. + +Support for DECstations +CONFIG_DECSTATION + This enables support for DEC's MIPS based workstations. For details + see the Linux/MIPS FAQ on and the + DECstation porting pages on . + + If you have one of the following DECstation Models you definitely + want to choose R4xx0 for the CPU Type: + + DECstation 5000/50 + DECstation 5000/150 + DECstation 5000/260 + DECsystem 5900/260 + + otherwise choose R3000. + IDE card support CONFIG_BLK_DEV_IDE_CARDS On Acorn systems, enable this if you wish to use an IDE interface @@ -1157,6 +1218,44 @@ http://lena.fnet.fr/ (To browse the WWW, you need to have access to a machine on the Internet that has a program like lynx or netscape). +Support for SNI RM200 PCI +CONFIG_SNI_RM200_PCI + The SNI RM200 PCI was a MIPS-based platform manufactured by Siemens + Nixdorf Informationssysteme (SNI), parent company of Pyramid Technology + and now in turn merged with Fujitsu. Say Y here to support this machine + type. + +MIPS JAZZ onboard SONIC Ethernet support +CONFIG_MIPS_JAZZ_SONIC + This is the driver for the onboard card of MIPS Magnum 4000, + Acer PICA, Olivetti M700-10 and a few other identical OEM systems. + +MIPS JAZZ FAS216 SCSI support +CONFIG_JAZZ_ESP + This is the driver for the onboard SCSI host adapter of MIPS Magnum + 4000, Acer PICA, Olivetti M700-10 and a few other identical OEM + systems. + +SGI PROM Console Support +CONFIG_SGI_PROM_CONSOLE + Say Y here to set up the boot console on serial port 0. + +DZ11 Serial Support +CONFIG_DZ + DZ11-family serial controllers for VAXstations, including the DC7085, + M7814, and M7819. + +TURBOchannel support +CONFIG_TC + TurboChannel is a DEC (now Compaq) bus for Alpha and MIPS processors. + Documentation on writing device drivers for TurboChannel is available at: + . + +Z85C30 Serial Support +CONFIG_ZS + Documentation on the Zilog 85C350 serial communications controller is + downloadable at . + CPU type CONFIG_CPU_R3000 Give the type of your machine's MIPS CPU. For this question, it @@ -1164,6 +1263,55 @@ In case of doubt select the R3000 CPU. The kernel will then run on other MIPS machines but with slightly reduced performance. + R3000 MIPS Technologies R3000-series processors, + including the 3041, 3051, and 3081. + + R6000 MIPS Technologies R6000-series processors, + including the 64474, 64475, 64574 and 64575. + + R4300 MIPS Technologies R4300-series processors. + + R4x00 MIPS Technologies R4000-series processors other than 4300, + including the 4640, 4650, and 4700. + + R5000 MIPS Technologies R5000-series processors other than the Nevada. + + R52xx MIPS Technologies R52x0-series ("Nevada") processors. + + R8000 MIPS Technologies R8000-series processors. + + R10000 MIPS Technologies R10000-series processors. + +R6000 +CONFIG_CPU_R6000 + MIPS Technologies R6000-series processors, including the 64474, + 64475, 64574 and 64575. + +R4300 +CONFIG_CPU_R4300 + MIPS Technologies R4300-series processors. + +R4x00 +CONFIG_CPU_R4X00 + MIPS Technologies R4000-series processors other than 4300, including + the 4640, 4650, and 4700. + +R5000 +CONFIG_CPU_R5000 + MIPS Technologies R5000-series processors other than the Nevada. + +R52xx +CONFIG_CPU_NEVADA + MIPS Technologies R52x0-series ("Nevada") processors. + +R8000 +CONFIG_CPU_R8000 + MIPS Technologies R8000-series processors. + +R10000 +CONFIG_CPU_R10000 + MIPS Technologies R10000-series processors. + Compile the kernel into the ECOFF object format CONFIG_ECOFF_KERNEL Some machines require a kernel in the ECOFF format. You will have to @@ -1176,6 +1324,12 @@ byte order. These modes require different kernels. Say Y if your machine is little endian, N if it's a big endian machine. +Use power LED as a heartbeat +CONFIG_HEARTBEAT + Use the power-on LED on your machine as a load meter. The exact + behavior is platform-dependent, but normally the flash frequency is a + hyperbolic function of the 5-minute load average. + Kernel support for IRIX binaries CONFIG_BINFMT_IRIX If you say Y here, the kernel will support running of IRIX binaries. @@ -1323,6 +1477,136 @@ If you don't know what to do, choose "generic". +# Most of the information on these variants is from +# http://www.alphalinux.org/docs/alpha-howto.html +Alcor/Alpha-XLT +CONFIG_ALPHA_ALCOR + For systems using the Digital ALCOR chipset: 5 chips (4, 64-bit data slices + (Data Switch, DSW) - 208-pin PQFP and 1 control (Control, I/O Address, CIA) + - a 383 pin plastic PGA). It provides a DRAM controller (256-bit memory + bus) and a PCI interface. It also does all the work required to support an + external Bcache and to maintain memory coherence when a PCI device DMAs + into (or out of) memory. + +Alpha-XL +CONFIG_ALPHA_XL + XL-233 and XL-266-based Alpha systems. + +AlphaBook1 +CONFIG_ALPHA_BOOK1 + Dec AlphaBook1/Burns Alpha-based laptops. + +Avanti +CONFIG_ALPHA_AVANTI + Avanti AS 200, AS 205, AS 250, AS 255, AS 300, and AS 400-based Alphas. + Info at . + +Cabriolet +CONFIG_ALPHA_CABRIOLET + Cabriolet AlphaPC64, AlphaPCI64 systems. Derived from EB64+ but now + baby-AT with Flash boot ROM, no on-board SCSI or Ethernet. 3 ISA slots, + 4 PCI slots (one pair are on a shared slot), uses plug-in Bcache SIMMs. + Requires power supply with 3.3V output. + +DP264 +CONFIG_ALPHA_DP264 + Hard Data HD-DP264-based Alpha systems. There is a Hard Data website at + . + +EB164 +CONFIG_ALPHA_EB164 + EB164 21164 evaluation board from DEC. Uses 21164 and ALCOR. Has ISA and + PCI expansion (3 ISA slots, 2 64-bit PCI slots (one is shared with an ISA + slot) and 2 32-bit PCI slots. Uses plus-in Bcache SIMMs. I/O sub-system + provides SuperI/O (2S, 1P, FD), KBD, MOUSE (PS2 style), RTC/NVRAM. Boot + ROM is Flash. PC-AT-sized motherboard. Requires power supply with 3.3V + output. + +EB64+ +CONFIG_ALPHA_EB64P + Uses 21064 or 21064A and APECs. Has ISA and PCI expansion (3 ISA, 2 PCI, + one pair are on a shared slot). Supports 36-bit DRAM SIMs. ISA bus + generated by Intel SaturnI/O PCI-ISA bridge. On-board SCSI (NCR 810 on + PCI) Ethernet (Digital 21040), KBD, MOUSE (PS2 style), SuperI/O (2S, + 1P, FD), RTC/NVRAM. Boot ROM is EPROM. PC-AT size. Runs from standard + PC power supply. + +EB66 +CONFIG_ALPHA_EB66 + A Digital DS group board. Uses 21066 or 21066A. I/O sub-system is identical + to EB64+. Baby PC-AT size. Runs from standard PC power supply. The EB66 + schematic was published as a marketing poster advertising the 21066 as "the + first microprocessor in the world with embedded PCI" + +EB66+ +CONFIG_ALPHA_EB66P + Later variant of the EB66 board. + +Eiger +CONFIG_ALPHA_EIGER + Apparently an obscure OEM single-board computer based on the + Typhoon/Tsunami chipset family. Information on it is scanty. + +Jensen +CONFIG_ALPHA_JENSEN + DEC PC 150 AXP (aka Jensen): This is a very old Digital system - one + of the first-generation Alpha systems. A number of these systems + seem to be available on the second- hand market. The Jensen is a + floor-standing tower system which originally used a 150MHz 21064 It + used programmable logic to interface a 486 EISA I/O bridge to the + CPU. + +LX164 +CONFIG_ALPHA_LX164 + A technical overview of this board is available at + . + +Miata +CONFIG_ALPHA_MIATA + The Digital PersonalWorkStation (PWS 433a, 433au, 500a, 500au, 600a, + or 600au). There is an Installation HOWTO for this hardware at + . + +Mikasa +CONFIG_ALPHA_MIKASA + AlphaServer 1000-based Alpha systems. + +Nautilus +CONFIG_ALPHA_NAUTILUS + Alpha systems based on the AMD 751 & ALI 1543C chipsets. + +Noname +CONFIG_ALPHA_NONAME + The AXPpci33 (aka NoName), is based on the EB66 (includes the Multia + UDB). This design was produced by Digital's Technical OEM (TOEM) + group. It uses the 21066 processor running at 166MHz or 233MHz. It + is a baby-AT size, and runs from a standard PC power supply. It has + 5 ISA slots and 3 PCI slots (one pair are a shared slot). There are + 2 versions, with either PS/2 or large DIN connectors for the + keyboard. + +Noritake +CONFIG_ALPHA_NORITAKE + AlphaServer 1000A, AlphaServer 600A, and AlphaServer 800-based systems. + +Rawhide +CONFIG_ALPHA_RAWHIDE + AlphaServer 1200, AlphaServer 4000 and AlphaServer 4100 machines. + See HOWTO at . + +Ruffian +CONFIG_ALPHA_RUFFIAN + Samsung APC164UX. There is a page on known problems and workarounds + at . + +Sable +CONFIG_ALPHA_SABLE + Digital AlphaServer 2000 and 2100-based systems. + +Takara +CONFIG_ALPHA_TAKARA + Alpha 11164-based OEM single-board computer. + EV5 CPU daughtercard CONFIG_ALPHA_PRIMO Say Y if you have an AS 1000 5/xxx or an AS 1000A 5/xxx. @@ -3688,32 +3972,38 @@ Kernel/User network link driver CONFIG_NETLINK - This driver allows for two-way communication between certain parts - of the kernel or modules and user processes; the user processes are - able to read from and write to character special files in the /dev - directory having major mode 36. So far, the kernel uses it to - publish some network related information if you say Y to "Routing - messages", below. It is also used by the firewall code to publish - information about possible attacks if you say Y to "IP: firewall - packet netlink device" further down. You also need to say Y here if - you want to use arpd, a daemon that helps keep the internal ARP - cache (a mapping between IP addresses and hardware addresses on the - local network) small. The ethertap device, which lets user space - programs read and write raw Ethernet frames, also needs the network - link driver. If unsure, say Y. + This driver allows for two-way communication between the kernel and + user processes. It does so by creating a new socket family, PF_NETLINK. + Over this socket, the kernel can send and receive datagrams carrying + information. It is documented on many systems in netlink(7), a HOWTO is + provided as well, for example on + http://snafu.freedom.org/linux2.2/docs/netlink-HOWTO.html + + So far, the kernel uses this feature to publish some network related + information if you say Y to "Routing messages", below. You also need + to say Y here if you want to use arpd, a daemon that helps keep the + internal ARP cache (a mapping between IP addresses and hardware + addresses on the local network) small. The ethertap device, which + lets user space programs read and write raw Ethernet frames, also + needs the network link driver. + + If unsure, say Y. Routing messages CONFIG_RTNETLINK - If you say Y here and create a character special file /dev/route - with major number 36 and minor number 0 using mknod ("man mknod"), - you (or some user space utility) can read some network related - routing information from that file. Everything you write to that - file will be discarded. + If you say Y here, user space programs can receive some network + related routing information over the netlink. 'rtmon', supplied + with the iproute2 package (ftp://ftp.inr.ac.ru), can read and + interpret this data. Information sent to the kernel over this link + is ignored. Netlink device emulation CONFIG_NETLINK_DEV + This option will be removed soon. Any programs that want to use + character special nodes like /dev/tap0 or /dev/route (all with major + number 36) need this option, and need to be rewritten soon to use + the real netlink socket. This is a backward compatibility option, choose Y for now. - This option will be removed soon. SCSI support? CONFIG_SCSI @@ -10535,6 +10825,19 @@ You can compile this driver directly into the kernel, or use it as a module. The module will be called sbc60xxwdt.o. +ZF MachZ Watchdog +CONFIG_MACHZ_WDT + If you are using a ZF Micro MachZ processor, say Y here, otherwise N. + This is the driver for the watchdog timer builtin on that processor + using ZF-Logic interface. This watchdog simply watches your kernel to + make sure it doesn't freeze, and if it does, it reboots your computer + after a certain amount of time. + + This driver is also available as a module ( = code which can be + inserted in and removed from the running kernel whenever you want). + The module is called machzwd.o. If you want to compile it as a module, + say M here and read Documentation/modules.txt. + CONFIG_MICROCODE /dev/cpu/microcode - Intel IA32 CPU microcode support @@ -13567,7 +13870,7 @@ Compaq Smart Array support CONFIG_BLK_CPQ_CISS_DA - This is the driver for Compaq Smart Array controllers. + This is the driver for Compaq Smart Array 5xxx controllers. Everyone using these boards should say Y here. See "linux/Documentation/cciss.txt" for the current list of boards supported by this driver, and for further information diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/SubmittingDrivers linux.20p6/Documentation/SubmittingDrivers --- linux.vanilla/Documentation/SubmittingDrivers Sun Mar 25 17:37:29 2001 +++ linux.20p6/Documentation/SubmittingDrivers Tue Jun 19 09:59:54 2001 @@ -34,7 +34,7 @@ This kernel tree is under active development. The same rules apply as 2.2 but you may wish to submit your driver via linux-kernel (see resources) and follow that list to track changes in API's. These - should no longer be occuring as we are now in a code freeze. + should no longer be occurring as we are now in a code freeze. The final contact point for Linux 2.4 submissions is . diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/cciss.txt linux.20p6/Documentation/cciss.txt --- linux.vanilla/Documentation/cciss.txt Sun Mar 25 17:31:58 2001 +++ linux.20p6/Documentation/cciss.txt Tue May 8 15:50:33 2001 @@ -6,6 +6,8 @@ This driver is known to work with the following cards: * SA 5300 + * SA 5i + * SA 532 If notes are not already created in the /dev/cciss directory diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/filesystems/vfs.txt linux.20p6/Documentation/filesystems/vfs.txt --- linux.vanilla/Documentation/filesystems/vfs.txt Sun Mar 25 17:31:56 2001 +++ linux.20p6/Documentation/filesystems/vfs.txt Tue Jun 19 09:59:54 2001 @@ -129,7 +129,7 @@ name: the name of the filesystem type, such as "ext2", "iso9660", "msdos" and so on - fs_flags: various flags (i.e. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.) + fs_flags: various flags (e.g. FS_REQUIRES_DEV, FS_NO_DCACHE, etc.) read_super: the method to call when a new instance of this filesystem should be mounted @@ -403,7 +403,7 @@ d_release: called when a dentry is deallocated - d_iput: called when a dentry looses its inode (just prior to its + d_iput: called when a dentry loses its inode (just prior to its being deallocated). The default when this is NULL is that the VFS calls iput(). If you define this method, you must call iput() yourself @@ -425,11 +425,11 @@ unused list just means that if the system needs some RAM, it goes through the unused list of dentries and deallocates them. If the dentry has already been unhashed and the usage count - drops to 0, in this case the dentry is deallocated after the - "d_delete" method is called + drops to 0, the dentry is deallocated after the "d_delete" + method is called d_drop: this unhashes a dentry from its parents hash list. A - subsequent call to dput() will dellocate the dentry if its + subsequent call to dput() will deallocate the dentry if its usage count drops to 0 d_delete: delete a dentry. If there are no other open references to diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/i810_rng.txt linux.20p6/Documentation/i810_rng.txt --- linux.vanilla/Documentation/i810_rng.txt Thu Jan 1 01:00:00 1970 +++ linux.20p6/Documentation/i810_rng.txt Fri May 4 23:16:15 2001 @@ -0,0 +1,126 @@ + Hardware driver for Intel i810 Random Number Generator (RNG) + Copyright 2000,2001 Jeff Garzik + Copyright 2000,2001 Philipp Rumpf + +Introduction: + + The i810_rng device driver is software that makes use of a + special hardware feature on the Intel i8xx-based chipsets, + a Random Number Generator (RNG). + + In order to make effective use of this device driver, you + should download the support software as well. Download the + latest version of the "intel-rng-tools" package from the + i810_rng driver's official Web site: + + http://sourceforge.net/projects/gkernel/ + +About the Intel RNG hardware, from the firmware hub datasheet: + + The Firmware Hub integrates a Random Number Generator (RNG) + using thermal noise generated from inherently random quantum + mechanical properties of silicon. When not generating new random + bits the RNG circuitry will enter a low power state. Intel will + provide a binary software driver to give third party software + access to our RNG for use as a security feature. At this time, + the RNG is only to be used with a system in an OS-present state. + +Theory of operation: + + Character driver. Using the standard open() + and read() system calls, you can read random data from + the i810 RNG device. This data is NOT CHECKED by any + fitness tests, and could potentially be bogus (if the + hardware is faulty or has been tampered with). Data is only + output if the hardware "has-data" flag is set, but nevertheless + a security-conscious person would run fitness tests on the + data before assuming it is truly random. + + /dev/intel_rng is char device major 10, minor 183. + +Driver notes: + + * FIXME: support poll(2) + + NOTE: request_mem_region was removed, for two reasons: + 1) Only one RNG is supported by this driver, 2) The location + used by the RNG is a fixed location in MMIO-addressable memory, + 3) users with properly working BIOS e820 handling will always + have the region in which the RNG is located reserved, so + request_mem_region calls always fail for proper setups. + However, for people who use mem=XX, BIOS e820 information is + -not- in /proc/iomem, and request_mem_region(RNG_ADDR) can + succeed. + +Driver details: + + Based on: + Intel 82802AB/82802AC Firmware Hub (FWH) Datasheet + May 1999 Order Number: 290658-002 R + + Intel 82802 Firmware Hub: Random Number Generator + Programmer's Reference Manual + December 1999 Order Number: 298029-001 R + + Intel 82802 Firmware HUB Random Number Generator Driver + Copyright (c) 2000 Matt Sottek + + Special thanks to Matt Sottek. I did the "guts", he + did the "brains" and all the testing. + +Change history: + + Version 0.9.6: + * Internal driver cleanups, prep for 1.0.0 release. + + Version 0.9.5: + * Rip out entropy injection via timer. It never ever worked, + and a better solution (rngd) is now available. + + Version 0.9.4: + * Fix: Remove request_mem_region + * Fix: Horrible bugs in FIPS calculation and test execution + + Version 0.9.3: + * Clean up rng_read a bit. + * Update i810_rng driver Web site URL. + * Increase default timer interval to 4 samples per second. + * Abort if mem region is not available. + * BSS zero-initialization cleanup. + * Call misc_register() from rng_init_one. + * Fix O_NONBLOCK to occur before we schedule. + + Version 0.9.2: + * Simplify open blocking logic + + Version 0.9.1: + * Support i815 chipsets too (Matt Sottek) + * Fix reference counting when statically compiled (prumpf) + * Rewrite rng_dev_read (prumpf) + * Make module races less likely (prumpf) + * Small miscellaneous bug fixes (prumpf) + * Use pci table for PCI id list + + Version 0.9.0: + * Don't register a pci_driver, because we are really + using PCI bridge vendor/device ids, and someone + may want to register a driver for the bridge. (bug fix) + * Don't let the usage count go negative (bug fix) + * Clean up spinlocks (bug fix) + * Enable PCI device, if necessary (bug fix) + * iounmap on module unload (bug fix) + * If RNG chrdev is already in use when open(2) is called, + sleep until it is available. + * Remove redundant globals rng_allocated, rng_use_count + * Convert numeric globals to unsigned + * Module unload cleanup + + Version 0.6.2: + * Clean up spinlocks. Since we don't have any interrupts + to worry about, but we do have a timer to worry about, + we use spin_lock_bh everywhere except the timer function + itself. + * Fix module load/unload. + * Fix timer function and h/w enable/disable logic + * New timer interval sysctl + * Clean up sysctl names diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/ioctl-number.txt linux.20p6/Documentation/ioctl-number.txt --- linux.vanilla/Documentation/ioctl-number.txt Sun Mar 25 17:37:29 2001 +++ linux.20p6/Documentation/ioctl-number.txt Mon Jun 18 08:28:48 2001 @@ -102,7 +102,7 @@ 'p' 00-3F linux/mc146818rtc.h 'p' 40-7F linux/nvram.h 'p' 80-9F user-space parport in development: - + 'r' all linux/msdos_fs.h 's' all linux/cdk.h 't' 00-7F linux/if_ppp.h diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/isdn/INTERFACE linux.20p6/Documentation/isdn/INTERFACE --- linux.vanilla/Documentation/isdn/INTERFACE Sun Mar 25 17:31:58 2001 +++ linux.20p6/Documentation/isdn/INTERFACE Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -$Id: INTERFACE,v 1.15 1999/08/25 20:02:13 werner Exp $ +$Id: INTERFACE,v 1.15.8.2 2001/03/13 16:17:07 kai Exp $ Description of the Interface between Linklevel and Hardwarelevel of isdn4linux: @@ -480,8 +480,8 @@ Parameter: driver = driver-Id command = ISDN_CMD_PROT_IO - arg = The lower 8 Bits define the adressed protocol as defined - in ISDN_PTYPE..., the upper bits are used to differenciate + arg = The lower 8 Bits define the addressed protocol as defined + in ISDN_PTYPE..., the upper bits are used to differentiate the protocol specific CMD. para = protocol and function specific. See isdnif.h for detail. @@ -734,7 +734,7 @@ Parameter: driver = driver-Id command = ISDN_STAT_PROT - arg = The lower 8 Bits define the adressed protocol as defined + arg = The lower 8 Bits define the addressed protocol as defined in ISDN_PTYPE..., the upper bits are used to differenciate the protocol specific STAT. @@ -748,7 +748,7 @@ loading the driver. The LL has to ignore a disabled channel when searching for free channels. The HL driver itself never delivers STAT callbacks for disabled channels. - The LL returns a nonzero code if the operation was not successfull or the + The LL returns a nonzero code if the operation was not successful or the selected channel is actually regarded as busy. Parameter: diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/isdn/README.eicon linux.20p6/Documentation/isdn/README.eicon --- linux.vanilla/Documentation/isdn/README.eicon Sun Mar 25 17:37:29 2001 +++ linux.20p6/Documentation/isdn/README.eicon Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -$Id: README.eicon,v 1.10 2000/08/13 12:19:15 armin Exp $ +$Id: README.eicon,v 1.10.6.1 2001/02/19 10:04:59 armin Exp $ (c) 1999,2000 Armin Schindler (mac@melware.de) (c) 1999,2000 Cytronics & Melware (info@melware.de) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/networking/sk98lin.txt linux.20p6/Documentation/networking/sk98lin.txt --- linux.vanilla/Documentation/networking/sk98lin.txt Sun Mar 25 17:31:57 2001 +++ linux.20p6/Documentation/networking/sk98lin.txt Tue Jun 19 09:46:04 2001 @@ -1,16 +1,17 @@ -(C)Copyright 1999 SysKonnect. +(C)Copyright 1999-2001 SysKonnect GmbH. +All rights reserved =========================================================================== -sk98lin.txt created 11-Nov-1999 +sk98lin.txt created 07-Jun-2001 -Readme File for sk98lin.o v3.04 -SK-NET Gigabit Ethernet Adapter SK-98xx Driver for Linux +Readme File for sk98lin v4.07 +SK-NET Gigabit Ethernet PCI driver for LINUX This file contains (1) OVERVIEW (2) REQUIRED FILES (3) INSTALLATION -(4) INCLUSION OF THE ADAPTER AT SYSTEM START +(4) INCLUSION OF ADAPTER AT SYSTEM START (5) DRIVER PARAMETERS (6) LARGE FRAME SUPPORT (7) TROUBLESHOOTING @@ -19,13 +20,12 @@ =========================================================================== - (1) OVERVIEW ============ The sk98lin driver supports the SysKonnect SK-NET Gigabit Ethernet Adapter SK-98xx family on Linux 2.2.x and above. -It has been tested with Linux on Intel/x86, ALPHA and UltraSPARC machines. +It has been tested with Linux on Intel/x86 machines. From v3.02 on, the driver is integrated in the linux kernel source. *** @@ -64,8 +64,8 @@ "make modules_install". Reboot your system. -4) Load the module manually by entering: - insmod sk98lin.o +2) Load the module manually by entering: + modprobe sk98lin If the SysKonnect SK-98xx adapter is installed in your computer and you have a /proc filesystem, running the command 'more /proc/net/dev' should produce an output containing a @@ -84,7 +84,7 @@ for each adapter that is found, containing the corresponding 'ethX'. -5) Select an IP address and assign it to the respective adapter by +3) Select an IP address and assign it to the respective adapter by entering: ifconfig eth0 This causes the adapter to connect to the ethernet. The solitary @@ -99,22 +99,22 @@ NOTE: If you are in doubt about IP addresses, ask your network administrator for assistance. -6) Your adapter should now be fully operational. +4) Your adapter should now be fully operational. Use 'ping ' to verify the connection to other computers on your network. - By entering 'ifconfig', you can check the number of packets sent - and received by your adapter and additional some other information - regarding the adapter configuration. + By viewing /proc/net/sk98lin/[devicename], you can check some + information regarding to the adapter configuration. + -7) The driver module can be stopped and unloaded using the following +5) The driver module can be stopped and unloaded using the following commands: ifconfig eth0 down rmmod sk98lin *** -(4) INCLUSION OF THE ADAPTER AT SYSTEM START -============================================ +(4) INCLUSION OF ADAPTER AT SYSTEM START +======================================== Since a large number of different Linux distributions are available, we are unable to describe a general installation procedure @@ -129,7 +129,7 @@ ===================== Parameters can be set at the command line while loading the -module with 'insmod'. The configuration tools of some distributions +module with 'modprobe'. The configuration tools of some distributions can also give parameters to the driver module. If you use the kernel module loader, you can set driver parameters in the file /etc/modules.conf (or old name: /etc/conf.modules). @@ -138,12 +138,12 @@ options sk98lin ... For "...", use the same syntax as described below for the command -line parameters of insmod. +line paramaters of modprobe. You either have to reboot your computer or unload and reload the driver to activate the new parameters. The syntax of the driver parameters is: -insmod sk98lin parameter=value1[,value2[,value3...]] +modprobe sk98lin parameter=value1[,value2[,value3...]] value1 is for the first adapter, value2 for the second one etc. All Parameters are case sensitive, so write them exactly as @@ -156,7 +156,7 @@ adapter to FULL and on Port A of the second adapter to HALF. You must enter: - insmod sk98lin.o AutoNeg_A=On,Off DupCap_A=Full,Half + modprobe sk98lin AutoNeg_A=On,Off DupCap_A=Full,Half NOTE: The number of adapters that can be configured this way is limited in the driver (file skge.c, constant SK_MAX_CARD_PARAM). @@ -187,7 +187,7 @@ this port is not "Sense". If autonegotiation is "On", all three values are possible. If it is "Off", only "Full" and "Half" are allowed. - It is useful if your link partner does not support all + It is usefull if your link partner does not support all possible combinations. - Flow Control @@ -234,7 +234,7 @@ - RLMT (Redundant Link Management Technology) Mode Parameter: RlmtMode - Values: CheckLinkState,CheckLocalPort, CheckSeg + Values: CheckLinkState,CheckLocalPort, CheckSeg, DualNet Default: CheckLinkState RLMT (the driver part that decides which port to use) knows three @@ -257,6 +257,13 @@ Ethernet switches installed in your network that have been configured to use the Spanning Tree protocol. +-- DualNet - Both ports A and B are used as separate devices at the same + time. So if you have a dual port adapter, port A will show up as eth0 + and port B as eth1. Both ports can be used independend with distinct + IP addresses. + The preferred port setting is not used. Rlmt is turned off. + + NOTE: The modes CheckLocalPort and CheckSeg are meant to operate in configurations where a network path between the ports on one adapter exists. Especially, they are not designed to work where @@ -269,7 +276,7 @@ Large frames (also called jumbo frames) are now supported by the driver. This can result in a greatly improved throughput if -transferring large amounts of data. +transfering large amounts of data. To enable large frames, set the MTU (maximum transfer unit) of the interface to the value you wish (up to 9000). The command for this is: @@ -285,7 +292,7 @@ You can switch back to the standard ethernet frame size with: ifconfig eth0 mtu 1500 -To make this setting persistent, add a script with the 'ifconfig' +To make this setting persitent, add a script with the 'ifconfig' line to the system startup sequence (named something like "S99sk98lin" in /etc/rc.d/rc2.d). *** @@ -372,6 +379,28 @@ (8) HISTORY =========== + +VERSION 4.02 (In-Kernel version) +New Features: +- Add Kernel 2.4 changes +Known limitations: +- None + +VERSION 4.01 (In-Kernel version) +Problems fixed: +- Full statistics support for DualNet mode +Known limitations: +- None + +VERSION 4.00 (In-Kernel version) +Problems fixed: +- Memory leak found +New Features: +- Proc filesystem integration +- DualNet functionality integrated +- Rlmt networks added +Known limitations: +- statistics partially incorrect in DualNet mode VERSION 3.04 (In-Kernel version) Problems fixed: diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/parport.txt linux.20p6/Documentation/parport.txt --- linux.vanilla/Documentation/parport.txt Sun Mar 25 17:31:58 2001 +++ linux.20p6/Documentation/parport.txt Mon Jun 18 08:28:48 2001 @@ -147,4 +147,4 @@ -- Philip.Blundell@pobox.com -tim@cyberelk.demon.co.uk +tim@cyberelk.net diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/s390/cds.txt linux.20p6/Documentation/s390/cds.txt --- linux.vanilla/Documentation/s390/cds.txt Sun Mar 25 17:37:29 2001 +++ linux.20p6/Documentation/s390/cds.txt Tue Jun 19 09:59:54 2001 @@ -317,7 +317,7 @@ 0 - successful completion -ENODEV - irq doesn't specify a valid subchannel number -EINVAL - an invalid parameter was detected --EBUSY - an irrecoverable I/O error occured or the device is not +-EBUSY - an irrecoverable I/O error occurred or the device is not operational. Usage Notes : @@ -549,7 +549,7 @@ typedef struct { char cmd_code; /* command code */ - char flags; /* flags, like IDA adressing, etc. */ + char flags; /* flags, like IDA addressing, etc. */ unsigned short count; /* byte count */ void *cda; /* data address */ } ccw1_t __attribute__ ((aligned(8))); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Documentation/video4linux/API.html linux.20p6/Documentation/video4linux/API.html --- linux.vanilla/Documentation/video4linux/API.html Sun Mar 25 17:31:59 2001 +++ linux.20p6/Documentation/video4linux/API.html Tue Jun 19 09:59:54 2001 @@ -362,7 +362,7 @@ First OctetLeast Siginificant Byte of RDS Block Second OctetMost Siginificant Byte of RDS Block Third OctetBit 7:Error bit. Indicates that -an uncorrectable error occured during reception of this block. +an uncorrectable error occurred during reception of this block.  Bit 6:Corrected bit. Indicates that an error was corrected for this data block.  Bits 5-3:Reeived Offset. Indicates the diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/MAINTAINERS linux.20p6/MAINTAINERS --- linux.vanilla/MAINTAINERS Sun Mar 25 17:37:29 2001 +++ linux.20p6/MAINTAINERS Mon Jun 18 08:28:48 2001 @@ -242,8 +242,8 @@ S: Supported CYCLADES PC300 DRIVER -P: Ivan Passos -M: ivan@cyclades.com +P: Daniela Squassoni +M: daniela@cyclades.com W: http://www.cyclades.com/ S: Supported @@ -764,13 +764,13 @@ P: Phil Blundell M: Philip.Blundell@pobox.com P: Tim Waugh -M: tim@cyberelk.demon.co.uk +M: tim@cyberelk.net P: David Campbell M: campbell@torque.net P: Andrea Arcangeli M: andrea@e-mind.com L: linux-parport@torque.net -W: http://www.cyberelk.demon.co.uk/parport.html +W: http://people.redhat.com/twaugh/parport/ S: Maintained PARIDE DRIVERS FOR PARALLEL PORT IDE DEVICES diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/Makefile linux.20p6/Makefile --- linux.vanilla/Makefile Sun Mar 25 17:39:55 2001 +++ linux.20p6/Makefile Mon Jun 25 15:35:03 2001 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 2 -SUBLEVEL = 19 -EXTRAVERSION = +SUBLEVEL = 20 +EXTRAVERSION = pre6 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) @@ -423,7 +423,8 @@ rm -rf modules distclean: mrproper - rm -f core `find . \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ + rm -f core `find . \( -not -type d \) -and \ + \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ -o -name '.*.rej' -o -name '.SUMS' -o -size 0 \) -print` TAGS diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/alpha/kernel/entry.S linux.20p6/arch/alpha/kernel/entry.S --- linux.vanilla/arch/alpha/kernel/entry.S Sun Mar 25 17:37:29 2001 +++ linux.20p6/arch/alpha/kernel/entry.S Mon Jun 18 08:34:59 2001 @@ -32,11 +32,12 @@ #define TASK_ADDR_LIMIT 24 #define TASK_EXEC_DOMAIN 32 #define TASK_NEED_RESCHED 40 +#define TASK_PTRACE 48 /* * task flags (must match include/linux/sched.h): */ -#define PF_PTRACED 0x00000010 +#define PT_PTRACED 0x00000001 /* * This defines the normal kernel pt-regs layout. @@ -558,7 +559,7 @@ ldq $3,TASK_FLAGS($8) stq $17,SP_OFF+32($30) s8addq $0,$5,$5 - and $3,PF_PTRACED,$3 + and $3,PT_PTRACED,$3 stq $18,SP_OFF+40($30) bne $3,strace beq $4,1f diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/alpha/kernel/ptrace.c linux.20p6/arch/alpha/kernel/ptrace.c --- linux.vanilla/arch/alpha/kernel/ptrace.c Sun Mar 25 17:31:46 2001 +++ linux.20p6/arch/alpha/kernel/ptrace.c Mon Jun 18 08:34:59 2001 @@ -527,10 +527,10 @@ ret = -EPERM; if (request == PTRACE_TRACEME) { /* are we already being traced? */ - if (current->flags & PF_PTRACED) + if (current->ptrace & PT_PTRACED) goto out; /* set the ptrace bit in the process flags. */ - current->flags |= PF_PTRACED; + current->ptrace |= PT_PTRACED; ret = 0; goto out; } @@ -553,9 +553,9 @@ && !capable(CAP_SYS_PTRACE)) goto out; /* the same process cannot be attached many times */ - if (child->flags & PF_PTRACED) + if (child->ptrace & PT_PTRACED) goto out; - child->flags |= PF_PTRACED; + child->ptrace |= PT_PTRACED; if (child->p_pptr != current) { REMOVE_LINKS(child); child->p_pptr = current; @@ -566,7 +566,7 @@ goto out; } ret = -ESRCH; - if (!(child->flags & PF_PTRACED)) { + if (!(child->ptrace & PT_PTRACED)) { DBG(DBG_MEM, ("child not traced\n")); goto out; } @@ -622,9 +622,9 @@ if ((unsigned long) data > _NSIG) goto out; if (request == PTRACE_SYSCALL) - child->flags |= PF_TRACESYS; + child->ptrace |= PT_TRACESYS; else - child->flags &= ~PF_TRACESYS; + child->ptrace &= ~PT_TRACESYS; child->exit_code = data; wake_up_process(child); /* make sure single-step breakpoint is gone. */ @@ -652,7 +652,7 @@ if ((unsigned long) data > _NSIG) goto out; child->tss.bpt_nsaved = -1; /* mark single-stepping */ - child->flags &= ~PF_TRACESYS; + child->ptrace &= ~PT_TRACESYS; wake_up_process(child); child->exit_code = data; /* give it a chance to run. */ @@ -663,7 +663,7 @@ ret = -EIO; if ((unsigned long) data > _NSIG) goto out; - child->flags &= ~(PF_PTRACED|PF_TRACESYS); + child->ptrace &= ~(PT_PTRACED|PT_TRACESYS); wake_up_process(child); child->exit_code = data; REMOVE_LINKS(child); @@ -686,8 +686,8 @@ asmlinkage void syscall_trace(void) { - if ((current->flags & (PF_PTRACED|PF_TRACESYS)) - != (PF_PTRACED|PF_TRACESYS)) + if ((current->ptrace & (PT_PTRACED|PT_TRACESYS)) + != (PT_PTRACED|PT_TRACESYS)) return; current->exit_code = SIGTRAP; current->state = TASK_STOPPED; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/alpha/kernel/signal.c linux.20p6/arch/alpha/kernel/signal.c --- linux.vanilla/arch/alpha/kernel/signal.c Sun Mar 25 17:31:46 2001 +++ linux.20p6/arch/alpha/kernel/signal.c Tue Jun 19 09:37:49 2001 @@ -621,7 +621,7 @@ if (!signr) break; - if ((current->flags & PF_PTRACED) && signr != SIGKILL) { + if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { /* Let the debugger run. */ current->exit_code = signr; current->state = TASK_STOPPED; @@ -692,12 +692,8 @@ case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: - lock_kernel(); - if (current->binfmt - && current->binfmt->core_dump - && current->binfmt->core_dump(signr, regs)) + if (do_coredump(signr, regs)) exit_code |= 0x80; - unlock_kernel(); /* FALLTHRU */ default: diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/alpha/kernel/sys_alcor.c linux.20p6/arch/alpha/kernel/sys_alcor.c --- linux.vanilla/arch/alpha/kernel/sys_alcor.c Sun Mar 25 17:31:46 2001 +++ linux.20p6/arch/alpha/kernel/sys_alcor.c Mon Jun 18 08:21:42 2001 @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -186,13 +187,21 @@ static void alcor_kill_arch (int mode, char *reboot_cmd) { - /* Who said DEC engineer's have no sense of humor? ;-) */ - if (alpha_using_srm) { - *(vuip) GRU_RESET = 0x0000dead; - mb(); + switch(mode) { + case LINUX_REBOOT_CMD_RESTART: + /* Who said DEC engineer's have no sense of humor? ;-) */ + if (alpha_using_srm) { + *(vuip) GRU_RESET = 0x0000dead; + mb(); + } + break; + case LINUX_REBOOT_CMD_HALT: + break; + case LINUX_REBOOT_CMD_POWER_OFF: + break; } - generic_kill_arch(mode, reboot_cmd); + halt(); } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/alpha/kernel/sys_miata.c linux.20p6/arch/alpha/kernel/sys_miata.c --- linux.vanilla/arch/alpha/kernel/sys_miata.c Sun Mar 25 17:31:46 2001 +++ linux.20p6/arch/alpha/kernel/sys_miata.c Mon Jun 18 08:28:04 2001 @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -274,12 +275,22 @@ static void miata_kill_arch (int mode, char *reboot_cmd) { - /* Who said DEC engineers have no sense of humor? ;-) */ - if (alpha_using_srm) { - *(vuip) PYXIS_RESET = 0x0000dead; - mb(); - } - generic_kill_arch(mode, reboot_cmd); + switch(mode) { + case LINUX_REBOOT_CMD_HALT: + break; + case LINUX_REBOOT_CMD_RESTART: + /* Who said DEC engineers have no sense of humor? ;-) */ + if (alpha_using_srm) { + *(vuip) PYXIS_RESET = 0x0000dead; + mb(); + } + generic_kill_arch(mode, reboot_cmd); + break; + case LINUX_REBOOT_CMD_POWER_OFF: + break; + } + + halt(); } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/arm/kernel/ptrace.c linux.20p6/arch/arm/kernel/ptrace.c --- linux.vanilla/arch/arm/kernel/ptrace.c Sun Mar 25 17:37:29 2001 +++ linux.20p6/arch/arm/kernel/ptrace.c Mon Jun 18 08:34:59 2001 @@ -662,9 +662,9 @@ if ((unsigned long) data > _NSIG) break; if (request == PTRACE_SYSCALL) - child->flags |= PF_TRACESYS; + child->ptrace |= PT_TRACESYS; else - child->flags &= ~PF_TRACESYS; + child->ptrace &= ~PT_TRACESYS; child->exit_code = data; /* make sure single-step breakpoint is gone. */ ptrace_cancel_bpt(child); @@ -697,7 +697,7 @@ if ((unsigned long) data > _NSIG) break; child->tss.debug.nsaved = -1; - child->flags &= ~PF_TRACESYS; + child->ptrace &= ~PT_TRACESYS; child->exit_code = data; /* give it a chance to run. */ wake_up_process(child); @@ -711,7 +711,7 @@ ret = -EIO; if ((unsigned long) data > _NSIG) break; - child->flags &= ~(PF_PTRACED|PF_TRACESYS); + child->ptrace &= ~(PT_PTRACED|PT_TRACESYS); child->exit_code = data; REMOVE_LINKS(child); child->p_pptr = child->p_opptr; @@ -799,10 +799,10 @@ ret = -EPERM; if (request == PTRACE_TRACEME) { /* are we already being traced? */ - if (current->flags & PF_PTRACED) + if (current->ptrace & PT_PTRACED) goto out; /* set the ptrace bit in the process flags. */ - current->flags |= PF_PTRACED; + current->ptrace |= PT_PTRACED; ret = 0; goto out; } @@ -826,9 +826,9 @@ (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE)) goto out; /* the same process cannot be attached many times */ - if (child->flags & PF_PTRACED) + if (child->ptrace & PT_PTRACED) goto out; - child->flags |= PF_PTRACED; + child->ptrace |= PT_PTRACED; if (child->p_pptr != current) { REMOVE_LINKS(child); @@ -841,7 +841,7 @@ goto out; } ret = -ESRCH; - if (!(child->flags & PF_PTRACED)) + if (!(child->ptrace & PT_PTRACED)) goto out; if (child->state != TASK_STOPPED && request != PTRACE_KILL) goto out; @@ -857,8 +857,8 @@ asmlinkage void syscall_trace(void) { - if ((current->flags & (PF_PTRACED|PF_TRACESYS)) - != (PF_PTRACED|PF_TRACESYS)) + if ((current->ptrace & (PT_PTRACED|PT_TRACESYS)) + != (PT_PTRACED|PT_TRACESYS)) return; current->exit_code = SIGTRAP; current->state = TASK_STOPPED; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/arm/kernel/signal.c linux.20p6/arch/arm/kernel/signal.c --- linux.vanilla/arch/arm/kernel/signal.c Sun Mar 25 17:37:29 2001 +++ linux.20p6/arch/arm/kernel/signal.c Tue Jun 19 09:37:49 2001 @@ -474,7 +474,7 @@ if (!signr) break; - if ((current->flags & PF_PTRACED) && signr != SIGKILL) { + if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { /* Let the debugger run. */ current->exit_code = signr; current->state = TASK_STOPPED; @@ -544,12 +544,8 @@ case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: - lock_kernel(); - if (current->binfmt - && current->binfmt->core_dump - && current->binfmt->core_dump(signr, regs)) + if (do_coredump(signr, regs)) exit_code |= 0x80; - unlock_kernel(); /* FALLTHRU */ default: diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/boot/compressed/head.S linux.20p6/arch/i386/boot/compressed/head.S --- linux.vanilla/arch/i386/boot/compressed/head.S Sun Mar 25 17:31:45 2001 +++ linux.20p6/arch/i386/boot/compressed/head.S Tue Jun 19 09:53:19 2001 @@ -65,6 +65,7 @@ movl %eax,0x000000 # loop forever if it isn't cmpl %eax,0x100000 je 1b + /* * Initialize eflags. Some BIOS's leave bits like NT set. This would * confuse the debugger if this code is traced. @@ -86,10 +87,14 @@ * Do the decompression, and jump to the new kernel.. */ subl $16,%esp # place for structure on the stack - pushl %esp # address of structure as first arg + movl %esp,%eax + pushl %esi # real mode pointer as second arg + pushl %eax # address of structure as first arg call SYMBOL_NAME(decompress_kernel) orl %eax,%eax jnz 3f + popl %esi # discard address + popl %esi # real mode pointer xorl %ebx,%ebx ljmp $(__KERNEL_CS), $0x100000 @@ -104,11 +109,14 @@ movl $0x1000,%edi movl $move_routine_end,%ecx subl %esi,%ecx + addl $3,%ecx + shrl $2,%ecx cld rep - movsb + movsl popl %esi # discard the address + popl %ebx # real mode pointer popl %esi # low_buffer_start popl %ecx # lcount popl %edx # high_buffer_start @@ -122,18 +130,21 @@ * if we were high loaded. This _must_ PIC-code ! */ move_routine_start: + movl %ecx,%ebp + shrl $2,%ecx + rep + movsl + movl %ebp,%ecx + andl $3,%ecx rep movsb movl %edx,%esi movl %eax,%ecx # NOTE: rep movsb won't move if %ecx == 0 + addl $3,%ecx + shrl $2,%ecx rep - movsb + movsl + movl %ebx,%esi # Restore setup pointer xorl %ebx,%ebx -/* - * Well, the kernel relies on %esp pointing into low mem, - * with the decompressor loaded high this is no longer true, - * so we set esp here. - */ - mov $0x90000,%esp ljmp $(__KERNEL_CS), $0x100000 move_routine_end: diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/boot/compressed/misc.c linux.20p6/arch/i386/boot/compressed/misc.c --- linux.vanilla/arch/i386/boot/compressed/misc.c Sun Mar 25 17:31:45 2001 +++ linux.20p6/arch/i386/boot/compressed/misc.c Tue Jun 19 09:53:19 2001 @@ -74,11 +74,13 @@ /* * This is set up by the setup-routine at boot-time */ -#define EXT_MEM_K (*(unsigned short *)0x90002) +static unsigned char *real_mode; /* Pointer to real-mode data */ + +#define EXT_MEM_K (*(unsigned short *)(real_mode + 0x2)) #ifndef STANDARD_MEMORY_BIOS_CALL -#define ALT_MEM_K (*(unsigned long *) 0x901e0) +#define ALT_MEM_K (*(unsigned long *)(real_mode + 0x1e0)) #endif -#define SCREEN_INFO (*(struct screen_info *)0x90000) +#define SCREEN_INFO (*(struct screen_info *)(real_mode+0)) extern char input_data[]; extern int input_len; @@ -98,13 +100,13 @@ extern int end; static long free_mem_ptr = (long)&end; -static long free_mem_end_ptr = 0x90000; +static long free_mem_end_ptr; #define INPLACE_MOVE_ROUTINE 0x1000 #define LOW_BUFFER_START 0x2000 -#define LOW_BUFFER_END 0x90000 -#define LOW_BUFFER_SIZE ( LOW_BUFFER_END - LOW_BUFFER_START ) +#define LOW_BUFFER_MAX 0x90000 #define HEAP_SIZE 0x2400 +static unsigned int low_buffer_end, low_buffer_size; static int high_loaded =0; static uch *high_buffer_start /* = (uch *)(((ulg)&end) + HEAP_SIZE)*/; @@ -255,7 +257,7 @@ in = window; for (n = 0; n < outcnt; n++) { ch = *output_data++ = *in++; - if ((ulg)output_data == LOW_BUFFER_END) output_data=high_buffer_start; + if ((ulg)output_data == low_buffer_end) output_data=high_buffer_start; c = crc_32_tab[((int)c ^ ch) & 0xff] ^ (c >> 8); } crc = c; @@ -311,10 +313,13 @@ if ((ALT_MEM_K > EXT_MEM_K ? ALT_MEM_K : EXT_MEM_K) < (3*1024)) error("Less than 4MB of memory.\n"); #endif mv->low_buffer_start = output_data = (char *)LOW_BUFFER_START; + low_buffer_end = ((unsigned int)real_mode > LOW_BUFFER_MAX + ? LOW_BUFFER_MAX : (unsigned int)real_mode) & ~0xfff; + low_buffer_size = low_buffer_end - LOW_BUFFER_START; high_loaded = 1; free_mem_end_ptr = (long)high_buffer_start; - if ( (0x100000 + LOW_BUFFER_SIZE) > ((ulg)high_buffer_start)) { - high_buffer_start = (uch *)(0x100000 + LOW_BUFFER_SIZE); + if ( (0x100000 + low_buffer_size) > ((ulg)high_buffer_start)) { + high_buffer_start = (uch *)(0x100000 + low_buffer_size); mv->hcount = 0; /* say: we need not to move high_buffer */ } else mv->hcount = -1; @@ -323,17 +328,21 @@ void close_output_buffer_if_we_run_high(struct moveparams *mv) { - mv->lcount = bytes_out; - if (bytes_out > LOW_BUFFER_SIZE) { - mv->lcount = LOW_BUFFER_SIZE; - if (mv->hcount) mv->hcount = bytes_out - LOW_BUFFER_SIZE; + if (bytes_out > low_buffer_size) { + mv->lcount = low_buffer_size; + if (mv->hcount) + mv->hcount = bytes_out - low_buffer_size; + } else { + mv->lcount = bytes_out; + mv->hcount = 0; } - else mv->hcount = 0; } -int decompress_kernel(struct moveparams *mv) +int decompress_kernel(struct moveparams *mv, void *rmode) { + real_mode = rmode; + if (SCREEN_INFO.orig_video_mode == 7) { vidmem = (char *) 0xb0000; vidport = 0x3b4; @@ -355,4 +364,3 @@ if (high_loaded) close_output_buffer_if_we_run_high(mv); return high_loaded; } - diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/boot/setup.S linux.20p6/arch/i386/boot/setup.S --- linux.vanilla/arch/i386/boot/setup.S Sun Mar 25 17:37:29 2001 +++ linux.20p6/arch/i386/boot/setup.S Tue Jun 19 09:53:19 2001 @@ -69,7 +69,7 @@ ! SETUP-header, must start at CS:2 (old 0x9020:2) ! .ascii "HdrS" ! Signature for SETUP-header - .word 0x0201 ! Version number of header format + .word 0x0202 ! Version number of header format ! (must be >= 0x0105 ! else old loadlin-1.5 will fail) realmode_swtch: .word 0,0 ! default_switch,SETUPSEG @@ -120,9 +120,28 @@ ramdisk_size: .long 0 ! its size in bytes bootsect_kludge: .word bootsect_helper,SETUPSEG -heap_end_ptr: .word modelist+1024 ! space from here (exclusive) down to - ! end of setup code can be used by setup - ! for local heap purposes. +heap_end_ptr: .word modelist+1024 ! (Header version 0x0201 or later) + ! space from here (exclusive) down to + ! end of setup code can be used by setup + ! for local heap purposes. + +pad1: .word 0 ! Reserved for future use + +cmd_line_ptr: .long 0 ! (Header version 0x0202 or later) + ! If nonzero, a 32-bit pointer + ! to the kernel command line. + ! The command line should be + ! located between the start of + ! setup and the end of low + ! memory (0xa0000), or it may + ! get overwritten before it + ! gets read. If this field is + ! used, there is no longer + ! anything magical about the + ! 0x90000 segment; the setup + ! can be located anywhere in + ! low memory 0x10000 or higher. + ! ------------------------ end of header ---------------------------------- start_of_setup: @@ -534,6 +553,13 @@ mov ax,cs ! aka #SETUPSEG ! right, forgot this at first. didn't work :-) mov ds,ax +! Check whether we need to be downward compatible with version <= 0x0201 + cmp dword ptr [cmd_line_ptr],#0 + jne end_move_self + cmp byte ptr [type_of_loader],#0x20 + je end_move_self + +! Boot loader does not support boot protocol version 2.02. ! If we have our code not at 0x90000, we need to move it there now. ! We also then need to move the parameters behind it (command line) ! Because we would overwrite the code on the current IP, we move @@ -572,9 +598,14 @@ mov ds,ax mov ss,dx ! now we are at the right place -end_move_self: +end_move_self: lidt idt_48 ! load idt with 0,0 + xor eax,eax + mov ax,ds + shl eax,#4 + add eax,#gdt + mov [gdt_48+2],eax lgdt gdt_48 ! load gdt with whatever appropriate ! that was painless, now we enable A20 @@ -679,7 +710,11 @@ jmp flush_instr flush_instr: xor bx,bx ! Flag to indicate a boot - + xor esi,esi ! Pointer to real-mode code + mov si,cs + sub si,#DELTA_INITSEG + shl esi,#4 ! Convert to 32-bit pointer + ! NOTE: For high loaded big kernels we need a ! jmpi 0x100000,__KERNEL_CS ! @@ -873,7 +908,7 @@ gdt_48: .word 0x800 ! gdt limit=2048, 256 GDT entries - .word 512+gdt,0x9 ! gdt base = 0X9xxxx + .word 0, 0 ! gdt base (filled in later) ! ! Include video setup & detection code diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/kernel/bluesmoke.c linux.20p6/arch/i386/kernel/bluesmoke.c --- linux.vanilla/arch/i386/kernel/bluesmoke.c Sun Mar 25 17:31:45 2001 +++ linux.20p6/arch/i386/kernel/bluesmoke.c Fri May 4 23:10:21 2001 @@ -46,6 +46,7 @@ printk(" at %08x%08x", high, low); } + printk("\n"); /* Clear it */ wrmsr(0x401+i*4, 0UL, 0UL); /* Serialize */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/kernel/entry.S linux.20p6/arch/i386/kernel/entry.S --- linux.vanilla/arch/i386/kernel/entry.S Sun Mar 25 17:37:29 2001 +++ linux.20p6/arch/i386/kernel/entry.S Mon Jun 18 08:34:59 2001 @@ -76,6 +76,7 @@ addr_limit = 12 exec_domain = 16 need_resched = 20 +ptrace = 24 ENOSYS = 38 @@ -174,7 +175,7 @@ GET_CURRENT(%ebx) cmpl $(NR_syscalls),%eax jae badsys - testb $0x20,flags(%ebx) # PF_TRACESYS + testb $0x02,ptrace(%ebx) # PT_TRACESYS jne tracesys call *SYMBOL_NAME(sys_call_table)(,%eax,4) movl %eax,EAX(%esp) # save the return value diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/kernel/head.S linux.20p6/arch/i386/kernel/head.S --- linux.vanilla/arch/i386/kernel/head.S Sun Mar 25 17:31:45 2001 +++ linux.20p6/arch/i386/kernel/head.S Tue Jun 19 09:53:19 2001 @@ -14,11 +14,11 @@ #include #include - -#define CL_MAGIC_ADDR 0x90020 -#define CL_MAGIC 0xA33F -#define CL_BASE_ADDR 0x90000 -#define CL_OFFSET 0x90022 +#define OLD_CL_MAGIC_ADDR 0x90020 +#define OLD_CL_MAGIC 0xA33F +#define OLD_CL_BASE_ADDR 0x90000 +#define OLD_CL_OFFSET 0x90022 +#define NEW_CL_POINTER 0x228 /* Relative to real mode data */ /* * References to members of the boot_cpu_data structure. @@ -36,6 +36,8 @@ /* * swapper_pg_dir is the main page directory, address 0x00101000 + * + * On entry, %esi points to the real-mode code as a 32-bit pointer. */ ENTRY(stext) ENTRY(_stext) @@ -52,6 +54,9 @@ #ifdef __SMP__ orw %bx,%bx jz 1f +#endif + +#ifdef __SMP__ /* * New page tables may be in 4Mbyte page mode and may * be using the global pages. @@ -89,6 +94,7 @@ jmp checkCPUtype 1: #endif __SMP__ + /* * Clear BSS first so that there are no surprises... */ @@ -99,6 +105,7 @@ cld rep stosb + /* * start system 32-bit setup. We need to re-do some of the things done * in 16-bit mode for the "real" operations. @@ -115,8 +122,9 @@ * Copy bootup parameters out of the way. First 2kB of * _empty_zero_page is for boot parameters, second 2kB * is for the command line. + * + * Note: %esi still has the pointer to the real-mode data. */ - movl $0x90000,%esi movl $ SYMBOL_NAME(empty_zero_page),%edi movl $512,%ecx cld @@ -126,11 +134,15 @@ movl $512,%ecx rep stosl - cmpw $(CL_MAGIC),CL_MAGIC_ADDR + movl SYMBOL_NAME(empty_zero_page)+NEW_CL_POINTER,%esi + andl %esi,%esi + jnz 2f + cmpw $(OLD_CL_MAGIC),OLD_CL_MAGIC_ADDR jne 1f + movzwl OLD_CL_OFFSET,%esi + addl $(OLD_CL_BASE_ADDR),%esi +2: movl $ SYMBOL_NAME(empty_zero_page)+2048,%edi - movzwl CL_OFFSET,%esi - addl $(CL_BASE_ADDR),%esi movl $2048,%ecx rep movsb diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/kernel/process.c linux.20p6/arch/i386/kernel/process.c --- linux.vanilla/arch/i386/kernel/process.c Sun Mar 25 17:31:45 2001 +++ linux.20p6/arch/i386/kernel/process.c Mon Jun 18 08:34:59 2001 @@ -808,7 +808,7 @@ goto out; error = do_execve(filename, (char **) regs.ecx, (char **) regs.edx, ®s); if (error == 0) - current->flags &= ~PF_DTRACE; + current->ptrace &= ~PT_DTRACE; putname(filename); out: unlock_kernel(); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/kernel/ptrace.c linux.20p6/arch/i386/kernel/ptrace.c --- linux.vanilla/arch/i386/kernel/ptrace.c Sun Mar 25 17:31:45 2001 +++ linux.20p6/arch/i386/kernel/ptrace.c Mon Jun 18 08:34:59 2001 @@ -394,10 +394,10 @@ ret = -EPERM; if (request == PTRACE_TRACEME) { /* are we already being traced? */ - if (current->flags & PF_PTRACED) + if (current->ptrace & PT_PTRACED) goto out; /* set the ptrace bit in the process flags. */ - current->flags |= PF_PTRACED; + current->ptrace |= PT_PTRACED; ret = 0; goto out; } @@ -423,9 +423,9 @@ (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE)) goto out; /* the same process cannot be attached many times */ - if (child->flags & PF_PTRACED) + if (child->ptrace & PT_PTRACED) goto out; - child->flags |= PF_PTRACED; + child->ptrace |= PT_PTRACED; write_lock_irqsave(&tasklist_lock, flags); if (child->p_pptr != current) { @@ -440,7 +440,7 @@ goto out; } ret = -ESRCH; - if (!(child->flags & PF_PTRACED)) + if (!(child->ptrace & PT_PTRACED)) goto out; if (child->state != TASK_STOPPED) { if (request != PTRACE_KILL) @@ -542,9 +542,9 @@ if ((unsigned long) data > _NSIG) goto out; if (request == PTRACE_SYSCALL) - child->flags |= PF_TRACESYS; + child->ptrace |= PT_TRACESYS; else - child->flags &= ~PF_TRACESYS; + child->ptrace &= ~PT_TRACESYS; child->exit_code = data; /* make sure the single step bit is not set. */ tmp = get_stack_long(child, EFL_OFFSET) & ~TRAP_FLAG; @@ -579,10 +579,10 @@ ret = -EIO; if ((unsigned long) data > _NSIG) goto out; - child->flags &= ~PF_TRACESYS; - if ((child->flags & PF_DTRACE) == 0) { + child->ptrace &= ~PT_TRACESYS; + if ((child->ptrace & PT_DTRACE) == 0) { /* Spurious delayed TF traps may occur */ - child->flags |= PF_DTRACE; + child->ptrace |= PT_DTRACE; } tmp = get_stack_long(child, EFL_OFFSET) | TRAP_FLAG; put_stack_long(child, EFL_OFFSET, tmp); @@ -599,7 +599,7 @@ ret = -EIO; if ((unsigned long) data > _NSIG) goto out; - child->flags &= ~(PF_PTRACED|PF_TRACESYS); + child->ptrace &= ~(PT_PTRACED|PT_TRACESYS); child->exit_code = data; write_lock_irqsave(&tasklist_lock, flags); REMOVE_LINKS(child); @@ -710,8 +710,8 @@ asmlinkage void syscall_trace(void) { - if ((current->flags & (PF_PTRACED|PF_TRACESYS)) - != (PF_PTRACED|PF_TRACESYS)) + if ((current->ptrace & (PT_PTRACED|PT_TRACESYS)) + != (PT_PTRACED|PT_TRACESYS)) return; current->exit_code = SIGTRAP; current->state = TASK_STOPPED; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/kernel/signal.c linux.20p6/arch/i386/kernel/signal.c --- linux.vanilla/arch/i386/kernel/signal.c Sun Mar 25 17:31:45 2001 +++ linux.20p6/arch/i386/kernel/signal.c Tue Jun 19 09:37:49 2001 @@ -629,7 +629,7 @@ if (!signr) break; - if ((current->flags & PF_PTRACED) && signr != SIGKILL) { + if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { /* Let the debugger run. */ current->exit_code = signr; current->state = TASK_STOPPED; @@ -697,12 +697,8 @@ case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: - lock_kernel(); - if (current->binfmt - && current->binfmt->core_dump - && current->binfmt->core_dump(signr, regs)) + if (do_coredump(signr, regs)) exit_code |= 0x80; - unlock_kernel(); /* FALLTHRU */ default: diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/kernel/traps.c linux.20p6/arch/i386/kernel/traps.c --- linux.vanilla/arch/i386/kernel/traps.c Sun Mar 25 17:37:30 2001 +++ linux.20p6/arch/i386/kernel/traps.c Mon Jun 18 08:34:59 2001 @@ -375,12 +375,12 @@ * The TF error should be masked out only if the current * process is not traced and if the TRAP flag has been set * previously by a tracing process (condition detected by - * the PF_DTRACE flag); remember that the i386 TRAP flag + * the PT_DTRACE flag); remember that the i386 TRAP flag * can be modified by the process itself in user mode, * allowing programs to debug themselves without the ptrace() * interface. */ - if ((tsk->flags & (PF_DTRACE|PF_PTRACED)) == PF_DTRACE) + if ((tsk->ptrace & (PT_DTRACE|PT_PTRACED)) == PT_DTRACE) goto clear_TF; } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/kernel/vm86.c linux.20p6/arch/i386/kernel/vm86.c --- linux.vanilla/arch/i386/kernel/vm86.c Sun Mar 25 17:31:45 2001 +++ linux.20p6/arch/i386/kernel/vm86.c Mon Jun 18 08:34:59 2001 @@ -439,7 +439,7 @@ } if (trapno !=1) return 1; /* we let this handle by the calling routine */ - if (current->flags & PF_PTRACED) { + if (current->ptrace & PT_PTRACED) { unsigned long flags; spin_lock_irqsave(¤t->sigmask_lock, flags); sigdelset(¤t->blocked, SIGTRAP); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/i386/math-emu/fpu_entry.c linux.20p6/arch/i386/math-emu/fpu_entry.c --- linux.vanilla/arch/i386/math-emu/fpu_entry.c Sun Mar 25 17:31:45 2001 +++ linux.20p6/arch/i386/math-emu/fpu_entry.c Mon Jun 18 08:34:59 2001 @@ -210,7 +210,7 @@ } FPU_lookahead = 1; - if (current->flags & PF_PTRACED) + if (current->ptrace & PT_PTRACED) FPU_lookahead = 0; if ( !valid_prefix(&byte1, (u_char **)&FPU_EIP, diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/m68k/kernel/ptrace.c linux.20p6/arch/m68k/kernel/ptrace.c --- linux.vanilla/arch/m68k/kernel/ptrace.c Sun Mar 25 17:31:50 2001 +++ linux.20p6/arch/m68k/kernel/ptrace.c Mon Jun 18 08:34:59 2001 @@ -320,10 +320,10 @@ ret = -EPERM; if (request == PTRACE_TRACEME) { /* are we already being traced? */ - if (current->flags & PF_PTRACED) + if (current->ptrace & PT_PTRACED) goto out; /* set the ptrace bit in the process flags. */ - current->flags |= PF_PTRACED; + current->ptrace |= PT_PTRACED; ret = 0; goto out; } @@ -349,9 +349,9 @@ (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE)) goto out; /* the same process cannot be attached many times */ - if (child->flags & PF_PTRACED) + if (child->ptrace & PT_PTRACED) goto out; - child->flags |= PF_PTRACED; + child->ptrace |= PT_PTRACED; write_lock_irqsave(&tasklist_lock, flags); if (child->p_pptr != current) { @@ -366,7 +366,7 @@ goto out; } ret = -ESRCH; - if (!(child->flags & PF_PTRACED)) + if (!(child->ptrace & PT_PTRACED)) goto out; if (child->state != TASK_STOPPED) { if (request != PTRACE_KILL) @@ -473,9 +473,9 @@ if ((unsigned long) data > _NSIG) goto out; if (request == PTRACE_SYSCALL) - child->flags |= PF_TRACESYS; + child->ptrace |= PT_TRACESYS; else - child->flags &= ~PF_TRACESYS; + child->ptrace &= ~PT_TRACESYS; child->exit_code = data; /* make sure the single step bit is not set. */ tmp = get_reg(child, PT_SR) & ~(TRACE_BITS << 16); @@ -510,7 +510,7 @@ ret = -EIO; if ((unsigned long) data > _NSIG) goto out; - child->flags &= ~PF_TRACESYS; + child->ptrace &= ~PT_TRACESYS; tmp = get_reg(child, PT_SR) | (TRACE_BITS << 16); put_reg(child, PT_SR, tmp); @@ -527,7 +527,7 @@ ret = -EIO; if ((unsigned long) data > _NSIG) goto out; - child->flags &= ~(PF_PTRACED|PF_TRACESYS); + child->ptrace &= ~(PT_PTRACED|PT_TRACESYS); child->exit_code = data; write_lock_irqsave(&tasklist_lock, flags); REMOVE_LINKS(child); @@ -607,8 +607,8 @@ asmlinkage void syscall_trace(void) { lock_kernel(); - if ((current->flags & (PF_PTRACED|PF_TRACESYS)) - != (PF_PTRACED|PF_TRACESYS)) + if ((current->ptrace & (PT_PTRACED|PT_TRACESYS)) + != (PT_PTRACED|PT_TRACESYS)) goto out; current->exit_code = SIGTRAP; current->state = TASK_STOPPED; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/m68k/kernel/signal.c linux.20p6/arch/m68k/kernel/signal.c --- linux.vanilla/arch/m68k/kernel/signal.c Sun Mar 25 17:31:50 2001 +++ linux.20p6/arch/m68k/kernel/signal.c Tue Jun 19 09:37:49 2001 @@ -1007,7 +1007,7 @@ if (!signr) break; - if ((current->flags & PF_PTRACED) && signr != SIGKILL) { + if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { current->exit_code = signr; current->state = TASK_STOPPED; regs->sr &= ~PS_T; @@ -1093,9 +1093,7 @@ case SIGQUIT: case SIGILL: case SIGTRAP: case SIGIOT: case SIGFPE: case SIGSEGV: - if (current->binfmt - && current->binfmt->core_dump - && current->binfmt->core_dump(signr, regs)) + if (do_coredump(signr, regs)) exit_code |= 0x80; /* FALLTHRU */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/m68k/kernel/traps.c linux.20p6/arch/m68k/kernel/traps.c --- linux.vanilla/arch/m68k/kernel/traps.c Sun Mar 25 17:31:50 2001 +++ linux.20p6/arch/m68k/kernel/traps.c Mon Jun 18 08:34:59 2001 @@ -921,7 +921,7 @@ if (fp->ptregs.sr & PS_S) { if ((fp->ptregs.vector >> 2) == VEC_TRACE) { /* traced a trapping instruction */ - current->flags |= PF_DTRACE; + current->ptrace |= PT_DTRACE; } else bad_super_trap(fp); return; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/mips/baget/irq.c linux.20p6/arch/mips/baget/irq.c --- linux.vanilla/arch/mips/baget/irq.c Sun Mar 25 17:31:48 2001 +++ linux.20p6/arch/mips/baget/irq.c Tue Jun 19 09:59:54 2001 @@ -212,7 +212,7 @@ add_interrupt_randomness(irq); __cli(); } else { - printk("do_IRQ: Unregistered IRQ (0x%X) occured\n", irq); + printk("do_IRQ: Unregistered IRQ (0x%X) occurred\n", irq); } unmask_irq(irq); hardirq_exit(cpu); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/mips/dec/prom/memory.c linux.20p6/arch/mips/dec/prom/memory.c --- linux.vanilla/arch/mips/dec/prom/memory.c Sun Mar 25 17:31:48 2001 +++ linux.20p6/arch/mips/dec/prom/memory.c Tue Jun 19 09:59:54 2001 @@ -25,7 +25,7 @@ extern unsigned long mips_memory_upper; -volatile unsigned long mem_err = 0; /* So we know an error occured */ +volatile unsigned long mem_err = 0; /* So we know an error occurred */ /* * Probe memory in 4MB chunks, waiting for an error to tell us we've fallen diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/mips/kernel/irixelf.c linux.20p6/arch/mips/kernel/irixelf.c --- linux.vanilla/arch/mips/kernel/irixelf.c Sun Mar 25 17:31:48 2001 +++ linux.20p6/arch/mips/kernel/irixelf.c Tue Jun 19 09:37:49 2001 @@ -44,15 +44,15 @@ static int load_irix_binary(struct linux_binprm * bprm, struct pt_regs * regs); static int load_irix_library(int fd); -static int irix_core_dump(long signr, struct pt_regs * regs); +static int irix_core_dump(long signr, struct pt_regs * regs, struct file *); extern int dump_fpu (elf_fpregset_t *); static struct linux_binfmt irix_format = { -#ifndef MODULE - NULL, NULL, load_irix_binary, load_irix_library, irix_core_dump -#else - NULL, &__this_module.usecount, load_irix_binary, load_irix_library, irix_core_dump -#endif + module: THIS_MODULE, + load_binary: load_irix_binary, + load_shlib: load_irix_library, + core_dump: irix_core_dump, + min_coredump: PAGE_SIZE, }; #ifndef elf_addr_t @@ -806,7 +806,7 @@ #endif start_thread(regs, elf_entry, bprm->p); - if (current->flags & PF_PTRACED) + if (current->ptrace & PT_PTRACED) send_sig(SIGTRAP, current, 0); return 0; @@ -1128,14 +1128,10 @@ * and then they are actually written out. If we run out of core limit * we just truncate. */ -static int irix_core_dump(long signr, struct pt_regs * regs) +static int irix_core_dump(long signr, struct pt_regs * regs, struct file * file) { int has_dumped = 0; - struct file *file; - struct dentry *dentry; - struct inode *inode; mm_segment_t fs; - char corefile[6+sizeof(current->comm)]; int segs; int i; size_t size; @@ -1148,14 +1144,6 @@ struct elf_prstatus prstatus; /* NT_PRSTATUS */ elf_fpregset_t fpu; /* NT_PRFPREG */ struct elf_prpsinfo psinfo; /* NT_PRPSINFO */ - - if (!current->dumpable || limit < PAGE_SIZE) - return 0; - current->dumpable = 0; - -#ifndef CONFIG_BINFMT_IRIX - MOD_INC_USE_COUNT; -#endif /* Count what's needed to dump, up to the limit of coredump size. */ segs = 0; @@ -1201,27 +1189,6 @@ fs = get_fs(); set_fs(KERNEL_DS); - memcpy(corefile,"core.", 5); -#if 0 - memcpy(corefile+5,current->comm,sizeof(current->comm)); -#else - corefile[4] = '\0'; -#endif - file = filp_open(corefile, O_CREAT | 2 | O_TRUNC | O_NOFOLLOW, 0600); - if (IS_ERR(file)) - goto end_coredump; - dentry = file->f_dentry; - inode = dentry->d_inode; - if (inode->i_nlink > 1) - goto close_coredump; /* multiple links - don't dump */ - - if (!S_ISREG(inode->i_mode)) - goto close_coredump; - if (!inode->i_op || !inode->i_op->default_file_ops) - goto close_coredump; - if (!file->f_op->write) - goto close_coredump; - has_dumped = 1; current->flags |= PF_DUMPCORE; @@ -1386,13 +1353,7 @@ } close_coredump: - filp_close(file, NULL); - - end_coredump: set_fs(fs); -#ifndef CONFIG_BINFMT_ELF - MOD_DEC_USE_COUNT; -#endif return has_dumped; } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/mips/kernel/irixsig.c linux.20p6/arch/mips/kernel/irixsig.c --- linux.vanilla/arch/mips/kernel/irixsig.c Sun Mar 25 17:31:48 2001 +++ linux.20p6/arch/mips/kernel/irixsig.c Tue Jun 19 09:37:49 2001 @@ -193,7 +193,7 @@ if (!signr) break; - if ((current->flags & PF_PTRACED) && signr != SIGKILL) { + if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { /* Let the debugger run. */ current->exit_code = signr; current->state = TASK_STOPPED; @@ -261,12 +261,8 @@ case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: - lock_kernel(); - if (current->binfmt - && current->binfmt->core_dump - && current->binfmt->core_dump(signr, regs)) + if (do_coredump(signr, regs)) exit_code |= 0x80; - unlock_kernel(); /* FALLTHRU */ default: @@ -707,7 +703,7 @@ if (!p->exit_code) continue; if (!(options & (W_TRAPPED|W_STOPPED)) && - !(p->flags & PF_PTRACED)) + !(p->ptrace & PT_PTRACED)) continue; if (ru != NULL) getrusage(p, RUSAGE_BOTH, ru); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/mips/kernel/ptrace.c linux.20p6/arch/mips/kernel/ptrace.c --- linux.vanilla/arch/mips/kernel/ptrace.c Sun Mar 25 17:31:48 2001 +++ linux.20p6/arch/mips/kernel/ptrace.c Mon Jun 18 08:34:59 2001 @@ -270,12 +270,12 @@ #endif if (request == PTRACE_TRACEME) { /* are we already being traced? */ - if (current->flags & PF_PTRACED) { + if (current->ptrace & PT_PTRACED) { res = -EPERM; goto out; } /* set the ptrace bit in the process flags. */ - current->flags |= PF_PTRACED; + current->ptrace |= PT_PTRACED; res = 0; goto out; } @@ -306,9 +306,9 @@ goto out; } /* the same process cannot be attached many times */ - if (child->flags & PF_PTRACED) + if (child->ptrace & PT_PTRACED) goto out; - child->flags |= PF_PTRACED; + child->ptrace |= PT_PTRACED; write_lock_irqsave(&tasklist_lock, flags); if (child->p_pptr != current) { @@ -322,7 +322,7 @@ res = 0; goto out; } - if (!(child->flags & PF_PTRACED)) { + if (!(child->ptrace & PT_PTRACED)) { res = -ESRCH; goto out; } @@ -473,9 +473,9 @@ goto out; } if (request == PTRACE_SYSCALL) - child->flags |= PF_TRACESYS; + child->ptrace |= PT_TRACESYS; else - child->flags &= ~PF_TRACESYS; + child->ptrace &= ~PT_TRACESYS; child->exit_code = data; wake_up_process(child); res = data; @@ -501,7 +501,7 @@ res = -EIO; goto out; } - child->flags &= ~(PF_PTRACED|PF_TRACESYS); + child->ptrace &= ~(PT_PTRACED|PT_TRACESYS); child->exit_code = data; REMOVE_LINKS(child); child->p_pptr = child->p_opptr; @@ -522,8 +522,8 @@ asmlinkage void syscall_trace(void) { - if ((current->flags & (PF_PTRACED|PF_TRACESYS)) - != (PF_PTRACED|PF_TRACESYS)) + if ((current->ptrace & (PT_PTRACED|PT_TRACESYS)) + != (PT_PTRACED|PT_TRACESYS)) return; current->exit_code = SIGTRAP; current->state = TASK_STOPPED; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/mips/kernel/scall_o32.S linux.20p6/arch/mips/kernel/scall_o32.S --- linux.vanilla/arch/mips/kernel/scall_o32.S Sun Mar 25 17:31:48 2001 +++ linux.20p6/arch/mips/kernel/scall_o32.S Mon Jun 18 08:34:59 2001 @@ -15,7 +15,7 @@ #include /* This duplicates the definition from */ -#define PF_TRACESYS 0x00000020 /* tracing system calls */ +#define PT_TRACESYS 0x00000002 /* tracing system calls */ /* This duplicates the definition from */ #define SIGILL 4 /* Illegal instruction (ANSI). */ @@ -48,8 +48,8 @@ bgez t0, stackargs stack_done: - lw t0, TASK_FLAGS($28) # syscall tracing enabled? - andi t0, PF_TRACESYS + lw t0, TASK_PTRACE($28) # syscall tracing enabled? + andi t0, PT_TRACESYS bnez t0, trace_a_syscall jalr t2 # Do The Real Thing (TM) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/mips/kernel/signal.c linux.20p6/arch/mips/kernel/signal.c --- linux.vanilla/arch/mips/kernel/signal.c Sun Mar 25 17:31:48 2001 +++ linux.20p6/arch/mips/kernel/signal.c Tue Jun 19 09:37:49 2001 @@ -424,7 +424,7 @@ if (!signr) break; - if ((current->flags & PF_PTRACED) && signr != SIGKILL) { + if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { /* Let the debugger run. */ current->exit_code = signr; current->state = TASK_STOPPED; @@ -493,12 +493,8 @@ case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: case SIGBUS: - lock_kernel(); - if (current->binfmt - && current->binfmt->core_dump - && current->binfmt->core_dump(signr, regs)) + if (do_coredump(signr, regs)) exit_code |= 0x80; - unlock_kernel(); /* FALLTHRU */ default: diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/ppc/kernel/head.S linux.20p6/arch/ppc/kernel/head.S --- linux.vanilla/arch/ppc/kernel/head.S Sun Mar 25 17:31:48 2001 +++ linux.20p6/arch/ppc/kernel/head.S Mon Jun 18 08:34:59 2001 @@ -2129,8 +2129,8 @@ cmpi 1,r0,0x6666 /* Special case for 'sys_rt_sigreturn' */ beq- 10f beq- cr1,16f - lwz r10,TASK_FLAGS(r2) - andi. r10,r10,PF_TRACESYS + lwz r10,TASK_PTRACE(r2) + andi. r10,r10,PT_TRACESYS bne- 50f cmpli 0,r0,NR_syscalls bge- 66f diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/ppc/kernel/mk_defs.c linux.20p6/arch/ppc/kernel/mk_defs.c --- linux.vanilla/arch/ppc/kernel/mk_defs.c Sun Mar 25 17:31:48 2001 +++ linux.20p6/arch/ppc/kernel/mk_defs.c Mon Jun 18 08:34:59 2001 @@ -43,8 +43,9 @@ DEFINE(PGD, offsetof(struct mm_struct, pgd)); DEFINE(LAST_SYSCALL, offsetof(struct thread_struct, last_syscall)); DEFINE(PT_REGS, offsetof(struct thread_struct, regs)); - DEFINE(PF_TRACESYS, PF_TRACESYS); + DEFINE(PT_TRACESYS, PT_TRACESYS); DEFINE(TASK_FLAGS, offsetof(struct task_struct, flags)); + DEFINE(TASK_PTRACE, offsetof(struct task_struct, ptrace)); DEFINE(NEED_RESCHED, offsetof(struct task_struct, need_resched)); DEFINE(TSS_FPR0, offsetof(struct thread_struct, fpr[0])); DEFINE(TSS_FPSCR, offsetof(struct thread_struct, fpscr)); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/ppc/kernel/openpic.c linux.20p6/arch/ppc/kernel/openpic.c --- linux.vanilla/arch/ppc/kernel/openpic.c Sun Mar 25 17:37:30 2001 +++ linux.20p6/arch/ppc/kernel/openpic.c Tue Jun 19 09:59:54 2001 @@ -242,8 +242,8 @@ openpic_mapirq(i, 1<<0); } } else { - /* Prevent any interrupt from occuring during initialisation. - * Hum... I beleive this is not necessary, Apple does that in + /* Prevent any interrupt from occurring during initialisation. + * Hum... I believe this is not necessary, Apple does that in * Darwin's PowerExpress code. */ openpic_set_priority(0, 0xf); @@ -635,4 +635,4 @@ for (i=0; iProcessor[i].Current_Task_Priority, save_cpu_task_pri[i]); } -#endif /* CONFIG_PMAC_PBOOK */ \ No newline at end of file +#endif /* CONFIG_PMAC_PBOOK */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/ppc/kernel/pmac_pci.c linux.20p6/arch/ppc/kernel/pmac_pci.c --- linux.vanilla/arch/ppc/kernel/pmac_pci.c Sun Mar 25 17:31:49 2001 +++ linux.20p6/arch/ppc/kernel/pmac_pci.c Tue Jun 19 09:59:54 2001 @@ -109,7 +109,7 @@ bridge_node = NULL; node = find_pci_device_OFnode(bus, dev_fn & 0xf8); if (node) { - /* note: we don't stop on the first occurence since we need to go + /* note: we don't stop on the first occurrence since we need to go * up to the root bridge */ do { if (node->type && !strcmp(node->type, "pci") diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/ppc/kernel/ptrace.c linux.20p6/arch/ppc/kernel/ptrace.c --- linux.vanilla/arch/ppc/kernel/ptrace.c Sun Mar 25 17:31:49 2001 +++ linux.20p6/arch/ppc/kernel/ptrace.c Mon Jun 18 08:34:59 2001 @@ -341,10 +341,10 @@ lock_kernel(); if (request == PTRACE_TRACEME) { /* are we already being traced? */ - if (current->flags & PF_PTRACED) + if (current->ptrace & PT_PTRACED) goto out; /* set the ptrace bit in the process flags. */ - current->flags |= PF_PTRACED; + current->ptrace |= PT_PTRACED; ret = 0; goto out; } @@ -370,9 +370,9 @@ (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE)) goto out; /* the same process cannot be attached many times */ - if (child->flags & PF_PTRACED) + if (child->ptrace & PT_PTRACED) goto out; - child->flags |= PF_PTRACED; + child->ptrace |= PT_PTRACED; write_lock_irqsave(&tasklist_lock, flags); if (child->p_pptr != current) { @@ -387,7 +387,7 @@ goto out; } ret = -ESRCH; - if (!(child->flags & PF_PTRACED)) + if (!(child->ptrace & PT_PTRACED)) goto out; if (child->state != TASK_STOPPED) { if (request != PTRACE_KILL) @@ -472,9 +472,9 @@ if ((unsigned long) data > _NSIG) goto out; if (request == PTRACE_SYSCALL) - child->flags |= PF_TRACESYS; + child->ptrace |= PT_TRACESYS; else - child->flags &= ~PF_TRACESYS; + child->ptrace &= ~PT_TRACESYS; child->exit_code = data; /* make sure the single step bit is not set. */ clear_single_step(child); @@ -503,7 +503,7 @@ ret = -EIO; if ((unsigned long) data > _NSIG) goto out; - child->flags &= ~PF_TRACESYS; + child->ptrace &= ~PT_TRACESYS; set_single_step(child); child->exit_code = data; /* give it a chance to run. */ @@ -516,7 +516,7 @@ ret = -EIO; if ((unsigned long) data > _NSIG) goto out; - child->flags &= ~(PF_PTRACED|PF_TRACESYS); + child->ptrace &= ~(PT_PTRACED|PT_TRACESYS); child->exit_code = data; write_lock_irqsave(&tasklist_lock, flags); REMOVE_LINKS(child); @@ -541,8 +541,8 @@ asmlinkage void syscall_trace(void) { - if ((current->flags & (PF_PTRACED|PF_TRACESYS)) - != (PF_PTRACED|PF_TRACESYS)) + if ((current->ptrace & (PT_PTRACED|PT_TRACESYS)) + != (PT_PTRACED|PT_TRACESYS)) return; current->exit_code = SIGTRAP; current->state = TASK_STOPPED; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/ppc/kernel/signal.c linux.20p6/arch/ppc/kernel/signal.c --- linux.vanilla/arch/ppc/kernel/signal.c Sun Mar 25 17:31:49 2001 +++ linux.20p6/arch/ppc/kernel/signal.c Tue Jun 19 09:37:49 2001 @@ -558,7 +558,7 @@ if (!signr) break; - if ((current->flags & PF_PTRACED) && signr != SIGKILL) { + if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { /* Let the debugger run. */ current->exit_code = signr; current->state = TASK_STOPPED; @@ -626,12 +626,8 @@ case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: - lock_kernel(); - if (current->binfmt - && current->binfmt->core_dump - && current->binfmt->core_dump(signr, regs)) + if (do_coredump(signr, regs)) exit_code |= 0x80; - unlock_kernel(); /* FALLTHRU */ default: diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/s390/kernel/entry.S linux.20p6/arch/s390/kernel/entry.S --- linux.vanilla/arch/s390/kernel/entry.S Sun Mar 25 17:37:30 2001 +++ linux.20p6/arch/s390/kernel/entry.S Tue Jun 19 09:59:54 2001 @@ -661,7 +661,7 @@ lr %r3,%r8 la %r0,0x7f nr %r3,%r0 # clear per-event-bit - be BASED(pgm_dn) # none of Martins exceptions occured bypass + be BASED(pgm_dn) # none of Martins exceptions occurred bypass l %r9,BASED(.Ljump_table) sll %r3,2 l %r9,0(%r3,%r9) # load address of handler routine diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/s390/kernel/process.c linux.20p6/arch/s390/kernel/process.c --- linux.vanilla/arch/s390/kernel/process.c Sun Mar 25 17:31:55 2001 +++ linux.20p6/arch/s390/kernel/process.c Mon Jun 18 08:34:59 2001 @@ -404,7 +404,7 @@ error = do_execve(filename, (char **) regs.gprs[3], (char **) regs.gprs[4], ®s); if (error == 0) { - current->flags &= ~PF_DTRACE; + current->ptrace &= ~PT_DTRACE; current->tss.fp_regs.fpc=0; if(MACHINE_HAS_IEEE) { diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/s390/kernel/ptrace.c linux.20p6/arch/s390/kernel/ptrace.c --- linux.vanilla/arch/s390/kernel/ptrace.c Sun Mar 25 17:31:55 2001 +++ linux.20p6/arch/s390/kernel/ptrace.c Mon Jun 18 08:34:59 2001 @@ -435,10 +435,10 @@ if (request == PTRACE_TRACEME) { /* are we already being traced? */ - if (current->flags & PF_PTRACED) + if (current->ptrace & PT_PTRACED) goto out; /* set the ptrace bit in the process flags. */ - current->flags |= PF_PTRACED; + current->ptrace |= PT_PTRACED; ret = 0; goto out; } @@ -459,9 +459,9 @@ (current->gid != child->gid)) && !capable(CAP_SYS_PTRACE)) goto out; /* the same process cannot be attached many times */ - if (child->flags & PF_PTRACED) + if (child->ptrace & PT_PTRACED) goto out; - child->flags |= PF_PTRACED; + child->ptrace |= PT_PTRACED; if (child->p_pptr != current) { REMOVE_LINKS(child); @@ -478,7 +478,7 @@ /* ieee_instruction_pointer from the user structure DJB */ if(child!=current) { - if (!(child->flags & PF_PTRACED)) + if (!(child->ptrace & PT_PTRACED)) goto out; if (child->state != TASK_STOPPED) { @@ -524,9 +524,9 @@ if ((unsigned long) data >= _NSIG) break; if (request == PTRACE_SYSCALL) - child->flags |= PF_TRACESYS; + child->ptrace |= PT_TRACESYS; else - child->flags &= ~PF_TRACESYS; + child->ptrace &= ~PT_TRACESYS; child->exit_code = data; /* make sure the single step bit is not set. */ clear_single_step(child); @@ -553,7 +553,7 @@ ret = -EIO; if ((unsigned long) data >= _NSIG) break; - child->flags &= ~PF_TRACESYS; + child->ptrace &= ~PT_TRACESYS; child->exit_code = data; set_single_step(child); /* give it a chance to run. */ @@ -565,7 +565,7 @@ ret = -EIO; if ((unsigned long) data >= _NSIG) break; - child->flags &= ~(PF_PTRACED|PF_TRACESYS); + child->ptrace &= ~(PT_PTRACED|PT_TRACESYS); wake_up_process(child); child->exit_code = data; REMOVE_LINKS(child); @@ -593,8 +593,8 @@ asmlinkage void syscall_trace(void) { lock_kernel(); - if ((current->flags & (PF_PTRACED|PF_TRACESYS)) - != (PF_PTRACED|PF_TRACESYS)) + if ((current->ptrace & (PT_PTRACED|PT_TRACESYS)) + != (PT_PTRACED|PT_TRACESYS)) goto out; current->exit_code = SIGTRAP; current->state = TASK_STOPPED; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/s390/kernel/signal.c linux.20p6/arch/s390/kernel/signal.c --- linux.vanilla/arch/s390/kernel/signal.c Sun Mar 25 17:37:30 2001 +++ linux.20p6/arch/s390/kernel/signal.c Tue Jun 19 09:37:49 2001 @@ -461,7 +461,7 @@ if (!signr) break; - if ((current->flags & PF_PTRACED) && signr != SIGKILL) { + if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { /* Let the debugger run. */ current->exit_code = signr; current->state = TASK_STOPPED; @@ -529,12 +529,8 @@ case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: - lock_kernel(); - if (current->binfmt - && current->binfmt->core_dump - && current->binfmt->core_dump(signr, regs)) + if (do_coredump(signr, regs)) exit_code |= 0x80; - unlock_kernel(); /* FALLTHRU */ default: diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/s390/kernel/traps.c linux.20p6/arch/s390/kernel/traps.c --- linux.vanilla/arch/s390/kernel/traps.c Sun Mar 25 17:31:55 2001 +++ linux.20p6/arch/s390/kernel/traps.c Mon Jun 18 08:34:59 2001 @@ -94,7 +94,7 @@ { if(regs->psw.mask&PSW_PROBLEM_STATE) { - if(current->flags & PF_PTRACED) + if(current->ptrace & PT_PTRACED) force_sig(signal,current); else return(TRUE); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/s390/tools/dasdfmt/dasdfmt.c linux.20p6/arch/s390/tools/dasdfmt/dasdfmt.c --- linux.vanilla/arch/s390/tools/dasdfmt/dasdfmt.c Sun Mar 25 17:37:30 2001 +++ linux.20p6/arch/s390/tools/dasdfmt/dasdfmt.c Tue Jun 19 09:59:54 2001 @@ -479,7 +479,7 @@ rc=stat(dev_name,&stat_buf); if (rc) { - ERRMSG_EXIT(EXIT_FAILURE,"%s: error occured during stat: " \ + ERRMSG_EXIT(EXIT_FAILURE,"%s: error occurred during stat: " \ "%s\n",prog_name,strerror(errno)); } else { if (!S_ISBLK(stat_buf.st_mode)) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc/kernel/entry.S linux.20p6/arch/sparc/kernel/entry.S --- linux.vanilla/arch/sparc/kernel/entry.S Sun Mar 25 17:31:46 2001 +++ linux.20p6/arch/sparc/kernel/entry.S Tue Jun 19 09:34:58 2001 @@ -1,4 +1,4 @@ -/* $Id: entry.S,v 1.159.2.8 2000/10/05 04:17:17 anton Exp $ +/* $Id: entry.S,v 1.159.2.9 2001/06/18 12:26:13 davem Exp $ * arch/sparc/kernel/entry.S: Sparc trap low-level entry points. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -1237,8 +1237,8 @@ call C_LABEL(do_ptrace) add %sp, REGWIN_SZ, %o0 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1287,8 +1287,8 @@ call C_LABEL(do_sigpause) add %sp, REGWIN_SZ, %o1 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1305,8 +1305,8 @@ call C_LABEL(do_sigsuspend) add %sp, REGWIN_SZ, %o0 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1324,8 +1324,8 @@ call C_LABEL(do_rt_sigsuspend) add %sp, REGWIN_SZ, %o2 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1342,8 +1342,8 @@ call C_LABEL(do_sigreturn) add %sp, REGWIN_SZ, %o0 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1362,8 +1362,8 @@ call C_LABEL(do_rt_sigreturn) add %sp, REGWIN_SZ, %o0 - ld [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 + ld [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be 1f nop @@ -1500,9 +1500,9 @@ mov %i1, %o1 mov %i2, %o2 - ld [%curptr + AOFF_task_flags], %l5 + ld [%curptr + AOFF_task_ptrace], %l5 mov %i3, %o3 - andcc %l5, 0x20, %g0 + andcc %l5, 0x02, %g0 mov %i4, %o4 bne linux_syscall_trace mov %i0, %l5 @@ -1514,12 +1514,12 @@ .globl C_LABEL(ret_sys_call) C_LABEL(ret_sys_call): - ld [%curptr + AOFF_task_flags], %l6 + ld [%curptr + AOFF_task_ptrace], %l6 cmp %o0, -ENOIOCTLCMD ld [%sp + REGWIN_SZ + PT_PSR], %g3 set PSR_C, %g2 bgeu 1f - andcc %l6, 0x20, %l6 + andcc %l6, 0x02, %l6 /* System call success, clear Carry condition code. */ andn %g3, %g2, %g3 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc/kernel/ptrace.c linux.20p6/arch/sparc/kernel/ptrace.c --- linux.vanilla/arch/sparc/kernel/ptrace.c Sun Mar 25 17:31:47 2001 +++ linux.20p6/arch/sparc/kernel/ptrace.c Mon Jun 18 08:34:59 2001 @@ -535,12 +535,12 @@ #endif if(request == PTRACE_TRACEME) { /* are we already being traced? */ - if (current->flags & PF_PTRACED) { + if (current->ptrace & PT_PTRACED) { pt_error_return(regs, EPERM); goto out; } /* set the ptrace bit in the process flags. */ - current->flags |= PF_PTRACED; + current->ptrace |= PT_PTRACED; pt_succ_return(regs, 0); goto out; } @@ -578,11 +578,11 @@ goto out; } /* the same process cannot be attached many times */ - if (child->flags & PF_PTRACED) { + if (child->ptrace & PT_PTRACED) { pt_error_return(regs, EPERM); goto out; } - child->flags |= PF_PTRACED; + child->ptrace |= PT_PTRACED; write_lock_irqsave(&tasklist_lock, flags); if(child->p_pptr != current) { REMOVE_LINKS(child); @@ -594,7 +594,7 @@ pt_succ_return(regs, 0); goto out; } - if (!(child->flags & PF_PTRACED) + if (!(child->ptrace & PT_PTRACED) && ((current->personality & PER_BSD) && (request != PTRACE_SUNATTACH)) && (!(current->personality & PER_BSD) && (request != PTRACE_ATTACH))) { pt_error_return(regs, ESRCH); @@ -861,9 +861,9 @@ } if (request == PTRACE_SYSCALL) - child->flags |= PF_TRACESYS; + child->ptrace |= PT_TRACESYS; else - child->flags &= ~PF_TRACESYS; + child->ptrace &= ~PT_TRACESYS; child->exit_code = data; #ifdef DEBUG_PTRACE @@ -900,7 +900,7 @@ pt_error_return(regs, EIO); goto out; } - child->flags &= ~(PF_PTRACED|PF_TRACESYS); + child->ptrace &= ~(PT_PTRACED|PT_TRACESYS); wake_up_process(child); child->exit_code = data; write_lock_irqsave(&tasklist_lock, flags); @@ -927,8 +927,8 @@ #ifdef DEBUG_PTRACE printk("%s [%d]: syscall_trace\n", current->comm, current->pid); #endif - if ((current->flags & (PF_PTRACED|PF_TRACESYS)) - != (PF_PTRACED|PF_TRACESYS)) + if ((current->ptrace & (PT_PTRACED|PT_TRACESYS)) + != (PT_PTRACED|PT_TRACESYS)) return; current->exit_code = SIGTRAP; current->state = TASK_STOPPED; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc/kernel/signal.c linux.20p6/arch/sparc/kernel/signal.c --- linux.vanilla/arch/sparc/kernel/signal.c Sun Mar 25 17:31:46 2001 +++ linux.20p6/arch/sparc/kernel/signal.c Tue Jun 19 09:37:49 2001 @@ -1,4 +1,4 @@ -/* $Id: signal.c,v 1.91.2.2 2000/05/28 19:13:21 ecd Exp $ +/* $Id: signal.c,v 1.91.2.3 2001/06/18 12:26:13 davem Exp $ * linux/arch/sparc/kernel/signal.c * * Copyright (C) 1991, 1992 Linus Torvalds @@ -1139,7 +1139,7 @@ if (!signr) break; - if ((current->flags & PF_PTRACED) && signr != SIGKILL) { + if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { current->exit_code = signr; current->state = TASK_STOPPED; @@ -1203,7 +1203,7 @@ continue; case SIGSTOP: - if (current->flags & PF_PTRACED) + if (current->ptrace & PT_PTRACED) continue; current->state = TASK_STOPPED; current->exit_code = signr; @@ -1217,14 +1217,8 @@ case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: case SIGBUS: - if(current->binfmt && current->binfmt->core_dump) { - lock_kernel(); - if(current->binfmt && - current->binfmt->core_dump && - current->binfmt->core_dump(signr, regs)) - exit_code |= 0x80; - unlock_kernel(); - } + if (do_coredump(signr, regs)) + exit_code |= 0x80; #ifdef DEBUG_SIGNALS /* Very useful to debug dynamic linker problems */ printk ("Sig %ld going for %s[%d]...\n", signr, current->comm, current->pid); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc/lib/memset.S linux.20p6/arch/sparc/lib/memset.S --- linux.vanilla/arch/sparc/lib/memset.S Sun Mar 25 17:31:47 2001 +++ linux.20p6/arch/sparc/lib/memset.S Tue Jun 19 09:59:54 2001 @@ -185,7 +185,7 @@ b 30f add %o0, %o1, %o0 30: -/* %o4 is faulting address, %o5 is %pc where fault occured */ +/* %o4 is faulting address, %o5 is %pc where fault occurred */ save %sp, -104, %sp mov %i5, %o0 mov %i7, %o1 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc64/kernel/binfmt_aout32.c linux.20p6/arch/sparc64/kernel/binfmt_aout32.c --- linux.vanilla/arch/sparc64/kernel/binfmt_aout32.c Sun Mar 25 17:31:53 2001 +++ linux.20p6/arch/sparc64/kernel/binfmt_aout32.c Tue Jun 19 09:37:49 2001 @@ -34,12 +34,16 @@ static int load_aout32_binary(struct linux_binprm *, struct pt_regs * regs); static int load_aout32_library(int fd); -static int aout32_core_dump(long signr, struct pt_regs * regs); +static int aout32_core_dump(long signr, struct pt_regs * regs, struct file *); extern void dump_thread(struct pt_regs *, struct user *); static struct linux_binfmt aout32_format = { - NULL, NULL, load_aout32_binary, load_aout32_library, aout32_core_dump + module: THIS_MODULE, + load_binary: load_aout32_binary, + load_shlib: load_aout32_library, + core_dump: aout32_core_dump, + min_coredump: PAGE_SIZE, }; static void set_brk(unsigned long start, unsigned long end) @@ -87,46 +91,18 @@ * dumping of the process results in another error.. */ -static inline int -do_aout32_core_dump(long signr, struct pt_regs * regs) +static int +aout32_core_dump(long signr, struct pt_regs * regs, struct file * file) { - struct dentry * dentry = NULL; - struct inode * inode = NULL; - struct file * file; mm_segment_t fs; int has_dumped = 0; - char corefile[6+sizeof(current->comm)]; unsigned long dump_start, dump_size; struct user dump; # define START_DATA(u) (u.u_tsize) # define START_STACK(u) ((regs->u_regs[UREG_FP]) & ~(PAGE_SIZE - 1)) - if (!current->dumpable || atomic_read(¤t->mm->count) != 1) - return 0; - current->dumpable = 0; - -/* See if we have enough room to write the upage. */ - if (current->rlim[RLIMIT_CORE].rlim_cur < PAGE_SIZE) - return 0; fs = get_fs(); set_fs(KERNEL_DS); - memcpy(corefile,"core.",5); -#if 0 - memcpy(corefile+5,current->comm,sizeof(current->comm)); -#else - corefile[4] = '\0'; -#endif - file = filp_open(corefile,O_CREAT | 2 | O_TRUNC | O_NOFOLLOW, 0600); - if (IS_ERR(file)) - goto end_coredump; - dentry = file->f_dentry; - inode = dentry->d_inode; - if (!S_ISREG(inode->i_mode)) - goto close_coredump; - if (!inode->i_op || !inode->i_op->default_file_ops) - goto close_coredump; - if (!file->f_op->write) - goto close_coredump; has_dumped = 1; current->flags |= PF_DUMPCORE; strncpy(dump.u_comm, current->comm, sizeof(current->comm)); @@ -172,23 +148,10 @@ set_fs(KERNEL_DS); DUMP_WRITE(current,sizeof(*current)); close_coredump: - filp_close(file, NULL); -end_coredump: set_fs(fs); return has_dumped; } -static int -aout32_core_dump(long signr, struct pt_regs * regs) -{ - int retval; - - MOD_INC_USE_COUNT; - retval = do_aout32_core_dump(signr, regs); - MOD_DEC_USE_COUNT; - return retval; -} - /* * create_aout32_tables() parses the env- and arg-strings in new user * memory and creates the pointer tables from them, and puts their @@ -375,7 +338,7 @@ p = (unsigned long) create_aout32_tables((char *)p, bprm); current->mm->start_stack = p; start_thread32(regs, ex.a_entry, p); - if (current->flags & PF_PTRACED) + if (current->ptrace & PT_PTRACED) send_sig(SIGTRAP, current, 0); return 0; } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc64/kernel/devices.c linux.20p6/arch/sparc64/kernel/devices.c --- linux.vanilla/arch/sparc64/kernel/devices.c Sun Mar 25 17:31:53 2001 +++ linux.20p6/arch/sparc64/kernel/devices.c Tue May 8 15:49:12 2001 @@ -73,6 +73,15 @@ prom_cpu_nodes[0] = prom_node_cpu; +#ifndef __SMP__ + { + extern unsigned int up_clock_tick; + up_clock_tick = prom_getintdefault(prom_node_cpu, + "clock-frequency", + 0); + } +#endif + mem_start = central_probe(mem_start); cpu_probe(); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc64/kernel/entry.S linux.20p6/arch/sparc64/kernel/entry.S --- linux.vanilla/arch/sparc64/kernel/entry.S Sun Mar 25 17:31:53 2001 +++ linux.20p6/arch/sparc64/kernel/entry.S Tue Jun 19 09:34:58 2001 @@ -1,4 +1,4 @@ -/* $Id: entry.S,v 1.103.2.6 2000/09/08 14:00:04 jj Exp $ +/* $Id: entry.S,v 1.103.2.7 2001/06/18 12:26:13 davem Exp $ * arch/sparc64/kernel/entry.S: Sparc64 trap low-level entry points. * * Copyright (C) 1995,1997 David S. Miller (davem@caip.rutgers.edu) @@ -880,8 +880,8 @@ add %o7, 1f-.-4, %o7 nop .align 32 -1: ldx [%curptr + AOFF_task_flags], %l5 - andcc %l5, 0x20, %g0 +1: ldx [%curptr + AOFF_task_ptrace], %l5 + andcc %l5, 0x02, %g0 be,pt %icc, rtrap clr %l6 call syscall_trace @@ -1015,12 +1015,12 @@ mov %i4, %o4 ! IEU1 lduw [%l7 + %l4], %l7 ! Load srl %i1, 0, %o1 ! IEU0 Group - ldx [%curptr + AOFF_task_flags], %l0 ! Load + ldx [%curptr + AOFF_task_ptrace], %l0 ! Load mov %i5, %o5 ! IEU1 srl %i2, 0, %o2 ! IEU0 Group mov %i0, %l5 ! IEU1 - andcc %l0, 0x20, %g0 ! IEU1 Group + andcc %l0, 0x02, %g0 ! IEU1 Group bne,pn %icc, linux_syscall_trace32 ! CTI srl %i3, 0, %o3 ! IEU0 call %l7 ! CTI Group brk forced @@ -1044,11 +1044,11 @@ mov %i1, %o1 ! IEU1 lduw [%l7 + %l4], %l7 ! Load 4: mov %i2, %o2 ! IEU0 Group - ldx [%curptr + AOFF_task_flags], %l0 ! Load + ldx [%curptr + AOFF_task_ptrace], %l0 ! Load mov %i3, %o3 ! IEU1 mov %i4, %o4 ! IEU0 Group - andcc %l0, 0x20, %g0 ! IEU1 Group+1 bubble + andcc %l0, 0x02, %g0 ! IEU1 Group+1 bubble bne,pn %icc, linux_syscall_trace ! CTI Group mov %i0, %l5 ! IEU0 2: call %l7 ! CTI Group brk forced @@ -1059,14 +1059,14 @@ call syscall_trace_exit add %sp, STACK_BIAS + REGWIN_SZ, %o1 #endif - ldx [%curptr + AOFF_task_flags], %l6 + ldx [%curptr + AOFF_task_ptrace], %l6 sra %o0, 0, %o0 mov %ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2 ldx [%sp + STACK_BIAS + REGWIN_SZ + PT_V9_TSTATE], %g3 cmp %o0, -ENOIOCTLCMD sllx %g2, 32, %g2 bgeu,pn %xcc, 1f - andcc %l6, 0x20, %l6 + andcc %l6, 0x02, %l6 /* System call success, clear Carry condition code. */ andn %g3, %g2, %g3 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc64/kernel/ioctl32.c linux.20p6/arch/sparc64/kernel/ioctl32.c --- linux.vanilla/arch/sparc64/kernel/ioctl32.c Sun Mar 25 17:37:30 2001 +++ linux.20p6/arch/sparc64/kernel/ioctl32.c Tue Jun 19 09:34:59 2001 @@ -1,4 +1,4 @@ -/* $Id: ioctl32.c,v 1.62.2.18 2001/01/26 22:26:07 davem Exp $ +/* $Id: ioctl32.c,v 1.62.2.21 2001/06/08 01:34:11 davem Exp $ * ioctl32.c: Conversion between 32bit and 64bit native ioctls. * * Copyright (C) 1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz) @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -492,10 +493,19 @@ } } if (!err) { - if (i <= ifc32.ifc_len) + if (ifc32.ifcbuf == 0) { + /* Translate from 64-bit structure multiple to + * a 32-bit one. + */ + i = ifc.ifc_len; + i = ((i / sizeof(struct ifreq)) * sizeof(struct ifreq32)); ifc32.ifc_len = i; - else - ifc32.ifc_len = i - sizeof (struct ifreq32); + } else { + if (i <= ifc32.ifc_len) + ifc32.ifc_len = i; + else + ifc32.ifc_len = i - sizeof (struct ifreq32); + } if (copy_to_user((struct ifconf32 *)arg, &ifc32, sizeof(struct ifconf32))) err = -EFAULT; } @@ -2682,6 +2692,8 @@ case /* STOP_ARRAY */ _IO (MD_MAJOR, 0x32): case /* STOP_ARRAY_RO */ _IO (MD_MAJOR, 0x33): case /* RESTART_ARRAY_RW */ _IO (MD_MAJOR, 0x34): + case /* PRINT_RAID_DEBUG */ _IO (MD_MAJOR, 0x13): + case /* SET_DISK_FAULTY */ _IO (MD_MAJOR, 0x29): /* Big K */ case PIO_FONT: @@ -3136,6 +3148,13 @@ case DRM_IOCTL_FINISH: #endif /* DRM */ + /* Misc. */ + case 0x41545900: /* ATYIO_CLKR */ + case 0x41545901: /* ATYIO_CLKW */ + case PCIIOC_CONTROLLER: + case PCIIOC_MMAP_IS_IO: + case PCIIOC_MMAP_IS_MEM: + case PCIIOC_WRITE_COMBINE: error = sys_ioctl (fd, cmd, arg); goto out; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc64/kernel/irq.c linux.20p6/arch/sparc64/kernel/irq.c --- linux.vanilla/arch/sparc64/kernel/irq.c Sun Mar 25 17:31:53 2001 +++ linux.20p6/arch/sparc64/kernel/irq.c Mon Jun 18 08:19:48 2001 @@ -1,4 +1,4 @@ -/* $Id: irq.c,v 1.76.2.3 2000/03/02 02:03:27 davem Exp $ +/* $Id: irq.c,v 1.76.2.4 2001/06/04 06:51:17 ecd Exp $ * irq.c: UltraSparc IRQ handling/init/registry. * * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) @@ -1048,6 +1048,8 @@ unsigned char flags = bp->flags; nbp = __bucket(bp->irq_chain); + bp->irq_chain = 0; + if((flags & IBF_ACTIVE) != 0) { if((flags & IBF_MULTI) == 0) { struct irqaction *ap = bp->irq_info; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc64/kernel/process.c linux.20p6/arch/sparc64/kernel/process.c --- linux.vanilla/arch/sparc64/kernel/process.c Sun Mar 25 17:31:52 2001 +++ linux.20p6/arch/sparc64/kernel/process.c Mon Jun 18 08:19:48 2001 @@ -1,4 +1,4 @@ -/* $Id: process.c,v 1.92.2.3 1999/12/05 07:24:38 davem Exp $ +/* $Id: process.c,v 1.92.2.4 2001/06/03 13:41:48 ecd Exp $ * arch/sparc64/kernel/process.c * * Copyright (C) 1995, 1996 David S. Miller (davem@caip.rutgers.edu) @@ -116,6 +116,7 @@ extern void (*prom_palette)(int); extern int serial_console; #endif +extern void (*prom_keyboard)(void); void machine_halt(void) { @@ -126,6 +127,8 @@ if (!serial_console && prom_palette) prom_palette (1); #endif + if (prom_keyboard) + prom_keyboard(); prom_halt(); panic("Halt failed!"); } @@ -144,6 +147,8 @@ if (!serial_console && prom_palette) prom_palette (1); #endif + if (prom_keyboard) + prom_keyboard(); if (cmd) prom_reboot(cmd); if (*reboot_command) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc64/kernel/psycho.c linux.20p6/arch/sparc64/kernel/psycho.c --- linux.vanilla/arch/sparc64/kernel/psycho.c Sun Mar 25 17:31:53 2001 +++ linux.20p6/arch/sparc64/kernel/psycho.c Mon Jun 18 08:19:05 2001 @@ -1,4 +1,4 @@ -/* $Id: psycho.c,v 1.85.2.11 2000/10/24 21:00:53 davem Exp $ +/* $Id: psycho.c,v 1.85.2.12 2001/05/16 07:28:41 davem Exp $ * psycho.c: Ultra/AX U2P PCI controller support. * * Copyright (C) 1997 David S. Miller (davem@caipfs.rutgers.edu) @@ -682,12 +682,26 @@ static inline struct pci_vma *pci_vma_alloc(void) { - return kmalloc(sizeof(struct pci_vma), GFP_ATOMIC); + struct pci_vma *vma = kmalloc(sizeof(struct pci_vma), GFP_ATOMIC); + + if (!vma) { + prom_printf("PCI: Critical error, cannot allocate PCI_VMA.\n"); + prom_halt(); + } + + return vma; } static inline struct pcidev_cookie *pci_devcookie_alloc(void) { - return kmalloc(sizeof(struct pcidev_cookie), GFP_ATOMIC); + struct pcidev_cookie *cookie = kmalloc(sizeof(struct pcidev_cookie), GFP_ATOMIC); + + if (!cookie) { + prom_printf("PCI: Critical error, cannot allocate PCIDEV_COOKIE.\n"); + prom_halt(); + } + + return cookie; } @@ -804,18 +818,48 @@ } } +static void __init pci_fixup_host_bridge_self(struct pci_bus *pbus) +{ + struct pci_dev *pdev; + + for (pdev = pbus->devices; pdev; pdev = pdev->sibling) { + if (pdev->class >> 8 == PCI_CLASS_BRIDGE_HOST) { + pbus->self = pdev; + return; + } + } + + prom_printf("PCI: Critical error, cannot find host bridge PDEV.\n"); + prom_halt(); +} + +static struct pcidev_cookie * __init pci_alloc_hostbridge_cookie(struct linux_pbm_info *pbm) +{ + struct pcidev_cookie *cookie = pci_devcookie_alloc(); + + memset(cookie, 0, sizeof(*cookie)); + cookie->pbm = pbm; + + return cookie; +} + static void __init sabre_probe(struct linux_psycho *sabre) { struct pci_bus *pbus = sabre->pci_bus; static unsigned char busno = 0; + sabre->pbms_same_domain = 1; + pbus->number = pbus->secondary = busno; pbus->sysdata = sabre; pbus->subordinate = pci_scan_bus(pbus); busno = pbus->subordinate + 1; - for(pbus = pbus->children; pbus; pbus = pbus->next) { + pci_fixup_host_bridge_self(pbus); + pbus->self->sysdata = pci_alloc_hostbridge_cookie(&sabre->pbm_A); + + for (pbus = pbus->children; pbus; pbus = pbus->next) { if (pbus->number == sabre->pbm_A.pci_first_busno) memcpy(&sabre->pbm_A.pci_bus, pbus, sizeof(*pbus)); if (pbus->number == sabre->pbm_B.pci_first_busno) @@ -845,6 +889,9 @@ pbus->subordinate = pci_scan_bus(pbus); + pci_fixup_host_bridge_self(pbus); + pbus->self->sysdata = pci_alloc_hostbridge_cookie(pbm); + /* * Set the maximum subordinate bus of this pbm. */ @@ -2082,6 +2129,8 @@ if (apb_present(psycho)) { sabre_probe(psycho); } else { + psycho->pbms_same_domain = 0; + /* Probe busses under PBM B. */ pbm_probe(&psycho->pbm_B); @@ -2654,6 +2703,150 @@ return NULL; } return str; +} + +/* Platform support for /proc/bus/pci/X/Y mmap()s. */ + +/* Adjust vm_offset of VMA such that it is the physical page offset corresponding + * to the 32-bit pci bus offset for DEV requested by the user. + * + * Basically, the user finds the base address for his device which he wishes + * to mmap. They read the 32-bit value from the config space base register, + * add whatever PAGE_SIZE multiple offset they wish, and feed this into the + * offset parameter of mmap on /proc/bus/pci/XXX for that device. + * + * Returns negative error code on failure, zero on success. + */ +static __inline__ int __pci_mmap_make_offset(struct pci_dev *dev, struct vm_area_struct *vma, + enum pci_mmap_state mmap_state) +{ + unsigned long user_offset = vma->vm_offset; + unsigned long user32 = user_offset & 0xffffffffUL; + unsigned long largest_base, this_base, addr32; + int i; + + /* Figure out which base address this is for. */ + largest_base = 0UL; + for (i = 0; i <= 6; i++) { + unsigned long base = dev->base_address[i]; + + /* Active? */ + if (!base) + continue; + + /* Same type? */ + if (i == 6) { + if (mmap_state != pci_mmap_mem) + continue; + } else { + if ((mmap_state == pci_mmap_io && + (base & PCI_BASE_ADDRESS_SPACE_IO) == 0) || + (mmap_state == pci_mmap_mem && + (base & PCI_BASE_ADDRESS_SPACE_IO) != 0)) + continue; + } + + this_base = base; + + addr32 = (this_base & PAGE_MASK) & 0xffffffffUL; + + if (mmap_state == pci_mmap_io) + addr32 &= 0xffffff; + + if (addr32 <= user32 && this_base > largest_base) + largest_base = this_base; + } + + if (largest_base == 0UL) + return -EINVAL; + + largest_base = __pa(largest_base); + + /* Now construct the final physical address. */ + if (mmap_state == pci_mmap_io) + vma->vm_offset = (((largest_base & ~0xffffffUL) | user32) & PAGE_MASK); + else + vma->vm_offset = (((largest_base & ~0xffffffffUL) | user32) & PAGE_MASK); + + return 0; +} + +/* Set vm_flags of VMA, as appropriate for this architecture, for a pci device + * mapping. + */ +static __inline__ void __pci_mmap_set_flags(struct pci_dev *dev, struct vm_area_struct *vma, + enum pci_mmap_state mmap_state) +{ + vma->vm_flags |= (VM_SHM | VM_LOCKED); +} + +/* Set vm_page_prot of VMA, as appropriate for this architecture, for a pci + * device mapping. + */ +static __inline__ void __pci_mmap_set_pgprot(struct pci_dev *dev, struct vm_area_struct *vma, + enum pci_mmap_state mmap_state) +{ + /* Our io_remap_page_range takes care of this, do nothing. */ +} + +extern int io_remap_page_range(unsigned long from, unsigned long offset, + unsigned long size, pgprot_t prot, int space); + +/* Perform the actual remap of the pages for a PCI device mapping, as appropriate + * for this architecture. The region in the process to map is described by vm_start + * and vm_end members of VMA, the base physical address is found in vm_pgoff. + * The pci device structure is provided so that architectures may make mapping + * decisions on a per-device or per-bus basis. + * + * Returns a negative error code on failure, zero on success. + */ +int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, + enum pci_mmap_state mmap_state, + int write_combine) +{ + int ret; + + ret = __pci_mmap_make_offset(dev, vma, mmap_state); + if (ret < 0) + return ret; + + __pci_mmap_set_flags(dev, vma, mmap_state); + __pci_mmap_set_pgprot(dev, vma, mmap_state); + + ret = io_remap_page_range(vma->vm_start, + (vma->vm_offset | + (write_combine ? 0x1UL : 0x0UL)), + vma->vm_end - vma->vm_start, vma->vm_page_prot, 0); + if (ret) + return ret; + + vma->vm_flags |= VM_IO; + return 0; +} + +/* Return the index of the PCI controller for device PDEV. */ + +int pci_controller_num(struct pci_dev *pdev) +{ + struct pcidev_cookie *cookie = pdev->sysdata; + int ret; + + if (cookie != NULL) { + struct linux_pbm_info *pbm = cookie->pbm; + + if (pbm == NULL || pbm->parent == NULL) { + ret = -ENXIO; + } else { + ret = pbm->parent->index; + if (!pbm->parent->pbms_same_domain) + ret = ((ret << 1) + + ((pbm == &pbm->parent->pbm_B) ? 1 : 0)); + } + } else { + ret = -ENXIO; + } + + return ret; } #endif diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc64/kernel/ptrace.c linux.20p6/arch/sparc64/kernel/ptrace.c --- linux.vanilla/arch/sparc64/kernel/ptrace.c Sun Mar 25 17:31:53 2001 +++ linux.20p6/arch/sparc64/kernel/ptrace.c Mon Jun 18 08:34:59 2001 @@ -569,12 +569,12 @@ #endif if(request == PTRACE_TRACEME) { /* are we already being traced? */ - if (current->flags & PF_PTRACED) { + if (current->ptrace & PT_PTRACED) { pt_error_return(regs, EPERM); goto out; } /* set the ptrace bit in the process flags. */ - current->flags |= PF_PTRACED; + current->ptrace |= PT_PTRACED; pt_succ_return(regs, 0); goto out; } @@ -616,11 +616,11 @@ goto out; } /* the same process cannot be attached many times */ - if (child->flags & PF_PTRACED) { + if (child->ptrace & PT_PTRACED) { pt_error_return(regs, EPERM); goto out; } - child->flags |= PF_PTRACED; + child->ptrace |= PT_PTRACED; write_lock_irqsave(&tasklist_lock, flags); if(child->p_pptr != current) { REMOVE_LINKS(child); @@ -632,7 +632,7 @@ pt_succ_return(regs, 0); goto out; } - if (!(child->flags & PF_PTRACED) + if (!(child->ptrace & PT_PTRACED) && ((current->personality & PER_BSD) && (request != PTRACE_SUNATTACH)) && (!(current->personality & PER_BSD) && (request != PTRACE_ATTACH))) { pt_error_return(regs, ESRCH); @@ -1064,9 +1064,9 @@ } if (request == PTRACE_SYSCALL) - child->flags |= PF_TRACESYS; + child->ptrace |= PT_TRACESYS; else - child->flags &= ~PF_TRACESYS; + child->ptrace &= ~PT_TRACESYS; child->exit_code = data; #ifdef DEBUG_PTRACE @@ -1104,7 +1104,7 @@ pt_error_return(regs, EIO); goto out; } - child->flags &= ~(PF_PTRACED|PF_TRACESYS); + child->ptrace &= ~(PT_PTRACED|PT_TRACESYS); child->exit_code = data; write_lock_irqsave(&tasklist_lock, flags); @@ -1139,8 +1139,8 @@ #ifdef DEBUG_PTRACE printk("%s [%d]: syscall_trace\n", current->comm, current->pid); #endif - if ((current->flags & (PF_PTRACED|PF_TRACESYS)) - != (PF_PTRACED|PF_TRACESYS)) + if ((current->ptrace & (PT_PTRACED|PT_TRACESYS)) + != (PT_PTRACED|PT_TRACESYS)) return; current->exit_code = SIGTRAP; current->state = TASK_STOPPED; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc64/kernel/setup.c linux.20p6/arch/sparc64/kernel/setup.c --- linux.vanilla/arch/sparc64/kernel/setup.c Sun Mar 25 17:31:53 2001 +++ linux.20p6/arch/sparc64/kernel/setup.c Mon Jun 18 08:19:48 2001 @@ -1,4 +1,4 @@ -/* $Id: setup.c,v 1.43.2.5 2000/10/02 02:05:37 anton Exp $ +/* $Id: setup.c,v 1.43.2.7 2001/06/03 13:41:48 ecd Exp $ * linux/arch/sparc64/kernel/setup.c * * Copyright (C) 1995,1996 David S. Miller (davem@caip.rutgers.edu) @@ -65,6 +65,7 @@ #if CONFIG_SUN_CONSOLE void (*prom_palette)(int); #endif +void (*prom_keyboard)(void); asmlinkage void sys_sync(void); /* it's really int */ static void @@ -620,6 +621,10 @@ extern int smp_bogo(char *); extern int mmu_info(char *); +#ifndef __SMP__ +unsigned int up_clock_tick; +#endif + int get_cpuinfo(char *buffer) { int cpuid=smp_processor_id(); @@ -634,7 +639,8 @@ "ncpus probed\t: %d\n" "ncpus active\t: %d\n" #ifndef __SMP__ - "BogoMips\t: %lu.%02lu\n" + "Cpu0Bogo\t: %lu.%02lu\n" + "Cpu0ClkTck\t: %016lx\n" #endif , sparc_cpu_type[cpuid], @@ -642,7 +648,8 @@ prom_rev, prom_prev >> 16, (prom_prev >> 8) & 0xff, prom_prev & 0xff, linux_num_cpus, smp_num_cpus #ifndef __SMP__ - , loops_per_jiffy/(500000/HZ), (loops_per_jiffy/(5000/HZ)) % 100 + , loops_per_jiffy/(500000/HZ), (loops_per_jiffy/(5000/HZ)) % 100, + (unsigned long) up_clock_tick #endif ); #ifdef __SMP__ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc64/kernel/signal.c linux.20p6/arch/sparc64/kernel/signal.c --- linux.vanilla/arch/sparc64/kernel/signal.c Sun Mar 25 17:31:53 2001 +++ linux.20p6/arch/sparc64/kernel/signal.c Tue Jun 19 09:37:49 2001 @@ -1,4 +1,4 @@ -/* $Id: signal.c,v 1.38.2.1 1999/06/14 00:36:21 davem Exp $ +/* $Id: signal.c,v 1.38.2.2 2001/06/18 12:26:13 davem Exp $ * arch/sparc64/kernel/signal.c * * Copyright (C) 1991, 1992 Linus Torvalds @@ -850,7 +850,7 @@ if (!signr) break; - if ((current->flags & PF_PTRACED) && signr != SIGKILL) { + if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { current->exit_code = signr; current->state = TASK_STOPPED; notify_parent(current, SIGCHLD); @@ -906,7 +906,7 @@ continue; case SIGSTOP: - if (current->flags & PF_PTRACED) + if (current->ptrace & PT_PTRACED) continue; current->state = TASK_STOPPED; current->exit_code = signr; @@ -918,12 +918,8 @@ case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: case SIGBUS: - if(current->binfmt && current->binfmt->core_dump) { - lock_kernel(); - if(current->binfmt->core_dump(signr, regs)) - exit_code |= 0x80; - unlock_kernel(); - } + if (do_coredump(signr, regs)) + exit_code |= 0x80; #ifdef DEBUG_SIGNALS /* Very useful to debug the dynamic linker */ printk ("Sig %d going...\n", (int)signr); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc64/kernel/signal32.c linux.20p6/arch/sparc64/kernel/signal32.c --- linux.vanilla/arch/sparc64/kernel/signal32.c Sun Mar 25 17:31:52 2001 +++ linux.20p6/arch/sparc64/kernel/signal32.c Tue Jun 19 09:37:49 2001 @@ -1,4 +1,4 @@ -/* $Id: signal32.c,v 1.47.2.3 1999/12/20 01:14:06 davem Exp $ +/* $Id: signal32.c,v 1.47.2.4 2001/06/18 12:26:13 davem Exp $ * arch/sparc64/kernel/signal32.c * * Copyright (C) 1991, 1992 Linus Torvalds @@ -1279,7 +1279,7 @@ if (!signr) break; - if ((current->flags & PF_PTRACED) && signr != SIGKILL) { + if ((current->ptrace & PT_PTRACED) && signr != SIGKILL) { current->exit_code = signr; current->state = TASK_STOPPED; notify_parent(current, SIGCHLD); @@ -1335,7 +1335,7 @@ continue; case SIGSTOP: - if (current->flags & PF_PTRACED) + if (current->ptrace & PT_PTRACED) continue; current->state = TASK_STOPPED; current->exit_code = signr; @@ -1347,14 +1347,8 @@ case SIGQUIT: case SIGILL: case SIGTRAP: case SIGABRT: case SIGFPE: case SIGSEGV: case SIGBUS: - if(current->binfmt && current->binfmt->core_dump) { - lock_kernel(); - if(current->binfmt && - current->binfmt->core_dump && - current->binfmt->core_dump(signr, regs)) - exit_code |= 0x80; - unlock_kernel(); - } + if (do_coredump(signr, regs)) + exit_code |= 0x80; #ifdef DEBUG_SIGNALS /* Very useful to debug dynamic linker problems */ printk ("Sig %ld going for %s[%d]...\n", signr, current->comm, current->pid); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc64/kernel/smp.c linux.20p6/arch/sparc64/kernel/smp.c --- linux.vanilla/arch/sparc64/kernel/smp.c Sun Mar 25 17:31:53 2001 +++ linux.20p6/arch/sparc64/kernel/smp.c Tue May 8 15:49:12 2001 @@ -77,15 +77,17 @@ for (i = 0; i < NR_CPUS; i++) if(cpu_present_map & (1UL << i)) len += sprintf(buf + len, - "Cpu%dBogo\t: %lu.%02lu\n", + "Cpu%dBogo\t: %lu.%02lu\n" + "Cpu%dClkTck\t: %016lx\n", i, cpu_data[i].udelay_val / (500000/HZ), - (cpu_data[i].udelay_val / (5000/HZ)) % 100); + (cpu_data[i].udelay_val / (5000/HZ)) % 100, + i, (unsigned long) cpu_data[i].clock_tick); return len; } __initfunc(void smp_store_cpu_info(int id)) { - int i; + int i, no; cpu_data[id].irq_count = 0; cpu_data[id].bh_count = 0; @@ -93,6 +95,13 @@ smp_setup_percpu_timer() */ cpu_data[id].udelay_val = loops_per_jiffy; + + for (no = 0; no < linux_num_cpus; no++) + if (linux_cpus[no].mid == id) + break; + + cpu_data[id].clock_tick = prom_getintdefault(linux_cpus[no].prom_node, + "clock-frequency", 0); cpu_data[id].pgcache_size = 0; cpu_data[id].pte_cache[0] = NULL; cpu_data[id].pte_cache[1] = NULL; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc64/kernel/sparc64_ksyms.c linux.20p6/arch/sparc64/kernel/sparc64_ksyms.c --- linux.vanilla/arch/sparc64/kernel/sparc64_ksyms.c Sun Mar 25 17:37:30 2001 +++ linux.20p6/arch/sparc64/kernel/sparc64_ksyms.c Tue May 8 15:49:12 2001 @@ -1,4 +1,4 @@ -/* $Id: sparc64_ksyms.c,v 1.58.2.13 2001/01/03 22:05:54 anton Exp $ +/* $Id: sparc64_ksyms.c,v 1.58.2.14 2001/03/01 00:48:59 davem Exp $ * arch/sparc64/kernel/sparc64_ksyms.c: Sparc64 specific ksyms support. * * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/arch/sparc64/solaris/entry64.S linux.20p6/arch/sparc64/solaris/entry64.S --- linux.vanilla/arch/sparc64/solaris/entry64.S Sun Mar 25 17:31:53 2001 +++ linux.20p6/arch/sparc64/solaris/entry64.S Tue Jun 19 09:34:59 2001 @@ -1,4 +1,4 @@ -/* $Id: entry64.S,v 1.5 1998/03/26 08:46:15 jj Exp $ +/* $Id: entry64.S,v 1.5.2.1 2001/06/18 12:26:13 davem Exp $ * entry64.S: Solaris syscall emulation entry point. * * Copyright (C) 1996,1997,1998 Jakub Jelinek (jj@sunsite.mff.cuni.cz) @@ -83,7 +83,7 @@ 1: srl %i0, 0, %o0 lduw [%l7 + %l4], %l3 srl %i1, 0, %o1 - ldx [%g6 + AOFF_task_flags], %l5 + ldx [%g6 + AOFF_task_ptrace], %l5 cmp %l3, NR_SYSCALLS bleu,a,pn %xcc, linux_syscall_for_solaris sethi %hi(sys_call_table32), %l6 @@ -93,21 +93,21 @@ 10: srl %i2, 0, %o2 mov %i5, %o5 andn %l3, 3, %l7 - andcc %l5, 0x20, %g0 + andcc %l5, 0x02, %g0 bne,pn %icc, solaris_syscall_trace mov %i0, %l5 2: call %l7 srl %i3, 0, %o3 ret_from_solaris: stx %o0, [%sp + STACK_BIAS + REGWIN_SZ + PT_V9_I0] - ldx [%g6 + AOFF_task_flags], %l6 + ldx [%g6 + AOFF_task_ptrace], %l6 sra %o0, 0, %o0 mov %ulo(TSTATE_XCARRY | TSTATE_ICARRY), %g2 ldx [%sp + STACK_BIAS + REGWIN_SZ + PT_V9_TSTATE], %g3 cmp %o0, -ENOIOCTLCMD sllx %g2, 32, %g2 bgeu,pn %xcc, 1f - andcc %l6, 0x20, %l6 + andcc %l6, 0x02, %l6 /* System call success, clear Carry condition code. */ andn %g3, %g2, %g3 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/block/Config.in linux.20p6/drivers/block/Config.in --- linux.vanilla/drivers/block/Config.in Sun Mar 25 17:31:23 2001 +++ linux.20p6/drivers/block/Config.in Tue May 8 15:50:33 2001 @@ -140,7 +140,7 @@ tristate 'Compaq SMART2 support' CONFIG_BLK_CPQ_DA fi if [ "$CONFIG_PCI" = "y" ]; then - tristate 'Compaq CISS Array support' CONFIG_BLK_CPQ_CISS_DA + tristate 'Compaq Smart Array 5xxx support' CONFIG_BLK_CPQ_CISS_DA fi diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/block/cciss.c linux.20p6/drivers/block/cciss.c --- linux.vanilla/drivers/block/cciss.c Sun Mar 25 17:31:24 2001 +++ linux.20p6/drivers/block/cciss.c Tue Jun 19 09:59:54 2001 @@ -42,12 +42,12 @@ #include #define CCISS_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin)) -#define DRIVER_NAME "Compaq CISS Driver (v 1.0.0)" -#define DRIVER_VERSION CCISS_DRIVER_VERSION(1,0,0) +#define DRIVER_NAME "Compaq CISS Driver (v 1.0.4)" +#define DRIVER_VERSION CCISS_DRIVER_VERSION(1,0,4) /* Embedded module documentation macros - see modules.h */ MODULE_AUTHOR("Charles M. White III - Compaq Computer Corporation"); -MODULE_DESCRIPTION("Driver for Compaq Smart Array Controller 5300"); +MODULE_DESCRIPTION("Driver for Compaq Smart Array 5xxx Controllers "); #include "cciss_cmd.h" #include "cciss.h" @@ -61,6 +61,8 @@ */ static struct board_type products[] = { { 0x40700E11, "Smart Array 5300", &SA5_access }, + { 0x40800E11, "Smart Array 5i", &SA5B_access}, + { 0x40820E11, "Smart Array 532", &SA5B_access}, }; /* How long to wait (in millesconds) for board to go into simple mode */ @@ -135,10 +137,10 @@ ctlr = h->ctlr; size = sprintf(buffer, "%s: Compaq %s Controller\n" - " Board ID: %08lx\n" + " Board ID: 0x%08lx\n" " Firmware Version: %c%c%c%c\n" - " Memory Address: %08lx\n" - " IRQ: 0x%x\n" + " Memory Address: 0x%08lx\n" + " IRQ: %d\n" " Logical drives: %d\n" " Current Q depth: %d\n" " Current # commands on controller %d\n" @@ -416,6 +418,8 @@ put_user(read_ahead[MAJOR(inode->i_rdev)], (int*)arg); return 0; case BLKRRPART: + if(!capable(CAP_SYS_ADMIN)) + return -EPERM; return revalidate_logvol(inode->i_rdev, 1); case CCISS_GETPCIINFO: @@ -719,7 +723,7 @@ spin_lock_irqsave(&io_request_lock, flags); if (hba[ctlr]->drv[target].usage_count > maxusage) { spin_unlock_irqrestore(&io_request_lock, flags); - printk(KERN_WARNING "cpqarray: Device busy for " + printk(KERN_WARNING "cciss: Device busy for " "revalidation (usage=%d)\n", hba[ctlr]->drv[target].usage_count); return -EBUSY; @@ -730,7 +734,7 @@ max_p = gdev->max_p; start = target << gdev->minor_shift; - for(i=max_p; i>=0; i--) { + for(i=max_p-1; i>=0; i--) { int minor = start+i; kdev_t devi = MKDEV(MAJOR_NR + ctlr, minor); struct super_block *sb = get_super(devi); @@ -1125,7 +1129,7 @@ if (timeout) status = 0; if(cmd->err_info->CommandStatus != 0) - { /* an error has occured */ + { /* an error has occurred */ switch(cmd->err_info->CommandStatus) { case CMD_TARGET_STATUS: @@ -1369,7 +1373,7 @@ a &= ~3; if ((c = h->cmpQ) == NULL) { - printk(KERN_WARNING "cpqarray: Completion of %08lx ignored\n", (unsigned long)a1); + printk(KERN_WARNING "cciss: Completion of %08lx ignored\n", (unsigned long)a1); continue; } while(c->busaddr != a) { @@ -1437,7 +1441,7 @@ printk(" Heartbeat Counter = 0x%x\n\n\n", readl(&(tb->HeartBeat))); } -#endif /* CCISS_DEBUG */ +#endif /* CCISS_DEBUG */ static int cciss_pci_init(ctlr_info_t *c, unchar bus, unchar device_fn) { @@ -1447,7 +1451,9 @@ uint addr[6]; __u32 board_id; struct pci_dev *pdev; - + int cfg_offset; + int cfg_base_addr; + int cfg_base_addr_index; int i; pdev = pci_find_slot(bus, device_fn); @@ -1487,15 +1493,36 @@ * Memory base addr is first addr , the second points to the config * table */ - c->paddr = addr[0]; - c->vaddr = remap_pci_mem(c->paddr, 128); - c->cfgtable = (CfgTable_struct *) remap_pci_mem(addr[1], - sizeof(CfgTable_struct)); - c->board_id = board_id; + c->paddr = addr[0] & 0xfffffff0; /* remove the addressing mode bits */ +#ifdef CCISS_DEBUG + printk("address 0 = %x\n", c->paddr); +#endif /* CCISS_DEBUG */ + c->vaddr = remap_pci_mem(c->paddr, 200); + /* get the address index number */ + cfg_base_addr = readl(c->vaddr + SA5_CTCFG_OFFSET); + /* I am not prepared to deal with a 64 bit address value */ + cfg_base_addr &= 0xffff; #ifdef CCISS_DEBUG - print_cfg_table(c->cfgtable); + printk("cfg base address = %x\n", cfg_base_addr); +#endif /* CCISS_DEBUG */ + cfg_base_addr_index = (cfg_base_addr - PCI_BASE_ADDRESS_0)/4; +#ifdef CCISS_DEBUG + printk("cfg base address index = %x\n", cfg_base_addr_index); +#endif /* CCISS_DEBUG */ + + cfg_offset = readl(c->vaddr + SA5_CTMEM_OFFSET); +#ifdef CCISS_DEBUG + printk("cfg offset = %x\n", cfg_offset); #endif /* CCISS_DEBUG */ + c->cfgtable = (CfgTable_struct *) + remap_pci_mem((addr[cfg_base_addr_index] & 0xfffffff0) + + cfg_offset, sizeof(CfgTable_struct)); + c->board_id = board_id; + +#ifdef CCISS_DEBUG + print_cfg_table(c->cfgtable); +#endif CCISS_DEBUG for(i=0; iproduct_name = products[i].product_name; @@ -1509,6 +1536,14 @@ (unsigned long)board_id); return -1; } + if ( (readb(&c->cfgtable->Signature[0]) != 'C') || + (readb(&c->cfgtable->Signature[1]) != 'I') || + (readb(&c->cfgtable->Signature[2]) != 'S') || + (readb(&c->cfgtable->Signature[3]) != 'S') ) + { + printk("Does not appear to be a valid CISS config table\n"); + return -1; + } #ifdef CCISS_DEBUG printk("Trying to put board into Simple mode\n"); #endif /* CCISS_DEBUG */ @@ -1550,14 +1585,22 @@ int index; unchar bus=0, dev_fn=0; - + + #define CCISS_BOARD_TYPES 2 + static int cciss_device_id[CCISS_BOARD_TYPES] = { + PCI_DEVICE_ID_COMPAQ_CISS, PCI_DEVICE_ID_COMPAQ_CISSB}; + int brdtype; + + /* search for all PCI board types that could be for this driver */ + for(brdtype=0; brdtypevaddr + SA5_REPLY_INTR_MASK_OFFSET); + } else /* Turn them off */ + { + writel( SA5B_INTR_OFF, + h->vaddr + SA5_REPLY_INTR_MASK_OFFSET); + } +} +/* * Returns true if fifo is full. * */ @@ -183,6 +204,21 @@ return 0 ; } +/* + * Returns true if an interrupt is pending.. + */ +static unsigned long SA5B_intr_pending(ctlr_info_t *h) +{ + unsigned long register_value = + readl(h->vaddr + SA5_INTR_STATUS); +#ifdef CCISS_DEBUG + printk("cciss: intr_pending %lx\n", register_value); +#endif /* CCISS_DEBUG */ + if( register_value & SA5B_INTR_PENDING) + return 1; + return 0 ; +} + static struct access_method SA5_access = { SA5_submit_command, @@ -190,6 +226,14 @@ SA5_fifo_full, SA5_intr_pending, SA5_completed, +}; + +static struct access_method SA5B_access = { + SA5_submit_command, + SA5B_intr_mask, + SA5_fifo_full, + SA5B_intr_pending, + SA5_completed, }; struct board_type { diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/block/cciss_cmd.h linux.20p6/drivers/block/cciss_cmd.h --- linux.vanilla/drivers/block/cciss_cmd.h Sun Mar 25 17:31:24 2001 +++ linux.20p6/drivers/block/cciss_cmd.h Fri May 4 23:14:43 2001 @@ -125,20 +125,20 @@ //Command List Structure typedef union _SCSI3Addr_struct { struct { + BYTE Dev; BYTE Bus:6; BYTE Mode:2; // b00 - BYTE Dev; } PeripDev; struct { + BYTE DevLSB; BYTE DevMSB:6; BYTE Mode:2; // b01 - BYTE DevLSB; } LogDev; struct { - BYTE Targ:6; - BYTE Mode:2; // b10 BYTE Dev:5; BYTE Bus:3; + BYTE Targ:6; + BYTE Mode:2; // b10 } LogUnit; } SCSI3Addr_struct; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/block/cpqarray.c linux.20p6/drivers/block/cpqarray.c --- linux.vanilla/drivers/block/cpqarray.c Sun Mar 25 17:31:24 2001 +++ linux.20p6/drivers/block/cpqarray.c Tue Jun 19 09:49:28 2001 @@ -41,8 +41,8 @@ #define SMART2_DRIVER_VERSION(maj,min,submin) ((maj<<16)|(min<<8)|(submin)) -#define DRIVER_NAME "Compaq SMART2 Driver (v 1.0.11)" -#define DRIVER_VERSION SMART2_DRIVER_VERSION(1,0,11) +#define DRIVER_NAME "Compaq SMART2 Driver (v 1.0.12)" +#define DRIVER_VERSION SMART2_DRIVER_VERSION(1,0,12) /* Embedded module documentation macros - see modules.h */ /* Original author Chris Frantz - Compaq Computer Corporation */ @@ -1167,6 +1167,8 @@ put_user(read_ahead[MAJOR(inode->i_rdev)], (int*)arg); return 0; case BLKRRPART: + if(!capable(CAP_SYS_ADMIN)) + return -EPERM; return revalidate_logvol(inode->i_rdev, 1); case IDAPASSTHRU: if (!suser()) return -EPERM; @@ -1556,7 +1558,7 @@ max_p = gdev->max_p; start = target << gdev->minor_shift; - for(i=max_p; i>=0; i--) { + for(i=max_p-1; i>=0; i--) { int minor = start+i; kdev_t devi = MKDEV(MAJOR_NR + ctlr, minor); struct super_block *sb = get_super(devi); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/block/genhd.c linux.20p6/drivers/block/genhd.c --- linux.vanilla/drivers/block/genhd.c Sun Mar 25 17:37:30 2001 +++ linux.20p6/drivers/block/genhd.c Tue Jun 19 09:59:54 2001 @@ -336,7 +336,8 @@ goto done; /* nothing left to do */ hd->part[current_minor].nr_sects = NR_SECTS(p) * sector_size; /* JSt */ - hd->part[current_minor].start_sect = first_sector + START_SECT(p) * sector_size; + hd->part[current_minor].start_sect = + first_sector + START_SECT(p) * sector_size; this_sector = first_sector + START_SECT(p) * sector_size; dev = MKDEV(hd->major, current_minor); brelse(bh); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/block/ide-cd.c linux.20p6/drivers/block/ide-cd.c --- linux.vanilla/drivers/block/ide-cd.c Sun Mar 25 17:31:23 2001 +++ linux.20p6/drivers/block/ide-cd.c Tue Jun 19 09:59:54 2001 @@ -254,7 +254,7 @@ * They will disappear later when I get the time to * do it cleanly. * - Minimize the TOC reading - only do it when we - * know a media change has occured. + * know a media change has occurred. * - Moved all the CDROMREADx ioctls to the Uniform layer. * - Heiko Eissfeldt supplied * some fixes for CDI. diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/block/ide-dma.c linux.20p6/drivers/block/ide-dma.c --- linux.vanilla/drivers/block/ide-dma.c Sun Mar 25 17:31:24 2001 +++ linux.20p6/drivers/block/ide-dma.c Tue Jun 19 09:31:51 2001 @@ -217,6 +217,20 @@ xcount = bcount & 0xffff; if (is_trm290_chipset) xcount = ((xcount >> 2) - 1) << 16; + if (xcount == 0x0000) { + /* + * Most chipsets correctly interpret a length of 0x0000 as 64KB, + * but at least one (e.g. CS5530) misinterprets it as zero (!). + * So here we break the 64KB entry into two 32KB entries instead. + */ + if (count++ >= PRD_ENTRIES) { + printk("%s: DMA table too small\n", drive->name); + return 0; /* revert to PIO for this request */ + } + *table++ = cpu_to_le32(0x8000); + *table++ = cpu_to_le32(addr + 0x8000); + xcount = 0x8000; + } *table++ = cpu_to_le32(xcount); addr += bcount; size -= bcount; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/block/ide-floppy.c linux.20p6/drivers/block/ide-floppy.c --- linux.vanilla/drivers/block/ide-floppy.c Sun Mar 25 17:31:24 2001 +++ linux.20p6/drivers/block/ide-floppy.c Mon Jun 18 08:27:15 2001 @@ -125,7 +125,7 @@ byte *current_position; /* Pointer into the above buffer */ void (*callback) (ide_drive_t *); /* Called when this packet command is completed */ byte pc_buffer[IDEFLOPPY_PC_BUFFER_SIZE]; /* Temporary buffer */ - unsigned int flags; /* Status/Action bit flags */ + unsigned long flags; /* Status/Action bit flags */ } idefloppy_pc_t; /* @@ -259,7 +259,7 @@ idefloppy_flexible_disk_page_t flexible_disk_page; /* Copy of the flexible disk page */ int wp; /* Write protect */ - unsigned int flags; /* Status/Action flags */ + unsigned long flags; /* Status/Action flags */ } idefloppy_floppy_t; /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/block/ide-pmac.c linux.20p6/drivers/block/ide-pmac.c --- linux.vanilla/drivers/block/ide-pmac.c Sun Mar 25 17:37:30 2001 +++ linux.20p6/drivers/block/ide-pmac.c Tue Jun 19 09:59:54 2001 @@ -97,7 +97,7 @@ /* Wait 2s for disk to answer on IDE bus after * enable operation. * NOTE: There is at least one case I know of a disk that needs about 10sec - * before anwering on the bus. I beleive we could add a kernel command + * before anwering on the bus. I believe we could add a kernel command * line arg to override this delay for such cases. */ #define IDE_WAKEUP_DELAY_MS 2000 @@ -192,9 +192,10 @@ } #endif -/* Setup timings for the selected drive (master/slave). I still need to verify if this - * is enough, I beleive selectproc will be called whenever an IDE command is started, - * but... */ +/* Setup timings for the selected drive (master/slave). I still need to + * verify if this is enough, I believe selectproc will be called whenever + * an IDE command is started, but... + */ static void pmac_ide_selectproc(ide_drive_t *drive) { diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/block/ide.c linux.20p6/drivers/block/ide.c --- linux.vanilla/drivers/block/ide.c Sun Mar 25 17:31:24 2001 +++ linux.20p6/drivers/block/ide.c Tue Jun 19 09:59:54 2001 @@ -1298,9 +1298,10 @@ del_timer(&hwgroup->timer); if ((handler = hwgroup->handler) == NULL) { /* - * Either a marginal timeout occured (got the interrupt just as timer expired), - * or we were "sleeping" to give other devices a chance. Either way, we don't - * really want to complain about anything. + * Either a marginal timeout occurred (got the interrupt + * just as timer expired), or we were "sleeping" to give + * other devices a chance. Either way, we don't really + * want to complain about anything. */ if (hwgroup->sleeping) { hwgroup->sleeping = 0; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/cdrom/cdrom.c linux.20p6/drivers/cdrom/cdrom.c --- linux.vanilla/drivers/cdrom/cdrom.c Sun Mar 25 18:44:42 2001 +++ linux.20p6/drivers/cdrom/cdrom.c Tue Jun 19 09:59:54 2001 @@ -514,12 +514,12 @@ couldn't close the tray. We only care that there is no disc in the drive, since that is the _REAL_ problem here.*/ - ret=-ENOMEDIUM; + ret = -ENOMEDIUM; goto clean_up_and_return; } } else { cdinfo(CD_OPEN, "bummer. this drive can't close the tray.\n"); - ret=-ENOMEDIUM; + ret = -ENOMEDIUM; goto clean_up_and_return; } /* Ok, the door should be closed now.. Check again */ @@ -527,7 +527,7 @@ if ((ret == CDS_NO_DISC) || (ret==CDS_TRAY_OPEN)) { cdinfo(CD_OPEN, "bummer. the tray is still not closed.\n"); cdinfo(CD_OPEN, "tray might not contain a medium.\n"); - ret=-ENOMEDIUM; + ret = -ENOMEDIUM; goto clean_up_and_return; } cdinfo(CD_OPEN, "the tray is now closed.\n"); @@ -540,7 +540,7 @@ cdrom_count_tracks(cdi, &tracks); if (tracks.error == CDS_NO_DISC) { cdinfo(CD_OPEN, "bummer. no disc.\n"); - ret=-ENOMEDIUM; + ret = -ENOMEDIUM; goto clean_up_and_return; } /* CD-Players which don't use O_NONBLOCK, workman @@ -1952,6 +1952,7 @@ ra.buf += (CD_FRAMESIZE_RAW * frames); ra.nframes -= frames; lba += frames; + if (frames>ra.nframes) frames=ra.nframes; } kfree(cgc.buffer); return ret; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/Config.in linux.20p6/drivers/char/Config.in --- linux.vanilla/drivers/char/Config.in Sun Mar 25 17:37:30 2001 +++ linux.20p6/drivers/char/Config.in Tue Jun 19 09:39:08 2001 @@ -53,8 +53,8 @@ tristate ' Stallion EasyIO or EC8/32 support' CONFIG_STALLION tristate ' Stallion EC8/64, ONboard, Brumby support' CONFIG_ISTALLION fi - dep_tristate 'Microgate SyncLink card support' CONFIG_SYNCLINK m - dep_tristate 'HDLC line discipline support' CONFIG_N_HDLC m + tristate 'Microgate SyncLink card support' CONFIG_SYNCLINK + tristate 'HDLC line discipline support' CONFIG_N_HDLC fi bool 'Unix98 PTY support' CONFIG_UNIX98_PTYS if [ "$CONFIG_UNIX98_PTYS" = "y" ]; then @@ -114,6 +114,7 @@ fi fi tristate ' WDT PCI Watchdog timer' CONFIG_WDTPCI + tristate ' ZF MachZ Watchdog' CONFIG_MACHZ_WDT endmenu fi diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/Makefile linux.20p6/drivers/char/Makefile --- linux.vanilla/drivers/char/Makefile Sun Mar 25 17:37:30 2001 +++ linux.20p6/drivers/char/Makefile Tue Jun 19 09:39:08 2001 @@ -184,12 +184,20 @@ endif endif -ifeq ($(CONFIG_SYNCLINK),m) +ifeq ($(CONFIG_SYNCLINK),y) +O_OBJS += synclink.o +else + ifeq ($(CONFIG_SYNCLINK),m) M_OBJS += synclink.o + endif endif -ifeq ($(CONFIG_N_HDLC),m) +ifeq ($(CONFIG_N_HDLC),y) +O_OBJS += n_hdlc.o +else + ifeq ($(CONFIG_N_HDLC),m) M_OBJS += n_hdlc.o + endif endif ifeq ($(CONFIG_SPECIALIX),y) @@ -370,6 +378,14 @@ else ifeq ($(CONFIG_WDTPCI),m) M_OBJS += wdt_pci.o + endif +endif + +ifeq ($(CONFIG_MACHZ_WDT),y) +O_OBJS += machzwd.o +else + ifeq ($(CONFIG_MACHZ_WDT),m) + M_OBJS += machzwd.o endif endif diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/agp/agpgart_fe.c linux.20p6/drivers/char/agp/agpgart_fe.c --- linux.vanilla/drivers/char/agp/agpgart_fe.c Sun Mar 25 17:31:28 2001 +++ linux.20p6/drivers/char/agp/agpgart_fe.c Fri May 4 23:52:03 2001 @@ -867,7 +867,7 @@ return -ENOMEM; } if (copy_from_user(segment, (void *) reserve.seg_list, - GFP_KERNEL)) { + sizeof(agp_segment) * reserve.seg_count)) { kfree(segment); return -EFAULT; } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/atari_SCC.README linux.20p6/drivers/char/atari_SCC.README --- linux.vanilla/drivers/char/atari_SCC.README Sun Mar 25 17:31:28 2001 +++ linux.20p6/drivers/char/atari_SCC.README Tue Jun 19 09:59:54 2001 @@ -96,7 +96,7 @@ If you should see a message like: -Sep 26 10:39:32 zaphod kernel: SCC-A: DMA-INT occured, data lost! +Sep 26 10:39:32 zaphod kernel: SCC-A: DMA-INT occurred, data lost! that means that the timer routine itself has been delayed so long that the DMA counter went to zero already. There's not very much to do about this, because diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/atari_SCC.c linux.20p6/drivers/char/atari_SCC.c --- linux.vanilla/drivers/char/atari_SCC.c Sun Mar 25 17:31:28 2001 +++ linux.20p6/drivers/char/atari_SCC.c Tue Jun 19 09:59:54 2001 @@ -1453,11 +1453,11 @@ } -/* DMA finished before timer occured? +/* DMA finished before timer occurred? */ static void SCC_dma_int (int irq, void *data, struct pt_regs *fp) { - printk ("SCC-A: DMA-INT occured, data lost!\n"); + printk ("SCC-A: DMA-INT occurred, data lost!\n"); #if 0 /* is there any reason why we should call this? if the timer INT was * delayed so long that this happened then this INT was delayed too, so diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/cyclades.c linux.20p6/drivers/char/cyclades.c --- linux.vanilla/drivers/char/cyclades.c Sun Mar 25 17:31:25 2001 +++ linux.20p6/drivers/char/cyclades.c Tue Jun 19 09:59:54 2001 @@ -149,7 +149,7 @@ * Revision 2.2.1.4 1998/08/04 11:02:50 ivan * /proc/cyclades implementation with great collaboration of * Marc Lewis ; - * cyy_interrupt was changed to avoid occurence of kernel oopses + * cyy_interrupt was changed to avoid occurrence of kernel oopses * during PPP operation. * * Revision 2.2.1.3 1998/06/01 12:09:10 ivan diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/epca.c linux.20p6/drivers/char/epca.c --- linux.vanilla/drivers/char/epca.c Sun Mar 25 17:31:26 2001 +++ linux.20p6/drivers/char/epca.c Tue Jun 19 09:59:54 2001 @@ -953,7 +953,7 @@ Remember copy_from_user WILL generate a page fault if the user memory being accessed has been swapped out. This can cause this routine to temporarily sleep while this page - fault is occuring. + fault is occurring. ----------------------------------------------------------------- */ @@ -3601,7 +3601,7 @@ /* ------------------------------------------------------------------ The below routines pc_throttle and pc_unthrottle are used to slow (And resume) the receipt of data into the kernels - receive buffers. The exact occurence of this depends on the + receive buffers. The exact occurrence of this depends on the size of the kernels receive buffer and what the 'watermarks' are set to for that buffer. See the n_ttys.c file for more details. diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/hfmodem/refclock.c linux.20p6/drivers/char/hfmodem/refclock.c --- linux.vanilla/drivers/char/hfmodem/refclock.c Sun Mar 25 17:31:26 2001 +++ linux.20p6/drivers/char/hfmodem/refclock.c Tue Jun 19 09:56:01 2001 @@ -133,7 +133,7 @@ "subl %2,%%eax\n\t" "sbbl %3,%%edx\n\t" : "=&a" (tmp0), "=&d" (tmp1) : "m" (dev->clk.starttime_lo), "m" (dev->clk.starttime_hi)); - __asm__("mull %2" : "=d" (tmp2), "=a" (tmp4) : "m" (scale_rdtsc), "1" (tmp0) : "ax"); + __asm__("mull %2" : "=d" (tmp2), "=a" (tmp4) : "m" (scale_rdtsc), "1" (tmp0)); __asm__("mull %1" : "=a" (tmp3) : "m" (scale_rdtsc), "a" (tmp1) : "dx"); curtime = tmp2 + tmp3; goto time_known; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/hfmodem/tables.h linux.20p6/drivers/char/hfmodem/tables.h --- linux.vanilla/drivers/char/hfmodem/tables.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/char/hfmodem/tables.h Fri May 4 22:58:36 2001 @@ -0,0 +1,90 @@ +/* + * This file is automatically generated by ./gentbl, DO NOT EDIT! +*/ + +#define SINTABBITS 9 +#define SINTABSIZE (1< + Copyright 2000,2001 Jeff Garzik + Copyright 2000,2001 Philipp Rumpf - Driver Web site: http://gtf.org/garzik/drivers/i810_rng/ + Driver Web site: http://sourceforge.net/projects/gkernel/ - - - Based on: - Intel 82802AB/82802AC Firmware Hub (FWH) Datasheet - May 1999 Order Number: 290658-002 R - - Intel 82802 Firmware Hub: Random Number Generator - Programmer's Reference Manual - December 1999 Order Number: 298029-001 R - - Intel 82802 Firmware HUB Random Number Generator Driver - Copyright (c) 2000 Matt Sottek - - Special thanks to Matt Sottek. I did the "guts", he - did the "brains" and all the testing. (Anybody wanna send - me an i810 or i820?) + Please read Documentation/i810_rng.txt for details on use. ---------------------------------------------------------- This software may be used and distributed according to the terms - of the GNU Public License, incorporated herein by reference. - - ---------------------------------------------------------- - - From the firmware hub datasheet: - - The Firmware Hub integrates a Random Number Generator (RNG) - using thermal noise generated from inherently random quantum - mechanical properties of silicon. When not generating new random - bits the RNG circuitry will enter a low power state. Intel will - provide a binary software driver to give third party software - access to our RNG for use as a security feature. At this time, - the RNG is only to be used with a system in an OS-present state. - - ---------------------------------------------------------- - - Theory of operation: - - Character driver. Using the standard open() - and read() system calls, you can read random data from - the i810 RNG device. This data is NOT CHECKED by any - fitness tests, and could potentially be bogus (if the - hardware is faulty or has been tampered with). - - /dev/intel_rng is char device major 10, minor 183. - - - ---------------------------------------------------------- - - Driver notes: - - * In order to unload the i810_rng module, you must first - make sure all users of the character device have closed - - * FIXME: Currently only one open() of the character device is allowed. - If another user tries to open() the device, they will get an - -EBUSY error. Instead, this really should either support - multiple simultaneous users of the character device (not hard), - or simply block open() until the current user of the chrdev - calls close(). - - * FIXME: support poll() - - * FIXME: should we be crazy and support mmap()? - - ---------------------------------------------------------- + of the GNU General Public License, incorporated herein by reference. */ @@ -80,20 +21,19 @@ #include #include #include -#include #include -#include #include #include #include #include +#include /* * core module and version information */ -#define RNG_VERSION "0.6.2-2.2.x" +#define RNG_VERSION "0.9.6-2.2" #define RNG_MODULE_NAME "i810_rng" #define RNG_DRIVER_NAME RNG_MODULE_NAME " hardware driver " RNG_VERSION #define PFX RNG_MODULE_NAME ": " @@ -102,7 +42,7 @@ /* * debugging macros */ -#undef RNG_DEBUG /* define to 1 to enable copious debugging info */ +#undef RNG_DEBUG /* define to enable copious debugging info */ #ifdef RNG_DEBUG /* note: prints function name for you */ @@ -111,8 +51,8 @@ #define DPRINTK(fmt, args...) #endif -#define RNG_NDEBUG 0 /* define to 1 to disable lightweight runtime checks */ -#if RNG_NDEBUG +#undef RNG_NDEBUG /* define to disable lightweight runtime checks */ +#ifdef RNG_NDEBUG #define assert(expr) #else #define assert(expr) \ @@ -124,12 +64,6 @@ /* - * misc helper macros - */ -#define arraysize(x) (sizeof(x)/sizeof(*(x))) - - -/* * RNG registers (offsets from rng_mem) */ #define RNG_HW_STATUS 0 @@ -139,22 +73,21 @@ #define RNG_DATA_PRESENT 0x01 #define RNG_DATA 2 +/* + * Magic address at which Intel PCI bridges locate the RNG + */ #define RNG_ADDR 0xFFBC015F #define RNG_ADDR_LEN 3 #define RNG_MISCDEV_MINOR 183 /* official */ - /* * various RNG status variables. they are globals * as we only support a single RNG device */ -static int rng_allocated; /* is someone using the RNG region? */ -static int rng_hw_enabled; /* is the RNG h/w enabled? */ -static int rng_use_count; /* number of times RNG has been enabled */ static void *rng_mem; /* token to our ioremap'd RNG register area */ -static spinlock_t rng_lock = SPIN_LOCK_UNLOCKED; /* hardware lock */ -static int rng_open; /* boolean, 0 (false) if chrdev is closed, 1 (true) if open */ +static struct semaphore rng_open_sem; /* Semaphore for serializing rng_open/release */ + /* * inlined helper functions for accessing RNG registers @@ -165,18 +98,17 @@ return readb (rng_mem + RNG_HW_STATUS); } - -static inline void rng_hwstatus_set (u8 hw_status) +static inline u8 rng_hwstatus_set (u8 hw_status) { assert (rng_mem != NULL); writeb (hw_status, rng_mem + RNG_HW_STATUS); + return rng_hwstatus (); } static inline int rng_data_present (void) { assert (rng_mem != NULL); - assert (rng_hw_enabled == 1); return (readb (rng_mem + RNG_STATUS) & RNG_DATA_PRESENT) ? 1 : 0; } @@ -185,176 +117,157 @@ static inline int rng_data_read (void) { assert (rng_mem != NULL); - assert (rng_hw_enabled == 1); return readb (rng_mem + RNG_DATA); } - /* - * rng_enable - enable or disable the RNG hardware + * rng_enable - enable the RNG hardware */ -static int rng_enable (int enable) + +static int rng_enable (void) { int rc = 0; - u8 hw_status; + u8 hw_status, new_status; DPRINTK ("ENTER\n"); - spin_lock (&rng_lock); - hw_status = rng_hwstatus (); - if (enable) { - rng_hw_enabled = 1; - rng_use_count++; - MOD_INC_USE_COUNT; - } else { - rng_use_count--; - if (rng_use_count == 0) - rng_hw_enabled = 0; - MOD_DEC_USE_COUNT; - } + if ((hw_status & RNG_ENABLED) == 0) { + new_status = rng_hwstatus_set (hw_status | RNG_ENABLED); - if (rng_hw_enabled && ((hw_status & RNG_ENABLED) == 0)) { - rng_hwstatus_set (hw_status | RNG_ENABLED); - printk (KERN_INFO PFX "RNG h/w enabled\n"); + if (new_status & RNG_ENABLED) + printk (KERN_INFO PFX "RNG h/w enabled\n"); + else { + printk (KERN_ERR PFX "Unable to enable the RNG\n"); + rc = -EIO; + } } - else if (!rng_hw_enabled && (hw_status & RNG_ENABLED)) { - rng_hwstatus_set (hw_status & ~RNG_ENABLED); - printk (KERN_INFO PFX "RNG h/w disabled\n"); - } + DPRINTK ("EXIT, returning %d\n", rc); + return rc; +} + +/* + * rng_disable - disable the RNG hardware + */ - spin_unlock (&rng_lock); +static void rng_disable(void) +{ + u8 hw_status, new_status; + + DPRINTK ("ENTER\n"); + + hw_status = rng_hwstatus (); - if ((!!enable) != (!!(rng_hwstatus () & RNG_ENABLED))) { - printk (KERN_ERR PFX "Unable to %sable the RNG\n", - enable ? "en" : "dis"); - rc = -EIO; + if (hw_status & RNG_ENABLED) { + new_status = rng_hwstatus_set (hw_status & ~RNG_ENABLED); + + if ((new_status & RNG_ENABLED) == 0) + printk (KERN_INFO PFX "RNG h/w disabled\n"); + else { + printk (KERN_ERR PFX "Unable to disable the RNG\n"); + } } - DPRINTK ("EXIT, returning %d\n", rc); - return rc; + DPRINTK ("EXIT\n"); } - static int rng_dev_open (struct inode *inode, struct file *filp) { - int rc = -EINVAL; - - MOD_INC_USE_COUNT; + int rc; if ((filp->f_mode & FMODE_READ) == 0) - goto err_out; + return -EINVAL; if (filp->f_mode & FMODE_WRITE) - goto err_out; - - spin_lock (&rng_lock); + return -EINVAL; - /* only allow one open of this device, exit with -EBUSY if already open */ - /* FIXME: we should sleep on a semaphore here, unless O_NONBLOCK */ - if (rng_open) { - spin_unlock (&rng_lock); - rc = -EBUSY; - goto err_out; + /* wait for device to become free */ + if (filp->f_flags & O_NONBLOCK) { + if (down_trylock (&rng_open_sem)) + return -EAGAIN; + } else { + if (down_interruptible (&rng_open_sem)) + return -ERESTARTSYS; } - rng_open = 1; - - spin_unlock (&rng_lock); - - if (rng_enable(1) != 0) { - spin_lock (&rng_lock); - rng_open = 0; - spin_unlock (&rng_lock); - rc = -EIO; - goto err_out; + rc = rng_enable (); + if (rc) { + up (&rng_open_sem); + return rc; } + MOD_INC_USE_COUNT; return 0; - -err_out: - MOD_DEC_USE_COUNT; - return rc; } static int rng_dev_release (struct inode *inode, struct file *filp) { - - if (rng_enable(0) != 0) - return -EIO; - - spin_lock (&rng_lock); - rng_open = 0; - spin_unlock (&rng_lock); - + rng_disable (); + up (&rng_open_sem); MOD_DEC_USE_COUNT; return 0; } -static ssize_t rng_dev_read (struct file *filp, char * buf, size_t size, - loff_t *offp) +static ssize_t rng_dev_read (struct file *filp, char *buf, size_t size, + loff_t * offp) { - int have_data, copied = 0; - u8 data=0; - u8 *page; - - if (size < 1) - return 0; - - page = (unsigned char *) get_free_page (GFP_KERNEL); - if (!page) - return -ENOMEM; - -read_loop: - /* using the fact that read() can return >0 but - * less than the requested amount, we simply - * read up to PAGE_SIZE or buffer size, whichever - * is smaller, and return that data. - */ - if ((copied == size) || (copied == PAGE_SIZE)) { - size_t tmpsize = (copied == size) ? size : PAGE_SIZE; - int rc = copy_to_user (buf, page, tmpsize); - free_page ((long)page); - if (rc) return rc; - return tmpsize; - } + static spinlock_t rng_lock = SPIN_LOCK_UNLOCKED; + int have_data; + u8 data = 0; + ssize_t ret = 0; - spin_lock (&rng_lock); + while (size) { + spin_lock (&rng_lock); - have_data = 0; - if (rng_data_present ()) { - data = rng_data_read (); - have_data = 1; - } + have_data = 0; + if (rng_data_present ()) { + data = rng_data_read (); + have_data = 1; + } - spin_unlock (&rng_lock); + spin_unlock (&rng_lock); - if (have_data) { - page[copied] = data; - copied++; - } else { - if (filp->f_flags & O_NONBLOCK) { - free_page ((long)page); - return -EAGAIN; + if (have_data) { + if (put_user (data, buf++)) { + ret = ret ? : -EFAULT; + break; + } + size--; + ret++; } - } - if (current->need_resched) - schedule (); + if (filp->f_flags & O_NONBLOCK) + return ret ? : -EAGAIN; + + current->state = TASK_INTERRUPTIBLE; + schedule_timeout(1); - if (signal_pending (current)) { - free_page ((long)page); - return -ERESTARTSYS; + if (signal_pending (current)) + return ret ? : -ERESTARTSYS; } - goto read_loop; + return ret; } +static struct file_operations rng_chrdev_ops = { + open: rng_dev_open, + release: rng_dev_release, + read: rng_dev_read, +}; + + +static struct miscdevice rng_miscdev = { + RNG_MISCDEV_MINOR, + RNG_MODULE_NAME, + &rng_chrdev_ops, +}; + + /* * rng_init_one - look for and attempt to init a single RNG */ @@ -365,10 +278,11 @@ DPRINTK ("ENTER\n"); - if (rng_allocated) { - printk (KERN_ERR PFX "this driver only supports one RNG\n"); - DPRINTK ("EXIT, returning -EBUSY\n"); - return -EBUSY; + rc = misc_register (&rng_miscdev); + if (rc) { + printk (KERN_ERR PFX "cannot register misc device\n"); + DPRINTK ("EXIT, returning %d\n", rc); + goto err_out; } rng_mem = ioremap (RNG_ADDR, RNG_ADDR_LEN); @@ -376,7 +290,7 @@ printk (KERN_ERR PFX "cannot ioremap RNG Memory\n"); DPRINTK ("EXIT, returning -EBUSY\n"); rc = -EBUSY; - goto err_out; + goto err_out_free_miscdev; } /* Check for Intel 82802 */ @@ -385,80 +299,59 @@ printk (KERN_ERR PFX "RNG not detected\n"); DPRINTK ("EXIT, returning -ENODEV\n"); rc = -ENODEV; - goto err_out; + goto err_out_free_map; } - rng_allocated = 1; - - rc = rng_enable (0); - if (rc) { + /* turn RNG h/w off, if it's on */ + if (hw_status & RNG_ENABLED) + hw_status = rng_hwstatus_set (hw_status & ~RNG_ENABLED); + if (hw_status & RNG_ENABLED) { printk (KERN_ERR PFX "cannot disable RNG, aborting\n"); - goto err_out; + goto err_out_free_map; } DPRINTK ("EXIT, returning 0\n"); return 0; +err_out_free_map: + iounmap (rng_mem); +err_out_free_miscdev: + misc_deregister (&rng_miscdev); err_out: - if (rng_mem) - iounmap (rng_mem); return rc; } -/* - * Data for PCI driver interface - */ - -MODULE_AUTHOR("Jeff Garzik, Matt Sottek"); +MODULE_AUTHOR("Jeff Garzik, Philipp Rumpf, Matt Sottek"); MODULE_DESCRIPTION("Intel i8xx chipset Random Number Generator (RNG) driver"); -static struct file_operations rng_chrdev_ops = { - open: rng_dev_open, - release: rng_dev_release, - read: rng_dev_read, -}; - - -static struct miscdevice rng_miscdev = { - RNG_MISCDEV_MINOR, - RNG_MODULE_NAME, - &rng_chrdev_ops, -}; - - /* * rng_init - initialize RNG module */ -int __init rng_init (void) +static int __init rng_init (void) { int rc; struct pci_dev *pdev; - - pdev = pci_find_device (0x8086, 0x2418, NULL); - if (!pdev) - pdev = pci_find_device (0x8086, 0x2428, NULL); - if (!pdev) - pdev = pci_find_device (0x8086, 0x1130, NULL); - if (!pdev) - return -ENODEV; DPRINTK ("ENTER\n"); - rc = rng_init_one(pdev); - if (rc) { - DPRINTK ("EXIT, returning -ENODEV\n"); - return rc; - } + init_MUTEX (&rng_open_sem); - rc = misc_register (&rng_miscdev); - if (rc) { - if (rng_mem) - iounmap (rng_mem); - DPRINTK ("EXIT, returning %d\n", rc); + pdev = pci_find_device (0x8086, 0x2418, NULL); + if (pdev) goto match; + pdev = pci_find_device (0x8086, 0x2428, NULL); + if (pdev) goto match; + pdev = pci_find_device (0x8086, 0x1130, NULL); + if (pdev) goto match; + + DPRINTK ("EXIT, returning -ENODEV\n"); + return -ENODEV; + +match: + rc = rng_init_one (pdev); + if (rc) return rc; - } printk (KERN_INFO RNG_DRIVER_NAME " loaded\n"); @@ -466,24 +359,21 @@ return 0; } -#ifdef MODULE - -int init_module (void) { return rng_init (); } /* * rng_init - shutdown RNG module */ -void cleanup_module (void) +static void rng_cleanup (void) { DPRINTK ("ENTER\n"); - - iounmap (rng_mem); - - rng_hwstatus_set (rng_hwstatus() & ~RNG_ENABLED); misc_deregister (&rng_miscdev); + iounmap (rng_mem); + DPRINTK ("EXIT\n"); } -#endif /* MODULE */ + +module_init (rng_init); +module_exit (rng_cleanup); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/lp.c linux.20p6/drivers/char/lp.c --- linux.vanilla/drivers/char/lp.c Sun Mar 25 17:37:31 2001 +++ linux.20p6/drivers/char/lp.c Tue Jun 19 09:59:54 2001 @@ -306,7 +306,7 @@ } /* * NOTE: if you run with irqs you _must_ use - * `tunelp /dev/lp? -c 1' to be rasonable efficient! + * `tunelp /dev/lp? -c 1' to be reasonably efficient! * * ..but beware that data corruption can happen that way. -Tim */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/machzwd.c linux.20p6/drivers/char/machzwd.c --- linux.vanilla/drivers/char/machzwd.c Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/char/machzwd.c Fri May 4 23:36:56 2001 @@ -0,0 +1,545 @@ +/* + * MachZ ZF-Logic Watchdog Timer driver for 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. + * + * The author does NOT admit liability nor provide warranty for + * any of this software. This material is provided "AS-IS" in + * the hope that it may be useful for others. + * + * Author: Fernando Fuganti + * + * Based on sbc60xxwdt.c by Jakob Oestergaard + * + * + * We have two timers (wd#1, wd#2) driven by a 32 KHz clock with the + * following periods: + * wd#1 - 2 seconds; + * wd#2 - 7.2 ms; + * After the expiration of wd#1, it can generate a NMI, SCI, SMI, or + * a system RESET and it starts wd#2 that unconditionaly will RESET + * the system when the counter reaches zero. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* ports */ +#define ZF_IOBASE 0x218 +#define INDEX 0x218 +#define DATA_B 0x219 +#define DATA_W 0x21A +#define DATA_D 0x21A + +/* indexes */ /* size */ +#define ZFL_VERSION 0x02 /* 16 */ +#define CONTROL 0x10 /* 16 */ +#define STATUS 0x12 /* 8 */ +#define COUNTER_1 0x0C /* 16 */ +#define COUNTER_2 0x0E /* 8 */ +#define PULSE_LEN 0x0F /* 8 */ + +/* controls */ +#define ENABLE_WD1 0x0001 +#define ENABLE_WD2 0x0002 +#define RESET_WD1 0x0010 +#define RESET_WD2 0x0020 +#define GEN_SCI 0x0100 +#define GEN_NMI 0x0200 +#define GEN_SMI 0x0400 +#define GEN_RESET 0x0800 + + +/* utilities */ + +#define WD1 0 +#define WD2 1 + +#define zf_writew(port, data) { outb(port, INDEX); outw(data, DATA_W); } +#define zf_writeb(port, data) { outb(port, INDEX); outb(data, DATA_B); } +#define zf_get_ZFL_version() zf_readw(ZFL_VERSION) + + +static unsigned short zf_readw(unsigned char port) +{ + outb(port, INDEX); + return inw(DATA_W); +} + +static unsigned short zf_readb(unsigned char port) +{ + outb(port, INDEX); + return inb(DATA_B); +} + + +MODULE_AUTHOR("Fernando Fuganti "); +MODULE_DESCRIPTION("MachZ ZF-Logic Watchdog driver"); +MODULE_PARM(action, "i"); +MODULE_PARM_DESC(action, "after watchdog resets, generate: 0 = RESET(*) 1 = SMI 2 = NMI 3 = SCI"); + +#define PFX "machzwd" + +static struct watchdog_info zf_info = { + options: WDIOF_KEEPALIVEPING, + firmware_version: 1, + identity: "ZF-Logic watchdog" +}; + + +/* + * action refers to action taken when watchdog resets + * 0 = GEN_RESET + * 1 = GEN_SMI + * 2 = GEN_NMI + * 3 = GEN_SCI + * defaults to GEN_RESET (0) + */ +static int action = 0; +static int zf_action = GEN_RESET; +static int zf_is_open = 0; +static int zf_expect_close = 0; +static spinlock_t zf_lock; +static struct timer_list zf_timer; +static unsigned long next_heartbeat = 0; + + +/* timeout for user land heart beat (10 seconds) */ +#define ZF_USER_TIMEO (HZ*10) + +/* timeout for hardware watchdog (~500ms) */ +#define ZF_HW_TIMEO (HZ/2) + +/* number of ticks on WD#1 (driven by a 32KHz clock, 2s) */ +#define ZF_CTIMEOUT 0xffff + +#ifndef ZF_DEBUG +# define dprintk(format, args...) +#else +# define dprintk(format, args...) printk(KERN_DEBUG PFX ":" __FUNCTION__ ":%d: " format, __LINE__ , ## args) +#endif + + +/* STATUS register functions */ + +static inline unsigned char zf_get_status(void) +{ + return zf_readb(STATUS); +} + +static inline void zf_set_status(unsigned char new) +{ + zf_writeb(STATUS, new); +} + + +/* CONTROL register functions */ + +static inline unsigned short zf_get_control(void) +{ + return zf_readw(CONTROL); +} + +static inline void zf_set_control(unsigned short new) +{ + zf_writew(CONTROL, new); +} + + +/* WD#? counter functions */ +/* + * Just get current counter value + */ + +inline unsigned short zf_get_timer(unsigned char n) +{ + switch(n){ + case WD1: + return zf_readw(COUNTER_1); + case WD2: + return zf_readb(COUNTER_2); + default: + return 0; + } +} + +/* + * Just set counter value + */ + +static inline void zf_set_timer(unsigned short new, unsigned char n) +{ + switch(n){ + case WD1: + zf_writew(COUNTER_1, new); + case WD2: + zf_writeb(COUNTER_2, new > 0xff ? 0xff : new); + default: + return; + } +} + +/* + * stop hardware timer + */ +static void zf_timer_off(void) +{ + unsigned int ctrl_reg = 0; + + /* stop internal ping */ + del_timer(&zf_timer); + + /* stop watchdog timer */ + ctrl_reg = zf_get_control(); + ctrl_reg |= (ENABLE_WD1|ENABLE_WD2); /* disable wd1 and wd2 */ + ctrl_reg &= ~(ENABLE_WD1|ENABLE_WD2); + zf_set_control(ctrl_reg); + + printk(PFX ": Watchdog timer is now disabled\n"); +} + + +/* + * start hardware timer + */ +static void zf_timer_on(void) +{ + unsigned int ctrl_reg = 0; + + zf_writeb(PULSE_LEN, 0xff); + + zf_set_timer(ZF_CTIMEOUT, WD1); + + /* user land ping */ + next_heartbeat = jiffies + ZF_USER_TIMEO; + + /* start the timer for internal ping */ + zf_timer.expires = jiffies + ZF_HW_TIMEO; + + add_timer(&zf_timer); + + /* start watchdog timer */ + ctrl_reg = zf_get_control(); + ctrl_reg |= (ENABLE_WD1|zf_action); + zf_set_control(ctrl_reg); + + printk(PFX ": Watchdog timer is now enabled\n"); +} + + +static void zf_ping(unsigned long data) +{ + unsigned int ctrl_reg = 0; + + zf_writeb(COUNTER_2, 0xff); + + if(time_before(jiffies, next_heartbeat)){ + + dprintk("time_before: %ld\n", next_heartbeat - jiffies); + + /* + * reset event is activated by transition from 0 to 1 on + * RESET_WD1 bit and we assume that it is already zero... + */ + ctrl_reg = zf_get_control(); + ctrl_reg |= RESET_WD1; + zf_set_control(ctrl_reg); + + /* ...and nothing changes until here */ + ctrl_reg &= ~(RESET_WD1); + zf_set_control(ctrl_reg); + + zf_timer.expires = jiffies + ZF_HW_TIMEO; + add_timer(&zf_timer); + }else{ + printk(PFX ": I will reset your machine\n"); + } +} + +static ssize_t zf_write(struct file *file, const char *buf, size_t count, + loff_t *ppos) +{ + /* Can't seek (pwrite) on this device */ + if (ppos != &file->f_pos) + return -ESPIPE; + + /* See if we got the magic character */ + if(count){ + +/* + * no need to check for close confirmation + * no way to disable watchdog ;) + */ +#ifndef CONFIG_WATCHDOG_NOWAYOUT + size_t ofs; + + /* + * note: just in case someone wrote the magic character + * five months ago... + */ + zf_expect_close = 0; + + /* now scan */ + for(ofs = 0; ofs != count; ofs++){ + if(buf[ofs] == 'V'){ + zf_expect_close = 1; + dprintk("zf_expect_close 1\n"); + } + } +#endif + /* + * Well, anyhow someone wrote to us, + * we should return that favour + */ + next_heartbeat = jiffies + ZF_USER_TIMEO; + dprintk("user ping at %ld\n", jiffies); + + return 1; + } + + return 0; +} + +static ssize_t zf_read(struct file *file, char *buf, size_t count, + loff_t *ppos) +{ + return -EINVAL; +} + + + +static int zf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, + unsigned long arg) +{ + int ret; + + switch(cmd){ + case WDIOC_GETSUPPORT: + ret = copy_to_user((struct watchdog_info *)arg, + &zf_info, sizeof(zf_info)); + if(ret) + return -EFAULT; + break; + + case WDIOC_GETSTATUS: + ret = copy_to_user((int *)arg, &zf_is_open, + sizeof(int)); + if(ret) + return -EFAULT; + break; + + case WDIOC_KEEPALIVE: + zf_ping(0); + break; + + default: + return -ENOIOCTLCMD; + } + + return 0; +} + +static int zf_open(struct inode *inode, struct file *file) +{ + switch(MINOR(inode->i_rdev)){ + case WATCHDOG_MINOR: + spin_lock(&zf_lock); + if(zf_is_open){ + spin_unlock(&zf_lock); + return -EBUSY; + } + +#ifdef CONFIG_WATCHDOG_NOWAYOUT + MOD_INC_USE_COUNT; +#endif + zf_is_open = 1; + + spin_unlock(&zf_lock); + + zf_timer_on(); + + return 0; + default: + return -ENODEV; + } +} + +static int zf_close(struct inode *inode, struct file *file) +{ + if(MINOR(inode->i_rdev) == WATCHDOG_MINOR){ + + if(zf_expect_close){ + zf_timer_off(); + } else { + del_timer(&zf_timer); + printk(PFX ": device file closed unexpectedly. Will not stop the WDT!\n"); + } + + spin_lock(&zf_lock); + zf_is_open = 0; + spin_unlock(&zf_lock); + + zf_expect_close = 0; + } + + return 0; +} + +/* + * Notifier for system down + */ + +static int zf_notify_sys(struct notifier_block *this, unsigned long code, + void *unused) +{ + if(code == SYS_DOWN || code == SYS_HALT){ + zf_timer_off(); + } + + return NOTIFY_DONE; +} + + + + +static struct file_operations zf_fops = { +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,34) + owner: THIS_MODULE, +#endif + read: zf_read, + write: zf_write, + ioctl: zf_ioctl, + open: zf_open, + release: zf_close, +}; + +static struct miscdevice zf_miscdev = { + WATCHDOG_MINOR, + "watchdog", + &zf_fops +}; + + +/* + * The device needs to learn about soft shutdowns in order to + * turn the timebomb registers off. + */ +static struct notifier_block zf_notifier = { + zf_notify_sys, + NULL, + 0 +}; + +static void __init zf_show_action(int act) +{ + char *str[] = { "RESET", "SMI", "NMI", "SCI" }; + + printk(PFX ": Watchdog using action = %s\n", str[act]); +} + +int __init zf_init(void) +{ + int ret; + + printk(PFX ": MachZ ZF-Logic Watchdog driver initializing.\n"); + + ret = zf_get_ZFL_version(); + printk("%#x\n", ret); + if((!ret) || (ret != 0xffff)){ + printk(PFX ": no ZF-Logic found\n"); + return -ENODEV; + } + + if((action <= 3) && (action >= 0)){ + zf_action = zf_action>>action; + } else + action = 0; + + zf_show_action(action); + + spin_lock_init(&zf_lock); + + ret = misc_register(&zf_miscdev); + if (ret){ + printk(KERN_ERR "can't misc_register on minor=%d\n", + WATCHDOG_MINOR); + goto out; + } + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,3) + if(check_region(ZF_IOBASE, 3)){ +#else + if(!request_region(ZF_IOBASE, 3, "MachZ ZFL WDT")){ +#endif + + printk(KERN_ERR "cannot reserve I/O ports at %d\n", + ZF_IOBASE); + ret = -EBUSY; + goto no_region; + } + +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,3) + request_region(ZF_IOBASE, 3, "MachZ ZFL WDT"); +#define __exit +#endif + + ret = register_reboot_notifier(&zf_notifier); + if(ret){ + printk(KERN_ERR "can't register reboot notifier (err=%d)\n", + ret); + goto no_reboot; + } + + zf_set_status(0); + zf_set_control(0); + + /* this is the timer that will do the hard work */ + init_timer(&zf_timer); + zf_timer.function = zf_ping; + zf_timer.data = 0; + + return 0; + +no_reboot: + release_region(ZF_IOBASE, 3); +no_region: + misc_deregister(&zf_miscdev); +out: + return ret; +} + + +void __exit zf_exit(void) +{ + zf_timer_off(); + + misc_deregister(&zf_miscdev); + unregister_reboot_notifier(&zf_notifier); + release_region(ZF_IOBASE, 3); +} + +module_init(zf_init); +module_exit(zf_exit); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/misc.c linux.20p6/drivers/char/misc.c --- linux.vanilla/drivers/char/misc.c Sun Mar 25 17:37:31 2001 +++ linux.20p6/drivers/char/misc.c Tue May 8 15:54:50 2001 @@ -84,7 +84,6 @@ extern int pc110pad_init(void); extern int pmu_device_init(void); extern int tosh_init(void); -extern int rng_init(void); static int misc_read_proc(char *buf, char **start, off_t offset, int len, int *eof, void *private) @@ -286,9 +285,6 @@ #endif #ifdef CONFIG_SGI streamable_init (); -#endif -#ifdef CONFIG_INTEL_RNG - rng_init (); #endif #ifdef CONFIG_TOSHIBA tosh_init(); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/n_hdlc.c linux.20p6/drivers/char/n_hdlc.c --- linux.vanilla/drivers/char/n_hdlc.c Sun Mar 25 17:37:31 2001 +++ linux.20p6/drivers/char/n_hdlc.c Tue Jun 19 09:38:18 2001 @@ -9,7 +9,7 @@ * Al Longyear , Paul Mackerras * * Original release 01/11/99 - * $Id: n_hdlc.c,v 2.2 2000/11/08 17:08:29 paul Exp $ + * $Id: n_hdlc.c,v 2.3 2001/05/09 14:42:37 paul Exp $ * * This code is released under the GNU General Public License (GPL) * @@ -78,7 +78,7 @@ */ #define HDLC_MAGIC 0x239e -#define HDLC_VERSION "2.2" +#define HDLC_VERSION "$Revision: 2.3 $" #include #include @@ -98,6 +98,7 @@ #include #include #include +#include #include /* used in new tty drivers */ #include /* used in new tty drivers */ #include @@ -986,14 +987,7 @@ } /* end of n_hdlc_buf_get() */ -/* init_module() - * - * called when module is loading to register line discipline - * - * Arguments: None - * Return Value: 0 if success, otherwise error code - */ -int init_module(void) +int __init n_hdlc_init() { static struct tty_ldisc n_hdlc_ldisc; int status; @@ -1031,16 +1025,14 @@ if (status) printk(KERN_INFO"N_HDLC: init failure %d\n", status); return (status); - -} /* end of init_module() */ +} + +#ifdef MODULE +int init_module(void) +{ + return n_hdlc_init(); +} -/* cleanup_module() - * - * called when module is unloading to unregister line discipline - * - * Arguments: None - * Return Value: None - */ void cleanup_module(void) { int status; @@ -1050,3 +1042,4 @@ else printk("N_HDLC: line discipline unregistered\n"); } +#endif diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/rio/linux_compat.h linux.20p6/drivers/char/rio/linux_compat.h --- linux.vanilla/drivers/char/rio/linux_compat.h Sun Mar 25 17:31:28 2001 +++ linux.20p6/drivers/char/rio/linux_compat.h Fri May 4 23:50:58 2001 @@ -93,6 +93,7 @@ #define RIO_DEBUG_SPINLOCK 0x010000 #define RIO_DEBUG_DELAY 0x020000 #define RIO_DEBUG_MOD_COUNT 0x040000 +#define RIO_DEBUG_IOCTL 0x080000 /* Copied over from riowinif.h . This is ugly. The winif file declares also much other stuff which is incompatible with the headers from diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/rio/rio_linux.c linux.20p6/drivers/char/rio/rio_linux.c --- linux.vanilla/drivers/char/rio/rio_linux.c Sun Mar 25 17:31:28 2001 +++ linux.20p6/drivers/char/rio/rio_linux.c Fri May 4 23:31:29 2001 @@ -730,12 +730,31 @@ } +int rio2l (int rio_bits) +{ + return ((rio_bits & MODEM_CD) ?TIOCM_CD :0) | + ((rio_bits & MODEM_DSR)?TIOCM_DSR:0) | + ((rio_bits & MODEM_RTS)?TIOCM_RTS:0) | + ((rio_bits & MODEM_RI) ?TIOCM_RI :0) | + ((rio_bits & MODEM_DTR)?TIOCM_DTR:0) | + ((rio_bits & MODEM_CTS)?TIOCM_CTS:0); +} + +int l2rio (int l_bits) +{ + return ((l_bits & TIOCM_RTS)?MSET_RTS:0) | + ((l_bits & TIOCM_DTR)?MSET_DTR:0); +} + + static int rio_ioctl (struct tty_struct * tty, struct file * filp, unsigned int cmd, unsigned long arg) { int rc; struct Port *PortP; int ival; + int state; + long flags; func_enter(); @@ -766,7 +785,7 @@ break; case TCSBRK: if ( PortP->State & RIO_DELETED ) { - rio_dprintk (RIO_DEBUG_TTY, "BREAK on deleted RTA\n"); + rio_dprintk (RIO_DEBUG_IOCTL, "BREAK on deleted RTA\n"); rc = -EIO; } else { if (RIOShortCommand(p, PortP, SBREAK, 2, 250) == RIO_FAIL) { @@ -777,7 +796,7 @@ break; case TCSBRKP: if ( PortP->State & RIO_DELETED ) { - rio_dprintk (RIO_DEBUG_TTY, "BREAK on deleted RTA\n"); + rio_dprintk (RIO_DEBUG_IOCTL, "BREAK on deleted RTA\n"); rc = -EIO; } else { int l; @@ -794,39 +813,48 @@ sizeof(struct serial_struct))) == 0) rc = gs_setserial(&PortP->gs, (struct serial_struct *) arg); break; -#if 0 case TIOCMGET: - if ((rc = verify_area(VERIFY_WRITE, (void *) arg, - sizeof(unsigned int))) == 0) { - ival = rio_getsignals(port); - put_user(ival, (unsigned int *) arg); - } + rio_dprintk (RIO_DEBUG_IOCTL, "TIOCMGET: %x -> %x \n", + PortP->ModemState, rio2l (PortP->ModemState)); + return put_user (rio2l (PortP->ModemState), (unsigned int *) arg); break; - case TIOCMBIS: - if ((rc = verify_area(VERIFY_READ, (void *) arg, - sizeof(unsigned int))) == 0) { - Get_user(ival, (unsigned int *) arg); - rio_setsignals(port, ((ival & TIOCM_DTR) ? 1 : -1), - ((ival & TIOCM_RTS) ? 1 : -1)); - } + case TIOCMSET: + Get_user(state, (unsigned int *) arg); + rio_dprintk (RIO_DEBUG_IOCTL, "TIOCMSET: %x -> %x\n", + PortP->ModemState, l2rio (state)); + + rio_spin_lock_irqsave(&PortP->portSem, flags); + PortP->ModemState = l2rio (state); + PortP->ModemLines = l2rio (state); + if (RIOPreemptiveCmd(p, PortP, MSET) == RIO_FAIL) + rio_dprintk (RIO_DEBUG_TTY, "MSET command failed\n"); + PortP->State |= RIO_BUSY; + rio_spin_unlock_irqrestore(&PortP->portSem, flags); break; case TIOCMBIC: - if ((rc = verify_area(VERIFY_READ, (void *) arg, - sizeof(unsigned int))) == 0) { - Get_user(ival, (unsigned int *) arg); - rio_setsignals(port, ((ival & TIOCM_DTR) ? 0 : -1), - ((ival & TIOCM_RTS) ? 0 : -1)); - } + rio_dprintk (RIO_DEBUG_IOCTL, "TIOCMBIC\n"); + Get_user(state, (unsigned int *) arg); + + rio_spin_lock_irqsave(&PortP->portSem, flags); + PortP->ModemState &= ~l2rio (state); + PortP->ModemLines = l2rio (state); + if (RIOPreemptiveCmd(p, PortP, MBIC) == RIO_FAIL) + rio_dprintk (RIO_DEBUG_TTY, "TCRIOMBIC command failed\n"); + PortP->State |= RIO_BUSY; + rio_spin_unlock_irqrestore(&PortP->portSem, flags); break; - case TIOCMSET: - if ((rc = verify_area(VERIFY_READ, (void *) arg, - sizeof(unsigned int))) == 0) { - Get_user(ival, (unsigned int *) arg); - rio_setsignals(port, ((ival & TIOCM_DTR) ? 1 : 0), - ((ival & TIOCM_RTS) ? 1 : 0)); - } + case TIOCMBIS: + rio_dprintk (RIO_DEBUG_IOCTL, "TIOCMBIS\n"); + Get_user(state, (unsigned int *) arg); + + rio_spin_lock_irqsave(&PortP->portSem, flags); + PortP->ModemState |= state; + PortP->ModemLines = state; + if (RIOPreemptiveCmd(p, PortP, MBIS) == RIO_FAIL) + rio_dprintk (RIO_DEBUG_TTY, "TCRIOMBIS command failed\n"); + PortP->State |= RIO_BUSY; + rio_spin_unlock_irqrestore(&PortP->portSem, flags); break; -#endif default: rc = -ENOIOCTLCMD; break; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/rio/rio_linux.h linux.20p6/drivers/char/rio/rio_linux.h --- linux.vanilla/drivers/char/rio/rio_linux.h Sun Mar 25 17:31:28 2001 +++ linux.20p6/drivers/char/rio/rio_linux.h Fri May 4 23:31:29 2001 @@ -190,3 +190,20 @@ #define func_enter2() #endif +/* Documentation says to use these defines. Why aren't they in a + * header then? Hmm. They are in the header "riowinif.h", however + * that file doesn't compile. I give up. Copied here. -- REW + */ + +#define MSET_RTS 0x01 /* RTS modem signal */ +#define MSET_DTR 0x02 /* DTR modem signal */ + +#define MODEM_DSR 0x80 /* Data Set Ready modem state */ +#define MODEM_CTS 0x40 /* Clear To Send modem state */ +#define MODEM_RI 0x20 /* Ring Indicate modem state */ +#define MODEM_CD 0x10 /* Carrier Detect modem state */ +#define MODEM_TSTOP 0x08 /* Transmit Stopped state */ +#define MODEM_TEMPTY 0x04 /* Transmit Empty state */ +#define MODEM_DTR 0x02 /* DTR modem output state */ +#define MODEM_RTS 0x01 /* RTS modem output state */ + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/rio/riodrvr.h linux.20p6/drivers/char/rio/riodrvr.h --- linux.vanilla/drivers/char/rio/riodrvr.h Sun Mar 25 17:31:28 2001 +++ linux.20p6/drivers/char/rio/riodrvr.h Tue May 8 15:54:50 2001 @@ -33,12 +33,13 @@ #ifndef __riodrvr_h #define __riodrvr_h +#include /* for HZ */ + #ifdef SCCS_LABELS static char *_riodrvr_h_sccs_ = "@(#)riodrvr.h 1.3"; #endif #define MEMDUMP_SIZE 32 -#define HZ 100 #define MOD_DISABLE (RIO_NOREAD|RIO_NOWRITE|RIO_NOXPRINT) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/sbc60xxwdt.c linux.20p6/drivers/char/sbc60xxwdt.c --- linux.vanilla/drivers/char/sbc60xxwdt.c Sun Mar 25 17:31:28 2001 +++ linux.20p6/drivers/char/sbc60xxwdt.c Tue Jun 19 09:59:54 2001 @@ -49,7 +49,7 @@ * * Why `V' ? Well, `V' is the character in ASCII for the value 86, * and we all know that 86 is _the_ most random number in the universe. - * Therefore it is the letter that has the slightest chance of occuring + * Therefore it is the letter that has the slightest chance of occurring * by chance, when the system becomes corrupted. * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/synclink.c linux.20p6/drivers/char/synclink.c --- linux.vanilla/drivers/char/synclink.c Sun Mar 25 17:37:31 2001 +++ linux.20p6/drivers/char/synclink.c Tue Jun 19 09:59:54 2001 @@ -1,7 +1,7 @@ /* * linux/drivers/char/synclink.c * - * $Id: synclink.c,v 2.4 2000/12/11 20:08:18 paul Exp $ + * $Id: synclink.c,v 2.12 2001/05/10 20:53:04 paulkf Exp $ * * Device driver for Microgate SyncLink ISA and PCI * high speed multiprotocol serial adapters. @@ -54,7 +54,11 @@ */ #define VERSION(ver,rel,seq) (((ver)<<16) | ((rel)<<8) | (seq)) -#define BREAKPOINT() asm(" int $3"); +#if defined(__i386__) +# define BREAKPOINT() asm(" int $3"); +#else +# define BREAKPOINT() { } +#endif #define MAX_ISA_DEVICES 10 #define MAX_PCI_DEVICES 10 @@ -182,6 +186,13 @@ int cts_down; }; +/* transmit holding buffer definitions*/ +#define MAX_TX_HOLDING_BUFFERS 5 +struct tx_holding_buffer { + int buffer_size; + unsigned char * buffer; +}; + /* * Device instance data structure */ @@ -247,11 +258,21 @@ DMABUFFERENTRY *rx_buffer_list; /* list of receive buffer entries */ unsigned int current_rx_buffer; + int num_tx_dma_buffers; /* number of tx dma frames required */ + int tx_dma_buffers_used; unsigned int tx_buffer_count; /* count of total allocated Tx buffers */ DMABUFFERENTRY *tx_buffer_list; /* list of transmit buffer entries */ + int start_tx_dma_buffer; /* tx dma buffer to start tx dma operation */ + int current_tx_buffer; /* next tx dma buffer to be loaded */ unsigned char *intermediate_rxbuffer; + int num_tx_holding_buffers; /* number of tx holding buffer allocated */ + int get_tx_holding_index; /* next tx holding buffer for adapter to load */ + int put_tx_holding_index; /* next tx holding buffer to store user request */ + int tx_holding_count; /* number of tx holding buffers waiting */ + struct tx_holding_buffer tx_holding_buffers[MAX_TX_HOLDING_BUFFERS]; + int rx_enabled; int rx_overflow; @@ -691,6 +712,8 @@ #define usc_TCmd(a,b) usc_OutReg((a), TCSR, (u16)((a)->tcsr_value + (b))) #define usc_RCmd(a,b) usc_OutReg((a), RCSR, (b)) +#define usc_SetTransmitSyncChars(a,s0,s1) usc_OutReg((a), TSR, (u16)(((u16)s0<<8)|(u16)s1)) + void usc_process_rxoverrun_sync( struct mgsl_struct *info ); void usc_start_receiver( struct mgsl_struct *info ); void usc_stop_receiver( struct mgsl_struct *info ); @@ -781,7 +804,10 @@ */ void mgsl_free_rx_frame_buffers( struct mgsl_struct *info, unsigned int StartIndex, unsigned int EndIndex ); int mgsl_get_rx_frame( struct mgsl_struct *info ); +int mgsl_get_raw_rx_frame( struct mgsl_struct *info ); void mgsl_reset_rx_dma_buffers( struct mgsl_struct *info ); +void mgsl_reset_tx_dma_buffers( struct mgsl_struct *info ); +int num_free_tx_dma_buffers(struct mgsl_struct *info); void mgsl_load_tx_dma_buffer( struct mgsl_struct *info, const char *Buffer, unsigned int BufferSize); void mgsl_load_pci_memory(char* TargetPtr, const char* SourcePtr, unsigned short count); @@ -796,6 +822,11 @@ void mgsl_free_buffer_list_memory(struct mgsl_struct *info); int mgsl_alloc_intermediate_rxbuffer_memory(struct mgsl_struct *info); void mgsl_free_intermediate_rxbuffer_memory(struct mgsl_struct *info); +int mgsl_alloc_intermediate_txbuffer_memory(struct mgsl_struct *info); +void mgsl_free_intermediate_txbuffer_memory(struct mgsl_struct *info); +int load_next_tx_holding_buffer(struct mgsl_struct *info); +int save_tx_buffer_request(struct mgsl_struct *info,const char *Buffer, unsigned int BufferSize); + /* * Bottom half interrupt handlers @@ -816,6 +847,7 @@ void mgsl_isr_io_pin( struct mgsl_struct *info ); void mgsl_isr_misc( struct mgsl_struct *info ); void mgsl_isr_receive_dma( struct mgsl_struct *info ); +void mgsl_isr_transmit_dma( struct mgsl_struct *info ); typedef void (*isr_dispatch_func)(struct mgsl_struct *); @@ -880,6 +912,8 @@ static int debug_level = 0; static int maxframe[MAX_TOTAL_DEVICES] = {0,}; static int dosyncppp[MAX_TOTAL_DEVICES] = {0,}; +static int txdmabufs[MAX_TOTAL_DEVICES] = {0,}; +static int txholdbufs[MAX_TOTAL_DEVICES] = {0,}; MODULE_PARM(break_on_load,"i"); MODULE_PARM(ttymajor,"i"); @@ -890,9 +924,11 @@ MODULE_PARM(debug_level,"i"); MODULE_PARM(maxframe,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i"); MODULE_PARM(dosyncppp,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i"); +MODULE_PARM(txdmabufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i"); +MODULE_PARM(txholdbufs,"1-" __MODULE_STRING(MAX_TOTAL_DEVICES) "i"); static char *driver_name = "SyncLink serial driver"; -static char *driver_version = "2.3"; +static char *driver_version = "$Revision: 2.12 $"; static struct tty_driver serial_driver, callout_driver; static int serial_refcount; @@ -1085,11 +1121,14 @@ void mgsl_bh_receive(struct mgsl_struct *info) { + int (*get_rx_frame)(struct mgsl_struct *info) = + (info->params.mode == MGSL_MODE_HDLC ? mgsl_get_rx_frame : mgsl_get_raw_rx_frame); + if ( debug_level >= DEBUG_LEVEL_BH ) printk( "%s(%d):mgsl_bh_receive(%s)\n", __FILE__,__LINE__,info->device_name); - while( mgsl_get_rx_frame(info) ); + while( (get_rx_frame)(info) ); } void mgsl_bh_transmit(struct mgsl_struct *info) @@ -1594,6 +1633,58 @@ } /* end of mgsl_isr_receive_dma() */ +/* mgsl_isr_transmit_dma() + * + * This function services a transmit DMA channel interrupt. + * + * For this driver there is one source of transmit DMA interrupts + * as identified in the Transmit DMA Mode Register (TDMR): + * + * BIT2 EOB End of Buffer. This interrupt occurs when a + * transmit DMA buffer has been emptied. + * + * The driver maintains enough transmit DMA buffers to hold at least + * one max frame size transmit frame. When operating in a buffered + * transmit mode, there may be enough transmit DMA buffers to hold at + * least two or more max frame size frames. On an EOB condition, + * determine if there are any queued transmit buffers and copy into + * transmit DMA buffers if we have room. + * + * Arguments: info pointer to device instance data + * Return Value: None + */ +void mgsl_isr_transmit_dma( struct mgsl_struct *info ) +{ + u16 status; + + /* clear interrupt pending and IUS bit for Tx DMA IRQ */ + usc_OutDmaReg(info, CDIR, BIT8+BIT0 ); + + /* Read the transmit DMA status to identify interrupt type. */ + /* This also clears the status bits. */ + + status = usc_InDmaReg( info, TDMR ); + + if ( debug_level >= DEBUG_LEVEL_ISR ) + printk("%s(%d):mgsl_isr_transmit_dma(%s) status=%04X\n", + __FILE__,__LINE__,info->device_name,status); + + if ( status & BIT2 ) { + --info->tx_dma_buffers_used; + + /* if there are transmit frames queued, + * try to load the next one + */ + if ( load_next_tx_holding_buffer(info) ) { + /* if call returns non-zero value, we have + * at least one free tx holding buffer + */ + info->pending_bh |= BH_TRANSMIT; + } + } + +} /* end of mgsl_isr_transmit_dma() */ + /* mgsl_interrupt() * * Interrupt service routine entry point. @@ -1637,6 +1728,8 @@ /* Dispatch interrupt vector */ if ( UscVector ) (*UscIsrTable[UscVector])(info); + else if ( (DmaVector&(BIT10|BIT9)) == BIT10) + mgsl_isr_transmit_dma(info); else mgsl_isr_receive_dma(info); @@ -1803,7 +1896,9 @@ usc_stop_transmitter(info); info->xmit_cnt = info->xmit_head = info->xmit_tail = 0; - if (info->params.mode == MGSL_MODE_HDLC || info->netcount) + if (info->params.mode == MGSL_MODE_HDLC || + info->params.mode == MGSL_MODE_RAW || + info->netcount) usc_set_sync_mode(info); else usc_set_async_mode(info); @@ -1956,8 +2051,7 @@ spin_lock_irqsave(&info->irq_spinlock,flags); - if ( (info->params.mode != MGSL_MODE_HDLC) || - !info->tx_active ) { + if ( (info->params.mode == MGSL_MODE_ASYNC ) || !info->tx_active ) { if (info->xmit_cnt < SERIAL_XMIT_SIZE - 1) { info->xmit_buf[info->xmit_head++] = ch; @@ -2001,8 +2095,8 @@ spin_lock_irqsave(&info->irq_spinlock,flags); if (!info->tx_active) { - if ( (info->params.mode == MGSL_MODE_HDLC) && - info->xmit_cnt ) { + if ( (info->params.mode == MGSL_MODE_HDLC || + info->params.mode == MGSL_MODE_RAW) && info->xmit_cnt ) { /* operating in synchronous (frame oriented) mode */ /* copy data from circular xmit_buf to */ /* transmit DMA buffer. */ @@ -2046,11 +2140,51 @@ if (!tty || !info->xmit_buf || !tmp_buf) goto cleanup; - if ( info->params.mode == MGSL_MODE_HDLC ) { - /* operating in synchronous (frame oriented) mode */ + if ( info->params.mode == MGSL_MODE_HDLC || + info->params.mode == MGSL_MODE_RAW ) { + /* operating in synchronous (frame oriented) mode */ if (info->tx_active) { - ret = 0; goto cleanup; + + if ( info->params.mode == MGSL_MODE_HDLC ) { + ret = 0; + goto cleanup; + } + /* transmitter is actively sending data - + * if we have multiple transmit dma and + * holding buffers, attempt to queue this + * frame for transmission at a later time. + */ + if (info->tx_holding_count >= info->num_tx_holding_buffers ) { + /* no tx holding buffers available */ + ret = 0; + goto cleanup; + } + + /* queue transmit frame request */ + ret = count; + if (from_user) { + down(&tmp_buf_sem); + COPY_FROM_USER(err,tmp_buf, buf, count); + if (err) { + if ( debug_level >= DEBUG_LEVEL_INFO ) + printk( "%s(%d):mgsl_write(%s) sync user buf copy failed\n", + __FILE__,__LINE__,info->device_name); + ret = -EFAULT; + } else + save_tx_buffer_request(info,tmp_buf,count); + up(&tmp_buf_sem); + } + else + save_tx_buffer_request(info,buf,count); + + /* if we have sufficient tx dma buffers, + * load the next buffered tx request + */ + spin_lock_irqsave(&info->irq_spinlock,flags); + load_next_tx_holding_buffer(info); + spin_unlock_irqrestore(&info->irq_spinlock,flags); + goto cleanup; } /* if operating in HDLC LoopMode and the adapter */ @@ -2058,8 +2192,7 @@ /* transmit */ if ( (info->params.flags & HDLC_FLAG_HDLC_LOOPMODE) && - !usc_loopmode_active(info) ) - { + !usc_loopmode_active(info) ) { ret = 0; goto cleanup; } @@ -2186,7 +2319,8 @@ printk("%s(%d):mgsl_write_room(%s)=%d\n", __FILE__,__LINE__, info->device_name,ret ); - if ( info->params.mode == MGSL_MODE_HDLC ) { + if ( info->params.mode == MGSL_MODE_HDLC || + info->params.mode == MGSL_MODE_RAW ) { /* operating in synchronous (frame oriented) mode */ if ( info->tx_active ) return 0; @@ -2220,10 +2354,12 @@ printk("%s(%d):mgsl_chars_in_buffer(%s)=%d\n", __FILE__,__LINE__, info->device_name,info->xmit_cnt ); - if ( info->params.mode == MGSL_MODE_HDLC ) { + if ( info->params.mode == MGSL_MODE_HDLC || + info->params.mode == MGSL_MODE_RAW ) { /* operating in synchronous (frame oriented) mode */ - if ( info->tx_active ) - return info->tx_buffer_list[0].rcc; + if ( info->tx_active ) { + return info->max_frame_size; + } else return 0; } @@ -2613,11 +2749,11 @@ unsigned long flags; int s; int rc=0; - u16 regval; struct mgsl_icount cprev, cnow; - int events = 0; + int events; int mask; - struct _input_signal_events signal_events_prev, signal_events_now; + struct _input_signal_events oldsigs, newsigs; + DECLARE_WAITQUEUE(wait, current); COPY_FROM_USER(rc,&mask, mask_ptr, sizeof(int)); if (rc) { @@ -2630,114 +2766,99 @@ spin_lock_irqsave(&info->irq_spinlock,flags); + /* return immediately if state matches requested events */ usc_get_serial_signals(info); s = info->serial_signals; + events = mask & + ( ((s & SerialSignal_DSR) ? MgslEvent_DsrActive:MgslEvent_DsrInactive) + + ((s & SerialSignal_DCD) ? MgslEvent_DcdActive:MgslEvent_DcdInactive) + + ((s & SerialSignal_CTS) ? MgslEvent_CtsActive:MgslEvent_CtsInactive) + + ((s & SerialSignal_RI) ? MgslEvent_RiActive :MgslEvent_RiInactive) ); + if (events) { + spin_unlock_irqrestore(&info->irq_spinlock,flags); + goto exit; + } - /* note the counters on entry */ + /* save current irq counts */ cprev = info->icount; - signal_events_prev = info->input_signal_events; + oldsigs = info->input_signal_events; - if (mask & MgslEvent_ExitHuntMode) { - /* enable exit hunt mode IRQ */ - regval = usc_InReg(info,RICR); - if (!(regval & RXSTATUS_EXITED_HUNT)) - usc_OutReg(info, RICR, regval | RXSTATUS_EXITED_HUNT); + /* enable hunt and idle irqs if needed */ + if (mask & (MgslEvent_ExitHuntMode + MgslEvent_IdleReceived)) { + u16 oldreg = usc_InReg(info,RICR); + u16 newreg = oldreg + + (mask & MgslEvent_ExitHuntMode ? RXSTATUS_EXITED_HUNT:0) + + (mask & MgslEvent_IdleReceived ? RXSTATUS_IDLE_RECEIVED:0); + if (oldreg != newreg) + usc_OutReg(info, RICR, newreg); } - if (mask & MgslEvent_IdleReceived) { - /* enable idle mode received IRQ */ - regval = usc_InReg(info,RICR); - if (!(regval & RXSTATUS_IDLE_RECEIVED)) - usc_OutReg(info, RICR, regval | RXSTATUS_IDLE_RECEIVED); - } + set_current_state(TASK_INTERRUPTIBLE); + add_wait_queue(&info->event_wait_q, &wait); spin_unlock_irqrestore(&info->irq_spinlock,flags); - /* Determine if any user requested events for input signals is currently TRUE */ - - events |= (mask & ((s & SerialSignal_DSR) ? - MgslEvent_DsrActive:MgslEvent_DsrInactive)); - - events |= (mask & ((s & SerialSignal_DCD) ? - MgslEvent_DcdActive:MgslEvent_DcdInactive)); - - events |= (mask & ((s & SerialSignal_CTS) ? - MgslEvent_CtsActive:MgslEvent_CtsInactive)); - - events |= (mask & ((s & SerialSignal_RI) ? - MgslEvent_RiActive:MgslEvent_RiInactive)); - - while(!events) { - /* sleep until event occurs */ - interruptible_sleep_on(&info->event_wait_q); - - /* see if a signal woke us */ + for(;;) { + schedule(); if (signal_pending(current)) { rc = -ERESTARTSYS; break; } + /* get current irq counts */ spin_lock_irqsave(&info->irq_spinlock,flags); - - /* get icount and serial signal states */ cnow = info->icount; - signal_events_now = info->input_signal_events; + newsigs = info->input_signal_events; + set_current_state(TASK_INTERRUPTIBLE); spin_unlock_irqrestore(&info->irq_spinlock,flags); - if (signal_events_now.dsr_up != signal_events_prev.dsr_up && - mask & MgslEvent_DsrActive ) - events |= MgslEvent_DsrActive; - - if (signal_events_now.dsr_down != signal_events_prev.dsr_down && - mask & MgslEvent_DsrInactive ) - events |= MgslEvent_DsrInactive; - - if (signal_events_now.dcd_up != signal_events_prev.dcd_up && - mask & MgslEvent_DcdActive ) - events |= MgslEvent_DcdActive; - - if (signal_events_now.dcd_down != signal_events_prev.dcd_down && - mask & MgslEvent_DcdInactive ) - events |= MgslEvent_DcdInactive; - - if (signal_events_now.cts_up != signal_events_prev.cts_up && - mask & MgslEvent_CtsActive ) - events |= MgslEvent_CtsActive; - - if (signal_events_now.cts_down != signal_events_prev.cts_down && - mask & MgslEvent_CtsInactive ) - events |= MgslEvent_CtsInactive; - - if (signal_events_now.ri_up != signal_events_prev.ri_up && - mask & MgslEvent_RiActive ) - events |= MgslEvent_RiActive; - - if (signal_events_now.ri_down != signal_events_prev.ri_down && - mask & MgslEvent_RiInactive ) - events |= MgslEvent_RiInactive; - - if (cnow.exithunt != cprev.exithunt) - events |= (mask & MgslEvent_ExitHuntMode); + /* if no change, wait aborted for some reason */ + if (newsigs.dsr_up == oldsigs.dsr_up && + newsigs.dsr_down == oldsigs.dsr_down && + newsigs.dcd_up == oldsigs.dcd_up && + newsigs.dcd_down == oldsigs.dcd_down && + newsigs.cts_up == oldsigs.cts_up && + newsigs.cts_down == oldsigs.cts_down && + newsigs.ri_up == oldsigs.ri_up && + newsigs.ri_down == oldsigs.ri_down && + cnow.exithunt == cprev.exithunt && + cnow.rxidle == cprev.rxidle) { + rc = -EIO; + break; + } - if (cnow.rxidle != cprev.rxidle) - events |= (mask & MgslEvent_IdleReceived); + events = mask & + ( (newsigs.dsr_up != oldsigs.dsr_up ? MgslEvent_DsrActive:0) + + (newsigs.dsr_down != oldsigs.dsr_down ? MgslEvent_DsrInactive:0) + + (newsigs.dcd_up != oldsigs.dcd_up ? MgslEvent_DcdActive:0) + + (newsigs.dcd_down != oldsigs.dcd_down ? MgslEvent_DcdInactive:0) + + (newsigs.cts_up != oldsigs.cts_up ? MgslEvent_CtsActive:0) + + (newsigs.cts_down != oldsigs.cts_down ? MgslEvent_CtsInactive:0) + + (newsigs.ri_up != oldsigs.ri_up ? MgslEvent_RiActive:0) + + (newsigs.ri_down != oldsigs.ri_down ? MgslEvent_RiInactive:0) + + (cnow.exithunt != cprev.exithunt ? MgslEvent_ExitHuntMode:0) + + (cnow.rxidle != cprev.rxidle ? MgslEvent_IdleReceived:0) ); + if (events) + break; cprev = cnow; - signal_events_prev = signal_events_now; + oldsigs = newsigs; } + remove_wait_queue(&info->event_wait_q, &wait); + set_current_state(TASK_RUNNING); + if (mask & (MgslEvent_ExitHuntMode + MgslEvent_IdleReceived)) { spin_lock_irqsave(&info->irq_spinlock,flags); if (!waitqueue_active(&info->event_wait_q)) { /* disable enable exit hunt mode/idle rcvd IRQs */ - regval = usc_InReg(info,RICR); - usc_OutReg(info, RICR, regval & + usc_OutReg(info, RICR, usc_InReg(info,RICR) & ~(RXSTATUS_EXITED_HUNT + RXSTATUS_IDLE_RECEIVED)); } spin_unlock_irqrestore(&info->irq_spinlock,flags); } - +exit: if ( rc == 0 ) PUT_USER(rc, events, mask_ptr); @@ -2745,6 +2866,56 @@ } /* end of mgsl_wait_event() */ +static int modem_input_wait(struct mgsl_struct *info,int arg) +{ + unsigned long flags; + int rc; + struct mgsl_icount cprev, cnow; + DECLARE_WAITQUEUE(wait, current); + + /* save current irq counts */ + spin_lock_irqsave(&info->irq_spinlock,flags); + cprev = info->icount; + add_wait_queue(&info->status_event_wait_q, &wait); + set_current_state(TASK_INTERRUPTIBLE); + spin_unlock_irqrestore(&info->irq_spinlock,flags); + + for(;;) { + schedule(); + if (signal_pending(current)) { + rc = -ERESTARTSYS; + break; + } + + /* get new irq counts */ + spin_lock_irqsave(&info->irq_spinlock,flags); + cnow = info->icount; + set_current_state(TASK_INTERRUPTIBLE); + spin_unlock_irqrestore(&info->irq_spinlock,flags); + + /* if no change, wait aborted for some reason */ + if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr && + cnow.dcd == cprev.dcd && cnow.cts == cprev.cts) { + rc = -EIO; + break; + } + + /* check for change in caller specified modem input */ + if ((arg & TIOCM_RNG && cnow.rng != cprev.rng) || + (arg & TIOCM_DSR && cnow.dsr != cprev.dsr) || + (arg & TIOCM_CD && cnow.dcd != cprev.dcd) || + (arg & TIOCM_CTS && cnow.cts != cprev.cts)) { + rc = 0; + break; + } + + cprev = cnow; + } + remove_wait_queue(&info->status_event_wait_q, &wait); + set_current_state(TASK_RUNNING); + return rc; +} + /* get_modem_info() * * Read the state of the serial control and @@ -2912,7 +3083,7 @@ int mgsl_ioctl_common(struct mgsl_struct *info, unsigned int cmd, unsigned long arg) { int error; - struct mgsl_icount cprev, cnow; /* kernel counter temps */ + struct mgsl_icount cnow; /* kernel counter temps */ struct serial_icounter_struct *p_cuser; /* user space */ unsigned long flags; @@ -2947,37 +3118,12 @@ while(MOD_IN_USE) MOD_DEC_USE_COUNT; return 0; - /* - * Wait for any of the 4 modem inputs (DCD,RI,DSR,CTS) to change - * - mask passed in arg for lines of interest - * (use |'ed TIOCM_RNG/DSR/CD/CTS for masking) - * Caller should use TIOCGICOUNT to see which one it was + + /* Wait for modem input (DCD,RI,DSR,CTS) change + * as specified by mask in arg (TIOCM_RNG/DSR/CD/CTS) */ case TIOCMIWAIT: - spin_lock_irqsave(&info->irq_spinlock,flags); - /* note the counters on entry */ - cprev = info->icount; - spin_unlock_irqrestore(&info->irq_spinlock,flags); - while (1) { - interruptible_sleep_on(&info->status_event_wait_q); - /* see if a signal did it */ - if (signal_pending(current)) - return -ERESTARTSYS; - save_flags(flags); cli(); - cnow = info->icount; /* atomic copy */ - restore_flags(flags); - if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr && - cnow.dcd == cprev.dcd && cnow.cts == cprev.cts) - return -EIO; /* no change => error */ - if ( ((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) || - ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) || - ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) || - ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts)) ) { - return 0; - } - cprev = cnow; - } - /* NOTREACHED */ + return modem_input_wait(info,(int)arg); /* * Get counter of input serial line interrupts (DCD,RI,DSR,CTS) @@ -3229,7 +3375,8 @@ if (timeout) char_time = MIN(char_time, timeout); - if ( info->params.mode == MGSL_MODE_HDLC ) { + if ( info->params.mode == MGSL_MODE_HDLC || + info->params.mode == MGSL_MODE_RAW ) { while (info->tx_active) { set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(char_time); @@ -3587,7 +3734,8 @@ if (info->serial_signals & SerialSignal_RI) strcat(stat_buf, "|RI"); - if (info->params.mode == MGSL_MODE_HDLC) { + if (info->params.mode == MGSL_MODE_HDLC || + info->params.mode == MGSL_MODE_RAW ) { ret += sprintf(buf+ret, " HDLC txok:%d rxok:%d", info->icount.txok, info->icount.rxok); if (info->icount.txunder) @@ -3728,28 +3876,27 @@ * * This leaves 62 4K pages. * - * The next N pages are used for a transmit frame. We - * reserve enough 4K page blocks to hold the configured - * MaxFrameSize + * The next N pages are used for transmit frame(s). We + * reserve enough 4K page blocks to hold the required + * number of transmit dma buffers (num_tx_dma_buffers), + * each of MaxFrameSize size. * * Of the remaining pages (62-N), determine how many can * be used to receive full MaxFrameSize inbound frames */ - - info->tx_buffer_count = BuffersPerFrame; + info->tx_buffer_count = info->num_tx_dma_buffers * BuffersPerFrame; info->rx_buffer_count = 62 - info->tx_buffer_count; } else { /* Calculate the number of PAGE_SIZE buffers needed for */ /* receive and transmit DMA buffers. */ - /* Calculate the number of DMA buffers necessary to */ /* hold 7 max size receive frames and one max size transmit frame. */ /* The receive buffer count is bumped by one so we avoid an */ /* End of List condition if all receive buffers are used when */ /* using linked list DMA buffers. */ - info->tx_buffer_count = BuffersPerFrame; + info->tx_buffer_count = info->num_tx_dma_buffers * BuffersPerFrame; info->rx_buffer_count = (BuffersPerFrame * MAXRXFRAMES) + 6; /* @@ -3769,12 +3916,14 @@ if ( mgsl_alloc_buffer_list_memory( info ) < 0 || mgsl_alloc_frame_memory(info, info->rx_buffer_list, info->rx_buffer_count) < 0 || mgsl_alloc_frame_memory(info, info->tx_buffer_list, info->tx_buffer_count) < 0 || - mgsl_alloc_intermediate_rxbuffer_memory(info) < 0 ) { + mgsl_alloc_intermediate_rxbuffer_memory(info) < 0 || + mgsl_alloc_intermediate_txbuffer_memory(info) < 0 ) { printk("%s(%d):Can't allocate DMA buffer memory\n",__FILE__,__LINE__); return -ENOMEM; } mgsl_reset_rx_dma_buffers( info ); + mgsl_reset_tx_dma_buffers( info ); return 0; @@ -4030,6 +4179,149 @@ } /* end of mgsl_free_intermediate_rxbuffer_memory() */ +/* + * mgsl_alloc_intermediate_txbuffer_memory() + * + * Allocate intermdiate transmit buffer(s) large enough to hold max_frame_size. + * This buffer is used to load transmit frames into the adapter's dma transfer + * buffers when there is sufficient space. + * + * Arguments: + * + * info pointer to device instance data + * + * Return Value: 0 if success, otherwise -ENOMEM + */ +int mgsl_alloc_intermediate_txbuffer_memory(struct mgsl_struct *info) +{ + int i; + + if ( debug_level >= DEBUG_LEVEL_INFO ) + printk("%s %s(%d) allocating %d tx holding buffers\n", + info->device_name, __FILE__,__LINE__,info->num_tx_holding_buffers); + + memset(info->tx_holding_buffers,0,sizeof(info->tx_holding_buffers)); + + for ( i=0; inum_tx_holding_buffers; ++i) { + info->tx_holding_buffers[i].buffer = + kmalloc(info->max_frame_size, GFP_KERNEL); + if ( info->tx_holding_buffers[i].buffer == NULL ) + return -ENOMEM; + } + + return 0; + +} /* end of mgsl_alloc_intermediate_txbuffer_memory() */ + +/* + * mgsl_free_intermediate_txbuffer_memory() + * + * + * Arguments: + * + * info pointer to device instance data + * + * Return Value: None + */ +void mgsl_free_intermediate_txbuffer_memory(struct mgsl_struct *info) +{ + int i; + + for ( i=0; inum_tx_holding_buffers; ++i ) { + if ( info->tx_holding_buffers[i].buffer ) { + kfree(info->tx_holding_buffers[i].buffer); + info->tx_holding_buffers[i].buffer=NULL; + } + } + + info->get_tx_holding_index = 0; + info->put_tx_holding_index = 0; + info->tx_holding_count = 0; + +} /* end of mgsl_free_intermediate_txbuffer_memory() */ + + +/* + * load_next_tx_holding_buffer() + * + * attempts to load the next buffered tx request into the + * tx dma buffers + * + * Arguments: + * + * info pointer to device instance data + * + * Return Value: 1 if next buffered tx request loaded + * into adapter's tx dma buffer, + * 0 otherwise + */ +int load_next_tx_holding_buffer(struct mgsl_struct *info) +{ + int ret = 0; + + if ( info->tx_holding_count ) { + /* determine if we have enough tx dma buffers + * to accomodate the next tx frame + */ + struct tx_holding_buffer *ptx = + &info->tx_holding_buffers[info->get_tx_holding_index]; + int num_free = num_free_tx_dma_buffers(info); + int num_needed = ptx->buffer_size / DMABUFFERSIZE; + if ( ptx->buffer_size % DMABUFFERSIZE ) + ++num_needed; + + if (num_needed <= num_free) { + info->xmit_cnt = ptx->buffer_size; + mgsl_load_tx_dma_buffer(info,ptx->buffer,ptx->buffer_size); + + --info->tx_holding_count; + if ( ++info->get_tx_holding_index >= info->num_tx_holding_buffers) + info->get_tx_holding_index=0; + + /* restart transmit timer */ + del_timer(&info->tx_timer); + info->tx_timer.expires = jiffies + jiffies_from_ms(5000); + add_timer(&info->tx_timer); + + ret = 1; + } + } + + return ret; +} + +/* + * save_tx_buffer_request() + * + * attempt to store transmit frame request for later transmission + * + * Arguments: + * + * info pointer to device instance data + * Buffer pointer to buffer containing frame to load + * BufferSize size in bytes of frame in Buffer + * + * Return Value: 1 if able to store, 0 otherwise + */ +int save_tx_buffer_request(struct mgsl_struct *info,const char *Buffer, unsigned int BufferSize) +{ + struct tx_holding_buffer *ptx; + + if ( info->tx_holding_count >= info->num_tx_holding_buffers ) { + return 0; /* all buffers in use */ + } + + ptx = &info->tx_holding_buffers[info->put_tx_holding_index]; + ptx->buffer_size = BufferSize; + memcpy( ptx->buffer, Buffer, BufferSize); + + ++info->tx_holding_count; + if ( ++info->put_tx_holding_index >= info->num_tx_holding_buffers) + info->put_tx_holding_index=0; + + return 1; +} + int mgsl_claim_resources(struct mgsl_struct *info) { /* claim 16C32 I/O base address */ @@ -4123,6 +4415,7 @@ } mgsl_free_dma_buffers(info); mgsl_free_intermediate_rxbuffer_memory(info); + mgsl_free_intermediate_txbuffer_memory(info); if ( info->io_addr_requested ) { release_region(info->io_base,info->io_addr_size); @@ -4163,6 +4456,21 @@ if (maxframe[info->line]) info->max_frame_size = maxframe[info->line]; info->dosyncppp = dosyncppp[info->line]; + + if (txdmabufs[info->line]) { + info->num_tx_dma_buffers = txdmabufs[info->line]; + if (info->num_tx_dma_buffers < 1) + info->num_tx_dma_buffers = 1; + } + + if (txholdbufs[info->line]) { + info->num_tx_holding_buffers = txholdbufs[info->line]; + if (info->num_tx_holding_buffers < 1) + info->num_tx_holding_buffers = 1; + else if (info->num_tx_holding_buffers > MAX_TX_HOLDING_BUFFERS) + info->num_tx_holding_buffers = MAX_TX_HOLDING_BUFFERS; + } + } mgsl_device_count++; @@ -4182,18 +4490,20 @@ info->max_frame_size = 65535; if ( info->bus_type == MGSL_BUS_TYPE_PCI ) { - printk( "SyncLink device %s added:PCI bus IO=%04X IRQ=%d Mem=%08X LCR=%08X MaxFrameSize=%u\n", + printk( "SyncLink device %s:PCI IO=%04X IRQ=%d Mem=%08X LCR=%08X MaxFrameSize=%u\n", info->device_name, info->io_base, info->irq_level, info->phys_memory_base, info->phys_lcr_base, info->max_frame_size ); } else { - printk( "SyncLink device %s added:ISA bus IO=%04X IRQ=%d DMA=%d MaxFrameSize=%u\n", + printk( "SyncLink device %s:ISA IO=%04X IRQ=%d DMA=%d MaxFrameSize=%u\n", info->device_name, info->io_base, info->irq_level, info->dma_level, info->max_frame_size ); } #ifdef CONFIG_SYNCLINK_SYNCPPP +#ifdef MODULE if (info->dosyncppp) +#endif mgsl_sppp_init(info); #endif } /* end of mgsl_add_device() */ @@ -4231,6 +4541,8 @@ spin_lock_init(&info->netlock); memcpy(&info->params,&default_params,sizeof(MGSL_PARAMS)); info->idle_mode = HDLC_TXIDLE_FLAGS; + info->num_tx_dma_buffers = 1; + info->num_tx_holding_buffers = 0; } return info; @@ -4355,7 +4667,7 @@ EXPORT_NO_SYMBOLS; - printk("%s version %s\n", driver_name, driver_version); + printk("%s %s\n", driver_name, driver_version); /* determine how many SyncLink devices are installed */ mgsl_enumerate_devices(); @@ -4423,7 +4735,7 @@ printk("%s(%d):Couldn't register callout driver\n", __FILE__,__LINE__); - printk("%s version %s, tty major#%d callout major#%d\n", + printk("%s %s, tty major#%d callout major#%d\n", driver_name, driver_version, serial_driver.major, callout_driver.major); @@ -4440,6 +4752,7 @@ } /* end of mgsl_init() */ +#ifdef MODULE int __init init_module(void) { /* Uncomment this to kernel debug module. @@ -4459,6 +4772,7 @@ unsigned long flags; int rc; struct mgsl_struct *info; + struct mgsl_struct *tmp; printk("Unloading %s: version %s\n", driver_name, driver_version); save_flags(flags); @@ -4478,7 +4792,9 @@ mgsl_sppp_delete(info); #endif mgsl_release_resources(info); + tmp = info; info = info->next_device; + kfree(tmp); } if (tmp_buf) { @@ -4487,6 +4803,7 @@ } } /* end of cleanup_module() */ +#endif /* * usc_RTCmd() @@ -4714,7 +5031,27 @@ * * 0000 0110 0000 0110 = 0x0606 */ + if (info->params.mode == MGSL_MODE_RAW) { + RegValue = 0x0001; /* Set Receive mode = external sync */ + usc_OutReg( info, IOCR, /* Set IOCR DCD is RxSync Detect Input */ + (unsigned short)((usc_InReg(info, IOCR) & ~(BIT13|BIT12)) | BIT12)); + + /* + * TxSubMode: + * CMR <15> 0 Don't send CRC on Tx Underrun + * CMR <14> x undefined + * CMR <13> 0 Send preamble before openning sync + * CMR <12> 0 Send 8-bit syncs, 1=send Syncs per TxLength + * + * TxMode: + * CMR <11-8) 0100 MonoSync + * + * 0x00 0100 xxxx xxxx 04xx + */ + RegValue |= 0x0400; + } + else { RegValue = 0x0606; if ( info->params.flags & HDLC_FLAG_UNDERRUN_ABORT15 ) @@ -4723,12 +5060,14 @@ RegValue |= BIT15; else if ( info->params.flags & HDLC_FLAG_UNDERRUN_CRC ) RegValue |= BIT15 + BIT14; + } if ( info->params.preamble != HDLC_PREAMBLE_PATTERN_NONE ) RegValue |= BIT13; } - if ( info->params.flags & HDLC_FLAG_SHARE_ZERO ) + if ( info->params.mode == MGSL_MODE_HDLC && + (info->params.flags & HDLC_FLAG_SHARE_ZERO) ) RegValue |= BIT12; if ( info->params.addr_filter != 0xff ) @@ -4768,9 +5107,9 @@ case HDLC_ENCODING_DIFF_BIPHASE_LEVEL: RegValue |= BIT15 + BIT14 + BIT13; break; } - if ( info->params.crc_type == HDLC_CRC_16_CCITT ) + if ( (info->params.crc_type & HDLC_CRC_MASK) == HDLC_CRC_16_CCITT ) RegValue |= BIT9; - else if ( info->params.crc_type == HDLC_CRC_32_CCITT ) + else if ( (info->params.crc_type & HDLC_CRC_MASK) == HDLC_CRC_32_CCITT ) RegValue |= ( BIT12 | BIT10 | BIT9 ); usc_OutReg( info, RMR, RegValue ); @@ -4845,9 +5184,9 @@ case HDLC_ENCODING_DIFF_BIPHASE_LEVEL: RegValue |= BIT15 + BIT14 + BIT13; break; } - if ( info->params.crc_type == HDLC_CRC_16_CCITT ) + if ( (info->params.crc_type & HDLC_CRC_MASK) == HDLC_CRC_16_CCITT ) RegValue |= BIT9 + BIT8; - else if ( info->params.crc_type == HDLC_CRC_32_CCITT ) + else if ( (info->params.crc_type & HDLC_CRC_MASK) == HDLC_CRC_32_CCITT ) RegValue |= ( BIT12 | BIT10 | BIT9 | BIT8); usc_OutReg( info, TMR, RegValue ); @@ -5518,7 +5857,8 @@ usc_OutReg( info, CCSR, (u16)(usc_InReg(info,CCSR) | BIT13) ); usc_RTCmd( info, RTCmd_PurgeRxFifo ); - if ( info->params.mode == MGSL_MODE_HDLC ) { + if ( info->params.mode == MGSL_MODE_HDLC || + info->params.mode == MGSL_MODE_RAW ) { /* DMA mode Transfers */ /* Program the DMA controller. */ /* Enable the DMA controller end of buffer interrupt. */ @@ -5607,9 +5947,14 @@ /* Transmit DMA buffer is loaded, so program USC */ /* to send the frame contained in the buffers. */ + FrameSize = info->tx_buffer_list[info->start_tx_dma_buffer].rcc; - - FrameSize = info->tx_buffer_list[0].rcc; + /* if operating in Raw sync mode, reset the rcc component + * of the tx dma buffer entry, otherwise, the serial controller + * will send a closing sync char after this count. + */ + if ( info->params.mode == MGSL_MODE_RAW ) + info->tx_buffer_list[info->start_tx_dma_buffer].rcc = 0; /* Program the Transmit Character Length Register (TCLR) */ /* and clear FIFO (TCC is loaded with TCLR on FIFO clear) */ @@ -5618,7 +5963,7 @@ usc_RTCmd( info, RTCmd_PurgeTxFifo ); /* Program the address of the 1st DMA Buffer Entry in linked list */ - phys_addr = info->tx_buffer_list[0].phys_entry; + phys_addr = info->tx_buffer_list[info->start_tx_dma_buffer].phys_entry; usc_OutDmaReg( info, NTARL, (u16)phys_addr ); usc_OutDmaReg( info, NTARU, (u16)(phys_addr >> 16) ); @@ -5626,6 +5971,19 @@ usc_ClearIrqPendingBits( info, TRANSMIT_STATUS ); usc_EnableInterrupts( info, TRANSMIT_STATUS ); + if ( info->params.mode == MGSL_MODE_RAW && + info->num_tx_dma_buffers > 1 ) { + /* When running external sync mode, attempt to 'stream' transmit */ + /* by filling tx dma buffers as they become available. To do this */ + /* we need to enable Tx DMA EOB Status interrupts : */ + /* */ + /* 1. Arm End of Buffer (EOB) Transmit DMA Interrupt (BIT2 of TDIAR) */ + /* 2. Enable Transmit DMA Interrupts (BIT0 of DICR) */ + + usc_OutDmaReg( info, TDIAR, BIT2|BIT3 ); + usc_OutDmaReg( info, DICR, (u16)(usc_InDmaReg(info,DICR) | BIT0) ); + } + /* Initialize Transmit DMA Channel */ usc_DmaCmd( info, DmaCmd_InitTxChannel ); @@ -6049,6 +6407,9 @@ void usc_loopback_frame( struct mgsl_struct *info ) { int i; + unsigned long oldmode = info->params.mode; + + info->params.mode = MGSL_MODE_HDLC; usc_DisableMasterIrqBit( info ); @@ -6102,6 +6463,8 @@ usc_EnableMasterIrqBit(info); + info->params.mode = oldmode; + } /* end of usc_loopback_frame() */ /* usc_set_sync_mode() Programs the USC for SDLC communications. @@ -6153,6 +6516,38 @@ info->tcsr_value += usc_idle_mode; usc_OutReg(info, TCSR, info->tcsr_value); + /* + * if SyncLink WAN adapter is running in external sync mode, the + * transmitter has been set to Monosync in order to try to mimic + * a true raw outbound bit stream. Monosync still sends an open/close + * sync char at the start/end of a frame. Try to match those sync + * patterns to the idle mode set here + */ + if ( info->params.mode == MGSL_MODE_RAW ) { + unsigned char syncpat = 0; + switch( info->idle_mode ) { + case HDLC_TXIDLE_FLAGS: + syncpat = 0x7e; + break; + case HDLC_TXIDLE_ALT_ZEROS_ONES: + syncpat = 0x55; + break; + case HDLC_TXIDLE_ZEROS: + case HDLC_TXIDLE_SPACE: + syncpat = 0x00; + break; + case HDLC_TXIDLE_ONES: + case HDLC_TXIDLE_MARK: + syncpat = 0xff; + break; + case HDLC_TXIDLE_ALT_MARK_SPACE: + syncpat = 0xaa; + break; + } + + usc_SetTransmitSyncChars(info,syncpat,syncpat); + } + } /* end of usc_set_txidle() */ /* usc_get_serial_signals() @@ -6330,6 +6725,48 @@ */ /* + * mgsl_reset_tx_dma_buffers() + * + * Set the count for all transmit buffers to 0 to indicate the + * buffer is available for use and set the current buffer to the + * first buffer. This effectively makes all buffers free and + * discards any data in buffers. + * + * Arguments: info pointer to device instance data + * Return Value: None + */ +void mgsl_reset_tx_dma_buffers( struct mgsl_struct *info ) +{ + unsigned int i; + + for ( i = 0; i < info->tx_buffer_count; i++ ) { + *((unsigned long *)&(info->tx_buffer_list[i].count)) = 0; + } + + info->current_tx_buffer = 0; + info->start_tx_dma_buffer = 0; + info->tx_dma_buffers_used = 0; + + info->get_tx_holding_index = 0; + info->put_tx_holding_index = 0; + info->tx_holding_count = 0; + +} /* end of mgsl_reset_tx_dma_buffers() */ + +/* + * num_free_tx_dma_buffers() + * + * returns the number of free tx dma buffers available + * + * Arguments: info pointer to device instance data + * Return Value: number of free tx dma buffers + */ +int num_free_tx_dma_buffers(struct mgsl_struct *info) +{ + return info->tx_buffer_count - info->tx_dma_buffers_used; +} + +/* * mgsl_reset_rx_dma_buffers() * * Set the count for all receive buffers to DMABUFFERSIZE @@ -6415,10 +6852,11 @@ unsigned int StartIndex, EndIndex; /* index of 1st and last buffers of Rx frame */ unsigned short status; DMABUFFERENTRY *pBufEntry; - unsigned int framesize; + unsigned int framesize = 0; int ReturnCode = 0; unsigned long flags; struct tty_struct *tty = info->tty; + int return_frame = 0; /* * current_rx_buffer points to the 1st buffer of the next available @@ -6474,14 +6912,20 @@ info->icount.rxabort++; else if ( status & RXSTATUS_OVERRUN ) info->icount.rxover++; - else + else { info->icount.rxcrc++; + if ( info->params.crc_type & HDLC_CRC_RETURN_EX ) + return_frame = 1; + } framesize = 0; #ifdef CONFIG_SYNCLINK_SYNCPPP info->netstats.rx_errors++; info->netstats.rx_frame_errors++; #endif - } else { + } else + return_frame = 1; + + if ( return_frame ) { /* receive frame has no errors, get frame size. * The frame size is the starting value of the RCC (which was * set to 0xffff) minus the ending value of the RCC (decremented @@ -6506,7 +6950,9 @@ MIN(framesize,DMABUFFERSIZE),0); if (framesize) { - if (framesize > info->max_frame_size) + if ( ( (info->params.crc_type & HDLC_CRC_RETURN_EX) && + ((framesize+1) > info->max_frame_size) ) || + (framesize > info->max_frame_size) ) info->icount.rxlong++; else { /* copy dma buffer(s) to contiguous intermediate buffer */ @@ -6514,6 +6960,7 @@ int index = StartIndex; unsigned char *ptmp = info->intermediate_rxbuffer; + if ( !(status & RXSTATUS_CRC_ERROR)) info->icount.rxok++; while(copy_count) { @@ -6532,6 +6979,19 @@ index = 0; } + if ( info->params.crc_type & HDLC_CRC_RETURN_EX ) { + ++framesize; + *ptmp = (status & RXSTATUS_CRC_ERROR ? + RX_CRC_ERROR : + RX_OK); + + if ( debug_level >= DEBUG_LEVEL_DATA ) + printk("%s(%d):mgsl_get_rx_frame(%s) rx frame status=%d\n", + __FILE__,__LINE__,info->device_name, + *ptmp); + } + + #ifdef CONFIG_SYNCLINK_SYNCPPP if (info->netcount) { /* pass frame to syncppp device */ @@ -6541,6 +7001,7 @@ #endif { /* Call the line discipline receive callback directly. */ + if ( tty && tty->ldisc.receive_buf ) tty->ldisc.receive_buf(tty, info->intermediate_rxbuffer, info->flag_buf, framesize); } } @@ -6570,6 +7031,180 @@ } /* end of mgsl_get_rx_frame() */ +/* mgsl_get_raw_rx_frame() + * + * This function attempts to return a received frame from the + * receive DMA buffers when running in external loop mode. In this mode, + * we will return at most one DMABUFFERSIZE frame to the application. + * The USC receiver is triggering off of DCD going active to start a new + * frame, and DCD going inactive to terminate the frame (similar to + * processing a closing flag character). + * + * In this routine, we will return DMABUFFERSIZE "chunks" at a time. + * If DCD goes inactive, the last Rx DMA Buffer will have a non-zero + * status field and the RCC field will indicate the length of the + * entire received frame. We take this RCC field and get the modulus + * of RCC and DMABUFFERSIZE to determine if number of bytes in the + * last Rx DMA buffer and return that last portion of the frame. + * + * Arguments: info pointer to device extension + * Return Value: 1 if frame returned, otherwise 0 + */ +int mgsl_get_raw_rx_frame(struct mgsl_struct *info) +{ + unsigned int CurrentIndex, NextIndex; + unsigned short status; + DMABUFFERENTRY *pBufEntry; + unsigned int framesize = 0; + int ReturnCode = 0; + unsigned long flags; + struct tty_struct *tty = info->tty; + + /* + * current_rx_buffer points to the 1st buffer of the next available + * receive frame. The status field is set by the 16C32 after + * completing a receive frame. If the status field of this buffer + * is zero, either the USC is still filling this buffer or this + * is one of a series of buffers making up a received frame. + * + * If the count field of this buffer is zero, the USC is either + * using this buffer or has used this buffer. Look at the count + * field of the next buffer. If that next buffer's count is + * non-zero, the USC is still actively using the current buffer. + * Otherwise, if the next buffer's count field is zero, the + * current buffer is complete and the USC is using the next + * buffer. + */ + CurrentIndex = NextIndex = info->current_rx_buffer; + ++NextIndex; + if ( NextIndex == info->rx_buffer_count ) + NextIndex = 0; + + if ( info->rx_buffer_list[CurrentIndex].status != 0 || + (info->rx_buffer_list[CurrentIndex].count == 0 && + info->rx_buffer_list[NextIndex].count == 0)) { + /* + * Either the status field of this dma buffer is non-zero + * (indicating the last buffer of a receive frame) or the next + * buffer is marked as in use -- implying this buffer is complete + * and an intermediate buffer for this received frame. + */ + + status = info->rx_buffer_list[CurrentIndex].status; + + if ( status & (RXSTATUS_SHORT_FRAME + RXSTATUS_OVERRUN + + RXSTATUS_CRC_ERROR + RXSTATUS_ABORT) ) { + if ( status & RXSTATUS_SHORT_FRAME ) + info->icount.rxshort++; + else if ( status & RXSTATUS_ABORT ) + info->icount.rxabort++; + else if ( status & RXSTATUS_OVERRUN ) + info->icount.rxover++; + else + info->icount.rxcrc++; + framesize = 0; + } else { + /* + * A receive frame is available, get frame size and status. + * + * The frame size is the starting value of the RCC (which was + * set to 0xffff) minus the ending value of the RCC (decremented + * once for each receive character) minus 2 or 4 for the 16-bit + * or 32-bit CRC. + * + * If the status field is zero, this is an intermediate buffer. + * It's size is 4K. + * + * If the DMA Buffer Entry's Status field is non-zero, the + * receive operation completed normally (ie: DCD dropped). The + * RCC field is valid and holds the received frame size. + * It is possible that the RCC field will be zero on a DMA buffer + * entry with a non-zero status. This can occur if the total + * frame size (number of bytes between the time DCD goes active + * to the time DCD goes inactive) exceeds 65535 bytes. In this + * case the 16C32 has underrun on the RCC count and appears to + * stop updating this counter to let us know the actual received + * frame size. If this happens (non-zero status and zero RCC), + * simply return the entire RxDMA Buffer + */ + if ( status ) { + /* + * In the event that the final RxDMA Buffer is + * terminated with a non-zero status and the RCC + * field is zero, we interpret this as the RCC + * having underflowed (received frame > 65535 bytes). + * + * Signal the event to the user by passing back + * a status of RxStatus_CrcError returning the full + * buffer and let the app figure out what data is + * actually valid + */ + if ( info->rx_buffer_list[CurrentIndex].rcc ) + framesize = RCLRVALUE - info->rx_buffer_list[CurrentIndex].rcc; + else + framesize = DMABUFFERSIZE; + } + else + framesize = DMABUFFERSIZE; + } + + if ( framesize > DMABUFFERSIZE ) { + /* + * if running in raw sync mode, ISR handler for + * End Of Buffer events terminates all buffers at 4K. + * If this frame size is said to be >4K, get the + * actual number of bytes of the frame in this buffer. + */ + framesize = framesize % DMABUFFERSIZE; + } + + + if ( debug_level >= DEBUG_LEVEL_BH ) + printk("%s(%d):mgsl_get_raw_rx_frame(%s) status=%04X size=%d\n", + __FILE__,__LINE__,info->device_name,status,framesize); + + if ( debug_level >= DEBUG_LEVEL_DATA ) + mgsl_trace_block(info,info->rx_buffer_list[CurrentIndex].virt_addr, + MIN(framesize,DMABUFFERSIZE),0); + + if (framesize) { + /* copy dma buffer(s) to contiguous intermediate buffer */ + /* NOTE: we never copy more than DMABUFFERSIZE bytes */ + + pBufEntry = &(info->rx_buffer_list[CurrentIndex]); + memcpy( info->intermediate_rxbuffer, pBufEntry->virt_addr, framesize); + info->icount.rxok++; + + /* Call the line discipline receive callback directly. */ + if ( tty && tty->ldisc.receive_buf ) + tty->ldisc.receive_buf(tty, info->intermediate_rxbuffer, info->flag_buf, framesize); + } + + /* Free the buffers used by this frame. */ + mgsl_free_rx_frame_buffers( info, CurrentIndex, CurrentIndex ); + + ReturnCode = 1; + } + + + if ( info->rx_enabled && info->rx_overflow ) { + /* The receiver needs to restarted because of + * a receive overflow (buffer or FIFO). If the + * receive buffers are now empty, then restart receiver. + */ + + if ( !info->rx_buffer_list[CurrentIndex].status && + info->rx_buffer_list[CurrentIndex].count ) { + spin_lock_irqsave(&info->irq_spinlock,flags); + usc_start_receiver(info); + spin_unlock_irqrestore(&info->irq_spinlock,flags); + } + } + + return ReturnCode; + +} /* end of mgsl_get_raw_rx_frame() */ + /* mgsl_load_tx_dma_buffer() * * Load the transmit DMA buffer with the specified data. @@ -6599,12 +7234,19 @@ info->cmr_value |= BIT13; } + /* begin loading the frame in the next available tx dma + * buffer, remember it's starting location for setting + * up tx dma operation + */ + i = info->current_tx_buffer; + info->start_tx_dma_buffer = i; + /* Setup the status and RCC (Frame Size) fields of the 1st */ /* buffer entry in the transmit DMA buffer list. */ - info->tx_buffer_list[0].status = info->cmr_value & 0xf000; - info->tx_buffer_list[0].rcc = BufferSize; - info->tx_buffer_list[0].count = BufferSize; + info->tx_buffer_list[i].status = info->cmr_value & 0xf000; + info->tx_buffer_list[i].rcc = BufferSize; + info->tx_buffer_list[i].count = BufferSize; /* Copy frame data from 1st source buffer to the DMA buffers. */ /* The frame data may span multiple DMA buffers. */ @@ -6613,6 +7255,9 @@ /* Get a pointer to next DMA buffer entry. */ pBufEntry = &info->tx_buffer_list[i++]; + if ( i == info->tx_buffer_count ) + i=0; + /* Calculate the number of bytes that can be copied from */ /* the source buffer to this DMA buffer. */ if ( BufferSize > DMABUFFERSIZE ) @@ -6632,8 +7277,13 @@ /* Advance source pointer and reduce remaining data count. */ Buffer += Copycount; BufferSize -= Copycount; + + ++info->tx_dma_buffers_used; } + /* remember next available tx dma buffer */ + info->current_tx_buffer = i; + } /* end of mgsl_load_tx_dma_buffer() */ /* @@ -6764,7 +7414,7 @@ unsigned int i; char *TmpPtr; BOOLEAN rc = TRUE; - unsigned short status; + unsigned short status=0; unsigned long EndTime; unsigned long flags; MGSL_PARAMS tmp_params; @@ -7021,7 +7671,7 @@ status = info->rx_buffer_list[0].status; if ( status & (BIT8 + BIT3 + BIT1) ) { - /* receive error has occured */ + /* receive error has occurred */ rc = FALSE; } else { if ( memcmp( info->tx_buffer_list[0].virt_addr , @@ -7242,7 +7892,9 @@ if ( debug_level >= DEBUG_LEVEL_INFO ) printk( "%s(%d):mgsl_tx_timeout(%s)\n", __FILE__,__LINE__,info->device_name); - if(info->tx_active && info->params.mode == MGSL_MODE_HDLC) { + if(info->tx_active && + (info->params.mode == MGSL_MODE_HDLC || + info->params.mode == MGSL_MODE_RAW) ) { info->icount.txtimeout++; } spin_lock_irqsave(&info->irq_spinlock,flags); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/toshiba.c linux.20p6/drivers/char/toshiba.c --- linux.vanilla/drivers/char/toshiba.c Sun Mar 25 18:45:19 2001 +++ linux.20p6/drivers/char/toshiba.c Fri May 4 23:22:21 2001 @@ -60,10 +60,8 @@ #define TOSH_VERSION "1.9 22/3/2001" #define TOSH_DEBUG 0 -#ifdef MODULE #include #include -#endif #include #include #include @@ -78,7 +76,7 @@ #include #endif -#include"toshiba.h" +#include #define TOSH_MINOR_DEV 181 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/tty_io.c linux.20p6/drivers/char/tty_io.c --- linux.vanilla/drivers/char/tty_io.c Sun Mar 25 17:31:24 2001 +++ linux.20p6/drivers/char/tty_io.c Tue Jun 19 09:39:08 2001 @@ -2244,5 +2244,11 @@ #ifdef CONFIG_VT vcs_init(); #endif +#ifdef CONFIG_SYNCLINK + mgsl_init(); +#endif +#ifdef CONFIG_N_HDLC + n_hdlc_init(); +#endif return 0; } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/char/wdt_pci.c linux.20p6/drivers/char/wdt_pci.c --- linux.vanilla/drivers/char/wdt_pci.c Sun Mar 25 17:31:29 2001 +++ linux.20p6/drivers/char/wdt_pci.c Tue Jun 19 09:59:54 2001 @@ -149,7 +149,7 @@ * * Handle an interrupt from the board. These are raised when the status * map changes in what the board considers an interesting way. That means - * a failure condition occuring. + * a failure condition occurring. */ static void wdtpci_interrupt(int irq, void *dev_id, struct pt_regs *regs) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/i2o/i2o_scsi.c linux.20p6/drivers/i2o/i2o_scsi.c --- linux.vanilla/drivers/i2o/i2o_scsi.c Sun Mar 25 17:31:44 2001 +++ linux.20p6/drivers/i2o/i2o_scsi.c Tue Jun 19 09:59:54 2001 @@ -266,7 +266,7 @@ if(st) { - /* An error has occured */ + /* An error has occurred */ dprintk((KERN_DEBUG "SCSI error %08X", m[4])); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/Config.in linux.20p6/drivers/isdn/Config.in --- linux.vanilla/drivers/isdn/Config.in Sun Mar 25 17:37:31 2001 +++ linux.20p6/drivers/isdn/Config.in Mon Jun 25 14:24:37 2001 @@ -132,7 +132,7 @@ dep_tristate ' AVM T1/T1-B ISA support' CONFIG_ISDN_DRV_AVMB1_T1ISA $CONFIG_ISDN_CAPI dep_tristate ' AVM B1/M1/M2 PCMCIA support' CONFIG_ISDN_DRV_AVMB1_B1PCMCIA $CONFIG_ISDN_CAPI $CONFIG_PCMCIA dep_tristate ' AVM T1/T1-B PCI support' CONFIG_ISDN_DRV_AVMB1_T1PCI $CONFIG_ISDN_CAPI $CONFIG_PCI - dep_tristate ' AVM C4 support' CONFIG_ISDN_DRV_AVMB1_C4 $CONFIG_ISDN_CAPI $CONFIG_PCI + dep_tristate ' AVM C4/C2 support' CONFIG_ISDN_DRV_AVMB1_C4 $CONFIG_ISDN_CAPI $CONFIG_PCI fi # HYSDN diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/act2000/act2000.h linux.20p6/drivers/isdn/act2000/act2000.h --- linux.vanilla/drivers/isdn/act2000/act2000.h Sun Mar 25 17:37:31 2001 +++ linux.20p6/drivers/isdn/act2000/act2000.h Mon Jun 25 14:55:42 2001 @@ -1,4 +1,4 @@ -/* $Id: act2000.h,v 1.8.6.1 2001/02/10 14:41:20 kai Exp $ +/* $Id: act2000.h,v 1.8.6.2 2001/02/16 16:43:23 kai Exp $ * * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000. * diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/act2000/capi.c linux.20p6/drivers/isdn/act2000/capi.c --- linux.vanilla/drivers/isdn/act2000/capi.c Sun Mar 25 17:37:31 2001 +++ linux.20p6/drivers/isdn/act2000/capi.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: capi.c,v 1.9 2000/11/12 16:32:06 kai Exp $ +/* $Id: capi.c,v 1.9.6.1 2001/02/16 16:43:23 kai Exp $ * * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000. * CAPI encoder/decoder @@ -124,7 +124,7 @@ m->hdr.cmd.cmd = c; \ m->hdr.cmd.subcmd = s; \ m->hdr.msgnum = actcapi_nextsmsg(card); \ - } \ + } else m = NULL;\ } #define ACTCAPI_CHKSKB if (!skb) { \ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/act2000/capi.h linux.20p6/drivers/isdn/act2000/capi.h --- linux.vanilla/drivers/isdn/act2000/capi.h Sun Mar 25 17:37:31 2001 +++ linux.20p6/drivers/isdn/act2000/capi.h Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: capi.h,v 1.6 2000/11/12 16:32:06 kai Exp $ +/* $Id: capi.h,v 1.6.6.1 2001/02/16 16:43:23 kai Exp $ * * ISDN lowlevel-module for the IBM ISDN-S0 Active 2000. * @@ -44,7 +44,7 @@ char *description; } actcapi_msgdsc; -/* CAPI Adress */ +/* CAPI Address */ typedef struct actcapi_addr { __u8 len; /* Length of element */ __u8 tnp; /* Type/Numbering Plan */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/avmcard.h linux.20p6/drivers/isdn/avmb1/avmcard.h --- linux.vanilla/drivers/isdn/avmb1/avmcard.h Sun Mar 25 17:37:31 2001 +++ linux.20p6/drivers/isdn/avmb1/avmcard.h Mon Jun 25 14:24:39 2001 @@ -1,57 +1,8 @@ /* - * $Id: avmcard.h,v 1.8 2000/10/10 17:44:19 kai Exp $ + * $Id: avmcard.h,v 1.8.6.3 2001/05/17 21:15:33 kai Exp $ * * Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de) * - * $Log: avmcard.h,v $ - * Revision 1.8 2000/10/10 17:44:19 kai - * changes from/for 2.2.18 - * - * Revision 1.7 2000/01/25 14:33:38 calle - * - Added Support AVM B1 PCI V4.0 (tested with prototype) - * - splitted up t1pci.c into b1dma.c for common function with b1pciv4 - * - support for revision register - * - * Revision 1.6 1999/11/05 16:38:01 calle - * Cleanups before kernel 2.4: - * - Changed all messages to use card->name or driver->name instead of - * constant string. - * - Moved some data from struct avmcard into new struct avmctrl_info. - * Changed all lowlevel capi driver to match the new structur. - * - * Revision 1.5 1999/09/07 09:02:53 calle - * SETDATA removed. Now inside the kernel the datapart of DATA_B3_REQ and - * DATA_B3_IND is always directly after the CAPI message. The "Data" member - * ist never used inside the kernel. - * - * Revision 1.4 1999/08/04 10:10:08 calle - * Bugfix: corrected /proc functions, added structure for new AVM cards. - * - * Revision 1.3 1999/07/23 08:41:47 calle - * prepared for new AVM cards. - * - * Revision 1.2 1999/07/05 15:09:45 calle - * - renamed "appl_release" to "appl_released". - * - version und profile data now cleared on controller reset - * - extended /proc interface, to allow driver and controller specific - * informations to include by driver hackers. - * - * Revision 1.1 1999/07/01 15:26:22 calle - * complete new version (I love it): - * + new hardware independed "capi_driver" interface that will make it easy to: - * - support other controllers with CAPI-2.0 (i.e. USB Controller) - * - write a CAPI-2.0 for the passive cards - * - support serial link CAPI-2.0 boxes. - * + wrote "capi_driver" for all supported cards. - * + "capi_driver" (supported cards) now have to be configured with - * make menuconfig, in the past all supported cards where included - * at once. - * + new and better informations in /proc/capi/ - * + new ioctl to switch trace of capi messages per controller - * using "avmcapictrl trace [contr] on|off|...." - * + complete testcircle with all supported cards and also the - * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done. - * */ #ifndef _AVMCARD_H_ @@ -59,7 +10,6 @@ #define AVMB1_PORTLEN 0x1f #define AVM_MAXVERSION 8 -#define AVM_NAPPS 30 #define AVM_NCCI_PER_CHANNEL 4 /* @@ -83,7 +33,8 @@ avm_m2, avm_t1isa, avm_t1pci, - avm_c4 + avm_c4, + avm_c2 }; typedef struct avmcard_dmainfo { diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/b1.c linux.20p6/drivers/isdn/avmb1/b1.c --- linux.vanilla/drivers/isdn/avmb1/b1.c Sun Mar 25 17:37:31 2001 +++ linux.20p6/drivers/isdn/avmb1/b1.c Mon Jun 25 14:24:39 2001 @@ -1,105 +1,9 @@ /* - * $Id: b1.c,v 1.20.6.1 2001/02/13 11:43:29 kai Exp $ + * $Id: b1.c,v 1.20.6.6 2001/05/17 21:15:33 kai Exp $ * * Common module for AVM B1 cards. * * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de) - * - * $Log: b1.c,v $ - * Revision 1.20.6.1 2001/02/13 11:43:29 kai - * more compatility changes for 2.2.19 - * - * Revision 1.20 2000/11/23 20:45:14 kai - * fixed module_init/exit stuff - * Note: compiled-in kernel doesn't work pre 2.2.18 anymore. - * - * Revision 1.19 2000/11/19 17:02:47 kai - * compatibility cleanup - part 3 - * - * Revision 1.18 2000/11/19 17:01:53 kai - * compatibility cleanup - part 2 - * - * Revision 1.17 2000/11/01 14:05:02 calle - * - use module_init/module_exit from linux/init.h. - * - all static struct variables are initialized with "membername:" now. - * - avm_cs.c, let it work with newer pcmcia-cs. - * - * Revision 1.16 2000/08/04 15:36:31 calle - * copied wrong from file to file :-( - * - * Revision 1.15 2000/08/04 12:20:08 calle - * - Fix unsigned/signed warning in the right way ... - * - * Revision 1.14 2000/06/19 16:51:53 keil - * don't free skb in irq context - * - * Revision 1.13 2000/01/25 14:33:38 calle - * - Added Support AVM B1 PCI V4.0 (tested with prototype) - * - splitted up t1pci.c into b1dma.c for common function with b1pciv4 - * - support for revision register - * - * Revision 1.12 1999/11/05 16:38:01 calle - * Cleanups before kernel 2.4: - * - Changed all messages to use card->name or driver->name instead of - * constant string. - * - Moved some data from struct avmcard into new struct avmctrl_info. - * Changed all lowlevel capi driver to match the new structur. - * - * Revision 1.11 1999/10/11 22:04:12 keil - * COMPAT_NEED_UACCESS (no include in isdn_compat.h) - * - * Revision 1.10 1999/09/15 08:16:03 calle - * Implementation of 64Bit extention complete. - * - * Revision 1.9 1999/09/07 09:02:53 calle - * SETDATA removed. Now inside the kernel the datapart of DATA_B3_REQ and - * DATA_B3_IND is always directly after the CAPI message. The "Data" member - * ist never used inside the kernel. - * - * Revision 1.8 1999/08/22 20:26:22 calle - * backported changes from kernel 2.3.14: - * - several #include "config.h" gone, others come. - * - "struct device" changed to "struct net_device" in 2.3.14, added a - * define in isdn_compat.h for older kernel versions. - * - * Revision 1.7 1999/08/04 10:10:09 calle - * Bugfix: corrected /proc functions, added structure for new AVM cards. - * - * Revision 1.6 1999/07/23 08:51:04 calle - * small fix and typo in checkin before. - * - * Revision 1.5 1999/07/23 08:41:48 calle - * prepared for new AVM cards. - * - * Revision 1.4 1999/07/09 15:05:38 keil - * compat.h is now isdn_compat.h - * - * Revision 1.3 1999/07/06 07:41:59 calle - * - changes in /proc interface - * - check and changed calls to [dev_]kfree_skb and [dev_]alloc_skb. - * - * Revision 1.2 1999/07/05 15:09:47 calle - * - renamed "appl_release" to "appl_released". - * - version und profile data now cleared on controller reset - * - extended /proc interface, to allow driver and controller specific - * informations to include by driver hackers. - * - * Revision 1.1 1999/07/01 15:26:23 calle - * complete new version (I love it): - * + new hardware independed "capi_driver" interface that will make it easy to: - * - support other controllers with CAPI-2.0 (i.e. USB Controller) - * - write a CAPI-2.0 for the passive cards - * - support serial link CAPI-2.0 boxes. - * + wrote "capi_driver" for all supported cards. - * + "capi_driver" (supported cards) now have to be configured with - * make menuconfig, in the past all supported cards where included - * at once. - * + new and better informations in /proc/capi/ - * + new ioctl to switch trace of capi messages per controller - * using "avmcapictrl trace [contr] on|off|...." - * + complete testcircle with all supported cards and also the - * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done. - * * */ @@ -111,15 +15,18 @@ #include #include #include +#include #include #include +#include #include +#include #include "capilli.h" #include "avmcard.h" #include "capicmd.h" #include "capiutil.h" -static char *revision = "$Revision: 1.20.6.1 $"; +static char *revision = "$Revision: 1.20.6.6 $"; /* ------------------------------------------------------------- */ @@ -364,7 +271,7 @@ cli(); b1_setinterrupt(port, card->irq, card->cardtype); b1_put_byte(port, SEND_INIT); - b1_put_word(port, AVM_NAPPS); + b1_put_word(port, CAPI_MAXAPPL); b1_put_word(port, AVM_NCCI_PER_CHANNEL*2); b1_put_word(port, ctrl->cnr - 1); restore_flags(flags); @@ -679,6 +586,7 @@ case avm_t1isa: s = "T1 ISA (HEMA)"; break; case avm_t1pci: s = "T1 PCI"; break; case avm_c4: s = "C4"; break; + case avm_c2: s = "C2"; break; default: s = "???"; break; } len += sprintf(page+len, "%-16s %s\n", "type", s); @@ -749,12 +657,13 @@ static int __init b1_init(void) { char *p; - char rev[10]; + char rev[32]; - if ((p = strchr(revision, ':'))) { - strncpy(rev, p + 1, sizeof(rev)); - p = strchr(rev, '$'); - *p = 0; + if ((p = strchr(revision, ':')) != 0 && p[1]) { + strncpy(rev, p + 2, sizeof(rev)); + rev[sizeof(rev)-1] = 0; + if ((p = strchr(rev, '$')) != 0 && p > rev) + *(p-1) = 0; } else strcpy(rev, "1.0"); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/b1dma.c linux.20p6/drivers/isdn/avmb1/b1dma.c --- linux.vanilla/drivers/isdn/avmb1/b1dma.c Sun Mar 25 17:37:31 2001 +++ linux.20p6/drivers/isdn/avmb1/b1dma.c Mon Jun 25 14:24:39 2001 @@ -1,50 +1,10 @@ /* - * $Id: b1dma.c,v 1.11.6.1 2001/02/13 11:43:29 kai Exp $ + * $Id: b1dma.c,v 1.11.6.6 2001/05/17 21:15:33 kai Exp $ * * Common module for AVM B1 cards that support dma with AMCC * * (c) Copyright 2000 by Carsten Paeth (calle@calle.in-berlin.de) * - * $Log: b1dma.c,v $ - * Revision 1.11.6.1 2001/02/13 11:43:29 kai - * more compatility changes for 2.2.19 - * - * Revision 1.11 2000/11/19 17:02:47 kai - * compatibility cleanup - part 3 - * - * Revision 1.10 2000/11/19 17:01:53 kai - * compatibility cleanup - part 2 - * - * Revision 1.9 2000/11/01 14:05:02 calle - * - use module_init/module_exit from linux/init.h. - * - all static struct variables are initialized with "membername:" now. - * - avm_cs.c, let it work with newer pcmcia-cs. - * - * Revision 1.8 2000/10/10 17:44:19 kai - * changes from/for 2.2.18 - * - * Revision 1.7 2000/08/04 12:20:08 calle - * - Fix unsigned/signed warning in the right way ... - * - * Revision 1.6 2000/06/29 13:59:06 calle - * Bugfix: reinit txdma without interrupt will confuse some AMCC chips. - * - * Revision 1.5 2000/06/19 16:51:53 keil - * don't free skb in irq context - * - * Revision 1.4 2000/04/03 16:38:05 calle - * made suppress_pollack static. - * - * Revision 1.3 2000/02/26 01:00:53 keil - * changes from 2.3.47 - * - * Revision 1.2 2000/01/25 14:44:47 calle - * typo in b1pciv4_detect(). - * - * Revision 1.1 2000/01/25 14:36:43 calle - * common function for T1 PCI and B1 PCI V4. - * - * */ #include @@ -56,15 +16,18 @@ #include #include #include +#include #include #include +#include #include +#include #include "capilli.h" #include "avmcard.h" #include "capicmd.h" #include "capiutil.h" -static char *revision = "$Revision: 1.11.6.1 $"; +static char *revision = "$Revision: 1.11.6.6 $"; /* ------------------------------------------------------------- */ @@ -721,7 +684,7 @@ _put_byte(&p, 0); _put_byte(&p, 0); _put_byte(&p, SEND_INIT); - _put_word(&p, AVM_NAPPS); + _put_word(&p, CAPI_MAXAPPL); _put_word(&p, AVM_NCCI_PER_CHANNEL*30); _put_word(&p, card->cardnr - 1); skb_put(skb, (__u8 *)p - (__u8 *)skb->data); @@ -900,6 +863,7 @@ case avm_t1isa: s = "T1 ISA (HEMA)"; break; case avm_t1pci: s = "T1 PCI"; break; case avm_c4: s = "C4"; break; + case avm_c2: s = "C2"; break; default: s = "???"; break; } len += sprintf(page+len, "%-16s %s\n", "type", s); @@ -990,12 +954,13 @@ int b1dma_init(void) { char *p; - char rev[10]; + char rev[32]; - if ((p = strchr(revision, ':'))) { - strncpy(rev, p + 1, sizeof(rev)); - p = strchr(rev, '$'); - *p = 0; + if ((p = strchr(revision, ':')) != 0 && p[1]) { + strncpy(rev, p + 2, sizeof(rev)); + rev[sizeof(rev)-1] = 0; + if ((p = strchr(rev, '$')) != 0 && p > rev) + *(p-1) = 0; } else strcpy(rev, "1.0"); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/b1isa.c linux.20p6/drivers/isdn/avmb1/b1isa.c --- linux.vanilla/drivers/isdn/avmb1/b1isa.c Sun Mar 25 17:37:31 2001 +++ linux.20p6/drivers/isdn/avmb1/b1isa.c Mon Jun 25 14:24:29 2001 @@ -1,74 +1,10 @@ /* - * $Id: b1isa.c,v 1.10.6.1 2001/02/13 11:43:29 kai Exp $ + * $Id: b1isa.c,v 1.10.6.5 2001/05/17 20:41:51 kai Exp $ * * Module for AVM B1 ISA-card. * * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de) * - * $Log: b1isa.c,v $ - * Revision 1.10.6.1 2001/02/13 11:43:29 kai - * more compatility changes for 2.2.19 - * - * Revision 1.10 2000/11/23 20:45:14 kai - * fixed module_init/exit stuff - * Note: compiled-in kernel doesn't work pre 2.2.18 anymore. - * - * Revision 1.9 2000/11/01 14:05:02 calle - * - use module_init/module_exit from linux/init.h. - * - all static struct variables are initialized with "membername:" now. - * - avm_cs.c, let it work with newer pcmcia-cs. - * - * Revision 1.8 2000/04/03 13:29:24 calle - * make Tim Waugh happy (module unload races in 2.3.99-pre3). - * no real problem there, but now it is much cleaner ... - * - * Revision 1.7 2000/02/02 18:36:03 calle - * - Modules are now locked while init_module is running - * - fixed problem with memory mapping if address is not aligned - * - * Revision 1.6 2000/01/25 14:37:39 calle - * new message after successfull detection including card revision and - * used resources. - * - * Revision 1.5 1999/11/05 16:38:01 calle - * Cleanups before kernel 2.4: - * - Changed all messages to use card->name or driver->name instead of - * constant string. - * - Moved some data from struct avmcard into new struct avmctrl_info. - * Changed all lowlevel capi driver to match the new structur. - * - * Revision 1.4 1999/08/22 20:26:24 calle - * backported changes from kernel 2.3.14: - * - several #include "config.h" gone, others come. - * - "struct device" changed to "struct net_device" in 2.3.14, added a - * define in isdn_compat.h for older kernel versions. - * - * Revision 1.3 1999/07/09 15:05:40 keil - * compat.h is now isdn_compat.h - * - * Revision 1.2 1999/07/05 15:09:49 calle - * - renamed "appl_release" to "appl_released". - * - version und profile data now cleared on controller reset - * - extended /proc interface, to allow driver and controller specific - * informations to include by driver hackers. - * - * Revision 1.1 1999/07/01 15:26:27 calle - * complete new version (I love it): - * + new hardware independed "capi_driver" interface that will make it easy to: - * - support other controllers with CAPI-2.0 (i.e. USB Controller) - * - write a CAPI-2.0 for the passive cards - * - support serial link CAPI-2.0 boxes. - * + wrote "capi_driver" for all supported cards. - * + "capi_driver" (supported cards) now have to be configured with - * make menuconfig, in the past all supported cards where included - * at once. - * + new and better informations in /proc/capi/ - * + new ioctl to switch trace of capi messages per controller - * using "avmcapictrl trace [contr] on|off|...." - * + complete testcircle with all supported cards and also the - * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done. - * - * */ #include @@ -81,12 +17,13 @@ #include #include #include +#include #include "capicmd.h" #include "capiutil.h" #include "capilli.h" #include "avmcard.h" -static char *revision = "$Revision: 1.10.6.1 $"; +static char *revision = "$Revision: 1.10.6.5 $"; /* ------------------------------------------------------------- */ @@ -281,11 +218,12 @@ MOD_INC_USE_COUNT; - if ((p = strchr(revision, ':'))) { - strncpy(driver->revision, p + 1, sizeof(driver->revision)); - p = strchr(driver->revision, '$'); - *p = 0; - } + if ((p = strchr(revision, ':')) != 0 && p[1]) { + strncpy(driver->revision, p + 2, sizeof(driver->revision)); + driver->revision[sizeof(driver->revision)-1] = 0; + if ((p = strchr(driver->revision, '$')) != 0 && p > driver->revision) + *(p-1) = 0; + } printk(KERN_INFO "%s: revision %s\n", driver->name, driver->revision); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/b1pci.c linux.20p6/drivers/isdn/avmb1/b1pci.c --- linux.vanilla/drivers/isdn/avmb1/b1pci.c Sun Mar 25 17:37:31 2001 +++ linux.20p6/drivers/isdn/avmb1/b1pci.c Mon Jun 25 14:24:39 2001 @@ -1,105 +1,10 @@ /* - * $Id: b1pci.c,v 1.29.6.1 2000/11/28 12:02:45 kai Exp $ + * $Id: b1pci.c,v 1.29.6.4 2001/05/17 20:41:51 kai Exp $ * * Module for AVM B1 PCI-card. * * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de) * - * $Log: b1pci.c,v $ - * Revision 1.29.6.1 2000/11/28 12:02:45 kai - * MODULE_DEVICE_TABLE for 2.4 - * - * Revision 1.29.2.2 2000/11/26 17:47:53 kai - * added PCI_DEV_TABLE for 2.4 - * - * Revision 1.29.2.1 2000/11/26 17:14:19 kai - * fix device ids - * also needs patches to include/linux/pci_ids.h - * - * Revision 1.29 2000/11/23 20:45:14 kai - * fixed module_init/exit stuff - * Note: compiled-in kernel doesn't work pre 2.2.18 anymore. - * - * Revision 1.28 2000/11/01 14:05:02 calle - * - use module_init/module_exit from linux/init.h. - * - all static struct variables are initialized with "membername:" now. - * - avm_cs.c, let it work with newer pcmcia-cs. - * - * Revision 1.27 2000/08/08 09:24:19 calle - * calls to pci_enable_device surounded by #ifndef COMPAT_HAS_2_2_PCI - * - * Revision 1.26 2000/07/20 10:21:21 calle - * Bugfix: driver will not be unregistered, if not cards were detected. - * this result in an oops in kcapi.c - * - * Revision 1.25 2000/05/29 12:29:18 keil - * make pci_enable_dev compatible to 2.2 kernel versions - * - * Revision 1.24 2000/05/19 15:43:22 calle - * added calls to pci_device_start(). - * - * Revision 1.23 2000/05/06 00:52:36 kai - * merged changes from kernel tree - * fixed timer and net_device->name breakage - * - * Revision 1.22 2000/04/21 13:01:33 calle - * Revision in b1pciv4 driver was missing. - * - * Revision 1.21 2000/04/03 13:29:24 calle - * make Tim Waugh happy (module unload races in 2.3.99-pre3). - * no real problem there, but now it is much cleaner ... - * - * Revision 1.20 2000/02/02 18:36:03 calle - * - Modules are now locked while init_module is running - * - fixed problem with memory mapping if address is not aligned - * - * Revision 1.19 2000/01/25 14:33:38 calle - * - Added Support AVM B1 PCI V4.0 (tested with prototype) - * - splitted up t1pci.c into b1dma.c for common function with b1pciv4 - * - support for revision register - * - * Revision 1.18 1999/11/05 16:38:01 calle - * Cleanups before kernel 2.4: - * - Changed all messages to use card->name or driver->name instead of - * constant string. - * - Moved some data from struct avmcard into new struct avmctrl_info. - * Changed all lowlevel capi driver to match the new structur. - * - * Revision 1.17 1999/10/05 06:50:07 calle - * Forgot SA_SHIRQ as argument to request_irq. - * - * Revision 1.16 1999/08/11 21:01:07 keil - * new PCI codefix - * - * Revision 1.15 1999/08/10 16:02:27 calle - * struct pci_dev changed in 2.3.13. Made the necessary changes. - * - * Revision 1.14 1999/07/09 15:05:41 keil - * compat.h is now isdn_compat.h - * - * Revision 1.13 1999/07/05 15:09:50 calle - * - renamed "appl_release" to "appl_released". - * - version und profile data now cleared on controller reset - * - extended /proc interface, to allow driver and controller specific - * informations to include by driver hackers. - * - * Revision 1.12 1999/07/01 15:26:29 calle - * complete new version (I love it): - * + new hardware independed "capi_driver" interface that will make it easy to: - * - support other controllers with CAPI-2.0 (i.e. USB Controller) - * - write a CAPI-2.0 for the passive cards - * - support serial link CAPI-2.0 boxes. - * + wrote "capi_driver" for all supported cards. - * + "capi_driver" (supported cards) now have to be configured with - * make menuconfig, in the past all supported cards where included - * at once. - * + new and better informations in /proc/capi/ - * + new ioctl to switch trace of capi messages per controller - * using "avmcapictrl trace [contr] on|off|...." - * + complete testcircle with all supported cards and also the - * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done. - * - * */ #include @@ -120,7 +25,7 @@ #include "capilli.h" #include "avmcard.h" -static char *revision = "$Revision: 1.29.6.1 $"; +static char *revision = "$Revision: 1.29.6.4 $"; /* ------------------------------------------------------------- */ @@ -319,7 +224,7 @@ div4->detach_ctr(ctrl); free_irq(card->irq, card); - iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK)); + iounmap(card->mbase); release_region(card->port, AVMB1_PORTLEN); ctrl->driverdata = 0; kfree(card->ctrlinfo); @@ -350,7 +255,6 @@ static int b1pciv4_add_card(struct capi_driver *driver, struct capicardparams *p) { - unsigned long base, page_offset; avmcard *card; avmctrl_info *cinfo; int retval; @@ -401,12 +305,8 @@ return -EBUSY; } - base = card->membase & PAGE_MASK; - page_offset = card->membase - base; - card->mbase = ioremap_nocache(base, page_offset + 64); - if (card->mbase) { - card->mbase += page_offset; - } else { + card->mbase = ioremap_nocache(card->membase, 64); + if (!card->mbase) { printk(KERN_NOTICE "%s: can't remap memory at 0x%lx\n", driver->name, card->membase); kfree(card->ctrlinfo); @@ -421,7 +321,7 @@ if ((retval = b1pciv4_detect(card)) != 0) { printk(KERN_NOTICE "%s: NO card at 0x%x (%d)\n", driver->name, card->port, retval); - iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK)); + iounmap(card->mbase); kfree(card->ctrlinfo); kfree(card->dma); kfree(card); @@ -437,7 +337,7 @@ if (retval) { printk(KERN_ERR "%s: unable to get IRQ %d.\n", driver->name, card->irq); - iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK)); + iounmap(card->mbase); release_region(card->port, AVMB1_PORTLEN); kfree(card->ctrlinfo); kfree(card->dma); @@ -449,7 +349,7 @@ cinfo->capi_ctrl = div4->attach_ctr(driver, card->name, cinfo); if (!cinfo->capi_ctrl) { printk(KERN_ERR "%s: attach controller failed.\n", driver->name); - iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK)); + iounmap(card->mbase); free_irq(card->irq, card); release_region(card->port, AVMB1_PORTLEN); kfree(card->ctrlinfo); @@ -500,14 +400,21 @@ struct capicardparams param; int retval; + if (pci_enable_device(dev) < 0) { + printk(KERN_ERR "%s: failed to enable AVM-B1\n", + driver->name); + return -ENODEV; + } + param.irq = dev->irq; + if (dev->base_address[ 2] & PCI_BASE_ADDRESS_IO_MASK) { /* B1 PCI V4 */ #ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4 driver = &b1pciv4_driver; + + pci_set_master(dev); #endif param.membase = dev->base_address[ 0] & PCI_BASE_ADDRESS_MEM_MASK; param.port = dev->base_address[ 2] & PCI_BASE_ADDRESS_IO_MASK; - param.irq = dev->irq; - printk(KERN_INFO "%s: PCI BIOS reports AVM-B1 V4 at i/o %#x, irq %d, mem %#x\n", @@ -525,7 +432,6 @@ } else { param.membase = 0; param.port = dev->base_address[ 1] & PCI_BASE_ADDRESS_IO_MASK; - param.irq = dev->irq; printk(KERN_INFO "%s: PCI BIOS reports AVM-B1 at i/o %#x, irq %d\n", @@ -548,69 +454,50 @@ #endif struct pci_dev *dev = NULL; char *p; - int retval; MOD_INC_USE_COUNT; - if ((p = strchr(revision, ':'))) { - strncpy(driver->revision, p + 1, sizeof(driver->revision)); - p = strchr(driver->revision, '$'); - *p = 0; + if ((p = strchr(revision, ':')) != 0 && p[1]) { + strncpy(driver->revision, p + 2, sizeof(driver->revision)); + driver->revision[sizeof(driver->revision)-1] = 0; + if ((p = strchr(driver->revision, '$')) != 0 && p > driver->revision) + *(p-1) = 0; + } #ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4 - p = strchr(revision, ':'); - strncpy(driverv4->revision, p + 1, sizeof(driverv4->revision)); - p = strchr(driverv4->revision, '$'); - *p = 0; -#endif + if ((p = strchr(revision, ':')) != 0 && p[1]) { + strncpy(driverv4->revision, p + 2, sizeof(driverv4->revision)); + driverv4->revision[sizeof(driverv4->revision)-1] = 0; + if ((p = strchr(driverv4->revision, '$')) != 0 && p > driverv4->revision) + *(p-1) = 0; } +#endif printk(KERN_INFO "%s: revision %s\n", driver->name, driver->revision); di = attach_capi_driver(driver); - if (!di) { printk(KERN_ERR "%s: failed to attach capi_driver\n", driver->name); MOD_DEC_USE_COUNT; - return -EIO; + return -ENODEV; } #ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4 printk(KERN_INFO "%s: revision %s\n", driverv4->name, driverv4->revision); div4 = attach_capi_driver(driverv4); - if (!div4) { detach_capi_driver(driver); printk(KERN_ERR "%s: failed to attach capi_driver\n", driverv4->name); MOD_DEC_USE_COUNT; - return -EIO; + return -ENODEV; } #endif -#ifdef CONFIG_PCI - if (!pci_present()) { - printk(KERN_ERR "%s: no PCI bus present\n", driver->name); - detach_capi_driver(driver); -#ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4 - detach_capi_driver(driverv4); -#endif - MOD_DEC_USE_COUNT; - return -EIO; - } - while ((dev = pci_find_device(PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_B1, dev))) { - retval = add_card(dev); - if (retval != 0) { - detach_capi_driver(driver); -#ifdef CONFIG_ISDN_DRV_AVMB1_B1PCIV4 - detach_capi_driver(driverv4); -#endif - MOD_DEC_USE_COUNT; - return retval; - } - ncards++; + if (add_card(dev) == 0) + ncards++; } if (ncards) { printk(KERN_INFO "%s: %d B1-PCI card(s) detected\n", @@ -624,12 +511,7 @@ detach_capi_driver(driverv4); #endif MOD_DEC_USE_COUNT; - return -ESRCH; -#else - printk(KERN_ERR "%s: kernel not compiled with PCI.\n", driver->name); - MOD_DEC_USE_COUNT; - return -EIO; -#endif + return -ENODEV; } static void b1pci_exit(void) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/b1pcmcia.c linux.20p6/drivers/isdn/avmb1/b1pcmcia.c --- linux.vanilla/drivers/isdn/avmb1/b1pcmcia.c Sun Mar 25 17:37:31 2001 +++ linux.20p6/drivers/isdn/avmb1/b1pcmcia.c Mon Jun 25 14:24:29 2001 @@ -1,83 +1,10 @@ /* - * $Id: b1pcmcia.c,v 1.12.6.1 2001/02/13 11:43:29 kai Exp $ + * $Id: b1pcmcia.c,v 1.12.6.4 2001/05/17 20:41:51 kai Exp $ * * Module for AVM B1/M1/M2 PCMCIA-card. * * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de) * - * $Log: b1pcmcia.c,v $ - * Revision 1.12.6.1 2001/02/13 11:43:29 kai - * more compatility changes for 2.2.19 - * - * Revision 1.12 2000/11/23 20:45:14 kai - * fixed module_init/exit stuff - * Note: compiled-in kernel doesn't work pre 2.2.18 anymore. - * - * Revision 1.11 2000/11/01 14:05:02 calle - * - use module_init/module_exit from linux/init.h. - * - all static struct variables are initialized with "membername:" now. - * - avm_cs.c, let it work with newer pcmcia-cs. - * - * Revision 1.10 2000/05/06 00:52:36 kai - * merged changes from kernel tree - * fixed timer and net_device->name breakage - * - * Revision 1.9 2000/04/03 13:29:24 calle - * make Tim Waugh happy (module unload races in 2.3.99-pre3). - * no real problem there, but now it is much cleaner ... - * - * Revision 1.8 2000/03/06 18:00:23 calle - * - Middleware extention now working with 2.3.49 (capifs). - * - Fixed typos in debug section of capi.c - * - Bugfix: Makefile corrected for b1pcmcia.c - * - * Revision 1.7 2000/02/02 18:36:03 calle - * - Modules are now locked while init_module is running - * - fixed problem with memory mapping if address is not aligned - * - * Revision 1.6 2000/01/25 14:37:39 calle - * new message after successfull detection including card revision and - * used resources. - * - * Revision 1.5 1999/11/05 16:38:01 calle - * Cleanups before kernel 2.4: - * - Changed all messages to use card->name or driver->name instead of - * constant string. - * - Moved some data from struct avmcard into new struct avmctrl_info. - * Changed all lowlevel capi driver to match the new structur. - * - * Revision 1.4 1999/08/22 20:26:26 calle - * backported changes from kernel 2.3.14: - * - several #include "config.h" gone, others come. - * - "struct device" changed to "struct net_device" in 2.3.14, added a - * define in isdn_compat.h for older kernel versions. - * - * Revision 1.3 1999/07/09 15:05:41 keil - * compat.h is now isdn_compat.h - * - * Revision 1.2 1999/07/05 15:09:51 calle - * - renamed "appl_release" to "appl_released". - * - version und profile data now cleared on controller reset - * - extended /proc interface, to allow driver and controller specific - * informations to include by driver hackers. - * - * Revision 1.1 1999/07/01 15:26:30 calle - * complete new version (I love it): - * + new hardware independed "capi_driver" interface that will make it easy to: - * - support other controllers with CAPI-2.0 (i.e. USB Controller) - * - write a CAPI-2.0 for the passive cards - * - support serial link CAPI-2.0 boxes. - * + wrote "capi_driver" for all supported cards. - * + "capi_driver" (supported cards) now have to be configured with - * make menuconfig, in the past all supported cards where included - * at once. - * + new and better informations in /proc/capi/ - * + new ioctl to switch trace of capi messages per controller - * using "avmcapictrl trace [contr] on|off|...." - * + complete testcircle with all supported cards and also the - * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done. - * - * */ #include @@ -96,7 +23,7 @@ #include "capilli.h" #include "avmcard.h" -static char *revision = "$Revision: 1.12.6.1 $"; +static char *revision = "$Revision: 1.12.6.4 $"; /* ------------------------------------------------------------- */ @@ -321,10 +248,11 @@ MOD_INC_USE_COUNT; - if ((p = strchr(revision, ':'))) { - strncpy(driver->revision, p + 1, sizeof(driver->revision)); - p = strchr(driver->revision, '$'); - *p = 0; + if ((p = strchr(revision, ':')) != 0 && p[1]) { + strncpy(driver->revision, p + 2, sizeof(driver->revision)); + driver->revision[sizeof(driver->revision)-1] = 0; + if ((p = strchr(driver->revision, '$')) != 0 && p > driver->revision) + *(p-1) = 0; } printk(KERN_INFO "%s: revision %s\n", driver->name, driver->revision); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/c4.c linux.20p6/drivers/isdn/avmb1/c4.c --- linux.vanilla/drivers/isdn/avmb1/c4.c Sun Mar 25 17:37:31 2001 +++ linux.20p6/drivers/isdn/avmb1/c4.c Mon Jun 25 14:24:37 2001 @@ -1,92 +1,9 @@ /* - * $Id: c4.c,v 1.20.6.2 2001/02/13 11:43:29 kai Exp $ + * $Id: c4.c,v 1.20.6.10 2001/06/09 15:14:15 kai Exp $ * - * Module for AVM C4 card. + * Module for AVM C4 & C2 card. * * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de) - * - * $Log: c4.c,v $ - * Revision 1.20.6.2 2001/02/13 11:43:29 kai - * more compatility changes for 2.2.19 - * - * Revision 1.20.6.1 2000/11/28 12:02:45 kai - * MODULE_DEVICE_TABLE for 2.4 - * - * Revision 1.20.2.2 2000/11/26 17:47:53 kai - * added PCI_DEV_TABLE for 2.4 - * - * Revision 1.20.2.1 2000/11/26 17:14:19 kai - * fix device ids - * also needs patches to include/linux/pci_ids.h - * - * Revision 1.20 2000/11/23 20:45:14 kai - * fixed module_init/exit stuff - * Note: compiled-in kernel doesn't work pre 2.2.18 anymore. - * - * Revision 1.19 2000/11/19 17:02:47 kai - * compatibility cleanup - part 3 - * - * Revision 1.18 2000/11/01 14:05:02 calle - * - use module_init/module_exit from linux/init.h. - * - all static struct variables are initialized with "membername:" now. - * - avm_cs.c, let it work with newer pcmcia-cs. - * - * Revision 1.17 2000/10/10 17:44:19 kai - * changes from/for 2.2.18 - * - * Revision 1.16 2000/08/20 07:30:13 keil - * changes for 2.4 - * - * Revision 1.15 2000/08/08 09:24:19 calle - * calls to pci_enable_device surounded by #ifndef COMPAT_HAS_2_2_PCI - * - * Revision 1.14 2000/08/04 12:20:08 calle - * - Fix unsigned/signed warning in the right way ... - * - * Revision 1.13 2000/07/20 10:21:21 calle - * Bugfix: driver will not be unregistered, if not cards were detected. - * this result in an oops in kcapi.c - * - * Revision 1.12 2000/06/19 16:51:53 keil - * don't free skb in irq context - * - * Revision 1.11 2000/06/19 15:11:24 keil - * avoid use of freed structs - * changes from 2.4.0-ac21 - * - * Revision 1.10 2000/05/29 12:29:18 keil - * make pci_enable_dev compatible to 2.2 kernel versions - * - * Revision 1.9 2000/05/19 15:43:22 calle - * added calls to pci_device_start(). - * - * Revision 1.8 2000/04/03 16:38:05 calle - * made suppress_pollack static. - * - * Revision 1.7 2000/04/03 13:29:24 calle - * make Tim Waugh happy (module unload races in 2.3.99-pre3). - * no real problem there, but now it is much cleaner ... - * - * Revision 1.6 2000/03/17 12:21:08 calle - * send patchvalues now working. - * - * Revision 1.5 2000/03/16 15:21:03 calle - * Bugfix in c4_remove: loop 5 times instead of 4 :-( - * - * Revision 1.4 2000/02/02 18:36:03 calle - * - Modules are now locked while init_module is running - * - fixed problem with memory mapping if address is not aligned - * - * Revision 1.3 2000/01/25 14:37:39 calle - * new message after successfull detection including card revision and - * used resources. - * - * Revision 1.2 2000/01/21 20:52:58 keil - * pci_find_subsys as local function for 2.2.X kernel - * - * Revision 1.1 2000/01/20 10:51:37 calle - * Added driver for C4. - * * */ @@ -101,15 +18,17 @@ #include #include #include +#include #include #include #include +#include #include "capicmd.h" #include "capiutil.h" #include "capilli.h" #include "avmcard.h" -static char *revision = "$Revision: 1.20.6.2 $"; +static char *revision = "$Revision: 1.20.6.10 $"; #undef CONFIG_C4_DEBUG #undef CONFIG_C4_POLLDEBUG @@ -599,7 +518,7 @@ MsgLen = _get_slice(&p, card->msgbuf); DataB3Len = _get_slice(&p, card->databuf); cidx = CAPIMSG_CONTROLLER(card->msgbuf)-card->cardnr; - if (cidx > 3) cidx = 0; + if (cidx >= card->nlogcontr) cidx = 0; ctrl = card->ctrlinfo[cidx].capi_ctrl; if (MsgLen < 30) { /* not CAPI 64Bit */ @@ -622,7 +541,7 @@ ApplId = (unsigned) _get_word(&p); MsgLen = _get_slice(&p, card->msgbuf); cidx = CAPIMSG_CONTROLLER(card->msgbuf)-card->cardnr; - if (cidx > 3) cidx = 0; + if (cidx >= card->nlogcontr) cidx = 0; ctrl = card->ctrlinfo[cidx].capi_ctrl; if (!(skb = alloc_skb(MsgLen, GFP_ATOMIC))) { @@ -640,7 +559,7 @@ NCCI = _get_word(&p); WindowSize = _get_word(&p); cidx = (NCCI&0x7f) - card->cardnr; - if (cidx > 3) cidx = 0; + if (cidx >= card->nlogcontr) cidx = 0; ctrl = card->ctrlinfo[cidx].capi_ctrl; ctrl->new_ncci(ctrl, ApplId, NCCI, WindowSize); @@ -654,13 +573,15 @@ if (NCCI != 0xffffffff) { cidx = (NCCI&0x7f) - card->cardnr; - if (cidx > 3) cidx = 0; + if (cidx >= card->nlogcontr) cidx = 0; ctrl = card->ctrlinfo[cidx].capi_ctrl; - ctrl->free_ncci(ctrl, ApplId, NCCI); + if (ctrl) + ctrl->free_ncci(ctrl, ApplId, NCCI); } else { for (cidx=0; cidx < 4; cidx++) { ctrl = card->ctrlinfo[cidx].capi_ctrl; - ctrl->appl_released(ctrl, ApplId); + if (ctrl) + ctrl->appl_released(ctrl, ApplId); } } break; @@ -673,20 +594,28 @@ queue_pollack(card); for (cidx=0; cidx < 4; cidx++) { ctrl = card->ctrlinfo[cidx].capi_ctrl; - ctrl->resume_output(ctrl); + if (ctrl) + ctrl->resume_output(ctrl); } break; case RECEIVE_STOP: for (cidx=0; cidx < 4; cidx++) { ctrl = card->ctrlinfo[cidx].capi_ctrl; - ctrl->suspend_output(ctrl); + if (ctrl) + ctrl->suspend_output(ctrl); } break; case RECEIVE_INIT: - cidx = card->nlogcontr++; + cidx = card->nlogcontr; + if (cidx >= 4 || !card->ctrlinfo[cidx].capi_ctrl) { + printk(KERN_ERR "%s: card with %d controllers ??\n", + card->name, cidx+1); + break; + } + card->nlogcontr++; cinfo = &card->ctrlinfo[cidx]; ctrl = cinfo->capi_ctrl; cinfo->versionlen = _get_slice(&p, cinfo->versionbuf); @@ -740,6 +669,8 @@ if (status & DBELL_RESET_HOST) { int i; c4outmeml(card->mbase+PCI_OUT_INT_MASK, 0x0c); + if (card->nlogcontr == 0) + return; printk(KERN_ERR "%s: unexpected reset\n", card->name); for (i=0; i < 4; i++) { avmctrl_info *cinfo = &card->ctrlinfo[i]; @@ -747,6 +678,7 @@ if (cinfo->capi_ctrl) cinfo->capi_ctrl->reseted(cinfo->capi_ctrl); } + card->nlogcontr = 0; return; } @@ -815,7 +747,7 @@ _put_byte(&p, 0); _put_byte(&p, 0); _put_byte(&p, SEND_INIT); - _put_word(&p, AVM_NAPPS); + _put_word(&p, CAPI_MAXAPPL); _put_word(&p, AVM_NCCI_PER_CHANNEL*30); _put_word(&p, card->cardnr - 1); skb_put(skb, (__u8 *)p - (__u8 *)skb->data); @@ -978,6 +910,7 @@ if (cinfo->capi_ctrl) cinfo->capi_ctrl->reseted(cinfo->capi_ctrl); } + card->nlogcontr = 0; } static void c4_remove_ctr(struct capi_ctr *ctrl) @@ -997,7 +930,7 @@ } free_irq(card->irq, card); - iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK)); + iounmap(card->mbase); release_region(card->port, AVMB1_PORTLEN); ctrl->driverdata = 0; kfree(card->ctrlinfo); @@ -1130,6 +1063,7 @@ case avm_t1isa: s = "T1 ISA (HEMA)"; break; case avm_t1pci: s = "T1 PCI"; break; case avm_c4: s = "C4"; break; + case avm_c2: s = "C2"; break; default: s = "???"; break; } len += sprintf(page+len, "%-16s %s\n", "type", s); @@ -1177,9 +1111,10 @@ /* ------------------------------------------------------------- */ -static int c4_add_card(struct capi_driver *driver, struct capicardparams *p) +static int c4_add_card(struct capi_driver *driver, + struct capicardparams *p, + int nr) { - unsigned long base, page_offset; avmctrl_info *cinfo; avmcard *card; int retval; @@ -1217,11 +1152,11 @@ cinfo = &card->ctrlinfo[i]; cinfo->card = card; } - sprintf(card->name, "c4-%x", p->port); + sprintf(card->name, "%s-%x", driver->name, p->port); card->port = p->port; card->irq = p->irq; card->membase = p->membase; - card->cardtype = avm_c4; + card->cardtype = nr == 4 ? avm_c4 : avm_c2; if (check_region(card->port, AVMB1_PORTLEN)) { printk(KERN_WARNING @@ -1234,12 +1169,8 @@ return -EBUSY; } - base = card->membase & PAGE_MASK; - page_offset = card->membase - base; - card->mbase = ioremap_nocache(base, page_offset + 128); - if (card->mbase) { - card->mbase += page_offset; - } else { + card->mbase = ioremap_nocache(card->membase, 128); + if (card->mbase == 0) { printk(KERN_NOTICE "%s: can't remap memory at 0x%lx\n", driver->name, card->membase); kfree(card->ctrlinfo); @@ -1252,7 +1183,7 @@ if ((retval = c4_detect(card)) != 0) { printk(KERN_NOTICE "%s: NO card at 0x%x (%d)\n", driver->name, card->port, retval); - iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK)); + iounmap(card->mbase); kfree(card->ctrlinfo); kfree(card->dma); kfree(card); @@ -1267,7 +1198,7 @@ if (retval) { printk(KERN_ERR "%s: unable to get IRQ %d.\n", driver->name, card->irq); - iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK)); + iounmap(card->mbase); release_region(card->port, AVMB1_PORTLEN); kfree(card->ctrlinfo); kfree(card->dma); @@ -1276,7 +1207,7 @@ return -EBUSY; } - for (i=0; i < 4; i++) { + for (i=0; i < nr ; i++) { cinfo = &card->ctrlinfo[i]; cinfo->card = card; cinfo->capi_ctrl = di->attach_ctr(driver, card->name, cinfo); @@ -1287,7 +1218,7 @@ cinfo = &card->ctrlinfo[i]; di->detach_ctr(cinfo->capi_ctrl); } - iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK)); + iounmap(card->mbase); free_irq(card->irq, card); release_region(card->port, AVMB1_PORTLEN); kfree(card->dma); @@ -1303,14 +1234,31 @@ skb_queue_head_init(&card->dma->send_queue); printk(KERN_INFO - "%s: AVM C4 at i/o %#x, irq %d, mem %#lx\n", - driver->name, card->port, card->irq, card->membase); + "%s: AVM C%d at i/o %#x, irq %d, mem %#lx\n", + driver->name, nr, card->port, card->irq, card->membase); return 0; } /* ------------------------------------------------------------- */ +static struct capi_driver c2_driver = { + name: "c2", + revision: "0.0", + load_firmware: c4_load_firmware, + reset_ctr: c4_reset_ctr, + remove_ctr: c4_remove_ctr, + register_appl: c4_register_appl, + release_appl: c4_release_appl, + send_message: c4_send_message, + + procinfo: c4_procinfo, + ctr_read_proc: c4_read_proc, + driver_read_proc: 0, /* use standard driver_read_proc */ + + add_card: 0, /* no add_card function */ +}; + static struct capi_driver c4_driver = { name: "c4", revision: "0.0", @@ -1330,83 +1278,114 @@ static int ncards = 0; -static int __init c4_init(void) +static int c4_attach_driver (struct capi_driver * driver) { - struct capi_driver *driver = &c4_driver; - struct pci_dev *dev = NULL; char *p; - int retval; - - MOD_INC_USE_COUNT; - - if ((p = strchr(revision, ':'))) { - strncpy(driver->revision, p + 1, sizeof(driver->revision)); - p = strchr(driver->revision, '$'); - *p = 0; + if ((p = strchr(revision, ':')) != 0 && p[1]) { + strncpy(driver->revision, p + 2, sizeof(driver->revision)); + driver->revision[sizeof(driver->revision)-1] = 0; + if ((p = strchr(driver->revision, '$')) != 0 && p > driver->revision) + *(p-1) = 0; } printk(KERN_INFO "%s: revision %s\n", driver->name, driver->revision); di = attach_capi_driver(driver); - if (!di) { printk(KERN_ERR "%s: failed to attach capi_driver\n", driver->name); MOD_DEC_USE_COUNT; - return -EIO; + return -ENODEV; } + return 0; +} -#ifdef CONFIG_PCI - if (!pci_present()) { - printk(KERN_ERR "%s: no PCI bus present\n", driver->name); - detach_capi_driver(driver); - MOD_DEC_USE_COUNT; - return -EIO; - } +static int __init search_cards(struct capi_driver * driver, + int pci_id, int nr) +{ + struct pci_dev * dev = NULL; + int retval = 0; while ((dev = pci_find_subsys( PCI_VENDOR_ID_DEC, PCI_DEVICE_ID_DEC_21285, - PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_C4, dev))) { + PCI_VENDOR_ID_AVM, pci_id, dev))) { struct capicardparams param; + if (pci_enable_device(dev) < 0) { + printk(KERN_ERR "%s: failed to enable AVM-C%d\n", + driver->name, nr); + continue; + } + pci_set_master(dev); + param.port = dev->base_address[ 1] & PCI_BASE_ADDRESS_IO_MASK; param.irq = dev->irq; param.membase = dev->base_address[ 0] & PCI_BASE_ADDRESS_MEM_MASK; - - + printk(KERN_INFO - "%s: PCI BIOS reports AVM-C4 at i/o %#x, irq %d, mem %#x\n", - driver->name, param.port, param.irq, param.membase); - retval = c4_add_card(driver, ¶m); + "%s: PCI BIOS reports AVM-C%d at i/o %#x, irq %d, mem %#x\n", + driver->name, nr, param.port, param.irq, param.membase); + retval = c4_add_card(driver, ¶m, nr); if (retval != 0) { printk(KERN_ERR - "%s: no AVM-C4 at i/o %#x, irq %d detected, mem %#x\n", - driver->name, param.port, param.irq, param.membase); - detach_capi_driver(driver); - MOD_DEC_USE_COUNT; - return retval; + "%s: no AVM-C%d at i/o %#x, irq %d detected, mem %#x\n", + driver->name, nr, param.port, param.irq, param.membase); + continue; } ncards++; } + return retval; +} + +static int __init c4_init(void) +{ + int retval; + + MOD_INC_USE_COUNT; + + retval = c4_attach_driver (&c4_driver); + if (retval) { + MOD_DEC_USE_COUNT; + return retval; + } + + retval = c4_attach_driver (&c2_driver); + if (retval) { + MOD_DEC_USE_COUNT; + return retval; + } + + retval = search_cards(&c4_driver, PCI_DEVICE_ID_AVM_C4, 4); + if (retval && ncards == 0) { + detach_capi_driver(&c2_driver); + detach_capi_driver(&c4_driver); + MOD_DEC_USE_COUNT; + return retval; + } + retval = search_cards(&c2_driver, 0x1100, 2); + if (retval && ncards == 0) { + detach_capi_driver(&c2_driver); + detach_capi_driver(&c4_driver); + MOD_DEC_USE_COUNT; + return retval; + } + if (ncards) { - printk(KERN_INFO "%s: %d C4 card(s) detected\n", - driver->name, ncards); + printk(KERN_INFO "%s: %d C4/C2 card(s) detected\n", + c4_driver.name, ncards); MOD_DEC_USE_COUNT; return 0; } - printk(KERN_ERR "%s: NO C4 card detected\n", driver->name); - detach_capi_driver(driver); + printk(KERN_ERR "%s: NO C4/C2 card detected\n", c4_driver.name); + detach_capi_driver(&c4_driver); + detach_capi_driver(&c2_driver); MOD_DEC_USE_COUNT; - return -ESRCH; -#else - printk(KERN_ERR "%s: kernel not compiled with PCI.\n", driver->name); - MOD_DEC_USE_COUNT; - return -EIO; -#endif + return -ENODEV; } static void c4_exit(void) { + detach_capi_driver(&c2_driver); detach_capi_driver(&c4_driver); } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capi.c linux.20p6/drivers/isdn/avmb1/capi.c --- linux.vanilla/drivers/isdn/avmb1/capi.c Sun Mar 25 17:37:31 2001 +++ linux.20p6/drivers/isdn/avmb1/capi.c Mon Jun 25 14:24:39 2001 @@ -1,226 +1,10 @@ /* - * $Id: capi.c,v 1.44.6.5 2001/02/13 11:43:29 kai Exp $ + * $Id: capi.c,v 1.44.6.12 2001/06/09 15:14:15 kai Exp $ * * CAPI 2.0 Interface for Linux * * Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de) * - * $Log: capi.c,v $ - * Revision 1.44.6.5 2001/02/13 11:43:29 kai - * more compatility changes for 2.2.19 - * - * Revision 1.44.6.4 2001/02/10 14:41:20 kai - * Changes from kernel tree - * - * Revision 1.44.6.3 2000/12/17 22:45:08 kai - * That's hopefully it for test13-4 - * - * Revision 1.44.6.2 2000/12/14 23:04:12 kai - * Makefile changes and the like for 2.4.0-test13-pre1 - * No compatiblity code for older kernels yet, but note the branch - * - * Revision 1.45 2000/12/02 19:47:29 kai - * Change the Makefiles to new style. - * There may be problems there that I missed, so this shouldn't go into - * an offical kernel any time soon. - * However, if I didn't commit it, we wouldn't find the bugs... - * - * Revision 1.44 2000/11/25 17:00:59 kai - * compatibility cleanup - final part for the time being - * - * Revision 1.43 2000/11/23 20:45:14 kai - * fixed module_init/exit stuff - * Note: compiled-in kernel doesn't work pre 2.2.18 anymore. - * - * Revision 1.42 2000/11/19 17:03:55 kai - * compatibility cleanup - part 5 - * - * Revision 1.41 2000/11/01 14:05:02 calle - * - use module_init/module_exit from linux/init.h. - * - all static struct variables are initialized with "membername:" now. - * - avm_cs.c, let it work with newer pcmcia-cs. - * - * Revision 1.40 2000/10/24 15:15:04 calle - * Workaround: pppd calls restoretty before reseting the ldisc and - * ldisc "ppp_sync" didn't support this. So we call n_tty_ioctl - * in the driver ioctl function. (remember: driver ioctl function is - * only called if ldisc ioctl function did not handle the call) - * - * Revision 1.39 2000/07/24 13:42:50 calle - * - lock_kernel/unlock_kernel for _release functions. (from 2.4) - * - * Revision 1.38 2000/07/24 08:49:09 calle - * - Bugfix: capiminor_del_all_ack completely wrong :-( - * - * Revision 1.37 2000/07/20 10:22:27 calle - * - Made procfs function cleaner and removed variable "begin". - * - * Revision 1.36 2000/06/29 13:59:35 calle - * - call to devfs_register was wrong - * - * Revision 1.35 2000/06/19 15:11:24 keil - * avoid use of freed structs - * changes from 2.4.0-ac21 - * - * Revision 1.34 2000/06/18 16:09:54 keil - * more changes for 2.4 - * - * Revision 1.33 2000/05/18 16:35:43 calle - * Uaaahh. Bad memory leak fixed. - * - * Revision 1.32 2000/04/21 12:38:42 calle - * Bugfix: error in proc_ functions, begin-off => off-begin - * - * Revision 1.31 2000/04/03 13:29:24 calle - * make Tim Waugh happy (module unload races in 2.3.99-pre3). - * no real problem there, but now it is much cleaner ... - * - * Revision 1.30 2000/03/19 12:31:36 calle - * PPP over CAPI raw driver disabled for now, ppp_generic has been changed. - * - * Revision 1.29 2000/03/13 17:48:13 calle - * removed unused variable. - * - * Revision 1.28 2000/03/08 17:06:33 calle - * - changes for devfs and 2.3.49 - * - capifs now configurable (no need with devfs) - * - New Middleware ioctl CAPI_NCCI_GETUNIT - * - Middleware again tested with 2.2.14 and 2.3.49 (with and without devfs) - * - * Revision 1.27 2000/03/06 18:00:23 calle - * - Middleware extention now working with 2.3.49 (capifs). - * - Fixed typos in debug section of capi.c - * - Bugfix: Makefile corrected for b1pcmcia.c - * - * Revision 1.26 2000/03/03 16:48:38 calle - * - Added CAPI2.0 Middleware support (CONFIG_ISDN_CAPI) - * It is now possible to create a connection with a CAPI2.0 applikation - * and than to handle the data connection from /dev/capi/ (capifs) and also - * using async or sync PPP on this connection. - * The two major device number 190 and 191 are not confirmed yet, - * but I want to save the code in cvs, before I go on. - * - * Revision 1.25 2000/03/03 16:37:11 kai - * incorporated some cosmetic changes from the official kernel tree back - * into CVS - * - * Revision 1.24 2000/03/03 15:50:42 calle - * - kernel CAPI: - * - Changed parameter "param" in capi_signal from __u32 to void *. - * - rewrote notifier handling in kcapi.c - * - new notifier NCCI_UP and NCCI_DOWN - * - User CAPI: - * - /dev/capi20 is now a cloning device. - * - middleware extentions prepared. - * - capidrv.c - * - locking of list operations and module count updates. - * - * Revision 1.23 2000/02/26 01:00:53 keil - * changes from 2.3.47 - * - * Revision 1.22 1999/11/13 21:27:16 keil - * remove KERNELVERSION - * - * Revision 1.21 1999/09/10 17:24:18 calle - * Changes for proposed standard for CAPI2.0: - * - AK148 "Linux Exention" - * - * Revision 1.20 1999/09/07 09:02:53 calle - * SETDATA removed. Now inside the kernel the datapart of DATA_B3_REQ and - * DATA_B3_IND is always directly after the CAPI message. The "Data" member - * ist never used inside the kernel. - * - * Revision 1.19 1999/07/09 15:05:42 keil - * compat.h is now isdn_compat.h - * - * Revision 1.18 1999/07/06 07:42:01 calle - * - changes in /proc interface - * - check and changed calls to [dev_]kfree_skb and [dev_]alloc_skb. - * - * Revision 1.17 1999/07/01 15:26:30 calle - * complete new version (I love it): - * + new hardware independed "capi_driver" interface that will make it easy to: - * - support other controllers with CAPI-2.0 (i.e. USB Controller) - * - write a CAPI-2.0 for the passive cards - * - support serial link CAPI-2.0 boxes. - * + wrote "capi_driver" for all supported cards. - * + "capi_driver" (supported cards) now have to be configured with - * make menuconfig, in the past all supported cards where included - * at once. - * + new and better informations in /proc/capi/ - * + new ioctl to switch trace of capi messages per controller - * using "avmcapictrl trace [contr] on|off|...." - * + complete testcircle with all supported cards and also the - * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done. - * - * Revision 1.16 1999/07/01 08:22:57 keil - * compatibility macros now in - * - * Revision 1.15 1999/06/21 15:24:11 calle - * extend information in /proc. - * - * Revision 1.14 1999/06/10 16:51:03 calle - * Bugfix: open/release of control device was not handled correct. - * - * Revision 1.13 1998/08/28 04:32:25 calle - * Added patch send by Michael.Mueller4@post.rwth-aachen.de, to get AVM B1 - * driver running with 2.1.118. - * - * Revision 1.12 1998/05/26 22:39:34 he - * sync'ed with 2.1.102 where appropriate (CAPABILITY changes) - * concap typo - * cleared dev.tbusy in isdn_net BCONN status callback - * - * Revision 1.11 1998/03/09 17:46:37 he - * merged in 2.1.89 changes - * - * Revision 1.10 1998/02/13 07:09:13 calle - * change for 2.1.86 (removing FREE_READ/FREE_WRITE from [dev]_kfree_skb() - * - * Revision 1.9 1998/01/31 11:14:44 calle - * merged changes to 2.0 tree, prepare 2.1.82 to work. - * - * Revision 1.8 1997/11/04 06:12:08 calle - * capi.c: new read/write in file_ops since 2.1.60 - * capidrv.c: prepared isdnlog interface for d2-trace in newer firmware. - * capiutil.c: needs config.h (CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON) - * compat.h: added #define LinuxVersionCode - * - * Revision 1.7 1997/10/11 10:29:34 calle - * llseek() parameters changed in 2.1.56. - * - * Revision 1.6 1997/10/01 09:21:15 fritz - * Removed old compatibility stuff for 2.0.X kernels. - * From now on, this code is for 2.1.X ONLY! - * Old stuff is still in the separate branch. - * - * Revision 1.5 1997/08/21 23:11:55 fritz - * Added changes for kernels >= 2.1.45 - * - * Revision 1.4 1997/05/27 15:17:50 fritz - * Added changes for recent 2.1.x kernels: - * changed return type of isdn_close - * queue_task_* -> queue_task - * clear/set_bit -> test_and_... where apropriate. - * changed type of hard_header_cache parameter. - * - * Revision 1.3 1997/05/18 09:24:14 calle - * added verbose disconnect reason reporting to avmb1. - * some fixes in capi20 interface. - * changed info messages for B1-PCI - * - * Revision 1.2 1997/03/05 21:17:59 fritz - * Added capi_poll for compiling under 2.1.27 - * - * Revision 1.1 1997/03/04 21:50:29 calle - * Frirst version in isdn4linux - * - * Revision 2.2 1997/02/12 09:31:39 calle - * new version - * - * Revision 1.1 1997/01/31 10:32:20 calle - * Initial revision - * */ #include @@ -237,6 +21,7 @@ #include #include #include +#include #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE #include #ifdef CONFIG_PPP @@ -258,7 +43,7 @@ #include "capifs.h" #endif -static char *revision = "$Revision: 1.44.6.5 $"; +static char *revision = "$Revision: 1.44.6.12 $"; MODULE_AUTHOR("Carsten Paeth (calle@calle.in-berlin.de)"); @@ -465,7 +250,6 @@ void capiminor_free(struct capiminor *mp) { struct capiminor **pp; - struct sk_buff *skb; pp = &minors; while (*pp) { @@ -473,12 +257,9 @@ *pp = (*pp)->next; if (mp->ttyskb) kfree_skb(mp->ttyskb); mp->ttyskb = 0; - while ((skb = skb_dequeue(&mp->recvqueue)) != 0) - kfree_skb(skb); - while ((skb = skb_dequeue(&mp->inqueue)) != 0) - kfree_skb(skb); - while ((skb = skb_dequeue(&mp->outqueue)) != 0) - kfree_skb(skb); + skb_queue_purge(&mp->recvqueue); + skb_queue_purge(&mp->inqueue); + skb_queue_purge(&mp->outqueue); capiminor_del_all_ack(mp); kfree(mp); MOD_DEC_USE_COUNT; @@ -517,9 +298,6 @@ memset(np, 0, sizeof(struct capincci)); np->ncci = ncci; np->cdev = cdev; - for (pp=&cdev->nccis; *pp; pp = &(*pp)->next) - ; - *pp = np; #ifdef CONFIG_ISDN_CAPI_MIDDLEWARE mp = 0; if (cdev->userflags & CAPIFLAG_HIGHJACKING) @@ -537,6 +315,9 @@ #endif } #endif /* CONFIG_ISDN_CAPI_MIDDLEWARE */ + for (pp=&cdev->nccis; *pp; pp = &(*pp)->next) + ; + *pp = np; return np; } @@ -620,15 +401,12 @@ static void capidev_free(struct capidev *cdev) { struct capidev **pp; - struct sk_buff *skb; if (cdev->applid) (*capifuncs->capi_release) (cdev->applid); cdev->applid = 0; - while ((skb = skb_dequeue(&cdev->recvqueue)) != 0) { - kfree_skb(skb); - } + skb_queue_purge(&cdev->recvqueue); pp=&capidev_openlist; while (*pp && *pp != cdev) pp = &(*pp)->next; @@ -985,6 +763,8 @@ return -ENODEV; skb = alloc_skb(count, GFP_USER); + if (!skb) + return -ENOMEM; if ((retval = copy_from_user(skb_put(skb, count), buf, count))) { kfree_skb(skb); @@ -1401,6 +1181,8 @@ return -EINVAL; skb = alloc_skb(CAPI_DATA_B3_REQ_LEN+count, GFP_USER); + if (!skb) + return -ENOMEM; skb_reserve(skb, CAPI_DATA_B3_REQ_LEN); if ((retval = copy_from_user(skb_put(skb, count), buf, count))) { @@ -2028,20 +1810,22 @@ callback: lower_callback, }; -static char rev[10]; +static char rev[32]; static int __init capi_init(void) { char *p; + char *compileinfo; MOD_INC_USE_COUNT; - if ((p = strchr(revision, ':'))) { - strcpy(rev, p + 2); - p = strchr(rev, '$'); - *(p-1) = 0; + if ((p = strchr(revision, ':')) != 0 && p[1]) { + strncpy(rev, p + 2, sizeof(rev)); + rev[sizeof(rev)-1] = 0; + if ((p = strchr(rev, '$')) != 0 && p > rev) + *(p-1) = 0; } else - strcpy(rev, "???"); + strcpy(rev, "1.0"); if (register_chrdev(capi_major, "capi20", &capi_fops)) { printk(KERN_ERR "capi20: unable to get major %d\n", capi_major); @@ -2082,8 +1866,17 @@ (void)proc_init(); - printk(KERN_NOTICE "capi20: Rev%s: started up with major %d\n", - rev, capi_major); +#ifdef CONFIG_ISDN_CAPI_MIDDLEWARE +#if defined(CONFIG_ISDN_CAPI_CAPIFS) || defined(CONFIG_ISDN_CAPI_CAPIFS_MODULE) + compileinfo = " (middleware+capifs)"; +#else + compileinfo = " (no capifs)"; +#endif +#else + compileinfo = " (no middleware)"; +#endif + printk(KERN_NOTICE "capi20: Rev %s: started up with major %d%s\n", + rev, capi_major, compileinfo); MOD_DEC_USE_COUNT; return 0; @@ -2102,7 +1895,7 @@ unregister_chrdev(capi_rawmajor, "capi/r%d"); #endif (void) detach_capi_interface(&cuser); - printk(KERN_NOTICE "capi: Rev%s: unloaded\n", rev); + printk(KERN_NOTICE "capi: Rev %s: unloaded\n", rev); } module_init(capi_init); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capicmd.h linux.20p6/drivers/isdn/avmb1/capicmd.h --- linux.vanilla/drivers/isdn/avmb1/capicmd.h Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/avmb1/capicmd.h Mon Jun 25 14:24:29 2001 @@ -1,31 +1,9 @@ /* - * $Id: capicmd.h,v 1.2 2000/03/03 15:50:42 calle Exp $ + * $Id: capicmd.h,v 1.2.6.1 2001/05/17 20:41:51 kai Exp $ * * CAPI 2.0 Interface for Linux * * Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de) - * - * $Log: capicmd.h,v $ - * Revision 1.2 2000/03/03 15:50:42 calle - * - kernel CAPI: - * - Changed parameter "param" in capi_signal from __u32 to void *. - * - rewrote notifier handling in kcapi.c - * - new notifier NCCI_UP and NCCI_DOWN - * - User CAPI: - * - /dev/capi20 is now a cloning device. - * - middleware extentions prepared. - * - capidrv.c - * - locking of list operations and module count updates. - * - * Revision 1.1 1997/03/04 21:50:30 calle - * Frirst version in isdn4linux - * - * Revision 2.2 1997/02/12 09:31:39 calle - * new version - * - * Revision 1.1 1997/01/31 10:32:20 calle - * Initial revision - * * */ #ifndef __CAPICMD_H__ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capidev.h linux.20p6/drivers/isdn/avmb1/capidev.h --- linux.vanilla/drivers/isdn/avmb1/capidev.h Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/avmb1/capidev.h Mon Jun 25 14:24:29 2001 @@ -1,55 +1,9 @@ /* - * $Id: capidev.h,v 1.6 2000/11/25 17:00:59 kai Exp $ + * $Id: capidev.h,v 1.6.6.1 2001/05/17 20:41:51 kai Exp $ * * CAPI 2.0 Interface for Linux * * (c) Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de) - * - * $Log: capidev.h,v $ - * Revision 1.6 2000/11/25 17:00:59 kai - * compatibility cleanup - final part for the time being - * - * Revision 1.5 2000/03/03 15:50:42 calle - * - kernel CAPI: - * - Changed parameter "param" in capi_signal from __u32 to void *. - * - rewrote notifier handling in kcapi.c - * - new notifier NCCI_UP and NCCI_DOWN - * - User CAPI: - * - /dev/capi20 is now a cloning device. - * - middleware extentions prepared. - * - capidrv.c - * - locking of list operations and module count updates. - * - * Revision 1.4 1999/07/01 15:26:32 calle - * complete new version (I love it): - * + new hardware independed "capi_driver" interface that will make it easy to: - * - support other controllers with CAPI-2.0 (i.e. USB Controller) - * - write a CAPI-2.0 for the passive cards - * - support serial link CAPI-2.0 boxes. - * + wrote "capi_driver" for all supported cards. - * + "capi_driver" (supported cards) now have to be configured with - * make menuconfig, in the past all supported cards where included - * at once. - * + new and better informations in /proc/capi/ - * + new ioctl to switch trace of capi messages per controller - * using "avmcapictrl trace [contr] on|off|...." - * + complete testcircle with all supported cards and also the - * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done. - * - * Revision 1.3 1999/07/01 08:22:58 keil - * compatibility macros now in - * - * Revision 1.2 1999/06/21 15:24:13 calle - * extend information in /proc. - * - * Revision 1.1 1997/03/04 21:50:30 calle - * Frirst version in isdn4linux - * - * Revision 2.2 1997/02/12 09:31:39 calle - * new version - * - * Revision 1.1 1997/01/31 10:32:20 calle - * Initial revision * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capidrv.c linux.20p6/drivers/isdn/avmb1/capidrv.c --- linux.vanilla/drivers/isdn/avmb1/capidrv.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/avmb1/capidrv.c Mon Jun 25 14:24:39 2001 @@ -1,202 +1,10 @@ /* - * $Id: capidrv.c,v 1.39.6.2 2001/02/13 11:43:29 kai Exp $ + * $Id: capidrv.c,v 1.39.6.6 2001/05/17 20:41:51 kai Exp $ * * ISDN4Linux Driver, using capi20 interface (kernelcapi) * * Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de) * - * $Log: capidrv.c,v $ - * Revision 1.39.6.2 2001/02/13 11:43:29 kai - * more compatility changes for 2.2.19 - * - * Revision 1.39.6.1 2001/02/10 14:41:20 kai - * Changes from kernel tree - * - * Revision 1.39 2000/11/23 20:45:14 kai - * fixed module_init/exit stuff - * Note: compiled-in kernel doesn't work pre 2.2.18 anymore. - * - * Revision 1.38 2000/11/14 08:43:07 calle - * Bugfix for v110. Connectparamters where setup for sync ... - * - * Revision 1.37 2000/11/01 14:05:02 calle - * - use module_init/module_exit from linux/init.h. - * - all static struct variables are initialized with "membername:" now. - * - avm_cs.c, let it work with newer pcmcia-cs. - * - * Revision 1.36 2000/06/26 15:13:41 keil - * features should be or'ed - * - * Revision 1.35 2000/06/19 15:11:25 keil - * avoid use of freed structs - * changes from 2.4.0-ac21 - * - * Revision 1.34 2000/06/19 13:13:55 calle - * Added Modemsupport! - * - * Revision 1.33 2000/05/06 00:52:36 kai - * merged changes from kernel tree - * fixed timer and net_device->name breakage - * - * Revision 1.32 2000/04/07 15:19:58 calle - * remove warnings - * - * Revision 1.31 2000/04/06 15:01:25 calle - * Bugfix: crash in capidrv.c when reseting a capi controller. - * - changed code order on remove of controller. - * - using tq_schedule for notifier in kcapi.c. - * - now using spin_lock_irqsave() and spin_unlock_irqrestore(). - * strange: sometimes even MP hang on unload of isdn.o ... - * - * Revision 1.30 2000/03/03 15:50:42 calle - * - kernel CAPI: - * - Changed parameter "param" in capi_signal from __u32 to void *. - * - rewrote notifier handling in kcapi.c - * - new notifier NCCI_UP and NCCI_DOWN - * - User CAPI: - * - /dev/capi20 is now a cloning device. - * - middleware extentions prepared. - * - capidrv.c - * - locking of list operations and module count updates. - * - * Revision 1.29 1999/12/06 17:13:06 calle - * Added controller watchdog. - * - * Revision 1.28 1999/11/05 16:22:37 calle - * Bugfix: Missing break in switch on ISDN_CMD_HANGUP. - * - * Revision 1.27 1999/09/16 15:13:04 calle - * forgot to change paramter type of contr for lower_callback ... - * - * Revision 1.26 1999/08/06 07:41:16 calle - * Added the "vbox patch". if (si1 == 1) si2 = 0; - * - * Revision 1.25 1999/08/04 10:10:11 calle - * Bugfix: corrected /proc functions, added structure for new AVM cards. - * - * Revision 1.24 1999/07/20 06:48:02 calle - * Bugfix: firmware version check for D2 trace was too restrictiv. - * - * Revision 1.23 1999/07/09 15:05:44 keil - * compat.h is now isdn_compat.h - * - * Revision 1.22 1999/07/06 07:24:14 calle - * Bugfix: call to kfree_skb in capidrv_signal was too early, - * thanks to Lars Heete . - * - * Revision 1.21 1999/07/01 15:26:34 calle - * complete new version (I love it): - * + new hardware independed "capi_driver" interface that will make it easy to: - * - support other controllers with CAPI-2.0 (i.e. USB Controller) - * - write a CAPI-2.0 for the passive cards - * - support serial link CAPI-2.0 boxes. - * + wrote "capi_driver" for all supported cards. - * + "capi_driver" (supported cards) now have to be configured with - * make menuconfig, in the past all supported cards where included - * at once. - * + new and better informations in /proc/capi/ - * + new ioctl to switch trace of capi messages per controller - * using "avmcapictrl trace [contr] on|off|...." - * + complete testcircle with all supported cards and also the - * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done. - * - * Revision 1.20 1999/07/01 08:22:59 keil - * compatibility macros now in - * - * Revision 1.19 1999/06/29 16:16:54 calle - * Let ISDN_CMD_UNLOAD work with open isdn devices without crash again. - * Also right unlocking (ISDN_CMD_UNLOCK) is done now. - * isdnlog should check returncode of read(2) calls. - * - * Revision 1.18 1999/06/21 15:24:15 calle - * extend information in /proc. - * - * Revision 1.17 1999/06/10 16:53:55 calle - * Removing of module b1pci will now remove card from lower level. - * - * Revision 1.16 1999/05/31 11:50:33 calle - * Bugfix: In if_sendbuf, skb_push'ed DATA_B3 header was not skb_pull'ed - * on failure, result in data block with DATA_B3 header transmitted - * - * Revision 1.15 1999/05/25 21:26:16 calle - * Include CAPI-Channelallocation (leased lines) from the 2.0 tree. - * - * Revision 1.14 1999/05/22 07:55:06 calle - * Added *V110* to AVM B1 driver. - * - * Revision 1.13 1998/06/26 15:12:55 fritz - * Added handling of STAT_ICALL with incomplete CPN. - * Added AT&L for ttyI emulator. - * Added more locking stuff in tty_write. - * - * Revision 1.12 1998/03/29 16:06:03 calle - * changes from 2.0 tree merged. - * - * Revision 1.3.2.10 1998/03/20 14:38:24 calle - * capidrv: prepared state machines for suspend/resume/hold - * capidrv: fix bug in state machine if B1/T1 is out of nccis - * b1capi: changed some errno returns. - * b1capi: detect if you try to add same T1 to different io address. - * b1capi: change number of nccis depending on number of channels. - * b1lli: cosmetics - * - * Revision 1.3.2.9 1998/03/20 09:01:12 calle - * Changes capi_register handling to get full support for 30 bchannels. - * - * Revision 1.3.2.8 1998/03/18 17:51:28 calle - * added controller number to error messages - * - * Revision 1.3.2.7 1998/02/27 15:40:47 calle - * T1 running with slow link. bugfix in capi_release. - * - * Revision 1.11 1998/02/13 07:09:15 calle - * change for 2.1.86 (removing FREE_READ/FREE_WRITE from [dev]_kfree_skb() - * - * Revision 1.10 1998/02/02 19:52:23 calle - * Fixed vbox (audio) acceptb. - * - * Revision 1.9 1998/01/31 11:14:45 calle - * merged changes to 2.0 tree, prepare 2.1.82 to work. - * - * Revision 1.8 1997/11/04 06:12:09 calle - * capi.c: new read/write in file_ops since 2.1.60 - * capidrv.c: prepared isdnlog interface for d2-trace in newer firmware. - * capiutil.c: needs config.h (CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON) - * compat.h: added #define LinuxVersionCode - * - * Revision 1.7 1997/10/11 10:36:34 calle - * Added isdnlog support. patch to isdnlog needed. - * - * Revision 1.6 1997/10/11 10:25:55 calle - * New interface for lowlevel drivers. BSENT with nr. of bytes sent, - * allow sending without ACK. - * - * Revision 1.5 1997/10/01 09:21:16 fritz - * Removed old compatibility stuff for 2.0.X kernels. - * From now on, this code is for 2.1.X ONLY! - * Old stuff is still in the separate branch. - * - * Revision 1.4 1997/07/13 12:22:43 calle - * bug fix for more than one controller in connect_req. - * debugoutput now with contrnr. - * - * Revision 1.3 1997/05/18 09:24:15 calle - * added verbose disconnect reason reporting to avmb1. - * some fixes in capi20 interface. - * changed info messages for B1-PCI - * - * Revision 1.2 1997/03/05 21:19:59 fritz - * Removed include of config.h (mkdep stated this is unneded). - * - * Revision 1.1 1997/03/04 21:50:31 calle - * Frirst version in isdn4linux - * - * Revision 2.2 1997/02/12 09:31:39 calle - * new version - * - * Revision 1.1 1997/01/31 10:32:20 calle - * Initial revision - * */ #include @@ -225,7 +33,7 @@ #include "capicmd.h" #include "capidrv.h" -static char *revision = "$Revision: 1.39.6.2 $"; +static char *revision = "$Revision: 1.39.6.6 $"; static int debugmode = 0; MODULE_AUTHOR("Carsten Paeth "); @@ -494,7 +302,7 @@ } -/* -------- controller managment ------------------------------------- */ +/* -------- controller management ------------------------------------- */ static inline capidrv_contr *findcontrbydriverid(int driverid) { @@ -2063,8 +1871,8 @@ __u16 datahandle; if (!card) { - printk(KERN_ERR "capidrv-%d: if_sendbuf called with invalid driverId %d!\n", - card->contrnr, id); + printk(KERN_ERR "capidrv: if_sendbuf called with invalid driverId %d!\n", + id); return 0; } if (debugmode > 1) @@ -2133,8 +1941,8 @@ __u8 *p; if (!card) { - printk(KERN_ERR "capidrv-%d: if_readstat called with invalid driverId %d!\n", - card->contrnr, id); + printk(KERN_ERR "capidrv: if_readstat called with invalid driverId %d!\n", + id); return -ENODEV; } @@ -2490,7 +2298,7 @@ { struct capi_register_params rparam; capi_profile profile; - char rev[10]; + char rev[32]; char *p; __u32 ncontr, contr; __u16 errcode; @@ -2504,12 +2312,13 @@ return -EIO; } - if ((p = strchr(revision, ':'))) { - strcpy(rev, p + 1); - p = strchr(rev, '$'); - *p = 0; + if ((p = strchr(revision, ':')) != 0 && p[1]) { + strncpy(rev, p + 2, sizeof(rev)); + rev[sizeof(rev)-1] = 0; + if ((p = strchr(rev, '$')) != 0 && p > rev) + *(p-1) = 0; } else - strcpy(rev, " ??? "); + strcpy(rev, "1.0"); rparam.level3cnt = -2; /* number of bchannels twice */ rparam.datablkcnt = 16; @@ -2540,7 +2349,7 @@ } proc_init(); - printk(KERN_NOTICE "capidrv: Rev%s: loaded\n", rev); + printk(KERN_NOTICE "capidrv: Rev %s: loaded\n", rev); MOD_DEC_USE_COUNT; return 0; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capidrv.h linux.20p6/drivers/isdn/avmb1/capidrv.h --- linux.vanilla/drivers/isdn/avmb1/capidrv.h Sun Mar 25 17:31:37 2001 +++ linux.20p6/drivers/isdn/avmb1/capidrv.h Mon Jun 25 14:24:29 2001 @@ -1,30 +1,9 @@ /* - * $Id: capidrv.h,v 1.2 1998/03/29 16:06:06 calle Exp $ + * $Id: capidrv.h,v 1.2.8.1 2001/05/17 20:41:51 kai Exp $ * * ISDN4Linux Driver, using capi20 interface (kernelcapi) * * Copyright 1997 by Carsten Paeth (calle@calle.in-berlin.de) - * - * $Log: capidrv.h,v $ - * Revision 1.2 1998/03/29 16:06:06 calle - * changes from 2.0 tree merged. - * - * Revision 1.1.2.1 1998/03/20 14:38:28 calle - * capidrv: prepared state machines for suspend/resume/hold - * capidrv: fix bug in state machine if B1/T1 is out of nccis - * b1capi: changed some errno returns. - * b1capi: detect if you try to add same T1 to different io address. - * b1capi: change number of nccis depending on number of channels. - * b1lli: cosmetics - * - * Revision 1.1 1997/03/04 21:50:33 calle - * Frirst version in isdn4linux - * - * Revision 2.2 1997/02/12 09:31:39 calle - * new version - * - * Revision 1.1 1997/01/31 10:32:20 calle - * Initial revision * */ #ifndef __CAPIDRV_H__ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capifs.c linux.20p6/drivers/isdn/avmb1/capifs.c --- linux.vanilla/drivers/isdn/avmb1/capifs.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/avmb1/capifs.c Mon Jun 25 14:24:29 2001 @@ -1,81 +1,10 @@ /* - * $Id: capifs.c,v 1.14.6.3 2001/02/13 11:43:29 kai Exp $ + * $Id: capifs.c,v 1.14.6.7 2001/05/24 08:29:08 kai Exp $ * * (c) Copyright 2000 by Carsten Paeth (calle@calle.de) * * Heavily based on devpts filesystem from H. Peter Anvin * - * $Log: capifs.c,v $ - * Revision 1.14.6.3 2001/02/13 11:43:29 kai - * more compatility changes for 2.2.19 - * - * Revision 1.14.6.2 2001/02/10 14:41:20 kai - * Changes from kernel tree - * - * Revision 1.14.6.1 2000/11/28 12:02:45 kai - * MODULE_DEVICE_TABLE for 2.4 - * - * Revision 1.14.2.1 2000/11/26 17:47:53 kai - * added PCI_DEV_TABLE for 2.4 - * - * Revision 1.14 2000/11/23 20:45:14 kai - * fixed module_init/exit stuff - * Note: compiled-in kernel doesn't work pre 2.2.18 anymore. - * - * Revision 1.13 2000/11/18 16:17:25 kai - * change from 2.4 tree - * - * Revision 1.12 2000/11/01 14:05:02 calle - * - use module_init/module_exit from linux/init.h. - * - all static struct variables are initialized with "membername:" now. - * - avm_cs.c, let it work with newer pcmcia-cs. - * - * Revision 1.11 2000/10/24 15:08:47 calle - * Too much includes. - * - * Revision 1.10 2000/10/12 10:12:35 calle - * Bugfix: second iput(inode) on umount, destroies a foreign inode. - * - * Revision 1.9 2000/08/20 07:30:13 keil - * changes for 2.4 - * - * Revision 1.8 2000/07/20 10:23:13 calle - * Include isdn_compat.h for people that don't use -p option of std2kern. - * - * Revision 1.7 2000/06/18 16:09:54 keil - * more changes for 2.4 - * - * Revision 1.6 2000/04/03 13:29:25 calle - * make Tim Waugh happy (module unload races in 2.3.99-pre3). - * no real problem there, but now it is much cleaner ... - * - * Revision 1.5 2000/03/13 17:49:52 calle - * make it running with 2.3.51. - * - * Revision 1.4 2000/03/08 17:06:33 calle - * - changes for devfs and 2.3.49 - * - capifs now configurable (no need with devfs) - * - New Middleware ioctl CAPI_NCCI_GETUNIT - * - Middleware again tested with 2.2.14 and 2.3.49 (with and without devfs) - * - * Revision 1.3 2000/03/06 18:00:23 calle - * - Middleware extention now working with 2.3.49 (capifs). - * - Fixed typos in debug section of capi.c - * - Bugfix: Makefile corrected for b1pcmcia.c - * - * Revision 1.2 2000/03/06 09:17:07 calle - * - capifs: fileoperations now in inode (change for 2.3.49) - * - Config.in: Middleware extention not a tristate, uups. - * - * Revision 1.1 2000/03/03 16:48:38 calle - * - Added CAPI2.0 Middleware support (CONFIG_ISDN_CAPI) - * It is now possible to create a connection with a CAPI2.0 applikation - * and than to handle the data connection from /dev/capi/ (capifs) and also - * using async or sync PPP on this connection. - * The two major device number 190 and 191 are not confirmed yet, - * but I want to save the code in cvs, before I go on. - * - * */ #include @@ -94,12 +23,13 @@ #include #include #include +#include #include #include MODULE_AUTHOR("Carsten Paeth "); -static char *revision = "$Revision: 1.14.6.3 $"; +static char *revision = "$Revision: 1.14.6.7 $"; struct capifs_ncci { struct inode *inode; @@ -279,24 +209,16 @@ kfree(sbi->nccis); kfree(sbi); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,51) MOD_DEC_USE_COUNT; -#endif } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,51) static int capifs_statfs(struct super_block *sb, struct statfs *buf, int bufsiz); static void capifs_write_inode(struct inode *inode) { }; -#else -static int capifs_statfs(struct super_block *sb, struct statfs *buf); -#endif static void capifs_read_inode(struct inode *inode); static struct super_operations capifs_sops = { read_inode: capifs_read_inode, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,51) write_inode: capifs_write_inode, -#endif put_super: capifs_put_super, statfs: capifs_statfs, }; @@ -367,10 +289,8 @@ struct dentry * root; struct capifs_sb_info *sbi; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,51) MOD_INC_USE_COUNT; lock_super(s); -#endif /* Super block already completed? */ if (s->s_root) goto out; @@ -446,19 +366,14 @@ mounts = s; out: /* Success ... somebody else completed the super block for us. */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,51) unlock_super(s); -#endif return s; fail: -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,51) unlock_super(s); MOD_DEC_USE_COUNT; -#endif return NULL; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,51) static int capifs_statfs(struct super_block *sb, struct statfs *buf, int bufsiz) { struct statfs tmp; @@ -473,20 +388,6 @@ tmp.f_namelen = NAME_MAX; return copy_to_user(buf, &tmp, bufsiz) ? -EFAULT : 0; } -#else -static int capifs_statfs(struct super_block *sb, struct statfs *buf) -{ - buf->f_type = CAPIFS_SUPER_MAGIC; - buf->f_bsize = 1024; - buf->f_blocks = 0; - buf->f_bfree = 0; - buf->f_bavail = 0; - buf->f_files = 0; - buf->f_ffree = 0; - buf->f_namelen = NAME_MAX; - return 0; -} -#endif static void capifs_read_inode(struct inode *inode) { @@ -517,16 +418,12 @@ return; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,51) static struct file_system_type capifs_fs_type = { "capifs", 0, capifs_read_super, NULL }; -#else -static DECLARE_FSTYPE(capifs_fs_type, "capifs", capifs_read_super, 0); -#endif void capifs_new_ncci(char type, unsigned int num, kdev_t device) { @@ -547,8 +444,7 @@ break; } } - - if ((np->inode = iget(sb, ino+2)) != 0) { + if ((np->inode = iget(sb, ino+2)) != NULL) { struct inode *inode = np->inode; inode->i_uid = sbi->setuid ? sbi->uid : current->fsuid; inode->i_gid = sbi->setgid ? sbi->gid : current->fsgid; @@ -587,16 +483,17 @@ static int __init capifs_init(void) { - char rev[10]; + char rev[32]; char *p; int err; MOD_INC_USE_COUNT; - if ((p = strchr(revision, ':'))) { - strcpy(rev, p + 1); - p = strchr(rev, '$'); - *p = 0; + if ((p = strchr(revision, ':')) != 0 && p[1]) { + strncpy(rev, p + 2, sizeof(rev)); + rev[sizeof(rev)-1] = 0; + if ((p = strchr(rev, '$')) != 0 && p > rev) + *(p-1) = 0; } else strcpy(rev, "1.0"); @@ -605,11 +502,7 @@ MOD_DEC_USE_COUNT; return err; } -#ifdef MODULE - printk(KERN_NOTICE "capifs: Rev%s: loaded\n", rev); -#else - printk(KERN_NOTICE "capifs: Rev%s: started\n", rev); -#endif + printk(KERN_NOTICE "capifs: Rev %s\n", rev); MOD_DEC_USE_COUNT; return 0; } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capifs.h linux.20p6/drivers/isdn/avmb1/capifs.h --- linux.vanilla/drivers/isdn/avmb1/capifs.h Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/avmb1/capifs.h Mon Jun 25 14:24:29 2001 @@ -1,23 +1,7 @@ /* - * $Id: capifs.h,v 1.2 2000/03/08 17:06:33 calle Exp $ + * $Id: capifs.h,v 1.2.6.1 2001/05/17 20:41:51 kai Exp $ * * (c) Copyright 2000 by Carsten Paeth (calle@calle.de) - * - * $Log: capifs.h,v $ - * Revision 1.2 2000/03/08 17:06:33 calle - * - changes for devfs and 2.3.49 - * - capifs now configurable (no need with devfs) - * - New Middleware ioctl CAPI_NCCI_GETUNIT - * - Middleware again tested with 2.2.14 and 2.3.49 (with and without devfs) - * - * Revision 1.1 2000/03/03 16:48:38 calle - * - Added CAPI2.0 Middleware support (CONFIG_ISDN_CAPI) - * It is now possible to create a connection with a CAPI2.0 applikation - * and than to handle the data connection from /dev/capi/ (capifs) and also - * using async or sync PPP on this connection. - * The two major device number 190 and 191 are not confirmed yet, - * but I want to save the code in cvs, before I go on. - * * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capiutil.c linux.20p6/drivers/isdn/avmb1/capiutil.c --- linux.vanilla/drivers/isdn/avmb1/capiutil.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/avmb1/capiutil.c Mon Jun 25 14:24:29 2001 @@ -1,91 +1,11 @@ /* - * $Id: capiutil.c,v 1.13.6.1 2001/02/13 11:43:29 kai Exp $ + * $Id: capiutil.c,v 1.13.6.3 2001/05/17 20:41:51 kai Exp $ * * CAPI 2.0 convert capi message to capi message struct * * From CAPI 2.0 Development Kit AVM 1995 (msg.c) * Rewritten for Linux 1996 by Carsten Paeth (calle@calle.in-berlin.de) * - * $Log: capiutil.c,v $ - * Revision 1.13.6.1 2001/02/13 11:43:29 kai - * more compatility changes for 2.2.19 - * - * Revision 1.13 2000/11/23 20:45:14 kai - * fixed module_init/exit stuff - * Note: compiled-in kernel doesn't work pre 2.2.18 anymore. - * - * Revision 1.12 2000/11/01 14:05:02 calle - * - use module_init/module_exit from linux/init.h. - * - all static struct variables are initialized with "membername:" now. - * - avm_cs.c, let it work with newer pcmcia-cs. - * - * Revision 1.11 2000/03/03 15:50:42 calle - * - kernel CAPI: - * - Changed parameter "param" in capi_signal from __u32 to void *. - * - rewrote notifier handling in kcapi.c - * - new notifier NCCI_UP and NCCI_DOWN - * - User CAPI: - * - /dev/capi20 is now a cloning device. - * - middleware extentions prepared. - * - capidrv.c - * - locking of list operations and module count updates. - * - * Revision 1.10 1999/08/31 11:19:54 paul - * various spelling corrections (new checksums may be needed, Karsten!) - * - * Revision 1.9 1999/07/09 15:05:46 keil - * compat.h is now isdn_compat.h - * - * Revision 1.8 1999/07/01 15:26:37 calle - * complete new version (I love it): - * + new hardware independed "capi_driver" interface that will make it easy to: - * - support other controllers with CAPI-2.0 (i.e. USB Controller) - * - write a CAPI-2.0 for the passive cards - * - support serial link CAPI-2.0 boxes. - * + wrote "capi_driver" for all supported cards. - * + "capi_driver" (supported cards) now have to be configured with - * make menuconfig, in the past all supported cards where included - * at once. - * + new and better informations in /proc/capi/ - * + new ioctl to switch trace of capi messages per controller - * using "avmcapictrl trace [contr] on|off|...." - * + complete testcircle with all supported cards and also the - * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done. - * - * Revision 1.7 1999/07/01 08:23:01 keil - * compatibility macros now in - * - * Revision 1.6 1997/11/04 06:12:12 calle - * capi.c: new read/write in file_ops since 2.1.60 - * capidrv.c: prepared isdnlog interface for d2-trace in newer firmware. - * capiutil.c: needs config.h (CONFIG_ISDN_DRV_AVMB1_VERBOSE_REASON) - * compat.h: added #define LinuxVersionCode - * - * Revision 1.5 1997/10/01 09:21:19 fritz - * Removed old compatibility stuff for 2.0.X kernels. - * From now on, this code is for 2.1.X ONLY! - * Old stuff is still in the separate branch. - * - * Revision 1.4 1997/08/10 07:43:55 calle - * forgot to export symbol capi_info2str for 2.1.x - * - * Revision 1.3 1997/05/18 09:24:18 calle - * added verbose disconnect reason reporting to avmb1. - * some fixes in capi20 interface. - * changed info messages for B1-PCI - * - * Revision 1.2 1997/03/05 21:22:13 fritz - * Fix: Symbols have to be exported unconditionally. - * - * Revision 1.1 1997/03/04 21:50:34 calle - * Frirst version in isdn4linux - * - * Revision 2.2 1997/02/12 09:31:39 calle - * new version - * - * Revision 1.1 1997/01/31 10:32:20 calle - * Initial revision - * */ #include #include @@ -96,7 +16,7 @@ #include #include #include - +#include #include "capiutil.h" /* from CAPI2.0 DDK AVM Berlin GmbH */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/capiutil.h linux.20p6/drivers/isdn/avmb1/capiutil.h --- linux.vanilla/drivers/isdn/avmb1/capiutil.h Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/avmb1/capiutil.h Mon Jun 25 14:24:29 2001 @@ -1,45 +1,10 @@ /* - * $Id: capiutil.h,v 1.5 2000/03/03 15:50:42 calle Exp $ + * $Id: capiutil.h,v 1.5.6.1 2001/05/17 20:41:51 kai Exp $ * * CAPI 2.0 defines & types * * From CAPI 2.0 Development Kit AVM 1995 (capi20.h) * Rewritten for Linux 1996 by Carsten Paeth (calle@calle.in-berlin.de) - * - * $Log: capiutil.h,v $ - * Revision 1.5 2000/03/03 15:50:42 calle - * - kernel CAPI: - * - Changed parameter "param" in capi_signal from __u32 to void *. - * - rewrote notifier handling in kcapi.c - * - new notifier NCCI_UP and NCCI_DOWN - * - User CAPI: - * - /dev/capi20 is now a cloning device. - * - middleware extentions prepared. - * - capidrv.c - * - locking of list operations and module count updates. - * - * Revision 1.4 1999/09/15 08:16:03 calle - * Implementation of 64Bit extention complete. - * - * Revision 1.3 1999/09/07 09:02:53 calle - * SETDATA removed. Now inside the kernel the datapart of DATA_B3_REQ and - * DATA_B3_IND is always directly after the CAPI message. The "Data" member - * ist never used inside the kernel. - * - * Revision 1.2 1997/05/18 09:24:19 calle - * added verbose disconnect reason reporting to avmb1. - * some fixes in capi20 interface. - * changed info messages for B1-PCI - * - * Revision 1.1 1997/03/04 21:50:35 calle - * Frirst version in isdn4linux - * - * Revision 2.2 1997/02/12 09:31:39 calle - * new version - * - * Revision 1.1 1997/01/31 10:32:20 calle - * Initial revision - * * */ #ifndef __CAPIUTIL_H__ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/kcapi.c linux.20p6/drivers/isdn/avmb1/kcapi.c --- linux.vanilla/drivers/isdn/avmb1/kcapi.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/avmb1/kcapi.c Mon Jun 25 14:24:31 2001 @@ -1,119 +1,10 @@ /* - * $Id: kcapi.c,v 1.21.6.2 2001/02/13 11:43:29 kai Exp $ + * $Id: kcapi.c,v 1.21.6.7 2001/06/09 15:14:15 kai Exp $ * * Kernel CAPI 2.0 Module * * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de) * - * $Log: kcapi.c,v $ - * Revision 1.21.6.2 2001/02/13 11:43:29 kai - * more compatility changes for 2.2.19 - * - * Revision 1.21.6.1 2000/12/10 23:39:19 kai - * in 2.4 we don't have tq_scheduler anymore. - * also add one supported card to hfc_pci.c - * (from main branch) - * - * Revision 1.21 2000/11/23 20:45:14 kai - * fixed module_init/exit stuff - * Note: compiled-in kernel doesn't work pre 2.2.18 anymore. - * - * Revision 1.20 2000/11/19 17:01:53 kai - * compatibility cleanup - part 2 - * - * Revision 1.19 2000/11/01 14:05:02 calle - * - use module_init/module_exit from linux/init.h. - * - all static struct variables are initialized with "membername:" now. - * - avm_cs.c, let it work with newer pcmcia-cs. - * - * Revision 1.18 2000/07/20 10:22:27 calle - * - Made procfs function cleaner and removed variable "begin". - * - * Revision 1.17 2000/04/21 13:00:56 calle - * Bugfix: driver_proc_info was also wrong. - * - * Revision 1.16 2000/04/21 12:38:42 calle - * Bugfix: error in proc_ functions, begin-off => off-begin - * - * Revision 1.15 2000/04/06 15:01:25 calle - * Bugfix: crash in capidrv.c when reseting a capi controller. - * - changed code order on remove of controller. - * - using tq_schedule for notifier in kcapi.c. - * - now using spin_lock_irqsave() and spin_unlock_irqrestore(). - * strange: sometimes even MP hang on unload of isdn.o ... - * - * Revision 1.14 2000/04/03 13:29:25 calle - * make Tim Waugh happy (module unload races in 2.3.99-pre3). - * no real problem there, but now it is much cleaner ... - * - * Revision 1.13 2000/03/03 15:50:42 calle - * - kernel CAPI: - * - Changed parameter "param" in capi_signal from __u32 to void *. - * - rewrote notifier handling in kcapi.c - * - new notifier NCCI_UP and NCCI_DOWN - * - User CAPI: - * - /dev/capi20 is now a cloning device. - * - middleware extentions prepared. - * - capidrv.c - * - locking of list operations and module count updates. - * - * Revision 1.12 2000/01/28 16:45:39 calle - * new manufacturer command KCAPI_CMD_ADDCARD (generic addcard), - * will search named driver and call the add_card function if one exist. - * - * Revision 1.11 1999/11/23 13:29:29 calle - * Bugfix: incoming capi message were never traced. - * - * Revision 1.10 1999/10/26 15:30:32 calle - * Generate error message if user want to add card, but driver module is - * not loaded. - * - * Revision 1.9 1999/10/11 22:04:12 keil - * COMPAT_NEED_UACCESS (no include in isdn_compat.h) - * - * Revision 1.8 1999/09/10 17:24:18 calle - * Changes for proposed standard for CAPI2.0: - * - AK148 "Linux Exention" - * - * Revision 1.7 1999/09/04 06:20:05 keil - * Changes from kernel set_current_state() - * - * Revision 1.6 1999/07/20 06:41:49 calle - * Bugfix: After the redesign of the AVM B1 driver, the driver didn't even - * compile, if not selected as modules. - * - * Revision 1.5 1999/07/09 15:05:48 keil - * compat.h is now isdn_compat.h - * - * Revision 1.4 1999/07/08 14:15:17 calle - * Forgot to count down ncards in drivercb_detach_ctr. - * - * Revision 1.3 1999/07/06 07:42:02 calle - * - changes in /proc interface - * - check and changed calls to [dev_]kfree_skb and [dev_]alloc_skb. - * - * Revision 1.2 1999/07/05 15:09:52 calle - * - renamed "appl_release" to "appl_released". - * - version und profile data now cleared on controller reset - * - extended /proc interface, to allow driver and controller specific - * informations to include by driver hackers. - * - * Revision 1.1 1999/07/01 15:26:42 calle - * complete new version (I love it): - * + new hardware independed "capi_driver" interface that will make it easy to: - * - support other controllers with CAPI-2.0 (i.e. USB Controller) - * - write a CAPI-2.0 for the passive cards - * - support serial link CAPI-2.0 boxes. - * + wrote "capi_driver" for all supported cards. - * + "capi_driver" (supported cards) now have to be configured with - * make menuconfig, in the past all supported cards where included - * at once. - * + new and better informations in /proc/capi/ - * + new ioctl to switch trace of capi messages per controller - * using "avmcapictrl trace [contr] on|off|...." - * + complete testcircle with all supported cards and also the - * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done. - * */ #define CONFIG_AVMB1_COMPAT @@ -127,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -139,7 +31,7 @@ #include #endif -static char *revision = "$Revision: 1.21.6.2 $"; +static char *revision = "$Revision: 1.21.6.7 $"; /* ------------------------------------------------------------- */ @@ -814,7 +706,7 @@ } } /* - * ncci managment + * ncci management */ static void controllercb_new_ncci(struct capi_ctr * card, @@ -1235,14 +1127,12 @@ static __u16 capi_release(__u16 applid) { - struct sk_buff *skb; int i; if (!VALID_APPLID(applid) || APPL(applid)->releasing) return CAPI_ILLAPPNR; APPL(applid)->releasing++; - while ((skb = skb_dequeue(&APPL(applid)->recv_queue)) != 0) - kfree_skb(skb); + skb_queue_purge(&APPL(applid)->recv_queue); for (i = 0; i < CAPI_MAXCONTR; i++) { if (cards[i].cardstate != CARD_RUNNING) continue; @@ -1752,7 +1642,7 @@ static int __init kcapi_init(void) { char *p; - char rev[10]; + char rev[32]; MOD_INC_USE_COUNT; @@ -1766,17 +1656,18 @@ proc_capi_init(); - if ((p = strchr(revision, ':'))) { - strcpy(rev, p + 1); - p = strchr(rev, '$'); - *p = 0; + if ((p = strchr(revision, ':')) != 0 && p[1]) { + strncpy(rev, p + 2, sizeof(rev)); + rev[sizeof(rev)-1] = 0; + if ((p = strchr(rev, '$')) != 0 && p > rev) + *(p-1) = 0; } else strcpy(rev, "1.0"); #ifdef MODULE - printk(KERN_NOTICE "CAPI-driver Rev%s: loaded\n", rev); + printk(KERN_NOTICE "CAPI-driver Rev %s: loaded\n", rev); #else - printk(KERN_NOTICE "CAPI-driver Rev%s: started\n", rev); + printk(KERN_NOTICE "CAPI-driver Rev %s: started\n", rev); #endif MOD_DEC_USE_COUNT; return 0; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/t1isa.c linux.20p6/drivers/isdn/avmb1/t1isa.c --- linux.vanilla/drivers/isdn/avmb1/t1isa.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/avmb1/t1isa.c Mon Jun 25 14:24:39 2001 @@ -1,95 +1,10 @@ /* - * $Id: t1isa.c,v 1.16.6.1 2001/02/13 11:43:29 kai Exp $ + * $Id: t1isa.c,v 1.16.6.6 2001/05/17 21:15:33 kai Exp $ * * Module for AVM T1 HEMA-card. * * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de) * - * $Log: t1isa.c,v $ - * Revision 1.16.6.1 2001/02/13 11:43:29 kai - * more compatility changes for 2.2.19 - * - * Revision 1.16 2000/11/23 20:45:14 kai - * fixed module_init/exit stuff - * Note: compiled-in kernel doesn't work pre 2.2.18 anymore. - * - * Revision 1.15 2000/11/01 14:05:02 calle - * - use module_init/module_exit from linux/init.h. - * - all static struct variables are initialized with "membername:" now. - * - avm_cs.c, let it work with newer pcmcia-cs. - * - * Revision 1.14 2000/10/10 17:44:19 kai - * changes from/for 2.2.18 - * - * Revision 1.13 2000/08/04 15:36:31 calle - * copied wrong from file to file :-( - * - * Revision 1.12 2000/08/04 12:20:08 calle - * - Fix unsigned/signed warning in the right way ... - * - * Revision 1.11 2000/04/03 13:29:25 calle - * make Tim Waugh happy (module unload races in 2.3.99-pre3). - * no real problem there, but now it is much cleaner ... - * - * Revision 1.10 2000/02/02 18:36:04 calle - * - Modules are now locked while init_module is running - * - fixed problem with memory mapping if address is not aligned - * - * Revision 1.9 2000/01/25 14:37:39 calle - * new message after successfull detection including card revision and - * used resources. - * - * Revision 1.8 1999/11/05 16:38:01 calle - * Cleanups before kernel 2.4: - * - Changed all messages to use card->name or driver->name instead of - * constant string. - * - Moved some data from struct avmcard into new struct avmctrl_info. - * Changed all lowlevel capi driver to match the new structur. - * - * Revision 1.7 1999/09/15 08:16:03 calle - * Implementation of 64Bit extention complete. - * - * Revision 1.6 1999/09/07 09:02:53 calle - * SETDATA removed. Now inside the kernel the datapart of DATA_B3_REQ and - * DATA_B3_IND is always directly after the CAPI message. The "Data" member - * ist never used inside the kernel. - * - * Revision 1.5 1999/08/22 20:26:28 calle - * backported changes from kernel 2.3.14: - * - several #include "config.h" gone, others come. - * - "struct device" changed to "struct net_device" in 2.3.14, added a - * define in isdn_compat.h for older kernel versions. - * - * Revision 1.4 1999/07/09 15:05:50 keil - * compat.h is now isdn_compat.h - * - * Revision 1.3 1999/07/06 07:42:04 calle - * - changes in /proc interface - * - check and changed calls to [dev_]kfree_skb and [dev_]alloc_skb. - * - * Revision 1.2 1999/07/05 15:09:54 calle - * - renamed "appl_release" to "appl_released". - * - version und profile data now cleared on controller reset - * - extended /proc interface, to allow driver and controller specific - * informations to include by driver hackers. - * - * Revision 1.1 1999/07/01 15:26:44 calle - * complete new version (I love it): - * + new hardware independed "capi_driver" interface that will make it easy to: - * - support other controllers with CAPI-2.0 (i.e. USB Controller) - * - write a CAPI-2.0 for the passive cards - * - support serial link CAPI-2.0 boxes. - * + wrote "capi_driver" for all supported cards. - * + "capi_driver" (supported cards) now have to be configured with - * make menuconfig, in the past all supported cards where included - * at once. - * + new and better informations in /proc/capi/ - * + new ioctl to switch trace of capi messages per controller - * using "avmcapictrl trace [contr] on|off|...." - * + complete testcircle with all supported cards and also the - * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done. - * - * */ #include @@ -100,14 +15,16 @@ #include #include #include +#include #include +#include #include #include "capicmd.h" #include "capiutil.h" #include "capilli.h" #include "avmcard.h" -static char *revision = "$Revision: 1.16.6.1 $"; +static char *revision = "$Revision: 1.16.6.6 $"; /* ------------------------------------------------------------- */ @@ -401,7 +318,7 @@ cli(); b1_setinterrupt(port, card->irq, card->cardtype); b1_put_byte(port, SEND_INIT); - b1_put_word(port, AVM_NAPPS); + b1_put_word(port, CAPI_MAXAPPL); b1_put_word(port, AVM_NCCI_PER_CHANNEL*30); b1_put_word(port, ctrl->cnr - 1); restore_flags(flags); @@ -628,10 +545,11 @@ MOD_INC_USE_COUNT; - if ((p = strchr(revision, ':'))) { - strncpy(driver->revision, p + 1, sizeof(driver->revision)); - p = strchr(driver->revision, '$'); - *p = 0; + if ((p = strchr(revision, ':')) != 0 && p[1]) { + strncpy(driver->revision, p + 2, sizeof(driver->revision)); + driver->revision[sizeof(driver->revision)-1] = 0; + if ((p = strchr(driver->revision, '$')) != 0 && p > driver->revision) + *(p-1) = 0; } printk(KERN_INFO "%s: revision %s\n", driver->name, driver->revision); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/avmb1/t1pci.c linux.20p6/drivers/isdn/avmb1/t1pci.c --- linux.vanilla/drivers/isdn/avmb1/t1pci.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/avmb1/t1pci.c Mon Jun 25 14:24:39 2001 @@ -1,77 +1,10 @@ /* - * $Id: t1pci.c,v 1.13.6.2 2001/02/13 11:43:29 kai Exp $ + * $Id: t1pci.c,v 1.13.6.5 2001/05/17 20:41:51 kai Exp $ * * Module for AVM T1 PCI-card. * * (c) Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de) * - * $Log: t1pci.c,v $ - * Revision 1.13.6.2 2001/02/13 11:43:29 kai - * more compatility changes for 2.2.19 - * - * Revision 1.13.6.1 2000/11/28 12:02:45 kai - * MODULE_DEVICE_TABLE for 2.4 - * - * Revision 1.13.2.2 2000/11/26 17:47:53 kai - * added PCI_DEV_TABLE for 2.4 - * - * Revision 1.13.2.1 2000/11/26 17:14:19 kai - * fix device ids - * also needs patches to include/linux/pci_ids.h - * - * Revision 1.13 2000/11/23 20:45:14 kai - * fixed module_init/exit stuff - * Note: compiled-in kernel doesn't work pre 2.2.18 anymore. - * - * Revision 1.12 2000/11/01 14:05:02 calle - * - use module_init/module_exit from linux/init.h. - * - all static struct variables are initialized with "membername:" now. - * - avm_cs.c, let it work with newer pcmcia-cs. - * - * Revision 1.11 2000/08/08 09:24:19 calle - * calls to pci_enable_device surounded by #ifndef COMPAT_HAS_2_2_PCI - * - * Revision 1.10 2000/07/20 10:21:21 calle - * Bugfix: driver will not be unregistered, if not cards were detected. - * this result in an oops in kcapi.c - * - * Revision 1.9 2000/05/19 15:43:22 calle - * added calls to pci_device_start(). - * - * Revision 1.8 2000/05/06 00:52:36 kai - * merged changes from kernel tree - * fixed timer and net_device->name breakage - * - * Revision 1.7 2000/04/07 15:26:55 calle - * better error message if cabel not connected or T1 has no power. - * - * Revision 1.6 2000/04/03 13:29:25 calle - * make Tim Waugh happy (module unload races in 2.3.99-pre3). - * no real problem there, but now it is much cleaner ... - * - * Revision 1.5 2000/02/02 18:36:04 calle - * - Modules are now locked while init_module is running - * - fixed problem with memory mapping if address is not aligned - * - * Revision 1.4 2000/01/25 14:33:38 calle - * - Added Support AVM B1 PCI V4.0 (tested with prototype) - * - splitted up t1pci.c into b1dma.c for common function with b1pciv4 - * - support for revision register - * - * Revision 1.3 1999/11/13 21:27:16 keil - * remove KERNELVERSION - * - * Revision 1.2 1999/11/05 16:38:02 calle - * Cleanups before kernel 2.4: - * - Changed all messages to use card->name or driver->name instead of - * constant string. - * - Moved some data from struct avmcard into new struct avmctrl_info. - * Changed all lowlevel capi driver to match the new structur. - * - * Revision 1.1 1999/10/26 15:31:42 calle - * Added driver for T1-PCI card. - * - * */ #include @@ -92,7 +25,7 @@ #include "capilli.h" #include "avmcard.h" -static char *revision = "$Revision: 1.13.6.2 $"; +static char *revision = "$Revision: 1.13.6.5 $"; #undef CONFIG_T1PCI_DEBUG #undef CONFIG_T1PCI_POLLDEBUG @@ -116,7 +49,7 @@ di->detach_ctr(ctrl); free_irq(card->irq, card); - iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK)); + iounmap(card->mbase); release_region(card->port, AVMB1_PORTLEN); ctrl->driverdata = 0; kfree(card->ctrlinfo); @@ -130,7 +63,6 @@ static int t1pci_add_card(struct capi_driver *driver, struct capicardparams *p) { - unsigned long base, page_offset; avmcard *card; avmctrl_info *cinfo; int retval; @@ -181,12 +113,8 @@ return -EBUSY; } - base = card->membase & PAGE_MASK; - page_offset = card->membase - base; - card->mbase = ioremap_nocache(base, page_offset + 64); - if (card->mbase) { - card->mbase += page_offset; - } else { + card->mbase = ioremap_nocache(card->membase, 64); + if (!card->mbase) { printk(KERN_NOTICE "%s: can't remap memory at 0x%lx\n", driver->name, card->membase); kfree(card->ctrlinfo); @@ -205,7 +133,7 @@ else printk(KERN_NOTICE "%s: card at 0x%x, but cabel not connected or T1 has no power (%d)\n", driver->name, card->port, retval); - iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK)); + iounmap(card->mbase); kfree(card->ctrlinfo); kfree(card->dma); kfree(card); @@ -220,7 +148,7 @@ if (retval) { printk(KERN_ERR "%s: unable to get IRQ %d.\n", driver->name, card->irq); - iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK)); + iounmap(card->mbase); release_region(card->port, AVMB1_PORTLEN); kfree(card->ctrlinfo); kfree(card->dma); @@ -232,7 +160,7 @@ cinfo->capi_ctrl = di->attach_ctr(driver, card->name, cinfo); if (!cinfo->capi_ctrl) { printk(KERN_ERR "%s: attach controller failed.\n", driver->name); - iounmap((void *) (((unsigned long) card->mbase) & PAGE_MASK)); + iounmap(card->mbase); free_irq(card->irq, card); release_region(card->port, AVMB1_PORTLEN); kfree(card->ctrlinfo); @@ -300,16 +228,16 @@ MOD_INC_USE_COUNT; - if ((p = strchr(revision, ':'))) { - strncpy(driver->revision, p + 1, sizeof(driver->revision)); - p = strchr(driver->revision, '$'); - *p = 0; + if ((p = strchr(revision, ':')) != 0 && p[1]) { + strncpy(driver->revision, p + 2, sizeof(driver->revision)); + driver->revision[sizeof(driver->revision)-1] = 0; + if ((p = strchr(driver->revision, '$')) != 0 && p > driver->revision) + *(p-1) = 0; } printk(KERN_INFO "%s: revision %s\n", driver->name, driver->revision); di = attach_capi_driver(driver); - if (!di) { printk(KERN_ERR "%s: failed to attach capi_driver\n", driver->name); @@ -317,22 +245,20 @@ return -EIO; } -#ifdef CONFIG_PCI - if (!pci_present()) { - printk(KERN_ERR "%s: no PCI bus present\n", driver->name); - detach_capi_driver(driver); - MOD_DEC_USE_COUNT; - return -EIO; - } - while ((dev = pci_find_device(PCI_VENDOR_ID_AVM, PCI_DEVICE_ID_AVM_T1, dev))) { struct capicardparams param; + if (pci_enable_device(dev) < 0) { + printk(KERN_ERR "%s: failed to enable AVM-T1-PCI\n", + driver->name); + continue; + } + pci_set_master(dev); + param.port = dev->base_address[ 1] & PCI_BASE_ADDRESS_IO_MASK; param.irq = dev->irq; param.membase = dev->base_address[ 0] & PCI_BASE_ADDRESS_MEM_MASK; - printk(KERN_INFO "%s: PCI BIOS reports AVM-T1-PCI at i/o %#x, irq %d, mem %#x\n", driver->name, param.port, param.irq, param.membase); @@ -341,9 +267,7 @@ printk(KERN_ERR "%s: no AVM-T1-PCI at i/o %#x, irq %d detected, mem %#x\n", driver->name, param.port, param.irq, param.membase); - detach_capi_driver(&t1pci_driver); - MOD_DEC_USE_COUNT; - return retval; + continue; } ncards++; } @@ -356,12 +280,7 @@ printk(KERN_ERR "%s: NO T1-PCI card detected\n", driver->name); detach_capi_driver(&t1pci_driver); MOD_DEC_USE_COUNT; - return -ESRCH; -#else - printk(KERN_ERR "%s: kernel not compiled with PCI.\n", driver->name); - MOD_DEC_USE_COUNT; - return -EIO; -#endif + return -ENODEV; } static void t1pci_exit(void) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/divert/isdn_divert.c linux.20p6/drivers/isdn/divert/isdn_divert.c --- linux.vanilla/drivers/isdn/divert/isdn_divert.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/divert/isdn_divert.c Fri May 4 23:24:34 2001 @@ -1,5 +1,5 @@ /* - * $Id: isdn_divert.c,v 1.6.6.1 2001/02/07 11:31:31 kai Exp $ + * $Id: isdn_divert.c,v 1.6.6.2 2001/02/16 16:43:25 kai Exp $ * * DSS1 main diversion supplementary handling for i4l. * @@ -290,7 +290,7 @@ /* insert a new rule before idx */ /********************************/ int insertrule(int idx, divert_rule *newrule) -{ struct deflect_struc *ds,*ds1; +{ struct deflect_struc *ds,*ds1=NULL; int flags; if (!(ds = (struct deflect_struc *) kmalloc(sizeof(struct deflect_struc), diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/eicon_idi.c linux.20p6/drivers/isdn/eicon/eicon_idi.c --- linux.vanilla/drivers/isdn/eicon/eicon_idi.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/eicon/eicon_idi.c Fri May 4 23:09:23 2001 @@ -2221,7 +2221,10 @@ static char *connmsg[] = {"", "V.21", "V.23", "V.22", "V.22bis", "V.32bis", "V.34", "V.8", "Bell 212A", "Bell 103", "V.29 Leased", "V.33 Leased", "V.90", - "V.21 CH2", "V.27ter", "V.29", "V.33", "V.17"}; + "V.21 CH2", "V.27ter", "V.29", "V.33", "V.17", "V.32", "K56Flex", + "X2", "V.18", "V.18LH", "V.18HL", "V.21LH", "V.21HL", + "Bell 103LH", "Bell 103HL", "V.23", "V.23", "EDT 110", + "Baudot45", "Baudot47", "Baudot50", "DTMF" }; static u_char dtmf_code[] = { '1','4','7','*','2','5','8','0','3','6','9','#','A','B','C','D' }; @@ -2243,7 +2246,11 @@ cmd.driver = ccard->myid; cmd.command = ISDN_STAT_BCONN; cmd.arg = chan->No; - sprintf(cmd.parm.num, "%d/%s", p->speed, connmsg[p->norm]); + if (p->norm > 34) { + sprintf(cmd.parm.num, "%d/(%d)", p->speed, p->norm); + } else { + sprintf(cmd.parm.num, "%d/%s", p->speed, connmsg[p->norm]); + } ccard->interface.statcallb(&cmd); } eicon_log(ccard, 8, "idi_ind: Ch%d: UDATA_DCD_ON time %d\n", chan->No, p->time); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/eicon/idi.h linux.20p6/drivers/isdn/eicon/idi.h --- linux.vanilla/drivers/isdn/eicon/idi.h Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/eicon/idi.h Sat May 5 00:02:19 2001 @@ -62,7 +62,7 @@ struct postcall_s { word command; /* command = 0x0300 */ word dummy; /* not used */ - IDI_CALL callback; /* routine adress to call back */ + IDI_CALL callback; /* routine address to call back */ ENTITY *contxt; /* ptr to entity to use */ }; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/amd7930.c linux.20p6/drivers/isdn/hisax/amd7930.c --- linux.vanilla/drivers/isdn/hisax/amd7930.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/amd7930.c Mon Jun 25 14:24:31 2001 @@ -1,4 +1,4 @@ -/* $Id: amd7930.c,v 1.5 2000/11/24 17:05:37 kai Exp $ +/* $Id: amd7930.c,v 1.5.6.3 2001/06/11 22:08:37 kai Exp $ * * HiSax ISDN driver - chip specific routines for AMD 7930 * @@ -14,7 +14,7 @@ * * The code is unreliable enough to be consider alpha * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * * Advanced Micro Devices' Am79C30A is an ISDN/audio chip used in the * SparcStation 1+. The chip provides microphone and speaker interfaces @@ -94,7 +94,7 @@ #include "rawhdlc.h" #include -static const char *amd7930_revision = "$Revision: 1.5 $"; +static const char *amd7930_revision = "$Revision: 1.5.6.3 $"; #define RCV_BUFSIZE 1024 /* Size of raw receive buffer in bytes */ #define RCV_BUFBLKS 4 /* Number of blocks to divide buffer into @@ -362,12 +362,8 @@ amd7930_bclose(0, bcs->channel); if (test_bit(BC_FLG_INIT, &bcs->Flag)) { - while ((skb = skb_dequeue(&bcs->rqueue))) { - dev_kfree_skb(skb); - } - while ((skb = skb_dequeue(&bcs->squeue))) { - dev_kfree_skb(skb); - } + skb_queue_purge(&bcs->rqueue); + skb_queue_purge(&bcs->squeue); } test_and_clear_bit(BC_FLG_INIT, &bcs->Flag); } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/arcofi.c linux.20p6/drivers/isdn/hisax/arcofi.c --- linux.vanilla/drivers/isdn/hisax/arcofi.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/arcofi.c Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: arcofi.c,v 1.12 2000/11/25 17:01:00 kai Exp $ +/* $Id: arcofi.c,v 1.12.6.1 2001/02/16 16:43:25 kai Exp $ * * arcofi.c Ansteuerung ARCOFI 2165 * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/arcofi.h linux.20p6/drivers/isdn/hisax/arcofi.h --- linux.vanilla/drivers/isdn/hisax/arcofi.h Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/arcofi.h Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: arcofi.h,v 1.6 2000/06/26 08:59:12 keil Exp $ +/* $Id: arcofi.h,v 1.6.6.1 2001/02/16 16:43:25 kai Exp $ * * arcofi.h Ansteuerung ARCOFI 2165 * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/asuscom.c linux.20p6/drivers/isdn/hisax/asuscom.c --- linux.vanilla/drivers/isdn/hisax/asuscom.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/asuscom.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: asuscom.c,v 1.11 2000/11/24 17:05:37 kai Exp $ +/* $Id: asuscom.c,v 1.11.6.1 2001/02/16 16:43:25 kai Exp $ * * asuscom.c low level stuff for ASUSCOM NETWORK INC. ISDNLink cards * @@ -6,7 +6,7 @@ * * Thanks to ASUSCOM NETWORK INC. Taiwan and Dynalink NL for informations * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ @@ -20,7 +20,7 @@ extern const char *CardType[]; -const char *Asuscom_revision = "$Revision: 1.11 $"; +const char *Asuscom_revision = "$Revision: 1.11.6.1 $"; #define byteout(addr,val) outb(val,addr) #define bytein(addr) inb(addr) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/avm_a1.c linux.20p6/drivers/isdn/hisax/avm_a1.c --- linux.vanilla/drivers/isdn/hisax/avm_a1.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/avm_a1.c Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: avm_a1.c,v 2.13 2000/11/24 17:05:37 kai Exp $ +/* $Id: avm_a1.c,v 2.13.6.1 2001/02/16 16:43:25 kai Exp $ * * avm_a1.c low level stuff for AVM A1 (Fritz) isdn cards * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ #define __NO_VERSION__ @@ -15,7 +15,7 @@ #include "isdnl1.h" extern const char *CardType[]; -static const char *avm_revision = "$Revision: 2.13 $"; +static const char *avm_revision = "$Revision: 2.13.6.1 $"; #define AVM_A1_STAT_ISAC 0x01 #define AVM_A1_STAT_HSCX 0x02 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/avm_a1p.c linux.20p6/drivers/isdn/hisax/avm_a1p.c --- linux.vanilla/drivers/isdn/hisax/avm_a1p.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/avm_a1p.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: avm_a1p.c,v 2.7 2000/11/24 17:05:37 kai Exp $ +/* $Id: avm_a1p.c,v 2.7.6.1 2001/02/16 16:43:25 kai Exp $ * * avm_a1p.c low level stuff for the following AVM cards: * A1 PCMCIA @@ -7,7 +7,7 @@ * * Author Carsten Paeth (calle@calle.in-berlin.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License */ #define __NO_VERSION__ #include @@ -53,7 +53,7 @@ #define byteout(addr,val) outb(val,addr) #define bytein(addr) inb(addr) -static const char *avm_revision = "$Revision: 2.7 $"; +static const char *avm_revision = "$Revision: 2.7.6.1 $"; static inline u_char ReadISAC(struct IsdnCardState *cs, u_char offset) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/avm_pci.c linux.20p6/drivers/isdn/hisax/avm_pci.c --- linux.vanilla/drivers/isdn/hisax/avm_pci.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/avm_pci.c Mon Jun 25 14:24:32 2001 @@ -1,11 +1,11 @@ -/* $Id: avm_pci.c,v 1.22.6.3 2001/02/13 10:33:58 kai Exp $ +/* $Id: avm_pci.c,v 1.22.6.5 2001/06/09 15:14:16 kai Exp $ * * avm_pci.c low level stuff for AVM Fritz!PCI and ISA PnP isdn cards * Thanks to AVM, Berlin for informations * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ #define __NO_VERSION__ @@ -19,7 +19,7 @@ #include extern const char *CardType[]; -static const char *avm_pci_rev = "$Revision: 1.22.6.3 $"; +static const char *avm_pci_rev = "$Revision: 1.22.6.5 $"; #define AVM_FRITZ_PCI 1 #define AVM_FRITZ_PNP 2 @@ -592,8 +592,8 @@ kfree(bcs->blog); bcs->blog = NULL; } - discard_queue(&bcs->rqueue); - discard_queue(&bcs->squeue); + skb_queue_purge(&bcs->rqueue); + skb_queue_purge(&bcs->squeue); if (bcs->tx_skb) { dev_kfree_skb(bcs->tx_skb); bcs->tx_skb = NULL; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/bkm_a4t.c linux.20p6/drivers/isdn/hisax/bkm_a4t.c --- linux.vanilla/drivers/isdn/hisax/bkm_a4t.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/bkm_a4t.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: bkm_a4t.c,v 1.13.6.3 2001/02/13 10:33:58 kai Exp $ +/* $Id: bkm_a4t.c,v 1.13.6.4 2001/02/16 16:43:25 kai Exp $ * bkm_a4t.c low level stuff for T-Berkom A4T * derived from the original file sedlbauer.c * derived from the original file niccy.c @@ -6,7 +6,7 @@ * * Author Roland Klabunde (R.Klabunde@Berkom.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ @@ -25,7 +25,7 @@ extern const char *CardType[]; -const char *bkm_a4t_revision = "$Revision: 1.13.6.3 $"; +const char *bkm_a4t_revision = "$Revision: 1.13.6.4 $"; static inline u_char diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/bkm_a8.c linux.20p6/drivers/isdn/hisax/bkm_a8.c --- linux.vanilla/drivers/isdn/hisax/bkm_a8.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/bkm_a8.c Mon Jun 25 14:24:51 2001 @@ -1,4 +1,4 @@ -/* $Id: bkm_a8.c,v 1.14.6.3 2001/02/13 10:33:58 kai Exp $ +/* $Id: bkm_a8.c,v 1.14.6.5 2001/04/15 14:51:09 keil Exp $ * bkm_a8.c low level stuff for Scitel Quadro (4*S0, passive) * derived from the original file sedlbauer.c * derived from the original file niccy.c @@ -6,7 +6,7 @@ * * Author Roland Klabunde (R.Klabunde@Berkom.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ #define __NO_VERSION__ @@ -28,7 +28,7 @@ extern const char *CardType[]; -const char sct_quadro_revision[] = "$Revision: 1.14.6.3 $"; +const char sct_quadro_revision[] = "$Revision: 1.14.6.5 $"; static const char *sct_quadro_subtypes[] = { @@ -206,9 +206,9 @@ void release_io_sct_quadro(struct IsdnCardState *cs) { - release_region(cs->hw.ax.base & 0xffffffc0, 256); + release_region(cs->hw.ax.base & 0xffffffc0, 128); if (cs->subtyp == SCT_1) - release_region(cs->hw.ax.plx_adr, 256); + release_region(cs->hw.ax.plx_adr, 64); } static void @@ -404,9 +404,9 @@ switch(cs->subtyp) { case 1: cs->hw.ax.base = pci_ioaddr5 + 0x00; - if (sct_alloc_io(pci_ioaddr1, 256)) + if (sct_alloc_io(pci_ioaddr1, 128)) return(0); - if (sct_alloc_io(pci_ioaddr5, 256)) + if (sct_alloc_io(pci_ioaddr5, 64)) return(0); /* disable all IPAC */ writereg(pci_ioaddr5, pci_ioaddr5 + 4, @@ -420,17 +420,17 @@ break; case 2: cs->hw.ax.base = pci_ioaddr4 + 0x08; - if (sct_alloc_io(pci_ioaddr4, 256)) + if (sct_alloc_io(pci_ioaddr4, 64)) return(0); break; case 3: cs->hw.ax.base = pci_ioaddr3 + 0x10; - if (sct_alloc_io(pci_ioaddr3, 256)) + if (sct_alloc_io(pci_ioaddr3, 64)) return(0); break; case 4: cs->hw.ax.base = pci_ioaddr2 + 0x20; - if (sct_alloc_io(pci_ioaddr2, 256)) + if (sct_alloc_io(pci_ioaddr2, 64)) return(0); break; } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/bkm_ax.h linux.20p6/drivers/isdn/hisax/bkm_ax.h --- linux.vanilla/drivers/isdn/hisax/bkm_ax.h Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/bkm_ax.h Fri May 4 23:24:34 2001 @@ -1,9 +1,9 @@ -/* $Id: bkm_ax.h,v 1.5.6.1 2000/11/28 12:02:46 kai Exp $ +/* $Id: bkm_ax.h,v 1.5.6.2 2001/02/16 16:43:25 kai Exp $ * bkm_ax.h low level decls for T-Berkom cards A4T and Scitel Quadro (4*S0, passive) * * Author Roland Klabunde (R.Klabunde@Berkom.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/callc.c linux.20p6/drivers/isdn/hisax/callc.c --- linux.vanilla/drivers/isdn/hisax/callc.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/callc.c Mon Jun 25 14:24:47 2001 @@ -1,9 +1,9 @@ -/* $Id: callc.c,v 2.51 2000/11/24 17:05:37 kai Exp $ +/* $Id: callc.c,v 2.51.6.4 2001/06/09 15:14:17 kai Exp $ * * Author Karsten Keil (keil@isdn4linux.de) * based on the teles driver from Jan den Ouden * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * For changes and modifications please read * ../../../Documentation/isdn/HiSax.cert * @@ -20,7 +20,7 @@ #define MOD_USE_COUNT ( GET_USE_COUNT (&__this_module)) #endif /* MODULE */ -const char *lli_revision = "$Revision: 2.51 $"; +const char *lli_revision = "$Revision: 2.51.6.4 $"; extern struct IsdnCard cards[]; extern int nrcards; @@ -66,19 +66,6 @@ return (struct IsdnCardState *) 0; } -int -discard_queue(struct sk_buff_head *q) -{ - struct sk_buff *skb; - int ret=0; - - while ((skb = skb_dequeue(q))) { - dev_kfree_skb(skb); - ret++; - } - return(ret); -} - static void link_debug(struct Channel *chanp, int direction, char *fmt, ...) { @@ -337,7 +324,7 @@ * RESUME */ -/* incomming call */ +/* incoming call */ static void lli_deliver_call(struct FsmInst *fi, int event, void *arg) @@ -850,14 +837,14 @@ #define FNCOUNT (sizeof(fnlist)/sizeof(struct FsmNode)) -void __init +int __init CallcNew(void) { callcfsm.state_count = STATE_COUNT; callcfsm.event_count = EVENT_COUNT; callcfsm.strEvent = strEvent; callcfsm.strState = strState; - FsmNew(&callcfsm, fnlist, FNCOUNT); + return FsmNew(&callcfsm, fnlist, FNCOUNT); } void @@ -1026,9 +1013,11 @@ printk(KERN_WARNING"call to dummy_pstack pr=%04x arg %lx\n", pr, (long)arg); } -static void +static int init_PStack(struct PStack **stp) { *stp = kmalloc(sizeof(struct PStack), GFP_ATOMIC); + if (!*stp) + return -ENOMEM; (*stp)->next = NULL; (*stp)->l1.l1l2 = dummy_pstack; (*stp)->l1.l1hw = dummy_pstack; @@ -1041,16 +1030,20 @@ (*stp)->l3.l3l4 = dummy_pstack; (*stp)->lli.l4l3 = dummy_pstack; (*stp)->ma.layer = dummy_pstack; + return 0; } -static void +static int init_d_st(struct Channel *chanp) { struct PStack *st; struct IsdnCardState *cs = chanp->cs; char tmp[16]; + int err; - init_PStack(&chanp->d_st); + err = init_PStack(&chanp->d_st); + if (err) + return err; st = chanp->d_st; st->next = NULL; HiSax_addlist(cs, st); @@ -1075,6 +1068,8 @@ st->lli.userdata = chanp; st->lli.l2writewakeup = NULL; st->l3.l3l4 = dchan_l3l4; + + return 0; } static void @@ -1090,10 +1085,11 @@ va_end(args); } -static void +static int init_chan(int chan, struct IsdnCardState *csta) { struct Channel *chanp = csta->channel + chan; + int err; chanp->cs = csta; chanp->bcs = csta->bcs + chan; @@ -1102,7 +1098,9 @@ chanp->debug = 0; chanp->Flags = 0; chanp->leased = 0; - init_PStack(&chanp->b_st); + err = init_PStack(&chanp->b_st); + if (err) + return err; chanp->b_st->l1.delay = DEFAULT_B_DELAY; chanp->fi.fsm = &callcfsm; chanp->fi.state = ST_NULL; @@ -1112,31 +1110,41 @@ FsmInitTimer(&chanp->fi, &chanp->dial_timer); FsmInitTimer(&chanp->fi, &chanp->drel_timer); if (!chan || (test_bit(FLG_TWO_DCHAN, &csta->HW_Flags) && chan < 2)) { - init_d_st(chanp); + err = init_d_st(chanp); + if (err) + return err; } else { chanp->d_st = csta->channel->d_st; } chanp->data_open = 0; + return 0; } int CallcNewChan(struct IsdnCardState *csta) { - int i; + int i, err; chancount += 2; - init_chan(0, csta); - init_chan(1, csta); + err = init_chan(0, csta); + if (err) + return err; + err = init_chan(1, csta); + if (err) + return err; printk(KERN_INFO "HiSax: 2 channels added\n"); - for (i = 0; i < MAX_WAITING_CALLS; i++) - init_chan(i+2,csta); + for (i = 0; i < MAX_WAITING_CALLS; i++) { + err = init_chan(i+2,csta); + if (err) + return err; + } printk(KERN_INFO "HiSax: MAX_WAITING_CALLS added\n"); if (test_bit(FLG_PTP, &csta->channel->d_st->l2.flag)) { printk(KERN_INFO "LAYER2 WATCHING ESTABLISH\n"); csta->channel->d_st->lli.l4l3(csta->channel->d_st, DL_ESTABLISH | REQUEST, NULL); } - return (2); + return (0); } static void diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/cert.c linux.20p6/drivers/isdn/hisax/cert.c --- linux.vanilla/drivers/isdn/hisax/cert.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/cert.c Fri May 4 23:24:34 2001 @@ -1,8 +1,8 @@ -/* $Id: cert.c,v 2.3 2000/06/26 08:59:12 keil Exp $ +/* $Id: cert.c,v 2.3.6.1 2001/02/16 16:43:25 kai Exp $ * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * For changes and modifications please read * ../../../Documentation/isdn/HiSax.cert * diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/config.c linux.20p6/drivers/isdn/hisax/config.c --- linux.vanilla/drivers/isdn/hisax/config.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/config.c Mon Jun 25 14:24:47 2001 @@ -1,9 +1,9 @@ -/* $Id: config.c,v 2.57.6.9 2001/02/13 10:33:58 kai Exp $ +/* $Id: config.c,v 2.57.6.15 2001/06/09 15:14:17 kai Exp $ * * Author Karsten Keil (keil@isdn4linux.de) * based on the teles driver from Jan den Ouden * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ #include @@ -436,7 +436,7 @@ } #ifndef MODULE -void __init +static void __init HiSax_setup(char *str, int *ints) { int i, j, argc; @@ -829,8 +829,8 @@ csta->bcs->BC_Close(csta->bcs); } - discard_queue(&csta->rq); - discard_queue(&csta->sq); + skb_queue_purge(&csta->rq); + skb_queue_purge(&csta->sq); if (csta->rcvbuf) { kfree(csta->rcvbuf); csta->rcvbuf = NULL; @@ -906,13 +906,12 @@ save_flags(flags); cli(); - if (!(cs = (struct IsdnCardState *) - kmalloc(sizeof(struct IsdnCardState), GFP_ATOMIC))) { + cs = kmalloc(sizeof(struct IsdnCardState), GFP_ATOMIC); + if (!cs) { printk(KERN_WARNING "HiSax: No memory for IsdnCardState(card %d)\n", cardnr + 1); - restore_flags(flags); - return (0); + goto out; } memset(cs, 0, sizeof(struct IsdnCardState)); card->cs = cs; @@ -931,241 +930,235 @@ #endif cs->protocol = card->protocol; - if ((card->typ > 0) && (card->typ <= ISDN_CTYPE_COUNT)) { - if (!(cs->dlog = kmalloc(MAX_DLOG_SPACE, GFP_ATOMIC))) { - printk(KERN_WARNING - "HiSax: No memory for dlog(card %d)\n", - cardnr + 1); - restore_flags(flags); - return (0); - } - if (!(cs->status_buf = kmalloc(HISAX_STATUS_BUFSIZE, GFP_ATOMIC))) { - printk(KERN_WARNING - "HiSax: No memory for status_buf(card %d)\n", - cardnr + 1); - kfree(cs->dlog); - restore_flags(flags); - return (0); - } - cs->stlist = NULL; - cs->status_read = cs->status_buf; - cs->status_write = cs->status_buf; - cs->status_end = cs->status_buf + HISAX_STATUS_BUFSIZE - 1; - cs->typ = card->typ; - strcpy(cs->iif.id, id); - cs->iif.channels = 2; - cs->iif.maxbufsize = MAX_DATA_SIZE; - cs->iif.hl_hdrlen = MAX_HEADER_LEN; - cs->iif.features = - ISDN_FEATURE_L2_X75I | - ISDN_FEATURE_L2_HDLC | - ISDN_FEATURE_L2_HDLC_56K | - ISDN_FEATURE_L2_TRANS | - ISDN_FEATURE_L3_TRANS | + if (card->typ <= 0 || card->typ > ISDN_CTYPE_COUNT) { + printk(KERN_WARNING + "HiSax: Card Type %d out of range\n", + card->typ); + goto outf_cs; + } + if (!(cs->dlog = kmalloc(MAX_DLOG_SPACE, GFP_ATOMIC))) { + printk(KERN_WARNING + "HiSax: No memory for dlog(card %d)\n", + cardnr + 1); + goto outf_cs; + } + if (!(cs->status_buf = kmalloc(HISAX_STATUS_BUFSIZE, GFP_ATOMIC))) { + printk(KERN_WARNING + "HiSax: No memory for status_buf(card %d)\n", + cardnr + 1); + goto outf_dlog; + } + cs->stlist = NULL; + cs->status_read = cs->status_buf; + cs->status_write = cs->status_buf; + cs->status_end = cs->status_buf + HISAX_STATUS_BUFSIZE - 1; + cs->typ = card->typ; + strcpy(cs->iif.id, id); + cs->iif.channels = 2; + cs->iif.maxbufsize = MAX_DATA_SIZE; + cs->iif.hl_hdrlen = MAX_HEADER_LEN; + cs->iif.features = + ISDN_FEATURE_L2_X75I | + ISDN_FEATURE_L2_HDLC | + ISDN_FEATURE_L2_HDLC_56K | + ISDN_FEATURE_L2_TRANS | + ISDN_FEATURE_L3_TRANS | #ifdef CONFIG_HISAX_1TR6 - ISDN_FEATURE_P_1TR6 | + ISDN_FEATURE_P_1TR6 | #endif #ifdef CONFIG_HISAX_EURO - ISDN_FEATURE_P_EURO | + ISDN_FEATURE_P_EURO | #endif #ifdef CONFIG_HISAX_NI1 - ISDN_FEATURE_P_NI1 | + ISDN_FEATURE_P_NI1 | #endif - 0; - - cs->iif.command = HiSax_command; - cs->iif.writecmd = NULL; - cs->iif.writebuf_skb = HiSax_writebuf_skb; - cs->iif.readstat = HiSax_readstatus; - register_isdn(&cs->iif); - cs->myid = cs->iif.channels; - printk(KERN_INFO - "HiSax: Card %d Protocol %s Id=%s (%d)\n", cardnr + 1, - (card->protocol == ISDN_PTYPE_1TR6) ? "1TR6" : - (card->protocol == ISDN_PTYPE_EURO) ? "EDSS1" : - (card->protocol == ISDN_PTYPE_LEASED) ? "LEASED" : - (card->protocol == ISDN_PTYPE_NI1) ? "NI1" : - "NONE", cs->iif.id, cs->myid); - switch (card->typ) { + 0; + + cs->iif.command = HiSax_command; + cs->iif.writecmd = NULL; + cs->iif.writebuf_skb = HiSax_writebuf_skb; + cs->iif.readstat = HiSax_readstatus; + register_isdn(&cs->iif); + cs->myid = cs->iif.channels; + printk(KERN_INFO + "HiSax: Card %d Protocol %s Id=%s (%d)\n", cardnr + 1, + (card->protocol == ISDN_PTYPE_1TR6) ? "1TR6" : + (card->protocol == ISDN_PTYPE_EURO) ? "EDSS1" : + (card->protocol == ISDN_PTYPE_LEASED) ? "LEASED" : + (card->protocol == ISDN_PTYPE_NI1) ? "NI1" : + "NONE", cs->iif.id, cs->myid); + switch (card->typ) { #if CARD_TELES0 - case ISDN_CTYPE_16_0: - case ISDN_CTYPE_8_0: - ret = setup_teles0(card); - break; + case ISDN_CTYPE_16_0: + case ISDN_CTYPE_8_0: + ret = setup_teles0(card); + break; #endif #if CARD_TELES3 - case ISDN_CTYPE_16_3: - case ISDN_CTYPE_PNP: - case ISDN_CTYPE_TELESPCMCIA: - case ISDN_CTYPE_COMPAQ_ISA: - ret = setup_teles3(card); - break; + case ISDN_CTYPE_16_3: + case ISDN_CTYPE_PNP: + case ISDN_CTYPE_TELESPCMCIA: + case ISDN_CTYPE_COMPAQ_ISA: + ret = setup_teles3(card); + break; #endif #if CARD_S0BOX - case ISDN_CTYPE_S0BOX: - ret = setup_s0box(card); - break; + case ISDN_CTYPE_S0BOX: + ret = setup_s0box(card); + break; #endif #if CARD_TELESPCI - case ISDN_CTYPE_TELESPCI: - ret = setup_telespci(card); - break; + case ISDN_CTYPE_TELESPCI: + ret = setup_telespci(card); + break; #endif #if CARD_AVM_A1 - case ISDN_CTYPE_A1: - ret = setup_avm_a1(card); - break; + case ISDN_CTYPE_A1: + ret = setup_avm_a1(card); + break; #endif #if CARD_AVM_A1_PCMCIA - case ISDN_CTYPE_A1_PCMCIA: - ret = setup_avm_a1_pcmcia(card); - break; + case ISDN_CTYPE_A1_PCMCIA: + ret = setup_avm_a1_pcmcia(card); + break; #endif #if CARD_FRITZPCI - case ISDN_CTYPE_FRITZPCI: - ret = setup_avm_pcipnp(card); - break; + case ISDN_CTYPE_FRITZPCI: + ret = setup_avm_pcipnp(card); + break; #endif #if CARD_ELSA - case ISDN_CTYPE_ELSA: - case ISDN_CTYPE_ELSA_PNP: - case ISDN_CTYPE_ELSA_PCMCIA: - case ISDN_CTYPE_ELSA_PCI: - ret = setup_elsa(card); - break; + case ISDN_CTYPE_ELSA: + case ISDN_CTYPE_ELSA_PNP: + case ISDN_CTYPE_ELSA_PCMCIA: + case ISDN_CTYPE_ELSA_PCI: + ret = setup_elsa(card); + break; #endif #if CARD_IX1MICROR2 - case ISDN_CTYPE_IX1MICROR2: - ret = setup_ix1micro(card); - break; + case ISDN_CTYPE_IX1MICROR2: + ret = setup_ix1micro(card); + break; #endif #if CARD_DIEHLDIVA - case ISDN_CTYPE_DIEHLDIVA: - ret = setup_diva(card); - break; + case ISDN_CTYPE_DIEHLDIVA: + ret = setup_diva(card); + break; #endif #if CARD_ASUSCOM - case ISDN_CTYPE_ASUSCOM: - ret = setup_asuscom(card); - break; + case ISDN_CTYPE_ASUSCOM: + ret = setup_asuscom(card); + break; #endif #if CARD_TELEINT - case ISDN_CTYPE_TELEINT: - ret = setup_TeleInt(card); - break; + case ISDN_CTYPE_TELEINT: + ret = setup_TeleInt(card); + break; #endif #if CARD_SEDLBAUER - case ISDN_CTYPE_SEDLBAUER: - case ISDN_CTYPE_SEDLBAUER_PCMCIA: - case ISDN_CTYPE_SEDLBAUER_FAX: - ret = setup_sedlbauer(card); - break; + case ISDN_CTYPE_SEDLBAUER: + case ISDN_CTYPE_SEDLBAUER_PCMCIA: + case ISDN_CTYPE_SEDLBAUER_FAX: + ret = setup_sedlbauer(card); + break; #endif #if CARD_SPORTSTER - case ISDN_CTYPE_SPORTSTER: - ret = setup_sportster(card); - break; + case ISDN_CTYPE_SPORTSTER: + ret = setup_sportster(card); + break; #endif #if CARD_MIC - case ISDN_CTYPE_MIC: - ret = setup_mic(card); - break; + case ISDN_CTYPE_MIC: + ret = setup_mic(card); + break; #endif #if CARD_NETJET_S - case ISDN_CTYPE_NETJET_S: - ret = setup_netjet_s(card); - break; + case ISDN_CTYPE_NETJET_S: + ret = setup_netjet_s(card); + break; #endif #if CARD_HFCS - case ISDN_CTYPE_TELES3C: - case ISDN_CTYPE_ACERP10: - ret = setup_hfcs(card); - break; + case ISDN_CTYPE_TELES3C: + case ISDN_CTYPE_ACERP10: + ret = setup_hfcs(card); + break; #endif #if CARD_HFC_PCI - case ISDN_CTYPE_HFC_PCI: - ret = setup_hfcpci(card); - break; + case ISDN_CTYPE_HFC_PCI: + ret = setup_hfcpci(card); + break; #endif #if CARD_HFC_SX - case ISDN_CTYPE_HFC_SX: - ret = setup_hfcsx(card); - break; + case ISDN_CTYPE_HFC_SX: + ret = setup_hfcsx(card); + break; #endif #if CARD_NICCY - case ISDN_CTYPE_NICCY: - ret = setup_niccy(card); - break; + case ISDN_CTYPE_NICCY: + ret = setup_niccy(card); + break; #endif #if CARD_AMD7930 - case ISDN_CTYPE_AMD7930: - ret = setup_amd7930(card); - break; + case ISDN_CTYPE_AMD7930: + ret = setup_amd7930(card); + break; #endif #if CARD_ISURF - case ISDN_CTYPE_ISURF: - ret = setup_isurf(card); - break; + case ISDN_CTYPE_ISURF: + ret = setup_isurf(card); + break; #endif #if CARD_HSTSAPHIR - case ISDN_CTYPE_HSTSAPHIR: - ret = setup_saphir(card); - break; + case ISDN_CTYPE_HSTSAPHIR: + ret = setup_saphir(card); + break; #endif #if CARD_TESTEMU - case ISDN_CTYPE_TESTEMU: - ret = setup_testemu(card); - break; + case ISDN_CTYPE_TESTEMU: + ret = setup_testemu(card); + break; #endif #if CARD_BKM_A4T - case ISDN_CTYPE_BKM_A4T: - ret = setup_bkm_a4t(card); - break; + case ISDN_CTYPE_BKM_A4T: + ret = setup_bkm_a4t(card); + break; #endif #if CARD_SCT_QUADRO - case ISDN_CTYPE_SCT_QUADRO: - ret = setup_sct_quadro(card); - break; + case ISDN_CTYPE_SCT_QUADRO: + ret = setup_sct_quadro(card); + break; #endif #if CARD_GAZEL - case ISDN_CTYPE_GAZEL: - ret = setup_gazel(card); - break; + case ISDN_CTYPE_GAZEL: + ret = setup_gazel(card); + break; #endif #if CARD_W6692 - case ISDN_CTYPE_W6692: - ret = setup_w6692(card); - break; + case ISDN_CTYPE_W6692: + ret = setup_w6692(card); + break; #endif #if CARD_NETJET_U - case ISDN_CTYPE_NETJET_U: - ret = setup_netjet_u(card); - break; + case ISDN_CTYPE_NETJET_U: + ret = setup_netjet_u(card); + break; #endif - default: - printk(KERN_WARNING - "HiSax: Support for %s Card not selected\n", - CardType[card->typ]); - ll_unload(cs); - restore_flags(flags); - return (0); - } - } else { + default: printk(KERN_WARNING - "HiSax: Card Type %d out of range\n", - card->typ); - restore_flags(flags); - return (0); + "HiSax: Support for %s Card not selected\n", + CardType[card->typ]); + ll_unload(cs); + goto outf_cs; } if (!ret) { ll_unload(cs); - restore_flags(flags); - return (0); + goto outf_cs; } if (!(cs->rcvbuf = kmalloc(MAX_DFRAME_LEN_L1, GFP_ATOMIC))) { printk(KERN_WARNING "HiSax: No memory for isac rcvbuf\n"); - return (1); + ll_unload(cs); + goto outf_cs; } cs->rcvidx = 0; cs->tx_skb = NULL; @@ -1182,16 +1175,31 @@ ret = init_card(cs); if (ret) { closecard(cardnr); - restore_flags(flags); - return (0); + ret = 0; + goto outf_cs; } init_tei(cs, cs->protocol); - CallcNewChan(cs); + ret = CallcNewChan(cs); + if (ret) { + closecard(cardnr); + ret = 0; + goto outf_cs; + } /* ISAR needs firmware download first */ if (!test_bit(HW_ISAR, &cs->HW_Flags)) ll_run(cs, 0); + + ret = 1; + goto out; + + outf_dlog: + kfree(cs->dlog); + outf_cs: + kfree(cs); + card->cs = NULL; + out: restore_flags(flags); - return (1); + return ret; } void @@ -1240,9 +1248,6 @@ } else { printk(KERN_WARNING "HiSax: Card %s not installed !\n", CardType[cards[i].typ]); - if (cards[i].cs) - kfree((void *) cards[i].cs); - cards[i].cs = NULL; HiSax_shiftcards(i); nrcards--; } @@ -1319,15 +1324,28 @@ static int __init HiSax_init(void) { - int i,j; + int i, retval; +#ifdef MODULE + int j; int nzproto = 0; +#endif HiSaxVersion(); - CallcNew(); - Isdnl3New(); - Isdnl2New(); - TeiNew(); - Isdnl1New(); + retval = CallcNew(); + if (retval) + goto out; + retval = Isdnl3New(); + if (retval) + goto out_callc; + retval = Isdnl2New(); + if (retval) + goto out_isdnl3; + retval = TeiNew(); + if (retval) + goto out_isdnl2; + retval = Isdnl1New(); + if (retval) + goto out_tei; #ifdef MODULE if (!type[0]) { @@ -1474,17 +1492,26 @@ printk(KERN_DEBUG "HiSax: Total %d card%s defined\n", nrcards, (nrcards > 1) ? "s" : ""); - if (HiSax_inithardware(NULL)) { - /* Install only, if at least one card found */ - return (0); - } else { - Isdnl1Free(); - TeiFree(); - Isdnl2Free(); - Isdnl3Free(); - CallcFree(); - return -EIO; + /* Install only, if at least one card found */ + if (!HiSax_inithardware(NULL)) { + retval = -EIO; + goto out_isdnl1; } + + return 0; + + out_isdnl1: + Isdnl1Free(); + out_tei: + TeiFree(); + out_isdnl2: + Isdnl2Free(); + out_isdnl3: + Isdnl3Free(); + out_callc: + CallcFree(); + out: + return retval; } static void HiSax_exit(void) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/diva.c linux.20p6/drivers/isdn/hisax/diva.c --- linux.vanilla/drivers/isdn/hisax/diva.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/diva.c Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: diva.c,v 1.25.6.3 2001/02/13 10:33:58 kai Exp $ +/* $Id: diva.c,v 1.25.6.4 2001/02/16 16:43:25 kai Exp $ * * diva.c low level stuff for Eicon.Diehl Diva Family ISDN cards * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * For changes and modifications please read * ../../../Documentation/isdn/HiSax.cert * @@ -25,7 +25,7 @@ extern const char *CardType[]; -const char *Diva_revision = "$Revision: 1.25.6.3 $"; +const char *Diva_revision = "$Revision: 1.25.6.4 $"; #define byteout(addr,val) outb(val,addr) #define bytein(addr) inb(addr) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/elsa.c linux.20p6/drivers/isdn/hisax/elsa.c --- linux.vanilla/drivers/isdn/hisax/elsa.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/elsa.c Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: elsa.c,v 2.26.6.2 2001/02/13 10:33:58 kai Exp $ +/* $Id: elsa.c,v 2.26.6.3 2001/02/16 16:43:25 kai Exp $ * * elsa.c low level stuff for Elsa isdn cards * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * For changes and modifications please read * ../../../Documentation/isdn/HiSax.cert * @@ -31,7 +31,7 @@ extern const char *CardType[]; -const char *Elsa_revision = "$Revision: 2.26.6.2 $"; +const char *Elsa_revision = "$Revision: 2.26.6.3 $"; const char *Elsa_Types[] = {"None", "PC", "PCC-8", "PCC-16", "PCF", "PCF-Pro", "PCMCIA", "QS 1000", "QS 3000", "Microlink PCI", "QS 3000 PCI", diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/elsa_ser.c linux.20p6/drivers/isdn/hisax/elsa_ser.c --- linux.vanilla/drivers/isdn/hisax/elsa_ser.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/elsa_ser.c Mon Jun 25 14:24:32 2001 @@ -1,8 +1,8 @@ -/* $Id: elsa_ser.c,v 2.10 2000/11/19 17:02:47 kai Exp $ +/* $Id: elsa_ser.c,v 2.10.6.2 2001/06/09 15:14:17 kai Exp $ * * stuff for the serial modem on ELSA cards * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ #include @@ -439,8 +439,6 @@ void close_elsastate(struct BCState *bcs) { - struct sk_buff *skb; - modehscx(bcs, 0, bcs->channel); if (test_and_clear_bit(BC_FLG_INIT, &bcs->Flag)) { if (bcs->hw.hscx.rcvbuf) { @@ -448,12 +446,8 @@ kfree(bcs->hw.hscx.rcvbuf); bcs->hw.hscx.rcvbuf = NULL; } - while ((skb = skb_dequeue(&bcs->rqueue))) { - dev_kfree_skb(skb); - } - while ((skb = skb_dequeue(&bcs->squeue))) { - dev_kfree_skb(skb); - } + skb_queue_purge(&bcs->rqueue); + skb_queue_purge(&bcs->squeue); if (bcs->tx_skb) { dev_kfree_skb(bcs->tx_skb); bcs->tx_skb = NULL; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/fsm.c linux.20p6/drivers/isdn/hisax/fsm.c --- linux.vanilla/drivers/isdn/hisax/fsm.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/fsm.c Mon Jun 25 14:24:47 2001 @@ -1,4 +1,4 @@ -/* $Id: fsm.c,v 1.14 2000/11/24 17:05:37 kai Exp $ +/* $Id: fsm.c,v 1.14.6.2 2001/05/26 15:19:57 kai Exp $ * * Author Karsten Keil (keil@isdn4linux.de) * based on the teles driver from Jan den Ouden @@ -6,7 +6,7 @@ * Thanks to Jan den Ouden * Fritz Elfert * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ #define __NO_VERSION__ @@ -15,13 +15,16 @@ #define FSM_TIMER_DEBUG 0 -void __init +int __init FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount) { int i; fsm->jumpmatrix = (FSMFNPTR *) kmalloc(sizeof (FSMFNPTR) * fsm->state_count * fsm->event_count, GFP_KERNEL); + if (!fsm->jumpmatrix) + return -ENOMEM; + memset(fsm->jumpmatrix, 0, sizeof (FSMFNPTR) * fsm->state_count * fsm->event_count); for (i = 0; i < fncount; i++) @@ -32,6 +35,7 @@ } else fsm->jumpmatrix[fsm->state_count * fnlist[i].event + fnlist[i].state] = (FSMFNPTR) fnlist[i].routine; + return 0; } void diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/gazel.c linux.20p6/drivers/isdn/hisax/gazel.c --- linux.vanilla/drivers/isdn/hisax/gazel.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/gazel.c Mon Jun 25 14:24:52 2001 @@ -1,11 +1,11 @@ -/* $Id: gazel.c,v 2.11.6.3 2001/02/13 10:33:58 kai Exp $ +/* $Id: gazel.c,v 2.11.6.6 2001/06/08 08:48:46 kai Exp $ * * gazel.c low level stuff for Gazel isdn cards * * Author BeWan Systems * based on source code from Karsten Keil * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ #include @@ -20,7 +20,7 @@ #include extern const char *CardType[]; -const char *gazel_revision = "$Revision: 2.11.6.3 $"; +const char *gazel_revision = "$Revision: 2.11.6.6 $"; #define R647 1 #define R685 2 @@ -440,10 +440,6 @@ reserve_regions(struct IsdnCard *card, struct IsdnCardState *cs) { unsigned int i, base = 0, adr = 0, len = 0; - long flags; - - save_flags(flags); - cli(); switch (cs->subtyp) { case R647: @@ -488,17 +484,15 @@ break; } - restore_flags(flags); return 0; error: - restore_flags(flags); printk(KERN_WARNING "Gazel: %s io ports 0x%x-0x%x already in use\n", CardType[cs->typ], adr, adr + len); return 1; } -static int +static int __init setup_gazelisa(struct IsdnCard *card, struct IsdnCardState *cs) { printk(KERN_INFO "Gazel: ISA PnP card automatic recognition\n"); @@ -547,7 +541,7 @@ static struct pci_dev *dev_tel __initdata = NULL; -static int +static int __init setup_gazelpci(struct IsdnCardState *cs) { u_int pci_ioaddr0 = 0, pci_ioaddr1 = 0; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hfc_2bds0.c linux.20p6/drivers/isdn/hisax/hfc_2bds0.c --- linux.vanilla/drivers/isdn/hisax/hfc_2bds0.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/hfc_2bds0.c Mon Jun 25 14:24:32 2001 @@ -1,10 +1,10 @@ -/* $Id: hfc_2bds0.c,v 1.15 2000/11/24 17:05:37 kai Exp $ +/* $Id: hfc_2bds0.c,v 1.15.6.2 2001/06/09 15:14:17 kai Exp $ * * specific routines for CCD's HFC 2BDS0 * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ #define __NO_VERSION__ @@ -568,8 +568,8 @@ { mode_2bs0(bcs, 0, bcs->channel); if (test_and_clear_bit(BC_FLG_INIT, &bcs->Flag)) { - discard_queue(&bcs->rqueue); - discard_queue(&bcs->squeue); + skb_queue_purge(&bcs->rqueue); + skb_queue_purge(&bcs->squeue); if (bcs->tx_skb) { dev_kfree_skb(bcs->tx_skb); bcs->tx_skb = NULL; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hfc_2bds0.h linux.20p6/drivers/isdn/hisax/hfc_2bds0.h --- linux.vanilla/drivers/isdn/hisax/hfc_2bds0.h Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/hfc_2bds0.h Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: hfc_2bds0.h,v 1.4 2000/06/26 08:59:12 keil Exp $ +/* $Id: hfc_2bds0.h,v 1.4.6.1 2001/02/16 16:43:27 kai Exp $ * * specific defines for CCD's HFC 2BDS0 * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hfc_2bs0.c linux.20p6/drivers/isdn/hisax/hfc_2bs0.c --- linux.vanilla/drivers/isdn/hisax/hfc_2bs0.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/hfc_2bs0.c Mon Jun 25 14:24:32 2001 @@ -1,10 +1,10 @@ -/* $Id: hfc_2bs0.c,v 1.17 2000/11/24 17:05:37 kai Exp $ +/* $Id: hfc_2bs0.c,v 1.17.6.2 2001/06/09 15:14:17 kai Exp $ * * specific routines for CCD's HFC 2BS0 * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ @@ -532,8 +532,8 @@ { mode_hfc(bcs, 0, bcs->channel); if (test_bit(BC_FLG_INIT, &bcs->Flag)) { - discard_queue(&bcs->rqueue); - discard_queue(&bcs->squeue); + skb_queue_purge(&bcs->rqueue); + skb_queue_purge(&bcs->squeue); if (bcs->tx_skb) { dev_kfree_skb(bcs->tx_skb); bcs->tx_skb = NULL; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hfc_2bs0.h linux.20p6/drivers/isdn/hisax/hfc_2bs0.h --- linux.vanilla/drivers/isdn/hisax/hfc_2bs0.h Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/hfc_2bs0.h Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: hfc_2bs0.h,v 1.3 2000/06/26 08:59:13 keil Exp $ +/* $Id: hfc_2bs0.h,v 1.3.6.1 2001/02/16 16:43:27 kai Exp $ * * specific defines for CCD's HFC 2BS0 * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hfc_pci.c linux.20p6/drivers/isdn/hisax/hfc_pci.c --- linux.vanilla/drivers/isdn/hisax/hfc_pci.c Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/hfc_pci.c Mon Jun 25 14:24:44 2001 @@ -1,4 +1,4 @@ -/* $Id: hfc_pci.c,v 1.34.6.4 2001/02/13 10:33:58 kai Exp $ +/* $Id: hfc_pci.c,v 1.34.6.6 2001/06/09 15:14:17 kai Exp $ * hfc_pci.c low level driver for CCD´s hfc-pci based cards * @@ -36,7 +36,7 @@ extern const char *CardType[]; -static const char *hfcpci_revision = "$Revision: 1.34.6.4 $"; +static const char *hfcpci_revision = "$Revision: 1.34.6.6 $"; /* table entry in the PCI devices list */ typedef struct { @@ -236,6 +236,59 @@ return (NULL); } +/***************************************/ +/* clear the desired B-channel rx fifo */ +/***************************************/ +static void hfcpci_clear_fifo_rx(struct IsdnCardState *cs, int fifo) +{ u_char fifo_state; + bzfifo_type *bzr; + + if (fifo) { + bzr = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxbz_b2; + fifo_state = cs->hw.hfcpci.fifo_en & HFCPCI_FIFOEN_B2RX; + } else { + bzr = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxbz_b1; + fifo_state = cs->hw.hfcpci.fifo_en & HFCPCI_FIFOEN_B1RX; + } + if (fifo_state) + cs->hw.hfcpci.fifo_en ^= fifo_state; + Write_hfc(cs, HFCPCI_FIFO_EN, cs->hw.hfcpci.fifo_en); + cs->hw.hfcpci.last_bfifo_cnt[fifo] = 0; + bzr->za[MAX_B_FRAMES].z1 = B_FIFO_SIZE + B_SUB_VAL - 1; + bzr->za[MAX_B_FRAMES].z2 = bzr->za[MAX_B_FRAMES].z1; + bzr->f1 = MAX_B_FRAMES; + bzr->f2 = bzr->f1; /* init F pointers to remain constant */ + if (fifo_state) + cs->hw.hfcpci.fifo_en |= fifo_state; + Write_hfc(cs, HFCPCI_FIFO_EN, cs->hw.hfcpci.fifo_en); +} + +/***************************************/ +/* clear the desired B-channel tx fifo */ +/***************************************/ +static void hfcpci_clear_fifo_tx(struct IsdnCardState *cs, int fifo) +{ u_char fifo_state; + bzfifo_type *bzt; + + if (fifo) { + bzt = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.txbz_b2; + fifo_state = cs->hw.hfcpci.fifo_en & HFCPCI_FIFOEN_B2TX; + } else { + bzt = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.txbz_b1; + fifo_state = cs->hw.hfcpci.fifo_en & HFCPCI_FIFOEN_B1TX; + } + if (fifo_state) + cs->hw.hfcpci.fifo_en ^= fifo_state; + Write_hfc(cs, HFCPCI_FIFO_EN, cs->hw.hfcpci.fifo_en); + bzt->za[MAX_B_FRAMES].z1 = B_FIFO_SIZE + B_SUB_VAL - 1; + bzt->za[MAX_B_FRAMES].z2 = bzt->za[MAX_B_FRAMES].z1; + bzt->f1 = MAX_B_FRAMES; + bzt->f2 = bzt->f1; /* init F pointers to remain constant */ + if (fifo_state) + cs->hw.hfcpci.fifo_en |= fifo_state; + Write_hfc(cs, HFCPCI_FIFO_EN, cs->hw.hfcpci.fifo_en); +} + /*********************************************/ /* read a complete B-frame out of the buffer */ /*********************************************/ @@ -429,7 +482,7 @@ { long flags; struct IsdnCardState *cs = bcs->cs; - int rcnt; + int rcnt, real_fifo; int receive, count = 5; struct sk_buff *skb; bzfifo_type *bz; @@ -441,9 +494,11 @@ if ((bcs->channel) && (!cs->hw.hfcpci.bswapped)) { bz = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxbz_b2; bdata = ((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxdat_b2; + real_fifo = 1; } else { bz = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxbz_b1; bdata = ((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxdat_b1; + real_fifo = 0; } Begin: count--; @@ -476,6 +531,11 @@ rcnt = bz->f1 - bz->f2; if (rcnt < 0) rcnt += MAX_B_FRAMES + 1; + if (cs->hw.hfcpci.last_bfifo_cnt[real_fifo] > rcnt + 1) { + rcnt = 0; + hfcpci_clear_fifo_rx(cs, real_fifo); + } + cs->hw.hfcpci.last_bfifo_cnt[real_fifo] = rcnt; if (rcnt > 1) receive = 1; else @@ -1254,7 +1314,6 @@ mode_hfcpci(struct BCState *bcs, int mode, int bc) { struct IsdnCardState *cs = bcs->cs; - bzfifo_type *bzr, *bzt; int flags, fifo2; if (cs->debug & L1_DEB_HSCX) @@ -1301,6 +1360,8 @@ } break; case (L1_MODE_TRANS): + hfcpci_clear_fifo_rx(cs, fifo2); + hfcpci_clear_fifo_tx(cs, fifo2); if (bc) { cs->hw.hfcpci.sctrl |= SCTRL_B2_ENA; cs->hw.hfcpci.sctrl_r |= SCTRL_B2_ENA; @@ -1313,26 +1374,16 @@ cs->hw.hfcpci.int_m1 |= (HFCPCI_INTS_B2TRANS + HFCPCI_INTS_B2REC); cs->hw.hfcpci.ctmt |= 2; cs->hw.hfcpci.conn &= ~0x18; - bzr = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxbz_b2; - bzt = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.txbz_b2; } else { cs->hw.hfcpci.fifo_en |= HFCPCI_FIFOEN_B1; cs->hw.hfcpci.int_m1 |= (HFCPCI_INTS_B1TRANS + HFCPCI_INTS_B1REC); cs->hw.hfcpci.ctmt |= 1; cs->hw.hfcpci.conn &= ~0x03; - bzr = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.rxbz_b1; - bzt = &((fifo_area *) (cs->hw.hfcpci.fifos))->b_chans.txbz_b1; } - bzr->za[MAX_B_FRAMES].z1 = B_FIFO_SIZE + B_SUB_VAL - 1; - bzr->za[MAX_B_FRAMES].z2 = bzr->za[MAX_B_FRAMES].z1; - bzr->f1 = MAX_B_FRAMES; - bzr->f2 = bzr->f1; /* init F pointers to remain constant */ - bzt->za[MAX_B_FRAMES].z1 = B_FIFO_SIZE + B_SUB_VAL - 1; - bzt->za[MAX_B_FRAMES].z2 = bzt->za[MAX_B_FRAMES].z1; - bzt->f1 = MAX_B_FRAMES; - bzt->f2 = bzt->f1; /* init F pointers to remain constant */ break; case (L1_MODE_HDLC): + hfcpci_clear_fifo_rx(cs, fifo2); + hfcpci_clear_fifo_tx(cs, fifo2); if (bc) { cs->hw.hfcpci.sctrl |= SCTRL_B2_ENA; cs->hw.hfcpci.sctrl_r |= SCTRL_B2_ENA; @@ -1341,11 +1392,13 @@ cs->hw.hfcpci.sctrl_r |= SCTRL_B1_ENA; } if (fifo2) { + cs->hw.hfcpci.last_bfifo_cnt[1] = 0; cs->hw.hfcpci.fifo_en |= HFCPCI_FIFOEN_B2; cs->hw.hfcpci.int_m1 |= (HFCPCI_INTS_B2TRANS + HFCPCI_INTS_B2REC); cs->hw.hfcpci.ctmt &= ~2; cs->hw.hfcpci.conn &= ~0x18; } else { + cs->hw.hfcpci.last_bfifo_cnt[0] = 0; cs->hw.hfcpci.fifo_en |= HFCPCI_FIFOEN_B1; cs->hw.hfcpci.int_m1 |= (HFCPCI_INTS_B1TRANS + HFCPCI_INTS_B1REC); cs->hw.hfcpci.ctmt &= ~1; @@ -1445,8 +1498,8 @@ { mode_hfcpci(bcs, 0, bcs->channel); if (test_and_clear_bit(BC_FLG_INIT, &bcs->Flag)) { - discard_queue(&bcs->rqueue); - discard_queue(&bcs->squeue); + skb_queue_purge(&bcs->rqueue); + skb_queue_purge(&bcs->squeue); if (bcs->tx_skb) { dev_kfree_skb(bcs->tx_skb); bcs->tx_skb = NULL; @@ -1634,7 +1687,8 @@ #endif /* CONFIG_PCI */ -int __init setup_hfcpci(struct IsdnCard *card) +int __init +setup_hfcpci(struct IsdnCard *card) { struct IsdnCardState *cs = card->cs; char tmp[64]; @@ -1646,7 +1700,7 @@ #endif strcpy(tmp, hfcpci_revision); printk(KERN_INFO "HiSax: HFC-PCI driver Rev. %s\n", HiSax_getrev(tmp)); -#ifdef CONFIG_PCI +#if CONFIG_PCI cs->hw.hfcpci.int_s1 = 0; cs->dc.hfcpci.ph_state = 0; cs->hw.hfcpci.fifo = 255; @@ -1660,6 +1714,7 @@ if (tmp_hfcpci) { if (pci_enable_device(tmp_hfcpci)) continue; + pci_set_master(tmp_hfcpci); if ((card->para[0]) && (card->para[0] != (tmp_hfcpci->base_address[ 0] & PCI_BASE_ADDRESS_IO_MASK))) continue; else diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hfc_pci.h linux.20p6/drivers/isdn/hisax/hfc_pci.h --- linux.vanilla/drivers/isdn/hisax/hfc_pci.h Sun Mar 25 17:37:32 2001 +++ linux.20p6/drivers/isdn/hisax/hfc_pci.h Mon Jun 25 14:24:44 2001 @@ -1,4 +1,4 @@ -/* $Id: hfc_pci.h,v 1.8 2000/06/26 08:59:13 keil Exp $ +/* $Id: hfc_pci.h,v 1.8.6.1 2001/04/08 19:32:26 kai Exp $ * * specific defines for CCD's HFC 2BDS0 PCI chips * @@ -178,6 +178,9 @@ #define HFCPCI_FIFOEN_B1 0x03 #define HFCPCI_FIFOEN_B2 0x0C #define HFCPCI_FIFOEN_DTX 0x10 +#define HFCPCI_FIFOEN_B1TX 0x01 +#define HFCPCI_FIFOEN_B1RX 0x02 +#define HFCPCI_FIFOEN_B2TX 0x04 #define HFCPCI_FIFOEN_B2RX 0x08 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hfc_sx.c linux.20p6/drivers/isdn/hisax/hfc_sx.c --- linux.vanilla/drivers/isdn/hisax/hfc_sx.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/hfc_sx.c Mon Jun 25 14:24:32 2001 @@ -1,4 +1,4 @@ -/* $Id: hfc_sx.c,v 1.9 2000/11/24 17:05:37 kai Exp $ +/* $Id: hfc_sx.c,v 1.9.6.1 2001/06/09 15:14:17 kai Exp $ * hfc_sx.c low level driver for CCD´s hfc-s+/sp based cards * @@ -32,7 +32,7 @@ extern const char *CardType[]; -static const char *hfcsx_revision = "$Revision: 1.9 $"; +static const char *hfcsx_revision = "$Revision: 1.9.6.1 $"; /***************************************/ /* IRQ-table for CCDs demo board */ @@ -1288,8 +1288,8 @@ { mode_hfcsx(bcs, 0, bcs->channel); if (test_and_clear_bit(BC_FLG_INIT, &bcs->Flag)) { - discard_queue(&bcs->rqueue); - discard_queue(&bcs->squeue); + skb_queue_purge(&bcs->rqueue); + skb_queue_purge(&bcs->squeue); if (bcs->tx_skb) { dev_kfree_skb(bcs->tx_skb); bcs->tx_skb = NULL; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hfcscard.c linux.20p6/drivers/isdn/hisax/hfcscard.c --- linux.vanilla/drivers/isdn/hisax/hfcscard.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/hfcscard.c Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: hfcscard.c,v 1.8 2000/11/24 17:05:37 kai Exp $ +/* $Id: hfcscard.c,v 1.8.6.1 2001/02/16 16:43:27 kai Exp $ * * hfcscard.c low level stuff for hfcs based cards (Teles3c, ACER P10) * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ @@ -16,7 +16,7 @@ extern const char *CardType[]; -static const char *hfcs_revision = "$Revision: 1.8 $"; +static const char *hfcs_revision = "$Revision: 1.8.6.1 $"; static void hfcs_interrupt(int intno, void *dev_id, struct pt_regs *regs) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hisax.h linux.20p6/drivers/isdn/hisax/hisax.h --- linux.vanilla/drivers/isdn/hisax/hisax.h Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/hisax.h Mon Jun 25 14:56:20 2001 @@ -1,8 +1,8 @@ -/* $Id: hisax.h,v 2.52.6.2 2001/02/10 14:41:22 kai Exp $ +/* $Id: hisax.h,v 2.52.6.6 2001/06/09 15:14:17 kai Exp $ * * Basic declarations, defines and prototypes * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ #include @@ -125,13 +125,13 @@ #define l3dss1_process #include "l3dss1.h" #undef l3dss1_process -#endif CONFIG_HISAX_EURO +#endif /* CONFIG_HISAX_EURO */ #ifdef CONFIG_HISAX_NI1 #define l3ni1_process #include "l3ni1.h" #undef l3ni1_process -#endif CONFIG_HISAX_NI1 +#endif /* CONFIG_HISAX_NI1 */ #define MAX_DFRAME_LEN 260 #define MAX_DFRAME_LEN_L1 300 @@ -317,10 +317,10 @@ { u_char uuuu; /* only as dummy */ #ifdef CONFIG_HISAX_EURO dss1_stk_priv dss1; /* private dss1 data */ -#endif CONFIG_HISAX_EURO +#endif /* CONFIG_HISAX_EURO */ #ifdef CONFIG_HISAX_NI1 ni1_stk_priv ni1; /* private ni1 data */ -#endif CONFIG_HISAX_NI1 +#endif /* CONFIG_HISAX_NI1 */ } prot; }; @@ -341,10 +341,10 @@ { u_char uuuu; /* only when euro not defined, avoiding empty union */ #ifdef CONFIG_HISAX_EURO dss1_proc_priv dss1; /* private dss1 data */ -#endif CONFIG_HISAX_EURO +#endif /* CONFIG_HISAX_EURO */ #ifdef CONFIG_HISAX_NI1 ni1_proc_priv ni1; /* private ni1 data */ -#endif CONFIG_HISAX_NI1 +#endif /* CONFIG_HISAX_NI1 */ } prot; }; @@ -686,6 +686,7 @@ unsigned char *pci_io; /* start of PCI IO memory */ void *share_start; /* shared memory for Fifos start */ void *fifos; /* FIFO memory */ + int last_bfifo_cnt[2]; /* marker saving last b-fifo frame count */ struct timer_list timer; }; @@ -1302,7 +1303,7 @@ int getcallref(u_char * p); int newcallref(void); -void FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount); +int FsmNew(struct Fsm *fsm, struct FsmNode *fnlist, int fncount); void FsmFree(struct Fsm *fsm); int FsmEvent(struct FsmInst *fi, int event, void *arg); void FsmChangeState(struct FsmInst *fi, int newstate); @@ -1323,7 +1324,6 @@ void LogFrame(struct IsdnCardState *cs, u_char * p, int size); void dlogframe(struct IsdnCardState *cs, struct sk_buff *skb, int dir); void iecpy(u_char * dest, u_char * iestart, int ieoffset); -int discard_queue(struct sk_buff_head *q); #ifdef ISDN_CHIP_ISAC void setstack_isac(struct PStack *st, struct IsdnCardState *cs); #endif /* ISDN_CHIP_ISAC */ @@ -1333,19 +1333,19 @@ int ll_run(struct IsdnCardState *cs, int addfeatures); void ll_stop(struct IsdnCardState *cs); -void CallcNew(void); +int CallcNew(void); void CallcFree(void); int CallcNewChan(struct IsdnCardState *cs); void CallcFreeChan(struct IsdnCardState *cs); -void Isdnl1New(void); +int Isdnl1New(void); void Isdnl1Free(void); -void Isdnl2New(void); +int Isdnl2New(void); void Isdnl2Free(void); -void Isdnl3New(void); +int Isdnl3New(void); void Isdnl3Free(void); void init_tei(struct IsdnCardState *cs, int protocol); void release_tei(struct IsdnCardState *cs); char *HiSax_getrev(const char *revision); -void TeiNew(void); +int TeiNew(void); void TeiFree(void); int certification_check(int output); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hscx.c linux.20p6/drivers/isdn/hisax/hscx.c --- linux.vanilla/drivers/isdn/hisax/hscx.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/hscx.c Mon Jun 25 14:24:32 2001 @@ -1,10 +1,10 @@ -/* $Id: hscx.c,v 1.21 2000/11/24 17:05:37 kai Exp $ +/* $Id: hscx.c,v 1.21.6.2 2001/06/09 15:14:17 kai Exp $ * * hscx.c HSCX specific routines * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ @@ -166,8 +166,8 @@ kfree(bcs->blog); bcs->blog = NULL; } - discard_queue(&bcs->rqueue); - discard_queue(&bcs->squeue); + skb_queue_purge(&bcs->rqueue); + skb_queue_purge(&bcs->squeue); if (bcs->tx_skb) { dev_kfree_skb(bcs->tx_skb); bcs->tx_skb = NULL; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hscx.h linux.20p6/drivers/isdn/hisax/hscx.h --- linux.vanilla/drivers/isdn/hisax/hscx.h Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/hscx.h Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: hscx.h,v 1.6 2000/06/26 08:59:13 keil Exp $ +/* $Id: hscx.h,v 1.6.6.1 2001/02/16 16:43:27 kai Exp $ * * hscx.h HSCX specific defines * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/hscx_irq.c linux.20p6/drivers/isdn/hisax/hscx_irq.c --- linux.vanilla/drivers/isdn/hisax/hscx_irq.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/hscx_irq.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: hscx_irq.c,v 1.16 2000/11/19 17:02:47 kai Exp $ +/* $Id: hscx_irq.c,v 1.16.6.1 2001/02/16 16:43:27 kai Exp $ * * hscx_irq.c low level b-channel stuff for Siemens HSCX * @@ -6,7 +6,7 @@ * * This is an include file for fast inline IRQ stuff * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/icc.c linux.20p6/drivers/isdn/hisax/icc.c --- linux.vanilla/drivers/isdn/hisax/icc.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/icc.c Mon Jun 25 14:24:32 2001 @@ -1,4 +1,4 @@ -// $Id: icc.c,v 1.5 2000/11/24 17:05:37 kai Exp $ +// $Id: icc.c,v 1.5.6.3 2001/06/09 15:14:17 kai Exp $ //----------------------------------------------------------------------------- // // ICC specific routines @@ -7,10 +7,10 @@ // www.traverse.com.au // // 1999.6.25 Initial implementation of routines for Siemens ISDN -// Communication Controler PEB 2070 based on the ISAC routines +// Communication Controller PEB 2070 based on the ISAC routines // written by Karsten Keil. // -// This file is (c) under GNU PUBLIC LICENSE +// This file is (c) under GNU General Public License // //----------------------------------------------------------------------------- @@ -551,8 +551,8 @@ } break; case (HW_DEACTIVATE | RESPONSE): - discard_queue(&cs->rq); - discard_queue(&cs->sq); + skb_queue_purge(&cs->rq); + skb_queue_purge(&cs->sq); if (cs->tx_skb) { dev_kfree_skb(cs->tx_skb); cs->tx_skb = NULL; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/icc.h linux.20p6/drivers/isdn/hisax/icc.h --- linux.vanilla/drivers/isdn/hisax/icc.h Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/icc.h Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -// $Id: icc.h,v 1.2 2000/06/26 08:59:13 keil Exp $ +// $Id: icc.h,v 1.2.6.2 2001/03/13 16:17:08 kai Exp $ //----------------------------------------------------------------------------- // // ICC specific routines @@ -7,10 +7,10 @@ // www.traverse.com.au // // 1999.7.14 Initial implementation of routines for Siemens ISDN -// Communication Controler PEB 2070 based on the ISAC routines +// Communication Controller PEB 2070 based on the ISAC routines // written by Karsten Keil. // -// This file is (c) under GNU PUBLIC LICENSE +// This file is (c) under GNU General Public License // //----------------------------------------------------------------------------- diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/ipac.h linux.20p6/drivers/isdn/hisax/ipac.h --- linux.vanilla/drivers/isdn/hisax/ipac.h Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/ipac.h Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: ipac.h,v 1.5 2000/06/26 08:59:13 keil Exp $ +/* $Id: ipac.h,v 1.5.6.1 2001/02/16 16:43:27 kai Exp $ * * ipac.h IPAC specific defines * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isac.c linux.20p6/drivers/isdn/hisax/isac.c --- linux.vanilla/drivers/isdn/hisax/isac.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/isac.c Mon Jun 25 14:24:32 2001 @@ -1,10 +1,10 @@ -/* $Id: isac.c,v 1.28 2000/11/24 17:05:37 kai Exp $ +/* $Id: isac.c,v 1.28.6.2 2001/06/09 15:14:17 kai Exp $ * * isac.c ISAC specific routines * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * For changes and modifications please read * ../../../Documentation/isdn/HiSax.cert */ @@ -445,7 +445,7 @@ if (cs->debug & L1_DEB_MONITOR) debugl1(cs, "ISAC %02x -> MOX1", cs->dc.isac.mon_tx[cs->dc.isac.mon_txp -1]); } - AfterMOX1: + AfterMOX1:; #endif } } @@ -549,8 +549,8 @@ } break; case (HW_DEACTIVATE | RESPONSE): - discard_queue(&cs->rq); - discard_queue(&cs->sq); + skb_queue_purge(&cs->rq); + skb_queue_purge(&cs->sq); if (cs->tx_skb) { dev_kfree_skb(cs->tx_skb); cs->tx_skb = NULL; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isac.h linux.20p6/drivers/isdn/hisax/isac.h --- linux.vanilla/drivers/isdn/hisax/isac.h Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/isac.h Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: isac.h,v 1.7 2000/06/26 08:59:13 keil Exp $ +/* $Id: isac.h,v 1.7.6.1 2001/02/16 16:43:27 kai Exp $ * * isac.h ISAC specific defines * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isar.c linux.20p6/drivers/isdn/hisax/isar.c --- linux.vanilla/drivers/isdn/hisax/isar.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/isar.c Mon Jun 25 14:24:52 2001 @@ -1,10 +1,10 @@ -/* $Id: isar.c,v 1.17 2000/11/24 17:05:37 kai Exp $ +/* $Id: isar.c,v 1.17.6.3 2001/06/09 15:14:17 kai Exp $ * * isar.c ISAR (Siemens PSB 7110) specific routines * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ @@ -383,12 +383,12 @@ } else { printk(KERN_DEBUG"isar selftest not OK %x/%x/%x\n", ireg->cmsb, ireg->clsb, ireg->par[0]); - ret = 1;goto reterror; + ret = 1;goto reterrflg; } ireg->iis = 0; if (!sendmsg(cs, ISAR_HIS_DIAG, ISAR_CTRL_SWVER, 0, NULL)) { printk(KERN_ERR"isar RQST SVN failed\n"); - ret = 1;goto reterror; + ret = 1;goto reterrflg; } cnt = 30000; /* max 300 ms */ while ((ireg->iis != ISAR_IIS_DIAG) && cnt) { @@ -1650,8 +1650,8 @@ kfree(bcs->hw.isar.rcvbuf); bcs->hw.isar.rcvbuf = NULL; } - discard_queue(&bcs->rqueue); - discard_queue(&bcs->squeue); + skb_queue_purge(&bcs->rqueue); + skb_queue_purge(&bcs->squeue); if (bcs->tx_skb) { dev_kfree_skb(bcs->tx_skb); bcs->tx_skb = NULL; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isar.h linux.20p6/drivers/isdn/hisax/isar.h --- linux.vanilla/drivers/isdn/hisax/isar.h Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/isar.h Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: isar.h,v 1.9 2000/06/26 08:59:13 keil Exp $ +/* $Id: isar.h,v 1.9.6.1 2001/02/16 16:43:27 kai Exp $ * * isar.h ISAR (Siemens PSB 7110) specific defines * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isdnl1.c linux.20p6/drivers/isdn/hisax/isdnl1.c --- linux.vanilla/drivers/isdn/hisax/isdnl1.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/isdnl1.c Mon Jun 25 14:24:47 2001 @@ -1,11 +1,11 @@ -/* $Id: isdnl1.c,v 2.41.6.1 2000/12/10 22:01:04 kai Exp $ +/* $Id: isdnl1.c,v 2.41.6.3 2001/05/26 15:19:57 kai Exp $ * * isdnl1.c common low level stuff for Siemens Chipsetbased isdn cards * based on the teles driver from Jan den Ouden * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * For changes and modifications please read * ../../../Documentation/isdn/HiSax.cert * @@ -15,7 +15,7 @@ * */ -const char *l1_revision = "$Revision: 2.41.6.1 $"; +const char *l1_revision = "$Revision: 2.41.6.3 $"; #define __NO_VERSION__ #include @@ -736,26 +736,41 @@ #define L1B_FN_COUNT (sizeof(L1BFnList)/sizeof(struct FsmNode)) -void __init +int __init Isdnl1New(void) { -#ifdef HISAX_UINTERFACE - l1fsm_u.state_count = L1U_STATE_COUNT; - l1fsm_u.event_count = L1_EVENT_COUNT; - l1fsm_u.strEvent = strL1Event; - l1fsm_u.strState = strL1UState; - FsmNew(&l1fsm_u, L1UFnList, L1U_FN_COUNT); -#endif + int retval; + l1fsm_s.state_count = L1S_STATE_COUNT; l1fsm_s.event_count = L1_EVENT_COUNT; l1fsm_s.strEvent = strL1Event; l1fsm_s.strState = strL1SState; - FsmNew(&l1fsm_s, L1SFnList, L1S_FN_COUNT); + retval = FsmNew(&l1fsm_s, L1SFnList, L1S_FN_COUNT); + if (retval) + return retval; + l1fsm_b.state_count = L1B_STATE_COUNT; l1fsm_b.event_count = L1_EVENT_COUNT; l1fsm_b.strEvent = strL1Event; l1fsm_b.strState = strL1BState; - FsmNew(&l1fsm_b, L1BFnList, L1B_FN_COUNT); + retval = FsmNew(&l1fsm_b, L1BFnList, L1B_FN_COUNT); + if (retval) { + FsmFree(&l1fsm_s); + return retval; + } +#ifdef HISAX_UINTERFACE + l1fsm_u.state_count = L1U_STATE_COUNT; + l1fsm_u.event_count = L1_EVENT_COUNT; + l1fsm_u.strEvent = strL1Event; + l1fsm_u.strState = strL1UState; + retval = FsmNew(&l1fsm_u, L1UFnList, L1U_FN_COUNT); + if (retval) { + FsmFree(&l1fsm_s); + FsmFree(&l1fsm_b); + return retval; + } +#endif + return 0; } void Isdnl1Free(void) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isdnl1.h linux.20p6/drivers/isdn/hisax/isdnl1.h --- linux.vanilla/drivers/isdn/hisax/isdnl1.h Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/isdnl1.h Fri May 4 23:24:34 2001 @@ -1,8 +1,8 @@ -/* $Id: isdnl1.h,v 2.9 2000/06/26 08:59:13 keil Exp $ +/* $Id: isdnl1.h,v 2.9.6.1 2001/02/16 16:43:27 kai Exp $ * * Layer 1 defines * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isdnl2.c linux.20p6/drivers/isdn/hisax/isdnl2.c --- linux.vanilla/drivers/isdn/hisax/isdnl2.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/isdnl2.c Mon Jun 25 14:24:47 2001 @@ -1,9 +1,9 @@ -/* $Id: isdnl2.c,v 2.25 2000/11/24 17:05:38 kai Exp $ +/* $Id: isdnl2.c,v 2.25.6.3 2001/06/09 15:14:17 kai Exp $ * * Author Karsten Keil (keil@isdn4linux.de) * based on the teles driver from Jan den Ouden * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * For changes and modifications please read * ../../../Documentation/isdn/HiSax.cert * @@ -16,7 +16,7 @@ #include "hisax.h" #include "isdnl2.h" -const char *l2_revision = "$Revision: 2.25 $"; +const char *l2_revision = "$Revision: 2.25.6.3 $"; static void l2m_debug(struct FsmInst *fi, char *fmt, ...); @@ -649,7 +649,7 @@ { struct PStack *st = fi->userdata; - discard_queue(&st->l2.i_queue); + skb_queue_purge(&st->l2.i_queue); test_and_set_bit(FLG_L3_INIT, &st->l2.flag); test_and_clear_bit(FLG_PEND_REL, &st->l2.flag); } @@ -659,7 +659,7 @@ { struct PStack *st = fi->userdata; - discard_queue(&st->l2.i_queue); + skb_queue_purge(&st->l2.i_queue); establishlink(fi); test_and_set_bit(FLG_L3_INIT, &st->l2.flag); } @@ -685,7 +685,7 @@ { struct PStack *st = fi->userdata; - discard_queue(&st->l2.i_queue); + skb_queue_purge(&st->l2.i_queue); freewin(st); FsmChangeState(fi, ST_L2_6); st->l2.rc = 0; @@ -745,7 +745,7 @@ st->ma.layer(st, MDL_ERROR | INDICATION, (void *) 'F'); if (st->l2.vs != st->l2.va) { - discard_queue(&st->l2.i_queue); + skb_queue_purge(&st->l2.i_queue); est = 1; } @@ -778,7 +778,7 @@ send_uframe(st, UA | get_PollFlagFree(st, skb), RSP); - discard_queue(&st->l2.i_queue); + skb_queue_purge(&st->l2.i_queue); freewin(st); lapb_dl_release_l2l3(st, INDICATION); } @@ -802,7 +802,7 @@ if (test_and_clear_bit(FLG_L3_INIT, &st->l2.flag)) { pr = DL_ESTABLISH | CONFIRM; } else if (st->l2.vs != st->l2.va) { - discard_queue(&st->l2.i_queue); + skb_queue_purge(&st->l2.i_queue); pr = DL_ESTABLISH | INDICATION; } @@ -860,7 +860,7 @@ if (get_PollFlagFree(st, skb)) { stop_t200(st, 7); if (!test_bit(FLG_L3_INIT, &st->l2.flag)) - discard_queue(&st->l2.i_queue); + skb_queue_purge(&st->l2.i_queue); if (test_bit(FLG_LAPB, &st->l2.flag)) st->l2.l2l1(st, PH_DEACTIVATE | REQUEST, NULL); st5_dl_release_l2l3(st); @@ -1156,7 +1156,7 @@ } else if (st->l2.rc == st->l2.N200) { FsmChangeState(fi, ST_L2_4); test_and_clear_bit(FLG_T200_RUN, &st->l2.flag); - discard_queue(&st->l2.i_queue); + skb_queue_purge(&st->l2.i_queue); st->ma.layer(st, MDL_ERROR | INDICATION, (void *) 'G'); if (test_bit(FLG_LAPB, &st->l2.flag)) st->l2.l2l1(st, PH_DEACTIVATE | REQUEST, NULL); @@ -1388,7 +1388,7 @@ { struct PStack *st = fi->userdata; - discard_queue(&st->l2.ui_queue); + skb_queue_purge(&st->l2.ui_queue); st->l2.tei = -1; FsmChangeState(fi, ST_L2_1); } @@ -1398,7 +1398,7 @@ { struct PStack *st = fi->userdata; - discard_queue(&st->l2.ui_queue); + skb_queue_purge(&st->l2.ui_queue); st->l2.tei = -1; st->l2.l2l3(st, DL_RELEASE | INDICATION, NULL); FsmChangeState(fi, ST_L2_1); @@ -1409,8 +1409,8 @@ { struct PStack *st = fi->userdata; - discard_queue(&st->l2.i_queue); - discard_queue(&st->l2.ui_queue); + skb_queue_purge(&st->l2.i_queue); + skb_queue_purge(&st->l2.ui_queue); freewin(st); st->l2.tei = -1; stop_t200(st, 17); @@ -1423,7 +1423,7 @@ { struct PStack *st = fi->userdata; - discard_queue(&st->l2.ui_queue); + skb_queue_purge(&st->l2.ui_queue); st->l2.tei = -1; stop_t200(st, 18); st->l2.l2l3(st, DL_RELEASE | CONFIRM, NULL); @@ -1435,8 +1435,8 @@ { struct PStack *st = fi->userdata; - discard_queue(&st->l2.i_queue); - discard_queue(&st->l2.ui_queue); + skb_queue_purge(&st->l2.i_queue); + skb_queue_purge(&st->l2.ui_queue); freewin(st); st->l2.tei = -1; stop_t200(st, 17); @@ -1450,8 +1450,8 @@ { struct PStack *st = fi->userdata; - discard_queue(&st->l2.i_queue); - discard_queue(&st->l2.ui_queue); + skb_queue_purge(&st->l2.i_queue); + skb_queue_purge(&st->l2.ui_queue); if (test_and_clear_bit(FLG_ESTAB_PEND, &st->l2.flag)) st->l2.l2l3(st, DL_RELEASE | INDICATION, NULL); } @@ -1461,8 +1461,8 @@ { struct PStack *st = fi->userdata; - discard_queue(&st->l2.i_queue); - discard_queue(&st->l2.ui_queue); + skb_queue_purge(&st->l2.i_queue); + skb_queue_purge(&st->l2.ui_queue); freewin(st); stop_t200(st, 19); st5_dl_release_l2l3(st); @@ -1474,7 +1474,7 @@ { struct PStack *st = fi->userdata; - discard_queue(&st->l2.ui_queue); + skb_queue_purge(&st->l2.ui_queue); stop_t200(st, 20); st->l2.l2l3(st, DL_RELEASE | CONFIRM, NULL); FsmChangeState(fi, ST_L2_4); @@ -1485,8 +1485,8 @@ { struct PStack *st = fi->userdata; - discard_queue(&st->l2.i_queue); - discard_queue(&st->l2.ui_queue); + skb_queue_purge(&st->l2.i_queue); + skb_queue_purge(&st->l2.ui_queue); freewin(st); stop_t200(st, 19); FsmDelTimer(&st->l2.t203, 19); @@ -1761,8 +1761,8 @@ { FsmDelTimer(&st->l2.t200, 21); FsmDelTimer(&st->l2.t203, 16); - discard_queue(&st->l2.i_queue); - discard_queue(&st->l2.ui_queue); + skb_queue_purge(&st->l2.i_queue); + skb_queue_purge(&st->l2.ui_queue); ReleaseWin(&st->l2); } @@ -1831,14 +1831,14 @@ { } -void __init +int __init Isdnl2New(void) { l2fsm.state_count = L2_STATE_COUNT; l2fsm.event_count = L2_EVENT_COUNT; l2fsm.strEvent = strL2Event; l2fsm.strState = strL2State; - FsmNew(&l2fsm, L2FnList, L2_FN_COUNT); + return FsmNew(&l2fsm, L2FnList, L2_FN_COUNT); } void diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isdnl2.h linux.20p6/drivers/isdn/hisax/isdnl2.h --- linux.vanilla/drivers/isdn/hisax/isdnl2.h Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/isdnl2.h Fri May 4 23:24:34 2001 @@ -1,8 +1,8 @@ -/* $Id: isdnl2.h,v 1.3 2000/06/26 08:59:13 keil Exp $ +/* $Id: isdnl2.h,v 1.3.6.1 2001/02/16 16:43:27 kai Exp $ * * Layer 2 defines * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isdnl3.c linux.20p6/drivers/isdn/hisax/isdnl3.c --- linux.vanilla/drivers/isdn/hisax/isdnl3.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/isdnl3.c Mon Jun 25 14:24:47 2001 @@ -1,9 +1,9 @@ -/* $Id: isdnl3.c,v 2.17.6.1 2001/01/08 17:09:20 kai Exp $ +/* $Id: isdnl3.c,v 2.17.6.4 2001/06/09 15:14:17 kai Exp $ * * Author Karsten Keil (keil@isdn4linux.de) * based on the teles driver from Jan den Ouden * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * For changes and modifications please read * ../../../Documentation/isdn/HiSax.cert * @@ -18,7 +18,7 @@ #include "isdnl3.h" #include -const char *l3_revision = "$Revision: 2.17.6.1 $"; +const char *l3_revision = "$Revision: 2.17.6.4 $"; static struct Fsm l3fsm; @@ -404,7 +404,7 @@ st->l3.global = NULL; } FsmDelTimer(&st->l3.l3m_timer, 54); - discard_queue(&st->l3.squeue); + skb_queue_purge(&st->l3.squeue); } void @@ -520,7 +520,7 @@ FsmDelTimer(&st->l3.l3m_timer, 52); FsmChangeState(fi, ST_L3_LC_REL); - discard_queue(&st->l3.squeue); + skb_queue_purge(&st->l3.squeue); l3ml3p(st, DL_RELEASE | INDICATION); } @@ -530,7 +530,7 @@ struct PStack *st = fi->userdata; FsmChangeState(fi, ST_L3_LC_REL); - discard_queue(&st->l3.squeue); + skb_queue_purge(&st->l3.squeue); l3ml3p(st, DL_RELEASE | CONFIRM); } @@ -591,14 +591,14 @@ } } -void __init +int __init Isdnl3New(void) { l3fsm.state_count = L3_STATE_COUNT; l3fsm.event_count = L3_EVENT_COUNT; l3fsm.strEvent = strL3Event; l3fsm.strState = strL3State; - FsmNew(&l3fsm, L3FnList, L3_FN_COUNT); + return FsmNew(&l3fsm, L3FnList, L3_FN_COUNT); } void diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isdnl3.h linux.20p6/drivers/isdn/hisax/isdnl3.h --- linux.vanilla/drivers/isdn/hisax/isdnl3.h Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/isdnl3.h Fri May 4 23:24:34 2001 @@ -1,6 +1,6 @@ -/* $Id: isdnl3.h,v 2.6 2000/06/26 08:59:13 keil Exp $ +/* $Id: isdnl3.h,v 2.6.6.1 2001/02/16 16:43:27 kai Exp $ * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/isurf.c linux.20p6/drivers/isdn/hisax/isurf.c --- linux.vanilla/drivers/isdn/hisax/isurf.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/isurf.c Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: isurf.c,v 1.10 2000/11/24 17:05:38 kai Exp $ +/* $Id: isurf.c,v 1.10.6.1 2001/02/16 16:43:27 kai Exp $ * * isurf.c low level stuff for Siemens I-Surf/I-Talk cards * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ @@ -17,7 +17,7 @@ extern const char *CardType[]; -static const char *ISurf_revision = "$Revision: 1.10 $"; +static const char *ISurf_revision = "$Revision: 1.10.6.1 $"; #define byteout(addr,val) outb(val,addr) #define bytein(addr) inb(addr) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/ix1_micro.c linux.20p6/drivers/isdn/hisax/ix1_micro.c --- linux.vanilla/drivers/isdn/hisax/ix1_micro.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/ix1_micro.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: ix1_micro.c,v 2.10 2000/11/24 17:05:38 kai Exp $ +/* $Id: ix1_micro.c,v 2.10.6.1 2001/02/16 16:43:27 kai Exp $ * * ix1_micro.c low level stuff for ITK ix1-micro Rev.2 isdn cards * derived from the original file teles3.c from Karsten Keil @@ -14,7 +14,7 @@ /* For the modification done by the author the following terms and conditions - apply (GNU PUBLIC LICENSE) + apply (GNU General Public License) This program is free software; you can redistribute it and/or modify @@ -50,7 +50,7 @@ #include "isdnl1.h" extern const char *CardType[]; -const char *ix1_revision = "$Revision: 2.10 $"; +const char *ix1_revision = "$Revision: 2.10.6.1 $"; #define byteout(addr,val) outb(val,addr) #define bytein(addr) inb(addr) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/jade.c linux.20p6/drivers/isdn/hisax/jade.c --- linux.vanilla/drivers/isdn/hisax/jade.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/jade.c Mon Jun 25 14:24:32 2001 @@ -1,10 +1,10 @@ -/* $Id: jade.c,v 1.6 2000/11/24 17:05:38 kai Exp $ +/* $Id: jade.c,v 1.6.6.2 2001/06/09 15:14:18 kai Exp $ * * jade.c JADE stuff (derived from original hscx.c) * * Author Roland Klabunde (R.Klabunde@Berkom.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ @@ -209,8 +209,8 @@ kfree(bcs->blog); bcs->blog = NULL; } - discard_queue(&bcs->rqueue); - discard_queue(&bcs->squeue); + skb_queue_purge(&bcs->rqueue); + skb_queue_purge(&bcs->squeue); if (bcs->tx_skb) { dev_kfree_skb(bcs->tx_skb); bcs->tx_skb = NULL; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/jade.h linux.20p6/drivers/isdn/hisax/jade.h --- linux.vanilla/drivers/isdn/hisax/jade.h Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/jade.h Fri May 4 23:24:34 2001 @@ -1,9 +1,9 @@ -/* $Id: jade.h,v 1.3 2000/06/26 08:59:14 keil Exp $ +/* $Id: jade.h,v 1.3.6.1 2001/02/16 16:43:27 kai Exp $ * jade.h JADE specific defines * * Author Roland Klabunde (R.Klabunde@Berkom.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/jade_irq.c linux.20p6/drivers/isdn/hisax/jade_irq.c --- linux.vanilla/drivers/isdn/hisax/jade_irq.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/jade_irq.c Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: jade_irq.c,v 1.5 2000/11/19 17:02:48 kai Exp $ +/* $Id: jade_irq.c,v 1.5.6.1 2001/02/16 16:43:27 kai Exp $ * * jade_irq.c Low level JADE IRQ stuff (derived from original hscx_irq.c) * * Author Roland Klabunde (R.Klabunde@Berkom.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/l3_1tr6.c linux.20p6/drivers/isdn/hisax/l3_1tr6.c --- linux.vanilla/drivers/isdn/hisax/l3_1tr6.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/l3_1tr6.c Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: l3_1tr6.c,v 2.13 2000/11/19 17:02:48 kai Exp $ +/* $Id: l3_1tr6.c,v 2.13.6.1 2001/02/16 16:43:27 kai Exp $ * * German 1TR6 D-channel protocol * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * For changes and modifications please read * ../../../Documentation/isdn/HiSax.cert * @@ -17,7 +17,7 @@ #include extern char *HiSax_getrev(const char *revision); -const char *l3_1tr6_revision = "$Revision: 2.13 $"; +const char *l3_1tr6_revision = "$Revision: 2.13.6.1 $"; #define MsgHead(ptr, cref, mty, dis) \ *ptr++ = dis; \ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/l3_1tr6.h linux.20p6/drivers/isdn/hisax/l3_1tr6.h --- linux.vanilla/drivers/isdn/hisax/l3_1tr6.h Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/l3_1tr6.h Fri May 4 23:24:34 2001 @@ -1,8 +1,8 @@ -/* $Id: l3_1tr6.h,v 2.2 2000/06/26 08:59:14 keil Exp $ +/* $Id: l3_1tr6.h,v 2.2.6.1 2001/02/16 16:43:27 kai Exp $ * * German 1TR6 D-channel protocol defines * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ #ifndef l3_1tr6 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/l3dss1.c linux.20p6/drivers/isdn/hisax/l3dss1.c --- linux.vanilla/drivers/isdn/hisax/l3dss1.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/l3dss1.c Mon Jun 25 14:24:29 2001 @@ -1,11 +1,11 @@ -/* $Id: l3dss1.c,v 2.30 2000/11/19 17:02:48 kai Exp $ +/* $Id: l3dss1.c,v 2.30.6.1 2001/02/16 16:43:27 kai Exp $ * * EURO/DSS1 D-channel protocol * * Author Karsten Keil (keil@isdn4linux.de) * based on the teles driver from Jan den Ouden * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * For changes and modifications please read * ../../../Documentation/isdn/HiSax.cert * @@ -22,7 +22,7 @@ #include extern char *HiSax_getrev(const char *revision); -const char *dss1_revision = "$Revision: 2.30 $"; +const char *dss1_revision = "$Revision: 2.30.6.1 $"; #define EXT_BEARER_CAPS 1 @@ -426,9 +426,9 @@ #undef FOO1 } -#else not HISAX_DE_AOC +#else /* not HISAX_DE_AOC */ l3_debug(st, "invoke break"); -#endif not HISAX_DE_AOC +#endif /* not HISAX_DE_AOC */ break; case 2: /* return result */ /* if no process available handle separately */ @@ -438,12 +438,12 @@ return; } if ((pc->prot.dss1.invoke_id) && (pc->prot.dss1.invoke_id == id)) - { /* Diversion successfull */ + { /* Diversion successful */ free_invoke_id(st,pc->prot.dss1.invoke_id); pc->prot.dss1.remote_result = 0; /* success */ pc->prot.dss1.invoke_id = 0; pc->redir_result = pc->prot.dss1.remote_result; - st->l3.l3l4(st, CC_REDIR | INDICATION, pc); } /* Diversion successfull */ + st->l3.l3l4(st, CC_REDIR | INDICATION, pc); } /* Diversion successful */ else l3_debug(st,"return error unknown identifier"); break; @@ -2112,7 +2112,7 @@ MsgHead(p, pc->callref, MT_FACILITY); for (subp = pc->chan->setup.phone; (*subp) && (*subp != '.'); subp++) len_phone++; /* len of phone number */ - if (*subp++ == '.') len_sub = strlen(subp) + 2; /* length including info subadress element */ + if (*subp++ == '.') len_sub = strlen(subp) + 2; /* length including info subaddress element */ *p++ = 0x1c; /* Facility info element */ *p++ = len_phone + len_sub + 2 + 2 + 8 + 3 + 3; /* length of element */ @@ -2138,7 +2138,7 @@ *p++ = pc->chan->setup.phone[l]; if (len_sub) - { *p++ = 0x04; /* called party subadress */ + { *p++ = 0x04; /* called party subaddress */ *p++ = len_sub - 2; while (*subp) *p++ = *subp++; } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/l3dss1.h linux.20p6/drivers/isdn/hisax/l3dss1.h --- linux.vanilla/drivers/isdn/hisax/l3dss1.h Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/l3dss1.h Fri May 4 23:24:34 2001 @@ -1,8 +1,8 @@ -/* $Id: l3dss1.h,v 1.10 2000/06/26 08:59:14 keil Exp $ +/* $Id: l3dss1.h,v 1.10.6.1 2001/02/16 16:43:28 kai Exp $ * * DSS1 (Euro) D-channel protocol defines * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/l3ni1.c linux.20p6/drivers/isdn/hisax/l3ni1.c --- linux.vanilla/drivers/isdn/hisax/l3ni1.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/l3ni1.c Mon Jun 25 14:24:52 2001 @@ -1,4 +1,4 @@ -// $Id: l3ni1.c,v 2.5.6.1 2000/12/06 16:59:19 kai Exp $ +// $Id: l3ni1.c,v 2.5.6.2 2001/02/16 16:43:28 kai Exp $ // //----------------------------------------------------------------------------- // @@ -16,7 +16,7 @@ // Will Scales - beta tester extraordinaire // Brett Whittacre - beta tester and remote devel system in Vegas // -// This file is (c) under GNU PUBLIC LICENSE +// This file is (c) under GNU General Public License // //----------------------------------------------------------------------------- #define __NO_VERSION__ @@ -26,7 +26,7 @@ #include extern char *HiSax_getrev(const char *revision); -const char *ni1_revision = "$Revision: 2.5.6.1 $"; +const char *ni1_revision = "$Revision: 2.5.6.2 $"; #define EXT_BEARER_CAPS 1 @@ -372,12 +372,12 @@ return; } if ((pc->prot.ni1.invoke_id) && (pc->prot.ni1.invoke_id == id)) - { /* Diversion successfull */ + { /* Diversion successful */ free_invoke_id(st,pc->prot.ni1.invoke_id); pc->prot.ni1.remote_result = 0; /* success */ pc->prot.ni1.invoke_id = 0; pc->redir_result = pc->prot.ni1.remote_result; - st->l3.l3l4(st, CC_REDIR | INDICATION, pc); } /* Diversion successfull */ + st->l3.l3l4(st, CC_REDIR | INDICATION, pc); } /* Diversion successful */ else l3_debug(st,"return error unknown identifier"); break; @@ -1973,7 +1973,7 @@ MsgHead(p, pc->callref, MT_FACILITY); for (subp = pc->chan->setup.phone; (*subp) && (*subp != '.'); subp++) len_phone++; /* len of phone number */ - if (*subp++ == '.') len_sub = strlen(subp) + 2; /* length including info subadress element */ + if (*subp++ == '.') len_sub = strlen(subp) + 2; /* length including info subaddress element */ *p++ = 0x1c; /* Facility info element */ *p++ = len_phone + len_sub + 2 + 2 + 8 + 3 + 3; /* length of element */ @@ -1999,7 +1999,7 @@ *p++ = pc->chan->setup.phone[l]; if (len_sub) - { *p++ = 0x04; /* called party subadress */ + { *p++ = 0x04; /* called party subaddress */ *p++ = len_sub - 2; while (*subp) *p++ = *subp++; } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/l3ni1.h linux.20p6/drivers/isdn/hisax/l3ni1.h --- linux.vanilla/drivers/isdn/hisax/l3ni1.h Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/l3ni1.h Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -// $Id: l3ni1.h,v 2.3 2000/11/16 13:50:43 keil Exp $ +// $Id: l3ni1.h,v 2.3.6.1 2001/02/16 16:43:28 kai Exp $ //----------------------------------------------------------------------------- // // NI1 D-channel protocol @@ -12,7 +12,7 @@ // code provided by Ragnar Paulson. // // -// This file is (c) under GNU PUBLIC LICENSE +// This file is (c) under GNU General Public License // //----------------------------------------------------------------------------- diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/lmgr.c linux.20p6/drivers/isdn/hisax/lmgr.c --- linux.vanilla/drivers/isdn/hisax/lmgr.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/lmgr.c Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: lmgr.c,v 1.7 2000/06/26 08:59:14 keil Exp $ +/* $Id: lmgr.c,v 1.7.6.1 2001/02/16 16:43:28 kai Exp $ * * Author Karsten Keil (keil@isdn4linux.de) * * Layermanagement module * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/mic.c linux.20p6/drivers/isdn/hisax/mic.c --- linux.vanilla/drivers/isdn/hisax/mic.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/mic.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: mic.c,v 1.10 2000/11/24 17:05:38 kai Exp $ +/* $Id: mic.c,v 1.10.6.1 2001/02/16 16:43:28 kai Exp $ * * mic.c low level stuff for mic cards * @@ -6,7 +6,7 @@ * * Author Stephan von Krawczynski * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ @@ -19,7 +19,7 @@ extern const char *CardType[]; -const char *mic_revision = "$Revision: 1.10 $"; +const char *mic_revision = "$Revision: 1.10.6.1 $"; #define byteout(addr,val) outb(val,addr) #define bytein(addr) inb(addr) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/netjet.c linux.20p6/drivers/isdn/hisax/netjet.c --- linux.vanilla/drivers/isdn/hisax/netjet.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/netjet.c Mon Jun 25 14:24:32 2001 @@ -1,4 +1,4 @@ -/* $Id: netjet.c,v 1.24.6.3 2001/02/13 10:33:58 kai Exp $ +/* $Id: netjet.c,v 1.24.6.5 2001/06/09 15:14:18 kai Exp $ * * netjet.c low level stuff for Traverse Technologie NETJet ISDN cards * @@ -6,7 +6,7 @@ * * Thanks to Traverse Technologie Australia for documents and informations * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ @@ -16,12 +16,13 @@ #include "isac.h" #include "hscx.h" #include "isdnl1.h" +#include #include #include #include #include "netjet.h" -const char *NETjet_revision = "$Revision: 1.24.6.3 $"; +const char *NETjet_revision = "$Revision: 1.24.6.5 $"; /* Interface functions */ @@ -879,8 +880,8 @@ kfree(bcs->hw.tiger.sendbuf); bcs->hw.tiger.sendbuf = NULL; } - discard_queue(&bcs->rqueue); - discard_queue(&bcs->squeue); + skb_queue_purge(&bcs->rqueue); + skb_queue_purge(&bcs->squeue); if (bcs->tx_skb) { dev_kfree_skb(bcs->tx_skb); bcs->tx_skb = NULL; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/netjet.h linux.20p6/drivers/isdn/hisax/netjet.h --- linux.vanilla/drivers/isdn/hisax/netjet.h Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/netjet.h Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -// $Id: netjet.h,v 2.5.6.1 2000/11/28 12:02:46 kai Exp $ +// $Id: netjet.h,v 2.5.6.2 2001/02/16 16:43:28 kai Exp $ //----------------------------------------------------------------------------- // // NETjet common header file @@ -6,7 +6,7 @@ // Author Kerstern Keil repackaged by // Matt Henderson - Traverse Technologies P/L www.traverse.com.au // -// This file is (c) under GNU PUBLIC LICENSE +// This file is (c) under GNU General Public License // //----------------------------------------------------------------------------- diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/niccy.c linux.20p6/drivers/isdn/hisax/niccy.c --- linux.vanilla/drivers/isdn/hisax/niccy.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/niccy.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: niccy.c,v 1.15.6.3 2001/02/13 10:33:58 kai Exp $ +/* $Id: niccy.c,v 1.15.6.4 2001/02/16 16:43:28 kai Exp $ * * niccy.c low level stuff for Dr. Neuhaus NICCY PnP and NICCY PCI and * compatible (SAGEM cybermodem) @@ -7,7 +7,7 @@ * * Thanks to Dr. Neuhaus and SAGEM for informations * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ @@ -23,7 +23,7 @@ #include extern const char *CardType[]; -const char *niccy_revision = "$Revision: 1.15.6.3 $"; +const char *niccy_revision = "$Revision: 1.15.6.4 $"; #define byteout(addr,val) outb(val,addr) #define bytein(addr) inb(addr) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/nj_s.c linux.20p6/drivers/isdn/hisax/nj_s.c --- linux.vanilla/drivers/isdn/hisax/nj_s.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/nj_s.c Fri May 4 23:24:34 2001 @@ -1,6 +1,6 @@ -// $Id: nj_s.c,v 2.7.6.3 2001/02/13 10:33:58 kai Exp $ +// $Id: nj_s.c,v 2.7.6.4 2001/02/16 16:43:28 kai Exp $ // -// This file is (c) under GNU PUBLIC LICENSE +// This file is (c) under GNU General Public License // #define __NO_VERSION__ @@ -15,7 +15,7 @@ #include #include "netjet.h" -const char *NETjet_S_revision = "$Revision: 2.7.6.3 $"; +const char *NETjet_S_revision = "$Revision: 2.7.6.4 $"; static u_char dummyrr(struct IsdnCardState *cs, int chan, u_char off) { diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/nj_u.c linux.20p6/drivers/isdn/hisax/nj_u.c --- linux.vanilla/drivers/isdn/hisax/nj_u.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/nj_u.c Fri May 4 23:24:34 2001 @@ -1,6 +1,6 @@ -/* $Id: nj_u.c,v 2.8.6.3 2001/02/13 10:33:58 kai Exp $ +/* $Id: nj_u.c,v 2.8.6.4 2001/02/16 16:43:28 kai Exp $ * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ @@ -16,7 +16,7 @@ #include #include "netjet.h" -const char *NETjet_U_revision = "$Revision: 2.8.6.3 $"; +const char *NETjet_U_revision = "$Revision: 2.8.6.4 $"; static u_char dummyrr(struct IsdnCardState *cs, int chan, u_char off) { diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/q931.c linux.20p6/drivers/isdn/hisax/q931.c --- linux.vanilla/drivers/isdn/hisax/q931.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/q931.c Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: q931.c,v 1.10 2000/06/26 08:59:14 keil Exp $ +/* $Id: q931.c,v 1.10.6.2 2001/03/13 16:17:08 kai Exp $ * * q931.c code to decode ITU Q.931 call control messages * * Author Jan den Ouden * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * * Changelog * @@ -1228,7 +1228,7 @@ finish = 1; } } else if (sapi == TEI_SAPI) { - dp += sprintf(dp, "tei managment\n"); + dp += sprintf(dp, "tei management\n"); finish = 1; } else { dp += sprintf(dp, "unknown sapi %d broadcast\n", sapi); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/rawhdlc.c linux.20p6/drivers/isdn/hisax/rawhdlc.c --- linux.vanilla/drivers/isdn/hisax/rawhdlc.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/rawhdlc.c Fri May 4 23:24:34 2001 @@ -1,11 +1,11 @@ -/* $Id: rawhdlc.c,v 1.5 2000/06/26 08:59:14 keil Exp $ +/* $Id: rawhdlc.c,v 1.5.6.1 2001/02/16 16:43:28 kai Exp $ * * rawhdlc.c support routines for cards that don't support HDLC * * Author Karsten Keil (keil@isdn4linux.de) * Brent Baccala * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * * Some passive ISDN cards, such as the Traverse NETJet and the AMD 7930, * don't perform HDLC encapsulation over the B channel. Drivers for diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/rawhdlc.h linux.20p6/drivers/isdn/hisax/rawhdlc.h --- linux.vanilla/drivers/isdn/hisax/rawhdlc.h Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/rawhdlc.h Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: rawhdlc.h,v 1.3 2000/06/26 08:59:14 keil Exp $ +/* $Id: rawhdlc.h,v 1.3.6.1 2001/02/16 16:43:29 kai Exp $ * * rawhdlc.h support routines for cards that don't support HDLC * * Author Brent Baccala * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/s0box.c linux.20p6/drivers/isdn/hisax/s0box.c --- linux.vanilla/drivers/isdn/hisax/s0box.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/s0box.c Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: s0box.c,v 2.4 2000/11/24 17:05:38 kai Exp $ +/* $Id: s0box.c,v 2.4.6.1 2001/02/16 16:43:29 kai Exp $ * * s0box.c low level stuff for Creatix S0BOX * * Author S0BOX specific stuff: Enrik Berkhan (enrik@starfleet.inka.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ #define __NO_VERSION__ @@ -15,7 +15,7 @@ #include "isdnl1.h" extern const char *CardType[]; -const char *s0box_revision = "$Revision: 2.4 $"; +const char *s0box_revision = "$Revision: 2.4.6.1 $"; static inline void writereg(unsigned int padr, signed int addr, u_char off, u_char val) { diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/saphir.c linux.20p6/drivers/isdn/hisax/saphir.c --- linux.vanilla/drivers/isdn/hisax/saphir.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/saphir.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: saphir.c,v 1.8 2000/11/24 17:05:38 kai Exp $ +/* $Id: saphir.c,v 1.8.6.1 2001/02/16 16:43:29 kai Exp $ * * saphir.c low level stuff for HST Saphir 1 * @@ -6,7 +6,7 @@ * * Thanks to HST High Soft Tech GmbH * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ @@ -19,7 +19,7 @@ #include "isdnl1.h" extern const char *CardType[]; -static char *saphir_rev = "$Revision: 1.8 $"; +static char *saphir_rev = "$Revision: 1.8.6.1 $"; #define byteout(addr,val) outb(val,addr) #define bytein(addr) inb(addr) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/sedlbauer.c linux.20p6/drivers/isdn/hisax/sedlbauer.c --- linux.vanilla/drivers/isdn/hisax/sedlbauer.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/sedlbauer.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: sedlbauer.c,v 1.25.6.3 2001/02/13 10:33:58 kai Exp $ +/* $Id: sedlbauer.c,v 1.25.6.4 2001/02/16 16:43:29 kai Exp $ * * sedlbauer.c low level stuff for Sedlbauer cards * includes support for the Sedlbauer speed star (speed star II), @@ -16,7 +16,7 @@ * Sedlbauer AG for informations * Edgar Toernig * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ @@ -53,7 +53,7 @@ extern const char *CardType[]; -const char *Sedlbauer_revision = "$Revision: 1.25.6.3 $"; +const char *Sedlbauer_revision = "$Revision: 1.25.6.4 $"; const char *Sedlbauer_Types[] = {"None", "speed card/win", "speed star", "speed fax+", diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/sportster.c linux.20p6/drivers/isdn/hisax/sportster.c --- linux.vanilla/drivers/isdn/hisax/sportster.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/sportster.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: sportster.c,v 1.14 2000/11/24 17:05:38 kai Exp $ +/* $Id: sportster.c,v 1.14.6.1 2001/02/16 16:43:29 kai Exp $ * * sportster.c low level stuff for USR Sportster internal TA * @@ -6,7 +6,7 @@ * * Thanks to Christian "naddy" Weisgerber (3Com, US Robotics) for documentation * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ #define __NO_VERSION__ @@ -17,7 +17,7 @@ #include "isdnl1.h" extern const char *CardType[]; -const char *sportster_revision = "$Revision: 1.14 $"; +const char *sportster_revision = "$Revision: 1.14.6.1 $"; #define byteout(addr,val) outb(val,addr) #define bytein(addr) inb(addr) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/tei.c linux.20p6/drivers/isdn/hisax/tei.c --- linux.vanilla/drivers/isdn/hisax/tei.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/tei.c Mon Jun 25 14:24:47 2001 @@ -1,9 +1,9 @@ -/* $Id: tei.c,v 2.17 2000/11/24 17:05:38 kai Exp $ +/* $Id: tei.c,v 2.17.6.2 2001/05/26 15:19:57 kai Exp $ * * Author Karsten Keil (keil@isdn4linux.de) * based on the teles driver from Jan den Ouden * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * For changes and modifications please read * ../../../Documentation/isdn/HiSax.cert * @@ -17,7 +17,7 @@ #include #include -const char *tei_revision = "$Revision: 2.17 $"; +const char *tei_revision = "$Revision: 2.17.6.2 $"; #define ID_REQUEST 1 #define ID_ASSIGNED 2 @@ -446,14 +446,14 @@ #define TEI_FN_COUNT (sizeof(TeiFnList)/sizeof(struct FsmNode)) -void __init +int __init TeiNew(void) { teifsm.state_count = TEI_STATE_COUNT; teifsm.event_count = TEI_EVENT_COUNT; teifsm.strEvent = strTeiEvent; teifsm.strState = strTeiState; - FsmNew(&teifsm, TeiFnList, TEI_FN_COUNT); + return FsmNew(&teifsm, TeiFnList, TEI_FN_COUNT); } void diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/teleint.c linux.20p6/drivers/isdn/hisax/teleint.c --- linux.vanilla/drivers/isdn/hisax/teleint.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/teleint.c Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: teleint.c,v 1.14 2000/11/24 17:05:38 kai Exp $ +/* $Id: teleint.c,v 1.14.6.1 2001/02/16 16:43:29 kai Exp $ * * teleint.c low level stuff for TeleInt isdn cards * * Author Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ @@ -17,7 +17,7 @@ extern const char *CardType[]; -const char *TeleInt_revision = "$Revision: 1.14 $"; +const char *TeleInt_revision = "$Revision: 1.14.6.1 $"; #define byteout(addr,val) outb(val,addr) #define bytein(addr) inb(addr) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/teles0.c linux.20p6/drivers/isdn/hisax/teles0.c --- linux.vanilla/drivers/isdn/hisax/teles0.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/teles0.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: teles0.c,v 2.13 2000/11/24 17:05:38 kai Exp $ +/* $Id: teles0.c,v 2.13.6.1 2001/02/16 16:43:29 kai Exp $ * * teles0.c low level stuff for Teles Memory IO isdn cards * based on the teles driver from Jan den Ouden @@ -9,7 +9,7 @@ * Fritz Elfert * Beat Doebeli * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ #define __NO_VERSION__ @@ -21,7 +21,7 @@ extern const char *CardType[]; -const char *teles0_revision = "$Revision: 2.13 $"; +const char *teles0_revision = "$Revision: 2.13.6.1 $"; #define TELES_IOMEM_SIZE 0x400 #define byteout(addr,val) outb(val,addr) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/teles3.c linux.20p6/drivers/isdn/hisax/teles3.c --- linux.vanilla/drivers/isdn/hisax/teles3.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/teles3.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: teles3.c,v 2.17 2000/11/24 17:05:38 kai Exp $ +/* $Id: teles3.c,v 2.17.6.1 2001/02/16 16:43:29 kai Exp $ * * teles3.c low level stuff for Teles 16.3 & PNP isdn cards * @@ -10,7 +10,7 @@ * Fritz Elfert * Beat Doebeli * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ #define __NO_VERSION__ @@ -21,7 +21,7 @@ #include "isdnl1.h" extern const char *CardType[]; -const char *teles3_revision = "$Revision: 2.17 $"; +const char *teles3_revision = "$Revision: 2.17.6.1 $"; #define byteout(addr,val) outb(val,addr) #define bytein(addr) inb(addr) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/telespci.c linux.20p6/drivers/isdn/hisax/telespci.c --- linux.vanilla/drivers/isdn/hisax/telespci.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/telespci.c Fri May 4 23:24:34 2001 @@ -1,11 +1,11 @@ -/* $Id: telespci.c,v 2.16.6.3 2001/02/13 10:33:58 kai Exp $ +/* $Id: telespci.c,v 2.16.6.4 2001/02/16 16:43:29 kai Exp $ * * telespci.c low level stuff for Teles PCI isdn cards * * Author Ton van Rosmalen * Karsten Keil (keil@isdn4linux.de) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ #define __NO_VERSION__ @@ -19,7 +19,7 @@ #include extern const char *CardType[]; -const char *telespci_revision = "$Revision: 2.16.6.3 $"; +const char *telespci_revision = "$Revision: 2.16.6.4 $"; #define ZORAN_PO_RQ_PEN 0x02000000 #define ZORAN_PO_WR 0x00800000 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/w6692.c linux.20p6/drivers/isdn/hisax/w6692.c --- linux.vanilla/drivers/isdn/hisax/w6692.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/w6692.c Mon Jun 25 14:24:32 2001 @@ -1,11 +1,11 @@ -/* $Id: w6692.c,v 1.12.6.3 2001/02/13 10:33:58 kai Exp $ +/* $Id: w6692.c,v 1.12.6.5 2001/06/09 15:14:18 kai Exp $ * * w6692.c Winbond W6692 specific routines * * Author Petr Novak * (based on HiSax driver by Karsten Keil) * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ @@ -36,7 +36,7 @@ extern const char *CardType[]; -const char *w6692_revision = "$Revision: 1.12.6.3 $"; +const char *w6692_revision = "$Revision: 1.12.6.5 $"; #define DBUSY_TIMER_VALUE 80 @@ -642,8 +642,8 @@ /* !!! not implemented yet */ break; case (HW_DEACTIVATE | RESPONSE): - discard_queue(&cs->rq); - discard_queue(&cs->sq); + skb_queue_purge(&cs->rq); + skb_queue_purge(&cs->sq); if (cs->tx_skb) { dev_kfree_skb(cs->tx_skb); cs->tx_skb = NULL; @@ -806,8 +806,8 @@ kfree(bcs->blog); bcs->blog = NULL; } - discard_queue(&bcs->rqueue); - discard_queue(&bcs->squeue); + skb_queue_purge(&bcs->rqueue); + skb_queue_purge(&bcs->squeue); if (bcs->tx_skb) { dev_kfree_skb(bcs->tx_skb); bcs->tx_skb = NULL; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hisax/w6692.h linux.20p6/drivers/isdn/hisax/w6692.h --- linux.vanilla/drivers/isdn/hisax/w6692.h Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hisax/w6692.h Fri May 4 23:24:34 2001 @@ -1,10 +1,10 @@ -/* $Id: w6692.h,v 1.2 2000/06/26 08:59:15 keil Exp $ +/* $Id: w6692.h,v 1.2.6.1 2001/02/16 16:43:29 kai Exp $ * * w6692.h Winbond W6692 specific defines * * Author Petr Novak * - * This file is (c) under GNU PUBLIC LICENSE + * This file is (c) under GNU General Public License * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/boardergo.c linux.20p6/drivers/isdn/hysdn/boardergo.c --- linux.vanilla/drivers/isdn/hysdn/boardergo.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hysdn/boardergo.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: boardergo.c,v 1.5.6.1 2000/12/10 22:01:04 kai Exp $ +/* $Id: boardergo.c,v 1.5.6.3 2001/03/13 16:17:09 kai Exp $ * Linux driver for HYSDN cards, specific routines for ergo type boards. * @@ -270,7 +270,7 @@ return (-ERR_BOOTIMG_FAIL); } } /* start_boot_img */ - return (0); /* successfull */ + return (0); /* successful */ } /* ergo_writebootimg */ /********************************************************************************/ @@ -337,7 +337,7 @@ /***********************************************************************************/ /* ergo_waitpofready waits for a maximum of 10 seconds for the completition of the */ -/* boot process. If the process has been successfull 0 is returned otherwise a */ +/* boot process. If the process has been successful 0 is returned otherwise a */ /* negative error code is returned. */ /***********************************************************************************/ static int @@ -361,7 +361,7 @@ (dpr->ToPcSize < MIN_RDY_MSG_SIZE) || (dpr->ToPcSize > MAX_RDY_MSG_SIZE) || ((*(ulong *) dpr->ToPcBuf) != RDY_MAGIC)) - break; /* an error occured */ + break; /* an error occurred */ /* Check for additional data delivered during SysReady */ msg_size = dpr->ToPcSize - RDY_MAGIC_SIZE; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/hycapi.c linux.20p6/drivers/isdn/hysdn/hycapi.c --- linux.vanilla/drivers/isdn/hysdn/hycapi.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hysdn/hycapi.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: hycapi.c,v 1.8 2000/11/22 17:13:13 kai Exp $ +/* $Id: hycapi.c,v 1.8.6.1 2001/02/16 16:43:30 kai Exp $ * * Linux driver for HYSDN cards, CAPI2.0-Interface. * written by Ulrich Albrecht (u.albrecht@hypercope.de) for Hypercope GmbH @@ -41,7 +41,7 @@ #include "hysdn_defs.h" #include -static char hycapi_revision[]="$Revision: 1.8 $"; +static char hycapi_revision[]="$Revision: 1.8.6.1 $"; typedef struct _hycapi_appl { unsigned int ctrl_mask; @@ -522,7 +522,7 @@ /****************************************************************** hycapi_rx_capipkt -Recieve a capi-message. +Receive a capi-message. All B3_DATA_IND are converted to 64K-extension compatible format. New nccis are created if neccessary. diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/hysdn_boot.c linux.20p6/drivers/isdn/hysdn/hysdn_boot.c --- linux.vanilla/drivers/isdn/hysdn/hysdn_boot.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hysdn/hysdn_boot.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: hysdn_boot.c,v 1.4.6.1 2001/02/10 14:41:22 kai Exp $ +/* $Id: hysdn_boot.c,v 1.4.6.3 2001/03/13 16:17:09 kai Exp $ * Linux driver for HYSDN cards, specific routines for booting and pof handling. * @@ -49,7 +49,7 @@ uchar pof_state; /* actual state of read handler */ uchar is_crypted; /* card data is crypted */ int BufSize; /* actual number of bytes bufferd */ - int last_error; /* last occured error */ + int last_error; /* last occurred error */ word pof_recid; /* actual pof recid */ ulong pof_reclen; /* total length of pof record data */ ulong pof_recoffset; /* actual offset inside pof record */ @@ -62,7 +62,7 @@ }; /*****************************************************/ -/* start decryption of sucessive POF file chuncks. */ +/* start decryption of successive POF file chuncks. */ /* */ /* to be called at start of POF file reading, */ /* before starting any decryption on any POF record. */ @@ -93,7 +93,7 @@ /********************************************************************************/ /* pof_handle_data executes the required actions dependant on the active record */ -/* id. If successfull 0 is returned, a negative value shows an error. */ +/* id. If successful 0 is returned, a negative value shows an error. */ /********************************************************************************/ static int pof_handle_data(hysdn_card * card, int datlen) @@ -182,7 +182,7 @@ /* number of data bytes. The number delivered is additionally supplied for */ /* verification. The functions handles the data and returns the needed number */ /* of bytes for the next action. If the returned value is 0 or less an error */ -/* occured and booting must be aborted. */ +/* occurred and booting must be aborted. */ /******************************************************************************/ int pof_write_buffer(hysdn_card * card, int datlen) @@ -253,7 +253,7 @@ break; } if ((boot->last_error = pof_handle_data(card, datlen)) < 0) - return (boot->last_error); /* an error occured */ + return (boot->last_error); /* an error occurred */ boot->pof_recoffset += datlen; if (boot->pof_recoffset >= boot->pof_reclen) { boot->pof_state = POF_READ_TAG_HEAD; /* now start with single tags */ @@ -346,7 +346,7 @@ /*********************************************************************************/ /* EvalSysrTokData checks additional records delivered with the Sysready Message */ -/* when POF has been booted. A return value of 0 is used if no error occured. */ +/* when POF has been booted. A return value of 0 is used if no error occurred. */ /*********************************************************************************/ int EvalSysrTokData(hysdn_card * card, uchar * cp, int len) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/hysdn_init.c linux.20p6/drivers/isdn/hysdn/hysdn_init.c --- linux.vanilla/drivers/isdn/hysdn/hysdn_init.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hysdn/hysdn_init.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: hysdn_init.c,v 1.6.6.4 2001/02/10 14:41:22 kai Exp $ +/* $Id: hysdn_init.c,v 1.6.6.5 2001/02/16 16:43:30 kai Exp $ * Linux driver for HYSDN cards, init functions. * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH @@ -32,7 +32,7 @@ #include "hysdn_defs.h" -static char *hysdn_init_revision = "$Revision: 1.6.6.4 $"; +static char *hysdn_init_revision = "$Revision: 1.6.6.5 $"; int cardmax; /* number of found cards */ hysdn_card *card_root = NULL; /* pointer to first card */ @@ -189,7 +189,7 @@ /****************************************************************************/ /* init_module is called once when the module is loaded to do all necessary */ /* things like autodetect... */ -/* If the return value of this function is 0 the init has been successfull */ +/* If the return value of this function is 0 the init has been successful */ /* and the module is added to the list in /proc/modules, otherwise an error */ /* is assumed and the module will not be kept in memory. */ /****************************************************************************/ @@ -227,7 +227,7 @@ /***********************************************************************/ /* cleanup_module is called when the module is released by the kernel. */ -/* The routine is only called if init_module has been successfull and */ +/* The routine is only called if init_module has been successful and */ /* the module counter has a value of 0. Otherwise this function will */ /* not be called. This function must release all resources still allo- */ /* cated as after the return from this function the module code will */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/hysdn_net.c linux.20p6/drivers/isdn/hysdn/hysdn_net.c --- linux.vanilla/drivers/isdn/hysdn/hysdn_net.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hysdn/hysdn_net.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: hysdn_net.c,v 1.8 2000/11/13 22:51:47 kai Exp $ +/* $Id: hysdn_net.c,v 1.8.6.1 2001/02/16 16:43:30 kai Exp $ * Linux driver for HYSDN cards, net (ethernet type) handling routines. * @@ -38,7 +38,7 @@ #include "hysdn_defs.h" /* store the actual version for log reporting */ -char *hysdn_net_revision = "$Revision: 1.8 $"; +char *hysdn_net_revision = "$Revision: 1.8.6.1 $"; #define MAX_SKB_BUFFERS 20 /* number of buffers for keeping TX-data */ @@ -317,7 +317,7 @@ if (card->debug_flags & LOG_NET_INIT) hysdn_addlog(card, "network device deleted"); - return (0); /* always successfull */ + return (0); /* always successful */ } /* hysdn_net_release */ /*****************************************************************************/ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/hysdn_procconf.c linux.20p6/drivers/isdn/hysdn/hysdn_procconf.c --- linux.vanilla/drivers/isdn/hysdn/hysdn_procconf.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hysdn/hysdn_procconf.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: hysdn_procconf.c,v 1.8 2000/11/13 22:51:47 kai Exp $ +/* $Id: hysdn_procconf.c,v 1.8.6.1 2001/03/13 16:17:09 kai Exp $ * Linux driver for HYSDN cards, /proc/net filesystem dir and conf functions. * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH @@ -30,7 +30,7 @@ #include "hysdn_defs.h" -static char *hysdn_procconf_revision = "$Revision: 1.8 $"; +static char *hysdn_procconf_revision = "$Revision: 1.8.6.1 $"; #define INFO_OUT_LEN 80 /* length of info line including lf */ @@ -55,7 +55,7 @@ /***********************************************************************/ /* process_line parses one config line and transfers it to the card if */ /* necessary. */ -/* if the return value is negative an error occured. */ +/* if the return value is negative an error occurred. */ /***********************************************************************/ static int process_line(struct conf_writedata *cnf) @@ -129,7 +129,7 @@ if (ch == 0x1A) { /* we detected a pof file */ if ((cnf->needed_size = pof_write_open(cnf->card, &cnf->pof_buffer)) <= 0) - return (cnf->needed_size); /* an error occured -> exit */ + return (cnf->needed_size); /* an error occurred -> exit */ cnf->buf_size = 0; /* buffer is empty */ cnf->state = CONF_STATE_POF; /* new state */ } else { @@ -157,7 +157,7 @@ cnf->needed_size = pof_write_buffer(cnf->card, cnf->buf_size); /* write data */ if (cnf->needed_size <= 0) { cnf->card->state = CARD_STATE_BOOTERR; /* show boot error */ - return (cnf->needed_size); /* an error occured */ + return (cnf->needed_size); /* an error occurred */ } cnf->buf_size = 0; /* buffer is empty again */ } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/hysdn/hysdn_sched.c linux.20p6/drivers/isdn/hysdn/hysdn_sched.c --- linux.vanilla/drivers/isdn/hysdn/hysdn_sched.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/hysdn/hysdn_sched.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: hysdn_sched.c,v 1.5 2000/11/22 17:13:13 kai Exp $ +/* $Id: hysdn_sched.c,v 1.5.6.1 2001/03/13 16:17:09 kai Exp $ * Linux driver for HYSDN cards, scheduler routines for handling exchange card <-> pc. * @@ -141,7 +141,7 @@ /*****************************************************************************/ -/* send one config line to the card and return 0 if successfull, otherwise a */ +/* send one config line to the card and return 0 if successful, otherwise a */ /* negative error code. */ /* The function works with timeouts perhaps not giving the greatest speed */ /* sending the line, but this should be meaningless beacuse only some lines */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/icn/icn.c linux.20p6/drivers/isdn/icn/icn.c --- linux.vanilla/drivers/isdn/icn/icn.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/icn/icn.c Mon Jun 25 14:24:41 2001 @@ -1,4 +1,4 @@ -/* $Id: icn.c,v 1.65.6.2 2000/12/17 22:45:13 kai Exp $ +/* $Id: icn.c,v 1.65.6.5 2001/06/09 15:14:19 kai Exp $ * ISDN low-level module for the ICN active ISDN-Card. * @@ -34,7 +34,7 @@ #undef MAP_DEBUG static char -*revision = "$Revision: 1.65.6.2 $"; +*revision = "$Revision: 1.65.6.5 $"; static int icn_addcard(int, char *, char *); @@ -51,8 +51,7 @@ struct sk_buff *skb; unsigned long flags; - while ((skb = skb_dequeue(queue))) - dev_kfree_skb(skb); + skb_queue_purge(queue); save_flags(flags); cli(); card->xlen[channel] = 0; @@ -838,23 +837,23 @@ card->other->rvalid = 1; } if (!dev.mvalid) { - if (check_shmem((ulong) dev.shmem, 0x4000)) { + if (check_mem_region(dev.memaddr, 0x4000)) { printk(KERN_WARNING - "icn: memory at 0x%08lx in use.\n", - (ulong) dev.shmem); + "icn: memory at 0x%08lx in use.\n", dev.memaddr); restore_flags(flags); return -EBUSY; } - request_shmem((ulong) dev.shmem, 0x4000, "icn"); + request_mem_region(dev.memaddr, 0x4000, "icn-isdn (all cards)"); + dev.shmem = ioremap(dev.memaddr, 0x4000); dev.mvalid = 1; } restore_flags(flags); OUTB_P(0, ICN_RUN); /* Reset Controller */ OUTB_P(0, ICN_MAPRAM); /* Disable RAM */ icn_shiftout(ICN_CFG, 0x0f, 3, 4); /* Windowsize= 16k */ - icn_shiftout(ICN_CFG, (unsigned long) dev.shmem, 23, 10); /* Set RAM-Addr. */ + icn_shiftout(ICN_CFG, dev.memaddr, 23, 10); /* Set RAM-Addr. */ #ifdef BOOT_DEBUG - printk(KERN_DEBUG "shmem=%08lx\n", (ulong) dev.shmem); + printk(KERN_DEBUG "shmem=%08lx\n", dev.memaddr); #endif SLEEP(1); #ifdef BOOT_DEBUG @@ -868,7 +867,7 @@ SLEEP(1); memcpy_toio(dev.shmem, codebuf, ICN_CODE_STAGE1); /* Copy code */ #ifdef BOOT_DEBUG - printk(KERN_DEBUG "Bootloader transfered\n"); + printk(KERN_DEBUG "Bootloader transferred\n"); #endif if (card->doubleS0) { SLEEP(1); @@ -884,7 +883,7 @@ SLEEP(1); memcpy_toio(dev.shmem, codebuf, ICN_CODE_STAGE1); /* Copy code */ #ifdef BOOT_DEBUG - printk(KERN_DEBUG "Bootloader transfered\n"); + printk(KERN_DEBUG "Bootloader transferred\n"); #endif } kfree(codebuf); @@ -1177,29 +1176,31 @@ memcpy(&a, c->parm.num, sizeof(ulong)); switch (c->arg) { case ICN_IOCTL_SETMMIO: - if ((unsigned long) dev.shmem != (a & 0x0ffc000)) { - if (check_shmem((ulong) (a & 0x0ffc000), 0x4000)) { + if (dev.memaddr != (a & 0x0ffc000)) { + if (check_mem_region(a & 0x0ffc000, 0x4000)) { printk(KERN_WARNING "icn: memory at 0x%08lx in use.\n", - (ulong) (a & 0x0ffc000)); + a & 0x0ffc000); return -EINVAL; } icn_stopallcards(); save_flags(flags); cli(); - if (dev.mvalid) - release_shmem((ulong) dev.shmem, 0x4000); + if (dev.mvalid) { + iounmap(dev.shmem); + release_mem_region(dev.memaddr, 0x4000); + } dev.mvalid = 0; - dev.shmem = (icn_shmem *) (a & 0x0ffc000); + dev.memaddr = a & 0x0ffc000; restore_flags(flags); printk(KERN_INFO "icn: (%s) mmio set to 0x%08lx\n", CID, - (unsigned long) dev.shmem); + dev.memaddr); } break; case ICN_IOCTL_GETMMIO: - return (long) dev.shmem; + return (long) dev.memaddr; case ICN_IOCTL_SETPORT: if (a == 0x300 || a == 0x310 || a == 0x320 || a == 0x330 || a == 0x340 || a == 0x350 || a == 0x360 || @@ -1649,7 +1650,7 @@ if (ints[0]) portbase = ints[1]; if (ints[0] > 1) - membase = ints[2]; + membase = (unsigned long)ints[2]; if (str && *str) { strcpy(sid, str); icn_id = sid; @@ -1668,7 +1669,7 @@ char rev[10]; memset(&dev, 0, sizeof(icn_dev)); - dev.shmem = (icn_shmem *) ((unsigned long) membase & 0x0ffc000); + dev.memaddr = (membase & 0x0ffc000); dev.channel = -1; dev.mcard = NULL; dev.firstload = 1; @@ -1680,7 +1681,7 @@ } else strcpy(rev, " ??? "); printk(KERN_NOTICE "ICN-ISDN-driver Rev%smem=0x%08lx\n", rev, - (ulong) dev.shmem); + dev.memaddr); return (icn_addcard(portbase, icn_id, icn_id2)); } @@ -1714,8 +1715,10 @@ card = card->next; kfree(last); } - if (dev.mvalid) - release_shmem((ulong) dev.shmem, 0x4000); + if (dev.mvalid) { + iounmap(dev.shmem); + release_mem_region(dev.memaddr, 0x4000); + } printk(KERN_NOTICE "ICN-ISDN-driver unloaded\n"); } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/icn/icn.h linux.20p6/drivers/isdn/icn/icn.h --- linux.vanilla/drivers/isdn/icn/icn.h Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/icn/icn.h Mon Jun 25 14:56:47 2001 @@ -1,4 +1,4 @@ -/* $Id: icn.h,v 1.30.6.1 2001/02/10 14:41:23 kai Exp $ +/* $Id: icn.h,v 1.30.6.3 2001/04/20 02:42:01 keil Exp $ * ISDN lowlevel-module for the ICN active ISDN-Card. * @@ -187,6 +187,7 @@ * Main driver data */ typedef struct icn_dev { + unsigned long memaddr; /* Address of memory mapped buffers */ icn_shmem *shmem; /* Pointer to memory-mapped-buffers */ int mvalid; /* IO-shmem has been requested */ int channel; /* Currently mapped channel */ @@ -210,16 +211,16 @@ * integers. */ static int portbase = ICN_BASEADDR; -static int membase = ICN_MEMADDR; +static unsigned long membase = ICN_MEMADDR; static char *icn_id = "\0"; static char *icn_id2 = "\0"; #ifdef MODULE MODULE_AUTHOR("Fritz Elfert"); MODULE_PARM(portbase, "i"); -MODULE_PARM_DESC(portbase, "Port adress of first card"); -MODULE_PARM(membase, "i"); -MODULE_PARM_DESC(membase, "Shared memory adress of all cards"); +MODULE_PARM_DESC(portbase, "Port address of first card"); +MODULE_PARM(membase, "l"); +MODULE_PARM_DESC(membase, "Shared memory address of all cards"); MODULE_PARM(icn_id, "s"); MODULE_PARM_DESC(icn_id, "ID-String of first card"); MODULE_PARM(icn_id2, "s"); @@ -286,14 +287,6 @@ #define MIN(a,b) ((ab)?a:b) - -/* Hopefully, a separate resource-registration-scheme for shared-memory - * will be introduced into the kernel. Until then, we use the normal - * routines, designed for port-registration. - */ -#define check_shmem check_region -#define release_shmem release_region -#define request_shmem request_region #endif /* defined(__KERNEL__) || defined(__DEBUGVAR__) */ #endif /* icn_h */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_common.c linux.20p6/drivers/isdn/isdn_common.c --- linux.vanilla/drivers/isdn/isdn_common.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/isdn_common.c Mon Jun 25 14:24:32 2001 @@ -1,4 +1,4 @@ -/* $Id: isdn_common.c,v 1.114.6.7 2001/02/10 14:41:19 kai Exp $ +/* $Id: isdn_common.c,v 1.114.6.12 2001/06/09 15:14:15 kai Exp $ * Linux ISDN subsystem, common used functions (linklevel). * @@ -42,7 +42,7 @@ #endif #ifdef CONFIG_ISDN_DIVERSION #include -#endif CONFIG_ISDN_DIVERSION +#endif /* CONFIG_ISDN_DIVERSION */ #include "isdn_v110.h" /* Debugflags */ @@ -50,7 +50,7 @@ isdn_dev *dev; -static char *isdn_revision = "$Revision: 1.114.6.7 $"; +static char *isdn_revision = "$Revision: 1.114.6.12 $"; extern char *isdn_net_revision; extern char *isdn_tty_revision; @@ -68,7 +68,7 @@ #ifdef CONFIG_ISDN_DIVERSION static isdn_divert_if *divert_if; /* = NULL */ -#endif CONFIG_ISDN_DIVERSION +#endif /* CONFIG_ISDN_DIVERSION */ static int isdn_writebuf_stub(int, int, const u_char *, int, int); @@ -230,20 +230,6 @@ return isdn_wildmat( TmpMsn1, TmpMsn2 ); } -static void -isdn_free_queue(struct sk_buff_head *queue) -{ - struct sk_buff *skb; - unsigned long flags; - - save_flags(flags); - cli(); - if (skb_queue_len(queue)) - while ((skb = skb_dequeue(queue))) - dev_kfree_skb(skb); - restore_flags(flags); -} - int isdn_dc2minor(int di, int ch) { @@ -516,7 +502,7 @@ if (divert_if) if ((retval = divert_if->stat_callback(c))) return(retval); /* processed */ -#endif CONFIG_ISDN_DIVERSION +#endif /* CONFIG_ISDN_DIVERSION */ if ((!retval) && (dev->drv[di]->flags & DRV_FLAG_REJBUS)) { /* No tty responding */ cmd.driver = di; @@ -589,7 +575,7 @@ #ifdef CONFIG_ISDN_DIVERSION if (divert_if) divert_if->stat_callback(c); -#endif CONFIG_ISDN_DIVERSION +#endif /* CONFIG_ISDN_DIVERSION */ break; case ISDN_STAT_DISPLAY: #ifdef ISDN_DEBUG_STATCALLB @@ -599,7 +585,7 @@ #ifdef CONFIG_ISDN_DIVERSION if (divert_if) divert_if->stat_callback(c); -#endif CONFIG_ISDN_DIVERSION +#endif /* CONFIG_ISDN_DIVERSION */ break; case ISDN_STAT_DCONN: if (i < 0) @@ -641,7 +627,7 @@ #ifdef CONFIG_ISDN_DIVERSION if (divert_if) divert_if->stat_callback(c); -#endif CONFIG_ISDN_DIVERSION +#endif /* CONFIG_ISDN_DIVERSION */ break; break; case ISDN_STAT_BCONN: @@ -740,7 +726,7 @@ kfree(dev->drv[di]->rcverr); kfree(dev->drv[di]->rcvcount); for (i = 0; i < dev->drv[di]->channels; i++) - isdn_free_queue(&dev->drv[di]->rpqueue[i]); + skb_queue_purge(&dev->drv[di]->rpqueue[i]); kfree(dev->drv[di]->rpqueue); kfree(dev->drv[di]->rcv_waitq); kfree(dev->drv[di]); @@ -769,7 +755,7 @@ case ISDN_STAT_REDIR: if (divert_if) return(divert_if->stat_callback(c)); -#endif CONFIG_ISDN_DIVERSION +#endif /* CONFIG_ISDN_DIVERSION */ default: return -1; } @@ -1869,7 +1855,7 @@ dev->v110[i] = NULL; // 20.10.99 JIM, try to reinitialize v110 ! isdn_info_update(); - isdn_free_queue(&dev->drv[di]->rpqueue[ch]); + skb_queue_purge(&dev->drv[di]->rpqueue[ch]); } restore_flags(flags); } @@ -2032,7 +2018,7 @@ if ((adding) && (d->rpqueue)) { for (j = 0; j < d->channels; j++) - isdn_free_queue(&d->rpqueue[j]); + skb_queue_purge(&d->rpqueue[j]); kfree(d->rpqueue); } if (!(d->rpqueue = @@ -2149,7 +2135,7 @@ EXPORT_SYMBOL(DIVERT_REG_NAME); -#endif CONFIG_ISDN_DIVERSION +#endif /* CONFIG_ISDN_DIVERSION */ EXPORT_SYMBOL(register_isdn); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_net.c linux.20p6/drivers/isdn/isdn_net.c --- linux.vanilla/drivers/isdn/isdn_net.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/isdn_net.c Mon Jun 25 14:24:32 2001 @@ -1,4 +1,4 @@ -/* $Id: isdn_net.c,v 1.140.6.3 2001/02/07 11:31:30 kai Exp $ +/* $Id: isdn_net.c,v 1.140.6.6 2001/06/11 22:08:37 kai Exp $ * Linux ISDN subsystem, network interfaces and related functions (linklevel). * @@ -30,9 +30,9 @@ #include #include #include -#include #include "isdn_common.h" #include "isdn_net.h" +#include #ifdef CONFIG_ISDN_PPP #include "isdn_ppp.h" #endif @@ -294,13 +294,11 @@ isdn_net_unbind_channel(isdn_net_local * lp) { ulong flags; - struct sk_buff *skb; save_flags(flags); cli(); - while ((skb = skb_dequeue(&lp->super_tx_queue))) { - kfree_skb(skb); - } + skb_queue_purge(&lp->super_tx_queue); + if (!lp->master) { /* reset only master device */ /* Moral equivalent of dev_purge_queues(): BEWARE! This chunk of code cannot be called from hardware diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_tty.c linux.20p6/drivers/isdn/isdn_tty.c --- linux.vanilla/drivers/isdn/isdn_tty.c Sun Mar 25 17:37:33 2001 +++ linux.20p6/drivers/isdn/isdn_tty.c Mon Jun 25 14:24:32 2001 @@ -1,4 +1,4 @@ -/* $Id: isdn_tty.c,v 1.94 2000/11/25 17:00:59 kai Exp $ +/* $Id: isdn_tty.c,v 1.94.6.2 2001/06/09 15:14:15 kai Exp $ * Linux ISDN subsystem, tty functions and AT-command emulator (linklevel). * @@ -66,7 +66,7 @@ static int si2bit[8] = {4, 1, 4, 4, 4, 4, 4, 4}; -char *isdn_tty_revision = "$Revision: 1.94 $"; +char *isdn_tty_revision = "$Revision: 1.94.6.2 $"; /* isdn_tty_try_read() is called from within isdn_tty_rcv_skb() @@ -307,18 +307,13 @@ void isdn_tty_cleanup_xmit(modem_info * info) { - struct sk_buff *skb; unsigned long flags; save_flags(flags); cli(); - if (skb_queue_len(&info->xmit_queue)) - while ((skb = skb_dequeue(&info->xmit_queue))) - kfree_skb(skb); -#ifdef CONFIG_ISDN_AUDIO - if (skb_queue_len(&info->dtmf_queue)) - while ((skb = skb_dequeue(&info->dtmf_queue))) - kfree_skb(skb); + skb_queue_purge(&info->xmit_queue); +#ifdef CONFIG_ISDN_AUDIO + skb_queue_purge(&info->dtmf_queue); #endif restore_flags(flags); } @@ -3773,7 +3768,7 @@ sprintf(ds, "\r\n%d", info->emu.charge); isdn_tty_at_cout(ds, info); break; - default: + default:; } break; #ifdef DUMMY_HAYES_AT diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdn_v110.c linux.20p6/drivers/isdn/isdn_v110.c --- linux.vanilla/drivers/isdn/isdn_v110.c Sun Mar 25 17:37:34 2001 +++ linux.20p6/drivers/isdn/isdn_v110.c Fri May 4 23:24:34 2001 @@ -1,4 +1,4 @@ -/* $Id: isdn_v110.c,v 1.5.6.2 2001/02/10 14:41:19 kai Exp $ +/* $Id: isdn_v110.c,v 1.5.6.3 2001/02/16 16:43:23 kai Exp $ * Linux ISDN subsystem, V.110 related functions (linklevel). * @@ -30,7 +30,7 @@ #undef ISDN_V110_DEBUG -char *isdn_v110_revision = "$Revision: 1.5.6.2 $"; +char *isdn_v110_revision = "$Revision: 1.5.6.3 $"; #define V110_38400 255 #define V110_19200 15 @@ -70,7 +70,7 @@ * FlipBits reorders sequences of keylen bits in one byte. * E.g. source order 7654321 will be converted to 45670123 when keylen = 4, * and to 67452301 when keylen = 2. This is necessary because ordering on - * the isdn line is the the other way. + * the isdn line is the other way. */ static __inline unsigned char FlipBits(unsigned char c, int keylen) @@ -600,7 +600,7 @@ case ISDN_PROTO_L2_V11038: dev->v110[idx] = isdn_v110_open(V110_38400, hdrlen, maxsize); break; - default: + default:; } if ((v = dev->v110[idx])) { while (v->SyncInit) { diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/isdnloop/isdnloop.c linux.20p6/drivers/isdn/isdnloop/isdnloop.c --- linux.vanilla/drivers/isdn/isdnloop/isdnloop.c Sun Mar 25 17:37:34 2001 +++ linux.20p6/drivers/isdn/isdnloop/isdnloop.c Mon Jun 25 14:24:32 2001 @@ -1,4 +1,4 @@ -/* $Id: isdnloop.c,v 1.11.6.1 2000/12/17 16:47:18 kai Exp $ +/* $Id: isdnloop.c,v 1.11.6.3 2001/06/09 15:14:19 kai Exp $ * ISDN low-level module implementing a dummy loop driver. * @@ -26,7 +26,7 @@ #include "isdnloop.h" static char -*revision = "$Revision: 1.11.6.1 $"; +*revision = "$Revision: 1.11.6.3 $"; static int isdnloop_addcard(char *); @@ -41,10 +41,8 @@ isdnloop_free_queue(isdnloop_card * card, int channel) { struct sk_buff_head *queue = &card->bqueue[channel]; - struct sk_buff *skb; - while ((skb = skb_dequeue(queue))) - dev_kfree_skb(skb); + skb_queue_purge(queue); card->sndcount[channel] = 0; } @@ -977,7 +975,7 @@ * user = flag: 1 = called form userlevel, 0 called from kernel. * card = pointer to card struct. * Return: - * number of bytes transfered (currently always equals len). + * number of bytes transferred (currently always equals len). */ static int isdnloop_writecmd(const u_char * buf, int len, int user, isdnloop_card * card) @@ -1574,11 +1572,8 @@ } card = cards; while (card) { - struct sk_buff *skb; - last = card; - while ((skb = skb_dequeue(&card->dqueue))) - dev_kfree_skb(skb); + skb_queue_purge(&card->dqueue); card = card->next; kfree(last); } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/callbacks.c linux.20p6/drivers/isdn/pcbit/callbacks.c --- linux.vanilla/drivers/isdn/pcbit/callbacks.c Sun Mar 25 17:37:34 2001 +++ linux.20p6/drivers/isdn/pcbit/callbacks.c Fri May 4 23:24:34 2001 @@ -4,7 +4,7 @@ * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of - * the GNU Public License, incorporated herein by reference. + * the GNU General Public License, incorporated herein by reference. */ /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/callbacks.h linux.20p6/drivers/isdn/pcbit/callbacks.h --- linux.vanilla/drivers/isdn/pcbit/callbacks.h Sun Mar 25 17:31:37 2001 +++ linux.20p6/drivers/isdn/pcbit/callbacks.h Fri May 4 23:24:34 2001 @@ -4,7 +4,7 @@ * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of - * the GNU Public License, incorporated herein by reference. + * the GNU General Public License, incorporated herein by reference. */ /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/capi.c linux.20p6/drivers/isdn/pcbit/capi.c --- linux.vanilla/drivers/isdn/pcbit/capi.c Sun Mar 25 17:37:34 2001 +++ linux.20p6/drivers/isdn/pcbit/capi.c Fri May 4 23:24:34 2001 @@ -4,7 +4,7 @@ * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of - * the GNU Public License, incorporated herein by reference. + * the GNU General Public License, incorporated herein by reference. */ /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/capi.h linux.20p6/drivers/isdn/pcbit/capi.h --- linux.vanilla/drivers/isdn/pcbit/capi.h Sun Mar 25 17:31:37 2001 +++ linux.20p6/drivers/isdn/pcbit/capi.h Fri May 4 23:24:34 2001 @@ -4,7 +4,7 @@ * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of - * the GNU Public License, incorporated herein by reference. + * the GNU General Public License, incorporated herein by reference. */ /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/drv.c linux.20p6/drivers/isdn/pcbit/drv.c --- linux.vanilla/drivers/isdn/pcbit/drv.c Sun Mar 25 17:37:34 2001 +++ linux.20p6/drivers/isdn/pcbit/drv.c Fri May 4 23:24:34 2001 @@ -4,7 +4,7 @@ * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of - * the GNU Public License, incorporated herein by reference. + * the GNU General Public License, incorporated herein by reference. */ /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/edss1.c linux.20p6/drivers/isdn/pcbit/edss1.c --- linux.vanilla/drivers/isdn/pcbit/edss1.c Sun Mar 25 17:37:34 2001 +++ linux.20p6/drivers/isdn/pcbit/edss1.c Fri May 4 23:24:34 2001 @@ -4,7 +4,7 @@ * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of - * the GNU Public License, incorporated herein by reference. + * the GNU General Public License, incorporated herein by reference. */ /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/edss1.h linux.20p6/drivers/isdn/pcbit/edss1.h --- linux.vanilla/drivers/isdn/pcbit/edss1.h Sun Mar 25 17:31:37 2001 +++ linux.20p6/drivers/isdn/pcbit/edss1.h Fri May 4 23:24:34 2001 @@ -4,7 +4,7 @@ * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of - * the GNU Public License, incorporated herein by reference. + * the GNU General Public License, incorporated herein by reference. */ /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/layer2.c linux.20p6/drivers/isdn/pcbit/layer2.c --- linux.vanilla/drivers/isdn/pcbit/layer2.c Sun Mar 25 17:37:34 2001 +++ linux.20p6/drivers/isdn/pcbit/layer2.c Fri May 4 23:24:34 2001 @@ -4,7 +4,7 @@ * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of - * the GNU Public License, incorporated herein by reference. + * the GNU General Public License, incorporated herein by reference. */ /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/layer2.h linux.20p6/drivers/isdn/pcbit/layer2.h --- linux.vanilla/drivers/isdn/pcbit/layer2.h Sun Mar 25 17:31:37 2001 +++ linux.20p6/drivers/isdn/pcbit/layer2.h Sat May 5 00:03:04 2001 @@ -4,7 +4,7 @@ * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of - * the GNU Public License, incorporated herein by reference. + * the GNU General Public License, incorporated herein by reference. */ /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/module.c linux.20p6/drivers/isdn/pcbit/module.c --- linux.vanilla/drivers/isdn/pcbit/module.c Sun Mar 25 17:37:34 2001 +++ linux.20p6/drivers/isdn/pcbit/module.c Fri May 4 23:24:34 2001 @@ -4,7 +4,7 @@ * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of - * the GNU Public License, incorporated herein by reference. + * the GNU General Public License, incorporated herein by reference. */ /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/pcbit/pcbit.h linux.20p6/drivers/isdn/pcbit/pcbit.h --- linux.vanilla/drivers/isdn/pcbit/pcbit.h Sun Mar 25 17:37:34 2001 +++ linux.20p6/drivers/isdn/pcbit/pcbit.h Fri May 4 23:24:34 2001 @@ -4,7 +4,7 @@ * Written by Pedro Roque Marques (roque@di.fc.ul.pt) * * This software may be used and distributed according to the terms of - * the GNU Public License, incorporated herein by reference. + * the GNU General Public License, incorporated herein by reference. */ /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/interrupt.c linux.20p6/drivers/isdn/sc/interrupt.c --- linux.vanilla/drivers/isdn/sc/interrupt.c Sun Mar 25 17:31:38 2001 +++ linux.20p6/drivers/isdn/sc/interrupt.c Mon Jun 25 14:24:34 2001 @@ -1,5 +1,5 @@ /* - * $Id: interrupt.c,v 1.4 1998/01/31 22:10:52 keil Exp $ + * $Id: interrupt.c,v 1.4.8.2 2001/04/08 17:51:43 kai Exp $ * Copyright (C) 1996 SpellCaster Telecommunications Inc. * * This program is free software; you can redistribute it and/or modify @@ -34,7 +34,6 @@ extern int indicate_status(int, int, ulong, char *); extern void check_phystat(unsigned long); -extern void dump_messages(int); extern int receivemessage(int, RspMessage *); extern int sendmessage(int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int *); @@ -141,7 +140,7 @@ } else if(callid>=0x0000 && callid<=0x7FFF) { - pr_debug("%s: Got Incomming Call\n", adapter[card]->devicename); + pr_debug("%s: Got Incoming Call\n", adapter[card]->devicename); strcpy(setup.phone,&(rcvmsg.msg_data.byte_array[4])); strcpy(setup.eazmsn,adapter[card]->channel[rcvmsg.phy_link_no-1].dn); setup.si1 = 7; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/isdn/sc/message.c linux.20p6/drivers/isdn/sc/message.c --- linux.vanilla/drivers/isdn/sc/message.c Sun Mar 25 17:37:34 2001 +++ linux.20p6/drivers/isdn/sc/message.c Mon Jun 25 14:24:34 2001 @@ -1,5 +1,5 @@ /* - * $Id: message.c,v 1.5 1999/09/04 06:20:07 keil Exp $ + * $Id: message.c,v 1.5.8.1 2001/04/08 17:51:43 kai Exp $ * Copyright (C) 1996 SpellCaster Telecommunications Inc. * * message.c - functions for sending and receiving control messages @@ -38,55 +38,12 @@ extern unsigned int cinst; /* - * Obligitory function prototypes + * Obligatory function prototypes */ extern int indicate_status(int,ulong,char*); extern int scm_command(isdn_ctrl *); extern void *memcpy_fromshmem(int, void *, const void *, size_t); -/* - * Dump message queue in shared memory to screen - */ -void dump_messages(int card) -{ - DualPortMemory dpm; - unsigned long flags; - - int i =0; - - if (!IS_VALID_CARD(card)) { - pr_debug("Invalid param: %d is not a valid card id\n", card); - } - - save_flags(flags); - cli(); - outb(adapter[card]->ioport[adapter[card]->shmem_pgport], - (adapter[card]->shmem_magic >> 14) | 0x80); - memcpy_fromshmem(card, &dpm, 0, sizeof(dpm)); - restore_flags(flags); - - pr_debug("%s: Dumping Request Queue\n", adapter[card]->devicename); - for (i = 0; i < dpm.req_head; i++) { - pr_debug("%s: Message #%d: (%d,%d,%d), link: %d\n", - adapter[card]->devicename, i, - dpm.req_queue[i].type, - dpm.req_queue[i].class, - dpm.req_queue[i].code, - dpm.req_queue[i].phy_link_no); - } - - pr_debug("%s: Dumping Response Queue\n", adapter[card]->devicename); - for (i = 0; i < dpm.rsp_head; i++) { - pr_debug("%s: Message #%d: (%d,%d,%d), link: %d, status: %d\n", - adapter[card]->devicename, i, - dpm.rsp_queue[i].type, - dpm.rsp_queue[i].class, - dpm.rsp_queue[i].code, - dpm.rsp_queue[i].phy_link_no, - dpm.rsp_queue[i].rsp_status); - } - -} /* * receive a message from the board diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/macintosh/via-pmu.c linux.20p6/drivers/macintosh/via-pmu.c --- linux.vanilla/drivers/macintosh/via-pmu.c Sun Mar 25 17:31:41 2001 +++ linux.20p6/drivers/macintosh/via-pmu.c Tue Jun 19 09:59:54 2001 @@ -1356,7 +1356,7 @@ /* Make sure the decrementer won't interrupt us */ asm volatile("mtdec %0" : : "r" (0x7fffffff)); - /* Make sure any pending DEC interrupt occuring while we did + /* Make sure any pending DEC interrupt occurring while we did * the above didn't re-enable the DEC */ mb(); asm volatile("mtdec %0" : : "r" (0x7fffffff)); @@ -1509,7 +1509,7 @@ /* Make sure the decrementer won't interrupt us */ asm volatile("mtdec %0" : : "r" (0x7fffffff)); - /* Make sure any pending DEC interrupt occuring while we did + /* Make sure any pending DEC interrupt occurring while we did * the above didn't re-enable the DEC */ mb(); asm volatile("mtdec %0" : : "r" (0x7fffffff)); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/misc/parport_pc.c linux.20p6/drivers/misc/parport_pc.c --- linux.vanilla/drivers/misc/parport_pc.c Sun Mar 25 17:31:41 2001 +++ linux.20p6/drivers/misc/parport_pc.c Mon Jun 18 08:28:48 2001 @@ -966,7 +966,7 @@ printk (KERN_INFO "Unknown PCI parallel I/O card (%04x/%04x)\n" "Please send 'lspci' output to " - "tim@cyberelk.demon.co.uk\n", + "tim@cyberelk.net\n", pcidev->vendor, pcidev->device); } #endif diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/3c509.c linux.20p6/drivers/net/3c509.c --- linux.vanilla/drivers/net/3c509.c Sun Mar 25 17:31:15 2001 +++ linux.20p6/drivers/net/3c509.c Tue May 8 15:54:50 2001 @@ -180,12 +180,20 @@ if (EISA_bus) { static int eisa_addr = 0x1000; while (eisa_addr < 0x9000) { + int device_id; + ioaddr = eisa_addr; eisa_addr += 0x1000; /* Check the standard EISA ID register for an encoded '3Com'. */ if (inw(ioaddr + 0xC80) != 0x6d50) continue; + + /* Avoid conflict with 3c590, 3c592, 3c597, etc */ + device_id = (inb(ioaddr + 0xC82)<<8) + inb(ioaddr + 0xC83); + if ((device_id & 0xFF00) == 0x5900) { + continue; + } /* Change the register set to the configuration window 0. */ outw(SelectWindow | 0, ioaddr + 0xC80 + EL3_CMD); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/8139too.c linux.20p6/drivers/net/8139too.c --- linux.vanilla/drivers/net/8139too.c Sun Mar 25 17:37:34 2001 +++ linux.20p6/drivers/net/8139too.c Tue Jun 19 09:44:47 2001 @@ -1603,7 +1603,11 @@ struct rtl8139_private *tp = (struct rtl8139_private *) dev->priv; unsigned long timeout; + lock_kernel(); daemonize (); + exit_files(current); + unlock_kernel(); + spin_lock_irq(¤t->sigmask_lock); sigemptyset(¤t->blocked); recalc_sigpending(current); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/82596.c linux.20p6/drivers/net/82596.c --- linux.vanilla/drivers/net/82596.c Sun Mar 25 17:31:20 2001 +++ linux.20p6/drivers/net/82596.c Tue Jun 19 08:51:53 2001 @@ -1106,7 +1106,7 @@ { int i; struct i596_private *lp; - char eth_addr[6]; + char eth_addr[8]; static int probed = 0; if (probed) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/Config.in linux.20p6/drivers/net/Config.in --- linux.vanilla/drivers/net/Config.in Sun Mar 25 17:37:34 2001 +++ linux.20p6/drivers/net/Config.in Tue Jun 19 09:39:08 2001 @@ -301,7 +301,7 @@ # # Microgate Synclink HDLC/SYNCPPP support # -dep_tristate 'SyncLink HDLC/SYNCPPP support' CONFIG_SYNCLINK_SYNCPPP m +tristate 'SyncLink HDLC/SYNCPPP support' CONFIG_SYNCLINK_SYNCPPP # # Lan Media's board. Currently 1000, 1200, 5200, 5245 @@ -342,6 +342,11 @@ fi fi fi +fi + +if [ "$CONFIG_HDLC" = "y" -o "$CONFIG_SYNCLINK_SYNCPPP" = "y" -o \ + "$CONFIG_LANMEDIA" = "y" ] ; then + define_bool CONFIG_SYNCPPP y fi tristate 'Frame relay DLCI support' CONFIG_DLCI diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/Makefile linux.20p6/drivers/net/Makefile --- linux.vanilla/drivers/net/Makefile Sun Mar 25 17:37:34 2001 +++ linux.20p6/drivers/net/Makefile Fri May 4 23:09:00 2001 @@ -1445,7 +1445,7 @@ rm -f core *.o *.a *.s wanpipe.o: $(WANPIPE_OBJS) - ld -r -o $@ $(WANPIPE_OBJS) + $(LD) -r -o $@ $(WANPIPE_OBJS) rcpci.o: rcpci45.o rclanmtl.o $(LD) -r -o rcpci.o rcpci45.o rclanmtl.o diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/daynaport.c linux.20p6/drivers/net/daynaport.c --- linux.vanilla/drivers/net/daynaport.c Sun Mar 25 17:31:20 2001 +++ linux.20p6/drivers/net/daynaport.c Tue Jun 19 09:59:54 2001 @@ -447,7 +447,7 @@ } /* We should hopefully not get here */ - printk(KERN_ERR "Probe unsucessful.\n"); + printk(KERN_ERR "Probe unsuccessful.\n"); return -ENODEV; membad: diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/falc-lh.h linux.20p6/drivers/net/falc-lh.h --- linux.vanilla/drivers/net/falc-lh.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/net/falc-lh.h Fri May 4 23:05:08 2001 @@ -0,0 +1,1232 @@ +/* + * falc.h Description of the Siemens FALC T1/E1 framer. + * + * Author: Ivan Passos + * + * Copyright: (c) 2000-2001 Cyclades Corp. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * $Log: falc.h,v $ + * Revision 1.1 2000/05/15 ivan + * Included DJA bits for the LIM2 register. + * + * Revision 1.0 2000/02/22 ivan + * Initial version. + * + */ + +#ifndef _FALC_LH_H +#define _FALC_LH_H + +#define NUM_OF_T1_CHANNELS 24 +#define NUM_OF_E1_CHANNELS 32 + +/*>>>>>>>>>>>>>>>>> FALC Register Bits (Transmit Mode) <<<<<<<<<<<<<<<<<<< */ + +/* CMDR (Command Register) + ---------------- E1 & T1 ------------------------------ */ +#define CMDR_RMC 0x80 +#define CMDR_RRES 0x40 +#define CMDR_XREP 0x20 +#define CMDR_XRES 0x10 +#define CMDR_XHF 0x08 +#define CMDR_XTF 0x04 +#define CMDR_XME 0x02 +#define CMDR_SRES 0x01 + +/* MODE (Mode Register) + ----------------- E1 & T1 ----------------------------- */ +#define MODE_MDS2 0x80 +#define MODE_MDS1 0x40 +#define MODE_MDS0 0x20 +#define MODE_BRAC 0x10 +#define MODE_HRAC 0x08 + +/* IPC (Interrupt Port Configuration) + ----------------- E1 & T1 ----------------------------- */ +#define IPC_VIS 0x80 +#define IPC_SCI 0x04 +#define IPC_IC1 0x02 +#define IPC_IC0 0x01 + +/* CCR1 (Common Configuration Register 1) + ----------------- E1 & T1 ----------------------------- */ +#define CCR1_SFLG 0x80 +#define CCR1_XTS16RA 0x40 +#define CCR1_BRM 0x40 +#define CCR1_CASSYM 0x20 +#define CCR1_EDLX 0x20 +#define CCR1_EITS 0x10 +#define CCR1_ITF 0x08 +#define CCR1_RFT1 0x02 +#define CCR1_RFT0 0x01 + +/* CCR3 (Common Configuration Register 3) + ---------------- E1 & T1 ------------------------------ */ + +#define CCR3_PRE1 0x80 +#define CCR3_PRE0 0x40 +#define CCR3_EPT 0x20 +#define CCR3_RADD 0x10 +#define CCR3_RCRC 0x04 +#define CCR3_XCRC 0x02 + + +/* RTR1-4 (Receive Timeslot Register 1-4) + ---------------- E1 & T1 ------------------------------ */ + +#define RTR1_TS0 0x80 +#define RTR1_TS1 0x40 +#define RTR1_TS2 0x20 +#define RTR1_TS3 0x10 +#define RTR1_TS4 0x08 +#define RTR1_TS5 0x04 +#define RTR1_TS6 0x02 +#define RTR1_TS7 0x01 + +#define RTR2_TS8 0x80 +#define RTR2_TS9 0x40 +#define RTR2_TS10 0x20 +#define RTR2_TS11 0x10 +#define RTR2_TS12 0x08 +#define RTR2_TS13 0x04 +#define RTR2_TS14 0x02 +#define RTR2_TS15 0x01 + +#define RTR3_TS16 0x80 +#define RTR3_TS17 0x40 +#define RTR3_TS18 0x20 +#define RTR3_TS19 0x10 +#define RTR3_TS20 0x08 +#define RTR3_TS21 0x04 +#define RTR3_TS22 0x02 +#define RTR3_TS23 0x01 + +#define RTR4_TS24 0x80 +#define RTR4_TS25 0x40 +#define RTR4_TS26 0x20 +#define RTR4_TS27 0x10 +#define RTR4_TS28 0x08 +#define RTR4_TS29 0x04 +#define RTR4_TS30 0x02 +#define RTR4_TS31 0x01 + + +/* TTR1-4 (Transmit Timeslot Register 1-4) + ---------------- E1 & T1 ------------------------------ */ + +#define TTR1_TS0 0x80 +#define TTR1_TS1 0x40 +#define TTR1_TS2 0x20 +#define TTR1_TS3 0x10 +#define TTR1_TS4 0x08 +#define TTR1_TS5 0x04 +#define TTR1_TS6 0x02 +#define TTR1_TS7 0x01 + +#define TTR2_TS8 0x80 +#define TTR2_TS9 0x40 +#define TTR2_TS10 0x20 +#define TTR2_TS11 0x10 +#define TTR2_TS12 0x08 +#define TTR2_TS13 0x04 +#define TTR2_TS14 0x02 +#define TTR2_TS15 0x01 + +#define TTR3_TS16 0x80 +#define TTR3_TS17 0x40 +#define TTR3_TS18 0x20 +#define TTR3_TS19 0x10 +#define TTR3_TS20 0x08 +#define TTR3_TS21 0x04 +#define TTR3_TS22 0x02 +#define TTR3_TS23 0x01 + +#define TTR4_TS24 0x80 +#define TTR4_TS25 0x40 +#define TTR4_TS26 0x20 +#define TTR4_TS27 0x10 +#define TTR4_TS28 0x08 +#define TTR4_TS29 0x04 +#define TTR4_TS30 0x02 +#define TTR4_TS31 0x01 + + + +/* IMR0-4 (Interrupt Mask Register 0-4) + + ----------------- E1 & T1 ----------------------------- */ + +#define IMR0_RME 0x80 +#define IMR0_RFS 0x40 +#define IMR0_T8MS 0x20 +#define IMR0_ISF 0x20 +#define IMR0_RMB 0x10 +#define IMR0_CASC 0x08 +#define IMR0_RSC 0x08 +#define IMR0_CRC6 0x04 +#define IMR0_CRC4 0x04 +#define IMR0_PDEN 0x02 +#define IMR0_RPF 0x01 + +#define IMR1_CASE 0x80 +#define IMR1_RDO 0x40 +#define IMR1_ALLS 0x20 +#define IMR1_XDU 0x10 +#define IMR1_XMB 0x08 +#define IMR1_XLSC 0x02 +#define IMR1_XPR 0x01 +#define IMR1_LLBSC 0x80 + +#define IMR2_FAR 0x80 +#define IMR2_LFA 0x40 +#define IMR2_MFAR 0x20 +#define IMR2_T400MS 0x10 +#define IMR2_LMFA 0x10 +#define IMR2_AIS 0x08 +#define IMR2_LOS 0x04 +#define IMR2_RAR 0x02 +#define IMR2_RA 0x01 + +#define IMR3_ES 0x80 +#define IMR3_SEC 0x40 +#define IMR3_LMFA16 0x20 +#define IMR3_AIS16 0x10 +#define IMR3_RA16 0x08 +#define IMR3_API 0x04 +#define IMR3_XSLP 0x20 +#define IMR3_XSLN 0x10 +#define IMR3_LLBSC 0x08 +#define IMR3_XRS 0x04 +#define IMR3_SLN 0x02 +#define IMR3_SLP 0x01 + +#define IMR4_LFA 0x80 +#define IMR4_FER 0x40 +#define IMR4_CER 0x20 +#define IMR4_AIS 0x10 +#define IMR4_LOS 0x08 +#define IMR4_CVE 0x04 +#define IMR4_SLIP 0x02 +#define IMR4_EBE 0x01 + +/* FMR0-5 for E1 and T1 (Framer Mode Register ) */ + +#define FMR0_XC1 0x80 +#define FMR0_XC0 0x40 +#define FMR0_RC1 0x20 +#define FMR0_RC0 0x10 +#define FMR0_EXTD 0x08 +#define FMR0_ALM 0x04 +#define E1_FMR0_FRS 0x02 +#define T1_FMR0_FRS 0x08 +#define FMR0_SRAF 0x04 +#define FMR0_EXLS 0x02 +#define FMR0_SIM 0x01 + +#define FMR1_MFCS 0x80 +#define FMR1_AFR 0x40 +#define FMR1_ENSA 0x20 +#define FMR1_CTM 0x80 +#define FMR1_SIGM 0x40 +#define FMR1_EDL 0x20 +#define FMR1_PMOD 0x10 +#define FMR1_XFS 0x08 +#define FMR1_CRC 0x08 +#define FMR1_ECM 0x04 +#define FMR1_IMOD 0x02 +#define FMR1_XAIS 0x01 + +#define FMR2_RFS1 0x80 +#define FMR2_RFS0 0x40 +#define FMR2_MCSP 0x40 +#define FMR2_RTM 0x20 +#define FMR2_SSP 0x20 +#define FMR2_DAIS 0x10 +#define FMR2_SAIS 0x08 +#define FMR2_PLB 0x04 +#define FMR2_AXRA 0x02 +#define FMR2_ALMF 0x01 +#define FMR2_EXZE 0x01 + +#define LOOP_RTM 0x40 +#define LOOP_SFM 0x40 +#define LOOP_ECLB 0x20 +#define LOOP_CLA 0x1f + +/*--------------------- E1 ----------------------------*/ +#define FMR3_XLD 0x20 +#define FMR3_XLU 0x10 + +/*--------------------- T1 ----------------------------*/ +#define FMR4_AIS3 0x80 +#define FMR4_TM 0x40 +#define FMR4_XRA 0x20 +#define FMR4_SSC1 0x10 +#define FMR4_SSC0 0x08 +#define FMR4_AUTO 0x04 +#define FMR4_FM1 0x02 +#define FMR4_FM0 0x01 + +#define FMR5_SRS 0x80 +#define FMR5_EIBR 0x40 +#define FMR5_XLD 0x20 +#define FMR5_XLU 0x10 + + +/* LOOP (Channel Loop Back) + + ------------------ E1 & T1 ---------------------------- */ + +#define LOOP_SFM 0x40 +#define LOOP_ECLB 0x20 +#define LOOP_CLA4 0x10 +#define LOOP_CLA3 0x08 +#define LOOP_CLA2 0x04 +#define LOOP_CLA1 0x02 +#define LOOP_CLA0 0x01 + + + +/* XSW (Transmit Service Word Pulseframe) + + ------------------- E1 --------------------------- */ + +#define XSW_XSIS 0x80 +#define XSW_XTM 0x40 +#define XSW_XRA 0x20 +#define XSW_XY0 0x10 +#define XSW_XY1 0x08 +#define XSW_XY2 0x04 +#define XSW_XY3 0x02 +#define XSW_XY4 0x01 + + +/* XSP (Transmit Spare Bits) + + ------------------- E1 --------------------------- */ + +#define XSP_XAP 0x80 +#define XSP_CASEN 0x40 +#define XSP_TT0 0x20 +#define XSP_EBP 0x10 +#define XSP_AXS 0x08 +#define XSP_XSIF 0x04 +#define XSP_XS13 0x02 +#define XSP_XS15 0x01 + + +/* XC0/1 (Transmit Control 0/1) + ------------------ E1 & T1 ---------------------------- */ + +#define XC0_SA8E 0x80 +#define XC0_SA7E 0x40 +#define XC0_SA6E 0x20 +#define XC0_SA5E 0x10 +#define XC0_SA4E 0x08 +#define XC0_BRM 0x80 +#define XC0_MFBS 0x40 +#define XC0_SFRZ 0x10 +#define XC0_XCO2 0x04 +#define XC0_XCO1 0x02 +#define XC0_XCO0 0x01 + +#define XC1_XTO5 0x20 +#define XC1_XTO4 0x10 +#define XC1_XTO3 0x08 +#define XC1_XTO2 0x04 +#define XC1_XTO1 0x02 +#define XC1_XTO0 0x01 + + +/* RC0/1 (Receive Control 0/1) + ------------------ E1 & T1 ---------------------------- */ + +#define RC0_SICS 0x40 +#define RC0_CRCI 0x20 +#define RC0_XCRCI 0x10 +#define RC0_RDIS 0x08 +#define RC0_RCO2 0x04 +#define RC0_RCO1 0x02 +#define RC0_RCO0 0x01 + +#define RC1_SWD 0x80 +#define RC1_ASY4 0x40 +#define RC1_RRAM 0x40 +#define RC1_RTO5 0x20 +#define RC1_RTO4 0x10 +#define RC1_RTO3 0x08 +#define RC1_RTO2 0x04 +#define RC1_RTO1 0x02 +#define RC1_RTO0 0x01 + + + +/* XPM0-2 (Transmit Pulse Mask 0-2) + --------------------- E1 & T1 ------------------------- */ + +#define XPM0_XP12 0x80 +#define XPM0_XP11 0x40 +#define XPM0_XP10 0x20 +#define XPM0_XP04 0x10 +#define XPM0_XP03 0x08 +#define XPM0_XP02 0x04 +#define XPM0_XP01 0x02 +#define XPM0_XP00 0x01 + +#define XPM1_XP30 0x80 +#define XPM1_XP24 0x40 +#define XPM1_XP23 0x20 +#define XPM1_XP22 0x10 +#define XPM1_XP21 0x08 +#define XPM1_XP20 0x04 +#define XPM1_XP14 0x02 +#define XPM1_XP13 0x01 + +#define XPM2_XLHP 0x80 +#define XPM2_XLT 0x40 +#define XPM2_DAXLT 0x20 +#define XPM2_XP34 0x08 +#define XPM2_XP33 0x04 +#define XPM2_XP32 0x02 +#define XPM2_XP31 0x01 + + +/* TSWM (Transparent Service Word Mask) + ------------------ E1 ---------------------------- */ + +#define TSWM_TSIS 0x80 +#define TSWM_TSIF 0x40 +#define TSWM_TRA 0x20 +#define TSWM_TSA4 0x10 +#define TSWM_TSA5 0x08 +#define TSWM_TSA6 0x04 +#define TSWM_TSA7 0x02 +#define TSWM_TSA8 0x01 + +/* IDLE + + ------------------ E1 & T1 ----------------------- */ + +#define IDLE_IDL7 0x80 +#define IDLE_IDL6 0x40 +#define IDLE_IDL5 0x20 +#define IDLE_IDL4 0x10 +#define IDLE_IDL3 0x08 +#define IDLE_IDL2 0x04 +#define IDLE_IDL1 0x02 +#define IDLE_IDL0 0x01 + + +/* XSA4-8 + -------------------E1 ----------------------------- */ + +#define XSA4_XS47 0x80 +#define XSA4_XS46 0x40 +#define XSA4_XS45 0x20 +#define XSA4_XS44 0x10 +#define XSA4_XS43 0x08 +#define XSA4_XS42 0x04 +#define XSA4_XS41 0x02 +#define XSA4_XS40 0x01 + +#define XSA5_XS57 0x80 +#define XSA5_XS56 0x40 +#define XSA5_XS55 0x20 +#define XSA5_XS54 0x10 +#define XSA5_XS53 0x08 +#define XSA5_XS52 0x04 +#define XSA5_XS51 0x02 +#define XSA5_XS50 0x01 + +#define XSA6_XS67 0x80 +#define XSA6_XS66 0x40 +#define XSA6_XS65 0x20 +#define XSA6_XS64 0x10 +#define XSA6_XS63 0x08 +#define XSA6_XS62 0x04 +#define XSA6_XS61 0x02 +#define XSA6_XS60 0x01 + +#define XSA7_XS77 0x80 +#define XSA7_XS76 0x40 +#define XSA7_XS75 0x20 +#define XSA7_XS74 0x10 +#define XSA7_XS73 0x08 +#define XSA7_XS72 0x04 +#define XSA7_XS71 0x02 +#define XSA7_XS70 0x01 + +#define XSA8_XS87 0x80 +#define XSA8_XS86 0x40 +#define XSA8_XS85 0x20 +#define XSA8_XS84 0x10 +#define XSA8_XS83 0x08 +#define XSA8_XS82 0x04 +#define XSA8_XS81 0x02 +#define XSA8_XS80 0x01 + + +/* XDL1-3 (Transmit DL-Bit Register1-3 (read/write)) + ----------------------- T1 --------------------- */ + +#define XDL1_XDL17 0x80 +#define XDL1_XDL16 0x40 +#define XDL1_XDL15 0x20 +#define XDL1_XDL14 0x10 +#define XDL1_XDL13 0x08 +#define XDL1_XDL12 0x04 +#define XDL1_XDL11 0x02 +#define XDL1_XDL10 0x01 + +#define XDL2_XDL27 0x80 +#define XDL2_XDL26 0x40 +#define XDL2_XDL25 0x20 +#define XDL2_XDL24 0x10 +#define XDL2_XDL23 0x08 +#define XDL2_XDL22 0x04 +#define XDL2_XDL21 0x02 +#define XDL2_XDL20 0x01 + +#define XDL3_XDL37 0x80 +#define XDL3_XDL36 0x40 +#define XDL3_XDL35 0x20 +#define XDL3_XDL34 0x10 +#define XDL3_XDL33 0x08 +#define XDL3_XDL32 0x04 +#define XDL3_XDL31 0x02 +#define XDL3_XDL30 0x01 + + +/* ICB1-4 (Idle Channel Register 1-4) + ------------------ E1 ---------------------------- */ + +#define E1_ICB1_IC0 0x80 +#define E1_ICB1_IC1 0x40 +#define E1_ICB1_IC2 0x20 +#define E1_ICB1_IC3 0x10 +#define E1_ICB1_IC4 0x08 +#define E1_ICB1_IC5 0x04 +#define E1_ICB1_IC6 0x02 +#define E1_ICB1_IC7 0x01 + +#define E1_ICB2_IC8 0x80 +#define E1_ICB2_IC9 0x40 +#define E1_ICB2_IC10 0x20 +#define E1_ICB2_IC11 0x10 +#define E1_ICB2_IC12 0x08 +#define E1_ICB2_IC13 0x04 +#define E1_ICB2_IC14 0x02 +#define E1_ICB2_IC15 0x01 + +#define E1_ICB3_IC16 0x80 +#define E1_ICB3_IC17 0x40 +#define E1_ICB3_IC18 0x20 +#define E1_ICB3_IC19 0x10 +#define E1_ICB3_IC20 0x08 +#define E1_ICB3_IC21 0x04 +#define E1_ICB3_IC22 0x02 +#define E1_ICB3_IC23 0x01 + +#define E1_ICB4_IC24 0x80 +#define E1_ICB4_IC25 0x40 +#define E1_ICB4_IC26 0x20 +#define E1_ICB4_IC27 0x10 +#define E1_ICB4_IC28 0x08 +#define E1_ICB4_IC29 0x04 +#define E1_ICB4_IC30 0x02 +#define E1_ICB4_IC31 0x01 + +/* ICB1-4 (Idle Channel Register 1-4) + ------------------ T1 ---------------------------- */ + +#define T1_ICB1_IC1 0x80 +#define T1_ICB1_IC2 0x40 +#define T1_ICB1_IC3 0x20 +#define T1_ICB1_IC4 0x10 +#define T1_ICB1_IC5 0x08 +#define T1_ICB1_IC6 0x04 +#define T1_ICB1_IC7 0x02 +#define T1_ICB1_IC8 0x01 + +#define T1_ICB2_IC9 0x80 +#define T1_ICB2_IC10 0x40 +#define T1_ICB2_IC11 0x20 +#define T1_ICB2_IC12 0x10 +#define T1_ICB2_IC13 0x08 +#define T1_ICB2_IC14 0x04 +#define T1_ICB2_IC15 0x02 +#define T1_ICB2_IC16 0x01 + +#define T1_ICB3_IC17 0x80 +#define T1_ICB3_IC18 0x40 +#define T1_ICB3_IC19 0x20 +#define T1_ICB3_IC20 0x10 +#define T1_ICB3_IC21 0x08 +#define T1_ICB3_IC22 0x04 +#define T1_ICB3_IC23 0x02 +#define T1_ICB3_IC24 0x01 + +/* FMR3 (Framer Mode Register 3) + --------------------E1------------------------ */ + +#define FMR3_CMI 0x08 +#define FMR3_SYNSA 0x04 +#define FMR3_CFRZ 0x02 +#define FMR3_EXTIW 0x01 + + + +/* CCB1-3 (Clear Channel Register) + ------------------- T1 ----------------------- */ + +#define CCB1_CH1 0x80 +#define CCB1_CH2 0x40 +#define CCB1_CH3 0x20 +#define CCB1_CH4 0x10 +#define CCB1_CH5 0x08 +#define CCB1_CH6 0x04 +#define CCB1_CH7 0x02 +#define CCB1_CH8 0x01 + +#define CCB2_CH9 0x80 +#define CCB2_CH10 0x40 +#define CCB2_CH11 0x20 +#define CCB2_CH12 0x10 +#define CCB2_CH13 0x08 +#define CCB2_CH14 0x04 +#define CCB2_CH15 0x02 +#define CCB2_CH16 0x01 + +#define CCB3_CH17 0x80 +#define CCB3_CH18 0x40 +#define CCB3_CH19 0x20 +#define CCB3_CH20 0x10 +#define CCB3_CH21 0x08 +#define CCB3_CH22 0x04 +#define CCB3_CH23 0x02 +#define CCB3_CH24 0x01 + + +/* LIM0/1 (Line Interface Mode 0/1) + ------------------- E1 & T1 --------------------------- */ + +#define LIM0_XFB 0x80 +#define LIM0_XDOS 0x40 +#define LIM0_SCL1 0x20 +#define LIM0_SCL0 0x10 +#define LIM0_EQON 0x08 +#define LIM0_ELOS 0x04 +#define LIM0_LL 0x02 +#define LIM0_MAS 0x01 + +#define LIM1_EFSC 0x80 +#define LIM1_RIL2 0x40 +#define LIM1_RIL1 0x20 +#define LIM1_RIL0 0x10 +#define LIM1_DCOC 0x08 +#define LIM1_JATT 0x04 +#define LIM1_RL 0x02 +#define LIM1_DRS 0x01 + + +/* PCDR (Pulse Count Detection Register(Read/Write)) + ------------------ E1 & T1 ------------------------- */ + +#define PCDR_PCD7 0x80 +#define PCDR_PCD6 0x40 +#define PCDR_PCD5 0x20 +#define PCDR_PCD4 0x10 +#define PCDR_PCD3 0x08 +#define PCDR_PCD2 0x04 +#define PCDR_PCD1 0x02 +#define PCDR_PCD0 0x01 + +#define PCRR_PCR7 0x80 +#define PCRR_PCR6 0x40 +#define PCRR_PCR5 0x20 +#define PCRR_PCR4 0x10 +#define PCRR_PCR3 0x08 +#define PCRR_PCR2 0x04 +#define PCRR_PCR1 0x02 +#define PCRR_PCR0 0x01 + + +/* LIM2 (Line Interface Mode 2) + + ------------------ E1 & T1 ---------------------------- */ + +#define LIM2_DJA2 0x20 +#define LIM2_DJA1 0x10 +#define LIM2_LOS2 0x02 +#define LIM2_LOS1 0x01 + +/* LCR1 (Loop Code Register 1) */ + +#define LCR1_EPRM 0x80 +#define LCR1_XPRBS 0x40 + +/* SIC1 (System Interface Control 1) */ +#define SIC1_SRSC 0x80 +#define SIC1_RBS1 0x20 +#define SIC1_RBS0 0x10 +#define SIC1_SXSC 0x08 +#define SIC1_XBS1 0x02 +#define SIC1_XBS0 0x01 + +/* DEC (Disable Error Counter) + ------------------ E1 & T1 ---------------------------- */ + +#define DEC_DCEC3 0x20 +#define DEC_DBEC 0x10 +#define DEC_DCEC1 0x08 +#define DEC_DCEC 0x08 +#define DEC_DEBC 0x04 +#define DEC_DCVC 0x02 +#define DEC_DFEC 0x01 + + +/* FALC Register Bits (Receive Mode) + ---------------------------------------------------------------------------- */ + + +/* FRS0/1 (Framer Receive Status Register 0/1) + ----------------- E1 & T1 ---------------------------------- */ + +#define FRS0_LOS 0x80 +#define FRS0_AIS 0x40 +#define FRS0_LFA 0x20 +#define FRS0_RRA 0x10 +#define FRS0_API 0x08 +#define FRS0_NMF 0x04 +#define FRS0_LMFA 0x02 +#define FRS0_FSRF 0x01 + +#define FRS1_TS16RA 0x40 +#define FRS1_TS16LOS 0x20 +#define FRS1_TS16AIS 0x10 +#define FRS1_TS16LFA 0x08 +#define FRS1_EXZD 0x80 +#define FRS1_LLBDD 0x10 +#define FRS1_LLBAD 0x08 +#define FRS1_XLS 0x02 +#define FRS1_XLO 0x01 +#define FRS1_PDEN 0x40 + +/* FRS2/3 (Framer Receive Status Register 2/3) + ----------------- T1 ---------------------------------- */ + +#define FRS2_ESC2 0x80 +#define FRS2_ESC1 0x40 +#define FRS2_ESC0 0x20 + +#define FRS3_FEH5 0x20 +#define FRS3_FEH4 0x10 +#define FRS3_FEH3 0x08 +#define FRS3_FEH2 0x04 +#define FRS3_FEH1 0x02 +#define FRS3_FEH0 0x01 + + +/* RSW (Receive Service Word Pulseframe) + ----------------- E1 ------------------------------ */ + +#define RSW_RSI 0x80 +#define RSW_RRA 0x20 +#define RSW_RYO 0x10 +#define RSW_RY1 0x08 +#define RSW_RY2 0x04 +#define RSW_RY3 0x02 +#define RSW_RY4 0x01 + + +/* RSP (Receive Spare Bits / Additional Status) + ---------------- E1 ------------------------------- */ + +#define RSP_SI1 0x80 +#define RSP_SI2 0x40 +#define RSP_LLBDD 0x10 +#define RSP_LLBAD 0x08 +#define RSP_RSIF 0x04 +#define RSP_RS13 0x02 +#define RSP_RS15 0x01 + + +/* FECL (Framing Error Counter) + ---------------- E1 & T1 -------------------------- */ + +#define FECL_FE7 0x80 +#define FECL_FE6 0x40 +#define FECL_FE5 0x20 +#define FECL_FE4 0x10 +#define FECL_FE3 0x08 +#define FECL_FE2 0x04 +#define FECL_FE1 0x02 +#define FECL_FE0 0x01 + +#define FECH_FE15 0x80 +#define FECH_FE14 0x40 +#define FECH_FE13 0x20 +#define FECH_FE12 0x10 +#define FECH_FE11 0x08 +#define FECH_FE10 0x04 +#define FECH_FE9 0x02 +#define FECH_FE8 0x01 + + +/* CVCl (Code Violation Counter) + ----------------- E1 ------------------------- */ + +#define CVCL_CV7 0x80 +#define CVCL_CV6 0x40 +#define CVCL_CV5 0x20 +#define CVCL_CV4 0x10 +#define CVCL_CV3 0x08 +#define CVCL_CV2 0x04 +#define CVCL_CV1 0x02 +#define CVCL_CV0 0x01 + +#define CVCH_CV15 0x80 +#define CVCH_CV14 0x40 +#define CVCH_CV13 0x20 +#define CVCH_CV12 0x10 +#define CVCH_CV11 0x08 +#define CVCH_CV10 0x04 +#define CVCH_CV9 0x02 +#define CVCH_CV8 0x01 + + +/* CEC1-3L (CRC Error Counter) + ------------------ E1 ----------------------------- */ + +#define CEC1L_CR7 0x80 +#define CEC1L_CR6 0x40 +#define CEC1L_CR5 0x20 +#define CEC1L_CR4 0x10 +#define CEC1L_CR3 0x08 +#define CEC1L_CR2 0x04 +#define CEC1L_CR1 0x02 +#define CEC1L_CR0 0x01 + +#define CEC1H_CR15 0x80 +#define CEC1H_CR14 0x40 +#define CEC1H_CR13 0x20 +#define CEC1H_CR12 0x10 +#define CEC1H_CR11 0x08 +#define CEC1H_CR10 0x04 +#define CEC1H_CR9 0x02 +#define CEC1H_CR8 0x01 + +#define CEC2L_CR7 0x80 +#define CEC2L_CR6 0x40 +#define CEC2L_CR5 0x20 +#define CEC2L_CR4 0x10 +#define CEC2L_CR3 0x08 +#define CEC2L_CR2 0x04 +#define CEC2L_CR1 0x02 +#define CEC2L_CR0 0x01 + +#define CEC2H_CR15 0x80 +#define CEC2H_CR14 0x40 +#define CEC2H_CR13 0x20 +#define CEC2H_CR12 0x10 +#define CEC2H_CR11 0x08 +#define CEC2H_CR10 0x04 +#define CEC2H_CR9 0x02 +#define CEC2H_CR8 0x01 + +#define CEC3L_CR7 0x80 +#define CEC3L_CR6 0x40 +#define CEC3L_CR5 0x20 +#define CEC3L_CR4 0x10 +#define CEC3L_CR3 0x08 +#define CEC3L_CR2 0x04 +#define CEC3L_CR1 0x02 +#define CEC3L_CR0 0x01 + +#define CEC3H_CR15 0x80 +#define CEC3H_CR14 0x40 +#define CEC3H_CR13 0x20 +#define CEC3H_CR12 0x10 +#define CEC3H_CR11 0x08 +#define CEC3H_CR10 0x04 +#define CEC3H_CR9 0x02 +#define CEC3H_CR8 0x01 + + +/* CECL (CRC Error Counter) + + ------------------ T1 ----------------------------- */ + +#define CECL_CR7 0x80 +#define CECL_CR6 0x40 +#define CECL_CR5 0x20 +#define CECL_CR4 0x10 +#define CECL_CR3 0x08 +#define CECL_CR2 0x04 +#define CECL_CR1 0x02 +#define CECL_CR0 0x01 + +#define CECH_CR15 0x80 +#define CECH_CR14 0x40 +#define CECH_CR13 0x20 +#define CECH_CR12 0x10 +#define CECH_CR11 0x08 +#define CECH_CR10 0x04 +#define CECH_CR9 0x02 +#define CECH_CR8 0x01 + +/* EBCL (E Bit Error Counter) + ------------------- E1 & T1 ------------------------- */ + +#define EBCL_EB7 0x80 +#define EBCL_EB6 0x40 +#define EBCL_EB5 0x20 +#define EBCL_EB4 0x10 +#define EBCL_EB3 0x08 +#define EBCL_EB2 0x04 +#define EBCL_EB1 0x02 +#define EBCL_EB0 0x01 + +#define EBCH_EB15 0x80 +#define EBCH_EB14 0x40 +#define EBCH_EB13 0x20 +#define EBCH_EB12 0x10 +#define EBCH_EB11 0x08 +#define EBCH_EB10 0x04 +#define EBCH_EB9 0x02 +#define EBCH_EB8 0x01 + + +/* RSA4-8 (Receive Sa4-8-Bit Register) + -------------------- E1 --------------------------- */ + +#define RSA4_RS47 0x80 +#define RSA4_RS46 0x40 +#define RSA4_RS45 0x20 +#define RSA4_RS44 0x10 +#define RSA4_RS43 0x08 +#define RSA4_RS42 0x04 +#define RSA4_RS41 0x02 +#define RSA4_RS40 0x01 + +#define RSA5_RS57 0x80 +#define RSA5_RS56 0x40 +#define RSA5_RS55 0x20 +#define RSA5_RS54 0x10 +#define RSA5_RS53 0x08 +#define RSA5_RS52 0x04 +#define RSA5_RS51 0x02 +#define RSA5_RS50 0x01 + +#define RSA6_RS67 0x80 +#define RSA6_RS66 0x40 +#define RSA6_RS65 0x20 +#define RSA6_RS64 0x10 +#define RSA6_RS63 0x08 +#define RSA6_RS62 0x04 +#define RSA6_RS61 0x02 +#define RSA6_RS60 0x01 + +#define RSA7_RS77 0x80 +#define RSA7_RS76 0x40 +#define RSA7_RS75 0x20 +#define RSA7_RS74 0x10 +#define RSA7_RS73 0x08 +#define RSA7_RS72 0x04 +#define RSA7_RS71 0x02 +#define RSA7_RS70 0x01 + +#define RSA8_RS87 0x80 +#define RSA8_RS86 0x40 +#define RSA8_RS85 0x20 +#define RSA8_RS84 0x10 +#define RSA8_RS83 0x08 +#define RSA8_RS82 0x04 +#define RSA8_RS81 0x02 +#define RSA8_RS80 0x01 + +/* RSA6S (Receive Sa6 Bit Status Register) + ------------------------ T1 ------------------------- */ + +#define RSA6S_SX 0x20 +#define RSA6S_SF 0x10 +#define RSA6S_SE 0x08 +#define RSA6S_SC 0x04 +#define RSA6S_SA 0x02 +#define RSA6S_S8 0x01 + + +/* RDL1-3 Receive DL-Bit Register1-3) + ------------------------ T1 ------------------------- */ + +#define RDL1_RDL17 0x80 +#define RDL1_RDL16 0x40 +#define RDL1_RDL15 0x20 +#define RDL1_RDL14 0x10 +#define RDL1_RDL13 0x08 +#define RDL1_RDL12 0x04 +#define RDL1_RDL11 0x02 +#define RDL1_RDL10 0x01 + +#define RDL2_RDL27 0x80 +#define RDL2_RDL26 0x40 +#define RDL2_RDL25 0x20 +#define RDL2_RDL24 0x10 +#define RDL2_RDL23 0x08 +#define RDL2_RDL22 0x04 +#define RDL2_RDL21 0x02 +#define RDL2_RDL20 0x01 + +#define RDL3_RDL37 0x80 +#define RDL3_RDL36 0x40 +#define RDL3_RDL35 0x20 +#define RDL3_RDL34 0x10 +#define RDL3_RDL33 0x08 +#define RDL3_RDL32 0x04 +#define RDL3_RDL31 0x02 +#define RDL3_RDL30 0x01 + + +/* SIS (Signaling Status Register) + + -------------------- E1 & T1 -------------------------- */ + +#define SIS_XDOV 0x80 +#define SIS_XFW 0x40 +#define SIS_XREP 0x20 +#define SIS_RLI 0x08 +#define SIS_CEC 0x04 +#define SIS_BOM 0x01 + + +/* RSIS (Receive Signaling Status Register) + + -------------------- E1 & T1 --------------------------- */ + +#define RSIS_VFR 0x80 +#define RSIS_RDO 0x40 +#define RSIS_CRC16 0x20 +#define RSIS_RAB 0x10 +#define RSIS_HA1 0x08 +#define RSIS_HA0 0x04 +#define RSIS_HFR 0x02 +#define RSIS_LA 0x01 + + +/* RBCL/H (Receive Byte Count Low/High) + + ------------------- E1 & T1 ----------------------- */ + +#define RBCL_RBC7 0x80 +#define RBCL_RBC6 0x40 +#define RBCL_RBC5 0x20 +#define RBCL_RBC4 0x10 +#define RBCL_RBC3 0x08 +#define RBCL_RBC2 0x04 +#define RBCL_RBC1 0x02 +#define RBCL_RBC0 0x01 + +#define RBCH_OV 0x10 +#define RBCH_RBC11 0x08 +#define RBCH_RBC10 0x04 +#define RBCH_RBC9 0x02 +#define RBCH_RBC8 0x01 + + +/* ISR1-3 (Interrupt Status Register 1-3) + + ------------------ E1 & T1 ------------------------------ */ + +#define FISR0_RME 0x80 +#define FISR0_RFS 0x40 +#define FISR0_T8MS 0x20 +#define FISR0_ISF 0x20 +#define FISR0_RMB 0x10 +#define FISR0_CASC 0x08 +#define FISR0_RSC 0x08 +#define FISR0_CRC6 0x04 +#define FISR0_CRC4 0x04 +#define FISR0_PDEN 0x02 +#define FISR0_RPF 0x01 + +#define FISR1_CASE 0x80 +#define FISR1_LLBSC 0x80 +#define FISR1_RDO 0x40 +#define FISR1_ALLS 0x20 +#define FISR1_XDU 0x10 +#define FISR1_XMB 0x08 +#define FISR1_XLSC 0x02 +#define FISR1_XPR 0x01 + +#define FISR2_FAR 0x80 +#define FISR2_LFA 0x40 +#define FISR2_MFAR 0x20 +#define FISR2_T400MS 0x10 +#define FISR2_LMFA 0x10 +#define FISR2_AIS 0x08 +#define FISR2_LOS 0x04 +#define FISR2_RAR 0x02 +#define FISR2_RA 0x01 + +#define FISR3_ES 0x80 +#define FISR3_SEC 0x40 +#define FISR3_LMFA16 0x20 +#define FISR3_AIS16 0x10 +#define FISR3_RA16 0x08 +#define FISR3_API 0x04 +#define FISR3_XSLP 0x20 +#define FISR3_XSLN 0x10 +#define FISR3_LLBSC 0x08 +#define FISR3_XRS 0x04 +#define FISR3_SLN 0x02 +#define FISR3_SLP 0x01 + + +/* GIS (Global Interrupt Status Register) + + --------------------- E1 & T1 --------------------- */ + +#define GIS_ISR3 0x08 +#define GIS_ISR2 0x04 +#define GIS_ISR1 0x02 +#define GIS_ISR0 0x01 + + +/* VSTR (Version Status Register) + + --------------------- E1 & T1 --------------------- */ + +#define VSTR_VN3 0x08 +#define VSTR_VN2 0x04 +#define VSTR_VN1 0x02 +#define VSTR_VN0 0x01 + + +/*>>>>>>>>>>>>>>>>>>>>> Local Control Structures <<<<<<<<<<<<<<<<<<<<<<<<< */ + +/* Write-only Registers (E1/T1 control mode write registers) */ +#define XFIFOH 0x00 /* Tx FIFO High Byte */ +#define XFIFOL 0x01 /* Tx FIFO Low Byte */ +#define CMDR 0x02 /* Command Reg */ +#define DEC 0x60 /* Disable Error Counter */ +#define TEST2 0x62 /* Manuf. Test Reg 2 */ +#define XS(nbr) (0x70 + (nbr)) /* Tx CAS Reg (0 to 15) */ + +/* Read-write Registers (E1/T1 status mode read registers) */ +#define MODE 0x03 /* Mode Reg */ +#define RAH1 0x04 /* Receive Address High 1 */ +#define RAH2 0x05 /* Receive Address High 2 */ +#define RAL1 0x06 /* Receive Address Low 1 */ +#define RAL2 0x07 /* Receive Address Low 2 */ +#define IPC 0x08 /* Interrupt Port Configuration */ +#define CCR1 0x09 /* Common Configuration Reg 1 */ +#define CCR3 0x0A /* Common Configuration Reg 3 */ +#define PRE 0x0B /* Preamble Reg */ +#define RTR1 0x0C /* Receive Timeslot Reg 1 */ +#define RTR2 0x0D /* Receive Timeslot Reg 2 */ +#define RTR3 0x0E /* Receive Timeslot Reg 3 */ +#define RTR4 0x0F /* Receive Timeslot Reg 4 */ +#define TTR1 0x10 /* Transmit Timeslot Reg 1 */ +#define TTR2 0x11 /* Transmit Timeslot Reg 2 */ +#define TTR3 0x12 /* Transmit Timeslot Reg 3 */ +#define TTR4 0x13 /* Transmit Timeslot Reg 4 */ +#define IMR0 0x14 /* Interrupt Mask Reg 0 */ +#define IMR1 0x15 /* Interrupt Mask Reg 1 */ +#define IMR2 0x16 /* Interrupt Mask Reg 2 */ +#define IMR3 0x17 /* Interrupt Mask Reg 3 */ +#define IMR4 0x18 /* Interrupt Mask Reg 4 */ +#define IMR5 0x19 /* Interrupt Mask Reg 5 */ +#define FMR0 0x1A /* Framer Mode Reigster 0 */ +#define FMR1 0x1B /* Framer Mode Reigster 1 */ +#define FMR2 0x1C /* Framer Mode Reigster 2 */ +#define LOOP 0x1D /* Channel Loop Back */ +#define XSW 0x1E /* Transmit Service Word */ +#define FMR4 0x1E /* Framer Mode Reg 4 */ +#define XSP 0x1F /* Transmit Spare Bits */ +#define FMR5 0x1F /* Framer Mode Reg 5 */ +#define XC0 0x20 /* Transmit Control 0 */ +#define XC1 0x21 /* Transmit Control 1 */ +#define RC0 0x22 /* Receive Control 0 */ +#define RC1 0x23 /* Receive Control 1 */ +#define XPM0 0x24 /* Transmit Pulse Mask 0 */ +#define XPM1 0x25 /* Transmit Pulse Mask 1 */ +#define XPM2 0x26 /* Transmit Pulse Mask 2 */ +#define TSWM 0x27 /* Transparent Service Word Mask */ +#define TEST1 0x28 /* Manuf. Test Reg 1 */ +#define IDLE 0x29 /* Idle Channel Code */ +#define XSA4 0x2A /* Transmit SA4 Bit Reg */ +#define XDL1 0x2A /* Transmit DL-Bit Reg 2 */ +#define XSA5 0x2B /* Transmit SA4 Bit Reg */ +#define XDL2 0x2B /* Transmit DL-Bit Reg 2 */ +#define XSA6 0x2C /* Transmit SA4 Bit Reg */ +#define XDL3 0x2C /* Transmit DL-Bit Reg 2 */ +#define XSA7 0x2D /* Transmit SA4 Bit Reg */ +#define CCB1 0x2D /* Clear Channel Reg 1 */ +#define XSA8 0x2E /* Transmit SA4 Bit Reg */ +#define CCB2 0x2E /* Clear Channel Reg 2 */ +#define FMR3 0x2F /* Framer Mode Reg. 3 */ +#define CCB3 0x2F /* Clear Channel Reg 3 */ +#define ICB1 0x30 /* Idle Channel Reg 1 */ +#define ICB2 0x31 /* Idle Channel Reg 2 */ +#define ICB3 0x32 /* Idle Channel Reg 3 */ +#define ICB4 0x33 /* Idle Channel Reg 4 */ +#define LIM0 0x34 /* Line Interface Mode 0 */ +#define LIM1 0x35 /* Line Interface Mode 1 */ +#define PCDR 0x36 /* Pulse Count Detection */ +#define PCRR 0x37 /* Pulse Count Recovery */ +#define LIM2 0x38 /* Line Interface Mode Reg 2 */ +#define LCR1 0x39 /* Loop Code Reg 1 */ +#define LCR2 0x3A /* Loop Code Reg 2 */ +#define LCR3 0x3B /* Loop Code Reg 3 */ +#define SIC1 0x3C /* System Interface Control 1 */ + +/* Read-only Registers (E1/T1 control mode read registers) */ +#define RFIFOH 0x00 /* Receive FIFO */ +#define RFIFOL 0x01 /* Receive FIFO */ +#define FRS0 0x4C /* Framer Receive Status 0 */ +#define FRS1 0x4D /* Framer Receive Status 1 */ +#define RSW 0x4E /* Receive Service Word */ +#define FRS2 0x4E /* Framer Receive Status 2 */ +#define RSP 0x4F /* Receive Spare Bits */ +#define FRS3 0x4F /* Framer Receive Status 3 */ +#define FECL 0x50 /* Framing Error Counter */ +#define FECH 0x51 /* Framing Error Counter */ +#define CVCL 0x52 /* Code Violation Counter */ +#define CVCH 0x53 /* Code Violation Counter */ +#define CECL 0x54 /* CRC Error Counter 1 */ +#define CECH 0x55 /* CRC Error Counter 1 */ +#define EBCL 0x56 /* E-Bit Error Counter */ +#define EBCH 0x57 /* E-Bit Error Counter */ +#define BECL 0x58 /* Bit Error Counter Low */ +#define BECH 0x59 /* Bit Error Counter Low */ +#define CEC3 0x5A /* CRC Error Counter 3 (16-bit) */ +#define RSA4 0x5C /* Receive SA4 Bit Reg */ +#define RDL1 0x5C /* Receive DL-Bit Reg 1 */ +#define RSA5 0x5D /* Receive SA5 Bit Reg */ +#define RDL2 0x5D /* Receive DL-Bit Reg 2 */ +#define RSA6 0x5E /* Receive SA6 Bit Reg */ +#define RDL3 0x5E /* Receive DL-Bit Reg 3 */ +#define RSA7 0x5F /* Receive SA7 Bit Reg */ +#define RSA8 0x60 /* Receive SA8 Bit Reg */ +#define RSA6S 0x61 /* Receive SA6 Bit Status Reg */ +#define TSR0 0x62 /* Manuf. Test Reg 0 */ +#define TSR1 0x63 /* Manuf. Test Reg 1 */ +#define SIS 0x64 /* Signaling Status Reg */ +#define RSIS 0x65 /* Receive Signaling Status Reg */ +#define RBCL 0x66 /* Receive Byte Control */ +#define RBCH 0x67 /* Receive Byte Control */ +#define FISR0 0x68 /* Interrupt Status Reg 0 */ +#define FISR1 0x69 /* Interrupt Status Reg 1 */ +#define FISR2 0x6A /* Interrupt Status Reg 2 */ +#define FISR3 0x6B /* Interrupt Status Reg 3 */ +#define GIS 0x6E /* Global Interrupt Status */ +#define VSTR 0x6F /* Version Status */ +#define RS(nbr) (0x70 + (nbr)) /* Rx CAS Reg (0 to 15) */ + +#endif /* _FALC_LH_H */ + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/hd64572.h linux.20p6/drivers/net/hd64572.h --- linux.vanilla/drivers/net/hd64572.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/net/hd64572.h Fri May 4 23:05:08 2001 @@ -0,0 +1,437 @@ +/* + * hd64572.h Description of the Hitachi HD64572 (SCA-II), valid for + * CPU modes 0 & 2. + * + * Author: Ivan Passos + * + * Copyright: (c) 2000-2001 Cyclades Corp. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * $Log: hd64572.h,v $ + * Revision 1.0 2000/01/25 ivan + * Initial version. + * + */ + +#ifndef _HD64572_H +#define _HD64572_H + +/* Illegal Access Register */ +#define ILAR 0x00 + +/* Wait Controller Registers */ +#define PABR0L 0x20 /* Physical Addr Boundary Register 0 L */ +#define PABR0H 0x21 /* Physical Addr Boundary Register 0 H */ +#define PABR1L 0x22 /* Physical Addr Boundary Register 1 L */ +#define PABR1H 0x23 /* Physical Addr Boundary Register 1 H */ +#define WCRL 0x24 /* Wait Control Register L */ +#define WCRM 0x25 /* Wait Control Register M */ +#define WCRH 0x26 /* Wait Control Register H */ + +/* Interrupt Registers */ +#define IVR 0x60 /* Interrupt Vector Register */ +#define IMVR 0x64 /* Interrupt Modified Vector Register */ +#define ITCR 0x68 /* Interrupt Control Register */ +#define ISR0 0x6c /* Interrupt Status Register 0 */ +#define ISR1 0x70 /* Interrupt Status Register 1 */ +#define IER0 0x74 /* Interrupt Enable Register 0 */ +#define IER1 0x78 /* Interrupt Enable Register 1 */ + +/* Register Access Macros (chan is 0 or 1 in _any_ case) */ +#define M_REG(reg, chan) (reg + 0x80*chan) /* MSCI */ +#define DRX_REG(reg, chan) (reg + 0x40*chan) /* DMA Rx */ +#define DTX_REG(reg, chan) (reg + 0x20*(2*chan + 1)) /* DMA Tx */ +#define TRX_REG(reg, chan) (reg + 0x20*chan) /* Timer Rx */ +#define TTX_REG(reg, chan) (reg + 0x10*(2*chan + 1)) /* Timer Tx */ +#define ST_REG(reg, chan) (reg + 0x80*chan) /* Status Cnt */ +#define IR0_DRX(val, chan) ((val)<<(8*(chan))) /* Int DMA Rx */ +#define IR0_DTX(val, chan) ((val)<<(4*(2*chan + 1))) /* Int DMA Tx */ +#define IR0_M(val, chan) ((val)<<(8*(chan))) /* Int MSCI */ + +/* MSCI Channel Registers */ +#define MD0 0x138 /* Mode reg 0 */ +#define MD1 0x139 /* Mode reg 1 */ +#define MD2 0x13a /* Mode reg 2 */ +#define MD3 0x13b /* Mode reg 3 */ +#define CTL 0x130 /* Control reg */ +#define RXS 0x13c /* RX clock source */ +#define TXS 0x13d /* TX clock source */ +#define EXS 0x13e /* External clock input selection */ +#define TMCT 0x144 /* Time constant (Tx) */ +#define TMCR 0x145 /* Time constant (Rx) */ +#define CMD 0x128 /* Command reg */ +#define ST0 0x118 /* Status reg 0 */ +#define ST1 0x119 /* Status reg 1 */ +#define ST2 0x11a /* Status reg 2 */ +#define ST3 0x11b /* Status reg 3 */ +#define ST4 0x11c /* Status reg 4 */ +#define FST 0x11d /* frame Status reg */ +#define IE0 0x120 /* Interrupt enable reg 0 */ +#define IE1 0x121 /* Interrupt enable reg 1 */ +#define IE2 0x122 /* Interrupt enable reg 2 */ +#define IE4 0x124 /* Interrupt enable reg 4 */ +#define FIE 0x125 /* Frame Interrupt enable reg */ +#define SA0 0x140 /* Syn Address reg 0 */ +#define SA1 0x141 /* Syn Address reg 1 */ +#define IDL 0x142 /* Idle register */ +#define TRBL 0x100 /* TX/RX buffer reg L */ +#define TRBK 0x101 /* TX/RX buffer reg K */ +#define TRBJ 0x102 /* TX/RX buffer reg J */ +#define TRBH 0x103 /* TX/RX buffer reg H */ +#define TRC0 0x148 /* TX Ready control reg 0 */ +#define TRC1 0x149 /* TX Ready control reg 1 */ +#define RRC 0x14a /* RX Ready control reg */ +#define CST0 0x108 /* Current Status Register 0 */ +#define CST1 0x109 /* Current Status Register 1 */ +#define CST2 0x10a /* Current Status Register 2 */ +#define CST3 0x10b /* Current Status Register 3 */ +#define GPO 0x131 /* General Purpose Output Pin Ctl Reg */ +#define TFS 0x14b /* Tx Start Threshold Ctl Reg */ +#define TFN 0x143 /* Inter-transmit-frame Time Fill Ctl Reg */ +#define TBN 0x110 /* Tx Buffer Number Reg */ +#define RBN 0x111 /* Rx Buffer Number Reg */ +#define TNR0 0x150 /* Tx DMA Request Ctl Reg 0 */ +#define TNR1 0x151 /* Tx DMA Request Ctl Reg 1 */ +#define TCR 0x152 /* Tx DMA Critical Request Reg */ +#define RNR 0x154 /* Rx DMA Request Ctl Reg */ +#define RCR 0x156 /* Rx DMA Critical Request Reg */ + +/* Timer Registers */ +#define TCNTL 0x200 /* Timer Upcounter L */ +#define TCNTH 0x201 /* Timer Upcounter H */ +#define TCONRL 0x204 /* Timer Constant Register L */ +#define TCONRH 0x205 /* Timer Constant Register H */ +#define TCSR 0x206 /* Timer Control/Status Register */ +#define TEPR 0x207 /* Timer Expand Prescale Register */ + +/* DMA registers */ +#define PCR 0x40 /* DMA priority control reg */ +#define DRR 0x44 /* DMA reset reg */ +#define DMER 0x07 /* DMA Master Enable reg */ +#define BTCR 0x08 /* Burst Tx Ctl Reg */ +#define BOLR 0x0c /* Back-off Length Reg */ +#define DSR_RX(chan) (0x48 + 2*chan) /* DMA Status Reg (Rx) */ +#define DSR_TX(chan) (0x49 + 2*chan) /* DMA Status Reg (Tx) */ +#define DIR_RX(chan) (0x4c + 2*chan) /* DMA Interrupt Enable Reg (Rx) */ +#define DIR_TX(chan) (0x4d + 2*chan) /* DMA Interrupt Enable Reg (Tx) */ +#define FCT_RX(chan) (0x50 + 2*chan) /* Frame End Interrupt Counter (Rx) */ +#define FCT_TX(chan) (0x51 + 2*chan) /* Frame End Interrupt Counter (Tx) */ +#define DMR_RX(chan) (0x54 + 2*chan) /* DMA Mode Reg (Rx) */ +#define DMR_TX(chan) (0x55 + 2*chan) /* DMA Mode Reg (Tx) */ +#define DCR_RX(chan) (0x58 + 2*chan) /* DMA Command Reg (Rx) */ +#define DCR_TX(chan) (0x59 + 2*chan) /* DMA Command Reg (Tx) */ + +/* DMA Channel Registers */ +#define DARL 0x80 /* Dest Addr Register L (single-block, RX only) */ +#define DARH 0x81 /* Dest Addr Register H (single-block, RX only) */ +#define DARB 0x82 /* Dest Addr Register B (single-block, RX only) */ +#define DARBH 0x83 /* Dest Addr Register BH (single-block, RX only) */ +#define SARL 0x80 /* Source Addr Register L (single-block, TX only) */ +#define SARH 0x81 /* Source Addr Register H (single-block, TX only) */ +#define SARB 0x82 /* Source Addr Register B (single-block, TX only) */ +#define DARBH 0x83 /* Source Addr Register BH (single-block, TX only) */ +#define BARL 0x80 /* Buffer Addr Register L (chained-block) */ +#define BARH 0x81 /* Buffer Addr Register H (chained-block) */ +#define BARB 0x82 /* Buffer Addr Register B (chained-block) */ +#define BARBH 0x83 /* Buffer Addr Register BH (chained-block) */ +#define CDAL 0x84 /* Current Descriptor Addr Register L */ +#define CDAH 0x85 /* Current Descriptor Addr Register H */ +#define CDAB 0x86 /* Current Descriptor Addr Register B */ +#define CDABH 0x87 /* Current Descriptor Addr Register BH */ +#define EDAL 0x88 /* Error Descriptor Addr Register L */ +#define EDAH 0x89 /* Error Descriptor Addr Register H */ +#define EDAB 0x8a /* Error Descriptor Addr Register B */ +#define EDABH 0x8b /* Error Descriptor Addr Register BH */ +#define BFLL 0x90 /* RX Buffer Length L (only RX) */ +#define BFLH 0x91 /* RX Buffer Length H (only RX) */ +#define BCRL 0x8c /* Byte Count Register L */ +#define BCRH 0x8d /* Byte Count Register H */ + +/* Block Descriptor Structure */ +typedef struct { + unsigned long next; /* pointer to next block descriptor */ + unsigned long ptbuf; /* buffer pointer */ + unsigned short len; /* data length */ + unsigned char status; /* status */ + unsigned char filler[5]; /* alignment filler (16 bytes) */ +} pcsca_bd_t; + +/* + Descriptor Status definitions: + + Bit Transmission Reception + + 7 EOM EOM + 6 - Short Frame + 5 - Abort + 4 - Residual bit + 3 Underrun Overrun + 2 - CRC + 1 Ownership Ownership + 0 EOT - +*/ +#define DST_EOT 0x01 /* End of transmit command */ +#define DST_OSB 0x02 /* Ownership bit */ +#define DST_CRC 0x04 /* CRC Error */ +#define DST_OVR 0x08 /* Overrun */ +#define DST_UDR 0x08 /* Underrun */ +#define DST_RBIT 0x10 /* Residual bit */ +#define DST_ABT 0x20 /* Abort */ +#define DST_SHRT 0x40 /* Short Frame */ +#define DST_EOM 0x80 /* End of Message */ + +/* Status Counter Registers */ +#define CMCR 0x158 /* Counter Master Ctl Reg */ +#define TECNTL 0x160 /* Tx EOM Counter L */ +#define TECNTM 0x161 /* Tx EOM Counter M */ +#define TECNTH 0x162 /* Tx EOM Counter H */ +#define TECCR 0x163 /* Tx EOM Counter Ctl Reg */ +#define URCNTL 0x164 /* Underrun Counter L */ +#define URCNTH 0x165 /* Underrun Counter H */ +#define URCCR 0x167 /* Underrun Counter Ctl Reg */ +#define RECNTL 0x168 /* Rx EOM Counter L */ +#define RECNTM 0x169 /* Rx EOM Counter M */ +#define RECNTH 0x16a /* Rx EOM Counter H */ +#define RECCR 0x16b /* Rx EOM Counter Ctl Reg */ +#define ORCNTL 0x16c /* Overrun Counter L */ +#define ORCNTH 0x16d /* Overrun Counter H */ +#define ORCCR 0x16f /* Overrun Counter Ctl Reg */ +#define CECNTL 0x170 /* CRC Counter L */ +#define CECNTH 0x171 /* CRC Counter H */ +#define CECCR 0x173 /* CRC Counter Ctl Reg */ +#define ABCNTL 0x174 /* Abort frame Counter L */ +#define ABCNTH 0x175 /* Abort frame Counter H */ +#define ABCCR 0x177 /* Abort frame Counter Ctl Reg */ +#define SHCNTL 0x178 /* Short frame Counter L */ +#define SHCNTH 0x179 /* Short frame Counter H */ +#define SHCCR 0x17b /* Short frame Counter Ctl Reg */ +#define RSCNTL 0x17c /* Residual bit Counter L */ +#define RSCNTH 0x17d /* Residual bit Counter H */ +#define RSCCR 0x17f /* Residual bit Counter Ctl Reg */ + +/* Register Programming Constants */ + +#define IR0_DMIC 0x00000001 +#define IR0_DMIB 0x00000002 +#define IR0_DMIA 0x00000004 +#define IR0_EFT 0x00000008 +#define IR0_DMAREQ 0x00010000 +#define IR0_TXINT 0x00020000 +#define IR0_RXINTB 0x00040000 +#define IR0_RXINTA 0x00080000 +#define IR0_TXRDY 0x00100000 +#define IR0_RXRDY 0x00200000 + +#define MD0_CRC16_0 0x00 +#define MD0_CRC16_1 0x01 +#define MD0_CRC32 0x02 +#define MD0_CRC_CCITT 0x03 +#define MD0_CRCC0 0x04 +#define MD0_CRCC1 0x08 +#define MD0_AUTO_ENA 0x10 +#define MD0_ASYNC 0x00 +#define MD0_BY_MSYNC 0x20 +#define MD0_BY_BISYNC 0x40 +#define MD0_BY_EXT 0x60 +#define MD0_BIT_SYNC 0x80 +#define MD0_TRANSP 0xc0 + +#define MD1_NOADDR 0x00 +#define MD1_SADDR1 0x40 +#define MD1_SADDR2 0x80 +#define MD1_DADDR 0xc0 + +#define MD2_F_DUPLEX 0x00 +#define MD2_AUTO_ECHO 0x01 +#define MD2_LOOP_HI_Z 0x02 +#define MD2_LOOP_MIR 0x03 +#define MD2_ADPLL_X8 0x00 +#define MD2_ADPLL_X16 0x08 +#define MD2_ADPLL_X32 0x10 +#define MD2_NRZ 0x00 +#define MD2_NRZI 0x20 +#define MD2_NRZ_IEEE 0x40 +#define MD2_MANCH 0x00 +#define MD2_FM1 0x20 +#define MD2_FM0 0x40 +#define MD2_FM 0x80 + +#define CTL_RTS 0x01 +#define CTL_DTR 0x02 +#define CTL_SYN 0x04 +#define CTL_IDLC 0x10 +#define CTL_UDRNC 0x20 +#define CTL_URSKP 0x40 +#define CTL_URCT 0x80 + +#define RXS_BR0 0x01 +#define RXS_BR1 0x02 +#define RXS_BR2 0x04 +#define RXS_BR3 0x08 +#define RXS_ECLK 0x00 +#define RXS_ECLK_NS 0x20 +#define RXS_IBRG 0x40 +#define RXS_PLL1 0x50 +#define RXS_PLL2 0x60 +#define RXS_PLL3 0x70 +#define RXS_DRTXC 0x80 + +#define TXS_BR0 0x01 +#define TXS_BR1 0x02 +#define TXS_BR2 0x04 +#define TXS_BR3 0x08 +#define TXS_ECLK 0x00 +#define TXS_IBRG 0x40 +#define TXS_RCLK 0x60 +#define TXS_DTRXC 0x80 + +#define EXS_RES0 0x01 +#define EXS_RES1 0x02 +#define EXS_RES2 0x04 +#define EXS_TES0 0x10 +#define EXS_TES1 0x20 +#define EXS_TES2 0x40 + +#define CMD_RX_RST 0x11 +#define CMD_RX_ENA 0x12 +#define CMD_RX_DIS 0x13 +#define CMD_RX_CRC_INIT 0x14 +#define CMD_RX_MSG_REJ 0x15 +#define CMD_RX_MP_SRCH 0x16 +#define CMD_RX_CRC_EXC 0x17 +#define CMD_RX_CRC_FRC 0x18 +#define CMD_TX_RST 0x01 +#define CMD_TX_ENA 0x02 +#define CMD_TX_DISA 0x03 +#define CMD_TX_CRC_INIT 0x04 +#define CMD_TX_CRC_EXC 0x05 +#define CMD_TX_EOM 0x06 +#define CMD_TX_ABORT 0x07 +#define CMD_TX_MP_ON 0x08 +#define CMD_TX_BUF_CLR 0x09 +#define CMD_TX_DISB 0x0b +#define CMD_CH_RST 0x21 +#define CMD_SRCH_MODE 0x31 +#define CMD_NOP 0x00 + +#define ST0_RXRDY 0x01 +#define ST0_TXRDY 0x02 +#define ST0_RXINTB 0x20 +#define ST0_RXINTA 0x40 +#define ST0_TXINT 0x80 + +#define ST1_IDLE 0x01 +#define ST1_ABORT 0x02 +#define ST1_CDCD 0x04 +#define ST1_CCTS 0x08 +#define ST1_SYN_FLAG 0x10 +#define ST1_CLMD 0x20 +#define ST1_TXIDLE 0x40 +#define ST1_UDRN 0x80 + +#define ST2_CRCE 0x04 +#define ST2_ONRN 0x08 +#define ST2_RBIT 0x10 +#define ST2_ABORT 0x20 +#define ST2_SHORT 0x40 +#define ST2_EOM 0x80 + +#define ST3_RX_ENA 0x01 +#define ST3_TX_ENA 0x02 +#define ST3_DCD 0x04 +#define ST3_CTS 0x08 +#define ST3_SRCH_MODE 0x10 +#define ST3_SLOOP 0x20 +#define ST3_GPI 0x80 + +#define ST4_RDNR 0x01 +#define ST4_RDCR 0x02 +#define ST4_TDNR 0x04 +#define ST4_TDCR 0x08 +#define ST4_OCLM 0x20 +#define ST4_CFT 0x40 +#define ST4_CGPI 0x80 + +#define FST_CRCEF 0x04 +#define FST_OVRNF 0x08 +#define FST_RBIF 0x10 +#define FST_ABTF 0x20 +#define FST_SHRTF 0x40 +#define FST_EOMF 0x80 + +#define IE0_RXRDY 0x01 +#define IE0_TXRDY 0x02 +#define IE0_RXINTB 0x20 +#define IE0_RXINTA 0x40 +#define IE0_TXINT 0x80 + +#define IE1_IDLD 0x01 +#define IE1_ABTD 0x02 +#define IE1_CDCD 0x04 +#define IE1_CCTS 0x08 +#define IE1_SYNCD 0x10 +#define IE1_CLMD 0x20 +#define IE1_IDL 0x40 +#define IE1_UDRN 0x80 + +#define IE2_CRCE 0x04 +#define IE2_OVRN 0x08 +#define IE2_RBIT 0x10 +#define IE2_ABT 0x20 +#define IE2_SHRT 0x40 +#define IE2_EOM 0x80 + +#define IE4_RDNR 0x01 +#define IE4_RDCR 0x02 +#define IE4_TDNR 0x04 +#define IE4_TDCR 0x08 +#define IE4_OCLM 0x20 +#define IE4_CFT 0x40 +#define IE4_CGPI 0x80 + +#define FIE_CRCEF 0x04 +#define FIE_OVRNF 0x08 +#define FIE_RBIF 0x10 +#define FIE_ABTF 0x20 +#define FIE_SHRTF 0x40 +#define FIE_EOMF 0x80 + +#define DSR_DWE 0x01 +#define DSR_DE 0x02 +#define DSR_REF 0x04 +#define DSR_UDRF 0x04 +#define DSR_COA 0x08 +#define DSR_COF 0x10 +#define DSR_BOF 0x20 +#define DSR_EOM 0x40 +#define DSR_EOT 0x80 + +#define DIR_REF 0x04 +#define DIR_UDRF 0x04 +#define DIR_COA 0x08 +#define DIR_COF 0x10 +#define DIR_BOF 0x20 +#define DIR_EOM 0x40 +#define DIR_EOT 0x80 + +#define DMR_CNTE 0x02 +#define DMR_NF 0x04 +#define DMR_SEOME 0x08 +#define DMR_TMOD 0x10 + +#define DCR_SW_ABT 0x01 +#define DCR_FCT_CLR 0x02 + +#define PCR_PR0 0x01 +#define PCR_PR1 0x02 +#define PCR_PR2 0x04 +#define PCR_CCC 0x08 +#define PCR_BRC 0x10 +#define PCR_OSB 0x40 +#define PCR_BURST 0x80 + +#endif /* (_HD64572_H) */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/macmace.c linux.20p6/drivers/net/macmace.c --- linux.vanilla/drivers/net/macmace.c Sun Mar 25 17:31:23 2001 +++ linux.20p6/drivers/net/macmace.c Tue Jun 19 09:59:54 2001 @@ -607,7 +607,7 @@ } /* - * A transmit error has occured. (We kick the transmit side from + * A transmit error has occurred. (We kick the transmit side from * the DMA completion) */ @@ -636,7 +636,7 @@ } /* - * A receive interrupt occured. + * A receive interrupt occurred. */ static void mace68k_recv_interrupt(struct device *dev) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/net_init.c linux.20p6/drivers/net/net_init.c --- linux.vanilla/drivers/net/net_init.c Sun Mar 25 17:31:16 2001 +++ linux.20p6/drivers/net/net_init.c Tue Jun 19 09:59:54 2001 @@ -292,8 +292,8 @@ void ether_setup(struct device *dev) { int i; - /* Fill in the fields of the device structure with ethernet-generic values. - This should be in a common file instead of per-driver. */ + /* Fill in the fields of the device structure with + ethernet-generic values. */ /* register boot-defined "eth" devices */ if (dev->name && (strncmp(dev->name, "eth", 3) == 0)) { diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/ni52.c linux.20p6/drivers/net/ni52.c --- linux.vanilla/drivers/net/ni52.c Sun Mar 25 17:31:16 2001 +++ linux.20p6/drivers/net/ni52.c Tue Jun 19 09:59:54 2001 @@ -33,20 +33,20 @@ * I have also done a look in the following sources: (mail me if you need them) * crynwr-packet-driver by Russ Nelson * Garret A. Wollman's (fourth) i82586-driver for BSD - * (before getting an i82596 (yes 596 not 586) manual, the existing drivers helped - * me a lot to understand this tricky chip.) + * (before getting an i82596 (yes 596 not 586) manual, the existing drivers + * helped me a lot to understand this tricky chip.) * * Known Problems: * The internal sysbus seems to be slow. So we often lose packets because of * overruns while receiving from a fast remote host. - * This can slow down TCP connections. Maybe the newer ni5210 cards are better. - * my experience is, that if a machine sends with more then about 500-600K/s - * the fifo/sysbus overflows. + * This can slow down TCP connections. Maybe the newer ni5210 cards are + * better. My experience is, that if a machine sends with more than + * about 500-600K/s the fifo/sysbus overflows. * * IMPORTANT NOTE: * On fast networks, it's a (very) good idea to have 16K shared memory. With - * 8K, we can store only 4 receive frames, so it can (easily) happen that a remote - * machine 'overruns' our system. + * 8K, we can store only 4 receive frames, so it can (easily) happen that a + * remote machine 'overruns' our system. * * Known i82586/card problems (I'm sure, there are many more!): * Running the NOP-mode, the i82586 sometimes seems to forget to report @@ -60,7 +60,8 @@ * * results from ftp performance tests with Linux 1.2.5 * send and receive about 350-400 KByte/s (peak up to 460 kbytes/s) - * sending in NOP-mode: peak performance up to 530K/s (but better don't run this mode) + * sending in NOP-mode: peak performance up to 530K/s (but better + * don't run this mode) */ /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/pc300.c linux.20p6/drivers/net/pc300.c --- linux.vanilla/drivers/net/pc300.c Sun Mar 25 17:31:23 2001 +++ linux.20p6/drivers/net/pc300.c Fri May 4 23:05:08 2001 @@ -1,13 +1,13 @@ #define USE_PCI_CLOCK static char rcsid[] = -"$Revision: 3.1.0.2 $$Date: 2000/06/27 $"; +"$Revision: 3.1.0.6 $$Date: 2001/03/02 $"; /* * pc300.c Cyclades-PC300(tm) Driver. * * Author: Ivan Passos * - * Copyright: (c) 1999-2000 Cyclades Corp. + * Copyright: (c) 1999-2001 Cyclades Corp. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -15,6 +15,23 @@ * 2 of the License, or (at your option) any later version. * * $Log: pc300.c,v $ + * Revision 3.1.0.6 2001/03/02 daniela + * Changed SIOCGPC300CONF ioctl, to give hw information to pc300util. + * + * Revision 3.1.0.5 2001/02/23 daniela + * Fixed falc_check_status for Unframed E1. + * + * Revision 3.1.0.4 2000/12/22 daniela,ivan + * Added support for Unframed E1. + * Implemented pc300util support: trace, statistics, status and loopback + * tests for the PC300 TE boards. + * Implemented monitor mode. + * Fixed DCD sensitivity on the second channel. + * + * Revision 3.1.0.3 2000/09/28 daniela,ivan + * Implemented DCD sensitivity. + * Changed location of pc300.h . + * * Revision 3.1.0.2 2000/06/27 ivan * Previous bugfix for the framing errors with external clock made X21 * boards stop working. This version fixes it. @@ -73,7 +90,7 @@ * Fixed bug in ch_config that would disable interrupts on a previously * enabled channel if the other channel on the same board was enabled later. * - * Revision 0.3.0.0 1999/11/16 Daniela Squassoni + * Revision 0.3.0.0 1999/11/16 daniela * X.25 support. * * Revision 0.2.3.0 1999/11/15 ivan @@ -127,16 +144,14 @@ #include #include #include +#include #ifdef CONFIG_PC300_X25 #include #endif /* CONFIG_PC300_X25 */ #include "syncppp.h" - -#include - -#include +#include "pc300.h" #define CPC_LOCK(card,flags) \ do { \ @@ -475,28 +490,36 @@ /* Enable SEC and ES interrupts */ cpc_writeb(falcbase + F_REG(IMR3, ch), cpc_readb(falcbase + F_REG(IMR3, ch)) & ~(IMR3_SEC | IMR3_ES)); - cpc_writeb(falcbase + F_REG(IMR4, ch), - cpc_readb(falcbase + F_REG(IMR4, ch)) & - ~(IMR4_LFA | IMR4_AIS | IMR4_LOS | IMR4_SLIP)); + if (conf->fr_mode == PC300_FR_UNFRAMED) { + cpc_writeb(falcbase + F_REG(IMR4, ch), + cpc_readb(falcbase + F_REG(IMR4, ch)) & ~(IMR4_LOS)); + } else { + cpc_writeb(falcbase + F_REG(IMR4, ch), + cpc_readb(falcbase + F_REG(IMR4, ch)) & + ~(IMR4_LFA | IMR4_AIS | IMR4_LOS | IMR4_SLIP)); + } if (conf->media == LINE_T1) { cpc_writeb(falcbase + F_REG(IMR3, ch), cpc_readb(falcbase + F_REG(IMR3, ch)) & ~IMR3_LLBSC); } else { cpc_writeb(falcbase + F_REG(IPC, ch), cpc_readb(falcbase + F_REG(IPC, ch)) | IPC_SCI); - cpc_writeb(falcbase + F_REG(IMR2, ch), - cpc_readb(falcbase + F_REG(IMR2, ch)) & - ~(IMR2_FAR | IMR2_LFA | IMR2_AIS | IMR2_LOS)); - cpc_writeb(falcbase + F_REG(IMR1, ch), - cpc_readb(falcbase + F_REG(IMR1, ch)) & ~IMR1_LLBSC); - if (pfalc->multiframe_mode) { - cpc_writeb(falcbase + F_REG(IMR2, ch), - cpc_readb(falcbase + F_REG(IMR2, ch)) & - ~(IMR2_T400MS | IMR2_MFAR)); + if (conf->fr_mode == PC300_FR_UNFRAMED) { + cpc_writeb(falcbase + F_REG(IMR2, ch), + cpc_readb(falcbase + F_REG(IMR2, ch)) & ~(IMR2_LOS)); } else { - cpc_writeb(falcbase + F_REG(IMR2, ch), - cpc_readb(falcbase + F_REG(IMR2, ch)) | - IMR2_T400MS | IMR2_MFAR); + cpc_writeb(falcbase + F_REG(IMR2, ch), + cpc_readb(falcbase + F_REG(IMR2, ch)) & + ~(IMR2_FAR | IMR2_LFA | IMR2_AIS | IMR2_LOS)); + if (pfalc->multiframe_mode) { + cpc_writeb(falcbase + F_REG(IMR2, ch), + cpc_readb(falcbase + F_REG(IMR2, ch)) & + ~(IMR2_T400MS | IMR2_MFAR)); + } else { + cpc_writeb(falcbase + F_REG(IMR2, ch), + cpc_readb(falcbase + F_REG(IMR2, ch)) | + IMR2_T400MS | IMR2_MFAR); + } } } } @@ -565,10 +588,15 @@ pc300chconf_t *conf = (pc300chconf_t *)&chan->conf; uclong falcbase = card->hw.falcbase; - /* Timeslot 0 is never enabled */ cpc_writeb(falcbase + F_REG(ICB1, ch), 0); - cpc_writeb(falcbase + F_REG(TTR1, ch), 0x7f); - cpc_writeb(falcbase + F_REG(RTR1, ch), 0x7f); + if (conf->fr_mode == PC300_FR_UNFRAMED) { + cpc_writeb(falcbase + F_REG(TTR1, ch), 0xff); + cpc_writeb(falcbase + F_REG(RTR1, ch), 0xff); + } else { + /* Timeslot 0 is never enabled */ + cpc_writeb(falcbase + F_REG(TTR1, ch), 0x7f); + cpc_writeb(falcbase + F_REG(RTR1, ch), 0x7f); + } cpc_writeb(falcbase + F_REG(ICB2, ch), 0); cpc_writeb(falcbase + F_REG(TTR2, ch), 0xff); cpc_writeb(falcbase + F_REG(RTR2, ch), 0xff); @@ -617,9 +645,9 @@ falc_init_timeslot(card, ch); } // CTS/DCD ON - cpc_writeb(card->hw.falcbase + CPLD_REG1, - cpc_readb(card->hw.falcbase + CPLD_REG1) | - ((CPLD_REG1_FALC_DCD | CPLD_REG1_FALC_CTS) << (2*ch))); + cpc_writeb(card->hw.falcbase + card->hw.cpld_reg1, + cpc_readb(card->hw.falcbase + card->hw.cpld_reg1) & + ~((CPLD_REG1_FALC_DCD | CPLD_REG1_FALC_CTS) << (2*ch))); } void @@ -632,9 +660,9 @@ falc_close_all_timeslots(card, ch); } // CTS/DCD OFF - cpc_writeb(card->hw.falcbase + CPLD_REG1, - cpc_readb(card->hw.falcbase + CPLD_REG1) & - ~((CPLD_REG1_FALC_DCD | CPLD_REG1_FALC_CTS) << (2*ch))); + cpc_writeb(card->hw.falcbase + card->hw.cpld_reg1, + cpc_readb(card->hw.falcbase + card->hw.cpld_reg1) | + ((CPLD_REG1_FALC_DCD | CPLD_REG1_FALC_CTS) << (2*ch))); } void @@ -831,7 +859,7 @@ cpc_readb(falcbase + F_REG(LIM0, ch)) & ~LIM0_MAS); } cpc_writeb(falcbase + F_REG(LOOP, ch), - cpc_readb(falcbase + F_REG(LOOP, ch)) & ~LOOP_RTM); + cpc_readb(falcbase + F_REG(LOOP, ch)) & ~LOOP_SFM); cpc_writeb(falcbase + F_REG(IPC, ch), IPC_SCI); cpc_writeb(falcbase + F_REG(FMR0, ch), @@ -894,6 +922,19 @@ cpc_writeb(falcbase + F_REG(XSP, ch), cpc_readb(falcbase + F_REG(XSP, ch)) | XSP_XS13 | XSP_XS15); + + /* Automatic Force Resynchronization */ + cpc_writeb(falcbase + F_REG(FMR1, ch), + cpc_readb(falcbase + F_REG(FMR1, ch)) | FMR1_AFR); + + /* Transmit Automatic Remote Alarm */ + cpc_writeb(falcbase + F_REG(FMR2, ch), + cpc_readb(falcbase + F_REG(FMR2, ch)) | FMR2_AXRA); + + /* Transmit Spare Bits for National Use (Y, Sn, Sa) */ + cpc_writeb(falcbase + F_REG(XSW, ch), + cpc_readb(falcbase + F_REG(XSW, ch)) | + XSW_XY0 | XSW_XY1 | XSW_XY2 | XSW_XY3 | XSW_XY4); break; case PC300_FR_MF_NON_CRC4: @@ -902,23 +943,53 @@ cpc_writeb(falcbase + F_REG(FMR1, ch), cpc_readb(falcbase + F_REG(FMR1, ch)) & ~FMR1_XFS); cpc_writeb(falcbase + F_REG(FMR2, ch), - cpc_readb(falcbase + F_REG(FMR2, ch)) & ~FMR2_RFS1); - cpc_writeb(falcbase + F_REG(FMR2, ch), - cpc_readb(falcbase + F_REG(FMR2, ch)) & ~FMR2_RFS0); + cpc_readb(falcbase + F_REG(FMR2, ch)) & + ~(FMR2_RFS1|FMR2_RFS0)); cpc_writeb(falcbase + F_REG(XSW, ch), cpc_readb(falcbase + F_REG(XSW, ch)) | XSW_XSIS); cpc_writeb(falcbase + F_REG(XSP, ch), cpc_readb(falcbase + F_REG(XSP, ch)) | XSP_XSIF); - break; - } - /* Automatic Force Resynchronization */ - cpc_writeb(falcbase + F_REG(FMR1, ch), - cpc_readb(falcbase + F_REG(FMR1, ch)) | FMR1_AFR); + /* Automatic Force Resynchronization */ + cpc_writeb(falcbase + F_REG(FMR1, ch), + cpc_readb(falcbase + F_REG(FMR1, ch)) | FMR1_AFR); - /* Transmit Automatic Remote Alarm */ - cpc_writeb(falcbase + F_REG(FMR2, ch), - cpc_readb(falcbase + F_REG(FMR2, ch)) | FMR2_AXRA); + /* Transmit Automatic Remote Alarm */ + cpc_writeb(falcbase + F_REG(FMR2, ch), + cpc_readb(falcbase + F_REG(FMR2, ch)) | FMR2_AXRA); + + /* Transmit Spare Bits for National Use (Y, Sn, Sa) */ + cpc_writeb(falcbase + F_REG(XSW, ch), + cpc_readb(falcbase + F_REG(XSW, ch)) | + XSW_XY0 | XSW_XY1 | XSW_XY2 | XSW_XY3 | XSW_XY4); + break; + + case PC300_FR_UNFRAMED: + pfalc->multiframe_mode = 0; + cpc_writeb(falcbase + F_REG(FMR1, ch), + cpc_readb(falcbase + F_REG(FMR1, ch)) & ~FMR1_XFS); + cpc_writeb(falcbase + F_REG(FMR2, ch), + cpc_readb(falcbase + F_REG(FMR2, ch)) & + ~(FMR2_RFS1|FMR2_RFS0)); + cpc_writeb(falcbase + F_REG(XSP, ch), + cpc_readb(falcbase + F_REG(XSP, ch)) | XSP_TT0); + cpc_writeb(falcbase + F_REG(XSW, ch), + cpc_readb(falcbase + F_REG(XSW, ch)) & + ~(XSW_XTM|XSW_XY0|XSW_XY1|XSW_XY2|XSW_XY3|XSW_XY4)); + cpc_writeb(falcbase + F_REG(TSWM, ch), 0xff); + cpc_writeb(falcbase + F_REG(FMR2, ch), + cpc_readb(falcbase + F_REG(FMR2, ch)) | + (FMR2_RTM|FMR2_DAIS)); + cpc_writeb(falcbase + F_REG(FMR2, ch), + cpc_readb(falcbase + F_REG(FMR2, ch)) & ~FMR2_AXRA); + cpc_writeb(falcbase + F_REG(FMR1, ch), + cpc_readb(falcbase + F_REG(FMR1, ch)) & ~FMR1_AFR); + pfalc->sync = 1; + cpc_writeb(falcbase + card->hw.cpld_reg2, + cpc_readb(falcbase + card->hw.cpld_reg2) | + (CPLD_REG2_FALC_LED2 << (2*ch))); + break; + } /* No signaling */ cpc_writeb(falcbase + F_REG(XSP, ch), @@ -944,11 +1015,6 @@ /* LOS Recovery after 22 ones in the time window of PCD */ cpc_writeb(falcbase + F_REG(PCRR, ch), 0x15); - /* Transmit Spare Bits for National Use (Y-Bits, Sn-Bits, Sa-Bits) */ - cpc_writeb(falcbase + F_REG(XSW, ch), - cpc_readb(falcbase + F_REG(XSW, ch)) | - XSW_XY0 | XSW_XY1 | XSW_XY2 | XSW_XY3 | XSW_XY4); - cpc_writeb(falcbase + F_REG(IDLE, ch), 0x7f); falc_close_all_timeslots(card, ch); @@ -958,14 +1024,21 @@ falc_init_hdlc(pc300_t *card, int ch) { uclong falcbase = card->hw.falcbase; + pc300ch_t *chan = (pc300ch_t *)&card->chan[ch]; + pc300chconf_t *conf = (pc300chconf_t *)&chan->conf; /* Enable transparent data transfer */ - cpc_writeb(falcbase + F_REG(MODE, ch), - cpc_readb(falcbase + F_REG(MODE, ch)) | MODE_HRAC | MODE_MDS2); - cpc_writeb(falcbase + F_REG(RAH2, ch), 0xff); - cpc_writeb(falcbase + F_REG(RAH1, ch), 0xff); - cpc_writeb(falcbase + F_REG(RAL2, ch), 0xff); - cpc_writeb(falcbase + F_REG(RAL1, ch), 0xff); + if (conf->fr_mode == PC300_FR_UNFRAMED) { + cpc_writeb(falcbase + F_REG(MODE, ch), 0); + } else { + cpc_writeb(falcbase + F_REG(MODE, ch), + cpc_readb(falcbase + F_REG(MODE, ch)) | + (MODE_HRAC|MODE_MDS2)); + cpc_writeb(falcbase + F_REG(RAH2, ch), 0xff); + cpc_writeb(falcbase + F_REG(RAH1, ch), 0xff); + cpc_writeb(falcbase + F_REG(RAL2, ch), 0xff); + cpc_writeb(falcbase + F_REG(RAL1, ch), 0xff); + } /* Tx/Rx reset */ falc_issue_cmd(card, ch, CMDR_RRES | CMDR_XRES | CMDR_SRES); @@ -1002,12 +1075,12 @@ CPC_LOCK(card, flags); /* Reset the FALC chip */ - cpc_writeb(card->hw.falcbase + CPLD_REG1, - cpc_readb(card->hw.falcbase + CPLD_REG1) | + cpc_writeb(card->hw.falcbase + card->hw.cpld_reg1, + cpc_readb(card->hw.falcbase + card->hw.cpld_reg1) | (CPLD_REG1_FALC_RESET << (2*ch))); udelay(10000); - cpc_writeb(card->hw.falcbase + CPLD_REG1, - cpc_readb(card->hw.falcbase + CPLD_REG1) & + cpc_writeb(card->hw.falcbase + card->hw.cpld_reg1, + cpc_readb(card->hw.falcbase + card->hw.cpld_reg1) & ~(CPLD_REG1_FALC_RESET << (2*ch))); if (conf->media == LINE_T1) { @@ -1023,8 +1096,8 @@ cpc_writeb(falcbase + F_REG(LIM0, ch), cpc_readb(falcbase + F_REG(LIM0, ch)) | LIM0_EQON); } - cpc_writeb(card->hw.falcbase + CPLD_REG2, - cpc_readb(card->hw.falcbase + CPLD_REG2) | + cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2, + cpc_readb(card->hw.falcbase + card->hw.cpld_reg2) | ((CPLD_REG2_FALC_TX_CLK | CPLD_REG2_FALC_RX_CLK) << (2*ch))); /* Clear all interrupt registers */ @@ -1043,132 +1116,138 @@ falc_t *pfalc = (falc_t *)&chan->falc; uclong falcbase = card->hw.falcbase; - /* Verify AIS alarm */ - if (frs0 & FRS0_AIS) { - if (!pfalc->blue_alarm) { - pfalc->blue_alarm = 1; - pfalc->ais++; - // EVENT_AIS - if (conf->media == LINE_T1) { - /* Disable this interrupt as it may otherwise interfere with - other working boards. */ - cpc_writeb(falcbase + F_REG(IMR0, ch), - cpc_readb(falcbase + F_REG(IMR0, ch)) | IMR0_PDEN); - } - falc_disable_comm(card, ch); - // EVENT_AIS - } - } else { - pfalc->blue_alarm = 0; - } - - /* Verify LOS */ - if (frs0 & FRS0_LOS) { - if (! pfalc->red_alarm) { - pfalc->red_alarm = 1; - pfalc->los++; + if (conf->fr_mode != PC300_FR_UNFRAMED) { + /* Verify AIS alarm */ + if (frs0 & FRS0_AIS) { if (!pfalc->blue_alarm) { - // EVENT_FALC_ABNORMAL + pfalc->blue_alarm = 1; + pfalc->ais++; + // EVENT_AIS if (conf->media == LINE_T1) { - /* Disable this interrupt as it may otherwise interfere - with other working boards. */ + /* Disable this interrupt as it may otherwise interfere with + other working boards. */ cpc_writeb(falcbase + F_REG(IMR0, ch), - cpc_readb(falcbase + F_REG(IMR0, ch)) | + cpc_readb(falcbase + F_REG(IMR0, ch)) | IMR0_PDEN); } falc_disable_comm(card, ch); - // EVENT_FALC_ABNORMAL + // EVENT_AIS } - } - } else { - if (pfalc->red_alarm) { - pfalc->red_alarm = 0; - pfalc->losr++; - } - } + } else { + pfalc->blue_alarm = 0; + } - /* Verify LFA */ - if (frs0 & FRS0_LFA) { - if (!pfalc->loss_fa) { - pfalc->loss_fa = 1; - pfalc->lfa++; - if (!pfalc->blue_alarm && !pfalc->red_alarm) { - // EVENT_FALC_ABNORMAL - if (conf->media == LINE_T1) { - /* Disable this interrupt as it may otherwise interfere - with other working boards. */ - cpc_writeb(falcbase + F_REG(IMR0, ch), - cpc_readb(falcbase + F_REG(IMR0, ch)) | - IMR0_PDEN); + /* Verify LOS */ + if (frs0 & FRS0_LOS) { + if (!pfalc->red_alarm) { + pfalc->red_alarm = 1; + pfalc->los++; + if (!pfalc->blue_alarm) { + // EVENT_FALC_ABNORMAL + if (conf->media == LINE_T1) { + /* Disable this interrupt as it may otherwise interfere + with other working boards. */ + cpc_writeb(falcbase + F_REG(IMR0, ch), + cpc_readb(falcbase + F_REG(IMR0, ch)) | + IMR0_PDEN); + } + falc_disable_comm(card, ch); + // EVENT_FALC_ABNORMAL } - falc_disable_comm(card, ch); - // EVENT_FALC_ABNORMAL + } + } else { + if (pfalc->red_alarm) { + pfalc->red_alarm = 0; + pfalc->losr++; } } - } else { - if (pfalc->loss_fa) { - pfalc->loss_fa = 0; - pfalc->farec++; + + /* Verify LFA */ + if (frs0 & FRS0_LFA) { + if (!pfalc->loss_fa) { + pfalc->loss_fa = 1; + pfalc->lfa++; + if (!pfalc->blue_alarm && !pfalc->red_alarm) { + // EVENT_FALC_ABNORMAL + if (conf->media == LINE_T1) { + /* Disable this interrupt as it may otherwise + interfere with other working boards. */ + cpc_writeb(falcbase + F_REG(IMR0, ch), + cpc_readb(falcbase + F_REG(IMR0, ch)) | + IMR0_PDEN); + } + falc_disable_comm(card, ch); + // EVENT_FALC_ABNORMAL + } + } + } else { + if (pfalc->loss_fa) { + pfalc->loss_fa = 0; + pfalc->farec++; + } } - } - /* Verify LMFA */ - if ((pfalc->multiframe_mode) && (frs0 & FRS0_LMFA)) { - /* D4 or CRC4 frame mode */ - if (! pfalc->loss_mfa) { - pfalc->loss_mfa = 1; - pfalc->lmfa++; - if (!pfalc->blue_alarm && !pfalc->red_alarm && !pfalc->loss_fa) { - // EVENT_FALC_ABNORMAL - if (conf->media == LINE_T1) { - /* Disable this interrupt as it may otherwise interfere - with other working boards. */ - cpc_writeb(falcbase + F_REG(IMR0, ch), - cpc_readb(falcbase + F_REG(IMR0, ch)) | - IMR0_PDEN); + /* Verify LMFA */ + if (pfalc->multiframe_mode && (frs0 & FRS0_LMFA)) { + /* D4 or CRC4 frame mode */ + if (!pfalc->loss_mfa) { + pfalc->loss_mfa = 1; + pfalc->lmfa++; + if (!pfalc->blue_alarm && !pfalc->red_alarm && + !pfalc->loss_fa) { + // EVENT_FALC_ABNORMAL + if (conf->media == LINE_T1) { + /* Disable this interrupt as it may otherwise + interfere with other working boards. */ + cpc_writeb(falcbase + F_REG(IMR0, ch), + cpc_readb(falcbase + F_REG(IMR0, ch)) | + IMR0_PDEN); + } + falc_disable_comm(card, ch); + // EVENT_FALC_ABNORMAL } - falc_disable_comm(card, ch); - // EVENT_FALC_ABNORMAL } + } else { + pfalc->loss_mfa = 0; } - } else { - pfalc->loss_mfa = 0; - } - if (pfalc->red_alarm || pfalc->loss_fa || - pfalc->loss_mfa || pfalc->blue_alarm) { - if (pfalc->sync) { - pfalc->sync = 0; - cpc_writeb(falcbase + CPLD_REG2, - cpc_readb(falcbase + CPLD_REG2) & - ~(CPLD_REG2_FALC_LED2 << (2*ch))); - } - } else { - if ((!pfalc->sync)) { - pfalc->sync = 1; - cpc_writeb(falcbase + CPLD_REG2, - cpc_readb(falcbase + CPLD_REG2) | - (CPLD_REG2_FALC_LED2 << (2*ch))); + if (pfalc->red_alarm || pfalc->loss_fa || + pfalc->loss_mfa || pfalc->blue_alarm) { + if (pfalc->sync) { + pfalc->sync = 0; + chan->d.line_off++; + cpc_writeb(falcbase + card->hw.cpld_reg2, + cpc_readb(falcbase + card->hw.cpld_reg2) & + ~(CPLD_REG2_FALC_LED2 << (2*ch))); + } + } else { + if (!pfalc->sync) { + pfalc->sync = 1; + chan->d.line_on++; + cpc_writeb(falcbase + card->hw.cpld_reg2, + cpc_readb(falcbase + card->hw.cpld_reg2) | + (CPLD_REG2_FALC_LED2 << (2*ch))); + } } - } - /* Verify Remote Alarm */ - if (frs0 & FRS0_RRA) { - if (! pfalc->yellow_alarm) { - pfalc->yellow_alarm = 1; - pfalc->rai++; - if (pfalc->sync) { - // EVENT_RAI - falc_disable_comm(card, ch); - // EVENT_RAI + /* Verify Remote Alarm */ + if (frs0 & FRS0_RRA) { + if (!pfalc->yellow_alarm) { + pfalc->yellow_alarm = 1; + pfalc->rai++; + if (pfalc->sync) { + // EVENT_RAI + falc_disable_comm(card, ch); + // EVENT_RAI + } } + } else { + pfalc->yellow_alarm = 0; } - } else { - pfalc->yellow_alarm = 0; - } + } /* if !PC300_UNFRAMED */ - if ((pfalc->sync) && (!(pfalc->yellow_alarm))) { - if (! pfalc->active) { + if (pfalc->sync && !pfalc->yellow_alarm) { + if (!pfalc->active) { // EVENT_FALC_NORMAL if (pfalc->loop_active) { return; @@ -1214,6 +1293,7 @@ pfalc->ebc += counter; if (cpc_readb(falcbase + F_REG(LCR1, ch)) & LCR1_EPRM) { + mdelay (10); counter = cpc_readb(falcbase + F_REG(BECL, ch)); counter |= cpc_readb(falcbase + F_REG(BECH, ch)) << 8; pfalc->bec += counter; @@ -1231,6 +1311,16 @@ } } +/*---------------------------------------------------------------------------- + * falc_remote_loop + *---------------------------------------------------------------------------- + * Description: In the remote loopback mode the clock and data recovered + * from the line inputs RL1/2 or RDIP/RDIN are routed back + * to the line outputs XL1/2 or XDOP/XDON via the analog + * transmitter. As in normal mode they are processsed by + * the synchronizer and then sent to the system interface. + *---------------------------------------------------------------------------- + */ void falc_remote_loop(pc300_t *card, int ch, int loop_on) { @@ -1256,8 +1346,98 @@ cpc_writeb(falcbase + F_REG(LIM1, ch), cpc_readb(falcbase + F_REG(LIM1, ch)) & ~LIM1_RL); pfalc->sync = 0; - cpc_writeb(falcbase + CPLD_REG2, - cpc_readb(falcbase + CPLD_REG2) & + cpc_writeb(falcbase + card->hw.cpld_reg2, + cpc_readb(falcbase + card->hw.cpld_reg2) & + ~(CPLD_REG2_FALC_LED2 << (2*ch))); + pfalc->active = 0; + falc_issue_cmd(card, ch, CMDR_XRES); + pfalc->loop_active = 0; + } +} + +/*---------------------------------------------------------------------------- + * falc_local_loop + *---------------------------------------------------------------------------- + * Description: The local loopback mode disconnects the receive lines + * RL1/RL2 resp. RDIP/RDIN from the receiver. Instead of the + * signals coming from the line the data provided by system + * interface are routed through the analog receiver back to + * the system interface. The unipolar bit stream will be + * undisturbed transmitted on the line. Receiver and transmitter + * coding must be identical. + *---------------------------------------------------------------------------- + */ +void +falc_local_loop(pc300_t *card, int ch, int loop_on) +{ + pc300ch_t *chan = (pc300ch_t *)&card->chan[ch]; + falc_t *pfalc = (falc_t *)&chan->falc; + uclong falcbase = card->hw.falcbase; + + if (loop_on) { + cpc_writeb(falcbase + F_REG(LIM0, ch), + cpc_readb(falcbase + F_REG(LIM0, ch)) | LIM0_LL); + pfalc->loop_active = 1; + } + else { + cpc_writeb(falcbase + F_REG(LIM0, ch), + cpc_readb(falcbase + F_REG(LIM0, ch)) & ~LIM0_LL); + pfalc->loop_active = 0; + } +} + +/*---------------------------------------------------------------------------- + * falc_payload_loop + *---------------------------------------------------------------------------- + * Description: This routine allows to enable/disable payload loopback. + * When the payload loop is activated, the received 192 bits + * of payload data will be looped back to the transmit + * direction. The framing bits, CRC6 and DL bits are not + * looped. They are originated by the FALC-LH transmitter. + *---------------------------------------------------------------------------- + */ +void +falc_payload_loop(pc300_t *card, int ch, int loop_on) +{ + pc300ch_t *chan = (pc300ch_t *)&card->chan[ch]; + pc300chconf_t *conf = (pc300chconf_t *)&chan->conf; + falc_t *pfalc = (falc_t *)&chan->falc; + uclong falcbase = card->hw.falcbase; + + if (loop_on) { + // EVENT_FALC_ABNORMAL + if (conf->media == LINE_T1) { + /* Disable this interrupt as it may otherwise interfere with + other working boards. */ + cpc_writeb(falcbase + F_REG(IMR0, ch), + cpc_readb(falcbase + F_REG(IMR0, ch)) | IMR0_PDEN); + } + falc_disable_comm(card, ch); + // EVENT_FALC_ABNORMAL + cpc_writeb(falcbase + F_REG(FMR2, ch), + cpc_readb(falcbase + F_REG(FMR2, ch)) | FMR2_PLB); + if (conf->media == LINE_T1) { + cpc_writeb(falcbase + F_REG(FMR4, ch), + cpc_readb(falcbase + F_REG(FMR4, ch)) | FMR4_TM); + } else { + cpc_writeb(falcbase + F_REG(FMR5, ch), + cpc_readb(falcbase + F_REG(FMR5, ch)) | XSP_TT0); + } + falc_open_all_timeslots(card, ch); + pfalc->loop_active = 2; + } else { + cpc_writeb(falcbase + F_REG(FMR2, ch), + cpc_readb(falcbase + F_REG(FMR2, ch)) & ~FMR2_PLB); + if (conf->media == LINE_T1) { + cpc_writeb(falcbase + F_REG(FMR4, ch), + cpc_readb(falcbase + F_REG(FMR4, ch)) & ~FMR4_TM); + } else { + cpc_writeb(falcbase + F_REG(FMR5, ch), + cpc_readb(falcbase + F_REG(FMR5, ch)) & ~XSP_TT0); + } + pfalc->sync = 0; + cpc_writeb(falcbase + card->hw.cpld_reg2, + cpc_readb(falcbase + card->hw.cpld_reg2) & ~(CPLD_REG2_FALC_LED2 << (2*ch))); pfalc->active = 0; falc_issue_cmd(card, ch, CMDR_XRES); @@ -1265,15 +1445,213 @@ } } +/*---------------------------------------------------------------------------- + * turn_off_xlu + *---------------------------------------------------------------------------- + * Description: Turns XLU bit off in the proper register + *---------------------------------------------------------------------------- + */ +void +turn_off_xlu(pc300_t *card, int ch) +{ + pc300ch_t *chan = (pc300ch_t *)&card->chan[ch]; + pc300chconf_t *conf = (pc300chconf_t *)&chan->conf; + uclong falcbase = card->hw.falcbase; + + if (conf->media == LINE_T1) { + cpc_writeb(falcbase + F_REG(FMR5, ch), + cpc_readb(falcbase + F_REG(FMR5, ch)) & ~FMR5_XLU); + } else { + cpc_writeb(falcbase + F_REG(FMR3, ch), + cpc_readb(falcbase + F_REG(FMR3, ch)) & ~FMR3_XLU); + } +} + +/*---------------------------------------------------------------------------- + * turn_off_xld + *---------------------------------------------------------------------------- + * Description: Turns XLD bit off in the proper register + *---------------------------------------------------------------------------- + */ +void +turn_off_xld (pc300_t *card, int ch) +{ + pc300ch_t *chan = (pc300ch_t *)&card->chan[ch]; + pc300chconf_t *conf = (pc300chconf_t *)&chan->conf; + uclong falcbase = card->hw.falcbase; + + if (conf->media == LINE_T1) { + cpc_writeb(falcbase + F_REG(FMR5, ch), + cpc_readb(falcbase + F_REG(FMR5, ch)) & ~FMR5_XLD); + } else { + cpc_writeb(falcbase + F_REG(FMR3, ch), + cpc_readb(falcbase + F_REG(FMR3, ch)) & ~FMR3_XLD); + } +} + +/*---------------------------------------------------------------------------- + * falc_generate_loop_up_code + *---------------------------------------------------------------------------- + * Description: This routine writes the proper FALC chip register in order + * to generate a LOOP activation code over a T1/E1 line. + *---------------------------------------------------------------------------- + */ +void +falc_generate_loop_up_code (pc300_t *card, int ch) +{ + pc300ch_t *chan = (pc300ch_t *)&card->chan[ch]; + pc300chconf_t *conf = (pc300chconf_t *)&chan->conf; + falc_t *pfalc = (falc_t *)&chan->falc; + uclong falcbase = card->hw.falcbase; + + if (conf->media == LINE_T1) { + cpc_writeb(falcbase + F_REG(FMR5, ch), + cpc_readb(falcbase + F_REG(FMR5, ch)) | FMR5_XLU); + } else { + cpc_writeb(falcbase + F_REG(FMR3, ch), + cpc_readb(falcbase + F_REG(FMR3, ch)) | FMR3_XLU); + } + // EVENT_FALC_ABNORMAL + if (conf->media == LINE_T1) { + /* Disable this interrupt as it may otherwise interfere with + other working boards. */ + cpc_writeb(falcbase + F_REG(IMR0, ch), + cpc_readb(falcbase + F_REG(IMR0, ch)) | IMR0_PDEN); + } + falc_disable_comm(card, ch); + // EVENT_FALC_ABNORMAL + pfalc->loop_gen = 1; +} + +/*---------------------------------------------------------------------------- + * falc_generate_loop_down_code + *---------------------------------------------------------------------------- + * Description: This routine writes the proper FALC chip register in order + * to generate a LOOP deactivation code over a T1/E1 line. + *---------------------------------------------------------------------------- + */ +void +falc_generate_loop_down_code(pc300_t *card, int ch) +{ + pc300ch_t *chan = (pc300ch_t *)&card->chan[ch]; + pc300chconf_t *conf = (pc300chconf_t *)&chan->conf; + falc_t *pfalc = (falc_t *)&chan->falc; + uclong falcbase = card->hw.falcbase; + + if (conf->media == LINE_T1) { + cpc_writeb(falcbase + F_REG(FMR5, ch), + cpc_readb(falcbase + F_REG(FMR5, ch)) | FMR5_XLD); + } else { + cpc_writeb(falcbase + F_REG(FMR3, ch), + cpc_readb(falcbase + F_REG(FMR3, ch)) | FMR3_XLD); + } + pfalc->sync = 0; + cpc_writeb(falcbase + card->hw.cpld_reg2, + cpc_readb(falcbase + card->hw.cpld_reg2) & + ~(CPLD_REG2_FALC_LED2 << (2*ch))); + pfalc->active = 0; +//? falc_issue_cmd(card, ch, CMDR_XRES); + pfalc->loop_gen = 0; +} + +/*---------------------------------------------------------------------------- + * falc_pattern_test + *---------------------------------------------------------------------------- + * Description: This routine generates a pattern code and checks + * it on the reception side. + *---------------------------------------------------------------------------- + */ +void +falc_pattern_test(pc300_t *card, int ch, unsigned int activate) +{ + pc300ch_t *chan = (pc300ch_t *)&card->chan[ch]; + pc300chconf_t *conf = (pc300chconf_t *)&chan->conf; + falc_t *pfalc = (falc_t *)&chan->falc; + uclong falcbase = card->hw.falcbase; + + if (activate) { + pfalc->prbs = 1; + pfalc->bec = 0; + if (conf->media == LINE_T1) { + /* Disable local loop activation/deactivation detect */ + cpc_writeb(falcbase + F_REG(IMR3, ch), + cpc_readb(falcbase + F_REG(IMR3, ch)) | IMR3_LLBSC); + } else { + /* Disable local loop activation/deactivation detect */ + cpc_writeb(falcbase + F_REG(IMR1, ch), + cpc_readb(falcbase + F_REG(IMR1, ch)) | IMR1_LLBSC); + } + /* Activates generation and monitoring of PRBS + * (Pseudo Random Bit Sequence) */ + cpc_writeb(falcbase + F_REG(LCR1, ch), + cpc_readb(falcbase + F_REG(LCR1, ch)) | LCR1_EPRM | LCR1_XPRBS); + } else { + pfalc->prbs = 0; + /* Deactivates generation and monitoring of PRBS + * (Pseudo Random Bit Sequence) */ + cpc_writeb(falcbase + F_REG(LCR1, ch), + cpc_readb(falcbase + F_REG(LCR1, ch)) & ~(LCR1_EPRM | LCR1_XPRBS)); + if (conf->media == LINE_T1) { + /* Enable local loop activation/deactivation detect */ + cpc_writeb(falcbase + F_REG(IMR3, ch), + cpc_readb(falcbase + F_REG(IMR3, ch)) & ~IMR3_LLBSC); + } else { + /* Enable local loop activation/deactivation detect */ + cpc_writeb(falcbase + F_REG(IMR1, ch), + cpc_readb(falcbase + F_REG(IMR1, ch)) & ~IMR1_LLBSC); + } + } +} + +/*---------------------------------------------------------------------------- + * falc_pattern_test_error + *---------------------------------------------------------------------------- + * Description: This routine returns the bit error counter value + *---------------------------------------------------------------------------- + */ +ucshort falc_pattern_test_error(pc300_t *card, int ch) +{ + pc300ch_t *chan = (pc300ch_t *)&card->chan[ch]; + falc_t *pfalc = (falc_t *)&chan->falc; + + return (pfalc->bec); +} + /**********************************/ /*** Net Interface Routines ***/ /**********************************/ -int cpc_queue_xmit(struct sk_buff *skb, struct device *dev) +static void +cpc_trace (struct device *dev, struct sk_buff *skb_main, char rx_tx) +{ + struct sk_buff *skb; + + if ((skb = dev_alloc_skb(3 + skb_main->len)) == NULL) { + printk("%s: out of memory\n", dev->name); + return; + } + skb_put (skb, 3 + skb_main->len); + + skb->dev = dev; + skb->protocol = htons(ETH_P_CUST); + skb->mac.raw = skb->data; + skb->pkt_type = PACKET_HOST; + skb->len = 3 + skb_main->len; + + skb->data[0] = rx_tx; + skb->data[1] = ':'; + skb->data[2] = ' '; + memcpy(&skb->data[3], skb_main->data, skb_main->len); + + netif_rx(skb); +} + +int +cpc_queue_xmit(struct sk_buff *skb, struct device *dev) { pc300dev_t *d = (pc300dev_t *)dev->priv; pc300ch_t *chan = (pc300ch_t *)d->chan; pc300_t *card = (pc300_t *)chan->card; - struct enet_statistics *stats = &d->hdlc->stats; + struct net_device_stats *stats = &d->hdlc->stats; int ch = chan->channel; volatile pcsca_bd_t *ptdescr; uclong flags; @@ -1281,6 +1659,38 @@ int i; #endif + if (chan->conf.monitor) { + /* In monitor mode no Tx is done: ignore packet */ + dev_kfree_skb(skb); + return 0; + } else if (!(dev->flags & IFF_RUNNING)) { + /* DCD must be OFF: drop packet */ + dev_kfree_skb(skb); + stats->tx_errors++; + stats->tx_carrier_errors++; + return 0; + } else if (cpc_readb(card->hw.scabase + M_REG(ST3, ch)) & ST3_DCD) { + printk("%s: DCD is OFF. Going admnistrative down.\n", dev->name); + stats->tx_errors++; + stats->tx_carrier_errors++; + dev_kfree_skb(skb); + dev->flags &= ~IFF_RUNNING; + CPC_LOCK(card, flags); + if (d->tx_skb) { + dev_kfree_skb(d->tx_skb); + d->tx_skb = NULL; + } + cpc_writeb(card->hw.scabase + M_REG(CMD, ch), CMD_TX_BUF_CLR); + if (card->hw.type == PC300_TE) { + cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2, + cpc_readb(card->hw.falcbase + card->hw.cpld_reg2) & + ~(CPLD_REG2_FALC_LED1 << (2*ch))); + } + dev->tbusy = 0; + CPC_UNLOCK(card, flags); + return 0; + } + if (dev->tbusy) { ucchar ilar; @@ -1303,8 +1713,8 @@ d->tx_skb = NULL; } if (card->hw.type == PC300_TE) { - cpc_writeb(card->hw.falcbase + CPLD_REG2, - cpc_readb(card->hw.falcbase + CPLD_REG2) & + cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2, + cpc_readb(card->hw.falcbase + card->hw.cpld_reg2) & ~(CPLD_REG2_FALC_LED1 << (2*ch))); } CPC_UNLOCK(card, flags); @@ -1345,6 +1755,9 @@ printk("\n"); #endif + if (d->trace_on) { + cpc_trace (dev, skb, 'T'); + } d->tx_skb = skb; dev->trans_start = jiffies; @@ -1355,8 +1768,8 @@ cpc_writeb(card->hw.scabase + M_REG(CMD, ch), CMD_TX_ENA); cpc_writeb(card->hw.scabase + DSR_TX(ch), DSR_DE); if (card->hw.type == PC300_TE) { - cpc_writeb(card->hw.falcbase + CPLD_REG2, - cpc_readb(card->hw.falcbase + CPLD_REG2) | + cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2, + cpc_readb(card->hw.falcbase + card->hw.cpld_reg2) | (CPLD_REG2_FALC_LED1 << (2*ch))); } CPC_UNLOCK(card, flags); @@ -1371,7 +1784,7 @@ pc300dev_t *d = (pc300dev_t *)dev->priv; pc300ch_t *chan = (pc300ch_t *)d->chan; pc300_t *card = (pc300_t *)chan->card; - struct enet_statistics *stats = &hdlc->stats; + struct net_device_stats *stats = &hdlc->stats; int ch = chan->channel; #ifdef PC300_DEBUG_RX int i; @@ -1416,6 +1829,9 @@ printk(" %02x", *(skb->data + i)); printk("\n"); #endif + if (d->trace_on) { + cpc_trace (dev, skb, 'R'); + } switch(hdlc->mode & ~MODE_SOFT) { #ifdef CONFIG_PC300_X25 @@ -1591,6 +2007,7 @@ hdlc_device *hdlc = d->hdlc; struct device *dev = hdlc_to_dev(hdlc); + spin_lock(&card->card_lock); dev->interrupt = 1; /**** Reception ****/ @@ -1619,14 +2036,16 @@ if (status & IR0_DRX(IR0_DMIB, ch)) { if (drx_stat & DSR_EOM) { if (card->hw.type == PC300_TE) { - cpc_writeb(card->hw.falcbase + CPLD_REG2, - cpc_readb(card->hw.falcbase + CPLD_REG2) + cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2, + cpc_readb(card->hw.falcbase + + card->hw.cpld_reg2) | (CPLD_REG2_FALC_LED1 << (2*ch))); } cpc_net_rx(hdlc); if (card->hw.type == PC300_TE) { - cpc_writeb(card->hw.falcbase + CPLD_REG2, - cpc_readb(card->hw.falcbase + CPLD_REG2) + cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2, + cpc_readb(card->hw.falcbase + + card->hw.cpld_reg2) & ~(CPLD_REG2_FALC_LED1 << (2*ch))); } } @@ -1651,8 +2070,9 @@ CMD_TX_BUF_CLR); } if (card->hw.type == PC300_TE) { - cpc_writeb(card->hw.falcbase + CPLD_REG2, - cpc_readb(card->hw.falcbase + CPLD_REG2) + cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2, + cpc_readb(card->hw.falcbase + + card->hw.cpld_reg2) & ~(CPLD_REG2_FALC_LED1 << (2*ch))); } if (d->tx_skb) { @@ -1676,8 +2096,9 @@ if (status & IR0_DTX(IR0_DMIB, ch)) { if (dtx_stat & DSR_EOM) { if (card->hw.type == PC300_TE) { - cpc_writeb(card->hw.falcbase + CPLD_REG2, - cpc_readb(card->hw.falcbase + CPLD_REG2) + cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2, + cpc_readb(card->hw.falcbase + + card->hw.cpld_reg2) & ~(CPLD_REG2_FALC_LED1 << (2*ch))); } if (d->tx_skb) { @@ -1695,7 +2116,34 @@ } } } + + /**** MSCI ****/ + if (status & IR0_M(IR0_RXINTA, ch)) { + ucchar st1 = cpc_readb(scabase + M_REG(ST1, ch)); + + /* Clear MSCI interrupts */ + cpc_writeb(scabase + M_REG(ST1, ch), st1); + +#ifdef PC300_DEBUG_INTR + printk("sca_intr: MSCI intr (st=0x%08lx, st1=0x%02x)\n", + status, st1); +#endif + if (st1 & ST1_CDCD) { /* DCD changed */ + if (cpc_readb(scabase + M_REG(ST3, ch)) & ST3_DCD) { + printk("%s: DCD is OFF. Going administrative down.\n", + dev->name); + dev->flags &= ~IFF_RUNNING; + card->chan[ch].d.line_off++; + } else { /* DCD = 1 */ + printk("%s: DCD is ON. Going administrative up.\n", + dev->name); + dev->flags |= IFF_RUNNING; + card->chan[ch].d.line_on++; + } + } + } dev->interrupt = 0; + spin_unlock(&card->card_lock); } if (++intr_count == 10) /* Too much work at this board. Force exit */ @@ -1713,14 +2161,14 @@ if (((cpc_readb(falcbase + F_REG(LCR1, ch)) & LCR1_XPRBS) == 0) && !pfalc->loop_gen) { if (frs1 & FRS1_LLBDD) { - // A Line Loop Back Deactuation signal detected + // A Line Loop Back Deactivation signal detected if (pfalc->loop_active) { falc_remote_loop(card, ch, 0); } } else { if ((frs1 & FRS1_LLBAD) && ((cpc_readb(falcbase + F_REG(LCR1, ch)) & LCR1_EPRM) == 0)) { - // A Line Loop Back Actuation signal detected + // A Line Loop Back Activation signal detected if (!pfalc->loop_active) { falc_remote_loop(card, ch, 1); } @@ -1739,14 +2187,14 @@ if (((cpc_readb(falcbase + F_REG(LCR1, ch)) & LCR1_XPRBS) == 0) && !pfalc->loop_gen) { if (rsp & RSP_LLBDD) { - // A Line Loop Back Deactuation signal detected + // A Line Loop Back Deactivation signal detected if (pfalc->loop_active) { falc_remote_loop(card, ch, 0); } } else { if ((rsp & RSP_LLBAD) && ((cpc_readb(falcbase + F_REG(LCR1, ch)) & LCR1_EPRM) == 0)) { - // A Line Loop Back Actuation signal detected + // A Line Loop Back Activation signal detected if (!pfalc->loop_active) { falc_remote_loop(card, ch, 1); } @@ -2056,10 +2504,12 @@ pc300dev_t *d = (pc300dev_t *)dev->priv; pc300ch_t *chan = (pc300ch_t *)d->chan; pc300_t *card = (pc300_t *)chan->card; + pc300conf_t conf_aux; pc300chconf_t *conf = (pc300chconf_t *)&chan->conf; int ch = chan->channel; int value; void *arg = (void *) ifr->ifr_data; + uclong scabase = card->hw.scabase; if(!capable(CAP_NET_ADMIN)) return -EPERM; @@ -2067,14 +2517,24 @@ switch(cmd) { case SIOCGPC300CONF: conf->proto = hdlc->mode; - if (!arg || copy_to_user(arg, conf, sizeof(pc300chconf_t))) + memcpy(&conf_aux.conf, conf, sizeof(pc300chconf_t)); + memcpy(&conf_aux.hw, &card->hw, sizeof(pc300hw_t)); + if (!arg || copy_to_user(arg, &conf_aux, sizeof(pc300conf_t))) return -EINVAL; return 0; case SIOCSPC300CONF: if (!suser()) return -EPERM; - if (!arg || copy_from_user(conf, arg, sizeof(pc300chconf_t))) + if (!arg || copy_from_user(&conf_aux.conf, arg, + sizeof(pc300chconf_t))) return -EINVAL; + if (card->hw.cpld_id < 0x02 && + conf_aux.conf.fr_mode == PC300_FR_UNFRAMED) { + /* CPLD_ID < 0x02 doesn't support Unframed E1 */ + return -EINVAL; + } + memcpy(conf, &conf_aux.conf, sizeof(pc300chconf_t)); + hdlc->mode = conf->proto; return 0; case SIOCGPC300STATUS: cpc_sca_status(card, ch); @@ -2113,7 +2573,135 @@ conf->clkrate = value; return 0; } - + + case SIOCGPC300UTILSTATS: + { + pc300stats_t pc300stats; + + memset(&pc300stats, 0, sizeof(pc300stats_t)); + pc300stats.hw_type = card->hw.type; + pc300stats.line_on = card->chan[ch].d.line_on; + pc300stats.line_off = card->chan[ch].d.line_off; + memcpy(&pc300stats.gen_stats, &d->hdlc->stats, + sizeof(struct net_device_stats)); + if (card->hw.type == PC300_TE) + memcpy(&pc300stats.te_stats, &chan->falc, sizeof(falc_t)); + if (!arg || copy_to_user(arg, &pc300stats, sizeof(pc300stats_t))) + return -EINVAL; + return 0; + } + + case SIOCGPC300UTILSTATUS: + { + struct pc300status pc300status; + + pc300status.hw_type = card->hw.type; + if (card->hw.type == PC300_TE) { + pc300status.te_status.sync = chan->falc.sync; + pc300status.te_status.red_alarm = chan->falc.red_alarm; + pc300status.te_status.blue_alarm = chan->falc.blue_alarm; + pc300status.te_status.loss_fa = chan->falc.loss_fa; + pc300status.te_status.yellow_alarm = chan->falc.yellow_alarm; + pc300status.te_status.loss_mfa = chan->falc.loss_mfa; + pc300status.te_status.prbs = chan->falc.prbs; + } else { + pc300status.gen_status.dcd = + !(cpc_readb(scabase + M_REG(ST3, ch)) & ST3_DCD); + pc300status.gen_status.cts = + !(cpc_readb(scabase + M_REG(ST3, ch)) & ST3_CTS); + pc300status.gen_status.rts = + !(cpc_readb(scabase + M_REG(CTL, ch)) & CTL_RTS); + pc300status.gen_status.dtr = + !(cpc_readb(scabase + M_REG(CTL, ch)) & CTL_DTR); + /* There is no DSR in HD64572 */ + } + if (!arg || copy_to_user(arg, &pc300status, sizeof(pc300status_t))) + return -EINVAL; + return 0; + } + + case SIOCSPC300TRACE: + /* Sets/resets a trace_flag for the respective device */ + if (!arg || copy_from_user(&d->trace_on, arg, + sizeof(unsigned char))) + return -EINVAL; + return 0; + + case SIOCSPC300LOOPBACK: + { + struct pc300loopback pc300loop; + + /* TE boards only */ + if (card->hw.type != PC300_TE) + return -EINVAL; + + if (!arg || copy_from_user(&pc300loop, arg, + sizeof(pc300loopback_t))) + return -EINVAL; + switch (pc300loop.loop_type) { + case PC300LOCLOOP: /* Turn the local loop on/off */ + falc_local_loop(card, ch, pc300loop.loop_on); + return 0; + + case PC300REMLOOP: /* Turn the remote loop on/off */ + falc_remote_loop(card, ch, pc300loop.loop_on); + return 0; + + case PC300PAYLOADLOOP: /* Turn the payload loop on/off */ + falc_payload_loop(card, ch, pc300loop.loop_on); + return 0; + + case PC300GENLOOPUP: /* Generate loop UP */ + if (pc300loop.loop_on) { + falc_generate_loop_up_code(card, ch); + } else { + turn_off_xlu(card, ch); + } + return 0; + + case PC300GENLOOPDOWN: /* Generate loop DOWN */ + if (pc300loop.loop_on) { + falc_generate_loop_down_code(card, ch); + } else { + turn_off_xld(card, ch); + } + return 0; + + default: + return -EINVAL; + } + } + + case SIOCSPC300PATTERNTEST: + /* Turn the pattern test on/off and show the errors counter */ + { + struct pc300patterntst pc300patrntst; + + /* TE boards only */ + if (card->hw.type != PC300_TE) + return -EINVAL; + + if (card->hw.cpld_id < 0x02) { + /* CPLD_ID < 0x02 doesn't support pattern test */ + return -EINVAL; + } + if (!arg || copy_from_user(&pc300patrntst, arg, + sizeof(pc300patterntst_t))) + return -EINVAL; + if (pc300patrntst.patrntst_on == 2) { + if (chan->falc.prbs == 0) { + falc_pattern_test(card, ch, 1); + } + pc300patrntst.num_errors = falc_pattern_test_error(card, ch); + if (!arg || copy_to_user(arg, &pc300patrntst, + sizeof(pc300patterntst_t))) + return -EINVAL; + } else { + falc_pattern_test(card, ch, pc300patrntst.patrntst_on); + } + return 0; + } + default: switch(hdlc->mode & ~MODE_SOFT) { #ifdef CONFIG_PC300_X25 @@ -2203,7 +2791,7 @@ case PC300_RSV: case PC300_X21: if (clkrate) { - /* Calculate the clkrate rate parameters */ + /* Calculate the clkrate parameters */ tmc = clock_rate_calc(clkrate, card->hw.clock, &br); cpc_writeb(scabase + M_REG(TMCT, ch), tmc); cpc_writeb(scabase + M_REG(TXS, ch), (TXS_DTRXC|TXS_IBRG|br)); @@ -2241,10 +2829,14 @@ /* Enable Interrupts */ cpc_writel(scabase + IER0, - cpc_readl(scabase + IER0) | - IR0_DRX(IR0_EFT|IR0_DMIA|IR0_DMIB, ch) | - IR0_DTX(IR0_EFT|IR0_DMIA|IR0_DMIB, ch) ); - + cpc_readl(scabase + IER0) | + IR0_M(IR0_RXINTA, ch) | + IR0_DRX(IR0_EFT|IR0_DMIA|IR0_DMIB, ch) | + IR0_DTX(IR0_EFT|IR0_DMIA|IR0_DMIB, ch)); + cpc_writel(scabase + M_REG(IE0, ch), + cpc_readl(scabase + M_REG(IE0, ch)) | IE0_RXINTA); + cpc_writel(scabase + M_REG(IE1, ch), + cpc_readl(scabase + M_REG(IE1, ch)) | IE1_CDCD); return 0; } @@ -2355,17 +2947,17 @@ cpc_writeb(card->hw.scabase + M_REG(CMD, ch), CMD_CH_RST); if (card->hw.type == PC300_TE) { memset(pfalc, 0, sizeof(falc_t)); - cpc_writeb(card->hw.falcbase + CPLD_REG2, - cpc_readb(card->hw.falcbase + CPLD_REG2) & + cpc_writeb(card->hw.falcbase + card->hw.cpld_reg2, + cpc_readb(card->hw.falcbase + card->hw.cpld_reg2) & ~((CPLD_REG2_FALC_TX_CLK | CPLD_REG2_FALC_RX_CLK | CPLD_REG2_FALC_LED2) << (2*ch))); /* Reset the FALC chip */ - cpc_writeb(card->hw.falcbase + CPLD_REG1, - cpc_readb(card->hw.falcbase + CPLD_REG1) | + cpc_writeb(card->hw.falcbase + card->hw.cpld_reg1, + cpc_readb(card->hw.falcbase + card->hw.cpld_reg1) | (CPLD_REG1_FALC_RESET << (2*ch))); udelay(10000); - cpc_writeb(card->hw.falcbase + CPLD_REG1, - cpc_readb(card->hw.falcbase + CPLD_REG1) & + cpc_writeb(card->hw.falcbase + card->hw.cpld_reg1, + cpc_readb(card->hw.falcbase + card->hw.cpld_reg1) & ~(CPLD_REG1_FALC_RESET << (2*ch))); } } @@ -2664,14 +3256,35 @@ /* Set board type */ switch(device_id) { case PCI_DEVICE_ID_PC300_TE_1: - case PCI_DEVICE_ID_PC300_TE_2: + case PCI_DEVICE_ID_PC300_TE_2: { + ucchar reg1; + card->hw.type = PC300_TE; + + /* Check CPLD version */ + reg1 = cpc_readb(card->hw.falcbase + CPLD_REG1); + cpc_writeb(card->hw.falcbase + CPLD_REG1, (reg1 + 0x5a)); + if (cpc_readb(card->hw.falcbase + CPLD_REG1) == reg1) { + /* New CPLD */ + card->hw.cpld_id = cpc_readb(card->hw.falcbase + + CPLD_ID_REG); + card->hw.cpld_reg1 = CPLD_V2_REG1; + card->hw.cpld_reg2 = CPLD_V2_REG2; + } else { + /* old CPLD */ + card->hw.cpld_id = 0; + card->hw.cpld_reg1 = CPLD_REG1; + card->hw.cpld_reg2 = CPLD_REG2; + cpc_writeb(card->hw.falcbase + CPLD_REG1, reg1); + } + /* Enable the board's global clock */ - cpc_writeb(card->hw.falcbase + CPLD_REG1, - cpc_readb(card->hw.falcbase + CPLD_REG1) | + cpc_writeb(card->hw.falcbase + card->hw.cpld_reg1, + cpc_readb(card->hw.falcbase + + card->hw.cpld_reg1) | CPLD_REG1_GLOBAL_CLK); break; - + } case PCI_DEVICE_ID_PC300_RX_1: case PCI_DEVICE_ID_PC300_RX_2: default: @@ -2765,6 +3378,9 @@ d->chan = chan; d->tx_skb = NULL; + d->trace_on = 0; + d->line_on = 0; + d->line_off = 0; d->hdlc = (hdlc_device *) kmalloc(sizeof(hdlc_device), GFP_KERNEL); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/pc300.h linux.20p6/drivers/net/pc300.h --- linux.vanilla/drivers/net/pc300.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/net/pc300.h Mon Jun 25 14:49:20 2001 @@ -0,0 +1,466 @@ +/* + * pc300.h Cyclades-PC300(tm) Kernel API Definitions. + * + * Author: Ivan Passos + * + * Copyright: (c) 1999-2001 Cyclades Corp. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version + * 2 of the License, or (at your option) any later version. + * + * $Log: pc300.h,v $ + * Revision 2.5 2001/03/02 daniela + * Created struct pc300conf, to provide the hardware information to pc300util. + * + * Revision 2.4 2000/12/22 daniela + * Structures and defines to support pc300util: statistics, status, + * loopback tests, trace. + * + * Revision 2.3 2000/09/28 ivan + * Changed location of include files. + * + * Revision 2.2 2000/06/23 ivan + * Inclusion of 'loopback' field on structure 'pc300chconf', to allow + * loopback mode operation. + * + * Revision 2.1 2000/06/09 ivan + * Changes to use the new generic HDLC layer in the driver. + * + * Revision 2.0 2000/03/27 ivan + * Added support for the PC300/TE cards. + * + * Revision 1.1 2000/01/31 ivan + * Replaced 'pc300[drv|sca].h' former PC300 driver include files. + * + * Revision 1.0 1999/12/16 ivan + * First official release. + * Inclusion of 'nchan' field on structure 'pc300hw', to allow variable + * number of ports per card. + * Inclusion of 'if_ptr' field on structure 'pc300dev'. + * + * Revision 0.6 1999/11/17 ivan + * Changed X.25-specific function names to comply with adopted convention. + * + * Revision 0.5 1999/11/16 Daniela Squassoni + * X.25 support. + * + * Revision 0.4 1999/11/15 ivan + * Inclusion of 'clock' field on structure 'pc300hw'. + * + * Revision 0.3 1999/11/10 ivan + * IOCTL name changing. + * Inclusion of driver function prototypes. + * + * Revision 0.2 1999/11/03 ivan + * Inclusion of 'tx_skb' and union 'ifu' on structure 'pc300dev'. + * + * Revision 0.1 1999/01/15 ivan + * Initial version. + * + */ + +#ifndef _PC300_H +#define _PC300_H + +#ifndef __HDLC_H +#include +#endif +#ifndef _HD64572_H +#include "hd64572.h" +#endif +#ifndef _FALC_LH_H +#include "falc-lh.h" +#endif + +#ifndef CY_TYPES +#define CY_TYPES +#if defined(__alpha__) +typedef unsigned long ucdouble; /* 64 bits, unsigned */ +typedef unsigned int uclong; /* 32 bits, unsigned */ +#else +typedef unsigned long uclong; /* 32 bits, unsigned */ +#endif +typedef unsigned short ucshort; /* 16 bits, unsigned */ +typedef unsigned char ucchar; /* 8 bits, unsigned */ +#endif /* CY_TYPES */ + +#define PC300_DEVNAME "hdlc" /* Dev. name base (for hdlc0, hdlc1, etc.) */ +#define PC300_MAXINDEX 100 /* Max dev. name index (the '0' in hdlc0) */ + +#define PC300_MAXCARDS 4 /* Max number of cards per system */ +#define PC300_MAXCHAN 2 /* Number of channels per card */ + +#define PC300_PLX_WIN 0x80 /* PLX control window size (128b) */ +#define PC300_RAMSIZE 0x80000 /* RAM window size (512Kb) */ +#define PC300_SCASIZE 0x400 /* SCA window size (1Kb) */ +#define PC300_FALCSIZE 0x400 /* FALC window size (1Kb) */ + +#define PC300_OSC_CLOCK 24576000 +#define PC300_PCI_CLOCK 33000000 + +#define BD_DEF_LEN 0x0800 /* DMA buffer length (2KB) */ +#define DMA_TX_MEMSZ 0x8000 /* Total DMA Tx memory size (32KB/ch) */ +#define DMA_RX_MEMSZ 0x10000 /* Total DMA Rx memory size (64KB/ch) */ + +#define N_DMA_TX_BUF (DMA_TX_MEMSZ / BD_DEF_LEN) /* DMA Tx buffers */ +#define N_DMA_RX_BUF (DMA_RX_MEMSZ / BD_DEF_LEN) /* DMA Rx buffers */ + +/* DMA Buffer Offsets */ +#define DMA_TX_BASE ((N_DMA_TX_BUF + N_DMA_RX_BUF) * \ + PC300_MAXCHAN * sizeof(pcsca_bd_t)) +#define DMA_RX_BASE (DMA_TX_BASE + PC300_MAXCHAN*DMA_TX_MEMSZ) + +/* DMA Descriptor Offsets */ +#define DMA_TX_BD_BASE 0x0000 +#define DMA_RX_BD_BASE (DMA_TX_BD_BASE + ((PC300_MAXCHAN*DMA_TX_MEMSZ / \ + BD_DEF_LEN) * sizeof(pcsca_bd_t))) + +/* DMA Descriptor Macros */ +#define TX_BD_ADDR(chan, n) (DMA_TX_BD_BASE + \ + ((N_DMA_TX_BUF*chan) + n) * sizeof(pcsca_bd_t)) +#define RX_BD_ADDR(chan, n) (DMA_RX_BD_BASE + \ + ((N_DMA_RX_BUF*chan) + n) * sizeof(pcsca_bd_t)) + +/* Macro to access the FALC registers (TE only) */ +#define F_REG(reg, chan) (0x200*(chan) + ((reg)<<2)) + +/*************************************** + * Memory access functions/macros * + * (required to support Alpha systems) * + ***************************************/ +#ifdef __KERNEL__ +#define cpc_writeb(port,val) {writeb((ucchar)(val),(ulong)(port)); mb();} +#define cpc_writew(port,val) {writew((ushort)(val),(ulong)(port)); mb();} +#define cpc_writel(port,val) {writel((uclong)(val),(ulong)(port)); mb();} + +#define cpc_readb(port) readb(port) +#define cpc_readw(port) readw(port) +#define cpc_readl(port) readl(port) + +#else /* __KERNEL__ */ +#define cpc_writeb(port,val) (*(volatile ucchar *)(port) = (ucchar)(val)) +#define cpc_writew(port,val) (*(volatile ucshort *)(port) = (ucshort)(val)) +#define cpc_writel(port,val) (*(volatile uclong *)(port) = (uclong)(val)) + +#define cpc_readb(port) (*(volatile ucchar *)(port)) +#define cpc_readw(port) (*(volatile ucshort *)(port)) +#define cpc_readl(port) (*(volatile uclong *)(port)) + +#endif /* __KERNEL__ */ + +/****** Data Structures *****************************************************/ + +/* + * RUNTIME_9050 - PLX PCI9050-1 local configuration and shared runtime + * registers. This structure can be used to access the 9050 registers + * (memory mapped). + */ +struct RUNTIME_9050 { + uclong loc_addr_range[4]; /* 00-0Ch : Local Address Ranges */ + uclong loc_rom_range; /* 10h : Local ROM Range */ + uclong loc_addr_base[4]; /* 14-20h : Local Address Base Addrs */ + uclong loc_rom_base; /* 24h : Local ROM Base */ + uclong loc_bus_descr[4]; /* 28-34h : Local Bus Descriptors */ + uclong rom_bus_descr; /* 38h : ROM Bus Descriptor */ + uclong cs_base[4]; /* 3C-48h : Chip Select Base Addrs */ + uclong intr_ctrl_stat; /* 4Ch : Interrupt Control/Status */ + uclong init_ctrl; /* 50h : EEPROM ctrl, Init Ctrl, etc */ +}; + +#define PLX_9050_LINT1_ENABLE 0x01 +#define PLX_9050_LINT1_POL 0x02 +#define PLX_9050_LINT1_STATUS 0x04 +#define PLX_9050_LINT2_ENABLE 0x08 +#define PLX_9050_LINT2_POL 0x10 +#define PLX_9050_LINT2_STATUS 0x20 +#define PLX_9050_INTR_ENABLE 0x40 +#define PLX_9050_SW_INTR 0x80 + +/* Masks to access the init_ctrl PLX register */ +#define PC300_CLKSEL_MASK (0x00000004UL) +#define PC300_CHMEDIA_MASK(chan) (0x00000020UL<<(chan*3)) +#define PC300_CTYPE_MASK (0x00000800UL) + +/* CPLD Registers (base addr = falcbase, TE only) */ +/* CPLD v. 0 */ +#define CPLD_REG1 0x140 /* Chip resets, DCD/CTS status */ +#define CPLD_REG2 0x144 /* Clock enable , LED control */ +/* CPLD v. 2 or higher */ +#define CPLD_V2_REG1 0x100 /* Chip resets, DCD/CTS status */ +#define CPLD_V2_REG2 0x104 /* Clock enable , LED control */ +#define CPLD_ID_REG 0x108 /* CPLD version */ + +/* CPLD Register bit description: for the FALC bits, they should always be + set based on the channel (use (bit<<(2*ch)) to access the correct bit for + that channel) */ +#define CPLD_REG1_FALC_RESET 0x01 +#define CPLD_REG1_SCA_RESET 0x02 +#define CPLD_REG1_GLOBAL_CLK 0x08 +#define CPLD_REG1_FALC_DCD 0x10 +#define CPLD_REG1_FALC_CTS 0x20 + +#define CPLD_REG2_FALC_TX_CLK 0x01 +#define CPLD_REG2_FALC_RX_CLK 0x02 +#define CPLD_REG2_FALC_LED1 0x10 +#define CPLD_REG2_FALC_LED2 0x20 + +/* Structure with FALC-related fields (TE only) */ +#define PC300_FALC_MAXLOOP 0x0000ffff /* for falc_issue_cmd() */ + +typedef struct falc { + ucchar sync; /* If true FALC is synchronized */ + ucchar active; /* if TRUE then already active */ + ucchar loop_active; /* if TRUE a line loopback UP was received */ + ucchar loop_gen; /* if TRUE a line loopback UP was issued */ + + ucchar num_channels; + ucchar offset; /* 1 for T1, 0 for E1 */ + ucchar full_bandwidth; + + ucchar xmb_cause; + ucchar multiframe_mode; + + /* Statistics */ + ucshort pden; /* Pulse Density violation count */ + ucshort los; /* Loss of Signal count */ + ucshort losr; /* Loss of Signal recovery count */ + ucshort lfa; /* Loss of frame alignment count */ + ucshort farec; /* Frame Alignment Recovery count */ + ucshort lmfa; /* Loss of multiframe alignment count */ + ucshort ais; /* Remote Alarm indication Signal count */ + ucshort sec; /* One-second timer */ + ucshort es; /* Errored second */ + ucshort rai; /* remote alarm received */ + ucshort bec; + ucshort fec; + ucshort cvc; + ucshort cec; + ucshort ebc; + + /* Status */ + ucchar red_alarm; + ucchar blue_alarm; + ucchar loss_fa; + ucchar yellow_alarm; + ucchar loss_mfa; + ucchar prbs; +} falc_t; + +typedef struct falc_status { + ucchar sync; /* If true FALC is synchronized */ + ucchar red_alarm; + ucchar blue_alarm; + ucchar loss_fa; + ucchar yellow_alarm; + ucchar loss_mfa; + ucchar prbs; +} falc_status_t; + +typedef struct rsv_x21_status { + ucchar dcd; + ucchar dsr; + ucchar cts; + ucchar rts; + ucchar dtr; +} rsv_x21_status_t; + +typedef struct pc300stats { + int hw_type; + uclong line_on; + uclong line_off; + struct net_device_stats gen_stats; + falc_t te_stats; +} pc300stats_t; + +typedef struct pc300status { + int hw_type; + rsv_x21_status_t gen_status; + falc_status_t te_status; +} pc300status_t; + +typedef struct pc300loopback { + char loop_type; + char loop_on; +} pc300loopback_t; + +typedef struct pc300patterntst { + char patrntst_on; /* 0 - off; 1 - on; 2 - read num_errors */ + ucshort num_errors; +} pc300patterntst_t; + +typedef struct pc300dev { + void *if_ptr; /* General purpose pointer */ + struct pc300ch *chan; + ucchar trace_on; + uclong line_on; /* DCD(X.21, RSV) / sync(TE) change counters */ + uclong line_off; +#ifdef __KERNEL__ + char name[16]; + void *private; + hdlc_device *hdlc; + struct sk_buff *tx_skb; +#endif /* __KERNEL__ */ +}pc300dev_t; + +typedef struct pc300hw { + int type; /* RSV, X21, etc. */ + int nchan; /* number of channels */ + int irq; /* interrupt request level */ + uclong clock; /* Board clock */ + ucchar cpld_id; /* CPLD ID (TE only) */ + ucshort cpld_reg1; /* CPLD reg 1 (TE only) */ + ucshort cpld_reg2; /* CPLD reg 2 (TE only) */ + uclong plxphys; /* PLX registers MMIO base (physical) */ + uclong plxbase; /* PLX registers MMIO base (virtual) */ + uclong plxsize; /* PLX registers MMIO size */ + uclong scaphys; /* SCA registers MMIO base (physical) */ + uclong scabase; /* SCA registers MMIO base (virtual) */ + uclong scasize; /* SCA registers MMIO size */ + uclong ramphys; /* On-board RAM MMIO base (physical) */ + uclong rambase; /* On-board RAM MMIO base (virtual) */ + uclong ramsize; /* On-board RAM MMIO size */ + uclong falcphys; /* FALC registers MMIO base (physical) */ + uclong falcbase; /* FALC registers MMIO base (virtual) */ + uclong falcsize; /* FALC registers MMIO size */ +} pc300hw_t; + +typedef struct pc300chconf { + ucchar media; /* HW media (RS232, V.35, etc.) */ + uclong proto; /* Protocol (PPP, X.25, etc.) */ + uclong clkrate; /* Clock rate (in bps, 0 = ext. clock) */ + ucchar loopback; /* Loopback mode */ + ucchar monitor; /* Monitor mode (0 = off, !0 = on) */ + + /* TE-specific parameters */ + ucchar lcode; /* Line Code (AMI, B8ZS, etc.) */ + ucchar fr_mode; /* Frame Mode (ESF, D4, etc.) */ + ucchar lbo; /* Line Build Out */ + ucchar rx_sens; /* Rx Sensitivity (long- or short-haul) */ + uclong tslot_bitmap; /* bit[i]=1 => timeslot _i_ is active */ +} pc300chconf_t; + +typedef struct pc300ch { + struct pc300 *card; + int channel; + pc300dev_t d; + pc300chconf_t conf; + ucchar tx_first_bd; /* First TX DMA block descr. w/ data */ + ucchar tx_next_bd; /* Next free TX DMA block descriptor */ + ucchar rx_first_bd; /* First free RX DMA block descriptor */ + ucchar rx_last_bd; /* Last free RX DMA block descriptor */ + falc_t falc; /* FALC structure (TE only) */ +} pc300ch_t; + +typedef struct pc300 { + pc300hw_t hw; /* hardware config. */ + pc300ch_t chan[PC300_MAXCHAN]; +#ifdef __KERNEL__ + spinlock_t card_lock; +#endif /* __KERNEL__ */ +} pc300_t; + +typedef struct pc300conf { + pc300hw_t hw; + pc300chconf_t conf; +} pc300conf_t; + +/* DEV ioctl() commands */ +#define N_SPPP_IOCTLS 2 + +enum pc300_ioctl_cmds { + SIOCCPCRESERVED = (SIOCDEVPRIVATE + N_SPPP_IOCTLS), + SIOCGPC300CONF, + SIOCSPC300CONF, + SIOCGPC300STATUS, + SIOCGPC300FALCSTATUS, + SIOCGPC300UTILSTATS, + SIOCGPC300UTILSTATUS, + SIOCSPC300TRACE, + SIOCSPC300LOOPBACK, + SIOCSPC300PATTERNTEST, +}; + +/* Loopback types - PC300/TE boards */ +enum pc300_loopback_cmds { + PC300LOCLOOP = 1, + PC300REMLOOP, + PC300PAYLOADLOOP, + PC300GENLOOPUP, + PC300GENLOOPDOWN, +}; + +/* Control Constant Definitions */ +#define PC300_RSV 0x01 +#define PC300_X21 0x02 +#define PC300_TE 0x03 + +#define PC300_LC_AMI 0x01 +#define PC300_LC_B8ZS 0x02 +#define PC300_LC_NRZ 0x03 +#define PC300_LC_HDB3 0x04 + +/* Framing (T1) */ +#define PC300_FR_ESF 0x01 +#define PC300_FR_D4 0x02 +#define PC300_FR_ESF_JAPAN 0x03 + +/* Framing (E1) */ +#define PC300_FR_MF_CRC4 0x04 +#define PC300_FR_MF_NON_CRC4 0x05 +#define PC300_FR_UNFRAMED 0x06 + +#define PC300_LBO_0_DB 0x00 +#define PC300_LBO_7_5_DB 0x01 +#define PC300_LBO_15_DB 0x02 +#define PC300_LBO_22_5_DB 0x03 + +#define PC300_RX_SENS_SH 0x01 +#define PC300_RX_SENS_LH 0x02 + +#define PC300_TX_TIMEOUT (2*HZ) +#define PC300_TX_QUEUE_LEN 10 +#define PC300_DEF_MTU 1500 + +#ifdef __KERNEL__ +/* Function Prototypes */ +static void tx_dma_buf_pt_init(pc300_t *, int); +static void tx_dma_buf_init(pc300_t *, int); +static void rx_dma_buf_pt_init(pc300_t *, int); +static void rx_dma_buf_init(pc300_t *, int); +static void tx_dma_buf_check(pc300_t *, int); +static void rx_dma_buf_check(pc300_t *, int); +int dma_buf_write(pc300_t *, int, ucchar *, int); +int dma_buf_read(pc300_t *, int, struct sk_buff *); +void tx_dma_start(pc300_t *, int); +void rx_dma_start(pc300_t *, int); +void tx_dma_stop(pc300_t *, int); +void rx_dma_stop(pc300_t *, int); +int cpc_queue_xmit(struct sk_buff *, struct device *); +void cpc_net_rx(hdlc_device *); +#ifdef CONFIG_PC300_X25 +int cpc_x25_packetlayer_xmit(struct sk_buff *, struct device *); +void cpc_lapb_connected(void *, int); +void cpc_lapb_disconnected(void *, int); +void cpc_lapb_data_indication(void *, struct sk_buff *); +void cpc_lapb_data_transmit(void *, struct sk_buff *); +#endif /* CONFIG_PC300_X25 */ +static void cpc_intr(int, void *, struct pt_regs *); +void cpc_sca_status(pc300_t *, int); +int cpc_ioctl(hdlc_device *, struct ifreq *, int); +static int clock_rate_calc(uclong, uclong, int *); +int ch_config(pc300dev_t *); +int rx_config(pc300dev_t *); +int tx_config(pc300dev_t *); +int cpc_opench(pc300dev_t *); +void cpc_closech(pc300dev_t *); +int cpc_open(hdlc_device *); +void cpc_close(hdlc_device *); +static uclong detect_ram(pc300_t *); +static void plx_init(pc300_t *); +static int cpc_detect(void); +static void cpc_trace(struct device *, struct sk_buff *, char); +#endif /* __KERNEL__ */ + +#endif /* _PC300_H */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/rtl8139.c linux.20p6/drivers/net/rtl8139.c --- linux.vanilla/drivers/net/rtl8139.c Sun Mar 25 17:31:20 2001 +++ linux.20p6/drivers/net/rtl8139.c Mon Jun 18 08:27:15 2001 @@ -1425,8 +1425,11 @@ rx_mode = AcceptBroadcast | AcceptMulticast | AcceptMyPhys; mc_filter[1] = mc_filter[0] = 0; for (i = 0, mclist = dev->mc_list; mclist && i < dev->mc_count; - i++, mclist = mclist->next) - set_bit(ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26, mc_filter); + i++, mclist = mclist->next) { + int bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26; + + mc_filter[bit_nr >> 5] |= cpu_to_le32(1 << (bit_nr & 31)); + } } /* We can safely update without stopping the chip. */ outb(rx_mode, ioaddr + RxConfig); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sbni.c linux.20p6/drivers/net/sbni.c --- linux.vanilla/drivers/net/sbni.c Sun Mar 25 17:31:21 2001 +++ linux.20p6/drivers/net/sbni.c Tue Jun 19 09:59:54 2001 @@ -758,7 +758,7 @@ */ DP( printk("%s: sbni_recv SendComplete\n",dev->name); ); /* - * We sucessfully sent current packet + * We successfully sent current packet */ if(lp->waitack) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sdla_fr.c linux.20p6/drivers/net/sdla_fr.c --- linux.vanilla/drivers/net/sdla_fr.c Sun Mar 25 17:31:19 2001 +++ linux.20p6/drivers/net/sdla_fr.c Tue Jun 19 09:59:54 2001 @@ -77,7 +77,7 @@ * the if clause for it(0,dev->tbusy) * forever. * The code got into this stage due to an -* interrupt occuring within the if clause for +* interrupt occurring within the if clause for * set_bit(0,dev->tbusy). Since an interrupt * disables furhter transmit interrupt and * makes dev->tbusy = 0, this effect was undone @@ -1329,7 +1329,7 @@ /*============================================================================ - * Setup so that a frame can be transmitted on the occurence of a transmit + * Setup so that a frame can be transmitted on the occurrence of a transmit * interrupt. */ static void setup_for_delayed_transmit (struct device* dev, void* buf, @@ -1647,7 +1647,7 @@ ++card->statistics.isr_intr_test; break; - case FR_INTR_DLC: /* Event interrupt occured */ + case FR_INTR_DLC: /* Event interrupt occurred */ mbox->cmd.command = FR_READ_STATUS; mbox->cmd.length = 0; err = sdla_exec(mbox) ? mbox->cmd.result : CMD_TIMEOUT; @@ -1684,7 +1684,7 @@ /*============================================================================ * Receive interrupt handler. * When a receive interrupt occurs do the following: - * 1- Find the structure for the dlci that the interrupt occured on + * 1- Find the structure for the dlci that the interrupt occurred on * 2- If it doesn't exist then print appropriate msg and goto step 8. * 3- If it exist then copy data to a skb. * 4- If skb contains Sangoma UDP data then process them diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sis900.c linux.20p6/drivers/net/sis900.c --- linux.vanilla/drivers/net/sis900.c Sun Mar 25 17:37:34 2001 +++ linux.20p6/drivers/net/sis900.c Fri May 4 23:17:33 2001 @@ -1,6 +1,6 @@ /* sis900.c: A SiS 900/7016 PCI Fast Ethernet driver for Linux. Copyright 1999 Silicon Integrated System Corporation - Revision: 1.06.07 Jan. 8 2001 + Revision: 1.06.08 Apr. 3 2001 Modified from the driver which is originally written by Donald Becker. @@ -18,6 +18,7 @@ preliminary Rev. 1.0 Jan. 18, 1998 http://www.sis.com.tw/support/databook.htm + Rev 1.06.08 Mar. 2 2001 Hui-Fen Hsu (hfhsu@sis.com.tw) some bug fix & 635M/B support Rev 1.06.07 Jan. 8 2001 Lei-Chun Chang added RTL8201 PHY support Rev 1.06.06 Sep. 6 2000 Lei-Chun Chang added ICS1893 PHY support Rev 1.06.05 Aug. 22 2000 Lei-Chun Chang (lcchang@sis.com.tw) modified 630E equalier workaroung rule @@ -53,7 +54,7 @@ #include "sis900.h" static const char *version = -"sis900.c: v1.06.07 01/08/01\n"; +"sis900.c: v1.06.08 04/03/2001\n"; static int max_interrupt_work = 20; static int multicast_filter_limit = 128; @@ -79,34 +80,36 @@ PCI_COMMAND_IO|PCI_COMMAND_MASTER, SIS900_TOTAL_SIZE, sis900_mac_probe}, { "SiS 7016 PCI Fast Ethernet",PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_7016, PCI_COMMAND_IO|PCI_COMMAND_MASTER, SIS900_TOTAL_SIZE, sis900_mac_probe}, - {0,}, /* 0 terminated list. */ + {0,}, /* 0 terminatted list. */ }; -static void sis900_read_mode(struct device *net_dev, int phy_addr, int *speed, int *duplex); -static void amd79c901_read_mode(struct device *net_dev, int phy_addr, int *speed, int *duplex); -static void ics1893_read_mode(struct device *net_dev, int phy_addr, int *speed, int *duplex); -static void rtl8201_read_mode(struct device *net_dev, int phy_addr, int *speed, int *duplex); +static void sis900_read_mode(struct device *net_dev, int *speed, int *duplex); static struct mii_chip_info { const char * name; u16 phy_id0; u16 phy_id1; - void (*read_mode) (struct device *net_dev, int phy_addr, int *speed, int *duplex); + u8 phy_types; +#define HOME 0x0001 +#define LAN 0x0002 +#define MIX 0x0003 } mii_chip_table[] = { - {"SiS 900 Internal MII PHY", 0x001d, 0x8000, sis900_read_mode}, - {"SiS 7014 Physical Layer Solution", 0x0016, 0xf830,sis900_read_mode}, - {"AMD 79C901 10BASE-T PHY", 0x0000, 0x35b9, amd79c901_read_mode}, - {"AMD 79C901 HomePNA PHY", 0x0000, 0x35c8, amd79c901_read_mode}, - {"ICS 1893 Integrated PHYceiver" , 0x0015, 0xf441,ics1893_read_mode}, - {"RTL 8201 10/100Mbps Phyceiver" , 0x0000, 0x8201,rtl8201_read_mode}, + { "SiS 900 Internal MII PHY", 0x001d, 0x8000, LAN }, + { "SiS 7014 Physical Layer Solution", 0x0016, 0xf830, LAN }, + { "AMD 79C901 10BASE-T PHY", 0x0000, 0x6B70, LAN }, + { "AMD 79C901 HomePNA PHY", 0x0000, 0x6B90, HOME}, + { "ICS LAN PHY", 0x0015, 0xF440, LAN }, + { "NS 83851 PHY", 0x2000, 0x5C20, MIX }, {0,}, }; struct mii_phy { struct mii_phy * next; - struct mii_chip_info * chip_info; int phy_addr; + u16 phy_id0; + u16 phy_id1; u16 status; + u8 phy_types; }; typedef struct _BufferDesc { @@ -122,9 +125,11 @@ struct mac_chip_info * mac; struct mii_phy * mii; + struct mii_phy * first_mii; /* record the first mii structure */ unsigned int cur_phy; - struct timer_list timer; /* Link status detection timer. */ + struct timer_list timer; /* Link status detection timer. */ + u8 autong_complete; /* 1: auto-negotiate complete */ unsigned int cur_rx, dirty_rx; /* producer/comsumer pointers for Tx/Rx ring */ unsigned int cur_tx, dirty_tx; @@ -167,10 +172,15 @@ static int sis900_close(struct device *net_dev); static int mii_ioctl(struct device *net_dev, struct ifreq *rq, int cmd); static struct enet_statistics *sis900_get_stats(struct device *net_dev); -static u16 sis900_compute_hashtable_index(u8 *addr); +static u16 sis900_compute_hashtable_index(u8 *addr, u8 revision); static void set_rx_mode(struct device *net_dev); static void sis900_reset(struct device *net_dev); -static void sis630e_set_eq(struct device *net_dev); +static void sis630_set_eq(struct device *net_dev, u8 revision); +static u16 sis900_default_phy(struct device * net_dev); +static void sis900_set_capability( struct device *net_dev ,struct mii_phy *phy); +static u16 sis900_reset_phy(struct device *net_dev, int phy_addr); +static void sis900_auto_negotiate(struct device *net_dev, int phy_addr); +static void sis900_set_mode (long ioaddr, int speed, int duplex); /* A list of all installed SiS900 devices, for removing the driver module. */ static struct device *root_sis900_dev = NULL; @@ -265,26 +275,30 @@ return 1; } -/* SiS630E A1, The Mac address is hardcoded in the RFCR register so it is actually not necessary to - probe the MAC address */ -static int sis630ea1_get_mac_addr(struct pci_dev * pci_dev, struct device *net_dev) +/* 635 model : set Mac reload bit and get mac address from rfdr */ +static int sis635_get_mac_addr(struct pci_dev * pci_dev, struct device *net_dev) { - long ioaddr = pci_dev->base_address[0] & ~3; - u32 reg; - int i; + long ioaddr = net_dev->base_addr; + u32 rfcrSave; + u32 i; - /* reload MAC address */ - reg = inl(ioaddr + cr); - outl(reg | RELOAD, ioaddr + cr); + rfcrSave = inl(rfcr + ioaddr); - reg = inl(ioaddr + cr); - outl(reg & ~RELOAD, ioaddr + cr); + outl(rfcrSave | RELOAD, ioaddr + cr); + outl(0, ioaddr + cr); - for (i = 0; i < 3; i++) { - outl((u32)(0x00000004+i) << RFADDR_shift, ioaddr + rfcr); - ((u16 *)(net_dev->dev_addr))[i] = inl(ioaddr + rfdr); + /* disable packet filtering before setting filter */ + outl(rfcrSave & ~RFEN, rfcr + ioaddr); + + /* load MAC addr to filter data register */ + for (i = 0 ; i < 3 ; i++) { + outl((i << RFADDR_shift), ioaddr + rfcr); + *( ((u16 *)net_dev->dev_addr) + i) = inw(ioaddr + rfdr); } + /* enable packet filitering */ + outl(rfcrSave | RFEN, rfcr + ioaddr); + return 1; } @@ -304,16 +318,31 @@ if ((net_dev = init_etherdev(net_dev, 0)) == NULL) return NULL; + if ((net_dev->priv = kmalloc(sizeof(struct sis900_private), GFP_KERNEL)) == NULL) { + unregister_netdev(net_dev); + return NULL; + } + + sis_priv = net_dev->priv; + memset(sis_priv, 0, sizeof(struct sis900_private)); + + /* We do a request_region() to register /proc/ioports info. */ + request_region(ioaddr, mac->io_size, net_dev->name); + net_dev->base_addr = ioaddr; + net_dev->irq = irq; + sis_priv->pci_dev = pci_dev; + sis_priv->mac = mac; + pci_read_config_byte(pci_dev, PCI_CLASS_REVISION, &revision); - if (revision == SIS630E_REV || revision == SIS630EA1_REV) - ret = sis630e_get_mac_addr(pci_dev, net_dev); - else if (revision == SIS630S_REV) + if ( revision == SIS630E_900_REV ) ret = sis630e_get_mac_addr(pci_dev, net_dev); + else if ((revision > 0x81) && (revision <= 0x90)) + ret = sis635_get_mac_addr(pci_dev, net_dev); else ret = sis900_get_mac_addr(pci_dev, net_dev); if (ret == 0) { - unregister_netdevice(net_dev); + unregister_netdev(net_dev); return NULL; } @@ -324,21 +353,6 @@ printk("%2.2x:", (u8)net_dev->dev_addr[i]); printk("%2.2x.\n", net_dev->dev_addr[i]); - if ((net_dev->priv = kmalloc(sizeof(struct sis900_private), GFP_KERNEL)) == NULL) { - unregister_netdevice(net_dev); - return NULL; - } - - sis_priv = net_dev->priv; - memset(sis_priv, 0, sizeof(struct sis900_private)); - - /* We do a request_region() to register /proc/ioports info. */ - request_region(ioaddr, mac->io_size, net_dev->name); - net_dev->base_addr = ioaddr; - net_dev->irq = irq; - sis_priv->pci_dev = pci_dev; - sis_priv->mac = mac; - /* probe for mii transciver */ if (sis900_mii_probe(net_dev) == 0) { unregister_netdev(net_dev); @@ -361,81 +375,171 @@ return net_dev; } +/* sis900_mii_probe: - Probe MII PHY for sis900 */ static int sis900_mii_probe (struct device * net_dev) { struct sis900_private * sis_priv = (struct sis900_private *)net_dev->priv; + u16 poll_bit = MII_STAT_LINK, status = 0; + unsigned int timeout = jiffies + 5 * HZ; int phy_addr; u8 revision; sis_priv->mii = NULL; /* search for total of 32 possible mii phy addresses */ - for (phy_addr = 0; phy_addr < 32; phy_addr++) { + for (phy_addr = 0; phy_addr < 32; phy_addr++) { + struct mii_phy * mii_phy = NULL; u16 mii_status; - u16 phy_id0, phy_id1; int i; - mii_status = mdio_read(net_dev, phy_addr, MII_STATUS); + for(i=0; i<2; i++) + mii_status = mdio_read(net_dev, phy_addr, MII_STATUS); + if (mii_status == 0xffff || mii_status == 0x0000) /* the mii is not accessable, try next one */ continue; - - phy_id0 = mdio_read(net_dev, phy_addr, MII_PHY_ID0); - phy_id1 = mdio_read(net_dev, phy_addr, MII_PHY_ID1); - - /* search our mii table for the current mii */ - for (i = 0; mii_chip_table[i].phy_id1; i++) - if (phy_id0 == mii_chip_table[i].phy_id0 && - phy_id1 == mii_chip_table[i].phy_id1) { - struct mii_phy * mii_phy; - - printk(KERN_INFO - "%s: %s transceiver found at address %d.\n", - net_dev->name, mii_chip_table[i].name, - phy_addr);; - if ((mii_phy = kmalloc(sizeof(struct mii_phy), GFP_KERNEL)) != NULL) { - mii_phy->chip_info = mii_chip_table+i; - mii_phy->phy_addr = phy_addr; - mii_phy->status = mdio_read(net_dev, phy_addr, - MII_STATUS); - mii_phy->next = sis_priv->mii; - sis_priv->mii = mii_phy; - } - /* the current mii is on our mii_info_table, - try next address */ + + if ((mii_phy = kmalloc(sizeof(struct mii_phy), GFP_KERNEL)) == NULL) { + printk(KERN_INFO "Cannot allocate mem for struct mii_phy\n"); + return 0; + } + + mii_phy->phy_id0 = mdio_read(net_dev, phy_addr, MII_PHY_ID0); + mii_phy->phy_id1 = mdio_read(net_dev, phy_addr, MII_PHY_ID1); + mii_phy->phy_addr = phy_addr; + mii_phy->status = mii_status; + mii_phy->next = sis_priv->mii; + sis_priv->mii = mii_phy; + sis_priv->first_mii = mii_phy; + + for (i=0; mii_chip_table[i].phy_id1; i++) + if ( ( mii_phy->phy_id0 == mii_chip_table[i].phy_id0 ) && + ( (mii_phy->phy_id1 & 0xFFF0) == mii_chip_table[i].phy_id1 )){ + + mii_phy->phy_types = mii_chip_table[i].phy_types; + if(mii_chip_table[i].phy_types == MIX) + mii_phy->phy_types = + (mii_status & (MII_STAT_CAN_TX_FDX | MII_STAT_CAN_TX))?LAN:HOME; + printk(KERN_INFO "%s: %s transceiver found at address %d.\n", + net_dev->name, mii_chip_table[i].name, phy_addr); break; } - } + if( !mii_chip_table[i].phy_id1 ) + printk(KERN_INFO "%s: Unknown PHY transceiver found at address %d.\n", + net_dev->name, phy_addr); + } + if (sis_priv->mii == NULL) { printk(KERN_INFO "%s: No MII transceivers found!\n", net_dev->name); return 0; } - /* arbitrary choose that last PHY as current PHY */ - sis_priv->cur_phy = sis_priv->mii->phy_addr; - printk(KERN_INFO "%s: Using %s as default\n", net_dev->name, - sis_priv->mii->chip_info->name); + /* Slect Default PHY to put in sis_priv->mii & sis_priv->cur_phy */ + sis_priv->mii = NULL; + sis900_default_phy( net_dev ); + + /* Reset PHY if default PHY is internal sis900 */ + if( (sis_priv->mii->phy_id0 == 0x001D) && + ( (sis_priv->mii->phy_id1&0xFFF0) == 0x8000) ) + status = sis900_reset_phy( net_dev, sis_priv->cur_phy ); + + if( status & MII_STAT_LINK ){ + while (poll_bit) { + current->state = TASK_INTERRUPTIBLE; + schedule_timeout(0); + poll_bit ^= (mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS) & poll_bit); + if (jiffies >= timeout) { + printk(KERN_WARNING "%s: reset phy and link down\n", net_dev->name); + return -ETIME; + } + } + } pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision); - if (revision == SIS630E_REV) { + if (revision == SIS630E_900_REV) { /* SiS 630E has some bugs on default value of PHY registers */ mdio_write(net_dev, sis_priv->cur_phy, MII_ANADV, 0x05e1); mdio_write(net_dev, sis_priv->cur_phy, MII_CONFIG1, 0x22); mdio_write(net_dev, sis_priv->cur_phy, MII_CONFIG2, 0xff00); mdio_write(net_dev, sis_priv->cur_phy, MII_MASK, 0xffc0); - mdio_write(net_dev, sis_priv->cur_phy, MII_CONTROL, 0x1000); + //mdio_write(net_dev, sis_priv->cur_phy, MII_CONTROL, 0x1000); } if (sis_priv->mii->status & MII_STAT_LINK) sis_priv->LinkOn = TRUE; else sis_priv->LinkOn = FALSE; - + return 1; } + +/* sis900_default_phy : Select one default PHY for sis900 mac */ +static u16 sis900_default_phy(struct device * net_dev) +{ + struct sis900_private * sis_priv = (struct sis900_private *)net_dev->priv; + struct mii_phy *phy = NULL, *phy_home = NULL, *default_phy = NULL; + u16 status; + + for( phy=sis_priv->first_mii; phy; phy=phy->next ){ + status = mdio_read(net_dev, phy->phy_addr, MII_STATUS); + status = mdio_read(net_dev, phy->phy_addr, MII_STATUS); + + /* Link ON & Not select deafalut PHY */ + if ( (status & MII_STAT_LINK) && !(default_phy) ) + default_phy = phy; + else{ + status = mdio_read(net_dev, phy->phy_addr, MII_CONTROL); + mdio_write(net_dev, phy->phy_addr, MII_CONTROL, + status | MII_CNTL_AUTO | MII_CNTL_ISOLATE); + if( phy->phy_types == HOME ) + phy_home = phy; + } + } + + if( (!default_phy) && phy_home ) + default_phy = phy_home; + else if(!default_phy) + default_phy = sis_priv->first_mii; + + if( sis_priv->mii != default_phy ){ + sis_priv->mii = default_phy; + sis_priv->cur_phy = default_phy->phy_addr; + printk(KERN_INFO "%s: Using transceiver found at address %d as default\n", net_dev->name,sis_priv->cur_phy); + } + + status = mdio_read(net_dev, sis_priv->cur_phy, MII_CONTROL); + status &= (~MII_CNTL_ISOLATE); + + mdio_write(net_dev, sis_priv->cur_phy, MII_CONTROL, status); + status = mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS); + status = mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS); + + return status; +} + + +/* sis900_set_capability : set the media capability of network adapter */ +static void sis900_set_capability( struct device *net_dev , struct mii_phy *phy ) +{ + u16 cap; + u16 status; + + status = mdio_read(net_dev, phy->phy_addr, MII_STATUS); + status = mdio_read(net_dev, phy->phy_addr, MII_STATUS); + + cap = MII_NWAY_CSMA_CD | + ((phy->status & MII_STAT_CAN_TX_FDX)? MII_NWAY_TX_FDX:0) | + ((phy->status & MII_STAT_CAN_TX) ? MII_NWAY_TX:0) | + ((phy->status & MII_STAT_CAN_T_FDX) ? MII_NWAY_T_FDX:0)| + ((phy->status & MII_STAT_CAN_T) ? MII_NWAY_T:0); + + mdio_write( net_dev, phy->phy_addr, MII_ANADV, cap ); +} + + /* Delay between EEPROM clock transitions. */ #define eeprom_delay() inl(ee_addr) @@ -580,6 +684,19 @@ return; } +static u16 sis900_reset_phy(struct device *net_dev, int phy_addr) +{ + int i = 0; + u16 status; + + while (i++ < 2) + status = mdio_read(net_dev, phy_addr, MII_STATUS); + + mdio_write( net_dev, phy_addr, MII_CONTROL, MII_CNTL_RESET ); + + return status; +} + static int sis900_open(struct device *net_dev) { @@ -592,8 +709,7 @@ /* Equalizer workaroung Rule */ pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision); - if (revision == SIS630E_REV || revision == SIS630EA1_REV) - sis630e_set_eq(net_dev); + sis630_set_eq(net_dev, revision); if (request_irq(net_dev->irq, &sis900_interrupt, SA_SHIRQ, net_dev->name, net_dev)) { return -EAGAIN; @@ -641,7 +757,7 @@ rfcrSave = inl(rfcr + ioaddr); /* disable packet filtering before setting filter */ - outl(rfcrSave & ~RFEN, rfcr); + outl(rfcrSave & ~RFEN, rfcr + ioaddr); /* load MAC addr to filter data register */ for (i = 0 ; i < 3 ; i++) { @@ -734,51 +850,76 @@ net_dev->name, inl(ioaddr + rxdp)); } -/* 630E equalizer workaroung rule(Cyrus Huang 08/15) - PHY register 14h(Test) - Bit 14: 0 -- Automatically dectect (default) - 1 -- Manually set Equalizer filter - Bit 13: 0 -- (Default) - 1 -- Speed up convergence of equalizer setting - Bit 9 : 0 -- (Default) - 1 -- Disable Baseline Wander - Bit 3~7 -- Equalizer filter setting - - Link ON: Set Bit 9, 13 to 1, Bit 14 to 0 - Then calculate equalizer value - Then set equalizer value, and set Bit 14 to 1, Bit 9 to 0 - Link Off:Set Bit 13 to 1, Bit 14 to 0 - - Calculate Equalizer value: - When Link is ON and Bit 14 is 0, SIS900PHY will auto-dectect proper equalizer value. - When the equalizer is stable, this value is not a fixed value. It will be within - a small range(eg. 7~9). Then we get a minimum and a maximum value(eg. min=7, max=9) - 0 <= max <= 4 --> set equalizer to max - 5 <= max <= 14 --> set equalizer to max+1 or - set equalizer to max+2 if max == min - max >= 15 --> set equalizer to max+5 or - set equalizer to max+6 if max == min -*/ -static void sis630e_set_eq(struct device *net_dev) +/** + * sis630_set_eq: - set phy equalizer value for 630 LAN + * @net_dev: the net device to set equalizer value + * @revision: 630 LAN revision number + * + * 630E equalizer workaround rule(Cyrus Huang 08/15) + * PHY register 14h(Test) + * Bit 14: 0 -- Automatically dectect (default) + * 1 -- Manually set Equalizer filter + * Bit 13: 0 -- (Default) + * 1 -- Speed up convergence of equalizer setting + * Bit 9 : 0 -- (Default) + * 1 -- Disable Baseline Wander + * Bit 3~7 -- Equalizer filter setting + * Link ON: Set Bit 9, 13 to 1, Bit 14 to 0 + * Then calculate equalizer value + * Then set equalizer value, and set Bit 14 to 1, Bit 9 to 0 + * Link Off:Set Bit 13 to 1, Bit 14 to 0 + * Calculate Equalizer value: + * When Link is ON and Bit 14 is 0, SIS900PHY will auto-dectect proper equalizer value. + * When the equalizer is stable, this value is not a fixed value. It will be within + * a small range(eg. 7~9). Then we get a minimum and a maximum value(eg. min=7, max=9) + * 0 <= max <= 4 --> set equalizer to max + * 5 <= max <= 14 --> set equalizer to max+1 or set equalizer to max+2 if max == min + * max >= 15 --> set equalizer to max+5 or set equalizer to max+6 if max == min + */ + +static void sis630_set_eq(struct device *net_dev, u8 revision) { struct sis900_private *sis_priv = (struct sis900_private *)net_dev->priv; u16 reg14h, eq_value, max_value=0, min_value=0; + u8 host_bridge_rev; int i, maxcount=10; + struct pci_dev *dev=NULL; + + if ( !(revision == SIS630E_900_REV || revision == SIS630EA1_900_REV || + revision == SIS630A_900_REV) ) + return; + + if ((dev = pci_find_device(SIS630_VENDOR_ID, SIS630_DEVICE_ID, dev))) + pci_read_config_byte(dev, PCI_CLASS_REVISION, &host_bridge_rev); - if (sis_priv->LinkOn == TRUE) { + if (sis_priv->LinkOn) { reg14h=mdio_read(net_dev, sis_priv->cur_phy, MII_RESV); mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, (0x2200 | reg14h) & 0xBFFF); for (i=0; i < maxcount; i++) { eq_value=(0x00F8 & mdio_read(net_dev, sis_priv->cur_phy, MII_RESV)) >> 3; + if (i == 0) + max_value=min_value=eq_value; max_value=(eq_value > max_value) ? eq_value : max_value; min_value=(eq_value < min_value) ? eq_value : min_value; - } - if (max_value < 5) - eq_value=max_value; - else if (max_value >= 5 && max_value < 15) - eq_value=(max_value == min_value) ? max_value+2 : max_value+1; - else if (max_value >= 15) - eq_value=(max_value == min_value) ? max_value+6 : max_value+5; + } + /* 630E rule to determine the equalizer value */ + if (revision == SIS630E_900_REV || revision == SIS630EA1_900_REV) { + if (max_value < 5) + eq_value=max_value; + else if (max_value >= 5 && max_value < 15) + eq_value=(max_value == min_value) ? max_value+2 : max_value+1; + else if (max_value >= 15) + eq_value=(max_value == min_value) ? max_value+6 : max_value+5; + } + /* 630B0&B1 rule to determine the equalizer value */ + if (revision == SIS630A_900_REV && + (host_bridge_rev == SIS630B0 || host_bridge_rev == SIS630B1)) { + if (max_value == 0) + eq_value=3; + else + eq_value=(max_value+min_value+1)/2; + } + /* write equalizer value and setting */ reg14h=mdio_read(net_dev, sis_priv->cur_phy, MII_RESV); reg14h=(reg14h & 0xFF07) | ((eq_value << 3) & 0x00F8); reg14h=(reg14h | 0x6000) & 0xFDFF; @@ -786,14 +927,19 @@ } else { reg14h=mdio_read(net_dev, sis_priv->cur_phy, MII_RESV); - mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, (reg14h | 0x2000) & 0xBFFF); + if (revision == SIS630A_900_REV && + (host_bridge_rev == SIS630B0 || host_bridge_rev == SIS630B1)) + mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, (reg14h | 0x2200) & 0xBFFF); + else + mdio_write(net_dev, sis_priv->cur_phy, MII_RESV, (reg14h | 0x2000) & 0xBFFF); } return; } + /* on each timer ticks we check two things, Link Status (ON/OFF) and - Link Mode (10/100/Full/Half) - */ + Link Mode (10/100/Full/Half) +*/ static void sis900_timer(unsigned long data) { struct device *net_dev = (struct device *)data; @@ -801,77 +947,91 @@ struct mii_phy *mii_phy = sis_priv->mii; static int next_tick = 5*HZ; u16 status; - u8 revision; - - status = mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS); - status = mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS); + u8 revision; - /* current mii phy is failed to link, try another one */ - while (!(status & MII_STAT_LINK)) { - if (mii_phy->next == NULL) { - if (sis_priv->LinkOn) { - /* link stat change from ON to OFF */ - next_tick = HZ; - sis_priv->LinkOn = FALSE; - - /* Equalizer workaroung Rule */ - pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision); - if (revision == SIS630E_REV || revision == SIS630EA1_REV) - sis630e_set_eq(net_dev); + if(!sis_priv->autong_complete){ + int speed, duplex = 0; - printk(KERN_INFO "%s: Media Link Off\n", - net_dev->name); - } - sis_priv->timer.expires = jiffies + next_tick; - add_timer(&sis_priv->timer); - return; + sis900_read_mode(net_dev, &speed, &duplex); + if(duplex){ + sis900_set_mode(net_dev->base_addr, speed, duplex); + pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision); + sis630_set_eq(net_dev, revision); } - mii_phy = mii_phy->next; - status = mdio_read(net_dev, mii_phy->phy_addr, MII_STATUS); + + sis_priv->timer.expires = jiffies + HZ; + add_timer(&sis_priv->timer); + return; } - if (!sis_priv->LinkOn) { - /* link stat change forn OFF to ON, read and report link mode */ - sis_priv->LinkOn = TRUE; - next_tick = 5*HZ; - - /* Equalizer workaroung Rule */ - pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision); - if (revision == SIS630E_REV || revision == SIS630EA1_REV) - sis630e_set_eq(net_dev); - - /* change what cur_phy means */ - if (mii_phy->phy_addr != sis_priv->cur_phy) { - printk(KERN_INFO "%s: Changing transceiver to %s\n", - net_dev->name, mii_phy->chip_info->name); - /* disable previous PHY */ - status = mdio_read(net_dev, sis_priv->cur_phy, MII_CONTROL); - mdio_write(net_dev, sis_priv->cur_phy, - MII_CONTROL, status | MII_CNTL_ISOLATE); - /* enable next PHY */ - status = mdio_read(net_dev, mii_phy->phy_addr, MII_CONTROL); - mdio_write(net_dev, mii_phy->phy_addr, - MII_CONTROL, status & ~MII_CNTL_ISOLATE); - sis_priv->cur_phy = mii_phy->phy_addr; - } - sis900_check_mode(net_dev, mii_phy); + status = mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS); + status = mdio_read(net_dev, sis_priv->cur_phy, MII_STATUS); + /* Link OFF -> ON */ + if ( !sis_priv->LinkOn ) { +LookForLink: + /* Search for new PHY */ + status = sis900_default_phy( net_dev ); + mii_phy = sis_priv->mii; + + if( status & MII_STAT_LINK ){ + sis900_check_mode(net_dev, mii_phy); + sis_priv->LinkOn = TRUE; + } + } + /* Link ON -> OFF */ + else{ + if( !(status & MII_STAT_LINK) ){ + sis_priv->LinkOn = FALSE; + printk(KERN_INFO "%s: Media Link Off\n", net_dev->name); + + /* Change mode issue */ + if( (mii_phy->phy_id0 == 0x001D) && + ( (mii_phy->phy_id1 & 0xFFF0) == 0x8000 )) + sis900_reset_phy( net_dev, sis_priv->cur_phy ); + + pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision); + sis630_set_eq(net_dev, revision); + + goto LookForLink; + } } sis_priv->timer.expires = jiffies + next_tick; add_timer(&sis_priv->timer); } + static void sis900_check_mode (struct device *net_dev, struct mii_phy *mii_phy) { struct sis900_private *sis_priv = (struct sis900_private *)net_dev->priv; long ioaddr = net_dev->base_addr; int speed, duplex; - u32 tx_flags = 0, rx_flags = 0; - mii_phy->chip_info->read_mode(net_dev, sis_priv->cur_phy, &speed, &duplex); + if( mii_phy->phy_types == LAN ){ + outl( ~EXD & inl( ioaddr + cfg ), ioaddr + cfg); + sis900_set_capability(net_dev , mii_phy); + sis900_auto_negotiate(net_dev, sis_priv->cur_phy); + }else{ + outl(EXD | inl( ioaddr + cfg ), ioaddr + cfg); + speed = HW_SPEED_HOME; + duplex = FDX_CAPABLE_HALF_SELECTED; + sis900_set_mode(net_dev->base_addr, speed, duplex); + sis_priv->autong_complete = 1; + } +} - tx_flags = TxATP | (TX_DMA_BURST << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift); - rx_flags = RX_DMA_BURST << RxMXDMA_shift; +static void sis900_set_mode (long ioaddr, int speed, int duplex) +{ + u32 tx_flags = 0, rx_flags = 0; + + if( inl(ioaddr + cfg) & EDB_MASTER_EN ){ + tx_flags = TxATP | (DMA_BURST_64 << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift); + rx_flags = DMA_BURST_64 << RxMXDMA_shift; + } + else{ + tx_flags = TxATP | (DMA_BURST_512 << TxMXDMA_shift) | (TX_FILL_THRESH << TxFILLT_shift); + rx_flags = DMA_BURST_512 << RxMXDMA_shift; + } if (speed == HW_SPEED_HOME || speed == HW_SPEED_10_MBPS ) { rx_flags |= (RxDRNT_10 << RxDRNT_shift); @@ -890,141 +1050,68 @@ outl (tx_flags, ioaddr + txcfg); outl (rx_flags, ioaddr + rxcfg); } -static void sis900_read_mode(struct device *net_dev, int phy_addr, int *speed, int *duplex) + + +static void sis900_auto_negotiate(struct device *net_dev, int phy_addr) { + struct sis900_private *sis_priv = (struct sis900_private *)net_dev->priv; int i = 0; u32 status; - - /* STSOUT register is Latched on Transition, read operation updates it */ + while (i++ < 2) - status = mdio_read(net_dev, phy_addr, MII_STSOUT); - - if (status & MII_STSOUT_SPD) - *speed = HW_SPEED_100_MBPS; - else - *speed = HW_SPEED_10_MBPS; - - if (status & MII_STSOUT_DPLX) - *duplex = FDX_CAPABLE_FULL_SELECTED; - else - *duplex = FDX_CAPABLE_HALF_SELECTED; + status = mdio_read(net_dev, phy_addr, MII_STATUS); - if (status & MII_STSOUT_LINK_FAIL) + if (!(status & MII_STAT_LINK)){ printk(KERN_INFO "%s: Media Link Off\n", net_dev->name); - else - printk(KERN_INFO "%s: Media Link On %s %s-duplex \n", - net_dev->name, - *speed == HW_SPEED_100_MBPS ? - "100mbps" : "10mbps", - *duplex == FDX_CAPABLE_FULL_SELECTED ? - "full" : "half"); -} -static void amd79c901_read_mode(struct device *net_dev, int phy_addr, int *speed, int *duplex) -{ - int i; - u16 status; + sis_priv->autong_complete = 1; + sis_priv->LinkOn = FALSE; + return; + } - for (i = 0; i < 2; i++) - status = mdio_read(net_dev, phy_addr, MII_STATUS); + /* (Re)start AutoNegotiate */ + mdio_write(net_dev, phy_addr, MII_CONTROL, + MII_CNTL_AUTO | MII_CNTL_RST_AUTO); + sis_priv->autong_complete = 0; +} - if (status & MII_STAT_CAN_AUTO) { - /* 10BASE-T PHY */ - for (i = 0; i < 2; i++) - status = mdio_read(net_dev, phy_addr, MII_STATUS_SUMMARY); - if (status & MII_STSSUM_SPD) - *speed = HW_SPEED_100_MBPS; - else - *speed = HW_SPEED_10_MBPS; - if (status & MII_STSSUM_DPLX) - *duplex = FDX_CAPABLE_FULL_SELECTED; - else - *duplex = FDX_CAPABLE_HALF_SELECTED; - if (status & MII_STSSUM_LINK) - printk(KERN_INFO "%s: Media Link On %s %s-duplex \n", - net_dev->name, - *speed == HW_SPEED_100_MBPS ? - "100mbps" : "10mbps", - *duplex == FDX_CAPABLE_FULL_SELECTED ? - "full" : "half"); - else - printk(KERN_INFO "%s: Media Link Off\n", net_dev->name); - } - else { - /* HomePNA */ - *speed = HW_SPEED_HOME; - *duplex = FDX_CAPABLE_HALF_SELECTED; - if (status & MII_STAT_LINK) - printk(KERN_INFO "%s: Media Link On 1mbps half-duplex \n", - net_dev->name); - else - printk(KERN_INFO "%s: Media Link Off\n", net_dev->name); - } -} -/* ICS1893 PHY use Quick Poll Detailed Status Register to get its status */ -static void ics1893_read_mode(struct device *net_dev, int phy_addr, int *speed, int *duplex) +static void sis900_read_mode(struct device *net_dev, int *speed, int *duplex) { - int i = 0; + struct sis900_private *sis_priv = (struct sis900_private *)net_dev->priv; + int phy_addr = sis_priv->cur_phy; u32 status; + u16 autoadv, autorec; + int i = 0; + + while (i++ < 2) + status = mdio_read(net_dev, phy_addr, MII_STATUS); - /* MII_QPDSTS is Latched, read twice in succession will reflect the current state */ - for (i = 0; i < 2; i++) - status = mdio_read(net_dev, phy_addr, MII_QPDSTS); + if (!(status & MII_STAT_LINK)) return; + + /* AutoNegotiate completed */ + autoadv = mdio_read(net_dev, phy_addr, MII_ANADV); + autorec = mdio_read(net_dev, phy_addr, MII_ANLPAR); + status = autoadv & autorec; - if (status & MII_STSICS_SPD) + if (status & (MII_NWAY_TX | MII_NWAY_TX_FDX)) *speed = HW_SPEED_100_MBPS; else *speed = HW_SPEED_10_MBPS; - - if (status & MII_STSICS_DPLX) + if (status & ( MII_NWAY_TX_FDX | MII_NWAY_T_FDX)) *duplex = FDX_CAPABLE_FULL_SELECTED; else *duplex = FDX_CAPABLE_HALF_SELECTED; - if (status & MII_STSICS_LINKSTS) - printk(KERN_INFO "%s: Media Link On %s %s-duplex \n", - net_dev->name, - *speed == HW_SPEED_100_MBPS ? - "100mbps" : "10mbps", - *duplex == FDX_CAPABLE_FULL_SELECTED ? - "full" : "half"); - else - printk(KERN_INFO "%s: Media Link Off\n", net_dev->name); + sis_priv->autong_complete = 1; + + printk(KERN_INFO "%s: Media Link On %s %s-duplex \n", + net_dev->name, + *speed == HW_SPEED_100_MBPS ? + "100mbps" : "10mbps", + *duplex == FDX_CAPABLE_FULL_SELECTED ? + "full" : "half"); } -static void rtl8201_read_mode(struct device *net_dev, int phy_addr, int *speed, int *duplex) -{ - u32 status; - - status = mdio_read(net_dev, phy_addr, MII_STATUS); - - if (status & MII_STAT_CAN_TX_FDX) { - *speed = HW_SPEED_100_MBPS; - *duplex = FDX_CAPABLE_FULL_SELECTED; - } - else if (status & MII_STAT_CAN_TX) { - *speed = HW_SPEED_100_MBPS; - *duplex = FDX_CAPABLE_HALF_SELECTED; - } - else if (status & MII_STAT_CAN_T_FDX) { - *speed = HW_SPEED_10_MBPS; - *duplex = FDX_CAPABLE_FULL_SELECTED; - } - else if (status & MII_STAT_CAN_T) { - *speed = HW_SPEED_10_MBPS; - *duplex = FDX_CAPABLE_HALF_SELECTED; - } - - if (status & MII_STAT_LINK) - printk(KERN_INFO "%s: Media Link On %s %s-duplex \n", - net_dev->name, - *speed == HW_SPEED_100_MBPS ? - "100mbps" : "10mbps", - *duplex == FDX_CAPABLE_FULL_SELECTED ? - "full" : "half"); - else - printk(KERN_INFO "%s: Media Link Off\n", net_dev->name); -} static void sis900_tx_timeout(struct device *net_dev) { @@ -1308,14 +1395,14 @@ tx_status = sis_priv->tx_ring[entry].cmdsts; if (tx_status & OWN) { - /* The packet is not transmited yet (owned by hardware) ! + /* The packet is not transmitted yet (owned by hardware) ! Note: the interrupt is generated only when Tx Machine is idle, so this is an almost impossible case */ break; } if (tx_status & (ABORT | UNDERRUN | OWCOLL)) { - /* packet unsuccessfully transmited */ + /* packet unsuccessfully transmitted */ if (sis900_debug > 3) printk(KERN_INFO "%s: Transmit " "error, Tx status %8.8x.\n", @@ -1330,7 +1417,7 @@ if (tx_status & OWCOLL) sis_priv->stats.tx_window_errors++; } else { - /* packet successfully transmited */ + /* packet successfully transmitted */ sis_priv->stats.collisions += (tx_status & COLCNT) >> 16; sis_priv->stats.tx_bytes += tx_status & DSIZE; sis_priv->stats.tx_packets++; @@ -1422,9 +1509,13 @@ return &sis_priv->stats; } -/* SiS 900 uses the most sigificant 7 bits to index a 128 bits multicast hash table, which makes - this function a little bit different from other drivers */ -static u16 sis900_compute_hashtable_index(u8 *addr) + +/* SiS 900 uses the most sigificant 7 bits to index a 128 bits multicast + * hash table, which makes this function a little bit different from other drivers + * SiS 900 B0 & 635 M/B uses the most significat 8 bits to index 256 bits + * multicast hash table. + */ +static u16 sis900_compute_hashtable_index(u8 *addr, u8 revision) { /* what is the correct value of the POLYNOMIAL ?? @@ -1447,43 +1538,54 @@ byte >>= 1; } } - /* leave 7 most siginifant bits */ - return ((int)(crc >> 25)); + + /* leave 8 or 7 most siginifant bits */ + if((revision == SIS635A_900_REV) || (revision == SIS900B_900_REV)) + return ((int)(crc >> 24)); + else + return ((int)(crc >> 25)); } static void set_rx_mode(struct device *net_dev) { long ioaddr = net_dev->base_addr; - u16 mc_filter[8]; /* 128 bits multicast hash table */ - int i; + struct sis900_private * sis_priv = (struct sis900_private *)net_dev->priv; + u16 mc_filter[16] = {0}; /* 256/128 bits multicast hash table */ + int i, table_entries; u32 rx_mode; + u8 revision; + + /* 635 Hash Table entires = 256(2^16) */ + pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision); + if((revision == SIS635A_900_REV) || (revision == SIS900B_900_REV)) + table_entries = 16; + else + table_entries = 8; if (net_dev->flags & IFF_PROMISC) { /* Accept any kinds of packets */ rx_mode = RFPromiscuous; - for (i = 0; i < 8; i++) + for (i = 0; i < table_entries; i++) mc_filter[i] = 0xffff; } else if ((net_dev->mc_count > multicast_filter_limit) || (net_dev->flags & IFF_ALLMULTI)) { /* too many multicast addresses or accept all multicast packets */ rx_mode = RFAAB | RFAAM; - for (i = 0; i < 8; i++) + for (i = 0; i < table_entries; i++) mc_filter[i] = 0xffff; } else { /* Accept Broadcast packets, destination addresses match our MAC address, use Receive Filter to reject unwanted MCAST packets */ struct dev_mc_list *mclist; rx_mode = RFAAB; - for (i = 0; i < 8; i++) - mc_filter[i]=0; for (i = 0, mclist = net_dev->mc_list; mclist && i < net_dev->mc_count; i++, mclist = mclist->next) - set_bit(sis900_compute_hashtable_index(mclist->dmi_addr), + set_bit(sis900_compute_hashtable_index(mclist->dmi_addr, revision), mc_filter); } /* update Multicast Hash Table in Receive Filter */ - for (i = 0; i < 8; i++) { + for (i = 0; i < table_entries; i++) { /* why plus 0x04 ??, That makes the correct value for hash table. */ outl((u32)(0x00000004+i) << RFADDR_shift, ioaddr + rfcr); outl(mc_filter[i], ioaddr + rfdr); @@ -1510,7 +1612,9 @@ static void sis900_reset(struct device *net_dev) { long ioaddr = net_dev->base_addr; + struct sis900_private *sis_priv = (struct sis900_private *)net_dev->priv; int i = 0; + u8 revision; u32 status = TxRCMP | RxRCMP; outl(0, ioaddr + ier); @@ -1524,7 +1628,11 @@ status ^= (inl(isr + ioaddr) & status); } - outl(PESEL, ioaddr + cfg); + pci_read_config_byte(sis_priv->pci_dev, PCI_CLASS_REVISION, &revision); + if( (revision == SIS635A_900_REV) || (revision == SIS900B_900_REV) ) + outl(PESEL | RND_CNT, ioaddr + cfg); + else + outl(PESEL, ioaddr + cfg); } #ifdef MODULE @@ -1541,6 +1649,13 @@ struct sis900_private *sis_priv = (struct sis900_private *)root_sis900_dev->priv; struct device *next_dev = sis_priv->next_module; + struct mii_phy *phy = NULL; + + while(sis_priv->first_mii){ + phy = sis_priv->first_mii; + sis_priv->first_mii = phy->next; + kfree(phy); + } unregister_netdev(root_sis900_dev); release_region(root_sis900_dev->base_addr, diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sis900.h linux.20p6/drivers/net/sis900.h --- linux.vanilla/drivers/net/sis900.h Sun Mar 25 17:37:34 2001 +++ linux.20p6/drivers/net/sis900.h Fri May 4 23:17:33 2001 @@ -47,7 +47,10 @@ enum sis900_configuration_register_bits { DESCRFMT = 0x00000100 /* 7016 specific */, REQALG = 0x00000080, SB = 0x00000040, POW = 0x00000020, EXD = 0x00000010, - PESEL = 0x00000008, LPM = 0x00000004, BEM = 0x00000001 + PESEL = 0x00000008, LPM = 0x00000004, BEM = 0x00000001, + /* 635 & 900B Specific */ + RND_CNT = 0x00000400, FAIR_BACKOFF = 0x00000200, + EDB_MASTER_EN = 0x00002000 }; enum sis900_eeprom_access_reigster_bits { @@ -74,9 +77,11 @@ /* maximum dma burst fro transmission and receive*/ #define MAX_DMA_RANGE 7 /* actually 0 means MAXIMUM !! */ #define TxMXDMA_shift 20 -#define RxMXDMA_shift 20 -#define TX_DMA_BURST 0 -#define RX_DMA_BURST 0 +#define RxMXDMA_shift 20 + +enum sis900_tx_rx_dma{ + DMA_BURST_512 = 0, DMA_BURST_64 = 5 +}; /* transmit FIFO threshholds */ #define TX_FILL_THRESH 16 /* 1/4 FIFO size */ @@ -228,11 +233,17 @@ MII_STSSUM_AUTO = 0x0002, MII_STSSUM_SPD = 0x0001 }; -enum sis630_revision_id { - SIS630E_REV = 0x81, SIS630EA1_REV = 0x83, - SIS630S_REV = 0x82 +enum sis900_revision_id { + SIS630A_900_REV = 0x80, SIS630E_900_REV = 0x81, + SIS630S_900_REV = 0x82, SIS630EA1_900_REV = 0x83, + SIS635A_900_REV = 0x90, SIS900B_900_REV = 0x03 }; +enum sis630_revision_id { + SIS630A0 = 0x00, SIS630A1 = 0x01, + SIS630B0 = 0x10, SIS630B1 = 0x11 +}; + #define FDX_CAPABLE_DUPLEX_UNKNOWN 0 #define FDX_CAPABLE_HALF_SELECTED 1 #define FDX_CAPABLE_FULL_SELECTED 2 @@ -258,6 +269,8 @@ /* PCI stuff, should be move to pic.h */ #define PCI_DEVICE_ID_SI_900 0x900 #define PCI_DEVICE_ID_SI_7016 0x7016 +#define SIS630_VENDOR_ID 0x1039 +#define SIS630_DEVICE_ID 0x0630 /* ioctl for accessing MII transveiver */ #define SIOCGMIIPHY (SIOCDEVPRIVATE) /* Get the PHY in use. */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/Makefile linux.20p6/drivers/net/sk98lin/Makefile --- linux.vanilla/drivers/net/sk98lin/Makefile Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/Makefile Tue Jun 19 09:46:01 2001 @@ -3,9 +3,13 @@ # Makefile for the SysKonnect SK-98xx device driver. # +#DEBUG = 1 + + ifeq ($(CONFIG_SK98LIN),y) O_TARGET := sk98lin.o - O_OBJS = skge.o skaddr.o skgehwt.o skgeinit.o skgepnmi.o skgesirq.o \ + O_OBJS = skge.o skproc.o skaddr.o skgehwt.o skgeinit.o skgepnmi.o \ + skgesirq.o \ ski2c.o sklm80.o skqueue.o skrlmt.o sktimer.o skvpd.o \ skxmac2.o skcsum.o else @@ -13,19 +17,20 @@ MOD_LIST_NAME := SK98LIN_MODULES M_OBJS := sk98lin.o O_TARGET := sk98lin.o - O_OBJS = skge.o skaddr.o skgehwt.o skgeinit.o skgepnmi.o skgesirq.o \ + O_OBJS = skge.o skproc.o skaddr.o skgehwt.o skgeinit.o skgepnmi.o \ + skgesirq.o \ ski2c.o sklm80.o skqueue.o skrlmt.o sktimer.o skvpd.o \ skxmac2.o skcsum.o endif endif -# DBGDEF = \ -# -DDEBUG - ifdef DEBUG +DBGDEF = \ + -DDEBUG + DBGDEF += \ --DSK_DEBUG_CHKMOD=0x00000000L \ --DSK_DEBUG_CHKCAT=0x00000000L + -DSK_DEBUG_CHKMOD=0x00000000L \ + -DSK_DEBUG_CHKCAT=0xFFFFFFFF endif diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/h/lm80.h linux.20p6/drivers/net/sk98lin/h/lm80.h --- linux.vanilla/drivers/net/sk98lin/h/lm80.h Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/h/lm80.h Tue Jun 19 09:59:54 2001 @@ -126,7 +126,7 @@ #define LM80_IS_BTI (1<<1) /* state of BTI# pin */ #define LM80_IS_FAN1 (1<<2) /* count limit exceeded for Fan 1 */ #define LM80_IS_FAN2 (1<<3) /* count limit exceeded for Fan 2 */ -#define LM80_IS_CI (1<<4) /* Chassis Intrusion occured */ +#define LM80_IS_CI (1<<4) /* Chassis Intrusion occurred */ #define LM80_IS_OS (1<<5) /* OS temperature limit exceeded */ /* bit 6 and 7 are reserved in LM80_ISRC_2 */ #define LM80_IS_HT_IRQ_MD (1<<6) /* Hot temperature interrupt mode */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/h/skaddr.h linux.20p6/drivers/net/sk98lin/h/skaddr.h --- linux.vanilla/drivers/net/sk98lin/h/skaddr.h Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/h/skaddr.h Tue Jun 19 09:46:01 2001 @@ -2,16 +2,15 @@ * * Name: skaddr.h * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.20 $ - * Date: $Date: 1999/11/22 13:46:14 $ - * Purpose: Header file for Address Management (MC, UC, Prom) + * Version: $Revision: 1.24 $ + * Date: $Date: 2001/01/22 13:41:34 $ + * Purpose: Header file for Address Management (MC, UC, Prom). * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2001 SysKonnect GmbH. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +26,20 @@ * History: * * $Log: skaddr.h,v $ + * Revision 1.24 2001/01/22 13:41:34 rassmann + * Supporting two nets on dual-port adapters. + * + * Revision 1.23 2000/08/10 11:27:50 rassmann + * Editorial changes. + * Preserving 32-bit alignment in structs for the adapter context. + * + * Revision 1.22 2000/08/07 11:10:40 rassmann + * Editorial changes. + * + * Revision 1.21 2000/05/04 09:39:59 rassmann + * Editorial changes. + * Corrected multicast address hashing. + * * Revision 1.20 1999/11/22 13:46:14 cgoos * Changed license header to GPL. * Allowing overwrite for SK_ADDR_EQUAL. @@ -119,33 +132,36 @@ #define __INC_SKADDR_H #ifdef __cplusplus -xxxx /* not supported yet - force error */ +#error C++ is not yet supported. extern "C" { #endif /* cplusplus */ /* defines ********************************************************************/ -#define SK_MAC_ADDR_LEN 6 /* Length of MAC address. */ -#define SK_MAX_ADDRS 14 /* #Addrs for exact match. */ +#define SK_MAC_ADDR_LEN 6 /* Length of MAC address. */ +#define SK_MAX_ADDRS 14 /* #Addrs for exact match. */ /* ----- Common return values ----- */ -#define SK_ADDR_SUCCESS 0 /* Function returned successfully. */ -#define SK_ADDR_ILLEGAL_PORT 100 /* Port number too high. */ -#define SK_ADDR_TOO_EARLY 101 /* Function called too early. */ +#define SK_ADDR_SUCCESS 0 /* Function returned successfully. */ +#define SK_ADDR_ILLEGAL_PORT 100 /* Port number too high. */ +#define SK_ADDR_TOO_EARLY 101 /* Function called too early. */ /* ----- Clear/Add flag bits ----- */ -#define SK_ADDR_PERMANENT 1 /* RLMT Address */ +#define SK_ADDR_PERMANENT 1 /* RLMT Address */ /* ----- Additional Clear flag bits ----- */ -#define SK_MC_SW_ONLY 2 /* Do not update HW when clearing. */ +#define SK_MC_SW_ONLY 2 /* Do not update HW when clearing. */ /* ----- Override flag bits ----- */ -#define SK_ADDR_VIRTUAL_ADDRESS 0 +#define SK_ADDR_LOGICAL_ADDRESS 0 +#define SK_ADDR_VIRTUAL_ADDRESS (SK_ADDR_LOGICAL_ADDRESS) /* old */ #define SK_ADDR_PHYSICAL_ADDRESS 1 +#define SK_ADDR_CLEAR_LOGICAL 2 +#define SK_ADDR_SET_LOGICAL 4 /* ----- Override return values ----- */ @@ -155,7 +171,7 @@ /* ----- Partitioning of excact match table ----- */ -#define SK_ADDR_EXACT_MATCHES 16 /* #Exact match entries. */ +#define SK_ADDR_EXACT_MATCHES 16 /* #Exact match entries. */ #define SK_ADDR_FIRST_MATCH_RLMT 1 #define SK_ADDR_LAST_MATCH_RLMT 2 @@ -164,39 +180,43 @@ /* ----- SkAddrMcAdd/SkAddrMcUpdate return values ----- */ -#define SK_MC_FILTERING_EXACT 0 /* Exact filtering. */ -#define SK_MC_FILTERING_INEXACT 1 /* Inexact filtering. */ +#define SK_MC_FILTERING_EXACT 0 /* Exact filtering. */ +#define SK_MC_FILTERING_INEXACT 1 /* Inexact filtering. */ /* ----- Additional SkAddrMcAdd return values ----- */ -#define SK_MC_ILLEGAL_ADDRESS 2 /* Illegal address. */ -#define SK_MC_ILLEGAL_PORT 3 /* Illegal port (not the active one). */ -#define SK_MC_RLMT_OVERFLOW 4 /* Too many RLMT mc addresses. */ +#define SK_MC_ILLEGAL_ADDRESS 2 /* Illegal address. */ +#define SK_MC_ILLEGAL_PORT 3 /* Illegal port (not the active one). */ +#define SK_MC_RLMT_OVERFLOW 4 /* Too many RLMT mc addresses. */ /* Promiscuous mode bits ----- */ -#define SK_PROM_MODE_NONE 0 /* Normal receive. */ -#define SK_PROM_MODE_LLC 1 /* Receive all LLC frames. */ -#define SK_PROM_MODE_ALL_MC 2 /* Receive all multicast frames. */ -/* #define SK_PROM_MODE_NON_LLC 4 */ /* Receive all non-LLC frames. */ +#define SK_PROM_MODE_NONE 0 /* Normal receive. */ +#define SK_PROM_MODE_LLC 1 /* Receive all LLC frames. */ +#define SK_PROM_MODE_ALL_MC 2 /* Receive all multicast frames. */ +/* #define SK_PROM_MODE_NON_LLC 4 */ /* Receive all non-LLC frames. */ /* Macros */ #ifndef SK_ADDR_EQUAL +/* + * "&" instead of "&&" allows better optimization on IA-64. + * The replacement is safe here, as all bytes exist. + */ #ifndef SK_ADDR_DWORD_COMPARE #define SK_ADDR_EQUAL(A1,A2) ( \ - ((SK_U8 *)(A1))[5] == ((SK_U8 *)(A2))[5] && \ - ((SK_U8 *)(A1))[4] == ((SK_U8 *)(A2))[4] && \ - ((SK_U8 *)(A1))[3] == ((SK_U8 *)(A2))[3] && \ - ((SK_U8 *)(A1))[2] == ((SK_U8 *)(A2))[2] && \ - ((SK_U8 *)(A1))[1] == ((SK_U8 *)(A2))[1] && \ - ((SK_U8 *)(A1))[0] == ((SK_U8 *)(A2))[0]) + (((SK_U8 *)(A1))[5] == ((SK_U8 *)(A2))[5]) & \ + (((SK_U8 *)(A1))[4] == ((SK_U8 *)(A2))[4]) & \ + (((SK_U8 *)(A1))[3] == ((SK_U8 *)(A2))[3]) & \ + (((SK_U8 *)(A1))[2] == ((SK_U8 *)(A2))[2]) & \ + (((SK_U8 *)(A1))[1] == ((SK_U8 *)(A2))[1]) & \ + (((SK_U8 *)(A1))[0] == ((SK_U8 *)(A2))[0])) #else /* SK_ADDR_DWORD_COMPARE */ #define SK_ADDR_EQUAL(A1,A2) ( \ - *(SK_U32 *)&(((SK_U8 *)(A1))[2]) == *(SK_U32 *)&(((SK_U8 *)(A2))[2]) && \ - *(SK_U32 *)&(((SK_U8 *)(A1))[0]) == *(SK_U32 *)&(((SK_U8 *)(A2))[0])) + (*(SK_U32 *)&(((SK_U8 *)(A1))[2]) == *(SK_U32 *)&(((SK_U8 *)(A2))[2])) & \ + (*(SK_U32 *)&(((SK_U8 *)(A1))[0]) == *(SK_U32 *)&(((SK_U8 *)(A2))[0]))) #endif /* SK_ADDR_DWORD_COMPARE */ -#endif /* SK_ADDR_EQUAL */ +#endif /* SK_ADDR_EQUAL */ /* typedefs *******************************************************************/ @@ -204,104 +224,120 @@ SK_U8 a[SK_MAC_ADDR_LEN]; } SK_MAC_ADDR; + /* SK_FILTER is used to ensure alignment of the filter. */ typedef union s_InexactFilter { SK_U8 Bytes[8]; - SK_U64 Val; /* Dummy entry for alignment only. */ + SK_U64 Val; /* Dummy entry for alignment only. */ } SK_FILTER64; + +typedef struct s_AddrNet SK_ADDR_NET; + + typedef struct s_AddrPort { /* ----- Public part (read-only) ----- */ - SK_MAC_ADDR PermanentMacAddress; /* Physical MAC Address. */ - SK_MAC_ADDR CurrentMacAddress; /* Physical MAC Address. */ - int PromMode; /* Promiscuous Mode. */ + SK_MAC_ADDR CurrentMacAddress; /* Current physical MAC Address. */ + SK_MAC_ADDR PermanentMacAddress; /* Permanent physical MAC Address. */ + int PromMode; /* Promiscuous Mode. */ /* ----- Private part ----- */ + SK_MAC_ADDR PreviousMacAddress; /* Prev. phys. MAC Address. */ SK_BOOL CurrentMacAddressSet; /* CurrentMacAddress is set. */ - SK_MAC_ADDR PreviousMacAddress; /* Prev. phys. MAC Address. */ + SK_U8 Align01; + SK_U32 FirstExactMatchRlmt; SK_U32 NextExactMatchRlmt; SK_U32 FirstExactMatchDrv; SK_U32 NextExactMatchDrv; SK_MAC_ADDR Exact[SK_ADDR_EXACT_MATCHES]; - SK_FILTER64 InexactFilter; /* For 64-bit hash register. */ + SK_FILTER64 InexactFilter; /* For 64-bit hash register. */ } SK_ADDR_PORT; + +struct s_AddrNet { +/* ----- Public part (read-only) ----- */ + + SK_MAC_ADDR CurrentMacAddress; /* Logical MAC Address. */ + SK_MAC_ADDR PermanentMacAddress; /* Logical MAC Address. */ + +/* ----- Private part ----- */ + + SK_U32 ActivePort; /* View of module ADDR. */ + SK_BOOL CurrentMacAddressSet; /* CurrentMacAddress is set. */ + SK_U8 Align01; + SK_U16 Align02; +}; + + typedef struct s_Addr { /* ----- Public part (read-only) ----- */ + SK_ADDR_NET Net[SK_MAX_NETS]; SK_ADDR_PORT Port[SK_MAX_MACS]; - SK_MAC_ADDR PermanentMacAddress; /* Logical MAC Address. */ - SK_MAC_ADDR CurrentMacAddress; /* Logical MAC Address. */ /* ----- Private part ----- */ - -#if 0 - SK_BOOL Initialized; /* Flag: Addr module is initialized. */ -#endif /* 0 */ - SK_BOOL CurrentMacAddressSet; /* CurrentMacAddress is set. */ - SK_U32 ActivePort; /* Vie of module ADDR. */ } SK_ADDR; /* function prototypes ********************************************************/ #ifndef SK_KR_PROTO -/* Functions provided by SkRlmt */ +/* Functions provided by SkAddr */ /* ANSI/C++ compliant function prototypes */ extern int SkAddrInit( SK_AC *pAC, SK_IOC IoC, - int Level); + int Level); extern int SkAddrMcClear( SK_AC *pAC, SK_IOC IoC, - SK_U32 PortIdx, - int Flags); + SK_U32 PortNumber, + int Flags); extern int SkAddrMcAdd( SK_AC *pAC, SK_IOC IoC, - SK_U32 PortIdx, + SK_U32 PortNumber, SK_MAC_ADDR *pMc, - int Flags); + int Flags); extern int SkAddrMcUpdate( SK_AC *pAC, SK_IOC IoC, - SK_U32 PortIdx); + SK_U32 PortNumber); extern int SkAddrOverride( SK_AC *pAC, SK_IOC IoC, - SK_U32 PortIdx, + SK_U32 PortNumber, SK_MAC_ADDR *pNewAddr, - int Flags); + int Flags); extern int SkAddrPromiscuousChange( SK_AC *pAC, SK_IOC IoC, - SK_U32 PortIdx, - int NewPromMode); + SK_U32 PortNumber, + int NewPromMode); extern int SkAddrSwap( SK_AC *pAC, SK_IOC IoC, - SK_U32 FromPortIdx, - SK_U32 ToPortIdx); + SK_U32 FromPortNumber, + SK_U32 ToPortNumber); #else /* defined(SK_KR_PROTO)) */ /* Non-ANSI/C++ compliant function prototypes */ -xxxx /* not supported yet - force error */ +#error KR-style prototypes are not yet provided. #endif /* defined(SK_KR_PROTO)) */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/h/skcsum.h linux.20p6/drivers/net/sk98lin/h/skcsum.h --- linux.vanilla/drivers/net/sk98lin/h/skcsum.h Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/h/skcsum.h Tue Jun 19 09:46:01 2001 @@ -2,16 +2,15 @@ * * Name: skcsum.h * Project: GEnesis - SysKonnect SK-NET Gigabit Ethernet (SK-98xx) - * Version: $Revision: 1.5 $ - * Date: $Date: 2000/02/21 12:10:05 $ + * Version: $Revision: 1.9 $ + * Date: $Date: 2001/02/06 11:21:39 $ * Purpose: Store/verify Internet checksum in send/receive packets. * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2001 SysKonnect GmbH. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +26,19 @@ * History: * * $Log: skcsum.h,v $ + * Revision 1.9 2001/02/06 11:21:39 rassmann + * Editorial changes. + * + * Revision 1.8 2001/02/06 11:15:36 rassmann + * Supporting two nets on dual-port adapters. + * + * Revision 1.7 2000/06/29 13:17:05 rassmann + * Corrected reception of a packet with UDP checksum == 0 (which means there + * is no UDP checksum). + * + * Revision 1.6 2000/02/28 12:33:44 cgoos + * Changed C++ style comments to C style. + * * Revision 1.5 2000/02/21 12:10:05 cgoos * Fixed license comment. * @@ -110,27 +122,32 @@ * * SKCS_STATUS_UNKNOWN_IP_VERSION - Not an IP v4 frame. * SKCS_STATUS_IP_CSUM_ERROR - IP checksum error. + * SKCS_STATUS_IP_CSUM_ERROR_TCP - IP checksum error in TCP frame. + * SKCS_STATUS_IP_CSUM_ERROR_UDP - IP checksum error in UDP frame * SKCS_STATUS_IP_FRAGMENT - IP fragment (IP checksum ok). * SKCS_STATUS_IP_CSUM_OK - IP checksum ok (not a TCP or UDP frame). * SKCS_STATUS_TCP_CSUM_ERROR - TCP checksum error (IP checksum ok). * SKCS_STATUS_UDP_CSUM_ERROR - UDP checksum error (IP checksum ok). * SKCS_STATUS_TCP_CSUM_OK - IP and TCP checksum ok. * SKCS_STATUS_UDP_CSUM_OK - IP and UDP checksum ok. + * SKCS_STATUS_IP_CSUM_OK_NO_UDP - IP checksum OK and no UDP checksum. */ #ifndef SKCS_OVERWRITE_STATUS /* User overwrite? */ #define SKCS_STATUS int /* Define status type. */ #define SKCS_STATUS_UNKNOWN_IP_VERSION 1 -#define SKCS_STATUS_IP_CSUM_ERROR 2 -#define SKCS_STATUS_IP_FRAGMENT 3 -#define SKCS_STATUS_IP_CSUM_OK 4 -#define SKCS_STATUS_TCP_CSUM_ERROR 5 -#define SKCS_STATUS_UDP_CSUM_ERROR 6 -#define SKCS_STATUS_TCP_CSUM_OK 7 -#define SKCS_STATUS_UDP_CSUM_OK 8 -// needed for Microsoft +#define SKCS_STATUS_IP_CSUM_ERROR 2 +#define SKCS_STATUS_IP_FRAGMENT 3 +#define SKCS_STATUS_IP_CSUM_OK 4 +#define SKCS_STATUS_TCP_CSUM_ERROR 5 +#define SKCS_STATUS_UDP_CSUM_ERROR 6 +#define SKCS_STATUS_TCP_CSUM_OK 7 +#define SKCS_STATUS_UDP_CSUM_OK 8 +/* needed for Microsoft */ #define SKCS_STATUS_IP_CSUM_ERROR_UDP 9 #define SKCS_STATUS_IP_CSUM_ERROR_TCP 10 +/* UDP checksum may be omitted */ +#define SKCS_STATUS_IP_CSUM_OK_NO_UDP 11 #endif /* !SKCS_OVERWRITE_STATUS */ /* Clear protocol statistics event. */ @@ -181,13 +198,13 @@ */ typedef struct s_Csum { /* Enabled receive SK_PROTO_XXX bit flags. */ - unsigned ReceiveFlags; + unsigned ReceiveFlags[SK_MAX_NETS]; #ifdef TX_CSUM - unsigned TransmitFlags; -#endif // TX_CSUM + unsigned TransmitFlags[SK_MAX_NETS]; +#endif /* TX_CSUM */ /* The protocol statistics structure; one per supported protocol. */ - SKCS_PROTO_STATS ProtoStats[SKCS_NUM_PROTOCOLS]; + SKCS_PROTO_STATS ProtoStats[SK_MAX_NETS][SKCS_NUM_PROTOCOLS]; } SK_CSUM; /* @@ -225,17 +242,20 @@ SK_AC *pAc, void *pIpHeader, unsigned Checksum1, - unsigned Checksum2); + unsigned Checksum2, + int NetNumber); extern void SkCsGetSendInfo( - SK_AC *pAc, - void *pIpHeader, - SKCS_PACKET_INFO *pPacketInfo); + SK_AC *pAc, + void *pIpHeader, + SKCS_PACKET_INFO *pPacketInfo, + int NetNumber); extern void SkCsSetReceiveFlags( SK_AC *pAc, unsigned ReceiveFlags, unsigned *pChecksum1Offset, - unsigned *pChecksum2Offset); + unsigned *pChecksum2Offset, + int NetNumber); #endif /* __INC_SKCSUM_H */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/h/skdrv1st.h linux.20p6/drivers/net/sk98lin/h/skdrv1st.h --- linux.vanilla/drivers/net/sk98lin/h/skdrv1st.h Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/h/skdrv1st.h Tue Jun 19 09:46:01 2001 @@ -2,8 +2,8 @@ * * Name: skdrv1st.h * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.8 $ - * Date: $Date: 2000/02/21 12:19:18 $ + * Version: $Revision: 1.9 $ + * Date: $Date: 2001/01/22 14:16:04 $ * Purpose: First header file for driver and all other modules * ******************************************************************************/ @@ -27,6 +27,11 @@ * History: * * $Log: skdrv1st.h,v $ + * Revision 1.9 2001/01/22 14:16:04 mlindner + * added ProcFs functionality + * Dual Net functionality integrated + * Rlmt networks added + * * Revision 1.8 2000/02/21 12:19:18 cgoos * Added default for SK_DEBUG_CHKMOD/_CHKCAT * @@ -140,6 +145,7 @@ // #define SK_RLMT_SLOW_LOOKAHEAD #define SK_MAX_MACS 2 +#define SK_MAX_NETS 2 #define SK_IOC char* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/h/skdrv2nd.h linux.20p6/drivers/net/sk98lin/h/skdrv2nd.h --- linux.vanilla/drivers/net/sk98lin/h/skdrv2nd.h Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/h/skdrv2nd.h Tue Jun 19 09:46:01 2001 @@ -2,8 +2,8 @@ * * Name: skdrv2nd.h * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.9 $ - * Date: $Date: 2000/02/21 10:39:55 $ + * Version: $Revision: 1.12 $ + * Date: $Date: 2001/03/01 12:52:15 $ * Purpose: Second header file for driver and all other modules * ******************************************************************************/ @@ -27,6 +27,22 @@ * History: * * $Log: skdrv2nd.h,v $ + * Revision 1.12 2001/03/01 12:52:15 mlindner + * Fixed ring size + * + * Revision 1.11 2001/02/19 13:28:02 mlindner + * Changed PNMI parameter values + * + * Revision 1.10 2001/01/22 14:16:04 mlindner + * added ProcFs functionality + * Dual Net functionality integrated + * Rlmt networks added + * + * Revision 1.1 2000/10/05 19:46:50 phargrov + * Add directory src/vipk_devs_nonlbl/vipk_sk98lin/ + * This is the SysKonnect SK-98xx Gigabit Ethernet driver, + * contributed by SysKonnect. + * * Revision 1.9 2000/02/21 10:39:55 cgoos * Added flag for jumbo support usage. * @@ -139,7 +155,7 @@ */ #define TX_RING_SIZE (8*1024) -#define RX_RING_SIZE (24*1024) +#define RX_RING_SIZE (TX_RING_SIZE*3) /* * Buffer size for ethernet packets @@ -167,6 +183,12 @@ #define SK_DRIVER_RESET(pAC, IoC) 0 #define SK_DRIVER_SENDEVENT(pAC, IoC) 0 #define SK_DRIVER_SELFTEST(pAC, IoC) 0 +/* For get mtu you must add an own function */ +#define SK_DRIVER_GET_MTU(pAc,IoC,i) 0 +#define SK_DRIVER_SET_MTU(pAc,IoC,i,v) 0 +#define SK_DRIVER_PRESET_MTU(pAc,IoC,i,v) 0 + + /* TX and RX descriptors *****************************************************/ @@ -366,6 +388,20 @@ int PortIndex; /* index number of port (0 or 1) */ }; + +typedef struct s_DevNet DEV_NET; + +struct s_DevNet { + int PortNr; + int NetNr; + int Mtu; + int Up; + SK_AC *pAC; +}; + + + + typedef struct s_RxPort RX_PORT; struct s_RxPort { @@ -382,6 +418,7 @@ int PortIndex; /* index number of port (0 or 1) */ }; + typedef struct s_PerStrm PER_STRM; #define SK_ALLOC_IRQ 0x00000001 @@ -404,7 +441,8 @@ SK_RLMT Rlmt; /* for rlmt module */ spinlock_t SlowPathLock; /* Normal IRQ lock */ SK_PNMI_STRUCT_DATA PnmiStruct; /* structure to get all Pnmi-Data */ - int RlmtMode; /* link check mode to set */ + int RlmtMode; /* link check mode to set */ + int RlmtNets; /* Number of nets */ SK_IOC IoBase; /* register set of adapter */ int BoardLevel; /* level of active hw init (0-2) */ @@ -412,11 +450,11 @@ SK_U32 AllocFlag; /* flag allocation of resources */ struct pci_dev PciDev; /* for access to pci config space */ SK_U32 PciDevId; /* pci device id */ - struct device *dev; /* pointer to device struct */ + struct device *dev[2]; /* pointer to device struct */ char Name[30]; /* driver name */ struct device *Next; /* link all devices (for clearing) */ int RxBufSize; /* length of receive buffers */ - struct net_device_stats stats; /* linux 'netstat -i' statistics */ + struct net_device_stats stats; /* linux 'netstat -i' statistics */ int Index; /* internal board index number */ SK_BOOL JumboActivated; /* jumbo support ever activated */ @@ -428,10 +466,11 @@ int PromiscCount; /* promiscuous mode counter */ int AllMultiCount; /* allmulticast mode counter */ int MulticCount; /* number of different MC */ - /* addresses for this board */ - /* (may be more than HW can)*/ + /* addresses for this board */ + /* (may be more than HW can)*/ - int ActivePort; /* the active XMAC port */ + int ActivePort; /* the active XMAC port */ + int MaxPorts; /* number of activated ports */ int TxDescrPerRing; /* # of descriptors per tx ring */ int RxDescrPerRing; /* # of descriptors per rx ring */ @@ -447,7 +486,6 @@ SK_BOOL CheckQueue; /* check event queue soon */ }; - #endif /* __INC_SKDRV2ND_H */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/h/skgehw.h linux.20p6/drivers/net/sk98lin/h/skgehw.h --- linux.vanilla/drivers/net/sk98lin/h/skgehw.h Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/h/skgehw.h Tue Jun 19 09:59:54 2001 @@ -2,8 +2,8 @@ * * Name: skgehw.h * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.34 $ - * Date: $Date: 1999/11/22 13:53:40 $ + * Version: $Revision: 1.36 $ + * Date: $Date: 2000/11/09 12:32:49 $ * Purpose: Defines and Macros for the Gigabit Ethernet Adapter Product * Family * @@ -11,8 +11,7 @@ /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2000 SysKonnect GmbH. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +26,12 @@ * * History: * $Log: skgehw.h,v $ + * Revision 1.36 2000/11/09 12:32:49 rassmann + * Renamed variables. + * + * Revision 1.35 2000/05/19 10:17:13 cgoos + * Added inactivity check in PHY_READ (in DEBUG mode only). + * * Revision 1.34 1999/11/22 13:53:40 cgoos * Changed license header to GPL. * @@ -177,27 +182,27 @@ */ #define PCI_VENDOR_ID 0x00 /* 16 bit Vendor ID */ #define PCI_DEVICE_ID 0x02 /* 16 bit Device ID */ -#define PCI_COMMAND 0x04 /* 16 bit Command */ -#define PCI_STATUS 0x06 /* 16 bit Status */ -#define PCI_REV_ID 0x08 /* 8 bit Revision ID */ +#define PCI_COMMAND 0x04 /* 16 bit Command */ +#define PCI_STATUS 0x06 /* 16 bit Status */ +#define PCI_REV_ID 0x08 /* 8 bit Revision ID */ #define PCI_CLASS_CODE 0x09 /* 24 bit Class Code */ #define PCI_CACHE_LSZ 0x0c /* 8 bit Cache Line Size */ -#define PCI_LAT_TIM 0x0d /* 8 bit Latency Timer */ +#define PCI_LAT_TIM 0x0d /* 8 bit Latency Timer */ #define PCI_HEADER_T 0x0e /* 8 bit Header Type */ -#define PCI_BIST 0x0f /* 8 bit Built-in selftest */ +#define PCI_BIST 0x0f /* 8 bit Built-in selftest */ #define PCI_BASE_1ST 0x10 /* 32 bit 1st Base address */ #define PCI_BASE_2ND 0x14 /* 32 bit 2nd Base address */ /* Byte 18..2b: reserved */ -#define PCI_SUB_VID 0x2c /* 16 bit Subsystem Vendor ID */ -#define PCI_SUB_ID 0x2e /* 16 bit Subsystem ID */ +#define PCI_SUB_VID 0x2c /* 16 bit Subsystem Vendor ID */ +#define PCI_SUB_ID 0x2e /* 16 bit Subsystem ID */ #define PCI_BASE_ROM 0x30 /* 32 bit Expansion ROM Base Address */ /* Byte 34..33: reserved */ -#define PCI_CAP_PTR 0x34 /* 8 bit Capabilities Ptr */ +#define PCI_CAP_PTR 0x34 /* 8 bit Capabilities Ptr */ /* Byte 35..3b: reserved */ #define PCI_IRQ_LINE 0x3c /* 8 bit Interrupt Line */ -#define PCI_IRQ_PIN 0x3d /* 8 bit Interrupt Pin */ -#define PCI_MIN_GNT 0x3e /* 8 bit Min_Gnt */ -#define PCI_MAX_LAT 0x3f /* 8 bit Max_Lat */ +#define PCI_IRQ_PIN 0x3d /* 8 bit Interrupt Pin */ +#define PCI_MIN_GNT 0x3e /* 8 bit Min_Gnt */ +#define PCI_MAX_LAT 0x3f /* 8 bit Max_Lat */ /* Device Dependent Region */ #define PCI_OUR_REG_1 0x40 /* 32 bit Our Register 1 */ #define PCI_OUR_REG_2 0x44 /* 32 bit Our Register 2 */ @@ -230,34 +235,34 @@ /* PCI_DEVICE_ID 16 bit Device ID */ /* Values for Vendor ID and Device ID shall be patched into the code */ /* PCI_COMMAND 16 bit Command */ - /* Bit 15..10: reserved */ -#define PCI_FBTEN (1<<9) /* Bit 9: Fast Back-To-Back enable */ -#define PCI_SERREN (1<<8) /* Bit 8: SERR enable */ -#define PCI_ADSTEP (1<<7) /* Bit 7: Address Stepping */ -#define PCI_PERREN (1<<6) /* Bit 6: Parity Report Response enable */ + /* Bit 15..10: reserved */ +#define PCI_FBTEN (1<<9) /* Bit 9: Fast Back-To-Back enable */ +#define PCI_SERREN (1<<8) /* Bit 8: SERR enable */ +#define PCI_ADSTEP (1<<7) /* Bit 7: Address Stepping */ +#define PCI_PERREN (1<<6) /* Bit 6: Parity Report Response enable */ #define PCI_VGA_SNOOP (1<<5) /* Bit 5: VGA palette snoop */ -#define PCI_MWIEN (1<<4) /* Bit 4: Memory write an inv cycl ena */ -#define PCI_SCYCEN (1<<3) /* Bit 3: Special Cycle enable */ -#define PCI_BMEN (1<<2) /* Bit 2: Bus Master enable */ -#define PCI_MEMEN (1<<1) /* Bit 1: Memory Space Access enable */ -#define PCI_IOEN (1<<0) /* Bit 0: IO Space Access enable */ +#define PCI_MWIEN (1<<4) /* Bit 4: Memory write an inv cycl ena */ +#define PCI_SCYCEN (1<<3) /* Bit 3: Special Cycle enable */ +#define PCI_BMEN (1<<2) /* Bit 2: Bus Master enable */ +#define PCI_MEMEN (1<<1) /* Bit 1: Memory Space Access enable */ +#define PCI_IOEN (1<<0) /* Bit 0: IO Space Access enable */ /* PCI_STATUS 16 bit Status */ -#define PCI_PERR (1<<15) /* Bit 15: Parity Error */ -#define PCI_SERR (1<<14) /* Bit 14: Signaled SERR */ -#define PCI_RMABORT (1<<13) /* Bit 13: Received Master Abort */ -#define PCI_RTABORT (1<<12) /* Bit 12: Received Target Abort */ - /* Bit 11: reserved */ -#define PCI_DEVSEL (3<<9) /* Bit 10..9: DEVSEL Timing */ +#define PCI_PERR (1<<15) /* Bit 15: Parity Error */ +#define PCI_SERR (1<<14) /* Bit 14: Signaled SERR */ +#define PCI_RMABORT (1<<13) /* Bit 13: Received Master Abort */ +#define PCI_RTABORT (1<<12) /* Bit 12: Received Target Abort */ + /* Bit 11: reserved */ +#define PCI_DEVSEL (3<<9) /* Bit 10..9: DEVSEL Timing */ #define PCI_DEV_FAST (0<<9) /* fast */ #define PCI_DEV_MEDIUM (1<<9) /* medium */ #define PCI_DEV_SLOW (2<<9) /* slow */ #define PCI_DATAPERR (1<<8) /* Bit 8: DATA Parity error detected */ -#define PCI_FB2BCAP (1<<7) /* Bit 7: Fast Back-to-Back Capability */ -#define PCI_UDF (1<<6) /* Bit 6: User Defined Features */ +#define PCI_FB2BCAP (1<<7) /* Bit 7: Fast Back-to-Back Capability */ +#define PCI_UDF (1<<6) /* Bit 6: User Defined Features */ #define PCI_66MHZCAP (1<<5) /* Bit 5: 66 MHz PCI bus clock capable */ -#define PCI_NEWCAP (1<<4) /* Bit 4: New cap. list implemented */ - /* Bit 3..0: reserved */ +#define PCI_NEWCAP (1<<4) /* Bit 4: New cap. list implemented */ + /* Bit 3..0: reserved */ #define PCI_ERRBITS (PCI_PERR | PCI_SERR | PCI_RMABORT | PCI_RTABORT |\ PCI_DATAPERR) @@ -272,59 +277,59 @@ /* PCI_HEADER_T 8 bit Header Type */ #define PCI_HD_MF_DEV (1<<7) /* Bit 7: 0= single, 1= multi-func dev */ -#define PCI_HD_TYPE 0x7f /* Bit 6..0: Header Layout 0= normal */ +#define PCI_HD_TYPE 0x7f /* Bit 6..0: Header Layout 0= normal */ /* PCI_BIST 8 bit Built-in selftest */ /* Built-in Self test not supported (optional) */ /* PCI_BASE_1ST 32 bit 1st Base address */ -#define PCI_MEMSIZE 0x4000L /* use 16 kB Memory Base */ +#define PCI_MEMSIZE 0x4000L /* use 16 kB Memory Base */ #define PCI_MEMBASE_MSK 0xffffc000L /* Bit 31..14: Memory Base Address */ #define PCI_MEMSIZE_MSK 0x00003ff0L /* Bit 13.. 4: Memory Size Req. */ -#define PCI_PREFEN (1L<<3) /* Bit 3: Prefetchable */ -#define PCI_MEM_TYP (3L<<2) /* Bit 2.. 1: Memory Type */ +#define PCI_PREFEN (1L<<3) /* Bit 3: Prefetchable */ +#define PCI_MEM_TYP (3L<<2) /* Bit 2.. 1: Memory Type */ #define PCI_MEM32BIT (0L<<1) /* Base addr anywhere in 32 Bit range */ -#define PCI_MEM1M (1L<<1) /* Base addr below 1 MegaByte */ +#define PCI_MEM1M (1L<<1) /* Base addr below 1 MegaByte */ #define PCI_MEM64BIT (2L<<1) /* Base addr anywhere in 64 Bit range */ #define PCI_MEMSPACE (1L<<0) /* Bit 0: Memory Space Indic. */ /* PCI_BASE_2ND 32 bit 2nd Base address */ -#define PCI_IOBASE 0xffffff00L /* Bit 31..8: I/O Base address */ -#define PCI_IOSIZE 0x000000fcL /* Bit 7..2: I/O Size Requirements */ - /* Bit 1: reserved */ -#define PCI_IOSPACE (1L<<0) /* Bit 0: I/O Space Indicator */ +#define PCI_IOBASE 0xffffff00L /* Bit 31..8: I/O Base address */ +#define PCI_IOSIZE 0x000000fcL /* Bit 7..2: I/O Size Requirements */ + /* Bit 1: reserved */ +#define PCI_IOSPACE (1L<<0) /* Bit 0: I/O Space Indicator */ /* PCI_BASE_ROM 32 bit Expansion ROM Base Address */ -#define PCI_ROMBASE (0xfffeL<<17) /* Bit 31..17: ROM BASE address (1st)*/ -#define PCI_ROMBASZ (0x1cL<<14) /* Bit 16..14: Treat as BASE or SIZE */ -#define PCI_ROMSIZE (0x38L<<11) /* Bit 13..11: ROM Size Requirements */ - /* Bit 10.. 1: reserved */ -#define PCI_ROMEN (0x1L<<0) /* Bit 0: Address Decode enable */ +#define PCI_ROMBASE (0xfffeL<<17) /* Bit 31..17: ROM BASE address (1st)*/ +#define PCI_ROMBASZ (0x1cL<<14) /* Bit 16..14: Treat as BASE or SIZE */ +#define PCI_ROMSIZE (0x38L<<11) /* Bit 13..11: ROM Size Requirements */ + /* Bit 10.. 1: reserved */ +#define PCI_ROMEN (0x1L<<0) /* Bit 0: Address Decode enable */ /* Device Dependent Region */ /* PCI_OUR_REG_1 32 bit Our Register 1 */ - /* Bit 31..26: reserved */ -#define PCI_VIO (1L<<25) /* Bit 25: PCI IO Voltage, */ - /* 0 = 3.3V / 1 = 5V */ -#define PCI_EN_BOOT (1L<<24) /* Bit 24: Enable BOOT via ROM */ - /* 1 = Don't boot wth ROM*/ - /* 0 = Boot with ROM */ -#define PCI_EN_IO (1L<<23) /* Bit 23: Mapping to IO space */ + /* Bit 31..26: reserved */ +#define PCI_VIO (1L<<25) /* Bit 25: PCI IO Voltage, */ + /* 0 = 3.3V / 1 = 5V */ +#define PCI_EN_BOOT (1L<<24) /* Bit 24: Enable BOOT via ROM */ + /* 1 = Don't boot wth ROM*/ + /* 0 = Boot with ROM */ +#define PCI_EN_IO (1L<<23) /* Bit 23: Mapping to IO space */ #define PCI_EN_FPROM (1L<<22) /* Bit 22: FLASH mapped to mem? */ - /* 1 = Map Flash to Mem */ - /* 0 = Disable addr. dec*/ + /* 1 = Map Flash to Mem */ + /* 0 = Disable addr. dec*/ #define PCI_PAGESIZE (3L<<20) /* Bit 21..20: FLASH Page Size */ -#define PCI_PAGE_16 (0L<<20) /* 16 k pages */ +#define PCI_PAGE_16 (0L<<20) /* 16 k pages */ #define PCI_PAGE_32K (1L<<20) /* 32 k pages */ #define PCI_PAGE_64K (2L<<20) /* 64 k pages */ #define PCI_PAGE_128K (3L<<20) /* 128 k pages */ - /* Bit 19: reserved */ -#define PCI_PAGEREG (7L<<16) /* Bit 18..16: Page Register */ -#define PCI_NOTAR (1L<<15) /* Bit 15: No turnaround cycle */ + /* Bit 19: reserved */ +#define PCI_PAGEREG (7L<<16) /* Bit 18..16: Page Register */ +#define PCI_NOTAR (1L<<15) /* Bit 15: No turnaround cycle */ #define PCI_FORCE_BE (1L<<14) /* Bit 14: Assert all BEs on MR */ -#define PCI_DIS_MRL (1L<<13) /* Bit 13: Disable Mem R Line */ -#define PCI_DIS_MRM (1L<<12) /* Bit 12: Disable Mem R multip */ -#define PCI_DIS_MWI (1L<<11) /* Bit 11: Disable Mem W & inv */ +#define PCI_DIS_MRL (1L<<13) /* Bit 13: Disable Mem R Line */ +#define PCI_DIS_MRM (1L<<12) /* Bit 12: Disable Mem R multip */ +#define PCI_DIS_MWI (1L<<11) /* Bit 11: Disable Mem W & inv */ #define PCI_DISC_CLS (1L<<10) /* Bit 10: Disc: cacheLsz bound */ #define PCI_BURST_DIS (1L<<9) /* Bit 9: Burst Disable */ #define PCI_DIS_PCI_CLK (1L<<8) /* Bit 8: Disable PCI clock driv*/ @@ -334,9 +339,9 @@ /* PCI_OUR_REG_2 32 bit Our Register 2 */ #define PCI_VPD_WR_THR (0xffL<<24) /* Bit 31..24: VPD Write Threshold */ -#define PCI_DEV_SEL (0x7fL<<17) /* Bit 23..17: EEPROM Device Select */ +#define PCI_DEV_SEL (0x7fL<<17) /* Bit 23..17: EEPROM Device Select */ #define PCI_VPD_ROM_SZ (7L<<14) /* Bit 16..14: VPD ROM Size */ - /* Bit 13..12: reserved */ + /* Bit 13..12: reserved */ #define PCI_PATCH_DIR (0xfL<<8) /* Bit 11.. 8: Ext Patchs dir 3..0 */ #define PCI_PATCH_DIR_0 (1L<<8) #define PCI_PATCH_DIR_1 (1L<<9) @@ -349,27 +354,27 @@ #define PCI_EXT_PATCH_3 (1L<<7) #define PCI_EN_DUMMY_RD (1L<<3) /* Bit 3: Enable Dummy Read */ #define PCI_REV_DESC (1L<<2) /* Bit 2: Reverse Desc. Bytes */ - /* Bit 1: reserved */ + /* Bit 1: reserved */ #define PCI_USEDATA64 (1L<<0) /* Bit 0: Use 64Bit Data bus ext*/ /* Power Management Region */ /* PCI_PM_CAP_REG 16 bit Power Management Capabilities */ -#define PCI_PME_SUP (0x1f<<11) /* Bit 15..11: PM Manag. Event Sup */ +#define PCI_PME_SUP (0x1f<<11) /* Bit 15..11: PM Manag. Event Sup */ #define PCI_PM_D2_SUB (1<<10) /* Bit 10: D2 Support Bit */ #define PCI_PM_D1_SUB (1<<9) /* Bit 9: D1 Support Bit */ - /* Bit 8..6: reserved */ -#define PCI_PM_DSI (1<<5) /* Bit 5: Device Specific Init.*/ -#define PCI_PM_APS (1<<4) /* Bit 4: Auxialiary Power Src */ + /* Bit 8..6: reserved */ +#define PCI_PM_DSI (1<<5) /* Bit 5: Device Specific Init.*/ +#define PCI_PM_APS (1<<4) /* Bit 4: Auxialiary Power Src */ #define PCI_PME_CLOCK (1<<3) /* Bit 3: PM Event Clock */ -#define PCI_PM_VER (7<<0) /* Bit 2..0: PM PCI Spec. version */ +#define PCI_PM_VER (7<<0) /* Bit 2..0: PM PCI Spec. version */ /* PCI_PM_CTL_STS 16 bit Power Manag. Control/Status */ #define PCI_PME_STATUS (1<<15) /* Bit 15: PGA doesn't sup. PME# */ #define PCI_PM_DAT_SCL (3<<13) /* Bit 14..13: dat reg Scaling factor*/ #define PCI_PM_DAT_SEL (0xf<<9) /* Bit 12.. 9: PM data selector field*/ -#define PCI_PME_EN (1<<8) /* Bit 8: PGA doesn't sup. PME# */ - /* Bit 7.. 2: reserved */ +#define PCI_PME_EN (1<<8) /* Bit 8: PGA doesn't sup. PME# */ + /* Bit 7.. 2: reserved */ #define PCI_PM_STATE (3<<0) /* Bit 1.. 0: Power Management State*/ #define PCI_PM_STATE_D0 (0<<0) /* D0: Operational (default) */ #define PCI_PM_STATE_D1 (1<<0) /* D1: not supported */ @@ -385,22 +390,22 @@ * Control Register File: * Bank 0 */ -#define B0_RAP 0x0000 /* 8 bit Register Address Port */ +#define B0_RAP 0x0000 /* 8 bit Register Address Port */ /* 0x0001 - 0x0003: reserved */ -#define B0_CTST 0x0004 /* 16 bit Control/Status register */ -#define B0_LED 0x0006 /* 8 Bit LED register */ +#define B0_CTST 0x0004 /* 16 bit Control/Status register */ +#define B0_LED 0x0006 /* 8 Bit LED register */ /* 0x0007: reserved */ -#define B0_ISRC 0x0008 /* 32 bit Interrupt Source Register */ -#define B0_IMSK 0x000c /* 32 bit Interrupt Mask Register */ -#define B0_HWE_ISRC 0x0010 /* 32 bit HW Error Interrupt Src Reg */ -#define B0_HWE_IMSK 0x0014 /* 32 bit HW Error Interrupt Mask Reg */ -#define B0_SP_ISRC 0x0018 /* 32 bit Special Interrupt Source Reg */ +#define B0_ISRC 0x0008 /* 32 bit Interrupt Source Register */ +#define B0_IMSK 0x000c /* 32 bit Interrupt Mask Register */ +#define B0_HWE_ISRC 0x0010 /* 32 bit HW Error Interrupt Src Reg */ +#define B0_HWE_IMSK 0x0014 /* 32 bit HW Error Interrupt Mask Reg */ +#define B0_SP_ISRC 0x0018 /* 32 bit Special Interrupt Source Reg */ /* 0x001c: reserved */ /* B0 XMAC 1 registers */ -#define B0_XM1_IMSK 0x0020 /* 16 bit r/w XMAC 1 Interrupt Mask Register*/ +#define B0_XM1_IMSK 0x0020 /* 16 bit r/w XMAC 1 Interrupt Mask Register*/ /* 0x0022 - 0x0027 reserved */ -#define B0_XM1_ISRC 0x0028 /* 16 bit ro XMAC 1 Interrupt Status Reg */ +#define B0_XM1_ISRC 0x0028 /* 16 bit ro XMAC 1 Interrupt Status Reg */ /* 0x002a - 0x002f reserved */ #define B0_XM1_PHY_ADDR 0x0030 /* 16 bit r/w XMAC 1 PHY Address Register */ /* 0x0032 - 0x0033 reserved */ @@ -408,9 +413,9 @@ /* 0x0036 - 0x003f reserved */ /* B0 XMAC 2 registers */ -#define B0_XM2_IMSK 0x0040 /* 16 bit r/w XMAC 2 Interrupt Mask Register*/ +#define B0_XM2_IMSK 0x0040 /* 16 bit r/w XMAC 2 Interrupt Mask Register*/ /* 0x0042 - 0x0047 reserved */ -#define B0_XM2_ISRC 0x0048 /* 16 bit ro XMAC 2 Interrupt Status Reg */ +#define B0_XM2_ISRC 0x0048 /* 16 bit ro XMAC 2 Interrupt Status Reg */ /* 0x004a - 0x004f reserved */ #define B0_XM2_PHY_ADDR 0x0050 /* 16 bit r/w XMAC 2 PHY Address Register */ /* 0x0052 - 0x0053 reserved */ @@ -418,12 +423,12 @@ /* 0x0056 - 0x005f reserved */ /* BMU Control Status Registers */ -#define B0_R1_CSR 0x0060 /* 32 bit BMU Ctrl/Stat Rx Queue 1 */ -#define B0_R2_CSR 0x0064 /* 32 bit BMU Ctrl/Stat Rx Queue 2 */ -#define B0_XS1_CSR 0x0068 /* 32 bit BMU Ctrl/Stat Sync Tx Queue 1 */ -#define B0_XA1_CSR 0x006c /* 32 bit BMU Ctrl/Stat Async Tx Queue 1*/ -#define B0_XS2_CSR 0x0070 /* 32 bit BMU Ctrl/Stat Sync Tx Queue 2 */ -#define B0_XA2_CSR 0x0074 /* 32 bit BMU Ctrl/Stat Async Tx Queue 2*/ +#define B0_R1_CSR 0x0060 /* 32 bit BMU Ctrl/Stat Rx Queue 1 */ +#define B0_R2_CSR 0x0064 /* 32 bit BMU Ctrl/Stat Rx Queue 2 */ +#define B0_XS1_CSR 0x0068 /* 32 bit BMU Ctrl/Stat Sync Tx Queue 1 */ +#define B0_XA1_CSR 0x006c /* 32 bit BMU Ctrl/Stat Async Tx Queue 1*/ +#define B0_XS2_CSR 0x0070 /* 32 bit BMU Ctrl/Stat Sync Tx Queue 2 */ +#define B0_XA2_CSR 0x0074 /* 32 bit BMU Ctrl/Stat Async Tx Queue 2*/ /* x0078 - 0x007f reserved */ /* @@ -437,34 +442,34 @@ */ /* NA reg = 48 bit Network Address Register, 3x16 or 8x8 bit readable */ -#define B2_MAC_1 0x0100 /* NA reg MAC Address 1 */ +#define B2_MAC_1 0x0100 /* NA reg MAC Address 1 */ /* 0x0106 - 0x0107 reserved */ -#define B2_MAC_2 0x0108 /* NA reg MAC Address 2 */ +#define B2_MAC_2 0x0108 /* NA reg MAC Address 2 */ /* 0x010e - 0x010f reserved */ -#define B2_MAC_3 0x0110 /* NA reg MAC Address 3 */ +#define B2_MAC_3 0x0110 /* NA reg MAC Address 3 */ /* 0x0116 - 0x0117 reserved */ -#define B2_CONN_TYP 0x0118 /* 8 bit Connector type */ -#define B2_PMD_TYP 0x0119 /* 8 bit PMD type */ -#define B2_MAC_CFG 0x011a /* 8 bit MAC Configuration */ -#define B2_CHIP_REV 0x011b /* 8 bit Queen Chip Revision Number */ +#define B2_CONN_TYP 0x0118 /* 8 bit Connector type */ +#define B2_PMD_TYP 0x0119 /* 8 bit PMD type */ +#define B2_MAC_CFG 0x011a /* 8 bit MAC Configuration */ +#define B2_CHIP_REV 0x011b /* 8 bit Queen Chip Revision Number */ /* Eprom registers are currently of no use */ -#define B2_E_0 0x011c /* 8 bit EPROM Byte 0 */ -#define B2_E_1 0x011d /* 8 bit EPROM Byte 1 */ -#define B2_E_2 0x011e /* 8 bit EPROM Byte 2 */ -#define B2_E_3 0x011f /* 8 bit EPROM Byte 3 */ -#define B2_FAR 0x0120 /* 32 bit Flash-Prom Addr Reg/Cnt */ -#define B2_FDP 0x0124 /* 8 bit Flash-Prom Data Port */ +#define B2_E_0 0x011c /* 8 bit EPROM Byte 0 */ +#define B2_E_1 0x011d /* 8 bit EPROM Byte 1 */ +#define B2_E_2 0x011e /* 8 bit EPROM Byte 2 */ +#define B2_E_3 0x011f /* 8 bit EPROM Byte 3 */ +#define B2_FAR 0x0120 /* 32 bit Flash-Prom Addr Reg/Cnt */ +#define B2_FDP 0x0124 /* 8 bit Flash-Prom Data Port */ /* 0x0125 - 0x0127: reserved */ -#define B2_LD_CRTL 0x0128 /* 8 bit EPROM loader control register */ -#define B2_LD_TEST 0x0129 /* 8 bit EPROM loader test register */ +#define B2_LD_CRTL 0x0128 /* 8 bit EPROM loader control register */ +#define B2_LD_TEST 0x0129 /* 8 bit EPROM loader test register */ /* 0x012a - 0x012f: reserved */ -#define B2_TI_INI 0x0130 /* 32 bit Timer init value */ -#define B2_TI_VAL 0x0134 /* 32 bit Timer value */ -#define B2_TI_CRTL 0x0138 /* 8 bit Timer control */ -#define B2_TI_TEST 0x0139 /* 8 Bit Timer Test */ +#define B2_TI_INI 0x0130 /* 32 bit Timer init value */ +#define B2_TI_VAL 0x0134 /* 32 bit Timer value */ +#define B2_TI_CRTL 0x0138 /* 8 bit Timer control */ +#define B2_TI_TEST 0x0139 /* 8 Bit Timer Test */ /* 0x013a - 0x013f: reserved */ -#define B2_IRQM_INI 0x0140 /* 32 bit IRQ Moderation Timer Init Reg.*/ -#define B2_IRQM_VAL 0x0144 /* 32 bit IRQ Moderation Timer Value */ +#define B2_IRQM_INI 0x0140 /* 32 bit IRQ Moderation Timer Init Reg.*/ +#define B2_IRQM_VAL 0x0144 /* 32 bit IRQ Moderation Timer Value */ #define B2_IRQM_CTRL 0x0148 /* 8 bit IRQ Moderation Timer Control */ #define B2_IRQM_TEST 0x0149 /* 8 bit IRQ Moderation Timer Test */ #define B2_IRQM_MSK 0x014c /* 32 bit IRQ Moderation Mask */ @@ -473,22 +478,22 @@ #define B2_TST_CTRL1 0x0158 /* 8 bit Test Control Register 1 */ #define B2_TST_CTRL2 0x0159 /* 8 bit Test Control Register 2 */ /* 0x015a - 0x015b: reserved */ -#define B2_GP_IO 0x015c /* 32 bit General Purpose IO Register */ -#define B2_I2C_CTRL 0x0160 /* 32 bit I2C HW Control Register */ -#define B2_I2C_DATA 0x0164 /* 32 bit I2C HW Data Register */ -#define B2_I2C_IRQ 0x0168 /* 32 bit I2C HW IRQ Register */ -#define B2_I2C_SW 0x016c /* 32 bit I2C SW Port Register */ -#define B2_BSC_INI 0x0170 /* 32 bit Blink Source Counter Init Val */ -#define B2_BSC_VAL 0x0174 /* 32 bit Blink Source Counter Value */ -#define B2_BSC_CTRL 0x0178 /* 8 bit Blink Source Counter Control */ -#define B2_BSC_STAT 0x0179 /* 8 bit Blink Source Counter Status */ -#define B2_BSC_TST 0x017a /* 16 bit Blink Source Counter Test Reg */ +#define B2_GP_IO 0x015c /* 32 bit General Purpose IO Register */ +#define B2_I2C_CTRL 0x0160 /* 32 bit I2C HW Control Register */ +#define B2_I2C_DATA 0x0164 /* 32 bit I2C HW Data Register */ +#define B2_I2C_IRQ 0x0168 /* 32 bit I2C HW IRQ Register */ +#define B2_I2C_SW 0x016c /* 32 bit I2C SW Port Register */ +#define B2_BSC_INI 0x0170 /* 32 bit Blink Source Counter Init Val */ +#define B2_BSC_VAL 0x0174 /* 32 bit Blink Source Counter Value */ +#define B2_BSC_CTRL 0x0178 /* 8 bit Blink Source Counter Control */ +#define B2_BSC_STAT 0x0179 /* 8 bit Blink Source Counter Status */ +#define B2_BSC_TST 0x017a /* 16 bit Blink Source Counter Test Reg */ /* 0x017c - 0x017f: reserved */ /* * Bank 3 */ -#define B3_RAM_ADDR 0x0180 /* 32 bit RAM Address, to read or write */ +#define B3_RAM_ADDR 0x0180 /* 32 bit RAM Address, to read or write */ #define B3_RAM_DATA_LO 0x0184 /* 32 bit RAM Data Word (low dWord) */ #define B3_RAM_DATA_HI 0x0188 /* 32 bit RAM Data Word (high dWord) */ /* 0x018c - 0x018f: reserved */ @@ -512,8 +517,8 @@ #define B3_RI_RTO_XS2 0x019b /* 8 bit RAM Iface RD Timeout Queue XS2 (TO11)*/ #define B3_RI_TO_VAL 0x019c /* 8 bit RAM Iface Current Timeout Count Val */ /* 0x019d - 0x019f reserved */ -#define B3_RI_CTRL 0x01a0 /* 16 bit RAM Iface Control Register */ -#define B3_RI_TEST 0x01a2 /* 8 bit RAM Iface Test Register */ +#define B3_RI_CTRL 0x01a0 /* 16 bit RAM Iface Control Register */ +#define B3_RI_TEST 0x01a2 /* 8 bit RAM Iface Test Register */ /* 0x01a3 - 0x01af reserved */ /* MAC Arbiter Registers */ /* Please notice these are the number of qWord tranfered continously and */ @@ -566,42 +571,42 @@ */ /* Transmit Arbiter Registers MAC 1 and 2, user MR_ADDR() to address */ -#define TXA_ITI_INI 0x0200 /* 32 bit Tx Arb Interval Timer Init Val*/ -#define TXA_ITI_VAL 0x0204 /* 32 bit Tx Arb Interval Timer Value */ -#define TXA_LIM_INI 0x0208 /* 32 bit Tx Arb Limit Counter Init Val */ -#define TXA_LIM_VAL 0x020c /* 32 bit Tx Arb Limit Counter Value */ -#define TXA_CTRL 0x0210 /* 8 bit Tx Arbiter Control Register */ -#define TXA_TEST 0x0211 /* 8 bit Tx Arbiter Test Register */ -#define TXA_STAT 0x0212 /* 8 bit Tx Arbiter Status Register */ +#define TXA_ITI_INI 0x0200 /* 32 bit Tx Arb Interval Timer Init Val*/ +#define TXA_ITI_VAL 0x0204 /* 32 bit Tx Arb Interval Timer Value */ +#define TXA_LIM_INI 0x0208 /* 32 bit Tx Arb Limit Counter Init Val */ +#define TXA_LIM_VAL 0x020c /* 32 bit Tx Arb Limit Counter Value */ +#define TXA_CTRL 0x0210 /* 8 bit Tx Arbiter Control Register */ +#define TXA_TEST 0x0211 /* 8 bit Tx Arbiter Test Register */ +#define TXA_STAT 0x0212 /* 8 bit Tx Arbiter Status Register */ /* 0x0213 - 0x027f: reserved */ /* * Bank 6 */ /* External registers */ -#define B6_EXT_REG 0x0300 +#define B6_EXT_REG 0x0300 /* * Bank 7 */ /* This is a copy of the Configuration register file (lower half) */ -#define B7_CFG_SPC 0x0380 +#define B7_CFG_SPC 0x0380 /* * Bank 8 - 15 */ /* Receive and Transmit Queue Registers, use Q_ADDR() to access */ -#define B8_Q_REGS 0x0400 +#define B8_Q_REGS 0x0400 /* Queue Register Offsets, use Q_ADDR() to access */ -#define Q_D 0x00 /* 8*32 bit Current Descriptor */ +#define Q_D 0x00 /* 8*32 bit Current Descriptor */ #define Q_DA_L 0x20 /* 32 bit Current Descriptor Address Low dWord */ #define Q_DA_H 0x24 /* 32 bit Current Descriptor Address High dWord */ #define Q_AC_L 0x28 /* 32 bit Current Address Counter Low dWord */ #define Q_AC_H 0x2c /* 32 bit Current Address Counter High dWord */ #define Q_BC 0x30 /* 32 bit Current Byte Counter */ #define Q_CSR 0x34 /* 32 bit BMU Control/Status Register */ -#define Q_F 0x38 /* 32 bit Flag Register */ +#define Q_F 0x38 /* 32 bit Flag Register */ #define Q_T1 0x3c /* 32 bit Test Register 1 */ #define Q_T1_TR 0x3c /* 8 bit Test Register 1 Transfer SM */ #define Q_T1_WR 0x3d /* 8 bit Test Register 1 Write Descriptor SM */ @@ -639,64 +644,64 @@ * Bank 24 - 25 */ /* Receive MAC FIFO, Receive LED, and Link Sync regs, use MR_ADDR() to address*/ -#define RX_MFF_EA 0x0c00 /* 32 bit Receive MAC FIFO End Address */ -#define RX_MFF_WP 0x0c04 /* 32 bit Receive MAC FIFO Write Pointer*/ +#define RX_MFF_EA 0x0c00 /* 32 bit Receive MAC FIFO End Address */ +#define RX_MFF_WP 0x0c04 /* 32 bit Receive MAC FIFO Write Pointer*/ /* 0x0c08 - 0x0c0b reserved */ -#define RX_MFF_RP 0x0c0c /* 32 bit Receive MAC FIFO Read Pointer */ -#define RX_MFF_PC 0x0c10 /* 32 bit Receive MAC FIFO Packet Cnt */ -#define RX_MFF_LEV 0x0c14 /* 32 bit Receive MAC FIFO Level */ +#define RX_MFF_RP 0x0c0c /* 32 bit Receive MAC FIFO Read Pointer */ +#define RX_MFF_PC 0x0c10 /* 32 bit Receive MAC FIFO Packet Cnt */ +#define RX_MFF_LEV 0x0c14 /* 32 bit Receive MAC FIFO Level */ #define RX_MFF_CTRL1 0x0c18 /* 16 bit Receive MAC FIFO Control Reg 1*/ #define RX_MFF_STAT_TO 0x0c1a /* 8 bit Receive MAC Status Timeout */ #define RX_MFF_TIST_TO 0x0c1b /* 8 bit Receive MAC Timestamp Timeout */ #define RX_MFF_CTRL2 0x0c1c /* 8 bit Receive MAC FIFO Control Reg 2*/ -#define RX_MFF_TST1 0x0c1d /* 8 bit Receive MAC FIFO Test Reg 1 */ -#define RX_MFF_TST2 0x0c1e /* 8 bit Receive MAC FIFO Test Reg 2 */ +#define RX_MFF_TST1 0x0c1d /* 8 bit Receive MAC FIFO Test Reg 1 */ +#define RX_MFF_TST2 0x0c1e /* 8 bit Receive MAC FIFO Test Reg 2 */ /* 0x0c1f reserved */ -#define RX_LED_INI 0x0c20 /* 32 bit Receive LED Cnt Init Value */ -#define RX_LED_VAL 0x0c24 /* 32 bit Receive LED Cnt Current Value */ -#define RX_LED_CTRL 0x0c28 /* 8 bit Receive LED Cnt Control Reg */ -#define RX_LED_TST 0x0c29 /* 8 bit Receive LED Cnt Test Register */ +#define RX_LED_INI 0x0c20 /* 32 bit Receive LED Cnt Init Value */ +#define RX_LED_VAL 0x0c24 /* 32 bit Receive LED Cnt Current Value */ +#define RX_LED_CTRL 0x0c28 /* 8 bit Receive LED Cnt Control Reg */ +#define RX_LED_TST 0x0c29 /* 8 bit Receive LED Cnt Test Register */ /* 0x0c2a - 0x0c2f reserved */ #define LNK_SYNC_INI 0x0c30 /* 32 bit Link Sync Cnt Init Value */ #define LNK_SYNC_VAL 0x0c34 /* 32 bit Link Sync Cnt Current Value */ #define LNK_SYNC_CTRL 0x0c38 /* 8 bit Link Sync Cnt Control Register*/ #define LNK_SYNC_TST 0x0c39 /* 8 bit Link Sync Cnt Test Register */ /* 0x0c3a - 0x0c3b reserved */ -#define LNK_LED_REG 0x0c3c /* 8 bit Link LED Register */ +#define LNK_LED_REG 0x0c3c /* 8 bit Link LED Register */ /* 0x0c3d - 0x0c7f reserved */ /* * Bank 26 - 27 */ /* Transmit MAC FIFO and Transmit LED Registers, use MR_ADDR() to address */ -#define TX_MFF_EA 0x0d00 /* 32 bit Transmit MAC FIFO End Address */ -#define TX_MFF_WP 0x0d04 /* 32 bit Transmit MAC FIFO WR Pointer */ -#define TX_MFF_WSP 0x0d08 /* 32 bit Transmit MAC FIFO WR Shadow Pt*/ -#define TX_MFF_RP 0x0d0c /* 32 bit Transmit MAC FIFO RD Pointer */ -#define TX_MFF_PC 0x0d10 /* 32 bit Transmit MAC FIFO Packet Cnt */ -#define TX_MFF_LEV 0x0d14 /* 32 bit Transmit MAC FIFO Level */ +#define TX_MFF_EA 0x0d00 /* 32 bit Transmit MAC FIFO End Address */ +#define TX_MFF_WP 0x0d04 /* 32 bit Transmit MAC FIFO WR Pointer */ +#define TX_MFF_WSP 0x0d08 /* 32 bit Transmit MAC FIFO WR Shadow Pt*/ +#define TX_MFF_RP 0x0d0c /* 32 bit Transmit MAC FIFO RD Pointer */ +#define TX_MFF_PC 0x0d10 /* 32 bit Transmit MAC FIFO Packet Cnt */ +#define TX_MFF_LEV 0x0d14 /* 32 bit Transmit MAC FIFO Level */ #define TX_MFF_CTRL1 0x0d18 /* 16 bit Transmit MAC FIFO Ctrl Reg 1 */ -#define TX_MFF_WAF 0x0d1a /* 8 bit Transmit MAC Wait after flush*/ +#define TX_MFF_WAF 0x0d1a /* 8 bit Transmit MAC Wait after flush*/ /* 0x0c1b reserved */ #define TX_MFF_CTRL2 0x0d1c /* 8 bit Transmit MAC FIFO Ctrl Reg 2 */ -#define TX_MFF_TST1 0x0d1d /* 8 bit Transmit MAC FIFO Test Reg 1 */ -#define TX_MFF_TST2 0x0d1e /* 8 bit Transmit MAC FIFO Test Reg 2 */ +#define TX_MFF_TST1 0x0d1d /* 8 bit Transmit MAC FIFO Test Reg 1 */ +#define TX_MFF_TST2 0x0d1e /* 8 bit Transmit MAC FIFO Test Reg 2 */ /* 0x0d1f reserved */ -#define TX_LED_INI 0x0d20 /* 32 bit Transmit LED Cnt Init Value */ -#define TX_LED_VAL 0x0d24 /* 32 bit Transmit LED Cnt Current Val */ -#define TX_LED_CTRL 0x0d28 /* 8 bit Transmit LED Cnt Control Reg */ -#define TX_LED_TST 0x0d29 /* 8 bit Transmit LED Cnt Test Register*/ +#define TX_LED_INI 0x0d20 /* 32 bit Transmit LED Cnt Init Value */ +#define TX_LED_VAL 0x0d24 /* 32 bit Transmit LED Cnt Current Val */ +#define TX_LED_CTRL 0x0d28 /* 8 bit Transmit LED Cnt Control Reg */ +#define TX_LED_TST 0x0d29 /* 8 bit Transmit LED Cnt Test Register*/ /* 0x0d2a - 0x0d7f reserved */ /* * Bank 28 */ /* Descriptor Poll Timer Registers */ -#define B28_DPT_INI 0x0e00 /* 32 bit Descriptor Poll Timer Init Val*/ -#define B28_DPT_VAL 0x0e04 /* 32 bit Descriptor Poll Timer Curr Val*/ +#define B28_DPT_INI 0x0e00 /* 32 bit Descriptor Poll Timer Init Val*/ +#define B28_DPT_VAL 0x0e04 /* 32 bit Descriptor Poll Timer Curr Val*/ #define B28_DPT_CTRL 0x0e08 /* 8 bit Descriptor Poll Timer Ctrl Reg*/ /* 0x0e09: reserved */ -#define B28_DPT_TST 0x0e0a /* 8 bit Descriptor Poll Timer Test Reg*/ +#define B28_DPT_TST 0x0e0a /* 8 bit Descriptor Poll Timer Test Reg*/ /* 0x0e0b - 0x0e8f: reserved */ /* @@ -736,7 +741,7 @@ */ /* B0_RAP 8 bit Register Address Port */ /* Bit 7: reserved */ -#define RAP_RAP 0x3f /* Bit 6..0: 0 = block 0, .., 6f = block 6f*/ +#define RAP_RAP 0x3f /* Bit 6..0: 0 = block 0, .., 6f = block 6f*/ /* B0_CTST 16 bit Control/Status register */ /* Bit 15..10: reserved */ @@ -746,70 +751,70 @@ #define CS_CL_SW_IRQ (1<<6) /* Bit 6: Clear IRQ SW Request */ #define CS_STOP_DONE (1<<5) /* Bit 5: Stop Master is finished */ #define CS_STOP_MAST (1<<4) /* Bit 4: Command Bit to stop the master*/ -#define CS_MRST_CLR (1<<3) /* Bit 3: Clear Master reset */ -#define CS_MRST_SET (1<<2) /* Bit 2: Set Master reset */ -#define CS_RST_CLR (1<<1) /* Bit 1: Clear Software reset */ -#define CS_RST_SET (1<<0) /* Bit 0: Set Software reset */ +#define CS_MRST_CLR (1<<3) /* Bit 3: Clear Master reset */ +#define CS_MRST_SET (1<<2) /* Bit 2: Set Master reset */ +#define CS_RST_CLR (1<<1) /* Bit 1: Clear Software reset */ +#define CS_RST_SET (1<<0) /* Bit 0: Set Software reset */ /* B0_LED 8 Bit LED register */ /* Bit 7..2: reserved */ -#define LED_STAT_ON (1<<1) /* Bit 1: Status LED on */ +#define LED_STAT_ON (1<<1) /* Bit 1: Status LED on */ #define LED_STAT_OFF (1<<0) /* Bit 0: Status LED off */ /* B0_ISRC 32 bit Interrupt Source Register */ /* B0_IMSK 32 bit Interrupt Mask Register */ /* B0_SP_ISRC 32 bit Special Interrupt Source Reg */ /* B2_IRQM_MSK 32 bit IRQ Moderation Mask */ -#define IS_ALL_MSK 0xbfffffffL /* All Interrupt bits */ -#define IS_HW_ERR (1UL<<31) /* Bit 31: Interrupt HW Error */ - /* Bit 30: reserved */ +#define IS_ALL_MSK 0xbfffffffL /* All Interrupt bits */ +#define IS_HW_ERR (1UL<<31) /* Bit 31: Interrupt HW Error */ + /* Bit 30: reserved */ #define IS_PA_TO_RX1 (1L<<29) /* Bit 29: Packet Arb Timeout Rx1*/ #define IS_PA_TO_RX2 (1L<<28) /* Bit 28: Packet Arb Timeout Rx2*/ #define IS_PA_TO_TX1 (1L<<27) /* Bit 27: Packet Arb Timeout Tx1*/ #define IS_PA_TO_TX2 (1L<<26) /* Bit 26: Packet Arb Timeout Tx2*/ #define IS_I2C_READY (1L<<25) /* Bit 25: IRQ on end of I2C tx */ -#define IS_IRQ_SW (1L<<24) /* Bit 24: SW forced IRQ */ -#define IS_EXT_REG (1L<<23) /* Bit 23: IRQ from external reg */ -#define IS_TIMINT (1L<<22) /* Bit 22: IRQ from Timer */ -#define IS_MAC1 (1L<<21) /* Bit 21: IRQ from MAC 1 */ +#define IS_IRQ_SW (1L<<24) /* Bit 24: SW forced IRQ */ +#define IS_EXT_REG (1L<<23) /* Bit 23: IRQ from external reg */ +#define IS_TIMINT (1L<<22) /* Bit 22: IRQ from Timer */ +#define IS_MAC1 (1L<<21) /* Bit 21: IRQ from MAC 1 */ #define IS_LNK_SYNC_M1 (1L<<20) /* Bit 20: Link Sync Cnt wrap M1 */ -#define IS_MAC2 (1L<<19) /* Bit 19: IRQ from MAC 2 */ +#define IS_MAC2 (1L<<19) /* Bit 19: IRQ from MAC 2 */ #define IS_LNK_SYNC_M2 (1L<<18) /* Bit 18: Link Sync Cnt wrap M2 */ /* Receive Queue 1 */ -#define IS_R1_B (1L<<17) /* Bit 17: Q_R1 End of Buffer */ -#define IS_R1_F (1L<<16) /* Bit 16: Q_R1 End of Frame */ -#define IS_R1_C (1L<<15) /* Bit 15: Q_R1 Encoding Error */ +#define IS_R1_B (1L<<17) /* Bit 17: Q_R1 End of Buffer */ +#define IS_R1_F (1L<<16) /* Bit 16: Q_R1 End of Frame */ +#define IS_R1_C (1L<<15) /* Bit 15: Q_R1 Encoding Error */ /* Receive Queue 2 */ -#define IS_R2_B (1L<<14) /* Bit 14: Q_R2 End of Buffer */ -#define IS_R2_F (1L<<13) /* Bit 13: Q_R2 End of Frame */ -#define IS_R2_C (1L<<12) /* Bit 12: Q_R2 Encoding Error */ +#define IS_R2_B (1L<<14) /* Bit 14: Q_R2 End of Buffer */ +#define IS_R2_F (1L<<13) /* Bit 13: Q_R2 End of Frame */ +#define IS_R2_C (1L<<12) /* Bit 12: Q_R2 Encoding Error */ /* Synchronous Transmit Queue 1 */ -#define IS_XS1_B (1L<<11) /* Bit 11: Q_XS1 End of Buffer */ -#define IS_XS1_F (1L<<10) /* Bit 10: Q_XS1 End of Frame */ -#define IS_XS1_C (1L<<9) /* Bit 9: Q_XS1 Encoding Error */ +#define IS_XS1_B (1L<<11) /* Bit 11: Q_XS1 End of Buffer */ +#define IS_XS1_F (1L<<10) /* Bit 10: Q_XS1 End of Frame */ +#define IS_XS1_C (1L<<9) /* Bit 9: Q_XS1 Encoding Error */ /* Asynchronous Transmit Queue 1 */ -#define IS_XA1_B (1L<<8) /* Bit 8: Q_XA1 End of Buffer */ -#define IS_XA1_F (1L<<7) /* Bit 7: Q_XA1 End of Frame */ -#define IS_XA1_C (1L<<6) /* Bit 6: Q_XA1 Encoding Error */ +#define IS_XA1_B (1L<<8) /* Bit 8: Q_XA1 End of Buffer */ +#define IS_XA1_F (1L<<7) /* Bit 7: Q_XA1 End of Frame */ +#define IS_XA1_C (1L<<6) /* Bit 6: Q_XA1 Encoding Error */ /* Synchronous Transmit Queue 2 */ -#define IS_XS2_B (1L<<5) /* Bit 5: Q_XS2 End of Buffer */ -#define IS_XS2_F (1L<<4) /* Bit 4: Q_XS2 End of Frame */ -#define IS_XS2_C (1L<<3) /* Bit 3: Q_XS2 Encoding Error */ +#define IS_XS2_B (1L<<5) /* Bit 5: Q_XS2 End of Buffer */ +#define IS_XS2_F (1L<<4) /* Bit 4: Q_XS2 End of Frame */ +#define IS_XS2_C (1L<<3) /* Bit 3: Q_XS2 Encoding Error */ /* Asynchronous Transmit Queue 2 */ -#define IS_XA2_B (1L<<2) /* Bit 2: Q_XA2 End of Buffer */ -#define IS_XA2_F (1L<<1) /* Bit 1: Q_XA2 End of Frame */ -#define IS_XA2_C (1L<<0) /* Bit 0: Q_XA2 Encoding Error */ +#define IS_XA2_B (1L<<2) /* Bit 2: Q_XA2 End of Buffer */ +#define IS_XA2_F (1L<<1) /* Bit 1: Q_XA2 End of Frame */ +#define IS_XA2_C (1L<<0) /* Bit 0: Q_XA2 Encoding Error */ /* B0_HWE_ISRC 32 bit HW Error Interrupt Src Reg */ /* B0_HWE_IMSK 32 bit HW Error Interrupt Mask Reg */ /* B2_IRQM_HWE_MSK 32 bit IRQ Moderation HW Error Mask */ -#define IS_ERR_MSK 0x00000fffL /* All Error bits */ - /* Bit 31..12: reserved */ +#define IS_ERR_MSK 0x00000fffL /* All Error bits */ + /* Bit 31..12: reserved */ #define IS_IRQ_MST_ERR (1L<<11) /* Bit 11: IRQ master error */ - /* PERR,RMABORT,RTABORT,DATAPERR */ -#define IS_IRQ_STAT (1L<<10) /* Bit 10: IRQ status execption */ - /* RMABORT, RTABORT, DATAPERR */ + /* PERR,RMABORT,RTABORT,DATAPERR */ +#define IS_IRQ_STAT (1L<<10) /* Bit 10: IRQ status execption */ + /* RMABORT, RTABORT, DATAPERR */ #define IS_NO_STAT_M1 (1L<<9) /* Bit 9: No Rx Status from MAC1*/ #define IS_NO_STAT_M2 (1L<<8) /* Bit 8: No Rx Status from MAC2*/ #define IS_NO_TIST_M1 (1L<<7) /* Bit 7: No Timestamp from MAC1*/ @@ -826,53 +831,53 @@ /* Values of connector and PMD type comply to SysKonnect internal std */ /* B2_MAC_CFG 8 bit MAC Configuration */ - /* Bit 7..2: reserved */ + /* Bit 7..2: reserved */ #define CFG_DIS_M2_CLK (1<<1) /* Bit 1: Disable Clock for 2nd MAC */ -#define CFG_SNG_MAC (1<<0) /* Bit 0: MAC Config: 1=2 MACs / 0=1 MAC*/ +#define CFG_SNG_MAC (1<<0) /* Bit 0: MAC Config: 1=2 MACs / 0=1 MAC*/ /* B2_CHIP_REV 8 bit Queen Chip Revision Number */ #define FIRST_CHIP_REV 0x0a /* Initial Revision Value */ /* B2_FAR 32 bit Flash-Prom Addr Reg/Cnt */ -#define FAR_ADDR 0x1ffffL /* Bit 16..0: FPROM Address mask */ +#define FAR_ADDR 0x1ffffL /* Bit 16..0: FPROM Address mask */ /* B2_LD_CRTL 8 bit EPROM loader control register */ /* Bits are currently reserved */ /* B2_LD_TEST 8 bit EPROM loader test register */ - /* Bit 7..4: reserved */ -#define LD_T_ON (1<<3) /* Bit 3: Loader Testmode on */ -#define LD_T_OFF (1<<2) /* Bit 2: Loader Testmode off */ -#define LD_T_STEP (1<<1) /* Bit 1: Decrement FPROM addr. Counter */ -#define LD_START (1<<0) /* Bit 0: Start loading FPROM */ + /* Bit 7..4: reserved */ +#define LD_T_ON (1<<3) /* Bit 3: Loader Testmode on */ +#define LD_T_OFF (1<<2) /* Bit 2: Loader Testmode off */ +#define LD_T_STEP (1<<1) /* Bit 1: Decrement FPROM addr. Counter */ +#define LD_START (1<<0) /* Bit 0: Start loading FPROM */ /* * Timer Section */ /* B2_TI_CRTL 8 bit Timer control */ /* B2_IRQM_CTRL 8 bit IRQ Moderation Timer Control */ - /* Bit 7..3: reserved */ -#define TIM_START (1<<2) /* Bit 2: Start Timer */ -#define TIM_STOP (1<<1) /* Bit 1: Stop Timer */ -#define TIM_CLR_IRQ (1<<0) /* Bit 0: Clear Timer IRQ, (!IRQM) */ + /* Bit 7..3: reserved */ +#define TIM_START (1<<2) /* Bit 2: Start Timer */ +#define TIM_STOP (1<<1) /* Bit 1: Stop Timer */ +#define TIM_CLR_IRQ (1<<0) /* Bit 0: Clear Timer IRQ, (!IRQM) */ /* B2_TI_TEST 8 Bit Timer Test */ /* B2_IRQM_TEST 8 bit IRQ Moderation Timer Test */ /* B28_DPT_TST 8 bit Descriptor Poll Timer Test Reg */ - /* Bit 7..3: reserved */ -#define TIM_T_ON (1<<2) /* Bit 2: Test mode on */ -#define TIM_T_OFF (1<<1) /* Bit 1: Test mode off */ -#define TIM_T_STEP (1<<0) /* Bit 0: Test step */ + /* Bit 7..3: reserved */ +#define TIM_T_ON (1<<2) /* Bit 2: Test mode on */ +#define TIM_T_OFF (1<<1) /* Bit 1: Test mode off */ +#define TIM_T_STEP (1<<0) /* Bit 0: Test step */ /* B28_DPT_INI 32 bit Descriptor Poll Timer Init Val */ /* B28_DPT_VAL 32 bit Descriptor Poll Timer Curr Val */ - /* Bit 31..24: reserved */ -#define DPT_MSK 0x00ffffffL /* Bit 23.. 0: Desc Poll Timer Bits */ + /* Bit 31..24: reserved */ +#define DPT_MSK 0x00ffffffL /* Bit 23.. 0: Desc Poll Timer Bits */ /* B28_DPT_CTRL 8 bit Descriptor Poll Timer Ctrl Reg */ - /* Bit 7..2: reserved */ -#define DPT_START (1<<1) /* Bit 1: Start Desciptor Poll Timer */ -#define DPT_STOP (1<<0) /* Bit 0: Stop Desciptor Poll Timer */ + /* Bit 7..2: reserved */ +#define DPT_START (1<<1) /* Bit 1: Start Desciptor Poll Timer */ +#define DPT_STOP (1<<0) /* Bit 0: Stop Desciptor Poll Timer */ /* B2_TST_CTRL1 8 bit Test Control Register 1 */ @@ -886,7 +891,7 @@ #define TST_CFG_WRITE_OFF (1<<0) /* Bit 0: Disable Config Reg WR */ /* B2_TST_CTRL2 8 bit Test Control Register 2 */ - /* Bit 7..4: reserved */ + /* Bit 7..4: reserved */ /* force the following error on */ /* the next master read/write */ #define TST_FRC_DPERR_MR64 (1<<3) /* Bit 3: DataPERR RD 64 */ @@ -895,7 +900,7 @@ #define TST_FRC_APERR_2M64 (1<<0) /* Bit 0: AddrPERR on 2. phase */ /* B2_GP_IO 32 bit General Purpose IO Register */ - /* Bit 31..26: reserved */ + /* Bit 31..26: reserved */ #define GP_DIR_9 (1L<<25) /* Bit 25: IO_9 direct, 0=I/1=O */ #define GP_DIR_8 (1L<<24) /* Bit 24: IO_8 direct, 0=I/1=O */ #define GP_DIR_7 (1L<<23) /* Bit 23: IO_7 direct, 0=I/1=O */ @@ -906,7 +911,7 @@ #define GP_DIR_2 (1L<<18) /* Bit 18: IO_2 direct, 0=I/1=O */ #define GP_DIR_1 (1L<<17) /* Bit 17: IO_1 direct, 0=I/1=O */ #define GP_DIR_0 (1L<<16) /* Bit 16: IO_0 direct, 0=I/1=O */ - /* Bit 15..10: reserved */ + /* Bit 15..10: reserved */ #define GP_IO_9 (1L<<9) /* Bit 9: IO_9 pin */ #define GP_IO_8 (1L<<8) /* Bit 8: IO_8 pin */ #define GP_IO_7 (1L<<7) /* Bit 7: IO_7 pin */ @@ -919,31 +924,31 @@ #define GP_IO_0 (1L<<0) /* Bit 0: IO_0 pin */ /* B2_I2C_CTRL 32 bit I2C HW Control Register */ -#define I2C_FLAG (1UL<<31) /* Bit 31: Start read/write if WR*/ +#define I2C_FLAG (1UL<<31) /* Bit 31: Start read/write if WR*/ #define I2C_ADDR (0x7fffL<<16) /* Bit 30..16: Addr to be RD/WR */ -#define I2C_DEV_SEL (0x7fL<<9) /* Bit 15.. 9: I2C Device Select */ - /* Bit 8.. 5: reserved */ +#define I2C_DEV_SEL (0x7fL<<9) /* Bit 15.. 9: I2C Device Select */ + /* Bit 8.. 5: reserved */ #define I2C_BURST_LEN (1L<<4) /* Bit 4: Burst Len, 1/4 bytes */ #define I2C_DEV_SIZE (7L<<1) /* Bit 3.. 1: I2C Device Size */ #define I2C_025K_DEV (0L<<1) /* 0: 256 Bytes or smal. */ -#define I2C_05K_DEV (1L<<1) /* 1: 512 Bytes */ -#define I2C_1K_DEV (2L<<1) /* 2: 1024 Bytes */ -#define I2C_2K_DEV (3L<<1) /* 3: 2048 Bytes */ -#define I2C_4K_DEV (4L<<1) /* 4: 4096 Bytes */ -#define I2C_8K_DEV (5L<<1) /* 5: 8192 Bytes */ -#define I2C_16K_DEV (6L<<1) /* 6: 16384 Bytes */ -#define I2C_32K_DEV (7L<<1) /* 7: 32768 Bytes */ -#define I2C_STOP (1L<<0) /* Bit 0: Interrupt I2C transfer*/ +#define I2C_05K_DEV (1L<<1) /* 1: 512 Bytes */ +#define I2C_1K_DEV (2L<<1) /* 2: 1024 Bytes */ +#define I2C_2K_DEV (3L<<1) /* 3: 2048 Bytes */ +#define I2C_4K_DEV (4L<<1) /* 4: 4096 Bytes */ +#define I2C_8K_DEV (5L<<1) /* 5: 8192 Bytes */ +#define I2C_16K_DEV (6L<<1) /* 6: 16384 Bytes */ +#define I2C_32K_DEV (7L<<1) /* 7: 32768 Bytes */ +#define I2C_STOP (1L<<0) /* Bit 0: Interrupt I2C transfer*/ /* B2_I2C_IRQ 32 bit I2C HW IRQ Register */ - /* Bit 31..1 reserved */ -#define I2C_CLR_IRQ (1<<0) /* Bit 0: Clear I2C IRQ */ + /* Bit 31..1 reserved */ +#define I2C_CLR_IRQ (1<<0) /* Bit 0: Clear I2C IRQ */ /* B2_I2C_SW 32 bit I2C HW SW Port Register */ - /* Bit 7..3: reserved */ + /* Bit 7..3: reserved */ #define I2C_DATA_DIR (1<<2) /* Bit 2: direction of I2C_DATA */ -#define I2C_DATA (1<<1) /* Bit 1: I2C Data Port */ -#define I2C_CLK (1<<0) /* Bit 0: I2C Clock Port */ +#define I2C_DATA (1<<1) /* Bit 1: I2C Data Port */ +#define I2C_CLK (1<<0) /* Bit 0: I2C Clock Port */ /* * I2C Address @@ -952,12 +957,12 @@ /* B2_BSC_CTRL 8 bit Blink Source Counter Control */ - /* Bit 7..2: reserved */ + /* Bit 7..2: reserved */ #define BSC_START (1<<1) /* Bit 1: Start Blink Source Counter */ #define BSC_STOP (1<<0) /* Bit 0: Stop Blink Source Counter */ /* B2_BSC_STAT 8 bit Blink Source Counter Status */ - /* Bit 7..1: reserved */ + /* Bit 7..1: reserved */ #define BSC_SRC (1<<0) /* Bit 0: Blink Source, 0=Off / 1=On */ /* B2_BSC_TST 16 bit Blink Source Counter Test Reg */ @@ -972,30 +977,30 @@ /* RAM Interface Registers */ /* B3_RI_CTRL 16 bit RAM Iface Control Register */ - /* Bit 15..10: reserved */ + /* Bit 15..10: reserved */ #define RI_CLR_RD_PERR (1<<9) /* Bit 9: Clear IRQ RAM Read Parity Err */ #define RI_CLR_WR_PERR (1<<8) /* Bit 8: Clear IRQ RAM Write Parity Err*/ - /* Bit 7..2: reserved */ -#define RI_RST_CLR (1<<1) /* Bit 1: Clear RAM Interface Reset */ -#define RI_RST_SET (1<<0) /* Bit 0: Set RAM Interface Reset */ + /* Bit 7..2: reserved */ +#define RI_RST_CLR (1<<1) /* Bit 1: Clear RAM Interface Reset */ +#define RI_RST_SET (1<<0) /* Bit 0: Set RAM Interface Reset */ /* B3_RI_TEST 8 bit RAM Iface Test Register */ - /* Bit 15..4: reserved */ -#define RI_T_EV (1<<3) /* Bit 3: Timeout Event occured */ -#define RI_T_ON (1<<2) /* Bit 2: Timeout Timer Test On */ -#define RI_T_OFF (1<<1) /* Bit 1: Timeout Timer Test Off */ -#define RI_T_STEP (1<<0) /* Bit 0: Timeout Timer Step */ + /* Bit 15..4: reserved */ +#define RI_T_EV (1<<3) /* Bit 3: Timeout Event occurred */ +#define RI_T_ON (1<<2) /* Bit 2: Timeout Timer Test On */ +#define RI_T_OFF (1<<1) /* Bit 1: Timeout Timer Test Off */ +#define RI_T_STEP (1<<0) /* Bit 0: Timeout Timer Step */ /* MAC Arbiter Registers */ /* B3_MA_TO_CTRL 16 bit MAC Arbiter Timeout Ctrl Reg */ - /* Bit 15..4: reserved */ -#define MA_FOE_ON (1<<3) /* Bit 3: XMAC Fast Output Enable ON */ -#define MA_FOE_OFF (1<<2) /* Bit 2: XMAC Fast Output Enable OFF */ -#define MA_RST_CLR (1<<1) /* Bit 1: Clear MAC Arbiter Reset */ -#define MA_RST_SET (1<<0) /* Bit 0: Set MAC Arbiter Reset */ + /* Bit 15..4: reserved */ +#define MA_FOE_ON (1<<3) /* Bit 3: XMAC Fast Output Enable ON */ +#define MA_FOE_OFF (1<<2) /* Bit 2: XMAC Fast Output Enable OFF */ +#define MA_RST_CLR (1<<1) /* Bit 1: Clear MAC Arbiter Reset */ +#define MA_RST_SET (1<<0) /* Bit 0: Set MAC Arbiter Reset */ /* B3_MA_RC_CTRL 16 bit MAC Arbiter Recovery Ctrl Reg */ - /* Bit 15..8: reserved */ + /* Bit 15..8: reserved */ #define MA_ENA_REC_TX2 (1<<7) /* Bit 7: Enable Recovery Timer TX2 */ #define MA_DIS_REC_TX2 (1<<6) /* Bit 6: Disable Recovery Timer TX2 */ #define MA_ENA_REC_TX1 (1<<5) /* Bit 5: Enable Recovery Timer TX1 */ @@ -1007,7 +1012,7 @@ /* Packet Arbiter Registers */ /* B3_PA_CTRL 16 bit Packet Arbiter Ctrl Register */ - /* Bit 15..14: reserved */ + /* Bit 15..14: reserved */ #define PA_CLR_TO_TX2 (1<<13) /* Bit 13: Clear IRQ Packet Timeout TX2 */ #define PA_CLR_TO_TX1 (1<<12) /* Bit 12: Clear IRQ Packet Timeout TX1 */ #define PA_CLR_TO_RX2 (1<<11) /* Bit 11: Clear IRQ Packet Timeout RX2 */ @@ -1020,30 +1025,30 @@ #define PA_DIS_TO_RX2 (1<<4) /* Bit 4: Disable Timeout Timer RX2 */ #define PA_ENA_TO_RX1 (1<<3) /* Bit 3: Enable Timeout Timer RX1 */ #define PA_DIS_TO_RX1 (1<<2) /* Bit 2: Disable Timeout Timer RX1 */ -#define PA_RST_CLR (1<<1) /* Bit 1: Clear MAC Arbiter Reset */ -#define PA_RST_SET (1<<0) /* Bit 0: Set MAC Arbiter Reset */ +#define PA_RST_CLR (1<<1) /* Bit 1: Clear MAC Arbiter Reset */ +#define PA_RST_SET (1<<0) /* Bit 0: Set MAC Arbiter Reset */ #define PA_ENA_TO_ALL (PA_ENA_TO_RX1 | PA_ENA_TO_RX2 |\ - PA_ENA_TO_TX1 | PA_ENA_TO_TX2) + PA_ENA_TO_TX1 | PA_ENA_TO_TX2) /* Rx/Tx Path related Arbiter Test Registers */ /* B3_MA_TO_TEST 16 bit MAC Arbiter Timeout Test Reg */ /* B3_MA_RC_TEST 16 bit MAC Arbiter Recovery Test Reg */ /* B3_PA_TEST 16 bit Packet Arbiter Test Register */ /* Bit 15, 11, 7, and 3 are reserved in B3_PA_TEST */ -#define TX2_T_EV (1<<15) /* Bit 15: TX2 Timeout/Recv Event occured*/ +#define TX2_T_EV (1<<15) /* Bit 15: TX2 Timeout/Recv Event occurred*/ #define TX2_T_ON (1<<14) /* Bit 14: TX2 Timeout/Recv Timer Test On*/ #define TX2_T_OFF (1<<13) /* Bit 13: TX2 Timeout/Recv Timer Tst Off*/ #define TX2_T_STEP (1<<12) /* Bit 12: TX2 Timeout/Recv Timer Step */ -#define TX1_T_EV (1<<11) /* Bit 11: TX1 Timeout/Recv Event occured*/ +#define TX1_T_EV (1<<11) /* Bit 11: TX1 Timeout/Recv Event occurred*/ #define TX1_T_ON (1<<10) /* Bit 10: TX1 Timeout/Recv Timer Test On*/ #define TX1_T_OFF (1<<9) /* Bit 9: TX1 Timeout/Recv Timer Tst Off*/ #define TX1_T_STEP (1<<8) /* Bit 8: TX1 Timeout/Recv Timer Step */ -#define RX2_T_EV (1<<7) /* Bit 7: RX2 Timeout/Recv Event occured*/ +#define RX2_T_EV (1<<7) /* Bit 7: RX2 Timeout/Recv Event occurred*/ #define RX2_T_ON (1<<6) /* Bit 6: RX2 Timeout/Recv Timer Test On*/ #define RX2_T_OFF (1<<5) /* Bit 5: RX2 Timeout/Recv Timer Tst Off*/ #define RX2_T_STEP (1<<4) /* Bit 4: RX2 Timeout/Recv Timer Step */ -#define RX1_T_EV (1<<3) /* Bit 3: RX1 Timeout/Recv Event occured*/ +#define RX1_T_EV (1<<3) /* Bit 3: RX1 Timeout/Recv Event occurred*/ #define RX1_T_ON (1<<2) /* Bit 2: RX1 Timeout/Recv Timer Test On*/ #define RX1_T_OFF (1<<1) /* Bit 1: RX1 Timeout/Recv Timer Tst Off*/ #define RX1_T_STEP (1<<0) /* Bit 0: RX1 Timeout/Recv Timer Step */ @@ -1054,7 +1059,7 @@ /* TXA_ITI_VAL 32 bit Tx Arb Interval Timer Value */ /* TXA_LIM_INI 32 bit Tx Arb Limit Counter Init Val */ /* TXA_LIM_VAL 32 bit Tx Arb Limit Counter Value */ - /* Bit 31..24: reserved */ + /* Bit 31..24: reserved */ #define TXA_MAX_VAL 0x00ffffffL /* Bit 23.. 0: Max TXA Timer/Cnt Val */ /* TXA_CTRL 8 bit Tx Arbiter Control Register */ @@ -1063,9 +1068,9 @@ #define TXA_ENA_ALLOC (1<<5) /* Bit 5: Enable alloc of free bandwidth*/ #define TXA_DIS_ALLOC (1<<4) /* Bit 4: Disabl alloc of free bandwidth*/ #define TXA_START_RC (1<<3) /* Bit 3: Start sync Rate Control */ -#define TXA_STOP_RC (1<<2) /* Bit 2: Stop sync Rate Control */ -#define TXA_ENA_ARB (1<<1) /* Bit 1: Enable Tx Arbiter */ -#define TXA_DIS_ARB (1<<0) /* Bit 0: Disable Tx Arbiter */ +#define TXA_STOP_RC (1<<2) /* Bit 2: Stop sync Rate Control */ +#define TXA_ENA_ARB (1<<1) /* Bit 1: Enable Tx Arbiter */ +#define TXA_DIS_ARB (1<<0) /* Bit 0: Disable Tx Arbiter */ /* TXA_TEST 8 bit Tx Arbiter Test Register */ /* Bit 7..6: reserved */ @@ -1077,12 +1082,12 @@ #define TXA_LIM_T_STEP (1<<0) /* Bit 0: Tx Arb Limit Timer Step */ /* TXA_STAT 8 bit Tx Arbiter Status Register */ - /* Bit 7..1: reserved */ -#define TXA_PRIO_XS (1<<0) /* Bit 0: sync queue has prio to send */ + /* Bit 7..1: reserved */ +#define TXA_PRIO_XS (1<<0) /* Bit 0: sync queue has prio to send */ /* Q_BC 32 bit Current Byte Counter */ /* Bit 31..16: reserved */ -#define BC_MAX 0xffff /* Bit 15.. 0: Byte counter */ +#define BC_MAX 0xffff /* Bit 15.. 0: Byte counter */ /* BMU Control Status Registers */ /* B0_R1_CSR 32 bit BMU Ctrl/Stat Rx Queue 1 */ @@ -1092,47 +1097,47 @@ /* B0_XA2_CSR 32 bit BMU Ctrl/Stat Sync Tx Queue 2 */ /* B0_XS2_CSR 32 bit BMU Ctrl/Stat Async Tx Queue 2 */ /* Q_CSR 32 bit BMU Control/Status Register */ - /* Bit 31..25: reserved */ -#define CSR_SV_IDLE (1L<<24) /* Bit 24: BMU SM Idle */ - /* Bit 23..22: reserved */ + /* Bit 31..25: reserved */ +#define CSR_SV_IDLE (1L<<24) /* Bit 24: BMU SM Idle */ + /* Bit 23..22: reserved */ #define CSR_DESC_CLR (1L<<21) /* Bit 21: Clear Reset for Descr */ #define CSR_DESC_SET (1L<<20) /* Bit 20: Set Reset for Descr */ #define CSR_FIFO_CLR (1L<<19) /* Bit 19: Clear Reset for FIFO */ #define CSR_FIFO_SET (1L<<18) /* Bit 18: Set Reset for FIFO */ -#define CSR_HPI_RUN (1L<<17) /* Bit 17: Release HPI SM */ -#define CSR_HPI_RST (1L<<16) /* Bit 16: Reset HPI SM to Idle */ -#define CSR_SV_RUN (1L<<15) /* Bit 15: Release Supervisor SM */ -#define CSR_SV_RST (1L<<14) /* Bit 14: Reset Supervisor SM */ +#define CSR_HPI_RUN (1L<<17) /* Bit 17: Release HPI SM */ +#define CSR_HPI_RST (1L<<16) /* Bit 16: Reset HPI SM to Idle */ +#define CSR_SV_RUN (1L<<15) /* Bit 15: Release Supervisor SM */ +#define CSR_SV_RST (1L<<14) /* Bit 14: Reset Supervisor SM */ #define CSR_DREAD_RUN (1L<<13) /* Bit 13: Release Descr Read SM */ #define CSR_DREAD_RST (1L<<12) /* Bit 12: Reset Descr Read SM */ #define CSR_DWRITE_RUN (1L<<11) /* Bit 11: Rel. Descr Write SM */ #define CSR_DWRITE_RST (1L<<10) /* Bit 10: Reset Descr Write SM */ #define CSR_TRANS_RUN (1L<<9) /* Bit 9: Release Transfer SM */ #define CSR_TRANS_RST (1L<<8) /* Bit 8: Reset Transfer SM */ -#define CSR_ENA_POL (1L<<7) /* Bit 7: Enable Descr Polling */ -#define CSR_DIS_POL (1L<<6) /* Bit 6: Disable Descr Polling */ -#define CSR_STOP (1L<<5) /* Bit 5: Stop Rx/Tx Queue */ -#define CSR_START (1L<<4) /* Bit 4: Start Rx/Tx Queue */ +#define CSR_ENA_POL (1L<<7) /* Bit 7: Enable Descr Polling */ +#define CSR_DIS_POL (1L<<6) /* Bit 6: Disable Descr Polling */ +#define CSR_STOP (1L<<5) /* Bit 5: Stop Rx/Tx Queue */ +#define CSR_START (1L<<4) /* Bit 4: Start Rx/Tx Queue */ #define CSR_IRQ_CL_P (1L<<3) /* Bit 3: (Rx) Clear Parity IRQ */ #define CSR_IRQ_CL_B (1L<<2) /* Bit 2: Clear EOB IRQ */ #define CSR_IRQ_CL_F (1L<<1) /* Bit 1: Clear EOF IRQ */ #define CSR_IRQ_CL_C (1L<<0) /* Bit 0: Clear ERR IRQ */ #define CSR_SET_RESET (CSR_DESC_SET|CSR_FIFO_SET|CSR_HPI_RST|CSR_SV_RST|\ - CSR_DREAD_RST|CSR_DWRITE_RST|CSR_TRANS_RST) + CSR_DREAD_RST|CSR_DWRITE_RST|CSR_TRANS_RST) #define CSR_CLR_RESET (CSR_DESC_CLR|CSR_FIFO_CLR|CSR_HPI_RUN|CSR_SV_RUN|\ - CSR_DREAD_RUN|CSR_DWRITE_RUN|CSR_TRANS_RUN) + CSR_DREAD_RUN|CSR_DWRITE_RUN|CSR_TRANS_RUN) /* Q_F 32 bit Flag Register */ /* Bit 28..31: reserved */ -#define F_ALM_FULL (1L<<27) (Rx) /* Bit 27: (Rx) FIFO almost full */ -#define F_EMPTY (1L<<27) (Tx) /* Bit 27: (Tx) FIFO empty flag */ -#define F_FIFO_EOF (1L<<26) /* Bit 26: Fag bit in FIFO */ +#define F_ALM_FULL (1L<<27) (Rx) /* Bit 27: (Rx) FIFO almost full */ +#define F_EMPTY (1L<<27) (Tx) /* Bit 27: (Tx) FIFO empty flag */ +#define F_FIFO_EOF (1L<<26) /* Bit 26: Fag bit in FIFO */ #define F_WM_REACHED (1L<<25) /* Bit 25: Watermark reached */ - /* Bit 24: reserved */ + /* Bit 24: reserved */ #define F_FIFO_LEVEL (0x1fL<<16) /* Bit 23..16: # of Qwords in FIFO */ - /* Bit 15..11: reserved */ + /* Bit 15..11: reserved */ #define F_WATER_MARK 0x0007ffL /* Bit 10.. 0: Watermark */ /* Q_T1 32 bit Test Register 1 */ @@ -1166,9 +1171,9 @@ #define T2_STEP01 (1<<0) /* Bit 0: Inc AC/Dec BC by 1 */ /* Q_T3 32 bit Test Register 3 */ - /* Bit 31..7: reserved */ + /* Bit 31..7: reserved */ #define T3_MUX (7<<4) /* Bit 6.. 4: Mux Position */ - /* Bit 3: reserved */ + /* Bit 3: reserved */ #define T3_VRAM (7<<0) /* Bit 2.. 0: Virtual RAM Buffer Address */ /* RAM Buffer Register Offsets */ @@ -1187,7 +1192,7 @@ #define RB_MSK 0x0007ffff /* Bit 18.. 0: RAM Buffer Pointer Bits */ /* RB_TST2 8 bit RAM Buffer Test Register 2 */ - /* Bit 4..7: reserved */ + /* Bit 4..7: reserved */ #define RB_PC_DEC (1<<3) /* Bit 3: Packet Counter Decrem */ #define RB_PC_T_ON (1<<2) /* Bit 2: Packet Counter Test On */ #define RB_PC_T_OFF (1<<1) /* Bit 1: Packet Counter Tst Off */ @@ -1198,19 +1203,19 @@ #define RB_WP_T_ON (1<<6) /* Bit 6: Write Pointer Test On */ #define RB_WP_T_OFF (1<<5) /* Bit 5: Write Pointer Test Off */ #define RB_WP_INC (1<<4) /* Bit 4: Write Pointer Increm */ - /* Bit 3: reserved */ + /* Bit 3: reserved */ #define RB_RP_T_ON (1<<2) /* Bit 2: Read Pointer Test On */ #define RB_RP_T_OFF (1<<1) /* Bit 1: Read Pointer Test Off */ #define RB_RP_DEC (1<<0) /* Bit 0: Read Pointer Decrement */ /* RB_CTRL 8 bit RAM Buffer Control Register */ - /* Bit 7..6: reserved */ + /* Bit 7..6: reserved */ #define RB_ENA_STFWD (1<<5) /* Bit 5: Enable Store & Forward */ #define RB_DIS_STFWD (1<<4) /* Bit 4: Disab. Store & Forward */ #define RB_ENA_OP_MD (1<<3) /* Bit 3: Enable Operation Mode */ #define RB_DIS_OP_MD (1<<2) /* Bit 2: Disab. Operation Mode */ -#define RB_RST_CLR (1<<1) /* Bit 1: Clr RAM Buf STM Reset */ -#define RB_RST_SET (1<<0) /* Bit 0: Set RAM Buf STM Reset */ +#define RB_RST_CLR (1<<1) /* Bit 1: Clr RAM Buf STM Reset */ +#define RB_RST_SET (1<<0) /* Bit 0: Set RAM Buf STM Reset */ /* Receive and Transmit MAC FIFO Registers, use MR_ADDR() to address */ @@ -1225,11 +1230,11 @@ /* TX_MFF_RP 32 bit Transmit MAC FIFO Read Pointer */ /* TX_MFF_PC 32 bit Transmit MAC FIFO Packet Cnt */ /* TX_MFF_LEV 32 bit Transmit MAC FIFO Level */ - /* Bit 31..6: reserved */ + /* Bit 31..6: reserved */ #define MFF_MSK 0x007fL /* Bit 5..0: MAC FIFO Address/Pointer Bits */ /* RX_MFF_CTRL1 16 bit Receive MAC FIFO Control Reg 1 */ - /* Bit 15..14: reserved */ + /* Bit 15..14: reserved */ #define MFF_ENA_RDY_PAT (1<<13) /* Bit 13: Enable Ready Patch */ #define MFF_DIS_RDY_PAT (1<<12) /* Bit 12: Disable Ready Patch */ #define MFF_ENA_TIM_PAT (1<<11) /* Bit 11: Enable Timing Patch */ @@ -1249,15 +1254,15 @@ /* TX_MFF_CTRL1 16 bit Transmit MAC FIFO Control Reg 1 */ #define MFF_CLR_PERR (1<<15) /* Bit 15: Clear Parity Error IRQ*/ - /* Bit 14: reserved */ + /* Bit 14: reserved */ #define MFF_ENA_PKT_REC (1<<13) /* Bit 13: Enable Packet Recovery*/ #define MFF_DIS_PKT_REC (1<<12) /* Bit 12: Disable Packet Recov. */ /* MFF_ENA_TIM_PAT (see RX_MFF_CTRL1)Bit 11: Enable Timing Patch */ /* MFF_DIS_TIM_PAT (see RX_MFF_CTRL1)Bit 10: Disable Timing Patch */ /* MFF_ENA_ALM_FUL (see RX_MFF_CTRL1)Bit 9: Enable AlmostFull Sign*/ /* MFF_DIS_ALM_FUL (see RX_MFF_CTRL1)Bit 8: Disab. AlmostFull Sign*/ -#define MFF_ENA_W4E (1<<7) /* Bit 7: Enable Wait for Empty */ -#define MFF_DIS_W4E (1<<6) /* Bit 6: Disab. Wait for Empty */ +#define MFF_ENA_W4E (1<<7) /* Bit 7: Enable Wait for Empty */ +#define MFF_DIS_W4E (1<<6) /* Bit 6: Disab. Wait for Empty */ /* MFF_ENA_FLUSH (see RX_MFF_CTRL1)Bit 5: Enable Frame Flushing */ /* MFF_DIS_FLUSH (see RX_MFF_CTRL1)Bit 4: Disab. Frame Flushing */ #define MFF_ENA_LOOPB (1<<3) /* Bit 3: Enable Loopback */ @@ -1269,61 +1274,61 @@ /* RX_MFF_TST2 8 bit Receive MAC FIFO Test Register 2 */ /* TX_MFF_TST2 8 bit Transmit MAC FIFO Test Register 2 */ - /* Bit 7: reserved */ + /* Bit 7: reserved */ #define MFF_WSP_T_ON (1<<6) /* Bit 6: (Tx) Write Shadow Pt TestOn */ #define MFF_WSP_T_OFF (1<<5) /* Bit 5: (Tx) Write Shadow Pt TstOff */ -#define MFF_WSP_INC (1<<4) /* Bit 4: (Tx) Write Shadow Pt Increm */ -#define MFF_PC_DEC (1<<3) /* Bit 3: Packet Counter Decrem */ -#define MFF_PC_T_ON (1<<2) /* Bit 2: Packet Counter Test On */ +#define MFF_WSP_INC (1<<4) /* Bit 4: (Tx) Write Shadow Pt Increm */ +#define MFF_PC_DEC (1<<3) /* Bit 3: Packet Counter Decrem */ +#define MFF_PC_T_ON (1<<2) /* Bit 2: Packet Counter Test On */ #define MFF_PC_T_OFF (1<<1) /* Bit 1: Packet Counter Tst Off */ -#define MFF_PC_INC (1<<0) /* Bit 0: Packet Counter Increm */ +#define MFF_PC_INC (1<<0) /* Bit 0: Packet Counter Increm */ /* RX_MFF_TST1 8 bit Receive MAC FIFO Test Register 1 */ /* TX_MFF_TST1 8 bit Transmit MAC FIFO Test Register 1 */ - /* Bit 7: reserved */ -#define MFF_WP_T_ON (1<<6) /* Bit 6: Write Pointer Test On */ + /* Bit 7: reserved */ +#define MFF_WP_T_ON (1<<6) /* Bit 6: Write Pointer Test On */ #define MFF_WP_T_OFF (1<<5) /* Bit 5: Write Pointer Test Off */ -#define MFF_WP_INC (1<<4) /* Bit 4: Write Pointer Increm */ - /* Bit 3: reserved */ -#define MFF_RP_T_ON (1<<2) /* Bit 2: Read Pointer Test On */ +#define MFF_WP_INC (1<<4) /* Bit 4: Write Pointer Increm */ + /* Bit 3: reserved */ +#define MFF_RP_T_ON (1<<2) /* Bit 2: Read Pointer Test On */ #define MFF_RP_T_OFF (1<<1) /* Bit 1: Read Pointer Test Off */ -#define MFF_RP_DEC (1<<0) /* Bit 0: Read Pointer Decrement */ +#define MFF_RP_DEC (1<<0) /* Bit 0: Read Pointer Decrement */ /* RX_MFF_CTRL2 8 bit Receive MAC FIFO Control Reg 2 */ /* TX_MFF_CTRL2 8 bit Transmit MAC FIFO Control Reg 2 */ - /* Bit 7..4: reserved */ + /* Bit 7..4: reserved */ #define MFF_ENA_OP_MD (1<<3) /* Bit 3: Enable Operation Mode */ #define MFF_DIS_OP_MD (1<<2) /* Bit 2: Disab. Operation Mode */ -#define MFF_RST_CLR (1<<1) /* Bit 1: Clear MAC FIFO Reset */ -#define MFF_RST_SET (1<<0) /* Bit 0: Set MAC FIFO Reset */ +#define MFF_RST_CLR (1<<1) /* Bit 1: Clear MAC FIFO Reset */ +#define MFF_RST_SET (1<<0) /* Bit 0: Set MAC FIFO Reset */ /* Receive, Transmit, and Link LED Counter Registers */ -/* RX_LED_CTRL 8 bit Receive LED Cnt Control Reg */ -/* TX_LED_CTRL 8 bit Transmit LED Cnt Control Reg */ -/* LNK_SYNC_CTRL 8 bit Link Sync Cnt Control Register */ - /* Bit 7..3: reserved */ +/* RX_LED_CTRL 8 bit Receive LED Cnt Control Reg */ +/* TX_LED_CTRL 8 bit Transmit LED Cnt Control Reg */ +/* LNK_SYNC_CTRL 8 bit Link Sync Cnt Control Register */ + /* Bit 7..3: reserved */ #define LED_START (1<<2) /* Bit 2: Start Timer */ #define LED_STOP (1<<1) /* Bit 1: Stop Timer */ #define LED_STATE (1<<0) /* Bit 0:(Rx/Tx)LED State, 1=LED on */ #define LED_CLR_IRQ (1<<0) /* Bit 0:(Lnk) Clear Link IRQ */ -/* RX_LED_TST 8 bit Receive LED Cnt Test Register */ -/* TX_LED_TST 8 bit Transmit LED Cnt Test Register */ -/* LNK_SYNC_TST 8 bit Link Sync Cnt Test Register */ - /* Bit 7..3: reserved */ +/* RX_LED_TST 8 bit Receive LED Cnt Test Register */ +/* TX_LED_TST 8 bit Transmit LED Cnt Test Register */ +/* LNK_SYNC_TST 8 bit Link Sync Cnt Test Register */ + /* Bit 7..3: reserved */ #define LED_T_ON (1<<2) /* Bit 2: LED Counter Testmode On */ #define LED_T_OFF (1<<1) /* Bit 1: LED Counter Testmode Off */ #define LED_T_STEP (1<<0) /* Bit 0: LED Counter Step */ /* LNK_LED_REG 8 bit Link LED Register */ - /* Bit 7..6: reserved */ -#define LED_BLK_ON (1<<5) /* Bit 5: Link LED Blinking On */ -#define LED_BLK_OFF (1<<4) /* Bit 4: Link LED Blinking Off */ -#define LED_SYNC_ON (1<<3) /* Bit 3: Use Sync Wire to switch LED */ + /* Bit 7..6: reserved */ +#define LED_BLK_ON (1<<5) /* Bit 5: Link LED Blinking On */ +#define LED_BLK_OFF (1<<4) /* Bit 4: Link LED Blinking Off */ +#define LED_SYNC_ON (1<<3) /* Bit 3: Use Sync Wire to switch LED */ #define LED_SYNC_OFF (1<<2) /* Bit 2: Disable Sync Wire Input */ -#define LED_ON (1<<1) /* Bit 1: switch LED on */ -#define LED_OFF (1<<0) /* Bit 0: switch LED off */ +#define LED_ON (1<<1) /* Bit 1: switch LED on */ +#define LED_OFF (1<<0) /* Bit 0: switch LED off */ /* Receive and Transmit Descriptors ******************************************/ @@ -1331,42 +1336,42 @@ /* Transmit Descriptor struct */ typedef struct s_HwTxd { SK_U32 volatile TxCtrl; /* Transmit Buffer Control Field */ - SK_U32 TxNext ; /* Physical Address Pointer to the next TxD */ - SK_U32 TxAdrLo ; /* Physical Tx Buffer Address lower dword */ - SK_U32 TxAdrHi ; /* Physical Tx Buffer Address upper dword */ - SK_U32 TxStat ; /* Transmit Frame Status Word */ + SK_U32 TxNext; /* Physical Address Pointer to the next TxD */ + SK_U32 TxAdrLo; /* Physical Tx Buffer Address lower dword */ + SK_U32 TxAdrHi; /* Physical Tx Buffer Address upper dword */ + SK_U32 TxStat; /* Transmit Frame Status Word */ #ifndef SK_USE_REV_DESC - SK_U16 TxTcpOffs ; /* TCP Checksum Calculation Start Value */ - SK_U16 TxRes1 ; /* 16 bit reserved field */ - SK_U16 TxTcpWp ; /* TCP Checksum Write Position */ - SK_U16 TxTcpSp ; /* TCP Checksum Calculation Start Position */ + SK_U16 TxTcpOffs; /* TCP Checksum Calculation Start Value */ + SK_U16 TxRes1; /* 16 bit reserved field */ + SK_U16 TxTcpWp; /* TCP Checksum Write Position */ + SK_U16 TxTcpSp; /* TCP Checksum Calculation Start Position */ #else /* SK_USE_REV_DESC */ - SK_U16 TxRes1 ; /* 16 bit reserved field */ - SK_U16 TxTcpOffs ; /* TCP Checksum Calculation Start Value */ - SK_U16 TxTcpSp ; /* TCP Checksum Calculation Start Position */ - SK_U16 TxTcpWp ; /* TCP Checksum Write Position */ + SK_U16 TxRes1; /* 16 bit reserved field */ + SK_U16 TxTcpOffs; /* TCP Checksum Calculation Start Value */ + SK_U16 TxTcpSp; /* TCP Checksum Calculation Start Position */ + SK_U16 TxTcpWp; /* TCP Checksum Write Position */ #endif /* SK_USE_REV_DESC */ - SK_U32 TxRes2; /* 32 bit reserved field */ + SK_U32 TxRes2; /* 32 bit reserved field */ } SK_HWTXD; /* Receive Descriptor struct */ typedef struct s_HwRxd { SK_U32 volatile RxCtrl; /* Receive Buffer Control Field */ - SK_U32 RxNext ; /* Physical Address Pointer to the next TxD */ - SK_U32 RxAdrLo ; /* Physical Receive Buffer Address lower dword*/ - SK_U32 RxAdrHi ; /* Physical Receive Buffer Address upper dword*/ - SK_U32 RxStat ; /* Receive Frame Status Word */ - SK_U32 RxTiSt ; /* Receive Timestamp provided by the XMAC */ + SK_U32 RxNext; /* Physical Address Pointer to the next TxD */ + SK_U32 RxAdrLo; /* Physical Receive Buffer Address lower dword*/ + SK_U32 RxAdrHi; /* Physical Receive Buffer Address upper dword*/ + SK_U32 RxStat; /* Receive Frame Status Word */ + SK_U32 RxTiSt; /* Receive Timestamp provided by the XMAC */ #ifndef SK_USE_REV_DESC - SK_U16 RxTcpSum1 ; /* TCP Checksum 1 */ - SK_U16 RxTcpSum2 ; /* TCP Checksum 2 */ - SK_U16 RxTcpSp1 ; /* TCP Checksum Calculation Start Position 1 */ - SK_U16 RxTcpSp2 ; /* TCP Checksum Calculation Start Position 2 */ + SK_U16 RxTcpSum1; /* TCP Checksum 1 */ + SK_U16 RxTcpSum2; /* TCP Checksum 2 */ + SK_U16 RxTcpSp1; /* TCP Checksum Calculation Start Position 1 */ + SK_U16 RxTcpSp2; /* TCP Checksum Calculation Start Position 2 */ #else /* SK_USE_REV_DESC */ - SK_U16 RxTcpSum2 ; /* TCP Checksum 2 */ - SK_U16 RxTcpSum1 ; /* TCP Checksum 1 */ - SK_U16 RxTcpSp2 ; /* TCP Checksum Calculation Start Position 2 */ - SK_U16 RxTcpSp1 ; /* TCP Checksum Calculation Start Position 1 */ + SK_U16 RxTcpSum2; /* TCP Checksum 2 */ + SK_U16 RxTcpSum1; /* TCP Checksum 1 */ + SK_U16 RxTcpSp2; /* TCP Checksum Calculation Start Position 2 */ + SK_U16 RxTcpSp1; /* TCP Checksum Calculation Start Position 1 */ #endif /* SK_USE_REV_DESC */ } SK_HWRXD; @@ -1384,23 +1389,23 @@ /* Descriptor Bit Definition */ /* TxCtrl Transmit Buffer Control Field */ /* RxCtrl Receive Buffer Control Field */ -#define BMU_OWN (1UL<<31) /* Bit 31: OWN bit: 0=host/1=BMU */ -#define BMU_STF (1L<<30) /* Bit 30: Start of Frame ? */ -#define BMU_EOF (1L<<29) /* Bit 29: End of Frame ? */ -#define BMU_IRQ_EOB (1L<<28) /* Bit 28: Req "End of Buff" IRQ */ -#define BMU_IRQ_EOF (1L<<27) /* Bit 27: Req "End of Frame" IRQ*/ +#define BMU_OWN (1UL<<31) /* Bit 31: OWN bit: 0=host/1=BMU */ +#define BMU_STF (1L<<30) /* Bit 30: Start of Frame ? */ +#define BMU_EOF (1L<<29) /* Bit 29: End of Frame ? */ +#define BMU_IRQ_EOB (1L<<28) /* Bit 28: Req "End of Buff" IRQ */ +#define BMU_IRQ_EOF (1L<<27) /* Bit 27: Req "End of Frame" IRQ*/ /* TxCtrl specific bits */ -#define BMU_STFWD (1L<<26) /* Bit 26: (Tx) Store&Forward Frame */ -#define BMU_NO_FCS (1L<<25) /* Bit 25: (Tx) disable XMAC FCS gener*/ -#define BMU_SW (1L<<24) /* Bit 24: (Tx) 1 bit res. for SW use */ +#define BMU_STFWD (1L<<26) /* Bit 26: (Tx) Store&Forward Frame */ +#define BMU_NO_FCS (1L<<25) /* Bit 25: (Tx) disable XMAC FCS gener*/ +#define BMU_SW (1L<<24) /* Bit 24: (Tx) 1 bit res. for SW use */ /* RxCtrl specific bits */ -#define BMU_DEV_0 (1L<<26) /* Bit 26: (Rx) transfer data to Dev0 */ +#define BMU_DEV_0 (1L<<26) /* Bit 26: (Rx) transfer data to Dev0 */ #define BMU_STAT_VAL (1L<<25) /* Bit 25: (Rx) RxStat Valid */ #define BMU_TIST_VAL (1L<<24) /* Bit 24: (Rx) RxTiSt Valid */ - /* Bit 23..16: BMU Check Opcodes */ -#define BMU_CHECK 0x00550000L /* Default BMU check */ + /* Bit 23..16: BMU Check Opcodes */ +#define BMU_CHECK 0x00550000L /* Default BMU check */ #define BMU_TCP_CHECK 0x00560000L /* Descr with TCP ext */ -#define BMU_BBC 0x0000FFFFL /* Bit 15..0: Buffer Byte Counter */ +#define BMU_BBC 0x0000FFFFL /* Bit 15..0: Buffer Byte Counter */ /* TxStat Transmit Frame Status Word */ /* RxStat Receive Frame Status Word */ @@ -1417,8 +1422,8 @@ * FlashProm specification */ #define MAX_PAGES 0x20000L /* Every byte has a single page */ -#define MAX_FADDR 1 /* 1 byte per page */ -#define SKFDDI_PSZ 8 /* address PROM size */ +#define MAX_FADDR 1 /* 1 byte per page */ +#define SKFDDI_PSZ 8 /* address PROM size */ /* macros ********************************************************************/ @@ -1504,7 +1509,7 @@ * (p)Val Value or pointer to the value which should be read or * written. * - * usage: XM_OUT16(IoC, MAC_1, XM_MMU_CMD, Value) ; + * usage: XM_OUT16(IoC, MAC_1, XM_MMU_CMD, Value); */ #ifdef SK_LITTLE_ENDIAN @@ -1517,19 +1522,19 @@ #define XMA(Mac,Reg) (((0x1000 << (Mac)) + 0x1000) | ((Reg) << 1)) -#define XM_IN16(IoC,Mac,Reg,pVal) SK_IN16((IoC),XMA((Mac),(Reg)),(pVal)) -#define XM_OUT16(IoC,Mac,Reg,Val) SK_OUT16((IoC),XMA((Mac),(Reg)),(Val)) +#define XM_IN16(IoC,Mac,Reg,pVal) SK_IN16((IoC), XMA((Mac), (Reg)), (pVal)) +#define XM_OUT16(IoC,Mac,Reg,Val) SK_OUT16((IoC), XMA((Mac), (Reg)), (Val)) -#define XM_IN32(IoC,Mac,Reg,pVal) { \ - SK_IN16((IoC),XMA((Mac),(Reg)), \ +#define XM_IN32(IoC,Mac,Reg,pVal) { \ + SK_IN16((IoC), XMA((Mac), (Reg)), \ (SK_U16 *)&((SK_U16 *)(pVal))[XM_WORD_LO]); \ - SK_IN16((IoC),XMA((Mac),(Reg+2)), \ + SK_IN16((IoC), XMA((Mac), (Reg+2)), \ (SK_U16 *)&((SK_U16 *)(pVal))[XM_WORD_HI]); \ } -#define XM_OUT32(IoC,Mac,Reg,Val) { \ - SK_OUT16((IoC),XMA((Mac),(Reg)), (SK_U16)((Val) & 0x0000ffffL));\ - SK_OUT16((IoC),XMA((Mac),(Reg+2)),(SK_U16)(((Val)>>16) & 0x0000ffffL));\ +#define XM_OUT32(IoC,Mac,Reg,Val) { \ + SK_OUT16((IoC), XMA((Mac), (Reg)), (SK_U16)((Val) & 0x0000ffffL)); \ + SK_OUT16((IoC), XMA((Mac), (Reg+2)),(SK_U16)(((Val)>>16) & 0x0000ffffL)); \ } /* @@ -1537,67 +1542,67 @@ */ #define XM_INADDR(IoC, Mac, Reg, pVal) { \ - SK_U16 Word; \ - SK_U8 *pByte; \ + SK_U16 Word; \ + SK_U8 *pByte; \ pByte = (SK_U8 *)&((SK_U8 *)(pVal))[0]; \ SK_IN16((IoC), XMA((Mac), (Reg)), &Word); \ - pByte[0] = (SK_U8) (Word & 0x00ff); \ - pByte[1] = (SK_U8) ((Word >> 8) & 0x00ff); \ + pByte[0] = (SK_U8)(Word & 0x00ff); \ + pByte[1] = (SK_U8)((Word >> 8) & 0x00ff); \ SK_IN16((IoC), XMA((Mac), (Reg+2)), &Word); \ - pByte[2] = (SK_U8) (Word & 0x00ff); \ - pByte[3] = (SK_U8) ((Word >> 8) & 0x00ff); \ + pByte[2] = (SK_U8)(Word & 0x00ff); \ + pByte[3] = (SK_U8)((Word >> 8) & 0x00ff); \ SK_IN16((IoC), XMA((Mac), (Reg+4)), &Word); \ - pByte[4] = (SK_U8) (Word & 0x00ff); \ - pByte[5] = (SK_U8) ((Word >> 8) & 0x00ff); \ + pByte[4] = (SK_U8)(Word & 0x00ff); \ + pByte[5] = (SK_U8)((Word >> 8) & 0x00ff); \ } #define XM_OUTADDR(IoC, Mac, Reg, pVal) { \ - SK_U8 *pByte; \ + SK_U8 *pByte; \ pByte = (SK_U8 *)&((SK_U8 *)(pVal))[0]; \ SK_OUT16((IoC), XMA((Mac), (Reg)), (SK_U16) \ - (((SK_U16)(pByte[0]) & 0x00ff)| \ - (((SK_U16)(pByte[1]) << 8) & 0xff00))); \ - SK_OUT16((IoC), XMA((Mac), (Reg+2)), (SK_U16) \ - (((SK_U16)(pByte[2]) & 0x00ff)| \ - (((SK_U16)(pByte[3]) << 8) & 0xff00))); \ - SK_OUT16((IoC), XMA((Mac), (Reg+4)), (SK_U16) \ - (((SK_U16)(pByte[4]) & 0x00ff)| \ - (((SK_U16)(pByte[5]) << 8) & 0xff00))); \ + (((SK_U16)(pByte[0]) & 0x00ff) | \ + (((SK_U16)(pByte[1]) << 8) & 0xff00))); \ + SK_OUT16((IoC), XMA((Mac), (Reg+2)), (SK_U16) \ + (((SK_U16)(pByte[2]) & 0x00ff) | \ + (((SK_U16)(pByte[3]) << 8) & 0xff00))); \ + SK_OUT16((IoC), XMA((Mac), (Reg+4)), (SK_U16) \ + (((SK_U16)(pByte[4]) & 0x00ff) | \ + (((SK_U16)(pByte[5]) << 8) & 0xff00))); \ } #define XM_INHASH(IoC, Mac, Reg, pVal) { \ - SK_U16 Word; \ - SK_U8 *pByte; \ + SK_U16 Word; \ + SK_U8 *pByte; \ pByte = (SK_U8 *)&((SK_U8 *)(pVal))[0]; \ SK_IN16((IoC), XMA((Mac), (Reg)), &Word); \ - pByte[0] = (SK_U8) (Word & 0x00ff); \ - pByte[1] = (SK_U8) ((Word >> 8) & 0x00ff); \ + pByte[0] = (SK_U8)(Word & 0x00ff); \ + pByte[1] = (SK_U8)((Word >> 8) & 0x00ff); \ SK_IN16((IoC), XMA((Mac), (Reg+2)), &Word); \ - pByte[2] = (SK_U8) (Word & 0x00ff); \ - pByte[3] = (SK_U8) ((Word >> 8) & 0x00ff); \ + pByte[2] = (SK_U8)(Word & 0x00ff); \ + pByte[3] = (SK_U8)((Word >> 8) & 0x00ff); \ SK_IN16((IoC), XMA((Mac), (Reg+4)), &Word); \ - pByte[4] = (SK_U8) (Word & 0x00ff); \ - pByte[5] = (SK_U8) ((Word >> 8) & 0x00ff); \ + pByte[4] = (SK_U8)(Word & 0x00ff); \ + pByte[5] = (SK_U8)((Word >> 8) & 0x00ff); \ SK_IN16((IoC), XMA((Mac), (Reg+6)), &Word); \ - pByte[6] = (SK_U8) (Word & 0x00ff); \ - pByte[7] = (SK_U8) ((Word >> 8) & 0x00ff); \ + pByte[6] = (SK_U8)(Word & 0x00ff); \ + pByte[7] = (SK_U8)((Word >> 8) & 0x00ff); \ } #define XM_OUTHASH(IoC, Mac, Reg, pVal) { \ - SK_U8 *pByte; \ + SK_U8 *pByte; \ pByte = (SK_U8 *)&((SK_U8 *)(pVal))[0]; \ SK_OUT16((IoC), XMA((Mac), (Reg)), (SK_U16) \ - (((SK_U16)(pByte[0]) & 0x00ff)| \ - (((SK_U16)(pByte[1]) << 8) & 0xff00))); \ - SK_OUT16((IoC), XMA((Mac), (Reg+2)), (SK_U16) \ - (((SK_U16)(pByte[2]) & 0x00ff)| \ - (((SK_U16)(pByte[3]) << 8) & 0xff00))); \ - SK_OUT16((IoC), XMA((Mac), (Reg+4)), (SK_U16) \ - (((SK_U16)(pByte[4]) & 0x00ff)| \ - (((SK_U16)(pByte[5]) << 8) & 0xff00))); \ - SK_OUT16((IoC), XMA((Mac), (Reg+6)), (SK_U16) \ - (((SK_U16)(pByte[6]) & 0x00ff)| \ - (((SK_U16)(pByte[7]) << 8) & 0xff00))); \ + (((SK_U16)(pByte[0]) & 0x00ff)| \ + (((SK_U16)(pByte[1]) << 8) & 0xff00))); \ + SK_OUT16((IoC), XMA((Mac), (Reg+2)), (SK_U16) \ + (((SK_U16)(pByte[2]) & 0x00ff)| \ + (((SK_U16)(pByte[3]) << 8) & 0xff00))); \ + SK_OUT16((IoC), XMA((Mac), (Reg+4)), (SK_U16) \ + (((SK_U16)(pByte[4]) & 0x00ff)| \ + (((SK_U16)(pByte[5]) << 8) & 0xff00))); \ + SK_OUT16((IoC), XMA((Mac), (Reg+6)), (SK_U16) \ + (((SK_U16)(pByte[6]) & 0x00ff)| \ + (((SK_U16)(pByte[7]) << 8) & 0xff00))); \ } /* @@ -1630,35 +1635,60 @@ * written. * * usage: PHY_READ(IoC, pPort, MAC_1, PHY_CTRL, Value); + * Warning: a PHY_READ on an uninitialized PHY (PHY still in reset) never + * comes back. This is checked in DEBUG mode. */ -#define PHY_READ(IoC, pPort, Mac, PhyReg, pVal) { \ - SK_U16 Mmu; \ - \ - XM_OUT16((IoC),(Mac), XM_PHY_ADDR, (PhyReg)|(pPort)->PhyAddr); \ - XM_IN16((IoC), (Mac), XM_PHY_DATA, (pVal)); \ - if ((pPort)->PhyType != SK_PHY_XMAC) { \ - do { \ - XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \ - } while ((Mmu & XM_MMU_PHY_RDY) == 0); \ - XM_IN16((IoC), (Mac), XM_PHY_DATA, (pVal)); \ - } \ +#ifndef DEBUG +#define PHY_READ(IoC, pPort, Mac, PhyReg, pVal) { \ + SK_U16 Mmu; \ + \ + XM_OUT16((IoC), (Mac), XM_PHY_ADDR, (PhyReg) | (pPort)->PhyAddr); \ + XM_IN16((IoC), (Mac), XM_PHY_DATA, (pVal)); \ + if ((pPort)->PhyType != SK_PHY_XMAC) { \ + do { \ + XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \ + } while ((Mmu & XM_MMU_PHY_RDY) == 0); \ + XM_IN16((IoC), (Mac), XM_PHY_DATA, (pVal)); \ + } \ +} +#else +#define PHY_READ(IoC, pPort, Mac, PhyReg, pVal) { \ + SK_U16 Mmu; \ + int __i = 0; \ + \ + XM_OUT16((IoC), (Mac), XM_PHY_ADDR, (PhyReg) | (pPort)->PhyAddr); \ + XM_IN16((IoC), (Mac), XM_PHY_DATA, (pVal)); \ + if ((pPort)->PhyType != SK_PHY_XMAC) { \ + do { \ + XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \ + __i++; \ + if (__i > 100000) { \ + SK_DBG_PRINTF("*****************************\n"); \ + SK_DBG_PRINTF("PHY_READ on uninitialized PHY\n"); \ + SK_DBG_PRINTF("*****************************\n"); \ + break; \ + } \ + } while ((Mmu & XM_MMU_PHY_RDY) == 0); \ + XM_IN16((IoC), (Mac), XM_PHY_DATA, (pVal)); \ + } \ } +#endif -#define PHY_WRITE(IoC, pPort, Mac, PhyReg, Val) { \ - SK_U16 Mmu; \ - \ - if ((pPort)->PhyType != SK_PHY_XMAC) { \ - do { \ - XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \ - } while ((Mmu & XM_MMU_PHY_BUSY) != 0); \ - } \ - XM_OUT16((IoC), (Mac), XM_PHY_ADDR, (PhyReg)|(pPort)->PhyAddr); \ - XM_OUT16((IoC), (Mac), XM_PHY_DATA, (Val)); \ - if ((pPort)->PhyType != SK_PHY_XMAC) { \ - do { \ - XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \ - } while ((Mmu & XM_MMU_PHY_BUSY) != 0); \ - } \ +#define PHY_WRITE(IoC, pPort, Mac, PhyReg, Val) { \ + SK_U16 Mmu; \ + \ + if ((pPort)->PhyType != SK_PHY_XMAC) { \ + do { \ + XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \ + } while ((Mmu & XM_MMU_PHY_BUSY) != 0); \ + } \ + XM_OUT16((IoC), (Mac), XM_PHY_ADDR, (PhyReg) | (pPort)->PhyAddr); \ + XM_OUT16((IoC), (Mac), XM_PHY_DATA, (Val)); \ + if ((pPort)->PhyType != SK_PHY_XMAC) { \ + do { \ + XM_IN16((IoC), (Mac), XM_MMU_CMD, &Mmu); \ + } while ((Mmu & XM_MMU_PHY_BUSY) != 0); \ + } \ } /* @@ -1703,7 +1733,7 @@ * Mode Mode to set for this LED */ #define SK_HWAC_LINK_LED(pAC, IoC, Port, Mode) \ -SK_OUT8(IoC, MR_ADDR(Port,LNK_LED_REG), Mode); + SK_OUT8(IoC, MR_ADDR(Port,LNK_LED_REG), Mode); /* typedefs *******************************************************************/ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/h/skgeinit.h linux.20p6/drivers/net/sk98lin/h/skgeinit.h --- linux.vanilla/drivers/net/sk98lin/h/skgeinit.h Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/h/skgeinit.h Tue Jun 19 09:46:01 2001 @@ -2,16 +2,15 @@ * * Name: skgeinit.h * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.45 $ - * Date: $Date: 1999/11/22 13:56:19 $ + * Version: $Revision: 1.51 $ + * Date: $Date: 2001/02/09 12:26:38 $ * Purpose: Structures and prototypes for the GE Init Module * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2001 SysKonnect GmbH. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +26,26 @@ * History: * * $Log: skgeinit.h,v $ + * Revision 1.51 2001/02/09 12:26:38 cgoos + * Inserted #ifdef DIAG for half duplex workaround timer. + * + * Revision 1.50 2001/02/07 07:56:40 rassmann + * Corrected copyright. + * + * Revision 1.49 2001/01/31 15:32:18 gklug + * fix: problem with autosensing an SR8800 switch + * add: counter for autoneg timeouts + * + * Revision 1.48 2000/11/09 11:30:10 rassmann + * WA: Waiting after releasing reset until BCom chip is accessible. + * + * Revision 1.47 2000/10/18 12:22:40 cgoos + * Added workaround for half duplex hangup. + * + * Revision 1.46 2000/08/10 11:28:00 rassmann + * Editorial changes. + * Preserving 32-bit alignment in structs for the adapter context. + * * Revision 1.45 1999/11/22 13:56:19 cgoos * Changed license header to GPL. * @@ -436,6 +455,12 @@ */ #define SK_MAX_LRESTART 3 /* Max. 3 times the link is restarted */ +/* + * define max. autonegotiation timeouts before link detection in sense mode is + * reset. + */ +#define SK_MAX_ANEG_TO 10 /* Max. 10 times the sense mode is reset */ + /* structures *****************************************************************/ /* @@ -446,61 +471,71 @@ SK_TIMER PWaTimer; /* Workaround Timer */ #endif SK_U64 PPrevShorts; /* Previous short Counter checking */ - SK_U64 PPrevRx; /* Previous RxOk Counter checking */ - SK_U64 PPrevFcs; /* Previous FCS Error Counter checking */ - SK_U64 PRxLim; /* Previous RxOk Counter checking */ - int PLinkResCt; /* Link Restart Counter */ - int PAutoNegTimeOut;/* AutoNegotiation timeout current value */ - int PRxQSize; /* Port Rx Queue Size in kB */ - int PXSQSize; /* Port Synchronous Transmit Queue Size in kB */ - int PXAQSize; /* Port Asynchronous Transmit Queue Size in kB*/ + SK_U64 PPrevRx; /* Previous RxOk Counter checking */ + SK_U64 PPrevFcs; /* Previous FCS Error Counter checking */ + SK_U64 PRxLim; /* Previous RxOk Counter checking */ + SK_U64 LastOctets; /* For half duplex hang check */ +#ifndef SK_DIAG + SK_TIMER HalfDupChkTimer; +#endif + int PLinkResCt; /* Link Restart Counter */ + int PAutoNegTimeOut;/* AutoNegotiation timeout current value */ + int PAutoNegTOCt; /* AutoNeg Timeout Counter */ + int PRxQSize; /* Port Rx Queue Size in kB */ + int PXSQSize; /* Port Synchronous Transmit Queue Size in kB */ + int PXAQSize; /* Port Asynchronous Transmit Queue Size in kB*/ SK_U32 PRxQRamStart; /* Receive Queue RAM Buffer Start Address */ - SK_U32 PRxQRamEnd; /* Receive Queue RAM Buffer End Address */ + SK_U32 PRxQRamEnd; /* Receive Queue RAM Buffer End Address */ SK_U32 PXsQRamStart; /* Sync Tx Queue RAM Buffer Start Address */ - SK_U32 PXsQRamEnd; /* Sync Tx Queue RAM Buffer End Address */ + SK_U32 PXsQRamEnd; /* Sync Tx Queue RAM Buffer End Address */ SK_U32 PXaQRamStart; /* Async Tx Queue RAM Buffer Start Address */ - SK_U32 PXaQRamEnd; /* Async Tx Queue RAM Buffer End Address */ - int PRxQOff; /* Rx Queue Address Offset */ - int PXsQOff; /* Synchronous Tx Queue Address Offset */ - int PXaQOff; /* Asynchronous Tx Queue Address Offset */ - SK_U16 PRxCmd; /* Port Receive Command Configuration Value */ - SK_U16 PIsave; /* Saved Interrupt status word */ - SK_U16 PSsave; /* Saved PHY status word */ - SK_BOOL PHWLinkUp; /* The hardware Link is up (wireing) */ - SK_BOOL PState; /* Is port initialized ? */ + SK_U32 PXaQRamEnd; /* Async Tx Queue RAM Buffer End Address */ + int PRxQOff; /* Rx Queue Address Offset */ + int PXsQOff; /* Synchronous Tx Queue Address Offset */ + int PXaQOff; /* Asynchronous Tx Queue Address Offset */ + int PhyType; /* PHY used on this port */ + SK_U16 PhyAddr; /* MDIO/MDC PHY address */ + SK_U16 PRxCmd; /* Port Receive Command Configuration Value */ + SK_U16 PIsave; /* Saved Interrupt status word */ + SK_U16 PSsave; /* Saved PHY status word */ + SK_U16 Align01; + SK_BOOL PHWLinkUp; /* The hardware Link is up (wireing) */ + SK_BOOL PState; /* Is port initialized ? */ SK_BOOL PLinkBroken; /* Is Link broken ? */ - SK_BOOL PCheckPar; /* Do we check for parity errors ? */ - SK_U8 PLinkCap; /* Link Capabilities */ + SK_BOOL PCheckPar; /* Do we check for parity errors ? */ + SK_BOOL HalfDupTimerActive; + SK_U8 PLinkCap; /* Link Capabilities */ SK_U8 PLinkModeConf; /* Link Mode configured */ - SK_U8 PLinkMode; /* Link Mode currently used */ - SK_U8 PLinkModeStatus; /* Link Mode Status */ + SK_U8 PLinkMode; /* Link Mode currently used */ + SK_U8 PLinkModeStatus;/* Link Mode Status */ SK_U8 PFlowCtrlCap; /* Flow Control Capabilities */ SK_U8 PFlowCtrlMode; /* Flow Control Mode */ - SK_U8 PFlowCtrlStatus; /* Flow Control Status */ - SK_U8 PMSCap; /* Master/Slave Capabilities */ - SK_U8 PMSMode; /* Master/Slave Mode */ - SK_U8 PMSStatus; /* Master/Slave Status */ + SK_U8 PFlowCtrlStatus;/* Flow Control Status */ + SK_U8 PMSCap; /* Master/Slave Capabilities */ + SK_U8 PMSMode; /* Master/Slave Mode */ + SK_U8 PMSStatus; /* Master/Slave Status */ SK_U8 PAutoNegFail; /* Autonegotiation fail flag */ SK_U8 PLipaAutoNeg; /* Autonegotiation possible with Link Partner */ - int PhyType; /* PHY used on this port */ - SK_U16 PhyAddr; /* MDIO/MDC PHY address */ + SK_U8 Align02; } SK_GEPORT; /* * Gigabit Ethernet Initalization Struct - * (has to be included in the adapter context + * (has to be included in the adapter context) */ typedef struct s_GeInit { - int GIMacsFound; /* Number of MACs found on this adapter */ - int GIPciHwRev; /* PCI HW Revision Number */ - SK_U32 GIRamOffs; /* RAM Address Offset for addr calculation */ - int GIRamSize; /* The RAM size of the adapter in kB */ - int GIHstClkFact; /* Host Clock Factor (62.5 / HstClk * 100) */ - int GIPortUsage; /* driver port usage: SK_RED_LINK/SK_MUL_LINK */ - SK_U32 GIPollTimerVal; /* Descriptor Poll Timer Init Val in clk ticks*/ - int GILevel; /* Initialization Level Completed */ - SK_BOOL GIAnyPortAct; /* Is True if one or more port is initialized */ - SK_GEPORT GP[SK_MAX_MACS]; /* Port Dependent Information */ + int GIMacsFound; /* Number of MACs found on this adapter */ + int GIPciHwRev; /* PCI HW Revision Number */ + SK_U32 GIRamOffs; /* RAM Address Offset for addr calculation */ + int GIRamSize; /* The RAM size of the adapter in kB */ + int GIHstClkFact; /* Host Clock Factor (62.5 / HstClk * 100) */ + int GIPortUsage; /* driver port usage: SK_RED_LINK/SK_MUL_LINK */ + SK_U32 GIPollTimerVal; /* Descriptor Poll Timer Init Val in clk ticks*/ + int GILevel; /* Initialization Level Completed */ + SK_GEPORT GP[SK_MAX_MACS];/* Port Dependent Information */ + SK_BOOL GIAnyPortAct; /* Is True if one or more port is initialized */ + SK_U8 Align01; + SK_U16 Align02; } SK_GEINIT; /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/h/skgepnm2.h linux.20p6/drivers/net/sk98lin/h/skgepnm2.h --- linux.vanilla/drivers/net/sk98lin/h/skgepnm2.h Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/h/skgepnm2.h Tue Jun 19 09:46:01 2001 @@ -2,16 +2,15 @@ * * Name: skgepnm2.h * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.25 $ - * Date: $Date: 1999/11/22 13:57:41 $ + * Version: $Revision: 1.30 $ + * Date: $Date: 2001/02/06 10:03:41 $ * Purpose: Defines for Private Network Management Interface * ****************************************************************************/ /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2001 SysKonnect GmbH. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +26,24 @@ * History: * * $Log: skgepnm2.h,v $ + * Revision 1.30 2001/02/06 10:03:41 mkunz + * - Pnmi V4 dual net support added. Interface functions and macros extended + * - Vpd bug fixed + * - OID_SKGE_MTU added + * + * Revision 1.29 2001/01/22 13:41:37 rassmann + * Supporting two nets on dual-port adapters. + * + * Revision 1.28 2000/08/03 15:12:48 rwahl + * - Additional comment for MAC statistic data structure. + * + * Revision 1.27 2000/08/01 16:10:18 rwahl + * - Added mac statistic data structure for StatRxLongFrame counter. + * + * Revision 1.26 2000/03/31 13:51:34 rwahl + * Added SK_UPTR cast to offset calculation for PNMI struct fields; + * missing cast caused compiler warnings by Win64 compiler. + * * Revision 1.25 1999/11/22 13:57:41 cgoos * Changed license header to GPL. * Allowing overwrite for SK_PNMI_STORE/_READ defines. @@ -149,8 +166,6 @@ /* * VPD releated defines */ -#define SK_PNMI_VPD_ARR_SIZE 40 -#define SK_PNMI_VPD_STR_SIZE 5 #define SK_PNMI_VPD_RW 1 #define SK_PNMI_VPD_RO 2 @@ -191,7 +206,8 @@ int Access; int (* Func)(SK_AC *pAc, SK_IOC pIo, int action, SK_U32 Id, char* pBuf, unsigned int* pLen, - SK_U32 Instance, unsigned int TableIndex); + SK_U32 Instance, unsigned int TableIndex, + SK_U32 NetNumber); SK_U16 Param; } SK_PNMI_TAB_ENTRY; @@ -207,6 +223,8 @@ /* * MAC statistic data structures + * Only for the first 64 counters: the number relates to the bit in the + * XMAC overflow status register */ #define SK_PNMI_HTX 0 #define SK_PNMI_HTX_OCTET 1 @@ -278,6 +296,8 @@ #define SK_PNMI_HTX_SYNC 64 #define SK_PNMI_HTX_SYNC_OCTET 65 +#define SK_PNMI_HRX_LONGFRAMES 66 + #define SK_PNMI_MAX_IDX (SK_PNMI_CNT_NO) /* @@ -292,25 +312,25 @@ /* * SK_PNMI_STRUCT_DATA copy offset evaluation macros */ -#define SK_PNMI_OFF(e) ((SK_U32)&(((SK_PNMI_STRUCT_DATA *)0)->e)) -#define SK_PNMI_MAI_OFF(e) ((SK_U32)&(((SK_PNMI_STRUCT_DATA *)0)->e)) -#define SK_PNMI_VPD_OFF(e) ((SK_U32)&(((SK_PNMI_VPD *)0)->e)) -#define SK_PNMI_SEN_OFF(e) ((SK_U32)&(((SK_PNMI_SENSOR *)0)->e)) -#define SK_PNMI_CHK_OFF(e) ((SK_U32)&(((SK_PNMI_CHECKSUM *)0)->e)) -#define SK_PNMI_STA_OFF(e) ((SK_U32)&(((SK_PNMI_STAT *)0)->e)) -#define SK_PNMI_CNF_OFF(e) ((SK_U32)&(((SK_PNMI_CONF *)0)->e)) -#define SK_PNMI_RLM_OFF(e) ((SK_U32)&(((SK_PNMI_RLMT *)0)->e)) -#define SK_PNMI_MON_OFF(e) ((SK_U32)&(((SK_PNMI_RLMT_MONITOR *)0)->e)) -#define SK_PNMI_TRP_OFF(e) ((SK_U32)&(((SK_PNMI_TRAP *)0)->e)) +#define SK_PNMI_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_STRUCT_DATA *)0)->e)) +#define SK_PNMI_MAI_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_STRUCT_DATA *)0)->e)) +#define SK_PNMI_VPD_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_VPD *)0)->e)) +#define SK_PNMI_SEN_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_SENSOR *)0)->e)) +#define SK_PNMI_CHK_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_CHECKSUM *)0)->e)) +#define SK_PNMI_STA_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_STAT *)0)->e)) +#define SK_PNMI_CNF_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_CONF *)0)->e)) +#define SK_PNMI_RLM_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_RLMT *)0)->e)) +#define SK_PNMI_MON_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_RLMT_MONITOR *)0)->e)) +#define SK_PNMI_TRP_OFF(e) ((SK_U32)(SK_UPTR)&(((SK_PNMI_TRAP *)0)->e)) #define SK_PNMI_SET_STAT(b,s,o) {SK_U32 Val32; char *pVal; \ Val32 = (s); \ - pVal = (char *)(b) + ((SK_U32) \ + pVal = (char *)(b) + ((SK_U32)(SK_UPTR) \ &(((SK_PNMI_STRUCT_DATA *)0)-> \ ReturnStatus.ErrorStatus)); \ SK_PNMI_STORE_U32(pVal, Val32); \ Val32 = (o); \ - pVal = (char *)(b) + ((SK_U32) \ + pVal = (char *)(b) + ((SK_U32)(SK_UPTR) \ &(((SK_PNMI_STRUCT_DATA *)0)-> \ ReturnStatus.ErrorOffset)); \ SK_PNMI_STORE_U32(pVal, Val32);} diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/h/skgepnmi.h linux.20p6/drivers/net/sk98lin/h/skgepnmi.h --- linux.vanilla/drivers/net/sk98lin/h/skgepnmi.h Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/h/skgepnmi.h Tue Jun 19 09:46:01 2001 @@ -2,16 +2,15 @@ * * Name: skgepnmi.h * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.39 $ - * Date: $Date: 1999/12/06 10:09:47 $ + * Version: $Revision: 1.48 $ + * Date: $Date: 2001/02/23 14:34:24 $ * Purpose: Defines for Private Network Management Interface * ****************************************************************************/ /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2001 SysKonnect GmbH. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,12 +26,53 @@ * History: * * $Log: skgepnmi.h,v $ + * Revision 1.48 2001/02/23 14:34:24 mkunz + * Changed macro PHYS2INST. Added pAC to Interface + * + * Revision 1.47 2001/02/07 08:28:23 mkunz + * - Added Oids: OID_SKGE_DIAG_ACTION + * OID_SKGE_DIAG_RESULT + * OID_SKGE_MULTICAST_LIST + * OID_SKGE_CURRENT_PACKET_FILTER + * OID_SKGE_INTERMEDIATE_SUPPORT + * - Changed value of OID_SKGE_MTU + * + * Revision 1.46 2001/02/06 10:01:41 mkunz + * - Pnmi V4 dual net support added. Interface functions and macros extended + * - Vpd bug fixed + * - OID_SKGE_MTU added + * + * Revision 1.45 2001/01/22 13:41:37 rassmann + * Supporting two nets on dual-port adapters. + * + * Revision 1.44 2000/09/07 07:35:27 rwahl + * - removed NDIS counter specific data type. + * - fixed spelling for OID_SKGE_RLMT_PORT_PREFERRED. + * + * Revision 1.43 2000/08/04 11:41:08 rwahl + * - Fixed compiler warning (port is always >= 0) for macros + * SK_PNMI_CNT_RX_LONGFRAMES & SK_PNMI_CNT_SYNC_OCTETS + * + * Revision 1.42 2000/08/03 15:14:07 rwahl + * - Corrected error in driver macros addressing a physical port. + * + * Revision 1.41 2000/08/01 16:22:29 rwahl + * - Changed MDB version to 3.1. + * - Added definitions for StatRxLongFrames counter. + * - Added macro to be used by driver to count long frames received. + * - Added directive to control width (default = 32bit) of NDIS statistic + * counters (SK_NDIS_64BIT_CTR). + * + * Revision 1.40 2000/03/31 13:51:34 rwahl + * Added SK_UPTR cast to offset calculation for PNMI struct fields; + * missing cast caused compiler warnings by Win64 compiler. + * * Revision 1.39 1999/12/06 10:09:47 rwahl * Added new error log message. * * Revision 1.38 1999/11/22 13:57:55 cgoos * Changed license header to GPL. - * + * * Revision 1.37 1999/09/14 14:25:32 rwahl * Set MDB version for 1000Base-T (sensors, Master/Slave) changes. * @@ -90,7 +130,7 @@ * * Revision 1.22 1998/11/03 12:05:51 mhaveman * Added pAC parameter to counter macors. - * + * * Revision 1.21 1998/11/02 10:47:36 mhaveman * Added syslog messages for internal errors. * @@ -165,33 +205,34 @@ #include "h/ski2c.h" #include "h/skaddr.h" #include "h/skrlmt.h" - +#include "h/skvpd.h" /* * Management Database Version */ -#define SK_PNMI_MDB_VERSION 0x00030000 /* 3.0 */ +#define SK_PNMI_MDB_VERSION 0x00030001 /* 3.1 */ /* * Event definitions */ -#define SK_PNMI_EVT_SIRQ_OVERFLOW 1 /* Counter overflow */ -#define SK_PNMI_EVT_SEN_WAR_LOW 2 /* Lower war thres exceeded */ -#define SK_PNMI_EVT_SEN_WAR_UPP 3 /* Upper war thres exceeded */ -#define SK_PNMI_EVT_SEN_ERR_LOW 4 /* Lower err thres exceeded */ -#define SK_PNMI_EVT_SEN_ERR_UPP 5 /* Upper err thres exceeded */ -#define SK_PNMI_EVT_CHG_EST_TIMER 6 /* Timer event for RLMT Chg */ +#define SK_PNMI_EVT_SIRQ_OVERFLOW 1 /* Counter overflow */ +#define SK_PNMI_EVT_SEN_WAR_LOW 2 /* Lower war thres exceeded */ +#define SK_PNMI_EVT_SEN_WAR_UPP 3 /* Upper war thres exceeded */ +#define SK_PNMI_EVT_SEN_ERR_LOW 4 /* Lower err thres exceeded */ +#define SK_PNMI_EVT_SEN_ERR_UPP 5 /* Upper err thres exceeded */ +#define SK_PNMI_EVT_CHG_EST_TIMER 6 /* Timer event for RLMT Chg */ #define SK_PNMI_EVT_UTILIZATION_TIMER 7 /* Timer event for Utiliza. */ -#define SK_PNMI_EVT_CLEAR_COUNTER 8 /* Clear statistic counters */ -#define SK_PNMI_EVT_XMAC_RESET 9 /* XMAC will be reset */ +#define SK_PNMI_EVT_CLEAR_COUNTER 8 /* Clear statistic counters */ +#define SK_PNMI_EVT_XMAC_RESET 9 /* XMAC will be reset */ -#define SK_PNMI_EVT_RLMT_PORT_UP 10 /* Port came logically up */ -#define SK_PNMI_EVT_RLMT_PORT_DOWN 11 /* Port went logically down */ -#define SK_PNMI_EVT_RLMT_PORT_SWITCH 12 /* Switched active port */ +#define SK_PNMI_EVT_RLMT_PORT_UP 10 /* Port came logically up */ +#define SK_PNMI_EVT_RLMT_PORT_DOWN 11 /* Port went logically down */ #define SK_PNMI_EVT_RLMT_SEGMENTATION 13 /* Two SP root bridges found */ #define SK_PNMI_EVT_RLMT_ACTIVE_DOWN 14 /* Port went logically down */ -#define SK_PNMI_EVT_RLMT_ACTIVE_UP 15 /* Port came logically up */ +#define SK_PNMI_EVT_RLMT_ACTIVE_UP 15 /* Port came logically up */ +#define SK_PNMI_EVT_RLMT_SET_NETS 16 /* 1. Parameter is number of nets + 1 = single net; 2 = dual net */ /* * Return values @@ -203,6 +244,7 @@ #define SK_PNMI_ERR_READ_ONLY 4 #define SK_PNMI_ERR_UNKNOWN_OID 5 #define SK_PNMI_ERR_UNKNOWN_INST 6 +#define SK_PNMI_ERR_UNKNOWN_NET 7 /* @@ -333,7 +375,7 @@ #define OID_SKGE_CHKSM_RX_ERR_CTS 0xFF020113 #define OID_SKGE_CHKSM_TX_OK_CTS 0xFF020114 #define OID_SKGE_CHKSM_TX_UNABLE_CTS 0xFF020115 - + #define OID_SKGE_STAT_TX 0xFF020120 #define OID_SKGE_STAT_TX_OCTETS 0xFF020121 #define OID_SKGE_STAT_TX_BROADCAST 0xFF020122 @@ -389,7 +431,11 @@ #define OID_SKGE_STAT_RX_511 0xFF020154 #define OID_SKGE_STAT_RX_1023 0xFF020155 #define OID_SKGE_STAT_RX_MAX 0xFF020156 - +#define OID_SKGE_STAT_RX_LONGFRAMES 0xFF020157 + +#define OID_SKGE_DIAG_ACTION 0xFF01011D +#define OID_SKGE_DIAG_RESULT 0xFF01011E +#define OID_SKGE_MTU 0xFF01011F #define OID_SKGE_PHYS_CUR_ADDR 0xFF010120 #define OID_SKGE_PHYS_FAC_ADDR 0xFF010121 #define OID_SKGE_PMD 0xFF010122 @@ -404,19 +450,22 @@ #define OID_SKGE_PHY_OPERATION_CAP 0xFF01012B #define OID_SKGE_PHY_OPERATION_MODE 0xFF01012C #define OID_SKGE_PHY_OPERATION_STATUS 0xFF01012D - +#define OID_SKGE_MULTICAST_LIST 0xFF01012E +#define OID_SKGE_CURRENT_PACKET_FILTER 0xFF01012F + #define OID_SKGE_TRAP 0xFF010130 #define OID_SKGE_TRAP_NUMBER 0xFF010131 #define OID_SKGE_RLMT_MODE 0xFF010140 #define OID_SKGE_RLMT_PORT_NUMBER 0xFF010141 #define OID_SKGE_RLMT_PORT_ACTIVE 0xFF010142 -#define OID_SKGE_RLMT_PORT_PREFERED 0xFF010143 +#define OID_SKGE_RLMT_PORT_PREFERRED 0xFF010143 +#define OID_SKGE_INTERMEDIATE_SUPPORT 0xFF010160 #define OID_SKGE_RLMT_CHANGE_CTS 0xFF020160 #define OID_SKGE_RLMT_CHANGE_TIME 0xFF020161 #define OID_SKGE_RLMT_CHANGE_ESTIM 0xFF020162 #define OID_SKGE_RLMT_CHANGE_THRES 0xFF020163 - + #define OID_SKGE_RLMT_PORT_INDEX 0xFF020164 #define OID_SKGE_RLMT_STATUS 0xFF020165 #define OID_SKGE_RLMT_TX_HELLO_CTS 0xFF020166 @@ -424,7 +473,7 @@ #define OID_SKGE_RLMT_TX_SP_REQ_CTS 0xFF020168 #define OID_SKGE_RLMT_RX_SP_CTS 0xFF020169 -#define OID_SKGE_RLMT_MONITOR_NUMBER 0xFF010150 +#define OID_SKGE_RLMT_MONITOR_NUMBER 0xFF010150 #define OID_SKGE_RLMT_MONITOR_INDEX 0xFF010151 #define OID_SKGE_RLMT_MONITOR_ADDR 0xFF010152 #define OID_SKGE_RLMT_MONITOR_ERRS 0xFF010153 @@ -448,7 +497,7 @@ #define OID_SKGE_ERR_RECOVERY_CTS 0xFF02017E #define OID_SKGE_SYSUPTIME 0xFF02017F -#define OID_SKGE_ALL_DATA 0xFF020190 +#define OID_SKGE_ALL_DATA 0xFF020190 #define OID_SKGE_TRAP_SEN_WAR_LOW 500 @@ -577,32 +626,40 @@ #define SK_PNMI_SET_DRIVER_VER(pAC,v) ((pAC)->Pnmi.pDriverVersion = \ (char *)(v)) -#define SK_PNMI_CNT_TX_QUEUE_LEN(pAC,v) \ + +#define SK_PNMI_CNT_TX_QUEUE_LEN(pAC,v,p) \ { \ - (pAC)->Pnmi.TxSwQueueLen = (SK_U64)(v); \ - if ((pAC)->Pnmi.TxSwQueueLen > (pAC)->Pnmi.TxSwQueueMax) { \ - (pAC)->Pnmi.TxSwQueueMax = (pAC)->Pnmi.TxSwQueueLen; \ + (pAC)->Pnmi.Port[p].TxSwQueueLen = (SK_U64)(v); \ + if ((pAC)->Pnmi.Port[p].TxSwQueueLen > (pAC)->Pnmi.Port[p].TxSwQueueMax) { \ + (pAC)->Pnmi.Port[p].TxSwQueueMax = (pAC)->Pnmi.Port[p].TxSwQueueLen; \ } \ } -#define SK_PNMI_CNT_TX_RETRY(pAC) (((pAC)->Pnmi.TxRetryCts)++) -#define SK_PNMI_CNT_RX_INTR(pAC) (((pAC)->Pnmi.RxIntrCts)++) -#define SK_PNMI_CNT_TX_INTR(pAC) (((pAC)->Pnmi.TxIntrCts)++) -#define SK_PNMI_CNT_NO_RX_BUF(pAC) (((pAC)->Pnmi.RxNoBufCts)++) -#define SK_PNMI_CNT_NO_TX_BUF(pAC) (((pAC)->Pnmi.TxNoBufCts)++) -#define SK_PNMI_CNT_USED_TX_DESCR(pAC,v) \ - ((pAC)->Pnmi.TxUsedDescrNo=(SK_U64)(v)); -#define SK_PNMI_CNT_RX_OCTETS_DELIVERED(pAC,v) \ +#define SK_PNMI_CNT_TX_RETRY(pAC,p) (((pAC)->Pnmi.Port[p].TxRetryCts)++) +#define SK_PNMI_CNT_RX_INTR(pAC,p) (((pAC)->Pnmi.Port[p].RxIntrCts)++) +#define SK_PNMI_CNT_TX_INTR(pAC,p) (((pAC)->Pnmi.Port[p].TxIntrCts)++) +#define SK_PNMI_CNT_NO_RX_BUF(pAC,p) (((pAC)->Pnmi.Port[p].RxNoBufCts)++) +#define SK_PNMI_CNT_NO_TX_BUF(pAC,p) (((pAC)->Pnmi.Port[p].TxNoBufCts)++) +#define SK_PNMI_CNT_USED_TX_DESCR(pAC,v,p) \ + ((pAC)->Pnmi.Port[p].TxUsedDescrNo=(SK_U64)(v)); +#define SK_PNMI_CNT_RX_OCTETS_DELIVERED(pAC,v,p) \ { \ - ((pAC)->Pnmi.RxDeliveredCts)++; \ - (pAC)->Pnmi.RxOctetsDeliveredCts += (SK_U64)(v); \ + ((pAC)->Pnmi.Port[p].RxDeliveredCts)++; \ + (pAC)->Pnmi.Port[p].RxOctetsDeliveredCts += (SK_U64)(v); \ } -#define SK_PNMI_CNT_ERR_RECOVERY(pAC) (((pAC)->Pnmi.ErrRecoveryCts)++); +#define SK_PNMI_CNT_ERR_RECOVERY(pAC,p) (((pAC)->Pnmi.Port[p].ErrRecoveryCts)++); #define SK_PNMI_CNT_SYNC_OCTETS(pAC,p,v) \ { \ - if (((p) >= 0) && ((p) < SK_MAX_MACS)) { \ - ((pAC)->Pnmi.StatSyncCts[p])++; \ - (pAC)->Pnmi.StatSyncOctetsCts[p] += (SK_U64)(v); \ + if ((p) < SK_MAX_MACS) { \ + ((pAC)->Pnmi.Port[p].StatSyncCts)++; \ + (pAC)->Pnmi.Port[p].StatSyncOctetsCts += (SK_U64)(v); \ + } \ + } + +#define SK_PNMI_CNT_RX_LONGFRAMES(pAC,p) \ + { \ + if ((p) < SK_MAX_MACS) { \ + ((pAC)->Pnmi.Port[p].StatRxLongFrameCts)++; \ } \ } @@ -613,14 +670,18 @@ #define SK_PNMI_PORT_LOG2INST(l) ((unsigned int)(l) + 1) #define SK_PNMI_PORT_PHYS2LOG(p) ((unsigned int)(p) + 1) #define SK_PNMI_PORT_LOG2PHYS(pAC,l) ((unsigned int)(l) - 1) -#define SK_PNMI_PORT_PHYS2INST(p) ((unsigned int)(p) + 2) +#define SK_PNMI_PORT_PHYS2INST(pAC,p) \ + (pAC->Pnmi.DualNetActiveFlag ? 2 : ((unsigned int)(p) + 2)) #define SK_PNMI_PORT_INST2PHYS(pAC,i) ((unsigned int)(i) - 2) /* * Structure definition for SkPnmiGetStruct and SkPnmiSetStruct */ -#define SK_PNMI_VPD_ENTRIES 20 -#define SK_PNMI_VPD_DATALEN 128 +#define SK_PNMI_VPD_KEY_SIZE 5 +#define SK_PNMI_VPD_BUFSIZE (VPD_SIZE) +#define SK_PNMI_VPD_ENTRIES (VPD_SIZE / 4) +#define SK_PNMI_VPD_DATALEN 128 /* Number of data bytes */ + #define SK_PNMI_MULTICAST_LISTLEN 64 #define SK_PNMI_SENSOR_ENTRIES (SK_MAX_SENSORS) #define SK_PNMI_CHECKSUM_ENTRIES 3 @@ -633,7 +694,7 @@ #define SK_PNMI_TRAP_QUEUE_LEN 512 typedef struct s_PnmiVpd { - char VpdKey[5]; + char VpdKey[SK_PNMI_VPD_KEY_SIZE]; char VpdValue[SK_PNMI_VPD_DATALEN]; SK_U8 VpdAccess; SK_U8 VpdAction; @@ -695,6 +756,7 @@ SK_U64 StatRxBroadcastOkCts; SK_U64 StatRxMulticastOkCts; SK_U64 StatRxUnicastOkCts; + SK_U64 StatRxLongFramesCts; SK_U64 StatRxPauseMacCtrlCts; SK_U64 StatRxMacCtrlCts; SK_U64 StatRxPauseMacCtrlErrorCts; @@ -764,7 +826,7 @@ SK_U32 MgmtDBVersion; SK_PNMI_REQUEST_STATUS ReturnStatus; SK_U32 VpdFreeBytes; - char VpdEntriesList[SK_PNMI_VPD_DATALEN]; + char VpdEntriesList[SK_PNMI_VPD_ENTRIES * SK_PNMI_VPD_KEY_SIZE]; SK_U32 VpdEntriesNumber; SK_PNMI_VPD Vpd[SK_PNMI_VPD_ENTRIES]; SK_U32 PortNumber; @@ -774,6 +836,7 @@ char HwDescr[SK_PNMI_STRINGLEN1]; char HwVersion[SK_PNMI_STRINGLEN2]; SK_U16 Chipset; + SK_U32 MtuSize; SK_U32 Action; SK_U32 TestResult; SK_U8 BusType; @@ -817,8 +880,9 @@ } SK_PNMI_STRUCT_DATA; #define SK_PNMI_STRUCT_SIZE (sizeof(SK_PNMI_STRUCT_DATA)) -#define SK_PNMI_MIN_STRUCT_SIZE ((unsigned int)&(((SK_PNMI_STRUCT_DATA *)0)->\ - VpdFreeBytes)) /* +#define SK_PNMI_MIN_STRUCT_SIZE ((unsigned int)(SK_UPTR)\ + &(((SK_PNMI_STRUCT_DATA *)0)->VpdFreeBytes)) + /* * ReturnStatus field * must be located * before VpdFreeBytes @@ -830,7 +894,7 @@ #define SK_PNMI_MAX_PROTOS 3 #define SK_PNMI_SCNT_NOT 64 -#define SK_PNMI_CNT_NO 66 +#define SK_PNMI_CNT_NO 67 /* * Estimate data structure @@ -851,9 +915,26 @@ SK_U64 CounterOffset[SK_PNMI_CNT_NO]; SK_U64 StatSyncCts; SK_U64 StatSyncOctetsCts; + SK_U64 StatRxLongFrameCts; SK_BOOL ActiveFlag; + SK_U64 TxSwQueueLen; + SK_U64 TxSwQueueMax; + SK_U64 TxRetryCts; + SK_U64 RxIntrCts; + SK_U64 TxIntrCts; + SK_U64 RxNoBufCts; + SK_U64 TxNoBufCts; + SK_U64 TxUsedDescrNo; + SK_U64 RxDeliveredCts; + SK_U64 RxOctetsDeliveredCts; + SK_U64 RxHwErrorsCts; + SK_U64 TxHwErrorsCts; + SK_U64 InErrorsCts; + SK_U64 OutErrorsCts; + SK_U64 ErrRecoveryCts; } SK_PNMI_PORT; + typedef struct s_PnmiData { SK_PNMI_PORT Port[SK_MAX_MACS]; SK_U64 VirtualCounterOffset[SK_PNMI_CNT_NO]; @@ -884,19 +965,8 @@ char PciBusWidth; char PMD; char Connector; - - SK_U64 TxSwQueueLen; - SK_U64 TxSwQueueMax; - SK_U64 TxRetryCts; - SK_U64 RxIntrCts; - SK_U64 TxIntrCts; - SK_U64 RxNoBufCts; - SK_U64 TxNoBufCts; - SK_U64 TxUsedDescrNo; - SK_U64 RxDeliveredCts; - SK_U64 RxOctetsDeliveredCts; - SK_U64 ErrRecoveryCts; SK_U64 StartUpTime; + SK_BOOL DualNetActiveFlag; } SK_PNMI; @@ -905,17 +975,17 @@ */ extern int SkPnmiInit(SK_AC *pAc, SK_IOC IoC, int level); extern int SkPnmiGetVar(SK_AC *pAc, SK_IOC IoC, SK_U32 Id, void* pBuf, - unsigned int* pLen, SK_U32 Instance); + unsigned int* pLen, SK_U32 Instance, SK_U32 NetIndex); extern int SkPnmiPreSetVar(SK_AC *pAc, SK_IOC IoC, SK_U32 Id, - void* pBuf, unsigned int *pLen, SK_U32 Instance); + void* pBuf, unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex); extern int SkPnmiSetVar(SK_AC *pAc, SK_IOC IoC, SK_U32 Id, void* pBuf, - unsigned int *pLen, SK_U32 Instance); + unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex); extern int SkPnmiGetStruct(SK_AC *pAc, SK_IOC IoC, void* pBuf, - unsigned int *pLen); + unsigned int *pLen, SK_U32 NetIndex); extern int SkPnmiPreSetStruct(SK_AC *pAc, SK_IOC IoC, void* pBuf, - unsigned int *pLen); + unsigned int *pLen, SK_U32 NetIndex); extern int SkPnmiSetStruct(SK_AC *pAc, SK_IOC IoC, void* pBuf, - unsigned int *pLen); + unsigned int *pLen, SK_U32 NetIndex); extern int SkPnmiEvent(SK_AC *pAc, SK_IOC IoC, SK_U32 Event, SK_EVPARA Param); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/h/skgesirq.h linux.20p6/drivers/net/sk98lin/h/skgesirq.h --- linux.vanilla/drivers/net/sk98lin/h/skgesirq.h Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/h/skgesirq.h Tue Jun 19 09:46:01 2001 @@ -2,16 +2,15 @@ * * Name: skgesirq.h * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.20 $ - * Date: $Date: 1999/12/06 10:00:44 $ + * Version: $Revision: 1.22 $ + * Date: $Date: 2000/11/09 11:30:10 $ * Purpose: SK specific Gigabit Ethernet special IRQ functions * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2000 SysKonnect GmbH. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -26,6 +25,12 @@ * * History: * $Log: skgesirq.h,v $ + * Revision 1.22 2000/11/09 11:30:10 rassmann + * WA: Waiting after releasing reset until BCom chip is accessible. + * + * Revision 1.21 2000/10/18 12:22:40 cgoos + * Added workaround for half duplex hangup. + * * Revision 1.20 1999/12/06 10:00:44 cgoos * Added SET event for role. * @@ -106,9 +111,12 @@ #define SK_HWEV_SET_LMODE 6 /* Set Link Mode by PNMI */ #define SK_HWEV_SET_FLOWMODE 7 /* Set Flow Control Mode by PNMI */ #define SK_HWEV_SET_ROLE 8 /* Set Master/Slave (Role) by PNMI */ +#define SK_HWEV_HALFDUP_CHK 9 /* Set Master/Slave (Role) by PNMI */ #define SK_WA_ACT_TIME (5000000L) /* 5 sec */ #define SK_WA_INA_TIME (100000L) /* 100 msec */ + +#define SK_HALFDUP_CHK_TIME (10000L) /* 10 msec */ /* * Define the error numbers and messages diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/h/ski2c.h linux.20p6/drivers/net/sk98lin/h/ski2c.h --- linux.vanilla/drivers/net/sk98lin/h/ski2c.h Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/h/ski2c.h Tue Jun 19 09:46:04 2001 @@ -2,8 +2,8 @@ * * Name: ski2c.h * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.28 $ - * Date: $Date: 1999/11/22 13:55:46 $ + * Version: $Revision: 1.30 $ + * Date: $Date: 2001/04/05 11:38:09 $ * Purpose: Defines to access Voltage and Temperature Sensor * (taken from Monalisa (taken from Concentrator)) * @@ -28,6 +28,14 @@ * History: * * $Log: ski2c.h,v $ + * Revision 1.30 2001/04/05 11:38:09 rassmann + * Set SenState to idle in SkI2cWaitIrq(). + * Changed error message in SkI2cWaitIrq(). + * + * Revision 1.29 2000/08/03 14:28:17 rassmann + * - Added function to wait for I2C being ready before resetting the board. + * - Replaced one duplicate "out of range" message with correct one. + * * Revision 1.28 1999/11/22 13:55:46 cgoos * Changed license header to GPL. * @@ -178,24 +186,26 @@ #define SKERR_I2C_E014MSG "WARNING: fan sensor out of range" #define SKERR_I2C_E015 (SKERR_I2C_E014+1) #define SKERR_I2C_E015MSG "ERROR: fan sensor out of range" +#define SKERR_I2C_E016 (SKERR_I2C_E015+1) +#define SKERR_I2C_E016MSG "I2C: active transfer does not complete.\n" /* * Define Timeout values */ -#define SK_I2C_TIM_LONG 2000000L /* 2 second */ -#define SK_I2C_TIM_SHORT 100000L /* 100 milli second */ +#define SK_I2C_TIM_LONG 2000000L /* 2 seconds */ +#define SK_I2C_TIM_SHORT 100000L /* 100 milliseconds */ /* * Define trap and error log hold times */ #ifndef SK_SEN_ERR_TR_HOLD -#define SK_SEN_ERR_TR_HOLD (4*SK_TICKS_PER_SEC) +#define SK_SEN_ERR_TR_HOLD (4*SK_TICKS_PER_SEC) #endif #ifndef SK_SEN_ERR_LOG_HOLD -#define SK_SEN_ERR_LOG_HOLD (60*SK_TICKS_PER_SEC) +#define SK_SEN_ERR_LOG_HOLD (60*SK_TICKS_PER_SEC) #endif #ifndef SK_SEN_WARN_TR_HOLD -#define SK_SEN_WARN_TR_HOLD (15*SK_TICKS_PER_SEC) +#define SK_SEN_WARN_TR_HOLD (15*SK_TICKS_PER_SEC) #endif #ifndef SK_SEN_WARN_LOG_HOLD #define SK_SEN_WARN_LOG_HOLD (15*60*SK_TICKS_PER_SEC) @@ -257,10 +267,11 @@ extern int SkI2cReadSensor(SK_AC *pAC, SK_IOC IoC, SK_SENSOR *pSen); #ifndef SK_DIAG -extern int SkI2cEvent(SK_AC *pAC, SK_IOC IoC, SK_U32 Event, - SK_EVPARA Para); +extern int SkI2cEvent(SK_AC *pAC, SK_IOC IoC, SK_U32 Event, SK_EVPARA Para); extern int SkI2cInit(SK_AC *pAC, SK_IOC IoC, int Level); +extern void SkI2cWaitIrq(SK_AC *pAC, SK_IOC IoC); extern void SkI2cIsr(SK_AC *pAC, SK_IOC IoC); #endif #endif /* n_SKI2C_H */ + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/h/skrlmt.h linux.20p6/drivers/net/sk98lin/h/skrlmt.h --- linux.vanilla/drivers/net/sk98lin/h/skrlmt.h Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/h/skrlmt.h Tue Jun 19 09:46:01 2001 @@ -2,16 +2,15 @@ * * Name: skrlmt.h * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.27 $ - * Date: $Date: 1999/11/22 13:59:56 $ + * Version: $Revision: 1.32 $ + * Date: $Date: 2001/02/14 14:06:31 $ * Purpose: Header file for Redundant Link ManagemenT. * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2001 SysKonnect GmbH. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,14 +26,26 @@ * History: * * $Log: skrlmt.h,v $ + * Revision 1.32 2001/02/14 14:06:31 rassmann + * Editorial changes. + * + * Revision 1.31 2001/02/05 14:25:26 rassmann + * Prepared RLMT for transparent operation. + * + * Revision 1.30 2001/01/22 13:41:39 rassmann + * Supporting two nets on dual-port adapters. + * + * Revision 1.29 2000/11/17 08:58:00 rassmann + * Moved CheckSwitch from SK_RLMT_PACKET_RECEIVED to SK_RLMT_TIM event. + * + * Revision 1.28 2000/11/09 12:24:34 rassmann + * Editorial changes. + * * Revision 1.27 1999/11/22 13:59:56 cgoos * Changed license header to GPL. * * Revision 1.26 1999/10/04 14:01:19 rassmann - * Corrected reaction to reception of BPDU frames. - * Added parameter descriptions to "For Readme" section skrlmt.txt. - * Clarified usage of lookahead result *pForRlmt. - * Requested driver to present RLMT packets as soon as poosible. + * Corrected reaction to reception of BPDU frames (#10441). * * Revision 1.25 1999/07/20 12:53:39 rassmann * Fixed documentation errors for lookahead macros. @@ -149,7 +160,7 @@ #define __INC_SKRLMT_H #ifdef __cplusplus -xxxx /* not supported yet - force error */ +#error C++ is not yet supported. extern "C" { #endif /* cplusplus */ @@ -169,128 +180,140 @@ /* ----- PORT states ----- */ -#define SK_RLMT_PS_INIT 0 /* Port state: Init. */ +#define SK_RLMT_PS_INIT 0 /* Port state: Init. */ #define SK_RLMT_PS_LINK_DOWN 1 /* Port state: Link down. */ -#define SK_RLMT_PS_DOWN 2 /* Port state: Port down. */ -#define SK_RLMT_PS_GOING_UP 3 /* Port state: Going up. */ -#define SK_RLMT_PS_UP 4 /* Port state: Up. */ +#define SK_RLMT_PS_DOWN 2 /* Port state: Port down. */ +#define SK_RLMT_PS_GOING_UP 3 /* Port state: Going up. */ +#define SK_RLMT_PS_UP 4 /* Port state: Up. */ /* ----- RLMT states ----- */ -#define SK_RLMT_RS_INIT 0 /* RLMT state: Init. */ -#define SK_RLMT_RS_NET_DOWN 1 /* RLMT state: Net down. */ -#define SK_RLMT_RS_NET_UP 2 /* RLMT state: Net up. */ +#define SK_RLMT_RS_INIT 0 /* RLMT state: Init. */ +#define SK_RLMT_RS_NET_DOWN 1 /* RLMT state: Net down. */ +#define SK_RLMT_RS_NET_UP 2 /* RLMT state: Net up. */ /* ----- PORT events ----- */ -#define SK_RLMT_LINK_UP 1001 /* Link came up. */ -#define SK_RLMT_LINK_DOWN 1002 /* Link went down. */ -#define SK_RLMT_PORT_ADDR 1003 /* Port address changed. */ +#define SK_RLMT_LINK_UP 1001 /* Link came up. */ +#define SK_RLMT_LINK_DOWN 1002 /* Link went down. */ +#define SK_RLMT_PORT_ADDR 1003 /* Port address changed. */ /* ----- RLMT events ----- */ -#define SK_RLMT_START 2001 /* Start RLMT. */ -#define SK_RLMT_STOP 2002 /* Stop RLMT. */ +#define SK_RLMT_START 2001 /* Start RLMT. */ +#define SK_RLMT_STOP 2002 /* Stop RLMT. */ #define SK_RLMT_PACKET_RECEIVED 2003 /* Packet was received for RLMT. */ -#define SK_RLMT_STATS_CLEAR 2004 /* Clear statistics. */ +#define SK_RLMT_STATS_CLEAR 2004 /* Clear statistics. */ #define SK_RLMT_STATS_UPDATE 2005 /* Update statistics. */ #define SK_RLMT_PREFPORT_CHANGE 2006 /* Change preferred port. */ -#define SK_RLMT_MODE_CHANGE 2007 /* New RlmtMode. */ +#define SK_RLMT_MODE_CHANGE 2007 /* New RlmtMode. */ +#define SK_RLMT_SET_NETS 2008 /* Number of Nets (1 or 2). */ /* ----- RLMT mode bits ----- */ -#define SK_RLMT_CHECK_LINK 1 /* Check Link. */ -#define SK_RLMT_CHECK_LOC_LINK 2 /* Check other link on same adapter. */ -#define SK_RLMT_CHECK_SEG 4 /* Check segmentation. */ +/* + * CAUTION: These defines are private to RLMT. + * Please use the RLMT mode defines below. + */ + +#define SK_RLMT_CHECK_LINK 1 /* Check Link. */ +#define SK_RLMT_CHECK_LOC_LINK 2 /* Check other link on same adapter. */ +#define SK_RLMT_CHECK_SEG 4 /* Check segmentation. */ #ifndef RLMT_CHECK_REMOTE #define SK_RLMT_CHECK_OTHERS SK_RLMT_CHECK_LOC_LINK #else /* RLMT_CHECK_REMOTE */ -#define SK_RLMT_CHECK_REM_LINK 8 /* Check link(s) on other adapter(s). */ +#define SK_RLMT_CHECK_REM_LINK 8 /* Check link(s) on other adapter(s). */ #define SK_RLMT_MAX_REMOTE_PORTS_CHECKED 3 -#define SK_RLMT_CHECK_OTHERS (SK_RLMT_CHECK_LOC_LINK | \ - SK_RLMT_CHECK_REM_LINK) +#define SK_RLMT_CHECK_OTHERS \ + (SK_RLMT_CHECK_LOC_LINK | SK_RLMT_CHECK_REM_LINK) #endif /* RLMT_CHECK_REMOTE */ +#ifndef SK_RLMT_ENABLE_TRANSPARENT +#define SK_RLMT_TRANSPARENT 0 /* RLMT transparent - inactive. */ +#else /* SK_RLMT_ENABLE_TRANSPARENT */ +#define SK_RLMT_TRANSPARENT 128 /* RLMT transparent. */ +#endif /* SK_RLMT_ENABLE_TRANSPARENT */ + /* ----- RLMT modes ----- */ /* Check Link State. */ #define SK_RLMT_MODE_CLS (SK_RLMT_CHECK_LINK) /* Check Local Ports: check other links on the same adapter. */ -#define SK_RLMT_MODE_CLP (SK_RLMT_CHECK_LINK | \ - SK_RLMT_CHECK_LOC_LINK) +#define SK_RLMT_MODE_CLP (SK_RLMT_CHECK_LINK | SK_RLMT_CHECK_LOC_LINK) /* Check Local Ports and Segmentation Status. */ -#define SK_RLMT_MODE_CLPSS (SK_RLMT_CHECK_LINK | \ - SK_RLMT_CHECK_LOC_LINK | \ - SK_RLMT_CHECK_SEG) +#define SK_RLMT_MODE_CLPSS \ + (SK_RLMT_CHECK_LINK | SK_RLMT_CHECK_LOC_LINK | SK_RLMT_CHECK_SEG) #ifdef RLMT_CHECK_REMOTE /* Check Local and Remote Ports: check links (local or remote). */ Name of define TBD! -#define SK_RLMT_MODE_CRP (SK_RLMT_CHECK_LINK | \ - SK_RLMT_CHECK_LOC_LINK | \ - SK_RLMT_CHECK_REM_LINK) +#define SK_RLMT_MODE_CRP \ + (SK_RLMT_CHECK_LINK | SK_RLMT_CHECK_LOC_LINK | SK_RLMT_CHECK_REM_LINK) /* Check Local and Remote Ports and Segmentation Status. */ Name of define TBD! -#define SK_RLMT_MODE_CRPSS (SK_RLMT_CHECK_LINK | \ - SK_RLMT_CHECK_LOC_LINK | \ - SK_RLMT_CHECK_REM_LINK | \ - SK_RLMT_CHECK_SEG) +#define SK_RLMT_MODE_CRPSS \ + (SK_RLMT_CHECK_LINK | SK_RLMT_CHECK_LOC_LINK | \ + SK_RLMT_CHECK_REM_LINK | SK_RLMT_CHECK_SEG) #endif /* RLMT_CHECK_REMOTE */ /* ----- RLMT lookahead result bits ----- */ -#define SK_RLMT_RX_RLMT 1 /* Give packet to RLMT. */ -#define SK_RLMT_RX_PROTOCOL 2 /* Give packet to protocol. */ +#define SK_RLMT_RX_RLMT 1 /* Give packet to RLMT. */ +#define SK_RLMT_RX_PROTOCOL 2 /* Give packet to protocol. */ /* Macros */ #if 0 SK_AC *pAC /* adapter context */ -SK_U32 PortIdx /* receiving port */ -unsigned PacketLength /* received packet's length */ -SK_BOOL IsBc /* Flag: broadcast received */ -unsigned *pOffset /* Result: offset of bytes to present - to SK_RLMT_LOOKAHEAD */ -unsigned *pNumBytes /* Result: #Bytes to present - to SK_RLMT_LOOKAHEAD */ +SK_U32 PortNum /* receiving port */ +unsigned PktLen /* received packet's length */ +SK_BOOL IsBc /* Flag: packet is broadcast */ +unsigned *pOffset /* offs. of bytes to present to SK_RLMT_LOOKAHEAD */ +unsigned *pNumBytes /* #Bytes to present to SK_RLMT_LOOKAHEAD */ #endif /* 0 */ - -#define SK_RLMT_PRE_LOOKAHEAD(pAC,PortIdx,PacketLength,IsBc,pOffset,pNumBytes) { \ +#define SK_RLMT_PRE_LOOKAHEAD(pAC,PortNum,PktLen,IsBc,pOffset,pNumBytes) { \ SK_AC *_pAC; \ - SK_U32 _PortIdx; \ + SK_U32 _PortNum; \ _pAC = (pAC); \ - _PortIdx = (SK_U32)(PortIdx); \ - _pAC->Rlmt.Port[_PortIdx].PacketsRx++; \ - _pAC->Rlmt.Port[_PortIdx].PacketsPerTimeSlot++; \ - if ((IsBc) && _pAC->Rlmt.RlmtMode != SK_RLMT_MODE_CLS) { \ - *(pOffset) = 6; \ - *(pNumBytes) = 6; \ + _PortNum = (SK_U32)(PortNum); \ + /* _pAC->Rlmt.Port[_PortNum].PacketsRx++; */ \ + _pAC->Rlmt.Port[_PortNum].PacketsPerTimeSlot++; \ + if ((_pAC->Rlmt.Port[_PortNum].Net->RlmtMode & SK_RLMT_TRANSPARENT) != 0) { \ + *(pNumBytes) = 0; \ + } \ + else if (IsBc) { \ + if (_pAC->Rlmt.Port[_PortNum].Net->RlmtMode != SK_RLMT_MODE_CLS) { \ + *(pNumBytes) = 6; \ + *(pOffset) = 6; \ + } \ + else { \ + *(pNumBytes) = 0; \ + } \ } \ else { \ - *(pOffset) = 0; \ - if ((PacketLength) > SK_RLMT_MAX_TX_BUF_SIZE) { \ - _pAC->Rlmt.Port[_PortIdx].DataPacketsPerTimeSlot++; \ + if ((PktLen) > SK_RLMT_MAX_TX_BUF_SIZE) { \ + /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \ *(pNumBytes) = 0; \ } \ else { \ *(pNumBytes) = 6; \ + *(pOffset) = 0; \ } \ } \ } #if 0 SK_AC *pAC /* adapter context */ -SK_U32 PortIdx /* receiving port */ +SK_U32 PortNum /* receiving port */ SK_U8 *pLaPacket, /* received packet's data (points to pOffset) */ -SK_BOOL IsBc /* Flag: broadcast received */ -SK_BOOL IsMc /* Flag: multicast received */ -unsigned *pForRlmt /* Result: bits SK_RLMT_RX_RLMT, - SK_RLMT_RX_PROTOCOL */ +SK_BOOL IsBc /* Flag: packet is broadcast */ +SK_BOOL IsMc /* Flag: packet is multicast */ +unsigned *pForRlmt /* Result: bits SK_RLMT_RX_RLMT, SK_RLMT_RX_PROTOCOL */ SK_RLMT_LOOKAHEAD() expects *pNumBytes from packet offset *pOffset (s.a.) at *pLaPacket. @@ -298,29 +321,28 @@ BC, MC, or UC, you should use constants for IsBc and IsMc, so that your compiler can trash unneeded parts of the if construction. #endif /* 0 */ -#define SK_RLMT_LOOKAHEAD(pAC,PortIdx,pLaPacket,IsBc,IsMc,pForRlmt) { \ + +#define SK_RLMT_LOOKAHEAD(pAC,PortNum,pLaPacket,IsBc,IsMc,pForRlmt) { \ SK_AC *_pAC; \ - SK_U32 _PortIdx; \ + SK_U32 _PortNum; \ SK_U8 *_pLaPacket; \ _pAC = (pAC); \ - _PortIdx = (SK_U32)(PortIdx); \ + _PortNum = (SK_U32)(PortNum); \ _pLaPacket = (SK_U8 *)(pLaPacket); \ if (IsBc) {\ - if (!SK_ADDR_EQUAL( \ - _pLaPacket, \ - _pAC->Addr.CurrentMacAddress.a)) { \ - _pAC->Rlmt.Port[_PortIdx].BcTimeStamp = \ - SkOsGetTime(_pAC); \ + if (!SK_ADDR_EQUAL(_pLaPacket, _pAC->Addr.Net[_pAC->Rlmt.Port[ \ + _PortNum].Net->NetNumber].CurrentMacAddress.a)) { \ + _pAC->Rlmt.Port[_PortNum].BcTimeStamp = SkOsGetTime(_pAC); \ + _pAC->Rlmt.CheckSwitch = SK_TRUE; \ } \ - _pAC->Rlmt.Port[_PortIdx].DataPacketsPerTimeSlot++; \ + /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \ *(pForRlmt) = SK_RLMT_RX_PROTOCOL; \ } \ else if (IsMc) { \ if (SK_ADDR_EQUAL(_pLaPacket, BridgeMcAddr.a)) { \ - _pAC->Rlmt.Port[_PortIdx].BpduPacketsPerTimeSlot++; \ - if (_pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) { \ - *(pForRlmt) = SK_RLMT_RX_RLMT | \ - SK_RLMT_RX_PROTOCOL; \ + _pAC->Rlmt.Port[_PortNum].BpduPacketsPerTimeSlot++; \ + if (_pAC->Rlmt.Port[_PortNum].Net->RlmtMode & SK_RLMT_CHECK_SEG) { \ + *(pForRlmt) = SK_RLMT_RX_RLMT | SK_RLMT_RX_PROTOCOL; \ } \ else { \ *(pForRlmt) = SK_RLMT_RX_PROTOCOL; \ @@ -330,18 +352,18 @@ *(pForRlmt) = SK_RLMT_RX_RLMT; \ } \ else { \ - _pAC->Rlmt.Port[_PortIdx].DataPacketsPerTimeSlot++; \ + /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \ *(pForRlmt) = SK_RLMT_RX_PROTOCOL; \ } \ } \ else { \ if (SK_ADDR_EQUAL( \ _pLaPacket, \ - _pAC->Addr.Port[_PortIdx].CurrentMacAddress.a)) { \ + _pAC->Addr.Port[_PortNum].CurrentMacAddress.a)) { \ *(pForRlmt) = SK_RLMT_RX_RLMT; \ } \ else { \ - _pAC->Rlmt.Port[_PortIdx].DataPacketsPerTimeSlot++; \ + /* _pAC->Rlmt.Port[_PortNum].DataPacketsPerTimeSlot++; */ \ *(pForRlmt) = SK_RLMT_RX_PROTOCOL; \ } \ } \ @@ -350,107 +372,143 @@ #ifdef SK_RLMT_FAST_LOOKAHEAD Error: SK_RLMT_FAST_LOOKAHEAD no longer used. Use new macros for lookahead. #endif /* SK_RLMT_FAST_LOOKAHEAD */ +#ifdef SK_RLMT_SLOW_LOOKAHEAD +Error: SK_RLMT_SLOW_LOOKAHEAD no longer used. Use new macros for lookahead. +#endif /* SK_RLMT_SLOW_LOOKAHEAD */ /* typedefs *******************************************************************/ +#ifdef SK_RLMT_MBUF_PRIVATE +typedef struct s_RlmtMbuf { + some content +} SK_RLMT_MBUF; +#endif /* SK_RLMT_MBUF_PRIVATE */ + + +#ifdef SK_LA_INFO +typedef struct s_Rlmt_PacketInfo { + unsigned PacketLength; /* Length of packet. */ + unsigned PacketType; /* Directed/Multicast/Broadcast. */ +} SK_RLMT_PINFO; +#endif /* SK_LA_INFO */ + + typedef struct s_RootId { - SK_U8 Id[8]; /* Root Bridge Id. */ + SK_U8 Id[8]; /* Root Bridge Id. */ } SK_RLMT_ROOT_ID; + typedef struct s_port { SK_MAC_ADDR CheckAddr; SK_BOOL SuspectTx; } SK_PORT_CHECK; + +typedef struct s_RlmtNet SK_RLMT_NET; + + typedef struct s_RlmtPort { /* ----- Public part (read-only) ----- */ - SK_U8 PortState; /* Current state of this port. */ + SK_U8 PortState; /* Current state of this port. */ /* For PNMI */ - - SK_BOOL LinkDown; - SK_BOOL PortDown; - - SK_U64 TxHelloCts; - SK_U64 RxHelloCts; - SK_U64 TxSpHelloReqCts; - SK_U64 RxSpHelloCts; + SK_BOOL LinkDown; + SK_BOOL PortDown; + SK_U8 Align01; + + SK_U32 PortNumber; /* Number of port on adapter. */ + SK_RLMT_NET * Net; /* Net port belongs to. */ + + SK_U64 TxHelloCts; + SK_U64 RxHelloCts; + SK_U64 TxSpHelloReqCts; + SK_U64 RxSpHelloCts; /* ----- Private part ----- */ - SK_BOOL PortStarted; /* Port is started. */ - SK_BOOL PortNoRx; /* NoRx for >= 1 time slot. */ - SK_U32 CheckingState; /* Checking State. */ - - SK_U64 PacketsRx; /* Total packets received. */ - SK_U32 PacketsPerTimeSlot; /* Packets rxed between TOs. */ - SK_U32 DataPacketsPerTimeSlot; /* Data packets ... */ -#if 0 - SK_U32 RlmtAcksPerTimeSlot; /* RLMT Acks rxed in TS. */ - SK_U32 RlmtChksPerTimeSlot; /* RLMT Chks rxed in TS. */ -#endif /* 0 */ - SK_U32 BpduPacketsPerTimeSlot; /* BPDU packets rxed in TS. */ - SK_U64 BcTimeStamp; /* Time of last BC receive. */ - SK_U64 GuTimeStamp; /* Time of entering GOING_UP. */ - - SK_TIMER UpTimer; /* Timer struct Link/Port up. */ - SK_TIMER DownRxTimer; /* Timer struct down rx. */ - SK_TIMER DownTxTimer; /* Timer struct down tx. */ - - SK_U8 Random[4]; /* Random value. */ - unsigned PortsChecked; /* #ports checked. */ - unsigned PortsSuspect; /* #ports checked that are s. */ +/* SK_U64 PacketsRx; */ /* Total packets received. */ + SK_U32 PacketsPerTimeSlot; /* Packets rxed between TOs. */ +/* SK_U32 DataPacketsPerTimeSlot; */ /* Data packets ... */ + SK_U32 BpduPacketsPerTimeSlot; /* BPDU packets rxed in TS. */ + SK_U64 BcTimeStamp; /* Time of last BC receive. */ + SK_U64 GuTimeStamp; /* Time of entering GOING_UP. */ + + SK_TIMER UpTimer; /* Timer struct Link/Port up. */ + SK_TIMER DownRxTimer; /* Timer struct down rx. */ + SK_TIMER DownTxTimer; /* Timer struct down tx. */ + + SK_U32 CheckingState; /* Checking State. */ + + SK_ADDR_PORT * AddrPort; + + SK_U8 Random[4]; /* Random value. */ + unsigned PortsChecked; /* #ports checked. */ + unsigned PortsSuspect; /* #ports checked that are s. */ SK_PORT_CHECK PortCheck[1]; /* SK_PORT_CHECK PortCheck[SK_MAX_MACS - 1]; */ - SK_BOOL RootIdSet; - SK_RLMT_ROOT_ID Root; /* Root Bridge Id. */ + SK_BOOL PortStarted; /* Port is started. */ + SK_BOOL PortNoRx; /* NoRx for >= 1 time slot. */ + SK_BOOL RootIdSet; + SK_RLMT_ROOT_ID Root; /* Root Bridge Id. */ } SK_RLMT_PORT; -#ifdef SK_RLMT_MBUF_PRIVATE -typedef struct s_RlmtMbuf { - some content -} SK_RLMT_MBUF; -#endif /* SK_RLMT_MBUF_PRIVATE */ -#ifdef SK_LA_INFO -typedef struct s_Rlmt_PacketInfo { - unsigned PacketLength; /* Length of packet. */ - unsigned PacketType; /* Directed/Multicast/Broadcast. */ -} SK_RLMT_PINFO; -#endif /* SK_LA_INFO */ - -typedef struct s_Rlmt { +struct s_RlmtNet { /* ----- Public part (read-only) ----- */ - SK_U8 RlmtState; /* Current RLMT state. */ - SK_RLMT_PORT Port[SK_MAX_MACS]; /* Array of available ports. */ - SK_U32 PrefPort; /* Preferred port. */ + SK_U32 NetNumber; /* Number of net. */ + + SK_RLMT_PORT * Port[SK_MAX_MACS]; /* Ports that belong to this net. */ + SK_U32 NumPorts; /* Number of ports. */ + SK_U32 PrefPort; /* Preferred port. */ /* For PNMI */ - SK_U32 RlmtMode; /* Check ... */ - SK_U32 MacActive; /* Active port. */ - SK_U32 MacPreferred; /* 0xFFFFFFFF: Automatic. */ + SK_U32 RlmtMode; /* Check ... */ + SK_U32 ActivePort; /* Active port. */ + SK_U32 Preference; /* 0xFFFFFFFF: Automatic. */ + + SK_U8 RlmtState; /* Current RLMT state. */ + +/* ----- Private part ----- */ + SK_BOOL RootIdSet; + SK_U16 Align01; + + int LinksUp; /* #Links up. */ + int PortsUp; /* #Ports up. */ + SK_U32 TimeoutValue; /* RLMT timeout value. */ + + SK_U32 CheckingState; /* Checking State. */ + SK_RLMT_ROOT_ID Root; /* Root Bridge Id. */ + + SK_TIMER LocTimer; /* Timer struct. */ + SK_TIMER SegTimer; /* Timer struct. */ +}; + + +typedef struct s_Rlmt { + +/* ----- Public part (read-only) ----- */ + + SK_U32 NumNets; /* Number of nets. */ + SK_U32 NetsStarted; /* Number of nets started. */ + SK_RLMT_NET Net[SK_MAX_NETS]; /* Array of available nets. */ + SK_RLMT_PORT Port[SK_MAX_MACS]; /* Array of available ports. */ /* ----- Private part ----- */ + SK_BOOL CheckSwitch; + SK_U8 Align01; + SK_U16 Align02; - int LinksUp; /* #Links up. */ - int PortsUp; /* #Ports up. */ - SK_U32 TimeoutValue; /* RLMT timeout value. */ - SK_TIMER LocTimer; /* Timer struct. */ - - SK_U32 CheckingState; /* Checking State. */ - SK_BOOL RootIdSet; - SK_RLMT_ROOT_ID Root; /* Root Bridge Id. */ - SK_TIMER SegTimer; /* Timer struct. */ } SK_RLMT; + extern SK_MAC_ADDR BridgeMcAddr; -extern SK_MAC_ADDR SkRlmtMcAddr; +extern SK_MAC_ADDR SkRlmtMcAddr; /* function prototypes ********************************************************/ @@ -464,16 +522,7 @@ extern void SkRlmtInit( SK_AC *pAC, SK_IOC IoC, - int Level); - -#ifdef SK_RLMT_SLOW_LOOKAHEAD -extern SK_BOOL SkRlmtLookaheadPacket( - SK_AC *pAC, - SK_U32 PortIdx, - SK_U8 *pLaPacket, - unsigned PacketLength, - unsigned LaLength); -#endif /* SK_RLMT_SLOW_LOOKAHEAD */ + int Level); extern int SkRlmtEvent( SK_AC *pAC, @@ -481,11 +530,11 @@ SK_U32 Event, SK_EVPARA Para); -#else /* defined(SK_KR_PROTO)) */ +#else /* defined(SK_KR_PROTO) */ /* Non-ANSI/C++ compliant function prototypes */ -xxxx /* not supported yet - force error */ +#error KR-style function prototypes are not yet provided. #endif /* defined(SK_KR_PROTO)) */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/h/skversion.h linux.20p6/drivers/net/sk98lin/h/skversion.h --- linux.vanilla/drivers/net/sk98lin/h/skversion.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/net/sk98lin/h/skversion.h Tue Jun 19 09:46:04 2001 @@ -0,0 +1,46 @@ +/****************************************************************************** + * + * Name: version.h + * Project: GEnesis, PCI Gigabit Ethernet Adapter + * Version: $Revision: 1.1 $ + * Date: $Date: 2001/03/06 09:25:00 $ + * Purpose: SK specific Error log support + * + ******************************************************************************/ + +/****************************************************************************** + * + * (C)Copyright 1998,1999 SysKonnect, + * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * The information in this file is provided "AS IS" without warranty. + * + ******************************************************************************/ + +/****************************************************************************** + * + * History: + * $Log: skversion.h,v $ + * Revision 1.1 2001/03/06 09:25:00 mlindner + * first version + * + * + * + ******************************************************************************/ + + +static const char SysKonnectFileId[] = "@(#)" __FILE__ " (C) SysKonnect GmbH."; +static const char SysKonnectBuildNumber[] = + "@(#)SK-BUILD: 4.07 PL: 01"; + +#define BOOT_STRING "sk98lin: Network Device Driver v4.07\n" \ + "Copyright (C) 2000-2001 SysKonnect GmbH." + +#define VER_STRING "4.07" + + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/h/xmac_ii.h linux.20p6/drivers/net/sk98lin/h/xmac_ii.h --- linux.vanilla/drivers/net/sk98lin/h/xmac_ii.h Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/h/xmac_ii.h Tue Jun 19 09:59:54 2001 @@ -2,16 +2,15 @@ * * Name: xmac_ii.h * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.26 $ - * Date: $Date: 1999/11/22 14:03:00 $ + * Version: $Revision: 1.28 $ + * Date: $Date: 2000/11/09 12:32:49 $ * Purpose: Defines and Macros for XaQti's Gigabit Ethernet Controller * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2000 SysKonnect GmbH. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +26,12 @@ * History: * * $Log: xmac_ii.h,v $ + * Revision 1.28 2000/11/09 12:32:49 rassmann + * Renamed variables. + * + * Revision 1.27 2000/05/17 11:00:46 malthoff + * Add bit for enable/disable power management in BCOM chip. + * * Revision 1.26 1999/11/22 14:03:00 cgoos * Changed license header to GPL. * @@ -142,40 +147,40 @@ * Note: NA reg = Network Address e.g DA, SA etc. * */ -#define XM_MMU_CMD 0x0000 /* 16 bit r/w MMU Command Register */ +#define XM_MMU_CMD 0x0000 /* 16 bit r/w MMU Command Register */ /* 0x0004: reserved */ -#define XM_POFF 0x0008 /* 32 bit r/w Packet Offset Register */ -#define XM_BURST 0x000c /* 32 bit r/w Burst Register for half duplex*/ +#define XM_POFF 0x0008 /* 32 bit r/w Packet Offset Register */ +#define XM_BURST 0x000c /* 32 bit r/w Burst Register for half duplex*/ #define XM_1L_VLAN_TAG 0x0010 /* 16 bit r/w One Level VLAN Tag ID */ #define XM_2L_VLAN_TAG 0x0014 /* 16 bit r/w Two Level VLAN Tag ID */ /* 0x0018 - 0x001e: reserved */ -#define XM_TX_CMD 0x0020 /* 16 bit r/w Transmit Command Register */ +#define XM_TX_CMD 0x0020 /* 16 bit r/w Transmit Command Register */ #define XM_TX_RT_LIM 0x0024 /* 16 bit r/w Transmit Retry Limit Register */ -#define XM_TX_STIME 0x0028 /* 16 bit r/w Transmit Slottime Register */ -#define XM_TX_IPG 0x002c /* 16 bit r/w Transmit Inter Packet Gap */ -#define XM_RX_CMD 0x0030 /* 16 bit r/w Receive Command Register */ -#define XM_PHY_ADDR 0x0034 /* 16 bit r/w PHY Address Register */ -#define XM_PHY_DATA 0x0038 /* 16 bit r/w PHY Data Register */ +#define XM_TX_STIME 0x0028 /* 16 bit r/w Transmit Slottime Register */ +#define XM_TX_IPG 0x002c /* 16 bit r/w Transmit Inter Packet Gap */ +#define XM_RX_CMD 0x0030 /* 16 bit r/w Receive Command Register */ +#define XM_PHY_ADDR 0x0034 /* 16 bit r/w PHY Address Register */ +#define XM_PHY_DATA 0x0038 /* 16 bit r/w PHY Data Register */ /* 0x003c: reserved */ -#define XM_GP_PORT 0x0040 /* 32 bit r/w General Purpose Port Register */ -#define XM_IMSK 0x0044 /* 16 bit r/w Interrupt Mask Register */ -#define XM_ISRC 0x0048 /* 16 bit ro Interrupt Status Register */ -#define XM_HW_CFG 0x004c /* 16 bit r/w Hardware Config Register */ +#define XM_GP_PORT 0x0040 /* 32 bit r/w General Purpose Port Register */ +#define XM_IMSK 0x0044 /* 16 bit r/w Interrupt Mask Register */ +#define XM_ISRC 0x0048 /* 16 bit ro Interrupt Status Register */ +#define XM_HW_CFG 0x004c /* 16 bit r/w Hardware Config Register */ /* 0x0050 - 0x005e: reserved */ -#define XM_TX_LO_WM 0x0060 /* 16 bit r/w Tx FIFO Low Water Mark */ -#define XM_TX_HI_WM 0x0062 /* 16 bit r/w Tx FIFO High Water Mark */ -#define XM_TX_THR 0x0064 /* 16 bit r/w Tx Request Threshold */ -#define XM_HT_THR 0x0066 /* 16 bit r/w Host Request Threshold */ -#define XM_PAUSE_DA 0x0068 /* NA reg r/w Pause Destination Address */ +#define XM_TX_LO_WM 0x0060 /* 16 bit r/w Tx FIFO Low Water Mark */ +#define XM_TX_HI_WM 0x0062 /* 16 bit r/w Tx FIFO High Water Mark */ +#define XM_TX_THR 0x0064 /* 16 bit r/w Tx Request Threshold */ +#define XM_HT_THR 0x0066 /* 16 bit r/w Host Request Threshold */ +#define XM_PAUSE_DA 0x0068 /* NA reg r/w Pause Destination Address */ /* 0x006e: reserved */ -#define XM_CTL_PARA 0x0070 /* 32 bit r/w Control Parameter Register */ +#define XM_CTL_PARA 0x0070 /* 32 bit r/w Control Parameter Register */ #define XM_MAC_OPCODE 0x0074 /* 16 bit r/w Opcode for MAC control frames */ #define XM_MAC_PTIME 0x0076 /* 16 bit r/w Pause time for MAC ctrl frames*/ -#define XM_TX_STAT 0x0078 /* 32 bit ro Tx Status LIFO Register */ +#define XM_TX_STAT 0x0078 /* 32 bit ro Tx Status LIFO Register */ /* 0x0080 - 0x00fc: 16 NA reg r/w Exakt Match Address Registers */ /* use the XM_EMX() macro to address */ -#define XM_EXM_START 0x0080 /* r/w Start Address of the EXM Regs */ +#define XM_EXM_START 0x0080 /* r/w Start Address of the EXM Regs */ /* * XM_EXM(Reg) @@ -188,18 +193,18 @@ */ #define XM_EXM(Reg) (XM_EXM_START + ((Reg) << 3)) -#define XM_SRC_CHK 0x0100 /* NA reg r/w Source Check Address Register */ -#define XM_SA 0x0108 /* NA reg r/w Station Address Register */ -#define XM_HSM 0x0110 /* 64 bit r/w Hash Match Address Registers */ -#define XM_RX_LO_WM 0x0118 /* 16 bit r/w Receive Low Water Mark */ -#define XM_RX_HI_WM 0x011a /* 16 bit r/w Receive High Water Mark */ -#define XM_RX_THR 0x011c /* 32 bit r/w Receive Request Threshold */ -#define XM_DEV_ID 0x0120 /* 32 bit ro Device ID Register */ -#define XM_MODE 0x0124 /* 32 bit r/w Mode Register */ -#define XM_LSA 0x0128 /* NA reg ro Last Source Register */ +#define XM_SRC_CHK 0x0100 /* NA reg r/w Source Check Address Register */ +#define XM_SA 0x0108 /* NA reg r/w Station Address Register */ +#define XM_HSM 0x0110 /* 64 bit r/w Hash Match Address Registers */ +#define XM_RX_LO_WM 0x0118 /* 16 bit r/w Receive Low Water Mark */ +#define XM_RX_HI_WM 0x011a /* 16 bit r/w Receive High Water Mark */ +#define XM_RX_THR 0x011c /* 32 bit r/w Receive Request Threshold */ +#define XM_DEV_ID 0x0120 /* 32 bit ro Device ID Register */ +#define XM_MODE 0x0124 /* 32 bit r/w Mode Register */ +#define XM_LSA 0x0128 /* NA reg ro Last Source Register */ /* 0x012e: reserved */ -#define XM_TS_READ 0x0130 /* 32 bit ro TimeStamp Read Regeister */ -#define XM_TS_LOAD 0x0134 /* 32 bit ro TimeStamp Load Value */ +#define XM_TS_READ 0x0130 /* 32 bit ro TimeStamp Read Regeister */ +#define XM_TS_LOAD 0x0134 /* 32 bit ro TimeStamp Load Value */ /* 0x0138 - 0x01fe: reserved */ #define XM_STAT_CMD 0x0200 /* 16 bit r/w Statistics Command Register */ #define XM_RX_CNT_EV 0x0204 /* 32 bit ro Rx Counter Event Register */ @@ -207,13 +212,13 @@ #define XM_RX_EV_MSK 0x020c /* 32 bit r/w Rx Counter Event Mask */ #define XM_TX_EV_MSK 0x0210 /* 32 bit r/w Tx Counter Event Mask */ /* 0x0204 - 0x027e: reserved */ -#define XM_TXF_OK 0x0280 /* 32 bit ro Frames Transmitted OK Conuter */ +#define XM_TXF_OK 0x0280 /* 32 bit ro Frames Transmitted OK Conuter */ #define XM_TXO_OK_HI 0x0284 /* 32 bit ro Octets Transmitted OK High Cnt*/ #define XM_TXO_OK_LO 0x0288 /* 32 bit ro Octets Transmitted OK Low Cnt */ #define XM_TXF_BC_OK 0x028c /* 32 bit ro Broadcast Frames Xmitted OK */ #define XM_TXF_MC_OK 0x0290 /* 32 bit ro Multicast Frames Xmitted OK */ #define XM_TXF_UC_OK 0x0294 /* 32 bit ro Unicast Frames Xmitted OK */ -#define XM_TXF_LONG 0x0298 /* 32 bit ro Tx Long Frame Counter */ +#define XM_TXF_LONG 0x0298 /* 32 bit ro Tx Long Frame Counter */ #define XM_TXE_BURST 0x029c /* 32 bit ro Tx Burst Event Counter */ #define XM_TXF_MPAUSE 0x02a0 /* 32 bit ro Tx Pause MAC Ctrl Frame Cnt */ #define XM_TXF_MCTRL 0x02a4 /* 32 bit ro Tx MAC Ctrl Frame Counter */ @@ -221,20 +226,20 @@ #define XM_TXF_MUL_COL 0x02ac /* 32 bit ro Tx Multiple Collision Counter */ #define XM_TXF_ABO_COL 0x02b0 /* 32 bit ro Tx aborted due to Exessive Col*/ #define XM_TXF_LAT_COL 0x02b4 /* 32 bit ro Tx Late Collision Counter */ -#define XM_TXF_DEF 0x02b8 /* 32 bit ro Tx Deferred Frame Counter */ +#define XM_TXF_DEF 0x02b8 /* 32 bit ro Tx Deferred Frame Counter */ #define XM_TXF_EX_DEF 0x02bc /* 32 bit ro Tx Excessive Deferall Counter */ #define XM_TXE_FIFO_UR 0x02c0 /* 32 bit ro Tx FIFO Underrun Event Cnt */ #define XM_TXE_CS_ERR 0x02c4 /* 32 bit ro Tx Carrier Sence Error Cnt */ -#define XM_TXP_UTIL 0x02c8 /* 32 bit ro Tx Utilization in % */ +#define XM_TXP_UTIL 0x02c8 /* 32 bit ro Tx Utilization in % */ /* 0x02cc - 0x02ce: reserved */ -#define XM_TXF_64B 0x02d0 /* 32 bit ro 64 Byte Tx Frame Counter */ -#define XM_TXF_127B 0x02d4 /* 32 bit ro 65-127 Byte Tx Frame Counter */ -#define XM_TXF_255B 0x02d8 /* 32 bit ro 128-255 Byte Tx Frame Counter */ -#define XM_TXF_511B 0x02dc /* 32 bit ro 256-511 Byte Tx Frame Counter */ +#define XM_TXF_64B 0x02d0 /* 32 bit ro 64 Byte Tx Frame Counter */ +#define XM_TXF_127B 0x02d4 /* 32 bit ro 65-127 Byte Tx Frame Counter */ +#define XM_TXF_255B 0x02d8 /* 32 bit ro 128-255 Byte Tx Frame Counter */ +#define XM_TXF_511B 0x02dc /* 32 bit ro 256-511 Byte Tx Frame Counter */ #define XM_TXF_1023B 0x02e0 /* 32 bit ro 512-1023 Byte Tx Frame Counter*/ #define XM_TXF_MAX_SZ 0x02e4 /* 32 bit ro 1024-MaxSize Byte Tx Frame Cnt*/ /* 0x02e8 - 0x02fe: reserved */ -#define XM_RXF_OK 0x0300 /* 32 bit ro Frames Received OK */ +#define XM_RXF_OK 0x0300 /* 32 bit ro Frames Received OK */ #define XM_RXO_OK_HI 0x0304 /* 32 bit ro Octets Received OK High Cnt */ #define XM_RXO_OK_LO 0x0308 /* 32 bit ro Octets Received OK Low Counter*/ #define XM_RXF_BC_OK 0x030c /* 32 bit ro Broadcast Frames Received OK */ @@ -253,17 +258,17 @@ #define XM_RXF_LEN_ERR 0x0340 /* 32 bit ro Rx in Range Length Error */ #define XM_RXE_SYM_ERR 0x0344 /* 32 bit ro Rx Symbol Error Counter */ #define XM_RXE_SHT_ERR 0x0348 /* 32 bit ro Rx Short Event Error Cnt */ -#define XM_RXE_RUNT 0x034c /* 32 bit ro Rx Runt Event Counter */ +#define XM_RXE_RUNT 0x034c /* 32 bit ro Rx Runt Event Counter */ #define XM_RXF_LNG_ERR 0x0350 /* 32 bit ro Rx Frame too Long Error Cnt */ #define XM_RXF_FCS_ERR 0x0354 /* 32 bit ro Rx Frame Check Seq. Error Cnt */ /* 0x0358 - 0x035a: reserved */ #define XM_RXF_CEX_ERR 0x035c /* 32 bit ro Rx Carrier Ext Error Frame Cnt*/ -#define XM_RXP_UTIL 0x0360 /* 32 bit ro Rx Utilization in % */ +#define XM_RXP_UTIL 0x0360 /* 32 bit ro Rx Utilization in % */ /* 0x0364 - 0x0366: reserved */ -#define XM_RXF_64B 0x0368 /* 32 bit ro 64 Byte Rx Frame Counter */ -#define XM_RXF_127B 0x036c /* 32 bit ro 65-127 Byte Rx Frame Counter */ -#define XM_RXF_255B 0x0370 /* 32 bit ro 128-255 Byte Rx Frame Counter */ -#define XM_RXF_511B 0x0374 /* 32 bit ro 256-511 Byte Rx Frame Counter */ +#define XM_RXF_64B 0x0368 /* 32 bit ro 64 Byte Rx Frame Counter */ +#define XM_RXF_127B 0x036c /* 32 bit ro 65-127 Byte Rx Frame Counter */ +#define XM_RXF_255B 0x0370 /* 32 bit ro 128-255 Byte Rx Frame Counter */ +#define XM_RXF_511B 0x0374 /* 32 bit ro 256-511 Byte Rx Frame Counter */ #define XM_RXF_1023B 0x0378 /* 32 bit ro 512-1023 Byte Rx Frame Counter*/ #define XM_RXF_MAX_SZ 0x037c /* 32 bit ro 1024-MaxSize Byte Rx Frame Cnt*/ /* 0x02e8 - 0x02fe: reserved */ @@ -281,12 +286,12 @@ */ /* XM_MMU_CMD 16 bit r/w MMU Comamnd Register */ - /* Bit 15..13: reserved */ + /* Bit 15..13: reserved */ #define XM_MMU_PHY_RDY (1<<12) /* Bit 12: PHY Read Ready */ #define XM_MMU_PHY_BUSY (1<<11) /* Bit 11: PHY Busy */ #define XM_MMU_IGN_PF (1<<10) /* Bit 10: Ignore Pause Frame */ #define XM_MMU_MAC_LB (1<<9) /* Bit 9: Enable MAC Loopback */ - /* Bit 8: reserved */ + /* Bit 8: reserved */ #define XM_MMU_FRC_COL (1<<7) /* Bit 7: Force Collision */ #define XM_MMU_SIM_COL (1<<6) /* Bit 6: Simulate Collision */ #define XM_MMU_NO_PRE (1<<5) /* Bit 5: No MDIO Preamble */ @@ -298,8 +303,8 @@ /* XM_TX_CMD 16 bit r/w Transmit Command Register */ - /* Bit 15..7: reserved */ -#define XM_TX_BK2BK (1<<6) /* Bit 6: Ignor Carrier Sense (tx Bk2Bk)*/ + /* Bit 15..7: reserved */ +#define XM_TX_BK2BK (1<<6) /* Bit 6: Ignor Carrier Sense (tx Bk2Bk)*/ #define XM_TX_ENC_BYP (1<<5) /* Bit 5: Set Encoder in Bypass Mode */ #define XM_TX_SAM_LINE (1<<4) /* Bit 4: (sc) Start utilization calculation */ #define XM_TX_NO_GIG_MD (1<<3) /* Bit 3: Disable Carrier Extension */ @@ -309,28 +314,28 @@ /* XM_TX_RT_LIM 16 bit r/w Transmit Retry Limit Register */ - /* Bit 15..5: reserved */ + /* Bit 15..5: reserved */ #define XM_RT_LIM_MSK 0x1f /* Bit 4..0: Tx Retry Limit */ /* XM_TX_STIME 16 bit r/w Transmit Slottime Register */ - /* Bit 15..7: reserved */ + /* Bit 15..7: reserved */ #define XM_STIME_MSK 0x7f /* Bit 6..0: Tx Slottime bits */ /* XM_TX_IPG 16 bit r/w Transmit Inter Packet Gap */ - /* Bit 15..8: reserved */ -#define XM_IPG_MSK 0xff /* Bit 7..0: IPG value bits */ + /* Bit 15..8: reserved */ +#define XM_IPG_MSK 0xff /* Bit 7..0: IPG value bits */ /* XM_RX_CMD 16 bit r/w Receive Command Register */ - /* Bit 15..9: reserved */ + /* Bit 15..9: reserved */ #define XM_RX_LENERR_OK (1<<8) /* Bit 8 don't set Rx Err bit for */ - /* inrange error packets */ + /* inrange error packets */ #define XM_RX_BIG_PK_OK (1<<7) /* Bit 7 don't set Rx Err bit for */ - /* jumbo packets */ + /* jumbo packets */ #define XM_RX_IPG_CAP (1<<6) /* Bit 6 repl. type field with IPG */ -#define XM_RX_TP_MD (1<<5) /* Bit 5: Enable transparent Mode */ +#define XM_RX_TP_MD (1<<5) /* Bit 5: Enable transparent Mode */ #define XM_RX_STRIP_FCS (1<<4) /* Bit 4: Enable FCS Stripping */ #define XM_RX_SELF_RX (1<<3) /* Bit 3: Enable Rx of own packets */ #define XM_RX_SAM_LINE (1<<2) /* Bit 2: (sc) Start utilization calculation */ @@ -339,24 +344,24 @@ /* XM_PHY_ADDR 16 bit r/w PHY Address Register */ - /* Bit 15..5: reserved */ + /* Bit 15..5: reserved */ #define XM_PHY_ADDR_SZ 0x1f /* Bit 4..0: PHY Address bits */ /* XM_GP_PORT 32 bit r/w General Purpose Port Register */ - /* Bit 31..7: reserved */ -#define XM_GP_ANIP (1L<<6) /* Bit 6: (ro) Auto Negotiation in Progress */ + /* Bit 31..7: reserved */ +#define XM_GP_ANIP (1L<<6) /* Bit 6: (ro) Auto Negotiation in Progress */ #define XM_GP_FRC_INT (1L<<5) /* Bit 5: (sc) Force Interrupt */ - /* Bit 4: reserved */ + /* Bit 4: reserved */ #define XM_GP_RES_MAC (1L<<3) /* Bit 3: (sc) Reset MAC and FIFOs */ #define XM_GP_RES_STAT (1L<<2) /* Bit 2: (sc) Reset the statistics module */ - /* Bit 1: reserved */ + /* Bit 1: reserved */ #define XM_GP_INP_ASS (1L<<0) /* Bit 0: (ro) GP Input Pin asserted */ /* XM_IMSK 16 bit r/w Interrupt Mask Register */ /* XM_ISRC 16 bit ro Interrupt Status Register */ - /* Bit 15: reserved */ + /* Bit 15: reserved */ #define XM_IS_LNK_AE (1<<14) /* Bit 14: Link Asynchronous Event */ #define XM_IS_TX_ABORT (1<<13) /* Bit 13: Transmit Abort, late Col. etc */ #define XM_IS_FRC_INT (1<<12) /* Bit 12: Force INT bit set in GP */ @@ -364,7 +369,7 @@ #define XM_IS_LIPA_RC (1<<10) /* Bit 10: Link Partner requests config */ #define XM_IS_RX_PAGE (1<<9) /* Bit 9: Page Received */ #define XM_IS_TX_PAGE (1<<8) /* Bit 8: Next Page Loaded for Transmit */ -#define XM_IS_AND (1<<7) /* Bit 7: Auto Negotiation Done */ +#define XM_IS_AND (1<<7) /* Bit 7: Auto Negotiation Done */ #define XM_IS_TSC_OV (1<<6) /* Bit 6: Time Stamp Counter Overflow */ #define XM_IS_RXC_OV (1<<5) /* Bit 5: Rx Counter Event Overflow */ #define XM_IS_TXC_OV (1<<4) /* Bit 4: Tx Counter Event Overflow */ @@ -374,42 +379,41 @@ #define XM_IS_RX_COMP (1<<0) /* Bit 0: Frame Rx Complete */ #define XM_DEF_MSK (~(XM_IS_INP_ASS | XM_IS_LIPA_RC | XM_IS_RX_PAGE |\ - XM_IS_AND | XM_IS_RXC_OV | XM_IS_TXC_OV |\ - XM_IS_TXF_UR)) + XM_IS_AND | XM_IS_RXC_OV | XM_IS_TXC_OV | XM_IS_TXF_UR)) /* XM_HW_CFG 16 bit r/w Hardware Config Register */ - /* Bit 15.. 4: reserved */ + /* Bit 15.. 4: reserved */ #define XM_HW_GEN_EOP (1<<3) /* Bit 3: generate End of Packet pulse */ #define XM_HW_COM4SIG (1<<2) /* Bit 2: use Comma Detect for Sig. Det.*/ - /* Bit 1: reserved */ + /* Bit 1: reserved */ #define XM_HW_GMII_MD (1<<0) /* Bit 0: GMII Interface selected */ /* XM_TX_LO_WM 16 bit r/w Tx FIFO Low Water Mark */ /* XM_TX_HI_WM 16 bit r/w Tx FIFO High Water Mark */ - /* Bit 15..10 reserved */ + /* Bit 15..10 reserved */ #define XM_TX_WM_MSK 0x01ff /* Bit 9.. 0 Tx FIFO Watermark bits */ /* XM_TX_THR 16 bit r/w Tx Request Threshold */ /* XM_HT_THR 16 bit r/w Host Request Threshold */ /* XM_RX_THR 16 bit r/w Receive Request Threshold */ - /* Bit 15..11 reserved */ -#define XM_THR_MSK 0x03ff /* Bit 10.. 0 Tx FIFO Watermark bits */ + /* Bit 15..11 reserved */ +#define XM_THR_MSK 0x03ff /* Bit 10.. 0 Tx FIFO Watermark bits */ /* XM_TX_STAT 32 bit ro Tx Status LIFO Register */ -#define XM_ST_VALID (1UL<<31) /* Bit 31: Status Valid */ +#define XM_ST_VALID (1UL<<31) /* Bit 31: Status Valid */ #define XM_ST_BYTE_CNT (0x3fffL<<17) /* Bit 30..17: Tx frame Length */ #define XM_ST_RETRY_CNT (0x1fL<<12) /* Bit 16..12: Retry Count */ #define XM_ST_EX_COL (1L<<11) /* Bit 11: Excessive Collisions */ #define XM_ST_EX_DEF (1L<<10) /* Bit 10: Excessive Deferral */ -#define XM_ST_BURST (1L<<9) /* Bit 9: p. xmitted in burst md*/ -#define XM_ST_DEFER (1L<<8) /* Bit 8: packet was defered */ -#define XM_ST_BC (1L<<7) /* Bit 7: Broadcast packet */ -#define XM_ST_MC (1L<<6) /* Bit 6: Multicast packet */ -#define XM_ST_UC (1L<<5) /* Bit 5: Unicast packet */ -#define XM_ST_TX_UR (1L<<4) /* Bit 4: FIFO Underrun occured */ +#define XM_ST_BURST (1L<<9) /* Bit 9: p. xmitted in burst md*/ +#define XM_ST_DEFER (1L<<8) /* Bit 8: packet was defered */ +#define XM_ST_BC (1L<<7) /* Bit 7: Broadcast packet */ +#define XM_ST_MC (1L<<6) /* Bit 6: Multicast packet */ +#define XM_ST_UC (1L<<5) /* Bit 5: Unicast packet */ +#define XM_ST_TX_UR (1L<<4) /* Bit 4: FIFO Underrun occurred */ #define XM_ST_CS_ERR (1L<<3) /* Bit 3: Carrier Sense Error */ #define XM_ST_LAT_COL (1L<<2) /* Bit 2: Late Collision Error */ #define XM_ST_MUL_COL (1L<<1) /* Bit 1: Multiple Collisions */ @@ -417,8 +421,8 @@ /* XM_RX_LO_WM 16 bit r/w Receive Low Water Mark */ /* XM_RX_HI_WM 16 bit r/w Receive High Water Mark */ - /* Bit 15..11: reserved */ -#define XM_RX_WM_MSK 0x03ff /* Bit 11.. 0: Rx FIFO Watermark bits */ + /* Bit 15..11: reserved */ +#define XM_RX_WM_MSK 0x03ff /* Bit 11.. 0: Rx FIFO Watermark bits */ /* XM_DEV_ID 32 bit ro Device ID Register */ @@ -427,25 +431,25 @@ /* XM_MODE 32 bit r/w Mode Register */ - /* Bit 31..27: reserved */ + /* Bit 31..27: reserved */ #define XM_MD_ENA_REJ (1L<<26) /* Bit 26: Enable Frame Reject */ #define XM_MD_SPOE_E (1L<<25) /* Bit 25: Send Pause on Edge */ - /* extern generated */ + /* extern generated */ #define XM_MD_TX_REP (1L<<24) /* Bit 24: Transmit Repeater Mode*/ #define XM_MD_SPOFF_I (1L<<23) /* Bit 23: Send Pause on FIFOfull*/ - /* intern generated */ + /* intern generated */ #define XM_MD_LE_STW (1L<<22) /* Bit 22: Rx Stat Word in Lit En*/ #define XM_MD_TX_CONT (1L<<21) /* Bit 21: Send Continuous */ #define XM_MD_TX_PAUSE (1L<<20) /* Bit 20: (sc) Send Pause Frame */ -#define XM_MD_ATS (1L<<19) /* Bit 19: Append Time Stamp */ +#define XM_MD_ATS (1L<<19) /* Bit 19: Append Time Stamp */ #define XM_MD_SPOL_I (1L<<18) /* Bit 18: Send Pause on Low */ - /* intern generated */ + /* intern generated */ #define XM_MD_SPOH_I (1L<<17) /* Bit 17: Send Pause on High */ - /* intern generated */ -#define XM_MD_CAP (1L<<16) /* Bit 16: Check Address Pair */ + /* intern generated */ +#define XM_MD_CAP (1L<<16) /* Bit 16: Check Address Pair */ #define XM_MD_ENA_HSH (1L<<15) /* Bit 15: Enable Hashing */ -#define XM_MD_CSA (1L<<14) /* Bit 14: Check Station Address */ -#define XM_MD_CAA (1L<<13) /* Bit 13: Check Address Array */ +#define XM_MD_CSA (1L<<14) /* Bit 14: Check Station Address */ +#define XM_MD_CAA (1L<<13) /* Bit 13: Check Address Array */ #define XM_MD_RX_MCTRL (1L<<12) /* Bit 12: Rx MAC Control Frames */ #define XM_MD_RX_RUNT (1L<<11) /* Bit 11: Rx Runt Frames */ #define XM_MD_RX_IRLE (1L<<10) /* Bit 10: Rx in Range Len Err F */ @@ -457,16 +461,15 @@ #define XM_MD_DIS_BC (1L<<4) /* Bit 4: Disable Rx Boradcast */ #define XM_MD_ENA_PROM (1L<<3) /* Bit 3: Enable Promiscuous */ #define XM_MD_ENA_BE (1L<<2) /* Bit 2: Enable Big Endian */ -#define XM_MD_FTF (1L<<1) /* Bit 1: (sc) Flush Tx FIFO */ -#define XM_MD_FRF (1L<<0) /* Bit 0: (sc) Flush Rx FIFO */ +#define XM_MD_FTF (1L<<1) /* Bit 1: (sc) Flush Tx FIFO */ +#define XM_MD_FRF (1L<<0) /* Bit 0: (sc) Flush Rx FIFO */ #define XM_PAUSE_MODE (XM_MD_SPOE_E | XM_MD_SPOL_I | XM_MD_SPOH_I) #define XM_DEF_MODE (XM_MD_RX_RUNT | XM_MD_RX_IRLE | XM_MD_RX_LONG |\ - XM_MD_RX_CRCE | XM_MD_RX_ERR | XM_MD_CSA |\ - XM_MD_CAA) + XM_MD_RX_CRCE | XM_MD_RX_ERR | XM_MD_CSA | XM_MD_CAA) /* XM_STAT_CMD 16 bit r/w Statistics Command Register */ - /* Bit 16..6: reserved */ + /* Bit 16..6: reserved */ #define XM_SC_SNP_RXC (1<<5) /* Bit 5: (sc) Snap Rx Counters */ #define XM_SC_SNP_TXC (1<<4) /* Bit 4: (sc) Snap Tx Counters */ #define XM_SC_CP_RXC (1<<3) /* Bit 3: Copy Rx Counters Continuously */ @@ -479,28 +482,28 @@ /* XM_RX_EV_MSK 32 bit r/w Rx Counter Event Mask */ #define XMR_MAX_SZ_OV (1UL<<31) /* Bit 31: 1024-MaxSize Rx Cnt Ov*/ #define XMR_1023B_OV (1L<<30) /* Bit 30: 512-1023Byte Rx Cnt Ov*/ -#define XMR_511B_OV (1L<<29) /* Bit 29: 256-511 Byte Rx Cnt Ov*/ -#define XMR_255B_OV (1L<<28) /* Bit 28: 128-255 Byte Rx Cnt Ov*/ -#define XMR_127B_OV (1L<<27) /* Bit 27: 65-127 Byte Rx Cnt Ov */ -#define XMR_64B_OV (1L<<26) /* Bit 26: 64 Byte Rx Cnt Ov */ -#define XMR_UTIL_OV (1L<<25) /* Bit 25: Rx Util Cnt Overflow */ -#define XMR_UTIL_UR (1L<<24) /* Bit 24: Rx Util Cnt Underrun */ +#define XMR_511B_OV (1L<<29) /* Bit 29: 256-511 Byte Rx Cnt Ov*/ +#define XMR_255B_OV (1L<<28) /* Bit 28: 128-255 Byte Rx Cnt Ov*/ +#define XMR_127B_OV (1L<<27) /* Bit 27: 65-127 Byte Rx Cnt Ov */ +#define XMR_64B_OV (1L<<26) /* Bit 26: 64 Byte Rx Cnt Ov */ +#define XMR_UTIL_OV (1L<<25) /* Bit 25: Rx Util Cnt Overflow */ +#define XMR_UTIL_UR (1L<<24) /* Bit 24: Rx Util Cnt Underrun */ #define XMR_CEX_ERR_OV (1L<<23) /* Bit 23: CEXT Err Cnt Ov */ - /* Bit 22: reserved */ + /* Bit 22: reserved */ #define XMR_FCS_ERR_OV (1L<<21) /* Bit 21: Rx FCS Error Cnt Ov */ #define XMR_LNG_ERR_OV (1L<<20) /* Bit 20: Rx too Long Err Cnt Ov*/ -#define XMR_RUNT_OV (1L<<19) /* Bit 19: Runt Event Cnt Ov */ +#define XMR_RUNT_OV (1L<<19) /* Bit 19: Runt Event Cnt Ov */ #define XMR_SHT_ERR_OV (1L<<18) /* Bit 18: Rx Short Ev Err Cnt Ov*/ #define XMR_SYM_ERR_OV (1L<<17) /* Bit 17: Rx Sym Err Cnt Ov */ - /* Bit 16: reserved */ + /* Bit 16: reserved */ #define XMR_CAR_ERR_OV (1L<<15) /* Bit 15: Rx Carr Ev Err Cnt Ov */ #define XMR_JAB_PKT_OV (1L<<14) /* Bit 14: Rx Jabb Packet Cnt Ov */ -#define XMR_FIFO_OV (1L<<13) /* Bit 13: Rx FIFO Ov Ev Cnt Ov */ +#define XMR_FIFO_OV (1L<<13) /* Bit 13: Rx FIFO Ov Ev Cnt Ov */ #define XMR_FRA_ERR_OV (1L<<12) /* Bit 12: Rx Framing Err Cnt Ov */ #define XMR_FMISS_OV (1L<<11) /* Bit 11: Rx Missed Ev Cnt Ov */ -#define XMR_BURST (1L<<10) /* Bit 10: Rx Burst Event Cnt Ov */ -#define XMR_INV_MOC (1L<<9) /* Bit 9: Rx with inv. MAC OC Ov*/ -#define XMR_INV_MP (1L<<8) /* Bit 8: Rx inv Pause Frame Ov */ +#define XMR_BURST (1L<<10) /* Bit 10: Rx Burst Event Cnt Ov */ +#define XMR_INV_MOC (1L<<9) /* Bit 9: Rx with inv. MAC OC Ov*/ +#define XMR_INV_MP (1L<<8) /* Bit 8: Rx inv Pause Frame Ov */ #define XMR_MCTRL_OV (1L<<7) /* Bit 7: Rx MAC Ctrl-F Cnt Ov */ #define XMR_MPAUSE_OV (1L<<6) /* Bit 6: Rx Pause MAC Ctrl-F Ov*/ #define XMR_UC_OK_OV (1L<<5) /* Bit 5: Rx Unicast Frame CntOv*/ @@ -508,39 +511,39 @@ #define XMR_BC_OK_OV (1L<<3) /* Bit 3: Rx Broadcast Cnt Ov */ #define XMR_OK_LO_OV (1L<<2) /* Bit 2: Octets Rx OK Low CntOv*/ #define XMR_OK_HI_OV (1L<<1) /* Bit 1: Octets Rx OK Hi Cnt Ov*/ -#define XMR_OK_OV (1L<<0) /* Bit 0: Frames Received Ok Ov */ +#define XMR_OK_OV (1L<<0) /* Bit 0: Frames Received Ok Ov */ #define XMR_DEF_MSK 0x00000006L /* all bits excepting 1 and 2 */ /* XM_TX_CNT_EV 32 bit ro Tx Counter Event Register */ /* XM_TX_EV_MSK 32 bit r/w Tx Counter Event Mask */ - /* Bit 31..26: reserved */ + /* Bit 31..26: reserved */ #define XMT_MAX_SZ_OV (1L<<25) /* Bit 25: 1024-MaxSize Tx Cnt Ov*/ #define XMT_1023B_OV (1L<<24) /* Bit 24: 512-1023Byte Tx Cnt Ov*/ -#define XMT_511B_OV (1L<<23) /* Bit 23: 256-511 Byte Tx Cnt Ov*/ -#define XMT_255B_OV (1L<<22) /* Bit 22: 128-255 Byte Tx Cnt Ov*/ -#define XMT_127B_OV (1L<<21) /* Bit 21: 65-127 Byte Tx Cnt Ov */ -#define XMT_64B_OV (1L<<20) /* Bit 20: 64 Byte Tx Cnt Ov */ -#define XMT_UTIL_OV (1L<<19) /* Bit 19: Tx Util Cnt Overflow */ -#define XMT_UTIL_UR (1L<<18) /* Bit 18: Tx Util Cnt Underrun */ +#define XMT_511B_OV (1L<<23) /* Bit 23: 256-511 Byte Tx Cnt Ov*/ +#define XMT_255B_OV (1L<<22) /* Bit 22: 128-255 Byte Tx Cnt Ov*/ +#define XMT_127B_OV (1L<<21) /* Bit 21: 65-127 Byte Tx Cnt Ov */ +#define XMT_64B_OV (1L<<20) /* Bit 20: 64 Byte Tx Cnt Ov */ +#define XMT_UTIL_OV (1L<<19) /* Bit 19: Tx Util Cnt Overflow */ +#define XMT_UTIL_UR (1L<<18) /* Bit 18: Tx Util Cnt Underrun */ #define XMT_CS_ERR_OV (1L<<17) /* Bit 17: Tx Carr Sen Err Cnt Ov*/ #define XMT_FIFO_UR_OV (1L<<16) /* Bit 16: Tx FIFO Ur Ev Cnt Ov */ #define XMT_EX_DEF_OV (1L<<15) /* Bit 15: Tx Ex Deferall Cnt Ov */ -#define XMT_DEF (1L<<14) /* Bit 14: Tx Deferred Cnt Ov */ +#define XMT_DEF (1L<<14) /* Bit 14: Tx Deferred Cnt Ov */ #define XMT_LAT_COL_OV (1L<<13) /* Bit 13: Tx Late Col Cnt Ov */ #define XMT_ABO_COL_OV (1L<<12) /* Bit 12: Tx abo dueto Ex Col Ov*/ #define XMT_MUL_COL_OV (1L<<11) /* Bit 11: Tx Mult Col Cnt Ov */ -#define XMT_SNG_COL (1L<<10) /* Bit 10: Tx Single Col Cnt Ov */ +#define XMT_SNG_COL (1L<<10) /* Bit 10: Tx Single Col Cnt Ov */ #define XMT_MCTRL_OV (1L<<9) /* Bit 9: Tx MAC Ctrl Counter Ov*/ -#define XMT_MPAUSE (1L<<8) /* Bit 8: Tx Pause MAC Ctrl-F Ov*/ -#define XMT_BURST (1L<<7) /* Bit 7: Tx Burst Event Cnt Ov */ -#define XMT_LONG (1L<<6) /* Bit 6: Tx Long Frame Cnt Ov */ +#define XMT_MPAUSE (1L<<8) /* Bit 8: Tx Pause MAC Ctrl-F Ov*/ +#define XMT_BURST (1L<<7) /* Bit 7: Tx Burst Event Cnt Ov */ +#define XMT_LONG (1L<<6) /* Bit 6: Tx Long Frame Cnt Ov */ #define XMT_UC_OK_OV (1L<<5) /* Bit 5: Tx Unicast Cnt Ov */ #define XMT_MC_OK_OV (1L<<4) /* Bit 4: Tx Multicast Cnt Ov */ #define XMT_BC_OK_OV (1L<<3) /* Bit 3: Tx Broadcast Cnt Ov */ #define XMT_OK_LO_OV (1L<<2) /* Bit 2: Octets Tx OK Low CntOv*/ #define XMT_OK_HI_OV (1L<<1) /* Bit 1: Octets Tx OK Hi Cnt Ov*/ -#define XMT_OK_OV (1L<<0) /* Bit 0: Frames Tx Ok Ov */ +#define XMT_OK_OV (1L<<0) /* Bit 0: Frames Tx Ok Ov */ #define XMT_DEF_MSK 0x00000006L /* all bits excepting 1 and 2 */ @@ -550,10 +553,10 @@ #define XMR_FS_LEN (0x3fffUL<<18) /* Bit 31..18: Rx Frame Length */ #define XMR_FS_2L_VLAN (1L<<17) /* Bit 17: tagged wh 2Lev VLAN ID*/ #define XMR_FS_1L_VLAN (1L<<16) /* Bit 16: tagged wh 1Lev VLAN ID*/ -#define XMR_FS_BC (1L<<15) /* Bit 15: Broadcast Frame */ -#define XMR_FS_MC (1L<<14) /* Bit 14: Multicast Frame */ -#define XMR_FS_UC (1L<<13) /* Bit 13: Unicast Frame */ - /* Bit 12: reserved */ +#define XMR_FS_BC (1L<<15) /* Bit 15: Broadcast Frame */ +#define XMR_FS_MC (1L<<14) /* Bit 14: Multicast Frame */ +#define XMR_FS_UC (1L<<13) /* Bit 13: Unicast Frame */ + /* Bit 12: reserved */ #define XMR_FS_BURST (1L<<11) /* Bit 11: Burst Mode */ #define XMR_FS_CEX_ERR (1L<<10) /* Bit 10: Carrier Ext. Error */ #define XMR_FS_802_3 (1L<<9) /* Bit 9: 802.3 Frame */ @@ -561,10 +564,10 @@ #define XMR_FS_CAR_ERR (1L<<7) /* Bit 7: Carrier Event Error */ #define XMR_FS_LEN_ERR (1L<<6) /* Bit 6: In-Range Length Error */ #define XMR_FS_FRA_ERR (1L<<5) /* Bit 5: Framing Error */ -#define XMR_FS_RUNT (1L<<4) /* Bit 4: Runt Error */ +#define XMR_FS_RUNT (1L<<4) /* Bit 4: Runt Error */ #define XMR_FS_LNG_ERR (1L<<3) /* Bit 3: Gaint Error */ #define XMR_FS_FCS_ERR (1L<<2) /* Bit 2: Frame Check Sequ Err */ -#define XMR_FS_ERR (1L<<1) /* Bit 1: Frame Error */ +#define XMR_FS_ERR (1L<<1) /* Bit 1: Frame Error */ #define XMR_FS_MCTRL (1L<<0) /* Bit 0: MAC Control Packet */ /* @@ -658,8 +661,8 @@ */ #define PHY_NAT_CTRL 0x00 /* 16 bit r/w PHY Control Register */ #define PHY_NAT_STAT 0x01 /* 16 bit r/w PHY Status Register */ -#define PHY_NAT_ID0 0x02 /* 16 bit ro PHY ID0 Register */ -#define PHY_NAT_ID1 0x03 /* 16 bit ro PHY ID1 Register */ +#define PHY_NAT_ID0 0x02 /* 16 bit ro PHY ID0 Register */ +#define PHY_NAT_ID1 0x03 /* 16 bit ro PHY ID1 Register */ #define PHY_NAT_AUNE_ADV 0x04 /* 16 bit r/w Autonegotiation Advertisement */ #define PHY_NAT_AUNE_LP 0x05 /* 16 bit ro Link Partner Ability Reg */ #define PHY_NAT_AUNE_EXP 0x06 /* 16 bit ro Autonegotiation Expansion Reg */ @@ -692,16 +695,16 @@ /***** PHY_BCOM_CTRL 16 bit r/w PHY Control Register *****/ /***** PHY_LONE_CTRL 16 bit r/w PHY Control Register *****/ #define PHY_CT_RESET (1<<15) /* Bit 15: (sc) clear all PHY releated regs */ -#define PHY_CT_LOOP (1<<14) /* Bit 14: enable Loopback over PHY */ +#define PHY_CT_LOOP (1<<14) /* Bit 14: enable Loopback over PHY */ #define PHY_CT_SPS_LSB (1<<13) /* Bit 13: (BC,L1) Speed select, lower bit */ -#define PHY_CT_ANE (1<<12) /* Bit 12: Autonegotiation Enabled */ +#define PHY_CT_ANE (1<<12) /* Bit 12: Autonegotiation Enabled */ #define PHY_CT_PDOWN (1<<11) /* Bit 11: (BC,L1) Power Down Mode */ -#define PHY_CT_ISOL (1<<10) /* Bit 10: (BC,L1) Isolate Mode */ +#define PHY_CT_ISOL (1<<10) /* Bit 10: (BC,L1) Isolate Mode */ #define PHY_CT_RE_CFG (1<<9) /* Bit 9: (sc) Restart Autonegotiation */ #define PHY_CT_DUP_MD (1<<8) /* Bit 8: Duplex Mode */ #define PHY_CT_COL_TST (1<<7) /* Bit 7: (BC,L1) Collsion Test enabled */ #define PHY_CT_SPS_MSB (1<<6) /* Bit 6: (BC,L1) Speed select, upper bit */ - /* Bit 5..0: reserved */ + /* Bit 5..0: reserved */ #define PHY_B_CT_SP1000 (1<<6) /* Bit 6: enable speed of 1000 MBit/s */ #define PHY_B_CT_SP100 (1<<13) /* Bit 13: enable speed of 100 MBit/s */ @@ -715,10 +718,10 @@ /***** PHY_XMAC_STAT 16 bit r/w PHY Status Register *****/ /***** PHY_BCOM_STAT 16 bit r/w PHY Status Register *****/ /***** PHY_LONE_STAT 16 bit r/w PHY Status Register *****/ - /* Bit 15..9: reserved */ + /* Bit 15..9: reserved */ /* (BC/L1) 100/10 MBit/s cap bits ignored*/ #define PHY_ST_EXT_ST (1<<8) /* Bit 8: Extended Status Present */ - /* Bit 7: reserved */ + /* Bit 7: reserved */ #define PHY_ST_PRE_SUB (1<<6) /* Bit 6: (BC/L1) preamble suppression */ #define PHY_ST_AN_OVER (1<<5) /* Bit 5: Autonegotiation Over */ #define PHY_ST_REM_FLT (1<<4) /* Bit 4: Remode Fault Condition Occured*/ @@ -731,9 +734,9 @@ /* PHY_XMAC_ID1 16 bit ro PHY ID1 Register */ /* PHY_BCOM_ID1 16 bit ro PHY ID1 Register */ /* PHY_LONE_ID1 16 bit ro PHY ID1 Register */ -#define PHY_I1_OUI (0x3f<<10) /* Bit 15..10: Organiz. Unique ID */ +#define PHY_I1_OUI (0x3f<<10) /* Bit 15..10: Organiz. Unique ID */ #define PHY_I1_MOD_NUM (0x3f<<4) /* Bit 9.. 4: Model Number */ -#define PHY_I1_REV (0x0f<<0) /* Bit 3.. 0: Revision Number */ +#define PHY_I1_REV (0x0f<<0) /* Bit 3.. 0: Revision Number */ /***** PHY_XMAC_AUNE_ADV 16 bit r/w Autoneg Advertisement *****/ @@ -741,43 +744,43 @@ #define PHY_AN_NXT_PG (1<<15) /* Bit 15: Request Next Page */ #define PHY_X_AN_ACK (1<<14) /* Bit 14: (ro) Acknowledge Received */ #define PHY_X_AN_RFB (3<<12) /* Bit 13..12: Remode Fault Bits */ - /* Bit 11.. 9: reserved */ + /* Bit 11.. 9: reserved */ #define PHY_X_AN_PAUSE (3<<7) /* Bit 8.. 7: Pause Bits */ -#define PHY_X_AN_HD (1<<6) /* Bit 6: Half Duplex */ -#define PHY_X_AN_FD (1<<5) /* Bit 5: Full Duplex */ - /* Bit 4.. 0: reserved */ +#define PHY_X_AN_HD (1<<6) /* Bit 6: Half Duplex */ +#define PHY_X_AN_FD (1<<5) /* Bit 5: Full Duplex */ + /* Bit 4.. 0: reserved */ /***** PHY_BCOM_AUNE_ADV 16 bit r/w Autoneg Advertisement *****/ /***** PHY_BCOM_AUNE_LP 16 bit ro Link Partner Ability Reg *****/ -/* PHY_AN_NXT_PG (see XMAC) Bit 15: Request Next Page */ - /* Bit 14: reserved */ -#define PHY_B_AN_RF (1<<13) /* Bit 13: Remote Fault */ - /* Bit 12: reserved */ +/* PHY_AN_NXT_PG (see XMAC) Bit 15: Request Next Page */ + /* Bit 14: reserved */ +#define PHY_B_AN_RF (1<<13) /* Bit 13: Remote Fault */ + /* Bit 12: reserved */ #define PHY_B_AN_ASP (1<<11) /* Bit 11: Asymetric Pause */ -#define PHY_B_AN_PC (1<<10) /* Bit 10: Pause Capable */ - /* Bit 9..5: 100/10 BT cap bits ingnored */ +#define PHY_B_AN_PC (1<<10) /* Bit 10: Pause Capable */ + /* Bit 9..5: 100/10 BT cap bits ingnored */ #define PHY_B_AN_SEL (0x1f<<0)/* Bit 4..0: Selector Field, 00001=Ethernet*/ /***** PHY_LONE_AUNE_ADV 16 bit r/w Autoneg Advertisement *****/ /***** PHY_LONE_AUNE_LP 16 bit ro Link Partner Ability Reg *****/ -/* PHY_AN_NXT_PG (see XMAC) Bit 15: Request Next Page */ - /* Bit 14: reserved */ -#define PHY_L_AN_RF (1<<13) /* Bit 13: Remote Fault */ - /* Bit 12: reserved */ +/* PHY_AN_NXT_PG (see XMAC) Bit 15: Request Next Page */ + /* Bit 14: reserved */ +#define PHY_L_AN_RF (1<<13) /* Bit 13: Remote Fault */ + /* Bit 12: reserved */ #define PHY_L_AN_ASP (1<<11) /* Bit 11: Asymetric Pause */ -#define PHY_L_AN_PC (1<<10) /* Bit 10: Pause Capable */ - /* Bit 9..5: 100/10 BT cap bits ingnored */ +#define PHY_L_AN_PC (1<<10) /* Bit 10: Pause Capable */ + /* Bit 9..5: 100/10 BT cap bits ingnored */ #define PHY_L_AN_SEL (0x1f<<0)/* Bit 4..0: Selector Field, 00001=Ethernet*/ /***** PHY_NAT_AUNE_ADV 16 bit r/w Autoneg Advertisement *****/ /***** PHY_NAT_AUNE_LP 16 bit ro Link Partner Ability Reg *****/ -/* PHY_AN_NXT_PG (see XMAC) Bit 15: Request Next Page */ - /* Bit 14: reserved */ -#define PHY_N_AN_RF (1<<13) /* Bit 13: Remote Fault */ - /* Bit 12: reserved */ +/* PHY_AN_NXT_PG (see XMAC) Bit 15: Request Next Page */ + /* Bit 14: reserved */ +#define PHY_N_AN_RF (1<<13) /* Bit 13: Remote Fault */ + /* Bit 12: reserved */ #define PHY_N_AN_100F (1<<11) /* Bit 11: 100Base-T2 FD Support */ #define PHY_N_AN_100H (1<<10) /* Bit 10: 100Base-T2 HD Support */ - /* Bit 9..5: 100/10 BT cap bits ingnored */ + /* Bit 9..5: 100/10 BT cap bits ingnored */ #define PHY_N_AN_SEL (0x1f<<0)/* Bit 4..0: Selector Field, 00001=Ethernet*/ /* field type definition for PHY_x_AN_SEL */ @@ -788,22 +791,22 @@ #define PHY_AN_LP_NP (1<<3) /* Bit 3: Link Partner can Next Page */ #define PHY_AN_LOC_NP (1<<2) /* Bit 2: Local PHY can Next Page */ #define PHY_AN_RX_PG (1<<1) /* Bit 1: Page Received */ - /* Bit 0: reserved */ + /* Bit 0: reserved */ /***** PHY_BCOM_AUNE_EXP 16 bit ro Autoneg Expansion Reg *****/ - /* Bit 15..5: reserved */ + /* Bit 15..5: reserved */ #define PHY_B_AN_PDF (1<<4) /* Bit 4: Parallel Detection Fault */ -/* PHY_AN_LP_NP (see XMAC) Bit 3: Link Partner can Next Page */ -/* PHY_AN_LOC_NP (see XMAC) Bit 2: Local PHY can Next Page */ -/* PHY_AN_RX_PG (see XMAC) Bit 1: Page Received */ +/* PHY_AN_LP_NP (see XMAC) Bit 3: Link Partner can Next Page */ +/* PHY_AN_LOC_NP (see XMAC) Bit 2: Local PHY can Next Page */ +/* PHY_AN_RX_PG (see XMAC) Bit 1: Page Received */ #define PHY_B_AN_LP_CAP (1<<0) /* Bit 0: Link Partner Autoneg Cap. */ /***** PHY_LONE_AUNE_EXP 16 bit ro Autoneg Expansion Reg *****/ -#define PHY_L_AN_BP (1<<5) /* Bit 5: Base Page Indication */ +#define PHY_L_AN_BP (1<<5) /* Bit 5: Base Page Indication */ #define PHY_L_AN_PDF (1<<4) /* Bit 4: Parallel Detection Fault */ -/* PHY_AN_LP_NP (see XMAC) Bit 3: Link Partner can Next Page */ -/* PHY_AN_LOC_NP (see XMAC) Bit 2: Local PHY can Next Page */ -/* PHY_AN_RX_PG (see XMAC) Bit 1: Page Received */ +/* PHY_AN_LP_NP (see XMAC) Bit 3: Link Partner can Next Page */ +/* PHY_AN_LOC_NP (see XMAC) Bit 2: Local PHY can Next Page */ +/* PHY_AN_RX_PG (see XMAC) Bit 1: Page Received */ #define PHY_B_AN_LP_CAP (1<<0) /* Bit 0: Link Partner Autoneg Cap. */ @@ -813,35 +816,35 @@ /***** PHY_XMAC_NEPG_LP 16 bit ro Next Page Link Partner *****/ /***** PHY_BCOM_NEPG_LP 16 bit ro Next Page Link Partner *****/ /***** PHY_LONE_NEPG_LP 16 bit ro Next Page Link Partner *****/ -#define PHY_NP_MORE (1<<15) /* Bit 15: More, Next Pages to follow */ -#define PHY_NP_ACK1 (1<<14) /* Bit 14: (ro) Ack 1, for receiving a message*/ +#define PHY_NP_MORE (1<<15) /* Bit 15: More, Next Pages to follow */ +#define PHY_NP_ACK1 (1<<14) /* Bit 14: (ro) Ack 1, for receiving a message*/ #define PHY_NP_MSG_VAL (1<<13) /* Bit 13: Message Page valid */ -#define PHY_NP_ACK2 (1<<12) /* Bit 12: Ack 2, comply with msg content*/ -#define PHY_NP_TOG (1<<11) /* Bit 11: Toggle Bit, ensure sync */ -#define PHY_NP_MSG 0x07ff /* Bit 10..0: Message from/to Link Partner */ +#define PHY_NP_ACK2 (1<<12) /* Bit 12: Ack 2, comply with msg content*/ +#define PHY_NP_TOG (1<<11) /* Bit 11: Toggle Bit, ensure sync */ +#define PHY_NP_MSG 0x07ff /* Bit 10..0: Message from/to Link Partner */ /* * XMAC-Specific */ /***** PHY_XMAC_EXT_STAT 16 bit r/w Extended Status Register *****/ -#define PHY_X_EX_FD (1<<15) /* Bit 15: Device Supports Full Duplex */ -#define PHY_X_EX_HD (1<<14) /* Bit 14: Device Supports Half Duplex */ - /* Bit 13..0: reserved */ +#define PHY_X_EX_FD (1<<15) /* Bit 15: Device Supports Full Duplex */ +#define PHY_X_EX_HD (1<<14) /* Bit 14: Device Supports Half Duplex */ + /* Bit 13..0: reserved */ /***** PHY_XMAC_RES_ABI 16 bit ro PHY Resolved Ability *****/ - /* Bit 15..9: reserved */ + /* Bit 15..9: reserved */ #define PHY_X_RS_PAUSE (3<<7) /* Bit 8..7: selected Pause Mode */ -#define PHY_X_RS_HD (1<<6) /* Bit 6: Half Duplex Mode selected */ -#define PHY_X_RS_FD (1<<5) /* Bit 5: Full Duplex Mode selected */ +#define PHY_X_RS_HD (1<<6) /* Bit 6: Half Duplex Mode selected */ +#define PHY_X_RS_FD (1<<5) /* Bit 5: Full Duplex Mode selected */ #define PHY_X_RS_ABLMIS (1<<4) /* Bit 4: duplex or pause cap mismatch */ #define PHY_X_RS_PAUMIS (1<<3) /* Bit 3: pause capability missmatch */ - /* Bit 2..0: reserved */ + /* Bit 2..0: reserved */ /* * Remote Fault Bits (PHY_X_AN_RFB) encoding */ -#define X_RFB_OK (0<<12) /* Bit 12..13 No errors, Link OK */ -#define X_RFB_LF (1<<12) /* Bit 12..13 Link Failure */ -#define X_RFB_OFF (2<<12) /* Bit 12..13 Offline */ +#define X_RFB_OK (0<<12) /* Bit 12..13 No errors, Link OK */ +#define X_RFB_LF (1<<12) /* Bit 12..13 Link Failure */ +#define X_RFB_OFF (2<<12) /* Bit 12..13 Offline */ #define X_RFB_AN_ERR (3<<12) /* Bit 12..13 Autonegotiation Error */ /* @@ -863,7 +866,7 @@ #define PHY_B_1000C_RD (1<<10) /* Bit 10: Repeater/DTE */ #define PHY_B_1000C_AFD (1<<9) /* Bit 9: Advertise Full Duplex */ #define PHY_B_1000C_AHD (1<<8) /* Bit 8: Advertise Half Duplex */ - /* Bit 7..0: reserved */ + /* Bit 7..0: reserved */ /***** PHY_BCOM_1000T_STAT 16 bit ro 1000Base-T Status Reg *****/ #define PHY_B_1000S_MSF (1<<15) /* Bit 15: Master/Slave Fault */ @@ -872,7 +875,7 @@ #define PHY_B_1000S_RRS (1<<12) /* Bit 12: Remote Receiver Status */ #define PHY_B_1000S_LP_FD (1<<11) /* Bit 11: Link Partner can FD */ #define PHY_B_1000S_LP_HD (1<<10) /* Bit 10: Link Partner can HD */ - /* Bit 9..8: reserved */ + /* Bit 9..8: reserved */ #define PHY_B_1000S_IEC (255<<0)/* Bit 7..0: Idle Error Count */ /***** PHY_BCOM_EXT_STAT 16 bit ro Extended Status Register *****/ @@ -880,7 +883,7 @@ #define PHY_B_ES_X_HD_CAP (1<<14) /* Bit 14: 1000Base-X HD capable */ #define PHY_B_ES_T_FD_CAP (1<<13) /* Bit 13: 1000Base-T FD capable */ #define PHY_B_ES_T_HD_CAP (1<<12) /* Bit 12: 1000Base-T HD capable */ - /* Bit 11..0: reserved */ + /* Bit 11..0: reserved */ /***** PHY_BCOM_P_EXT_CTRL 16 bit r/w PHY Extended Control Reg *****/ #define PHY_B_PEC_MAC_PHY (1<<15) /* Bit 15: 10BIT/GMI-Interface */ @@ -889,36 +892,36 @@ #define PHY_B_PEC_INT_DIS (1<<12) /* Bit 12: Interrupts Disabled */ #define PHY_B_PEC_F_INT (1<<11) /* Bit 11: Force Interrupt */ #define PHY_B_PEC_BY_45 (1<<10) /* Bit 10: Bypass 4B5B-Decoder */ -#define PHY_B_PEC_BY_SCR (1<<9) /* Bit 9: Bypass Scrambler */ -#define PHY_B_PEC_BY_MLT3 (1<<8) /* Bit 8: Bypass MLT3 Encoder */ -#define PHY_B_PEC_BY_RXA (1<<7) /* Bit 7: Bypass Rx Alignm. */ -#define PHY_B_PEC_RES_SCR (1<<6) /* Bit 6: Reset Scrambler */ -#define PHY_B_PEC_EN_LTR (1<<5) /* Bit 5: Ena LED Traffic Mode */ -#define PHY_B_PEC_LED_ON (1<<4) /* Bit 4: Force LED's on */ -#define PHY_B_PEC_LED_OFF (1<<3) /* Bit 3: Force LED's off */ -#define PHY_B_PEC_EX_IPG (1<<2) /* Bit 2: Extend Tx IPG Mode */ -#define PHY_B_PEC_3_LED (1<<1) /* Bit 1: Three Link LED mode */ -#define PHY_B_PEC_HIGH_LA (1<<0) /* Bit 0: GMII Fifo Elasticy */ +#define PHY_B_PEC_BY_SCR (1<<9) /* Bit 9: Bypass Scrambler */ +#define PHY_B_PEC_BY_MLT3 (1<<8) /* Bit 8: Bypass MLT3 Encoder */ +#define PHY_B_PEC_BY_RXA (1<<7) /* Bit 7: Bypass Rx Alignm. */ +#define PHY_B_PEC_RES_SCR (1<<6) /* Bit 6: Reset Scrambler */ +#define PHY_B_PEC_EN_LTR (1<<5) /* Bit 5: Ena LED Traffic Mode */ +#define PHY_B_PEC_LED_ON (1<<4) /* Bit 4: Force LED's on */ +#define PHY_B_PEC_LED_OFF (1<<3) /* Bit 3: Force LED's off */ +#define PHY_B_PEC_EX_IPG (1<<2) /* Bit 2: Extend Tx IPG Mode */ +#define PHY_B_PEC_3_LED (1<<1) /* Bit 1: Three Link LED mode */ +#define PHY_B_PEC_HIGH_LA (1<<0) /* Bit 0: GMII Fifo Elasticy */ /***** PHY_BCOM_P_EXT_STAT 16 bit ro PHY Extended Status Reg *****/ - /* Bit 15..14: reserved */ + /* Bit 15..14: reserved */ #define PHY_B_PES_CROSS_STAT (1<<13) /* Bit 13: MDI Crossover Status */ #define PHY_B_PES_INT_STAT (1<<12) /* Bit 12: Interrupt Status */ #define PHY_B_PES_RRS (1<<11) /* Bit 11: Remote Receiver Stat. */ #define PHY_B_PES_LRS (1<<10) /* Bit 10: Local Receiver Stat. */ -#define PHY_B_PES_LOCKED (1<<9) /* Bit 9: Locked */ -#define PHY_B_PES_LS (1<<8) /* Bit 8: Link Status */ -#define PHY_B_PES_RF (1<<7) /* Bit 7: Remote Fault */ -#define PHY_B_PES_CE_ER (1<<6) /* Bit 6: Carrier Ext Error */ -#define PHY_B_PES_BAD_SSD (1<<5) /* Bit 5: Bad SSD */ -#define PHY_B_PES_BAD_ESD (1<<4) /* Bit 4: Bad ESD */ -#define PHY_B_PES_RX_ER (1<<3) /* Bit 3: Receive Error */ -#define PHY_B_PES_TX_ER (1<<2) /* Bit 2: Transmit Error */ -#define PHY_B_PES_LOCK_ER (1<<1) /* Bit 1: Lock Error */ -#define PHY_B_PES_MLT3_ER (1<<0) /* Bit 0: MLT3 code Error */ +#define PHY_B_PES_LOCKED (1<<9) /* Bit 9: Locked */ +#define PHY_B_PES_LS (1<<8) /* Bit 8: Link Status */ +#define PHY_B_PES_RF (1<<7) /* Bit 7: Remote Fault */ +#define PHY_B_PES_CE_ER (1<<6) /* Bit 6: Carrier Ext Error */ +#define PHY_B_PES_BAD_SSD (1<<5) /* Bit 5: Bad SSD */ +#define PHY_B_PES_BAD_ESD (1<<4) /* Bit 4: Bad ESD */ +#define PHY_B_PES_RX_ER (1<<3) /* Bit 3: Receive Error */ +#define PHY_B_PES_TX_ER (1<<2) /* Bit 2: Transmit Error */ +#define PHY_B_PES_LOCK_ER (1<<1) /* Bit 1: Lock Error */ +#define PHY_B_PES_MLT3_ER (1<<0) /* Bit 0: MLT3 code Error */ /***** PHY_BCOM_FC_CTR 16 bit r/w False Carrier Counter *****/ - /* Bit 15..8: reserved */ + /* Bit 15..8: reserved */ #define PHY_B_FC_CTR (255<<0)/* Bit 7..0: False Carrier Counter */ /***** PHY_BCOM_RNO_CTR 16 bit r/w Receive NOT_OK Counter *****/ @@ -929,13 +932,15 @@ #define PHY_B_AC_L_SQE (1<<15) /* Bit 15: Low Squelch */ #define PHY_B_AC_LONG_PACK (1<<14) /* Bit 14: Rx Long Packets */ #define PHY_B_AC_ER_CTRL (3<<12) /* Bit 13..12: Edgerate Control */ - /* Bit 11: reserved */ + /* Bit 11: reserved */ #define PHY_B_AC_TX_TST (1<<10) /* Bit 10: tx test bit, always 1 */ - /* Bit 9.. 8: reserved */ + /* Bit 9.. 8: reserved */ #define PHY_B_AC_DIS_PRF (1<<7) /* Bit 7: dis part resp filter */ - /* Bit 6.. 4: reserved */ + /* Bit 6: reserved */ +#define PHY_B_AC_DIS_PM (1<<5) /* Bit 5: dis power management */ + /* Bit 4: reserved */ #define PHY_B_AC_DIAG (1<<3) /* Bit 3: Diagnostic Mode */ - /* Bit 2.. 0: reserved */ + /* Bit 2.. 0: reserved */ /***** PHY_BCOM_AUX_STAT 16 bit ro Auxiliary Status Reg *****/ #define PHY_B_AS_AN_C (1<<15) /* Bit 15: AutoNeg complete */ @@ -944,37 +949,36 @@ #define PHY_B_AS_ANAB_D (1<<12) /* Bit 12: AN Ability Detect */ #define PHY_B_AS_NPW (1<<11) /* Bit 11: AN Next Page Wait */ #define PHY_B_AS_AN_RES (7<<8) /* Bit 10..8: AN HDC */ -#define PHY_B_AS_PDF (1<<7) /* Bit 7: Parallel Detect. Fault*/ -#define PHY_B_AS_RF (1<<6) /* Bit 6: Remote Fault */ -#define PHY_B_AS_ANP_R (1<<5) /* Bit 5: AN Page Received */ -#define PHY_B_AS_LP_ANAB (1<<4) /* Bit 4: LP AN Ability */ -#define PHY_B_AS_LP_NPAB (1<<3) /* Bit 3: LP Next Page Ability */ -#define PHY_B_AS_LS (1<<2) /* Bit 2: Link Status */ -#define PHY_B_AS_PRR (1<<1) /* Bit 1: Pause Resolution-Rx */ -#define PHY_B_AS_PRT (1<<0) /* Bit 0: Pause Resolution-Tx */ +#define PHY_B_AS_PDF (1<<7) /* Bit 7: Parallel Detect. Fault*/ +#define PHY_B_AS_RF (1<<6) /* Bit 6: Remote Fault */ +#define PHY_B_AS_ANP_R (1<<5) /* Bit 5: AN Page Received */ +#define PHY_B_AS_LP_ANAB (1<<4) /* Bit 4: LP AN Ability */ +#define PHY_B_AS_LP_NPAB (1<<3) /* Bit 3: LP Next Page Ability */ +#define PHY_B_AS_LS (1<<2) /* Bit 2: Link Status */ +#define PHY_B_AS_PRR (1<<1) /* Bit 1: Pause Resolution-Rx */ +#define PHY_B_AS_PRT (1<<0) /* Bit 0: Pause Resolution-Tx */ /***** PHY_BCOM_INT_STAT 16 bit ro Interrupt Status Reg *****/ /***** PHY_BCOM_INT_MASK 16 bit r/w Interrupt Mask Reg *****/ - /* Bit 15: reserved */ + /* Bit 15: reserved */ #define PHY_B_IS_PSE (1<<14) /* Bit 14: Pair Swap Error */ #define PHY_B_IS_MDXI_SC (1<<13) /* Bit 13: MDIX Status Change */ #define PHY_B_IS_HCT (1<<12) /* Bit 12: counter above 32k */ -#define PHY_B_IS_LCT (1<<11) /* Bit 11: all counter below 128 */ +#define PHY_B_IS_LCT (1<<11) /* Bit 11: counter above 128 */ #define PHY_B_IS_AN_PR (1<<10) /* Bit 10: Page Received */ -#define PHY_B_IS_NO_HDCL (1<<9) /* Bit 9: No HCD Link */ -#define PHY_B_IS_NO_HDC (1<<8) /* Bit 8: No HCD */ -#define PHY_B_IS_NEG_USHDC (1<<7) /* Bit 7: Negotiated Unsup. HCD */ -#define PHY_B_IS_SCR_S_ER (1<<6) /* Bit 6: Scrambler Sync Error */ -#define PHY_B_IS_RRS_CHANGE (1<<5) /* Bit 5: Remote Rx Stat Change */ -#define PHY_B_IS_LRS_CHANGE (1<<4) /* Bit 4: Local Rx Stat Change */ -#define PHY_B_IS_DUP_CHANGE (1<<3) /* Bit 3: Duplex Mode Change */ -#define PHY_B_IS_LSP_CHANGE (1<<2) /* Bit 2: Link Speed Change */ -#define PHY_B_IS_LST_CHANGE (1<<1) /* Bit 1: Link Status Changed */ -#define PHY_B_IS_CRC_ER (1<<0) /* Bit 0: CRC Error */ +#define PHY_B_IS_NO_HDCL (1<<9) /* Bit 9: No HCD Link */ +#define PHY_B_IS_NO_HDC (1<<8) /* Bit 8: No HCD */ +#define PHY_B_IS_NEG_USHDC (1<<7) /* Bit 7: Negotiated Unsup. HCD */ +#define PHY_B_IS_SCR_S_ER (1<<6) /* Bit 6: Scrambler Sync Error */ +#define PHY_B_IS_RRS_CHANGE (1<<5) /* Bit 5: Remote Rx Stat Change */ +#define PHY_B_IS_LRS_CHANGE (1<<4) /* Bit 4: Local Rx Stat Change */ +#define PHY_B_IS_DUP_CHANGE (1<<3) /* Bit 3: Duplex Mode Change */ +#define PHY_B_IS_LSP_CHANGE (1<<2) /* Bit 2: Link Speed Change */ +#define PHY_B_IS_LST_CHANGE (1<<1) /* Bit 1: Link Status Changed */ +#define PHY_B_IS_CRC_ER (1<<0) /* Bit 0: CRC Error */ #define PHY_B_DEF_MSK (~(PHY_B_IS_AN_PR | PHY_B_IS_LST_CHANGE)) - /* * Pause Bits (PHY_B_AN_ASP and PHY_B_AN_PC) encoding */ @@ -1000,7 +1004,7 @@ #define PHY_L_1000C_RD (1<<10) /* Bit 10: Repeater/DTE */ #define PHY_L_1000C_AFD (1<<9) /* Bit 9: Advertise Full Duplex */ #define PHY_L_1000C_AHD (1<<8) /* Bit 8: Advertise Half Duplex */ - /* Bit 7..0: reserved */ + /* Bit 7..0: reserved */ /***** PHY_LONE_1000T_STAT 16 bit ro 1000Base-T Status Reg *****/ #define PHY_L_1000S_MSF (1<<15) /* Bit 15: Master/Slave Fault */ @@ -1009,7 +1013,7 @@ #define PHY_L_1000S_RRS (1<<12) /* Bit 12: Remote Receiver Status*/ #define PHY_L_1000S_LP_FD (1<<11) /* Bit 11: Link Partner can FD */ #define PHY_L_1000S_LP_HD (1<<10) /* Bit 10: Link Partner can HD */ - /* Bit 9..8: reserved */ + /* Bit 9..8: reserved */ #define PHY_B_1000S_IEC (255<<0)/* Bit 7..0: Idle Error Count */ /***** PHY_LONE_EXT_STAT 16 bit ro Extended Status Register *****/ @@ -1017,11 +1021,11 @@ #define PHY_L_ES_X_HD_CAP (1<<14) /* Bit 14: 1000Base-X HD capable */ #define PHY_L_ES_T_FD_CAP (1<<13) /* Bit 13: 1000Base-T FD capable */ #define PHY_L_ES_T_HD_CAP (1<<12) /* Bit 12: 1000Base-T HD capable */ - /* Bit 11..0: reserved */ + /* Bit 11..0: reserved */ /***** PHY_LONE_PORT_CFG 16 bit r/w Port Configuration Reg *****/ #define PHY_L_PC_REP_MODE (1<<15) /* Bit 15: Repeater Mode */ - /* Bit 14: reserved */ + /* Bit 14: reserved */ #define PHY_L_PC_TX_DIS (1<<13) /* Bit 13: Tx output Disabled */ #define PHY_L_PC_BY_SCR (1<<12) /* Bit 12: Bypass Scrambler */ #define PHY_L_PC_BY_45 (1<<11) /* Bit 11: Bypass 4B5B-Decoder */ @@ -1044,7 +1048,7 @@ #define PHY_L_QS_COL_STAT (1<<11) /* Bit 11: Collision */ #define PHY_L_QS_L_STAT (1<<10) /* Bit 10: Link is up */ #define PHY_L_QS_DUP_MOD (1<<9) /* Bit 9: Full/Half Duplex */ -#define PHY_L_QS_AN (1<<8) /* Bit 8: AutoNeg is On */ +#define PHY_L_QS_AN (1<<8) /* Bit 8: AutoNeg is On */ #define PHY_L_QS_AN_C (1<<7) /* Bit 7: AN is Complete */ #define PHY_L_QS_LLE (7<<4) /* Bit 6: Line Length Estim. */ #define PHY_L_QS_PAUSE (1<<3) /* Bit 3: LP advertised Pause */ @@ -1054,24 +1058,24 @@ /***** PHY_LONE_INT_ENAB 16 bit r/w Interrupt Enable Reg *****/ /***** PHY_LONE_INT_STAT 16 bit ro Interrupt Status Reg *****/ - /* Bit 15..14: reserved */ + /* Bit 15..14: reserved */ #define PHY_L_IS_AN_F (1<<13) /* Bit 13: Autoneg fault */ - /* Bit 12: not described */ + /* Bit 12: not described */ #define PHY_L_IS_CROSS (1<<11) /* Bit 11: Crossover used */ #define PHY_L_IS_POL (1<<10) /* Bit 10: Polarity correct. used*/ -#define PHY_L_IS_SS (1<<9) /* Bit 9: Smart Speed Downgrade*/ +#define PHY_L_IS_SS (1<<9) /* Bit 9: Smart Speed Downgrade*/ #define PHY_L_IS_CFULL (1<<8) /* Bit 8: Counter Full */ #define PHY_L_IS_AN_C (1<<7) /* Bit 7: AutoNeg Complete */ #define PHY_L_IS_SPEED (1<<6) /* Bit 6: Speed Changed */ #define PHY_L_IS_DUP (1<<5) /* Bit 5: Duplex Changed */ -#define PHY_L_IS_LS (1<<4) /* Bit 4: Link Status Changed */ +#define PHY_L_IS_LS (1<<4) /* Bit 4: Link Status Changed */ #define PHY_L_IS_ISOL (1<<3) /* Bit 3: Isolate Occured */ #define PHY_L_IS_MDINT (1<<2) /* Bit 2: (ro) STAT: MII Int Pending */ #define PHY_L_IS_INTEN (1<<1) /* Bit 1: ENAB: Enable IRQs */ #define PHY_L_IS_FORCE (1<<0) /* Bit 0: ENAB: Force Interrupt */ -#define PHY_L_DEF_MSK (PHY_L_IS_LS | PHY_L_IS_ISOL | \ - PHY_L_IS_INTEN) /* int. mask */ +/* int. mask */ +#define PHY_L_DEF_MSK (PHY_L_IS_LS | PHY_L_IS_ISOL | PHY_L_IS_INTEN) /***** PHY_LONE_LED_CFG 16 bit r/w LED Configuration Reg *****/ #define PHY_L_LC_LEDC (3<<14) /* Bit 15..14: Col/Blink/On/Off */ @@ -1086,12 +1090,12 @@ /***** PHY_LONE_PORT_CTRL 16 bit r/w Port Control Reg *****/ #define PHY_L_PC_TX_TCLK (1<<15) /* Bit 15: Enable TX_TCLK */ - /* Bit 14: reserved */ + /* Bit 14: reserved */ #define PHY_L_PC_ALT_NP (1<<13) /* Bit 14: Alternate Next Page */ #define PHY_L_PC_GMII_ALT (1<<12) /* Bit 13: Alternate GMII driver */ - /* Bit 11: reserved */ + /* Bit 11: reserved */ #define PHY_L_PC_TEN_CRS (1<<10) /* Bit 10: Extend CRS*/ - /* Bit 9..0: not described */ + /* Bit 9..0: not described */ /***** PHY_LONE_CIM 16 bit ro CIM Reg *****/ #define PHY_L_CIM_ISOL (255<<8)/* Bit 15..8: Isolate Count */ @@ -1118,7 +1122,7 @@ #define PHY_N_1000C_AFD (1<<9) /* Bit 9: Advertise Full Duplex */ #define PHY_N_1000C_AHD (1<<8) /* Bit 8: Advertise Half Duplex */ #define PHY_N_1000C_APC (1<<7) /* Bit 7: Asymetric Pause Cap. */ - /* Bit 6..0: reserved */ + /* Bit 6..0: reserved */ /***** PHY_NAT_1000T_STAT 16 bit ro 1000Base-T Status Reg *****/ #define PHY_N_1000S_MSF (1<<15) /* Bit 15: Master/Slave Fault */ @@ -1128,7 +1132,7 @@ #define PHY_N_1000S_LP_FD (1<<11) /* Bit 11: Link Partner can FD */ #define PHY_N_1000S_LP_HD (1<<10) /* Bit 10: Link Partner can HD */ #define PHY_N_1000C_LP_APC (1<<9) /* Bit 9: LP Asym. Pause Cap. */ - /* Bit 8: reserved */ + /* Bit 8: reserved */ #define PHY_N_1000S_IEC (255<<0)/* Bit 7..0: Idle Error Count */ /***** PHY_NAT_EXT_STAT 16 bit ro Extended Status Register *****/ @@ -1136,7 +1140,7 @@ #define PHY_N_ES_X_HD_CAP (1<<14) /* Bit 14: 1000Base-X HD capable */ #define PHY_N_ES_T_FD_CAP (1<<13) /* Bit 13: 1000Base-T FD capable */ #define PHY_N_ES_T_HD_CAP (1<<12) /* Bit 12: 1000Base-T HD capable */ - /* Bit 11..0: reserved */ + /* Bit 11..0: reserved */ /* todo: those are still missing */ /***** PHY_NAT_EXT_CTRL1 16 bit ro Extended Control Reg1 *****/ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/skaddr.c linux.20p6/drivers/net/sk98lin/skaddr.c --- linux.vanilla/drivers/net/sk98lin/skaddr.c Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/skaddr.c Tue Jun 19 09:46:01 2001 @@ -2,16 +2,15 @@ * * Name: skaddr.c * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.34 $ - * Date: $Date: 1999/11/22 13:23:44 $ - * Purpose: Manage Addresses (Multicast and Unicast) and Promiscuous Mode + * Version: $Revision: 1.40 $ + * Date: $Date: 2001/02/14 14:04:59 $ + * Purpose: Manage Addresses (Multicast and Unicast) and Promiscuous Mode. * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2001 SysKonnect GmbH. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +26,25 @@ * History: * * $Log: skaddr.c,v $ + * Revision 1.40 2001/02/14 14:04:59 rassmann + * Editorial changes. + * + * Revision 1.39 2001/01/30 10:30:04 rassmann + * Editorial changes. + * + * Revision 1.38 2001/01/25 16:26:52 rassmann + * Ensured that logical address overrides are done on net's active port. + * + * Revision 1.37 2001/01/22 13:41:34 rassmann + * Supporting two nets on dual-port adapters. + * + * Revision 1.36 2000/08/07 11:10:39 rassmann + * Editorial changes. + * + * Revision 1.35 2000/05/04 09:38:41 rassmann + * Editorial changes. + * Corrected multicast address hashing. + * * Revision 1.34 1999/11/22 13:23:44 cgoos * Changed license header to GPL. * @@ -165,13 +183,13 @@ #ifndef lint static const char SysKonnectFileId[] = - "@(#) $Id: skaddr.c,v 1.34 1999/11/22 13:23:44 cgoos Exp $ (C) SysKonnect."; + "@(#) $Id: skaddr.c,v 1.40 2001/02/14 14:04:59 rassmann Exp $ (C) SysKonnect."; #endif /* !defined(lint) */ #define __SKADDR_C #ifdef __cplusplus -xxxx /* not supported yet - force error */ +#error C++ is not yet supported. extern "C" { #endif /* cplusplus */ @@ -180,19 +198,9 @@ /* defines ********************************************************************/ -#define SK_ADDR_CHEAT YES /* Cheat. */ - -/* - * G32: - * POLY equ 04C11DB6h ; CRC polynominal term - * bit-reversed: 6DB88320 - */ #define CRC32_POLY 0xEDB88320UL /* CRC32-Poly - XMAC: Little Endian */ -#if 0 -#define CRC32_POLY 0x6DB88320UL /* CRC32-Poly - XMAC: Little Endian */ -#endif /* 0 */ -#define HASH_BITS 6 /* #bits in hash */ +#define HASH_BITS 6 /* #bits in hash */ #define SK_MC_BIT 0x01 /* Error numbers and messages. */ @@ -220,13 +228,6 @@ /* functions ******************************************************************/ -#if 0 -void SkAddrDummy(void) -{ - SkAddrInit(NULL, NULL, 0); -} /* SkAddrDummy */ -#endif /* 0 */ - /****************************************************************************** * * SkAddrInit - initialize data, set state to init @@ -237,7 +238,7 @@ * ============ * * This routine clears the multicast tables and resets promiscuous mode. - * Some entries are reserved for the "logical board address", the + * Some entries are reserved for the "logical MAC address", the * SK-RLMT multicast address, and the BPDU multicast address. * * @@ -264,12 +265,12 @@ int SkAddrInit( SK_AC *pAC, /* the adapter context */ SK_IOC IoC, /* I/O context */ -int Level) /* initialization level */ +int Level) /* initialization level */ { - int j; - SK_U32 i; - SK_U8 *InAddr; - SK_U16 *OutAddr; + int j; + SK_U32 i; + SK_U8 *InAddr; + SK_U16 *OutAddr; SK_ADDR_PORT *pAPort; switch (Level) { @@ -280,20 +281,15 @@ pAPort = &pAC->Addr.Port[i]; pAPort->PromMode = SK_PROM_MODE_NONE; - pAPort->FirstExactMatchRlmt = - SK_ADDR_FIRST_MATCH_RLMT; - pAPort->FirstExactMatchDrv = - SK_ADDR_FIRST_MATCH_DRV; - pAPort->NextExactMatchRlmt = - SK_ADDR_FIRST_MATCH_RLMT; - pAPort->NextExactMatchDrv = - SK_ADDR_FIRST_MATCH_DRV; + pAPort->FirstExactMatchRlmt = SK_ADDR_FIRST_MATCH_RLMT; + pAPort->FirstExactMatchDrv = SK_ADDR_FIRST_MATCH_DRV; + pAPort->NextExactMatchRlmt = SK_ADDR_FIRST_MATCH_RLMT; + pAPort->NextExactMatchDrv = SK_ADDR_FIRST_MATCH_DRV; #if 0 - /* Not here ... */ + /* Don't do this here ... */ /* Reset Promiscuous mode. */ - (void)SkAddrPromiscuousChange( pAC, IoC, @@ -315,7 +311,9 @@ break; case SK_INIT_IO: - pAC->Addr.ActivePort = pAC->Rlmt.MacActive; + for (i = 0; i < SK_MAX_NETS; i++) { + pAC->Addr.Net[i].ActivePort = pAC->Rlmt.Net[i].ActivePort; + } #ifdef DEBUG for (i = 0; i < SK_MAX_MACS; i++) { @@ -326,28 +324,35 @@ } #endif /* DEBUG */ - /* Read permanent virtual address from Control Register File. */ - + /* Read permanent logical MAC address from Control Register File. */ for (j = 0; j < SK_MAC_ADDR_LEN; j++) { - InAddr = (SK_U8 *)&pAC->Addr.PermanentMacAddress.a[j]; + InAddr = (SK_U8 *)&pAC->Addr.Net[0].PermanentMacAddress.a[j]; SK_IN8(IoC, B2_MAC_1 + j, InAddr); } - if (!pAC->Addr.CurrentMacAddressSet) { - /* - * Set the current virtual MAC address - * to the permanent one. - */ - - pAC->Addr.CurrentMacAddress = - pAC->Addr.PermanentMacAddress; - pAC->Addr.CurrentMacAddressSet = SK_TRUE; + if (!pAC->Addr.Net[0].CurrentMacAddressSet) { + /* Set the current logical MAC address to the permanent one. */ + pAC->Addr.Net[0].CurrentMacAddress = + pAC->Addr.Net[0].PermanentMacAddress; + pAC->Addr.Net[0].CurrentMacAddressSet = SK_TRUE; + } + + /* Set the current logical MAC address. */ + pAC->Addr.Port[pAC->Addr.Net[0].ActivePort].Exact[0] = + pAC->Addr.Net[0].CurrentMacAddress; + +#if SK_MAX_NETS > 1 + /* Set logical MAC address for net 2 to (log | 3). */ + if (!pAC->Addr.Net[1].CurrentMacAddressSet) { + pAC->Addr.Net[1].PermanentMacAddress = + pAC->Addr.Net[0].PermanentMacAddress; + pAC->Addr.Net[1].PermanentMacAddress.a[5] |= 3; + /* Set the current logical MAC address to the permanent one. */ + pAC->Addr.Net[1].CurrentMacAddress = + pAC->Addr.Net[1].PermanentMacAddress; + pAC->Addr.Net[1].CurrentMacAddressSet = SK_TRUE; } - - /* Set the current virtual MAC address. */ - - pAC->Addr.Port[pAC->Addr.ActivePort].Exact[0] = - pAC->Addr.CurrentMacAddress; +#endif /* SK_MAX_NETS > 1 */ #ifdef xDEBUG SK_DBG_MSG( @@ -355,27 +360,27 @@ SK_DBGMOD_ADDR, SK_DBGCAT_INIT, ("Permanent MAC Address: %02X %02X %02X %02X %02X %02X\n", - pAC->Addr.PermanentMacAddress.a[0], - pAC->Addr.PermanentMacAddress.a[1], - pAC->Addr.PermanentMacAddress.a[2], - pAC->Addr.PermanentMacAddress.a[3], - pAC->Addr.PermanentMacAddress.a[4], - pAC->Addr.PermanentMacAddress.a[5])) + pAC->Addr.PermanentMacAddress.a[0], + pAC->Addr.PermanentMacAddress.a[1], + pAC->Addr.PermanentMacAddress.a[2], + pAC->Addr.PermanentMacAddress.a[3], + pAC->Addr.PermanentMacAddress.a[4], + pAC->Addr.PermanentMacAddress.a[5])) SK_DBG_MSG( pAC, SK_DBGMOD_ADDR, SK_DBGCAT_INIT, - ("Virtual MAC Address: %02X %02X %02X %02X %02X %02X\n", - pAC->Addr.CurrentMacAddress.a[0], - pAC->Addr.CurrentMacAddress.a[1], - pAC->Addr.CurrentMacAddress.a[2], - pAC->Addr.CurrentMacAddress.a[3], - pAC->Addr.CurrentMacAddress.a[4], - pAC->Addr.CurrentMacAddress.a[5])) + ("Logical MAC Address: %02X %02X %02X %02X %02X %02X\n", + pAC->Addr.CurrentMacAddress.a[0], + pAC->Addr.CurrentMacAddress.a[1], + pAC->Addr.CurrentMacAddress.a[2], + pAC->Addr.CurrentMacAddress.a[3], + pAC->Addr.CurrentMacAddress.a[4], + pAC->Addr.CurrentMacAddress.a[5])) #endif /* DEBUG */ #if 0 - /* Not here ... */ + /* Don't do this here ... */ (void)SkAddrMcUpdate(pAC, IoC, pAC->Addr.ActivePort); #endif /* 0 */ @@ -383,33 +388,23 @@ for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { pAPort = &pAC->Addr.Port[i]; - /* - * Read permanent port addresses from - * Control Register File. - */ - + /* Read permanent port addresses from Control Register File. */ for (j = 0; j < SK_MAC_ADDR_LEN; j++) { - InAddr = (SK_U8 *) - &pAPort->PermanentMacAddress.a[j]; + InAddr = (SK_U8 *)&pAPort->PermanentMacAddress.a[j]; SK_IN8(IoC, B2_MAC_2 + 8 * i + j, InAddr); } if (!pAPort->CurrentMacAddressSet) { /* - * Set the current and previous physical - * MAC address of this port to its permanent - * MAC address. + * Set the current and previous physical MAC address + * of this port to its permanent MAC address. */ - - pAPort->CurrentMacAddress = - pAPort->PermanentMacAddress; - pAPort->PreviousMacAddress = - pAPort->PermanentMacAddress; + pAPort->CurrentMacAddress = pAPort->PermanentMacAddress; + pAPort->PreviousMacAddress = pAPort->PermanentMacAddress; pAPort->CurrentMacAddressSet = SK_TRUE; } /* Set port's current MAC addresses. */ - OutAddr = (SK_U16 *)&pAPort->CurrentMacAddress.a[0]; XM_OUTADDR(IoC, i, XM_SA, OutAddr); @@ -484,45 +479,42 @@ int SkAddrMcClear( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* I/O context */ -SK_U32 PortIdx, /* Index of affected port */ -int Flags) /* permanent/non-perm, sw-only */ +SK_U32 PortNumber, /* Index of affected port */ +int Flags) /* permanent/non-perm, sw-only */ { int i; - if (PortIdx >= (SK_U32)pAC->GIni.GIMacsFound) { + if (PortNumber >= (SK_U32)pAC->GIni.GIMacsFound) { return (SK_ADDR_ILLEGAL_PORT); } if (Flags & SK_ADDR_PERMANENT) { /* Clear RLMT multicast addresses. */ - - pAC->Addr.Port[PortIdx].NextExactMatchRlmt = - SK_ADDR_FIRST_MATCH_RLMT; + pAC->Addr.Port[PortNumber].NextExactMatchRlmt = SK_ADDR_FIRST_MATCH_RLMT; } else { /* not permanent => DRV */ /* Clear InexactFilter. */ for (i = 0; i < 8; i++) { - pAC->Addr.Port[PortIdx].InexactFilter.Bytes[i] = 0; + pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] = 0; } /* Clear DRV multicast addresses. */ - pAC->Addr.Port[PortIdx].NextExactMatchDrv = - SK_ADDR_FIRST_MATCH_DRV; + pAC->Addr.Port[PortNumber].NextExactMatchDrv = SK_ADDR_FIRST_MATCH_DRV; } if (!(Flags & SK_MC_SW_ONLY)) { - (void)SkAddrMcUpdate(pAC, IoC, PortIdx); + (void)SkAddrMcUpdate(pAC, IoC, PortNumber); } return (SK_ADDR_SUCCESS); } /* SkAddrMcClear */ #ifndef SK_ADDR_CHEAT -// RA;:;: + /****************************************************************************** * * SkCrc32McHash - hash multicast address @@ -549,15 +541,13 @@ Crc = 0xFFFFFFFFUL; for (Idx = 0; Idx < SK_MAC_ADDR_LEN; Idx++) { - Data = *pMc++; + Data = *pMc++; for (Bit = 0; Bit < 8; Bit++, Data >>= 1) { - Crc = (Crc >> 1) ^ - (((Crc ^ Data) & 1) ? CRC32_POLY : 0); + Crc = (Crc >> 1) ^ (((Crc ^ Data) & 1) ? CRC32_POLY : 0); } } return (Crc & ((1 << HASH_BITS) - 1)); - } /* SkCrc32McHash */ #endif /* not SK_ADDR_CHEAT */ @@ -592,9 +582,9 @@ int SkAddrMcAdd( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* I/O context */ -SK_U32 PortIdx, /* Port Index */ +SK_U32 PortNumber, /* Port Number */ SK_MAC_ADDR *pMc, /* multicast address to be added */ -int Flags) /* permanent/non-permanent */ +int Flags) /* permanent/non-permanent */ { int i; SK_U8 Inexact; @@ -602,98 +592,87 @@ unsigned HashBit; #endif /* !defined(SK_ADDR_CHEAT) */ - if (PortIdx >= (SK_U32)pAC->GIni.GIMacsFound) { + if (PortNumber >= (SK_U32)pAC->GIni.GIMacsFound) { return (SK_ADDR_ILLEGAL_PORT); } if (Flags & SK_ADDR_PERMANENT) { #ifdef DEBUG - if (pAC->Addr.Port[PortIdx].NextExactMatchRlmt < + if (pAC->Addr.Port[PortNumber].NextExactMatchRlmt < SK_ADDR_FIRST_MATCH_RLMT) { - Next0[PortIdx] |= 1; + Next0[PortNumber] |= 1; return (SK_MC_RLMT_OVERFLOW); } #endif /* DEBUG */ - if (pAC->Addr.Port[PortIdx].NextExactMatchRlmt > + if (pAC->Addr.Port[PortNumber].NextExactMatchRlmt > SK_ADDR_LAST_MATCH_RLMT) { return (SK_MC_RLMT_OVERFLOW); } /* Set an RLMT multicast address. */ - pAC->Addr.Port[PortIdx].Exact[ - pAC->Addr.Port[PortIdx].NextExactMatchRlmt++] = *pMc; + pAC->Addr.Port[PortNumber].Exact[ + pAC->Addr.Port[PortNumber].NextExactMatchRlmt++] = *pMc; return (SK_MC_FILTERING_EXACT); } +#if 0 /* Not PERMANENT => DRV */ - - if (PortIdx != pAC->Addr.ActivePort) { - + if (PortNumber != pAC->Addr.ActivePort) { /* Only RLMT is allowed to do this. */ - return (SK_MC_ILLEGAL_PORT); } +#endif /* 0 */ #ifdef DEBUG - if (pAC->Addr.Port[PortIdx].NextExactMatchDrv < + if (pAC->Addr.Port[PortNumber].NextExactMatchDrv < SK_ADDR_FIRST_MATCH_DRV) { - Next0[PortIdx] |= 2; + Next0[PortNumber] |= 2; return (SK_MC_RLMT_OVERFLOW); } #endif /* DEBUG */ - if (pAC->Addr.Port[PortIdx].NextExactMatchDrv <= SK_ADDR_LAST_MATCH_DRV) { + if (pAC->Addr.Port[PortNumber].NextExactMatchDrv <= SK_ADDR_LAST_MATCH_DRV) { /* Set exact match entry. */ - - pAC->Addr.Port[PortIdx].Exact[ - pAC->Addr.Port[PortIdx].NextExactMatchDrv++] = *pMc; + pAC->Addr.Port[PortNumber].Exact[ + pAC->Addr.Port[PortNumber].NextExactMatchDrv++] = *pMc; /* Clear InexactFilter. */ - for (i = 0; i < 8; i++) { - pAC->Addr.Port[PortIdx - ].InexactFilter.Bytes[i] = 0; + pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] = 0; } } else { if (!(pMc->a[0] & SK_MC_BIT)) { - /* * Hashing only possible with * multicast addresses. */ - return (SK_MC_ILLEGAL_ADDRESS); } #ifndef SK_ADDR_CHEAT /* Compute hash value of address. */ -RA;:;: untested - HashBit = SkCrc32McHash(&pMc->a[0]); + HashBit = 63 - SkCrc32McHash(&pMc->a[0]); /* Add bit to InexactFilter. */ - - pAC->Addr.Port[PortIdx].InexactFilter.Bytes[HashBit / 8] |= + pAC->Addr.Port[PortNumber].InexactFilter.Bytes[HashBit / 8] |= 1 << (HashBit % 8); - #else /* SK_ADDR_CHEAT */ - /* Set all bits in InexactFilter. */ - for (i = 0; i < 8; i++) { - pAC->Addr.Port[PortIdx].InexactFilter.Bytes[i] = 0xFF; + pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i] = 0xFF; } #endif /* SK_ADDR_CHEAT */ } for (Inexact = 0, i = 0; i < 8; i++) { - Inexact |= pAC->Addr.Port[PortIdx].InexactFilter.Bytes[i]; + Inexact |= pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i]; } - if (Inexact == 0 && pAC->Addr.Port[PortIdx].PromMode == 0) { + if (Inexact == 0 && pAC->Addr.Port[PortNumber].PromMode == 0) { return (SK_MC_FILTERING_EXACT); } else { @@ -726,15 +705,15 @@ int SkAddrMcUpdate( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* I/O context */ -SK_U32 PortIdx) /* Port Index */ +SK_U32 PortNumber) /* Port Number */ { - SK_U32 i; - SK_U8 Inexact; - SK_U16 *OutAddr; - SK_U16 LoMode; /* Lower 16 bits of XMAC Mode Reg. */ + SK_U32 i; + SK_U8 Inexact; + SK_U16 *OutAddr; + SK_U16 LoMode; /* Lower 16 bits of XMAC Mode Reg. */ SK_ADDR_PORT *pAPort; - if (PortIdx >= (SK_U32)pAC->GIni.GIMacsFound) { + if (PortNumber >= (SK_U32)pAC->GIni.GIMacsFound) { return (SK_ADDR_ILLEGAL_PORT); } @@ -742,129 +721,102 @@ pAC, SK_DBGMOD_ADDR, SK_DBGCAT_CTRL, - ("SkAddrMcUpdate on Port %u.\n", PortIdx)) + ("SkAddrMcUpdate on Port %u.\n", PortNumber)) - pAPort = &pAC->Addr.Port[PortIdx]; + pAPort = &pAC->Addr.Port[PortNumber]; #ifdef DEBUG SK_DBG_MSG( pAC, SK_DBGMOD_ADDR, SK_DBGCAT_CTRL, - ("Next0 on Port %d: %d\n", PortIdx, Next0[PortIdx])) + ("Next0 on Port %d: %d\n", PortNumber, Next0[PortNumber])) #endif /* DEBUG */ - for (i = 0; /* Also program the virtual address. */ - i < pAPort->NextExactMatchRlmt; - i++) { - + /* Start with 0 to also program the logical MAC address. */ + for (i = 0; i < pAPort->NextExactMatchRlmt; i++) { /* Set exact match address i on HW. */ - OutAddr = (SK_U16 *)&pAPort->Exact[i].a[0]; - XM_OUTADDR(IoC, PortIdx, XM_EXM(i), OutAddr); + XM_OUTADDR(IoC, PortNumber, XM_EXM(i), OutAddr); } /* Clear other permanent exact match addresses on HW. */ - if (pAPort->NextExactMatchRlmt <= SK_ADDR_LAST_MATCH_RLMT) { SkXmClrExactAddr( pAC, IoC, - PortIdx, + PortNumber, pAPort->NextExactMatchRlmt, SK_ADDR_LAST_MATCH_RLMT); } - for (i = pAPort->FirstExactMatchDrv; - i < pAPort->NextExactMatchDrv; - i++) { - + for (i = pAPort->FirstExactMatchDrv; i < pAPort->NextExactMatchDrv; i++) { OutAddr = (SK_U16 *)&pAPort->Exact[i].a[0]; - XM_OUTADDR(IoC, PortIdx, XM_EXM(i), OutAddr); - + XM_OUTADDR(IoC, PortNumber, XM_EXM(i), OutAddr); } /* Clear other non-permanent exact match addresses on HW. */ - if (pAPort->NextExactMatchDrv <= SK_ADDR_LAST_MATCH_DRV) { SkXmClrExactAddr( pAC, IoC, - PortIdx, + PortNumber, pAPort->NextExactMatchDrv, SK_ADDR_LAST_MATCH_DRV); } - for (Inexact = 0xFF, i = 0; i < 8; i++) { - Inexact &= pAPort->InexactFilter.Bytes[i]; + for (Inexact = 0, i = 0; i < 8; i++) { + Inexact |= pAPort->InexactFilter.Bytes[i]; } - if (pAPort->PromMode & SK_PROM_MODE_ALL_MC) { + if (pAPort->PromMode & SK_PROM_MODE_ALL_MC) { /* Set all bits in 64-bit hash register. */ - - XM_OUTHASH(IoC, PortIdx, XM_HSM, &OnesHash); + XM_OUTHASH(IoC, PortNumber, XM_HSM, &OnesHash); /* Set bit 15 in mode register. */ - - XM_IN16(IoC, PortIdx, XM_MODE, &LoMode); + XM_IN16(IoC, PortNumber, XM_MODE, &LoMode); LoMode |= XM_MD_ENA_HSH; - XM_OUT16(IoC, PortIdx, XM_MODE, LoMode); + XM_OUT16(IoC, PortNumber, XM_MODE, LoMode); } - else if (Inexact != 0xFF) { - - /* Clear bit 15 in mode register. */ - - XM_IN16(IoC, PortIdx, XM_MODE, &LoMode); - LoMode &= ~XM_MD_ENA_HSH; - XM_OUT16(IoC, PortIdx, XM_MODE, LoMode); - } - else { + else if (Inexact != 0) { /* Set 64-bit hash register to InexactFilter. */ - - XM_OUTHASH( - IoC, - PortIdx, - XM_HSM, - &pAPort->InexactFilter.Bytes[0]); + XM_OUTHASH(IoC, PortNumber, XM_HSM, &pAPort->InexactFilter.Bytes[0]); /* Set bit 15 in mode register. */ - - XM_IN16(IoC, PortIdx, XM_MODE, &LoMode); + XM_IN16(IoC, PortNumber, XM_MODE, &LoMode); LoMode |= XM_MD_ENA_HSH; - XM_OUT16(IoC, PortIdx, XM_MODE, LoMode); + XM_OUT16(IoC, PortNumber, XM_MODE, LoMode); + } + else { + /* Clear bit 15 in mode register. */ + XM_IN16(IoC, PortNumber, XM_MODE, &LoMode); + LoMode &= ~XM_MD_ENA_HSH; + XM_OUT16(IoC, PortNumber, XM_MODE, LoMode); } if (pAPort->PromMode != SK_PROM_MODE_NONE) { - (void)SkAddrPromiscuousChange( - pAC, - IoC, - PortIdx, - pAPort->PromMode); + (void)SkAddrPromiscuousChange(pAC, IoC, PortNumber, pAPort->PromMode); } /* Set port's current MAC address. */ - OutAddr = (SK_U16 *)&pAPort->CurrentMacAddress.a[0]; - XM_OUTADDR(IoC, PortIdx, XM_SA, OutAddr); + XM_OUTADDR(IoC, PortNumber, XM_SA, OutAddr); -#ifdef DEBUG - for (i = 0; /* Also program the virtual address. */ - i < pAPort->NextExactMatchRlmt; - i++) { +#ifdef xDEBUG + for (i = 0; i < pAPort->NextExactMatchRlmt; i++) { SK_U8 InAddr8[6]; SK_U16 *InAddr; - /* Get exact match address i from port PortIdx. */ - + /* Get exact match address i from port PortNumber. */ InAddr = (SK_U16 *)&InAddr8[0]; - XM_INADDR(IoC, PortIdx, XM_EXM(i), InAddr); + XM_INADDR(IoC, PortNumber, XM_EXM(i), InAddr); SK_DBG_MSG( pAC, - SK_DBGMOD_RLMT, + SK_DBGMOD_ADDR, SK_DBGCAT_CTRL, ("MC address %d on Port %u: %02x %02x %02x %02x %02x %02x -- %02x %02x %02x %02x %02x %02x.\n", i, - PortIdx, + PortNumber, InAddr8[0], InAddr8[1], InAddr8[2], @@ -881,10 +833,6 @@ #endif /* DEBUG */ /* Determine return value. */ - - for (Inexact = 0, i = 0; i < 8; i++) { - Inexact |= pAPort->InexactFilter.Bytes[i]; - } if (Inexact == 0 && pAPort->PromMode == 0) { return (SK_MC_FILTERING_EXACT); } @@ -914,52 +862,70 @@ int SkAddrOverride( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* I/O context */ -SK_U32 PortIdx, /* Port Index */ +SK_U32 PortNumber, /* Port Number */ SK_MAC_ADDR *pNewAddr, /* new MAC address */ -int Flags) /* logical/physical address */ +int Flags) /* logical/physical MAC address */ { + SK_EVPARA Para; + SK_U32 NetNumber; SK_U32 i; SK_U16 *OutAddr; - SK_EVPARA Para; -#if 0 - SK_MAC_ADDR NewAddr; /* new MAC address */ - SK_U8 AddrBits; -#endif /* 0 */ - if (PortIdx >= (SK_U32)pAC->GIni.GIMacsFound) { + NetNumber = pAC->Rlmt.Port[PortNumber].Net->NetNumber; + + if (PortNumber >= (SK_U32)pAC->GIni.GIMacsFound) { return (SK_ADDR_ILLEGAL_PORT); } - if (pNewAddr->a[0] & SK_MC_BIT) { + if (pNewAddr != NULL && (pNewAddr->a[0] & SK_MC_BIT) != 0) { return (SK_ADDR_MULTICAST_ADDRESS); } -#if 0 -DANGEROUS! - if (Flags & SK_ADDR_PHYSICAL_ADDRESS) { /* Physical address. */ - if (!pAC->Addr.Port[PortIdx].CurrentMacAddressSet) { - pAC->Addr.Port[PortIdx].PreviousMacAddress = *pNewAddr; - pAC->Addr.Port[PortIdx].CurrentMacAddress = *pNewAddr; - pAC->Addr.Port[PortIdx].CurrentMacAddressSet = SK_TRUE; - return (SK_ADDR_SUCCESS); - } + if (!pAC->Addr.Net[NetNumber].CurrentMacAddressSet) { + return (SK_ADDR_TOO_EARLY); } - else { - if (!pAC->Addr.CurrentMacAddressSet) { - pAC->Addr.CurrentMacAddress = *pNewAddr; - pAC->Addr.CurrentMacAddressSet = SK_TRUE; - return (SK_ADDR_SUCCESS); + + if (Flags & SK_ADDR_SET_LOGICAL) { /* Activate logical MAC address. */ + /* Parameter *pNewAddr is ignored. */ + for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { + if (!pAC->Addr.Port[i].CurrentMacAddressSet) { + return (SK_ADDR_TOO_EARLY); + } } - } -DANGEROUS! -#endif /* 0 */ - if (!pAC->Addr.CurrentMacAddressSet) { - return (SK_ADDR_TOO_EARLY); + /* Set PortNumber to number of net's active port. */ + PortNumber = pAC->Rlmt.Net[NetNumber]. + Port[pAC->Addr.Net[NetNumber].ActivePort]->PortNumber; + + pAC->Addr.Port[PortNumber].Exact[0] = + pAC->Addr.Net[NetNumber].CurrentMacAddress; + + /* Write address to first exact match entry of active port. */ + (void)SkAddrMcUpdate(pAC, IoC, PortNumber); } + else if (Flags & SK_ADDR_CLEAR_LOGICAL) { + /* Deactivate logical MAC address. */ + /* Parameter *pNewAddr is ignored. */ + for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { + if (!pAC->Addr.Port[i].CurrentMacAddressSet) { + return (SK_ADDR_TOO_EARLY); + } + } - if (Flags & SK_ADDR_PHYSICAL_ADDRESS) { /* Physical address. */ - if (SK_ADDR_EQUAL(pNewAddr->a, pAC->Addr.CurrentMacAddress.a)) { + /* Set PortNumber to number of net's active port. */ + PortNumber = pAC->Rlmt.Net[NetNumber]. + Port[pAC->Addr.Net[NetNumber].ActivePort]->PortNumber; + + for (i = 0; i < SK_MAC_ADDR_LEN; i++ ) { + pAC->Addr.Port[PortNumber].Exact[0].a[i] = 0; + } + + /* Write address to first exact match entry of active port. */ + (void)SkAddrMcUpdate(pAC, IoC, PortNumber); + } + else if (Flags & SK_ADDR_PHYSICAL_ADDRESS) { /* Physical MAC address. */ + if (SK_ADDR_EQUAL(pNewAddr->a, + pAC->Addr.Net[NetNumber].CurrentMacAddress.a)) { return (SK_ADDR_DUPLICATE_ADDRESS); } @@ -968,10 +934,9 @@ return (SK_ADDR_TOO_EARLY); } - if (SK_ADDR_EQUAL( - pNewAddr->a, + if (SK_ADDR_EQUAL(pNewAddr->a, pAC->Addr.Port[i].CurrentMacAddress.a)) { - if (i == PortIdx) { + if (i == PortNumber) { return (SK_ADDR_SUCCESS); } else { @@ -980,22 +945,22 @@ } } - pAC->Addr.Port[PortIdx].PreviousMacAddress = - pAC->Addr.Port[PortIdx].CurrentMacAddress; - pAC->Addr.Port[PortIdx].CurrentMacAddress = *pNewAddr; + pAC->Addr.Port[PortNumber].PreviousMacAddress = + pAC->Addr.Port[PortNumber].CurrentMacAddress; + pAC->Addr.Port[PortNumber].CurrentMacAddress = *pNewAddr; /* Change port's address. */ - OutAddr = (SK_U16 *)pNewAddr; - XM_OUTADDR(IoC, PortIdx, XM_SA, OutAddr); + XM_OUTADDR(IoC, PortNumber, XM_SA, OutAddr); /* Report address change to RLMT. */ - - Para.Para32[0] = PortIdx; + Para.Para32[0] = PortNumber; + Para.Para32[0] = -1; SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_PORT_ADDR, Para); } - else { /* Logical Address. */ - if (SK_ADDR_EQUAL(pNewAddr->a, pAC->Addr.CurrentMacAddress.a)) { + else { /* Logical MAC address. */ + if (SK_ADDR_EQUAL(pNewAddr->a, + pAC->Addr.Net[NetNumber].CurrentMacAddress.a)) { return (SK_ADDR_SUCCESS); } @@ -1004,15 +969,18 @@ return (SK_ADDR_TOO_EARLY); } - if (SK_ADDR_EQUAL( - pNewAddr->a, + if (SK_ADDR_EQUAL(pNewAddr->a, pAC->Addr.Port[i].CurrentMacAddress.a)) { return (SK_ADDR_DUPLICATE_ADDRESS); } } - pAC->Addr.CurrentMacAddress = *pNewAddr; - pAC->Addr.Port[PortIdx].Exact[0] = *pNewAddr; + /* Set PortNumber to number of net's active port. */ + PortNumber = pAC->Rlmt.Net[NetNumber]. + Port[pAC->Addr.Net[NetNumber].ActivePort]->PortNumber; + + pAC->Addr.Net[NetNumber].CurrentMacAddress = *pNewAddr; + pAC->Addr.Port[PortNumber].Exact[0] = *pNewAddr; #ifdef DEBUG SK_DBG_MSG( @@ -1020,28 +988,27 @@ SK_DBGMOD_ADDR, SK_DBGCAT_CTRL, ("Permanent MAC Address: %02X %02X %02X %02X %02X %02X\n", - pAC->Addr.PermanentMacAddress.a[0], - pAC->Addr.PermanentMacAddress.a[1], - pAC->Addr.PermanentMacAddress.a[2], - pAC->Addr.PermanentMacAddress.a[3], - pAC->Addr.PermanentMacAddress.a[4], - pAC->Addr.PermanentMacAddress.a[5])) + pAC->Addr.Net[NetNumber].PermanentMacAddress.a[0], + pAC->Addr.Net[NetNumber].PermanentMacAddress.a[1], + pAC->Addr.Net[NetNumber].PermanentMacAddress.a[2], + pAC->Addr.Net[NetNumber].PermanentMacAddress.a[3], + pAC->Addr.Net[NetNumber].PermanentMacAddress.a[4], + pAC->Addr.Net[NetNumber].PermanentMacAddress.a[5])) SK_DBG_MSG( pAC, SK_DBGMOD_ADDR, SK_DBGCAT_CTRL, - ("New Virtual MAC Address: %02X %02X %02X %02X %02X %02X\n", - pAC->Addr.CurrentMacAddress.a[0], - pAC->Addr.CurrentMacAddress.a[1], - pAC->Addr.CurrentMacAddress.a[2], - pAC->Addr.CurrentMacAddress.a[3], - pAC->Addr.CurrentMacAddress.a[4], - pAC->Addr.CurrentMacAddress.a[5])) + ("New logical MAC Address: %02X %02X %02X %02X %02X %02X\n", + pAC->Addr.Net[NetNumber].CurrentMacAddress.a[0], + pAC->Addr.Net[NetNumber].CurrentMacAddress.a[1], + pAC->Addr.Net[NetNumber].CurrentMacAddress.a[2], + pAC->Addr.Net[NetNumber].CurrentMacAddress.a[3], + pAC->Addr.Net[NetNumber].CurrentMacAddress.a[4], + pAC->Addr.Net[NetNumber].CurrentMacAddress.a[5])) #endif /* DEBUG */ /* Write address to first exact match entry of active port. */ - - (void)SkAddrMcUpdate(pAC, IoC, PortIdx); + (void)SkAddrMcUpdate(pAC, IoC, PortNumber); } return (SK_ADDR_SUCCESS); @@ -1067,48 +1034,44 @@ * SK_ADDR_ILLEGAL_PORT */ int SkAddrPromiscuousChange( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* I/O context */ -SK_U32 PortIdx, /* port whose promiscuous mode changes */ -int NewPromMode) /* new promiscuous mode */ +SK_AC *pAC, /* adapter context */ +SK_IOC IoC, /* I/O context */ +SK_U32 PortNumber, /* port whose promiscuous mode changes */ +int NewPromMode) /* new promiscuous mode */ { - int i; + int i; SK_BOOL InexactModeBit; SK_U8 Inexact; SK_U8 HwInexact; SK_FILTER64 HwInexactFilter; SK_U16 LoMode; /* Lower 16 bits of XMAC Mode Register. */ - int CurPromMode = SK_PROM_MODE_NONE; + int CurPromMode = SK_PROM_MODE_NONE; - if (PortIdx >= (SK_U32)pAC->GIni.GIMacsFound) { + if (PortNumber >= (SK_U32)pAC->GIni.GIMacsFound) { return (SK_ADDR_ILLEGAL_PORT); } /* Read CurPromMode from Hardware. */ - - XM_IN16(IoC, PortIdx, XM_MODE, &LoMode); + XM_IN16(IoC, PortNumber, XM_MODE, &LoMode); if (LoMode & XM_MD_ENA_PROM) { CurPromMode |= SK_PROM_MODE_LLC; } for (Inexact = 0xFF, i = 0; i < 8; i++) { - Inexact &= pAC->Addr.Port[PortIdx].InexactFilter.Bytes[i]; + Inexact &= pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i]; } if (Inexact == 0xFF) { - CurPromMode |= (pAC->Addr.Port[PortIdx].PromMode & - SK_PROM_MODE_ALL_MC); + CurPromMode |= (pAC->Addr.Port[PortNumber].PromMode & SK_PROM_MODE_ALL_MC); } else { /* Read InexactModeBit (bit 15 in mode register). */ - - XM_IN16(IoC, PortIdx, XM_MODE, &LoMode); - - InexactModeBit = (LoMode & XM_MD_ENA_HSH) != 0; + XM_IN16(IoC, PortNumber, XM_MODE, &LoMode); + + InexactModeBit = (LoMode & XM_MD_ENA_HSH) != 0; /* Read 64-bit hash register from HW. */ - - XM_INHASH(IoC, PortIdx, XM_HSM, &HwInexactFilter.Bytes[0]); + XM_INHASH(IoC, PortNumber, XM_HSM, &HwInexactFilter.Bytes[0]); for (HwInexact = 0xFF, i = 0; i < 8; i++) { HwInexact &= HwInexactFilter.Bytes[i]; @@ -1119,7 +1082,7 @@ } } - pAC->Addr.Port[PortIdx].PromMode = NewPromMode; + pAC->Addr.Port[PortNumber].PromMode = NewPromMode; if (NewPromMode == CurPromMode) { return (SK_ADDR_SUCCESS); @@ -1127,76 +1090,65 @@ if ((NewPromMode & SK_PROM_MODE_ALL_MC) && !(CurPromMode & SK_PROM_MODE_ALL_MC)) { /* All MC. */ - /* Set all bits in 64-bit hash register. */ - - XM_OUTHASH(IoC, PortIdx, XM_HSM, &OnesHash); + XM_OUTHASH(IoC, PortNumber, XM_HSM, &OnesHash); /* Set bit 15 in mode register. */ - - XM_IN16(IoC, PortIdx, XM_MODE, &LoMode); + XM_IN16(IoC, PortNumber, XM_MODE, &LoMode); LoMode |= XM_MD_ENA_HSH; - XM_OUT16(IoC, PortIdx, XM_MODE, LoMode); + XM_OUT16(IoC, PortNumber, XM_MODE, LoMode); } else if ((CurPromMode & SK_PROM_MODE_ALL_MC) && !(NewPromMode & SK_PROM_MODE_ALL_MC)) { /* Norm MC. */ - for (Inexact = 0, i = 0; i < 8; i++) { - Inexact |= - pAC->Addr.Port[PortIdx].InexactFilter.Bytes[i]; + Inexact |= pAC->Addr.Port[PortNumber].InexactFilter.Bytes[i]; } if (Inexact == 0) { /* Clear bit 15 in mode register. */ - - XM_IN16(IoC, PortIdx, XM_MODE, &LoMode); + XM_IN16(IoC, PortNumber, XM_MODE, &LoMode); LoMode &= ~XM_MD_ENA_HSH; - XM_OUT16(IoC, PortIdx, XM_MODE, LoMode); + XM_OUT16(IoC, PortNumber, XM_MODE, LoMode); } else { /* Set 64-bit hash register to InexactFilter. */ - XM_OUTHASH( IoC, - PortIdx, + PortNumber, XM_HSM, - &pAC->Addr.Port[PortIdx - ].InexactFilter.Bytes[0]); + &pAC->Addr.Port[PortNumber].InexactFilter.Bytes[0]); /* Set bit 15 in mode register. */ - - XM_IN16(IoC, PortIdx, XM_MODE, &LoMode); + XM_IN16(IoC, PortNumber, XM_MODE, &LoMode); LoMode |= XM_MD_ENA_HSH; - XM_OUT16(IoC, PortIdx, XM_MODE, LoMode); + XM_OUT16(IoC, PortNumber, XM_MODE, LoMode); } } if ((NewPromMode & SK_PROM_MODE_LLC) && !(CurPromMode & SK_PROM_MODE_LLC)) { /* Prom. LLC */ - /* Set promiscuous bit in mode register. */ + XM_IN16(IoC, PortNumber, XM_MODE, &LoMode); - XM_IN16(IoC, PortIdx, XM_MODE, &LoMode); #if 0 /* Receive MAC frames. */ - LoMode |= XM_MD_RX_MCTRL; #endif /* 0 */ + LoMode |= XM_MD_ENA_PROM; - XM_OUT16(IoC, PortIdx, XM_MODE, LoMode); + XM_OUT16(IoC, PortNumber, XM_MODE, LoMode); } else if ((CurPromMode & SK_PROM_MODE_LLC) && !(NewPromMode & SK_PROM_MODE_LLC)) { /* Norm. LLC. */ - /* Clear promiscuous bit in mode register. */ + XM_IN16(IoC, PortNumber, XM_MODE, &LoMode); - XM_IN16(IoC, PortIdx, XM_MODE, &LoMode); #if 0 /* Don't receive MAC frames. */ - LoMode &= ~XM_MD_RX_MCTRL; #endif /* 0 */ + LoMode &= ~XM_MD_ENA_PROM; - XM_OUT16(IoC, PortIdx, XM_MODE, LoMode); + XM_OUT16(IoC, PortNumber, XM_MODE, LoMode); } return (SK_ADDR_SUCCESS); @@ -1219,21 +1171,25 @@ * SK_ADDR_ILLEGAL_PORT */ int SkAddrSwap( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* I/O context */ -SK_U32 FromPortIdx, /* Port1 Index */ -SK_U32 ToPortIdx) /* Port2 Index */ +SK_AC *pAC, /* adapter context */ +SK_IOC IoC, /* I/O context */ +SK_U32 FromPortNumber, /* Port1 Index */ +SK_U32 ToPortNumber) /* Port2 Index */ { - int i; + int i; SK_U8 Byte; SK_MAC_ADDR MacAddr; SK_U32 DWord; - if (FromPortIdx >= (SK_U32)pAC->GIni.GIMacsFound) { + if (FromPortNumber >= (SK_U32)pAC->GIni.GIMacsFound) { + return (SK_ADDR_ILLEGAL_PORT); + } + + if (ToPortNumber >= (SK_U32)pAC->GIni.GIMacsFound) { return (SK_ADDR_ILLEGAL_PORT); } - if (ToPortIdx >= (SK_U32)pAC->GIni.GIMacsFound) { + if (pAC->Rlmt.Port[FromPortNumber].Net != pAC->Rlmt.Port[ToPortNumber].Net) { return (SK_ADDR_ILLEGAL_PORT); } @@ -1250,48 +1206,56 @@ */ for (i = 0; i < SK_ADDR_EXACT_MATCHES; i++) { - MacAddr = pAC->Addr.Port[FromPortIdx].Exact[i]; - pAC->Addr.Port[FromPortIdx].Exact[i] = - pAC->Addr.Port[ToPortIdx].Exact[i]; - pAC->Addr.Port[ToPortIdx].Exact[i] = MacAddr; + MacAddr = pAC->Addr.Port[FromPortNumber].Exact[i]; + pAC->Addr.Port[FromPortNumber].Exact[i] = + pAC->Addr.Port[ToPortNumber].Exact[i]; + pAC->Addr.Port[ToPortNumber].Exact[i] = MacAddr; } for (i = 0; i < 8; i++) { - Byte = pAC->Addr.Port[FromPortIdx].InexactFilter.Bytes[i]; - pAC->Addr.Port[FromPortIdx].InexactFilter.Bytes[i] = - pAC->Addr.Port[ToPortIdx].InexactFilter.Bytes[i]; - pAC->Addr.Port[ToPortIdx].InexactFilter.Bytes[i] = Byte; - } - - i = pAC->Addr.Port[FromPortIdx].PromMode; - pAC->Addr.Port[FromPortIdx].PromMode = - pAC->Addr.Port[ToPortIdx].PromMode; - pAC->Addr.Port[ToPortIdx].PromMode = i; - - DWord = pAC->Addr.Port[FromPortIdx].FirstExactMatchRlmt; - pAC->Addr.Port[FromPortIdx].FirstExactMatchRlmt = - pAC->Addr.Port[ToPortIdx].FirstExactMatchRlmt; - pAC->Addr.Port[ToPortIdx].FirstExactMatchRlmt = DWord; - - DWord = pAC->Addr.Port[FromPortIdx].NextExactMatchRlmt; - pAC->Addr.Port[FromPortIdx].NextExactMatchRlmt = - pAC->Addr.Port[ToPortIdx].NextExactMatchRlmt; - pAC->Addr.Port[ToPortIdx].NextExactMatchRlmt = DWord; - - DWord = pAC->Addr.Port[FromPortIdx].FirstExactMatchDrv; - pAC->Addr.Port[FromPortIdx].FirstExactMatchDrv = - pAC->Addr.Port[ToPortIdx].FirstExactMatchDrv; - pAC->Addr.Port[ToPortIdx].FirstExactMatchDrv = DWord; - - DWord = pAC->Addr.Port[FromPortIdx].NextExactMatchDrv; - pAC->Addr.Port[FromPortIdx].NextExactMatchDrv = - pAC->Addr.Port[ToPortIdx].NextExactMatchDrv; - pAC->Addr.Port[ToPortIdx].NextExactMatchDrv = DWord; + Byte = pAC->Addr.Port[FromPortNumber].InexactFilter.Bytes[i]; + pAC->Addr.Port[FromPortNumber].InexactFilter.Bytes[i] = + pAC->Addr.Port[ToPortNumber].InexactFilter.Bytes[i]; + pAC->Addr.Port[ToPortNumber].InexactFilter.Bytes[i] = Byte; + } + + i = pAC->Addr.Port[FromPortNumber].PromMode; + pAC->Addr.Port[FromPortNumber].PromMode = pAC->Addr.Port[ToPortNumber].PromMode; + pAC->Addr.Port[ToPortNumber].PromMode = i; + + DWord = pAC->Addr.Port[FromPortNumber].FirstExactMatchRlmt; + pAC->Addr.Port[FromPortNumber].FirstExactMatchRlmt = + pAC->Addr.Port[ToPortNumber].FirstExactMatchRlmt; + pAC->Addr.Port[ToPortNumber].FirstExactMatchRlmt = DWord; + + DWord = pAC->Addr.Port[FromPortNumber].NextExactMatchRlmt; + pAC->Addr.Port[FromPortNumber].NextExactMatchRlmt = + pAC->Addr.Port[ToPortNumber].NextExactMatchRlmt; + pAC->Addr.Port[ToPortNumber].NextExactMatchRlmt = DWord; + + DWord = pAC->Addr.Port[FromPortNumber].FirstExactMatchDrv; + pAC->Addr.Port[FromPortNumber].FirstExactMatchDrv = + pAC->Addr.Port[ToPortNumber].FirstExactMatchDrv; + pAC->Addr.Port[ToPortNumber].FirstExactMatchDrv = DWord; + + DWord = pAC->Addr.Port[FromPortNumber].NextExactMatchDrv; + pAC->Addr.Port[FromPortNumber].NextExactMatchDrv = + pAC->Addr.Port[ToPortNumber].NextExactMatchDrv; + pAC->Addr.Port[ToPortNumber].NextExactMatchDrv = DWord; + + /* CAUTION: Solution works if only ports of one adapter are in use. */ + for (i = 0; (SK_U32)i < pAC->Rlmt.Net[pAC->Rlmt.Port[ToPortNumber]. + Net->NetNumber].NumPorts; i++) { + if (pAC->Rlmt.Net[pAC->Rlmt.Port[ToPortNumber].Net->NetNumber]. + Port[i]->PortNumber == ToPortNumber) { + pAC->Addr.Net[pAC->Rlmt.Port[ToPortNumber].Net->NetNumber]. + ActivePort = i; + /* 20001207 RA: Was "ToPortNumber;". */ - pAC->Addr.ActivePort = ToPortIdx; - - (void)SkAddrMcUpdate(pAC, IoC, FromPortIdx); - (void)SkAddrMcUpdate(pAC, IoC, ToPortIdx); + } + } + (void)SkAddrMcUpdate(pAC, IoC, FromPortNumber); + (void)SkAddrMcUpdate(pAC, IoC, ToPortNumber); return (SK_ADDR_SUCCESS); } /* SkAddrSwap */ @@ -1299,3 +1263,4 @@ #ifdef __cplusplus } #endif /* __cplusplus */ + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/skcsum.c linux.20p6/drivers/net/sk98lin/skcsum.c --- linux.vanilla/drivers/net/sk98lin/skcsum.c Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/skcsum.c Tue Jun 19 09:46:01 2001 @@ -2,16 +2,15 @@ * * Name: skcsum.c * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.6 $ - * Date: $Date: 2000/02/21 12:35:10 $ + * Version: $Revision: 1.8 $ + * Date: $Date: 2001/02/06 11:15:36 $ * Purpose: Store/verify Internet checksum in send/receive packets. * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2001 SysKonnect GmbH. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +26,13 @@ * History: * * $Log: skcsum.c,v $ + * Revision 1.8 2001/02/06 11:15:36 rassmann + * Supporting two nets on dual-port adapters. + * + * Revision 1.7 2000/06/29 13:17:05 rassmann + * Corrected reception of a packet with UDP checksum == 0 (which means there + * is no UDP checksum). + * * Revision 1.6 2000/02/21 12:35:10 cgoos * Fixed license header comment. * @@ -59,7 +65,7 @@ #ifndef lint static const char SysKonnectFileId[] = "@(#)" - "$Id: skcsum.c,v 1.6 2000/02/21 12:35:10 cgoos Exp $" + "$Id: skcsum.c,v 1.8 2001/02/06 11:15:36 rassmann Exp $" " (C) SysKonnect."; #endif /* !lint */ @@ -105,13 +111,13 @@ /* defines ********************************************************************/ /* The size of an Ethernet MAC header. */ -#define SKCS_ETHERNET_MAC_HEADER_SIZE (6+6+2) +#define SKCS_ETHERNET_MAC_HEADER_SIZE (6+6+2) /* The size of the used topology's MAC header. */ #define SKCS_MAC_HEADER_SIZE SKCS_ETHERNET_MAC_HEADER_SIZE /* The size of the IP header without any option fields. */ -#define SKCS_IP_HEADER_SIZE 20 +#define SKCS_IP_HEADER_SIZE 20 /* * Field offsets within the IP header. @@ -121,23 +127,31 @@ #define SKCS_OFS_IP_HEADER_VERSION_AND_LENGTH 0 /* "Total Length". */ -#define SKCS_OFS_IP_TOTAL_LENGTH 2 +#define SKCS_OFS_IP_TOTAL_LENGTH 2 /* "Flags" "Fragment Offset". */ #define SKCS_OFS_IP_FLAGS_AND_FRAGMENT_OFFSET 6 /* "Next Level Protocol" identifier. */ -#define SKCS_OFS_IP_NEXT_LEVEL_PROTOCOL 9 +#define SKCS_OFS_IP_NEXT_LEVEL_PROTOCOL 9 /* Source IP address. */ -#define SKCS_OFS_IP_SOURCE_ADDRESS 12 +#define SKCS_OFS_IP_SOURCE_ADDRESS 12 /* Destination IP address. */ -#define SKCS_OFS_IP_DESTINATION_ADDRESS 16 +#define SKCS_OFS_IP_DESTINATION_ADDRESS 16 + + +/* + * Field offsets within the UDP header. + */ + +/* UDP checksum. */ +#define SKCS_OFS_UDP_CHECKSUM 6 /* IP "Next Level Protocol" identifiers (see RFC 790). */ -#define SKCS_PROTO_ID_TCP 6 /* Transport Control Protocol */ -#define SKCS_PROTO_ID_UDP 17 /* User Datagram Protocol */ +#define SKCS_PROTO_ID_TCP 6 /* Transport Control Protocol */ +#define SKCS_PROTO_ID_UDP 17 /* User Datagram Protocol */ /* IP "Don't Fragment" bit. */ #define SKCS_IP_DONT_FRAGMENT SKCS_HTON16(0x4000) @@ -235,9 +249,10 @@ * of the TCP or UDP pseudo header is returned here. */ void SkCsGetSendInfo( -SK_AC *pAc, /* Adapter context struct. */ -void *pIpHeader, /* IP header. */ -SKCS_PACKET_INFO *pPacketInfo) /* Packet information struct. */ +SK_AC *pAc, /* Adapter context struct. */ +void *pIpHeader, /* IP header. */ +SKCS_PACKET_INFO *pPacketInfo, /* Packet information struct. */ +int NetNumber) /* Net number */ { /* Internet Header Version found in IP header. */ unsigned InternetHeaderVersion; @@ -279,7 +294,7 @@ ("Tx: Unknown Internet Header Version %u.\n", InternetHeaderVersion)); pPacketInfo->ProtocolFlags = 0; - pAc->Csum.ProtoStats[SKCS_PROTO_STATS_IP].TxUnableCts++; + pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].TxUnableCts++; return; } @@ -300,13 +315,13 @@ SK_DBG_MSG(pAc, SK_DBGMOD_CSUM, SK_DBGCAT_ERR | SK_DBGCAT_TX, ("Tx: Invalid IP Header Length %u.\n", IpHeaderLength)); pPacketInfo->ProtocolFlags = 0; - pAc->Csum.ProtoStats[SKCS_PROTO_STATS_IP].TxUnableCts++; + pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].TxUnableCts++; return; } /* This is an IPv4 frame with a header of valid length. */ - pAc->Csum.ProtoStats[SKCS_PROTO_STATS_IP].TxOkCts++; + pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].TxOkCts++; /* Check if we should calculate the IP header checksum. */ @@ -335,14 +350,14 @@ /* TCP/IP frame. */ ProtocolFlags &= SKCS_PROTO_TCP | SKCS_PROTO_IP; NextLevelProtoStats = - &pAc->Csum.ProtoStats[SKCS_PROTO_STATS_TCP]; + &pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_TCP]; } else if ((ProtocolFlags & SKCS_PROTO_UDP) != 0 && NextLevelProtocol == SKCS_PROTO_ID_UDP) { /* UDP/IP frame. */ ProtocolFlags &= SKCS_PROTO_UDP | SKCS_PROTO_IP; NextLevelProtoStats = - &pAc->Csum.ProtoStats[SKCS_PROTO_STATS_UDP]; + &pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_UDP]; } else { /* @@ -408,7 +423,8 @@ SKCS_OC_ADD(pPacketInfo->PseudoHeaderChecksum, PseudoHeaderChecksum, 0); NextLevelProtoStats->TxOkCts++; /* Success. */ -} +} /* SkCsGetSendInfo */ + /****************************************************************************** * @@ -426,7 +442,8 @@ * pAc - Pointer to adapter context struct. * * pIpHeader - Pointer to IP header. Must be at least the length in bytes - * of the received IP header including any option fields. + * of the received IP header including any option fields. For UDP packets, + * 8 additional bytes are needed to access the UDP checksum. * * Note: The actual length of the IP header is stored in the lower four * bits of the first octet of the IP header as the number of 4-byte words, @@ -442,24 +459,27 @@ * Returns: * SKCS_STATUS_UNKNOWN_IP_VERSION - Not an IP v4 frame. * SKCS_STATUS_IP_CSUM_ERROR - IP checksum error. + * SKCS_STATUS_IP_CSUM_ERROR_TCP - IP checksum error in TCP frame. + * SKCS_STATUS_IP_CSUM_ERROR_UDP - IP checksum error in UDP frame * SKCS_STATUS_IP_FRAGMENT - IP fragment (IP checksum ok). * SKCS_STATUS_IP_CSUM_OK - IP checksum ok (not a TCP or UDP frame). * SKCS_STATUS_TCP_CSUM_ERROR - TCP checksum error (IP checksum ok). * SKCS_STATUS_UDP_CSUM_ERROR - UDP checksum error (IP checksum ok). * SKCS_STATUS_TCP_CSUM_OK - IP and TCP checksum ok. * SKCS_STATUS_UDP_CSUM_OK - IP and UDP checksum ok. + * SKCS_STATUS_IP_CSUM_OK_NO_UDP - IP checksum OK and no UDP checksum. * - * Note: The SKCS_STATUS_XXX values returned here are *not* defined by - * the CSUM module but must be defined in some header file by the module - * using CSUM. In this way, the calling module can assign return values - * for its own needs, e.g. by assigning bit flags to the individual - * protocols. + * Note: If SKCS_OVERWRITE_STATUS is defined, the SKCS_STATUS_XXX values + * returned here can be defined in some header file by the module using CSUM. + * In this way, the calling module can assign return values for its own needs, + * e.g. by assigning bit flags to the individual protocols. */ SKCS_STATUS SkCsGetReceiveInfo( SK_AC *pAc, /* Adapter context struct. */ void *pIpHeader, /* IP header. */ unsigned Checksum1, /* Hardware checksum 1. */ -unsigned Checksum2) /* Hardware checksum 2. */ +unsigned Checksum2, /* Hardware checksum 2. */ +int NetNumber) /* Net number */ { /* Internet Header Version found in IP header. */ unsigned InternetHeaderVersion; @@ -506,7 +526,7 @@ SK_DBG_MSG(pAc, SK_DBGMOD_CSUM, SK_DBGCAT_ERR | SK_DBGCAT_RX, ("Rx: Unknown Internet Header Version %u.\n", InternetHeaderVersion)); - pAc->Csum.ProtoStats[SKCS_PROTO_STATS_IP].RxUnableCts++; + pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].RxUnableCts++; return (SKCS_STATUS_UNKNOWN_IP_VERSION); } @@ -525,7 +545,7 @@ if (IpHeaderLength < 5*4) { SK_DBG_MSG(pAc, SK_DBGMOD_CSUM, SK_DBGCAT_ERR | SK_DBGCAT_RX, ("Rx: Invalid IP Header Length %u.\n", IpHeaderLength)); - pAc->Csum.ProtoStats[SKCS_PROTO_STATS_IP].RxErrCts++; + pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].RxErrCts++; return (SKCS_STATUS_IP_CSUM_ERROR); } @@ -555,18 +575,17 @@ /* Adjust the IP header and IP data checksums. */ - SKCS_OC_ADD(IpHeaderChecksum, - IpHeaderChecksum, IpOptionsChecksum); + SKCS_OC_ADD(IpHeaderChecksum, IpHeaderChecksum, IpOptionsChecksum); - SKCS_OC_SUB(IpDataChecksum, - IpDataChecksum, IpOptionsChecksum); + SKCS_OC_SUB(IpDataChecksum, IpDataChecksum, IpOptionsChecksum); } - /* Check if the IP header checksum is ok. */ /* - * NOTE: We must check the IP header checksum even if the caller does - * not want us to do so because we cannot do any further processing of - * the packet without a valid IP checksum. + * Check if the IP header checksum is ok. + * + * NOTE: We must check the IP header checksum even if the caller just wants + * us to check upper-layer checksums, because we cannot do any further + * processing of the packet without a valid IP checksum. */ /* Get the next level protocol identifier. */ @@ -575,7 +594,7 @@ SKCS_IDX(pIpHeader, SKCS_OFS_IP_NEXT_LEVEL_PROTOCOL); if (IpHeaderChecksum != 0xFFFF) { - pAc->Csum.ProtoStats[SKCS_PROTO_STATS_IP].RxErrCts++; + pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_IP].RxErrCts++; /* the NDIS tester wants to know the upper level protocol too */ if (NextLevelProtocol == SKCS_PROTO_ID_TCP) { return(SKCS_STATUS_IP_CSUM_ERROR_TCP); @@ -586,7 +605,6 @@ return (SKCS_STATUS_IP_CSUM_ERROR); } - /* * Check if this is a TCP or UDP frame and if we should calculate the * TCP/UDP pseudo header checksum. @@ -595,17 +613,17 @@ * frame. */ - if ((pAc->Csum.ReceiveFlags & SKCS_PROTO_TCP) != 0 && + if ((pAc->Csum.ReceiveFlags[NetNumber] & SKCS_PROTO_TCP) != 0 && NextLevelProtocol == SKCS_PROTO_ID_TCP) { /* TCP/IP frame. */ NextLevelProtoStats = - &pAc->Csum.ProtoStats[SKCS_PROTO_STATS_TCP]; + &pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_TCP]; } - else if ((pAc->Csum.ReceiveFlags & SKCS_PROTO_UDP) != 0 && + else if ((pAc->Csum.ReceiveFlags[NetNumber] & SKCS_PROTO_UDP) != 0 && NextLevelProtocol == SKCS_PROTO_ID_UDP) { /* UDP/IP frame. */ NextLevelProtoStats = - &pAc->Csum.ProtoStats[SKCS_PROTO_STATS_UDP]; + &pAc->Csum.ProtoStats[NetNumber][SKCS_PROTO_STATS_UDP]; } else { /* @@ -634,6 +652,24 @@ } /* + * 08-May-2000 ra + * + * From RFC 768 (UDP) + * If the computed checksum is zero, it is transmitted as all ones (the + * equivalent in one's complement arithmetic). An all zero transmitted + * checksum value means that the transmitter generated no checksum (for + * debugging or for higher level protocols that don't care). + */ + + if (NextLevelProtocol == SKCS_PROTO_ID_UDP && + *(SK_U16*)SKCS_IDX(pIpHeader, IpHeaderLength + 6) == 0x0000) { + + NextLevelProtoStats->RxOkCts++; + + return (SKCS_STATUS_IP_CSUM_OK_NO_UDP); + } + + /* * Calculate the TCP/UDP checksum. */ @@ -691,7 +727,8 @@ return (NextLevelProtocol == SKCS_PROTO_ID_TCP ? SKCS_STATUS_TCP_CSUM_ERROR : SKCS_STATUS_UDP_CSUM_ERROR); -} +} /* SkCsGetReceiveInfo */ + /****************************************************************************** * @@ -721,14 +758,15 @@ * Returns the two hardware checksum start offsets. */ void SkCsSetReceiveFlags( -SK_AC *pAc, /* Adapter context struct. */ +SK_AC *pAc, /* Adapter context struct. */ unsigned ReceiveFlags, /* New receive flags. */ unsigned *pChecksum1Offset, /* Offset for hardware checksum 1. */ -unsigned *pChecksum2Offset) /* Offset for hardware checksum 2. */ +unsigned *pChecksum2Offset, /* Offset for hardware checksum 2. */ +int NetNumber) { /* Save the receive flags. */ - pAc->Csum.ReceiveFlags = ReceiveFlags; + pAc->Csum.ReceiveFlags[NetNumber] = ReceiveFlags; /* First checksum start offset is the IP header. */ *pChecksum1Offset = SKCS_MAC_HEADER_SIZE; @@ -738,9 +776,10 @@ * if there are any IP header options in the actual packet. */ *pChecksum2Offset = SKCS_MAC_HEADER_SIZE + SKCS_IP_HEADER_SIZE; -} +} /* SkCsSetReceiveFlags */ #ifndef SkCsCalculateChecksum + /****************************************************************************** * * SkCsCalculateChecksum - calculate checksum for specified data @@ -802,7 +841,8 @@ /* Note: All bits beyond the 16-bit limit are now zero. */ return ((unsigned) Checksum); -} +} /* SkCsCalculateChecksum */ + #endif /* SkCsCalculateChecksum */ /****************************************************************************** @@ -838,29 +878,32 @@ SK_EVPARA Param) /* Event dependent parameter. */ { int ProtoIndex; + int NetNumber; switch (Event) { /* * Clear protocol statistics. * * Param - Protocol index, or -1 for all protocols. + * - Net number. */ case SK_CSUM_EVENT_CLEAR_PROTO_STATS: - ProtoIndex = (int) Param.Para32[0]; + ProtoIndex = (int)Param.Para32[0]; + NetNumber = (int)Param.Para32[1]; if (ProtoIndex < 0) { /* Clear for all protocols. */ - memset(&pAc->Csum.ProtoStats[0], 0, - sizeof(pAc->Csum.ProtoStats)); + memset(&pAc->Csum.ProtoStats[NetNumber][0], 0, + sizeof(pAc->Csum.ProtoStats[NetNumber])); } - else { /* Clear for individual protocol. */ - memset(&pAc->Csum.ProtoStats[ProtoIndex], 0, - sizeof(pAc->Csum.ProtoStats[ProtoIndex])); + else { /* Clear for individual protocol. */ + memset(&pAc->Csum.ProtoStats[NetNumber][ProtoIndex], 0, + sizeof(pAc->Csum.ProtoStats[NetNumber][ProtoIndex])); } break; default: break; } return (0); /* Success. */ -} +} /* SkCsEvent */ #endif /* SK_USE_CSUM */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/skge.c linux.20p6/drivers/net/sk98lin/skge.c --- linux.vanilla/drivers/net/sk98lin/skge.c Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/skge.c Tue Jun 19 09:46:04 2001 @@ -1,20 +1,22 @@ /****************************************************************************** * - * Name: skge.c + * Name: skge.c * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.29 $ - * Date: $Date: 2000/02/21 13:31:56 $ + * Version: $Revision: 1.37 $ + * Date: $Date: 2001/05/08 11:25:40 $ * Purpose: The main driver source module * ******************************************************************************/ + /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2001 SysKonnect GmbH. * * Driver for SysKonnect Gigabit Ethernet Server Adapters: * + * SK-9861 (single link 1000Base-SX, VF45 Volition Plug) + * SK-9862 (dual link 1000Base-SX, VF45 Volition Plug) * SK-9841 (single link 1000Base-LX) * SK-9842 (dual link 1000Base-LX) * SK-9843 (single link 1000Base-SX) @@ -25,6 +27,7 @@ * Created 10-Feb-1999, based on Linux' acenic.c, 3c59x.c and * SysKonnects GEnesis Solaris driver * Author: Christoph Goos (cgoos@syskonnect.de) + * Mirko Lindner (mlindner@syskonnect.de) * * Address all question to: linux@syskonnect.de * @@ -41,11 +44,40 @@ * ******************************************************************************/ + /****************************************************************************** * * History: * * $Log: skge.c,v $ + * Revision 1.37 2001/05/08 11:25:40 mlindner + * fix: removed VLAN error message + * + * Revision 1.36 2001/05/04 12:02:25 gklug + * fix: compilation bug + * + * Revision 1.35 2001/05/04 11:42:12 gklug + * fix: receive IRQ can now handle invalid frames correctly + * + * Revision 1.34 2001/05/04 11:13:49 gklug + * fix: do not free meassage if ring is full on entry. + * + * Revision 1.33 2001/03/20 12:26:08 mlindner + * Fix: Memory problem + * Fix: proc_unregister fixed + * + * Revision 1.32 2001/03/01 12:50:52 mlindner + * Fixed ring size + * + * Revision 1.31 2001/02/19 13:14:16 mlindner + * Changed PNMI parameter values + * Corrected ProcFs functionality + * + * Revision 1.30 2001/01/22 14:15:29 mlindner + * added ProcFs functionality + * Dual Net functionality integrated + * Rlmt networks added + * * Revision 1.29 2000/02/21 13:31:56 cgoos * Fixed "unused" warning for UltraSPARC change. * @@ -233,23 +265,16 @@ * ******************************************************************************/ -static const char SysKonnectFileId[] = "@(#)" __FILE__ " (C) SysKonnect."; -static const char SysKonnectBuildNumber[] = - "@(#)SK-BUILD: 3.04 (19991111) PL: 01"; +#include "h/skversion.h" #include +#include #include "h/skdrv1st.h" #include "h/skdrv2nd.h" /* defines ******************************************************************/ -#define BOOT_STRING "sk98lin: Network Device Driver v3.04\n" \ - "Copyright (C) 1999 SysKonnect" - -#define VER_STRING "3.04" - - /* for debuging on x86 only */ /* #define BREAKPOINT() asm(" int $3"); */ @@ -269,6 +294,7 @@ /* number of adapters that can be configured via command line params */ #define SK_MAX_CARD_PARAM 16 + /* * use those defines for a compile-in version of the driver instead * of command line parameters @@ -282,7 +308,8 @@ // #define ROLE_A {"Auto", } // #define ROLE_B {"Auto", } // #define PREF_PORT {"A", } -// #define RLMT_MODE {"CheckLink", } +// #define RLMT_MODE {"CheckLinkState", } + #define DEV_KFREE_SKB(skb) dev_kfree_skb(skb); @@ -314,14 +341,23 @@ static void FillRxRing(SK_AC*, RX_PORT*); static SK_BOOL FillRxDescriptor(SK_AC*, RX_PORT*); static void ReceiveIrq(SK_AC*, RX_PORT*); -static void ClearAndStartRx(SK_AC*, int); +void ClearAndStartRx(SK_AC*, int); static void ClearTxIrq(SK_AC*, int, int); static void ClearRxRing(SK_AC*, RX_PORT*); static void ClearTxRing(SK_AC*, TX_PORT*); static void SetQueueSizes(SK_AC *pAC); static int SkGeChangeMtu(struct device *dev, int new_mtu); static void PortReInitBmu(SK_AC*, int); -static int SkGeIocMib(SK_AC*, unsigned int, int); +static int SkGeIocMib(DEV_NET*, unsigned int, int); +static struct dentry *SkgeProcLookup(struct inode *dir, struct dentry *dentry); +static int SkgeProcFileOpen(struct inode *inode, struct file *file); +static int SkgeProcFileRelease(struct inode *inode, struct file *file); + +/*Extern */ +extern struct proc_dir_entry Our_Proc_Dir; +extern int proc_read(char *buffer, char **buffer_location, + off_t offset, int buffer_length, int *eof, void *data); + #ifdef DEBUG static void DumpMsg(struct sk_buff*, char*); static void DumpData(char*, int); @@ -331,13 +367,27 @@ /* global variables *********************************************************/ static const char *BootString = BOOT_STRING; -static struct device *root_dev = NULL; +struct device *root_dev = NULL; static int probed __initdata = 0; +struct inode_operations SkInodeOps; +static struct file_operations SkFileOps; /* with open/relase */ /* local variables **********************************************************/ static uintptr_t TxQueueAddr[SK_MAX_MACS][2] = {{0x680, 0x600},{0x780, 0x700}}; static uintptr_t RxQueueAddr[SK_MAX_MACS] = {0x400, 0x480}; + + +void proc_fill_inode(struct inode *inode, int fill) +{ + if (fill) + MOD_INC_USE_COUNT; + else + MOD_DEC_USE_COUNT; +} + + + /***************************************************************************** * * skge_probe - find all SK-98xx adapters @@ -353,11 +403,13 @@ */ __initfunc(int skge_probe (struct device *dev)) { -int boards_found = 0; -int version_disp = 0; -SK_AC *pAC; -struct pci_dev *pdev = NULL; -unsigned long base_address; +int boards_found = 0; +int DeviceFound = SK_FALSE; +SK_AC *pAC; +DEV_NET *pNet = NULL; +struct pci_dev *pdev = NULL; +unsigned long base_address; +struct proc_dir_entry *pProcFile; #ifdef __sparc_v9__ unsigned short tmp; #endif @@ -366,52 +418,76 @@ return -ENODEV; probed++; - /* display driver info */ - if (!version_disp) - { - /* set display flag to TRUE so that */ - /* we only display this string ONCE */ - version_disp = 1; - printk("%s\n", BootString); - } - if (!pci_present()) /* is PCI support present? */ return -ENODEV; while((pdev = pci_find_class(PCI_CLASS_NETWORK_ETHERNET << 8, pdev))) { dev = NULL; + pNet = NULL; if (pdev->vendor != PCI_VENDOR_ID_SYSKONNECT || pdev->device != PCI_DEVICE_ID_SYSKONNECT_GE) { continue; + } + + if ((dev = init_etherdev(dev, sizeof(DEV_NET))) == 0) { + printk(KERN_ERR "Unable to allocate etherdev " + "structure!\n"); + break; } - dev = init_etherdev(dev, sizeof(SK_AC)); - if (dev == NULL){ - printk(KERN_ERR "Unable to allocate etherdev " + if (dev->priv == NULL) + dev->priv = kmalloc(sizeof(DEV_NET), GFP_KERNEL); + + if (dev->priv == NULL) { + printk(KERN_ERR "Unable to allocate adapter " "structure!\n"); break; } - if (!dev->priv) - dev->priv = kmalloc(sizeof(SK_AC), GFP_KERNEL); - if (dev->priv == NULL){ + pNet = dev->priv; + pNet->pAC = kmalloc(sizeof(SK_AC), GFP_KERNEL); + if (pNet->pAC == NULL){ + kfree(dev->priv); printk(KERN_ERR "Unable to allocate adapter " "structure!\n"); break; } + if (!DeviceFound) { + /* set display flag to TRUE so that */ + /* we only display this string ONCE */ + printk("%s\n", BootString); + + DeviceFound = SK_TRUE; + + /*Create proc (directory)*/ + proc_register(proc_net, &Our_Proc_Dir); + + memcpy(&SkInodeOps, &proc_dir_inode_operations, + sizeof(struct inode_operations)); + SkInodeOps.lookup = &SkgeProcLookup; + SkInodeOps.default_file_ops = &SkFileOps; + + memcpy(&SkFileOps, proc_net_inode_operations.default_file_ops, + sizeof(struct file_operations)); + SkFileOps.open = &SkgeProcFileOpen; + SkFileOps.release = &SkgeProcFileRelease; + } - memset(dev->priv, 0, sizeof(SK_AC)); - - pAC = dev->priv; + memset(pNet->pAC, 0, sizeof(SK_AC)); + pAC = pNet->pAC; pAC->PciDev = *pdev; pAC->PciDevId = pdev->device; - pAC->dev = dev; + pAC->dev[0] = dev; + pAC->dev[1] = dev; sprintf(pAC->Name, "SysKonnect SK-98xx"); pAC->CheckQueue = SK_FALSE; + + pNet->Mtu = 1500; + pNet->Up = 0; dev->irq = pdev->irq; dev->open = &SkGeOpen; @@ -422,7 +498,16 @@ dev->set_mac_address = &SkGeSetMacAddr; dev->do_ioctl = &SkGeIoctl; dev->change_mtu = &SkGeChangeMtu; - + + pProcFile = create_proc_entry(dev->name, + S_IFREG | 0444, &Our_Proc_Dir); + pProcFile->ops = &SkInodeOps; + pProcFile->read_proc = proc_read; + pProcFile->write_proc = NULL; + pProcFile->nlink = 1; + pProcFile->size = sizeof(dev->name+1); + pProcFile->data = (void*)pProcFile; + /* * Dummy value. */ @@ -433,8 +518,9 @@ base_address = pdev->base_address[0]; base_address &= PCI_BASE_ADDRESS_MEM_MASK; + #ifdef __sparc_v9__ - /* SPARC machines do not initialize the chache line size */ + /* SPARC machines do not initialize the cache line size */ pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, 64); /* SPARC machines do not set "Memory write and invalidate" */ pci_read_config_word(pdev, PCI_COMMAND, &tmp); @@ -473,17 +559,76 @@ break; } pAC->Index = boards_found; - if (SkGeBoardInit(dev, pAC)) { FreeResources(dev); continue; } - memcpy((caddr_t) &dev->dev_addr, - (caddr_t) &pAC->Addr.CurrentMacAddress, 6); - + memcpy((caddr_t) &dev->dev_addr, + (caddr_t) &pAC->Addr.Net[0].CurrentMacAddress, 6); + + pNet->PortNr = 0; + pNet->NetNr = 0; + boards_found++; + /* More then one port found */ + if ((pAC->GIni.GIMacsFound == 2 ) && (pAC->RlmtNets == 2)) { + if ((dev = init_etherdev(NULL, sizeof(DEV_NET))) == 0) { + printk(KERN_ERR "Unable to allocate etherdev " + "structure!\n"); + break; + } + + if (dev->priv == NULL) + dev->priv = kmalloc(sizeof(DEV_NET), GFP_KERNEL); + + if (dev->priv == NULL) { + printk(KERN_ERR "Unable to allocate adapter " + "structure!\n"); + break; + } + + pAC->dev[1] = dev; + pNet = dev->priv; + pNet->PortNr = 1; + pNet->NetNr = 1; + pNet->pAC = pAC; + pNet->Mtu = 1500; + pNet->Up = 0; + + dev->open = &SkGeOpen; + dev->stop = &SkGeClose; + dev->hard_start_xmit = &SkGeXmit; + dev->get_stats = &SkGeStats; + dev->set_multicast_list = &SkGeSetRxMode; + dev->set_mac_address = &SkGeSetMacAddr; + dev->do_ioctl = &SkGeIoctl; + dev->change_mtu = &SkGeChangeMtu; + + + pProcFile = create_proc_entry(dev->name, + S_IFREG | 0444, &Our_Proc_Dir); + pProcFile->ops = &SkInodeOps; + pProcFile->read_proc = proc_read; + pProcFile->write_proc = NULL; + pProcFile->nlink = 1; + pProcFile->size = sizeof(dev->name); + pProcFile->data = (void*)pProcFile; + + memcpy((caddr_t) &dev->dev_addr, + (caddr_t) &pAC->Addr.Net[1].CurrentMacAddress, 6); + + printk("%s: %s\n", dev->name, pAC->DeviceStr); + printk(" PrefPort:B RlmtMode:Dual Check Link State\n"); + + SkCsSetReceiveFlags(pAC, + SKCS_PROTO_IP | SKCS_PROTO_TCP | SKCS_PROTO_UDP, + &pAC->CsOfs1, &pAC->CsOfs2, 1); + + } + + /* * This is bollocks, but we need to tell the net-init * code that it shall go for the next device. @@ -493,6 +638,9 @@ #endif } + + + /* * If we're at this point we're going through skge_probe() for * the first time. Return success (0) if we've initialized 1 @@ -524,10 +672,13 @@ static void FreeResources(struct device *dev) { SK_U32 AllocFlag; -SK_AC *pAC; + +DEV_NET *pNet; +SK_AC *pAC; if (dev->priv) { - pAC = (SK_AC*) dev->priv; + pNet = (DEV_NET*) dev->priv; + pAC = pNet->pAC; AllocFlag = pAC->AllocFlag; if (AllocFlag & SK_ALLOC_IRQ) { free_irq(dev->irq, dev); @@ -542,6 +693,24 @@ } /* FreeResources */ +static struct dentry *SkgeProcLookup(struct inode *dir, struct dentry *dentry) +{ + return NULL; +} + +static int SkgeProcFileOpen(struct inode *inode, struct file *file) +{ + MOD_INC_USE_COUNT; + return 0; +} + +static int SkgeProcFileRelease(struct inode *inode, struct file *file) +{ + MOD_DEC_USE_COUNT; + return 0; +} + + #ifdef MODULE @@ -630,7 +799,6 @@ static int debug = 0; /* not used */ static int options[SK_MAX_CARD_PARAM] = {0, }; /* not used */ - /***************************************************************************** * * init_module - module initialization function @@ -645,7 +813,6 @@ int init_module(void) { int cards; - root_dev = NULL; /* just to avoid warnings ... */ @@ -653,9 +820,6 @@ options[0] = 0; cards = skge_probe(NULL); - if (cards == 0) { - printk("No adapter found\n"); - } return cards ? 0 : -ENODEV; } /* init_module */ @@ -672,21 +836,29 @@ */ void cleanup_module(void) { -SK_AC *pAC; +DEV_NET *pNet; +SK_AC *pAC; struct device *next; unsigned long Flags; SK_EVPARA EvPara; while (root_dev) { - pAC = (SK_AC*)root_dev->priv; + pNet = (DEV_NET*) root_dev->priv; + pAC = pNet->pAC; next = pAC->Next; root_dev->tbusy = 1; SkGeYellowLED(pAC, pAC->IoBase, 0); + remove_proc_entry(pAC->dev[0]->name, &Our_Proc_Dir); if(pAC->BoardLevel == 2) { /* board is still alive */ spin_lock_irqsave(&pAC->SlowPathLock, Flags); + EvPara.Para32[0] = 0; + EvPara.Para32[1] = -1; + SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara); + EvPara.Para32[0] = 1; + EvPara.Para32[1] = -1; SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara); SkEventDispatcher(pAC, pAC->IoBase); /* disable interrupts */ @@ -696,25 +868,36 @@ pAC->BoardLevel = 0; /* We do NOT check here, if IRQ was pending, of course*/ } - + if(pAC->BoardLevel == 1) { /* board is still alive */ SkGeDeInit(pAC, pAC->IoBase); pAC->BoardLevel = 0; } - + + if ((pAC->GIni.GIMacsFound == 2) && pAC->RlmtNets == 2){ + remove_proc_entry(pAC->dev[1]->name, &Our_Proc_Dir); + unregister_netdev(pAC->dev[1]); + kfree(pAC->dev[1]); + } + FreeResources(root_dev); - + root_dev->get_stats = NULL; /* * otherwise unregister_netdev calls get_stats with * invalid IO ... :-( */ + unregister_netdev(root_dev); kfree(root_dev); - + kfree(pAC); root_dev = next; } + + /* clear proc-dir */ + proc_unregister(proc_net, Our_Proc_Dir.low_ino); + } #endif /* cleanup_module */ @@ -781,8 +964,6 @@ spin_unlock_irqrestore(&pAC->SlowPathLock, Flags); - GetConfiguration(pAC); - /* level 1 init common modules here (HW init) */ spin_lock_irqsave(&pAC->SlowPathLock, Flags); if (SkGeInit(pAC, pAC->IoBase, 1) != 0) { @@ -800,6 +981,12 @@ pAC->BoardLevel = 1; spin_unlock_irqrestore(&pAC->SlowPathLock, Flags); + GetConfiguration(pAC); + if (pAC->RlmtNets == 2) { + pAC->GIni.GIPortUsage = SK_MUL_LINK; + } + + if (pAC->GIni.GIMacsFound == 2) { Ret = request_irq(dev->irq, SkGeIsr, SA_SHIRQ, pAC->Name, dev); } else if (pAC->GIni.GIMacsFound == 1) { @@ -825,7 +1012,7 @@ SkCsSetReceiveFlags(pAC, SKCS_PROTO_IP | SKCS_PROTO_TCP | SKCS_PROTO_UDP, - &pAC->CsOfs1, &pAC->CsOfs2); + &pAC->CsOfs1, &pAC->CsOfs2, 0); pAC->CsOfs = (pAC->CsOfs2 << 16) | pAC->CsOfs1; BoardInitMem(pAC); @@ -838,13 +1025,15 @@ /* Print configuration settings */ printk(" PrefPort:%c RlmtMode:%s\n", - 'A' + pAC->Rlmt.PrefPort, - (pAC->RlmtMode==0) ? "ChkLink" : - ((pAC->RlmtMode==1) ? "ChkLink" : - ((pAC->RlmtMode==3) ? "ChkOth" : - ((pAC->RlmtMode==7) ? "ChkSeg" : "Error")))); + 'A' + pAC->Rlmt.Net[0].Port[pAC->Rlmt.Net[0].PrefPort]->PortNumber, + (pAC->RlmtMode==0) ? "Check Link State" : + ((pAC->RlmtMode==1) ? "Check Link State" : + ((pAC->RlmtMode==3) ? "Check Local Port" : + ((pAC->RlmtMode==7) ? "Check Segmentation" : + ((pAC->RlmtMode==17) ? "Dual Check Link State" :"Error"))))); - SkGeYellowLED(pAC, pAC->IoBase, 1); + SkGeYellowLED(pAC, pAC->IoBase, 1); + /* * Register the device here @@ -1028,8 +1217,7 @@ DescrSize = (((sizeof(TXD) - 1) / DESCR_ALIGN) + 1) * DESCR_ALIGN; DescrNum = TX_RING_SIZE / DescrSize; - } - else { + } else { DescrSize = (((sizeof(RXD) - 1) / DESCR_ALIGN) + 1) * DESCR_ALIGN; DescrNum = RX_RING_SIZE / DescrSize; @@ -1048,7 +1236,8 @@ pDescr->VNextRxd = VNextDescr & 0xffffffffULL; pDescr->pNextRxd = pNextDescr; pDescr->TcpSumStarts = pAC->CsOfs; - /* advance on step */ + + /* advance one step */ pPrevDescr = pDescr; pDescr = pNextDescr; pNextDescr = (RXD*) (((char*)pDescr) + DescrSize); @@ -1123,10 +1312,12 @@ static void SkGeIsr(int irq, void *dev_id, struct pt_regs *ptregs) { struct device *dev = (struct device *)dev_id; +DEV_NET *pNet; SK_AC *pAC; SK_U32 IntSrc; /* interrupts source register contents */ - pAC = (SK_AC*) dev->priv; + pNet = (DEV_NET*) dev->priv; + pAC = pNet->pAC; /* * Check and process if its our interrupt @@ -1149,21 +1340,21 @@ SK_DBGCAT_DRV_INT_SRC, ("EOF RX1 IRQ\n")); ReceiveIrq(pAC, &pAC->RxPort[0]); - SK_PNMI_CNT_RX_INTR(pAC); + SK_PNMI_CNT_RX_INTR(pAC, 0); } if (IntSrc & IRQ_EOF_RX2) { SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_INT_SRC, ("EOF RX2 IRQ\n")); ReceiveIrq(pAC, &pAC->RxPort[1]); - SK_PNMI_CNT_RX_INTR(pAC); + SK_PNMI_CNT_RX_INTR(pAC, 1); } #ifdef USE_TX_COMPLETE /* only if tx complete interrupt used */ if (IntSrc & IRQ_EOF_AS_TX1) { SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_INT_SRC, ("EOF AS TX1 IRQ\n")); - SK_PNMI_CNT_TX_INTR(pAC); + SK_PNMI_CNT_TX_INTR(pAC, 0); spin_lock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock); FreeTxDescriptors(pAC, &pAC->TxPort[0][TX_PRIO_LOW]); spin_unlock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock); @@ -1172,7 +1363,7 @@ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_INT_SRC, ("EOF AS TX2 IRQ\n")); - SK_PNMI_CNT_TX_INTR(pAC); + SK_PNMI_CNT_TX_INTR(pAC, 1); spin_lock(&pAC->TxPort[1][TX_PRIO_LOW].TxDesRingLock); FreeTxDescriptors(pAC, &pAC->TxPort[1][TX_PRIO_LOW]); spin_unlock(&pAC->TxPort[1][TX_PRIO_LOW].TxDesRingLock); @@ -1182,7 +1373,7 @@ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_INT_SRC, ("EOF SY TX1 IRQ\n")); - SK_PNMI_CNT_TX_INTR(pAC); + SK_PNMI_CNT_TX_INTR(pAC, 1); spin_lock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock); FreeTxDescriptors(pAC, 0, TX_PRIO_HIGH); spin_unlock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock); @@ -1192,7 +1383,7 @@ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_INT_SRC, ("EOF SY TX2 IRQ\n")); - SK_PNMI_CNT_TX_INTR(pAC); + SK_PNMI_CNT_TX_INTR(pAC, 1); spin_lock(&pAC->TxPort[1][TX_PRIO_HIGH].TxDesRingLock); FreeTxDescriptors(pAC, 1, TX_PRIO_HIGH); spin_unlock(&pAC->TxPort[1][TX_PRIO_HIGH].TxDesRingLock); @@ -1217,11 +1408,12 @@ if ((IntSrc & SPECIAL_IRQS) || pAC->CheckQueue) { SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_INT_SRC, - ("SPECIAL IRQ\n")); + ("SPECIAL IRQ DP-Cards => %x\n", IntSrc)); pAC->CheckQueue = SK_FALSE; spin_lock(&pAC->SlowPathLock); - if (IntSrc & SPECIAL_IRQS) + if (IntSrc & SPECIAL_IRQS) SkGeSirqIsr(pAC, pAC->IoBase, IntSrc); + SkEventDispatcher(pAC, pAC->IoBase); spin_unlock(&pAC->SlowPathLock); } @@ -1230,29 +1422,10 @@ * came in after handling the ring (OUTs may be delayed * in hardware buffers, but are through after IN) */ - ReceiveIrq(pAC, &pAC->RxPort[pAC->ActivePort]); -// ReceiveIrq(pAC, &pAC->RxPort[1]); +// ReceiveIrq(pAC, &pAC->RxPort[pAC->ActivePort]); + ReceiveIrq(pAC, &pAC->RxPort[0]); + ReceiveIrq(pAC, &pAC->RxPort[1]); -#if 0 -// #ifdef USE_TX_COMPLETE /* only if tx complete interrupt used */ - spin_lock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock); - FreeTxDescriptors(pAC, &pAC->TxPort[0][TX_PRIO_LOW]); - spin_unlock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock); - - spin_lock(&pAC->TxPort[1][TX_PRIO_LOW].TxDesRingLock); - FreeTxDescriptors(pAC, &pAC->TxPort[1][TX_PRIO_LOW]); - spin_unlock(&pAC->TxPort[1][TX_PRIO_LOW].TxDesRingLock); - -#if 0 /* only if sync. queues used */ - spin_lock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock); - FreeTxDescriptors(pAC, 0, TX_PRIO_HIGH); - spin_unlock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock); - - spin_lock(&pAC->TxPort[1][TX_PRIO_HIGH].TxDesRingLock); - FreeTxDescriptors(pAC, 1, TX_PRIO_HIGH); - spin_unlock(&pAC->TxPort[1][TX_PRIO_HIGH].TxDesRingLock); -#endif /* 0 */ -#endif /* USE_TX_COMPLETE */ /* IRQ is processed - Enable IRQs again*/ SK_OUT32(pAC->IoBase, B0_IMSK, IRQ_MASK); @@ -1277,10 +1450,12 @@ static void SkGeIsrOnePort(int irq, void *dev_id, struct pt_regs *ptregs) { struct device *dev = (struct device *)dev_id; +DEV_NET *pNet; SK_AC *pAC; SK_U32 IntSrc; /* interrupts source register contents */ - pAC = (SK_AC*) dev->priv; + pNet = (DEV_NET*) dev->priv; + pAC = pNet->pAC; /* * Check and process if its our interrupt @@ -1303,14 +1478,14 @@ SK_DBGCAT_DRV_INT_SRC, ("EOF RX1 IRQ\n")); ReceiveIrq(pAC, &pAC->RxPort[0]); - SK_PNMI_CNT_RX_INTR(pAC); + SK_PNMI_CNT_RX_INTR(pAC, 0); } #ifdef USE_TX_COMPLETE /* only if tx complete interrupt used */ if (IntSrc & IRQ_EOF_AS_TX1) { SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_INT_SRC, ("EOF AS TX1 IRQ\n")); - SK_PNMI_CNT_TX_INTR(pAC); + SK_PNMI_CNT_TX_INTR(pAC, 0); spin_lock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock); FreeTxDescriptors(pAC, &pAC->TxPort[0][TX_PRIO_LOW]); spin_unlock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock); @@ -1320,7 +1495,7 @@ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_INT_SRC, ("EOF SY TX1 IRQ\n")); - SK_PNMI_CNT_TX_INTR(pAC); + SK_PNMI_CNT_TX_INTR(pAC, 0); spin_lock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock); FreeTxDescriptors(pAC, 0, TX_PRIO_HIGH); spin_unlock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock); @@ -1341,11 +1516,12 @@ if ((IntSrc & SPECIAL_IRQS) || pAC->CheckQueue) { SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_INT_SRC, - ("SPECIAL IRQ\n")); + ("SPECIAL IRQ SP-Cards => %x\n", IntSrc)); pAC->CheckQueue = SK_FALSE; spin_lock(&pAC->SlowPathLock); - if (IntSrc & SPECIAL_IRQS) + if (IntSrc & SPECIAL_IRQS) SkGeSirqIsr(pAC, pAC->IoBase, IntSrc); + SkEventDispatcher(pAC, pAC->IoBase); spin_unlock(&pAC->SlowPathLock); } @@ -1356,20 +1532,6 @@ */ ReceiveIrq(pAC, &pAC->RxPort[0]); -#if 0 -// #ifdef USE_TX_COMPLETE /* only if tx complete interrupt used */ - spin_lock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock); - FreeTxDescriptors(pAC, &pAC->TxPort[0][TX_PRIO_LOW]); - spin_unlock(&pAC->TxPort[0][TX_PRIO_LOW].TxDesRingLock); - -#if 0 /* only if sync. queues used */ - spin_lock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock); - FreeTxDescriptors(pAC, 0, TX_PRIO_HIGH); - spin_unlock(&pAC->TxPort[0][TX_PRIO_HIGH].TxDesRingLock); - -#endif /* 0 */ -#endif /* USE_TX_COMPLETE */ - /* IRQ is processed - Enable IRQs again*/ SK_OUT32(pAC->IoBase, B0_IMSK, IRQ_MASK); @@ -1396,12 +1558,14 @@ static int SkGeOpen( struct device *dev) { -SK_AC *pAC; /* pointer to adapter context struct */ +DEV_NET *pNet; +SK_AC *pAC; unsigned int Flags; /* for spin lock */ int i; -SK_EVPARA EvPara; /* an event parameter union */ +SK_EVPARA EvPara; /* an event parameter union */ - pAC = (SK_AC*) dev->priv; + pNet = (DEV_NET*) dev->priv; + pAC = pNet->pAC; SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, ("SkGeOpen: pAC=0x%lX:\n", (unsigned long)pAC)); @@ -1409,7 +1573,7 @@ if (pAC->BoardLevel == 0) { /* level 1 init common modules here */ if (SkGeInit(pAC, pAC->IoBase, 1) != 0) { - printk("%s: HWInit(1) failed\n", pAC->dev->name); + printk("%s: HWInit(1) failed\n", pAC->dev[pNet->PortNr]->name); return (-1); } SkI2cInit (pAC, pAC->IoBase, 1); @@ -1420,26 +1584,30 @@ SkTimerInit (pAC, pAC->IoBase, 1); pAC->BoardLevel = 1; } - - /* level 2 init modules here */ - SkGeInit (pAC, pAC->IoBase, 2); - SkI2cInit (pAC, pAC->IoBase, 2); - SkEventInit (pAC, pAC->IoBase, 2); - SkPnmiInit (pAC, pAC->IoBase, 2); - SkAddrInit (pAC, pAC->IoBase, 2); - SkRlmtInit (pAC, pAC->IoBase, 2); - SkTimerInit (pAC, pAC->IoBase, 2); - pAC->BoardLevel = 2; + + if (pAC->BoardLevel != 2) { + /* level 2 init modules here */ + SkGeInit (pAC, pAC->IoBase, 2); + SkI2cInit (pAC, pAC->IoBase, 2); + SkEventInit (pAC, pAC->IoBase, 2); + SkPnmiInit (pAC, pAC->IoBase, 2); + SkAddrInit (pAC, pAC->IoBase, 2); + SkRlmtInit (pAC, pAC->IoBase, 2); + SkTimerInit (pAC, pAC->IoBase, 2); + pAC->BoardLevel = 2; + } for (i=0; iGIni.GIMacsFound; i++) { - // Enable transmit descriptor polling. + /* Enable transmit descriptor polling. */ SkGePollTxD(pAC, pAC->IoBase, i, SK_TRUE); FillRxRing(pAC, &pAC->RxPort[i]); + // Enable rx pad byte stripping + SkXmSetRxCmd(pAC, pAC->IoBase, i, SK_STRIP_PAD_ON); } SkGeYellowLED(pAC, pAC->IoBase, 1); #ifdef USE_INT_MOD -// moderate only TX complete interrupts (these are not time critical) +/* moderate only TX complete interrupts (these are not time critical) */ #define IRQ_MOD_MASK (IRQ_EOF_AS_TX1 | IRQ_EOF_AS_TX2) { unsigned long ModBase; @@ -1455,21 +1623,32 @@ SK_OUT32(pAC->IoBase, B0_HWE_IMSK, IRQ_HWE_MASK); spin_lock_irqsave(&pAC->SlowPathLock, Flags); - SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_START, EvPara); - if (pAC->RlmtMode != 0) { + + if ((pAC->RlmtMode != 0) && (pAC->MaxPorts == 0)) { + EvPara.Para32[0] = pAC->RlmtNets; + EvPara.Para32[1] = -1; + SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_SET_NETS, + EvPara); EvPara.Para32[0] = pAC->RlmtMode; + EvPara.Para32[1] = 0; SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_MODE_CHANGE, EvPara); } + + EvPara.Para32[0] = pNet->NetNr; + EvPara.Para32[1] = -1; + SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_START, EvPara); SkEventDispatcher(pAC, pAC->IoBase); spin_unlock_irqrestore(&pAC->SlowPathLock, Flags); + pAC->MaxPorts++; + pNet->Up = 1; dev->tbusy = 0; dev->interrupt = 0; dev->start = 1; MOD_INC_USE_COUNT; - + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, ("SkGeOpen suceeded\n")); @@ -1491,54 +1670,91 @@ static int SkGeClose( struct device *dev) { +DEV_NET *pNet; SK_AC *pAC; + unsigned int Flags; /* for spin lock */ int i; SK_EVPARA EvPara; +int PortIdx; dev->start = 0; set_bit(0, (void*)&dev->tbusy); - pAC = (SK_AC*) dev->priv; + pNet = (DEV_NET*) dev->priv; + pAC = pNet->pAC; SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, ("SkGeClose: pAC=0x%lX ", (unsigned long)pAC)); + if (pAC->RlmtNets == 1) { + PortIdx = pAC->ActivePort; + } + else { + PortIdx = pNet->NetNr; + } /* * Clear multicast table, promiscuous mode .... */ - SkAddrMcClear(pAC, pAC->IoBase, pAC->ActivePort, 0); - SkAddrPromiscuousChange(pAC, pAC->IoBase, pAC->ActivePort, + SkAddrMcClear(pAC, pAC->IoBase, PortIdx, 0); + SkAddrPromiscuousChange(pAC, pAC->IoBase, PortIdx, SK_PROM_MODE_NONE); + if (pAC->MaxPorts == 1) { + spin_lock_irqsave(&pAC->SlowPathLock, Flags); + /* disable interrupts */ + SK_OUT32(pAC->IoBase, B0_IMSK, 0); + EvPara.Para32[0] = pNet->NetNr; + EvPara.Para32[1] = -1; + SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara); + SkEventDispatcher(pAC, pAC->IoBase); + SK_OUT32(pAC->IoBase, B0_IMSK, 0); + /* stop the hardware */ + SkGeDeInit(pAC, pAC->IoBase); + pAC->BoardLevel = 0; + spin_unlock_irqrestore(&pAC->SlowPathLock, Flags); + } else { - spin_lock_irqsave(&pAC->SlowPathLock, Flags); - /* disable interrupts */ - SK_OUT32(pAC->IoBase, B0_IMSK, 0); - SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara); - SkEventDispatcher(pAC, pAC->IoBase); - SK_OUT32(pAC->IoBase, B0_IMSK, 0); - /* stop the hardware */ - SkGeDeInit(pAC, pAC->IoBase); - pAC->BoardLevel = 0; - - spin_unlock_irqrestore(&pAC->SlowPathLock, Flags); + spin_lock_irqsave(&pAC->SlowPathLock, Flags); + EvPara.Para32[0] = pNet->NetNr; + EvPara.Para32[1] = -1; + SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara); + SkEventDispatcher(pAC, pAC->IoBase); + spin_unlock_irqrestore(&pAC->SlowPathLock, Flags); + + /* Stop port */ + spin_lock_irqsave(&pAC->TxPort[pNet->PortNr] + [TX_PRIO_LOW].TxDesRingLock, Flags); + SkGeStopPort(pAC, pAC->IoBase, pNet->PortNr, + SK_STOP_ALL, SK_HARD_RST); + spin_unlock_irqrestore(&pAC->TxPort[pNet->PortNr] + [TX_PRIO_LOW].TxDesRingLock, Flags); + } - for (i=0; iGIni.GIMacsFound; i++) { + if (pAC->RlmtNets == 1) { /* clear all descriptor rings */ - ReceiveIrq(pAC, &pAC->RxPort[i]); - ClearRxRing(pAC, &pAC->RxPort[i]); - ClearTxRing(pAC, &pAC->TxPort[i][TX_PRIO_LOW]); + for (i=0; iGIni.GIMacsFound; i++) { + ReceiveIrq(pAC, &pAC->RxPort[i]); + ClearRxRing(pAC, &pAC->RxPort[i]); + ClearTxRing(pAC, &pAC->TxPort[i][TX_PRIO_LOW]); + } + } else { + /* clear port descriptor rings */ + ReceiveIrq(pAC, &pAC->RxPort[pNet->PortNr]); + ClearRxRing(pAC, &pAC->RxPort[pNet->PortNr]); + ClearTxRing(pAC, &pAC->TxPort[pNet->PortNr][TX_PRIO_LOW]); } - SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, - ("SkGeClose: done ")); + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY,("SkGeClose: done ")); + pAC->MaxPorts--; + pNet->Up = 0; MOD_DEC_USE_COUNT; return (0); } /* SkGeClose */ + /***************************************************************************** * * SkGeXmit - Linux frame transmit function @@ -1556,12 +1772,18 @@ */ static int SkGeXmit(struct sk_buff *skb, struct device *dev) { +DEV_NET *pNet; SK_AC *pAC; -int Rc; /* return code of XmitFrame */ - - pAC = (SK_AC*) dev->priv; +int Rc; /* return code of XmitFrame */ - Rc = XmitFrame(pAC, &pAC->TxPort[pAC->ActivePort][TX_PRIO_LOW], skb); + + pNet = (DEV_NET*) dev->priv; + pAC = pNet->pAC; + + if (pAC->RlmtNets == 2) + Rc = XmitFrame(pAC, &pAC->TxPort[pNet->PortNr][TX_PRIO_LOW], skb); + else + Rc = XmitFrame(pAC, &pAC->TxPort[pAC->ActivePort][TX_PRIO_LOW], skb); if (Rc <= 0) { /* transmitter out of resources */ @@ -1618,12 +1840,13 @@ FreeTxDescriptors(pAC, pTxPort); if (pTxPort->TxdRingFree == 0) { spin_unlock_irqrestore(&pTxPort->TxDesRingLock, Flags); - SK_PNMI_CNT_NO_TX_BUF(pAC); + SK_PNMI_CNT_NO_TX_BUF(pAC, pTxPort->PortIndex); SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_TX_PROGRESS, ("XmitFrame failed\n")); /* this message can not be sent now */ - DEV_KFREE_SKB(pMessage); + /* Because tbusy seems to be set, the message should not be freed here */ + /* It will be used by the scheduler of the ethernet handler */ return (-1); } } @@ -1701,9 +1924,11 @@ TXD *pTxd; /* pointer to the checked descriptor */ TXD *pNewTail; /* pointer to 'end' of the ring */ SK_U32 Control; /* TBControl field of descriptor */ +DEV_NET *pNet; pNewTail = pTxPort->pTxdRingTail; pTxd = pNewTail; + pNet = (DEV_NET*) pAC->dev[pTxPort->PortIndex]->priv; /* * loop forever; exits if TX_CTRL_SOFTWARE bit not set in start frame @@ -1719,20 +1944,21 @@ * freed ( -> ring completely free now). */ pTxPort->pTxdRingTail = pTxd; - pAC->dev->tbusy = 0; + pAC->dev[pTxPort->PortIndex]->tbusy = 0; return; } if (Control & TX_CTRL_OWN_BMU) { pTxPort->pTxdRingTail = pTxd; if (pTxPort->TxdRingFree > 0) { - pAC->dev->tbusy = 0; + pAC->dev[pTxPort->PortIndex]->tbusy = 0; } return; } - + DEV_KFREE_SKB(pTxd->pMBuf); /* free message */ + pTxPort->TxdRingFree++; - pTxd->TBControl &= ~TX_CTRL_SOFTWARE; + pTxd->TBControl = 0; /* reset TX_CTRL_SOFTWARE */ pTxd = pTxd->pNextTxd; /* point behind fragment with EOF */ } /* while(forever) */ } /* FreeTxDescriptors */ @@ -1796,8 +2022,8 @@ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, ("%s: Allocation of rx buffer failed !\n", - pAC->dev->name)); - SK_PNMI_CNT_NO_RX_BUF(pAC); + pAC->dev[pRxPort->PortIndex]->name)); + SK_PNMI_CNT_NO_RX_BUF(pAC, pRxPort->PortIndex); return(SK_FALSE); } skb_reserve(pMsgBlock, 2); /* to align IP frames */ @@ -1887,31 +2113,71 @@ rx_start: /* do forever; exit if RX_CTRL_OWN_BMU found */ - while (pRxPort->RxdRingFree < pAC->RxDescrPerRing) { - pRxd = pRxPort->pRxdRingHead; - + for ( pRxd = pRxPort->pRxdRingHead ; + pRxPort->RxdRingFree < pAC->RxDescrPerRing ; + pRxd = pRxd->pNextRxd, + pRxPort->pRxdRingHead = pRxd, + pRxPort->RxdRingFree ++) { + + /* + * For a better understanding of this loop + * Go through every descriptor beginning at the head + * Please note: the ring might be completely received so the OWN bit + * set is not a good crirteria to leave that loop. + * Therefore the RingFree counter is used. + * On entry of this loop pRxd is a pointer to the Rxd that needs + * to be checked next. + */ + Control = pRxd->RBControl; - + /* check if this descriptor is ready */ if ((Control & RX_CTRL_OWN_BMU) != 0) { /* this descriptor is not yet ready */ + /* This is the usual end of the loop */ + /* We don't need to start the ring again */ FillRxRing(pAC, pRxPort); return; } - + /* get length of frame and check it */ FrameLength = Control & RX_CTRL_LEN_MASK; - if (FrameLength > pAC->RxBufSize) + if (FrameLength > pAC->RxBufSize) { goto rx_failed; + } /* check for STF and EOF */ if ((Control & (RX_CTRL_STF | RX_CTRL_EOF)) != - (RX_CTRL_STF | RX_CTRL_EOF)) + (RX_CTRL_STF | RX_CTRL_EOF)) { goto rx_failed; + } /* here we have a complete frame in the ring */ pMsg = pRxd->pMBuf; + + FrameStat = pRxd->FrameStat; + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 0, + ("Received frame of length %d on port %d\n", + FrameLength, PortIndex)); + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 0, + ("Number of free rx descriptors: %d\n", + pRxPort->RxdRingFree)); +/*DumpMsg(pMsg, "Rx"); */ + if ((Control & RX_CTRL_STAT_VALID) != RX_CTRL_STAT_VALID || + (FrameStat & (XMR_FS_ANY_ERR | XMR_FS_2L_VLAN)) != 0) { + /* there is a receive error in this frame */ + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, + SK_DBGCAT_DRV_RX_PROGRESS, + ("skge: Error in received frame, dropped!\n" + "Control: %x\nRxStat: %x\n", + Control, FrameStat)); + ReQueueRxBuffer(pAC, pRxPort, pMsg, + pRxd->VDataHigh, pRxd->VDataLow); + + continue; + } + /* * if short frame then copy data to reduce memory waste */ @@ -1946,7 +2212,7 @@ if ((Csum1 & 0xfffe) && (Csum2 & 0xfffe)) { Result = SkCsGetReceiveInfo(pAC, &pMsg->data[14], - Csum1, Csum2); + Csum1, Csum2, pRxPort->PortIndex); if (Result == SKCS_STATUS_IP_FRAGMENT || Result == @@ -1962,119 +2228,85 @@ } /* IP frame */ } /* frame > SK_COPY_TRESHOLD */ - FrameStat = pRxd->FrameStat; - pRxd = pRxd->pNextRxd; - pRxPort->pRxdRingHead = pRxd; - pRxPort->RxdRingFree ++; - SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_RX_PROGRESS, - ("Received frame of length %d on port %d\n", - FrameLength, PortIndex)); - SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_RX_PROGRESS, - ("Number of free rx descriptors: %d\n", - pRxPort->RxdRingFree)); - - if ((Control & RX_CTRL_STAT_VALID) == RX_CTRL_STAT_VALID && - (FrameStat & - (XMR_FS_ANY_ERR | XMR_FS_1L_VLAN | XMR_FS_2L_VLAN)) - == 0) { - SK_DBG_MSG(NULL, SK_DBGMOD_DRV, - SK_DBGCAT_DRV_RX_PROGRESS,("V")); - ForRlmt = SK_RLMT_RX_PROTOCOL; - IsBc = (FrameStat & XMR_FS_BC)==XMR_FS_BC; - SK_RLMT_PRE_LOOKAHEAD(pAC, PortIndex, FrameLength, - IsBc, &Offset, &NumBytes); - if (NumBytes != 0) { - IsMc = (FrameStat & XMR_FS_MC)==XMR_FS_MC; - SK_RLMT_LOOKAHEAD(pAC, PortIndex, - &pMsg->data[Offset], - IsBc, IsMc, &ForRlmt); + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("V")); + ForRlmt = SK_RLMT_RX_PROTOCOL; + IsBc = (FrameStat & XMR_FS_BC)==XMR_FS_BC; + SK_RLMT_PRE_LOOKAHEAD(pAC, PortIndex, FrameLength, + IsBc, &Offset, &NumBytes); + if (NumBytes != 0) { + IsMc = (FrameStat & XMR_FS_MC)==XMR_FS_MC; + SK_RLMT_LOOKAHEAD(pAC, PortIndex, + &pMsg->data[Offset], + IsBc, IsMc, &ForRlmt); + } + if (ForRlmt == SK_RLMT_RX_PROTOCOL) { + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("W")); +/* send up only frames from active port */ + if ((PortIndex == pAC->ActivePort) || + (pAC->RlmtNets == 2)) { + /* frame for upper layer */ + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, 1,("U")); +#ifdef xDEBUG + DumpMsg(pMsg, "Rx"); +#endif + SK_PNMI_CNT_RX_OCTETS_DELIVERED(pAC, + FrameLength, pRxPort->PortIndex); + + pMsg->dev = pAC->dev[pRxPort->PortIndex]; + pMsg->protocol = eth_type_trans(pMsg, + pAC->dev[pRxPort->PortIndex]); + netif_rx(pMsg); + pAC->dev[pRxPort->PortIndex]->last_rx = jiffies; } - if (ForRlmt == SK_RLMT_RX_PROTOCOL) { - /* send up only frames from active port */ - if (PortIndex == pAC->ActivePort) { - /* frame for upper layer */ - SK_DBG_MSG(NULL, SK_DBGMOD_DRV, - SK_DBGCAT_DRV_RX_PROGRESS, - ("U")); -#ifdef DUMP_RX - DumpMsg(pMsg, "Rx"); -#endif - pMsg->dev = pAC->dev; - pMsg->protocol = eth_type_trans(pMsg, - pAC->dev); - SK_PNMI_CNT_RX_OCTETS_DELIVERED(pAC, - FrameLength); - netif_rx(pMsg); - pAC->dev->last_rx = jiffies; - } - else { - /* drop frame */ - SK_DBG_MSG(NULL, SK_DBGMOD_DRV, - SK_DBGCAT_DRV_RX_PROGRESS, - ("D")); - DEV_KFREE_SKB(pMsg); - } - } /* if not for rlmt */ else { - /* packet for rlmt */ + /* drop frame */ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, - SK_DBGCAT_DRV_RX_PROGRESS, ("R")); - pRlmtMbuf = SkDrvAllocRlmtMbuf(pAC, - pAC->IoBase, FrameLength); - if (pRlmtMbuf != NULL) { - pRlmtMbuf->pNext = NULL; - pRlmtMbuf->Length = FrameLength; - pRlmtMbuf->PortIdx = PortIndex; - EvPara.pParaPtr = pRlmtMbuf; - memcpy((char*)(pRlmtMbuf->pData), - (char*)(pMsg->data), - FrameLength); - SkEventQueue(pAC, SKGE_RLMT, - SK_RLMT_PACKET_RECEIVED, - EvPara); - pAC->CheckQueue = SK_TRUE; - SK_DBG_MSG(NULL, SK_DBGMOD_DRV, - SK_DBGCAT_DRV_RX_PROGRESS, - ("Q")); - } - if ((pAC->dev->flags & - (IFF_PROMISC | IFF_ALLMULTI)) != 0 || - (ForRlmt & SK_RLMT_RX_PROTOCOL) == - SK_RLMT_RX_PROTOCOL) { - pMsg->dev = pAC->dev; - pMsg->protocol = eth_type_trans(pMsg, - pAC->dev); - netif_rx(pMsg); - pAC->dev->last_rx = jiffies; - } - else { - DEV_KFREE_SKB(pMsg); - } - - } /* if packet for rlmt */ - } /* if valid frame */ + SK_DBGCAT_DRV_RX_PROGRESS, + ("D")); + DEV_KFREE_SKB(pMsg); + } + + } /* if not for rlmt */ else { - /* there is a receive error in this frame */ - if ((FrameStat & XMR_FS_1L_VLAN) != 0) { - printk("%s: Received frame" - " with VLAN Level 1 header, check" - " switch configuration\n", - pAC->dev->name); + /* packet for rlmt */ + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, + SK_DBGCAT_DRV_RX_PROGRESS, ("R")); + pRlmtMbuf = SkDrvAllocRlmtMbuf(pAC, + pAC->IoBase, FrameLength); + if (pRlmtMbuf != NULL) { + pRlmtMbuf->pNext = NULL; + pRlmtMbuf->Length = FrameLength; + pRlmtMbuf->PortIdx = PortIndex; + EvPara.pParaPtr = pRlmtMbuf; + memcpy((char*)(pRlmtMbuf->pData), + (char*)(pMsg->data), + FrameLength); + SkEventQueue(pAC, SKGE_RLMT, + SK_RLMT_PACKET_RECEIVED, + EvPara); + pAC->CheckQueue = SK_TRUE; + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, + SK_DBGCAT_DRV_RX_PROGRESS, + ("Q")); } - if ((FrameStat & XMR_FS_2L_VLAN) != 0) { - printk("%s: Received frame" - " with VLAN Level 2 header, check" - " switch configuration\n", - pAC->dev->name); + if ((pAC->dev[pRxPort->PortIndex]->flags & + (IFF_PROMISC | IFF_ALLMULTI)) != 0 || + (ForRlmt & SK_RLMT_RX_PROTOCOL) == + SK_RLMT_RX_PROTOCOL) { + pMsg->dev = pAC->dev[pRxPort->PortIndex]; + pMsg->protocol = eth_type_trans(pMsg, + pAC->dev[pRxPort->PortIndex]); + netif_rx(pMsg); + pAC->dev[pRxPort->PortIndex]->last_rx = jiffies; } - SK_DBG_MSG(NULL, SK_DBGMOD_DRV, - SK_DBGCAT_DRV_RX_PROGRESS, - ("skge: Error in received frame, dropped!\n" - "Control: %x\nRxStat: %x\n", - Control, FrameStat)); - DEV_KFREE_SKB(pMsg); - } - } /* while */ + else { + DEV_KFREE_SKB(pMsg); + } + + } /* if packet for rlmt */ + } /* for ... scanning the RXD ring */ + + /* RXD ring is empty -> fill and restart */ FillRxRing(pAC, pRxPort); /* do not start if called from Close */ if (pAC->BoardLevel > 0) { @@ -2106,7 +2338,7 @@ * Returns: N/A * none */ -static void ClearAndStartRx( +void ClearAndStartRx( SK_AC *pAC, /* pointer to the adapter context */ int PortIndex) /* index of the receive port (XMAC) */ { @@ -2227,6 +2459,7 @@ int RxRam; /* RAM used for the active port receive queue */ int i; /* loop counter */ +if (pAC->RlmtNets == 1) { StandbyRam = SK_RLMT_STANDBY_QRXSIZE + SK_RLMT_STANDBY_QXASIZE + SK_RLMT_STANDBY_QXSSIZE; RemainingRam = pAC->GIni.GIRamSize - @@ -2247,21 +2480,40 @@ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, ("queue sizes settings - rx:%d txA:%d txS:%d\n", pAC->RxQueueSize,pAC->TxAQueueSize, pAC->TxSQueueSize)); +} else { + RemainingRam = pAC->GIni.GIRamSize/pAC->GIni.GIMacsFound; + RxRam = (RemainingRam * 8 / 10) & ~7; + for (i=0; iGIni.GIMacsFound; i++) { + pAC->GIni.GP[i].PRxQSize = RxRam; + pAC->GIni.GP[i].PXSQSize = 0; + pAC->GIni.GP[i].PXAQSize = (RemainingRam - RxRam) & ~7; + } + pAC->RxQueueSize = RxRam; + pAC->TxSQueueSize = 0; + pAC->TxAQueueSize = (RemainingRam - RxRam) & ~7; +} for (i=0; iRxPort[i].RxFillLimit = pAC->RxDescrPerRing; } - for (i=0; iGIni.GIMacsFound; i++) { - pAC->RxPort[i].RxFillLimit = pAC->RxDescrPerRing - 100; + if (pAC->RlmtNets == 2) { + for (i=0; iGIni.GIMacsFound; i++) { + pAC->RxPort[i].RxFillLimit = 1; + } + } else { + for (i=0; iGIni.GIMacsFound; i++) { + pAC->RxPort[i].RxFillLimit = pAC->RxDescrPerRing - 100; + } + /* + * Do not set the Limit to 0, because this could cause + * wrap around with ReQueue'ed buffers (a buffer could + * be requeued in the same position, made accessable to + * the hardware, and the hardware could change its + * contents! + */ + pAC->RxPort[pAC->ActivePort].RxFillLimit = 1; } - /* - * Do not set the Limit to 0, because this could cause - * wrap around with ReQueue'ed buffers (a buffer could - * be requeued in the same position, made accessable to - * the hardware, and the hardware could change its - * contents! - */ - pAC->RxPort[pAC->ActivePort].RxFillLimit = 1; + #ifdef DEBUG for (i=0; iGIni.GIMacsFound; i++) { @@ -2289,19 +2541,31 @@ */ static int SkGeSetMacAddr(struct device *dev, void *p) { -SK_AC *pAC = (SK_AC*) dev->priv; + +DEV_NET *pNet = (DEV_NET*) dev->priv; +SK_AC *pAC = pNet->pAC; + struct sockaddr *addr = p; unsigned int Flags; +int PortIdx; SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, ("SkGeSetMacAddr starts now...\n")); if(dev->start) { return -EBUSY; } + + if (pAC->RlmtNets == 1) { + PortIdx = pAC->ActivePort; + } + else { + PortIdx = pNet->NetNr; + } + memcpy(dev->dev_addr, addr->sa_data,dev->addr_len); spin_lock_irqsave(&pAC->SlowPathLock, Flags); - SkAddrOverride(pAC, pAC->IoBase, pAC->ActivePort, + SkAddrOverride(pAC, pAC->IoBase, PortIdx, (SK_MAC_ADDR*)dev->dev_addr, SK_ADDR_VIRTUAL_ADDRESS); spin_unlock_irqrestore(&pAC->SlowPathLock, Flags); @@ -2325,37 +2589,49 @@ */ static void SkGeSetRxMode(struct device *dev) { -SK_AC *pAC; + +DEV_NET *pNet; +SK_AC *pAC; + struct dev_mc_list *pMcList; int i; unsigned int Flags; +int PortIdx; SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, ("SkGeSetRxMode starts now... ")); - pAC = (SK_AC*) dev->priv; + + pNet = (DEV_NET*) dev->priv; + pAC = pNet->pAC; + if (pAC->RlmtNets == 1) { + PortIdx = pAC->ActivePort; + } + else { + PortIdx = pNet->NetNr; + } spin_lock_irqsave(&pAC->SlowPathLock, Flags); if (dev->flags & IFF_PROMISC) { SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, ("PROMISCUOUS mode\n")); - SkAddrPromiscuousChange(pAC, pAC->IoBase, pAC->ActivePort, + SkAddrPromiscuousChange(pAC, pAC->IoBase, PortIdx, SK_PROM_MODE_LLC); } else if (dev->flags & IFF_ALLMULTI) { SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, ("ALLMULTI mode\n")); - SkAddrPromiscuousChange(pAC, pAC->IoBase, pAC->ActivePort, + SkAddrPromiscuousChange(pAC, pAC->IoBase, PortIdx, SK_PROM_MODE_ALL_MC); } else { - SkAddrPromiscuousChange(pAC, pAC->IoBase, pAC->ActivePort, + SkAddrPromiscuousChange(pAC, pAC->IoBase, PortIdx, SK_PROM_MODE_NONE); - SkAddrMcClear(pAC, pAC->IoBase, pAC->ActivePort, 0); + SkAddrMcClear(pAC, pAC->IoBase, PortIdx, 0); SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, ("Number of MC entries: %d ", dev->mc_count)); pMcList = dev->mc_list; for (i=0; imc_count; i++, pMcList = pMcList->next) { - SkAddrMcAdd(pAC, pAC->IoBase, pAC->ActivePort, + SkAddrMcAdd(pAC, pAC->IoBase, PortIdx, (SK_MAC_ADDR*)pMcList->dmi_addr, 0); SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_MCA, ("%02x:%02x:%02x:%02x:%02x:%02x\n", @@ -2366,8 +2642,7 @@ pMcList->dmi_addr[4], pMcList->dmi_addr[5])); } - SkAddrMcUpdate(pAC, pAC->IoBase, pAC->ActivePort); - + SkAddrMcUpdate(pAC, pAC->IoBase, PortIdx); } spin_unlock_irqrestore(&pAC->SlowPathLock, Flags); @@ -2390,6 +2665,8 @@ */ static int SkGeChangeMtu(struct device *dev, int NewMtu) { +DEV_NET *pNet; +DEV_NET *pOtherNet; SK_AC *pAC; unsigned int Flags; int i; @@ -2398,11 +2675,22 @@ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, ("SkGeChangeMtu starts now...\n")); - pAC = (SK_AC*) dev->priv; + pNet = (DEV_NET*) dev->priv; + pAC = pNet->pAC; + if ((NewMtu < 68) || (NewMtu > SK_JUMBO_MTU)) { return -EINVAL; } + pNet->Mtu = NewMtu; + pOtherNet = (DEV_NET*)pAC->dev[1 - pNet->NetNr]->priv; + if ((pOtherNet->Mtu > 1500) && (NewMtu <= 1500) && (pOtherNet->Up==1)) { + return(0); + } + + EvPara.Para32[0] = pNet->NetNr; + EvPara.Para32[1] = -1; + pAC->RxBufSize = NewMtu + 32; dev->mtu = NewMtu; @@ -2414,14 +2702,27 @@ /* disable interrupts */ SK_OUT32(pAC->IoBase, B0_IMSK, 0); spin_lock_irqsave(&pAC->SlowPathLock, Flags); - SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara); + + /* Found more than one port */ + if ((pAC->GIni.GIMacsFound == 2 ) && + (pAC->RlmtNets == 2)) { + /* Stop both ports */ + EvPara.Para32[0] = 0; + SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara); + EvPara.Para32[0] = 1; + SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara); + } else { + SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STOP, EvPara); + } + SkEventDispatcher(pAC, pAC->IoBase); for (i=0; iGIni.GIMacsFound; i++) { spin_lock_irqsave( &pAC->TxPort[i][TX_PRIO_LOW].TxDesRingLock, Flags); + pAC->dev[i]->tbusy = 1; } - pAC->dev->tbusy = 1; + /* * adjust number of rx buffers allocated @@ -2429,23 +2730,35 @@ if (NewMtu > 1500) { /* use less rx buffers */ for (i=0; iGIni.GIMacsFound; i++) { - if (i == pAC->ActivePort) - pAC->RxPort[i].RxFillLimit = - pAC->RxDescrPerRing - 100; - else - pAC->RxPort[i].RxFillLimit = - pAC->RxDescrPerRing - 10; - + /* Found more than one port */ + if ((pAC->GIni.GIMacsFound == 2 ) && + (pAC->RlmtNets == 2)) { + pAC->RxPort[i].RxFillLimit = + pAC->RxDescrPerRing - 100; + } else { + if (i == pAC->ActivePort) + pAC->RxPort[i].RxFillLimit = + pAC->RxDescrPerRing - 100; + else + pAC->RxPort[i].RxFillLimit = + pAC->RxDescrPerRing - 10; + } } } else { /* use normal anoumt of rx buffers */ for (i=0; iGIni.GIMacsFound; i++) { - if (i == pAC->ActivePort) - pAC->RxPort[i].RxFillLimit = 1; - else - pAC->RxPort[i].RxFillLimit = - pAC->RxDescrPerRing - 100; + /* Found more than one port */ + if ((pAC->GIni.GIMacsFound == 2 ) && + (pAC->RlmtNets == 2)) { + pAC->RxPort[i].RxFillLimit = 1; + } else { + if (i == pAC->ActivePort) + pAC->RxPort[i].RxFillLimit = 1; + else + pAC->RxPort[i].RxFillLimit = + pAC->RxDescrPerRing - 100; + } } } @@ -2455,7 +2768,7 @@ * enable/disable hardware support for long frames */ if (NewMtu > 1500) { - pAC->JumboActivated = SK_TRUE; // is never set back !!! + pAC->JumboActivated = SK_TRUE; /* is never set back !!! */ pAC->GIni.GIPortUsage = SK_JUMBO_LINK; for (i=0; iGIni.GIMacsFound; i++) { pAC->GIni.GP[i].PRxCmd = @@ -2463,10 +2776,14 @@ } } else { - pAC->GIni.GIPortUsage = SK_RED_LINK; + if ((pAC->GIni.GIMacsFound == 2 ) && + (pAC->RlmtNets == 2)) { + pAC->GIni.GIPortUsage = SK_MUL_LINK; + } else { + pAC->GIni.GIPortUsage = SK_RED_LINK; + } for (i=0; iGIni.GIMacsFound; i++) { - pAC->GIni.GP[i].PRxCmd = - XM_RX_STRIP_FCS | XM_RX_LENERR_OK; + pAC->GIni.GP[i].PRxCmd = XM_RX_STRIP_FCS; } } @@ -2494,9 +2811,8 @@ ClearRxRing(pAC, &pAC->RxPort[i]); FillRxRing(pAC, &pAC->RxPort[i]); - // Enable transmit descriptor polling. + /* Enable transmit descriptor polling. */ SkGePollTxD(pAC, pAC->IoBase, i, SK_TRUE); - FillRxRing(pAC, &pAC->RxPort[i]); }; SkGeYellowLED(pAC, pAC->IoBase, 1); @@ -2511,7 +2827,7 @@ } #endif - pAC->dev->tbusy = 0; + pAC->dev[pNet->PortNr]->tbusy = 0; for (i=pAC->GIni.GIMacsFound-1; i>=0; i--) { spin_unlock_irqrestore( &pAC->TxPort[i][TX_PRIO_LOW].TxDesRingLock, Flags); @@ -2521,7 +2837,31 @@ SK_OUT32(pAC->IoBase, B0_IMSK, IRQ_MASK); SK_OUT32(pAC->IoBase, B0_HWE_IMSK, IRQ_HWE_MASK); - SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_START, EvPara); +/*++++++++++++++++++++++++++++++++++++*/ + + /* Found more than one port */ + if ((pAC->GIni.GIMacsFound == 2 ) && + (pAC->RlmtNets == 2)) { + /* Start both ports */ + EvPara.Para32[0] = pAC->RlmtNets; + EvPara.Para32[1] = -1; + SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_SET_NETS, + EvPara); + + + EvPara.Para32[1] = -1; + EvPara.Para32[0] = pNet->PortNr; + SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_START, EvPara); + + if (pOtherNet->Up) { + EvPara.Para32[0] = pOtherNet->PortNr; + SkEventQueue(pAC, SKGE_RLMT, + SK_RLMT_START, EvPara); + } + } else { + SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_START, EvPara); + } + SkEventDispatcher(pAC, pAC->IoBase); @@ -2544,9 +2884,11 @@ */ static struct net_device_stats *SkGeStats(struct device *dev) { -SK_AC *pAC = (SK_AC*) dev->priv; +DEV_NET *pNet = (DEV_NET*) dev->priv; +SK_AC *pAC = pNet->pAC; SK_PNMI_STRUCT_DATA *pPnmiStruct; /* structure for all Pnmi-Data */ -SK_PNMI_STAT *pPnmiStat; /* pointer to virtual XMAC stat. data */SK_PNMI_CONF *pPnmiConf; /* pointer to virtual link config. */ +SK_PNMI_STAT *pPnmiStat; /* pointer to virtual XMAC stat. data */ +SK_PNMI_CONF *pPnmiConf; /* pointer to virtual link config. */ unsigned int Size; /* size of pnmi struct */ unsigned int Flags; /* for spin lock */ @@ -2556,14 +2898,14 @@ memset(pPnmiStruct, 0, sizeof(SK_PNMI_STRUCT_DATA)); spin_lock_irqsave(&pAC->SlowPathLock, Flags); Size = SK_PNMI_STRUCT_SIZE; - SkPnmiGetStruct(pAC, pAC->IoBase, pPnmiStruct, &Size); + SkPnmiGetStruct(pAC, pAC->IoBase, pPnmiStruct, &Size, pNet->NetNr); spin_unlock_irqrestore(&pAC->SlowPathLock, Flags); pPnmiStat = &pPnmiStruct->Stat[0]; pPnmiConf = &pPnmiStruct->Conf[0]; - pAC->stats.rx_packets = (SK_U32) pPnmiStruct->RxDeliveredCts & 0xFFFFFFFF; + pAC->stats.rx_packets = (SK_U32) pPnmiStat->StatRxOkCts & 0xFFFFFFFF; pAC->stats.tx_packets = (SK_U32) pPnmiStat->StatTxOkCts & 0xFFFFFFFF; - pAC->stats.rx_bytes = (SK_U32) pPnmiStruct->RxOctetsDeliveredCts; + pAC->stats.rx_bytes = (SK_U32) pPnmiStat->StatRxOctetsOkCts; pAC->stats.tx_bytes = (SK_U32) pPnmiStat->StatTxOctetsOkCts; if (!pAC->JumboActivated) { pAC->stats.rx_errors = (SK_U32) pPnmiStruct->InErrorsCts & 0xFFFFFFFF; @@ -2612,14 +2954,18 @@ */ static int SkGeIoctl(struct device *dev, struct ifreq *rq, int cmd) { +DEV_NET *pNet; SK_AC *pAC; + SK_GE_IOCTL Ioctl; unsigned int Err = 0; int Size; SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_ENTRY, ("SkGeIoctl starts now...\n")); - pAC = (SK_AC*) dev->priv; + + pNet = (DEV_NET*) dev->priv; + pAC = pNet->pAC; if(copy_from_user(&Ioctl, rq->ifr_data, sizeof(SK_GE_IOCTL))) { return -EFAULT; @@ -2635,7 +2981,7 @@ Ioctl.Len : sizeof(pAC->PnmiStruct))) { return -EFAULT; } - Size = SkGeIocMib(pAC, Ioctl.Len, cmd); + Size = SkGeIocMib(pNet, Ioctl.Len, cmd); if(copy_to_user(Ioctl.pData, &pAC->PnmiStruct, Ioctl.LenpAC; /* access MIB */ spin_lock_irqsave(&pAC->SlowPathLock, Flags); switch(mode) { case SK_IOCTL_GETMIB: - SkPnmiGetStruct(pAC, pAC->IoBase, &pAC->PnmiStruct, &Size); + SkPnmiGetStruct(pAC, pAC->IoBase, &pAC->PnmiStruct, &Size, pNet->NetNr); break; case SK_IOCTL_PRESETMIB: - SkPnmiPreSetStruct(pAC, pAC->IoBase, &pAC->PnmiStruct, &Size); + SkPnmiPreSetStruct(pAC, pAC->IoBase, &pAC->PnmiStruct, &Size, pNet->NetNr); break; case SK_IOCTL_SETMIB: - SkPnmiSetStruct(pAC, pAC->IoBase, &pAC->PnmiStruct, &Size); + SkPnmiSetStruct(pAC, pAC->IoBase, &pAC->PnmiStruct, &Size, pNet->NetNr); break; default: break; @@ -2762,7 +3110,7 @@ AutoNeg = AN_SENS; } else printk("%s: Illegal value for AutoNeg_A\n", - pAC->dev->name); + pAC->dev[0]->name); } DuplexCap = DC_BOTH; @@ -2783,18 +3131,18 @@ DuplexCap = DC_HALF; } else printk("%s: Illegal value for DupCap_A\n", - pAC->dev->name); + pAC->dev[0]->name); } /* check for illegal combinations */ if (AutoSet && AutoNeg==AN_SENS && DupSet) { printk("%s, Port A: DuplexCapabilities" - " ignored using Sense mode\n", pAC->dev->name); + " ignored using Sense mode\n", pAC->dev[0]->name); } if (AutoSet && AutoNeg==AN_OFF && DupSet && DuplexCap==DC_BOTH){ printk("%s, Port A: Illegal combination" " of values AutoNeg. and DuplexCap.\n Using " - "Full Duplex\n", pAC->dev->name); + "Full Duplex\n", pAC->dev[0]->name); DuplexCap = DC_FULL; } @@ -2806,7 +3154,7 @@ printk("%s, Port A: Duplex setting not" " possible in\n default AutoNegotiation mode" " (Sense).\n Using AutoNegotiation On\n", - pAC->dev->name); + pAC->dev[0]->name); AutoNeg = AN_ON; } @@ -2841,7 +3189,7 @@ SK_FLOW_MODE_NONE) { printk("%s, Port A: FlowControl" " impossible without AutoNegotiation," - " disabled\n", pAC->dev->name); + " disabled\n", pAC->dev[0]->name); pAC->GIni.GP[0].PFlowCtrlMode = SK_FLOW_MODE_NONE; } @@ -2860,7 +3208,7 @@ MSMode = SK_MS_MODE_SLAVE; } else printk("%s: Illegal value for Role_A\n", - pAC->dev->name); + pAC->dev[0]->name); } pAC->GIni.GP[0].PMSMode = MSMode; @@ -2909,12 +3257,12 @@ /* check for illegal combinations */ if (AutoSet && AutoNeg==AN_SENS && DupSet) { printk("%s, Port B: DuplexCapabilities" - " ignored using Sense mode\n", pAC->dev->name); + " ignored using Sense mode\n", pAC->dev[1]->name); } if (AutoSet && AutoNeg==AN_OFF && DupSet && DuplexCap==DC_BOTH){ printk("%s, Port B: Illegal combination" " of values AutoNeg. and DuplexCap.\n Using " - "Full Duplex\n", pAC->dev->name); + "Full Duplex\n", pAC->dev[1]->name); DuplexCap = DC_FULL; } @@ -2926,14 +3274,14 @@ printk("%s, Port B: Duplex setting not" " possible in\n default AutoNegotiation mode" " (Sense).\n Using AutoNegotiation On\n", - pAC->dev->name); + pAC->dev[1]->name); AutoNeg = AN_ON; } - + /* set the desired mode */ pAC->GIni.GP[1].PLinkModeConf = Capabilities[AutoNeg][DuplexCap]; - + pAC->GIni.GP[1].PFlowCtrlMode = SK_FLOW_MODE_SYM_OR_REM; if (FlowCtrl_B != NULL && pAC->IndexIndex] != NULL) { @@ -2961,7 +3309,7 @@ SK_FLOW_MODE_NONE) { printk("%s, Port B: FlowControl" " impossible without AutoNegotiation," - " disabled\n", pAC->dev->name); + " disabled\n", pAC->dev[1]->name); pAC->GIni.GP[1].PFlowCtrlMode = SK_FLOW_MODE_NONE; } @@ -2980,7 +3328,7 @@ MSMode = SK_MS_MODE_SLAVE; } else printk("%s: Illegal value for Role_B\n", - pAC->dev->name); + pAC->dev[1]->name); } pAC->GIni.GP[1].PMSMode = MSMode; @@ -2991,8 +3339,8 @@ PrefPort[pAC->Index] != NULL) { if (strcmp(PrefPort[pAC->Index],"") == 0) { /* Auto */ pAC->ActivePort = 0; - pAC->Rlmt.MacPreferred = -1; /* auto */ - pAC->Rlmt.PrefPort = 0; + pAC->Rlmt.Net[0].Preference = -1; /* auto */ + pAC->Rlmt.Net[0].PrefPort = 0; } else if (strcmp(PrefPort[pAC->Index],"A") == 0) { /* @@ -3000,8 +3348,8 @@ * switch is issued after net up. */ Port = 0; - pAC->Rlmt.MacPreferred = Port; - pAC->Rlmt.PrefPort = Port; + pAC->Rlmt.Net[0].Preference = Port; + pAC->Rlmt.Net[0].PrefPort = Port; } else if (strcmp(PrefPort[pAC->Index],"B") == 0) { /* @@ -3009,13 +3357,16 @@ * switch is issued after net up. */ Port = 1; - pAC->Rlmt.MacPreferred = Port; - pAC->Rlmt.PrefPort = Port; + pAC->Rlmt.Net[0].Preference = Port; + pAC->Rlmt.Net[0].PrefPort = Port; } else printk("%s: Illegal value for PrefPort\n", - pAC->dev->name); + pAC->dev[0]->name); } - + + + pAC->RlmtNets = 1; + if (RlmtMode != NULL && pAC->IndexIndex] != NULL) { if (strcmp(RlmtMode[pAC->Index], "") == 0) { @@ -3033,9 +3384,14 @@ SK_RLMT_CHECK_LOC_LINK | SK_RLMT_CHECK_SEG; } + else if ((strcmp(RlmtMode[pAC->Index], "DualNet") == 0) && + (pAC->GIni.GIMacsFound == 2)) { + pAC->RlmtMode = SK_RLMT_CHECK_LINK; + pAC->RlmtNets = 2; + } else { printk("%s: Illegal value for" - " RlmtMode, using default\n", pAC->dev->name); + " RlmtMode, using default\n", pAC->dev[0]->name); pAC->RlmtMode = 0; } } @@ -3337,7 +3693,7 @@ case SK_DRV_ADAP_FAIL: SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT, ("ADAPTER FAIL EVENT\n")); - printk("%s: Adapter failed.\n", pAC->dev->name); + printk("%s: Adapter failed.\n", pAC->dev[0]->name); /* disable interrupts */ SK_OUT32(pAC->IoBase, B0_IMSK, 0); /* cgoos */ @@ -3347,9 +3703,9 @@ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT, ("PORT FAIL EVENT, Port: %d\n", FromPort)); if (FromPort == 0) { - printk("%s: Port A failed.\n", pAC->dev->name); + printk("%s: Port A failed.\n", pAC->dev[0]->name); } else { - printk("%s: Port B failed.\n", pAC->dev->name); + printk("%s: Port B failed.\n", pAC->dev[1]->name); } /* cgoos */ break; @@ -3390,7 +3746,7 @@ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT, ("NET UP EVENT, Port: %d ", Param.Para32[0])); printk("%s: network connection up using" - " port %c\n", pAC->dev->name, 'A'+Param.Para32[0]); + " port %c\n", pAC->dev[Param.Para32[0]]->name, 'A'+Param.Para32[0]); printk(" speed: 1000\n"); Stat = pAC->GIni.GP[FromPort].PLinkModeStatus; if (Stat == SK_LMODE_STAT_AUTOHALF || @@ -3433,7 +3789,8 @@ } } - if (Param.Para32[0] != pAC->ActivePort) { + if ((Param.Para32[0] != pAC->ActivePort) && + (pAC->RlmtNets == 1)) { NewPara.Para32[0] = pAC->ActivePort; NewPara.Para32[1] = Param.Para32[0]; SkEventQueue(pAC, SKGE_DRV, SK_DRV_SWITCH_INTERN, @@ -3444,21 +3801,21 @@ /* action list 7 */ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT, ("NET DOWN EVENT ")); - printk("%s: network connection down\n", pAC->dev->name); + printk("%s: network connection down\n", pAC->dev[Param.Para32[1]]->name); break; case SK_DRV_SWITCH_HARD: /* SK_U32 FromPortIdx SK_U32 ToPortIdx */ SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT, ("PORT SWITCH HARD ")); case SK_DRV_SWITCH_SOFT: /* SK_U32 FromPortIdx SK_U32 ToPortIdx */ /* action list 6 */ - printk("%s: switching to port %c\n", pAC->dev->name, + printk("%s: switching to port %c\n", pAC->dev[0]->name, 'A'+Param.Para32[1]); case SK_DRV_SWITCH_INTERN: /* SK_U32 FromPortIdx SK_U32 ToPortIdx */ FromPort = Param.Para32[0]; ToPort = Param.Para32[1]; SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT, ("PORT SWITCH EVENT, From: %d To: %d (Pref %d) ", - FromPort, ToPort, pAC->Rlmt.PrefPort)); + FromPort, ToPort, pAC->Rlmt.Net[0].PrefPort)); NewPara.Para64 = FromPort; SkPnmiEvent(pAC, IoC, SK_PNMI_EVT_XMAC_RESET, NewPara); NewPara.Para64 = ToPort; @@ -3510,6 +3867,7 @@ Flags); break; case SK_DRV_RLMT_SEND: /* SK_MBUF *pMb */ + SK_DBG_MSG(NULL, SK_DBGMOD_DRV, SK_DBGCAT_DRV_EVENT, ("RLS ")); pRlmtMbuf = (SK_MBUF*) Param.pParaPtr; @@ -3574,7 +3932,7 @@ break; } printk(KERN_INFO "%s: -- ERROR --\n Class: %s\n" - " Nr: 0x%x\n Msg: %s\n", pAC->dev->name, + " Nr: 0x%x\n Msg: %s\n", pAC->dev[0]->name, ClassStr, ErrNum, pErrorMsg); } /* SkErrorLog */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/skgeinit.c linux.20p6/drivers/net/sk98lin/skgeinit.c --- linux.vanilla/drivers/net/sk98lin/skgeinit.c Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/skgeinit.c Tue Jun 19 09:46:04 2001 @@ -2,16 +2,15 @@ * * Name: skgeinit.c * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.55 $ - * Date: $Date: 1999/11/22 13:32:26 $ + * Version: $Revision: 1.63 $ + * Date: $Date: 2001/04/05 11:02:09 $ * Purpose: Contains functions to initialize the GE HW * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2001 SysKonnect GmbH. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +26,31 @@ * History: * * $Log: skgeinit.c,v $ + * Revision 1.63 2001/04/05 11:02:09 rassmann + * Stop Port check of the STOP bit did not take 2/18 sec as wanted. + * + * Revision 1.62 2001/02/07 07:54:21 rassmann + * Corrected copyright. + * + * Revision 1.61 2001/01/31 15:31:40 gklug + * fix: problem with autosensing an SR8800 switch + * + * Revision 1.60 2000/10/18 12:22:21 cgoos + * Added workaround for half duplex hangup. + * + * Revision 1.59 2000/10/10 11:22:06 gklug + * add: in manual half duplex mode ignore carrier extension errors + * + * Revision 1.58 2000/10/02 14:10:27 rassmann + * Reading BCOM PHY after releasing reset until it returns a valid value. + * + * Revision 1.57 2000/08/03 14:55:28 rassmann + * Waiting for I2C to be ready before de-initializing adapter + * (prevents sensors from hanging up). + * + * Revision 1.56 2000/07/27 12:16:48 gklug + * fix: Stop Port check of the STOP bit does now take 2/18 sec as wanted + * * Revision 1.55 1999/11/22 13:32:26 cgoos * Changed license header to GPL. * @@ -200,7 +224,7 @@ * DoInitRamQueue(), and SkGeCfgSync(). * Add coding for SkGeInitMacArb(), SkGeInitPktArb(), * SkGeInitMacFifo(), SkGeInitRamBufs(), - * SkGeInitRamIface(), and SkGeInitBmu(). + * SkGeInitRamIface(), and SkGeInitBmu(). * * Revision 1.11 1998/09/29 08:26:29 malthoff * bug fix: SkGeInit0() 'i' should be increment. @@ -276,7 +300,7 @@ /* local variables ************************************************************/ static const char SysKonnectFileId[] = - "@(#)$Id: skgeinit.c,v 1.55 1999/11/22 13:32:26 cgoos Exp $ (C) SK "; + "@(#)$Id: skgeinit.c,v 1.63 2001/04/05 11:02:09 rassmann Exp $ (C) SK "; struct s_QOffTab { int RxQOff; /* Receive Queue Address Offset */ @@ -284,7 +308,7 @@ int XaQOff; /* Async Tx Queue Address Offset */ }; static struct s_QOffTab QOffTab[] = { - { Q_R1, Q_XS1, Q_XA1 }, { Q_R2, Q_XS2, Q_XA2 } + {Q_R1, Q_XS1, Q_XA1}, {Q_R2, Q_XS2, Q_XA2} }; @@ -304,7 +328,7 @@ void SkGePollRxD( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port, /* Port Index (MAC_1 + n) */ +int Port, /* Port Index (MAC_1 + n) */ SK_BOOL PollRxD) /* SK_TRUE (enable pol.), SK_FALSE (disable pol.) */ { SK_GEPORT *pPrt; @@ -312,12 +336,13 @@ pPrt = &pAC->GIni.GP[Port]; if (PollRxD) { - SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff,Q_CSR), CSR_ENA_POL); + SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff, Q_CSR), CSR_ENA_POL); } else { - SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff,Q_CSR), CSR_DIS_POL); + SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff, Q_CSR), CSR_DIS_POL); } -} +} /* SkGePollRxD */ + /****************************************************************************** * @@ -335,7 +360,7 @@ void SkGePollTxD( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port, /* Port Index (MAC_1 + n) */ +int Port, /* Port Index (MAC_1 + n) */ SK_BOOL PollTxD) /* SK_TRUE (enable pol.), SK_FALSE (disable pol.) */ { SK_GEPORT *pPrt; @@ -351,12 +376,12 @@ } if (pPrt->PXSQSize != 0) { - SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff,Q_CSR), DWord); + SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_CSR), DWord); } if (pPrt->PXAQSize != 0) { - SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff,Q_CSR), DWord); + SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_CSR), DWord); } -} +} /* SkGePollTxD */ /****************************************************************************** @@ -375,17 +400,18 @@ void SkGeYellowLED( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int State) /* yellow LED state, 0 = OFF, 0 != ON */ +int State) /* yellow LED state, 0 = OFF, 0 != ON */ { if (State == 0) { /* Switch yellow LED OFF */ - SK_OUT8(IoC, B0_LED, LED_STAT_OFF) ; + SK_OUT8(IoC, B0_LED, LED_STAT_OFF); } else { /* Switch yellow LED ON */ - SK_OUT8(IoC, B0_LED, LED_STAT_ON) ; + SK_OUT8(IoC, B0_LED, LED_STAT_ON); } -} +} /* SkGeYellowLED */ + /****************************************************************************** * @@ -399,7 +425,7 @@ * 'Led' must contain the address offset of the LEDs INI register. * * Usage: - * SkGeXmitLED(pAC, IoC, MR_ADDR(Port,TX_LED_INI), SK_LED_ENA); + * SkGeXmitLED(pAC, IoC, MR_ADDR(Port, TX_LED_INI), SK_LED_ENA); * * Returns: * nothing @@ -407,31 +433,31 @@ void SkGeXmitLED( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Led, /* offset to the LED Init Value register */ -int Mode) /* Mode may be SK_LED_DIS, SK_LED_ENA, SK_LED_TST */ +int Led, /* offset to the LED Init Value register */ +int Mode) /* Mode may be SK_LED_DIS, SK_LED_ENA, SK_LED_TST */ { SK_U32 LedIni; switch (Mode) { case SK_LED_ENA: LedIni = SK_XMIT_DUR * (SK_U32)pAC->GIni.GIHstClkFact / 100; - SK_OUT32(IoC, Led+XMIT_LED_INI, LedIni); - SK_OUT8(IoC, Led+XMIT_LED_CTRL, LED_START); - break ; + SK_OUT32(IoC, Led + XMIT_LED_INI, LedIni); + SK_OUT8(IoC, Led + XMIT_LED_CTRL, LED_START); + break; case SK_LED_TST: - SK_OUT8(IoC, Led+XMIT_LED_TST, LED_T_ON); - SK_OUT32(IoC, Led+XMIT_LED_CNT, 100); - SK_OUT8(IoC, Led+XMIT_LED_CTRL, LED_START); - break ; + SK_OUT8(IoC, Led + XMIT_LED_TST, LED_T_ON); + SK_OUT32(IoC, Led + XMIT_LED_CNT, 100); + SK_OUT8(IoC, Led + XMIT_LED_CTRL, LED_START); + break; case SK_LED_DIS: default: /* * Do NOT stop the LED Timer here. The LED might be * in on state. But it needs to go off. */ - SK_OUT32(IoC, Led+XMIT_LED_CNT, 0); - SK_OUT8(IoC, Led+XMIT_LED_TST, LED_T_OFF); - break ; + SK_OUT32(IoC, Led + XMIT_LED_CNT, 0); + SK_OUT8(IoC, Led + XMIT_LED_TST, LED_T_OFF); + break; } /* @@ -441,7 +467,8 @@ * (Broadcom: It may be that PHY_B_PEC_EN_LTR has to be set.) * (In this case it has to be added here. But we will see. XXX) */ -} +} /* SkGeXmitLED */ + /****************************************************************************** * @@ -462,12 +489,12 @@ * 1: configuration error */ static int DoCalcAddr( -SK_AC *pAC, /* adapter context */ -SK_GEPORT *pPrt, /* port index */ -int QuSize, /* size of the queue to configure in kB */ -SK_U32 *StartVal, /* start value for address calculation */ -SK_U32 *QuStartAddr, /* start addr to calculate */ -SK_U32 *QuEndAddr) /* end address to calculate */ +SK_AC *pAC, /* adapter context */ +SK_GEPORT *pPrt, /* port index */ +int QuSize, /* size of the queue to configure in kB */ +SK_U32 *StartVal, /* start value for address calculation */ +SK_U32 *QuStartAddr, /* start addr to calculate */ +SK_U32 *QuEndAddr) /* end address to calculate */ { SK_U32 EndVal; SK_U32 NextStart; @@ -495,7 +522,7 @@ *StartVal = NextStart; return (Rtv); -} +} /* DoCalcAddr */ /****************************************************************************** @@ -522,8 +549,8 @@ * 1: Queue Size Configuration invalid */ static int SkGeCheckQSize( -SK_AC *pAC, /* adapter context */ -int Port) /* port index */ +SK_AC *pAC, /* adapter context */ +int Port) /* port index */ { SK_GEPORT *pPrt; int UsedMem; @@ -541,9 +568,7 @@ (pPrt->PXSQSize & QZ_UNITS) || (pPrt->PXAQSize & QZ_UNITS)) { - SK_ERR_LOG(pAC, SK_ERRCL_SW, - SKERR_HWI_E012, - SKERR_HWI_E012MSG); + SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E012, SKERR_HWI_E012MSG); Rtv = 1; goto CheckQSizeEnd; } @@ -551,9 +576,7 @@ UsedMem += pPrt->PRxQSize + pPrt->PXSQSize + pPrt->PXAQSize; if (i == Port && pPrt->PRxQSize < SK_MIN_RXQ_SIZE) { - SK_ERR_LOG(pAC, SK_ERRCL_SW, - SKERR_HWI_E011, - SKERR_HWI_E011MSG); + SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E011, SKERR_HWI_E011MSG); Rtv = 1; goto CheckQSizeEnd; } @@ -585,17 +608,15 @@ Rtv |= Rtv2; if (Rtv) { - SK_ERR_LOG(pAC, SK_ERRCL_SW, - SKERR_HWI_E013, - SKERR_HWI_E013MSG); + SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E013, SKERR_HWI_E013MSG); break; } } - CheckQSizeEnd: return (Rtv); -} +} /* SkGeCheckQSize */ + /****************************************************************************** * @@ -634,7 +655,8 @@ * There is not start or enable buttom to push, therefore * the MAC arbiter is configured and enabled now. */ -} +} /* SkGeInitMacArb */ + /****************************************************************************** * @@ -661,16 +683,21 @@ SK_OUT16(IoC, B3_PA_TOINI_TX1, SK_PKT_TO_MAX); SK_OUT16(IoC, B3_PA_TOINI_TX2, SK_PKT_TO_MAX); - /* enable timeout timers if jumbo frames not used */ + /* + * enable timeout timers if jumbo frames not used + * NOTE: the packet arbiter timeout interrupt is needed for + * half duplex hangup workaround + */ if (pAC->GIni.GIPortUsage != SK_JUMBO_LINK) { if (pAC->GIni.GIMacsFound == 1) { SK_OUT16(IoC, B3_PA_CTRL, PA_ENA_TO_TX1); } else { - SK_OUT16(IoC, B3_PA_CTRL,(PA_ENA_TO_TX1|PA_ENA_TO_TX2)); + SK_OUT16(IoC, B3_PA_CTRL,(PA_ENA_TO_TX1 | PA_ENA_TO_TX2)); } } -} +} /* SkGeInitPktArb */ + /****************************************************************************** * @@ -685,7 +712,7 @@ static void SkGeInitMacFifo( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* Port Index (MAC_1 + n) */ +int Port) /* Port Index (MAC_1 + n) */ { /* * For each FIFO: @@ -708,7 +735,8 @@ if (pAC->GIni.GIPortUsage == SK_JUMBO_LINK) { SK_OUT16(IoC, MR_ADDR(Port, RX_MFF_CTRL1), MFF_ENA_FLUSH); } -} +} /* SkGeInitMacFifo */ + /****************************************************************************** * @@ -732,7 +760,7 @@ void SkGeLoadLnkSyncCnt( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port, /* Port Index (MAC_1 + n) */ +int Port, /* Port Index (MAC_1 + n) */ SK_U32 CntVal) /* Counter value */ { SK_U32 OrgIMsk; @@ -741,7 +769,7 @@ SK_BOOL IrqPend; /* stop counter */ - SK_OUT8(IoC, MR_ADDR(Port,LNK_SYNC_CTRL), LED_STOP); + SK_OUT8(IoC, MR_ADDR(Port, LNK_SYNC_CTRL), LED_STOP); /* * ASIC problem: @@ -771,17 +799,18 @@ } /* load counter */ - SK_OUT32(IoC, MR_ADDR(Port,LNK_SYNC_INI), CntVal); + SK_OUT32(IoC, MR_ADDR(Port, LNK_SYNC_INI), CntVal); /* start counter */ - SK_OUT8(IoC, MR_ADDR(Port,LNK_SYNC_CTRL), LED_START); + SK_OUT8(IoC, MR_ADDR(Port, LNK_SYNC_CTRL), LED_START); if (!IrqPend) { /* clear the unexpected IRQ, and restore the interrupt mask */ - SK_OUT8(IoC, MR_ADDR(Port,LNK_SYNC_CTRL), LED_CLR_IRQ); + SK_OUT8(IoC, MR_ADDR(Port, LNK_SYNC_CTRL), LED_CLR_IRQ); SK_OUT32(IoC, B0_IMSK, OrgIMsk); } -} +} /* SkGeLoadLnkSyncCnt*/ + /****************************************************************************** * @@ -814,10 +843,10 @@ int SkGeCfgSync( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port, /* Port Index (MAC_1 + n) */ +int Port, /* Port Index (MAC_1 + n) */ SK_U32 IntTime, /* Interval Timer Value in units of 8ns */ SK_U32 LimCount, /* Number of bytes to transfer during IntTime */ -int SyncMode) /* Sync Mode: TXA_ENA_ALLOC | TXA_DIS_ALLOC | 0 */ +int SyncMode) /* Sync Mode: TXA_ENA_ALLOC | TXA_DIS_ALLOC | 0 */ { int Rtv; @@ -837,8 +866,7 @@ IntTime = (IntTime / 2) * pAC->GIni.GIHstClkFact / 100; LimCount = LimCount / 8; if (IntTime > TXA_MAX_VAL || LimCount > TXA_MAX_VAL) { - SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E010, - SKERR_HWI_E010MSG); + SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E010, SKERR_HWI_E010MSG); Rtv = 1; goto CfgSyncEnd; } @@ -853,14 +881,14 @@ * - start 'Rate Control' and disable 'Force Sync' * if Interval Timer or Limit Counter not zero. */ - SK_OUT8(IoC, MR_ADDR(Port,TXA_CTRL), + SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL), TXA_ENA_FSYNC | TXA_DIS_ALLOC | TXA_STOP_RC); - SK_OUT32(IoC, MR_ADDR(Port,TXA_ITI_INI), IntTime); - SK_OUT32(IoC, MR_ADDR(Port,TXA_LIM_INI), LimCount); - SK_OUT8(IoC, MR_ADDR(Port,TXA_CTRL), + SK_OUT32(IoC, MR_ADDR(Port, TXA_ITI_INI), IntTime); + SK_OUT32(IoC, MR_ADDR(Port, TXA_LIM_INI), LimCount); + SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL), (SyncMode & (TXA_ENA_ALLOC|TXA_DIS_ALLOC))); if (IntTime != 0 || LimCount != 0) { - SK_OUT8(IoC, MR_ADDR(Port,TXA_CTRL), + SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL), TXA_DIS_FSYNC|TXA_START_RC); } } @@ -871,7 +899,8 @@ CfgSyncEnd: return (Rtv); -} +} /* SkGeCfgSync */ + /****************************************************************************** * @@ -885,12 +914,12 @@ * nothing */ static void DoInitRamQueue( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* IO context */ -int QuIoOffs, /* Queue IO Address Offset */ +SK_AC *pAC, /* adapter context */ +SK_IOC IoC, /* IO context */ +int QuIoOffs, /* Queue IO Address Offset */ SK_U32 QuStartAddr, /* Queue Start Address */ -SK_U32 QuEndAddr, /* Queue End Address */ -int QuType) /* Queue Type (SK_RX_SRAM_Q|SK_RX_BRAM_Q|SK_TX_RAM_Q) */ +SK_U32 QuEndAddr, /* Queue End Address */ +int QuType) /* Queue Type (SK_RX_SRAM_Q|SK_RX_BRAM_Q|SK_TX_RAM_Q) */ { SK_U32 RxUpThresVal; SK_U32 RxLoThresVal; @@ -905,13 +934,13 @@ QuEndAddr = QuEndAddr / 8; /* release local reset */ - SK_OUT8(IoC, RB_ADDR(QuIoOffs,RB_CTRL), RB_RST_CLR); + SK_OUT8(IoC, RB_ADDR(QuIoOffs, RB_CTRL), RB_RST_CLR); /* configure addresses */ - SK_OUT32(IoC, RB_ADDR(QuIoOffs,RB_START), QuStartAddr); - SK_OUT32(IoC, RB_ADDR(QuIoOffs,RB_END), QuEndAddr); - SK_OUT32(IoC, RB_ADDR(QuIoOffs,RB_WP), QuStartAddr); - SK_OUT32(IoC, RB_ADDR(QuIoOffs,RB_RP), QuStartAddr); + SK_OUT32(IoC, RB_ADDR(QuIoOffs, RB_START), QuStartAddr); + SK_OUT32(IoC, RB_ADDR(QuIoOffs, RB_END), QuEndAddr); + SK_OUT32(IoC, RB_ADDR(QuIoOffs, RB_WP), QuStartAddr); + SK_OUT32(IoC, RB_ADDR(QuIoOffs, RB_RP), QuStartAddr); switch (QuType) { case SK_RX_SRAM_Q: @@ -922,10 +951,9 @@ case SK_RX_BRAM_Q: /* write threshold for Rx Queue */ - SK_OUT32(IoC, RB_ADDR(QuIoOffs,RB_RX_UTPP), - RxUpThresVal); - SK_OUT32(IoC, RB_ADDR(QuIoOffs,RB_RX_LTPP), - RxLoThresVal); + SK_OUT32(IoC, RB_ADDR(QuIoOffs, RB_RX_UTPP), RxUpThresVal); + SK_OUT32(IoC, RB_ADDR(QuIoOffs,RB_RX_LTPP), RxLoThresVal); + /* the high priority threshold not used */ break; case SK_TX_RAM_Q: @@ -940,20 +968,20 @@ * enable Store & Forward Mode for the * Tx Side */ - SK_OUT8(IoC, RB_ADDR(QuIoOffs,RB_CTRL), - RB_ENA_STFWD); + SK_OUT8(IoC, RB_ADDR(QuIoOffs, RB_CTRL), RB_ENA_STFWD); } break; } /* set queue operational */ - SK_OUT8(IoC, RB_ADDR(QuIoOffs,RB_CTRL), RB_ENA_OP_MD); + SK_OUT8(IoC, RB_ADDR(QuIoOffs, RB_CTRL), RB_ENA_OP_MD); } else { /* ensure the queue is still disabled */ - SK_OUT8(IoC, RB_ADDR(QuIoOffs,RB_CTRL), RB_RST_SET); + SK_OUT8(IoC, RB_ADDR(QuIoOffs, RB_CTRL), RB_RST_SET); } -} +} /* DoInitRamQueue*/ + /****************************************************************************** * @@ -968,7 +996,7 @@ static void SkGeInitRamBufs( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* Port Index (MAC_1 + n) */ +int Port) /* Port Index (MAC_1 + n) */ { SK_GEPORT *pPrt; int RxQType; @@ -988,7 +1016,8 @@ pPrt->PXsQRamEnd, SK_TX_RAM_Q); DoInitRamQueue(pAC, IoC, pPrt->PXaQOff, pPrt->PXaQRamStart, pPrt->PXaQRamEnd, SK_TX_RAM_Q); -} +} /* SkGeInitRamBufs */ + /****************************************************************************** * @@ -1023,7 +1052,8 @@ SK_OUT8(IoC, B3_RI_RTO_R2, SK_RI_TO_53); SK_OUT8(IoC, B3_RI_RTO_XA2, SK_RI_TO_53); SK_OUT8(IoC, B3_RI_RTO_XS2, SK_RI_TO_53); -} +} /* SkGeInitRamIface */ + /****************************************************************************** * @@ -1038,33 +1068,34 @@ static void SkGeInitBmu( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* Port Index (MAC_1 + n) */ +int Port) /* Port Index (MAC_1 + n) */ { SK_GEPORT *pPrt; pPrt = &pAC->GIni.GP[Port]; /* Rx Queue: Release all local resets and set the watermark */ - SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff,Q_CSR), CSR_CLR_RESET); - SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff,Q_F), SK_BMU_RX_WM); + SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff, Q_CSR), CSR_CLR_RESET); + SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff, Q_F), SK_BMU_RX_WM); /* * Tx Queue: Release all local resets if the queue is used! * set watermark */ if (pPrt->PXSQSize != 0) { - SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff,Q_CSR), CSR_CLR_RESET); - SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff,Q_F), SK_BMU_TX_WM); + SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_CSR), CSR_CLR_RESET); + SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_F), SK_BMU_TX_WM); } if (pPrt->PXAQSize != 0) { - SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff,Q_CSR), CSR_CLR_RESET); - SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff,Q_F), SK_BMU_TX_WM); + SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_CSR), CSR_CLR_RESET); + SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_F), SK_BMU_TX_WM); } /* * Do NOT enable the descriptor poll timers here, because * the descriptor addresses are not specified yet. */ -} +} /* SkGeInitBmu */ + /****************************************************************************** * @@ -1082,17 +1113,18 @@ static SK_U32 TestStopBit( SK_AC *pAC, /* Adapter Context */ SK_IOC IoC, /* IO Context */ -int QuIoOffs) /* Queue IO Address Offset */ +int QuIoOffs) /* Queue IO Address Offset */ { SK_U32 QuCsr; /* CSR contents */ - SK_IN32(IoC, Q_ADDR(QuIoOffs,Q_CSR), &QuCsr); + SK_IN32(IoC, Q_ADDR(QuIoOffs, Q_CSR), &QuCsr); if ((QuCsr & (CSR_STOP|CSR_SV_IDLE)) == 0) { - SK_OUT32(IoC, Q_ADDR(QuIoOffs,Q_CSR), CSR_STOP); - SK_IN32(IoC, Q_ADDR(QuIoOffs,Q_CSR), &QuCsr); + SK_OUT32(IoC, Q_ADDR(QuIoOffs, Q_CSR), CSR_STOP); + SK_IN32(IoC, Q_ADDR(QuIoOffs, Q_CSR), &QuCsr); } return (QuCsr); -} +} /* TestStopBit*/ + /****************************************************************************** * @@ -1174,10 +1206,10 @@ */ void SkGeStopPort( SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* IO context */ -int Port, /* port to stop (MAC_1 + n) */ -int Dir, /* Direction to Stop (SK_STOP_RX, SK_STOP_TX, SK_STOP_ALL) */ -int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */ +SK_IOC IoC, /* I/O context */ +int Port, /* port to stop (MAC_1 + n) */ +int Dir, /* Direction to Stop (SK_STOP_RX, SK_STOP_TX, SK_STOP_ALL) */ +int RstMode)/* Reset Mode (SK_SOFT_RST, SK_HARD_RST) */ { #ifndef SK_DIAG SK_EVPARA Para; @@ -1187,18 +1219,17 @@ SK_U16 Word; SK_U32 XsCsr; SK_U32 XaCsr; - int i; + int i; SK_BOOL AllPortsDis; SK_U64 ToutStart; - int ToutCnt; + int ToutCnt; pPrt = &pAC->GIni.GP[Port]; if (Dir & SK_STOP_TX) { /* disable the XMACs receiver and transmitter */ XM_IN16(IoC, Port, XM_MMU_CMD, &Word); - XM_OUT16(IoC, Port, XM_MMU_CMD, - Word & ~(XM_MMU_ENA_RX | XM_MMU_ENA_TX)); + XM_OUT16(IoC, Port, XM_MMU_CMD, Word & ~(XM_MMU_ENA_RX | XM_MMU_ENA_TX)); /* dummy read to ensure writing */ XM_IN16(IoC, Port, XM_MMU_CMD, &Word); @@ -1208,15 +1239,15 @@ * If the BMU is in the reset state CSR_STOP will terminate * immediately. */ - SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff,Q_CSR), CSR_STOP); - SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff,Q_CSR), CSR_STOP); + SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_CSR), CSR_STOP); + SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_CSR), CSR_STOP); ToutStart = SkOsGetTime(pAC); ToutCnt = 0; do { /* * Clear packet arbiter timeout to make sure - * this loop will terminate + * this loop will terminate. */ if (Port == MAC_1) { Word = PA_CLR_TO_TX1; @@ -1227,65 +1258,64 @@ SK_OUT16(IoC, B3_PA_CTRL, Word); /* - * If the transfer stucks at the XMAC the STOP command - * will not terminate if we don't flush the XMACs - * transmit FIFO ! + * If the transfer stucks at the XMAC the STOP command will not + * terminate if we don't flush the XMAC's transmit FIFO! */ XM_IN32(IoC, Port, XM_MODE, &DWord); - DWord |= XM_MD_FTF ; + DWord |= XM_MD_FTF; XM_OUT32(IoC, Port, XM_MODE, DWord); XsCsr = TestStopBit(pAC, IoC, pPrt->PXsQOff); XaCsr = TestStopBit(pAC, IoC, pPrt->PXaQOff); - if (ToutStart + (SK_TICKS_PER_SEC / 18) < - SkOsGetTime(pAC)) { - + if (SkOsGetTime(pAC) - ToutStart > (SK_TICKS_PER_SEC / 18)) { /* * Timeout of 1/18 second reached. + * This needs to be checked at 1/18 sec only. */ ToutCnt++; switch (ToutCnt) { case 1: /* - * Cache Incoherency workaround: - * Assume a start command has been - * lost while sending the frame. + * Cache Incoherency workaround: Assume a start command + * has been lost while sending the frame. */ ToutStart = SkOsGetTime(pAC); if (XsCsr & CSR_STOP) { - SK_OUT32(IoC, - Q_ADDR(pPrt->PXsQOff, - Q_CSR), CSR_START); + SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_CSR), CSR_START); } if (XaCsr & CSR_STOP) { - SK_OUT32(IoC, - Q_ADDR(pPrt->PXaQOff, - Q_CSR), CSR_START); + SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_CSR), CSR_START); } break; case 2: - default: /* Fatal Error, Loop aborted */ + default: + /* Might be a problem when the driver event handler + * calls StopPort again. + * XXX. + */ + + /* Fatal Error, Loop aborted */ /* Create an Error Log Entry */ - SK_ERR_LOG(pAC, SK_ERRCL_HW, + SK_ERR_LOG( + pAC, + SK_ERRCL_HW, SKERR_HWI_E018, SKERR_HWI_E018MSG); #ifndef SK_DIAG Para.Para64 = Port; - SkEventQueue(pAC, SKGE_DRV, - SK_DRV_PORT_FAIL, Para); + SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para); #endif /* !SK_DIAG */ return; } } - /* - * because of the ASIC problem report entry from 21.08.98 - * it is required to wait until CSR_STOP is reset and - * CSR_SV_IDLE is set. - */ - } while ((XsCsr & (CSR_STOP|CSR_SV_IDLE)) != CSR_SV_IDLE || - (XaCsr & (CSR_STOP|CSR_SV_IDLE)) != CSR_SV_IDLE); + /* + * Because of the ASIC problem report entry from 21.08.1998 it is + * required to wait until CSR_STOP is reset and CSR_SV_IDLE is set. + */ + } while ((XsCsr & (CSR_STOP | CSR_SV_IDLE)) != CSR_SV_IDLE || + (XaCsr & (CSR_STOP | CSR_SV_IDLE)) != CSR_SV_IDLE); /* reset the XMAC depending on the RstMode */ if (RstMode == SK_SOFT_RST) { @@ -1299,10 +1329,10 @@ * Stop Interval Timer and Limit Counter of Tx Arbiter, * also disable Force Sync bit and Enable Alloc bit. */ - SK_OUT8(IoC, MR_ADDR(Port,TXA_CTRL), + SK_OUT8(IoC, MR_ADDR(Port, TXA_CTRL), TXA_DIS_FSYNC | TXA_DIS_ALLOC | TXA_STOP_RC); - SK_OUT32(IoC, MR_ADDR(Port,TXA_ITI_INI), 0x00000000L); - SK_OUT32(IoC, MR_ADDR(Port,TXA_LIM_INI), 0x00000000L); + SK_OUT32(IoC, MR_ADDR(Port, TXA_ITI_INI), 0x00000000L); + SK_OUT32(IoC, MR_ADDR(Port, TXA_LIM_INI), 0x00000000L); /* * perform a local reset of the port's tx path @@ -1312,16 +1342,16 @@ * - reset the RAM Butter sync tx queue * - reset the MAC Tx FIFO */ - SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff,Q_CSR), CSR_SET_RESET); - SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff,Q_CSR), CSR_SET_RESET); - SK_OUT8(IoC, RB_ADDR(pPrt->PXaQOff,RB_CTRL), RB_RST_SET); - SK_OUT8(IoC, RB_ADDR(pPrt->PXsQOff,RB_CTRL), RB_RST_SET); + SK_OUT32(IoC, Q_ADDR(pPrt->PXaQOff, Q_CSR), CSR_SET_RESET); + SK_OUT32(IoC, Q_ADDR(pPrt->PXsQOff, Q_CSR), CSR_SET_RESET); + SK_OUT8(IoC, RB_ADDR(pPrt->PXaQOff, RB_CTRL), RB_RST_SET); + SK_OUT8(IoC, RB_ADDR(pPrt->PXsQOff, RB_CTRL), RB_RST_SET); /* Note: MFF_RST_SET does NOT reset the XMAC! */ SK_OUT8(IoC, MR_ADDR(Port, TX_MFF_CTRL2), MFF_RST_SET); /* switch Link and Tx LED off, stop the LED counters */ /* Link LED is switched off by the RLMT and the Diag itself */ - SkGeXmitLED(pAC, IoC, MR_ADDR(Port,TX_LED_INI), SK_LED_DIS); + SkGeXmitLED(pAC, IoC, MR_ADDR(Port, TX_LED_INI), SK_LED_DIS); } if (Dir & SK_STOP_RX) { @@ -1332,7 +1362,7 @@ * stop the transfer of received packets. */ /* stop the port's receive queue */ - SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff,Q_CSR), CSR_STOP); + SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff, Q_CSR), CSR_STOP); i = 100; do { /* @@ -1352,13 +1382,13 @@ i--; } - /* finish if CSR_STOP is done or CSR_SV_IDLE is true and i==0 */ - /* - * because of the ASIC problem report entry from 21.08.98 - * it is required to wait until CSR_STOP is reset and - * CSR_SV_IDLE is set. - */ - } while ((DWord & (CSR_STOP|CSR_SV_IDLE)) != CSR_SV_IDLE && + /* finish if CSR_STOP is done or CSR_SV_IDLE is true and i==0 */ + /* + * because of the ASIC problem report entry from 21.08.98 + * it is required to wait until CSR_STOP is reset and + * CSR_SV_IDLE is set. + */ + } while ((DWord & (CSR_STOP | CSR_SV_IDLE)) != CSR_SV_IDLE && ((DWord & CSR_SV_IDLE) == 0 || i != 0)); /* The path data transfer activity is fully stopped now. */ @@ -1369,12 +1399,12 @@ * - reset the RAM Buffer receive queue * - reset the MAC Rx FIFO */ - SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff,Q_CSR), CSR_SET_RESET); - SK_OUT8(IoC, RB_ADDR(pPrt->PRxQOff,RB_CTRL), RB_RST_SET); + SK_OUT32(IoC, Q_ADDR(pPrt->PRxQOff, Q_CSR), CSR_SET_RESET); + SK_OUT8(IoC, RB_ADDR(pPrt->PRxQOff, RB_CTRL), RB_RST_SET); SK_OUT8(IoC, MR_ADDR(Port, RX_MFF_CTRL2), MFF_RST_SET); /* switch Rx LED off, stop the LED counter */ - SkGeXmitLED(pAC, IoC, MR_ADDR(Port,RX_LED_INI), SK_LED_DIS); + SkGeXmitLED(pAC, IoC, MR_ADDR(Port, RX_LED_INI), SK_LED_DIS); } @@ -1392,7 +1422,8 @@ if (AllPortsDis) { pAC->GIni.GIAnyPortAct = SK_FALSE; } -} +} /* SkGeStopPort */ + /****************************************************************************** * @@ -1422,6 +1453,7 @@ pPrt->PIsave = 0; pPrt->PPrevShorts = 0; pPrt->PLinkResCt = 0; + pPrt->PAutoNegTOCt = 0; pPrt->PPrevRx = 0; pPrt->PPrevFcs = 0; pPrt->PRxLim = SK_DEF_RX_WA_LIM; @@ -1445,7 +1477,88 @@ pAC->GIni.GIPortUsage = SK_RED_LINK; pAC->GIni.GIAnyPortAct = SK_FALSE; -} +} /* SkGeInit0*/ + +#ifdef SK_PCI_RESET + +/****************************************************************************** + * + * SkGePciReset() - Reset PCI interface + * + * Description: + * o Read PCI configuration. + * o Change power state to 3. + * o Change power state to 0. + * o Restore PCI configuration. + * + * Returns: + * 0: Success. + * 1: Power state could not be changed to 3. + */ +static int SkGePciReset( +SK_AC *pAC, /* adapter context */ +SK_IOC IoC) /* IO context */ +{ + int i; + SK_U16 PmCtlSts; + SK_U32 Bp1; + SK_U32 Bp2; + SK_U16 PciCmd; + SK_U8 Cls; + SK_U8 Lat; + SK_U8 ConfigSpace[PCI_CFG_SIZE]; + + /* + * Note: Switching to D3 state is like a software reset. + * Switching from D3 to D0 is a hardware reset. + * We have to save and restore the configuration space. + */ + for (i = 0; i < PCI_CFG_SIZE; i++) { + SkPciReadCfgDWord(pAC, i*4, &ConfigSpace[i]); + } + + /* We know the RAM Interface Arbiter is enabled. */ + SkPciWriteCfgWord(pAC, PCI_PM_CTL_STS, PCI_PM_STATE_D3); + SkPciReadCfgWord(pAC, PCI_PM_CTL_STS, &PmCtlSts); + if ((PmCtlSts & PCI_PM_STATE) != PCI_PM_STATE_D3) { + return (1); + } + + /* + * Return to D0 state. + */ + SkPciWriteCfgWord(pAC, PCI_PM_CTL_STS, PCI_PM_STATE_D0); + + /* Check for D0 state. */ + SkPciReadCfgWord(pAC, PCI_PM_CTL_STS, &PmCtlSts); + if ((PmCtlSts & PCI_PM_STATE) != PCI_PM_STATE_D0) { + return (1); + } + + /* + * Check PCI Config Registers. + */ + SkPciReadCfgWord(pAC, PCI_COMMAND, &PciCmd); + SkPciReadCfgByte(pAC, PCI_CACHE_LSZ, &Cls); + SkPciReadCfgDWord(pAC, PCI_BASE_1ST, &Bp1); + SkPciReadCfgDWord(pAC, PCI_BASE_2ND, &Bp2); + SkPciReadCfgByte(pAC, PCI_LAT_TIM, &lat); + if (PciCmd != 0 || Cls != 0 || (Bp1 & 0xfffffff0L) != 0 || Bp2 != 1 || + Lat != 0 ) { + return (0); + } + + /* + * Restore Config Space. + */ + for (i = 0; i < PCI_CFG_SIZE; i++) { + SkPciWriteCfgDWord(pAC, i*4, ConfigSpace[i]); + } + + return (0); +} /* SkGePciReset */ + +#endif /* SK_PCI_RESET */ /****************************************************************************** * @@ -1478,6 +1591,10 @@ RetVal = 0; +#ifdef SK_PCI_RESET + (void)SkGePciReset(pAC, IoC); +#endif /* SK_PCI_RESET */ + /* Do the reset */ SK_OUT8(IoC, B0_CTST, CS_RST_SET); @@ -1487,7 +1604,7 @@ /* Reset all error bits in the PCI STATUS register */ /* * Note: Cfg cycles cannot be used, because they are not - * available on some platforms after 'boot time'. + * available on some platforms after 'boot time'. */ SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_ON); SK_IN16(IoC, PCI_C(PCI_STATUS), &Word); @@ -1548,12 +1665,13 @@ break; } } - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_INIT, + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_INIT, ("PHY type: %d PHY addr: %x\n", pAC->GIni.GP[i].PhyType, - pAC->GIni.GP[i].PhyAddr)) ; + pAC->GIni.GP[i].PhyAddr)); return (RetVal); -} +} /* SkGeInit1*/ + /****************************************************************************** * @@ -1589,8 +1707,7 @@ pAC->GIni.GIPollTimerVal = SK_DPOLL_MAX; /* Create an Error Log Entry */ - SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E017, - SKERR_HWI_E017MSG); + SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E017, SKERR_HWI_E017MSG); } SK_OUT32(IoC, B28_DPT_INI, pAC->GIni.GIPollTimerVal); SK_OUT8(IoC, B28_DPT_CTRL, DPT_START); @@ -1608,9 +1725,9 @@ SkGeInitPktArb(pAC, IoC); /* enable the Tx Arbiters */ - SK_OUT8(IoC, MR_ADDR(MAC_1,TXA_CTRL), TXA_ENA_ARB); + SK_OUT8(IoC, MR_ADDR(MAC_1, TXA_CTRL), TXA_ENA_ARB); if (pAC->GIni.GIMacsFound > 1) { - SK_OUT8(IoC, MR_ADDR(MAC_2,TXA_CTRL), TXA_ENA_ARB); + SK_OUT8(IoC, MR_ADDR(MAC_2, TXA_CTRL), TXA_ENA_ARB); } /* enable the RAM Interface Arbiter */ @@ -1621,8 +1738,19 @@ if (pAC->GIni.GIPortUsage == SK_JUMBO_LINK) { pPrt->PRxCmd |= XM_RX_BIG_PK_OK; } + + if (pPrt->PLinkModeConf == SK_LMODE_HALF) { + /* + * If in manual half duplex mode + * the other side might be in full duplex mode + * so ignore if a carrier extension is not seen on + * frames received + */ + pPrt->PRxCmd |= XM_RX_DIS_CEXT; + } + } -} +} /* SkGeInit2 */ /****************************************************************************** * @@ -1661,24 +1789,24 @@ int SkGeInit( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Level) /* initialization level */ +int Level) /* initialization level */ { int RetVal; /* return value */ SK_U32 DWord; RetVal = 0; - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_INIT, - ("SkGeInit(Level %d)\n",Level)) ; + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_INIT, + ("SkGeInit(Level %d)\n", Level)); switch (Level) { case SK_INIT_DATA: /* Initialization Level 0 */ - SkGeInit0(pAC,IoC) ; + SkGeInit0(pAC, IoC); pAC->GIni.GILevel = SK_INIT_DATA; break; case SK_INIT_IO: /* Initialization Level 1 */ - RetVal = SkGeInit1(pAC,IoC) ; + RetVal = SkGeInit1(pAC, IoC); /* Check if the adapter seems to be accessable */ SK_OUT32(IoC, B2_IRQM_INI, 0x11335577L); @@ -1702,13 +1830,12 @@ /* Initialization Level 2 */ if (pAC->GIni.GILevel != SK_INIT_IO) { #ifndef SK_DIAG - SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E002, - SKERR_HWI_E002MSG); + SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E002, SKERR_HWI_E002MSG); #endif RetVal = 4; break; } - SkGeInit2(pAC,IoC) ; + SkGeInit2(pAC, IoC); /* Level 2 successfully passed */ pAC->GIni.GILevel = SK_INIT_RUN; @@ -1716,12 +1843,13 @@ default: /* Create an Error Log Entry */ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E003, SKERR_HWI_E003MSG); - RetVal = 3 ; + RetVal = 3; break; } return (RetVal); -} +} /* SkGeInit*/ + /****************************************************************************** * @@ -1741,6 +1869,9 @@ int i; SK_U16 Word; + /* Ensure I2C is ready. */ + SkI2cWaitIrq(pAC, IoC); + /* Stop all current transfer activity */ for (i = 0; i < pAC->GIni.GIMacsFound; i++) { if (pAC->GIni.GP[i].PState != SK_PRT_STOP && @@ -1762,7 +1893,8 @@ /* Do the reset, all LEDs are switched off now */ SK_OUT8(IoC, B0_CTST, CS_RST_SET); -} +} /* SkGeDeInit*/ + /****************************************************************************** * @@ -1791,18 +1923,18 @@ * for PRxQSize, PXSQSize, or PXAQSize are invalid for one * or more queues. The specified port was NOT initialized. * An error log entry was generated. - * 2: The port has to be stopped before it can be initilaized again. + * 2: The port has to be stopped before it can be initialized again. */ int SkGeInitPort( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* Port to configure */ +int Port) /* Port to configure */ { SK_GEPORT *pPrt; pPrt = &pAC->GIni.GP[Port]; - if (SkGeCheckQSize(pAC,Port) != 0) { + if (SkGeCheckQSize(pAC, Port) != 0) { SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E004, SKERR_HWI_E004MSG); return (1); } @@ -1818,8 +1950,8 @@ * If 1000BT Phy needs LED initialization than swap * LED and XMAC initialization order */ - SkGeXmitLED(pAC, IoC, MR_ADDR(Port,TX_LED_INI), SK_LED_ENA); - SkGeXmitLED(pAC, IoC, MR_ADDR(Port,RX_LED_INI), SK_LED_ENA); + SkGeXmitLED(pAC, IoC, MR_ADDR(Port, TX_LED_INI), SK_LED_ENA); + SkGeXmitLED(pAC, IoC, MR_ADDR(Port, RX_LED_INI), SK_LED_ENA); /* The Link LED is initialized by RLMT or Diagnostics itself */ /* Do NOT initialize the Link Sync Counter */ @@ -1845,4 +1977,4 @@ pAC->GIni.GIAnyPortAct = SK_TRUE; return (0); -} +} /* SkGeInitPort */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/skgepnmi.c linux.20p6/drivers/net/sk98lin/skgepnmi.c --- linux.vanilla/drivers/net/sk98lin/skgepnmi.c Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/skgepnmi.c Tue Jun 19 09:59:54 2001 @@ -2,16 +2,15 @@ * * Name: skgepnmi.c * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.72 $ - * Date: $Date: 1999/12/06 16:15:53 $ + * Version: $Revision: 1.87 $ + * Date: $Date: 2001/04/06 13:35:09 $ * Purpose: Private Network Management Interface * ****************************************************************************/ /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2001 SysKonnect GmbH. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +26,65 @@ * History: * * $Log: skgepnmi.c,v $ + * Revision 1.87 2001/04/06 13:35:09 mkunz + * -Bugs fixed in handling of OID_SKGE_MTU and the VPD OID's + * + * Revision 1.86 2001/03/09 09:18:03 mkunz + * Changes in SK_DBG_MSG + * + * Revision 1.85 2001/03/08 09:37:31 mkunz + * Bugfix in ResetCounter for Pnmi.Port structure + * + * Revision 1.84 2001/03/06 09:04:55 mkunz + * Made some changes in instance calculation + * C ^VS: + * + * Revision 1.83 2001/02/15 09:15:32 mkunz + * Necessary changes for dual net mode added + * + * Revision 1.82 2001/02/07 08:24:19 mkunz + * -Made changes in handling of OID_SKGE_MTU + * + * Revision 1.81 2001/02/06 09:58:00 mkunz + * -Vpd bug fixed + * -OID_SKGE_MTU added + * -pnmi support for dual net mode. Interface function and macros extended + * + * Revision 1.80 2001/01/22 13:41:35 rassmann + * Supporting two nets on dual-port adapters. + * + * Revision 1.79 2000/12/05 14:57:40 cgoos + * SetStruct failed before first Link Up (link mode of virtual + * port "INDETERMINATED"). + * + * Revision 1.78 2000/09/12 10:44:58 cgoos + * Fixed SK_PNMI_STORE_U32 calls with typecasted argument. + * + * Revision 1.77 2000/09/07 08:10:19 rwahl + * - Modified algorithm for 64bit NDIS statistic counters; + * returns 64bit or 32bit value depending on passed buffer + * size. Indicate capability for 64bit NDIS counter, if passed + * buffer size is zero. OID_GEN_XMIT_ERROR, OID_GEN_RCV_ERROR, + * and OID_GEN_RCV_NO_BUFFER handled as 64bit counter, too. + * - corrected OID_SKGE_RLMT_PORT_PREFERRED. + * + * Revision 1.76 2000/08/03 15:23:39 rwahl + * - Correction for FrameTooLong counter has to be moved to OID handling + * routines (instead of statistic counter routine). + * - Fix in XMAC Reset Event handling: Only offset counter for hardware + * statistic registers are updated. + * + * Revision 1.75 2000/08/01 16:46:05 rwahl + * - Added StatRxLongFrames counter and correction of FrameTooLong counter. + * - Added directive to control width (default = 32bit) of NDIS statistic + * counters (SK_NDIS_64BIT_CTR). + * + * Revision 1.74 2000/07/04 11:41:53 rwahl + * - Added volition connector type. + * + * Revision 1.73 2000/03/15 16:33:10 rwahl + * Fixed bug 10510; wrong reset of virtual port statistic counters. + * * Revision 1.72 1999/12/06 16:15:53 rwahl * Fixed problem of instance range for current and factory MAC address. * @@ -44,7 +102,7 @@ * * Revision 1.67 1999/09/22 09:53:20 rwahl * - Read Broadcom register for updating fcs error counter (1000Base-T). - * + * * Revision 1.66 1999/08/26 13:47:56 rwahl * Added SK_DRIVER_SENDEVENT when queueing RLMT_CHANGE_THRES trap. * @@ -53,7 +111,7 @@ * * Revision 1.64 1999/05/20 09:24:12 cgoos * Changes for 1000Base-T (sensors, Master/Slave). - * + * * Revision 1.63 1999/04/13 15:11:58 mhaveman * Moved include of rlmt.h to header skgepnmi.h because some macros * are needed there. @@ -157,7 +215,7 @@ * Revision 1.43 1998/12/03 14:18:10 mhaveman * -Fixed problem in PnmiSetStruct. It was impossible to set any value. * -Removed VPD key evaluation for VPD_FREE_BYTES and VPD_ACTION. - * + * * Revision 1.42 1998/12/03 11:31:47 mhaveman * Inserted cast to satisfy lint. * @@ -192,7 +250,7 @@ * * Revision 1.35 1998/11/16 07:45:34 mhaveman * SkAddrOverride now returns value and will be checked. - * + * * Revision 1.34 1998/11/10 13:40:37 mhaveman * Needed to change interface, because NT driver needs a return value * of needed buffer space on TOO_SHORT errors. Therefore all @@ -212,7 +270,7 @@ * Revision 1.30 1998/11/03 12:04:46 mhaveman * Fixed problem in SENSOR_VALUE, which wrote beyond the buffer end * Fixed alignment problem with CHIPSET. - * + * * Revision 1.29 1998/11/02 11:23:54 mhaveman * Corrected SK_ERROR_LOG to SK_ERR_LOG. Sorry. * @@ -242,14 +300,14 @@ * -Fixed sequence of error return code (INSTANCE -> ACCESS -> SHORT) * -Changed type of parameter Instance back to SK_U32 because of VPD * -Updated new VPD function calls - * + * * Revision 1.23 1998/10/23 10:16:37 mhaveman * Fixed bugs after buffer test simulation. * * Revision 1.22 1998/10/21 13:23:52 mhaveman * -Call syntax of SkOsGetTime() changed to SkOsGetTime(pAc). * -Changed calculation of hundrets of seconds. - * + * * Revision 1.20 1998/10/20 07:30:45 mhaveman * Made type changes to unsigned integer where possible. * @@ -263,12 +321,12 @@ * to HWACCESS. * -Provided all MEMCPY/MEMSET macros with (char *) pointers, because * Solaris throwed warnings when mapping to bcopy/bset. - * + * * Revision 1.17 1998/10/13 07:42:01 mhaveman * -Added OIDs OID_SKGE_TRAP_NUMBER and OID_SKGE_ALL_DATA * -Removed old cvs history entries * -Renamed MacNumber to PortNumber - * + * * Revision 1.16 1998/10/07 10:52:49 mhaveman * -Inserted handling of some OID_GEN_ Ids for windows * -Fixed problem with 803.2 statistic. @@ -304,7 +362,7 @@ static const char SysKonnectFileId[] = - "@(#) $Id: skgepnmi.c,v 1.72 1999/12/06 16:15:53 rwahl Exp $" + "@(#) $Id: skgepnmi.c,v 1.87 2001/04/06 13:35:09 mkunz Exp $" " (C) SysKonnect."; #include "h/skdrv1st.h" @@ -328,14 +386,17 @@ */ int SkPnmiInit(SK_AC *pAC, SK_IOC IoC, int level); int SkPnmiGetVar(SK_AC *pAC, SK_IOC IoC, SK_U32 Id, void *pBuf, - unsigned int *pLen, SK_U32 Instance); + unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex); int SkPnmiPreSetVar(SK_AC *pAC, SK_IOC IoC, SK_U32 Id, void *pBuf, - unsigned int *pLen, SK_U32 Instance); + unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex); int SkPnmiSetVar(SK_AC *pAC, SK_IOC IoC, SK_U32 Id, void *pBuf, - unsigned int *pLen, SK_U32 Instance); -int SkPnmiGetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf, unsigned int *pLen); -int SkPnmiPreSetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf, unsigned int *pLen); -int SkPnmiSetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf, unsigned int *pLen); + unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex); +int SkPnmiGetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf, + unsigned int *pLen, SK_U32 NetIndex); +int SkPnmiPreSetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf, + unsigned int *pLen, SK_U32 NetIndex); +int SkPnmiSetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf, + unsigned int *pLen, SK_U32 NetIndex); int SkPnmiEvent(SK_AC *pAC, SK_IOC IoC, SK_U32 Event, SK_EVPARA Param); @@ -344,7 +405,7 @@ */ static int Addr(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id, char *pBuf, unsigned int *pLen, SK_U32 Instance, - unsigned int TableIndex); + unsigned int TableIndex, SK_U32 NetIndex); static SK_U8 CalculateLinkModeStatus(SK_AC *pAC, SK_IOC IoC, unsigned int PhysPortIndex); static SK_U8 CalculateLinkStatus(SK_AC *pAC, SK_IOC IoC, unsigned int @@ -353,14 +414,14 @@ static void CopyTrapQueue(SK_AC *pAC, char *pDstBuf); static int CsumStat(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id, char *pBuf, unsigned int *pLen, SK_U32 Instance, - unsigned int TableIndex); + unsigned int TableIndex, SK_U32 NetIndex); static int General(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id, char *pBuf, unsigned int *pLen, SK_U32 Instance, - unsigned int TableIndex); + unsigned int TableIndex, SK_U32 NetIndex); static SK_U64 GetPhysStatVal(SK_AC *pAC, SK_IOC IoC, unsigned int PhysPortIndex, unsigned int StatIndex); static SK_U64 GetStatVal(SK_AC *pAC, SK_IOC IoC, unsigned int LogPortIndex, - unsigned int StatIndex); + unsigned int StatIndex, SK_U32 NetIndex); static char* GetTrapEntry(SK_AC *pAC, SK_U32 TrapId, unsigned int Size); static void GetTrapQueueLen(SK_AC *pAC, unsigned int *pLen, unsigned int *pEntries); @@ -369,50 +430,50 @@ static int LookupId(SK_U32 Id); static int Mac8023Stat(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id, char *pBuf, unsigned int *pLen, SK_U32 Instance, - unsigned int TableIndex); + unsigned int TableIndex, SK_U32 NetIndex); static int MacPrivateConf(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id, char *pBuf, unsigned int *pLen, SK_U32 Instance, - unsigned int TableIndex); + unsigned int TableIndex, SK_U32 NetIndex); static int MacPrivateStat(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id, char *pBuf, unsigned int *pLen, SK_U32 Instance, - unsigned int TableIndex); + unsigned int TableIndex, SK_U32 NetIndex); static int MacUpdate(SK_AC *pAC, SK_IOC IoC, unsigned int FirstMac, unsigned int LastMac); static int Monitor(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id, char *pBuf, unsigned int *pLen, SK_U32 Instance, - unsigned int TableIndex); + unsigned int TableIndex, SK_U32 NetIndex); static int OidStruct(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id, char *pBuf, unsigned int *pLen, SK_U32 Instance, - unsigned int TableIndex); + unsigned int TableIndex, SK_U32 NetIndex); static int Perform(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id, char *pBuf, unsigned int* pLen, SK_U32 Instance, - unsigned int TableIndex); + unsigned int TableIndex, SK_U32 NetIndex); static int PnmiStruct(SK_AC *pAC, SK_IOC IoC, int Action, char *pBuf, - unsigned int *pLen); + unsigned int *pLen, SK_U32 NetIndex); static int PnmiVar(SK_AC *pAC, SK_IOC IoC, int Action, SK_U32 Id, - char *pBuf, unsigned int *pLen, SK_U32 Instance); + char *pBuf, unsigned int *pLen, SK_U32 Instance, SK_U32 NetIndex); static void QueueRlmtNewMacTrap(SK_AC *pAC, unsigned int ActiveMac); static void QueueRlmtPortTrap(SK_AC *pAC, SK_U32 TrapId, unsigned int PortIndex); static void QueueSensorTrap(SK_AC *pAC, SK_U32 TrapId, unsigned int SensorIndex); static void QueueSimpleTrap(SK_AC *pAC, SK_U32 TrapId); -static void ResetCounter(SK_AC *pAC, SK_IOC IoC); +static void ResetCounter(SK_AC *pAC, SK_IOC IoC, SK_U32 NetIndex); static int Rlmt(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id, char *pBuf, unsigned int *pLen, SK_U32 Instance, - unsigned int TableIndex); + unsigned int TableIndex, SK_U32 NetIndex); static int RlmtStat(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id, char *pBuf, unsigned int *pLen, SK_U32 Instance, - unsigned int TableIndex); -static int RlmtUpdate(SK_AC *pAC, SK_IOC IoC); + unsigned int TableIndex, SK_U32 NetIndex); +static int RlmtUpdate(SK_AC *pAC, SK_IOC IoC, SK_U32 NetIndex); static int SensorStat(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id, char *pBuf, unsigned int *pLen, SK_U32 Instance, - unsigned int TableIndex); + unsigned int TableIndex, SK_U32 NetIndex); static int SirqUpdate(SK_AC *pAC, SK_IOC IoC); static void VirtualConf(SK_AC *pAC, SK_IOC IoC, SK_U32 Id, char *pBuf); static int Vpd(SK_AC *pAC, SK_IOC IoC, int action, SK_U32 Id, char *pBuf, unsigned int *pLen, SK_U32 Instance, - unsigned int TableIndex); + unsigned int TableIndex, SK_U32 NetIndex); /****************************************************************************** @@ -990,6 +1051,11 @@ sizeof(SK_PNMI_STAT), SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxUnicastOkCts), SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_UNICAST}, + {OID_SKGE_STAT_RX_LONGFRAMES, + SK_PNMI_MAC_ENTRIES, + sizeof(SK_PNMI_STAT), + SK_PNMI_OFF(Stat) + SK_PNMI_STA_OFF(StatRxLongFramesCts), + SK_PNMI_RO, MacPrivateStat, SK_PNMI_HRX_LONGFRAMES}, {OID_SKGE_STAT_RX_PFLOWC, SK_PNMI_MAC_ENTRIES, sizeof(SK_PNMI_STAT), @@ -1205,7 +1271,7 @@ 0, SK_PNMI_MAI_OFF(RlmtPortActive), SK_PNMI_RO, Rlmt, 0}, - {OID_SKGE_RLMT_PORT_PREFERED, + {OID_SKGE_RLMT_PORT_PREFERRED, 1, 0, SK_PNMI_MAI_OFF(RlmtPortPreferred), @@ -1290,11 +1356,16 @@ sizeof(SK_PNMI_RLMT_MONITOR), SK_PNMI_OFF(RlmtMonitor) + SK_PNMI_MON_OFF(RlmtMonitorAdmin), SK_PNMI_RW, Monitor, 0}, + {OID_SKGE_MTU, + 1, + 0, + SK_PNMI_MAI_OFF(MtuSize), + SK_PNMI_RW, MacPrivateConf, 0}, }; /* * Table for hardware register saving on resets and port switches -*/ + */ static const SK_PNMI_STATADDR StatAddress[SK_PNMI_MAX_IDX] = { /* 0 */ {TRUE, XM_TXF_OK}, /* 1 */ {TRUE, 0}, @@ -1361,7 +1432,8 @@ /* 62 */ {TRUE, XM_RXF_1023B}, /* 63 */ {TRUE, XM_RXF_MAX_SZ}, /* 64 */ {FALSE, 0}, - /* 65 */ {FALSE, 0} + /* 65 */ {FALSE, 0}, + /* 66 */ {TRUE, 0} }; @@ -1411,6 +1483,7 @@ for (PortIndex = 0; PortIndex < SK_MAX_MACS; PortIndex ++) { pAC->Pnmi.Port[PortIndex].ActiveFlag = SK_FALSE; + pAC->Pnmi.DualNetActiveFlag = SK_FALSE; } break; @@ -1528,6 +1601,10 @@ pAC->Pnmi.Connector = 5; break; + case 'V': + pAC->Pnmi.Connector = 6; + break; + default: pAC->Pnmi.Connector = 1; break; @@ -1562,7 +1639,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed - * SK_PNMI_ERR_GENERAL A general severe internal error occured + * SK_PNMI_ERR_GENERAL A general severe internal error occurred * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to take * the data. * SK_PNMI_ERR_UNKNOWN_OID The requested OID is unknown @@ -1577,14 +1654,15 @@ SK_U32 Id, /* Object ID that is to be processed */ void *pBuf, /* Buffer to which to mgmt data will be retrieved */ unsigned int *pLen, /* On call: buffer length. On return: used buffer */ -SK_U32 Instance) /* Instance (1..n) that is to be queried or -1 */ +SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, - ("PNMI: SkPnmiGetVar: Called, Id=0x%x, BufLen=%d\n", Id, - *pLen)); + ("PNMI: SkPnmiGetVar: Called, Id=0x%x, BufLen=%d, Instance=%d, NetIndex=%d\n", + Id, *pLen, Instance, NetIndex)); return (PnmiVar(pAC, IoC, SK_PNMI_GET, Id, (char *)pBuf, pLen, - Instance)); + Instance, NetIndex)); } /***************************************************************************** @@ -1600,7 +1678,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -1619,14 +1697,16 @@ SK_U32 Id, /* Object ID that is to be processed */ void *pBuf, /* Buffer which stores the mgmt data to be set */ unsigned int *pLen, /* Total length of mgmt data */ -SK_U32 Instance) /* Instance (1..n) that is to be set or -1 */ +SK_U32 Instance, /* Instance (1..n) that is to be set or -1 */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, - ("PNMI: SkPnmiPreSetVar: Called, Id=0x%x, BufLen=%d\n", - Id, *pLen)); + ("PNMI: SkPnmiPreSetVar: Called, Id=0x%x, BufLen=%d, Instance=%d, NetIndex=%d\n", + Id, *pLen, Instance, NetIndex)); + return (PnmiVar(pAC, IoC, SK_PNMI_PRESET, Id, (char *)pBuf, pLen, - Instance)); + Instance, NetIndex)); } /***************************************************************************** @@ -1642,7 +1722,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -1661,14 +1741,15 @@ SK_U32 Id, /* Object ID that is to be processed */ void *pBuf, /* Buffer which stores the mgmt data to be set */ unsigned int *pLen, /* Total length of mgmt data */ -SK_U32 Instance) /* Instance (1..n) that is to be set or -1 */ +SK_U32 Instance, /* Instance (1..n) that is to be set or -1 */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, - ("PNMI: SkPnmiSetVar: Called, Id=0x%x, BufLen=%d\n", Id, - *pLen)); + ("PNMI: SkPnmiSetVar: Called, Id=0x%x, BufLen=%d, Instance=%d, NetIndex=%d\n", + Id, *pLen, Instance, NetIndex)); return (PnmiVar(pAC, IoC, SK_PNMI_SET, Id, (char *)pBuf, pLen, - Instance)); + Instance, NetIndex)); } /***************************************************************************** @@ -1685,16 +1766,18 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed - * SK_PNMI_ERR_GENERAL A general severe internal error occured + * SK_PNMI_ERR_GENERAL A general severe internal error occurred * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to take * the data. + * SK_PNMI_ERR_UNKNOWN_NET The requested NetIndex doesn't exist */ int SkPnmiGetStruct( SK_AC *pAC, /* Pointer to adapter context */ SK_IOC IoC, /* IO context handle */ void *pBuf, /* Buffer which will store the retrieved data */ -unsigned int *pLen) /* Length of buffer */ +unsigned int *pLen, /* Length of buffer */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { int Ret; unsigned int TableIndex; @@ -1703,11 +1786,12 @@ unsigned int InstanceCnt; SK_U32 Instance; unsigned int TmpLen; - char KeyArr[SK_PNMI_VPD_ARR_SIZE][SK_PNMI_VPD_STR_SIZE]; + char KeyArr[SK_PNMI_VPD_ENTRIES][SK_PNMI_VPD_KEY_SIZE]; + - SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, - ("PNMI: SkPnmiGetStruct: Called, BufLen=%d\n", *pLen)); + ("PNMI: SkPnmiGetStruct: Called, BufLen=%d, NetIndex=%d\n", + *pLen, NetIndex)); if (*pLen < SK_PNMI_STRUCT_SIZE) { @@ -1721,6 +1805,13 @@ return (SK_PNMI_ERR_TOO_SHORT); } + /* + * Check NetIndex + */ + if (NetIndex >= pAC->Rlmt.NumNets) { + return (SK_PNMI_ERR_UNKNOWN_NET); + } + /* Update statistic */ SK_PNMI_CHECKFLAGS("SkPnmiGetStruct: On call"); @@ -1732,7 +1823,7 @@ return (Ret); } - if ((Ret = RlmtUpdate(pAC, IoC)) != SK_PNMI_ERR_OK) { + if ((Ret = RlmtUpdate(pAC, IoC, NetIndex)) != SK_PNMI_ERR_OK) { SK_PNMI_SET_STAT(pBuf, Ret, (SK_U32)(-1)); *pLen = SK_PNMI_MIN_STRUCT_SIZE; @@ -1774,7 +1865,6 @@ TableIndex ++) { InstanceNo = IdTable[TableIndex].InstanceNo; - for (InstanceCnt = 1; InstanceCnt <= InstanceNo; InstanceCnt ++) { @@ -1792,8 +1882,7 @@ IdTable[TableIndex].Id == OID_SKGE_VPD_ACCESS || IdTable[TableIndex].Id == OID_SKGE_VPD_ACTION) { - SK_PNMI_READ_U32(KeyArr[InstanceCnt - 1], - Instance); + SK_STRNCPY((char *)&Instance, KeyArr[InstanceCnt - 1], 4); } else { Instance = (SK_U32)InstanceCnt; @@ -1802,7 +1891,7 @@ TmpLen = *pLen - DstOffset; Ret = IdTable[TableIndex].Func(pAC, IoC, SK_PNMI_GET, IdTable[TableIndex].Id, (char *)pBuf + - DstOffset, &TmpLen, Instance, TableIndex); + DstOffset, &TmpLen, Instance, TableIndex, NetIndex); /* * An unknown instance error means that we reached @@ -1812,7 +1901,7 @@ */ if (Ret == SK_PNMI_ERR_UNKNOWN_INST) { - break; + break; } if (Ret != SK_PNMI_ERR_OK) { @@ -1855,7 +1944,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -1867,12 +1956,15 @@ SK_AC *pAC, /* Pointer to adapter context */ SK_IOC IoC, /* IO context handle */ void *pBuf, /* Buffer which contains the data to be set */ -unsigned int *pLen) /* Length of buffer */ +unsigned int *pLen, /* Length of buffer */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, - ("PNMI: SkPnmiPreSetStruct: Called, BufLen=%d\n", *pLen)); + ("PNMI: SkPnmiPreSetStruct: Called, BufLen=%d, NetIndex=%d\n", + *pLen, NetIndex)); - return (PnmiStruct(pAC, IoC, SK_PNMI_PRESET, (char *)pBuf, pLen)); + return (PnmiStruct(pAC, IoC, SK_PNMI_PRESET, (char *)pBuf, + pLen, NetIndex)); } /***************************************************************************** @@ -1891,7 +1983,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -1903,12 +1995,15 @@ SK_AC *pAC, /* Pointer to adapter context */ SK_IOC IoC, /* IO context handle */ void *pBuf, /* Buffer which contains the data to be set */ -unsigned int *pLen) /* Length of buffer */ +unsigned int *pLen, /* Length of buffer */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, - ("PNMI: SkPnmiSetStruct: Called, BufLen=%d\n", *pLen)); + ("PNMI: SkPnmiSetStruct: Called, BufLen=%d, NetIndex=%d\n", + *pLen, NetIndex)); - return (PnmiStruct(pAC, IoC, SK_PNMI_SET, (char *)pBuf, pLen)); + return (PnmiStruct(pAC, IoC, SK_PNMI_SET, (char *)pBuf, + pLen, NetIndex)); } /***************************************************************************** @@ -1943,11 +2038,6 @@ * SK_PNMI_EVT_RLMT_PORT_DOWN Generated by RLMT to notify that a port * went logically down. A trap message will * be stored to the trap buffer. - * SK_PNMI_EVT_RLMT_PORT_SWITCH Generated by RLMT to notify that the - * active port switched. PNMI will split - * this into two message ACTIVE_DOWN and - * ACTIVE_UP to be future compatible with - * load balancing and card fail over. * SK_PNMI_EVT_RLMT_SEGMENTATION Generated by RLMT to notify that two * spanning tree root bridges were * detected. A trap message will be stored @@ -1959,6 +2049,9 @@ * is now an active port. PNMI will now * add the statistic data of this port to * the virtual port. + * SK_PNMI_EVT_RLMT_SET_NETS Notifies PNMI about the net mode. The first Parameter + * contains the number of nets. 1 means single net, 2 means + * dual net. The second Parameter is -1 * * Returns: * Always 0 @@ -1971,6 +2064,7 @@ SK_EVPARA Param) /* Event dependent parameter */ { unsigned int PhysPortIndex; + unsigned int MaxNetNumber; int CounterIndex; int Ret; SK_U16 MacStatus; @@ -1984,6 +2078,7 @@ SK_U64 OldestValue; SK_U64 Delta; SK_PNMI_ESTIMATE *pEst; + SK_U32 NetIndex; #ifdef DEBUG @@ -2082,8 +2177,13 @@ case SK_PNMI_HRX_OCTETLOW: case SK_PNMI_HRX_IRLENGTH: case SK_PNMI_HRX_RESERVED22: + + /* + * the following counters aren't be handled (id > 63) + */ case SK_PNMI_HTX_SYNC: case SK_PNMI_HTX_SYNC_OCTET: + case SK_PNMI_HRX_LONGFRAMES: break; default: @@ -2241,9 +2341,27 @@ case SK_PNMI_EVT_CLEAR_COUNTER: /* + * Param.Para32[0] contains the NetIndex (0 ..1). + * Param.Para32[1] is reserved, contains -1. + */ + NetIndex = (SK_U32)Param.Para32[0]; + +#ifdef DEBUG + if (NetIndex >= pAC->Rlmt.NumNets) { + + SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, + ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_CLEAR_COUNTER parameter wrong, NetIndex=%d\n", + NetIndex)); + + return (0); + } +#endif + + /* * Set all counters and timestamps to zero */ - ResetCounter(pAC, IoC); + ResetCounter(pAC, IoC, NetIndex); /* the according NetIndex is required + as a Parameter of the Event */ break; case SK_PNMI_EVT_XMAC_RESET: @@ -2278,7 +2396,7 @@ */ pAC->Pnmi.MacUpdatedFlag ++; - for (CounterIndex = 0; CounterIndex < SK_PNMI_MAX_IDX; + for (CounterIndex = 0; CounterIndex < SK_PNMI_SCNT_NOT; CounterIndex ++) { if (!StatAddress[CounterIndex].GetOffset) { @@ -2308,9 +2426,8 @@ } #endif /* - * Store a trap message in the trap buffer and generate - * an event for user space applications with the - * SK_DRIVER_SENDEVENT macro. + * Store a trap message in the trap buffer and generate an event for + * user space applications with the SK_DRIVER_SENDEVENT macro. */ QueueRlmtPortTrap(pAC, OID_SKGE_TRAP_RLMT_PORT_UP, (unsigned int)Param.Para32[0]); @@ -2329,9 +2446,8 @@ } #endif /* - * Store a trap message in the trap buffer and generate - * an event for user space applications with the - * SK_DRIVER_SENDEVENT macro. + * Store a trap message in the trap buffer and generate an event for + * user space applications with the SK_DRIVER_SENDEVENT macro. */ QueueRlmtPortTrap(pAC, OID_SKGE_TRAP_RLMT_PORT_DOWN, (unsigned int)Param.Para32[0]); @@ -2340,6 +2456,7 @@ case SK_PNMI_EVT_RLMT_ACTIVE_DOWN: PhysPortIndex = (unsigned int)Param.Para32[0]; + NetIndex = (SK_U32)Param.Para32[1]; #ifdef DEBUG if (PhysPortIndex >= SK_MAX_MACS) { @@ -2347,8 +2464,23 @@ ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_RLMT_ACTIVE_DOWN parameter too high, PhysPort=%d\n", PhysPortIndex)); } + + if (NetIndex >= pAC->Rlmt.NumNets) { + + SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, + ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_RLMT_ACTIVE_DOWN parameter too high, NetIndex=%d\n", + NetIndex)); + } #endif /* + * For now, ignore event if NetIndex != 0. + */ + if (Param.Para32[1] != 0) { + + return (0); + } + + /* * Nothing to do if port is already inactive */ if (!pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) { @@ -2357,9 +2489,9 @@ } /* - * Update statistic counters to calculate new offset - * for the virtual port and increment semaphore to - * indicate that an update was already done. + * Update statistic counters to calculate new offset for the virtual + * port and increment semaphore to indicate that an update was already + * done. */ if (MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1) != SK_PNMI_ERR_OK) { @@ -2370,13 +2502,12 @@ pAC->Pnmi.MacUpdatedFlag ++; /* - * Calculate new counter offset for virtual port to - * grant continous counting on port switches. The virtual - * port consists of all currently active ports. The port - * down event indicates that a port is removed fromt the - * virtual port. Therefore add the counter value of the - * removed port to the CounterOffset for the virtual port - * to grant the same counter value. + * Calculate new counter offset for virtual port to grant continous + * counting on port switches. The virtual port consists of all currently + * active ports. The port down event indicates that a port is removed + * from the virtual port. Therefore add the counter value of the removed + * port to the CounterOffset for the virtual port to grant the same + * counter value. */ for (CounterIndex = 0; CounterIndex < SK_PNMI_MAX_IDX; CounterIndex ++) { @@ -2386,8 +2517,7 @@ continue; } - Value = GetPhysStatVal(pAC, IoC, PhysPortIndex, - CounterIndex); + Value = GetPhysStatVal(pAC, IoC, PhysPortIndex, CounterIndex); pAC->Pnmi.VirtualCounterOffset[CounterIndex] += Value; } @@ -2402,6 +2532,7 @@ case SK_PNMI_EVT_RLMT_ACTIVE_UP: PhysPortIndex = (unsigned int)Param.Para32[0]; + NetIndex = (SK_U32)Param.Para32[1]; #ifdef DEBUG if (PhysPortIndex >= SK_MAX_MACS) { @@ -2409,8 +2540,23 @@ ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_RLMT_ACTIVE_UP parameter too high, PhysPort=%d\n", PhysPortIndex)); } + + if (NetIndex >= pAC->Rlmt.NumNets) { + + SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, + ("PNMI: ERR: SkPnmiEvent: SK_PNMI_EVT_RLMT_ACTIVE_UP parameter too high, NetIndex=%d\n", + NetIndex)); + } #endif /* + * For now, ignore event if NetIndex != 0. + */ + if (Param.Para32[1] != 0) { + + return (0); + } + + /* * Nothing to do if port is already active */ if (pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) { @@ -2419,24 +2565,22 @@ } /* - * Statistic maintanence + * Statistic maintenance */ pAC->Pnmi.RlmtChangeCts ++; - pAC->Pnmi.RlmtChangeTime = - SK_PNMI_HUNDREDS_SEC(SkOsGetTime(pAC)); + pAC->Pnmi.RlmtChangeTime = SK_PNMI_HUNDREDS_SEC(SkOsGetTime(pAC)); /* - * Store a trap message in the trap buffer and generate - * an event for user space applications with the - * SK_DRIVER_SENDEVENT macro. + * Store a trap message in the trap buffer and generate an event for + * user space applications with the SK_DRIVER_SENDEVENT macro. */ QueueRlmtNewMacTrap(pAC, PhysPortIndex); (void)SK_DRIVER_SENDEVENT(pAC, IoC); /* - * Update statistic counters to calculate new offset - * for the virtual port and increment semaphore to indicate - * that an update was already done. + * Update statistic counters to calculate new offset for the virtual + * port and increment semaphore to indicate that an update was + * already done. */ if (MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1) != SK_PNMI_ERR_OK) { @@ -2447,11 +2591,10 @@ pAC->Pnmi.MacUpdatedFlag ++; /* - * Calculate new counter offset for virtual port to - * grant continous counting on port switches. A new port - * is added to the virtual port. Therefore substract the - * counter value of the new port from the CounterOffset - * for the virtual port to grant the same value. + * Calculate new counter offset for virtual port to grant continous + * counting on port switches. A new port is added to the virtual port. + * Therefore substract the counter value of the new port from the + * CounterOffset for the virtual port to grant the same value. */ for (CounterIndex = 0; CounterIndex < SK_PNMI_MAX_IDX; CounterIndex ++) { @@ -2461,8 +2604,7 @@ continue; } - Value = GetPhysStatVal(pAC, IoC, PhysPortIndex, - CounterIndex); + Value = GetPhysStatVal(pAC, IoC, PhysPortIndex, CounterIndex); pAC->Pnmi.VirtualCounterOffset[CounterIndex] -= Value; } @@ -2475,40 +2617,41 @@ pAC->Pnmi.MacUpdatedFlag --; break; - case SK_PNMI_EVT_RLMT_PORT_SWITCH: + case SK_PNMI_EVT_RLMT_SEGMENTATION: /* - * This event becomes obsolete if RLMT generates directly - * the events SK_PNMI_EVT_RLMT_ACTIVE_DOWN and - * SK_PNMI_EVT_RLMT_ACTIVE_UP. The events are here emulated. - * PNMI handles that multiple ports may become active. - * Increment semaphore to indicate that an update was - * already done. + * Para.Para32[0] contains the NetIndex. */ - if (MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1) != - SK_PNMI_ERR_OK) { - - SK_PNMI_CHECKFLAGS("SkPnmiEvent: On return"); - return (0); - } - pAC->Pnmi.MacUpdatedFlag ++; - - SkPnmiEvent(pAC, IoC, SK_PNMI_EVT_RLMT_ACTIVE_DOWN, Param); - Param.Para32[0] = Param.Para32[1]; - SkPnmiEvent(pAC, IoC, SK_PNMI_EVT_RLMT_ACTIVE_UP, Param); - - pAC->Pnmi.MacUpdatedFlag --; - break; - case SK_PNMI_EVT_RLMT_SEGMENTATION: /* - * Store a trap message in the trap buffer and generate - * an event for user space applications with the - * SK_DRIVER_SENDEVENT macro. + * Store a trap message in the trap buffer and generate an event for + * user space applications with the SK_DRIVER_SENDEVENT macro. */ QueueSimpleTrap(pAC, OID_SKGE_TRAP_RLMT_SEGMENTATION); (void)SK_DRIVER_SENDEVENT(pAC, IoC); break; + case SK_PNMI_EVT_RLMT_SET_NETS: + /* + * Param.Para32[0] contains the number of Nets. + * Param.Para32[1] is reserved, contains -1. + */ + /* + * Check number of nets + */ + MaxNetNumber = pAC->GIni.GIMacsFound; + if (((unsigned int)Param.Para32[0] < 1) + || ((unsigned int)Param.Para32[0] > MaxNetNumber)) { + return (SK_PNMI_ERR_UNKNOWN_NET); + } + + if((unsigned int)Param.Para32[0] == 1){ /* single net mode */ + pAC->Pnmi.DualNetActiveFlag = SK_FALSE; + } + else { /* dual net mode */ + pAC->Pnmi.DualNetActiveFlag = SK_TRUE; + } + break; + default: break; } @@ -2537,6 +2680,7 @@ * Returns: * SK_PNMI_ERR_XXX. For details have a look to the description of the * calling functions. + * SK_PNMI_ERR_UNKNOWN_NET The requested NetIndex doesn't exist */ static int PnmiVar( @@ -2546,7 +2690,8 @@ SK_U32 Id, /* Object ID that is to be processed */ char *pBuf, /* Buffer which stores the mgmt data to be set */ unsigned int *pLen, /* Total length of mgmt data */ -SK_U32 Instance) /* Instance (1..n) that is to be set or -1 */ +SK_U32 Instance, /* Instance (1..n) that is to be set or -1 */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { unsigned int TableIndex; int Ret; @@ -2557,11 +2702,18 @@ *pLen = 0; return (SK_PNMI_ERR_UNKNOWN_OID); } + + /* + * Check NetIndex + */ + if (NetIndex >= pAC->Rlmt.NumNets) { + return (SK_PNMI_ERR_UNKNOWN_NET); + } SK_PNMI_CHECKFLAGS("PnmiVar: On call"); Ret = IdTable[TableIndex].Func(pAC, IoC, Action, Id, pBuf, pLen, - Instance, TableIndex); + Instance, TableIndex, NetIndex); SK_PNMI_CHECKFLAGS("PnmiVar: On return"); @@ -2584,6 +2736,7 @@ * * Returns: * SK_PNMI_ERR_XXX. The codes are described in the calling functions. + * SK_PNMI_ERR_UNKNOWN_NET The requested NetIndex doesn't exist */ static int PnmiStruct( @@ -2591,7 +2744,8 @@ SK_IOC IoC, /* IO context handle */ int Action, /* Set action to be performed */ char *pBuf, /* Buffer which contains the data to be set */ -unsigned int *pLen) /* Length of buffer */ +unsigned int *pLen, /* Length of buffer */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { int Ret; unsigned int TableIndex; @@ -2617,13 +2771,20 @@ return (SK_PNMI_ERR_TOO_SHORT); } + /* + * Check NetIndex + */ + if (NetIndex >= pAC->Rlmt.NumNets) { + return (SK_PNMI_ERR_UNKNOWN_NET); + } + SK_PNMI_CHECKFLAGS("PnmiStruct: On call"); /* * Update the values of RLMT and SIRQ and increment semaphores to * indicate that an update was already done. */ - if ((Ret = RlmtUpdate(pAC, IoC)) != SK_PNMI_ERR_OK) { + if ((Ret = RlmtUpdate(pAC, IoC, NetIndex)) != SK_PNMI_ERR_OK) { SK_PNMI_SET_STAT(pBuf, Ret, (SK_U32)(-1)); *pLen = SK_PNMI_MIN_STRUCT_SIZE; @@ -2673,7 +2834,7 @@ Len = 0; Ret = IdTable[TableIndex].Func(pAC, IoC, SK_PNMI_GET, IdTable[TableIndex].Id, - NULL, &Len, Instance, TableIndex); + NULL, &Len, Instance, TableIndex, NetIndex); if (Ret == SK_PNMI_ERR_UNKNOWN_INST) { @@ -2711,7 +2872,7 @@ /* Call the OID handler function */ Ret = IdTable[TableIndex].Func(pAC, IoC, Action, IdTable[TableIndex].Id, pBuf + DstOffset, - &Len, Instance, TableIndex); + &Len, Instance, TableIndex, NetIndex); if (Ret != SK_PNMI_ERR_OK) { @@ -2773,7 +2934,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -2793,7 +2954,8 @@ char *pBuf, /* Buffer to which to mgmt data will be retrieved */ unsigned int *pLen, /* On call: buffer length. On return: used buffer */ SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */ -unsigned int TableIndex) /* Index to the Id table */ +unsigned int TableIndex, /* Index to the Id table */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { if (Id != OID_SKGE_ALL_DATA) { @@ -2816,13 +2978,13 @@ switch (Action) { case SK_PNMI_GET: - return (SkPnmiGetStruct(pAC, IoC, pBuf, pLen)); + return (SkPnmiGetStruct(pAC, IoC, pBuf, pLen, NetIndex)); case SK_PNMI_PRESET: - return (SkPnmiPreSetStruct(pAC, IoC, pBuf, pLen)); + return (SkPnmiPreSetStruct(pAC, IoC, pBuf, pLen, NetIndex)); case SK_PNMI_SET: - return (SkPnmiSetStruct(pAC, IoC, pBuf, pLen)); + return (SkPnmiSetStruct(pAC, IoC, pBuf, pLen, NetIndex)); } SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR004, SK_PNMI_ERR004MSG); @@ -2840,7 +3002,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -2860,7 +3022,8 @@ char *pBuf, /* Buffer to which to mgmt data will be retrieved */ unsigned int *pLen, /* On call: buffer length. On return: used buffer */ SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */ -unsigned int TableIndex) /* Index to the Id table */ +unsigned int TableIndex, /* Index to the Id table */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { int Ret; SK_U32 ActionOp; @@ -2949,7 +3112,7 @@ case SK_PNMI_ACT_RESETCNT: /* Set all counters and timestamps to zero */ - ResetCounter(pAC, IoC); + ResetCounter(pAC, IoC, NetIndex); break; default: @@ -2974,7 +3137,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -2991,11 +3154,12 @@ char *pBuf, /* Buffer to which to mgmt data will be retrieved */ unsigned int *pLen, /* On call: buffer length. On return: used buffer */ SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */ -unsigned int TableIndex) /* Index to the Id table */ +unsigned int TableIndex, /* Index to the Id table */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { - int Ret; - SK_U32 StatVal; - + int Ret; + SK_U64 StatVal; + SK_BOOL Is64BitReq = SK_FALSE; /* * Only the active Mac is returned @@ -3030,11 +3194,28 @@ break; default: - if (*pLen < 4) { +#ifndef SK_NDIS_64BIT_CTR + if (*pLen < sizeof(SK_U32)) { + *pLen = sizeof(SK_U32); + return (SK_PNMI_ERR_TOO_SHORT); + } - *pLen = 4; +#else /* SK_NDIS_64BIT_CTR */ + + /* + * for compatibility, at least 32bit are required for oid + */ + if (*pLen < sizeof(SK_U32)) { + /* + * but indicate handling for 64bit values, + * if insufficient space is provided + */ + *pLen = sizeof(SK_U64); return (SK_PNMI_ERR_TOO_SHORT); } + + Is64BitReq = (*pLen < sizeof(SK_U64)) ? SK_FALSE : SK_TRUE; +#endif /* SK_NDIS_64BIT_CTR */ break; } @@ -3057,20 +3238,31 @@ switch (Id) { case OID_802_3_PERMANENT_ADDRESS: - CopyMac(pBuf, &pAC->Addr.PermanentMacAddress); + CopyMac(pBuf, &pAC->Addr.Net[NetIndex].PermanentMacAddress); *pLen = sizeof(SK_MAC_ADDR); break; case OID_802_3_CURRENT_ADDRESS: - CopyMac(pBuf, &pAC->Addr.CurrentMacAddress); + CopyMac(pBuf, &pAC->Addr.Net[NetIndex].CurrentMacAddress); *pLen = sizeof(SK_MAC_ADDR); break; default: - StatVal = (SK_U32)GetStatVal(pAC, IoC, 0, - IdTable[TableIndex].Param); - SK_PNMI_STORE_U32(pBuf, StatVal); - *pLen = sizeof(SK_U32); + StatVal = GetStatVal(pAC, IoC, 0, IdTable[TableIndex].Param, NetIndex); + + /* + * by default 32bit values are evaluated + */ + if (!Is64BitReq) { + SK_U32 StatVal32; + StatVal32 = (SK_U32)StatVal; + SK_PNMI_STORE_U32(pBuf, StatVal32); + *pLen = sizeof(SK_U32); + } + else { + SK_PNMI_STORE_U64(pBuf, StatVal); + *pLen = sizeof(SK_U64); + } break; } @@ -3088,7 +3280,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -3105,7 +3297,8 @@ char *pBuf, /* Buffer to which to mgmt data will be retrieved */ unsigned int *pLen, /* On call: buffer length. On return: used buffer */ SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */ -unsigned int TableIndex) /* Index to the Id table */ +unsigned int TableIndex, /* Index to the Id table */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { unsigned int LogPortMax; unsigned int LogPortIndex; @@ -3123,22 +3316,28 @@ PhysPortMax = pAC->GIni.GIMacsFound; LogPortMax = SK_PNMI_PORT_PHYS2LOG(PhysPortMax); - if ((Instance != (SK_U32)(-1))) { + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ /* Dual net mode */ + LogPortMax--; + } + if ((Instance != (SK_U32)(-1))) { /* Only one specific instance is queried */ + /* Check instance range */ if ((Instance < 1) || (Instance > LogPortMax)) { *pLen = 0; return (SK_PNMI_ERR_UNKNOWN_INST); } - LogPortIndex = SK_PNMI_PORT_INST2LOG(Instance); Limit = LogPortIndex + 1; } - else { + + else { /* Instance == (SK_U32)(-1), get all Instances of that OID */ + LogPortIndex = 0; Limit = LogPortMax; } + /* * Check action */ @@ -3161,7 +3360,7 @@ * Update XMAC statistic and increment semaphore to indicate that * an update was already done. */ - Ret = MacUpdate(pAC, IoC, 0, PhysPortMax - 1); + Ret = MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1); if (Ret != SK_PNMI_ERR_OK) { *pLen = 0; @@ -3185,9 +3384,23 @@ case OID_SKGE_STAT_RX_UTIL: return (SK_PNMI_ERR_GENERAL); */ + /* + * Frames longer than IEEE 802.3 frame max size are counted + * by XMAC in frame_too_long counter even reception of long + * frames was enabled and the frame was correct. + * So correct the value by subtracting RxLongFrame counter. + */ + case OID_SKGE_STAT_RX_TOO_LONG: + StatVal = GetStatVal(pAC, IoC, LogPortIndex, + IdTable[TableIndex].Param, NetIndex) - + GetStatVal(pAC, IoC, LogPortIndex, + SK_PNMI_HRX_LONGFRAMES, NetIndex); + SK_PNMI_STORE_U64(pBuf + Offset, StatVal); + break; + default: StatVal = GetStatVal(pAC, IoC, LogPortIndex, - IdTable[TableIndex].Param); + IdTable[TableIndex].Param, NetIndex); SK_PNMI_STORE_U64(pBuf + Offset, StatVal); break; } @@ -3214,7 +3427,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -3234,7 +3447,8 @@ char *pBuf, /* Buffer to which to mgmt data will be retrieved */ unsigned int *pLen, /* On call: buffer length. On return: used buffer */ SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */ -unsigned int TableIndex) /* Index to the Id table */ +unsigned int TableIndex, /* Index to the Id table */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { int Ret; unsigned int LogPortMax; @@ -3245,24 +3459,31 @@ unsigned int Offset = 0; + /* - * Calculate instance if wished + * Calculate instance if wished. MAC index 0 is the virtual + * MAC. */ PhysPortMax = pAC->GIni.GIMacsFound; LogPortMax = SK_PNMI_PORT_PHYS2LOG(PhysPortMax); - if ((Instance != (SK_U32)(-1))) { - + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ /* Dual net mode */ + LogPortMax--; + } + + if ((Instance != (SK_U32)(-1))) { /* Only one specific instance is queried */ + /* Check instance range */ if ((Instance < 1) || (Instance > LogPortMax)) { *pLen = 0; return (SK_PNMI_ERR_UNKNOWN_INST); } - LogPortIndex = SK_PNMI_PORT_INST2LOG(Instance); Limit = LogPortIndex + 1; } - else { + + else { /* Instance == (SK_U32)(-1), get all Instances of that OID */ + LogPortIndex = 0; Limit = LogPortMax; } @@ -3290,34 +3511,28 @@ case OID_SKGE_PHYS_CUR_ADDR: if (LogPortIndex == 0) { - - CopyMac(pBuf + Offset, &pAC->Addr. - CurrentMacAddress); + CopyMac(pBuf + Offset, &pAC->Addr.Net[NetIndex].CurrentMacAddress); } else { - PhysPortIndex = SK_PNMI_PORT_LOG2PHYS( - pAC, LogPortIndex); + PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(pAC, LogPortIndex); - CopyMac(pBuf + Offset, &pAC->Addr. - Port[PhysPortIndex]. - CurrentMacAddress); + CopyMac(pBuf + Offset, + &pAC->Addr.Port[PhysPortIndex].CurrentMacAddress); } Offset += 6; break; case OID_SKGE_PHYS_FAC_ADDR: if (LogPortIndex == 0) { - - CopyMac(pBuf + Offset, &pAC->Addr. - PermanentMacAddress); + CopyMac(pBuf + Offset, + &pAC->Addr.Net[NetIndex].PermanentMacAddress); } else { PhysPortIndex = SK_PNMI_PORT_LOG2PHYS( pAC, LogPortIndex); - CopyMac(pBuf + Offset, &pAC->Addr. - Port[PhysPortIndex]. - PermanentMacAddress); + CopyMac(pBuf + Offset, + &pAC->Addr.Port[PhysPortIndex].PermanentMacAddress); } Offset += 6; break; @@ -3424,7 +3639,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -3441,7 +3656,8 @@ char *pBuf, /* Buffer to which to mgmt data will be retrieved */ unsigned int *pLen, /* On call: buffer length. On return: used buffer */ SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */ -unsigned int TableIndex) /* Index to the Id table */ +unsigned int TableIndex, /* Index to the Id table */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { unsigned int Index; unsigned int Limit; @@ -3453,15 +3669,14 @@ * Calculate instance if wished */ if (Instance != (SK_U32)(-1)) { - + if ((Instance < 1) || (Instance > SKCS_NUM_PROTOCOLS)) { *pLen = 0; return (SK_PNMI_ERR_UNKNOWN_INST); } - Index = (unsigned int)Instance - 1; - Limit = (unsigned int)Instance; + Limit = Index + 1; } else { Index = 0; @@ -3494,23 +3709,23 @@ switch (Id) { case OID_SKGE_CHKSM_RX_OK_CTS: - StatVal = pAC->Csum.ProtoStats[Index].RxOkCts; + StatVal = pAC->Csum.ProtoStats[NetIndex][Index].RxOkCts; break; case OID_SKGE_CHKSM_RX_UNABLE_CTS: - StatVal = pAC->Csum.ProtoStats[Index].RxUnableCts; + StatVal = pAC->Csum.ProtoStats[NetIndex][Index].RxUnableCts; break; case OID_SKGE_CHKSM_RX_ERR_CTS: - StatVal = pAC->Csum.ProtoStats[Index].RxErrCts; + StatVal = pAC->Csum.ProtoStats[NetIndex][Index].RxErrCts; break; case OID_SKGE_CHKSM_TX_OK_CTS: - StatVal = pAC->Csum.ProtoStats[Index].TxOkCts; + StatVal = pAC->Csum.ProtoStats[NetIndex][Index].TxOkCts; break; case OID_SKGE_CHKSM_TX_UNABLE_CTS: - StatVal = pAC->Csum.ProtoStats[Index].TxUnableCts; + StatVal = pAC->Csum.ProtoStats[NetIndex][Index].TxUnableCts; break; default: @@ -3543,7 +3758,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -3560,7 +3775,8 @@ char *pBuf, /* Buffer to which to mgmt data will be retrieved */ unsigned int *pLen, /* On call: buffer length. On return: used buffer */ SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */ -unsigned int TableIndex) /* Index to the Id table */ +unsigned int TableIndex, /* Index to the Id table */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { unsigned int i; unsigned int Index; @@ -3787,7 +4003,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -3807,13 +4023,14 @@ char *pBuf, /* Buffer to which to mgmt data will be retrieved */ unsigned int *pLen, /* On call: buffer length. On return: used buffer */ SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */ -unsigned int TableIndex) /* Index to the Id table */ +unsigned int TableIndex, /* Index to the Id table */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { SK_VPD_STATUS *pVpdStatus; unsigned int BufLen; char Buf[256]; - char KeyArr[SK_PNMI_VPD_ARR_SIZE][SK_PNMI_VPD_STR_SIZE]; - char KeyStr[SK_PNMI_VPD_STR_SIZE]; + char KeyArr[SK_PNMI_VPD_ENTRIES][SK_PNMI_VPD_KEY_SIZE]; + char KeyStr[SK_PNMI_VPD_KEY_SIZE]; unsigned int KeyNo; unsigned int Offset; unsigned int Index; @@ -3829,7 +4046,6 @@ Ret = GetVpdKeyArr(pAC, IoC, &KeyArr[0][0], sizeof(KeyArr), &KeyNo); if (Ret != SK_PNMI_ERR_OK) { - *pLen = 0; return (Ret); } @@ -3854,7 +4070,6 @@ for (Index = 0; Index < KeyNo; Index ++) { if (SK_STRCMP(KeyStr, KeyArr[Index]) == 0) { - FirstIndex = Index; LastIndex = Index+1; break; @@ -4267,7 +4482,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -4284,7 +4499,8 @@ char *pBuf, /* Buffer to which to mgmt data will be retrieved */ unsigned int *pLen, /* On call: buffer length. On return: used buffer */ SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */ -unsigned int TableIndex) /* Index to the Id table */ +unsigned int TableIndex, /* Index to the Id table */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { int Ret; unsigned int Index; @@ -4297,6 +4513,7 @@ SK_U64 Val64; SK_U64 Val64RxHwErrs = 0; SK_U64 Val64TxHwErrs = 0; + SK_BOOL Is64BitReq = SK_FALSE; char Buf[256]; @@ -4323,13 +4540,37 @@ */ switch (Id) { + case OID_GEN_XMIT_ERROR: + case OID_GEN_RCV_ERROR: + case OID_GEN_RCV_NO_BUFFER: +#ifndef SK_NDIS_64BIT_CTR + if (*pLen < sizeof(SK_U32)) { + *pLen = sizeof(SK_U32); + return (SK_PNMI_ERR_TOO_SHORT); + } + +#else /* SK_NDIS_64BIT_CTR */ + + /* + * for compatibility, at least 32bit are required for oid + */ + if (*pLen < sizeof(SK_U32)) { + /* + * but indicate handling for 64bit values, + * if insufficient space is provided + */ + *pLen = sizeof(SK_U64); + return (SK_PNMI_ERR_TOO_SHORT); + } + + Is64BitReq = (*pLen < sizeof(SK_U64)) ? SK_FALSE : SK_TRUE; +#endif /* SK_NDIS_64BIT_CTR */ + break; + case OID_SKGE_PORT_NUMBER: case OID_SKGE_DEVICE_TYPE: case OID_SKGE_RESULT: case OID_SKGE_RLMT_MONITOR_NUMBER: - case OID_GEN_XMIT_ERROR: - case OID_GEN_RCV_ERROR: - case OID_GEN_RCV_NO_BUFFER: case OID_GEN_TRANSMIT_QUEUE_LENGTH: case OID_SKGE_TRAP_NUMBER: case OID_SKGE_MDB_VERSION: @@ -4419,31 +4660,30 @@ case OID_SKGE_IN_ERRORS_CTS: case OID_GEN_RCV_ERROR: Val64RxHwErrs = - GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_MISSED) + - GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_FRAMING) + - GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_OVERFLOW)+ - GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_JABBER) + - GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_CARRIER) + - GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_IRLENGTH)+ - GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_SYMBOL) + - GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_SHORTS) + - GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_RUNT) + - GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_TOO_LONG)+ - GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_FCS) + - GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_CEXT); - break; + GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_MISSED, NetIndex) + + GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_FRAMING, NetIndex) + + GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_OVERFLOW, NetIndex)+ + GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_JABBER, NetIndex) + + GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_CARRIER, NetIndex) + + GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_IRLENGTH, NetIndex)+ + GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_SYMBOL, NetIndex) + + GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_SHORTS, NetIndex) + + GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_RUNT, NetIndex) + + GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_TOO_LONG, NetIndex)- + GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_LONGFRAMES, NetIndex)+ + GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_FCS, NetIndex) + + GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_CEXT, NetIndex); + break; case OID_SKGE_TX_HW_ERROR_CTS: case OID_SKGE_OUT_ERROR_CTS: case OID_GEN_XMIT_ERROR: Val64TxHwErrs = - GetStatVal(pAC, IoC, 0, - SK_PNMI_HTX_EXCESS_COL) + - GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_LATE_COL)+ - GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_UNDERRUN)+ - GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_CARRIER)+ - GetStatVal(pAC, IoC, 0, - SK_PNMI_HTX_EXCESS_COL); + GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_EXCESS_COL, NetIndex) + + GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_LATE_COL, NetIndex)+ + GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_UNDERRUN, NetIndex)+ + GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_CARRIER, NetIndex)+ + GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_EXCESS_COL, NetIndex); break; } } @@ -4655,61 +4895,142 @@ break; case OID_SKGE_TX_SW_QUEUE_LEN: - Val64 = pAC->Pnmi.TxSwQueueLen; + /* Dual net mode */ + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ + Val64 = pAC->Pnmi.Port[NetIndex].TxSwQueueLen; + } + /* Single net mode */ + else { + Val64 = pAC->Pnmi.Port[0].TxSwQueueLen + + pAC->Pnmi.Port[1].TxSwQueueLen; + } SK_PNMI_STORE_U64(pBuf, Val64); *pLen = sizeof(SK_U64); break; + case OID_SKGE_TX_SW_QUEUE_MAX: - Val64 = pAC->Pnmi.TxSwQueueMax; + /* Dual net mode */ + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ + Val64 = pAC->Pnmi.Port[NetIndex].TxSwQueueMax; + } + /* Single net mode */ + else { + Val64 = pAC->Pnmi.Port[0].TxSwQueueMax + + pAC->Pnmi.Port[1].TxSwQueueMax; + } SK_PNMI_STORE_U64(pBuf, Val64); *pLen = sizeof(SK_U64); break; case OID_SKGE_TX_RETRY: - Val64 = pAC->Pnmi.TxRetryCts; + /* Dual net mode */ + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ + Val64 = pAC->Pnmi.Port[NetIndex].TxRetryCts; + } + /* Single net mode */ + else { + Val64 = pAC->Pnmi.Port[0].TxRetryCts + + pAC->Pnmi.Port[1].TxRetryCts; + } SK_PNMI_STORE_U64(pBuf, Val64); *pLen = sizeof(SK_U64); break; case OID_SKGE_RX_INTR_CTS: - Val64 = pAC->Pnmi.RxIntrCts; + /* Dual net mode */ + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ + Val64 = pAC->Pnmi.Port[NetIndex].RxIntrCts; + } + /* Single net mode */ + else { + Val64 = pAC->Pnmi.Port[0].RxIntrCts + + pAC->Pnmi.Port[1].RxIntrCts; + } SK_PNMI_STORE_U64(pBuf, Val64); *pLen = sizeof(SK_U64); break; case OID_SKGE_TX_INTR_CTS: - Val64 = pAC->Pnmi.TxIntrCts; + /* Dual net mode */ + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ + Val64 = pAC->Pnmi.Port[NetIndex].TxIntrCts; + } + /* Single net mode */ + else { + Val64 = pAC->Pnmi.Port[0].TxIntrCts + + pAC->Pnmi.Port[1].TxIntrCts; + } SK_PNMI_STORE_U64(pBuf, Val64); *pLen = sizeof(SK_U64); break; case OID_SKGE_RX_NO_BUF_CTS: - Val64 = pAC->Pnmi.RxNoBufCts; + /* Dual net mode */ + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ + Val64 = pAC->Pnmi.Port[NetIndex].RxNoBufCts; + } + /* Single net mode */ + else { + Val64 = pAC->Pnmi.Port[0].RxNoBufCts + + pAC->Pnmi.Port[1].RxNoBufCts; + } SK_PNMI_STORE_U64(pBuf, Val64); *pLen = sizeof(SK_U64); break; case OID_SKGE_TX_NO_BUF_CTS: - Val64 = pAC->Pnmi.TxNoBufCts; + /* Dual net mode */ + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ + Val64 = pAC->Pnmi.Port[NetIndex].TxNoBufCts; + } + /* Single net mode */ + else { + Val64 = pAC->Pnmi.Port[0].TxNoBufCts + + pAC->Pnmi.Port[1].TxNoBufCts; + } SK_PNMI_STORE_U64(pBuf, Val64); *pLen = sizeof(SK_U64); break; case OID_SKGE_TX_USED_DESCR_NO: - Val64 = pAC->Pnmi.TxUsedDescrNo; + /* Dual net mode */ + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ + Val64 = pAC->Pnmi.Port[NetIndex].TxUsedDescrNo; + } + /* Single net mode */ + else { + Val64 = pAC->Pnmi.Port[0].TxUsedDescrNo + + pAC->Pnmi.Port[1].TxUsedDescrNo; + } SK_PNMI_STORE_U64(pBuf, Val64); *pLen = sizeof(SK_U64); break; case OID_SKGE_RX_DELIVERED_CTS: - Val64 = pAC->Pnmi.RxDeliveredCts; + /* Dual net mode */ + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ + Val64 = pAC->Pnmi.Port[NetIndex].RxDeliveredCts; + } + /* Single net mode */ + else { + Val64 = pAC->Pnmi.Port[0].RxDeliveredCts + + pAC->Pnmi.Port[1].RxDeliveredCts; + } SK_PNMI_STORE_U64(pBuf, Val64); *pLen = sizeof(SK_U64); break; case OID_SKGE_RX_OCTETS_DELIV_CTS: - Val64 = pAC->Pnmi.RxOctetsDeliveredCts; + /* Dual net mode */ + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ + Val64 = pAC->Pnmi.Port[NetIndex].RxOctetsDeliveredCts; + } + /* Single net mode */ + else { + Val64 = pAC->Pnmi.Port[0].RxOctetsDeliveredCts + + pAC->Pnmi.Port[1].RxOctetsDeliveredCts; + } SK_PNMI_STORE_U64(pBuf, Val64); *pLen = sizeof(SK_U64); break; @@ -4725,19 +5046,45 @@ break; case OID_SKGE_IN_ERRORS_CTS: - Val64 = Val64RxHwErrs + pAC->Pnmi.RxNoBufCts; + /* Dual net mode */ + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ + Val64 = Val64RxHwErrs + pAC->Pnmi.Port[NetIndex].RxNoBufCts; + } + /* Single net mode */ + else { + Val64 = Val64RxHwErrs + + pAC->Pnmi.Port[0].RxNoBufCts + + pAC->Pnmi.Port[1].RxNoBufCts; + } SK_PNMI_STORE_U64(pBuf, Val64); *pLen = sizeof(SK_U64); break; case OID_SKGE_OUT_ERROR_CTS: - Val64 = Val64TxHwErrs + pAC->Pnmi.TxNoBufCts; + /* Dual net mode */ + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ + Val64 = Val64TxHwErrs + pAC->Pnmi.Port[NetIndex].TxNoBufCts; + } + /* Single net mode */ + else { + Val64 = Val64TxHwErrs + + pAC->Pnmi.Port[0].TxNoBufCts + + pAC->Pnmi.Port[1].TxNoBufCts; + } SK_PNMI_STORE_U64(pBuf, Val64); *pLen = sizeof(SK_U64); break; case OID_SKGE_ERR_RECOVERY_CTS: - Val64 = pAC->Pnmi.ErrRecoveryCts; + /* Dual net mode */ + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ + Val64 = pAC->Pnmi.Port[NetIndex].ErrRecoveryCts; + } + /* Single net mode */ + else { + Val64 = pAC->Pnmi.Port[0].ErrRecoveryCts + + pAC->Pnmi.Port[1].ErrRecoveryCts; + } SK_PNMI_STORE_U64(pBuf, Val64); *pLen = sizeof(SK_U64); break; @@ -4756,25 +5103,58 @@ break; case OID_GEN_RCV_ERROR: - Val32 = (SK_U32)(Val64RxHwErrs + pAC->Pnmi.RxNoBufCts); - SK_PNMI_STORE_U32(pBuf, Val32); - *pLen = sizeof(SK_U32); + Val64 = Val64RxHwErrs + pAC->Pnmi.Port[NetIndex].RxNoBufCts; + + /* + * by default 32bit values are evaluated + */ + if (!Is64BitReq) { + Val32 = (SK_U32)Val64; + SK_PNMI_STORE_U32(pBuf, Val32); + *pLen = sizeof(SK_U32); + } + else { + SK_PNMI_STORE_U64(pBuf, Val64); + *pLen = sizeof(SK_U64); + } break; case OID_GEN_XMIT_ERROR: - Val32 = (SK_U32)(Val64TxHwErrs + pAC->Pnmi.TxNoBufCts); - SK_PNMI_STORE_U32(pBuf, Val32); - *pLen = sizeof(SK_U32); + Val64 = Val64TxHwErrs + pAC->Pnmi.Port[NetIndex].TxNoBufCts; + + /* + * by default 32bit values are evaluated + */ + if (!Is64BitReq) { + Val32 = (SK_U32)Val64; + SK_PNMI_STORE_U32(pBuf, Val32); + *pLen = sizeof(SK_U32); + } + else { + SK_PNMI_STORE_U64(pBuf, Val64); + *pLen = sizeof(SK_U64); + } break; case OID_GEN_RCV_NO_BUFFER: - Val32 = (SK_U32)pAC->Pnmi.RxNoBufCts; - SK_PNMI_STORE_U32(pBuf, Val32); - *pLen = sizeof(SK_U32); + Val64 = pAC->Pnmi.Port[NetIndex].RxNoBufCts; + + /* + * by default 32bit values are evaluated + */ + if (!Is64BitReq) { + Val32 = (SK_U32)Val64; + SK_PNMI_STORE_U32(pBuf, Val32); + *pLen = sizeof(SK_U32); + } + else { + SK_PNMI_STORE_U64(pBuf, Val64); + *pLen = sizeof(SK_U64); + } break; case OID_GEN_TRANSMIT_QUEUE_LENGTH: - Val32 = (SK_U32)pAC->Pnmi.TxSwQueueLen; + Val32 = (SK_U32)pAC->Pnmi.Port[NetIndex].TxSwQueueLen; SK_PNMI_STORE_U32(pBuf, Val32); *pLen = sizeof(SK_U32); break; @@ -4809,7 +5189,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -4829,7 +5209,8 @@ char *pBuf, /* Buffer to which to mgmt data will be retrieved */ unsigned int *pLen, /* On call: buffer length. On return: used buffer */ SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */ -unsigned int TableIndex) /* Index to the Id table */ +unsigned int TableIndex, /* Index to the Id table */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { int Ret; unsigned int PhysPortIndex; @@ -4861,7 +5242,7 @@ case OID_SKGE_RLMT_MODE: case OID_SKGE_RLMT_PORT_ACTIVE: - case OID_SKGE_RLMT_PORT_PREFERED: + case OID_SKGE_RLMT_PORT_PREFERRED: if (*pLen < sizeof(SK_U8)) { *pLen = sizeof(SK_U8); @@ -4902,7 +5283,7 @@ * statistic always up to date some time. Then we can * remove this type of call. */ - if ((Ret = RlmtUpdate(pAC, IoC)) != SK_PNMI_ERR_OK) { + if ((Ret = RlmtUpdate(pAC, IoC, NetIndex)) != SK_PNMI_ERR_OK) { *pLen = 0; return (Ret); @@ -4915,7 +5296,7 @@ switch (Id) { case OID_SKGE_RLMT_MODE: - *pBuf = (char)pAC->Rlmt.RlmtMode; + *pBuf = (char)pAC->Rlmt.Net[0].RlmtMode; *pLen = sizeof(char); break; @@ -4941,17 +5322,15 @@ if (pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) { - *pBuf = (char)SK_PNMI_PORT_PHYS2LOG( - PhysPortIndex); + *pBuf = (char)SK_PNMI_PORT_PHYS2LOG(PhysPortIndex); break; } } *pLen = sizeof(char); break; - case OID_SKGE_RLMT_PORT_PREFERED: - *pBuf = (char)SK_PNMI_PORT_PHYS2LOG( - pAC->Rlmt.MacPreferred); + case OID_SKGE_RLMT_PORT_PREFERRED: + *pBuf = (char)SK_PNMI_PORT_PHYS2LOG(pAC->Rlmt.Net[NetIndex].Preference); *pLen = sizeof(char); break; @@ -5018,6 +5397,7 @@ /* Send an event to RLMT to change the mode */ SK_MEMSET((char *)&EventParam, 0, sizeof(EventParam)); EventParam.Para32[0] |= (SK_U32)(*pBuf); + EventParam.Para32[1] = 0; if (SkRlmtEvent(pAC, IoC, SK_RLMT_MODE_CHANGE, EventParam) > 0) { @@ -5029,7 +5409,7 @@ } break; - case OID_SKGE_RLMT_PORT_PREFERED: + case OID_SKGE_RLMT_PORT_PREFERRED: /* Check if the buffer length is plausible */ if (*pLen < sizeof(char)) { @@ -5057,6 +5437,7 @@ */ SK_MEMSET((char *)&EventParam, 0, sizeof(EventParam)); EventParam.Para32[0] = (SK_U32)(*pBuf) - 1; + EventParam.Para32[1] = NetIndex; if (SkRlmtEvent(pAC, IoC, SK_RLMT_PREFPORT_CHANGE, EventParam) > 0) { @@ -5117,7 +5498,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -5134,7 +5515,8 @@ char *pBuf, /* Buffer to which to mgmt data will be retrieved */ unsigned int *pLen, /* On call: buffer length. On return: used buffer */ SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */ -unsigned int TableIndex) /* Index to the Id table */ +unsigned int TableIndex, /* Index to the Id table */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { unsigned int PhysPortMax; unsigned int PhysPortIndex; @@ -5144,26 +5526,40 @@ SK_U32 Val32; SK_U64 Val64; - /* * Calculate the port indexes from the instance */ PhysPortMax = pAC->GIni.GIMacsFound; if ((Instance != (SK_U32)(-1))) { - + /* Check instance range */ if ((Instance < 1) || (Instance > PhysPortMax)) { *pLen = 0; return (SK_PNMI_ERR_UNKNOWN_INST); } + /* Single net mode */ PhysPortIndex = Instance - 1; + + /* Dual net mode */ + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ + PhysPortIndex = NetIndex; + } + + /* Both net modes */ Limit = PhysPortIndex + 1; } else { + /* Single net mode */ PhysPortIndex = 0; Limit = PhysPortMax; + + /* Dual net mode */ + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ + PhysPortIndex = NetIndex; + Limit = PhysPortIndex + 1; + } } /* @@ -5213,7 +5609,7 @@ * Update statistic and increment semaphores to indicate that * an update was already done. */ - if ((Ret = RlmtUpdate(pAC, IoC)) != SK_PNMI_ERR_OK) { + if ((Ret = RlmtUpdate(pAC, IoC, NetIndex)) != SK_PNMI_ERR_OK) { *pLen = 0; return (Ret); @@ -5302,7 +5698,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -5322,7 +5718,8 @@ char *pBuf, /* Buffer to which to mgmt data will be retrieved */ unsigned int *pLen, /* On call: buffer length. On return: used buffer */ SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */ -unsigned int TableIndex) /* Index to the Id table */ +unsigned int TableIndex, /* Index to the Id table */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { unsigned int PhysPortMax; unsigned int PhysPortIndex; @@ -5333,6 +5730,7 @@ char Val8; int Ret; SK_EVPARA EventParam; + SK_U32 Val32; /* @@ -5342,18 +5740,23 @@ PhysPortMax = pAC->GIni.GIMacsFound; LogPortMax = SK_PNMI_PORT_PHYS2LOG(PhysPortMax); - if ((Instance != (SK_U32)(-1))) { + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ /* Dual net mode */ + LogPortMax--; + } + if ((Instance != (SK_U32)(-1))) { /* Only one specific instance is queried */ + /* Check instance range */ if ((Instance < 1) || (Instance > LogPortMax)) { *pLen = 0; return (SK_PNMI_ERR_UNKNOWN_INST); } - LogPortIndex = SK_PNMI_PORT_INST2LOG(Instance); Limit = LogPortIndex + 1; } - else { + + else { /* Instance == (SK_U32)(-1), get all Instances of that OID */ + LogPortIndex = 0; Limit = LogPortMax; } @@ -5388,10 +5791,17 @@ } break; + case OID_SKGE_MTU: + if (*pLen < sizeof(SK_U32)) { + + *pLen = sizeof(SK_U32); + return (SK_PNMI_ERR_TOO_SHORT); + } + break; + default: SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR041, SK_PNMI_ERR041MSG); - *pLen = 0; return (SK_PNMI_ERR_GENERAL); } @@ -5608,6 +6018,12 @@ Offset += sizeof(char); break; + case OID_SKGE_MTU: + Val32 = SK_DRIVER_GET_MTU(pAC, IoC, NetIndex); + SK_PNMI_STORE_U32(pBuf + Offset, Val32); + Offset += sizeof(SK_U32); + break; + default: SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR042, SK_PNMI_ERR042MSG); @@ -5643,7 +6059,20 @@ } break; - default: + case OID_SKGE_MTU: + if (*pLen < sizeof(SK_U32)) { + + *pLen = sizeof(SK_U32); + return (SK_PNMI_ERR_TOO_SHORT); + } + if (*pLen != sizeof(SK_U32)) { + + *pLen = 0; + return (SK_PNMI_ERR_BAD_VALUE); + } + break; + + default: *pLen = 0; return (SK_PNMI_ERR_READ_ONLY); } @@ -5665,7 +6094,8 @@ break; } if (Val8 < SK_LMODE_HALF || - Val8 > SK_LMODE_AUTOSENSE) { + (LogPortIndex != 0 && Val8 > SK_LMODE_AUTOSENSE) || + (LogPortIndex == 0 && Val8 > SK_LMODE_INDETERMINATED)) { *pLen = 0; return (SK_PNMI_ERR_BAD_VALUE); @@ -5740,7 +6170,8 @@ break; } if (Val8 < SK_FLOW_MODE_NONE || - Val8 > SK_FLOW_MODE_SYM_OR_REM) { + (LogPortIndex != 0 && Val8 > SK_FLOW_MODE_SYM_OR_REM) || + (LogPortIndex == 0 && Val8 > SK_FLOW_MODE_INDETERMINATED)) { *pLen = 0; return (SK_PNMI_ERR_BAD_VALUE); @@ -5816,7 +6247,8 @@ break; } if (Val8 < SK_MS_MODE_AUTO || - Val8 > SK_MS_MODE_SLAVE) { + (LogPortIndex != 0 && Val8 > SK_MS_MODE_SLAVE) || + (LogPortIndex == 0 && Val8 > SK_MS_MODE_INDETERMINATED)) { *pLen = 0; return (SK_PNMI_ERR_BAD_VALUE); @@ -5879,10 +6311,35 @@ return (SK_PNMI_ERR_GENERAL); } } - + Offset += sizeof(char); break; + case OID_SKGE_MTU : + /* Check the value range */ + Val32 = *(SK_U32*)(pBuf + Offset); + if (Val32 == 0) { + /* mtu of this port remains unchanged */ + Offset += sizeof(SK_U32); + break; + } + if (SK_DRIVER_PRESET_MTU(pAC, IoC, NetIndex, Val32) != 0) { + *pLen = 0; + return (SK_PNMI_ERR_BAD_VALUE); + } + + /* The preset ends here */ + if (Action == SK_PNMI_PRESET) { + return (SK_PNMI_ERR_OK); + } + + if (SK_DRIVER_SET_MTU(pAC, IoC, NetIndex, Val32) != 0) { + return (SK_PNMI_ERR_GENERAL); + } + + Offset += sizeof(SK_U32); + break; + default: SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR045, SK_PNMI_ERR045MSG); @@ -5905,7 +6362,7 @@ * * Returns: * SK_PNMI_ERR_OK The request was successfully performed. - * SK_PNMI_ERR_GENERAL A general severe internal error occured. + * SK_PNMI_ERR_GENERAL A general severe internal error occurred. * SK_PNMI_ERR_TOO_SHORT The passed buffer is too short to contain * the correct data (e.g. a 32bit value is * needed, but a 16 bit value was passed). @@ -5925,7 +6382,8 @@ char *pBuf, /* Buffer to which to mgmt data will be retrieved */ unsigned int *pLen, /* On call: buffer length. On return: used buffer */ SK_U32 Instance, /* Instance (1..n) that is to be queried or -1 */ -unsigned int TableIndex) /* Index to the Id table */ +unsigned int TableIndex, /* Index to the Id table */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { unsigned int Index; unsigned int Limit; @@ -6419,8 +6877,8 @@ unsigned int KeyArrLen, /* Length of array in bytes */ unsigned int *pKeyNo) /* Number of keys */ { - unsigned int BufKeysLen = 128; - char BufKeys[128]; + unsigned int BufKeysLen = SK_PNMI_VPD_BUFSIZE; + char BufKeys[SK_PNMI_VPD_BUFSIZE]; unsigned int StartOffset; unsigned int Offset; int Index; @@ -6451,12 +6909,12 @@ * errorlog notification. This case should not happen because * the maximum number of keys is limited due to RAM limitations */ - if (*pKeyNo > SK_PNMI_VPD_ARR_SIZE) { + if (*pKeyNo > SK_PNMI_VPD_ENTRIES) { SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR015, SK_PNMI_ERR015MSG); - *pKeyNo = SK_PNMI_VPD_ARR_SIZE; + *pKeyNo = SK_PNMI_VPD_ENTRIES; } /* @@ -6471,15 +6929,15 @@ continue; } - if (Offset - StartOffset > SK_PNMI_VPD_STR_SIZE) { + if (Offset - StartOffset > SK_PNMI_VPD_KEY_SIZE) { SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR016, SK_PNMI_ERR016MSG); return (SK_PNMI_ERR_GENERAL); } - SK_STRNCPY(pKeyArr + Index * SK_PNMI_VPD_STR_SIZE, - &BufKeys[StartOffset], SK_PNMI_VPD_STR_SIZE); + SK_STRNCPY(pKeyArr + Index * SK_PNMI_VPD_KEY_SIZE, + &BufKeys[StartOffset], SK_PNMI_VPD_KEY_SIZE); Index ++; StartOffset = Offset + 1; @@ -6488,8 +6946,8 @@ /* Last key not zero terminated? Get it anyway */ if (StartOffset < Offset) { - SK_STRNCPY(pKeyArr + Index * SK_PNMI_VPD_STR_SIZE, - &BufKeys[StartOffset], SK_PNMI_VPD_STR_SIZE); + SK_STRNCPY(pKeyArr + Index * SK_PNMI_VPD_KEY_SIZE, + &BufKeys[StartOffset], SK_PNMI_VPD_KEY_SIZE); } return (SK_PNMI_ERR_OK); @@ -6551,7 +7009,8 @@ static int RlmtUpdate( SK_AC *pAC, /* Pointer to adapter context */ -SK_IOC IoC) /* IO context handle */ +SK_IOC IoC, /* IO context handle */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { SK_EVPARA EventParam; @@ -6564,6 +7023,8 @@ /* Send an synchronuous update event to the module */ SK_MEMSET((char *)&EventParam, 0, sizeof(EventParam)); + EventParam.Para32[0] = NetIndex; + EventParam.Para32[1] = (SK_U32)-1; if (SkRlmtEvent(pAC, IoC, SK_RLMT_STATS_UPDATE, EventParam) > 0) { SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR048, @@ -6660,40 +7121,49 @@ */ static SK_U64 GetStatVal( -SK_AC *pAC, /* Pointer to adapter context */ -SK_IOC IoC, /* IO context handle */ +SK_AC *pAC, /* Pointer to adapter context */ +SK_IOC IoC, /* IO context handle */ unsigned int LogPortIndex, /* Index of the logical Port to be processed */ -unsigned int StatIndex) /* Index to statistic value */ +unsigned int StatIndex, /* Index to statistic value */ +SK_U32 NetIndex) /* NetIndex (0..n), in single net mode allways zero */ { unsigned int PhysPortIndex; unsigned int PhysPortMax; SK_U64 Val = 0; - if (LogPortIndex == 0) { + if(pAC->Pnmi.DualNetActiveFlag == SK_TRUE){ /* Dual net mode */ - PhysPortMax = pAC->GIni.GIMacsFound; + PhysPortIndex = NetIndex; + Val = GetPhysStatVal(pAC, IoC, PhysPortIndex, StatIndex); + } /* end of dual net mode */ - /* Add counter of all active ports */ - for (PhysPortIndex = 0; PhysPortIndex < PhysPortMax; - PhysPortIndex ++) { + else { /* single net mode */ - if (pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) { + if (LogPortIndex == 0) { - Val += GetPhysStatVal(pAC, IoC, PhysPortIndex, - StatIndex); - } - } + PhysPortMax = pAC->GIni.GIMacsFound; - /* Correct value because of port switches */ - Val += pAC->Pnmi.VirtualCounterOffset[StatIndex]; - } - else { - /* Get counter value of physical port */ - PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(pAC, LogPortIndex); - Val = GetPhysStatVal(pAC, IoC, PhysPortIndex, StatIndex); - } + /* Add counter of all active ports */ + for (PhysPortIndex = 0; PhysPortIndex < PhysPortMax; + PhysPortIndex ++) { + + if (pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) { + + Val += GetPhysStatVal(pAC, IoC, PhysPortIndex, + StatIndex); + } + } + /* Correct value because of port switches */ + Val += pAC->Pnmi.VirtualCounterOffset[StatIndex]; + } + else { + /* Get counter value of physical port */ + PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(pAC, LogPortIndex); + Val = GetPhysStatVal(pAC, IoC, PhysPortIndex, StatIndex); + } + } /* end of single net mode */ return (Val); } @@ -6715,8 +7185,8 @@ */ static SK_U64 GetPhysStatVal( -SK_AC *pAC, /* Pointer to adapter context */ -SK_IOC IoC, /* IO context handle */ +SK_AC *pAC, /* Pointer to adapter context */ +SK_IOC IoC, /* IO context handle */ unsigned int PhysPortIndex, /* Index of the logical Port to be processed */ unsigned int StatIndex) /* Index to statistic value */ { @@ -6755,6 +7225,12 @@ 32); break; + case SK_PNMI_HRX_LONGFRAMES: + LowVal = (SK_U32)pAC->Pnmi.Port[PhysPortIndex].StatRxLongFrameCts; + HighVal = (SK_U32) + (pAC->Pnmi.Port[PhysPortIndex].StatRxLongFrameCts >> 32); + break; + case SK_PNMI_HRX_FCS: /* * Broadcom filters fcs errors and counts it in @@ -6806,7 +7282,8 @@ static void ResetCounter( SK_AC *pAC, /* Pointer to adapter context */ -SK_IOC IoC) /* IO context handle */ +SK_IOC IoC, /* IO context handle */ +SK_U32 NetIndex) { unsigned int PhysPortIndex; SK_EVPARA EventParam; @@ -6818,7 +7295,10 @@ SkEventQueue(pAC, SKGE_I2C, SK_I2CEV_CLEAR, EventParam); /* Notify RLMT module */ + EventParam.Para32[0] = NetIndex; + EventParam.Para32[1] = (SK_U32)-1; SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STATS_CLEAR, EventParam); + EventParam.Para32[1] = 0; /* Notify SIRQ module */ SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_CLEAR_STAT, EventParam); @@ -6850,27 +7330,32 @@ SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex]. StatSyncOctetsCts, 0, sizeof(pAC->Pnmi.Port[ PhysPortIndex].StatSyncOctetsCts)); + SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex]. + StatRxLongFrameCts, 0, sizeof(pAC->Pnmi.Port[ + PhysPortIndex].StatRxLongFrameCts)); } /* * Clear local statistics */ + SK_MEMSET((char *)&pAC->Pnmi.VirtualCounterOffset, 0, + sizeof(pAC->Pnmi.VirtualCounterOffset)); pAC->Pnmi.RlmtChangeCts = 0; pAC->Pnmi.RlmtChangeTime = 0; SK_MEMSET((char *)&pAC->Pnmi.RlmtChangeEstimate.EstValue[0], 0, sizeof(pAC->Pnmi.RlmtChangeEstimate.EstValue)); pAC->Pnmi.RlmtChangeEstimate.EstValueIndex = 0; pAC->Pnmi.RlmtChangeEstimate.Estimate = 0; - pAC->Pnmi.TxSwQueueMax = 0; - pAC->Pnmi.TxRetryCts = 0; - pAC->Pnmi.RxIntrCts = 0; - pAC->Pnmi.TxIntrCts = 0; - pAC->Pnmi.RxNoBufCts = 0; - pAC->Pnmi.TxNoBufCts = 0; - pAC->Pnmi.TxUsedDescrNo = 0; - pAC->Pnmi.RxDeliveredCts = 0; - pAC->Pnmi.RxOctetsDeliveredCts = 0; - pAC->Pnmi.ErrRecoveryCts = 0; + pAC->Pnmi.Port[NetIndex].TxSwQueueMax = 0; + pAC->Pnmi.Port[NetIndex].TxRetryCts = 0; + pAC->Pnmi.Port[NetIndex].RxIntrCts = 0; + pAC->Pnmi.Port[NetIndex].TxIntrCts = 0; + pAC->Pnmi.Port[NetIndex].RxNoBufCts = 0; + pAC->Pnmi.Port[NetIndex].TxNoBufCts = 0; + pAC->Pnmi.Port[NetIndex].TxUsedDescrNo = 0; + pAC->Pnmi.Port[NetIndex].RxDeliveredCts = 0; + pAC->Pnmi.Port[NetIndex].RxOctetsDeliveredCts = 0; + pAC->Pnmi.Port[NetIndex].ErrRecoveryCts = 0; } /***************************************************************************** @@ -6879,7 +7364,7 @@ * * Description: * The trap buffer stores various events. A user application somehow - * gets notified that an event occured and retrieves the trap buffer + * gets notified that an event occurred and retrieves the trap buffer * contens (or simply polls the buffer). The buffer is organized as * a ring which stores the newest traps at the beginning. The oldest * traps are overwritten by the newest ones. Each trap entry has a diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/skgesirq.c linux.20p6/drivers/net/sk98lin/skgesirq.c --- linux.vanilla/drivers/net/sk98lin/skgesirq.c Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/skgesirq.c Tue Jun 19 09:59:54 2001 @@ -2,16 +2,15 @@ * * Name: skgesirq.c * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.49 $ - * Date: $Date: 1999/12/17 11:02:50 $ + * Version: $Revision: 1.65 $ + * Date: $Date: 2001/02/23 13:41:51 $ * Purpose: Special IRQ module * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2000 SysKonnect GmbH. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,6 +26,56 @@ * History: * * $Log: skgesirq.c,v $ + * Revision 1.65 2001/02/23 13:41:51 gklug + * fix: PHYS2INST should be used correctly for Dual Net operation + * chg: do no longer work with older PNMI + * + * Revision 1.64 2001/02/15 11:27:04 rassmann + * Working with RLMT v1 if SK_MAX_NETS undefined. + * + * Revision 1.63 2001/02/06 10:44:23 mkunz + * - NetIndex added to interface functions of pnmi V4 with dual net support + * + * Revision 1.62 2001/01/31 15:31:41 gklug + * fix: problem with autosensing an SR8800 switch + * + * Revision 1.61 2000/11/09 11:30:09 rassmann + * WA: Waiting after releasing reset until BCom chip is accessible. + * + * Revision 1.60 2000/10/18 12:37:48 cgoos + * Reinserted the comment for version 1.56. + * + * Revision 1.59 2000/10/18 12:22:20 cgoos + * Added workaround for half duplex hangup. + * + * Revision 1.58 2000/09/28 13:06:04 gklug + * fix: BCOM may NOT be touched if XMAC is in RESET state + * + * Revision 1.57 2000/09/08 12:38:39 cgoos + * Added forgotten variable declaration. + * + * Revision 1.56 2000/09/08 08:12:13 cgoos + * Changed handling of parity errors in SkGeHwErr (correct reset of error). + * + * Revision 1.55 2000/06/19 08:36:25 cgoos + * Changed comment. + * + * Revision 1.54 2000/05/22 08:45:57 malthoff + * Fix: #10523 is valid for all BCom PHYs. + * + * Revision 1.53 2000/05/19 10:20:30 cgoos + * Removed Solaris debug output code. + * + * Revision 1.52 2000/05/19 10:19:37 cgoos + * Added PHY state check in HWLinkDown. + * Move PHY interrupt code to IS_EXT_REG case in SkGeSirqIsr. + * + * Revision 1.51 2000/05/18 05:56:20 cgoos + * Fixed typo. + * + * Revision 1.50 2000/05/17 12:49:49 malthoff + * Fixes BCom link bugs (#10523). + * * Revision 1.49 1999/12/17 11:02:50 gklug * fix: read PHY_STAT of Broadcom chip more often to assure good status * @@ -197,39 +246,38 @@ * ******************************************************************************/ - /* - Special Interrupt handler - - The following abstract should show how this module is included - in the driver path: - - In the ISR of the driver the bits for frame transmission complete and - for receive complete are checked and handled by the driver itself. - The bits of the slow path mask are checked after this and then the - entry into the so-called "slow path" is prepared. It is an implemetors - decision whether this is executed directly or just scheduled by - disabling the mask. In the interrupt service routine events may be - generated, so it would be a good idea to call the EventDispatcher - right after this ISR. - - The Interrupt service register of the adapter is NOT read by this - module. SO if the drivers implemetor needs a while loop around the - slow data paths Interrupt bits, he needs to call the SkGeIsr() for - each loop entered. - - However, the XMAC Interrupt status registers are read in a while loop. - -*/ + * Special Interrupt handler + * + * The following abstract should show how this module is included + * in the driver path: + * + * In the ISR of the driver the bits for frame transmission complete and + * for receive complete are checked and handled by the driver itself. + * The bits of the slow path mask are checked after this and then the + * entry into the so-called "slow path" is prepared. It is an implemetors + * decision whether this is executed directly or just scheduled by + * disabling the mask. In the interrupt service routine events may be + * generated, so it would be a good idea to call the EventDispatcher + * right after this ISR. + * + * The Interrupt service register of the adapter is NOT read by this + * module. SO if the drivers implemetor needs a while loop around the + * slow data paths Interrupt bits, he needs to call the SkGeIsr() for + * each loop entered. + * + * However, the XMAC Interrupt status registers are read in a while loop. + * + */ + static const char SysKonnectFileId[] = - "$Id: skgesirq.c,v 1.49 1999/12/17 11:02:50 gklug Exp $" ; + "$Id: skgesirq.c,v 1.65 2001/02/23 13:41:51 gklug Exp $" ; #include "h/skdrv1st.h" /* Driver Specific Definitions */ #include "h/skgepnmi.h" /* PNMI Definitions */ #include "h/skrlmt.h" /* RLMT Definitions */ #include "h/skdrv2nd.h" /* Adapter Control- and Driver specific Def. */ - /* local function prototypes */ static int SkGePortCheckUpXmac(SK_AC*, SK_IOC, int); static int SkGePortCheckUpBcom(SK_AC*, SK_IOC, int); @@ -238,21 +286,31 @@ static void SkPhyIsrBcom(SK_AC*, SK_IOC, int, SK_U16); static void SkPhyIsrLone(SK_AC*, SK_IOC, int, SK_U16); +/* + * Define an array of RX counter which are checked + * in AutoSense mode to check whether a link is not able to autonegotiate. + */ +static const SK_U32 SkGeRxOids[]= { + OID_SKGE_STAT_RX_64, + OID_SKGE_STAT_RX_127, + OID_SKGE_STAT_RX_255, + OID_SKGE_STAT_RX_511, + OID_SKGE_STAT_RX_1023, + OID_SKGE_STAT_RX_MAX, +} ; #ifdef __C2MAN__ /* - Special IRQ function - - General Description: - + * Special IRQ function + * + * General Description: + * */ intro() {} #endif -/* - * Define return codes of SkGePortCheckUp and CheckShort - */ +/* Define return codes of SkGePortCheckUp and CheckShort. */ #define SK_HW_PS_NONE 0 /* No action needed */ #define SK_HW_PS_RESTART 1 /* Restart needed */ #define SK_HW_PS_LINK 2 /* Link Up actions needed */ @@ -268,13 +326,13 @@ * */ void SkHWInitDefSense( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* IO context */ +SK_AC *pAC, /* adapter context */ +SK_IOC IoC, /* IO context */ int Port) /* Port Index (MAC_1 + n) */ { SK_GEPORT *pPrt; - pPrt = &pAC->GIni.GP[Port] ; + pPrt = &pAC->GIni.GP[Port]; pPrt->PAutoNegTimeOut = 0; @@ -283,15 +341,16 @@ return; } - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_IRQ, + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ, ("AutoSensing: First mode %d on Port %d\n", - (int) SK_LMODE_AUTOFULL, + (int)SK_LMODE_AUTOFULL, Port)); pPrt->PLinkMode = SK_LMODE_AUTOFULL; return; -} +} /* SkHWInitDefSense */ + /****************************************************************************** * @@ -304,29 +363,30 @@ * */ SK_U8 SkHWSenseGetNext( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* IO context */ +SK_AC *pAC, /* adapter context */ +SK_IOC IoC, /* IO context */ int Port) /* Port Index (MAC_1 + n) */ { SK_GEPORT *pPrt; - pPrt = &pAC->GIni.GP[Port] ; + pPrt = &pAC->GIni.GP[Port]; pPrt->PAutoNegTimeOut = 0; if (pPrt->PLinkModeConf != SK_LMODE_AUTOSENSE) { /* Leave all as configured */ - return(pPrt->PLinkModeConf); + return (pPrt->PLinkModeConf); } if (pPrt->PLinkMode == SK_LMODE_AUTOFULL) { /* Return next mode AUTOBOTH */ - return(SK_LMODE_AUTOBOTH); + return (SK_LMODE_AUTOBOTH); } /* Return default autofull */ - return(SK_LMODE_AUTOFULL); -} + return (SK_LMODE_AUTOFULL); +} /* SkHWSenseGetNext */ + /****************************************************************************** * @@ -341,12 +401,12 @@ void SkHWSenseSetNext( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port, /* Port Index (MAC_1 + n) */ +int Port, /* Port Index (MAC_1 + n) */ SK_U8 NewMode) /* New Mode to be written in sense mode */ { SK_GEPORT *pPrt; - pPrt = &pAC->GIni.GP[Port] ; + pPrt = &pAC->GIni.GP[Port]; pPrt->PAutoNegTimeOut = 0; @@ -354,13 +414,13 @@ return; } - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_IRQ, - ("AutoSensing: next mode %d on Port %d\n", (int) NewMode, - Port)); + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ, + ("AutoSensing: next mode %d on Port %d\n", (int)NewMode, Port)); pPrt->PLinkMode = NewMode; return; -} +} /* SkHWSenseSetNext */ + /****************************************************************************** * @@ -375,38 +435,44 @@ void SkHWLinkDown( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* Port Index (MAC_1 + n) */ +int Port) /* Port Index (MAC_1 + n) */ { SK_GEPORT *pPrt; SK_U16 Word; - pPrt = &pAC->GIni.GP[Port] ; + pPrt = &pAC->GIni.GP[Port]; - /* Disable all XMAC interrupts */ + /* Disable all XMAC interrupts. */ XM_OUT16(IoC, Port, XM_IMSK, 0xffff); - /* Disable Receive and Transmitter */ + /* Disable Receiver and Transmitter. */ XM_IN16(IoC, Port, XM_MMU_CMD, &Word); - XM_OUT16(IoC, Port, XM_MMU_CMD, Word & ~(XM_MMU_ENA_RX|XM_MMU_ENA_TX)); + XM_OUT16(IoC, Port, XM_MMU_CMD, Word & ~(XM_MMU_ENA_RX | XM_MMU_ENA_TX)); - /* disable all PHY interrupts */ - switch (pAC->GIni.GP[Port].PhyType) { + /* Disable all PHY interrupts. */ + switch (pPrt->PhyType) { case SK_PHY_BCOM: - PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_INT_MASK, - 0xffff); + /* Make sure that PHY is initialized. */ + if (pAC->GIni.GP[Port].PState) { + /* NOT allowed if BCOM is in RESET state */ + /* Workaround BCOM Errata (#10523) all BCom. */ + /* Disable Power Management if link is down. */ + PHY_READ(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL, &Word); + PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL, + Word | PHY_B_AC_DIS_PM); + PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_INT_MASK, 0xffff); + } break; case SK_PHY_LONE: - PHY_WRITE(IoC, pPrt, Port, PHY_LONE_INT_ENAB, - 0x0); + PHY_WRITE(IoC, pPrt, Port, PHY_LONE_INT_ENAB, 0x0); break; case SK_PHY_NAT: /* todo: National - PHY_WRITE(IoC, pPrt, Port, PHY_NAT_INT_MASK, - 0xffff); */ + PHY_WRITE(IoC, pPrt, Port, PHY_NAT_INT_MASK, 0xffff); */ break; } - /* Init default sense mode */ + /* Init default sense mode. */ SkHWInitDefSense(pAC, IoC, Port); if (!pPrt->PHWLinkUp) { @@ -416,27 +482,25 @@ SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_IRQ, ("Link down Port %d\n", Port)); - /* Set Link to DOWN */ + /* Set Link to DOWN. */ pPrt->PHWLinkUp = SK_FALSE; /* Reset Port stati */ pPrt->PLinkModeStatus = SK_LMODE_STAT_UNKNOWN; - pPrt->PFlowCtrlStatus = SK_FLOW_STAT_NONE ; + pPrt->PFlowCtrlStatus = SK_FLOW_STAT_NONE; /* - * Reinit Phy especially when the AutoSense default is set now + * Reinit Phy especially when the AutoSense default is set now. */ SkXmInitPhy(pAC, IoC, Port, SK_FALSE); - /* - * GP0: used for workaround of Rev. C - * Errata 2 - */ + /* GP0: used for workaround of Rev. C Errata 2. */ + + /* Do NOT signal to RLMT. */ - /* Do NOT signal to RLMT */ + /* Do NOT start the timer here. */ +} /* SkHWLinkDown */ - /* Do NOT start the timer here */ -} /****************************************************************************** * @@ -449,21 +513,21 @@ * */ void SkHWLinkUp( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* IO context */ +SK_AC *pAC, /* adapter context */ +SK_IOC IoC, /* IO context */ int Port) /* Port Index (MAC_1 + n) */ { SK_GEPORT *pPrt; - pPrt = &pAC->GIni.GP[Port] ; + pPrt = &pAC->GIni.GP[Port]; if (pPrt->PHWLinkUp) { /* We do NOT need to proceed on active link */ return; } - pPrt->PHWLinkUp = SK_TRUE ; - pPrt->PAutoNegFail = SK_FALSE ; + pPrt->PHWLinkUp = SK_TRUE; + pPrt->PAutoNegFail = SK_FALSE; pPrt->PLinkModeStatus = SK_LMODE_STAT_UNKNOWN; if (pPrt->PLinkMode != SK_LMODE_AUTOHALF && @@ -476,17 +540,19 @@ /* Set Link Mode */ if (pPrt->PLinkMode == SK_LMODE_FULL) { pPrt->PLinkModeStatus = SK_LMODE_STAT_FULL; - } else { + } + else { pPrt->PLinkModeStatus = SK_LMODE_STAT_HALF; } /* No flow control without autonegotiation */ - pPrt->PFlowCtrlStatus = SK_FLOW_STAT_NONE ; + pPrt->PFlowCtrlStatus = SK_FLOW_STAT_NONE; /* RX/TX enable */ SkXmRxTxEnable(pAC, IoC, Port); } -} +} /* SkHWLinkUp */ + /****************************************************************************** * @@ -494,27 +560,28 @@ * */ static void SkMacParity( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* IO context */ +SK_AC *pAC, /* adapter context */ +SK_IOC IoC, /* IO context */ int Port) /* Port Index of the port failed */ { SK_EVPARA Para; SK_GEPORT *pPrt; /* GIni Port struct pointer */ SK_U64 TxMax; /* TxMax Counter */ - unsigned int Len; + unsigned Len; pPrt = &pAC->GIni.GP[Port]; /* Clear IRQ */ - SK_OUT16(IoC, MR_ADDR(Port,TX_MFF_CTRL1), MFF_CLR_PERR) ; + SK_OUT16(IoC, MR_ADDR(Port,TX_MFF_CTRL1), MFF_CLR_PERR); if (pPrt->PCheckPar) { if (Port == MAC_1) { SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E016, - SKERR_SIRQ_E016MSG) ; - } else { + SKERR_SIRQ_E016MSG); + } + else { SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E017, - SKERR_SIRQ_E017MSG) ; + SKERR_SIRQ_E017MSG); } Para.Para64 = Port; SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para); @@ -524,17 +591,18 @@ return; } - /* Check whether frames with a size of 1k were sent */ Len = sizeof(SK_U64); - SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_TX_MAX, (char *) &TxMax, - &Len, (SK_U32) SK_PNMI_PORT_PHYS2INST(Port)); + SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_TX_MAX, (char *)&TxMax, + &Len, (SK_U32)SK_PNMI_PORT_PHYS2INST(pAC, Port), + pAC->Rlmt.Port[Port].Net->NetNumber); if (TxMax > 0) { /* From now on check the parity */ pPrt->PCheckPar = SK_TRUE; } -} +} /* SkMacParity */ + /****************************************************************************** * @@ -550,17 +618,22 @@ SK_U32 HwStatus) /* Interrupt status word */ { SK_EVPARA Para; + SK_U16 Word; - if (HwStatus & IS_IRQ_STAT) { - SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E013, - SKERR_SIRQ_E013MSG) ; - Para.Para64 = 0; - SkEventQueue(pAC, SKGE_DRV, SK_DRV_ADAP_FAIL, Para); - } + if ((HwStatus & IS_IRQ_MST_ERR) || (HwStatus & IS_IRQ_STAT)) { + if (HwStatus & IS_IRQ_STAT) { + SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E013, SKERR_SIRQ_E013MSG); + } + else { + SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E012, SKERR_SIRQ_E012MSG); + } + + /* Reset all bits in the PCI STATUS register */ + SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_ON); + SK_IN16(IoC, PCI_C(PCI_STATUS), &Word); + SK_OUT16(IoC, PCI_C(PCI_STATUS), Word | PCI_ERRBITS); + SK_OUT8(IoC, B2_TST_CTRL1, TST_CFG_WRITE_OFF); - if (HwStatus & IS_IRQ_MST_ERR) { - SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E012, - SKERR_SIRQ_E012MSG) ; Para.Para64 = 0; SkEventQueue(pAC, SKGE_DRV, SK_DRV_ADAP_FAIL, Para); } @@ -568,57 +641,54 @@ if (HwStatus & IS_NO_STAT_M1) { /* Ignore it */ /* This situation is also indicated in the descriptor */ - SK_OUT16(IoC, MR_ADDR(MAC_1,RX_MFF_CTRL1), MFF_CLR_INSTAT) ; + SK_OUT16(IoC, MR_ADDR(MAC_1,RX_MFF_CTRL1), MFF_CLR_INSTAT); } if (HwStatus & IS_NO_STAT_M2) { /* Ignore it */ /* This situation is also indicated in the descriptor */ - SK_OUT16(IoC, MR_ADDR(MAC_2,RX_MFF_CTRL1), MFF_CLR_INSTAT) ; + SK_OUT16(IoC, MR_ADDR(MAC_2,RX_MFF_CTRL1), MFF_CLR_INSTAT); } if (HwStatus & IS_NO_TIST_M1) { /* Ignore it */ /* This situation is also indicated in the descriptor */ - SK_OUT16(IoC, MR_ADDR(MAC_1,RX_MFF_CTRL1), MFF_CLR_INTIST) ; + SK_OUT16(IoC, MR_ADDR(MAC_1,RX_MFF_CTRL1), MFF_CLR_INTIST); } if (HwStatus & IS_NO_TIST_M2) { /* Ignore it */ /* This situation is also indicated in the descriptor */ - SK_OUT16(IoC, MR_ADDR(MAC_2,RX_MFF_CTRL1), MFF_CLR_INTIST) ; + SK_OUT16(IoC, MR_ADDR(MAC_2,RX_MFF_CTRL1), MFF_CLR_INTIST); } if (HwStatus & IS_RAM_RD_PAR) { - SK_OUT16(IoC, B3_RI_CTRL, RI_CLR_RD_PERR) ; - SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E014, - SKERR_SIRQ_E014MSG) ; + SK_OUT16(IoC, B3_RI_CTRL, RI_CLR_RD_PERR); + SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E014, SKERR_SIRQ_E014MSG); Para.Para64 = 0; SkEventQueue(pAC, SKGE_DRV, SK_DRV_ADAP_FAIL, Para); } if (HwStatus & IS_RAM_WR_PAR) { - SK_OUT16(IoC, B3_RI_CTRL, RI_CLR_WR_PERR) ; - SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E015, - SKERR_SIRQ_E015MSG) ; + SK_OUT16(IoC, B3_RI_CTRL, RI_CLR_WR_PERR); + SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E015, SKERR_SIRQ_E015MSG); Para.Para64 = 0; SkEventQueue(pAC, SKGE_DRV, SK_DRV_ADAP_FAIL, Para); } if (HwStatus & IS_M1_PAR_ERR) { - SkMacParity(pAC, IoC, MAC_1) ; + SkMacParity(pAC, IoC, MAC_1); } if (HwStatus & IS_M2_PAR_ERR) { - SkMacParity(pAC, IoC, MAC_2) ; + SkMacParity(pAC, IoC, MAC_2); } if (HwStatus & IS_R1_PAR_ERR) { /* Clear IRQ */ - SK_OUT32(IoC, B0_R1_CSR, CSR_IRQ_CL_P) ; + SK_OUT32(IoC, B0_R1_CSR, CSR_IRQ_CL_P); - SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E018, - SKERR_SIRQ_E018MSG) ; + SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E018, SKERR_SIRQ_E018MSG); Para.Para64 = MAC_1; SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para); Para.Para32[0] = MAC_1; @@ -627,17 +697,16 @@ if (HwStatus & IS_R2_PAR_ERR) { /* Clear IRQ */ - SK_OUT32(IoC, B0_R2_CSR, CSR_IRQ_CL_P) ; + SK_OUT32(IoC, B0_R2_CSR, CSR_IRQ_CL_P); - SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E019, - SKERR_SIRQ_E019MSG) ; + SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E019, SKERR_SIRQ_E019MSG); Para.Para64 = MAC_2; SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para); Para.Para32[0] = MAC_2; SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para); } +} /* SkGeHwErr */ -} /****************************************************************************** * @@ -652,13 +721,13 @@ SK_IOC IoC, /* IO context */ SK_U32 Istatus) /* Interrupt status word */ { - SK_U32 RegVal32; /* Read register Value */ SK_EVPARA Para; + SK_U32 RegVal32; /* Read register Value */ SK_U16 XmIsr; if (Istatus & IS_HW_ERR) { - SK_IN32(IoC, B0_HWE_ISRC, &RegVal32) ; - SkGeHwErr(pAC, IoC, RegVal32) ; + SK_IN32(IoC, B0_HWE_ISRC, &RegVal32); + SkGeHwErr(pAC, IoC, RegVal32); } /* @@ -666,41 +735,101 @@ */ /* Check whether XMACs are correctly initialized */ if ((Istatus & (IS_PA_TO_RX1 | IS_PA_TO_TX1)) && - !pAC->GIni.GP[MAC_1].PState) { - /* XMAC was not initialized but Packet timeout occured */ + !pAC->GIni.GP[MAC_1].PState) { + /* XMAC was not initialized but Packet timeout occurred */ SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E004, - SKERR_SIRQ_E004MSG) ; + SKERR_SIRQ_E004MSG); } if ((Istatus & (IS_PA_TO_RX2 | IS_PA_TO_TX2)) && !pAC->GIni.GP[MAC_2].PState) { - /* XMAC was not initialized but Packet timeout occured */ + /* XMAC was not initialized but Packet timeout occurred */ SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E005, - SKERR_SIRQ_E005MSG) ; + SKERR_SIRQ_E005MSG); } if (Istatus & IS_PA_TO_RX1) { /* Means network is filling us up */ SK_ERR_LOG(pAC, SK_ERRCL_HW | SK_ERRCL_INIT, SKERR_SIRQ_E002, - SKERR_SIRQ_E002MSG) ; - SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_RX1) ; + SKERR_SIRQ_E002MSG); + SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_RX1); } if (Istatus & IS_PA_TO_RX2) { /* Means network is filling us up */ SK_ERR_LOG(pAC, SK_ERRCL_HW | SK_ERRCL_INIT, SKERR_SIRQ_E003, - SKERR_SIRQ_E003MSG) ; - SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_RX2) ; + SKERR_SIRQ_E003MSG); + SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_RX2); } if (Istatus & IS_PA_TO_TX1) { + unsigned int Len; + SK_U64 Octets; + SK_GEPORT *pPrt = &pAC->GIni.GP[0]; + /* May be a normal situation in a server with a slow network */ - SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_TX1) ; + SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_TX1); + + /* + * workaround: if in half duplex mode, check for tx hangup. + * Read number of TX'ed bytes, wait for 10 ms, then compare + * the number with current value. If nothing changed, we + * assume that tx is hanging and do a FIFO flush (see event + * routine). + */ + if ((pPrt->PLinkModeStatus == SK_LMODE_STAT_HALF || + pPrt->PLinkModeStatus == SK_LMODE_STAT_AUTOHALF) && + !pPrt->HalfDupTimerActive) { + /* + * many more pack. arb. timeouts may come in between, + * we ignore those + */ + pPrt->HalfDupTimerActive = SK_TRUE; + + Len = sizeof(SK_U64); + SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_TX_OCTETS, (char *) &Octets, + &Len, (SK_U32) SK_PNMI_PORT_PHYS2INST(pAC, 0), + pAC->Rlmt.Port[0].Net->NetNumber); + pPrt->LastOctets = Octets; + Para.Para32[0] = 0; + SkTimerStart(pAC, IoC, + &pPrt->HalfDupChkTimer, + SK_HALFDUP_CHK_TIME, + SKGE_HWAC, + SK_HWEV_HALFDUP_CHK, + Para); + } } if (Istatus & IS_PA_TO_TX2) { + unsigned int Len; + SK_U64 Octets; + SK_GEPORT *pPrt = &pAC->GIni.GP[1]; + /* May be a normal situation in a server with a slow network */ - SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_TX2) ; + SK_OUT16(IoC, B3_PA_CTRL, PA_CLR_TO_TX2); + + /* + * workaround: see above + */ + if ((pPrt->PLinkModeStatus == SK_LMODE_STAT_HALF || + pPrt->PLinkModeStatus == SK_LMODE_STAT_AUTOHALF) && + !pPrt->HalfDupTimerActive) { + pPrt->HalfDupTimerActive = SK_TRUE; + + Len = sizeof(SK_U64); + SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_TX_OCTETS, (char *) &Octets, + &Len, (SK_U32) SK_PNMI_PORT_PHYS2INST(pAC, 1), + pAC->Rlmt.Port[1].Net->NetNumber); + pPrt->LastOctets = Octets; + Para.Para32[0] = 1; + SkTimerStart(pAC, IoC, + &pPrt->HalfDupChkTimer, + SK_HALFDUP_CHK_TIME, + SKGE_HWAC, + SK_HWEV_HALFDUP_CHK, + Para); + } } /* @@ -708,9 +837,9 @@ */ if (Istatus & IS_R1_C) { /* Clear IRQ */ - SK_OUT32(IoC, B0_R1_CSR, CSR_IRQ_CL_C) ; + SK_OUT32(IoC, B0_R1_CSR, CSR_IRQ_CL_C); SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E006, - SKERR_SIRQ_E006MSG) ; + SKERR_SIRQ_E006MSG); Para.Para64 = MAC_1; SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para); Para.Para32[0] = MAC_1; @@ -719,9 +848,9 @@ if (Istatus & IS_R2_C) { /* Clear IRQ */ - SK_OUT32(IoC, B0_R2_CSR, CSR_IRQ_CL_C) ; + SK_OUT32(IoC, B0_R2_CSR, CSR_IRQ_CL_C); SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E007, - SKERR_SIRQ_E007MSG) ; + SKERR_SIRQ_E007MSG); Para.Para64 = MAC_2; SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para); Para.Para32[0] = MAC_2; @@ -730,9 +859,9 @@ if (Istatus & IS_XS1_C) { /* Clear IRQ */ - SK_OUT32(IoC, B0_XS1_CSR, CSR_IRQ_CL_C) ; + SK_OUT32(IoC, B0_XS1_CSR, CSR_IRQ_CL_C); SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E008, - SKERR_SIRQ_E008MSG) ; + SKERR_SIRQ_E008MSG); Para.Para64 = MAC_1; SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para); Para.Para32[0] = MAC_1; @@ -741,9 +870,9 @@ if (Istatus & IS_XA1_C) { /* Clear IRQ */ - SK_OUT32(IoC, B0_XA1_CSR, CSR_IRQ_CL_C) ; + SK_OUT32(IoC, B0_XA1_CSR, CSR_IRQ_CL_C); SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E009, - SKERR_SIRQ_E009MSG) ; + SKERR_SIRQ_E009MSG); Para.Para64 = MAC_1; SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para); Para.Para32[0] = MAC_1; @@ -752,9 +881,9 @@ if (Istatus & IS_XS2_C) { /* Clear IRQ */ - SK_OUT32(IoC, B0_XS2_CSR, CSR_IRQ_CL_C) ; + SK_OUT32(IoC, B0_XS2_CSR, CSR_IRQ_CL_C); SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E010, - SKERR_SIRQ_E010MSG) ; + SKERR_SIRQ_E010MSG); Para.Para64 = MAC_2; SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para); Para.Para32[0] = MAC_2; @@ -763,9 +892,9 @@ if (Istatus & IS_XA2_C) { /* Clear IRQ */ - SK_OUT32(IoC, B0_XA2_CSR, CSR_IRQ_CL_C) ; + SK_OUT32(IoC, B0_XA2_CSR, CSR_IRQ_CL_C); SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E011, - SKERR_SIRQ_E011MSG) ; + SKERR_SIRQ_E011MSG); Para.Para64 = MAC_2; SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para); Para.Para32[0] = MAC_2; @@ -773,55 +902,59 @@ } /* - * I2C Ready interrupt + * External reg interrupt. */ - if (Istatus & IS_I2C_READY) { + if (Istatus & IS_EXT_REG) { SK_U16 PhyInt; SK_U16 PhyIMsk; - SK_BOOL IsPhyInt = SK_FALSE; - int i; - /* test IRQs from PHY */ - for (i=0; iGIni.GIMacsFound; i++) { - switch (pAC->GIni.GP[i].PhyType) { + int i; + SK_GEPORT *pPrt; /* GIni Port struct pointer */ + + /* Test IRQs from PHY. */ + for (i = 0; i < pAC->GIni.GIMacsFound; i++) { + pPrt = &pAC->GIni.GP[i]; + switch (pPrt->PhyType) { case SK_PHY_XMAC: break; case SK_PHY_BCOM: - if(pAC->GIni.GP[i].PState) { - PHY_READ(IoC, &pAC->GIni.GP[i], i, - PHY_BCOM_INT_STAT, &PhyInt); - PHY_READ(IoC, &pAC->GIni.GP[i], i, - PHY_BCOM_INT_MASK, &PhyIMsk); + if (pPrt->PState) { + PHY_READ(IoC, pPrt, i, PHY_BCOM_INT_STAT, &PhyInt); + PHY_READ(IoC, pPrt, i, PHY_BCOM_INT_MASK, &PhyIMsk); + +#ifdef xDEBUG + if (PhyInt & PhyIMsk) { + CMSMPrintString( + pAC->pConfigTable, + MSG_TYPE_RUNTIME_INFO, + "SirqIsr - Stat: %x", + (void *)PhyInt, + (void *)NULL); + } +#endif /* DEBUG */ - if (PhyInt & (~PhyIMsk)) { - SK_DBG_MSG(pAC,SK_DBGMOD_HWM, + if (PhyInt & ~PhyIMsk) { + SK_DBG_MSG( + pAC, + SK_DBGMOD_HWM, SK_DBGCAT_IRQ, - ("Port %d Bcom Int: %x " - " Mask: %x\n", - i, PhyInt, PhyIMsk)); - SkPhyIsrBcom(pAC, IoC, i, - (SK_U16) - (PhyInt & (~PhyIMsk))); - IsPhyInt = SK_TRUE; + ("Port %d Bcom Int: %x Mask: %x\n", + i, PhyInt, PhyIMsk)); + SkPhyIsrBcom(pAC, IoC, i, PhyInt); } } - else { - } break; case SK_PHY_LONE: - PHY_READ(IoC, &pAC->GIni.GP[i], i, - PHY_LONE_INT_STAT, &PhyInt); - PHY_READ(IoC, &pAC->GIni.GP[i], i, - PHY_LONE_INT_ENAB, &PhyIMsk); + PHY_READ(IoC, pPrt, i, PHY_LONE_INT_STAT, &PhyInt); + PHY_READ(IoC, pPrt, i, PHY_LONE_INT_ENAB, &PhyIMsk); if (PhyInt & PhyIMsk) { - SK_DBG_MSG(pAC,SK_DBGMOD_HWM, + SK_DBG_MSG( + pAC, + SK_DBGMOD_HWM, SK_DBGCAT_IRQ, - ("Port %d Lone Int: %x " - " Mask: %x\n", + ("Port %d Lone Int: %x Mask: %x\n", i, PhyInt, PhyIMsk)); - SkPhyIsrLone(pAC, IoC, i, - (SK_U16) (PhyInt & PhyIMsk)); - IsPhyInt = SK_TRUE; + SkPhyIsrLone(pAC, IoC, i, PhyInt); } break; case SK_PHY_NAT: @@ -829,9 +962,13 @@ break; } } - if (!IsPhyInt) { - SkI2cIsr(pAC, IoC); - } + } + + /* + * I2C Ready interrupt + */ + if (Istatus & IS_I2C_READY) { + SkI2cIsr(pAC, IoC); } if (Istatus & IS_LNK_SYNC_M1) { @@ -840,12 +977,12 @@ * us only a link going down. */ /* clear interrupt */ - SK_OUT8(IoC, MR_ADDR(MAC_1,LNK_SYNC_CTRL), LED_CLR_IRQ); + SK_OUT8(IoC, MR_ADDR(MAC_1, LNK_SYNC_CTRL), LED_CLR_IRQ); } /* Check MAC after link sync counter */ if (Istatus & IS_MAC1) { - XM_IN16(IoC, MAC_1, XM_ISRC, &XmIsr) ; + XM_IN16(IoC, MAC_1, XM_ISRC, &XmIsr); SkXmIrq(pAC, IoC, MAC_1, XmIsr); } @@ -860,7 +997,7 @@ /* Check MAC after link sync counter */ if (Istatus & IS_MAC2) { - XM_IN16(IoC, MAC_2, XM_ISRC, &XmIsr) ; + XM_IN16(IoC, MAC_2, XM_ISRC, &XmIsr); SkXmIrq(pAC, IoC, MAC_2, XmIsr); } @@ -871,20 +1008,9 @@ if (Istatus & IS_TIMINT) { SkHwtIsr(pAC, IoC); } -} +} /* SkGeSirqIsr */ + -/* - * Define an array of RX counter which are checked - * in AutoSense mode to check whether a link is not able to autonegotiate. - */ -static const SK_U32 SkGeRxOids[]= { - OID_SKGE_STAT_RX_64, - OID_SKGE_STAT_RX_127, - OID_SKGE_STAT_RX_255, - OID_SKGE_STAT_RX_511, - OID_SKGE_STAT_RX_1023, - OID_SKGE_STAT_RX_MAX, -} ; /****************************************************************************** * * SkGePortCheckShorts - Implementing of the Workaround Errata # 2 @@ -894,19 +1020,19 @@ * 1 Restart needed on this port */ int SkGePortCheckShorts( -SK_AC *pAC, /* Adapters context */ +SK_AC *pAC, /* Adapter Context */ SK_IOC IoC, /* IO Context */ -int Port) /* Which port should be checked */ +int Port) /* Which port should be checked */ { - SK_U64 Shorts; /* Short Event Counter */ + SK_U64 Shorts; /* Short Event Counter */ SK_U64 CheckShorts; /* Check value for Short Event Counter */ - SK_U64 RxCts; /* RX Counter (packets on network) */ - SK_U64 RxTmp; /* RX temp. Counter */ - SK_U64 FcsErrCts; /* FCS Error Counter */ - SK_GEPORT *pPrt; /* GIni Port struct pointer */ - unsigned int Len; - int Rtv; /* Return value */ - int i; + SK_U64 RxCts; /* RX Counter (packets on network) */ + SK_U64 RxTmp; /* RX temp. Counter */ + SK_U64 FcsErrCts; /* FCS Error Counter */ + SK_GEPORT *pPrt; /* GIni Port struct pointer */ + unsigned Len; + int Rtv; /* Return value */ + int i; pPrt = &pAC->GIni.GP[Port]; @@ -917,8 +1043,9 @@ * Extra precaution: check for short Event counter */ Len = sizeof(SK_U64); - SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_RX_SHORTS, (char *) &Shorts, - &Len, (SK_U32) SK_PNMI_PORT_PHYS2INST(Port)); + SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_RX_SHORTS, (char *)&Shorts, + &Len, (SK_U32)SK_PNMI_PORT_PHYS2INST(pAC, Port), + pAC->Rlmt.Port[Port].Net->NetNumber); /* * Read RX counter (packets seen on the network and not neccesarily @@ -927,9 +1054,10 @@ Len = sizeof(SK_U64); RxCts = 0; - for (i = 0; i < sizeof(SkGeRxOids)/sizeof(SK_U32) ; i++) { - SkPnmiGetVar(pAC, IoC, SkGeRxOids[i], (char *) &RxTmp, - &Len, (SK_U32) SK_PNMI_PORT_PHYS2INST(Port)); + for (i = 0; i < sizeof(SkGeRxOids)/sizeof(SK_U32); i++) { + SkPnmiGetVar(pAC, IoC, SkGeRxOids[i], (char *)&RxTmp, + &Len, (SK_U32)SK_PNMI_PORT_PHYS2INST(pAC, Port), + pAC->Rlmt.Port[Port].Net->NetNumber); RxCts += RxTmp; } @@ -944,19 +1072,20 @@ * Reset Link Restart counter */ pPrt->PLinkResCt = 0; + pPrt->PAutoNegTOCt = 0; /* If link is up check for 2 */ CheckShorts = 2; Len = sizeof(SK_U64); SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_RX_FCS, - (char *) &FcsErrCts, &Len, - (SK_U32) SK_PNMI_PORT_PHYS2INST(Port)); + (char *)&FcsErrCts, &Len, (SK_U32)SK_PNMI_PORT_PHYS2INST(pAC, Port), + pAC->Rlmt.Port[Port].Net->NetNumber); if (pPrt->PLinkModeConf == SK_LMODE_AUTOSENSE && pPrt->PLipaAutoNeg == SK_LIPA_UNKNOWN && (pPrt->PLinkMode == SK_LMODE_HALF || - pPrt->PLinkMode == SK_LMODE_FULL)) { + pPrt->PLinkMode == SK_LMODE_FULL)) { /* * This is autosensing and we are in the fallback * manual full/half duplex mode. @@ -968,8 +1097,9 @@ */ pPrt->PPrevFcs = FcsErrCts; pPrt->PPrevShorts = Shorts; - return(SK_HW_PS_RESTART); - } else { + return (SK_HW_PS_RESTART); + } + else { pPrt->PLipaAutoNeg = SK_LIPA_MANUAL; } } @@ -977,20 +1107,18 @@ if (((RxCts - pPrt->PPrevRx) > pPrt->PRxLim) || (!(FcsErrCts - pPrt->PPrevFcs))) { /* - * Note: The compare with zero above has to be done - * the way shown, otherwise the Linux driver will - * have a problem. + * Note: The compare with zero above has to be done the way shown, + * otherwise the Linux driver will have a problem. */ /* - * we received a bunch of frames or no - * CRC error occured on the network -> - * ok. + * We received a bunch of frames or no CRC error occurred on the + * network -> ok. */ pPrt->PPrevRx = RxCts; pPrt->PPrevFcs = FcsErrCts; pPrt->PPrevShorts = Shorts; - return(SK_HW_PS_NONE) ; + return (SK_HW_PS_NONE); } pPrt->PPrevFcs = FcsErrCts; @@ -998,7 +1126,7 @@ if ((Shorts - pPrt->PPrevShorts) > CheckShorts) { - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_IRQ, + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ, ("Short Event Count Restart Port %d \n", Port)); Rtv = SK_HW_PS_RESTART; } @@ -1006,13 +1134,13 @@ pPrt->PPrevShorts = Shorts; pPrt->PPrevRx = RxCts; - return(Rtv); -} + return (Rtv); +} /* SkGePortCheckShorts*/ /****************************************************************************** * - * SkGePortCheckUp - Implementing of the Workaround Errata # 2 + * SkGePortCheckUp - Implementation of the Workaround for Errata #2 * * return: * 0 o.k. nothing needed @@ -1020,15 +1148,11 @@ * 2 Link came up */ int SkGePortCheckUp( -SK_AC *pAC, /* Adapters context */ +SK_AC *pAC, /* Adapter Context */ SK_IOC IoC, /* IO Context */ -int Port) /* Which port should be checked */ +int Port) /* Which port should be checked */ { - SK_GEPORT *pPrt; /* GIni Port struct pointer */ - - pPrt = &pAC->GIni.GP[Port]; - - switch (pPrt->PhyType) { + switch (pAC->GIni.GP[Port].PhyType) { case SK_PHY_XMAC: return (SkGePortCheckUpXmac(pAC, IoC, Port)); case SK_PHY_BCOM: @@ -1038,9 +1162,8 @@ case SK_PHY_NAT: return (SkGePortCheckUpNat(pAC, IoC, Port)); } - - return(SK_HW_PS_NONE) ; -} + return (SK_HW_PS_NONE); +} /* SkGePortCheckUp */ /****************************************************************************** @@ -1053,75 +1176,69 @@ * 2 Link came up */ static int SkGePortCheckUpXmac( -SK_AC *pAC, /* Adapters context */ +SK_AC *pAC, /* Adapter Context */ SK_IOC IoC, /* IO Context */ -int Port) /* Which port should be checked */ +int Port) /* Which port should be checked */ { + SK_U64 Shorts; /* Short Event Counter */ SK_GEPORT *pPrt; /* GIni Port struct pointer */ - SK_BOOL AutoNeg; /* Is Autonegotiation used ? */ - SK_U16 Isrc; /* Interrupt source register */ + unsigned Len; + int Done; SK_U32 GpReg; /* General Purpose register value */ + SK_U16 Isrc; /* Interrupt source register */ SK_U16 IsrcSum; /* Interrupt source register sum */ SK_U16 LpAb; /* Link Partner Ability */ SK_U16 ResAb; /* Resolved Ability */ - SK_U64 Shorts; /* Short Event Counter */ - unsigned int Len; - SK_U8 NextMode; /* Next AutoSensing Mode */ SK_U16 ExtStat; /* Extended Status Register */ - int Done; + SK_BOOL AutoNeg; /* Is Autonegotiation used ? */ + SK_U8 NextMode; /* Next AutoSensing Mode */ pPrt = &pAC->GIni.GP[Port]; if (pPrt->PHWLinkUp) { if (pPrt->PhyType != SK_PHY_XMAC) { - return(SK_HW_PS_NONE) ; + return (SK_HW_PS_NONE); } else { - return(SkGePortCheckShorts(pAC, IoC, Port)) ; + return (SkGePortCheckShorts(pAC, IoC, Port)); } } IsrcSum = pPrt->PIsave; pPrt->PIsave = 0; - /* Now wait for each ports link */ + /* Now wait for each port's link. */ if (pPrt->PLinkMode == SK_LMODE_HALF || pPrt->PLinkMode == SK_LMODE_FULL) { AutoNeg = SK_FALSE; - } else { + } + else { AutoNeg = SK_TRUE; } if (pPrt->PLinkBroken) { /* Link was broken */ - XM_IN32(IoC,Port,XM_GP_PORT, &GpReg) ; + XM_IN32(IoC,Port,XM_GP_PORT, &GpReg); if ((GpReg & XM_GP_INP_ASS) == 0) { /* The Link is in sync */ - XM_IN16(IoC,Port,XM_ISRC, &Isrc) ; + XM_IN16(IoC,Port,XM_ISRC, &Isrc); IsrcSum |= Isrc; SkXmAutoNegLipaXmac(pAC, IoC, Port, IsrcSum); if ((Isrc & XM_IS_INP_ASS) == 0) { /* It has been in sync since last Time */ /* Restart the PORT */ - - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_IRQ, - ("Link in sync Restart Port %d\n", - Port)); + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ, + ("Link in sync Restart Port %d\n", Port)); - /* - * We now need to reinitialize the PrevSHorts - * counter. - */ + /* We now need to reinitialize the PrevShorts counter. */ Len = sizeof(SK_U64); - SkPnmiGetVar(pAC, IoC, - OID_SKGE_STAT_RX_SHORTS, - (char *) &Shorts, - &Len, - (SK_U32) SK_PNMI_PORT_PHYS2INST(Port)); + SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_RX_SHORTS, (char *)&Shorts, + &Len, (SK_U32)SK_PNMI_PORT_PHYS2INST(pAC, Port), + pAC->Rlmt.Port[Port].Net->NetNumber); pPrt->PPrevShorts = Shorts; - pAC->GIni.GP[Port].PLinkBroken = SK_FALSE ; + pAC->GIni.GP[Port].PLinkBroken = SK_FALSE; /* * Link Restart Workaround: @@ -1136,61 +1253,60 @@ pAC->GIni.GP[Port].PLinkResCt ++; pPrt->PAutoNegTimeOut = 0; - if (pAC->GIni.GP[Port].PLinkResCt < - SK_MAX_LRESTART) { - return(SK_HW_PS_RESTART) ; + if (pAC->GIni.GP[Port].PLinkResCt < SK_MAX_LRESTART) { + return (SK_HW_PS_RESTART); } SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, - ("Do NOT restart on Port %d %x %x\n", - Port, Isrc, IsrcSum)); + ("Do NOT restart on Port %d %x %x\n", Port, Isrc, IsrcSum)); pAC->GIni.GP[Port].PLinkResCt = 0; - } else { - pPrt->PIsave = (SK_U16) (IsrcSum & (XM_IS_AND)); + } + else { + pPrt->PIsave = (SK_U16)(IsrcSum & (XM_IS_AND)); SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, - ("Save Sync/nosync Port %d %x %x\n", - Port, Isrc, IsrcSum)); + ("Save Sync/nosync Port %d %x %x\n", Port, Isrc, IsrcSum)); + /* Do nothing more if link is broken */ - return(SK_HW_PS_NONE) ; + return (SK_HW_PS_NONE); } - } else { + } + else { /* Do nothing more if link is broken */ - return(SK_HW_PS_NONE) ; + return (SK_HW_PS_NONE); } - } else { + } + else { /* Link was not broken, check if it is */ - XM_IN16(IoC,Port,XM_ISRC, &Isrc) ; + XM_IN16(IoC, Port, XM_ISRC, &Isrc); IsrcSum |= Isrc; if ((Isrc & XM_IS_INP_ASS) == XM_IS_INP_ASS) { - XM_IN16(IoC,Port,XM_ISRC, &Isrc) ; + XM_IN16(IoC, Port, XM_ISRC, &Isrc); IsrcSum |= Isrc; if ((Isrc & XM_IS_INP_ASS) == XM_IS_INP_ASS) { - XM_IN16(IoC,Port,XM_ISRC, &Isrc) ; + XM_IN16(IoC, Port, XM_ISRC, &Isrc); IsrcSum |= Isrc; if ((Isrc & XM_IS_INP_ASS) == XM_IS_INP_ASS) { - pPrt->PLinkBroken = SK_TRUE ; + pPrt->PLinkBroken = SK_TRUE; /* * Re-Init Link partner Autoneg flag */ pPrt->PLipaAutoNeg = SK_LIPA_UNKNOWN; - SK_DBG_MSG(pAC,SK_DBGMOD_HWM, - SK_DBGCAT_IRQ, - ("Link broken Port %d\n", - Port)); + SK_DBG_MSG(pAC,SK_DBGMOD_HWM, SK_DBGCAT_IRQ, + ("Link broken Port %d\n", Port)); - /* cable removed-> reinit Sensemode */ - /* Init default sense mode */ + /* Cable removed-> reinit sense mode. */ + /* Init default sense mode. */ SkHWInitDefSense(pAC, IoC, Port); - return(SK_HW_PS_RESTART) ; + return (SK_HW_PS_RESTART); } } - } else { + } + else { SkXmAutoNegLipaXmac(pAC, IoC, Port, Isrc); - if (SkGePortCheckShorts(pAC, IoC, Port) == - SK_HW_PS_RESTART) { - return(SK_HW_PS_RESTART) ; + if (SkGePortCheckShorts(pAC, IoC, Port) == SK_HW_PS_RESTART) { + return (SK_HW_PS_RESTART); } } } @@ -1199,18 +1315,15 @@ * here we usually can check whether the link is in sync and * autonegotiation is done. */ - XM_IN32(IoC,Port,XM_GP_PORT, &GpReg) ; - XM_IN16(IoC,Port,XM_ISRC, &Isrc) ; + XM_IN32(IoC, Port, XM_GP_PORT, &GpReg); + XM_IN16(IoC, Port, XM_ISRC, &Isrc); IsrcSum |= Isrc; SkXmAutoNegLipaXmac(pAC, IoC, Port, IsrcSum); if ((GpReg & XM_GP_INP_ASS) != 0 || (IsrcSum & XM_IS_INP_ASS) != 0) { if ((GpReg & XM_GP_INP_ASS) == 0) { - /* - * Save Autonegotiation Done interrupt only if link - * is in sync - */ - pPrt->PIsave = (SK_U16) (IsrcSum & (XM_IS_AND)); + /* Save Autonegotiation Done interrupt only if link is in sync. */ + pPrt->PIsave = (SK_U16)(IsrcSum & (XM_IS_AND)); } #ifdef DEBUG if (pPrt->PIsave & (XM_IS_AND)) { @@ -1218,44 +1331,40 @@ ("AutoNeg done rescheduled Port %d\n", Port)); } #endif - return(SK_HW_PS_NONE) ; + return (SK_HW_PS_NONE); } if (AutoNeg) { if (IsrcSum & XM_IS_AND) { - SkHWLinkUp(pAC, IoC, Port) ; + SkHWLinkUp(pAC, IoC, Port); Done = SkXmAutoNegDone(pAC,IoC,Port); if (Done != SK_AND_OK) { /* Get PHY parameters, for debuging only */ - PHY_READ(IoC, pPrt, Port, PHY_XMAC_AUNE_LP, - &LpAb); - PHY_READ(IoC, pPrt, Port, PHY_XMAC_RES_ABI, - &ResAb); + PHY_READ(IoC, pPrt, Port, PHY_XMAC_AUNE_LP, &LpAb); + PHY_READ(IoC, pPrt, Port, PHY_XMAC_RES_ABI, &ResAb); SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("AutoNeg FAIL Port %d (LpAb %x, ResAb %x)\n", Port, LpAb, ResAb)); /* Try next possible mode */ NextMode = SkHWSenseGetNext(pAC, IoC, Port); - SkHWLinkDown(pAC, IoC, Port) ; + SkHWLinkDown(pAC, IoC, Port); if (Done == SK_AND_DUP_CAP) { /* GoTo next mode */ - SkHWSenseSetNext(pAC, IoC, Port, - NextMode); + SkHWSenseSetNext(pAC, IoC, Port, NextMode); } - return(SK_HW_PS_RESTART) ; - - } else { + return (SK_HW_PS_RESTART); + } + else { /* - * Dummy Read extended status to prevent - * extra link down/ups + * Dummy Read extended status to prevent extra link down/ups * (clear Page Received bit if set) */ PHY_READ(IoC, pPrt, Port, PHY_XMAC_AUNE_EXP, &ExtStat); SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("AutoNeg done Port %d\n", Port)); - return(SK_HW_PS_LINK) ; + return (SK_HW_PS_LINK); } } @@ -1265,7 +1374,12 @@ pPrt->PAutoNegTimeOut ++; if (pPrt->PAutoNegTimeOut >= SK_AND_MAX_TO) { /* - * Timeout occured. + * Increase the Timeout counter. + */ + pPrt->PAutoNegTOCt ++; + + /* + * Timeout occurred. * What do we need now? */ SK_DBG_MSG(pAC,SK_DBGMOD_HWM, @@ -1275,42 +1389,57 @@ if (pPrt->PLinkModeConf == SK_LMODE_AUTOSENSE && pPrt->PLipaAutoNeg != SK_LIPA_AUTO) { /* - * Timeout occured + * Timeout occurred * Set Link manually up. */ - SkHWSenseSetNext(pAC, IoC, Port, - SK_LMODE_FULL); - SK_DBG_MSG(pAC,SK_DBGMOD_HWM, - SK_DBGCAT_IRQ, - ("Set manual full duplex Port %d\n", - Port)); + SkHWSenseSetNext(pAC, IoC, Port, SK_LMODE_FULL); + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ, + ("Set manual full duplex Port %d\n", Port)); + } + + if (pPrt->PLinkModeConf == SK_LMODE_AUTOSENSE && + pPrt->PLipaAutoNeg == SK_LIPA_AUTO && + pPrt->PAutoNegTOCt >= SK_MAX_ANEG_TO) { + /* + * This is rather complicated. + * we need to check here whether the LIPA_AUTO + * we saw before is false alert. We saw at one + * switch ( SR8800) that on boot time it sends + * just one autoneg packet and does no further + * autonegotiation. + * Solution: we restart the autosensing after + * a few timeouts. + */ + pPrt->PAutoNegTOCt = 0; + pPrt->PLipaAutoNeg = SK_LIPA_UNKNOWN; + SkHWInitDefSense(pAC, IoC, Port); } /* * Do the restart */ - return(SK_HW_PS_RESTART) ; + return (SK_HW_PS_RESTART); } - } else { + } + else { /* * Link is up and we don't need more. */ #ifdef DEBUG if (pPrt->PLipaAutoNeg == SK_LIPA_AUTO) { - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, - ("ERROR: Lipa auto detected on port %d\n", - Port)); + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL, + ("ERROR: Lipa auto detected on port %d\n", Port)); } #endif SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_IRQ, ("Link sync(GP), Port %d\n", Port)); - SkHWLinkUp(pAC, IoC, Port) ; - return(SK_HW_PS_LINK) ; + SkHWLinkUp(pAC, IoC, Port); + return (SK_HW_PS_LINK); } - return(SK_HW_PS_NONE) ; -} + return (SK_HW_PS_NONE); +} /* SkGePortCheckUpXmac */ /****************************************************************************** @@ -1323,44 +1452,216 @@ * 2 Link came up */ static int SkGePortCheckUpBcom( -SK_AC *pAC, /* Adapters context */ -SK_IOC IoC, /* IO Context */ -int Port) /* Which port should be checked */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* IO Context */ +int Port) /* Which port should be checked */ { SK_GEPORT *pPrt; /* GIni Port struct pointer */ - SK_BOOL AutoNeg; /* Is Autonegotiation used ? */ + int Done; SK_U16 Isrc; /* Interrupt source register */ - SK_U16 LpAb; /* Link Partner Ability */ - SK_U16 ExtStat; /* Extended Status Register */ SK_U16 PhyStat; /* Phy Status Register */ - int Done; - SK_U16 ResAb; + SK_U16 ResAb; /* Master/Slave resolution */ + SK_U16 Ctrl; /* Broadcom control flags */ +#ifdef DEBUG + SK_U16 LpAb; + SK_U16 ExtStat; +#endif /* DEBUG */ + SK_BOOL AutoNeg; /* Is Autonegotiation used ? */ pPrt = &pAC->GIni.GP[Port]; + + /* Check for No HCD Link events (#10523) */ + PHY_READ(IoC, pPrt, Port, PHY_BCOM_INT_STAT, &Isrc); + +#ifdef xDEBUG + if ((Isrc & ~0x1800) == 0x70) { + SK_U32 Stat1, Stat2, Stat3; + + Stat1 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_INT_MASK, &Stat1); + CMSMPrintString( + pAC->pConfigTable, + MSG_TYPE_RUNTIME_INFO, + "CheckUp1 - Stat: %x, Mask: %x", + (void *)Isrc, + (void *)Stat1); + + Stat1 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_CTRL, &Stat1); + Stat2 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_STAT, &Stat2); + Stat1 = Stat1 << 16 | Stat2; + Stat2 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUNE_ADV, &Stat2); + Stat3 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUNE_LP, &Stat3); + Stat2 = Stat2 << 16 | Stat3; + CMSMPrintString( + pAC->pConfigTable, + MSG_TYPE_RUNTIME_INFO, + "Ctrl/Stat: %x, AN Adv/LP: %x", + (void *)Stat1, + (void *)Stat2); + + Stat1 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUNE_EXP, &Stat1); + Stat2 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_EXT_STAT, &Stat2); + Stat1 = Stat1 << 16 | Stat2; + Stat2 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_1000T_CTRL, &Stat2); + Stat3 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_1000T_STAT, &Stat3); + Stat2 = Stat2 << 16 | Stat3; + CMSMPrintString( + pAC->pConfigTable, + MSG_TYPE_RUNTIME_INFO, + "AN Exp/IEEE Ext: %x, 1000T Ctrl/Stat: %x", + (void *)Stat1, + (void *)Stat2); + + Stat1 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_P_EXT_CTRL, &Stat1); + Stat2 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_P_EXT_STAT, &Stat2); + Stat1 = Stat1 << 16 | Stat2; + Stat2 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUX_CTRL, &Stat2); + Stat3 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUX_STAT, &Stat3); + Stat2 = Stat2 << 16 | Stat3; + CMSMPrintString( + pAC->pConfigTable, + MSG_TYPE_RUNTIME_INFO, + "PHY Ext Ctrl/Stat: %x, Aux Ctrl/Stat: %x", + (void *)Stat1, + (void *)Stat2); + } +#endif /* DEBUG */ + + if ((Isrc & (PHY_B_IS_NO_HDCL /* | PHY_B_IS_NO_HDC */)) != 0) { + /* + * Workaround BCOM Errata: + * enable and disable loopback mode if "NO HCD" occurs. + */ + PHY_READ(IoC, pPrt, Port, PHY_BCOM_CTRL, &Ctrl); + PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_CTRL, Ctrl | PHY_CT_LOOP); + PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_CTRL, Ctrl & ~PHY_CT_LOOP); + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL, + ("No HCD Link event, Port %d\n", Port)); +#ifdef xDEBUG + CMSMPrintString( + pAC->pConfigTable, + MSG_TYPE_RUNTIME_INFO, + "No HCD link event, port %d.", + (void *)Port, + (void *)NULL); +#endif /* DEBUG */ + } + + /* Not obsolete: link status bit is latched to 0 and autoclearing! */ PHY_READ(IoC, pPrt, Port, PHY_BCOM_STAT, &PhyStat); if (pPrt->PHWLinkUp) { - return(SK_HW_PS_NONE) ; + return (SK_HW_PS_NONE); } - pPrt->PIsave = 0; +#ifdef xDEBUG + { + SK_U32 Stat1, Stat2, Stat3; + + Stat1 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_INT_MASK, &Stat1); + CMSMPrintString( + pAC->pConfigTable, + MSG_TYPE_RUNTIME_INFO, + "CheckUp1a - Stat: %x, Mask: %x", + (void *)Isrc, + (void *)Stat1); + + Stat1 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_CTRL, &Stat1); + Stat2 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_STAT, &PhyStat); + Stat1 = Stat1 << 16 | PhyStat; + Stat2 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUNE_ADV, &Stat2); + Stat3 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUNE_LP, &Stat3); + Stat2 = Stat2 << 16 | Stat3; + CMSMPrintString( + pAC->pConfigTable, + MSG_TYPE_RUNTIME_INFO, + "Ctrl/Stat: %x, AN Adv/LP: %x", + (void *)Stat1, + (void *)Stat2); + + Stat1 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUNE_EXP, &Stat1); + Stat2 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_EXT_STAT, &Stat2); + Stat1 = Stat1 << 16 | Stat2; + Stat2 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_1000T_CTRL, &Stat2); + Stat3 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_1000T_STAT, &ResAb); + Stat2 = Stat2 << 16 | ResAb; + CMSMPrintString( + pAC->pConfigTable, + MSG_TYPE_RUNTIME_INFO, + "AN Exp/IEEE Ext: %x, 1000T Ctrl/Stat: %x", + (void *)Stat1, + (void *)Stat2); + + Stat1 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_P_EXT_CTRL, &Stat1); + Stat2 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_P_EXT_STAT, &Stat2); + Stat1 = Stat1 << 16 | Stat2; + Stat2 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUX_CTRL, &Stat2); + Stat3 = 0; + PHY_READ(pAC, pPrt, Port, PHY_BCOM_AUX_STAT, &Stat3); + Stat2 = Stat2 << 16 | Stat3; + CMSMPrintString( + pAC->pConfigTable, + MSG_TYPE_RUNTIME_INFO, + "PHY Ext Ctrl/Stat: %x, Aux Ctrl/Stat: %x", + (void *)Stat1, + (void *)Stat2); + } +#endif /* DEBUG */ - /* Now wait for each port's link */ - if (pPrt->PLinkMode == SK_LMODE_HALF || - pPrt->PLinkMode == SK_LMODE_FULL) { + /* Now wait for each port's link. */ + if (pPrt->PLinkMode == SK_LMODE_HALF || pPrt->PLinkMode == SK_LMODE_FULL) { AutoNeg = SK_FALSE; - } else { + } + else { AutoNeg = SK_TRUE; } /* - * here we usually can check whether the link is in sync and + * Here we usually can check whether the link is in sync and * autonegotiation is done. */ - XM_IN16(IoC, Port, XM_ISRC, &Isrc) ; +#if 0 +/* RA;:;: obsolete */ + XM_IN16(IoC, Port, XM_ISRC, &Isrc); +#endif /* 0 */ PHY_READ(IoC, pPrt, Port, PHY_BCOM_STAT, &PhyStat); +#ifdef xDEBUG + if ((PhyStat & PHY_ST_LSYNC) >> 2 != (ExtStat & PHY_B_PES_LS) >> 8) { + CMSMPrintString( + pAC->pConfigTable, + MSG_TYPE_RUNTIME_INFO, + "PhyStat != ExtStat: %x %x", + (void *)PhyStat, + (void *)ExtStat); + } +#endif /* DEBUG */ + SkXmAutoNegLipaBcom(pAC, IoC, Port, PhyStat); SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL, @@ -1368,28 +1669,22 @@ PHY_READ(IoC, pPrt, Port, PHY_BCOM_1000T_STAT, &ResAb); - if ((PhyStat & PHY_ST_LSYNC) == 0) { - if (ResAb & (PHY_B_1000S_MSF)) { - /* Error */ - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, - ("Master/Slave Fault port %d\n", Port)); - pPrt->PAutoNegFail = SK_TRUE; - pPrt->PMSStatus = SK_MS_STAT_FAULT; - return (SK_AND_OTHER); - } - return (SK_HW_PS_NONE); - } - - if (ResAb & (PHY_B_1000S_MSF)) { + if (ResAb & PHY_B_1000S_MSF) { /* Error */ - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL, ("Master/Slave Fault port %d\n", Port)); pPrt->PAutoNegFail = SK_TRUE; pPrt->PMSStatus = SK_MS_STAT_FAULT; - return (SK_AND_OTHER); - } else if (ResAb & PHY_B_1000S_MSR) { + return (SK_HW_PS_RESTART); + } + + if ((PhyStat & PHY_ST_LSYNC) == 0) { + return (SK_HW_PS_NONE); + } + else if (ResAb & PHY_B_1000S_MSR) { pPrt->PMSStatus = SK_MS_STAT_MASTER; - } else { + } + else { pPrt->PMSStatus = SK_MS_STAT_SLAVE; } @@ -1399,76 +1694,73 @@ if (AutoNeg) { if (PhyStat & PHY_ST_AN_OVER) { SkHWLinkUp(pAC, IoC, Port); - Done = SkXmAutoNegDone(pAC,IoC,Port); + Done = SkXmAutoNegDone(pAC, IoC, Port); if (Done != SK_AND_OK) { - /* Get PHY parameters, for debuging only */ - PHY_READ(IoC, pPrt, Port, - PHY_BCOM_AUNE_LP, - &LpAb); - PHY_READ(IoC, pPrt, Port, - PHY_BCOM_1000T_STAT, - &ExtStat); - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, - ("AutoNeg FAIL Port %d (LpAb %x, " - "1000TStat %x)\n", - Port, LpAb, ExtStat)); - return(SK_HW_PS_RESTART) ; - - } else { - /* - * Dummy Read interrupt status to prevent - * extra link down/ups - */ - PHY_READ(IoC, pPrt, Port, PHY_BCOM_INT_STAT, - &ExtStat); - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, +#ifdef DEBUG + /* Get PHY parameters, for debugging only. */ + PHY_READ(IoC, pPrt, Port, PHY_BCOM_AUNE_LP, &LpAb); + PHY_READ(IoC, pPrt, Port, PHY_BCOM_1000T_STAT, &ExtStat); + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL, + ("AutoNeg FAIL Port %d (LpAb %x, 1000TStat %x)\n", + Port, LpAb, ExtStat)); +#endif /* DEBUG */ + return (SK_HW_PS_RESTART); + } + else { +#ifdef xDEBUG + /* Dummy read ISR to prevent extra link downs/ups. */ + PHY_READ(IoC, pPrt, Port, PHY_BCOM_INT_STAT, &ExtStat); + + if ((ExtStat & ~0x1800) != 0) { + CMSMPrintString( + pAC->pConfigTable, + MSG_TYPE_RUNTIME_INFO, + "CheckUp2 - Stat: %x", + (void *)ExtStat, + (void *)NULL); + } +#endif /* DEBUG */ + + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL, ("AutoNeg done Port %d\n", Port)); - return(SK_HW_PS_LINK) ; + return (SK_HW_PS_LINK); } } - } else { + } + else { /* !AutoNeg */ /* * Link is up and we don't need more. */ #ifdef DEBUG if (pPrt->PLipaAutoNeg == SK_LIPA_AUTO) { - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, - ("ERROR: Lipa auto detected on port %d\n", - Port)); + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL, + ("ERROR: Lipa auto detected on port %d\n", Port)); } #endif -#if 0 - PHY_READ(IoC, pPrt, Port, PHY_BCOM_1000T_STAT, &ResAb); - if (ResAb & (PHY_B_1000S_MSF)) { - /* Error */ - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, - ("Master/Slave Fault port %d\n", Port)); - pPrt->PAutoNegFail = SK_TRUE; - pPrt->PMSStatus = SK_MS_STAT_FAULT; - return (SK_AND_OTHER); - } else if (ResAb & PHY_B_1000S_MSR) { - pPrt->PMSStatus = SK_MS_STAT_MASTER ; - } else { - pPrt->PMSStatus = SK_MS_STAT_SLAVE ; - } -#endif /* 0 */ - - - /* - * Dummy Read interrupt status to prevent - * extra link down/ups - */ +#ifdef xDEBUG + /* Dummy read ISR to prevent extra link downs/ups. */ PHY_READ(IoC, pPrt, Port, PHY_BCOM_INT_STAT, &ExtStat); + + if ((ExtStat & ~0x1800) != 0) { + CMSMPrintString( + pAC->pConfigTable, + MSG_TYPE_RUNTIME_INFO, + "CheckUp3 - Stat: %x", + (void *)ExtStat, + (void *)NULL); + } +#endif /* DEBUG */ - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_IRQ, + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ, ("Link sync(GP), Port %d\n", Port)); - SkHWLinkUp(pAC, IoC, Port) ; - return(SK_HW_PS_LINK) ; + SkHWLinkUp(pAC, IoC, Port); + return (SK_HW_PS_LINK); } - return(SK_HW_PS_NONE) ; -} + return (SK_HW_PS_NONE); +} /* SkGePortCheckUpBcom */ + /****************************************************************************** * @@ -1480,24 +1772,24 @@ * 2 Link came up */ static int SkGePortCheckUpLone( -SK_AC *pAC, /* Adapters context */ +SK_AC *pAC, /* Adapter Context */ SK_IOC IoC, /* IO Context */ -int Port) /* Which port should be checked */ +int Port) /* Which port should be checked */ { SK_GEPORT *pPrt; /* GIni Port struct pointer */ - SK_BOOL AutoNeg; /* Is Autonegotiation used ? */ + int Done; SK_U16 Isrc; /* Interrupt source register */ SK_U16 LpAb; /* Link Partner Ability */ - SK_U8 NextMode; /* Next AutoSensing Mode */ SK_U16 ExtStat; /* Extended Status Register */ SK_U16 PhyStat; /* Phy Status Register */ SK_U16 StatSum; - int Done; + SK_BOOL AutoNeg; /* Is Autonegotiation used ? */ + SK_U8 NextMode; /* Next AutoSensing Mode */ pPrt = &pAC->GIni.GP[Port]; if (pPrt->PHWLinkUp) { - return(SK_HW_PS_NONE) ; + return (SK_HW_PS_NONE); } StatSum = pPrt->PIsave; @@ -1507,7 +1799,8 @@ if (pPrt->PLinkMode == SK_LMODE_HALF || pPrt->PLinkMode == SK_LMODE_FULL) { AutoNeg = SK_FALSE; - } else { + } + else { AutoNeg = SK_TRUE; } @@ -1515,7 +1808,7 @@ * here we usually can check whether the link is in sync and * autonegotiation is done. */ - XM_IN16(IoC, Port, XM_ISRC, &Isrc) ; + XM_IN16(IoC, Port, XM_ISRC, &Isrc); PHY_READ(IoC, pPrt, Port, PHY_LONE_STAT, &PhyStat); StatSum |= PhyStat; @@ -1524,19 +1817,19 @@ /* * Save Autonegotiation Done bit */ - pPrt->PIsave = (SK_U16) (StatSum & PHY_ST_AN_OVER); + pPrt->PIsave = (SK_U16)(StatSum & PHY_ST_AN_OVER); #ifdef DEBUG if (pPrt->PIsave & PHY_ST_AN_OVER) { SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("AutoNeg done rescheduled Port %d\n", Port)); } #endif - return(SK_HW_PS_NONE) ; + return (SK_HW_PS_NONE); } if (AutoNeg) { if (StatSum & PHY_ST_AN_OVER) { - SkHWLinkUp(pAC, IoC, Port) ; + SkHWLinkUp(pAC, IoC, Port); Done = SkXmAutoNegDone(pAC,IoC,Port); if (Done != SK_AND_OK) { /* Get PHY parameters, for debuging only */ @@ -1546,31 +1839,30 @@ PHY_READ(IoC, pPrt, Port, PHY_LONE_1000T_STAT, &ExtStat); - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL, ("AutoNeg FAIL Port %d (LpAb %x, 1000TStat %x)\n", Port, LpAb, ExtStat)); /* Try next possible mode */ NextMode = SkHWSenseGetNext(pAC, IoC, Port); - SkHWLinkDown(pAC, IoC, Port) ; + SkHWLinkDown(pAC, IoC, Port); if (Done == SK_AND_DUP_CAP) { /* GoTo next mode */ - SkHWSenseSetNext(pAC, IoC, Port, - NextMode); + SkHWSenseSetNext(pAC, IoC, Port, NextMode); } - return(SK_HW_PS_RESTART) ; + return (SK_HW_PS_RESTART); - } else { + } + else { /* * Dummy Read interrupt status to prevent * extra link down/ups */ - PHY_READ(IoC, pPrt, Port, PHY_LONE_INT_STAT, - &ExtStat); - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, + PHY_READ(IoC, pPrt, Port, PHY_LONE_INT_STAT, &ExtStat); + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL, ("AutoNeg done Port %d\n", Port)); - return(SK_HW_PS_LINK) ; + return (SK_HW_PS_LINK); } } @@ -1580,7 +1872,7 @@ pPrt->PAutoNegTimeOut ++; if (pPrt->PAutoNegTimeOut >= SK_AND_MAX_TO) { /* - * Timeout occured. + * Timeout occurred. * What do we need now? */ SK_DBG_MSG(pAC,SK_DBGMOD_HWM, @@ -1590,7 +1882,7 @@ if (pPrt->PLinkModeConf == SK_LMODE_AUTOSENSE && pPrt->PLipaAutoNeg != SK_LIPA_AUTO) { /* - * Timeout occured + * Timeout occurred * Set Link manually up. */ SkHWSenseSetNext(pAC, IoC, Port, @@ -1604,17 +1896,17 @@ /* * Do the restart */ - return(SK_HW_PS_RESTART) ; + return (SK_HW_PS_RESTART); } - } else { + } + else { /* * Link is up and we don't need more. */ #ifdef DEBUG if (pPrt->PLipaAutoNeg == SK_LIPA_AUTO) { - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, - ("ERROR: Lipa auto detected on port %d\n", - Port)); + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL, + ("ERROR: Lipa auto detected on port %d\n", Port)); } #endif @@ -1624,14 +1916,14 @@ */ PHY_READ(IoC, pPrt, Port, PHY_LONE_INT_STAT, &ExtStat); - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_IRQ, + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ, ("Link sync(GP), Port %d\n", Port)); - SkHWLinkUp(pAC, IoC, Port) ; - return(SK_HW_PS_LINK) ; + SkHWLinkUp(pAC, IoC, Port); + return (SK_HW_PS_LINK); } - return(SK_HW_PS_NONE) ; -} + return (SK_HW_PS_NONE); +} /* SkGePortCheckUpLone*/ /****************************************************************************** @@ -1644,13 +1936,13 @@ * 2 Link came up */ static int SkGePortCheckUpNat( -SK_AC *pAC, /* Adapters context */ +SK_AC *pAC, /* Adapter Context */ SK_IOC IoC, /* IO Context */ -int Port) /* Which port should be checked */ +int Port) /* Which port should be checked */ { /* todo: National */ - return(SK_HW_PS_NONE) ; -} + return (SK_HW_PS_NONE); +} /* SkGePortCheckUpNat */ /****************************************************************************** @@ -1662,17 +1954,21 @@ * Notes: */ int SkGeSirqEvent( -SK_AC *pAC, /* Adapters context */ +SK_AC *pAC, /* Adapter Context */ SK_IOC IoC, /* Io Context */ SK_U32 Event, /* Module specific Event */ SK_EVPARA Para) /* Event specific Parameter */ { - SK_U32 Port; - SK_U32 Time; - SK_U8 Val8 ; - int PortStat; + SK_U64 Octets; + SK_GEPORT *pPrt; /* GIni Port struct pointer */ + SK_U32 Port; + SK_U32 Time; + unsigned Len; + int PortStat; + SK_U8 Val8; Port = Para.Para32[0]; + pPrt = & pAC->GIni.GP[Port]; switch (Event) { case SK_HWEV_WATIM: @@ -1681,7 +1977,7 @@ switch (PortStat) { case SK_HW_PS_RESTART: - if (pAC->GIni.GP[Port].PHWLinkUp) { + if (pPrt->PHWLinkUp) { /* * Set Link to down. */ @@ -1691,16 +1987,7 @@ * Signal directly to RLMT to ensure correct * sequence of SWITCH and RESET event. */ - Para.Para32[0] = (SK_U32) Port; SkRlmtEvent(pAC, IoC, SK_RLMT_LINK_DOWN, Para); - - /* Start workaround Errata #2 timer */ - SkTimerStart(pAC, IoC, - &pAC->GIni.GP[Port].PWaTimer, - SK_WA_INA_TIME, - SKGE_HWAC, - SK_HWEV_WATIM, - Para); } /* Restart needed */ @@ -1713,39 +2000,38 @@ break; } - + /* Start again the check Timer */ - if (pAC->GIni.GP[Port].PHWLinkUp) { + if (pPrt->PHWLinkUp) { Time = SK_WA_ACT_TIME; - } else { + } + else { Time = SK_WA_INA_TIME; } - /* todo: still needed for non-Xmac-PHYs ??? */ - /* Start workaround Errata #2 timer */ - SkTimerStart(pAC, IoC, &pAC->GIni.GP[Port].PWaTimer, Time, - SKGE_HWAC, SK_HWEV_WATIM, Para); - + /* Todo: still needed for non-XMAC PHYs??? */ + /* Start workaround Errata #2 timer. */ + SkTimerStart(pAC, IoC, &pAC->GIni.GP[Port].PWaTimer, + Time, SKGE_HWAC, SK_HWEV_WATIM, Para); break; case SK_HWEV_PORT_START: - if (pAC->GIni.GP[Port].PHWLinkUp) { + if (pPrt->PHWLinkUp) { /* * Signal directly to RLMT to ensure correct * sequence of SWITCH and RESET event. */ - Para.Para32[0] = (SK_U32) Port; SkRlmtEvent(pAC, IoC, SK_RLMT_LINK_DOWN, Para); } - SkHWLinkDown(pAC, IoC, Port) ; + SkHWLinkDown(pAC, IoC, Port); /* Schedule Port RESET */ SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_RESET, Para); /* Start workaround Errata #2 timer */ - SkTimerStart(pAC, IoC, &pAC->GIni.GP[Port].PWaTimer, - SK_WA_INA_TIME,SKGE_HWAC,SK_HWEV_WATIM,Para); + SkTimerStart(pAC, IoC, &pPrt->PWaTimer, SK_WA_INA_TIME, + SKGE_HWAC, SK_HWEV_WATIM, Para); break; case SK_HWEV_PORT_STOP: @@ -1754,13 +2040,13 @@ * Signal directly to RLMT to ensure correct * sequence of SWITCH and RESET event. */ - Para.Para32[0] = (SK_U32) Port; SkRlmtEvent(pAC, IoC, SK_RLMT_LINK_DOWN, Para); } + /* Stop Workaround Timer */ - SkTimerStop(pAC, IoC, &pAC->GIni.GP[Port].PWaTimer) ; + SkTimerStop(pAC, IoC, &pPrt->PWaTimer); - SkHWLinkDown(pAC, IoC, Port) ; + SkHWLinkDown(pAC, IoC, Port); break; case SK_HWEV_UPDATE_STAT: @@ -1769,18 +2055,18 @@ case SK_HWEV_CLEAR_STAT: /* We do NOT need to clear any statistics */ - for (Port = 0; Port < (SK_U32) pAC->GIni.GIMacsFound; Port++) { - pAC->GIni.GP[Port].PPrevRx = 0; - pAC->GIni.GP[Port].PPrevFcs = 0; - pAC->GIni.GP[Port].PPrevShorts = 0; + for (Port = 0; Port < (SK_U32)pAC->GIni.GIMacsFound; Port++) { + pPrt->PPrevRx = 0; + pPrt->PPrevFcs = 0; + pPrt->PPrevShorts = 0; } break; case SK_HWEV_SET_LMODE: - Val8 = (SK_U8) Para.Para32[1]; - if (pAC->GIni.GP[Port].PLinkModeConf != Val8) { + Val8 = (SK_U8)Para.Para32[1]; + if (pPrt->PLinkModeConf != Val8) { /* Set New link mode */ - pAC->GIni.GP[Port].PLinkModeConf = Val8; + pPrt->PLinkModeConf = Val8; /* Restart Port */ SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_STOP, Para); @@ -1789,10 +2075,10 @@ break; case SK_HWEV_SET_FLOWMODE: - Val8 = (SK_U8) Para.Para32[1]; - if (pAC->GIni.GP[Port].PFlowCtrlMode != Val8) { + Val8 = (SK_U8)Para.Para32[1]; + if (pPrt->PFlowCtrlMode != Val8) { /* Set New Flow Control mode */ - pAC->GIni.GP[Port].PFlowCtrlMode = Val8; + pPrt->PFlowCtrlMode = Val8; /* Restart Port */ SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_STOP, Para); @@ -1801,10 +2087,10 @@ break; case SK_HWEV_SET_ROLE: - Val8 = (SK_U8) Para.Para32[1]; - if (pAC->GIni.GP[Port].PMSMode != Val8) { + Val8 = (SK_U8)Para.Para32[1]; + if (pPrt->PMSMode != Val8) { /* Set New link mode */ - pAC->GIni.GP[Port].PMSMode = Val8; + pPrt->PMSMode = Val8; /* Restart Port */ SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_STOP, Para); @@ -1812,14 +2098,31 @@ } break; + case SK_HWEV_HALFDUP_CHK: + /* + * half duplex hangup workaround. See packet arbiter timeout + * interrupt for description + */ + pPrt->HalfDupTimerActive = SK_FALSE; + if (pPrt->PLinkModeStatus == SK_LMODE_STAT_HALF || + pPrt->PLinkModeStatus == SK_LMODE_STAT_AUTOHALF) { + Len = sizeof(SK_U64); + SkPnmiGetVar(pAC, IoC, OID_SKGE_STAT_TX_OCTETS, (char *)&Octets, + &Len, (SK_U32)SK_PNMI_PORT_PHYS2INST(pAC, Port), + pAC->Rlmt.Port[Port].Net->NetNumber); + if (pPrt->LastOctets == Octets) { + /* TX hanging, do a FIFO flush restarts it. */ + SkXmFlushTxFifo(pAC, IoC, Port); + } + } + break; default: - SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_SIRQ_E001, - SKERR_SIRQ_E001MSG); + SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_SIRQ_E001, SKERR_SIRQ_E001MSG); break; } - return(0) ; -} + return (0); +} /* SkGeSirqEvent */ /****************************************************************************** @@ -1831,17 +2134,20 @@ * Returns: N/A */ static void SkPhyIsrBcom( -SK_AC *pAC, /* Adapters context */ +SK_AC *pAC, /* Adapter Context */ SK_IOC IoC, /* Io Context */ -int Port, /* Port Num = PHY Num */ -SK_U16 IStatus) /* Interrupts masked with PHY-Mask */ +int Port, /* Port Num = PHY Num */ +SK_U16 IStatus) /* Interrupt Status */ { + SK_GEPORT *pPrt; /* GIni Port struct pointer */ SK_EVPARA Para; + pPrt = &pAC->GIni.GP[Port]; + if (IStatus & PHY_B_IS_PSE) { - /* incorrectable pair swap error */ + /* Incorrectable pair swap error. */ SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, SKERR_SIRQ_E022, - SKERR_SIRQ_E022MSG) ; + SKERR_SIRQ_E022MSG); } if (IStatus & PHY_B_IS_MDXI_SC) { @@ -1857,19 +2163,19 @@ } if (IStatus & (PHY_B_IS_AN_PR | PHY_B_IS_LST_CHANGE)) { + Para.Para32[0] = (SK_U32)Port; + SkHWLinkDown(pAC, IoC, Port); /* Signal to RLMT */ - Para.Para32[0] = (SK_U32) Port; SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para); /* Start workaround Errata #2 timer */ - SkTimerStart(pAC, IoC, &pAC->GIni.GP[Port].PWaTimer, - SK_WA_INA_TIME,SKGE_HWAC,SK_HWEV_WATIM,Para); + SkTimerStart(pAC, IoC, &pPrt->PWaTimer, + SK_WA_INA_TIME, SKGE_HWAC, SK_HWEV_WATIM, Para); } if (IStatus & PHY_B_IS_NO_HDCL) { - /* not used */ } if (IStatus & PHY_B_IS_NO_HDC) { @@ -1903,8 +2209,7 @@ if (IStatus & PHY_B_IS_CRC_ER) { /* not used */ } - -} +} /* SkPhyIsrBcom */ /****************************************************************************** @@ -1916,10 +2221,10 @@ * Returns: N/A */ static void SkPhyIsrLone( -SK_AC *pAC, /* Adapters context */ -SK_IOC IoC, /* Io Context */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* Io Context */ int Port, /* Port Num = PHY Num */ -SK_U16 IStatus) /* Interrupts masked with PHY-Mask */ +SK_U16 IStatus) /* Interrupt Status */ { SK_EVPARA Para; @@ -1955,19 +2260,17 @@ SkHWLinkDown(pAC, IoC, Port); /* Signal to RLMT */ - Para.Para32[0] = (SK_U32) Port; + Para.Para32[0] = (SK_U32)Port; SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_LINK_DOWN, Para); /* Start workaround Errata #2 timer */ SkTimerStart(pAC, IoC, &pAC->GIni.GP[Port].PWaTimer, - SK_WA_INA_TIME,SKGE_HWAC,SK_HWEV_WATIM,Para); + SK_WA_INA_TIME, SKGE_HWAC, SK_HWEV_WATIM, Para); } if (IStatus & PHY_L_IS_MDINT) { /* not used */ } - -} - +} /* SkPhyIsrLone */ /* End of File */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/ski2c.c linux.20p6/drivers/net/sk98lin/ski2c.c --- linux.vanilla/drivers/net/sk98lin/ski2c.c Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/ski2c.c Tue Jun 19 09:46:04 2001 @@ -2,17 +2,16 @@ * * Name: ski2c.c * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.42 $ - * Date: $Date: 1999/11/22 13:35:12 $ - * Purpose: Funktions to access Voltage and Temperature Sensor - * (taken from Monalisa (taken from Concentrator)) + * Version: $Revision: 1.47 $ + * Date: $Date: 2001/04/05 11:38:09 $ + * Purpose: Functions to access Voltage and Temperature Sensor + * (taken from Monalisa (taken from Concentrator)) * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2001 SysKonnect GmbH. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -28,6 +27,23 @@ * History: * * $Log: ski2c.c,v $ + * Revision 1.47 2001/04/05 11:38:09 rassmann + * Set SenState to idle in SkI2cWaitIrq(). + * Changed error message in SkI2cWaitIrq(). + * + * Revision 1.46 2001/04/02 14:03:35 rassmann + * Changed pAC to IoC in SK_IN32(). + * + * Revision 1.45 2001/03/21 12:12:49 rassmann + * Resetting I2C_READY interrupt in SkI2cInit1(). + * + * Revision 1.44 2000/08/07 15:49:03 gklug + * Fix: SK_INFAST only in NetWare driver. + * + * Revision 1.43 2000/08/03 14:28:17 rassmann + * Added function to wait for I2C being ready before resetting the board. + * Replaced one duplicate "out of range" message with correct one. + * * Revision 1.42 1999/11/22 13:35:12 cgoos * Changed license header to GPL. * @@ -173,10 +189,10 @@ /* - i2C Protocol -*/ + * I2C Protocol + */ static const char SysKonnectFileId[] = - "$Id: ski2c.c,v 1.42 1999/11/22 13:35:12 cgoos Exp $" ; + "$Id: ski2c.c,v 1.47 2001/04/05 11:38:09 rassmann Exp $"; #include "h/skdrv1st.h" /* Driver Specific Definitions */ #include "h/lm80.h" @@ -184,7 +200,7 @@ #ifdef __C2MAN__ /* - I2C protocol implemetation. + I2C protocol implementation. General Description: @@ -194,9 +210,9 @@ This file covers functions that allow to read write and do some bulk requests a specified I2C address. - The Genesis has 2 I2C busses. One for the EEPROM which holds + The Genesis has 2 I2C buses. One for the EEPROM which holds the VPD Data and one for temperature and voltage sensor. - The following picture shows the I2C busses, I2C devices and + The following picture shows the I2C buses, I2C devices and there control registers. Note: The VPD functions are in skvpd.c @@ -293,13 +309,13 @@ * serial data line simultaneously (ASIC: last bit of a byte = '1', I2C client * send an 'ACK'). See also Concentrator Bugreport No. 10192. */ -#define I2C_DATA_HIGH(IoC) SK_I2C_SET_BIT(IoC,I2C_DATA) -#define I2C_DATA_LOW(IoC) SK_I2C_CLR_BIT(IoC,I2C_DATA) -#define I2C_DATA_OUT(IoC) SK_I2C_SET_BIT(IoC,I2C_DATA_DIR) -#define I2C_DATA_IN(IoC) SK_I2C_CLR_BIT(IoC,I2C_DATA_DIR|I2C_DATA) -#define I2C_CLK_HIGH(IoC) SK_I2C_SET_BIT(IoC,I2C_CLK) -#define I2C_CLK_LOW(IoC) SK_I2C_CLR_BIT(IoC,I2C_CLK|I2C_DATA_DIR) -#define I2C_START_COND(IoC) SK_I2C_CLR_BIT(IoC,I2C_CLK) +#define I2C_DATA_HIGH(IoC) SK_I2C_SET_BIT(IoC, I2C_DATA) +#define I2C_DATA_LOW(IoC) SK_I2C_CLR_BIT(IoC, I2C_DATA) +#define I2C_DATA_OUT(IoC) SK_I2C_SET_BIT(IoC, I2C_DATA_DIR) +#define I2C_DATA_IN(IoC) SK_I2C_CLR_BIT(IoC, I2C_DATA_DIR|I2C_DATA) +#define I2C_CLK_HIGH(IoC) SK_I2C_SET_BIT(IoC, I2C_CLK) +#define I2C_CLK_LOW(IoC) SK_I2C_CLR_BIT(IoC, I2C_CLK|I2C_DATA_DIR) +#define I2C_START_COND(IoC) SK_I2C_CLR_BIT(IoC, I2C_CLK) #define NS2CLKT(x) ((x*125L)/10000) @@ -309,25 +325,24 @@ * sending one bit */ void SkI2cSndBit( -SK_IOC IoC, /* IoContext */ +SK_IOC IoC, /* I/O Context */ SK_U8 Bit) /* Bit to send */ { - I2C_DATA_OUT(IoC) ; + I2C_DATA_OUT(IoC); if (Bit) { I2C_DATA_HIGH(IoC); } else { I2C_DATA_LOW(IoC); } - SkDgWaitTime(IoC,NS2BCLK(T_DATA_IN_SETUP)); + SkDgWaitTime(IoC, NS2BCLK(T_DATA_IN_SETUP)); I2C_CLK_HIGH(IoC); - SkDgWaitTime(IoC,NS2BCLK(T_CLK_HIGH)); + SkDgWaitTime(IoC, NS2BCLK(T_CLK_HIGH)); I2C_CLK_LOW(IoC); -} - +} /* SkI2cSndBit*/ /* - * Signal a start to the i2C Bus. + * Signal a start to the I2C Bus. * * A start is signaled when data goes to low in a high clock cycle. * @@ -335,66 +350,70 @@ * * Status: not tested */ -void SkI2cStart(SK_IOC IoC) /* I/O Context */ +void SkI2cStart( +SK_IOC IoC) /* I/O Context */ { /* Init data and Clock to output lines */ /* Set Data high */ - I2C_DATA_OUT(IoC) ; - I2C_DATA_HIGH(IoC) ; + I2C_DATA_OUT(IoC); + I2C_DATA_HIGH(IoC); /* Set Clock high */ - I2C_CLK_HIGH(IoC) ; + I2C_CLK_HIGH(IoC); - SkDgWaitTime(IoC,NS2BCLK(T_START_SETUP)) ; + SkDgWaitTime(IoC, NS2BCLK(T_START_SETUP)); /* Set Data Low */ - I2C_DATA_LOW(IoC) ; + I2C_DATA_LOW(IoC); - SkDgWaitTime(IoC,NS2BCLK(T_START_HOLD)) ; + SkDgWaitTime(IoC, NS2BCLK(T_START_HOLD)); /* Clock low without Data to Input */ - I2C_START_COND(IoC) ; + I2C_START_COND(IoC); - SkDgWaitTime(IoC,NS2BCLK(T_CLK_LOW)) ; -} + SkDgWaitTime(IoC, NS2BCLK(T_CLK_LOW)); +} /* SkI2cStart */ -void SkI2cStop(SK_IOC IoC) /* I/O Context */ +void SkI2cStop( +SK_IOC IoC) /* I/O Context */ { /* Init data and Clock to output lines */ /* Set Data low */ - I2C_DATA_OUT(IoC) ; - I2C_DATA_LOW(IoC) ; + I2C_DATA_OUT(IoC); + I2C_DATA_LOW(IoC); - SkDgWaitTime(IoC,NS2BCLK(T_CLK_2_DATA_OUT)) ; + SkDgWaitTime(IoC, NS2BCLK(T_CLK_2_DATA_OUT)); /* Set Clock high */ - I2C_CLK_HIGH(IoC) ; + I2C_CLK_HIGH(IoC); - SkDgWaitTime(IoC,NS2BCLK(T_STOP_SETUP)) ; + SkDgWaitTime(IoC, NS2BCLK(T_STOP_SETUP)); /* * Set Data High: Do it by setting the Data Line to Input. * Because of a pull up resistor the Data Line * floods to high. */ - I2C_DATA_IN(IoC) ; + I2C_DATA_IN(IoC); /* * When I2C activity is stopped * o DATA should be set to input and * o CLOCK should be set to high! */ - SkDgWaitTime(IoC,NS2BCLK(T_BUS_IDLE)) ; -} + SkDgWaitTime(IoC, NS2BCLK(T_BUS_IDLE)); +} /* SkI2cStop */ + /* - * Receive just one bit via the i2C bus. + * Receive just one bit via the I2C bus. * * Note: Clock must be set to LOW before calling this function. * * Returns The received bit. */ -int SkI2cRcvBit(SK_IOC IoC) /* I/O Context */ +int SkI2cRcvBit( +SK_IOC IoC) /* I/O Context */ { int Bit; SK_U8 I2cSwCtrl; @@ -402,13 +421,13 @@ /* Init data as input line */ I2C_DATA_IN(IoC); - SkDgWaitTime(IoC,NS2BCLK(T_CLK_2_DATA_OUT)) ; + SkDgWaitTime(IoC, NS2BCLK(T_CLK_2_DATA_OUT)); I2C_CLK_HIGH(IoC); - SkDgWaitTime(IoC,NS2BCLK(T_CLK_HIGH)) ; + SkDgWaitTime(IoC, NS2BCLK(T_CLK_HIGH)); - SK_I2C_GET_SW(IoC,&I2cSwCtrl) ; + SK_I2C_GET_SW(IoC, &I2cSwCtrl); if (I2cSwCtrl & I2C_DATA) { Bit = 1; } else { @@ -416,10 +435,11 @@ } I2C_CLK_LOW(IoC); - SkDgWaitTime(IoC,NS2BCLK(T_CLK_LOW-T_CLK_2_DATA_OUT)) ; + SkDgWaitTime(IoC, NS2BCLK(T_CLK_LOW-T_CLK_2_DATA_OUT)); return(Bit); -} +} /* SkI2cRcvBit */ + /* * Receive an ACK. @@ -427,58 +447,64 @@ * returns 0 If acknoledged * 1 in case of an error */ -int SkI2cRcvAck(SK_IOC IoC) /* I/O Context */ +int SkI2cRcvAck( +SK_IOC IoC) /* I/O Context */ { /* * Received bit must be zero. */ - return (SkI2cRcvBit(IoC) != 0) ; -} + return (SkI2cRcvBit(IoC) != 0); +} /* SkI2cRcvAck */ + /* * Send an NACK. */ -void SkI2cSndNAck(SK_IOC IoC) /* I/O Context */ +void SkI2cSndNAck( +SK_IOC IoC) /* I/O Context */ { /* * Received bit must be zero. */ - SkI2cSndBit(IoC,1) ; -} + SkI2cSndBit(IoC, 1); +} /* SkI2cSndNAck */ + /* * Send an ACK. */ -void SkI2cSndAck(SK_IOC IoC) /* I/O Context */ +void SkI2cSndAck( +SK_IOC IoC) /* I/O Context */ { /* * Received bit must be zero. * */ - SkI2cSndBit(IoC,0) ; -} + SkI2cSndBit(IoC, 0); +} /* SkI2cSndAck */ + /* - * Send one byte to the i2C device and wait for ACK. + * Send one byte to the I2C device and wait for ACK. * * Return acknoleged status. */ int SkI2cSndByte( SK_IOC IoC, /* I/O Context */ -int Byte) /* byte to send */ +int Byte) /* byte to send */ { int i; - for (i=0; i<8; i++) { + for (i = 0; i < 8; i++) { if (Byte & (1<<(7-i))) { - SkI2cSndBit(IoC,1) ; + SkI2cSndBit(IoC, 1); } else { - SkI2cSndBit(IoC,0) ; + SkI2cSndBit(IoC, 0); } } - return(SkI2cRcvAck(IoC)) ; -} + return(SkI2cRcvAck(IoC)); +} /* SkI2cSndByte */ /* @@ -488,24 +514,24 @@ */ int SkI2cRcvByte( SK_IOC IoC, /* I/O Context */ -int Last) /* Last Byte Flag */ +int Last) /* Last Byte Flag */ { int i; int Byte = 0; - for (i=0; i<8; i++) { - Byte <<= 1 ; - Byte |= SkI2cRcvBit(IoC) ; + for (i = 0; i < 8; i++) { + Byte <<= 1; + Byte |= SkI2cRcvBit(IoC); } if (Last) { - SkI2cSndNAck(IoC) ; + SkI2cSndNAck(IoC); } else { - SkI2cSndAck(IoC) ; + SkI2cSndAck(IoC); } - return(Byte) ; -} + return(Byte); +} /* SkI2cRcvByte */ /* @@ -515,68 +541,107 @@ */ int SkI2cSndDev( SK_IOC IoC, /* I/O Context */ -int Addr, /* Device Address */ -int Rw) /* Read / Write Flag */ +int Addr, /* Device Address */ +int Rw) /* Read / Write Flag */ { - SkI2cStart(IoC) ; - Rw = ~Rw ; - Rw &= I2C_WRITE ; - return(SkI2cSndByte(IoC, (Addr<<1) | Rw)) ; -} + SkI2cStart(IoC); + Rw = ~Rw; + Rw &= I2C_WRITE; + return(SkI2cSndByte(IoC, (Addr<<1) | Rw)); +} /* SkI2cSndDev */ #endif /* SK_DIAG */ /*----------------- I2C CTRL Register Functions ----------*/ /* - * waits for a completetion of a I2C transfer + * waits for a completion of an I2C transfer * * returns 0: success, transfer completes - * 1: error, transfer does not complete, I2C transfer - * killed, wait loop terminated. + * 1: error, transfer does not complete, I2C transfer + * killed, wait loop terminated. */ int SkI2cWait( SK_AC *pAC, /* Adapter Context */ -SK_IOC IoC, /* IoContext */ -int Event) /* complete event to wait for (I2C_READ or I2C_WRITE) */ +SK_IOC IoC, /* I/O Context */ +int Event) /* complete event to wait for (I2C_READ or I2C_WRITE) */ { - SK_U64 StartTime ; - SK_U32 I2cCtrl ; + SK_U64 StartTime; + SK_U32 I2cCtrl; - StartTime = SkOsGetTime(pAC) ; + StartTime = SkOsGetTime(pAC); do { - if (SkOsGetTime(pAC) - StartTime > SK_TICKS_PER_SEC/16) { - SK_I2C_STOP(IoC) ; + if (SkOsGetTime(pAC) - StartTime > SK_TICKS_PER_SEC / 8) { + SK_I2C_STOP(IoC); #ifndef SK_DIAG - SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_I2C_E002, - SKERR_I2C_E002MSG) ; + SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_I2C_E002, SKERR_I2C_E002MSG); #endif /* !SK_DIAG */ - return(1) ; + return(1); } - SK_I2C_GET_CTL(IoC,&I2cCtrl) ; - } while((I2cCtrl & I2C_FLAG) == (SK_U32)Event << 31) ; + SK_I2C_GET_CTL(IoC, &I2cCtrl); + } while ((I2cCtrl & I2C_FLAG) == (SK_U32)Event << 31); + + return(0); +} /* SkI2cWait */ + - return(0) ; -} +/* + * waits for a completion of an I2C transfer + * + * Returns + * Nothing + */ +void SkI2cWaitIrq( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC) /* I/O Context */ +{ + SK_SENSOR *pSen; + SK_U64 StartTime; + SK_U32 IrqSrc; + + pSen = &pAC->I2c.SenTable[pAC->I2c.CurrSens]; + + if (pSen->SenState == SK_SEN_IDLE) { + return; + } + + StartTime = SkOsGetTime(pAC); + do { + if (SkOsGetTime(pAC) - StartTime > SK_TICKS_PER_SEC / 8) { + SK_I2C_STOP(IoC); +#ifndef SK_DIAG + SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_I2C_E016, SKERR_I2C_E016MSG); +#endif /* !SK_DIAG */ + return; + } + SK_IN32(IoC, B0_ISRC, &IrqSrc); + } while ((IrqSrc & IS_I2C_READY) == 0); + + pSen->SenState = SK_SEN_IDLE; + return; +} /* SkI2cWaitIrq */ #ifdef SK_DIAG + /* * writes a single byte or 4 bytes into the I2C device * * returns 0: success - * 1: error + * 1: error */ int SkI2cWrite( -SK_AC *pAC, /* Adapter Context */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ SK_U32 I2cData, /* I2C Data to write */ -int I2cDev, /* I2C Device Address */ -int I2cReg, /* I2C Device Register Address */ -int I2cBurst) /* I2C Burst Flag ( 0 || I2C_BURST ) */ -{ - SK_OUT32(pAC,B2_I2C_DATA,I2cData) ; - SK_I2C_CTL(pAC,I2C_WRITE,I2cDev,I2cReg,I2cBurst); - return(SkI2cWait(pAC,pAC,I2C_WRITE)) ; -} +int I2cDev, /* I2C Device Address */ +int I2cReg, /* I2C Device Register Address */ +int I2cBurst) /* I2C Burst Flag ( 0 || I2C_BURST ) */ +{ + SK_OUT32(IoC, B2_I2C_DATA, I2cData); + SK_I2C_CTL(IoC, I2C_WRITE, I2cDev, I2cReg, I2cBurst); + return(SkI2cWait(pAC, IoC, I2C_WRITE)); +} /* SkI2cWrite*/ + /* * reads a single byte or 4 bytes from the I2C device @@ -584,39 +649,43 @@ * returns the word read */ SK_U32 SkI2cRead( -SK_AC *pAC, /* Adapter Context */ -int I2cDev, /* I2C Device Address */ -int I2cReg, /* I2C Device Register Address */ -int I2cBurst) /* I2C Burst Flag ( 0 || I2C_BURST ) */ -{ - SK_U32 Data ; - - SK_OUT32(pAC,B2_I2C_DATA,0) ; - SK_I2C_CTL(pAC,I2C_READ,I2cDev,I2cReg,I2cBurst); - if (SkI2cWait(pAC,pAC,I2C_READ)) { - w_print("I2c Transfer Timeout!\n"); - } - SK_IN32(pAC,B2_I2C_DATA,&Data) ; - return(Data) ; -} +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +int I2cDev, /* I2C Device Address */ +int I2cReg, /* I2C Device Register Address */ +int I2cBurst) /* I2C Burst Flag ( 0 || I2C_BURST ) */ +{ + SK_U32 Data; + + SK_OUT32(IoC, B2_I2C_DATA, 0); + SK_I2C_CTL(IoC, I2C_READ, I2cDev, I2cReg, I2cBurst); + if (SkI2cWait(pAC, IoC, I2C_READ)) { + w_print("I2C Transfer Timeout!\n"); + } + SK_IN32(IoC, B2_I2C_DATA, &Data); + return(Data); +} /* SkI2cRead */ + #endif /* SK_DIAG */ + /* - * read a sensors value + * read a sensor's value * - * This function read a sensors value from the I2c sensor chip. The sensor + * This function reads a sensor's value from the I2C sensor chip. The sensor * is defined by its index into the sensors database in the struct pAC points * to. - * Returns 1 if the read is completed - * 0 if the read must be continued (I2c Bus still allocated) + * Returns + * 1 if the read is completed + * 0 if the read must be continued (I2C Bus still allocated) */ int SkI2cReadSensor( SK_AC *pAC, /* Adapter Context */ -SK_IOC IoC, /* IoContext */ +SK_IOC IoC, /* I/O Context */ SK_SENSOR *pSen) /* Sensor to be read */ { - return((*pSen->SenRead)(pAC,IoC,pSen)) ; -} + return((*pSen->SenRead)(pAC, IoC, pSen)); +} /* SkI2cReadSensor*/ /* * Do the Init state 0 initialization @@ -637,10 +706,10 @@ pAC->I2c.DummyReads = SK_MAX_SENSORS; #endif - for (i=0; i < SK_MAX_SENSORS; i ++) { + for (i = 0; i < SK_MAX_SENSORS; i ++) { switch (i) { case 0: - pAC->I2c.SenTable[i].SenDesc = "Temperature" ; + pAC->I2c.SenTable[i].SenDesc = "Temperature"; pAC->I2c.SenTable[i].SenType = SK_SEN_TEMP; pAC->I2c.SenTable[i].SenThreErrHigh = SK_SEN_ERRHIGH0; pAC->I2c.SenTable[i].SenThreErrLow = SK_SEN_ERRLOW0; @@ -734,10 +803,11 @@ pAC->I2c.SenTable[i].SenDev = LM80_ADDR; } - /* Now we are INIT dataed */ + /* Now we are "INIT data"ed */ pAC->I2c.InitLevel = SK_INIT_DATA; return(0); -} +} /* SkI2cInit0*/ + /* * Do the init state 1 initialization @@ -761,7 +831,7 @@ */ static int SkI2cInit1( SK_AC *pAC, /* Adapter Context */ -SK_IOC IoC) /* IoContext needed in level 1 */ +SK_IOC IoC) /* I/O Context */ { if (pAC->I2c.InitLevel != SK_INIT_DATA) { /* ReInit not needed in I2C module */ @@ -770,27 +840,27 @@ SK_OUT32(IoC, B2_I2C_DATA, 0); SK_I2C_CTL(IoC, I2C_WRITE, LM80_ADDR, LM80_CFG, 0); - (void)SkI2cWait(pAC, IoC, I2C_WRITE) ; + (void)SkI2cWait(pAC, IoC, I2C_WRITE); SK_OUT32(IoC, B2_I2C_DATA, 0xff); SK_I2C_CTL(IoC, I2C_WRITE, LM80_ADDR, LM80_IMSK_1, 0); - (void)SkI2cWait(pAC, IoC, I2C_WRITE) ; + (void)SkI2cWait(pAC, IoC, I2C_WRITE); SK_OUT32(IoC, B2_I2C_DATA, 0xff); SK_I2C_CTL(IoC, I2C_WRITE, LM80_ADDR, LM80_IMSK_2, 0); - (void)SkI2cWait(pAC, IoC, I2C_WRITE) ; + (void)SkI2cWait(pAC, IoC, I2C_WRITE); SK_OUT32(IoC, B2_I2C_DATA, 0x0); SK_I2C_CTL(IoC, I2C_WRITE, LM80_ADDR, LM80_FAN_CTRL, 0); - (void)SkI2cWait(pAC, IoC, I2C_WRITE) ; + (void)SkI2cWait(pAC, IoC, I2C_WRITE); SK_OUT32(IoC, B2_I2C_DATA, 0); SK_I2C_CTL(IoC, I2C_WRITE, LM80_ADDR, LM80_TEMP_CTRL, 0); - (void)SkI2cWait(pAC, IoC, I2C_WRITE) ; + (void)SkI2cWait(pAC, IoC, I2C_WRITE); SK_OUT32(IoC, B2_I2C_DATA, LM80_CFG_START); SK_I2C_CTL(IoC, I2C_WRITE, LM80_ADDR, LM80_CFG, 0); - (void)SkI2cWait(pAC, IoC, I2C_WRITE) ; + (void)SkI2cWait(pAC, IoC, I2C_WRITE); /* * MaxSens has to be initialized here, because PhyType is not @@ -816,19 +886,23 @@ #ifndef SK_DIAG pAC->I2c.DummyReads = pAC->I2c.MaxSens; + + /* Clear the interrupt source */ + SK_OUT32(IoC, B2_I2C_IRQ, I2C_CLR_IRQ); #endif /* !SK_DIAG */ - /* Now we are IO initialized */ + /* Now we are I/O initialized */ pAC->I2c.InitLevel = SK_INIT_IO; return(0); -} +} /* SkI2cInit1 */ + /* - * Init level 2: Start first sensors read + * Init level 2: Start first sensor read. */ static int SkI2cInit2( SK_AC *pAC, /* Adapter Context */ -SK_IOC IoC) /* IoContext needed in level 1 */ +SK_IOC IoC) /* I/O Context */ { int ReadComplete; SK_SENSOR *pSen; @@ -840,18 +914,18 @@ } pSen = &pAC->I2c.SenTable[pAC->I2c.CurrSens]; - ReadComplete = SkI2cReadSensor(pAC,IoC,pSen); + ReadComplete = SkI2cReadSensor(pAC, IoC, pSen); if (ReadComplete) { - SK_ERR_LOG(pAC, SK_ERRCL_INIT, SKERR_I2C_E008, - SKERR_I2C_E008MSG); + SK_ERR_LOG(pAC, SK_ERRCL_INIT, SKERR_I2C_E008, SKERR_I2C_E008MSG); } /* Now we are correctly initialized */ pAC->I2c.InitLevel = SK_INIT_RUN; return(0); -} +} /* SkI2cInit2*/ + /* * Initialize I2C devices @@ -863,36 +937,39 @@ * Level 0: * Initialize only the data structures. Do NOT access hardware. * Level 1: - * Initialize hardware through SK_IN?OUT commands. Do NOT use interrupts. + * Initialize hardware through SK_IN / SK_OUT commands. Do NOT use interrupts. * Level 2: * Everything is possible. Interrupts may be used from now on. * - * return: 0 = success - * other = error. + * return: + * 0 = success + * other = error. */ int SkI2cInit( SK_AC *pAC, /* Adapter Context */ -SK_IOC IoC, /* IoContext needed in level 1 */ -int Level) /* Init Level */ +SK_IOC IoC, /* I/O Context needed in levels 1 and 2 */ +int Level) /* Init Level */ { switch (Level) { case SK_INIT_DATA: - return(SkI2cInit0(pAC)) ; + return(SkI2cInit0(pAC)); case SK_INIT_IO: - return(SkI2cInit1(pAC, IoC)) ; + return(SkI2cInit1(pAC, IoC)); case SK_INIT_RUN: - return(SkI2cInit2(pAC, IoC)) ; + return(SkI2cInit2(pAC, IoC)); default: break; } - return(0) ; -} + return(0); +} /* SkI2cInit */ + #ifndef SK_DIAG + /* - * Interrupt service function for the I2c Interface + * Interrupt service function for the I2C Interface * * Clears the Interrupt source * @@ -901,60 +978,58 @@ * Starts the timer if necessary. */ void SkI2cIsr( -SK_AC *pAC, /* Adapters context */ -SK_IOC IoC) /* Io Context */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC) /* I/O Context */ { SK_EVPARA Para; /* Clear the interrupt source */ - SK_OUT32(IoC, B2_I2C_IRQ, I2C_CLR_IRQ) ; + SK_OUT32(IoC, B2_I2C_IRQ, I2C_CLR_IRQ); Para.Para64 = 0; SkEventQueue(pAC, SKGE_I2C, SK_I2CEV_IRQ, Para); -} +} /* SkI2cIsr */ + /* * Check this sensors Value against the threshold and send events. */ static void SkI2cCheckSensor( -SK_AC *pAC, /* Adapters context */ +SK_AC *pAC, /* Adapter Context */ SK_SENSOR *pSen) { SK_EVPARA ParaLocal; SK_BOOL TooHigh; /* Is sensor too high? */ SK_BOOL TooLow; /* Is sensor too low? */ - SK_U64 CurrTime; /* current Time */ + SK_U64 CurrTime; /* Current Time */ SK_BOOL DoTrapSend; /* We need to send a trap */ SK_BOOL DoErrLog; /* We need to log the error */ SK_BOOL IsError; /* We need to log the error */ /* Check Dummy Reads first */ if (pAC->I2c.DummyReads > 0) { - pAC->I2c.DummyReads -- ; + pAC->I2c.DummyReads --; return; } /* Get the current time */ - CurrTime = SkOsGetTime(pAC) ; + CurrTime = SkOsGetTime(pAC); - /* Set para to the most usefull setting: - * The current sensor. - */ + /* Set para to the most useful setting: The current sensor. */ ParaLocal.Para64 = (SK_U64) pAC->I2c.CurrSens; - /* Check the Value against the thresholds */ - /* First: Error Thresholds */ - TooHigh = (pSen->SenValue > pSen->SenThreErrHigh) ; - TooLow = (pSen->SenValue < pSen->SenThreErrLow) ; + /* Check the Value against the thresholds. First: Error Thresholds */ + TooHigh = (pSen->SenValue > pSen->SenThreErrHigh); + TooLow = (pSen->SenValue < pSen->SenThreErrLow); - IsError = SK_FALSE ; + IsError = SK_FALSE; if (TooHigh || TooLow) { - /* Error condition is satiesfied */ + /* Error condition is satisfied */ DoTrapSend = SK_TRUE; DoErrLog = SK_TRUE; /* Now error condition is satisfied */ - IsError = SK_TRUE ; + IsError = SK_TRUE; if (pSen->SenErrFlag == SK_SEN_ERR_ERR) { /* This state is the former one */ @@ -982,7 +1057,7 @@ /* We came from a different state */ /* -> Set Begin Time Stamp */ pSen->SenBegErrTS = CurrTime; - pSen->SenErrFlag = SK_SEN_ERR_ERR ; + pSen->SenErrFlag = SK_SEN_ERR_ERR; } if (DoTrapSend) { @@ -994,7 +1069,7 @@ SkEventQueue(pAC, SKGE_PNMI, (TooHigh ? SK_PNMI_EVT_SEN_ERR_UPP : SK_PNMI_EVT_SEN_ERR_LOW), - ParaLocal) ; + ParaLocal); } if (DoErrLog) { @@ -1017,12 +1092,12 @@ /* Check the Value against the thresholds */ /* 2nd: Warning thresholds */ - TooHigh = (pSen->SenValue > pSen->SenThreWarnHigh) ; - TooLow = (pSen->SenValue < pSen->SenThreWarnLow) ; + TooHigh = (pSen->SenValue > pSen->SenThreWarnHigh); + TooLow = (pSen->SenValue < pSen->SenThreWarnLow); if (!IsError && (TooHigh || TooLow)) { - /* Error condition is satiesfied */ + /* Error condition is satisfied */ DoTrapSend = SK_TRUE; DoErrLog = SK_TRUE; @@ -1052,7 +1127,7 @@ /* We came from a different state */ /* -> Set Begin Time Stamp */ pSen->SenBegWarnTS = CurrTime; - pSen->SenErrFlag = SK_SEN_ERR_WARN ; + pSen->SenErrFlag = SK_SEN_ERR_WARN; } if (DoTrapSend) { @@ -1064,7 +1139,7 @@ SkEventQueue(pAC, SKGE_PNMI, (TooHigh ? SK_PNMI_EVT_SEN_WAR_UPP : SK_PNMI_EVT_SEN_WAR_LOW), - ParaLocal) ; + ParaLocal); } if (DoErrLog) { @@ -1075,8 +1150,8 @@ SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_I2C_E009, SKERR_I2C_E009MSG); } else if (pSen->SenType == SK_SEN_VOLT) { - SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_I2C_E009, - SKERR_I2C_E009MSG); + SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_I2C_E010, + SKERR_I2C_E010MSG); } else { SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_I2C_E014, @@ -1088,7 +1163,7 @@ /* Check for NO error at all */ if (!IsError && !TooHigh && !TooLow) { /* Set o.k. Status if no error and no warning condition */ - pSen->SenErrFlag = SK_SEN_ERR_OK ; + pSen->SenErrFlag = SK_SEN_ERR_OK; } /* End of check against the thresholds */ @@ -1116,23 +1191,24 @@ if (!pSen->SenInit) { SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_I2C_E013, SKERR_I2C_E013MSG); } -} +} /* SkI2cCheckSensor*/ + /* * The only Event to be served is the timeout event * */ int SkI2cEvent( -SK_AC *pAC, /* Adapters context */ -SK_IOC IoC, /* Io Context */ -SK_U32 Event, /* Module specific Event */ -SK_EVPARA Para) /* Event specific Parameter */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_U32 Event, /* Module specific Event */ +SK_EVPARA Para) /* Event specific Parameter */ { - int ReadComplete; + int ReadComplete; SK_SENSOR *pSen; SK_U32 Time; SK_EVPARA ParaLocal; - int i; + int i; switch (Event) { case SK_I2CEV_IRQ: @@ -1142,7 +1218,7 @@ if (ReadComplete) { /* Check sensor against defined thresholds */ - SkI2cCheckSensor (pAC, pSen) ; + SkI2cCheckSensor (pAC, pSen); /* Increment Current and set appropriate Timeout */ Time = SK_I2C_TIM_SHORT; @@ -1156,20 +1232,20 @@ /* Start Timer */ ParaLocal.Para64 = (SK_U64) 0; SkTimerStart(pAC, IoC, &pAC->I2c.SenTimer, Time, - SKGE_I2C, SK_I2CEV_TIM, ParaLocal) ; + SKGE_I2C, SK_I2CEV_TIM, ParaLocal); } break; case SK_I2CEV_CLEAR: - for (i=0; i < SK_MAX_SENSORS; i ++) { + for (i = 0; i < SK_MAX_SENSORS; i ++) { pAC->I2c.SenTable[i].SenErrFlag = SK_SEN_ERR_OK; pAC->I2c.SenTable[i].SenErrCts = 0; pAC->I2c.SenTable[i].SenWarnCts = 0; pAC->I2c.SenTable[i].SenBegErrTS = 0; pAC->I2c.SenTable[i].SenBegWarnTS = 0; - pAC->I2c.SenTable[i].SenLastErrTrapTS = (SK_U64) 0; - pAC->I2c.SenTable[i].SenLastErrLogTS = (SK_U64) 0; - pAC->I2c.SenTable[i].SenLastWarnTrapTS = (SK_U64) 0; - pAC->I2c.SenTable[i].SenLastWarnLogTS = (SK_U64) 0; + pAC->I2c.SenTable[i].SenLastErrTrapTS = (SK_U64)0; + pAC->I2c.SenTable[i].SenLastErrLogTS = (SK_U64)0; + pAC->I2c.SenTable[i].SenLastWarnTrapTS = (SK_U64)0; + pAC->I2c.SenTable[i].SenLastWarnLogTS = (SK_U64)0; } break; default: @@ -1177,6 +1253,6 @@ } return(0); -} -#endif /* !SK_DIAG */ -/* End of File */ +} /* SkI2cEvent*/ + +#endif /* !SK_DIAG */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/skproc.c linux.20p6/drivers/net/sk98lin/skproc.c --- linux.vanilla/drivers/net/sk98lin/skproc.c Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/net/sk98lin/skproc.c Tue Jun 19 09:46:01 2001 @@ -0,0 +1,441 @@ +/****************************************************************************** + * + * Name: skproc.c + * Project: GEnesis, PCI Gigabit Ethernet Adapter + * Version: $Revision: 1.2 $ + * Date: $Date: 2001/02/19 13:14:16 $ + * Purpose: Funktions to display statictic data + * + ******************************************************************************/ + +/****************************************************************************** + * + * (C)Copyright 1998-2001 SysKonnect GmbH. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Created 22-Nov-2000 + * Author: Mirko Lindner (mlindner@syskonnect.de) + * + * The information in this file is provided "AS IS" without warranty. + * + ******************************************************************************/ +/****************************************************************************** + * + * History: + * + * $Log: skproc.c,v $ + * Revision 1.2 2001/02/19 13:14:16 mlindner + * Changed PNMI parameter values + * Corrected ProcFs functionality + * + * Revision 1.1 2001/01/22 14:15:31 mlindner + * added ProcFs functionality + * Dual Net functionality integrated + * Rlmt networks added + * + * + ******************************************************************************/ + +#include + +#include "h/skdrv1st.h" +#include "h/skdrv2nd.h" +#define ZEROPAD 1 /* pad with zero */ +#define SIGN 2 /* unsigned/signed long */ +#define PLUS 4 /* show plus */ +#define SPACE 8 /* space if plus */ +#define LEFT 16 /* left justified */ +#define SPECIAL 32 /* 0x */ +#define LARGE 64 + +extern void proc_fill_inode(struct inode *inode, int fill); +extern char * SkNumber(char * str, long long num, int base, int size, + int precision ,int type); +int proc_read(char *buffer, + char **buffer_location, + off_t offset, + int buffer_length, + int *eof, + void *data); + +static const char SK_Root_Dir_entry[] = "sk98lin"; +extern struct device *root_dev; + + +struct proc_dir_entry Our_Proc_Dir = { + 0, + sizeof(SK_Root_Dir_entry)-1, + SK_Root_Dir_entry, + S_IFDIR | S_IRUGO, + 2, 0, 0, 0, NULL, + NULL, proc_fill_inode +}; + + +/***************************************************************************** + * + * proc_read - print "summaries" entry + * + * Description: + * This function fills the proc entry with statistic data about + * the ethernet device. + * + * + * Returns: buffer with statistic data + * + */ +int proc_read(char *buffer, +char **buffer_location, +off_t offset, +int buffer_length, +int *eof, +void *data) +{ + int len = 0; + int t; + int i; + DEV_NET *pNet; + SK_AC *pAC; + char test_buf[100]; + unsigned int Flags; + unsigned int Size; + struct device *next; + struct device *SkgeProcDev = root_dev; + + SK_PNMI_STRUCT_DATA *pPnmiStruct; + SK_PNMI_STAT *pPnmiStat; + struct proc_dir_entry *file = (struct proc_dir_entry*) data; + + while (SkgeProcDev) { + pNet = (DEV_NET*) SkgeProcDev->priv; + pAC = pNet->pAC; + next = pAC->Next; + + pPnmiStruct = &pAC->PnmiStruct; + + for (t=pAC->GIni.GIMacsFound; t > 0; t--) { + if ((pAC->GIni.GIMacsFound == 2) && pAC->RlmtNets == 1) + t--; + + spin_lock_irqsave(&pAC->SlowPathLock, Flags); + Size = SK_PNMI_STRUCT_SIZE; + SkPnmiGetStruct(pAC, pAC->IoBase, pPnmiStruct, &Size, t-1); + spin_unlock_irqrestore(&pAC->SlowPathLock, Flags); + + + + + if (strcmp(pAC->dev[t-1]->name, file->name) == 0) { + pPnmiStat = &pPnmiStruct->Stat[t-1]; + len = sprintf(buffer, + "\nDetailed statistic for device %s\n", + pAC->dev[t-1]->name); + len += sprintf(buffer + len, + "==================================\n"); + + /* Board statistics */ + + len += sprintf(buffer + len, + "\nBoard statistics\n\n"); + len += sprintf(buffer + len, + "Active Port %c\n", + 'A' + pAC->Rlmt.Net[t-1].Port[pAC->Rlmt. + Net[t-1].PrefPort]->PortNumber); + len += sprintf(buffer + len, + "Preferred Port %c\n", + 'A' + pAC->Rlmt.Net[t-1].Port[pAC->Rlmt. + Net[t-1].PrefPort]->PortNumber); + + len += sprintf(buffer + len, + "Bus speed (MHz) %d\n", + pPnmiStruct->BusSpeed); + + len += sprintf(buffer + len, + "Bus width (Bit) %d\n", + pPnmiStruct->BusWidth); + + + for (i=0; i < SK_MAX_SENSORS; i ++) { + if (strcmp(pAC->I2c.SenTable[i].SenDesc, + "Temperature") == 0 ) { + len += sprintf(buffer + len, + "Temperature (C) %d.%d\n", + pAC->I2c.SenTable[i].SenValue / 10, + pAC->I2c.SenTable[i].SenValue % 10); + len += sprintf(buffer + len, + "Temperature (F) %d.%d\n", + ((((pAC->I2c.SenTable[i].SenValue) + *10)*9)/5 + 3200)/100, + ((((pAC->I2c.SenTable[i].SenValue) + *10)*9)/5 + 3200) % 10); + } else if (strcmp(pAC->I2c.SenTable[i].SenDesc, + "Speed Fan") == 0 ) { + len += sprintf(buffer + len, + "Speed Fan %d\n", + pAC->I2c.SenTable[i].SenValue); + } else { + len += sprintf(buffer + len, + "%-20s %d.%d\n", + pAC->I2c.SenTable[i].SenDesc, + pAC->I2c.SenTable[i].SenValue / 1000, + pAC->I2c.SenTable[i].SenValue % 1000); + } + } + + /*Receive statistics */ + + len += sprintf(buffer + len, + "\nReceive statistics\n\n"); + + len += sprintf(buffer + len, + "Received bytes %s\n", + SkNumber(test_buf, pPnmiStat->StatRxOctetsOkCts, + 10,0,-1,0)); + len += sprintf(buffer + len, + "Received packets %s\n", + SkNumber(test_buf, pPnmiStat->StatRxOkCts, + 10,0,-1,0)); + len += sprintf(buffer + len, + "Received errors %s\n", + SkNumber(test_buf, pPnmiStat->StatRxFcsCts, + 10,0,-1,0)); + len += sprintf(buffer + len, + "Received dropped %s\n", + SkNumber(test_buf, pPnmiStruct->RxNoBufCts, + 10,0,-1,0)); + len += sprintf(buffer + len, + "Received multicast %s\n", + SkNumber(test_buf, pPnmiStat->StatRxMulticastOkCts, + 10,0,-1,0)); + len += sprintf(buffer + len, + "Received errors types\n"); + len += sprintf(buffer + len, + " length errors %s\n", + SkNumber(test_buf, pPnmiStat->StatRxRuntCts, + 10, 0, -1, 0)); + len += sprintf(buffer + len, + " over errors %s\n", + SkNumber(test_buf, pPnmiStat->StatRxFifoOverflowCts, + 10, 0, -1, 0)); + len += sprintf(buffer + len, + " crc errors %s\n", + SkNumber(test_buf, pPnmiStat->StatRxFcsCts, + 10, 0, -1, 0)); + len += sprintf(buffer + len, + " frame errors %s\n", + SkNumber(test_buf, pPnmiStat->StatRxFramingCts, + 10, 0, -1, 0)); + len += sprintf(buffer + len, + " fifo errors %s\n", + SkNumber(test_buf, pPnmiStat->StatRxFifoOverflowCts, + 10, 0, -1, 0)); + len += sprintf(buffer + len, + " missed errors %s\n", + SkNumber(test_buf, pPnmiStat->StatRxMissedCts, + 10, 0, -1, 0)); + + + /*Transmit statistics */ + + len += sprintf(buffer + len, + "\nTransmit statistics\n\n"); + + len += sprintf(buffer + len, + "Transmit bytes %s\n", + SkNumber(test_buf, pPnmiStat->StatTxOctetsOkCts, + 10,0,-1,0)); + len += sprintf(buffer + len, + "Transmit packets %s\n", + SkNumber(test_buf, pPnmiStat->StatTxOkCts, + 10,0,-1,0)); + len += sprintf(buffer + len, + "Transmit errors %s\n", + SkNumber(test_buf, pPnmiStat->StatTxSingleCollisionCts, + 10,0,-1,0)); + len += sprintf(buffer + len, + "Transmit dropped %s\n", + SkNumber(test_buf, pPnmiStruct->TxNoBufCts, + 10,0,-1,0)); + len += sprintf(buffer + len, + "Transmit collisions %s\n", + SkNumber(test_buf, pPnmiStat->StatTxSingleCollisionCts, + 10,0,-1,0)); + len += sprintf(buffer + len, + "Transmited errors types\n"); + len += sprintf(buffer + len, + " aborted errors %ld\n", + pAC->stats.tx_aborted_errors); + len += sprintf(buffer + len, + " carrier errors %s\n", + SkNumber(test_buf, pPnmiStat->StatTxCarrierCts, + 10, 0, -1, 0)); + len += sprintf(buffer + len, + " fifo errors %s\n", + SkNumber(test_buf, pPnmiStat->StatTxFifoUnderrunCts, + 10, 0, -1, 0)); + len += sprintf(buffer + len, + " heartbeat errors %s\n", + SkNumber(test_buf, pPnmiStat->StatTxCarrierCts, + 10, 0, -1, 0)); + len += sprintf(buffer + len, + " window errors %ld\n", + pAC->stats.tx_window_errors); + } + } + SkgeProcDev = next; + } + + if (offset >= len) { + *eof = 1; + return 0; + } + + *buffer_location = buffer + offset; + if (buffer_length >= len - offset) { + *eof = 1; + } + + return (min(buffer_length, len - offset)); +} + + + + + +/***************************************************************************** + * + * SkDoDiv - convert 64bit number + * + * Description: + * This function "converts" a long long number. + * + * Returns: + * remainder of division + */ +static long SkDoDiv (long long Dividend, int Divisor, long long *pErg) +{ + long Rest; + long long Ergebnis; + long Akku; + + + Akku = Dividend >> 32; + + Ergebnis = ((long long) (Akku / Divisor)) << 32; + Rest = Akku % Divisor ; + + Akku = Rest << 16; + Akku |= ((Dividend & 0xFFFF0000) >> 16); + + + Ergebnis += ((long long) (Akku / Divisor)) << 16; + Rest = Akku % Divisor ; + + Akku = Rest << 16; + Akku |= (Dividend & 0xFFFF); + + Ergebnis += (Akku / Divisor); + Rest = Akku % Divisor ; + + *pErg = Ergebnis; + return (Rest); +} + + +#if 0 +#define do_div(n,base) ({ \ +long long __res; \ +__res = ((unsigned long long) n) % (unsigned) base; \ +n = ((unsigned long long) n) / (unsigned) base; \ +__res; }) + +#endif + + +/***************************************************************************** + * + * SkNumber - Print results + * + * Description: + * This function converts a long long number into a string. + * + * Returns: + * number as string + */ +char * SkNumber(char * str, long long num, int base, int size, int precision + ,int type) +{ + char c,sign,tmp[66], *strorg = str; + const char *digits="0123456789abcdefghijklmnopqrstuvwxyz"; + int i; + + if (type & LARGE) + digits = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + if (type & LEFT) + type &= ~ZEROPAD; + if (base < 2 || base > 36) + return 0; + c = (type & ZEROPAD) ? '0' : ' '; + sign = 0; + if (type & SIGN) { + if (num < 0) { + sign = '-'; + num = -num; + size--; + } else if (type & PLUS) { + sign = '+'; + size--; + } else if (type & SPACE) { + sign = ' '; + size--; + } + } + if (type & SPECIAL) { + if (base == 16) + size -= 2; + else if (base == 8) + size--; + } + i = 0; + if (num == 0) + tmp[i++]='0'; + else while (num != 0) + tmp[i++] = digits[SkDoDiv(num,base, &num)]; + + if (i > precision) + precision = i; + size -= precision; + if (!(type&(ZEROPAD+LEFT))) + while(size-->0) + *str++ = ' '; + if (sign) + *str++ = sign; + if (type & SPECIAL) { + if (base==8) + *str++ = '0'; + else if (base==16) { + *str++ = '0'; + *str++ = digits[33]; + } + } + if (!(type & LEFT)) + while (size-- > 0) + *str++ = c; + while (i < precision--) + *str++ = '0'; + while (i-- > 0) + *str++ = tmp[i]; + while (size-- > 0) + *str++ = ' '; + + str[0] = '\0'; + + return strorg; +} + + + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/skqueue.c linux.20p6/drivers/net/sk98lin/skqueue.c --- linux.vanilla/drivers/net/sk98lin/skqueue.c Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/skqueue.c Tue Jun 19 09:59:54 2001 @@ -147,7 +147,7 @@ * send command to state machine * end * return error reported by individual Event function - * 0 if no error occured. + * 0 if no error occurred. */ int SkEventDispatcher( SK_AC *pAC, /* Adapters Context */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/skrlmt.c linux.20p6/drivers/net/sk98lin/skrlmt.c --- linux.vanilla/drivers/net/sk98lin/skrlmt.c Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/skrlmt.c Tue Jun 19 09:46:02 2001 @@ -2,16 +2,15 @@ * * Name: skrlmt.c * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.49 $ - * Date: $Date: 1999/11/22 13:38:02 $ + * Version: $Revision: 1.61 $ + * Date: $Date: 2001/03/14 12:52:08 $ * Purpose: Manage links on SK-NET Adapters, esp. redundant ones. * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2001 SysKonnect GmbH. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,15 +26,53 @@ * History: * * $Log: skrlmt.c,v $ + * Revision 1.61 2001/03/14 12:52:08 rassmann + * Fixed reporting of active port up/down to PNMI. + * + * Revision 1.60 2001/02/21 16:02:25 gklug + * fix: when RLMT starts set Active Port for PNMI + * + * Revision 1.59 2001/02/16 14:38:19 rassmann + * Initializing some pointers earlier in the init phase. + * Rx Mbufs are freed if the net which they belong to is stopped. + * + * Revision 1.58 2001/02/14 14:06:31 rassmann + * Editorial changes. + * + * Revision 1.57 2001/02/05 14:25:26 rassmann + * Prepared RLMT for transparent operation. + * + * Revision 1.56 2001/01/30 10:29:09 rassmann + * Not checking switching befor RlmtStart. + * Editorial changes. + * + * Revision 1.55 2001/01/22 13:41:38 rassmann + * Supporting two nets on dual-port adapters. + * + * Revision 1.54 2000/11/30 13:25:07 rassmann + * Setting SK_TICK_INCR to 1 by default. + * + * Revision 1.53 2000/11/30 10:48:07 cgoos + * Changed definition of SK_RLMT_BC_DELTA. + * + * Revision 1.52 2000/11/27 12:50:03 rassmann + * Checking ports after receiving broadcasts. + * + * Revision 1.51 2000/11/17 08:58:00 rassmann + * Moved CheckSwitch from SK_RLMT_PACKET_RECEIVED to SK_RLMT_TIM event. + * + * Revision 1.50 2000/11/09 12:24:34 rassmann + * Indicating that segmentation check is not running anymore after + * SkRlmtCheckSeg(). + * Restarting segmentation timer after segmentation log. + * Editorial changes. + * * Revision 1.49 1999/11/22 13:38:02 cgoos * Changed license header to GPL. * Added initialization to some variables to avoid compiler warnings. * * Revision 1.48 1999/10/04 14:01:17 rassmann - * Corrected reaction to reception of BPDU frames. - * Added parameter descriptions to "For Readme" section skrlmt.txt. - * Clarified usage of lookahead result *pForRlmt. - * Requested driver to present RLMT packets as soon as poosible. + * Corrected reaction to reception of BPDU frames (#10441). * * Revision 1.47 1999/07/20 12:53:36 rassmann * Fixed documentation errors for lookahead macros. @@ -66,7 +103,7 @@ * * Revision 1.40 1999/01/22 13:17:30 rassmann * Informing PNMI of NET_UP. - * Clearing RLMT multicast addresses before first setting them. + * Clearing RLMT multicast addresses before setting them for the first time. * Reporting segmentation earlier, setting a "quiet time" * after a report. * @@ -218,13 +255,13 @@ #ifndef lint static const char SysKonnectFileId[] = - "@(#) $Id: skrlmt.c,v 1.49 1999/11/22 13:38:02 cgoos Exp $ (C) SysKonnect."; + "@(#) $Id: skrlmt.c,v 1.61 2001/03/14 12:52:08 rassmann Exp $ (C) SysKonnect."; #endif /* !defined(lint) */ #define __SKRLMT_C #ifdef __cplusplus -xxxx /* not supported yet - force error */ +#error C++ is not yet supported. extern "C" { #endif /* cplusplus */ @@ -245,11 +282,13 @@ #ifndef SK_LITTLE_ENDIAN /* First 32 bits */ #define OFFS_LO32 1 + /* Second 32 bits */ #define OFFS_HI32 0 #else /* SK_LITTLE_ENDIAN */ /* First 32 bits */ #define OFFS_LO32 0 + /* Second 32 bits */ #define OFFS_HI32 1 #endif /* SK_LITTLE_ENDIAN */ @@ -258,58 +297,60 @@ /* ----- Private timeout values ----- */ -#define SK_RLMT_MIN_TO_VAL 125000 /* 1/8 sec. */ -#define SK_RLMT_DEF_TO_VAL 1000000 /* 1 sec. */ +#define SK_RLMT_MIN_TO_VAL 125000 /* 1/8 sec. */ +#define SK_RLMT_DEF_TO_VAL 1000000 /* 1 sec. */ #define SK_RLMT_PORTDOWN_TIM_VAL 900000 /* another 0.9 sec. */ #define SK_RLMT_PORTSTART_TIM_VAL 100000 /* 0.1 sec. */ #define SK_RLMT_PORTUP_TIM_VAL 2500000 /* 2.5 sec. */ -#define SK_RLMT_SEG_TO_VAL 900000000 /* 15 min. */ +#define SK_RLMT_SEG_TO_VAL 900000000 /* 15 min. */ + +/* Assume tick counter increment is 1 - may be set OS-dependent. */ +#ifndef SK_TICK_INCR +#define SK_TICK_INCR SK_CONSTU64(1) +#endif /* !defined(SK_TICK_INCR) */ /* * Amount that a time stamp must be later to be recognized as "substantially - * later". This is about 1/128 sec. + * later". This is about 1/128 sec, but above 1 tick counter increment. */ - -#define SK_RLMT_BC_DELTA ((SK_TICKS_PER_SEC >> 7) + 1) +#define SK_RLMT_BC_DELTA (1 + ((SK_TICKS_PER_SEC >> 7) > SK_TICK_INCR ? \ + (SK_TICKS_PER_SEC >> 7) : SK_TICK_INCR)) /* ----- Private RLMT defaults ----- */ -#define SK_RLMT_DEF_PREF_PORT 0 /* "Lower" port. */ -#define SK_RLMT_DEF_MODE SK_RLMT_CHECK_LINK /* Default RLMT Mode. */ +#define SK_RLMT_DEF_PREF_PORT 0 /* "Lower" port. */ +#define SK_RLMT_DEF_MODE SK_RLMT_CHECK_LINK /* Default RLMT Mode. */ /* ----- Private RLMT checking states ----- */ -#define SK_RLMT_RCS_SEG 1 /* RLMT Check State: check seg. */ -#define SK_RLMT_RCS_START_SEG 2 /* RLMT Check State: start check seg. */ -#define SK_RLMT_RCS_SEND_SEG 4 /* RLMT Check State: send BPDU packet */ -#define SK_RLMT_RCS_REPORT_SEG 8 /* RLMT Check State: report seg. */ +#define SK_RLMT_RCS_SEG 1 /* RLMT Check State: check seg. */ +#define SK_RLMT_RCS_START_SEG 2 /* RLMT Check State: start check seg. */ +#define SK_RLMT_RCS_SEND_SEG 4 /* RLMT Check State: send BPDU packet */ +#define SK_RLMT_RCS_REPORT_SEG 8 /* RLMT Check State: report seg. */ /* ----- Private PORT checking states ----- */ -#define SK_RLMT_PCS_TX 1 /* Port Check State: check tx. */ -#define SK_RLMT_PCS_RX 2 /* Port Check State: check rx. */ +#define SK_RLMT_PCS_TX 1 /* Port Check State: check tx. */ +#define SK_RLMT_PCS_RX 2 /* Port Check State: check rx. */ /* ----- Private PORT events ----- */ /* Note: Update simulation when changing these. */ - #define SK_RLMT_PORTSTART_TIM 1100 /* Port start timeout. */ -#define SK_RLMT_PORTUP_TIM 1101 /* Port can now go up. */ +#define SK_RLMT_PORTUP_TIM 1101 /* Port can now go up. */ #define SK_RLMT_PORTDOWN_RX_TIM 1102 /* Port did not receive once ... */ -#define SK_RLMT_PORTDOWN 1103 /* Port went down. */ +#define SK_RLMT_PORTDOWN 1103 /* Port went down. */ #define SK_RLMT_PORTDOWN_TX_TIM 1104 /* Partner did not receive ... */ /* ----- Private RLMT events ----- */ /* Note: Update simulation when changing these. */ - -#define SK_RLMT_TIM 2100 /* RLMT timeout. */ -#define SK_RLMT_SEG_TIM 2101 /* RLMT segmentation check timeout. */ +#define SK_RLMT_TIM 2100 /* RLMT timeout. */ +#define SK_RLMT_SEG_TIM 2101 /* RLMT segmentation check timeout. */ #define TO_SHORTEN(tim) ((tim) / 2) /* Error numbers and messages. */ - #define SKERR_RLMT_E001 (SK_ERRBASE_RLMT + 0) #define SKERR_RLMT_E001_MSG "No Packet." #define SKERR_RLMT_E002 (SKERR_RLMT_E001 + 1) @@ -333,78 +374,70 @@ #define SKERR_RLMT_E010_MSG "Ignored illegal Preferred Port." /* LLC field values. */ - -#define LLC_COMMAND_RESPONSE_BIT 1 -#define LLC_TEST_COMMAND 0xE3 -#define LLC_UI 0x03 +#define LLC_COMMAND_RESPONSE_BIT 1 +#define LLC_TEST_COMMAND 0xE3 +#define LLC_UI 0x03 /* RLMT Packet fields. */ - -#define SK_RLMT_DSAP 0 -#define SK_RLMT_SSAP 0 -#define SK_RLMT_CTRL (LLC_TEST_COMMAND) -#define SK_RLMT_INDICATOR0 0x53 /* S */ -#define SK_RLMT_INDICATOR1 0x4B /* K */ -#define SK_RLMT_INDICATOR2 0x2D /* - */ -#define SK_RLMT_INDICATOR3 0x52 /* R */ -#define SK_RLMT_INDICATOR4 0x4C /* L */ -#define SK_RLMT_INDICATOR5 0x4D /* M */ -#define SK_RLMT_INDICATOR6 0x54 /* T */ -#define SK_RLMT_PACKET_VERSION 0 +#define SK_RLMT_DSAP 0 +#define SK_RLMT_SSAP 0 +#define SK_RLMT_CTRL (LLC_TEST_COMMAND) +#define SK_RLMT_INDICATOR0 0x53 /* S */ +#define SK_RLMT_INDICATOR1 0x4B /* K */ +#define SK_RLMT_INDICATOR2 0x2D /* - */ +#define SK_RLMT_INDICATOR3 0x52 /* R */ +#define SK_RLMT_INDICATOR4 0x4C /* L */ +#define SK_RLMT_INDICATOR5 0x4D /* M */ +#define SK_RLMT_INDICATOR6 0x54 /* T */ +#define SK_RLMT_PACKET_VERSION 0 /* RLMT SPT Flag values. */ - -#define SK_RLMT_SPT_FLAG_CHANGE 0x01 -#define SK_RLMT_SPT_FLAG_CHANGE_ACK 0x80 +#define SK_RLMT_SPT_FLAG_CHANGE 0x01 +#define SK_RLMT_SPT_FLAG_CHANGE_ACK 0x80 /* RLMT SPT Packet fields. */ - -#define SK_RLMT_SPT_DSAP 0x42 -#define SK_RLMT_SPT_SSAP 0x42 -#define SK_RLMT_SPT_CTRL (LLC_UI) -#define SK_RLMT_SPT_PROTOCOL_ID0 0x00 -#define SK_RLMT_SPT_PROTOCOL_ID1 0x00 +#define SK_RLMT_SPT_DSAP 0x42 +#define SK_RLMT_SPT_SSAP 0x42 +#define SK_RLMT_SPT_CTRL (LLC_UI) +#define SK_RLMT_SPT_PROTOCOL_ID0 0x00 +#define SK_RLMT_SPT_PROTOCOL_ID1 0x00 #define SK_RLMT_SPT_PROTOCOL_VERSION_ID 0x00 -#define SK_RLMT_SPT_BPDU_TYPE 0x00 -#define SK_RLMT_SPT_FLAGS 0x00 /* ?? */ -#define SK_RLMT_SPT_ROOT_ID0 0xFF /* Lowest possible priority. */ -#define SK_RLMT_SPT_ROOT_ID1 0xFF /* Lowest possible priority. */ +#define SK_RLMT_SPT_BPDU_TYPE 0x00 +#define SK_RLMT_SPT_FLAGS 0x00 /* ?? */ +#define SK_RLMT_SPT_ROOT_ID0 0xFF /* Lowest possible priority. */ +#define SK_RLMT_SPT_ROOT_ID1 0xFF /* Lowest possible priority. */ /* Remaining 6 bytes will be the current port address. */ - -#define SK_RLMT_SPT_ROOT_PATH_COST0 0x00 -#define SK_RLMT_SPT_ROOT_PATH_COST1 0x00 -#define SK_RLMT_SPT_ROOT_PATH_COST2 0x00 -#define SK_RLMT_SPT_ROOT_PATH_COST3 0x00 -#define SK_RLMT_SPT_BRIDGE_ID0 0xFF /* Lowest possible priority. */ -#define SK_RLMT_SPT_BRIDGE_ID1 0xFF /* Lowest possible priority. */ +#define SK_RLMT_SPT_ROOT_PATH_COST0 0x00 +#define SK_RLMT_SPT_ROOT_PATH_COST1 0x00 +#define SK_RLMT_SPT_ROOT_PATH_COST2 0x00 +#define SK_RLMT_SPT_ROOT_PATH_COST3 0x00 +#define SK_RLMT_SPT_BRIDGE_ID0 0xFF /* Lowest possible priority. */ +#define SK_RLMT_SPT_BRIDGE_ID1 0xFF /* Lowest possible priority. */ /* Remaining 6 bytes will be the current port address. */ - -#define SK_RLMT_SPT_PORT_ID0 0xFF /* Lowest possible priority. */ -#define SK_RLMT_SPT_PORT_ID1 0xFF /* Lowest possible priority. */ -#define SK_RLMT_SPT_MSG_AGE0 0x00 -#define SK_RLMT_SPT_MSG_AGE1 0x00 -#define SK_RLMT_SPT_MAX_AGE0 0x00 -#define SK_RLMT_SPT_MAX_AGE1 0xFF -#define SK_RLMT_SPT_HELLO_TIME0 0x00 -#define SK_RLMT_SPT_HELLO_TIME1 0xFF -#define SK_RLMT_SPT_FWD_DELAY0 0x00 -#define SK_RLMT_SPT_FWD_DELAY1 0x40 +#define SK_RLMT_SPT_PORT_ID0 0xFF /* Lowest possible priority. */ +#define SK_RLMT_SPT_PORT_ID1 0xFF /* Lowest possible priority. */ +#define SK_RLMT_SPT_MSG_AGE0 0x00 +#define SK_RLMT_SPT_MSG_AGE1 0x00 +#define SK_RLMT_SPT_MAX_AGE0 0x00 +#define SK_RLMT_SPT_MAX_AGE1 0xFF +#define SK_RLMT_SPT_HELLO_TIME0 0x00 +#define SK_RLMT_SPT_HELLO_TIME1 0xFF +#define SK_RLMT_SPT_FWD_DELAY0 0x00 +#define SK_RLMT_SPT_FWD_DELAY1 0x40 /* Size defines. */ - -#define SK_RLMT_MIN_PACKET_SIZE 34 -#define SK_RLMT_MAX_PACKET_SIZE (SK_RLMT_MAX_TX_BUF_SIZE) -#define SK_PACKET_DATA_LEN (SK_RLMT_MAX_PACKET_SIZE - \ - SK_RLMT_MIN_PACKET_SIZE) +#define SK_RLMT_MIN_PACKET_SIZE 34 +#define SK_RLMT_MAX_PACKET_SIZE (SK_RLMT_MAX_TX_BUF_SIZE) +#define SK_PACKET_DATA_LEN (SK_RLMT_MAX_PACKET_SIZE - \ + SK_RLMT_MIN_PACKET_SIZE) /* ----- RLMT packet types ----- */ - -#define SK_PACKET_ANNOUNCE 1 /* Port announcement. */ -#define SK_PACKET_ALIVE 2 /* Alive packet to port. */ -#define SK_PACKET_ADDR_CHANGED 3 /* Port address changed. */ -#define SK_PACKET_CHECK_TX 4 /* Check your tx line. */ +#define SK_PACKET_ANNOUNCE 1 /* Port announcement. */ +#define SK_PACKET_ALIVE 2 /* Alive packet to port. */ +#define SK_PACKET_ADDR_CHANGED 3 /* Port address changed. */ +#define SK_PACKET_CHECK_TX 4 /* Check your tx line. */ #ifdef SK_LITTLE_ENDIAN #define SK_U16_TO_NETWORK_ORDER(Val,Addr) { \ @@ -426,7 +459,6 @@ /* typedefs *******************************************************************/ /* RLMT packet. Length: SK_RLMT_MAX_PACKET_SIZE (60) bytes. */ - typedef struct s_RlmtPacket { SK_U8 DstAddr[SK_MAC_ADDR_LEN]; SK_U8 SrcAddr[SK_MAC_ADDR_LEN]; @@ -437,8 +469,8 @@ SK_U8 Indicator[7]; SK_U8 RlmtPacketType[2]; SK_U8 Align1[2]; - SK_U8 Random[4]; /* Random value of requesting(!) station. */ - SK_U8 RlmtPacketVersion[2]; /* RLMT Packet version */ + SK_U8 Random[4]; /* Random value of requesting(!) station. */ + SK_U8 RlmtPacketVersion[2]; /* RLMT Packet version. */ SK_U8 Data[SK_PACKET_DATA_LEN]; } SK_RLMT_PACKET; @@ -465,9 +497,9 @@ /* global variables ***********************************************************/ -SK_MAC_ADDR SkRlmtMcAddr = {{0x01, 0x00, 0x5A, 0x52, 0x4C, 0x4D}}; -SK_MAC_ADDR BridgeMcAddr = {{0x01, 0x80, 0xC2, 0x00, 0x00, 0x00}}; -SK_MAC_ADDR BcAddr = {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}}; +SK_MAC_ADDR SkRlmtMcAddr = {{0x01, 0x00, 0x5A, 0x52, 0x4C, 0x4D}}; +SK_MAC_ADDR BridgeMcAddr = {{0x01, 0x80, 0xC2, 0x00, 0x00, 0x00}}; +SK_MAC_ADDR BcAddr = {{0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}}; /* local variables ************************************************************/ @@ -477,10 +509,16 @@ RLMT_STATIC void SkRlmtCheckSwitch( SK_AC *pAC, - SK_IOC IoC); + SK_IOC IoC, + SK_U32 NetIdx); RLMT_STATIC void SkRlmtCheckSeg( SK_AC *pAC, - SK_IOC IoC); + SK_IOC IoC, + SK_U32 NetIdx); +RLMT_STATIC void SkRlmtEvtSetNets( + SK_AC *pAC, + SK_IOC IoC, + SK_EVPARA Para); /****************************************************************************** * @@ -506,7 +544,7 @@ * =========== * * Determine the adapter's random value. - * Set the hw registers, the "logical adapter address", the + * Set the hw registers, the "logical MAC address", the * RLMT multicast address, and eventually the BPDU multicast address. * * Context: @@ -516,18 +554,15 @@ * Nothing. */ void SkRlmtInit( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* I/O context */ -int Level) /* initialization level */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +int Level) /* Initialization Level */ { SK_U32 i, j; SK_U64 Random; SK_EVPARA Para; - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_INIT, + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_INIT, ("RLMT Init level %d.\n", Level)) switch (Level) { @@ -541,68 +576,70 @@ pAC->Rlmt.Port[i].PortStarted = SK_FALSE; pAC->Rlmt.Port[i].PortNoRx = SK_FALSE; pAC->Rlmt.Port[i].RootIdSet = SK_FALSE; - } - - pAC->Rlmt.RlmtState = SK_RLMT_RS_INIT; - pAC->Rlmt.RootIdSet = SK_FALSE; - pAC->Rlmt.MacPreferred = 0xFFFFFFFF; /* Automatic. */ - pAC->Rlmt.PrefPort = SK_RLMT_DEF_PREF_PORT; - pAC->Rlmt.MacActive = pAC->Rlmt.PrefPort; /* Just assuming. */ - pAC->Rlmt.RlmtMode = SK_RLMT_DEF_MODE; - pAC->Rlmt.TimeoutValue = SK_RLMT_DEF_TO_VAL; + pAC->Rlmt.Port[i].PortNumber = i; + pAC->Rlmt.Port[i].Net = &pAC->Rlmt.Net[0]; + pAC->Rlmt.Port[i].AddrPort = &pAC->Addr.Port[i]; + } + + pAC->Rlmt.NumNets = 1; + for (i = 0; i < SK_MAX_NETS; i++) { + pAC->Rlmt.Net[i].RlmtState = SK_RLMT_RS_INIT; + pAC->Rlmt.Net[i].RootIdSet = SK_FALSE; + pAC->Rlmt.Net[i].Preference = 0xFFFFFFFF; /* Automatic. */ + pAC->Rlmt.Net[i].PrefPort = SK_RLMT_DEF_PREF_PORT; + /* Just assuming. */ + pAC->Rlmt.Net[i].ActivePort = pAC->Rlmt.Net[i].PrefPort; + pAC->Rlmt.Net[i].RlmtMode = SK_RLMT_DEF_MODE; + pAC->Rlmt.Net[i].TimeoutValue = SK_RLMT_DEF_TO_VAL; + pAC->Rlmt.Net[i].NetNumber = i; + } + + pAC->Rlmt.Net[0].Port[0] = &pAC->Rlmt.Port[0]; + pAC->Rlmt.Net[0].Port[1] = &pAC->Rlmt.Port[1]; +#if SK_MAX_NETS > 1 + pAC->Rlmt.Net[1].Port[0] = &pAC->Rlmt.Port[1]; +#endif /* SK_MAX_NETS > 1 */ break; case SK_INIT_IO: /* GIMacsFound first available here. */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_INIT, - ("RLMT: %d MACs were detected.\n", - pAC->GIni.GIMacsFound)) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_INIT, + ("RLMT: %d MACs were detected.\n", pAC->GIni.GIMacsFound)) - /* Initialize HW registers? */ + pAC->Rlmt.Net[0].NumPorts = pAC->GIni.GIMacsFound; + /* Initialize HW registers? */ if (pAC->GIni.GIMacsFound < 2) { - Para.Para32[0] = SK_RLMT_CHECK_LINK; + Para.Para32[0] = SK_RLMT_MODE_CLS; + Para.Para32[1] = 0; (void)SkRlmtEvent(pAC, IoC, SK_RLMT_MODE_CHANGE, Para); } break; case SK_INIT_RUN: + /* Ensure RLMT is set to one net. */ + if (pAC->Rlmt.NumNets > 1) { + Para.Para32[0] = 1; + Para.Para32[1] = -1; + SkRlmtEvtSetNets(pAC, IoC, Para); + } + for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { Random = SkOsGetTime(pAC); *(SK_U32*)&pAC->Rlmt.Port[i].Random = *(SK_U32*)&Random; for (j = 0; j < 4; j++) { - pAC->Rlmt.Port[i].Random[j] ^= pAC->Addr.Port[i - ].CurrentMacAddress.a[SK_MAC_ADDR_LEN - - 1 - j]; + pAC->Rlmt.Port[i].Random[j] ^= pAC->Rlmt.Port[i].AddrPort-> + CurrentMacAddress.a[SK_MAC_ADDR_LEN - 1 - j]; } - (void)SkAddrMcClear( - pAC, - IoC, - i, - SK_ADDR_PERMANENT | SK_MC_SW_ONLY); + (void)SkAddrMcClear(pAC, IoC, i, SK_ADDR_PERMANENT | SK_MC_SW_ONLY); /* Add RLMT MC address. */ + (void)SkAddrMcAdd(pAC, IoC, i, &SkRlmtMcAddr, SK_ADDR_PERMANENT); - (void)SkAddrMcAdd( - pAC, - IoC, - i, - &SkRlmtMcAddr, - SK_ADDR_PERMANENT); - - if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) { + if (pAC->Rlmt.Net[0].RlmtMode & SK_RLMT_CHECK_SEG) { /* Add BPDU MC address. */ - - (void)SkAddrMcAdd( - pAC, - IoC, - i, - &BridgeMcAddr, - SK_ADDR_PERMANENT); + (void)SkAddrMcAdd(pAC, IoC, i, &BridgeMcAddr, SK_ADDR_PERMANENT); } (void)SkAddrMcUpdate(pAC, IoC, i); @@ -612,9 +649,7 @@ default: /* error */ break; } - return; - } /* SkRlmtInit */ @@ -639,32 +674,33 @@ * Nothing */ RLMT_STATIC void SkRlmtBuildCheckChain( -SK_AC *pAC) /* adapter context */ +SK_AC *pAC, /* Adapter Context */ +SK_U32 NetIdx) /* Net Number */ { - SK_U32 i; - SK_U32 NumMacsUp; - SK_U32 FirstMacUp=0; - SK_U32 PrevMacUp=0; + SK_U32 i; + SK_U32 NumMacsUp; + SK_RLMT_PORT * FirstMacUp; + SK_RLMT_PORT * PrevMacUp; - if (!(pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LOC_LINK)) { - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { - pAC->Rlmt.Port[i].PortsChecked = 0; + FirstMacUp = NULL; + PrevMacUp = NULL; + + if (!(pAC->Rlmt.Net[NetIdx].RlmtMode & SK_RLMT_CHECK_LOC_LINK)) { + for (i = 0; i < pAC->Rlmt.Net[i].NumPorts; i++) { + pAC->Rlmt.Net[NetIdx].Port[i]->PortsChecked = 0; } - return; /* Nothing to build. */ + return; /* Done. */ } - - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, + + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, ("SkRlmtBuildCheckChain.\n")) NumMacsUp = 0; - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { - pAC->Rlmt.Port[i].PortsChecked = 0; - pAC->Rlmt.Port[i].PortsSuspect = 0; - pAC->Rlmt.Port[i].CheckingState &= + for (i = 0; i < pAC->Rlmt.Net[NetIdx].NumPorts; i++) { + pAC->Rlmt.Net[NetIdx].Port[i]->PortsChecked = 0; + pAC->Rlmt.Net[NetIdx].Port[i]->PortsSuspect = 0; + pAC->Rlmt.Net[NetIdx].Port[i]->CheckingState &= ~(SK_RLMT_PCS_RX | SK_RLMT_PCS_TX); /* @@ -673,156 +709,43 @@ * 1. the next port that is not LinkDown and * 2. the next port that is not PortDown. */ - - if (!pAC->Rlmt.Port[i].LinkDown) { + if (!pAC->Rlmt.Net[NetIdx].Port[i]->LinkDown) { if (NumMacsUp == 0) { - FirstMacUp = i; + FirstMacUp = pAC->Rlmt.Net[NetIdx].Port[i]; } else { - pAC->Rlmt.Port[PrevMacUp].PortCheck[ - pAC->Rlmt.Port[ - PrevMacUp].PortsChecked].CheckAddr = - pAC->Addr.Port[i].CurrentMacAddress; - pAC->Rlmt.Port[PrevMacUp].PortCheck[ - pAC->Rlmt.Port[ - PrevMacUp].PortsChecked].SuspectTx = - SK_FALSE; - pAC->Rlmt.Port[PrevMacUp].PortsChecked++; + pAC->Rlmt.Net[NetIdx].Port[i]->PortCheck[ + pAC->Rlmt.Net[NetIdx].Port[i]->PortsChecked].CheckAddr = + pAC->Rlmt.Net[NetIdx].Port[i]->AddrPort->CurrentMacAddress; + PrevMacUp->PortCheck[ + PrevMacUp->PortsChecked].SuspectTx = SK_FALSE; + PrevMacUp->PortsChecked++; } - PrevMacUp = i; + PrevMacUp = pAC->Rlmt.Net[NetIdx].Port[i]; NumMacsUp++; } } if (NumMacsUp > 1) { - pAC->Rlmt.Port[PrevMacUp].PortCheck[pAC->Rlmt.Port[ - PrevMacUp].PortsChecked].CheckAddr = - pAC->Addr.Port[FirstMacUp].CurrentMacAddress; - pAC->Rlmt.Port[PrevMacUp].PortCheck[pAC->Rlmt.Port[ - PrevMacUp].PortsChecked].SuspectTx = SK_FALSE; - pAC->Rlmt.Port[PrevMacUp].PortsChecked++; + PrevMacUp->PortCheck[PrevMacUp->PortsChecked].CheckAddr = + FirstMacUp->AddrPort->CurrentMacAddress; + PrevMacUp->PortCheck[PrevMacUp->PortsChecked].SuspectTx = + SK_FALSE; + PrevMacUp->PortsChecked++; } #ifdef DEBUG - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("Port %d checks %d other ports: %2X.\n", - i, - pAC->Rlmt.Port[i].PortsChecked, - pAC->Rlmt.Port[i].PortCheck[0].CheckAddr.a[5])) + for (i = 0; i < pAC->Rlmt.Net[NetIdx].NumPorts; i++) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Port %d checks %d other ports: %2X.\n", NetIdx, + pAC->Rlmt.Net[NetIdx].Port[i]->PortsChecked, + pAC->Rlmt.Net[NetIdx].Port[i]->PortCheck[0].CheckAddr.a[5])) } #endif /* DEBUG */ return; } /* SkRlmtBuildCheckChain */ -#ifdef SK_RLMT_SLOW_LOOKAHEAD - -/****************************************************************************** - * - * SkRlmtLookaheadPacket - examine received packet shortly, count s-th - * - * Description: - * This routine examines each received packet fast and short and - * increments some counters. - * The received packet has to be stored virtually contiguous. - * This function does the following: - * - Increment some counters. - * - Ensure length is sufficient. - * - Ensure that destination address is physical port address, - * RLMT multicast, or BPDU multicast address. - * - * Notes: - * This function is fully reentrant while the fast path is not blocked. - * - * Context: - * isr/dpr, not pageable - * - * Returns: - * SK_FALSE packet for upper layers - * SK_TRUE packet for RLMT - */ -SK_BOOL SkRlmtLookaheadPacket( -SK_AC *pAC, /* adapter context */ -SK_U32 PortIdx, /* receiving port */ -SK_U8 *pLaPacket, /* received packet's data */ -unsigned PacketLength, /* received packet's length */ /* Necessary? */ -unsigned LaLength) /* lookahead length */ -{ - int i; - SK_BOOL IsBc; /* Broadcast address? */ - int RxDest; /* Receive destination? */ - int Offset; /* Offset of data to present to LOOKAHEAD. */ - int NumBytes; /* #Bytes to present to LOOKAHEAD. */ - SK_RLMT_PACKET *pRPacket; - SK_ADDR_PORT *pAPort; - -#ifdef DEBUG - PacketLength = PacketLength; -#endif /* DEBUG */ - - pRPacket = (SK_RLMT_PACKET*)pLaPacket; - pAPort = &pAC->Addr.Port[PortIdx]; - -#ifdef DEBUG - if (pLaPacket == NULL) { - - /* Create error log entry. */ - - SK_ERR_LOG( - pAC, - SK_ERRCL_SW, - SKERR_RLMT_E001, - SKERR_RLMT_E001_MSG); - - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_RX, - ("SkRlmtLookaheadPacket: NULL pointer.\n")) - - return (SK_FALSE); - } -#endif /* DEBUG */ - - /* Drivers should get IsBc from the descriptor. */ - - IsBc = SK_TRUE; - for (i = 0; IsBc && i < SK_MAC_ADDR_LEN; i++) { - IsBc = IsBc && (pLaPacket[i] == 0xFF); - } - - SK_RLMT_PRE_LOOKAHEAD( - pAC, - PortIdx, - PacketLength, - IsBc, - &Offset, - &NumBytes) - - if (NumBytes == 0) { - return (SK_FALSE); - } - - SK_RLMT_LOOKAHEAD( - pAC, - PortIdx, - &pLaPacket[Offset], - IsBc, - pLaPacket[0] & 1, /* Drivers: Get info from descriptor. */ - &RxDest) - - if (RxDest & SK_RLMT_RX_RLMT) { - return (SK_TRUE); - } - - return (SK_FALSE); -} /* SkRlmtLookaheadPacket */ - -#endif /* SK_RLMT_SLOW_LOOKAHEAD */ /****************************************************************************** * @@ -838,20 +761,19 @@ * NULL or pointer to RLMT mbuf */ RLMT_STATIC SK_MBUF *SkRlmtBuildPacket( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* I/O context */ -SK_U32 PortIdx, /* sending port */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_U32 PortNumber, /* Sending port */ SK_U16 PacketType, /* RLMT packet type */ -SK_MAC_ADDR *SrcAddr, /* source address */ -SK_MAC_ADDR *DestAddr) /* destination address */ +SK_MAC_ADDR *SrcAddr, /* Source address */ +SK_MAC_ADDR *DestAddr) /* Destination address */ { int i; SK_U16 Length; SK_MBUF *pMb; SK_RLMT_PACKET *pPacket; - if ((pMb = SkDrvAllocRlmtMbuf(pAC, IoC, SK_RLMT_MAX_PACKET_SIZE)) != - NULL) { + if ((pMb = SkDrvAllocRlmtMbuf(pAC, IoC, SK_RLMT_MAX_PACKET_SIZE)) != NULL) { pPacket = (SK_RLMT_PACKET*)pMb->pData; for (i = 0; i < SK_MAC_ADDR_LEN; i++) { pPacket->DstAddr[i] = DestAddr->a[i]; @@ -868,17 +790,14 @@ pPacket->Indicator[5] = SK_RLMT_INDICATOR5; pPacket->Indicator[6] = SK_RLMT_INDICATOR6; - SK_U16_TO_NETWORK_ORDER( - PacketType, - &pPacket->RlmtPacketType[0]); + SK_U16_TO_NETWORK_ORDER(PacketType, &pPacket->RlmtPacketType[0]); for (i = 0; i < 4; i++) { - pPacket->Random[i] = pAC->Rlmt.Port[PortIdx].Random[i]; + pPacket->Random[i] = pAC->Rlmt.Port[PortNumber].Random[i]; } SK_U16_TO_NETWORK_ORDER( - SK_RLMT_PACKET_VERSION, - &pPacket->RlmtPacketVersion[0]); + SK_RLMT_PACKET_VERSION, &pPacket->RlmtPacketVersion[0]); for (i = 0; i < SK_PACKET_DATA_LEN; i++) { pPacket->Data[i] = 0x00; @@ -886,12 +805,12 @@ Length = SK_RLMT_MAX_PACKET_SIZE; /* Or smaller. */ pMb->Length = Length; - pMb->PortIdx = PortIdx; + pMb->PortIdx = PortNumber; Length -= 14; SK_U16_TO_NETWORK_ORDER(Length, &pPacket->TypeLen[0]); if (PacketType == SK_PACKET_ALIVE) { - pAC->Rlmt.Port[PortIdx].TxHelloCts++; + pAC->Rlmt.Port[PortNumber].TxHelloCts++; } } @@ -913,13 +832,13 @@ * NULL or pointer to RLMT mbuf */ RLMT_STATIC SK_MBUF *SkRlmtBuildSpanningTreePacket( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* I/O context */ -SK_U32 PortIdx) /* sending port */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_U32 PortNumber) /* Sending port */ { - unsigned i; - SK_U16 Length; - SK_MBUF *pMb; + unsigned i; + SK_U16 Length; + SK_MBUF *pMb; SK_SPTREE_PACKET *pSPacket; if ((pMb = SkDrvAllocRlmtMbuf(pAC, IoC, SK_RLMT_MAX_PACKET_SIZE)) != @@ -928,7 +847,7 @@ for (i = 0; i < SK_MAC_ADDR_LEN; i++) { pSPacket->DstAddr[i] = BridgeMcAddr.a[i]; pSPacket->SrcAddr[i] = - pAC->Addr.Port[PortIdx].CurrentMacAddress.a[i]; + pAC->Addr.Port[PortNumber].CurrentMacAddress.a[i]; } pSPacket->DSap = SK_RLMT_SPT_DSAP; pSPacket->SSap = SK_RLMT_SPT_SSAP; @@ -949,13 +868,13 @@ pSPacket->BridgeId[1] = SK_RLMT_SPT_BRIDGE_ID1; /* - * Use virtual address as bridge ID and filter these packets + * Use logical MAC address as bridge ID and filter these packets * on receive. */ - for (i = 0; i < SK_MAC_ADDR_LEN; i++) { pSPacket->BridgeId[i + 2] = pSPacket->RootId[i + 2] = - pAC->Addr.CurrentMacAddress.a[i]; + pAC->Addr.Net[pAC->Rlmt.Port[PortNumber].Net->NetNumber]. + CurrentMacAddress.a[i]; } pSPacket->PortId[0] = SK_RLMT_SPT_PORT_ID0; pSPacket->PortId[1] = SK_RLMT_SPT_PORT_ID1; @@ -970,11 +889,11 @@ Length = SK_RLMT_MAX_PACKET_SIZE; /* Or smaller. */ pMb->Length = Length; - pMb->PortIdx = PortIdx; + pMb->PortIdx = PortNumber; Length -= 14; SK_U16_TO_NETWORK_ORDER(Length, &pSPacket->TypeLen[0]); - pAC->Rlmt.Port[PortIdx].TxSpHelloReqCts++; + pAC->Rlmt.Port[PortNumber].TxSpHelloReqCts++; } return (pMb); @@ -996,36 +915,22 @@ * Nothing. */ RLMT_STATIC void SkRlmtSend( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* I/O context */ -SK_U32 PortIdx) +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_U32 PortNumber) /* Sending port */ { unsigned j; SK_EVPARA Para; SK_RLMT_PORT *pRPort; - pRPort = &pAC->Rlmt.Port[PortIdx]; - if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LOC_LINK) { - if (pRPort->CheckingState & - (SK_RLMT_PCS_TX | SK_RLMT_PCS_RX)) { - - /* - * Port is suspicious. Send the RLMT packet to the - * RLMT multicast address. - */ - - if ((Para.pParaPtr = SkRlmtBuildPacket( - pAC, - IoC, - PortIdx, - SK_PACKET_ALIVE, - &pAC->Addr.Port[PortIdx].CurrentMacAddress, + pRPort = &pAC->Rlmt.Port[PortNumber]; + if (pAC->Rlmt.Port[PortNumber].Net->RlmtMode & SK_RLMT_CHECK_LOC_LINK) { + if (pRPort->CheckingState & (SK_RLMT_PCS_TX | SK_RLMT_PCS_RX)) { + /* Port is suspicious. Send the RLMT packet to the RLMT mc addr. */ + if ((Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, PortNumber, + SK_PACKET_ALIVE, &pAC->Addr.Port[PortNumber].CurrentMacAddress, &SkRlmtMcAddr)) != NULL) { - SkEventQueue( - pAC, - SKGE_DRV, - SK_DRV_RLMT_SEND, - Para); + SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para); } } else { @@ -1033,61 +938,33 @@ * Send a directed RLMT packet to all ports that are * checked by the indicated port. */ - for (j = 0; j < pRPort->PortsChecked; j++) { - if ((Para.pParaPtr = - SkRlmtBuildPacket( - pAC, - IoC, - PortIdx, - SK_PACKET_ALIVE, - &pAC->Addr.Port[PortIdx].CurrentMacAddress, - &pRPort->PortCheck[j].CheckAddr) - ) != NULL) { - SkEventQueue( - pAC, - SKGE_DRV, - SK_DRV_RLMT_SEND, - Para); + if ((Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, PortNumber, + SK_PACKET_ALIVE, &pAC->Addr.Port[PortNumber].CurrentMacAddress, + &pRPort->PortCheck[j].CheckAddr)) != NULL) { + SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para); } } } } - if ((pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) && - (pAC->Rlmt.CheckingState & SK_RLMT_RCS_SEND_SEG)) { - + if ((pAC->Rlmt.Port[PortNumber].Net->RlmtMode & SK_RLMT_CHECK_SEG) && + (pAC->Rlmt.Port[PortNumber].Net->CheckingState & SK_RLMT_RCS_SEND_SEG)) { /* * Send a BPDU packet to make a connected switch tell us * the correct root bridge. */ - if ((Para.pParaPtr = - SkRlmtBuildSpanningTreePacket( - pAC, - IoC, - PortIdx) - ) != NULL) { - - pAC->Rlmt.CheckingState &= ~SK_RLMT_RCS_SEND_SEG; + SkRlmtBuildSpanningTreePacket(pAC, IoC, PortNumber)) != NULL) { + pAC->Rlmt.Port[PortNumber].Net->CheckingState &= ~SK_RLMT_RCS_SEND_SEG; pRPort->RootIdSet = SK_FALSE; - SkEventQueue( - pAC, - SKGE_DRV, - SK_DRV_RLMT_SEND, - Para); - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_TX, - ("SkRlmtSend: BPDU Packet on Port %u.\n", - PortIdx)) + SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para); + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_TX, + ("SkRlmtSend: BPDU Packet on Port %u.\n", PortNumber)) } - } - - return; - + } + return; } /* SkRlmtSend */ @@ -1099,61 +976,51 @@ * This routine checks if a port who received a non-BPDU packet * needs to go up or needs to be stopped going down. * -* Context: + * Context: * runtime, pageable? * * Returns: * Nothing. */ RLMT_STATIC void SkRlmtPortReceives( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* I/O context */ -SK_U32 PortIdx) /* port to check */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_U32 PortNumber) /* Port to check */ { SK_RLMT_PORT *pRPort; - SK_EVPARA Para; + SK_EVPARA Para; - pRPort = &pAC->Rlmt.Port[PortIdx]; + pRPort = &pAC->Rlmt.Port[PortNumber]; pRPort->PortNoRx = SK_FALSE; if ((pRPort->PortState == SK_RLMT_PS_DOWN) && !(pRPort->CheckingState & SK_RLMT_PCS_TX)) { - /* * Port is marked down (rx), but received a non-BPDU packet. * Bring it up. */ - - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_RX, + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, ("SkRlmtPacketReceive: Received on PortDown.\n")) pRPort->PortState = SK_RLMT_PS_GOING_UP; pRPort->GuTimeStamp = SkOsGetTime(pAC); - Para.Para32[0] = PortIdx; - SkTimerStart( - pAC, - IoC, - &pRPort->UpTimer, - SK_RLMT_PORTUP_TIM_VAL, - SKGE_RLMT, - SK_RLMT_PORTUP_TIM, - Para); - SkRlmtCheckSwitch(pAC, IoC); - } + Para.Para32[0] = PortNumber; + Para.Para32[1] = (SK_U32)-1; + SkTimerStart(pAC, IoC, &pRPort->UpTimer, SK_RLMT_PORTUP_TIM_VAL, + SKGE_RLMT, SK_RLMT_PORTUP_TIM, Para); + pRPort->CheckingState &= ~SK_RLMT_PCS_RX; + /* pAC->Rlmt.CheckSwitch = SK_TRUE; */ + SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); + } /* PortDown && !SuspectTx */ else if (pRPort->CheckingState & SK_RLMT_PCS_RX) { - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_RX, + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, ("SkRlmtPacketReceive: Stop bringing port down.\n")) SkTimerStop(pAC, IoC, &pRPort->DownRxTimer); - SkRlmtCheckSwitch(pAC, IoC); - } + pRPort->CheckingState &= ~SK_RLMT_PCS_RX; + /* pAC->Rlmt.CheckSwitch = SK_TRUE; */ + SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); + } /* PortGoingDown */ - pRPort->CheckingState &= ~SK_RLMT_PCS_RX; return; } /* SkRlmtPortReceives */ @@ -1163,7 +1030,7 @@ * SkRlmtPacketReceive - receive a packet for closer examination * * Description: - * This routine examines a packet more closely than SkRlmtLookahead*(). + * This routine examines a packet more closely than SK_RLMT_LOOKAHEAD. * * Context: * runtime, pageable? @@ -1172,32 +1039,29 @@ * Nothing. */ RLMT_STATIC void SkRlmtPacketReceive( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* I/O context */ -SK_MBUF *pMb) /* received packet */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_MBUF *pMb) /* Received packet */ { #ifdef xDEBUG extern void DumpData(char *p, int size); #endif /* DEBUG */ - int i; - unsigned j; - SK_U16 PacketType; - SK_U32 PortIdx; + int i; + unsigned j; + SK_U16 PacketType; + SK_U32 PortNumber; SK_ADDR_PORT *pAPort; SK_RLMT_PORT *pRPort; SK_RLMT_PACKET *pRPacket; SK_SPTREE_PACKET *pSPacket; - SK_EVPARA Para; + SK_EVPARA Para; + + PortNumber = pMb->PortIdx; + pAPort = &pAC->Addr.Port[PortNumber]; + pRPort = &pAC->Rlmt.Port[PortNumber]; - PortIdx = pMb->PortIdx; - pAPort = &pAC->Addr.Port[PortIdx]; - pRPort = &pAC->Rlmt.Port[PortIdx]; - - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_RX, - ("SkRlmtPacketReceive: PortIdx == %d.\n", PortIdx)) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, + ("SkRlmtPacketReceive: PortNumber == %d.\n", PortNumber)) pRPacket = (SK_RLMT_PACKET*)pMb->pData; pSPacket = (SK_SPTREE_PACKET*)pRPacket; @@ -1207,7 +1071,7 @@ #endif /* DEBUG */ if ((pRPort->PacketsPerTimeSlot - pRPort->BpduPacketsPerTimeSlot) != 0) { - SkRlmtPortReceives(pAC, IoC, PortIdx); + SkRlmtPortReceives(pAC, IoC, PortNumber); } /* Check destination address. */ @@ -1216,15 +1080,8 @@ !SK_ADDR_EQUAL(SkRlmtMcAddr.a, pRPacket->DstAddr) && !SK_ADDR_EQUAL(BridgeMcAddr.a, pRPacket->DstAddr)) { - /* - * Not sent to current MAC or registered MC address - * => Trash it. - */ - - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_RX, + /* Not sent to current MAC or registered MC address => Trash it. */ + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, ("SkRlmtPacketReceive: Not for me.\n")) SkDrvFreeRlmtMbuf(pAC, IoC, pMb); @@ -1241,19 +1098,17 @@ * Check for duplicate address here: * If Packet.Random != My.Random => DupAddr. */ - for (i = 3; i >= 0; i--) { - if (pRPort->Random[i] != - pRPacket->Random[i]) { + if (pRPort->Random[i] != pRPacket->Random[i]) { break; } } /* - * CAUTION: Do not check for duplicate MAC - * address in RLMT Alive Reply packets. + * CAUTION: Do not check for duplicate MAC address in RLMT Alive Reply + * packets (they have the LLC_COMMAND_RESPONSE_BIT set in + * pRPacket->SSap). */ - if (i >= 0 && pRPacket->DSap == SK_RLMT_DSAP && pRPacket->Ctrl == SK_RLMT_CTRL && pRPacket->SSap == SK_RLMT_SSAP && @@ -1264,43 +1119,28 @@ pRPacket->Indicator[4] == SK_RLMT_INDICATOR4 && pRPacket->Indicator[5] == SK_RLMT_INDICATOR5 && pRPacket->Indicator[6] == SK_RLMT_INDICATOR6) { - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_RX, + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, ("SkRlmtPacketReceive: Duplicate MAC Address.\n")) /* Error Log entry. */ - - SK_ERR_LOG( - pAC, - SK_ERRCL_COMM, - SKERR_RLMT_E006, - SKERR_RLMT_E006_MSG); + SK_ERR_LOG(pAC, SK_ERRCL_COMM, SKERR_RLMT_E006, SKERR_RLMT_E006_MSG); } else { /* Simply trash it. */ - - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_RX, + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, ("SkRlmtPacketReceive: Sent by me.\n")) } SkDrvFreeRlmtMbuf(pAC, IoC, pMb); - return; } /* Check SuspectTx entries. */ - if (pRPort->PortsSuspect > 0) { for (j = 0; j < pRPort->PortsChecked; j++) { if (pRPort->PortCheck[j].SuspectTx && SK_ADDR_EQUAL( - pRPacket->SrcAddr, - pRPort->PortCheck[j].CheckAddr.a)) { + pRPacket->SrcAddr, pRPort->PortCheck[j].CheckAddr.a)) { pRPort->PortCheck[j].SuspectTx = SK_FALSE; pRPort->PortsSuspect--; break; @@ -1309,7 +1149,6 @@ } /* Determine type of packet. */ - if (pRPacket->DSap == SK_RLMT_DSAP && pRPacket->Ctrl == SK_RLMT_CTRL && (pRPacket->SSap & ~LLC_COMMAND_RESPONSE_BIT) == SK_RLMT_SSAP && @@ -1322,7 +1161,6 @@ pRPacket->Indicator[6] == SK_RLMT_INDICATOR6) { /* It's an RLMT packet. */ - PacketType = (SK_U16)((pRPacket->RlmtPacketType[0] << 8) | pRPacket->RlmtPacketType[1]); @@ -1330,14 +1168,10 @@ case SK_PACKET_ANNOUNCE: /* Not yet used. */ #if 0 /* Build the check chain. */ - SkRlmtBuildCheckChain(pAC); #endif /* 0 */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_RX, + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, ("SkRlmtPacketReceive: Announce.\n")) SkDrvFreeRlmtMbuf(pAC, IoC, pMb); @@ -1345,221 +1179,145 @@ case SK_PACKET_ALIVE: if (pRPacket->SSap & LLC_COMMAND_RESPONSE_BIT) { - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_RX, + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, ("SkRlmtPacketReceive: Alive Reply.\n")) - /* Alive Reply Packet. */ - -#if 0 - pRPort->RlmtAcksPerTimeSlot++; -#endif /* 0 */ - - if (!(pAC->Addr.Port[PortIdx].PromMode & - SK_PROM_MODE_LLC) || + if (!(pAC->Addr.Port[PortNumber].PromMode & SK_PROM_MODE_LLC) || SK_ADDR_EQUAL( - pRPacket->DstAddr, - pAPort->CurrentMacAddress.a)) { - + pRPacket->DstAddr, pAPort->CurrentMacAddress.a)) { /* Obviously we could send something. */ - - if (pRPort->CheckingState & - SK_RLMT_PCS_TX) { - pRPort->CheckingState &= - ~SK_RLMT_PCS_TX; - SkTimerStop( - pAC, - IoC, - &pRPort->DownTxTimer); + if (pRPort->CheckingState & SK_RLMT_PCS_TX) { + pRPort->CheckingState &= ~SK_RLMT_PCS_TX; + SkTimerStop(pAC, IoC, &pRPort->DownTxTimer); } - if ((pRPort->PortState == - SK_RLMT_PS_DOWN) && - !(pRPort->CheckingState & - SK_RLMT_PCS_RX)) { - pRPort->PortState = - SK_RLMT_PS_GOING_UP; - pRPort->GuTimeStamp = - SkOsGetTime(pAC); - - SkTimerStop( - pAC, - IoC, - &pRPort->DownTxTimer); - - Para.Para32[0] = PortIdx; - SkTimerStart( - pAC, - IoC, - &pRPort->UpTimer, - SK_RLMT_PORTUP_TIM_VAL, - SKGE_RLMT, - SK_RLMT_PORTUP_TIM, - Para); + if ((pRPort->PortState == SK_RLMT_PS_DOWN) && + !(pRPort->CheckingState & SK_RLMT_PCS_RX)) { + pRPort->PortState = SK_RLMT_PS_GOING_UP; + pRPort->GuTimeStamp = SkOsGetTime(pAC); + + SkTimerStop(pAC, IoC, &pRPort->DownTxTimer); + + Para.Para32[0] = PortNumber; + Para.Para32[1] = (SK_U32)-1; + SkTimerStart(pAC, IoC, &pRPort->UpTimer, + SK_RLMT_PORTUP_TIM_VAL, SKGE_RLMT, + SK_RLMT_PORTUP_TIM, Para); } } /* Mark sending port as alive? */ - SkDrvFreeRlmtMbuf(pAC, IoC, pMb); } else { /* Alive Request Packet. */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_RX, + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, ("SkRlmtPacketReceive: Alive Request.\n")) pRPort->RxHelloCts++; -#if 0 - pRPort->RlmtChksPerTimeSlot++; -#endif /* 0 */ /* Answer. */ - for (i = 0; i < SK_MAC_ADDR_LEN; i++) { - pRPacket->DstAddr[i] = - pRPacket->SrcAddr[i]; - pRPacket->SrcAddr[i] = pAC->Addr.Port[ - PortIdx].CurrentMacAddress.a[i]; + pRPacket->DstAddr[i] = pRPacket->SrcAddr[i]; + pRPacket->SrcAddr[i] = + pAC->Addr.Port[PortNumber].CurrentMacAddress.a[i]; } pRPacket->SSap |= LLC_COMMAND_RESPONSE_BIT; Para.pParaPtr = pMb; - SkEventQueue( - pAC, - SKGE_DRV, - SK_DRV_RLMT_SEND, - Para); + SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para); } break; case SK_PACKET_CHECK_TX: - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_RX, + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, ("SkRlmtPacketReceive: Check your tx line.\n")) - /* - * A port checking us requests us to check our tx line. - */ - + /* A port checking us requests us to check our tx line. */ pRPort->CheckingState |= SK_RLMT_PCS_TX; /* Start PortDownTx timer. */ - - Para.Para32[0] = PortIdx; - SkTimerStart( - pAC, - IoC, - &pRPort->DownTxTimer, - SK_RLMT_PORTDOWN_TIM_VAL, - SKGE_RLMT, - SK_RLMT_PORTDOWN_TX_TIM, - Para); + Para.Para32[0] = PortNumber; + Para.Para32[1] = (SK_U32)-1; + SkTimerStart(pAC, IoC, &pRPort->DownTxTimer, + SK_RLMT_PORTDOWN_TIM_VAL, SKGE_RLMT, + SK_RLMT_PORTDOWN_TX_TIM, Para); SkDrvFreeRlmtMbuf(pAC, IoC, pMb); - if ((Para.pParaPtr = SkRlmtBuildPacket( - pAC, - IoC, - PortIdx, - SK_PACKET_ALIVE, - &pAC->Addr.Port[PortIdx].CurrentMacAddress, + if ((Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, PortNumber, + SK_PACKET_ALIVE, &pAC->Addr.Port[PortNumber].CurrentMacAddress, &SkRlmtMcAddr)) != NULL) { - SkEventQueue( - pAC, - SKGE_DRV, - SK_DRV_RLMT_SEND, - Para); + SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para); } break; case SK_PACKET_ADDR_CHANGED: - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_RX, + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, ("SkRlmtPacketReceive: Address Change.\n")) /* Build the check chain. */ - - SkRlmtBuildCheckChain(pAC); + SkRlmtBuildCheckChain(pAC, pRPort->Net->NetNumber); SkDrvFreeRlmtMbuf(pAC, IoC, pMb); break; default: - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_RX, + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, ("SkRlmtPacketReceive: Unknown RLMT packet.\n")) /* RA;:;: ??? */ - SkDrvFreeRlmtMbuf(pAC, IoC, pMb); } } else if (pSPacket->DSap == SK_RLMT_SPT_DSAP && pSPacket->Ctrl == SK_RLMT_SPT_CTRL && - (pSPacket->SSap & ~LLC_COMMAND_RESPONSE_BIT) == - SK_RLMT_SPT_SSAP) { - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_RX, + (pSPacket->SSap & ~LLC_COMMAND_RESPONSE_BIT) == SK_RLMT_SPT_SSAP) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, ("SkRlmtPacketReceive: BPDU Packet.\n")) /* Spanning Tree packet. */ - pRPort->RxSpHelloCts++; - if (!SK_ADDR_EQUAL( - &pSPacket->RootId[2], - &pAC->Addr.CurrentMacAddress.a[0])) { - + if (!SK_ADDR_EQUAL(&pSPacket->RootId[2], &pAC->Addr.Net[pAC->Rlmt. + Port[PortNumber].Net->NetNumber].CurrentMacAddress.a[0])) { /* * Check segmentation if a new root bridge is set and * the segmentation check is not currently running. */ - - if (!SK_ADDR_EQUAL( - &pSPacket->RootId[2], - &pRPort->Root.Id[2]) && - (pAC->Rlmt.LinksUp > 1) && - (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) && - !(pAC->Rlmt.CheckingState & SK_RLMT_RCS_SEG)) { - pAC->Rlmt.CheckingState |= - SK_RLMT_RCS_START_SEG | - SK_RLMT_RCS_SEND_SEG; + if (!SK_ADDR_EQUAL(&pSPacket->RootId[2], &pRPort->Root.Id[2]) && + (pAC->Rlmt.Port[PortNumber].Net->LinksUp > 1) && + (pAC->Rlmt.Port[PortNumber].Net->RlmtMode & SK_RLMT_CHECK_SEG) + != 0 && (pAC->Rlmt.Port[PortNumber].Net->CheckingState & + SK_RLMT_RCS_SEG) == 0) { + pAC->Rlmt.Port[PortNumber].Net->CheckingState |= + SK_RLMT_RCS_START_SEG | SK_RLMT_RCS_SEND_SEG; } /* Store tree view of this port. */ - for (i = 0; i < 8; i++) { pRPort->Root.Id[i] = pSPacket->RootId[i]; } pRPort->RootIdSet = SK_TRUE; + + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_DUMP, + ("Root ID %d: %02x %02x %02x %02x %02x %02x %02x %02x.\n", + PortNumber, + pRPort->Root.Id[0], pRPort->Root.Id[1], + pRPort->Root.Id[2], pRPort->Root.Id[3], + pRPort->Root.Id[4], pRPort->Root.Id[5], + pRPort->Root.Id[6], pRPort->Root.Id[7])) } SkDrvFreeRlmtMbuf(pAC, IoC, pMb); - - if (pAC->Rlmt.CheckingState & SK_RLMT_RCS_REPORT_SEG) { - SkRlmtCheckSeg(pAC, IoC); + if ((pAC->Rlmt.Port[PortNumber].Net->CheckingState & + SK_RLMT_RCS_REPORT_SEG) != 0) { + SkRlmtCheckSeg(pAC, IoC, pAC->Rlmt.Port[PortNumber].Net->NetNumber); } } else { - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_RX, + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, ("SkRlmtPacketReceive: Unknown Packet Type.\n")) /* Unknown packet. */ - SkDrvFreeRlmtMbuf(pAC, IoC, pMb); } return; @@ -1625,25 +1383,21 @@ * New timeout value. */ RLMT_STATIC SK_U32 SkRlmtCheckPort( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* I/O context */ -SK_U32 PortIdx) /* port to check */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_U32 PortNumber) /* Port to check */ { - unsigned i; - SK_U32 NewTimeout; + unsigned i; + SK_U32 NewTimeout; SK_RLMT_PORT *pRPort; - SK_EVPARA Para; + SK_EVPARA Para; - pRPort = &pAC->Rlmt.Port[PortIdx]; + pRPort = &pAC->Rlmt.Port[PortNumber]; if ((pRPort->PacketsPerTimeSlot - pRPort->BpduPacketsPerTimeSlot) == 0) { - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, ("SkRlmtCheckPort %d: No (%d) receives in last time slot.\n", - PortIdx, - pRPort->PacketsPerTimeSlot)) + PortNumber, pRPort->PacketsPerTimeSlot)) /* * Check segmentation if there was no receive at least twice @@ -1651,46 +1405,35 @@ * check is not currently running. */ - if (pRPort->PortNoRx && (pAC->Rlmt.LinksUp > 1) && - (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) && - !(pAC->Rlmt.CheckingState & SK_RLMT_RCS_SEG)) { - pAC->Rlmt.CheckingState |= + if (pRPort->PortNoRx && (pAC->Rlmt.Port[PortNumber].Net->LinksUp > 1) && + (pAC->Rlmt.Port[PortNumber].Net->RlmtMode & SK_RLMT_CHECK_SEG) && + !(pAC->Rlmt.Port[PortNumber].Net->CheckingState & SK_RLMT_RCS_SEG)) { + pAC->Rlmt.Port[PortNumber].Net->CheckingState |= SK_RLMT_RCS_START_SEG | SK_RLMT_RCS_SEND_SEG; } - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, ("SkRlmtCheckPort: PortsSuspect %d, PcsRx %d.\n", - pRPort->PortsSuspect, - pRPort->CheckingState & SK_RLMT_PCS_RX)) + pRPort->PortsSuspect, pRPort->CheckingState & SK_RLMT_PCS_RX)) if (pRPort->PortState != SK_RLMT_PS_DOWN) { - NewTimeout = TO_SHORTEN(pAC->Rlmt.TimeoutValue); + NewTimeout = TO_SHORTEN(pAC->Rlmt.Port[PortNumber].Net->TimeoutValue); if (NewTimeout < SK_RLMT_MIN_TO_VAL) { NewTimeout = SK_RLMT_MIN_TO_VAL; } if (!(pRPort->CheckingState & SK_RLMT_PCS_RX)) { - Para.Para32[0] = PortIdx; + Para.Para32[0] = PortNumber; pRPort->CheckingState |= SK_RLMT_PCS_RX; /* - * What shall we do if the port checked - * by this one receives our request - * frames? What's bad - our rx line - * or his tx line? + * What shall we do if the port checked by this one receives + * our request frames? What's bad - our rx line or his tx line? */ - - SkTimerStart( - pAC, - IoC, - &pRPort->DownRxTimer, - SK_RLMT_PORTDOWN_TIM_VAL, - SKGE_RLMT, - SK_RLMT_PORTDOWN_RX_TIM, - Para); + Para.Para32[1] = (SK_U32)-1; + SkTimerStart(pAC, IoC, &pRPort->DownRxTimer, + SK_RLMT_PORTDOWN_TIM_VAL, SKGE_RLMT, + SK_RLMT_PORTDOWN_RX_TIM, Para); for (i = 0; i < pRPort->PortsChecked; i++) { if (pRPort->PortCheck[i].SuspectTx) { @@ -1699,19 +1442,10 @@ pRPort->PortCheck[i].SuspectTx = SK_TRUE; pRPort->PortsSuspect++; if ((Para.pParaPtr = - SkRlmtBuildPacket( - pAC, - IoC, - PortIdx, - SK_PACKET_CHECK_TX, - &pAC->Addr.Port[PortIdx].CurrentMacAddress, - &pRPort->PortCheck[i].CheckAddr) - ) != NULL) { - SkEventQueue( - pAC, - SKGE_DRV, - SK_DRV_RLMT_SEND, - Para); + SkRlmtBuildPacket(pAC, IoC, PortNumber, SK_PACKET_CHECK_TX, + &pAC->Addr.Port[PortNumber].CurrentMacAddress, + &pRPort->PortCheck[i].CheckAddr)) != NULL) { + SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para); } } } @@ -1722,17 +1456,17 @@ pRPort->PortNoRx = SK_TRUE; } else { /* A non-BPDU packet was received. */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, ("SkRlmtCheckPort %d: %d (%d) receives in last time slot.\n", - PortIdx, - pRPort->PacketsPerTimeSlot - - pRPort->BpduPacketsPerTimeSlot, + PortNumber, + pRPort->PacketsPerTimeSlot - pRPort->BpduPacketsPerTimeSlot, pRPort->PacketsPerTimeSlot)) - SkRlmtPortReceives(pAC, IoC, PortIdx); + SkRlmtPortReceives(pAC, IoC, PortNumber); + if (pAC->Rlmt.CheckSwitch) { + SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); + } + NewTimeout = SK_RLMT_DEF_TO_VAL; } @@ -1755,82 +1489,69 @@ * SK_BOOL */ RLMT_STATIC SK_BOOL SkRlmtSelectBcRx( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* I/O context */ -SK_U32 A, /* active port */ -SK_U32 P, /* preferred port */ -SK_U32 *N) /* new active port */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_U32 Active, /* Active port */ +SK_U32 PrefPort, /* Preferred port */ +SK_U32 *pSelect) /* New active port */ { SK_U64 BcTimeStamp; SK_U32 i; SK_BOOL PortFound; - BcTimeStamp = 0; /* Not totally necessary, but feeling better. */ + BcTimeStamp = 0; /* Not totally necessary, but feeling better. */ PortFound = SK_FALSE; /* Select port with the latest TimeStamp. */ - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("TimeStamp Port %d: %.08x%.08x.\n", - i, - *((SK_U32*)(&pAC->Rlmt.Port[i].BcTimeStamp) + OFFS_HI32), - *((SK_U32*)(&pAC->Rlmt.Port[i].BcTimeStamp) + OFFS_LO32))) - if (!pAC->Rlmt.Port[i].PortDown && - !pAC->Rlmt.Port[i].PortNoRx) { - if (!PortFound || - pAC->Rlmt.Port[i].BcTimeStamp > BcTimeStamp) { +#ifdef xDEBUG + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("TimeStamp Port %d: %08x %08x.\n", + i, + *((SK_U32*)(&pAC->Rlmt.Port[i].BcTimeStamp) + OFFS_HI32), + *((SK_U32*)(&pAC->Rlmt.Port[i].BcTimeStamp) + OFFS_LO32))) +#endif /* DEBUG */ + if (!pAC->Rlmt.Port[i].PortDown && !pAC->Rlmt.Port[i].PortNoRx) { + if (!PortFound || pAC->Rlmt.Port[i].BcTimeStamp > BcTimeStamp) { BcTimeStamp = pAC->Rlmt.Port[i].BcTimeStamp; - *N = i; + *pSelect = i; PortFound = SK_TRUE; } } } if (PortFound) { - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("Port %d received the last broadcast.\n", *N)) +#if 0 + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Port %d received the last broadcast.\n", *pSelect)) +#endif /* 0 */ /* Look if another port's time stamp is similar. */ - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { - if (i == *N) { + if (i == *pSelect) { continue; } - if (!pAC->Rlmt.Port[i].PortDown && - !pAC->Rlmt.Port[i].PortNoRx && + if (!pAC->Rlmt.Port[i].PortDown && !pAC->Rlmt.Port[i].PortNoRx && (pAC->Rlmt.Port[i].BcTimeStamp > - BcTimeStamp - SK_RLMT_BC_DELTA || - pAC->Rlmt.Port[i].BcTimeStamp - + SK_RLMT_BC_DELTA > BcTimeStamp)) { + BcTimeStamp - SK_RLMT_BC_DELTA || + pAC->Rlmt.Port[i].BcTimeStamp + + SK_RLMT_BC_DELTA > BcTimeStamp)) { PortFound = SK_FALSE; - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("Port %d received a broadcast %s.\n", - i, - "at a similar time")) +#ifdef xDEBUG + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Port %d received a broadcast at a similar time.\n", i)) +#endif /* DEBUG */ break; } } } -#ifdef DEBUG +#ifdef xDEBUG if (PortFound) { - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_CHECK_SWITCH found Port %d receiving %s.\n", - *N, - "the substantially latest broadcast")) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_CHECK_SWITCH found Port %d receiving the substantially latest broadcast (%d).\n", + *pSelect, + BcTimeStamp - pAC->Rlmt.Port[1 - *pSelect].BcTimeStamp)) } #endif /* DEBUG */ @@ -1852,11 +1573,11 @@ * SK_BOOL */ RLMT_STATIC SK_BOOL SkRlmtSelectNotSuspect( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* I/O context */ -SK_U32 A, /* active port */ -SK_U32 P, /* preferred port */ -SK_U32 *N) /* new active port */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_U32 Active, /* Active port */ +SK_U32 PrefPort, /* Preferred port */ +SK_U32 *pSelect) /* New active port */ { SK_U32 i; SK_BOOL PortFound; @@ -1864,32 +1585,25 @@ PortFound = SK_FALSE; /* Select first port that is PortUp && !SuspectRx. */ - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { if (!pAC->Rlmt.Port[i].PortDown && !(pAC->Rlmt.Port[i].CheckingState & SK_RLMT_PCS_RX)) { - *N = i; - if (!pAC->Rlmt.Port[A].PortDown && - !(pAC->Rlmt.Port[A].CheckingState & - SK_RLMT_PCS_RX)) { - *N = A; - } - if (!pAC->Rlmt.Port[P].PortDown && - !(pAC->Rlmt.Port[P].CheckingState & - SK_RLMT_PCS_RX)) { - *N = P; + *pSelect = i; + if (!pAC->Rlmt.Port[Active].PortDown && + !(pAC->Rlmt.Port[Active].CheckingState & SK_RLMT_PCS_RX)) { + *pSelect = Active; + } + if (!pAC->Rlmt.Port[PrefPort].PortDown && + !(pAC->Rlmt.Port[PrefPort].CheckingState & SK_RLMT_PCS_RX)) { + *pSelect = PrefPort; } PortFound = SK_TRUE; - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, ("SK_RLMT_CHECK_SWITCH found Port %d up and not check RX.\n", - *N)) + *pSelect)) break; } } - return (PortFound); } /* SkRlmtSelectNotSuspect */ @@ -1908,12 +1622,12 @@ * SK_BOOL */ RLMT_STATIC SK_BOOL SkRlmtSelectUp( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* I/O context */ -SK_U32 A, /* active port */ -SK_U32 P, /* preferred port */ -SK_U32 *N, /* new active port */ -SK_BOOL AutoNegDone) /* successfully auto-negotiated? */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_U32 Active, /* Active port */ +SK_U32 PrefPort, /* Preferred port */ +SK_U32 *pSelect, /* New active port */ +SK_BOOL AutoNegDone) /* Successfully auto-negotiated? */ { SK_U32 i; SK_BOOL PortFound; @@ -1921,30 +1635,24 @@ PortFound = SK_FALSE; /* Select first port that is PortUp. */ - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { if (pAC->Rlmt.Port[i].PortState == SK_RLMT_PS_UP && pAC->GIni.GP[i].PAutoNegFail != AutoNegDone) { - *N = i; - if (pAC->Rlmt.Port[A].PortState == SK_RLMT_PS_UP && - pAC->GIni.GP[A].PAutoNegFail != AutoNegDone) { - *N = A; - } - if (pAC->Rlmt.Port[P].PortState == SK_RLMT_PS_UP && - pAC->GIni.GP[P].PAutoNegFail != AutoNegDone) { - *N = P; + *pSelect = i; + if (pAC->Rlmt.Port[Active].PortState == SK_RLMT_PS_UP && + pAC->GIni.GP[Active].PAutoNegFail != AutoNegDone) { + *pSelect = Active; + } + if (pAC->Rlmt.Port[PrefPort].PortState == SK_RLMT_PS_UP && + pAC->GIni.GP[PrefPort].PAutoNegFail != AutoNegDone) { + *pSelect = PrefPort; } PortFound = SK_TRUE; - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_CHECK_SWITCH found Port %d up.\n", - *N)) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_CHECK_SWITCH found Port %d up.\n", *pSelect)) break; } } - return (PortFound); } /* SkRlmtSelectUp */ @@ -1963,26 +1671,26 @@ * SK_BOOL */ RLMT_STATIC SK_BOOL SkRlmtSelectGoingUp( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* I/O context */ -SK_U32 A, /* active port */ -SK_U32 P, /* preferred port */ -SK_U32 *N, /* new active port */ -SK_BOOL AutoNegDone) /* successfully auto-negotiated? */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_U32 Active, /* Active port */ +SK_U32 PrefPort, /* Preferred port */ +SK_U32 *pSelect, /* New active port */ +SK_BOOL AutoNegDone) /* Successfully auto-negotiated? */ { - SK_U64 GuTimeStamp=0; + SK_U64 GuTimeStamp; SK_U32 i; SK_BOOL PortFound; + GuTimeStamp = 0; PortFound = SK_FALSE; /* Select port that is PortGoingUp for the longest time. */ - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { if (pAC->Rlmt.Port[i].PortState == SK_RLMT_PS_GOING_UP && pAC->GIni.GP[i].PAutoNegFail != AutoNegDone) { - GuTimeStamp = pAC->Rlmt.Port[i].GuTimeStamp; - *N = i; + GuTimeStamp = pAC->Rlmt.Port[i].GuTimeStamp; + *pSelect = i; PortFound = SK_TRUE; break; } @@ -1992,22 +1700,17 @@ return (SK_FALSE); } - for (i = *N + 1; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { + for (i = *pSelect + 1; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { if (pAC->Rlmt.Port[i].PortState == SK_RLMT_PS_GOING_UP && - pAC->Rlmt.Port[i].GuTimeStamp < GuTimeStamp && + pAC->Rlmt.Port[i].GuTimeStamp < GuTimeStamp && pAC->GIni.GP[i].PAutoNegFail != AutoNegDone) { - - GuTimeStamp = pAC->Rlmt.Port[i].GuTimeStamp; - *N = i; + GuTimeStamp = pAC->Rlmt.Port[i].GuTimeStamp; + *pSelect = i; } } - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_CHECK_SWITCH found Port %d going up.\n", *N)) - + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_CHECK_SWITCH found Port %d going up.\n", *pSelect)) return (SK_TRUE); } /* SkRlmtSelectGoingUp */ @@ -2026,12 +1729,12 @@ * SK_BOOL */ RLMT_STATIC SK_BOOL SkRlmtSelectDown( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* I/O context */ -SK_U32 A, /* active port */ -SK_U32 P, /* preferred port */ -SK_U32 *N, /* new active port */ -SK_BOOL AutoNegDone) /* successfully auto-negotiated? */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_U32 Active, /* Active port */ +SK_U32 PrefPort, /* Preferred port */ +SK_U32 *pSelect, /* New active port */ +SK_BOOL AutoNegDone) /* Successfully auto-negotiated? */ { SK_U32 i; SK_BOOL PortFound; @@ -2039,30 +1742,24 @@ PortFound = SK_FALSE; /* Select first port that is PortDown. */ - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { if (pAC->Rlmt.Port[i].PortState == SK_RLMT_PS_DOWN && pAC->GIni.GP[i].PAutoNegFail != AutoNegDone) { - *N = i; - if (pAC->Rlmt.Port[A].PortState == SK_RLMT_PS_DOWN && - pAC->GIni.GP[A].PAutoNegFail != AutoNegDone) { - *N = A; - } - if (pAC->Rlmt.Port[P].PortState == SK_RLMT_PS_DOWN && - pAC->GIni.GP[P].PAutoNegFail != AutoNegDone) { - *N = P; + *pSelect = i; + if (pAC->Rlmt.Port[Active].PortState == SK_RLMT_PS_DOWN && + pAC->GIni.GP[Active].PAutoNegFail != AutoNegDone) { + *pSelect = Active; + } + if (pAC->Rlmt.Port[PrefPort].PortState == SK_RLMT_PS_DOWN && + pAC->GIni.GP[PrefPort].PAutoNegFail != AutoNegDone) { + *pSelect = PrefPort; } PortFound = SK_TRUE; - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_CHECK_SWITCH found Port %d down.\n", - *N)) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_CHECK_SWITCH found Port %d down.\n", *pSelect)) break; } } - return (PortFound); } /* SkRlmtSelectDown */ @@ -2082,58 +1779,50 @@ * Nothing. */ RLMT_STATIC void SkRlmtCheckSwitch( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC) /* I/O context */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_U32 NetIdx) /* Net index */ { SK_EVPARA Para; - SK_U32 A; - SK_U32 P; + SK_U32 Active; + SK_U32 PrefPort; SK_U32 i; SK_BOOL PortFound; - if (pAC->Rlmt.RlmtState == SK_RLMT_RS_INIT) { - return; - } - - A = pAC->Rlmt.MacActive; /* Index of active port. */ - P = pAC->Rlmt.PrefPort; /* Index of preferred port. */ + Active = pAC->Rlmt.Net[NetIdx].ActivePort; /* Index of active port. */ + PrefPort = pAC->Rlmt.Net[NetIdx].PrefPort; /* Index of preferred port. */ PortFound = SK_FALSE; + pAC->Rlmt.CheckSwitch = SK_FALSE; - if (pAC->Rlmt.LinksUp == 0) { - - /* - * Last link went down - shut down the net. - */ - - pAC->Rlmt.RlmtState = SK_RLMT_RS_NET_DOWN; + if (pAC->Rlmt.Net[NetIdx].LinksUp == 0) { + /* Last link went down - shut down the net. */ + pAC->Rlmt.Net[NetIdx].RlmtState = SK_RLMT_RS_NET_DOWN; Para.Para32[0] = SK_RLMT_NET_DOWN_TEMP; - SkEventQueue( - pAC, - SKGE_DRV, - SK_DRV_NET_DOWN, - Para); + Para.Para32[1] = NetIdx; + SkEventQueue(pAC, SKGE_DRV, SK_DRV_NET_DOWN, Para); + Para.Para32[0] = pAC->Rlmt.Net[NetIdx]. + Port[pAC->Rlmt.Net[NetIdx].ActivePort]->PortNumber; + Para.Para32[1] = NetIdx; + SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_ACTIVE_DOWN, Para); return; - } - else if (pAC->Rlmt.LinksUp == 1 && - pAC->Rlmt.RlmtState == SK_RLMT_RS_NET_DOWN) { - + } /* pAC->Rlmt.LinksUp == 0 */ + else if (pAC->Rlmt.Net[NetIdx].LinksUp == 1 && + pAC->Rlmt.Net[NetIdx].RlmtState == SK_RLMT_RS_NET_DOWN) { /* First link came up - get the net up. */ - - pAC->Rlmt.RlmtState = SK_RLMT_RS_NET_UP; + pAC->Rlmt.Net[NetIdx].RlmtState = SK_RLMT_RS_NET_UP; /* - * If pAC->Rlmt.MacActive != Para.Para32[0], + * If pAC->Rlmt.ActivePort != Para.Para32[0], * the DRV switches to the port that came up. */ - - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { - if (!pAC->Rlmt.Port[i].LinkDown) { - if (!pAC->Rlmt.Port[A].LinkDown) { - i = A; + for (i = 0; i < pAC->Rlmt.Net[NetIdx].NumPorts; i++) { + if (!pAC->Rlmt.Net[NetIdx].Port[i]->LinkDown) { + if (!pAC->Rlmt.Net[NetIdx].Port[Active]->LinkDown) { + i = Active; } - if (!pAC->Rlmt.Port[P].LinkDown) { - i = P; + if (!pAC->Rlmt.Net[NetIdx].Port[PrefPort]->LinkDown) { + i = PrefPort; } PortFound = SK_TRUE; break; @@ -2141,184 +1830,143 @@ } if (PortFound) { - Para.Para32[0] = pAC->Rlmt.MacActive; - Para.Para32[1] = i; - SkEventQueue( - pAC, - SKGE_PNMI, - SK_PNMI_EVT_RLMT_PORT_SWITCH, - Para); - - pAC->Rlmt.MacActive = i; - Para.Para32[0] = i; + Para.Para32[0] = pAC->Rlmt.Net[NetIdx].Port[i]->PortNumber; + Para.Para32[1] = NetIdx; + SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_ACTIVE_UP, Para); + + pAC->Rlmt.Net[NetIdx].ActivePort = i; + Para.Para32[0] = pAC->Rlmt.Net[NetIdx].Port[i]->PortNumber; + Para.Para32[1] = NetIdx; SkEventQueue(pAC, SKGE_DRV, SK_DRV_NET_UP, Para); - if ((Para.pParaPtr = SkRlmtBuildPacket( - pAC, - IoC, - i, - SK_PACKET_ANNOUNCE, - &pAC->Addr.CurrentMacAddress, - &SkRlmtMcAddr) - ) != NULL) { - + if ((pAC->Rlmt.Net[NetIdx].RlmtMode & SK_RLMT_TRANSPARENT) == 0 && + (Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, + pAC->Rlmt.Net[NetIdx].Port[i]->PortNumber, + SK_PACKET_ANNOUNCE, &pAC->Addr.Net[NetIdx]. + CurrentMacAddress, &SkRlmtMcAddr)) != NULL) { /* - * Send packet to RLMT multicast address - * to force switches to learn the new - * location of the address. + * Send announce packet to RLMT multicast address to force + * switches to learn the new location of the logical MAC address. */ - - SkEventQueue( - pAC, - SKGE_DRV, - SK_DRV_RLMT_SEND, - Para); + SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para); } } else { - SK_ERR_LOG( - pAC, - SK_ERRCL_SW, - SKERR_RLMT_E007, - SKERR_RLMT_E007_MSG); + SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E007, SKERR_RLMT_E007_MSG); } return; - } - else { - Para.Para32[0] = A; + } /* LinksUp == 1 && RlmtState == SK_RLMT_RS_NET_DOWN */ + else { /* Cannot be reached in dual-net mode. */ + Para.Para32[0] = Active; /* * Preselection: - * If RLMT Mode != CheckLinkState - * select port that received a broadcast frame - * substantially later than all other ports - * else select first port that is not SuspectRx - * else select first port that is PortUp - * else select port that is PortGoingUp for the longest time - * else select first port that is PortDown - * else stop. + * If RLMT Mode != CheckLinkState + * select port that received a broadcast frame substantially later + * than all other ports + * else select first port that is not SuspectRx + * else select first port that is PortUp + * else select port that is PortGoingUp for the longest time + * else select first port that is PortDown + * else stop. * * For the preselected port: - * If ActivePort is equal in quality, select ActivePort. + * If ActivePort is equal in quality, select ActivePort. * - * If PrefPort is equal in quality, select PrefPort. + * If PrefPort is equal in quality, select PrefPort. * - * If MacActive != SelectedPort, - * If old ActivePort is LinkDown, - * SwitchHard - * else - * SwitchSoft + * If ActivePort != SelectedPort, + * If old ActivePort is LinkDown, + * SwitchHard + * else + * SwitchSoft */ - - if (pAC->Rlmt.RlmtMode != SK_RLMT_CHECK_LINK) { + if (pAC->Rlmt.Net[0].RlmtMode != SK_RLMT_MODE_CLS) { if (!PortFound) { - PortFound = SkRlmtSelectBcRx(pAC, IoC, - A, P, &Para.Para32[1]); + PortFound = SkRlmtSelectBcRx( + pAC, IoC, Active, PrefPort, &Para.Para32[1]); } if (!PortFound) { - PortFound = SkRlmtSelectNotSuspect(pAC, IoC, - A, P, &Para.Para32[1]); + PortFound = SkRlmtSelectNotSuspect( + pAC, IoC, Active, PrefPort, &Para.Para32[1]); } - } + } /* pAC->Rlmt.RlmtMode != SK_RLMT_MODE_CLS */ if (!PortFound) { - PortFound = SkRlmtSelectUp(pAC, IoC, - A, P, &Para.Para32[1], AUTONEG_SUCCESS); + PortFound = SkRlmtSelectUp( + pAC, IoC, Active, PrefPort, &Para.Para32[1], AUTONEG_SUCCESS); } if (!PortFound) { - PortFound = SkRlmtSelectUp(pAC, IoC, - A, P, &Para.Para32[1], AUTONEG_FAILED); + PortFound = SkRlmtSelectUp( + pAC, IoC, Active, PrefPort, &Para.Para32[1], AUTONEG_FAILED); } if (!PortFound) { - PortFound = SkRlmtSelectGoingUp(pAC, IoC, - A, P, &Para.Para32[1], AUTONEG_SUCCESS); + PortFound = SkRlmtSelectGoingUp( + pAC, IoC, Active, PrefPort, &Para.Para32[1], AUTONEG_SUCCESS); } if (!PortFound) { - PortFound = SkRlmtSelectGoingUp(pAC, IoC, - A, P,&Para.Para32[1], AUTONEG_FAILED); + PortFound = SkRlmtSelectGoingUp( + pAC, IoC, Active, PrefPort, &Para.Para32[1], AUTONEG_FAILED); } - if (pAC->Rlmt.RlmtMode != SK_RLMT_CHECK_LINK) { + if (pAC->Rlmt.Net[0].RlmtMode != SK_RLMT_MODE_CLS) { if (!PortFound) { PortFound = SkRlmtSelectDown(pAC, IoC, - A, P,&Para.Para32[1], AUTONEG_SUCCESS); + Active, PrefPort, &Para.Para32[1], AUTONEG_SUCCESS); } if (!PortFound) { PortFound = SkRlmtSelectDown(pAC, IoC, - A, P,&Para.Para32[1], AUTONEG_FAILED); + Active, PrefPort, &Para.Para32[1], AUTONEG_FAILED); } - } + } /* pAC->Rlmt.RlmtMode != SK_RLMT_MODE_CLS */ if (PortFound) { - if (Para.Para32[1] != A) { - pAC->Rlmt.MacActive = Para.Para32[1]; - SK_HWAC_LINK_LED( - pAC, - IoC, - Para.Para32[1], - SK_LED_ACTIVE); - if (pAC->Rlmt.Port[A].LinkDown) { - SkEventQueue( - pAC, - SKGE_DRV, - SK_DRV_SWITCH_HARD, - Para); + if (Para.Para32[1] != Active) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Active: %d, Para1: %d.\n", Active, Para.Para32[1])) + pAC->Rlmt.Net[NetIdx].ActivePort = Para.Para32[1]; + Para.Para32[0] = pAC->Rlmt.Net[NetIdx]. + Port[Para.Para32[0]]->PortNumber; + Para.Para32[1] = pAC->Rlmt.Net[NetIdx]. + Port[Para.Para32[1]]->PortNumber; + SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[1], SK_LED_ACTIVE); + if (pAC->Rlmt.Port[Active].LinkDown) { + SkEventQueue(pAC, SKGE_DRV, SK_DRV_SWITCH_HARD, Para); } else { - SK_HWAC_LINK_LED( - pAC, - IoC, - Para.Para32[0], - SK_LED_STANDBY); - SkEventQueue( - pAC, - SKGE_DRV, - SK_DRV_SWITCH_SOFT, - Para); + SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[0], SK_LED_STANDBY); + SkEventQueue(pAC, SKGE_DRV, SK_DRV_SWITCH_SOFT, Para); } - SkEventQueue( - pAC, - SKGE_PNMI, - SK_PNMI_EVT_RLMT_PORT_SWITCH, - Para); - if ((Para.pParaPtr = SkRlmtBuildPacket( - pAC, - IoC, - Para.Para32[1], - SK_PACKET_ANNOUNCE, - &pAC->Addr.CurrentMacAddress, - &SkRlmtMcAddr) - ) != NULL) { - + Para.Para32[1] = NetIdx; + Para.Para32[0] = + pAC->Rlmt.Net[NetIdx].Port[Para.Para32[0]]->PortNumber; + SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_ACTIVE_DOWN, Para); + Para.Para32[0] = pAC->Rlmt.Net[NetIdx]. + Port[pAC->Rlmt.Net[NetIdx].ActivePort]->PortNumber; + SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_ACTIVE_UP, Para); + if ((pAC->Rlmt.Net[NetIdx].RlmtMode & SK_RLMT_TRANSPARENT) == 0 && + (Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, Para.Para32[0], + SK_PACKET_ANNOUNCE, &pAC->Addr.Net[NetIdx].CurrentMacAddress, + &SkRlmtMcAddr)) != NULL) { /* - * Send "new" packet to RLMT multicast - * address to force switches to learn - * the new location of the MAC address. + * Send announce packet to RLMT multicast address to force + * switches to learn the new location of the logical + * MAC address. */ - - SkEventQueue( - pAC, - SKGE_DRV, - SK_DRV_RLMT_SEND, - Para); - } - } - } + SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para); + } /* (Para.pParaPtr = SkRlmtBuildPacket(...)) != NULL */ + } /* Para.Para32[1] != Active */ + } /* PortFound */ else { - SK_ERR_LOG( - pAC, - SK_ERRCL_SW, - SKERR_RLMT_E004, - SKERR_RLMT_E004_MSG); + SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E004, SKERR_RLMT_E004_MSG); } - } - + } /* LinksUp > 1 || LinksUp == 1 && RlmtState != SK_RLMT_RS_NET_DOWN */ return; } /* SkRlmtCheckSwitch */ @@ -2338,66 +1986,65 @@ * Nothing. */ RLMT_STATIC void SkRlmtCheckSeg( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC) /* I/O context */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_U32 NetIdx) /* Net number */ { - SK_BOOL Equal; - SK_U32 i, j; + SK_EVPARA Para; + SK_RLMT_NET *pNet; + SK_U32 i, j; + SK_BOOL Equal; - pAC->Rlmt.RootIdSet = SK_FALSE; + pNet = &pAC->Rlmt.Net[NetIdx]; + pNet->RootIdSet = SK_FALSE; Equal = SK_TRUE; - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { - if (pAC->Rlmt.Port[i].LinkDown || - !pAC->Rlmt.Port[i].RootIdSet) { + + for (i = 0; i < pNet->NumPorts; i++) { + if (pNet->Port[i]->LinkDown || !pNet->Port[i]->RootIdSet) { continue; } - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("Root ID %d: %02x %02x %02x %02x %02x %02x %02x %02x.\n", - i, - pAC->Rlmt.Port[i].Root.Id[0], - pAC->Rlmt.Port[i].Root.Id[1], - pAC->Rlmt.Port[i].Root.Id[2], - pAC->Rlmt.Port[i].Root.Id[3], - pAC->Rlmt.Port[i].Root.Id[4], - pAC->Rlmt.Port[i].Root.Id[5], - pAC->Rlmt.Port[i].Root.Id[6], - pAC->Rlmt.Port[i].Root.Id[7])) - - if (!pAC->Rlmt.RootIdSet) { - pAC->Rlmt.Root = pAC->Rlmt.Port[i].Root; - pAC->Rlmt.RootIdSet = SK_TRUE; + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_DUMP, + ("Root ID %d: %02x %02x %02x %02x %02x %02x %02x %02x.\n", i, + pNet->Port[i]->Root.Id[0], pNet->Port[i]->Root.Id[1], + pNet->Port[i]->Root.Id[2], pNet->Port[i]->Root.Id[3], + pNet->Port[i]->Root.Id[4], pNet->Port[i]->Root.Id[5], + pNet->Port[i]->Root.Id[6], pNet->Port[i]->Root.Id[7])) + + if (!pNet->RootIdSet) { + pNet->Root = pNet->Port[i]->Root; + pNet->RootIdSet = SK_TRUE; continue; } for (j = 0; j < 8; j ++) { - Equal &= pAC->Rlmt.Port[i].Root.Id[j] == - pAC->Rlmt.Root.Id[j]; + Equal &= pNet->Port[i]->Root.Id[j] == pNet->Root.Id[j]; if (!Equal) { break; } } if (!Equal) { - SK_ERR_LOG( - pAC, - SK_ERRCL_COMM, - SKERR_RLMT_E005, - SKERR_RLMT_E005_MSG); -#ifdef SK_PNMI_EVT_SEGMENTATION - SkEventQueue( - pAC, - SKGE_PNMI, - SK_PNMI_EVT_SEGMENTATION, - Para); -#endif /* SK_PNMI_EVT_SEGMENTATION */ - pAC->Rlmt.CheckingState &= ~SK_RLMT_RCS_REPORT_SEG; + SK_ERR_LOG(pAC, SK_ERRCL_COMM, SKERR_RLMT_E005, SKERR_RLMT_E005_MSG); + Para.Para32[0] = NetIdx; + Para.Para32[1] = (SK_U32)-1; + SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_SEGMENTATION, Para); + + pNet->CheckingState &= ~SK_RLMT_RCS_REPORT_SEG; + + /* 2000-03-06 RA: New. */ + Para.Para32[0] = NetIdx; + Para.Para32[1] = (SK_U32)-1; + SkTimerStart(pAC, IoC, &pNet->SegTimer, SK_RLMT_SEG_TO_VAL, + SKGE_RLMT, SK_RLMT_SEG_TIM, Para); break; } - } + } /* for (i = 0; i < pNet->NumPorts; i++) */ + + /* 2000-03-06 RA: Moved here. */ + /* Segmentation check not running anymore. */ + pNet->CheckingState &= ~SK_RLMT_RCS_SEG; + } /* SkRlmtCheckSeg */ @@ -2417,1005 +2064,1340 @@ * Nothing */ RLMT_STATIC void SkRlmtPortStart( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* I/O context */ -SK_U32 PortIdx) /* event code */ +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_U32 PortNumber) /* Port number */ { SK_EVPARA Para; - pAC->Rlmt.Port[PortIdx].PortState = SK_RLMT_PS_LINK_DOWN; - pAC->Rlmt.Port[PortIdx].PortStarted = SK_TRUE; - pAC->Rlmt.Port[PortIdx].LinkDown = SK_TRUE; - pAC->Rlmt.Port[PortIdx].PortDown = SK_TRUE; - pAC->Rlmt.Port[PortIdx].CheckingState = 0; - pAC->Rlmt.Port[PortIdx].RootIdSet = SK_FALSE; - Para.Para32[0] = PortIdx; + pAC->Rlmt.Port[PortNumber].PortState = SK_RLMT_PS_LINK_DOWN; + pAC->Rlmt.Port[PortNumber].PortStarted = SK_TRUE; + pAC->Rlmt.Port[PortNumber].LinkDown = SK_TRUE; + pAC->Rlmt.Port[PortNumber].PortDown = SK_TRUE; + pAC->Rlmt.Port[PortNumber].CheckingState = 0; + pAC->Rlmt.Port[PortNumber].RootIdSet = SK_FALSE; + Para.Para32[0] = PortNumber; + Para.Para32[1] = (SK_U32)-1; SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_START, Para); } /* SkRlmtPortStart */ /****************************************************************************** * - * SkRlmtEvent - a PORT- or an RLMT-specific event happened + * SkRlmtEvtPortStartTim - PORT_START_TIM * * Description: - * This routine handles PORT- and RLMT-specific events. + * This routine handles PORT_START_TIM events. * * Context: * runtime, pageable? * may be called after SK_INIT_IO * * Returns: - * 0 + * Nothing */ -int SkRlmtEvent( -SK_AC *pAC, /* adapter context */ -SK_IOC IoC, /* I/O context */ -SK_U32 Event, /* event code */ -SK_EVPARA Para) /* event-specific parameter */ +RLMT_STATIC void SkRlmtEvtPortStartTim( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 -1 */ { - SK_U32 i, j; - SK_RLMT_PORT *pRPort; - SK_EVPARA Para2; - SK_MBUF *pMb; - SK_MBUF *pNextMb; - SK_MAC_ADDR *pOldMacAddr; - SK_MAC_ADDR *pNewMacAddr; - SK_U32 Timeout; - SK_U32 NewTimeout; - SK_U32 PrevRlmtMode; - - switch (Event) { - case SK_RLMT_PORTSTART_TIM: /* From RLMT via TIME. */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_PORTSTART_TIMEOUT Port %d Event (%d) BEGIN.\n", Para.Para32[0], Event)) - - /* - * Used to start non-preferred ports if the preferred one - * does not come up. - * This timeout needs only be set when starting the first - * (preferred) port. - */ + SK_U32 i; - if (pAC->Rlmt.Port[Para.Para32[0]].LinkDown) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PORTSTART_TIMEOUT Port %d Event BEGIN.\n", Para.Para32[0])) - /* PORT_START failed. */ + if (Para.Para32[1] != (SK_U32)-1) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad Parameter.\n")) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PORTSTART_TIMEOUT Event EMPTY.\n")) + return; + } - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { - if (!pAC->Rlmt.Port[i].PortStarted) { - SkRlmtPortStart(pAC, IoC, i); - } + /* + * Used to start non-preferred ports if the preferred one + * does not come up. + * This timeout needs only be set when starting the first + * (preferred) port. + */ + if (pAC->Rlmt.Port[Para.Para32[0]].LinkDown) { + /* PORT_START failed. */ + for (i = 0; i < pAC->Rlmt.Port[Para.Para32[0]].Net->NumPorts; i++) { + if (!pAC->Rlmt.Port[Para.Para32[0]].Net->Port[i]->PortStarted) { + SkRlmtPortStart(pAC, IoC, + pAC->Rlmt.Port[Para.Para32[0]].Net->Port[i]->PortNumber); } } + } - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_PORTSTART_TIMEOUT Event (%d) END.\n", Event)) - break; + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PORTSTART_TIMEOUT Event END.\n")) +} /* SkRlmtEvtPortStartTim */ - case SK_RLMT_LINK_UP: /* From SIRQ. */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_LINK_UP Port %d Event (%d) BEGIN.\n", - Para.Para32[0], Event)) - - pRPort = &pAC->Rlmt.Port[Para.Para32[0]]; - - if (!pRPort->PortStarted) { - SK_ERR_LOG( - pAC, - SK_ERRCL_SW, - SKERR_RLMT_E008, - SKERR_RLMT_E008_MSG); - - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_LINK_UP Event (%d) EMPTY.\n", Event)) - break; - } - if (!pRPort->LinkDown) { - /* RA;:;: Any better solution? */ +/****************************************************************************** + * + * SkRlmtEvtLinkUp - LINK_UP + * + * Description: + * This routine handles LLINK_UP events. + * + * Context: + * runtime, pageable? + * may be called after SK_INIT_IO + * + * Returns: + * Nothing + */ +RLMT_STATIC void SkRlmtEvtLinkUp( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 Undefined */ +{ + SK_U32 i; + SK_RLMT_PORT *pRPort; + SK_EVPARA Para2; - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_LINK_UP Event (%d) EMPTY.\n", Event)) - break; - } + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_LINK_UP Port %d Event BEGIN.\n", Para.Para32[0])) - SkTimerStop(pAC, IoC, &pRPort->UpTimer); - SkTimerStop(pAC, IoC, &pRPort->DownRxTimer); - SkTimerStop(pAC, IoC, &pRPort->DownTxTimer); + pRPort = &pAC->Rlmt.Port[Para.Para32[0]]; + if (!pRPort->PortStarted) { + SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E008, SKERR_RLMT_E008_MSG); - /* Do something if timer already fired? */ + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_LINK_UP Event EMPTY.\n")) + return; + } - pRPort->LinkDown = SK_FALSE; - pRPort->PortState = SK_RLMT_PS_GOING_UP; - pRPort->GuTimeStamp = SkOsGetTime(pAC); - pRPort->BcTimeStamp = 0; - if (pAC->Rlmt.LinksUp == 0) { - SK_HWAC_LINK_LED( - pAC, - IoC, - Para.Para32[0], - SK_LED_ACTIVE); - } - else { - SK_HWAC_LINK_LED( - pAC, - IoC, - Para.Para32[0], - SK_LED_STANDBY); + if (!pRPort->LinkDown) { + /* RA;:;: Any better solution? */ + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_LINK_UP Event EMPTY.\n")) + return; + } + + SkTimerStop(pAC, IoC, &pRPort->UpTimer); + SkTimerStop(pAC, IoC, &pRPort->DownRxTimer); + SkTimerStop(pAC, IoC, &pRPort->DownTxTimer); + + /* Do something if timer already fired? */ + + pRPort->LinkDown = SK_FALSE; + pRPort->PortState = SK_RLMT_PS_GOING_UP; + pRPort->GuTimeStamp = SkOsGetTime(pAC); + pRPort->BcTimeStamp = 0; + pRPort->Net->LinksUp++; + if (pRPort->Net->LinksUp == 1) { + SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[0], SK_LED_ACTIVE); + } + else { + SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[0], SK_LED_STANDBY); + } + + for (i = 0; i < pRPort->Net->NumPorts; i++) { + if (!pRPort->Net->Port[i]->PortStarted) { + SkRlmtPortStart(pAC, IoC, pRPort->Net->Port[i]->PortNumber); } - pAC->Rlmt.LinksUp++; + } - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { - if (!pAC->Rlmt.Port[i].PortStarted) { - SkRlmtPortStart(pAC, IoC, i); - } + SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); + + if (pRPort->Net->LinksUp >= 2) { + if (pRPort->Net->RlmtMode & SK_RLMT_CHECK_LOC_LINK) { + /* Build the check chain. */ + SkRlmtBuildCheckChain(pAC, pRPort->Net->NetNumber); } + } - SkRlmtCheckSwitch(pAC, IoC); + /* If the first link comes up, start the periodical RLMT timeout. */ + if (pRPort->Net->NumPorts > 1 && pRPort->Net->LinksUp == 1 && + (pRPort->Net->RlmtMode & SK_RLMT_CHECK_OTHERS) != 0) { + Para2.Para32[0] = pRPort->Net->NetNumber; + Para2.Para32[1] = (SK_U32)-1; + SkTimerStart(pAC, IoC, &pRPort->Net->LocTimer, + pRPort->Net->TimeoutValue, SKGE_RLMT, SK_RLMT_TIM, Para2); + } - if (pAC->Rlmt.LinksUp >= 2) { - if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LOC_LINK) { + Para2 = Para; + Para2.Para32[1] = (SK_U32)-1; + SkTimerStart(pAC, IoC, &pRPort->UpTimer, SK_RLMT_PORTUP_TIM_VAL, + SKGE_RLMT, SK_RLMT_PORTUP_TIM, Para2); + + /* Later: if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LOC_LINK) && */ + if ((pRPort->Net->RlmtMode & SK_RLMT_TRANSPARENT) == 0 && + (pRPort->Net->RlmtMode & SK_RLMT_CHECK_LINK) != 0 && + (Para2.pParaPtr = + SkRlmtBuildPacket(pAC, IoC, Para.Para32[0], SK_PACKET_ANNOUNCE, + &pAC->Addr.Port[Para.Para32[0]].CurrentMacAddress, &SkRlmtMcAddr) + ) != NULL) { + /* Send "new" packet to RLMT multicast address. */ + SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para2); + } + + if (pRPort->Net->RlmtMode & SK_RLMT_CHECK_SEG) { + if ((Para2.pParaPtr = + SkRlmtBuildSpanningTreePacket(pAC, IoC, Para.Para32[0])) != NULL) { + pAC->Rlmt.Port[Para.Para32[0]].RootIdSet = SK_FALSE; + pRPort->Net->CheckingState |= + SK_RLMT_RCS_SEG | SK_RLMT_RCS_REPORT_SEG; - /* Build the check chain. */ + SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para2); - SkRlmtBuildCheckChain(pAC); - } + Para.Para32[1] = (SK_U32)-1; + SkTimerStart(pAC, IoC, &pRPort->Net->SegTimer, + SK_RLMT_SEG_TO_VAL, SKGE_RLMT, SK_RLMT_SEG_TIM, Para); } + } - /* - * If the first link comes up, start the periodical - * RLMT timeout. - */ + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_LINK_UP Event END.\n")) +} /* SkRlmtEvtLinkUp */ - if (pAC->GIni.GIMacsFound > 1 && pAC->Rlmt.LinksUp == 1 && - (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_OTHERS)) { - SkTimerStart( - pAC, - IoC, - &pAC->Rlmt.LocTimer, - pAC->Rlmt.TimeoutValue, - SKGE_RLMT, - SK_RLMT_TIM, - Para); - } - - SkTimerStart( - pAC, - IoC, - &pRPort->UpTimer, - SK_RLMT_PORTUP_TIM_VAL, - SKGE_RLMT, - SK_RLMT_PORTUP_TIM, - Para); - /* - * Later: - * if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LOC_LINK) && - */ +/****************************************************************************** + * + * SkRlmtEvtPortUpTim - PORT_UP_TIM + * + * Description: + * This routine handles PORT_UP_TIM events. + * + * Context: + * runtime, pageable? + * may be called after SK_INIT_IO + * + * Returns: + * Nothing + */ +RLMT_STATIC void SkRlmtEvtPortUpTim( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 -1 */ +{ + SK_RLMT_PORT *pRPort; - if ((pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LINK) && - (Para2.pParaPtr = SkRlmtBuildPacket( - pAC, - IoC, - Para.Para32[0], - SK_PACKET_ANNOUNCE, - &pAC->Addr.Port[Para.Para32[0]].CurrentMacAddress, - &SkRlmtMcAddr) - ) != NULL) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PORTUP_TIM Port %d Event BEGIN.\n", Para.Para32[0])) - /* Send "new" packet to RLMT multicast address. */ + if (Para.Para32[1] != (SK_U32)-1) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad Parameter.\n")) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PORTUP_TIM Event EMPTY.\n")) + return; + } - SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para2); - } + pRPort = &pAC->Rlmt.Port[Para.Para32[0]]; + if (pRPort->LinkDown || (pRPort->PortState == SK_RLMT_PS_UP)) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PORTUP_TIM Port %d Event EMPTY.\n", Para.Para32[0])) + return; + } - if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) { - if ((Para2.pParaPtr = - SkRlmtBuildSpanningTreePacket( - pAC, - IoC, - Para.Para32[0]) - ) != NULL) { - - pAC->Rlmt.Port[Para.Para32[0]].RootIdSet = - SK_FALSE; - pAC->Rlmt.CheckingState |= - SK_RLMT_RCS_SEG | - SK_RLMT_RCS_REPORT_SEG; - - SkEventQueue( - pAC, - SKGE_DRV, - SK_DRV_RLMT_SEND, - Para2); - - SkTimerStart( - pAC, - IoC, - &pAC->Rlmt.SegTimer, - SK_RLMT_SEG_TO_VAL, - SKGE_RLMT, - SK_RLMT_SEG_TIM, - Para); - } + pRPort->PortDown = SK_FALSE; + pRPort->PortState = SK_RLMT_PS_UP; + pRPort->Net->PortsUp++; + if (pRPort->Net->RlmtState != SK_RLMT_RS_INIT) { + if (pAC->Rlmt.NumNets <= 1) { + SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); } + SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_PORT_UP, Para); + } - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_LINK_UP Event (%d) END.\n", Event)) - break; + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PORTUP_TIM Event END.\n")) +} /* SkRlmtEvtPortUpTim */ - case SK_RLMT_PORTUP_TIM: /* From RLMT via TIME. */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_PORTUP_TIM Port %d Event (%d) BEGIN.\n", Para.Para32[0], Event)) - - pRPort = &pAC->Rlmt.Port[Para.Para32[0]]; - - if (pRPort->LinkDown || (pRPort->PortState == SK_RLMT_PS_UP)) { - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_PORTUP_TIM Port %d Event (%d) EMPTY.\n", - Para.Para32[0], - Event)) - break; - } - pRPort->PortDown = SK_FALSE; - pRPort->PortState = SK_RLMT_PS_UP; - pAC->Rlmt.PortsUp++; +/****************************************************************************** + * + * SkRlmtEvtPortDownTim - PORT_DOWN_* + * + * Description: + * This routine handles PORT_DOWN_* events. + * + * Context: + * runtime, pageable? + * may be called after SK_INIT_IO + * + * Returns: + * Nothing + */ +RLMT_STATIC void SkRlmtEvtPortDownX( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_U32 Event, /* Event code */ +SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 -1 */ +{ + SK_RLMT_PORT *pRPort; + + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PORTDOWN* Port %d Event (%d) BEGIN.\n", + Para.Para32[0], Event)) + + if (Para.Para32[1] != (SK_U32)-1) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad Parameter.\n")) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PORTDOWN* Event EMPTY.\n")) + return; + } - if (pAC->Rlmt.RlmtState != SK_RLMT_RS_INIT) { - SkRlmtCheckSwitch(pAC, IoC); + pRPort = &pAC->Rlmt.Port[Para.Para32[0]]; + if (!pRPort->PortStarted || (Event == SK_RLMT_PORTDOWN_TX_TIM && + !(pRPort->CheckingState & SK_RLMT_PCS_TX))) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PORTDOWN* Event (%d) EMPTY.\n", Event)) + return; + } + + /* Stop port's timers. */ + SkTimerStop(pAC, IoC, &pRPort->UpTimer); + SkTimerStop(pAC, IoC, &pRPort->DownRxTimer); + SkTimerStop(pAC, IoC, &pRPort->DownTxTimer); - SkEventQueue( - pAC, - SKGE_PNMI, - SK_PNMI_EVT_RLMT_PORT_UP, - Para); - } + if (pRPort->PortState != SK_RLMT_PS_LINK_DOWN) { + pRPort->PortState = SK_RLMT_PS_DOWN; + } - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_PORTUP_TIM Event (%d) END.\n", Event)) - break; + if (!pRPort->PortDown) { + pRPort->Net->PortsUp--; + pRPort->PortDown = SK_TRUE; + SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_PORT_DOWN, Para); + } - case SK_RLMT_PORTDOWN: /* From RLMT. */ - case SK_RLMT_PORTDOWN_RX_TIM: /* From RLMT via TIME. */ - case SK_RLMT_PORTDOWN_TX_TIM: /* From RLMT via TIME. */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_PORTDOWN* Port %d Event (%d) BEGIN.\n", Para.Para32[0], Event)) - - pRPort = &pAC->Rlmt.Port[Para.Para32[0]]; - - if (!pRPort->PortStarted || - (Event == SK_RLMT_PORTDOWN_TX_TIM && - !(pRPort->CheckingState & SK_RLMT_PCS_TX))) { - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_PORTDOWN* Event (%d) EMPTY.\n", Event)) - break; + pRPort->PacketsPerTimeSlot = 0; + /* pRPort->DataPacketsPerTimeSlot = 0; */ + pRPort->BpduPacketsPerTimeSlot = 0; + + /* + * RA;:;: To be checked: + * - actions at RLMT_STOP: We should not switch anymore. + */ + if (pRPort->Net->RlmtState != SK_RLMT_RS_INIT) { + if (Para.Para32[0] == + pRPort->Net->Port[pRPort->Net->ActivePort]->PortNumber) { + /* Active Port went down. */ + SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); } - /* Stop port's timers. */ + } - SkTimerStop(pAC, IoC, &pRPort->UpTimer); - SkTimerStop(pAC, IoC, &pRPort->DownRxTimer); - SkTimerStop(pAC, IoC, &pRPort->DownTxTimer); + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PORTDOWN* Event (%d) END.\n", Event)) +} /* SkRlmtEvtPortDownX */ - if (pRPort->PortState != SK_RLMT_PS_LINK_DOWN) { - pRPort->PortState = SK_RLMT_PS_DOWN; - } - if (!pRPort->PortDown) { - pAC->Rlmt.PortsUp--; - pRPort->PortDown = SK_TRUE; +/****************************************************************************** + * + * SkRlmtEvtLinkDown - LINK_DOWN + * + * Description: + * This routine handles LINK_DOWN events. + * + * Context: + * runtime, pageable? + * may be called after SK_INIT_IO + * + * Returns: + * Nothing + */ +RLMT_STATIC void SkRlmtEvtLinkDown( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 Undefined */ +{ + SK_RLMT_PORT *pRPort; - SkEventQueue( - pAC, - SKGE_PNMI, - SK_PNMI_EVT_RLMT_PORT_DOWN, - Para); + pRPort = &pAC->Rlmt.Port[Para.Para32[0]]; + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_LINK_DOWN Port %d Event BEGIN.\n", Para.Para32[0])) + + if (!pAC->Rlmt.Port[Para.Para32[0]].LinkDown) { + pRPort->Net->LinksUp--; + pRPort->LinkDown = SK_TRUE; + pRPort->PortState = SK_RLMT_PS_LINK_DOWN; + SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[0], SK_LED_OFF); + + if ((pRPort->Net->RlmtMode & SK_RLMT_CHECK_LOC_LINK) != 0) { + /* Build the check chain. */ + SkRlmtBuildCheckChain(pAC, pRPort->Net->NetNumber); } - pRPort->PacketsPerTimeSlot = 0; - pRPort->DataPacketsPerTimeSlot = 0; - pRPort->BpduPacketsPerTimeSlot = 0; -#if 0 - pRPort->RlmtChksPerTimeSlot = 0; - pRPort->RlmtAcksPerTimeSlot = 0; -#endif /* 0 */ + /* Ensure that port is marked down. */ + Para.Para32[1] = -1; + (void)SkRlmtEvent(pAC, IoC, SK_RLMT_PORTDOWN, Para); + } - /* - * RA;:;: To be checked: - * - actions at RLMT_STOP: We should not switch anymore. - */ + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_LINK_DOWN Event END.\n")) +} /* SkRlmtEvtLinkDown */ + + +/****************************************************************************** + * + * SkRlmtEvtPortAddr - PORT_ADDR + * + * Description: + * This routine handles PORT_ADDR events. + * + * Context: + * runtime, pageable? + * may be called after SK_INIT_IO + * + * Returns: + * Nothing + */ +RLMT_STATIC void SkRlmtEvtPortAddr( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_EVPARA Para) /* SK_U32 PortNumber; SK_U32 -1 */ +{ + SK_U32 i, j; + SK_RLMT_PORT *pRPort; + SK_MAC_ADDR *pOldMacAddr; + SK_MAC_ADDR *pNewMacAddr; - if (pAC->Rlmt.RlmtState != SK_RLMT_RS_INIT) { - if (Para.Para32[0] == pAC->Rlmt.MacActive) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PORT_ADDR Port %d Event BEGIN.\n", Para.Para32[0])) - /* Active Port went down. */ + if (Para.Para32[1] != (SK_U32)-1) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad Parameter.\n")) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PORT_ADDR Event EMPTY.\n")) + return; + } - SkRlmtCheckSwitch(pAC, IoC); + /* Port's physical MAC address changed. */ + pOldMacAddr = &pAC->Addr.Port[Para.Para32[0]].PreviousMacAddress; + pNewMacAddr = &pAC->Addr.Port[Para.Para32[0]].CurrentMacAddress; + + /* + * NOTE: This is not scalable for solutions where ports are + * checked remotely. There, we need to send an RLMT + * address change packet - and how do we ensure delivery? + */ + for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { + pRPort = &pAC->Rlmt.Port[i]; + for (j = 0; j < pRPort->PortsChecked; j++) { + if (SK_ADDR_EQUAL( + pRPort->PortCheck[j].CheckAddr.a, pOldMacAddr->a)) { + pRPort->PortCheck[j].CheckAddr = *pNewMacAddr; } } + } - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_PORTDOWN* Event (%d) END.\n", Event)) - break; + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PORT_ADDR Event END.\n")) +} /* SkRlmtEvtPortAddr */ - case SK_RLMT_LINK_DOWN: /* From SIRQ. */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_LINK_DOWN Port %d Event (%d) BEGIN.\n", - Para.Para32[0], Event)) - - if (!pAC->Rlmt.Port[Para.Para32[0]].LinkDown) { - pAC->Rlmt.LinksUp--; - pAC->Rlmt.Port[Para.Para32[0]].LinkDown = SK_TRUE; - pAC->Rlmt.Port[Para.Para32[0]].PortState = - SK_RLMT_PS_LINK_DOWN; - SK_HWAC_LINK_LED( - pAC, - IoC, - Para.Para32[0], - SK_LED_OFF); - - if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LOC_LINK) { - - /* Build the check chain. */ - - SkRlmtBuildCheckChain(pAC); - } - - /* Ensure that port is marked down. */ - - (void)SkRlmtEvent( - pAC, - IoC, - SK_RLMT_PORTDOWN, - Para); - } - - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_LINK_DOWN Event (%d) END.\n", Event)) - break; - case SK_RLMT_PORT_ADDR: /* From ADDR. */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_PORT_ADDR Port %d Event (%d) BEGIN.\n", Para.Para32[0], Event)) - - /* Port's physical MAC address changed. */ - - pOldMacAddr = - &pAC->Addr.Port[Para.Para32[0]].PreviousMacAddress; - pNewMacAddr = - &pAC->Addr.Port[Para.Para32[0]].CurrentMacAddress; +/****************************************************************************** + * + * SkRlmtEvtStart - START + * + * Description: + * This routine handles START events. + * + * Context: + * runtime, pageable? + * may be called after SK_INIT_IO + * + * Returns: + * Nothing + */ +RLMT_STATIC void SkRlmtEvtStart( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */ +{ + SK_EVPARA Para2; + SK_U32 PortIdx; + SK_U32 PortNumber; - /* - * NOTE: This is not scalable for solutions where ports are - * checked remotely. There, we need to send an RLMT - * address change packet - and how do we ensure delivery? - */ + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_START Net %d Event BEGIN.\n", Para.Para32[0])) - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { - pRPort = &pAC->Rlmt.Port[i]; - for (j = 0; j < pRPort->PortsChecked; j++) { - if (SK_ADDR_EQUAL( - pRPort->PortCheck[j].CheckAddr.a, - pOldMacAddr->a)) { - pRPort->PortCheck[j].CheckAddr = - *pNewMacAddr; - } - } - } + if (Para.Para32[1] != (SK_U32)-1) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad Parameter.\n")) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_START Event EMPTY.\n")) + return; + } - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_PORT_ADDR Event (%d) END.\n", Event)) - break; + if (Para.Para32[0] >= pAC->Rlmt.NumNets) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad NetNumber %d.\n", Para.Para32[0])) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_START Event EMPTY.\n")) + return; + } - /* ----- RLMT events ----- */ + if (pAC->Rlmt.Net[Para.Para32[0]].RlmtState != SK_RLMT_RS_INIT) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_START Event EMPTY.\n")) + return; + } - case SK_RLMT_START: /* From DRV. */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_START Event (%d) BEGIN.\n", Event)) - - if (pAC->Rlmt.RlmtState != SK_RLMT_RS_INIT) { - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_START Event (%d) EMPTY.\n", Event)) - break; - } + if (pAC->Rlmt.NetsStarted >= pAC->Rlmt.NumNets) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("All nets should have been started.\n")) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_START Event EMPTY.\n")) + return; + } - if (pAC->Rlmt.PrefPort >= (SK_U32)pAC->GIni.GIMacsFound) { - SK_ERR_LOG( - pAC, - SK_ERRCL_SW, - SKERR_RLMT_E009, - SKERR_RLMT_E009_MSG); - - /* Change PrefPort to internal default. */ - - Para.Para32[0] = 0xFFFFFFFF; - (void)SkRlmtEvent( - pAC, - IoC, - SK_RLMT_PREFPORT_CHANGE, - Para); - } -#if 0 - if (pAC->GIni.GIMacsFound == 1 && - pAC->Rlmt.RlmtMode != SK_RLMT_CHECK_LINK) { - Para.Para32[0] = SK_RLMT_CHECK_LINK; - (void)SkRlmtEvent( - pAC, - IoC, - SK_RLMT_MODE_CHANGE, - Para); - } -#endif /* 0 */ - pAC->Rlmt.LinksUp = 0; - pAC->Rlmt.PortsUp = 0; - pAC->Rlmt.CheckingState = 0; - pAC->Rlmt.RlmtState = SK_RLMT_RS_NET_DOWN; - - SkRlmtPortStart(pAC, IoC, pAC->Rlmt.PrefPort); - - /* Start Timer (for first port only). */ - - Para2.Para32[0] = pAC->Rlmt.PrefPort; - SkTimerStart( - pAC, - IoC, - &pAC->Rlmt.Port[pAC->Rlmt.PrefPort].UpTimer, - SK_RLMT_PORTSTART_TIM_VAL, - SKGE_RLMT, - SK_RLMT_PORTSTART_TIM, - Para2); - - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_START Event (%d) END.\n", Event)) - break; + if (pAC->Rlmt.Net[Para.Para32[0]].PrefPort >= + pAC->Rlmt.Net[Para.Para32[0]].NumPorts) { + SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E009, SKERR_RLMT_E009_MSG); - case SK_RLMT_STOP: /* From DRV. */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_STOP Event (%d) BEGIN.\n", Event)) - - if (pAC->Rlmt.RlmtState == SK_RLMT_RS_INIT) { - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_STOP Event (%d) EMPTY.\n", Event)) - break; - } + /* Change PrefPort to internal default. */ + Para2.Para32[0] = 0xFFFFFFFF; + Para2.Para32[1] = Para.Para32[0]; + (void)SkRlmtEvent(pAC, IoC, SK_RLMT_PREFPORT_CHANGE, Para2); + } - /* Stop RLMT timers. */ + PortIdx = pAC->Rlmt.Net[Para.Para32[0]].PrefPort; + PortNumber = pAC->Rlmt.Net[Para.Para32[0]].Port[PortIdx]->PortNumber; - SkTimerStop(pAC, IoC, &pAC->Rlmt.LocTimer); - SkTimerStop(pAC, IoC, &pAC->Rlmt.SegTimer); + pAC->Rlmt.Net[Para.Para32[0]].LinksUp = 0; + pAC->Rlmt.Net[Para.Para32[0]].PortsUp = 0; + pAC->Rlmt.Net[Para.Para32[0]].CheckingState = 0; + pAC->Rlmt.Net[Para.Para32[0]].RlmtState = SK_RLMT_RS_NET_DOWN; - /* Stop Net. */ + /* Start preferred port. */ + SkRlmtPortStart(pAC, IoC, PortNumber); - pAC->Rlmt.RlmtState = SK_RLMT_RS_INIT; - pAC->Rlmt.RootIdSet = SK_FALSE; - Para2.Para32[0] = SK_RLMT_NET_DOWN_FINAL; - SkEventQueue(pAC, SKGE_DRV, SK_DRV_NET_DOWN, Para2); + /* Start Timer (for first port only). */ + Para2.Para32[0] = PortNumber; + Para2.Para32[1] = (SK_U32)-1; + SkTimerStart(pAC, IoC, &pAC->Rlmt.Port[PortNumber].UpTimer, + SK_RLMT_PORTSTART_TIM_VAL, SKGE_RLMT, SK_RLMT_PORTSTART_TIM, Para2); - /* Stop ports. */ + pAC->Rlmt.NetsStarted++; - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { - if (pAC->Rlmt.Port[i].PortState != SK_RLMT_PS_INIT) { - SkTimerStop( - pAC, - IoC, - &pAC->Rlmt.Port[i].UpTimer); - SkTimerStop( - pAC, - IoC, - &pAC->Rlmt.Port[i].DownRxTimer); - SkTimerStop( - pAC, - IoC, - &pAC->Rlmt.Port[i].DownTxTimer); - - pAC->Rlmt.Port[i].PortState = SK_RLMT_PS_INIT; - pAC->Rlmt.Port[i].RootIdSet = SK_FALSE; - pAC->Rlmt.Port[i].PortStarted = SK_FALSE; - Para2.Para32[0] = i; - SkEventQueue( - pAC, - SKGE_HWAC, - SK_HWEV_PORT_STOP, - Para2); - } - } + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_START Event END.\n")) +} /* SkRlmtEvtStart */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_STOP Event (%d) END.\n", Event)) - break; - case SK_RLMT_TIM: /* From RLMT via TIME. */ -#if 0 - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_TIM Event (%d) BEGIN.\n", Event)) -#endif /* 0 */ +/****************************************************************************** + * + * SkRlmtEvtStop - STOP + * + * Description: + * This routine handles STOP events. + * + * Context: + * runtime, pageable? + * may be called after SK_INIT_IO + * + * Returns: + * Nothing + */ +RLMT_STATIC void SkRlmtEvtStop( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */ +{ + SK_EVPARA Para2; + SK_U32 PortNumber; + SK_U32 i; - if (!(pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_OTHERS) || - pAC->Rlmt.LinksUp == 0) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_STOP Net %d Event BEGIN.\n", Para.Para32[0])) - /* - * Mode changed or all links down: - * No more link checking. - */ + if (Para.Para32[1] != (SK_U32)-1) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad Parameter.\n")) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_STOP Event EMPTY.\n")) + return; + } - break; + if (Para.Para32[0] >= pAC->Rlmt.NumNets) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad NetNumber %d.\n", Para.Para32[0])) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_STOP Event EMPTY.\n")) + return; + } + + if (pAC->Rlmt.Net[Para.Para32[0]].RlmtState == SK_RLMT_RS_INIT) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_STOP Event EMPTY.\n")) + return; + } + + if (pAC->Rlmt.NetsStarted == 0) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("All nets are stopped.\n")) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_STOP Event EMPTY.\n")) + return; + } + + /* Stop RLMT timers. */ + SkTimerStop(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[0]].LocTimer); + SkTimerStop(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[0]].SegTimer); + + /* Stop net. */ + pAC->Rlmt.Net[Para.Para32[0]].RlmtState = SK_RLMT_RS_INIT; + pAC->Rlmt.Net[Para.Para32[0]].RootIdSet = SK_FALSE; + Para2.Para32[0] = SK_RLMT_NET_DOWN_FINAL; + Para2.Para32[1] = Para.Para32[0]; /* Net# */ + SkEventQueue(pAC, SKGE_DRV, SK_DRV_NET_DOWN, Para2); + + /* Stop ports. */ + for (i = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; i++) { + PortNumber = pAC->Rlmt.Net[Para.Para32[0]].Port[i]->PortNumber; + if (pAC->Rlmt.Port[PortNumber].PortState != SK_RLMT_PS_INIT) { + SkTimerStop(pAC, IoC, &pAC->Rlmt.Port[PortNumber].UpTimer); + SkTimerStop(pAC, IoC, &pAC->Rlmt.Port[PortNumber].DownRxTimer); + SkTimerStop(pAC, IoC, &pAC->Rlmt.Port[PortNumber].DownTxTimer); + + pAC->Rlmt.Port[PortNumber].PortState = SK_RLMT_PS_INIT; + pAC->Rlmt.Port[PortNumber].RootIdSet = SK_FALSE; + pAC->Rlmt.Port[PortNumber].PortStarted = SK_FALSE; + Para2.Para32[0] = PortNumber; + Para2.Para32[1] = (SK_U32)-1; + SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_STOP, Para2); } + } + + pAC->Rlmt.NetsStarted--; + + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_STOP Event END.\n")) +} /* SkRlmtEvtStop */ + + +/****************************************************************************** + * + * SkRlmtEvtTim - TIM + * + * Description: + * This routine handles TIM events. + * + * Context: + * runtime, pageable? + * may be called after SK_INIT_IO + * + * Returns: + * Nothing + */ +RLMT_STATIC void SkRlmtEvtTim( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */ +{ + SK_RLMT_PORT *pRPort; + SK_U32 Timeout; + SK_U32 NewTimeout; + SK_U32 PortNumber; + SK_U32 i; #if 0 - pAC->Rlmt.SwitchCheckCounter--; - if (pAC->Rlmt.SwitchCheckCounter == 0) { - pAC->Rlmt.SwitchCheckCounter; - } + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_TIM Event BEGIN.\n")) #endif /* 0 */ - NewTimeout = SK_RLMT_DEF_TO_VAL; - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { - pRPort = &pAC->Rlmt.Port[i]; - if (!pRPort->LinkDown) { - Timeout = SkRlmtCheckPort(pAC, IoC, i); - if (Timeout < NewTimeout) { - NewTimeout = Timeout; - } + if (Para.Para32[1] != (SK_U32)-1) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad Parameter.\n")) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_TIM Event EMPTY.\n")) + return; + } - /* - * This counter should be set to 0 for all - * ports before the first frame is sent in the - * next loop. - */ + if ((pAC->Rlmt.Net[Para.Para32[0]].RlmtMode & SK_RLMT_CHECK_OTHERS) == 0 || + pAC->Rlmt.Net[Para.Para32[0]].LinksUp == 0) { + /* Mode changed or all links down: No more link checking. */ + return; + } - pRPort->PacketsPerTimeSlot = 0; - pRPort->DataPacketsPerTimeSlot = 0; - pRPort->BpduPacketsPerTimeSlot = 0; #if 0 - pRPort->RlmtChksPerTimeSlot = 0; - pRPort->RlmtAcksPerTimeSlot = 0; + pAC->Rlmt.SwitchCheckCounter--; + if (pAC->Rlmt.SwitchCheckCounter == 0) { + pAC->Rlmt.SwitchCheckCounter; + } #endif /* 0 */ + + NewTimeout = SK_RLMT_DEF_TO_VAL; + for (i = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; i++) { + PortNumber = pAC->Rlmt.Net[Para.Para32[0]].Port[i]->PortNumber; + pRPort = &pAC->Rlmt.Port[PortNumber]; + if (!pRPort->LinkDown) { + Timeout = SkRlmtCheckPort(pAC, IoC, PortNumber); + if (Timeout < NewTimeout) { + NewTimeout = Timeout; } - } - pAC->Rlmt.TimeoutValue = NewTimeout; - if (pAC->Rlmt.LinksUp > 1) { /* - * If checking remote ports, also send packets if - * (LinksUp == 1) && - * this port checks at least one (remote) port. + * These counters should be set to 0 for all ports before the + * first frame is sent in the next loop. */ + pRPort->PacketsPerTimeSlot = 0; + /* pRPort->DataPacketsPerTimeSlot = 0; */ + pRPort->BpduPacketsPerTimeSlot = 0; + } + } + pAC->Rlmt.Net[Para.Para32[0]].TimeoutValue = NewTimeout; - /* - * Must be new loop, as SkRlmtCheckPort can request to - * check segmentation when e.g. checking the last port. - */ + if (pAC->Rlmt.Net[Para.Para32[0]].LinksUp > 1) { + /* + * If checking remote ports, also send packets if + * (LinksUp == 1) && + * this port checks at least one (remote) port. + */ - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { - pRPort = &pAC->Rlmt.Port[i]; - if (!pRPort->LinkDown) { /* !PortDown? */ - SkRlmtSend(pAC, IoC, i); - } + /* + * Must be new loop, as SkRlmtCheckPort can request to + * check segmentation when e.g. checking the last port. + */ + for (i = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; i++) { + if (!pAC->Rlmt.Net[Para.Para32[0]].Port[i]->LinkDown) { + SkRlmtSend(pAC, IoC, + pAC->Rlmt.Net[Para.Para32[0]].Port[i]->PortNumber); } } + } - SkTimerStart( - pAC, - IoC, - &pAC->Rlmt.LocTimer, - pAC->Rlmt.TimeoutValue, - SKGE_RLMT, - SK_RLMT_TIM, - Para); - - if (pAC->Rlmt.LinksUp > 1 && - (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) && - (pAC->Rlmt.CheckingState & SK_RLMT_RCS_START_SEG)) { - SkTimerStart( - pAC, - IoC, - &pAC->Rlmt.SegTimer, - SK_RLMT_SEG_TO_VAL, - SKGE_RLMT, - SK_RLMT_SEG_TIM, - Para); - pAC->Rlmt.CheckingState &= - ~SK_RLMT_RCS_START_SEG; - pAC->Rlmt.CheckingState |= - SK_RLMT_RCS_SEG | SK_RLMT_RCS_REPORT_SEG; - } + SkTimerStart(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[0]].LocTimer, + pAC->Rlmt.Net[Para.Para32[0]].TimeoutValue, SKGE_RLMT, SK_RLMT_TIM, + Para); + + if (pAC->Rlmt.Net[Para.Para32[0]].LinksUp > 1 && + (pAC->Rlmt.Net[Para.Para32[0]].RlmtMode & SK_RLMT_CHECK_SEG) && + (pAC->Rlmt.Net[Para.Para32[0]].CheckingState & SK_RLMT_RCS_START_SEG)) { + SkTimerStart(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[0]].SegTimer, + SK_RLMT_SEG_TO_VAL, SKGE_RLMT, SK_RLMT_SEG_TIM, Para); + pAC->Rlmt.Net[Para.Para32[0]].CheckingState &= ~SK_RLMT_RCS_START_SEG; + pAC->Rlmt.Net[Para.Para32[0]].CheckingState |= + SK_RLMT_RCS_SEG | SK_RLMT_RCS_REPORT_SEG; + } #if 0 - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_TIM Event (%d) END.\n", Event)) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_TIM Event END.\n")) #endif /* 0 */ - break; +} /* SkRlmtEvtTim */ - case SK_RLMT_SEG_TIM: - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_SEG_TIM Event (%d) BEGIN.\n", Event)) -#ifdef DEBUG - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { - SK_U8 InAddr8[6]; - SK_U16 *InAddr; - SK_ADDR_PORT *pAPort; - - InAddr = (SK_U16 *)&InAddr8[0]; - pAPort = &pAC->Addr.Port[i]; - for (j = 0; - j < pAPort->NextExactMatchRlmt; - j++) { - - /* Get exact match address j from port i. */ - - XM_INADDR(IoC, i, XM_EXM(j), InAddr); - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("MC address %d on Port %u: %02x %02x %02x %02x %02x %02x -- %02x %02x %02x %02x %02x %02x.\n", - j, - i, - InAddr8[0], - InAddr8[1], - InAddr8[2], - InAddr8[3], - InAddr8[4], - InAddr8[5], - pAPort->Exact[j].a[0], - pAPort->Exact[j].a[1], - pAPort->Exact[j].a[2], - pAPort->Exact[j].a[3], - pAPort->Exact[j].a[4], - pAPort->Exact[j].a[5])) - } +/****************************************************************************** + * + * SkRlmtEvtSegTim - SEG_TIM + * + * Description: + * This routine handles SEG_TIM events. + * + * Context: + * runtime, pageable? + * may be called after SK_INIT_IO + * + * Returns: + * Nothing + */ +RLMT_STATIC void SkRlmtEvtSegTim( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */ +{ +#ifdef XDEBUG + int j; +#endif /* DEBUG */ + + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_SEG_TIM Event BEGIN.\n")) + + if (Para.Para32[1] != (SK_U32)-1) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad Parameter.\n")) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_SEG_TIM Event EMPTY.\n")) + return; + } + +#ifdef xDEBUG + for (j = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; j++) { + SK_ADDR_PORT *pAPort; + SK_U32 k; + SK_U16 *InAddr; + SK_U8 InAddr8[6]; + + InAddr = (SK_U16 *)&InAddr8[0]; + pAPort = pAC->Rlmt.Net[Para.Para32[0]].Port[j]->AddrPort; + for (k = 0; k < pAPort->NextExactMatchRlmt; k++) { + /* Get exact match address k from port j. */ + XM_INADDR(IoC, pAC->Rlmt.Net[Para.Para32[0]].Port[j]->PortNumber, + XM_EXM(k), InAddr); + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("MC address %d on Port %u: %02x %02x %02x %02x %02x %02x -- %02x %02x %02x %02x %02x %02x.\n", + k, pAC->Rlmt.Net[Para.Para32[0]].Port[j]->PortNumber, + InAddr8[0], InAddr8[1], InAddr8[2], + InAddr8[3], InAddr8[4], InAddr8[5], + pAPort->Exact[k].a[0], pAPort->Exact[k].a[1], + pAPort->Exact[k].a[2], pAPort->Exact[k].a[3], + pAPort->Exact[k].a[4], pAPort->Exact[k].a[5])) } + } #endif /* DEBUG */ - pAC->Rlmt.CheckingState &= ~SK_RLMT_RCS_SEG; + SkRlmtCheckSeg(pAC, IoC, Para.Para32[0]); - SkRlmtCheckSeg(pAC, IoC); + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_SEG_TIM Event END.\n")) +} /* SkRlmtEvtSegTim */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_SEG_TIM Event (%d) END.\n", Event)) - break; - case SK_RLMT_PACKET_RECEIVED: /* From DRV. */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_PACKET_RECEIVED Event (%d) BEGIN.\n", Event)) +/****************************************************************************** + * + * SkRlmtEvtPacketRx - PACKET_RECEIVED + * + * Description: + * This routine handles PACKET_RECEIVED events. + * + * Context: + * runtime, pageable? + * may be called after SK_INIT_IO + * + * Returns: + * Nothing + */ +RLMT_STATIC void SkRlmtEvtPacketRx( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_EVPARA Para) /* SK_MBUF *pMb */ +{ + SK_MBUF *pMb; + SK_MBUF *pNextMb; + SK_U32 NetNumber; + +#if 0 + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PACKET_RECEIVED Event BEGIN.\n")) +#endif /* 0 */ - /* Should we ignore frames during port switching? */ + /* Should we ignore frames during port switching? */ #ifdef DEBUG - pMb = Para.pParaPtr; - if (pMb == NULL) { - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("No mbuf.\n")) - } - else if (pMb->pNext != NULL) { - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("More than one mbuf or pMb->pNext not set.\n")) - } + pMb = Para.pParaPtr; + if (pMb == NULL) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, ("No mbuf.\n")) + } + else if (pMb->pNext != NULL) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("More than one mbuf or pMb->pNext not set.\n")) + } #endif /* DEBUG */ - for (pMb = Para.pParaPtr; pMb != NULL; pMb = pNextMb) { - pNextMb = pMb->pNext; - pMb->pNext = NULL; + for (pMb = Para.pParaPtr; pMb != NULL; pMb = pNextMb) { + pNextMb = pMb->pNext; + pMb->pNext = NULL; + + NetNumber = pAC->Rlmt.Port[pMb->PortIdx].Net->NetNumber; + if (pAC->Rlmt.Net[NetNumber].RlmtState == SK_RLMT_RS_INIT) { + SkDrvFreeRlmtMbuf(pAC, IoC, pMb); + } + else { SkRlmtPacketReceive(pAC, IoC, pMb); } + } - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_PACKET_RECEIVED Event (%d) END.\n", Event)) - break; +#if 0 + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PACKET_RECEIVED Event END.\n")) +#endif /* 0 */ +} /* SkRlmtEvtPacketRx */ - case SK_RLMT_STATS_CLEAR: /* From PNMI. */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_STATS_CLEAR Event (%d) BEGIN.\n", Event)) - /* Clear statistics for virtual and physical ports. */ +/****************************************************************************** + * + * SkRlmtEvtStatsClear - STATS_CLEAR + * + * Description: + * This routine handles STATS_CLEAR events. + * + * Context: + * runtime, pageable? + * may be called after SK_INIT_IO + * + * Returns: + * Nothing + */ +RLMT_STATIC void SkRlmtEvtStatsClear( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */ +{ + SK_U32 i; + SK_RLMT_PORT *pRPort; + + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_STATS_CLEAR Event BEGIN.\n")) - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { - pAC->Rlmt.Port[i].TxHelloCts = 0; - pAC->Rlmt.Port[i].RxHelloCts = 0; - pAC->Rlmt.Port[i].TxSpHelloReqCts = 0; - pAC->Rlmt.Port[i].RxSpHelloCts = 0; - } + if (Para.Para32[1] != (SK_U32)-1) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad Parameter.\n")) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_STATS_CLEAR Event EMPTY.\n")) + return; + } - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_STATS_CLEAR Event (%d) END.\n", Event)) - break; + if (Para.Para32[0] >= pAC->Rlmt.NumNets) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad NetNumber %d.\n", Para.Para32[0])) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_STATS_CLEAR Event EMPTY.\n")) + return; + } + + /* Clear statistics for logical and physical ports. */ + for (i = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; i++) { + pRPort = + &pAC->Rlmt.Port[pAC->Rlmt.Net[Para.Para32[0]].Port[i]->PortNumber]; + pRPort->TxHelloCts = 0; + pRPort->RxHelloCts = 0; + pRPort->TxSpHelloReqCts = 0; + pRPort->RxSpHelloCts = 0; + } + + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_STATS_CLEAR Event END.\n")) +} /* SkRlmtEvtStatsClear */ + + +/****************************************************************************** + * + * SkRlmtEvtStatsUpdate - STATS_UPDATE + * + * Description: + * This routine handles STATS_UPDATE events. + * + * Context: + * runtime, pageable? + * may be called after SK_INIT_IO + * + * Returns: + * Nothing + */ +RLMT_STATIC void SkRlmtEvtStatsUpdate( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_EVPARA Para) /* SK_U32 NetNumber; SK_U32 -1 */ +{ + if (Para.Para32[1] != (SK_U32)-1) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad Parameter.\n")) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_STATS_UPDATE Event EMPTY.\n")) + return; + } + + if (Para.Para32[0] >= pAC->Rlmt.NumNets) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad NetNumber %d.\n", Para.Para32[0])) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_STATS_UPDATE Event EMPTY.\n")) + return; + } - case SK_RLMT_STATS_UPDATE: /* From PNMI. */ #if 0 - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_STATS_UPDATE Event (%d) BEGIN.\n", Event)) - - /* Update statistics. */ - - /* Currently always up-to-date. */ - - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_STATS_UPDATE Event (%d) END.\n", Event)) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_STATS_UPDATE Event BEGIN.\n")) + + /* Update statistics - currently always up-to-date. */ + + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_STATS_UPDATE Event END.\n")) #endif /* 0 */ - break; +} /* SkRlmtEvtStatsUpdate */ - case SK_RLMT_PREFPORT_CHANGE: /* From PNMI. */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_PREFPORT_CHANGE to Port %d Event (%d) BEGIN.\n", Para.Para32[0], Event)) - /* 0xFFFFFFFF == auto-mode. */ +/****************************************************************************** + * + * SkRlmtEvtPrefportChange - PREFPORT_CHANGE + * + * Description: + * This routine handles PREFPORT_CHANGE events. + * + * Context: + * runtime, pageable? + * may be called after SK_INIT_IO + * + * Returns: + * Nothing + */ +RLMT_STATIC void SkRlmtEvtPrefportChange( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_EVPARA Para) /* SK_U32 PortIndex; SK_U32 NetNumber */ +{ + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PREFPORT_CHANGE to Port %d Event BEGIN.\n", Para.Para32[0])) + + if (Para.Para32[1] >= pAC->Rlmt.NumNets) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad NetNumber %d.\n", Para.Para32[1])) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PREFPORT_CHANGE Event EMPTY.\n")) + return; + } - if (Para.Para32[0] == 0xFFFFFFFF) { - pAC->Rlmt.PrefPort = SK_RLMT_DEF_PREF_PORT; - } - else { - if (Para.Para32[0] >= (SK_U32)pAC->GIni.GIMacsFound) { - SK_ERR_LOG( - pAC, - SK_ERRCL_SW, - SKERR_RLMT_E010, - SKERR_RLMT_E010_MSG); - - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_PREFPORT_CHANGE Event (%d) EMPTY.\n", Event)) - break; - } + /* 0xFFFFFFFF == auto-mode. */ + if (Para.Para32[0] == 0xFFFFFFFF) { + pAC->Rlmt.Net[Para.Para32[1]].PrefPort = SK_RLMT_DEF_PREF_PORT; + } + else { + if (Para.Para32[0] >= pAC->Rlmt.Net[Para.Para32[1]].NumPorts) { + SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E010, SKERR_RLMT_E010_MSG); - pAC->Rlmt.PrefPort = Para.Para32[0]; + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PREFPORT_CHANGE Event EMPTY.\n")) + return; } - pAC->Rlmt.MacPreferred = Para.Para32[0]; + pAC->Rlmt.Net[Para.Para32[1]].PrefPort = Para.Para32[0]; + } - SkRlmtCheckSwitch(pAC, IoC); + pAC->Rlmt.Net[Para.Para32[1]].Preference = Para.Para32[0]; - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_PREFPORT_CHANGE Event (%d) END.\n", Event)) - break; + if (pAC->Rlmt.Net[Para.Para32[1]].RlmtState != SK_RLMT_RS_INIT) { + SkRlmtCheckSwitch(pAC, IoC, Para.Para32[1]); + } - case SK_RLMT_MODE_CHANGE: /* From PNMI. */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_MODE_CHANGE Event (%d) BEGIN.\n", Event)) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_PREFPORT_CHANGE Event END.\n")) +} /* SkRlmtEvtPrefportChange */ - if (pAC->GIni.GIMacsFound < 2) { - pAC->Rlmt.RlmtMode = SK_RLMT_CHECK_LINK; - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("Forced RLMT mode to CLS on single link adapter.\n")) - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_MODE_CHANGE Event (%d) EMPTY.\n", - Event)) - break; + +/****************************************************************************** + * + * SkRlmtEvtSetNets - SET_NETS + * + * Description: + * This routine handles SET_NETS events. + * + * Context: + * runtime, pageable? + * may be called after SK_INIT_IO + * + * Returns: + * Nothing + */ +RLMT_STATIC void SkRlmtEvtSetNets( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_EVPARA Para) /* SK_U32 NumNets; SK_U32 -1 */ +{ + int i; + + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_SET_NETS Event BEGIN.\n")) + + if (Para.Para32[1] != (SK_U32)-1) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad Parameter.\n")) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_SET_NETS Event EMPTY.\n")) + return; + } + + if (Para.Para32[0] == 0 || Para.Para32[0] > SK_MAX_NETS || + Para.Para32[0] > (SK_U32)pAC->GIni.GIMacsFound) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad number of nets: %d.\n", Para.Para32[0])) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_SET_NETS Event EMPTY.\n")) + return; + } + + if (Para.Para32[0] == pAC->Rlmt.NumNets) { /* No change. */ + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_SET_NETS Event EMPTY.\n")) + return; + } + + /* Entering and leaving dual mode only allowed while nets are stopped. */ + if (pAC->Rlmt.NetsStarted > 0) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Changing dual mode only allowed while all nets are stopped.\n")) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_SET_NETS Event EMPTY.\n")) + return; + } + + if (Para.Para32[0] == 1) { + if (pAC->Rlmt.NumNets > 1) { + /* Clear logical MAC addr from second net's active port. */ + (void)SkAddrOverride(pAC, IoC, pAC->Rlmt.Net[1].Port[pAC->Addr. + Net[1].ActivePort]->PortNumber, NULL, SK_ADDR_CLEAR_LOGICAL); + pAC->Rlmt.Net[1].NumPorts = 0; + } + + pAC->Rlmt.NumNets = Para.Para32[0]; + for (i = 0; (SK_U32)i < pAC->Rlmt.NumNets; i++) { + pAC->Rlmt.Net[i].RlmtState = SK_RLMT_RS_INIT; + pAC->Rlmt.Net[i].RootIdSet = SK_FALSE; + pAC->Rlmt.Net[i].Preference = 0xFFFFFFFF; /* "Automatic" */ + pAC->Rlmt.Net[i].PrefPort = SK_RLMT_DEF_PREF_PORT; + /* Just assuming. */ + pAC->Rlmt.Net[i].ActivePort = pAC->Rlmt.Net[i].PrefPort; + pAC->Rlmt.Net[i].RlmtMode = SK_RLMT_DEF_MODE; + pAC->Rlmt.Net[i].TimeoutValue = SK_RLMT_DEF_TO_VAL; + pAC->Rlmt.Net[i].NetNumber = i; + } + + pAC->Rlmt.Port[1].Net= &pAC->Rlmt.Net[0]; + pAC->Rlmt.Net[0].NumPorts = pAC->GIni.GIMacsFound; + + SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_SET_NETS, Para); + + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("RLMT: Changed to one net with two ports.\n")) + } + else if (Para.Para32[0] == 2) { + pAC->Rlmt.Port[1].Net= &pAC->Rlmt.Net[1]; + pAC->Rlmt.Net[1].NumPorts = pAC->GIni.GIMacsFound - 1; + pAC->Rlmt.Net[0].NumPorts = + pAC->GIni.GIMacsFound - pAC->Rlmt.Net[1].NumPorts; + + pAC->Rlmt.NumNets = Para.Para32[0]; + for (i = 0; (SK_U32)i < pAC->Rlmt.NumNets; i++) { + pAC->Rlmt.Net[i].RlmtState = SK_RLMT_RS_INIT; + pAC->Rlmt.Net[i].RootIdSet = SK_FALSE; + pAC->Rlmt.Net[i].Preference = 0xFFFFFFFF; /* "Automatic" */ + pAC->Rlmt.Net[i].PrefPort = SK_RLMT_DEF_PREF_PORT; + /* Just assuming. */ + pAC->Rlmt.Net[i].ActivePort = pAC->Rlmt.Net[i].PrefPort; + pAC->Rlmt.Net[i].RlmtMode = SK_RLMT_DEF_MODE; + pAC->Rlmt.Net[i].TimeoutValue = SK_RLMT_DEF_TO_VAL; + + pAC->Rlmt.Net[i].NetNumber = i; + } + + /* Set logical MAC addr on second net's active port. */ + (void)SkAddrOverride(pAC, IoC, pAC->Rlmt.Net[1].Port[pAC->Addr. + Net[1].ActivePort]->PortNumber, NULL, SK_ADDR_SET_LOGICAL); + + SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_SET_NETS, Para); + + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("RLMT: Changed to two nets with one port each.\n")) + } + else { + /* Not implemented for more than two nets. */ + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SetNets not implemented for more than two nets.\n")) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_SET_NETS Event EMPTY.\n")) + return; + } + + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_SET_NETS Event END.\n")) +} /* SkRlmtSetNets */ + + +/****************************************************************************** + * + * SkRlmtEvtModeChange - MODE_CHANGE + * + * Description: + * This routine handles MODE_CHANGE events. + * + * Context: + * runtime, pageable? + * may be called after SK_INIT_IO + * + * Returns: + * Nothing + */ +RLMT_STATIC void SkRlmtEvtModeChange( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_EVPARA Para) /* SK_U32 NewMode; SK_U32 NetNumber */ +{ + SK_EVPARA Para2; + SK_U32 i; + SK_U32 PrevRlmtMode; + + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_MODE_CHANGE Event BEGIN.\n")) + + if (Para.Para32[1] >= pAC->Rlmt.NumNets) { + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Bad NetNumber %d.\n", Para.Para32[1])) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_MODE_CHANGE Event EMPTY.\n")) + return; + } + + Para.Para32[0] |= SK_RLMT_CHECK_LINK; + + if (pAC->Rlmt.Net[Para.Para32[1]].NumPorts < 2 && + Para.Para32[0] != SK_RLMT_MODE_CLS) { + pAC->Rlmt.Net[Para.Para32[1]].RlmtMode = SK_RLMT_MODE_CLS; + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("Forced RLMT mode to CLS on single port net.\n")) + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_MODE_CHANGE Event EMPTY.\n")) + return; + } + + /* Update RLMT mode. */ + PrevRlmtMode = pAC->Rlmt.Net[Para.Para32[1]].RlmtMode; + pAC->Rlmt.Net[Para.Para32[1]].RlmtMode = Para.Para32[0]; + + if ((PrevRlmtMode & SK_RLMT_CHECK_LOC_LINK) != + (pAC->Rlmt.Net[Para.Para32[1]].RlmtMode & SK_RLMT_CHECK_LOC_LINK)) { + /* SK_RLMT_CHECK_LOC_LINK bit changed. */ + if ((PrevRlmtMode & SK_RLMT_CHECK_OTHERS) == 0 && + pAC->Rlmt.Net[Para.Para32[1]].NumPorts > 1 && + pAC->Rlmt.Net[Para.Para32[1]].PortsUp >= 1) { + /* 20001207 RA: Was "PortsUp == 1". */ + Para2.Para32[0] = Para.Para32[1]; + Para2.Para32[1] = (SK_U32)-1; + SkTimerStart(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[1]].LocTimer, + pAC->Rlmt.Net[Para.Para32[1]].TimeoutValue, + SKGE_RLMT, SK_RLMT_TIM, Para2); } + } - /* Update RLMT mode. */ + if ((PrevRlmtMode & SK_RLMT_CHECK_SEG) != + (pAC->Rlmt.Net[Para.Para32[1]].RlmtMode & SK_RLMT_CHECK_SEG)) { + /* SK_RLMT_CHECK_SEG bit changed. */ + for (i = 0; i < pAC->Rlmt.Net[Para.Para32[1]].NumPorts; i++) { + (void)SkAddrMcClear(pAC, IoC, + pAC->Rlmt.Net[Para.Para32[1]].Port[i]->PortNumber, + SK_ADDR_PERMANENT | SK_MC_SW_ONLY); - PrevRlmtMode = pAC->Rlmt.RlmtMode; - pAC->Rlmt.RlmtMode = Para.Para32[0] | SK_RLMT_CHECK_LINK; + /* Add RLMT MC address. */ + (void)SkAddrMcAdd(pAC, IoC, + pAC->Rlmt.Net[Para.Para32[1]].Port[i]->PortNumber, + &SkRlmtMcAddr, SK_ADDR_PERMANENT); - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("RLMT: Changed Mode to %X.\n", pAC->Rlmt.RlmtMode)) - - if ((PrevRlmtMode & SK_RLMT_CHECK_LOC_LINK) != - (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_LOC_LINK)) { - if (!(PrevRlmtMode & SK_RLMT_CHECK_OTHERS) && - pAC->GIni.GIMacsFound > 1 && - pAC->Rlmt.PortsUp == 1) { - SkTimerStart( - pAC, - IoC, - &pAC->Rlmt.LocTimer, - pAC->Rlmt.TimeoutValue, - SKGE_RLMT, - SK_RLMT_TIM, - Para); - } - } - - if ((PrevRlmtMode & SK_RLMT_CHECK_SEG) != - (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG)) { - - for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { - (void)SkAddrMcClear( - pAC, - IoC, - i, - SK_ADDR_PERMANENT | SK_MC_SW_ONLY); - - /* Add RLMT MC address. */ - - (void)SkAddrMcAdd( - pAC, - IoC, - i, - &SkRlmtMcAddr, - SK_ADDR_PERMANENT); - - if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) { - /* Add BPDU MC address. */ - - (void)SkAddrMcAdd( - pAC, - IoC, - i, - &BridgeMcAddr, - SK_ADDR_PERMANENT); - - if (pAC->Rlmt.RlmtState != - SK_RLMT_RS_INIT) { - if (!pAC->Rlmt.Port[i].LinkDown && - (Para2.pParaPtr = - SkRlmtBuildSpanningTreePacket( - pAC, - IoC, - i) - ) != NULL) { - - pAC->Rlmt.Port[i - ].RootIdSet = - SK_FALSE; - - SkEventQueue( - pAC, - SKGE_DRV, - SK_DRV_RLMT_SEND, - Para2); - } + if ((pAC->Rlmt.Net[Para.Para32[1]].RlmtMode & + SK_RLMT_CHECK_SEG) != 0) { + /* Add BPDU MC address. */ + (void)SkAddrMcAdd(pAC, IoC, + pAC->Rlmt.Net[Para.Para32[1]].Port[i]->PortNumber, + &BridgeMcAddr, SK_ADDR_PERMANENT); + + if (pAC->Rlmt.Net[Para.Para32[1]].RlmtState != SK_RLMT_RS_INIT) { + if (!pAC->Rlmt.Net[Para.Para32[1]].Port[i]->LinkDown && + (Para2.pParaPtr = SkRlmtBuildSpanningTreePacket( + pAC, IoC, i)) != NULL) { + pAC->Rlmt.Net[Para.Para32[1]].Port[i]->RootIdSet = + SK_FALSE; + SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para2); } } - - (void)SkAddrMcUpdate(pAC, IoC, i); } + (void)SkAddrMcUpdate(pAC, IoC, + pAC->Rlmt.Net[Para.Para32[1]].Port[i]->PortNumber); + } /* for ... */ + + if ((pAC->Rlmt.Net[Para.Para32[1]].RlmtMode & SK_RLMT_CHECK_SEG) != 0) { + Para2.Para32[0] = Para.Para32[1]; + Para2.Para32[1] = (SK_U32)-1; + SkTimerStart(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[1]].SegTimer, + SK_RLMT_SEG_TO_VAL, SKGE_RLMT, SK_RLMT_SEG_TIM, Para2); + } + } /* SK_RLMT_CHECK_SEG bit changed. */ + + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, + ("SK_RLMT_MODE_CHANGE Event END.\n")) +} /* SkRlmtEvtModeChange */ - if (pAC->Rlmt.RlmtMode & SK_RLMT_CHECK_SEG) { - SkTimerStart( - pAC, - IoC, - &pAC->Rlmt.SegTimer, - SK_RLMT_SEG_TO_VAL, - SKGE_RLMT, - SK_RLMT_SEG_TIM, - Para); - } - } - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, - ("SK_RLMT_MODE_CHANGE Event (%d) END.\n", Event)) +/****************************************************************************** + * + * SkRlmtEvent - a PORT- or an RLMT-specific event happened + * + * Description: + * This routine calls subroutines to handle PORT- and RLMT-specific events. + * + * Context: + * runtime, pageable? + * may be called after SK_INIT_IO + * + * Returns: + * 0 + */ +int SkRlmtEvent( +SK_AC *pAC, /* Adapter Context */ +SK_IOC IoC, /* I/O Context */ +SK_U32 Event, /* Event code */ +SK_EVPARA Para) /* Event-specific parameter */ +{ + switch (Event) { + + /* ----- PORT events ----- */ + + case SK_RLMT_PORTSTART_TIM: /* From RLMT via TIME. */ + SkRlmtEvtPortStartTim(pAC, IoC, Para); + break; + case SK_RLMT_LINK_UP: /* From SIRQ. */ + SkRlmtEvtLinkUp(pAC, IoC, Para); + break; + case SK_RLMT_PORTUP_TIM: /* From RLMT via TIME. */ + SkRlmtEvtPortUpTim(pAC, IoC, Para); break; + case SK_RLMT_PORTDOWN: /* From RLMT. */ + case SK_RLMT_PORTDOWN_RX_TIM: /* From RLMT via TIME. */ + case SK_RLMT_PORTDOWN_TX_TIM: /* From RLMT via TIME. */ + SkRlmtEvtPortDownX(pAC, IoC, Event, Para); + break; + case SK_RLMT_LINK_DOWN: /* From SIRQ. */ + SkRlmtEvtLinkDown(pAC, IoC, Para); + break; + case SK_RLMT_PORT_ADDR: /* From ADDR. */ + SkRlmtEvtPortAddr(pAC, IoC, Para); + break; + + /* ----- RLMT events ----- */ + + case SK_RLMT_START: /* From DRV. */ + SkRlmtEvtStart(pAC, IoC, Para); + break; + case SK_RLMT_STOP: /* From DRV. */ + SkRlmtEvtStop(pAC, IoC, Para); + break; + case SK_RLMT_TIM: /* From RLMT via TIME. */ + SkRlmtEvtTim(pAC, IoC, Para); + break; + case SK_RLMT_SEG_TIM: + SkRlmtEvtSegTim(pAC, IoC, Para); + break; + case SK_RLMT_PACKET_RECEIVED: /* From DRV. */ + SkRlmtEvtPacketRx(pAC, IoC, Para); + break; + case SK_RLMT_STATS_CLEAR: /* From PNMI. */ + SkRlmtEvtStatsClear(pAC, IoC, Para); + break; + case SK_RLMT_STATS_UPDATE: /* From PNMI. */ + SkRlmtEvtStatsUpdate(pAC, IoC, Para); + break; + case SK_RLMT_PREFPORT_CHANGE: /* From PNMI. */ + SkRlmtEvtPrefportChange(pAC, IoC, Para); + break; + case SK_RLMT_MODE_CHANGE: /* From PNMI. */ + SkRlmtEvtModeChange(pAC, IoC, Para); + break; + case SK_RLMT_SET_NETS: /* From DRV. */ + SkRlmtEvtSetNets(pAC, IoC, Para); + break; + + /* ----- Unknown events ----- */ default: /* Create error log entry. */ - SK_DBG_MSG( - pAC, - SK_DBGMOD_RLMT, - SK_DBGCAT_CTRL, + SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, ("Unknown RLMT Event %d.\n", Event)) - - SK_ERR_LOG( - pAC, - SK_ERRCL_SW, - SKERR_RLMT_E003, - SKERR_RLMT_E003_MSG); + SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E003, SKERR_RLMT_E003_MSG); break; - } + } /* switch() */ return (0); } /* SkRlmtEvent */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/skvpd.c linux.20p6/drivers/net/sk98lin/skvpd.c --- linux.vanilla/drivers/net/sk98lin/skvpd.c Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/skvpd.c Tue Jun 19 09:46:02 2001 @@ -2,8 +2,8 @@ * * Name: skvpd.c * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.25 $ - * Date: $Date: 1999/11/22 13:39:32 $ + * Version: $Revision: 1.26 $ + * Date: $Date: 2000/06/13 08:00:01 $ * Purpose: Shared software to read and write VPD data * ******************************************************************************/ @@ -27,6 +27,9 @@ * History: * * $Log: skvpd.c,v $ + * Revision 1.26 2000/06/13 08:00:01 mkarl + * additional cast to avoid compile problems in 64 bit environment + * * Revision 1.25 1999/11/22 13:39:32 cgoos * Changed license header to GPL. * @@ -121,7 +124,7 @@ Please refer skvpd.txt for infomation how to include this module */ static const char SysKonnectFileId[] = - "@(#)$Id: skvpd.c,v 1.25 1999/11/22 13:39:32 cgoos Exp $ (C) SK" ; + "@(#)$Id: skvpd.c,v 1.26 2000/06/13 08:00:01 mkarl Exp $ (C) SK" ; #include "h/skdrv1st.h" #include "h/sktypes.h" @@ -644,7 +647,7 @@ if (n == 0) return ; - i = end - start + 1 ; + i = (int) (end - start + 1) ; if (n < 0) { p = start + n ; while (i != 0) { diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sk98lin/skxmac2.c linux.20p6/drivers/net/sk98lin/skxmac2.c --- linux.vanilla/drivers/net/sk98lin/skxmac2.c Sun Mar 25 17:31:22 2001 +++ linux.20p6/drivers/net/sk98lin/skxmac2.c Tue Jun 19 09:46:02 2001 @@ -2,16 +2,15 @@ * * Name: skxmac2.c * Project: GEnesis, PCI Gigabit Ethernet Adapter - * Version: $Revision: 1.50 $ - * Date: $Date: 1999/11/22 13:40:14 $ + * Version: $Revision: 1.61 $ + * Date: $Date: 2001/02/09 15:40:59 $ * Purpose: Contains functions to initialize the XMAC II * ******************************************************************************/ /****************************************************************************** * - * (C)Copyright 1998,1999 SysKonnect, - * a business unit of Schneider & Koch & Co. Datensysteme GmbH. + * (C)Copyright 1998-2001 SysKonnect GmbH. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,14 +26,47 @@ * History: * * $Log: skxmac2.c,v $ + * Revision 1.61 2001/02/09 15:40:59 rassmann + * Editorial changes. + * + * Revision 1.60 2001/02/07 15:02:01 cgoos + * Added workaround for Fujitsu switch link down. + * + * Revision 1.59 2001/01/10 09:38:06 cgoos + * Fixed Broadcom C0/A1 Id check for workaround. + * + * Revision 1.58 2000/11/29 11:30:38 cgoos + * Changed DEBUG sections with NW output to xDEBUG + * + * Revision 1.57 2000/11/27 12:40:40 rassmann + * Suppressing preamble after first access to BCom, not before (#10556). + * + * Revision 1.56 2000/11/09 12:32:48 rassmann + * Renamed variables. + * + * Revision 1.55 2000/11/09 11:30:10 rassmann + * WA: Waiting after releasing reset until BCom chip is accessible. + * + * Revision 1.54 2000/10/02 14:10:27 rassmann + * Reading BCOM PHY after releasing reset until it returns a valid value. + * + * Revision 1.53 2000/07/27 12:22:11 gklug + * fix: possible endless loop in XmHardRst. + * + * Revision 1.52 2000/05/22 08:48:31 malthoff + * Fix: #10523 errata valid for all BCOM PHYs. + * + * Revision 1.51 2000/05/17 12:52:18 malthoff + * Fixes BCom link errata (#10523). + * * Revision 1.50 1999/11/22 13:40:14 cgoos * Changed license header to GPL. * * Revision 1.49 1999/11/22 08:12:13 malthoff - * Add workaround for power consumption feature of Bcom C0 chip. + * Add workaround for power consumption feature of BCom C0 chip. * * Revision 1.48 1999/11/16 08:39:01 malthoff - * Fix: MDIO preamble suppression is port dependend. + * Fix: MDIO preamble suppression is port dependent. * * Revision 1.47 1999/08/27 08:55:35 malthoff * 1000BT: Optimizing MDIO transfer by oppressing MDIO preamble. @@ -70,8 +102,7 @@ * Changes for 1000Base-T. * * Revision 1.38 1999/04/08 14:35:10 malthoff - * Add code for enabling signal detect. Enabling signal - * detect is disabled. + * Add code for enabling signal detect. Enabling signal detect is disabled. * * Revision 1.37 1999/03/12 13:42:54 malthoff * Add: Jumbo Frame Support. @@ -225,11 +256,11 @@ /* local variables ************************************************************/ static const char SysKonnectFileId[] = - "@(#)$Id: skxmac2.c,v 1.50 1999/11/22 13:40:14 cgoos Exp $ (C) SK "; + "@(#)$Id: skxmac2.c,v 1.61 2001/02/09 15:40:59 rassmann Exp $ (C) SK "; /* BCOM PHY magic pattern list */ typedef struct s_PhyHack { - int PhyReg; /* Phy register */ + int PhyReg; /* Phy register */ SK_U16 PhyVal; /* Value to write */ } BCOM_HACK; @@ -284,12 +315,12 @@ void SkXmSetRxCmd( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port, /* The XMAC to handle with belongs to this Port */ -int Mode) /* Mode is SK_STRIP_FCS_ON/OFF, SK_STRIP_PAD_ON/OFF, - SK_LENERR_OK_ON/OFF, or SK_BIG_PK_OK_ON/OFF */ +int Port, /* The XMAC to handle with belongs to this Port */ +int Mode) /* Mode is SK_STRIP_FCS_ON/OFF, SK_STRIP_PAD_ON/OFF, + SK_LENERR_OK_ON/OFF, or SK_BIG_PK_OK_ON/OFF */ { - SK_GEPORT *pPrt; - SK_U16 OldRxMode; + SK_GEPORT *pPrt; + SK_U16 OldRxMode; pPrt = &pAC->GIni.GP[Port]; OldRxMode = pPrt->PRxCmd; @@ -334,7 +365,8 @@ if (OldRxMode != pPrt->PRxCmd) { XM_OUT16(IoC, Port, XM_RX_CMD, pPrt->PRxCmd); } -} +} /* SkXmSetRxCmd*/ + /****************************************************************************** * @@ -351,12 +383,12 @@ void SkXmClrExactAddr( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port, /* The XMAC to handle with belongs to this Port */ -int StartNum, /* Begin with this Address Register Index (0..15) */ -int StopNum) /* Stop after finished with this Register Idx (0..15) */ +int Port, /* The XMAC to handle with belongs to this Port */ +int StartNum, /* Begin with this Address Register Index (0..15) */ +int StopNum) /* Stop after finished with this Register Idx (0..15) */ { - int i; - SK_U16 ZeroAddr[3] = { 0x0000, 0x0000, 0x0000 }; + int i; + SK_U16 ZeroAddr[3] = {0x0000, 0x0000, 0x0000}; if ((unsigned)StartNum > 15 || (unsigned)StopNum > 15 || StartNum > StopNum) { @@ -368,7 +400,8 @@ for (i = StartNum; i <= StopNum; i++) { XM_OUTADDR(IoC, Port, XM_EXM(i), &ZeroAddr[0]); } -} +} /* SkXmClrExactAddr */ + /****************************************************************************** * @@ -384,12 +417,13 @@ static void SkXmClrSrcCheck( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* The XMAC to handle with belongs to this Port (MAC_1 + n) */ +int Port) /* The XMAC to handle with belongs to this Port (MAC_1 + n) */ { - SK_U16 ZeroAddr[3] = { 0x0000, 0x0000, 0x0000 }; + SK_U16 ZeroAddr[3] = {0x0000, 0x0000, 0x0000}; XM_OUTHASH(IoC, Port, XM_SRC_CHK, &ZeroAddr); -} +} /* SkXmClrSrcCheck */ + /****************************************************************************** * @@ -404,12 +438,13 @@ static void SkXmClrHashAddr( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* The XMAC to handle with belongs to this Port (MAC_1 + n) */ +int Port) /* The XMAC to handle with belongs to this Port (MAC_1 + n) */ { - SK_U16 ZeroAddr[4] = { 0x0000, 0x0000, 0x0000, 0x0000 }; + SK_U16 ZeroAddr[4] = {0x0000, 0x0000, 0x0000, 0x0000}; XM_OUTHASH(IoC, Port, XM_HSM, &ZeroAddr); -} +} /* SkXmClrHashAddr*/ + /****************************************************************************** * @@ -424,14 +459,15 @@ void SkXmFlushTxFifo( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* The XMAC to handle with belongs to this Port (MAC_1 + n) */ +int Port) /* The XMAC to handle with belongs to this Port (MAC_1 + n) */ { SK_U32 MdReg; XM_IN32(IoC, Port, XM_MODE, &MdReg); MdReg |= XM_MD_FTF; XM_OUT32(IoC, Port, XM_MODE, MdReg); -} +} /* SkXmFlushTxFifo */ + /****************************************************************************** * @@ -446,14 +482,15 @@ void SkXmFlushRxFifo( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* The XMAC to handle with belongs to this Port (MAC_1 + n) */ +int Port) /* The XMAC to handle with belongs to this Port (MAC_1 + n) */ { SK_U32 MdReg; XM_IN32(IoC, Port, XM_MODE, &MdReg); MdReg |= XM_MD_FRF; XM_OUT32(IoC, Port, XM_MODE, MdReg); -} +} /* SkXmFlushRxFifo*/ + /****************************************************************************** * @@ -493,10 +530,10 @@ void SkXmSoftRst( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* port to stop (MAC_1 + n) */ +int Port) /* port to stop (MAC_1 + n) */ { SK_GEPORT *pPrt; - SK_U16 Word; + SK_U16 Word; pPrt = &pAC->GIni.GP[Port]; @@ -518,13 +555,11 @@ /* disable all PHY IRQs */ switch (pAC->GIni.GP[Port].PhyType) { - case SK_PHY_BCOM: - PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_INT_MASK, - 0xffff); + case SK_PHY_BCOM: + PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_INT_MASK, 0xffff); break; case SK_PHY_LONE: - PHY_WRITE(IoC, pPrt, Port, PHY_LONE_INT_ENAB, - 0x0); + PHY_WRITE(IoC, pPrt, Port, PHY_LONE_INT_ENAB, 0x0); break; case SK_PHY_NAT: /* todo: National @@ -545,7 +580,8 @@ SkXmFlushRxFifo(pAC, IoC, Port); pAC->GIni.GP[Port].PState = SK_PRT_STOP; -} +} /* SkXmSoftRst*/ + /****************************************************************************** * @@ -559,31 +595,47 @@ * register (Timing requirements: Broadcom: 400ns, Level One: * none, National: 80ns). * + * ATTENTION: + * It is absolutely neccessary to reset the SW_RST Bit first + * before calling this function. + * * Returns: * nothing */ void SkXmHardRst( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* port to stop (MAC_1 + n) */ +int Port) /* port to stop (MAC_1 + n) */ { - SK_U16 Word; - int i; SK_U32 Reg; + int i; + int TOut; + SK_U16 Word; - for (i=0; i<4; i++) { + for (i = 0; i < 4; i++) { /* TX_MFF_CTRL1 is a 32 bit register but only the lowest 16 */ /* bit contains buttoms to press */ - SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), - (SK_U16) MFF_CLR_MAC_RST); - SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), - (SK_U16) MFF_SET_MAC_RST); + SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), (SK_U16)MFF_CLR_MAC_RST); + + TOut = 0; do { + TOut ++; + if (TOut > 10000) { + /* + * Adapter seems to be in RESET state. + * Registers cannot be written. + */ + return; + } + + SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), + (SK_U16) MFF_SET_MAC_RST); SK_IN16(IoC,MR_ADDR(Port,TX_MFF_CTRL1), &Word); } while ((Word & MFF_SET_MAC_RST) == 0); } - if (pAC->GIni.GP[Port].PhyType != SK_PHY_XMAC) { + /* For external PHYs there must be special handling */ + if (pAC->GIni.GP[Port].PhyType != SK_PHY_XMAC) { /* reset external PHY */ SK_IN32(IoC, B2_GP_IO, &Reg); if (Port == 0) { @@ -601,7 +653,8 @@ } pAC->GIni.GP[Port].PState = SK_PRT_RESET; -} +} /* SkXmHardRst */ + /****************************************************************************** * @@ -612,8 +665,7 @@ * The XMAC must be reset or stopped before calling this function. * * Note: - * The XMACs Rx and Tx state machine is still disabled when - * returning. + * The XMAC's Rx and Tx state machine is still disabled when returning. * * Returns: * nothing @@ -621,12 +673,13 @@ void SkXmInitMac( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* Port Index (MAC_1 + n) */ +int Port) /* Port Index (MAC_1 + n) */ { - SK_GEPORT *pPrt; - SK_U16 SWord; - int i; - SK_U32 Reg; + SK_GEPORT *pPrt; + SK_U32 Reg; + int i; + SK_U16 SWord; + SK_U16 PhyId; pPrt = &pAC->GIni.GP[Port]; @@ -634,74 +687,118 @@ /* Port State: SK_PRT_STOP */ /* Verify that the reset bit is cleared */ SK_IN16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), &SWord); - if (SWord & (SK_U16) MFF_SET_MAC_RST) { + if (SWord & (SK_U16)MFF_SET_MAC_RST) { /* PState does not match HW state */ - SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E006, - SKERR_HWI_E006MSG); - /* correct it */ + SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E006, SKERR_HWI_E006MSG); + /* Correct it. */ pPrt->PState = SK_PRT_RESET; } } + if (pPrt->PState == SK_PRT_RESET) { /* * clear HW reset * Note: The SW reset is self clearing, therefore there is * nothing to do here. */ - SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), - (SK_U16) MFF_CLR_MAC_RST); - - /* - * clear PHY reset - */ - if (pAC->GIni.GP[Port].PhyType != SK_PHY_XMAC) { + SK_OUT16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), (SK_U16)MFF_CLR_MAC_RST); + + /* Ensure that XMAC reset release is done (errata from LReinbold?). */ + SK_IN16(IoC, MR_ADDR(Port, TX_MFF_CTRL1), &SWord); + /* Clear PHY reset. */ + if (pAC->GIni.GP[Port].PhyType != SK_PHY_XMAC) { SK_IN32(IoC, B2_GP_IO, &Reg); if (Port == 0) { - Reg |= GP_DIR_0; /* set to output */ + Reg |= GP_DIR_0; /* Set to output. */ Reg |= GP_IO_0; } else { - Reg |= GP_DIR_2; /* set to output */ + Reg |= GP_DIR_2; /* Set to output. */ Reg |= GP_IO_2; } SK_OUT32(IoC, B2_GP_IO, Reg); - /* enable GMII interface */ + /* Enable GMII interface. */ XM_OUT16(IoC, Port, XM_HW_CFG, XM_HW_GMII_MD); - /* optimize MDIO transfer by oppressing preamble */ + PHY_READ(IoC, pPrt, Port, PHY_XMAC_ID1, &PhyId); +#ifdef xDEBUG + if (SWord == 0xFFFF) { + i = 1; + do { + PHY_READ(IoC, pPrt, Port, PHY_XMAC_ID1, &SWord); + i++; + /* Limit retries; else machine may hang. */ + } while (SWord == 0xFFFF && i < 500000); + + CMSMPrintString( + pAC->pConfigTable, + MSG_TYPE_RUNTIME_INFO, + "ID1 is %x after %d reads.", + (void *)SWord, + (void *)i); + + /* Trigger PCI analyzer */ + /* SK_IN32(IoC, 0x012c, &Reg); */ + } +#endif /* DEBUG */ + + /* + * Optimize MDIO transfer by suppressing preamble. + * Must be done AFTER first access to BCOM chip. + */ XM_IN16(IoC, Port, XM_MMU_CMD, &SWord); XM_OUT16(IoC, Port, XM_MMU_CMD, SWord | XM_MMU_NO_PRE); - /* Workaround BCOM Errata for the A1 type */ - /* Write magic patterns to reserved registers */ - PHY_READ(IoC, pPrt, Port, PHY_XMAC_ID1, &SWord); - if (SWord == 0x6041) { + if (PhyId == 0x6044) { + /* Workaround BCOM Errata for the C0 type. */ + /* Write magic patterns to reserved registers. */ i = 0; - while (BcomRegA1Hack[i].PhyReg != 0) { - PHY_WRITE(IoC, pPrt, Port, - BcomRegA1Hack[i].PhyReg, - BcomRegA1Hack[i].PhyVal); + while (BcomRegC0Hack[i].PhyReg != 0) { + PHY_WRITE(IoC, pPrt, Port, BcomRegC0Hack[i].PhyReg, + BcomRegC0Hack[i].PhyVal); i++; } } - /* Workaround BCOM Errata for the C0 type */ - /* Write magic patterns to reserved registers */ - if (SWord == 0x6044) { + else if (PhyId == 0x6041) { + /* Workaround BCOM Errata for the A1 type. */ + /* Write magic patterns to reserved registers. */ i = 0; - while (BcomRegC0Hack[i].PhyReg != 0) { - PHY_WRITE(IoC, pPrt, Port, - BcomRegC0Hack[i].PhyReg, - BcomRegC0Hack[i].PhyVal); + while (BcomRegA1Hack[i].PhyReg != 0) { + PHY_WRITE(IoC, pPrt, Port, BcomRegA1Hack[i].PhyReg, + BcomRegA1Hack[i].PhyVal); i++; } } - /* - * PHY LED initialization is performed in - * SkGeXmitLED() (but not here). - */ + /* Workaround BCOM Errata (#10523) for all BCom PHYs. */ + /* Disable Power Management after reset. */ + PHY_READ(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL, &SWord); +#ifdef xDEBUG + if (SWord == 0xFFFF) { + i = 1; + do { + PHY_READ(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL, &SWord); + i++; + /* Limit retries; else machine may hang. */ + } while (SWord == 0xFFFF && i < 500000); + + CMSMPrintString( + pAC->pConfigTable, + MSG_TYPE_RUNTIME_INFO, + "AUX_CTRL is %x after %d reads.", + (void *)SWord, + (void *)i); + + /* Trigger PCI analyzer */ + /* SK_IN32(IoC, 0x012c, &Reg); */ + } +#endif /* DEBUG */ + PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL, + SWord | PHY_B_AC_DIS_PM); + + /* PHY LED initialization is done in SkGeXmitLED(), not here. */ } /* Dummy read the Interrupt source register */ @@ -709,7 +806,7 @@ /* * The autonegotiation process starts immediately after - * clearing the reset. Autonegotiation process should be + * clearing the reset. The autonegotiation process should be * started by the SIRQ, therefore stop it here immediately. */ SkXmInitPhy(pAC, IoC, Port, SK_FALSE); @@ -817,7 +914,8 @@ * This should be done after the autonegotiation process * has been completed successfully. */ -} +} /* SkXmInitMac*/ + /****************************************************************************** * @@ -834,7 +932,7 @@ void SkXmInitDupMd( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* Port Index (MAC_1 + n) */ +int Port) /* Port Index (MAC_1 + n) */ { switch (pAC->GIni.GP[Port].PLinkModeStatus) { case SK_LMODE_STAT_AUTOHALF: @@ -863,7 +961,8 @@ SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E007, SKERR_HWI_E007MSG); break; } -} +} /* SkXmInitDupMd */ + /****************************************************************************** * @@ -881,11 +980,11 @@ void SkXmInitPauseMd( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* Port Index (MAC_1 + n) */ +int Port) /* Port Index (MAC_1 + n) */ { SK_GEPORT *pPrt; - SK_U16 Word; SK_U32 DWord; + SK_U16 Word; pPrt = &pAC->GIni.GP[Port]; @@ -944,8 +1043,7 @@ /* Disable Pause Mode in MAC Rx FIFO */ SK_OUT16(IoC, MR_ADDR(Port,RX_MFF_CTRL1), MFF_DIS_PAUSE); } - -} +} /* SkXmInitPauseMd*/ /****************************************************************************** @@ -963,7 +1061,7 @@ void SkXmInitPhy( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port, /* Port Index (MAC_1 + n) */ +int Port, /* Port Index (MAC_1 + n) */ SK_BOOL DoLoop) /* Should a Phy LOOback be set-up? */ { SK_GEPORT *pPrt; @@ -983,7 +1081,8 @@ SkXmInitPhyNat(pAC, IoC, Port, DoLoop); break; } -} +} /* SkXmInitPhy*/ + /****************************************************************************** * @@ -1000,11 +1099,11 @@ static void SkXmInitPhyXmac( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port, /* Port Index (MAC_1 + n) */ +int Port, /* Port Index (MAC_1 + n) */ SK_BOOL DoLoop) /* Should a Phy LOOback be set-up? */ { SK_GEPORT *pPrt; - SK_U16 Crtl; + SK_U16 Ctrl; pPrt = &pAC->GIni.GP[Port]; @@ -1015,67 +1114,69 @@ ("InitPhyXmac: no autonegotiation Port %d\n", Port)); /* No Autonegiotiation */ /* Set DuplexMode in Config register */ - Crtl = (pPrt->PLinkMode == SK_LMODE_FULL ? PHY_CT_DUP_MD : 0); + Ctrl = (pPrt->PLinkMode == SK_LMODE_FULL ? PHY_CT_DUP_MD : 0); /* * Do NOT enable Autonegotiation here. This would hold * the link down because no IDLES are transmitted */ - } else { + } + else { SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("InitPhyXmac: with autonegotiation Port %d\n", Port)); /* Set Autonegotiation advertisement */ - Crtl = 0; + Ctrl = 0; /* Set Full/half duplex capabilities */ switch (pPrt->PLinkMode) { case SK_LMODE_AUTOHALF: - Crtl |= PHY_X_AN_HD; + Ctrl |= PHY_X_AN_HD; break; case SK_LMODE_AUTOFULL: - Crtl |= PHY_X_AN_FD; + Ctrl |= PHY_X_AN_FD; break; case SK_LMODE_AUTOBOTH: - Crtl |= PHY_X_AN_FD | PHY_X_AN_HD; + Ctrl |= PHY_X_AN_FD | PHY_X_AN_HD; break; default: SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, - SKERR_HWI_E015, SKERR_HWI_E015MSG) ; + SKERR_HWI_E015, SKERR_HWI_E015MSG); } switch (pPrt->PFlowCtrlMode) { case SK_FLOW_MODE_NONE: - Crtl |= PHY_X_P_NO_PAUSE; + Ctrl |= PHY_X_P_NO_PAUSE; break; case SK_FLOW_MODE_LOC_SEND: - Crtl |= PHY_X_P_ASYM_MD; + Ctrl |= PHY_X_P_ASYM_MD; break; case SK_FLOW_MODE_SYMMETRIC: - Crtl |= PHY_X_P_SYM_MD; + Ctrl |= PHY_X_P_SYM_MD; break; case SK_FLOW_MODE_SYM_OR_REM: - Crtl |= PHY_X_P_BOTH_MD; + Ctrl |= PHY_X_P_BOTH_MD; break; default: SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, - SKERR_HWI_E016, SKERR_HWI_E016MSG) ; + SKERR_HWI_E016, SKERR_HWI_E016MSG); } /* Write AutoNeg Advertisement Register */ - PHY_WRITE(IoC, pPrt, Port, PHY_XMAC_AUNE_ADV, Crtl) ; + PHY_WRITE(IoC, pPrt, Port, PHY_XMAC_AUNE_ADV, Ctrl); /* Restart Autonegotiation */ - Crtl = PHY_CT_ANE | PHY_CT_RE_CFG; + Ctrl = PHY_CT_ANE | PHY_CT_RE_CFG; } if (DoLoop) { /* Set the Phy Loopback bit, too */ - Crtl |= PHY_CT_LOOP; + Ctrl |= PHY_CT_LOOP; } /* Write to the Phy control register */ - PHY_WRITE(IoC, pPrt, Port, PHY_XMAC_CTRL, Crtl) ; -} + PHY_WRITE(IoC, pPrt, Port, PHY_XMAC_CTRL, Ctrl); +} /* SkXmInitPhyXmac*/ + /****************************************************************************** * @@ -1092,23 +1193,29 @@ static void SkXmInitPhyBcom( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port, /* Port Index (MAC_1 + n) */ +int Port, /* Port Index (MAC_1 + n) */ SK_BOOL DoLoop) /* Should a Phy LOOback be set-up? */ { SK_GEPORT *pPrt; - SK_U16 Crtl1 = PHY_B_CT_SP1000; - SK_U16 Crtl2 = 0; - SK_U16 Crtl3 = PHY_SEL_TYPE; - SK_U16 Crtl4 = PHY_B_PEC_EN_LTR; - SK_U16 Crtl5 = PHY_B_AC_TX_TST; + SK_U16 Ctrl1; + SK_U16 Ctrl2; + SK_U16 Ctrl3; + SK_U16 Ctrl4; + SK_U16 Ctrl5; + + Ctrl1 = PHY_B_CT_SP1000; + Ctrl2 = 0; + Ctrl3 = PHY_SEL_TYPE; + Ctrl4 = PHY_B_PEC_EN_LTR; + Ctrl5 = PHY_B_AC_TX_TST; pPrt = &pAC->GIni.GP[Port]; - /* manuell Master/Slave ? */ + /* manually Master/Slave ? */ if (pPrt->PMSMode != SK_MS_MODE_AUTO) { - Crtl2 |= PHY_B_1000C_MSE; + Ctrl2 |= PHY_B_1000C_MSE; if (pPrt->PMSMode == SK_MS_MODE_MASTER) { - Crtl2 |= PHY_B_1000C_MSC; + Ctrl2 |= PHY_B_1000C_MSC; } } /* Autonegotiation ? */ @@ -1118,18 +1225,19 @@ ("InitPhyBcom: no autonegotiation Port %d\n", Port)); /* No Autonegiotiation */ /* Set DuplexMode in Config register */ - Crtl1 |= (pPrt->PLinkMode == SK_LMODE_FULL ? PHY_CT_DUP_MD : 0); + Ctrl1 |= (pPrt->PLinkMode == SK_LMODE_FULL ? PHY_CT_DUP_MD : 0); - /* Determine Master/Slave manuell if not already done */ + /* Determine Master/Slave manually if not already done. */ if (pPrt->PMSMode == SK_MS_MODE_AUTO) { - Crtl2 |= PHY_B_1000C_MSE; /* set it to Slave */ + Ctrl2 |= PHY_B_1000C_MSE; /* set it to Slave */ } /* * Do NOT enable Autonegotiation here. This would hold * the link down because no IDLES are transmitted */ - } else { + } + else { SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("InitPhyBcom: with autonegotiation Port %d\n", Port)); /* Set Autonegotiation advertisement */ @@ -1137,31 +1245,31 @@ /* Set Full/half duplex capabilities */ switch (pPrt->PLinkMode) { case SK_LMODE_AUTOHALF: - Crtl2 |= PHY_B_1000C_AHD; + Ctrl2 |= PHY_B_1000C_AHD; break; case SK_LMODE_AUTOFULL: - Crtl2 |= PHY_B_1000C_AFD; + Ctrl2 |= PHY_B_1000C_AFD; break; case SK_LMODE_AUTOBOTH: - Crtl2 |= PHY_B_1000C_AFD | PHY_B_1000C_AHD; + Ctrl2 |= PHY_B_1000C_AFD | PHY_B_1000C_AHD; break; default: SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, - SKERR_HWI_E015, SKERR_HWI_E015MSG) ; + SKERR_HWI_E015, SKERR_HWI_E015MSG); } switch (pPrt->PFlowCtrlMode) { case SK_FLOW_MODE_NONE: - Crtl3 |= PHY_B_P_NO_PAUSE; + Ctrl3 |= PHY_B_P_NO_PAUSE; break; case SK_FLOW_MODE_LOC_SEND: - Crtl3 |= PHY_B_P_ASYM_MD; + Ctrl3 |= PHY_B_P_ASYM_MD; break; case SK_FLOW_MODE_SYMMETRIC: - Crtl3 |= PHY_B_P_SYM_MD; + Ctrl3 |= PHY_B_P_SYM_MD; break; case SK_FLOW_MODE_SYM_OR_REM: - Crtl3 |= PHY_B_P_BOTH_MD; + Ctrl3 |= PHY_B_P_BOTH_MD; break; default: SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, @@ -1169,7 +1277,7 @@ } /* Restart Autonegotiation */ - Crtl1 |= PHY_CT_ANE | PHY_CT_RE_CFG; + Ctrl1 |= PHY_CT_ANE | PHY_CT_RE_CFG; } @@ -1178,39 +1286,40 @@ init order of LEDs and XMAC. (MAl) */ /* Write 1000Base-T Control Register */ - PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_1000T_CTRL, Crtl2); + PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_1000T_CTRL, Ctrl2); SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, - ("1000Base-T Control Reg = %x\n", Crtl2)); + ("1000Base-T Control Reg = %x\n", Ctrl2)); /* Write AutoNeg Advertisement Register */ - PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_AUNE_ADV, Crtl3); + PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_AUNE_ADV, Ctrl3); SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, - ("AutoNeg Advertisment Reg = %x\n", Crtl3)); + ("AutoNeg Advertisment Reg = %x\n", Ctrl3)); if (DoLoop) { /* Set the Phy Loopback bit, too */ - Crtl1 |= PHY_CT_LOOP; + Ctrl1 |= PHY_CT_LOOP; } if (pAC->GIni.GIPortUsage == SK_JUMBO_LINK) { /* configure fifo to high latency for xmission of ext. packets*/ - Crtl4 |= PHY_B_PEC_HIGH_LA; + Ctrl4 |= PHY_B_PEC_HIGH_LA; /* configure reception of extended packets */ - Crtl5 |= PHY_B_AC_LONG_PACK; + Ctrl5 |= PHY_B_AC_LONG_PACK; - PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL, Crtl5); + PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL, Ctrl5); } /* Configure LED Traffic Mode and Jumbo Frame usage if specified */ - PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_P_EXT_CTRL, Crtl4); + PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_P_EXT_CTRL, Ctrl4); /* Write to the Phy control register */ - PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_CTRL, Crtl1); + PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_CTRL, Ctrl1); SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, - ("PHY Control Reg = %x\n", Crtl1)); -} + ("PHY Control Reg = %x\n", Ctrl1)); +} /* SkXmInitPhyBcom */ + /****************************************************************************** * @@ -1227,21 +1336,25 @@ static void SkXmInitPhyLone( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port, /* Port Index (MAC_1 + n) */ +int Port, /* Port Index (MAC_1 + n) */ SK_BOOL DoLoop) /* Should a Phy LOOback be set-up? */ { SK_GEPORT *pPrt; - SK_U16 Crtl1 = PHY_L_CT_SP1000; - SK_U16 Crtl2 = 0; - SK_U16 Crtl3 = PHY_SEL_TYPE; + SK_U16 Ctrl1; + SK_U16 Ctrl2; + SK_U16 Ctrl3; + + Ctrl1 = PHY_L_CT_SP1000; + Ctrl2 = 0; + Ctrl3 = PHY_SEL_TYPE; pPrt = &pAC->GIni.GP[Port]; - /* manuell Master/Slave ? */ + /* manually Master/Slave ? */ if (pPrt->PMSMode != SK_MS_MODE_AUTO) { - Crtl2 |= PHY_L_1000C_MSE; + Ctrl2 |= PHY_L_1000C_MSE; if (pPrt->PMSMode == SK_MS_MODE_MASTER) { - Crtl2 |= PHY_L_1000C_MSC; + Ctrl2 |= PHY_L_1000C_MSC; } } /* Autonegotiation ? */ @@ -1257,18 +1370,19 @@ ("InitPhyLone: no autonegotiation Port %d\n", Port)); /* No Autonegiotiation */ /* Set DuplexMode in Config register */ - Crtl1 = (pPrt->PLinkMode == SK_LMODE_FULL ? PHY_CT_DUP_MD : 0); + Ctrl1 = (pPrt->PLinkMode == SK_LMODE_FULL ? PHY_CT_DUP_MD : 0); - /* Determine Master/Slave manuell if not already done */ + /* Determine Master/Slave manually if not already done. */ if (pPrt->PMSMode == SK_MS_MODE_AUTO) { - Crtl2 |= PHY_L_1000C_MSE; /* set it to Slave */ + Ctrl2 |= PHY_L_1000C_MSE; /* set it to Slave */ } /* * Do NOT enable Autonegotiation here. This would hold * the link down because no IDLES are transmitted */ - } else { + } + else { SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("InitPhyLone: with autonegotiation Port %d\n", Port)); /* Set Autonegotiation advertisement */ @@ -1276,31 +1390,31 @@ /* Set Full/half duplex capabilities */ switch (pPrt->PLinkMode) { case SK_LMODE_AUTOHALF: - Crtl2 |= PHY_L_1000C_AHD; + Ctrl2 |= PHY_L_1000C_AHD; break; case SK_LMODE_AUTOFULL: - Crtl2 |= PHY_L_1000C_AFD; + Ctrl2 |= PHY_L_1000C_AFD; break; case SK_LMODE_AUTOBOTH: - Crtl2 |= PHY_L_1000C_AFD | PHY_L_1000C_AHD; + Ctrl2 |= PHY_L_1000C_AFD | PHY_L_1000C_AHD; break; default: SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, - SKERR_HWI_E015, SKERR_HWI_E015MSG) ; + SKERR_HWI_E015, SKERR_HWI_E015MSG); } switch (pPrt->PFlowCtrlMode) { case SK_FLOW_MODE_NONE: - Crtl3 |= PHY_L_P_NO_PAUSE; + Ctrl3 |= PHY_L_P_NO_PAUSE; break; case SK_FLOW_MODE_LOC_SEND: - Crtl3 |= PHY_L_P_ASYM_MD; + Ctrl3 |= PHY_L_P_ASYM_MD; break; case SK_FLOW_MODE_SYMMETRIC: - Crtl3 |= PHY_L_P_SYM_MD; + Ctrl3 |= PHY_L_P_SYM_MD; break; case SK_FLOW_MODE_SYM_OR_REM: - Crtl3 |= PHY_L_P_BOTH_MD; + Ctrl3 |= PHY_L_P_BOTH_MD; break; default: SK_ERR_LOG(pAC, SK_ERRCL_SW | SK_ERRCL_INIT, @@ -1308,7 +1422,7 @@ } /* Restart Autonegotiation */ - Crtl1 = PHY_CT_ANE | PHY_CT_RE_CFG; + Ctrl1 = PHY_CT_ANE | PHY_CT_RE_CFG; } @@ -1317,19 +1431,19 @@ init order of LEDs and XMAC. (MAl) */ /* Write 1000Base-T Control Register */ - PHY_WRITE(IoC, pPrt, Port, PHY_LONE_1000T_CTRL, Crtl2); + PHY_WRITE(IoC, pPrt, Port, PHY_LONE_1000T_CTRL, Ctrl2); SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, - ("1000Base-T Control Reg = %x\n", Crtl2)); + ("1000Base-T Control Reg = %x\n", Ctrl2)); /* Write AutoNeg Advertisement Register */ - PHY_WRITE(IoC, pPrt, Port, PHY_LONE_AUNE_ADV, Crtl3); + PHY_WRITE(IoC, pPrt, Port, PHY_LONE_AUNE_ADV, Ctrl3); SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, - ("AutoNeg Advertisment Reg = %x\n", Crtl3)); + ("AutoNeg Advertisment Reg = %x\n", Ctrl3)); if (DoLoop) { /* Set the Phy Loopback bit, too */ - Crtl1 |= PHY_CT_LOOP; + Ctrl1 |= PHY_CT_LOOP; } if (pAC->GIni.GIPortUsage == SK_JUMBO_LINK) { @@ -1340,10 +1454,11 @@ } /* Write to the Phy control register */ - PHY_WRITE(IoC, pPrt, Port, PHY_LONE_CTRL, Crtl1); + PHY_WRITE(IoC, pPrt, Port, PHY_LONE_CTRL, Ctrl1); SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, - ("PHY Control Reg = %x\n", Crtl1)); -} + ("PHY Control Reg = %x\n", Ctrl1)); +} /* SkXmInitPhyLone*/ + /****************************************************************************** * @@ -1360,11 +1475,12 @@ static void SkXmInitPhyNat( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port, /* Port Index (MAC_1 + n) */ +int Port, /* Port Index (MAC_1 + n) */ SK_BOOL DoLoop) /* Should a Phy LOOback be set-up? */ { /* todo: National */ -} +} /* SkXmInitPhyNat*/ + /****************************************************************************** * @@ -1377,7 +1493,7 @@ void SkXmAutoNegLipaXmac( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port, /* Port Index (MAC_1 + n) */ +int Port, /* Port Index (MAC_1 + n) */ SK_U16 IStatus) /* Interrupt Status word to analyse */ { SK_GEPORT *pPrt; @@ -1391,7 +1507,8 @@ ("AutoNegLipa: AutoNeg detected on port %d %x\n", Port, IStatus)); pPrt->PLipaAutoNeg = SK_LIPA_AUTO; } -} +} /* SkXmAutoNegLipaXmac*/ + /****************************************************************************** * @@ -1404,21 +1521,20 @@ void SkXmAutoNegLipaBcom( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port, /* Port Index (MAC_1 + n) */ +int Port, /* Port Index (MAC_1 + n) */ SK_U16 PhyStat) /* PHY Status word to analyse */ { SK_GEPORT *pPrt; pPrt = &pAC->GIni.GP[Port]; - if (pPrt->PLipaAutoNeg != SK_LIPA_AUTO && - (PhyStat & (PHY_ST_AN_OVER))) { - + if (pPrt->PLipaAutoNeg != SK_LIPA_AUTO && (PhyStat & PHY_ST_AN_OVER)) { SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("AutoNegLipa: AutoNeg detected on port %d %x\n", Port, PhyStat)); pPrt->PLipaAutoNeg = SK_LIPA_AUTO; } -} +} /* SkXmAutoNegLipaBcom*/ + /****************************************************************************** * @@ -1445,7 +1561,8 @@ ("AutoNegLipa: AutoNeg detected on port %d %x\n", Port, PhyStat)); pPrt->PLipaAutoNeg = SK_LIPA_AUTO; } -} +} /* SkXmAutoNegLipaLone*/ + /****************************************************************************** * @@ -1458,7 +1575,7 @@ void SkXmAutoNegLipaNat( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port, /* Port Index (MAC_1 + n) */ +int Port, /* Port Index (MAC_1 + n) */ SK_U16 PhyStat) /* PHY Status word to analyse */ { SK_GEPORT *pPrt; @@ -1472,7 +1589,9 @@ ("AutoNegLipa: AutoNeg detected on port %d %x\n", Port, PhyStat)); pPrt->PLipaAutoNeg = SK_LIPA_AUTO; } -} +} /* SkXmAutoNegLipaNat*/ + + /****************************************************************************** * * SkXmAutoNegDone() - Auto negotiation handling @@ -1493,13 +1612,9 @@ int SkXmAutoNegDone( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* Port Index (MAC_1 + n) */ +int Port) /* Port Index (MAC_1 + n) */ { - SK_GEPORT *pPrt; - - pPrt = &pAC->GIni.GP[Port]; - - switch (pPrt->PhyType) { + switch (pAC->GIni.GP[Port].PhyType) { case SK_PHY_XMAC: return (SkXmAutoNegDoneXmac(pAC, IoC, Port)); case SK_PHY_BCOM: @@ -1509,8 +1624,9 @@ case SK_PHY_NAT: return (SkXmAutoNegDoneNat(pAC, IoC, Port)); } - return(SK_AND_OTHER); -} + return (SK_AND_OTHER); +} /* SkXmAutoNegDone*/ + /****************************************************************************** * @@ -1530,11 +1646,11 @@ static int SkXmAutoNegDoneXmac( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* Port Index (MAC_1 + n) */ +int Port) /* Port Index (MAC_1 + n) */ { SK_GEPORT *pPrt; - SK_U16 ResAb ; /* Resolved Ability */ - SK_U16 LPAb ; /* Link Partner Ability */ + SK_U16 ResAb; /* Resolved Ability */ + SK_U16 LPAb; /* Link Partner Ability */ SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("AutoNegDoneXmac" "Port %d\n",Port)); @@ -1550,21 +1666,23 @@ /* Error */ SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("AutoNegFail: Remote fault bit set Port %d\n", Port)); - pPrt->PAutoNegFail = SK_TRUE ; - return (SK_AND_OTHER) ; + pPrt->PAutoNegFail = SK_TRUE; + return (SK_AND_OTHER); } /* Check Duplex mismatch */ if ((ResAb & (PHY_X_RS_HD | PHY_X_RS_FD)) == PHY_X_RS_FD) { - pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOFULL ; - } else if ((ResAb & (PHY_X_RS_HD | PHY_X_RS_FD)) == PHY_X_RS_HD) { - pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOHALF ; - } else { + pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOFULL; + } + else if ((ResAb & (PHY_X_RS_HD | PHY_X_RS_FD)) == PHY_X_RS_HD) { + pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOHALF; + } + else { /* Error */ SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("AutoNegFail: Duplex mode mismatch port %d\n", Port)); - pPrt->PAutoNegFail = SK_TRUE ; - return (SK_AND_DUP_CAP) ; + pPrt->PAutoNegFail = SK_TRUE; + return (SK_AND_DUP_CAP); } /* Check PAUSE mismatch */ @@ -1575,25 +1693,29 @@ (LPAb & PHY_X_P_SYM_MD)) { /* Symmetric PAUSE */ pPrt->PFlowCtrlStatus = SK_FLOW_STAT_SYMMETRIC; - } else if (pPrt->PFlowCtrlMode == SK_FLOW_MODE_SYM_OR_REM && + } + else if (pPrt->PFlowCtrlMode == SK_FLOW_MODE_SYM_OR_REM && (LPAb & PHY_X_RS_PAUSE) == PHY_X_P_ASYM_MD) { /* Enable PAUSE receive, disable PAUSE transmit */ pPrt->PFlowCtrlStatus = SK_FLOW_STAT_REM_SEND; - } else if (pPrt->PFlowCtrlMode == SK_FLOW_MODE_LOC_SEND && + } + else if (pPrt->PFlowCtrlMode == SK_FLOW_MODE_LOC_SEND && (LPAb & PHY_X_RS_PAUSE) == PHY_X_P_BOTH_MD) { /* Disable PAUSE receive, enable PAUSE transmit */ pPrt->PFlowCtrlStatus = SK_FLOW_STAT_LOC_SEND; - } else { + } + else { /* PAUSE mismatch -> no PAUSE */ pPrt->PFlowCtrlStatus = SK_FLOW_STAT_NONE; } /* We checked everything and may now enable the link */ - pPrt->PAutoNegFail = SK_FALSE ; + pPrt->PAutoNegFail = SK_FALSE; SkXmRxTxEnable(pAC, IoC, Port); - return(SK_AND_OK) ; -} + return (SK_AND_OK); +} /* SkXmAutoNegDoneXmac*/ + /****************************************************************************** * @@ -1613,82 +1735,99 @@ static int SkXmAutoNegDoneBcom( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* Port Index (MAC_1 + n) */ +int Port) /* Port Index (MAC_1 + n) */ { SK_GEPORT *pPrt; - SK_U16 ResAb ; /* Resolved Ability */ - SK_U16 LPAb ; /* Link Partner Ability */ + SK_U16 LPAb; /* Link Partner Ability */ SK_U16 AuxStat; /* Auxiliary Status */ - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("AutoNegDoneBcom," - " Port %d\n",Port)); +#if 0 +01-Sep-2000 RA;:;: + SK_U16 ResAb; /* Resolved Ability */ +#endif /* 0 */ + + SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, + ("AutoNegDoneBcom, Port %d\n", Port)); pPrt = &pAC->GIni.GP[Port]; - /* Get PHY parameters */ + /* Get PHY parameters. */ PHY_READ(IoC, pPrt, Port, PHY_BCOM_AUNE_LP, &LPAb); +#if 0 +01-Sep-2000 RA;:;: PHY_READ(IoC, pPrt, Port, PHY_BCOM_1000T_STAT, &ResAb); +#endif /* 0 */ PHY_READ(IoC, pPrt, Port, PHY_BCOM_AUX_STAT, &AuxStat); if (LPAb & PHY_B_AN_RF) { - /* Remote fault bit is set */ - /* Error */ - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, + /* Remote fault bit is set: Error. */ + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL, ("AutoNegFail: Remote fault bit set Port %d\n", Port)); - pPrt->PAutoNegFail = SK_TRUE ; - return (SK_AND_OTHER) ; + pPrt->PAutoNegFail = SK_TRUE; + return (SK_AND_OTHER); } - /* Check Duplex mismatch */ + /* Check Duplex mismatch. */ if ((AuxStat & PHY_B_AS_AN_RES) == PHY_B_RES_1000FD) { - pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOFULL ; - } else if ((AuxStat & PHY_B_AS_AN_RES) == PHY_B_RES_1000HD) { - pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOHALF ; - } else { - /* Error */ + pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOFULL; + } + else if ((AuxStat & PHY_B_AS_AN_RES) == PHY_B_RES_1000HD) { + pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOHALF; + } + else { + /* Error. */ SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("AutoNegFail: Duplex mode mismatch port %d\n", Port)); - pPrt->PAutoNegFail = SK_TRUE ; - return (SK_AND_DUP_CAP) ; + pPrt->PAutoNegFail = SK_TRUE; + return (SK_AND_DUP_CAP); } - /* Check Master/Slave resolution */ - if (ResAb & (PHY_B_1000S_MSF)) { - /* Error */ - SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, +#if 0 +01-Sep-2000 RA;:;: + /* Check Master/Slave resolution. */ + if (ResAb & PHY_B_1000S_MSF) { + /* Error. */ + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_CTRL, ("Master/Slave Fault port %d\n", Port)); pPrt->PAutoNegFail = SK_TRUE; pPrt->PMSStatus = SK_MS_STAT_FAULT; return (SK_AND_OTHER); - } else if (ResAb & PHY_B_1000S_MSR) { - pPrt->PMSStatus = SK_MS_STAT_MASTER ; - } else { - pPrt->PMSStatus = SK_MS_STAT_SLAVE ; } + else if (ResAb & PHY_B_1000S_MSR) { + pPrt->PMSStatus = SK_MS_STAT_MASTER; + } + else { + pPrt->PMSStatus = SK_MS_STAT_SLAVE; + } +#endif /* 0 */ - /* Check PAUSE mismatch */ - /* We are NOT using chapter 4.23 of the Xaqti manual */ - /* We are using IEEE 802.3z/D5.0 Table 37-4 */ + /* Check PAUSE mismatch. */ + /* We are NOT using chapter 4.23 of the Xaqti manual. */ + /* We are using IEEE 802.3z/D5.0 Table 37-4. */ if ((AuxStat & (PHY_B_AS_PRR | PHY_B_AS_PRT)) == (PHY_B_AS_PRR | PHY_B_AS_PRT)) { - /* Symmetric PAUSE */ + /* Symmetric PAUSE. */ pPrt->PFlowCtrlStatus = SK_FLOW_STAT_SYMMETRIC; - } else if ((AuxStat & (PHY_B_AS_PRR | PHY_B_AS_PRT)) == PHY_B_AS_PRR) { - /* Enable PAUSE receive, disable PAUSE transmit */ + } + else if ((AuxStat & (PHY_B_AS_PRR | PHY_B_AS_PRT)) == PHY_B_AS_PRR) { + /* Enable PAUSE receive, disable PAUSE transmit. */ pPrt->PFlowCtrlStatus = SK_FLOW_STAT_REM_SEND; - } else if ((AuxStat & (PHY_B_AS_PRR | PHY_B_AS_PRT)) == PHY_B_AS_PRT) { - /* Disable PAUSE receive, enable PAUSE transmit */ + } + else if ((AuxStat & (PHY_B_AS_PRR | PHY_B_AS_PRT)) == PHY_B_AS_PRT) { + /* Disable PAUSE receive, enable PAUSE transmit. */ pPrt->PFlowCtrlStatus = SK_FLOW_STAT_LOC_SEND; - } else { - /* PAUSE mismatch -> no PAUSE */ + } + else { + /* PAUSE mismatch -> no PAUSE. */ pPrt->PFlowCtrlStatus = SK_FLOW_STAT_NONE; } - /* We checked everything and may now enable the link */ - pPrt->PAutoNegFail = SK_FALSE ; + /* We checked everything and may now enable the link. */ + pPrt->PAutoNegFail = SK_FALSE; SkXmRxTxEnable(pAC, IoC, Port); - return(SK_AND_OK) ; -} + return (SK_AND_OK); +} /* SkXmAutoNegDoneBcom*/ + /****************************************************************************** * @@ -1708,11 +1847,11 @@ static int SkXmAutoNegDoneLone( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* Port Index (MAC_1 + n) */ +int Port) /* Port Index (MAC_1 + n) */ { SK_GEPORT *pPrt; - SK_U16 ResAb ; /* Resolved Ability */ - SK_U16 LPAb ; /* Link Partner Ability */ + SK_U16 ResAb; /* Resolved Ability */ + SK_U16 LPAb; /* Link Partner Ability */ SK_U16 QuickStat; /* Auxiliary Status */ SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("AutoNegDoneLone" @@ -1729,15 +1868,16 @@ /* Error */ SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("AutoNegFail: Remote fault bit set Port %d\n", Port)); - pPrt->PAutoNegFail = SK_TRUE ; - return (SK_AND_OTHER) ; + pPrt->PAutoNegFail = SK_TRUE; + return (SK_AND_OTHER); } /* Check Duplex mismatch */ if (QuickStat & PHY_L_QS_DUP_MOD) { - pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOFULL ; - } else { - pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOHALF ; + pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOFULL; + } + else { + pPrt->PLinkModeStatus = SK_LMODE_STAT_AUTOHALF; } /* Check Master/Slave resolution */ @@ -1746,12 +1886,14 @@ SK_DBG_MSG(pAC,SK_DBGMOD_HWM,SK_DBGCAT_CTRL, ("Master/Slave Fault port %d\n", Port)); pPrt->PAutoNegFail = SK_TRUE; - pPrt->PMSStatus = SK_MS_STAT_FAULT ; + pPrt->PMSStatus = SK_MS_STAT_FAULT; return (SK_AND_OTHER); - } else if (ResAb & PHY_L_1000S_MSR) { - pPrt->PMSStatus = SK_MS_STAT_MASTER ; - } else { - pPrt->PMSStatus = SK_MS_STAT_SLAVE ; + } + else if (ResAb & PHY_L_1000S_MSR) { + pPrt->PMSStatus = SK_MS_STAT_MASTER; + } + else { + pPrt->PMSStatus = SK_MS_STAT_SLAVE; } /* Check PAUSE mismatch */ @@ -1793,11 +1935,12 @@ } /* We checked everything and may now enable the link */ - pPrt->PAutoNegFail = SK_FALSE ; + pPrt->PAutoNegFail = SK_FALSE; SkXmRxTxEnable(pAC, IoC, Port); - return(SK_AND_OK); -} + return (SK_AND_OK); +} /* SkXmAutoNegDoneLone */ + /****************************************************************************** * @@ -1819,11 +1962,12 @@ static int SkXmAutoNegDoneNat( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* Port Index (MAC_1 + n) */ +int Port) /* Port Index (MAC_1 + n) */ { /* todo: National */ - return(SK_AND_OK); -} + return (SK_AND_OK); +} /* SkXmAutoNegDoneNat*/ + /****************************************************************************** * @@ -1841,17 +1985,18 @@ int SkXmRxTxEnable( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port) /* Port Index (MAC_1 + n) */ +int Port) /* Port Index (MAC_1 + n) */ { SK_GEPORT *pPrt; - SK_U16 Reg ; /* 16bit register value */ + SK_U16 Reg; /* 16bit register value */ SK_U16 IntMask; /* XMac interrupt mask */ + SK_U16 SWord; pPrt = &pAC->GIni.GP[Port]; if (!pPrt->PHWLinkUp) { /* The Hardware link is NOT up */ - return(0) ; + return (0); } if ((pPrt->PLinkMode == SK_LMODE_AUTOHALF || @@ -1859,7 +2004,7 @@ pPrt->PLinkMode == SK_LMODE_AUTOBOTH) && pPrt->PAutoNegFail) { /* Autonegotiation is not done or failed */ - return(0) ; + return (0); } /* Set Dup Mode and Pause Mode */ @@ -1893,12 +2038,14 @@ } switch (pPrt->PhyType) { case SK_PHY_BCOM: - PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_INT_MASK, - PHY_B_DEF_MSK); + /* Workaround BCOM Errata (#10523) for all BCom Phys */ + /* Enable Power Management after link up */ + PHY_READ(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL, &SWord); + PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_AUX_CTRL, SWord & ~PHY_B_AC_DIS_PM); + PHY_WRITE(IoC, pPrt, Port, PHY_BCOM_INT_MASK, PHY_B_DEF_MSK); break; case SK_PHY_LONE: - PHY_WRITE(IoC, pPrt, Port, PHY_LONE_INT_ENAB, - PHY_L_DEF_MSK); + PHY_WRITE(IoC, pPrt, Port, PHY_LONE_INT_ENAB, PHY_L_DEF_MSK); break; case SK_PHY_NAT: /* todo National: @@ -1910,9 +2057,10 @@ XM_OUT16(IoC, Port, XM_MMU_CMD, Reg | XM_MMU_ENA_RX | XM_MMU_ENA_TX); return (0); -} +} /* SkXmRxTxEnable*/ #ifndef SK_DIAG + /****************************************************************************** * * SkXmIrq() - Interrupt service routine @@ -1938,11 +2086,12 @@ void SkXmIrq( SK_AC *pAC, /* adapter context */ SK_IOC IoC, /* IO context */ -int Port, /* Port Index (MAC_1 + n) */ +int Port, /* Port Index (MAC_1 + n) */ SK_U16 IStatus) /* Interrupt status read from the XMAC */ { SK_GEPORT *pPrt; SK_EVPARA Para; + SK_U16 IStatus2; pPrt = &pAC->GIni.GP[Port]; @@ -1954,7 +2103,7 @@ } /* - * LinkPartner Autonegable ? + * LinkPartner Autonegable? */ if (pPrt->PhyType == SK_PHY_XMAC) { SkXmAutoNegLipaXmac(pAC, IoC, Port, IStatus); @@ -1966,11 +2115,22 @@ if (!pPrt->PHWLinkUp) { /* Spurious XMAC interrupt */ SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ, - ("SkXmIrq: spurious interrupt on port %d\n", - Port)); + ("SkXmIrq: spurious interrupt on port %d\n", Port)); return; } + if (IStatus & XM_IS_INP_ASS) { + /* Reread ISR Register if link is not in sync */ + XM_IN16(IoC, Port, XM_ISRC, &IStatus2); + + SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_IRQ, + ("SkXmIrq: Link async. Double check port %d %x %x\n", + Port, IStatus, IStatus2)); + IStatus &= ~XM_IS_INP_ASS; + IStatus |= IStatus2; + + } + if (IStatus & XM_IS_LNK_AE) { /* not used GP0 is used instead */ } @@ -1992,7 +2152,7 @@ /* Start workaround Errata #2 timer */ SkTimerStart(pAC, IoC, &pAC->GIni.GP[Port].PWaTimer, - SK_WA_INA_TIME,SKGE_HWAC,SK_HWEV_WATIM,Para); + SK_WA_INA_TIME, SKGE_HWAC, SK_HWEV_WATIM, Para); } if (IStatus & XM_IS_RX_PAGE) { @@ -2031,7 +2191,7 @@ if (IStatus & XM_IS_TXF_UR) { /* may NOT happen -> error log */ SK_ERR_LOG(pAC, SK_ERRCL_HW , SKERR_SIRQ_E020, - SKERR_SIRQ_E020MSG) ; + SKERR_SIRQ_E020MSG); } if (IStatus & XM_IS_TX_COMP) { @@ -2042,7 +2202,8 @@ /* not served here */ } -} +} /* SkXmIrq*/ + #endif /* !SK_DIAG */ /* End of file */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/skfp/drvfbi.c linux.20p6/drivers/net/skfp/drvfbi.c --- linux.vanilla/drivers/net/skfp/drvfbi.c Sun Mar 25 17:31:23 2001 +++ linux.20p6/drivers/net/skfp/drvfbi.c Tue Jun 19 09:59:54 2001 @@ -849,7 +849,7 @@ #ifdef EISA -/*arrays with io adresses of dma controller length and adress registers*/ +/*arrays with io addresses of dma controller length and address registers*/ static const int cntr[8] = { 0x001,0x003,0x005,0x007,0,0x0c6,0x0ca,0x0ce } ; static const int base[8] = { 0x000,0x002,0x004,0x006,0,0x0c4,0x0c8,0x0cc } ; static const int page[8] = { 0x087,0x083,0x081,0x082,0,0x08b,0x089,0x08a } ; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/skfp/h/smc.h linux.20p6/drivers/net/skfp/h/smc.h --- linux.vanilla/drivers/net/skfp/h/smc.h Sun Mar 25 17:31:23 2001 +++ linux.20p6/drivers/net/skfp/h/smc.h Tue Jun 19 09:59:54 2001 @@ -297,7 +297,7 @@ #define RS_NORINGOP (1<< 5) /* no ring op */ #define RS_VERSION (1<< 4) /* SMT version mismatch */ #define RS_STUCKBYPASSS (1<< 3) /* stuck bypass */ -#define RS_EVENT (1<< 2) /* FDDI event occured */ +#define RS_EVENT (1<< 2) /* FDDI event occurred */ #define RS_RINGOPCHANGE (1<< 1) /* ring op changed */ #define RS_RES0 (1<< 0) /* reserved */ @@ -320,7 +320,7 @@ u_char evc_rep_required ; /* report required */ u_short evc_para ; /* SMT Para Number */ u_char *evc_cond_state ; /* condition state */ - u_char *evc_multiple ; /* multiple occurence */ + u_char *evc_multiple ; /* multiple occurrence */ } ; /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/skfp/pcmplc.c linux.20p6/drivers/net/skfp/pcmplc.c --- linux.vanilla/drivers/net/skfp/pcmplc.c Sun Mar 25 17:31:23 2001 +++ linux.20p6/drivers/net/skfp/pcmplc.c Tue Jun 19 09:59:54 2001 @@ -1722,7 +1722,7 @@ } if (cmd & PL_EBUF_ERR) { /* elastic buff. det. over-|underflow*/ /* - * Check whether the SRF Condition occured. + * Check whether the SRF Condition occurred. */ if (!plc->ebuf_cont && phy->mib->fddiPORTPCMState == PC8_ACTIVE){ /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/skfp/srf.c linux.20p6/drivers/net/skfp/srf.c --- linux.vanilla/drivers/net/skfp/srf.c Sun Mar 25 17:31:23 2001 +++ linux.20p6/drivers/net/skfp/srf.c Tue Jun 19 09:59:54 2001 @@ -197,7 +197,7 @@ struct s_srf_evc *evc ; int cond_asserted = 0 ; int cond_deasserted = 0 ; - int event_occured = 0 ; + int event_occurred = 0 ; int tsr ; int T_Limit = 2*TICKS_PER_SECOND ; @@ -246,7 +246,7 @@ *evc->evc_multiple = FALSE ; } smc->srf.any_report = TRUE ; - event_occured = TRUE ; + event_occurred = TRUE ; } #ifdef FDDI_MIB snmp_srf_event(smc,evc) ; @@ -268,7 +268,7 @@ break ; } /* SR01c */ - if (event_occured && tsr < T_Limit) { + if (event_occurred && tsr < T_Limit) { smc->srf.sr_state = SR1_HOLDOFF ; break ; } @@ -286,7 +286,7 @@ break ; } /* SR00d */ - if (event_occured && tsr >= T_Limit) { + if (event_occurred && tsr >= T_Limit) { smc->srf.TSR = smt_get_time() ; smt_send_srf(smc) ; break ; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/slip.h linux.20p6/drivers/net/slip.h --- linux.vanilla/drivers/net/slip.h Sun Mar 25 17:31:15 2001 +++ linux.20p6/drivers/net/slip.h Mon Jun 18 08:27:15 2001 @@ -89,7 +89,7 @@ int xdata, xbits; /* 6 bit slip controls */ #endif - unsigned int flags; /* Flag values/ mode etc */ + unsigned long flags; /* Flag values/ mode etc */ #define SLF_INUSE 0 /* Channel in use */ #define SLF_ESCAPE 1 /* ESC received */ #define SLF_ERROR 2 /* Parity, etc. error */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/sunhme.c linux.20p6/drivers/net/sunhme.c --- linux.vanilla/drivers/net/sunhme.c Sun Mar 25 17:37:35 2001 +++ linux.20p6/drivers/net/sunhme.c Tue May 8 15:49:13 2001 @@ -3019,27 +3019,23 @@ struct linux_sbus *sbus; struct linux_sbus_device *sdev; struct quattro *qp; + int i; if(qfe_sbus_list == NULL) goto found; for(qp = qfe_sbus_list; qp != NULL; qp = qp->next) { - for(sdev = qp->quattro_sbus_dev; - sdev != NULL; - sdev = sdev->next) { + for(i = 0, sdev = qp->quattro_sbus_dev; + (sdev != NULL) && (i < 4); + sdev = sdev->next, i++) { if(sdev == goal_sdev) return qp; } } for_each_sbus(sbus) { for_each_sbusdev(sdev, sbus) { - if(sdev->child != NULL) { - struct linux_sbus_device *p; - - for(p = sdev->child; p != NULL; p = p->next) - if(p == goal_sdev) - goto found; - } + if (sdev == goal_sdev) + goto found; } } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/syncppp.c linux.20p6/drivers/net/syncppp.c --- linux.vanilla/drivers/net/syncppp.c Sun Mar 25 17:31:20 2001 +++ linux.20p6/drivers/net/syncppp.c Mon Jun 18 08:23:48 2001 @@ -505,8 +505,10 @@ } /* Send Configure-Ack packet. */ sp->pp_loopcnt = 0; - sppp_cp_send (sp, PPP_LCP, LCP_CONF_ACK, - h->ident, len-4, h+1); + if (sp->lcp.state != LCP_STATE_OPENED) { + sppp_cp_send (sp, PPP_LCP, LCP_CONF_ACK, + h->ident, len-4, h+1); + } /* Change the state. */ switch (sp->lcp.state) { case LCP_STATE_CLOSED: @@ -522,7 +524,9 @@ sp->ipcp.state = IPCP_STATE_CLOSED; /* Initiate renegotiation. */ sppp_lcp_open (sp); - /* An ACK has already been sent. */ + /* Send ACK after our REQ in attempt to break loop */ + sppp_cp_send (sp, PPP_LCP, LCP_CONF_ACK, + h->ident, len-4, h+1); sp->lcp.state = LCP_STATE_ACK_SENT; break; } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/tulip.c linux.20p6/drivers/net/tulip.c --- linux.vanilla/drivers/net/tulip.c Sun Mar 25 17:37:35 2001 +++ linux.20p6/drivers/net/tulip.c Tue Jun 19 09:59:54 2001 @@ -2742,7 +2742,8 @@ (tp->link_change)(dev, csr5); } if (csr5 & SytemError) { - printk(KERN_ERR "%s: (%lu) System Error occured\n", dev->name, tp->nir); + printk(KERN_ERR "%s: (%lu) System Error occurred\n", + dev->name, tp->nir); } /* Clear all error sources, included undocumented ones! */ outl(0x0800f7ba, ioaddr + CSR5); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/net/via-rhine.c linux.20p6/drivers/net/via-rhine.c --- linux.vanilla/drivers/net/via-rhine.c Sun Mar 25 17:37:35 2001 +++ linux.20p6/drivers/net/via-rhine.c Fri May 4 23:27:30 2001 @@ -133,6 +133,8 @@ MODULE_PARM(options, "1-" __MODULE_STRING(MAX_UNITS) "i"); MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i"); +#define NETSTATS_VER2 + /* Theory of Operation diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/pci/oldproc.c linux.20p6/drivers/pci/oldproc.c --- linux.vanilla/drivers/pci/oldproc.c Sun Mar 25 17:31:36 2001 +++ linux.20p6/drivers/pci/oldproc.c Fri May 4 23:31:01 2001 @@ -1037,12 +1037,6 @@ static int complained = 0; # define MSG "\nwarning: page-size limit reached!\n" - if (!complained) { - complained++; - printk(KERN_INFO "%s uses obsolete /proc/pci interface\n", - current->comm); - } - /* reserve same for truncation warning message: */ size = PAGE_SIZE - (strlen(MSG) + 1); len = sprintf(buf, "PCI devices found:\n"); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/pci/proc.c linux.20p6/drivers/pci/proc.c --- linux.vanilla/drivers/pci/proc.c Sun Mar 25 17:31:36 2001 +++ linux.20p6/drivers/pci/proc.c Mon Jun 18 08:19:05 2001 @@ -195,18 +195,117 @@ return nbytes; } +struct pci_filp_private { + enum pci_mmap_state mmap_state; + int write_combine; +}; + +static int proc_bus_pci_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) +{ + const struct proc_dir_entry *dp = inode->u.generic_ip; + struct pci_dev *dev = dp->data; +#ifdef HAVE_PCI_MMAP + struct pci_filp_private *fpriv = file->private_data; +#endif /* HAVE_PCI_MMAP */ + int ret = 0; + + switch (cmd) { + case PCIIOC_CONTROLLER: + ret = pci_controller_num(dev); + break; + +#ifdef HAVE_PCI_MMAP + case PCIIOC_MMAP_IS_IO: + fpriv->mmap_state = pci_mmap_io; + break; + + case PCIIOC_MMAP_IS_MEM: + fpriv->mmap_state = pci_mmap_mem; + break; + + case PCIIOC_WRITE_COMBINE: + if (arg) + fpriv->write_combine = 1; + else + fpriv->write_combine = 0; + break; + +#endif /* HAVE_PCI_MMAP */ + + default: + ret = -EINVAL; + break; + }; + + return ret; +} + +#ifdef HAVE_PCI_MMAP +static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma) +{ + struct inode *inode = file->f_dentry->d_inode; + const struct proc_dir_entry *dp = inode->u.generic_ip; + struct pci_dev *dev = dp->data; + struct pci_filp_private *fpriv = file->private_data; + int ret; + + if (!capable(CAP_SYS_RAWIO)) + return -EPERM; + + ret = pci_mmap_page_range(dev, vma, + fpriv->mmap_state, + fpriv->write_combine); + if (ret < 0) + return ret; + + return 0; +} + +static int proc_bus_pci_open(struct inode *inode, struct file *file) +{ + struct pci_filp_private *fpriv = kmalloc(sizeof(*fpriv), GFP_KERNEL); + + if (!fpriv) + return -ENOMEM; + + fpriv->mmap_state = pci_mmap_io; + fpriv->write_combine = 0; + + file->private_data = fpriv; + + return 0; +} + +static int proc_bus_pci_release(struct inode *inode, struct file *file) +{ + kfree(file->private_data); + file->private_data = NULL; + + return 0; +} +#endif /* HAVE_PCI_MMAP */ + static struct file_operations proc_bus_pci_operations = { proc_bus_pci_lseek, proc_bus_pci_read, proc_bus_pci_write, - NULL, /* readdir */ - NULL, /* poll */ - NULL, /* ioctl */ - NULL, /* mmap */ - NULL, /* no special open code */ - NULL, /* flush */ - NULL, /* no special release code */ - NULL /* can't fsync */ + NULL, /* readdir */ + NULL, /* poll */ + proc_bus_pci_ioctl, /* ioctl */ +#ifdef HAVE_PCI_MMAP + proc_bus_pci_mmap, /* mmap */ + proc_bus_pci_open, /* open code */ +#else + NULL, /* mmap */ + NULL, /* no special open code */ +#endif + NULL, /* flush */ +#ifdef HAVE_PCI_MMAP + proc_bus_pci_release, /* release code */ +#else + NULL, /* no special release code */ +#endif + NULL /* can't fsync */ }; static struct inode_operations proc_bus_pci_inode_operations = { diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/s390/block/dasd_3990_erp.c linux.20p6/drivers/s390/block/dasd_3990_erp.c --- linux.vanilla/drivers/s390/block/dasd_3990_erp.c Sun Mar 25 17:37:35 2001 +++ linux.20p6/drivers/s390/block/dasd_3990_erp.c Tue Jun 19 09:59:54 2001 @@ -986,7 +986,7 @@ * * RETURN VALUES * erp erp-pointer to the already defined error recovery procedure OR - * NULL if a 'new' error occured. + * NULL if a 'new' error occurred. */ ccw_req_t * dasd_3990_erp_in_erp (ccw_req_t * cqr) @@ -1068,7 +1068,7 @@ * DASD_3990_ERP_HANDLE_MATCH_ERP * * DESCRIPTION - * An error occured again and an ERP has been detected which is already + * An error occurred again and an ERP has been detected which is already * used to handle this error (e.g. retries). * All prior ERP's are set to status DONE and the retry counter is * decremented. diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/s390/net/ctc.c linux.20p6/drivers/s390/net/ctc.c --- linux.vanilla/drivers/s390/net/ctc.c Sun Mar 25 17:37:35 2001 +++ linux.20p6/drivers/s390/net/ctc.c Tue Jun 19 09:59:54 2001 @@ -1109,7 +1109,7 @@ if (sense & 0x01) printk(KERN_DEBUG "%s: %s: Interface disconnect or Selective reset occurred (remote side)\n", dev->name, caller); else - printk(KERN_DEBUG "%s: %s: System reset occured (remote side)\n", dev->name, caller); + printk(KERN_DEBUG "%s: %s: System reset occurred (remote side)\n", dev->name, caller); #endif } else if (sense & 0x20) { if (sense & 0x04) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/sbus/char/aurora.c linux.20p6/drivers/sbus/char/aurora.c --- linux.vanilla/drivers/sbus/char/aurora.c Sun Mar 25 17:31:39 2001 +++ linux.20p6/drivers/sbus/char/aurora.c Mon Jun 18 08:19:48 2001 @@ -1556,33 +1556,58 @@ if (!tty || !port->xmit_buf || !tmp_buf) return 0; - if (from_user) + save_flags(flags); + if (from_user) { down(&tmp_buf_sem); + while (1) { + c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, + SERIAL_XMIT_SIZE - port->xmit_head)); + if (c <= 0) + break; - save_flags(flags); - while (1) { - cli(); - c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, - SERIAL_XMIT_SIZE - port->xmit_head)); - if (c <= 0) - break; + c -= copy_from_user(tmp_buf, buf, c); + if (!c) { + if (!total) + total = -EFAULT; + break; + } - if (from_user) { - copy_from_user(tmp_buf, buf, c); + cli(); c = MIN(c, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, SERIAL_XMIT_SIZE - port->xmit_head)); memcpy(port->xmit_buf + port->xmit_head, tmp_buf, c); - } else + port->xmit_head = (port->xmit_head + c) & (SERIAL_XMIT_SIZE-1); + port->xmit_cnt += c; + restore_flags(flags); + + buf += c; + count -= c; + total += c; + } + up(&tmp_buf_sem); + } else { + while (1) { + cli(); + c = MIN(count, MIN(SERIAL_XMIT_SIZE - port->xmit_cnt - 1, + SERIAL_XMIT_SIZE - port->xmit_head)); + if (c <= 0) { + restore_flags(flags); + break; + } + memcpy(port->xmit_buf + port->xmit_head, buf, c); - port->xmit_head = (port->xmit_head + c) & (SERIAL_XMIT_SIZE-1); - port->xmit_cnt += c; - restore_flags(flags); - buf += c; - count -= c; - total += c; + port->xmit_head = (port->xmit_head + c) & (SERIAL_XMIT_SIZE-1); + port->xmit_cnt += c; + restore_flags(flags); + + buf += c; + count -= c; + total += c; + } } - if (from_user) - up(&tmp_buf_sem); + + + cli(); if (port->xmit_cnt && !tty->stopped && !tty->hw_stopped && !(port->SRER & SRER_TXRDY)) { port->SRER |= SRER_TXRDY; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/sbus/char/aurora.h linux.20p6/drivers/sbus/char/aurora.h --- linux.vanilla/drivers/sbus/char/aurora.h Sun Mar 25 17:31:39 2001 +++ linux.20p6/drivers/sbus/char/aurora.h Mon Jun 18 08:27:15 2001 @@ -243,7 +243,7 @@ struct tty_struct * tty; int count; int blocked_open; - int event; + long event; int timeout; int close_delay; long session; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/sbus/char/envctrl.c linux.20p6/drivers/sbus/char/envctrl.c --- linux.vanilla/drivers/sbus/char/envctrl.c Sun Mar 25 17:31:39 2001 +++ linux.20p6/drivers/sbus/char/envctrl.c Tue Jun 19 09:59:54 2001 @@ -239,7 +239,7 @@ printk(KERN_INFO "envctrl: Busy bit will not clear.\n"); } -/* Function Description: Send the adress for a read access. +/* Function Description: Send the address for a read access. * Return : 0 if not acknowledged, otherwise acknowledged. */ static int envctrl_i2c_read_addr(unsigned char addr) @@ -265,7 +265,7 @@ } } -/* Function Description: Send the adress for write mode. +/* Function Description: Send the address for write mode. * Return : None. */ static void envctrl_i2c_write_addr(unsigned char addr) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/sbus/char/pcikbd.c linux.20p6/drivers/sbus/char/pcikbd.c --- linux.vanilla/drivers/sbus/char/pcikbd.c Sun Mar 25 17:31:39 2001 +++ linux.20p6/drivers/sbus/char/pcikbd.c Mon Jun 18 08:19:48 2001 @@ -1,4 +1,4 @@ -/* $Id: pcikbd.c,v 1.27.2.2 2000/01/21 01:05:45 davem Exp $ +/* $Id: pcikbd.c,v 1.27.2.4 2001/06/03 13:41:48 ecd Exp $ * pcikbd.c: Ultra/AX PC keyboard support. * * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) @@ -48,6 +48,7 @@ static int pcikbd_mrcoffee = 0; #else #define pcikbd_mrcoffee 0 +extern void (*prom_keyboard)(void); #endif static unsigned long pcikbd_iobase = 0; @@ -58,6 +59,9 @@ static volatile unsigned char acknowledge = 0; static volatile unsigned char resend = 0; +static void pcikbd_write(int address, int data); +static int pcikbd_wait_for_input(void); + unsigned char pckbd_read_mask = KBD_STAT_OBF; extern int pcikbd_init(void); @@ -250,7 +254,7 @@ e0_keys[scancode - 128]; } -int do_acknowledge(unsigned char scancode) +static int do_acknowledge(unsigned char scancode) { if(reply_expected) { if(scancode == KBD_REPLY_ACK) { @@ -266,10 +270,87 @@ return 1; } +#ifdef __sparc_v9__ +static void pcikbd_enter_prom(void) +{ + pcikbd_write(KBD_DATA_REG, KBD_CMD_DISABLE); + if(pcikbd_wait_for_input() != KBD_REPLY_ACK) + printk("Prom Enter: Disable keyboard: no ACK\n"); + + /* Disable PC scancode translation */ + pcikbd_write(KBD_CNTL_REG, KBD_CCMD_WRITE_MODE); + pcikbd_write(KBD_DATA_REG, KBD_MODE_SYS); + pcikbd_write(KBD_DATA_REG, KBD_CMD_ENABLE); + if (pcikbd_wait_for_input() != KBD_REPLY_ACK) + printk("Prom Enter: Enable Keyboard: no ACK\n"); +} +#endif + +static void ctrl_break(void) +{ + extern int stop_a_enabled; + unsigned long timeout; + int status, data; + int mode; + + if (!stop_a_enabled) + return; + + pcikbd_write(KBD_DATA_REG, KBD_CMD_DISABLE); + if(pcikbd_wait_for_input() != KBD_REPLY_ACK) + printk("Prom Enter: Disable keyboard: no ACK\n"); + + /* Save current mode register settings */ + pcikbd_write(KBD_CNTL_REG, KBD_CCMD_READ_MODE); + if ((mode = pcikbd_wait_for_input()) == -1) + printk("Prom Enter: Read Mode: no ACK\n"); + + /* Disable PC scancode translation */ + pcikbd_write(KBD_CNTL_REG, KBD_CCMD_WRITE_MODE); + pcikbd_write(KBD_DATA_REG, mode & ~(KBD_MODE_KCC)); + pcikbd_write(KBD_DATA_REG, KBD_CMD_ENABLE); + if (pcikbd_wait_for_input() != KBD_REPLY_ACK) + printk("Prom Enter: Enable Keyboard: no ACK\n"); + + /* Drop into OBP. + * Note that we must flush the user windows + * first before giving up control. + */ + flush_user_windows(); + prom_cmdline(); + + /* Read prom's key up event (use short timeout) */ + do { + timeout = 10; + do { + mdelay(1); + status = pcikbd_inb(pcikbd_iobase + KBD_STATUS_REG); + if (!(status & KBD_STAT_OBF)) + continue; + data = pcikbd_inb(pcikbd_iobase + KBD_DATA_REG); + if (status & (KBD_STAT_GTO | KBD_STAT_PERR)) + continue; + break; + } while (--timeout > 0); + } while (timeout > 0); + + /* Reenable PC scancode translation */ + pcikbd_write(KBD_DATA_REG, KBD_CMD_DISABLE); + if(pcikbd_wait_for_input() != KBD_REPLY_ACK) + printk("Prom Leave: Disable keyboard: no ACK\n"); + + pcikbd_write(KBD_CNTL_REG, KBD_CCMD_WRITE_MODE); + pcikbd_write(KBD_DATA_REG, mode); + pcikbd_write(KBD_DATA_REG, KBD_CMD_ENABLE); + if (pcikbd_wait_for_input() != KBD_REPLY_ACK) + printk("Prom Enter: Enable Keyboard: no ACK\n"); +} + int pcikbd_translate(unsigned char scancode, unsigned char *keycode, char raw_mode) { static int prev_scancode = 0; + int down = scancode & 0x80 ? 0 : 1; if (scancode == 0xe0 || scancode == 0xe1) { prev_scancode = scancode; @@ -308,6 +389,18 @@ } else *keycode = scancode; + + if (*keycode == E0_BREAK) { + if (down) + return 0; + + /* Handle ctrl-break event */ + ctrl_break(); + + /* Send ctrl up event to the keyboard driver */ + *keycode = 0x1d; + } + return 1; } @@ -367,7 +460,7 @@ } -__initfunc(static int pcikbd_wait_for_input(void)) +static int pcikbd_wait_for_input(void) { int status, data; unsigned long start = jiffies; @@ -384,7 +477,7 @@ return -1; } -__initfunc(static void pcikbd_write(int address, int data)) +static void pcikbd_write(int address, int data) { int status; @@ -570,6 +663,8 @@ printk("8042(speaker): iobase[%016lx]%s\n", pcibeep_iobase, edev ? "" : " (forced)"); } + + prom_keyboard = pcikbd_enter_prom; #endif disable_irq(pcikbd_irq); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/sbus/char/sab82532.c linux.20p6/drivers/sbus/char/sab82532.c --- linux.vanilla/drivers/sbus/char/sab82532.c Sun Mar 25 17:31:39 2001 +++ linux.20p6/drivers/sbus/char/sab82532.c Mon Jun 18 08:19:48 2001 @@ -1,4 +1,4 @@ -/* $Id: sab82532.c,v 1.30.2.4 2000/05/27 04:46:34 davem Exp $ +/* $Id: sab82532.c,v 1.30.2.7 2001/05/29 06:17:24 ecd Exp $ * sab82532.c: ASYNC Driver for the SIEMENS SAB82532 DUSCC. * * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) @@ -54,9 +54,12 @@ /* Set of debugging defines */ #undef SERIAL_DEBUG_OPEN #undef SERIAL_DEBUG_FLOW +#undef SERIAL_DEBUG_MODEM #undef SERIAL_DEBUG_WAIT_UNTIL_SENT #undef SERIAL_DEBUG_SEND_BREAK #undef SERIAL_DEBUG_INTR +#undef SERIAL_DEBUG_FIFO +#define SERIAL_DEBUG_OVERFLOW 1 /* Trace things on serial device, useful for console debugging: */ #undef SERIAL_LOG_DEVICE @@ -194,10 +197,14 @@ if (info->xmit_cnt <= 0) goto out; - if (!(info->regs->r.star & SAB82532_STAR_XFW)) + if (!test_bit(SAB82532_XPR, &info->irqflags)) goto out; - info->all_sent = 0; + info->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS); + info->regs->w.imr1 = info->interrupt_mask1; + clear_bit(SAB82532_ALLS, &info->irqflags); + + clear_bit(SAB82532_XPR, &info->irqflags); for (i = 0; i < info->xmit_fifo_size; i++) { info->regs->w.xfifo[i] = info->xmit_buf[info->xmit_tail++]; info->xmit_tail &= (SERIAL_XMIT_SIZE - 1); @@ -318,15 +325,15 @@ * This routine is used by the interrupt handler to schedule * processing in the software interrupt portion of the driver. */ -static inline void sab82532_sched_event(struct sab82532 *info, int event) +static void sab82532_sched_event(struct sab82532 *info, int event) { info->event |= 1 << event; queue_task(&info->tqueue, &tq_serial); mark_bh(SERIAL_BH); } -static inline void receive_chars(struct sab82532 *info, - union sab82532_irq_status *stat) +static void receive_chars(struct sab82532 *info, + union sab82532_irq_status *stat) { struct tty_struct *tty = info->tty; unsigned char buf[32]; @@ -353,7 +360,7 @@ } if (stat->sreg.isr0 & SAB82532_ISR0_RFO) { -#if 1 +#ifdef SERIAL_DEBUG_OVERFLOW printk("sab82532: receive_chars: RFO"); #endif free_fifo++; @@ -377,7 +384,7 @@ for (i = 0; i < count; ) { if (tty->flip.count >= TTY_FLIPBUF_SIZE) { -#if 1 +#ifdef SERIAL_DEBUG_OVERFLOW printk("sab82532: receive_chars: tty overrun\n"); #endif info->icount.buf_overrun++; @@ -411,16 +418,29 @@ queue_task(&tty->flip.tqueue, &tq_timer); } -static inline void transmit_chars(struct sab82532 *info, - union sab82532_irq_status *stat) +static void transmit_chars(struct sab82532 *info, + union sab82532_irq_status *stat) { int i; - if (stat->sreg.isr1 & SAB82532_ISR1_ALLS) - info->all_sent = 1; - if (!(info->regs->r.star & SAB82532_STAR_XFW)) + if (stat->sreg.isr1 & SAB82532_ISR1_ALLS) { + info->interrupt_mask1 |= SAB82532_IMR1_ALLS; + info->regs->w.imr1 = info->interrupt_mask1; + set_bit(SAB82532_ALLS, &info->irqflags); + } + + if (!(stat->sreg.isr1 & SAB82532_ISR1_XPR)) return; + if (!(info->regs->r.star & SAB82532_STAR_XFW)) { +#ifdef SERIAL_DEBUG_FIFO + printk("%s: XPR, but no XFW (???)\n", __FUNCTION__); +#endif + return; + } + + set_bit(SAB82532_XPR, &info->irqflags); + if (!info->tty) { info->interrupt_mask1 |= SAB82532_IMR1_XPR; info->regs->w.imr1 = info->interrupt_mask1; @@ -434,8 +454,12 @@ return; } + info->interrupt_mask1 &= ~(SAB82532_IMR1_ALLS); + info->regs->w.imr1 = info->interrupt_mask1; + clear_bit(SAB82532_ALLS, &info->irqflags); + /* Stuff 32 bytes into Transmit FIFO. */ - info->all_sent = 0; + clear_bit(SAB82532_XPR, &info->irqflags); for (i = 0; i < info->xmit_fifo_size; i++) { info->regs->w.xfifo[i] = info->xmit_buf[info->xmit_tail++]; info->xmit_tail &= (SERIAL_XMIT_SIZE - 1); @@ -455,14 +479,10 @@ #ifdef SERIAL_DEBUG_INTR printk("THRE..."); #endif - if (info->xmit_cnt <= 0) { - info->interrupt_mask1 |= SAB82532_IMR1_XPR; - info->regs->w.imr1 = info->interrupt_mask1; - } } -static inline void check_status(struct sab82532 *info, - union sab82532_irq_status *stat) +static void check_status(struct sab82532 *info, + union sab82532_irq_status *stat) { struct tty_struct *tty = info->tty; int modem_change = 0; @@ -501,7 +521,7 @@ info->dcd = (info->regs->r.vstr & SAB82532_VSTR_CD) ? 0 : 1; info->icount.dcd++; modem_change++; -#if 0 +#ifdef SERIAL_DEBUG_MODEM printk("DCD change: %d\n", info->icount.dcd); #endif } @@ -509,7 +529,7 @@ info->cts = info->regs->r.star & SAB82532_STAR_CTS; info->icount.cts++; modem_change++; -#if 0 +#ifdef SERIAL_DEBUG_MODEM printk("CTS change: %d, CTS %s\n", info->icount.cts, info->cts ? "on" : "off"); #endif } @@ -517,7 +537,7 @@ info->dsr = (info->regs->r.pvr & info->pvr_dsr_bit) ? 0 : 1; info->icount.dsr++; modem_change++; -#if 0 +#ifdef SERIAL_DEBUG_MODEM printk("DSR change: %d\n", info->icount.dsr); #endif } @@ -808,15 +828,19 @@ info->interrupt_mask0 = SAB82532_IMR0_PERR | SAB82532_IMR0_FERR | SAB82532_IMR0_PLLA; info->regs->w.imr0 = info->interrupt_mask0; - info->interrupt_mask1 = SAB82532_IMR1_BRKT | SAB82532_IMR1_XOFF | - SAB82532_IMR1_TIN | SAB82532_IMR1_XON | + info->interrupt_mask1 = SAB82532_IMR1_BRKT | SAB82532_IMR1_ALLS | + SAB82532_IMR1_XOFF | SAB82532_IMR1_TIN | + SAB82532_IMR1_CSC | SAB82532_IMR1_XON | SAB82532_IMR1_XPR; info->regs->w.imr1 = info->interrupt_mask1; + set_bit(SAB82532_ALLS, &info->irqflags); if (info->tty) clear_bit(TTY_IO_ERROR, &info->tty->flags); info->xmit_cnt = info->xmit_head = info->xmit_tail = 0; + set_bit(SAB82532_XPR, &info->irqflags); + /* * and set the speed of the serial port */ @@ -1019,10 +1043,14 @@ info->regs->rw.mode &= ~(SAB82532_MODE_RTS); info->regs->rw.mode |= SAB82532_MODE_FRTS; info->regs->rw.mode &= ~(SAB82532_MODE_FCTS); + info->interrupt_mask1 &= ~(SAB82532_IMR1_CSC); + info->regs->w.imr1 = info->interrupt_mask1; } else { info->regs->rw.mode |= SAB82532_MODE_RTS; info->regs->rw.mode &= ~(SAB82532_MODE_FRTS); info->regs->rw.mode |= SAB82532_MODE_FCTS; + info->interrupt_mask1 |= SAB82532_IMR1_CSC; + info->regs->w.imr1 = info->interrupt_mask1; } info->regs->rw.mode |= SAB82532_MODE_RAC; restore_flags(flags); @@ -1204,10 +1232,11 @@ if (I_IXOFF(tty)) sab82532_send_xchar(tty, STOP_CHAR(tty)); -#if 0 - if (tty->termios->c_cflag & CRTSCTS) - info->regs->rw.mode |= SAB82532_MODE_RTS; -#endif + + if (tty->termios->c_cflag & CRTSCTS) { + info->regs->rw.mode &= ~(SAB82532_MODE_FRTS | + SAB82532_MODE_RTS); + } } static void sab82532_unthrottle(struct tty_struct * tty) @@ -1230,10 +1259,12 @@ sab82532_send_xchar(tty, START_CHAR(tty)); } -#if 0 - if (tty->termios->c_cflag & CRTSCTS) - info->regs->rw.mode &= ~(SAB82532_MODE_RTS); -#endif + if (tty->termios->c_cflag & CRTSCTS) { + u8 mode = info->regs->r.mode; + mode &= ~(SAB82532_MODE_RTS); + mode |= SAB82532_MODE_FRTS; + info->regs->w.mode = mode; + } } /* @@ -1287,7 +1318,8 @@ { unsigned int result; - result = (!info->xmit_buf && info->all_sent) ? TIOCSER_TEMT : 0; + result = (!info->xmit_buf && test_bit(SAB82532_ALLS, &info->irqflags)) + ? TIOCSER_TEMT : 0; return put_user(result, value); } @@ -1515,10 +1547,19 @@ if (!(old_termios->c_cflag & CBAUD) && (tty->termios->c_cflag & CBAUD)) { info->regs->w.pvr &= ~(info->pvr_dtr_bit); - if (!tty->hw_stopped || - !(tty->termios->c_cflag & CRTSCTS)) { - info->regs->w.mode &= ~(SAB82532_MODE_FRTS); - info->regs->w.mode |= SAB82532_MODE_RTS; + if (!tty->hw_stopped) { + u8 mode = info->regs->r.mode; + if (tty->termios->c_cflag & CRTSCTS) { + mode &= ~(SAB82532_MODE_RTS); + mode |= SAB82532_MODE_FRTS; + } else if (test_bit(TTY_THROTTLED, &tty->flags)) { + mode &= ~(SAB82532_MODE_FRTS | + SAB82532_MODE_RTS); + } else { + mode &= ~(SAB82532_MODE_FRTS); + mode |= SAB82532_MODE_RTS; + } + info->regs->w.mode = mode; } } @@ -1528,18 +1569,6 @@ tty->hw_stopped = 0; sab82532_start(tty); } - -#if 0 - /* - * No need to wake up processes in open wait, since they - * sample the CLOCAL flag once, and don't recheck it. - * XXX It's not clear whether the current behavior is correct - * or not. Hence, this may change..... - */ - if (!(old_termios->c_cflag & CLOCAL) && - (tty->termios->c_cflag & CLOCAL)) - wake_up_interruptible(&info->open_wait); -#endif } /* @@ -1617,9 +1646,6 @@ */ info->interrupt_mask0 |= SAB82532_IMR0_TCD; info->regs->w.imr0 = info->interrupt_mask0; -#if 0 - info->regs->rw.mode &= ~(SAB82532_MODE_RAC); -#endif if (info->flags & ASYNC_INITIALIZED) { /* * Before we drop DTR, make sure the UART transmitter @@ -1661,7 +1687,6 @@ if (serial_paranoia_check(info,tty->device,"sab82532_wait_until_sent")) return; - orig_jiffies = jiffies; /* * Set the check interval to be 1/5 of the estimated time to * send a single character, and make it at least 1. The check @@ -1677,10 +1702,14 @@ if (timeout) char_time = MIN(char_time, timeout); #ifdef SERIAL_DEBUG_WAIT_UNTIL_SENT - printk("In sab82532_wait_until_sent(%d) check=%lu...", timeout, char_time); - printk("jiff=%lu...", jiffies); + printk("In sab82532_wait_until_sent(%d) check=%lu " + "xmit_cnt = %ld, alls = %d (jiff=%lu)...\n", + timeout, char_time, info->xmit_cnt, + test_bit(SAB82532_ALLS, &info->irqflags), jiffies); #endif - while (info->xmit_cnt || !info->all_sent) { + orig_jiffies = jiffies; + while (info->xmit_cnt || + !test_bit(SAB82532_ALLS, &info->irqflags)) { current->state = TASK_INTERRUPTIBLE; current->counter = 0; schedule_timeout(char_time); @@ -1691,7 +1720,9 @@ } current->state = TASK_RUNNING; #ifdef SERIAL_DEBUG_WAIT_UNTIL_SENT - printk("xmit_cnt = %d, alls = %d (jiff=%lu)...done\n", info->xmit_cnt, info->all_sent, jiffies); + printk("xmit_cnt = %d, alls = %d (jiff=%lu)...done\n", + info->xmit_cnt, test_bit(SAB82532_ALLS, &info->irqflags), + jiffies); #endif } @@ -2146,7 +2177,7 @@ __initfunc(static inline void show_serial_version(void)) { - char *revision = "$Revision: 1.30.2.4 $"; + char *revision = "$Revision: 1.30.2.7 $"; char *version, *p; version = strchr(revision, ' '); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/sbus/char/su.c linux.20p6/drivers/sbus/char/su.c --- linux.vanilla/drivers/sbus/char/su.c Sun Mar 25 17:31:39 2001 +++ linux.20p6/drivers/sbus/char/su.c Mon Jun 18 08:19:48 2001 @@ -1,4 +1,4 @@ -/* $Id: su.c,v 1.18.2.7 2000/05/27 04:46:34 davem Exp $ +/* $Id: su.c,v 1.18.2.8 2001/05/16 08:37:26 davem Exp $ * su.c: Small serial driver for keyboard/mouse interface on sparc32/PCI * * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) @@ -1411,6 +1411,41 @@ */ /* + * get_serial_info - handle TIOCGSERIAL ioctl() + * + * Purpose: Return standard serial struct information about + * a serial port handled by this driver. + * + * Added: 11-May-2001 Lars Kellogg-Stedman + */ +static int get_serial_info(struct su_struct * info, + struct serial_struct * retinfo) +{ + struct serial_struct tmp; + + if (!retinfo) + return -EFAULT; + memset(&tmp, 0, sizeof(tmp)); + + tmp.type = info->type; + tmp.line = info->line; + tmp.port = info->port; + tmp.irq = info->irq; + tmp.flags = info->flags; + tmp.xmit_fifo_size = info->xmit_fifo_size; + tmp.baud_base = info->baud_base; + tmp.close_delay = info->close_delay; + tmp.closing_wait = info->closing_wait; + tmp.custom_divisor = info->custom_divisor; + tmp.hub6 = 0; + + if (copy_to_user(retinfo,&tmp,sizeof(*retinfo))) + return -EFAULT; + + return 0; +} + +/* * get_lsr_info - get line status register info * * Purpose: Let user call ioctl() to get info when the UART physically @@ -1568,6 +1603,9 @@ case TIOCMSET: return set_modem_info(info, cmd, (unsigned int *) arg); + case TIOCGSERIAL: + return get_serial_info(info, (struct serial_struct *)arg); + case TIOCSERGETLSR: /* Get line status register */ return get_lsr_info(info, (unsigned int *) arg); @@ -2226,7 +2264,7 @@ */ __initfunc(static __inline__ void show_su_version(void)) { - char *revision = "$Revision: 1.18.2.7 $"; + char *revision = "$Revision: 1.18.2.8 $"; char *version, *p; version = strchr(revision, ' '); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/sbus/char/zs.c linux.20p6/drivers/sbus/char/zs.c --- linux.vanilla/drivers/sbus/char/zs.c Sun Mar 25 17:37:35 2001 +++ linux.20p6/drivers/sbus/char/zs.c Mon Jun 18 08:19:48 2001 @@ -1,4 +1,4 @@ -/* $Id: zs.c,v 1.41.2.7 2001/01/03 08:07:04 ecd Exp $ +/* $Id: zs.c,v 1.41.2.9 2001/05/09 07:47:10 davem Exp $ * zs.c: Zilog serial port driver for the Sparc. * * Copyright (C) 1995 David S. Miller (davem@caip.rutgers.edu) @@ -173,7 +173,7 @@ * buffer across all the serial ports, since it significantly saves * memory if large numbers of serial ports are open. */ -static unsigned char tmp_buf[4096]; /* This is cheating */ +static unsigned char tmp_buf[SERIAL_XMIT_SIZE]; /* This is cheating */ static struct semaphore tmp_buf_sem = MUTEX; static inline int serial_paranoia_check(struct sun_serial *info, @@ -1109,28 +1109,53 @@ return 0; save_flags(flags); - while (1) { - cli(); - c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, - SERIAL_XMIT_SIZE - info->xmit_head)); - if (c <= 0) - break; + if (from_user) { + down(&tmp_buf_sem); + while (1) { + c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, + SERIAL_XMIT_SIZE - info->xmit_head)); + if (c <= 0) + break; + + c -= copy_from_user(tmp_buf, buf, c); + if (!c) { + if (!total) + total = -EFAULT; + break; + } - if (from_user) { - down(&tmp_buf_sem); - copy_from_user(tmp_buf, buf, c); + cli(); c = MIN(c, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, SERIAL_XMIT_SIZE - info->xmit_head)); memcpy(info->xmit_buf + info->xmit_head, tmp_buf, c); - up(&tmp_buf_sem); - } else + info->xmit_head = (info->xmit_head + c) & (SERIAL_XMIT_SIZE-1); + info->xmit_cnt += c; + restore_flags(flags); + + buf += c; + count -= c; + total += c; + } + up(&tmp_buf_sem); + } else { + while (1) { + cli(); + c = MIN(count, MIN(SERIAL_XMIT_SIZE - info->xmit_cnt - 1, + SERIAL_XMIT_SIZE - info->xmit_head)); + if (c <= 0) { + restore_flags(flags); + break; + } + memcpy(info->xmit_buf + info->xmit_head, buf, c); - info->xmit_head = (info->xmit_head + c) & (SERIAL_XMIT_SIZE-1); - info->xmit_cnt += c; - restore_flags(flags); - buf += c; - count -= c; - total += c; + info->xmit_head = (info->xmit_head + c) & (SERIAL_XMIT_SIZE-1); + info->xmit_cnt += c; + restore_flags(flags); + + buf += c; + count -= c; + total += c; + } } cli(); @@ -1856,7 +1881,7 @@ static void show_serial_version(void) { - char *revision = "$Revision: 1.41.2.7 $"; + char *revision = "$Revision: 1.41.2.9 $"; char *version, *p; version = strchr(revision, ' '); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/3w-xxxx.c linux.20p6/drivers/scsi/3w-xxxx.c --- linux.vanilla/drivers/scsi/3w-xxxx.c Sun Mar 25 17:37:35 2001 +++ linux.20p6/drivers/scsi/3w-xxxx.c Mon Jun 18 08:26:11 2001 @@ -5,7 +5,6 @@ Modifications By: Joel Jacobson Arnaldo Carvalho de Melo - Copyright (C) 1999-2001 3ware Inc. Kernel compatablity By: Andre Hedrick @@ -77,6 +76,20 @@ Make tw_setfeature() call with interrupts disabled. Register interrupt handler before enabling interrupts. Clear attention interrupt before draining aen queue. + 1.02.00.005 - Allocate bounce buffers and custom queue depth for raid5 for + 6000 and 5000 series controllers. + Reduce polling mdelays causing problems on some systems. + Fix use_sg = 1 calculation bug. + Check for scsi_register returning NULL. + Add aen count to /proc/scsi/3w-xxxx. + Remove aen code unit masking in tw_aen_complete(). + 1.02.00.006 - Remove unit from printk in tw_scsi_eh_abort(), causing + possible oops. + Fix possible null pointer dereference in tw_scsi_queue() + if done function pointer was invalid. + 1.02.00.007 - Fix possible null pointer dereferences in tw_ioctl(). + Remove check for invalid done function pointer from + tw_scsi_queue(). */ #include @@ -128,7 +141,7 @@ }; /* Globals */ -char *tw_driver_version="1.02.00.004"; +char *tw_driver_version="1.02.00.007"; TW_Device_Extension *tw_device_extension_list[TW_MAX_SLOT]; int tw_device_extension_count = 0; @@ -138,7 +151,7 @@ int tw_aen_complete(TW_Device_Extension *tw_dev, int request_id) { TW_Param *param; - unsigned short aen, aen_code; + unsigned short aen; if (tw_dev->alignment_virtual_address[request_id] == NULL) { printk(KERN_WARNING "3w-xxxx: tw_aen_complete(): Bad alignment virtual address.\n"); @@ -146,10 +159,11 @@ } param = (TW_Param *)tw_dev->alignment_virtual_address[request_id]; aen = *(unsigned short *)(param->data); - aen_code = (aen & 0x0ff); - dprintk(KERN_NOTICE "3w-xxxx: tw_aen_complete(): Queue'd code 0x%x\n", aen_code); + dprintk(KERN_NOTICE "3w-xxxx: tw_aen_complete(): Queue'd code 0x%x\n", aen); + tw_dev->aen_count++; + /* Now queue the code */ - tw_dev->aen_queue[tw_dev->aen_tail] = aen_code; + tw_dev->aen_queue[tw_dev->aen_tail] = aen; if (tw_dev->aen_tail == TW_Q_LENGTH - 1) { tw_dev->aen_tail = TW_Q_START; } else { @@ -248,7 +262,7 @@ /* Now poll for completion */ for (i=0;icommand_packet_virtual_address[request_id] = virt_addr; - tw_dev->command_packet_physical_address[request_id] = - virt_to_bus(virt_addr); - } else { - tw_dev->alignment_virtual_address[request_id] = virt_addr; - tw_dev->alignment_physical_address[request_id] = - virt_to_bus(virt_addr); + switch(which) { + case 0: + tw_dev->command_packet_virtual_address[request_id] = virt_addr; + tw_dev->command_packet_physical_address[request_id] = + virt_to_bus(virt_addr); + break; + case 1: + tw_dev->alignment_virtual_address[request_id] = virt_addr; + tw_dev->alignment_physical_address[request_id] = + virt_to_bus(virt_addr); + break; + case 2: + tw_dev->bounce_buffer[request_id] = virt_addr; + break; + default: + printk(KERN_WARNING "3w-xxxx: tw_allocate_memory(): case slip in tw_allocate_memory()\n"); + return 1; } return 0; } /* End tw_allocate_memory() */ @@ -708,7 +730,7 @@ kfree(tw_dev); continue; } - + /* Calculate max cmds per lun */ if (tw_dev->num_units > 0) tw_host->cmd_per_lun = (TW_Q_LENGTH-2)/tw_dev->num_units; @@ -716,7 +738,13 @@ /* Register the card with the kernel SCSI layer */ host = scsi_register(tw_host, sizeof(TW_Device_Extension)); - /* FIXME - check for NULL */ + if (host == NULL) { + printk(KERN_WARNING "3w-xxxx: tw_findcards(): scsi_register() failed for card %d.\n", numcards-1); + release_region((tw_dev->tw_pci_dev->base_address[0]), TW_IO_ADDRESS_RANGE); + tw_free_device_extension(tw_dev); + kfree(tw_dev); + continue; + } status_reg_value = inl(tw_dev->registers.status_reg_addr); @@ -787,6 +815,9 @@ if (tw_dev->alignment_virtual_address[i]) kfree(tw_dev->alignment_virtual_address[i]); + + if (tw_dev->bounce_buffer[i]) + kfree(tw_dev->bounce_buffer[i]); } } /* End tw_free_device_extension() */ @@ -852,7 +883,7 @@ /* Poll for completion */ imax = TW_POLL_MAX_RETRIES; for (i=0;iaen_queue[i] = 0; } - for (i=0;iis_unit_present[i] = 0; + tw_dev->is_raid_five[i] = 0; + } tw_dev->num_units = 0; tw_dev->num_aborts = 0; @@ -927,6 +960,8 @@ tw_dev->aen_tail = 0; tw_dev->sector_count = 0; tw_dev->max_sector_count = 0; + tw_dev->aen_count = 0; + tw_dev->num_raid_five = 0; spin_lock_init(&tw_dev->tw_lock); return 0; } /* End tw_initialize_device_extension() */ @@ -938,13 +973,14 @@ unsigned char request_id = 0; TW_Command *command_packet; TW_Param *param; - int i, imax, num_units = 0; + int i, j, imax, num_units = 0, num_raid_five = 0; u32 status_reg_addr, status_reg_value; u32 command_que_addr, command_que_value; u32 response_que_addr; TW_Response_Queue response_queue; u32 param_value; unsigned char *is_unit_present; + unsigned char *raid_level; dprintk(KERN_NOTICE "3w-xxxx: tw_initialize_units()\n"); @@ -999,7 +1035,7 @@ /* Poll for completion */ imax = TW_POLL_MAX_RETRIES; for(i=0; iis_unit_present[j] == 0) + continue; + command_packet = (TW_Command *)tw_dev->command_packet_virtual_address[request_id]; + if (command_packet == NULL) { + printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Bad command packet virtual address.\n"); + return 1; + } + memset(command_packet, 0, sizeof(TW_Sector)); + command_packet->byte0.opcode = TW_OP_GET_PARAM; + command_packet->byte0.sgl_offset = 2; + command_packet->size = 4; + command_packet->request_id = request_id; + command_packet->byte3.unit = 0; + command_packet->byte3.host_id = 0; + command_packet->status = 0; + command_packet->flags = 0; + command_packet->byte6.block_count = 1; + + /* Now setup the param */ + if (tw_dev->alignment_virtual_address[request_id] == NULL) { + printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Bad alignment virtual address.\n"); + return 1; + } + param = (TW_Param *)tw_dev->alignment_virtual_address[request_id]; + memset(param, 0, sizeof(TW_Sector)); + param->table_id = 0x300+j; /* unit summary table */ + param->parameter_id = 0x6; /* unit descriptor */ + param->parameter_size_bytes = 0xc; + param_value = tw_dev->alignment_physical_address[request_id]; + if (param_value == 0) { + printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Bad alignment physical address.\n"); + return 1; + } + + command_packet->byte8.param.sgl[0].address = param_value; + command_packet->byte8.param.sgl[0].length = sizeof(TW_Sector); + + /* Post the command packet to the board */ + command_que_value = tw_dev->command_packet_physical_address[request_id]; + if (command_que_value == 0) { + printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Bad command packet physical address.\n"); + return 1; + } + outl(command_que_value, command_que_addr); + + /* Poll for completion */ + imax = TW_POLL_MAX_RETRIES; + for(i=0; istatus != 0) { + /* bad response */ + printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Bad response, status = 0x%x, flags = 0x%x.\n", command_packet->status, command_packet->flags); + return 1; + } + found = 1; + break; + } + } + if (found == 0) { + /* response never received */ + printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): No response.\n"); + return 1; + } + + param = (TW_Param *)tw_dev->alignment_virtual_address[request_id]; + raid_level = (unsigned char *)&(param->data[1]); + if (*raid_level == 5) { + dprintk(KERN_WARNING "3w-xxxx: Found unit %d to be a raid5 unit.\n", j); + tw_dev->is_raid_five[j] = 1; + num_raid_five++; + } + } + tw_dev->num_raid_five = num_raid_five; + + /* Now allocate raid5 bounce buffers */ + if ((num_raid_five != 0) && (tw_dev->tw_pci_dev->device == TW_DEVICE_ID)) { + for (i=0;ibounce_buffer[i] == NULL) { + printk(KERN_WARNING "3w-xxxx: tw_initialize_units(): Bounce buffer allocation failed.\n"); + return 1; + } + memset(tw_dev->bounce_buffer[i], 0, sizeof(TW_Sector)*128); + } + } return 0; } /* End tw_initialize_units() */ @@ -1283,12 +1420,17 @@ case TW_OP_SET_PARAM: dprintk(KERN_NOTICE "3w-xxxx: tw_ioctl(): caught TW_OP_SET_PARAM: table_id = %d, parameter_id = %d, parameter_size_bytes = %d.\n", ioctl->table_id, ioctl->parameter_id, ioctl->parameter_size_bytes); - command_packet->byte0.opcode = TW_OP_SET_PARAM; - param->table_id = ioctl->table_id; - param->parameter_id = ioctl->parameter_id; - param->parameter_size_bytes = ioctl->parameter_size_bytes; - memcpy(param->data, ioctl->data, ioctl->parameter_size_bytes); - break; + if (ioctl->data != NULL) { + command_packet->byte0.opcode = TW_OP_SET_PARAM; + param->table_id = ioctl->table_id; + param->parameter_id = ioctl->parameter_id; + param->parameter_size_bytes = ioctl->parameter_size_bytes; + memcpy(param->data, ioctl->data, ioctl->parameter_size_bytes); + break; + } else { + printk(KERN_WARNING "3w-xxxx: tw_ioctl(): ioctl->data NULL.\n"); + return 1; + } case TW_OP_AEN_LISTEN: dprintk(KERN_NOTICE "3w-xxxx: tw_ioctl(): caught TW_OP_AEN_LISTEN.\n"); if (tw_dev->aen_head == tw_dev->aen_tail) { @@ -1313,11 +1455,15 @@ tw_dev->srb[request_id]->scsi_done(tw_dev->srb[request_id]); return 0; case TW_CMD_PACKET: - memcpy(command_packet, ioctl->data, sizeof(TW_Command)); - command_packet->request_id = request_id; - tw_post_command_packet(tw_dev, request_id); - - return 0; + if (ioctl->data != NULL) { + memcpy(command_packet, ioctl->data, sizeof(TW_Command)); + command_packet->request_id = request_id; + tw_post_command_packet(tw_dev, request_id); + return 0; + } else { + printk(KERN_WARNING "3w-xxxx: tw_ioctl(): ioctl->data NULL.\n"); + return 1; + } default: printk(KERN_WARNING "3w-xxxx: Unknown ioctl 0x%x.\n", opcode); tw_dev->state[request_id] = TW_S_COMPLETED; @@ -1752,6 +1898,7 @@ tw_copy_info(&info, "Max sector count: %3d\n", tw_dev->max_sector_count); tw_copy_info(&info, "Resets: %3d\n", tw_dev->num_resets); tw_copy_info(&info, "Aborts: %3d\n", tw_dev->num_aborts); + tw_copy_info(&info, "AEN's: %3d\n", tw_dev->aen_count); } if (info.position > info.offset) { return (info.position - info.offset); @@ -1769,6 +1916,13 @@ int flags = 0; TW_Device_Extension *tw_dev = (TW_Device_Extension *)SCpnt->host->hostdata; + if (tw_dev == NULL) { + printk(KERN_WARNING "3w-xxxx: tw_scsi_queue(): Invalid device extension.\n"); + SCpnt->result = (DID_ERROR << 16); + done(SCpnt); + return 0; + } + spin_lock_irqsave(&tw_dev->tw_lock, flags); dprintk(KERN_NOTICE "3w-xxxx: tw_scsi_queue()\n"); @@ -1779,20 +1933,6 @@ spin_unlock_irqrestore(&tw_dev->tw_lock, flags); return 0; } - if (done == NULL) { - printk(KERN_WARNING "3w-xxxx: tw_scsi_queue(): Invalid done function.\n"); - SCpnt->result = (DID_ERROR << 16); - done(SCpnt); - spin_unlock_irqrestore(&tw_dev->tw_lock, flags); - return 0; - } - if (tw_dev == NULL) { - printk(KERN_WARNING "3w-xxxx: tw_scsi_queue(): Invalid device extension.\n"); - SCpnt->result = (DID_ERROR << 16); - done(SCpnt); - spin_unlock_irqrestore(&tw_dev->tw_lock, flags); - return 0; - } /* Save done function into Scsi_Cmnd struct */ SCpnt->scsi_done = done; @@ -2093,7 +2233,7 @@ TW_Command *command_packet; u32 command_que_addr, command_que_value = 0; u32 lba = 0x0, num_sectors = 0x0; - int i; + int i, count = 0; Scsi_Cmnd *srb; struct scatterlist *sglist; @@ -2151,29 +2291,52 @@ command_packet->byte8.io.lba = lba; command_packet->byte6.block_count = num_sectors; - /* Do this if there are no sg list entries */ - if (tw_dev->srb[request_id]->use_sg == 0) { - dprintk(KERN_NOTICE "3w-xxxx: tw_scsiop_read_write(): SG = 0\n"); - command_packet->byte8.io.sgl[0].address = virt_to_bus(tw_dev->srb[request_id]->request_buffer); - command_packet->byte8.io.sgl[0].length = tw_dev->srb[request_id]->request_bufflen; - } - - /* Do this if we have multiple sg list entries */ - if (tw_dev->srb[request_id]->use_sg > 0) { - for (i=0;isrb[request_id]->use_sg; i++) { - command_packet->byte8.io.sgl[i].address = virt_to_bus(sglist[i].address); - command_packet->byte8.io.sgl[i].length = sglist[i].length; - command_packet->size+=2; + if ((tw_dev->is_raid_five[tw_dev->srb[request_id]->target] == 0) || (srb->cmnd[0] == READ_6) || (srb->cmnd[0] == READ_10) || (tw_dev->tw_pci_dev->device == TW_DEVICE_ID2)) { + /* Do this if there are no sg list entries */ + if (tw_dev->srb[request_id]->use_sg == 0) { + dprintk(KERN_NOTICE "3w-xxxx: tw_scsiop_read_write(): SG = 0\n"); + command_packet->byte8.io.sgl[0].address = virt_to_bus(tw_dev->srb[request_id]->request_buffer); + command_packet->byte8.io.sgl[0].length = tw_dev->srb[request_id]->request_bufflen; + } + + /* Do this if we have multiple sg list entries */ + if (tw_dev->srb[request_id]->use_sg > 0) { + for (i=0;isrb[request_id]->use_sg; i++) { + command_packet->byte8.io.sgl[i].address = virt_to_bus(sglist[i].address); + command_packet->byte8.io.sgl[i].length = sglist[i].length; + command_packet->size+=2; + } + if (tw_dev->srb[request_id]->use_sg >= 1) + command_packet->size-=2; + } + } else { + /* Do this if there are no sg list entries for raid 5 */ + if (tw_dev->srb[request_id]->use_sg == 0) { + dprintk(KERN_WARNING "doing raid 5 write use_sg = 0, bounce_buffer[%d] = 0x%p\n", request_id, tw_dev->bounce_buffer[request_id]); + memcpy(tw_dev->bounce_buffer[request_id], tw_dev->srb[request_id]->request_buffer, tw_dev->srb[request_id]->request_bufflen); + command_packet->byte8.io.sgl[0].address = virt_to_bus(tw_dev->bounce_buffer[request_id]); + command_packet->byte8.io.sgl[0].length = tw_dev->srb[request_id]->request_bufflen; + } + + /* Do this if we have multiple sg list entries for raid 5 */ + if (tw_dev->srb[request_id]->use_sg > 0) { + dprintk(KERN_WARNING "doing raid 5 write use_sg = %d, sglist[0].length = %d\n", + tw_dev->srb[request_id]->use_sg, sglist[0].length); + for (i=0;isrb[request_id]->use_sg; i++) { + memcpy((char *)(tw_dev->bounce_buffer[request_id])+count, sglist[i].address, sglist[i].length); + count+=sglist[i].length; + } + command_packet->byte8.io.sgl[0].address = virt_to_bus(tw_dev->bounce_buffer[request_id]); + command_packet->byte8.io.sgl[0].length = count; + command_packet->size = 5; /* single sgl */ } - if (tw_dev->srb[request_id]->use_sg > 1) - command_packet->size-=2; } - + /* Update SG statistics */ tw_dev->sgl_entries = tw_dev->srb[request_id]->use_sg; if (tw_dev->sgl_entries > tw_dev->max_sgl_entries) tw_dev->max_sgl_entries = tw_dev->sgl_entries; - + command_que_value = tw_dev->command_packet_physical_address[request_id]; if (command_que_value == 0) { dprintk(KERN_WARNING "3w-xxxx: tw_scsiop_read_write(): Bad command packet physical address.\n"); @@ -2277,7 +2440,7 @@ /* Poll for completion */ imax = TW_POLL_MAX_RETRIES; for (i=0;i 11/2000 +(w) Kurt Garloff 04/2001 This file describes the osst driver as of version 0.8.x/0.9.x, the released version of the osst driver. @@ -45,7 +45,7 @@ So you could only have either of them being present in the kernel. This has been fixed by registering an own device, now. st and osst can coexist, each only accessing the devices it can support by -their own device. +themselves. Installation @@ -87,10 +87,11 @@ supported and you may try the mt (or mt_st) program to jump between filemarks, eject the tape, ... -There's one limitation: You need to use a block size of 32kB. - -(This limitation is worked on and will be fixed in version 0.8.7 of - this driver.) +There's one limitation: You need to use a block size of 512 bytes, 1kB, 2kB, +4kB, 8kB, 16kB or 32kB. The default block size is 512 bytes. However, your +backup software can transfer any multiple of the current block size. The +blocksize can be changed with: +mt -f /dev/nosst0 defblksize 1024 If you just want to get started with standard software, here is an example for creating and restoring a full backup: @@ -112,13 +113,42 @@ tar). +Interpreting log output +----------------------- +Log output of different severity is created by osst. Every message starts +with "osstX:S:" where X is the tape device (minor number modulo 32), or a +blank if not applicable, and S is the severity: + +:A: Assert, an error that "should not happen". If you get one of these and + have not changed anything in osst_options.h, report it to the mail list. + +:E: Error, your backup is toast (sorry). + +:W: Warning, something happened that endangers your data. Look for other + information to see if osst was able to recover. + +:I: Information which osst wants you to know. This could be follow-on info + on a previously issued warning or error. + +:D: Debug output, created when you compile with "#define DEBUG 1". + +This output is sent to klogd with corresponding priority. If you don't see +it in your system log (typically /var/log/messages), check your syslog.conf. + + USB and IDE ----------- Via the SCSI emulation layers usb-storage and ide-scsi, you can also use the osst driver to drive the USB-30 and the DI-30 drives. (Unfortunately, there is no such layer for the parallel port, otherwise the DP-30 would work as -well.) For the USB support, you need the latest 2.4.0-test kernels and the -latest usb-storage driver from +well.) + +For the DI-30, compile the SCSI layer and ide-scsi into the kernel and pass +hdX=scsi as boot parameter to your kernel, with hdX corresponding to your +OnStream device. + +For the USB support, you need the usb-sotrage driver of 2.4.0 kernel or +newer and you have to enable the Freecom support. For news, check http://www.linux-usb.org/ http://sourceforge.net/cvs/?group_id=3581 @@ -158,6 +188,11 @@ have been sent, but mostly reported success or only minor trouble. All the issues have been addressed. Check the web pages for more info about the current developments. +0.9.x is the tree for the 2.3/2.4 kernel. + +0.8.6.x and 0.9.4.x have been integrated into the mainstream kernels 2.2.19 +and 2.4.0 repsectively. Newer versions with variable block size support will +be submitted soon. Acknowledgments @@ -188,7 +223,7 @@ #!/bin/sh # Script to create OnStream SC-x0 device nodes (major 206) # Usage: Makedevs.sh [nos [path to dev]] -# $Id: README.osst.kernel,v 1.1.2.2 2000/12/20 14:08:38 garloff Exp $ +# $Id: README.osst.kernel,v 1.3.2.3 2001/06/02 23:49:03 riede Exp $ major=206 nrs=4 dir=/dev diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/advansys.c linux.20p6/drivers/scsi/advansys.c --- linux.vanilla/drivers/scsi/advansys.c Sun Mar 25 17:31:29 2001 +++ linux.20p6/drivers/scsi/advansys.c Fri May 4 23:23:32 2001 @@ -1,10 +1,10 @@ -#define ASC_VERSION "3.3D" /* AdvanSys Driver Version */ +#define ASC_VERSION "3.3G" /* AdvanSys Driver Version */ /* * advansys.c - Linux Host Driver for AdvanSys SCSI Adapters - * + * * Copyright (c) 1995-2000 Advanced System Products, Inc. - * Copyright (c) 2000 ConnectCom Solutions, Inc. + * Copyright (c) 2000-2001 ConnectCom Solutions, Inc. * All Rights Reserved. * * Redistribution and use in source and binary forms, with or without @@ -13,7 +13,7 @@ * modification. * * As of March 8, 2000 Advanced System Products, Inc. (AdvanSys) - * changed its name to name to ConnectCom Solutions, Inc. + * changed its name to ConnectCom Solutions, Inc. * * There is an AdvanSys Linux WWW page at: * http://www.connectcom.net/downloads/software/os/linux.html @@ -24,43 +24,39 @@ * ftp://ftp.connectcom.net/pub/linux/linux.tgz * * Please send questions, comments, bug reports to: - * linux@connectcom.net or bfrey@turbolinux.com.cn + * support@connectcom.net */ /* Documentation for the AdvanSys Driver - A. Linux Kernel Testing + A. Linux Kernels Supported by this Driver B. Adapters Supported by this Driver - C. Linux v1.2.X - Directions for Adding the AdvanSys Driver - D. Linux v1.3.1 - v1.3.57 - Directions for Adding the AdvanSys Driver - E. Linux v1.3.58 and Newer - Upgrading the AdvanSys Driver - F. Source Comments - G. Driver Compile Time Options and Debugging - H. Driver LILO Option - I. Release History - J. Known Problems/Fix List - K. Credits - L. ConnectCom (AdvanSys) Contact Information - - A. Linux Kernel Testing - - This driver has been tested in the following Linux kernels: v2.2.17 - v2.4.0-test9. The driver should also work in earlier versions of the - Linux kernel. Beginning with v1.3.58 the AdvanSys driver was included - with all Linux kernels. Please refer to sections C, D, and E for - instructions on adding or upgrading the AdvanSys driver. The driver is - supported for x86 and alpha systems. + C. Linux source files modified by AdvanSys Driver + D. Source Comments + E. Driver Compile Time Options and Debugging + F. Driver LILO Option + G. Tests to run before releasing new driver + H. Release History + I. Known Problems/Fix List + J. Credits (Chronological Order) + K. ConnectCom (AdvanSys) Contact Information + + A. Linux Kernels Supported by this Driver + + This driver has been tested in the following Linux kernels: v2.2.18 + v2.4.0. The driver is supported on v2.2 and v2.4 kernels and on x86, + alpha, and PowerPC platforms. B. Adapters Supported by this Driver - + AdvanSys (Advanced System Products, Inc.) manufactures the following RISC-based, Bus-Mastering, Fast (10 Mhz) and Ultra (20 Mhz) Narrow (8-bit transfer) SCSI Host Adapters for the ISA, EISA, VL, and PCI buses and RISC-based, Bus-Mastering, Ultra (20 Mhz) Wide (16-bit transfer) SCSI Host Adapters for the PCI bus. - + The CDB counts below indicate the number of SCSI CDB (Command Descriptor Block) requests that can be stored in the RISC chip cache and board LRAM. A CDB is a single SCSI command. The driver @@ -86,7 +82,7 @@ ABP930UA - Bus-Master PCI Ultra (16 CDB) ABP960 - Bus-Master PCI MAC/PC (16 CDB) ABP960U - Bus-Master PCI MAC/PC Ultra (16 CDB) - + Single Channel Products: ABP542 - Bus-Master ISA with floppy (240 CDB) ABP742 - Bus-Master EISA (240 CDB) @@ -100,7 +96,7 @@ ABP940UW/3940UW - Bus-Master PCI Ultra-Wide (253 CDB) ABP970UW - Bus-Master PCI MAC/PC Ultra-Wide (253 CDB) ABP3940U2W - Bus-Master PCI LVD/Ultra2-Wide (253 CDB) - + Multi-Channel Products: ABP752 - Dual Channel Bus-Master EISA (240 CDB Per Channel) ABP852 - Dual Channel Bus-Master VL (240 CDB Per Channel) @@ -111,37 +107,32 @@ ABP980UA/3980UA - Four Channel Bus-Master PCI Ultra (16 CDB Per Chan.) ABP3950U2W - Bus-Master PCI LVD/Ultra2-Wide and Ultra-Wide (253 CDB) ABP3950U3W - Bus-Master PCI Dual LVD2/Ultra3-Wide (253 CDB) - - C. Linux v1.2.X - Directions for Adding the AdvanSys Driver - These directions apply to v1.2.13. For versions that follow v1.2.13. - but precede v1.3.57 some of the changes for Linux v1.3.X listed - below may need to be modified or included. A patch is available - for v1.2.13 from the AdvanSys WWW and FTP sites. - - There are two source files: advansys.h and advansys.c. Copy - both of these files to the directory /usr/src/linux/drivers/scsi. - - 1. Add the following line to /usr/src/linux/arch/i386/config.in - after "comment 'SCSI low-level drivers'": - + C. Linux source files modified by AdvanSys Driver + + This section for historical purposes documents the changes + originally made to the Linux kernel source to add the advansys + driver. As Linux has changed some of these files have also + been modified. + + 1. linux/arch/i386/config.in: + bool 'AdvanSys SCSI support' CONFIG_SCSI_ADVANSYS y - - 2. Add the following lines to /usr/src/linux/drivers/scsi/hosts.c - after "#include "hosts.h"": - + + 2. linux/drivers/scsi/hosts.c: + #ifdef CONFIG_SCSI_ADVANSYS #include "advansys.h" #endif - + and after "static Scsi_Host_Template builtin_scsi_hosts[] =": - + #ifdef CONFIG_SCSI_ADVANSYS ADVANSYS, #endif - - 3. Add the following lines to /usr/src/linux/drivers/scsi/Makefile: - + + 3. linux/drivers/scsi/Makefile: + ifdef CONFIG_SCSI_ADVANSYS SCSI_SRCS := $(SCSI_SRCS) advansys.c SCSI_OBJS := $(SCSI_OBJS) advansys.o @@ -149,12 +140,7 @@ SCSI_MODULE_OBJS := $(SCSI_MODULE_OBJS) advansys.o endif - 4. (Optional) If you would like to enable the LILO command line - and /etc/lilo.conf 'advansys' option, make the following changes. - This option can be used to disable I/O port scanning or to limit - I/O port scanning to specific addresses. Refer to the 'Driver - LILO Option' section below. Add the following lines to - /usr/src/linux/init/main.c in the prototype section: + 4. linux/init/main.c: extern void advansys_setup(char *str, int *ints); @@ -164,118 +150,19 @@ { "advansys=", advansys_setup }, #endif - 5. If you have the HP 4020i CD-R driver and Linux v1.2.X you should - add a fix to the CD-ROM target driver. This fix will allow - you to mount CDs with the iso9660 file system. Linux v1.3.X - already has this fix. In the file /usr/src/linux/drivers/scsi/sr.c - and function get_sectorsize() after the line: - - if(scsi_CDs[i].sector_size == 0) scsi_CDs[i].sector_size = 2048; - - add the following line: - - if(scsi_CDs[i].sector_size == 2340) scsi_CDs[i].sector_size = 2048; - - 6. In the directory /usr/src/linux run 'make config' to configure - the AdvanSys driver, then run 'make vmlinux' or 'make zlilo' to - make the kernel. If the AdvanSys driver is not configured, then - a loadable module can be built by running 'make modules' and - 'make modules_install'. Use 'insmod' and 'rmmod' to install - and remove advansys.o. - - D. Linux v1.3.1 - v1.3.57 - Directions for Adding the AdvanSys Driver - - These directions apply to v1.3.57. For versions that precede v1.3.57 - some of these changes may need to be modified or eliminated. A patch - is available for v1.3.57 from the AdvanSys WWW and FTP sites. - Beginning with v1.3.58 this driver is included with the Linux - distribution eliminating the need for making any changes. - - There are two source files: advansys.h and advansys.c. Copy - both of these files to the directory /usr/src/linux/drivers/scsi. - - 1. Add the following line to /usr/src/linux/drivers/scsi/Config.in - after "comment 'SCSI low-level drivers'": - - dep_tristate 'AdvanSys SCSI support' CONFIG_SCSI_ADVANSYS $CONFIG_SCSI - - 2. Add the following lines to /usr/src/linux/drivers/scsi/hosts.c - after "#include "hosts.h"": - - #ifdef CONFIG_SCSI_ADVANSYS - #include "advansys.h" - #endif - - and after "static Scsi_Host_Template builtin_scsi_hosts[] =": - - #ifdef CONFIG_SCSI_ADVANSYS - ADVANSYS, - #endif - - 3. Add the following lines to /usr/src/linux/drivers/scsi/Makefile: - - ifeq ($(CONFIG_SCSI_ADVANSYS),y) - L_OBJS += advansys.o - else - ifeq ($(CONFIG_SCSI_ADVANSYS),m) - M_OBJS += advansys.o - endif - endif - - 4. Add the following line to /usr/src/linux/include/linux/proc_fs.h - in the enum scsi_directory_inos array: - - PROC_SCSI_ADVANSYS, - - 5. (Optional) If you would like to enable the LILO command line - and /etc/lilo.conf 'advansys' option, make the following changes. - This option can be used to disable I/O port scanning or to limit - I/O port scanning to specific addresses. Refer to the 'Driver - LILO Option' section below. Add the following lines to - /usr/src/linux/init/main.c in the prototype section: - - extern void advansys_setup(char *str, int *ints); - - and add the following lines to the bootsetups[] array. - - #ifdef CONFIG_SCSI_ADVANSYS - { "advansys=", advansys_setup }, - #endif - - 6. In the directory /usr/src/linux run 'make config' to configure - the AdvanSys driver, then run 'make vmlinux' or 'make zlilo' to - make the kernel. If the AdvanSys driver is not configured, then - a loadable module can be built by running 'make modules' and - 'make modules_install'. Use 'insmod' and 'rmmod' to install - and remove advansys.o. - - E. Linux v1.3.58 and Newer - Upgrading the AdvanSys Driver - - To upgrade the AdvanSys driver in a Linux v1.3.58 and newer - kernel, first check the version of the current driver. The - version is defined by the manifest constant ASC_VERSION at - the beginning of advansys.c. The new driver should have a - ASC_VERSION value greater than the current version. To install - the new driver rename advansys.c and advansys.h in the Linux - kernel source tree drivers/scsi directory to different names - or save them to a different directory in case you want to revert - to the old version of the driver. After the old driver is saved - copy the new advansys.c and advansys.h to drivers/scsi, rebuild - the kernel, and install the new kernel. No other changes are needed. + D. Source Comments - F. Source Comments - 1. Use tab stops set to 4 for the source files. For vi use 'se tabstops=4'. - + 2. This driver should be maintained in multiple files. But to make it easier to include with Linux and to follow Linux conventions, the whole driver is maintained in the source files advansys.h and advansys.c. In this file logical sections of the driver begin with a comment that contains '---'. The following are the logical sections of the driver below. - + --- Linux Version - --- Linux Include Files + --- Linux Include File --- Driver Options --- Debugging Header --- Asc Library Constants and Macros @@ -292,27 +179,27 @@ --- Tracing and Debugging Functions --- Asc Library Functions --- Adv Library Functions - + 3. The string 'XXX' is used to flag code that needs to be re-written or that contains a problem that needs to be addressed. - + 4. I have stripped comments from and reformatted the source for the Asc Library and Adv Library to reduce the size of this file. This source can be found under the following headings. The Asc Library is used to support Narrow Boards. The Adv Library is used to support Wide Boards. - + --- Asc Library Constants and Macros --- Adv Library Constants and Macros --- Asc Library Functions --- Adv Library Functions - - G. Driver Compile Time Options and Debugging - + + E. Driver Compile Time Options and Debugging + In this source file the following constants can be defined. They are defined in the source below. Both of these options are enabled by default. - + 1. ADVANSYS_ASSERT - Enable driver assertions (Def: Enabled) Enabling this option adds assertion logic statements to the @@ -332,11 +219,11 @@ the kernel name space. This option is very useful for debugging the driver, but it will add to the size of the driver execution image and add overhead to the execution of the driver. - + The amount of debugging output can be controlled with the global variable 'asc_dbglvl'. The higher the number the more output. By default the debug level is 0. - + If the driver is loaded at boot time and the LILO Driver Option is included in the system, the debug level can be changed by specifying a 5th (ASC_NUM_IOPORT_PROBE + 1) I/O Port. The @@ -350,28 +237,44 @@ If the driver is built as a loadable module this variable can be defined when the driver is loaded. The following insmod command will set the debug level to one. - + insmod advansys.o asc_dbglvl=1 - + Debugging Message Levels: 0: Errors Only 1: High-Level Tracing 2-N: Verbose Tracing - - I don't know the approved way for turning on printk()s to the - console. Here's a program I use to do this. Debug output is - logged in /var/adm/messages. - + + To enable debug output to console, please make sure that: + + a. System and kernel logging is enabled (syslogd, klogd running). + b. Kernel messages are routed to console output. Check + /etc/syslog.conf for an entry similar to this: + + kern.* /dev/console + + c. klogd is started with the appropriate -c parameter + (e.g. klogd -c 8) + + This will cause printk() messages to be be displayed on the + current console. Refer to the klogd(8) and syslogd(8) man pages + for details. + + Alternatively you can enable printk() to console with this + program. However, this is not the 'official' way to do this. + Debug output is logged in /var/log/messages. + main() { syscall(103, 7, 0, 0); } - - I found that increasing LOG_BUF_LEN to 40960 in kernel/printk.c - prevents most level 1 debug messages from being lost. + + Increasing LOG_BUF_LEN in kernel/printk.c to something like + 40960 allows more debug messages to be buffered in the kernel + and written to the console or log file. 3. ADVANSYS_STATS - Enable statistics (Def: Enabled >= v1.3.0) - + Enabling this option adds statistics collection and display through /proc to the driver. The information is useful for monitoring driver and device performance. It will add to the @@ -394,8 +297,8 @@ When ADVANSYS_STATS is not defined the AdvanSys /proc files only contain adapter and device configuration information. - H. Driver LILO Option - + F. Driver LILO Option + If init/main.c is modified as described in the 'Directions for Adding the AdvanSys Driver to Linux' section (B.4.) above, the driver will recognize the 'advansys' LILO command line and /etc/lilo.conf option. @@ -425,9 +328,24 @@ the 'Driver Compile Time Options and Debugging' section above for more information. - I. Release History + G. Tests to run before releasing new driver + + 1. In the supported kernels verify there are no warning or compile + errors when the kernel is built as both a driver and as a module + and with the following options: + + ADVANSYS_DEBUG - enabled and disabled + CONFIG_SMP - enabled and disabled + CONFIG_PROC_FS - enabled and disabled - BETA-1.0 (12/23/95): + 2. Run tests on an x86, alpha, and PowerPC with at least one narrow + card and one wide card attached to a hard disk and CD-ROM drive: + fdisk, mkfs, fsck, bonnie, copy/compare test from the + CD-ROM to the hard drive. + + H. Release History + + BETA-1.0 (12/23/95): First Release BETA-1.1 (12/28/95): @@ -461,7 +379,7 @@ 4. Remove reset request loop problem from the "Known Problems or Issues" section. This problem was isolated and fixed in the mid-level SCSI driver. - + 1.5 (8/8/96): 1. Add support for ABP-940U (PCI Ultra) adapter. 2. Add support for IRQ sharing by setting the SA_SHIRQ flag for @@ -690,7 +608,7 @@ 3. For >= v2.3.28 use new SCSI error handling with new function advansys_eh_bus_reset(). Don't include an abort function because of base library limitations. - 4. For >= v2.3.28 use per board asc_lock instead of io_request_lock. + 4. For >= v2.3.28 use per board lock instead of io_request_lock. 5. For >= v2.3.28 eliminate advansys_command() and advansys_command_done(). 6. Add some changes for PowerPC (Big Endian) support, but it isn't @@ -708,8 +626,8 @@ 3.3B (5/1/00): 1. Support for PowerPC (Big Endian) wide cards. Narrow cards still need work. - 2. Change bitfields to shift and mask access for endian - portability. + 2. Change bitfields to shift and mask access for endian + portability. 3.3C (10/13/00): 1. Update for latest 2.4 kernel. @@ -721,7 +639,38 @@ 1. Update for latest 2.4 kernel. 2. Create patches for 2.2 and 2.4 kernels. - J. Known Problems/Fix List (XXX) + 3.3E (1/9/01): + 1. Now that 2.4 is released remove ifdef code for kernel versions + less than 2.2. The driver is now only supported in kernels 2.2, + 2.4, and greater. + 2. Add code to release and acquire the io_request_lock in + the driver entrypoint functions: advansys_detect and + advansys_queuecommand. In kernel 2.4 the SCSI mid-level driver + still holds the io_request_lock on entry to SCSI low-level drivers. + This was supposed to be removed before 2.4 was released but never + happened. When the mid-level SCSI driver is changed all references + to the io_request_lock should be removed from the driver. + 3. Simplify error handling by removing advansys_abort(), + AscAbortSRB(), AscResetDevice(). SCSI bus reset requests are + now handled by resetting the SCSI bus and fully re-initializing + the chip. This simple method of error recovery has proven to work + most reliably after attempts at different methods. Also now only + support the "new" error handling method and remove the obsolete + error handling interface. + 4. Fix debug build errors. + + 3.3F (1/24/01): + 1. Merge with ConnectCom version from Andy Kellner which + updates Adv Library to 5.14. + 2. Make PowerPC (Big Endian) work for narrow cards and + fix problems writing EEPROM for wide cards. + 3. Remove interrupts_enabled assertion function. + + 3.3G (2/16/01): + 1. Return an error from narrow boards if passed a 16 byte + CDB. The wide board can already handle 16 byte CDBs. + + I. Known Problems/Fix List (XXX) 1. Need to add memory mapping workaround. Test the memory mapping. If it doesn't work revert to I/O port access. Can a test be done @@ -731,13 +680,12 @@ has not occurred then print a message and run in polled mode. 3. Allow bus type scanning order to be changed. 4. Need to add support for target mode commands, cf. CAM XPT. - 5. Add PowerPC (Big Endian) support for narrow cards. - K. Credits + J. Credits (Chronological Order) - Bob Frey wrote the AdvanSys SCSI driver. - I no longer work for AdvanSys, but continue to maintain and support - the driver. + Bob Frey wrote the AdvanSys SCSI driver + and maintained it up to 3.3F. He continues to answer questions + and help maintain the driver. Nathan Hartwell provided the directions and basis for the Linux v1.3.X changes which were included in the @@ -763,7 +711,7 @@ in 3.2K. Tom Rini provided the CONFIG_ISA - patch and helped with PowerPC support. + patch and helped with PowerPC wide and narrow board support. Philip Blundell provided an advansys_interrupts_enabled patch. @@ -775,15 +723,27 @@ Jerry Quinn fixed PowerPC support (endian problems) for wide cards. - L. ConnectCom (AdvanSys) Contact Information - + Bryan Henderson helped debug narrow + card error handling. + + Manuel Veloso worked hard on PowerPC narrow + board support and fixed a bug in AscGetEEPConfig(). + + Arnaldo Carvalho de Melo made + save_flags/restore_flags changes. + + Andy Kellner continues the Advansys SCSI + driver development for ConnectCom (Version > 3.3F). + + K. ConnectCom (AdvanSys) Contact Information + Mail: ConnectCom Solutions, Inc. 1150 Ringwood Court San Jose, CA 95131 Operator/Sales: 1-408-383-9400 FAX: 1-408-383-9612 Tech Support: 1-408-467-2930 - Tech Support E-Mail: support@connectcom.net + Tech Support E-Mail: linux@connectcom.net FTP Site: ftp.connectcom.net (login: anonymous) Web Site: http://www.connectcom.net @@ -794,87 +754,62 @@ * --- Linux Version */ -/* Convert Linux Version, Patch-level, Sub-level to LINUX_VERSION_CODE. */ -#define ASC_LINUX_VERSION(V, P, S) (((V) * 65536) + ((P) * 256) + (S)) - #ifndef LINUX_VERSION_CODE #include #endif /* LINUX_VERSION_CODE */ +/* Convert Linux Version, Patch-level, Sub-level to LINUX_VERSION_CODE. */ +#define ASC_LINUX_VERSION(V, P, S) (((V) * 65536) + ((P) * 256) + (S)) +#define ASC_LINUX_KERNEL22 (LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0)) +#define ASC_LINUX_KERNEL24 (LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,4,0)) + +/* Driver supported only in version 2.2 and version >= 2.4. */ +#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,2,0) || \ + (LINUX_VERSION_CODE > ASC_LINUX_VERSION(2,3,0) && \ + LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0)) +#error "AdvanSys driver supported only in 2.2 and 2.4 or greater kernels." +#endif /* - * --- Linux Include Files + * --- Linux Include Files */ #include -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) #ifdef MODULE #include #endif /* MODULE */ -#endif /* version >= v1.3.0 */ -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,2,0) #if defined(CONFIG_X86) && !defined(CONFIG_ISA) #define CONFIG_ISA #endif /* CONFIG_X86 && !CONFIG_ISA */ -#else /* version < 2.2.0 */ -#define CONFIG_ISA -#endif /* version < 2.2.0 */ #include #include #include -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,0) -#include -#endif /* verions < v2.1.0 */ #include #include #include #include #include -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) #include -#endif /* version >= v1.3.0 */ -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,23) #include -#endif /* version >= v2.1.23 */ #include #include #include -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0) -#include "../block/blk.h" -#else /* version >= v1.3.0 */ #include #include -#endif /* version >= v1.3.0 */ -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,18) +#if ASC_LINUX_KERNEL24 #include -#elif LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,95) +#elif ASC_LINUX_KERNEL22 #include -#endif /* version >= 2.1.95 */ +#endif #include "scsi.h" #include "hosts.h" #include "sd.h" #include "advansys.h" -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,93) #ifdef CONFIG_PCI #include #endif /* CONFIG_PCI */ -#else /* version < v2.1.93 */ -/* - * For earlier than v2.1.93 the driver has its own PCI configuration. - * If PCI is not needed in a kernel before v2.1.93 this define can be - * turned-off to make the driver object smaller. - */ -#define ASC_CONFIG_PCI -#endif /* version < v2.1.93 */ - -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,0) -#define cpu_to_le16(word) (word) -#define le16_to_cpu(word) (word) -#define cpu_to_le32(dword) (dword) -#define le32_to_cpu(dword) (dword) -#endif /* version < v2.1.0 */ /* @@ -884,19 +819,12 @@ /* Enable driver assertions. */ #define ADVANSYS_ASSERT +/* Enable driver /proc statistics. */ +#define ADVANSYS_STATS + /* Enable driver tracing. */ /* #define ADVANSYS_DEBUG */ -/* - * Because of no /proc to display them, statistics are disabled - * for versions prior to v1.3.0. - */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0) -#undef ADVANSYS_STATS /* Disable statistics */ -#else /* version >= v1.3.0 */ -#define ADVANSYS_STATS /* Enable statistics. */ -#endif /* version >= v1.3.0 */ - /* * --- Debugging Header @@ -925,7 +853,7 @@ * types must be used. In Linux the char, short, and int types * are all consistent at 8, 16, and 32 bits respectively. Pointers * and long types are 64 bits on Alpha and UltraSPARC. - */ + */ #define ASC_PADDR __u32 /* Physical/Bus address data type. */ #define ASC_VADDR __u32 /* Virtual address data type. */ #define ASC_DCNT __u32 /* Unsigned Data count type. */ @@ -974,7 +902,7 @@ #define ASC_PCI_VENDORID 0x10CD #define ASC_PCI_DEVICEID_1200A 0x1100 #define ASC_PCI_DEVICEID_1200B 0x1200 -#define ASC_PCI_DEVICEID_ULTRA 0x1300 +#define ASC_PCI_DEVICEID_ULTRA 0x1300 #define ASC_PCI_REVISION_3150 0x02 #define ASC_PCI_REVISION_3050 0x03 @@ -991,13 +919,13 @@ #define CC_VERY_LONG_SG_LIST 0 #define ASC_SRB2SCSIQ(srb_ptr) (srb_ptr) -#define PortAddr unsigned short /* port address size */ -#define inp(port) inb(port) -#define inpw(port) inw(port) -#define inpl(port) inl(port) -#define outp(port, byte) outb((byte), (port)) -#define outpw(port, word) outw((word), (port)) -#define outpl(port, dword) outl((dword), (port)) +#define PortAddr unsigned short /* port address size */ +#define inp(port) inb(port) +#define outp(port, byte) outb((byte), (port)) + +#define inpw(port) inw(port) +#define outpw(port, word) outw((word), (port)) + #define ASC_MAX_SG_QUEUE 7 #define ASC_MAX_SG_LIST 255 @@ -1044,12 +972,7 @@ #define ASC_MAX_ISA_DMA_COUNT (0x00FFFFFFL) #define ASC_MAX_EISA_DMA_ADDR (0x07FFFFFFL) #define ASC_MAX_EISA_DMA_COUNT (0x07FFFFFFL) -#ifndef inpw_noswap -#define inpw_noswap(port) inpw(port) -#endif -#ifndef outpw_noswap -#define outpw_noswap(port, data) outpw(port, data) -#endif + #define ASC_SCSI_ID_BITS 3 #define ASC_SCSI_TIX_TYPE uchar #define ASC_ALL_DEVICE_BIT_SET 0xFF @@ -1091,6 +1014,8 @@ #define SCSICMD_ReadHeader 0x44 #define SCSICMD_ModeSelect10 0x55 #define SCSICMD_ModeSense10 0x5A + +/* Inquiry Data Peripheral Device Types */ #define SCSI_TYPE_DASD 0x00 #define SCSI_TYPE_SASD 0x01 #define SCSI_TYPE_PRN 0x02 @@ -1102,10 +1027,20 @@ #define SCSI_TYPE_MED_CHG 0x08 #define SCSI_TYPE_COMM 0x09 #define SCSI_TYPE_UNKNOWN 0x1F -#define SCSI_TYPE_NO_DVC 0xFF -#define INQ_CLOCKING_ST_ONLY 0x0 -#define INQ_CLOCKING_DT_ONLY 0x1 -#define INQ_CLOCKING_ST_AND_DT 0x3 + +#define ADV_INQ_CLOCKING_ST_ONLY 0x0 +#define ADV_INQ_CLOCKING_DT_ONLY 0x1 +#define ADV_INQ_CLOCKING_ST_AND_DT 0x3 + +/* + * Inquiry SPC-2 SPI Byte 1 EVPD (Enable Vital Product Data) + * and CmdDt (Command Support Data) field bit definitions. + */ +#define ADV_INQ_RTN_VPD_AND_CMDDT 0x3 +#define ADV_INQ_RTN_CMDDT_FOR_OP_CODE 0x2 +#define ADV_INQ_RTN_VPD_FOR_PG_CODE 0x1 +#define ADV_INQ_RTN_STD_INQUIRY_DATA 0x0 + #define ASC_SCSIDIR_NOCHK 0x00 #define ASC_SCSIDIR_T2H 0x08 #define ASC_SCSIDIR_H2T 0x10 @@ -1169,77 +1104,49 @@ #define M2_QTAG_MSG_ORDERED 0x22 #define M2_IGNORE_WIDE_RESIDUE 0x23 -typedef struct { - uchar peri_dvc_type:5; - uchar peri_qualifier:3; -} ASC_SCSI_INQ0; - -typedef struct { - uchar dvc_type_modifier:7; - uchar rmb:1; -} ASC_SCSI_INQ1; - -typedef struct { - uchar ansi_apr_ver:3; - uchar ecma_ver:3; - uchar iso_ver:2; -} ASC_SCSI_INQ2; - -typedef struct { - uchar rsp_data_fmt:4; - uchar res:2; - uchar TemIOP:1; - uchar aenc:1; -} ASC_SCSI_INQ3; - -typedef struct { - uchar StfRe:1; - uchar CmdQue:1; - uchar Reserved:1; - uchar Linked:1; - uchar Sync:1; - uchar WBus16:1; - uchar WBus32:1; - uchar RelAdr:1; -} ASC_SCSI_INQ7; +/* + * Inquiry data structure and bitfield macros + * + * Only quantities of more than 1 bit are shifted, since the others are + * just tested for true or false. C bitfields aren't portable between big + * and little-endian platforms so they are not used. + */ + +#define ASC_INQ_DVC_TYPE(inq) ((inq)->periph & 0x1f) +#define ASC_INQ_QUALIFIER(inq) (((inq)->periph & 0xe0) >> 5) +#define ASC_INQ_DVC_TYPE_MOD(inq) ((inq)->devtype & 0x7f) +#define ASC_INQ_REMOVABLE(inq) ((inq)->devtype & 0x80) +#define ASC_INQ_ANSI_VER(inq) ((inq)->ver & 0x07) +#define ASC_INQ_ECMA_VER(inq) (((inq)->ver & 0x38) >> 3) +#define ASC_INQ_ISO_VER(inq) (((inq)->ver & 0xc0) >> 6) +#define ASC_INQ_RESPONSE_FMT(inq) ((inq)->byte3 & 0x0f) +#define ASC_INQ_TERM_IO(inq) ((inq)->byte3 & 0x40) +#define ASC_INQ_ASYNC_NOTIF(inq) ((inq)->byte3 & 0x80) +#define ASC_INQ_SOFT_RESET(inq) ((inq)->flags & 0x01) +#define ASC_INQ_CMD_QUEUE(inq) ((inq)->flags & 0x02) +#define ASC_INQ_LINK_CMD(inq) ((inq)->flags & 0x08) +#define ASC_INQ_SYNC(inq) ((inq)->flags & 0x10) +#define ASC_INQ_WIDE16(inq) ((inq)->flags & 0x20) +#define ASC_INQ_WIDE32(inq) ((inq)->flags & 0x40) +#define ASC_INQ_REL_ADDR(inq) ((inq)->flags & 0x80) +#define ASC_INQ_INFO_UNIT(inq) ((inq)->info & 0x01) +#define ASC_INQ_QUICK_ARB(inq) ((inq)->info & 0x02) +#define ASC_INQ_CLOCKING(inq) (((inq)->info & 0x0c) >> 2) typedef struct { - ASC_SCSI_INQ0 byte0; - ASC_SCSI_INQ1 byte1; - ASC_SCSI_INQ2 byte2; - ASC_SCSI_INQ3 byte3; + uchar periph; + uchar devtype; + uchar ver; + uchar byte3; uchar add_len; uchar res1; uchar res2; - ASC_SCSI_INQ7 byte7; + uchar flags; uchar vendor_id[8]; uchar product_id[16]; uchar product_rev_level[4]; } ASC_SCSI_INQUIRY; -typedef struct asc_req_sense { - uchar err_code:7; - uchar info_valid:1; - uchar segment_no; - uchar sense_key:4; - uchar reserved_bit:1; - uchar sense_ILI:1; - uchar sense_EOM:1; - uchar file_mark:1; - uchar info1[4]; - uchar add_sense_len; - uchar cmd_sp_info[4]; - uchar asc; - uchar ascq; - uchar fruc; - uchar sks_byte0:7; - uchar sks_valid:1; - uchar sks_bytes[2]; - uchar notused[2]; - uchar ex_sense_code; - uchar info2[4]; -} ASC_REQ_SENSE; - #define ASC_SG_LIST_PER_Q 7 #define QS_FREE 0x00 #define QS_READY 0x01 @@ -1353,7 +1260,7 @@ #define ASC_TIX_TO_LUN(tix) (((tix) >> ASC_SCSI_ID_BITS) & ASC_MAX_LUN) #define ASC_QNO_TO_QADDR(q_no) ((ASC_QADR_BEG)+((int)(q_no) << 6)) -typedef struct asc_scisq_1 { +typedef struct asc_scsiq_1 { uchar status; uchar q_no; uchar cntl; @@ -1367,7 +1274,7 @@ uchar extra_bytes; } ASC_SCSIQ_1; -typedef struct asc_scisq_2 { +typedef struct asc_scsiq_2 { ASC_VADDR srb_ptr; uchar target_ix; uchar flag; @@ -1445,8 +1352,8 @@ typedef struct asc_scsi_req_q { ASC_SCSIQ_1 r1; ASC_SCSIQ_2 r2; - uchar *cdbptr; - ASC_SG_HEAD *sg_head; + uchar *cdbptr; + ASC_SG_HEAD *sg_head; uchar *sense_ptr; ASC_SCSIQ_3 r3; uchar cdb[ASC_MAX_CDB_LEN]; @@ -1528,6 +1435,10 @@ #define ASCQ_ERR_SEND_SCSI_Q 0x22 #define ASCQ_ERR_HOST_REQ_RISC_HALT 0x23 #define ASCQ_ERR_RESET_SDTR 0x24 + +/* + * Warning code values are set in ASC_DVC_VAR 'warn_code'. + */ #define ASC_WARN_NO_ERROR 0x0000 #define ASC_WARN_IO_PORT_ROTATE 0x0001 #define ASC_WARN_EEPROM_CHKSUM 0x0002 @@ -1537,6 +1448,10 @@ #define ASC_WARN_EEPROM_RECOVER 0x0020 #define ASC_WARN_CFG_MSW_RECOVER 0x0040 #define ASC_WARN_SET_PCI_CONFIG_SPACE 0x0080 + +/* + * Error code values are set in ASC_DVC_VAR 'err_code'. + */ #define ASC_IERR_WRITE_EEPROM 0x0001 #define ASC_IERR_MCODE_CHKSUM 0x0002 #define ASC_IERR_SET_PC_ADDR 0x0004 @@ -1551,6 +1466,7 @@ #define ASC_IERR_SCAM 0x0800 #define ASC_IERR_SET_SDTR 0x1000 #define ASC_IERR_RW_LRAM 0x8000 + #define ASC_DEF_IRQ_NO 10 #define ASC_MAX_IRQ_NO 15 #define ASC_MIN_IRQ_NO 10 @@ -1771,19 +1687,10 @@ #define ASC_EEP_ISA_PNP_WSIZE 16 /* - * This struct is filled in by reading ushorts from the board in - * order. Therefore, order of fields matters. - * ASCEEP_Config_Field_IsChar indicates when a ushort actually - * contains two chars. On big_endian machines, the byte-swap needs to - * be undone to put the chars in order. When an entry in - * ASCEEP_Config_Field_IsChar is 1, it indicates that the swap is - * needed. - */ - -/* - * These macros allow us to keep the chip scsi id and isa dma speed - * bitfields in board order. C bitfields aren't portable across - * endianness. + * These macros keep the chip SCSI id and ISA DMA speed + * bitfields in board order. C bitfields aren't portable + * between big and little-endian platforms so they are + * not used. */ #define ASC_EEP_GET_CHIP_ID(cfg) ((cfg)->id_speed & 0x0f) @@ -1806,32 +1713,13 @@ uchar power_up_wait; uchar no_scam; uchar id_speed; /* low order 4 bits is chip scsi id */ - /* high order 4 bits is isa dma speed */ + /* high order 4 bits is isa dma speed */ uchar dos_int13_table[ASC_MAX_TID + 1]; uchar adapter_info[6]; ushort cntl; ushort chksum; } ASCEEP_CONFIG; -STATIC ASCEEP_CONFIG ASCEEP_Config_Field_IsChar = { - 0, /* cfg_lsw */ - 0, /* cfg_msw */ - 1, /* init_sdtr */ - 1, /* disc_enable */ - 1, /* use_cmd_qng */ - 1, /* start_motor */ - 1, /* max_total_qng */ - 1, /* max_tag_qng */ - 1, /* bios_scan */ - 1, /* power_up_wait */ - 1, /* no_scam */ - 1, /* id_speed */ - { 1,1,1,1,1,1,1,1 }, /* dos_int13_table[ASC_MAX_TID + 1] */ - { 1,1,1,1,1,1 }, /* adapter_info[6] */ - 0, /* cntl */ - 0, /* chksum */ -}; - #define ASC_PCI_CFG_LSW_SCSI_PARITY 0x0800 #define ASC_PCI_CFG_LSW_BURST_MODE 0x0080 #define ASC_PCI_CFG_LSW_INTR_ABLE 0x0020 @@ -2071,8 +1959,6 @@ #define AscSetChipLramAddr(port, addr) outpw((PortAddr)((port)+IOP_RAM_ADDR), addr) #define AscGetChipLramData(port) (ushort)inpw((port)+IOP_RAM_DATA) #define AscSetChipLramData(port, data) outpw((port)+IOP_RAM_DATA, data) -#define AscGetChipLramDataNoSwap(port) (ushort)inpw_noswap((port)+IOP_RAM_DATA) -#define AscSetChipLramDataNoSwap(port, data) outpw_noswap((port)+IOP_RAM_DATA, data) #define AscGetChipIFC(port) (uchar)inp((port)+IOP_REG_IFC) #define AscSetChipIFC(port, data) outp((port)+IOP_REG_IFC, data) #define AscGetChipStatus(port) (ASC_CS_TYPE)inpw((port)+IOP_STATUS) @@ -2138,15 +2024,16 @@ #endif /* CONFIG_ISA */ STATIC uchar AscReadLramByte(PortAddr, ushort); STATIC ushort AscReadLramWord(PortAddr, ushort); +#if CC_VERY_LONG_SG_LIST STATIC ASC_DCNT AscReadLramDWord(PortAddr, ushort); +#endif /* CC_VERY_LONG_SG_LIST */ STATIC void AscWriteLramWord(PortAddr, ushort, ushort); -STATIC void AscWriteLramDWord(PortAddr, ushort, ASC_DCNT); STATIC void AscWriteLramByte(PortAddr, ushort, uchar); STATIC ASC_DCNT AscMemSumLramWord(PortAddr, ushort, int); STATIC void AscMemWordSetLram(PortAddr, ushort, ushort, int); -STATIC void AscMemWordCopyToLram(PortAddr, ushort, ushort *, int); -STATIC void AscMemDWordCopyToLram(PortAddr, ushort, ASC_DCNT *, int); -STATIC void AscMemWordCopyFromLram(PortAddr, ushort, ushort *, int); +STATIC void AscMemWordCopyPtrToLram(PortAddr, ushort, uchar *, int); +STATIC void AscMemDWordCopyPtrToLram(PortAddr, ushort, uchar *, int); +STATIC void AscMemWordCopyPtrFromLram(PortAddr, ushort, uchar *, int); STATIC ushort AscInitAscDvcVar(ASC_DVC_VAR *); STATIC ushort AscInitFromEEP(ASC_DVC_VAR *); STATIC ushort AscInitFromAscDvcVar(ASC_DVC_VAR *); @@ -2158,25 +2045,8 @@ STATIC uchar AscGetSynPeriodIndex(ASC_DVC_VAR *, uchar); STATIC uchar AscAllocFreeQueue(PortAddr, uchar); STATIC uchar AscAllocMultipleFreeQueue(PortAddr, uchar, uchar); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -STATIC int AscRiscHaltedAbortSRB(ASC_DVC_VAR *, ASC_DCNT); -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) -STATIC int AscRiscHaltedAbortTIX(ASC_DVC_VAR *, uchar); -#endif /* version >= v1.3.89 */ -#endif /* version < v2.3.28 */ STATIC int AscHostReqRiscHalt(PortAddr); STATIC int AscStopQueueExe(PortAddr); -STATIC int AscStartQueueExe(PortAddr); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) -STATIC int AscCleanUpDiscQueue(PortAddr); -#endif /* version >= v1.3.89 */ -STATIC int AscCleanUpBusyQueue(PortAddr); -#endif /* version < v2.3.28 */ -STATIC int AscWaitTixISRDone(ASC_DVC_VAR *, uchar); -STATIC int AscWaitISRDone(ASC_DVC_VAR *); -STATIC ASC_PADDR AscGetOnePhyAddr(ASC_DVC_VAR *, uchar *, - ASC_DCNT); STATIC int AscSendScsiQueue(ASC_DVC_VAR *, ASC_SCSI_Q * scsiq, uchar n_q_required); @@ -2187,13 +2057,8 @@ STATIC int AscSetChipSynRegAtID(PortAddr, uchar, uchar); STATIC int AscSetRunChipSynRegAtID(PortAddr, uchar, uchar); STATIC ushort AscInitLram(ASC_DVC_VAR *); -STATIC int AscReInitLram(ASC_DVC_VAR *); STATIC ushort AscInitQLinkVar(ASC_DVC_VAR *); STATIC int AscSetLibErrorCode(ASC_DVC_VAR *, ushort); -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) && \ - LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -STATIC int _AscWaitQDone(PortAddr, ASC_SCSI_Q *); -#endif /* version >= v1.3.89 && version < v2.3.28 */ STATIC int AscIsrChipHalted(ASC_DVC_VAR *); STATIC uchar _AscCopyLramScsiDoneQ(PortAddr, ushort, ASC_QDONE_INFO *, ASC_DCNT); @@ -2211,27 +2076,24 @@ STATIC uchar AscSetChipScsiID(PortAddr, uchar); STATIC uchar AscGetChipVersion(PortAddr, ushort); STATIC ushort AscGetChipBusType(PortAddr); -STATIC ASC_DCNT AscLoadMicroCode(PortAddr, ushort, ushort *, ushort); +STATIC ASC_DCNT AscLoadMicroCode(PortAddr, ushort, uchar *, ushort); STATIC int AscFindSignature(PortAddr); STATIC void AscToggleIRQAct(PortAddr); STATIC uchar AscGetChipIRQ(PortAddr, ushort); STATIC uchar AscSetChipIRQ(PortAddr, uchar, ushort); STATIC ushort AscGetChipBiosAddress(PortAddr, ushort); -STATIC int DvcEnterCritical(void); -STATIC void DvcLeaveCritical(int); -STATIC void DvcInPortWords(PortAddr, ushort *, int); -STATIC void DvcOutPortWords(PortAddr, ushort *, int); -STATIC void DvcOutPortDWords(PortAddr, ASC_DCNT *, int); +STATIC inline ulong DvcEnterCritical(void); +STATIC inline void DvcLeaveCritical(ulong); +#ifdef CONFIG_PCI STATIC uchar DvcReadPCIConfigByte(ASC_DVC_VAR *, ushort); STATIC void DvcWritePCIConfigByte(ASC_DVC_VAR *, ushort, uchar); +#endif /* CONFIG_PCI */ STATIC ushort AscGetChipBiosAddress(PortAddr, ushort); STATIC void DvcSleepMilliSecond(ASC_DCNT); STATIC void DvcDelayNanoSecond(ASC_DVC_VAR *, ASC_DCNT); -STATIC ASC_DCNT DvcGetSGList(ASC_DVC_VAR *, uchar *, - ASC_DCNT, ASC_SG_HEAD *); -STATIC void DvcPutScsiQ(PortAddr, ushort, ushort *, int); -STATIC void DvcGetQinfo(PortAddr, ushort, ushort *, int); +STATIC void DvcPutScsiQ(PortAddr, ushort, uchar *, int); +STATIC void DvcGetQinfo(PortAddr, ushort, uchar *, int); STATIC ushort AscInitGetConfig(ASC_DVC_VAR *); STATIC ushort AscInitSetConfig(ASC_DVC_VAR *); STATIC ushort AscInitAsc1000Driver(ASC_DVC_VAR *); @@ -2245,13 +2107,6 @@ STATIC uint AscGetNumOfFreeQueue(ASC_DVC_VAR *, uchar, uchar); STATIC int AscSgListToQueue(int); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -STATIC int AscAbortSRB(ASC_DVC_VAR *, ASC_VADDR); -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) -STATIC int AscResetDevice(ASC_DVC_VAR *, uchar); -#endif /* version >= v1.3.89 */ -#endif /* version < v2.3.28 */ -STATIC int AscResetSB(ASC_DVC_VAR *); #ifdef CONFIG_ISA STATIC void AscEnableIsaDma(uchar); #endif /* CONFIG_ISA */ @@ -2263,7 +2118,7 @@ */ #define ADV_LIB_VERSION_MAJOR 5 -#define ADV_LIB_VERSION_MINOR 12 +#define ADV_LIB_VERSION_MINOR 14 /* d_os_dep.h */ #define ADV_OS_LINUX @@ -2280,7 +2135,7 @@ * types must be used. In Linux the char, short, and int types * are all consistent at 8, 16, and 32 bits respectively. Pointers * and long types are 64 bits on Alpha and UltraSPARC. - */ + */ #define ADV_PADDR __u32 /* Physical address data type. */ #define ADV_VADDR __u32 /* Virtual address data type. */ #define ADV_DCNT __u32 /* Unsigned Data count type. */ @@ -2297,11 +2152,7 @@ #define ADV_VADDR_TO_U32 virt_to_bus #define ADV_U32_TO_VADDR bus_to_virt -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0) -#define AdvPortAddr unsigned short /* I/O Port address size */ -#else /* version >= v1,3,0 */ #define AdvPortAddr ulong /* Virtual memory address size */ -#endif /* version >= v1,3,0 */ /* * Define Adv Library required memory access macros. @@ -2312,14 +2163,6 @@ #define ADV_MEM_WRITEW(addr, word) writew(word, addr) #define ADV_MEM_WRITEDW(addr, dword) writel(dword, addr) -/* - * The I/O memory mapping function names changed in 2.1.X. - */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,0) -#define ioremap vremap -#define iounmap vfree -#endif /* version < v2.1.0 */ - #define ADV_CARRIER_COUNT (ASC_DEF_MAX_HOST_QNG + 15) /* @@ -2336,7 +2179,7 @@ * elements. Allow each command to have at least one ADV_SG_BLOCK structure. * This allows about 15 commands to have the maximum 17 ADV_SG_BLOCK * structures or 255 scatter-gather elements. - * + * */ #define ADV_TOT_SG_BLOCK ASC_DEF_MAX_HOST_QNG @@ -2354,10 +2197,10 @@ #define ADV_SG_TOTAL_MEM_SIZE \ (sizeof(ADV_SG_BLOCK) * ADV_NUM_SG_BLOCK) -#define ASC_PAGE_SIZE PAGE_SIZE +#define ADV_PAGE_SIZE PAGE_SIZE #define ADV_NUM_PAGE_CROSSING \ - ((ADV_SG_TOTAL_MEM_SIZE + (ASC_PAGE_SIZE - 1))/ASC_PAGE_SIZE) + ((ADV_SG_TOTAL_MEM_SIZE + (ADV_PAGE_SIZE - 1))/ADV_PAGE_SIZE) /* a_condor.h */ #define ADV_PCI_VENDOR_ID 0x10CD @@ -2365,12 +2208,12 @@ #define ADV_PCI_DEVID_38C0800_REV1 0x2500 #define ADV_PCI_DEVID_38C1600_REV1 0x2700 -#define ASC_EEP_DVC_CFG_BEGIN (0x00) -#define ASC_EEP_DVC_CFG_END (0x15) -#define ASC_EEP_DVC_CTL_BEGIN (0x16) /* location of OEM name */ -#define ASC_EEP_MAX_WORD_ADDR (0x1E) +#define ADV_EEP_DVC_CFG_BEGIN (0x00) +#define ADV_EEP_DVC_CFG_END (0x15) +#define ADV_EEP_DVC_CTL_BEGIN (0x16) /* location of OEM name */ +#define ADV_EEP_MAX_WORD_ADDR (0x1E) -#define ASC_EEP_DELAY_MS 100 +#define ADV_EEP_DELAY_MS 100 #define ADV_EEPROM_BIG_ENDIAN 0x8000 /* EEPROM Bit 15 */ #define ADV_EEPROM_BIOS_ENABLE 0x4000 /* EEPROM Bit 14 */ @@ -2403,20 +2246,20 @@ /* bit 14 set - BIOS Enable */ /* bit 15 set - Big Endian Mode */ ushort cfg_msw; /* 01 unused */ - ushort disc_enable; /* 02 disconnect enable */ + ushort disc_enable; /* 02 disconnect enable */ ushort wdtr_able; /* 03 Wide DTR able */ ushort sdtr_able; /* 04 Synchronous DTR able */ - ushort start_motor; /* 05 send start up motor */ + ushort start_motor; /* 05 send start up motor */ ushort tagqng_able; /* 06 tag queuing able */ - ushort bios_scan; /* 07 BIOS device control */ - ushort scam_tolerant; /* 08 no scam */ - + ushort bios_scan; /* 07 BIOS device control */ + ushort scam_tolerant; /* 08 no scam */ + uchar adapter_scsi_id; /* 09 Host Adapter ID */ uchar bios_boot_delay; /* power up wait */ - + uchar scsi_reset_delay; /* 10 reset delay */ uchar bios_id_lun; /* first boot device scsi id & lun */ - /* high nibble is lun */ + /* high nibble is lun */ /* low nibble is scsi id */ uchar termination; /* 11 0 - automatic */ @@ -2425,7 +2268,7 @@ /* 3 - low on / high on */ /* There is no low on / high off */ - uchar reserved1; /* reserved byte (not used) */ + uchar reserved1; /* reserved byte (not used) */ ushort bios_ctrl; /* 12 BIOS control bits */ /* bit 0 BIOS don't act as initiator. */ @@ -2444,14 +2287,14 @@ /* bit 13 */ /* bit 14 */ /* bit 15 */ - ushort ultra_able; /* 13 ULTRA speed able */ + ushort ultra_able; /* 13 ULTRA speed able */ ushort reserved2; /* 14 reserved */ uchar max_host_qng; /* 15 maximum host queuing */ uchar max_dvc_qng; /* maximum per device queuing */ ushort dvc_cntl; /* 16 control bit for driver */ ushort bug_fix; /* 17 control bit for bug fix */ - ushort serial_number_word1; /* 18 Board serial number word 1 */ - ushort serial_number_word2; /* 19 Board serial number word 2 */ + ushort serial_number_word1; /* 18 Board serial number word 1 */ + ushort serial_number_word2; /* 19 Board serial number word 2 */ ushort serial_number_word3; /* 20 Board serial number word 3 */ ushort check_sum; /* 21 EEP check sum */ uchar oem_name[16]; /* 22 OEM name */ @@ -2460,9 +2303,9 @@ ushort adv_err_addr; /* 32 last uc error address */ ushort saved_dvc_err_code; /* 33 saved last dev. driver error code */ ushort saved_adv_err_code; /* 34 saved last uc and Adv Lib error code */ - ushort saved_adv_err_addr; /* 35 saved last uc error address */ + ushort saved_adv_err_addr; /* 35 saved last uc error address */ ushort num_of_err; /* 36 number of error */ -} ADVEEP_3550_CONFIG; +} ADVEEP_3550_CONFIG; typedef struct adveep_38C0800_config { @@ -2698,11 +2541,9 @@ #define ADV_38C0800_IOLEN 0x100 /* I/O Port Range in bytes */ /* - * - * XXX - Since ASC38C1600 Rev.3 has a Local RAM failure issue, we come out - * a special 16K Adv Library and Microcode version. After the issue resolved, - * we should turn back to the 32K support. Both a_init.c and mcode.sas files - * also need to be updated. + * XXX - Since ASC38C1600 Rev.3 has a local RAM failure issue, there is + * a special 16K Adv Library and Microcode version. After the issue is + * resolved, should restore 32K support. * * #define ADV_38C1600_MEMSIZE 0x8000L * 32 KB Internal Memory * */ @@ -2907,8 +2748,8 @@ #define SLEW_RATE 0x1000 /* SCSI output buffer slew rate */ #define FILTER_SEL 0x0C00 /* Filter Period Selection */ #define FLTR_DISABLE 0x0000 /* Input Filtering Disabled */ -#define FLTR_11_TO_20NS 0x0800 /* Input Filtering 11ns to 20ns */ -#define FLTR_21_TO_39NS 0x0C00 /* Input Filtering 21ns to 39ns */ +#define FLTR_11_TO_20NS 0x0800 /* Input Filtering 11ns to 20ns */ +#define FLTR_21_TO_39NS 0x0C00 /* Input Filtering 21ns to 39ns */ #define ACTIVE_DBL 0x0200 /* Disable Active Negation */ #define DIFF_MODE 0x0100 /* SCSI differential Mode (Read-Only) */ #define DIFF_SENSE 0x0080 /* 1: No SE cables, 0: SE cable (Read-Only) */ @@ -3048,7 +2889,7 @@ /* - * ASC_DVC_VAR 'warn_code' values + * ADV_DVC_VAR 'warn_code' values */ #define ASC_WARN_BUSRESET_ERROR 0x0001 /* SCSI Bus Reset error */ #define ASC_WARN_EEPROM_CHKSUM 0x0002 /* EEP check sum error */ @@ -3059,11 +2900,8 @@ #define ADV_MAX_TID 15 /* max. target identifier */ #define ADV_MAX_LUN 7 /* max. logical unit number */ - /* - * AscInitGetConfig() and AscInitAsc1000Driver() Definitions - * - * Error code values are set in ASC_DVC_VAR 'err_code'. + * Error code values are set in ADV_DVC_VAR 'err_code'. */ #define ASC_IERR_WRITE_EEPROM 0x0001 /* write EEPROM error */ #define ASC_IERR_MCODE_CHKSUM 0x0002 /* micro code check sum error */ @@ -3196,8 +3034,6 @@ #define ASC_GET_CARRP(carrp) ((carrp) & ASC_NEXT_VPA_MASK) -#define ADV_PAGE_SIZE 4096 /* Assume 4KB page size. */ - #define ADV_CARRIER_NUM_PAGE_CROSSING \ (((ADV_CARRIER_COUNT * sizeof(ADV_CARR_T)) + \ (ADV_PAGE_SIZE - 1))/ADV_PAGE_SIZE) @@ -3225,7 +3061,7 @@ * This structure can be discarded after initialization. Don't add * fields here needed after initialization. * - * Field naming convention: + * Field naming convention: * * *_enable indicates the field enables or disables a feature. The * value of the field is never reset. @@ -3245,7 +3081,7 @@ ushort serial1; /* EEPROM serial number word 1 */ ushort serial2; /* EEPROM serial number word 2 */ ushort serial3; /* EEPROM serial number word 3 */ -} ADV_DVC_CFG; +} ADV_DVC_CFG; struct adv_dvc_var; struct adv_scsi_req_q; @@ -3261,7 +3097,7 @@ * * One structure is required per host adapter. * - * Field naming convention: + * Field naming convention: * * *_able indicates both whether a feature should be enabled or disabled * and whether a device isi capable of the feature. At initialization @@ -3304,13 +3140,13 @@ * driver may discard the buffer after initialization is done. */ ADV_DVC_CFG *cfg; /* temporary configuration structure */ -} ADV_DVC_VAR; +} ADV_DVC_VAR; #define NO_OF_SG_PER_BLOCK 15 typedef struct asc_sg_block { - uchar reserved1; - uchar reserved2; + uchar reserved1; + uchar reserved2; uchar reserved3; uchar sg_cnt; /* Valid entries in block. */ ADV_PADDR sg_ptr; /* Pointer to next sg block. */ @@ -3362,7 +3198,7 @@ ADV_SG_BLOCK *sg_list_ptr; /* SG list virtual address. */ char *vdata_addr; /* Data buffer virtual address. */ uchar a_flag; - uchar pad[2]; /* Pad out to a word boundary. */ + uchar pad[2]; /* Pad out to a word boundary. */ } ADV_SCSI_REQ_Q; /* @@ -3406,8 +3242,8 @@ /* * Device drivers must define the following functions. */ -STATIC int DvcEnterCritical(void); -STATIC void DvcLeaveCritical(int); +STATIC inline ulong DvcEnterCritical(void); +STATIC inline void DvcLeaveCritical(ulong); STATIC void DvcSleepMilliSecond(ADV_DCNT); STATIC uchar DvcAdvReadPCIConfigByte(ADV_DVC_VAR *, ushort); STATIC void DvcAdvWritePCIConfigByte(ADV_DVC_VAR *, ushort, uchar); @@ -3450,68 +3286,6 @@ #define AscPCICmdRegBits_BusMastering 0x0007 #define AscPCICmdRegBits_ParErrRespCtrl 0x0040 -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0) - -/* Read byte from a register. */ -#define AdvReadByteRegister(iop_base, reg_off) \ - (inp((iop_base) + (reg_off))) - -/* Write byte to a register. */ -#define AdvWriteByteRegister(iop_base, reg_off, byte) \ - (outp((iop_base) + (reg_off), (byte))) - -/* Read word (2 bytes) from a register. */ -#define AdvReadWordRegister(iop_base, reg_off) \ - (le16_to_cpu(inpw((iop_base) + (reg_off)))) - -/* Write word (2 bytes) to a register. */ -#define AdvWriteWordRegister(iop_base, reg_off, word) \ - (outpw((iop_base) + (reg_off), cpu_to_le16(word))) - -/* Read byte from LRAM. */ -#define AdvReadByteLram(iop_base, addr, byte) \ -do { \ - outpw((iop_base) + IOPW_RAM_ADDR, (addr)); \ - (byte) = inp((iop_base) + IOPB_RAM_DATA); \ -} while (0) - -/* Write byte to LRAM. */ -#define AdvWriteByteLram(iop_base, addr, byte) \ - (outpw((iop_base) + IOPW_RAM_ADDR, (addr)), \ - outp((iop_base) + IOPB_RAM_DATA, (byte))) - -/* Read word (2 bytes) from LRAM. */ -#define AdvReadWordLram(iop_base, addr, word) \ -do { \ - outpw((iop_base) + IOPW_RAM_ADDR, (addr)); \ - (word) = le16_to_cpu(inpw((iop_base) + IOPW_RAM_DATA)); \ -} while (0) - -/* Write word (2 bytes) to LRAM. */ -#define AdvWriteWordLram(iop_base, addr, word) \ - (outpw((iop_base) + IOPW_RAM_ADDR, (addr)), \ - outpw((iop_base) + IOPW_RAM_DATA, cpu_to_le16(word))) - -/* Write double word (4 bytes) to LRAM */ -/* Because of unspecified C language ordering don't use auto-increment. */ -#define AdvWriteDWordLram(iop_base, addr, dword) \ - ((outpw((iop_base) + IOPW_RAM_ADDR, (addr)), \ - outpw((iop_base) + IOPW_RAM_DATA, \ - cpu_to_le16((ushort) ((dword) & 0xFFFF)))), \ - (outpw((iop_base) + IOPW_RAM_ADDR, (addr) + 2), \ - outpw((iop_base) + IOPW_RAM_DATA, \ - cpu_to_le16((ushort) ((dword >> 16) & 0xFFFF))))) - -/* Read word (2 bytes) from LRAM assuming that the address is already set. */ -#define AdvReadWordAutoIncLram(iop_base) \ - (le16_to_cpu(inpw((iop_base) + IOPW_RAM_DATA))) - -/* Write word (2 bytes) to LRAM assuming that the address is already set. */ -#define AdvWriteWordAutoIncLram(iop_base, word) \ - (outpw((iop_base) + IOPW_RAM_DATA, cpu_to_le16(word))) - -#else /* version >= v1,3,0 */ - /* Read byte from a register. */ #define AdvReadByteRegister(iop_base, reg_off) \ (ADV_MEM_READB((iop_base) + (reg_off))) @@ -3556,15 +3330,15 @@ (ADV_MEM_WRITEW((iop_base) + IOPW_RAM_ADDR, (addr)), \ ADV_MEM_WRITEW((iop_base) + IOPW_RAM_DATA, (word))) -/* Write double word (4 bytes) to LRAM */ +/* Write little-endian double word (4 bytes) to LRAM */ /* Because of unspecified C language ordering don't use auto-increment. */ -#define AdvWriteDWordLram(iop_base, addr, dword) \ +#define AdvWriteDWordLramNoSwap(iop_base, addr, dword) \ ((ADV_MEM_WRITEW((iop_base) + IOPW_RAM_ADDR, (addr)), \ ADV_MEM_WRITEW((iop_base) + IOPW_RAM_DATA, \ - ((ushort) ((dword) & 0xFFFF)))), \ + cpu_to_le16((ushort) ((dword) & 0xFFFF)))), \ (ADV_MEM_WRITEW((iop_base) + IOPW_RAM_ADDR, (addr) + 2), \ ADV_MEM_WRITEW((iop_base) + IOPW_RAM_DATA, \ - ((ushort) ((dword >> 16) & 0xFFFF))))) + cpu_to_le16((ushort) ((dword >> 16) & 0xFFFF))))) /* Read word (2 bytes) from LRAM assuming that the address is already set. */ #define AdvReadWordAutoIncLram(iop_base) \ @@ -3574,7 +3348,6 @@ #define AdvWriteWordAutoIncLram(iop_base, word) \ (ADV_MEM_WRITEW((iop_base) + IOPW_RAM_DATA, (word))) -#endif /* version >= v1,3,0 */ /* * Define macro to check for Condor signature. @@ -3599,7 +3372,7 @@ /* * Abort an SRB in the chip's RISC Memory. The 'srb_ptr' argument must * match the ASC_SCSI_REQ_Q 'srb_ptr' field. - * + * * If the request has not yet been sent to the device it will simply be * aborted from RISC memory. If the request is disconnected it will be * aborted on reselection by sending an Abort Message to the target ID. @@ -3702,6 +3475,7 @@ /* Return the address that is aligned at the next doubleword >= to 'addr'. */ #define ADV_8BALIGN(addr) (((ulong) (addr) + 0x7) & ~0x7) #define ADV_16BALIGN(addr) (((ulong) (addr) + 0xF) & ~0xF) +#define ADV_32BALIGN(addr) (((ulong) (addr) + 0x1F) & ~0x1F) /* * Total contiguous memory needed for driver SG blocks. @@ -3711,80 +3485,76 @@ * single request. */ -#ifndef ADV_MAX_SG_LIST -Forced Error: Driver must define ADV_MAX_SG_LIST. -#endif /* ADV_MAX_SG_LIST */ - #define ADV_SG_LIST_MAX_BYTE_SIZE \ (sizeof(ADV_SG_BLOCK) * \ ((ADV_MAX_SG_LIST + (NO_OF_SG_PER_BLOCK - 1))/NO_OF_SG_PER_BLOCK)) -/* - * Inquiry data structure and bitfield accessor macros +/* + * Inquiry data structure and bitfield macros * * Using bitfields to access the subchar data isn't portable across - * endianness, so instead mask and shift. Only quantities of more + * endianness, so instead mask and shift. Only quantities of more * than 1 bit are shifted, since the others are just tested for true * or false. */ -#define INQ_DVC_TYPE(inq) ((inq).periph & 0x1f) -#define INQ_QUALIFIER(inq) (((inq).periph & 0xe0) >> 5) -#define INQ_DVC_TYPE_MOD(inq) ((inq).devtype & 0x7f) -#define INQ_REMOVABLE(inq) ((inq).devtype & 0x80) -#define INQ_ANSI_VER(inq) ((inq).ver & 0x07) -#define INQ_ECMA_VER(inq) (((inq).ver & 0x38) >> 3) -#define INQ_ISO_VER(inq) (((inq).ver & 0xc0) >> 6) -#define INQ_RESPONSE_FMT(inq) ((inq).byte3 & 0x0f) -#define INQ_TERM_IO(inq) ((inq).byte3 & 0x40) -#define INQ_ASYNC_NOTIF(inq) ((inq).byte3 & 0x80) -#define INQ_SOFT_RESET(inq) ((inq).flags & 0x01) -#define INQ_CMD_QUEUE(inq) ((inq).flags & 0x02) -#define INQ_LINK_CMD(inq) ((inq).flags & 0x08) -#define INQ_SYNC(inq) ((inq).flags & 0x10) -#define INQ_WIDE16(inq) ((inq).flags & 0x20) -#define INQ_WIDE32(inq) ((inq).flags & 0x40) -#define INQ_REL_ADDR(inq) ((inq).flags & 0x80) -#define INQ_INFO_UNIT(inq) ((inq).info & 0x01) -#define INQ_QUICK_ARB(inq) ((inq).info & 0x02) -#define INQ_CLOCKING(inq) (((inq).info & 0x0c) >> 2) +#define ADV_INQ_DVC_TYPE(inq) ((inq)->periph & 0x1f) +#define ADV_INQ_QUALIFIER(inq) (((inq)->periph & 0xe0) >> 5) +#define ADV_INQ_DVC_TYPE_MOD(inq) ((inq)->devtype & 0x7f) +#define ADV_INQ_REMOVABLE(inq) ((inq)->devtype & 0x80) +#define ADV_INQ_ANSI_VER(inq) ((inq)->ver & 0x07) +#define ADV_INQ_ECMA_VER(inq) (((inq)->ver & 0x38) >> 3) +#define ADV_INQ_ISO_VER(inq) (((inq)->ver & 0xc0) >> 6) +#define ADV_INQ_RESPONSE_FMT(inq) ((inq)->byte3 & 0x0f) +#define ADV_INQ_TERM_IO(inq) ((inq)->byte3 & 0x40) +#define ADV_INQ_ASYNC_NOTIF(inq) ((inq)->byte3 & 0x80) +#define ADV_INQ_SOFT_RESET(inq) ((inq)->flags & 0x01) +#define ADV_INQ_CMD_QUEUE(inq) ((inq)->flags & 0x02) +#define ADV_INQ_LINK_CMD(inq) ((inq)->flags & 0x08) +#define ADV_INQ_SYNC(inq) ((inq)->flags & 0x10) +#define ADV_INQ_WIDE16(inq) ((inq)->flags & 0x20) +#define ADV_INQ_WIDE32(inq) ((inq)->flags & 0x40) +#define ADV_INQ_REL_ADDR(inq) ((inq)->flags & 0x80) +#define ADV_INQ_INFO_UNIT(inq) ((inq)->info & 0x01) +#define ADV_INQ_QUICK_ARB(inq) ((inq)->info & 0x02) +#define ADV_INQ_CLOCKING(inq) (((inq)->info & 0x0c) >> 2) typedef struct { - uchar periph; /* peripheral device type [0:4] */ - /* peripheral qualifier [5:7] */ - uchar devtype; /* device type modifier (for SCSI I) [0:6] */ - /* RMB - removable medium bit [7] */ - uchar ver; /* ANSI approved version [0:2] */ - /* ECMA version [3:5] */ - /* ISO version [6:7] */ - uchar byte3; /* response data format [0:3] */ + uchar periph; /* peripheral device type [0:4] */ + /* peripheral qualifier [5:7] */ + uchar devtype; /* device type modifier (for SCSI I) [0:6] */ + /* RMB - removable medium bit [7] */ + uchar ver; /* ANSI approved version [0:2] */ + /* ECMA version [3:5] */ + /* ISO version [6:7] */ + uchar byte3; /* response data format [0:3] */ /* 0 SCSI 1 */ /* 1 CCS */ /* 2 SCSI-2 */ /* 3-F reserved */ - /* reserved [4:5] */ - /* terminate I/O process bit (see 5.6.22) [6] */ - /* asynch. event notification (processor) [7] */ + /* reserved [4:5] */ + /* terminate I/O process bit (see 5.6.22) [6] */ + /* asynch. event notification (processor) [7] */ uchar add_len; /* additional length */ + uchar res1; /* reserved */ uchar res2; /* reserved */ - uchar res3; /* reserved */ - uchar flags; /* soft reset implemented [0] */ - /* command queuing [1] */ - /* reserved [2] */ - /* linked command for this logical unit [3] */ - /* synchronous data transfer [4] */ - /* wide bus 16 bit data transfer [5] */ - /* wide bus 32 bit data transfer [6] */ - /* relative addressing mode [7] */ + uchar flags; /* soft reset implemented [0] */ + /* command queuing [1] */ + /* reserved [2] */ + /* linked command for this logical unit [3] */ + /* synchronous data transfer [4] */ + /* wide bus 16 bit data transfer [5] */ + /* wide bus 32 bit data transfer [6] */ + /* relative addressing mode [7] */ uchar vendor_id[8]; /* vendor identification */ uchar product_id[16]; /* product identification */ uchar product_rev_level[4]; /* product revision level */ uchar vendor_specific[20]; /* vendor specific */ - uchar info; /* information unit supported [0] */ - /* quick arbitrate supported [1] */ - /* clocking field [2:3] */ - /* reserved [4:7] */ - uchar res6; /* reserved */ + uchar info; /* information unit supported [0] */ + /* quick arbitrate supported [1] */ + /* clocking field [2:3] */ + /* reserved [4:7] */ + uchar res3; /* reserved */ } ADV_SCSI_INQUIRY; /* 58 bytes */ @@ -3801,7 +3571,6 @@ /* asc_board_t flags */ #define ASC_HOST_IN_RESET 0x01 -#define ASC_HOST_IN_ABORT 0x02 #define ASC_IS_WIDE_BOARD 0x04 /* AdvanSys Wide Board */ #define ASC_SELECT_QUEUE_DEPTHS 0x08 @@ -3815,22 +3584,17 @@ * and data after loading, define macros for this purpose. These macros * are not used when the driver is built as a module, cf. linux/init.h. */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,23) -#define ASC_INITFUNC(type, func) type func -#define ASC_INITDATA -#define ASC_INIT -#else /* version >= v2.1.23 */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,16) -#define ASC_INITFUNC(type, func) __initfunc(type func) -#else /* version >= v2.3.16 */ +#if ASC_LINUX_KERNEL24 #define ASC_INITFUNC(type, func) type __init func -#endif /* version >= v2.3.16 */ +#elif ASC_LINUX_KERNEL22 +#define ASC_INITFUNC(type, func) __initfunc(type func) +#endif #define ASC_INITDATA __initdata #define ASC_INIT __init -#endif /* version >= v2.1.23 */ #define ASC_INFO_SIZE 128 /* advansys_info() line size */ +#ifdef CONFIG_PROC_FS /* /proc/scsi/advansys/[0...] related definitions */ #define ASC_PRTBUF_SIZE 2048 #define ASC_PRTLINE_SIZE 160 @@ -3846,6 +3610,37 @@ } #define ASC_MIN(a, b) (((a) < (b)) ? (a) : (b)) +#endif /* CONFIG_PROC_FS */ + +/* + * XXX - Release and acquire the io_request_lock. These macros are needed + * because the 2.4 kernel SCSI mid-level driver holds the 'io_request_lock' + * on entry to SCSI low-level drivers. + * + * These definitions and all code that uses code should be removed when the + * SCSI mid-level driver no longer holds the 'io_request_lock' on entry to + * SCSI low-level driver detect, queuecommand, and reset entrypoints. + * + * The interrupt flags values doesn't matter in the macros because the + * SCSI mid-level will save and restore the flags values before and after + * calling advansys_detect, advansys_queuecommand, and advansys_reset where + * these macros are used. We do want interrupts enabled after the lock is + * released so an explicit sti() is done. The driver only needs interrupts + * disabled when it acquires the per board lock. + */ +#define ASC_UNLOCK_IO_REQUEST_LOCK \ + { \ + ulong flags; /* flags value not needed, cf. comment above. */ \ + save_flags(flags); \ + spin_unlock_irqrestore(&io_request_lock, flags); \ + sti(); /* enable interrupts */ \ + } + +#define ASC_LOCK_IO_REQUEST_LOCK \ + { \ + ulong flags; /* flags value not needed, cf. comment above. */ \ + spin_lock_irqsave(&io_request_lock, flags); \ + } /* Asc Library return codes */ #define ASC_TRUE 1 @@ -4186,16 +3981,8 @@ /* Per board statistics structure */ struct asc_stats { /* Driver Entrypoint Statistics */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) - ADV_DCNT command; /* # calls to advansys_command() */ -#endif /* version < v2.3.28 */ ADV_DCNT queuecommand; /* # calls to advansys_queuecommand() */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) - ADV_DCNT abort; /* # calls to advansys_abort() */ - ADV_DCNT reset; /* # calls to advansys_reset() */ -#else /* version >= v2.3.28 */ - ADV_DCNT eh_bus_reset; /* # calls to advansys_eh_bus_reset() */ -#endif /* version >= v2.3.28 */ + ADV_DCNT reset; /* # calls to advansys_eh_bus_reset() */ ADV_DCNT biosparam; /* # calls to advansys_biosparam() */ ADV_DCNT interrupt; /* # advansys_interrupt() calls */ ADV_DCNT callback; /* # calls to asc/adv_isr_callback() */ @@ -4249,17 +4036,17 @@ * up to 255 scatter-gather elements may be used per request or * ADV_SCSI_REQ_Q. * - * Both structures must be 8 byte aligned. + * Both structures must be 32 byte aligned. */ typedef struct adv_sgblk { ADV_SG_BLOCK sg_block; /* Sgblock structure. */ - uchar align[8]; /* Sgblock structure padding. */ + uchar align[32]; /* Sgblock structure padding. */ struct adv_sgblk *next_sgblkp; /* Next scatter-gather structure. */ } adv_sgblk_t; typedef struct adv_req { ADV_SCSI_REQ_Q scsi_req_q; /* Adv Library request structure. */ - uchar align[8]; /* Request structure padding. */ + uchar align[32]; /* Request structure padding. */ Scsi_Cmnd *cmndp; /* Mid-Level SCSI command pointer. */ adv_sgblk_t *sgblkp; /* Adv Library scatter-gather pointer. */ struct adv_req *next_reqp; /* Next Request Structure. */ @@ -4299,13 +4086,11 @@ ADVEEP_38C1600_CONFIG adv_38C1600_eep; /* 38C1600 EEPROM config. */ } eep_config; ulong last_reset; /* Saved last reset time */ -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,28) spinlock_t lock; /* Board spinlock */ -#endif /* version >= v2.3.28 */ -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) +#ifdef CONFIG_PROC_FS /* /proc/scsi/advansys/[0...] */ - char *prtbuf; /* Statistics Print Buffer */ -#endif /* version >= v1.3.0 */ + char *prtbuf; /* /proc print buffer */ +#endif /* CONFIG_PROC_FS */ #ifdef ADVANSYS_STATS struct asc_stats asc_stats; /* Board statistics */ #endif /* ADVANSYS_STATS */ @@ -4388,8 +4173,8 @@ /* Note: All driver global data should be initialized. */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) && \ - LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) +#if ASC_LINUX_KERNEL22 +#ifdef CONFIG_PROC_FS struct proc_dir_entry proc_scsi_advansys = { PROC_SCSI_ADVANSYS, /* unsigned short low_ino */ @@ -4398,13 +4183,14 @@ S_IFDIR | S_IRUGO | S_IXUGO, /* mode_t mode */ 2 /* nlink_t nlink */ }; -#endif /* v2.3.28 > version >= v1.3.0 */ +#endif /* CONFIG_PROC_FS */ +#endif /* ASC_LINUX_KERNEL22 */ /* Number of boards detected in system. */ STATIC int asc_board_count = 0; STATIC struct Scsi_Host *asc_host[ASC_NUM_BOARD_SUPPORTED] = { 0 }; -/* Overrun buffer shared between all boards. */ +/* Overrun buffer used by all narrow boards. */ STATIC uchar overrun_buf[ASC_OVERRUN_BSIZE] = { 0 }; /* @@ -4421,12 +4207,6 @@ ASC_IS_PCI, }; -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93) -#ifdef ASC_CONFIG_PCI -STATIC int pci_scan_method ASC_INITDATA = -1; -#endif /* ASC_CONFIG_PCI */ -#endif /* version < v2.1.93 */ - /* * Used with the LILO 'advansys' option to eliminate or * limit I/O port probing at boot time, cf. advansys_setup(). @@ -4434,19 +4214,6 @@ STATIC int asc_iopflag = ASC_FALSE; STATIC int asc_ioport[ASC_NUM_IOPORT_PROBE] = { 0, 0, 0, 0 }; -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0) -/* - * In kernels earlier than v1.3.0, kmalloc() does not work - * during driver initialization. Therefore statically declare - * 16 elements of each structure. v1.3.0 kernels will probably - * not need any more than this number. - */ -uchar adv_carr_buf[20 * sizeof(ADV_CARR_T)] = { 0 }; -uchar adv_req_buf[16 * sizeof(adv_req_t)] = { 0 }; -#define ADV_SGBLK_BUF_CNT 32 -uchar adv_sgblk_buf[ADV_SGBLK_BUF_CNT * sizeof(adv_sgblk_t)] = { 0 }; -#endif /* version >= v1,3,0 */ - #ifdef ADVANSYS_DEBUG STATIC char * asc_bus_name[ASC_NUM_BUS] = { @@ -4469,23 +4236,9 @@ * advansys.h contains function prototypes for functions global to Linux. */ -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) -#ifdef CONFIG_PROC_FS -STATIC int asc_proc_copy(off_t, off_t, char *, int , char *, int); -#endif /* CONFIG_PROC_FS */ -#endif /* version >= v1.3.0 */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,70) -STATIC void advansys_interrupt(int, struct pt_regs *); -#else /* version >= v1.3.70 */ -STATIC void advansys_interrupt(int, void *, struct pt_regs *); -#endif /* version >= v1.3.70 */ -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) -STATIC void advansys_select_queue_depths(struct Scsi_Host *, - Scsi_Device *); -#endif /* version >= v1.3.89 */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -STATIC void advansys_command_done(Scsi_Cmnd *); -#endif /* version < v2.3.28 */ +STATIC void advansys_interrupt(int, void *, struct pt_regs *); +STATIC void advansys_select_queue_depths(struct Scsi_Host *, + Scsi_Device *); STATIC void asc_scsi_done_list(Scsi_Cmnd *); STATIC int asc_execute_scsi_cmnd(Scsi_Cmnd *); STATIC int asc_build_req(asc_board_t *, Scsi_Cmnd *); @@ -4494,27 +4247,13 @@ STATIC void asc_isr_callback(ASC_DVC_VAR *, ASC_QDONE_INFO *); STATIC void adv_isr_callback(ADV_DVC_VAR *, ADV_SCSI_REQ_Q *); STATIC void adv_async_callback(ADV_DVC_VAR *, uchar); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93) -#ifdef ASC_CONFIG_PCI -STATIC int asc_srch_pci_dev(PCI_DEVICE *); -STATIC uchar asc_scan_method(void); -STATIC int asc_pci_find_dev(PCI_DEVICE *); -STATIC void asc_get_pci_cfg(PCI_DEVICE *, PCI_CONFIG_SPACE *); -STATIC ushort asc_get_cfg_word(PCI_DATA *); -STATIC uchar asc_get_cfg_byte(PCI_DATA *); -STATIC void asc_put_cfg_byte(PCI_DATA *, uchar); -#endif /* ASC_CONFIG_PCI */ -#endif /* version < v2.1.93 */ STATIC void asc_enqueue(asc_queue_t *, REQP, int); STATIC REQP asc_dequeue(asc_queue_t *, int); STATIC REQP asc_dequeue_list(asc_queue_t *, REQP *, int); STATIC int asc_rmqueue(asc_queue_t *, REQP); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -STATIC int asc_isqueued(asc_queue_t *, REQP); -#endif /* version < v2.3.28 */ STATIC void asc_execute_queue(asc_queue_t *); -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) #ifdef CONFIG_PROC_FS +STATIC int asc_proc_copy(off_t, off_t, char *, int , char *, int); STATIC int asc_prt_board_devices(struct Scsi_Host *, char *, int); STATIC int asc_prt_adv_bios(struct Scsi_Host *, char *, int); STATIC int asc_get_eeprom_string(ushort *serialnum, uchar *cp); @@ -4525,12 +4264,12 @@ STATIC int asc_prt_adv_board_info(struct Scsi_Host *, char *, int); STATIC int asc_prt_line(char *, int, char *fmt, ...); #endif /* CONFIG_PROC_FS */ -#endif /* version >= v1.3.0 */ /* Declaration for Asc Library internal functions referenced by driver. */ STATIC int AscFindSignature(PortAddr); STATIC ushort AscGetEEPConfig(PortAddr, ASCEEP_CONFIG *, ushort); +/* Statistics function prototypes. */ #ifdef ADVANSYS_STATS #ifdef CONFIG_PROC_FS STATIC int asc_prt_board_stats(struct Scsi_Host *, char *, int); @@ -4538,6 +4277,7 @@ #endif /* CONFIG_PROC_FS */ #endif /* ADVANSYS_STATS */ +/* Debug function prototypes. */ #ifdef ADVANSYS_DEBUG STATIC void asc_prt_scsi_host(struct Scsi_Host *); STATIC void asc_prt_scsi_cmnd(Scsi_Cmnd *); @@ -4552,16 +4292,12 @@ STATIC void asc_prt_hex(char *f, uchar *, int); #endif /* ADVANSYS_DEBUG */ -#ifdef ADVANSYS_ASSERT -STATIC int advansys_interrupts_enabled(void); -#endif /* ADVANSYS_ASSERT */ - /* * --- Linux 'Scsi_Host_Template' and advansys_setup() Functions */ -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) +#ifdef CONFIG_PROC_FS /* * advansys_proc_info() - /proc/scsi/advansys/[0-(ASC_NUM_BOARD_SUPPORTED-1)] * @@ -4583,10 +4319,9 @@ * user just won't get all the available statistics. */ int -advansys_proc_info(char *buffer, char **start, off_t offset, int length, +advansys_proc_info(char *buffer, char **start, off_t offset, int length, int hostno, int inout) { -#ifdef CONFIG_PROC_FS struct Scsi_Host *shp; asc_board_t *boardp; int i; @@ -4598,7 +4333,9 @@ char *curbuf; off_t advoffset; Scsi_Device *scd; +#ifdef ADVANSYS_STATS int tgt_id; +#endif /* ADVANSYS_STATS */ ASC_DBG(1, "advansys_proc_info: begin\n"); @@ -4690,11 +4427,7 @@ * Display target driver information for each device attached * to the board. */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,75) - for (scd = scsi_devices; scd; scd = scd->next) -#else /* version >= v2.1.75 */ for (scd = shp->host_queue; scd; scd = scd->next) -#endif /* version >= v2.1.75 */ { if (scd->host == shp) { cp = boardp->prtbuf; @@ -4715,7 +4448,7 @@ curbuf += cnt; } } - + /* * Display EEPROM configuration for the board. */ @@ -4812,11 +4545,8 @@ ASC_DBG1(1, "advansys_proc_info: totcnt %d\n", totcnt); return totcnt; -#else /* CONFIG_PROC_FS */ - return 0; -#endif /* CONFIG_PROC_FS */ } -#endif /* version >= v1.3.0 */ +#endif /* CONFIG_PROC_FS */ /* * advansys_detect() @@ -4847,19 +4577,6 @@ int ioport = 0; int share_irq = FALSE; int iolen = 0; -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93) -#ifdef ASC_CONFIG_PCI - int pci_init_search = 0; - PCI_DEVICE pci_device[ASC_NUM_BOARD_SUPPORTED]; - int pci_card_cnt_max = 0; - int pci_card_cnt = 0; - PCI_DEVICE pciDevice; - PCI_CONFIG_SPACE pciConfig; -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) - ADV_PADDR pci_memory_address; -#endif /* version >= v1,3,0 */ -#endif /* ASC_CONFIG_PCI */ -#else /* version >= v2.1.93 */ #ifdef CONFIG_PCI int pci_init_search = 0; struct pci_dev *pci_devicep[ASC_NUM_BOARD_SUPPORTED]; @@ -4877,7 +4594,6 @@ }; ADV_PADDR pci_memory_address; #endif /* CONFIG_PCI */ -#endif /* version >= v2.1.93 */ int warn_code, err_code; int ret; @@ -4890,11 +4606,18 @@ ASC_DBG(1, "advansys_detect: begin\n"); -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,28) + /* + * XXX - Remove this comment and the next line when SCSI mid-level + * no longer acquires 'io_request_lock' before calling the SCSI + * low-level detect entrypoint. + */ + ASC_UNLOCK_IO_REQUEST_LOCK + +#if ASC_LINUX_KERNEL24 tpnt->proc_name = "advansys"; -#elif LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) +#elif ASC_LINUX_KERNEL22 tpnt->proc_dir = &proc_scsi_advansys; -#endif /* version >= v1.3.0 */ +#endif asc_board_count = 0; @@ -4904,7 +4627,7 @@ */ if (asc_iopflag == ASC_TRUE) { for (ioport = 0; ioport < ASC_NUM_IOPORT_PROBE; ioport++) { - ASC_DBG2(1, "advansys_detect: asc_ioport[%d] %x\n", + ASC_DBG2(1, "advansys_detect: asc_ioport[%d] 0x%x\n", ioport, asc_ioport[ioport]); if (asc_ioport[ioport] != 0) { for (iop = 0; iop < ASC_IOADR_TABLE_MAX_IX; iop++) { @@ -4923,15 +4646,6 @@ ioport = 0; } -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93) -#ifdef ASC_CONFIG_PCI - memset(&pciDevice, 0, sizeof(PCI_DEVICE)); - memset(&pciConfig, 0, sizeof(PCI_CONFIG_SPACE)); - pciDevice.maxBusNumber = PCI_MAX_BUS; - pciDevice.endSlot = PCI_MAX_SLOT; -#endif /* ASC_CONFIG_PCI */ -#endif /* version < v2.1.93 */ - for (bus = 0; bus < ASC_NUM_BUS; bus++) { ASC_DBG2(1, "advansys_detect: bus search type %d (%s)\n", @@ -4965,7 +4679,8 @@ } } if (iop) { - ASC_DBG1(1, "advansys_detect: probing I/O port %x...\n", + ASC_DBG1(1, + "advansys_detect: probing I/O port 0x%x...\n", iop); if (check_region(iop, ASC_IOADR_GAP) != 0) { printk( @@ -5016,67 +4731,6 @@ break; case ASC_IS_PCI: -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93) -#ifdef ASC_CONFIG_PCI - if (pci_init_search == 0) { - int i, j; - - pci_init_search = 1; - - /* Find all PCI cards. */ - while (asc_srch_pci_dev(&pciDevice) == PCI_DEVICE_FOUND) { - pci_device[pci_card_cnt_max++] = pciDevice; - } - - /* - * Sort PCI cards in ascending order by PCI Bus, Slot, - * and Device Number. - */ - for (i = 0; i < pci_card_cnt_max - 1; i++) - { - for (j = i + 1; j < pci_card_cnt_max; j++) { - if ((pci_device[j].busNumber < - pci_device[i].busNumber) || - ((pci_device[j].busNumber == - pci_device[i].busNumber) && - (pci_device[j].slotNumber < - pci_device[i].slotNumber)) || - ((pci_device[j].busNumber == - pci_device[i].busNumber) && - (pci_device[j].slotNumber == - pci_device[i].slotNumber) && - (pci_device[j].devFunc < - pci_device[i].devFunc))) { - pciDevice = pci_device[i]; - pci_device[i] = pci_device[j]; - pci_device[j] = pciDevice; - } - } - } - - pci_card_cnt = 0; - } else { - pci_card_cnt++; - } - - if (pci_card_cnt == pci_card_cnt_max) { - iop = 0; - } else { - pciDevice = pci_device[pci_card_cnt]; - ASC_DBG2(2, - "advansys_detect: slotFound %d, busNumber %d\n", - pciDevice.slotFound, pciDevice.busNumber); - asc_get_pci_cfg(&pciDevice, &pciConfig); - iop = pciConfig.baseAddress[0] & PCI_IOADDRESS_MASK; - ASC_DBG2(1, - "advansys_detect: vendorID %X, deviceID %X\n", - pciConfig.vendorID, pciConfig.deviceID); - ASC_DBG2(2, "advansys_detect: iop %X, irqLine %d\n", - iop, pciConfig.irqLine); - } - break; -#endif /* ASC_CONFIG_PCI */ -#else /* version >= v2.1.93 */ #ifdef CONFIG_PCI if (pci_init_search == 0) { int i, j; @@ -5090,13 +4744,13 @@ NULL) { pci_device_id_cnt++; } else { -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0) - pci_devicep[pci_card_cnt_max++] = pci_devp; -#else /* version >= v2.4.0 */ +#if ASC_LINUX_KERNEL24 if (pci_enable_device(pci_devp) == 0) { pci_devicep[pci_card_cnt_max++] = pci_devp; } -#endif /* version >= v2.4.0 */ +#elif ASC_LINUX_KERNEL22 + pci_devicep[pci_card_cnt_max++] = pci_devp; +#endif } } @@ -5133,21 +4787,18 @@ ASC_DBG2(2, "advansys_detect: devfn %d, bus number %d\n", pci_devp->devfn, pci_devp->bus->number); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,13) - iop = pci_devp->base_address[0] & PCI_IOADDRESS_MASK; -#elif LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0) - iop = pci_devp->resource[0].start & PCI_IOADDRESS_MASK; -#else /* version >= v2.4.0 */ +#if ASC_LINUX_KERNEL24 iop = pci_resource_start(pci_devp, 0); -#endif /* version >= v2.4.0 */ - ASC_DBG2(1, +#elif ASC_LINUX_KERNEL22 + iop = pci_devp->base_address[0] & PCI_IOADDRESS_MASK; +#endif + ASC_DBG2(1, "advansys_detect: vendorID %X, deviceID %X\n", pci_devp->vendor, pci_devp->device); ASC_DBG2(2, "advansys_detect: iop %X, irqLine %d\n", iop, pci_devp->irq); } #endif /* CONFIG_PCI */ -#endif /* version >= v2.1.93 */ break; default: @@ -5155,7 +4806,7 @@ asc_bus[bus]); break; } - ASC_DBG1(1, "advansys_detect: iop %x\n", iop); + ASC_DBG1(1, "advansys_detect: iop 0x%x\n", iop); /* * Adapter not found, try next bus type. @@ -5172,9 +4823,9 @@ */ ASC_DBG(2, "advansys_detect: scsi_register()\n"); shp = scsi_register(tpnt, sizeof(asc_board_t)); - - if(shp == NULL) { - continue; + + if (shp == NULL) { + continue; } /* Save a pointer to the Scsi_host of each board found. */ @@ -5185,10 +4836,8 @@ memset(boardp, 0, sizeof(asc_board_t)); boardp->id = asc_board_count - 1; -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,28) /* Initialize spinlock. */ - boardp->lock = SPIN_LOCK_UNLOCKED; -#endif /* version >= v2.3.28 */ + boardp->lock = SPIN_LOCK_UNLOCKED; /* * Handle both narrow and wide boards. @@ -5197,17 +4846,6 @@ * wide board flag. Set-up the board structure based on * the board type. */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93) -#ifdef ASC_CONFIG_PCI - if (asc_bus[bus] == ASC_IS_PCI && - (pciConfig.deviceID == ASC_PCI_DEVICE_ID_2300 || - pciConfig.deviceID == ASC_PCI_DEVICE_ID_2500 || - pciConfig.deviceID == ASC_PCI_DEVICE_ID_2700)) - { - boardp->flags |= ASC_IS_WIDE_BOARD; - } -#endif /* ASC_CONFIG_PCI */ -#else /* version >= v2.1.93 */ #ifdef CONFIG_PCI if (asc_bus[bus] == ASC_IS_PCI && (pci_devp->device == ASC_PCI_DEVICE_ID_2300 || @@ -5217,7 +4855,6 @@ boardp->flags |= ASC_IS_WIDE_BOARD; } #endif /* CONFIG_PCI */ -#endif /* version >= v2.1.93 */ if (ASC_NARROW_BOARD(boardp)) { ASC_DBG(1, "advansys_detect: narrow board\n"); @@ -5235,24 +4872,6 @@ adv_dvc_varp->cfg = &boardp->dvc_cfg.adv_dvc_cfg; adv_dvc_varp->isr_callback = adv_isr_callback; adv_dvc_varp->async_callback = adv_async_callback; - -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93) -#ifdef ASC_CONFIG_PCI - if (pciConfig.deviceID == ASC_PCI_DEVICE_ID_2300) - { - ASC_DBG(1, "advansys_detect: ASC-3550\n"); - adv_dvc_varp->chip_type = ADV_CHIP_ASC3550; - } else if (pciConfig.deviceID == ASC_PCI_DEVICE_ID_2500) - { - ASC_DBG(1, "advansys_detect: ASC-38C0800\n"); - adv_dvc_varp->chip_type = ADV_CHIP_ASC38C0800; - } else - { - ASC_DBG(1, "advansys_detect: ASC-38C1600\n"); - adv_dvc_varp->chip_type = ADV_CHIP_ASC38C1600; - } -#endif /* ASC_CONFIG_PCI */ -#else /* version >= v2.1.93 */ #ifdef CONFIG_PCI if (pci_devp->device == ASC_PCI_DEVICE_ID_2300) { @@ -5268,11 +4887,7 @@ adv_dvc_varp->chip_type = ADV_CHIP_ASC38C1600; } #endif /* CONFIG_PCI */ -#endif /* version >= v2.1.93 */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0) - adv_dvc_varp->iop_base = iop; -#else /* version >= v1,3,0 */ /* * Map the board's registers into virtual memory for * PCI slave access. Only memory accesses are used to @@ -5294,75 +4909,46 @@ { iolen = ADV_38C1600_IOLEN; } -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93) -#ifdef ASC_CONFIG_PCI - pci_memory_address = pciConfig.baseAddress[1]; - ASC_DBG1(1, "advansys_detect: pci_memory_address: %lu\n", - (ulong) pci_memory_address); - if ((boardp->ioremap_addr = - ioremap(pci_memory_address & PAGE_MASK, - PAGE_SIZE)) == 0) { - ASC_PRINT3( -"advansys_detect: board %d: ioremap(%lu, %x) returned NULL\n", - boardp->id, (ulong) pci_memory_address, iolen); - scsi_unregister(shp); - asc_board_count--; - continue; - } - ASC_DBG1(1, "advansys_detect: ioremap_addr: %lx\n", - (ulong) boardp->ioremap_addr); - adv_dvc_varp->iop_base = (AdvPortAddr) - (boardp->ioremap_addr + - (pci_memory_address - (pci_memory_address & PAGE_MASK))); - ASC_DBG1(1, "advansys_detect: iop_base: %lx\n", - adv_dvc_varp->iop_base); -#endif /* ASC_CONFIG_PCI */ -#else /* version >= v2.1.93 */ #ifdef CONFIG_PCI -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,13) - pci_memory_address = pci_devp->base_address[1]; -#elif LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0) - pci_memory_address = pci_devp->resource[1].start; -#else /* version >= v2.4.0 */ +#if ASC_LINUX_KERNEL24 pci_memory_address = pci_resource_start(pci_devp, 1); -#endif /* version >= v2.4.0 */ - ASC_DBG1(1, "advansys_detect: pci_memory_address: %x\n", - pci_memory_address); +#elif ASC_LINUX_KERNEL22 + pci_memory_address = pci_devp->base_address[1]; +#endif + ASC_DBG1(1, "advansys_detect: pci_memory_address: 0x%lx\n", + (ulong) pci_memory_address); if ((boardp->ioremap_addr = ioremap(pci_memory_address & PAGE_MASK, PAGE_SIZE)) == 0) { ASC_PRINT3( "advansys_detect: board %d: ioremap(%x, %d) returned NULL\n", - boardp->id, pci_memory_address, iolen); + boardp->id, pci_memory_address, iolen); scsi_unregister(shp); asc_board_count--; continue; } - ASC_DBG1(1, "advansys_detect: ioremap_addr: %lx\n", + ASC_DBG1(1, "advansys_detect: ioremap_addr: 0x%lx\n", (ulong) boardp->ioremap_addr); adv_dvc_varp->iop_base = (AdvPortAddr) (boardp->ioremap_addr + (pci_memory_address - (pci_memory_address & PAGE_MASK))); - ASC_DBG1(1, "advansys_detect: iop_base: %lx\n", + ASC_DBG1(1, "advansys_detect: iop_base: 0x%lx\n", adv_dvc_varp->iop_base); #endif /* CONFIG_PCI */ -#endif /* version >= v2.1.93 */ -#endif /* version >= v1,3,0 */ /* - * Even though it isn't used to access the board in - * kernels greater than or equal to v1.3.0, save - * the I/O Port address so that it can be reported and - * displayed. + * Even though it isn't used to access wide boards, other + * than for the debug line below, save I/O Port address so + * that it can be reported. */ boardp->ioport = iop; ASC_DBG2(1, - "advansys_detect: iopb_chip_id_1 %x, iopw_chip_id_0 %x\n", +"advansys_detect: iopb_chip_id_1 0x%x, iopw_chip_id_0 0x%x\n", (ushort) inp(iop + 1), (ushort) inpw(iop)); } -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) +#ifdef CONFIG_PROC_FS /* * Allocate buffer for printing information from * /proc/scsi/advansys/[0...]. @@ -5376,7 +4962,7 @@ asc_board_count--; continue; } -#endif /* version >= v1.3.0 */ +#endif /* CONFIG_PROC_FS */ if (ASC_NARROW_BOARD(boardp)) { /* @@ -5398,20 +4984,6 @@ share_irq = TRUE; break; #endif /* CONFIG_ISA */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93) -#ifdef ASC_CONFIG_PCI - case ASC_IS_PCI: - shp->irq = asc_dvc_varp->irq_no = pciConfig.irqLine; - asc_dvc_varp->cfg->pci_device_id = pciConfig.deviceID; - asc_dvc_varp->cfg->pci_slot_info = - ASC_PCI_MKID(pciDevice.busNumber, - pciDevice.slotFound, - pciDevice.devFunc); - shp->unchecked_isa_dma = FALSE; - share_irq = TRUE; - break; -#endif /* ASC_CONFIG_PCI */ -#else /* version >= v2.1.93 */ #ifdef CONFIG_PCI case ASC_IS_PCI: shp->irq = asc_dvc_varp->irq_no = pci_devp->irq; @@ -5424,7 +4996,6 @@ share_irq = TRUE; break; #endif /* CONFIG_PCI */ -#endif /* version >= v2.1.93 */ default: ASC_PRINT2( "advansys_detect: board %d: unknown adapter type: %d\n", @@ -5438,18 +5009,6 @@ * For Wide boards set PCI information before calling * AdvInitGetConfig(). */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93) -#ifdef ASC_CONFIG_PCI - shp->irq = adv_dvc_varp->irq_no = pciConfig.irqLine; - adv_dvc_varp->cfg->pci_device_id = pciConfig.deviceID; - adv_dvc_varp->cfg->pci_slot_info = - ASC_PCI_MKID(pciDevice.busNumber, - pciDevice.slotFound, - pciDevice.devFunc); - shp->unchecked_isa_dma = FALSE; - share_irq = TRUE; -#endif /* ASC_CONFIG_PCI */ -#else /* version >= v2.1.93 */ #ifdef CONFIG_PCI shp->irq = adv_dvc_varp->irq_no = pci_devp->irq; adv_dvc_varp->cfg->pci_device_id = pci_devp->device; @@ -5460,7 +5019,6 @@ shp->unchecked_isa_dma = FALSE; share_irq = TRUE; #endif /* CONFIG_PCI */ -#endif /* version >= v2.1.93 */ } /* @@ -5504,33 +5062,33 @@ break; default: ASC_PRINT2( -"AscInitGetConfig: board %d: unknown warning: %x\n", +"AscInitGetConfig: board %d: unknown warning: 0x%x\n", boardp->id, ret); break; } if ((err_code = asc_dvc_varp->err_code) != 0) { ASC_PRINT3( -"AscInitGetConfig: board %d error: init_state %x, err_code %x\n", +"AscInitGetConfig: board %d error: init_state 0x%x, err_code 0x%x\n", boardp->id, asc_dvc_varp->init_state, asc_dvc_varp->err_code); } } else { ASC_DBG(2, "advansys_detect: AdvInitGetConfig()\n"); if ((ret = AdvInitGetConfig(adv_dvc_varp)) != 0) { - ASC_PRINT2("AdvInitGetConfig: board %d: warning: %x\n", + ASC_PRINT2("AdvInitGetConfig: board %d: warning: 0x%x\n", boardp->id, ret); } if ((err_code = adv_dvc_varp->err_code) != 0) { ASC_PRINT2( -"AdvInitGetConfig: board %d error: err_code %x\n", +"AdvInitGetConfig: board %d error: err_code 0x%x\n", boardp->id, adv_dvc_varp->err_code); } } - + if (err_code != 0) { -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) +#ifdef CONFIG_PROC_FS kfree(boardp->prtbuf); -#endif /* version >= v1.3.0 */ +#endif /* CONFIG_PROC_FS */ scsi_unregister(shp); asc_board_count--; continue; @@ -5608,18 +5166,18 @@ break; default: ASC_PRINT2( -"AscInitSetConfig: board %d: unknown warning: %x\n", +"AscInitSetConfig: board %d: unknown warning: 0x%x\n", boardp->id, ret); break; } if (asc_dvc_varp->err_code != 0) { ASC_PRINT3( -"AscInitSetConfig: board %d error: init_state %x, err_code %x\n", +"AscInitSetConfig: board %d error: init_state 0x%x, err_code 0x%x\n", boardp->id, asc_dvc_varp->init_state, asc_dvc_varp->err_code); -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) +#ifdef CONFIG_PROC_FS kfree(boardp->prtbuf); -#endif /* version >= v1.3.0 */ +#endif /* CONFIG_PROC_FS */ scsi_unregister(shp); asc_board_count--; continue; @@ -5730,14 +5288,12 @@ shp->irq = adv_dvc_varp->irq_no; } -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) /* * Channels are numbered beginning with 0. For AdvanSys one host * structure supports one channel. Multi-channel boards have a - * separate host structure for each channel. + * separate host structure for each channel. */ shp->max_channel = 0; -#endif /* version >= v1.3.89 */ if (ASC_NARROW_BOARD(boardp)) { shp->max_id = ASC_MAX_TID + 1; shp->max_lun = ASC_MAX_LUN + 1; @@ -5753,10 +5309,10 @@ shp->max_lun = ADV_MAX_LUN + 1; /* - * Save the I/O Port address and length even though the - * in v1.3.0 and greater kernels the region is not used - * by a Wide board. Instead the board is accessed with - * Memory Mapped I/O. + * Save the I/O Port address and length even though + * I/O ports are not used to access Wide boards. + * Instead the Wide boards are accessed with + * PCI Memory Mapped I/O. */ shp->io_port = iop; boardp->asc_n_io_port = iolen; @@ -5767,22 +5323,15 @@ shp->can_queue = adv_dvc_varp->max_host_qng; } - /* 'n_io_port' currently is one byte. */ + /* + * 'n_io_port' currently is one byte. + * + * Set a value to 'n_io_port', but never referenced it because + * it may be truncated. + */ shp->n_io_port = boardp->asc_n_io_port <= 255 ? boardp->asc_n_io_port : 255; -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,89) - /* - * In old kernels without tag queuing support and with memory - * allocation problems set a conservative 'cmd_per_lun' value. - */ -#ifdef MODULE - shp->cmd_per_lun = 1; -#else /* MODULE */ - shp->cmd_per_lun = 4; -#endif /* MODULE */ - ASC_DBG1(1, "advansys_detect: cmd_per_lun: %d\n", shp->cmd_per_lun); -#else /* version >= v1.3.89 */ /* * Following v1.3.89, 'cmd_per_lun' is no longer needed * and should be set to zero. @@ -5802,7 +5351,6 @@ * the number of commands to queue per device. */ shp->select_queue_depths = advansys_select_queue_depths; -#endif /* version >= v1.3.89 */ /* * Set the maximum number of scatter-gather elements the @@ -5822,20 +5370,6 @@ shp->sg_tablesize = ADV_MAX_SG_LIST; } -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0) -#ifdef MODULE - /* - * If the driver is compiled as a module, set a limit on the - * 'sg_tablesize' value to prevent memory allocation failures. - * Memory allocation errors are more likely to occur at module - * load time, then at driver initialization time. - */ - if (shp->sg_tablesize > 64) { - shp->sg_tablesize = 64; - } -#endif /* MODULE */ -#endif /* version < v2.0.0 */ - /* * The value of 'sg_tablesize' can not exceed the SCSI * mid-level driver definition of SG_ALL. SG_ALL also @@ -5851,11 +5385,11 @@ /* BIOS start address. */ if (ASC_NARROW_BOARD(boardp)) { -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,29) +#if ASC_LINUX_KERNEL24 shp->base = -#else /* version >= v2.3.29 */ +#elif ASC_LINUX_KERNEL22 shp->base = (char *) -#endif /* version < v2.3.29 */ +#endif ((ulong) AscGetChipBiosAddress( asc_dvc_varp->iop_base, asc_dvc_varp->bus_type)); @@ -5874,11 +5408,11 @@ boardp->bios_codelen); ASC_DBG2(1, - "advansys_detect: bios_signature %x, bios_version %x\n", + "advansys_detect: bios_signature 0x%x, bios_version 0x%x\n", boardp->bios_signature, boardp->bios_version); ASC_DBG2(1, - "advansys_detect: bios_codeseg %x, bios_codelen %x\n", + "advansys_detect: bios_codeseg 0x%x, bios_codelen 0x%x\n", boardp->bios_codeseg, boardp->bios_codelen); /* @@ -5890,11 +5424,10 @@ * Convert x86 realmode code segment to a linear * address by shifting left 4. */ -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,29) shp->base = -#else /* version >= v2.3.29 */ - shp->base = (char *) -#endif /* version < v2.3.29 */ +#if ASC_LINUX_KERNEL22 + (char *) +#endif ((ulong) boardp->bios_codeseg << 4); } else { shp->base = 0; @@ -5905,9 +5438,33 @@ * Register Board Resources - I/O Port, DMA, IRQ */ - /* Register I/O port range. */ - ASC_DBG(2, "advansys_detect: request_region()\n"); + /* + * Register I/O port range. + * + * For Wide boards the I/O ports are not used to access + * the board, but request the region anyway. + * + * 'shp->n_io_port' is not referenced, because it may be truncated. + */ + ASC_DBG2(2, + "advansys_detect: request_region port 0x%lx, len 0x%x\n", + (ulong) shp->io_port, boardp->asc_n_io_port); +#if ASC_LINUX_KERNEL24 + if (request_region(shp->io_port, boardp->asc_n_io_port, + "advansys") == NULL) { + ASC_PRINT3( +"advansys_detect: board %d: request_region() failed, port 0x%lx, len 0x%x\n", + boardp->id, (ulong) shp->io_port, boardp->asc_n_io_port); +#ifdef CONFIG_PROC_FS + kfree(boardp->prtbuf); +#endif /* CONFIG_PROC_FS */ + scsi_unregister(shp); + asc_board_count--; + continue; + } +#elif ASC_LINUX_KERNEL22 request_region(shp->io_port, boardp->asc_n_io_port, "advansys"); +#endif /* Register DMA Channel for Narrow boards. */ shp->dma_channel = NO_ISA_DMA; /* Default to no ISA DMA. */ @@ -5922,9 +5479,9 @@ "advansys_detect: board %d: request_dma() %d failed %d\n", boardp->id, shp->dma_channel, ret); release_region(shp->io_port, boardp->asc_n_io_port); -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) +#ifdef CONFIG_PROC_FS kfree(boardp->prtbuf); -#endif /* version >= v1.3.0 */ +#endif /* CONFIG_PROC_FS */ scsi_unregister(shp); asc_board_count--; continue; @@ -5936,10 +5493,6 @@ /* Register IRQ Number. */ ASC_DBG1(2, "advansys_detect: request_irq() %d\n", shp->irq); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,70) - if ((ret = request_irq(shp->irq, advansys_interrupt, - SA_INTERRUPT, "advansys")) != 0) -#else /* version >= v1.3.70 */ /* * If request_irq() fails with the SA_INTERRUPT flag set, * then try again without the SA_INTERRUPT flag set. This @@ -5955,31 +5508,28 @@ ((ret = request_irq(shp->irq, advansys_interrupt, (share_irq == TRUE ? SA_SHIRQ : 0), "advansys", boardp)) != 0)) -#endif /* version >= v1.3.70 */ { if (ret == -EBUSY) { ASC_PRINT2( -"advansys_detect: board %d: request_irq(): IRQ %d already in use.\n", +"advansys_detect: board %d: request_irq(): IRQ 0x%x already in use.\n", boardp->id, shp->irq); } else if (ret == -EINVAL) { ASC_PRINT2( -"advansys_detect: board %d: request_irq(): IRQ %d not valid.\n", +"advansys_detect: board %d: request_irq(): IRQ 0x%x not valid.\n", boardp->id, shp->irq); } else { ASC_PRINT3( -"advansys_detect: board %d: request_irq(): IRQ %d failed with %d\n", +"advansys_detect: board %d: request_irq(): IRQ 0x%x failed with %d\n", boardp->id, shp->irq, ret); } release_region(shp->io_port, boardp->asc_n_io_port); -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) iounmap(boardp->ioremap_addr); -#endif /* version >= v1,3,0 */ if (shp->dma_channel != NO_ISA_DMA) { free_dma(shp->dma_channel); } -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) +#ifdef CONFIG_PROC_FS kfree(boardp->prtbuf); -#endif /* version >= v1.3.0 */ +#endif /* CONFIG_PROC_FS */ scsi_unregister(shp); asc_board_count--; continue; @@ -5995,7 +5545,7 @@ if (warn_code || err_code) { ASC_PRINT4( -"AscInitAsc1000Driver: board %d: error: init_state %x, warn %x error %x\n", +"advansys_detect: board %d error: init_state 0x%x, warn 0x%x, error 0x%x\n", boardp->id, asc_dvc_varp->init_state, warn_code, err_code); } @@ -6005,25 +5555,13 @@ adv_req_t *reqp = NULL; int sg_cnt = 0; -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0) - carrp = (ADV_CARR_T *) &adv_carr_buf[0]; - req_cnt = sizeof(adv_req_buf)/sizeof(adv_req_t); - sg_cnt = sizeof(adv_sgblk_buf)/sizeof(adv_sgblk_t); - reqp = (adv_req_t *) &adv_req_buf[0]; - boardp->adv_sgblkp = NULL; - for (sg_cnt = 0; sg_cnt < ADV_SGBLK_BUF_CNT; sg_cnt++) { - sgp = (adv_sgblk_t *) &adv_sgblk_buf[sg_cnt]; - sgp->next_sgblkp = boardp->adv_sgblkp; - boardp->adv_sgblkp = sgp; - } -#else /* version >= v1.3.0 */ /* * Allocate buffer carrier structures. The total size * is about 4 KB, so allocate all at once. */ carrp = (ADV_CARR_T *) kmalloc(ADV_CARRIER_BUFSIZE, GFP_ATOMIC); - ASC_DBG1(1, "advansys_detect: carrp %lx\n", (ulong) carrp); + ASC_DBG1(1, "advansys_detect: carrp 0x%lx\n", (ulong) carrp); if (carrp == NULL) { goto kmalloc_error; @@ -6042,7 +5580,7 @@ kmalloc(sizeof(adv_req_t) * req_cnt, GFP_ATOMIC); ASC_DBG3(1, - "advansys_detect: reqp %lx, req_cnt %d, bytes %lu\n", + "advansys_detect: reqp 0x%lx, req_cnt %d, bytes %lu\n", (ulong) reqp, req_cnt, (ulong) sizeof(adv_req_t) * req_cnt); @@ -6087,24 +5625,24 @@ if (carrp == NULL) { ASC_PRINT1( -"advansys_detect: board %d: error: failed to kmalloc() carrier buffer.\n", +"advansys_detect: board %d error: failed to kmalloc() carrier buffer.\n", boardp->id); err_code = ADV_ERROR; } else if (reqp == NULL) { kfree(carrp); ASC_PRINT1( -"advansys_detect: board %d: error: failed to kmalloc() adv_req_t buffer.\n", +"advansys_detect: board %d error: failed to kmalloc() adv_req_t buffer.\n", boardp->id); err_code = ADV_ERROR; } else if (boardp->adv_sgblkp == NULL) { kfree(carrp); kfree(reqp); ASC_PRINT1( -"advansys_detect: board %d: error: failed to kmalloc() adv_sgblk_t buffers.\n", +"advansys_detect: board %d error: failed to kmalloc() adv_sgblk_t buffers.\n", boardp->id); err_code = ADV_ERROR; } else { - + /* Save carrier buffer pointer. */ boardp->orig_carrp = carrp; @@ -6113,7 +5651,6 @@ * driver is built as a module and can be unloaded. */ boardp->orig_reqp = reqp; -#endif /* version >= v1.3.0 */ adv_dvc_varp->carrier_buf = carrp; @@ -6146,17 +5683,14 @@ if (warn_code || err_code) { ASC_PRINT3( -"AdvInitAsc3550/38C0800/38C1600Driver: board %d: error: warn %x, error %x\n", +"advansys_detect: board %d error: warn 0x%x, error 0x%x\n", boardp->id, warn_code, err_code); } -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) } -#endif /* version >= v1,3,0 */ } if (err_code != 0) { release_region(shp->io_port, boardp->asc_n_io_port); -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) if (ASC_WIDE_BOARD(boardp)) { iounmap(boardp->ioremap_addr); if (boardp->orig_carrp) { @@ -6173,18 +5707,13 @@ kfree(sgp); } } -#endif /* version >= v1,3,0 */ if (shp->dma_channel != NO_ISA_DMA) { free_dma(shp->dma_channel); } -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) +#ifdef CONFIG_PROC_FS kfree(boardp->prtbuf); -#endif /* version >= v1.3.0 */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,70) - free_irq(shp->irq); -#else /* version >= v1.3.70 */ +#endif /* CONFIG_PROC_FS */ free_irq(shp->irq, boardp); -#endif /* version >= v1.3.70 */ scsi_unregister(shp); asc_board_count--; continue; @@ -6192,6 +5721,14 @@ ASC_DBG_PRT_SCSI_HOST(2, shp); } } + + /* + * XXX - Remove this comment and the next line when SCSI mid-level + * no longer acquires 'io_request_lock' before calling the SCSI + * low-level detect entrypoint. + */ + ASC_LOCK_IO_REQUEST_LOCK + ASC_DBG1(1, "advansys_detect: done: asc_board_count %d\n", asc_board_count); return asc_board_count; } @@ -6208,17 +5745,12 @@ ASC_DBG(1, "advansys_release: begin\n"); boardp = ASC_BOARDP(shp); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,70) - free_irq(shp->irq); -#else /* version >= v1.3.70 */ free_irq(shp->irq, boardp); -#endif /* version >= v1.3.70 */ if (shp->dma_channel != NO_ISA_DMA) { ASC_DBG(1, "advansys_release: free_dma()\n"); free_dma(shp->dma_channel); } release_region(shp->io_port, boardp->asc_n_io_port); -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) if (ASC_WIDE_BOARD(boardp)) { adv_sgblk_t *sgp = NULL; @@ -6237,9 +5769,10 @@ kfree(sgp); } } +#ifdef CONFIG_PROC_FS ASC_ASSERT(boardp->prtbuf != NULL); kfree(boardp->prtbuf); -#endif /* version >= v1.3.0 */ +#endif /* CONFIG_PROC_FS */ scsi_unregister(shp); ASC_DBG(1, "advansys_release: end\n"); return 0; @@ -6275,51 +5808,37 @@ } else { busname = "ISA"; } + /* Don't reference 'shp->n_io_port'; It may be truncated. */ sprintf(info, -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,92) -"AdvanSys SCSI %s: %s %u CDB: BIOS %lX, IO %lX/%X, IRQ %u, DMA %u", -#else /* version >= v2.1.92 */ -"AdvanSys SCSI %s: %s %u CDB: BIOS %lX, IO %lX/%X, IRQ %u, DMA %u", -#endif /* version >= v2.1.92 */ - ASC_VERSION, busname, asc_dvc_varp->max_total_qng, - (ulong) shp->base, - (ulong) shp->io_port, boardp->asc_n_io_port - 1, +"AdvanSys SCSI %s: %s: IO 0x%lX-0x%lX, IRQ 0x%X, DMA 0x%X", + ASC_VERSION, busname, + (ulong) shp->io_port, + (ulong) shp->io_port + boardp->asc_n_io_port - 1, shp->irq, shp->dma_channel); - } else if (asc_dvc_varp->bus_type & ASC_IS_PCI) { - if ((asc_dvc_varp->bus_type & ASC_IS_PCI_ULTRA) - == ASC_IS_PCI_ULTRA) { - busname = "PCI Ultra"; - } else { - busname = "PCI"; - } - sprintf(info, -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,92) - "AdvanSys SCSI %s: %s %u CDB: IO %X/%X, IRQ %u", -#else /* version >= v2.1.92 */ - "AdvanSys SCSI %s: %s %u CDB: IO %lX/%X, IRQ %u", -#endif /* version >= v2.1.92 */ - ASC_VERSION, busname, asc_dvc_varp->max_total_qng, - shp->io_port, boardp->asc_n_io_port - 1, shp->irq); } else { if (asc_dvc_varp->bus_type & ASC_IS_VL) { busname = "VL"; } else if (asc_dvc_varp->bus_type & ASC_IS_EISA) { busname = "EISA"; + } else if (asc_dvc_varp->bus_type & ASC_IS_PCI) { + if ((asc_dvc_varp->bus_type & ASC_IS_PCI_ULTRA) + == ASC_IS_PCI_ULTRA) { + busname = "PCI Ultra"; + } else { + busname = "PCI"; + } } else { busname = "?"; - ASC_PRINT2( - "advansys_info: board %d: unknown bus type %d\n", + ASC_PRINT2( "advansys_info: board %d: unknown bus type %d\n", boardp->id, asc_dvc_varp->bus_type); } + /* Don't reference 'shp->n_io_port'; It may be truncated. */ sprintf(info, -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,92) - "AdvanSys SCSI %s: %s %u CDB: BIOS %lX, IO %X/%X, IRQ %u", -#else /* version >= v2.1.92 */ - "AdvanSys SCSI %s: %s %u CDB: BIOS %lX, IO %lX/%X, IRQ %u", -#endif /* version >= v2.1.92 */ - ASC_VERSION, busname, asc_dvc_varp->max_total_qng, - (ulong) shp->base, shp->io_port - 1, - boardp->asc_n_io_port, shp->irq); + "AdvanSys SCSI %s: %s: IO 0x%lX-0x%lX, IRQ 0x%X", + ASC_VERSION, busname, + (ulong) shp->io_port, + (ulong) shp->io_port + boardp->asc_n_io_port - 1, + shp->irq); } } else { /* @@ -6343,57 +5862,18 @@ iolen = ADV_38C1600_IOLEN; widename = "Ultra3-Wide"; } - if (boardp->bios_signature == 0x55AA) { - sprintf(info, -"AdvanSys SCSI %s: PCI %s: BIOS %X/%X, IO %X/%X, IRQ %u", - ASC_VERSION, - widename, - boardp->bios_codeseg << 4, - boardp->bios_codelen > 0 ? - (boardp->bios_codelen << 9) - 1 : 0, - (unsigned) boardp->ioport, iolen - 1, - shp->irq); - } else { - sprintf(info, -"AdvanSys SCSI %s: PCI %s: IO %X/%X, IRQ %u", - ASC_VERSION, - widename, - (unsigned) boardp->ioport, - (iolen - 1), - shp->irq); - } + sprintf(info, "AdvanSys SCSI %s: PCI %s: PCIMEM 0x%lX-0x%lX, IRQ 0x%X", + ASC_VERSION, + widename, + (ulong) adv_dvc_varp->iop_base, + (ulong) adv_dvc_varp->iop_base + iolen - 1, + shp->irq); } ASC_ASSERT(strlen(info) < ASC_INFO_SIZE); ASC_DBG(1, "advansys_info: end\n"); return info; } -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -/* - * advansys_command() - polled I/O entrypoint. - * - * Apparently host drivers shouldn't return until the command - * is finished. - * - * Note: This is an old interface that is no longer used by the SCSI - * mid-level driver. The new interface, advansys_queuecommand(), - * currently handles all requests. - */ -int -advansys_command(Scsi_Cmnd *scp) -{ - ASC_DBG1(1, "advansys_command: scp %lx\n", (ulong) scp); - ASC_STATS(scp->host, command); - scp->SCp.Status = 0; /* Set to a known state */ - advansys_queuecommand(scp, advansys_command_done); - while (scp->SCp.Status == 0) { - continue; - } - ASC_DBG1(1, "advansys_command: result %x\n", scp->result); - return scp->result; -} -#endif /* version < v2.3.28 */ - /* * advansys_queuecommand() - interrupt-driven I/O entrypoint. * @@ -6405,40 +5885,30 @@ { struct Scsi_Host *shp; asc_board_t *boardp; - int flags; + ulong flags; Scsi_Cmnd *done_scp; shp = scp->host; boardp = ASC_BOARDP(shp); ASC_STATS(shp, queuecommand); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) /* - * Disable interrupts to preserve request ordering and provide - * mutually exclusive access to global structures used to initiate - * a request. - */ - save_flags(flags); - cli(); -#else /* version >= v2.3.28 */ + * XXX - Remove this comment and the next line when SCSI mid-level + * no longer acquires 'io_request_lock' before calling the SCSI + * low-level queuecommand entrypoint. + */ + ASC_UNLOCK_IO_REQUEST_LOCK + spin_lock_irqsave(&boardp->lock, flags); -#endif /* version >= v2.3.28 */ /* * Block new commands while handling a reset or abort request. */ - if (boardp->flags & (ASC_HOST_IN_RESET | ASC_HOST_IN_ABORT)) { - if (boardp->flags & ASC_HOST_IN_RESET) { - ASC_DBG1(1, - "advansys_queuecommand: scp %lx blocked for reset request\n", - (ulong) scp); - scp->result = HOST_BYTE(DID_RESET); - } else { - ASC_DBG1(1, - "advansys_queuecommand: scp %lx blocked for abort request\n", - (ulong) scp); - scp->result = HOST_BYTE(DID_ABORT); - } + if (boardp->flags & ASC_HOST_IN_RESET) { + ASC_DBG1(1, + "advansys_queuecommand: scp 0x%lx blocked for reset request\n", + (ulong) scp); + scp->result = HOST_BYTE(DID_RESET); /* * Add blocked requests to the board's 'done' queue. The queued @@ -6446,11 +5916,7 @@ * handling. */ asc_enqueue(&boardp->done, scp, ASC_BACK); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) - restore_flags(flags); -#else /* version >= v2.3.28 */ spin_unlock_irqrestore(&boardp->lock, flags); -#endif /* version >= v2.3.28 */ return 0; } @@ -6467,13 +5933,15 @@ * Save the function pointer to Linux mid-level 'done' function * and attempt to execute the command. * - * If ASC_ERROR is returned the request has been added to the + * If ASC_NOERROR is returned the request has been added to the * board's 'active' queue and will be completed by the interrupt * handler. * * If ASC_BUSY is returned add the request to the board's per - * target waiting list. - * + * target waiting list. This is the first time the request has + * been tried. Add it to the back of the waiting list. It will be + * retried later. + * * If an error occurred, the request will have been placed on the * board's 'done' queue and must be completed before returning. */ @@ -6492,656 +5960,21 @@ break; } -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) - restore_flags(flags); -#else /* version >= v2.3.28 */ spin_unlock_irqrestore(&boardp->lock, flags); -#endif /* version >= v2.3.28 */ - return 0; -} - -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -/* - * advansys_abort() - * - * Abort the command specified by 'scp'. - */ -int -advansys_abort(Scsi_Cmnd *scp) -{ - struct Scsi_Host *shp; - asc_board_t *boardp; - ASC_DVC_VAR *asc_dvc_varp; - ADV_DVC_VAR *adv_dvc_varp; - int flags; - int do_scsi_done; - int scp_found; - Scsi_Cmnd *done_scp = NULL; - int ret; - - /* Save current flags and disable interrupts. */ - save_flags(flags); - cli(); - - ASC_DBG1(1, "advansys_abort: scp %lx\n", (ulong) scp); - -#ifdef ADVANSYS_STATS - if (scp->host != NULL) { - ASC_STATS(scp->host, abort); - } -#endif /* ADVANSYS_STATS */ - -#ifdef ADVANSYS_ASSERT - do_scsi_done = ASC_ERROR; - scp_found = ASC_ERROR; - ret = ASC_ERROR; -#endif /* ADVANSYS_ASSERT */ - -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) - if (scp->serial_number != scp->serial_number_at_timeout) { - ASC_PRINT1( -"advansys_abort: timeout serial number changed for request %lx\n", - (ulong) scp); - do_scsi_done = ASC_FALSE; - scp_found = ASC_FALSE; - ret = SCSI_ABORT_NOT_RUNNING; - } else -#endif /* version >= v1.3.89 */ - if ((shp = scp->host) == NULL) { - scp->result = HOST_BYTE(DID_ERROR); - do_scsi_done = ASC_TRUE; - scp_found = ASC_FALSE; - ret = SCSI_ABORT_ERROR; - } else if ((boardp = ASC_BOARDP(shp))->flags & - (ASC_HOST_IN_RESET | ASC_HOST_IN_ABORT)) { - ASC_PRINT2( -"advansys_abort: board %d: Nested host reset or abort, flags 0x%x\n", - boardp->id, boardp->flags); - do_scsi_done = ASC_TRUE; - if ((asc_rmqueue(&boardp->active, scp) == ASC_TRUE) || - (asc_rmqueue(&boardp->waiting, scp) == ASC_TRUE)) { - scp_found = ASC_TRUE; - } else { - scp_found = ASC_FALSE; - } - scp->result = HOST_BYTE(DID_ERROR); - ret = SCSI_ABORT_ERROR; - } else { - /* Set abort flag to avoid nested reset or abort requests. */ - boardp->flags |= ASC_HOST_IN_ABORT; - - do_scsi_done = ASC_TRUE; - if (asc_rmqueue(&boardp->waiting, scp) == ASC_TRUE) { - /* - * If asc_rmqueue() found the command on the waiting - * queue, it had not been sent to the device. After - * the queue is removed, no other handling is required. - */ - ASC_DBG1(1, "advansys_abort: scp %lx found on waiting queue\n", - (ulong) scp); - scp_found = ASC_TRUE; - scp->result = HOST_BYTE(DID_ABORT); - ret = SCSI_ABORT_SUCCESS; - } else if (asc_isqueued(&boardp->active, scp) == ASC_TRUE) { - /* - * If asc_isqueued() found the command on the active - * queue, it has been sent to the device. The command - * will be returned through the interrupt handler after - * it has been aborted. - */ - - if (ASC_NARROW_BOARD(boardp)) { - /* - * Narrow Board - */ - asc_dvc_varp = &boardp->dvc_var.asc_dvc_var; - scp->result = HOST_BYTE(DID_ABORT); - - /* sti(); XXX */ /* Enable interrupts for AscAbortSRB(). */ - ASC_DBG1(1, "advansys_abort: before AscAbortSRB(), scp %lx\n", - (ulong) scp); - /* XXX */ - switch (AscAbortSRB(asc_dvc_varp, ASC_VADDR_TO_U32(scp))) { - case ASC_TRUE: - /* asc_isr_callback() will be called */ - ASC_DBG(1, "advansys_abort: AscAbortSRB() TRUE\n"); - ret = SCSI_ABORT_PENDING; - break; - case ASC_FALSE: - /* Request has apparently already completed. */ - ASC_DBG(1, "advansys_abort: AscAbortSRB() FALSE\n"); - ret = SCSI_ABORT_NOT_RUNNING; - break; - case ASC_ERROR: - default: - ASC_DBG(1, "advansys_abort: AscAbortSRB() ERROR\n"); - ret = SCSI_ABORT_ERROR; - break; - } - cli(); - } else { - /* - * Wide Board - */ - adv_dvc_varp = &boardp->dvc_var.adv_dvc_var; - scp->result = HOST_BYTE(DID_ABORT); - - ASC_DBG1(1, - "advansys_abort: before AdvAbortQueue(), scp %lx\n", - (ulong) scp); -#if 0 /* XXX */ - switch (AdvAbortQueue(adv_dvc_varp, (ADV_VADDR) XXX)) { - case ASC_TRUE: - /* asc_isr_callback() will be called */ - ASC_DBG(1, "advansys_abort: AdvAbortQueue() TRUE\n"); - ret = SCSI_ABORT_PENDING; - break; - case ASC_FALSE: - /* Request has apparently already completed. */ - ASC_DBG(1, "advansys_abort: AdvAbortQueue() FALSE\n"); - ret = SCSI_ABORT_NOT_RUNNING; - break; - case ASC_ERROR: - default: - ASC_DBG(1, "advansys_abort: AdvAbortQueue() ERROR\n"); - ret = SCSI_ABORT_ERROR; - break; - } - /* - * Ensure all requests completed by the microcode have - * been processed by calling AdvISR(). - */ - (void) AdvISR(adv_dvc_varp); -#else /* XXX */ - (void) AdvResetChipAndSB(adv_dvc_varp); - ret = SCSI_ABORT_SUCCESS; -#endif /* XXX */ - } - - /* - * The request will either still be on the active queue - * or have been added to the board's done queue. - */ - if (asc_rmqueue(&boardp->active, scp) == ASC_TRUE) { - scp->result = HOST_BYTE(DID_ABORT); - scp_found = ASC_TRUE; - } else { - scp_found = asc_rmqueue(&boardp->done, scp); - ASC_ASSERT(scp_found == ASC_TRUE); - } - } else { - /* - * The command was not found on the active or waiting queues. - */ - do_scsi_done = ASC_TRUE; - scp_found = ASC_FALSE; - ret = SCSI_ABORT_NOT_RUNNING; - } - - /* Clear abort flag. */ - boardp->flags &= ~ASC_HOST_IN_ABORT; - - /* - * Because the ASC_HOST_IN_ABORT flag causes both - * 'advansys_interrupt' and 'asc_isr_callback' to - * queue requests to the board's 'done' queue and - * prevents waiting commands from being executed, - * these queued requests must be handled here. - */ - done_scp = asc_dequeue_list(&boardp->done, NULL, ASC_TID_ALL); - - /* - * Start any waiting commands for the board. - */ - if (!ASC_QUEUE_EMPTY(&boardp->waiting)) { - ASC_DBG(1, "advansys_interrupt: before asc_execute_queue()\n"); - asc_execute_queue(&boardp->waiting); - } - } - - /* Interrupts could be enabled here. */ /* - * Complete the request to be aborted, unless it has been - * restarted as detected above, even if it was not found on - * the device active or waiting queues. + * XXX - Remove this comment and the next line when SCSI mid-level + * no longer acquires 'io_request_lock' before calling the SCSI + * low-level queuecommand entrypoint. */ - ASC_ASSERT(do_scsi_done != ASC_ERROR); - ASC_ASSERT(scp_found != ASC_ERROR); - if (do_scsi_done == ASC_TRUE) { - if (scp->scsi_done == NULL) { - ASC_PRINT1( -"advansys_abort: aborted request scsi_done() is NULL, %lx\n", - (ulong) scp); - } else { - if (scp_found == ASC_FALSE) { - ASC_PRINT1( -"advansys_abort: abort request not active or waiting, completing anyway %lx\n", - (ulong) scp); - } - ASC_STATS(scp->host, done); - scp->scsi_done(scp); - } - } - - /* - * It is possible for the request done function to re-enable - * interrupts without confusing the driver. But here interrupts - * aren't enabled until all requests have been completed. - */ - if (done_scp != NULL) { - asc_scsi_done_list(done_scp); - } + ASC_LOCK_IO_REQUEST_LOCK - ASC_DBG1(1, "advansys_abort: ret %d\n", ret); - - /* Re-enable interrupts, if they were enabled on entry. */ - restore_flags(flags); - - ASC_ASSERT(ret != ASC_ERROR); - return ret; + return 0; } /* * advansys_reset() * - * Reset the device associated with the command 'scp'. - */ -int -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,89) -advansys_reset(Scsi_Cmnd *scp) -#else /* version >= v1.3.89 */ -advansys_reset(Scsi_Cmnd *scp, unsigned int reset_flags) -#endif /* version >= v1.3.89 */ -{ - struct Scsi_Host *shp; - asc_board_t *boardp; - ASC_DVC_VAR *asc_dvc_varp; - ADV_DVC_VAR *adv_dvc_varp; - int flags; - Scsi_Cmnd *done_scp = NULL, *last_scp = NULL; - Scsi_Cmnd *tscp, *new_last_scp; - int do_scsi_done; - int scp_found; - int status; - int target; - int ret; - int device_reset = ASC_FALSE; - - /* Save current flags and disable interrupts. */ - save_flags(flags); - cli(); - - ASC_DBG1(1, "advansys_reset: %lx\n", (ulong) scp); - -#ifdef ADVANSYS_STATS - if (scp->host != NULL) { - ASC_STATS(scp->host, reset); - } -#endif /* ADVANSYS_STATS */ - -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) - if ((reset_flags & SCSI_RESET_ASYNCHRONOUS) && - (scp->serial_number != scp->serial_number_at_timeout)) { - ASC_PRINT1( -"advansys_reset: timeout serial number changed for request %lx\n", - (ulong) scp); - do_scsi_done = ASC_FALSE; - scp_found = ASC_FALSE; - ret = SCSI_RESET_NOT_RUNNING; - } else -#endif /* version >= v1.3.89 */ - if ((shp = scp->host) == NULL) { - scp->result = HOST_BYTE(DID_ERROR); - do_scsi_done = ASC_TRUE; - scp_found = ASC_FALSE; - ret = SCSI_RESET_ERROR; - } else if ((boardp = ASC_BOARDP(shp))->flags & - (ASC_HOST_IN_RESET | ASC_HOST_IN_ABORT)) { - ASC_PRINT2( -"advansys_reset: board %d: Nested host reset or abort, flags 0x%x\n", - boardp->id, boardp->flags); - do_scsi_done = ASC_TRUE; - if ((asc_rmqueue(&boardp->active, scp) == ASC_TRUE) || - (asc_rmqueue(&boardp->waiting, scp) == ASC_TRUE)) { - scp_found = ASC_TRUE; - } else { - scp_found = ASC_FALSE; - } - scp->result = HOST_BYTE(DID_ERROR); - ret = SCSI_RESET_ERROR; -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,0) - } else if (time_after_eq(jiffies, boardp->last_reset) && - time_before(jiffies, boardp->last_reset + (10 * HZ))) { -#else /* version < v2.1.0 */ - } else if (jiffies >= boardp->last_reset && - jiffies < (boardp->last_reset + (10 * HZ))) { -#endif /* version < v2.1.0 */ - /* - * Don't allow a reset to be attempted within 10 seconds - * of the last reset. - * - * If 'jiffies' wrapping occurs, the reset request will go - * through, because a wrapped 'jiffies' would not pass the - * test above. - */ - ASC_DBG(1, - "advansys_reset: reset within 10 sec of last reset ignored\n"); - do_scsi_done = ASC_TRUE; - if ((asc_rmqueue(&boardp->active, scp) == ASC_TRUE) || - (asc_rmqueue(&boardp->waiting, scp) == ASC_TRUE)) { - scp_found = ASC_TRUE; - } else { - scp_found = ASC_FALSE; - } - scp->result = HOST_BYTE(DID_ERROR); - ret = SCSI_RESET_ERROR; - } else { - do_scsi_done = ASC_TRUE; - - /* Set reset flag to avoid nested reset or abort requests. */ - boardp->flags |= ASC_HOST_IN_RESET; - - /* - * If the request is on the target waiting or active queue - * or the board done queue, then remove it and note that it - * was found. - */ - if (asc_rmqueue(&boardp->active, scp) == ASC_TRUE) { - ASC_DBG(1, "advansys_reset: active scp_found = TRUE\n"); - scp_found = ASC_TRUE; - } else if (asc_rmqueue(&boardp->waiting, scp) == ASC_TRUE) { - ASC_DBG(1, "advansys_reset: waiting scp_found = TRUE\n"); - scp_found = ASC_TRUE; - } else if (asc_rmqueue(&boardp->done, scp) == ASC_TRUE) { - scp_found = ASC_TRUE; - } else { - scp_found = ASC_FALSE; - } - - - if (ASC_NARROW_BOARD(boardp)) { - /* - * Narrow Board - * - * If the suggest reset bus flags are set, then reset the bus. - * Otherwise only reset the device. - */ - asc_dvc_varp = &boardp->dvc_var.asc_dvc_var; -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) - if (reset_flags & - (SCSI_RESET_SUGGEST_BUS_RESET | - SCSI_RESET_SUGGEST_HOST_RESET)) { -#endif /* version >= v1.3.89 */ - - /* - * Reset the target's SCSI bus. - */ - ASC_DBG(1, "advansys_reset: before AscResetSB()\n"); - /* sti(); XXX */ /* Enable interrupts for AscResetSB(). */ - status = AscResetSB(asc_dvc_varp); - /* cli(); XXX */ - switch (status) { - case ASC_TRUE: - ASC_DBG(1, "advansys_reset: AscResetSB() success\n"); - ret = SCSI_RESET_SUCCESS; - break; - case ASC_ERROR: - default: - ASC_DBG(1, "advansys_reset: AscResetSB() failed\n"); - ret = SCSI_RESET_ERROR; - break; - } - -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) - } else { - /* - * Reset the specified device. If the device reset fails, - * then reset the SCSI bus. - */ - - ASC_DBG1(1, - "advansys_reset: before AscResetDevice(), target %d\n", - scp->target); - /* sti(); XXX */ /* Enable interrupts for AscResetDevice(). */ - status = AscResetDevice(asc_dvc_varp, scp->target); - /* cli(); XXX */ - - switch (status) { - case ASC_TRUE: - ASC_DBG(1, "advansys_reset: AscResetDevice() success\n"); - device_reset = ASC_TRUE; - ret = SCSI_RESET_SUCCESS; - break; - case ASC_ERROR: - default: - ASC_DBG(1, -"advansys_reset: AscResetDevice() failed; Calling AscResetSB()\n"); - /* sti(); XXX */ /* Enable interrupts for AscResetSB(). */ - status = AscResetSB(asc_dvc_varp); - /* cli(); XXX */ - switch (status) { - case ASC_TRUE: - ASC_DBG(1, "advansys_reset: AscResetSB() TRUE\n"); - ret = SCSI_RESET_SUCCESS; - break; - case ASC_ERROR: - default: - ASC_DBG(1, "advansys_reset: AscResetSB() ERROR\n"); - ret = SCSI_RESET_ERROR; - break; - } - break; - } - } -#endif /* version >= v1.3.89 */ - } else { - /* - * Wide Board - * - * If the suggest reset bus flags are set, then reset the bus. - * Otherwise only reset the device. - */ - adv_dvc_varp = &boardp->dvc_var.adv_dvc_var; -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) - if (reset_flags & - (SCSI_RESET_SUGGEST_BUS_RESET | - SCSI_RESET_SUGGEST_HOST_RESET)) { -#endif /* version >= v1.3.89 */ - - /* - * Reset the target's SCSI bus. - */ - ASC_DBG(1, "advansys_reset: before AdvResetChipAndSB()\n"); - switch (AdvResetChipAndSB(adv_dvc_varp)) { - case ASC_TRUE: - ASC_DBG(1, - "advansys_reset: AdvResetChipAndSB() success\n"); - ret = SCSI_RESET_SUCCESS; - break; - case ASC_FALSE: - default: - ASC_DBG(1, "advansys_reset: AdvResetChipAndSB() failed\n"); - ret = SCSI_RESET_ERROR; - break; - } - /* - * Ensure all requests completed by the microcode have - * been processed by calling AdvISR(). - */ - (void) AdvISR(adv_dvc_varp); -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) - } else { - /* - * Reset the specified device. If the device reset fails, - * then reset the SCSI bus. - */ - - ASC_DBG1(1, - "advansys_reset: before AdvResetDevice(), target %d\n", - scp->target); - - switch (AdvResetDevice(adv_dvc_varp, scp->target)) { - case ASC_TRUE: - ASC_DBG(1, "advansys_reset: AdvResetDevice() success\n"); - device_reset = ASC_TRUE; - ret = SCSI_RESET_SUCCESS; - break; - case ASC_FALSE: - default: - ASC_DBG(1, -"advansys_reset: AdvResetDevice() failed; Calling AdvResetChipAndSB()\n"); - - switch (AdvResetChipAndSB(adv_dvc_varp)) { - case ASC_TRUE: - ASC_DBG(1, - "advansys_reset: AdvResetChipAndSB() TRUE\n"); - ret = SCSI_RESET_SUCCESS; - break; - case ASC_FALSE: - default: - ASC_DBG(1, - "advansys_reset: AdvResetChipAndSB() ERROR\n"); - ret = SCSI_RESET_ERROR; - break; - } - break; - } - /* - * Ensure all requests completed by the microcode have - * been processed by calling AdvISR(). - */ - (void) AdvISR(adv_dvc_varp); - } -#endif /* version >= v1.3.89 */ - } - - /* - * Because the ASC_HOST_IN_RESET flag causes both - * 'advansys_interrupt' and 'asc_isr_callback' to - * queue requests to the board's 'done' queue and - * prevents waiting commands from being executed, - * these queued requests must be handled here. - */ - done_scp = asc_dequeue_list(&boardp->done, &last_scp, - ASC_TID_ALL); - - /* - * If a device reset was performed dequeue all waiting - * and active requests for the device and set the request - * status to DID_RESET. - * - * If a SCSI bus reset was performed dequeue all waiting - * and active requests for all devices and set the request - * status to DID_RESET. - */ - if (device_reset == ASC_TRUE) { - target = scp->target; - } else { - target = ASC_TID_ALL; - } - - /* - * Add active requests to 'done_scp' and set the request status - * to DID_RESET. - */ - if (done_scp == NULL) { - done_scp = asc_dequeue_list(&boardp->active, &last_scp, target); - for (tscp = done_scp; tscp; tscp = REQPNEXT(tscp)) { - tscp->result = HOST_BYTE(DID_RESET); - } - } else { - ASC_ASSERT(last_scp != NULL); - REQPNEXT(last_scp) = asc_dequeue_list(&boardp->active, - &new_last_scp, target); - if (new_last_scp != NULL) { - ASC_ASSERT(REQPNEXT(last_scp) != NULL); - for (tscp = REQPNEXT(last_scp); tscp; tscp = REQPNEXT(tscp)) { - tscp->result = HOST_BYTE(DID_RESET); - } - last_scp = new_last_scp; - } - } - - /* - * Add waiting requests to 'done_scp' and set the request status - * to DID_RESET. - */ - if (done_scp == NULL) { - done_scp = asc_dequeue_list(&boardp->waiting, &last_scp, target); - for (tscp = done_scp; tscp; tscp = REQPNEXT(tscp)) { - tscp->result = HOST_BYTE(DID_RESET); - } - } else { - ASC_ASSERT(last_scp != NULL); - REQPNEXT(last_scp) = asc_dequeue_list(&boardp->waiting, - &new_last_scp, target); - if (new_last_scp != NULL) { - ASC_ASSERT(REQPNEXT(last_scp) != NULL); - for (tscp = REQPNEXT(last_scp); tscp; tscp = REQPNEXT(tscp)) { - tscp->result = HOST_BYTE(DID_RESET); - } - last_scp = new_last_scp; - } - } - - /* Save the time of the most recently completed reset. */ - boardp->last_reset = jiffies; - - /* Clear reset flag. */ - boardp->flags &= ~ASC_HOST_IN_RESET; - - /* - * Start any waiting commands for the board. - */ - if (!ASC_QUEUE_EMPTY(&boardp->waiting)) { - ASC_DBG(1, "advansys_interrupt: before asc_execute_queue()\n"); - asc_execute_queue(&boardp->waiting); - } - ret = SCSI_RESET_SUCCESS; - } - - /* Interrupts could be enabled here. */ - - ASC_ASSERT(do_scsi_done != ASC_ERROR); - ASC_ASSERT(scp_found != ASC_ERROR); - if (do_scsi_done == ASC_TRUE) { - if (scp->scsi_done == NULL) { - ASC_PRINT1( -"advansys_reset: reset request scsi_done() is NULL, %lx\n", - (ulong) scp); - } else { - if (scp_found == ASC_FALSE) { - ASC_PRINT1( -"advansys_reset: reset request not active or waiting, completing anyway %lx\n", - (ulong) scp); - } - ASC_STATS(scp->host, done); - scp->scsi_done(scp); - } - } - - /* - * It is possible for the request done function to re-enable - * interrupts without confusing the driver. But here interrupts - * aren't enabled until requests have been completed. - */ - if (done_scp != NULL) { - asc_scsi_done_list(done_scp); - } - - ASC_DBG1(1, "advansys_reset: ret %d\n", ret); - - /* Re-enable interrupts, if they were enabled on entry. */ - restore_flags(flags); - - ASC_ASSERT(ret != ASC_ERROR); - return ret; -} -#else /* version >= v2.3.28 */ -/* - * advansys_eh_bus_reset() - * * Reset the bus associated with the command 'scp'. * * This function runs its own thread. Interrupts must be blocked but @@ -7149,24 +5982,24 @@ * required. Returns SUCCESS or FAILED. */ int -advansys_eh_bus_reset(Scsi_Cmnd *scp) +advansys_reset(Scsi_Cmnd *scp) { struct Scsi_Host *shp; asc_board_t *boardp; ASC_DVC_VAR *asc_dvc_varp; ADV_DVC_VAR *adv_dvc_varp; - int flags; + ulong flags; Scsi_Cmnd *done_scp = NULL, *last_scp = NULL; Scsi_Cmnd *tscp, *new_last_scp; int status; - int ret; + int ret = SUCCESS; - ASC_DBG1(1, "advansys_eh_bus_reset: %lx\n", (ulong) scp); + ASC_DBG1(1, "advansys_reset: 0x%lx\n", (ulong) scp); #ifdef ADVANSYS_STATS if (scp->host != NULL) { - ASC_STATS(scp->host, eh_bus_reset); - } + ASC_STATS(scp->host, reset); + } #endif /* ADVANSYS_STATS */ if ((shp = scp->host) == NULL) { @@ -7176,6 +6009,8 @@ boardp = ASC_BOARDP(shp); + ASC_PRINT1("advansys_reset: board %d: SCSI bus reset started...\n", + boardp->id); /* * Check for re-entrancy. */ @@ -7187,32 +6022,43 @@ boardp->flags |= ASC_HOST_IN_RESET; spin_unlock_irqrestore(&boardp->lock, flags); + /* + * XXX - Remove this comment and the next line when SCSI mid-level + * no longer acquires 'io_request_lock' before calling the SCSI + * low-level reset entrypoint. + */ + ASC_UNLOCK_IO_REQUEST_LOCK + if (ASC_NARROW_BOARD(boardp)) { /* * Narrow Board - * - * If the suggest reset bus flags are set, then reset the bus. - * Otherwise only reset the device. */ asc_dvc_varp = &boardp->dvc_var.asc_dvc_var; /* - * Reset the target's SCSI bus. + * Reset the chip and SCSI bus. */ - ASC_DBG(1, "advansys_eh_bus_reset: before AscResetSB()\n"); - status = AscResetSB(asc_dvc_varp); - switch (status) { - case ASC_TRUE: - ASC_DBG(1, "advansys_eh_bus_reset: AscResetSB() success\n"); - ret = SUCCESS; - break; - case ASC_ERROR: - default: - ASC_DBG(1, "advansys_eh_bus_reset: AscResetSB() failed\n"); + ASC_DBG(1, "advansys_reset: before AscInitAsc1000Driver()\n"); + status = AscInitAsc1000Driver(asc_dvc_varp); + + /* Refer to ASC_IERR_* defintions for meaning of 'err_code'. */ + if (asc_dvc_varp->err_code) { + ASC_PRINT2( + "advansys_reset: board %d: SCSI bus reset error: 0x%x\n", + boardp->id, asc_dvc_varp->err_code); ret = FAILED; - break; + } else if (status) { + ASC_PRINT2( + "advansys_reset: board %d: SCSI bus reset warning: 0x%x\n", + boardp->id, status); + } else { + ASC_PRINT1( + "advansys_reset: board %d: SCSI bus reset successful.\n", + boardp->id); } + ASC_DBG(1, "advansys_reset: after AscInitAsc1000Driver()\n"); + /* * Acquire the board lock. */ @@ -7230,16 +6076,16 @@ /* * Reset the target's SCSI bus. */ - ASC_DBG(1, "advansys_eh_bus_reset: before AdvResetChipAndSB()\n"); + ASC_DBG(1, "advansys_reset: before AdvResetChipAndSB()\n"); switch (AdvResetChipAndSB(adv_dvc_varp)) { case ASC_TRUE: - ASC_DBG(1, - "advansys_eh_bus_reset: AdvResetChipAndSB() success\n"); - ret = SUCCESS; + ASC_PRINT1("advansys_reset: board %d: SCSI bus reset successful.\n", + boardp->id); break; case ASC_FALSE: default: - ASC_DBG(1, "advansys_eh_bus_reset: AdvResetChipAndSB() failed\n"); + ASC_PRINT1("advansys_reset: board %d: SCSI bus reset error.\n", + boardp->id); ret = FAILED; break; } @@ -7322,11 +6168,17 @@ asc_scsi_done_list(done_scp); } - ASC_DBG1(1, "advansys_eh_bus_reset: ret %d\n", ret); + /* + * XXX - Remove this comment and the next line when SCSI mid-level + * no longer acquires 'io_request_lock' before calling the SCSI + * low-level reset entrypoint. + */ + ASC_LOCK_IO_REQUEST_LOCK + + ASC_DBG1(1, "advansys_reset: ret %d\n", ret); return ret; } -#endif /* version >= v2.3.28 */ /* * advansys_biosparam() @@ -7340,11 +6192,7 @@ * ip[2]: cylinders */ int -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0) -advansys_biosparam(Disk *dp, int dep, int ip[]) -#else /* version >= v1.3.0 */ advansys_biosparam(Disk *dp, kdev_t dep, int ip[]) -#endif /* version >= v1.3.0 */ { asc_board_t *boardp; @@ -7440,14 +6288,14 @@ #ifdef ADVANSYS_DEBUG ASC_DBG1(1, "advansys_setup: ints[0] %d\n", ints[0]); for (i = 1; i < ints[0]; i++) { - ASC_DBG2(1, " ints[%d] %x", i, ints[i]); + ASC_DBG2(1, " ints[%d] 0x%x", i, ints[i]); } ASC_DBG(1, "\n"); #endif /* ADVANSYS_DEBUG */ for (i = 1; i <= ints[0] && i <= ASC_NUM_IOPORT_PROBE; i++) { asc_ioport[i-1] = ints[i]; - ASC_DBG2(1, "advansys_setup: asc_ioport[%d] %x\n", + ASC_DBG2(1, "advansys_setup: asc_ioport[%d] 0x%x\n", i - 1, asc_ioport[i-1]); } } @@ -7457,15 +6305,15 @@ * --- Loadable Driver Support */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0) +#if ASC_LINUX_KERNEL24 +static Scsi_Host_Template driver_template = ADVANSYS; +# include "scsi_module.c" +#elif ASC_LINUX_KERNEL22 #ifdef MODULE Scsi_Host_Template driver_template = ADVANSYS; # include "scsi_module.c" #endif /* MODULE */ -#else /* version >= v2.4.0 */ -static Scsi_Host_Template driver_template = ADVANSYS; -# include "scsi_module.c" -#endif /* version >= v2.4.0 */ +#endif /* @@ -7475,41 +6323,21 @@ /* * First-level interrupt handler. * - * For versions > v1.3.70, 'dev_id' is a pointer to the interrupting - * adapter's asc_board_t. Because all boards are currently checked - * for interrupts on each interrupt, 'dev_id' is not referenced. 'dev_id' - * could be used to identify an interrupt passed to the AdvanSys driver, - * which is for a device sharing an interrupt with an AdvanSys adapter. + * 'dev_id' is a pointer to the interrupting adapter's asc_board_t. Because + * all boards are currently checked for interrupts on each interrupt, 'dev_id' + * is not referenced. 'dev_id' could be used to identify an interrupt passed + * to the AdvanSys driver which is for a device sharing an interrupt with + * an AdvanSys adapter. */ STATIC void -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,70) -advansys_interrupt(int irq, struct pt_regs *regs) -#else /* version >= v1.3.70 */ advansys_interrupt(int irq, void *dev_id, struct pt_regs *regs) -#endif /* version >= v1.3.70 */ { -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,95) - int flags; -#else /* version >= v2.1.95 */ - unsigned long flags; -#endif /* version >= v2.1.95 */ + ulong flags; int i; asc_board_t *boardp; Scsi_Cmnd *done_scp = NULL, *last_scp = NULL; Scsi_Cmnd *new_last_scp; -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,95) - /* Disable interrupts, if they aren't already disabled. */ - save_flags(flags); - cli(); -#elif LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) - /* - * Disable interrupts, if they aren't already disabled and acquire - * the I/O spinlock. - */ - spin_lock_irqsave(&io_request_lock, flags); -#endif /* version < v2.3.28 */ - ASC_DBG(1, "advansys_interrupt: begin\n"); /* @@ -7518,11 +6346,9 @@ */ for (i = 0; i < asc_board_count; i++) { boardp = ASC_BOARDP(asc_host[i]); - ASC_DBG2(2, "advansys_interrupt: i %d, boardp %lx\n", - i, (ulong) boardp) -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,28) + ASC_DBG2(2, "advansys_interrupt: i %d, boardp 0x%lx\n", + i, (ulong) boardp); spin_lock_irqsave(&boardp->lock, flags); -#endif /* version >= v2.3.28 */ if (ASC_NARROW_BOARD(boardp)) { /* * Narrow Board @@ -7544,13 +6370,12 @@ /* * Start waiting requests and create a list of completed requests. - * - * If a reset or abort request is being performed for the board, - * the reset or abort handler will complete pending requests after - * it has completed. + * + * If a reset request is being performed for the board, the reset + * handler will complete pending requests after it has completed. */ - if ((boardp->flags & (ASC_HOST_IN_RESET | ASC_HOST_IN_ABORT)) == 0) { - ASC_DBG2(1, "advansys_interrupt: done_scp %lx, last_scp %lx\n", + if ((boardp->flags & ASC_HOST_IN_RESET) == 0) { + ASC_DBG2(1, "advansys_interrupt: done_scp 0x%lx, last_scp 0x%lx\n", (ulong) done_scp, (ulong) last_scp); /* Start any waiting commands for the board. */ @@ -7579,41 +6404,21 @@ } } } -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,28) spin_unlock_irqrestore(&boardp->lock, flags); -#endif /* version >= v2.3.28 */ } - /* Interrupts could be enabled here. */ - /* - * It is possible for the request done function to re-enable - * interrupts without confusing the driver. But here the - * original flags aren't restored until all requests have been - * completed. + * If interrupts were enabled on entry, then they + * are now enabled here. + * + * Complete all requests on the done list. */ asc_scsi_done_list(done_scp); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,95) - /* - * Restore the original flags which will enable interrupts - * if and only if they were enabled on entry. - */ - restore_flags(flags); -#elif LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) - /* - * Release the I/O spinlock and restore the original flags - * which will enable interrupts if and only if they were - * enabled on entry. - */ - spin_unlock_irqrestore(&io_request_lock, flags); -#endif /* version < v2.3.28 */ - ASC_DBG(1, "advansys_interrupt: end\n"); return; } -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) /* * Set the number of commands to queue per device for the * specified host adapter. @@ -7642,24 +6447,11 @@ device->queue_depth = boardp->dvc_var.adv_dvc_var.max_dvc_qng; } - ASC_DBG3(1, "advansys_select_queue_depths: shp %lx, id %d, depth %d\n", + ASC_DBG3(1, + "advansys_select_queue_depths: shp 0x%lx, id %d, depth %d\n", (ulong) shp, device->id, device->queue_depth); } } -#endif /* version >= v1.3.89 */ - -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -/* - * Function used only with polled I/O requests that are initiated by - * advansys_command(). - */ -STATIC void -advansys_command_done(Scsi_Cmnd *scp) -{ - ASC_DBG1(1, "advansys_command_done: scp %lx\n", (ulong) scp); - scp->SCp.Status = 1; -} -#endif /* version < v2.3.28 */ /* * Complete all requests on the singly linked list pointed @@ -7674,7 +6466,7 @@ ASC_DBG(2, "asc_scsi_done_list: begin\n"); while (scp != NULL) { - ASC_DBG1(3, "asc_scsi_done_list: scp %lx\n", (ulong) scp); + ASC_DBG1(3, "asc_scsi_done_list: scp 0x%lx\n", (ulong) scp); tscp = REQPNEXT(scp); REQPNEXT(scp) = NULL; ASC_STATS(scp->host, done); @@ -7722,12 +6514,15 @@ * scsi_done - used to save caller's done function * host_scribble - used for pointer to another Scsi_Cmnd * - * If this function returns ASC_NOERROR or ASC_ERROR the request - * has been enqueued on the board's 'done' queue and must be - * completed by the caller. + * If this function returns ASC_NOERROR the request has been enqueued + * on the board's 'active' queue and will be completed from the + * interrupt handler. * - * If ASC_BUSY is returned the request must be enqueued by the - * caller and re-tried later. + * If this function returns ASC_NOERROR the request has been enqueued + * on the board's 'done' queue and must be completed by the caller. + * + * If ASC_BUSY is returned the request will be enqueued by the + * caller on the target's waiting queue and re-tried later. */ STATIC int asc_execute_scsi_cmnd(Scsi_Cmnd *scp) @@ -7739,8 +6534,7 @@ Scsi_Device *device; int ret; - ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE); - ASC_DBG2(1, "asc_execute_scsi_cmnd: scp %lx, done %lx\n", + ASC_DBG2(1, "asc_execute_scsi_cmnd: scp 0x%lx, done 0x%lx\n", (ulong) scp, (ulong) scp->scsi_done); boardp = ASC_BOARDP(scp->host); @@ -7757,6 +6551,10 @@ * Build Asc Library request structure using the * global structures 'asc_scsi_req' and 'asc_sg_head'. * + * If an error is returned, then the request has been + * queued on the board done queue. It will be completed + * by the caller. + * * asc_build_req() can not return ASC_BUSY. */ if (asc_build_req(boardp, scp) == ASC_ERROR) { @@ -7776,18 +6574,20 @@ * request counter. Wrapping doesn't matter. */ boardp->reqcnt[scp->target]++; - asc_enqueue(&boardp->active, scp, ASC_BACK); ASC_DBG(1, "asc_execute_scsi_cmnd: AscExeScsiQueue(), ASC_NOERROR\n"); break; case ASC_BUSY: - /* Caller must enqueue request and retry later. */ + /* + * Caller will enqueue request on the target's waiting queue + * and retry later. + */ ASC_STATS(scp->host, exe_busy); break; case ASC_ERROR: ASC_PRINT2( -"asc_execute_scsi_cmnd: board %d: AscExeScsiQueue() ASC_ERROR, err_code %x\n", +"asc_execute_scsi_cmnd: board %d: AscExeScsiQueue() ASC_ERROR, err_code 0x%x\n", boardp->id, asc_dvc_varp->err_code); ASC_STATS(scp->host, exe_error); scp->result = HOST_BYTE(DID_ERROR); @@ -7795,7 +6595,7 @@ break; default: ASC_PRINT2( -"asc_execute_scsi_cmnd: board %d: AscExeScsiQueue() unknown, err_code %x\n", +"asc_execute_scsi_cmnd: board %d: AscExeScsiQueue() unknown, err_code 0x%x\n", boardp->id, asc_dvc_varp->err_code); ASC_STATS(scp->host, exe_unknown); scp->result = HOST_BYTE(DID_ERROR); @@ -7811,7 +6611,7 @@ /* * Build and get a pointer to an Adv Library request structure. * - * If the request is successfully built then send it below, + * If the request is successfully built then send it below, * otherwise return with an error. */ switch (adv_build_req(boardp, scp, &adv_scsiqp)) { @@ -7820,14 +6620,28 @@ break; case ASC_BUSY: ASC_DBG(1, "asc_execute_scsi_cmnd: adv_build_req ASC_BUSY\n"); + /* + * If busy is returned the request has not been enqueued. + * It will be enqueued by the caller on the target's waiting + * queue and retried later. + * + * The asc_stats fields 'adv_build_noreq' and 'adv_build_nosg' + * count wide board busy conditions. They are updated in + * adv_build_req and adv_get_sglist, respectively. + */ return ASC_BUSY; case ASC_ERROR: + /* + * If an error is returned, then the request has been + * queued on the board done queue. It will be completed + * by the caller. + */ default: ASC_DBG(1, "asc_execute_scsi_cmnd: adv_build_req ASC_ERROR\n"); ASC_STATS(scp->host, build_error); return ASC_ERROR; } - + /* * Execute the command. If there is no error, add the command * to the active queue. @@ -7845,12 +6659,15 @@ "asc_execute_scsi_cmnd: AdvExeScsiQueue(), ASC_NOERROR\n"); break; case ASC_BUSY: - /* Caller must enqueue request and retry later. */ + /* + * Caller will enqueue request on the target's waiting queue + * and retry later. + */ ASC_STATS(scp->host, exe_busy); break; case ASC_ERROR: ASC_PRINT2( -"asc_execute_scsi_cmnd: board %d: AdvExeScsiQueue() ASC_ERROR, err_code %x\n", +"asc_execute_scsi_cmnd: board %d: AdvExeScsiQueue() ASC_ERROR, err_code 0x%x\n", boardp->id, adv_dvc_varp->err_code); ASC_STATS(scp->host, exe_error); scp->result = HOST_BYTE(DID_ERROR); @@ -7858,7 +6675,7 @@ break; default: ASC_PRINT2( -"asc_execute_scsi_cmnd: board %d: AdvExeScsiQueue() unknown, err_code %x\n", +"asc_execute_scsi_cmnd: board %d: AdvExeScsiQueue() unknown, err_code 0x%x\n", boardp->id, adv_dvc_varp->err_code); ASC_STATS(scp->host, exe_unknown); scp->result = HOST_BYTE(DID_ERROR); @@ -7868,7 +6685,6 @@ } ASC_DBG(1, "asc_execute_scsi_cmnd: end\n"); - ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE); return ret; } @@ -7878,7 +6694,8 @@ * The global structures 'asc_scsi_q' and 'asc_sg_head' are * used to build the request. * - * If an error occurs, then return ASC_ERROR. + * If an error occurs, then queue the request on the board done + * queue and return ASC_ERROR. */ STATIC int asc_build_req(asc_board_t *boardp, Scsi_Cmnd *scp) @@ -7900,20 +6717,20 @@ * For narrow boards a CDB length maximum of 12 bytes * is supported. */ - ASC_ASSERT(scp->cmd_len <= ASC_MAX_CDB_LEN); if (scp->cmd_len > ASC_MAX_CDB_LEN) { - scp->cmd_len = ASC_MAX_CDB_LEN; + ASC_PRINT3( +"asc_build_req: board %d: cmd_len %d > ASC_MAX_CDB_LEN %d\n", + boardp->id, scp->cmd_len, ASC_MAX_CDB_LEN); + scp->result = HOST_BYTE(DID_ERROR); + asc_enqueue(&boardp->done, scp, ASC_BACK); + return ASC_ERROR; } asc_scsi_q.cdbptr = &scp->cmnd[0]; asc_scsi_q.q2.cdb_len = scp->cmd_len; asc_scsi_q.q1.target_id = ASC_TID_TO_TARGET_ID(scp->target); asc_scsi_q.q1.target_lun = scp->lun; asc_scsi_q.q2.target_ix = ASC_TIDLUN_TO_IX(scp->target, scp->lun); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0) - asc_scsi_q.q1.sense_addr = (ADV_PADDR) &scp->sense_buffer[0]; -#else /* version >= v2.0.0 */ asc_scsi_q.q1.sense_addr = cpu_to_le32(virt_to_bus(&scp->sense_buffer[0])); -#endif /* version >= v2.0.0 */ asc_scsi_q.q1.sense_len = sizeof(scp->sense_buffer); /* @@ -7925,7 +6742,7 @@ * * The request count is incremented below for every successfully * started request. - * + * */ if ((boardp->dvc_var.asc_dvc_var.cur_dvc_qng[scp->target] > 0) && (boardp->reqcnt[scp->target] % 255) == 0) { @@ -7943,13 +6760,9 @@ * CDB request of single contiguous buffer. */ ASC_STATS(scp->host, cont_cnt); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0) - asc_scsi_q.q1.data_addr = (ADV_PADDR) scp->request_buffer; -#else /* version >= v2.0.0 */ asc_scsi_q.q1.data_addr = cpu_to_le32(virt_to_bus(scp->request_buffer)); -#endif /* version >= v2.0.0 */ - asc_scsi_q.q1.data_cnt = scp->request_bufflen; + asc_scsi_q.q1.data_cnt = cpu_to_le32(scp->request_bufflen); ASC_STATS_ADD(scp->host, cont_xfer, ASC_CEILING(scp->request_bufflen, 512)); asc_scsi_q.q1.sg_queue_cnt = 0; @@ -7982,6 +6795,7 @@ asc_scsi_q.sg_head = &asc_sg_head; asc_scsi_q.q1.data_cnt = 0; asc_scsi_q.q1.data_addr = 0; + /* This is a byte value, otherwise it would need to be swapped. */ asc_sg_head.entry_cnt = asc_scsi_q.q1.sg_queue_cnt = scp->use_sg; ASC_STATS_ADD(scp->host, sg_elem, asc_sg_head.entry_cnt); @@ -7990,12 +6804,8 @@ */ slp = (struct scatterlist *) scp->request_buffer; for (sgcnt = 0; sgcnt < scp->use_sg; sgcnt++, slp++) { -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0) - asc_sg_head.sg_list[sgcnt].addr = (ADV_PADDR) slp->address; -#else /* version >= v2.0.0 */ asc_sg_head.sg_list[sgcnt].addr = cpu_to_le32(virt_to_bus(slp->address)); -#endif /* version >= v2.0.0 */ asc_sg_head.sg_list[sgcnt].bytes = cpu_to_le32(slp->length); ASC_STATS_ADD(scp->host, sg_xfer, ASC_CEILING(slp->length, 512)); } @@ -8041,9 +6851,9 @@ } /* - * Get 4-byte aligned ADV_SCSI_REQ_Q and ADV_SG_BLOCK pointers. + * Get 32-byte aligned ADV_SCSI_REQ_Q and ADV_SG_BLOCK pointers. */ - scsiqp = (ADV_SCSI_REQ_Q *) ADV_8BALIGN(&reqp->scsi_req_q); + scsiqp = (ADV_SCSI_REQ_Q *) ADV_32BALIGN(&reqp->scsi_req_q); /* * Initialize the structure. @@ -8069,9 +6879,13 @@ * For wide boards a CDB length maximum of 16 bytes * is supported. */ - ASC_ASSERT(scp->cmd_len <= ADV_MAX_CDB_LEN); if (scp->cmd_len > ADV_MAX_CDB_LEN) { - scp->cmd_len = ADV_MAX_CDB_LEN; + ASC_PRINT3( +"adv_build_req: board %d: cmd_len %d > ADV_MAX_CDB_LEN %d\n", + boardp->id, scp->cmd_len, ADV_MAX_CDB_LEN); + scp->result = HOST_BYTE(DID_ERROR); + asc_enqueue(&boardp->done, scp, ASC_BACK); + return ASC_ERROR; } scsiqp->cdb_len = scp->cmd_len; /* Copy first 12 CDB bytes to cdb[]. */ @@ -8086,11 +6900,7 @@ scsiqp->target_id = scp->target; scsiqp->target_lun = scp->lun; -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0) - scsiqp->sense_addr = (ADV_PADDR) &scp->sense_buffer[0]; -#else /* version >= v2.0.0 */ scsiqp->sense_addr = cpu_to_le32(virt_to_bus(&scp->sense_buffer[0])); -#endif /* version >= v2.0.0 */ scsiqp->sense_len = sizeof(scp->sense_buffer); /* @@ -8099,11 +6909,7 @@ */ scsiqp->data_cnt = cpu_to_le32(scp->request_bufflen); scsiqp->vdata_addr = scp->request_buffer; -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0) - scsiqp->data_addr = (ADV_PADDR) scp->request_buffer; -#else /* version >= v2.0.0 */ scsiqp->data_addr = cpu_to_le32(virt_to_bus(scp->request_buffer)); -#endif /* version >= v2.0.0 */ if (scp->use_sg == 0) { /* @@ -8182,7 +6988,7 @@ ADV_PADDR sg_block_paddr; int i; - scsiqp = (ADV_SCSI_REQ_Q *) ADV_8BALIGN(&reqp->scsi_req_q); + scsiqp = (ADV_SCSI_REQ_Q *) ADV_32BALIGN(&reqp->scsi_req_q); slp = (struct scatterlist *) scp->request_buffer; sg_elem_cnt = scp->use_sg; prev_sg_block = NULL; @@ -8223,12 +7029,7 @@ * the allocated ADV_SG_BLOCK structure. */ sg_block = (ADV_SG_BLOCK *) ADV_8BALIGN(&sgblkp->sg_block); - sg_block_paddr = -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0) - (ADV_PADDR) sg_block; -#else /* version >= v2.0.0 */ - virt_to_bus(sg_block); -#endif /* version >= v2.0.0 */ + sg_block_paddr = virt_to_bus(sg_block); /* * Check if this is the first 'adv_sgblk_t' for the request. @@ -8262,11 +7063,7 @@ for (i = 0; i < NO_OF_SG_PER_BLOCK; i++) { sg_block->sg_list[i].sg_addr = -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0) - (ADV_PADDR) slp->address; -#else /* version >= v2.0.0 */ cpu_to_le32(virt_to_bus(slp->address)); -#endif /* version >= v2.0.0 */ sg_block->sg_list[i].sg_count = cpu_to_le32(slp->length); ASC_STATS_ADD(scp->host, sg_xfer, ASC_CEILING(slp->length, 512)); @@ -8298,8 +7095,7 @@ struct Scsi_Host *shp; int i; - ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE); - ASC_DBG2(1, "asc_isr_callback: asc_dvc_varp %lx, qdonep %lx\n", + ASC_DBG2(1, "asc_isr_callback: asc_dvc_varp 0x%lx, qdonep 0x%lx\n", (ulong) asc_dvc_varp, (ulong) qdonep); ASC_DBG_PRT_ASC_QDONE_INFO(2, qdonep); @@ -8308,7 +7104,7 @@ * command that has been completed. */ scp = (Scsi_Cmnd *) ASC_U32_TO_VADDR(qdonep->d2.srb_ptr); - ASC_DBG1(1, "asc_isr_callback: scp %lx\n", (ulong) scp); + ASC_DBG1(1, "asc_isr_callback: scp 0x%lx\n", (ulong) scp); if (scp == NULL) { ASC_PRINT("asc_isr_callback: scp is NULL\n"); @@ -8328,24 +7124,24 @@ } if (i == asc_board_count) { ASC_PRINT2( - "asc_isr_callback: scp %lx has bad host pointer, host %lx\n", + "asc_isr_callback: scp 0x%lx has bad host pointer, host 0x%lx\n", (ulong) scp, (ulong) shp); return; } ASC_STATS(shp, callback); - ASC_DBG1(1, "asc_isr_callback: shp %lx\n", (ulong) shp); + ASC_DBG1(1, "asc_isr_callback: shp 0x%lx\n", (ulong) shp); /* * If the request isn't found on the active queue, it may - * have been removed to handle a reset or abort request. + * have been removed to handle a reset request. * Display a message and return. */ boardp = ASC_BOARDP(shp); ASC_ASSERT(asc_dvc_varp == &boardp->dvc_var.asc_dvc_var); if (asc_rmqueue(&boardp->active, scp) == ASC_FALSE) { ASC_PRINT2( - "asc_isr_callback: board %d: scp %lx not on active queue\n", + "asc_isr_callback: board %d: scp 0x%lx not on active queue\n", boardp->id, (ulong) scp); return; } @@ -8369,20 +7165,20 @@ (ASC_SCSI_INQUIRY *) scp->request_buffer); } -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,19) +#if ASC_LINUX_KERNEL24 /* * Check for an underrun condition. * * If there was no error and an underrun condition, then * then return the number of underrun bytes. */ - if (scp->request_bufflen != 0 && qdonep->remain_bytes != 0 && + if (scp->request_bufflen != 0 && qdonep->remain_bytes != 0 && qdonep->remain_bytes <= scp->request_bufflen != 0) { ASC_DBG1(1, "asc_isr_callback: underrun condition %u bytes\n", (unsigned) qdonep->remain_bytes); scp->resid = qdonep->remain_bytes; } -#endif /* version >= v2.3.19 */ +#endif break; case QD_WITH_ERROR: @@ -8404,15 +7200,15 @@ * byte as it is defined by SCSI. */ scp->result = DRIVER_BYTE(DRIVER_SENSE) | - STATUS_BYTE(qdonep->d3.scsi_stat); + STATUS_BYTE(qdonep->d3.scsi_stat); } else { - scp->result = STATUS_BYTE(qdonep->d3.scsi_stat); + scp->result = STATUS_BYTE(qdonep->d3.scsi_stat); } break; default: /* QHSTA error occurred */ - ASC_DBG1(1, "asc_isr_callback: host_stat %x\n", + ASC_DBG1(1, "asc_isr_callback: host_stat 0x%x\n", qdonep->d3.host_stat); scp->result = HOST_BYTE(DID_BAD_TARGET); break; @@ -8426,7 +7222,7 @@ break; default: - ASC_DBG1(1, "asc_isr_callback: done_stat %x\n", qdonep->d3.done_stat); + ASC_DBG1(1, "asc_isr_callback: done_stat 0x%x\n", qdonep->d3.done_stat); scp->result = HOST_BYTE(DID_ERROR) | MSG_BYTE(qdonep->d3.scsi_msg) | STATUS_BYTE(qdonep->d3.scsi_stat); break; @@ -8443,7 +7239,7 @@ boardp->init_tidmask |= ADV_TID_TO_TIDMASK(scp->target); } - /* + /* * Because interrupts may be enabled by the 'Scsi_Cmnd' done * function, add the command to the end of the board's done queue. * The done function for the command will be called from @@ -8468,9 +7264,12 @@ Scsi_Cmnd *scp; struct Scsi_Host *shp; int i; +#if ASC_LINUX_KERNEL24 + ADV_DCNT resid_cnt; +#endif - ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE); - ASC_DBG2(1, "adv_isr_callback: adv_dvc_varp %lx, scsiqp %lx\n", + + ASC_DBG2(1, "adv_isr_callback: adv_dvc_varp 0x%lx, scsiqp 0x%lx\n", (ulong) adv_dvc_varp, (ulong) scsiqp); ASC_DBG_PRT_ADV_SCSI_REQ_Q(2, scsiqp); @@ -8480,7 +7279,7 @@ * completed ADV_SCSI_REQ_Q structure. */ reqp = (adv_req_t *) ADV_U32_TO_VADDR(scsiqp->srb_ptr); - ASC_DBG1(1, "adv_isr_callback: reqp %lx\n", (ulong) reqp); + ASC_DBG1(1, "adv_isr_callback: reqp 0x%lx\n", (ulong) reqp); if (reqp == NULL) { ASC_PRINT("adv_isr_callback: reqp is NULL\n"); return; @@ -8495,7 +7294,7 @@ * determined. */ scp = reqp->cmndp; - ASC_DBG1(1, "adv_isr_callback: scp %lx\n", (ulong) scp); + ASC_DBG1(1, "adv_isr_callback: scp 0x%lx\n", (ulong) scp); if (scp == NULL) { ASC_PRINT("adv_isr_callback: scp is NULL; adv_req_t dropped.\n"); return; @@ -8518,18 +7317,17 @@ */ if (i == asc_board_count) { ASC_PRINT2( - "adv_isr_callback: scp %lx has bad host pointer, host %lx\n", + "adv_isr_callback: scp 0x%lx has bad host pointer, host 0x%lx\n", (ulong) scp, (ulong) shp); return; } ASC_STATS(shp, callback); - ASC_DBG1(1, "adv_isr_callback: shp %lx\n", (ulong) shp); + ASC_DBG1(1, "adv_isr_callback: shp 0x%lx\n", (ulong) shp); /* * If the request isn't found on the active queue, it may have been - * removed to handle a reset or abort request. Display a message and - * return. + * removed to handle a reset request. Display a message and return. * * Note: Because the structure may still be in use don't attempt * to free the adv_req_t and adv_sgblk_t, if any, structures. @@ -8538,7 +7336,7 @@ ASC_ASSERT(adv_dvc_varp == &boardp->dvc_var.adv_dvc_var); if (asc_rmqueue(&boardp->active, scp) == ASC_FALSE) { ASC_PRINT2( - "adv_isr_callback: board %d: scp %lx not on active queue\n", + "adv_isr_callback: board %d: scp 0x%lx not on active queue\n", boardp->id, (ulong) scp); return; } @@ -8551,20 +7349,21 @@ ASC_DBG(2, "adv_isr_callback: QD_NO_ERROR\n"); scp->result = 0; -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,3,19) +#if ASC_LINUX_KERNEL24 /* * Check for an underrun condition. * * If there was no error and an underrun condition, then * then return the number of underrun bytes. */ - if (scp->request_bufflen != 0 && scsiqp->data_cnt != 0 && - le32_to_cpu(scsiqp->data_cnt) <= scp->request_bufflen) { + resid_cnt = le32_to_cpu(scsiqp->data_cnt); + if (scp->request_bufflen != 0 && resid_cnt != 0 && + resid_cnt <= scp->request_bufflen) { ASC_DBG1(1, "adv_isr_callback: underrun condition %lu bytes\n", - (ulong) le32_to_cpu(scsiqp->data_cnt)); - scp->resid = le32_to_cpu(scsiqp->data_cnt); + (ulong) resid_cnt); + scp->resid = resid_cnt; } -#endif /* version >= v2.3.19 */ +#endif break; case QD_WITH_ERROR: @@ -8594,7 +7393,7 @@ default: /* Some other QHSTA error occurred. */ - ASC_DBG1(1, "adv_isr_callback: host_status %x\n", + ASC_DBG1(1, "adv_isr_callback: host_status 0x%x\n", scsiqp->host_status); scp->result = HOST_BYTE(DID_BAD_TARGET); break; @@ -8607,7 +7406,7 @@ break; default: - ASC_DBG1(1, "adv_isr_callback: done_status %x\n", scsiqp->done_status); + ASC_DBG1(1, "adv_isr_callback: done_status 0x%x\n", scsiqp->done_status); scp->result = HOST_BYTE(DID_ERROR) | STATUS_BYTE(scsiqp->scsi_status); break; } @@ -8623,7 +7422,7 @@ boardp->init_tidmask |= ADV_TID_TO_TIDMASK(scp->target); } - /* + /* * Because interrupts may be enabled by the 'Scsi_Cmnd' done * function, add the command to the end of the board's done queue. * The done function for the command will be called from @@ -8663,445 +7462,36 @@ adv_async_callback(ADV_DVC_VAR *adv_dvc_varp, uchar code) { switch (code) - { - case ADV_ASYNC_SCSI_BUS_RESET_DET: - /* - * The firmware detected a SCSI Bus reset. - */ - ASC_DBG(0, "adv_async_callback: ADV_ASYNC_SCSI_BUS_RESET_DET\n"); - break; - - case ADV_ASYNC_RDMA_FAILURE: - /* - * Handle RDMA failure by resetting the SCSI Bus and - * possibly the chip if it is unresponsive. Log the error - * with a unique code. - */ - ASC_DBG(0, "adv_async_callback: ADV_ASYNC_RDMA_FAILURE\n"); - AdvResetChipAndSB(adv_dvc_varp); - break; - - case ADV_HOST_SCSI_BUS_RESET: - /* - * Host generated SCSI bus reset occurred. - */ - ASC_DBG(0, "adv_async_callback: ADV_HOST_SCSI_BUS_RESET\n"); - break; - - default: - ASC_DBG1(0, "DvcAsyncCallBack: unknown code 0x%x\n", code); - break; - } -} - -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93) -#ifdef ASC_CONFIG_PCI -/* - * Search for an AdvanSys PCI device in the PCI configuration space. - */ -ASC_INITFUNC( -STATIC int, -asc_srch_pci_dev(PCI_DEVICE *pciDevice) -) -{ - int ret = PCI_DEVICE_NOT_FOUND; - - ASC_DBG(2, "asc_srch_pci_dev: begin\n"); - - if (pci_scan_method == -1) { - pci_scan_method = asc_scan_method(); - } - pciDevice->type = pci_scan_method; - ASC_DBG1(2, "asc_srch_pci_dev: type %d\n", pciDevice->type); - - ret = asc_pci_find_dev(pciDevice); - ASC_DBG1(2, "asc_srch_pci_dev: asc_pci_find_dev() return %d\n", ret); - if (ret == PCI_DEVICE_FOUND) { - pciDevice->slotNumber = pciDevice->slotFound + 1; - pciDevice->startSlot = pciDevice->slotFound + 1; - } else { - if (pciDevice->bridge > pciDevice->busNumber) { - ASC_DBG2(2, "asc_srch_pci_dev: bridge %x, busNumber %x\n", - pciDevice->bridge, pciDevice->busNumber); - pciDevice->busNumber++; - pciDevice->slotNumber = 0; - pciDevice->startSlot = 0; - pciDevice->endSlot = 0x0f; - ret = asc_srch_pci_dev(pciDevice); - ASC_DBG1(2, "asc_srch_pci_dev: recursive call return %d\n", ret); - } - } - - ASC_DBG1(2, "asc_srch_pci_dev: return %d\n", ret); - return ret; -} - -/* - * Determine the access method to be used for 'pciDevice'. - */ -ASC_INITFUNC( -STATIC uchar, -asc_scan_method(void) -) -{ - ushort data; - PCI_DATA pciData; - uchar type; - uchar slot; - - ASC_DBG(2, "asc_scan_method: begin\n"); - memset(&pciData, 0, sizeof(pciData)); - for (type = 1; type < 3; type++) { - pciData.type = type; - for (slot = 0; slot < PCI_MAX_SLOT; slot++) { - pciData.slot = slot; - data = asc_get_cfg_word(&pciData); - if ((data != 0xFFFF) && (data != 0x0000)) { - ASC_DBG2(4, "asc_scan_method: data %x, type %d\n", data, type); - return (type); - } - } - } - ASC_DBG1(4, "asc_scan_method: type %d\n", type); - return (type); -} - -/* - * Check for an AdvanSys PCI device in 'pciDevice'. - * - * Return PCI_DEVICE_FOUND if found, otherwise return PCI_DEVICE_NOT_FOUND. - */ -ASC_INITFUNC( -STATIC int, -asc_pci_find_dev(PCI_DEVICE *pciDevice) -) -{ - PCI_DATA pciData; - ushort vendorid, deviceid; - uchar classcode, subclass; - uchar lslot; - - ASC_DBG(3, "asc_pci_find_dev: begin\n"); - pciData.type = pciDevice->type; - pciData.bus = pciDevice->busNumber; - pciData.func = pciDevice->devFunc; - lslot = pciDevice->startSlot; - for (; lslot < pciDevice->endSlot; lslot++) { - pciData.slot = lslot; - pciData.offset = VENDORID_OFFSET; - vendorid = asc_get_cfg_word(&pciData); - ASC_DBG1(3, "asc_pci_find_dev: vendorid %x\n", vendorid); - if (vendorid != 0xffff) { - pciData.offset = DEVICEID_OFFSET; - deviceid = asc_get_cfg_word(&pciData); - ASC_DBG1(3, "asc_pci_find_dev: deviceid %x\n", deviceid); - if ((vendorid == ASC_PCI_VENDORID) && - ((deviceid == ASC_PCI_DEVICE_ID_1100) || - (deviceid == ASC_PCI_DEVICE_ID_1200) || - (deviceid == ASC_PCI_DEVICE_ID_1300) || - (deviceid == ASC_PCI_DEVICE_ID_2300) || - (deviceid == ASC_PCI_DEVICE_ID_2500))) { - pciDevice->slotFound = lslot; - ASC_DBG(3, "asc_pci_find_dev: PCI_DEVICE_FOUND\n"); - return PCI_DEVICE_FOUND; - } else { - pciData.offset = SUBCLASS_OFFSET; - subclass = asc_get_cfg_byte(&pciData); - pciData.offset = CLASSCODE_OFFSET; - classcode = asc_get_cfg_byte(&pciData); - if ((classcode & PCI_BASE_CLASS_BRIDGE_DEVICE) && - (subclass & PCI_SUB_CLASS_PCI_TO_PCI_BRIDGE_CONTROLLER)) { - pciDevice->bridge++; - } - ASC_DBG2(3, "asc_pci_find_dev: subclass %x, classcode %x\n", - subclass, classcode); - } - } - } - return PCI_DEVICE_NOT_FOUND; -} - -/* - * Read PCI configuration data into 'pciConfig'. - */ -ASC_INITFUNC( -STATIC void, -asc_get_pci_cfg(PCI_DEVICE *pciDevice, PCI_CONFIG_SPACE *pciConfig) -) -{ - PCI_DATA pciData; - uchar counter; - uchar *localConfig; - - ASC_DBG1(4, "asc_get_pci_cfg: slotFound %d\n ", - pciDevice->slotFound); - - pciData.type = pciDevice->type; - pciData.bus = pciDevice->busNumber; - pciData.slot = pciDevice->slotFound; - pciData.func = pciDevice->devFunc; - localConfig = (uchar *) pciConfig; - - for (counter = 0; counter < sizeof(PCI_CONFIG_SPACE); counter++) { - pciData.offset = counter; - *localConfig = asc_get_cfg_byte(&pciData); - ASC_DBG1(4, "asc_get_pci_cfg: byte %x\n", *localConfig); - localConfig++; - } - ASC_DBG1(4, "asc_get_pci_cfg: counter %d\n", counter); -} - -/* - * Read a word (16 bits) from the PCI configuration space. - * - * The configuration mechanism is checked for the correct access method. - */ -ASC_INITFUNC( -STATIC ushort, -asc_get_cfg_word(PCI_DATA *pciData) -) -{ - ushort tmp; - ADV_DCNT address; - ADV_DCNT lbus = pciData->bus; - ADV_DCNT lslot = pciData->slot; - ADV_DCNT lfunc = pciData->func; - uchar t2CFA, t2CF8; - ADV_DCNT t1CF8, t1CFC; - - ASC_DBG4(4, "asc_get_cfg_word: type %d, bus %u, slot %u, func %u\n", - pciData->type, (unsigned) lbus, (unsigned) lslot, (unsigned) lfunc); - - /* - * Check type of configuration mechanism. - */ - if (pciData->type == 2) { - /* - * Save registers to be restored later. - */ - t2CFA = inp(0xCFA); /* save PCI bus register */ - t2CF8 = inp(0xCF8); /* save config space enable register */ - - /* - * Write the bus and enable registers. - */ - /* set for type 1 cycle, if needed */ - outp(0xCFA, pciData->bus); - /* set the function number */ - outp(0xCF8, 0x10 | (pciData->func << 1)); - - /* - * Read the configuration space type 2 locations. - */ - tmp = (ushort) inpw(0xC000 | ((pciData->slot << 8) + pciData->offset)); - - outp(0xCFA, t2CFA); /* save PCI bus register */ - outp(0xCF8, t2CF8); /* save config space enable register */ - } else { - /* - * Type 1 or 3 configuration mechanism. - * - * Save the CONFIG_ADDRESS and CONFIG_DATA register values. - */ - t1CF8 = inpl(0xCF8); - t1CFC = inpl(0xCFC); - - /* - * enable <31>, bus = <23:16>, slot = <15:11>, - * func = <10:8>, reg = <7:2> - */ - address = (ADV_DCNT) ((lbus << 16) | (lslot << 11) | - (lfunc << 8) | (pciData->offset & 0xFC) | 0x80000000L); - - /* - * Write out the address to CONFIG_ADDRESS. - */ - outpl(0xCF8, address); - - /* - * Read in word from CONFIG_DATA. - */ - tmp = (ushort) ((inpl(0xCFC) >> - ((pciData->offset & 2) * 8)) & 0xFFFF); - - /* - * Restore registers. - */ - outpl(0xCF8, t1CF8); - outpl(0xCFC, t1CFC); - } - ASC_DBG1(4, "asc_get_cfg_word: config data: %x\n", tmp); - return tmp; -} - -/* - * Reads a byte from the PCI configuration space. - * - * The configuration mechanism is checked for the correct access method. - */ -ASC_INITFUNC( -STATIC uchar, -asc_get_cfg_byte(PCI_DATA *pciData) -) -{ - uchar tmp; - ADV_DCNT address; - ADV_DCNT lbus = pciData->bus, lslot = pciData->slot, lfunc = pciData->func; - ADV_DCNT t2CFA, t2CF8; - ADV_DCNT t1CF8, t1CFC; - - ASC_DBG1(4, "asc_get_cfg_byte: type: %d\n", pciData->type); - - /* - * Check type of configuration mechanism. - */ - if (pciData->type == 2) { - /* - * Save registers to be restored later. - */ - t2CFA = inp(0xCFA); /* save PCI bus register */ - t2CF8 = inp(0xCF8); /* save config space enable register */ - - /* - * Write the bus and enable registers. - */ - /* set for type 1 cycle, if needed */ - outp(0xCFA, pciData->bus); - /* set the function number */ - outp(0xCF8, 0x10 | (pciData->func << 1)); - - /* - * Read configuration space type 2 locations. - */ - tmp = inp(0xC000 | ((pciData->slot << 8) + pciData->offset)); - - /* - * Restore registers. - */ - outp(0xCF8, t2CF8); /* restore the enable register */ - outp(0xCFA, t2CFA); /* restore PCI bus register */ - } else { - /* - * Type 1 or 3 configuration mechanism. - * - * Save CONFIG_ADDRESS and CONFIG_DATA register values. - */ - t1CF8 = inpl(0xCF8); - t1CFC = inpl(0xCFC); - - /* - * enable <31>, bus = <23:16>, slot = <15:11>, func = <10:8>, - * reg = <7:2> - */ - address = (ADV_DCNT) ((lbus << 16) | (lslot << 11) | - (lfunc << 8) | (pciData->offset & 0xFC) | 0x80000000L); - - /* - * Write out address to CONFIG_ADDRESS. - */ - outpl(0xCF8, address); - - /* - * Read in word from CONFIG_DATA. - */ - tmp = (uchar) ((inpl(0xCFC) >> ((pciData->offset & 3) * 8)) & 0xFF); - - /* - * Restore registers. - */ - outpl(0xCF8, t1CF8); - outpl(0xCFC, t1CFC); - } - ASC_DBG1(4, "asc_get_cfg_byte: config data: %x\n", tmp); - return tmp; -} - -/* - * Write a byte to the PCI configuration space. - */ -ASC_INITFUNC( -STATIC void, -asc_put_cfg_byte(PCI_DATA *pciData, uchar byte_data) -) -{ - ADV_DCNT tmpl; - ADV_DCNT address; - ADV_DCNT lbus = pciData->bus, lslot = pciData->slot, lfunc = pciData->func; - uchar t2CFA, t2CF8; - ADV_DCNT t1CF8, t1CFC; - - ASC_DBG2(4, "asc_put_cfg_byte: type: %d, byte_data %x\n", - pciData->type, byte_data); - - /* - * Check type of configuration mechanism. - */ - if (pciData->type == 2) { - - /* - * Save registers to be restored later. - */ - t2CFA = inp(0xCFA); /* save PCI bus register */ - t2CF8 = inp(0xCF8); /* save config space enable register */ - - /* - * Write bus and enable registers. - */ - outp(0xCFA, pciData->bus); - - /* - * Set the function number. - */ - outp(0xCF8, 0x10 | (pciData->func << 1)); - - /* - * Write the configuration space type 2 locations. - */ - outp(0xC000 | ((pciData->slot << 8) + pciData->offset), byte_data); - - /* - * Restore registers. - */ - outp(0xCF8, t2CF8); /* restore the enable register */ - outp(0xCFA, t2CFA); /* restore PCI bus register */ - } else { - - /* - * Type 1 or 3 configuration mechanism. - * - * Save the CONFIG_ADDRESS and CONFIG_DATA register values. - */ - t1CF8 = inpl(0xCF8); - t1CFC = inpl(0xCFC); - - /* - * enable <31>, bus = <23:16>, slot = <15:11>, func = <10:8>, - * reg = <7:2> - */ - address = (ADV_DCNT) ((lbus << 16) | (lslot << 11) | (lfunc << 8) | - (pciData->offset & 0xFC) | 0x80000000L); + { + case ADV_ASYNC_SCSI_BUS_RESET_DET: /* - * Write out address to CONFIG_ADDRESS. + * The firmware detected a SCSI Bus reset. */ - outpl(0xCF8, address); + ASC_DBG(0, "adv_async_callback: ADV_ASYNC_SCSI_BUS_RESET_DET\n"); + break; + case ADV_ASYNC_RDMA_FAILURE: /* - * Write double word to CONFIG_DATA preserving the bytes - * in the double not written. + * Handle RDMA failure by resetting the SCSI Bus and + * possibly the chip if it is unresponsive. Log the error + * with a unique code. */ - tmpl = inpl(0xCFC) & ~(0xFF << ((pciData->offset & 3) * 8)); - outpl(0xCFC, tmpl | (byte_data << ((pciData->offset & 3) * 8))); + ASC_DBG(0, "adv_async_callback: ADV_ASYNC_RDMA_FAILURE\n"); + AdvResetChipAndSB(adv_dvc_varp); + break; + case ADV_HOST_SCSI_BUS_RESET: /* - * Restore registers. + * Host generated SCSI bus reset occurred. */ - outpl(0xCF8, t1CF8); - outpl(0xCFC, t1CFC); + ASC_DBG(0, "adv_async_callback: ADV_HOST_SCSI_BUS_RESET\n"); + break; + + default: + ASC_DBG1(0, "DvcAsyncCallBack: unknown code 0x%x\n", code); + break; } - ASC_DBG(4, "asc_put_cfg_byte: end\n"); } -#endif /* ASC_CONFIG_PCI */ -#endif /* version < v2.1.93 */ /* * Add a 'REQP' to the end of specified queue. Set 'tidmask' @@ -9116,9 +7506,8 @@ { int tid; - ASC_DBG3(3, "asc_enqueue: ascq %lx, reqp %lx, flag %d\n", + ASC_DBG3(3, "asc_enqueue: ascq 0x%lx, reqp 0x%lx, flag %d\n", (ulong) ascq, (ulong) reqp, flag); - ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE); ASC_ASSERT(reqp != NULL); ASC_ASSERT(flag == ASC_FRONT || flag == ASC_BACK); tid = REQPTID(reqp); @@ -9154,7 +7543,7 @@ } REQPTIME(reqp) = REQTIMESTAMP(); #endif /* ADVANSYS_STATS */ - ASC_DBG1(3, "asc_enqueue: reqp %lx\n", (ulong) reqp); + ASC_DBG1(3, "asc_enqueue: reqp 0x%lx\n", (ulong) reqp); return; } @@ -9170,8 +7559,7 @@ { REQP reqp; - ASC_DBG2(3, "asc_dequeue: ascq %lx, tid %d\n", (ulong) ascq, tid); - ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE); + ASC_DBG2(3, "asc_dequeue: ascq 0x%lx, tid %d\n", (ulong) ascq, tid); ASC_ASSERT(tid >= 0 && tid <= ADV_MAX_TID); if ((reqp = ascq->q_first[tid]) != NULL) { ASC_ASSERT(ascq->q_tidmask & ADV_TID_TO_TIDMASK(tid)); @@ -9189,7 +7577,7 @@ REQTIMESTAT("asc_dequeue", ascq, reqp, tid); #endif /* ADVANSYS_STATS */ } - ASC_DBG1(3, "asc_dequeue: reqp %lx\n", (ulong) reqp); + ASC_DBG1(3, "asc_dequeue: reqp 0x%lx\n", (ulong) reqp); return reqp; } @@ -9197,7 +7585,7 @@ * Return a pointer to a singly linked list of all the requests queued * for 'tid' on the 'asc_queue_t' pointed to by 'ascq'. * - * If 'lastpp' is not NULL, '*lastpp' will be set to point to the + * If 'lastpp' is not NULL, '*lastpp' will be set to point to the * the last request returned in the singly linked list. * * 'tid' should either be a valid target id or if it is ASC_TID_ALL, @@ -9219,8 +7607,7 @@ REQP firstp, lastp; int i; - ASC_DBG2(3, "asc_dequeue_list: ascq %lx, tid %d\n", (ulong) ascq, tid); - ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE); + ASC_DBG2(3, "asc_dequeue_list: ascq 0x%lx, tid %d\n", (ulong) ascq, tid); ASC_ASSERT((tid == ASC_TID_ALL) || (tid >= 0 && tid <= ADV_MAX_TID)); /* @@ -9280,7 +7667,7 @@ if (lastpp) { *lastpp = lastp; } - ASC_DBG1(3, "asc_dequeue_list: firstp %lx\n", (ulong) firstp); + ASC_DBG1(3, "asc_dequeue_list: firstp 0x%lx\n", (ulong) firstp); return firstp; } @@ -9301,9 +7688,8 @@ int tid; int ret = ASC_FALSE; - ASC_DBG2(3, "asc_rmqueue: ascq %lx, reqp %lx\n", + ASC_DBG2(3, "asc_rmqueue: ascq 0x%lx, reqp 0x%lx\n", (ulong) ascq, (ulong) reqp); - ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE); ASC_ASSERT(reqp != NULL); tid = REQPTID(reqp); @@ -9354,41 +7740,9 @@ } ASC_ASSERT(ascq->q_cur_cnt[tid] >= 0); #endif /* ADVANSYS_STATS */ - ASC_DBG2(3, "asc_rmqueue: reqp %lx, ret %d\n", (ulong) reqp, ret); - return ret; -} - -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -/* - * If the specified 'REQP' is queued on the specified queue for - * the specified target device, return ASC_TRUE. - */ -STATIC int -asc_isqueued(asc_queue_t *ascq, REQP reqp) -{ - REQP treqp; - int tid; - int ret = ASC_FALSE; - - ASC_DBG2(3, "asc_isqueued: ascq %lx, reqp %lx\n", - (ulong) ascq, (ulong) reqp); - ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE); - ASC_ASSERT(reqp != NULL); - - tid = REQPTID(reqp); - ASC_ASSERT(tid >= 0 && tid <= ADV_MAX_TID); - - for (treqp = ascq->q_first[tid]; treqp; treqp = REQPNEXT(treqp)) { - ASC_ASSERT(ascq->q_tidmask & ADV_TID_TO_TIDMASK(tid)); - if (treqp == reqp) { - ret = ASC_TRUE; - break; - } - } - ASC_DBG1(3, "asc_isqueued: ret %x\n", ret); + ASC_DBG2(3, "asc_rmqueue: reqp 0x%lx, ret %d\n", (ulong) reqp, ret); return ret; } -#endif /* version < v2.3.28 */ /* * Execute as many queued requests as possible for the specified queue. @@ -9402,8 +7756,7 @@ REQP reqp; int i; - ASC_DBG1(1, "asc_execute_queue: ascq %lx\n", (ulong) ascq); - ASC_ASSERT(advansys_interrupts_enabled() == ASC_FALSE); + ASC_DBG1(1, "asc_execute_queue: ascq 0x%lx\n", (ulong) ascq); /* * Execute queued commands for devices attached to * the current board in round-robin fashion. @@ -9417,7 +7770,10 @@ } else if (asc_execute_scsi_cmnd((Scsi_Cmnd *) reqp) == ASC_BUSY) { scan_tidmask &= ~ADV_TID_TO_TIDMASK(i); - /* Put the request back at front of the list. */ + /* + * The request returned ASC_BUSY. Enqueue at the front of + * target's waiting list to maintain correct ordering. + */ asc_enqueue(ascq, reqp, ASC_FRONT); } } @@ -9426,7 +7782,6 @@ return; } -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,0) #ifdef CONFIG_PROC_FS /* * asc_prt_board_devices() @@ -9507,7 +7862,7 @@ "BIOS either disabled or Pre-3.1. If it is pre-3.1, then a newer version\n"); ASC_PRT_NEXT(); len = asc_prt_line(cp, leftlen, -"can be found at the AdvanSys FTP site: ftp://ftp.advansys.com/pub\n"); +"can be found at the ConnectCom FTP site: ftp://ftp.connectcom.net/pub\n"); ASC_PRT_NEXT(); } else { major = (boardp->bios_version >> 12) & 0xF; @@ -9526,10 +7881,10 @@ if (major < 3 || (major <= 3 && minor < 1) || (major <= 3 && minor <= 1 && letter < ('I'- 'A'))) { len = asc_prt_line(cp, leftlen, -"Newer version of ROM BIOS is available at the AdvanSys FTP site:\n"); +"Newer version of ROM BIOS is available at the ConnectCom FTP site:\n"); ASC_PRT_NEXT(); len = asc_prt_line(cp, leftlen, -"ftp://ftp.advansys.com/pub\n"); +"ftp://ftp.connectcom.net/pub\n"); ASC_PRT_NEXT(); } } @@ -9695,7 +8050,7 @@ ASC_PRT_NEXT(); len = asc_prt_line(cp, leftlen, -" cntl %x, no_scam %x\n", +" cntl 0x%x, no_scam 0x%x\n", ep->cntl, ep->no_scam); ASC_PRT_NEXT(); @@ -9885,19 +8240,19 @@ if (adv_dvc_varp->chip_type == ADV_CHIP_ASC3550) { len = asc_prt_line(cp, leftlen, -" termination: %u (%s), bios_ctrl: %x\n", +" termination: %u (%s), bios_ctrl: 0x%x\n", ep_3550->termination, termstr, ep_3550->bios_ctrl); ASC_PRT_NEXT(); } else if (adv_dvc_varp->chip_type == ADV_CHIP_ASC38C0800) { len = asc_prt_line(cp, leftlen, -" termination: %u (%s), bios_ctrl: %x\n", +" termination: %u (%s), bios_ctrl: 0x%x\n", ep_38C0800->termination_lvd, termstr, ep_38C0800->bios_ctrl); ASC_PRT_NEXT(); } else { len = asc_prt_line(cp, leftlen, -" termination: %u (%s), bios_ctrl: %x\n", +" termination: %u (%s), bios_ctrl: 0x%x\n", ep_38C1600->termination_lvd, termstr, ep_38C1600->bios_ctrl); ASC_PRT_NEXT(); } @@ -10089,9 +8444,7 @@ int totlen; int len; int chip_scsi_id; -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) int i; -#endif /* version >= v1.3.89 */ boardp = ASC_BOARDP(shp); @@ -10104,39 +8457,31 @@ ASC_PRT_NEXT(); len = asc_prt_line(cp, leftlen, -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,89) -" host_busy %u, last_reset %u, max_id %u, max_lun %u\n", - shp->host_busy, shp->last_reset, shp->max_id, shp->max_lun); -#else /* version >= v1.3.89 */ " host_busy %u, last_reset %u, max_id %u, max_lun %u, max_channel %u\n", shp->host_busy, shp->last_reset, shp->max_id, shp->max_lun, shp->max_channel); -#endif /* version >= v1.3.89 */ ASC_PRT_NEXT(); - + len = asc_prt_line(cp, leftlen, -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,57) -" can_queue %d, this_id %d, sg_tablesize %u, cmd_per_lun %u\n", - shp->can_queue, shp->this_id, shp->sg_tablesize, shp->cmd_per_lun); -#else /* version >= v1.3.57 */ " unique_id %d, can_queue %d, this_id %d, sg_tablesize %u, cmd_per_lun %u\n", shp->unique_id, shp->can_queue, shp->this_id, shp->sg_tablesize, shp->cmd_per_lun); -#endif /* version >= v1.3.57 */ ASC_PRT_NEXT(); len = asc_prt_line(cp, leftlen, -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,57) -" unchecked_isa_dma %d, loaded_as_module %d\n", - shp->unchecked_isa_dma, shp->loaded_as_module); -#else /* version >= v1.3.57 */ " unchecked_isa_dma %d, use_clustering %d, loaded_as_module %d\n", shp->unchecked_isa_dma, shp->use_clustering, shp->loaded_as_module); -#endif /* version >= v1.3.57 */ ASC_PRT_NEXT(); - len = asc_prt_line(cp, leftlen, " flags %x, last_reset %x, jiffies %x\n", - boardp->flags, boardp->last_reset, jiffies); + len = asc_prt_line(cp, leftlen, +" flags 0x%x, last_reset 0x%x, jiffies 0x%x, asc_n_io_port 0x%x\n", + boardp->flags, boardp->last_reset, jiffies, boardp->asc_n_io_port); + ASC_PRT_NEXT(); + + /* 'shp->n_io_port' may be truncated because it is only one byte. */ + len = asc_prt_line(cp, leftlen, +" io_port 0x%x, n_io_port 0x%x\n", + shp->io_port, shp->n_io_port); ASC_PRT_NEXT(); if (ASC_NARROW_BOARD(boardp)) { @@ -10145,7 +8490,6 @@ chip_scsi_id = boardp->dvc_var.adv_dvc_var.chip_scsi_id; } -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) if (boardp->flags & ASC_SELECT_QUEUE_DEPTHS) { len = asc_prt_line(cp, leftlen, " queue_depth:"); ASC_PRT_NEXT(); @@ -10164,7 +8508,6 @@ len = asc_prt_line(cp, leftlen, "\n"); ASC_PRT_NEXT(); } -#endif /* version >= v1.3.89 */ return totlen; } @@ -10207,12 +8550,12 @@ ASC_PRT_NEXT(); len = asc_prt_line(cp, leftlen, -" chip_version %u, lib_version %x, lib_serial_no %u, mcode_date %x\n", +" chip_version %u, lib_version 0x%x, lib_serial_no %u, mcode_date 0x%x\n", c->chip_version, c->lib_version, c->lib_serial_no, c->mcode_date); ASC_PRT_NEXT(); len = asc_prt_line(cp, leftlen, -" mcode_version %x, err_code %u\n", +" mcode_version 0x%x, err_code %u\n", c->mcode_version, v->err_code); ASC_PRT_NEXT(); @@ -10400,14 +8743,14 @@ ASC_PRT_NEXT(); len = asc_prt_line(cp, leftlen, -" iop_base %lx, cable_detect: %X, err_code %u\n", +" iop_base 0x%lx, cable_detect: %X, err_code %u\n", v->iop_base, AdvReadWordRegister(iop_base, IOPW_SCSI_CFG1) & CABLE_DETECT, v->err_code); ASC_PRT_NEXT(); len = asc_prt_line(cp, leftlen, -" chip_version %u, lib_version %x, mcode_date %x, mcode_version %x\n", +" chip_version %u, lib_version 0x%x, mcode_date 0x%x, mcode_version 0x%x\n", c->chip_version, c->lib_version, c->mcode_date, c->mcode_version); ASC_PRT_NEXT(); @@ -10599,7 +8942,7 @@ } /* - * asc_proc_copy() + * asc_proc_copy() * * Copy proc information to a read buffer taking into account the current * read offset in the file and the remaining space in the read buffer. @@ -10609,13 +8952,13 @@ char *cp, int cplen) { int cnt = 0; - + ASC_DBG3(2, "asc_proc_copy: offset %d, advoffset %d, cplen %d\n", (unsigned) offset, (unsigned) advoffset, cplen); if (offset <= advoffset) { /* Read offset below current offset, copy everything. */ cnt = ASC_MIN(cplen, leftlen); - ASC_DBG3(2, "asc_proc_copy: curbuf %lx, cp %lx, cnt %d\n", + ASC_DBG3(2, "asc_proc_copy: curbuf 0x%lx, cp 0x%lx, cnt %d\n", (ulong) curbuf, (ulong) cp, cnt); memcpy(curbuf, cp, cnt); } else if (offset < advoffset + cplen) { @@ -10623,7 +8966,7 @@ cnt = (advoffset + cplen) - offset; cp = (cp + cplen) - cnt; cnt = ASC_MIN(cnt, leftlen); - ASC_DBG3(2, "asc_proc_copy: curbuf %lx, cp %lx, cnt %d\n", + ASC_DBG3(2, "asc_proc_copy: curbuf 0x%lx, cp 0x%lx, cnt %d\n", (ulong) curbuf, (ulong) cp, cnt); memcpy(curbuf, cp, cnt); } @@ -10662,7 +9005,6 @@ return ret; } #endif /* CONFIG_PROC_FS */ -#endif /* version >= v1.3.0 */ /* @@ -10678,56 +9020,33 @@ STATIC void DvcSleepMilliSecond(ADV_DCNT n) { -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,0) - ADV_DCNT i; -#endif /* version < v2.1.0 */ - ASC_DBG1(4, "DvcSleepMilliSecond: %lu\n", (ulong) n); -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,1,0) mdelay(n); -#else /* version < v2.1.0 */ - for (i = 0; i < n; i++) { - udelay(1000); - } -#endif /* version < v2.1.0 */ } -STATIC int +/* + * Currently and inline noop but leave as a placeholder. + * Leave DvcEnterCritical() as a noop placeholder. + */ +STATIC inline ulong DvcEnterCritical(void) { - int flags; - - save_flags(flags); - cli(); - return flags; + return 0; } -STATIC void -DvcLeaveCritical(int flags) +/* + * Critical sections are all protected by the board spinlock. + * Leave DvcLeaveCritical() as a noop placeholder. + */ +STATIC inline void +DvcLeaveCritical(ulong flags) { - restore_flags(flags); -} - -STATIC ADV_DCNT -DvcGetSGList(ASC_DVC_VAR *asc_dvc_sg, uchar *buf_addr, ADV_DCNT buf_len, - ASC_SG_HEAD *asc_sg_head_ptr) -{ - ADV_DCNT buf_size; - - buf_size = buf_len; - asc_sg_head_ptr->entry_cnt = 1; -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0) - asc_sg_head_ptr->sg_list[0].addr = (ADV_PADDR) buf_addr; -#else /* version >= v2.0.0 */ - asc_sg_head_ptr->sg_list[0].addr = virt_to_bus(buf_addr); -#endif /* version >= v2.0.0 */ - asc_sg_head_ptr->sg_list[0].bytes = buf_size; - return buf_size; + return; } /* * void - * DvcPutScsiQ(PortAddr iop_base, ushort s_addr, ushort *outbuf, int words) + * DvcPutScsiQ(PortAddr iop_base, ushort s_addr, uchar *outbuf, int words) * * Calling/Exit State: * none @@ -10736,23 +9055,24 @@ * Output an ASC_SCSI_Q structure to the chip */ STATIC void -DvcPutScsiQ(PortAddr iop_base, ushort s_addr, ushort *outbuf, int words) +DvcPutScsiQ(PortAddr iop_base, ushort s_addr, uchar *outbuf, int words) { int i; - ASC_DBG_PRT_HEX(2, "DvcPutScsiQ", (uchar *) outbuf, 2 * words); + ASC_DBG_PRT_HEX(2, "DvcPutScsiQ", outbuf, 2 * words); AscSetChipLramAddr(iop_base, s_addr); - for (i = 0; i < words; i++, outbuf++) { - if (i == 2 || i == 10) { + for (i = 0; i < 2 * words; i += 2) { + if (i == 4 || i == 20) { continue; } - AscSetChipLramDataNoSwap(iop_base, *outbuf); + outpw(iop_base + IOP_RAM_DATA, + ((ushort) outbuf[i + 1] << 8) | outbuf[i]); } } /* * void - * DvcGetQinfo(PortAddr iop_base, ushort s_addr, ushort *inbuf, int words) + * DvcGetQinfo(PortAddr iop_base, ushort s_addr, uchar *inbuf, int words) * * Calling/Exit State: * none @@ -10761,79 +9081,21 @@ * Input an ASC_QDONE_INFO structure from the chip */ STATIC void -DvcGetQinfo(PortAddr iop_base, ushort s_addr, ushort *inbuf, int words) +DvcGetQinfo(PortAddr iop_base, ushort s_addr, uchar *inbuf, int words) { int i; + ushort word; AscSetChipLramAddr(iop_base, s_addr); - for (i = 0; i < words; i++, inbuf++) { - if (i == 5) { + for (i = 0; i < 2 * words; i += 2) { + if (i == 10) { continue; } - *inbuf = AscGetChipLramDataNoSwap(iop_base); - } - ASC_DBG_PRT_HEX(2, "DvcGetQinfo", (uchar *) inbuf, 2 * words); -} - -/* - * void DvcOutPortWords(ushort iop_base, ushort &outbuf, int words) - * - * Calling/Exit State: - * none - * - * Description: - * output a buffer to an i/o port address - */ -STATIC void -DvcOutPortWords(ushort iop_base, ushort *outbuf, int words) -{ - int i; - - for (i = 0; i < words; i++, outbuf++) - outpw(iop_base, *outbuf); -} - -/* - * void DvcInPortWords(ushort iop_base, ushort &outbuf, int words) - * - * Calling/Exit State: - * none - * - * Description: - * input a buffer from an i/o port address - */ -STATIC void -DvcInPortWords(ushort iop_base, ushort *inbuf, int words) -{ - int i; - - for (i = 0; i < words; i++, inbuf++) - *inbuf = inpw(iop_base); -} - -/* - * void DvcOutPortDWords(PortAddr port, ADV_DCNT *pdw, int dwords) - * - * Calling/Exit State: - * none - * - * Description: - * output a buffer of 32-bit integers to an i/o port address in - * 16 bit integer units - */ -STATIC void -DvcOutPortDWords(PortAddr port, ADV_DCNT *pdw, int dwords) -{ - int i; - int words; - ushort *pw; - - pw = (ushort *) pdw; - words = dwords << 1; - for(i = 0; i < words; i++, pw++) { - outpw(port, *pw); + word = inpw(iop_base + IOP_RAM_DATA); + inbuf[i] = word & 0xff; + inbuf[i + 1] = (word >> 8) & 0xff; } - return; + ASC_DBG_PRT_HEX(2, "DvcGetQinfo", inbuf, 2 * words); } /* @@ -10842,24 +9104,10 @@ ASC_INITFUNC( STATIC uchar, DvcReadPCIConfigByte( - ASC_DVC_VAR *asc_dvc, + ASC_DVC_VAR *asc_dvc, ushort offset) ) { -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93) -#ifdef ASC_CONFIG_PCI - PCI_DATA pciData; - - pciData.bus = ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info); - pciData.slot = ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info); - pciData.func = ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info); - pciData.offset = offset; - pciData.type = pci_scan_method; - return asc_get_cfg_byte(&pciData); -#else /* ASC_CONFIG_PCI */ - return 0; -#endif /* ASC_CONFIG_PCI */ -#else /* version >= v2.1.93 */ #ifdef CONFIG_PCI uchar byte_data; pcibios_read_config_byte(ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info), @@ -10867,10 +9115,9 @@ ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info)), offset, &byte_data); return byte_data; -#else /* CONFIG_PCI */ +#else /* !defined(CONFIG_PCI) */ return 0; -#endif /* CONFIG_PCI */ -#endif /* version >= v2.1.93 */ +#endif /* !defined(CONFIG_PCI) */ } /* @@ -10879,30 +9126,17 @@ ASC_INITFUNC( STATIC void, DvcWritePCIConfigByte( - ASC_DVC_VAR *asc_dvc, - ushort offset, + ASC_DVC_VAR *asc_dvc, + ushort offset, uchar byte_data) ) { -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93) -#ifdef ASC_CONFIG_PCI - PCI_DATA pciData; - - pciData.bus = ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info); - pciData.slot = ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info); - pciData.func = ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info); - pciData.offset = offset; - pciData.type = pci_scan_method; - asc_put_cfg_byte(&pciData, byte_data); -#endif /* ASC_CONFIG_PCI */ -#else /* version >= v2.1.93 */ #ifdef CONFIG_PCI pcibios_write_config_byte(ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info), PCI_DEVFN(ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info), ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info)), offset, byte_data); #endif /* CONFIG_PCI */ -#endif /* version >= v2.1.93 */ } /* @@ -10978,14 +9212,10 @@ { ADV_PADDR paddr; -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,0,0) - paddr = (ADV_PADDR) vaddr; -#else /* version >= v2.0.0 */ paddr = virt_to_bus(vaddr); -#endif /* version >= v2.0.0 */ ASC_DBG4(4, - "DvcGetPhyAddr: vaddr 0x%lx, lenp 0x%lx *lenp %lu, paddr 0x%lx\n", + "DvcGetPhyAddr: vaddr 0x%lx, lenp 0x%lx *lenp %lu, paddr 0x%lx\n", (ulong) vaddr, (ulong) lenp, (ulong) *((ulong *) lenp), (ulong) paddr); return paddr; @@ -10997,24 +9227,10 @@ ASC_INITFUNC( STATIC uchar, DvcAdvReadPCIConfigByte( - ADV_DVC_VAR *asc_dvc, + ADV_DVC_VAR *asc_dvc, ushort offset) ) { -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93) -#ifdef ASC_CONFIG_PCI - PCI_DATA pciData; - - pciData.bus = ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info); - pciData.slot = ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info); - pciData.func = ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info); - pciData.offset = offset; - pciData.type = pci_scan_method; - return asc_get_cfg_byte(&pciData); -#else /* ASC_CONFIG_PCI */ - return 0; -#endif /* ASC_CONFIG_PCI */ -#else /* version >= v2.1.93 */ #ifdef CONFIG_PCI uchar byte_data; pcibios_read_config_byte(ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info), @@ -11025,7 +9241,6 @@ #else /* CONFIG_PCI */ return 0; #endif /* CONFIG_PCI */ -#endif /* version >= v2.1.93 */ } /* @@ -11034,30 +9249,19 @@ ASC_INITFUNC( STATIC void, DvcAdvWritePCIConfigByte( - ADV_DVC_VAR *asc_dvc, - ushort offset, + ADV_DVC_VAR *asc_dvc, + ushort offset, uchar byte_data) ) { -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,93) -#ifdef ASC_CONFIG_PCI - PCI_DATA pciData; - - pciData.bus = ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info); - pciData.slot = ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info); - pciData.func = ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info); - pciData.offset = offset; - pciData.type = pci_scan_method; - asc_put_cfg_byte(&pciData, byte_data); -#endif /* ASC_CONFIG_PCI */ -#else /* version >= v2.1.93 */ #ifdef CONFIG_PCI pcibios_write_config_byte(ASC_PCI_ID2BUS(asc_dvc->cfg->pci_slot_info), PCI_DEVFN(ASC_PCI_ID2DEV(asc_dvc->cfg->pci_slot_info), ASC_PCI_ID2FUNC(asc_dvc->cfg->pci_slot_info)), offset, byte_data); +#else /* CONFIG_PCI */ + return 0; #endif /* CONFIG_PCI */ -#endif /* version >= v2.1.93 */ } /* @@ -11093,21 +9297,16 @@ len = asc_prt_line(cp, leftlen, "\nLinux Driver Statistics for AdvanSys SCSI Host %d:\n", shp->host_no); ASC_PRT_NEXT(); - -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) - len = asc_prt_line(cp, leftlen, -" command %lu, queuecommand %lu, abort %lu, reset %lu, biosparam %lu\n", - s->command, s->queuecommand, s->abort, s->reset, s->biosparam); -#else /* version >= v2.3.28 */ + len = asc_prt_line(cp, leftlen, -" queuecommand %lu, eh_bus_reset %lu, biosparam %lu\n", - s->queuecommand, s->eh_bus_reset, s->biosparam); -#endif /* version >= v2.3.28 */ +" queuecommand %lu, reset %lu, biosparam %lu, interrupt %lu\n", + s->queuecommand, s->reset, s->biosparam, s->interrupt); ASC_PRT_NEXT(); len = asc_prt_line(cp, leftlen, -" interrupt %lu, callback %lu, done %lu\n", - s->interrupt, s->callback, s->done); +" callback %lu, done %lu, build_error %lu, build_noreq %lu, build_nosg %lu\n", + s->callback, s->done, s->build_error, s->adv_build_noreq, + s->adv_build_nosg); ASC_PRT_NEXT(); len = asc_prt_line(cp, leftlen, @@ -11115,17 +9314,6 @@ s->exe_noerror, s->exe_busy, s->exe_error, s->exe_unknown); ASC_PRT_NEXT(); - if (ASC_NARROW_BOARD(boardp)) { - len = asc_prt_line(cp, leftlen, -" build_error %lu\n", - s->build_error); - } else { - len = asc_prt_line(cp, leftlen, -" build_error %lu, build_noreq %lu, build_nosg %lu\n", - s->build_error, s->adv_build_noreq, s->adv_build_nosg); - } - ASC_PRT_NEXT(); - /* * Display data transfer statistics. */ @@ -11184,7 +9372,6 @@ return totlen; } - /* * asc_prt_target_stats() * @@ -11230,31 +9417,33 @@ } do { - if (active->q_tot_cnt[tgt_id] > 0 || waiting->q_tot_cnt[tgt_id] > 0) { - len = asc_prt_line(cp, leftlen, " target %d\n", tgt_id); - ASC_PRT_NEXT(); + if (active->q_tot_cnt[tgt_id] > 0 || waiting->q_tot_cnt[tgt_id] > 0) { + len = asc_prt_line(cp, leftlen, " target %d\n", tgt_id); + ASC_PRT_NEXT(); - len = asc_prt_line(cp, leftlen, + len = asc_prt_line(cp, leftlen, " active: cnt [cur %d, max %d, tot %u], time [min %d, max %d, avg %lu.%01lu]\n", - active->q_cur_cnt[tgt_id], active->q_max_cnt[tgt_id], - active->q_tot_cnt[tgt_id], - active->q_min_tim[tgt_id], active->q_max_tim[tgt_id], - (active->q_tot_cnt[tgt_id] == 0) ? 0 : - (active->q_tot_tim[tgt_id]/active->q_tot_cnt[tgt_id]), - (active->q_tot_cnt[tgt_id] == 0) ? 0 : - ASC_TENTHS(active->q_tot_tim[tgt_id], active->q_tot_cnt[tgt_id])); - ASC_PRT_NEXT(); + active->q_cur_cnt[tgt_id], active->q_max_cnt[tgt_id], + active->q_tot_cnt[tgt_id], + active->q_min_tim[tgt_id], active->q_max_tim[tgt_id], + (active->q_tot_cnt[tgt_id] == 0) ? 0 : + (active->q_tot_tim[tgt_id]/active->q_tot_cnt[tgt_id]), + (active->q_tot_cnt[tgt_id] == 0) ? 0 : + ASC_TENTHS(active->q_tot_tim[tgt_id], + active->q_tot_cnt[tgt_id])); + ASC_PRT_NEXT(); - len = asc_prt_line(cp, leftlen, + len = asc_prt_line(cp, leftlen, " waiting: cnt [cur %d, max %d, tot %u], time [min %u, max %u, avg %lu.%01lu]\n", - waiting->q_cur_cnt[tgt_id], waiting->q_max_cnt[tgt_id], - waiting->q_tot_cnt[tgt_id], - waiting->q_min_tim[tgt_id], waiting->q_max_tim[tgt_id], - (waiting->q_tot_cnt[tgt_id] == 0) ? 0 : - (waiting->q_tot_tim[tgt_id]/waiting->q_tot_cnt[tgt_id]), - (waiting->q_tot_cnt[tgt_id] == 0) ? 0 : - ASC_TENTHS(waiting->q_tot_tim[tgt_id], waiting->q_tot_cnt[tgt_id])); - ASC_PRT_NEXT(); + waiting->q_cur_cnt[tgt_id], waiting->q_max_cnt[tgt_id], + waiting->q_tot_cnt[tgt_id], + waiting->q_min_tim[tgt_id], waiting->q_max_tim[tgt_id], + (waiting->q_tot_cnt[tgt_id] == 0) ? 0 : + (waiting->q_tot_tim[tgt_id]/waiting->q_tot_cnt[tgt_id]), + (waiting->q_tot_cnt[tgt_id] == 0) ? 0 : + ASC_TENTHS(waiting->q_tot_tim[tgt_id], + waiting->q_tot_cnt[tgt_id])); + ASC_PRT_NEXT(); } } while (0); @@ -11267,25 +9456,31 @@ /* * asc_prt_scsi_host() */ -STATIC void +STATIC void asc_prt_scsi_host(struct Scsi_Host *s) { asc_board_t *boardp; boardp = ASC_BOARDP(s); - printk("Scsi_Host at addr %lx\n", (ulong) s); + printk("Scsi_Host at addr 0x%lx\n", (ulong) s); printk( -" next %lx, extra_bytes %u, host_busy %u, host_no %d, last_reset %d,\n", +" next 0x%lx, extra_bytes %u, host_busy %u, host_no %d, last_reset %d,\n", (ulong) s->next, s->extra_bytes, s->host_busy, s->host_no, (unsigned) s->last_reset); +#if ASC_LINUX_KERNEL24 printk( -" host_queue %lx, hostt %lx, block %lx,\n", +" host_queue 0x%lx, hostt 0x%lx\n", + (ulong) s->host_queue, (ulong) s->hostt); +#elif ASC_LINUX_KERNEL22 + printk( +" host_queue 0x%lx, hostt 0x%lx, block 0x%lx,\n", (ulong) s->host_queue, (ulong) s->hostt, (ulong) s->block); +#endif printk( -" base %lu, io_port %lu, n_io_port %u, irq %d,\n", +" base 0x%lx, io_port 0x%lx, n_io_port %u, irq 0x%x,\n", (ulong) s->base, (ulong) s->io_port, s->n_io_port, s->irq); printk( @@ -11309,49 +9504,49 @@ /* * asc_prt_scsi_cmnd() */ -STATIC void +STATIC void asc_prt_scsi_cmnd(Scsi_Cmnd *s) { - printk("Scsi_Cmnd at addr %lx\n", (ulong) s); + printk("Scsi_Cmnd at addr 0x%lx\n", (ulong) s); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0) - printk( -" host %x, device %x, target %u, lun %u\n", - (unsigned) s->host, (unsigned) s->device, s->target, s->lun); -#else /* version >= v1.3.0 */ printk( -" host %lx, device %lx, target %u, lun %u, channel %u,\n", +" host 0x%lx, device 0x%lx, target %u, lun %u, channel %u,\n", (ulong) s->host, (ulong) s->device, s->target, s->lun, s->channel); -#endif /* version >= v1.3.0 */ asc_prt_hex(" CDB", s->cmnd, s->cmd_len); +#if ASC_LINUX_KERNEL24 + printk ( +"sc_data_direction %u, resid %d\n", + s->sc_data_direction, s->resid); +#endif + printk( -" use_sg %u, sglist_len %u, abort_reason %x\n", +" use_sg %u, sglist_len %u, abort_reason 0x%x\n", s->use_sg, s->sglist_len, s->abort_reason); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,89) printk( -" retries %d, allowed %d\n", - s->retries, s->allowed); -#else /* version >= v1.3.89 */ - printk( -" serial_number %x, serial_number_at_timeout %x, retries %d, allowed %d\n", +" serial_number 0x%x, serial_number_at_timeout 0x%x, retries %d, allowed %d\n", (unsigned) s->serial_number, (unsigned) s->serial_number_at_timeout, s->retries, s->allowed); -#endif /* version >= v1.3.89 */ printk( " timeout_per_command %d, timeout_total %d, timeout %d\n", s->timeout_per_command, s->timeout_total, s->timeout); +#if ASC_LINUX_KERNEL24 + printk( +" internal_timeout %u, flags %u\n", + s->internal_timeout, s->flags); +#elif ASC_LINUX_KERNEL22 printk( " internal_timeout %u, flags %u, this_count %d\n", - s->internal_timeout, s->flags, s->this_count); + s->internal_timeout, s->flags,s->this_count); +#endif printk( -" scsi_done %lx, done %lx, host_scribble %lx, result %x\n", +" scsi_done 0x%lx, done 0x%lx, host_scribble 0x%lx, result 0x%x\n", (ulong) s->scsi_done, (ulong) s->done, (ulong) s->host_scribble, s->result); @@ -11363,57 +9558,59 @@ /* * asc_prt_asc_dvc_var() */ -STATIC void +STATIC void asc_prt_asc_dvc_var(ASC_DVC_VAR *h) { - printk("ASC_DVC_VAR at addr %lx\n", (ulong) h); + printk("ASC_DVC_VAR at addr 0x%lx\n", (ulong) h); printk( -" iop_base %x, err_code %x, dvc_cntl %x, bug_fix_cntl %d,\n", +" iop_base 0x%x, err_code 0x%x, dvc_cntl 0x%x, bug_fix_cntl %d,\n", h->iop_base, h->err_code, h->dvc_cntl, h->bug_fix_cntl); printk( -" bus_type %d, isr_callback %lx, exe_callback %lx, init_sdtr %x,\n", +" bus_type %d, isr_callback 0x%lx, exe_callback 0x%lx, init_sdtr 0x%x,\n", h->bus_type, (ulong) h->isr_callback, (ulong) h->exe_callback, (unsigned) h->init_sdtr); printk( -" sdtr_done %x, use_tagged_qng %x, unit_not_ready %x, chip_no %x,\n", +" sdtr_done 0x%x, use_tagged_qng 0x%x, unit_not_ready 0x%x, chip_no 0x%x,\n", (unsigned) h->sdtr_done, (unsigned) h->use_tagged_qng, (unsigned) h->unit_not_ready, (unsigned) h->chip_no); - + printk( -" queue_full_or_busy %x, start_motor %x, scsi_reset_wait %x, irq_no %x,\n", +" queue_full_or_busy 0x%x, start_motor 0x%x, scsi_reset_wait %u,\n", (unsigned) h->queue_full_or_busy, (unsigned) h->start_motor, - (unsigned) h->scsi_reset_wait, (unsigned) h->irq_no); + (unsigned) h->scsi_reset_wait); printk( -" is_in_int %x, max_total_qng %x, cur_total_qng %x, in_critical_cnt %x,\n", +" is_in_int %u, max_total_qng %u, cur_total_qng %u, in_critical_cnt %u,\n", (unsigned) h->is_in_int, (unsigned) h->max_total_qng, (unsigned) h->cur_total_qng, (unsigned) h->in_critical_cnt); printk( -" last_q_shortage %x, init_state %x, no_scam %x, pci_fix_asyn_xfer %x,\n", +" last_q_shortage %u, init_state 0x%x, no_scam 0x%x, pci_fix_asyn_xfer 0x%x,\n", (unsigned) h->last_q_shortage, (unsigned) h->init_state, (unsigned) h->no_scam, (unsigned) h->pci_fix_asyn_xfer); printk( -" cfg %lx\n", - (ulong) h->cfg); +" cfg 0x%lx, irq_no 0x%x\n", + (ulong) h->cfg, (unsigned) h->irq_no); } /* * asc_prt_asc_dvc_cfg() */ -STATIC void +STATIC void asc_prt_asc_dvc_cfg(ASC_DVC_CFG *h) { - printk("ASC_DVC_CFG at addr %lx\n", (ulong) h); + printk("ASC_DVC_CFG at addr 0x%lx\n", (ulong) h); printk( -" can_tagged_qng %x, cmd_qng_enabled %x, disc_enable %x, sdtr_enable %x,\n", - h->can_tagged_qng, h->cmd_qng_enabled, h->disc_enable, - h->sdtr_enable); +" can_tagged_qng 0x%x, cmd_qng_enabled 0x%x,\n", + h->can_tagged_qng, h->cmd_qng_enabled); + printk( +" disc_enable 0x%x, sdtr_enable 0x%x,\n", + h->disc_enable, h->sdtr_enable); printk( " chip_scsi_id %d, isa_dma_speed %d, isa_dma_channel %d, chip_version %d,\n", @@ -11421,48 +9618,49 @@ h->chip_version); printk( -" pci_device_id %d, lib_serial_no %x, lib_version %x, mcode_date %x,\n", +" pci_device_id %d, lib_serial_no %u, lib_version %u, mcode_date 0x%x,\n", h->pci_device_id, h->lib_serial_no, h->lib_version, h->mcode_date); printk( -" mcode_version %d, overrun_buf %lx\n", +" mcode_version %d, overrun_buf 0x%lx\n", h->mcode_version, (ulong) h->overrun_buf); } /* * asc_prt_asc_scsi_q() */ -STATIC void +STATIC void asc_prt_asc_scsi_q(ASC_SCSI_Q *q) { ASC_SG_HEAD *sgp; int i; - printk("ASC_SCSI_Q at addr %lx\n", (ulong) q); + printk("ASC_SCSI_Q at addr 0x%lx\n", (ulong) q); printk( -" target_ix %u, target_lun %u, srb_ptr %x, tag_code %u,\n", +" target_ix 0x%x, target_lun %u, srb_ptr 0x%lx, tag_code 0x%x,\n", q->q2.target_ix, q->q1.target_lun, - (unsigned) q->q2.srb_ptr, q->q2.tag_code); + (ulong) q->q2.srb_ptr, q->q2.tag_code); printk( -" data_addr %lx, data_cnt %lu, sense_addr %lx, sense_len %u,\n", - (ulong) q->q1.data_addr, (ulong) q->q1.data_cnt, - (ulong) q->q1.sense_addr, q->q1.sense_len); +" data_addr 0x%lx, data_cnt %lu, sense_addr 0x%lx, sense_len %u,\n", + (ulong) le32_to_cpu(q->q1.data_addr), + (ulong) le32_to_cpu(q->q1.data_cnt), + (ulong) le32_to_cpu(q->q1.sense_addr), q->q1.sense_len); printk( -" cdbptr %lx, cdb_len %u, sg_head %lx, sg_queue_cnt %u\n", +" cdbptr 0x%lx, cdb_len %u, sg_head 0x%lx, sg_queue_cnt %u\n", (ulong) q->cdbptr, q->q2.cdb_len, (ulong) q->sg_head, q->q1.sg_queue_cnt); if (q->sg_head) { sgp = q->sg_head; - printk("ASC_SG_HEAD at addr %lx\n", (ulong) sgp); + printk("ASC_SG_HEAD at addr 0x%lx\n", (ulong) sgp); printk(" entry_cnt %u, queue_cnt %u\n", sgp->entry_cnt, sgp->queue_cnt); for (i = 0; i < sgp->entry_cnt; i++) { - printk(" [%u]: addr %lx, bytes %lu\n", - i, (ulong) sgp->sg_list[i].addr, - (ulong) sgp->sg_list[i].bytes); + printk(" [%u]: addr 0x%lx, bytes %lu\n", + i, (ulong) le32_to_cpu(sgp->sg_list[i].addr), + (ulong) le32_to_cpu(sgp->sg_list[i].bytes)); } } @@ -11471,17 +9669,17 @@ /* * asc_prt_asc_qdone_info() */ -STATIC void +STATIC void asc_prt_asc_qdone_info(ASC_QDONE_INFO *q) { - printk("ASC_QDONE_INFO at addr %lx\n", (ulong) q); + printk("ASC_QDONE_INFO at addr 0x%lx\n", (ulong) q); printk( -" srb_ptr %x, target_ix %u, cdb_len %u, tag_code %u, done_stat %x\n", - (unsigned) q->d2.srb_ptr, q->d2.target_ix, q->d2.cdb_len, - q->d2.tag_code, q->d3.done_stat); +" srb_ptr 0x%lx, target_ix %u, cdb_len %u, tag_code %u,\n", + (ulong) q->d2.srb_ptr, q->d2.target_ix, q->d2.cdb_len, + q->d2.tag_code); printk( -" host_stat %x, scsi_stat %x, scsi_msg %x\n", - q->d3.host_stat, q->d3.scsi_stat, q->d3.scsi_msg); +" done_stat 0x%x, host_stat 0x%x, scsi_stat 0x%x, scsi_msg 0x%x\n", + q->d3.done_stat, q->d3.host_stat, q->d3.scsi_stat, q->d3.scsi_msg); } /* @@ -11489,7 +9687,7 @@ * * Display an ADV_DVC_VAR structure. */ -STATIC void +STATIC void asc_prt_adv_dvc_var(ADV_DVC_VAR *h) { printk(" ADV_DVC_VAR at addr 0x%lx\n", (ulong) h); @@ -11509,12 +9707,12 @@ (unsigned) h->scsi_reset_wait, (unsigned) h->irq_no); printk( -" max_host_qng %x, max_dvc_qng %x, carr_freelist %lxn\n", +" max_host_qng %u, max_dvc_qng %u, carr_freelist 0x%lxn\n", (unsigned) h->max_host_qng, (unsigned) h->max_dvc_qng, (ulong) h->carr_freelist); printk( -" icq_sp %lx, irq_sp %lx\n", +" icq_sp 0x%lx, irq_sp 0x%lx\n", (ulong) h->icq_sp, (ulong) h->irq_sp); printk( @@ -11522,7 +9720,7 @@ (unsigned) h->no_scam, (unsigned) h->tagqng_able); printk( -" chip_scsi_id 0x%x, cfg %lx\n", +" chip_scsi_id 0x%x, cfg 0x%lx\n", (unsigned) h->chip_scsi_id, (ulong) h->cfg); } @@ -11531,7 +9729,7 @@ * * Display an ADV_DVC_CFG structure. */ -STATIC void +STATIC void asc_prt_adv_dvc_cfg(ADV_DVC_CFG *h) { printk(" ADV_DVC_CFG at addr 0x%lx\n", (ulong) h); @@ -11545,7 +9743,7 @@ h->chip_version, h->mcode_date); printk( -" mcode_version 0x%x, pci_device_id 0x%x, lib_version 0x%x\n", +" mcode_version 0x%x, pci_device_id 0x%x, lib_version %u\n", h->mcode_version, h->pci_device_id, h->lib_version); printk( @@ -11558,38 +9756,38 @@ * * Display an ADV_SCSI_REQ_Q structure. */ -STATIC void +STATIC void asc_prt_adv_scsi_req_q(ADV_SCSI_REQ_Q *q) { int sg_blk_cnt; struct asc_sg_block *sg_ptr; - printk("ADV_SCSI_REQ_Q at addr %lx\n", (ulong) q); + printk("ADV_SCSI_REQ_Q at addr 0x%lx\n", (ulong) q); printk( " target_id %u, target_lun %u, srb_ptr 0x%lx, a_flag 0x%x\n", q->target_id, q->target_lun, (ulong) q->srb_ptr, q->a_flag); printk(" cntl 0x%x, data_addr 0x%lx, vdata_addr 0x%lx\n", - q->cntl, (ulong)le32_to_cpu(q->data_addr), (ulong) q->vdata_addr); + q->cntl, (ulong) le32_to_cpu(q->data_addr), (ulong) q->vdata_addr); printk( " data_cnt %lu, sense_addr 0x%lx, sense_len %u,\n", - (ulong) le32_to_cpu(q->data_cnt), (ulong) le32_to_cpu(q->sense_addr), - q->sense_len); + (ulong) le32_to_cpu(q->data_cnt), + (ulong) le32_to_cpu(q->sense_addr), q->sense_len); printk( " cdb_len %u, done_status 0x%x, host_status 0x%x, scsi_status 0x%x\n", q->cdb_len, q->done_status, q->host_status, q->scsi_status); printk( -" sg_working_ix %x, target_cmd %u\n", +" sg_working_ix 0x%x, target_cmd %u\n", q->sg_working_ix, q->target_cmd); printk( -" scsiq_rptr %lx, sg_real_addr %lx, sg_list_ptr %lx\n", - (ulong) le32_to_cpu(q->scsiq_rptr), (ulong) le32_to_cpu(q->sg_real_addr), - (ulong) q->sg_list_ptr); +" scsiq_rptr 0x%lx, sg_real_addr 0x%lx, sg_list_ptr 0x%lx\n", + (ulong) le32_to_cpu(q->scsiq_rptr), + (ulong) le32_to_cpu(q->sg_real_addr), (ulong) q->sg_list_ptr); /* Display the request's ADV_SG_BLOCK structures. */ if (q->sg_list_ptr != NULL) @@ -11624,9 +9822,9 @@ { int i; - printk(" ASC_SG_BLOCK at addr %lx (sgblockno %d)\n", + printk(" ASC_SG_BLOCK at addr 0x%lx (sgblockno %d)\n", (ulong) b, sgblockno); - printk(" sg_cnt %u, sg_ptr %lx\n", + printk(" sg_cnt %u, sg_ptr 0x%lx\n", b->sg_cnt, (ulong) le32_to_cpu(b->sg_ptr)); ASC_ASSERT(b->sg_cnt <= NO_OF_SG_PER_BLOCK); if (b->sg_ptr != 0) @@ -11634,7 +9832,7 @@ ASC_ASSERT(b->sg_cnt == NO_OF_SG_PER_BLOCK); } for (i = 0; i < b->sg_cnt; i++) { - printk(" [%u]: sg_addr %lx, sg_count %lx\n", + printk(" [%u]: sg_addr 0x%lx, sg_count 0x%lx\n", i, (ulong) b->sg_list[i].sg_addr, (ulong) b->sg_list[i].sg_count); } } @@ -11642,10 +9840,10 @@ /* * asc_prt_hex() * - * Print hexadecimal output in 4 byte groupings 32 bytes + * Print hexadecimal output in 4 byte groupings 32 bytes * or 8 double-words per line. */ -STATIC void +STATIC void asc_prt_hex(char *f, uchar *s, int l) { int i; @@ -11656,7 +9854,7 @@ printk("%s: (%d bytes)\n", f, l); for (i = 0; i < l; i += 32) { - + /* Display a maximum of 8 double-words per line. */ if ((k = (l - i) / 4) >= 8) { k = 8; @@ -11697,27 +9895,6 @@ } #endif /* ADVANSYS_DEBUG */ -#ifdef ADVANSYS_ASSERT -/* - * advansys_interrupts_enabled() - * - * Return 1 if interrupts are enabled, otherwise return 0. - */ -STATIC int -advansys_interrupts_enabled(void) -{ - int flags; - - save_flags(flags); - if (flags & 0x0200) { - return ASC_TRUE; - } else { - return ASC_FALSE; - } -} -#endif /* ADVANSYS_ASSERT */ - - /* * --- Asc Library Functions */ @@ -11825,42 +10002,47 @@ return (0); } -ASC_INITFUNC( -STATIC ASC_DCNT, +STATIC ASC_DCNT AscLoadMicroCode( PortAddr iop_base, ushort s_addr, - ushort *mcode_buf, + uchar *mcode_buf, ushort mcode_size ) -) { ASC_DCNT chksum; ushort mcode_word_size; ushort mcode_chksum; + /* Write the microcode buffer starting at LRAM address 0. */ mcode_word_size = (ushort) (mcode_size >> 1); AscMemWordSetLram(iop_base, s_addr, 0, mcode_word_size); - AscMemWordCopyToLram(iop_base, s_addr, mcode_buf, mcode_word_size); + AscMemWordCopyPtrToLram(iop_base, s_addr, mcode_buf, mcode_word_size); + chksum = AscMemSumLramWord(iop_base, s_addr, mcode_word_size); + ASC_DBG1(1, "AscLoadMicroCode: chksum 0x%lx\n", (ulong) chksum); mcode_chksum = (ushort) AscMemSumLramWord(iop_base, - (ushort) ASC_CODE_SEC_BEG, + (ushort) ASC_CODE_SEC_BEG, (ushort) ((mcode_size - s_addr - (ushort) ASC_CODE_SEC_BEG) / 2)); + ASC_DBG1(1, "AscLoadMicroCode: mcode_chksum 0x%lx\n", + (ulong) mcode_chksum); AscWriteLramWord(iop_base, ASCV_MCODE_CHKSUM_W, mcode_chksum); AscWriteLramWord(iop_base, ASCV_MCODE_SIZE_W, mcode_size); return (chksum); } -ASC_INITFUNC( -STATIC int, +STATIC int AscFindSignature( PortAddr iop_base ) -) { ushort sig_word; + ASC_DBG2(1, "AscFindSignature: AscGetChipSignatureByte(0x%x) 0x%x\n", + iop_base, AscGetChipSignatureByte(iop_base)); if (AscGetChipSignatureByte(iop_base) == (uchar) ASC_1000_ID1B) { + ASC_DBG2(1, "AscFindSignature: AscGetChipSignatureWord(0x%x) 0x%x\n", + iop_base, AscGetChipSignatureWord(iop_base)); sig_word = AscGetChipSignatureWord(iop_base); if ((sig_word == (ushort) ASC_1000_ID0W) || (sig_word == (ushort) ASC_1000_ID0W_FIX)) { @@ -11935,11 +10117,11 @@ iop_base = _asc_def_iop_base[i]; if (check_region(iop_base, ASC_IOADR_GAP) != 0) { ASC_DBG1(1, - "AscSearchIOPortAddr11: check_region() failed I/O port %x\n", + "AscSearchIOPortAddr11: check_region() failed I/O port 0x%x\n", iop_base); continue; } - ASC_DBG1(1, "AscSearchIOPortAddr11: probing I/O port %x\n", iop_base); + ASC_DBG1(1, "AscSearchIOPortAddr11: probing I/O port 0x%x\n", iop_base); if (AscFindSignature(iop_base)) { return (iop_base); } @@ -12067,7 +10249,7 @@ } #endif /* CONFIG_ISA */ -STATIC int +STATIC int AscIsrChipHalted( ASC_DVC_VAR *asc_dvc ) @@ -12126,10 +10308,10 @@ return (0); } else if (int_halt_code == ASC_HALT_EXTMSG_IN) { - AscMemWordCopyFromLram(iop_base, + AscMemWordCopyPtrFromLram(iop_base, ASCV_MSGIN_BEG, - (ushort *) & ext_msg, - (ushort) (sizeof (EXT_MSG) >> 1)); + (uchar *) &ext_msg, + sizeof(EXT_MSG) >> 1); if (ext_msg.msg_type == MS_EXTEND && ext_msg.msg_req == MS_SDTR_CODE && @@ -12203,10 +10385,10 @@ ext_msg.msg_len == MS_WDTR_LEN) { ext_msg.wdtr_width = 0; - AscMemWordCopyToLram(iop_base, + AscMemWordCopyPtrToLram(iop_base, ASCV_MSGOUT_BEG, - (ushort *) & ext_msg, - (ushort) (sizeof (EXT_MSG) >> 1)); + (uchar *) &ext_msg, + sizeof(EXT_MSG) >> 1); q_cntl |= QC_MSG_OUT; AscWriteLramByte(iop_base, (ushort) (halt_q_addr + (ushort) ASC_SCSIQ_B_CNTL), @@ -12216,10 +10398,10 @@ } else { ext_msg.msg_type = M1_MSG_REJECT; - AscMemWordCopyToLram(iop_base, + AscMemWordCopyPtrToLram(iop_base, ASCV_MSGOUT_BEG, - (ushort *) & ext_msg, - (ushort) (sizeof (EXT_MSG) >> 1)); + (uchar *) &ext_msg, + sizeof(EXT_MSG) >> 1); q_cntl |= QC_MSG_OUT; AscWriteLramByte(iop_base, (ushort) (halt_q_addr + (ushort) ASC_SCSIQ_B_CNTL), @@ -12279,10 +10461,10 @@ return (0); } else if (int_halt_code == ASC_HALT_SDTR_REJECTED) { - AscMemWordCopyFromLram(iop_base, + AscMemWordCopyPtrFromLram(iop_base, ASCV_MSGOUT_BEG, - (ushort *) & out_msg, - (ushort) (sizeof (EXT_MSG) >> 1)); + (uchar *) &out_msg, + sizeof(EXT_MSG) >> 1); if ((out_msg.msg_type == MS_EXTEND) && (out_msg.msg_len == MS_SDTR_LEN) && @@ -12337,7 +10519,9 @@ } AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0); return (0); - } else if (int_halt_code == ASC_HALT_HOST_COPY_SG_LIST_TO_RISC) + } +#if CC_VERY_LONG_SG_LIST + else if (int_halt_code == ASC_HALT_HOST_COPY_SG_LIST_TO_RISC) { uchar q_no; ushort q_addr; @@ -12461,16 +10645,15 @@ } scsi_sg_q.q_no = next_qp; - AscMemWordCopyToLram(iop_base, - (ushort) (q_addr+ASC_SCSIQ_SGHD_CPY_BEG), - (ushort *) &scsi_sg_q, - (ushort) (sizeof(ASC_SG_LIST_Q) >> 1)); - - AscMemDWordCopyToLram( iop_base, - (ushort) (q_addr+ASC_SGQ_LIST_BEG ), - (ADV_PADDR *) - &sg_head->sg_list[scsiq->next_sg_index], - (ushort) sg_list_dwords); + AscMemWordCopyPtrToLram(iop_base, + q_addr + ASC_SCSIQ_SGHD_CPY_BEG, + (uchar *) &scsi_sg_q, + sizeof(ASC_SG_LIST_Q) >> 1); + + AscMemDWordCopyPtrToLram(iop_base, + q_addr + ASC_SGQ_LIST_BEG, + (uchar *) &sg_head->sg_list[scsiq->next_sg_index], + sg_list_dwords); scsiq->next_sg_index += ASC_SG_LIST_PER_Q; @@ -12496,6 +10679,7 @@ AscWriteLramWord(iop_base, ASCV_HALTCODE_W, 0); return(0); } +#endif /* CC_VERY_LONG_SG_LIST */ return (0); } @@ -12511,9 +10695,10 @@ uchar sg_queue_cnt; DvcGetQinfo(iop_base, - (ushort) (q_addr + (ushort) ASC_SCSIQ_DONE_INFO_BEG), - (ushort *) scsiq, - (ushort) ((sizeof (ASC_SCSIQ_2) + sizeof (ASC_SCSIQ_3)) / 2)); + q_addr + ASC_SCSIQ_DONE_INFO_BEG, + (uchar *) scsiq, + (sizeof (ASC_SCSIQ_2) + sizeof (ASC_SCSIQ_3)) / 2); + _val = AscReadLramWord(iop_base, (ushort) (q_addr + (ushort) ASC_SCSIQ_B_STATUS)); scsiq->q_status = (uchar) _val; @@ -12777,7 +10962,8 @@ return (int_pending); } -STATIC uchar _asc_mcode_buf[] ASC_INITDATA = +/* Microcode buffer is kept after initialization for error recovery. */ +STATIC uchar _asc_mcode_buf[] = { 0x01, 0x03, 0x01, 0x19, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, @@ -12925,8 +11111,8 @@ 0xF1, 0xC7, 0x41, 0x23, 0xF8, 0x88, 0x11, 0x23, 0xA1, 0x01, 0x04, 0x23, 0xA0, 0x01, 0xE6, 0x84, }; -STATIC ushort _asc_mcode_size ASC_INITDATA = sizeof(_asc_mcode_buf); -STATIC ADV_DCNT _asc_mcode_chksum ASC_INITDATA = 0x012C453FUL; +STATIC ushort _asc_mcode_size = sizeof(_asc_mcode_buf); +STATIC ADV_DCNT _asc_mcode_chksum = 0x012C453FUL; #define ASC_SYN_OFFSET_ONE_DISABLE_LIST 16 STATIC uchar _syn_offset_one_disable_cmd[ASC_SYN_OFFSET_ONE_DISABLE_LIST] = @@ -12956,7 +11142,7 @@ ) { PortAddr iop_base; - int last_int_level; + ulong last_int_level; int sta; int n_q_required; int disable_syn_offset_one_fix; @@ -13019,6 +11205,7 @@ if (sg_entry_cnt > ASC_MAX_SG_LIST) { asc_dvc->in_critical_cnt--; + DvcLeaveCritical(last_int_level); return(ERR); } #endif /* !CC_VERY_LONG_SG_LIST */ @@ -13036,10 +11223,10 @@ if (scsiq->q1.cntl & QC_SG_HEAD) { data_cnt = 0; for (i = 0; i < sg_entry_cnt; i++) { - data_cnt += (ADV_DCNT) sg_head->sg_list[i].bytes; + data_cnt += (ADV_DCNT) le32_to_cpu(sg_head->sg_list[i].bytes); } } else { - data_cnt = scsiq->q1.data_cnt; + data_cnt = le32_to_cpu(scsiq->q1.data_cnt); } if (data_cnt != 0UL) { if (data_cnt < 512UL) { @@ -13071,23 +11258,27 @@ if ((scsi_cmd == SCSICMD_Read6) || (scsi_cmd == SCSICMD_Read10)) { addr = - (ADV_PADDR) - sg_head->sg_list[sg_entry_cnt_minus_one].addr + - (ADV_DCNT) - sg_head->sg_list[sg_entry_cnt_minus_one].bytes; + (ADV_PADDR) le32_to_cpu( + sg_head->sg_list[sg_entry_cnt_minus_one].addr) + + (ADV_DCNT) le32_to_cpu( + sg_head->sg_list[sg_entry_cnt_minus_one].bytes); extra_bytes = (uchar) ((ushort) addr & 0x0003); if ((extra_bytes != 0) && ((scsiq->q2.tag_code & ASC_TAG_FLAG_EXTRA_BYTES) == 0)) { scsiq->q2.tag_code |= ASC_TAG_FLAG_EXTRA_BYTES; scsiq->q1.extra_bytes = extra_bytes; - sg_head->sg_list[sg_entry_cnt_minus_one].bytes -= - (ASC_DCNT) extra_bytes; + data_cnt = le32_to_cpu( + sg_head->sg_list[sg_entry_cnt_minus_one].bytes); + data_cnt -= (ASC_DCNT) extra_bytes; + sg_head->sg_list[sg_entry_cnt_minus_one].bytes = + cpu_to_le32(data_cnt); } } } } sg_head->entry_to_copy = sg_head->entry_cnt; +#if CC_VERY_LONG_SG_LIST /* * Set the sg_entry_cnt to the maximum possible. The rest of * the SG elements will be copied when the RISC completes the @@ -13097,6 +11288,7 @@ { sg_entry_cnt = ASC_MAX_SG_LIST; } +#endif /* CC_VERY_LONG_SG_LIST */ n_q_required = AscSgListToQueue(sg_entry_cnt); if ((AscGetNumOfFreeQueue(asc_dvc, target_ix, n_q_required) >= (uint) n_q_required) || ((scsiq->q1.cntl & QC_URGENT) != 0)) { @@ -13115,14 +11307,17 @@ if (asc_dvc->bug_fix_cntl & ASC_BUG_FIX_IF_NOT_DWB) { if ((scsi_cmd == SCSICMD_Read6) || (scsi_cmd == SCSICMD_Read10)) { - addr = scsiq->q1.data_addr + scsiq->q1.data_cnt; + addr = le32_to_cpu(scsiq->q1.data_addr) + + le32_to_cpu(scsiq->q1.data_cnt); extra_bytes = (uchar) ((ushort) addr & 0x0003); if ((extra_bytes != 0) && ((scsiq->q2.tag_code & ASC_TAG_FLAG_EXTRA_BYTES) == 0)) { - if (((ushort) scsiq->q1.data_cnt & 0x01FF) == 0) { + data_cnt = le32_to_cpu(scsiq->q1.data_cnt); + if (((ushort) data_cnt & 0x01FF) == 0) { scsiq->q2.tag_code |= ASC_TAG_FLAG_EXTRA_BYTES; - scsiq->q1.data_cnt -= (ASC_DCNT) extra_bytes; + data_cnt -= (ASC_DCNT) extra_bytes; + scsiq->q1.data_cnt = cpu_to_le32(data_cnt); scsiq->q1.extra_bytes = extra_bytes; } } @@ -13285,14 +11480,15 @@ scsiq->q2.tag_code &= ~M2_QTAG_MSG_SIMPLE; } scsiq->q1.status = QS_FREE; - AscMemWordCopyToLram(iop_base, - (ushort) (q_addr + (ushort) ASC_SCSIQ_CDB_BEG), - (ushort *) scsiq->cdbptr, - (ushort) ((ushort) scsiq->q2.cdb_len >> 1)); + AscMemWordCopyPtrToLram(iop_base, + q_addr + ASC_SCSIQ_CDB_BEG, + (uchar *) scsiq->cdbptr, + scsiq->q2.cdb_len >> 1); + DvcPutScsiQ(iop_base, - (ushort) (q_addr + (ushort) ASC_SCSIQ_CPY_BEG), - (ushort *) & scsiq->q1.cntl, - (ushort) ((((sizeof (ASC_SCSIQ_1) + sizeof (ASC_SCSIQ_2)) / 2) - 1))); + q_addr + ASC_SCSIQ_CPY_BEG, + (uchar *) &scsiq->q1.cntl, + ((sizeof(ASC_SCSIQ_1) + sizeof(ASC_SCSIQ_2)) / 2) - 1); AscWriteLramWord(iop_base, (ushort) (q_addr + (ushort) ASC_SCSIQ_B_STATUS), (ushort) (((ushort) scsiq->q1.q_no << 8) | (ushort) QS_READY)); @@ -13325,6 +11521,7 @@ saved_data_cnt = scsiq->q1.data_cnt; scsiq->q1.data_addr = (ASC_PADDR) sg_head->sg_list[0].addr; scsiq->q1.data_cnt = (ASC_DCNT) sg_head->sg_list[0].bytes; +#if CC_VERY_LONG_SG_LIST /* * If sg_head->entry_cnt is greater than ASC_MAX_SG_LIST * then not all SG elements will fit in the allocated queues. @@ -13335,10 +11532,10 @@ { /* * Set sg_entry_cnt to be the number of SG elements that - * will fit in the allocated SG queues. It is minus 1 because - * first SG element handled above. ASC_MAX_SG_LIST is already - * inflated by 1 to account for this. For example it may - * be 50 which is 1 + 7 queues * 7 SG elements. + * will fit in the allocated SG queues. It is minus 1, because + * the first SG element is handled above. ASC_MAX_SG_LIST is + * already inflated by 1 to account for this. For example it + * may be 50 which is 1 + 7 queues * 7 SG elements. */ sg_entry_cnt = ASC_MAX_SG_LIST - 1; @@ -13349,13 +11546,16 @@ scsiq->remain_sg_entry_cnt = sg_head->entry_cnt - ASC_MAX_SG_LIST; } else { +#endif /* CC_VERY_LONG_SG_LIST */ /* * Set sg_entry_cnt to be the number of SG elements that - * will fit in the allocated SG queues. Refer to comment - * above regarding why it is - 1. + * will fit in the allocated SG queues. It is minus 1, because + * the first SG element is handled above. */ sg_entry_cnt = sg_head->entry_cnt - 1; +#if CC_VERY_LONG_SG_LIST } +#endif /* CC_VERY_LONG_SG_LIST */ if (sg_entry_cnt != 0) { scsiq->q1.cntl |= QC_SG_HEAD; q_addr = ASC_QNO_TO_QADDR(q_no); @@ -13376,6 +11576,7 @@ scsi_sg_q.sg_cur_list_cnt = ASC_SG_LIST_PER_Q - 1; } } else { +#if CC_VERY_LONG_SG_LIST /* * This is the last SG queue in the list of * allocated SG queues. If there are more @@ -13387,8 +11588,11 @@ scsi_sg_q.cntl |= QCSG_SG_XFER_MORE; } else { +#endif /* CC_VERY_LONG_SG_LIST */ scsi_sg_q.cntl |= QCSG_SG_XFER_END; +#if CC_VERY_LONG_SG_LIST } +#endif /* CC_VERY_LONG_SG_LIST */ sg_list_dwords = sg_entry_cnt << 1; if (i == 0) { scsi_sg_q.sg_list_cnt = sg_entry_cnt; @@ -13403,14 +11607,14 @@ (ushort) (q_addr + ASC_SCSIQ_B_FWD)); scsi_sg_q.q_no = next_qp; q_addr = ASC_QNO_TO_QADDR(next_qp); - AscMemWordCopyToLram(iop_base, - (ushort) (q_addr + ASC_SCSIQ_SGHD_CPY_BEG), - (ushort *) & scsi_sg_q, - (ushort) (sizeof (ASC_SG_LIST_Q) >> 1)); - AscMemDWordCopyToLram(iop_base, - (ushort) (q_addr + ASC_SGQ_LIST_BEG), - (ADV_PADDR *) &sg_head->sg_list[sg_index], - (ushort) sg_list_dwords); + AscMemWordCopyPtrToLram(iop_base, + q_addr + ASC_SCSIQ_SGHD_CPY_BEG, + (uchar *) &scsi_sg_q, + sizeof(ASC_SG_LIST_Q) >> 1); + AscMemDWordCopyPtrToLram(iop_base, + q_addr + ASC_SGQ_LIST_BEG, + (uchar *) &sg_head->sg_list[sg_index], + sg_list_dwords); sg_index += ASC_SG_LIST_PER_Q; scsiq->next_sg_index = sg_index; } @@ -13423,150 +11627,6 @@ return (sta); } -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -STATIC int -AscAbortSRB( - ASC_DVC_VAR *asc_dvc, - ADV_VADDR srb_ptr -) -{ - int sta; - ASC_SCSI_BIT_ID_TYPE saved_unit_not_ready; - PortAddr iop_base; - - iop_base = asc_dvc->iop_base; - sta = ERR; - saved_unit_not_ready = asc_dvc->unit_not_ready; - asc_dvc->unit_not_ready = 0xFF; - AscWaitISRDone(asc_dvc); - if (AscStopQueueExe(iop_base) == 1) { - if (AscRiscHaltedAbortSRB(asc_dvc, srb_ptr) == 1) { - sta = 1; - AscCleanUpBusyQueue(iop_base); - AscStartQueueExe(iop_base); - } else { - sta = 0; - AscStartQueueExe(iop_base); - } - } - asc_dvc->unit_not_ready = saved_unit_not_ready; - return (sta); -} -#endif /* version < v2.3.28 */ - -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) && \ - LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -STATIC int -AscResetDevice( - ASC_DVC_VAR *asc_dvc, - uchar target_ix -) -{ - PortAddr iop_base; - int sta; - uchar tid_no; - - ASC_SCSI_BIT_ID_TYPE target_id; - int i; - ASC_SCSI_REQ_Q scsiq_buf; - ASC_SCSI_REQ_Q *scsiq; - uchar *buf; - ASC_SCSI_BIT_ID_TYPE saved_unit_not_ready; - iop_base = asc_dvc->iop_base; - tid_no = ASC_TIX_TO_TID(target_ix); - target_id = ASC_TID_TO_TARGET_ID(tid_no); - saved_unit_not_ready = asc_dvc->unit_not_ready; - asc_dvc->unit_not_ready = target_id; - sta = ERR; - AscWaitTixISRDone(asc_dvc, target_ix); - if (AscStopQueueExe(iop_base) == 1) { - if (AscRiscHaltedAbortTIX(asc_dvc, target_ix) == 1) { - AscCleanUpBusyQueue(iop_base); - AscStartQueueExe(iop_base); - AscWaitTixISRDone(asc_dvc, target_ix); - sta = TRUE; - scsiq = (ASC_SCSI_REQ_Q *) & scsiq_buf; - buf = (uchar *) & scsiq_buf; - for (i = 0; i < sizeof (ASC_SCSI_REQ_Q); i++) { - *buf++ = 0x00; - } - scsiq->r1.status = (uchar) QS_READY; - scsiq->r2.cdb_len = 6; - scsiq->r2.tag_code = M2_QTAG_MSG_SIMPLE; - scsiq->r1.target_id = target_id; - scsiq->r2.target_ix = ASC_TIDLUN_TO_IX(tid_no, 0); - scsiq->cdbptr = (uchar *) scsiq->cdb; - scsiq->r1.cntl = QC_NO_CALLBACK | QC_MSG_OUT | QC_URGENT; - AscWriteLramByte(asc_dvc->iop_base, ASCV_MSGOUT_BEG, - M1_BUS_DVC_RESET); - asc_dvc->unit_not_ready &= ~target_id; - asc_dvc->sdtr_done |= target_id; - if (AscExeScsiQueue(asc_dvc, (ASC_SCSI_Q *) scsiq) - == 1) { - asc_dvc->unit_not_ready = target_id; - DvcSleepMilliSecond(1000); - _AscWaitQDone(iop_base, (ASC_SCSI_Q *) scsiq); - if (AscStopQueueExe(iop_base) == 1) { - AscCleanUpDiscQueue(iop_base); - AscStartQueueExe(iop_base); - if (asc_dvc->pci_fix_asyn_xfer & target_id) { - AscSetRunChipSynRegAtID(iop_base, tid_no, - ASYN_SDTR_DATA_FIX_PCI_REV_AB); - } - AscWaitTixISRDone(asc_dvc, target_ix); - } - } else { - sta = 0; - } - asc_dvc->sdtr_done &= ~target_id; - } else { - sta = ERR; - AscStartQueueExe(iop_base); - } - } - asc_dvc->unit_not_ready = saved_unit_not_ready; - return (sta); -} -#endif /* version >= v1.3.89 && version <= v2.3.28 */ - -STATIC int -AscResetSB( - ASC_DVC_VAR *asc_dvc -) -{ - int sta; - int i; - PortAddr iop_base; - - iop_base = asc_dvc->iop_base; - asc_dvc->unit_not_ready = 0xFF; - sta = TRUE; - AscWaitISRDone(asc_dvc); - AscStopQueueExe(iop_base); - asc_dvc->sdtr_done = 0; - AscResetChipAndScsiBus(asc_dvc); - DvcSleepMilliSecond((ASC_DCNT) ((ushort) asc_dvc->scsi_reset_wait * 1000)); - AscReInitLram(asc_dvc); - for (i = 0; i <= ASC_MAX_TID; i++) { - asc_dvc->cur_dvc_qng[i] = 0; - if (asc_dvc->pci_fix_asyn_xfer & (ASC_SCSI_BIT_ID_TYPE) (0x01 << i)) { - AscSetChipSynRegAtID(iop_base, i, ASYN_SDTR_DATA_FIX_PCI_REV_AB); - } - } - asc_dvc->err_code = 0; - AscSetPCAddr(iop_base, ASC_MCODE_START_ADDR); - if (AscGetPCAddr(iop_base) != ASC_MCODE_START_ADDR) { - sta = ERR; - } - if (AscStartChip(iop_base) == 0) { - sta = ERR; - } - AscStartQueueExe(iop_base); - asc_dvc->unit_not_ready = 0; - asc_dvc->queue_full_or_busy = 0; - return (sta); -} - STATIC int AscSetRunChipSynRegAtID( PortAddr iop_base, @@ -13618,16 +11678,6 @@ return (sta); } -STATIC int -AscReInitLram( - ASC_DVC_VAR *asc_dvc -) -{ - AscInitLram(asc_dvc); - AscInitQLinkVar(asc_dvc); - return (0); -} - STATIC ushort AscInitLram( ASC_DVC_VAR *asc_dvc @@ -13722,39 +11772,14 @@ { if (asc_dvc->err_code == 0) { asc_dvc->err_code = err_code; - AscWriteLramWord(asc_dvc->iop_base, ASCV_ASCDVC_ERR_CODE_W, - err_code); - } - return (err_code); -} - - -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) && \ - LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -STATIC int -_AscWaitQDone( - PortAddr iop_base, - ASC_SCSI_Q * scsiq -) -{ - ushort q_addr; - uchar q_status; - int count = 0; - - while (scsiq->q1.q_no == 0); - q_addr = ASC_QNO_TO_QADDR(scsiq->q1.q_no); - do { - q_status = AscReadLramByte(iop_base, q_addr + ASC_SCSIQ_B_STATUS); - DvcSleepMilliSecond(100L); - if (count++ > 30) { - return (0); - } - } while ((q_status & QS_READY) != 0); - return (1); + AscWriteLramWord(asc_dvc->iop_base, ASCV_ASCDVC_ERR_CODE_W, + err_code); + } + return (err_code); } -#endif /* version >= v1.3.89 && version < v2.3.28 */ -STATIC uchar + +STATIC uchar AscMsgOutSDTR( ASC_DVC_VAR *asc_dvc, uchar sdtr_period, @@ -13775,18 +11800,18 @@ if ((sdtr_period_index = AscGetSynPeriodIndex(asc_dvc, sdtr_period)) <= asc_dvc->max_sdtr_index) { - AscMemWordCopyToLram(iop_base, + AscMemWordCopyPtrToLram(iop_base, ASCV_MSGOUT_BEG, - (ushort *) & sdtr_buf, - (ushort) (sizeof (EXT_MSG) >> 1)); + (uchar *) &sdtr_buf, + sizeof (EXT_MSG) >> 1); return ((sdtr_period_index << 4) | sdtr_offset); } else { sdtr_buf.req_ack_offset = 0; - AscMemWordCopyToLram(iop_base, + AscMemWordCopyPtrToLram(iop_base, ASCV_MSGOUT_BEG, - (ushort *) & sdtr_buf, - (ushort) (sizeof (EXT_MSG) >> 1)); + (uchar *) &sdtr_buf, + sizeof (EXT_MSG) >> 1); return (0); } } @@ -13888,98 +11913,6 @@ return (free_q_head); } -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -STATIC int -AscRiscHaltedAbortSRB( - ASC_DVC_VAR *asc_dvc, - ASC_VADDR srb_ptr -) -{ - PortAddr iop_base; - ushort q_addr; - uchar q_no; - ASC_QDONE_INFO scsiq_buf; - ASC_QDONE_INFO *scsiq; - ASC_ISR_CALLBACK asc_isr_callback; - int last_int_level; - - iop_base = asc_dvc->iop_base; - asc_isr_callback = asc_dvc->isr_callback; - last_int_level = DvcEnterCritical(); - scsiq = (ASC_QDONE_INFO *) & scsiq_buf; - for (q_no = ASC_MIN_ACTIVE_QNO; q_no <= asc_dvc->max_total_qng; - q_no++) { - q_addr = ASC_QNO_TO_QADDR(q_no); - scsiq->d2.srb_ptr = AscReadLramDWord(iop_base, - (ushort) (q_addr + (ushort) ASC_SCSIQ_D_SRBPTR)); - if (scsiq->d2.srb_ptr == srb_ptr) { - _AscCopyLramScsiDoneQ(iop_base, q_addr, scsiq, asc_dvc->max_dma_count); - if (((scsiq->q_status & QS_READY) != 0) - && ((scsiq->q_status & QS_ABORTED) == 0) - && ((scsiq->cntl & QCSG_SG_XFER_LIST) == 0)) { - scsiq->q_status |= QS_ABORTED; - scsiq->d3.done_stat = QD_ABORTED_BY_HOST; - AscWriteLramDWord(iop_base, - (ushort) (q_addr + (ushort) ASC_SCSIQ_D_SRBPTR), - 0L); - AscWriteLramByte(iop_base, - (ushort) (q_addr + (ushort) ASC_SCSIQ_B_STATUS), - scsiq->q_status); - (*asc_isr_callback) (asc_dvc, scsiq); - return (1); - } - } - } - DvcLeaveCritical(last_int_level); - return (0); -} -#endif /* version < v2.3.28 */ - -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) && \ - LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -STATIC int -AscRiscHaltedAbortTIX( - ASC_DVC_VAR *asc_dvc, - uchar target_ix -) -{ - PortAddr iop_base; - ushort q_addr; - uchar q_no; - ASC_QDONE_INFO scsiq_buf; - ASC_QDONE_INFO *scsiq; - ASC_ISR_CALLBACK asc_isr_callback; - int last_int_level; - - iop_base = asc_dvc->iop_base; - asc_isr_callback = asc_dvc->isr_callback; - last_int_level = DvcEnterCritical(); - scsiq = (ASC_QDONE_INFO *) & scsiq_buf; - for (q_no = ASC_MIN_ACTIVE_QNO; q_no <= asc_dvc->max_total_qng; - q_no++) { - q_addr = ASC_QNO_TO_QADDR(q_no); - _AscCopyLramScsiDoneQ(iop_base, q_addr, scsiq, asc_dvc->max_dma_count); - if (((scsiq->q_status & QS_READY) != 0) && - ((scsiq->q_status & QS_ABORTED) == 0) && - ((scsiq->cntl & QCSG_SG_XFER_LIST) == 0)) { - if (scsiq->d2.target_ix == target_ix) { - scsiq->q_status |= QS_ABORTED; - scsiq->d3.done_stat = QD_ABORTED_BY_HOST; - AscWriteLramDWord(iop_base, - (ushort) (q_addr + (ushort) ASC_SCSIQ_D_SRBPTR), - 0L); - AscWriteLramByte(iop_base, - (ushort) (q_addr + (ushort) ASC_SCSIQ_B_STATUS), - scsiq->q_status); - (*asc_isr_callback) (asc_dvc, scsiq); - } - } - } - DvcLeaveCritical(last_int_level); - return (1); -} -#endif /* version >= v1.3.89 && version < v2.3.28 */ - STATIC int AscHostReqRiscHalt( PortAddr iop_base @@ -14028,121 +11961,6 @@ return (0); } -STATIC int -AscStartQueueExe( - PortAddr iop_base -) -{ - if (AscReadLramByte(iop_base, ASCV_STOP_CODE_B) != 0) { - AscWriteLramByte(iop_base, ASCV_STOP_CODE_B, 0); - } - return (1); -} - -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -STATIC int -AscCleanUpBusyQueue( - PortAddr iop_base -) -{ - int count; - uchar stop_code; - - count = 0; - if (AscReadLramByte(iop_base, ASCV_STOP_CODE_B) != 0) { - AscWriteLramByte(iop_base, ASCV_STOP_CODE_B, - ASC_STOP_CLEAN_UP_BUSY_Q); - do { - stop_code = AscReadLramByte(iop_base, ASCV_STOP_CODE_B); - if ((stop_code & ASC_STOP_CLEAN_UP_BUSY_Q) == 0) - break; - DvcSleepMilliSecond(100); - } while (count++ < 20); - } - return (1); -} - -#if LINUX_VERSION_CODE >= ASC_LINUX_VERSION(1,3,89) -STATIC int -AscCleanUpDiscQueue( - PortAddr iop_base -) -{ - int count; - uchar stop_code; - - count = 0; - if (AscReadLramByte(iop_base, ASCV_STOP_CODE_B) != 0) { - AscWriteLramByte(iop_base, ASCV_STOP_CODE_B, - ASC_STOP_CLEAN_UP_DISC_Q); - do { - stop_code = AscReadLramByte(iop_base, ASCV_STOP_CODE_B); - if ((stop_code & ASC_STOP_CLEAN_UP_DISC_Q) == 0) - break; - DvcSleepMilliSecond(100); - } while (count++ < 20); - } - return (1); -} -#endif /* version >= v1.3.89 */ -#endif /* version < v2.3.28 */ - -STATIC int -AscWaitTixISRDone( - ASC_DVC_VAR *asc_dvc, - uchar target_ix -) -{ - uchar cur_req; - uchar tid_no; - int i = 0; - - tid_no = ASC_TIX_TO_TID(target_ix); - while (i++ < 10) { - if ((cur_req = asc_dvc->cur_dvc_qng[tid_no]) == 0) { - break; - } - DvcSleepMilliSecond(1000L); - if (asc_dvc->cur_dvc_qng[tid_no] == cur_req) { - break; - } - } - return (1); -} - -STATIC int -AscWaitISRDone( - ASC_DVC_VAR *asc_dvc -) -{ - int tid; - - for (tid = 0; tid <= ASC_MAX_TID; tid++) { - AscWaitTixISRDone(asc_dvc, ASC_TID_TO_TIX(tid)); - } - return (1); -} - -STATIC ASC_PADDR -AscGetOnePhyAddr( - ASC_DVC_VAR *asc_dvc, - uchar * buf_addr, - ASC_DCNT buf_size -) -{ - ASC_MIN_SG_HEAD sg_head; - - sg_head.entry_cnt = ASC_MIN_SG_LIST; - if (DvcGetSGList(asc_dvc, (uchar *) buf_addr, - buf_size, (ASC_SG_HEAD *) &sg_head) != buf_size) { - return (0L); - } - if (sg_head.entry_cnt > 1) { - return (0L); - } - return ((ASC_PADDR) sg_head.sg_list[0].addr); -} - STATIC void DvcDelayMicroSecond(ADV_DVC_VAR *asc_dvc, ushort micro_sec) { @@ -14647,12 +12465,10 @@ return (warn_code); } -ASC_INITFUNC( -STATIC ushort, +STATIC ushort AscInitAsc1000Driver( ASC_DVC_VAR *asc_dvc ) -) { ushort warn_code; PortAddr iop_base; @@ -14676,7 +12492,9 @@ warn_code |= AscInitLram(asc_dvc); if (asc_dvc->err_code != 0) return (UW_ERR); - if (AscLoadMicroCode(iop_base, 0, (ushort *) _asc_mcode_buf, + ASC_DBG1(1, "AscInitAsc1000Driver: _asc_mcode_chksum 0x%lx\n", + (ulong) _asc_mcode_chksum); + if (AscLoadMicroCode(iop_base, 0, _asc_mcode_buf, _asc_mcode_size) != _asc_mcode_chksum) { asc_dvc->err_code |= ASC_IERR_MCODE_CHKSUM; return (warn_code); @@ -14838,7 +12656,7 @@ asc_dvc->err_code |= ASC_IERR_SET_PC_ADDR; return (warn_code); } - eep_config = (ASCEEP_CONFIG *) & eep_config_buf; + eep_config = (ASCEEP_CONFIG *) &eep_config_buf; cfg_msw = AscGetChipCfgMsw(iop_base); cfg_lsw = AscGetChipCfgLsw(iop_base); if ((cfg_msw & ASC_CFG_MSW_CLR_MASK) != 0) { @@ -14847,6 +12665,7 @@ AscSetChipCfgMsw(iop_base, cfg_msw); } chksum = AscGetEEPConfig(iop_base, eep_config, asc_dvc->bus_type); + ASC_DBG1(1, "AscInitFromEEP: chksum 0x%x\n", chksum); if (chksum == 0) { chksum = 0xaa55; } @@ -14865,10 +12684,14 @@ } eep_config->cfg_msw &= ~ASC_CFG_MSW_CLR_MASK; eep_config->cfg_lsw |= ASC_CFG0_HOST_INT_ON; + ASC_DBG1(1, "AscInitFromEEP: eep_config->chksum 0x%x\n", + eep_config->chksum); if (chksum != eep_config->chksum) { if (AscGetChipVersion(iop_base, asc_dvc->bus_type) == ASC_CHIP_VER_PCI_ULTRA_3050 ) { + ASC_DBG(1, +"AscInitFromEEP: chksum error ignored; EEPROM-less board\n"); eep_config->init_sdtr = 0xFF; eep_config->disc_enable = 0xFF; eep_config->start_motor = 0xFF; @@ -14886,6 +12709,8 @@ /* Indicate EEPROM-less board. */ eep_config->adapter_info[5] = 0xBB; } else { + ASC_PRINT( +"AscInitFromEEP: EEPROM checksum error; Will try to re-write EEPROM.\n"); write_eep = 1; warn_code |= ASC_WARN_EEPROM_CHKSUM; } @@ -14953,22 +12778,27 @@ } eep_config->cfg_msw = AscGetChipCfgMsw(iop_base); if (write_eep) { - (void) AscSetEEPConfig(iop_base, eep_config, asc_dvc->bus_type); + if ((i = AscSetEEPConfig(iop_base, eep_config, asc_dvc->bus_type)) != + 0) { + ASC_PRINT1( +"AscInitFromEEP: Failed to re-write EEPROM with %d errors.\n", i); + } else { + ASC_PRINT("AscInitFromEEP: Succesfully re-wrote EEPROM."); + } } return (warn_code); } -ASC_INITFUNC( -STATIC ushort, +STATIC ushort AscInitMicroCodeVar( ASC_DVC_VAR *asc_dvc ) -) { int i; ushort warn_code; PortAddr iop_base; ASC_PADDR phy_addr; + ASC_DCNT phy_size; iop_base = asc_dvc->iop_base; warn_code = 0; @@ -14977,26 +12807,27 @@ asc_dvc->cfg->sdtr_period_offset[i] ); } + AscInitQLinkVar(asc_dvc); AscWriteLramByte(iop_base, ASCV_DISC_ENABLE_B, asc_dvc->cfg->disc_enable); AscWriteLramByte(iop_base, ASCV_HOSTSCSI_ID_B, ASC_TID_TO_TARGET_ID(asc_dvc->cfg->chip_scsi_id)); - if ((phy_addr = AscGetOnePhyAddr(asc_dvc, - (uchar *) asc_dvc->cfg->overrun_buf, - ASC_OVERRUN_BSIZE)) == 0L) { - asc_dvc->err_code |= ASC_IERR_GET_PHY_ADDR; - } else { - /* Align on an 8 byte boundary. */ - phy_addr = /*cpu_to_le32*/((phy_addr + 7) & ~0x7); - AscWriteLramDWord(iop_base, ASCV_OVERRUN_PADDR_D, phy_addr); - AscWriteLramDWord(iop_base, ASCV_OVERRUN_BSIZE_D, - ASC_OVERRUN_BSIZE - 8); - } - asc_dvc->cfg->mcode_date = AscReadLramWord(iop_base, - (ushort) ASCV_MC_DATE_W); - asc_dvc->cfg->mcode_version = AscReadLramWord(iop_base, - (ushort) ASCV_MC_VER_W); + + /* Align overrun buffer on an 8 byte boundary. */ + phy_addr = virt_to_bus(asc_dvc->cfg->overrun_buf); + phy_addr = cpu_to_le32((phy_addr + 7) & ~0x7); + AscMemDWordCopyPtrToLram(iop_base, ASCV_OVERRUN_PADDR_D, + (uchar *) &phy_addr, 1); + phy_size = cpu_to_le32(ASC_OVERRUN_BSIZE - 8); + AscMemDWordCopyPtrToLram(iop_base, ASCV_OVERRUN_BSIZE_D, + (uchar *) &phy_size, 1); + + asc_dvc->cfg->mcode_date = + AscReadLramWord(iop_base, (ushort) ASCV_MC_DATE_W); + asc_dvc->cfg->mcode_version = + AscReadLramWord(iop_base, (ushort) ASCV_MC_VER_W); + AscSetPCAddr(iop_base, ASC_MCODE_START_ADDR); if (AscGetPCAddr(iop_base) != ASC_MCODE_START_ADDR) { asc_dvc->err_code |= ASC_IERR_SET_PC_ADDR; @@ -15006,6 +12837,7 @@ asc_dvc->err_code |= ASC_IERR_START_STOP_CHIP; return (warn_code); } + return (warn_code); } @@ -15167,24 +12999,17 @@ ushort wval; ushort sum; ushort *wbuf; - ushort *charfields; int cfg_beg; int cfg_end; + int uchar_end_in_config = ASC_EEP_MAX_DVC_ADDR - 2; int s_addr; - int isa_pnp_wsize; wbuf = (ushort *) cfg_buf; - charfields = (ushort *) &ASCEEP_Config_Field_IsChar; sum = 0; - isa_pnp_wsize = 0; - for (s_addr = 0; s_addr < (2 + isa_pnp_wsize); s_addr++, wbuf++) { - wval = AscReadEEPWord(iop_base, (uchar) s_addr); - sum += wval; - /* Swap to native as needed */ - if (*charfields++) - *wbuf = cpu_to_le16(wval); - else - *wbuf = wval; + /* Read two config words; Byte-swapping done by AscReadEEPWord(). */ + for (s_addr = 0; s_addr < 2; s_addr++, wbuf++) { + *wbuf = AscReadEEPWord(iop_base, (uchar) s_addr); + sum += *wbuf; } if (bus_type & ASC_IS_VL) { cfg_beg = ASC_EEP_DVC_CFG_BEG_VL; @@ -15193,20 +13018,25 @@ cfg_beg = ASC_EEP_DVC_CFG_BEG; cfg_end = ASC_EEP_MAX_DVC_ADDR; } - for (s_addr = cfg_beg; s_addr <= (cfg_end - 1); - s_addr++, wbuf++) { - wval = AscReadEEPWord(iop_base, (uchar) s_addr); - sum += wval; - *wbuf = wval; - /* Swap to native as needed */ - if (*charfields++) - *wbuf = cpu_to_le16(wval); - else - *wbuf = wval; + for (s_addr = cfg_beg; s_addr <= (cfg_end - 1); s_addr++, wbuf++) { + wval = AscReadEEPWord( iop_base, ( uchar )s_addr ) ; + if (s_addr <= uchar_end_in_config) { + /* + * Swap all char fields - must unswap bytes already swapped + * by AscReadEEPWord(). + */ + *wbuf = le16_to_cpu(wval); + } else { + /* Don't swap word field at the end - cntl field. */ + *wbuf = wval; + } + sum += wval; /* Checksum treats all EEPROM data as words. */ } + /* + * Read the checksum word which will be compared against 'sum' + * by the caller. Word field already swapped. + */ *wbuf = AscReadEEPWord(iop_base, (uchar) s_addr); - if (charfields) - *wbuf = cpu_to_le16(*wbuf); return (sum); } @@ -15219,15 +13049,19 @@ ) { int n_error; - ushort *wbuf; + ushort *wbuf; + ushort word; ushort sum; int s_addr; int cfg_beg; int cfg_end; + int uchar_end_in_config = ASC_EEP_MAX_DVC_ADDR - 2; + wbuf = (ushort *) cfg_buf; n_error = 0; sum = 0; + /* Write two config words; AscWriteEEPWord() will swap bytes. */ for (s_addr = 0; s_addr < 2; s_addr++, wbuf++) { sum += *wbuf; if (*wbuf != AscWriteEEPWord(iop_base, (uchar) s_addr, *wbuf)) { @@ -15241,29 +13075,66 @@ cfg_beg = ASC_EEP_DVC_CFG_BEG; cfg_end = ASC_EEP_MAX_DVC_ADDR; } - for (s_addr = cfg_beg; s_addr <= (cfg_end - 1); - s_addr++, wbuf++) { - sum += *wbuf; - if (*wbuf != AscWriteEEPWord(iop_base, (uchar) s_addr, *wbuf)) { - n_error++; + for (s_addr = cfg_beg; s_addr <= (cfg_end - 1); s_addr++, wbuf++) { + if (s_addr <= uchar_end_in_config) { + /* + * This is a char field. Swap char fields before they are + * swapped again by AscWriteEEPWord(). + */ + word = cpu_to_le16(*wbuf); + if (word != AscWriteEEPWord( iop_base, (uchar) s_addr, word)) { + n_error++; + } + } else { + /* Don't swap word field at the end - cntl field. */ + if (*wbuf != AscWriteEEPWord(iop_base, (uchar) s_addr, *wbuf)) { + n_error++; + } } + sum += *wbuf; /* Checksum calculated from word values. */ } + /* Write checksum word. It will be swapped by AscWriteEEPWord(). */ *wbuf = sum; if (sum != AscWriteEEPWord(iop_base, (uchar) s_addr, sum)) { n_error++; } + + /* Read EEPROM back again. */ wbuf = (ushort *) cfg_buf; + /* + * Read two config words; Byte-swapping done by AscReadEEPWord(). + */ for (s_addr = 0; s_addr < 2; s_addr++, wbuf++) { if (*wbuf != AscReadEEPWord(iop_base, (uchar) s_addr)) { n_error++; } } - for (s_addr = cfg_beg; s_addr <= cfg_end; - s_addr++, wbuf++) { - if (*wbuf != AscReadEEPWord(iop_base, (uchar) s_addr)) { + if (bus_type & ASC_IS_VL) { + cfg_beg = ASC_EEP_DVC_CFG_BEG_VL; + cfg_end = ASC_EEP_MAX_DVC_ADDR_VL; + } else { + cfg_beg = ASC_EEP_DVC_CFG_BEG; + cfg_end = ASC_EEP_MAX_DVC_ADDR; + } + for (s_addr = cfg_beg; s_addr <= (cfg_end - 1); s_addr++, wbuf++) { + if (s_addr <= uchar_end_in_config) { + /* + * Swap all char fields. Must unswap bytes already swapped + * by AscReadEEPWord(). + */ + word = le16_to_cpu(AscReadEEPWord(iop_base, (uchar) s_addr)); + } else { + /* Don't swap word field at the end - cntl field. */ + word = AscReadEEPWord(iop_base, (uchar) s_addr); + } + if (*wbuf != word) { n_error++; } } + /* Read checksum; Byte swapping not needed. */ + if (AscReadEEPWord(iop_base, (uchar) s_addr) != sum) { + n_error++; + } return (n_error); } @@ -15300,7 +13171,7 @@ uchar dvc_type; ASC_SCSI_BIT_ID_TYPE tid_bits; - dvc_type = inq->byte0.peri_dvc_type; + dvc_type = ASC_INQ_DVC_TYPE(inq); tid_bits = ASC_TIX_TO_TARGET_ID(tid_no); if (asc_dvc->bug_fix_cntl & ASC_BUG_FIX_ASYN_USE_SYN) @@ -15360,11 +13231,12 @@ asc_dvc->cfg->can_tagged_qng &= ~tid_bit; asc_dvc->use_tagged_qng &= ~tid_bit; - if (inq->byte3.rsp_data_fmt >= 2 || inq->byte2.ansi_apr_ver >= 2) { - if ((asc_dvc->cfg->sdtr_enable & tid_bit) && inq->byte7.Sync) { + if (ASC_INQ_RESPONSE_FMT(inq) >= 2 || ASC_INQ_ANSI_VER(inq) >= 2) { + if ((asc_dvc->cfg->sdtr_enable & tid_bit) && ASC_INQ_SYNC(inq)) { asc_dvc->init_sdtr |= tid_bit; } - if ((asc_dvc->cfg->cmd_qng_enabled & tid_bit) && inq->byte7.CmdQue) { + if ((asc_dvc->cfg->cmd_qng_enabled & tid_bit) && + ASC_INQ_CMD_QUEUE(inq)) { if (AscTagQueuingSafe(inq)) { asc_dvc->use_tagged_qng |= tid_bit; asc_dvc->cfg->can_tagged_qng |= tid_bit; @@ -15429,7 +13301,6 @@ } return (byte_data); } - STATIC ushort AscReadLramWord( PortAddr iop_base, @@ -15443,6 +13314,7 @@ return (word_data); } +#if CC_VERY_LONG_SG_LIST STATIC ASC_DCNT AscReadLramDWord( PortAddr iop_base, @@ -15458,6 +13330,7 @@ dword_data = ((ASC_DCNT) val_high << 16) | (ASC_DCNT) val_low; return (dword_data); } +#endif /* CC_VERY_LONG_SG_LIST */ STATIC void AscWriteLramWord( @@ -15472,23 +13345,6 @@ } STATIC void -AscWriteLramDWord( - PortAddr iop_base, - ushort addr, - ASC_DCNT dword_val -) -{ - ushort word_val; - - AscSetChipLramAddr(iop_base, addr); - word_val = (ushort) dword_val; - AscSetChipLramData(iop_base, word_val); - word_val = (ushort) (dword_val >> 16); - AscSetChipLramData(iop_base, word_val); - return; -} - -STATIC void AscWriteLramByte( PortAddr iop_base, ushort addr, @@ -15511,42 +13367,87 @@ return; } +/* + * Copy 2 bytes to LRAM. + * + * The source data is assumed to be in little-endian order in memory + * and is maintained in little-endian order when written to LRAM. + */ STATIC void -AscMemWordCopyToLram( +AscMemWordCopyPtrToLram( PortAddr iop_base, ushort s_addr, - ushort * s_buffer, + uchar *s_buffer, int words ) { + int i; + AscSetChipLramAddr(iop_base, s_addr); - DvcOutPortWords(iop_base + IOP_RAM_DATA, s_buffer, words); + for (i = 0; i < 2 * words; i += 2) { + /* + * On a little-endian system the second argument below + * produces a little-endian ushort which is written to + * LRAM in little-endian order. On a big-endian system + * the second argument produces a big-endian ushort which + * is "transparently" byte-swapped by outpw() and written + * in little-endian order to LRAM. + */ + outpw(iop_base + IOP_RAM_DATA, + ((ushort) s_buffer[i + 1] << 8) | s_buffer[i]); + } return; } +/* + * Copy 4 bytes to LRAM. + * + * The source data is assumed to be in little-endian order in memory + * and is maintained in little-endian order when writen to LRAM. + */ STATIC void -AscMemDWordCopyToLram( +AscMemDWordCopyPtrToLram( PortAddr iop_base, ushort s_addr, - ASC_DCNT *s_buffer, + uchar *s_buffer, int dwords ) { + int i; + AscSetChipLramAddr(iop_base, s_addr); - DvcOutPortDWords(iop_base + IOP_RAM_DATA, s_buffer, dwords); + for (i = 0; i < 4 * dwords; i += 4) { + outpw(iop_base + IOP_RAM_DATA, + ((ushort) s_buffer[i + 1] << 8) | s_buffer[i]); /* LSW */ + outpw(iop_base + IOP_RAM_DATA, + ((ushort) s_buffer[i + 3] << 8) | s_buffer[i + 2]); /* MSW */ + } return; } +/* + * Copy 2 bytes from LRAM. + * + * The source data is assumed to be in little-endian order in LRAM + * and is maintained in little-endian order when written to memory. + */ STATIC void -AscMemWordCopyFromLram( +AscMemWordCopyPtrFromLram( PortAddr iop_base, ushort s_addr, - ushort * d_buffer, + uchar *d_buffer, int words ) { + int i; + ushort word; + AscSetChipLramAddr(iop_base, s_addr); - DvcInPortWords(iop_base + IOP_RAM_DATA, d_buffer, words); + for (i = 0; i < 2 * words; i += 2) { + word = inpw(iop_base + IOP_RAM_DATA); + d_buffer[i] = word & 0xff; + d_buffer[i + 1] = (word >> 8) & 0xff; + } return; } @@ -15591,1034 +13492,1077 @@ /* a_mcode.h */ +/* Microcode buffer is kept after initialization for error recovery. */ STATIC unsigned char _adv_asc3550_buf[] = { - 0x00, 0x00, 0x00, 0xf2, 0x00, 0xf0, 0x00, 0x16, 0x00, 0xfc, 0x01, 0x00, 0x48, 0xe4, 0x98, 0x18, - 0x03, 0xf6, 0x18, 0xe4, 0x02, 0x00, 0x18, 0x80, 0x00, 0xfa, 0xff, 0xff, 0x0c, 0x0e, 0x9e, 0xe7, - 0xff, 0x00, 0x82, 0xe7, 0x00, 0xea, 0x00, 0xf6, 0x01, 0xe6, 0x09, 0xe7, 0x01, 0xf6, 0x08, 0x00, - 0x55, 0xf0, 0x01, 0xfa, 0x03, 0x00, 0x04, 0x00, 0x18, 0xf4, 0x00, 0xec, 0x85, 0xf0, 0xbc, 0x00, - 0xd5, 0xf0, 0x7c, 0x0c, 0x38, 0x54, 0x00, 0xe6, 0x1e, 0xf0, 0x86, 0xf0, 0xb4, 0x00, 0x98, 0x57, - 0xd0, 0x01, 0x0c, 0x1c, 0x3e, 0x1c, 0x0c, 0x00, 0x10, 0x00, 0xbb, 0x00, 0x00, 0x10, 0x84, 0x18, - 0x02, 0x80, 0x32, 0xf0, 0x01, 0xfc, 0x76, 0x0c, 0x0a, 0x10, 0x0c, 0x10, 0xa4, 0x12, 0x02, 0x13, - 0x18, 0x40, 0x00, 0x57, 0x01, 0xea, 0x3c, 0x00, 0xc0, 0x00, 0x6c, 0x01, 0x6e, 0x01, 0x04, 0x12, - 0x00, 0x80, 0x03, 0xe6, 0xb6, 0x00, 0x01, 0x01, 0x3e, 0x01, 0xb8, 0x0f, 0x06, 0x13, 0xb9, 0x54, - 0x3e, 0x57, 0x03, 0x58, 0x1b, 0x80, 0x30, 0xe4, 0x4b, 0xe4, 0x20, 0x00, 0x32, 0x00, 0x3e, 0x00, - 0x80, 0x00, 0x24, 0x01, 0x3c, 0x01, 0x68, 0x01, 0x6a, 0x01, 0x70, 0x01, 0x72, 0x01, 0x74, 0x01, - 0x76, 0x01, 0x78, 0x01, 0x62, 0x0a, 0x80, 0x0c, 0x08, 0x12, 0x1e, 0x13, 0x4c, 0x1c, 0x02, 0x4a, - 0xbb, 0x55, 0x3c, 0x56, 0x4a, 0xe4, 0x02, 0xee, 0x5b, 0xf0, 0xb1, 0xf0, 0x03, 0xf7, 0x06, 0xf7, - 0x03, 0xfc, 0x0f, 0x00, 0x40, 0x00, 0xbe, 0x00, 0x00, 0x01, 0xa0, 0x08, 0x42, 0x15, 0x32, 0x1c, - 0x38, 0x1c, 0x4e, 0x1c, 0x10, 0x44, 0x02, 0x48, 0x00, 0x4c, 0x04, 0x80, 0x04, 0xea, 0x5d, 0xf0, + 0x00, 0x00, 0x00, 0xf2, 0x00, 0xf0, 0x00, 0x16, 0x18, 0xe4, 0x00, 0xfc, 0x01, 0x00, 0x48, 0xe4, + 0xbe, 0x18, 0x18, 0x80, 0x03, 0xf6, 0x02, 0x00, 0x00, 0xfa, 0xff, 0xff, 0x28, 0x0e, 0x9e, 0xe7, + 0xff, 0x00, 0x82, 0xe7, 0x00, 0xea, 0x00, 0xf6, 0x01, 0xe6, 0x09, 0xe7, 0x55, 0xf0, 0x01, 0xf6, + 0x01, 0xfa, 0x08, 0x00, 0x03, 0x00, 0x04, 0x00, 0x18, 0xf4, 0x10, 0x00, 0x00, 0xec, 0x85, 0xf0, + 0xbc, 0x00, 0xd5, 0xf0, 0x8e, 0x0c, 0x38, 0x54, 0x00, 0xe6, 0x1e, 0xf0, 0x86, 0xf0, 0xb4, 0x00, + 0x98, 0x57, 0xd0, 0x01, 0x0c, 0x1c, 0x3e, 0x1c, 0x0c, 0x00, 0xbb, 0x00, 0xaa, 0x18, 0x02, 0x80, + 0x32, 0xf0, 0x01, 0xfc, 0x88, 0x0c, 0xc6, 0x12, 0x02, 0x13, 0x18, 0x40, 0x00, 0x57, 0x01, 0xea, + 0x3c, 0x00, 0x6c, 0x01, 0x6e, 0x01, 0x04, 0x12, 0x3e, 0x57, 0x00, 0x80, 0x03, 0xe6, 0xb6, 0x00, + 0xc0, 0x00, 0x01, 0x01, 0x3e, 0x01, 0xda, 0x0f, 0x22, 0x10, 0x08, 0x12, 0x02, 0x4a, 0xb9, 0x54, + 0x03, 0x58, 0x1b, 0x80, 0x30, 0xe4, 0x4b, 0xe4, 0x20, 0x00, 0x32, 0x00, 0x3e, 0x00, 0x80, 0x00, + 0x24, 0x01, 0x3c, 0x01, 0x68, 0x01, 0x6a, 0x01, 0x70, 0x01, 0x72, 0x01, 0x74, 0x01, 0x76, 0x01, + 0x78, 0x01, 0x62, 0x0a, 0x92, 0x0c, 0x2c, 0x10, 0x2e, 0x10, 0x06, 0x13, 0x4c, 0x1c, 0xbb, 0x55, + 0x3c, 0x56, 0x04, 0x80, 0x4a, 0xe4, 0x02, 0xee, 0x5b, 0xf0, 0xb1, 0xf0, 0x03, 0xf7, 0x06, 0xf7, + 0x03, 0xfc, 0x0f, 0x00, 0x40, 0x00, 0xbe, 0x00, 0x00, 0x01, 0xb0, 0x08, 0x30, 0x13, 0x64, 0x15, + 0x32, 0x1c, 0x38, 0x1c, 0x4e, 0x1c, 0x10, 0x44, 0x02, 0x48, 0x00, 0x4c, 0x04, 0xea, 0x5d, 0xf0, 0x04, 0xf6, 0x02, 0xfc, 0x05, 0x00, 0x34, 0x00, 0x36, 0x00, 0x98, 0x00, 0xcc, 0x00, 0x20, 0x01, - 0x4e, 0x01, 0x3e, 0x0b, 0x02, 0x0e, 0x0a, 0x12, 0x04, 0x13, 0x0e, 0x13, 0x30, 0x13, 0x60, 0x13, - 0xee, 0x14, 0x30, 0x1c, 0x00, 0x4e, 0xbd, 0x56, 0x00, 0xdc, 0x05, 0xf0, 0x09, 0xf0, 0x59, 0xf0, - 0xa7, 0xf0, 0xb8, 0xf0, 0x0e, 0xf7, 0x06, 0x00, 0x19, 0x00, 0x33, 0x00, 0x9b, 0x00, 0xa4, 0x00, - 0xb5, 0x00, 0xba, 0x00, 0xd0, 0x00, 0xe1, 0x00, 0xe7, 0x00, 0xde, 0x03, 0x46, 0x0a, 0xf8, 0x0d, - 0x02, 0x10, 0x04, 0x10, 0x0a, 0x13, 0x12, 0x13, 0xf2, 0x14, 0x8a, 0x16, 0x20, 0x1c, 0x34, 0x1c, - 0x36, 0x1c, 0x08, 0x44, 0x38, 0x44, 0x91, 0x44, 0x0a, 0x45, 0x48, 0x46, 0x01, 0x48, 0x68, 0x54, - 0x83, 0x55, 0xb0, 0x57, 0x01, 0x58, 0x83, 0x59, 0x06, 0x83, 0x05, 0xe6, 0x0b, 0xf0, 0x0c, 0xf0, - 0x5c, 0xf0, 0x4b, 0xf4, 0x04, 0xf8, 0x05, 0xf8, 0x02, 0xfa, 0x03, 0xfa, 0x04, 0xfc, 0x05, 0xfc, - 0x07, 0x00, 0x0a, 0x00, 0x0d, 0x00, 0x1c, 0x00, 0x9e, 0x00, 0xa8, 0x00, 0xaa, 0x00, 0xb9, 0x00, - 0xe0, 0x00, 0x22, 0x01, 0x26, 0x01, 0x79, 0x01, 0x7a, 0x01, 0xc0, 0x01, 0xc2, 0x01, 0x7c, 0x02, - 0x62, 0x03, 0xda, 0x04, 0xd8, 0x07, 0x68, 0x08, 0x69, 0x08, 0xaa, 0x08, 0xe9, 0x09, 0xf6, 0x0a, - 0x1e, 0x0e, 0x0e, 0x10, 0x14, 0x10, 0x1a, 0x10, 0xed, 0x10, 0xf1, 0x10, 0x06, 0x12, 0x16, 0x13, - 0x20, 0x14, 0xb4, 0x14, 0xb6, 0x14, 0x68, 0x15, 0xa0, 0x17, 0xac, 0x17, 0x6b, 0x18, 0x12, 0x1c, - 0x46, 0x1c, 0x9c, 0x32, 0x00, 0x40, 0x0e, 0x47, 0x48, 0x47, 0x41, 0x48, 0x89, 0x48, 0x80, 0x4c, - 0x00, 0x54, 0x44, 0x55, 0xe5, 0x55, 0x14, 0x56, 0x77, 0x57, 0xbf, 0x57, 0x40, 0x5c, 0x06, 0x80, - 0x08, 0x90, 0x03, 0xa1, 0x00, 0xcc, 0x19, 0xe4, 0x4e, 0xe4, 0xfe, 0x9c, 0xf0, 0x28, 0x02, 0xfe, - 0xa6, 0x0c, 0xff, 0x10, 0x00, 0x00, 0xce, 0xfe, 0xa6, 0x18, 0x00, 0xcd, 0xfe, 0x80, 0x01, 0xff, - 0x03, 0x00, 0x00, 0xfe, 0x02, 0x15, 0xfe, 0x0c, 0x05, 0xff, 0x38, 0x00, 0x00, 0xfe, 0x57, 0x24, - 0x00, 0xfe, 0x48, 0x00, 0x50, 0xff, 0x04, 0x00, 0x00, 0x10, 0xff, 0x09, 0x00, 0x00, 0xff, 0x08, + 0x4e, 0x01, 0x4e, 0x0b, 0x1e, 0x0e, 0x0c, 0x10, 0x0a, 0x12, 0x04, 0x13, 0x40, 0x13, 0x30, 0x1c, + 0x00, 0x4e, 0xbd, 0x56, 0x06, 0x83, 0x00, 0xdc, 0x05, 0xf0, 0x09, 0xf0, 0x59, 0xf0, 0xa7, 0xf0, + 0xb8, 0xf0, 0x0e, 0xf7, 0x06, 0x00, 0x19, 0x00, 0x33, 0x00, 0x9b, 0x00, 0xa4, 0x00, 0xb5, 0x00, + 0xba, 0x00, 0xd0, 0x00, 0xe1, 0x00, 0xe7, 0x00, 0xde, 0x03, 0x56, 0x0a, 0x14, 0x0e, 0x02, 0x10, + 0x04, 0x10, 0x0a, 0x10, 0x36, 0x10, 0x0a, 0x13, 0x12, 0x13, 0x52, 0x13, 0x10, 0x15, 0x14, 0x15, + 0xac, 0x16, 0x20, 0x1c, 0x34, 0x1c, 0x36, 0x1c, 0x08, 0x44, 0x38, 0x44, 0x91, 0x44, 0x0a, 0x45, + 0x48, 0x46, 0x01, 0x48, 0x68, 0x54, 0x83, 0x55, 0xb0, 0x57, 0x01, 0x58, 0x83, 0x59, 0x05, 0xe6, + 0x0b, 0xf0, 0x0c, 0xf0, 0x5c, 0xf0, 0x4b, 0xf4, 0x04, 0xf8, 0x05, 0xf8, 0x02, 0xfa, 0x03, 0xfa, + 0x04, 0xfc, 0x05, 0xfc, 0x07, 0x00, 0x0a, 0x00, 0x0d, 0x00, 0x1c, 0x00, 0x9e, 0x00, 0xa8, 0x00, + 0xaa, 0x00, 0xb9, 0x00, 0xe0, 0x00, 0x22, 0x01, 0x26, 0x01, 0x79, 0x01, 0x7a, 0x01, 0xc0, 0x01, + 0xc2, 0x01, 0x7c, 0x02, 0x5a, 0x03, 0xea, 0x04, 0xe8, 0x07, 0x68, 0x08, 0x69, 0x08, 0xba, 0x08, + 0xe9, 0x09, 0x06, 0x0b, 0x3a, 0x0e, 0x00, 0x10, 0x1a, 0x10, 0xed, 0x10, 0xf1, 0x10, 0x06, 0x12, + 0x0c, 0x13, 0x16, 0x13, 0x1e, 0x13, 0x82, 0x13, 0x42, 0x14, 0xd6, 0x14, 0x8a, 0x15, 0xc6, 0x17, + 0xd2, 0x17, 0x6b, 0x18, 0x12, 0x1c, 0x46, 0x1c, 0x9c, 0x32, 0x00, 0x40, 0x0e, 0x47, 0x48, 0x47, + 0x41, 0x48, 0x89, 0x48, 0x80, 0x4c, 0x00, 0x54, 0x44, 0x55, 0xe5, 0x55, 0x14, 0x56, 0x77, 0x57, + 0xbf, 0x57, 0x40, 0x5c, 0x06, 0x80, 0x08, 0x90, 0x03, 0xa1, 0xfe, 0x9c, 0xf0, 0x29, 0x02, 0xfe, + 0xb8, 0x0c, 0xff, 0x10, 0x00, 0x00, 0xd0, 0xfe, 0xcc, 0x18, 0x00, 0xcf, 0xfe, 0x80, 0x01, 0xff, + 0x03, 0x00, 0x00, 0xfe, 0x93, 0x15, 0xfe, 0x0f, 0x05, 0xff, 0x38, 0x00, 0x00, 0xfe, 0x57, 0x24, + 0x00, 0xfe, 0x48, 0x00, 0x4f, 0xff, 0x04, 0x00, 0x00, 0x10, 0xff, 0x09, 0x00, 0x00, 0xff, 0x08, 0x01, 0x01, 0xff, 0x08, 0xff, 0xff, 0xff, 0x27, 0x00, 0x00, 0xff, 0x10, 0xff, 0xff, 0xff, 0x0f, - 0x00, 0x00, 0xfe, 0x78, 0x56, 0xfe, 0x34, 0x12, 0xff, 0x21, 0x00, 0x00, 0xfe, 0x04, 0xf7, 0xcd, - 0x29, 0x67, 0x0a, 0x01, 0xfe, 0xac, 0x0e, 0xfe, 0x04, 0xf7, 0xcd, 0x67, 0x0a, 0x48, 0x29, 0xfe, - 0x3d, 0xf0, 0xfe, 0x02, 0x02, 0xfe, 0x20, 0xf0, 0x9d, 0xfe, 0x91, 0xf0, 0xfe, 0xf0, 0x01, 0xfe, - 0x90, 0xf0, 0xfe, 0xf0, 0x01, 0xfe, 0x8f, 0xf0, 0x9d, 0x04, 0x52, 0x3f, 0x02, 0xfe, 0xc2, 0x0c, - 0x01, 0xfe, 0x28, 0x0d, 0xfe, 0xdd, 0x12, 0xfe, 0xfc, 0x10, 0xfe, 0x28, 0x1c, 0x04, 0xfe, 0xa6, - 0x00, 0xfe, 0xd3, 0x12, 0x47, 0x19, 0xfe, 0xa6, 0x00, 0xb2, 0xfe, 0x48, 0xf0, 0xfe, 0x86, 0x02, + 0x00, 0x00, 0xfe, 0x78, 0x56, 0xfe, 0x34, 0x12, 0xff, 0x21, 0x00, 0x00, 0xfe, 0x04, 0xf7, 0xcf, + 0x2a, 0x67, 0x0b, 0x01, 0xfe, 0xce, 0x0e, 0xfe, 0x04, 0xf7, 0xcf, 0x67, 0x0b, 0x3c, 0x2a, 0xfe, + 0x3d, 0xf0, 0xfe, 0x02, 0x02, 0xfe, 0x20, 0xf0, 0x9c, 0xfe, 0x91, 0xf0, 0xfe, 0xf0, 0x01, 0xfe, + 0x90, 0xf0, 0xfe, 0xf0, 0x01, 0xfe, 0x8f, 0xf0, 0x9c, 0x05, 0x51, 0x3b, 0x02, 0xfe, 0xd4, 0x0c, + 0x01, 0xfe, 0x44, 0x0d, 0xfe, 0xdd, 0x12, 0xfe, 0xfc, 0x10, 0xfe, 0x28, 0x1c, 0x05, 0xfe, 0xa6, + 0x00, 0xfe, 0xd3, 0x12, 0x47, 0x18, 0xfe, 0xa6, 0x00, 0xb5, 0xfe, 0x48, 0xf0, 0xfe, 0x86, 0x02, 0xfe, 0x49, 0xf0, 0xfe, 0xa0, 0x02, 0xfe, 0x4a, 0xf0, 0xfe, 0xbe, 0x02, 0xfe, 0x46, 0xf0, 0xfe, 0x50, 0x02, 0xfe, 0x47, 0xf0, 0xfe, 0x56, 0x02, 0xfe, 0x43, 0xf0, 0xfe, 0x44, 0x02, 0xfe, 0x44, - 0xf0, 0xfe, 0x48, 0x02, 0xfe, 0x45, 0xf0, 0xfe, 0x4c, 0x02, 0x16, 0x0a, 0xa1, 0x16, 0x05, 0x19, - 0x97, 0x02, 0x28, 0xfe, 0x00, 0x1c, 0xdd, 0xfe, 0x02, 0x1c, 0xdc, 0xfe, 0x1e, 0x1c, 0xfe, 0xe9, - 0x10, 0x01, 0xfe, 0xfe, 0x16, 0xfe, 0xe7, 0x10, 0xfe, 0x06, 0xfc, 0xc5, 0x08, 0x6b, 0x01, 0x9f, - 0x02, 0x28, 0x14, 0x4e, 0x3a, 0x98, 0x01, 0xfe, 0x42, 0x0f, 0x08, 0x6b, 0x01, 0x82, 0xfe, 0xbd, - 0x10, 0x08, 0x6b, 0x01, 0x82, 0xfe, 0xad, 0x10, 0xfe, 0x16, 0x1c, 0xfe, 0x58, 0x1c, 0x16, 0x05, - 0x19, 0x97, 0x29, 0x24, 0x28, 0xfe, 0x3d, 0xf0, 0xfe, 0x02, 0x02, 0x20, 0xfe, 0x94, 0x02, 0xfe, - 0x5a, 0x1c, 0xe7, 0xfe, 0x14, 0x1c, 0x14, 0xfe, 0x30, 0x00, 0x3a, 0x98, 0x01, 0xfe, 0x32, 0x0f, - 0x16, 0x05, 0x19, 0x97, 0x02, 0xce, 0x1d, 0x1f, 0x06, 0x10, 0x37, 0xfe, 0x69, 0x10, 0x16, 0x05, - 0x19, 0x97, 0xfe, 0x04, 0xec, 0x1f, 0x5f, 0x40, 0x12, 0x1f, 0xfe, 0x05, 0xf6, 0xc5, 0x01, 0xfe, - 0x30, 0x16, 0x0b, 0x4b, 0x4d, 0x38, 0x11, 0x2d, 0x48, 0xb4, 0x01, 0xe3, 0x02, 0x28, 0x08, 0x3c, - 0x01, 0x0e, 0x06, 0x00, 0x46, 0x01, 0x6e, 0xfe, 0x20, 0x10, 0x08, 0x9a, 0x01, 0x0e, 0xfe, 0x41, - 0x58, 0x08, 0x3c, 0x01, 0x0e, 0xfe, 0x49, 0x54, 0x64, 0xfe, 0x0c, 0x03, 0x01, 0xe3, 0x02, 0x28, - 0x29, 0x5f, 0xfe, 0x02, 0xe8, 0x26, 0xf5, 0xfe, 0x9e, 0x43, 0xf4, 0xfe, 0x27, 0xf0, 0xfe, 0xdc, - 0x01, 0xfe, 0x07, 0x4b, 0xfe, 0x20, 0xf0, 0x9d, 0xfe, 0x40, 0x1c, 0x24, 0xd0, 0xfe, 0x26, 0xf0, - 0xfe, 0x5e, 0x03, 0xfe, 0xa0, 0xf0, 0xfe, 0x4c, 0x03, 0xfe, 0x11, 0xf0, 0x9d, 0xd9, 0xfe, 0x9f, - 0xf0, 0xfe, 0x6c, 0x03, 0xe8, 0x0f, 0xfe, 0x11, 0x00, 0x02, 0x5b, 0x29, 0xfe, 0x48, 0x1c, 0xe8, - 0x22, 0x1d, 0x99, 0xa9, 0x12, 0x99, 0x08, 0x3c, 0x01, 0x0e, 0xa9, 0x74, 0x01, 0xfe, 0x9a, 0x15, - 0x11, 0xc8, 0x24, 0xd0, 0xfe, 0x01, 0xf0, 0xd0, 0xfe, 0x82, 0xf0, 0xfe, 0x92, 0x03, 0xe9, 0x11, - 0xfe, 0xe4, 0x00, 0x65, 0xfe, 0xa4, 0x03, 0x24, 0x33, 0x1e, 0xfe, 0xb4, 0x03, 0x01, 0x45, 0xfe, - 0x06, 0xf0, 0xfe, 0xc4, 0x03, 0x8e, 0x81, 0xfe, 0x0a, 0xf0, 0xfe, 0x6a, 0x06, 0x02, 0x21, 0x04, - 0x6b, 0x27, 0x18, 0xfe, 0xe6, 0x04, 0x14, 0x2b, 0x01, 0x36, 0x90, 0xfe, 0x66, 0x02, 0x02, 0xcf, - 0xe8, 0x29, 0x67, 0x1a, 0xfe, 0x67, 0x1b, 0xf5, 0xf4, 0xfe, 0x48, 0x1c, 0x6f, 0x01, 0x85, 0x89, - 0x08, 0x3c, 0x01, 0x0e, 0x06, 0x00, 0x18, 0xd1, 0x08, 0xc8, 0x01, 0x0e, 0x73, 0x61, 0x5a, 0x76, - 0x26, 0x04, 0x6b, 0x27, 0xfe, 0x10, 0x12, 0x14, 0x2b, 0x01, 0x36, 0x90, 0xfe, 0x66, 0x02, 0x02, - 0xcf, 0xba, 0x7d, 0xbb, 0x7f, 0x24, 0x21, 0x65, 0xfe, 0x3c, 0x04, 0x1e, 0xfe, 0x38, 0x04, 0x68, - 0xfe, 0xa0, 0x00, 0xfe, 0x9b, 0x57, 0xfe, 0x46, 0x12, 0x2a, 0xff, 0x02, 0x00, 0x10, 0x01, 0x07, - 0x1e, 0xfe, 0xd0, 0x04, 0x2a, 0x01, 0x07, 0x1e, 0x21, 0x31, 0x2f, 0xd3, 0xfe, 0x4c, 0x44, 0xfe, - 0x3c, 0x12, 0x61, 0xfe, 0x44, 0x48, 0x13, 0x2b, 0xfe, 0x4c, 0x54, 0x64, 0xd1, 0x5f, 0x76, 0x26, - 0xf7, 0xec, 0xfe, 0x52, 0x13, 0x30, 0x06, 0x7e, 0xfe, 0x4a, 0x13, 0xfe, 0x18, 0x10, 0x13, 0x2b, - 0xfe, 0x4c, 0x54, 0x64, 0xd1, 0xf7, 0xec, 0xfe, 0x38, 0x13, 0x30, 0x06, 0x7e, 0x86, 0x0b, 0x09, - 0x2c, 0xfe, 0x1c, 0x12, 0x14, 0x93, 0x0b, 0x09, 0x05, 0x3f, 0x14, 0xc2, 0x01, 0x36, 0x90, 0xfe, - 0x5e, 0x0c, 0x02, 0x21, 0x2a, 0x11, 0xfe, 0xe6, 0x00, 0xfe, 0x1c, 0x90, 0xf6, 0x03, 0x14, 0x93, - 0x01, 0x36, 0x02, 0x28, 0xfe, 0x42, 0x5b, 0x67, 0x1a, 0xfe, 0x46, 0x59, 0xf5, 0xf4, 0xfe, 0x87, - 0x80, 0xfe, 0x31, 0xe4, 0x50, 0x0b, 0x09, 0x0a, 0xfe, 0x78, 0x13, 0xfe, 0x20, 0x80, 0x06, 0x1a, - 0xfe, 0x70, 0x12, 0x4a, 0x09, 0x05, 0x87, 0x04, 0xfe, 0xa2, 0x00, 0x27, 0x18, 0xfe, 0x70, 0x05, - 0xfe, 0x31, 0xe4, 0x6a, 0x4a, 0x09, 0x0a, 0xfe, 0x4a, 0x13, 0x04, 0xfe, 0xa0, 0x00, 0x27, 0xfe, - 0x42, 0x12, 0x5e, 0x01, 0x07, 0x24, 0x33, 0xee, 0x01, 0x07, 0x25, 0xfe, 0x88, 0x05, 0x11, 0xfe, - 0xe3, 0x00, 0x22, 0x4a, 0xfe, 0x4a, 0xf0, 0xfe, 0x5a, 0x05, 0xfe, 0x49, 0xf0, 0xfe, 0x54, 0x05, - 0x35, 0x23, 0xfe, 0x21, 0x00, 0x34, 0x23, 0xfe, 0x22, 0x00, 0xa1, 0x23, 0x4d, 0xfe, 0x09, 0x48, - 0x01, 0x07, 0x25, 0xfe, 0x88, 0x05, 0xfe, 0xe2, 0x08, 0x4a, 0x09, 0xc3, 0x3f, 0x01, 0x5d, 0x23, - 0x05, 0x12, 0xca, 0x3a, 0xfe, 0x27, 0x01, 0x0b, 0x09, 0x2c, 0xfe, 0x22, 0x12, 0x47, 0x01, 0xa4, - 0x14, 0x93, 0x0b, 0x09, 0x05, 0x3f, 0x14, 0xc2, 0x01, 0x36, 0x90, 0xfe, 0x5e, 0x0c, 0x02, 0x21, - 0x04, 0xfe, 0x9c, 0x00, 0x27, 0xfe, 0x3e, 0x12, 0x04, 0x51, 0x27, 0xfe, 0x36, 0x13, 0x47, 0x01, - 0xa4, 0x25, 0xfe, 0xf8, 0x05, 0x08, 0x05, 0x4a, 0x09, 0x17, 0xfe, 0x02, 0x12, 0x60, 0x01, 0xfe, - 0x88, 0x14, 0x1e, 0xfe, 0xee, 0x05, 0x11, 0x9b, 0x01, 0x45, 0x11, 0xfe, 0xe5, 0x00, 0x04, 0x51, - 0xb1, 0x0c, 0x51, 0x04, 0xc4, 0x27, 0xfe, 0x62, 0x12, 0x04, 0x42, 0x27, 0xfe, 0x5a, 0x13, 0x01, - 0xfe, 0xee, 0x17, 0x01, 0xfe, 0x40, 0x18, 0xfe, 0x43, 0x48, 0xb5, 0x17, 0x13, 0x6c, 0xff, 0x02, - 0x00, 0x57, 0x49, 0x8c, 0x1c, 0x40, 0x84, 0xb5, 0x69, 0x47, 0x01, 0xa4, 0x25, 0xfe, 0x62, 0x06, - 0x4a, 0x09, 0x1b, 0xde, 0x8b, 0x08, 0x4e, 0x01, 0xe2, 0x1e, 0xfe, 0x58, 0x06, 0x11, 0x9b, 0x01, - 0x45, 0x11, 0xfe, 0xe5, 0x00, 0x04, 0x42, 0xb1, 0x0c, 0x42, 0x16, 0x05, 0x01, 0xa4, 0xe9, 0x71, - 0x6f, 0x01, 0x85, 0x89, 0x11, 0xfe, 0xe2, 0x00, 0x01, 0x07, 0x24, 0x33, 0xfe, 0x0a, 0xf0, 0xfe, - 0x96, 0x06, 0x8d, 0xfe, 0x4c, 0x07, 0xfe, 0x06, 0xf0, 0xfe, 0x54, 0x07, 0x8e, 0x81, 0x02, 0x21, - 0x0b, 0x09, 0x0a, 0xfe, 0x2e, 0x12, 0x15, 0x1a, 0x01, 0x07, 0x15, 0x00, 0x01, 0x07, 0x15, 0x00, - 0x01, 0x07, 0x15, 0x00, 0x01, 0x07, 0xfe, 0x99, 0xa4, 0x01, 0x07, 0x15, 0x00, 0x02, 0xfe, 0x22, - 0x08, 0x75, 0x09, 0x1b, 0xfe, 0x38, 0x12, 0x0b, 0x09, 0x1b, 0x86, 0x15, 0xfe, 0x1b, 0x00, 0x01, - 0x07, 0x15, 0x00, 0x01, 0x07, 0x15, 0x00, 0x01, 0x07, 0x15, 0x00, 0x01, 0x07, 0x15, 0x05, 0x01, - 0x07, 0x15, 0x00, 0x02, 0xd7, 0x66, 0x4d, 0xfe, 0x3a, 0x55, 0x60, 0xfe, 0x9a, 0x81, 0x4c, 0x2c, - 0xb8, 0xfe, 0x22, 0x07, 0x08, 0x2c, 0xfe, 0x09, 0x6f, 0xac, 0xfe, 0xca, 0x45, 0xfe, 0x32, 0x12, - 0x62, 0x2b, 0x84, 0x66, 0x7b, 0x01, 0x07, 0x24, 0x33, 0xfe, 0x0a, 0xf0, 0xfe, 0x22, 0x07, 0x8e, - 0x81, 0x8d, 0xfe, 0x4c, 0x07, 0x02, 0x21, 0x01, 0x45, 0x02, 0xfe, 0x7a, 0x06, 0x15, 0x17, 0x02, - 0xfe, 0x7a, 0x06, 0xfe, 0x9c, 0xf7, 0xd2, 0xfe, 0x2c, 0x90, 0xfe, 0xae, 0x90, 0x77, 0xfe, 0xba, - 0x07, 0x0c, 0x55, 0x19, 0x56, 0x0b, 0x4b, 0x6a, 0x38, 0x1d, 0x1f, 0x06, 0x10, 0xfe, 0x0e, 0x12, - 0x73, 0xfe, 0x80, 0x80, 0x3a, 0x1f, 0x63, 0x26, 0xfe, 0x06, 0x10, 0xfe, 0x83, 0xe7, 0xc2, 0x34, - 0xfe, 0x03, 0x40, 0x0b, 0x4b, 0x50, 0x38, 0x01, 0xa5, 0xaa, 0xfe, 0x1f, 0x40, 0x12, 0x59, 0x01, - 0x86, 0xfe, 0x08, 0x50, 0xfe, 0x8a, 0x50, 0xfe, 0x44, 0x51, 0xfe, 0xc6, 0x51, 0x35, 0xf8, 0xfe, - 0x8a, 0x90, 0x0c, 0x53, 0x19, 0x54, 0xfe, 0x0c, 0x90, 0xfe, 0x8e, 0x90, 0xfe, 0x40, 0x50, 0xfe, - 0xc2, 0x50, 0x0c, 0x3d, 0x19, 0x3e, 0xfe, 0x4a, 0x10, 0x0b, 0x09, 0x6a, 0xfe, 0x2a, 0x12, 0xfe, - 0x2c, 0x90, 0xfe, 0xae, 0x90, 0x0c, 0x55, 0x19, 0x56, 0x0b, 0x09, 0x50, 0x84, 0x01, 0xa5, 0xfe, - 0x1f, 0x80, 0x12, 0x59, 0xfe, 0x44, 0x90, 0xfe, 0xc6, 0x90, 0x0c, 0x57, 0x19, 0x58, 0xf8, 0xfe, - 0x8a, 0x90, 0x0c, 0x53, 0x19, 0x54, 0xfe, 0x40, 0x90, 0xfe, 0xc2, 0x90, 0x0c, 0x3d, 0x19, 0x3e, - 0x0c, 0x3b, 0x19, 0x4f, 0x0b, 0x4b, 0x17, 0x38, 0x29, 0x13, 0xfe, 0x4e, 0x11, 0x65, 0xfe, 0x38, - 0x08, 0xfe, 0x9e, 0xf0, 0xfe, 0x4c, 0x08, 0xae, 0x18, 0x33, 0x29, 0x72, 0xdc, 0xb6, 0xfe, 0x70, - 0x08, 0xb7, 0xfe, 0x8e, 0x08, 0x8d, 0xfe, 0x64, 0x08, 0xfe, 0x06, 0xf0, 0xfe, 0x6a, 0x08, 0x8e, - 0x81, 0x02, 0x21, 0x01, 0x45, 0xfe, 0xc9, 0x10, 0x15, 0x17, 0xfe, 0xc9, 0x10, 0x75, 0x09, 0x05, - 0xfe, 0x10, 0x12, 0x75, 0x09, 0x0a, 0x5c, 0x0b, 0x09, 0x0a, 0xfe, 0x68, 0x12, 0xfe, 0x2e, 0x1c, - 0x02, 0xfe, 0x14, 0x0a, 0x75, 0x09, 0x05, 0x5c, 0x75, 0x09, 0x0a, 0xfe, 0x52, 0x12, 0xfe, 0x2c, - 0x1c, 0xfe, 0xaa, 0xf0, 0xfe, 0x0e, 0x09, 0xfe, 0xac, 0xf0, 0xfe, 0xae, 0x08, 0xfe, 0x8a, 0x10, - 0xa7, 0xfe, 0xf3, 0x10, 0xfe, 0xad, 0xf0, 0xfe, 0xba, 0x08, 0x02, 0xfe, 0x14, 0x0a, 0xa8, 0xfe, - 0xe7, 0x10, 0xfe, 0x2b, 0xf0, 0x9e, 0xe6, 0x1c, 0xfe, 0x00, 0xfe, 0xfe, 0x1c, 0x12, 0xb2, 0xfe, - 0xd2, 0xf0, 0x9e, 0xfe, 0x76, 0x18, 0x1c, 0x1a, 0x18, 0x9e, 0x04, 0xc9, 0x1c, 0x05, 0x18, 0x9e, - 0xb6, 0x6d, 0xb7, 0x6d, 0xa7, 0xa8, 0xfe, 0xb1, 0x10, 0x6f, 0x5e, 0x2a, 0x14, 0x93, 0x01, 0x36, - 0x0f, 0xfe, 0x35, 0x00, 0xfe, 0x01, 0xf0, 0x5b, 0x0f, 0x7c, 0x02, 0x5b, 0xfe, 0x74, 0x18, 0x1c, - 0xfe, 0x00, 0xf8, 0x18, 0x6d, 0x67, 0x1b, 0x01, 0xfe, 0x28, 0x0d, 0x3f, 0x01, 0xe3, 0x1d, 0x26, - 0x73, 0x67, 0x1a, 0x02, 0x6d, 0xfe, 0x98, 0x80, 0xfb, 0x0a, 0x20, 0xfe, 0xf6, 0x09, 0x0b, 0x09, - 0x6a, 0xfe, 0x82, 0x12, 0x0b, 0x09, 0x17, 0xfe, 0x66, 0x13, 0x1d, 0x59, 0xa9, 0xf9, 0xfe, 0x83, - 0x80, 0xfe, 0xc8, 0x44, 0xfe, 0x2e, 0x13, 0xfe, 0x04, 0x91, 0xfe, 0x86, 0x91, 0x63, 0x26, 0xfe, - 0x40, 0x59, 0xfe, 0xc1, 0x59, 0x77, 0xd5, 0x04, 0x55, 0x32, 0x56, 0x0c, 0x7b, 0x19, 0x7c, 0xbc, - 0x55, 0xbd, 0x56, 0x01, 0xa5, 0xaa, 0x63, 0x26, 0x12, 0x59, 0xbe, 0x3b, 0xbf, 0x4f, 0x79, 0x57, - 0x68, 0x58, 0xf1, 0xf2, 0xfe, 0x04, 0xfa, 0x3b, 0xfe, 0x05, 0xfa, 0x4f, 0x01, 0x86, 0xfe, 0x36, - 0x10, 0x22, 0x0c, 0x7b, 0x0c, 0x7c, 0x79, 0x57, 0x68, 0x58, 0xfe, 0x12, 0x10, 0x0b, 0x09, 0x17, - 0x18, 0xd5, 0x79, 0x3d, 0x68, 0x3e, 0x0b, 0x09, 0xfe, 0xf7, 0x00, 0x38, 0x04, 0x53, 0x32, 0x54, - 0xfe, 0x10, 0x58, 0xfe, 0x91, 0x58, 0xfe, 0x14, 0x59, 0xfe, 0x95, 0x59, 0x02, 0x6d, 0x0b, 0x09, - 0x17, 0x18, 0xd5, 0x0b, 0x09, 0xfe, 0xf7, 0x00, 0x38, 0xfe, 0x3a, 0x55, 0xfe, 0x19, 0x81, 0x60, - 0xfe, 0x10, 0x90, 0xfe, 0x92, 0x90, 0xfe, 0xd7, 0x10, 0x30, 0x06, 0x9c, 0x18, 0xfe, 0xb6, 0x08, - 0x11, 0x9c, 0xfe, 0x98, 0x80, 0xfb, 0x0a, 0xfe, 0x14, 0x13, 0x04, 0x3d, 0x32, 0x3e, 0x77, 0xfe, - 0xb6, 0x08, 0xfe, 0x0c, 0x58, 0xfe, 0x8d, 0x58, 0x02, 0x6d, 0x22, 0x47, 0xfe, 0x19, 0x80, 0xdd, - 0x0b, 0x09, 0x0a, 0xfe, 0x1a, 0x12, 0xfe, 0x6c, 0x19, 0xfe, 0x19, 0x41, 0xe6, 0xb2, 0xfe, 0xd1, - 0xf0, 0xd7, 0x14, 0x7a, 0x01, 0x36, 0x0f, 0xfe, 0x44, 0x00, 0xfe, 0x8e, 0x10, 0xfe, 0x6c, 0x19, - 0xbc, 0x3d, 0xfe, 0xed, 0x19, 0xbd, 0x3e, 0xfe, 0x0c, 0x51, 0xfe, 0x8e, 0x51, 0xe6, 0x1c, 0xfe, - 0x00, 0xff, 0x37, 0xfe, 0x74, 0x10, 0xb2, 0xfe, 0xd2, 0xf0, 0xfe, 0xa2, 0x0a, 0xfe, 0x76, 0x18, - 0x1c, 0x1a, 0x83, 0x04, 0xc9, 0x1c, 0x05, 0xfe, 0x08, 0x13, 0x0f, 0xfe, 0x16, 0x00, 0x02, 0x5b, - 0xfe, 0xd1, 0xf0, 0xfe, 0xb4, 0x0a, 0x14, 0x7a, 0x01, 0x36, 0x0f, 0xfe, 0x17, 0x00, 0xfe, 0x42, - 0x10, 0xfe, 0xce, 0xf0, 0xfe, 0xba, 0x0a, 0xfe, 0x3c, 0x10, 0xfe, 0xcd, 0xf0, 0xfe, 0xc6, 0x0a, - 0x0f, 0xfe, 0x22, 0x00, 0x02, 0x5b, 0xfe, 0xcb, 0xf0, 0xfe, 0xd2, 0x0a, 0x0f, 0xfe, 0x24, 0x00, - 0x02, 0x5b, 0xfe, 0xd0, 0xf0, 0xfe, 0xdc, 0x0a, 0x0f, 0x94, 0xdb, 0xfe, 0xcf, 0xf0, 0xfe, 0xe6, - 0x0a, 0x0f, 0x4d, 0xfe, 0x10, 0x10, 0xfe, 0xcc, 0xf0, 0xd7, 0xfe, 0x84, 0x80, 0xfb, 0x17, 0x3f, - 0x0f, 0xfe, 0x12, 0x00, 0x29, 0x13, 0xfe, 0x4e, 0x11, 0x65, 0xfe, 0xfc, 0x0a, 0xfe, 0x9e, 0xf0, - 0xfe, 0x10, 0x0b, 0xae, 0x18, 0x33, 0x29, 0x72, 0xdc, 0xb6, 0x21, 0xb7, 0x21, 0x29, 0xe9, 0x65, - 0xfe, 0x1c, 0x0b, 0x24, 0x33, 0x8d, 0xfe, 0x38, 0x0b, 0x8e, 0x81, 0xb6, 0xd2, 0xb7, 0xd2, 0x02, - 0x21, 0x01, 0x45, 0xfe, 0xdb, 0x10, 0x11, 0xfe, 0xe8, 0x00, 0xa7, 0xa8, 0x6f, 0xba, 0x7d, 0xbb, - 0x7f, 0xfe, 0x89, 0xf0, 0x21, 0x31, 0x2f, 0xd6, 0xba, 0x7d, 0xbb, 0x7f, 0x01, 0x07, 0x1e, 0x21, - 0x31, 0x2f, 0xd4, 0xae, 0x5c, 0x0f, 0xfe, 0x42, 0x00, 0x02, 0x5b, 0x78, 0x05, 0xfe, 0x81, 0x49, - 0xfe, 0xa2, 0x12, 0x0b, 0x09, 0x0a, 0xfe, 0x44, 0x13, 0x0f, 0x00, 0x4c, 0x0a, 0xfe, 0x54, 0x12, - 0x4c, 0xfe, 0x28, 0x00, 0x20, 0xfe, 0x94, 0x0c, 0x08, 0x3c, 0x01, 0x0e, 0x06, 0x00, 0x46, 0x41, - 0xfe, 0x28, 0x00, 0xfe, 0xe2, 0x10, 0x01, 0xe4, 0x01, 0xe5, 0x08, 0x9a, 0x01, 0xfe, 0x16, 0x0e, - 0x5a, 0x11, 0x2d, 0x01, 0x6e, 0x02, 0x28, 0x0f, 0xfe, 0x44, 0x00, 0x4c, 0x0a, 0xde, 0x41, 0x0a, - 0xfe, 0xb4, 0x10, 0x01, 0x5d, 0x41, 0x0a, 0xfe, 0xaa, 0x10, 0x01, 0x5d, 0xfe, 0x19, 0x82, 0xfe, - 0x34, 0x46, 0xa2, 0x41, 0x0a, 0x0f, 0xfe, 0x43, 0x00, 0xfe, 0x96, 0x10, 0x0b, 0x4b, 0x0a, 0x38, - 0x01, 0xe4, 0x01, 0xe5, 0x5a, 0x11, 0x2d, 0x01, 0x6e, 0x67, 0x0a, 0x5a, 0x48, 0xb4, 0x02, 0xfe, - 0x32, 0x03, 0x0b, 0x09, 0x0a, 0x83, 0x41, 0x0a, 0x0f, 0x00, 0xfe, 0x5c, 0x10, 0x75, 0x09, 0x1b, - 0xfe, 0x58, 0x12, 0x0b, 0x09, 0x1b, 0xfe, 0x50, 0x13, 0xfe, 0x1c, 0x1c, 0xfe, 0x9d, 0xf0, 0xfe, - 0x4a, 0x0c, 0xfe, 0x1c, 0x1c, 0xfe, 0x9d, 0xf0, 0xfe, 0x50, 0x0c, 0x0b, 0x4b, 0x1b, 0x38, 0xfe, - 0xa9, 0x10, 0x0f, 0xfe, 0x15, 0x00, 0xfe, 0x04, 0xe6, 0x0a, 0x60, 0xfe, 0x2e, 0x10, 0x0f, 0xfe, - 0x13, 0x00, 0xfe, 0x10, 0x10, 0x0f, 0xfe, 0x47, 0x00, 0x34, 0x0f, 0xfe, 0x41, 0x00, 0xa1, 0x0f, - 0xfe, 0x24, 0x00, 0x89, 0xa7, 0xa8, 0x6f, 0x04, 0x6b, 0x27, 0x20, 0xcf, 0x60, 0xfe, 0x04, 0xe6, - 0x1b, 0xfe, 0x9d, 0x41, 0xfe, 0x1c, 0x42, 0x5a, 0x01, 0xd8, 0x02, 0x28, 0xe7, 0x14, 0x0a, 0x3a, - 0x96, 0xa6, 0x14, 0xfe, 0x31, 0x00, 0x3a, 0x98, 0x01, 0xfe, 0x32, 0x0f, 0x02, 0xce, 0x48, 0xfe, - 0x06, 0xec, 0xc7, 0xeb, 0x41, 0x2c, 0xfe, 0xce, 0x45, 0x37, 0x48, 0xfe, 0x06, 0xea, 0xc7, 0xfe, - 0x47, 0x4b, 0x8b, 0xfe, 0x75, 0x57, 0x04, 0x52, 0xfe, 0x98, 0x56, 0xfe, 0x2e, 0x12, 0x08, 0x3c, - 0x01, 0x0e, 0x47, 0xfe, 0x41, 0x58, 0x08, 0x9a, 0x01, 0x0e, 0xfe, 0x49, 0x54, 0x8f, 0xfe, 0x0e, - 0x0d, 0x08, 0x44, 0x01, 0x0e, 0xfe, 0x44, 0x48, 0x02, 0xfe, 0x32, 0x03, 0x08, 0x52, 0x88, 0xeb, - 0x41, 0x2c, 0xfe, 0xce, 0x45, 0x37, 0x48, 0xfe, 0xce, 0x47, 0xfe, 0xb7, 0x13, 0x02, 0x28, 0x1d, - 0x1f, 0x06, 0x10, 0xfe, 0x9e, 0x12, 0x22, 0x12, 0x4e, 0x12, 0x95, 0x12, 0xcc, 0x1d, 0x2d, 0x47, - 0x3a, 0x2d, 0xae, 0xfe, 0x0c, 0x13, 0xfe, 0xbc, 0xf0, 0xfe, 0xd0, 0x0d, 0x13, 0x05, 0x12, 0x4e, - 0x01, 0xfe, 0xc0, 0x15, 0x04, 0xfe, 0x38, 0x01, 0x32, 0xfe, 0x3a, 0x01, 0x77, 0xfe, 0xd4, 0x0d, - 0xfe, 0x02, 0xec, 0xcc, 0x62, 0x00, 0x46, 0xfe, 0x04, 0xec, 0x1f, 0x5f, 0xfe, 0x05, 0xf6, 0xfe, - 0x34, 0x01, 0x01, 0xfe, 0x30, 0x16, 0xf8, 0xfe, 0x48, 0xf4, 0x0d, 0xfe, 0x18, 0x13, 0xac, 0xfe, - 0x02, 0xea, 0xcc, 0x62, 0x7a, 0xfe, 0xc5, 0x13, 0x14, 0x1b, 0x3a, 0x96, 0xa6, 0xfe, 0x2e, 0x10, - 0x04, 0xfe, 0x38, 0x01, 0x1c, 0xfe, 0xf0, 0xff, 0x0c, 0xfe, 0x60, 0x01, 0x04, 0xfe, 0x3a, 0x01, - 0x0c, 0xfe, 0x62, 0x01, 0x40, 0x12, 0x1f, 0x23, 0x05, 0x12, 0x2d, 0x11, 0x2d, 0xb4, 0x13, 0x05, - 0x03, 0x22, 0x03, 0x1d, 0x4e, 0xfe, 0xf7, 0x12, 0x1d, 0x95, 0xa9, 0x12, 0x95, 0x06, 0x7a, 0xfe, - 0x71, 0x13, 0xfe, 0x24, 0x1c, 0x14, 0x1a, 0x3a, 0x96, 0xa6, 0xfe, 0xd9, 0x10, 0xb3, 0xfe, 0x03, - 0xdc, 0xfe, 0x73, 0x57, 0xfe, 0x80, 0x5d, 0x03, 0xb3, 0xfe, 0x03, 0xdc, 0xfe, 0x5b, 0x57, 0xfe, - 0x80, 0x5d, 0x03, 0xfe, 0x03, 0x57, 0xb3, 0x22, 0xfa, 0x03, 0xfe, 0x03, 0x57, 0xb3, 0x74, 0x03, - 0x0b, 0x09, 0x4d, 0xfe, 0x22, 0x13, 0xfe, 0x1c, 0x80, 0x06, 0x05, 0xfe, 0x1a, 0x13, 0xfe, 0x1e, - 0x80, 0xdf, 0xfe, 0x1d, 0x80, 0xa3, 0xfe, 0x0c, 0x90, 0x85, 0xfe, 0x0e, 0x90, 0xa2, 0xfe, 0x3c, - 0x90, 0xfe, 0x30, 0xf4, 0x0a, 0xfe, 0x3c, 0x50, 0xa1, 0x01, 0xfe, 0x60, 0x16, 0x30, 0x06, 0x2d, - 0x46, 0x01, 0xfe, 0x9a, 0x15, 0xfe, 0x08, 0x10, 0x01, 0xe4, 0x01, 0xe5, 0x11, 0xfe, 0xe9, 0x00, - 0x0b, 0x09, 0x4d, 0xfe, 0x2c, 0x13, 0x01, 0xfe, 0xf2, 0x15, 0xfe, 0x1e, 0x1c, 0xfe, 0x14, 0x90, - 0x0c, 0xfe, 0x64, 0x01, 0xfe, 0x16, 0x90, 0x0c, 0xfe, 0x66, 0x01, 0x0b, 0x09, 0x50, 0xfe, 0x12, - 0x12, 0xfe, 0x03, 0x80, 0x73, 0xfe, 0x01, 0xec, 0x1f, 0xfe, 0x80, 0x40, 0x12, 0x1f, 0x63, 0x26, - 0x11, 0xc6, 0x5a, 0x1d, 0x1f, 0xea, 0x76, 0x1f, 0x03, 0xfe, 0x08, 0x1c, 0x04, 0xfe, 0xac, 0x00, - 0xfe, 0x06, 0x58, 0x04, 0xfe, 0xae, 0x00, 0xfe, 0x07, 0x58, 0x04, 0xfe, 0xb0, 0x00, 0xfe, 0x08, - 0x58, 0x04, 0xfe, 0xb2, 0x00, 0xfe, 0x09, 0x58, 0xfe, 0x0a, 0x1c, 0x23, 0x69, 0x12, 0xc7, 0x22, - 0x0c, 0x51, 0x0c, 0x42, 0x13, 0x3c, 0x49, 0x60, 0x16, 0x2c, 0xfe, 0x90, 0x4d, 0xfe, 0x91, 0x54, - 0x20, 0xfe, 0xe6, 0x0e, 0x41, 0x10, 0x13, 0x44, 0x49, 0x16, 0x4d, 0xfe, 0x90, 0x4d, 0xfe, 0x91, - 0x54, 0x20, 0xfe, 0xfc, 0x0e, 0x23, 0x10, 0x12, 0x1f, 0x78, 0x2b, 0x5f, 0x1d, 0x1f, 0xea, 0x76, - 0x1f, 0x11, 0xc6, 0xf3, 0xfe, 0xd6, 0xf0, 0xfe, 0x10, 0x0f, 0xe7, 0x6f, 0xfe, 0x14, 0x1c, 0xfe, - 0x10, 0x1c, 0xfe, 0x18, 0x1c, 0x03, 0x48, 0xfe, 0x0c, 0x14, 0xeb, 0xfe, 0x07, 0xe6, 0x2c, 0xfe, - 0xce, 0x47, 0xfe, 0xf5, 0x13, 0x03, 0x01, 0x5d, 0x78, 0x2b, 0x5f, 0xf7, 0xec, 0xfe, 0x42, 0x13, - 0x30, 0x06, 0x2d, 0xfe, 0x34, 0x13, 0x08, 0x44, 0x01, 0x0e, 0xad, 0xfe, 0x36, 0x12, 0xed, 0xfe, - 0x45, 0x48, 0x01, 0x87, 0xfa, 0xad, 0xfe, 0xf3, 0x13, 0x40, 0x74, 0x06, 0x10, 0xa2, 0x08, 0x80, - 0x01, 0x0e, 0xfe, 0x80, 0x5c, 0x01, 0x6e, 0xd9, 0x06, 0x7e, 0x5c, 0xf3, 0xfe, 0xd6, 0xf0, 0xfe, - 0x4a, 0x0f, 0x03, 0xfe, 0x44, 0x58, 0x73, 0xfe, 0x01, 0xec, 0x98, 0xfe, 0x9e, 0x40, 0xfe, 0x9d, - 0xe7, 0x00, 0xfe, 0x9c, 0xe7, 0x1b, 0x76, 0x26, 0x01, 0xd8, 0xfe, 0xdd, 0x10, 0x29, 0xba, 0x7d, - 0xbb, 0x7f, 0x31, 0x2f, 0xd3, 0x06, 0x1b, 0xfe, 0x48, 0x12, 0x06, 0x0a, 0xfe, 0x56, 0x12, 0x06, - 0x1a, 0xfe, 0x30, 0x12, 0x06, 0xc0, 0x18, 0xfe, 0x1c, 0x11, 0x06, 0xfe, 0x23, 0x00, 0x18, 0xfe, - 0x28, 0x11, 0x06, 0x05, 0x18, 0xfe, 0x86, 0x11, 0x06, 0x17, 0xfe, 0x12, 0x12, 0x06, 0x00, 0x18, - 0x21, 0x14, 0xc0, 0x01, 0x36, 0xa0, 0x2a, 0x01, 0x07, 0x8d, 0x45, 0x03, 0x2a, 0xfe, 0x62, 0x08, - 0x08, 0xc8, 0x01, 0xfe, 0x16, 0x0e, 0x11, 0x7e, 0x02, 0x28, 0x2a, 0x30, 0x06, 0x9c, 0xfe, 0xd9, - 0x13, 0x79, 0x3d, 0x68, 0x3e, 0x77, 0xfe, 0xda, 0x10, 0x0b, 0x09, 0x6a, 0xfe, 0x72, 0x12, 0xbe, - 0x3b, 0xbf, 0x4f, 0xf1, 0xf2, 0x8f, 0xfe, 0xa4, 0x10, 0x1d, 0x59, 0xfe, 0x26, 0x13, 0x04, 0x7b, - 0x32, 0x7c, 0x77, 0xfe, 0x70, 0x0c, 0x0c, 0x55, 0x19, 0x56, 0x22, 0x0c, 0x7b, 0x0c, 0x7c, 0x01, - 0xa5, 0x23, 0x69, 0x72, 0x12, 0x59, 0x01, 0x86, 0xbe, 0x3b, 0xbf, 0x4f, 0xfe, 0x04, 0x55, 0xfe, - 0xa5, 0x55, 0xfe, 0x04, 0xfa, 0x3b, 0xfe, 0x05, 0xfa, 0x4f, 0xfe, 0x91, 0x10, 0x04, 0x57, 0x32, - 0x58, 0xfe, 0x40, 0x56, 0xfe, 0xe1, 0x56, 0x0c, 0x57, 0x19, 0x58, 0x35, 0xbe, 0x3b, 0xbf, 0x4f, - 0xf1, 0xf2, 0x04, 0x53, 0x32, 0x54, 0xfe, 0x00, 0x56, 0xfe, 0xa1, 0x56, 0x0c, 0x53, 0x19, 0x54, - 0x0b, 0x09, 0x6a, 0xfe, 0x1e, 0x12, 0x1d, 0x59, 0xfe, 0x1f, 0x40, 0x04, 0x55, 0x32, 0x56, 0xfe, - 0x2c, 0x50, 0xfe, 0xae, 0x50, 0x04, 0x57, 0x32, 0x58, 0xfe, 0x44, 0x50, 0xfe, 0xc6, 0x50, 0x04, - 0x53, 0x32, 0x54, 0xfe, 0x08, 0x50, 0xfe, 0x8a, 0x50, 0x04, 0x3d, 0x32, 0x3e, 0xfe, 0x40, 0x50, - 0xfe, 0xc2, 0x50, 0x02, 0x35, 0x23, 0x05, 0x12, 0xcb, 0x02, 0x34, 0x2a, 0x01, 0x07, 0x1e, 0x2e, - 0x31, 0x2f, 0xd3, 0x06, 0x05, 0x20, 0x2e, 0x30, 0x06, 0x9c, 0x20, 0x34, 0x01, 0x85, 0x1c, 0x40, - 0x18, 0x2e, 0x0b, 0x09, 0x0a, 0x5d, 0x79, 0x3d, 0x68, 0x3e, 0xfe, 0x0a, 0x55, 0x37, 0xfe, 0x8b, - 0x55, 0xbc, 0x3d, 0xbd, 0x3e, 0xfe, 0x0c, 0x51, 0xfe, 0x8e, 0x51, 0x02, 0x34, 0xfe, 0x19, 0x81, - 0xac, 0xfe, 0x19, 0x41, 0x02, 0x34, 0x2a, 0x01, 0x07, 0x24, 0x33, 0x1e, 0xda, 0x31, 0x2f, 0xd6, - 0x4c, 0x1a, 0xfe, 0xa6, 0x12, 0x4c, 0x0a, 0x3f, 0x02, 0x2e, 0x01, 0x07, 0x24, 0x33, 0x1e, 0xda, - 0x31, 0x2f, 0xd4, 0x06, 0x1a, 0x20, 0x2e, 0x01, 0x07, 0x1e, 0xda, 0x31, 0x2f, 0xfe, 0xe8, 0x09, - 0xfe, 0xc2, 0x49, 0x61, 0x04, 0xfe, 0x9c, 0x00, 0x27, 0x83, 0x4a, 0x09, 0x17, 0x37, 0xa0, 0xfe, - 0xbb, 0x45, 0x4c, 0x00, 0x5c, 0x41, 0x05, 0x78, 0x40, 0xfe, 0xda, 0x14, 0x01, 0x85, 0x89, 0xfe, - 0x4b, 0x45, 0x5d, 0x30, 0x06, 0x9b, 0xdf, 0x04, 0xc4, 0x27, 0x83, 0x04, 0x42, 0x27, 0x37, 0x5e, - 0x02, 0x34, 0xfe, 0xc0, 0x5d, 0xfe, 0xf8, 0x14, 0xfe, 0x03, 0x17, 0x04, 0x51, 0xb1, 0x0c, 0x51, - 0x5e, 0x2a, 0x01, 0x07, 0x25, 0x35, 0x01, 0xfe, 0x88, 0x14, 0x02, 0x35, 0x01, 0x07, 0x24, 0x33, - 0x1e, 0x2e, 0x31, 0x2f, 0xd4, 0x06, 0x05, 0x20, 0x2e, 0x01, 0xfe, 0x6c, 0x13, 0xfe, 0x42, 0x58, - 0xfe, 0x82, 0x14, 0xfe, 0xa4, 0x14, 0x89, 0xfe, 0x4a, 0xf4, 0x0a, 0x18, 0x2e, 0xfe, 0x4a, 0xf4, - 0x05, 0xfe, 0x0c, 0x12, 0x30, 0x06, 0x9b, 0x84, 0x02, 0x34, 0x04, 0x42, 0xb1, 0x0c, 0x42, 0x5e, - 0x2a, 0x01, 0x07, 0x25, 0x35, 0x01, 0xe2, 0x02, 0x35, 0x13, 0x05, 0x65, 0xfe, 0xa8, 0x12, 0x25, - 0xfe, 0xbe, 0x12, 0x71, 0xee, 0x01, 0x07, 0x22, 0x71, 0x03, 0x90, 0xfe, 0xba, 0x12, 0x24, 0xfe, - 0xba, 0x12, 0x1e, 0xfe, 0xa8, 0x12, 0x5e, 0x2a, 0x01, 0x07, 0xfe, 0xd5, 0x10, 0x13, 0x6c, 0xff, - 0x02, 0x00, 0x57, 0x49, 0x8c, 0x1c, 0xfe, 0xff, 0x7f, 0xfe, 0x30, 0x56, 0xfe, 0x00, 0x5c, 0x03, - 0x13, 0x6c, 0xff, 0x02, 0x00, 0x57, 0x49, 0x8c, 0x1c, 0x40, 0xfe, 0x30, 0x56, 0xfe, 0x00, 0x5c, - 0x03, 0x13, 0x6c, 0xff, 0x02, 0x00, 0x57, 0x49, 0x8c, 0x03, 0x13, 0x6c, 0xff, 0x02, 0x00, 0x57, - 0x49, 0x8c, 0xfe, 0x0b, 0x58, 0x03, 0x08, 0x51, 0x01, 0x82, 0x08, 0x42, 0x01, 0x82, 0x03, 0xf9, - 0x1c, 0x10, 0xff, 0x03, 0x00, 0x54, 0xfe, 0x00, 0xf4, 0x17, 0x49, 0xfe, 0x00, 0x7d, 0xfe, 0x01, - 0x7d, 0xfe, 0x02, 0x7d, 0xfe, 0x03, 0x7c, 0x63, 0x26, 0x0c, 0x53, 0x19, 0x54, 0xbc, 0x57, 0xbd, - 0x58, 0x03, 0xfe, 0x62, 0x08, 0xfe, 0x82, 0x4a, 0xfe, 0xe1, 0x1a, 0xfe, 0x83, 0x5a, 0x73, 0x03, - 0x01, 0xfe, 0xee, 0x17, 0xfe, 0x42, 0x48, 0x60, 0x61, 0x8b, 0x01, 0x07, 0x1e, 0xfe, 0x80, 0x14, - 0x31, 0x2f, 0xd6, 0x01, 0x07, 0x1e, 0xfe, 0x80, 0x14, 0x31, 0x2f, 0xfe, 0xe8, 0x0a, 0xfe, 0xc1, - 0x59, 0x04, 0xc4, 0x27, 0xfe, 0xcc, 0x12, 0x4a, 0x09, 0x1b, 0xfe, 0xc4, 0x13, 0x22, 0x62, 0x1b, - 0x5d, 0x4c, 0xc1, 0x64, 0xfe, 0xc6, 0x13, 0x3f, 0x13, 0x05, 0x16, 0xc1, 0x78, 0x2e, 0xfe, 0x78, - 0x10, 0xff, 0x02, 0x83, 0x55, 0x34, 0xff, 0x02, 0x83, 0x55, 0x62, 0x1a, 0xa3, 0xb9, 0xfe, 0x30, - 0x00, 0x8f, 0xe0, 0x16, 0x2b, 0x13, 0x05, 0xfe, 0x56, 0x10, 0x62, 0x0a, 0xdf, 0xb9, 0xfe, 0x64, - 0x00, 0x8f, 0xe0, 0x08, 0xfe, 0x64, 0x00, 0x16, 0x94, 0x13, 0x05, 0xfe, 0x28, 0x10, 0x62, 0x05, - 0x87, 0xb9, 0xfe, 0xc8, 0x00, 0x8f, 0xe0, 0x08, 0xfe, 0xc8, 0x00, 0x16, 0x4e, 0x13, 0x05, 0x35, - 0xb9, 0xfe, 0x90, 0x01, 0xb8, 0xfe, 0x2c, 0x14, 0x8b, 0xfe, 0x12, 0x10, 0xfe, 0x43, 0xf4, 0x95, - 0xfe, 0x56, 0xf0, 0xfe, 0x3e, 0x14, 0xfe, 0x04, 0xf4, 0x6c, 0xfe, 0x43, 0xf4, 0x94, 0xfe, 0xf3, - 0x10, 0xf6, 0x01, 0xfe, 0x00, 0x13, 0x1c, 0x40, 0xfe, 0x10, 0x13, 0xfe, 0x00, 0x17, 0xfe, 0x4d, - 0xe4, 0x69, 0xb8, 0xfe, 0x7a, 0x14, 0xb5, 0x69, 0xfe, 0x1c, 0x10, 0xfe, 0x00, 0x17, 0xfe, 0x4d, - 0xe4, 0x17, 0xb8, 0xfe, 0x7a, 0x14, 0xb5, 0x17, 0x35, 0x61, 0x22, 0xfe, 0x4d, 0xf4, 0x00, 0xde, - 0x8b, 0x13, 0x05, 0xfe, 0xb4, 0x56, 0xfe, 0xc3, 0x58, 0x03, 0x61, 0x13, 0x0a, 0x03, 0x15, 0x05, - 0x01, 0x07, 0x25, 0xe1, 0x15, 0x0a, 0x01, 0x07, 0x25, 0xe1, 0x15, 0x1a, 0x01, 0x07, 0x25, 0xe1, - 0x71, 0xfe, 0x89, 0x49, 0x01, 0x07, 0x03, 0x15, 0x05, 0x01, 0x07, 0x25, 0x88, 0x15, 0x1a, 0x01, - 0x07, 0x25, 0x88, 0x15, 0x05, 0x01, 0x07, 0x25, 0x88, 0xfe, 0x89, 0x49, 0x01, 0x07, 0x25, 0x88, - 0x71, 0xfe, 0x89, 0x4a, 0x01, 0x07, 0x03, 0x61, 0x03, 0x1d, 0xca, 0x06, 0x05, 0xfe, 0x44, 0x13, - 0xaa, 0x12, 0xca, 0xfe, 0x49, 0xf4, 0x00, 0x3f, 0x71, 0xa0, 0x5e, 0xfe, 0x01, 0xec, 0xfe, 0x27, - 0x01, 0xee, 0x01, 0x07, 0x30, 0x06, 0xfe, 0xe3, 0x00, 0xfe, 0x20, 0x13, 0x1e, 0xfe, 0x38, 0x15, - 0x22, 0x12, 0xcb, 0x01, 0x45, 0x1d, 0xcb, 0x06, 0x05, 0x5c, 0x0b, 0x4b, 0x05, 0x38, 0x03, 0x08, - 0x44, 0x01, 0x0e, 0xea, 0x8a, 0x06, 0x10, 0xa3, 0x08, 0x80, 0x01, 0x0e, 0x8a, 0x08, 0x52, 0x01, - 0x9f, 0x03, 0x08, 0x80, 0x01, 0x0e, 0x8a, 0xfe, 0x80, 0xe7, 0x10, 0x06, 0x10, 0x83, 0xfe, 0x45, - 0x58, 0x01, 0x87, 0x8a, 0x03, 0x08, 0x44, 0x01, 0x0e, 0x8a, 0x08, 0x52, 0x01, 0x9f, 0x03, 0x08, - 0x44, 0x01, 0x0e, 0xfe, 0x80, 0x80, 0xef, 0xfe, 0x49, 0xe4, 0x10, 0xa3, 0x08, 0x80, 0x01, 0x0e, - 0xef, 0x08, 0x52, 0x01, 0x82, 0x03, 0x16, 0x10, 0x70, 0x66, 0xfe, 0x60, 0x01, 0xfe, 0x18, 0xdf, - 0xfe, 0x19, 0xde, 0xfe, 0x24, 0x1c, 0xfe, 0x1d, 0xf7, 0x2c, 0x91, 0xfe, 0xd4, 0x15, 0x01, 0xfe, - 0xda, 0x16, 0xfe, 0x0c, 0x13, 0x92, 0x2c, 0x66, 0xfe, 0x2c, 0x01, 0xfe, 0x2f, 0x19, 0x03, 0xab, - 0x20, 0xfe, 0xc4, 0x15, 0xfe, 0xda, 0x10, 0x16, 0x10, 0x70, 0x04, 0xfe, 0x64, 0x01, 0xfe, 0x00, - 0xf4, 0x17, 0xfe, 0x18, 0x58, 0x04, 0xfe, 0x66, 0x01, 0xfe, 0x19, 0x58, 0x92, 0x17, 0xfe, 0x3c, - 0x90, 0xfe, 0x30, 0xf4, 0x05, 0xfe, 0x3c, 0x50, 0x66, 0xfe, 0x38, 0x00, 0xfe, 0x0f, 0x79, 0xfe, - 0x1c, 0xf7, 0x17, 0x91, 0xfe, 0x1e, 0x16, 0xe2, 0x37, 0x03, 0xab, 0x20, 0xfe, 0xf6, 0x15, 0xfe, - 0x9c, 0x10, 0x16, 0x10, 0x70, 0xfe, 0x83, 0x5a, 0xfe, 0x18, 0xdf, 0xfe, 0x19, 0xde, 0xfe, 0x1d, - 0xf7, 0x3b, 0x91, 0xfe, 0x40, 0x16, 0xfe, 0x94, 0x14, 0xfe, 0x10, 0x13, 0x92, 0x3b, 0x66, 0x1b, - 0xfe, 0xaf, 0x19, 0xfe, 0x98, 0xe7, 0x00, 0x03, 0xab, 0x20, 0xfe, 0x34, 0x16, 0xfe, 0x6c, 0x10, - 0x16, 0x10, 0x70, 0xfe, 0x30, 0xbc, 0xfe, 0xb2, 0xbc, 0x92, 0xc3, 0x66, 0x1b, 0xfe, 0x0f, 0x79, - 0xfe, 0x1c, 0xf7, 0xc3, 0x91, 0xfe, 0x78, 0x16, 0xfe, 0x5c, 0x14, 0x37, 0x03, 0xab, 0x20, 0xfe, - 0x64, 0x16, 0xfe, 0x42, 0x10, 0xfe, 0x02, 0xf6, 0x10, 0x70, 0xfe, 0x18, 0xfe, 0x55, 0xfe, 0x19, - 0xfe, 0x56, 0xf9, 0xfe, 0x1d, 0xf7, 0x50, 0x91, 0xfe, 0x9e, 0x16, 0xfe, 0x36, 0x14, 0xfe, 0x1c, - 0x13, 0x92, 0x50, 0x47, 0xfe, 0x83, 0x58, 0xfe, 0xaf, 0x19, 0xfe, 0x80, 0xe7, 0x10, 0xfe, 0x81, - 0xe7, 0x10, 0x11, 0xfe, 0xdd, 0x00, 0x63, 0x26, 0x03, 0x63, 0x26, 0xfe, 0x12, 0x45, 0x20, 0xfe, - 0x8e, 0x16, 0x14, 0x05, 0x3a, 0x96, 0xa6, 0x02, 0x28, 0xfe, 0x39, 0xf0, 0xfe, 0xe2, 0x16, 0x22, - 0x03, 0xfe, 0x7e, 0x18, 0x1c, 0x1a, 0x46, 0x13, 0x0d, 0x03, 0x70, 0x04, 0xc9, 0x1c, 0x05, 0xfe, - 0xef, 0x12, 0xfe, 0xe1, 0x10, 0x78, 0x2b, 0x5f, 0x30, 0x06, 0x2d, 0xfe, 0x3c, 0x13, 0xfe, 0x7e, - 0x14, 0xfe, 0x42, 0x13, 0x48, 0xb4, 0x08, 0x44, 0x01, 0x0e, 0xad, 0xfe, 0x3e, 0x12, 0xed, 0xfe, - 0x45, 0x48, 0x01, 0x87, 0xfa, 0xad, 0xfe, 0xf3, 0x13, 0x40, 0x74, 0x06, 0x10, 0xa2, 0x08, 0x80, - 0x01, 0x0e, 0xef, 0x01, 0x6e, 0xfe, 0x16, 0x10, 0x06, 0x7e, 0x84, 0xfe, 0x3c, 0x14, 0xfe, 0x24, - 0x12, 0xf3, 0xfe, 0xd6, 0xf0, 0xfe, 0x02, 0x17, 0x16, 0x0a, 0x03, 0xfe, 0x9c, 0xe7, 0x0a, 0x0f, - 0xfe, 0x15, 0x00, 0x5a, 0x76, 0x26, 0x01, 0xd8, 0x16, 0x05, 0x03, 0x0b, 0x4b, 0x2c, 0x38, 0x11, - 0x2d, 0x01, 0x6e, 0x16, 0x05, 0x03, 0xfe, 0x38, 0x90, 0xfe, 0xba, 0x90, 0x79, 0xc5, 0x68, 0xc6, - 0xfe, 0x48, 0x55, 0x37, 0xfe, 0xc9, 0x55, 0x03, 0x1d, 0x99, 0x72, 0x12, 0x99, 0x03, 0x08, 0x9a, - 0x01, 0x0e, 0xed, 0x08, 0x3c, 0x01, 0x0e, 0xfe, 0x49, 0x44, 0x18, 0xfe, 0xca, 0x17, 0x72, 0x74, - 0x03, 0x08, 0x44, 0x01, 0x0e, 0x06, 0x10, 0x5c, 0x08, 0x52, 0x01, 0x9f, 0x08, 0x3c, 0x01, 0x0e, - 0x72, 0x74, 0x03, 0xfc, 0x1a, 0x64, 0xfe, 0xfe, 0x17, 0x04, 0xfe, 0x90, 0x00, 0xfe, 0x3a, 0x45, - 0xfe, 0x2c, 0x10, 0xfc, 0xc0, 0x64, 0xfe, 0x10, 0x18, 0x04, 0xfe, 0x92, 0x00, 0xfe, 0x02, 0xe6, - 0x1b, 0xdb, 0xfc, 0xfe, 0x0b, 0x00, 0x64, 0xfe, 0x22, 0x18, 0x04, 0xfe, 0x94, 0x00, 0xfe, 0x02, - 0xe6, 0x17, 0xfe, 0x08, 0x10, 0x04, 0xfe, 0x96, 0x00, 0xfe, 0x02, 0xe6, 0x2b, 0xfe, 0x4e, 0x45, - 0xfe, 0x0c, 0x12, 0xac, 0xff, 0x04, 0x68, 0x54, 0xdd, 0x1c, 0x69, 0x03, 0x06, 0x7a, 0xfe, 0x5a, - 0xf0, 0xfe, 0x4e, 0x18, 0x23, 0xfe, 0x09, 0x00, 0xfe, 0x34, 0x10, 0x06, 0x1b, 0xfe, 0x5a, 0xf0, - 0xfe, 0x5c, 0x18, 0x23, 0xc1, 0xfe, 0x26, 0x10, 0x06, 0x1a, 0x46, 0x23, 0x2b, 0xdb, 0x06, 0x0a, - 0x46, 0x23, 0x94, 0xd9, 0x06, 0x05, 0x46, 0x23, 0x4e, 0xa0, 0xaa, 0x03, 0x14, 0xfe, 0x09, 0x00, - 0x01, 0x36, 0xfe, 0x04, 0xfe, 0x7d, 0x04, 0x7f, 0xf6, 0x03, 0x24, 0xfe, 0xa4, 0x18, 0xfe, 0x14, - 0xf0, 0x07, 0x65, 0xfe, 0xa0, 0x18, 0x03, 0xff, 0x2d, 0x00, 0x00, + 0xf0, 0xfe, 0x48, 0x02, 0xfe, 0x45, 0xf0, 0xfe, 0x4c, 0x02, 0x17, 0x0b, 0xa0, 0x17, 0x06, 0x18, + 0x96, 0x02, 0x29, 0xfe, 0x00, 0x1c, 0xde, 0xfe, 0x02, 0x1c, 0xdd, 0xfe, 0x1e, 0x1c, 0xfe, 0xe9, + 0x10, 0x01, 0xfe, 0x20, 0x17, 0xfe, 0xe7, 0x10, 0xfe, 0x06, 0xfc, 0xc7, 0x0a, 0x6b, 0x01, 0x9e, + 0x02, 0x29, 0x14, 0x4d, 0x37, 0x97, 0x01, 0xfe, 0x64, 0x0f, 0x0a, 0x6b, 0x01, 0x82, 0xfe, 0xbd, + 0x10, 0x0a, 0x6b, 0x01, 0x82, 0xfe, 0xad, 0x10, 0xfe, 0x16, 0x1c, 0xfe, 0x58, 0x1c, 0x17, 0x06, + 0x18, 0x96, 0x2a, 0x25, 0x29, 0xfe, 0x3d, 0xf0, 0xfe, 0x02, 0x02, 0x21, 0xfe, 0x94, 0x02, 0xfe, + 0x5a, 0x1c, 0xea, 0xfe, 0x14, 0x1c, 0x14, 0xfe, 0x30, 0x00, 0x37, 0x97, 0x01, 0xfe, 0x54, 0x0f, + 0x17, 0x06, 0x18, 0x96, 0x02, 0xd0, 0x1e, 0x20, 0x07, 0x10, 0x34, 0xfe, 0x69, 0x10, 0x17, 0x06, + 0x18, 0x96, 0xfe, 0x04, 0xec, 0x20, 0x46, 0x3d, 0x12, 0x20, 0xfe, 0x05, 0xf6, 0xc7, 0x01, 0xfe, + 0x52, 0x16, 0x09, 0x4a, 0x4c, 0x35, 0x11, 0x2d, 0x3c, 0x8a, 0x01, 0xe6, 0x02, 0x29, 0x0a, 0x40, + 0x01, 0x0e, 0x07, 0x00, 0x5d, 0x01, 0x6f, 0xfe, 0x18, 0x10, 0xfe, 0x41, 0x58, 0x0a, 0x99, 0x01, + 0x0e, 0xfe, 0xc8, 0x54, 0x64, 0xfe, 0x0c, 0x03, 0x01, 0xe6, 0x02, 0x29, 0x2a, 0x46, 0xfe, 0x02, + 0xe8, 0x27, 0xf8, 0xfe, 0x9e, 0x43, 0xf7, 0xfe, 0x27, 0xf0, 0xfe, 0xdc, 0x01, 0xfe, 0x07, 0x4b, + 0xfe, 0x20, 0xf0, 0x9c, 0xfe, 0x40, 0x1c, 0x25, 0xd2, 0xfe, 0x26, 0xf0, 0xfe, 0x56, 0x03, 0xfe, + 0xa0, 0xf0, 0xfe, 0x44, 0x03, 0xfe, 0x11, 0xf0, 0x9c, 0xfe, 0xef, 0x10, 0xfe, 0x9f, 0xf0, 0xfe, + 0x64, 0x03, 0xeb, 0x0f, 0xfe, 0x11, 0x00, 0x02, 0x5a, 0x2a, 0xfe, 0x48, 0x1c, 0xeb, 0x09, 0x04, + 0x1d, 0xfe, 0x18, 0x13, 0x23, 0x1e, 0x98, 0xac, 0x12, 0x98, 0x0a, 0x40, 0x01, 0x0e, 0xac, 0x75, + 0x01, 0xfe, 0xbc, 0x15, 0x11, 0xca, 0x25, 0xd2, 0xfe, 0x01, 0xf0, 0xd2, 0xfe, 0x82, 0xf0, 0xfe, + 0x92, 0x03, 0xec, 0x11, 0xfe, 0xe4, 0x00, 0x65, 0xfe, 0xa4, 0x03, 0x25, 0x32, 0x1f, 0xfe, 0xb4, + 0x03, 0x01, 0x43, 0xfe, 0x06, 0xf0, 0xfe, 0xc4, 0x03, 0x8d, 0x81, 0xfe, 0x0a, 0xf0, 0xfe, 0x7a, + 0x06, 0x02, 0x22, 0x05, 0x6b, 0x28, 0x16, 0xfe, 0xf6, 0x04, 0x14, 0x2c, 0x01, 0x33, 0x8f, 0xfe, + 0x66, 0x02, 0x02, 0xd1, 0xeb, 0x2a, 0x67, 0x1a, 0xfe, 0x67, 0x1b, 0xf8, 0xf7, 0xfe, 0x48, 0x1c, + 0x70, 0x01, 0x6e, 0x87, 0x0a, 0x40, 0x01, 0x0e, 0x07, 0x00, 0x16, 0xd3, 0x0a, 0xca, 0x01, 0x0e, + 0x74, 0x60, 0x59, 0x76, 0x27, 0x05, 0x6b, 0x28, 0xfe, 0x10, 0x12, 0x14, 0x2c, 0x01, 0x33, 0x8f, + 0xfe, 0x66, 0x02, 0x02, 0xd1, 0xbc, 0x7d, 0xbd, 0x7f, 0x25, 0x22, 0x65, 0xfe, 0x3c, 0x04, 0x1f, + 0xfe, 0x38, 0x04, 0x68, 0xfe, 0xa0, 0x00, 0xfe, 0x9b, 0x57, 0xfe, 0x4e, 0x12, 0x2b, 0xff, 0x02, + 0x00, 0x10, 0x01, 0x08, 0x1f, 0xfe, 0xe0, 0x04, 0x2b, 0x01, 0x08, 0x1f, 0x22, 0x30, 0x2e, 0xd5, + 0xfe, 0x4c, 0x44, 0xfe, 0x4c, 0x12, 0x60, 0xfe, 0x44, 0x48, 0x13, 0x2c, 0xfe, 0x4c, 0x54, 0x64, + 0xd3, 0x46, 0x76, 0x27, 0xfa, 0xef, 0xfe, 0x62, 0x13, 0x09, 0x04, 0x1d, 0xfe, 0x2a, 0x13, 0x2f, + 0x07, 0x7e, 0xa5, 0xfe, 0x20, 0x10, 0x13, 0x2c, 0xfe, 0x4c, 0x54, 0x64, 0xd3, 0xfa, 0xef, 0x86, + 0x09, 0x04, 0x1d, 0xfe, 0x08, 0x13, 0x2f, 0x07, 0x7e, 0x6e, 0x09, 0x04, 0x1d, 0xfe, 0x1c, 0x12, + 0x14, 0x92, 0x09, 0x04, 0x06, 0x3b, 0x14, 0xc4, 0x01, 0x33, 0x8f, 0xfe, 0x70, 0x0c, 0x02, 0x22, + 0x2b, 0x11, 0xfe, 0xe6, 0x00, 0xfe, 0x1c, 0x90, 0xf9, 0x03, 0x14, 0x92, 0x01, 0x33, 0x02, 0x29, + 0xfe, 0x42, 0x5b, 0x67, 0x1a, 0xfe, 0x46, 0x59, 0xf8, 0xf7, 0xfe, 0x87, 0x80, 0xfe, 0x31, 0xe4, + 0x4f, 0x09, 0x04, 0x0b, 0xfe, 0x78, 0x13, 0xfe, 0x20, 0x80, 0x07, 0x1a, 0xfe, 0x70, 0x12, 0x49, + 0x04, 0x06, 0xfe, 0x60, 0x13, 0x05, 0xfe, 0xa2, 0x00, 0x28, 0x16, 0xfe, 0x80, 0x05, 0xfe, 0x31, + 0xe4, 0x6a, 0x49, 0x04, 0x0b, 0xfe, 0x4a, 0x13, 0x05, 0xfe, 0xa0, 0x00, 0x28, 0xfe, 0x42, 0x12, + 0x5e, 0x01, 0x08, 0x25, 0x32, 0xf1, 0x01, 0x08, 0x26, 0xfe, 0x98, 0x05, 0x11, 0xfe, 0xe3, 0x00, + 0x23, 0x49, 0xfe, 0x4a, 0xf0, 0xfe, 0x6a, 0x05, 0xfe, 0x49, 0xf0, 0xfe, 0x64, 0x05, 0x83, 0x24, + 0xfe, 0x21, 0x00, 0xa1, 0x24, 0xfe, 0x22, 0x00, 0xa0, 0x24, 0x4c, 0xfe, 0x09, 0x48, 0x01, 0x08, + 0x26, 0xfe, 0x98, 0x05, 0xfe, 0xe2, 0x08, 0x49, 0x04, 0xc5, 0x3b, 0x01, 0x86, 0x24, 0x06, 0x12, + 0xcc, 0x37, 0xfe, 0x27, 0x01, 0x09, 0x04, 0x1d, 0xfe, 0x22, 0x12, 0x47, 0x01, 0xa7, 0x14, 0x92, + 0x09, 0x04, 0x06, 0x3b, 0x14, 0xc4, 0x01, 0x33, 0x8f, 0xfe, 0x70, 0x0c, 0x02, 0x22, 0x05, 0xfe, + 0x9c, 0x00, 0x28, 0xfe, 0x3e, 0x12, 0x05, 0x50, 0x28, 0xfe, 0x36, 0x13, 0x47, 0x01, 0xa7, 0x26, + 0xfe, 0x08, 0x06, 0x0a, 0x06, 0x49, 0x04, 0x19, 0xfe, 0x02, 0x12, 0x5f, 0x01, 0xfe, 0xaa, 0x14, + 0x1f, 0xfe, 0xfe, 0x05, 0x11, 0x9a, 0x01, 0x43, 0x11, 0xfe, 0xe5, 0x00, 0x05, 0x50, 0xb4, 0x0c, + 0x50, 0x05, 0xc6, 0x28, 0xfe, 0x62, 0x12, 0x05, 0x3f, 0x28, 0xfe, 0x5a, 0x13, 0x01, 0xfe, 0x14, + 0x18, 0x01, 0xfe, 0x66, 0x18, 0xfe, 0x43, 0x48, 0xb7, 0x19, 0x13, 0x6c, 0xff, 0x02, 0x00, 0x57, + 0x48, 0x8b, 0x1c, 0x3d, 0x85, 0xb7, 0x69, 0x47, 0x01, 0xa7, 0x26, 0xfe, 0x72, 0x06, 0x49, 0x04, + 0x1b, 0xdf, 0x89, 0x0a, 0x4d, 0x01, 0xfe, 0xd8, 0x14, 0x1f, 0xfe, 0x68, 0x06, 0x11, 0x9a, 0x01, + 0x43, 0x11, 0xfe, 0xe5, 0x00, 0x05, 0x3f, 0xb4, 0x0c, 0x3f, 0x17, 0x06, 0x01, 0xa7, 0xec, 0x72, + 0x70, 0x01, 0x6e, 0x87, 0x11, 0xfe, 0xe2, 0x00, 0x01, 0x08, 0x25, 0x32, 0xfe, 0x0a, 0xf0, 0xfe, + 0xa6, 0x06, 0x8c, 0xfe, 0x5c, 0x07, 0xfe, 0x06, 0xf0, 0xfe, 0x64, 0x07, 0x8d, 0x81, 0x02, 0x22, + 0x09, 0x04, 0x0b, 0xfe, 0x2e, 0x12, 0x15, 0x1a, 0x01, 0x08, 0x15, 0x00, 0x01, 0x08, 0x15, 0x00, + 0x01, 0x08, 0x15, 0x00, 0x01, 0x08, 0xfe, 0x99, 0xa4, 0x01, 0x08, 0x15, 0x00, 0x02, 0xfe, 0x32, + 0x08, 0x61, 0x04, 0x1b, 0xfe, 0x38, 0x12, 0x09, 0x04, 0x1b, 0x6e, 0x15, 0xfe, 0x1b, 0x00, 0x01, + 0x08, 0x15, 0x00, 0x01, 0x08, 0x15, 0x00, 0x01, 0x08, 0x15, 0x00, 0x01, 0x08, 0x15, 0x06, 0x01, + 0x08, 0x15, 0x00, 0x02, 0xd9, 0x66, 0x4c, 0xfe, 0x3a, 0x55, 0x5f, 0xfe, 0x9a, 0x81, 0x4b, 0x1d, + 0xba, 0xfe, 0x32, 0x07, 0x0a, 0x1d, 0xfe, 0x09, 0x6f, 0xaf, 0xfe, 0xca, 0x45, 0xfe, 0x32, 0x12, + 0x62, 0x2c, 0x85, 0x66, 0x7b, 0x01, 0x08, 0x25, 0x32, 0xfe, 0x0a, 0xf0, 0xfe, 0x32, 0x07, 0x8d, + 0x81, 0x8c, 0xfe, 0x5c, 0x07, 0x02, 0x22, 0x01, 0x43, 0x02, 0xfe, 0x8a, 0x06, 0x15, 0x19, 0x02, + 0xfe, 0x8a, 0x06, 0xfe, 0x9c, 0xf7, 0xd4, 0xfe, 0x2c, 0x90, 0xfe, 0xae, 0x90, 0x77, 0xfe, 0xca, + 0x07, 0x0c, 0x54, 0x18, 0x55, 0x09, 0x4a, 0x6a, 0x35, 0x1e, 0x20, 0x07, 0x10, 0xfe, 0x0e, 0x12, + 0x74, 0xfe, 0x80, 0x80, 0x37, 0x20, 0x63, 0x27, 0xfe, 0x06, 0x10, 0xfe, 0x83, 0xe7, 0xc4, 0xa1, + 0xfe, 0x03, 0x40, 0x09, 0x4a, 0x4f, 0x35, 0x01, 0xa8, 0xad, 0xfe, 0x1f, 0x40, 0x12, 0x58, 0x01, + 0xa5, 0xfe, 0x08, 0x50, 0xfe, 0x8a, 0x50, 0xfe, 0x44, 0x51, 0xfe, 0xc6, 0x51, 0x83, 0xfb, 0xfe, + 0x8a, 0x90, 0x0c, 0x52, 0x18, 0x53, 0xfe, 0x0c, 0x90, 0xfe, 0x8e, 0x90, 0xfe, 0x40, 0x50, 0xfe, + 0xc2, 0x50, 0x0c, 0x39, 0x18, 0x3a, 0xfe, 0x4a, 0x10, 0x09, 0x04, 0x6a, 0xfe, 0x2a, 0x12, 0xfe, + 0x2c, 0x90, 0xfe, 0xae, 0x90, 0x0c, 0x54, 0x18, 0x55, 0x09, 0x04, 0x4f, 0x85, 0x01, 0xa8, 0xfe, + 0x1f, 0x80, 0x12, 0x58, 0xfe, 0x44, 0x90, 0xfe, 0xc6, 0x90, 0x0c, 0x56, 0x18, 0x57, 0xfb, 0xfe, + 0x8a, 0x90, 0x0c, 0x52, 0x18, 0x53, 0xfe, 0x40, 0x90, 0xfe, 0xc2, 0x90, 0x0c, 0x39, 0x18, 0x3a, + 0x0c, 0x38, 0x18, 0x4e, 0x09, 0x4a, 0x19, 0x35, 0x2a, 0x13, 0xfe, 0x4e, 0x11, 0x65, 0xfe, 0x48, + 0x08, 0xfe, 0x9e, 0xf0, 0xfe, 0x5c, 0x08, 0xb1, 0x16, 0x32, 0x2a, 0x73, 0xdd, 0xb8, 0xfe, 0x80, + 0x08, 0xb9, 0xfe, 0x9e, 0x08, 0x8c, 0xfe, 0x74, 0x08, 0xfe, 0x06, 0xf0, 0xfe, 0x7a, 0x08, 0x8d, + 0x81, 0x02, 0x22, 0x01, 0x43, 0xfe, 0xc9, 0x10, 0x15, 0x19, 0xfe, 0xc9, 0x10, 0x61, 0x04, 0x06, + 0xfe, 0x10, 0x12, 0x61, 0x04, 0x0b, 0x45, 0x09, 0x04, 0x0b, 0xfe, 0x68, 0x12, 0xfe, 0x2e, 0x1c, + 0x02, 0xfe, 0x24, 0x0a, 0x61, 0x04, 0x06, 0x45, 0x61, 0x04, 0x0b, 0xfe, 0x52, 0x12, 0xfe, 0x2c, + 0x1c, 0xfe, 0xaa, 0xf0, 0xfe, 0x1e, 0x09, 0xfe, 0xac, 0xf0, 0xfe, 0xbe, 0x08, 0xfe, 0x8a, 0x10, + 0xaa, 0xfe, 0xf3, 0x10, 0xfe, 0xad, 0xf0, 0xfe, 0xca, 0x08, 0x02, 0xfe, 0x24, 0x0a, 0xab, 0xfe, + 0xe7, 0x10, 0xfe, 0x2b, 0xf0, 0x9d, 0xe9, 0x1c, 0xfe, 0x00, 0xfe, 0xfe, 0x1c, 0x12, 0xb5, 0xfe, + 0xd2, 0xf0, 0x9d, 0xfe, 0x76, 0x18, 0x1c, 0x1a, 0x16, 0x9d, 0x05, 0xcb, 0x1c, 0x06, 0x16, 0x9d, + 0xb8, 0x6d, 0xb9, 0x6d, 0xaa, 0xab, 0xfe, 0xb1, 0x10, 0x70, 0x5e, 0x2b, 0x14, 0x92, 0x01, 0x33, + 0x0f, 0xfe, 0x35, 0x00, 0xfe, 0x01, 0xf0, 0x5a, 0x0f, 0x7c, 0x02, 0x5a, 0xfe, 0x74, 0x18, 0x1c, + 0xfe, 0x00, 0xf8, 0x16, 0x6d, 0x67, 0x1b, 0x01, 0xfe, 0x44, 0x0d, 0x3b, 0x01, 0xe6, 0x1e, 0x27, + 0x74, 0x67, 0x1a, 0x02, 0x6d, 0x09, 0x04, 0x0b, 0x21, 0xfe, 0x06, 0x0a, 0x09, 0x04, 0x6a, 0xfe, + 0x82, 0x12, 0x09, 0x04, 0x19, 0xfe, 0x66, 0x13, 0x1e, 0x58, 0xac, 0xfc, 0xfe, 0x83, 0x80, 0xfe, + 0xc8, 0x44, 0xfe, 0x2e, 0x13, 0xfe, 0x04, 0x91, 0xfe, 0x86, 0x91, 0x63, 0x27, 0xfe, 0x40, 0x59, + 0xfe, 0xc1, 0x59, 0x77, 0xd7, 0x05, 0x54, 0x31, 0x55, 0x0c, 0x7b, 0x18, 0x7c, 0xbe, 0x54, 0xbf, + 0x55, 0x01, 0xa8, 0xad, 0x63, 0x27, 0x12, 0x58, 0xc0, 0x38, 0xc1, 0x4e, 0x79, 0x56, 0x68, 0x57, + 0xf4, 0xf5, 0xfe, 0x04, 0xfa, 0x38, 0xfe, 0x05, 0xfa, 0x4e, 0x01, 0xa5, 0xa2, 0x23, 0x0c, 0x7b, + 0x0c, 0x7c, 0x79, 0x56, 0x68, 0x57, 0xfe, 0x12, 0x10, 0x09, 0x04, 0x19, 0x16, 0xd7, 0x79, 0x39, + 0x68, 0x3a, 0x09, 0x04, 0xfe, 0xf7, 0x00, 0x35, 0x05, 0x52, 0x31, 0x53, 0xfe, 0x10, 0x58, 0xfe, + 0x91, 0x58, 0xfe, 0x14, 0x59, 0xfe, 0x95, 0x59, 0x02, 0x6d, 0x09, 0x04, 0x19, 0x16, 0xd7, 0x09, + 0x04, 0xfe, 0xf7, 0x00, 0x35, 0xfe, 0x3a, 0x55, 0xfe, 0x19, 0x81, 0x5f, 0xfe, 0x10, 0x90, 0xfe, + 0x92, 0x90, 0xfe, 0xd7, 0x10, 0x2f, 0x07, 0x9b, 0x16, 0xfe, 0xc6, 0x08, 0x11, 0x9b, 0x09, 0x04, + 0x0b, 0xfe, 0x14, 0x13, 0x05, 0x39, 0x31, 0x3a, 0x77, 0xfe, 0xc6, 0x08, 0xfe, 0x0c, 0x58, 0xfe, + 0x8d, 0x58, 0x02, 0x6d, 0x23, 0x47, 0xfe, 0x19, 0x80, 0xde, 0x09, 0x04, 0x0b, 0xfe, 0x1a, 0x12, + 0xfe, 0x6c, 0x19, 0xfe, 0x19, 0x41, 0xe9, 0xb5, 0xfe, 0xd1, 0xf0, 0xd9, 0x14, 0x7a, 0x01, 0x33, + 0x0f, 0xfe, 0x44, 0x00, 0xfe, 0x8e, 0x10, 0xfe, 0x6c, 0x19, 0xbe, 0x39, 0xfe, 0xed, 0x19, 0xbf, + 0x3a, 0xfe, 0x0c, 0x51, 0xfe, 0x8e, 0x51, 0xe9, 0x1c, 0xfe, 0x00, 0xff, 0x34, 0xfe, 0x74, 0x10, + 0xb5, 0xfe, 0xd2, 0xf0, 0xfe, 0xb2, 0x0a, 0xfe, 0x76, 0x18, 0x1c, 0x1a, 0x84, 0x05, 0xcb, 0x1c, + 0x06, 0xfe, 0x08, 0x13, 0x0f, 0xfe, 0x16, 0x00, 0x02, 0x5a, 0xfe, 0xd1, 0xf0, 0xfe, 0xc4, 0x0a, + 0x14, 0x7a, 0x01, 0x33, 0x0f, 0xfe, 0x17, 0x00, 0xfe, 0x42, 0x10, 0xfe, 0xce, 0xf0, 0xfe, 0xca, + 0x0a, 0xfe, 0x3c, 0x10, 0xfe, 0xcd, 0xf0, 0xfe, 0xd6, 0x0a, 0x0f, 0xfe, 0x22, 0x00, 0x02, 0x5a, + 0xfe, 0xcb, 0xf0, 0xfe, 0xe2, 0x0a, 0x0f, 0xfe, 0x24, 0x00, 0x02, 0x5a, 0xfe, 0xd0, 0xf0, 0xfe, + 0xec, 0x0a, 0x0f, 0x93, 0xdc, 0xfe, 0xcf, 0xf0, 0xfe, 0xf6, 0x0a, 0x0f, 0x4c, 0xfe, 0x10, 0x10, + 0xfe, 0xcc, 0xf0, 0xd9, 0x61, 0x04, 0x19, 0x3b, 0x0f, 0xfe, 0x12, 0x00, 0x2a, 0x13, 0xfe, 0x4e, + 0x11, 0x65, 0xfe, 0x0c, 0x0b, 0xfe, 0x9e, 0xf0, 0xfe, 0x20, 0x0b, 0xb1, 0x16, 0x32, 0x2a, 0x73, + 0xdd, 0xb8, 0x22, 0xb9, 0x22, 0x2a, 0xec, 0x65, 0xfe, 0x2c, 0x0b, 0x25, 0x32, 0x8c, 0xfe, 0x48, + 0x0b, 0x8d, 0x81, 0xb8, 0xd4, 0xb9, 0xd4, 0x02, 0x22, 0x01, 0x43, 0xfe, 0xdb, 0x10, 0x11, 0xfe, + 0xe8, 0x00, 0xaa, 0xab, 0x70, 0xbc, 0x7d, 0xbd, 0x7f, 0xfe, 0x89, 0xf0, 0x22, 0x30, 0x2e, 0xd8, + 0xbc, 0x7d, 0xbd, 0x7f, 0x01, 0x08, 0x1f, 0x22, 0x30, 0x2e, 0xd6, 0xb1, 0x45, 0x0f, 0xfe, 0x42, + 0x00, 0x02, 0x5a, 0x78, 0x06, 0xfe, 0x81, 0x49, 0x16, 0xfe, 0x38, 0x0c, 0x09, 0x04, 0x0b, 0xfe, + 0x44, 0x13, 0x0f, 0x00, 0x4b, 0x0b, 0xfe, 0x54, 0x12, 0x4b, 0xfe, 0x28, 0x00, 0x21, 0xfe, 0xa6, + 0x0c, 0x0a, 0x40, 0x01, 0x0e, 0x07, 0x00, 0x5d, 0x3e, 0xfe, 0x28, 0x00, 0xfe, 0xe2, 0x10, 0x01, + 0xe7, 0x01, 0xe8, 0x0a, 0x99, 0x01, 0xfe, 0x32, 0x0e, 0x59, 0x11, 0x2d, 0x01, 0x6f, 0x02, 0x29, + 0x0f, 0xfe, 0x44, 0x00, 0x4b, 0x0b, 0xdf, 0x3e, 0x0b, 0xfe, 0xb4, 0x10, 0x01, 0x86, 0x3e, 0x0b, + 0xfe, 0xaa, 0x10, 0x01, 0x86, 0xfe, 0x19, 0x82, 0xfe, 0x34, 0x46, 0xa3, 0x3e, 0x0b, 0x0f, 0xfe, + 0x43, 0x00, 0xfe, 0x96, 0x10, 0x09, 0x4a, 0x0b, 0x35, 0x01, 0xe7, 0x01, 0xe8, 0x59, 0x11, 0x2d, + 0x01, 0x6f, 0x67, 0x0b, 0x59, 0x3c, 0x8a, 0x02, 0xfe, 0x2a, 0x03, 0x09, 0x04, 0x0b, 0x84, 0x3e, + 0x0b, 0x0f, 0x00, 0xfe, 0x5c, 0x10, 0x61, 0x04, 0x1b, 0xfe, 0x58, 0x12, 0x09, 0x04, 0x1b, 0xfe, + 0x50, 0x13, 0xfe, 0x1c, 0x1c, 0xfe, 0x9d, 0xf0, 0xfe, 0x5c, 0x0c, 0xfe, 0x1c, 0x1c, 0xfe, 0x9d, + 0xf0, 0xfe, 0x62, 0x0c, 0x09, 0x4a, 0x1b, 0x35, 0xfe, 0xa9, 0x10, 0x0f, 0xfe, 0x15, 0x00, 0xfe, + 0x04, 0xe6, 0x0b, 0x5f, 0x5c, 0x0f, 0xfe, 0x13, 0x00, 0xfe, 0x10, 0x10, 0x0f, 0xfe, 0x47, 0x00, + 0xa1, 0x0f, 0xfe, 0x41, 0x00, 0xa0, 0x0f, 0xfe, 0x24, 0x00, 0x87, 0xaa, 0xab, 0x70, 0x05, 0x6b, + 0x28, 0x21, 0xd1, 0x5f, 0xfe, 0x04, 0xe6, 0x1b, 0xfe, 0x9d, 0x41, 0xfe, 0x1c, 0x42, 0x59, 0x01, + 0xda, 0x02, 0x29, 0xea, 0x14, 0x0b, 0x37, 0x95, 0xa9, 0x14, 0xfe, 0x31, 0x00, 0x37, 0x97, 0x01, + 0xfe, 0x54, 0x0f, 0x02, 0xd0, 0x3c, 0xfe, 0x06, 0xec, 0xc9, 0xee, 0x3e, 0x1d, 0xfe, 0xce, 0x45, + 0x34, 0x3c, 0xfe, 0x06, 0xea, 0xc9, 0xfe, 0x47, 0x4b, 0x89, 0xfe, 0x75, 0x57, 0x05, 0x51, 0xfe, + 0x98, 0x56, 0xfe, 0x38, 0x12, 0x0a, 0x42, 0x01, 0x0e, 0xfe, 0x44, 0x48, 0x46, 0x09, 0x04, 0x1d, + 0xfe, 0x1a, 0x13, 0x0a, 0x40, 0x01, 0x0e, 0x47, 0xfe, 0x41, 0x58, 0x0a, 0x99, 0x01, 0x0e, 0xfe, + 0x49, 0x54, 0x8e, 0xfe, 0x2a, 0x0d, 0x02, 0xfe, 0x2a, 0x03, 0x0a, 0x51, 0xfe, 0xee, 0x14, 0xee, + 0x3e, 0x1d, 0xfe, 0xce, 0x45, 0x34, 0x3c, 0xfe, 0xce, 0x47, 0xfe, 0xad, 0x13, 0x02, 0x29, 0x1e, + 0x20, 0x07, 0x10, 0xfe, 0x9e, 0x12, 0x23, 0x12, 0x4d, 0x12, 0x94, 0x12, 0xce, 0x1e, 0x2d, 0x47, + 0x37, 0x2d, 0xb1, 0xe0, 0xfe, 0xbc, 0xf0, 0xfe, 0xec, 0x0d, 0x13, 0x06, 0x12, 0x4d, 0x01, 0xfe, + 0xe2, 0x15, 0x05, 0xfe, 0x38, 0x01, 0x31, 0xfe, 0x3a, 0x01, 0x77, 0xfe, 0xf0, 0x0d, 0xfe, 0x02, + 0xec, 0xce, 0x62, 0x00, 0x5d, 0xfe, 0x04, 0xec, 0x20, 0x46, 0xfe, 0x05, 0xf6, 0xfe, 0x34, 0x01, + 0x01, 0xfe, 0x52, 0x16, 0xfb, 0xfe, 0x48, 0xf4, 0x0d, 0xfe, 0x18, 0x13, 0xaf, 0xfe, 0x02, 0xea, + 0xce, 0x62, 0x7a, 0xfe, 0xc5, 0x13, 0x14, 0x1b, 0x37, 0x95, 0xa9, 0x5c, 0x05, 0xfe, 0x38, 0x01, + 0x1c, 0xfe, 0xf0, 0xff, 0x0c, 0xfe, 0x60, 0x01, 0x05, 0xfe, 0x3a, 0x01, 0x0c, 0xfe, 0x62, 0x01, + 0x3d, 0x12, 0x20, 0x24, 0x06, 0x12, 0x2d, 0x11, 0x2d, 0x8a, 0x13, 0x06, 0x03, 0x23, 0x03, 0x1e, + 0x4d, 0xfe, 0xf7, 0x12, 0x1e, 0x94, 0xac, 0x12, 0x94, 0x07, 0x7a, 0xfe, 0x71, 0x13, 0xfe, 0x24, + 0x1c, 0x14, 0x1a, 0x37, 0x95, 0xa9, 0xfe, 0xd9, 0x10, 0xb6, 0xfe, 0x03, 0xdc, 0xfe, 0x73, 0x57, + 0xfe, 0x80, 0x5d, 0x03, 0xb6, 0xfe, 0x03, 0xdc, 0xfe, 0x5b, 0x57, 0xfe, 0x80, 0x5d, 0x03, 0xfe, + 0x03, 0x57, 0xb6, 0x23, 0xfe, 0x00, 0xcc, 0x03, 0xfe, 0x03, 0x57, 0xb6, 0x75, 0x03, 0x09, 0x04, + 0x4c, 0xfe, 0x22, 0x13, 0xfe, 0x1c, 0x80, 0x07, 0x06, 0xfe, 0x1a, 0x13, 0xfe, 0x1e, 0x80, 0xe1, + 0xfe, 0x1d, 0x80, 0xa4, 0xfe, 0x0c, 0x90, 0xfe, 0x0e, 0x13, 0xfe, 0x0e, 0x90, 0xa3, 0xfe, 0x3c, + 0x90, 0xfe, 0x30, 0xf4, 0x0b, 0xfe, 0x3c, 0x50, 0xa0, 0x01, 0xfe, 0x82, 0x16, 0x2f, 0x07, 0x2d, + 0xe0, 0x01, 0xfe, 0xbc, 0x15, 0x09, 0x04, 0x1d, 0x45, 0x01, 0xe7, 0x01, 0xe8, 0x11, 0xfe, 0xe9, + 0x00, 0x09, 0x04, 0x4c, 0xfe, 0x2c, 0x13, 0x01, 0xfe, 0x14, 0x16, 0xfe, 0x1e, 0x1c, 0xfe, 0x14, + 0x90, 0xfe, 0x96, 0x90, 0x0c, 0xfe, 0x64, 0x01, 0x18, 0xfe, 0x66, 0x01, 0x09, 0x04, 0x4f, 0xfe, + 0x12, 0x12, 0xfe, 0x03, 0x80, 0x74, 0xfe, 0x01, 0xec, 0x20, 0xfe, 0x80, 0x40, 0x12, 0x20, 0x63, + 0x27, 0x11, 0xc8, 0x59, 0x1e, 0x20, 0xed, 0x76, 0x20, 0x03, 0xfe, 0x08, 0x1c, 0x05, 0xfe, 0xac, + 0x00, 0xfe, 0x06, 0x58, 0x05, 0xfe, 0xae, 0x00, 0xfe, 0x07, 0x58, 0x05, 0xfe, 0xb0, 0x00, 0xfe, + 0x08, 0x58, 0x05, 0xfe, 0xb2, 0x00, 0xfe, 0x09, 0x58, 0xfe, 0x0a, 0x1c, 0x24, 0x69, 0x12, 0xc9, + 0x23, 0x0c, 0x50, 0x0c, 0x3f, 0x13, 0x40, 0x48, 0x5f, 0x17, 0x1d, 0xfe, 0x90, 0x4d, 0xfe, 0x91, + 0x54, 0x21, 0xfe, 0x08, 0x0f, 0x3e, 0x10, 0x13, 0x42, 0x48, 0x17, 0x4c, 0xfe, 0x90, 0x4d, 0xfe, + 0x91, 0x54, 0x21, 0xfe, 0x1e, 0x0f, 0x24, 0x10, 0x12, 0x20, 0x78, 0x2c, 0x46, 0x1e, 0x20, 0xed, + 0x76, 0x20, 0x11, 0xc8, 0xf6, 0xfe, 0xd6, 0xf0, 0xfe, 0x32, 0x0f, 0xea, 0x70, 0xfe, 0x14, 0x1c, + 0xfe, 0x10, 0x1c, 0xfe, 0x18, 0x1c, 0x03, 0x3c, 0xfe, 0x0c, 0x14, 0xee, 0xfe, 0x07, 0xe6, 0x1d, + 0xfe, 0xce, 0x47, 0xfe, 0xf5, 0x13, 0x03, 0x01, 0x86, 0x78, 0x2c, 0x46, 0xfa, 0xef, 0xfe, 0x42, + 0x13, 0x2f, 0x07, 0x2d, 0xfe, 0x34, 0x13, 0x0a, 0x42, 0x01, 0x0e, 0xb0, 0xfe, 0x36, 0x12, 0xf0, + 0xfe, 0x45, 0x48, 0x01, 0xe3, 0xfe, 0x00, 0xcc, 0xb0, 0xfe, 0xf3, 0x13, 0x3d, 0x75, 0x07, 0x10, + 0xa3, 0x0a, 0x80, 0x01, 0x0e, 0xfe, 0x80, 0x5c, 0x01, 0x6f, 0xfe, 0x0e, 0x10, 0x07, 0x7e, 0x45, + 0xf6, 0xfe, 0xd6, 0xf0, 0xfe, 0x6c, 0x0f, 0x03, 0xfe, 0x44, 0x58, 0x74, 0xfe, 0x01, 0xec, 0x97, + 0xfe, 0x9e, 0x40, 0xfe, 0x9d, 0xe7, 0x00, 0xfe, 0x9c, 0xe7, 0x1b, 0x76, 0x27, 0x01, 0xda, 0xfe, + 0xdd, 0x10, 0x2a, 0xbc, 0x7d, 0xbd, 0x7f, 0x30, 0x2e, 0xd5, 0x07, 0x1b, 0xfe, 0x48, 0x12, 0x07, + 0x0b, 0xfe, 0x56, 0x12, 0x07, 0x1a, 0xfe, 0x30, 0x12, 0x07, 0xc2, 0x16, 0xfe, 0x3e, 0x11, 0x07, + 0xfe, 0x23, 0x00, 0x16, 0xfe, 0x4a, 0x11, 0x07, 0x06, 0x16, 0xfe, 0xa8, 0x11, 0x07, 0x19, 0xfe, + 0x12, 0x12, 0x07, 0x00, 0x16, 0x22, 0x14, 0xc2, 0x01, 0x33, 0x9f, 0x2b, 0x01, 0x08, 0x8c, 0x43, + 0x03, 0x2b, 0xfe, 0x62, 0x08, 0x0a, 0xca, 0x01, 0xfe, 0x32, 0x0e, 0x11, 0x7e, 0x02, 0x29, 0x2b, + 0x2f, 0x07, 0x9b, 0xfe, 0xd9, 0x13, 0x79, 0x39, 0x68, 0x3a, 0x77, 0xfe, 0xfc, 0x10, 0x09, 0x04, + 0x6a, 0xfe, 0x72, 0x12, 0xc0, 0x38, 0xc1, 0x4e, 0xf4, 0xf5, 0x8e, 0xfe, 0xc6, 0x10, 0x1e, 0x58, + 0xfe, 0x26, 0x13, 0x05, 0x7b, 0x31, 0x7c, 0x77, 0xfe, 0x82, 0x0c, 0x0c, 0x54, 0x18, 0x55, 0x23, + 0x0c, 0x7b, 0x0c, 0x7c, 0x01, 0xa8, 0x24, 0x69, 0x73, 0x12, 0x58, 0x01, 0xa5, 0xc0, 0x38, 0xc1, + 0x4e, 0xfe, 0x04, 0x55, 0xfe, 0xa5, 0x55, 0xfe, 0x04, 0xfa, 0x38, 0xfe, 0x05, 0xfa, 0x4e, 0xfe, + 0x91, 0x10, 0x05, 0x56, 0x31, 0x57, 0xfe, 0x40, 0x56, 0xfe, 0xe1, 0x56, 0x0c, 0x56, 0x18, 0x57, + 0x83, 0xc0, 0x38, 0xc1, 0x4e, 0xf4, 0xf5, 0x05, 0x52, 0x31, 0x53, 0xfe, 0x00, 0x56, 0xfe, 0xa1, + 0x56, 0x0c, 0x52, 0x18, 0x53, 0x09, 0x04, 0x6a, 0xfe, 0x1e, 0x12, 0x1e, 0x58, 0xfe, 0x1f, 0x40, + 0x05, 0x54, 0x31, 0x55, 0xfe, 0x2c, 0x50, 0xfe, 0xae, 0x50, 0x05, 0x56, 0x31, 0x57, 0xfe, 0x44, + 0x50, 0xfe, 0xc6, 0x50, 0x05, 0x52, 0x31, 0x53, 0xfe, 0x08, 0x50, 0xfe, 0x8a, 0x50, 0x05, 0x39, + 0x31, 0x3a, 0xfe, 0x40, 0x50, 0xfe, 0xc2, 0x50, 0x02, 0x5c, 0x24, 0x06, 0x12, 0xcd, 0x02, 0x5b, + 0x2b, 0x01, 0x08, 0x1f, 0x44, 0x30, 0x2e, 0xd5, 0x07, 0x06, 0x21, 0x44, 0x2f, 0x07, 0x9b, 0x21, + 0x5b, 0x01, 0x6e, 0x1c, 0x3d, 0x16, 0x44, 0x09, 0x04, 0x0b, 0xe2, 0x79, 0x39, 0x68, 0x3a, 0xfe, + 0x0a, 0x55, 0x34, 0xfe, 0x8b, 0x55, 0xbe, 0x39, 0xbf, 0x3a, 0xfe, 0x0c, 0x51, 0xfe, 0x8e, 0x51, + 0x02, 0x5b, 0xfe, 0x19, 0x81, 0xaf, 0xfe, 0x19, 0x41, 0x02, 0x5b, 0x2b, 0x01, 0x08, 0x25, 0x32, + 0x1f, 0xa2, 0x30, 0x2e, 0xd8, 0x4b, 0x1a, 0xfe, 0xa6, 0x12, 0x4b, 0x0b, 0x3b, 0x02, 0x44, 0x01, + 0x08, 0x25, 0x32, 0x1f, 0xa2, 0x30, 0x2e, 0xd6, 0x07, 0x1a, 0x21, 0x44, 0x01, 0x08, 0x1f, 0xa2, + 0x30, 0x2e, 0xfe, 0xe8, 0x09, 0xfe, 0xc2, 0x49, 0x60, 0x05, 0xfe, 0x9c, 0x00, 0x28, 0x84, 0x49, + 0x04, 0x19, 0x34, 0x9f, 0xfe, 0xbb, 0x45, 0x4b, 0x00, 0x45, 0x3e, 0x06, 0x78, 0x3d, 0xfe, 0xda, + 0x14, 0x01, 0x6e, 0x87, 0xfe, 0x4b, 0x45, 0xe2, 0x2f, 0x07, 0x9a, 0xe1, 0x05, 0xc6, 0x28, 0x84, + 0x05, 0x3f, 0x28, 0x34, 0x5e, 0x02, 0x5b, 0xfe, 0xc0, 0x5d, 0xfe, 0xf8, 0x14, 0xfe, 0x03, 0x17, + 0x05, 0x50, 0xb4, 0x0c, 0x50, 0x5e, 0x2b, 0x01, 0x08, 0x26, 0x5c, 0x01, 0xfe, 0xaa, 0x14, 0x02, + 0x5c, 0x01, 0x08, 0x25, 0x32, 0x1f, 0x44, 0x30, 0x2e, 0xd6, 0x07, 0x06, 0x21, 0x44, 0x01, 0xfe, + 0x8e, 0x13, 0xfe, 0x42, 0x58, 0xfe, 0x82, 0x14, 0xfe, 0xa4, 0x14, 0x87, 0xfe, 0x4a, 0xf4, 0x0b, + 0x16, 0x44, 0xfe, 0x4a, 0xf4, 0x06, 0xfe, 0x0c, 0x12, 0x2f, 0x07, 0x9a, 0x85, 0x02, 0x5b, 0x05, + 0x3f, 0xb4, 0x0c, 0x3f, 0x5e, 0x2b, 0x01, 0x08, 0x26, 0x5c, 0x01, 0xfe, 0xd8, 0x14, 0x02, 0x5c, + 0x13, 0x06, 0x65, 0xfe, 0xca, 0x12, 0x26, 0xfe, 0xe0, 0x12, 0x72, 0xf1, 0x01, 0x08, 0x23, 0x72, + 0x03, 0x8f, 0xfe, 0xdc, 0x12, 0x25, 0xfe, 0xdc, 0x12, 0x1f, 0xfe, 0xca, 0x12, 0x5e, 0x2b, 0x01, + 0x08, 0xfe, 0xd5, 0x10, 0x13, 0x6c, 0xff, 0x02, 0x00, 0x57, 0x48, 0x8b, 0x1c, 0xfe, 0xff, 0x7f, + 0xfe, 0x30, 0x56, 0xfe, 0x00, 0x5c, 0x03, 0x13, 0x6c, 0xff, 0x02, 0x00, 0x57, 0x48, 0x8b, 0x1c, + 0x3d, 0xfe, 0x30, 0x56, 0xfe, 0x00, 0x5c, 0x03, 0x13, 0x6c, 0xff, 0x02, 0x00, 0x57, 0x48, 0x8b, + 0x03, 0x13, 0x6c, 0xff, 0x02, 0x00, 0x57, 0x48, 0x8b, 0xfe, 0x0b, 0x58, 0x03, 0x0a, 0x50, 0x01, + 0x82, 0x0a, 0x3f, 0x01, 0x82, 0x03, 0xfc, 0x1c, 0x10, 0xff, 0x03, 0x00, 0x54, 0xfe, 0x00, 0xf4, + 0x19, 0x48, 0xfe, 0x00, 0x7d, 0xfe, 0x01, 0x7d, 0xfe, 0x02, 0x7d, 0xfe, 0x03, 0x7c, 0x63, 0x27, + 0x0c, 0x52, 0x18, 0x53, 0xbe, 0x56, 0xbf, 0x57, 0x03, 0xfe, 0x62, 0x08, 0xfe, 0x82, 0x4a, 0xfe, + 0xe1, 0x1a, 0xfe, 0x83, 0x5a, 0x74, 0x03, 0x01, 0xfe, 0x14, 0x18, 0xfe, 0x42, 0x48, 0x5f, 0x60, + 0x89, 0x01, 0x08, 0x1f, 0xfe, 0xa2, 0x14, 0x30, 0x2e, 0xd8, 0x01, 0x08, 0x1f, 0xfe, 0xa2, 0x14, + 0x30, 0x2e, 0xfe, 0xe8, 0x0a, 0xfe, 0xc1, 0x59, 0x05, 0xc6, 0x28, 0xfe, 0xcc, 0x12, 0x49, 0x04, + 0x1b, 0xfe, 0xc4, 0x13, 0x23, 0x62, 0x1b, 0xe2, 0x4b, 0xc3, 0x64, 0xfe, 0xe8, 0x13, 0x3b, 0x13, + 0x06, 0x17, 0xc3, 0x78, 0xdb, 0xfe, 0x78, 0x10, 0xff, 0x02, 0x83, 0x55, 0xa1, 0xff, 0x02, 0x83, + 0x55, 0x62, 0x1a, 0xa4, 0xbb, 0xfe, 0x30, 0x00, 0x8e, 0xe4, 0x17, 0x2c, 0x13, 0x06, 0xfe, 0x56, + 0x10, 0x62, 0x0b, 0xe1, 0xbb, 0xfe, 0x64, 0x00, 0x8e, 0xe4, 0x0a, 0xfe, 0x64, 0x00, 0x17, 0x93, + 0x13, 0x06, 0xfe, 0x28, 0x10, 0x62, 0x06, 0xfe, 0x60, 0x13, 0xbb, 0xfe, 0xc8, 0x00, 0x8e, 0xe4, + 0x0a, 0xfe, 0xc8, 0x00, 0x17, 0x4d, 0x13, 0x06, 0x83, 0xbb, 0xfe, 0x90, 0x01, 0xba, 0xfe, 0x4e, + 0x14, 0x89, 0xfe, 0x12, 0x10, 0xfe, 0x43, 0xf4, 0x94, 0xfe, 0x56, 0xf0, 0xfe, 0x60, 0x14, 0xfe, + 0x04, 0xf4, 0x6c, 0xfe, 0x43, 0xf4, 0x93, 0xfe, 0xf3, 0x10, 0xf9, 0x01, 0xfe, 0x22, 0x13, 0x1c, + 0x3d, 0xfe, 0x10, 0x13, 0xfe, 0x00, 0x17, 0xfe, 0x4d, 0xe4, 0x69, 0xba, 0xfe, 0x9c, 0x14, 0xb7, + 0x69, 0xfe, 0x1c, 0x10, 0xfe, 0x00, 0x17, 0xfe, 0x4d, 0xe4, 0x19, 0xba, 0xfe, 0x9c, 0x14, 0xb7, + 0x19, 0x83, 0x60, 0x23, 0xfe, 0x4d, 0xf4, 0x00, 0xdf, 0x89, 0x13, 0x06, 0xfe, 0xb4, 0x56, 0xfe, + 0xc3, 0x58, 0x03, 0x60, 0x13, 0x0b, 0x03, 0x15, 0x06, 0x01, 0x08, 0x26, 0xe5, 0x15, 0x0b, 0x01, + 0x08, 0x26, 0xe5, 0x15, 0x1a, 0x01, 0x08, 0x26, 0xe5, 0x72, 0xfe, 0x89, 0x49, 0x01, 0x08, 0x03, + 0x15, 0x06, 0x01, 0x08, 0x26, 0xa6, 0x15, 0x1a, 0x01, 0x08, 0x26, 0xa6, 0x15, 0x06, 0x01, 0x08, + 0x26, 0xa6, 0xfe, 0x89, 0x49, 0x01, 0x08, 0x26, 0xa6, 0x72, 0xfe, 0x89, 0x4a, 0x01, 0x08, 0x03, + 0x60, 0x03, 0x1e, 0xcc, 0x07, 0x06, 0xfe, 0x44, 0x13, 0xad, 0x12, 0xcc, 0xfe, 0x49, 0xf4, 0x00, + 0x3b, 0x72, 0x9f, 0x5e, 0xfe, 0x01, 0xec, 0xfe, 0x27, 0x01, 0xf1, 0x01, 0x08, 0x2f, 0x07, 0xfe, + 0xe3, 0x00, 0xfe, 0x20, 0x13, 0x1f, 0xfe, 0x5a, 0x15, 0x23, 0x12, 0xcd, 0x01, 0x43, 0x1e, 0xcd, + 0x07, 0x06, 0x45, 0x09, 0x4a, 0x06, 0x35, 0x03, 0x0a, 0x42, 0x01, 0x0e, 0xed, 0x88, 0x07, 0x10, + 0xa4, 0x0a, 0x80, 0x01, 0x0e, 0x88, 0x0a, 0x51, 0x01, 0x9e, 0x03, 0x0a, 0x80, 0x01, 0x0e, 0x88, + 0xfe, 0x80, 0xe7, 0x10, 0x07, 0x10, 0x84, 0xfe, 0x45, 0x58, 0x01, 0xe3, 0x88, 0x03, 0x0a, 0x42, + 0x01, 0x0e, 0x88, 0x0a, 0x51, 0x01, 0x9e, 0x03, 0x0a, 0x42, 0x01, 0x0e, 0xfe, 0x80, 0x80, 0xf2, + 0xfe, 0x49, 0xe4, 0x10, 0xa4, 0x0a, 0x80, 0x01, 0x0e, 0xf2, 0x0a, 0x51, 0x01, 0x82, 0x03, 0x17, + 0x10, 0x71, 0x66, 0xfe, 0x60, 0x01, 0xfe, 0x18, 0xdf, 0xfe, 0x19, 0xde, 0xfe, 0x24, 0x1c, 0xfe, + 0x1d, 0xf7, 0x1d, 0x90, 0xfe, 0xf6, 0x15, 0x01, 0xfe, 0xfc, 0x16, 0xe0, 0x91, 0x1d, 0x66, 0xfe, + 0x2c, 0x01, 0xfe, 0x2f, 0x19, 0x03, 0xae, 0x21, 0xfe, 0xe6, 0x15, 0xfe, 0xda, 0x10, 0x17, 0x10, + 0x71, 0x05, 0xfe, 0x64, 0x01, 0xfe, 0x00, 0xf4, 0x19, 0xfe, 0x18, 0x58, 0x05, 0xfe, 0x66, 0x01, + 0xfe, 0x19, 0x58, 0x91, 0x19, 0xfe, 0x3c, 0x90, 0xfe, 0x30, 0xf4, 0x06, 0xfe, 0x3c, 0x50, 0x66, + 0xfe, 0x38, 0x00, 0xfe, 0x0f, 0x79, 0xfe, 0x1c, 0xf7, 0x19, 0x90, 0xfe, 0x40, 0x16, 0xfe, 0xb6, + 0x14, 0x34, 0x03, 0xae, 0x21, 0xfe, 0x18, 0x16, 0xfe, 0x9c, 0x10, 0x17, 0x10, 0x71, 0xfe, 0x83, + 0x5a, 0xfe, 0x18, 0xdf, 0xfe, 0x19, 0xde, 0xfe, 0x1d, 0xf7, 0x38, 0x90, 0xfe, 0x62, 0x16, 0xfe, + 0x94, 0x14, 0xfe, 0x10, 0x13, 0x91, 0x38, 0x66, 0x1b, 0xfe, 0xaf, 0x19, 0xfe, 0x98, 0xe7, 0x00, + 0x03, 0xae, 0x21, 0xfe, 0x56, 0x16, 0xfe, 0x6c, 0x10, 0x17, 0x10, 0x71, 0xfe, 0x30, 0xbc, 0xfe, + 0xb2, 0xbc, 0x91, 0xc5, 0x66, 0x1b, 0xfe, 0x0f, 0x79, 0xfe, 0x1c, 0xf7, 0xc5, 0x90, 0xfe, 0x9a, + 0x16, 0xfe, 0x5c, 0x14, 0x34, 0x03, 0xae, 0x21, 0xfe, 0x86, 0x16, 0xfe, 0x42, 0x10, 0xfe, 0x02, + 0xf6, 0x10, 0x71, 0xfe, 0x18, 0xfe, 0x54, 0xfe, 0x19, 0xfe, 0x55, 0xfc, 0xfe, 0x1d, 0xf7, 0x4f, + 0x90, 0xfe, 0xc0, 0x16, 0xfe, 0x36, 0x14, 0xfe, 0x1c, 0x13, 0x91, 0x4f, 0x47, 0xfe, 0x83, 0x58, + 0xfe, 0xaf, 0x19, 0xfe, 0x80, 0xe7, 0x10, 0xfe, 0x81, 0xe7, 0x10, 0x11, 0xfe, 0xdd, 0x00, 0x63, + 0x27, 0x03, 0x63, 0x27, 0xfe, 0x12, 0x45, 0x21, 0xfe, 0xb0, 0x16, 0x14, 0x06, 0x37, 0x95, 0xa9, + 0x02, 0x29, 0xfe, 0x39, 0xf0, 0xfe, 0x04, 0x17, 0x23, 0x03, 0xfe, 0x7e, 0x18, 0x1c, 0x1a, 0x5d, + 0x13, 0x0d, 0x03, 0x71, 0x05, 0xcb, 0x1c, 0x06, 0xfe, 0xef, 0x12, 0xfe, 0xe1, 0x10, 0x78, 0x2c, + 0x46, 0x2f, 0x07, 0x2d, 0xfe, 0x3c, 0x13, 0xfe, 0x82, 0x14, 0xfe, 0x42, 0x13, 0x3c, 0x8a, 0x0a, + 0x42, 0x01, 0x0e, 0xb0, 0xfe, 0x3e, 0x12, 0xf0, 0xfe, 0x45, 0x48, 0x01, 0xe3, 0xfe, 0x00, 0xcc, + 0xb0, 0xfe, 0xf3, 0x13, 0x3d, 0x75, 0x07, 0x10, 0xa3, 0x0a, 0x80, 0x01, 0x0e, 0xf2, 0x01, 0x6f, + 0xfe, 0x16, 0x10, 0x07, 0x7e, 0x85, 0xfe, 0x40, 0x14, 0xfe, 0x24, 0x12, 0xf6, 0xfe, 0xd6, 0xf0, + 0xfe, 0x24, 0x17, 0x17, 0x0b, 0x03, 0xfe, 0x9c, 0xe7, 0x0b, 0x0f, 0xfe, 0x15, 0x00, 0x59, 0x76, + 0x27, 0x01, 0xda, 0x17, 0x06, 0x03, 0x3c, 0x8a, 0x09, 0x4a, 0x1d, 0x35, 0x11, 0x2d, 0x01, 0x6f, + 0x17, 0x06, 0x03, 0xfe, 0x38, 0x90, 0xfe, 0xba, 0x90, 0x79, 0xc7, 0x68, 0xc8, 0xfe, 0x48, 0x55, + 0x34, 0xfe, 0xc9, 0x55, 0x03, 0x1e, 0x98, 0x73, 0x12, 0x98, 0x03, 0x0a, 0x99, 0x01, 0x0e, 0xf0, + 0x0a, 0x40, 0x01, 0x0e, 0xfe, 0x49, 0x44, 0x16, 0xfe, 0xf0, 0x17, 0x73, 0x75, 0x03, 0x0a, 0x42, + 0x01, 0x0e, 0x07, 0x10, 0x45, 0x0a, 0x51, 0x01, 0x9e, 0x0a, 0x40, 0x01, 0x0e, 0x73, 0x75, 0x03, + 0xfe, 0x4e, 0xe4, 0x1a, 0x64, 0xfe, 0x24, 0x18, 0x05, 0xfe, 0x90, 0x00, 0xfe, 0x3a, 0x45, 0x5b, + 0xfe, 0x4e, 0xe4, 0xc2, 0x64, 0xfe, 0x36, 0x18, 0x05, 0xfe, 0x92, 0x00, 0xfe, 0x02, 0xe6, 0x1b, + 0xdc, 0xfe, 0x4e, 0xe4, 0xfe, 0x0b, 0x00, 0x64, 0xfe, 0x48, 0x18, 0x05, 0xfe, 0x94, 0x00, 0xfe, + 0x02, 0xe6, 0x19, 0xfe, 0x08, 0x10, 0x05, 0xfe, 0x96, 0x00, 0xfe, 0x02, 0xe6, 0x2c, 0xfe, 0x4e, + 0x45, 0xfe, 0x0c, 0x12, 0xaf, 0xff, 0x04, 0x68, 0x54, 0xde, 0x1c, 0x69, 0x03, 0x07, 0x7a, 0xfe, + 0x5a, 0xf0, 0xfe, 0x74, 0x18, 0x24, 0xfe, 0x09, 0x00, 0xfe, 0x34, 0x10, 0x07, 0x1b, 0xfe, 0x5a, + 0xf0, 0xfe, 0x82, 0x18, 0x24, 0xc3, 0xfe, 0x26, 0x10, 0x07, 0x1a, 0x5d, 0x24, 0x2c, 0xdc, 0x07, + 0x0b, 0x5d, 0x24, 0x93, 0xfe, 0x0e, 0x10, 0x07, 0x06, 0x5d, 0x24, 0x4d, 0x9f, 0xad, 0x03, 0x14, + 0xfe, 0x09, 0x00, 0x01, 0x33, 0xfe, 0x04, 0xfe, 0x7d, 0x05, 0x7f, 0xf9, 0x03, 0x25, 0xfe, 0xca, + 0x18, 0xfe, 0x14, 0xf0, 0x08, 0x65, 0xfe, 0xc6, 0x18, 0x03, 0xff, 0x1a, 0x00, 0x00, }; STATIC unsigned short _adv_asc3550_size = - sizeof(_adv_asc3550_buf); /* 0x137B */ + sizeof(_adv_asc3550_buf); /* 0x13AD */ STATIC ADV_DCNT _adv_asc3550_chksum = - 0x04CDA9B9UL; /* Expanded little-endian checksum. */ + 0x04D52DDDUL; /* Expanded little-endian checksum. */ +/* Microcode buffer is kept after initialization for error recovery. */ STATIC unsigned char _adv_asc38C0800_buf[] = { - 0x00, 0x00, 0x00, 0xf2, 0x00, 0xf0, 0x00, 0xfc, 0x00, 0x16, 0x01, 0x00, 0x48, 0xe4, 0x03, 0xf6, - 0x18, 0xe4, 0x02, 0x00, 0x18, 0x80, 0xa8, 0x19, 0x00, 0xfa, 0xff, 0xff, 0x00, 0x0f, 0x00, 0xf6, - 0x9e, 0xe7, 0xff, 0x00, 0x82, 0xe7, 0x00, 0xea, 0x01, 0xe6, 0x09, 0xe7, 0x01, 0xf6, 0x01, 0xfa, - 0x03, 0x00, 0x55, 0xf0, 0x04, 0x00, 0x1e, 0xf0, 0x85, 0xf0, 0x18, 0xf4, 0x08, 0x00, 0xbc, 0x00, - 0x38, 0x54, 0x00, 0xec, 0xd5, 0xf0, 0x70, 0x0d, 0x00, 0xe6, 0x86, 0xf0, 0xb1, 0xf0, 0x98, 0x57, - 0x01, 0xfc, 0xb4, 0x00, 0xd4, 0x01, 0x0c, 0x1c, 0x3e, 0x1c, 0x10, 0x00, 0x3c, 0x00, 0xbb, 0x00, - 0x00, 0x10, 0x94, 0x19, 0x02, 0x80, 0x32, 0xf0, 0x6a, 0x0d, 0x02, 0x13, 0x98, 0x13, 0x18, 0x40, - 0x00, 0x57, 0x01, 0xea, 0x02, 0xfc, 0x03, 0xfc, 0x3e, 0x00, 0xc0, 0x00, 0x6c, 0x01, 0x6e, 0x01, - 0x74, 0x01, 0x76, 0x01, 0xb9, 0x54, 0x00, 0x80, 0x03, 0xe6, 0xb6, 0x00, 0x01, 0x01, 0x3e, 0x01, - 0x7a, 0x01, 0xba, 0x08, 0xac, 0x10, 0xf4, 0x10, 0x04, 0x12, 0x06, 0x13, 0xbb, 0x55, 0x3c, 0x56, - 0x3e, 0x57, 0x03, 0x58, 0x1b, 0x80, 0x30, 0xe4, 0x4b, 0xe4, 0x5d, 0xf0, 0x02, 0xfa, 0x20, 0x00, - 0x32, 0x00, 0x40, 0x00, 0x80, 0x00, 0x24, 0x01, 0x3c, 0x01, 0x68, 0x01, 0x6a, 0x01, 0x70, 0x01, - 0x72, 0x01, 0x78, 0x01, 0x7c, 0x01, 0x62, 0x0a, 0x74, 0x0d, 0x08, 0x12, 0x4c, 0x1c, 0x02, 0x4a, - 0x4a, 0xe4, 0x02, 0xee, 0x5b, 0xf0, 0x03, 0xf7, 0x0c, 0x00, 0x0f, 0x00, 0x47, 0x00, 0xbe, 0x00, - 0x00, 0x01, 0xfe, 0x10, 0x3a, 0x16, 0x32, 0x1c, 0x38, 0x1c, 0x4e, 0x1c, 0x10, 0x44, 0x00, 0x4c, - 0x04, 0x80, 0x04, 0xea, 0x5c, 0xf0, 0xa7, 0xf0, 0x04, 0xf6, 0x03, 0xfa, 0x05, 0x00, 0x34, 0x00, - 0x36, 0x00, 0x98, 0x00, 0xcc, 0x00, 0x20, 0x01, 0x4e, 0x01, 0x3a, 0x0b, 0x32, 0x0c, 0xf6, 0x0e, - 0x04, 0x10, 0x0c, 0x10, 0x00, 0x11, 0x0a, 0x12, 0x04, 0x13, 0x30, 0x1c, 0x02, 0x48, 0x00, 0x4e, - 0x42, 0x54, 0x44, 0x55, 0xbd, 0x56, 0x00, 0xdc, 0x05, 0xf0, 0x09, 0xf0, 0x59, 0xf0, 0xb8, 0xf0, + 0x00, 0x00, 0x00, 0xf2, 0x00, 0xf0, 0x00, 0xfc, 0x00, 0x16, 0x18, 0xe4, 0x01, 0x00, 0x48, 0xe4, + 0x18, 0x80, 0x03, 0xf6, 0x02, 0x00, 0xce, 0x19, 0x00, 0xfa, 0xff, 0xff, 0x1c, 0x0f, 0x00, 0xf6, + 0x9e, 0xe7, 0xff, 0x00, 0x82, 0xe7, 0x00, 0xea, 0x01, 0xfa, 0x01, 0xe6, 0x09, 0xe7, 0x55, 0xf0, + 0x01, 0xf6, 0x03, 0x00, 0x04, 0x00, 0x10, 0x00, 0x1e, 0xf0, 0x85, 0xf0, 0x18, 0xf4, 0x08, 0x00, + 0xbc, 0x00, 0x38, 0x54, 0x00, 0xec, 0xd5, 0xf0, 0x82, 0x0d, 0x00, 0xe6, 0x86, 0xf0, 0xb1, 0xf0, + 0x98, 0x57, 0x01, 0xfc, 0xb4, 0x00, 0xd4, 0x01, 0x0c, 0x1c, 0x3e, 0x1c, 0x3c, 0x00, 0xbb, 0x00, + 0x00, 0x10, 0xba, 0x19, 0x02, 0x80, 0x32, 0xf0, 0x7c, 0x0d, 0x02, 0x13, 0xba, 0x13, 0x18, 0x40, + 0x00, 0x57, 0x01, 0xea, 0x02, 0xfc, 0x03, 0xfc, 0x3e, 0x00, 0x6c, 0x01, 0x6e, 0x01, 0x74, 0x01, + 0x76, 0x01, 0xb9, 0x54, 0x3e, 0x57, 0x00, 0x80, 0x03, 0xe6, 0xb6, 0x00, 0xc0, 0x00, 0x01, 0x01, + 0x3e, 0x01, 0x7a, 0x01, 0xca, 0x08, 0xce, 0x10, 0x16, 0x11, 0x04, 0x12, 0x08, 0x12, 0x02, 0x4a, + 0xbb, 0x55, 0x3c, 0x56, 0x03, 0x58, 0x1b, 0x80, 0x30, 0xe4, 0x4b, 0xe4, 0x5d, 0xf0, 0x02, 0xfa, + 0x20, 0x00, 0x32, 0x00, 0x40, 0x00, 0x80, 0x00, 0x24, 0x01, 0x3c, 0x01, 0x68, 0x01, 0x6a, 0x01, + 0x70, 0x01, 0x72, 0x01, 0x78, 0x01, 0x7c, 0x01, 0x62, 0x0a, 0x86, 0x0d, 0x06, 0x13, 0x4c, 0x1c, + 0x04, 0x80, 0x4a, 0xe4, 0x02, 0xee, 0x5b, 0xf0, 0x03, 0xf7, 0x0c, 0x00, 0x0f, 0x00, 0x47, 0x00, + 0xbe, 0x00, 0x00, 0x01, 0x20, 0x11, 0x5c, 0x16, 0x32, 0x1c, 0x38, 0x1c, 0x4e, 0x1c, 0x10, 0x44, + 0x00, 0x4c, 0x04, 0xea, 0x5c, 0xf0, 0xa7, 0xf0, 0x04, 0xf6, 0x03, 0xfa, 0x05, 0x00, 0x34, 0x00, + 0x36, 0x00, 0x98, 0x00, 0xcc, 0x00, 0x20, 0x01, 0x4e, 0x01, 0x4a, 0x0b, 0x42, 0x0c, 0x12, 0x0f, + 0x0c, 0x10, 0x22, 0x11, 0x0a, 0x12, 0x04, 0x13, 0x30, 0x1c, 0x02, 0x48, 0x00, 0x4e, 0x42, 0x54, + 0x44, 0x55, 0xbd, 0x56, 0x06, 0x83, 0x00, 0xdc, 0x05, 0xf0, 0x09, 0xf0, 0x59, 0xf0, 0xb8, 0xf0, 0x4b, 0xf4, 0x06, 0xf7, 0x0e, 0xf7, 0x04, 0xfc, 0x05, 0xfc, 0x06, 0x00, 0x19, 0x00, 0x33, 0x00, 0x9b, 0x00, 0xa4, 0x00, 0xb5, 0x00, 0xba, 0x00, 0xd0, 0x00, 0xe1, 0x00, 0xe7, 0x00, 0xe2, 0x03, - 0xec, 0x0e, 0x02, 0x10, 0x0a, 0x10, 0x0a, 0x13, 0x12, 0x13, 0x02, 0x14, 0x12, 0x14, 0xe2, 0x15, - 0xe6, 0x15, 0x82, 0x17, 0x20, 0x1c, 0x34, 0x1c, 0x36, 0x1c, 0x08, 0x44, 0x38, 0x44, 0x91, 0x44, - 0x0a, 0x45, 0x48, 0x46, 0x01, 0x48, 0x68, 0x54, 0x3a, 0x55, 0x83, 0x55, 0xe5, 0x55, 0xb0, 0x57, - 0x01, 0x58, 0x83, 0x59, 0x06, 0x83, 0x19, 0xe4, 0x05, 0xe6, 0x0b, 0xf0, 0x0c, 0xf0, 0x04, 0xf8, + 0x08, 0x0f, 0x02, 0x10, 0x04, 0x10, 0x0a, 0x10, 0x0a, 0x13, 0x0c, 0x13, 0x12, 0x13, 0x24, 0x14, + 0x34, 0x14, 0x04, 0x16, 0x08, 0x16, 0xa4, 0x17, 0x20, 0x1c, 0x34, 0x1c, 0x36, 0x1c, 0x08, 0x44, + 0x38, 0x44, 0x91, 0x44, 0x0a, 0x45, 0x48, 0x46, 0x01, 0x48, 0x68, 0x54, 0x3a, 0x55, 0x83, 0x55, + 0xe5, 0x55, 0xb0, 0x57, 0x01, 0x58, 0x83, 0x59, 0x05, 0xe6, 0x0b, 0xf0, 0x0c, 0xf0, 0x04, 0xf8, 0x05, 0xf8, 0x07, 0x00, 0x0a, 0x00, 0x1c, 0x00, 0x1e, 0x00, 0x9e, 0x00, 0xa8, 0x00, 0xaa, 0x00, 0xb9, 0x00, 0xe0, 0x00, 0x22, 0x01, 0x26, 0x01, 0x79, 0x01, 0x7e, 0x01, 0xc4, 0x01, 0xc6, 0x01, - 0x80, 0x02, 0x66, 0x03, 0xde, 0x04, 0x8a, 0x06, 0xe8, 0x07, 0x68, 0x08, 0x69, 0x08, 0xc6, 0x08, - 0xe9, 0x09, 0xea, 0x0b, 0x12, 0x0f, 0x0e, 0x10, 0x1a, 0x10, 0x26, 0x10, 0xed, 0x10, 0xf1, 0x10, - 0x08, 0x11, 0x06, 0x12, 0x0c, 0x12, 0x10, 0x12, 0x1c, 0x12, 0x0c, 0x13, 0x10, 0x13, 0x16, 0x13, - 0x1e, 0x13, 0x24, 0x14, 0x54, 0x14, 0x14, 0x15, 0xa8, 0x15, 0x6b, 0x18, 0x98, 0x18, 0xa4, 0x18, - 0x6c, 0x19, 0xc0, 0x19, 0x12, 0x1c, 0x46, 0x1c, 0x9c, 0x32, 0xfe, 0x9c, 0xf0, 0x2a, 0x02, 0xfe, - 0x9a, 0x0d, 0xff, 0x10, 0x00, 0x00, 0xd7, 0xfe, 0xc2, 0x19, 0x00, 0xd6, 0xfe, 0x84, 0x01, 0xff, - 0x03, 0x00, 0x00, 0xfe, 0x02, 0x15, 0xfe, 0x0c, 0x05, 0xff, 0x38, 0x00, 0x00, 0xfe, 0x57, 0x24, - 0x00, 0xfe, 0x4c, 0x00, 0x5a, 0xff, 0x04, 0x00, 0x00, 0x11, 0xff, 0x09, 0x00, 0x00, 0xff, 0x08, + 0x80, 0x02, 0x5e, 0x03, 0xee, 0x04, 0x9a, 0x06, 0xf8, 0x07, 0x62, 0x08, 0x68, 0x08, 0x69, 0x08, + 0xd6, 0x08, 0xe9, 0x09, 0xfa, 0x0b, 0x2e, 0x0f, 0x12, 0x10, 0x1a, 0x10, 0xed, 0x10, 0xf1, 0x10, + 0x2a, 0x11, 0x06, 0x12, 0x0c, 0x12, 0x3e, 0x12, 0x10, 0x13, 0x16, 0x13, 0x1e, 0x13, 0x46, 0x14, + 0x76, 0x14, 0x82, 0x14, 0x36, 0x15, 0xca, 0x15, 0x6b, 0x18, 0xbe, 0x18, 0xca, 0x18, 0xe6, 0x19, + 0x12, 0x1c, 0x46, 0x1c, 0x9c, 0x32, 0x00, 0x40, 0x0e, 0x47, 0xfe, 0x9c, 0xf0, 0x2b, 0x02, 0xfe, + 0xac, 0x0d, 0xff, 0x10, 0x00, 0x00, 0xd7, 0xfe, 0xe8, 0x19, 0x00, 0xd6, 0xfe, 0x84, 0x01, 0xff, + 0x03, 0x00, 0x00, 0xfe, 0x93, 0x15, 0xfe, 0x0f, 0x05, 0xff, 0x38, 0x00, 0x00, 0xfe, 0x57, 0x24, + 0x00, 0xfe, 0x4c, 0x00, 0x5b, 0xff, 0x04, 0x00, 0x00, 0x11, 0xff, 0x09, 0x00, 0x00, 0xff, 0x08, 0x01, 0x01, 0xff, 0x08, 0xff, 0xff, 0xff, 0x27, 0x00, 0x00, 0xff, 0x10, 0xff, 0xff, 0xff, 0x11, 0x00, 0x00, 0xfe, 0x78, 0x56, 0xfe, 0x34, 0x12, 0xff, 0x21, 0x00, 0x00, 0xfe, 0x04, 0xf7, 0xd6, - 0x2b, 0x99, 0x09, 0x01, 0xfe, 0xa0, 0x0f, 0xfe, 0x04, 0xf7, 0xd6, 0x99, 0x09, 0x50, 0x2b, 0xfe, + 0x2c, 0x99, 0x0a, 0x01, 0xfe, 0xc2, 0x0f, 0xfe, 0x04, 0xf7, 0xd6, 0x99, 0x0a, 0x42, 0x2c, 0xfe, 0x3d, 0xf0, 0xfe, 0x06, 0x02, 0xfe, 0x20, 0xf0, 0xa7, 0xfe, 0x91, 0xf0, 0xfe, 0xf4, 0x01, 0xfe, - 0x90, 0xf0, 0xfe, 0xf4, 0x01, 0xfe, 0x8f, 0xf0, 0xa7, 0x03, 0x5c, 0x4c, 0x02, 0xfe, 0xb6, 0x0d, - 0x01, 0xfe, 0x1c, 0x0e, 0xfe, 0xdd, 0x12, 0xfe, 0xfc, 0x10, 0xfe, 0x28, 0x1c, 0x03, 0xfe, 0xa6, - 0x00, 0xfe, 0xd3, 0x12, 0x42, 0x17, 0xfe, 0xa6, 0x00, 0xc0, 0xfe, 0x48, 0xf0, 0xfe, 0x8a, 0x02, + 0x90, 0xf0, 0xfe, 0xf4, 0x01, 0xfe, 0x8f, 0xf0, 0xa7, 0x03, 0x5d, 0x4d, 0x02, 0xfe, 0xc8, 0x0d, + 0x01, 0xfe, 0x38, 0x0e, 0xfe, 0xdd, 0x12, 0xfe, 0xfc, 0x10, 0xfe, 0x28, 0x1c, 0x03, 0xfe, 0xa6, + 0x00, 0xfe, 0xd3, 0x12, 0x41, 0x14, 0xfe, 0xa6, 0x00, 0xc2, 0xfe, 0x48, 0xf0, 0xfe, 0x8a, 0x02, 0xfe, 0x49, 0xf0, 0xfe, 0xa4, 0x02, 0xfe, 0x4a, 0xf0, 0xfe, 0xc2, 0x02, 0xfe, 0x46, 0xf0, 0xfe, 0x54, 0x02, 0xfe, 0x47, 0xf0, 0xfe, 0x5a, 0x02, 0xfe, 0x43, 0xf0, 0xfe, 0x48, 0x02, 0xfe, 0x44, - 0xf0, 0xfe, 0x4c, 0x02, 0xfe, 0x45, 0xf0, 0xfe, 0x50, 0x02, 0x16, 0x09, 0x88, 0x16, 0x05, 0x17, - 0xa1, 0x02, 0x2a, 0xfe, 0x00, 0x1c, 0xe7, 0xfe, 0x02, 0x1c, 0xe6, 0xfe, 0x1e, 0x1c, 0xfe, 0xe9, - 0x10, 0x01, 0xfe, 0xf6, 0x17, 0xfe, 0xe7, 0x10, 0xfe, 0x06, 0xfc, 0xce, 0x07, 0x6f, 0x01, 0xa8, - 0x02, 0x2a, 0x14, 0x58, 0x39, 0xa2, 0x01, 0xfe, 0x36, 0x10, 0x07, 0x6f, 0x01, 0x87, 0xfe, 0xbd, - 0x10, 0x07, 0x6f, 0x01, 0x87, 0xfe, 0xad, 0x10, 0xfe, 0x16, 0x1c, 0xfe, 0x58, 0x1c, 0x16, 0x05, - 0x17, 0xa1, 0x2b, 0x1b, 0x2a, 0xfe, 0x3d, 0xf0, 0xfe, 0x06, 0x02, 0x22, 0xfe, 0x98, 0x02, 0xfe, - 0x5a, 0x1c, 0xfa, 0xfe, 0x14, 0x1c, 0x14, 0xfe, 0x30, 0x00, 0x39, 0xa2, 0x01, 0xe5, 0x16, 0x05, - 0x17, 0xa1, 0x02, 0xd7, 0x21, 0x1f, 0x06, 0x11, 0x35, 0xfe, 0x69, 0x10, 0x16, 0x05, 0x17, 0xa1, - 0xfe, 0x04, 0xec, 0x1f, 0x67, 0x43, 0x13, 0x1f, 0xfe, 0x05, 0xf6, 0xce, 0x01, 0xfe, 0x28, 0x17, - 0x0a, 0x53, 0x57, 0x37, 0x12, 0x2f, 0x50, 0xc2, 0x01, 0xfe, 0x60, 0x16, 0x02, 0x2a, 0x07, 0x3d, - 0x01, 0x0e, 0x06, 0x00, 0x4d, 0x01, 0x72, 0xfe, 0x20, 0x10, 0x07, 0xa4, 0x01, 0x0e, 0xfe, 0x41, - 0x58, 0x07, 0x3d, 0x01, 0x0e, 0xfe, 0x49, 0x54, 0x6a, 0xfe, 0x10, 0x03, 0x01, 0xfe, 0x60, 0x16, - 0x02, 0x2a, 0x2b, 0x67, 0xfe, 0x02, 0xe8, 0x29, 0xfe, 0xbf, 0x57, 0xfe, 0x9e, 0x43, 0xfe, 0x77, - 0x57, 0xfe, 0x27, 0xf0, 0xfe, 0xe0, 0x01, 0xfe, 0x07, 0x4b, 0xfe, 0x20, 0xf0, 0xa7, 0xfe, 0x40, - 0x1c, 0x1b, 0xd9, 0xfe, 0x26, 0xf0, 0xfe, 0x62, 0x03, 0xfe, 0xa0, 0xf0, 0xfe, 0x50, 0x03, 0xfe, - 0x11, 0xf0, 0xa7, 0xe3, 0xfe, 0x9f, 0xf0, 0xfe, 0x70, 0x03, 0xfb, 0x10, 0xfe, 0x11, 0x00, 0x02, - 0x64, 0x2b, 0xfe, 0x48, 0x1c, 0xfb, 0x20, 0x21, 0xa3, 0xb5, 0x13, 0xa3, 0x07, 0x3d, 0x01, 0x0e, - 0xb5, 0x77, 0x01, 0xfe, 0x92, 0x16, 0x12, 0xd1, 0x1b, 0xd9, 0xfe, 0x01, 0xf0, 0xd9, 0xfe, 0x82, - 0xf0, 0xfe, 0x96, 0x03, 0xfc, 0x12, 0xfe, 0xe4, 0x00, 0x26, 0xfe, 0xa8, 0x03, 0x1b, 0x34, 0x1c, - 0xfe, 0xb8, 0x03, 0x01, 0x4a, 0xfe, 0x06, 0xf0, 0xfe, 0xc8, 0x03, 0x95, 0x86, 0xfe, 0x0a, 0xf0, - 0xfe, 0x7a, 0x06, 0x02, 0x23, 0x03, 0x6f, 0x27, 0x19, 0xfe, 0xea, 0x04, 0x14, 0x6c, 0x01, 0x36, - 0x7b, 0xfe, 0x6a, 0x02, 0x02, 0xd8, 0xfb, 0x2b, 0x99, 0x18, 0xfe, 0x67, 0x1b, 0xfe, 0xbf, 0x57, - 0xfe, 0x77, 0x57, 0xfe, 0x48, 0x1c, 0x73, 0x01, 0xad, 0x8d, 0x07, 0x3d, 0x01, 0x0e, 0x06, 0x00, - 0x19, 0xda, 0x07, 0xd1, 0x01, 0x0e, 0x8e, 0x4f, 0x63, 0x79, 0x29, 0x03, 0x6f, 0x27, 0xeb, 0x14, - 0x6c, 0x01, 0x36, 0x7b, 0xfe, 0x6a, 0x02, 0x02, 0xd8, 0xc7, 0x81, 0xc8, 0x83, 0x1b, 0x23, 0x26, - 0xfe, 0x40, 0x04, 0x1c, 0xfe, 0x3c, 0x04, 0x3b, 0xfe, 0xa0, 0x00, 0xfe, 0x9b, 0x57, 0xfe, 0x46, - 0x12, 0x2c, 0xff, 0x02, 0x00, 0x10, 0x01, 0x0b, 0x1c, 0xfe, 0xd4, 0x04, 0x2c, 0x01, 0x0b, 0x1c, - 0x23, 0x33, 0x31, 0xdd, 0xfe, 0x4c, 0x44, 0xfe, 0x3c, 0x12, 0x4f, 0xfe, 0x44, 0x48, 0x0f, 0x6e, - 0xfe, 0x4c, 0x54, 0x6a, 0xda, 0x67, 0x79, 0x29, 0xfe, 0x06, 0x80, 0xfe, 0x48, 0x47, 0xfe, 0x52, - 0x13, 0x32, 0x06, 0x82, 0xfe, 0x4a, 0x13, 0xfe, 0x18, 0x10, 0x0f, 0x6e, 0xfe, 0x4c, 0x54, 0x6a, - 0xda, 0xfe, 0x06, 0x80, 0xfe, 0x48, 0x47, 0xfe, 0x38, 0x13, 0x32, 0x06, 0x82, 0xfe, 0x30, 0x13, - 0x0a, 0x08, 0x2d, 0xec, 0x14, 0x9d, 0x0a, 0x08, 0x05, 0x4c, 0x14, 0xfe, 0x0d, 0x00, 0x01, 0x36, - 0x7b, 0xfe, 0x52, 0x0d, 0x02, 0x23, 0x2c, 0x12, 0xfe, 0xe6, 0x00, 0xfe, 0x1c, 0x90, 0xfe, 0x40, - 0x5c, 0x04, 0x14, 0x9d, 0x01, 0x36, 0x02, 0x2a, 0xfe, 0x42, 0x5b, 0x99, 0x18, 0xfe, 0x46, 0x59, - 0xfe, 0xbf, 0x57, 0xfe, 0x77, 0x57, 0xfe, 0x87, 0x80, 0xfe, 0x31, 0xe4, 0x5a, 0x0a, 0x08, 0x09, - 0xfe, 0x84, 0x13, 0xfe, 0x20, 0x80, 0x06, 0x18, 0xfe, 0x7c, 0x12, 0x52, 0x08, 0x05, 0xfe, 0x6c, - 0x13, 0x03, 0xfe, 0xa2, 0x00, 0x27, 0x19, 0xfe, 0x80, 0x05, 0xfe, 0x31, 0xe4, 0x59, 0x52, 0x08, - 0x09, 0xfe, 0x56, 0x13, 0x03, 0xfe, 0xa0, 0x00, 0x27, 0xfe, 0x4e, 0x12, 0x66, 0xff, 0x02, 0x00, - 0x10, 0x26, 0xfe, 0x38, 0x05, 0x1b, 0x34, 0xfe, 0x89, 0x48, 0xff, 0x02, 0x00, 0x10, 0x26, 0xfe, - 0x46, 0x05, 0x25, 0xfe, 0x98, 0x05, 0x12, 0xfe, 0xe3, 0x00, 0x20, 0x52, 0xfe, 0x4a, 0xf0, 0xfe, - 0x66, 0x05, 0xfe, 0x49, 0xf0, 0xfe, 0x60, 0x05, 0x89, 0x24, 0xfe, 0x21, 0x00, 0xaa, 0x24, 0xfe, - 0x22, 0x00, 0x88, 0x24, 0x57, 0xfe, 0x09, 0x48, 0xff, 0x02, 0x00, 0x10, 0x26, 0xfe, 0x76, 0x05, - 0x25, 0xfe, 0x98, 0x05, 0xfe, 0xe2, 0x08, 0x52, 0x08, 0xcb, 0x4c, 0x01, 0xae, 0x24, 0x05, 0x13, - 0xd3, 0x39, 0xfe, 0x27, 0x01, 0x0a, 0x08, 0x2d, 0xfe, 0x22, 0x12, 0x42, 0x01, 0xb0, 0x14, 0x9d, - 0x0a, 0x08, 0x05, 0x4c, 0x14, 0xfe, 0x0d, 0x00, 0x01, 0x36, 0x7b, 0xfe, 0x52, 0x0d, 0x02, 0x23, - 0x03, 0xfe, 0x9c, 0x00, 0x27, 0xfe, 0x3e, 0x12, 0x03, 0x5b, 0x27, 0xfe, 0x36, 0x13, 0x42, 0x01, - 0xb0, 0x25, 0xfe, 0x08, 0x06, 0x07, 0x05, 0x52, 0x08, 0x1e, 0xfe, 0x02, 0x12, 0x4e, 0x01, 0xfe, - 0x7c, 0x15, 0x1c, 0xfe, 0xfe, 0x05, 0x12, 0xa5, 0x01, 0x4a, 0x12, 0xfe, 0xe5, 0x00, 0x03, 0x5b, - 0xbf, 0x0c, 0x5b, 0x03, 0xcd, 0x27, 0xfe, 0x62, 0x12, 0x03, 0x45, 0x27, 0xfe, 0x5a, 0x13, 0x01, - 0xfe, 0xe6, 0x18, 0x01, 0xfe, 0x50, 0x19, 0xfe, 0x43, 0x48, 0xc4, 0xcc, 0x0f, 0x70, 0xff, 0x02, - 0x00, 0x57, 0x51, 0x93, 0x1d, 0x43, 0x8c, 0xc4, 0x6d, 0x42, 0x01, 0xb0, 0x25, 0xfe, 0x72, 0x06, - 0x52, 0x08, 0x1a, 0xe9, 0x92, 0x07, 0x58, 0x01, 0xfe, 0xaa, 0x15, 0x1c, 0xfe, 0x68, 0x06, 0x12, - 0xa5, 0x01, 0x4a, 0x12, 0xfe, 0xe5, 0x00, 0x03, 0x45, 0xbf, 0x0c, 0x45, 0x16, 0x05, 0x01, 0xb0, - 0xfc, 0x75, 0x73, 0x01, 0xad, 0x8d, 0x12, 0xfe, 0xe2, 0x00, 0x26, 0xdb, 0x1b, 0x34, 0xfe, 0x0a, - 0xf0, 0xfe, 0xa6, 0x06, 0x94, 0xfe, 0x5c, 0x07, 0xfe, 0x06, 0xf0, 0xfe, 0x64, 0x07, 0x95, 0x86, - 0x02, 0x23, 0x0a, 0x08, 0x09, 0xfe, 0x2e, 0x12, 0x15, 0x18, 0x01, 0x0b, 0x15, 0x00, 0x01, 0x0b, - 0x15, 0x00, 0x01, 0x0b, 0x15, 0x00, 0x01, 0x0b, 0xfe, 0x99, 0xa4, 0x01, 0x0b, 0x15, 0x00, 0x02, - 0xfe, 0x32, 0x08, 0x78, 0x08, 0x1a, 0xfe, 0x38, 0x12, 0x0a, 0x08, 0x1a, 0xfe, 0x30, 0x13, 0x15, - 0xfe, 0x1b, 0x00, 0x01, 0x0b, 0x15, 0x00, 0x01, 0x0b, 0x15, 0x00, 0x01, 0x0b, 0x15, 0x00, 0x01, - 0x0b, 0x15, 0x05, 0x01, 0x0b, 0x15, 0x00, 0x02, 0xe1, 0x6b, 0x57, 0xbc, 0x4e, 0xfe, 0x9a, 0x81, - 0x54, 0x2d, 0x7a, 0xfe, 0x32, 0x07, 0x07, 0x2d, 0xfe, 0x09, 0x6f, 0xb8, 0xfe, 0xca, 0x45, 0xfe, - 0x32, 0x12, 0x68, 0x6c, 0x8c, 0x6b, 0x7f, 0x26, 0xfe, 0x44, 0x07, 0x1b, 0x34, 0xfe, 0x0a, 0xf0, - 0xfe, 0x32, 0x07, 0x95, 0x86, 0x94, 0xfe, 0x5c, 0x07, 0x02, 0x23, 0x01, 0x4a, 0x02, 0xdb, 0x15, - 0x1e, 0x02, 0xdb, 0xfe, 0x9c, 0xf7, 0xdc, 0xfe, 0x2c, 0x90, 0xfe, 0xae, 0x90, 0x55, 0xfe, 0xca, - 0x07, 0x0c, 0x5f, 0x17, 0x60, 0x0a, 0x53, 0x59, 0x37, 0x21, 0x1f, 0x06, 0x11, 0xfe, 0x0e, 0x12, - 0x8e, 0xfe, 0x80, 0x80, 0x39, 0x1f, 0x69, 0x29, 0xfe, 0x06, 0x10, 0xfe, 0x83, 0xe7, 0xfe, 0x48, - 0x00, 0xaa, 0xfe, 0x03, 0x40, 0x0a, 0x53, 0x5a, 0x37, 0x01, 0xb1, 0xb6, 0xfe, 0x1f, 0x40, 0x13, - 0x61, 0x01, 0xf1, 0xfe, 0x08, 0x50, 0xfe, 0x8a, 0x50, 0xfe, 0x44, 0x51, 0xfe, 0xc6, 0x51, 0x89, - 0xfe, 0x08, 0x90, 0xfe, 0x8a, 0x90, 0x0c, 0x5d, 0x17, 0x5e, 0xfe, 0x0c, 0x90, 0xfe, 0x8e, 0x90, - 0xfe, 0x40, 0x50, 0xfe, 0xc2, 0x50, 0x0c, 0x3e, 0x17, 0x3f, 0xfe, 0x4a, 0x10, 0x0a, 0x08, 0x59, - 0xfe, 0x2a, 0x12, 0xfe, 0x2c, 0x90, 0xfe, 0xae, 0x90, 0x0c, 0x5f, 0x17, 0x60, 0x0a, 0x08, 0x5a, - 0x8c, 0x01, 0xb1, 0xfe, 0x1f, 0x80, 0x13, 0x61, 0xfe, 0x44, 0x90, 0xfe, 0xc6, 0x90, 0x0c, 0x40, - 0x17, 0x41, 0xfe, 0x08, 0x90, 0xfe, 0x8a, 0x90, 0x0c, 0x5d, 0x17, 0x5e, 0xfe, 0x40, 0x90, 0xfe, - 0xc2, 0x90, 0x0c, 0x3e, 0x17, 0x3f, 0x0c, 0x2e, 0x17, 0x3c, 0x20, 0x0c, 0x48, 0x0c, 0x62, 0x0a, - 0x53, 0x1e, 0x37, 0x2b, 0x0f, 0xfe, 0x4e, 0x11, 0x26, 0xfe, 0x52, 0x08, 0xfe, 0x9e, 0xf0, 0xfe, - 0x66, 0x08, 0xba, 0x19, 0x34, 0x2b, 0x76, 0xe6, 0xc5, 0xfe, 0x8a, 0x08, 0xc6, 0xfe, 0xa8, 0x08, - 0x94, 0xfe, 0x7e, 0x08, 0xfe, 0x06, 0xf0, 0xfe, 0x84, 0x08, 0x95, 0x86, 0x02, 0x23, 0x01, 0x4a, - 0xfe, 0xc9, 0x10, 0x15, 0x1e, 0xfe, 0xc9, 0x10, 0x78, 0x08, 0x05, 0xeb, 0x78, 0x08, 0x09, 0x65, - 0x0a, 0x08, 0x09, 0xfe, 0x90, 0x12, 0xfe, 0x2e, 0x1c, 0x02, 0xfe, 0x08, 0x0b, 0x78, 0x08, 0x05, - 0x65, 0x78, 0x08, 0x09, 0xfe, 0x7a, 0x12, 0xfe, 0x2c, 0x1c, 0xfe, 0xaa, 0xf0, 0xfe, 0xc2, 0x09, - 0xfe, 0xac, 0xf0, 0xfe, 0xf0, 0x08, 0x02, 0xfe, 0xce, 0x09, 0xfe, 0xb7, 0xf0, 0xfe, 0xec, 0x08, - 0xfe, 0x02, 0xf6, 0x1a, 0x4e, 0xfe, 0x70, 0x18, 0xfe, 0xf1, 0x18, 0xfe, 0x40, 0x55, 0xfe, 0xe1, - 0x55, 0xfe, 0x10, 0x58, 0xfe, 0x91, 0x58, 0xfe, 0x14, 0x59, 0xfe, 0x95, 0x59, 0x1b, 0x85, 0xfe, - 0x8c, 0xf0, 0xfe, 0xec, 0x08, 0xfe, 0xac, 0xf0, 0xfe, 0xe0, 0x08, 0xb3, 0xfe, 0xcb, 0x10, 0xfe, - 0xad, 0xf0, 0xfe, 0xfc, 0x08, 0x02, 0xfe, 0x08, 0x0b, 0xb4, 0xfe, 0xbf, 0x10, 0xfe, 0x2b, 0xf0, - 0x85, 0xf5, 0x1d, 0xfe, 0x00, 0xfe, 0xec, 0xc0, 0xfe, 0xd2, 0xf0, 0x85, 0xfe, 0x76, 0x18, 0x1d, - 0x18, 0x19, 0x85, 0x03, 0xd2, 0x1d, 0x05, 0x19, 0x85, 0xc5, 0x49, 0xc6, 0x49, 0xb3, 0xb4, 0xfe, - 0x89, 0x10, 0x73, 0x66, 0x2c, 0x14, 0x9d, 0x01, 0x36, 0x10, 0xfe, 0x35, 0x00, 0xfe, 0x01, 0xf0, - 0x64, 0x10, 0x80, 0x02, 0x64, 0xfe, 0x98, 0x80, 0xc3, 0x09, 0xfe, 0x1a, 0x12, 0x4f, 0xfe, 0x19, - 0x82, 0xfe, 0x6c, 0x18, 0xfe, 0x44, 0x54, 0xbc, 0xfe, 0x19, 0x81, 0xfe, 0x74, 0x18, 0x90, 0x91, - 0x19, 0xfe, 0xbe, 0x08, 0x02, 0x49, 0x0a, 0x08, 0x59, 0xee, 0x03, 0x2e, 0x28, 0x3c, 0x0c, 0x40, - 0x17, 0x41, 0x9b, 0x2e, 0x9c, 0x3c, 0xfe, 0x6c, 0x18, 0xfe, 0xed, 0x18, 0xfe, 0x44, 0x54, 0xfe, - 0xe5, 0x54, 0x3a, 0x40, 0x3b, 0x41, 0x03, 0x48, 0x28, 0x62, 0x90, 0xfe, 0xe3, 0x54, 0xfe, 0x74, - 0x18, 0xfe, 0xf5, 0x18, 0x90, 0xfe, 0xe3, 0x54, 0x91, 0xbe, 0x55, 0xfe, 0xbe, 0x08, 0x02, 0x49, - 0xfe, 0x37, 0xf0, 0xfe, 0xca, 0x09, 0xfe, 0x8b, 0xf0, 0xfe, 0x50, 0x09, 0x02, 0x49, 0xfe, 0x98, - 0x80, 0xc3, 0x09, 0x22, 0xfe, 0xea, 0x0a, 0x3a, 0x48, 0x3b, 0x62, 0x55, 0xfe, 0x2e, 0x0a, 0x0f, - 0xfe, 0xc0, 0x07, 0x42, 0x98, 0x00, 0xed, 0xfe, 0x01, 0x59, 0xfe, 0x52, 0xf0, 0xfe, 0xfc, 0x09, - 0x90, 0x7a, 0xfe, 0x14, 0x0a, 0x3a, 0x48, 0x90, 0xfe, 0xe3, 0x54, 0x56, 0x48, 0x7d, 0x62, 0xfe, - 0x14, 0x58, 0xfe, 0x95, 0x58, 0x02, 0x49, 0x3a, 0x48, 0x3b, 0x62, 0xfe, 0x14, 0x59, 0xfe, 0x95, - 0x59, 0xbc, 0x56, 0x48, 0x56, 0x62, 0x02, 0x49, 0x0a, 0x08, 0x59, 0xfe, 0x82, 0x12, 0x0a, 0x08, - 0x1e, 0xfe, 0x66, 0x13, 0x21, 0x61, 0xb5, 0xfe, 0x03, 0xa1, 0xfe, 0x83, 0x80, 0xfe, 0xc8, 0x44, - 0xfe, 0x2e, 0x13, 0xfe, 0x04, 0x91, 0xfe, 0x86, 0x91, 0x69, 0x29, 0xfe, 0x40, 0x59, 0xfe, 0xc1, - 0x59, 0x55, 0xdf, 0x03, 0x5f, 0x28, 0x60, 0x0c, 0x7f, 0x17, 0x80, 0x56, 0x5f, 0x7d, 0x60, 0x01, - 0xb1, 0xb6, 0x69, 0x29, 0x13, 0x61, 0x9b, 0x2e, 0x9c, 0x3c, 0x3a, 0x40, 0x3b, 0x41, 0x91, 0xbe, - 0xfe, 0x04, 0xfa, 0x2e, 0xfe, 0x05, 0xfa, 0x3c, 0x01, 0xf1, 0xfe, 0x36, 0x10, 0x20, 0x0c, 0x7f, - 0x0c, 0x80, 0x3a, 0x40, 0x3b, 0x41, 0xfe, 0x12, 0x10, 0x0a, 0x08, 0x1e, 0x19, 0xdf, 0x3a, 0x3e, - 0x3b, 0x3f, 0x0a, 0x08, 0xfe, 0xf7, 0x00, 0x37, 0x03, 0x5d, 0x28, 0x5e, 0xfe, 0x10, 0x58, 0xfe, - 0x91, 0x58, 0x56, 0x48, 0x7d, 0x62, 0x02, 0xfe, 0xe4, 0x09, 0x0a, 0x08, 0x1e, 0x19, 0xdf, 0x0a, - 0x08, 0xfe, 0xf7, 0x00, 0x37, 0xbc, 0xfe, 0x19, 0x81, 0x4e, 0xfe, 0x10, 0x90, 0xfe, 0x92, 0x90, - 0xfe, 0xd3, 0x10, 0x32, 0x06, 0xa6, 0x19, 0xfe, 0xf8, 0x08, 0x12, 0xa6, 0xfe, 0x98, 0x80, 0xc3, - 0x09, 0xfe, 0x14, 0x13, 0x03, 0x3e, 0x28, 0x3f, 0x55, 0xfe, 0xf8, 0x08, 0xfe, 0x0c, 0x58, 0xfe, - 0x8d, 0x58, 0x02, 0x49, 0x20, 0x42, 0xfe, 0x19, 0x80, 0xe7, 0x0a, 0x08, 0x09, 0xfe, 0x1a, 0x12, - 0xf8, 0xfe, 0x19, 0x41, 0xf5, 0xc0, 0xfe, 0xd1, 0xf0, 0xe1, 0x14, 0x7e, 0x01, 0x36, 0x10, 0xfe, - 0x44, 0x00, 0xfe, 0x8e, 0x10, 0xf8, 0x56, 0x3e, 0xfe, 0xed, 0x19, 0x7d, 0x3f, 0xfe, 0x0c, 0x51, - 0xfe, 0x8e, 0x51, 0xf5, 0x1d, 0xfe, 0x00, 0xff, 0x35, 0xfe, 0x74, 0x10, 0xc0, 0xfe, 0xd2, 0xf0, - 0xfe, 0x96, 0x0b, 0xfe, 0x76, 0x18, 0x1d, 0x18, 0x8b, 0x03, 0xd2, 0x1d, 0x05, 0xfe, 0x08, 0x13, - 0x10, 0xfe, 0x16, 0x00, 0x02, 0x64, 0xfe, 0xd1, 0xf0, 0xfe, 0xa8, 0x0b, 0x14, 0x7e, 0x01, 0x36, - 0x10, 0xfe, 0x17, 0x00, 0xfe, 0x42, 0x10, 0xfe, 0xce, 0xf0, 0xfe, 0xae, 0x0b, 0xfe, 0x3c, 0x10, - 0xfe, 0xcd, 0xf0, 0xfe, 0xba, 0x0b, 0x10, 0xfe, 0x22, 0x00, 0x02, 0x64, 0xfe, 0xcb, 0xf0, 0xfe, - 0xc6, 0x0b, 0x10, 0xfe, 0x24, 0x00, 0x02, 0x64, 0xfe, 0xd0, 0xf0, 0xfe, 0xd0, 0x0b, 0x10, 0x9e, - 0xe4, 0xfe, 0xcf, 0xf0, 0xfe, 0xda, 0x0b, 0x10, 0x57, 0xfe, 0x10, 0x10, 0xfe, 0xcc, 0xf0, 0xe1, - 0xfe, 0x84, 0x80, 0xc3, 0x1e, 0x4c, 0x10, 0xfe, 0x12, 0x00, 0x2b, 0x0f, 0xfe, 0x4e, 0x11, 0x26, - 0xfe, 0xf0, 0x0b, 0xfe, 0x9e, 0xf0, 0xfe, 0x04, 0x0c, 0xba, 0x19, 0x34, 0x2b, 0x76, 0xe6, 0xc5, - 0x23, 0xc6, 0x23, 0x2b, 0xfc, 0x26, 0xfe, 0x10, 0x0c, 0x1b, 0x34, 0x94, 0xfe, 0x2c, 0x0c, 0x95, - 0x86, 0xc5, 0xdc, 0xc6, 0xdc, 0x02, 0x23, 0x01, 0x4a, 0xfe, 0xdb, 0x10, 0x12, 0xfe, 0xe8, 0x00, - 0xb3, 0xb4, 0x73, 0xc7, 0x81, 0xc8, 0x83, 0xfe, 0x89, 0xf0, 0x23, 0x33, 0x31, 0xe0, 0xc7, 0x81, - 0xc8, 0x83, 0x26, 0xfe, 0x56, 0x0c, 0x1c, 0x23, 0x33, 0x31, 0xde, 0xba, 0x65, 0x10, 0xfe, 0x42, - 0x00, 0x02, 0x64, 0x7c, 0x05, 0xfe, 0x81, 0x49, 0xfe, 0xa2, 0x12, 0x0a, 0x08, 0x09, 0xfe, 0x44, - 0x13, 0x10, 0x00, 0x54, 0x09, 0xfe, 0x54, 0x12, 0x54, 0xfe, 0x28, 0x00, 0x22, 0xfe, 0x88, 0x0d, - 0x07, 0x3d, 0x01, 0x0e, 0x06, 0x00, 0x4d, 0x44, 0xfe, 0x28, 0x00, 0xfe, 0xe2, 0x10, 0x01, 0xf6, - 0x01, 0xf7, 0x07, 0xa4, 0x01, 0xfe, 0x0a, 0x0f, 0x63, 0x12, 0x2f, 0x01, 0x72, 0x02, 0x2a, 0x10, - 0xfe, 0x44, 0x00, 0x54, 0x09, 0xe9, 0x44, 0x09, 0xfe, 0xb4, 0x10, 0x01, 0xae, 0x44, 0x09, 0xfe, - 0xaa, 0x10, 0x01, 0xae, 0xfe, 0x19, 0x82, 0xfe, 0x34, 0x46, 0xab, 0x44, 0x09, 0x10, 0xfe, 0x43, - 0x00, 0xfe, 0x96, 0x10, 0x0a, 0x53, 0x09, 0x37, 0x01, 0xf6, 0x01, 0xf7, 0x63, 0x12, 0x2f, 0x01, - 0x72, 0x99, 0x09, 0x63, 0x50, 0xc2, 0x02, 0xfe, 0x36, 0x03, 0x0a, 0x08, 0x09, 0x8b, 0x44, 0x09, - 0x10, 0x00, 0xfe, 0x5c, 0x10, 0x78, 0x08, 0x1a, 0xfe, 0x58, 0x12, 0x0a, 0x08, 0x1a, 0xfe, 0x50, - 0x13, 0xfe, 0x1c, 0x1c, 0xfe, 0x9d, 0xf0, 0xfe, 0x3e, 0x0d, 0xfe, 0x1c, 0x1c, 0xfe, 0x9d, 0xf0, - 0xfe, 0x44, 0x0d, 0x0a, 0x53, 0x1a, 0x37, 0xfe, 0xa9, 0x10, 0x10, 0xfe, 0x15, 0x00, 0xfe, 0x04, - 0xe6, 0x09, 0x4e, 0xfe, 0x2e, 0x10, 0x10, 0xfe, 0x13, 0x00, 0xfe, 0x10, 0x10, 0x10, 0x6e, 0xaa, - 0x10, 0xfe, 0x41, 0x00, 0x88, 0x10, 0xfe, 0x24, 0x00, 0x8d, 0xb3, 0xb4, 0x73, 0x03, 0x6f, 0x27, - 0x22, 0xd8, 0x4e, 0xfe, 0x04, 0xe6, 0x1a, 0xfe, 0x9d, 0x41, 0xfe, 0x1c, 0x42, 0x63, 0x01, 0xe2, - 0x02, 0x2a, 0xfa, 0x14, 0x09, 0x39, 0xa0, 0xb2, 0x14, 0xfe, 0x31, 0x00, 0x39, 0xa2, 0x01, 0xe5, - 0x02, 0xd7, 0x50, 0xfe, 0x06, 0xec, 0xd0, 0xfe, 0x0e, 0x47, 0x44, 0x2d, 0xfe, 0xce, 0x45, 0x35, - 0x50, 0xfe, 0x06, 0xea, 0xd0, 0xfe, 0x47, 0x4b, 0x92, 0xfe, 0x75, 0x57, 0x03, 0x5c, 0xfe, 0x98, - 0x56, 0xfe, 0x2e, 0x12, 0x07, 0x3d, 0x01, 0x0e, 0x42, 0xfe, 0x41, 0x58, 0x07, 0xa4, 0x01, 0x0e, - 0xfe, 0x49, 0x54, 0x96, 0xfe, 0x02, 0x0e, 0x07, 0x47, 0x01, 0x0e, 0xfe, 0x44, 0x48, 0x02, 0xfe, - 0x36, 0x03, 0x07, 0x5c, 0xfe, 0xee, 0x14, 0xfe, 0x0e, 0x47, 0x44, 0x2d, 0xfe, 0xce, 0x45, 0x35, - 0x50, 0xfe, 0xce, 0x47, 0xfe, 0xb7, 0x13, 0x02, 0x2a, 0x21, 0x1f, 0x06, 0x11, 0xfe, 0x9e, 0x12, - 0x20, 0x13, 0x58, 0x13, 0x9f, 0x13, 0xd5, 0x21, 0x2f, 0x42, 0x39, 0x2f, 0xba, 0xed, 0xfe, 0xbc, - 0xf0, 0xfe, 0xc4, 0x0e, 0x0f, 0x05, 0x13, 0x58, 0x01, 0xfe, 0xb8, 0x16, 0x03, 0xfe, 0x38, 0x01, - 0x28, 0xfe, 0x3a, 0x01, 0x55, 0xfe, 0xc8, 0x0e, 0xfe, 0x02, 0xec, 0xd5, 0x68, 0x00, 0x4d, 0xfe, - 0x04, 0xec, 0x1f, 0x67, 0xfe, 0x05, 0xf6, 0xfe, 0x34, 0x01, 0x01, 0xfe, 0x28, 0x17, 0xfe, 0x08, - 0x90, 0xfe, 0x48, 0xf4, 0x0d, 0xfe, 0x18, 0x13, 0xb8, 0xfe, 0x02, 0xea, 0xd5, 0x68, 0x7e, 0xfe, - 0xc5, 0x13, 0x14, 0x1a, 0x39, 0xa0, 0xb2, 0xfe, 0x2e, 0x10, 0x03, 0xfe, 0x38, 0x01, 0x1d, 0xfe, - 0xf0, 0xff, 0x0c, 0xfe, 0x60, 0x01, 0x03, 0xfe, 0x3a, 0x01, 0x0c, 0xfe, 0x62, 0x01, 0x43, 0x13, - 0x1f, 0x24, 0x05, 0x13, 0x2f, 0x12, 0x2f, 0xc2, 0x0f, 0x05, 0x04, 0x20, 0x04, 0x21, 0x58, 0xfe, - 0xf7, 0x12, 0x21, 0x9f, 0xb5, 0x13, 0x9f, 0x06, 0x7e, 0xfe, 0x71, 0x13, 0xfe, 0x24, 0x1c, 0x14, - 0x18, 0x39, 0xa0, 0xb2, 0xfe, 0xd9, 0x10, 0xc1, 0xfe, 0x03, 0xdc, 0xfe, 0x73, 0x57, 0xfe, 0x80, - 0x5d, 0x04, 0xc1, 0xfe, 0x03, 0xdc, 0xfe, 0x5b, 0x57, 0xfe, 0x80, 0x5d, 0x04, 0xfe, 0x03, 0x57, - 0xc1, 0x20, 0xfe, 0x00, 0xcc, 0x04, 0xfe, 0x03, 0x57, 0xc1, 0x77, 0x04, 0x0a, 0x08, 0x57, 0xfe, - 0x22, 0x13, 0xfe, 0x1c, 0x80, 0x06, 0x05, 0xfe, 0x1a, 0x13, 0xfe, 0x1e, 0x80, 0xef, 0xfe, 0x1d, - 0x80, 0xac, 0xfe, 0x0c, 0x90, 0xfe, 0x0e, 0x13, 0xfe, 0x0e, 0x90, 0xab, 0xfe, 0x3c, 0x90, 0xfe, - 0x30, 0xf4, 0x09, 0xfe, 0x3c, 0x50, 0x88, 0x01, 0xfe, 0x58, 0x17, 0x32, 0x06, 0x2f, 0x4d, 0x01, - 0xfe, 0x92, 0x16, 0xfe, 0x08, 0x10, 0x01, 0xf6, 0x01, 0xf7, 0x12, 0xfe, 0xe9, 0x00, 0x0a, 0x08, - 0x57, 0xfe, 0x2c, 0x13, 0x01, 0xfe, 0xea, 0x16, 0xfe, 0x1e, 0x1c, 0xfe, 0x14, 0x90, 0x0c, 0xfe, - 0x64, 0x01, 0xfe, 0x16, 0x90, 0x0c, 0xfe, 0x66, 0x01, 0x0a, 0x08, 0x5a, 0xfe, 0x12, 0x12, 0xfe, - 0x03, 0x80, 0x8e, 0xfe, 0x01, 0xec, 0x1f, 0xfe, 0x80, 0x40, 0x13, 0x1f, 0x69, 0x29, 0x12, 0xcf, - 0x63, 0x21, 0x1f, 0xfe, 0x00, 0x40, 0x79, 0x1f, 0x04, 0xfe, 0x08, 0x1c, 0x03, 0xfe, 0xac, 0x00, - 0xfe, 0x06, 0x58, 0x03, 0xfe, 0xae, 0x00, 0xfe, 0x07, 0x58, 0x03, 0xfe, 0xb0, 0x00, 0xfe, 0x08, - 0x58, 0x03, 0xfe, 0xb2, 0x00, 0xfe, 0x09, 0x58, 0xfe, 0x0a, 0x1c, 0x24, 0x6d, 0x13, 0xd0, 0x20, - 0x0c, 0x5b, 0x0c, 0x45, 0x0f, 0x3d, 0x51, 0x4e, 0x16, 0x2d, 0xfe, 0x90, 0x4d, 0xfe, 0x91, 0x54, - 0x22, 0xfe, 0xda, 0x0f, 0x44, 0x11, 0x0f, 0x47, 0x51, 0x16, 0x57, 0xfe, 0x90, 0x4d, 0xfe, 0x91, - 0x54, 0x22, 0xfe, 0xf0, 0x0f, 0x24, 0x11, 0x13, 0x1f, 0x7c, 0x6e, 0x67, 0x21, 0x1f, 0xfe, 0x00, - 0x40, 0x79, 0x1f, 0x12, 0xcf, 0xfe, 0x14, 0x56, 0xfe, 0xd6, 0xf0, 0x88, 0xfa, 0x73, 0xfe, 0x14, - 0x1c, 0xfe, 0x10, 0x1c, 0xfe, 0x18, 0x1c, 0x04, 0x50, 0xfe, 0x0c, 0x14, 0xfe, 0x0e, 0x47, 0xfe, - 0x07, 0xe6, 0x2d, 0xfe, 0xce, 0x47, 0xfe, 0xf5, 0x13, 0x04, 0x01, 0xae, 0x7c, 0x6e, 0x67, 0xfe, - 0x06, 0x80, 0xfe, 0x48, 0x47, 0xfe, 0x42, 0x13, 0x32, 0x06, 0x2f, 0xfe, 0x34, 0x13, 0x07, 0x47, - 0x01, 0x0e, 0xb9, 0xfe, 0x36, 0x12, 0xfe, 0x41, 0x48, 0xfe, 0x45, 0x48, 0x01, 0xf2, 0xfe, 0x00, - 0xcc, 0xb9, 0xfe, 0xf3, 0x13, 0x43, 0x77, 0x06, 0x11, 0xab, 0x07, 0x84, 0x01, 0x0e, 0xfe, 0x80, - 0x5c, 0x01, 0x72, 0xe3, 0x06, 0x82, 0x65, 0xfe, 0x14, 0x56, 0xfe, 0xd6, 0xf0, 0xfe, 0x3e, 0x10, - 0x04, 0xfe, 0x44, 0x58, 0x8e, 0xfe, 0x01, 0xec, 0xa2, 0xfe, 0x9e, 0x40, 0xfe, 0x9d, 0xe7, 0x00, - 0xfe, 0x9c, 0xe7, 0x1a, 0x79, 0x29, 0x01, 0xe2, 0xfe, 0xdd, 0x10, 0x2b, 0xc7, 0x81, 0xc8, 0x83, - 0x33, 0x31, 0xdd, 0x06, 0x1a, 0xfe, 0x48, 0x12, 0x06, 0x09, 0xfe, 0x56, 0x12, 0x06, 0x18, 0xfe, - 0x30, 0x12, 0x06, 0xc9, 0x19, 0xeb, 0x06, 0xfe, 0x23, 0x00, 0x19, 0xec, 0x06, 0x05, 0x19, 0xfe, - 0x7a, 0x12, 0x06, 0x1e, 0xfe, 0x12, 0x12, 0x06, 0x00, 0x19, 0x23, 0x14, 0xc9, 0x01, 0x36, 0xa9, - 0x2c, 0x01, 0x0b, 0x94, 0x4a, 0x04, 0x2c, 0xfe, 0x62, 0x08, 0x07, 0xd1, 0x01, 0xfe, 0x0a, 0x0f, - 0x12, 0x82, 0x02, 0x2a, 0x2c, 0x32, 0x06, 0xa6, 0xfe, 0xd9, 0x13, 0x3a, 0x3e, 0x3b, 0x3f, 0x55, - 0xfe, 0xce, 0x11, 0x0a, 0x08, 0x59, 0xfe, 0x72, 0x12, 0x9b, 0x2e, 0x9c, 0x3c, 0x91, 0xbe, 0x96, - 0xfe, 0x98, 0x11, 0x21, 0x61, 0xfe, 0x26, 0x13, 0x03, 0x7f, 0x28, 0x80, 0x55, 0xfe, 0x64, 0x0d, - 0x0c, 0x5f, 0x17, 0x60, 0x20, 0x0c, 0x7f, 0x0c, 0x80, 0x01, 0xb1, 0x24, 0x6d, 0x76, 0x13, 0x61, - 0x01, 0xf1, 0x9b, 0x2e, 0x9c, 0x3c, 0xfe, 0x04, 0x55, 0xfe, 0xa5, 0x55, 0xfe, 0x04, 0xfa, 0x2e, - 0xfe, 0x05, 0xfa, 0x3c, 0xfe, 0x91, 0x10, 0x03, 0x40, 0x28, 0x41, 0xfe, 0x40, 0x56, 0xfe, 0xe1, - 0x56, 0x0c, 0x40, 0x17, 0x41, 0x89, 0x9b, 0x2e, 0x9c, 0x3c, 0x91, 0xbe, 0x03, 0x5d, 0x28, 0x5e, - 0xfe, 0x00, 0x56, 0xfe, 0xa1, 0x56, 0x0c, 0x5d, 0x17, 0x5e, 0x0a, 0x08, 0x59, 0xfe, 0x1e, 0x12, - 0x21, 0x61, 0xfe, 0x1f, 0x40, 0x03, 0x5f, 0x28, 0x60, 0xfe, 0x2c, 0x50, 0xfe, 0xae, 0x50, 0x03, - 0x40, 0x28, 0x41, 0xfe, 0x44, 0x50, 0xfe, 0xc6, 0x50, 0x03, 0x5d, 0x28, 0x5e, 0xfe, 0x08, 0x50, - 0xfe, 0x8a, 0x50, 0x03, 0x3e, 0x28, 0x3f, 0xfe, 0x40, 0x50, 0xfe, 0xc2, 0x50, 0x02, 0x8a, 0x24, - 0x05, 0x13, 0xd4, 0x02, 0x71, 0x2c, 0x01, 0x0b, 0x1c, 0x4b, 0x33, 0x31, 0xdd, 0x06, 0x05, 0x22, - 0x4b, 0x32, 0x06, 0xa6, 0x22, 0x71, 0x01, 0xad, 0x1d, 0x43, 0x19, 0x4b, 0x0a, 0x08, 0x09, 0xf0, - 0x3a, 0x3e, 0x3b, 0x3f, 0xfe, 0x0a, 0x55, 0x35, 0xfe, 0x8b, 0x55, 0x56, 0x3e, 0x7d, 0x3f, 0xfe, - 0x0c, 0x51, 0xfe, 0x8e, 0x51, 0x02, 0x71, 0xfe, 0x19, 0x81, 0xb8, 0xfe, 0x19, 0x41, 0x02, 0x71, - 0x2c, 0x01, 0x0b, 0x1b, 0x34, 0x1c, 0xe8, 0x33, 0x31, 0xe0, 0x54, 0x18, 0xfe, 0xa6, 0x12, 0x54, - 0x09, 0x4c, 0x02, 0x4b, 0x01, 0x0b, 0x1b, 0x34, 0x1c, 0xe8, 0x33, 0x31, 0xde, 0x06, 0x18, 0x22, - 0x4b, 0x01, 0x0b, 0x1c, 0xe8, 0x33, 0x31, 0xfe, 0xe8, 0x09, 0xfe, 0xc2, 0x49, 0x4f, 0x03, 0xfe, - 0x9c, 0x00, 0x27, 0x8b, 0x52, 0x08, 0x1e, 0x35, 0xa9, 0xfe, 0xbb, 0x45, 0x54, 0x00, 0x65, 0x44, - 0x05, 0x7c, 0x43, 0xfe, 0xda, 0x14, 0x01, 0xad, 0x8d, 0xfe, 0x4b, 0x45, 0xf0, 0x32, 0x06, 0xa5, - 0xef, 0x03, 0xcd, 0x27, 0x8b, 0x03, 0x45, 0x27, 0x35, 0x66, 0x02, 0x71, 0xfe, 0xc0, 0x5d, 0xfe, - 0xf8, 0x14, 0xfe, 0x03, 0x17, 0x03, 0x5b, 0xbf, 0x0c, 0x5b, 0x66, 0x2c, 0x01, 0x0b, 0x25, 0x8a, - 0x01, 0xfe, 0x7c, 0x15, 0x02, 0x8a, 0x01, 0x0b, 0x1b, 0x34, 0x1c, 0x4b, 0x33, 0x31, 0xde, 0x06, - 0x05, 0x22, 0x4b, 0x01, 0xfe, 0x60, 0x14, 0xfe, 0x42, 0x58, 0xfe, 0x82, 0x14, 0xfe, 0xa4, 0x14, - 0x8d, 0xfe, 0x4a, 0xf4, 0x09, 0x19, 0x4b, 0xfe, 0x4a, 0xf4, 0x05, 0xea, 0x32, 0x06, 0xa5, 0x8c, - 0x02, 0x71, 0x03, 0x45, 0xbf, 0x0c, 0x45, 0x66, 0x2c, 0x01, 0x0b, 0x25, 0x8a, 0x01, 0xfe, 0xaa, - 0x15, 0x02, 0x8a, 0x0f, 0x05, 0x26, 0xfe, 0x9c, 0x13, 0x25, 0xfe, 0xb2, 0x13, 0x75, 0xfe, 0x89, - 0x48, 0x01, 0x0b, 0x20, 0x75, 0x04, 0x7b, 0xfe, 0xae, 0x13, 0x1b, 0xfe, 0xae, 0x13, 0x1c, 0xfe, - 0x9c, 0x13, 0x66, 0x2c, 0x01, 0x0b, 0xfe, 0xd5, 0x10, 0x0f, 0x70, 0xff, 0x02, 0x00, 0x57, 0x51, - 0x93, 0x1d, 0xfe, 0xff, 0x7f, 0xfe, 0x30, 0x56, 0xfe, 0x00, 0x5c, 0x04, 0x0f, 0x70, 0xff, 0x02, - 0x00, 0x57, 0x51, 0x93, 0x1d, 0x43, 0xfe, 0x30, 0x56, 0xfe, 0x00, 0x5c, 0x04, 0x0f, 0x70, 0xff, - 0x02, 0x00, 0x57, 0x51, 0x93, 0x04, 0x0f, 0x70, 0xff, 0x02, 0x00, 0x57, 0x51, 0x93, 0xfe, 0x0b, - 0x58, 0x04, 0x07, 0x5b, 0x01, 0x87, 0x07, 0x45, 0x01, 0x87, 0x04, 0xfe, 0x03, 0xa1, 0x1d, 0x11, - 0xff, 0x03, 0x00, 0x54, 0xfe, 0x00, 0xf4, 0x1e, 0x51, 0xfe, 0x00, 0x7d, 0xfe, 0x01, 0x7d, 0xfe, - 0x02, 0x7d, 0xfe, 0x03, 0x7c, 0x69, 0x29, 0x0c, 0x5d, 0x17, 0x5e, 0x56, 0x40, 0x7d, 0x41, 0x04, - 0xfe, 0x62, 0x08, 0xfe, 0x82, 0x4a, 0xfe, 0xe1, 0x1a, 0xfe, 0x83, 0x5a, 0x8e, 0x04, 0x01, 0xfe, - 0xe6, 0x18, 0xfe, 0x42, 0x48, 0x4e, 0x4f, 0x92, 0x01, 0x0b, 0x1c, 0xfe, 0x74, 0x15, 0x33, 0x31, - 0xe0, 0x01, 0x0b, 0x1c, 0xfe, 0x74, 0x15, 0x33, 0x31, 0xfe, 0xe8, 0x0a, 0xfe, 0xc1, 0x59, 0x03, - 0xcd, 0x27, 0xfe, 0xcc, 0x12, 0x52, 0x08, 0x1a, 0xfe, 0xc4, 0x13, 0x20, 0x68, 0x1a, 0xf0, 0x54, - 0xca, 0x6a, 0xfe, 0xba, 0x14, 0x4c, 0x0f, 0x05, 0x16, 0xca, 0x7c, 0x30, 0xfe, 0x78, 0x10, 0xff, - 0x02, 0x83, 0x55, 0xaa, 0xff, 0x02, 0x83, 0x55, 0x68, 0x18, 0xac, 0x98, 0xfe, 0x30, 0x00, 0x96, - 0xf3, 0x16, 0x6c, 0x0f, 0x05, 0xfe, 0x56, 0x10, 0x68, 0x09, 0xef, 0x98, 0xfe, 0x64, 0x00, 0x96, - 0xf3, 0x07, 0xfe, 0x64, 0x00, 0x16, 0x9e, 0x0f, 0x05, 0xfe, 0x28, 0x10, 0x68, 0x05, 0xfe, 0x60, - 0x13, 0x98, 0xfe, 0xc8, 0x00, 0x96, 0xf3, 0x07, 0xfe, 0xc8, 0x00, 0x16, 0x58, 0x0f, 0x05, 0x89, - 0x98, 0xfe, 0x90, 0x01, 0x7a, 0xfe, 0x20, 0x15, 0x92, 0xfe, 0x12, 0x10, 0xfe, 0x43, 0xf4, 0x9f, - 0xfe, 0x56, 0xf0, 0xfe, 0x32, 0x15, 0xfe, 0x04, 0xf4, 0x70, 0xfe, 0x43, 0xf4, 0x9e, 0xfe, 0xf3, - 0x10, 0xfe, 0x40, 0x5c, 0x01, 0xfe, 0xf4, 0x13, 0x1d, 0x43, 0xee, 0xfe, 0x00, 0x17, 0xfe, 0x4d, - 0xe4, 0x6d, 0x7a, 0xfe, 0x6e, 0x15, 0xc4, 0x6d, 0xfe, 0x1c, 0x10, 0xfe, 0x00, 0x17, 0xfe, 0x4d, - 0xe4, 0xcc, 0x7a, 0xfe, 0x6e, 0x15, 0xc4, 0xcc, 0x89, 0x4f, 0x20, 0xfe, 0x4d, 0xf4, 0x00, 0xe9, - 0x92, 0x0f, 0x05, 0xfe, 0xb4, 0x56, 0xfe, 0xc3, 0x58, 0x04, 0x4f, 0x0f, 0x09, 0x04, 0x15, 0x05, - 0x01, 0x0b, 0x25, 0xf4, 0x15, 0x09, 0x01, 0x0b, 0x25, 0xf4, 0x15, 0x18, 0x01, 0x0b, 0x25, 0xf4, - 0x75, 0xfe, 0x89, 0x49, 0x01, 0x0b, 0x04, 0x15, 0x05, 0x01, 0x0b, 0x25, 0xaf, 0x15, 0x18, 0x01, - 0x0b, 0x25, 0xaf, 0x15, 0x05, 0x01, 0x0b, 0x25, 0xaf, 0xfe, 0x89, 0x49, 0x01, 0x0b, 0x25, 0xaf, - 0x75, 0xfe, 0x89, 0x4a, 0x01, 0x0b, 0x04, 0x4f, 0x04, 0x21, 0xd3, 0x06, 0x05, 0xfe, 0x48, 0x13, - 0xb6, 0x13, 0xd3, 0xfe, 0x49, 0xf4, 0x00, 0x4c, 0x75, 0xa9, 0x66, 0xfe, 0x01, 0xec, 0xfe, 0x27, - 0x01, 0xfe, 0x89, 0x48, 0xff, 0x02, 0x00, 0x10, 0x26, 0xfe, 0x0c, 0x16, 0x32, 0x06, 0xfe, 0xe3, - 0x00, 0xfe, 0x20, 0x13, 0x1c, 0xfe, 0x30, 0x16, 0x20, 0x13, 0xd4, 0x01, 0x4a, 0x21, 0xd4, 0x06, - 0x05, 0x65, 0x0a, 0x53, 0x05, 0x37, 0x04, 0x07, 0x47, 0x01, 0x0e, 0xfe, 0x00, 0x40, 0x8f, 0x06, - 0x11, 0xac, 0x07, 0x84, 0x01, 0x0e, 0x8f, 0x07, 0x5c, 0x01, 0xa8, 0x04, 0x07, 0x84, 0x01, 0x0e, - 0x8f, 0xfe, 0x80, 0xe7, 0x11, 0x06, 0x11, 0x8b, 0xfe, 0x45, 0x58, 0x01, 0xf2, 0x8f, 0x04, 0x07, - 0x47, 0x01, 0x0e, 0x8f, 0x07, 0x5c, 0x01, 0xa8, 0x04, 0x07, 0x47, 0x01, 0x0e, 0xfe, 0x80, 0x80, - 0xfe, 0x80, 0x4c, 0xfe, 0x49, 0xe4, 0x11, 0xac, 0x07, 0x84, 0x01, 0x0e, 0xfe, 0x80, 0x4c, 0x07, - 0x5c, 0x01, 0x87, 0x04, 0x16, 0x11, 0x74, 0x6b, 0xfe, 0x60, 0x01, 0xfe, 0x18, 0xdf, 0xfe, 0x19, - 0xde, 0xfe, 0x24, 0x1c, 0xfe, 0x1d, 0xf7, 0x2d, 0x97, 0xfe, 0xcc, 0x16, 0x01, 0xfe, 0xd2, 0x17, - 0xed, 0x9a, 0x2d, 0x6b, 0xfe, 0x2c, 0x01, 0xfe, 0x2f, 0x19, 0x04, 0xb7, 0x22, 0xfe, 0xbc, 0x16, - 0xfe, 0xda, 0x10, 0x16, 0x11, 0x74, 0x03, 0xfe, 0x64, 0x01, 0xfe, 0x00, 0xf4, 0x1e, 0xfe, 0x18, - 0x58, 0x03, 0xfe, 0x66, 0x01, 0xfe, 0x19, 0x58, 0x9a, 0x1e, 0xfe, 0x3c, 0x90, 0xfe, 0x30, 0xf4, - 0x05, 0xfe, 0x3c, 0x50, 0x6b, 0xfe, 0x38, 0x00, 0xfe, 0x0f, 0x79, 0xfe, 0x1c, 0xf7, 0x1e, 0x97, - 0xfe, 0x16, 0x17, 0xfe, 0xb6, 0x14, 0x35, 0x04, 0xb7, 0x22, 0xfe, 0xee, 0x16, 0xfe, 0x9c, 0x10, - 0x16, 0x11, 0x74, 0xfe, 0x83, 0x5a, 0xfe, 0x18, 0xdf, 0xfe, 0x19, 0xde, 0xfe, 0x1d, 0xf7, 0x2e, - 0x97, 0xfe, 0x38, 0x17, 0xfe, 0x94, 0x14, 0xee, 0x9a, 0x2e, 0x6b, 0x1a, 0xfe, 0xaf, 0x19, 0xfe, - 0x98, 0xe7, 0x00, 0x04, 0xb7, 0x22, 0xfe, 0x2c, 0x17, 0xfe, 0x6c, 0x10, 0x16, 0x11, 0x74, 0xfe, - 0x30, 0xbc, 0xfe, 0xb2, 0xbc, 0x9a, 0xcb, 0x6b, 0x1a, 0xfe, 0x0f, 0x79, 0xfe, 0x1c, 0xf7, 0xcb, - 0x97, 0xfe, 0x70, 0x17, 0xfe, 0x5c, 0x14, 0x35, 0x04, 0xb7, 0x22, 0xfe, 0x5c, 0x17, 0xfe, 0x42, - 0x10, 0xfe, 0x02, 0xf6, 0x11, 0x74, 0xfe, 0x18, 0xfe, 0x5f, 0xfe, 0x19, 0xfe, 0x60, 0xfe, 0x03, - 0xa1, 0xfe, 0x1d, 0xf7, 0x5a, 0x97, 0xfe, 0x96, 0x17, 0xfe, 0x36, 0x14, 0xfe, 0x1c, 0x13, 0x9a, - 0x5a, 0x42, 0xfe, 0x83, 0x58, 0xfe, 0xaf, 0x19, 0xfe, 0x80, 0xe7, 0x11, 0xfe, 0x81, 0xe7, 0x11, - 0x12, 0xfe, 0xdd, 0x00, 0x69, 0x29, 0x04, 0x69, 0x29, 0xfe, 0x12, 0x45, 0x22, 0xfe, 0x86, 0x17, - 0x14, 0x05, 0x39, 0xa0, 0xb2, 0x02, 0x2a, 0xfe, 0x39, 0xf0, 0xfe, 0xda, 0x17, 0x20, 0x04, 0xfe, - 0x7e, 0x18, 0x1d, 0x18, 0x4d, 0x0f, 0x0d, 0x04, 0x74, 0x03, 0xd2, 0x1d, 0x05, 0xfe, 0xef, 0x12, - 0xfe, 0xe1, 0x10, 0x7c, 0x6e, 0x67, 0x32, 0x06, 0x2f, 0xfe, 0x3c, 0x13, 0xfe, 0x7e, 0x14, 0xfe, - 0x42, 0x13, 0x50, 0xc2, 0x07, 0x47, 0x01, 0x0e, 0xb9, 0xfe, 0x3e, 0x12, 0xfe, 0x41, 0x48, 0xfe, - 0x45, 0x48, 0x01, 0xf2, 0xfe, 0x00, 0xcc, 0xb9, 0xfe, 0xf3, 0x13, 0x43, 0x77, 0x06, 0x11, 0xab, - 0x07, 0x84, 0x01, 0x0e, 0xfe, 0x80, 0x4c, 0x01, 0x72, 0xfe, 0x16, 0x10, 0x06, 0x82, 0x8c, 0xfe, - 0x3c, 0x14, 0xfe, 0x24, 0x12, 0xfe, 0x14, 0x56, 0xfe, 0xd6, 0xf0, 0xfe, 0xfa, 0x17, 0x16, 0x09, - 0x04, 0xfe, 0x9c, 0xe7, 0x09, 0x10, 0xfe, 0x15, 0x00, 0x63, 0x79, 0x29, 0x01, 0xe2, 0x16, 0x05, - 0x04, 0x0a, 0x53, 0x2d, 0x37, 0x12, 0x2f, 0x01, 0x72, 0x16, 0x05, 0x04, 0xfe, 0x38, 0x90, 0xfe, - 0xba, 0x90, 0x3a, 0xce, 0x3b, 0xcf, 0xfe, 0x48, 0x55, 0x35, 0xfe, 0xc9, 0x55, 0x04, 0x21, 0xa3, - 0x76, 0x13, 0xa3, 0x04, 0x07, 0xa4, 0x01, 0x0e, 0xfe, 0x41, 0x48, 0x07, 0x3d, 0x01, 0x0e, 0xfe, - 0x49, 0x44, 0x19, 0xfe, 0xc2, 0x18, 0x76, 0x77, 0x04, 0x07, 0x47, 0x01, 0x0e, 0x06, 0x11, 0x65, - 0x07, 0x5c, 0x01, 0xa8, 0x07, 0x3d, 0x01, 0x0e, 0x76, 0x77, 0x04, 0xfe, 0x4e, 0xe4, 0x18, 0x6a, - 0xfe, 0xf6, 0x18, 0x03, 0xfe, 0x90, 0x00, 0xfe, 0x3a, 0x45, 0xfe, 0x2c, 0x10, 0xfe, 0x4e, 0xe4, - 0xc9, 0x6a, 0xfe, 0x08, 0x19, 0x03, 0xfe, 0x92, 0x00, 0xfe, 0x02, 0xe6, 0x1a, 0xe4, 0xfe, 0x4e, - 0xe4, 0xfe, 0x0b, 0x00, 0x6a, 0xfe, 0x1a, 0x19, 0x03, 0xfe, 0x94, 0x00, 0xfe, 0x02, 0xe6, 0x1e, - 0xfe, 0x08, 0x10, 0x03, 0xfe, 0x96, 0x00, 0xfe, 0x02, 0xe6, 0x6c, 0xfe, 0x4e, 0x45, 0xea, 0xb8, - 0xff, 0x04, 0x68, 0x54, 0xe7, 0x1d, 0x6d, 0xfe, 0x08, 0x1c, 0xfe, 0x67, 0x19, 0xfe, 0x0a, 0x1c, - 0xfe, 0x1a, 0xf4, 0xfe, 0x00, 0x04, 0xea, 0xfe, 0x48, 0xf4, 0x18, 0x7a, 0xfe, 0x4e, 0x19, 0x0f, - 0x18, 0x04, 0x06, 0x7e, 0xfe, 0x5a, 0xf0, 0xfe, 0x5e, 0x19, 0x24, 0xfe, 0x09, 0x00, 0xfe, 0x34, - 0x10, 0x06, 0x1a, 0xfe, 0x5a, 0xf0, 0xf8, 0x24, 0xca, 0xe5, 0x06, 0x18, 0x4d, 0x24, 0x6c, 0xe4, - 0x06, 0x09, 0x4d, 0x24, 0x9e, 0xe3, 0x06, 0x05, 0x4d, 0x24, 0x58, 0xa9, 0xb6, 0x04, 0x14, 0xfe, - 0x09, 0x00, 0x01, 0x36, 0xfe, 0x04, 0xfe, 0x81, 0x03, 0x83, 0xfe, 0x40, 0x5c, 0x04, 0x1b, 0xf9, - 0xfe, 0x14, 0xf0, 0x0b, 0x26, 0xfe, 0xb0, 0x19, 0x1b, 0xf9, 0x7b, 0xf9, 0xfe, 0x82, 0xf0, 0xfe, - 0xb4, 0x19, 0x04, 0xff, 0xdf, 0x00, 0x00, + 0xf0, 0xfe, 0x4c, 0x02, 0xfe, 0x45, 0xf0, 0xfe, 0x50, 0x02, 0x18, 0x0a, 0xaa, 0x18, 0x06, 0x14, + 0xa1, 0x02, 0x2b, 0xfe, 0x00, 0x1c, 0xe7, 0xfe, 0x02, 0x1c, 0xe6, 0xfe, 0x1e, 0x1c, 0xfe, 0xe9, + 0x10, 0x01, 0xfe, 0x18, 0x18, 0xfe, 0xe7, 0x10, 0xfe, 0x06, 0xfc, 0xce, 0x09, 0x70, 0x01, 0xa8, + 0x02, 0x2b, 0x15, 0x59, 0x39, 0xa2, 0x01, 0xfe, 0x58, 0x10, 0x09, 0x70, 0x01, 0x87, 0xfe, 0xbd, + 0x10, 0x09, 0x70, 0x01, 0x87, 0xfe, 0xad, 0x10, 0xfe, 0x16, 0x1c, 0xfe, 0x58, 0x1c, 0x18, 0x06, + 0x14, 0xa1, 0x2c, 0x1c, 0x2b, 0xfe, 0x3d, 0xf0, 0xfe, 0x06, 0x02, 0x23, 0xfe, 0x98, 0x02, 0xfe, + 0x5a, 0x1c, 0xf8, 0xfe, 0x14, 0x1c, 0x15, 0xfe, 0x30, 0x00, 0x39, 0xa2, 0x01, 0xfe, 0x48, 0x10, + 0x18, 0x06, 0x14, 0xa1, 0x02, 0xd7, 0x22, 0x20, 0x07, 0x11, 0x35, 0xfe, 0x69, 0x10, 0x18, 0x06, + 0x14, 0xa1, 0xfe, 0x04, 0xec, 0x20, 0x4f, 0x43, 0x13, 0x20, 0xfe, 0x05, 0xf6, 0xce, 0x01, 0xfe, + 0x4a, 0x17, 0x08, 0x54, 0x58, 0x37, 0x12, 0x2f, 0x42, 0x92, 0x01, 0xfe, 0x82, 0x16, 0x02, 0x2b, + 0x09, 0x46, 0x01, 0x0e, 0x07, 0x00, 0x66, 0x01, 0x73, 0xfe, 0x18, 0x10, 0xfe, 0x41, 0x58, 0x09, + 0xa4, 0x01, 0x0e, 0xfe, 0xc8, 0x54, 0x6b, 0xfe, 0x10, 0x03, 0x01, 0xfe, 0x82, 0x16, 0x02, 0x2b, + 0x2c, 0x4f, 0xfe, 0x02, 0xe8, 0x2a, 0xfe, 0xbf, 0x57, 0xfe, 0x9e, 0x43, 0xfe, 0x77, 0x57, 0xfe, + 0x27, 0xf0, 0xfe, 0xe0, 0x01, 0xfe, 0x07, 0x4b, 0xfe, 0x20, 0xf0, 0xa7, 0xfe, 0x40, 0x1c, 0x1c, + 0xd9, 0xfe, 0x26, 0xf0, 0xfe, 0x5a, 0x03, 0xfe, 0xa0, 0xf0, 0xfe, 0x48, 0x03, 0xfe, 0x11, 0xf0, + 0xa7, 0xfe, 0xef, 0x10, 0xfe, 0x9f, 0xf0, 0xfe, 0x68, 0x03, 0xf9, 0x10, 0xfe, 0x11, 0x00, 0x02, + 0x65, 0x2c, 0xfe, 0x48, 0x1c, 0xf9, 0x08, 0x05, 0x1b, 0xfe, 0x18, 0x13, 0x21, 0x22, 0xa3, 0xb7, + 0x13, 0xa3, 0x09, 0x46, 0x01, 0x0e, 0xb7, 0x78, 0x01, 0xfe, 0xb4, 0x16, 0x12, 0xd1, 0x1c, 0xd9, + 0xfe, 0x01, 0xf0, 0xd9, 0xfe, 0x82, 0xf0, 0xfe, 0x96, 0x03, 0xfa, 0x12, 0xfe, 0xe4, 0x00, 0x27, + 0xfe, 0xa8, 0x03, 0x1c, 0x34, 0x1d, 0xfe, 0xb8, 0x03, 0x01, 0x4b, 0xfe, 0x06, 0xf0, 0xfe, 0xc8, + 0x03, 0x95, 0x86, 0xfe, 0x0a, 0xf0, 0xfe, 0x8a, 0x06, 0x02, 0x24, 0x03, 0x70, 0x28, 0x17, 0xfe, + 0xfa, 0x04, 0x15, 0x6d, 0x01, 0x36, 0x7b, 0xfe, 0x6a, 0x02, 0x02, 0xd8, 0xf9, 0x2c, 0x99, 0x19, + 0xfe, 0x67, 0x1b, 0xfe, 0xbf, 0x57, 0xfe, 0x77, 0x57, 0xfe, 0x48, 0x1c, 0x74, 0x01, 0xaf, 0x8c, + 0x09, 0x46, 0x01, 0x0e, 0x07, 0x00, 0x17, 0xda, 0x09, 0xd1, 0x01, 0x0e, 0x8d, 0x51, 0x64, 0x79, + 0x2a, 0x03, 0x70, 0x28, 0xfe, 0x10, 0x12, 0x15, 0x6d, 0x01, 0x36, 0x7b, 0xfe, 0x6a, 0x02, 0x02, + 0xd8, 0xc7, 0x81, 0xc8, 0x83, 0x1c, 0x24, 0x27, 0xfe, 0x40, 0x04, 0x1d, 0xfe, 0x3c, 0x04, 0x3b, + 0xfe, 0xa0, 0x00, 0xfe, 0x9b, 0x57, 0xfe, 0x4e, 0x12, 0x2d, 0xff, 0x02, 0x00, 0x10, 0x01, 0x0b, + 0x1d, 0xfe, 0xe4, 0x04, 0x2d, 0x01, 0x0b, 0x1d, 0x24, 0x33, 0x31, 0xde, 0xfe, 0x4c, 0x44, 0xfe, + 0x4c, 0x12, 0x51, 0xfe, 0x44, 0x48, 0x0f, 0x6f, 0xfe, 0x4c, 0x54, 0x6b, 0xda, 0x4f, 0x79, 0x2a, + 0xfe, 0x06, 0x80, 0xfe, 0x48, 0x47, 0xfe, 0x62, 0x13, 0x08, 0x05, 0x1b, 0xfe, 0x2a, 0x13, 0x32, + 0x07, 0x82, 0xfe, 0x52, 0x13, 0xfe, 0x20, 0x10, 0x0f, 0x6f, 0xfe, 0x4c, 0x54, 0x6b, 0xda, 0xfe, + 0x06, 0x80, 0xfe, 0x48, 0x47, 0xfe, 0x40, 0x13, 0x08, 0x05, 0x1b, 0xfe, 0x08, 0x13, 0x32, 0x07, + 0x82, 0xfe, 0x30, 0x13, 0x08, 0x05, 0x1b, 0xfe, 0x1c, 0x12, 0x15, 0x9d, 0x08, 0x05, 0x06, 0x4d, + 0x15, 0xfe, 0x0d, 0x00, 0x01, 0x36, 0x7b, 0xfe, 0x64, 0x0d, 0x02, 0x24, 0x2d, 0x12, 0xfe, 0xe6, + 0x00, 0xfe, 0x1c, 0x90, 0xfe, 0x40, 0x5c, 0x04, 0x15, 0x9d, 0x01, 0x36, 0x02, 0x2b, 0xfe, 0x42, + 0x5b, 0x99, 0x19, 0xfe, 0x46, 0x59, 0xfe, 0xbf, 0x57, 0xfe, 0x77, 0x57, 0xfe, 0x87, 0x80, 0xfe, + 0x31, 0xe4, 0x5b, 0x08, 0x05, 0x0a, 0xfe, 0x84, 0x13, 0xfe, 0x20, 0x80, 0x07, 0x19, 0xfe, 0x7c, + 0x12, 0x53, 0x05, 0x06, 0xfe, 0x6c, 0x13, 0x03, 0xfe, 0xa2, 0x00, 0x28, 0x17, 0xfe, 0x90, 0x05, + 0xfe, 0x31, 0xe4, 0x5a, 0x53, 0x05, 0x0a, 0xfe, 0x56, 0x13, 0x03, 0xfe, 0xa0, 0x00, 0x28, 0xfe, + 0x4e, 0x12, 0x67, 0xff, 0x02, 0x00, 0x10, 0x27, 0xfe, 0x48, 0x05, 0x1c, 0x34, 0xfe, 0x89, 0x48, + 0xff, 0x02, 0x00, 0x10, 0x27, 0xfe, 0x56, 0x05, 0x26, 0xfe, 0xa8, 0x05, 0x12, 0xfe, 0xe3, 0x00, + 0x21, 0x53, 0xfe, 0x4a, 0xf0, 0xfe, 0x76, 0x05, 0xfe, 0x49, 0xf0, 0xfe, 0x70, 0x05, 0x88, 0x25, + 0xfe, 0x21, 0x00, 0xab, 0x25, 0xfe, 0x22, 0x00, 0xaa, 0x25, 0x58, 0xfe, 0x09, 0x48, 0xff, 0x02, + 0x00, 0x10, 0x27, 0xfe, 0x86, 0x05, 0x26, 0xfe, 0xa8, 0x05, 0xfe, 0xe2, 0x08, 0x53, 0x05, 0xcb, + 0x4d, 0x01, 0xb0, 0x25, 0x06, 0x13, 0xd3, 0x39, 0xfe, 0x27, 0x01, 0x08, 0x05, 0x1b, 0xfe, 0x22, + 0x12, 0x41, 0x01, 0xb2, 0x15, 0x9d, 0x08, 0x05, 0x06, 0x4d, 0x15, 0xfe, 0x0d, 0x00, 0x01, 0x36, + 0x7b, 0xfe, 0x64, 0x0d, 0x02, 0x24, 0x03, 0xfe, 0x9c, 0x00, 0x28, 0xeb, 0x03, 0x5c, 0x28, 0xfe, + 0x36, 0x13, 0x41, 0x01, 0xb2, 0x26, 0xfe, 0x18, 0x06, 0x09, 0x06, 0x53, 0x05, 0x1f, 0xfe, 0x02, + 0x12, 0x50, 0x01, 0xfe, 0x9e, 0x15, 0x1d, 0xfe, 0x0e, 0x06, 0x12, 0xa5, 0x01, 0x4b, 0x12, 0xfe, + 0xe5, 0x00, 0x03, 0x5c, 0xc1, 0x0c, 0x5c, 0x03, 0xcd, 0x28, 0xfe, 0x62, 0x12, 0x03, 0x45, 0x28, + 0xfe, 0x5a, 0x13, 0x01, 0xfe, 0x0c, 0x19, 0x01, 0xfe, 0x76, 0x19, 0xfe, 0x43, 0x48, 0xc4, 0xcc, + 0x0f, 0x71, 0xff, 0x02, 0x00, 0x57, 0x52, 0x93, 0x1e, 0x43, 0x8b, 0xc4, 0x6e, 0x41, 0x01, 0xb2, + 0x26, 0xfe, 0x82, 0x06, 0x53, 0x05, 0x1a, 0xe9, 0x91, 0x09, 0x59, 0x01, 0xfe, 0xcc, 0x15, 0x1d, + 0xfe, 0x78, 0x06, 0x12, 0xa5, 0x01, 0x4b, 0x12, 0xfe, 0xe5, 0x00, 0x03, 0x45, 0xc1, 0x0c, 0x45, + 0x18, 0x06, 0x01, 0xb2, 0xfa, 0x76, 0x74, 0x01, 0xaf, 0x8c, 0x12, 0xfe, 0xe2, 0x00, 0x27, 0xdb, + 0x1c, 0x34, 0xfe, 0x0a, 0xf0, 0xfe, 0xb6, 0x06, 0x94, 0xfe, 0x6c, 0x07, 0xfe, 0x06, 0xf0, 0xfe, + 0x74, 0x07, 0x95, 0x86, 0x02, 0x24, 0x08, 0x05, 0x0a, 0xfe, 0x2e, 0x12, 0x16, 0x19, 0x01, 0x0b, + 0x16, 0x00, 0x01, 0x0b, 0x16, 0x00, 0x01, 0x0b, 0x16, 0x00, 0x01, 0x0b, 0xfe, 0x99, 0xa4, 0x01, + 0x0b, 0x16, 0x00, 0x02, 0xfe, 0x42, 0x08, 0x68, 0x05, 0x1a, 0xfe, 0x38, 0x12, 0x08, 0x05, 0x1a, + 0xfe, 0x30, 0x13, 0x16, 0xfe, 0x1b, 0x00, 0x01, 0x0b, 0x16, 0x00, 0x01, 0x0b, 0x16, 0x00, 0x01, + 0x0b, 0x16, 0x00, 0x01, 0x0b, 0x16, 0x06, 0x01, 0x0b, 0x16, 0x00, 0x02, 0xe2, 0x6c, 0x58, 0xbe, + 0x50, 0xfe, 0x9a, 0x81, 0x55, 0x1b, 0x7a, 0xfe, 0x42, 0x07, 0x09, 0x1b, 0xfe, 0x09, 0x6f, 0xba, + 0xfe, 0xca, 0x45, 0xfe, 0x32, 0x12, 0x69, 0x6d, 0x8b, 0x6c, 0x7f, 0x27, 0xfe, 0x54, 0x07, 0x1c, + 0x34, 0xfe, 0x0a, 0xf0, 0xfe, 0x42, 0x07, 0x95, 0x86, 0x94, 0xfe, 0x6c, 0x07, 0x02, 0x24, 0x01, + 0x4b, 0x02, 0xdb, 0x16, 0x1f, 0x02, 0xdb, 0xfe, 0x9c, 0xf7, 0xdc, 0xfe, 0x2c, 0x90, 0xfe, 0xae, + 0x90, 0x56, 0xfe, 0xda, 0x07, 0x0c, 0x60, 0x14, 0x61, 0x08, 0x54, 0x5a, 0x37, 0x22, 0x20, 0x07, + 0x11, 0xfe, 0x0e, 0x12, 0x8d, 0xfe, 0x80, 0x80, 0x39, 0x20, 0x6a, 0x2a, 0xfe, 0x06, 0x10, 0xfe, + 0x83, 0xe7, 0xfe, 0x48, 0x00, 0xab, 0xfe, 0x03, 0x40, 0x08, 0x54, 0x5b, 0x37, 0x01, 0xb3, 0xb8, + 0xfe, 0x1f, 0x40, 0x13, 0x62, 0x01, 0xef, 0xfe, 0x08, 0x50, 0xfe, 0x8a, 0x50, 0xfe, 0x44, 0x51, + 0xfe, 0xc6, 0x51, 0x88, 0xfe, 0x08, 0x90, 0xfe, 0x8a, 0x90, 0x0c, 0x5e, 0x14, 0x5f, 0xfe, 0x0c, + 0x90, 0xfe, 0x8e, 0x90, 0xfe, 0x40, 0x50, 0xfe, 0xc2, 0x50, 0x0c, 0x3d, 0x14, 0x3e, 0xfe, 0x4a, + 0x10, 0x08, 0x05, 0x5a, 0xfe, 0x2a, 0x12, 0xfe, 0x2c, 0x90, 0xfe, 0xae, 0x90, 0x0c, 0x60, 0x14, + 0x61, 0x08, 0x05, 0x5b, 0x8b, 0x01, 0xb3, 0xfe, 0x1f, 0x80, 0x13, 0x62, 0xfe, 0x44, 0x90, 0xfe, + 0xc6, 0x90, 0x0c, 0x3f, 0x14, 0x40, 0xfe, 0x08, 0x90, 0xfe, 0x8a, 0x90, 0x0c, 0x5e, 0x14, 0x5f, + 0xfe, 0x40, 0x90, 0xfe, 0xc2, 0x90, 0x0c, 0x3d, 0x14, 0x3e, 0x0c, 0x2e, 0x14, 0x3c, 0x21, 0x0c, + 0x49, 0x0c, 0x63, 0x08, 0x54, 0x1f, 0x37, 0x2c, 0x0f, 0xfe, 0x4e, 0x11, 0x27, 0xdd, 0xfe, 0x9e, + 0xf0, 0xfe, 0x76, 0x08, 0xbc, 0x17, 0x34, 0x2c, 0x77, 0xe6, 0xc5, 0xfe, 0x9a, 0x08, 0xc6, 0xfe, + 0xb8, 0x08, 0x94, 0xfe, 0x8e, 0x08, 0xfe, 0x06, 0xf0, 0xfe, 0x94, 0x08, 0x95, 0x86, 0x02, 0x24, + 0x01, 0x4b, 0xfe, 0xc9, 0x10, 0x16, 0x1f, 0xfe, 0xc9, 0x10, 0x68, 0x05, 0x06, 0xfe, 0x10, 0x12, + 0x68, 0x05, 0x0a, 0x4e, 0x08, 0x05, 0x0a, 0xfe, 0x90, 0x12, 0xfe, 0x2e, 0x1c, 0x02, 0xfe, 0x18, + 0x0b, 0x68, 0x05, 0x06, 0x4e, 0x68, 0x05, 0x0a, 0xfe, 0x7a, 0x12, 0xfe, 0x2c, 0x1c, 0xfe, 0xaa, + 0xf0, 0xfe, 0xd2, 0x09, 0xfe, 0xac, 0xf0, 0xfe, 0x00, 0x09, 0x02, 0xfe, 0xde, 0x09, 0xfe, 0xb7, + 0xf0, 0xfe, 0xfc, 0x08, 0xfe, 0x02, 0xf6, 0x1a, 0x50, 0xfe, 0x70, 0x18, 0xfe, 0xf1, 0x18, 0xfe, + 0x40, 0x55, 0xfe, 0xe1, 0x55, 0xfe, 0x10, 0x58, 0xfe, 0x91, 0x58, 0xfe, 0x14, 0x59, 0xfe, 0x95, + 0x59, 0x1c, 0x85, 0xfe, 0x8c, 0xf0, 0xfe, 0xfc, 0x08, 0xfe, 0xac, 0xf0, 0xfe, 0xf0, 0x08, 0xb5, + 0xfe, 0xcb, 0x10, 0xfe, 0xad, 0xf0, 0xfe, 0x0c, 0x09, 0x02, 0xfe, 0x18, 0x0b, 0xb6, 0xfe, 0xbf, + 0x10, 0xfe, 0x2b, 0xf0, 0x85, 0xf4, 0x1e, 0xfe, 0x00, 0xfe, 0xfe, 0x1c, 0x12, 0xc2, 0xfe, 0xd2, + 0xf0, 0x85, 0xfe, 0x76, 0x18, 0x1e, 0x19, 0x17, 0x85, 0x03, 0xd2, 0x1e, 0x06, 0x17, 0x85, 0xc5, + 0x4a, 0xc6, 0x4a, 0xb5, 0xb6, 0xfe, 0x89, 0x10, 0x74, 0x67, 0x2d, 0x15, 0x9d, 0x01, 0x36, 0x10, + 0xfe, 0x35, 0x00, 0xfe, 0x01, 0xf0, 0x65, 0x10, 0x80, 0x02, 0x65, 0xfe, 0x98, 0x80, 0xfe, 0x19, + 0xe4, 0x0a, 0xfe, 0x1a, 0x12, 0x51, 0xfe, 0x19, 0x82, 0xfe, 0x6c, 0x18, 0xfe, 0x44, 0x54, 0xbe, + 0xfe, 0x19, 0x81, 0xfe, 0x74, 0x18, 0x8f, 0x90, 0x17, 0xfe, 0xce, 0x08, 0x02, 0x4a, 0x08, 0x05, + 0x5a, 0xec, 0x03, 0x2e, 0x29, 0x3c, 0x0c, 0x3f, 0x14, 0x40, 0x9b, 0x2e, 0x9c, 0x3c, 0xfe, 0x6c, + 0x18, 0xfe, 0xed, 0x18, 0xfe, 0x44, 0x54, 0xfe, 0xe5, 0x54, 0x3a, 0x3f, 0x3b, 0x40, 0x03, 0x49, + 0x29, 0x63, 0x8f, 0xfe, 0xe3, 0x54, 0xfe, 0x74, 0x18, 0xfe, 0xf5, 0x18, 0x8f, 0xfe, 0xe3, 0x54, + 0x90, 0xc0, 0x56, 0xfe, 0xce, 0x08, 0x02, 0x4a, 0xfe, 0x37, 0xf0, 0xfe, 0xda, 0x09, 0xfe, 0x8b, + 0xf0, 0xfe, 0x60, 0x09, 0x02, 0x4a, 0x08, 0x05, 0x0a, 0x23, 0xfe, 0xfa, 0x0a, 0x3a, 0x49, 0x3b, + 0x63, 0x56, 0xfe, 0x3e, 0x0a, 0x0f, 0xfe, 0xc0, 0x07, 0x41, 0x98, 0x00, 0xad, 0xfe, 0x01, 0x59, + 0xfe, 0x52, 0xf0, 0xfe, 0x0c, 0x0a, 0x8f, 0x7a, 0xfe, 0x24, 0x0a, 0x3a, 0x49, 0x8f, 0xfe, 0xe3, + 0x54, 0x57, 0x49, 0x7d, 0x63, 0xfe, 0x14, 0x58, 0xfe, 0x95, 0x58, 0x02, 0x4a, 0x3a, 0x49, 0x3b, + 0x63, 0xfe, 0x14, 0x59, 0xfe, 0x95, 0x59, 0xbe, 0x57, 0x49, 0x57, 0x63, 0x02, 0x4a, 0x08, 0x05, + 0x5a, 0xfe, 0x82, 0x12, 0x08, 0x05, 0x1f, 0xfe, 0x66, 0x13, 0x22, 0x62, 0xb7, 0xfe, 0x03, 0xa1, + 0xfe, 0x83, 0x80, 0xfe, 0xc8, 0x44, 0xfe, 0x2e, 0x13, 0xfe, 0x04, 0x91, 0xfe, 0x86, 0x91, 0x6a, + 0x2a, 0xfe, 0x40, 0x59, 0xfe, 0xc1, 0x59, 0x56, 0xe0, 0x03, 0x60, 0x29, 0x61, 0x0c, 0x7f, 0x14, + 0x80, 0x57, 0x60, 0x7d, 0x61, 0x01, 0xb3, 0xb8, 0x6a, 0x2a, 0x13, 0x62, 0x9b, 0x2e, 0x9c, 0x3c, + 0x3a, 0x3f, 0x3b, 0x40, 0x90, 0xc0, 0xfe, 0x04, 0xfa, 0x2e, 0xfe, 0x05, 0xfa, 0x3c, 0x01, 0xef, + 0xfe, 0x36, 0x10, 0x21, 0x0c, 0x7f, 0x0c, 0x80, 0x3a, 0x3f, 0x3b, 0x40, 0xe4, 0x08, 0x05, 0x1f, + 0x17, 0xe0, 0x3a, 0x3d, 0x3b, 0x3e, 0x08, 0x05, 0xfe, 0xf7, 0x00, 0x37, 0x03, 0x5e, 0x29, 0x5f, + 0xfe, 0x10, 0x58, 0xfe, 0x91, 0x58, 0x57, 0x49, 0x7d, 0x63, 0x02, 0xfe, 0xf4, 0x09, 0x08, 0x05, + 0x1f, 0x17, 0xe0, 0x08, 0x05, 0xfe, 0xf7, 0x00, 0x37, 0xbe, 0xfe, 0x19, 0x81, 0x50, 0xfe, 0x10, + 0x90, 0xfe, 0x92, 0x90, 0xfe, 0xd3, 0x10, 0x32, 0x07, 0xa6, 0x17, 0xfe, 0x08, 0x09, 0x12, 0xa6, + 0x08, 0x05, 0x0a, 0xfe, 0x14, 0x13, 0x03, 0x3d, 0x29, 0x3e, 0x56, 0xfe, 0x08, 0x09, 0xfe, 0x0c, + 0x58, 0xfe, 0x8d, 0x58, 0x02, 0x4a, 0x21, 0x41, 0xfe, 0x19, 0x80, 0xe7, 0x08, 0x05, 0x0a, 0xfe, + 0x1a, 0x12, 0xfe, 0x6c, 0x19, 0xfe, 0x19, 0x41, 0xf4, 0xc2, 0xfe, 0xd1, 0xf0, 0xe2, 0x15, 0x7e, + 0x01, 0x36, 0x10, 0xfe, 0x44, 0x00, 0xfe, 0x8e, 0x10, 0xfe, 0x6c, 0x19, 0x57, 0x3d, 0xfe, 0xed, + 0x19, 0x7d, 0x3e, 0xfe, 0x0c, 0x51, 0xfe, 0x8e, 0x51, 0xf4, 0x1e, 0xfe, 0x00, 0xff, 0x35, 0xfe, + 0x74, 0x10, 0xc2, 0xfe, 0xd2, 0xf0, 0xfe, 0xa6, 0x0b, 0xfe, 0x76, 0x18, 0x1e, 0x19, 0x8a, 0x03, + 0xd2, 0x1e, 0x06, 0xfe, 0x08, 0x13, 0x10, 0xfe, 0x16, 0x00, 0x02, 0x65, 0xfe, 0xd1, 0xf0, 0xfe, + 0xb8, 0x0b, 0x15, 0x7e, 0x01, 0x36, 0x10, 0xfe, 0x17, 0x00, 0xfe, 0x42, 0x10, 0xfe, 0xce, 0xf0, + 0xfe, 0xbe, 0x0b, 0xfe, 0x3c, 0x10, 0xfe, 0xcd, 0xf0, 0xfe, 0xca, 0x0b, 0x10, 0xfe, 0x22, 0x00, + 0x02, 0x65, 0xfe, 0xcb, 0xf0, 0xfe, 0xd6, 0x0b, 0x10, 0xfe, 0x24, 0x00, 0x02, 0x65, 0xfe, 0xd0, + 0xf0, 0xfe, 0xe0, 0x0b, 0x10, 0x9e, 0xe5, 0xfe, 0xcf, 0xf0, 0xfe, 0xea, 0x0b, 0x10, 0x58, 0xfe, + 0x10, 0x10, 0xfe, 0xcc, 0xf0, 0xe2, 0x68, 0x05, 0x1f, 0x4d, 0x10, 0xfe, 0x12, 0x00, 0x2c, 0x0f, + 0xfe, 0x4e, 0x11, 0x27, 0xfe, 0x00, 0x0c, 0xfe, 0x9e, 0xf0, 0xfe, 0x14, 0x0c, 0xbc, 0x17, 0x34, + 0x2c, 0x77, 0xe6, 0xc5, 0x24, 0xc6, 0x24, 0x2c, 0xfa, 0x27, 0xfe, 0x20, 0x0c, 0x1c, 0x34, 0x94, + 0xfe, 0x3c, 0x0c, 0x95, 0x86, 0xc5, 0xdc, 0xc6, 0xdc, 0x02, 0x24, 0x01, 0x4b, 0xfe, 0xdb, 0x10, + 0x12, 0xfe, 0xe8, 0x00, 0xb5, 0xb6, 0x74, 0xc7, 0x81, 0xc8, 0x83, 0xfe, 0x89, 0xf0, 0x24, 0x33, + 0x31, 0xe1, 0xc7, 0x81, 0xc8, 0x83, 0x27, 0xfe, 0x66, 0x0c, 0x1d, 0x24, 0x33, 0x31, 0xdf, 0xbc, + 0x4e, 0x10, 0xfe, 0x42, 0x00, 0x02, 0x65, 0x7c, 0x06, 0xfe, 0x81, 0x49, 0x17, 0xfe, 0x2c, 0x0d, + 0x08, 0x05, 0x0a, 0xfe, 0x44, 0x13, 0x10, 0x00, 0x55, 0x0a, 0xfe, 0x54, 0x12, 0x55, 0xfe, 0x28, + 0x00, 0x23, 0xfe, 0x9a, 0x0d, 0x09, 0x46, 0x01, 0x0e, 0x07, 0x00, 0x66, 0x44, 0xfe, 0x28, 0x00, + 0xfe, 0xe2, 0x10, 0x01, 0xf5, 0x01, 0xf6, 0x09, 0xa4, 0x01, 0xfe, 0x26, 0x0f, 0x64, 0x12, 0x2f, + 0x01, 0x73, 0x02, 0x2b, 0x10, 0xfe, 0x44, 0x00, 0x55, 0x0a, 0xe9, 0x44, 0x0a, 0xfe, 0xb4, 0x10, + 0x01, 0xb0, 0x44, 0x0a, 0xfe, 0xaa, 0x10, 0x01, 0xb0, 0xfe, 0x19, 0x82, 0xfe, 0x34, 0x46, 0xac, + 0x44, 0x0a, 0x10, 0xfe, 0x43, 0x00, 0xfe, 0x96, 0x10, 0x08, 0x54, 0x0a, 0x37, 0x01, 0xf5, 0x01, + 0xf6, 0x64, 0x12, 0x2f, 0x01, 0x73, 0x99, 0x0a, 0x64, 0x42, 0x92, 0x02, 0xfe, 0x2e, 0x03, 0x08, + 0x05, 0x0a, 0x8a, 0x44, 0x0a, 0x10, 0x00, 0xfe, 0x5c, 0x10, 0x68, 0x05, 0x1a, 0xfe, 0x58, 0x12, + 0x08, 0x05, 0x1a, 0xfe, 0x50, 0x13, 0xfe, 0x1c, 0x1c, 0xfe, 0x9d, 0xf0, 0xfe, 0x50, 0x0d, 0xfe, + 0x1c, 0x1c, 0xfe, 0x9d, 0xf0, 0xfe, 0x56, 0x0d, 0x08, 0x54, 0x1a, 0x37, 0xfe, 0xa9, 0x10, 0x10, + 0xfe, 0x15, 0x00, 0xfe, 0x04, 0xe6, 0x0a, 0x50, 0xfe, 0x2e, 0x10, 0x10, 0xfe, 0x13, 0x00, 0xfe, + 0x10, 0x10, 0x10, 0x6f, 0xab, 0x10, 0xfe, 0x41, 0x00, 0xaa, 0x10, 0xfe, 0x24, 0x00, 0x8c, 0xb5, + 0xb6, 0x74, 0x03, 0x70, 0x28, 0x23, 0xd8, 0x50, 0xfe, 0x04, 0xe6, 0x1a, 0xfe, 0x9d, 0x41, 0xfe, + 0x1c, 0x42, 0x64, 0x01, 0xe3, 0x02, 0x2b, 0xf8, 0x15, 0x0a, 0x39, 0xa0, 0xb4, 0x15, 0xfe, 0x31, + 0x00, 0x39, 0xa2, 0x01, 0xfe, 0x48, 0x10, 0x02, 0xd7, 0x42, 0xfe, 0x06, 0xec, 0xd0, 0xfc, 0x44, + 0x1b, 0xfe, 0xce, 0x45, 0x35, 0x42, 0xfe, 0x06, 0xea, 0xd0, 0xfe, 0x47, 0x4b, 0x91, 0xfe, 0x75, + 0x57, 0x03, 0x5d, 0xfe, 0x98, 0x56, 0xfe, 0x38, 0x12, 0x09, 0x48, 0x01, 0x0e, 0xfe, 0x44, 0x48, + 0x4f, 0x08, 0x05, 0x1b, 0xfe, 0x1a, 0x13, 0x09, 0x46, 0x01, 0x0e, 0x41, 0xfe, 0x41, 0x58, 0x09, + 0xa4, 0x01, 0x0e, 0xfe, 0x49, 0x54, 0x96, 0xfe, 0x1e, 0x0e, 0x02, 0xfe, 0x2e, 0x03, 0x09, 0x5d, + 0xfe, 0xee, 0x14, 0xfc, 0x44, 0x1b, 0xfe, 0xce, 0x45, 0x35, 0x42, 0xfe, 0xce, 0x47, 0xfe, 0xad, + 0x13, 0x02, 0x2b, 0x22, 0x20, 0x07, 0x11, 0xfe, 0x9e, 0x12, 0x21, 0x13, 0x59, 0x13, 0x9f, 0x13, + 0xd5, 0x22, 0x2f, 0x41, 0x39, 0x2f, 0xbc, 0xad, 0xfe, 0xbc, 0xf0, 0xfe, 0xe0, 0x0e, 0x0f, 0x06, + 0x13, 0x59, 0x01, 0xfe, 0xda, 0x16, 0x03, 0xfe, 0x38, 0x01, 0x29, 0xfe, 0x3a, 0x01, 0x56, 0xfe, + 0xe4, 0x0e, 0xfe, 0x02, 0xec, 0xd5, 0x69, 0x00, 0x66, 0xfe, 0x04, 0xec, 0x20, 0x4f, 0xfe, 0x05, + 0xf6, 0xfe, 0x34, 0x01, 0x01, 0xfe, 0x4a, 0x17, 0xfe, 0x08, 0x90, 0xfe, 0x48, 0xf4, 0x0d, 0xfe, + 0x18, 0x13, 0xba, 0xfe, 0x02, 0xea, 0xd5, 0x69, 0x7e, 0xfe, 0xc5, 0x13, 0x15, 0x1a, 0x39, 0xa0, + 0xb4, 0xfe, 0x2e, 0x10, 0x03, 0xfe, 0x38, 0x01, 0x1e, 0xfe, 0xf0, 0xff, 0x0c, 0xfe, 0x60, 0x01, + 0x03, 0xfe, 0x3a, 0x01, 0x0c, 0xfe, 0x62, 0x01, 0x43, 0x13, 0x20, 0x25, 0x06, 0x13, 0x2f, 0x12, + 0x2f, 0x92, 0x0f, 0x06, 0x04, 0x21, 0x04, 0x22, 0x59, 0xfe, 0xf7, 0x12, 0x22, 0x9f, 0xb7, 0x13, + 0x9f, 0x07, 0x7e, 0xfe, 0x71, 0x13, 0xfe, 0x24, 0x1c, 0x15, 0x19, 0x39, 0xa0, 0xb4, 0xfe, 0xd9, + 0x10, 0xc3, 0xfe, 0x03, 0xdc, 0xfe, 0x73, 0x57, 0xfe, 0x80, 0x5d, 0x04, 0xc3, 0xfe, 0x03, 0xdc, + 0xfe, 0x5b, 0x57, 0xfe, 0x80, 0x5d, 0x04, 0xfe, 0x03, 0x57, 0xc3, 0x21, 0xfe, 0x00, 0xcc, 0x04, + 0xfe, 0x03, 0x57, 0xc3, 0x78, 0x04, 0x08, 0x05, 0x58, 0xfe, 0x22, 0x13, 0xfe, 0x1c, 0x80, 0x07, + 0x06, 0xfe, 0x1a, 0x13, 0xfe, 0x1e, 0x80, 0xed, 0xfe, 0x1d, 0x80, 0xae, 0xfe, 0x0c, 0x90, 0xfe, + 0x0e, 0x13, 0xfe, 0x0e, 0x90, 0xac, 0xfe, 0x3c, 0x90, 0xfe, 0x30, 0xf4, 0x0a, 0xfe, 0x3c, 0x50, + 0xaa, 0x01, 0xfe, 0x7a, 0x17, 0x32, 0x07, 0x2f, 0xad, 0x01, 0xfe, 0xb4, 0x16, 0x08, 0x05, 0x1b, + 0x4e, 0x01, 0xf5, 0x01, 0xf6, 0x12, 0xfe, 0xe9, 0x00, 0x08, 0x05, 0x58, 0xfe, 0x2c, 0x13, 0x01, + 0xfe, 0x0c, 0x17, 0xfe, 0x1e, 0x1c, 0xfe, 0x14, 0x90, 0xfe, 0x96, 0x90, 0x0c, 0xfe, 0x64, 0x01, + 0x14, 0xfe, 0x66, 0x01, 0x08, 0x05, 0x5b, 0xfe, 0x12, 0x12, 0xfe, 0x03, 0x80, 0x8d, 0xfe, 0x01, + 0xec, 0x20, 0xfe, 0x80, 0x40, 0x13, 0x20, 0x6a, 0x2a, 0x12, 0xcf, 0x64, 0x22, 0x20, 0xfb, 0x79, + 0x20, 0x04, 0xfe, 0x08, 0x1c, 0x03, 0xfe, 0xac, 0x00, 0xfe, 0x06, 0x58, 0x03, 0xfe, 0xae, 0x00, + + 0xfe, 0x07, 0x58, 0x03, 0xfe, 0xb0, 0x00, 0xfe, 0x08, 0x58, 0x03, 0xfe, 0xb2, 0x00, 0xfe, 0x09, + 0x58, 0xfe, 0x0a, 0x1c, 0x25, 0x6e, 0x13, 0xd0, 0x21, 0x0c, 0x5c, 0x0c, 0x45, 0x0f, 0x46, 0x52, + 0x50, 0x18, 0x1b, 0xfe, 0x90, 0x4d, 0xfe, 0x91, 0x54, 0x23, 0xfe, 0xfc, 0x0f, 0x44, 0x11, 0x0f, + 0x48, 0x52, 0x18, 0x58, 0xfe, 0x90, 0x4d, 0xfe, 0x91, 0x54, 0x23, 0xe4, 0x25, 0x11, 0x13, 0x20, + 0x7c, 0x6f, 0x4f, 0x22, 0x20, 0xfb, 0x79, 0x20, 0x12, 0xcf, 0xfe, 0x14, 0x56, 0xfe, 0xd6, 0xf0, + 0xfe, 0x26, 0x10, 0xf8, 0x74, 0xfe, 0x14, 0x1c, 0xfe, 0x10, 0x1c, 0xfe, 0x18, 0x1c, 0x04, 0x42, + 0xfe, 0x0c, 0x14, 0xfc, 0xfe, 0x07, 0xe6, 0x1b, 0xfe, 0xce, 0x47, 0xfe, 0xf5, 0x13, 0x04, 0x01, + 0xb0, 0x7c, 0x6f, 0x4f, 0xfe, 0x06, 0x80, 0xfe, 0x48, 0x47, 0xfe, 0x42, 0x13, 0x32, 0x07, 0x2f, + 0xfe, 0x34, 0x13, 0x09, 0x48, 0x01, 0x0e, 0xbb, 0xfe, 0x36, 0x12, 0xfe, 0x41, 0x48, 0xfe, 0x45, + 0x48, 0x01, 0xf0, 0xfe, 0x00, 0xcc, 0xbb, 0xfe, 0xf3, 0x13, 0x43, 0x78, 0x07, 0x11, 0xac, 0x09, + 0x84, 0x01, 0x0e, 0xfe, 0x80, 0x5c, 0x01, 0x73, 0xfe, 0x0e, 0x10, 0x07, 0x82, 0x4e, 0xfe, 0x14, + 0x56, 0xfe, 0xd6, 0xf0, 0xfe, 0x60, 0x10, 0x04, 0xfe, 0x44, 0x58, 0x8d, 0xfe, 0x01, 0xec, 0xa2, + 0xfe, 0x9e, 0x40, 0xfe, 0x9d, 0xe7, 0x00, 0xfe, 0x9c, 0xe7, 0x1a, 0x79, 0x2a, 0x01, 0xe3, 0xfe, + 0xdd, 0x10, 0x2c, 0xc7, 0x81, 0xc8, 0x83, 0x33, 0x31, 0xde, 0x07, 0x1a, 0xfe, 0x48, 0x12, 0x07, + 0x0a, 0xfe, 0x56, 0x12, 0x07, 0x19, 0xfe, 0x30, 0x12, 0x07, 0xc9, 0x17, 0xfe, 0x32, 0x12, 0x07, + 0xfe, 0x23, 0x00, 0x17, 0xeb, 0x07, 0x06, 0x17, 0xfe, 0x9c, 0x12, 0x07, 0x1f, 0xfe, 0x12, 0x12, + 0x07, 0x00, 0x17, 0x24, 0x15, 0xc9, 0x01, 0x36, 0xa9, 0x2d, 0x01, 0x0b, 0x94, 0x4b, 0x04, 0x2d, + 0xdd, 0x09, 0xd1, 0x01, 0xfe, 0x26, 0x0f, 0x12, 0x82, 0x02, 0x2b, 0x2d, 0x32, 0x07, 0xa6, 0xfe, + 0xd9, 0x13, 0x3a, 0x3d, 0x3b, 0x3e, 0x56, 0xfe, 0xf0, 0x11, 0x08, 0x05, 0x5a, 0xfe, 0x72, 0x12, + 0x9b, 0x2e, 0x9c, 0x3c, 0x90, 0xc0, 0x96, 0xfe, 0xba, 0x11, 0x22, 0x62, 0xfe, 0x26, 0x13, 0x03, + 0x7f, 0x29, 0x80, 0x56, 0xfe, 0x76, 0x0d, 0x0c, 0x60, 0x14, 0x61, 0x21, 0x0c, 0x7f, 0x0c, 0x80, + 0x01, 0xb3, 0x25, 0x6e, 0x77, 0x13, 0x62, 0x01, 0xef, 0x9b, 0x2e, 0x9c, 0x3c, 0xfe, 0x04, 0x55, + 0xfe, 0xa5, 0x55, 0xfe, 0x04, 0xfa, 0x2e, 0xfe, 0x05, 0xfa, 0x3c, 0xfe, 0x91, 0x10, 0x03, 0x3f, + 0x29, 0x40, 0xfe, 0x40, 0x56, 0xfe, 0xe1, 0x56, 0x0c, 0x3f, 0x14, 0x40, 0x88, 0x9b, 0x2e, 0x9c, + 0x3c, 0x90, 0xc0, 0x03, 0x5e, 0x29, 0x5f, 0xfe, 0x00, 0x56, 0xfe, 0xa1, 0x56, 0x0c, 0x5e, 0x14, + 0x5f, 0x08, 0x05, 0x5a, 0xfe, 0x1e, 0x12, 0x22, 0x62, 0xfe, 0x1f, 0x40, 0x03, 0x60, 0x29, 0x61, + 0xfe, 0x2c, 0x50, 0xfe, 0xae, 0x50, 0x03, 0x3f, 0x29, 0x40, 0xfe, 0x44, 0x50, 0xfe, 0xc6, 0x50, + 0x03, 0x5e, 0x29, 0x5f, 0xfe, 0x08, 0x50, 0xfe, 0x8a, 0x50, 0x03, 0x3d, 0x29, 0x3e, 0xfe, 0x40, + 0x50, 0xfe, 0xc2, 0x50, 0x02, 0x89, 0x25, 0x06, 0x13, 0xd4, 0x02, 0x72, 0x2d, 0x01, 0x0b, 0x1d, + 0x4c, 0x33, 0x31, 0xde, 0x07, 0x06, 0x23, 0x4c, 0x32, 0x07, 0xa6, 0x23, 0x72, 0x01, 0xaf, 0x1e, + 0x43, 0x17, 0x4c, 0x08, 0x05, 0x0a, 0xee, 0x3a, 0x3d, 0x3b, 0x3e, 0xfe, 0x0a, 0x55, 0x35, 0xfe, + 0x8b, 0x55, 0x57, 0x3d, 0x7d, 0x3e, 0xfe, 0x0c, 0x51, 0xfe, 0x8e, 0x51, 0x02, 0x72, 0xfe, 0x19, + 0x81, 0xba, 0xfe, 0x19, 0x41, 0x02, 0x72, 0x2d, 0x01, 0x0b, 0x1c, 0x34, 0x1d, 0xe8, 0x33, 0x31, + 0xe1, 0x55, 0x19, 0xfe, 0xa6, 0x12, 0x55, 0x0a, 0x4d, 0x02, 0x4c, 0x01, 0x0b, 0x1c, 0x34, 0x1d, + 0xe8, 0x33, 0x31, 0xdf, 0x07, 0x19, 0x23, 0x4c, 0x01, 0x0b, 0x1d, 0xe8, 0x33, 0x31, 0xfe, 0xe8, + 0x09, 0xfe, 0xc2, 0x49, 0x51, 0x03, 0xfe, 0x9c, 0x00, 0x28, 0x8a, 0x53, 0x05, 0x1f, 0x35, 0xa9, + 0xfe, 0xbb, 0x45, 0x55, 0x00, 0x4e, 0x44, 0x06, 0x7c, 0x43, 0xfe, 0xda, 0x14, 0x01, 0xaf, 0x8c, + 0xfe, 0x4b, 0x45, 0xee, 0x32, 0x07, 0xa5, 0xed, 0x03, 0xcd, 0x28, 0x8a, 0x03, 0x45, 0x28, 0x35, + 0x67, 0x02, 0x72, 0xfe, 0xc0, 0x5d, 0xfe, 0xf8, 0x14, 0xfe, 0x03, 0x17, 0x03, 0x5c, 0xc1, 0x0c, + 0x5c, 0x67, 0x2d, 0x01, 0x0b, 0x26, 0x89, 0x01, 0xfe, 0x9e, 0x15, 0x02, 0x89, 0x01, 0x0b, 0x1c, + 0x34, 0x1d, 0x4c, 0x33, 0x31, 0xdf, 0x07, 0x06, 0x23, 0x4c, 0x01, 0xf1, 0xfe, 0x42, 0x58, 0xf1, + 0xfe, 0xa4, 0x14, 0x8c, 0xfe, 0x4a, 0xf4, 0x0a, 0x17, 0x4c, 0xfe, 0x4a, 0xf4, 0x06, 0xea, 0x32, + 0x07, 0xa5, 0x8b, 0x02, 0x72, 0x03, 0x45, 0xc1, 0x0c, 0x45, 0x67, 0x2d, 0x01, 0x0b, 0x26, 0x89, + 0x01, 0xfe, 0xcc, 0x15, 0x02, 0x89, 0x0f, 0x06, 0x27, 0xfe, 0xbe, 0x13, 0x26, 0xfe, 0xd4, 0x13, + 0x76, 0xfe, 0x89, 0x48, 0x01, 0x0b, 0x21, 0x76, 0x04, 0x7b, 0xfe, 0xd0, 0x13, 0x1c, 0xfe, 0xd0, + 0x13, 0x1d, 0xfe, 0xbe, 0x13, 0x67, 0x2d, 0x01, 0x0b, 0xfe, 0xd5, 0x10, 0x0f, 0x71, 0xff, 0x02, + 0x00, 0x57, 0x52, 0x93, 0x1e, 0xfe, 0xff, 0x7f, 0xfe, 0x30, 0x56, 0xfe, 0x00, 0x5c, 0x04, 0x0f, + 0x71, 0xff, 0x02, 0x00, 0x57, 0x52, 0x93, 0x1e, 0x43, 0xfe, 0x30, 0x56, 0xfe, 0x00, 0x5c, 0x04, + 0x0f, 0x71, 0xff, 0x02, 0x00, 0x57, 0x52, 0x93, 0x04, 0x0f, 0x71, 0xff, 0x02, 0x00, 0x57, 0x52, + 0x93, 0xfe, 0x0b, 0x58, 0x04, 0x09, 0x5c, 0x01, 0x87, 0x09, 0x45, 0x01, 0x87, 0x04, 0xfe, 0x03, + 0xa1, 0x1e, 0x11, 0xff, 0x03, 0x00, 0x54, 0xfe, 0x00, 0xf4, 0x1f, 0x52, 0xfe, 0x00, 0x7d, 0xfe, + 0x01, 0x7d, 0xfe, 0x02, 0x7d, 0xfe, 0x03, 0x7c, 0x6a, 0x2a, 0x0c, 0x5e, 0x14, 0x5f, 0x57, 0x3f, + 0x7d, 0x40, 0x04, 0xdd, 0xfe, 0x82, 0x4a, 0xfe, 0xe1, 0x1a, 0xfe, 0x83, 0x5a, 0x8d, 0x04, 0x01, + 0xfe, 0x0c, 0x19, 0xfe, 0x42, 0x48, 0x50, 0x51, 0x91, 0x01, 0x0b, 0x1d, 0xfe, 0x96, 0x15, 0x33, + 0x31, 0xe1, 0x01, 0x0b, 0x1d, 0xfe, 0x96, 0x15, 0x33, 0x31, 0xfe, 0xe8, 0x0a, 0xfe, 0xc1, 0x59, + 0x03, 0xcd, 0x28, 0xfe, 0xcc, 0x12, 0x53, 0x05, 0x1a, 0xfe, 0xc4, 0x13, 0x21, 0x69, 0x1a, 0xee, + 0x55, 0xca, 0x6b, 0xfe, 0xdc, 0x14, 0x4d, 0x0f, 0x06, 0x18, 0xca, 0x7c, 0x30, 0xfe, 0x78, 0x10, + 0xff, 0x02, 0x83, 0x55, 0xab, 0xff, 0x02, 0x83, 0x55, 0x69, 0x19, 0xae, 0x98, 0xfe, 0x30, 0x00, + 0x96, 0xf2, 0x18, 0x6d, 0x0f, 0x06, 0xfe, 0x56, 0x10, 0x69, 0x0a, 0xed, 0x98, 0xfe, 0x64, 0x00, + 0x96, 0xf2, 0x09, 0xfe, 0x64, 0x00, 0x18, 0x9e, 0x0f, 0x06, 0xfe, 0x28, 0x10, 0x69, 0x06, 0xfe, + 0x60, 0x13, 0x98, 0xfe, 0xc8, 0x00, 0x96, 0xf2, 0x09, 0xfe, 0xc8, 0x00, 0x18, 0x59, 0x0f, 0x06, + 0x88, 0x98, 0xfe, 0x90, 0x01, 0x7a, 0xfe, 0x42, 0x15, 0x91, 0xe4, 0xfe, 0x43, 0xf4, 0x9f, 0xfe, + 0x56, 0xf0, 0xfe, 0x54, 0x15, 0xfe, 0x04, 0xf4, 0x71, 0xfe, 0x43, 0xf4, 0x9e, 0xfe, 0xf3, 0x10, + 0xfe, 0x40, 0x5c, 0x01, 0xfe, 0x16, 0x14, 0x1e, 0x43, 0xec, 0xfe, 0x00, 0x17, 0xfe, 0x4d, 0xe4, + 0x6e, 0x7a, 0xfe, 0x90, 0x15, 0xc4, 0x6e, 0xfe, 0x1c, 0x10, 0xfe, 0x00, 0x17, 0xfe, 0x4d, 0xe4, + 0xcc, 0x7a, 0xfe, 0x90, 0x15, 0xc4, 0xcc, 0x88, 0x51, 0x21, 0xfe, 0x4d, 0xf4, 0x00, 0xe9, 0x91, + 0x0f, 0x06, 0xfe, 0xb4, 0x56, 0xfe, 0xc3, 0x58, 0x04, 0x51, 0x0f, 0x0a, 0x04, 0x16, 0x06, 0x01, + 0x0b, 0x26, 0xf3, 0x16, 0x0a, 0x01, 0x0b, 0x26, 0xf3, 0x16, 0x19, 0x01, 0x0b, 0x26, 0xf3, 0x76, + 0xfe, 0x89, 0x49, 0x01, 0x0b, 0x04, 0x16, 0x06, 0x01, 0x0b, 0x26, 0xb1, 0x16, 0x19, 0x01, 0x0b, + 0x26, 0xb1, 0x16, 0x06, 0x01, 0x0b, 0x26, 0xb1, 0xfe, 0x89, 0x49, 0x01, 0x0b, 0x26, 0xb1, 0x76, + 0xfe, 0x89, 0x4a, 0x01, 0x0b, 0x04, 0x51, 0x04, 0x22, 0xd3, 0x07, 0x06, 0xfe, 0x48, 0x13, 0xb8, + 0x13, 0xd3, 0xfe, 0x49, 0xf4, 0x00, 0x4d, 0x76, 0xa9, 0x67, 0xfe, 0x01, 0xec, 0xfe, 0x27, 0x01, + 0xfe, 0x89, 0x48, 0xff, 0x02, 0x00, 0x10, 0x27, 0xfe, 0x2e, 0x16, 0x32, 0x07, 0xfe, 0xe3, 0x00, + 0xfe, 0x20, 0x13, 0x1d, 0xfe, 0x52, 0x16, 0x21, 0x13, 0xd4, 0x01, 0x4b, 0x22, 0xd4, 0x07, 0x06, + 0x4e, 0x08, 0x54, 0x06, 0x37, 0x04, 0x09, 0x48, 0x01, 0x0e, 0xfb, 0x8e, 0x07, 0x11, 0xae, 0x09, + 0x84, 0x01, 0x0e, 0x8e, 0x09, 0x5d, 0x01, 0xa8, 0x04, 0x09, 0x84, 0x01, 0x0e, 0x8e, 0xfe, 0x80, + 0xe7, 0x11, 0x07, 0x11, 0x8a, 0xfe, 0x45, 0x58, 0x01, 0xf0, 0x8e, 0x04, 0x09, 0x48, 0x01, 0x0e, + 0x8e, 0x09, 0x5d, 0x01, 0xa8, 0x04, 0x09, 0x48, 0x01, 0x0e, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x4c, + 0xfe, 0x49, 0xe4, 0x11, 0xae, 0x09, 0x84, 0x01, 0x0e, 0xfe, 0x80, 0x4c, 0x09, 0x5d, 0x01, 0x87, + 0x04, 0x18, 0x11, 0x75, 0x6c, 0xfe, 0x60, 0x01, 0xfe, 0x18, 0xdf, 0xfe, 0x19, 0xde, 0xfe, 0x24, + 0x1c, 0xfe, 0x1d, 0xf7, 0x1b, 0x97, 0xfe, 0xee, 0x16, 0x01, 0xfe, 0xf4, 0x17, 0xad, 0x9a, 0x1b, + 0x6c, 0xfe, 0x2c, 0x01, 0xfe, 0x2f, 0x19, 0x04, 0xb9, 0x23, 0xfe, 0xde, 0x16, 0xfe, 0xda, 0x10, + 0x18, 0x11, 0x75, 0x03, 0xfe, 0x64, 0x01, 0xfe, 0x00, 0xf4, 0x1f, 0xfe, 0x18, 0x58, 0x03, 0xfe, + 0x66, 0x01, 0xfe, 0x19, 0x58, 0x9a, 0x1f, 0xfe, 0x3c, 0x90, 0xfe, 0x30, 0xf4, 0x06, 0xfe, 0x3c, + 0x50, 0x6c, 0xfe, 0x38, 0x00, 0xfe, 0x0f, 0x79, 0xfe, 0x1c, 0xf7, 0x1f, 0x97, 0xfe, 0x38, 0x17, + 0xfe, 0xb6, 0x14, 0x35, 0x04, 0xb9, 0x23, 0xfe, 0x10, 0x17, 0xfe, 0x9c, 0x10, 0x18, 0x11, 0x75, + 0xfe, 0x83, 0x5a, 0xfe, 0x18, 0xdf, 0xfe, 0x19, 0xde, 0xfe, 0x1d, 0xf7, 0x2e, 0x97, 0xfe, 0x5a, + 0x17, 0xfe, 0x94, 0x14, 0xec, 0x9a, 0x2e, 0x6c, 0x1a, 0xfe, 0xaf, 0x19, 0xfe, 0x98, 0xe7, 0x00, + 0x04, 0xb9, 0x23, 0xfe, 0x4e, 0x17, 0xfe, 0x6c, 0x10, 0x18, 0x11, 0x75, 0xfe, 0x30, 0xbc, 0xfe, + 0xb2, 0xbc, 0x9a, 0xcb, 0x6c, 0x1a, 0xfe, 0x0f, 0x79, 0xfe, 0x1c, 0xf7, 0xcb, 0x97, 0xfe, 0x92, + 0x17, 0xfe, 0x5c, 0x14, 0x35, 0x04, 0xb9, 0x23, 0xfe, 0x7e, 0x17, 0xfe, 0x42, 0x10, 0xfe, 0x02, + 0xf6, 0x11, 0x75, 0xfe, 0x18, 0xfe, 0x60, 0xfe, 0x19, 0xfe, 0x61, 0xfe, 0x03, 0xa1, 0xfe, 0x1d, + 0xf7, 0x5b, 0x97, 0xfe, 0xb8, 0x17, 0xfe, 0x36, 0x14, 0xfe, 0x1c, 0x13, 0x9a, 0x5b, 0x41, 0xfe, + 0x83, 0x58, 0xfe, 0xaf, 0x19, 0xfe, 0x80, 0xe7, 0x11, 0xfe, 0x81, 0xe7, 0x11, 0x12, 0xfe, 0xdd, + 0x00, 0x6a, 0x2a, 0x04, 0x6a, 0x2a, 0xfe, 0x12, 0x45, 0x23, 0xfe, 0xa8, 0x17, 0x15, 0x06, 0x39, + 0xa0, 0xb4, 0x02, 0x2b, 0xfe, 0x39, 0xf0, 0xfe, 0xfc, 0x17, 0x21, 0x04, 0xfe, 0x7e, 0x18, 0x1e, + 0x19, 0x66, 0x0f, 0x0d, 0x04, 0x75, 0x03, 0xd2, 0x1e, 0x06, 0xfe, 0xef, 0x12, 0xfe, 0xe1, 0x10, + 0x7c, 0x6f, 0x4f, 0x32, 0x07, 0x2f, 0xfe, 0x3c, 0x13, 0xf1, 0xfe, 0x42, 0x13, 0x42, 0x92, 0x09, + 0x48, 0x01, 0x0e, 0xbb, 0xeb, 0xfe, 0x41, 0x48, 0xfe, 0x45, 0x48, 0x01, 0xf0, 0xfe, 0x00, 0xcc, + 0xbb, 0xfe, 0xf3, 0x13, 0x43, 0x78, 0x07, 0x11, 0xac, 0x09, 0x84, 0x01, 0x0e, 0xfe, 0x80, 0x4c, + 0x01, 0x73, 0xfe, 0x16, 0x10, 0x07, 0x82, 0x8b, 0xfe, 0x40, 0x14, 0xfe, 0x24, 0x12, 0xfe, 0x14, + 0x56, 0xfe, 0xd6, 0xf0, 0xfe, 0x1c, 0x18, 0x18, 0x0a, 0x04, 0xfe, 0x9c, 0xe7, 0x0a, 0x10, 0xfe, + 0x15, 0x00, 0x64, 0x79, 0x2a, 0x01, 0xe3, 0x18, 0x06, 0x04, 0x42, 0x92, 0x08, 0x54, 0x1b, 0x37, + 0x12, 0x2f, 0x01, 0x73, 0x18, 0x06, 0x04, 0xfe, 0x38, 0x90, 0xfe, 0xba, 0x90, 0x3a, 0xce, 0x3b, + 0xcf, 0xfe, 0x48, 0x55, 0x35, 0xfe, 0xc9, 0x55, 0x04, 0x22, 0xa3, 0x77, 0x13, 0xa3, 0x04, 0x09, + 0xa4, 0x01, 0x0e, 0xfe, 0x41, 0x48, 0x09, 0x46, 0x01, 0x0e, 0xfe, 0x49, 0x44, 0x17, 0xfe, 0xe8, + 0x18, 0x77, 0x78, 0x04, 0x09, 0x48, 0x01, 0x0e, 0x07, 0x11, 0x4e, 0x09, 0x5d, 0x01, 0xa8, 0x09, + 0x46, 0x01, 0x0e, 0x77, 0x78, 0x04, 0xfe, 0x4e, 0xe4, 0x19, 0x6b, 0xfe, 0x1c, 0x19, 0x03, 0xfe, + 0x90, 0x00, 0xfe, 0x3a, 0x45, 0xfe, 0x2c, 0x10, 0xfe, 0x4e, 0xe4, 0xc9, 0x6b, 0xfe, 0x2e, 0x19, + 0x03, 0xfe, 0x92, 0x00, 0xfe, 0x02, 0xe6, 0x1a, 0xe5, 0xfe, 0x4e, 0xe4, 0xfe, 0x0b, 0x00, 0x6b, + 0xfe, 0x40, 0x19, 0x03, 0xfe, 0x94, 0x00, 0xfe, 0x02, 0xe6, 0x1f, 0xfe, 0x08, 0x10, 0x03, 0xfe, + 0x96, 0x00, 0xfe, 0x02, 0xe6, 0x6d, 0xfe, 0x4e, 0x45, 0xea, 0xba, 0xff, 0x04, 0x68, 0x54, 0xe7, + 0x1e, 0x6e, 0xfe, 0x08, 0x1c, 0xfe, 0x67, 0x19, 0xfe, 0x0a, 0x1c, 0xfe, 0x1a, 0xf4, 0xfe, 0x00, + 0x04, 0xea, 0xfe, 0x48, 0xf4, 0x19, 0x7a, 0xfe, 0x74, 0x19, 0x0f, 0x19, 0x04, 0x07, 0x7e, 0xfe, + 0x5a, 0xf0, 0xfe, 0x84, 0x19, 0x25, 0xfe, 0x09, 0x00, 0xfe, 0x34, 0x10, 0x07, 0x1a, 0xfe, 0x5a, + 0xf0, 0xfe, 0x92, 0x19, 0x25, 0xca, 0xfe, 0x26, 0x10, 0x07, 0x19, 0x66, 0x25, 0x6d, 0xe5, 0x07, + 0x0a, 0x66, 0x25, 0x9e, 0xfe, 0x0e, 0x10, 0x07, 0x06, 0x66, 0x25, 0x59, 0xa9, 0xb8, 0x04, 0x15, + 0xfe, 0x09, 0x00, 0x01, 0x36, 0xfe, 0x04, 0xfe, 0x81, 0x03, 0x83, 0xfe, 0x40, 0x5c, 0x04, 0x1c, + 0xf7, 0xfe, 0x14, 0xf0, 0x0b, 0x27, 0xfe, 0xd6, 0x19, 0x1c, 0xf7, 0x7b, 0xf7, 0xfe, 0x82, 0xf0, + 0xfe, 0xda, 0x19, 0x04, 0xff, 0xcc, 0x00, 0x00, }; STATIC unsigned short _adv_asc38C0800_size = - sizeof(_adv_asc38C0800_buf); /* 0x14C7 */ + sizeof(_adv_asc38C0800_buf); /* 0x14E1 */ STATIC ADV_DCNT _adv_asc38C0800_chksum = - 0x0505BAF2UL; /* Expanded little-endian checksum. */ - + 0x050D3FD8UL; /* Expanded little-endian checksum. */ +/* Microcode buffer is kept after initialization for error recovery. */ STATIC unsigned char _adv_asc38C1600_buf[] = { - 0x00, 0x00, 0x00, 0xf2, 0x00, 0xfc, 0x00, 0x16, 0x00, 0xf0, 0x01, 0x00, 0xe6, 0x1b, 0x48, 0xe4, - 0x18, 0xe4, 0x03, 0xf6, 0x02, 0x00, 0x18, 0x80, 0x00, 0xfa, 0xff, 0xff, 0x04, 0x00, 0x00, 0xf6, - 0x09, 0xe7, 0x82, 0xe7, 0x85, 0xf0, 0x86, 0xf0, 0xe8, 0x0e, 0x9e, 0xe7, 0xff, 0x00, 0x55, 0xf0, - 0x01, 0xf6, 0x03, 0x00, 0x98, 0x57, 0x01, 0xe6, 0x00, 0xea, 0x00, 0xec, 0x18, 0xf4, 0x01, 0xfa, - 0x08, 0x00, 0xd2, 0x1b, 0x38, 0x54, 0x32, 0xf0, 0x70, 0x0d, 0x1e, 0xf0, 0xd5, 0xf0, 0xbc, 0x00, - 0x4b, 0xe4, 0x00, 0xe6, 0xb1, 0xf0, 0xb4, 0x00, 0x02, 0x13, 0x06, 0x13, 0x3e, 0x1c, 0x3e, 0x00, - 0xd8, 0x01, 0x00, 0x10, 0x0c, 0x1c, 0x00, 0x57, 0x00, 0x80, 0x02, 0x80, 0x1b, 0x80, 0x01, 0xfc, - 0x10, 0x00, 0x6a, 0x0d, 0xe0, 0x10, 0xb9, 0x54, 0xf2, 0x13, 0x18, 0x40, 0xbd, 0x56, 0x03, 0xe6, - 0x01, 0xea, 0x5c, 0xf0, 0x0f, 0x00, 0x20, 0x00, 0xc0, 0x00, 0x6c, 0x01, 0x6e, 0x01, 0x98, 0x10, - 0x04, 0x12, 0x04, 0x13, 0xbb, 0x55, 0x3c, 0x56, 0x03, 0x58, 0x4a, 0xe4, 0x40, 0x00, 0xb6, 0x00, - 0xbb, 0x00, 0x00, 0x01, 0x01, 0x01, 0x3e, 0x01, 0x7c, 0x09, 0x08, 0x12, 0x0a, 0x12, 0x4c, 0x1c, - 0x3e, 0x57, 0x30, 0xe4, 0x05, 0xe6, 0x0c, 0x00, 0x3c, 0x00, 0x80, 0x00, 0x24, 0x01, 0x3c, 0x01, + 0x00, 0x00, 0x00, 0xf2, 0x00, 0x16, 0x00, 0xfc, 0x00, 0x10, 0x00, 0xf0, 0x18, 0xe4, 0x01, 0x00, + 0x04, 0x1e, 0x48, 0xe4, 0x03, 0xf6, 0xf7, 0x13, 0x2e, 0x1e, 0x02, 0x00, 0x07, 0x17, 0xc0, 0x5f, + 0x00, 0xfa, 0xff, 0xff, 0x04, 0x00, 0x00, 0xf6, 0x09, 0xe7, 0x82, 0xe7, 0x85, 0xf0, 0x86, 0xf0, + 0x4e, 0x10, 0x9e, 0xe7, 0xff, 0x00, 0x55, 0xf0, 0x01, 0xf6, 0x03, 0x00, 0x98, 0x57, 0x01, 0xe6, + 0x00, 0xea, 0x00, 0xec, 0x01, 0xfa, 0x18, 0xf4, 0x08, 0x00, 0xf0, 0x1d, 0x38, 0x54, 0x32, 0xf0, + 0x10, 0x00, 0xc2, 0x0e, 0x1e, 0xf0, 0xd5, 0xf0, 0xbc, 0x00, 0x4b, 0xe4, 0x00, 0xe6, 0xb1, 0xf0, + 0xb4, 0x00, 0x02, 0x13, 0x3e, 0x1c, 0xc8, 0x47, 0x3e, 0x00, 0xd8, 0x01, 0x06, 0x13, 0x0c, 0x1c, + 0x5e, 0x1e, 0x00, 0x57, 0xc8, 0x57, 0x01, 0xfc, 0xbc, 0x0e, 0xa2, 0x12, 0xb9, 0x54, 0x00, 0x80, + 0x62, 0x0a, 0x5a, 0x12, 0xc8, 0x15, 0x3e, 0x1e, 0x18, 0x40, 0xbd, 0x56, 0x03, 0xe6, 0x01, 0xea, + 0x5c, 0xf0, 0x0f, 0x00, 0x20, 0x00, 0x6c, 0x01, 0x6e, 0x01, 0x04, 0x12, 0x04, 0x13, 0xbb, 0x55, + 0x3c, 0x56, 0x3e, 0x57, 0x03, 0x58, 0x4a, 0xe4, 0x40, 0x00, 0xb6, 0x00, 0xbb, 0x00, 0xc0, 0x00, + 0x00, 0x01, 0x01, 0x01, 0x3e, 0x01, 0x58, 0x0a, 0x44, 0x10, 0x0a, 0x12, 0x4c, 0x1c, 0x4e, 0x1c, + 0x02, 0x4a, 0x30, 0xe4, 0x05, 0xe6, 0x0c, 0x00, 0x3c, 0x00, 0x80, 0x00, 0x24, 0x01, 0x3c, 0x01, 0x68, 0x01, 0x6a, 0x01, 0x70, 0x01, 0x72, 0x01, 0x74, 0x01, 0x76, 0x01, 0x78, 0x01, 0x7c, 0x01, - 0x62, 0x0a, 0x74, 0x0d, 0x0c, 0x10, 0xea, 0x10, 0xec, 0x10, 0x22, 0x18, 0x4e, 0x1c, 0x02, 0x4a, - 0x3a, 0x55, 0x02, 0xee, 0x5b, 0xf0, 0x03, 0xf7, 0x06, 0xf7, 0x03, 0xfc, 0x06, 0x00, 0x1e, 0x00, - 0xbe, 0x00, 0xe1, 0x00, 0xde, 0x0e, 0x24, 0x18, 0x78, 0x18, 0x30, 0x1c, 0x32, 0x1c, 0x38, 0x1c, - 0x10, 0x44, 0x02, 0x48, 0x00, 0x4c, 0xb0, 0x57, 0x04, 0x80, 0x4d, 0xe4, 0x04, 0xea, 0x5d, 0xf0, - 0xa7, 0xf0, 0x04, 0xf6, 0x02, 0xfc, 0x05, 0x00, 0x09, 0x00, 0x19, 0x00, 0x32, 0x00, 0x33, 0x00, - 0x34, 0x00, 0x36, 0x00, 0x98, 0x00, 0x9e, 0x00, 0xcc, 0x00, 0x20, 0x01, 0x4e, 0x01, 0x79, 0x01, - 0xac, 0x08, 0x32, 0x0c, 0x02, 0x10, 0x04, 0x10, 0x12, 0x10, 0x0c, 0x12, 0x0a, 0x13, 0x6a, 0x14, - 0x7a, 0x14, 0x56, 0x17, 0x00, 0x4e, 0x00, 0x54, 0x00, 0xdc, 0x05, 0xf0, 0x09, 0xf0, 0x59, 0xf0, - 0xb8, 0xf0, 0x48, 0xf4, 0x0e, 0xf7, 0x0a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0xa4, 0x00, 0xb5, 0x00, - 0xba, 0x00, 0xd0, 0x00, 0xe7, 0x00, 0xe6, 0x03, 0x69, 0x08, 0xe9, 0x09, 0x2a, 0x0b, 0xd4, 0x0e, - 0x0a, 0x10, 0x0e, 0x10, 0x12, 0x13, 0x94, 0x14, 0xc8, 0x17, 0xc0, 0x19, 0x24, 0x1b, 0x20, 0x1c, - 0x34, 0x1c, 0x36, 0x1c, 0x08, 0x44, 0x38, 0x44, 0x91, 0x44, 0x0a, 0x45, 0x48, 0x46, 0x89, 0x48, - 0x68, 0x54, 0x83, 0x55, 0x01, 0x58, 0x83, 0x59, 0x40, 0x5c, 0x06, 0x83, 0x31, 0xe4, 0x02, 0xe6, - 0x07, 0xf0, 0x08, 0xf0, 0x0b, 0xf0, 0x0c, 0xf0, 0x4b, 0xf4, 0x04, 0xf8, 0x05, 0xf8, 0x02, 0xfa, - 0x03, 0xfa, 0x04, 0xfc, 0x05, 0xfc, 0x07, 0x00, 0xa8, 0x00, 0xaa, 0x00, 0xb9, 0x00, 0xe0, 0x00, - 0xe5, 0x00, 0x22, 0x01, 0x26, 0x01, 0x60, 0x01, 0x7a, 0x01, 0x82, 0x01, 0xc8, 0x01, 0xca, 0x01, - 0x84, 0x02, 0x6a, 0x03, 0xe2, 0x04, 0x4e, 0x07, 0x68, 0x08, 0x86, 0x09, 0xda, 0x0b, 0xfa, 0x0e, - 0x06, 0x10, 0x1a, 0x10, 0xed, 0x10, 0xf1, 0x10, 0xf3, 0x10, 0xf4, 0x10, 0x06, 0x12, 0x0e, 0x13, - 0x10, 0x13, 0x16, 0x13, 0x1e, 0x13, 0xc4, 0x14, 0x90, 0x15, 0xfe, 0x9c, 0xf0, 0x30, 0x04, 0xfe, - 0x9a, 0x0d, 0xff, 0x10, 0x00, 0x00, 0xe7, 0xfe, 0x00, 0x1c, 0x00, 0xe6, 0xfe, 0x88, 0x01, 0xff, - 0x03, 0x00, 0x00, 0xfe, 0x02, 0x15, 0xfe, 0x0c, 0x05, 0xff, 0x38, 0x00, 0x00, 0xfe, 0x57, 0x24, - 0x00, 0xfe, 0x4c, 0x00, 0x5d, 0xff, 0x04, 0x00, 0x00, 0x16, 0xff, 0x09, 0x00, 0x00, 0xff, 0x08, + 0xc6, 0x0e, 0x0c, 0x10, 0xac, 0x12, 0xae, 0x12, 0x16, 0x1a, 0x32, 0x1c, 0x6e, 0x1e, 0x02, 0x48, + 0x3a, 0x55, 0xc9, 0x57, 0x02, 0xee, 0x5b, 0xf0, 0x03, 0xf7, 0x06, 0xf7, 0x03, 0xfc, 0x06, 0x00, + 0x1e, 0x00, 0xbe, 0x00, 0xe1, 0x00, 0x0c, 0x12, 0x18, 0x1a, 0x70, 0x1a, 0x30, 0x1c, 0x38, 0x1c, + 0x10, 0x44, 0x00, 0x4c, 0xb0, 0x57, 0x40, 0x5c, 0x4d, 0xe4, 0x04, 0xea, 0x5d, 0xf0, 0xa7, 0xf0, + 0x04, 0xf6, 0x02, 0xfc, 0x05, 0x00, 0x09, 0x00, 0x19, 0x00, 0x32, 0x00, 0x33, 0x00, 0x34, 0x00, + 0x36, 0x00, 0x98, 0x00, 0x9e, 0x00, 0xcc, 0x00, 0x20, 0x01, 0x4e, 0x01, 0x79, 0x01, 0x3c, 0x09, + 0x68, 0x0d, 0x02, 0x10, 0x04, 0x10, 0x3a, 0x10, 0x08, 0x12, 0x0a, 0x13, 0x40, 0x16, 0x50, 0x16, + 0x00, 0x17, 0x4a, 0x19, 0x00, 0x4e, 0x00, 0x54, 0x01, 0x58, 0x00, 0xdc, 0x05, 0xf0, 0x09, 0xf0, + 0x59, 0xf0, 0xb8, 0xf0, 0x48, 0xf4, 0x0e, 0xf7, 0x0a, 0x00, 0x9b, 0x00, 0x9c, 0x00, 0xa4, 0x00, + 0xb5, 0x00, 0xba, 0x00, 0xd0, 0x00, 0xe7, 0x00, 0xf0, 0x03, 0x69, 0x08, 0xe9, 0x09, 0x5c, 0x0c, + 0xb6, 0x12, 0xbc, 0x19, 0xd8, 0x1b, 0x20, 0x1c, 0x34, 0x1c, 0x36, 0x1c, 0x42, 0x1d, 0x08, 0x44, + 0x38, 0x44, 0x91, 0x44, 0x0a, 0x45, 0x48, 0x46, 0x89, 0x48, 0x68, 0x54, 0x83, 0x55, 0x83, 0x59, + 0x31, 0xe4, 0x02, 0xe6, 0x07, 0xf0, 0x08, 0xf0, 0x0b, 0xf0, 0x0c, 0xf0, 0x4b, 0xf4, 0x04, 0xf8, + 0x05, 0xf8, 0x02, 0xfa, 0x03, 0xfa, 0x04, 0xfc, 0x05, 0xfc, 0x07, 0x00, 0xa8, 0x00, 0xaa, 0x00, + 0xb9, 0x00, 0xe0, 0x00, 0xe5, 0x00, 0x22, 0x01, 0x26, 0x01, 0x60, 0x01, 0x7a, 0x01, 0x82, 0x01, + 0xc8, 0x01, 0xca, 0x01, 0x86, 0x02, 0x6a, 0x03, 0x18, 0x05, 0xb2, 0x07, 0x68, 0x08, 0x10, 0x0d, + 0x06, 0x10, 0x0a, 0x10, 0x0e, 0x10, 0x12, 0x10, 0x60, 0x10, 0xed, 0x10, 0xf3, 0x10, 0x06, 0x12, + 0x10, 0x12, 0x1e, 0x12, 0x0c, 0x13, 0x0e, 0x13, 0x10, 0x13, 0xfe, 0x9c, 0xf0, 0x35, 0x05, 0xfe, + 0xec, 0x0e, 0xff, 0x10, 0x00, 0x00, 0xe9, 0xfe, 0x34, 0x1f, 0x00, 0xe8, 0xfe, 0x88, 0x01, 0xff, + 0x03, 0x00, 0x00, 0xfe, 0x93, 0x15, 0xfe, 0x0f, 0x05, 0xff, 0x38, 0x00, 0x00, 0xfe, 0x57, 0x24, + 0x00, 0xfe, 0x4c, 0x00, 0x65, 0xff, 0x04, 0x00, 0x00, 0x1a, 0xff, 0x09, 0x00, 0x00, 0xff, 0x08, 0x01, 0x01, 0xff, 0x08, 0xff, 0xff, 0xff, 0x27, 0x00, 0x00, 0xff, 0x10, 0xff, 0xff, 0xff, 0x13, - 0x00, 0x00, 0xfe, 0x78, 0x56, 0xfe, 0x34, 0x12, 0xff, 0x21, 0x00, 0x00, 0xfe, 0x04, 0xf7, 0xe6, - 0x32, 0x74, 0x0a, 0x01, 0xfe, 0x88, 0x0f, 0xfe, 0x04, 0xf7, 0xe6, 0x74, 0x0a, 0x58, 0x32, 0xfe, - 0x3d, 0xf0, 0xfe, 0x0a, 0x02, 0xfe, 0x20, 0xf0, 0xb3, 0xfe, 0x91, 0xf0, 0xfe, 0xf8, 0x01, 0xfe, - 0x90, 0xf0, 0xfe, 0xf8, 0x01, 0xfe, 0x8f, 0xf0, 0xb3, 0x02, 0x5f, 0x48, 0x04, 0xfe, 0xb6, 0x0d, - 0x01, 0xfe, 0x18, 0x0e, 0xfe, 0xdd, 0x12, 0xfe, 0xfc, 0x10, 0xfe, 0x28, 0x1c, 0x02, 0xfe, 0xa6, - 0x00, 0xfe, 0xd3, 0x12, 0x3b, 0x1f, 0xfe, 0xa6, 0x00, 0xca, 0xfe, 0x48, 0xf0, 0xfe, 0x8e, 0x02, - 0xfe, 0x49, 0xf0, 0xfe, 0xa8, 0x02, 0xfe, 0x4a, 0xf0, 0xfe, 0xc6, 0x02, 0xfe, 0x46, 0xf0, 0xfe, - 0x58, 0x02, 0xfe, 0x47, 0xf0, 0xfe, 0x5e, 0x02, 0xfe, 0x43, 0xf0, 0xfe, 0x4c, 0x02, 0xfe, 0x44, - 0xf0, 0xfe, 0x50, 0x02, 0xfe, 0x45, 0xf0, 0xfe, 0x54, 0x02, 0x18, 0x0a, 0x9b, 0x18, 0x05, 0x1f, - 0xae, 0x04, 0x30, 0xfe, 0x00, 0x1c, 0xf3, 0xfe, 0x02, 0x1c, 0xf2, 0xfe, 0x1e, 0x1c, 0xfe, 0xe9, - 0x10, 0x01, 0xfe, 0x34, 0x1a, 0xfe, 0xe7, 0x10, 0xfe, 0x06, 0xfc, 0xdc, 0x09, 0x78, 0x01, 0xb7, - 0x04, 0x30, 0x1b, 0x8e, 0x40, 0xaf, 0x01, 0xfe, 0x22, 0x10, 0x09, 0x78, 0x01, 0x7a, 0xfe, 0xbd, - 0x10, 0x09, 0x78, 0x01, 0x7a, 0xfe, 0xad, 0x10, 0xfe, 0x16, 0x1c, 0xfe, 0x58, 0x1c, 0x18, 0x05, - 0x1f, 0xae, 0x32, 0x25, 0x30, 0xfe, 0x3d, 0xf0, 0xfe, 0x0a, 0x02, 0x26, 0xfe, 0x9c, 0x02, 0xfe, - 0x5a, 0x1c, 0xfe, 0x12, 0x1c, 0xfe, 0x14, 0x1c, 0x1b, 0xfe, 0x30, 0x00, 0x40, 0xaf, 0x01, 0x9c, - 0x18, 0x05, 0x1f, 0xae, 0x04, 0xe7, 0x1d, 0x27, 0x07, 0x16, 0x2c, 0xfe, 0x69, 0x10, 0x18, 0x05, - 0x1f, 0xae, 0xfe, 0x04, 0xec, 0x27, 0x6f, 0x34, 0x1c, 0x27, 0xfe, 0x05, 0xf6, 0xdc, 0x01, 0xfe, - 0x66, 0x19, 0x0b, 0x59, 0x43, 0x3d, 0x11, 0x50, 0x58, 0xcd, 0x01, 0xfe, 0x9e, 0x18, 0x04, 0x30, - 0x09, 0x44, 0x01, 0x14, 0x07, 0x00, 0x2d, 0x01, 0x7c, 0xfe, 0x20, 0x10, 0x09, 0xb1, 0x01, 0x14, - 0xfe, 0x41, 0x58, 0x09, 0x44, 0x01, 0x14, 0xfe, 0x49, 0x54, 0x72, 0xfe, 0x14, 0x03, 0x01, 0xfe, - 0x9e, 0x18, 0x04, 0x30, 0x32, 0x6f, 0xfe, 0x02, 0xe8, 0x2b, 0xfe, 0xbf, 0x57, 0xfe, 0x9e, 0x43, - 0xfe, 0x77, 0x57, 0xfe, 0x27, 0xf0, 0xfe, 0xe4, 0x01, 0xfe, 0x07, 0x4b, 0xfe, 0x20, 0xf0, 0xb3, - 0xfe, 0x40, 0x1c, 0x25, 0xe9, 0xfe, 0x26, 0xf0, 0xfe, 0x66, 0x03, 0xfe, 0xa0, 0xf0, 0xfe, 0x54, - 0x03, 0xfe, 0x11, 0xf0, 0xb3, 0xb9, 0xfe, 0x9f, 0xf0, 0xfe, 0x74, 0x03, 0xfe, 0x46, 0x1c, 0x15, - 0xfe, 0x11, 0x00, 0x04, 0x69, 0x32, 0xfe, 0x48, 0x1c, 0xfe, 0x46, 0x1c, 0x22, 0x1d, 0xb0, 0xc2, - 0x1c, 0xb0, 0x09, 0x44, 0x01, 0x14, 0xc2, 0x82, 0x01, 0xfe, 0xd0, 0x18, 0x11, 0xdf, 0x25, 0xe9, - 0xfe, 0x01, 0xf0, 0xe9, 0xfe, 0x82, 0xf0, 0xfe, 0x9a, 0x03, 0xfe, 0x9c, 0x32, 0x11, 0xfe, 0xe4, - 0x00, 0x2a, 0xfe, 0xac, 0x03, 0x25, 0x39, 0x12, 0xfe, 0xbc, 0x03, 0x01, 0x47, 0xfe, 0x06, 0xf0, - 0xfe, 0xcc, 0x03, 0xa6, 0x99, 0xfe, 0x0a, 0xf0, 0xfe, 0x3e, 0x07, 0x04, 0x24, 0x02, 0x78, 0x1a, - 0x17, 0xfe, 0xee, 0x04, 0x1b, 0x5b, 0x01, 0x3c, 0x88, 0xfe, 0x6e, 0x02, 0x04, 0xe8, 0xfe, 0x46, - 0x1c, 0x32, 0x74, 0x19, 0xfe, 0x67, 0x1b, 0xfe, 0xbf, 0x57, 0xfe, 0x77, 0x57, 0xfe, 0x48, 0x1c, - 0x7e, 0x01, 0x9f, 0x7d, 0x09, 0x44, 0x01, 0x14, 0x07, 0x00, 0x17, 0xea, 0x09, 0xdf, 0x01, 0x14, - 0x81, 0x4b, 0x68, 0x86, 0x2b, 0x02, 0x78, 0x1a, 0xfe, 0x10, 0x12, 0x1b, 0x5b, 0x01, 0x3c, 0x88, - 0xfe, 0x6e, 0x02, 0x04, 0xe8, 0xd5, 0x92, 0xd6, 0x95, 0x25, 0x24, 0x2a, 0xfe, 0x44, 0x04, 0x12, - 0xfe, 0x40, 0x04, 0x75, 0xfe, 0xa0, 0x00, 0xfe, 0x9b, 0x57, 0xfe, 0x46, 0x12, 0x2e, 0xff, 0x02, - 0x00, 0x10, 0x01, 0x06, 0x12, 0xfe, 0xd8, 0x04, 0x2e, 0x01, 0x06, 0x12, 0x24, 0x23, 0x21, 0xec, - 0xfe, 0x4c, 0x44, 0xfe, 0x3c, 0x12, 0x4b, 0xfe, 0x44, 0x48, 0x0f, 0x2f, 0xfe, 0x4c, 0x54, 0x72, - 0xea, 0x6f, 0x86, 0x2b, 0xfe, 0x06, 0x80, 0xfe, 0x48, 0x47, 0xfe, 0x52, 0x13, 0x35, 0x07, 0x94, - 0xfe, 0x4a, 0x13, 0xfe, 0x18, 0x10, 0x0f, 0x2f, 0xfe, 0x4c, 0x54, 0x72, 0xea, 0xfe, 0x06, 0x80, - 0xfe, 0x48, 0x47, 0xfe, 0x38, 0x13, 0x35, 0x07, 0x94, 0xfe, 0x30, 0x13, 0x0b, 0x08, 0x38, 0xfe, - 0x1c, 0x12, 0x1b, 0x76, 0x0b, 0x08, 0x05, 0x48, 0x1b, 0xfe, 0x0d, 0x00, 0x01, 0x3c, 0x88, 0xfe, - 0x52, 0x0d, 0x04, 0x24, 0x2e, 0x11, 0xfe, 0xe6, 0x00, 0xfe, 0x1c, 0x90, 0xcc, 0x03, 0x1b, 0x76, - 0x01, 0x3c, 0x04, 0x30, 0xfe, 0x42, 0x5b, 0x74, 0x19, 0xfe, 0x46, 0x59, 0xfe, 0xbf, 0x57, 0xfe, - 0x77, 0x57, 0xfe, 0x87, 0x80, 0xce, 0x5d, 0x0b, 0x08, 0x0a, 0xfe, 0x84, 0x13, 0xfe, 0x20, 0x80, - 0x07, 0x19, 0xfe, 0x7c, 0x12, 0x36, 0x08, 0x05, 0xfe, 0x6c, 0x13, 0x02, 0xfe, 0xa2, 0x00, 0x1a, - 0x17, 0xfe, 0x84, 0x05, 0xce, 0x4e, 0x36, 0x08, 0x0a, 0xfe, 0x56, 0x13, 0x02, 0xfe, 0xa0, 0x00, - 0x1a, 0xfe, 0x4e, 0x12, 0x57, 0xff, 0x02, 0x00, 0x10, 0x2a, 0xfe, 0x3c, 0x05, 0x25, 0x39, 0xc7, - 0xff, 0x02, 0x00, 0x10, 0x2a, 0xfe, 0x4a, 0x05, 0x13, 0xfe, 0x9c, 0x05, 0x11, 0xfe, 0xe3, 0x00, - 0x22, 0x36, 0xfe, 0x4a, 0xf0, 0xfe, 0x6a, 0x05, 0xfe, 0x49, 0xf0, 0xfe, 0x64, 0x05, 0x6a, 0x29, - 0xfe, 0x21, 0x00, 0xb8, 0x29, 0xfe, 0x22, 0x00, 0x9b, 0x29, 0x43, 0xfe, 0x09, 0x48, 0xff, 0x02, - 0x00, 0x10, 0x2a, 0xfe, 0x7a, 0x05, 0x13, 0xfe, 0x9c, 0x05, 0xfe, 0xe2, 0x08, 0x36, 0x08, 0xfe, - 0x1c, 0x00, 0x48, 0x01, 0xa0, 0x29, 0x05, 0x1c, 0xe2, 0x40, 0xfe, 0x27, 0x01, 0x0b, 0x08, 0x38, - 0xfe, 0x22, 0x12, 0x3b, 0x01, 0x7b, 0x1b, 0x76, 0x0b, 0x08, 0x05, 0x48, 0x1b, 0xfe, 0x0d, 0x00, - 0x01, 0x3c, 0x88, 0xfe, 0x52, 0x0d, 0x04, 0x24, 0x02, 0xe4, 0x1a, 0xfe, 0xc6, 0x13, 0x02, 0xad, - 0x1a, 0xfe, 0x3e, 0x12, 0x02, 0x5e, 0x1a, 0xfe, 0x36, 0x13, 0x3b, 0x01, 0x7b, 0x13, 0xfe, 0x14, - 0x06, 0x09, 0x05, 0x36, 0x08, 0x20, 0xfe, 0x02, 0x12, 0x4a, 0x01, 0xfe, 0x62, 0x17, 0x12, 0xfe, - 0x0a, 0x06, 0x11, 0x79, 0x01, 0x47, 0x11, 0xe0, 0x02, 0x5e, 0x83, 0x0c, 0x5e, 0x02, 0x93, 0x1a, - 0xfe, 0x6e, 0x12, 0x02, 0x4f, 0x1a, 0xfe, 0x66, 0x13, 0x01, 0xbe, 0x07, 0x0e, 0x41, 0xfe, 0x34, - 0x06, 0x29, 0x0e, 0x01, 0xfe, 0x8e, 0x1b, 0xfe, 0x43, 0x48, 0x5a, 0x77, 0x0f, 0x51, 0xff, 0x02, - 0x00, 0x57, 0x4c, 0xa4, 0x1e, 0x34, 0x49, 0x5a, 0x42, 0x3b, 0x01, 0x7b, 0x13, 0xfe, 0x8a, 0x06, - 0x36, 0x08, 0x0e, 0xf6, 0x3e, 0x09, 0x8e, 0x01, 0xfe, 0x90, 0x17, 0x12, 0xfe, 0x80, 0x06, 0x11, - 0x79, 0x01, 0x47, 0x11, 0xe0, 0x02, 0x4f, 0x83, 0x0c, 0x4f, 0x18, 0x05, 0x01, 0x7b, 0xfe, 0xaa, - 0x10, 0x02, 0x67, 0x1a, 0xfe, 0x9a, 0x13, 0x3b, 0x01, 0x7b, 0x02, 0x93, 0x1a, 0xfe, 0x18, 0x12, - 0x36, 0x08, 0x0e, 0xf8, 0x01, 0xbe, 0x01, 0xfe, 0x8e, 0x1b, 0xfe, 0x43, 0x48, 0x5a, 0x77, 0xf0, - 0x3e, 0x09, 0x8e, 0x02, 0xad, 0x1a, 0xfe, 0x0e, 0x12, 0x36, 0x08, 0x20, 0x2d, 0xfe, 0x02, 0xf6, - 0x05, 0x6a, 0x70, 0x85, 0x00, 0x48, 0x5a, 0x42, 0x3b, 0x28, 0x8c, 0x49, 0xce, 0x0a, 0x13, 0xfe, - 0x36, 0x07, 0x01, 0xfe, 0xcc, 0x17, 0x12, 0xfe, 0x2c, 0x07, 0x22, 0x1c, 0x97, 0x11, 0x79, 0x01, - 0x47, 0x11, 0xe0, 0x1d, 0x97, 0x07, 0x05, 0xf7, 0x02, 0xe4, 0xfe, 0x58, 0x57, 0x0c, 0xe4, 0x04, - 0xfe, 0xce, 0x05, 0x02, 0x67, 0x83, 0x0c, 0x67, 0x18, 0x05, 0x01, 0x7b, 0xfe, 0x9c, 0x32, 0x6e, - 0x7e, 0x01, 0x9f, 0x7d, 0x11, 0xfe, 0xe2, 0x00, 0x2a, 0xeb, 0x25, 0x39, 0xfe, 0x0a, 0xf0, 0xfe, - 0x6a, 0x07, 0xa5, 0xfe, 0x20, 0x08, 0xfe, 0x06, 0xf0, 0xfe, 0x28, 0x08, 0xa6, 0x99, 0x04, 0x24, - 0x0b, 0x08, 0x0a, 0xfe, 0x2e, 0x12, 0x10, 0x19, 0x01, 0x06, 0x10, 0x00, 0x01, 0x06, 0x10, 0x00, - 0x01, 0x06, 0x10, 0x00, 0x01, 0x06, 0xfe, 0x99, 0xa4, 0x01, 0x06, 0x10, 0x00, 0x04, 0xfe, 0xf6, - 0x08, 0x84, 0x08, 0x0e, 0xfe, 0x38, 0x12, 0x0b, 0x08, 0x0e, 0xfe, 0x30, 0x13, 0x10, 0xfe, 0x1b, - 0x00, 0x01, 0x06, 0x10, 0x00, 0x01, 0x06, 0x10, 0x00, 0x01, 0x06, 0x10, 0x00, 0x01, 0x06, 0x10, - 0x05, 0x01, 0x06, 0x10, 0x00, 0x04, 0xee, 0x73, 0x43, 0x70, 0x4a, 0xfe, 0x9a, 0x81, 0x28, 0x38, - 0x41, 0xfe, 0xf6, 0x07, 0x09, 0x38, 0xfe, 0x09, 0x6f, 0xc5, 0xfe, 0xca, 0x45, 0xfe, 0x32, 0x12, - 0x4d, 0x5b, 0x49, 0x73, 0x90, 0x2a, 0xfe, 0x08, 0x08, 0x25, 0x39, 0xfe, 0x0a, 0xf0, 0xfe, 0xf6, - 0x07, 0xa6, 0x99, 0xa5, 0xfe, 0x20, 0x08, 0x04, 0x24, 0x01, 0x47, 0x04, 0xeb, 0x10, 0x20, 0x04, - 0xeb, 0xfe, 0x9c, 0xf7, 0x98, 0xfe, 0x2c, 0x90, 0xfe, 0xae, 0x90, 0x87, 0xfe, 0x8e, 0x08, 0x0c, - 0x62, 0x1f, 0x63, 0x0b, 0x59, 0x4e, 0x3d, 0x1d, 0x27, 0x07, 0x16, 0xfe, 0x0e, 0x12, 0x81, 0xfe, - 0x80, 0x80, 0x40, 0x27, 0x71, 0x2b, 0xf0, 0xfe, 0x83, 0xe7, 0xfe, 0x3f, 0x00, 0xb8, 0xfe, 0x03, - 0x40, 0x0b, 0x59, 0x5d, 0x3d, 0x01, 0xbd, 0xc3, 0xfe, 0x1f, 0x40, 0x1c, 0x66, 0x01, 0xbb, 0xfe, - 0x08, 0x50, 0xfe, 0x8a, 0x50, 0xfe, 0x44, 0x51, 0xfe, 0xc6, 0x51, 0x6a, 0xfe, 0x08, 0x90, 0xfe, - 0x8a, 0x90, 0x0c, 0x60, 0x1f, 0x61, 0xfe, 0x0c, 0x90, 0xfe, 0x8e, 0x90, 0xfe, 0x40, 0x50, 0xfe, - 0xc2, 0x50, 0x0c, 0x45, 0x1f, 0x46, 0xfe, 0x4a, 0x10, 0x0b, 0x08, 0x4e, 0xfe, 0x2a, 0x12, 0xfe, - 0x2c, 0x90, 0xfe, 0xae, 0x90, 0x0c, 0x62, 0x1f, 0x63, 0x0b, 0x08, 0x5d, 0x49, 0x01, 0xbd, 0xfe, - 0x1f, 0x80, 0x1c, 0x66, 0xfe, 0x44, 0x90, 0xfe, 0xc6, 0x90, 0x0c, 0x64, 0x1f, 0x65, 0xfe, 0x08, - 0x90, 0xfe, 0x8a, 0x90, 0x0c, 0x60, 0x1f, 0x61, 0xfe, 0x40, 0x90, 0xfe, 0xc2, 0x90, 0x0c, 0x45, - 0x1f, 0x46, 0x0c, 0x5c, 0x1f, 0x2f, 0x0b, 0x59, 0x20, 0x3d, 0x32, 0x0f, 0xfe, 0x4e, 0x11, 0x2a, - 0xfe, 0x0c, 0x09, 0xfe, 0x9e, 0xf0, 0xfe, 0x20, 0x09, 0xfe, 0x01, 0x48, 0x17, 0x39, 0x32, 0x80, - 0xf2, 0xd2, 0xfe, 0x4c, 0x09, 0xd3, 0xfe, 0x6a, 0x09, 0xd0, 0xfe, 0x4c, 0x09, 0xd1, 0xfe, 0x6a, - 0x09, 0xa5, 0xfe, 0x40, 0x09, 0xfe, 0x06, 0xf0, 0xfe, 0x46, 0x09, 0xa6, 0x99, 0x04, 0x24, 0x01, - 0x47, 0xfe, 0xc1, 0x10, 0x10, 0x20, 0xfe, 0xc1, 0x10, 0x84, 0x08, 0x05, 0xfe, 0x10, 0x12, 0x84, - 0x08, 0x0a, 0x55, 0x0b, 0x08, 0x0a, 0xfe, 0x70, 0x12, 0xfe, 0x2e, 0x1c, 0x04, 0xfe, 0xf8, 0x0a, - 0x84, 0x08, 0x05, 0x55, 0x84, 0x08, 0x0a, 0xfe, 0x5a, 0x12, 0xfe, 0x2c, 0x1c, 0xfe, 0xaa, 0xf0, - 0xfe, 0xf2, 0x09, 0xfe, 0xac, 0xf0, 0xfe, 0x8a, 0x09, 0xfe, 0x92, 0x10, 0xc0, 0xf4, 0xfe, 0xad, - 0xf0, 0xfe, 0x96, 0x09, 0x04, 0xfe, 0xf8, 0x0a, 0xc1, 0xfe, 0xe7, 0x10, 0xfe, 0x2b, 0xf0, 0xb6, - 0xfe, 0x6b, 0x18, 0x1e, 0xfe, 0x00, 0xfe, 0xfe, 0x1c, 0x12, 0xca, 0xfe, 0xd2, 0xf0, 0xb6, 0xfe, - 0x76, 0x18, 0x1e, 0x19, 0x17, 0xb6, 0x02, 0xe1, 0x1e, 0x05, 0x17, 0xb6, 0xd2, 0x54, 0xd3, 0x54, - 0xd0, 0x54, 0xd1, 0x54, 0xc0, 0xc1, 0xfe, 0xa9, 0x10, 0x7e, 0x57, 0x2e, 0x1b, 0x76, 0x01, 0x3c, - 0x15, 0xfe, 0x35, 0x00, 0xfe, 0x01, 0xf0, 0x69, 0x15, 0x91, 0x04, 0x69, 0xfe, 0x74, 0x18, 0x1e, - 0xfe, 0x00, 0xf8, 0x17, 0x54, 0x74, 0x0e, 0x01, 0xfe, 0x18, 0x0e, 0x48, 0x01, 0xfe, 0x9e, 0x18, - 0x1d, 0x2b, 0x81, 0x74, 0x19, 0x04, 0x54, 0xfe, 0x98, 0x80, 0xfe, 0x19, 0xe4, 0x0a, 0x26, 0xfe, - 0xda, 0x0a, 0x0b, 0x08, 0x4e, 0xfe, 0x82, 0x12, 0x0b, 0x08, 0x20, 0xfe, 0x66, 0x13, 0x1d, 0x66, - 0xc2, 0xfe, 0x03, 0xa1, 0xfe, 0x83, 0x80, 0xfe, 0xc8, 0x44, 0xfe, 0x2e, 0x13, 0xfe, 0x04, 0x91, - 0xfe, 0x86, 0x91, 0x71, 0x2b, 0xfe, 0x40, 0x59, 0xfe, 0xc1, 0x59, 0x87, 0xed, 0x02, 0x62, 0x37, - 0x63, 0x0c, 0x90, 0x1f, 0x91, 0xd7, 0x62, 0xd8, 0x63, 0x01, 0xbd, 0xc3, 0x71, 0x2b, 0x1c, 0x66, - 0xd9, 0x5c, 0xda, 0x2f, 0x8a, 0x64, 0x75, 0x65, 0xfe, 0x44, 0x55, 0xfe, 0xe5, 0x55, 0xfe, 0x04, - 0xfa, 0x5c, 0xfe, 0x05, 0xfa, 0x2f, 0x01, 0xbb, 0xfe, 0x36, 0x10, 0x22, 0x0c, 0x90, 0x0c, 0x91, - 0x8a, 0x64, 0x75, 0x65, 0x9c, 0x0b, 0x08, 0x20, 0x17, 0xed, 0x8a, 0x45, 0x75, 0x46, 0x0b, 0x08, - 0xfe, 0xf7, 0x00, 0x3d, 0x02, 0x60, 0x37, 0x61, 0xfe, 0x10, 0x58, 0xfe, 0x91, 0x58, 0xfe, 0x14, - 0x59, 0xfe, 0x95, 0x59, 0x04, 0x54, 0x0b, 0x08, 0x20, 0x17, 0xed, 0x0b, 0x08, 0xfe, 0xf7, 0x00, - 0x3d, 0x70, 0xfe, 0x19, 0x81, 0x4a, 0xfe, 0x10, 0x90, 0xfe, 0x92, 0x90, 0xfe, 0xd7, 0x10, 0x35, - 0x07, 0xb2, 0x17, 0xfe, 0x92, 0x09, 0x11, 0xb2, 0xfe, 0x98, 0x80, 0xfe, 0x19, 0xe4, 0x0a, 0xfe, - 0x14, 0x13, 0x02, 0x45, 0x37, 0x46, 0x87, 0xfe, 0x92, 0x09, 0xfe, 0x0c, 0x58, 0xfe, 0x8d, 0x58, - 0x04, 0x54, 0x22, 0x3b, 0xfe, 0x19, 0x80, 0xf3, 0x0b, 0x08, 0x0a, 0xfe, 0x1a, 0x12, 0xfe, 0x6c, - 0x19, 0xfe, 0x19, 0x41, 0xfe, 0x6b, 0x18, 0xca, 0xfe, 0xd1, 0xf0, 0xee, 0x1b, 0x8b, 0x01, 0x3c, - 0x15, 0xfe, 0x44, 0x00, 0xfe, 0x8e, 0x10, 0xfe, 0x6c, 0x19, 0xd7, 0x45, 0xfe, 0xed, 0x19, 0xd8, - 0x46, 0xfe, 0x0c, 0x51, 0xfe, 0x8e, 0x51, 0xfe, 0x6b, 0x18, 0x1e, 0xfe, 0x00, 0xff, 0x2c, 0xfe, - 0x74, 0x10, 0xca, 0xfe, 0xd2, 0xf0, 0xfe, 0x86, 0x0b, 0xfe, 0x76, 0x18, 0x1e, 0x19, 0x56, 0x02, - 0xe1, 0x1e, 0x05, 0xfe, 0x08, 0x13, 0x15, 0xfe, 0x16, 0x00, 0x04, 0x69, 0xfe, 0xd1, 0xf0, 0xfe, - 0x98, 0x0b, 0x1b, 0x8b, 0x01, 0x3c, 0x15, 0xfe, 0x17, 0x00, 0xfe, 0x42, 0x10, 0xfe, 0xce, 0xf0, - 0xfe, 0x9e, 0x0b, 0xfe, 0x3c, 0x10, 0xfe, 0xcd, 0xf0, 0xfe, 0xaa, 0x0b, 0x15, 0xfe, 0x22, 0x00, - 0x04, 0x69, 0xfe, 0xcb, 0xf0, 0xfe, 0xb6, 0x0b, 0x15, 0xfe, 0x24, 0x00, 0x04, 0x69, 0xfe, 0xd0, - 0xf0, 0xfe, 0xc0, 0x0b, 0x15, 0x8d, 0xf1, 0xfe, 0xcf, 0xf0, 0xfe, 0xca, 0x0b, 0x15, 0x43, 0xfe, - 0x10, 0x10, 0xfe, 0xcc, 0xf0, 0xee, 0xfe, 0x84, 0x80, 0xfe, 0x19, 0xe4, 0x20, 0x48, 0x15, 0xfe, - 0x12, 0x00, 0x32, 0x0f, 0xfe, 0x4e, 0x11, 0x2a, 0xfe, 0xe0, 0x0b, 0xfe, 0x9e, 0xf0, 0xfe, 0xf4, - 0x0b, 0xfe, 0x01, 0x48, 0x17, 0x39, 0x32, 0x80, 0xf2, 0xd2, 0x24, 0xd3, 0x24, 0xd0, 0x24, 0xd1, - 0x24, 0x32, 0xfe, 0x9c, 0x32, 0x2a, 0xfe, 0x08, 0x0c, 0x25, 0x39, 0xa5, 0xfe, 0x2c, 0x0c, 0xa6, - 0x99, 0xd2, 0x98, 0xd3, 0x98, 0xd0, 0x98, 0xd1, 0x98, 0x04, 0x24, 0x01, 0x47, 0xfe, 0xd3, 0x10, - 0x11, 0xfe, 0xe8, 0x00, 0xc0, 0xc1, 0x7e, 0xd5, 0x92, 0xd6, 0x95, 0xfe, 0x89, 0xf0, 0x24, 0x23, - 0x21, 0xb5, 0xd5, 0x92, 0xd6, 0x95, 0x2a, 0xfe, 0x56, 0x0c, 0x12, 0x24, 0x23, 0x21, 0xb4, 0xfe, - 0x01, 0x48, 0x55, 0x15, 0xfe, 0x42, 0x00, 0x04, 0x69, 0x89, 0x05, 0xfe, 0x81, 0x49, 0xfe, 0xa2, - 0x12, 0x0b, 0x08, 0x0a, 0xfe, 0x44, 0x13, 0x15, 0x00, 0x28, 0x0a, 0xfe, 0x54, 0x12, 0x28, 0xfe, - 0x28, 0x00, 0x26, 0xfe, 0x88, 0x0d, 0x09, 0x44, 0x01, 0x14, 0x07, 0x00, 0x2d, 0x3f, 0xfe, 0x28, - 0x00, 0xfe, 0xe2, 0x10, 0x01, 0xfe, 0xd6, 0x1a, 0x01, 0xfe, 0xe2, 0x1a, 0x09, 0xb1, 0x01, 0xfe, - 0xf2, 0x0e, 0x68, 0x11, 0x50, 0x01, 0x7c, 0x04, 0x30, 0x15, 0xfe, 0x44, 0x00, 0x28, 0x0a, 0xf6, - 0x3f, 0x0a, 0xfe, 0xb4, 0x10, 0x01, 0xa0, 0x3f, 0x0a, 0xfe, 0xaa, 0x10, 0x01, 0xa0, 0xfe, 0x19, - 0x82, 0xfe, 0x34, 0x46, 0x9e, 0x3f, 0x0a, 0x15, 0xfe, 0x43, 0x00, 0xfe, 0x96, 0x10, 0x0b, 0x59, - 0x0a, 0x3d, 0x01, 0xfe, 0xd6, 0x1a, 0x01, 0xfe, 0xe2, 0x1a, 0x68, 0x11, 0x50, 0x01, 0x7c, 0x74, - 0x0a, 0x68, 0x58, 0xcd, 0x04, 0xfe, 0x3a, 0x03, 0x0b, 0x08, 0x0a, 0x56, 0x3f, 0x0a, 0x15, 0x00, - 0xfe, 0x5c, 0x10, 0x84, 0x08, 0x0e, 0xfe, 0x58, 0x12, 0x0b, 0x08, 0x0e, 0xfe, 0x50, 0x13, 0xfe, - 0x1c, 0x1c, 0xfe, 0x9d, 0xf0, 0xfe, 0x3e, 0x0d, 0xfe, 0x1c, 0x1c, 0xfe, 0x9d, 0xf0, 0xfe, 0x44, - 0x0d, 0x0b, 0x59, 0x0e, 0x3d, 0xfe, 0xa9, 0x10, 0x15, 0xfe, 0x15, 0x00, 0xfe, 0x04, 0xe6, 0x0a, - 0x4a, 0xfe, 0x2e, 0x10, 0x15, 0xfe, 0x13, 0x00, 0xfe, 0x10, 0x10, 0x15, 0xfe, 0x47, 0x00, 0xb8, - 0x15, 0xfe, 0x41, 0x00, 0x9b, 0x15, 0xfe, 0x24, 0x00, 0x7d, 0xc0, 0xc1, 0x7e, 0x02, 0x78, 0x1a, - 0x26, 0xe8, 0x4a, 0xfe, 0x04, 0xe6, 0x0e, 0xfe, 0x9d, 0x41, 0xfe, 0x1c, 0x42, 0x68, 0x01, 0xef, - 0x04, 0x30, 0xfe, 0x12, 0x1c, 0x1b, 0x0a, 0x40, 0xac, 0xbf, 0x1b, 0xfe, 0x31, 0x00, 0x40, 0xaf, - 0x01, 0x9c, 0x04, 0xe7, 0x58, 0xfe, 0x06, 0xec, 0xde, 0xfe, 0x0e, 0x47, 0x3f, 0x38, 0xfe, 0xce, - 0x45, 0x2c, 0x58, 0xfe, 0x06, 0xea, 0xde, 0xfe, 0x47, 0x4b, 0x3e, 0xfe, 0x75, 0x57, 0x02, 0x5f, - 0xfe, 0x98, 0x56, 0xfe, 0x2a, 0x12, 0x09, 0x44, 0x01, 0x14, 0x3b, 0xfe, 0x41, 0x58, 0x09, 0xb1, - 0xfe, 0xfc, 0x14, 0xfe, 0x49, 0x54, 0xa7, 0xfe, 0xfe, 0x0d, 0x09, 0x53, 0xfe, 0xf0, 0x14, 0xfe, - 0x44, 0x48, 0x04, 0xfe, 0x3a, 0x03, 0x09, 0x5f, 0xfe, 0xda, 0x14, 0xfe, 0x0e, 0x47, 0x3f, 0x38, - 0xfe, 0xce, 0x45, 0x2c, 0x58, 0xfe, 0xce, 0x47, 0xfe, 0xbb, 0x13, 0x04, 0x30, 0x1d, 0x27, 0x07, - 0x16, 0xfe, 0x92, 0x12, 0x22, 0x1c, 0x8f, 0x1c, 0xe5, 0xfe, 0x08, 0x1c, 0xfe, 0x7c, 0x19, 0xfe, - 0xfd, 0x19, 0xfe, 0x0a, 0x1c, 0x02, 0xe3, 0xfe, 0x48, 0x55, 0x9e, 0x37, 0xfe, 0x62, 0x01, 0xfe, - 0xc9, 0x55, 0x2c, 0xfe, 0x6e, 0x10, 0x01, 0xfe, 0xf6, 0x18, 0x02, 0xfe, 0x38, 0x01, 0x37, 0xfe, - 0x3a, 0x01, 0x87, 0xfe, 0xb8, 0x0e, 0xfe, 0x02, 0xec, 0xe5, 0x4d, 0x00, 0x2d, 0xfe, 0x04, 0xec, - 0x27, 0x6f, 0xfe, 0x05, 0xf6, 0xfe, 0x34, 0x01, 0x01, 0xfe, 0x66, 0x19, 0xfe, 0x08, 0x90, 0xa9, - 0x0d, 0xfe, 0x18, 0x13, 0xc5, 0xfe, 0x02, 0xea, 0xe5, 0x4d, 0x8b, 0xfe, 0xc5, 0x13, 0x1b, 0x0e, - 0x40, 0xac, 0xbf, 0xfe, 0x26, 0x10, 0x02, 0xfe, 0x38, 0x01, 0x1e, 0xfe, 0xf0, 0xff, 0x0c, 0xe3, - 0x02, 0xfe, 0x3a, 0x01, 0x0c, 0xfe, 0x62, 0x01, 0x34, 0x1c, 0x27, 0x11, 0x50, 0xcd, 0x0f, 0x05, - 0x03, 0x22, 0x03, 0x1d, 0x8f, 0xc2, 0x1c, 0x8f, 0x07, 0x8b, 0xfe, 0x7f, 0x13, 0x1b, 0x19, 0x40, - 0xac, 0xbf, 0xfe, 0xe1, 0x10, 0xcb, 0xfe, 0x03, 0xdc, 0xfe, 0x73, 0x57, 0xfe, 0x80, 0x5d, 0x03, - 0xcb, 0xfe, 0x03, 0xdc, 0xfe, 0x5b, 0x57, 0xfe, 0x80, 0x5d, 0x03, 0xfe, 0x03, 0x57, 0xcb, 0x22, - 0xfe, 0x00, 0xcc, 0x03, 0xfe, 0x03, 0x57, 0xcb, 0x82, 0x03, 0x0b, 0x08, 0x43, 0xfe, 0x22, 0x13, - 0xfe, 0x1c, 0x80, 0x07, 0x05, 0xfe, 0x1a, 0x13, 0xfe, 0x1e, 0x80, 0xf9, 0xfe, 0x1d, 0x80, 0xba, - 0xfe, 0x0c, 0x90, 0xf7, 0xfe, 0x0e, 0x90, 0x9e, 0xfe, 0x3c, 0x90, 0xfe, 0x30, 0xf4, 0x0a, 0xfe, - 0x3c, 0x50, 0x9b, 0x01, 0xfe, 0x96, 0x19, 0x35, 0x07, 0x50, 0x2d, 0x01, 0xfe, 0xd0, 0x18, 0xfe, - 0x08, 0x10, 0x01, 0xfe, 0xd6, 0x1a, 0x01, 0xfe, 0xe2, 0x1a, 0x11, 0xfe, 0xe9, 0x00, 0x0b, 0x08, - 0x43, 0xfe, 0x2c, 0x13, 0x01, 0xfe, 0x28, 0x19, 0xfe, 0x1e, 0x1c, 0xfe, 0x14, 0x90, 0x0c, 0xfe, - 0x64, 0x01, 0xfe, 0x16, 0x90, 0x0c, 0xfe, 0x66, 0x01, 0x0b, 0x08, 0x5d, 0xfe, 0x12, 0x12, 0xfe, - 0x03, 0x80, 0x81, 0xfe, 0x01, 0xec, 0x27, 0xfe, 0x80, 0x40, 0x1c, 0x27, 0x71, 0x2b, 0x11, 0xdd, - 0x68, 0x1d, 0x27, 0xfe, 0x00, 0x40, 0x86, 0x27, 0x03, 0xfe, 0x08, 0x1c, 0x02, 0xfe, 0xac, 0x00, - 0xfe, 0x06, 0x58, 0x02, 0xfe, 0xae, 0x00, 0xfe, 0x07, 0x58, 0x02, 0xfe, 0xb0, 0x00, 0xfe, 0x08, - 0x58, 0x02, 0xfe, 0xb2, 0x00, 0xfe, 0x09, 0x58, 0xfe, 0x0a, 0x1c, 0x29, 0x42, 0x1c, 0xde, 0x22, - 0x0c, 0x5e, 0x0c, 0x4f, 0x0c, 0x67, 0x0f, 0x44, 0x4c, 0x4a, 0x18, 0x38, 0xfe, 0x90, 0x4d, 0xfe, - 0x91, 0x54, 0x26, 0xfe, 0xc6, 0x0f, 0x3f, 0x16, 0x0f, 0x53, 0x4c, 0x18, 0x43, 0xfe, 0x90, 0x4d, - 0xfe, 0x91, 0x54, 0x26, 0xfe, 0xdc, 0x0f, 0x29, 0x16, 0x1c, 0x27, 0x89, 0x2f, 0x6f, 0x1d, 0x27, - 0xfe, 0x00, 0x40, 0x86, 0x27, 0x11, 0xdd, 0xfe, 0x14, 0x56, 0xfe, 0xd6, 0xf0, 0xfe, 0xf0, 0x0f, - 0xfe, 0x12, 0x1c, 0x7e, 0xfe, 0x14, 0x1c, 0xfe, 0x10, 0x1c, 0xfe, 0x18, 0x1c, 0x03, 0x58, 0xfe, - 0x0c, 0x14, 0xfe, 0x0e, 0x47, 0xfe, 0x07, 0xe6, 0x38, 0xfe, 0xce, 0x47, 0xfe, 0xf5, 0x13, 0x03, - 0x01, 0xa0, 0x89, 0x2f, 0x6f, 0xfe, 0x06, 0x80, 0xfe, 0x48, 0x47, 0xfe, 0x42, 0x13, 0x35, 0x07, - 0x50, 0xfe, 0x34, 0x13, 0x09, 0x53, 0x01, 0x14, 0xc6, 0xfe, 0x36, 0x12, 0xfe, 0x41, 0x48, 0xfe, - 0x45, 0x48, 0x01, 0xfb, 0xfe, 0x00, 0xcc, 0xc6, 0xfe, 0xf3, 0x13, 0x34, 0x82, 0x07, 0x16, 0x9e, - 0x09, 0x96, 0x01, 0x14, 0xfe, 0x80, 0x5c, 0x01, 0x7c, 0xb9, 0x07, 0x94, 0x55, 0xfe, 0x14, 0x56, - 0xfe, 0xd6, 0xf0, 0xfe, 0x2a, 0x10, 0x03, 0xfe, 0x44, 0x58, 0x81, 0xfe, 0x01, 0xec, 0xaf, 0xfe, - 0x9e, 0x40, 0xfe, 0x9d, 0xe7, 0x00, 0xfe, 0x9c, 0xe7, 0x0e, 0x86, 0x2b, 0x01, 0xef, 0xfe, 0xdd, - 0x10, 0x32, 0xd5, 0x92, 0xd6, 0x95, 0x23, 0x21, 0xec, 0x07, 0x0e, 0xfe, 0x48, 0x12, 0x07, 0x0a, - 0xfe, 0x56, 0x12, 0x07, 0x19, 0xfe, 0x30, 0x12, 0x07, 0xdb, 0x17, 0xfe, 0xfc, 0x11, 0x07, 0xfe, - 0x23, 0x00, 0x17, 0x55, 0x07, 0x05, 0x17, 0xfe, 0x66, 0x12, 0x07, 0x20, 0xfe, 0x12, 0x12, 0x07, - 0x00, 0x17, 0x24, 0x1b, 0xdb, 0x01, 0x3c, 0x9a, 0x2e, 0x01, 0x06, 0xa5, 0x47, 0x03, 0x2e, 0xfe, - 0x62, 0x08, 0x09, 0xdf, 0x01, 0xfe, 0xf2, 0x0e, 0x11, 0x94, 0x04, 0x30, 0x2e, 0x35, 0x07, 0xb2, - 0xfe, 0xd9, 0x13, 0x8a, 0x45, 0x75, 0x46, 0x87, 0xfe, 0xba, 0x11, 0x0b, 0x08, 0x4e, 0xfe, 0x72, - 0x12, 0xd9, 0x5c, 0xda, 0x2f, 0xfe, 0x44, 0x55, 0xfe, 0xe5, 0x55, 0xa7, 0xfe, 0x84, 0x11, 0x1d, - 0x66, 0xfe, 0x26, 0x13, 0x02, 0x90, 0x37, 0x91, 0x87, 0xfe, 0x64, 0x0d, 0x0c, 0x62, 0x1f, 0x63, - 0x22, 0x0c, 0x90, 0x0c, 0x91, 0x01, 0xbd, 0x29, 0x42, 0x80, 0x1c, 0x66, 0x01, 0xbb, 0xd9, 0x5c, - 0xda, 0x2f, 0xfe, 0x04, 0x55, 0xfe, 0xa5, 0x55, 0xfe, 0x04, 0xfa, 0x5c, 0xfe, 0x05, 0xfa, 0x2f, - 0xfe, 0x91, 0x10, 0x02, 0x64, 0x37, 0x65, 0xfe, 0x40, 0x56, 0xfe, 0xe1, 0x56, 0x0c, 0x64, 0x1f, - 0x65, 0x6a, 0xd9, 0x5c, 0xda, 0x2f, 0xfe, 0x44, 0x55, 0xfe, 0xe5, 0x55, 0x02, 0x60, 0x37, 0x61, - 0xfe, 0x00, 0x56, 0xfe, 0xa1, 0x56, 0x0c, 0x60, 0x1f, 0x61, 0x0b, 0x08, 0x4e, 0xfe, 0x1e, 0x12, - 0x1d, 0x66, 0xfe, 0x1f, 0x40, 0x02, 0x62, 0x37, 0x63, 0xfe, 0x2c, 0x50, 0xfe, 0xae, 0x50, 0x02, - 0x64, 0x37, 0x65, 0xfe, 0x44, 0x50, 0xfe, 0xc6, 0x50, 0x02, 0x60, 0x37, 0x61, 0xfe, 0x08, 0x50, - 0xfe, 0x8a, 0x50, 0x02, 0x45, 0x37, 0x46, 0xfe, 0x40, 0x50, 0xfe, 0xc2, 0x50, 0x04, 0x6c, 0x29, - 0x05, 0x1c, 0x97, 0x04, 0x6b, 0x2e, 0x01, 0x06, 0x12, 0x3a, 0x23, 0x21, 0xec, 0x07, 0x05, 0x26, - 0x3a, 0x35, 0x07, 0xb2, 0x26, 0x6b, 0x01, 0x9f, 0x1e, 0x34, 0x17, 0x3a, 0x0b, 0x08, 0x0a, 0xfa, - 0x8a, 0x45, 0x75, 0x46, 0xfe, 0x0a, 0x55, 0x2c, 0xfe, 0x8b, 0x55, 0xd7, 0x45, 0xd8, 0x46, 0xfe, - 0x0c, 0x51, 0xfe, 0x8e, 0x51, 0x04, 0x6b, 0xfe, 0x19, 0x81, 0xc5, 0xfe, 0x19, 0x41, 0x04, 0x6b, - 0x2e, 0x01, 0x06, 0x25, 0x39, 0x12, 0xf5, 0x23, 0x21, 0xb5, 0x28, 0x19, 0xfe, 0xb2, 0x12, 0x28, - 0x0a, 0x9d, 0x28, 0x76, 0x17, 0xfe, 0x92, 0x13, 0x04, 0x3a, 0x01, 0x06, 0x25, 0x39, 0x12, 0xf5, - 0x23, 0x21, 0xb4, 0x07, 0x19, 0x26, 0x3a, 0x01, 0x06, 0x12, 0xf5, 0x23, 0x21, 0xfe, 0xe8, 0x09, - 0xfe, 0xc2, 0x49, 0x4b, 0x02, 0xad, 0x1a, 0x56, 0x36, 0x08, 0x20, 0x2c, 0x9a, 0xfe, 0xbb, 0x45, - 0x28, 0x00, 0x55, 0x3f, 0x05, 0x89, 0x34, 0x01, 0xfe, 0x22, 0x14, 0x01, 0x9f, 0x7d, 0xfe, 0x4b, - 0x45, 0xfa, 0x35, 0x07, 0x79, 0xf9, 0x02, 0x93, 0x1a, 0x56, 0x02, 0x4f, 0x1a, 0x2c, 0x57, 0x04, - 0x6b, 0xfe, 0xc0, 0x5d, 0x01, 0xa0, 0xfe, 0x03, 0x17, 0x02, 0x5e, 0x83, 0x0c, 0x5e, 0x57, 0x2e, - 0x01, 0x06, 0x13, 0x6c, 0x01, 0xfe, 0x62, 0x17, 0x04, 0x6c, 0x01, 0x06, 0x25, 0x39, 0x12, 0x3a, - 0x23, 0x21, 0xb4, 0x07, 0x05, 0x26, 0x3a, 0x01, 0xfe, 0xd0, 0x14, 0xfe, 0x42, 0x58, 0xfe, 0xe4, - 0x14, 0x01, 0x9f, 0x7d, 0xfe, 0x4a, 0xf4, 0x0a, 0x17, 0x3a, 0xfe, 0x4a, 0xf4, 0x05, 0x9d, 0x35, - 0x07, 0x79, 0x49, 0x04, 0x6b, 0x02, 0x4f, 0x83, 0x0c, 0x4f, 0x57, 0x2e, 0x01, 0x06, 0x13, 0x6c, - 0x01, 0xfe, 0x90, 0x17, 0x04, 0x6c, 0x01, 0x06, 0x25, 0x39, 0x12, 0x3a, 0x23, 0x21, 0xb4, 0x07, - 0x0e, 0x26, 0x3a, 0x01, 0xfe, 0xf8, 0x15, 0xcc, 0xfe, 0xa8, 0x14, 0xfe, 0xb4, 0x14, 0x7d, 0xfe, - 0x00, 0x17, 0xa9, 0x0a, 0x17, 0x3a, 0xa9, 0x05, 0x9d, 0x35, 0x07, 0x79, 0x49, 0x04, 0x6b, 0x02, - 0x67, 0x83, 0x0c, 0x67, 0x57, 0x2e, 0x01, 0x06, 0x13, 0x6c, 0x01, 0xfe, 0xcc, 0x17, 0x04, 0x6c, - 0x0f, 0x05, 0x2a, 0xfe, 0xf6, 0x13, 0x13, 0xfe, 0x0c, 0x14, 0x6e, 0xc7, 0x01, 0x06, 0x22, 0x6e, - 0x03, 0x88, 0xfe, 0x08, 0x14, 0x25, 0xfe, 0x08, 0x14, 0x12, 0xfe, 0xf6, 0x13, 0x57, 0x2e, 0x01, - 0x06, 0xfe, 0xd5, 0x10, 0x0f, 0x51, 0xff, 0x02, 0x00, 0x57, 0x4c, 0xa4, 0x1e, 0xfe, 0xff, 0x7f, - 0xfe, 0x30, 0x56, 0xfe, 0x00, 0x5c, 0x03, 0x0f, 0x51, 0xff, 0x02, 0x00, 0x57, 0x4c, 0xa4, 0x1e, - 0x34, 0xfe, 0x30, 0x56, 0xfe, 0x00, 0x5c, 0x03, 0x0f, 0x51, 0xff, 0x02, 0x00, 0x57, 0x4c, 0xa4, - 0x03, 0x0f, 0x51, 0xff, 0x02, 0x00, 0x57, 0x4c, 0xfe, 0x00, 0x5e, 0x03, 0x0f, 0x51, 0xff, 0x02, - 0x00, 0x57, 0x4c, 0xa4, 0xfe, 0x0b, 0x58, 0x03, 0x09, 0x5e, 0x01, 0x7a, 0x09, 0x4f, 0x01, 0x7a, - 0x09, 0x67, 0x01, 0x7a, 0x03, 0xfe, 0x03, 0xa1, 0x1e, 0x16, 0xff, 0x03, 0x00, 0x54, 0xfe, 0x00, - 0xf4, 0x20, 0x4c, 0xfe, 0x00, 0x7d, 0xfe, 0x01, 0x7d, 0xfe, 0x02, 0x7d, 0xfe, 0x03, 0x7c, 0x71, - 0x2b, 0x0c, 0x60, 0x1f, 0x61, 0xd7, 0x64, 0xd8, 0x65, 0x03, 0xfe, 0x62, 0x08, 0xfe, 0x82, 0x4a, - 0xfe, 0xe1, 0x1a, 0xfe, 0x83, 0x5a, 0x81, 0x03, 0x01, 0xbe, 0xfe, 0x42, 0x48, 0x4a, 0x4b, 0x3e, - 0x01, 0x06, 0x12, 0xfe, 0xf0, 0x15, 0x23, 0x21, 0xb5, 0x01, 0x06, 0x12, 0xfe, 0xf0, 0x15, 0x23, - 0x21, 0xfe, 0xe8, 0x0a, 0xfe, 0xc1, 0x59, 0x02, 0x93, 0x1a, 0xfe, 0xd8, 0x12, 0x36, 0x08, 0x0e, - 0xfe, 0xd0, 0x13, 0x22, 0x4d, 0x0e, 0x41, 0xfe, 0x18, 0x15, 0xcf, 0x0e, 0x4d, 0x0e, 0xfa, 0x28, - 0xab, 0x72, 0xfe, 0x36, 0x15, 0x48, 0x0f, 0x05, 0x18, 0xab, 0x89, 0x31, 0xfe, 0x78, 0x10, 0xff, - 0x02, 0x83, 0x55, 0xb8, 0xff, 0x02, 0x83, 0x55, 0x4d, 0x19, 0xba, 0xd4, 0xfe, 0x30, 0x00, 0xa7, - 0xfc, 0x18, 0x5b, 0x0f, 0x05, 0xfe, 0x56, 0x10, 0x4d, 0x0a, 0xf9, 0xd4, 0xfe, 0x64, 0x00, 0xa7, - 0xfc, 0x09, 0xfe, 0x64, 0x00, 0x18, 0x8d, 0x0f, 0x05, 0xfe, 0x28, 0x10, 0x4d, 0x05, 0xfe, 0x60, - 0x13, 0xd4, 0xfe, 0xc8, 0x00, 0xa7, 0xfc, 0x09, 0xfe, 0xc8, 0x00, 0x18, 0x8e, 0x0f, 0x05, 0x6a, - 0xd4, 0xfe, 0x90, 0x01, 0x41, 0xfe, 0x9c, 0x15, 0x3e, 0x9c, 0xfe, 0x43, 0xf4, 0x8f, 0xfe, 0x56, - 0xf0, 0xfe, 0xae, 0x15, 0xfe, 0x04, 0xf4, 0x51, 0xfe, 0x43, 0xf4, 0x8d, 0xf4, 0xcc, 0x01, 0xfe, - 0x4e, 0x14, 0x1e, 0x34, 0xf8, 0xfe, 0x00, 0x17, 0x85, 0x42, 0x41, 0xfe, 0xea, 0x15, 0x5a, 0x42, - 0xfe, 0x1c, 0x10, 0xfe, 0x00, 0x17, 0x85, 0x77, 0x41, 0xfe, 0xea, 0x15, 0x5a, 0x77, 0x6a, 0x4b, - 0x22, 0xfe, 0x4d, 0xf4, 0x00, 0xf6, 0x3e, 0x0f, 0x05, 0xfe, 0xb4, 0x56, 0xfe, 0xc3, 0x58, 0x03, - 0x4b, 0x0f, 0x0a, 0x03, 0x4b, 0x3b, 0x70, 0x4a, 0x3e, 0x01, 0x06, 0x12, 0xa1, 0x23, 0x21, 0xb5, - 0xfe, 0x03, 0xea, 0xfe, 0x7e, 0x01, 0x01, 0x06, 0x12, 0xa1, 0x23, 0x21, 0xfe, 0xe9, 0x0a, 0x01, - 0x06, 0x12, 0xa1, 0x23, 0x21, 0xfe, 0xe9, 0x0a, 0xfe, 0x05, 0xea, 0xfe, 0x7f, 0x01, 0x01, 0x06, - 0x12, 0xa1, 0x23, 0x21, 0xfe, 0x69, 0x09, 0xfe, 0x02, 0xea, 0xfe, 0x80, 0x01, 0x01, 0x06, 0x12, - 0xa1, 0x23, 0x21, 0xfe, 0xe8, 0x08, 0x40, 0xfe, 0x81, 0x01, 0x02, 0xad, 0x1a, 0x56, 0x36, 0x08, - 0x20, 0x2c, 0x9b, 0x70, 0xb9, 0x4d, 0x05, 0x2d, 0xfe, 0x34, 0xf4, 0x34, 0x9a, 0x70, 0x02, 0x93, - 0x1a, 0x56, 0x36, 0x08, 0x0e, 0x2c, 0xf0, 0x4a, 0x3e, 0xfe, 0x90, 0x10, 0xfe, 0x40, 0x5a, 0x1e, - 0x34, 0xf7, 0x85, 0x42, 0x41, 0xfe, 0xb6, 0x16, 0x5a, 0x42, 0x6a, 0x85, 0x77, 0x41, 0xfe, 0xb6, - 0x16, 0x5a, 0x77, 0xfe, 0xb4, 0x56, 0xfe, 0x40, 0x5d, 0x01, 0xbe, 0x01, 0xfe, 0x8e, 0x1b, 0xfe, - 0x02, 0x17, 0xfe, 0xc8, 0x45, 0xfe, 0x5a, 0xf0, 0xfe, 0xcc, 0x16, 0xfe, 0x43, 0x48, 0x28, 0x8c, - 0x2d, 0xfe, 0x34, 0xf4, 0xfe, 0x00, 0x11, 0xfe, 0x40, 0x10, 0x28, 0xab, 0x2d, 0xfe, 0x34, 0xf4, - 0x31, 0xfe, 0x34, 0x10, 0x28, 0xfe, 0x0b, 0x00, 0x2d, 0x3f, 0x5b, 0xfe, 0x28, 0x10, 0xfe, 0xc0, - 0x49, 0xff, 0x02, 0x00, 0x54, 0xa9, 0xfe, 0x90, 0x01, 0x41, 0xfe, 0x06, 0x17, 0x3e, 0xfe, 0x1c, - 0xf4, 0x34, 0x9c, 0xfe, 0x40, 0xf4, 0x8f, 0xfe, 0x56, 0xf0, 0xfe, 0x18, 0x17, 0xfe, 0x04, 0xf4, - 0x51, 0xfe, 0x40, 0xf4, 0x8d, 0xf4, 0x3b, 0x28, 0x8c, 0x49, 0xce, 0x0a, 0x1d, 0xfe, 0x7f, 0x01, - 0xfe, 0xc8, 0x46, 0xfe, 0x24, 0x13, 0x85, 0x00, 0x56, 0x22, 0x1d, 0xfe, 0x7e, 0x01, 0xfe, 0xc8, - 0x45, 0xfe, 0x14, 0x13, 0x1d, 0xfe, 0x80, 0x01, 0xfe, 0x48, 0x45, 0xfe, 0x0c, 0x13, 0x1d, 0xfe, - 0x81, 0x01, 0xfe, 0xc8, 0x44, 0x49, 0x22, 0x03, 0x0f, 0x05, 0x03, 0x70, 0x3e, 0x4b, 0x0f, 0x0a, - 0x03, 0x10, 0x05, 0x01, 0x06, 0x13, 0xfe, 0x8e, 0x17, 0x10, 0x0a, 0x01, 0x06, 0x13, 0xfe, 0x8e, - 0x17, 0x10, 0x19, 0x01, 0x06, 0x13, 0xfe, 0x8e, 0x17, 0x6e, 0xfe, 0x89, 0x49, 0x01, 0x06, 0x03, - 0x10, 0x05, 0x01, 0x06, 0x13, 0xbc, 0x10, 0x19, 0x01, 0x06, 0x13, 0xbc, 0x10, 0x05, 0x01, 0x06, - 0x13, 0xbc, 0xfe, 0x89, 0x49, 0x01, 0x06, 0x13, 0xbc, 0x6e, 0xfe, 0x89, 0x4a, 0x01, 0x06, 0x03, - 0x4b, 0x03, 0x10, 0x05, 0x01, 0x06, 0x13, 0x6d, 0x10, 0x76, 0x01, 0x06, 0x13, 0x6d, 0x10, 0x0e, - 0x01, 0x06, 0x13, 0x6d, 0xfe, 0x89, 0x49, 0x01, 0x06, 0x13, 0x6d, 0x10, 0x00, 0x01, 0x06, 0x13, - 0x6d, 0xfe, 0x89, 0x4a, 0x01, 0x06, 0x13, 0x6d, 0xfe, 0x09, 0x49, 0x01, 0x06, 0x13, 0x6d, 0x6e, - 0xc7, 0x01, 0x06, 0x03, 0x1d, 0xe2, 0x07, 0x05, 0xfe, 0x48, 0x13, 0xc3, 0x1c, 0xe2, 0xfe, 0x49, - 0xf4, 0x00, 0x48, 0x6e, 0x9a, 0x57, 0xfe, 0x01, 0xec, 0xfe, 0x27, 0x01, 0xc7, 0xff, 0x02, 0x00, - 0x10, 0x2a, 0xfe, 0x4a, 0x18, 0x35, 0x07, 0xfe, 0xe3, 0x00, 0xfe, 0x20, 0x13, 0x12, 0xfe, 0x6e, - 0x18, 0x22, 0x1c, 0x97, 0x01, 0x47, 0x1d, 0x97, 0x07, 0x05, 0x55, 0x0b, 0x59, 0x05, 0x3d, 0x03, - 0x09, 0x53, 0x01, 0x14, 0xfe, 0x00, 0x40, 0xa2, 0x07, 0x16, 0xba, 0x09, 0x96, 0x01, 0x14, 0xa2, - 0x09, 0x5f, 0x01, 0xb7, 0x03, 0x09, 0x96, 0x01, 0x14, 0xa2, 0xfe, 0x80, 0xe7, 0x16, 0x07, 0x16, - 0x56, 0xfe, 0x45, 0x58, 0x01, 0xfb, 0xa2, 0x03, 0x09, 0x53, 0x01, 0x14, 0xa2, 0x09, 0x5f, 0x01, - 0xb7, 0x03, 0x09, 0x53, 0x01, 0x14, 0xfe, 0x80, 0x80, 0xfe, 0x80, 0x4c, 0xfe, 0x49, 0xe4, 0x16, - 0xba, 0x09, 0x96, 0x01, 0x14, 0xfe, 0x80, 0x4c, 0x09, 0x5f, 0x01, 0x7a, 0x03, 0x18, 0x16, 0x7f, - 0x73, 0xe3, 0xfe, 0x18, 0xdf, 0xfe, 0x19, 0xde, 0xfe, 0x24, 0x1c, 0xfe, 0x1d, 0xf7, 0x38, 0xa8, - 0xfe, 0x0a, 0x19, 0x01, 0xfe, 0x10, 0x1a, 0xfe, 0x0c, 0x13, 0xaa, 0x38, 0x73, 0xfe, 0x2c, 0x01, - 0xfe, 0x2f, 0x19, 0x03, 0xc4, 0x26, 0xfe, 0xfa, 0x18, 0xfe, 0xda, 0x10, 0x18, 0x16, 0x7f, 0x02, - 0xfe, 0x64, 0x01, 0xfe, 0x00, 0xf4, 0x20, 0xfe, 0x18, 0x58, 0x02, 0xfe, 0x66, 0x01, 0xfe, 0x19, - 0x58, 0xaa, 0x20, 0xfe, 0x3c, 0x90, 0xfe, 0x30, 0xf4, 0x05, 0xfe, 0x3c, 0x50, 0x73, 0xfe, 0x38, - 0x00, 0xfe, 0x0f, 0x79, 0xfe, 0x1c, 0xf7, 0x20, 0xa8, 0xfe, 0x54, 0x19, 0xfe, 0xb6, 0x14, 0x2c, - 0x03, 0xc4, 0x26, 0xfe, 0x2c, 0x19, 0xfe, 0x9c, 0x10, 0x18, 0x16, 0x7f, 0xfe, 0x83, 0x5a, 0xfe, - 0x18, 0xdf, 0xfe, 0x19, 0xde, 0xfe, 0x1d, 0xf7, 0x4e, 0xa8, 0xfe, 0x76, 0x19, 0xbb, 0xf8, 0xaa, - 0x4e, 0x73, 0x0e, 0xfe, 0xaf, 0x19, 0xfe, 0x98, 0xe7, 0x00, 0x03, 0xc4, 0x26, 0xfe, 0x6a, 0x19, - 0xfe, 0x6c, 0x10, 0x18, 0x16, 0x7f, 0xfe, 0x30, 0xbc, 0xfe, 0xb2, 0xbc, 0xaa, 0x43, 0x73, 0x0e, - 0xfe, 0x0f, 0x79, 0xfe, 0x1c, 0xf7, 0x43, 0xa8, 0xfe, 0xae, 0x19, 0xfe, 0x5c, 0x14, 0x2c, 0x03, - 0xc4, 0x26, 0xfe, 0x9a, 0x19, 0xfe, 0x42, 0x10, 0xfe, 0x02, 0xf6, 0x16, 0x7f, 0xfe, 0x18, 0xfe, - 0x62, 0xfe, 0x19, 0xfe, 0x63, 0xfe, 0x03, 0xa1, 0xfe, 0x1d, 0xf7, 0x5d, 0xa8, 0xfe, 0xd4, 0x19, - 0xfe, 0x36, 0x14, 0xfe, 0x1c, 0x13, 0xaa, 0x5d, 0x3b, 0xfe, 0x83, 0x58, 0xfe, 0xaf, 0x19, 0xfe, - 0x80, 0xe7, 0x16, 0xfe, 0x81, 0xe7, 0x16, 0x11, 0xfe, 0xdd, 0x00, 0x71, 0x2b, 0x03, 0x71, 0x2b, - 0xfe, 0x12, 0x45, 0x26, 0xfe, 0xc4, 0x19, 0x1b, 0x05, 0x40, 0xac, 0xbf, 0x04, 0x30, 0xfe, 0x39, - 0xf0, 0xfe, 0x18, 0x1a, 0x22, 0x03, 0xfe, 0x7e, 0x18, 0x1e, 0x19, 0x2d, 0x0f, 0x0d, 0x03, 0x7f, - 0x02, 0xe1, 0x1e, 0x05, 0xfe, 0xef, 0x12, 0xfe, 0xe1, 0x10, 0x89, 0x2f, 0x6f, 0x35, 0x07, 0x50, - 0xfe, 0x3c, 0x13, 0xfe, 0x7e, 0x14, 0xfe, 0x42, 0x13, 0x58, 0xcd, 0x09, 0x53, 0x01, 0x14, 0xc6, - 0xfe, 0x3e, 0x12, 0xfe, 0x41, 0x48, 0xfe, 0x45, 0x48, 0x01, 0xfb, 0xfe, 0x00, 0xcc, 0xc6, 0xfe, - 0xf3, 0x13, 0x34, 0x82, 0x07, 0x16, 0x9e, 0x09, 0x96, 0x01, 0x14, 0xfe, 0x80, 0x4c, 0x01, 0x7c, - 0xfe, 0x16, 0x10, 0x07, 0x94, 0x49, 0xfe, 0x3c, 0x14, 0xfe, 0x24, 0x12, 0xfe, 0x14, 0x56, 0xfe, - 0xd6, 0xf0, 0xfe, 0x38, 0x1a, 0x18, 0x0a, 0x03, 0xfe, 0x9c, 0xe7, 0x0a, 0x15, 0xfe, 0x15, 0x00, - 0x68, 0x86, 0x2b, 0x01, 0xef, 0x18, 0x05, 0x03, 0x0b, 0x59, 0x38, 0x3d, 0x11, 0x50, 0x01, 0x7c, - 0x18, 0x05, 0x03, 0xfe, 0x38, 0x90, 0xfe, 0xba, 0x90, 0x8a, 0xdc, 0x75, 0xdd, 0xfe, 0x48, 0x55, - 0x2c, 0xfe, 0xc9, 0x55, 0x03, 0x1d, 0xb0, 0x80, 0x1c, 0xb0, 0x03, 0x09, 0xb1, 0x01, 0x14, 0xfe, - 0x41, 0x48, 0x09, 0x44, 0x01, 0x14, 0xfe, 0x49, 0x44, 0x17, 0xfe, 0x00, 0x1b, 0x80, 0x82, 0x03, - 0x09, 0x53, 0x01, 0x14, 0x07, 0x16, 0x55, 0x09, 0x5f, 0x01, 0xb7, 0x09, 0x44, 0x01, 0x14, 0x80, - 0x82, 0x03, 0xfe, 0x4e, 0xe4, 0x19, 0x72, 0xfe, 0x34, 0x1b, 0x02, 0xfe, 0x90, 0x00, 0xfe, 0x3a, - 0x45, 0xfe, 0x2c, 0x10, 0xfe, 0x4e, 0xe4, 0xdb, 0x72, 0xfe, 0x46, 0x1b, 0x02, 0xfe, 0x92, 0x00, - 0xcf, 0x0e, 0xf1, 0xfe, 0x4e, 0xe4, 0xfe, 0x0b, 0x00, 0x72, 0xfe, 0x58, 0x1b, 0x02, 0xfe, 0x94, - 0x00, 0xcf, 0x20, 0xfe, 0x08, 0x10, 0x02, 0xfe, 0x96, 0x00, 0xcf, 0x5b, 0xfe, 0x4e, 0x45, 0x9d, - 0xc5, 0xff, 0x04, 0x68, 0x54, 0xf3, 0x1e, 0x42, 0xfe, 0x08, 0x1c, 0xfe, 0x67, 0x19, 0xfe, 0x0a, - 0x1c, 0xfe, 0x1a, 0xf4, 0xfe, 0x00, 0x04, 0x9d, 0xa9, 0x19, 0x41, 0xfe, 0x8c, 0x1b, 0x0f, 0x19, - 0x03, 0x07, 0x8b, 0xfe, 0x5a, 0xf0, 0xfe, 0x9c, 0x1b, 0x29, 0x8c, 0xfe, 0x34, 0x10, 0x07, 0x0e, - 0xfe, 0x5a, 0xf0, 0xfe, 0xaa, 0x1b, 0x29, 0xab, 0xfe, 0x26, 0x10, 0x07, 0x19, 0x2d, 0x29, 0x5b, - 0xf1, 0x07, 0x0a, 0x2d, 0x29, 0x8d, 0xb9, 0x07, 0x05, 0x2d, 0x29, 0x8e, 0x9a, 0xc3, 0x03, 0x1b, - 0x8c, 0x01, 0x3c, 0xfe, 0x04, 0xfe, 0x92, 0x02, 0x95, 0xcc, 0x03, 0x25, 0xfe, 0xfe, 0x1b, 0xfe, - 0x14, 0xf0, 0x06, 0x2a, 0xfe, 0xee, 0x1b, 0x25, 0xfe, 0xfe, 0x1b, 0x88, 0xfe, 0xfe, 0x1b, 0xfe, - 0x82, 0xf0, 0xfe, 0xf2, 0x1b, 0x03, 0xff, 0xff, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0xff, 0x02, - 0x00, 0x00, + 0x00, 0x00, 0xfe, 0x78, 0x56, 0xfe, 0x34, 0x12, 0xff, 0x21, 0x00, 0x00, 0xfe, 0x04, 0xf7, 0xe8, + 0x37, 0x7d, 0x0d, 0x01, 0xfe, 0x4a, 0x11, 0xfe, 0x04, 0xf7, 0xe8, 0x7d, 0x0d, 0x51, 0x37, 0xfe, + 0x3d, 0xf0, 0xfe, 0x0c, 0x02, 0xfe, 0x20, 0xf0, 0xbc, 0xfe, 0x91, 0xf0, 0xfe, 0xf8, 0x01, 0xfe, + 0x90, 0xf0, 0xfe, 0xf8, 0x01, 0xfe, 0x8f, 0xf0, 0xbc, 0x03, 0x67, 0x4d, 0x05, 0xfe, 0x08, 0x0f, + 0x01, 0xfe, 0x78, 0x0f, 0xfe, 0xdd, 0x12, 0x05, 0xfe, 0x0e, 0x03, 0xfe, 0x28, 0x1c, 0x03, 0xfe, + 0xa6, 0x00, 0xfe, 0xd1, 0x12, 0x3e, 0x22, 0xfe, 0xa6, 0x00, 0xac, 0xfe, 0x48, 0xf0, 0xfe, 0x90, + 0x02, 0xfe, 0x49, 0xf0, 0xfe, 0xaa, 0x02, 0xfe, 0x4a, 0xf0, 0xfe, 0xc8, 0x02, 0xfe, 0x46, 0xf0, + 0xfe, 0x5a, 0x02, 0xfe, 0x47, 0xf0, 0xfe, 0x60, 0x02, 0xfe, 0x43, 0xf0, 0xfe, 0x4e, 0x02, 0xfe, + 0x44, 0xf0, 0xfe, 0x52, 0x02, 0xfe, 0x45, 0xf0, 0xfe, 0x56, 0x02, 0x1c, 0x0d, 0xa2, 0x1c, 0x07, + 0x22, 0xb7, 0x05, 0x35, 0xfe, 0x00, 0x1c, 0xfe, 0xf1, 0x10, 0xfe, 0x02, 0x1c, 0xf5, 0xfe, 0x1e, + 0x1c, 0xfe, 0xe9, 0x10, 0x01, 0x5f, 0xfe, 0xe7, 0x10, 0xfe, 0x06, 0xfc, 0xde, 0x0a, 0x81, 0x01, + 0xa3, 0x05, 0x35, 0x1f, 0x95, 0x47, 0xb8, 0x01, 0xfe, 0xe4, 0x11, 0x0a, 0x81, 0x01, 0x5c, 0xfe, + 0xbd, 0x10, 0x0a, 0x81, 0x01, 0x5c, 0xfe, 0xad, 0x10, 0xfe, 0x16, 0x1c, 0xfe, 0x58, 0x1c, 0x1c, + 0x07, 0x22, 0xb7, 0x37, 0x2a, 0x35, 0xfe, 0x3d, 0xf0, 0xfe, 0x0c, 0x02, 0x2b, 0xfe, 0x9e, 0x02, + 0xfe, 0x5a, 0x1c, 0xfe, 0x12, 0x1c, 0xfe, 0x14, 0x1c, 0x1f, 0xfe, 0x30, 0x00, 0x47, 0xb8, 0x01, + 0xfe, 0xd4, 0x11, 0x1c, 0x07, 0x22, 0xb7, 0x05, 0xe9, 0x21, 0x2c, 0x09, 0x1a, 0x31, 0xfe, 0x69, + 0x10, 0x1c, 0x07, 0x22, 0xb7, 0xfe, 0x04, 0xec, 0x2c, 0x60, 0x01, 0xfe, 0x1e, 0x1e, 0x20, 0x2c, + 0xfe, 0x05, 0xf6, 0xde, 0x01, 0xfe, 0x62, 0x1b, 0x01, 0x0c, 0x61, 0x4a, 0x44, 0x15, 0x56, 0x51, + 0x01, 0xfe, 0x9e, 0x1e, 0x01, 0xfe, 0x96, 0x1a, 0x05, 0x35, 0x0a, 0x57, 0x01, 0x18, 0x09, 0x00, + 0x36, 0x01, 0x85, 0xfe, 0x18, 0x10, 0xfe, 0x41, 0x58, 0x0a, 0xba, 0x01, 0x18, 0xfe, 0xc8, 0x54, + 0x7b, 0xfe, 0x1c, 0x03, 0x01, 0xfe, 0x96, 0x1a, 0x05, 0x35, 0x37, 0x60, 0xfe, 0x02, 0xe8, 0x30, + 0xfe, 0xbf, 0x57, 0xfe, 0x9e, 0x43, 0xfe, 0x77, 0x57, 0xfe, 0x27, 0xf0, 0xfe, 0xe4, 0x01, 0xfe, + 0x07, 0x4b, 0xfe, 0x20, 0xf0, 0xbc, 0xfe, 0x40, 0x1c, 0x2a, 0xeb, 0xfe, 0x26, 0xf0, 0xfe, 0x66, + 0x03, 0xfe, 0xa0, 0xf0, 0xfe, 0x54, 0x03, 0xfe, 0x11, 0xf0, 0xbc, 0xfe, 0xef, 0x10, 0xfe, 0x9f, + 0xf0, 0xfe, 0x74, 0x03, 0xfe, 0x46, 0x1c, 0x19, 0xfe, 0x11, 0x00, 0x05, 0x70, 0x37, 0xfe, 0x48, + 0x1c, 0xfe, 0x46, 0x1c, 0x01, 0x0c, 0x06, 0x28, 0xfe, 0x18, 0x13, 0x26, 0x21, 0xb9, 0xc7, 0x20, + 0xb9, 0x0a, 0x57, 0x01, 0x18, 0xc7, 0x89, 0x01, 0xfe, 0xc8, 0x1a, 0x15, 0xe1, 0x2a, 0xeb, 0xfe, + 0x01, 0xf0, 0xeb, 0xfe, 0x82, 0xf0, 0xfe, 0xa4, 0x03, 0xfe, 0x9c, 0x32, 0x15, 0xfe, 0xe4, 0x00, + 0x2f, 0xfe, 0xb6, 0x03, 0x2a, 0x3c, 0x16, 0xfe, 0xc6, 0x03, 0x01, 0x41, 0xfe, 0x06, 0xf0, 0xfe, + 0xd6, 0x03, 0xaf, 0xa0, 0xfe, 0x0a, 0xf0, 0xfe, 0xa2, 0x07, 0x05, 0x29, 0x03, 0x81, 0x1e, 0x1b, + 0xfe, 0x24, 0x05, 0x1f, 0x63, 0x01, 0x42, 0x8f, 0xfe, 0x70, 0x02, 0x05, 0xea, 0xfe, 0x46, 0x1c, + 0x37, 0x7d, 0x1d, 0xfe, 0x67, 0x1b, 0xfe, 0xbf, 0x57, 0xfe, 0x77, 0x57, 0xfe, 0x48, 0x1c, 0x75, + 0x01, 0xa6, 0x86, 0x0a, 0x57, 0x01, 0x18, 0x09, 0x00, 0x1b, 0xec, 0x0a, 0xe1, 0x01, 0x18, 0x77, + 0x50, 0x40, 0x8d, 0x30, 0x03, 0x81, 0x1e, 0xf8, 0x1f, 0x63, 0x01, 0x42, 0x8f, 0xfe, 0x70, 0x02, + 0x05, 0xea, 0xd7, 0x99, 0xd8, 0x9c, 0x2a, 0x29, 0x2f, 0xfe, 0x4e, 0x04, 0x16, 0xfe, 0x4a, 0x04, + 0x7e, 0xfe, 0xa0, 0x00, 0xfe, 0x9b, 0x57, 0xfe, 0x54, 0x12, 0x32, 0xff, 0x02, 0x00, 0x10, 0x01, + 0x08, 0x16, 0xfe, 0x02, 0x05, 0x32, 0x01, 0x08, 0x16, 0x29, 0x27, 0x25, 0xee, 0xfe, 0x4c, 0x44, + 0xfe, 0x58, 0x12, 0x50, 0xfe, 0x44, 0x48, 0x13, 0x34, 0xfe, 0x4c, 0x54, 0x7b, 0xec, 0x60, 0x8d, + 0x30, 0x01, 0xfe, 0x4e, 0x1e, 0xfe, 0x48, 0x47, 0xfe, 0x7c, 0x13, 0x01, 0x0c, 0x06, 0x28, 0xfe, + 0x32, 0x13, 0x01, 0x43, 0x09, 0x9b, 0xfe, 0x68, 0x13, 0xfe, 0x26, 0x10, 0x13, 0x34, 0xfe, 0x4c, + 0x54, 0x7b, 0xec, 0x01, 0xfe, 0x4e, 0x1e, 0xfe, 0x48, 0x47, 0xfe, 0x54, 0x13, 0x01, 0x0c, 0x06, + 0x28, 0xa5, 0x01, 0x43, 0x09, 0x9b, 0xfe, 0x40, 0x13, 0x01, 0x0c, 0x06, 0x28, 0xf9, 0x1f, 0x7f, + 0x01, 0x0c, 0x06, 0x07, 0x4d, 0x1f, 0xfe, 0x0d, 0x00, 0x01, 0x42, 0x8f, 0xfe, 0xa4, 0x0e, 0x05, + 0x29, 0x32, 0x15, 0xfe, 0xe6, 0x00, 0x0f, 0xfe, 0x1c, 0x90, 0x04, 0xfe, 0x9c, 0x93, 0x3a, 0x0b, + 0x0e, 0x8b, 0x02, 0x1f, 0x7f, 0x01, 0x42, 0x05, 0x35, 0xfe, 0x42, 0x5b, 0x7d, 0x1d, 0xfe, 0x46, + 0x59, 0xfe, 0xbf, 0x57, 0xfe, 0x77, 0x57, 0x0f, 0xfe, 0x87, 0x80, 0x04, 0xfe, 0x87, 0x83, 0xfe, + 0xc9, 0x47, 0x0b, 0x0e, 0xd0, 0x65, 0x01, 0x0c, 0x06, 0x0d, 0xfe, 0x98, 0x13, 0x0f, 0xfe, 0x20, + 0x80, 0x04, 0xfe, 0xa0, 0x83, 0x33, 0x0b, 0x0e, 0x09, 0x1d, 0xfe, 0x84, 0x12, 0x01, 0x38, 0x06, + 0x07, 0xfe, 0x70, 0x13, 0x03, 0xfe, 0xa2, 0x00, 0x1e, 0x1b, 0xfe, 0xda, 0x05, 0xd0, 0x54, 0x01, + 0x38, 0x06, 0x0d, 0xfe, 0x58, 0x13, 0x03, 0xfe, 0xa0, 0x00, 0x1e, 0xfe, 0x50, 0x12, 0x5e, 0xff, + 0x02, 0x00, 0x10, 0x2f, 0xfe, 0x90, 0x05, 0x2a, 0x3c, 0xcc, 0xff, 0x02, 0x00, 0x10, 0x2f, 0xfe, + 0x9e, 0x05, 0x17, 0xfe, 0xf4, 0x05, 0x15, 0xfe, 0xe3, 0x00, 0x26, 0x01, 0x38, 0xfe, 0x4a, 0xf0, + 0xfe, 0xc0, 0x05, 0xfe, 0x49, 0xf0, 0xfe, 0xba, 0x05, 0x71, 0x2e, 0xfe, 0x21, 0x00, 0xf1, 0x2e, + 0xfe, 0x22, 0x00, 0xa2, 0x2e, 0x4a, 0xfe, 0x09, 0x48, 0xff, 0x02, 0x00, 0x10, 0x2f, 0xfe, 0xd0, + 0x05, 0x17, 0xfe, 0xf4, 0x05, 0xfe, 0xe2, 0x08, 0x01, 0x38, 0x06, 0xfe, 0x1c, 0x00, 0x4d, 0x01, + 0xa7, 0x2e, 0x07, 0x20, 0xe4, 0x47, 0xfe, 0x27, 0x01, 0x01, 0x0c, 0x06, 0x28, 0xfe, 0x24, 0x12, + 0x3e, 0x01, 0x84, 0x1f, 0x7f, 0x01, 0x0c, 0x06, 0x07, 0x4d, 0x1f, 0xfe, 0x0d, 0x00, 0x01, 0x42, + 0x8f, 0xfe, 0xa4, 0x0e, 0x05, 0x29, 0x03, 0xe6, 0x1e, 0xfe, 0xca, 0x13, 0x03, 0xb6, 0x1e, 0xfe, + 0x40, 0x12, 0x03, 0x66, 0x1e, 0xfe, 0x38, 0x13, 0x3e, 0x01, 0x84, 0x17, 0xfe, 0x72, 0x06, 0x0a, + 0x07, 0x01, 0x38, 0x06, 0x24, 0xfe, 0x02, 0x12, 0x4f, 0x01, 0xfe, 0x56, 0x19, 0x16, 0xfe, 0x68, + 0x06, 0x15, 0x82, 0x01, 0x41, 0x15, 0xe2, 0x03, 0x66, 0x8a, 0x10, 0x66, 0x03, 0x9a, 0x1e, 0xfe, + 0x70, 0x12, 0x03, 0x55, 0x1e, 0xfe, 0x68, 0x13, 0x01, 0xc6, 0x09, 0x12, 0x48, 0xfe, 0x92, 0x06, + 0x2e, 0x12, 0x01, 0xfe, 0xac, 0x1d, 0xfe, 0x43, 0x48, 0x62, 0x80, 0x13, 0x58, 0xff, 0x02, 0x00, + 0x57, 0x52, 0xad, 0x23, 0x3f, 0x4e, 0x62, 0x49, 0x3e, 0x01, 0x84, 0x17, 0xfe, 0xea, 0x06, 0x01, + 0x38, 0x06, 0x12, 0xf7, 0x45, 0x0a, 0x95, 0x01, 0xfe, 0x84, 0x19, 0x16, 0xfe, 0xe0, 0x06, 0x15, + 0x82, 0x01, 0x41, 0x15, 0xe2, 0x03, 0x55, 0x8a, 0x10, 0x55, 0x1c, 0x07, 0x01, 0x84, 0xfe, 0xae, + 0x10, 0x03, 0x6f, 0x1e, 0xfe, 0x9e, 0x13, 0x3e, 0x01, 0x84, 0x03, 0x9a, 0x1e, 0xfe, 0x1a, 0x12, + 0x01, 0x38, 0x06, 0x12, 0xfc, 0x01, 0xc6, 0x01, 0xfe, 0xac, 0x1d, 0xfe, 0x43, 0x48, 0x62, 0x80, + 0xf0, 0x45, 0x0a, 0x95, 0x03, 0xb6, 0x1e, 0xf8, 0x01, 0x38, 0x06, 0x24, 0x36, 0xfe, 0x02, 0xf6, + 0x07, 0x71, 0x78, 0x8c, 0x00, 0x4d, 0x62, 0x49, 0x3e, 0x2d, 0x93, 0x4e, 0xd0, 0x0d, 0x17, 0xfe, + 0x9a, 0x07, 0x01, 0xfe, 0xc0, 0x19, 0x16, 0xfe, 0x90, 0x07, 0x26, 0x20, 0x9e, 0x15, 0x82, 0x01, + 0x41, 0x15, 0xe2, 0x21, 0x9e, 0x09, 0x07, 0xfb, 0x03, 0xe6, 0xfe, 0x58, 0x57, 0x10, 0xe6, 0x05, + 0xfe, 0x2a, 0x06, 0x03, 0x6f, 0x8a, 0x10, 0x6f, 0x1c, 0x07, 0x01, 0x84, 0xfe, 0x9c, 0x32, 0x5f, + 0x75, 0x01, 0xa6, 0x86, 0x15, 0xfe, 0xe2, 0x00, 0x2f, 0xed, 0x2a, 0x3c, 0xfe, 0x0a, 0xf0, 0xfe, + 0xce, 0x07, 0xae, 0xfe, 0x96, 0x08, 0xfe, 0x06, 0xf0, 0xfe, 0x9e, 0x08, 0xaf, 0xa0, 0x05, 0x29, + 0x01, 0x0c, 0x06, 0x0d, 0xfe, 0x2e, 0x12, 0x14, 0x1d, 0x01, 0x08, 0x14, 0x00, 0x01, 0x08, 0x14, + 0x00, 0x01, 0x08, 0x14, 0x00, 0x01, 0x08, 0xfe, 0x99, 0xa4, 0x01, 0x08, 0x14, 0x00, 0x05, 0xfe, + 0xc6, 0x09, 0x01, 0x76, 0x06, 0x12, 0xfe, 0x3a, 0x12, 0x01, 0x0c, 0x06, 0x12, 0xfe, 0x30, 0x13, + 0x14, 0xfe, 0x1b, 0x00, 0x01, 0x08, 0x14, 0x00, 0x01, 0x08, 0x14, 0x00, 0x01, 0x08, 0x14, 0x00, + 0x01, 0x08, 0x14, 0x07, 0x01, 0x08, 0x14, 0x00, 0x05, 0xef, 0x7c, 0x4a, 0x78, 0x4f, 0x0f, 0xfe, + 0x9a, 0x81, 0x04, 0xfe, 0x9a, 0x83, 0xfe, 0xcb, 0x47, 0x0b, 0x0e, 0x2d, 0x28, 0x48, 0xfe, 0x6c, + 0x08, 0x0a, 0x28, 0xfe, 0x09, 0x6f, 0xca, 0xfe, 0xca, 0x45, 0xfe, 0x32, 0x12, 0x53, 0x63, 0x4e, + 0x7c, 0x97, 0x2f, 0xfe, 0x7e, 0x08, 0x2a, 0x3c, 0xfe, 0x0a, 0xf0, 0xfe, 0x6c, 0x08, 0xaf, 0xa0, + 0xae, 0xfe, 0x96, 0x08, 0x05, 0x29, 0x01, 0x41, 0x05, 0xed, 0x14, 0x24, 0x05, 0xed, 0xfe, 0x9c, + 0xf7, 0x9f, 0x01, 0xfe, 0xae, 0x1e, 0xfe, 0x18, 0x58, 0x01, 0xfe, 0xbe, 0x1e, 0xfe, 0x99, 0x58, + 0xfe, 0x78, 0x18, 0xfe, 0xf9, 0x18, 0x8e, 0xfe, 0x16, 0x09, 0x10, 0x6a, 0x22, 0x6b, 0x01, 0x0c, + 0x61, 0x54, 0x44, 0x21, 0x2c, 0x09, 0x1a, 0xf8, 0x77, 0x01, 0xfe, 0x7e, 0x1e, 0x47, 0x2c, 0x7a, + 0x30, 0xf0, 0xfe, 0x83, 0xe7, 0xfe, 0x3f, 0x00, 0x71, 0xfe, 0x03, 0x40, 0x01, 0x0c, 0x61, 0x65, + 0x44, 0x01, 0xc2, 0xc8, 0xfe, 0x1f, 0x40, 0x20, 0x6e, 0x01, 0xfe, 0x6a, 0x16, 0xfe, 0x08, 0x50, + 0xfe, 0x8a, 0x50, 0xfe, 0x44, 0x51, 0xfe, 0xc6, 0x51, 0xfe, 0x10, 0x10, 0x01, 0xfe, 0xce, 0x1e, + 0x01, 0xfe, 0xde, 0x1e, 0x10, 0x68, 0x22, 0x69, 0x01, 0xfe, 0xee, 0x1e, 0x01, 0xfe, 0xfe, 0x1e, + 0xfe, 0x40, 0x50, 0xfe, 0xc2, 0x50, 0x10, 0x4b, 0x22, 0x4c, 0xfe, 0x8a, 0x10, 0x01, 0x0c, 0x06, + 0x54, 0xfe, 0x50, 0x12, 0x01, 0xfe, 0xae, 0x1e, 0x01, 0xfe, 0xbe, 0x1e, 0x10, 0x6a, 0x22, 0x6b, + 0x01, 0x0c, 0x06, 0x65, 0x4e, 0x01, 0xc2, 0x0f, 0xfe, 0x1f, 0x80, 0x04, 0xfe, 0x9f, 0x83, 0x33, + 0x0b, 0x0e, 0x20, 0x6e, 0x0f, 0xfe, 0x44, 0x90, 0x04, 0xfe, 0xc4, 0x93, 0x3a, 0x0b, 0xfe, 0xc6, + 0x90, 0x04, 0xfe, 0xc6, 0x93, 0x79, 0x0b, 0x0e, 0x10, 0x6c, 0x22, 0x6d, 0x01, 0xfe, 0xce, 0x1e, + 0x01, 0xfe, 0xde, 0x1e, 0x10, 0x68, 0x22, 0x69, 0x0f, 0xfe, 0x40, 0x90, 0x04, 0xfe, 0xc0, 0x93, + 0x3a, 0x0b, 0xfe, 0xc2, 0x90, 0x04, 0xfe, 0xc2, 0x93, 0x79, 0x0b, 0x0e, 0x10, 0x4b, 0x22, 0x4c, + 0x10, 0x64, 0x22, 0x34, 0x01, 0x0c, 0x61, 0x24, 0x44, 0x37, 0x13, 0xfe, 0x4e, 0x11, 0x2f, 0xfe, + 0xde, 0x09, 0xfe, 0x9e, 0xf0, 0xfe, 0xf2, 0x09, 0xfe, 0x01, 0x48, 0x1b, 0x3c, 0x37, 0x88, 0xf5, + 0xd4, 0xfe, 0x1e, 0x0a, 0xd5, 0xfe, 0x42, 0x0a, 0xd2, 0xfe, 0x1e, 0x0a, 0xd3, 0xfe, 0x42, 0x0a, + 0xae, 0xfe, 0x12, 0x0a, 0xfe, 0x06, 0xf0, 0xfe, 0x18, 0x0a, 0xaf, 0xa0, 0x05, 0x29, 0x01, 0x41, + 0xfe, 0xc1, 0x10, 0x14, 0x24, 0xfe, 0xc1, 0x10, 0x01, 0x76, 0x06, 0x07, 0xfe, 0x14, 0x12, 0x01, + 0x76, 0x06, 0x0d, 0x5d, 0x01, 0x0c, 0x06, 0x0d, 0xfe, 0x74, 0x12, 0xfe, 0x2e, 0x1c, 0x05, 0xfe, + 0x1a, 0x0c, 0x01, 0x76, 0x06, 0x07, 0x5d, 0x01, 0x76, 0x06, 0x0d, 0x41, 0xfe, 0x2c, 0x1c, 0xfe, + 0xaa, 0xf0, 0xfe, 0xce, 0x0a, 0xfe, 0xac, 0xf0, 0xfe, 0x66, 0x0a, 0xfe, 0x92, 0x10, 0xc4, 0xf6, + 0xfe, 0xad, 0xf0, 0xfe, 0x72, 0x0a, 0x05, 0xfe, 0x1a, 0x0c, 0xc5, 0xfe, 0xe7, 0x10, 0xfe, 0x2b, + 0xf0, 0xbf, 0xfe, 0x6b, 0x18, 0x23, 0xfe, 0x00, 0xfe, 0xfe, 0x1c, 0x12, 0xac, 0xfe, 0xd2, 0xf0, + 0xbf, 0xfe, 0x76, 0x18, 0x23, 0x1d, 0x1b, 0xbf, 0x03, 0xe3, 0x23, 0x07, 0x1b, 0xbf, 0xd4, 0x5b, + 0xd5, 0x5b, 0xd2, 0x5b, 0xd3, 0x5b, 0xc4, 0xc5, 0xfe, 0xa9, 0x10, 0x75, 0x5e, 0x32, 0x1f, 0x7f, + 0x01, 0x42, 0x19, 0xfe, 0x35, 0x00, 0xfe, 0x01, 0xf0, 0x70, 0x19, 0x98, 0x05, 0x70, 0xfe, 0x74, + 0x18, 0x23, 0xfe, 0x00, 0xf8, 0x1b, 0x5b, 0x7d, 0x12, 0x01, 0xfe, 0x78, 0x0f, 0x4d, 0x01, 0xfe, + 0x96, 0x1a, 0x21, 0x30, 0x77, 0x7d, 0x1d, 0x05, 0x5b, 0x01, 0x0c, 0x06, 0x0d, 0x2b, 0xfe, 0xe2, + 0x0b, 0x01, 0x0c, 0x06, 0x54, 0xfe, 0xa6, 0x12, 0x01, 0x0c, 0x06, 0x24, 0xfe, 0x88, 0x13, 0x21, + 0x6e, 0xc7, 0x01, 0xfe, 0x1e, 0x1f, 0x0f, 0xfe, 0x83, 0x80, 0x04, 0xfe, 0x83, 0x83, 0xfe, 0xc9, + 0x47, 0x0b, 0x0e, 0xfe, 0xc8, 0x44, 0xfe, 0x42, 0x13, 0x0f, 0xfe, 0x04, 0x91, 0x04, 0xfe, 0x84, + 0x93, 0xfe, 0xca, 0x57, 0x0b, 0xfe, 0x86, 0x91, 0x04, 0xfe, 0x86, 0x93, 0xfe, 0xcb, 0x57, 0x0b, + 0x0e, 0x7a, 0x30, 0xfe, 0x40, 0x59, 0xfe, 0xc1, 0x59, 0x8e, 0x40, 0x03, 0x6a, 0x3b, 0x6b, 0x10, + 0x97, 0x22, 0x98, 0xd9, 0x6a, 0xda, 0x6b, 0x01, 0xc2, 0xc8, 0x7a, 0x30, 0x20, 0x6e, 0xdb, 0x64, + 0xdc, 0x34, 0x91, 0x6c, 0x7e, 0x6d, 0xfe, 0x44, 0x55, 0xfe, 0xe5, 0x55, 0xfe, 0x04, 0xfa, 0x64, + 0xfe, 0x05, 0xfa, 0x34, 0x01, 0xfe, 0x6a, 0x16, 0xa3, 0x26, 0x10, 0x97, 0x10, 0x98, 0x91, 0x6c, + 0x7e, 0x6d, 0xfe, 0x14, 0x10, 0x01, 0x0c, 0x06, 0x24, 0x1b, 0x40, 0x91, 0x4b, 0x7e, 0x4c, 0x01, + 0x0c, 0x06, 0xfe, 0xf7, 0x00, 0x44, 0x03, 0x68, 0x3b, 0x69, 0xfe, 0x10, 0x58, 0xfe, 0x91, 0x58, + 0xfe, 0x14, 0x59, 0xfe, 0x95, 0x59, 0x05, 0x5b, 0x01, 0x0c, 0x06, 0x24, 0x1b, 0x40, 0x01, 0x0c, + 0x06, 0xfe, 0xf7, 0x00, 0x44, 0x78, 0x01, 0xfe, 0x8e, 0x1e, 0x4f, 0x0f, 0xfe, 0x10, 0x90, 0x04, + 0xfe, 0x90, 0x93, 0x3a, 0x0b, 0xfe, 0x92, 0x90, 0x04, 0xfe, 0x92, 0x93, 0x79, 0x0b, 0x0e, 0xfe, + 0xbd, 0x10, 0x01, 0x43, 0x09, 0xbb, 0x1b, 0xfe, 0x6e, 0x0a, 0x15, 0xbb, 0x01, 0x0c, 0x06, 0x0d, + 0xfe, 0x14, 0x13, 0x03, 0x4b, 0x3b, 0x4c, 0x8e, 0xfe, 0x6e, 0x0a, 0xfe, 0x0c, 0x58, 0xfe, 0x8d, + 0x58, 0x05, 0x5b, 0x26, 0x3e, 0x0f, 0xfe, 0x19, 0x80, 0x04, 0xfe, 0x99, 0x83, 0x33, 0x0b, 0x0e, + 0xfe, 0xe5, 0x10, 0x01, 0x0c, 0x06, 0x0d, 0xfe, 0x1a, 0x12, 0xfe, 0x6c, 0x19, 0xfe, 0x19, 0x41, + 0xfe, 0x6b, 0x18, 0xac, 0xfe, 0xd1, 0xf0, 0xef, 0x1f, 0x92, 0x01, 0x42, 0x19, 0xfe, 0x44, 0x00, + 0xfe, 0x90, 0x10, 0xfe, 0x6c, 0x19, 0xd9, 0x4b, 0xfe, 0xed, 0x19, 0xda, 0x4c, 0xfe, 0x0c, 0x51, + 0xfe, 0x8e, 0x51, 0xfe, 0x6b, 0x18, 0x23, 0xfe, 0x00, 0xff, 0x31, 0xfe, 0x76, 0x10, 0xac, 0xfe, + 0xd2, 0xf0, 0xfe, 0xba, 0x0c, 0xfe, 0x76, 0x18, 0x23, 0x1d, 0x5d, 0x03, 0xe3, 0x23, 0x07, 0xfe, + 0x08, 0x13, 0x19, 0xfe, 0x16, 0x00, 0x05, 0x70, 0xfe, 0xd1, 0xf0, 0xfe, 0xcc, 0x0c, 0x1f, 0x92, + 0x01, 0x42, 0x19, 0xfe, 0x17, 0x00, 0x5c, 0xfe, 0xce, 0xf0, 0xfe, 0xd2, 0x0c, 0xfe, 0x3e, 0x10, + 0xfe, 0xcd, 0xf0, 0xfe, 0xde, 0x0c, 0x19, 0xfe, 0x22, 0x00, 0x05, 0x70, 0xfe, 0xcb, 0xf0, 0xfe, + 0xea, 0x0c, 0x19, 0xfe, 0x24, 0x00, 0x05, 0x70, 0xfe, 0xd0, 0xf0, 0xfe, 0xf4, 0x0c, 0x19, 0x94, + 0xfe, 0x1c, 0x10, 0xfe, 0xcf, 0xf0, 0xfe, 0xfe, 0x0c, 0x19, 0x4a, 0xf3, 0xfe, 0xcc, 0xf0, 0xef, + 0x01, 0x76, 0x06, 0x24, 0x4d, 0x19, 0xfe, 0x12, 0x00, 0x37, 0x13, 0xfe, 0x4e, 0x11, 0x2f, 0xfe, + 0x16, 0x0d, 0xfe, 0x9e, 0xf0, 0xfe, 0x2a, 0x0d, 0xfe, 0x01, 0x48, 0x1b, 0x3c, 0x37, 0x88, 0xf5, + 0xd4, 0x29, 0xd5, 0x29, 0xd2, 0x29, 0xd3, 0x29, 0x37, 0xfe, 0x9c, 0x32, 0x2f, 0xfe, 0x3e, 0x0d, + 0x2a, 0x3c, 0xae, 0xfe, 0x62, 0x0d, 0xaf, 0xa0, 0xd4, 0x9f, 0xd5, 0x9f, 0xd2, 0x9f, 0xd3, 0x9f, + 0x05, 0x29, 0x01, 0x41, 0xfe, 0xd3, 0x10, 0x15, 0xfe, 0xe8, 0x00, 0xc4, 0xc5, 0x75, 0xd7, 0x99, + 0xd8, 0x9c, 0xfe, 0x89, 0xf0, 0x29, 0x27, 0x25, 0xbe, 0xd7, 0x99, 0xd8, 0x9c, 0x2f, 0xfe, 0x8c, + 0x0d, 0x16, 0x29, 0x27, 0x25, 0xbd, 0xfe, 0x01, 0x48, 0xa4, 0x19, 0xfe, 0x42, 0x00, 0x05, 0x70, + 0x90, 0x07, 0xfe, 0x81, 0x49, 0x1b, 0xfe, 0x64, 0x0e, 0x01, 0x0c, 0x06, 0x0d, 0xfe, 0x44, 0x13, + 0x19, 0x00, 0x2d, 0x0d, 0xfe, 0x54, 0x12, 0x2d, 0xfe, 0x28, 0x00, 0x2b, 0xfe, 0xda, 0x0e, 0x0a, + 0x57, 0x01, 0x18, 0x09, 0x00, 0x36, 0x46, 0xfe, 0x28, 0x00, 0xfe, 0xfa, 0x10, 0x01, 0xfe, 0xf4, + 0x1c, 0x01, 0xfe, 0x00, 0x1d, 0x0a, 0xba, 0x01, 0xfe, 0x58, 0x10, 0x40, 0x15, 0x56, 0x01, 0x85, + 0x05, 0x35, 0x19, 0xfe, 0x44, 0x00, 0x2d, 0x0d, 0xf7, 0x46, 0x0d, 0xfe, 0xcc, 0x10, 0x01, 0xa7, + 0x46, 0x0d, 0xfe, 0xc2, 0x10, 0x01, 0xa7, 0x0f, 0xfe, 0x19, 0x82, 0x04, 0xfe, 0x99, 0x83, 0xfe, + 0xcc, 0x47, 0x0b, 0x0e, 0xfe, 0x34, 0x46, 0xa5, 0x46, 0x0d, 0x19, 0xfe, 0x43, 0x00, 0xfe, 0xa2, + 0x10, 0x01, 0x0c, 0x61, 0x0d, 0x44, 0x01, 0xfe, 0xf4, 0x1c, 0x01, 0xfe, 0x00, 0x1d, 0x40, 0x15, + 0x56, 0x01, 0x85, 0x7d, 0x0d, 0x40, 0x51, 0x01, 0xfe, 0x9e, 0x1e, 0x05, 0xfe, 0x3a, 0x03, 0x01, + 0x0c, 0x06, 0x0d, 0x5d, 0x46, 0x0d, 0x19, 0x00, 0xfe, 0x62, 0x10, 0x01, 0x76, 0x06, 0x12, 0xfe, + 0x5c, 0x12, 0x01, 0x0c, 0x06, 0x12, 0xfe, 0x52, 0x13, 0xfe, 0x1c, 0x1c, 0xfe, 0x9d, 0xf0, 0xfe, + 0x8e, 0x0e, 0xfe, 0x1c, 0x1c, 0xfe, 0x9d, 0xf0, 0xfe, 0x94, 0x0e, 0x01, 0x0c, 0x61, 0x12, 0x44, + 0xfe, 0x9f, 0x10, 0x19, 0xfe, 0x15, 0x00, 0xfe, 0x04, 0xe6, 0x0d, 0x4f, 0xfe, 0x2e, 0x10, 0x19, + 0xfe, 0x13, 0x00, 0xfe, 0x10, 0x10, 0x19, 0xfe, 0x47, 0x00, 0xf1, 0x19, 0xfe, 0x41, 0x00, 0xa2, + 0x19, 0xfe, 0x24, 0x00, 0x86, 0xc4, 0xc5, 0x75, 0x03, 0x81, 0x1e, 0x2b, 0xea, 0x4f, 0xfe, 0x04, + 0xe6, 0x12, 0xfe, 0x9d, 0x41, 0xfe, 0x1c, 0x42, 0x40, 0x01, 0xf4, 0x05, 0x35, 0xfe, 0x12, 0x1c, + 0x1f, 0x0d, 0x47, 0xb5, 0xc3, 0x1f, 0xfe, 0x31, 0x00, 0x47, 0xb8, 0x01, 0xfe, 0xd4, 0x11, 0x05, + 0xe9, 0x51, 0xfe, 0x06, 0xec, 0xe0, 0xfe, 0x0e, 0x47, 0x46, 0x28, 0xfe, 0xce, 0x45, 0x31, 0x51, + 0xfe, 0x06, 0xea, 0xe0, 0xfe, 0x47, 0x4b, 0x45, 0xfe, 0x75, 0x57, 0x03, 0x67, 0xfe, 0x98, 0x56, + 0xfe, 0x38, 0x12, 0x0a, 0x5a, 0x01, 0x18, 0xfe, 0x44, 0x48, 0x60, 0x01, 0x0c, 0x06, 0x28, 0xfe, + 0x18, 0x13, 0x0a, 0x57, 0x01, 0x18, 0x3e, 0xfe, 0x41, 0x58, 0x0a, 0xba, 0xfe, 0xfa, 0x14, 0xfe, + 0x49, 0x54, 0xb0, 0xfe, 0x5e, 0x0f, 0x05, 0xfe, 0x3a, 0x03, 0x0a, 0x67, 0xfe, 0xe0, 0x14, 0xfe, + 0x0e, 0x47, 0x46, 0x28, 0xfe, 0xce, 0x45, 0x31, 0x51, 0xfe, 0xce, 0x47, 0xfe, 0xad, 0x13, 0x05, + 0x35, 0x21, 0x2c, 0x09, 0x1a, 0xfe, 0x98, 0x12, 0x26, 0x20, 0x96, 0x20, 0xe7, 0xfe, 0x08, 0x1c, + 0xfe, 0x7c, 0x19, 0xfe, 0xfd, 0x19, 0xfe, 0x0a, 0x1c, 0x03, 0xe5, 0xfe, 0x48, 0x55, 0xa5, 0x3b, + 0xfe, 0x62, 0x01, 0xfe, 0xc9, 0x55, 0x31, 0xfe, 0x74, 0x10, 0x01, 0xfe, 0xf0, 0x1a, 0x03, 0xfe, + 0x38, 0x01, 0x3b, 0xfe, 0x3a, 0x01, 0x8e, 0xfe, 0x1e, 0x10, 0xfe, 0x02, 0xec, 0xe7, 0x53, 0x00, + 0x36, 0xfe, 0x04, 0xec, 0x2c, 0x60, 0xfe, 0x05, 0xf6, 0xfe, 0x34, 0x01, 0x01, 0xfe, 0x62, 0x1b, + 0x01, 0xfe, 0xce, 0x1e, 0xb2, 0x11, 0xfe, 0x18, 0x13, 0xca, 0xfe, 0x02, 0xea, 0xe7, 0x53, 0x92, + 0xfe, 0xc3, 0x13, 0x1f, 0x12, 0x47, 0xb5, 0xc3, 0xfe, 0x2a, 0x10, 0x03, 0xfe, 0x38, 0x01, 0x23, + 0xfe, 0xf0, 0xff, 0x10, 0xe5, 0x03, 0xfe, 0x3a, 0x01, 0x10, 0xfe, 0x62, 0x01, 0x01, 0xfe, 0x1e, + 0x1e, 0x20, 0x2c, 0x15, 0x56, 0x01, 0xfe, 0x9e, 0x1e, 0x13, 0x07, 0x02, 0x26, 0x02, 0x21, 0x96, + 0xc7, 0x20, 0x96, 0x09, 0x92, 0xfe, 0x79, 0x13, 0x1f, 0x1d, 0x47, 0xb5, 0xc3, 0xfe, 0xe1, 0x10, + 0xcf, 0xfe, 0x03, 0xdc, 0xfe, 0x73, 0x57, 0xfe, 0x80, 0x5d, 0x02, 0xcf, 0xfe, 0x03, 0xdc, 0xfe, + 0x5b, 0x57, 0xfe, 0x80, 0x5d, 0x02, 0xfe, 0x03, 0x57, 0xcf, 0x26, 0xfe, 0x00, 0xcc, 0x02, 0xfe, + 0x03, 0x57, 0xcf, 0x89, 0x02, 0x01, 0x0c, 0x06, 0x4a, 0xfe, 0x4e, 0x13, 0x0f, 0xfe, 0x1c, 0x80, + 0x04, 0xfe, 0x9c, 0x83, 0x33, 0x0b, 0x0e, 0x09, 0x07, 0xfe, 0x3a, 0x13, 0x0f, 0xfe, 0x1e, 0x80, + 0x04, 0xfe, 0x9e, 0x83, 0x33, 0x0b, 0x0e, 0xfe, 0x2a, 0x13, 0x0f, 0xfe, 0x1d, 0x80, 0x04, 0xfe, + 0x9d, 0x83, 0xfe, 0xf9, 0x13, 0x0e, 0xfe, 0x1c, 0x13, 0x01, 0xfe, 0xee, 0x1e, 0xac, 0xfe, 0x14, + 0x13, 0x01, 0xfe, 0xfe, 0x1e, 0xfe, 0x81, 0x58, 0xfa, 0x01, 0xfe, 0x0e, 0x1f, 0xfe, 0x30, 0xf4, + 0x0d, 0xfe, 0x3c, 0x50, 0xa2, 0x01, 0xfe, 0x92, 0x1b, 0x01, 0x43, 0x09, 0x56, 0xfb, 0x01, 0xfe, + 0xc8, 0x1a, 0x01, 0x0c, 0x06, 0x28, 0xa4, 0x01, 0xfe, 0xf4, 0x1c, 0x01, 0xfe, 0x00, 0x1d, 0x15, + 0xfe, 0xe9, 0x00, 0x01, 0x0c, 0x06, 0x4a, 0xfe, 0x4e, 0x13, 0x01, 0xfe, 0x22, 0x1b, 0xfe, 0x1e, + 0x1c, 0x0f, 0xfe, 0x14, 0x90, 0x04, 0xfe, 0x94, 0x93, 0x3a, 0x0b, 0xfe, 0x96, 0x90, 0x04, 0xfe, + 0x96, 0x93, 0x79, 0x0b, 0x0e, 0x10, 0xfe, 0x64, 0x01, 0x22, 0xfe, 0x66, 0x01, 0x01, 0x0c, 0x06, + 0x65, 0xf9, 0x0f, 0xfe, 0x03, 0x80, 0x04, 0xfe, 0x83, 0x83, 0x33, 0x0b, 0x0e, 0x77, 0xfe, 0x01, + 0xec, 0x2c, 0xfe, 0x80, 0x40, 0x20, 0x2c, 0x7a, 0x30, 0x15, 0xdf, 0x40, 0x21, 0x2c, 0xfe, 0x00, + 0x40, 0x8d, 0x2c, 0x02, 0xfe, 0x08, 0x1c, 0x03, 0xfe, 0xac, 0x00, 0xfe, 0x06, 0x58, 0x03, 0xfe, + 0xae, 0x00, 0xfe, 0x07, 0x58, 0x03, 0xfe, 0xb0, 0x00, 0xfe, 0x08, 0x58, 0x03, 0xfe, 0xb2, 0x00, + 0xfe, 0x09, 0x58, 0xfe, 0x0a, 0x1c, 0x2e, 0x49, 0x20, 0xe0, 0x26, 0x10, 0x66, 0x10, 0x55, 0x10, + 0x6f, 0x13, 0x57, 0x52, 0x4f, 0x1c, 0x28, 0xfe, 0x90, 0x4d, 0xfe, 0x91, 0x54, 0x2b, 0xfe, 0x88, + 0x11, 0x46, 0x1a, 0x13, 0x5a, 0x52, 0x1c, 0x4a, 0xfe, 0x90, 0x4d, 0xfe, 0x91, 0x54, 0x2b, 0xfe, + 0x9e, 0x11, 0x2e, 0x1a, 0x20, 0x2c, 0x90, 0x34, 0x60, 0x21, 0x2c, 0xfe, 0x00, 0x40, 0x8d, 0x2c, + 0x15, 0xdf, 0xfe, 0x14, 0x56, 0xfe, 0xd6, 0xf0, 0xfe, 0xb2, 0x11, 0xfe, 0x12, 0x1c, 0x75, 0xfe, + 0x14, 0x1c, 0xfe, 0x10, 0x1c, 0xfe, 0x18, 0x1c, 0x02, 0x51, 0xfe, 0x0c, 0x14, 0xfe, 0x0e, 0x47, + 0xfe, 0x07, 0xe6, 0x28, 0xfe, 0xce, 0x47, 0xfe, 0xf5, 0x13, 0x02, 0x01, 0xa7, 0x90, 0x34, 0x60, + 0xfe, 0x06, 0x80, 0xfe, 0x48, 0x47, 0xfe, 0x42, 0x13, 0xfe, 0x02, 0x80, 0x09, 0x56, 0xfe, 0x34, + 0x13, 0x0a, 0x5a, 0x01, 0x18, 0xcb, 0xfe, 0x36, 0x12, 0xfe, 0x41, 0x48, 0xfe, 0x45, 0x48, 0x01, + 0xfe, 0xb2, 0x16, 0xfe, 0x00, 0xcc, 0xcb, 0xfe, 0xf3, 0x13, 0x3f, 0x89, 0x09, 0x1a, 0xa5, 0x0a, + 0x9d, 0x01, 0x18, 0xfe, 0x80, 0x5c, 0x01, 0x85, 0xf2, 0x09, 0x9b, 0xa4, 0xfe, 0x14, 0x56, 0xfe, + 0xd6, 0xf0, 0xfe, 0xec, 0x11, 0x02, 0xfe, 0x44, 0x58, 0x77, 0xfe, 0x01, 0xec, 0xb8, 0xfe, 0x9e, + 0x40, 0xfe, 0x9d, 0xe7, 0x00, 0xfe, 0x9c, 0xe7, 0x12, 0x8d, 0x30, 0x01, 0xf4, 0xfe, 0xdd, 0x10, + 0x37, 0xd7, 0x99, 0xd8, 0x9c, 0x27, 0x25, 0xee, 0x09, 0x12, 0xfe, 0x48, 0x12, 0x09, 0x0d, 0xfe, + 0x56, 0x12, 0x09, 0x1d, 0xfe, 0x30, 0x12, 0x09, 0xdd, 0x1b, 0xfe, 0xc4, 0x13, 0x09, 0xfe, 0x23, + 0x00, 0x1b, 0xfe, 0xd0, 0x13, 0x09, 0x07, 0x1b, 0xfe, 0x34, 0x14, 0x09, 0x24, 0xfe, 0x12, 0x12, + 0x09, 0x00, 0x1b, 0x29, 0x1f, 0xdd, 0x01, 0x42, 0xa1, 0x32, 0x01, 0x08, 0xae, 0x41, 0x02, 0x32, + 0xfe, 0x62, 0x08, 0x0a, 0xe1, 0x01, 0xfe, 0x58, 0x10, 0x15, 0x9b, 0x05, 0x35, 0x32, 0x01, 0x43, + 0x09, 0xbb, 0xfe, 0xd7, 0x13, 0x91, 0x4b, 0x7e, 0x4c, 0x8e, 0xfe, 0x80, 0x13, 0x01, 0x0c, 0x06, + 0x54, 0xfe, 0x72, 0x12, 0xdb, 0x64, 0xdc, 0x34, 0xfe, 0x44, 0x55, 0xfe, 0xe5, 0x55, 0xb0, 0xfe, + 0x4a, 0x13, 0x21, 0x6e, 0xfe, 0x26, 0x13, 0x03, 0x97, 0x3b, 0x98, 0x8e, 0xfe, 0xb6, 0x0e, 0x10, + 0x6a, 0x22, 0x6b, 0x26, 0x10, 0x97, 0x10, 0x98, 0x01, 0xc2, 0x2e, 0x49, 0x88, 0x20, 0x6e, 0x01, + 0xfe, 0x6a, 0x16, 0xdb, 0x64, 0xdc, 0x34, 0xfe, 0x04, 0x55, 0xfe, 0xa5, 0x55, 0xfe, 0x04, 0xfa, + 0x64, 0xfe, 0x05, 0xfa, 0x34, 0xfe, 0x8f, 0x10, 0x03, 0x6c, 0x3b, 0x6d, 0xfe, 0x40, 0x56, 0xfe, + 0xe1, 0x56, 0x10, 0x6c, 0x22, 0x6d, 0x71, 0xdb, 0x64, 0xdc, 0x34, 0xfe, 0x44, 0x55, 0xfe, 0xe5, + 0x55, 0x03, 0x68, 0x3b, 0x69, 0xfe, 0x00, 0x56, 0xfe, 0xa1, 0x56, 0x10, 0x68, 0x22, 0x69, 0x01, + 0x0c, 0x06, 0x54, 0xf9, 0x21, 0x6e, 0xfe, 0x1f, 0x40, 0x03, 0x6a, 0x3b, 0x6b, 0xfe, 0x2c, 0x50, + 0xfe, 0xae, 0x50, 0x03, 0x6c, 0x3b, 0x6d, 0xfe, 0x44, 0x50, 0xfe, 0xc6, 0x50, 0x03, 0x68, 0x3b, + 0x69, 0xfe, 0x08, 0x50, 0xfe, 0x8a, 0x50, 0x03, 0x4b, 0x3b, 0x4c, 0xfe, 0x40, 0x50, 0xfe, 0xc2, + 0x50, 0x05, 0x73, 0x2e, 0x07, 0x20, 0x9e, 0x05, 0x72, 0x32, 0x01, 0x08, 0x16, 0x3d, 0x27, 0x25, + 0xee, 0x09, 0x07, 0x2b, 0x3d, 0x01, 0x43, 0x09, 0xbb, 0x2b, 0x72, 0x01, 0xa6, 0x23, 0x3f, 0x1b, + 0x3d, 0x01, 0x0c, 0x06, 0x0d, 0xfe, 0x1e, 0x13, 0x91, 0x4b, 0x7e, 0x4c, 0xfe, 0x0a, 0x55, 0x31, + 0xfe, 0x8b, 0x55, 0xd9, 0x4b, 0xda, 0x4c, 0xfe, 0x0c, 0x51, 0xfe, 0x8e, 0x51, 0x05, 0x72, 0x01, + 0xfe, 0x8e, 0x1e, 0xca, 0xfe, 0x19, 0x41, 0x05, 0x72, 0x32, 0x01, 0x08, 0x2a, 0x3c, 0x16, 0xc0, + 0x27, 0x25, 0xbe, 0x2d, 0x1d, 0xc0, 0x2d, 0x0d, 0x83, 0x2d, 0x7f, 0x1b, 0xfe, 0x66, 0x15, 0x05, + 0x3d, 0x01, 0x08, 0x2a, 0x3c, 0x16, 0xc0, 0x27, 0x25, 0xbd, 0x09, 0x1d, 0x2b, 0x3d, 0x01, 0x08, + 0x16, 0xc0, 0x27, 0x25, 0xfe, 0xe8, 0x09, 0xfe, 0xc2, 0x49, 0x50, 0x03, 0xb6, 0x1e, 0x83, 0x01, + 0x38, 0x06, 0x24, 0x31, 0xa1, 0xfe, 0xbb, 0x45, 0x2d, 0x00, 0xa4, 0x46, 0x07, 0x90, 0x3f, 0x01, + 0xfe, 0xf8, 0x15, 0x01, 0xa6, 0x86, 0xfe, 0x4b, 0x45, 0xfe, 0x20, 0x13, 0x01, 0x43, 0x09, 0x82, + 0xfe, 0x16, 0x13, 0x03, 0x9a, 0x1e, 0x5d, 0x03, 0x55, 0x1e, 0x31, 0x5e, 0x05, 0x72, 0xfe, 0xc0, + 0x5d, 0x01, 0xa7, 0xfe, 0x03, 0x17, 0x03, 0x66, 0x8a, 0x10, 0x66, 0x5e, 0x32, 0x01, 0x08, 0x17, + 0x73, 0x01, 0xfe, 0x56, 0x19, 0x05, 0x73, 0x01, 0x08, 0x2a, 0x3c, 0x16, 0x3d, 0x27, 0x25, 0xbd, + 0x09, 0x07, 0x2b, 0x3d, 0x01, 0xfe, 0xbe, 0x16, 0xfe, 0x42, 0x58, 0xfe, 0xe8, 0x14, 0x01, 0xa6, + 0x86, 0xfe, 0x4a, 0xf4, 0x0d, 0x1b, 0x3d, 0xfe, 0x4a, 0xf4, 0x07, 0xfe, 0x0e, 0x12, 0x01, 0x43, + 0x09, 0x82, 0x4e, 0x05, 0x72, 0x03, 0x55, 0x8a, 0x10, 0x55, 0x5e, 0x32, 0x01, 0x08, 0x17, 0x73, + 0x01, 0xfe, 0x84, 0x19, 0x05, 0x73, 0x01, 0x08, 0x2a, 0x3c, 0x16, 0x3d, 0x27, 0x25, 0xbd, 0x09, + 0x12, 0x2b, 0x3d, 0x01, 0xfe, 0xe8, 0x17, 0x8b, 0xfe, 0xaa, 0x14, 0xfe, 0xb6, 0x14, 0x86, 0xa8, + 0xb2, 0x0d, 0x1b, 0x3d, 0xb2, 0x07, 0xfe, 0x0e, 0x12, 0x01, 0x43, 0x09, 0x82, 0x4e, 0x05, 0x72, + 0x03, 0x6f, 0x8a, 0x10, 0x6f, 0x5e, 0x32, 0x01, 0x08, 0x17, 0x73, 0x01, 0xfe, 0xc0, 0x19, 0x05, + 0x73, 0x13, 0x07, 0x2f, 0xfe, 0xcc, 0x15, 0x17, 0xfe, 0xe2, 0x15, 0x5f, 0xcc, 0x01, 0x08, 0x26, + 0x5f, 0x02, 0x8f, 0xfe, 0xde, 0x15, 0x2a, 0xfe, 0xde, 0x15, 0x16, 0xfe, 0xcc, 0x15, 0x5e, 0x32, + 0x01, 0x08, 0xfe, 0xd5, 0x10, 0x13, 0x58, 0xff, 0x02, 0x00, 0x57, 0x52, 0xad, 0x23, 0xfe, 0xff, + 0x7f, 0xfe, 0x30, 0x56, 0xfe, 0x00, 0x5c, 0x02, 0x13, 0x58, 0xff, 0x02, 0x00, 0x57, 0x52, 0xad, + 0x23, 0x3f, 0xfe, 0x30, 0x56, 0xfe, 0x00, 0x5c, 0x02, 0x13, 0x58, 0xff, 0x02, 0x00, 0x57, 0x52, + 0xad, 0x02, 0x13, 0x58, 0xff, 0x02, 0x00, 0x57, 0x52, 0xfe, 0x00, 0x5e, 0x02, 0x13, 0x58, 0xff, + 0x02, 0x00, 0x57, 0x52, 0xad, 0xfe, 0x0b, 0x58, 0x02, 0x0a, 0x66, 0x01, 0x5c, 0x0a, 0x55, 0x01, + 0x5c, 0x0a, 0x6f, 0x01, 0x5c, 0x02, 0x01, 0xfe, 0x1e, 0x1f, 0x23, 0x1a, 0xff, 0x03, 0x00, 0x54, + 0xfe, 0x00, 0xf4, 0x24, 0x52, 0x0f, 0xfe, 0x00, 0x7c, 0x04, 0xfe, 0x07, 0x7c, 0x3a, 0x0b, 0x0e, + 0xfe, 0x00, 0x71, 0xfe, 0xf9, 0x18, 0xfe, 0x7a, 0x19, 0xfe, 0xfb, 0x19, 0xfe, 0x1a, 0xf7, 0x00, + 0xfe, 0x1b, 0xf7, 0x00, 0x7a, 0x30, 0x10, 0x68, 0x22, 0x69, 0xd9, 0x6c, 0xda, 0x6d, 0x02, 0xfe, + 0x62, 0x08, 0xfe, 0x82, 0x4a, 0xfe, 0xe1, 0x1a, 0xfe, 0x83, 0x5a, 0x77, 0x02, 0x01, 0xc6, 0xfe, + 0x42, 0x48, 0x4f, 0x50, 0x45, 0x01, 0x08, 0x16, 0xfe, 0xe0, 0x17, 0x27, 0x25, 0xbe, 0x01, 0x08, + 0x16, 0xfe, 0xe0, 0x17, 0x27, 0x25, 0xfe, 0xe8, 0x0a, 0xfe, 0xc1, 0x59, 0x03, 0x9a, 0x1e, 0xfe, + 0xda, 0x12, 0x01, 0x38, 0x06, 0x12, 0xfe, 0xd0, 0x13, 0x26, 0x53, 0x12, 0x48, 0xfe, 0x08, 0x17, + 0xd1, 0x12, 0x53, 0x12, 0xfe, 0x1e, 0x13, 0x2d, 0xb4, 0x7b, 0xfe, 0x26, 0x17, 0x4d, 0x13, 0x07, + 0x1c, 0xb4, 0x90, 0x04, 0xfe, 0x78, 0x10, 0xff, 0x02, 0x83, 0x55, 0xf1, 0xff, 0x02, 0x83, 0x55, + 0x53, 0x1d, 0xfe, 0x12, 0x13, 0xd6, 0xfe, 0x30, 0x00, 0xb0, 0xfe, 0x80, 0x17, 0x1c, 0x63, 0x13, + 0x07, 0xfe, 0x56, 0x10, 0x53, 0x0d, 0xfe, 0x16, 0x13, 0xd6, 0xfe, 0x64, 0x00, 0xb0, 0xfe, 0x80, + 0x17, 0x0a, 0xfe, 0x64, 0x00, 0x1c, 0x94, 0x13, 0x07, 0xfe, 0x28, 0x10, 0x53, 0x07, 0xfe, 0x60, + 0x13, 0xd6, 0xfe, 0xc8, 0x00, 0xb0, 0xfe, 0x80, 0x17, 0x0a, 0xfe, 0xc8, 0x00, 0x1c, 0x95, 0x13, + 0x07, 0x71, 0xd6, 0xfe, 0x90, 0x01, 0x48, 0xfe, 0x8c, 0x17, 0x45, 0xf3, 0xfe, 0x43, 0xf4, 0x96, + 0xfe, 0x56, 0xf0, 0xfe, 0x9e, 0x17, 0xfe, 0x04, 0xf4, 0x58, 0xfe, 0x43, 0xf4, 0x94, 0xf6, 0x8b, + 0x01, 0xfe, 0x24, 0x16, 0x23, 0x3f, 0xfc, 0xa8, 0x8c, 0x49, 0x48, 0xfe, 0xda, 0x17, 0x62, 0x49, + 0xfe, 0x1c, 0x10, 0xa8, 0x8c, 0x80, 0x48, 0xfe, 0xda, 0x17, 0x62, 0x80, 0x71, 0x50, 0x26, 0xfe, + 0x4d, 0xf4, 0x00, 0xf7, 0x45, 0x13, 0x07, 0xfe, 0xb4, 0x56, 0xfe, 0xc3, 0x58, 0x02, 0x50, 0x13, + 0x0d, 0x02, 0x50, 0x3e, 0x78, 0x4f, 0x45, 0x01, 0x08, 0x16, 0xa9, 0x27, 0x25, 0xbe, 0xfe, 0x03, + 0xea, 0xfe, 0x7e, 0x01, 0x01, 0x08, 0x16, 0xa9, 0x27, 0x25, 0xfe, 0xe9, 0x0a, 0x01, 0x08, 0x16, + 0xa9, 0x27, 0x25, 0xfe, 0xe9, 0x0a, 0xfe, 0x05, 0xea, 0xfe, 0x7f, 0x01, 0x01, 0x08, 0x16, 0xa9, + 0x27, 0x25, 0xfe, 0x69, 0x09, 0xfe, 0x02, 0xea, 0xfe, 0x80, 0x01, 0x01, 0x08, 0x16, 0xa9, 0x27, + 0x25, 0xfe, 0xe8, 0x08, 0x47, 0xfe, 0x81, 0x01, 0x03, 0xb6, 0x1e, 0x83, 0x01, 0x38, 0x06, 0x24, + 0x31, 0xa2, 0x78, 0xf2, 0x53, 0x07, 0x36, 0xfe, 0x34, 0xf4, 0x3f, 0xa1, 0x78, 0x03, 0x9a, 0x1e, + 0x83, 0x01, 0x38, 0x06, 0x12, 0x31, 0xf0, 0x4f, 0x45, 0xfe, 0x90, 0x10, 0xfe, 0x40, 0x5a, 0x23, + 0x3f, 0xfb, 0x8c, 0x49, 0x48, 0xfe, 0xaa, 0x18, 0x62, 0x49, 0x71, 0x8c, 0x80, 0x48, 0xfe, 0xaa, + 0x18, 0x62, 0x80, 0xfe, 0xb4, 0x56, 0xfe, 0x40, 0x5d, 0x01, 0xc6, 0x01, 0xfe, 0xac, 0x1d, 0xfe, + 0x02, 0x17, 0xfe, 0xc8, 0x45, 0xfe, 0x5a, 0xf0, 0xfe, 0xc0, 0x18, 0xfe, 0x43, 0x48, 0x2d, 0x93, + 0x36, 0xfe, 0x34, 0xf4, 0xfe, 0x00, 0x11, 0xfe, 0x40, 0x10, 0x2d, 0xb4, 0x36, 0xfe, 0x34, 0xf4, + 0x04, 0xfe, 0x34, 0x10, 0x2d, 0xfe, 0x0b, 0x00, 0x36, 0x46, 0x63, 0xfe, 0x28, 0x10, 0xfe, 0xc0, + 0x49, 0xff, 0x02, 0x00, 0x54, 0xb2, 0xfe, 0x90, 0x01, 0x48, 0xfe, 0xfa, 0x18, 0x45, 0xfe, 0x1c, + 0xf4, 0x3f, 0xf3, 0xfe, 0x40, 0xf4, 0x96, 0xfe, 0x56, 0xf0, 0xfe, 0x0c, 0x19, 0xfe, 0x04, 0xf4, + 0x58, 0xfe, 0x40, 0xf4, 0x94, 0xf6, 0x3e, 0x2d, 0x93, 0x4e, 0xd0, 0x0d, 0x21, 0xfe, 0x7f, 0x01, + 0xfe, 0xc8, 0x46, 0xfe, 0x24, 0x13, 0x8c, 0x00, 0x5d, 0x26, 0x21, 0xfe, 0x7e, 0x01, 0xfe, 0xc8, + 0x45, 0xfe, 0x14, 0x13, 0x21, 0xfe, 0x80, 0x01, 0xfe, 0x48, 0x45, 0xfa, 0x21, 0xfe, 0x81, 0x01, + 0xfe, 0xc8, 0x44, 0x4e, 0x26, 0x02, 0x13, 0x07, 0x02, 0x78, 0x45, 0x50, 0x13, 0x0d, 0x02, 0x14, + 0x07, 0x01, 0x08, 0x17, 0xfe, 0x82, 0x19, 0x14, 0x0d, 0x01, 0x08, 0x17, 0xfe, 0x82, 0x19, 0x14, + 0x1d, 0x01, 0x08, 0x17, 0xfe, 0x82, 0x19, 0x5f, 0xfe, 0x89, 0x49, 0x01, 0x08, 0x02, 0x14, 0x07, + 0x01, 0x08, 0x17, 0xc1, 0x14, 0x1d, 0x01, 0x08, 0x17, 0xc1, 0x14, 0x07, 0x01, 0x08, 0x17, 0xc1, + 0xfe, 0x89, 0x49, 0x01, 0x08, 0x17, 0xc1, 0x5f, 0xfe, 0x89, 0x4a, 0x01, 0x08, 0x02, 0x50, 0x02, + 0x14, 0x07, 0x01, 0x08, 0x17, 0x74, 0x14, 0x7f, 0x01, 0x08, 0x17, 0x74, 0x14, 0x12, 0x01, 0x08, + 0x17, 0x74, 0xfe, 0x89, 0x49, 0x01, 0x08, 0x17, 0x74, 0x14, 0x00, 0x01, 0x08, 0x17, 0x74, 0xfe, + 0x89, 0x4a, 0x01, 0x08, 0x17, 0x74, 0xfe, 0x09, 0x49, 0x01, 0x08, 0x17, 0x74, 0x5f, 0xcc, 0x01, + 0x08, 0x02, 0x21, 0xe4, 0x09, 0x07, 0xfe, 0x4c, 0x13, 0xc8, 0x20, 0xe4, 0xfe, 0x49, 0xf4, 0x00, + 0x4d, 0x5f, 0xa1, 0x5e, 0xfe, 0x01, 0xec, 0xfe, 0x27, 0x01, 0xcc, 0xff, 0x02, 0x00, 0x10, 0x2f, + 0xfe, 0x3e, 0x1a, 0x01, 0x43, 0x09, 0xfe, 0xe3, 0x00, 0xfe, 0x22, 0x13, 0x16, 0xfe, 0x64, 0x1a, + 0x26, 0x20, 0x9e, 0x01, 0x41, 0x21, 0x9e, 0x09, 0x07, 0x5d, 0x01, 0x0c, 0x61, 0x07, 0x44, 0x02, + 0x0a, 0x5a, 0x01, 0x18, 0xfe, 0x00, 0x40, 0xaa, 0x09, 0x1a, 0xfe, 0x12, 0x13, 0x0a, 0x9d, 0x01, + 0x18, 0xaa, 0x0a, 0x67, 0x01, 0xa3, 0x02, 0x0a, 0x9d, 0x01, 0x18, 0xaa, 0xfe, 0x80, 0xe7, 0x1a, + 0x09, 0x1a, 0x5d, 0xfe, 0x45, 0x58, 0x01, 0xfe, 0xb2, 0x16, 0xaa, 0x02, 0x0a, 0x5a, 0x01, 0x18, + 0xaa, 0x0a, 0x67, 0x01, 0xa3, 0x02, 0x0a, 0x5a, 0x01, 0x18, 0x01, 0xfe, 0x7e, 0x1e, 0xfe, 0x80, + 0x4c, 0xfe, 0x49, 0xe4, 0x1a, 0xfe, 0x12, 0x13, 0x0a, 0x9d, 0x01, 0x18, 0xfe, 0x80, 0x4c, 0x0a, + 0x67, 0x01, 0x5c, 0x02, 0x1c, 0x1a, 0x87, 0x7c, 0xe5, 0xfe, 0x18, 0xdf, 0xfe, 0x19, 0xde, 0xfe, + 0x24, 0x1c, 0xfe, 0x1d, 0xf7, 0x28, 0xb1, 0xfe, 0x04, 0x1b, 0x01, 0xfe, 0x2a, 0x1c, 0xfa, 0xb3, + 0x28, 0x7c, 0xfe, 0x2c, 0x01, 0xfe, 0x2f, 0x19, 0x02, 0xc9, 0x2b, 0xfe, 0xf4, 0x1a, 0xfe, 0xfa, + 0x10, 0x1c, 0x1a, 0x87, 0x03, 0xfe, 0x64, 0x01, 0xfe, 0x00, 0xf4, 0x24, 0xfe, 0x18, 0x58, 0x03, + 0xfe, 0x66, 0x01, 0xfe, 0x19, 0x58, 0xb3, 0x24, 0x01, 0xfe, 0x0e, 0x1f, 0xfe, 0x30, 0xf4, 0x07, + 0xfe, 0x3c, 0x50, 0x7c, 0xfe, 0x38, 0x00, 0xfe, 0x0f, 0x79, 0xfe, 0x1c, 0xf7, 0x24, 0xb1, 0xfe, + 0x50, 0x1b, 0xfe, 0xd4, 0x14, 0x31, 0x02, 0xc9, 0x2b, 0xfe, 0x26, 0x1b, 0xfe, 0xba, 0x10, 0x1c, + 0x1a, 0x87, 0xfe, 0x83, 0x5a, 0xfe, 0x18, 0xdf, 0xfe, 0x19, 0xde, 0xfe, 0x1d, 0xf7, 0x54, 0xb1, + 0xfe, 0x72, 0x1b, 0xfe, 0xb2, 0x14, 0xfc, 0xb3, 0x54, 0x7c, 0x12, 0xfe, 0xaf, 0x19, 0xfe, 0x98, + 0xe7, 0x00, 0x02, 0xc9, 0x2b, 0xfe, 0x66, 0x1b, 0xfe, 0x8a, 0x10, 0x1c, 0x1a, 0x87, 0x8b, 0x0f, + 0xfe, 0x30, 0x90, 0x04, 0xfe, 0xb0, 0x93, 0x3a, 0x0b, 0xfe, 0x18, 0x58, 0xfe, 0x32, 0x90, 0x04, + 0xfe, 0xb2, 0x93, 0x3a, 0x0b, 0xfe, 0x19, 0x58, 0x0e, 0xa8, 0xb3, 0x4a, 0x7c, 0x12, 0xfe, 0x0f, + 0x79, 0xfe, 0x1c, 0xf7, 0x4a, 0xb1, 0xfe, 0xc6, 0x1b, 0xfe, 0x5e, 0x14, 0x31, 0x02, 0xc9, 0x2b, + 0xfe, 0x96, 0x1b, 0x5c, 0xfe, 0x02, 0xf6, 0x1a, 0x87, 0xfe, 0x18, 0xfe, 0x6a, 0xfe, 0x19, 0xfe, + 0x6b, 0x01, 0xfe, 0x1e, 0x1f, 0xfe, 0x1d, 0xf7, 0x65, 0xb1, 0xfe, 0xee, 0x1b, 0xfe, 0x36, 0x14, + 0xfe, 0x1c, 0x13, 0xb3, 0x65, 0x3e, 0xfe, 0x83, 0x58, 0xfe, 0xaf, 0x19, 0xfe, 0x80, 0xe7, 0x1a, + 0xfe, 0x81, 0xe7, 0x1a, 0x15, 0xfe, 0xdd, 0x00, 0x7a, 0x30, 0x02, 0x7a, 0x30, 0xfe, 0x12, 0x45, + 0x2b, 0xfe, 0xdc, 0x1b, 0x1f, 0x07, 0x47, 0xb5, 0xc3, 0x05, 0x35, 0xfe, 0x39, 0xf0, 0x75, 0x26, + 0x02, 0xfe, 0x7e, 0x18, 0x23, 0x1d, 0x36, 0x13, 0x11, 0x02, 0x87, 0x03, 0xe3, 0x23, 0x07, 0xfe, + 0xef, 0x12, 0xfe, 0xe1, 0x10, 0x90, 0x34, 0x60, 0xfe, 0x02, 0x80, 0x09, 0x56, 0xfe, 0x3c, 0x13, + 0xfe, 0x82, 0x14, 0xfe, 0x42, 0x13, 0x51, 0xfe, 0x06, 0x83, 0x0a, 0x5a, 0x01, 0x18, 0xcb, 0xfe, + 0x3e, 0x12, 0xfe, 0x41, 0x48, 0xfe, 0x45, 0x48, 0x01, 0xfe, 0xb2, 0x16, 0xfe, 0x00, 0xcc, 0xcb, + 0xfe, 0xf3, 0x13, 0x3f, 0x89, 0x09, 0x1a, 0xa5, 0x0a, 0x9d, 0x01, 0x18, 0xfe, 0x80, 0x4c, 0x01, + 0x85, 0xfe, 0x16, 0x10, 0x09, 0x9b, 0x4e, 0xfe, 0x40, 0x14, 0xfe, 0x24, 0x12, 0xfe, 0x14, 0x56, + 0xfe, 0xd6, 0xf0, 0xfe, 0x52, 0x1c, 0x1c, 0x0d, 0x02, 0xfe, 0x9c, 0xe7, 0x0d, 0x19, 0xfe, 0x15, + 0x00, 0x40, 0x8d, 0x30, 0x01, 0xf4, 0x1c, 0x07, 0x02, 0x51, 0xfe, 0x06, 0x83, 0xfe, 0x18, 0x80, + 0x61, 0x28, 0x44, 0x15, 0x56, 0x01, 0x85, 0x1c, 0x07, 0x02, 0xfe, 0x38, 0x90, 0xfe, 0xba, 0x90, + 0x91, 0xde, 0x7e, 0xdf, 0xfe, 0x48, 0x55, 0x31, 0xfe, 0xc9, 0x55, 0x02, 0x21, 0xb9, 0x88, 0x20, + 0xb9, 0x02, 0x0a, 0xba, 0x01, 0x18, 0xfe, 0x41, 0x48, 0x0a, 0x57, 0x01, 0x18, 0xfe, 0x49, 0x44, + 0x1b, 0xfe, 0x1e, 0x1d, 0x88, 0x89, 0x02, 0x0a, 0x5a, 0x01, 0x18, 0x09, 0x1a, 0xa4, 0x0a, 0x67, + 0x01, 0xa3, 0x0a, 0x57, 0x01, 0x18, 0x88, 0x89, 0x02, 0xfe, 0x4e, 0xe4, 0x1d, 0x7b, 0xfe, 0x52, + 0x1d, 0x03, 0xfe, 0x90, 0x00, 0xfe, 0x3a, 0x45, 0xfe, 0x2c, 0x10, 0xfe, 0x4e, 0xe4, 0xdd, 0x7b, + 0xfe, 0x64, 0x1d, 0x03, 0xfe, 0x92, 0x00, 0xd1, 0x12, 0xfe, 0x1a, 0x10, 0xfe, 0x4e, 0xe4, 0xfe, + 0x0b, 0x00, 0x7b, 0xfe, 0x76, 0x1d, 0x03, 0xfe, 0x94, 0x00, 0xd1, 0x24, 0xfe, 0x08, 0x10, 0x03, + 0xfe, 0x96, 0x00, 0xd1, 0x63, 0xfe, 0x4e, 0x45, 0x83, 0xca, 0xff, 0x04, 0x68, 0x54, 0xfe, 0xf1, + 0x10, 0x23, 0x49, 0xfe, 0x08, 0x1c, 0xfe, 0x67, 0x19, 0xfe, 0x0a, 0x1c, 0xfe, 0x1a, 0xf4, 0xfe, + 0x00, 0x04, 0x83, 0xb2, 0x1d, 0x48, 0xfe, 0xaa, 0x1d, 0x13, 0x1d, 0x02, 0x09, 0x92, 0xfe, 0x5a, + 0xf0, 0xfe, 0xba, 0x1d, 0x2e, 0x93, 0xfe, 0x34, 0x10, 0x09, 0x12, 0xfe, 0x5a, 0xf0, 0xfe, 0xc8, + 0x1d, 0x2e, 0xb4, 0xfe, 0x26, 0x10, 0x09, 0x1d, 0x36, 0x2e, 0x63, 0xfe, 0x1a, 0x10, 0x09, 0x0d, + 0x36, 0x2e, 0x94, 0xf2, 0x09, 0x07, 0x36, 0x2e, 0x95, 0xa1, 0xc8, 0x02, 0x1f, 0x93, 0x01, 0x42, + 0xfe, 0x04, 0xfe, 0x99, 0x03, 0x9c, 0x8b, 0x02, 0x2a, 0xfe, 0x1c, 0x1e, 0xfe, 0x14, 0xf0, 0x08, + 0x2f, 0xfe, 0x0c, 0x1e, 0x2a, 0xfe, 0x1c, 0x1e, 0x8f, 0xfe, 0x1c, 0x1e, 0xfe, 0x82, 0xf0, 0xfe, + 0x10, 0x1e, 0x02, 0x0f, 0x3f, 0x04, 0xfe, 0x80, 0x83, 0x33, 0x0b, 0x0e, 0x02, 0x0f, 0xfe, 0x18, + 0x80, 0x04, 0xfe, 0x98, 0x83, 0x33, 0x0b, 0x0e, 0x02, 0x0f, 0xfe, 0x02, 0x80, 0x04, 0xfe, 0x82, + 0x83, 0x33, 0x0b, 0x0e, 0x02, 0x0f, 0xfe, 0x06, 0x80, 0x04, 0xfe, 0x86, 0x83, 0x33, 0x0b, 0x0e, + 0x02, 0x0f, 0xfe, 0x1b, 0x80, 0x04, 0xfe, 0x9b, 0x83, 0x33, 0x0b, 0x0e, 0x02, 0x0f, 0xfe, 0x04, + 0x80, 0x04, 0xfe, 0x84, 0x83, 0x33, 0x0b, 0x0e, 0x02, 0x0f, 0xfe, 0x80, 0x80, 0x04, 0xfe, 0x80, + 0x83, 0xfe, 0xc9, 0x47, 0x0b, 0x0e, 0x02, 0x0f, 0xfe, 0x19, 0x81, 0x04, 0xfe, 0x99, 0x83, 0xfe, + 0xca, 0x47, 0x0b, 0x0e, 0x02, 0x0f, 0xfe, 0x06, 0x83, 0x04, 0xfe, 0x86, 0x83, 0xfe, 0xce, 0x47, + 0x0b, 0x0e, 0x02, 0x0f, 0xfe, 0x2c, 0x90, 0x04, 0xfe, 0xac, 0x93, 0x3a, 0x0b, 0x0e, 0x02, 0x0f, + 0xfe, 0xae, 0x90, 0x04, 0xfe, 0xae, 0x93, 0x79, 0x0b, 0x0e, 0x02, 0x0f, 0xfe, 0x08, 0x90, 0x04, + 0xfe, 0x88, 0x93, 0x3a, 0x0b, 0x0e, 0x02, 0x0f, 0xfe, 0x8a, 0x90, 0x04, 0xfe, 0x8a, 0x93, 0x79, + 0x0b, 0x0e, 0x02, 0x0f, 0xfe, 0x0c, 0x90, 0x04, 0xfe, 0x8c, 0x93, 0x3a, 0x0b, 0x0e, 0x02, 0x0f, + 0xfe, 0x8e, 0x90, 0x04, 0xfe, 0x8e, 0x93, 0x79, 0x0b, 0x0e, 0x02, 0x0f, 0xfe, 0x3c, 0x90, 0x04, + 0xfe, 0xbc, 0x93, 0x3a, 0x0b, 0x0e, 0x02, 0x8b, 0x0f, 0xfe, 0x03, 0x80, 0x04, 0xfe, 0x83, 0x83, + 0x33, 0x0b, 0x77, 0x0e, 0xa8, 0x02, 0xff, 0x66, 0x00, 0x00, }; STATIC unsigned short _adv_asc38C1600_size = - sizeof(_adv_asc38C1600_buf); /* 0x1662 */ + sizeof(_adv_asc38C1600_buf); /* 0x1673 */ STATIC ADV_DCNT _adv_asc38C1600_chksum = - 0x057A378AUL; /* Expanded little_endian checksum. */ + 0x0604EF77UL; /* Expanded little-endian checksum. */ /* a_init.c */ /* @@ -16629,12 +14573,13 @@ * Additional structure information can be found in a_condor.h where * the structure is defined. * - * The XXX_Field_IsChar structs are needed to correct for endianness. + * The *_Field_IsChar structs are needed to correct for endianness. * These values are read from the board 16 bits at a time directly - * into the structs. Because some fields are char, the values will be - * in the wrong order. The XXX_Field_IsChar tells when to flip the - * bytes. Cleaner solutions are welcome. :-) - * + * into the structs. Because some fields are char, the values will be + * in the wrong order. The *_Field_IsChar tells when to flip the + * bytes. Data read and written to PCI memory is automatically swapped + * on big-endian platforms so char fields read as words are actually being + * unswapped on big-endian platforms. */ STATIC ADVEEP_3550_CONFIG Default_3550_EEPROM_Config ASC_INITDATA = { @@ -16676,14 +14621,14 @@ STATIC ADVEEP_3550_CONFIG ADVEEP_3550_Config_Field_IsChar ASC_INITDATA = { - 0, /* cfg_lsw */ - 0, /* cfg_msw */ - 0, /* -disc_enable */ - 0, /* wdtr_able */ - 0, /* sdtr_able */ - 0, /* start_motor */ - 0, /* tagqng_able */ - 0, /* bios_scan */ + 0, /* cfg_lsw */ + 0, /* cfg_msw */ + 0, /* -disc_enable */ + 0, /* wdtr_able */ + 0, /* sdtr_able */ + 0, /* start_motor */ + 0, /* tagqng_able */ + 0, /* bios_scan */ 0, /* scam_tolerant */ 1, /* adapter_scsi_id */ 1, /* bios_boot_delay */ @@ -16691,11 +14636,11 @@ 1, /* bios_id_lun */ 1, /* termination */ 1, /* reserved1 */ - 0, /* bios_ctrl */ - 0, /* ultra_able */ + 0, /* bios_ctrl */ + 0, /* ultra_able */ 0, /* reserved2 */ - 1, /* max_host_qng */ - 1, /* max_dvc_qng */ + 1, /* max_host_qng */ + 1, /* max_dvc_qng */ 0, /* dvc_cntl */ 0, /* bug_fix */ 0, /* serial_number_word1 */ @@ -16779,14 +14724,14 @@ STATIC ADVEEP_38C0800_CONFIG ADVEEP_38C0800_Config_Field_IsChar ASC_INITDATA = { - 0, /* 00 cfg_lsw */ - 0, /* 01 cfg_msw */ - 0, /* 02 disc_enable */ - 0, /* 03 wdtr_able */ - 0, /* 04 sdtr_speed1 */ - 0, /* 05 start_motor */ - 0, /* 06 tagqng_able */ - 0, /* 07 bios_scan */ + 0, /* 00 cfg_lsw */ + 0, /* 01 cfg_msw */ + 0, /* 02 disc_enable */ + 0, /* 03 wdtr_able */ + 0, /* 04 sdtr_speed1 */ + 0, /* 05 start_motor */ + 0, /* 06 tagqng_able */ + 0, /* 07 bios_scan */ 0, /* 08 scam_tolerant */ 1, /* 09 adapter_scsi_id */ 1, /* bios_boot_delay */ @@ -16794,13 +14739,13 @@ 1, /* bios_id_lun */ 1, /* 11 termination_se */ 1, /* termination_lvd */ - 0, /* 12 bios_ctrl */ - 0, /* 13 sdtr_speed2 */ - 0, /* 14 sdtr_speed3 */ - 1, /* 15 max_host_qng */ - 1, /* max_dvc_qng */ + 0, /* 12 bios_ctrl */ + 0, /* 13 sdtr_speed2 */ + 0, /* 14 sdtr_speed3 */ + 1, /* 15 max_host_qng */ + 1, /* max_dvc_qng */ 0, /* 16 dvc_cntl */ - 0, /* 17 sdtr_speed4 */ + 0, /* 17 sdtr_speed4 */ 0, /* 18 serial_number_word1 */ 0, /* 19 serial_number_word2 */ 0, /* 20 serial_number_word3 */ @@ -16834,8 +14779,8 @@ 0, /* 55 reserved */ 0, /* 56 cisptr_lsw */ 0, /* 57 cisprt_msw */ - 0, /* 58 subsysvid */ - 0, /* 59 subsysid */ + 0, /* 58 subsysvid */ + 0, /* 59 subsysid */ 0, /* 60 reserved */ 0, /* 61 reserved */ 0, /* 62 reserved */ @@ -16909,14 +14854,14 @@ STATIC ADVEEP_38C1600_CONFIG ADVEEP_38C1600_Config_Field_IsChar ASC_INITDATA = { - 0, /* 00 cfg_lsw */ - 0, /* 01 cfg_msw */ - 0, /* 02 disc_enable */ - 0, /* 03 wdtr_able */ - 0, /* 04 sdtr_speed1 */ - 0, /* 05 start_motor */ - 0, /* 06 tagqng_able */ - 0, /* 07 bios_scan */ + 0, /* 00 cfg_lsw */ + 0, /* 01 cfg_msw */ + 0, /* 02 disc_enable */ + 0, /* 03 wdtr_able */ + 0, /* 04 sdtr_speed1 */ + 0, /* 05 start_motor */ + 0, /* 06 tagqng_able */ + 0, /* 07 bios_scan */ 0, /* 08 scam_tolerant */ 1, /* 09 adapter_scsi_id */ 1, /* bios_boot_delay */ @@ -16924,13 +14869,13 @@ 1, /* bios_id_lun */ 1, /* 11 termination_se */ 1, /* termination_lvd */ - 0, /* 12 bios_ctrl */ - 0, /* 13 sdtr_speed2 */ - 0, /* 14 sdtr_speed3 */ - 1, /* 15 max_host_qng */ - 1, /* max_dvc_qng */ + 0, /* 12 bios_ctrl */ + 0, /* 13 sdtr_speed2 */ + 0, /* 14 sdtr_speed3 */ + 1, /* 15 max_host_qng */ + 1, /* max_dvc_qng */ 0, /* 16 dvc_cntl */ - 0, /* 17 sdtr_speed4 */ + 0, /* 17 sdtr_speed4 */ 0, /* 18 serial_number_word1 */ 0, /* 19 serial_number_word2 */ 0, /* 20 serial_number_word3 */ @@ -16964,8 +14909,8 @@ 0, /* 55 reserved */ 0, /* 56 cisptr_lsw */ 0, /* 57 cisprt_msw */ - 0, /* 58 subsysvid */ - 0, /* 59 subsysid */ + 0, /* 58 subsysvid */ + 0, /* 59 subsysid */ 0, /* 60 reserved */ 0, /* 61 reserved */ 0, /* 62 reserved */ @@ -17052,11 +14997,11 @@ asc_dvc->cfg->chip_version = AdvGetChipVersion(iop_base, asc_dvc->bus_type); - ASC_DBG2(1, "AdvInitGetConfig: iopb_chip_id_1: %x %x\n", + ASC_DBG2(1, "AdvInitGetConfig: iopb_chip_id_1: 0x%x 0x%x\n", (ushort) AdvReadByteRegister(iop_base, IOPB_CHIP_ID_1), (ushort) ADV_CHIP_ID_BYTE); - ASC_DBG2(1, "AdvInitGetConfig: iopw_chip_id_0: %x %x\n", + ASC_DBG2(1, "AdvInitGetConfig: iopw_chip_id_0: 0x%x 0x%x\n", (ushort) AdvReadWordRegister(iop_base, IOPW_CHIP_ID_0), (ushort) ADV_CHIP_ID_WORD); @@ -17121,6 +15066,8 @@ * * For a non-fatal error return a warning code. If there are no warnings * then 0 is returned. + * + * Needed after initialization for error recovery. */ STATIC int AdvInitAsc3550Driver(ADV_DVC_VAR *asc_dvc) @@ -17233,7 +15180,7 @@ { AdvWriteWordAutoIncLram(iop_base, (((ushort) _adv_asc3550_buf[i + 3] << 8) | - _adv_asc3550_buf[i + 2])); + _adv_asc3550_buf[i + 2])); word++; } i += 3; @@ -17241,14 +15188,14 @@ { AdvWriteWordAutoIncLram(iop_base, (((ushort) _adv_asc3550_buf[i + 2] << 8) | - _adv_asc3550_buf[i + 1])); + _adv_asc3550_buf[i + 1])); i += 2; word++; } else { AdvWriteWordAutoIncLram(iop_base, (((ushort) _adv_asc3550_buf[(_adv_asc3550_buf[i] * 2) + 1] << 8) | - _adv_asc3550_buf[_adv_asc3550_buf[i] * 2])); + _adv_asc3550_buf[_adv_asc3550_buf[i] * 2])); word++; } } @@ -17414,7 +15361,6 @@ */ AdvWriteWordLram(iop_base, ASC_MC_DISC_ENABLE, asc_dvc->cfg->disc_enable); - /* * Set SCSI_CFG0 Microcode Default Value. * @@ -17608,8 +15554,8 @@ asc_dvc->err_code |= ASC_IERR_NO_CARRIER; return ADV_ERROR; } - asc_dvc->carr_freelist = - (ADV_CARR_T *) ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->icq_sp->next_vpa)); + asc_dvc->carr_freelist = (ADV_CARR_T *) + ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->icq_sp->next_vpa)); /* * The first command issued will be placed in the stopper carrier. @@ -17619,9 +15565,7 @@ /* * Set RISC ICQ physical address start value. */ - AdvWriteDWordLram(iop_base, ASC_MC_ICQ, - /* carr_pa is stored LE, must be native before write */ - le32_to_cpu(asc_dvc->icq_sp->carr_pa)); + AdvWriteDWordLramNoSwap(iop_base, ASC_MC_ICQ, asc_dvc->icq_sp->carr_pa); /* * Set-up the RISC->Host Initiator Response Queue (IRQ). @@ -17631,8 +15575,8 @@ asc_dvc->err_code |= ASC_IERR_NO_CARRIER; return ADV_ERROR; } - asc_dvc->carr_freelist = - (ADV_CARR_T *) ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->next_vpa)); + asc_dvc->carr_freelist = (ADV_CARR_T *) + ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->next_vpa)); /* * The first command completed by the RISC will be placed in @@ -17646,9 +15590,7 @@ /* * Set RISC IRQ physical address start value. */ - AdvWriteDWordLram(iop_base, ASC_MC_IRQ, - /* carr_pa is LE, must be native before write */ - le32_to_cpu(asc_dvc->irq_sp->carr_pa)); + AdvWriteDWordLramNoSwap(iop_base, ASC_MC_IRQ, asc_dvc->irq_sp->carr_pa); asc_dvc->carr_pending_cnt = 0; AdvWriteByteRegister(iop_base, IOPB_INTR_ENABLES, @@ -17704,6 +15646,8 @@ * * For a non-fatal error return a warning code. If there are no warnings * then 0 is returned. + * + * Needed after initialization for error recovery. */ STATIC int AdvInitAsc38C0800Driver(ADV_DVC_VAR *asc_dvc) @@ -18232,8 +16176,8 @@ asc_dvc->err_code |= ASC_IERR_NO_CARRIER; return ADV_ERROR; } - asc_dvc->carr_freelist = - (ADV_CARR_T *) ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->icq_sp->next_vpa)); + asc_dvc->carr_freelist = (ADV_CARR_T *) + ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->icq_sp->next_vpa)); /* * The first command issued will be placed in the stopper carrier. @@ -18242,10 +16186,9 @@ /* * Set RISC ICQ physical address start value. + * carr_pa is LE, must be native before write */ - AdvWriteDWordLram(iop_base, ASC_MC_ICQ, - /* carr_pa is LE, must be native before write */ - le32_to_cpu(asc_dvc->icq_sp->carr_pa)); + AdvWriteDWordLramNoSwap(iop_base, ASC_MC_ICQ, asc_dvc->icq_sp->carr_pa); /* * Set-up the RISC->Host Initiator Response Queue (IRQ). @@ -18255,8 +16198,8 @@ asc_dvc->err_code |= ASC_IERR_NO_CARRIER; return ADV_ERROR; } - asc_dvc->carr_freelist = - (ADV_CARR_T *) ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->next_vpa)); + asc_dvc->carr_freelist = (ADV_CARR_T *) + ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->next_vpa)); /* * The first command completed by the RISC will be placed in @@ -18269,10 +16212,10 @@ /* * Set RISC IRQ physical address start value. + * + * carr_pa is LE, must be native before write * */ - AdvWriteDWordLram(iop_base, ASC_MC_IRQ, - /* carr_pa is LE, must be native before write */ - le32_to_cpu(asc_dvc->irq_sp->carr_pa)); + AdvWriteDWordLramNoSwap(iop_base, ASC_MC_IRQ, asc_dvc->irq_sp->carr_pa); asc_dvc->carr_pending_cnt = 0; AdvWriteByteRegister(iop_base, IOPB_INTR_ENABLES, @@ -18328,11 +16271,11 @@ * * For a non-fatal error return a warning code. If there are no warnings * then 0 is returned. + * + * Needed after initialization for error recovery. */ -ASC_INITFUNC( -STATIC int, +STATIC int AdvInitAsc38C1600Driver(ADV_DVC_VAR *asc_dvc) -) { AdvPortAddr iop_base; ushort warn_code; @@ -18763,6 +16706,8 @@ * Clear Big Endian and Terminator Polarity bits and set possibly * modified termination control bits in the Microcode SCSI_CFG1 * Register Value. + * + * Big Endian bit is not used even on big endian machines. */ scsi_cfg1 &= (~BIG_ENDIAN & ~DIS_TERM_DRV & ~TERM_POL); @@ -18867,8 +16812,8 @@ asc_dvc->err_code |= ASC_IERR_NO_CARRIER; return ADV_ERROR; } - asc_dvc->carr_freelist = - (ADV_CARR_T *) ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->icq_sp->next_vpa)); + asc_dvc->carr_freelist = (ADV_CARR_T *) + ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->icq_sp->next_vpa)); /* * The first command issued will be placed in the stopper carrier. @@ -18880,11 +16825,9 @@ * COMMA register to the same value otherwise the RISC will * prematurely detect a command is available. */ - AdvWriteDWordLram(iop_base, ASC_MC_ICQ, - /* carr_pa is stored LE, must be native before write */ - le32_to_cpu(asc_dvc->icq_sp->carr_pa)); - AdvWriteDWordRegister(iop_base, IOPDW_COMMA, - le32_to_cpu(asc_dvc->icq_sp->carr_pa)); + AdvWriteDWordLramNoSwap(iop_base, ASC_MC_ICQ, asc_dvc->icq_sp->carr_pa); + AdvWriteDWordRegister(iop_base, IOPDW_COMMA, + le32_to_cpu(asc_dvc->icq_sp->carr_pa)); /* * Set-up the RISC->Host Initiator Response Queue (IRQ). @@ -18894,8 +16837,8 @@ asc_dvc->err_code |= ASC_IERR_NO_CARRIER; return ADV_ERROR; } - asc_dvc->carr_freelist = - (ADV_CARR_T *) ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->next_vpa)); + asc_dvc->carr_freelist = (ADV_CARR_T *) + ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->next_vpa)); /* * The first command completed by the RISC will be placed in @@ -18909,9 +16852,7 @@ /* * Set RISC IRQ physical address start value. */ - AdvWriteDWordLram(iop_base, ASC_MC_IRQ, - /* carr_pa is LE, must be native before write */ - le32_to_cpu(asc_dvc->irq_sp->carr_pa)); + AdvWriteDWordLramNoSwap(iop_base, ASC_MC_IRQ, asc_dvc->irq_sp->carr_pa); asc_dvc->carr_pending_cnt = 0; AdvWriteByteRegister(iop_base, IOPB_INTR_ENABLES, @@ -18989,8 +16930,6 @@ * Read the board's EEPROM configuration. * * Set default values if a bad checksum is found. - * - * XXX - Don't handle big-endian access to EEPROM yet. */ if (AdvGet3550EEPConfig(iop_base, &eep_config) != eep_config.check_sum) { @@ -19011,13 +16950,13 @@ * failed. */ eep_config.serial_number_word3 = - AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 1); + AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 1); eep_config.serial_number_word2 = - AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 2); + AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 2); eep_config.serial_number_word1 = - AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 3); + AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 3); AdvSet3550EEPConfig(iop_base, &eep_config); } @@ -19167,8 +17106,6 @@ * Read the board's EEPROM configuration. * * Set default values if a bad checksum is found. - * - * XXX - Don't handle big-endian access to EEPROM yet. */ if (AdvGet38C0800EEPConfig(iop_base, &eep_config) != eep_config.check_sum) { @@ -19189,13 +17126,13 @@ * failed. */ eep_config.serial_number_word3 = - AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 1); + AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 1); eep_config.serial_number_word2 = - AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 2); + AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 2); eep_config.serial_number_word1 = - AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 3); + AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 3); AdvSet38C0800EEPConfig(iop_base, &eep_config); } @@ -19465,13 +17402,13 @@ * failed. */ eep_config.serial_number_word3 = - AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 1); + AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 1); eep_config.serial_number_word2 = - AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 2); + AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 2); eep_config.serial_number_word1 = - AdvReadEEPWord(iop_base, ASC_EEP_DVC_CFG_END - 3); + AdvReadEEPWord(iop_base, ADV_EEP_DVC_CFG_END - 3); AdvSet38C1600EEPConfig(iop_base, &eep_config); } @@ -19660,38 +17597,37 @@ ushort wval, chksum; ushort *wbuf; int eep_addr; - ushort *charfields; + ushort *charfields; - /* Charfields will tell us which words coming from the EEProm should not - be byteswapped, because they are not a single short but a pair of - chars. */ - charfields = (ushort*) &ADVEEP_3550_Config_Field_IsChar; + charfields = (ushort *) &ADVEEP_3550_Config_Field_IsChar; wbuf = (ushort *) cfg_buf; chksum = 0; - for (eep_addr = ASC_EEP_DVC_CFG_BEGIN; - eep_addr < ASC_EEP_DVC_CFG_END; + for (eep_addr = ADV_EEP_DVC_CFG_BEGIN; + eep_addr < ADV_EEP_DVC_CFG_END; eep_addr++, wbuf++) { wval = AdvReadEEPWord(iop_base, eep_addr); - chksum += wval; - /* swap back as needed */ - if (*charfields++) - *wbuf = cpu_to_le16(wval); - else - *wbuf = wval; + chksum += wval; /* Checksum is calculated from word values. */ + if (*charfields++) { + *wbuf = le16_to_cpu(wval); + } else { + *wbuf = wval; + } } + /* Read checksum word. */ *wbuf = AdvReadEEPWord(iop_base, eep_addr); - if (*charfields++) - *wbuf = cpu_to_le16(*wbuf); - wbuf++; - for (eep_addr = ASC_EEP_DVC_CTL_BEGIN; - eep_addr < ASC_EEP_MAX_WORD_ADDR; + wbuf++; charfields++; + + /* Read rest of EEPROM not covered by the checksum. */ + for (eep_addr = ADV_EEP_DVC_CTL_BEGIN; + eep_addr < ADV_EEP_MAX_WORD_ADDR; eep_addr++, wbuf++) { *wbuf = AdvReadEEPWord(iop_base, eep_addr); - if (*charfields++) - *wbuf = cpu_to_le16(*wbuf); + if (*charfields++) { + *wbuf = le16_to_cpu(*wbuf); + } } return chksum; } @@ -19712,36 +17648,35 @@ int eep_addr; ushort *charfields; - /* Charfields will tell us which words coming from the EEProm should not - be byteswapped, because they are not a single short but a pair of - chars. */ - charfields = (ushort*) &ADVEEP_38C0800_Config_Field_IsChar; + charfields = (ushort *) &ADVEEP_38C0800_Config_Field_IsChar; wbuf = (ushort *) cfg_buf; chksum = 0; - for (eep_addr = ASC_EEP_DVC_CFG_BEGIN; - eep_addr < ASC_EEP_DVC_CFG_END; + for (eep_addr = ADV_EEP_DVC_CFG_BEGIN; + eep_addr < ADV_EEP_DVC_CFG_END; eep_addr++, wbuf++) { wval = AdvReadEEPWord(iop_base, eep_addr); - chksum += wval; - /* swap back as needed */ - if (*charfields++) - *wbuf = cpu_to_le16(wval); - else - *wbuf = wval; + chksum += wval; /* Checksum is calculated from word values. */ + if (*charfields++) { + *wbuf = le16_to_cpu(wval); + } else { + *wbuf = wval; + } } + /* Read checksum word. */ *wbuf = AdvReadEEPWord(iop_base, eep_addr); - if (*charfields++) - *wbuf = cpu_to_le16(*wbuf); - wbuf++; - for (eep_addr = ASC_EEP_DVC_CTL_BEGIN; - eep_addr < ASC_EEP_MAX_WORD_ADDR; + wbuf++; charfields++; + + /* Read rest of EEPROM not covered by the checksum. */ + for (eep_addr = ADV_EEP_DVC_CTL_BEGIN; + eep_addr < ADV_EEP_MAX_WORD_ADDR; eep_addr++, wbuf++) { *wbuf = AdvReadEEPWord(iop_base, eep_addr); - if (*charfields++) - *wbuf = cpu_to_le16(*wbuf); + if (*charfields++) { + *wbuf = le16_to_cpu(*wbuf); + } } return chksum; } @@ -19760,38 +17695,37 @@ ushort wval, chksum; ushort *wbuf; int eep_addr; - ushort *charfields; + ushort *charfields; - /* Charfields will tell us which words coming from the EEProm should not - be byteswapped, because they are not a single short but a pair of - chars. */ charfields = (ushort*) &ADVEEP_38C1600_Config_Field_IsChar; wbuf = (ushort *) cfg_buf; chksum = 0; - for (eep_addr = ASC_EEP_DVC_CFG_BEGIN; - eep_addr < ASC_EEP_DVC_CFG_END; + for (eep_addr = ADV_EEP_DVC_CFG_BEGIN; + eep_addr < ADV_EEP_DVC_CFG_END; eep_addr++, wbuf++) { wval = AdvReadEEPWord(iop_base, eep_addr); - chksum += wval; - /* swap back as needed */ - if (*charfields++) - *wbuf = cpu_to_le16(wval); - else - *wbuf = wval; + chksum += wval; /* Checksum is calculated from word values. */ + if (*charfields++) { + *wbuf = le16_to_cpu(wval); + } else { + *wbuf = wval; + } } + /* Read checksum word. */ *wbuf = AdvReadEEPWord(iop_base, eep_addr); - if (*charfields++) - *wbuf = cpu_to_le16(*wbuf); - wbuf++; - for (eep_addr = ASC_EEP_DVC_CTL_BEGIN; - eep_addr < ASC_EEP_MAX_WORD_ADDR; + wbuf++; charfields++; + + /* Read rest of EEPROM not covered by the checksum. */ + for (eep_addr = ADV_EEP_DVC_CTL_BEGIN; + eep_addr < ADV_EEP_MAX_WORD_ADDR; eep_addr++, wbuf++) { *wbuf = AdvReadEEPWord(iop_base, eep_addr); - if (*charfields++) - *wbuf = cpu_to_le16(*wbuf); + if (*charfields++) { + *wbuf = le16_to_cpu(*wbuf); + } } return chksum; } @@ -19820,7 +17754,7 @@ { int eep_delay_ms; - for (eep_delay_ms = 0; eep_delay_ms < ASC_EEP_DELAY_MS; eep_delay_ms++) + for (eep_delay_ms = 0; eep_delay_ms < ADV_EEP_DELAY_MS; eep_delay_ms++) { if (AdvReadWordRegister(iop_base, IOPW_EE_CMD) & ASC_EEP_CMD_DONE) { @@ -19853,44 +17787,47 @@ AdvWaitEEPCmd(iop_base); /* - * Write EEPROM from word 0 to word 20 + * Write EEPROM from word 0 to word 20. */ - for (addr = ASC_EEP_DVC_CFG_BEGIN; - addr < ASC_EEP_DVC_CFG_END; addr++, wbuf++) + for (addr = ADV_EEP_DVC_CFG_BEGIN; + addr < ADV_EEP_DVC_CFG_END; addr++, wbuf++) { - ushort tmp; - if (charfields++) { - uchar *cbuf = (uchar *) wbuf; - tmp = *cbuf + ((*(cbuf + 1)) << 8); - } - else - tmp = *wbuf; - chksum += tmp; - AdvWriteWordRegister(iop_base, IOPW_EE_DATA, tmp); + ushort word; + + if (*charfields++) { + word = cpu_to_le16(*wbuf); + } else { + word = *wbuf; + } + chksum += *wbuf; /* Checksum is calculated from word values. */ + AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word); AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr); AdvWaitEEPCmd(iop_base); - DvcSleepMilliSecond(ASC_EEP_DELAY_MS); + DvcSleepMilliSecond(ADV_EEP_DELAY_MS); } /* - * Write EEPROM checksum at word 21 + * Write EEPROM checksum at word 21. */ AdvWriteWordRegister(iop_base, IOPW_EE_DATA, chksum); AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr); AdvWaitEEPCmd(iop_base); - wbuf++; /* skip over check_sum */ + wbuf++; charfields++; /* - * Write EEPROM OEM name at words 22 to 29 + * Write EEPROM OEM name at words 22 to 29. */ - for (addr = ASC_EEP_DVC_CTL_BEGIN; - addr < ASC_EEP_MAX_WORD_ADDR; addr++, wbuf++) + for (addr = ADV_EEP_DVC_CTL_BEGIN; + addr < ADV_EEP_MAX_WORD_ADDR; addr++, wbuf++) { - uchar *cbuf; - ushort tmp; - cbuf = (uchar *) wbuf; - tmp = *cbuf + ((*(cbuf + 1)) << 8); - AdvWriteWordRegister(iop_base, IOPW_EE_DATA, tmp); + ushort word; + + if (*charfields++) { + word = cpu_to_le16(*wbuf); + } else { + word = *wbuf; + } + AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word); AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr); AdvWaitEEPCmd(iop_base); } @@ -19918,44 +17855,47 @@ AdvWaitEEPCmd(iop_base); /* - * Write EEPROM from word 0 to word 20 + * Write EEPROM from word 0 to word 20. */ - for (addr = ASC_EEP_DVC_CFG_BEGIN; - addr < ASC_EEP_DVC_CFG_END; addr++, wbuf++) + for (addr = ADV_EEP_DVC_CFG_BEGIN; + addr < ADV_EEP_DVC_CFG_END; addr++, wbuf++) { - ushort tmp; - if (*charfields++) { - uchar *cbuf = (uchar *) wbuf; - tmp = *cbuf + ((*(cbuf + 1)) << 8); - } - else - tmp = *wbuf; - chksum += tmp; - AdvWriteWordRegister(iop_base, IOPW_EE_DATA, tmp); + ushort word; + + if (*charfields++) { + word = cpu_to_le16(*wbuf); + } else { + word = *wbuf; + } + chksum += *wbuf; /* Checksum is calculated from word values. */ + AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word); AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr); AdvWaitEEPCmd(iop_base); - DvcSleepMilliSecond(ASC_EEP_DELAY_MS); + DvcSleepMilliSecond(ADV_EEP_DELAY_MS); } /* - * Write EEPROM checksum at word 21 + * Write EEPROM checksum at word 21. */ AdvWriteWordRegister(iop_base, IOPW_EE_DATA, chksum); AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr); AdvWaitEEPCmd(iop_base); - wbuf++; /* skip over check_sum */ + wbuf++; charfields++; /* - * Write EEPROM OEM name at words 22 to 29 + * Write EEPROM OEM name at words 22 to 29. */ - for (addr = ASC_EEP_DVC_CTL_BEGIN; - addr < ASC_EEP_MAX_WORD_ADDR; addr++, wbuf++) + for (addr = ADV_EEP_DVC_CTL_BEGIN; + addr < ADV_EEP_MAX_WORD_ADDR; addr++, wbuf++) { - uchar *cbuf; - ushort tmp; - cbuf = (uchar *) wbuf; - tmp = *cbuf + ((*(cbuf + 1)) << 8); - AdvWriteWordRegister(iop_base, IOPW_EE_DATA, tmp); + ushort word; + + if (*charfields++) { + word = cpu_to_le16(*wbuf); + } else { + word = *wbuf; + } + AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word); AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr); AdvWaitEEPCmd(iop_base); } @@ -19972,7 +17912,7 @@ ADVEEP_38C1600_CONFIG *cfg_buf) { ushort *wbuf; - ushort *charfields; + ushort *charfields; ushort addr, chksum; wbuf = (ushort *) cfg_buf; @@ -19983,44 +17923,47 @@ AdvWaitEEPCmd(iop_base); /* - * Write EEPROM from word 0 to word 20 + * Write EEPROM from word 0 to word 20. */ - for (addr = ASC_EEP_DVC_CFG_BEGIN; - addr < ASC_EEP_DVC_CFG_END; addr++, wbuf++) + for (addr = ADV_EEP_DVC_CFG_BEGIN; + addr < ADV_EEP_DVC_CFG_END; addr++, wbuf++) { - ushort tmp; - if (*charfields++) { - uchar *cbuf = (uchar *) wbuf; - tmp = *cbuf + ((*(cbuf + 1)) << 8); - } - else - tmp = *wbuf; - chksum += tmp; - AdvWriteWordRegister(iop_base, IOPW_EE_DATA, tmp); + ushort word; + + if (*charfields++) { + word = cpu_to_le16(*wbuf); + } else { + word = *wbuf; + } + chksum += *wbuf; /* Checksum is calculated from word values. */ + AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word); AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr); AdvWaitEEPCmd(iop_base); - DvcSleepMilliSecond(ASC_EEP_DELAY_MS); + DvcSleepMilliSecond(ADV_EEP_DELAY_MS); } /* - * Write EEPROM checksum at word 21 + * Write EEPROM checksum at word 21. */ AdvWriteWordRegister(iop_base, IOPW_EE_DATA, chksum); AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr); AdvWaitEEPCmd(iop_base); - wbuf++; /* skip over check_sum */ + wbuf++; charfields++; /* - * Write EEPROM OEM name at words 22 to 29 + * Write EEPROM OEM name at words 22 to 29. */ - for (addr = ASC_EEP_DVC_CTL_BEGIN; - addr < ASC_EEP_MAX_WORD_ADDR; addr++, wbuf++) + for (addr = ADV_EEP_DVC_CTL_BEGIN; + addr < ADV_EEP_MAX_WORD_ADDR; addr++, wbuf++) { - uchar *cbuf; - ushort tmp; - cbuf = (uchar *) wbuf; - tmp = *cbuf + ((*(cbuf + 1)) << 8); - AdvWriteWordRegister(iop_base, IOPW_EE_DATA, tmp); + ushort word; + + if (*charfields++) { + word = cpu_to_le16(*wbuf); + } else { + word = *wbuf; + } + AdvWriteWordRegister(iop_base, IOPW_EE_DATA, word); AdvWriteWordRegister(iop_base, IOPW_EE_CMD, ASC_EEP_CMD_WRITE | addr); AdvWaitEEPCmd(iop_base); } @@ -20055,7 +17998,7 @@ AdvExeScsiQueue(ADV_DVC_VAR *asc_dvc, ADV_SCSI_REQ_Q *scsiq) { - int last_int_level; + ulong last_int_level; AdvPortAddr iop_base; ADV_DCNT req_size; ADV_PADDR req_paddr; @@ -20083,10 +18026,11 @@ */ if ((new_carrp = asc_dvc->carr_freelist) == NULL) { + DvcLeaveCritical(last_int_level); return ADV_BUSY; } - asc_dvc->carr_freelist = - (ADV_CARR_T *) ADV_U32_TO_VADDR(le32_to_cpu(new_carrp->next_vpa)); + asc_dvc->carr_freelist = (ADV_CARR_T *) + ADV_U32_TO_VADDR(le32_to_cpu(new_carrp->next_vpa)); asc_dvc->carr_pending_cnt++; /* @@ -20105,7 +18049,7 @@ req_paddr = DvcGetPhyAddr(asc_dvc, scsiq, (uchar *) scsiq, (ADV_SDCNT *) &req_size, ADV_IS_SCSIQ_FLAG); - ASC_ASSERT(ADV_8BALIGN(req_paddr) == req_paddr); + ASC_ASSERT(ADV_32BALIGN(req_paddr) == req_paddr); ASC_ASSERT(req_size >= sizeof(ADV_SCSI_REQ_Q)); /* Wait for assertion before making little-endian */ @@ -20163,9 +18107,8 @@ * Notify the RISC a carrier is ready by writing the physical * address of the new carrier stopper to the COMMA register. */ - AdvWriteDWordRegister(iop_base, IOPDW_COMMA, - /* carr_pa is LE, must be native before write */ - le32_to_cpu(new_carrp->carr_pa)); + AdvWriteDWordRegister(iop_base, IOPDW_COMMA, + le32_to_cpu(new_carrp->carr_pa)); } DvcLeaveCritical(last_int_level); @@ -20362,6 +18305,7 @@ if ((int_stat & (ADV_INTR_STATUS_INTRA | ADV_INTR_STATUS_INTRB | ADV_INTR_STATUS_INTRC)) == 0) { + DvcLeaveCritical(flags); return ADV_FALSE; } @@ -20399,7 +18343,8 @@ /* * Check if the IRQ stopper carrier contains a completed request. */ - while (((irq_next_vpa = le32_to_cpu(asc_dvc->irq_sp->next_vpa)) & ASC_RQ_DONE) != 0) + while (((irq_next_vpa = + le32_to_cpu(asc_dvc->irq_sp->next_vpa)) & ASC_RQ_DONE) != 0) { /* * Get a pointer to the newly completed ADV_SCSI_REQ_Q structure. @@ -20410,7 +18355,8 @@ * below complements the conversion of ASC_SCSI_REQ_Q.scsiq_ptr' * in AdvExeScsiQueue(). */ - scsiq = (ADV_SCSI_REQ_Q *) ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->areq_vpa)); + scsiq = (ADV_SCSI_REQ_Q *) + ADV_U32_TO_VADDR(le32_to_cpu(asc_dvc->irq_sp->areq_vpa)); /* * Request finished with good status and the queue was not @@ -20433,7 +18379,8 @@ asc_dvc->irq_sp = (ADV_CARR_T *) ADV_U32_TO_VADDR(ASC_GET_CARRP(irq_next_vpa)); - free_carrp->next_vpa = cpu_to_le32(ADV_VADDR_TO_U32(asc_dvc->carr_freelist)); + free_carrp->next_vpa = + cpu_to_le32(ADV_VADDR_TO_U32(asc_dvc->carr_freelist)); asc_dvc->carr_freelist = free_carrp; asc_dvc->carr_pending_cnt--; @@ -20449,10 +18396,16 @@ * If the command that completed was a SCSI INQUIRY and * LUN 0 was sent the command, then process the INQUIRY * command information for the device. + * + * Note: If data returned were either VPD or CmdDt data, + * don't process the INQUIRY command information for + * the device, otherwise may erroneously set *_able bits. */ if (scsiq->done_status == QD_NO_ERROR && scsiq->cdb[0] == SCSICMD_Inquiry && - scsiq->target_lun == 0) + scsiq->target_lun == 0 && + (scsiq->cdb[1] & ADV_INQ_RTN_VPD_AND_CMDDT) + == ADV_INQ_RTN_STD_INQUIRY_DATA) { AdvInquiryHandling(asc_dvc, scsiq); } @@ -20504,7 +18457,7 @@ ushort idle_cmd, ADV_DCNT idle_cmd_parameter) { - int last_int_level; + ulong last_int_level; int result; ADV_DCNT i, j; AdvPortAddr iop_base; @@ -20527,8 +18480,8 @@ * followed, the microcode may process the idle command before the * parameters have been written to LRAM. */ - AdvWriteDWordLram(iop_base, ASC_MC_IDLE_CMD_PARAMETER, - idle_cmd_parameter); + AdvWriteDWordLramNoSwap(iop_base, ASC_MC_IDLE_CMD_PARAMETER, + cpu_to_le32(idle_cmd_parameter)); AdvWriteWordLram(iop_base, ASC_MC_IDLE_CMD, idle_cmd); /* @@ -20594,7 +18547,8 @@ * microcode to the transfer residual count. */ - if (scsiq->cdb[4] < 8 || (scsiq->cdb[4] - le32_to_cpu(scsiq->data_cnt)) < 8) + if (scsiq->cdb[4] < 8 || + (scsiq->cdb[4] - le32_to_cpu(scsiq->data_cnt)) < 8) { return; } @@ -20607,7 +18561,7 @@ /* * WDTR, SDTR, and Tag Queuing cannot be enabled for old devices. */ - if (INQ_RESPONSE_FMT(*inq) < 2 && INQ_ANSI_VER(*inq) < 2) + if (ADV_INQ_RESPONSE_FMT(inq) < 2 && ADV_INQ_ANSI_VER(inq) < 2) { return; } else @@ -20631,7 +18585,7 @@ * device's 'wdtr_able' bit and write the new value to the * microcode. */ - if ((asc_dvc->wdtr_able & tidmask) && INQ_WIDE16(*inq)) + if ((asc_dvc->wdtr_able & tidmask) && ADV_INQ_WIDE16(inq)) { AdvReadWordLram(iop_base, ASC_MC_WDTR_ABLE, cfg_word); if ((cfg_word & tidmask) == 0) @@ -20662,7 +18616,7 @@ * supports synchronous transfers, then turn on the device's * 'sdtr_able' bit. Write the new value to the microcode. */ - if ((asc_dvc->sdtr_able & tidmask) && INQ_SYNC(*inq)) + if ((asc_dvc->sdtr_able & tidmask) && ADV_INQ_SYNC(inq)) { AdvReadWordLram(iop_base, ASC_MC_SDTR_ABLE, cfg_word); if ((cfg_word & tidmask) == 0) @@ -20685,8 +18639,8 @@ * Clocking field, then check if DT mode is supported. */ if (asc_dvc->chip_type == ADV_CHIP_ASC38C1600 && - (scsiq->cdb[4] >= 57 - || (scsiq->cdb[4] - le32_to_cpu(scsiq->data_cnt)) >= 57)) + (scsiq->cdb[4] >= 57 || + (scsiq->cdb[4] - le32_to_cpu(scsiq->data_cnt)) >= 57)) { /* * PPR (Parallel Protocol Request) Capable @@ -20696,7 +18650,7 @@ * messages to negotiate synchronous speed and offset, transfer * width, and protocol options. */ - if (INQ_CLOCKING(*inq) & INQ_CLOCKING_DT_ONLY) + if (ADV_INQ_CLOCKING(inq) & ADV_INQ_CLOCKING_DT_ONLY) { AdvReadWordLram(iop_base, ASC_MC_PPR_ABLE, asc_dvc->ppr_able); asc_dvc->ppr_able |= tidmask; @@ -20716,7 +18670,7 @@ * disabling Tag Queuing in the BIOS devices with Tag Queuing * bugs will at least work with the BIOS. */ - if ((asc_dvc->tagqng_able & tidmask) && INQ_CMD_QUEUE(*inq)) + if ((asc_dvc->tagqng_able & tidmask) && ADV_INQ_CMD_QUEUE(inq)) { AdvReadWordLram(iop_base, ASC_MC_TAGQNG_ABLE, cfg_word); cfg_word |= tidmask; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/advansys.h linux.20p6/drivers/scsi/advansys.h --- linux.vanilla/drivers/scsi/advansys.h Sun Mar 25 17:31:31 2001 +++ linux.20p6/drivers/scsi/advansys.h Mon Jun 25 14:53:02 2001 @@ -2,7 +2,7 @@ * advansys.h - Linux Host Driver for AdvanSys SCSI Adapters * * Copyright (c) 1995-2000 Advanced System Products, Inc. - * Copyright (c) 2000 ConnectCom Solutions, Inc. + * Copyright (c) 2000-2001 ConnectCom Solutions, Inc. * All Rights Reserved. * * Redistribution and use in source and binary forms, with or without @@ -11,7 +11,7 @@ * modification. * * As of March 8, 2000 Advanced System Products, Inc. (AdvanSys) - * changed its name to name to ConnectCom Solutions, Inc. + * changed its name to ConnectCom Solutions, Inc. * * There is an AdvanSys Linux WWW page at: * http://www.connectcom.net/downloads/software/os/linux.html @@ -28,42 +28,38 @@ #ifndef _ADVANSYS_H #define _ADVANSYS_H -/* Convert Linux Version, Patch-level, Sub-level to LINUX_VERSION_CODE. */ -#define ASC_LINUX_VERSION(V, P, S) (((V) * 65536) + ((P) * 256) + (S)) - #ifndef LINUX_VERSION_CODE #include #endif /* LINUX_VERSION_CODE */ +/* Convert Linux Version, Patch-level, Sub-level to LINUX_VERSION_CODE. */ +#define ASC_LINUX_VERSION(V, P, S) (((V) * 65536) + ((P) * 256) + (S)) +/* Driver supported only in version 2.2 and version >= 2.4. */ +#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,2,0) || \ + (LINUX_VERSION_CODE > ASC_LINUX_VERSION(2,3,0) && \ + LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0)) +#error "AdvanSys driver supported only in 2.2 and 2.4 or greater kernels." +#endif +#define ASC_LINUX_KERNEL22 (LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,4,0)) +#define ASC_LINUX_KERNEL24 (LINUX_VERSION_CODE >= ASC_LINUX_VERSION(2,4,0)) + /* * Scsi_Host_Template function prototypes. */ int advansys_detect(Scsi_Host_Template *); int advansys_release(struct Scsi_Host *); const char *advansys_info(struct Scsi_Host *); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -int advansys_command(Scsi_Cmnd *); -#endif /* version < v2.3.28 */ int advansys_queuecommand(Scsi_Cmnd *, void (* done)(Scsi_Cmnd *)); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -int advansys_abort(Scsi_Cmnd *); -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,89) int advansys_reset(Scsi_Cmnd *); -#else /* version >= v1.3.89 */ -int advansys_reset(Scsi_Cmnd *, unsigned int); -#endif /* version >= v1.3.89 */ -#else /* version >= v2.3.28 */ -int advansys_eh_bus_reset(Scsi_Cmnd *); -#endif /* version >= v2.3.28 */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0) -int advansys_biosparam(Disk *, int, int[]); -#else /* version >= v1.3.0 */ int advansys_biosparam(Disk *, kdev_t, int[]); +#ifdef CONFIG_PROC_FS #if LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) extern struct proc_dir_entry proc_scsi_advansys; #endif /* version < v2.3.28 */ int advansys_proc_info(char *, char **, off_t, int, int, int); -#endif /* version >= v1.3.0 */ +#else /* !defined(CONFIG_PROC_FS) */ +#define advansys_proc_info NULL +#endif /* !defined(CONFIG_PROC_FS) */ /* init/main.c setup function */ void advansys_setup(char *, int *); @@ -71,108 +67,24 @@ /* * AdvanSys Host Driver Scsi_Host_Template (struct SHT) from hosts.h. */ -#if LINUX_VERSION_CODE < ASC_LINUX_VERSION(1,3,0) +#if ASC_LINUX_KERNEL24 #define ADVANSYS { \ - NULL, /* struct SHT *next */ \ - NULL, /* int *usage_count */ \ - "advansys", /* char *name */ \ - advansys_detect, /* int (*detect)(struct SHT *) */ \ - advansys_release, /* int (*release)(struct Scsi_Host *) */ \ - advansys_info, /* const char *(*info)(struct Scsi_Host *) */ \ - advansys_command, /* int (*command)(Scsi_Cmnd *) */ \ - advansys_queuecommand, \ - /* int (*queuecommand)(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)) */ \ - advansys_abort, /* int (*abort)(Scsi_Cmnd *) */ \ - advansys_reset, /* int (*reset)(Scsi_Cmnd *) */ \ - NULL, /* int (*slave_attach)(int, int) */ \ - advansys_biosparam, /* int (* bios_param)(Disk *, int, int []) */ \ - /* \ - * The following fields are set per adapter in advansys_detect(). \ - */ \ - 0, /* int can_queue */ \ - 0, /* int this_id */ \ - 0, /* short unsigned int sg_tablesize */ \ - 0, /* short cmd_per_lun */ \ - 0, /* unsigned char present */ \ - /* \ - * Because the driver may control an ISA adapter 'unchecked_isa_dma' \ - * must be set. The flag will be cleared in advansys_detect for non-ISA \ - * adapters. Refer to the comment in scsi_module.c for more information. \ - */ \ - 1, /* unsigned unchecked_isa_dma:1 */ \ - /* \ - * All adapters controlled by this driver are capable of large \ - * scatter-gather lists. According to the mid-level SCSI documentation \ - * this obviates any performance gain provided by setting \ - * 'use_clustering'. But empirically while CPU utilization is increased \ - * by enabling clustering, I/O throughput increases as well. \ - */ \ - ENABLE_CLUSTERING, /* unsigned use_clustering:1 */ \ -} -#elif LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,1,75) -#define ADVANSYS { \ - NULL, /* struct SHT *next */ \ - NULL, \ - /* version < v2.1.23 long *usage_count */ \ - /* version >= v2.1.23 struct module * */ \ - &proc_scsi_advansys, /* struct proc_dir_entry *proc_dir */ \ - advansys_proc_info, \ - /* int (*proc_info)(char *, char **, off_t, int, int, int) */ \ - "advansys", /* const char *name */ \ - advansys_detect, /* int (*detect)(struct SHT *) */ \ - advansys_release, /* int (*release)(struct Scsi_Host *) */ \ - advansys_info, /* const char *(*info)(struct Scsi_Host *) */ \ - advansys_command, /* int (*command)(Scsi_Cmnd *) */ \ - advansys_queuecommand, \ - /* int (*queuecommand)(Scsi_Cmnd *, void (*done)(Scsi_Cmnd *)) */ \ - advansys_abort, /* int (*abort)(Scsi_Cmnd *) */ \ - advansys_reset, \ - /* version < v1.3.89 int (*reset)(Scsi_Cmnd *) */ \ - /* version >= v1.3.89 int (*reset)(Scsi_Cmnd *, unsigned int) */ \ - NULL, /* int (*slave_attach)(int, int) */ \ - advansys_biosparam, /* int (* bios_param)(Disk *, kdev_t, int []) */ \ - /* \ - * The following fields are set per adapter in advansys_detect(). \ - */ \ - 0, /* int can_queue */ \ - 0, /* int this_id */ \ - 0, /* short unsigned int sg_tablesize */ \ - 0, /* short cmd_per_lun */ \ - 0, /* unsigned char present */ \ - /* \ - * Because the driver may control an ISA adapter 'unchecked_isa_dma' \ - * must be set. The flag will be cleared in advansys_detect for non-ISA \ - * adapters. Refer to the comment in scsi_module.c for more information. \ - */ \ - 1, /* unsigned unchecked_isa_dma:1 */ \ - /* \ - * All adapters controlled by this driver are capable of large \ - * scatter-gather lists. According to the mid-level SCSI documentation \ - * this obviates any performance gain provided by setting \ - * 'use_clustering'. But empirically while CPU utilization is increased \ - * by enabling clustering, I/O throughput increases as well. \ - */ \ - ENABLE_CLUSTERING, /* unsigned use_clustering:1 */ \ -} -#elif LINUX_VERSION_CODE < ASC_LINUX_VERSION(2,3,28) -#define ADVANSYS { \ - proc_dir: &proc_scsi_advansys, \ - proc_info: advansys_proc_info, \ - name: "advansys", \ - detect: advansys_detect, \ - release: advansys_release, \ - info: advansys_info, \ - command: advansys_command, \ - queuecommand: advansys_queuecommand, \ - abort: advansys_abort, \ - reset: advansys_reset, \ - bios_param: advansys_biosparam, \ + proc_name: "advansys", \ + proc_info: advansys_proc_info, \ + name: "advansys", \ + detect: advansys_detect, \ + release: advansys_release, \ + info: advansys_info, \ + queuecommand: advansys_queuecommand, \ + use_new_eh_code: 1, \ + eh_bus_reset_handler: advansys_reset, \ + bios_param: advansys_biosparam, \ /* \ * Because the driver may control an ISA adapter 'unchecked_isa_dma' \ * must be set. The flag will be cleared in advansys_detect for non-ISA \ * adapters. Refer to the comment in scsi_module.c for more information. \ */ \ - unchecked_isa_dma: 1, \ + unchecked_isa_dma: 1, \ /* \ * All adapters controlled by this driver are capable of large \ * scatter-gather lists. According to the mid-level SCSI documentation \ @@ -180,11 +92,10 @@ * 'use_clustering'. But empirically while CPU utilization is increased \ * by enabling clustering, I/O throughput increases as well. \ */ \ - use_clustering: ENABLE_CLUSTERING, \ + use_clustering: ENABLE_CLUSTERING, \ } -#else /* version >= v2.3.28 */ +#elif ASC_LINUX_KERNEL22 #define ADVANSYS { \ - proc_name: "advansys", \ proc_info: advansys_proc_info, \ name: "advansys", \ detect: advansys_detect, \ @@ -192,7 +103,7 @@ info: advansys_info, \ queuecommand: advansys_queuecommand, \ use_new_eh_code: 1, \ - eh_bus_reset_handler: advansys_eh_bus_reset, \ + eh_bus_reset_handler: advansys_reset, \ bios_param: advansys_biosparam, \ /* \ * Because the driver may control an ISA adapter 'unchecked_isa_dma' \ @@ -209,5 +120,5 @@ */ \ use_clustering: ENABLE_CLUSTERING, \ } -#endif /* version >= v2.3.28 */ +#endif #endif /* _ADVANSYS_H */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/cpqfcTScontrol.c linux.20p6/drivers/scsi/cpqfcTScontrol.c --- linux.vanilla/drivers/scsi/cpqfcTScontrol.c Sun Mar 25 17:31:34 2001 +++ linux.20p6/drivers/scsi/cpqfcTScontrol.c Tue Jun 19 09:59:54 2001 @@ -553,7 +553,7 @@ -// This "look ahead" function examines the IMQ for occurence of +// This "look ahead" function examines the IMQ for occurrence of // "type". Returns 1 if found, 0 if not. static int PeekIMQEntry( PTACHYON fcChip, ULONG type) { @@ -1204,7 +1204,7 @@ // open Login exchanges, in case the LinkDown happened in the // middle of logins. It's possible that some ports already // ACCepted login commands which we have not processed before - // another LinkDown occured. Any accepted Login exhanges are + // another LinkDown occurred. Any accepted Login exhanges are // invalidated by LinkDown, even before they are acknowledged. // It's also possible for a port to have a Queued Reply or Request // for login which was interrupted by LinkDown; it may come later, diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/cpqfcTSworker.c linux.20p6/drivers/scsi/cpqfcTSworker.c --- linux.vanilla/drivers/scsi/cpqfcTSworker.c Sun Mar 25 17:37:36 2001 +++ linux.20p6/drivers/scsi/cpqfcTSworker.c Tue Jun 19 09:59:54 2001 @@ -421,7 +421,7 @@ // printk(" *ELS %Xh* ", fcLQ->Qitem[QconsumerNdx].Type); // if PortDiscDone is not set, it means the SendLogins routine - // failed to complete -- assume that LDn occured, so login frames + // failed to complete -- assume that LDn occurred, so login frames // are invalid if( !cpqfcHBAdata->PortDiscDone) // cleared by LDn { diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/esp.c linux.20p6/drivers/scsi/esp.c --- linux.vanilla/drivers/scsi/esp.c Sun Mar 25 17:31:32 2001 +++ linux.20p6/drivers/scsi/esp.c Tue Jun 19 09:59:54 2001 @@ -3465,7 +3465,7 @@ /* Target negotiates for synchronous transfers before we do, this * is legal although very strange. What is even funnier is that * the SCSI2 standard specifically recommends against targets doing - * this because so many initiators cannot cope with this occuring. + * this because so many initiators cannot cope with this occurring. */ static int target_with_ants_in_pants(struct Sparc_ESP *esp, Scsi_Cmnd *SCptr, diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/gdth.h linux.20p6/drivers/scsi/gdth.h --- linux.vanilla/drivers/scsi/gdth.h Sun Mar 25 17:37:36 2001 +++ linux.20p6/drivers/scsi/gdth.h Mon Jun 25 14:53:02 2001 @@ -891,7 +891,7 @@ unchar ldr_no; /* log. drive no. */ unchar rw_attribs; /* r/w attributes */ unchar cluster_type; /* cluster properties */ - unchar media_changed; /* Flag:MOUNT/UNMOUNT occured */ + unchar media_changed; /* Flag:MOUNT/UNMOUNT occurred */ ulong32 start_sec; /* start sector */ } hdr[MAX_LDRIVES]; /* host drives */ struct { diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/ips.c linux.20p6/drivers/scsi/ips.c --- linux.vanilla/drivers/scsi/ips.c Sun Mar 25 17:31:34 2001 +++ linux.20p6/drivers/scsi/ips.c Tue Jun 19 09:59:54 2001 @@ -4835,7 +4835,7 @@ } if (j >= 45) - /* error occured */ + /* error occurred */ return (0); PostByte[i] = inb(ha->io_addr + IPS_REG_ISPR); @@ -4859,7 +4859,7 @@ } if (j >= 240) - /* error occured */ + /* error occurred */ return (0); ConfigByte[i] = inb(ha->io_addr + IPS_REG_ISPR); @@ -4924,7 +4924,7 @@ } if (j >= 45) - /* error occured */ + /* error occurred */ return (0); PostByte[i] = readb(ha->mem_ptr + IPS_REG_ISPR); @@ -4948,7 +4948,7 @@ } if (j >= 240) - /* error occured */ + /* error occurred */ return (0); ConfigByte[i] = readb(ha->mem_ptr + IPS_REG_ISPR); @@ -4965,7 +4965,7 @@ } if (i >= 240) - /* error occured */ + /* error occurred */ return (0); /* setup CCCR */ @@ -5015,7 +5015,7 @@ } if (i >= 45) { - /* error occured */ + /* error occurred */ printk(KERN_WARNING "(%s%d) timeout waiting for post.\n", ips_name, ha->host_num); @@ -5046,7 +5046,7 @@ } if (i >= 240) { - /* error occured */ + /* error occurred */ printk(KERN_WARNING "(%s%d) timeout waiting for config.\n", ips_name, ha->host_num); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/megaraid.c linux.20p6/drivers/scsi/megaraid.c --- linux.vanilla/drivers/scsi/megaraid.c Sun Mar 25 17:31:33 2001 +++ linux.20p6/drivers/scsi/megaraid.c Tue Jun 19 09:59:54 2001 @@ -1609,7 +1609,7 @@ } /*-------------------------------------------------------------------- - * Initializes the adress of the controller's mailbox register + * Initializes the address of the controller's mailbox register * The mailbox register is used to issue commands to the card. * Format of the mailbox area: * 00 01 command diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/osst.c linux.20p6/drivers/scsi/osst.c --- linux.vanilla/drivers/scsi/osst.c Sun Mar 25 17:37:36 2001 +++ linux.20p6/drivers/scsi/osst.c Mon Jun 18 08:22:48 2001 @@ -16,18 +16,18 @@ Copyright 1992 - 2000 Kai Makisara email Kai.Makisara@metla.fi - $Header: /home/cvsroot/Driver/osst.c,v 1.28.2.12.2.1 2000/12/15 20:36:12 garloff Exp $ + $Header: /home/cvsroot/Driver/osst.c,v 1.28.2.25 2001/06/03 21:56:26 riede Exp $ Last modified: Wed Feb 2 22:04:05 2000 by makisara@kai.makisara.local Some small formal changes - aeb, 950809 */ -static const char * cvsid = "$Id: osst.c,v 1.28.2.12.2.1 2000/12/15 20:36:12 garloff Exp $"; -const char * osst_version = "0.8.6.1"; +static const char * cvsid = "$Id: osst.c,v 1.28.2.25 2001/06/03 21:56:26 riede Exp $"; +const char * osst_version = "0.8.13"; /* The "failure to reconnect" firmware bug */ -#define OSST_FW_NEED_POLL_MIN 10602 /*(107A)*/ -#define OSST_FW_NEED_POLL_MAX 10708 /*(108D)*/ +#define OSST_FW_NEED_POLL_MIN 10601 /*(107A)*/ +#define OSST_FW_NEED_POLL_MAX 10704 /*(108D)*/ #define OSST_FW_NEED_POLL(x,d) ((x) >= OSST_FW_NEED_POLL_MIN && (x) <= OSST_FW_NEED_POLL_MAX && d->host->this_id != 7) #include @@ -95,6 +95,8 @@ #if DEBUG static int debugging = 1; +/* uncomment define below to test error recovery */ +// #define OSST_INJECT_ERRORS 1 #endif #define MAX_RETRIES 0 @@ -148,7 +150,7 @@ static int osst_get_frame_position(OS_Scsi_Tape *STp, Scsi_Cmnd ** aSCpnt); -static int osst_flush_write_buffer(OS_Scsi_Tape *STp, Scsi_Cmnd ** aSCpnt, int file_blk); +static int osst_flush_write_buffer(OS_Scsi_Tape *STp, Scsi_Cmnd ** aSCpnt); static int osst_write_error_recovery(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int pending); @@ -179,7 +181,7 @@ #if DEBUG if (debugging) { - printk(OSST_DEB_MSG "osst%d: Error: %x, cmd: %x %x %x %x %x %x Len: %d\n", + printk(OSST_DEB_MSG "osst%d:D: Error: %x, cmd: %x %x %x %x %x %x Len: %d\n", dev, result, SCpnt->data_cmnd[0], SCpnt->data_cmnd[1], SCpnt->data_cmnd[2], SCpnt->data_cmnd[3], SCpnt->data_cmnd[4], SCpnt->data_cmnd[5], @@ -199,14 +201,21 @@ SCpnt->data_cmnd[0] != MODE_SENSE && SCpnt->data_cmnd[0] != TEST_UNIT_READY)) { /* Abnormal conditions for tape */ if (driver_byte(result) & DRIVER_SENSE) { - printk(KERN_WARNING "osst%d: Error with sense data: ", dev); + printk(KERN_WARNING "osst%d:W: Error with sense data: ", dev); print_sense("osst", SCpnt); } - else + else { +static int notyetprinted = 1; printk(KERN_WARNING - "osst%d: Error %x (sugg. bt 0x%x, driver bt 0x%x, host bt 0x%x).\n", - dev, result, suggestion(result), driver_byte(result), + "osst%d:W: Error %x (sugg. bt 0x%x, driver bt 0x%x, host bt 0x%x).\n", + dev, result, suggestion(result), driver_byte(result) & DRIVER_MASK, host_byte(result)); + if (notyetprinted) { + notyetprinted = 0; + printk(KERN_INFO "osst%d:I: This error may be caused by your scsi controller,\n", dev); + printk(KERN_INFO "osst%d:I: it has been reported with some Buslogic cards.\n", dev); + } + } } if ((sense[0] & 0x70) == 0x70 && @@ -222,7 +231,7 @@ stp = "write"; else stp = "ioctl"; - printk(OSST_DEB_MSG "osst%d: Recovered %s error (%d).\n", dev, stp, + printk(OSST_DEB_MSG "osst%d:D: Recovered %s error (%d).\n", dev, stp, os_scsi_tapes[dev]->recover_count); } #endif @@ -237,7 +246,6 @@ static void osst_sleep_done (Scsi_Cmnd * SCpnt) { unsigned int st_nbr; - int remainder; OS_Scsi_Tape * STp; if ((st_nbr = TAPE_NR(SCpnt->request.rq_dev)) < osst_template.nr_dev) { @@ -246,14 +254,7 @@ (SCpnt->sense_buffer[0] & 0x70) == 0x70 && (SCpnt->sense_buffer[2] & 0x40)) { /* EOM at write-behind, has all been written? */ - if ((SCpnt->sense_buffer[0] & 0x80) != 0) - remainder = (SCpnt->sense_buffer[3] << 24) | - (SCpnt->sense_buffer[4] << 16) | - (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; - else - remainder = 0; - if ((SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW || - remainder > 0) + if ((SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW) (STp->buffer)->last_result = SCpnt->result; /* Error */ else (STp->buffer)->last_result = INT_MAX; /* OK */ @@ -270,7 +271,7 @@ } #if DEBUG else if (debugging) - printk(KERN_ERR "osst?: Illegal interrupt device %x\n", st_nbr); + printk(KERN_ERR "osst?:D: Illegal interrupt device %x\n", st_nbr); #endif } @@ -283,12 +284,14 @@ { unsigned long flags; unsigned char *bp; -//static int inject = 0; /* FIXME - take out inject occasional read errors */ -//static int repeat = 0; +#ifdef OSST_INJECT_ERRORS + static int inject = 0; + static int repeat = 0; +#endif spin_lock_irqsave(&io_request_lock, flags); if (SCpnt == NULL) if ((SCpnt = scsi_allocate_device(NULL, STp->device, 1)) == NULL) { - printk(KERN_ERR "osst%d: Can't get SCSI request.\n", TAPE_NR(STp->devt)); + printk(KERN_ERR "osst%d:E: Can't get SCSI request.\n", TAPE_NR(STp->devt)); spin_unlock_irqrestore(&io_request_lock, flags); return NULL; } @@ -317,12 +320,14 @@ down(SCpnt->request.sem); (STp->buffer)->last_result_fatal = osst_chk_result(SCpnt); -//if ((STp->buffer)->last_result_fatal == 0 && -// cmd[0] == READ_6 && cmd[4] && ( /* (++ inject % 83) == 29 || */ -// (STp->first_frame_position == 240 /* or STp->read_error_frame to fail again on the block calculated above */ && ++repeat < 3))) { -// printk(OSST_DEB_MSG "osst%d: injecting read error\n", TAPE_NR(STp->devt)); -// STp->buffer->last_result_fatal = 1; /* FIXME - take out inject occasional read errors */ -//} +#ifdef OSST_INJECT_ERRORS + if (STp->buffer->last_result_fatal == 0 && + cmd[0] == READ_6 && cmd[4] && ( /* (++ inject % 83) == 29 || */ + (STp->first_frame_position == 240 /* or STp->read_error_frame to fail again on the block calculated above */ && ++repeat < 3))) { + printk(OSST_DEB_MSG "osst%d:D: Injecting read error\n", TAPE_NR(STp->devt)); + STp->buffer->last_result_fatal = 1; + } +#endif } return SCpnt; @@ -333,7 +338,6 @@ static void osst_write_behind_check(OS_Scsi_Tape *STp) { OSST_buffer * STbuffer; - ST_partstat * STps; STbuffer = STp->buffer; @@ -357,21 +361,9 @@ scsi_release_command((STp->buffer)->last_SCpnt); if (STbuffer->writing < STbuffer->buffer_bytes) -#if 0 - memcpy(STbuffer->b_data, - STbuffer->b_data + STbuffer->writing, - STbuffer->buffer_bytes - STbuffer->writing); -#else - printk(KERN_WARNING "osst: write_behind_check: something left in buffer!\n"); -#endif + printk(KERN_WARNING "osst:A: write_behind_check: something left in buffer!\n"); + STbuffer->buffer_bytes -= STbuffer->writing; - STps = &(STp->ps[STp->partition]); - if (STps->drv_block >= 0) { - if (STp->block_size == 0) - STps->drv_block++; - else - STps->drv_block += STbuffer->writing / STp->block_size; - } STbuffer->writing = 0; return; @@ -383,7 +375,8 @@ /* * Initialize the OnStream AUX */ -static void osst_init_aux(OS_Scsi_Tape * STp, int frame_type, int logical_blk_num) +static void osst_init_aux(OS_Scsi_Tape * STp, int frame_type, int frame_seq_number, + int logical_blk_num, int blk_sz, int blk_cnt) { os_aux_t *aux = STp->buffer->aux; os_partition_t *par = &aux->partition; @@ -417,9 +410,10 @@ dat->reserved1 = 0; dat->entry_cnt = 1; dat->reserved3 = 0; - dat->dat_list[0].blk_sz = htonl(frame_type==OS_FRAME_TYPE_DATA?STp->block_size:0); - dat->dat_list[0].blk_cnt = htons(1); - dat->dat_list[0].flags = frame_type==OS_FRAME_TYPE_MARKER?OS_DAT_FLAGS_MARK:OS_DAT_FLAGS_DATA; + dat->dat_list[0].blk_sz = htonl(blk_sz); + dat->dat_list[0].blk_cnt = htons(blk_cnt); + dat->dat_list[0].flags = frame_type==OS_FRAME_TYPE_MARKER? + OS_DAT_FLAGS_MARK:OS_DAT_FLAGS_DATA; dat->dat_list[0].reserved = 0; case OS_FRAME_TYPE_EOD: aux->update_frame_cntr = htonl(0); @@ -428,27 +422,28 @@ par->wrt_pass_cntr = htons(STp->wrt_pass_cntr); par->first_frame_ppos = htonl(STp->first_data_ppos); par->last_frame_ppos = htonl(STp->capacity); - aux->frame_seq_num = htonl(logical_blk_num); + aux->frame_seq_num = htonl(frame_seq_number); aux->logical_blk_num_high = htonl(0); aux->logical_blk_num = htonl(logical_blk_num); break; default: ; /* probably FILL */ } - aux->filemark_cnt = ntohl(STp->filemark_cnt); /* FIXME -- violates ADR spec */ + aux->filemark_cnt = ntohl(STp->filemark_cnt); aux->phys_fm = ntohl(0xffffffff); aux->last_mark_ppos = ntohl(STp->last_mark_ppos); + aux->last_mark_lbn = ntohl(STp->last_mark_lbn); } /* * Verify that we have the correct tape frame */ -static int osst_verify_frame(OS_Scsi_Tape * STp, int logical_blk_num, int quiet) +static int osst_verify_frame(OS_Scsi_Tape * STp, int frame_seq_number, int quiet) { os_aux_t * aux = STp->buffer->aux; os_partition_t * par = &(aux->partition); ST_partstat * STps = &(STp->ps[STp->partition]); - int i; int dev = TAPE_NR(STp->devt); + int blk_cnt, blk_sz, i; if (STp->raw) { if (STp->buffer->last_result_fatal) { @@ -459,55 +454,70 @@ return 1; } if (STp->buffer->last_result_fatal) { - printk(KERN_INFO "osst%d: Skipping frame, read error\n", dev); - return 0; +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Skipping frame, read error\n", dev); +#endif + return 0; } if (ntohl(aux->format_id) != 0) { - printk(KERN_INFO "osst%d: Skipping frame, format_id %u\n", dev, ntohl(aux->format_id)); - return 0; +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Skipping frame, format_id %u\n", dev, ntohl(aux->format_id)); +#endif + goto err_out; } if (memcmp(aux->application_sig, STp->application_sig, 4) != 0 && (memcmp(aux->application_sig, "LIN3", 4) != 0 || STp->linux_media_version != 4)) { - printk(KERN_INFO "osst%d: Skipping frame, incorrect application signature\n", dev); - return 0; +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Skipping frame, incorrect application signature\n", dev); +#endif + goto err_out; } if (par->partition_num != OS_DATA_PARTITION) { if (!STp->linux_media || STp->linux_media_version != 2) { - printk(KERN_INFO "osst%d: Skipping frame, partition num %d\n", dev, par->partition_num); return 0; +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Skipping frame, partition num %d\n", + dev, par->partition_num); +#endif + goto err_out; } } if (par->par_desc_ver != OS_PARTITION_VERSION) { - printk(KERN_INFO "osst%d: Skipping frame, partition version %d\n", dev, par->par_desc_ver); - return 0; +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Skipping frame, partition version %d\n", dev, par->par_desc_ver); +#endif + goto err_out; } if (ntohs(par->wrt_pass_cntr) != STp->wrt_pass_cntr) { - printk(KERN_INFO "osst%d: Skipping frame, wrt_pass_cntr %d (expected %d)\n", +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Skipping frame, wrt_pass_cntr %d (expected %d)\n", dev, ntohs(par->wrt_pass_cntr), STp->wrt_pass_cntr); - return 0; - } - if (aux->frame_seq_num != aux->logical_blk_num) { - printk(KERN_INFO "osst%d: Skipping frame, seq != logical\n", dev); - return 0; +#endif + goto err_out; } if (aux->frame_type != OS_FRAME_TYPE_DATA && aux->frame_type != OS_FRAME_TYPE_EOD && aux->frame_type != OS_FRAME_TYPE_MARKER) { - if (!quiet) - printk(KERN_INFO "osst%d: Skipping frame, frame type %x\n", dev, aux->frame_type); - return 0; +#if DEBUG + if (!quiet) + printk(OSST_DEB_MSG "osst%d:D: Skipping frame, frame type %x\n", dev, aux->frame_type); +#endif + goto err_out; } if (aux->frame_type == OS_FRAME_TYPE_EOD && STp->first_frame_position < STp->eod_frame_ppos) { - printk(KERN_INFO "osst%d: skipping premature EOD frame %d\n", dev, STp->first_frame_position); - return 0; + printk(KERN_INFO "osst%d:I: skipping premature EOD frame %d\n", + dev, STp->first_frame_position); + goto err_out; } - STp->logical_blk_in_buffer = 1; + STp->frame_in_buffer = 1; - if (logical_blk_num != -1 && ntohl(aux->logical_blk_num) != logical_blk_num) { - if (!quiet) - printk(KERN_INFO "osst%d: Skipping frame, logical_blk_num %u (expected %d)\n", - dev, ntohl(aux->logical_blk_num), logical_blk_num); - return 0; + if (frame_seq_number != -1 && ntohl(aux->frame_seq_num) != frame_seq_number) { +#if DEBUG + if (!quiet) + printk(OSST_DEB_MSG "osst%d:D: Skipping frame, sequence number %u (expected %d)\n", + dev, ntohl(aux->frame_seq_num), frame_seq_number); +#endif + goto err_out; } if (aux->frame_type == OS_FRAME_TYPE_MARKER) { STps->eof = ST_FM_HIT; @@ -515,8 +525,8 @@ i = ntohl(aux->filemark_cnt); if (STp->header_cache != NULL && i < OS_FM_TAB_MAX && (i > STp->filemark_cnt || STp->first_frame_position - 1 != ntohl(STp->header_cache->dat_fm_tab.fm_tab_ent[i]))) { -#if 1 //DEBUG - printk(OSST_DEB_MSG "osst%i: %s filemark %d at frame %d\n", dev, +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: %s filemark %d at frame pos %d\n", dev, STp->header_cache->dat_fm_tab.fm_tab_ent[i] == 0?"Learned":"Corrected", i, STp->first_frame_position - 1); #endif @@ -529,9 +539,31 @@ STps->eof = ST_EOD_1; } if (aux->frame_type == OS_FRAME_TYPE_DATA) { - STps->eof = ST_NOEOF; + blk_cnt = ntohs(aux->dat.dat_list[0].blk_cnt); + blk_sz = ntohl(aux->dat.dat_list[0].blk_sz); + STp->buffer->buffer_bytes = blk_cnt * blk_sz; + STp->buffer->read_pointer = 0; + + /* See what block size was used to write file */ + if (STp->block_size != blk_sz && blk_sz > 0) { + printk(KERN_INFO + "osst%d:I: File was written with block size %d%c, currently %d%c, adjusted to match.\n", + dev, blk_sz<1024?blk_sz:blk_sz/1024,blk_sz<1024?'b':'k', + STp->block_size<1024?STp->block_size:STp->block_size/1024, + STp->block_size<1024?'b':'k'); + STp->block_size = blk_sz; + STp->buffer->buffer_blocks = OS_DATA_SIZE / blk_sz; + } + STps->eof = ST_NOEOF; } - return 1; + STp->frame_seq_number = ntohl(aux->frame_seq_num); + STp->logical_blk_num = ntohl(aux->logical_blk_num); + return 1; + +err_out: + if (STp->read_error_frame == 0) + STp->read_error_frame = STp->first_frame_position - 1; + return 0; } /* @@ -546,7 +578,7 @@ int dbg = debugging; int dev = TAPE_NR(STp->devt); - printk(OSST_DEB_MSG "osst%d: reached onstream wait ready\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Reached onstream wait ready\n", dev); #endif memset(cmd, 0, MAX_COMMAND_SIZE); @@ -561,8 +593,8 @@ time_before(jiffies, startwait + timeout*HZ) ) { #if DEBUG if (debugging) { - printk(OSST_DEB_MSG "osst%d: Sleeping in onstream wait ready\n", dev); - printk(OSST_DEB_MSG "osst%d: Turning off debugging for a while\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Sleeping in onstream wait ready\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Turning off debugging for a while\n", dev); debugging = 0; } #endif @@ -581,12 +613,12 @@ if ( SCpnt->sense_buffer[2] && osst_write_error_recovery(STp, aSCpnt, 0) ) { #if DEBUG - printk(OSST_DEB_MSG "osst%d: Abnormal exit from onstream wait ready\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Abnormal exit from onstream wait ready\n", dev); #endif return (-EIO); } #if DEBUG - printk(OSST_DEB_MSG "osst%d: Normal exit from onstream wait ready\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Normal exit from onstream wait ready\n", dev); #endif return 0; } @@ -614,7 +646,7 @@ #if DEBUG int dev = TAPE_NR(STp->devt); - printk(OSST_DEB_MSG "osst%d: Reached onstream flush drive buffer (write filemark)\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Reached onstream flush drive buffer (write filemark)\n", dev); #endif memset(cmd, 0, MAX_COMMAND_SIZE); @@ -667,7 +699,7 @@ char notyetprinted = 1; #endif if (minlast >= 0 && STp->ps[STp->partition].rw != ST_READING) - printk(KERN_ERR "osst%i: waiting for frame without having initialized read!\n", dev); + printk(KERN_ERR "osst%i:A: waiting for frame without having initialized read!\n", dev); while (time_before (jiffies, startwait + to*HZ)) { @@ -685,7 +717,8 @@ { #if DEBUG if (jiffies - startwait >= 2*HZ/OSST_POLL_PER_SEC) - printk ("osst%i: Succ wait f fr %i (>%i): %i-%i %i (%i): %3li.%li s\n", + printk (OSST_DEB_MSG + "osst%i:D: Succ wait f fr %i (>%i): %i-%i %i (%i): %3li.%li s\n", dev, curr, curr+minlast, STp->first_frame_position, STp->last_frame_position, STp->cur_frames, result, (jiffies-startwait)/HZ, @@ -696,7 +729,7 @@ #if DEBUG if (jiffies - startwait >= 2*HZ/OSST_POLL_PER_SEC && notyetprinted) { - printk ("osst%i: Wait for frame %i (>%i): %i-%i %i (%i)\n", + printk (KERN_INFO "osst%i:I: Wait for frame %i (>%i): %i-%i %i (%i)\n", dev, curr, curr+minlast, STp->first_frame_position, STp->last_frame_position, STp->cur_frames, result); notyetprinted--; @@ -706,7 +739,7 @@ schedule_timeout (HZ / OSST_POLL_PER_SEC); } #if DEBUG - printk ("osst%i: Fail wait f fr %i (>%i): %i-%i %i: %3li.%li s\n", + printk (OSST_DEB_MSG "osst%i:D: Fail wait f fr %i (>%i): %i-%i %i: %3li.%li s\n", dev, curr, curr+minlast, STp->first_frame_position, STp->last_frame_position, STp->cur_frames, (jiffies-startwait)/HZ, (((jiffies-startwait)%HZ)*10)/HZ); @@ -715,9 +748,9 @@ } /* - * Read the next OnStream tape block at the current location + * Read the next OnStream tape frame at the current location */ -static int osst_read_block(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int timeout) +static int osst_read_frame(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int timeout) { unsigned char cmd[MAX_COMMAND_SIZE]; Scsi_Cmnd * SCpnt; @@ -741,7 +774,7 @@ #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%i: Reading block from OnStream tape\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Reading frame from OnStream tape\n", dev); #endif SCpnt = osst_do_scsi(*aSCpnt, STp, cmd, OS_FRAME_SIZE, STp->timeout, MAX_RETRIES, TRUE); *aSCpnt = SCpnt; @@ -752,11 +785,13 @@ retval = 1; if (STp->read_error_frame == 0) { STp->read_error_frame = STp->first_frame_position; - printk(OSST_DEB_MSG "osst: recording read error at %d\n", STp->read_error_frame);/*FIXME*/ +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Recording read error at %d\n", dev, STp->read_error_frame); +#endif } #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: Sense: %2x %2x %2x %2x %2x %2x %2x %2x\n", + printk(OSST_DEB_MSG "osst%d:D: Sense: %2x %2x %2x %2x %2x %2x %2x %2x\n", dev, SCpnt->sense_buffer[0], SCpnt->sense_buffer[1], SCpnt->sense_buffer[2], SCpnt->sense_buffer[3], @@ -768,16 +803,19 @@ STp->first_frame_position++; #if DEBUG if (debugging) { - printk(OSST_DEB_MSG "osst%i: AUX: %c%c%c%c UpdFrCt#%d %s FrSeq#%d LogBlk#%d\n", dev, + printk(OSST_DEB_MSG + "osst%d:D: AUX: %c%c%c%c UpdFrCt#%d Wpass#%d %s FrSeq#%d LogBlk#%d Qty=%d Sz=%d\n", dev, aux->application_sig[0], aux->application_sig[1], - aux->application_sig[2], aux->application_sig[3], ntohl(aux->update_frame_cntr), + aux->application_sig[2], aux->application_sig[3], + ntohl(aux->update_frame_cntr), ntohs(aux->partition.wrt_pass_cntr), aux->frame_type==1?"EOD":aux->frame_type==2?"MARK": aux->frame_type==8?"HEADR":aux->frame_type==0x80?"DATA":"FILL", - ntohl(aux->frame_seq_num), ntohl(aux->logical_blk_num) ); + ntohl(aux->frame_seq_num), ntohl(aux->logical_blk_num), + ntohs(aux->dat.dat_list[0].blk_cnt), ntohl(aux->dat.dat_list[0].blk_sz) ); if (aux->frame_type==2) - printk(OSST_DEB_MSG "osst%i: mark_cnt=%d, last_mark=%d, next_mark=%d\n", dev, - ntohl(aux->filemark_cnt), ntohl(aux->last_mark_ppos), ntohl(aux->next_mark_ppos)); - printk(OSST_DEB_MSG "osst%i: Exit read block from OnStream tape with code %d\n", dev, retval); + printk(OSST_DEB_MSG "osst%d:D: mark_cnt=%d, last_mark_ppos=%d, last_mark_lbn=%d\n", dev, + ntohl(aux->filemark_cnt), ntohl(aux->last_mark_ppos), ntohl(aux->last_mark_lbn)); + printk(OSST_DEB_MSG "osst%d:D: Exit read frame from OnStream tape with code %d\n", dev, retval); } #endif return (retval); @@ -795,22 +833,22 @@ if (STps->rw != ST_READING) { /* Initialize read operation */ if (STps->rw == ST_WRITING) { - osst_flush_write_buffer(STp, aSCpnt, 1); + osst_flush_write_buffer(STp, aSCpnt); osst_flush_drive_buffer(STp, aSCpnt); } STps->rw = ST_READING; - STp->logical_blk_in_buffer = 0; + STp->frame_in_buffer = 0; /* * Issue a read 0 command to get the OnStream drive - * read blocks into its buffer. + * read frames into its buffer. */ memset(cmd, 0, MAX_COMMAND_SIZE); cmd[0] = READ_6; cmd[1] = 1; #if DEBUG - printk(OSST_DEB_MSG "osst%i: Start Read Ahead on OnStream tape\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Start Read Ahead on OnStream tape\n", dev); #endif SCpnt = osst_do_scsi(*aSCpnt, STp, cmd, 0, STp->timeout, MAX_RETRIES, TRUE); *aSCpnt = SCpnt; @@ -820,7 +858,7 @@ return retval; } -static int osst_get_logical_blk(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int logical_blk_num, int quiet) +static int osst_get_logical_frame(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int frame_seq_number, int quiet) { ST_partstat * STps = &(STp->ps[STp->partition]); int dev = TAPE_NR(STp->devt); @@ -831,16 +869,16 @@ position; /* - * Search and wait for the next logical tape block + * Search and wait for the next logical tape frame */ while (1) { if (cnt++ > 400) { - printk(KERN_WARNING "osst%d: Couldn't find logical block %d, aborting\n", - dev, logical_blk_num); + printk(KERN_ERR "osst%d:E: Couldn't find logical frame %d, aborting\n", + dev, frame_seq_number); if (STp->read_error_frame) { osst_set_frame_position(STp, aSCpnt, STp->read_error_frame, 0); -#if 1 //DEBUG - printk(OSST_DEB_MSG "osst%d: Repositioning tape to bad block %d\n", +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Repositioning tape to bad frame %d\n", dev, STp->read_error_frame); #endif STp->read_error_frame = 0; @@ -849,54 +887,55 @@ } #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: Looking for block %d, attempt %d\n", - dev, logical_blk_num, cnt); + printk(OSST_DEB_MSG "osst%d:D: Looking for frame %d, attempt %d\n", + dev, frame_seq_number, cnt); #endif if ( osst_initiate_read(STp, aSCpnt) - || ( (!STp->logical_blk_in_buffer) && osst_read_block(STp, aSCpnt, 30) ) ) { + || ( (!STp->frame_in_buffer) && osst_read_frame(STp, aSCpnt, 30) ) ) { position = osst_get_frame_position(STp, aSCpnt); if (position >= 0xbae && position < 0xbb8) position = 0xbb8; else if (position > STp->eod_frame_ppos || ++bad == 10) { -printk(OSST_DEB_MSG "osst%d: start again from pos %d, eod %d, bad %d\n", dev, position, STp->eod_frame_ppos, bad); /*FIXME*/ position = STp->read_error_frame - 1; } else { position += 39; cnt += 20; } -#if 1 //DEBUG - printk(OSST_DEB_MSG "osst%d: Bad block detected, positioning tape to block %d\n", +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Bad frame detected, positioning tape to frame %d\n", dev, position); #endif osst_set_frame_position(STp, aSCpnt, position, 0); continue; } - if (osst_verify_frame(STp, logical_blk_num, quiet)) + if (osst_verify_frame(STp, frame_seq_number, quiet)) break; if (osst_verify_frame(STp, -1, quiet)) { - x = ntohl(STp->buffer->aux->logical_blk_num); + x = ntohl(STp->buffer->aux->frame_seq_num); if (STp->fast_open) { -#if 1 //DEBUG - printk(OSST_DEB_MSG "osst%d: Found logical block %d instead of %d after fast open\n", - dev, x, logical_blk_num); -#endif + printk(KERN_WARNING + "osst%d:W: Found logical frame %d instead of %d after fast open\n", + dev, x, frame_seq_number); STp->header_ok = 0; STp->read_error_frame = 0; return (-EIO); } - if (x > logical_blk_num) { + if (x > frame_seq_number) { if (++past > 3) { - /* positioning backwards did not bring us to the desired block */ + /* positioning backwards did not bring us to the desired frame */ position = STp->read_error_frame - 1; } - else + else { position = osst_get_frame_position(STp, aSCpnt) - + logical_blk_num - x - 1; -#if 1 //DEBUG + + frame_seq_number - x - 1; + if (STp->first_frame_position >= 3000 && position < 3000) + position -= 10; + } +#if DEBUG printk(OSST_DEB_MSG - "osst%d: Found logical block %d while looking for %d: back up %d\n", - dev, x, logical_blk_num, + "osst%d:D: Found logical frame %d while looking for %d: back up %d\n", + dev, x, frame_seq_number, STp->first_frame_position - position); #endif osst_set_frame_position(STp, aSCpnt, position, 0); @@ -907,22 +946,26 @@ } if (osst_get_frame_position(STp, aSCpnt) == 0xbaf) { #if DEBUG - printk(OSST_DEB_MSG "osst%d: Skipping config partition\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Skipping config partition\n", dev); #endif osst_set_frame_position(STp, aSCpnt, 0xbb8, 0); cnt--; } - STp->logical_blk_in_buffer = 0; + STp->frame_in_buffer = 0; } if (cnt > 1) { STp->recover_count++; STp->recover_erreg++; + printk(KERN_WARNING "osst%d:I: Read error at position %d recovered\n", + dev, STp->read_error_frame); } - STp->logical_blk_num = ntohl(STp->buffer->aux->logical_blk_num); + STp->read_count++; #if DEBUG if (debugging || STps->eof) - printk(OSST_DEB_MSG "osst%i: Exit get logical block (%d=>%d) from OnStream tape with code %d\n", dev, logical_blk_num, STp->logical_blk_num, STps->eof); + printk(OSST_DEB_MSG + "osst%i:D: Exit get logical frame (%d=>%d) from OnStream tape with code %d\n", + dev, frame_seq_number, STp->frame_seq_number, STps->eof); #endif STp->fast_open = FALSE; STp->read_error_frame = 0; @@ -931,60 +974,196 @@ static int osst_seek_logical_blk(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int logical_blk_num) { - int estimate; - int retries = 0; - int dev = TAPE_NR(STp->devt); - + ST_partstat * STps = &(STp->ps[STp->partition]); + int dev = TAPE_NR(STp->devt); + int retries = 0; + int frame_seq_estimate, ppos_estimate, move; + if (logical_blk_num < 0) logical_blk_num = 0; - /* FIXME -- this may not be valid for foreign formats */ - if (logical_blk_num < 2980) estimate = logical_blk_num + 10; - else estimate = logical_blk_num + 20; - #if DEBUG - printk(OSST_DEB_MSG "osst%d: Seeking logical block %d (now at %d)\n", - dev, logical_blk_num, STp->logical_blk_num); -#endif + printk(OSST_DEB_MSG "osst%d:D: Seeking logical block %d (now at %d, size %d%c)\n", + dev, logical_blk_num, STp->logical_blk_num, + STp->block_size<1024?STp->block_size:STp->block_size/1024, + STp->block_size<1024?'b':'k'); +#endif + /* Do we know where we are? */ + if (STps->drv_block >= 0) { + move = logical_blk_num - STp->logical_blk_num; + if (move < 0) move -= (OS_DATA_SIZE / STp->block_size) - 1; + move /= (OS_DATA_SIZE / STp->block_size); + frame_seq_estimate = STp->frame_seq_number + move; + } else + frame_seq_estimate = logical_blk_num * STp->block_size / OS_DATA_SIZE; + + if (frame_seq_estimate < 2980) ppos_estimate = frame_seq_estimate + 10; + else ppos_estimate = frame_seq_estimate + 20; + while (++retries < 10) { - osst_set_frame_position(STp, aSCpnt, estimate, 0); - if (osst_get_logical_blk(STp, aSCpnt, logical_blk_num, 1) >= 0) - return 0; - if (osst_get_logical_blk(STp, aSCpnt, -1, 1) < 0) + if (ppos_estimate > STp->eod_frame_ppos-2) { + frame_seq_estimate += STp->eod_frame_ppos - 2 - ppos_estimate; + ppos_estimate = STp->eod_frame_ppos - 2; + } + if (frame_seq_estimate < 0) { + frame_seq_estimate = 0; + ppos_estimate = 10; + } + osst_set_frame_position(STp, aSCpnt, ppos_estimate, 0); + if (osst_get_logical_frame(STp, aSCpnt, frame_seq_estimate, 1) >= 0) { + /* we've located the estimated frame, now does it have our block? */ + if (logical_blk_num < STp->logical_blk_num || + logical_blk_num >= STp->logical_blk_num + ntohs(STp->buffer->aux->dat.dat_list[0].blk_cnt)) { + if (STps->eof == ST_FM_HIT) + move = logical_blk_num < STp->logical_blk_num? -2 : 1; + else { + move = logical_blk_num - STp->logical_blk_num; + if (move < 0) move -= (OS_DATA_SIZE / STp->block_size) - 1; + move /= (OS_DATA_SIZE / STp->block_size); + } +#if DEBUG + printk(OSST_DEB_MSG + "osst%d:D: Seek retry %d at ppos %d fsq %d (est %d) lbn %d (need %d) move %d\n", + dev, retries, ppos_estimate, STp->frame_seq_number, frame_seq_estimate, + STp->logical_blk_num, logical_blk_num, move); +#endif + frame_seq_estimate += move; + ppos_estimate += move; + continue; + } else { + STp->buffer->read_pointer = (logical_blk_num - STp->logical_blk_num) * STp->block_size; + STp->buffer->buffer_bytes -= STp->buffer->read_pointer; + STp->logical_blk_num = logical_blk_num; +#if DEBUG + printk(OSST_DEB_MSG + "osst%d:D: Seek success at ppos %d fsq %d in_buf %d, bytes %d, ptr %d*%d\n", + dev, ppos_estimate, STp->frame_seq_number, STp->frame_in_buffer, + STp->buffer->buffer_bytes, STp->buffer->read_pointer / STp->block_size, + STp->block_size); +#endif + STps->drv_file = ntohl(STp->buffer->aux->filemark_cnt); + if (STps->eof == ST_FM_HIT) { + STps->drv_file++; + STps->drv_block = 0; + } else { + STps->drv_block = ntohl(STp->buffer->aux->last_mark_lbn)? + STp->logical_blk_num - + (STps->drv_file ? ntohl(STp->buffer->aux->last_mark_lbn) + 1 : 0): + -1; + } + STps->eof = (STp->first_frame_position >= STp->eod_frame_ppos)?ST_EOD:ST_NOEOF; + return 0; + } + } + if (osst_get_logical_frame(STp, aSCpnt, -1, 1) < 0) goto error; - if (STp->logical_blk_num != logical_blk_num) - estimate += logical_blk_num - STp->logical_blk_num; + /* we are not yet at the estimated frame, adjust our estimate of its physical position */ +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Seek retry %d at ppos %d fsq %d (est %d) lbn %d (need %d)\n", + dev, retries, ppos_estimate, STp->frame_seq_number, frame_seq_estimate, + STp->logical_blk_num, logical_blk_num); +#endif + if (frame_seq_estimate != STp->frame_seq_number) + ppos_estimate += frame_seq_estimate - STp->frame_seq_number; else break; } error: - printk(KERN_WARNING "osst%d: Couldn't seek to logical block %d (at %d), %d retries\n", + printk(KERN_ERR "osst%d:E: Couldn't seek to logical block %d (at %d), %d retries\n", dev, logical_blk_num, STp->logical_blk_num, retries); return (-EIO); } -static int osst_seek_frame(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int frame) +/* The values below are based on the OnStream frame payload size of 32K == 2**15, + * that is, OSST_FRAME_SHIFT + OSST_SECTOR_SHIFT must be 15. With a minimum block + * size of 512 bytes, we need to be able to resolve 32K/512 == 64 == 2**6 positions + * inside each frame. Finaly, OSST_SECTOR_MASK == 2**OSST_FRAME_SHIFT - 1. + */ +#define OSST_FRAME_SHIFT 6 +#define OSST_SECTOR_SHIFT 9 +#define OSST_SECTOR_MASK 0x03F + +static int osst_get_sector(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt) { - ST_partstat * STps = &(STp->ps[STp->partition]); - int r; + int sector; +#if DEBUG + int dev = TAPE_NR(STp->devt); + + printk(OSST_DEB_MSG + "osst%d:D: Positioned at ppos %d, frame %d, lbn %d, file %d, blk %d, %cptr %d, eof %d\n", + dev, STp->first_frame_position, STp->frame_seq_number, STp->logical_blk_num, + STp->ps[STp->partition].drv_file, STp->ps[STp->partition].drv_block, + STp->ps[STp->partition].rw == ST_WRITING?'w':'r', + STp->ps[STp->partition].rw == ST_WRITING?STp->buffer->buffer_bytes: + STp->buffer->read_pointer, STp->ps[STp->partition].eof); +#endif + /* do we know where we are inside a file? */ + if (STp->ps[STp->partition].drv_block >= 0) { + sector = (STp->frame_in_buffer ? STp->first_frame_position-1 : + STp->first_frame_position) << OSST_FRAME_SHIFT; + if (STp->ps[STp->partition].rw == ST_WRITING) + sector |= (STp->buffer->buffer_bytes >> OSST_SECTOR_SHIFT) & OSST_SECTOR_MASK; + else + sector |= (STp->buffer->read_pointer >> OSST_SECTOR_SHIFT) & OSST_SECTOR_MASK; + } else { + sector = osst_get_frame_position(STp, aSCpnt); + if (sector > 0) + sector <<= OSST_FRAME_SHIFT; + } + return sector; +} +static int osst_seek_sector(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int sector) +{ + ST_partstat * STps = &(STp->ps[STp->partition]); + int frame = sector >> OSST_FRAME_SHIFT, + offset = (sector & OSST_SECTOR_MASK) << OSST_SECTOR_SHIFT, + r; +#if DEBUG + int dev = TAPE_NR(STp->devt); + + printk(OSST_DEB_MSG "osst%d:D: Seeking sector %d in frame %d at offset %d\n", + dev, sector, frame, offset); +#endif if (frame < 0 || frame >= STp->capacity) return (-ENXIO); if (frame <= STp->first_data_ppos) { - STp->logical_blk_num = STps->drv_file = STps->drv_block = 0; + STp->frame_seq_number = STp->logical_blk_num = STps->drv_file = STps->drv_block = 0; return (osst_set_frame_position(STp, aSCpnt, frame, 0)); } - r = osst_set_frame_position(STp, aSCpnt, frame-1, 0); + r = osst_set_frame_position(STp, aSCpnt, offset?frame:frame-1, 0); if (r < 0) return r; - r = osst_get_logical_blk(STp, aSCpnt, -1, 1); + r = osst_get_logical_frame(STp, aSCpnt, -1, 1); if (r < 0) return r; - if (osst_get_frame_position(STp, aSCpnt) != frame) return (-EIO); + if (osst_get_frame_position(STp, aSCpnt) != (offset?frame+1:frame)) return (-EIO); - STp->logical_blk_num++; - STp->logical_blk_in_buffer = 0; - STps->drv_file = htonl(STp->buffer->aux->filemark_cnt); - STps->drv_block = -1; - STps->eof = ST_NOEOF; /* FIXME test for eod */ + if (offset) { + STp->logical_blk_num += offset / STp->block_size; + STp->buffer->read_pointer = offset; + STp->buffer->buffer_bytes -= offset; + } else { + STp->frame_seq_number++; + STp->frame_in_buffer = 0; + STp->logical_blk_num += ntohs(STp->buffer->aux->dat.dat_list[0].blk_cnt); + STp->buffer->buffer_bytes = STp->buffer->read_pointer = 0; + } + STps->drv_file = ntohl(STp->buffer->aux->filemark_cnt); + if (STps->eof == ST_FM_HIT) { + STps->drv_file++; + STps->drv_block = 0; + } else { + STps->drv_block = ntohl(STp->buffer->aux->last_mark_lbn)? + STp->logical_blk_num - + (STps->drv_file ? ntohl(STp->buffer->aux->last_mark_lbn) + 1 : 0): + -1; + } + STps->eof = (STp->first_frame_position >= STp->eod_frame_ppos)?ST_EOD:ST_NOEOF; +#if DEBUG + printk(OSST_DEB_MSG + "osst%d:D: Now positioned at ppos %d, frame %d, lbn %d, file %d, blk %d, rptr %d, eof %d\n", + dev, STp->first_frame_position, STp->frame_seq_number, STp->logical_blk_num, + STps->drv_file, STps->drv_block, STp->buffer->read_pointer, STps->eof); +#endif return 0; } @@ -992,38 +1171,43 @@ * Read back the drive's internal buffer contents, as a part * of the write error recovery mechanism for old OnStream * firmware revisions. + * Precondition for this function to work: all frames in the + * drive's buffer must be of one type (DATA, MARK or EOD)! */ static int osst_read_back_buffer_and_rewrite(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, - unsigned int block, unsigned int skip, int pending) + unsigned int frame, unsigned int skip, int pending) { Scsi_Cmnd * SCpnt = * aSCpnt; unsigned char * buffer, * p; unsigned char cmd[MAX_COMMAND_SIZE]; - int frames, flag, new_block, i, logical_blk_num; - int dev = TAPE_NR(STp->devt); - long startwait = jiffies; + int flag, new_frame, i; + int nframes = STp->cur_frames; + int blks_per_frame = ntohs(STp->buffer->aux->dat.dat_list[0].blk_cnt); + int frame_seq_number = ntohl(STp->buffer->aux->frame_seq_num) + - (nframes + pending - 1); + int logical_blk_num = ntohl(STp->buffer->aux->logical_blk_num) + - (nframes + pending - 1) * blks_per_frame; + int dev = TAPE_NR(STp->devt); + long startwait = jiffies; #if DEBUG - int dbg = debugging; + int dbg = debugging; #endif - frames = STp->cur_frames; - if ((buffer = (unsigned char *)vmalloc((frames + pending) * OS_DATA_SIZE)) == NULL) + if ((buffer = (unsigned char *)vmalloc((nframes + 1) * OS_DATA_SIZE)) == NULL) return (-EIO); - logical_blk_num = STp->logical_blk_num - frames - pending; - printk(KERN_INFO "osst%d: Reading back %d frames from drive buffer%s\n", - dev, frames, pending?" and one that was pending":""); - - if (pending) { - osst_copy_from_buffer(STp->buffer, (p = &buffer[frames * OS_DATA_SIZE])); -// memcpy((p = &buffer[frames * OS_DATA_SIZE]), STp->buffer->b_data, OS_DATA_SIZE); + printk(KERN_INFO "osst%d:I: Reading back %d frames from drive buffer%s\n", + dev, nframes, pending?" and one that was pending":""); + + osst_copy_from_buffer(STp->buffer, (p = &buffer[nframes * OS_DATA_SIZE])); #if DEBUG - if (debugging) - printk(OSST_DEB_MSG "osst%d: Pending logical block %d, data %x %x %x %x\n", - dev, logical_blk_num + frames, p[0], p[1], p[2], p[3]); + if (pending && debugging) + printk(OSST_DEB_MSG "osst%d:D: Pending frame %d (lblk %d), data %02x %02x %02x %02x\n", + dev, frame_seq_number + nframes, + logical_blk_num + nframes * blks_per_frame, + p[0], p[1], p[2], p[3]); #endif - } - for (i = 0, p = buffer; i < frames; i++, p += OS_DATA_SIZE) { + for (i = 0, p = buffer; i < nframes; i++, p += OS_DATA_SIZE) { memset(cmd, 0, MAX_COMMAND_SIZE); cmd[0] = 0x3C; /* Buffer Read */ @@ -1034,62 +1218,62 @@ SCpnt = osst_do_scsi(SCpnt, STp, cmd, OS_FRAME_SIZE, STp->timeout, MAX_RETRIES, TRUE); if ((STp->buffer)->last_result_fatal) { - printk(KERN_ERR "osst%d: Failed to read block back from OnStream buffer\n", dev); + printk(KERN_ERR "osst%d:E: Failed to read frame back from OnStream buffer\n", dev); vfree((void *)buffer); *aSCpnt = SCpnt; return (-EIO); } osst_copy_from_buffer(STp->buffer, p); -// memcpy(p, STp->buffer->b_data, OS_DATA_SIZE); #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: Read back logical block %d, data %x %x %x %x\n", - dev, logical_blk_num + i, p[0], p[1], p[2], p[3]); + printk(OSST_DEB_MSG "osst%d:D: Read back logical frame %d, data %02x %02x %02x %02x\n", + dev, frame_seq_number + i, p[0], p[1], p[2], p[3]); #endif } *aSCpnt = SCpnt; osst_get_frame_position(STp, aSCpnt); #if DEBUG - printk(OSST_DEB_MSG "osst%d: Frames left in buffer: %d\n", dev, STp->cur_frames); + printk(OSST_DEB_MSG "osst%d:D: Frames left in buffer: %d\n", dev, STp->cur_frames); #endif /* Write synchronously so we can be sure we're OK again and don't have to recover recursively */ - /* In the header we don't actually re-write the blocks that fail, just the ones after them */ + /* In the header we don't actually re-write the frames that fail, just the ones after them */ - for (flag=1, new_block=block, p=buffer, i=0; i < frames + pending; ) { + for (flag=1, new_frame=frame, p=buffer, i=0; i < nframes + pending; ) { if (flag) { if (STp->write_type == OS_WRITE_HEADER) { i += skip; p += skip * OS_DATA_SIZE; } - else if (new_block < 2990 && new_block+skip+frames+pending >= 2990) - new_block = 3000-i; + else if (new_frame < 2990 && new_frame+skip+nframes+pending >= 2990) + new_frame = 3000-i; else - new_block += skip; + new_frame += skip; #if DEBUG - printk(OSST_DEB_MSG "osst%d: Position to frame %d, write lblk %d\n", - dev, new_block+i, logical_blk_num+i); /* FIXME var blk sz */ + printk(OSST_DEB_MSG "osst%d:D: Position to frame %d, write fseq %d\n", + dev, new_frame+i, frame_seq_number+i); #endif - osst_set_frame_position(STp, aSCpnt, new_block + i, 0); + osst_set_frame_position(STp, aSCpnt, new_frame + i, 0); osst_wait_ready(STp, aSCpnt, 60); osst_get_frame_position(STp, aSCpnt); SCpnt = * aSCpnt; - if (new_block > block + 1000) { - printk(KERN_ERR "osst%d: Failed to find valid tape media\n", dev); + if (new_frame > frame + 1000) { + printk(KERN_ERR "osst%d:E: Failed to find writable tape media\n", dev); vfree((void *)buffer); return (-EIO); } flag = 0; - if ( i >= frames + pending ) break; + if ( i >= nframes + pending ) break; } osst_copy_to_buffer(STp->buffer, p); -// memcpy(STp->buffer->b_data, p, OS_DATA_SIZE); /* * IMPORTANT: for error recovery to work, _never_ queue frames with mixed frame type! */ - osst_init_aux(STp, STp->buffer->aux->frame_type, logical_blk_num+i ); + osst_init_aux(STp, STp->buffer->aux->frame_type, frame_seq_number+i, + logical_blk_num + i*blks_per_frame, + ntohl(STp->buffer->aux->dat.dat_list[0].blk_sz), blks_per_frame); memset(cmd, 0, MAX_COMMAND_SIZE); cmd[0] = WRITE_6; cmd[1] = 1; @@ -1097,7 +1281,10 @@ #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: About to attempt to write to frame %d\n", dev, new_block+i); + printk(OSST_DEB_MSG + "osst%d:D: About to write frame %d, seq %d, lbn %d, data %02x %02x %02x %02x\n", + dev, new_frame+i, frame_seq_number+i, logical_blk_num + i*blks_per_frame, + p[0], p[1], p[2], p[3]); #endif SCpnt = osst_do_scsi(SCpnt, STp, cmd, OS_FRAME_SIZE, STp->timeout, MAX_WRITE_RETRIES, TRUE); @@ -1107,9 +1294,9 @@ p += OS_DATA_SIZE; i++; /* if we just sent the last frame, wait till all successfully written */ - if ( i == frames + pending ) { + if ( i == nframes + pending ) { #if DEBUG - printk(OSST_DEB_MSG "osst%d: Check re-write successful\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Check re-write successful\n", dev); #endif memset(cmd, 0, MAX_COMMAND_SIZE); cmd[0] = WRITE_FILEMARKS; @@ -1118,8 +1305,8 @@ #if DEBUG if (debugging) { - printk(OSST_DEB_MSG "osst%d: Sleeping in re-write wait ready\n", dev); - printk(OSST_DEB_MSG "osst%d: Turning off debugging for a while\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Sleeping in re-write wait ready\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Turning off debugging for a while\n", dev); debugging = 0; } #endif @@ -1144,44 +1331,47 @@ } #if DEBUG debugging = dbg; - printk(OSST_DEB_MSG "osst%d: Wait re-write finished\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Wait re-write finished\n", dev); #endif } } + *aSCpnt = SCpnt; if (flag) { if ((SCpnt->sense_buffer[ 2] & 0x0f) == 13 && SCpnt->sense_buffer[12] == 0 && SCpnt->sense_buffer[13] == 2) { - printk(KERN_ERR "osst%d: Volume overflow in write error recovery\n", dev); + printk(KERN_ERR "osst%d:E: Volume overflow in write error recovery\n", dev); vfree((void *)buffer); return (-EIO); /* hit end of tape = fail */ } i = ((SCpnt->sense_buffer[3] << 24) | (SCpnt->sense_buffer[4] << 16) | (SCpnt->sense_buffer[5] << 8) | - SCpnt->sense_buffer[6] ) - new_block; + SCpnt->sense_buffer[6] ) - new_frame; p = &buffer[i * OS_DATA_SIZE]; #if DEBUG - printk(OSST_DEB_MSG "osst%d: Additional write error at %d\n", dev, new_block+i); + printk(OSST_DEB_MSG "osst%d:D: Additional write error at %d\n", dev, new_frame+i); #endif osst_get_frame_position(STp, aSCpnt); #if DEBUG - printk(OSST_DEB_MSG "osst%d: reported frame positions: host = %d, tape = %d\n", + printk(OSST_DEB_MSG "osst%d:D: reported frame positions: host = %d, tape = %d\n", dev, STp->first_frame_position, STp->last_frame_position); #endif } - *aSCpnt = SCpnt; } + if (!pending) + osst_copy_to_buffer(STp->buffer, p); /* so buffer content == at entry in all cases */ vfree((void *)buffer); return 0; } static int osst_reposition_and_retry(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, - unsigned int block, unsigned int skip, int pending) + unsigned int frame, unsigned int skip, int pending) { unsigned char cmd[MAX_COMMAND_SIZE]; - Scsi_Cmnd * SCpnt = * aSCpnt; + Scsi_Cmnd * SCpnt; int dev = TAPE_NR(STp->devt); + int expected __attribute__ ((__unused__)); int attempts = 1000 / skip; int flag = 1; long startwait = jiffies; @@ -1194,23 +1384,24 @@ #if DEBUG debugging = dbg; #endif - if (block < 2990 && block+skip+STp->cur_frames+pending >= 2990) - block = 3000-skip; + if (frame < 2990 && frame+skip+STp->cur_frames+pending >= 2990) + frame = 3000-skip; + expected = frame+skip+STp->cur_frames+pending; #if DEBUG - printk(OSST_DEB_MSG "osst%d: Position to frame %d, re-write from lblk %d\n", - dev, block+skip, STp->logical_blk_num-STp->cur_frames-pending); + printk(OSST_DEB_MSG "osst%d:D: Position to fppos %d, re-write from fseq %d\n", + dev, frame+skip, STp->frame_seq_number-STp->cur_frames-pending); #endif - osst_set_frame_position(STp, aSCpnt, block + skip, 1); + osst_set_frame_position(STp, aSCpnt, frame + skip, 1); flag = 0; attempts--; } if (osst_get_frame_position(STp, aSCpnt) < 0) { /* additional write error */ #if DEBUG - printk(OSST_DEB_MSG "osst%d: Addl error, host %d, tape %d, buffer %d\n", + printk(OSST_DEB_MSG "osst%d:D: Addl error, host %d, tape %d, buffer %d\n", dev, STp->first_frame_position, STp->last_frame_position, STp->cur_frames); #endif - block = STp->last_frame_position; + frame = STp->last_frame_position; flag = 1; continue; } @@ -1221,10 +1412,10 @@ cmd[1] = 1; cmd[4] = 1; #if DEBUG - printk(OSST_DEB_MSG "osst%d: About to write pending lblk %d at frame %d\n", - dev, STp->logical_blk_num-1, STp->first_frame_position); + printk(OSST_DEB_MSG "osst%d:D: About to write pending fseq %d at fppos %d\n", + dev, STp->frame_seq_number-1, STp->first_frame_position); #endif - SCpnt = osst_do_scsi(SCpnt, STp, cmd, OS_FRAME_SIZE, STp->timeout, + SCpnt = osst_do_scsi(*aSCpnt, STp, cmd, OS_FRAME_SIZE, STp->timeout, MAX_WRITE_RETRIES, TRUE); *aSCpnt = SCpnt; @@ -1232,8 +1423,8 @@ if ((SCpnt->sense_buffer[ 2] & 0x0f) == 13 && SCpnt->sense_buffer[12] == 0 && SCpnt->sense_buffer[13] == 2) { - printk(OSST_DEB_MSG - "osst%d: Volume overflow in write error recovery\n", + printk(KERN_ERR + "osst%d:E: Volume overflow in write error recovery\n", dev); break; /* hit end of tape = fail */ } @@ -1247,20 +1438,25 @@ if (STp->cur_frames == 0) { #if DEBUG debugging = dbg; - printk(OSST_DEB_MSG "osst%d: Wait re-write finished\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Wait re-write finished\n", dev); #endif + if (STp->first_frame_position != expected) { + printk(KERN_ERR "osst%d:A: Actual position %d - expected %d\n", + dev, STp->first_frame_position, expected); + return (-EIO); + } return 0; } #if DEBUG if (debugging) { - printk(OSST_DEB_MSG "osst%d: Sleeping in re-write wait ready\n", dev); - printk(OSST_DEB_MSG "osst%d: Turning off debugging for a while\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Sleeping in re-write wait ready\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Turning off debugging for a while\n", dev); debugging = 0; } #endif schedule_timeout(HZ / 10); } - printk(KERN_ERR "osst%d: Failed to find valid tape media\n", dev); + printk(KERN_ERR "osst%d:E: Failed to find valid tape media\n", dev); #if DEBUG debugging = dbg; #endif @@ -1278,7 +1474,7 @@ int dev = TAPE_NR(STp->devt); int retval = 0; int rw_state; - unsigned int block, skip; + unsigned int frame, skip; rw_state = STps->rw; @@ -1286,54 +1482,57 @@ || SCpnt->sense_buffer[12] != 12 || SCpnt->sense_buffer[13] != 0) { #if DEBUG - printk(OSST_DEB_MSG "osst%d: Write error recovery cannot handle %02x:%02x:%02x\n", + printk(OSST_DEB_MSG "osst%d:D: Write error recovery cannot handle %02x:%02x:%02x\n", dev, SCpnt->sense_buffer[ 2], SCpnt->sense_buffer[12], SCpnt->sense_buffer[13]); #endif return (-EIO); } - block = (SCpnt->sense_buffer[3] << 24) | + frame = (SCpnt->sense_buffer[3] << 24) | (SCpnt->sense_buffer[4] << 16) | (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; skip = SCpnt->sense_buffer[9]; #if DEBUG - printk(OSST_DEB_MSG "osst%d: Detected physical bad block at %u, advised to skip %d\n", dev, block, skip); + printk(OSST_DEB_MSG "osst%d:D: Detected physical bad frame at %u, advised to skip %d\n", + dev, frame, skip); #endif osst_get_frame_position(STp, aSCpnt); #if DEBUG - printk(OSST_DEB_MSG "osst%d: reported frame positions: host = %d, tape = %d\n", + printk(OSST_DEB_MSG "osst%d:D: reported frame positions: host = %d, tape = %d\n", dev, STp->first_frame_position, STp->last_frame_position); #endif switch (STp->write_type) { case OS_WRITE_DATA: case OS_WRITE_EOD: case OS_WRITE_NEW_MARK: - printk(KERN_WARNING "osst%d: Relocating %d buffered logical blocks to physical block %u\n", - dev, STp->cur_frames, block + skip); + printk(KERN_WARNING + "osst%d:I: Relocating %d buffered logical frames from position %u to %u\n", + dev, STp->cur_frames, frame, (frame + skip > 3000 && frame < 3000)?3000:frame + skip); if (STp->os_fw_rev >= 10600) - retval = osst_reposition_and_retry(STp, aSCpnt, block, skip, pending); + retval = osst_reposition_and_retry(STp, aSCpnt, frame, skip, pending); else - retval = osst_read_back_buffer_and_rewrite(STp, aSCpnt, block, skip, pending); + retval = osst_read_back_buffer_and_rewrite(STp, aSCpnt, frame, skip, pending); + printk(KERN_WARNING "osst%d:I: Write error%srecovered\n", dev, retval?" not ":" "); break; case OS_WRITE_LAST_MARK: - printk(KERN_ERR "osst%d: Bad block in update last marker, fatal\n", dev); - osst_set_frame_position(STp, aSCpnt, block + STp->cur_frames + pending, 0); + printk(KERN_ERR "osst%d:E: Bad frame in update last marker, fatal\n", dev); + osst_set_frame_position(STp, aSCpnt, frame + STp->cur_frames + pending, 0); retval = -EIO; break; case OS_WRITE_HEADER: - printk(KERN_WARNING "osst%d: Bad block in header partition, skipped\n", dev); - retval = osst_read_back_buffer_and_rewrite(STp, aSCpnt, block, 1, pending); + printk(KERN_WARNING "osst%d:I: Bad frame in header partition, skipped\n", dev); + retval = osst_read_back_buffer_and_rewrite(STp, aSCpnt, frame, 1, pending); break; default: - printk(KERN_WARNING "osst%d: Bad block in filler, ignored\n", dev); - osst_set_frame_position(STp, aSCpnt, block + STp->cur_frames + pending, 0); + printk(KERN_INFO "osst%d:I: Bad frame in filler, ignored\n", dev); + osst_set_frame_position(STp, aSCpnt, frame + STp->cur_frames + pending, 0); } osst_get_frame_position(STp, aSCpnt); #if DEBUG - printk(KERN_ERR "osst%d: Positioning complete, cur_frames %d, pos %d, tape pos %d\n", + printk(OSST_DEB_MSG "osst%d:D: Positioning complete, cur_frames %d, pos %d, tape pos %d\n", dev, STp->cur_frames, STp->first_frame_position, STp->last_frame_position); - printk(OSST_DEB_MSG "osst%d: next logical block to write: %d\n", dev, STp->logical_blk_num); + printk(OSST_DEB_MSG "osst%d:D: next logical frame to write: %d\n", dev, STp->logical_blk_num); #endif if (retval == 0) { STp->recover_count++; @@ -1350,10 +1549,12 @@ int last_mark_ppos = -1; #if DEBUG - printk(OSST_DEB_MSG "osst%d: Reached space_over_filemarks_backwards %d %d\n", dev, mt_op, mt_count); + printk(OSST_DEB_MSG "osst%d:D: Reached space_over_filemarks_backwards %d %d\n", dev, mt_op, mt_count); +#endif + if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) { +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Couldn't get logical blk num in space_filemarks_bwd\n", dev); #endif - if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) { - printk(KERN_INFO "osst%i: Couldn't get logical blk num in space_filemarks_bwd\n", dev); return -EIO; } if (STp->linux_media_version >= 4) { @@ -1369,12 +1570,13 @@ STp->header_cache->dat_fm_tab.fm_tab_ent[cnt-1] == STp->buffer->aux->last_mark_ppos) last_mark_ppos = ntohl(STp->header_cache->dat_fm_tab.fm_tab_ent[cnt - mt_count]); -#if 1 //DEBUG +#if DEBUG if (STp->header_cache == NULL || (cnt - mt_count) < 0 || (cnt - mt_count) >= OS_FM_TAB_MAX) - printk(OSST_DEB_MSG "osst%i: Filemark lookup fail due to %s\n", dev, + printk(OSST_DEB_MSG "osst%i:D: Filemark lookup fail due to %s\n", dev, STp->header_cache == NULL?"lack of header cache":"count out of range"); else - printk(OSST_DEB_MSG "osst%i: Filemark lookup: prev mark %d (%s), skip %d to %d\n", dev, cnt, + printk(OSST_DEB_MSG "osst%i:D: Filemark lookup: prev mark %d (%s), skip %d to %d\n", + dev, cnt, ((cnt == -1 && ntohl(STp->buffer->aux->last_mark_ppos) == -1) || (STp->header_cache->dat_fm_tab.fm_tab_ent[cnt-1] == STp->buffer->aux->last_mark_ppos))?"match":"error", @@ -1382,22 +1584,28 @@ #endif if (last_mark_ppos > 10 && last_mark_ppos < STp->eod_frame_ppos) { osst_set_frame_position(STp, aSCpnt, last_mark_ppos, 0); - if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) { - printk(KERN_INFO "osst%i: Couldn't get logical blk num in space_filemarks\n", dev); + if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) { +#if DEBUG + printk(OSST_DEB_MSG + "osst%d:D: Couldn't get logical blk num in space_filemarks\n", dev); +#endif return (-EIO); } if (STp->buffer->aux->frame_type != OS_FRAME_TYPE_MARKER) { - printk(KERN_INFO "osst%i: Expected to find marker at block %d, not found\n", + printk(KERN_WARNING "osst%i:W: Expected to find marker at ppos %d, not found\n", dev, last_mark_ppos); return (-EIO); } if (mt_op == MTBSFM) { - STp->logical_blk_num++; - STp->logical_blk_in_buffer = 0; + STp->frame_seq_number++; + STp->frame_in_buffer = 0; + STp->logical_blk_num += ntohs(STp->buffer->aux->dat.dat_list[0].blk_cnt); } return 0; } - printk(KERN_INFO "osst%i: Reverting to scan filemark backwards\n", dev); +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Reverting to scan filemark backwards\n", dev); +#endif } cnt = 0; while (cnt != mt_count) { @@ -1405,22 +1613,26 @@ if (last_mark_ppos == -1) return (-EIO); #if DEBUG - printk(OSST_DEB_MSG "osst%i: Positioning to last mark at %d\n", dev, last_mark_ppos); + printk(OSST_DEB_MSG "osst%d:D: Positioning to last mark at %d\n", dev, last_mark_ppos); #endif osst_set_frame_position(STp, aSCpnt, last_mark_ppos, 0); cnt++; - if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) { - printk(KERN_INFO "osst%i: Couldn't get logical blk num in space_filemarks\n", dev); + if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) { +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Couldn't get logical blk num in space_filemarks\n", dev); +#endif return (-EIO); } if (STp->buffer->aux->frame_type != OS_FRAME_TYPE_MARKER) { - printk(KERN_INFO "osst%i: expected to find marker at block %d, not found\n", dev, last_mark_ppos); + printk(KERN_WARNING "osst%d:W: Expected to find marker at ppos %d, not found\n", + dev, last_mark_ppos); return (-EIO); } } if (mt_op == MTBSFM) { - STp->logical_blk_num++; - STp->logical_blk_in_buffer = 0; + STp->frame_seq_number++; + STp->frame_in_buffer = 0; + STp->logical_blk_num += ntohs(STp->buffer->aux->dat.dat_list[0].blk_cnt); } return 0; } @@ -1432,30 +1644,34 @@ */ static int osst_space_over_filemarks_forward_slow(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int mt_op, int mt_count) { - int dev = TAPE_NR(STp->devt); int cnt = 0; +#if DEBUG + int dev = TAPE_NR(STp->devt); + printk(OSST_DEB_MSG "osst%d:D: Reached space_over_filemarks_forward_slow %d %d\n", dev, mt_op, mt_count); +#endif + if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) { #if DEBUG - printk(OSST_DEB_MSG "osst%d: Reached space_over_filemarks_forward_slow %d %d\n", dev, mt_op, mt_count); + printk(OSST_DEB_MSG "osst%d:D: Couldn't get logical blk num in space_filemarks_fwd\n", dev); #endif - if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) { - printk(KERN_INFO "osst%i: Couldn't get logical blk num in space_filemarks_fwd\n", dev); return (-EIO); } while (1) { - if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) { - printk(KERN_INFO "osst%i: Couldn't get logical blk num in space_filemarks\n", dev); + if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) { +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Couldn't get logical blk num in space_filemarks\n", dev); +#endif return (-EIO); } if (STp->buffer->aux->frame_type == OS_FRAME_TYPE_MARKER) cnt++; if (STp->buffer->aux->frame_type == OS_FRAME_TYPE_EOD) { #if DEBUG - printk(OSST_DEB_MSG "osst%i: space_fwd: EOD reached\n", dev); + printk(OSST_DEB_MSG "osst%d:D: space_fwd: EOD reached\n", dev); #endif if (STp->first_frame_position > STp->eod_frame_ppos+1) { #if DEBUG - printk(OSST_DEB_MSG "osst%i: EOD position corrected (%d=>%d)\n", + printk(OSST_DEB_MSG "osst%d:D: EOD position corrected (%d=>%d)\n", dev, STp->eod_frame_ppos, STp->first_frame_position-1); #endif STp->eod_frame_ppos = STp->first_frame_position-1; @@ -1464,11 +1680,12 @@ } if (cnt == mt_count) break; - STp->logical_blk_in_buffer = 0; + STp->frame_in_buffer = 0; } if (mt_op == MTFSF) { - STp->logical_blk_num++; - STp->logical_blk_in_buffer = 0; + STp->frame_seq_number++; + STp->frame_in_buffer = 0; + STp->logical_blk_num += ntohs(STp->buffer->aux->dat.dat_list[0].blk_cnt); } return 0; } @@ -1483,10 +1700,12 @@ next_mark_ppos = -1; #if DEBUG - printk(OSST_DEB_MSG "osst%d: Reached space_over_filemarks_forward_fast %d %d\n", dev, mt_op, mt_count); + printk(OSST_DEB_MSG "osst%d:D: Reached space_over_filemarks_forward_fast %d %d\n", dev, mt_op, mt_count); +#endif + if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) { +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Couldn't get logical blk num in space_filemarks_fwd\n", dev); #endif - if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) { - printk(KERN_INFO "osst%i: Couldn't get logical blk num in space_filemarks_fwd\n", dev); return (-EIO); } @@ -1503,33 +1722,39 @@ (STp->header_cache->dat_fm_tab.fm_tab_ent[cnt] == STp->buffer->aux->last_mark_ppos))) next_mark_ppos = ntohl(STp->header_cache->dat_fm_tab.fm_tab_ent[cnt + mt_count]); -#if 1 //DEBUG +#if DEBUG if (STp->header_cache == NULL || (cnt + mt_count) >= OS_FM_TAB_MAX) - printk(OSST_DEB_MSG "osst%i: Filemark lookup fail due to %s\n", dev, + printk(OSST_DEB_MSG "osst%d:D: Filemark lookup fail due to %s\n", dev, STp->header_cache == NULL?"lack of header cache":"count out of range"); else - printk(OSST_DEB_MSG "osst%i: Filemark lookup: prev mark %d (%s), skip %d to %d\n", dev, cnt, + printk(OSST_DEB_MSG "osst%d:D: Filemark lookup: prev mark %d (%s), skip %d to %d\n", + dev, cnt, ((cnt == -1 && ntohl(STp->buffer->aux->last_mark_ppos) == -1) || (STp->header_cache->dat_fm_tab.fm_tab_ent[cnt] == STp->buffer->aux->last_mark_ppos))?"match":"error", mt_count, next_mark_ppos); #endif if (next_mark_ppos <= 10 || next_mark_ppos > STp->eod_frame_ppos) { - printk(KERN_INFO "osst%i: Reverting to slow filemark space\n", dev); +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Reverting to slow filemark space\n", dev); +#endif return osst_space_over_filemarks_forward_slow(STp, aSCpnt, mt_op, mt_count); } else { osst_set_frame_position(STp, aSCpnt, next_mark_ppos, 0); - if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) { - printk(KERN_INFO "osst%i: Couldn't get logical blk num in space_filemarks\n", dev); + if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) { +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Couldn't get logical blk num in space_filemarks\n", + dev); +#endif return (-EIO); } if (STp->buffer->aux->frame_type != OS_FRAME_TYPE_MARKER) { - printk(KERN_INFO "osst%i: Expected to find marker at block %d, not found\n", + printk(KERN_WARNING "osst%d:W: Expected to find marker at ppos %d, not found\n", dev, next_mark_ppos); return (-EIO); } if (ntohl(STp->buffer->aux->filemark_cnt) != cnt + mt_count) { - printk(KERN_INFO "osst%i: Expected to find marker %d at block %d, not %d\n", + printk(KERN_WARNING "osst%d:W: Expected to find marker %d at ppos %d, not %d\n", dev, cnt+mt_count, next_mark_ppos, ntohl(STp->buffer->aux->filemark_cnt)); return (-EIO); @@ -1544,24 +1769,28 @@ break; if (STp->buffer->aux->frame_type == OS_FRAME_TYPE_EOD) { #if DEBUG - printk(OSST_DEB_MSG "osst%i: space_fwd: EOD reached\n", dev); + printk(OSST_DEB_MSG "osst%d:D: space_fwd: EOD reached\n", dev); #endif return (-EIO); } if (ntohl(STp->buffer->aux->filemark_cnt) == 0) { if (STp->first_mark_ppos == -1) { - printk(KERN_INFO "osst%i: Reverting to slow filemark space\n", dev); +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Reverting to slow filemark space\n", dev); +#endif return osst_space_over_filemarks_forward_slow(STp, aSCpnt, mt_op, mt_count); } osst_set_frame_position(STp, aSCpnt, STp->first_mark_ppos, 0); - if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) { - printk(KERN_INFO - "osst%i: Couldn't get logical blk num in space_filemarks_fwd_fast\n", + if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) { +#if DEBUG + printk(OSST_DEB_MSG + "osst%d:D: Couldn't get logical blk num in space_filemarks_fwd_fast\n", dev); +#endif return (-EIO); } if (STp->buffer->aux->frame_type != OS_FRAME_TYPE_MARKER) { - printk(KERN_INFO "osst%i: Expected to find filemark at %d\n", + printk(KERN_WARNING "osst%d:W: Expected to find filemark at %d\n", dev, STp->first_mark_ppos); return (-EIO); } @@ -1575,28 +1804,35 @@ while (cnt != mt_count) { next_mark_ppos = ntohl(STp->buffer->aux->next_mark_ppos); if (!next_mark_ppos || next_mark_ppos > STp->eod_frame_ppos) { - printk(KERN_INFO "osst%i: Reverting to slow filemark space\n", dev); +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Reverting to slow filemark space\n", dev); +#endif return osst_space_over_filemarks_forward_slow(STp, aSCpnt, mt_op, mt_count - cnt); } #if DEBUG - else printk(OSST_DEB_MSG "osst%i: Positioning to next mark at %d\n", dev, next_mark_ppos); + else printk(OSST_DEB_MSG "osst%d:D: Positioning to next mark at %d\n", dev, next_mark_ppos); #endif osst_set_frame_position(STp, aSCpnt, next_mark_ppos, 0); cnt++; - if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) { - printk(KERN_INFO "osst%i: Couldn't get logical blk num in space_filemarks\n", dev); + if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) { +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Couldn't get logical blk num in space_filemarks\n", + dev); +#endif return (-EIO); } if (STp->buffer->aux->frame_type != OS_FRAME_TYPE_MARKER) { - printk(KERN_INFO "osst%i: Expected to find marker at block %d, not found\n", + printk(KERN_WARNING "osst%d:W: Expected to find marker at ppos %d, not found\n", dev, next_mark_ppos); return (-EIO); } } } - if (mt_op == MTFSF) - STp->logical_blk_num++; - STp->logical_blk_in_buffer = 0; + if (mt_op == MTFSF) { + STp->frame_seq_number++; + STp->frame_in_buffer = 0; + STp->logical_blk_num += ntohs(STp->buffer->aux->dat.dat_list[0].blk_cnt); + } return 0; } @@ -1626,75 +1862,22 @@ (STp->buffer)->b_data[MODE_HEADER_LENGTH + 3] = retries; if (debugging) - printk(OSST_DEB_MSG "osst%i: Setting number of retries on OnStream tape to %d\n", dev, retries); + printk(OSST_DEB_MSG "osst%d:D: Setting number of retries on OnStream tape to %d\n", dev, retries); SCpnt = osst_do_scsi(SCpnt, STp, cmd, cmd[4], STp->timeout, 0, TRUE); *aSCpnt = SCpnt; if ((STp->buffer)->last_result_fatal) - printk (KERN_ERR "osst%d: Couldn't set retries to %d\n", dev, retries); + printk (KERN_ERR "osst%d:D: Couldn't set retries to %d\n", dev, retries); } #endif -#if 0 -static void osst_update_markers(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int last_mark_ppos, int this_mark_ppos) -{ - int dev = TAPE_NR(STp->devt); - int frame, - reslt; - - if (STp->raw) return; - - STp->last_mark_ppos = this_mark_ppos; - if (STp->header_cache != NULL && STp->filemark_cnt < OS_FM_TAB_MAX) - STp->header_cache->dat_fm_tab.fm_tab_ent[STp->filemark_cnt] = htonl(this_mark_ppos); - if (STp->filemark_cnt++ == 0) - STp->first_mark_ppos = this_mark_ppos; - - if (STp->linux_media_version >= 4) return; - if (last_mark_ppos == -1) return; - - STp->write_type = OS_WRITE_LAST_MARK; - frame = osst_get_frame_position(STp, aSCpnt); -#if DEBUG - printk(OSST_DEB_MSG "osst%i: Update last_marker at frame %d\n", dev, last_mark_ppos); - printk(OSST_DEB_MSG "osst%i: current position %d, lblk %d, tape blk %d\n", - dev, frame, STp->logical_blk_num, STp->last_frame_position); -#endif - osst_set_frame_position(STp, aSCpnt, last_mark_ppos, 0); - osst_initiate_read (STp, aSCpnt); - reslt = osst_read_block(STp, aSCpnt, 180); - - if (reslt) { - printk(KERN_WARNING "osst%i: couldn't read last marker\n", dev); - osst_set_frame_position(STp, aSCpnt, frame, 0); - return; - } - if (STp->buffer->aux->frame_type != OS_FRAME_TYPE_MARKER) { - printk(KERN_WARNING "osst%i: expected marker at addr %d\n", dev, last_mark_ppos); - osst_set_frame_position(STp, aSCpnt, frame, 0); - return; - } -#if DEBUG - printk(OSST_DEB_MSG "osst%i: writing back marker\n", dev); -#endif - STp->buffer->aux->next_mark_ppos = htonl(this_mark_ppos); - osst_set_frame_position(STp, aSCpnt, last_mark_ppos, 0); - STp->dirty = 1; - if (osst_flush_write_buffer(STp, aSCpnt, 0) || - osst_flush_drive_buffer(STp, aSCpnt) ) { - printk(KERN_WARNING "osst%i: couldn't write marker back at addr %d\n", dev, last_mark_ppos); - } - osst_set_frame_position(STp, aSCpnt, frame, 0); - - return; /* FIXME -- errors should go back to user space */ -} -#endif static int osst_write_filemark(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt) { int result; - int this_mark_ppos; + int this_mark_ppos = STp->first_frame_position; + int this_mark_lbn = STp->logical_blk_num; #if DEBUG int dev = TAPE_NR(STp->devt); #endif @@ -1702,22 +1885,20 @@ if (STp->raw) return 0; STp->write_type = OS_WRITE_NEW_MARK; - this_mark_ppos = osst_get_frame_position(STp, aSCpnt); #if DEBUG - printk(OSST_DEB_MSG "osst%i: Writing Filemark %i at frame %d (lblk %d)\n", - dev, STp->filemark_cnt, this_mark_ppos, STp->logical_blk_num); + printk(OSST_DEB_MSG "osst%d:D: Writing Filemark %i at fppos %d (fseq %d, lblk %d)\n", + dev, STp->filemark_cnt, this_mark_ppos, STp->frame_seq_number, this_mark_lbn); #endif - osst_init_aux(STp, OS_FRAME_TYPE_MARKER, STp->logical_blk_num++); STp->dirty = 1; - result = osst_flush_write_buffer(STp, aSCpnt, 0); + result = osst_flush_write_buffer(STp, aSCpnt); result |= osst_flush_drive_buffer(STp, aSCpnt); -//printk(OSST_DEB_MSG "osst%d: Finished writing file\n",TAPE_NR(STp->devt)); + STp->last_mark_ppos = this_mark_ppos; + STp->last_mark_lbn = this_mark_lbn; if (STp->header_cache != NULL && STp->filemark_cnt < OS_FM_TAB_MAX) STp->header_cache->dat_fm_tab.fm_tab_ent[STp->filemark_cnt] = htonl(this_mark_ppos); if (STp->filemark_cnt++ == 0) STp->first_mark_ppos = this_mark_ppos; -// osst_update_markers(STp, aSCpnt, STp->last_mark_ppos, this_mark_ppos); return result; } @@ -1731,70 +1912,67 @@ if (STp->raw) return 0; STp->write_type = OS_WRITE_EOD; - STp->eod_frame_ppos = osst_get_frame_position(STp, aSCpnt); + STp->eod_frame_ppos = STp->first_frame_position; #if DEBUG - printk(OSST_DEB_MSG "osst%i: Writing EOD at %d=>%d\n", dev, STp->logical_blk_num, STp->eod_frame_ppos); + printk(OSST_DEB_MSG "osst%d:D: Writing EOD at fppos %d (fseq %d, lblk %d)\n", dev, + STp->eod_frame_ppos, STp->frame_seq_number, STp->logical_blk_num); #endif - osst_init_aux(STp, OS_FRAME_TYPE_EOD, STp->logical_blk_num++); STp->dirty = 1; - result = osst_flush_write_buffer(STp, aSCpnt, 0); + result = osst_flush_write_buffer(STp, aSCpnt); result |= osst_flush_drive_buffer(STp, aSCpnt); - STp->eod_frame_lfa = --(STp->logical_blk_num); + STp->eod_frame_lfa = --(STp->frame_seq_number); return result; } -static int osst_write_filler(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int block, int count) +static int osst_write_filler(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int where, int count) { int dev = TAPE_NR(STp->devt); #if DEBUG - printk(OSST_DEB_MSG "osst%i: Reached onstream write filler group %d\n", dev, block); + printk(OSST_DEB_MSG "osst%d:D: Reached onstream write filler group %d\n", dev, where); #endif osst_wait_ready(STp, aSCpnt, 60 * 5); - osst_set_frame_position(STp, aSCpnt, block, 0); + osst_set_frame_position(STp, aSCpnt, where, 0); STp->write_type = OS_WRITE_FILLER; - osst_init_aux(STp, OS_FRAME_TYPE_FILL, 0); while (count--) { memcpy(STp->buffer->b_data, "Filler", 6); STp->buffer->buffer_bytes = 6; STp->dirty = 1; - if (osst_flush_write_buffer(STp, aSCpnt, 0)) { - printk(KERN_INFO "osst%i: Couldn't write filler frame\n", dev); + if (osst_flush_write_buffer(STp, aSCpnt)) { + printk(KERN_INFO "osst%i:I: Couldn't write filler frame\n", dev); return (-EIO); } } #if DEBUG - printk(OSST_DEB_MSG "osst%i: Exiting onstream write filler group\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Exiting onstream write filler group\n", dev); #endif return osst_flush_drive_buffer(STp, aSCpnt); } -static int __osst_write_header(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int block, int count) +static int __osst_write_header(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int where, int count) { int dev = TAPE_NR(STp->devt); int result; #if DEBUG - printk(OSST_DEB_MSG "osst%i: Reached onstream write header group %d\n", dev, block); + printk(OSST_DEB_MSG "osst%d:D: Reached onstream write header group %d\n", dev, where); #endif osst_wait_ready(STp, aSCpnt, 60 * 5); - osst_set_frame_position(STp, aSCpnt, block, 0); + osst_set_frame_position(STp, aSCpnt, where, 0); STp->write_type = OS_WRITE_HEADER; - osst_init_aux(STp, OS_FRAME_TYPE_HEADER, STp->logical_blk_num); while (count--) { osst_copy_to_buffer(STp->buffer, (unsigned char *)STp->header_cache); -// memcpy(STp->buffer->b_data, STp->header_cache, sizeof(os_header_t)); STp->buffer->buffer_bytes = sizeof(os_header_t); STp->dirty = 1; - if (osst_flush_write_buffer(STp, aSCpnt, 0)) { - printk(KERN_INFO "osst%i: Couldn't write header frame\n", dev); + if (osst_flush_write_buffer(STp, aSCpnt)) { + printk(KERN_INFO "osst%i:I: Couldn't write header frame\n", dev); return (-EIO); } } result = osst_flush_drive_buffer(STp, aSCpnt); #if DEBUG - printk(OSST_DEB_MSG "osst%i: Write onstream header group %s\n", dev, result?"failed":"done"); + printk(OSST_DEB_MSG "osst%d:D: Write onstream header group %s\n", dev, result?"failed":"done"); #endif return result; } @@ -1806,18 +1984,18 @@ int dev = TAPE_NR(STp->devt); #if DEBUG - printk(OSST_DEB_MSG "osst%i: Writing tape header\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Writing tape header\n", dev); #endif if (STp->raw) return 0; if (STp->header_cache == NULL) { if ((STp->header_cache = (os_header_t *)vmalloc(sizeof(os_header_t))) == NULL) { - printk(KERN_ERR "osst%i: Failed to allocate header cache\n", dev); + printk(KERN_ERR "osst%i:E: Failed to allocate header cache\n", dev); return (-ENOMEM); } memset(STp->header_cache, 0, sizeof(os_header_t)); #if DEBUG - printk(OSST_DEB_MSG "osst%d: Allocated and cleared memory for header cache\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Allocated and cleared memory for header cache\n", dev); #endif } if (STp->header_ok) STp->update_frame_cntr++; @@ -1858,12 +2036,12 @@ if (locate_eod) { #if DEBUG - printk(OSST_DEB_MSG "osst%i: locating back to eod frame addr %d\n", dev, STp->eod_frame_ppos); + printk(OSST_DEB_MSG "osst%d:D: Locating back to eod frame addr %d\n", dev, STp->eod_frame_ppos); #endif osst_set_frame_position(STp, aSCpnt, STp->eod_frame_ppos, 0); } if (reslt) - printk(KERN_WARNING "osst%i: write header failed\n", dev); + printk(KERN_ERR "osst%d:E: Write header failed\n", dev); else { memcpy(STp->application_sig, "LIN4", 4); STp->linux_media = 1; @@ -1878,15 +2056,15 @@ if (STp->header_cache != NULL) memset(STp->header_cache, 0, sizeof(os_header_t)); - STp->logical_blk_num = 0; - STp->logical_blk_in_buffer = 0; + STp->logical_blk_num = STp->frame_seq_number = 0; + STp->frame_in_buffer = 0; STp->eod_frame_ppos = STp->first_data_ppos = 0x0000000A; STp->filemark_cnt = 0; - STp->first_mark_ppos = STp->last_mark_ppos = -1; + STp->first_mark_ppos = STp->last_mark_ppos = STp->last_mark_lbn = -1; return osst_write_header(STp, aSCpnt, 1); } -static int __osst_analyze_headers(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int block) +static int __osst_analyze_headers(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int ppos) { int dev = TAPE_NR(STp->devt); os_header_t * header; @@ -1898,17 +2076,17 @@ if (STp->raw) return 1; - if (block == 5 || block == 0xbae || STp->buffer->last_result_fatal) { - if (osst_set_frame_position(STp, aSCpnt, block, 0)) - printk(KERN_WARNING "osst%i: Couldn't position tape\n", dev); + if (ppos == 5 || ppos == 0xbae || STp->buffer->last_result_fatal) { + if (osst_set_frame_position(STp, aSCpnt, ppos, 0)) + printk(KERN_WARNING "osst%i:W: Couldn't position tape\n", dev); if (osst_initiate_read (STp, aSCpnt)) { - printk(KERN_WARNING "osst%i: Couldn't initiate read\n", dev); + printk(KERN_WARNING "osst%i:W: Couldn't initiate read\n", dev); return 0; } } - if (osst_read_block(STp, aSCpnt, 180)) { + if (osst_read_frame(STp, aSCpnt, 180)) { #if DEBUG - printk(OSST_DEB_MSG "osst%i: Couldn't read header frame\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Couldn't read header frame\n", dev); #endif return 0; } @@ -1916,7 +2094,20 @@ aux = STp->buffer->aux; if (aux->frame_type != OS_FRAME_TYPE_HEADER) { #if DEBUG - printk(OSST_DEB_MSG "osst%i: Skipping non-header frame (%d)\n", dev, block); + printk(OSST_DEB_MSG "osst%d:D: Skipping non-header frame (%d)\n", dev, ppos); +#endif + return 0; + } + if (ntohl(aux->frame_seq_num) != 0 || + ntohl(aux->logical_blk_num) != 0 || + aux->partition.partition_num != OS_CONFIG_PARTITION || + ntohl(aux->partition.first_frame_ppos) != 0 || + ntohl(aux->partition.last_frame_ppos) != 0xbb7 ) { +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Invalid header frame (%d,%d,%d,%d,%d)\n", dev, + ntohl(aux->frame_seq_num), ntohl(aux->logical_blk_num), + aux->partition.partition_num, ntohl(aux->partition.first_frame_ppos), + ntohl(aux->partition.last_frame_ppos)); #endif return 0; } @@ -1924,51 +2115,57 @@ strncmp(header->ident_str, "ADR-SEQ", 7) != 0) { strncpy(id_string, header->ident_str, 7); id_string[7] = 0; - printk(KERN_INFO "osst%i: Invalid header identification string %s\n", dev, id_string); +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Invalid header identification string %s\n", dev, id_string); +#endif return 0; } update_frame_cntr = ntohl(aux->update_frame_cntr); if (update_frame_cntr < STp->update_frame_cntr) { #if DEBUG - printk(OSST_DEB_MSG "osst%i: Skipping frame %d with update_frame_counter %d<%d\n", - dev, block, update_frame_cntr, STp->update_frame_cntr); + printk(OSST_DEB_MSG "osst%d:D: Skipping frame %d with update_frame_counter %d<%d\n", + dev, ppos, update_frame_cntr, STp->update_frame_cntr); #endif return 0; } if (header->major_rev != 1 || header->minor_rev != 4 ) { - printk(KERN_INFO "osst%i: %s revision %d.%d detected (1.4 supported)\n", +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: %s revision %d.%d detected (1.4 supported)\n", dev, (header->major_rev != 1 || header->minor_rev < 2 || header->minor_rev > 4 )? "Invalid" : "Warning:", header->major_rev, header->minor_rev); +#endif if (header->major_rev != 1 || header->minor_rev < 2 || header->minor_rev > 4) return 0; } +#if DEBUG if (header->pt_par_num != 1) - printk(KERN_INFO "osst%i: Warning: %d partitions defined, only one supported\n", + printk(KERN_INFO "osst%i:W: %d partitions defined, only one supported\n", dev, header->pt_par_num); +#endif memcpy(id_string, aux->application_sig, 4); id_string[4] = 0; if (memcmp(id_string, "LIN", 3) == 0) { STp->linux_media = 1; linux_media_version = id_string[3] - '0'; if (linux_media_version != 4) - printk(KERN_INFO "osst%i: Linux media version %d detected (current 4)\n", + printk(KERN_INFO "osst%i:I: Linux media version %d detected (current 4)\n", dev, linux_media_version); } else { - printk(KERN_WARNING "osst%i: non Linux media detected (%s)\n", dev, id_string); + printk(KERN_WARNING "osst%i:W: Non Linux media detected (%s)\n", dev, id_string); return 0; } if (linux_media_version < STp->linux_media_version) { #if DEBUG - printk(OSST_DEB_MSG "osst%i: Skipping frame %d with linux_media_version %d\n", - dev, block, linux_media_version); + printk(OSST_DEB_MSG "osst%d:D: Skipping frame %d with linux_media_version %d\n", + dev, ppos, linux_media_version); #endif return 0; } if (linux_media_version > STp->linux_media_version) { #if DEBUG - printk(OSST_DEB_MSG "osst%i: Frame %d sets linux_media_version to %d\n", - dev, block, linux_media_version); + printk(OSST_DEB_MSG "osst%d:D: Frame %d sets linux_media_version to %d\n", + dev, ppos, linux_media_version); #endif memcpy(STp->application_sig, id_string, 5); STp->linux_media_version = linux_media_version; @@ -1976,16 +2173,16 @@ } if (update_frame_cntr > STp->update_frame_cntr) { #if DEBUG - printk(OSST_DEB_MSG "osst%i: Frame %d sets update_frame_counter to %d\n", - dev, block, update_frame_cntr); + printk(OSST_DEB_MSG "osst%d:D: Frame %d sets update_frame_counter to %d\n", + dev, ppos, update_frame_cntr); #endif if (STp->header_cache == NULL) { if ((STp->header_cache = (os_header_t *)vmalloc(sizeof(os_header_t))) == NULL) { - printk(KERN_ERR "osst%i: Failed to allocate header cache\n", dev); + printk(KERN_ERR "osst%i:E: Failed to allocate header cache\n", dev); return 0; } #if DEBUG - printk(OSST_DEB_MSG "osst%d: Allocated memory for header cache\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Allocated memory for header cache\n", dev); #endif } osst_copy_from_buffer(STp->buffer, (unsigned char *)STp->header_cache); @@ -1998,19 +2195,22 @@ STp->filemark_cnt = ntohl(aux->filemark_cnt); STp->first_mark_ppos = ntohl(aux->next_mark_ppos); STp->last_mark_ppos = ntohl(aux->last_mark_ppos); + STp->last_mark_lbn = ntohl(aux->last_mark_lbn); STp->update_frame_cntr = update_frame_cntr; #if DEBUG - printk(OSST_DEB_MSG "osst%i: detected write pass %d, update frame counter %d, filemark counter %d\n", + printk(OSST_DEB_MSG "osst%d:D: Detected write pass %d, update frame counter %d, filemark counter %d\n", dev, STp->wrt_pass_cntr, STp->update_frame_cntr, STp->filemark_cnt); - printk(OSST_DEB_MSG "osst%i: first data frame on tape = %d, last = %d, eod frame = %d\n", dev, + printk(OSST_DEB_MSG "osst%d:D: first data frame on tape = %d, last = %d, eod frame = %d\n", dev, STp->first_data_ppos, ntohl(header->partition[0].last_frame_ppos), ntohl(header->partition[0].eod_frame_ppos)); - printk(OSST_DEB_MSG "osst%i: first mark on tape = %d, last = %d, eod frame = %d\n", + printk(OSST_DEB_MSG "osst%d:D: first mark on tape = %d, last = %d, eod frame = %d\n", dev, STp->first_mark_ppos, STp->last_mark_ppos, STp->eod_frame_ppos); #endif if (header->minor_rev < 4 && STp->linux_media_version == 4) { - printk(OSST_DEB_MSG "osst%i: Moving filemark list to ADR 1.4 location\n", dev); +#if DEBUG + printk(OSST_DEB_MSG "osst%i:D: Moving filemark list to ADR 1.4 location\n", dev); +#endif memcpy((void *)header->dat_fm_tab.fm_tab_ent, (void *)header->old_filemark_list, sizeof(header->dat_fm_tab.fm_tab_ent)); memset((void *)header->old_filemark_list, 0, sizeof(header->old_filemark_list)); @@ -2034,9 +2234,8 @@ header->dat_fm_tab.fm_tab_ent_sz != 4 || header->dat_fm_tab.fm_tab_ent_cnt != htons(STp->filemark_cntfilemark_cnt:OS_FM_TAB_MAX))) - printk(KERN_WARNING "osst%i: Failed consistency check ADR 1.4 format\n", dev); + printk(KERN_WARNING "osst%i:W: Failed consistency check ADR 1.4 format\n", dev); -// memcpy(STp->header_cache, header, sizeof(os_header_t)); } return 1; @@ -2044,7 +2243,7 @@ static int osst_analyze_headers(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt) { - int position, block; + int position, ppos; int first, last; int valid = 0; int dev = TAPE_NR(STp->devt); @@ -2059,37 +2258,37 @@ STp->header_ok = STp->linux_media = STp->linux_media_version = 0; STp->wrt_pass_cntr = STp->update_frame_cntr = -1; STp->eod_frame_ppos = STp->first_data_ppos = -1; - STp->first_mark_ppos = STp->last_mark_ppos = -1; + STp->first_mark_ppos = STp->last_mark_ppos = STp->last_mark_lbn = -1; #if DEBUG - printk(OSST_DEB_MSG "osst%i: Reading header\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Reading header\n", dev); #endif - /* optimization for speed - if we are positioned at block 10, read second group first */ + /* optimization for speed - if we are positioned at ppos 10, read second group first */ /* TODO try the ADR 1.1 locations for the second group if we have no valid one yet... */ first = position==10?0xbae: 5; last = position==10?0xbb3:10; - for (block = first; block < last; block++) - if (__osst_analyze_headers(STp, aSCpnt, block)) + for (ppos = first; ppos < last; ppos++) + if (__osst_analyze_headers(STp, aSCpnt, ppos)) valid = 1; first = position==10? 5:0xbae; last = position==10?10:0xbb3; - for (block = first; block < last; block++) - if (__osst_analyze_headers(STp, aSCpnt, block)) + for (ppos = first; ppos < last; ppos++) + if (__osst_analyze_headers(STp, aSCpnt, ppos)) valid = 1; if (!valid) { - printk(KERN_ERR "osst%i: Failed to find valid ADRL header, new media?\n", dev); + printk(KERN_ERR "osst%i:E: Failed to find valid ADRL header, new media?\n", dev); STp->eod_frame_ppos = STp->first_data_ppos = 0; osst_set_frame_position(STp, aSCpnt, 10, 0); return 0; } if (position <= STp->first_data_ppos) { position = STp->first_data_ppos; - STp->ps[0].drv_file = STp->ps[0].drv_block = STp->logical_blk_num = 0; + STp->ps[0].drv_file = STp->ps[0].drv_block = STp->frame_seq_number = STp->logical_blk_num = 0; } osst_set_frame_position(STp, aSCpnt, position, 0); STp->header_ok = 1; @@ -2100,18 +2299,21 @@ static int osst_verify_position(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt) { int frame_position = STp->first_frame_position; + int frame_seq_numbr = STp->frame_seq_number; int logical_blk_num = STp->logical_blk_num; + int halfway_frame = STp->frame_in_buffer; + int read_pointer = STp->buffer->read_pointer; int prev_mark_ppos = -1; int actual_mark_ppos, i, n; -#if 1 //DEBUG +#if DEBUG int dev = TAPE_NR(STp->devt); - printk(OSST_DEB_MSG "osst%i: Verify that the tape is really the one we think before writing\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Verify that the tape is really the one we think before writing\n", dev); #endif osst_set_frame_position(STp, aSCpnt, frame_position - 1, 0); - if (osst_get_logical_blk(STp, aSCpnt, -1, 0) < 0) { + if (osst_get_logical_frame(STp, aSCpnt, -1, 0) < 0) { #if DEBUG - printk(OSST_DEB_MSG "osst%i: Couldn't get logical blk num in verify_position\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Couldn't get logical blk num in verify_position\n", dev); #endif return (-EIO); } @@ -2123,42 +2325,48 @@ prev_mark_ppos = frame_position - 1; /* usually - we don't really know */ actual_mark_ppos = STp->buffer->aux->frame_type == OS_FRAME_TYPE_MARKER ? frame_position - 1 : ntohl(STp->buffer->aux->last_mark_ppos); - if (frame_position != STp->first_frame_position || - logical_blk_num != STp->logical_blk_num + 1 || - prev_mark_ppos != actual_mark_ppos ) { -#if 1 //DEBUG - printk(OSST_DEB_MSG "osst%i: Block mismatch: frame %d-%d, lblk %d-%d, mark %d-%d\n", dev, - STp->first_frame_position, frame_position, STp->logical_blk_num + 1, - logical_blk_num, actual_mark_ppos, prev_mark_ppos); + if (frame_position != STp->first_frame_position || + frame_seq_numbr != STp->frame_seq_number + (halfway_frame?0:1) || + prev_mark_ppos != actual_mark_ppos ) { +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Block mismatch: fppos %d-%d, fseq %d-%d, mark %d-%d\n", dev, + STp->first_frame_position, frame_position, + STp->frame_seq_number + (halfway_frame?0:1), + frame_seq_numbr, actual_mark_ppos, prev_mark_ppos); #endif return (-EIO); } - STp->logical_blk_in_buffer = 0; - STp->logical_blk_num = logical_blk_num; + if (halfway_frame) { + /* prepare buffer for append and rewrite on top of original */ + osst_set_frame_position(STp, aSCpnt, frame_position - 1, 0); + STp->buffer->buffer_bytes = read_pointer; + STp->ps[STp->partition].rw = ST_WRITING; + STp->dirty = 1; + } + STp->frame_in_buffer = halfway_frame; + STp->frame_seq_number = frame_seq_numbr; + STp->logical_blk_num = logical_blk_num; return 0; } /* Acc. to OnStream, the vers. numbering is the following: * X.XX for released versions (X=digit), * XXXY for unreleased versions (Y=letter) - * Ordering 1.05 < 106A < 106a < 106B < ... < 1.06 + * Ordering 1.05 < 106A < 106B < ... < 106a < ... < 1.06 * This fn makes monoton numbers out of this scheme ... */ static unsigned int osst_parse_firmware_rev (const char * str) { - unsigned int rev; if (str[1] == '.') { - rev = (str[0]-0x30)*10000 - +(str[2]-0x30)*1000 - +(str[3]-0x30)*100; + return (str[0]-'0')*10000 + +(str[2]-'0')*1000 + +(str[3]-'0')*100; } else { - rev = (str[0]-0x30)*10000 - +(str[1]-0x30)*1000 - +(str[2]-0x30)*100 - 100; - rev += 2*(str[3] & 0x1f) - +(str[3] >= 0x60? 1: 0); + return (str[0]-'0')*10000 + +(str[1]-'0')*1000 + +(str[2]-'0')*100 - 100 + +(str[3]-'@'); } - return rev; } /* @@ -2166,9 +2374,9 @@ */ static int osst_configure_onstream(OS_Scsi_Tape *STp, Scsi_Cmnd ** aSCpnt) { - int dev = TAPE_NR(STp->devt); unsigned char cmd[MAX_COMMAND_SIZE]; - Scsi_Cmnd * SCpnt = * aSCpnt; + int dev = TAPE_NR(STp->devt); + Scsi_Cmnd * SCpnt = * aSCpnt; osst_mode_parameter_header_t * header; osst_block_size_page_t * bs; osst_capabilities_page_t * cp; @@ -2177,21 +2385,19 @@ if (STp->ready != ST_READY) { #if DEBUG - printk(OSST_DEB_MSG "osst%i: Not Ready\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Not Ready\n", dev); #endif return (-EIO); } if (STp->os_fw_rev < 10600) { - printk("osst%i: Old OnStream firmware revision detected (%s)\n", - dev, STp->device->rev); - printk("osst%i: An upgrade to version 1.06 or above is recommended\n", - dev); + printk(KERN_INFO "osst%i:I: Old OnStream firmware revision detected (%s),\n", dev, STp->device->rev); + printk(KERN_INFO "osst%d:I: an upgrade to version 1.06 or above is recommended\n", dev); } /* * Configure 32.5KB (data+aux) frame size. - * Get the current block size from the block size mode page + * Get the current frame size from the block size mode page */ memset(cmd, 0, MAX_COMMAND_SIZE); cmd[0] = MODE_SENSE; @@ -2202,13 +2408,13 @@ SCpnt = osst_do_scsi(SCpnt, STp, cmd, cmd[4], STp->timeout, 0, TRUE); if (SCpnt == NULL) { #if DEBUG - printk(OSST_DEB_MSG "osst: Busy\n"); + printk(OSST_DEB_MSG "osst :D: Busy\n"); #endif return (-EBUSY); } *aSCpnt = SCpnt; if ((STp->buffer)->last_result_fatal != 0) { - printk (KERN_ERR "osst%i: Can't get tape block size mode page\n", dev); + printk (KERN_ERR "osst%d:E: Can't get tape block size mode page\n", dev); return (-EIO); } @@ -2216,10 +2422,10 @@ bs = (osst_block_size_page_t *) ((STp->buffer)->b_data + sizeof(osst_mode_parameter_header_t) + header->bdl); #if DEBUG - printk(KERN_INFO "osst%i: 32KB play back: %s\n", dev, bs->play32 ? "Yes" : "No"); - printk(KERN_INFO "osst%i: 32.5KB play back: %s\n", dev, bs->play32_5 ? "Yes" : "No"); - printk(KERN_INFO "osst%i: 32KB record: %s\n", dev, bs->record32 ? "Yes" : "No"); - printk(KERN_INFO "osst%i: 32.5KB record: %s\n", dev, bs->record32_5 ? "Yes" : "No"); + printk(OSST_DEB_MSG "osst%d:D: 32KB play back: %s\n", dev, bs->play32 ? "Yes" : "No"); + printk(OSST_DEB_MSG "osst%d:D: 32.5KB play back: %s\n", dev, bs->play32_5 ? "Yes" : "No"); + printk(OSST_DEB_MSG "osst%d:D: 32KB record: %s\n", dev, bs->record32 ? "Yes" : "No"); + printk(OSST_DEB_MSG "osst%d:D: 32.5KB record: %s\n", dev, bs->record32_5 ? "Yes" : "No"); #endif /* @@ -2239,16 +2445,12 @@ SCpnt = osst_do_scsi(SCpnt, STp, cmd, cmd[4], STp->timeout, 0, TRUE); *aSCpnt = SCpnt; if ((STp->buffer)->last_result_fatal != 0) { - printk (KERN_ERR "osst%i: Couldn't set tape block size mode page\n", dev); + printk (KERN_ERR "osst%d:E: Couldn't set tape block size mode page\n", dev); return (-EIO); } - STp->block_size = (STp->raw) ? OS_FRAME_SIZE : OS_DATA_SIZE; - STp->min_block = OS_FRAME_SIZE; /* FIXME */ - STp->max_block = STp->block_size; - #if DEBUG - printk(KERN_INFO "osst%i: Block Size changed to 32.5K\n", dev); + printk(KERN_INFO "osst%d:D: Block Size changed to 32.5K\n", dev); /* * In debug mode, we want to see as many errors as possible * to test the error recovery mechanism. @@ -2284,7 +2486,7 @@ *aSCpnt = SCpnt; if ((STp->buffer)->last_result_fatal != 0) { - printk (KERN_ERR "osst%i: Couldn't set vendor name to %s\n", dev, + printk (KERN_ERR "osst%d:E: Couldn't set vendor name to %s\n", dev, (char *) ((STp->buffer)->b_data + MODE_HEADER_LENGTH + 2)); return (-EIO); } @@ -2299,7 +2501,7 @@ *aSCpnt = SCpnt; if ((STp->buffer)->last_result_fatal != 0) { - printk (KERN_ERR "osst%i: can't get capabilities page\n", dev); + printk (KERN_ERR "osst%d:E: Can't get capabilities page\n", dev); return (-EIO); } @@ -2319,7 +2521,7 @@ *aSCpnt = SCpnt; if ((STp->buffer)->last_result_fatal != 0) { - printk (KERN_ERR "osst%i: can't get tape parameter page\n", dev); + printk (KERN_ERR "osst%d:E: Can't get tape parameter page\n", dev); return (-EIO); } @@ -2330,7 +2532,7 @@ STp->density = prm->density; STp->capacity = ntohs(prm->segtrk) * ntohs(prm->trks); #if DEBUG - printk(OSST_DEB_MSG "osst%d: Density %d, tape length: %dMB, drive buffer size: %dKB\n", + printk(OSST_DEB_MSG "osst%d:D: Density %d, tape length: %dMB, drive buffer size: %dKB\n", dev, STp->density, STp->capacity / 32, drive_buffer_size); #endif @@ -2348,7 +2550,7 @@ #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: Stepping over filemark %s.\n", + printk(OSST_DEB_MSG "osst%d:D: Stepping over filemark %s.\n", dev, forward ? "forward" : "backward"); #endif @@ -2361,7 +2563,7 @@ result = osst_seek_logical_blk(STp, aSCpnt, STp->logical_blk_num - 1); if (result < 0) - printk(KERN_ERR "osst%d: Stepping over filemark %s failed.\n", + printk(KERN_WARNING "osst%d:W: Stepping over filemark %s failed.\n", dev, forward ? "forward" : "backward"); return result; @@ -2401,7 +2603,7 @@ result = ((SCpnt->sense_buffer[2] & 0x0f) == 3) ? -EIO : -EINVAL; if (result == -EINVAL) - printk(KERN_ERR "osst%d: Can't read tape position.\n", dev); + printk(KERN_ERR "osst%d:E: Can't read tape position.\n", dev); else { if (result == -EIO) { /* re-read position */ @@ -2425,7 +2627,7 @@ STp->cur_frames = (STp->buffer)->b_data[15]; #if DEBUG if (debugging) { - printk(OSST_DEB_MSG "osst%d: Drive Positions: host %d, tape %d%s, buffer %d\n", dev, + printk(OSST_DEB_MSG "osst%d:D: Drive Positions: host %d, tape %d%s, buffer %d\n", dev, STp->first_frame_position, STp->last_frame_position, ((STp->buffer)->b_data[0]&0x80)?" (BOP)": ((STp->buffer)->b_data[0]&0x40)?" (EOP)":"", @@ -2434,7 +2636,7 @@ #endif if (STp->cur_frames == 0 && STp->first_frame_position != STp->last_frame_position) { #if DEBUG - printk(KERN_WARNING "osst%d: Correcting read position %d, %d, %d\n", dev, + printk(KERN_WARNING "osst%d:D: Correcting read position %d, %d, %d\n", dev, STp->first_frame_position, STp->last_frame_position, STp->cur_frames); #endif STp->first_frame_position = STp->last_frame_position; @@ -2446,60 +2648,66 @@ } -/* Set the tape block */ -static int osst_set_frame_position(OS_Scsi_Tape *STp, Scsi_Cmnd ** aSCpnt, int block, int skip) +/* Set the physical tape position */ +static int osst_set_frame_position(OS_Scsi_Tape *STp, Scsi_Cmnd ** aSCpnt, int ppos, int skip) { - ST_partstat *STps; - int result = 0; - int timeout; + ST_partstat * STps; + int result = 0; + int pp = (ppos == 3000 && !skip) ? 0 : ppos; unsigned char scmd[MAX_COMMAND_SIZE]; Scsi_Cmnd * SCpnt; - int dev = TAPE_NR(STp->devt); + int dev = TAPE_NR(STp->devt); if (STp->ready != ST_READY) return (-EIO); - timeout = STp->long_timeout; STps = &(STp->ps[STp->partition]); - if (block < 0 || block > STp->capacity) { - printk(KERN_ERR "osst%d: Reposition request %d out of range\n", dev, block); - block = block < 0 ? 0 : (STp->capacity - 1); + if (ppos < 0 || ppos > STp->capacity) { + printk(KERN_WARNING "osst%d:W: Reposition request %d out of range\n", dev, ppos); + pp = ppos = ppos < 0 ? 0 : (STp->capacity - 1); result = (-EINVAL); } + + do { #if DEBUG - if (debugging) - printk(OSST_DEB_MSG "osst%d: Setting block to %d.\n", dev, block); + if (debugging) + printk(OSST_DEB_MSG "osst%d:D: Setting physical position to %d.\n", dev, pp); #endif - memset (scmd, 0, MAX_COMMAND_SIZE); - scmd[0] = SEEK_10; - scmd[1] = 1; - scmd[3] = (block >> 24); - scmd[4] = (block >> 16); - scmd[5] = (block >> 8); - scmd[6] = block; - if (skip) - scmd[9] = 0x80; + memset (scmd, 0, MAX_COMMAND_SIZE); + scmd[0] = SEEK_10; + scmd[1] = 1; + scmd[3] = (pp >> 24); + scmd[4] = (pp >> 16); + scmd[5] = (pp >> 8); + scmd[6] = pp; + if (skip) + scmd[9] = 0x80; - SCpnt = osst_do_scsi(*aSCpnt, STp, scmd, 20, timeout, MAX_READY_RETRIES, TRUE); - if (!SCpnt) { + SCpnt = osst_do_scsi(*aSCpnt, STp, scmd, 20, STp->long_timeout, MAX_READY_RETRIES, TRUE); + if (!SCpnt) { #if DEBUG - printk(OSST_DEB_MSG "osst%d: Busy\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Busy\n", dev); #endif - return (-EBUSY); - } - *aSCpnt = SCpnt; + return (-EBUSY); + } + *aSCpnt = SCpnt; - STp->first_frame_position = STp->last_frame_position = block; - STps->eof = ST_NOEOF; - if ((STp->buffer)->last_result_fatal != 0) { + if ((STp->buffer)->last_result_fatal != 0) { #if DEBUG - printk(OSST_DEB_MSG "osst%d: SEEK command failed.\n", dev); + printk(OSST_DEB_MSG "osst%d:D: SEEK command from %d to %d failed.\n", + dev, STp->first_frame_position, pp); #endif - result = (-EIO); - } + result = (-EIO); + } + if (pp != ppos) + osst_wait_ready(STp, aSCpnt, 5 * 60); + } while ((pp != ppos) && (pp = ppos)); + + STp->first_frame_position = STp->last_frame_position = ppos; + STps->eof = ST_NOEOF; STps->at_sm = 0; STps->rw = ST_IDLE; - STp->logical_blk_in_buffer = 0; + STp->frame_in_buffer = 0; return result; } @@ -2508,7 +2716,7 @@ /* osst versions of st functions - augmented and stripped to suit OnStream only */ /* Flush the write buffer (never need to write if variable blocksize). */ -static int osst_flush_write_buffer(OS_Scsi_Tape *STp, Scsi_Cmnd ** aSCpnt, int file_blk) +static int osst_flush_write_buffer(OS_Scsi_Tape *STp, Scsi_Cmnd ** aSCpnt) { int offset, transfer, blks = 0; int result = 0; @@ -2521,19 +2729,19 @@ if (SCpnt == (STp->buffer)->last_SCpnt) #if DEBUG { printk(OSST_DEB_MSG - "osst%d: aSCpnt points to Scsi_Cmnd that write_behind_check will release -- cleared\n", dev); + "osst%d:D: aSCpnt points to Scsi_Cmnd that write_behind_check will release -- cleared\n", dev); #endif *aSCpnt = SCpnt = NULL; #if DEBUG } else if (SCpnt) printk(OSST_DEB_MSG - "osst%d: aSCpnt does not point to Scsi_Cmnd that write_behind_check will release -- strange\n", dev); + "osst%d:D: aSCpnt does not point to Scsi_Cmnd that write_behind_check will release -- strange\n", dev); #endif osst_write_behind_check(STp); if ((STp->buffer)->last_result_fatal) { #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: Async write error (flush) %x.\n", + printk(OSST_DEB_MSG "osst%d:D: Async write error (flush) %x.\n", dev, (STp->buffer)->last_result); #endif if ((STp->buffer)->last_result == INT_MAX) @@ -2545,15 +2753,13 @@ result = 0; if (STp->dirty == 1) { + STp->write_count++; + STps = &(STp->ps[STp->partition]); + STps->rw = ST_WRITING; offset = STp->buffer->buffer_bytes; + blks = (offset + STp->block_size - 1) / STp->block_size; transfer = OS_FRAME_SIZE; - blks = 1; -#if DEBUG - if (debugging) - printk(OSST_DEB_MSG "osst%d: Flushing %d bytes, Tranfering %d bytes in %d blocks.\n", - dev, offset, transfer, blks); -#endif if (offset < OS_DATA_SIZE) osst_zero_buffer_tail(STp->buffer); @@ -2564,17 +2770,48 @@ memset(cmd, 0, MAX_COMMAND_SIZE); cmd[0] = WRITE_6; cmd[1] = 1; - cmd[4] = blks; + cmd[4] = 1; + + switch (STp->write_type) { + case OS_WRITE_DATA: +#if DEBUG + if (debugging) + printk(OSST_DEB_MSG "osst%d:D: Writing %d blocks to frame %d, lblks %d-%d\n", + dev, blks, STp->frame_seq_number, + STp->logical_blk_num - blks, STp->logical_blk_num - 1); +#endif + osst_init_aux(STp, OS_FRAME_TYPE_DATA, STp->frame_seq_number++, + STp->logical_blk_num - blks, STp->block_size, blks); + break; + case OS_WRITE_EOD: + osst_init_aux(STp, OS_FRAME_TYPE_EOD, STp->frame_seq_number++, STp->logical_blk_num, 0, 0); + break; + case OS_WRITE_NEW_MARK: + osst_init_aux(STp, OS_FRAME_TYPE_MARKER, STp->frame_seq_number++, STp->logical_blk_num++, + 0, blks=1); + break; + case OS_WRITE_HEADER: + osst_init_aux(STp, OS_FRAME_TYPE_HEADER, 0, 0, 0, blks=0); + break; + default: /* probably FILLER */ + osst_init_aux(STp, OS_FRAME_TYPE_FILL, 0, 0, 0, 0); + } +#if DEBUG + if (debugging) + printk(OSST_DEB_MSG "osst%d:D: Flushing %d bytes, Transfering %d bytes in %d lblocks.\n", + dev, offset, transfer, blks); +#endif SCpnt = osst_do_scsi(*aSCpnt, STp, cmd, transfer, STp->timeout, MAX_WRITE_RETRIES, TRUE); *aSCpnt = SCpnt; if (!SCpnt) return (-EBUSY); - STps = &(STp->ps[STp->partition]); if ((STp->buffer)->last_result_fatal != 0) { - printk(OSST_DEB_MSG "osst%d: write sense [0]=0x%02x [2]=%02x [12]=%02x [13]=%02x\n", TAPE_NR(STp->devt), +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: write sense [0]=0x%02x [2]=%02x [12]=%02x [13]=%02x\n", TAPE_NR(STp->devt), SCpnt->sense_buffer[0], SCpnt->sense_buffer[2], SCpnt->sense_buffer[12], SCpnt->sense_buffer[13]); +#endif if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && (SCpnt->sense_buffer[2] & 0x40) && /* FIXME - SC-30 drive doesn't assert EOM bit */ (SCpnt->sense_buffer[2] & 0x0f) == NO_SENSE) { @@ -2584,7 +2821,7 @@ } else { if (osst_write_error_recovery(STp, aSCpnt, 1)) { - printk(KERN_ERR "osst%d: Error on flush.\n", dev); + printk(KERN_ERR "osst%d:E: Error on flush write.\n", dev); result = (-EIO); } } @@ -2592,15 +2829,12 @@ } else { STp->first_frame_position++; - if (file_blk && STps->drv_block >= 0) - STps->drv_block += blks; - STp->first_frame_position += blks; STp->dirty = 0; (STp->buffer)->buffer_bytes = 0; } } #if DEBUG - printk(OSST_DEB_MSG "osst%d: Exit flush write buffer with code %d\n", dev, result); + printk(OSST_DEB_MSG "osst%d:D: Exit flush write buffer with code %d\n", dev, result); #endif return result; } @@ -2610,15 +2844,12 @@ seek_next is true. */ static int osst_flush_buffer(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int seek_next) { - int backspace, result; - OSST_buffer * STbuffer; + int backspace = 0, result = 0; ST_partstat * STps; #if DEBUG int dev = TAPE_NR(STp->devt); #endif - STbuffer = STp->buffer; - /* * If there was a bus reset, block further access * to this device. @@ -2631,21 +2862,25 @@ STps = &(STp->ps[STp->partition]); if (STps->rw == ST_WRITING) /* Writing */ - return osst_flush_write_buffer(STp, aSCpnt, 1); + return osst_flush_write_buffer(STp, aSCpnt); if (STp->block_size == 0) return 0; #if DEBUG - printk(OSST_DEB_MSG "osst%i: Reached flush (read) buffer\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Reached flush (read) buffer\n", dev); #endif - backspace = ((STp->buffer)->buffer_bytes + - (STp->buffer)->read_pointer) / STp->block_size - - ((STp->buffer)->read_pointer + STp->block_size - 1) / - STp->block_size; - (STp->buffer)->buffer_bytes = 0; - (STp->buffer)->read_pointer = 0; - result = 0; + + if (!STp->can_bsr) { + backspace = ((STp->buffer)->buffer_bytes + + (STp->buffer)->read_pointer) / STp->block_size - + ((STp->buffer)->read_pointer + STp->block_size - 1) / + STp->block_size; /* FIXME is this relevant w. OSST? */ + STp->buffer->buffer_bytes = 0; + STp->buffer->read_pointer = 0; + STp->frame_in_buffer = 0; + } + if (!seek_next) { if (STps->eof == ST_FM_HIT) { result = cross_eof(STp, aSCpnt, FALSE); /* Back over the EOF hit */ @@ -2671,6 +2906,87 @@ } +static int osst_write_frame(OS_Scsi_Tape * STp, Scsi_Cmnd ** aSCpnt, int synchronous) +{ + unsigned char cmd[MAX_COMMAND_SIZE]; + Scsi_Cmnd * SCpnt; + int blks; +#if DEBUG + int dev = TAPE_NR(STp->devt); +#endif + + if ((!STp-> raw) && (STp->first_frame_position == 0xbae)) { /* _must_ preserve buffer! */ +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Reaching config partition.\n", dev); +#endif + if (osst_flush_drive_buffer(STp, aSCpnt) < 0) { + return (-EIO); + } + /* error recovery may have bumped us past the header partition */ + if (osst_get_frame_position(STp, aSCpnt) < 0xbb8) { +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Skipping over config partition.\n", dev); +#endif + osst_position_tape_and_confirm(STp, aSCpnt, 0xbb8); + } + } + + if (STp->poll) + osst_wait_frame (STp, aSCpnt, STp->first_frame_position, -50, 60); + /* TODO: Check for an error ! */ + +// osst_build_stats(STp, &SCpnt); + + STp->ps[STp->partition].rw = ST_WRITING; + STp->write_type = OS_WRITE_DATA; + + memset(cmd, 0, MAX_COMMAND_SIZE); + cmd[0] = WRITE_6; + cmd[1] = 1; + cmd[4] = 1; /* one frame at a time... */ + blks = STp->buffer->buffer_bytes / STp->block_size; +#if DEBUG + if (debugging) + printk(OSST_DEB_MSG "osst%d:D: Writing %d blocks to frame %d, lblks %d-%d\n", dev, blks, + STp->frame_seq_number, STp->logical_blk_num - blks, STp->logical_blk_num - 1); +#endif + osst_init_aux(STp, OS_FRAME_TYPE_DATA, STp->frame_seq_number++, + STp->logical_blk_num - blks, STp->block_size, blks); + +#if DEBUG + if (!synchronous) + STp->write_pending = 1; +#endif + SCpnt = osst_do_scsi(*aSCpnt, STp, cmd, OS_FRAME_SIZE, STp->timeout, MAX_WRITE_RETRIES, synchronous); + if (!SCpnt) + return (-EBUSY); + *aSCpnt = SCpnt; + + if (synchronous) { + if (STp->buffer->last_result_fatal != 0) { +#if DEBUG + if (debugging) + printk(OSST_DEB_MSG "osst%d:D: Error on write:\n", dev); +#endif + if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && + (SCpnt->sense_buffer[2] & 0x40)) { + if ((SCpnt->sense_buffer[2] & 0x0f) == VOLUME_OVERFLOW) + return (-ENOSPC); + } + else { + if (osst_write_error_recovery(STp, aSCpnt, 1)) + return (-EIO); + } + } + else + STp->first_frame_position++; + } + + STp->write_count++; + + return 0; +} + /* Entry points to osst */ @@ -2682,7 +2998,6 @@ ssize_t i, do_count, blks, retval, transfer; int write_threshold; int doing_write = 0; - unsigned char cmd[MAX_COMMAND_SIZE]; const char *b_point; Scsi_Cmnd * SCpnt = NULL; OS_Scsi_Tape * STp; @@ -2728,7 +3043,7 @@ #if DEBUG if (!STp->in_use) { - printk(OSST_DEB_MSG "osst%d: Incorrect device.\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Incorrect device.\n", dev); return (-EIO); } #endif @@ -2738,13 +3053,13 @@ /* Write must be integral number of blocks */ if (STp->block_size != 0 && (count % STp->block_size) != 0) { - printk(KERN_WARNING "osst%d: Write (%d bytes) not multiple of tape block size (32k).\n", - dev, count); + printk(KERN_ERR "osst%d:E: Write (%d bytes) not multiple of tape block size (%d%c).\n", dev, count, + STp->block_size<1024?STp->block_size:STp->block_size/1024, STp->block_size<1024?'b':'k'); return (-EIO); } - if (STp->first_frame_position >= STp->capacity - 164) { - printk(KERN_WARNING "osst%d: Write truncated at EOM early warning (frame %d).\n", + if (STp->first_frame_position >= STp->capacity - OSST_EOM_RESERVE) { + printk(KERN_ERR "osst%d:E: Write truncated at EOM early warning (frame %d).\n", dev, STp->first_frame_position); return (-ENOSPC); } @@ -2765,63 +3080,64 @@ } else if (STps->rw != ST_WRITING) { /* Are we totally rewriting this tape? */ - if (!STp->header_ok || STp->first_frame_position == STp->first_data_ppos || - (STps->drv_file == 0 && STps->drv_block == 0)) { + if (!STp->header_ok || + (STp->first_frame_position == STp->first_data_ppos && STps->drv_block < 0) || + (STps->drv_file == 0 && STps->drv_block == 0)) { STp->wrt_pass_cntr++; #if DEBUG - printk(OSST_DEB_MSG "osst%d: Allocating next write pass counter: %d\n", + printk(OSST_DEB_MSG "osst%d:D: Allocating next write pass counter: %d\n", dev, STp->wrt_pass_cntr); #endif osst_reset_header(STp, &SCpnt); - STps->drv_file = STps->drv_block = STp->logical_blk_num = 0; + STps->drv_file = STps->drv_block = 0; } /* Do we know where we'll be writing on the tape? */ else { if ((STp->fast_open && osst_verify_position(STp, &SCpnt)) || STps->drv_file < 0 || STps->drv_block < 0) { - if (STp->first_frame_position == STp->eod_frame_ppos) { + if (STp->first_frame_position == STp->eod_frame_ppos) { /* at EOD */ STps->drv_file = STp->filemark_cnt; STps->drv_block = 0; } else { /* We have no idea where the tape is positioned - give up */ #if DEBUG - printk(OSST_DEB_MSG "osst%d: Cannot write at indeterminate position.\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Cannot write at indeterminate position.\n", dev); #endif if (SCpnt) scsi_release_command(SCpnt); return (-EIO); } } - if (STps->drv_file > 0 && STps->drv_file < STp->filemark_cnt) { - STp->filemark_cnt = STps->drv_file; + if ((STps->drv_file + STps->drv_block) > 0 && STps->drv_file < STp->filemark_cnt) { + STp->filemark_cnt = STps->drv_file; STp->last_mark_ppos = ntohl(STp->header_cache->dat_fm_tab.fm_tab_ent[STp->filemark_cnt-1]); - printk(KERN_WARNING "osst%d: Overwriting file %d with old write pass counter %d\n", + STp->last_mark_lbn = STp->logical_blk_num - STps->drv_block; + printk(KERN_WARNING "osst%d:W: Overwriting file %d with old write pass counter %d\n", dev, STps->drv_file, STp->wrt_pass_cntr); - printk(KERN_WARNING "osst%d: may lead to stale data being accepted on reading back!\n", + printk(KERN_WARNING "osst%d:W: may lead to stale data being accepted on reading back!\n", dev); #if DEBUG - printk(OSST_DEB_MSG "osst%d: resetting filemark count to %d and last mark ppos to %d\n", - dev, STp->filemark_cnt, STp->last_mark_ppos); + printk(OSST_DEB_MSG "osst%d:D: resetting filemark count to %d and last mark ppos,lbn to %d,%d\n", + dev, STp->filemark_cnt, STp->last_mark_ppos, STp->last_mark_lbn); #endif } } STp->fast_open = FALSE; -//printk(OSST_DEB_MSG "osst%d: Starting write next file\n",dev); } if (!STp->header_ok) { #if DEBUG - printk(OSST_DEB_MSG "osst%d: Write cannot proceed without valid headers\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Write cannot proceed without valid headers\n", dev); #endif if (SCpnt) scsi_release_command(SCpnt); return (-EIO); } if ((STp->buffer)->writing) { -if (SCpnt) printk(KERN_ERR "osst%d: Not supposed to have SCpnt at line %d\n", dev, __LINE__); +if (SCpnt) printk(KERN_ERR "osst%d:A: Not supposed to have SCpnt at line %d\n", dev, __LINE__); osst_write_behind_check(STp); if ((STp->buffer)->last_result_fatal) { #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: Async write error (write) %x.\n", dev, + printk(OSST_DEB_MSG "osst%d:D: Async write error (write) %x.\n", dev, (STp->buffer)->last_result); #endif if ((STp->buffer)->last_result == INT_MAX) @@ -2844,10 +3160,6 @@ return (-EFAULT); if (!STm->do_buffer_writes) { -#if 0 - if (STp->block_size != 0 && (count % STp->block_size) != 0) - return (-EIO); /* Write must be integral number of blocks */ -#endif write_threshold = 1; } else @@ -2856,35 +3168,11 @@ write_threshold--; total = count; - - if ((!STp-> raw) && (STp->first_frame_position == 0xbae)) { -#if DEBUG - printk(OSST_DEB_MSG "osst%d: Skipping over config partition.\n", dev); -#endif - if (osst_flush_drive_buffer(STp, &SCpnt) < 0) { - if (SCpnt) scsi_release_command(SCpnt); - return (-EIO); - } - /* error recovery may have bumped us past the header partition */ - if (osst_get_frame_position(STp, &SCpnt) < 0xbb8) - osst_position_tape_and_confirm(STp, &SCpnt, 0xbb8); - } - - if (STp->poll) - retval = osst_wait_frame (STp, &SCpnt, STp->first_frame_position, -50, 60); - /* TODO: Check for an error ! */ -//osst_build_stats(STp, &SCpnt); - memset(cmd, 0, MAX_COMMAND_SIZE); - cmd[0] = WRITE_6; - cmd[1] = 1; - - STps->rw = ST_WRITING; - STp->write_type = OS_WRITE_DATA; - #if DEBUG - printk(OSST_DEB_MSG "osst%d: Writing %d bytes to file %d block %d lblk %d frame %d\n", + if (debugging) + printk(OSST_DEB_MSG "osst%d:D: Writing %d bytes to file %d block %d lblk %d fseq %d fppos %d\n", dev, count, STps->drv_file, STps->drv_block, - STp->logical_blk_num, STp->first_frame_position); + STp->logical_blk_num, STp->frame_seq_number, STp->first_frame_position); #endif b_point = buf; @@ -2905,84 +3193,60 @@ return i; } - transfer = OS_FRAME_SIZE; - blks = 1; - - osst_init_aux(STp, OS_FRAME_TYPE_DATA, STp->logical_blk_num++ ); + blks = do_count / STp->block_size; + STp->logical_blk_num += blks; /* logical_blk_num is incremented as data is moved from user */ - cmd[2] = blks >> 16; - cmd[3] = blks >> 8; - cmd[4] = blks; + i = osst_write_frame(STp, &SCpnt, TRUE); - SCpnt = osst_do_scsi(SCpnt, STp, cmd, transfer, STp->timeout, MAX_WRITE_RETRIES, TRUE); - if (!SCpnt) - return (-EBUSY); - - if ((STp->buffer)->last_result_fatal != 0) { -#if DEBUG - if (debugging) - printk(OSST_DEB_MSG "osst%d: Error on write:\n", dev); -#endif - if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && - (SCpnt->sense_buffer[2] & 0x40)) { - if ((SCpnt->sense_buffer[0] & 0x80) != 0) - transfer = (SCpnt->sense_buffer[3] << 24) | - (SCpnt->sense_buffer[4] << 16) | - (SCpnt->sense_buffer[5] << 8) | SCpnt->sense_buffer[6]; - else - transfer = 0; - transfer *= STp->block_size; + if (i == (-ENOSPC)) { + transfer = STp->buffer->writing; /* FIXME -- check this logic */ if (transfer <= do_count) { - filp->f_pos += do_count - transfer; - count -= do_count - transfer; - if (STps->drv_block >= 0) { - STps->drv_block += (do_count - transfer) / STp->block_size; - } - STps->eof = ST_EOM_OK; - retval = (-ENOSPC); /* EOM within current request */ + filp->f_pos += do_count - transfer; /* some of the data made it */ + count -= do_count - transfer; + if (STps->drv_block >= 0) { + STps->drv_block += (do_count - transfer) / STp->block_size; + } + STps->eof = ST_EOM_OK; + retval = (-ENOSPC); /* EOM within current request */ #if DEBUG - if (debugging) - printk(OSST_DEB_MSG "osst%d: EOM with %d bytes unwritten.\n", - dev, transfer); + if (debugging) + printk(OSST_DEB_MSG "osst%d:D: EOM with %d bytes unwritten.\n", dev, transfer); #endif } else { - STps->eof = ST_EOM_ERROR; - STps->drv_block = (-1); /* Too cautious? */ - retval = (-EIO); /* EOM for old data */ + STps->eof = ST_EOM_ERROR; + STps->drv_block = (-1); /* Too cautious? */ + retval = (-EIO); /* EOM for old data */ #if DEBUG - if (debugging) - printk(OSST_DEB_MSG "osst%d: EOM with lost data.\n", dev); + if (debugging) + printk(OSST_DEB_MSG "osst%d:D: EOM with lost data.\n", dev); #endif } - } - else { - if (osst_write_error_recovery(STp, &SCpnt, 1) == 0) goto ok; - STps->drv_block = (-1); /* Too cautious? */ - retval = (-EIO); - } + } else + retval = i; - scsi_release_command(SCpnt); - SCpnt = NULL; - (STp->buffer)->buffer_bytes = 0; - STp->dirty = 0; - if (count < total) - return total - count; - else - return retval; - } - STp->first_frame_position++; -ok: + if (retval < 0) { + if (SCpnt != NULL) { + scsi_release_command(SCpnt); + SCpnt = NULL; + } + STp->buffer->buffer_bytes = 0; + STp->dirty = 0; + if (count < total) + return total - count; + else + return retval; + } filp->f_pos += do_count; b_point += do_count; count -= do_count; if (STps->drv_block >= 0) { STps->drv_block += blks; } - STp->first_frame_position += blks; - (STp->buffer)->buffer_bytes = 0; + STp->buffer->buffer_bytes = 0; STp->dirty = 0; - } + } /* end while write threshold exceeded */ + if (count != 0) { STp->dirty = 1; i = append_to_buffer(b_point, STp->buffer, count); @@ -2993,6 +3257,11 @@ } return i; } + blks = count / STp->block_size; + STp->logical_blk_num += blks; + if (STps->drv_block >= 0) { + STps->drv_block += blks; + } filp->f_pos += count; count = 0; } @@ -3004,28 +3273,15 @@ } if (STm->do_async_writes && - ((STp->buffer)->buffer_bytes >= STp->write_threshold && - (STp->buffer)->buffer_bytes >= OS_DATA_SIZE) ) { + (STp->buffer->buffer_bytes >= STp->write_threshold)) { /* Schedule an asynchronous write */ (STp->buffer)->writing = ((STp->buffer)->buffer_bytes / STp->block_size) * STp->block_size; STp->dirty = !((STp->buffer)->writing == (STp->buffer)->buffer_bytes); - transfer = OS_FRAME_SIZE; - blks = 1; - - osst_init_aux(STp, OS_FRAME_TYPE_DATA, STp->logical_blk_num++ ); - - cmd[2] = blks >> 16; - cmd[3] = blks >> 8; - cmd[4] = blks; -#if DEBUG - STp->write_pending = 1; -#endif - - SCpnt = osst_do_scsi(SCpnt, STp, cmd, transfer, STp->timeout, MAX_WRITE_RETRIES, FALSE); - if (SCpnt == NULL) + i = osst_write_frame(STp, &SCpnt, FALSE); + if (i < 0) return (-EIO); } else if (SCpnt != NULL) { @@ -3036,7 +3292,7 @@ if (total > 0) STps->eof = ST_NOEOF; - return( total); + return total; } @@ -3081,19 +3337,13 @@ return (-ENXIO); #if DEBUG if (!STp->in_use) { - printk(OSST_DEB_MSG "osst%d: Incorrect device.\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Incorrect device.\n", dev); return (-EIO); } #endif /* Must have initialized medium */ if (!STp->header_ok) return (-EIO); - if ((count % STp->block_size) != 0) { - printk(KERN_WARNING "osst%d: Use multiple of %d bytes as block size (%d requested)\n", - dev, STp->block_size, count); - return (-EIO); /* Read must be integral number of blocks */ - } - if (STp->do_auto_lock && STp->door_locked == ST_UNLOCKED && !osst_int_ioctl(STp, &SCpnt, MTLOCK, 0)) STp->door_locked = ST_LOCKED_AUTO; @@ -3108,9 +3358,14 @@ STps->rw = ST_IDLE; } + if ((count % STp->block_size) != 0) { + printk(KERN_WARNING "osst%d:W: Read (%d bytes) not multiple of tape block size (%d%c).\n", dev, count, + STp->block_size<1024?STp->block_size:STp->block_size/1024, STp->block_size<1024?'b':'k'); + } + #if DEBUG if (debugging && STps->eof != ST_NOEOF) - printk(OSST_DEB_MSG "osst%d: EOF/EOM flag up (%d). Bytes %d\n", dev, + printk(OSST_DEB_MSG "osst%d:D: EOF/EOM flag up (%d). Bytes %d\n", dev, STps->eof, (STp->buffer)->buffer_bytes); #endif if ((STp->buffer)->buffer_bytes == 0 && @@ -3134,39 +3389,49 @@ } /* Loop until enough data in buffer or a special condition found */ - for (total = 0, special = 0; total < count && !special; ) { + for (total = 0, special = 0; total < count - STp->block_size + 1 && !special; ) { /* Get new data if the buffer is empty */ if ((STp->buffer)->buffer_bytes == 0) { - special = osst_get_logical_blk(STp, &SCpnt, STp->logical_blk_num, 0); - STp->buffer->buffer_bytes = special ? 0 : OS_DATA_SIZE; - STp->buffer->read_pointer = 0; - STp->logical_blk_num++; /* block to look for next time */ - STp->logical_blk_in_buffer = 0; + if (STps->eof == ST_FM_HIT) + break; + special = osst_get_logical_frame(STp, &SCpnt, STp->frame_seq_number, 0); if (special < 0) { /* No need to continue read */ + STp->frame_in_buffer = 0; if (SCpnt) scsi_release_command(SCpnt); return special; - } - STps->drv_block++; + } } /* Move the data from driver buffer to user buffer */ if ((STp->buffer)->buffer_bytes > 0) { #if DEBUG if (debugging && STps->eof != ST_NOEOF) - printk(OSST_DEB_MSG "osst%d: EOF up (%d). Left %d, needed %d.\n", dev, + printk(OSST_DEB_MSG "osst%d:D: EOF up (%d). Left %d, needed %d.\n", dev, STps->eof, (STp->buffer)->buffer_bytes, count - total); #endif - transfer = (STp->buffer)->buffer_bytes < count - total ? - (STp->buffer)->buffer_bytes : count - total; + transfer = (((STp->buffer)->buffer_bytes < count - total ? + (STp->buffer)->buffer_bytes : count - total)/ + STp->block_size) * STp->block_size; /* force multiple of block size */ i = from_buffer(STp->buffer, buf, transfer); if (i) { if (SCpnt) scsi_release_command(SCpnt); return i; } - filp->f_pos += transfer; - buf += transfer; - total += transfer; + STp->logical_blk_num += transfer / STp->block_size; + STps->drv_block += transfer / STp->block_size; + filp->f_pos += transfer; + buf += transfer; + total += transfer; + } + + if ((STp->buffer)->buffer_bytes == 0) { +#if DEBUG + if (debugging) + printk(OSST_DEB_MSG "osst%d:D: Finished with frame %d\n", dev, STp->frame_seq_number); +#endif + STp->frame_in_buffer = 0; + STp->frame_seq_number++; /* frame to look for next time */ } } /* for (total = 0, special = 0; total < count && !special; ) */ @@ -3200,21 +3465,21 @@ static void osst_log_options(OS_Scsi_Tape *STp, ST_mode *STm, int dev) { printk(KERN_INFO -"osst%d: Mode %d options: buffer writes: %d, async writes: %d, read ahead: %d\n", +"osst%d:I: Mode %d options: buffer writes: %d, async writes: %d, read ahead: %d\n", dev, STp->current_mode, STm->do_buffer_writes, STm->do_async_writes, STm->do_read_ahead); printk(KERN_INFO -"osst%d: can bsr: %d, two FMs: %d, fast mteom: %d, auto lock: %d,\n", +"osst%d:I: can bsr: %d, two FMs: %d, fast mteom: %d, auto lock: %d,\n", dev, STp->can_bsr, STp->two_fm, STp->fast_mteom, STp->do_auto_lock); printk(KERN_INFO -"osst%d: defs for wr: %d, no block limits: %d, partitions: %d, s2 log: %d\n", +"osst%d:I: defs for wr: %d, no block limits: %d, partitions: %d, s2 log: %d\n", dev, STm->defaults_for_writes, STp->omit_blklims, STp->can_partitions, STp->scsi2_logical); printk(KERN_INFO -"osst%d: sysv: %d\n", dev, STm->sysv); +"osst%d:I: sysv: %d\n", dev, STm->sysv); #if DEBUG printk(KERN_INFO - "osst%d: debugging: %d\n", + "osst%d:D: debugging: %d\n", dev, debugging); #endif } @@ -3233,7 +3498,7 @@ modes_defined = TRUE; #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: Initialized mode %d definition from mode 0\n", + printk(OSST_DEB_MSG "osst%d:D: Initialized mode %d definition from mode 0\n", dev, STp->current_mode); #endif } @@ -3294,23 +3559,28 @@ else if (code == MT_ST_WRITE_THRESHOLD) { value = (options & ~MT_ST_OPTIONS) * ST_KILOBYTE; if (value < 1 || value > osst_buffer_size) { - printk(KERN_WARNING "osst%d: Write threshold %d too small or too large.\n", + printk(KERN_WARNING "osst%d:W: Write threshold %d too small or too large.\n", dev, value); return (-EIO); } STp->write_threshold = value; - printk(KERN_INFO "osst%d: Write threshold set to %d bytes.\n", + printk(KERN_INFO "osst%d:I: Write threshold set to %d bytes.\n", dev, value); } else if (code == MT_ST_DEF_BLKSIZE) { value = (options & ~MT_ST_OPTIONS); if (value == ~MT_ST_OPTIONS) { STm->default_blksize = (-1); - printk(KERN_INFO "osst%d: Default block size disabled.\n", dev); + printk(KERN_INFO "osst%d:I: Default block size disabled.\n", dev); } else { + if (value < 512 || value > OS_DATA_SIZE || OS_DATA_SIZE % value) { + printk(KERN_WARNING "osst%d:W: Default block size cannot be set to %d.\n", + dev, value); + return (-EINVAL); + } STm->default_blksize = value; - printk(KERN_INFO "osst%d: Default block size set to %d bytes.\n", + printk(KERN_INFO "osst%d:I: Default block size set to %d bytes.\n", dev, STm->default_blksize); } } @@ -3318,12 +3588,12 @@ value = (options & ~MT_ST_OPTIONS); if ((value & MT_ST_SET_LONG_TIMEOUT) != 0) { STp->long_timeout = (value & ~MT_ST_SET_LONG_TIMEOUT) * HZ; - printk(KERN_INFO "osst%d: Long timeout set to %d seconds.\n", dev, + printk(KERN_INFO "osst%d:I: Long timeout set to %d seconds.\n", dev, (value & ~MT_ST_SET_LONG_TIMEOUT)); } else { STp->timeout = value * HZ; - printk(KERN_INFO "osst%d: Normal timeout set to %d seconds.\n", dev, + printk(KERN_INFO "osst%d:I: Normal timeout set to %d seconds.\n", dev, value); } } @@ -3333,33 +3603,33 @@ if (code == MT_ST_DEF_DENSITY) { if (value == MT_ST_CLEAR_DEFAULT) { STm->default_density = (-1); - printk(KERN_INFO "osst%d: Density default disabled.\n", dev); + printk(KERN_INFO "osst%d:I: Density default disabled.\n", dev); } else { STm->default_density = value & 0xff; - printk(KERN_INFO "osst%d: Density default set to %x\n", + printk(KERN_INFO "osst%d:I: Density default set to %x\n", dev, STm->default_density); } } else if (code == MT_ST_DEF_DRVBUFFER) { if (value == MT_ST_CLEAR_DEFAULT) { STp->default_drvbuffer = 0xff; - printk(KERN_INFO "osst%d: Drive buffer default disabled.\n", dev); + printk(KERN_INFO "osst%d:I: Drive buffer default disabled.\n", dev); } else { STp->default_drvbuffer = value & 7; - printk(KERN_INFO "osst%d: Drive buffer default set to %x\n", + printk(KERN_INFO "osst%d:I: Drive buffer default set to %x\n", dev, STp->default_drvbuffer); } } else if (code == MT_ST_DEF_COMPRESSION) { if (value == MT_ST_CLEAR_DEFAULT) { STm->default_compression = ST_DONT_TOUCH; - printk(KERN_INFO "osst%d: Compression default disabled.\n", dev); + printk(KERN_INFO "osst%d:I: Compression default disabled.\n", dev); } else { STm->default_compression = (value & 1 ? ST_YES : ST_NO); - printk(KERN_INFO "osst%d: Compression default set to %x\n", + printk(KERN_INFO "osst%d:I: Compression default set to %x\n", dev, (value & 1)); } } @@ -3382,7 +3652,7 @@ Scsi_Cmnd * SCpnt = *aSCpnt; ST_partstat * STps; int fileno, blkno, at_sm, datalen; - int logical_blk_num; + int frame_seq_numbr, logical_blk_num; int dev = TAPE_NR(STp->devt); if (STp->ready != ST_READY && cmd_in != MTLOAD) { @@ -3396,6 +3666,7 @@ fileno = STps->drv_file; blkno = STps->drv_block; at_sm = STps->at_sm; + frame_seq_numbr = STp->frame_seq_number; logical_blk_num = STp->logical_blk_num; memset(cmd, 0, MAX_COMMAND_SIZE); @@ -3410,7 +3681,6 @@ ioctl_result = osst_space_over_filemarks_forward_fast(STp, &SCpnt, cmd_in, arg); else ioctl_result = osst_space_over_filemarks_forward_slow(STp, &SCpnt, cmd_in, arg); - logical_blk_num = STp->logical_blk_num; if (fileno >= 0) fileno += arg; blkno = 0; @@ -3423,7 +3693,6 @@ if (STp->raw) return (-EIO); ioctl_result = osst_space_over_filemarks_backward(STp, &SCpnt, cmd_in, arg); - logical_blk_num = STp->logical_blk_num; if (fileno >= 0) fileno -= arg; blkno = (-1); /* We can't know the block number */ @@ -3434,7 +3703,7 @@ case MTBSR: #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%i: Skipping %lu blocks %s from logical block %d\n", + printk(OSST_DEB_MSG "osst%d:D: Skipping %lu blocks %s from logical block %d\n", dev, arg, cmd_in==MTFSR?"forward":"backward", logical_blk_num); #endif if (cmd_in == MTFSR) { @@ -3445,8 +3714,9 @@ logical_blk_num -= arg; if (blkno >= 0) blkno -= arg; } - ioctl_result = osst_seek_logical_blk(STp, &SCpnt, logical_blk_num-1); - STp->logical_blk_in_buffer = 0; + ioctl_result = osst_seek_logical_blk(STp, &SCpnt, logical_blk_num); + fileno = STps->drv_file; + blkno = STps->drv_block; at_sm &= (arg == 0); goto os_bypass; @@ -3458,7 +3728,7 @@ cmd[4] = arg; #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: Spacing tape forward %d setmarks.\n", dev, + printk(OSST_DEB_MSG "osst%d:D: Spacing tape forward %d setmarks.\n", dev, cmd[2] * 65536 + cmd[3] * 256 + cmd[4]); #endif if (arg != 0) { @@ -3478,7 +3748,7 @@ if (cmd[2] & 0x80) ltmp = 0xff000000; ltmp = ltmp | (cmd[2] << 16) | (cmd[3] << 8) | cmd[4]; - printk(OSST_DEB_MSG "osst%d: Spacing tape backward %ld setmarks.\n", + printk(OSST_DEB_MSG "osst%d:D: Spacing tape backward %ld setmarks.\n", dev, (-ltmp)); } #endif @@ -3489,12 +3759,11 @@ break; case MTWEOF: if ( STps->rw == ST_WRITING && !(STp->device)->was_reset) - ioctl_result = osst_flush_write_buffer(STp, &SCpnt, 1); + ioctl_result = osst_flush_write_buffer(STp, &SCpnt); else ioctl_result = 0; for (i=0; ilogical_blk_num; if (fileno >= 0) fileno += arg; if (blkno >= 0) blkno = 0; goto os_bypass; @@ -3514,10 +3783,10 @@ #if DEBUG if (debugging) { if (cmd_in == MTWEOF) - printk(OSST_DEB_MSG "osst%d: Writing %d filemarks.\n", dev, + printk(OSST_DEB_MSG "osst%d:D: Writing %d filemarks.\n", dev, cmd[2] * 65536 + cmd[3] * 256 + cmd[4]); else - printk(OSST_DEB_MSG "osst%d: Writing %d setmarks.\n", dev, + printk(OSST_DEB_MSG "osst%d:D: Writing %d setmarks.\n", dev, cmd[2] * 65536 + cmd[3] * 256 + cmd[4]); } #endif @@ -3543,50 +3812,49 @@ if (debugging) { switch (cmd_in) { case MTUNLOAD: - printk(OSST_DEB_MSG "osst%d: Unloading tape.\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Unloading tape.\n", dev); break; case MTLOAD: - printk(OSST_DEB_MSG "osst%d: Loading tape.\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Loading tape.\n", dev); break; case MTRETEN: - printk(OSST_DEB_MSG "osst%d: Retensioning tape.\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Retensioning tape.\n", dev); break; case MTOFFL: - printk(OSST_DEB_MSG "osst%d: Ejecting tape.\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Ejecting tape.\n", dev); break; } } #endif - fileno = blkno = at_sm = logical_blk_num = 0 ; + fileno = blkno = at_sm = frame_seq_numbr = logical_blk_num = 0 ; break; case MTNOP: #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: No op on tape.\n", dev); + printk(OSST_DEB_MSG "osst%d:D: No-op on tape.\n", dev); #endif return 0; /* Should do something ? */ break; case MTEOM: #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: Spacing to end of recorded medium.\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Spacing to end of recorded medium.\n", dev); #endif osst_set_frame_position(STp, &SCpnt, STp->eod_frame_ppos, 0); - if (osst_get_logical_blk(STp, &SCpnt, -1, 0) < 0) { + if (osst_get_logical_frame(STp, &SCpnt, -1, 0) < 0) { ioctl_result = -EIO; goto os_bypass; } if (STp->buffer->aux->frame_type != OS_FRAME_TYPE_EOD) { #if DEBUG - printk(OSST_DEB_MSG "osst%d: No EOD frame found where expected.\n", dev); + printk(OSST_DEB_MSG "osst%d:D: No EOD frame found where expected.\n", dev); #endif ioctl_result = -EIO; goto os_bypass; } ioctl_result = osst_set_frame_position(STp, &SCpnt, STp->eod_frame_ppos, 0); - logical_blk_num = STp->logical_blk_num; - fileno = STp->filemark_cnt; - blkno = at_sm = 0; + fileno = STp->filemark_cnt; + blkno = at_sm = 0; goto os_bypass; case MTERASE: @@ -3597,7 +3865,7 @@ if (i < ioctl_result) ioctl_result = i; i = osst_position_tape_and_confirm(STp, &SCpnt, STp->eod_frame_ppos); if (i < ioctl_result) ioctl_result = i; - fileno = blkno = at_sm = logical_blk_num = 0 ; + fileno = blkno = at_sm = 0 ; goto os_bypass; case MTREW: @@ -3605,9 +3873,9 @@ cmd[1] = 1; #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: Rewinding tape, Immed=%d.\n", dev, cmd[1]); + printk(OSST_DEB_MSG "osst%d:D: Rewinding tape, Immed=%d.\n", dev, cmd[1]); #endif - fileno = blkno = at_sm = logical_blk_num = 0 ; + fileno = blkno = at_sm = frame_seq_numbr = logical_blk_num = 0 ; break; case MTLOCK: @@ -3616,8 +3884,8 @@ cmd[4] = SCSI_REMOVAL_PREVENT; #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: Locking drive door.\n", dev); -#endif; + printk(OSST_DEB_MSG "osst%d:D: Locking drive door.\n", dev); +#endif break; case MTUNLOCK: @@ -3626,8 +3894,8 @@ cmd[4] = SCSI_REMOVAL_ALLOW; #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: Unlocking drive door.\n", dev); -#endif; + printk(OSST_DEB_MSG "osst%d:D: Unlocking drive door.\n", dev); +#endif break; case MTSETBLK: /* Set block length */ @@ -3642,10 +3910,10 @@ ((arg & MT_ST_BLKSIZE_MASK) < STp->min_block || (arg & MT_ST_BLKSIZE_MASK) > STp->max_block || (arg & MT_ST_BLKSIZE_MASK) > osst_buffer_size)) { - printk(KERN_WARNING "osst%d: Illegal block size.\n", dev); + printk(KERN_WARNING "osst%d:W: Illegal block size.\n", dev); return (-EINVAL); } - return 0; /* silently ignore if block size didn't change */ + return 0; /* FIXME silently ignore if block size didn't change */ default: return (-ENOSYS); @@ -3654,20 +3922,25 @@ SCpnt = osst_do_scsi(SCpnt, STp, cmd, datalen, timeout, MAX_RETRIES, TRUE); if (!SCpnt) { #if DEBUG - printk(OSST_DEB_MSG "osst%d: Couldn't exec scsi cmd for IOCTL\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Couldn't exec scsi cmd for IOCTL\n", dev); #endif return (-EBUSY); } ioctl_result = (STp->buffer)->last_result_fatal; + if (!ioctl_result) { /* SCSI command successful */ + STp->frame_seq_number = frame_seq_numbr; + STp->logical_blk_num = logical_blk_num; + } + os_bypass: #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: IOCTL (%d) Result=%d\n", dev, cmd_in, ioctl_result); + printk(OSST_DEB_MSG "osst%d:D: IOCTL (%d) Result=%d\n", dev, cmd_in, ioctl_result); #endif - if (!ioctl_result) { /* SCSI command successful */ + if (!ioctl_result) { if (cmd_in == MTFSFM) { fileno--; @@ -3680,7 +3953,6 @@ STps->drv_block = blkno; STps->drv_file = fileno; STps->at_sm = at_sm; - STp->logical_blk_num = logical_blk_num; if (cmd_in == MTLOCK) STp->door_locked = ST_LOCKED_EXPLICIT; @@ -3700,7 +3972,7 @@ /* STp->rew_at_close = (MINOR(inode->i_rdev) & 0x80) == 0; FIXME */ for (i=0; i < ST_NBR_PARTITIONS; i++) { STp->ps[i].rw = ST_IDLE; - STp->ps[i].last_block_valid = FALSE; + STp->ps[i].last_block_valid = FALSE; /* FIXME - where else is this field maintained? */ } STp->partition = 0; } @@ -3769,12 +4041,12 @@ return (-ENXIO); if( !scsi_block_when_processing_errors(STp->device) ) { - return -ENXIO; + return (-ENXIO); } if (STp->in_use) { #if DEBUG - printk(OSST_DEB_MSG "osst%d: Device already in use.\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Device already in use.\n", dev); #endif return (-EBUSY); } @@ -3789,7 +4061,7 @@ if (mode != STp->current_mode) { #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: Mode change from %d to %d.\n", + printk(OSST_DEB_MSG "osst%d:D: Mode change from %d to %d.\n", dev, STp->current_mode, mode); #endif new_session = TRUE; @@ -3811,7 +4083,7 @@ if (i >= osst_nbr_buffers) { STp->buffer = new_tape_buffer(FALSE, need_dma_buffer); if (STp->buffer == NULL) { - printk(KERN_WARNING "osst%d: Can't allocate tape buffer.\n", dev); + printk(KERN_WARNING "osst%d:W: Can't allocate tape buffer.\n", dev); STp->in_use = 0; if (STp->device->host->hostt->module) __MOD_DEC_USE_COUNT(STp->device->host->hostt->module); @@ -3842,7 +4114,6 @@ STps->rw = ST_IDLE; } STp->ready = ST_READY; - STp->recover_count = 0; #if DEBUG STp->nbr_waits = STp->nbr_finished = 0; #endif @@ -3865,7 +4136,7 @@ (SCpnt->sense_buffer[2] & 0x0f) == NOT_READY && SCpnt->sense_buffer[12] == 4 ) { #if DEBUG - printk(OSST_DEB_MSG "osst%d: Unit not ready, cause %x\n", dev, SCpnt->sense_buffer[13]); + printk(OSST_DEB_MSG "osst%d:D: Unit not ready, cause %x\n", dev, SCpnt->sense_buffer[13]); #endif if (SCpnt->sense_buffer[13] == 2) { /* initialize command required (LOAD) */ memset (cmd, 0, MAX_COMMAND_SIZE); @@ -3879,7 +4150,7 @@ if ((SCpnt->sense_buffer[0] & 0x70) == 0x70 && (SCpnt->sense_buffer[2] & 0x0f) == UNIT_ATTENTION) { /* New media? */ #if DEBUG - printk(OSST_DEB_MSG "osst%d: Unit wants attention\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Unit wants attention\n", dev); #endif STp->header_ok = 0; @@ -3900,7 +4171,7 @@ STp->nbr_partitions = 1; /* This guess will be updated later if necessary */ for (i=0; i < ST_NBR_PARTITIONS; i++) { STps = &(STp->ps[i]); - STps->rw = ST_IDLE; + STps->rw = ST_IDLE; /* FIXME - seems to be redundant... */ STps->eof = ST_NOEOF; STps->at_sm = 0; STps->last_block_valid = FALSE; @@ -3908,6 +4179,7 @@ STps->drv_file = 0 ; } new_session = TRUE; + STp->recover_count = 0; } /* * if we have valid headers from before, and the drive/tape seem untouched, @@ -3930,7 +4202,7 @@ STp->buffer->b_data[MODE_HEADER_LENGTH + 4] != 'N' || STp->buffer->b_data[MODE_HEADER_LENGTH + 5] != '4' ) { #if DEBUG - printk(OSST_DEB_MSG "osst%d: signature was changed to %c%c%c%c\n", dev, + printk(OSST_DEB_MSG "osst%d:D: Signature was changed to %c%c%c%c\n", dev, STp->buffer->b_data[MODE_HEADER_LENGTH + 2], STp->buffer->b_data[MODE_HEADER_LENGTH + 3], STp->buffer->b_data[MODE_HEADER_LENGTH + 4], @@ -3942,17 +4214,23 @@ if (STp->header_ok && i == osst_get_frame_position(STp, &SCpnt)) { if (STp->door_locked == ST_UNLOCKED) { if (osst_int_ioctl(STp, &SCpnt, MTLOCK, 0)) - printk(KERN_WARNING "osst%d: Can't lock drive door\n", dev); + printk(KERN_INFO "osst%d:I: Can't lock drive door\n", dev); else STp->door_locked = ST_LOCKED_AUTO; } + if (!STp->frame_in_buffer) { + STp->block_size = (STp->raw) ? OS_FRAME_SIZE : ( + (STm->default_blksize > 0) ? STm->default_blksize : OS_DATA_SIZE); + STp->buffer->buffer_bytes = STp->buffer->read_pointer = 0; + } + STp->buffer->buffer_blocks = OS_DATA_SIZE / STp->block_size; STp->fast_open = TRUE; scsi_release_command(SCpnt); return 0; } #if DEBUG if (i != STp->first_frame_position) - printk(OSST_DEB_MSG "osst%d: tape position changed from %d to %d\n", dev, i, STp->first_frame_position); + printk(OSST_DEB_MSG "osst%d:D: Tape position changed from %d to %d\n", dev, i, STp->first_frame_position); #endif STp->header_ok = 0; } @@ -3975,8 +4253,8 @@ (STp->buffer)->b_data[MODE_HEADER_LENGTH + 2] = 2; (STp->buffer)->b_data[MODE_HEADER_LENGTH + 3] = 3; -#if 1 //DEBUG - printk(OSST_DEB_MSG "osst%i: Applying soft reset\n", dev); +#if DEBUG + printk(OSST_DEB_MSG "osst%d:D: Applying soft reset\n", dev); #endif SCpnt = osst_do_scsi(SCpnt, STp, cmd, cmd[4], STp->timeout, 0, TRUE); @@ -4012,7 +4290,7 @@ } if (osst_wait_ready(STp, &SCpnt, 3 * 60)) /* FIXME - not allowed with NOBLOCK */ - printk(KERN_WARNING "osst%i: Device did not become Ready in open\n",dev); + printk(KERN_INFO "osst%i:I: Device did not become Ready in open\n",dev); if ((STp->buffer)->last_result_fatal != 0) { if ((STp->device)->scsi_level >= SCSI_2 && @@ -4041,7 +4319,7 @@ if (OS_FRAME_SIZE > (STp->buffer)->buffer_size && !enlarge_buffer(STp->buffer, OS_FRAME_SIZE, STp->restr_dma)) { - printk(KERN_NOTICE "osst%d: Framesize %d too large for buffer.\n", dev, + printk(KERN_NOTICE "osst%d:A: Framesize %d too large for buffer.\n", dev, OS_FRAME_SIZE); scsi_release_command(SCpnt); SCpnt = NULL; @@ -4061,22 +4339,26 @@ b_size += STp->buffer->sg[i++].length); STp->buffer->aux = (os_aux_t *) (STp->buffer->sg[i].address + OS_DATA_SIZE - b_size); #if DEBUG - printk(OSST_DEB_MSG "osst%d: b_data points to %p in segment 0 at %p\n", dev, + printk(OSST_DEB_MSG "osst%d:D: b_data points to %p in segment 0 at %p\n", dev, STp->buffer->b_data, STp->buffer->sg[0].address); - printk(OSST_DEB_MSG "osst%d: AUX points to %p in segment %d at %p\n", dev, + printk(OSST_DEB_MSG "osst%d:D: AUX points to %p in segment %d at %p\n", dev, STp->buffer->aux, i, STp->buffer->sg[i].address); #endif } else STp->buffer->aux = NULL; /* this had better never happen! */ - (STp->buffer)->buffer_blocks = 1; + STp->block_size = (STp->raw) ? OS_FRAME_SIZE : ( + (STm->default_blksize > 0) ? STm->default_blksize : OS_DATA_SIZE); + STp->min_block = 512; + STp->max_block = OS_DATA_SIZE; + (STp->buffer)->buffer_blocks = OS_DATA_SIZE / STp->block_size; (STp->buffer)->buffer_bytes = (STp->buffer)->read_pointer = - STp->logical_blk_in_buffer = 0; + STp->frame_in_buffer = 0; #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: Block size: %d, frame size: %d, buffer size: %d (%d blocks).\n", + printk(OSST_DEB_MSG "osst%d:D: Block size: %d, frame size: %d, buffer size: %d (%d blocks).\n", dev, STp->block_size, OS_FRAME_SIZE, (STp->buffer)->buffer_size, (STp->buffer)->buffer_blocks); #endif @@ -4085,7 +4367,7 @@ STp->write_prot = 1; #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: Write protected\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Write protected\n", dev); #endif if ((flags & O_ACCMODE) == O_WRONLY || (flags & O_ACCMODE) == O_RDWR) { (STp->buffer)->in_use = 0; @@ -4105,7 +4387,7 @@ if (new_session) { /* Change the drive parameters for the new mode */ #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: New Session\n", dev); + printk(OSST_DEB_MSG "osst%d:D: New Session\n", dev); #endif STp->density_changed = STp->blksize_changed = FALSE; STp->compression_changed = FALSE; @@ -4116,7 +4398,7 @@ */ if (STp->door_locked == ST_UNLOCKED) { if (osst_int_ioctl(STp, &SCpnt, MTLOCK, 0)) - printk(KERN_WARNING "osst%d: Can't lock drive door\n", dev); + printk(KERN_INFO "osst%d:I: Can't lock drive door\n", dev); else STp->door_locked = ST_LOCKED_AUTO; } @@ -4152,7 +4434,7 @@ STps = &(STp->ps[STp->partition]); if ( STps->rw == ST_WRITING && !(STp->device)->was_reset) { - result = osst_flush_write_buffer(STp, &SCpnt, 1); + result = osst_flush_write_buffer(STp, &SCpnt); if (result != 0 && result != (-ENOSPC)) goto out; } @@ -4161,9 +4443,9 @@ #if DEBUG if (debugging) { - printk(OSST_DEB_MSG "osst%d: File length %ld bytes.\n", + printk(OSST_DEB_MSG "osst%d:D: File length %ld bytes.\n", dev, (long)(filp->f_pos)); - printk(OSST_DEB_MSG "osst%d: Async write waits %d, finished %d.\n", + printk(OSST_DEB_MSG "osst%d:D: Async write waits %d, finished %d.\n", dev, STp->nbr_waits, STp->nbr_finished); } #endif @@ -4184,7 +4466,7 @@ #if DEBUG if (debugging) - printk(OSST_DEB_MSG "osst%d: Buffer flushed, %d EOF(s) written\n", + printk(OSST_DEB_MSG "osst%d:D: Buffer flushed, %d EOF(s) written\n", dev, 1+STp->two_fm); #endif } @@ -4192,7 +4474,7 @@ STps = &(STp->ps[STp->partition]); if (!STm->sysv || STps->rw != ST_READING) { if (STp->can_bsr) - result = osst_flush_buffer(STp, &SCpnt, 0); + result = osst_flush_buffer(STp, &SCpnt, 0); /* this is the default path */ else if (STps->eof == ST_FM_HIT) { result = cross_eof(STp, &SCpnt, FALSE); if (result) { @@ -4218,12 +4500,24 @@ out: if (STp->rew_at_close) { result2 = osst_position_tape_and_confirm(STp, &SCpnt, STp->first_data_ppos); - STps->drv_file = STps->drv_block = STp->logical_blk_num = 0; - if (result == 0) + STps->drv_file = STps->drv_block = STp->frame_seq_number = STp->logical_blk_num = 0; + if (result == 0 && result2 < 0) result = result2; } if (SCpnt) scsi_release_command(SCpnt); + if (STp->recover_count) { + printk(KERN_INFO "osst%d:I: %d recovered errors in", dev, STp->recover_count); + if (STp->write_count) + printk(" %d frames written", STp->write_count); + if (STp->read_count) + printk(" %d frames read", STp->read_count); + printk("\n"); + STp->recover_count = 0; + } + STp->write_count = 0; + STp->read_count = 0; + return result; } @@ -4275,7 +4569,7 @@ STp = os_scsi_tapes[dev]; #if DEBUG if (debugging && !STp->in_use) { - printk(OSST_DEB_MSG "osst%d: Incorrect device.\n", dev); + printk(OSST_DEB_MSG "osst%d:D: Incorrect device.\n", dev); return (-EIO); } #endif @@ -4304,7 +4598,7 @@ return (-EFAULT); if (mtc.mt_op == MTSETDRVBUFFER && !capable(CAP_SYS_ADMIN)) { - printk(KERN_WARNING "osst%d: MTSETDRVBUFFER only allowed for root.\n", dev); + printk(KERN_WARNING "osst%d:W: MTSETDRVBUFFER only allowed for root.\n", dev); return (-EPERM); } if (!STm->defined && @@ -4359,7 +4653,7 @@ if (STp->door_locked != ST_UNLOCKED && STp->door_locked != ST_LOCK_FAILS) { if (osst_int_ioctl(STp, &SCpnt, MTLOCK, 0)) { - printk(KERN_NOTICE "osst%d: Could not relock door after bus reset.\n", + printk(KERN_NOTICE "osst%d:I: Could not relock door after bus reset.\n", dev); STp->door_locked = ST_UNLOCKED; } @@ -4409,7 +4703,7 @@ return 0; } if (mtc.mt_op == MTSEEK) { - i = osst_seek_frame(STp, &SCpnt, mtc.mt_count); + i = osst_seek_sector(STp, &SCpnt, mtc.mt_count); if (SCpnt) scsi_release_command(SCpnt); if (!STp->can_partitions) STp->ps[0].rw = ST_IDLE; @@ -4502,7 +4796,7 @@ if (cmd_type == _IOC_TYPE(MTIOCPOS) && cmd_nr == _IOC_NR(MTIOCPOS)) { if (_IOC_SIZE(cmd_in) != sizeof(struct mtpos)) return (-EINVAL); - blk = osst_get_frame_position(STp, &SCpnt); + blk = osst_get_sector(STp, &SCpnt); if (SCpnt) scsi_release_command(SCpnt); if (blk < 0) return blk; @@ -4594,7 +4888,7 @@ } } if (!tb) { - printk(KERN_NOTICE "osst: Can't allocate new tape buffer (nbr %d).\n", + printk(KERN_NOTICE "osst :I: Can't allocate new tape buffer (nbr %d).\n", osst_nbr_buffers); return NULL; } @@ -4604,10 +4898,10 @@ #if DEBUG if (debugging) { printk(OSST_DEB_MSG - "osst: Allocated tape buffer %d (%d bytes, %d segments, dma: %d, a: %p).\n", + "osst :D: Allocated tape buffer %d (%d bytes, %d segments, dma: %d, a: %p).\n", osst_nbr_buffers, got, tb->sg_segs, need_dma, tb->b_data); printk(OSST_DEB_MSG - "osst: segment sizes: first %d, last %d bytes.\n", + "osst :D: segment sizes: first %d, last %d bytes.\n", tb->sg[0].length, tb->sg[segs-1].length); } #endif @@ -4652,8 +4946,7 @@ order--; continue; } - printk(KERN_NOTICE "osst: Failed to enlarge buffer to %d bytes.\n", - new_size); + printk(KERN_WARNING "osst :W: Failed to enlarge buffer to %d bytes.\n", new_size); #if DEBUG STbuffer->buffer_size = got; #endif @@ -4671,10 +4964,10 @@ if (debugging) { for (nbr=0; osst_buffers[nbr] != STbuffer && nbr < osst_nbr_buffers; nbr++); printk(OSST_DEB_MSG - "osst: Expanded tape buffer %d (%d bytes, %d->%d segments, dma: %d, a: %p).\n", + "osst :D: Expanded tape buffer %d (%d bytes, %d->%d segments, dma: %d, a: %p).\n", nbr, got, STbuffer->orig_sg_segs, STbuffer->sg_segs, need_dma, STbuffer->b_data); printk(OSST_DEB_MSG - "osst: segment sizes: first %d, last %d bytes.\n", + "osst :D: segment sizes: first %d, last %d bytes.\n", STbuffer->sg[0].length, STbuffer->sg[segs-1].length); } #endif @@ -4699,7 +4992,7 @@ } #if DEBUG if (debugging && STbuffer->orig_sg_segs < STbuffer->sg_segs) - printk(OSST_DEB_MSG "osst: Buffer at %p normalized to %d bytes (segs %d).\n", + printk(OSST_DEB_MSG "osst :D: Buffer at %p normalized to %d bytes (segs %d).\n", STbuffer->b_data, STbuffer->buffer_size, STbuffer->sg_segs); #endif STbuffer->sg_segs = STbuffer->orig_sg_segs; @@ -4716,7 +5009,7 @@ i < st_bp->sg_segs && offset >= st_bp->sg[i].length; i++) offset -= st_bp->sg[i].length; if (i == st_bp->sg_segs) { /* Should never happen */ - printk(KERN_WARNING "osst: Append_to_buffer offset overflow.\n"); + printk(KERN_WARNING "osst :A: Append_to_buffer offset overflow.\n"); return (-EIO); } for ( ; i < st_bp->sg_segs && do_count > 0; i++) { @@ -4731,7 +5024,7 @@ offset = 0; } if (do_count) { /* Should never happen */ - printk(KERN_WARNING "osst: Append_to_buffer overflow (left %d).\n", + printk(KERN_WARNING "osst :A: Append_to_buffer overflow (left %d).\n", do_count); return (-EIO); } @@ -4749,7 +5042,7 @@ i < st_bp->sg_segs && offset >= st_bp->sg[i].length; i++) offset -= st_bp->sg[i].length; if (i == st_bp->sg_segs) { /* Should never happen */ - printk(KERN_WARNING "osst: From_buffer offset overflow.\n"); + printk(KERN_WARNING "osst :A: From_buffer offset overflow.\n"); return (-EIO); } for ( ; i < st_bp->sg_segs && do_count > 0; i++) { @@ -4765,7 +5058,7 @@ offset = 0; } if (do_count) { /* Should never happen */ - printk(KERN_WARNING "osst: From_buffer overflow (left %d).\n", + printk(KERN_WARNING "osst :A: From_buffer overflow (left %d).\n", do_count); return (-EIO); } @@ -4782,10 +5075,10 @@ i < st_bp->sg_segs && offset >= st_bp->sg[i].length; i++) offset -= st_bp->sg[i].length; if (i == st_bp->sg_segs) { /* Should never happen */ - printk(KERN_WARNING "osst: Zero_buffer offset overflow.\n"); + printk(KERN_WARNING "osst :A: Zero_buffer offset overflow.\n"); return (-EIO); } - for (do_count = OS_DATA_SIZE - st_bp->read_pointer; + for (do_count = OS_DATA_SIZE - st_bp->buffer_bytes; i < st_bp->sg_segs && do_count > 0; i++) { cnt = st_bp->sg[i].length - offset < do_count ? st_bp->sg[i].length - offset : do_count ; @@ -4794,13 +5087,13 @@ offset = 0; } if (do_count) { /* Should never happen */ - printk(KERN_WARNING "osst: Zero_buffer overflow (left %d).\n", do_count); + printk(KERN_WARNING "osst :A: Zero_buffer overflow (left %d).\n", do_count); return (-EIO); } return 0; } -/* Copy a osst 32K block of memory into the buffer. +/* Copy a osst 32K chunk of memory into the buffer. Returns zero (success) or negative error code. */ static int osst_copy_to_buffer(OSST_buffer *st_bp, unsigned char *ptr) { @@ -4814,14 +5107,14 @@ ptr += cnt; } if (do_count || i != st_bp->sg_segs-1) { /* Should never happen */ - printk(KERN_WARNING "osst: Copy_to_buffer overflow (left %d at sg %d).\n", + printk(KERN_WARNING "osst :A: Copy_to_buffer overflow (left %d at sg %d).\n", do_count, i); return (-EIO); } return 0; } -/* Copy a osst 32K block of memory from the buffer. +/* Copy a osst 32K chunk of memory from the buffer. Returns zero (success) or negative error code. */ static int osst_copy_from_buffer(OSST_buffer *st_bp, unsigned char *ptr) { @@ -4835,7 +5128,7 @@ ptr += cnt; } if (do_count || i != st_bp->sg_segs-1) { /* Should never happen */ - printk(KERN_WARNING "osst: Copy_from_buffer overflow (left %d at sg %d).\n", + printk(KERN_WARNING "osst :A: Copy_from_buffer overflow (left %d at sg %d).\n", do_count, i); return (-EIO); } @@ -4847,8 +5140,8 @@ #ifndef MODULE /* Set the boot options. Syntax: st=xxx,yyy - where xxx is buffer size in 1024 byte blocks and yyy is write threshold - in 1024 byte blocks. */ + where xxx is buffer size in 1024 byte chunks and yyy is write threshold + in 1024 byte chunks. */ __initfunc( void osst_setup(char *str, int *ints)) { if (ints[0] > 0 && ints[1] > 0) @@ -4883,7 +5176,7 @@ OS_Scsi_Tape * tpnt; ST_mode * STm; ST_partstat * STps; - int i; + int i, dev; #ifdef CONFIG_DEVFS_FS int mode; #endif @@ -4904,16 +5197,17 @@ tpnt = (OS_Scsi_Tape *)kmalloc(sizeof(OS_Scsi_Tape), GFP_ATOMIC); if (tpnt == NULL) { SDp->attached--; - printk(KERN_ERR "osst: Can't allocate device descriptor.\n"); + printk(KERN_WARNING "osst :W: Can't allocate device descriptor.\n"); return 1; } memset(tpnt, 0, sizeof(OS_Scsi_Tape)); os_scsi_tapes[i] = tpnt; + dev = i; tpnt->capacity = 0xfffff; /* allocate a buffer for this device */ if (!new_tape_buffer(TRUE, TRUE)) - printk(KERN_ERR "osst: Unable to allocate a tape buffer.\n"); + printk(KERN_ERR "osst :W: Unable to allocate a tape buffer.\n"); #ifdef CONFIG_DEVFS_FS for (mode = 0; mode < ST_NBR_MODES; ++mode) { @@ -4960,17 +5254,12 @@ tpnt->long_timeout = OSST_LONG_TIMEOUT; /* Recognize OnStream tapes */ - printk ("osst%i: Tape driver with OnStream support osst %s\nosst%i: %s\n", - i, osst_version, i, cvsid); /* We don't need to test for OnStream, as this has been done in detect () */ tpnt->os_fw_rev = osst_parse_firmware_rev (SDp->rev); -#if DEBUG - printk ("osst%i: OnStream tape drive recognized, Model %s\n", i, SDp->model); -#endif tpnt->omit_blklims = 1; tpnt->poll = (strncmp(SDp->model, "DI-", 3) == 0) || OSST_FW_NEED_POLL(tpnt->os_fw_rev,SDp); - tpnt->logical_blk_in_buffer = 0; + tpnt->frame_in_buffer = 0; tpnt->header_ok = 0; tpnt->linux_media = 0; tpnt->header_cache = NULL; @@ -4984,7 +5273,7 @@ STm->do_buffer_writes = OSST_BUFFER_WRITES; STm->do_read_ahead = OSST_READ_AHEAD; STm->default_compression = ST_DONT_TOUCH; - STm->default_blksize = 32 * ST_KILOBYTE; /* No forced size */ + STm->default_blksize = 512; STm->default_density = (-1); /* No forced density */ } @@ -5005,6 +5294,10 @@ tpnt->blksize_changed = FALSE; osst_template.nr_dev++; + + printk(KERN_INFO "osst :I: Attached OnStream %.5s tape at scsi%d, channel %d, id %d, lun %d as osst%d\n", + SDp->model, SDp->host->host_no, SDp->channel, SDp->id, SDp->lun, dev); + return 0; }; @@ -5016,10 +5309,7 @@ * layer (ide-scsi, usb-storage, ...) */ if (!OSST_SUPPORTS(SDp)) return 0; - printk(KERN_WARNING - "Detected OnStream scsi tape osst%d at scsi%d, channel %d, id %d, lun %d\n", - osst_template.dev_noticed++, - SDp->host->host_no, SDp->channel, SDp->id, SDp->lun); + osst_template.dev_noticed++; return 1; } @@ -5039,7 +5329,7 @@ #else if (register_chrdev(MAJOR_NR,"osst",&osst_fops)) { #endif - printk(KERN_ERR "osst: Unable to get major %d for OnStream tapes\n",MAJOR_NR); + printk(KERN_ERR "osst :W: Unable to get major %d for OnStream tapes\n",MAJOR_NR); return 1; } osst_registered++; @@ -5048,12 +5338,12 @@ if (os_scsi_tapes) return 0; osst_template.dev_max = OSST_MAX_TAPES; if (osst_template.dev_max > 128 / ST_NBR_MODES) - printk(KERN_INFO "osst: Only %d tapes accessible.\n", 128 / ST_NBR_MODES); + printk(KERN_INFO "osst :I: Only %d tapes accessible.\n", 128 / ST_NBR_MODES); os_scsi_tapes = (OS_Scsi_Tape **)kmalloc(osst_template.dev_max * sizeof(OS_Scsi_Tape *), GFP_ATOMIC); if (os_scsi_tapes == NULL) { - printk(KERN_ERR "osst: Unable to allocate array for OnStream SCSI tapes.\n"); + printk(KERN_ERR "osst :W: Unable to allocate array for OnStream SCSI tapes.\n"); #ifdef CONFIG_DEVFS_FS devfs_unregister_chrdev(MAJOR_NR, "osst"); #else @@ -5069,7 +5359,7 @@ (OSST_buffer **)kmalloc(osst_template.dev_max * sizeof(OSST_buffer *), GFP_ATOMIC); if (osst_buffers == NULL) { - printk(KERN_ERR "osst: Unable to allocate tape buffer pointers.\n"); + printk(KERN_ERR "osst :W: Unable to allocate tape buffer pointers.\n"); #ifdef CONFIG_DEVFS_FS devfs_unregister_chrdev(MAJOR_NR, "osst"); #else @@ -5080,8 +5370,10 @@ } osst_nbr_buffers = 0; + printk(KERN_INFO "osst :I: Tape driver with OnStream support version %s\nosst :I: %s\n", osst_version, cvsid); + #if DEBUG - printk(OSST_DEB_MSG "osst: Buffer size %d bytes, write threshold %d bytes.\n", + printk(OSST_DEB_MSG "osst :D: Buffer size %d bytes, write threshold %d bytes.\n", osst_buffer_size, osst_write_threshold); #endif return 0; @@ -5135,9 +5427,12 @@ osst_max_buffers = max_buffers; if (max_sg_segs >= OSST_FIRST_SG) osst_max_sg_segs = max_sg_segs; - printk(KERN_INFO "osst: bufsize %d, wrt %d, max buffers %d, s/g segs %d.\n", +#if DEBUG + printk(OSST_DEB_MSG "osst :D: bufsize %d, wrt %d, max buffers %d, s/g segs %d.\n", osst_buffer_size, osst_write_threshold, osst_max_buffers, osst_max_sg_segs); -//printk(OSST_DEB_MSG "osst: sizeof(header) = %d (%s)\n",sizeof(os_header_t),sizeof(os_header_t)==OS_DATA_SIZE?"ok":"error"); +//printk(OSST_DEB_MSG "osst :D: sizeof(header) = %d (%s)\n", +// sizeof(os_header_t),sizeof(os_header_t)==OS_DATA_SIZE?"ok":"error"); +#endif osst_template.module = &__this_module; result = scsi_register_module(MODULE_SCSI_DEV, &osst_template); if (result) @@ -5179,6 +5474,6 @@ } } osst_template.dev_max = 0; - printk(KERN_INFO "osst: Unloaded.\n"); + printk(KERN_INFO "osst :I: Unloaded.\n"); } #endif /* MODULE */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/osst.h linux.20p6/drivers/scsi/osst.h --- linux.vanilla/drivers/scsi/osst.h Sun Mar 25 17:37:36 2001 +++ linux.20p6/drivers/scsi/osst.h Mon Jun 18 08:22:48 2001 @@ -1,5 +1,5 @@ /* - * $Header: /home/cvsroot/Driver/osst.h,v 1.5.2.2 2000/10/08 03:07:33 riede Exp $ + * $Header: /home/cvsroot/Driver/osst.h,v 1.5.2.4 2001/01/26 01:30:56 riede Exp $ */ #include @@ -319,7 +319,8 @@ * Linux specific fields: */ __u32 next_mark_ppos; /* when known, points to next marker */ - __u8 linux_specific[28]; + __u32 last_mark_lbn; /* storing log_blk_num of last mark is extends ADR spec */ + __u8 linux_specific[24]; __u8 reserved_256_511[256]; } os_aux_t; @@ -459,6 +460,8 @@ int min_block; int max_block; int recover_count; /* from tape opening */ + int write_count; + int read_count; int recover_erreg; /* from last status call */ /* * OnStream specific data @@ -466,8 +469,9 @@ int os_fw_rev; /* the firmware revision * 10000 */ unsigned char raw; /* flag OnStream raw access (32.5KB block size) */ unsigned char poll; /* flag that this drive needs polling (IDE|firmware) */ - unsigned char logical_blk_in_buffer; /* flag that the block as per logical_blk_num + unsigned char frame_in_buffer; /* flag that the frame as per frame_seq_number * has been read into STp->buffer and is valid */ + int frame_seq_number; /* logical frame number */ int logical_blk_num; /* logical block number */ unsigned first_frame_position; /* physical frame to be transfered to/from host */ unsigned last_frame_position; /* physical frame to be transferd to/from tape */ @@ -485,6 +489,7 @@ int filemark_cnt; int first_mark_ppos; int last_mark_ppos; + int last_mark_lbn; /* storing log_blk_num of last mark is extends ADR spec */ int first_data_ppos; int eod_frame_ppos; int eod_frame_lfa; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/osst_options.h linux.20p6/drivers/scsi/osst_options.h --- linux.vanilla/drivers/scsi/osst_options.h Sun Mar 25 17:37:36 2001 +++ linux.20p6/drivers/scsi/osst_options.h Mon Jun 18 08:22:48 2001 @@ -8,7 +8,7 @@ Changed (and renamed) for OnStream SCSI drives garloff@suse.de 2000-06-21 - $Header: /home/cvsroot/Driver/osst_options.h,v 1.4 2000/06/26 01:44:01 riede Exp $ + $Header: /home/cvsroot/Driver/osst_options.h,v 1.4.2.1 2000/11/25 22:02:44 riede Exp $ */ #ifndef _OSST_OPTIONS_H @@ -24,7 +24,7 @@ because of buffered reads. Should be set to zero to support also drives that can't space backwards over records. NOTE: The tape will be spaced backwards over an "accidentally" crossed filemark in any case. */ -#define OSST_IN_FILE_POS 0 +#define OSST_IN_FILE_POS 1 /* The tape driver buffer size in kilobytes. */ /* Don't change, as this is the HW blocksize */ @@ -33,7 +33,13 @@ /* The number of kilobytes of data in the buffer that triggers an asynchronous write in fixed block mode. See also OSST_ASYNC_WRITES below. */ -#define OSST_WRITE_THRESHOLD_BLOCKS 30 +#define OSST_WRITE_THRESHOLD_BLOCKS 32 + +/* OSST_EOM_RESERVE defines the number of frames are kept in reserve for + * * write error recovery when writing near end of medium. ENOSPC is returned + * * when write() is called and the tape write position is within this number + * * of blocks from the tape capacity. */ +#define OSST_EOM_RESERVE 300 /* The maximum number of tape buffers the driver allocates. The number is also constrained by the number of drives detected. Determines the @@ -64,7 +70,7 @@ /* If OSST_BUFFER_WRITES is non-zero, writes in fixed block mode are buffered until the driver buffer is full or asynchronous write is - triggered. May make detection of End-Of-Medium early enough fail. */ + triggered. */ #define OSST_BUFFER_WRITES 1 /* If OSST_ASYNC_WRITES is non-zero, the SCSI write command may be started diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/qlogicpti.c linux.20p6/drivers/scsi/qlogicpti.c --- linux.vanilla/drivers/scsi/qlogicpti.c Sun Mar 25 17:31:32 2001 +++ linux.20p6/drivers/scsi/qlogicpti.c Mon Jun 18 08:19:48 2001 @@ -648,7 +648,8 @@ /* Is this a red snapper? */ if(strcmp(qpti_dev->prom_name, "ptisp") && strcmp(qpti_dev->prom_name, "PTI,ptisp") && - strcmp(qpti_dev->prom_name, "QLGC,isp")) + strcmp(qpti_dev->prom_name, "QLGC,isp") && + strcmp(qpti_dev->prom_name, "SUNW,isp")) continue; /* Sometimes Antares cards come up not completely diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/sd_ioctl.c linux.20p6/drivers/scsi/sd_ioctl.c --- linux.vanilla/drivers/scsi/sd_ioctl.c Sun Mar 25 17:31:30 2001 +++ linux.20p6/drivers/scsi/sd_ioctl.c Tue Jun 19 09:59:54 2001 @@ -57,6 +57,7 @@ diskinfo[2] = rscsi_disks[DEVICE_NR(dev)].capacity >> 11; /* override with calculated, extended default, or driver values */ +/* this is the only call of hostt->bios_param() */ if(host->hostt->bios_param != NULL) host->hostt->bios_param(&rscsi_disks[DEVICE_NR(dev)], diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/sg.c linux.20p6/drivers/scsi/sg.c --- linux.vanilla/drivers/scsi/sg.c Sun Mar 25 17:31:30 2001 +++ linux.20p6/drivers/scsi/sg.c Mon Jun 25 14:26:02 2001 @@ -7,7 +7,7 @@ * Original driver (sg.c): * Copyright (C) 1992 Lawrence Foard * 2.x extensions to driver: - * Copyright (C) 1998 - 2000 Douglas Gilbert + * Copyright (C) 1998 - 2001 Douglas Gilbert * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -16,8 +16,8 @@ * * Borrows code from st driver. Thanks to Alessandro Rubini's "dd" book. */ - static char * sg_version_str = "Version: 2.1.39 (20000626)"; - static int sg_version_num = 20139; /* 2 digits for each component */ + static char * sg_version_str = "Version: 2.1.40 (20010620)"; + static int sg_version_num = 20140; /* 2 digits for each component */ /* * D. P. Gilbert (dgilbert@interlog.com, dougg@triode.net.au), notes: * - scsi logging is available via SCSI_LOG_TIMEOUT macros. First @@ -1635,18 +1635,14 @@ } /* If retSzp==NULL want exact size or fail */ -/* sg_low_malloc() should always be called from a process context allowing - GFP_KERNEL to be used instead of GFP_ATOMIC */ static char * sg_low_malloc(int rqSz, int lowDma, int mem_src, int * retSzp) { char * resp = NULL; - int page_mask = lowDma ? (GFP_KERNEL | GFP_DMA) : GFP_KERNEL; + int page_mask = lowDma ? (GFP_ATOMIC | GFP_DMA) : GFP_ATOMIC; if (rqSz <= 0) return resp; if (SG_HEAP_KMAL == mem_src) { - page_mask = lowDma ? (GFP_ATOMIC | GFP_DMA) : GFP_ATOMIC; - /* Seen kmalloc(..,GFP_KERNEL) hang for 40 secs! */ resp = kmalloc(rqSz, page_mask); if (resp && retSzp) *retSzp = rqSz; #ifdef SG_DEBUG diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/sym53c8xx.c linux.20p6/drivers/scsi/sym53c8xx.c --- linux.vanilla/drivers/scsi/sym53c8xx.c Sun Mar 25 17:31:33 2001 +++ linux.20p6/drivers/scsi/sym53c8xx.c Tue Jun 19 09:59:54 2001 @@ -3646,7 +3646,7 @@ ** some target to reset or some disconnected ** job to abort. Since error recovery is a serious ** busyness, we will really reset the SCSI BUS, if - ** case of a SCSI interrupt occuring in this path. + ** case of a SCSI interrupt occurring in this path. */ /* @@ -8635,7 +8635,7 @@ ** si: sist ** ** SCSI bus lines: -** so: control lines as driver by NCR. +** so: control lines as driven by NCR. ** si: control lines as seen by NCR. ** sd: scsi data lines as seen by NCR. ** @@ -8644,7 +8644,7 @@ ** scntl3: (see the manual) ** ** current script command: -** dsp: script adress (relative to start of script). +** dsp: script address (relative to start of script). ** dbc: first word of script command. ** ** First 24 register of the chip: diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/scsi/sym53c8xx_defs.h linux.20p6/drivers/scsi/sym53c8xx_defs.h --- linux.vanilla/drivers/scsi/sym53c8xx_defs.h Sun Mar 25 17:31:33 2001 +++ linux.20p6/drivers/scsi/sym53c8xx_defs.h Mon Jun 25 14:53:02 2001 @@ -483,7 +483,7 @@ #endif /* - * If the CPU and the NCR use same endian-ness adressing, + * If the CPU and the NCR use same endian-ness addressing, * no byte reordering is needed for script patching. * Macro cpu_to_scr() is to be used for script patching. * Macro scr_to_cpu() is to be used for getting a DWORD @@ -517,7 +517,7 @@ * would have been correctly designed for PCI, this * option would be useless. * - * If the CPU and the NCR use same endian-ness adressing, + * If the CPU and the NCR use same endian-ness addressing, * no byte reordering is needed for accessing chip io * registers. Functions suffixed by '_raw' are assumed * to access the chip over the PCI without doing byte diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/bluetooth.c linux.20p6/drivers/usb/bluetooth.c --- linux.vanilla/drivers/usb/bluetooth.c Sun Mar 25 17:37:37 2001 +++ linux.20p6/drivers/usb/bluetooth.c Mon Jun 18 08:14:09 2001 @@ -1,10 +1,19 @@ /* - * bluetooth.c Version 0.7 + * bluetooth.c Version 0.8 * * Copyright (c) 2000 Greg Kroah-Hartman * Copyright (c) 2000 Mark Douglas Corner * * USB Bluetooth driver, based on the Bluetooth Spec version 1.0B + * + * (08/04/2001) gb + * Identify version on module load. + * + * (2001/03/10) Version 0.8 gkh + * Fixed problem with not unlinking interrupt urb on device close + * and resubmitting the read urb on error with bluetooth struct. + * Thanks to Narayan Mohanram for the + * fixes. * * (11/29/2000) Version 0.7 gkh * Fixed problem with overrunning the tty flip buffer. @@ -86,9 +95,12 @@ #define DEBUG #include -/* Module information */ -MODULE_AUTHOR("Greg Kroah-Hartman, Mark Douglas Corner"); -MODULE_DESCRIPTION("USB Bluetooth driver"); +/* + * Version Information + */ +#define DRIVER_VERSION "v0.8" +#define DRIVER_AUTHOR "Greg Kroah-Hartman, Mark Douglas Corner" +#define DRIVER_DESC "USB Bluetooth driver" /* define this if you have hardware that is not good */ /*#define BTBUGGYHARDWARE */ @@ -371,6 +383,7 @@ for (i = 0; i < NUM_BULK_URBS; ++i) usb_unlink_urb (bluetooth->write_urb_pool[i]); usb_unlink_urb (bluetooth->read_urb); + usb_unlink_urb (bluetooth->interrupt_in_urb); bluetooth->active = 0; } @@ -844,7 +857,7 @@ if (!bluetooth) { dbg(__FUNCTION__ " - bad bluetooth pointer, exiting"); - goto exit; + return; } if (urb->status) { @@ -1274,6 +1287,9 @@ return -1; } + info(DRIVER_VERSION " " DRIVER_AUTHOR); + info(DRIVER_DESC); + return 0; } @@ -1288,4 +1304,7 @@ module_init(usb_bluetooth_init); module_exit(usb_bluetooth_exit); +/* Module information */ +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/dabusb.c linux.20p6/drivers/usb/dabusb.c --- linux.vanilla/drivers/usb/dabusb.c Sun Mar 25 17:37:37 2001 +++ linux.20p6/drivers/usb/dabusb.c Mon Jun 18 08:14:53 2001 @@ -43,6 +43,13 @@ #include "dabusb.h" #include "dabfirmware.h" +/* + * Version Information + */ +#define DRIVER_VERSION "v1.54" +#define DRIVER_AUTHOR "Deti Fliegl, deti@fliegl.de" +#define DRIVER_DESC "DAB-USB Interface Driver for Linux (c)1999" + /* --------------------------------------------------------------------- */ #define NRDABUSB 4 @@ -173,8 +180,8 @@ // process if URB was not killed if (purb->status != -ENOENT) { - unsigned int pipe = usb_rcvisocpipe (s->usbdev, _DABUSB_ISOPIPE); - int pipesize = usb_maxpacket (s->usbdev, pipe, usb_pipeout (pipe)); + unsigned int pipe = usb_rcvisocpipe (purb->dev, _DABUSB_ISOPIPE); + int pipesize = usb_maxpacket (purb->dev, pipe, usb_pipeout (pipe)); for (i = 0; i < purb->number_of_packets; i++) if (!purb->iso_frame_desc[i].status) { len = purb->iso_frame_desc[i].actual_length; @@ -456,8 +463,6 @@ end = list_entry (s->rec_buff_list.prev, buff_t, buff_list); - end->purb->dev=s->usbdev; - ret = usb_submit_urb (end->purb); if (ret) { err("usb_submit_urb returned:%d", ret); @@ -793,11 +798,11 @@ static struct usb_driver dabusb_driver = { - "dabusb", - dabusb_probe, - dabusb_disconnect, - {NULL, NULL}, - &dabusb_fops, + name: "dabusb", + probe: dabusb_probe, + disconnect: dabusb_disconnect, + fops: &dabusb_fops, + minor: DABUSB_MINOR, DABUSB_MINOR }; @@ -826,6 +831,10 @@ return -1; dbg("dabusb_init: driver registered"); + + info(DRIVER_VERSION " " DRIVER_AUTHOR); + info(DRIVER_DESC); + return 0; } @@ -838,8 +847,9 @@ /* --------------------------------------------------------------------- */ -MODULE_AUTHOR ("Deti Fliegl, deti@fliegl.de"); -MODULE_DESCRIPTION ("DAB-USB Interface Driver for Linux (c)1999"); +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); + MODULE_PARM (buffers, "i"); MODULE_PARM_DESC (buffers, "Number of buffers (default=256)"); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/dabusb.h linux.20p6/drivers/usb/dabusb.h --- linux.vanilla/drivers/usb/dabusb.h Sun Mar 25 17:31:43 2001 +++ linux.20p6/drivers/usb/dabusb.h Mon Jun 18 08:14:53 2001 @@ -23,7 +23,7 @@ wait_queue_head_t wait; wait_queue_head_t remove_ok; spinlock_t lock; - volatile atomic_t pending_io; + atomic_t pending_io; driver_state_t state; int remove_pending; int got_mem; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/dc2xx.c linux.20p6/drivers/usb/dc2xx.c --- linux.vanilla/drivers/usb/dc2xx.c Sun Mar 25 17:37:37 2001 +++ linux.20p6/drivers/usb/dc2xx.c Mon Jun 18 08:15:01 2001 @@ -44,11 +44,13 @@ * 03 Nov, 1999 -- update for 2.3.25 kernel API changes. * 08 Jan, 2000 .. multiple camera support * 12 Aug, 2000 .. add some real locking, remove an Oops + * 08 Apr, 2001 .. Identify version on module load. gb * * Thanks to: the folk who've provided USB product IDs, sent in - * patches, and shared their sucesses! + * patches, and shared their successes! */ +#include #include #include #include @@ -59,6 +61,7 @@ #include #include #include + #ifdef CONFIG_USB_DEBUG #define DEBUG #else @@ -67,6 +70,13 @@ #include +/* + * Version Information + */ +#define DRIVER_VERSION "v1.0.0" +#define DRIVER_AUTHOR "David Brownell, " +#define DRIVER_DESC "USB Camera Driver for Kodak DC-2xx series cameras" + /* current USB framework handles max of 16 USB devices per driver */ #define MAX_CAMERAS 16 @@ -170,7 +180,7 @@ usb_rcvbulkpipe (camera->dev, camera->inEP), camera->buf, len, &count, HZ*10); - dbg ("read (%d) - 0x%x %d", len, retval, count); + dbg ("read (%Zd) - 0x%x %d", len, retval, count); if (!retval) { if (copy_to_user (buf, camera->buf, count)) @@ -183,7 +193,7 @@ break; interruptible_sleep_on_timeout (&camera->wait, RETRY_TIMEOUT); - dbg ("read (%d) - retry", len); + dbg ("read (%Zd) - retry", len); } up (&camera->sem); return retval; @@ -267,7 +277,7 @@ } done: up (&camera->sem); - dbg ("wrote %d", bytes_written); + dbg ("wrote %Zd", bytes_written); return bytes_written; } @@ -324,8 +334,9 @@ if (!camera->dev) { minor_data [subminor] = NULL; kfree (camera); - } - up (&camera->sem); + } else + up (&camera->sem); + up (&state_table_mutex); dbg ("close #%d", subminor); @@ -396,7 +407,6 @@ } if (i >= MAX_CAMERAS) { info ("Ignoring additional USB Camera"); - up (&state_table_mutex); goto bye; } @@ -404,7 +414,6 @@ camera = minor_data [i] = kmalloc (sizeof *camera, GFP_KERNEL); if (!camera) { err ("no memory!"); - up (&state_table_mutex); goto bye; } @@ -471,13 +480,15 @@ if (!camera->buf) { minor_data [subminor] = NULL; kfree (camera); + camera = NULL; } else camera->dev = NULL; info ("USB Camera #%d disconnected", subminor); usb_dec_dev_use (dev); - up (&camera->sem); + if (camera != NULL) + up (&camera->sem); up (&state_table_mutex); } @@ -496,6 +507,8 @@ { if (usb_register (&camera_driver) < 0) return -1; + info(DRIVER_VERSION " " DRIVER_AUTHOR); + info(DRIVER_DESC); return 0; } @@ -504,9 +517,9 @@ usb_deregister (&camera_driver); } - -MODULE_AUTHOR("David Brownell, dbrownell@users.sourceforge.net"); -MODULE_DESCRIPTION("USB Camera Driver for Kodak DC-2xx series cameras"); - module_init (usb_dc2xx_init); module_exit (usb_dc2xx_cleanup); + +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/mdc800.c linux.20p6/drivers/usb/mdc800.c --- linux.vanilla/drivers/usb/mdc800.c Sun Mar 25 17:31:42 2001 +++ linux.20p6/drivers/usb/mdc800.c Mon Jun 18 08:15:31 2001 @@ -22,13 +22,26 @@ * (c) 1999/2000 Henning Zabel * * - * The driver brings the USB functions of the MDC800 to Linux. + * The driver brings the USB functions of the MDC800 to Linux. * To use the Camera you must support the USB Protocoll of the camera * to the Kernel Node. * The Driver uses a misc device Node. Create it with : * mknod /dev/mustek c 180 32 * * The driver supports only one camera. + * + * (08/04/2001) gb + * Identify version on module load. + * + * version 0.7.5 + * Fixed potential SMP races with Spinlocks. + * Thanks to Oliver Neukum who + * noticed the race conditions. + * (30/10/2000) + * + * Fixed: Setting urb->dev before submitting urb. + * by Greg KH + * (13/10/2000) * * version 0.7.3 * bugfix : The mdc800->state field gets set to READY after the @@ -61,7 +74,7 @@ * (09/11/1999) * * version 0.5.0: - * first Version that gets a version number. Most of the needed + * first Version that gets a version number. Most of the needed * functions work. * (20/10/1999) */ @@ -80,8 +93,12 @@ #include -#define VERSION "0.7.3" -#define RELEASE_DATE "(24/04/2000)" +/* + * Version Information + */ +#define DRIVER_VERSION "v0.7.5 (30/10/2000)" +#define DRIVER_AUTHOR "Henning Zabel " +#define DRIVER_DESC "USB Driver for Mustek MDC800 Digital Camera" /* Vendor and Product Information */ #define MDC800_VENDOR_ID 0x055f @@ -123,7 +140,7 @@ int camera_busy; // is camera busy ? int camera_request_ready; // Status to synchronize with irq - char camera_response [8]; // last Bytes send after busy + char camera_response [8]; // last Bytes send after busy purb_t write_urb; char* write_urb_buffer; @@ -138,16 +155,16 @@ /* Device Data */ char out [64]; // Answer Buffer - int out_ptr; // Index to the first not readen byte + int out_ptr; // Index to the first not readen byte int out_count; // Bytes in the buffer - int open; // Camera device open ? - int rw_lock; // Block read <-> write + int open; // Camera device open ? + spinlock_t io_lock; // IO -lock - char in [8]; // Command Input Buffer + char in [8]; // Command Input Buffer int in_count; - int pic_index; // Cache for the Imagesize (-1 for nothing cached ) + int pic_index; // Cache for the Imagesize (-1 for nothing cached ) int pic_len; }; @@ -253,16 +270,16 @@ } } wake_up= ( mdc800->camera_request_ready > 0 ) - && - ( - ((mdc800->camera_request_ready == 1) && (!mdc800->camera_busy)) - || - ((mdc800->camera_request_ready == 2) && data_received) - || - ((mdc800->camera_request_ready == 3) && (mdc800->camera_busy)) - || - (urb->status < 0) - ); + && + ( + ((mdc800->camera_request_ready == 1) && (!mdc800->camera_busy)) + || + ((mdc800->camera_request_ready == 2) && data_received) + || + ((mdc800->camera_request_ready == 3) && (mdc800->camera_busy)) + || + (urb->status < 0) + ); if (wake_up) { @@ -362,7 +379,7 @@ */ static void* mdc800_usb_probe (struct usb_device *dev ,unsigned int ifnum ) { - int i,j; + int i,j; struct usb_interface_descriptor *intf_desc; int irq_interval=0; @@ -432,10 +449,10 @@ info ("Found Mustek MDC800 on USB."); + spin_lock (&mdc800->io_lock); + mdc800->dev=dev; - mdc800->state=READY; mdc800->open=0; - mdc800->rw_lock=0; /* Setup URB Structs */ FILL_INT_URB ( @@ -469,6 +486,10 @@ mdc800 ); + mdc800->state=READY; + + spin_unlock (&mdc800->io_lock); + return mdc800; } @@ -539,18 +560,21 @@ static int mdc800_device_open (struct inode* inode, struct file *file) { int retval=0; + int errn=0; + + spin_lock (&mdc800->io_lock); if (mdc800->state == NOT_CONNECTED) { - return -EBUSY; + errn=-EBUSY; + goto error_out; } - if (mdc800->open) { - return -EBUSY; + errn=-EBUSY; + goto error_out; } - mdc800->rw_lock=0; mdc800->in_count=0; mdc800->out_count=0; mdc800->out_ptr=0; @@ -562,16 +586,20 @@ mdc800->camera_request_ready=0; retval=0; + mdc800->irq_urb->dev = mdc800->dev; if (usb_submit_urb (mdc800->irq_urb)) { err ("request USB irq fails (submit_retval=%i urb_status=%i).",retval, mdc800->irq_urb->status); - return -EIO; + errn = -EIO; + goto error_out; } mdc800->open=1; - dbg ("Mustek MDC800 device opened."); - return 0; + +error_out: + spin_unlock (&mdc800->io_lock); + return errn; } @@ -583,7 +611,7 @@ int retval=0; dbg ("Mustek MDC800 device closed."); - lock_kernel(); + spin_lock (&mdc800->io_lock); if (mdc800->open && (mdc800->state != NOT_CONNECTED)) { mdc800->open=0; @@ -595,7 +623,7 @@ { retval=-EIO; } - unlock_kernel(); + spin_unlock (&mdc800->io_lock); return retval; } @@ -609,23 +637,29 @@ int left=len, sts=len; /* single transfer size */ char* ptr=buf; + spin_lock (&mdc800->io_lock); if (mdc800->state == NOT_CONNECTED) + { + spin_unlock (&mdc800->io_lock); return -EBUSY; - + } if (mdc800->state == WORKING) { warn ("Illegal State \"working\" reached during read ?!"); + spin_unlock (&mdc800->io_lock); return -EBUSY; } - - if (!mdc800->open || mdc800->rw_lock) + if (!mdc800->open) + { + spin_unlock (&mdc800->io_lock); return -EBUSY; - mdc800->rw_lock=1; + } while (left) { - if (signal_pending (current)) { - mdc800->rw_lock=0; + if (signal_pending (current)) + { + spin_unlock (&mdc800->io_lock); return -EINTR; } @@ -640,24 +674,25 @@ mdc800->out_ptr=0; /* Download -> Request new bytes */ + mdc800->download_urb->dev = mdc800->dev; if (usb_submit_urb (mdc800->download_urb)) { err ("Can't submit download urb (status=%i)",mdc800->download_urb->status); - mdc800->rw_lock=0; + spin_unlock (&mdc800->io_lock); return len-left; } interruptible_sleep_on_timeout (&mdc800->download_wait, TO_DOWNLOAD_GET_READY*HZ/1000); if (mdc800->download_urb->status != 0) { err ("request download-bytes fails (status=%i)",mdc800->download_urb->status); - mdc800->rw_lock=0; + spin_unlock (&mdc800->io_lock); return len-left; } } else { /* No more bytes -> that's an error*/ - mdc800->rw_lock=0; + spin_unlock (&mdc800->io_lock); return -EIO; } } @@ -671,7 +706,7 @@ } } - mdc800->rw_lock=0; + spin_unlock (&mdc800->io_lock); return len-left; } @@ -686,17 +721,23 @@ { int i=0; + spin_lock (&mdc800->io_lock); if (mdc800->state != READY) + { + spin_unlock (&mdc800->io_lock); return -EBUSY; - - if (!mdc800->open || mdc800->rw_lock) + } + if (!mdc800->open ) + { + spin_unlock (&mdc800->io_lock); return -EBUSY; - mdc800->rw_lock=1; + } while (irw_lock=0; + if (signal_pending (current)) + { + spin_unlock (&mdc800->io_lock); return -EINTR; } @@ -718,7 +759,7 @@ else { err ("Command is to long !\n"); - mdc800->rw_lock=0; + spin_unlock (&mdc800->io_lock); return -EIO; } @@ -730,7 +771,7 @@ if (mdc800_usb_waitForIRQ (0,TO_GET_READY)) { err ("Camera didn't get ready.\n"); - mdc800->rw_lock=0; + spin_unlock (&mdc800->io_lock); return -EIO; } @@ -738,17 +779,18 @@ mdc800->state=WORKING; memcpy (mdc800->write_urb->transfer_buffer, mdc800->in,8); + mdc800->write_urb->dev = mdc800->dev; if (usb_submit_urb (mdc800->write_urb)) { err ("submitting write urb fails (status=%i)", mdc800->write_urb->status); - mdc800->rw_lock=0; + spin_unlock (&mdc800->io_lock); return -EIO; } interruptible_sleep_on_timeout (&mdc800->write_wait, TO_WRITE_GET_READY*HZ/1000); if (mdc800->state == WORKING) { usb_unlink_urb (mdc800->write_urb); - mdc800->rw_lock=0; + spin_unlock (&mdc800->io_lock); return -EIO; } @@ -760,7 +802,7 @@ { err ("call 0x07 before 0x05,0x3e"); mdc800->state=READY; - mdc800->rw_lock=0; + spin_unlock (&mdc800->io_lock); return -EIO; } mdc800->pic_len=-1; @@ -779,7 +821,7 @@ if (mdc800_usb_waitForIRQ (1,TO_READ_FROM_IRQ)) { err ("requesting answer from irq fails"); - mdc800->rw_lock=0; + spin_unlock (&mdc800->io_lock); return -EIO; } @@ -807,7 +849,7 @@ if (mdc800_usb_waitForIRQ (0,TO_DEFAULT_COMMAND)) { err ("Command Timeout."); - mdc800->rw_lock=0; + spin_unlock (&mdc800->io_lock); return -EIO; } } @@ -817,7 +859,7 @@ } i++; } - mdc800->rw_lock=0; + spin_unlock (&mdc800->io_lock); return i; } @@ -842,12 +884,11 @@ */ static struct usb_driver mdc800_usb_driver = { - "mdc800", - mdc800_usb_probe, - mdc800_usb_disconnect, - { 0,0 }, - &mdc800_device_ops, - MDC800_DEVICE_MINOR_BASE + name: "mdc800", + probe: mdc800_usb_probe, + disconnect: mdc800_usb_disconnect, + fops: &mdc800_device_ops, + minor: MDC800_DEVICE_MINOR_BASE, }; @@ -865,10 +906,11 @@ /* Allocate Memory */ try (mdc800=kmalloc (sizeof (struct mdc800_data), GFP_KERNEL)); + memset(mdc800, 0, sizeof(struct mdc800_data)); mdc800->dev=0; mdc800->open=0; mdc800->state=NOT_CONNECTED; - memset(mdc800, 0, sizeof(struct mdc800_data)); + spin_lock_init (&mdc800->io_lock); init_waitqueue_head (&mdc800->irq_wait); init_waitqueue_head (&mdc800->write_wait); @@ -886,8 +928,8 @@ if (usb_register (&mdc800_usb_driver) < 0) goto cleanup_on_fail; - info ("Mustek Digital Camera Driver " VERSION " (MDC800)"); - info (RELEASE_DATE " Henning Zabel "); + info (DRIVER_VERSION " " DRIVER_AUTHOR); + info (DRIVER_DESC); return 0; @@ -930,9 +972,9 @@ mdc800=0; } - -MODULE_AUTHOR ("Henning Zabel "); -MODULE_DESCRIPTION ("USB Driver for Mustek MDC800 Digital Camera"); - module_init (usb_mdc800_init); module_exit (usb_mdc800_cleanup); + +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/ov511.c linux.20p6/drivers/usb/ov511.c --- linux.vanilla/drivers/usb/ov511.c Sun Mar 25 17:31:42 2001 +++ linux.20p6/drivers/usb/ov511.c Mon Jun 18 08:32:58 2001 @@ -30,8 +30,6 @@ * Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -static const char version[] = "1.25"; - #define __NO_VERSION__ #include @@ -55,7 +53,12 @@ #include "ov511.h" -#undef OV511_GBR422 /* Experimental -- sets the 7610 to GBR422 */ +/* + * Version Information + */ +#define DRIVER_VERSION "v1.28" +#define DRIVER_AUTHOR "Mark McClelland & Bret Wallach & Orion Sky Lawlor & Kevin Moore & Charl P. Botha & Claudio Matsuoka " +#define DRIVER_DESC "OV511 USB Camera Driver" #define OV511_I2C_RETRIES 3 @@ -64,8 +67,6 @@ #define MAX_DATA_SIZE (MAX_FRAME_SIZE + sizeof(struct timeval)) #define GET_SEGSIZE(p) ((p) == VIDEO_PALETTE_GREY ? 256 : 384) -#define GET_DEPTH(p) ((p) == VIDEO_PALETTE_GREY ? 8 : \ - ((p) == VIDEO_PALETTE_YUV422 ? 16 : 24)) /* PARAMETER VARIABLES: */ static int autoadjust = 1; /* CCD dynamically changes exposure, etc... */ @@ -78,7 +79,7 @@ * 5=highly repetitive mesgs * NOTE: This should be changed to 0, 1, or 2 for production kernels */ -static int debug = 3; +static int debug = 0; /* Fix vertical misalignment of red and blue at 640x480 */ static int fix_rgb_offset = 0; @@ -116,6 +117,13 @@ /* Display test pattern - doesn't work yet either */ static int testpat = 0; +/* Setting this to 1 will make the sensor output GBR422 instead on YUV420. Only + * affects RGB24 mode. */ +static int sensor_gbr = 0; + +/* Dump raw pixel data, in one of 3 formats. See ov511_dumppix() for details. */ +static int dumppix = 0; + MODULE_PARM(autoadjust, "i"); MODULE_PARM_DESC(autoadjust, "CCD dynamically changes exposure"); MODULE_PARM(debug, "i"); @@ -142,11 +150,13 @@ MODULE_PARM_DESC(compress, "Turn on compression (not functional yet)"); MODULE_PARM(testpat, "i"); MODULE_PARM_DESC(testpat, "Replace image with vertical bar testpattern (only partially working)"); +MODULE_PARM(sensor_gbr, "i"); +MODULE_PARM_DESC(sensor_gbr, "Make sensor output GBR422 rather than YUV420"); +MODULE_PARM(dumppix, "i"); +MODULE_PARM_DESC(dumppix, "Dump raw pixel data, in one of 3 formats. See ov511_dumppix() for details"); -MODULE_AUTHOR("Mark McClelland & Bret Wallach & Orion Sky Lawlor & Kevin Moore & Charl P. Botha & Claudio Matsuoka "); -MODULE_DESCRIPTION("OV511 USB Camera Driver"); - -static char kernel_version[] = UTS_RELEASE; +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); static struct usb_driver ov511_driver; @@ -223,9 +233,10 @@ if (!pmd_none(*pmd)) { ptep = pte_offset(pmd, adr); pte = *ptep; - if (pte_present(pte)) - ret = page_address(pte_page(pte)) | - (adr & (PAGE_SIZE-1)); + if (pte_present(pte)) { + ret = (unsigned long) page_address(pte_page(pte)); + ret |= (adr & (PAGE_SIZE - 1)); + } } } @@ -360,6 +371,7 @@ ov511->bridge == BRG_OV511PLUS ? "OV511+" : "unknown"); out += sprintf (out, "sensor : %s\n", + ov511->sensor == SEN_OV6620 ? "OV6620" : ov511->sensor == SEN_OV7610 ? "OV7610" : ov511->sensor == SEN_OV7620 ? "OV7620" : ov511->sensor == SEN_OV7620AE ? "OV7620AE" : @@ -451,7 +463,6 @@ } #endif /* CONFIG_PROC_FS && CONFIG_VIDEO_PROC_FS */ - /********************************************************************** * * Camera interface @@ -703,7 +714,7 @@ { int rc; - PDEBUG(3, "Reset: type=0x%X", reset_type); + PDEBUG(4, "Reset: type=0x%X", reset_type); rc = ov511_reg_write(dev, OV511_REG_SYSTEM_RESET, reset_type); rc = ov511_reg_write(dev, OV511_REG_SYSTEM_RESET, 0); @@ -832,14 +843,21 @@ } else if ((ov511->sensor == SEN_OV7620) || (ov511->sensor == SEN_OV7620AE)) { #if 0 - cur_con = ov511_i2c_read(dev, OV7610_REG_CNT); - cur_brt = ov511_i2c_read(dev, OV7610_REG_BRT); - // DEBUG_CODE - PDEBUG(1, "con=%d brt=%d", ov511_i2c_read(dev, OV7610_REG_CNT), - ov511_i2c_read(dev, OV7610_REG_BRT)); + int cur_sat, new_sat, tmp; - if (ov511_i2c_write(dev, OV7610_REG_CNT, p->contrast >> 8) < 0) + cur_sat = ov511_i2c_read(dev, OV7610_REG_BLUE); + + tmp = (p->hue >> 8) - cur_sat; + new_sat = (tmp < 0) ? (-tmp) | 0x80 : tmp; + + PDEBUG(1, "cur=%d target=%d diff=%d", cur_sat, p->hue >> 8, tmp); + + if (ov511_i2c_write(dev, OV7610_REG_BLUE, new_sat) < 0) return -EIO; + + // DEBUG_CODE + PDEBUG(1, "hue=%d", ov511_i2c_read(dev, OV7610_REG_BLUE)); + #endif } @@ -885,6 +903,23 @@ return 0; } +/* Returns number of bits per pixel (regardless of where they are located; planar or + * not), or zero for unsupported format. + */ +static int ov511_get_depth(int palette) +{ + switch (palette) { + case VIDEO_PALETTE_GREY: return 8; + case VIDEO_PALETTE_RGB565: return 16; + case VIDEO_PALETTE_RGB24: return 24; + case VIDEO_PALETTE_YUV422: return 16; + case VIDEO_PALETTE_YUYV: return 16; + case VIDEO_PALETTE_YUV420: return 24; + case VIDEO_PALETTE_YUV422P: return 24; /* Planar */ + default: return 0; /* Invalid format */ + } +} + /* LNCNT values fixed by Lawrence Glaister */ static struct mode_list mlist[] = { /* W H C PXCNT LNCNT PXDIV LNDIV M420 COMA COML */ @@ -920,6 +955,12 @@ if (ov511_stop(ov511->dev) < 0) return -EIO; + /* Dumppix only works with RGB24 */ + if (dumppix && (mode != VIDEO_PALETTE_RGB24)) { + err("dumppix only supported with RGB 24"); + return -EINVAL; + } + if (mode == VIDEO_PALETTE_GREY) { ov511_reg_write(dev, 0x16, 0x00); if (ov511->sensor == SEN_OV7610 @@ -956,9 +997,9 @@ break; case SEN_OV6620: hwsbase = 0x38; - hwebase = 0x39; - vwsbase = 0x03; - vwebase = 0x04; + hwebase = 0x3a; + vwsbase = 0x05; + vwebase = 0x06; break; case SEN_OV7620: hwsbase = 0x2c; @@ -1042,13 +1083,16 @@ /* Calculate and set the clock divisor */ clock = ((sub_flag ? ov511->subw * ov511->subh : width * height) * (mlist[i].color ? 3 : 2) / 2) / 66000; +#if 0 + clock *= cams; +#endif ov511_i2c_write(dev, 0x11, clock); -#ifdef OV511_GBR422 - ov511_i2c_write(dev, 0x12, mlist[i].common_A | 0x08); -#else - ov511_i2c_write(dev, 0x12, mlist[i].common_A | (testpat?0x02:0x00)); -#endif + /* We only have code to convert GBR -> RGB24 */ + if ((mode == VIDEO_PALETTE_RGB24) && sensor_gbr) + ov511_i2c_write(dev, 0x12, mlist[i].common_A | (testpat?0x0a:0x08)); + else + ov511_i2c_write(dev, 0x12, mlist[i].common_A | (testpat?0x02:0x00)); /* 7620/6620 don't have register 0x35, so play it safe */ if (ov511->sensor == SEN_OV7610 || @@ -1116,7 +1160,7 @@ static inline void ov511_move_420_block(int yTL, int yTR, int yBL, int yBR, int u, int v, - int rowPixels, unsigned char * rgb) + int rowPixels, unsigned char * rgb, int bits) { const int rvScale = 91881; const int guScale = -22553; @@ -1137,14 +1181,32 @@ yTL *= yScale; yTR *= yScale; yBL *= yScale; yBR *= yScale; - /* Write out top two pixels */ - rgb[0] = LIMIT(b+yTL); rgb[1] = LIMIT(g+yTL); rgb[2] = LIMIT(r+yTL); - rgb[3] = LIMIT(b+yTR); rgb[4] = LIMIT(g+yTR); rgb[5] = LIMIT(r+yTR); - - /* Skip down to next line to write out bottom two pixels */ - rgb += 3 * rowPixels; - rgb[0] = LIMIT(b+yBL); rgb[1] = LIMIT(g+yBL); rgb[2] = LIMIT(r+yBL); - rgb[3] = LIMIT(b+yBR); rgb[4] = LIMIT(g+yBR); rgb[5] = LIMIT(r+yBR); + if (bits == 24) { + /* Write out top two pixels */ + rgb[0] = LIMIT(b+yTL); rgb[1] = LIMIT(g+yTL); rgb[2] = LIMIT(r+yTL); + rgb[3] = LIMIT(b+yTR); rgb[4] = LIMIT(g+yTR); rgb[5] = LIMIT(r+yTR); + + /* Skip down to next line to write out bottom two pixels */ + rgb += 3 * rowPixels; + rgb[0] = LIMIT(b+yBL); rgb[1] = LIMIT(g+yBL); rgb[2] = LIMIT(r+yBL); + rgb[3] = LIMIT(b+yBR); rgb[4] = LIMIT(g+yBR); rgb[5] = LIMIT(r+yBR); + } else if (bits == 16) { + /* Write out top two pixels */ + rgb[0] = ((LIMIT(b+yTL) >> 3) & 0x1F) | ((LIMIT(g+yTL) << 3) & 0xE0); + rgb[1] = ((LIMIT(g+yTL) >> 5) & 0x07) | (LIMIT(r+yTL) & 0xF8); + + rgb[2] = ((LIMIT(b+yTR) >> 3) & 0x1F) | ((LIMIT(g+yTR) << 3) & 0xE0); + rgb[3] = ((LIMIT(g+yTR) >> 5) & 0x07) | (LIMIT(r+yTR) & 0xF8); + + /* Skip down to next line to write out bottom two pixels */ + rgb += 2 * rowPixels; + + rgb[0] = ((LIMIT(b+yBL) >> 3) & 0x1F) | ((LIMIT(g+yBL) << 3) & 0xE0); + rgb[1] = ((LIMIT(g+yBL) >> 5) & 0x07) | (LIMIT(r+yBL) & 0xF8); + + rgb[2] = ((LIMIT(b+yBR) >> 3) & 0x1F) | ((LIMIT(g+yBR) << 3) & 0xE0); + rgb[3] = ((LIMIT(g+yBR) >> 5) & 0x07) | (LIMIT(r+yBR) & 0xF8); + } } /* @@ -1170,7 +1232,7 @@ * Note that the U and V data in one segment represents a 16 x 16 pixel * area, but the Y data represents a 32 x 8 pixel area. * - * If OV511_DUMPPIX is defined, _parse_data just dumps the incoming segments, + * If dumppix module param is set, _parse_data just dumps the incoming segments, * verbatim, in order, into the frame. When used with vidcat -f ppm -s 640x480 * this puts the data on the standard output and can be analyzed with the * parseppm.c utility I wrote. That's a much faster way for figuring out how @@ -1180,14 +1242,8 @@ #define HDIV 8 #define WDIV (256/HDIV) -#undef OV511_DUMPPIX - -/* #define this and OV511_DUMPPIX to disable parsing of UV data */ -#undef OV511_FORCE_MONO - -#ifdef OV511_GBR422 static void -ov511_parse_data_rgb24(unsigned char *pIn0, unsigned char *pOut0, +ov511_parse_gbr422_to_rgb24(unsigned char *pIn0, unsigned char *pOut0, int iOutY, int iOutUV, int iHalf, int iWidth) { int k, l, m; @@ -1234,14 +1290,12 @@ } } -#else - static void -ov511_parse_data_rgb24(unsigned char *pIn0, unsigned char *pOut0, - int iOutY, int iOutUV, int iHalf, int iWidth) +ov511_parse_yuv420_to_rgb(unsigned char *pIn0, unsigned char *pOut0, + int iOutY, int iOutUV, int iHalf, int iWidth, int bits) { -#ifndef OV511_DUMPPIX int k, l, m; + int bytes = bits >> 3; unsigned char *pIn; unsigned char *pOut, *pOut1; @@ -1254,11 +1308,11 @@ for (l = 0; l < 8; l++) { for (m = 0; m < 8; m++) { *pOut1 = *pIn++; - pOut1 += 3; + pOut1 += bytes; } - pOut1 += (iWidth - 8) * 3; + pOut1 += (iWidth - 8) * bytes; } - pOut += 8 * 3; + pOut += 8 * bytes; } } @@ -1268,16 +1322,16 @@ for (l = 0; l < 4; l++) { for (m=0; m<8; m++) { int y00 = *(pOut); - int y01 = *(pOut+3); - int y10 = *(pOut+iWidth*3); - int y11 = *(pOut+iWidth*3+3); + int y01 = *(pOut+bytes); + int y10 = *(pOut+iWidth*bytes); + int y11 = *(pOut+iWidth*bytes+bytes); int v = *(pIn+64) - 128; int u = *pIn++ - 128; ov511_move_420_block(y00, y01, y10, y11, u, v, iWidth, - pOut); - pOut += 6; + pOut, bits); + pOut += 2 * bytes; } - pOut += (iWidth*2 - 16) * 3; + pOut += (iWidth*2 - 16) * bytes; } /* Just copy the other UV rows */ @@ -1285,9 +1339,9 @@ for (m = 0; m < 8; m++) { *pOut++ = *(pIn + 64); *pOut = *pIn++; - pOut += 5; + pOut += 2 * bytes - 1; } - pOut += (iWidth*2 - 16) * 3; + pOut += (iWidth*2 - 16) * bytes; } /* Calculate values if it's the second half */ @@ -1305,72 +1359,65 @@ int v = *pOut1 - 128; int u = *(pOut1+1) - 128; ov511_move_420_block(y00, y01, y10, - y11, u, v, iWidth, pOut1); - pOut1 += 6; + y11, u, v, iWidth, pOut1, bits); + pOut1 += 2 * bytes; } - pOut1 += (iWidth*2 - 8) * 3; + pOut1 += (iWidth*2 - 8) * bytes; pIn += 8; } - pOut += 8 * 3; + pOut += 8 * bytes; } } -#else +} -#ifndef OV511_FORCE_MONO - /* Just dump pix data straight out for debug */ - int i, j; - - pOut0 += iOutY; - for (i = 0; i < HDIV; i++) { - for (j = 0; j < WDIV; j++) { - *pOut0++ = *pIn0++; - *pOut0++ = *pIn0++; - *pOut0++ = *pIn0++; - } - pOut0 += (iWidth - WDIV) * 3; - } -#else - -#if 1 - /* This converts the Y data to "black-and-white" RGB data */ - /* Useful for experimenting with compression */ - int k, l, m; +static void +ov511_dumppix(unsigned char *pIn0, unsigned char *pOut0, + int iOutY, int iOutUV, int iHalf, int iWidth) +{ + int i, j, k; unsigned char *pIn, *pOut, *pOut1; - pIn = pIn0 + 128; - pOut = pOut0 + iOutY; - for (k = 0; k < 4; k++) { - pOut1 = pOut; - for (l = 0; l < 8; l++) { - for (m = 0; m < 8; m++) { - *pOut1++ = *pIn; - *pOut1++ = *pIn; - *pOut1++ = *pIn++; + switch (dumppix) { + case 1: /* Just dump YUV data straight out for debug */ + pOut0 += iOutY; + for (i = 0; i < HDIV; i++) { + for (j = 0; j < WDIV; j++) { + *pOut0++ = *pIn0++; + *pOut0++ = *pIn0++; + *pOut0++ = *pIn0++; } - pOut1 += (iWidth - 8) * 3; + pOut0 += (iWidth - WDIV) * 3; } - pOut += 8 * 3; - } -#else - /* This will dump the Y channel data stream as-is */ - int count; - unsigned char *pIn, *pOut; - - pIn = pIn0 + 128; - pOut = pOut0 + output_offset; - for (count = 0; count < 256; count++) { - *pOut++ = *pIn; - *pOut++ = *pIn; - *pOut++ = *pIn++; - output_offset += 3; - } -#endif - -#endif - -#endif + break; + case 2: /* This converts the Y data to "black-and-white" RGB data */ + /* Useful for experimenting with compression */ + pIn = pIn0 + 128; + pOut = pOut0 + iOutY; + for (i = 0; i < 4; i++) { + pOut1 = pOut; + for (j = 0; j < 8; j++) { + for (k = 0; k < 8; k++) { + *pOut1++ = *pIn; + *pOut1++ = *pIn; + *pOut1++ = *pIn++; + } + pOut1 += (iWidth - 8) * 3; + } + pOut += 8 * 3; + } + break; + case 3: /* This will dump only the Y channel data stream as-is */ + pIn = pIn0 + 128; + pOut = pOut0 + output_offset; + for (i = 0; i < 256; i++) { + *pOut++ = *pIn; + *pOut++ = *pIn; + *pOut++ = *pIn++; + output_offset += 3; + } + break; + } /* End switch (dumppix) */ } -#endif /* This converts YUV420 segments to YUYV */ static void @@ -1665,6 +1712,11 @@ /* Frame start */ PDEBUG(4, "Frame start, framenum = %d", ov511->curframe); +#if 0 + /* Make sure no previous data carries over; necessary + * for compression experimentation */ + memset(frame->data, 0, MAX_DATA_SIZE); +#endif output_offset = 0; /* Check to see if it's a snapshot frame */ @@ -1743,8 +1795,19 @@ ov511_parse_data_grey (pData, pOut, iOutY, frame->width); break; case VIDEO_PALETTE_RGB24: - ov511_parse_data_rgb24 (pData, pOut, iOutY, iOutUV, - iY & 1, frame->width); + if (dumppix) + ov511_dumppix(pData, pOut, iOutY, iOutUV, + iY & 1, frame->width); + else if (sensor_gbr) + ov511_parse_gbr422_to_rgb24(pData, pOut, iOutY, iOutUV, + iY & 1, frame->width); + else + ov511_parse_yuv420_to_rgb(pData, pOut, iOutY, iOutUV, + iY & 1, frame->width, 24); + break; + case VIDEO_PALETTE_RGB565: + ov511_parse_yuv420_to_rgb(pData, pOut, iOutY, iOutUV, + iY & 1, frame->width, 16); break; case VIDEO_PALETTE_YUV422: case VIDEO_PALETTE_YUYV: @@ -1785,11 +1848,20 @@ static void ov511_isoc_irq(struct urb *urb) { int len; - struct usb_ov511 *ov511 = urb->context; + struct usb_ov511 *ov511; struct ov511_sbuf *sbuf; - if (!ov511->dev) + if (!urb->context) { + PDEBUG(4, "no context"); return; + } + + ov511 = (struct usb_ov511 *) urb->context; + + if (!ov511->dev || !ov511->user) { + PDEBUG(4, "no device, or not open"); + return; + } if (!ov511->streaming) { PDEBUG(4, "hmmm... not streaming, but got interrupt"); @@ -1808,6 +1880,8 @@ /* Move to the next sbuf */ ov511->cursbuf = (ov511->cursbuf + 1) % OV511_NUMSBUF; + urb->dev = ov511->dev; + return; } @@ -1875,6 +1949,7 @@ ov511->sbuf[n].urb->next = ov511->sbuf[n+1].urb; for (n = 0; n < OV511_NUMSBUF; n++) { + ov511->sbuf[n].urb->dev = ov511->dev; err = usb_submit_urb(ov511->sbuf[n].urb); if (err) err("init isoc: usb_submit_urb(%d) ret %d", n, err); @@ -2082,7 +2157,7 @@ static int ov511_open(struct video_device *dev, int flags) { struct usb_ov511 *ov511 = (struct usb_ov511 *)dev; - int err = 0; + int err; MOD_INC_USE_COUNT; PDEBUG(4, "opening"); @@ -2171,14 +2246,15 @@ PDEBUG (4, "VIDIOCGCAP"); + memset(&b, 0, sizeof(b)); strcpy(b.name, "OV511 USB Camera"); b.type = VID_TYPE_CAPTURE | VID_TYPE_SUBCAPTURE; b.channels = 1; b.audios = 0; b.maxwidth = ov511->maxwidth; b.maxheight = ov511->maxheight; - b.minwidth = 32; - b.minheight = 16; + b.minwidth = 160; + b.minheight = 120; if (copy_to_user(arg, &b, sizeof(b))) return -EFAULT; @@ -2222,9 +2298,11 @@ PDEBUG (4, "VIDIOCGPICT"); + memset(&p, 0, sizeof(p)); + if (ov7610_get_picture(ov511, &p)) return -EIO; - + if (copy_to_user(arg, &p, sizeof(p))) return -EFAULT; @@ -2240,12 +2318,7 @@ if (copy_from_user(&p, arg, sizeof(p))) return -EFAULT; - if (p.palette != VIDEO_PALETTE_GREY && - p.palette != VIDEO_PALETTE_RGB24 && - p.palette != VIDEO_PALETTE_YUV422 && - p.palette != VIDEO_PALETTE_YUYV && - p.palette != VIDEO_PALETTE_YUV420 && - p.palette != VIDEO_PALETTE_YUV422P) + if (!ov511_get_depth(p.palette)) return -EINVAL; if (ov7610_set_picture(ov511, &p)) @@ -2344,11 +2417,11 @@ { struct video_window vw; + memset(&vw, 0, sizeof(vw)); vw.x = 0; /* FIXME */ vw.y = 0; vw.width = ov511->frame[0].width; vw.height = ov511->frame[0].height; - vw.chromakey = 0; vw.flags = 30; PDEBUG (4, "VIDIOCGWIN: %dx%d", vw.width, vw.height); @@ -2361,12 +2434,16 @@ case VIDIOCGMBUF: { struct video_mbuf vm; + int i; memset(&vm, 0, sizeof(vm)); vm.size = OV511_NUMFRAMES * MAX_DATA_SIZE; vm.frames = OV511_NUMFRAMES; vm.offsets[0] = 0; - vm.offsets[1] = MAX_FRAME_SIZE + sizeof (struct timeval); + for (i = 1; i < OV511_NUMFRAMES; i++) { + vm.offsets[i] = vm.offsets[i-1] + MAX_FRAME_SIZE + + sizeof (struct timeval); + } if (copy_to_user((void *)arg, (void *)&vm, sizeof(vm))) return -EFAULT; @@ -2376,7 +2453,7 @@ case VIDIOCMCAPTURE: { struct video_mmap vm; - int ret; + int ret, depth; if (copy_from_user((void *)&vm, (void *)arg, sizeof(vm))) return -EFAULT; @@ -2385,19 +2462,26 @@ PDEBUG(4, "frame: %d, size: %dx%d, format: %d", vm.frame, vm.width, vm.height, vm.format); - if (vm.format != VIDEO_PALETTE_RGB24 && - vm.format != VIDEO_PALETTE_YUV422 && - vm.format != VIDEO_PALETTE_YUYV && - vm.format != VIDEO_PALETTE_YUV420 && - vm.format != VIDEO_PALETTE_YUV422P && - vm.format != VIDEO_PALETTE_GREY) + depth = ov511_get_depth(vm.format); + if (!depth) { + err("VIDIOCMCAPTURE: invalid format (%d)", vm.format); return -EINVAL; + } - if ((vm.frame != 0) && (vm.frame != 1)) + if ((vm.frame != 0) && (vm.frame != 1)) { + err("VIDIOCMCAPTURE: invalid frame (%d)", vm.frame); return -EINVAL; - - if (vm.width > ov511->maxwidth || vm.height > ov511->maxheight) + } + + if ((unsigned)vm.frame >= OV511_NUMFRAMES) { + err("VIDIOCMCAPTURE: invalid frame (%d)", vm.frame); + return -EINVAL; + } + + if (vm.width > ov511->maxwidth || vm.height > ov511->maxheight) { + err("VIDIOCMCAPTURE: requested dimensions too big"); return -EINVAL; + } if (ov511->frame[vm.frame].grabstate == FRAME_GRABBING) return -EBUSY; @@ -2425,7 +2509,7 @@ ov511->frame[vm.frame].format = vm.format; ov511->frame[vm.frame].sub_flag = ov511->sub_flag; ov511->frame[vm.frame].segsize = GET_SEGSIZE(vm.format); - ov511->frame[vm.frame].depth = GET_DEPTH(vm.format); + ov511->frame[vm.frame].depth = depth; /* Mark it as ready */ ov511->frame[vm.frame].grabstate = FRAME_READY; @@ -2439,6 +2523,11 @@ if (copy_from_user((void *)&frame, arg, sizeof(int))) return -EFAULT; + if ((unsigned)frame >= OV511_NUMFRAMES) { + err("VIDIOCSYNC: invalid frame (%d)", frame); + return -EINVAL; + } + PDEBUG(4, "syncing to frame %d, grabstate = %d", frame, ov511->frame[frame].grabstate); @@ -2484,6 +2573,13 @@ goto redo; } case FRAME_DONE: + if (ov511->snap_enabled && !ov511->frame[frame].snapshot) { + int ret; + if ((ret = ov511_new_frame(ov511, frame)) < 0) + return ret; + goto redo; + } + ov511->frame[frame].grabstate = FRAME_UNUSED; /* Reset the hardware snapshot button */ @@ -2660,7 +2756,7 @@ PDEBUG(4, "mmap: %ld (%lX) bytes", size, size); - if (size > (((2 * MAX_DATA_SIZE) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))) + if (size > (((OV511_NUMFRAMES * MAX_DATA_SIZE) + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1))) return -EINVAL; pos = (unsigned long)ov511->fbuf; @@ -3171,7 +3267,7 @@ return NULL; /* Checking vendor/product should be enough, but what the hell */ - if (interface->bInterfaceClass != 0xFF) + if (interface->bInterfaceClass != 0xFF) return NULL; if (interface->bInterfaceSubClass != 0x00) return NULL; @@ -3266,7 +3362,8 @@ } -static void ov511_disconnect(struct usb_device *dev, void *ptr) +static void +ov511_disconnect(struct usb_device *dev, void *ptr) { struct usb_ov511 *ov511 = (struct usb_ov511 *) ptr; int n; @@ -3324,10 +3421,9 @@ } static struct usb_driver ov511_driver = { - "ov511", - ov511_probe, - ov511_disconnect, - { NULL, NULL } + name: "ov511", + probe: ov511_probe, + disconnect: ov511_disconnect }; @@ -3346,7 +3442,8 @@ if (usb_register(&ov511_driver) < 0) return -1; - info("ov511 driver version %s registered", version); + info(DRIVER_VERSION " " DRIVER_AUTHOR); + info(DRIVER_DESC); return 0; } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/printer.c linux.20p6/drivers/usb/printer.c --- linux.vanilla/drivers/usb/printer.c Sun Mar 25 17:37:37 2001 +++ linux.20p6/drivers/usb/printer.c Tue Jun 19 09:30:34 2001 @@ -460,7 +460,7 @@ struct usb_endpoint_descriptor *epread, *epwrite; struct usblp *usblp; int minor, i, bidir = 0, quirks; - int alts = dev->actconfig->interface[ifnum].act_altsetting; + int alts = -1; int length, err; char *buf; @@ -474,12 +474,18 @@ (interface->bInterfaceProtocol > 1 && interface->bNumEndpoints < 2)) continue; + if (alts == -1) + alts = i; + if (interface->bInterfaceProtocol > 1) { bidir = 1; alts = i; break; } } + + if (alts == -1) + return NULL; interface = &dev->actconfig->interface[ifnum].altsetting[alts]; if (usb_set_interface(dev, ifnum, alts)) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/rio500.c linux.20p6/drivers/usb/rio500.c --- linux.vanilla/drivers/usb/rio500.c Sun Mar 25 17:37:37 2001 +++ linux.20p6/drivers/usb/rio500.c Mon Jun 18 08:16:24 2001 @@ -40,6 +40,13 @@ #include "rio500_usb.h" +/* + * Version Information + */ +#define DRIVER_VERSION "v1.0.0" +#define DRIVER_AUTHOR "Cesar Miquel " +#define DRIVER_DESC "USB Rio 500 driver" + #define RIO_MINOR 64 /* stall/wait timeout for rio */ @@ -121,16 +128,21 @@ data = (void *) arg; if (data == NULL) break; - if (copy_from_user(&rio_cmd, data, sizeof(struct RioCommand))) - return -EFAULT; - if (rio_cmd.length > PAGE_SIZE) - return -EINVAL; + if (copy_from_user(&rio_cmd, data, sizeof(struct RioCommand))) { + retval = -EFAULT; + goto err_out; + } + if (rio_cmd.length > PAGE_SIZE) { + retval = -EINVAL; + goto err_out; + } buffer = (unsigned char *) __get_free_page(GFP_KERNEL); if (buffer == NULL) return -ENOMEM; if (copy_from_user(buffer, rio_cmd.buffer, rio_cmd.length)) { + retval = -EFAULT; free_page((unsigned long) buffer); - return -EFAULT; + goto err_out; } requesttype = rio_cmd.requesttype | USB_DIR_IN | @@ -466,8 +478,7 @@ release: close_rio, }; -static struct -usb_driver rio_driver = { +static struct usb_driver rio_driver = { name: "rio500", probe: probe_rio, disconnect: disconnect_rio, @@ -481,6 +492,9 @@ return -1; info("USB Rio support registered."); + info(DRIVER_VERSION " " DRIVER_AUTHOR); + info(DRIVER_DESC); + return 0; } @@ -498,5 +512,6 @@ module_init(usb_rio_init); module_exit(usb_rio_cleanup); -MODULE_AUTHOR("Cesar Miquel "); -MODULE_DESCRIPTION("USB Rio 500 driver"); +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/scanner.c linux.20p6/drivers/usb/scanner.c --- linux.vanilla/drivers/usb/scanner.c Sun Mar 25 17:37:37 2001 +++ linux.20p6/drivers/usb/scanner.c Mon Jun 18 08:17:15 2001 @@ -1,7 +1,7 @@ /* -*- linux-c -*- */ /* - * Driver for USB Scanners (linux-2.4.0test1-ac7) + * Driver for USB Scanners (linux-2.4.0) * * Copyright (C) 1999, 2000 David E. Nelson * @@ -199,6 +199,34 @@ * - Fixed HP S20 ID's...again..sigh. Thanks to Ruud * Linders . * + * 0.4.4 + * - Added addtional Mustek ID's (BearPaw 1200, 600 CU, 1200 USB, + * and 1200 UB. Thanks to Henning Meier-Geinitz . + * - Added the Vuego Scan Brisa 340U ID's. Apparently this scanner is + * marketed by Acer Peripherals as a cheap 300 dpi model. Thanks to + * David Gundersen . + * - Added the Epson Expression1600 ID's. Thanks to Karl Heinz + * Kremer . + * + * 0.4.5 2/28/2001 + * - Added Mustek ID's (BearPaw 2400, 1200 CU Plus, BearPaw 1200F). + * Thanks to Henning Meier-Geinitz . + * - Added read_timeout module parameter to override RD_NAK_TIMEOUT + * when read()'ing from devices. + * - Stalled pipes are now checked and cleared with + * usb_clear_halt() for the read_scanner() function. This should + * address the "funky result: -32" error messages. + * - Removed Microtek scanner ID's. Microtek scanners are now + * supported via the drivers/usb/microtek.c driver. + * - Added scanner specific read timeout's. + * - Return status errors are NEGATIVE!!! This should address the + * "funky result: -110" error messages. + * - Replaced USB_ST_TIMEOUT with ETIMEDOUT. + * - rd_nak was still defined in MODULE_PARM. It's been updated with + * read_timeout. Thanks to Mark W. Webb for + * reporting this bug. + * - Added Epson Perfection 1640SU and 1640SU Photo. Thanks to + * Jean-Luc . * * TODO * @@ -236,6 +264,7 @@ */ #include "scanner.h" + static void irq_scanner(struct urb *urb) { @@ -266,13 +295,18 @@ kdev_t scn_minor; + int err=0; + + lock_kernel(); + scn_minor = USB_SCN_MINOR(inode); dbg("open_scanner: scn_minor:%d", scn_minor); if (!p_scn_table[scn_minor]) { err("open_scanner(%d): Unable to access minor data", scn_minor); - return -ENODEV; + err = -ENODEV; + goto out_error; } scn = p_scn_table[scn_minor]; @@ -281,17 +315,20 @@ if (!dev) { err("open_scanner(%d): Scanner device not present", scn_minor); - return -ENODEV; + err = -ENODEV; + goto out_error; } if (!scn->present) { err("open_scanner(%d): Scanner is not present", scn_minor); - return -ENODEV; + err = -ENODEV; + goto out_error; } if (scn->isopen) { err("open_scanner(%d): Scanner device is already open", scn_minor); - return -EBUSY; + err = -EBUSY; + goto out_error; } init_waitqueue_head(&scn->rd_wait_q); @@ -302,7 +339,11 @@ MOD_INC_USE_COUNT; - return 0; +out_error: + + unlock_kernel(); + + return err; } static int @@ -338,7 +379,7 @@ { struct scn_usb_data *scn; struct usb_device *dev; - + ssize_t bytes_written = 0; /* Overall count of bytes written */ ssize_t ret = 0; @@ -347,7 +388,7 @@ int this_write; /* Number of bytes to write */ int partial; /* Number of bytes successfully written */ int result = 0; - + char *obuf; scn = file->private_data; @@ -360,6 +401,8 @@ file->f_dentry->d_inode->i_atime = CURRENT_TIME; + down(&(scn->gen_lock)); + while (count > 0) { if (signal_pending(current)) { @@ -368,7 +411,7 @@ } this_write = (count >= OBUF_SIZE) ? OBUF_SIZE : count; - + if (copy_from_user(scn->obuf, buffer, this_write)) { ret = -EFAULT; break; @@ -377,15 +420,15 @@ result = usb_bulk_msg(dev,usb_sndbulkpipe(dev, scn->bulk_out_ep), obuf, this_write, &partial, 60*HZ); dbg("write stats(%d): result:%d this_write:%d partial:%d", scn_minor, result, this_write, partial); - if (result == USB_ST_TIMEOUT) { /* NAK -- shouldn't happen */ + if (result == -ETIMEDOUT) { /* NAK -- shouldn't happen */ warn("write_scanner: NAK received."); - ret = -ETIME; + ret = result; break; } else if (result < 0) { /* We should not get any I/O errors */ warn("write_scanner(%d): funky result: %d. Please notify the maintainer.", scn_minor, result); ret = -EIO; break; - } + } #ifdef WR_DATA_DUMP if (partial) { @@ -412,6 +455,7 @@ break; } } + up(&(scn->gen_lock)); mdelay(5); /* This seems to help with SANE queries */ return ret ? ret : bytes_written; } @@ -450,6 +494,7 @@ atime of the device node */ + down(&(scn->gen_lock)); while (count > 0) { if (signal_pending(current)) { @@ -458,11 +503,11 @@ } this_read = (count >= IBUF_SIZE) ? IBUF_SIZE : count; - - result = usb_bulk_msg(dev, usb_rcvbulkpipe(dev, scn->bulk_in_ep), ibuf, this_read, &partial, RD_NAK_TIMEOUT); + + result = usb_bulk_msg(dev, usb_rcvbulkpipe(dev, scn->bulk_in_ep), ibuf, this_read, &partial, scn->rd_nak_timeout); dbg("read stats(%d): result:%d this_read:%d partial:%d count:%d", scn_minor, result, this_read, partial, count); -/* +/* * Scanners are sometimes inheriently slow since they are mechanical * in nature. USB bulk reads tend to timeout while the scanner is * positioning, resetting, warming up the lamp, etc if the timeout is @@ -473,26 +518,38 @@ * that something had hung or crashed when in fact the USB read was * just waiting on data. So, the below code retains the same long * timeout period, but splits it up into smaller parts so that - * Ctrl-C's are acted upon in a reasonable amount of time. + * Ctrl-C's are acted upon in a reasonable amount of time. */ - if (result == USB_ST_TIMEOUT && !partial) { /* Timeout - and no - data */ - if (--rd_expire <= 0) { - warn("read_scanner(%d): excessive NAK's received", scn_minor); - ret = -ETIME; - break; - } else { - interruptible_sleep_on_timeout(&scn->rd_wait_q, RD_NAK_TIMEOUT); - continue; + if (result == -ETIMEDOUT) { /* NAK */ + if (!partial) { /* No data */ + if (--rd_expire <= 0) { /* Give it up */ + warn("read_scanner(%d): excessive NAK's received", scn_minor); + ret = result; + break; + } else { /* Keep trying to read data */ + interruptible_sleep_on_timeout(&scn->rd_wait_q, scn->rd_nak_timeout); + continue; + } + } else { /* Timeout w/ some data */ + goto data_recvd; } + } + + if (result == -EPIPE) { /* No hope */ + if(usb_clear_halt(dev, scn->bulk_in_ep)) { + err("read_scanner(%d): Failure to clear endpoint halt condition (%Zd).", scn_minor, ret); + } + ret = result; + break; } else if ((result < 0) && (result != USB_ST_DATAUNDERRUN)) { warn("read_scanner(%d): funky result:%d. Please notify the maintainer.", scn_minor, (int)result); ret = -EIO; break; } + data_recvd: + #ifdef RD_DATA_DUMP if (partial) { unsigned char cnt, cnt_max; @@ -518,7 +575,8 @@ break; } } - + up(&(scn->gen_lock)); + return ret ? ret : bytes_read; } @@ -528,7 +586,7 @@ struct scn_usb_data *scn; struct usb_interface_descriptor *interface; struct usb_endpoint_descriptor *endpoint; - + int ep_cnt; int ix; @@ -550,7 +608,7 @@ * 3. Determine/Assign Intr Endpoint */ -/* +/* * There doesn't seem to be an imaging class defined in the USB * Spec. (yet). If there is, HP isn't following it and it doesn't * look like anybody else is either. Therefore, we have to test the @@ -577,7 +635,7 @@ dev->descriptor.idProduct == product) { /* User specified */ valid_device = 1; } - + if (!valid_device) return NULL; /* We didn't find anything pleasing */ @@ -599,7 +657,7 @@ interface = dev->config[0].interface[ifnum].altsetting; endpoint = interface[ifnum].endpoint; -/* +/* * Start checking for two bulk endpoints OR two bulk endpoints *and* one * interrupt endpoint. If we have an interrupt endpoint go ahead and * setup the handler. FIXME: This is a future enhancement... @@ -622,7 +680,7 @@ dbg("probe_scanner: bulk_in_ep:%d", have_bulk_in); continue; } - + if (!have_bulk_out && IS_EP_BULK_OUT(endpoint[ep_cnt])) { ep_cnt++; have_bulk_out = ep_cnt; @@ -665,7 +723,7 @@ } -/* +/* * Determine a minor number and initialize the structure associated * with it. The problem with this is that we are counting on the fact * that the user will sequentially add device nodes for the scanner @@ -695,7 +753,7 @@ /* Ok, if we detected an interrupt EP, setup a handler for it */ if (have_intr) { dbg("probe_scanner(%d): Configuring IRQ handler for intr EP:%d", scn_minor, have_intr); - FILL_INT_URB(&scn->scn_irq, dev, + FILL_INT_URB(&scn->scn_irq, dev, usb_rcvintpipe(dev, have_intr), &scn->button, 1, irq_scanner, scn, // endpoint[(int)have_intr].bInterval); @@ -724,6 +782,26 @@ return NULL; } dbg("probe_scanner(%d): ibuf address:%p", scn_minor, scn->ibuf); + + + switch (dev->descriptor.idVendor) { /* Scanner specific read timeout parameters */ + case 0x04b8: /* Seiko/Epson */ + scn->rd_nak_timeout = HZ * 40; + break; + case 0x055f: /* Mustek */ + case 0x0400: /* Another Mustek */ + case 0x0ff5: /* And yet another Mustek */ + scn->rd_nak_timeout = HZ * 1; + default: + scn->rd_nak_timeout = RD_NAK_TIMEOUT; + } + + + if (read_timeout > 0) { /* User specified read timeout overrides everything */ + info("probe_scanner: User specified USB read timeout - %d", read_timeout); + scn->rd_nak_timeout = read_timeout; + } + scn->bulk_in_ep = have_bulk_in; scn->bulk_out_ep = have_bulk_out; @@ -733,6 +811,8 @@ scn->scn_minor = scn_minor; scn->isopen = 0; + init_MUTEX(&(scn->gen_lock)); + return p_scn_table[scn_minor] = scn; } @@ -740,7 +820,7 @@ disconnect_scanner(struct usb_device *dev, void *ptr) { struct scn_usb_data *scn = (struct scn_usb_data *) ptr; - + if(scn->intr_ep) { dbg("disconnect_scanner(%d): Unlinking IRQ URB", scn->scn_minor); usb_unlink_urb(&scn->scn_irq); @@ -762,11 +842,11 @@ unsigned int cmd, unsigned long arg) { struct usb_device *dev; - + int result; kdev_t scn_minor; - + scn_minor = USB_SCN_MINOR(inode); if (!p_scn_table[scn_minor]) { @@ -775,7 +855,7 @@ } dev = p_scn_table[scn_minor]->scn_dev; - + switch (cmd) { case PV8630_IOCTL_INREQUEST : @@ -786,10 +866,10 @@ __u16 value; __u16 index; } args; - + if (copy_from_user(&args, (void *)arg, sizeof(args))) return -EFAULT; - + result = usb_control_msg(dev, usb_rcvctrlpipe(dev, 0), args.request, USB_TYPE_VENDOR| USB_RECIP_DEVICE|USB_DIR_IN, @@ -802,7 +882,7 @@ return -EFAULT; dbg("ioctl_scanner(%d): inreq: result:%d\n", scn_minor, result); - + return result; } case PV8630_IOCTL_OUTREQUEST : @@ -812,10 +892,10 @@ __u16 value; __u16 index; } args; - + if (copy_from_user(&args, (void *)arg, sizeof(args))) return -EFAULT; - + dbg("ioctl_scanner(%d): outreq: args.value:%x args.index:%x args.request:%x\n", scn_minor, args.value, args.index, args.request); result = usb_control_msg(dev, usb_sndctrlpipe(dev, 0), @@ -825,7 +905,7 @@ 0, HZ*5); dbg("ioctl_scanner(%d): outreq: result:%d\n", scn_minor, result); - + return result; } default: @@ -848,12 +928,11 @@ static struct usb_driver scanner_driver = { - "usbscanner", - probe_scanner, - disconnect_scanner, - { NULL, NULL }, - &usb_scanner_fops, - SCN_BASE_MNR + name: "usbscanner", + probe: probe_scanner, + disconnect: disconnect_scanner, + fops: &usb_scanner_fops, + minor: SCN_BASE_MNR, }; void __exit diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/scanner.h linux.20p6/drivers/usb/scanner.h --- linux.vanilla/drivers/usb/scanner.h Sun Mar 25 17:37:37 2001 +++ linux.20p6/drivers/usb/scanner.h Mon Jun 25 14:52:28 2001 @@ -1,5 +1,5 @@ /* - * Driver for USB Scanners (linux-2.4.0test1-ac7) + * Driver for USB Scanners (linux-2.4.0) * * Copyright (C) 1999, 2000 David E. Nelson * @@ -30,12 +30,13 @@ #include #include #include +#include // #define DEBUG #include -static __s32 vendor=-1, product=-1; +static __s32 vendor=-1, product=-1, read_timeout=0; MODULE_AUTHOR("David E. Nelson, dnelson@jump.net, http://www.jump.net/~dnelson"); MODULE_DESCRIPTION("USB Scanner Driver"); @@ -46,6 +47,9 @@ MODULE_PARM(product, "i"); MODULE_PARM_DESC(product, "User specified USB idProduct"); +MODULE_PARM(read_timeout, "i"); +MODULE_PARM_DESC(read_timeout, "User specified read timeout in seconds"); + /* Enable to activate the ioctl interface. This is mainly meant for */ /* development purposes until an ioctl number is officially registered */ @@ -72,7 +76,7 @@ #define OBUF_SIZE 4096 /* read_scanner timeouts -- RD_NAK_TIMEOUT * RD_EXPIRE = Number of seconds */ -#define RD_NAK_TIMEOUT (10*HZ) /* Number of X seconds to wait */ +#define RD_NAK_TIMEOUT (10*HZ) /* Default number of X seconds to wait */ #define RD_EXPIRE 12 /* Number of attempts to wait X seconds */ @@ -89,11 +93,13 @@ unsigned int ifnum; /* Interface number of the USB device */ kdev_t scn_minor; /* Scanner minor - used in disconnect() */ unsigned char button; /* Front panel buffer */ - char isopen; /* Not zero if the device is open */ + char isopen; /* Not zero if the device is open */ char present; /* Not zero if device is present */ char *obuf, *ibuf; /* transfer buffers */ char bulk_in_ep, bulk_out_ep, intr_ep; /* Endpoint assignments */ wait_queue_head_t rd_wait_q; /* read timeouts */ + struct semaphore gen_lock; /* lock to prevent concurrent reads or writes */ + unsigned int rd_nak_timeout; /* Seconds to wait before read() timeout. */ }; static struct scn_usb_data *p_scn_table[SCN_MAX_MNR] = { NULL, /* ... */}; @@ -106,8 +112,10 @@ /* Acer */ { 0x04a5, 0x2060 }, /* Prisa Acerscan 620U & 640U (!) */ { 0x04a5, 0x2040 }, /* Prisa AcerScan 620U (!) */ + { 0x04a5, 0x2022 }, /* Vuego Scan Brisa 340U */ /* Agfa */ { 0x06bd, 0x0001 }, /* SnapScan 1212U */ + { 0x06bd, 0x0002 }, /* SnapScan 1236U */ { 0x06bd, 0x2061 }, /* Another SnapScan 1212U (?) */ { 0x06bd, 0x0100 }, /* SnapScan Touch */ /* Colorado -- See Primax/Colorado below */ @@ -120,20 +128,28 @@ { 0x03f0, 0x0105 }, /* 4200C */ { 0x03f0, 0x0102 }, /* PhotoSmart S20 */ { 0x03f0, 0x0401 }, /* 5200C */ + // { 0x03f0, 0x0701 }, /* 5300C - NOT SUPPORTED - see http://www.neatech.nl/oss/HP5300C/ */ { 0x03f0, 0x0201 }, /* 6200C */ { 0x03f0, 0x0601 }, /* 6300C */ /* iVina */ { 0x0638, 0x0268 }, /* 1200U */ - /* Microtek */ - { 0x05da, 0x0099 }, /* ScanMaker X6 - X6U */ - { 0x05da, 0x0094 }, /* Phantom 336CX - C3 */ - { 0x05da, 0x00a0 }, /* Phantom 336CX - C3 #2 */ - { 0x05da, 0x009a }, /* Phantom C6 */ - { 0x05da, 0x00a3 }, /* ScanMaker V6USL */ - { 0x05da, 0x80a3 }, /* ScanMaker V6USL #2 */ - { 0x05da, 0x80ac }, /* ScanMaker V6UL - SpicyU */ + /* Microtek No longer supported - Enable SCSI and USB Microtek in kernel config */ + // { 0x05da, 0x0099 }, /* ScanMaker X6 - X6U */ + // { 0x05da, 0x0094 }, /* Phantom 336CX - C3 */ + // { 0x05da, 0x00a0 }, /* Phantom 336CX - C3 #2 */ + // { 0x05da, 0x009a }, /* Phantom C6 */ + // { 0x05da, 0x00a3 }, /* ScanMaker V6USL */ + // { 0x05da, 0x80a3 }, /* ScanMaker V6USL #2 */ + // { 0x05da, 0x80ac }, /* ScanMaker V6UL - SpicyU */ /* Mustek */ { 0x055f, 0x0001 }, /* 1200 CU */ + { 0x0400, 0x1000 }, /* BearPaw 1200 */ + { 0x055f, 0x0002 }, /* 600 CU */ + { 0x055f, 0x0003 }, /* 1200 USB */ + { 0x055f, 0x0006 }, /* 1200 UB */ + { 0x0400, 0x1001 }, /* BearPaw 2400 */ + { 0x055f, 0x0008 }, /* 1200 CU Plus */ + { 0x0ff5, 0x0010 }, /* BearPaw 1200F */ /* Primax/Colorado */ { 0x0461, 0x0300 }, /* G2-300 #1 */ { 0x0461, 0x0380 }, /* G2-600 #1 */ @@ -151,7 +167,11 @@ { 0x04b8, 0x0101 }, /* Perfection 636U and 636Photo */ { 0x04b8, 0x0103 }, /* Perfection 610 */ { 0x04b8, 0x0104 }, /* Perfection 1200U and 1200Photo */ + { 0x04b8, 0x0106 }, /* Stylus Scan 2500 */ + { 0x04b8, 0x0107 }, /* Expression 1600 */ + { 0x04b8, 0x010a }, /* Perfection 1640SU and 1640SU Photo */ { 0x04b8, 0x010b }, /* Perfection 1240U and 1240Photo */ + { 0x04b8, 0x010c }, /* Perfection 640U */ /* Umax */ { 0x1606, 0x0010 }, /* Astra 1220U */ { 0x1606, 0x0002 }, /* Astra 1236U */ @@ -161,6 +181,10 @@ { 0x04a7, 0x0221 }, /* OneTouch 5300 */ { 0x04a7, 0x0221 }, /* OneTouch 7600 duplicate ID (!) */ { 0x04a7, 0x0231 }, /* 6100 */ + { 0x04a7, 0x0211 }, /* OneTouch 7600 USB */ + { 0x04a7, 0x0311 }, /* 6200 EPP/USB */ + { 0x04a7, 0x0321 }, /* OneTouch 8100 EPP/USB */ + { 0x04a7, 0x0331 }, /* OneTouch 8600 EPP/USB */ }; /* Forward declarations */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/Config.in linux.20p6/drivers/usb/serial/Config.in --- linux.vanilla/drivers/usb/serial/Config.in Sun Mar 25 17:37:37 2001 +++ linux.20p6/drivers/usb/serial/Config.in Mon Jun 18 08:16:33 2001 @@ -6,7 +6,9 @@ tristate 'USB Serial Converter support' CONFIG_USB_SERIAL $CONFIG_USB if [ "$CONFIG_USB_SERIAL" != "n" ]; then - bool ' USB Serial Converter verbose debug' CONFIG_USB_SERIAL_DEBUG + if [ "$CONFIG_USB_SERIAL" = "y" ]; then + bool ' USB Serial Converter verbose debug' CONFIG_USB_SERIAL_DEBUG + fi bool ' USB Generic Serial Driver' CONFIG_USB_SERIAL_GENERIC dep_tristate ' USB Belkin and Peracom Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_BELKIN $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL dep_tristate ' USB ConnectTech WhiteHEAT Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_WHITEHEAT $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL @@ -14,9 +16,10 @@ dep_tristate ' USB Empeg empeg-car Mark I/II Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_EMPEG $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL dep_tristate ' USB FTDI Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_FTDI_SIO $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL dep_tristate ' USB Handspring Visor Driver' CONFIG_USB_SERIAL_VISOR $CONFIG_USB_SERIAL + dep_tristate ' USB Inside Out Edgeport Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_EDGEPORT $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL dep_tristate ' USB Keyspan PDA Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KEYSPAN_PDA $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL dep_tristate ' USB Keyspan USA-xxx Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_KEYSPAN $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL - if [ "$CONFIG_USB_SERIAL_KEYSPAN" = "y" -o "$CONFIG_USB_SERIAL_KEYSPAN" = "m" ]; then + if [ "$CONFIG_USB_SERIAL_KEYSPAN" != "n" ]; then bool ' USB Keyspan USA-28 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28 bool ' USB Keyspan USA-28X Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA28X bool ' USB Keyspan USA-19 Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19 @@ -24,6 +27,7 @@ bool ' USB Keyspan USA-19W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA19W bool ' USB Keyspan USA-49W Firmware' CONFIG_USB_SERIAL_KEYSPAN_USA49W fi + dep_tristate ' USB MCT Single Port Serial Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_MCT_U232 $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL dep_tristate ' USB ZyXEL omni.net LCD Plus Driver (EXPERIMENTAL)' CONFIG_USB_SERIAL_OMNINET $CONFIG_USB_SERIAL $CONFIG_EXPERIMENTAL fi diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/Makefile linux.20p6/drivers/usb/serial/Makefile --- linux.vanilla/drivers/usb/serial/Makefile Sun Mar 25 17:37:37 2001 +++ linux.20p6/drivers/usb/serial/Makefile Mon Jun 18 08:16:33 2001 @@ -24,6 +24,8 @@ obj-$(CONFIG_USB_SERIAL_DIGI_ACCELEPORT) += digi_acceleport.o obj-$(CONFIG_USB_SERIAL_BELKIN) += belkin_sa.o obj-$(CONFIG_USB_SERIAL_EMPEG) += empeg.o +obj-$(CONFIG_USB_SERIAL_MCT_U232) += mct_u232.o +obj-$(CONFIG_USB_SERIAL_EDGEPORT) += io_edgeport.o # Objects that export symbols. export-objs := usbserial.o diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/belkin_sa.c linux.20p6/drivers/usb/serial/belkin_sa.c --- linux.vanilla/drivers/usb/serial/belkin_sa.c Sun Mar 25 17:31:43 2001 +++ linux.20p6/drivers/usb/serial/belkin_sa.c Mon Jun 18 08:05:45 2001 @@ -23,8 +23,15 @@ * framework in, but haven't analyzed the "tty_flip" interface yet. * -- Add support for flush commands * -- Add everything that is missing :) + * + * 08-Apr-2001 gb + * - Identify version on module load. * - * (11/06/2000) gkh + * 12-Mar-2001 gkh + * - Added support for the GoHubs GO-COM232 device which is the same as the + * Peracom device. + * + * 06-Nov-2000 gkh * - Added support for the old Belkin and Peracom devices. * - Made the port able to be opened multiple times. * - Added some defaults incase the line settings are things these devices @@ -59,22 +66,29 @@ #include #include #include +#include #include #include -#include #include #include +#include #ifdef CONFIG_USB_SERIAL_DEBUG - #define DEBUG + static int debug = 1; #else - #undef DEBUG + static int debug; #endif -#include #include "usb-serial.h" #include "belkin_sa.h" +/* + * Version Information + */ +#define DRIVER_VERSION "v1.0.0" +#define DRIVER_AUTHOR "William Greathouse " +#define DRIVER_DESC "USB Belkin Serial converter driver" + /* function prototypes for a Belkin USB Serial Adapter F5U103 */ static int belkin_sa_startup (struct usb_serial *serial); static void belkin_sa_shutdown (struct usb_serial *serial); @@ -158,6 +172,30 @@ shutdown: belkin_sa_shutdown, }; +/* the GoHubs Go-COM232 device is the same as the Peracom single port adapter */ +static __u16 gocom232_vendor_id = PERACOM_VID; +static __u16 gocom232_product_id = PERACOM_PID; +struct usb_serial_device_type gocom232_device = { + name: "GO-COM232 USB Serial Converter", + idVendor: &gocom232_vendor_id, /* the Go-COM232 vendor ID */ + idProduct: &gocom232_product_id, /* the Go-COM232 product id */ + needs_interrupt_in: MUST_HAVE, /* this device must have an interrupt in endpoint */ + needs_bulk_in: MUST_HAVE, /* this device must have a bulk in endpoint */ + needs_bulk_out: MUST_HAVE, /* this device must have a bulk out endpoint */ + num_interrupt_in: 1, + num_bulk_in: 1, + num_bulk_out: 1, + num_ports: 1, + open: belkin_sa_open, + close: belkin_sa_close, + read_int_callback: belkin_sa_read_int_callback, /* How we get the status info */ + ioctl: belkin_sa_ioctl, + set_termios: belkin_sa_set_termios, + break_ctl: belkin_sa_break_ctl, + startup: belkin_sa_startup, + shutdown: belkin_sa_shutdown, +}; + struct belkin_sa_private { unsigned long control_state; @@ -217,8 +255,8 @@ belkin_sa_close (&serial->port[i], NULL); } /* My special items, the standard routines free my urbs */ - if (serial->port->private) - kfree(serial->port->private); + if (serial->port[i].private) + kfree(serial->port[i].private); } } @@ -284,7 +322,6 @@ struct usb_serial_port *port = (struct usb_serial_port *)urb->context; struct belkin_sa_private *priv = (struct belkin_sa_private *)port->private; struct usb_serial *serial; - struct tty_struct *tty; unsigned char *data = urb->transfer_buffer; /* the urb might have been killed. */ @@ -360,7 +397,7 @@ unsigned int cflag = port->tty->termios->c_cflag; unsigned int old_iflag = old_termios->c_iflag; unsigned int old_cflag = old_termios->c_cflag; - __u16 urb_value; /* Will hold the new flags */ + __u16 urb_value = 0; /* Will hold the new flags */ /* Set the baud rate */ if( (cflag&CBAUD) != (old_cflag&CBAUD) ) { @@ -543,6 +580,9 @@ usb_serial_register (&belkin_sa_device); usb_serial_register (&belkin_old_device); usb_serial_register (&peracom_device); + usb_serial_register (&gocom232_device); + info(DRIVER_VERSION " " DRIVER_AUTHOR); + info(DRIVER_DESC); return 0; } @@ -552,10 +592,16 @@ usb_serial_deregister (&belkin_sa_device); usb_serial_deregister (&belkin_old_device); usb_serial_deregister (&peracom_device); + usb_serial_deregister (&gocom232_device); } module_init (belkin_sa_init); -module_exit(belkin_sa_exit); +module_exit (belkin_sa_exit); + +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); + +MODULE_PARM(debug, "i"); +MODULE_PARM_DESC(debug, "Debug enabled or not"); -MODULE_DESCRIPTION("USB Belkin Serial converter driver"); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/belkin_sa.h linux.20p6/drivers/usb/serial/belkin_sa.h --- linux.vanilla/drivers/usb/serial/belkin_sa.h Sun Mar 25 17:31:43 2001 +++ linux.20p6/drivers/usb/serial/belkin_sa.h Mon Jun 18 08:05:45 2001 @@ -15,7 +15,10 @@ * * See Documentation/usb/usb-serial.txt for more information on using this driver * - * (11/06/2000) gkh + * 12-Mar-2001 gkh + * Added GoHubs GO-COM232 device id. + * + * 06-Nov-2000 gkh * Added old Belkin and Peracom device ids, which this driver supports * * 12-Oct-2000 William Greathouse @@ -38,6 +41,9 @@ #define PERACOM_VID 0x0565 /* Peracom's vendor id */ #define PERACOM_PID 0x0001 /* Peracom's single port serial converter's id */ + +#define GOHUBS_VID 0x0921 /* GoHubs vendor id */ +#define GOHUBS_PID 0x1000 /* GoHubs single port serial converter's id (identical to the Peracom device) */ /* Vendor Request Interface */ #define BELKIN_SA_SET_BAUDRATE_REQUEST 0 /* Set baud rate */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/digi_acceleport.c linux.20p6/drivers/usb/serial/digi_acceleport.c --- linux.vanilla/drivers/usb/serial/digi_acceleport.c Sun Mar 25 17:31:43 2001 +++ linux.20p6/drivers/usb/serial/digi_acceleport.c Mon Jun 18 08:06:43 2001 @@ -13,6 +13,9 @@ * * Peter Berger (pberger@brimson.com) * Al Borchers (borchers@steinerpoint.com) +* +* (04/08/2001) gb +* Identify version on module load. * * (11/01/2000) pberger and borchers * -- Turned off the USB_DISABLE_SPD flag for write bulk urbs--it caused @@ -232,25 +235,32 @@ #include #include #include +#include #include #include -#include #include #include #include +#include #ifdef CONFIG_USB_SERIAL_DEBUG - #define DEBUG + static int debug = 1; #else - #undef DEBUG + static int debug; #endif -#include #include "usb-serial.h" /* Defines */ +/* + * Version Information + */ +#define DRIVER_VERSION "v1.80.1.2" +#define DRIVER_AUTHOR "Peter Berger , Al Borchers " +#define DRIVER_DESC "Digi AccelePort USB-2/USB-4 Serial Converter driver" + /* port output buffer length -- must be <= transfer buffer length - 2 */ /* so we can be sure to send the full buffer in one urb */ #define DIGI_OUT_BUF_SIZE 8 @@ -585,7 +595,7 @@ spin_lock_irqsave( &priv->dp_port_lock, flags ); digi_wakeup_write( port ); spin_unlock_irqrestore( &priv->dp_port_lock, flags ); - + MOD_DEC_USE_COUNT; } static void digi_wakeup_write( struct usb_serial_port *port ) @@ -1266,12 +1276,10 @@ || priv->dp_write_urb_in_use ) { /* buffer data if count is 1 (probably put_char) if possible */ - if( count == 1 ) { - new_len = MIN( count, - DIGI_OUT_BUF_SIZE-priv->dp_out_buf_len ); - memcpy( priv->dp_out_buf+priv->dp_out_buf_len, buf, - new_len ); - priv->dp_out_buf_len += new_len; + if( count == 1 && priv->dp_out_buf_len < DIGI_OUT_BUF_SIZE ) { + priv->dp_out_buf[priv->dp_out_buf_len++] + = *(from_user ? user_buf : buf); + new_len = 1; } else { new_len = 0; } @@ -1393,7 +1401,9 @@ /* also queue up a wakeup at scheduler time, in case we */ /* lost the race in write_chan(). */ - queue_task( &priv->dp_wakeup_task, &tq_scheduler ); + MOD_INC_USE_COUNT; + if (schedule_task(&priv->dp_wakeup_task) == 0) + MOD_DEC_USE_COUNT; spin_unlock( &priv->dp_port_lock ); @@ -2052,6 +2062,8 @@ { usb_serial_register (&digi_acceleport_2_device); usb_serial_register (&digi_acceleport_4_device); + info(DRIVER_VERSION " " DRIVER_AUTHOR); + info(DRIVER_DESC); return 0; } @@ -2067,6 +2079,9 @@ module_exit(digi_exit); -MODULE_AUTHOR("Peter Berger , Al Borchers "); -MODULE_DESCRIPTION("Digi AccelePort USB-2/USB-4 Serial Converter driver"); +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); + +MODULE_PARM(debug, "i"); +MODULE_PARM_DESC(debug, "Debug enabled or not"); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/empeg.c linux.20p6/drivers/usb/serial/empeg.c --- linux.vanilla/drivers/usb/serial/empeg.c Sun Mar 25 17:37:37 2001 +++ linux.20p6/drivers/usb/serial/empeg.c Mon Jun 18 08:07:43 2001 @@ -13,6 +13,9 @@ * * See Documentation/usb/usb-serial.txt for more information on using this driver * + * (04/08/2001) gb + * Identify version on module load. + * * (01/22/2001) gb * Added write_room() and chars_in_buffer() support. * @@ -55,15 +58,23 @@ #include #include #include +#include + #ifdef CONFIG_USB_SERIAL_DEBUG - #define DEBUG + static int debug = 1; #else - #undef DEBUG + static int debug; #endif -#include #include "usb-serial.h" +/* + * Version Information + */ +#define DRIVER_VERSION "v1.0.0" +#define DRIVER_AUTHOR "Greg Kroah-Hartman , Gary Brubaker " +#define DRIVER_DESC "USB Empeg Mark I/II Driver" + #define EMPEG_VENDOR_ID 0x084f #define EMPEG_PRODUCT_ID 0x0001 @@ -665,6 +676,9 @@ } } + info(DRIVER_VERSION " " DRIVER_AUTHOR); + info(DRIVER_DESC); + return 0; } @@ -699,5 +713,9 @@ module_init(empeg_init); module_exit(empeg_exit); -MODULE_AUTHOR("Gary Brubaker "); -MODULE_DESCRIPTION("USB Empeg Mark I/II Driver"); +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); + +MODULE_PARM(debug, "i"); +MODULE_PARM_DESC(debug, "Debug enabled or not"); + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/ftdi_sio.c linux.20p6/drivers/usb/serial/ftdi_sio.c --- linux.vanilla/drivers/usb/serial/ftdi_sio.c Sun Mar 25 17:37:37 2001 +++ linux.20p6/drivers/usb/serial/ftdi_sio.c Mon Jun 18 08:08:12 2001 @@ -14,7 +14,22 @@ * * See http://reality.sgi.com/bryder_wellington/ftdi_sio for upto date testing info * and extra documentation + * + * (23/May/2001) Bill Ryder + * Added runtime debug patch (thanx Tyson D Sawyer). + * Cleaned up comments for 8U232 + * Added parity, framing and overrun error handling + * Added receive break handling. + * + * (04/08/2001) gb + * Identify version on module load. * + * (18/March/2001) Bill Ryder + * (Not released) + * Added send break handling. (requires kernel patch too) + * Fixed 8U232AM hardware RTS/CTS etc status reporting. + * Added flipbuf fix copied from generic device + * * (12/3/2000) Bill Ryder * Added support for 8U232AM device. * Moved PID and VIDs into header file only. @@ -70,31 +85,35 @@ #include #include #include +#include #include #include -#include #include #include +#include #ifdef CONFIG_USB_SERIAL_DEBUG - #define DEBUG + static int debug = 1; #else - #undef DEBUG + static int debug; #endif -#include #include "usb-serial.h" - #include "ftdi_sio.h" +/* + * Version Information + */ +#define DRIVER_VERSION "v1.1.0" +#define DRIVER_AUTHOR "Greg Kroah-Hartman , Bill Ryder " +#define DRIVER_DESC "USB FTDI RS232 Converters Driver" + struct ftdi_private { ftdi_type_t ftdi_type; - char last_status_byte; /* device sends this every 40ms when open */ - - + __u16 last_set_data_urb_value ; /* the last data state set - needed for doing a break */ }; /* function prototypes for a FTDI serial converter */ static int ftdi_sio_startup (struct usb_serial *serial); @@ -107,6 +126,10 @@ static void ftdi_sio_read_bulk_callback (struct urb *urb); static void ftdi_sio_set_termios (struct usb_serial_port *port, struct termios * old); static int ftdi_sio_ioctl (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg); +static void ftdi_sio_break_ctl (struct usb_serial_port *port, int break_state ); + +/* Should rename most ftdi_sio's to ftdi_ now since there are two devices + which share common code */ /* All of the device info needed for the FTDI SIO serial converter */ static __u16 ftdi_vendor_id = FTDI_VID; @@ -130,6 +153,7 @@ write_bulk_callback: ftdi_sio_write_bulk_callback, ioctl: ftdi_sio_ioctl, set_termios: ftdi_sio_set_termios, + break_ctl: ftdi_sio_break_ctl, startup: ftdi_sio_startup, shutdown: ftdi_sio_shutdown, }; @@ -152,6 +176,7 @@ write_bulk_callback: ftdi_sio_write_bulk_callback, ioctl: ftdi_sio_ioctl, set_termios: ftdi_sio_set_termios, + break_ctl: ftdi_sio_break_ctl, startup: ftdi_8U232AM_startup, shutdown: ftdi_sio_shutdown, }; @@ -269,7 +294,8 @@ spin_unlock_irqrestore (&port->port_lock, flags); - /* do not allow a task to be queued to deliver received data */ + /* This will push the characters through immediately rather + than queue a task to deliver them */ port->tty->low_latency = 1; /* No error checking for this (will get errors later anyway) */ @@ -498,9 +524,9 @@ static void ftdi_sio_read_bulk_callback (struct urb *urb) { /* ftdi_sio_serial_buld_callback */ struct usb_serial_port *port = (struct usb_serial_port *)urb->context; - struct ftdi_private *priv = (struct ftdi_private *)port->private; struct usb_serial *serial; struct tty_struct *tty = port->tty ; + char error_flag; unsigned char *data = urb->transfer_buffer; const int data_offset = 2; @@ -527,23 +553,76 @@ if (urb->actual_length > 2) { usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data); } else { - dbg("Just status"); + dbg("Just status 0o%03o0o%03o",data[0],data[1]); } - priv->last_status_byte = data[0]; /* this has modem control lines */ /* TO DO -- check for hung up line and handle appropriately: */ /* send hangup */ /* See acm.c - you do a tty_hangup - eg tty_hangup(tty) */ /* if CD is dropped and the line is not CLOCAL then we should hangup */ - + /* Handle errors and break */ + error_flag = TTY_NORMAL; + /* Although the device uses a bitmask and hence can have multiple */ + /* errors on a packet - the order here sets the priority the */ + /* error is returned to the tty layer */ + + if ( data[1] & FTDI_RS_OE ) { + error_flag = TTY_OVERRUN; + dbg("OVERRRUN error"); + } + if ( data[1] & FTDI_RS_BI ) { + error_flag = TTY_BREAK; + dbg("BREAK received"); + } + if ( data[1] & FTDI_RS_PE ) { + error_flag = TTY_PARITY; + dbg("PARITY error"); + } + if ( data[1] & FTDI_RS_FE ) { + error_flag = TTY_FRAME; + dbg("FRAMING error"); + } if (urb->actual_length > data_offset) { + for (i = data_offset ; i < urb->actual_length ; ++i) { - tty_insert_flip_char(tty, data[i], 0); - } + /* have to make sure we don't overflow the buffer + with tty_insert_flip_char's */ + if(tty->flip.count >= TTY_FLIPBUF_SIZE) { + tty_flip_buffer_push(tty); + } + /* Note that the error flag is duplicated for + every character received since we don't know + which character it applied to */ + tty_insert_flip_char(tty, data[i], error_flag); + } tty_flip_buffer_push(tty); + + + } + +#ifdef NOT_CORRECT_BUT_KEEPING_IT_FOR_NOW + /* if a parity error is detected you get status packets forever + until a character is sent without a parity error. + This doesn't work well since the application receives a never + ending stream of bad data - even though new data hasn't been sent. + Therefore I (bill) have taken this out. + However - this might make sense for framing errors and so on + so I am leaving the code in for now. + */ + else { + if (error_flag != TTY_NORMAL){ + dbg("error_flag is not normal"); + /* In this case it is just status - if that is an error send a bad character */ + if(tty->flip.count >= TTY_FLIPBUF_SIZE) { + tty_flip_buffer_push(tty); + } + tty_insert_flip_char(tty, 0xff, error_flag); + tty_flip_buffer_push(tty); + } } +#endif /* Continue trying to always read */ FILL_BULK_URB(urb, serial->dev, @@ -605,6 +684,38 @@ return(urb_value); } +static void ftdi_sio_break_ctl( struct usb_serial_port *port, int break_state ) +{ + struct usb_serial *serial = port->serial; + struct ftdi_private *priv = (struct ftdi_private *)port->private; + __u16 urb_value = 0; + char buf[1]; + + /* break_state = -1 to turn on break, and 0 to turn off break */ + /* see drivers/char/tty_io.c to see it used */ + /* last_set_data_urb_value NEVER has the break bit set in it */ + + if (break_state) { + urb_value = priv->last_set_data_urb_value | FTDI_SIO_SET_BREAK; + } else { + urb_value = priv->last_set_data_urb_value; + } + + + if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), + FTDI_SIO_SET_DATA_REQUEST, + FTDI_SIO_SET_DATA_REQUEST_TYPE, + urb_value , 0, + buf, 0, WDR_TIMEOUT) < 0) { + err(__FUNCTION__ " FAILED to enable/disable break state (state was %d)",break_state); + } + + dbg(__FUNCTION__ " break state is %d - urb is %d",break_state, urb_value); + +} + + + /* As I understand this - old_termios contains the original termios settings */ /* and tty->termios contains the new setting to be used */ /* */ @@ -648,6 +759,11 @@ err("CSIZE was set but not CS5-CS8"); } } + + /* This is needed by the break command since it uses the same command - but is + * or'ed with this value */ + priv->last_set_data_urb_value = urb_value; + if (usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), FTDI_SIO_SET_DATA_REQUEST, FTDI_SIO_SET_DATA_REQUEST_TYPE, @@ -721,7 +837,7 @@ struct usb_serial *serial = port->serial; struct ftdi_private *priv = (struct ftdi_private *)port->private; __u16 urb_value=0; /* Will hold the new flags */ - char buf[1]; + char buf[2]; int ret, mask; dbg(__FUNCTION__ " cmd 0x%04x", cmd); @@ -731,12 +847,7 @@ case TIOCMGET: dbg(__FUNCTION__ " TIOCMGET"); - /* The MODEM_STATUS_REQUEST works for the sio but not the 232 */ if (priv->ftdi_type == sio){ - /* TO DECIDE - use the 40ms status packets or not? */ - /* PRO: No need to send urb */ - /* CON: Could be 40ms out of date */ - /* Request the status from the device */ if ((ret = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), @@ -749,8 +860,18 @@ return(ret); } } else { - /* This gets updated every 40ms - so just copy it in */ - buf[0] = priv->last_status_byte; + /* the 8U232AM returns a two byte value (the sio is a 1 byte value) - in the same + format as the data returned from the in point */ + if ((ret = usb_control_msg(serial->dev, + usb_rcvctrlpipe(serial->dev, 0), + FTDI_SIO_GET_MODEM_STATUS_REQUEST, + FTDI_SIO_GET_MODEM_STATUS_REQUEST_TYPE, + 0, 0, + buf, 2, WDR_TIMEOUT)) < 0 ) { + err(__FUNCTION__ " Could not get modem status of device - err: %d", + ret); + return(ret); + } } return put_user((buf[0] & FTDI_SIO_DSR_MASK ? TIOCM_DSR : 0) | @@ -841,6 +962,8 @@ dbg(__FUNCTION__); usb_serial_register (&ftdi_sio_device); usb_serial_register (&ftdi_8U232AM_device); + info(DRIVER_VERSION " " DRIVER_AUTHOR); + info(DRIVER_DESC); return 0; } @@ -856,5 +979,9 @@ module_init(ftdi_sio_init); module_exit(ftdi_sio_exit); -MODULE_AUTHOR("Greg Kroah-Hartman , Bill Ryder "); -MODULE_DESCRIPTION("USB FTDI RS232 converters driver"); +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); + +MODULE_PARM(debug, "i"); +MODULE_PARM_DESC(debug, "Debug enabled or not"); + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/ftdi_sio.h linux.20p6/drivers/usb/serial/ftdi_sio.h --- linux.vanilla/drivers/usb/serial/ftdi_sio.h Sun Mar 25 17:37:37 2001 +++ linux.20p6/drivers/usb/serial/ftdi_sio.h Mon Jun 18 08:08:12 2001 @@ -146,7 +146,7 @@ #define FTDI_SIO_SET_DATA_STOP_BITS_1 (0x0 << 11 ) #define FTDI_SIO_SET_DATA_STOP_BITS_15 (0x1 << 11 ) #define FTDI_SIO_SET_DATA_STOP_BITS_2 (0x2 << 11 ) - +#define FTDI_SIO_SET_BREAK (0x1 << 14) /* FTDI_SIO_SET_DATA */ /* @@ -170,7 +170,10 @@ * 0 = 1 * 1 = 1.5 * 2 = 2 - * B14..15 Reserved + * B14 + * 1 = TX ON (break) + * 0 = TX OFF (normal state) + * B15 Reserved * */ @@ -434,6 +437,17 @@ * B6 Transmitter Empty (TEMT) * B7 Error in RCVR FIFO * + */ +#define FTDI_RS_DR 1 +#define FTDI_RS_OE (1<<1) +#define FTDI_RS_PE (1<<2) +#define FTDI_RS_FE (1<<3) +#define FTDI_RS_BI (1<<4) +#define FTDI_RS_THRE (1<<5) +#define FTDI_RS_TEMT (1<<6) +#define FTDI_RS_FIFO (1<<7) + +/* * OUT Endpoint * * This device reserves the first bytes of data on this endpoint contain the length diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/io_16654.h linux.20p6/drivers/usb/serial/io_16654.h --- linux.vanilla/drivers/usb/serial/io_16654.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/usb/serial/io_16654.h Mon Jun 18 08:11:10 2001 @@ -0,0 +1,195 @@ +/************************************************************************ + * + * 16654.H Definitions for 16C654 UART used on EdgePorts + * + * Copyright (c) 1998 Inside Out Networks, Inc. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + ************************************************************************/ + +#if !defined(_16654_H) +#define _16654_H + +/************************************************************************ + * + * D e f i n e s / T y p e d e f s + * + ************************************************************************/ + + // + // UART register numbers + // Numbers 0-7 are passed to the Edgeport directly. Numbers 8 and + // above are used internally to indicate that we must enable access + // to them via LCR bit 0x80 or LCR = 0xBF. + // The register number sent to the Edgeport is then (x & 0x7). + // + // Driver must not access registers that affect operation of the + // the EdgePort firmware -- that includes THR, RHR, IER, FCR. + + +#define THR 0 // ! Transmit Holding Register (Write) +#define RDR 0 // ! Receive Holding Register (Read) +#define IER 1 // ! Interrupt Enable Register +#define FCR 2 // ! Fifo Control Register (Write) +#define ISR 2 // Interrupt Status Register (Read) +#define LCR 3 // Line Control Register +#define MCR 4 // Modem Control Register +#define LSR 5 // Line Status Register +#define MSR 6 // Modem Status Register +#define SPR 7 // ScratchPad Register +#define DLL 8 // Bank2[ 0 ] Divisor Latch LSB +#define DLM 9 // Bank2[ 1 ] Divisor Latch MSB +#define EFR 10 // Bank2[ 2 ] Extended Function Register +//efine unused 11 // Bank2[ 3 ] +#define XON1 12 // Bank2[ 4 ] Xon-1 +#define XON2 13 // Bank2[ 5 ] Xon-2 +#define XOFF1 14 // Bank2[ 6 ] Xoff-1 +#define XOFF2 15 // Bank2[ 7 ] Xoff-2 + +#define NUM_16654_REGS 16 + +#define IS_REG_2ND_BANK(x) ((x) >= 8) + + // + // Bit definitions for each register + // + +#define IER_RX 0x01 // Enable receive interrupt +#define IER_TX 0x02 // Enable transmit interrupt +#define IER_RXS 0x04 // Enable receive status interrupt +#define IER_MDM 0x08 // Enable modem status interrupt +#define IER_SLEEP 0x10 // Enable sleep mode +#define IER_XOFF 0x20 // Enable s/w flow control (XOFF) interrupt +#define IER_RTS 0x40 // Enable RTS interrupt +#define IER_CTS 0x80 // Enable CTS interrupt +#define IER_ENABLE_ALL 0xFF // Enable all ints + + +#define FCR_FIFO_EN 0x01 // Enable FIFOs +#define FCR_RXCLR 0x02 // Reset Rx FIFO +#define FCR_TXCLR 0x04 // Reset Tx FIFO +#define FCR_DMA_BLK 0x08 // Enable DMA block mode +#define FCR_TX_LEVEL_MASK 0x30 // Mask for Tx FIFO Level +#define FCR_TX_LEVEL_8 0x00 // Tx FIFO Level = 8 bytes +#define FCR_TX_LEVEL_16 0x10 // Tx FIFO Level = 16 bytes +#define FCR_TX_LEVEL_32 0x20 // Tx FIFO Level = 32 bytes +#define FCR_TX_LEVEL_56 0x30 // Tx FIFO Level = 56 bytes +#define FCR_RX_LEVEL_MASK 0xC0 // Mask for Rx FIFO Level +#define FCR_RX_LEVEL_8 0x00 // Rx FIFO Level = 8 bytes +#define FCR_RX_LEVEL_16 0x40 // Rx FIFO Level = 16 bytes +#define FCR_RX_LEVEL_56 0x80 // Rx FIFO Level = 56 bytes +#define FCR_RX_LEVEL_60 0xC0 // Rx FIFO Level = 60 bytes + + +#define ISR_INT_MDM_STATUS 0x00 // Modem status int pending +#define ISR_INT_NONE 0x01 // No interrupt pending +#define ISR_INT_TXRDY 0x02 // Tx ready int pending +#define ISR_INT_RXRDY 0x04 // Rx ready int pending +#define ISR_INT_LINE_STATUS 0x06 // Line status int pending +#define ISR_INT_RX_TIMEOUT 0x0C // Rx timeout int pending +#define ISR_INT_RX_XOFF 0x10 // Rx Xoff int pending +#define ISR_INT_RTS_CTS 0x20 // RTS/CTS change int pending +#define ISR_FIFO_ENABLED 0xC0 // Bits set if FIFOs enabled +#define ISR_INT_BITS_MASK 0x3E // Mask to isolate valid int causes + + +#define LCR_BITS_5 0x00 // 5 bits/char +#define LCR_BITS_6 0x01 // 6 bits/char +#define LCR_BITS_7 0x02 // 7 bits/char +#define LCR_BITS_8 0x03 // 8 bits/char +#define LCR_BITS_MASK 0x03 // Mask for bits/char field + +#define LCR_STOP_1 0x00 // 1 stop bit +#define LCR_STOP_1_5 0x04 // 1.5 stop bits (if 5 bits/char) +#define LCR_STOP_2 0x04 // 2 stop bits (if 6-8 bits/char) +#define LCR_STOP_MASK 0x04 // Mask for stop bits field + +#define LCR_PAR_NONE 0x00 // No parity +#define LCR_PAR_ODD 0x08 // Odd parity +#define LCR_PAR_EVEN 0x18 // Even parity +#define LCR_PAR_MARK 0x28 // Force parity bit to 1 +#define LCR_PAR_SPACE 0x38 // Force parity bit to 0 +#define LCR_PAR_MASK 0x38 // Mask for parity field + +#define LCR_SET_BREAK 0x40 // Set Break condition +#define LCR_DL_ENABLE 0x80 // Enable access to divisor latch + +#define LCR_ACCESS_EFR 0xBF // Load this value to access DLL,DLM, + // and also the '654-only registers + // EFR, XON1, XON2, XOFF1, XOFF2 + + +#define MCR_DTR 0x01 // Assert DTR +#define MCR_RTS 0x02 // Assert RTS +#define MCR_OUT1 0x04 // Loopback only: Sets state of RI +#define MCR_MASTER_IE 0x08 // Enable interrupt outputs +#define MCR_LOOPBACK 0x10 // Set internal (digital) loopback mode +#define MCR_XON_ANY 0x20 // Enable any char to exit XOFF mode +#define MCR_IR_ENABLE 0x40 // Enable IrDA functions +#define MCR_BRG_DIV_4 0x80 // Divide baud rate clk by /4 instead of /1 + + +#define LSR_RX_AVAIL 0x01 // Rx data available +#define LSR_OVER_ERR 0x02 // Rx overrun +#define LSR_PAR_ERR 0x04 // Rx parity error +#define LSR_FRM_ERR 0x08 // Rx framing error +#define LSR_BREAK 0x10 // Rx break condition detected +#define LSR_TX_EMPTY 0x20 // Tx Fifo empty +#define LSR_TX_ALL_EMPTY 0x40 // Tx Fifo and shift register empty +#define LSR_FIFO_ERR 0x80 // Rx Fifo contains at least 1 erred char + + +#define MSR_DELTA_CTS 0x01 // CTS changed from last read +#define MSR_DELTA_DSR 0x02 // DSR changed from last read +#define MSR_DELTA_RI 0x04 // RI changed from 0 -> 1 +#define MSR_DELTA_CD 0x08 // CD changed from last read +#define MSR_CTS 0x10 // Current state of CTS +#define MSR_DSR 0x20 // Current state of DSR +#define MSR_RI 0x40 // Current state of RI +#define MSR_CD 0x80 // Current state of CD + + + + // Tx Rx + //------------------------------- +#define EFR_SWFC_NONE 0x00 // None None +#define EFR_SWFC_RX1 0x02 // None XOFF1 +#define EFR_SWFC_RX2 0x01 // None XOFF2 +#define EFR_SWFC_RX12 0x03 // None XOFF1 & XOFF2 +#define EFR_SWFC_TX1 0x08 // XOFF1 None +#define EFR_SWFC_TX1_RX1 0x0a // XOFF1 XOFF1 +#define EFR_SWFC_TX1_RX2 0x09 // XOFF1 XOFF2 +#define EFR_SWFC_TX1_RX12 0x0b // XOFF1 XOFF1 & XOFF2 +#define EFR_SWFC_TX2 0x04 // XOFF2 None +#define EFR_SWFC_TX2_RX1 0x06 // XOFF2 XOFF1 +#define EFR_SWFC_TX2_RX2 0x05 // XOFF2 XOFF2 +#define EFR_SWFC_TX2_RX12 0x07 // XOFF2 XOFF1 & XOFF2 +#define EFR_SWFC_TX12 0x0c // XOFF1 & XOFF2 None +#define EFR_SWFC_TX12_RX1 0x0e // XOFF1 & XOFF2 XOFF1 +#define EFR_SWFC_TX12_RX2 0x0d // XOFF1 & XOFF2 XOFF2 +#define EFR_SWFC_TX12_RX12 0x0f // XOFF1 & XOFF2 XOFF1 & XOFF2 + +#define EFR_TX_FC_MASK 0x0c // Mask to isolate Rx flow control +#define EFR_TX_FC_NONE 0x00 // No Tx Xon/Xoff flow control +#define EFR_TX_FC_X1 0x08 // Transmit Xon1/Xoff1 +#define EFR_TX_FC_X2 0x04 // Transmit Xon2/Xoff2 +#define EFR_TX_FC_X1_2 0x0c // Transmit Xon1&2/Xoff1&2 + +#define EFR_RX_FC_MASK 0x03 // Mask to isolate Rx flow control +#define EFR_RX_FC_NONE 0x00 // No Rx Xon/Xoff flow control +#define EFR_RX_FC_X1 0x02 // Receiver compares Xon1/Xoff1 +#define EFR_RX_FC_X2 0x01 // Receiver compares Xon2/Xoff2 +#define EFR_RX_FC_X1_2 0x03 // Receiver compares Xon1&2/Xoff1&2 + + +#define EFR_SWFC_MASK 0x0F // Mask for software flow control field +#define EFR_ENABLE_16654 0x10 // Enable 16C654 features +#define EFR_SPEC_DETECT 0x20 // Enable special character detect interrupt +#define EFR_AUTO_RTS 0x40 // Use RTS for Rx flow control +#define EFR_AUTO_CTS 0x80 // Use CTS for Tx flow control + +#endif // if !defined(_16654_H) + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/io_edgeport.c linux.20p6/drivers/usb/serial/io_edgeport.c --- linux.vanilla/drivers/usb/serial/io_edgeport.c Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/usb/serial/io_edgeport.c Mon Jun 18 08:11:10 2001 @@ -0,0 +1,3080 @@ +/* + * Edgeport USB Serial Converter driver + * + * Copyright(c) 2000 Inside Out Networks, All rights reserved. + * Copyright(c) 2001 Greg Kroah-Hartman + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * Supports the following devices: + * Edgeport/4 + * Edgeport/4t + * Edgeport/2 + * Edgeport/4i + * Edgeport/2i + * Edgeport/421 + * Edgeport/21 + * Rapidport/4 + * Edgeport/8 + * Edgeport/2D8 + * Edgeport/4D8 + * Edgeport/8i + * + * Version history: + * + * (04/08/2001) gb + * - Identify version on module load. + * + * 2.0 2001_03_05 greg kroah-hartman + * - reworked entire driver to fit properly in with the other usb-serial + * drivers. Occasional oopses still happen, but it's a good start. + * + * 1.2.3 (02/23/2001) greg kroah-hartman + * - changed device table to work properly for 2.4.x final format. + * - fixed problem with dropping data at high data rates. + * + * 1.2.2 (11/27/2000) greg kroah-hartman + * - cleaned up more NTisms. + * - Added device table for 2.4.0-test11 + * + * 1.2.1 (11/08/2000) greg kroah-hartman + * - Started to clean up NTisms. + * - Fixed problem with dev field of urb for kernels >= 2.4.0-test9 + * + * 1.2 (10/17/2000) David Iacovelli + * Remove all EPIC code and GPL source + * Fix RELEVANT_IFLAG macro to include flow control + * changes port configuration changes. + * Fix redefinition of SERIAL_MAGIC + * Change all timeout values to 5 seconds + * Tried to fix the UHCI multiple urb submission, but failed miserably. + * it seems to work fine with OHCI. + * ( Greg take a look at the #if 0 at end of WriteCmdUsb() we must + * find a way to work arount this UHCI bug ) + * + * 1.1 (10/11/2000) David Iacovelli + * Fix XON/XOFF flow control to support both IXON and IXOFF + * + * 0.9.27 (06/30/2000) David Iacovelli + * Added transmit queue and now allocate urb for command writes. + * + * 0.9.26 (06/29/2000) David Iacovelli + * Add support for 80251 based edgeport + * + * 0.9.25 (06/27/2000) David Iacovelli + * Do not close the port if it has multiple opens. + * + * 0.9.24 (05/26/2000) David Iacovelli + * Add IOCTLs to support RXTX and JAVA POS + * and first cut at running BlackBox Demo + * + * 0.9.23 (05/24/2000) David Iacovelli + * Add IOCTLs to support RXTX and JAVA POS + * + * 0.9.22 (05/23/2000) David Iacovelli + * fixed bug in enumeration. If epconfig turns on mapping by + * path after a device is already plugged in, we now update + * the mapping correctly + * + * 0.9.21 (05/16/2000) David Iacovelli + * Added BlockUntilChaseResp() to also wait for txcredits + * Updated the way we allocate and handle write URBs + * Add debug code to dump buffers + * + * 0.9.20 (05/01/2000) David Iacovelli + * change driver to use usb/tts/ + * + * 0.9.19 (05/01/2000) David Iacovelli + * Update code to compile if DEBUG is off + * + * 0.9.18 (04/28/2000) David Iacovelli + * cleanup and test tty_register with devfs + * + * 0.9.17 (04/27/2000) greg kroah-hartman + * changed tty_register around to be like the way it + * was before, but now it works properly with devfs. + * + * 0.9.16 (04/26/2000) david iacovelli + * Fixed bug in GetProductInfo() + * + * 0.9.15 (04/25/2000) david iacovelli + * Updated enumeration + * + * 0.9.14 (04/24/2000) david iacovelli + * Removed all config/status IOCTLS and + * converted to using /proc/edgeport + * still playing with devfs + * + * 0.9.13 (04/24/2000) david iacovelli + * Removed configuration based on ttyUSB0 + * Added support for configuration using /prod/edgeport + * first attempt at using devfs (not working yet!) + * Added IOCTL to GetProductInfo() + * Added support for custom baud rates + * Add support for random port numbers + * + * 0.9.12 (04/18/2000) david iacovelli + * added additional configuration IOCTLs + * use ttyUSB0 for configuration + * + * 0.9.11 (04/17/2000) greg kroah-hartman + * fixed module initialization race conditions. + * made all urbs dynamically allocated. + * made driver devfs compatible. now it only registers the tty device + * when the device is actually plugged in. + * + * 0.9.10 (04/13/2000) greg kroah-hartman + * added proc interface framework. + * + * 0.9.9 (04/13/2000) david iacovelli + * added enumeration code and ioctls to configure the device + * + * 0.9.8 (04/12/2000) david iacovelli + * Change interrupt read start when device is plugged in + * and stop when device is removed + * process interrupt reads when all ports are closed + * (keep value of rxBytesAvail consistent with the edgeport) + * set the USB_BULK_QUEUE flag so that we can shove a bunch + * of urbs at once down the pipe + * + * 0.9.7 (04/10/2000) david iacovelli + * start to add enumeration code. + * generate serial number for epic devices + * add support for kdb + * + * 0.9.6 (03/30/2000) david iacovelli + * add IOCTL to get string, manufacture, and boot descriptors + * + * 0.9.5 (03/14/2000) greg kroah-hartman + * more error checking added to SerialOpen to try to fix UHCI open problem + * + * 0.9.4 (03/09/2000) greg kroah-hartman + * added more error checking to handle oops when data is hanging + * around and tty is abruptly closed. + * + * 0.9.3 (03/09/2000) david iacovelli + * Add epic support for xon/xoff chars + * play with performance + * + * 0.9.2 (03/08/2000) greg kroah-hartman + * changed most "info" calls to "dbg" + * implemented flow control properly in the termios call + * + * 0.9.1 (03/08/2000) david iacovelli + * added EPIC support + * enabled bootloader update + * + * 0.9 (03/08/2000) greg kroah-hartman + * Release to IO networks. + * Integrated changes that David made + * made getting urbs for writing SMP safe + * + * 0.8 (03/07/2000) greg kroah-hartman + * Release to IO networks. + * Fixed problems that were seen in code by David. + * Now both Edgeport/4 and Edgeport/2 works properly. + * Changed most of the functions to use port instead of serial. + * + * 0.7 (02/27/2000) greg kroah-hartman + * Milestone 3 release. + * Release to IO Networks + * ioctl for waiting on line change implemented. + * ioctl for getting statistics implemented. + * multiport support working. + * lsr and msr registers are now handled properly. + * change break now hooked up and working. + * support for all known Edgeport devices. + * + * 0.6 (02/22/2000) greg kroah-hartman + * Release to IO networks. + * CHASE is implemented correctly when port is closed. + * SerialOpen now blocks correctly until port is fully opened. + * + * 0.5 (02/20/2000) greg kroah-hartman + * Release to IO networks. + * Known problems: + * modem status register changes are not sent on to the user + * CHASE is not implemented when the port is closed. + * + * 0.4 (02/16/2000) greg kroah-hartman + * Second cut at the CeBit demo. + * Doesn't leak memory on every write to the port + * Still small leaks on startup. + * Added support for Edgeport/2 and Edgeport/8 + * + * 0.3 (02/15/2000) greg kroah-hartman + * CeBit demo release. + * Force the line settings to 4800, 8, 1, e for the demo. + * Warning! This version leaks memory like crazy! + * + * 0.2 (01/30/2000) greg kroah-hartman + * Milestone 1 release. + * Device is found by USB subsystem, enumerated, fimware is downloaded + * and the descriptors are printed to the debug log, config is set, and + * green light starts to blink. Open port works, and data can be sent + * and received at the default settings of the UART. Loopback connector + * and debug log confirms this. + * + * 0.1 (01/23/2000) greg kroah-hartman + * Initial release to help IO Networks try to set up their test system. + * Edgeport4 is recognized, firmware is downloaded, config is set so + * device blinks green light every 3 sec. Port is bound, but opening, + * closing, and sending data do not work properly. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_USB_SERIAL_DEBUG + static int debug = 1; +#else + static int debug; +#endif + +#include "usb-serial.h" + +#include "io_edgeport.h" +#include "io_ionsp.h" /* info for the iosp messages */ +#include "io_16654.h" /* 16654 UART defines */ + +/* + * Version Information + */ +#define DRIVER_VERSION "v2.0.0" +#define DRIVER_AUTHOR "Greg Kroah-Hartman and David Iacovelli" +#define DRIVER_DESC "Edgeport USB Serial Driver" + +/* First, the latest boot code - for first generation edgeports */ +#define IMAGE_ARRAY_NAME BootCodeImage_GEN1 +#define IMAGE_VERSION_NAME BootCodeImageVersion_GEN1 +#include "io_fw_boot.h" /* the bootloader firmware to download to a device, if it needs it */ + +/* for second generation edgeports */ +#define IMAGE_ARRAY_NAME BootCodeImage_GEN2 +#define IMAGE_VERSION_NAME BootCodeImageVersion_GEN2 +#include "io_fw_boot2.h" /* the bootloader firmware to download to a device, if it needs it */ + +/* Then finally the main run-time operational code - for first generation edgeports */ +#define IMAGE_ARRAY_NAME OperationalCodeImage_GEN1 +#define IMAGE_VERSION_NAME OperationalCodeImageVersion_GEN1 +#include "io_fw_down.h" /* Define array OperationalCodeImage[] */ + +/* for second generation edgeports */ +#define IMAGE_ARRAY_NAME OperationalCodeImage_GEN2 +#define IMAGE_VERSION_NAME OperationalCodeImageVersion_GEN2 +#include "io_fw_down2.h" /* Define array OperationalCodeImage[] */ + + +#define MAX_NAME_LEN 64 + + +#define CHASE_TIMEOUT (5*HZ) /* 5 seconds */ +#define OPEN_TIMEOUT (5*HZ) /* 5 seconds */ +#define COMMAND_TIMEOUT (5*HZ) /* 5 seconds */ + +#ifndef SERIAL_MAGIC + #define SERIAL_MAGIC 0x6702 +#endif +#define PORT_MAGIC 0x7301 + + +/* receive port state */ +enum RXSTATE { + EXPECT_HDR1 = 0, /* Expect header byte 1 */ + EXPECT_HDR2 = 1, /* Expect header byte 2 */ + EXPECT_DATA = 2, /* Expect 'RxBytesRemaining' data */ + EXPECT_HDR3 = 3, /* Expect header byte 3 (for status hdrs only) */ +}; + + +/* the info for all of the devices that this driver supports */ +int EdgeportDevices[] = EDGEPORT_DEVICE_IDS; +#define NUM_EDGEPORT_DEVICES (sizeof(EdgeportDevices) / sizeof(int)) + + +/* Transmit Fifo + * This Transmit queue is an extension of the edgeport Rx buffer. + * The maximum amount of data buffered in both the edgeport + * Rx buffer (maxTxCredits) and this buffer will never exceed maxTxCredits. + */ +struct TxFifo { + unsigned int head; /* index to head pointer (write) */ + unsigned int tail; /* index to tail pointer (read) */ + unsigned int count; /* Bytes in queue */ + unsigned int size; /* Max size of queue (equal to Max number of TxCredits) */ + unsigned char *fifo; /* allocated Buffer */ +}; + +/* This structure holds all of the local port information */ +struct edgeport_port { + __u16 txCredits; /* our current credits for this port */ + __u16 maxTxCredits; /* the max size of the port */ + + struct TxFifo txfifo; /* transmit fifo -- size will be maxTxCredits */ + struct urb *write_urb; /* write URB for this port */ + char write_in_progress; /* TRUE while a write URB is outstanding */ + + __u8 shadowLCR; /* last LCR value received */ + __u8 shadowMCR; /* last MCR value received */ + __u8 shadowMSR; /* last MSR value received */ + __u8 shadowLSR; /* last LSR value received */ + __u8 shadowXonChar; /* last value set as XON char in Edgeport */ + __u8 shadowXoffChar; /* last value set as XOFF char in Edgeport */ + __u8 validDataMask; + __u32 baudRate; + + char open; + char openPending; + char commandPending; + char closePending; + char chaseResponsePending; + + wait_queue_head_t wait_chase; /* for handling sleeping while waiting for chase to finish */ + wait_queue_head_t wait_open; /* for handling sleeping while waiting for open to finish */ + wait_queue_head_t wait_command; /* for handling sleeping while waiting for command to finish */ + wait_queue_head_t delta_msr_wait; /* for handling sleeping while waiting for msr change to happen */ + + struct async_icount icount; + struct usb_serial_port *port; /* loop back to the owner of this object */ +}; + + +/* This structure holds all of the individual device information */ +struct edgeport_serial { + char name[MAX_NAME_LEN+1]; /* string name of this device */ + + EDGE_MANUF_DESCRIPTOR manuf_descriptor; /* the manufacturer descriptor */ + EDGE_BOOT_DESCRIPTOR boot_descriptor; /* the boot firmware descriptor */ + struct edgeport_product_info product_info; /* Product Info */ + + __u8 interrupt_in_endpoint; /* the interrupt endpoint handle */ + unsigned char * interrupt_in_buffer; /* the buffer we use for the interrupt endpoint */ + struct urb * interrupt_read_urb; /* our interrupt urb */ + + __u8 bulk_in_endpoint; /* the bulk in endpoint handle */ + unsigned char * bulk_in_buffer; /* the buffer we use for the bulk in endpoint */ + struct urb * read_urb; /* our bulk read urb */ + + __u8 bulk_out_endpoint; /* the bulk out endpoint handle */ + + __s16 rxBytesAvail; /* the number of bytes that we need to read from this device */ + + enum RXSTATE rxState; /* the current state of the bulk receive processor */ + __u8 rxHeader1; /* receive header byte 1 */ + __u8 rxHeader2; /* receive header byte 2 */ + __u8 rxHeader3; /* receive header byte 3 */ + __u8 rxPort; /* the port that we are currently receiving data for */ + __u8 rxStatusCode; /* the receive status code */ + __u8 rxStatusParam; /* the receive status paramater */ + __s16 rxBytesRemaining; /* the number of port bytes left to read */ + struct usb_serial *serial; /* loop back to the owner of this object */ +}; + +/* baud rate information */ +typedef struct _DIVISOR_TABLE_ENTRY { + __u32 BaudRate; + __u16 Divisor; +} DIVISOR_TABLE_ENTRY, *PDIVISOR_TABLE_ENTRY; + +// +// Define table of divisors for Rev A EdgePort/4 hardware +// These assume a 3.6864MHz crystal, the standard /16, and +// MCR.7 = 0. +// +static DIVISOR_TABLE_ENTRY DivisorTable[] = { + { 75, 3072}, + { 110, 2095}, /* 2094.545455 => 230450 => .0217 % over */ + { 134, 1713}, /* 1713.011152 => 230398.5 => .00065% under */ + { 150, 1536}, + { 300, 768}, + { 600, 384}, + { 1200, 192}, + { 1800, 128}, + { 2400, 96}, + { 4800, 48}, + { 7200, 32}, + { 9600, 24}, + { 14400, 16}, + { 19200, 12}, + { 38400, 6}, + { 57600, 4}, + { 115200, 2}, + { 230400, 1}, +}; + +/* local variables */ +static int CmdUrbs = 0; /* Number of outstanding Command Write Urbs */ + + +/* local function prototypes */ + +/* function prototypes for all URB callbacks */ +static void edge_interrupt_callback (struct urb *urb); +static void edge_bulk_in_callback (struct urb *urb); +static void edge_bulk_out_data_callback (struct urb *urb); +static void edge_bulk_out_cmd_callback (struct urb *urb); + +/* function prototypes for the usbserial callbacks */ +static int edge_open (struct usb_serial_port *port, struct file *filp); +static void edge_close (struct usb_serial_port *port, struct file *filp); +static int edge_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count); +static int edge_write_room (struct usb_serial_port *port); +static int edge_chars_in_buffer (struct usb_serial_port *port); +static void edge_throttle (struct usb_serial_port *port); +static void edge_unthrottle (struct usb_serial_port *port); +static void edge_set_termios (struct usb_serial_port *port, struct termios *old_termios); +static int edge_ioctl (struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg); +static void edge_break (struct usb_serial_port *port, int break_state); +static int edge_startup (struct usb_serial *serial); +static void edge_shutdown (struct usb_serial *serial); + + +#include "io_tables.h" /* all of the devices that this driver supports */ + + +/* function prototypes for all of our local functions */ +static int process_rcvd_data (struct edgeport_serial *edge_serial, unsigned char *buffer, __u16 bufferLength); +static void process_rcvd_status (struct edgeport_serial *edge_serial, __u8 byte2, __u8 byte3); +static void handle_new_msr (struct edgeport_port *edge_port, __u8 newMsr); +static void handle_new_lsr (struct edgeport_port *edge_port, __u8 lsrData, __u8 lsr, __u8 data); +static int send_iosp_ext_cmd (struct edgeport_port *edge_port, __u8 command, __u8 param); +static int calc_baud_rate_divisor (int baud_rate, int *divisor); +static int send_cmd_write_baud_rate (struct edgeport_port *edge_port, int baudRate); +static void change_port_settings (struct edgeport_port *edge_port, struct termios *old_termios); +static int send_cmd_write_uart_register (struct edgeport_port *edge_port, __u8 regNum, __u8 regValue); +static int write_cmd_usb (struct edgeport_port *edge_port, unsigned char *buffer, int writeLength); +static void send_more_port_data (struct edgeport_serial *edge_serial, struct edgeport_port *edge_port); + +static int sram_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data); +static int rom_read (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data); +static int rom_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data); +static void get_manufacturing_desc (struct edgeport_serial *edge_serial); +static void get_boot_desc (struct edgeport_serial *edge_serial); +static void load_application_firmware (struct edgeport_serial *edge_serial); + + +static void unicode_to_ascii (char *string, short *unicode, int unicode_size); + +static int get_string_desc (struct usb_device *dev, int Id, struct usb_string_descriptor **pRetDesc); + + + + +// ************************************************************************ +// ************************************************************************ +// ************************************************************************ +// ************************************************************************ + +// These functions should be in firmware.c + +/************************************************************************ + * * + * update_edgeport_E2PROM() Compare current versions of * + * Boot ROM and Manufacture * + * Descriptors with versions * + * embedded in this driver * + * * + ************************************************************************/ +void update_edgeport_E2PROM (struct edgeport_serial *edge_serial) +{ + __u32 BootCurVer; + __u32 BootNewVer; + __u8 BootMajorVersion; + __u8 BootMinorVersion; + __u16 BootBuildNumber; + __u8 *BootImage; + __u32 BootSize; + PEDGE_FIRMWARE_IMAGE_RECORD record; + unsigned char *firmware; + int response; + + + switch (edge_serial->product_info.iDownloadFile) { + case EDGE_DOWNLOAD_FILE_I930: + BootMajorVersion = BootCodeImageVersion_GEN1.MajorVersion; + BootMinorVersion = BootCodeImageVersion_GEN1.MinorVersion; + BootBuildNumber = BootCodeImageVersion_GEN1.BuildNumber; + BootImage = &BootCodeImage_GEN1[0]; + BootSize = sizeof( BootCodeImage_GEN1 ); + break; + + case EDGE_DOWNLOAD_FILE_80251: + BootMajorVersion = BootCodeImageVersion_GEN2.MajorVersion; + BootMinorVersion = BootCodeImageVersion_GEN2.MinorVersion; + BootBuildNumber = BootCodeImageVersion_GEN2.BuildNumber; + BootImage = &BootCodeImage_GEN2[0]; + BootSize = sizeof( BootCodeImage_GEN2 ); + break; + + default: + return; + } + + // Check Boot Image Version + BootCurVer = (edge_serial->boot_descriptor.MajorVersion << 24) + + (edge_serial->boot_descriptor.MinorVersion << 16) + + edge_serial->boot_descriptor.BuildNumber; + + BootNewVer = (BootMajorVersion << 24) + + (BootMinorVersion << 16) + + BootBuildNumber; + + dbg("Current Boot Image version %d.%d.%d", + edge_serial->boot_descriptor.MajorVersion, + edge_serial->boot_descriptor.MinorVersion, + edge_serial->boot_descriptor.BuildNumber); + + + if (BootNewVer > BootCurVer) { + dbg("**Update Boot Image from %d.%d.%d to %d.%d.%d", + edge_serial->boot_descriptor.MajorVersion, + edge_serial->boot_descriptor.MinorVersion, + edge_serial->boot_descriptor.BuildNumber, + BootMajorVersion, + BootMinorVersion, + BootBuildNumber); + + + dbg("Downloading new Boot Image"); + + firmware = BootImage; + + for (;;) { + record = (PEDGE_FIRMWARE_IMAGE_RECORD)firmware; + response = rom_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]); + if (response < 0) { + err("sram_write failed (%x, %x, %d)", record->ExtAddr, record->Addr, record->Len); + break; + } + firmware += sizeof (EDGE_FIRMWARE_IMAGE_RECORD) + record->Len; + if (firmware >= &BootImage[BootSize]) { + break; + } + } + } else { + dbg("Boot Image -- already up to date"); + } +} + + +/************************************************************************ + * * + * Get string descriptor from device * + * * + ************************************************************************/ +static int get_string (struct usb_device *dev, int Id, char *string) +{ + struct usb_string_descriptor StringDesc; + struct usb_string_descriptor *pStringDesc; + + dbg(__FUNCTION__ " - USB String ID = %d", Id ); + + if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) { + return 0; + } + + pStringDesc = kmalloc (StringDesc.bLength, GFP_KERNEL); + + if (!pStringDesc) { + return 0; + } + + if (!usb_get_descriptor(dev, USB_DT_STRING, Id, pStringDesc, StringDesc.bLength )) { + kfree(pStringDesc); + return 0; + } + + unicode_to_ascii(string, pStringDesc->wData, pStringDesc->bLength/2-1); + + kfree(pStringDesc); + return strlen(string); +} + + +/************************************************************************ + * + * Get string descriptor from device + * + ************************************************************************/ +static int get_string_desc (struct usb_device *dev, int Id, struct usb_string_descriptor **pRetDesc) +{ + struct usb_string_descriptor StringDesc; + struct usb_string_descriptor *pStringDesc; + + dbg(__FUNCTION__ " - USB String ID = %d", Id ); + + if (!usb_get_descriptor(dev, USB_DT_STRING, Id, &StringDesc, sizeof(StringDesc))) { + return 0; + } + + pStringDesc = kmalloc (StringDesc.bLength, GFP_KERNEL); + + if (!pStringDesc) { + return -1; + } + + if (!usb_get_descriptor(dev, USB_DT_STRING, Id, pStringDesc, StringDesc.bLength )) { + kfree(pStringDesc); + return -1; + } + + *pRetDesc = pStringDesc; + return 0; +} + + + + +/************************************************************************ + * * + * * + ************************************************************************/ +static void get_product_info(struct edgeport_serial *edge_serial) +{ + struct edgeport_product_info *product_info = &edge_serial->product_info; + + memset (product_info, 0, sizeof(struct edgeport_product_info)); + + product_info->ProductId = (__u16)(edge_serial->serial->dev->descriptor.idProduct & ~ION_DEVICE_ID_GENERATION_2); + product_info->NumPorts = edge_serial->manuf_descriptor.NumPorts; + product_info->ProdInfoVer = 0; + + product_info->RomSize = edge_serial->manuf_descriptor.RomSize; + product_info->RamSize = edge_serial->manuf_descriptor.RamSize; + product_info->CpuRev = edge_serial->manuf_descriptor.CpuRev; + product_info->BoardRev = edge_serial->manuf_descriptor.BoardRev; + + product_info->BootMajorVersion = edge_serial->boot_descriptor.MajorVersion; + product_info->BootMinorVersion = edge_serial->boot_descriptor.MinorVersion; + product_info->BootBuildNumber = edge_serial->boot_descriptor.BuildNumber; + + memcpy(product_info->ManufactureDescDate, edge_serial->manuf_descriptor.DescDate, sizeof(edge_serial->manuf_descriptor.DescDate)); + + // check if this is 2nd generation hardware + if (edge_serial->serial->dev->descriptor.idProduct & ION_DEVICE_ID_GENERATION_2) { + product_info->FirmwareMajorVersion = OperationalCodeImageVersion_GEN2.MajorVersion; + product_info->FirmwareMinorVersion = OperationalCodeImageVersion_GEN2.MinorVersion; + product_info->FirmwareBuildNumber = OperationalCodeImageVersion_GEN2.BuildNumber; + product_info->iDownloadFile = EDGE_DOWNLOAD_FILE_80251; + } else { + product_info->FirmwareMajorVersion = OperationalCodeImageVersion_GEN1.MajorVersion; + product_info->FirmwareMinorVersion = OperationalCodeImageVersion_GEN1.MinorVersion; + product_info->FirmwareBuildNumber = OperationalCodeImageVersion_GEN1.BuildNumber; + product_info->iDownloadFile = EDGE_DOWNLOAD_FILE_I930; + } + + // Determine Product type and set appropriate flags + switch (DEVICE_ID_FROM_USB_PRODUCT_ID(product_info->ProductId)) { + case ION_DEVICE_ID_EDGEPORT_COMPATIBLE: + case ION_DEVICE_ID_EDGEPORT_4T: + case ION_DEVICE_ID_EDGEPORT_4: + case ION_DEVICE_ID_EDGEPORT_2: + case ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU: + case ION_DEVICE_ID_EDGEPORT_8: + case ION_DEVICE_ID_EDGEPORT_421: + case ION_DEVICE_ID_EDGEPORT_21: + case ION_DEVICE_ID_EDGEPORT_2_DIN: + case ION_DEVICE_ID_EDGEPORT_4_DIN: + case ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU: + product_info->IsRS232 = 1; + break; + + case ION_DEVICE_ID_EDGEPORT_2I: // Edgeport/2 RS422/RS485 + product_info->IsRS422 = 1; + product_info->IsRS485 = 1; + break; + + case ION_DEVICE_ID_EDGEPORT_8I: // Edgeport/4 RS422 + case ION_DEVICE_ID_EDGEPORT_4I: // Edgeport/4 RS422 + product_info->IsRS422 = 1; + break; + } + + // Dump Product Info structure + dbg("**Product Information:"); + dbg(" ProductId %x", product_info->ProductId ); + dbg(" NumPorts %d", product_info->NumPorts ); + dbg(" ProdInfoVer %d", product_info->ProdInfoVer ); + dbg(" IsServer %d", product_info->IsServer); + dbg(" IsRS232 %d", product_info->IsRS232 ); + dbg(" IsRS422 %d", product_info->IsRS422 ); + dbg(" IsRS485 %d", product_info->IsRS485 ); + dbg(" RomSize %d", product_info->RomSize ); + dbg(" RamSize %d", product_info->RamSize ); + dbg(" CpuRev %x", product_info->CpuRev ); + dbg(" BoardRev %x", product_info->BoardRev); + dbg(" BootMajorVersion %d.%d.%d", product_info->BootMajorVersion, + product_info->BootMinorVersion, + product_info->BootBuildNumber); + dbg(" FirmwareMajorVersion %d.%d.%d", product_info->FirmwareMajorVersion, + product_info->FirmwareMinorVersion, + product_info->FirmwareBuildNumber); + dbg(" ManufactureDescDate %d/%d/%d", product_info->ManufactureDescDate[0], + product_info->ManufactureDescDate[1], + product_info->ManufactureDescDate[2]+1900); + dbg(" iDownloadFile 0x%x", product_info->iDownloadFile); + +} + + +/************************************************************************/ +/************************************************************************/ +/* U S B C A L L B A C K F U N C T I O N S */ +/* U S B C A L L B A C K F U N C T I O N S */ +/************************************************************************/ +/************************************************************************/ + +/***************************************************************************** + * edge_interrupt_callback + * this is the callback function for when we have received data on the + * interrupt endpoint. + *****************************************************************************/ +static void edge_interrupt_callback (struct urb *urb) +{ + struct edgeport_serial *edge_serial = (struct edgeport_serial *)urb->context; + struct edgeport_port *edge_port; + struct usb_serial_port *port; + unsigned char *data = urb->transfer_buffer; + int length = urb->actual_length; + int bytes_avail; + int position; + int txCredits; + int portNumber; + int result; + + dbg(__FUNCTION__); + + if (serial_paranoia_check (edge_serial->serial, __FUNCTION__)) { + return; + } + + if (urb->status) { + dbg(__FUNCTION__" - nonzero control read status received: %d", urb->status); + return; + } + + // process this interrupt-read even if there are no ports open + if (length) { + usb_serial_debug_data (__FILE__, __FUNCTION__, length, data); + + if (length > 1) { + bytes_avail = data[0] | (data[1] << 8); + if (bytes_avail) { + edge_serial->rxBytesAvail += bytes_avail; + dbg(__FUNCTION__" - bytes_avail = %d, rxBytesAvail %d", bytes_avail, edge_serial->rxBytesAvail); + + if ((edge_serial->rxBytesAvail > 0) && + (edge_serial->read_urb->status != -EINPROGRESS)) { + dbg(" --- Posting a read"); + + /* we have pending bytes on the bulk in pipe, send a request */ + edge_serial->read_urb->dev = edge_serial->serial->dev; + result = usb_submit_urb(edge_serial->read_urb); + if (result) { + dbg(__FUNCTION__" - usb_submit_urb(read bulk) failed with result = %d", result); + } + } + } + } + /* grab the txcredits for the ports if available */ + position = 2; + portNumber = 0; + while ((position < length) && (portNumber < edge_serial->serial->num_ports)) { + txCredits = data[position] | (data[position+1] << 8); + if (txCredits) { + port = &edge_serial->serial->port[portNumber]; + if (port_paranoia_check (port, __FUNCTION__) == 0) { + edge_port = (struct edgeport_port *)port->private; + if (edge_port->open) { + edge_port->txCredits += txCredits; + dbg(__FUNCTION__" - txcredits for port%d = %d", portNumber, edge_port->txCredits); + + /* tell the tty driver that something has changed */ + wake_up_interruptible(&edge_port->port->tty->write_wait); + + // Since we have more credit, check if more data can be sent + send_more_port_data(edge_serial, edge_port); + } + } + } + position += 2; + ++portNumber; + } + } +} + + +/***************************************************************************** + * edge_bulk_in_callback + * this is the callback function for when we have received data on the + * bulk in endpoint. + *****************************************************************************/ +static void edge_bulk_in_callback (struct urb *urb) +{ + struct edgeport_serial *edge_serial = (struct edgeport_serial *)urb->context; + unsigned char *data = urb->transfer_buffer; + int status; + __u16 raw_data_length; + + dbg(__FUNCTION__); + + if (serial_paranoia_check (edge_serial->serial, __FUNCTION__)) { + return; + } + + if (urb->status) { + dbg(__FUNCTION__" - nonzero read bulk status received: %d", urb->status); + return; + } + + if (urb->actual_length) { + raw_data_length = urb->actual_length; + + usb_serial_debug_data (__FILE__, __FUNCTION__, raw_data_length, data); + + /* decrement our rxBytes available by the number that we just got */ + edge_serial->rxBytesAvail -= raw_data_length; + + dbg(__FUNCTION__" - Received = %d, rxBytesAvail %d", raw_data_length, edge_serial->rxBytesAvail); + + process_rcvd_data (edge_serial, data, urb->actual_length); + + /* check to see if there's any more data for us to read */ + if ((edge_serial->rxBytesAvail > 0) && + (edge_serial->read_urb->status != -EINPROGRESS)) { + dbg(" --- Posting a read"); + + /* there is, so resubmit our urb */ + edge_serial->read_urb->dev = edge_serial->serial->dev; + status = usb_submit_urb(edge_serial->read_urb); + if (status) { + err(__FUNCTION__" - usb_submit_urb(read bulk) failed, status = %d", status); + } + } + } +} + + +/***************************************************************************** + * edge_bulk_out_data_callback + * this is the callback function for when we have finished sending serial data + * on the bulk out endpoint. + *****************************************************************************/ +static void edge_bulk_out_data_callback (struct urb *urb) +{ + struct edgeport_port *edge_port = (struct edgeport_port *)urb->context; + struct tty_struct *tty; + + dbg(__FUNCTION__); + + if (port_paranoia_check (edge_port->port, __FUNCTION__)) { + return; + } + + if (urb->status) { + dbg(__FUNCTION__" - nonzero write bulk status received: %d", urb->status); + } + + tty = edge_port->port->tty; + + /* let the tty driver wakeup if it has a special write_wakeup function */ + if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup) { + (tty->ldisc.write_wakeup)(tty); + } + + /* tell the tty driver that something has changed */ + wake_up_interruptible(&tty->write_wait); + + // Release the Write URB + edge_port->write_in_progress = FALSE; + + // Check if more data needs to be sent + send_more_port_data((struct edgeport_serial *)(edge_port->port->serial->private), edge_port); +} + + +/***************************************************************************** + * BulkOutCmdCallback + * this is the callback function for when we have finished sending a command + * on the bulk out endpoint. + *****************************************************************************/ +static void edge_bulk_out_cmd_callback (struct urb *urb) +{ + struct edgeport_port *edge_port = (struct edgeport_port *)urb->context; + struct tty_struct *tty; + int status = urb->status; + + dbg(__FUNCTION__); + + CmdUrbs--; + dbg(__FUNCTION__" - FREE URB %p (outstanding %d)", urb, CmdUrbs); + + + /* if this urb had a transfer buffer already (old transfer) free it */ + if (urb->transfer_buffer != NULL) { + kfree(urb->transfer_buffer); + } + + // Free the command urb + usb_unlink_urb (urb); + usb_free_urb (urb); + + if (port_paranoia_check (edge_port->port, __FUNCTION__)) { + return; + } + + if (status) { + dbg(__FUNCTION__" - nonzero write bulk status received: %d", urb->status); + return; + } + + /* Get pointer to tty */ + tty = edge_port->port->tty; + + /* tell the tty driver that something has changed */ + wake_up_interruptible(&tty->write_wait); + + + /* we have completed the command */ + edge_port->commandPending = FALSE; + wake_up_interruptible(&edge_port->wait_command); +} + + +/***************************************************************************** + * Driver tty interface functions + *****************************************************************************/ + +/***************************************************************************** + * SerialOpen + * this function is called by the tty driver when a port is opened + * If successful, we return 0 + * Otherwise we return a negative error number. + *****************************************************************************/ +static int edge_open (struct usb_serial_port *port, struct file * filp) +{ + struct edgeport_port *edge_port = (struct edgeport_port *)port->private; + struct usb_serial *serial; + struct edgeport_serial *edge_serial; + int response; + int timeout; + + if (port_paranoia_check (port, __FUNCTION__)) + return -ENODEV; + + dbg(__FUNCTION__ " - port %d", port->number); + + ++port->open_count; + MOD_INC_USE_COUNT; + + if (!port->active) { + port->active = 1; + + /* force low_latency on so that our tty_push actually forces the data through, + otherwise it is scheduled, and with high data rates (like with OHCI) data + can get lost. */ + port->tty->low_latency = 1; + + /* see if we've set up our endpoint info yet (can't set it up in edge_startup + as the structures were not set up at that time.) */ + serial = port->serial; + edge_serial = (struct edgeport_serial *)serial->private; + if (edge_serial->interrupt_in_buffer == NULL) { + struct usb_serial_port *port0 = &serial->port[0]; + + /* not set up yet, so do it now */ + edge_serial->interrupt_in_buffer = port0->interrupt_in_buffer; + edge_serial->interrupt_in_endpoint = port0->interrupt_in_endpointAddress; + edge_serial->interrupt_read_urb = port0->interrupt_in_urb; + edge_serial->bulk_in_buffer = port0->bulk_in_buffer; + edge_serial->bulk_in_endpoint = port0->bulk_in_endpointAddress; + edge_serial->read_urb = port0->read_urb; + edge_serial->bulk_out_endpoint = port0->bulk_out_endpointAddress; + + /* set up our interrupt urb */ + /* Like to use FILL_INT_URB, but we don't know wMaxPacketSize or bInterval, something to change for 2.5... */ + edge_serial->interrupt_read_urb->complete = edge_interrupt_callback; + edge_serial->interrupt_read_urb->context = edge_serial; + /* FILL_INT_URB(edge_serial->interrupt_read_urb, serial->dev, + usb_rcvintpipe (serial->dev, edge_serial->interrupt_in_endpoint), + edge_serial->interrupt_in_buffer, edge_serial->interrupt_in_endpoint.wMaxPacketSize, + edge_interrupt_callback, edge_serial, edge_serial->interrupt_in_endpoint.bInterval); + */ + + /* set up our bulk in urb */ + /* Like to use FILL_BULK_URB, but we don't know wMaxPacketSize or bInterval, something to change for 2.5... */ + edge_serial->read_urb->complete = edge_bulk_in_callback; + edge_serial->read_urb->context = edge_serial; + /* FILL_BULK_URB(edge_serial->read_urb, serial->dev, + usb_rcvbulkpipe (serial->dev, edge_serial->bulk_in_endpoint), + edge_serial->bulk_in_buffer, edge_serial->bulk_in_endpoint->wMaxPacketSize, + edge_bulk_in_callback, edge_serial); + */ + + /* start interrupt read for this edgeport + * this interrupt will continue as long as the edgeport is connected */ + response = usb_submit_urb (edge_serial->interrupt_read_urb); + if (response) { + err(__FUNCTION__" - Error %d submitting control urb", response); + } + } + + /* initialize our wait queues */ + init_waitqueue_head(&edge_port->wait_open); + init_waitqueue_head(&edge_port->wait_chase); + init_waitqueue_head(&edge_port->delta_msr_wait); + init_waitqueue_head(&edge_port->wait_command); + + /* initialize our icount structure */ + memset (&(edge_port->icount), 0x00, sizeof(edge_port->icount)); + + /* initialize our port settings */ + edge_port->txCredits = 0; /* Can't send any data yet */ + edge_port->shadowMCR = MCR_MASTER_IE; /* Must always set this bit to enable ints! */ + edge_port->chaseResponsePending = FALSE; + + /* send a open port command */ + edge_port->openPending = TRUE; + edge_port->open = FALSE; + response = send_iosp_ext_cmd (edge_port, IOSP_CMD_OPEN_PORT, 0); + + if (response < 0) { + err(__FUNCTION__" - error sending open port command"); + edge_port->openPending = FALSE; + port->active = 0; + port->open_count = 0; + MOD_DEC_USE_COUNT; + return -ENODEV; + } + + /* now wait for the port to be completly opened */ + timeout = OPEN_TIMEOUT; + while (timeout && edge_port->openPending == TRUE) { + timeout = interruptible_sleep_on_timeout (&edge_port->wait_open, timeout); + } + + if (edge_port->open == FALSE) { + /* open timed out */ + dbg(__FUNCTION__" - open timedout"); + edge_port->openPending = FALSE; + port->active = 0; + port->open_count = 0; + MOD_DEC_USE_COUNT; + return -ENODEV; + } + + /* create the txfifo */ + edge_port->txfifo.head = 0; + edge_port->txfifo.tail = 0; + edge_port->txfifo.count = 0; + edge_port->txfifo.size = edge_port->maxTxCredits; + edge_port->txfifo.fifo = kmalloc (edge_port->maxTxCredits, GFP_KERNEL); + + if (!edge_port->txfifo.fifo) { + dbg(__FUNCTION__" - no memory"); + edge_close (port, filp); + return -ENOMEM; + } + + /* Allocate a URB for the write */ + edge_port->write_urb = usb_alloc_urb (0); + + if (!edge_port->write_urb) { + dbg(__FUNCTION__" - no memory"); + edge_close (port, filp); + return -ENOMEM; + } + + dbg(__FUNCTION__"(%d) - Initialize TX fifo to %d bytes", port->number, edge_port->maxTxCredits); + } + + dbg(__FUNCTION__" exited"); + + return 0; +} + + +/************************************************************************ + * + * block_until_chase_response + * + * This function will block the close until one of the following: + * 1. Response to our Chase comes from Edgeport + * 2. A timout of 10 seconds without activity has expired + * (1K of Edgeport data @ 2400 baud ==> 4 sec to empty) + * + ************************************************************************/ +static void block_until_chase_response(struct edgeport_port *edge_port) +{ + __u16 lastCredits; + int timeout = 1*HZ; + int wait = 10; + + while (1) { + // Save Last credits + lastCredits = edge_port->txCredits; + + // Did we get our Chase response + if (edge_port->chaseResponsePending == FALSE) { + dbg(__FUNCTION__" - Got Chase Response"); + + // did we get all of our credit back? + if (edge_port->txCredits == edge_port->maxTxCredits ) { + dbg(__FUNCTION__" - Got all credits"); + return; + } + } + + // Block the thread for a while + interruptible_sleep_on_timeout (&edge_port->wait_chase, timeout); + + if (lastCredits == edge_port->txCredits) { + // No activity.. count down. + wait--; + if (wait == 0) { + edge_port->chaseResponsePending = FALSE; + dbg(__FUNCTION__" - Chase TIMEOUT"); + return; + } + } else { + // Reset timout value back to 10 seconds + dbg(__FUNCTION__" - Last %d, Current %d", lastCredits, edge_port->txCredits); + wait = 10; + } + } +} + + +/************************************************************************ + * + * block_until_tx_empty + * + * This function will block the close until one of the following: + * 1. TX count are 0 + * 2. The edgeport has stopped + * 3. A timout of 3 seconds without activity has expired + * + ************************************************************************/ +static void block_until_tx_empty (struct edgeport_port *edge_port) +{ + struct TxFifo *fifo = &edge_port->txfifo; + __u32 lastCount; + int timeout = HZ/10; + int wait = 30; + + while (1) { + // Save Last count + lastCount = fifo->count; + + // Is the Edgeport Buffer empty? + if (lastCount == 0) { + dbg(__FUNCTION__" - TX Buffer Empty"); + return; + } + + // Block the thread for a while + interruptible_sleep_on_timeout (&edge_port->wait_chase, timeout); + + dbg(__FUNCTION__ " wait"); + + if (lastCount == fifo->count) { + // No activity.. count down. + wait--; + if (wait == 0) { + dbg(__FUNCTION__" - TIMEOUT"); + return; + } + } else { + // Reset timout value back to seconds + wait = 30; + } + } +} + + +/***************************************************************************** + * edge_close + * this function is called by the tty driver when a port is closed + *****************************************************************************/ +static void edge_close (struct usb_serial_port *port, struct file * filp) +{ + struct usb_serial *serial; + struct edgeport_serial *edge_serial; + struct edgeport_port *edge_port; + int status; + + if (port_paranoia_check (port, __FUNCTION__)) + return; + + dbg(__FUNCTION__ " - port %d", port->number); + + serial = get_usb_serial (port, __FUNCTION__); + if (!serial) + return; + + edge_serial = (struct edgeport_serial *)serial->private; + edge_port = (struct edgeport_port *)port->private; + + --port->open_count; + + if (port->open_count <= 0) { + // block until tx is empty + block_until_tx_empty(edge_port); + + edge_port->closePending = TRUE; + + /* flush and chase */ + edge_port->chaseResponsePending = TRUE; + + dbg(__FUNCTION__" - Sending IOSP_CMD_CHASE_PORT"); + status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0); + if (status == 0) { + // block until chase finished + block_until_chase_response(edge_port); + } else { + edge_port->chaseResponsePending = FALSE; + } + + /* close the port */ + dbg(__FUNCTION__" - Sending IOSP_CMD_CLOSE_PORT"); + send_iosp_ext_cmd (edge_port, IOSP_CMD_CLOSE_PORT, 0); + + //port->close = TRUE; + edge_port->closePending = FALSE; + edge_port->open = FALSE; + edge_port->openPending = FALSE; + + if (edge_port->write_urb) { + /* if this urb had a transfer buffer already (old transfer) free it */ + if (edge_port->write_urb->transfer_buffer != NULL) { + kfree(edge_port->write_urb->transfer_buffer); + } + + usb_unlink_urb (edge_port->write_urb); + usb_free_urb (edge_port->write_urb); + } + + if (edge_port->txfifo.fifo) { + kfree(edge_port->txfifo.fifo); + } + } + + MOD_DEC_USE_COUNT; + dbg(__FUNCTION__" exited"); +} + + + + +/***************************************************************************** + * SerialWrite + * this function is called by the tty driver when data should be written to + * the port. + * If successful, we return the number of bytes written, otherwise we return + * a negative error number. + *****************************************************************************/ +static int edge_write (struct usb_serial_port *port, int from_user, const unsigned char *data, int count) +{ + struct edgeport_port *edge_port = (struct edgeport_port *)port->private; + struct TxFifo *fifo; + int copySize; + int bytesleft; + int firsthalf; + int secondhalf; + + dbg(__FUNCTION__ " - port %d", port->number); + + // get a pointer to the Tx fifo + fifo = &edge_port->txfifo; + + // calculate number of bytes to put in fifo + copySize = MIN(count, (edge_port->txCredits - fifo->count)); + + dbg(__FUNCTION__"(%d) of %d byte(s) Fifo room %d -- will copy %d bytes", + port->number, count, edge_port->txCredits - fifo->count, copySize); + + /* catch writes of 0 bytes which the tty driver likes to give us, and when txCredits is empty */ + if (copySize == 0) { + dbg (__FUNCTION__" - copySize = Zero"); + return 0; + } + + // queue the data + // since we can never overflow the buffer we do not have to check for full condition + + // the copy is done is two parts -- first fill to the end of the buffer + // then copy the reset from the start of the buffer + + bytesleft = fifo->size - fifo->head; + firsthalf = MIN(bytesleft,copySize); + dbg (__FUNCTION__" - copy %d bytes of %d into fifo ", firsthalf, bytesleft); + + /* now copy our data */ + if (from_user) { + copy_from_user(&fifo->fifo[fifo->head], data, firsthalf); + } else { + memcpy(&fifo->fifo[fifo->head], data, firsthalf); + } + + // update the index and size + fifo->head += firsthalf; + fifo->count += firsthalf; + + // wrap the index + if (fifo->head == fifo->size) { + fifo->head = 0; + } + + secondhalf = copySize-firsthalf; + + if (secondhalf) { + dbg (__FUNCTION__" - copy rest of data %d", secondhalf); + if (from_user) { + copy_from_user(&fifo->fifo[fifo->head], &data[firsthalf], secondhalf); + } else { + memcpy(&fifo->fifo[fifo->head], &data[firsthalf], secondhalf); + } + // update the index and size + fifo->count += secondhalf; + fifo->head += secondhalf; + // No need to check for wrap since we can not get to end of fifo in this part + } + + if (copySize) { + usb_serial_debug_data (__FILE__, __FUNCTION__, copySize, data); + } + + send_more_port_data((struct edgeport_serial *)port->serial->private, edge_port); + + dbg(__FUNCTION__" wrote %d byte(s) TxCredits %d, Fifo %d", copySize, edge_port->txCredits, fifo->count); + + return copySize; +} + + +/************************************************************************ + * + * send_more_port_data() + * + * This routine attempts to write additional UART transmit data + * to a port over the USB bulk pipe. It is called (1) when new + * data has been written to a port's TxBuffer from higher layers + * (2) when the peripheral sends us additional TxCredits indicating + * that it can accept more Tx data for a given port; and (3) when + * a bulk write completes successfully and we want to see if we + * can transmit more. + * + ************************************************************************/ +static void send_more_port_data(struct edgeport_serial *edge_serial, struct edgeport_port *edge_port) +{ + struct TxFifo *fifo = &edge_port->txfifo; + struct urb *urb; + unsigned char *buffer; + int status; + unsigned long flags; + int count; + int bytesleft; + int firsthalf; + int secondhalf; + + dbg(__FUNCTION__"(%d)", edge_port->port->number); + + /* find our next free urb */ // ICK!!! FIXME!!! + save_flags(flags); cli(); + + if (edge_port->write_in_progress || + !edge_port->open || + (fifo->count == 0)) { + restore_flags(flags); + dbg(__FUNCTION__"(%d) EXIT - fifo %d, PendingWrite = %d", edge_port->port->number, fifo->count, edge_port->write_in_progress); + return; + } + + // since the amount of data in the fifo will always fit into the + // edgeport buffer we do not need to check the write length + + // Do we have enough credits for this port to make it worthwhile + // to bother queueing a write. If it's too small, say a few bytes, + // it's better to wait for more credits so we can do a larger + // write. + if (edge_port->txCredits < EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(edge_port->maxTxCredits)) { + restore_flags(flags); + dbg(__FUNCTION__"(%d) Not enough credit - fifo %d TxCredit %d", edge_port->port->number, fifo->count, edge_port->txCredits ); + return; + } + + // lock this write + edge_port->write_in_progress = TRUE; + restore_flags(flags); + + // get a pointer to the write_urb + urb = edge_port->write_urb; + + /* if this urb had a transfer buffer already (old transfer) free it */ + if (urb->transfer_buffer != NULL) { + kfree(urb->transfer_buffer); + urb->transfer_buffer = NULL; + } + + /* build the data header for the buffer and port that we are about to send out */ + count = fifo->count; + buffer = kmalloc (count+2, GFP_KERNEL); + if (buffer == NULL) { + err(__FUNCTION__" - no more kernel memory..."); + edge_port->write_in_progress = FALSE; + return; + } + buffer[0] = IOSP_BUILD_DATA_HDR1 (edge_port->port->number, count); + buffer[1] = IOSP_BUILD_DATA_HDR2 (edge_port->port->number, count); + + /* now copy our data */ + bytesleft = fifo->size - fifo->tail; + firsthalf = MIN(bytesleft,count); + memcpy(&buffer[2], &fifo->fifo[fifo->tail], firsthalf); + fifo->tail += firsthalf; + fifo->count -= firsthalf; + if (fifo->tail == fifo->size) { + fifo->tail = 0; + } + + secondhalf = count-firsthalf; + if (secondhalf) { + memcpy(&buffer[2+firsthalf], &fifo->fifo[fifo->tail], secondhalf); + fifo->tail += secondhalf; + fifo->count -= secondhalf; + } + + if (count) { + usb_serial_debug_data (__FILE__, __FUNCTION__, count, &buffer[2]); + } + + /* fill up the urb with all of our data and submit it */ + FILL_BULK_URB (urb, edge_serial->serial->dev, + usb_sndbulkpipe(edge_serial->serial->dev, edge_serial->bulk_out_endpoint), + buffer, count+2, edge_bulk_out_data_callback, edge_port); + + /* set the USB_BULK_QUEUE flag so that we can shove a bunch of urbs at once down the pipe */ + urb->transfer_flags |= USB_QUEUE_BULK; + + urb->dev = edge_serial->serial->dev; + status = usb_submit_urb(urb); + if (status) { + /* something went wrong */ + dbg(__FUNCTION__" - usb_submit_urb(write bulk) failed"); + edge_port->write_in_progress = FALSE; + } else { + /* decrement the number of credits we have by the number we just sent */ + edge_port->txCredits -= count; + edge_port->icount.tx += count; + } + dbg(__FUNCTION__" wrote %d byte(s) TxCredit %d, Fifo %d", count, edge_port->txCredits, fifo->count); +} + + +/***************************************************************************** + * edge_write_room + * this function is called by the tty driver when it wants to know how many + * bytes of data we can accept for a specific port. + * If successful, we return the amount of room that we have for this port + * (the txCredits), + * Otherwise we return a negative error number. + *****************************************************************************/ +static int edge_write_room (struct usb_serial_port *port) +{ + struct edgeport_port *edge_port = (struct edgeport_port *)(port->private); + int room; + + dbg(__FUNCTION__); + + if (edge_port->closePending == TRUE) { + return -ENODEV; + } + + dbg(__FUNCTION__" - port %d", port->number); + + if (!edge_port->open) { + dbg (__FUNCTION__" - port not opened"); + return -EINVAL; + } + + // total of both buffers is still txCredit + room = edge_port->txCredits - edge_port->txfifo.count; + + dbg(__FUNCTION__" - returns %d", room); + return room; +} + + +/***************************************************************************** + * edge_chars_in_buffer + * this function is called by the tty driver when it wants to know how many + * bytes of data we currently have outstanding in the port (data that has + * been written, but hasn't made it out the port yet) + * If successful, we return the number of bytes left to be written in the + * system, + * Otherwise we return a negative error number. + *****************************************************************************/ +static int edge_chars_in_buffer (struct usb_serial_port *port) +{ + struct edgeport_port *edge_port = (struct edgeport_port *)(port->private); + int num_chars; + + dbg(__FUNCTION__); + + if (!edge_port->open) { + dbg (__FUNCTION__" - port not opened"); + return -EINVAL; + } + + num_chars = edge_port->maxTxCredits - edge_port->txCredits + edge_port->txfifo.count; + if (num_chars) { + dbg(__FUNCTION__"(port %d) - returns %d", port->number, num_chars); + } + + return num_chars; +} + + +/***************************************************************************** + * SerialThrottle + * this function is called by the tty driver when it wants to stop the data + * being read from the port. + *****************************************************************************/ +static void edge_throttle (struct usb_serial_port *port) +{ + struct edgeport_port *edge_port = (struct edgeport_port *)(port->private); + struct tty_struct *tty; + int status; + + dbg(__FUNCTION__" - port %d", port->number); + + if (!edge_port->open) { + dbg (__FUNCTION__" - port not opened"); + return; + } + + tty = port->tty; + + /* if we are implementing XON/XOFF, send the stop character */ + if (I_IXOFF(tty)) { + unsigned char stop_char = STOP_CHAR(tty); + status = edge_write (port, 0, &stop_char, 1); + if (status <= 0) { + return; + } + } + + /* if we are implementing RTS/CTS, toggle that line */ + if (tty->termios->c_cflag & CRTSCTS) { + edge_port->shadowMCR &= ~MCR_RTS; + status = send_cmd_write_uart_register(edge_port, MCR, edge_port->shadowMCR); + if (status != 0) { + return; + } + } + + return; +} + + +/***************************************************************************** + * edge_unthrottle + * this function is called by the tty driver when it wants to resume the data + * being read from the port (called after SerialThrottle is called) + *****************************************************************************/ +static void edge_unthrottle (struct usb_serial_port *port) +{ + struct edgeport_port *edge_port = (struct edgeport_port *)(port->private); + struct tty_struct *tty; + int status; + + dbg(__FUNCTION__" - port %d", port->number); + + if (!edge_port->open) { + dbg (__FUNCTION__" - port not opened"); + return; + } + + tty = port->tty; + + /* if we are implementing XON/XOFF, send the start character */ + if (I_IXOFF(tty)) { + unsigned char start_char = START_CHAR(tty); + status = edge_write (port, 0, &start_char, 1); + if (status <= 0) { + return; + } + } + + /* if we are implementing RTS/CTS, toggle that line */ + if (tty->termios->c_cflag & CRTSCTS) { + edge_port->shadowMCR |= MCR_RTS; + status = send_cmd_write_uart_register(edge_port, MCR, edge_port->shadowMCR); + if (status != 0) { + return; + } + } + + return; +} + + +/***************************************************************************** + * SerialSetTermios + * this function is called by the tty driver when it wants to change the termios structure + *****************************************************************************/ +static void edge_set_termios (struct usb_serial_port *port, struct termios *old_termios) +{ + struct edgeport_port *edge_port = (struct edgeport_port *)(port->private); + struct tty_struct *tty = port->tty; + unsigned int cflag = tty->termios->c_cflag; + + dbg(__FUNCTION__" - clfag %08x %08x iflag %08x %08x", + tty->termios->c_cflag, + old_termios->c_cflag, + RELEVANT_IFLAG(tty->termios->c_iflag), + RELEVANT_IFLAG(old_termios->c_iflag) + ); + + /* check that they really want us to change something */ + if (old_termios) { + if ((cflag == old_termios->c_cflag) && + (RELEVANT_IFLAG(tty->termios->c_iflag) == RELEVANT_IFLAG(old_termios->c_iflag))) { + dbg(__FUNCTION__" - nothing to change"); + return; + } + } + + dbg(__FUNCTION__" - port %d", port->number); + + if (!edge_port->open) { + dbg (__FUNCTION__" - port not opened"); + return; + } + + /* change the port settings to the new ones specified */ + change_port_settings (edge_port, old_termios); + + return; +} + + +/***************************************************************************** + * get_lsr_info - get line status register info + * + * Purpose: Let user call ioctl() to get info when the UART physically + * is emptied. On bus types like RS485, the transmitter must + * release the bus after transmitting. This must be done when + * the transmit shift register is empty, not be done when the + * transmit holding register is empty. This functionality + * allows an RS485 driver to be written in user space. + *****************************************************************************/ +static int get_lsr_info(struct edgeport_port *edge_port, unsigned int *value) +{ + unsigned int result = 0; + + if (edge_port->maxTxCredits == edge_port->txCredits && + edge_port->txfifo.count == 0) { + dbg(__FUNCTION__" -- Empty"); + result = TIOCSER_TEMT; + } + + if (copy_to_user(value, &result, sizeof(int))) + return -EFAULT; + return 0; +} + +static int get_number_bytes_avail(struct edgeport_port *edge_port, unsigned int *value) +{ + unsigned int result = 0; + struct tty_struct *tty = edge_port->port->tty; + + result = tty->read_cnt; + + dbg(__FUNCTION__"(%d) = %d", edge_port->port->number, result); + if (copy_to_user(value, &result, sizeof(int))) + return -EFAULT; + //return 0; + return -ENOIOCTLCMD; +} + +static int set_modem_info(struct edgeport_port *edge_port, unsigned int *value) +{ + unsigned int mcr = edge_port->shadowMCR; + unsigned int arg; + + if (copy_from_user(&arg, value, sizeof(int))) + return -EFAULT; + + // turn off the RTS and DTR + mcr &= ~(MCR_RTS | MCR_DTR); + + mcr |= ((arg & TIOCM_RTS) ? MCR_RTS : 0); + mcr |= ((arg & TIOCM_DTR) ? MCR_DTR : 0); + + edge_port->shadowMCR = mcr; + + send_cmd_write_uart_register(edge_port, MCR, edge_port->shadowMCR); + + return 0; +} + +static int get_modem_info(struct edgeport_port *edge_port, unsigned int *value) +{ + unsigned int result = 0; + unsigned int msr = edge_port->shadowMSR; + unsigned int mcr = edge_port->shadowMCR; + + result = ((mcr & MCR_DTR) ? TIOCM_DTR: 0) /* 0x002 */ + | ((mcr & MCR_RTS) ? TIOCM_RTS: 0) /* 0x004 */ + | ((msr & MSR_CTS) ? TIOCM_CTS: 0) /* 0x020 */ + | ((msr & MSR_CD) ? TIOCM_CAR: 0) /* 0x040 */ + | ((msr & MSR_RI) ? TIOCM_RI: 0) /* 0x080 */ + | ((msr & MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */ + + + dbg(__FUNCTION__" -- %x", result); + + if (copy_to_user(value, &result, sizeof(int))) + return -EFAULT; + return 0; +} + + + +static int get_serial_info(struct edgeport_port *edge_port, struct serial_struct * retinfo) +{ + struct serial_struct tmp; + + if (!retinfo) + return -EFAULT; + + memset(&tmp, 0, sizeof(tmp)); + + tmp.type = PORT_16550A; + tmp.line = edge_port->port->serial->minor; + tmp.port = edge_port->port->number; + tmp.irq = 0; + tmp.flags = ASYNC_SKIP_TEST | ASYNC_AUTO_IRQ; + tmp.xmit_fifo_size = edge_port->maxTxCredits; + tmp.baud_base = 9600; + tmp.close_delay = 5*HZ; + tmp.closing_wait = 30*HZ; +// tmp.custom_divisor = state->custom_divisor; +// tmp.hub6 = state->hub6; +// tmp.io_type = state->io_type; + + + if (copy_to_user(retinfo, &tmp, sizeof(*retinfo))) + return -EFAULT; + return 0; +} + + + +/***************************************************************************** + * SerialIoctl + * this function handles any ioctl calls to the driver + *****************************************************************************/ +static int edge_ioctl (struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg) +{ + struct edgeport_port *edge_port = (struct edgeport_port *)(port->private); + struct async_icount cnow; + struct async_icount cprev; + struct serial_icounter_struct icount; + unsigned long flags; + + + dbg(__FUNCTION__" - port %d, cmd = 0x%x", port->number, cmd); + + switch (cmd) { + // return number of bytes available + case TIOCINQ: + dbg(__FUNCTION__" (%d) TIOCINQ", port->number); + return get_number_bytes_avail(edge_port, (unsigned int *) arg); + break; + +// case TCGETS: +// dbg(__FUNCTION__" (%d) TCGETS", port->number); +// break; + +// case TCSETS: +// dbg(__FUNCTION__" (%d) TCSETS", port->number); +// break; + + case TIOCSERGETLSR: + dbg(__FUNCTION__" (%d) TIOCSERGETLSR", port->number); + return get_lsr_info(edge_port, (unsigned int *) arg); + return 0; + + case TIOCMSET: + dbg(__FUNCTION__" (%d) TIOCMSET", port->number); + return set_modem_info(edge_port, (unsigned int *) arg); + + case TIOCMGET: + dbg(__FUNCTION__" (%d) TIOCMGET", port->number); + return get_modem_info(edge_port, (unsigned int *) arg); + + case TIOCGSERIAL: + dbg(__FUNCTION__" (%d) TIOCGSERIAL", port->number); + return get_serial_info(edge_port, (struct serial_struct *) arg); + + case TIOCSSERIAL: + dbg(__FUNCTION__" (%d) TIOCSSERIAL", port->number); + break; + + case TIOCMIWAIT: + dbg(__FUNCTION__" (%d) TIOCMIWAIT", port->number); + save_flags(flags); cli(); + cprev = edge_port->icount; + restore_flags(flags); + while (1) { + interruptible_sleep_on(&edge_port->delta_msr_wait); + /* see if a signal did it */ + if (signal_pending(current)) + return -ERESTARTSYS; + save_flags(flags); cli(); + cnow = edge_port->icount; /* atomic copy */ + restore_flags(flags); + if (cnow.rng == cprev.rng && cnow.dsr == cprev.dsr && + cnow.dcd == cprev.dcd && cnow.cts == cprev.cts) + return -EIO; /* no change => error */ + if (((arg & TIOCM_RNG) && (cnow.rng != cprev.rng)) || + ((arg & TIOCM_DSR) && (cnow.dsr != cprev.dsr)) || + ((arg & TIOCM_CD) && (cnow.dcd != cprev.dcd)) || + ((arg & TIOCM_CTS) && (cnow.cts != cprev.cts)) ) { + return 0; + } + cprev = cnow; + } + /* NOTREACHED */ + break; + + case TIOCGICOUNT: + save_flags(flags); cli(); + cnow = edge_port->icount; + restore_flags(flags); + icount.cts = cnow.cts; + icount.dsr = cnow.dsr; + icount.rng = cnow.rng; + icount.dcd = cnow.dcd; + icount.rx = cnow.rx; + icount.tx = cnow.tx; + icount.frame = cnow.frame; + icount.overrun = cnow.overrun; + icount.parity = cnow.parity; + icount.brk = cnow.brk; + icount.buf_overrun = cnow.buf_overrun; + + dbg(__FUNCTION__" (%d) TIOCGICOUNT RX=%d, TX=%d", port->number, icount.rx, icount.tx ); + if (copy_to_user((void *)arg, &icount, sizeof(icount))) + return -EFAULT; + return 0; + } + + return -ENOIOCTLCMD; +} + + +/***************************************************************************** + * SerialBreak + * this function sends a break to the port + *****************************************************************************/ +static void edge_break (struct usb_serial_port *port, int break_state) +{ + struct edgeport_port *edge_port = (struct edgeport_port *)(port->private); + int status; + + /* flush and chase */ + edge_port->chaseResponsePending = TRUE; + + dbg(__FUNCTION__" - Sending IOSP_CMD_CHASE_PORT"); + status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CHASE_PORT, 0); + if (status == 0) { + // block until chase finished + block_until_chase_response(edge_port); + } else { + edge_port->chaseResponsePending = FALSE; + } + + if (break_state == -1) { + dbg(__FUNCTION__" - Sending IOSP_CMD_SET_BREAK"); + status = send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_BREAK, 0); + } else { + dbg(__FUNCTION__" - Sending IOSP_CMD_CLEAR_BREAK"); + status = send_iosp_ext_cmd (edge_port, IOSP_CMD_CLEAR_BREAK, 0); + } + if (status) { + dbg(__FUNCTION__" - error sending break set/clear command."); + } + + return; +} + + +/***************************************************************************** + * process_rcvd_data + * this function handles the data received on the bulk in pipe. + *****************************************************************************/ +static int process_rcvd_data (struct edgeport_serial *edge_serial, unsigned char * buffer, __u16 bufferLength) +{ + struct usb_serial_port *port; + struct edgeport_port *edge_port; + struct tty_struct *tty; + __u16 lastBufferLength; + __u16 rxLen; + int i; + + dbg(__FUNCTION__); + + lastBufferLength = bufferLength + 1; + + while (bufferLength > 0) { + /* failsafe incase we get a message that we don't understand */ + if (lastBufferLength == bufferLength) { + dbg(__FUNCTION__" - stuck in loop, exiting it."); + break; + } + lastBufferLength = bufferLength; + + switch (edge_serial->rxState) { + case EXPECT_HDR1: + edge_serial->rxHeader1 = *buffer; + ++buffer; + --bufferLength; + + if (bufferLength == 0) { + edge_serial->rxState = EXPECT_HDR2; + break; + } + /* otherwise, drop on through */ + + case EXPECT_HDR2: + edge_serial->rxHeader2 = *buffer; + ++buffer; + --bufferLength; + + dbg(__FUNCTION__" - Hdr1=%02X Hdr2=%02X", edge_serial->rxHeader1, edge_serial->rxHeader2); + + // Process depending on whether this header is + // data or status + + if (IS_CMD_STAT_HDR(edge_serial->rxHeader1)) { + // Decode this status header and goto EXPECT_HDR1 (if we + // can process the status with only 2 bytes), or goto + // EXPECT_HDR3 to get the third byte. + + edge_serial->rxPort = IOSP_GET_HDR_PORT(edge_serial->rxHeader1); + edge_serial->rxStatusCode = IOSP_GET_STATUS_CODE(edge_serial->rxHeader1); + + if (!IOSP_STATUS_IS_2BYTE(edge_serial->rxStatusCode)) { + // This status needs additional bytes. Save what we have + // and then wait for more data. + edge_serial->rxStatusParam = edge_serial->rxHeader2; + + edge_serial->rxState = EXPECT_HDR3; + break; + } + + // We have all the header bytes, process the status now + process_rcvd_status (edge_serial, edge_serial->rxHeader2, 0); + + edge_serial->rxState = EXPECT_HDR1; + break; + } else { + edge_serial->rxPort = IOSP_GET_HDR_PORT(edge_serial->rxHeader1); + edge_serial->rxBytesRemaining = IOSP_GET_HDR_DATA_LEN(edge_serial->rxHeader1, edge_serial->rxHeader2); + + dbg(__FUNCTION__" - Data for Port %u Len %u", edge_serial->rxPort, edge_serial->rxBytesRemaining); + + //ASSERT( DevExt->RxPort < DevExt->NumPorts ); + //ASSERT( DevExt->RxBytesRemaining < IOSP_MAX_DATA_LENGTH ); + + if (bufferLength == 0 ) { + edge_serial->rxState = EXPECT_DATA; + break; + } + // Else, drop through + } + + case EXPECT_DATA: // Expect data + + if (bufferLength < edge_serial->rxBytesRemaining) { + rxLen = bufferLength; + edge_serial->rxState = EXPECT_DATA; // Expect data to start next buffer + } else { + // BufLen >= RxBytesRemaining + rxLen = edge_serial->rxBytesRemaining; + edge_serial->rxState = EXPECT_HDR1; // Start another header next time + } + + bufferLength -= rxLen; + edge_serial->rxBytesRemaining -= rxLen; + + /* spit this data back into the tty driver if this port is open */ + if (rxLen) { + port = &edge_serial->serial->port[edge_serial->rxPort]; + if (port_paranoia_check (port, __FUNCTION__) == 0) { + edge_port = (struct edgeport_port *)port->private; + if (edge_port->open) { + tty = edge_port->port->tty; + if (tty) { + dbg (__FUNCTION__" - Sending %d bytes to TTY for port %d", rxLen, edge_serial->rxPort); + for (i = 0; i < rxLen ; ++i) { + /* if we insert more than TTY_FLIPBUF_SIZE characters, we drop them. */ + if(tty->flip.count >= TTY_FLIPBUF_SIZE) { + tty_flip_buffer_push(tty); + } + /* this doesn't actually push the data through unless tty->low_latency is set */ + tty_insert_flip_char(tty, buffer[i], 0); + } + tty_flip_buffer_push(tty); + } + edge_port->icount.rx += rxLen; + } + } + buffer += rxLen; + } + + break; + + case EXPECT_HDR3: // Expect 3rd byte of status header + edge_serial->rxHeader3 = *buffer; + ++buffer; + --bufferLength; + + // We have all the header bytes, process the status now + process_rcvd_status (edge_serial, edge_serial->rxStatusParam, edge_serial->rxHeader3); + edge_serial->rxState = EXPECT_HDR1; + break; + + } + } + + return 0; +} + + +/***************************************************************************** + * process_rcvd_status + * this function handles the any status messages received on the bulk in pipe. + *****************************************************************************/ +static void process_rcvd_status (struct edgeport_serial *edge_serial, __u8 byte2, __u8 byte3) +{ + struct usb_serial_port *port; + struct edgeport_port *edge_port; + __u8 code = edge_serial->rxStatusCode; + + /* switch the port pointer to the one being currently talked about */ + port = &edge_serial->serial->port[edge_serial->rxPort]; + if (port_paranoia_check (port, __FUNCTION__)) { + return; + } + edge_port = (struct edgeport_port *)port->private; + if (edge_port == NULL) { + err (__FUNCTION__ " - edge_port == NULL for port %d", edge_serial->rxPort); + return; + } + + dbg(__FUNCTION__" - port %d", edge_serial->rxPort); + + if (code == IOSP_EXT_STATUS) { + switch (byte2) { + case IOSP_EXT_STATUS_CHASE_RSP: + // we want to do EXT status regardless of port open/closed + dbg(__FUNCTION__" - Port %u EXT CHASE_RSP Data = %02x", edge_serial->rxPort, byte3 ); + // Currently, the only EXT_STATUS is Chase, so process here instead of one more call + // to one more subroutine. If/when more EXT_STATUS, there'll be more work to do. + // Also, we currently clear flag and close the port regardless of content of above's Byte3. + // We could choose to do something else when Byte3 says Timeout on Chase from Edgeport, + // like wait longer in block_until_chase_response, but for now we don't. + edge_port->chaseResponsePending = FALSE; + wake_up_interruptible (&edge_port->wait_chase); + return; + + case IOSP_EXT_STATUS_RX_CHECK_RSP: + dbg( __FUNCTION__" ========== Port %u CHECK_RSP Sequence = %02x =============\n", edge_serial->rxPort, byte3 ); + //Port->RxCheckRsp = TRUE; + return; + } + } + + if (code == IOSP_STATUS_OPEN_RSP) { + edge_port->txCredits = GET_TX_BUFFER_SIZE(byte3); + edge_port->maxTxCredits = edge_port->txCredits; + dbg (__FUNCTION__" - Port %u Open Response Inital MSR = %02x TxBufferSize = %d", edge_serial->rxPort, byte2, edge_port->txCredits); + handle_new_msr (edge_port, byte2); + + /* send the current line settings to the port so we are in sync with any further termios calls */ + change_port_settings (edge_port, edge_port->port->tty->termios); + + /* we have completed the open */ + edge_port->openPending = FALSE; + edge_port->open = TRUE; + wake_up_interruptible(&edge_port->wait_open); + return; + } + + // If port is closed, silently discard all rcvd status. We can + // have cases where buffered status is received AFTER the close + // port command is sent to the Edgeport. + if ((!edge_port->open ) || (edge_port->closePending)) { + return; + } + + switch (code) { + // Not currently sent by Edgeport + case IOSP_STATUS_LSR: + dbg(__FUNCTION__" - Port %u LSR Status = %02x", edge_serial->rxPort, byte2); + handle_new_lsr (edge_port, FALSE, byte2, 0); + break; + + case IOSP_STATUS_LSR_DATA: + dbg(__FUNCTION__" - Port %u LSR Status = %02x, Data = %02x", edge_serial->rxPort, byte2, byte3); + // byte2 is LSR Register + // byte3 is broken data byte + handle_new_lsr (edge_port, TRUE, byte2, byte3); + break; + // + // case IOSP_EXT_4_STATUS: + // dbg(__FUNCTION__" - Port %u LSR Status = %02x Data = %02x", edge_serial->rxPort, byte2, byte3); + // break; + // + case IOSP_STATUS_MSR: + dbg(__FUNCTION__" - Port %u MSR Status = %02x", edge_serial->rxPort, byte2); + + // Process this new modem status and generate appropriate + // events, etc, based on the new status. This routine + // also saves the MSR in Port->ShadowMsr. + handle_new_msr(edge_port, byte2); + break; + + default: + dbg(__FUNCTION__" - Unrecognized IOSP status code %u\n", code); + break; + } + + return; +} + + +/***************************************************************************** + * handle_new_msr + * this function handles any change to the msr register for a port. + *****************************************************************************/ +static void handle_new_msr(struct edgeport_port *edge_port, __u8 newMsr) +{ + struct async_icount *icount; + + dbg(__FUNCTION__" %02x", newMsr); + + if (newMsr & (MSR_DELTA_CTS | MSR_DELTA_DSR | MSR_DELTA_RI | MSR_DELTA_CD)) { + icount = &edge_port->icount; + + /* update input line counters */ + if (newMsr & MSR_DELTA_CTS) { + icount->cts++; + } + if (newMsr & MSR_DELTA_DSR) { + icount->dsr++; + } + if (newMsr & MSR_DELTA_CD) { + icount->dcd++; + } + if (newMsr & MSR_DELTA_RI) { + icount->rng++; + } + wake_up_interruptible(&edge_port->delta_msr_wait); + } + + /* Save the new modem status */ + edge_port->shadowMSR = newMsr & 0xf0; + + return; +} + + +/***************************************************************************** + * handle_new_lsr + * this function handles any change to the lsr register for a port. + *****************************************************************************/ +static void handle_new_lsr(struct edgeport_port *edge_port, __u8 lsrData, __u8 lsr, __u8 data) +{ + __u8 newLsr = (__u8)(lsr & (__u8)(LSR_OVER_ERR | LSR_PAR_ERR | LSR_FRM_ERR | LSR_BREAK)); + struct async_icount *icount; + + dbg(__FUNCTION__" - %02x", newLsr); + + edge_port->shadowLSR = lsr; + + if (newLsr & LSR_BREAK) { + // + // Parity and Framing errors only count if they + // occur exclusive of a break being + // received. + // + newLsr &= (__u8)(LSR_OVER_ERR | LSR_BREAK); + } + + /* Place LSR data byte into Rx buffer */ + if (lsrData) { + tty_insert_flip_char(edge_port->port->tty, data, 0); + tty_flip_buffer_push(edge_port->port->tty); + } + + /* update input line counters */ + icount = &edge_port->icount; + if (newLsr & LSR_BREAK) { + icount->brk++; + } + if (newLsr & LSR_OVER_ERR) { + icount->overrun++; + } + if (newLsr & LSR_PAR_ERR) { + icount->parity++; + } + if (newLsr & LSR_FRM_ERR) { + icount->frame++; + } + + return; +} + + +/**************************************************************************** + * sram_write + * writes a number of bytes to the Edgeport device's sram starting at the + * given address. + * If successful returns the number of bytes written, otherwise it returns + * a negative error number of the problem. + ****************************************************************************/ +static int sram_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data) +{ + int result; + __u16 current_length; + unsigned char *transfer_buffer; + +// dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length); + + transfer_buffer = kmalloc (64, GFP_KERNEL); + if (!transfer_buffer) { + err(__FUNCTION__" - kmalloc(%d) failed.\n", 64); + return -ENOMEM; + } + + /* need to split these writes up into 64 byte chunks */ + result = 0; + while (length > 0) { + if (length > 64) { + current_length = 64; + } else { + current_length = length; + } +// dbg (__FUNCTION__" - writing %x, %x, %d", extAddr, addr, current_length); + memcpy (transfer_buffer, data, current_length); + result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_RAM, + 0x40, addr, extAddr, transfer_buffer, current_length, 300); + if (result < 0) + break; + length -= current_length; + addr += current_length; + data += current_length; + } + + kfree (transfer_buffer); + return result; +} + + +/**************************************************************************** + * rom_write + * writes a number of bytes to the Edgeport device's ROM starting at the + * given address. + * If successful returns the number of bytes written, otherwise it returns + * a negative error number of the problem. + ****************************************************************************/ +static int rom_write (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data) +{ + int result; + __u16 current_length; + unsigned char *transfer_buffer; + +// dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length); + + transfer_buffer = kmalloc (64, GFP_KERNEL); + if (!transfer_buffer) { + err(__FUNCTION__" - kmalloc(%d) failed.\n", 64); + return -ENOMEM; + } + + /* need to split these writes up into 64 byte chunks */ + result = 0; + while (length > 0) { + if (length > 64) { + current_length = 64; + } else { + current_length = length; + } +// dbg (__FUNCTION__" - writing %x, %x, %d", extAddr, addr, current_length); + memcpy (transfer_buffer, data, current_length); + result = usb_control_msg (serial->dev, usb_sndctrlpipe(serial->dev, 0), USB_REQUEST_ION_WRITE_ROM, + 0x40, addr, extAddr, transfer_buffer, current_length, 300); + if (result < 0) + break; + length -= current_length; + addr += current_length; + data += current_length; + } + + kfree (transfer_buffer); + return result; +} + + +/**************************************************************************** + * rom_read + * reads a number of bytes from the Edgeport device starting at the given + * address. + * If successful returns the number of bytes read, otherwise it returns + * a negative error number of the problem. + ****************************************************************************/ +static int rom_read (struct usb_serial *serial, __u16 extAddr, __u16 addr, __u16 length, __u8 *data) +{ + int result; + __u16 current_length; + unsigned char *transfer_buffer; + + dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, length); + + transfer_buffer = kmalloc (64, GFP_KERNEL); + if (!transfer_buffer) { + err(__FUNCTION__" - kmalloc(%d) failed.\n", 64); + return -ENOMEM; + } + + /* need to split these reads up into 64 byte chunks */ + result = 0; + while (length > 0) { + if (length > 64) { + current_length = 64; + } else { + current_length = length; + } +// dbg (__FUNCTION__" - %x, %x, %d", extAddr, addr, current_length); + result = usb_control_msg (serial->dev, usb_rcvctrlpipe(serial->dev, 0), USB_REQUEST_ION_READ_ROM, + 0xC0, addr, extAddr, transfer_buffer, current_length, 300); + if (result < 0) + break; + memcpy (data, transfer_buffer, current_length); + length -= current_length; + addr += current_length; + data += current_length; + } + + kfree (transfer_buffer); + return result; +} + + +/**************************************************************************** + * send_iosp_ext_cmd + * Is used to send a IOSP message to the Edgeport device + ****************************************************************************/ +static int send_iosp_ext_cmd (struct edgeport_port *edge_port, __u8 command, __u8 param) +{ + unsigned char *buffer; + unsigned char *currentCommand; + int length = 0; + int status = 0; + + dbg(__FUNCTION__" - %d, %d", command, param); + + buffer = kmalloc (10, GFP_KERNEL); + if (!buffer) { + err(__FUNCTION__" - kmalloc(%d) failed.\n", 10); + return -ENOMEM; + } + + currentCommand = buffer; + + MAKE_CMD_EXT_CMD( ¤tCommand, &length, edge_port->port->number, command, param); + + status = write_cmd_usb (edge_port, buffer, length); + if (status) { + /* something bad happened, let's free up the memory */ + kfree(buffer); + } + + return status; +} + + +/***************************************************************************** + * write_cmd_usb + * this function writes the given buffer out to the bulk write endpoint. + *****************************************************************************/ +static int write_cmd_usb (struct edgeport_port *edge_port, unsigned char *buffer, int length) +{ + struct edgeport_serial *edge_serial = (struct edgeport_serial *)edge_port->port->serial->private; + int status = 0; + urb_t *urb; + int timeout; + + usb_serial_debug_data (__FILE__, __FUNCTION__, length, buffer); + + /* Allocate our next urb */ + urb = usb_alloc_urb (0); + + CmdUrbs++; + + dbg(__FUNCTION__" - ALLOCATE URB %p (outstanding %d)", urb, CmdUrbs); + + if (!urb) { + return -ENOMEM; + } + + FILL_BULK_URB (urb, edge_serial->serial->dev, + usb_sndbulkpipe(edge_serial->serial->dev, edge_serial->bulk_out_endpoint), + buffer, length, edge_bulk_out_cmd_callback, edge_port); + + /* set the USB_BULK_QUEUE flag so that we can shove a bunch of urbs at once down the pipe */ + urb->transfer_flags |= USB_QUEUE_BULK; + + edge_port->commandPending = TRUE; + urb->dev = edge_serial->serial->dev; + status = usb_submit_urb(urb); + + if (status) { + /* something went wrong */ + dbg(__FUNCTION__" - usb_submit_urb(write bulk) failed"); + + /* if this urb had a transfer buffer already (old transfer) free it */ + if (urb->transfer_buffer != NULL) { + kfree(urb->transfer_buffer); + } + usb_unlink_urb (urb); + usb_free_urb (urb); + return status; + } + + // wait for command to finish + timeout = COMMAND_TIMEOUT; +#if 0 + while (timeout && edge_port->commandPending == TRUE) { + timeout = interruptible_sleep_on_timeout (&edge_port->wait_command, timeout); + } + + if (edge_port->commandPending == TRUE) { + /* command timed out */ + dbg(__FUNCTION__" - command timed out"); + status = -EINVAL; + } +#endif + return status; +} + + +/***************************************************************************** + * send_cmd_write_baud_rate + * this function sends the proper command to change the baud rate of the + * specified port. + *****************************************************************************/ +static int send_cmd_write_baud_rate (struct edgeport_port *edge_port, int baudRate) +{ + unsigned char *cmdBuffer; + unsigned char *currCmd; + int cmdLen = 0; + int divisor; + int status; + unsigned char number = edge_port->port->number; + + dbg(__FUNCTION__" - port = %d, baud = %d", number, baudRate); + + status = calc_baud_rate_divisor (baudRate, &divisor); + if (status) { + err(__FUNCTION__" - bad baud rate"); + return status; + } + + // Alloc memory for the string of commands. + cmdBuffer = kmalloc (0x100, GFP_KERNEL); + if (!cmdBuffer) { + err(__FUNCTION__" - kmalloc(%d) failed.\n", 0x100); + return -ENOMEM; + } + currCmd = cmdBuffer; + + // Enable access to divisor latch + MAKE_CMD_WRITE_REG( &currCmd, &cmdLen, number, LCR, LCR_DL_ENABLE ); + + // Write the divisor itself + MAKE_CMD_WRITE_REG( &currCmd, &cmdLen, number, DLL, LOW8 (divisor) ); + MAKE_CMD_WRITE_REG( &currCmd, &cmdLen, number, DLM, HIGH8(divisor) ); + + // Restore original value to disable access to divisor latch + MAKE_CMD_WRITE_REG( &currCmd, &cmdLen, number, LCR, edge_port->shadowLCR); + + status = write_cmd_usb(edge_port, cmdBuffer, cmdLen ); + + return status; +} + + +/***************************************************************************** + * calc_baud_rate_divisor + * this function calculates the proper baud rate divisor for the specified + * baud rate. + *****************************************************************************/ +static int calc_baud_rate_divisor (int baudrate, int *divisor) +{ + int i; + __u16 custom; + __u16 round1; + __u16 round; + + + dbg(__FUNCTION__" - %d", baudrate); + + for (i = 0; i < NUM_ENTRIES(DivisorTable); i++) { + if ( DivisorTable[i].BaudRate == baudrate ) { + *divisor = DivisorTable[i].Divisor; + return 0; + } + } + + // We have tried all of the standard baud rates + // lets try to calculate the divisor for this baud rate + // Make sure the baud rate is reasonable + if (baudrate > 75 && baudrate < 230400) { + // get divisor + custom = (__u16)(230400L / baudrate); + + // Check for round off + round1 = (__u16)(2304000L / baudrate); + round = (__u16)(round1 - (custom * 10)); + if (round > 4) { + custom++; + } + *divisor = custom; + + dbg(__FUNCTION__" - Baud %d = %d\n", baudrate, custom); + return 0; + } + + return -1; +} + + +/***************************************************************************** + * send_cmd_write_uart_register + * this function builds up a uart register message and sends to to the device. + *****************************************************************************/ +static int send_cmd_write_uart_register (struct edgeport_port *edge_port, __u8 regNum, __u8 regValue) +{ + unsigned char *cmdBuffer; + unsigned char *currCmd; + unsigned long cmdLen = 0; + int status; + + dbg (__FUNCTION__" - write to %s register 0x%02x", (regNum == MCR) ? "MCR" : "LCR", regValue); + + // Alloc memory for the string of commands. + cmdBuffer = kmalloc (0x10, GFP_KERNEL); + if (cmdBuffer == NULL ) { + return -ENOMEM; + } + + currCmd = cmdBuffer; + + // Build a cmd in the buffer to write the given register + MAKE_CMD_WRITE_REG(&currCmd, &cmdLen, edge_port->port->number, regNum, regValue); + + status = write_cmd_usb(edge_port, cmdBuffer, cmdLen); + + return status; +} + + +/***************************************************************************** + * change_port_settings + * This routine is called to set the UART on the device to match the specified + * new settings. + *****************************************************************************/ +static void change_port_settings (struct edgeport_port *edge_port, struct termios *old_termios) +{ + struct tty_struct *tty; + int baud; + unsigned cflag; + __u8 mask = 0xff; + __u8 lData; + __u8 lParity; + __u8 lStop; + __u8 rxFlow; + __u8 txFlow; + int status; + + dbg(__FUNCTION__" - port %d", edge_port->port->number); + + if ((!edge_port->open) && + (!edge_port->openPending)) { + dbg(__FUNCTION__" - port not opened"); + return; + } + + tty = edge_port->port->tty; + if ((!tty) || + (!tty->termios)) { + dbg(__FUNCTION__" - no tty structures"); + return; + } + + cflag = tty->termios->c_cflag; + + switch (cflag & CSIZE) { + case CS5: lData = LCR_BITS_5; mask = 0x1f; dbg(__FUNCTION__" - data bits = 5"); break; + case CS6: lData = LCR_BITS_6; mask = 0x3f; dbg(__FUNCTION__" - data bits = 6"); break; + case CS7: lData = LCR_BITS_7; mask = 0x7f; dbg(__FUNCTION__" - data bits = 7"); break; + default: + case CS8: lData = LCR_BITS_8; dbg(__FUNCTION__" - data bits = 8"); break; + } + + lParity = LCR_PAR_NONE; + if (cflag & PARENB) { + if (cflag & PARODD) { + lParity = LCR_PAR_ODD; + dbg(__FUNCTION__" - parity = odd"); + } else { + lParity = LCR_PAR_EVEN; + dbg(__FUNCTION__" - parity = even"); + } + } else { + dbg(__FUNCTION__" - parity = none"); + } + + if (cflag & CSTOPB) { + lStop = LCR_STOP_2; + dbg(__FUNCTION__" - stop bits = 2"); + } else { + lStop = LCR_STOP_1; + dbg(__FUNCTION__" - stop bits = 1"); + } + + /* figure out the flow control settings */ + rxFlow = txFlow = 0x00; + if (cflag & CRTSCTS) { + rxFlow |= IOSP_RX_FLOW_RTS; + txFlow |= IOSP_TX_FLOW_CTS; + dbg(__FUNCTION__" - RTS/CTS is enabled"); + } else { + dbg(__FUNCTION__" - RTS/CTS is disabled"); + } + + /* if we are implementing XON/XOFF, set the start and stop character in the device */ + if (I_IXOFF(tty) || I_IXON(tty)) { + unsigned char stop_char = STOP_CHAR(tty); + unsigned char start_char = START_CHAR(tty); + + { + send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_XON_CHAR, start_char); + send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_XOFF_CHAR, stop_char); + } + + /* if we are implementing INBOUND XON/XOFF */ + if (I_IXOFF(tty)) { + rxFlow |= IOSP_RX_FLOW_XON_XOFF; + dbg(__FUNCTION__" - INBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", start_char, stop_char); + } else { + dbg(__FUNCTION__" - INBOUND XON/XOFF is disabled"); + } + + /* if we are implementing OUTBOUND XON/XOFF */ + if (I_IXON(tty)) { + txFlow |= IOSP_TX_FLOW_XON_XOFF; + dbg(__FUNCTION__" - OUTBOUND XON/XOFF is enabled, XON = %2x, XOFF = %2x", start_char, stop_char); + } else { + dbg(__FUNCTION__" - OUTBOUND XON/XOFF is disabled"); + } + } + + /* Set flow control to the configured value */ + send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_RX_FLOW, rxFlow); + send_iosp_ext_cmd (edge_port, IOSP_CMD_SET_TX_FLOW, txFlow); + + + edge_port->shadowLCR &= ~(LCR_BITS_MASK | LCR_STOP_MASK | LCR_PAR_MASK); + edge_port->shadowLCR |= (lData | lParity | lStop); + + edge_port->validDataMask = mask; + + /* Send the updated LCR value to the EdgePort */ + status = send_cmd_write_uart_register(edge_port, LCR, edge_port->shadowLCR); + if (status != 0) { + return; + } + + /* set up the MCR register and send it to the EdgePort */ + edge_port->shadowMCR = MCR_MASTER_IE; + if (cflag & CBAUD) { + edge_port->shadowMCR |= (MCR_DTR | MCR_RTS); + } + status = send_cmd_write_uart_register(edge_port, MCR, edge_port->shadowMCR); + if (status != 0) { + return; + } + + /* Determine divisor based on baud rate */ + baud = tty_get_baud_rate(tty); + if (!baud) { + /* pick a default, any default... */ + baud = 9600; + } + + dbg(__FUNCTION__ " - baud rate = %d", baud); + status = send_cmd_write_baud_rate (edge_port, baud); + + return; +} + + +/**************************************************************************** + * unicode_to_ascii + * Turns a string from Unicode into ASCII. + * Doesn't do a good job with any characters that are outside the normal + * ASCII range, but it's only for debugging... + ****************************************************************************/ +static void unicode_to_ascii (char *string, short *unicode, int unicode_size) +{ + int i; + for (i = 0; i < unicode_size; ++i) { + string[i] = (char)(unicode[i]); + } + string[unicode_size] = 0x00; +} + + +/**************************************************************************** + * get_manufacturing_desc + * reads in the manufacturing descriptor and stores it into the serial + * structure. + ****************************************************************************/ +static void get_manufacturing_desc (struct edgeport_serial *edge_serial) +{ + int response; + + dbg("getting manufacturer descriptor"); + + response = rom_read (edge_serial->serial, (EDGE_MANUF_DESC_ADDR & 0xffff0000) >> 16, + (__u16)(EDGE_MANUF_DESC_ADDR & 0x0000ffff), EDGE_MANUF_DESC_LEN, + (__u8 *)(&edge_serial->manuf_descriptor)); + + if (response < 1) { + err("error in getting manufacturer descriptor"); + } else { + char string[30]; + dbg("**Manufacturer Descriptor"); + dbg(" RomSize: %dK", edge_serial->manuf_descriptor.RomSize); + dbg(" RamSize: %dK", edge_serial->manuf_descriptor.RamSize); + dbg(" CpuRev: %d", edge_serial->manuf_descriptor.CpuRev); + dbg(" BoardRev: %d", edge_serial->manuf_descriptor.BoardRev); + dbg(" NumPorts: %d", edge_serial->manuf_descriptor.NumPorts); + dbg(" DescDate: %d/%d/%d", edge_serial->manuf_descriptor.DescDate[0], edge_serial->manuf_descriptor.DescDate[1], edge_serial->manuf_descriptor.DescDate[2]+1900); + unicode_to_ascii (string, edge_serial->manuf_descriptor.SerialNumber, edge_serial->manuf_descriptor.SerNumLength/2-1); + dbg(" SerialNumber: %s", string); + unicode_to_ascii (string, edge_serial->manuf_descriptor.AssemblyNumber, edge_serial->manuf_descriptor.AssemblyNumLength/2-1); + dbg(" AssemblyNumber: %s", string); + unicode_to_ascii (string, edge_serial->manuf_descriptor.OemAssyNumber, edge_serial->manuf_descriptor.OemAssyNumLength/2-1); + dbg(" OemAssyNumber: %s", string); + dbg(" UartType: %d", edge_serial->manuf_descriptor.UartType); + dbg(" IonPid: %d", edge_serial->manuf_descriptor.IonPid); + dbg(" IonConfig: %d", edge_serial->manuf_descriptor.IonConfig); + } +} + + +/**************************************************************************** + * get_boot_desc + * reads in the bootloader descriptor and stores it into the serial + * structure. + ****************************************************************************/ +static void get_boot_desc (struct edgeport_serial *edge_serial) +{ + int response; + + dbg("getting boot descriptor"); + + response = rom_read (edge_serial->serial, (EDGE_BOOT_DESC_ADDR & 0xffff0000) >> 16, + (__u16)(EDGE_BOOT_DESC_ADDR & 0x0000ffff), EDGE_BOOT_DESC_LEN, + (__u8 *)(&edge_serial->boot_descriptor)); + + if (response < 1) { + err("error in getting boot descriptor"); + } else { + dbg("**Boot Descriptor:"); + dbg(" BootCodeLength: %d", edge_serial->boot_descriptor.BootCodeLength); + dbg(" MajorVersion: %d", edge_serial->boot_descriptor.MajorVersion); + dbg(" MinorVersion: %d", edge_serial->boot_descriptor.MinorVersion); + dbg(" BuildNumber: %d", edge_serial->boot_descriptor.BuildNumber); + dbg(" Capabilities: 0x%x", edge_serial->boot_descriptor.Capabilities); + dbg(" UConfig0: %d", edge_serial->boot_descriptor.UConfig0); + dbg(" UConfig1: %d", edge_serial->boot_descriptor.UConfig1); + } +} + + +/**************************************************************************** + * load_application_firmware + * This is called to load the application firmware to the device + ****************************************************************************/ +static void load_application_firmware (struct edgeport_serial *edge_serial) +{ + PEDGE_FIRMWARE_IMAGE_RECORD record; + unsigned char *firmware; + unsigned char *FirmwareImage; + int ImageSize; + int response; + + + switch (edge_serial->product_info.iDownloadFile) { + case EDGE_DOWNLOAD_FILE_I930: + dbg("downloading firmware version (930) %d.%d.%d", + OperationalCodeImageVersion_GEN1.MajorVersion, + OperationalCodeImageVersion_GEN1.MinorVersion, + OperationalCodeImageVersion_GEN1.BuildNumber); + firmware = &OperationalCodeImage_GEN1[0]; + FirmwareImage = &OperationalCodeImage_GEN1[0]; + ImageSize = sizeof(OperationalCodeImage_GEN1); + break; + + case EDGE_DOWNLOAD_FILE_80251: + dbg("downloading firmware version (80251) %d.%d.%d", + OperationalCodeImageVersion_GEN2.MajorVersion, + OperationalCodeImageVersion_GEN2.MinorVersion, + OperationalCodeImageVersion_GEN2.BuildNumber); + firmware = &OperationalCodeImage_GEN2[0]; + FirmwareImage = &OperationalCodeImage_GEN2[0]; + ImageSize = sizeof(OperationalCodeImage_GEN2); + break; + + case EDGE_DOWNLOAD_FILE_NONE: + dbg ("No download file specified, skipping download\n"); + return; + + default: + return; + } + + + for (;;) { + record = (PEDGE_FIRMWARE_IMAGE_RECORD)firmware; + response = sram_write (edge_serial->serial, record->ExtAddr, record->Addr, record->Len, &record->Data[0]); + if (response < 0) { + err("sram_write failed (%x, %x, %d)", record->ExtAddr, record->Addr, record->Len); + break; + } + firmware += sizeof (EDGE_FIRMWARE_IMAGE_RECORD) + record->Len; + if (firmware >= &FirmwareImage[ImageSize]) { + break; + } + } + + dbg("sending exec_dl_code"); + response = usb_control_msg (edge_serial->serial->dev, + usb_sndctrlpipe(edge_serial->serial->dev, 0), + USB_REQUEST_ION_EXEC_DL_CODE, + 0x40, 0x4000, 0x0001, NULL, 0, 3000); + + return; +} + + + + +/**************************************************************************** + * edge_startup + ****************************************************************************/ +static int edge_startup (struct usb_serial *serial) +{ + struct edgeport_serial *edge_serial; + struct edgeport_port *edge_port; + struct usb_device *dev; + int i; + + dev = serial->dev; + + /* create our private serial structure */ + edge_serial = kmalloc (sizeof(struct edgeport_serial), GFP_KERNEL); + if (edge_serial == NULL) { + err(__FUNCTION__" - Out of memory"); + return -ENOMEM; + } + memset (edge_serial, 0, sizeof(struct edgeport_serial)); + edge_serial->serial = serial; + serial->private = edge_serial; + + /* get the name for the device from the device */ + if ( (i = get_string(dev, dev->descriptor.iManufacturer, &edge_serial->name[0])) != 0) { + edge_serial->name[i-1] = ' '; + } + + get_string(dev, dev->descriptor.iProduct, &edge_serial->name[i]); + + info("%s detected", edge_serial->name); + + /* get the manufacturing descriptor for this device */ + get_manufacturing_desc (edge_serial); + + /* get the boot descriptor */ + get_boot_desc (edge_serial); + + get_product_info(edge_serial); + + /* set the number of ports from the manufacturing description */ + // FIXME should we override this??? + //serial->num_ports = serial->product_info.NumPorts; + if (edge_serial->product_info.NumPorts != serial->num_ports) { + warn(__FUNCTION__ " - Device Reported %d serial ports vs core thinking we have %d ports, email greg@kroah.com this info.", edge_serial->product_info.NumPorts, serial->num_ports); + } + + dbg(__FUNCTION__ " - time 1 %ld", jiffies); + + /* now load the application firmware into this device */ + load_application_firmware (edge_serial); + + dbg(__FUNCTION__ " - time 2 %ld", jiffies); + + /* Check current Edgeport EEPROM and update if necessary */ + update_edgeport_E2PROM (edge_serial); + + dbg(__FUNCTION__ " - time 3 %ld", jiffies); + + /* set the configuration to use #1 */ +// dbg("set_configuration 1"); +// usb_set_configuration (dev, 1); + + /* we set up the pointers to the endpoints in the edge_open function, + * as the structures aren't created yet. */ + + /* set up our port private structures */ + for (i = 0; i < serial->num_ports; ++i) { + edge_port = kmalloc (sizeof(struct edgeport_port), GFP_KERNEL); + if (edge_port == NULL) { + err(__FUNCTION__" - Out of memory"); + return -ENOMEM; + } + memset (edge_port, 0, sizeof(struct edgeport_port)); + edge_port->port = &serial->port[i]; + serial->port[i].private = edge_port; + } + + return 0; +} + + + +/**************************************************************************** + * usb_edgeport_disconnect + * This function is called whenever the device is removed from the usb bus. + ****************************************************************************/ +//static void usb_edgeport_disconnect (struct usb_device *dev, void *ptr) +static void edge_shutdown (struct usb_serial *serial) +{ + int i; + + dbg (__FUNCTION__); + + /* stop reads and writes on all ports */ + for (i=0; i < serial->num_ports; ++i) { + while (serial->port[i].open_count > 0) { + edge_close (&serial->port[i], NULL); + } + } + + /* free up any memory that we allocated */ + // FIXME + +} + + +/**************************************************************************** + * edgeport_init + * This is called by the module subsystem, or on startup to initialize us + ****************************************************************************/ +int __init edgeport_init(void) +{ + usb_serial_register (&edgeport_4_device); + usb_serial_register (&rapidport_4_device); + usb_serial_register (&edgeport_4t_device); + usb_serial_register (&edgeport_2_device); + usb_serial_register (&edgeport_4i_device); + usb_serial_register (&edgeport_2i_device); + usb_serial_register (&edgeport_prl_device); + usb_serial_register (&edgeport_421_device); + usb_serial_register (&edgeport_21_device); + usb_serial_register (&edgeport_8dual_device); + usb_serial_register (&edgeport_8_device); + usb_serial_register (&edgeport_2din_device); + usb_serial_register (&edgeport_4din_device); + usb_serial_register (&edgeport_16dual_device); + usb_serial_register (&edgeport_compat_id_device); + usb_serial_register (&edgeport_8i_device); + info(DRIVER_VERSION " " DRIVER_AUTHOR); + info(DRIVER_DESC); + return 0; +} + + + +/**************************************************************************** + * edgeport_exit + * Called when the driver is about to be unloaded. + ****************************************************************************/ +void __exit edgeport_exit (void) +{ + usb_serial_deregister (&edgeport_4_device); + usb_serial_deregister (&rapidport_4_device); + usb_serial_deregister (&edgeport_4t_device); + usb_serial_deregister (&edgeport_2_device); + usb_serial_deregister (&edgeport_4i_device); + usb_serial_deregister (&edgeport_2i_device); + usb_serial_deregister (&edgeport_prl_device); + usb_serial_deregister (&edgeport_421_device); + usb_serial_deregister (&edgeport_21_device); + usb_serial_deregister (&edgeport_8dual_device); + usb_serial_deregister (&edgeport_8_device); + usb_serial_deregister (&edgeport_2din_device); + usb_serial_deregister (&edgeport_4din_device); + usb_serial_deregister (&edgeport_16dual_device); + usb_serial_deregister (&edgeport_compat_id_device); + usb_serial_deregister (&edgeport_8i_device); +} + +module_init(edgeport_init); +module_exit(edgeport_exit); + +/* Module information */ +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); + +MODULE_PARM(debug, "i"); +MODULE_PARM_DESC(debug, "Debug enabled or not"); + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/io_edgeport.h linux.20p6/drivers/usb/serial/io_edgeport.h --- linux.vanilla/drivers/usb/serial/io_edgeport.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/usb/serial/io_edgeport.h Mon Jun 18 08:11:10 2001 @@ -0,0 +1,152 @@ +/************************************************************************ + * + * io_edgeport.h Edgeport Linux Interface definitions + * + * Copyright (c) 2000 Inside Out Networks, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * + ************************************************************************/ + +#if !defined(_IO_EDGEPORT_H_) +#define _IO_EDGEPORT_H_ + + +#define MAX_RS232_PORTS 8 /* Max # of RS-232 ports per device */ + +/* typedefs that the insideout headers need */ +#ifndef TRUE + #define TRUE (1) +#endif +#ifndef FALSE + #define FALSE (0) +#endif +#ifndef MIN + #define MIN(a,b) (((a)<(b))?(a):(b)) +#endif +#ifndef MAX + #define MAX(a,b) (((a)>(b))?(a):(b)) +#endif +#ifndef max + #define max MAX +#endif + +#ifndef LOW8 + #define LOW8(a) ((unsigned char)(a & 0xff)) +#endif +#ifndef HIGH8 + #define HIGH8(a) ((unsigned char)((a & 0xff00) >> 8)) +#endif +#ifndef NUM_ENTRIES + #define NUM_ENTRIES(x) (sizeof(x)/sizeof((x)[0])) +#endif + +#ifndef __KERNEL__ +#define __KERNEL__ +#endif + +#include "io_usbvend.h" + + + +/* The following table is used to map the USBx port number to + * the device serial number (or physical USB path), */ +#define MAX_EDGEPORTS 64 + +struct comMapper { + char SerialNumber[MAX_SERIALNUMBER_LEN+1]; /* Serial number/usb path */ + int numPorts; /* Number of ports */ + int Original[MAX_RS232_PORTS]; /* Port numbers set by IOCTL */ + int Port[MAX_RS232_PORTS]; /* Actual used port numbers */ +}; + + +#define EDGEPORT_CONFIG_DEVICE "/proc/edgeport" + +/* /proc/edgeport Interface + * This interface uses read/write/lseek interface to talk to the edgeport driver + * the following read functions are supported: */ +#define PROC_GET_MAPPING_TO_PATH 1 +#define PROC_GET_COM_ENTRY 2 +#define PROC_GET_EDGE_MANUF_DESCRIPTOR 3 +#define PROC_GET_BOOT_DESCRIPTOR 4 +#define PROC_GET_PRODUCT_INFO 5 +#define PROC_GET_STRINGS 6 +#define PROC_GET_CURRENT_COM_MAPPING 7 + +/* The parameters to the lseek() for the read is: */ +#define PROC_READ_SETUP(Command, Argument) ((Command) + ((Argument)<<8)) + + +/* the following write functions are supported: */ +#define PROC_SET_COM_MAPPING 1 +#define PROC_SET_COM_ENTRY 2 + + +/* The following sturcture is passed to the write */ +struct procWrite { + int Command; + union { + struct comMapper Entry; + int ComMappingBasedOnUSBPort; /* Boolean value */ + } u; +}; + +/* + * Product information read from the Edgeport + */ +struct edgeport_product_info { + __u16 ProductId; /* Product Identifier */ + __u8 NumPorts; /* Number of ports on edgeport */ + __u8 ProdInfoVer; /* What version of structure is this? */ + + __u32 IsServer :1; /* Set if Server */ + __u32 IsRS232 :1; /* Set if RS-232 ports exist */ + __u32 IsRS422 :1; /* Set if RS-422 ports exist */ + __u32 IsRS485 :1; /* Set if RS-485 ports exist */ + __u32 IsReserved :28; /* Reserved for later expansion */ + + __u8 RomSize; /* Size of ROM/E2PROM in K */ + __u8 RamSize; /* Size of external RAM in K */ + __u8 CpuRev; /* CPU revision level (chg only if s/w visible) */ + __u8 BoardRev; /* PCB revision level (chg only if s/w visible) */ + + __u8 BootMajorVersion; /* Boot Firmware version: xx. */ + __u8 BootMinorVersion; /* yy. */ + __u16 BootBuildNumber; /* zzzz (LE format) */ + + __u8 FirmwareMajorVersion; /* Operational Firmware version:xx. */ + __u8 FirmwareMinorVersion; /* yy. */ + __u16 FirmwareBuildNumber; /* zzzz (LE format) */ + + __u8 ManufactureDescDate[3]; /* MM/DD/YY when descriptor template was compiled */ + __u8 Unused1[1]; /* Available */ + + __u8 iDownloadFile; /* What to download to EPiC device */ + __u8 Unused2[2]; /* Available */ +}; + +/* + * Edgeport Stringblock String locations + */ +#define EDGESTRING_MANUFNAME 1 /* Manufacture Name */ +#define EDGESTRING_PRODNAME 2 /* Product Name */ +#define EDGESTRING_SERIALNUM 3 /* Serial Number */ +#define EDGESTRING_ASSEMNUM 4 /* Assembly Number */ +#define EDGESTRING_OEMASSEMNUM 5 /* OEM Assembly Number */ +#define EDGESTRING_MANUFDATE 6 /* Manufacture Date */ +#define EDGESTRING_ORIGSERIALNUM 7 /* Serial Number */ + +struct string_block { + __u16 NumStrings; /* Number of strings in block */ + __u16 Strings[1]; /* Start of string block */ +}; + +typedef struct string_block STRING_BLOCK, *PSTRING_BLOCK; + + +#endif diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/io_fw_boot.h linux.20p6/drivers/usb/serial/io_fw_boot.h --- linux.vanilla/drivers/usb/serial/io_fw_boot.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/usb/serial/io_fw_boot.h Mon Jun 18 08:11:10 2001 @@ -0,0 +1,558 @@ +//************************************************************** +//* Edgeport/4 Binary Image +//* Generated by HEX2C v1.06 +//* Copyright(c) 1998 Inside Out Networks, 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. +//************************************************************** + + +//Image structure definition +#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD) +#define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD + typedef struct _EDGE_FIRMWARE_IMAGE_RECORD + { + unsigned short ExtAddr; + unsigned short Addr; + unsigned short Len; + unsigned char Data[0]; + } EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD; + + typedef struct _EDGE_FIRMWARE_VERSION_INFO + { + unsigned char MajorVersion; + unsigned char MinorVersion; + unsigned short BuildNumber; + } EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO; + +#endif + +#if !defined(IMAGE_ARRAY_NAME) +#define IMAGE_ARRAY_NAME FirmwareImage +#define IMAGE_VERSION_NAME FirmwareImageVersion +#endif + +static unsigned char IMAGE_ARRAY_NAME[] = { + +// Segment #1, Start Address 00ff0000, Length 6 +0xff,0x00,0x00,0x00,0x06,0x00, + 0x02, 0x00, 0x80, 0x02, 0x00, 0x03, + +// Segment #2, Start Address 00ff000b, Length 3 +0xff,0x00,0x0b,0x00,0x03,0x00, + 0x02, 0x00, 0x0b, + +// Segment #3, Start Address 00ff0013, Length 3 +0xff,0x00,0x13,0x00,0x03,0x00, + 0x02, 0x01, 0xb8, + +// Segment #4, Start Address 00ff001b, Length 3 +0xff,0x00,0x1b,0x00,0x03,0x00, + 0x02, 0x00, 0x1b, + +// Segment #5, Start Address 00ff0023, Length 3 +0xff,0x00,0x23,0x00,0x03,0x00, + 0x02, 0x00, 0x23, + +// Segment #6, Start Address 00ff002b, Length 3 +0xff,0x00,0x2b,0x00,0x03,0x00, + 0x02, 0x00, 0x2b, + +// Segment #7, Start Address 00ff0033, Length 3 +0xff,0x00,0x33,0x00,0x03,0x00, + 0x02, 0x00, 0x33, + +// Segment #8, Start Address 00ff003b, Length 3 +0xff,0x00,0x3b,0x00,0x03,0x00, + 0x02, 0x00, 0x3b, + +// Segment #9, Start Address 00ff0043, Length 3 +0xff,0x00,0x43,0x00,0x03,0x00, + 0x02, 0x01, 0xbd, + +// Segment #10, Start Address 00ff004b, Length 3 +0xff,0x00,0x4b,0x00,0x03,0x00, + 0x02, 0x01, 0xd0, + +// Segment #11, Start Address 00ff0053, Length 3 +0xff,0x00,0x53,0x00,0x03,0x00, + 0x02, 0x01, 0x21, + +// Segment #12, Start Address 00ff007b, Length 3 +0xff,0x00,0x7b,0x00,0x03,0x00, + 0x02, 0x00, 0x7b, + +// Segment #13, Start Address 00ff0080, Length 358 +0xff,0x00,0x80,0x00,0x66,0x01, + 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x3f, 0xf2, 0x7e, 0xf8, 0x00, 0x23, 0x7e, 0x00, 0x01, 0x7e, 0x10, + 0x00, 0x12, 0x07, 0x5f, 0x69, 0x20, 0x00, 0x0a, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x05, 0x75, 0x90, + 0x0d, 0x80, 0x03, 0x75, 0x90, 0x1d, 0xd2, 0xb5, 0x7e, 0x00, 0x00, 0xa5, 0xd8, 0xfd, 0x75, 0xa8, + 0x00, 0x75, 0xb1, 0x00, 0xa9, 0xd5, 0x87, 0xca, 0x29, 0x12, 0x09, 0xcc, 0x12, 0x09, 0xa0, 0xf5, + 0x09, 0x7a, 0xa1, 0x20, 0x12, 0x01, 0xe6, 0xda, 0x29, 0xa9, 0xd0, 0xc7, 0x7e, 0x00, 0x05, 0x7a, + 0x01, 0xf1, 0x75, 0xe1, 0x10, 0xa9, 0xd7, 0xf4, 0xa9, 0xd7, 0xe4, 0xa5, 0xd8, 0xf1, 0x75, 0xf1, + 0x00, 0x75, 0xe1, 0x3f, 0x75, 0xa2, 0x03, 0x75, 0xa3, 0x00, 0x75, 0xc0, 0x00, 0x75, 0xc1, 0x00, + 0xa9, 0xd1, 0xb1, 0xa9, 0xd0, 0xb1, 0xa9, 0xd5, 0xd3, 0xd2, 0xaf, 0xe4, 0x7e, 0x04, 0x28, 0x00, + 0x8d, 0xef, 0x1b, 0x04, 0x78, 0xfa, 0x04, 0xa9, 0x34, 0xd3, 0x03, 0x30, 0xe0, 0xee, 0xbe, 0x24, + 0x00, 0x00, 0x78, 0x05, 0x63, 0x90, 0x30, 0x80, 0xe3, 0xb2, 0x95, 0x80, 0xdf, 0xbe, 0xb0, 0x02, + 0x22, 0xc0, 0xd0, 0xa9, 0x20, 0xdf, 0x0f, 0xa9, 0x31, 0xdf, 0x03, 0x02, 0x01, 0xb5, 0x75, 0x08, + 0x01, 0x12, 0x08, 0x33, 0x80, 0xfe, 0x75, 0x08, 0xfe, 0x12, 0x08, 0x33, 0x75, 0xa8, 0x00, 0x7e, + 0xb3, 0x3f, 0xf2, 0x30, 0xe0, 0x4b, 0x30, 0x01, 0x46, 0xc2, 0x92, 0x7e, 0x24, 0x80, 0x00, 0x7e, + 0x11, 0x09, 0x74, 0x08, 0x19, 0xb2, 0x00, 0x10, 0x74, 0x0e, 0x19, 0xb2, 0x00, 0x04, 0x2e, 0x24, + 0x01, 0x00, 0xa5, 0xd9, 0xed, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0xe4, 0xd5, 0xe0, 0xfd, + 0x09, 0xb2, 0x00, 0x08, 0x20, 0xe0, 0x0a, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00, 0x18, 0x80, + 0xeb, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xe4, 0x43, 0x90, 0x30, 0xd2, 0xaa, 0x80, 0x05, 0xd2, + 0xaa, 0x43, 0x90, 0x34, 0xd2, 0xaf, 0xa9, 0xd1, 0x87, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa9, 0x11, + 0xdf, 0x03, 0xa9, 0xd2, 0xdf, 0x75, 0x08, 0xff, 0x12, 0x08, 0x33, 0xc0, 0xd1, 0xca, 0x02, 0xff, + 0xca, 0x06, 0x83, 0x00, 0x32, 0xd0, 0xd0, 0x32, 0xc2, 0x8b, 0xc2, 0xaa, 0x32, 0x75, 0x08, 0x08, + 0x12, 0x08, 0x33, 0xa9, 0xc0, 0xb1, 0xa9, 0xc5, 0xd3, 0xa9, 0xc6, 0xd3, 0xa9, 0xd2, 0xb1, 0x32, + 0xca, 0xb8, 0x75, 0x08, 0x02, 0x12, 0x08, 0x33, 0xe5, 0xc0, 0x54, 0x03, 0x68, 0x05, 0x12, 0x01, + 0xee, 0x80, 0xf5, 0xda, 0xb8, 0x32, + +// Segment #14, Start Address 00ff1bca, Length 1 +0xff,0x00,0xca,0x1b,0x01,0x00, + 0x00, + +// Segment #15, Start Address 00ff01e6, Length 1613 +0xff,0x00,0xe6,0x01,0x4d,0x06, + 0xe4, 0x7a, 0xb3, 0x3f, 0xf1, 0x02, 0x02, 0x63, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0xca, 0x3b, + 0xca, 0x4b, 0xca, 0x5b, 0xca, 0x6b, 0xca, 0x7b, 0xca, 0xeb, 0xc0, 0xf1, 0x7e, 0xb3, 0x01, 0x2b, + 0xb4, 0x00, 0x02, 0x80, 0x19, 0xb4, 0x01, 0x16, 0x30, 0xc0, 0x08, 0x75, 0xf1, 0x00, 0x12, 0x02, + 0x4d, 0x80, 0x1f, 0x30, 0xc1, 0x1c, 0x75, 0xf1, 0x00, 0x12, 0x02, 0xde, 0x80, 0x14, 0x30, 0xc1, + 0x08, 0x75, 0xf1, 0x00, 0x12, 0x02, 0xde, 0x80, 0x09, 0x30, 0xc0, 0x06, 0x75, 0xf1, 0x00, 0x12, + 0x02, 0x4d, 0xd0, 0xf1, 0xda, 0xeb, 0xda, 0x7b, 0xda, 0x6b, 0xda, 0x5b, 0xda, 0x4b, 0xda, 0x3b, + 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0xc2, 0xc0, 0x7e, 0xb3, 0x01, 0x2b, 0xb4, 0x02, 0x07, + 0x12, 0x02, 0x6f, 0x02, 0x02, 0x63, 0x22, 0xb4, 0x01, 0xfc, 0x02, 0x02, 0xa9, 0x7e, 0x00, 0x00, + 0x7a, 0x03, 0x01, 0x2b, 0x7a, 0x03, 0x01, 0x2c, 0x22, 0x7e, 0xb3, 0x01, 0x23, 0x54, 0x60, 0x60, + 0x05, 0xb4, 0x40, 0x15, 0x80, 0x13, 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x05, 0x0c, 0x75, 0x08, 0x71, + 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01, 0x26, 0xf5, 0x8f, 0x22, 0x75, 0xf6, 0x00, 0x22, 0xbe, 0x57, + 0x01, 0x29, 0x28, 0x04, 0x7e, 0x57, 0x01, 0x29, 0x7a, 0x0f, 0x01, 0x2e, 0x7a, 0x57, 0x01, 0x32, + 0x02, 0x02, 0xa9, 0x7e, 0xef, 0x01, 0x2e, 0x7e, 0xf7, 0x01, 0x32, 0x7e, 0x07, 0x01, 0x32, 0x4d, + 0x00, 0x68, 0x21, 0x7e, 0x00, 0x00, 0x7e, 0xeb, 0xb0, 0xf5, 0xf3, 0xa3, 0xa5, 0x08, 0x1b, 0xf4, + 0x68, 0x04, 0xa5, 0xb8, 0x08, 0xf0, 0x7a, 0xef, 0x01, 0x2e, 0x7a, 0xf7, 0x01, 0x32, 0x75, 0x08, + 0x06, 0x12, 0x08, 0x33, 0x7a, 0x01, 0xf6, 0x22, 0xc2, 0xc1, 0x75, 0x08, 0x03, 0x12, 0x08, 0x33, + 0xa9, 0x36, 0xe2, 0x16, 0xe5, 0xf5, 0x54, 0xc0, 0x68, 0x07, 0xa9, 0xd7, 0xf4, 0xa9, 0x27, 0xf4, + 0xfc, 0x53, 0xe1, 0x3f, 0x43, 0xf2, 0x88, 0x02, 0x03, 0x55, 0x7e, 0xb3, 0x01, 0x2c, 0xb4, 0x02, + 0x0f, 0xa9, 0xd4, 0xe4, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x01, 0x2c, 0x7a, 0xb3, 0x01, 0x2b, 0x22, + 0xb4, 0x01, 0x39, 0x7e, 0x21, 0xe6, 0x7c, 0x32, 0x7e, 0x13, 0x01, 0x2d, 0x2c, 0x21, 0x7a, 0x23, + 0x01, 0x2d, 0x7e, 0x00, 0x00, 0x2e, 0x04, 0x01, 0x34, 0xe5, 0xe3, 0x7a, 0x09, 0xb0, 0x0b, 0x04, + 0xa5, 0xdb, 0xf6, 0xa9, 0xd4, 0xe4, 0x75, 0x08, 0x70, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01, 0x2d, + 0x7e, 0xa3, 0x01, 0x2a, 0xbc, 0xab, 0x78, 0x03, 0x12, 0x03, 0xec, 0x22, 0x02, 0x07, 0x55, 0xe5, + 0xe6, 0xb4, 0x08, 0x65, 0xa9, 0xc4, 0xe2, 0x7e, 0x01, 0xe3, 0x7e, 0x11, 0xe3, 0x7e, 0x31, 0xe3, + 0x7e, 0x21, 0xe3, 0x7e, 0x51, 0xe3, 0x7e, 0x41, 0xe3, 0x7e, 0x71, 0xe3, 0x7e, 0x61, 0xe3, 0x7a, + 0x0f, 0x01, 0x23, 0x7a, 0x1f, 0x01, 0x27, 0x75, 0x08, 0x04, 0x12, 0x08, 0x33, 0x7a, 0x01, 0x08, + 0x12, 0x08, 0x33, 0x7a, 0x11, 0x08, 0x12, 0x08, 0x33, 0x7a, 0x21, 0x08, 0x12, 0x08, 0x33, 0x7a, + 0x31, 0x08, 0x12, 0x08, 0x33, 0x7a, 0x41, 0x08, 0x12, 0x08, 0x33, 0x7a, 0x51, 0x08, 0x12, 0x08, + 0x33, 0x7a, 0x61, 0x08, 0x12, 0x08, 0x33, 0x7a, 0x71, 0x08, 0x12, 0x08, 0x33, 0xa9, 0xd4, 0xe4, + 0xa9, 0xd7, 0xf4, 0xa9, 0xc6, 0xe2, 0x12, 0x03, 0xc0, 0x22, 0x6d, 0x00, 0x7e, 0x14, 0x01, 0x02, + 0x7a, 0x07, 0x01, 0x32, 0x7a, 0x03, 0x01, 0x2d, 0x7e, 0xb3, 0x01, 0x23, 0x20, 0xe7, 0x0f, 0x7a, + 0x23, 0x01, 0x2c, 0x7a, 0x33, 0x01, 0x2b, 0xbe, 0x07, 0x01, 0x29, 0x68, 0x09, 0x22, 0x7a, 0x33, + 0x01, 0x2c, 0x7a, 0x23, 0x01, 0x2b, 0x7e, 0xb3, 0x01, 0x23, 0x54, 0xe3, 0x23, 0x23, 0x30, 0xe0, + 0x02, 0xd2, 0xe5, 0x30, 0xe7, 0x02, 0xd2, 0xe4, 0x30, 0xe5, 0x06, 0x30, 0xe4, 0x03, 0x02, 0x07, + 0x55, 0x54, 0x3e, 0xf5, 0xf0, 0x03, 0x54, 0x1f, 0xc3, 0x25, 0xf0, 0x90, 0x04, 0x18, 0x75, 0x84, + 0xff, 0x73, 0x02, 0x05, 0x6c, 0x02, 0x04, 0x60, 0x02, 0x06, 0x09, 0x02, 0x06, 0x24, 0x02, 0x05, + 0x05, 0x02, 0x04, 0xc6, 0x02, 0x06, 0x3d, 0x02, 0x06, 0x3d, 0x02, 0x06, 0x40, 0x02, 0x06, 0x40, + 0x02, 0x06, 0x40, 0x02, 0x06, 0x40, 0x02, 0x06, 0x40, 0x02, 0x06, 0x40, 0x02, 0x06, 0x40, 0x02, + 0x06, 0x40, 0x02, 0x06, 0x46, 0x02, 0x06, 0xfa, 0x02, 0x06, 0x43, 0x02, 0x06, 0x43, 0x02, 0x06, + 0x43, 0x02, 0x06, 0x43, 0x02, 0x06, 0x43, 0x02, 0x06, 0x43, 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x06, + 0x2a, 0x7e, 0xb3, 0x01, 0x25, 0x60, 0x56, 0x7c, 0x0b, 0x7e, 0x13, 0x01, 0x26, 0x7e, 0x17, 0x01, + 0x27, 0x75, 0x08, 0x72, 0x12, 0x08, 0x33, 0x7a, 0x01, 0x08, 0x12, 0x08, 0x33, 0x7a, 0x11, 0x08, + 0x12, 0x08, 0x33, 0x12, 0x07, 0x5f, 0x40, 0x35, 0x02, 0x02, 0x94, 0xb4, 0x08, 0x10, 0x75, 0x08, + 0x74, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x3f, 0xf1, 0xf5, 0xf3, 0x75, 0xf6, 0x01, 0x22, 0xb4, 0x00, + 0x1c, 0x75, 0x08, 0x75, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x3f, 0xf2, 0x30, 0xe0, 0x05, 0x75, 0xf3, + 0x02, 0x80, 0x03, 0x75, 0xf3, 0x00, 0x75, 0xf3, 0x00, 0x75, 0xf6, 0x02, 0x22, 0x02, 0x07, 0x55, + 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x00, 0x35, 0x75, 0x08, 0x76, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01, + 0x28, 0x54, 0x0f, 0xf5, 0xf1, 0x7e, 0xb3, 0x01, 0x28, 0x20, 0xe7, 0x09, 0xe5, 0xe1, 0x30, 0xe7, + 0x0d, 0x74, 0x01, 0x80, 0x0b, 0xe5, 0xe1, 0x30, 0xe6, 0x04, 0x74, 0x01, 0x80, 0x02, 0x74, 0x00, + 0x53, 0xf1, 0x80, 0xf5, 0xf3, 0x75, 0xf3, 0x00, 0x75, 0xf6, 0x02, 0x22, 0x02, 0x07, 0x55, 0xc0, + 0xf1, 0x7e, 0xb3, 0x01, 0x28, 0x54, 0x0f, 0x42, 0xf1, 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x00, 0x45, + 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x01, 0x24, 0x75, 0x08, 0x77, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01, + 0x28, 0x54, 0x0f, 0x78, 0x05, 0x53, 0xe1, 0x3f, 0x80, 0x37, 0x7e, 0xb3, 0x01, 0x28, 0x20, 0xe7, + 0x05, 0x53, 0xe1, 0x7f, 0x80, 0x2b, 0x53, 0xe1, 0xbf, 0x80, 0x26, 0xb4, 0x03, 0x17, 0x75, 0x08, + 0x78, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01, 0x28, 0x20, 0xe7, 0x05, 0x43, 0xe1, 0x80, 0x80, 0x11, + 0x43, 0xe1, 0x40, 0x80, 0x0c, 0x43, 0xe1, 0xc0, 0xd0, 0xf1, 0x75, 0x08, 0x07, 0x12, 0x08, 0x33, + 0x22, 0xd0, 0xf1, 0x02, 0x02, 0x90, 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x09, 0x23, 0x75, 0x08, 0x79, + 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01, 0x26, 0xbe, 0xb3, 0x3f, 0xf1, 0x68, 0x11, 0xca, 0xb8, 0xc0, + 0xf1, 0x12, 0x01, 0x1d, 0xd0, 0xf1, 0xda, 0xb8, 0x50, 0x76, 0x7a, 0xb3, 0x3f, 0xf1, 0x80, 0x6d, + 0xb4, 0x05, 0x08, 0x75, 0x08, 0x7a, 0x12, 0x08, 0x33, 0x80, 0x62, 0xb4, 0x03, 0x19, 0x75, 0x08, + 0x7b, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x01, 0x55, 0x7e, 0xb3, 0x3f, 0xf2, 0x44, + 0x01, 0x7a, 0xb3, 0x3f, 0xf2, 0x80, 0x46, 0xb4, 0x01, 0x19, 0x75, 0x08, 0x7c, 0x12, 0x08, 0x33, + 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x01, 0x39, 0x7e, 0xb3, 0x3f, 0xf2, 0x54, 0xfe, 0x7a, 0xb3, 0x3f, + 0xf2, 0x80, 0x2a, 0xb4, 0x07, 0x2a, 0x7e, 0xb3, 0x01, 0x25, 0x60, 0x24, 0x7c, 0x0b, 0x7e, 0x13, + 0x01, 0x26, 0x7e, 0x17, 0x01, 0x27, 0x75, 0x08, 0x73, 0x12, 0x08, 0x33, 0x7a, 0x01, 0x08, 0x12, + 0x08, 0x33, 0x7a, 0x11, 0x08, 0x12, 0x08, 0x33, 0x12, 0x07, 0x8b, 0x40, 0x03, 0x02, 0x02, 0x90, + 0x02, 0x07, 0x55, 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x0b, 0xf6, 0x75, 0x08, 0x7d, 0x12, 0x08, 0x33, + 0x7e, 0xb3, 0x01, 0x26, 0x7e, 0xa3, 0x01, 0x28, 0x4c, 0xab, 0x78, 0xe4, 0x80, 0xdf, 0x7e, 0xb3, + 0x01, 0x24, 0xb4, 0x0a, 0xdb, 0x75, 0x08, 0x7e, 0x12, 0x08, 0x33, 0x7e, 0xb3, 0x01, 0x26, 0x70, + 0xcf, 0xf5, 0xf3, 0x75, 0xf6, 0x01, 0x22, 0x02, 0x07, 0x55, 0x02, 0x07, 0x55, 0x02, 0x07, 0x55, + 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x04, 0x20, 0x75, 0x08, 0xc3, 0x12, 0x08, 0x33, 0x7e, 0x04, 0x00, + 0x01, 0x7e, 0x17, 0x01, 0x25, 0x7e, 0x18, 0x01, 0x34, 0x7a, 0x1c, 0x00, 0x00, 0x7e, 0x47, 0x01, + 0x29, 0x12, 0x08, 0x3f, 0x02, 0x06, 0xf4, 0xb4, 0x06, 0x3a, 0x75, 0x08, 0xc1, 0x12, 0x08, 0x33, + 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0xfe, 0x7d, 0xca, 0x7e, 0xd7, 0x01, 0x25, 0x7e, 0x78, + 0x01, 0x34, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x77, 0x01, 0x29, 0x75, 0x08, 0xc1, 0x12, 0x08, 0x33, + 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x12, 0x08, 0xd6, 0xd0, 0x87, 0xd0, 0xa8, + 0x40, 0x4f, 0x80, 0x4a, 0xb4, 0x00, 0x1c, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x12, 0x02, 0x90, 0xe4, + 0x8d, 0xef, 0x8d, 0xef, 0x8d, 0xef, 0xd5, 0xe0, 0xf7, 0xc0, 0xd1, 0xca, 0x02, 0xff, 0xca, 0x06, + 0x00, 0x00, 0x32, 0xb4, 0x09, 0x12, 0x7e, 0x57, 0x01, 0x25, 0x4d, 0x55, 0x68, 0x05, 0xa9, 0xd2, + 0xb1, 0x80, 0x03, 0xa9, 0xc2, 0xb1, 0x80, 0x16, 0xb4, 0x07, 0x16, 0xc2, 0xaf, 0x7e, 0x07, 0x01, + 0x27, 0x7e, 0x17, 0x01, 0x25, 0xc0, 0xd1, 0xca, 0x18, 0xca, 0x38, 0xca, 0x28, 0x32, 0x02, 0x02, + 0x90, 0x02, 0x07, 0x55, 0x7e, 0xb3, 0x01, 0x24, 0xb4, 0x03, 0x15, 0x75, 0x08, 0xc2, 0x12, 0x08, + 0x33, 0x7e, 0x04, 0x00, 0x01, 0x7e, 0x17, 0x01, 0x25, 0x7e, 0x57, 0x01, 0x29, 0x02, 0x02, 0x94, + 0xb4, 0x05, 0x39, 0x75, 0x08, 0xc0, 0x12, 0x08, 0x33, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9, + 0xd5, 0x87, 0x7e, 0x08, 0x01, 0x34, 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x24, 0x00, 0xfe, 0x7e, 0x37, + 0x01, 0x25, 0x7e, 0x47, 0x01, 0x29, 0x12, 0x08, 0x3f, 0xd0, 0x87, 0xd0, 0xa8, 0x7e, 0x08, 0x01, + 0x34, 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x57, 0x01, 0x29, 0x02, 0x02, 0x94, 0x02, 0x07, 0x55, 0x75, + 0x08, 0x07, 0x12, 0x08, 0x33, 0x43, 0xe1, 0xc0, 0x22, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9, + 0xd5, 0x87, 0x12, 0x07, 0xca, 0x40, 0x19, 0x7e, 0x08, 0x01, 0x34, 0x7a, 0x0c, 0x00, 0x00, 0xca, + 0x0b, 0xca, 0x49, 0x12, 0x08, 0x3f, 0xda, 0x59, 0xda, 0x0b, 0xd0, 0x87, 0xd0, 0xa8, 0xc3, 0x22, + 0xd0, 0x87, 0xd0, 0xa8, 0x22, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x12, 0x07, + 0xca, 0x40, 0x2b, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0xfe, 0x7f, 0x61, 0x7e, 0x78, 0x01, + 0x34, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x77, 0x01, 0x29, 0xbd, 0x74, 0x78, 0x11, 0x75, 0x08, 0xc1, + 0x12, 0x08, 0x33, 0x12, 0x08, 0xd6, 0x40, 0x06, 0xd0, 0x87, 0xd0, 0xa8, 0xc3, 0x22, 0xd0, 0x87, + 0xd0, 0xa8, 0xd3, 0x22, 0x7e, 0x24, 0x00, 0xfe, 0x7e, 0x34, 0x7f, 0xca, 0x0b, 0x1a, 0x50, 0xc5, + 0xf0, 0x7d, 0x62, 0x7d, 0x75, 0x7d, 0x87, 0x7e, 0x34, 0x7f, 0x03, 0x7e, 0x1b, 0xb0, 0xbc, 0x0b, + 0x50, 0x49, 0x3e, 0x00, 0x3e, 0x00, 0x0a, 0x50, 0x2d, 0x75, 0x0b, 0x3a, 0x30, 0x69, 0x53, 0x00, + 0x02, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbc, 0x1b, 0x50, 0x30, 0x3e, 0x10, 0x3e, 0x10, 0x0a, + 0x51, 0x2d, 0x35, 0x69, 0x41, 0x00, 0x02, 0x0b, 0x1a, 0x30, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, + 0xbe, 0x44, 0xff, 0xff, 0x78, 0x05, 0x7e, 0x1b, 0x90, 0x0a, 0x49, 0x4d, 0x44, 0x68, 0x0c, 0xbe, + 0x44, 0x00, 0xff, 0x28, 0x04, 0x7e, 0x44, 0x00, 0xff, 0xc3, 0x22, 0xd3, 0x22, + +// Segment #16, EXCLUDED Start Address 00ff7c00, Length 199 + + +// Segment #17, EXCLUDED Start Address 00ff7f00, Length 192 + + +// Segment #17, Start Address 00ff7fc0, Length 64 +0xff,0x00,0xc0,0x7f,0x40,0x00, + 0x40, 0x01, 0x02, 0x00, 0xca, 0x1b, 0x01, 0x0c, 0x02, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + +// Segment #18, Start Address 00ff0833, Length 5015 +0xff,0x00,0x33,0x08,0x97,0x13, + 0xca, 0x08, 0x7e, 0x01, 0x08, 0x7a, 0x03, 0x3f, 0xf0, 0xda, 0x08, 0x22, 0x80, 0x50, 0x0b, 0x1a, + 0x60, 0x0b, 0x35, 0x0b, 0x1a, 0x70, 0x0b, 0x35, 0x0b, 0x1a, 0x80, 0x0b, 0x35, 0x0b, 0x1a, 0x90, + 0x0b, 0x35, 0x0b, 0x1a, 0xa0, 0x0b, 0x35, 0x0b, 0x1a, 0xb0, 0x0b, 0x35, 0x0b, 0x1a, 0xc0, 0x0b, + 0x35, 0x0b, 0x1a, 0xd0, 0x0b, 0x35, 0x1b, 0x0a, 0x60, 0x0b, 0x15, 0x1b, 0x0a, 0x70, 0x0b, 0x15, + 0x1b, 0x0a, 0x80, 0x0b, 0x15, 0x1b, 0x0a, 0x90, 0x0b, 0x15, 0x1b, 0x0a, 0xa0, 0x0b, 0x15, 0x1b, + 0x0a, 0xb0, 0x0b, 0x15, 0x1b, 0x0a, 0xc0, 0x0b, 0x15, 0x1b, 0x0a, 0xd0, 0x0b, 0x15, 0x9e, 0x44, + 0x00, 0x10, 0x50, 0xaa, 0x2e, 0x44, 0x00, 0x10, 0x68, 0x0e, 0x7e, 0x1b, 0xc0, 0x7a, 0x0b, 0xc0, + 0x0b, 0x14, 0x0b, 0x34, 0x1b, 0x44, 0x78, 0xf2, 0x22, 0x7f, 0x6f, 0x7f, 0xf0, 0x1b, 0xfc, 0x7c, + 0x54, 0x7d, 0x32, 0x80, 0x08, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0x9e, 0x44, 0x00, + 0x10, 0x50, 0xf2, 0x2e, 0x44, 0x00, 0x10, 0x68, 0x06, 0xca, 0x48, 0x1b, 0x44, 0x78, 0xfa, 0x7f, + 0xf6, 0x89, 0xe4, 0xca, 0x6b, 0x5e, 0xd4, 0x00, 0x3f, 0x68, 0x20, 0x7e, 0x84, 0x00, 0x40, 0x9d, + 0x8d, 0xda, 0x6b, 0xbd, 0x87, 0x38, 0x16, 0xca, 0x79, 0x7d, 0x78, 0x12, 0x09, 0x00, 0xda, 0x79, + 0x40, 0x08, 0x9d, 0x78, 0x68, 0x02, 0x80, 0x05, 0xc2, 0xd7, 0x22, 0xda, 0x6b, 0x43, 0x90, 0x30, + 0x74, 0xaa, 0x39, 0xb5, 0x55, 0x55, 0x74, 0x55, 0x39, 0xb5, 0x2a, 0xaa, 0x74, 0xa0, 0x39, 0xb5, + 0x55, 0x55, 0x7e, 0x04, 0x00, 0x40, 0x9d, 0x70, 0x50, 0x06, 0x2d, 0x70, 0x7d, 0x07, 0x6d, 0x77, + 0x7c, 0x31, 0x7e, 0x7b, 0x00, 0x7a, 0x6b, 0x00, 0x0b, 0x7c, 0x0b, 0x6c, 0xa5, 0xd9, 0xf3, 0x7f, + 0x16, 0x1b, 0x1c, 0x7e, 0x54, 0x27, 0x10, 0x7e, 0x1b, 0x10, 0xbc, 0x10, 0x68, 0x06, 0x1b, 0x54, + 0x78, 0xf5, 0x80, 0x2c, 0x6d, 0x00, 0x7c, 0x20, 0x7f, 0x16, 0x9f, 0x10, 0x7f, 0x27, 0x9f, 0x20, + 0x7e, 0x2b, 0x00, 0x7e, 0x1b, 0x10, 0xbc, 0x01, 0x78, 0x16, 0x0b, 0x2c, 0x0b, 0x1c, 0xa5, 0xdb, + 0xef, 0x7c, 0xb6, 0x20, 0xe0, 0x03, 0x63, 0x90, 0x30, 0x4d, 0x77, 0x78, 0x93, 0xc2, 0xd7, 0x22, + 0xd2, 0xd7, 0x22, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x06, 0x04, 0x02, 0x04, 0x00, 0x02, 0x01, + 0x04, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, + 0x04, 0x00, 0x08, 0x10, 0x02, 0x10, 0x04, 0x02, 0x08, 0x00, 0x01, 0x01, 0x08, 0x7e, 0x18, 0x7f, + 0xbd, 0x7a, 0x1c, 0x00, 0xff, 0x0b, 0x1a, 0x00, 0xbe, 0x10, 0x14, 0x38, 0x1a, 0x0a, 0x51, 0x23, + 0x7e, 0x18, 0x09, 0x76, 0x7a, 0x1c, 0x00, 0xff, 0x2d, 0x35, 0x0b, 0x1a, 0x50, 0x60, 0x08, 0xa5, + 0xb8, 0x02, 0x03, 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe, 0x7e, 0xe8, 0x7f, 0xbf, 0x7a, 0xec, 0x00, + 0xff, 0xe0, 0xf5, 0x22, 0x54, 0xc0, 0x68, 0x16, 0x7e, 0xe8, 0x7f, 0xbe, 0x7a, 0xec, 0x00, 0xff, + 0xe0, 0x60, 0x0c, 0x12, 0x09, 0xa0, 0xf5, 0x09, 0x7a, 0xa1, 0x20, 0x02, 0x0f, 0x0a, 0x22, 0xc2, + 0x95, 0xd2, 0x94, 0x12, 0x19, 0xfb, 0x53, 0x90, 0xcf, 0x12, 0x19, 0xfb, 0x80, 0xf1, 0x0d, 0x0a, + 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0d, + 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, + 0x45, 0x64, 0x67, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x34, 0x20, 0x2d, 0x20, 0x48, 0x61, 0x72, + 0x64, 0x77, 0x61, 0x72, 0x65, 0x20, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, 0x63, + 0x73, 0x2c, 0x20, 0x52, 0x65, 0x76, 0x20, 0x31, 0x2e, 0x30, 0x30, 0x3b, 0x20, 0x43, 0x6f, 0x70, + 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x31, 0x39, 0x39, 0x38, 0x20, 0x49, 0x6e, 0x73, 0x69, + 0x64, 0x65, 0x20, 0x4f, 0x75, 0x74, 0x20, 0x4e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x73, 0x0d, + 0x0a, 0x00, 0x50, 0x61, 0x73, 0x73, 0x00, 0x46, 0x41, 0x49, 0x4c, 0x20, 0x21, 0x21, 0x00, 0x50, + 0x61, 0x73, 0x73, 0x20, 0x20, 0x20, 0x20, 0x00, 0x46, 0x41, 0x49, 0x4c, 0x20, 0x21, 0x21, 0x20, + 0x00, 0x0d, 0x0a, 0x44, 0x65, 0x74, 0x65, 0x63, 0x74, 0x20, 0x52, 0x61, 0x6d, 0x3a, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x61, 0x6d, 0x20, 0x54, 0x65, 0x73, 0x74, 0x3a, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x62, + 0x69, 0x74, 0x20, 0x30, 0x2d, 0x31, 0x34, 0x20, 0x74, 0x65, 0x73, 0x74, 0x3a, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x57, 0x72, 0x6f, 0x74, 0x65, 0x20, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x20, 0x30, 0x30, 0x3a, 0x00, 0x20, 0x20, 0x77, 0x69, + 0x74, 0x68, 0x20, 0x64, 0x61, 0x74, 0x61, 0x3a, 0x20, 0x00, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, + 0x72, 0x65, 0x61, 0x64, 0x3a, 0x20, 0x00, 0x0d, 0x0a, 0x4f, 0x6e, 0x65, 0x20, 0x6f, 0x72, 0x20, + 0x62, 0x6f, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, + 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x62, 0x69, + 0x74, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x20, 0x61, 0x72, 0x65, 0x20, 0x73, 0x68, + 0x6f, 0x72, 0x74, 0x65, 0x64, 0x0d, 0x0a, 0x74, 0x6f, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x68, + 0x69, 0x6e, 0x67, 0x3a, 0x20, 0x00, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x00, 0x0d, 0x0a, 0x44, 0x65, + 0x74, 0x65, 0x63, 0x74, 0x20, 0x55, 0x61, 0x72, 0x74, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, + 0x53, 0x63, 0x72, 0x61, 0x74, 0x63, 0x68, 0x20, 0x50, 0x61, 0x64, 0x2c, 0x46, 0x69, 0x46, 0x6f, + 0x20, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x26, 0x20, 0x52, 0x53, 0x54, 0x3a, 0x20, 0x00, + 0x0d, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x55, 0x61, 0x72, 0x74, 0x20, 0x54, 0x65, 0x73, 0x74, 0x73, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x50, 0x6f, 0x72, 0x74, 0x31, 0x20, 0x20, 0x20, 0x50, 0x6f, 0x72, 0x74, + 0x32, 0x20, 0x20, 0x20, 0x50, 0x6f, 0x72, 0x74, 0x33, 0x20, 0x20, 0x20, 0x50, 0x6f, 0x72, 0x74, + 0x34, 0x0d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, + 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, + 0x2d, 0x00, 0x0d, 0x0a, 0x50, 0x6f, 0x72, 0x74, 0x20, 0x44, 0x65, 0x63, 0x6f, 0x64, 0x65, 0x72, + 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x44, 0x69, 0x67, 0x69, 0x74, 0x61, 0x6c, 0x20, + 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x41, 0x6e, 0x61, 0x6c, + 0x6f, 0x67, 0x20, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, + 0x52, 0x58, 0x44, 0x2c, 0x54, 0x58, 0x44, 0x20, 0x74, 0x6f, 0x20, 0x52, 0x54, 0x53, 0x2c, 0x43, + 0x54, 0x53, 0x2c, 0x52, 0x49, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x58, 0x44, 0x2c, 0x54, 0x58, 0x44, 0x20, 0x74, 0x6f, 0x20, 0x44, + 0x54, 0x52, 0x2c, 0x44, 0x53, 0x52, 0x2c, 0x43, 0x44, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x54, 0x53, 0x5b, 0x43, 0x54, 0x53, 0x2c, + 0x52, 0x49, 0x5d, 0x20, 0x74, 0x6f, 0x20, 0x44, 0x54, 0x52, 0x2c, 0x44, 0x53, 0x52, 0x2c, 0x43, + 0x44, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a, 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x54, 0x53, 0x5b, + 0x43, 0x54, 0x53, 0x2c, 0x43, 0x44, 0x5d, 0x20, 0x74, 0x6f, 0x20, 0x44, 0x53, 0x52, 0x2c, 0x52, + 0x49, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, + 0x44, 0x54, 0x52, 0x5b, 0x44, 0x53, 0x52, 0x2c, 0x43, 0x44, 0x5d, 0x20, 0x74, 0x6f, 0x20, 0x52, + 0x54, 0x53, 0x2c, 0x43, 0x54, 0x53, 0x2c, 0x52, 0x49, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a, + 0x20, 0x00, 0x0d, 0x0a, 0x44, 0x54, 0x52, 0x20, 0x74, 0x6f, 0x20, 0x43, 0x54, 0x53, 0x2c, 0x43, + 0x44, 0x20, 0x53, 0x68, 0x6f, 0x72, 0x74, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x54, 0x53, 0x20, 0x74, 0x6f, 0x20, 0x43, + 0x54, 0x53, 0x2c, 0x52, 0x49, 0x20, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x20, + 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, 0x52, 0x54, 0x53, 0x20, + 0x74, 0x6f, 0x20, 0x43, 0x54, 0x53, 0x2c, 0x43, 0x44, 0x20, 0x4c, 0x6f, 0x6f, 0x70, 0x62, 0x61, + 0x63, 0x6b, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x0d, 0x0a, + 0x44, 0x54, 0x52, 0x20, 0x74, 0x6f, 0x20, 0x44, 0x53, 0x52, 0x2c, 0x43, 0x44, 0x20, 0x4c, 0x6f, + 0x6f, 0x70, 0x62, 0x61, 0x63, 0x6b, 0x3a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, + 0x20, 0x00, 0x0d, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x45, 0x20, 0x52, 0x20, 0x52, 0x20, 0x4f, 0x20, + 0x52, 0x20, 0x21, 0x21, 0x21, 0x2c, 0x20, 0x45, 0x20, 0x52, 0x20, 0x52, 0x20, 0x4f, 0x20, 0x52, + 0x20, 0x21, 0x21, 0x21, 0x20, 0x2c, 0x20, 0x45, 0x20, 0x52, 0x20, 0x52, 0x20, 0x4f, 0x20, 0x52, + 0x20, 0x21, 0x21, 0x21, 0x0d, 0x0a, 0x0a, 0x44, 0x69, 0x61, 0x67, 0x6e, 0x6f, 0x73, 0x74, 0x69, + 0x63, 0x73, 0x20, 0x6e, 0x6f, 0x77, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x65, 0x6e, 0x74, 0x65, + 0x72, 0x20, 0x61, 0x20, 0x64, 0x65, 0x62, 0x75, 0x67, 0x20, 0x6c, 0x6f, 0x6f, 0x70, 0x20, 0x6f, + 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x64, 0x65, 0x74, 0x65, + 0x63, 0x74, 0x65, 0x64, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x00, 0x0d, 0x0a, 0x0a, 0x4e, + 0x6f, 0x20, 0x48, 0x61, 0x72, 0x64, 0x77, 0x61, 0x72, 0x65, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, + 0x73, 0x20, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x65, 0x64, 0x2e, 0x0d, 0x0a, 0x00, 0x43, 0x6f, + 0x70, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, + 0x4d, 0x61, 0x73, 0x74, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x53, 0x6c, 0x61, 0x76, 0x65, 0x27, + 0x73, 0x20, 0x45, 0x45, 0x70, 0x72, 0x6f, 0x6d, 0x20, 0x2e, 0x2e, 0x2e, 0x00, 0x44, 0x6f, 0x6e, + 0x65, 0x0d, 0x0a, 0x0a, 0x2d, 0x3e, 0x20, 0x54, 0x75, 0x72, 0x6e, 0x20, 0x75, 0x6e, 0x69, 0x74, + 0x20, 0x6f, 0x66, 0x66, 0x2c, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, + 0x20, 0x63, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x75, 0x6e, 0x20, 0x73, + 0x74, 0x61, 0x6e, 0x64, 0x61, 0x6c, 0x6f, 0x6e, 0x65, 0x20, 0x64, 0x69, 0x61, 0x67, 0x6e, 0x6f, + 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x00, 0xc2, 0xaf, 0xc2, 0x09, 0xc2, 0x0a, 0x75, 0x90, 0x0d, + 0x20, 0x17, 0x02, 0xd2, 0xb5, 0x43, 0x90, 0x30, 0x6c, 0x00, 0x7e, 0x10, 0x03, 0x12, 0x0f, 0x38, + 0x7e, 0x68, 0x0a, 0x01, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x0b, 0x00, 0x30, 0xb4, 0x02, + 0x80, 0x24, 0x02, 0x1b, 0x3c, 0x20, 0x09, 0x1d, 0xc2, 0x94, 0xd2, 0x95, 0x12, 0x19, 0xfb, 0x53, + 0x90, 0xcf, 0x12, 0x19, 0xfb, 0xc2, 0x95, 0xd2, 0x94, 0x12, 0x19, 0xfb, 0xa5, 0xd9, 0xe6, 0x43, + 0x90, 0x30, 0x12, 0x19, 0xfb, 0x22, 0x7e, 0x68, 0x0a, 0x94, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, + 0x93, 0x7e, 0xe4, 0x10, 0x00, 0x7e, 0x40, 0x55, 0x7a, 0xe9, 0x40, 0x0b, 0xe4, 0x7e, 0x50, 0xaa, + 0x7a, 0xe9, 0x50, 0x1b, 0xe4, 0xbe, 0xe9, 0x40, 0x68, 0x19, 0x7e, 0x68, 0x0a, 0x7a, 0x7a, 0x6c, + 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0x13, 0x7a, 0xe9, 0x40, 0x7e, 0xe9, + 0x10, 0x80, 0xf8, 0x7e, 0x68, 0x0a, 0x75, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x0b, 0x00, + 0x7e, 0x68, 0x0a, 0xd8, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x78, 0x00, 0x00, 0x7e, + 0x70, 0x0e, 0x7e, 0xa4, 0xff, 0xff, 0x7e, 0xb4, 0xbf, 0xff, 0x7d, 0xcb, 0x0e, 0xc4, 0x7d, 0xdc, + 0x5d, 0xdb, 0x6c, 0xbb, 0x7d, 0xfa, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x0b, 0xb0, 0x7d, + 0xfb, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x0b, 0xb0, 0x7d, 0xfc, 0x5e, 0xf4, 0x7f, 0xff, + 0x7a, 0x7b, 0xb0, 0x0b, 0xb0, 0x7d, 0xfd, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x6c, 0xbb, + 0x7d, 0xfa, 0x5e, 0xf4, 0x7f, 0xff, 0xbe, 0x7b, 0xb0, 0x78, 0x41, 0x0b, 0xb0, 0x7d, 0xfb, 0x5e, + 0xf4, 0x7f, 0xff, 0xbe, 0x7b, 0xb0, 0x78, 0x34, 0x0b, 0xb0, 0x7d, 0xfc, 0x5e, 0xf4, 0x7f, 0xff, + 0xbe, 0x7b, 0xb0, 0x78, 0x27, 0x0b, 0xb0, 0x7d, 0xfd, 0x5e, 0xf4, 0x7f, 0xff, 0xbe, 0x7b, 0xb0, + 0x78, 0x1a, 0x0b, 0xb0, 0xbe, 0xc4, 0xff, 0xfe, 0x78, 0x92, 0x0e, 0xb4, 0xa5, 0xdf, 0x8b, 0x7e, + 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x80, 0x77, 0xca, 0x5b, 0xca, 0x6b, + 0x7e, 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x68, 0x0b, 0x2a, 0x7a, + 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x0a, 0x47, 0x12, 0x1a, 0xc9, 0x7e, 0x68, 0x0b, 0x79, 0x7a, + 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x6c, 0x77, 0xda, 0x6b, 0xca, 0x6b, 0x0b, 0x70, 0x0e, 0xc4, + 0xbe, 0xc4, 0xff, 0xff, 0x78, 0xf6, 0x1b, 0x70, 0x0a, 0x47, 0x12, 0x1a, 0xc9, 0x12, 0x1a, 0x08, + 0x30, 0x09, 0x30, 0xda, 0x6b, 0xda, 0x5b, 0x6c, 0xbb, 0x7e, 0x78, 0x00, 0x00, 0x7d, 0xfa, 0x5e, + 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x7d, 0xfb, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x7d, + 0xfc, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x7d, 0xfd, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, + 0xb0, 0x80, 0xd4, 0x7e, 0x68, 0x0a, 0xb6, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x30, 0x17, + 0x0e, 0x7e, 0x78, 0x04, 0x20, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x44, 0x7b, 0xe0, 0x80, 0x0c, 0x7e, + 0x78, 0x00, 0x00, 0x7a, 0x7c, 0x00, 0x01, 0x7e, 0x44, 0x80, 0x00, 0x0b, 0x00, 0x7e, 0x40, 0x3a, + 0x7c, 0x54, 0x7f, 0x57, 0x7d, 0x84, 0x6c, 0x66, 0x7a, 0x5b, 0x50, 0x0b, 0x5c, 0x0b, 0x50, 0xa5, + 0xde, 0x02, 0x0b, 0x50, 0x1b, 0x84, 0x78, 0xf0, 0x7c, 0x54, 0x7f, 0x57, 0x7d, 0x84, 0x6c, 0x66, + 0xbe, 0x5b, 0x50, 0x78, 0x1a, 0x0b, 0x5c, 0x0b, 0x50, 0xa5, 0xde, 0x02, 0x0b, 0x50, 0x1b, 0x84, + 0x78, 0xee, 0x7e, 0x68, 0x0a, 0x75, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x80, 0x4b, 0x7f, + 0x45, 0x7e, 0x68, 0x0a, 0x7a, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x68, 0x0a, 0xfa, + 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7d, 0x4b, 0x12, 0x1a, 0xc9, 0x7e, 0x68, 0x0b, 0x0f, + 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x6c, 0x88, 0x7c, 0x95, 0x12, 0x1a, 0xc9, 0x7e, 0x68, + 0x0b, 0x1d, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x4b, 0x90, 0x12, 0x1a, 0xc9, 0x12, + 0x1a, 0x08, 0x30, 0x09, 0x05, 0x7e, 0x4b, 0x90, 0x80, 0xfb, 0x7e, 0x68, 0x0b, 0x7f, 0x7a, 0x6c, + 0x00, 0xff, 0x12, 0x1a, 0x93, 0x0b, 0x00, 0xd2, 0x92, 0x7e, 0x24, 0x80, 0x00, 0x09, 0xb2, 0x00, + 0x08, 0xbe, 0xb0, 0x01, 0x78, 0x0b, 0x09, 0xb2, 0x00, 0x14, 0xbe, 0xb0, 0x60, 0x78, 0x02, 0x80, + 0x17, 0x7e, 0x68, 0x0a, 0x7a, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, + 0x09, 0x11, 0x09, 0xb2, 0x00, 0x08, 0x80, 0xfa, 0x7e, 0x68, 0x0a, 0x75, 0x7a, 0x6c, 0x00, 0xff, + 0x12, 0x1a, 0x93, 0x7e, 0x68, 0x0b, 0xa1, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x0b, 0x00, + 0xc2, 0x92, 0x12, 0x19, 0xee, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0xa0, 0x55, 0x19, 0xa2, 0x00, 0x1c, + 0x7e, 0xb0, 0x01, 0x19, 0xb2, 0x00, 0x08, 0x09, 0xb2, 0x00, 0x1c, 0xbc, 0xab, 0x78, 0x37, 0x09, + 0xb2, 0x00, 0x08, 0x5e, 0xb0, 0xc0, 0xbe, 0xb0, 0xc0, 0x78, 0x2b, 0x7e, 0xa0, 0xaa, 0x19, 0xa2, + 0x00, 0x1c, 0x6c, 0xbb, 0x19, 0xb2, 0x00, 0x08, 0x09, 0xb2, 0x00, 0x1c, 0xbc, 0xab, 0x78, 0x16, + 0x09, 0xb2, 0x00, 0x08, 0x5e, 0xb0, 0xc0, 0x78, 0x0d, 0x7e, 0x68, 0x0a, 0x75, 0x7a, 0x6c, 0x00, + 0xff, 0x12, 0x1a, 0x93, 0x80, 0x1b, 0x7e, 0x68, 0x0a, 0x7a, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, + 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0x0a, 0x19, 0xa2, 0x00, 0x1c, 0x09, 0xb2, 0x00, 0x1c, 0x80, + 0xf6, 0x7e, 0x68, 0x0b, 0xc3, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x68, 0x0c, 0x45, + 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x7e, 0xb0, + 0x01, 0x19, 0xb2, 0x00, 0x1c, 0x2e, 0x24, 0x01, 0x00, 0x0b, 0xb0, 0xa5, 0xd9, 0xf3, 0x7e, 0x24, + 0x80, 0x00, 0x7e, 0x11, 0x09, 0x7e, 0xb0, 0x01, 0x0b, 0x00, 0x09, 0xa2, 0x00, 0x1c, 0xbc, 0xab, + 0x78, 0x16, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x2e, 0x24, 0x01, + 0x00, 0x0b, 0xb0, 0xa5, 0xd9, 0xe2, 0x80, 0x25, 0x7e, 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, + 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0xe4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, + 0x09, 0xa2, 0x00, 0x1c, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xf5, 0x80, 0xec, 0x7e, 0x68, 0x0c, + 0x69, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x13, 0x8a, 0x7e, 0x24, 0x80, 0x00, 0x7e, + 0x11, 0x09, 0x0b, 0x00, 0x74, 0x10, 0x19, 0xb2, 0x00, 0x10, 0x12, 0x13, 0x03, 0x2e, 0x24, 0x01, + 0x00, 0xa5, 0xd9, 0xee, 0x7e, 0x68, 0x0c, 0x8d, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, + 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0xe4, 0x19, 0xb2, 0x00, 0x10, 0x12, 0x13, 0x03, + 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xef, 0x30, 0x00, 0x03, 0x02, 0x18, 0xb7, 0x02, 0x13, 0xbb, + 0x74, 0x07, 0x19, 0xb2, 0x00, 0x08, 0x12, 0x19, 0xfb, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00, + 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00, 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00, + 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xc2, 0x0b, 0x7e, 0xb0, 0x55, 0x12, 0x13, + 0x64, 0x7e, 0xb0, 0xaa, 0x12, 0x13, 0x64, 0x7e, 0xb0, 0x00, 0x12, 0x13, 0x64, 0x7e, 0xb0, 0xff, + 0x12, 0x13, 0x64, 0x30, 0x0b, 0x0f, 0x7e, 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, + 0x93, 0x12, 0x1a, 0x08, 0x22, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, + 0x22, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x19, 0xee, 0x09, 0xa2, 0x00, 0x00, 0xbc, 0xab, 0x78, 0x01, + 0x22, 0x20, 0x09, 0x03, 0xd2, 0x0b, 0x22, 0x12, 0x1a, 0x08, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x19, + 0xee, 0x09, 0xa2, 0x00, 0x00, 0x80, 0xf3, 0xd2, 0x92, 0x12, 0x19, 0xee, 0xc2, 0x92, 0x12, 0x19, + 0xee, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x74, 0x80, 0x19, 0xb2, 0x00, 0x0c, 0x7e, 0x54, + 0x00, 0x02, 0x19, 0xa2, 0x00, 0x04, 0x19, 0xb2, 0x00, 0x00, 0x74, 0x03, 0x19, 0xb2, 0x00, 0x0c, + 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xe1, 0x22, 0x7e, 0x68, 0x0c, 0xb1, 0x7a, 0x6c, 0x00, 0xff, + 0x12, 0x1a, 0x93, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0x12, 0x19, 0xee, 0x09, + 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x55, 0x19, 0xa2, 0x00, 0x00, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, + 0x18, 0x5e, 0xb0, 0x05, 0x78, 0x0d, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, + 0x93, 0x80, 0x1a, 0x7e, 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, + 0x08, 0x30, 0x09, 0x09, 0x19, 0xa2, 0x00, 0x00, 0x12, 0x19, 0xee, 0x80, 0xf7, 0x2e, 0x24, 0x01, + 0x00, 0xa5, 0xd9, 0xb6, 0x7e, 0x68, 0x0c, 0xd5, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, + 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x7e, + 0xa0, 0x55, 0x19, 0xa2, 0x00, 0x00, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x0a, + 0x78, 0x0d, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x80, 0x1a, 0x7e, + 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0x09, + 0x19, 0xa2, 0x00, 0x00, 0x12, 0x19, 0xee, 0x80, 0xf7, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xb6, + 0x30, 0x04, 0x03, 0x02, 0x16, 0x8c, 0x7e, 0x68, 0x0c, 0xf9, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, + 0x93, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, + 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, + 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x0a, 0x78, 0x3c, + 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, + 0x03, 0x19, 0xa2, 0x00, 0x10, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, + 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x0a, 0x78, 0x14, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, + 0x12, 0x1a, 0x93, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0x9e, 0x80, 0x20, 0x7e, 0x68, 0x0a, 0x8b, + 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0xe6, 0x7e, 0xa0, 0x02, + 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x7e, 0x68, 0x0d, 0x41, + 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, + 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x01, + 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, + 0x18, 0x5e, 0xb0, 0x05, 0x78, 0x3c, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, + 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x03, 0x19, 0xa2, 0x00, 0x10, 0x7e, 0xa0, 0x02, 0x19, 0xa2, + 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x05, 0x78, 0x14, 0x7e, 0x68, + 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0x9e, + 0x80, 0x20, 0x7e, 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, + 0x30, 0x09, 0xe6, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, + 0x80, 0xf1, 0x7e, 0x68, 0x0d, 0x89, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x24, 0x80, + 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, + 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x50, 0xbe, 0xb0, 0x50, 0x78, 0x1f, 0x6c, 0xaa, 0x19, 0xa2, + 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x50, 0x78, 0x0d, 0x7e, 0x68, + 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x80, 0x20, 0x7e, 0x68, 0x0a, 0x8b, 0x7a, + 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0x0f, 0x7e, 0xa0, 0x02, 0x19, + 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x2e, 0x24, 0x01, 0x00, 0xa5, + 0xd9, 0xa2, 0x7e, 0x68, 0x0d, 0xd1, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x24, 0x80, + 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, + 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0xa0, 0xbe, 0xb0, 0xa0, 0x78, 0x1f, + 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0xa0, + 0x78, 0x0d, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x80, 0x20, 0x7e, + 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0x0f, + 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x2e, + 0x24, 0x01, 0x00, 0xa5, 0xd9, 0x9e, 0x02, 0x18, 0x2b, 0x7e, 0x68, 0x0d, 0x1d, 0x7a, 0x6c, 0x00, + 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0x6c, 0xaa, 0x19, + 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, + 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, + 0x06, 0x78, 0x3c, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, + 0x18, 0x7e, 0xa0, 0x03, 0x19, 0xa2, 0x00, 0x10, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x12, + 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x06, 0x78, 0x14, 0x7e, 0x68, 0x0a, 0x82, 0x7a, + 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0x9e, 0x80, 0x20, 0x7e, + 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0xe6, + 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x7e, + 0x68, 0x0d, 0x65, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, + 0x09, 0x0b, 0x00, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, + 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, + 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x09, 0x78, 0x3c, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, + 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x03, 0x19, 0xa2, 0x00, 0x10, 0x7e, 0xa0, + 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x09, 0x78, + 0x14, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x2e, 0x24, 0x01, 0x00, + 0xa5, 0xd9, 0x9e, 0x80, 0x20, 0x7e, 0x68, 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, + 0x12, 0x1a, 0x08, 0x30, 0x09, 0xe6, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, + 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x7e, 0x68, 0x0d, 0xad, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, + 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, + 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x90, 0xbe, 0xb0, 0x90, 0x78, 0x1f, 0x6c, + 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x90, 0x78, + 0x0d, 0x7e, 0x68, 0x0a, 0x82, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x80, 0x20, 0x7e, 0x68, + 0x0a, 0x8b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1a, 0x08, 0x30, 0x09, 0x0f, 0x7e, + 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x2e, 0x24, + 0x01, 0x00, 0xa5, 0xd9, 0xa2, 0x02, 0x18, 0xb7, 0x30, 0x17, 0x03, 0x02, 0x19, 0x3b, 0xc2, 0x8a, + 0x12, 0x19, 0x22, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x04, + 0x12, 0x19, 0xee, 0x0b, 0x00, 0x7e, 0xa0, 0x08, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x20, + 0x8b, 0x3e, 0x20, 0x89, 0x3b, 0x7e, 0xa0, 0x08, 0x19, 0xa2, 0x00, 0x04, 0x09, 0xa2, 0x00, 0x10, + 0x4e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x30, 0x8b, 0x23, 0x30, 0x89, 0x20, + 0x09, 0xa2, 0x00, 0x10, 0x5e, 0xa0, 0xfd, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, 0x7e, 0xa0, + 0x00, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x19, 0xee, 0x20, 0x8b, 0x05, 0x20, 0x89, 0x02, 0x80, 0x1a, + 0x12, 0x1a, 0x08, 0x30, 0x09, 0x14, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x00, 0x00, 0x5e, + 0xa0, 0xfd, 0x19, 0xa2, 0x00, 0x10, 0x00, 0x00, 0x80, 0xec, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, + 0x89, 0x02, 0x19, 0x3b, 0x20, 0x17, 0xfa, 0x12, 0x13, 0x8a, 0x12, 0x19, 0x22, 0x7e, 0x24, 0x80, + 0x00, 0x7e, 0x11, 0x09, 0x0b, 0x00, 0x20, 0x89, 0x26, 0x7e, 0xa0, 0xff, 0x19, 0xa2, 0x00, 0x04, + 0x12, 0x19, 0xee, 0x7e, 0xb0, 0x55, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x19, 0xee, 0x30, 0x89, 0x0f, + 0x7e, 0xa0, 0x00, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x19, 0xee, 0x20, 0x89, 0x02, 0x80, 0x26, 0x12, + 0x1a, 0x08, 0x30, 0x09, 0x20, 0x7e, 0xa0, 0xff, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x19, 0xee, 0x7e, + 0xb0, 0x55, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x19, 0xee, 0x7e, 0xa0, 0x00, 0x19, 0xa2, 0x00, 0x04, + 0x12, 0x19, 0xee, 0x80, 0xe0, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xa8, 0x02, 0x19, 0x3b, 0x7e, + 0x24, 0x80, 0x00, 0x7e, 0x11, 0x09, 0x7e, 0xa0, 0x08, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x19, 0xee, + 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xef, 0x22, 0x30, 0x0a, 0x19, 0x7e, 0x68, 0x0d, 0xf5, 0x7a, + 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0xd2, 0x09, 0x12, 0x19, 0xee, 0x12, 0x19, 0xee, 0x12, 0x19, + 0xee, 0x02, 0x0f, 0x10, 0x30, 0x17, 0x1c, 0x7e, 0x68, 0x0e, 0x6f, 0x7a, 0x6c, 0x00, 0xff, 0x12, + 0x1a, 0x93, 0x7e, 0x68, 0x0e, 0x91, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x1a, 0x93, 0x12, 0x1b, 0x3c, + 0x02, 0x19, 0xe6, 0x0b, 0x00, 0x7e, 0x78, 0x19, 0xa0, 0x7a, 0x7c, 0x00, 0xff, 0x7f, 0x67, 0x7a, + 0x6c, 0x00, 0x00, 0x7e, 0x70, 0x3e, 0x7e, 0x7b, 0xb0, 0x7a, 0x6b, 0xb0, 0x0b, 0x7c, 0x0b, 0x6c, + 0xa5, 0xdf, 0xf3, 0x7e, 0x78, 0x19, 0xa0, 0x7a, 0x7c, 0x00, 0x00, 0x89, 0x78, 0x7e, 0x78, 0x00, + 0x00, 0x7a, 0x7c, 0x00, 0xfe, 0x7e, 0x68, 0x7f, 0xbf, 0x7a, 0x6c, 0x00, 0xfe, 0x74, 0xaa, 0x39, + 0xb7, 0x55, 0x55, 0x74, 0x55, 0x39, 0xb7, 0x2a, 0xaa, 0x74, 0xa0, 0x39, 0xb7, 0x55, 0x55, 0x6c, + 0x99, 0x7a, 0x6b, 0x90, 0x7e, 0x54, 0x27, 0x10, 0x7e, 0x6b, 0x80, 0xbc, 0x89, 0x68, 0x08, 0x1b, + 0x54, 0x78, 0xf5, 0x8a, 0xff, 0x19, 0xde, 0x8a, 0xff, 0x19, 0xe6, 0x12, 0x1a, 0x08, 0x7e, 0x6b, + 0x80, 0x80, 0xfb, 0x7e, 0x10, 0xff, 0x12, 0x1a, 0x85, 0x80, 0xf8, 0xca, 0xf9, 0x7e, 0xf4, 0x00, + 0xff, 0x1b, 0xf4, 0x78, 0xfc, 0xda, 0xf9, 0x22, 0xca, 0xf9, 0x7e, 0xf4, 0x00, 0x00, 0x1b, 0xf4, + 0x78, 0xfc, 0xda, 0xf9, 0x22, 0x20, 0x09, 0x19, 0xd2, 0x0a, 0x12, 0x19, 0xfb, 0xc2, 0x95, 0xd2, + 0x94, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x43, 0x90, 0x30, + 0x22, 0xca, 0x0b, 0x7e, 0x10, 0x03, 0x7c, 0x30, 0x6c, 0x22, 0x0b, 0x20, 0x9e, 0x30, 0x0a, 0x50, + 0xf9, 0x2e, 0x30, 0x0b, 0x1b, 0x20, 0x68, 0x18, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x53, 0x90, + 0xcf, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x43, 0x90, 0x30, 0xa5, 0xda, 0xe8, + 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x1b, 0x30, 0x68, 0x19, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, + 0xc2, 0x95, 0xd2, 0x94, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x12, 0x19, 0xfb, 0x43, 0x90, 0x30, + 0xa5, 0xdb, 0xe7, 0x7e, 0x20, 0x0a, 0x12, 0x19, 0xfb, 0xa5, 0xda, 0xfa, 0xa5, 0xd9, 0xa7, 0xda, + 0x0b, 0x22, 0x20, 0x09, 0x0a, 0x12, 0x19, 0xfb, 0xb2, 0x94, 0x12, 0x19, 0xfb, 0xb2, 0x94, 0x22, + 0x30, 0x17, 0x32, 0x20, 0x09, 0x2f, 0xca, 0x2b, 0xca, 0x7b, 0x7e, 0x78, 0x80, 0x00, 0x7a, 0x7c, + 0x00, 0xfe, 0x12, 0x1b, 0x1c, 0x7e, 0x6b, 0xa0, 0x5c, 0xaa, 0x68, 0x10, 0x29, 0xb7, 0x00, 0x14, + 0x54, 0x60, 0x68, 0xf8, 0x39, 0xa7, 0x00, 0x00, 0x0b, 0x6c, 0x80, 0xe9, 0x12, 0x19, 0xee, 0xd2, + 0xb5, 0xda, 0x7b, 0xda, 0x2b, 0x22, 0x12, 0x1a, 0xd4, 0x7e, 0x68, 0x00, 0x0b, 0x12, 0x1a, 0x93, + 0x22, 0xca, 0x59, 0xca, 0x5b, 0x7e, 0xb4, 0x00, 0x0b, 0x7c, 0xb8, 0xc4, 0x12, 0x1b, 0x04, 0x7c, + 0xb8, 0x12, 0x1b, 0x04, 0x7c, 0xb9, 0xc4, 0x12, 0x1b, 0x04, 0x7c, 0xb9, 0x12, 0x1b, 0x04, 0x7e, + 0xb0, 0x68, 0x7a, 0xb9, 0xb0, 0x0b, 0xb4, 0x6c, 0xbb, 0x7a, 0xb9, 0xb0, 0xda, 0x59, 0xda, 0x5b, + 0x22, 0x5e, 0xb0, 0x0f, 0x7c, 0xab, 0x9e, 0xa0, 0x0a, 0x40, 0x05, 0x2e, 0xb0, 0x37, 0x80, 0x03, + 0x2e, 0xb0, 0x30, 0x7a, 0xb9, 0xb0, 0x0b, 0xb4, 0x22, 0xc2, 0xb5, 0xc2, 0x92, 0x12, 0x19, 0xee, + 0x74, 0x80, 0x39, 0xb7, 0x00, 0x0c, 0x7e, 0x54, 0x00, 0x06, 0x39, 0xa7, 0x00, 0x04, 0x39, 0xb7, + 0x00, 0x00, 0x74, 0x03, 0x39, 0xb7, 0x00, 0x0c, 0x22, 0x7e, 0x78, 0x00, 0x00, 0x7a, 0x7c, 0x00, + 0xff, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0x01, 0x7f, 0x65, 0x7e, 0x74, 0x20, 0x00, 0x12, + 0x08, 0xd6, 0x40, 0x54, 0x7e, 0x78, 0x7c, 0x00, 0x7a, 0x7c, 0x00, 0xff, 0x7e, 0x58, 0x00, 0x00, + 0x7a, 0x5c, 0x00, 0x01, 0x7e, 0x68, 0x7c, 0x00, 0x7a, 0x6c, 0x00, 0x01, 0x7e, 0x74, 0x04, 0x00, + 0x12, 0x08, 0xd6, 0x40, 0x33, 0x74, 0x80, 0x12, 0x1b, 0xb1, 0x40, 0x2c, 0x53, 0x90, 0xcf, 0xd2, + 0x08, 0x7e, 0x04, 0x00, 0x08, 0x7e, 0x14, 0x00, 0x00, 0x84, 0xa5, 0xdb, 0xfc, 0xa5, 0xda, 0xf9, + 0xa5, 0xd9, 0xf6, 0x74, 0x40, 0x12, 0x1b, 0xb1, 0x40, 0x0e, 0x7e, 0x68, 0x0e, 0xc0, 0x7a, 0x6c, + 0x00, 0xff, 0x12, 0x1a, 0x93, 0x02, 0x19, 0xe6, 0xc2, 0x95, 0xd2, 0x94, 0x80, 0xfe, 0xf5, 0x0a, + 0x7e, 0x78, 0x00, 0x0a, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x68, 0x7f, 0xbf, 0x7a, 0x6c, 0x00, 0x01, + 0x7e, 0x74, 0x00, 0x01, 0x02, 0x08, 0xd6, +}; + +static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = { + 1, 12, 2 }; // Major, Minor, Build + +#undef IMAGE_VERSION_NAME + +#undef IMAGE_ARRAY_NAME + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/io_fw_boot2.h linux.20p6/drivers/usb/serial/io_fw_boot2.h --- linux.vanilla/drivers/usb/serial/io_fw_boot2.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/usb/serial/io_fw_boot2.h Mon Jun 18 08:11:10 2001 @@ -0,0 +1,548 @@ +//************************************************************** +//* Edgeport/4 Binary Image +//* Generated by HEX2C v1.06 +//* Copyright(c) 1998 Inside Out Networks, 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. +//************************************************************** + + +//Image structure definition +#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD) +#define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD + typedef struct _EDGE_FIRMWARE_IMAGE_RECORD + { + unsigned short ExtAddr; + unsigned short Addr; + unsigned short Len; + unsigned char Data[0]; + } EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD; + + typedef struct _EDGE_FIRMWARE_VERSION_INFO + { + unsigned char MajorVersion; + unsigned char MinorVersion; + unsigned short BuildNumber; + } EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO; + +#endif + +#if !defined(IMAGE_ARRAY_NAME) +#define IMAGE_ARRAY_NAME FirmwareImage +#define IMAGE_VERSION_NAME FirmwareImageVersion +#endif + +static unsigned char IMAGE_ARRAY_NAME[] = { + +// Segment #1, Start Address 00ff0000, Length 6 +0xff,0x00,0x00,0x00,0x06,0x00, + 0x02, 0x00, 0x80, 0x02, 0x00, 0x03, + +// Segment #2, Start Address 00ff000b, Length 3 +0xff,0x00,0x0b,0x00,0x03,0x00, + 0x02, 0x00, 0x0b, + +// Segment #3, Start Address 00ff0013, Length 3 +0xff,0x00,0x13,0x00,0x03,0x00, + 0x02, 0x02, 0x56, + +// Segment #4, Start Address 00ff001b, Length 3 +0xff,0x00,0x1b,0x00,0x03,0x00, + 0x02, 0x00, 0x1b, + +// Segment #5, Start Address 00ff0023, Length 3 +0xff,0x00,0x23,0x00,0x03,0x00, + 0x02, 0x00, 0x23, + +// Segment #6, Start Address 00ff002b, Length 3 +0xff,0x00,0x2b,0x00,0x03,0x00, + 0x02, 0x00, 0x2b, + +// Segment #7, Start Address 00ff0033, Length 3 +0xff,0x00,0x33,0x00,0x03,0x00, + 0x02, 0x00, 0x33, + +// Segment #8, Start Address 00ff003b, Length 3 +0xff,0x00,0x3b,0x00,0x03,0x00, + 0x02, 0x00, 0x3b, + +// Segment #9, Start Address 00ff0043, Length 3 +0xff,0x00,0x43,0x00,0x03,0x00, + 0x02, 0x00, 0x43, + +// Segment #10, Start Address 00ff004b, Length 3 +0xff,0x00,0x4b,0x00,0x03,0x00, + 0x02, 0x00, 0x4b, + +// Segment #11, Start Address 00ff0053, Length 3 +0xff,0x00,0x53,0x00,0x03,0x00, + 0x02, 0x01, 0xf5, + +// Segment #12, Start Address 00ff007b, Length 3 +0xff,0x00,0x7b,0x00,0x03,0x00, + 0x02, 0x00, 0x7b, + +// Segment #13, Start Address 00ff0080, Length 534 +0xff,0x00,0x80,0x00,0x16,0x02, + 0x7e, 0xb3, 0x91, 0x01, 0x20, 0xe3, 0x0c, 0x7e, 0xb3, 0x3f, 0xf2, 0x54, 0xfe, 0x7a, 0xb3, 0x3f, + 0xf2, 0x80, 0x0a, 0x7e, 0xb3, 0x3f, 0xf2, 0x44, 0x01, 0x7a, 0xb3, 0x3f, 0xf2, 0x74, 0x00, 0x7a, + 0xb3, 0x91, 0x00, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x12, 0x7e, 0xf8, 0x00, 0x24, 0x7e, 0x00, 0x01, + 0x7e, 0x10, 0x00, 0x12, 0x09, 0xd0, 0x69, 0x20, 0x00, 0x0a, 0x5e, 0x40, 0x1f, 0xbe, 0x24, 0x00, + 0x00, 0x78, 0x09, 0x7e, 0x00, 0x03, 0x7a, 0x03, 0x90, 0x00, 0x80, 0x07, 0x7e, 0x00, 0x02, 0x7a, + 0x03, 0x90, 0x00, 0x75, 0xb0, 0xdf, 0x7e, 0x00, 0x01, 0x7a, 0x03, 0x94, 0x00, 0x7a, 0x03, 0x01, + 0x24, 0x7e, 0x00, 0x01, 0x7a, 0x03, 0x93, 0x00, 0x7e, 0x00, 0x00, 0xa5, 0xd8, 0xfd, 0x75, 0xa8, + 0x00, 0x75, 0xb1, 0x00, 0xca, 0x29, 0x12, 0x0c, 0x66, 0x12, 0x0c, 0x37, 0xf5, 0x21, 0x7a, 0xa1, + 0x20, 0x20, 0x09, 0x08, 0x20, 0x0a, 0x0a, 0x7e, 0xb0, 0x0c, 0x80, 0x08, 0x7e, 0xb0, 0x00, 0x80, + 0x03, 0x7e, 0xb0, 0x08, 0x7a, 0xb3, 0x92, 0x00, 0x12, 0x02, 0x96, 0xda, 0x29, 0x74, 0x10, 0x7a, + 0xb3, 0x91, 0x01, 0x7e, 0x20, 0x04, 0x7c, 0xb2, 0xc2, 0xd7, 0x13, 0x13, 0x13, 0x13, 0x7a, 0xb3, + 0x91, 0x00, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x10, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, 0x74, 0x02, + 0x7a, 0xb3, 0x91, 0x12, 0xa5, 0xda, 0xdf, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, + 0xb3, 0x91, 0x1c, 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x07, 0x74, + 0x34, 0x7a, 0xb3, 0x91, 0x13, 0x74, 0x3f, 0x7a, 0xb3, 0x91, 0x14, 0x74, 0x02, 0x7a, 0xb3, 0x91, + 0x06, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x07, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x44, 0x7a, + 0xb3, 0x91, 0x07, 0x74, 0xef, 0x7a, 0xb3, 0x91, 0x04, 0x74, 0x07, 0x7a, 0xb3, 0x91, 0x06, 0x7e, + 0xb3, 0x91, 0x07, 0x7a, 0xb1, 0x0a, 0x75, 0x09, 0x01, 0xd2, 0xaa, 0xd2, 0xaf, 0xe4, 0x7e, 0x60, + 0x02, 0x4d, 0x22, 0x78, 0x03, 0x7e, 0x60, 0x03, 0x7c, 0x76, 0x7e, 0x04, 0x28, 0x00, 0x8d, 0xef, + 0x1b, 0x04, 0x78, 0xfa, 0x04, 0x7e, 0x20, 0x07, 0x7a, 0x23, 0x91, 0x06, 0x7e, 0x23, 0x91, 0x07, + 0x7e, 0x31, 0x0a, 0xbc, 0x32, 0x68, 0x22, 0x7a, 0x21, 0x0a, 0x7e, 0x21, 0x09, 0x68, 0x17, 0xca, + 0xb8, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x7e, 0xb3, 0x91, 0x07, 0x44, 0x02, 0x7a, 0xb3, 0x91, + 0x07, 0xda, 0xb8, 0x75, 0x09, 0x00, 0x30, 0xe0, 0xc1, 0x6c, 0x67, 0x7a, 0x63, 0x90, 0x00, 0x80, + 0xb9, 0xbe, 0xb0, 0x02, 0x22, 0xc0, 0xd0, 0x75, 0x08, 0xfe, 0x12, 0x0a, 0xc0, 0x74, 0x02, 0x7a, + 0xb3, 0x91, 0x06, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x07, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x74, + 0x00, 0x7a, 0xb3, 0x91, 0x07, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x04, 0x7e, 0xb3, 0x3f, 0xf2, 0x30, + 0xe0, 0x08, 0x74, 0x18, 0x7a, 0xb3, 0x91, 0x01, 0x80, 0x06, 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x01, + 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x04, 0x02, 0x02, 0x36, 0x75, 0x08, 0xff, 0x12, 0x0a, 0xc0, 0x74, + 0x01, 0x7a, 0xb3, 0x91, 0x04, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x7e, 0xb3, 0x91, 0x07, 0x54, + 0xfc, 0x7a, 0xb3, 0x91, 0x07, 0x32, 0xca, 0xb8, 0x75, 0x08, 0x02, 0x12, 0x0a, 0xc0, 0x7e, 0xb3, + 0x91, 0x03, 0x20, 0xe5, 0x08, 0x30, 0xe0, 0x2b, 0x12, 0x02, 0x9e, 0x80, 0xf1, 0x7e, 0xb3, 0x91, + 0x04, 0x30, 0xe0, 0x05, 0xda, 0xb8, 0x02, 0x02, 0x39, 0x30, 0xe1, 0x05, 0xda, 0xb8, 0x02, 0x01, + 0xf5, 0x30, 0xe6, 0x05, 0x12, 0x04, 0x03, 0x80, 0xd5, 0x30, 0xe2, 0x05, 0xda, 0xb8, 0x02, 0x00, + 0x80, 0x80, 0xcb, 0xda, 0xb8, 0x32, + +// Segment #14, EXCLUDED Start Address 00ff31d7, Length 1 + + +// Segment #15, Start Address 00ff0296, Length 2090 +0xff,0x00,0x96,0x02,0x2a,0x08, + 0xe4, 0x7a, 0xb3, 0x3f, 0xf1, 0x02, 0x03, 0x41, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0xca, 0x3b, + 0xca, 0x4b, 0xca, 0x5b, 0xca, 0x6b, 0xca, 0x7b, 0xca, 0xeb, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, + 0x7e, 0xb3, 0x01, 0x2e, 0xb4, 0x00, 0x02, 0x80, 0x1c, 0xb4, 0x01, 0x19, 0x7e, 0xb3, 0x91, 0x14, + 0x54, 0x14, 0x68, 0x05, 0x12, 0x03, 0x05, 0x80, 0x23, 0x7e, 0xb3, 0x91, 0x14, 0x30, 0xe5, 0x1c, + 0x12, 0x04, 0x43, 0x80, 0x17, 0x7e, 0xb3, 0x91, 0x14, 0x30, 0xe5, 0x05, 0x12, 0x04, 0x43, 0x80, + 0x0b, 0x7e, 0xb3, 0x91, 0x14, 0x54, 0x14, 0x68, 0x03, 0x12, 0x03, 0x05, 0xda, 0xeb, 0xda, 0x7b, + 0xda, 0x6b, 0xda, 0x5b, 0xda, 0x4b, 0xda, 0x3b, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0x20, + 0xe4, 0x19, 0x75, 0x08, 0x0a, 0x12, 0x0a, 0xc0, 0x7e, 0xb3, 0x01, 0x2d, 0x70, 0x0a, 0x7e, 0xb3, + 0x01, 0x2e, 0xb4, 0x01, 0x1f, 0x02, 0x03, 0x9d, 0x02, 0x09, 0x8b, 0x75, 0x08, 0x0b, 0x12, 0x0a, + 0xc0, 0x74, 0x14, 0x7a, 0xb3, 0x91, 0x14, 0x7e, 0xb3, 0x01, 0x2e, 0xb4, 0x02, 0x0c, 0x12, 0x03, + 0x4d, 0x02, 0x03, 0x41, 0x74, 0x04, 0x7a, 0xb3, 0x91, 0x14, 0x22, 0x7e, 0x00, 0x00, 0x7a, 0x03, + 0x01, 0x2e, 0x7a, 0x03, 0x01, 0x2f, 0x22, 0x7e, 0xb3, 0x01, 0x25, 0x54, 0x60, 0x60, 0x05, 0xb4, + 0x40, 0x1e, 0x80, 0x1c, 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x05, 0x15, 0x75, 0x08, 0x71, 0x12, 0x0a, + 0xc0, 0x7e, 0xb3, 0x01, 0x28, 0x7e, 0xa0, 0x01, 0x7a, 0xa3, 0x91, 0x06, 0x7a, 0xb3, 0x91, 0x07, + 0x22, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x12, 0x22, 0xbe, 0x57, + 0x01, 0x2b, 0x28, 0x04, 0x7e, 0x57, 0x01, 0x2b, 0x7a, 0x0f, 0x01, 0x31, 0x7a, 0x57, 0x01, 0x35, + 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x12, 0x22, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0xb3, 0x91, + 0x1a, 0x70, 0x53, 0x7e, 0xb3, 0x91, 0x14, 0x20, 0xe4, 0x4c, 0x7e, 0xef, 0x01, 0x31, 0x7e, 0xf7, + 0x01, 0x35, 0x7e, 0x07, 0x01, 0x35, 0x4d, 0x00, 0x68, 0x21, 0x7e, 0x00, 0x00, 0xe0, 0x7a, 0xb3, + 0x91, 0x17, 0xa3, 0xa5, 0x08, 0x1b, 0xf4, 0x68, 0x06, 0xa5, 0xb8, 0x10, 0xf0, 0x80, 0x19, 0x7e, + 0xb0, 0x00, 0x7a, 0xb3, 0x01, 0x2e, 0xbe, 0x00, 0x10, 0x68, 0x0d, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, + 0x01, 0x2e, 0x74, 0x80, 0x7a, 0xb3, 0x91, 0x1e, 0x7a, 0xef, 0x01, 0x31, 0x7a, 0xf7, 0x01, 0x35, + 0x75, 0x08, 0x06, 0x12, 0x0a, 0xc0, 0x74, 0x04, 0x7a, 0xb3, 0x91, 0x14, 0x22, 0xca, 0x0b, 0xca, + 0x1b, 0xca, 0x2b, 0xca, 0x3b, 0xca, 0x4b, 0xca, 0x5b, 0xca, 0x6b, 0xca, 0x7b, 0xca, 0xeb, 0x75, + 0x08, 0x03, 0x12, 0x0a, 0xc0, 0x74, 0x00, 0x7a, 0xb3, 0x01, 0x2d, 0x74, 0x00, 0x7a, 0xb3, 0x91, + 0x00, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x12, 0x12, 0x04, 0xb2, 0xda, 0xeb, 0xda, 0x7b, 0xda, 0x6b, + 0xda, 0x5b, 0xda, 0x4b, 0xda, 0x3b, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0x75, 0x08, 0x03, + 0x12, 0x0a, 0xc0, 0x7e, 0xb3, 0x01, 0x2f, 0xb4, 0x02, 0x11, 0x74, 0x00, 0x7a, 0xb3, 0x01, 0x2f, + 0x7a, 0xb3, 0x01, 0x2e, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x14, 0x22, 0xb4, 0x01, 0x46, 0x7e, 0xb3, + 0x91, 0x04, 0x20, 0xe6, 0x42, 0x7e, 0x23, 0x91, 0x1a, 0x7c, 0x32, 0x7e, 0x13, 0x01, 0x30, 0x2c, + 0x21, 0x7a, 0x23, 0x01, 0x30, 0x7e, 0x00, 0x00, 0x2e, 0x04, 0x01, 0x37, 0x7e, 0xb3, 0x91, 0x16, + 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0xa5, 0xdb, 0xf4, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x14, 0x75, 0x08, + 0x70, 0x12, 0x0a, 0xc0, 0x7e, 0xb3, 0x01, 0x30, 0x7e, 0xa3, 0x01, 0x2c, 0xbc, 0xab, 0x78, 0x03, + 0x12, 0x05, 0x52, 0x22, 0x02, 0x09, 0x8b, 0xda, 0x59, 0x02, 0x04, 0x15, 0x74, 0xe0, 0x7a, 0xb3, + 0x91, 0x00, 0x7e, 0x03, 0x91, 0x10, 0x7e, 0x13, 0x91, 0x11, 0x7e, 0x33, 0x91, 0x12, 0x7e, 0x23, + 0x91, 0x13, 0x7e, 0x53, 0x91, 0x14, 0x7e, 0x43, 0x91, 0x15, 0x7e, 0x73, 0x91, 0x16, 0x7e, 0x63, + 0x91, 0x17, 0x7a, 0x0f, 0x01, 0x25, 0x7a, 0x1f, 0x01, 0x29, 0x75, 0x08, 0x04, 0x12, 0x0a, 0xc0, + 0x7a, 0x01, 0x08, 0x12, 0x0a, 0xc0, 0x7a, 0x11, 0x08, 0x12, 0x0a, 0xc0, 0x7a, 0x21, 0x08, 0x12, + 0x0a, 0xc0, 0x7a, 0x31, 0x08, 0x12, 0x0a, 0xc0, 0x7a, 0x41, 0x08, 0x12, 0x0a, 0xc0, 0x7a, 0x51, + 0x08, 0x12, 0x0a, 0xc0, 0x7a, 0x61, 0x08, 0x12, 0x0a, 0xc0, 0x7a, 0x71, 0x08, 0x12, 0x0a, 0xc0, + 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x04, 0x12, 0x05, 0x26, 0x22, + 0x6d, 0x00, 0x7e, 0x14, 0x01, 0x02, 0x7a, 0x07, 0x01, 0x35, 0x7a, 0x03, 0x01, 0x30, 0x7e, 0xb3, + 0x01, 0x25, 0x20, 0xe7, 0x0f, 0x7a, 0x23, 0x01, 0x2f, 0x7a, 0x33, 0x01, 0x2e, 0xbe, 0x07, 0x01, + 0x2b, 0x68, 0x09, 0x22, 0x7a, 0x33, 0x01, 0x2f, 0x7a, 0x23, 0x01, 0x2e, 0x7e, 0xb3, 0x01, 0x25, + 0x54, 0xe3, 0x23, 0x23, 0x30, 0xe0, 0x02, 0xd2, 0xe5, 0x30, 0xe7, 0x02, 0xd2, 0xe4, 0x30, 0xe5, + 0x06, 0x30, 0xe4, 0x03, 0x02, 0x09, 0x8b, 0x54, 0x3e, 0xf5, 0xf0, 0x03, 0x54, 0x1f, 0xc3, 0x25, + 0xf0, 0x90, 0x05, 0x7e, 0x75, 0x84, 0xff, 0x73, 0x02, 0x07, 0x39, 0x02, 0x05, 0xc6, 0x02, 0x07, + 0xd2, 0x02, 0x07, 0xed, 0x02, 0x06, 0xd0, 0x02, 0x06, 0x5b, 0x02, 0x08, 0x1e, 0x02, 0x08, 0x1e, + 0x02, 0x08, 0x21, 0x02, 0x08, 0x21, 0x02, 0x08, 0x21, 0x02, 0x08, 0x21, 0x02, 0x08, 0x21, 0x02, + 0x08, 0x21, 0x02, 0x08, 0x21, 0x02, 0x08, 0x21, 0x02, 0x08, 0x27, 0x02, 0x08, 0xf9, 0x02, 0x08, + 0x24, 0x02, 0x08, 0x24, 0x02, 0x08, 0x24, 0x02, 0x08, 0x24, 0x02, 0x08, 0x24, 0x02, 0x08, 0x24, + 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, 0x7e, 0xb3, 0x01, 0x26, + 0xb4, 0x06, 0x2a, 0x7e, 0xb3, 0x01, 0x27, 0x60, 0x79, 0x7c, 0x0b, 0x7e, 0x13, 0x01, 0x28, 0x7e, + 0x17, 0x01, 0x29, 0x75, 0x08, 0x72, 0x12, 0x0a, 0xc0, 0x7a, 0x01, 0x08, 0x12, 0x0a, 0xc0, 0x7a, + 0x11, 0x08, 0x12, 0x0a, 0xc0, 0x12, 0x09, 0xd0, 0x40, 0x58, 0x02, 0x03, 0x84, 0xb4, 0x08, 0x1c, + 0x75, 0x08, 0x74, 0x12, 0x0a, 0xc0, 0x7e, 0xb3, 0x3f, 0xf1, 0x7e, 0x08, 0x01, 0x37, 0x7a, 0x0c, + 0x00, 0x00, 0x7a, 0x0b, 0xb0, 0x7e, 0x54, 0x00, 0x01, 0x02, 0x03, 0x84, 0xb4, 0x00, 0x33, 0x75, + 0x08, 0x75, 0x12, 0x0a, 0xc0, 0x7e, 0x08, 0x01, 0x37, 0x7a, 0x0c, 0x00, 0x00, 0xca, 0x0b, 0x7e, + 0xb3, 0x3f, 0xf2, 0x30, 0xe0, 0x07, 0x74, 0x02, 0x7a, 0x0b, 0xb0, 0x80, 0x05, 0x74, 0x00, 0x7a, + 0x0b, 0xb0, 0x0b, 0x14, 0x74, 0x00, 0x7a, 0x0b, 0xb0, 0x7e, 0x54, 0x00, 0x02, 0xda, 0x0b, 0x02, + 0x03, 0x84, 0x02, 0x09, 0x8b, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, + 0x1c, 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x00, 0x5f, 0x75, 0x08, 0x76, 0x12, 0x0a, 0xc0, 0x7e, 0xb3, + 0x01, 0x2a, 0x54, 0x0f, 0xb4, 0x02, 0x05, 0x7e, 0xb0, 0x60, 0x80, 0x17, 0xb4, 0x00, 0x05, 0x7e, + 0xb0, 0x00, 0x80, 0x0f, 0x7e, 0xb3, 0x01, 0x2a, 0x20, 0xe7, 0x05, 0x7e, 0xb0, 0x40, 0x80, 0x03, + 0x7e, 0xb0, 0x20, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0xb3, 0x91, 0x11, 0x30, 0xe0, 0x04, 0x74, 0x01, + 0x80, 0x02, 0x74, 0x00, 0x7e, 0x08, 0x01, 0x37, 0x7a, 0x0c, 0x00, 0x00, 0xca, 0x0b, 0x7a, 0x0b, + 0xb0, 0x0b, 0x14, 0x74, 0x00, 0x7a, 0x0b, 0xb0, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0x54, + 0x00, 0x02, 0xda, 0x0b, 0x02, 0x03, 0x84, 0x02, 0x09, 0x8b, 0x7e, 0xb3, 0x01, 0x2a, 0x54, 0x0f, + 0xb4, 0x02, 0x05, 0x7e, 0xb0, 0x60, 0x80, 0x17, 0xb4, 0x00, 0x05, 0x7e, 0xb0, 0x00, 0x80, 0x0f, + 0x7e, 0xb3, 0x01, 0x2a, 0x20, 0xe7, 0x05, 0x7e, 0xb0, 0x40, 0x80, 0x03, 0x7e, 0xb0, 0x20, 0x7a, + 0xb3, 0x91, 0x00, 0x7e, 0xb3, 0x01, 0x28, 0xb4, 0x00, 0x26, 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x01, + 0x0e, 0x75, 0x08, 0x77, 0x12, 0x0a, 0xc0, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x12, 0x80, 0x1b, 0xb4, + 0x03, 0x0e, 0x75, 0x08, 0x78, 0x12, 0x0a, 0xc0, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x11, 0x80, 0x0a, + 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x12, 0x09, 0x8b, 0x22, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, + 0x02, 0x03, 0x77, 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x09, 0x1f, 0x75, 0x08, 0x79, 0x12, 0x0a, 0xc0, + 0x7e, 0xb3, 0x01, 0x28, 0xbe, 0xb3, 0x3f, 0xf1, 0x68, 0x0d, 0xca, 0xb8, 0x12, 0x01, 0xf1, 0xda, + 0xb8, 0x50, 0x76, 0x7a, 0xb3, 0x3f, 0xf1, 0x80, 0x6d, 0xb4, 0x05, 0x08, 0x75, 0x08, 0x7a, 0x12, + 0x0a, 0xc0, 0x80, 0x62, 0xb4, 0x03, 0x19, 0x75, 0x08, 0x7b, 0x12, 0x0a, 0xc0, 0x7e, 0xb3, 0x01, + 0x28, 0xb4, 0x01, 0x55, 0x7e, 0xb3, 0x3f, 0xf2, 0x44, 0x01, 0x7a, 0xb3, 0x3f, 0xf2, 0x80, 0x46, + 0xb4, 0x01, 0x19, 0x75, 0x08, 0x7c, 0x12, 0x0a, 0xc0, 0x7e, 0xb3, 0x01, 0x28, 0xb4, 0x01, 0x39, + 0x7e, 0xb3, 0x3f, 0xf2, 0x54, 0xfe, 0x7a, 0xb3, 0x3f, 0xf2, 0x80, 0x2a, 0xb4, 0x07, 0x2a, 0x7e, + 0xb3, 0x01, 0x27, 0x60, 0x24, 0x7c, 0x0b, 0x7e, 0x13, 0x01, 0x28, 0x7e, 0x17, 0x01, 0x29, 0x75, + 0x08, 0x73, 0x12, 0x0a, 0xc0, 0x7a, 0x01, 0x08, 0x12, 0x0a, 0xc0, 0x7a, 0x11, 0x08, 0x12, 0x0a, + 0xc0, 0x12, 0x0a, 0x0a, 0x40, 0x03, 0x02, 0x03, 0x77, 0x02, 0x09, 0x8b, 0x7e, 0xb3, 0x01, 0x26, + 0xb4, 0x0b, 0xf6, 0x75, 0x08, 0x7d, 0x12, 0x0a, 0xc0, 0x7e, 0xb3, 0x01, 0x28, 0x7e, 0xa3, 0x01, + 0x2a, 0x4c, 0xab, 0x78, 0xe4, 0x80, 0xdf, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, + 0xb3, 0x91, 0x1c, 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x0a, 0xcf, 0x75, 0x08, 0x7e, 0x12, 0x0a, 0xc0, + 0x7e, 0xb3, 0x01, 0x28, 0x70, 0xc3, 0x7e, 0x08, 0x01, 0x37, 0x7a, 0x0c, 0x00, 0x00, 0x7a, 0x0b, + 0xb0, 0x7e, 0x54, 0x00, 0x01, 0x02, 0x03, 0x84, 0x02, 0x09, 0x8b, 0x02, 0x09, 0x8b, 0x02, 0x09, + 0x8b, 0x7e, 0xb3, 0x01, 0x26, 0xb4, 0x04, 0x20, 0x75, 0x08, 0xc3, 0x12, 0x0a, 0xc0, 0x7e, 0x04, + 0x00, 0x01, 0x7e, 0x17, 0x01, 0x27, 0x7e, 0x18, 0x01, 0x37, 0x7a, 0x1c, 0x00, 0x00, 0x7e, 0x47, + 0x01, 0x2b, 0x12, 0x0a, 0xcc, 0x02, 0x08, 0xf3, 0xb4, 0x06, 0x42, 0x75, 0x08, 0xc1, 0x12, 0x0a, + 0xc0, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0xfe, 0x7d, 0xca, 0x7e, 0xd7, 0x01, 0x27, 0x7e, + 0x78, 0x01, 0x37, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x77, 0x01, 0x2b, 0x75, 0x08, 0xc1, 0x12, 0x0a, + 0xc0, 0xc0, 0xa8, 0xc2, 0xaf, 0x7e, 0x40, 0x01, 0x7a, 0x43, 0x94, 0x00, 0x12, 0x0b, 0x63, 0x7e, + 0x43, 0x01, 0x24, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8, 0x40, 0x65, 0x80, 0x60, 0xb4, 0x00, 0x24, + 0xc2, 0xaf, 0x7e, 0xb0, 0x01, 0x7a, 0xb3, 0x94, 0x00, 0x7a, 0xb3, 0x01, 0x24, 0x12, 0x03, 0x77, + 0xe4, 0x8d, 0xef, 0x8d, 0xef, 0x8d, 0xef, 0xd5, 0xe0, 0xf7, 0xc0, 0xd1, 0xca, 0x02, 0xff, 0xca, + 0x06, 0x00, 0x00, 0x32, 0xb4, 0x09, 0x20, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x7e, 0x23, 0x91, + 0x07, 0x7e, 0x57, 0x01, 0x27, 0x4d, 0x55, 0x68, 0x05, 0x4e, 0x20, 0x02, 0x80, 0x03, 0x5e, 0x20, + 0xfd, 0x7a, 0x23, 0x91, 0x07, 0x80, 0x16, 0xb4, 0x07, 0x16, 0xc2, 0xaf, 0x7e, 0x07, 0x01, 0x29, + 0x7e, 0x17, 0x01, 0x27, 0xc0, 0xd1, 0xca, 0x18, 0xca, 0x38, 0xca, 0x28, 0x32, 0x02, 0x03, 0x77, + 0x02, 0x09, 0x8b, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, 0x7e, + 0xb3, 0x01, 0x26, 0xb4, 0x03, 0x15, 0x75, 0x08, 0xc2, 0x12, 0x0a, 0xc0, 0x7e, 0x04, 0x00, 0x01, + 0x7e, 0x17, 0x01, 0x27, 0x7e, 0x57, 0x01, 0x2b, 0x02, 0x03, 0x84, 0xb4, 0x05, 0x41, 0x75, 0x08, + 0xc0, 0x12, 0x0a, 0xc0, 0xc0, 0xa8, 0xc2, 0xaf, 0x7e, 0x40, 0x01, 0x7a, 0x43, 0x94, 0x00, 0x7e, + 0x08, 0x01, 0x37, 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x24, 0x00, 0xfe, 0x7e, 0x37, 0x01, 0x27, 0x7e, + 0x47, 0x01, 0x2b, 0x12, 0x0a, 0xcc, 0x7e, 0x43, 0x01, 0x24, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8, + 0x7e, 0x08, 0x01, 0x37, 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x57, 0x01, 0x2b, 0x02, 0x03, 0x84, 0xb4, + 0x01, 0x20, 0x7e, 0x00, 0x00, 0x7e, 0x10, 0x01, 0x75, 0x08, 0x72, 0x12, 0x0a, 0xc0, 0x7a, 0x01, + 0x08, 0x12, 0x0a, 0xc0, 0x7a, 0x11, 0x08, 0x12, 0x0a, 0xc0, 0x12, 0x09, 0xd0, 0x40, 0x03, 0x02, + 0x03, 0x84, 0x02, 0x09, 0x8b, 0x75, 0x08, 0x07, 0x12, 0x0a, 0xc0, 0x7e, 0xb0, 0x02, 0x7a, 0xb3, + 0x90, 0x00, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x15, 0x74, 0x01, + 0x7a, 0xb3, 0x91, 0x11, 0x7e, 0xb3, 0x91, 0x15, 0x54, 0x60, 0xbe, 0xb0, 0x40, 0x68, 0x08, 0x74, + 0x20, 0x7a, 0xb3, 0x91, 0x15, 0x80, 0xed, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x12, 0x74, 0x04, 0x7a, + 0xb3, 0x91, 0x14, 0x74, 0xff, 0x7a, 0xb3, 0x01, 0x2d, 0x22, 0xc0, 0xa8, 0xc2, 0xaf, 0x7e, 0x40, + 0x01, 0x7a, 0x43, 0x94, 0x00, 0x12, 0x0a, 0x57, 0x40, 0x1f, 0x7e, 0x08, 0x01, 0x37, 0x7a, 0x0c, + 0x00, 0x00, 0xca, 0x0b, 0xca, 0x49, 0x12, 0x0a, 0xcc, 0xda, 0x59, 0xda, 0x0b, 0x7e, 0x43, 0x01, + 0x24, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8, 0xc3, 0x22, 0x7e, 0x43, 0x01, 0x24, 0x7a, 0x43, 0x94, + 0x00, 0xd0, 0xa8, 0x22, 0xc0, 0xa8, 0xc2, 0xaf, 0x7e, 0x40, 0x01, 0x7a, 0x43, 0x94, 0x00, 0x12, + 0x0a, 0x57, 0x40, 0x31, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0xfe, 0x7f, 0x61, 0x7e, 0x78, + 0x01, 0x37, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x77, 0x01, 0x2b, 0xbd, 0x74, 0x78, 0x17, 0x75, 0x08, + 0xc1, 0x12, 0x0a, 0xc0, 0x12, 0x0b, 0x63, 0x40, 0x0c, 0x7e, 0x43, 0x01, 0x24, 0x7a, 0x43, 0x94, + 0x00, 0xd0, 0xa8, 0xc3, 0x22, 0x7e, 0x43, 0x01, 0x24, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8, 0xd3, + 0x22, 0x7e, 0x24, 0x00, 0xfe, 0x7e, 0x34, 0x7f, 0xca, 0x0b, 0x1a, 0x50, 0xc5, 0xf0, 0x7d, 0x62, + 0x7d, 0x75, 0x7d, 0x87, 0x7e, 0x34, 0x7f, 0x03, 0x7e, 0x1b, 0xb0, 0xbc, 0x0b, 0x50, 0x49, 0x3e, + 0x00, 0x3e, 0x00, 0x0a, 0x50, 0x2d, 0x75, 0x0b, 0x3a, 0x30, 0x69, 0x53, 0x00, 0x02, 0xbd, 0x38, + 0x50, 0x02, 0x2d, 0x38, 0xbc, 0x1b, 0x50, 0x30, 0x3e, 0x10, 0x3e, 0x10, 0x0a, 0x51, 0x2d, 0x35, + 0x69, 0x41, 0x00, 0x02, 0x0b, 0x1a, 0x30, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbe, 0x44, 0xff, + 0xff, 0x78, 0x05, 0x7e, 0x1b, 0x90, 0x0a, 0x49, 0x4d, 0x44, 0x68, 0x0c, 0xbe, 0x44, 0x00, 0xff, + 0x28, 0x04, 0x7e, 0x44, 0x00, 0xff, 0xc3, 0x22, 0xd3, 0x22, + +// Segment #16, EXCLUDED Start Address 00ff7c00, Length 227 + + +// Segment #17, EXCLUDED Start Address 00ff7f00, Length 192 + + +// Segment #17, Start Address 00ff7fc0, Length 64 +0xff,0x00,0xc0,0x7f,0x40,0x00, + 0x40, 0x01, 0x02, 0x00, 0xd7, 0x31, 0x02, 0x00, 0x03, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x01, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf1, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + +// Segment #18, Start Address 00ff0ac0, Length 4163 +0xff,0x00,0xc0,0x0a,0x43,0x10, + 0xca, 0x08, 0x7e, 0x01, 0x08, 0x7a, 0x03, 0x3f, 0xf0, 0xda, 0x08, 0x22, 0x80, 0x50, 0x0b, 0x1a, + 0x60, 0x0b, 0x35, 0x0b, 0x1a, 0x70, 0x0b, 0x35, 0x0b, 0x1a, 0x80, 0x0b, 0x35, 0x0b, 0x1a, 0x90, + 0x0b, 0x35, 0x0b, 0x1a, 0xa0, 0x0b, 0x35, 0x0b, 0x1a, 0xb0, 0x0b, 0x35, 0x0b, 0x1a, 0xc0, 0x0b, + 0x35, 0x0b, 0x1a, 0xd0, 0x0b, 0x35, 0x1b, 0x0a, 0x60, 0x0b, 0x15, 0x1b, 0x0a, 0x70, 0x0b, 0x15, + 0x1b, 0x0a, 0x80, 0x0b, 0x15, 0x1b, 0x0a, 0x90, 0x0b, 0x15, 0x1b, 0x0a, 0xa0, 0x0b, 0x15, 0x1b, + 0x0a, 0xb0, 0x0b, 0x15, 0x1b, 0x0a, 0xc0, 0x0b, 0x15, 0x1b, 0x0a, 0xd0, 0x0b, 0x15, 0x9e, 0x44, + 0x00, 0x10, 0x50, 0xaa, 0x2e, 0x44, 0x00, 0x10, 0x68, 0x0e, 0x7e, 0x1b, 0xc0, 0x7a, 0x0b, 0xc0, + 0x0b, 0x14, 0x0b, 0x34, 0x1b, 0x44, 0x78, 0xf2, 0x22, 0x7f, 0x6f, 0x7f, 0xf0, 0x1b, 0xfc, 0x7c, + 0x54, 0x7d, 0x32, 0x80, 0x08, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0x9e, 0x44, 0x00, + 0x10, 0x50, 0xf2, 0x2e, 0x44, 0x00, 0x10, 0x68, 0x06, 0xca, 0x48, 0x1b, 0x44, 0x78, 0xfa, 0x7f, + 0xf6, 0x89, 0xe4, 0xca, 0x6b, 0x5e, 0xd4, 0x00, 0x3f, 0x68, 0x20, 0x7e, 0x84, 0x00, 0x40, 0x9d, + 0x8d, 0xda, 0x6b, 0xbd, 0x87, 0x38, 0x16, 0xca, 0x79, 0x7d, 0x78, 0x12, 0x0b, 0x8d, 0xda, 0x79, + 0x40, 0x08, 0x9d, 0x78, 0x68, 0x02, 0x80, 0x05, 0xc2, 0xd7, 0x22, 0xda, 0x6b, 0x7e, 0xc0, 0x03, + 0x7e, 0xd0, 0x00, 0x7a, 0xd3, 0x90, 0x00, 0x74, 0xaa, 0x39, 0xb5, 0x55, 0x55, 0x74, 0x55, 0x39, + 0xb5, 0x2a, 0xaa, 0x74, 0xa0, 0x39, 0xb5, 0x55, 0x55, 0x7e, 0x04, 0x00, 0x40, 0x9d, 0x70, 0x50, + 0x06, 0x2d, 0x70, 0x7d, 0x07, 0x6d, 0x77, 0x7c, 0x31, 0x7e, 0x7b, 0x00, 0x7a, 0x6b, 0x00, 0x0b, + 0x7c, 0x0b, 0x6c, 0xa5, 0xd9, 0xf3, 0x7f, 0x16, 0x1b, 0x1c, 0x7e, 0x54, 0x27, 0x10, 0x7e, 0x1b, + 0x10, 0xbc, 0x10, 0x68, 0x06, 0x1b, 0x54, 0x78, 0xf5, 0x80, 0x2f, 0x6d, 0x00, 0x7c, 0x20, 0x7f, + 0x16, 0x9f, 0x10, 0x7f, 0x27, 0x9f, 0x20, 0x7e, 0x2b, 0x00, 0x7e, 0x1b, 0x10, 0xbc, 0x01, 0x78, + 0x19, 0x0b, 0x2c, 0x0b, 0x1c, 0xa5, 0xdb, 0xef, 0x7c, 0xb6, 0x20, 0xe0, 0x06, 0x6c, 0xdc, 0x7a, + 0xd3, 0x90, 0x00, 0x4d, 0x77, 0x78, 0x90, 0xc2, 0xd7, 0x22, 0xd2, 0xd7, 0x22, 0x00, 0x04, 0x00, + 0x04, 0x00, 0x00, 0x06, 0x04, 0x02, 0x04, 0x00, 0x02, 0x01, 0x04, 0x01, 0x02, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x00, 0x08, 0x10, 0x02, 0x10, + 0x04, 0x02, 0x08, 0x00, 0x01, 0x01, 0x08, 0x7e, 0x18, 0x7f, 0xbd, 0x7a, 0x1c, 0x00, 0xff, 0x0b, + 0x1a, 0x00, 0x5e, 0x10, 0x1f, 0xbe, 0x10, 0x14, 0x38, 0x1a, 0x0a, 0x51, 0x23, 0x7e, 0x18, 0x0c, + 0x0d, 0x7a, 0x1c, 0x00, 0xff, 0x2d, 0x35, 0x0b, 0x1a, 0x50, 0x60, 0x08, 0xa5, 0xb8, 0x02, 0x03, + 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe, 0x7e, 0xe8, 0x7f, 0xbf, 0x7a, 0xec, 0x00, 0xff, 0xe0, 0xf5, + 0x23, 0x54, 0xc0, 0x68, 0x38, 0x7e, 0xe8, 0x7f, 0xbe, 0x7a, 0xec, 0x00, 0xff, 0xe0, 0x60, 0x2e, + 0x12, 0x0c, 0x37, 0xf5, 0x21, 0x7a, 0xa1, 0x20, 0x20, 0x09, 0x0c, 0x20, 0x0a, 0x12, 0x7e, 0xb0, + 0x0e, 0x7a, 0xb3, 0x92, 0x00, 0x80, 0x10, 0x7e, 0xb0, 0x02, 0x7a, 0xb3, 0x92, 0x00, 0x80, 0x07, + 0x7e, 0xb0, 0x0a, 0x7a, 0xb3, 0x92, 0x00, 0x7a, 0xb1, 0x0d, 0x02, 0x0c, 0xc4, 0x22, 0x7e, 0xb0, + 0x02, 0x7a, 0xb3, 0x90, 0x00, 0x12, 0x19, 0x0c, 0x7e, 0xb0, 0x03, 0x7a, 0xb3, 0x90, 0x00, 0x12, + 0x19, 0x0c, 0x80, 0xea, 0xc2, 0xaf, 0xc2, 0x11, 0xc2, 0x12, 0x75, 0xb0, 0xdf, 0x7e, 0x00, 0x01, + 0x7a, 0x03, 0x93, 0x00, 0x7e, 0x00, 0x00, 0x7a, 0x03, 0x90, 0x00, 0x6c, 0x00, 0x7e, 0x10, 0x03, + 0x12, 0x0c, 0xf5, 0x7e, 0x68, 0x2c, 0x66, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x0b, 0x00, + 0x80, 0x32, 0x02, 0x1a, 0x6e, 0x20, 0x11, 0x2b, 0x7e, 0xb0, 0x01, 0x7a, 0xb3, 0x90, 0x00, 0x12, + 0x19, 0x0c, 0x7e, 0xb0, 0x03, 0x7a, 0xb3, 0x90, 0x00, 0x12, 0x19, 0x0c, 0x7e, 0xb0, 0x02, 0x7a, + 0xb3, 0x90, 0x00, 0x12, 0x19, 0x0c, 0xa5, 0xd9, 0xdc, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x90, 0x00, + 0x12, 0x19, 0x0c, 0x22, 0x7e, 0x68, 0x2c, 0xf9, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, + 0xe4, 0x10, 0x00, 0x7e, 0x40, 0x55, 0x7a, 0xe9, 0x40, 0x0b, 0xe4, 0x7e, 0x50, 0xaa, 0x7a, 0xe9, + 0x50, 0x1b, 0xe4, 0xbe, 0xe9, 0x40, 0x68, 0x19, 0x7e, 0x68, 0x2c, 0xdf, 0x7a, 0x6c, 0x00, 0xff, + 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30, 0x11, 0x13, 0x7a, 0xe9, 0x40, 0x7e, 0xe9, 0x10, 0x80, + 0xf8, 0x7e, 0x68, 0x2c, 0xda, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x0b, 0x00, 0x7e, 0x68, + 0x2d, 0x3d, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x78, 0x00, 0x00, 0x7e, 0x70, 0x0e, + 0x7e, 0xa4, 0xff, 0xff, 0x7e, 0xb4, 0xbf, 0xff, 0x7d, 0xcb, 0x0e, 0xc4, 0x7d, 0xdc, 0x5d, 0xdb, + 0x6c, 0xbb, 0x7d, 0xfa, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x0b, 0xb0, 0x7d, 0xfb, 0x5e, + 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x0b, 0xb0, 0x7d, 0xfc, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, + 0xb0, 0x0b, 0xb0, 0x7d, 0xfd, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x6c, 0xbb, 0x7d, 0xfa, + 0x5e, 0xf4, 0x7f, 0xff, 0xbe, 0x7b, 0xb0, 0x78, 0x41, 0x0b, 0xb0, 0x7d, 0xfb, 0x5e, 0xf4, 0x7f, + 0xff, 0xbe, 0x7b, 0xb0, 0x78, 0x34, 0x0b, 0xb0, 0x7d, 0xfc, 0x5e, 0xf4, 0x7f, 0xff, 0xbe, 0x7b, + 0xb0, 0x78, 0x27, 0x0b, 0xb0, 0x7d, 0xfd, 0x5e, 0xf4, 0x7f, 0xff, 0xbe, 0x7b, 0xb0, 0x78, 0x1a, + 0x0b, 0xb0, 0xbe, 0xc4, 0xff, 0xfe, 0x78, 0x92, 0x0e, 0xb4, 0xa5, 0xdf, 0x8b, 0x7e, 0x68, 0x2c, + 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x80, 0x77, 0xca, 0x5b, 0xca, 0x6b, 0x7e, 0x68, + 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x68, 0x2d, 0x8f, 0x7a, 0x6c, 0x00, + 0xff, 0x12, 0x19, 0xc4, 0x0a, 0x47, 0x12, 0x19, 0xfa, 0x7e, 0x68, 0x2d, 0xde, 0x7a, 0x6c, 0x00, + 0xff, 0x12, 0x19, 0xc4, 0x6c, 0x77, 0xda, 0x6b, 0xca, 0x6b, 0x0b, 0x70, 0x0e, 0xc4, 0xbe, 0xc4, + 0xff, 0xff, 0x78, 0xf6, 0x1b, 0x70, 0x0a, 0x47, 0x12, 0x19, 0xfa, 0x12, 0x19, 0x19, 0x30, 0x11, + 0x30, 0xda, 0x6b, 0xda, 0x5b, 0x6c, 0xbb, 0x7e, 0x78, 0x00, 0x00, 0x7d, 0xfa, 0x5e, 0xf4, 0x7f, + 0xff, 0x7a, 0x7b, 0xb0, 0x7d, 0xfb, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x7d, 0xfc, 0x5e, + 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x7d, 0xfd, 0x5e, 0xf4, 0x7f, 0xff, 0x7a, 0x7b, 0xb0, 0x80, + 0xd4, 0x7e, 0x68, 0x2d, 0x1b, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x30, 0x1f, 0x0e, 0x7e, + 0x78, 0x04, 0x20, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x44, 0x7b, 0xe0, 0x80, 0x0c, 0x7e, 0x78, 0x00, + 0x00, 0x7a, 0x7c, 0x00, 0x01, 0x7e, 0x44, 0x80, 0x00, 0x0b, 0x00, 0x7e, 0x40, 0x3a, 0x7c, 0x54, + 0x7f, 0x57, 0x7d, 0x84, 0x6c, 0x66, 0x7a, 0x5b, 0x50, 0x0b, 0x5c, 0x0b, 0x50, 0xa5, 0xde, 0x02, + 0x0b, 0x50, 0x1b, 0x84, 0x78, 0xf0, 0x7c, 0x54, 0x7f, 0x57, 0x7d, 0x84, 0x6c, 0x66, 0xbe, 0x5b, + 0x50, 0x78, 0x1a, 0x0b, 0x5c, 0x0b, 0x50, 0xa5, 0xde, 0x02, 0x0b, 0x50, 0x1b, 0x84, 0x78, 0xee, + 0x7e, 0x68, 0x2c, 0xda, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x80, 0x4b, 0x7f, 0x45, 0x7e, + 0x68, 0x2c, 0xdf, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x68, 0x2d, 0x5f, 0x7a, 0x6c, + 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7d, 0x4b, 0x12, 0x19, 0xfa, 0x7e, 0x68, 0x2d, 0x74, 0x7a, 0x6c, + 0x00, 0xff, 0x12, 0x19, 0xc4, 0x6c, 0x88, 0x7c, 0x95, 0x12, 0x19, 0xfa, 0x7e, 0x68, 0x2d, 0x82, + 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x4b, 0x90, 0x12, 0x19, 0xfa, 0x12, 0x19, 0x19, + 0x30, 0x11, 0x05, 0x7e, 0x4b, 0x90, 0x80, 0xfb, 0x7e, 0x68, 0x2e, 0x28, 0x7a, 0x6c, 0x00, 0xff, + 0x12, 0x19, 0xc4, 0x0b, 0x00, 0x7e, 0xb0, 0x80, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0xa0, 0x55, 0x7a, + 0xa3, 0x91, 0x10, 0x7e, 0xb3, 0x91, 0x07, 0x7e, 0xb3, 0x91, 0x10, 0xbc, 0xab, 0x78, 0x20, 0x7e, + 0xa0, 0xaa, 0x7a, 0xa3, 0x91, 0x10, 0x7e, 0xb3, 0x91, 0x07, 0x7e, 0xb3, 0x91, 0x10, 0xbc, 0xab, + 0x78, 0x0d, 0x7e, 0x68, 0x2c, 0xda, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x80, 0x1b, 0x7e, + 0x68, 0x2c, 0xdf, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30, 0x11, 0x0a, + 0x7a, 0xa3, 0x91, 0x10, 0x7e, 0xb3, 0x91, 0x10, 0x80, 0xf6, 0x7e, 0x68, 0x2e, 0x4a, 0x7a, 0x6c, + 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x12, 0x31, 0x0b, 0x00, 0x7e, 0xe4, 0x10, 0x00, 0x7e, 0xa0, + 0xa5, 0xca, 0xa8, 0x7a, 0xe9, 0xa0, 0x7e, 0xb0, 0x30, 0x7a, 0xb3, 0x95, 0x00, 0x7e, 0xe9, 0xa0, + 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x95, 0x00, 0x12, 0x19, 0x0c, 0x0b, 0xe5, 0x7e, 0xb0, 0x20, 0x7a, + 0xb3, 0x95, 0x00, 0x7e, 0xe9, 0xb0, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x95, 0x00, 0x7e, 0xe9, 0xb0, + 0xda, 0xa8, 0xbc, 0xab, 0x78, 0x0d, 0x7e, 0x68, 0x2c, 0xda, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, + 0xc4, 0x80, 0x1d, 0x7e, 0x68, 0x2c, 0xdf, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, + 0x19, 0x30, 0x11, 0x0c, 0x7e, 0xb0, 0x38, 0x7a, 0xb3, 0x95, 0x00, 0x7e, 0xe9, 0xb0, 0x80, 0xfb, + 0x80, 0x00, 0x7e, 0x68, 0x2d, 0xe4, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x0b, 0x00, 0x75, + 0xb0, 0xdf, 0x7e, 0x24, 0x80, 0x00, 0x09, 0xb2, 0x00, 0x08, 0xbe, 0xb0, 0x01, 0x78, 0x0b, 0x09, + 0xb2, 0x00, 0x14, 0xbe, 0xb0, 0x60, 0x78, 0x02, 0x80, 0x17, 0x7e, 0x68, 0x2c, 0xdf, 0x7a, 0x6c, + 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30, 0x11, 0x11, 0x09, 0xb2, 0x00, 0x08, 0x80, + 0xfa, 0x7e, 0x68, 0x2c, 0xda, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x68, 0x2e, 0x06, + 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x0b, 0x00, 0x75, 0xb0, 0xef, 0x12, 0x18, 0xff, 0x7e, + 0x24, 0x80, 0x00, 0x7e, 0xa0, 0x55, 0x19, 0xa2, 0x00, 0x1c, 0x7e, 0xb0, 0x01, 0x19, 0xb2, 0x00, + 0x08, 0x09, 0xb2, 0x00, 0x1c, 0xbc, 0xab, 0x78, 0x37, 0x09, 0xb2, 0x00, 0x08, 0x5e, 0xb0, 0xc0, + 0xbe, 0xb0, 0xc0, 0x78, 0x2b, 0x7e, 0xa0, 0xaa, 0x19, 0xa2, 0x00, 0x1c, 0x6c, 0xbb, 0x19, 0xb2, + 0x00, 0x08, 0x09, 0xb2, 0x00, 0x1c, 0xbc, 0xab, 0x78, 0x16, 0x09, 0xb2, 0x00, 0x08, 0x5e, 0xb0, + 0xc0, 0x78, 0x0d, 0x7e, 0x68, 0x2c, 0xda, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x80, 0x1b, + 0x7e, 0x68, 0x2c, 0xdf, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30, 0x11, + 0x0a, 0x19, 0xa2, 0x00, 0x1c, 0x09, 0xb2, 0x00, 0x1c, 0x80, 0xf6, 0x7e, 0x68, 0x2e, 0x6c, 0x7a, + 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x68, 0x2e, 0xee, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, + 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x7e, 0xb0, 0x01, 0x19, 0xb2, 0x00, 0x1c, 0x2e, + 0x24, 0x01, 0x00, 0x0b, 0xb0, 0xa5, 0xd9, 0xf3, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x7e, + 0xb0, 0x01, 0x0b, 0x00, 0x09, 0xa2, 0x00, 0x1c, 0xbc, 0xab, 0x78, 0x16, 0x7e, 0x68, 0x2c, 0xe7, + 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x2e, 0x24, 0x01, 0x00, 0x0b, 0xb0, 0xa5, 0xd9, 0xe2, + 0x80, 0x25, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, + 0x30, 0x11, 0xe4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x09, 0xa2, 0x00, 0x1c, 0x2e, 0x24, + 0x01, 0x00, 0xa5, 0xd9, 0xf5, 0x80, 0xec, 0x7e, 0x68, 0x2f, 0x12, 0x7a, 0x6c, 0x00, 0xff, 0x12, + 0x19, 0xc4, 0x12, 0x12, 0x31, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x74, 0x10, + 0x19, 0xb2, 0x00, 0x10, 0x12, 0x11, 0xaa, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xee, 0x7e, 0x68, + 0x2f, 0x36, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, + 0x0b, 0x00, 0xe4, 0x19, 0xb2, 0x00, 0x10, 0x12, 0x11, 0xaa, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, + 0xef, 0x30, 0x00, 0x03, 0x02, 0x17, 0x3b, 0x02, 0x12, 0x6a, 0x74, 0x07, 0x19, 0xb2, 0x00, 0x08, + 0x12, 0x19, 0x0c, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00, 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09, + 0xb2, 0x00, 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09, 0xb2, 0x00, 0x14, 0x09, 0xb2, 0x00, 0x00, 0x09, + 0xb2, 0x00, 0x14, 0xc2, 0x13, 0x7e, 0xb0, 0x55, 0x12, 0x12, 0x0b, 0x7e, 0xb0, 0xaa, 0x12, 0x12, + 0x0b, 0x7e, 0xb0, 0x00, 0x12, 0x12, 0x0b, 0x7e, 0xb0, 0xff, 0x12, 0x12, 0x0b, 0x30, 0x13, 0x0f, + 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x22, 0x7e, + 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x22, 0x19, 0xb2, 0x00, 0x00, 0x12, + 0x18, 0xff, 0x09, 0xa2, 0x00, 0x00, 0xbc, 0xab, 0x78, 0x01, 0x22, 0x20, 0x11, 0x03, 0xd2, 0x13, + 0x22, 0x12, 0x19, 0x19, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x18, 0xff, 0x09, 0xa2, 0x00, 0x00, 0x80, + 0xf3, 0x75, 0xb0, 0xdf, 0x12, 0x18, 0xff, 0x75, 0xb0, 0xef, 0x12, 0x18, 0xff, 0x7e, 0x24, 0x80, + 0x00, 0x7e, 0x11, 0x21, 0x74, 0x80, 0x19, 0xb2, 0x00, 0x0c, 0x7e, 0x54, 0x00, 0x02, 0x19, 0xa2, + 0x00, 0x04, 0x19, 0xb2, 0x00, 0x00, 0x74, 0x03, 0x19, 0xb2, 0x00, 0x0c, 0x74, 0x06, 0x19, 0xb2, + 0x00, 0x08, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xdb, 0x22, 0x7e, 0x68, 0x2f, 0x5a, 0x7a, 0x6c, + 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x12, 0x18, + 0xff, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x55, 0x19, 0xa2, 0x00, 0x00, 0x12, 0x18, 0xff, 0x09, + 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x05, 0x78, 0x0d, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, + 0x12, 0x19, 0xc4, 0x80, 0x1a, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, + 0x12, 0x19, 0x19, 0x30, 0x11, 0x09, 0x19, 0xa2, 0x00, 0x00, 0x12, 0x18, 0xff, 0x80, 0xf7, 0x2e, + 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xb6, 0x7e, 0x68, 0x2f, 0x7e, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, + 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, + 0x18, 0x7e, 0xa0, 0x55, 0x19, 0xa2, 0x00, 0x00, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, + 0xb0, 0x0a, 0x78, 0x0d, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x80, + 0x1a, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30, + 0x11, 0x09, 0x19, 0xa2, 0x00, 0x00, 0x12, 0x18, 0xff, 0x80, 0xf7, 0x2e, 0x24, 0x01, 0x00, 0xa5, + 0xd9, 0xb6, 0x30, 0x04, 0x03, 0x02, 0x15, 0x9f, 0x7e, 0x68, 0x2f, 0xa2, 0x7a, 0x6c, 0x00, 0xff, + 0x12, 0x19, 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x6c, 0xaa, 0x19, 0xa2, + 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, + 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x0a, + 0x78, 0x3c, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, + 0x7e, 0xa0, 0x03, 0x19, 0xa2, 0x00, 0x10, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, + 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x0a, 0x78, 0x14, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, + 0x00, 0xff, 0x12, 0x19, 0xc4, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0x9e, 0x80, 0x20, 0x7e, 0x68, + 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30, 0x11, 0xe6, 0x7e, + 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x7e, 0x68, + 0x2f, 0xea, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, + 0x0b, 0x00, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x7e, + 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, + 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x05, 0x78, 0x3c, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, + 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x03, 0x19, 0xa2, 0x00, 0x10, 0x7e, 0xa0, 0x02, + 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x05, 0x78, 0x14, + 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x2e, 0x24, 0x01, 0x00, 0xa5, + 0xd9, 0x9e, 0x80, 0x20, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, + 0x19, 0x19, 0x30, 0x11, 0xe6, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, + 0x00, 0x10, 0x80, 0xf1, 0x7e, 0x68, 0x30, 0x32, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, + 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, + 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x50, 0xbe, 0xb0, 0x50, 0x78, 0x1f, 0x6c, 0xaa, + 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x50, 0x78, 0x0d, + 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x80, 0x20, 0x7e, 0x68, 0x2c, + 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30, 0x11, 0x0f, 0x7e, 0xa0, + 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x2e, 0x24, 0x01, + 0x00, 0xa5, 0xd9, 0xa2, 0x7e, 0x68, 0x30, 0x7a, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, + 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x01, 0x19, + 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0xa0, 0xbe, 0xb0, 0xa0, + 0x78, 0x1f, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, + 0xb0, 0xa0, 0x78, 0x0d, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x80, + 0x20, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30, + 0x11, 0x0f, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, + 0xf1, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0x9e, 0x7e, 0x68, 0x30, 0x9e, 0x7a, 0x6c, 0x00, 0xff, + 0x12, 0x19, 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x20, 0xb1, 0x26, 0x7e, + 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x30, 0xb1, 0x19, 0x6c, 0xaa, 0x19, 0xa2, + 0x00, 0x10, 0x12, 0x18, 0xff, 0x20, 0xb1, 0x0d, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, + 0x12, 0x19, 0xc4, 0x80, 0x20, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, + 0x12, 0x19, 0x19, 0x30, 0x11, 0x0f, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, + 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xae, 0x02, 0x17, 0x3b, 0x7e, + 0x68, 0x2f, 0xc6, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, + 0x21, 0x0b, 0x00, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, + 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, + 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x06, 0x78, 0x3c, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, + 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x03, 0x19, 0xa2, 0x00, 0x10, 0x7e, 0xa0, + 0x01, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x06, 0x78, + 0x14, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x2e, 0x24, 0x01, 0x00, + 0xa5, 0xd9, 0x9e, 0x80, 0x20, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, + 0x12, 0x19, 0x19, 0x30, 0x11, 0xe6, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, + 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x7e, 0x68, 0x30, 0x0e, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, + 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, + 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x01, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, + 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x09, 0x78, 0x3c, 0x7e, + 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x7e, 0xa0, 0x03, + 0x19, 0xa2, 0x00, 0x10, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, + 0x00, 0x18, 0x5e, 0xb0, 0x09, 0x78, 0x14, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, + 0x19, 0xc4, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0x9e, 0x80, 0x20, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, + 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, 0x19, 0x19, 0x30, 0x11, 0xe6, 0x7e, 0xa0, 0x01, 0x19, + 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x80, 0xf1, 0x7e, 0x68, 0x30, 0x56, 0x7a, + 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x7e, + 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, 0x00, 0x18, 0x5e, 0xb0, 0x90, + 0xbe, 0xb0, 0x90, 0x78, 0x1f, 0x6c, 0xaa, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x09, 0xb2, + 0x00, 0x18, 0x5e, 0xb0, 0x90, 0x78, 0x0d, 0x7e, 0x68, 0x2c, 0xe7, 0x7a, 0x6c, 0x00, 0xff, 0x12, + 0x19, 0xc4, 0x80, 0x20, 0x7e, 0x68, 0x2c, 0xf0, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x12, + 0x19, 0x19, 0x30, 0x11, 0x0f, 0x7e, 0xa0, 0x02, 0x19, 0xa2, 0x00, 0x10, 0x6c, 0xaa, 0x19, 0xa2, + 0x00, 0x10, 0x80, 0xf1, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xa2, 0x20, 0x1f, 0x68, 0x12, 0x12, + 0x31, 0x12, 0x17, 0xa9, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, 0x0b, 0x00, 0x20, 0x89, 0x26, + 0x7e, 0xa0, 0xff, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x18, 0xff, 0x7e, 0xb0, 0x55, 0x19, 0xb2, 0x00, + 0x00, 0x12, 0x18, 0xff, 0x30, 0x89, 0x0f, 0x7e, 0xa0, 0x00, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x18, + 0xff, 0x20, 0x89, 0x02, 0x80, 0x26, 0x12, 0x19, 0x19, 0x30, 0x11, 0x20, 0x7e, 0xa0, 0xff, 0x19, + 0xa2, 0x00, 0x04, 0x12, 0x18, 0xff, 0x7e, 0xb0, 0x55, 0x19, 0xb2, 0x00, 0x00, 0x12, 0x18, 0xff, + 0x7e, 0xa0, 0x00, 0x19, 0xa2, 0x00, 0x04, 0x12, 0x18, 0xff, 0x80, 0xe0, 0x2e, 0x24, 0x01, 0x00, + 0xa5, 0xd9, 0xa8, 0x02, 0x17, 0xc2, 0x02, 0x18, 0x4c, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x21, + 0x7e, 0xa0, 0x08, 0x19, 0xa2, 0x00, 0x10, 0x12, 0x18, 0xff, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, + 0xef, 0x22, 0x30, 0x1f, 0x03, 0x02, 0x18, 0x4c, 0xc2, 0x8a, 0x12, 0x17, 0xa9, 0x0b, 0x00, 0x12, + 0x18, 0x16, 0x20, 0x8b, 0x24, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x02, 0x7a, 0xb3, 0x91, + 0x07, 0x74, 0x0c, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x07, 0x12, 0x19, 0x0c, + 0x30, 0x8b, 0x06, 0x12, 0x18, 0x16, 0x30, 0x8b, 0xad, 0x12, 0x19, 0x19, 0x30, 0x11, 0xa7, 0x12, + 0x18, 0x16, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x07, 0x12, 0x19, + 0x0c, 0x12, 0x18, 0x16, 0x80, 0xe9, 0x7e, 0xa0, 0x00, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x06, 0x7a, + 0xa3, 0x91, 0x07, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x7a, 0xa3, 0x91, 0x07, 0x12, 0x18, 0xff, + 0x74, 0xef, 0x7a, 0xb3, 0x91, 0x04, 0x74, 0x80, 0x7a, 0xb3, 0x91, 0x03, 0x74, 0x0c, 0x7a, 0xb3, + 0x91, 0x06, 0x74, 0x08, 0x7a, 0xb3, 0x91, 0x07, 0x12, 0x19, 0x0c, 0x22, 0x30, 0x12, 0x19, 0x7e, + 0x68, 0x30, 0xc2, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0xd2, 0x11, 0x12, 0x18, 0xff, 0x12, + 0x18, 0xff, 0x12, 0x18, 0xff, 0x02, 0x0c, 0xca, 0x30, 0x1f, 0x1c, 0x7e, 0x68, 0x31, 0x3c, 0x7a, + 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x7e, 0x68, 0x31, 0x5e, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, + 0xc4, 0x12, 0x1a, 0x6e, 0x02, 0x18, 0xf7, 0x0b, 0x00, 0x7e, 0x78, 0x18, 0xb1, 0x7a, 0x7c, 0x00, + 0xff, 0x7f, 0x67, 0x7a, 0x6c, 0x00, 0x00, 0x7e, 0x70, 0x3e, 0x7e, 0x7b, 0xb0, 0x7a, 0x6b, 0xb0, + 0x0b, 0x7c, 0x0b, 0x6c, 0xa5, 0xdf, 0xf3, 0x7e, 0x78, 0x18, 0xb1, 0x7a, 0x7c, 0x00, 0x00, 0x89, + 0x78, 0x7e, 0x78, 0x00, 0x00, 0x7a, 0x7c, 0x00, 0xfe, 0x7e, 0x68, 0x7f, 0xbf, 0x7a, 0x6c, 0x00, + 0xfe, 0x74, 0xaa, 0x39, 0xb7, 0x55, 0x55, 0x74, 0x55, 0x39, 0xb7, 0x2a, 0xaa, 0x74, 0xa0, 0x39, + 0xb7, 0x55, 0x55, 0x6c, 0x99, 0x7a, 0x6b, 0x90, 0x7e, 0x54, 0x27, 0x10, 0x7e, 0x6b, 0x80, 0xbc, + 0x89, 0x68, 0x08, 0x1b, 0x54, 0x78, 0xf5, 0x8a, 0xff, 0x18, 0xef, 0x8a, 0xff, 0x18, 0xf7, 0x12, + 0x19, 0x19, 0x7e, 0x6b, 0x80, 0x80, 0xfb, 0x7e, 0x10, 0xff, 0x12, 0x19, 0xac, 0x80, 0xf8, 0xca, + 0xf9, 0x7e, 0xf4, 0x00, 0xff, 0x1b, 0xf4, 0x78, 0xfc, 0xda, 0xf9, 0x22, 0xca, 0xf9, 0x7e, 0xf4, + 0x00, 0x00, 0x1b, 0xf4, 0x78, 0xfc, 0xda, 0xf9, 0x22, 0x20, 0x11, 0x20, 0xd2, 0x12, 0x12, 0x19, + 0x0c, 0x7e, 0xb0, 0x02, 0x7a, 0xb3, 0x90, 0x00, 0x12, 0x19, 0x0c, 0x12, 0x19, 0x0c, 0x12, 0x19, + 0x0c, 0x12, 0x19, 0x0c, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x90, 0x00, 0x22, 0xca, 0x0b, 0x7e, 0x10, + 0x03, 0x7c, 0x30, 0x6c, 0x22, 0x0b, 0x20, 0x9e, 0x30, 0x0a, 0x50, 0xf9, 0x2e, 0x30, 0x0b, 0x1b, + 0x20, 0x68, 0x20, 0x12, 0x19, 0x0c, 0x12, 0x19, 0x0c, 0x7e, 0xb0, 0x03, 0x7a, 0xb3, 0x90, 0x00, + 0x12, 0x19, 0x0c, 0x12, 0x19, 0x0c, 0x12, 0x19, 0x0c, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x90, 0x00, + 0xa5, 0xda, 0xe0, 0x12, 0x19, 0x0c, 0x12, 0x19, 0x0c, 0x1b, 0x30, 0x68, 0x20, 0x12, 0x19, 0x0c, + 0x12, 0x19, 0x0c, 0x7e, 0xb0, 0x02, 0x7a, 0xb3, 0x90, 0x00, 0x12, 0x19, 0x0c, 0x12, 0x19, 0x0c, + 0x12, 0x19, 0x0c, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x90, 0x00, 0xa5, 0xdb, 0xe0, 0x7e, 0x20, 0x0a, + 0x12, 0x19, 0x0c, 0xa5, 0xda, 0xfa, 0xa5, 0xd9, 0x98, 0xda, 0x0b, 0x22, 0x20, 0x11, 0x14, 0x12, + 0x19, 0x0c, 0x7e, 0xb0, 0x01, 0x7a, 0xb3, 0x90, 0x00, 0x12, 0x19, 0x0c, 0x7e, 0xb0, 0x00, 0x7a, + 0xb3, 0x90, 0x00, 0x22, 0x30, 0x1f, 0x32, 0x20, 0x11, 0x2f, 0xca, 0x2b, 0xca, 0x7b, 0x7e, 0x78, + 0x80, 0x00, 0x7a, 0x7c, 0x00, 0xfe, 0x12, 0x1a, 0x4d, 0x7e, 0x6b, 0xa0, 0x5c, 0xaa, 0x68, 0x10, + 0x29, 0xb7, 0x00, 0x14, 0x54, 0x60, 0x68, 0xf8, 0x39, 0xa7, 0x00, 0x00, 0x0b, 0x6c, 0x80, 0xe9, + 0x12, 0x18, 0xff, 0xd2, 0xb5, 0xda, 0x7b, 0xda, 0x2b, 0x22, 0x12, 0x1a, 0x05, 0x7e, 0x68, 0x00, + 0x0c, 0x12, 0x19, 0xc4, 0x22, 0xca, 0x59, 0xca, 0x5b, 0x7e, 0xb4, 0x00, 0x0c, 0x7c, 0xb8, 0xc4, + 0x12, 0x1a, 0x35, 0x7c, 0xb8, 0x12, 0x1a, 0x35, 0x7c, 0xb9, 0xc4, 0x12, 0x1a, 0x35, 0x7c, 0xb9, + 0x12, 0x1a, 0x35, 0x7e, 0xb0, 0x68, 0x7a, 0xb9, 0xb0, 0x0b, 0xb4, 0x6c, 0xbb, 0x7a, 0xb9, 0xb0, + 0xda, 0x59, 0xda, 0x5b, 0x22, 0x5e, 0xb0, 0x0f, 0x7c, 0xab, 0x9e, 0xa0, 0x0a, 0x40, 0x05, 0x2e, + 0xb0, 0x37, 0x80, 0x03, 0x2e, 0xb0, 0x30, 0x7a, 0xb9, 0xb0, 0x0b, 0xb4, 0x22, 0xc2, 0xb5, 0x75, + 0xb0, 0xef, 0x12, 0x18, 0xff, 0x74, 0x80, 0x39, 0xb7, 0x00, 0x0c, 0x7e, 0x54, 0x00, 0x06, 0x39, + 0xa7, 0x00, 0x04, 0x39, 0xb7, 0x00, 0x00, 0x74, 0x03, 0x39, 0xb7, 0x00, 0x0c, 0x22, 0x7e, 0x78, + 0x00, 0x00, 0x7a, 0x7c, 0x00, 0xff, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0x01, 0x7f, 0x65, + 0x7e, 0x74, 0x20, 0x00, 0x12, 0x0b, 0x63, 0x40, 0x58, 0x7e, 0x78, 0x7c, 0x00, 0x7a, 0x7c, 0x00, + 0xff, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0x01, 0x7e, 0x68, 0x7c, 0x00, 0x7a, 0x6c, 0x00, + 0x01, 0x7e, 0x74, 0x04, 0x00, 0x12, 0x0b, 0x63, 0x40, 0x37, 0x74, 0x80, 0x12, 0x1a, 0xea, 0x40, + 0x30, 0x7e, 0x00, 0x03, 0x7a, 0x03, 0x90, 0x00, 0xd2, 0x10, 0x7e, 0x04, 0x00, 0x08, 0x7e, 0x14, + 0x00, 0x00, 0x84, 0xa5, 0xdb, 0xfc, 0xa5, 0xda, 0xf9, 0xa5, 0xd9, 0xf6, 0x74, 0x40, 0x12, 0x1a, + 0xea, 0x40, 0x0e, 0x7e, 0x68, 0x31, 0x8d, 0x7a, 0x6c, 0x00, 0xff, 0x12, 0x19, 0xc4, 0x02, 0x18, + 0xf7, 0x7e, 0xb0, 0x02, 0x7a, 0xb3, 0x90, 0x00, 0x80, 0xfe, 0xf5, 0x0b, 0x7e, 0x78, 0x00, 0x0b, + 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x68, 0x7f, 0xbf, 0x7a, 0x6c, 0x00, 0x01, 0x7e, 0x74, 0x00, 0x01, + 0x02, 0x0b, 0x63, + +// Segment #19, EXCLUDED Start Address 00ff2c66, Length 1393 + +}; + +static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = { + 2, 0, 3 }; // Major, Minor, Build + +#undef IMAGE_VERSION_NAME + +#undef IMAGE_ARRAY_NAME + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/io_fw_down.h linux.20p6/drivers/usb/serial/io_fw_down.h --- linux.vanilla/drivers/usb/serial/io_fw_down.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/usb/serial/io_fw_down.h Mon Jun 18 08:11:10 2001 @@ -0,0 +1,1123 @@ +//************************************************************** +//* Edgeport/4 Binary Image +//* Generated by HEX2C v1.06 +//* Copyright(c) 1998 Inside Out Networks, 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. +//************************************************************** + + +//Image structure definition +#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD) + #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD + typedef struct _EDGE_FIRMWARE_IMAGE_RECORD + { + unsigned short ExtAddr; + unsigned short Addr; + unsigned short Len; + unsigned char Data[0]; + } EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD; + + typedef struct _EDGE_FIRMWARE_VERSION_INFO + { + unsigned char MajorVersion; + unsigned char MinorVersion; + unsigned short BuildNumber; + } EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO; + +#endif + +#if !defined(IMAGE_ARRAY_NAME) + #define IMAGE_ARRAY_NAME FirmwareImage + #define IMAGE_VERSION_NAME FirmwareImageVersion +#endif + +static unsigned char IMAGE_ARRAY_NAME[] = { + +// Segment #1, Start Address 00ff0000, Length 6 +0xff,0x00,0x00,0x00,0x06,0x00, + 0x02, 0x00, 0x80, 0x02, 0x49, 0x39, + +// Segment #2, Start Address 00ff000b, Length 3 +0xff,0x00,0x0b,0x00,0x03,0x00, + 0x02, 0x44, 0x1a, + +// Segment #3, Start Address 00ff0013, Length 3 +0xff,0x00,0x13,0x00,0x03,0x00, + 0x02, 0x00, 0x13, + +// Segment #4, Start Address 00ff001b, Length 3 +0xff,0x00,0x1b,0x00,0x03,0x00, + 0x02, 0x00, 0x1b, + +// Segment #5, Start Address 00ff0023, Length 3 +0xff,0x00,0x23,0x00,0x03,0x00, + 0x02, 0x00, 0x23, + +// Segment #6, Start Address 00ff002b, Length 3 +0xff,0x00,0x2b,0x00,0x03,0x00, + 0x02, 0x00, 0x2b, + +// Segment #7, Start Address 00ff0033, Length 3 +0xff,0x00,0x33,0x00,0x03,0x00, + 0x02, 0x00, 0x33, + +// Segment #8, Start Address 00ff003b, Length 3 +0xff,0x00,0x3b,0x00,0x03,0x00, + 0x02, 0x00, 0x3b, + +// Segment #9, Start Address 00ff0043, Length 3 +0xff,0x00,0x43,0x00,0x03,0x00, + 0x02, 0x00, 0x43, + +// Segment #10, Start Address 00ff004b, Length 3 +0xff,0x00,0x4b,0x00,0x03,0x00, + 0x02, 0x70, 0xd4, + +// Segment #11, Start Address 00ff0053, Length 3 +0xff,0x00,0x53,0x00,0x03,0x00, + 0x02, 0x77, 0x9d, + +// Segment #12, Start Address 00ff007b, Length 3 +0xff,0x00,0x7b,0x00,0x03,0x00, + 0x02, 0x00, 0x7b, + +// Segment #13, Start Address 00ff0080, Length 7 +0xff,0x00,0x80,0x00,0x07,0x00, + 0x7e, 0x14, 0x00, 0x00, 0x02, 0x40, 0x51, + +// Segment #14, Start Address 00ff4000, Length 15920 +0xff,0x00,0x00,0x40,0x30,0x3e, + 0x7e, 0x04, 0x00, 0x01, 0x7e, 0x14, 0x7f, 0xf8, 0x7e, 0x24, 0x00, 0xfe, 0x7d, 0x31, 0x0b, 0x1a, + 0x50, 0x1b, 0x0a, 0x50, 0x7e, 0x14, 0x40, 0x1b, 0x02, 0x40, 0x6a, 0x7e, 0xf8, 0x00, 0x59, 0xd2, + 0x04, 0xc2, 0x94, 0xd2, 0x95, 0x7e, 0xf4, 0x40, 0x2c, 0x02, 0x40, 0x7c, 0x12, 0x7f, 0x3f, 0xf5, + 0x2e, 0x7a, 0xa1, 0x2d, 0x7a, 0x11, 0x58, 0x12, 0x77, 0xda, 0x12, 0x40, 0xdc, 0x7e, 0xb3, 0x3f, + 0xf1, 0x60, 0x03, 0x12, 0x43, 0x68, 0x75, 0xf1, 0x00, 0x12, 0x78, 0x7f, 0xd2, 0xaf, 0x02, 0x44, + 0x06, 0x7e, 0x04, 0x00, 0xff, 0x7e, 0x18, 0x40, 0x5f, 0x7a, 0x1c, 0x00, 0x01, 0x89, 0x18, 0xa9, + 0x25, 0x87, 0x03, 0xa9, 0xd5, 0x87, 0xd2, 0x93, 0x89, 0x08, 0x7e, 0x04, 0x00, 0xff, 0x7e, 0x18, + 0x40, 0x78, 0x7a, 0x1c, 0x00, 0x01, 0x89, 0x18, 0xc2, 0x93, 0x89, 0x08, 0x7e, 0x08, 0x00, 0x20, + 0x7e, 0x44, 0x04, 0x00, 0x7e, 0x40, 0x00, 0x7e, 0xe4, 0x40, 0x8e, 0x02, 0x7e, 0x4b, 0x7e, 0x08, + 0x01, 0x59, 0x7e, 0x44, 0x28, 0x7c, 0x7e, 0x40, 0x00, 0x7e, 0xe4, 0x40, 0xa0, 0x02, 0x7e, 0x4b, + 0x7e, 0x08, 0x00, 0x59, 0x7e, 0x44, 0x01, 0x00, 0x7e, 0x40, 0x53, 0x7e, 0xe4, 0x40, 0xb2, 0x02, + 0x7e, 0x4b, 0x75, 0x57, 0x20, 0x75, 0x56, 0x30, 0x7e, 0x04, 0x00, 0x08, 0x75, 0x54, 0x58, 0x75, + 0x55, 0x08, 0x75, 0x51, 0x08, 0x75, 0x53, 0x01, 0x75, 0x89, 0x01, 0x75, 0x8a, 0x01, 0x75, 0x8c, + 0x00, 0xd2, 0x8c, 0x7e, 0x04, 0x00, 0x02, 0x7a, 0x05, 0x42, 0x89, 0xf4, 0x75, 0xb7, 0x7f, 0x75, + 0xb8, 0x7f, 0x75, 0xb3, 0x07, 0x75, 0xb2, 0x07, 0xd2, 0xa9, 0x22, 0xd2, 0x92, 0xe4, 0xd5, 0xe0, + 0xfd, 0xc2, 0x92, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x2e, 0x7e, 0xa0, 0x08, 0x19, 0xa2, 0x00, + 0x10, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xf2, 0x7e, 0x20, 0x00, 0x12, 0x41, 0x72, 0x0b, 0x20, + 0xbe, 0x21, 0x2e, 0x78, 0xf6, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x74, 0xbf, 0x19, 0xb0, + 0x00, 0x0c, 0x74, 0x10, 0x19, 0xb0, 0x00, 0x08, 0x74, 0x80, 0x19, 0xb0, 0x00, 0x0c, 0x7e, 0x54, + 0x00, 0x02, 0x19, 0xa0, 0x00, 0x04, 0x19, 0xb0, 0x00, 0x00, 0x74, 0x03, 0x19, 0xb0, 0x00, 0x0c, + 0x74, 0x07, 0x20, 0x68, 0x02, 0x74, 0x0f, 0x19, 0xb0, 0x00, 0x04, 0x30, 0x6b, 0x17, 0x74, 0xbf, + 0x19, 0xb0, 0x00, 0x0c, 0x74, 0x28, 0x20, 0x68, 0x02, 0x74, 0x20, 0x19, 0xb0, 0x00, 0x04, 0x74, + 0x03, 0x19, 0xb0, 0x00, 0x0c, 0x74, 0xa7, 0x19, 0xb0, 0x00, 0x08, 0x74, 0x0c, 0x19, 0xb0, 0x00, + 0x10, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0xe4, 0x19, 0xb0, 0x00, 0x04, 0x09, 0xb0, 0x00, + 0x10, 0x54, 0x08, 0x19, 0xb0, 0x00, 0x10, 0x74, 0xa7, 0x19, 0xb0, 0x00, 0x08, 0x22, 0x7c, 0xb2, + 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x41, 0x99, 0x89, 0x24, 0x41, 0xa9, 0x41, 0xc6, 0x41, 0xe3, 0x42, + 0x00, 0x42, 0x1d, 0x42, 0x3a, 0x42, 0x57, 0x42, 0x74, 0xc2, 0x10, 0xc2, 0x18, 0xc2, 0x08, 0x7e, + 0x04, 0x09, 0xcd, 0x7a, 0x07, 0x01, 0x59, 0x7a, 0x07, 0x01, 0x69, 0x6d, 0x00, 0x7a, 0x07, 0x01, + 0x79, 0x7a, 0x07, 0x01, 0x89, 0x22, 0xc2, 0x11, 0xc2, 0x19, 0xc2, 0x09, 0x7e, 0x04, 0x0d, 0xcd, + 0x7a, 0x07, 0x01, 0x5b, 0x7a, 0x07, 0x01, 0x6b, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x7b, 0x7a, 0x07, + 0x01, 0x8b, 0x22, 0xc2, 0x12, 0xc2, 0x1a, 0xc2, 0x0a, 0x7e, 0x04, 0x11, 0xcd, 0x7a, 0x07, 0x01, + 0x5d, 0x7a, 0x07, 0x01, 0x6d, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x7d, 0x7a, 0x07, 0x01, 0x8d, 0x22, + 0xc2, 0x13, 0xc2, 0x1b, 0xc2, 0x0b, 0x7e, 0x04, 0x15, 0xcd, 0x7a, 0x07, 0x01, 0x5f, 0x7a, 0x07, + 0x01, 0x6f, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x7f, 0x7a, 0x07, 0x01, 0x8f, 0x22, 0xc2, 0x14, 0xc2, + 0x1c, 0xc2, 0x0c, 0x7e, 0x04, 0x19, 0xcd, 0x7a, 0x07, 0x01, 0x61, 0x7a, 0x07, 0x01, 0x71, 0x6d, + 0x00, 0x7a, 0x07, 0x01, 0x81, 0x7a, 0x07, 0x01, 0x91, 0x22, 0xc2, 0x15, 0xc2, 0x1d, 0xc2, 0x0d, + 0x7e, 0x04, 0x1d, 0xcd, 0x7a, 0x07, 0x01, 0x63, 0x7a, 0x07, 0x01, 0x73, 0x6d, 0x00, 0x7a, 0x07, + 0x01, 0x83, 0x7a, 0x07, 0x01, 0x93, 0x22, 0xc2, 0x16, 0xc2, 0x1e, 0xc2, 0x0e, 0x7e, 0x04, 0x21, + 0xcd, 0x7a, 0x07, 0x01, 0x65, 0x7a, 0x07, 0x01, 0x75, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x85, 0x7a, + 0x07, 0x01, 0x95, 0x22, 0xc2, 0x17, 0xc2, 0x1f, 0xc2, 0x0f, 0x7e, 0x04, 0x25, 0xcd, 0x7a, 0x07, + 0x01, 0x67, 0x7a, 0x07, 0x01, 0x77, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x87, 0x7a, 0x07, 0x01, 0x97, + 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x42, 0x9c, 0x89, 0x24, 0x42, 0xac, 0x42, 0xc3, + 0x42, 0xda, 0x42, 0xf1, 0x43, 0x08, 0x43, 0x1f, 0x43, 0x36, 0x43, 0x4d, 0x30, 0x40, 0x07, 0x20, + 0x58, 0x04, 0xc2, 0x28, 0x80, 0x0c, 0x30, 0x48, 0x07, 0x20, 0x50, 0x04, 0xc2, 0x28, 0x80, 0x02, + 0xd2, 0x28, 0x22, 0x30, 0x41, 0x07, 0x20, 0x59, 0x04, 0xc2, 0x29, 0x80, 0x0c, 0x30, 0x49, 0x07, + 0x20, 0x51, 0x04, 0xc2, 0x29, 0x80, 0x02, 0xd2, 0x29, 0x22, 0x30, 0x42, 0x07, 0x20, 0x5a, 0x04, + 0xc2, 0x2a, 0x80, 0x0c, 0x30, 0x4a, 0x07, 0x20, 0x52, 0x04, 0xc2, 0x2a, 0x80, 0x02, 0xd2, 0x2a, + 0x22, 0x30, 0x43, 0x07, 0x20, 0x5b, 0x04, 0xc2, 0x2b, 0x80, 0x0c, 0x30, 0x4b, 0x07, 0x20, 0x53, + 0x04, 0xc2, 0x2b, 0x80, 0x02, 0xd2, 0x2b, 0x22, 0x30, 0x44, 0x07, 0x20, 0x5c, 0x04, 0xc2, 0x2c, + 0x80, 0x0c, 0x30, 0x4c, 0x07, 0x20, 0x54, 0x04, 0xc2, 0x2c, 0x80, 0x02, 0xd2, 0x2c, 0x22, 0x30, + 0x45, 0x07, 0x20, 0x5d, 0x04, 0xc2, 0x2d, 0x80, 0x0c, 0x30, 0x4d, 0x07, 0x20, 0x55, 0x04, 0xc2, + 0x2d, 0x80, 0x02, 0xd2, 0x2d, 0x22, 0x30, 0x46, 0x07, 0x20, 0x5e, 0x04, 0xc2, 0x2e, 0x80, 0x0c, + 0x30, 0x4e, 0x07, 0x20, 0x56, 0x04, 0xc2, 0x2e, 0x80, 0x02, 0xd2, 0x2e, 0x22, 0x30, 0x47, 0x07, + 0x20, 0x5f, 0x04, 0xc2, 0x2f, 0x80, 0x0c, 0x30, 0x4f, 0x07, 0x20, 0x57, 0x04, 0xc2, 0x2f, 0x80, + 0x02, 0xd2, 0x2f, 0x22, 0x43, 0xcc, 0x43, 0x79, 0xbe, 0xb0, 0x02, 0x40, 0x01, 0x22, 0x23, 0x0a, + 0x5b, 0x49, 0x55, 0x43, 0x64, 0x99, 0x54, 0xd3, 0x22, 0xa9, 0xc5, 0x87, 0x12, 0x43, 0xd7, 0x7e, + 0x04, 0x05, 0xcd, 0x7a, 0x07, 0x01, 0xc1, 0x7a, 0x07, 0x01, 0xc3, 0x7e, 0x04, 0x01, 0xcd, 0x7a, + 0x07, 0x01, 0xc7, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x04, 0x76, 0xbd, 0x7a, 0x05, 0x4b, 0x75, 0xf1, + 0x01, 0x75, 0xe1, 0x1f, 0x75, 0xe4, 0x04, 0x75, 0xf4, 0x04, 0x75, 0xf1, 0x02, 0x75, 0xe1, 0x03, + 0x75, 0xe4, 0x04, 0x75, 0xf4, 0x04, 0x43, 0xa2, 0x1c, 0x12, 0x40, 0xeb, 0x7e, 0x20, 0x00, 0x12, + 0x41, 0x8e, 0x0b, 0x20, 0xbe, 0x21, 0x2e, 0x78, 0xf6, 0xd2, 0xa8, 0x22, 0xa9, 0xd5, 0x87, 0x12, + 0x43, 0xd7, 0xd2, 0x92, 0xc2, 0xa8, 0x22, 0x75, 0xa3, 0x00, 0x53, 0xa2, 0x03, 0x75, 0xc1, 0x00, + 0x53, 0xc0, 0x03, 0x7e, 0x00, 0x05, 0x7a, 0x01, 0xf1, 0x43, 0xf4, 0x80, 0x43, 0xe4, 0x80, 0xe5, + 0xf2, 0x54, 0x7f, 0x44, 0x08, 0xf5, 0xf2, 0xe5, 0xe2, 0x54, 0x7f, 0x44, 0x08, 0xf5, 0xe2, 0x75, + 0xe1, 0x10, 0xa5, 0xd8, 0xe1, 0x22, 0x12, 0x44, 0x76, 0x12, 0x44, 0x8c, 0x12, 0x45, 0x27, 0x12, + 0x45, 0x57, 0x12, 0x49, 0x0f, 0x12, 0x44, 0xd8, 0x80, 0xec, 0xca, 0x09, 0x12, 0x44, 0x58, 0x10, + 0x01, 0x12, 0xd5, 0x51, 0x1e, 0x63, 0x53, 0x01, 0x7e, 0x00, 0x54, 0x2e, 0x01, 0x53, 0xa5, 0xe6, + 0xf5, 0x51, 0x80, 0x12, 0x20, 0x02, 0x1e, 0x75, 0x53, 0x00, 0x85, 0x54, 0x51, 0xd2, 0x02, 0x74, + 0x00, 0x80, 0x0d, 0x30, 0x02, 0x0f, 0xc2, 0x02, 0x7e, 0x00, 0x56, 0x2e, 0x01, 0x53, 0xa5, 0xe6, + 0x53, 0x90, 0xcf, 0x42, 0x90, 0xda, 0x09, 0x32, 0xe5, 0x23, 0x60, 0x19, 0x7e, 0x14, 0x00, 0x00, + 0x09, 0xb1, 0x01, 0xb9, 0xb4, 0x00, 0x02, 0x80, 0x05, 0x14, 0x19, 0xb1, 0x01, 0xb9, 0xa5, 0x0a, + 0xbe, 0x21, 0x2e, 0x78, 0xeb, 0x22, 0xc2, 0xaf, 0x7e, 0xb3, 0x3f, 0xf1, 0xb4, 0x01, 0x0a, 0xc0, + 0xf1, 0x75, 0xf1, 0x02, 0x12, 0x72, 0xff, 0xd0, 0xf1, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0xe5, 0x22, + 0x60, 0x43, 0x7e, 0x07, 0x01, 0xcb, 0xbe, 0x04, 0x03, 0x80, 0x38, 0x39, 0x7e, 0x04, 0x80, 0x00, + 0x7e, 0x20, 0x00, 0x13, 0x50, 0x21, 0x09, 0xa0, 0x00, 0x04, 0x4e, 0xa0, 0x05, 0x19, 0xa0, 0x00, + 0x04, 0x0a, 0x32, 0x09, 0x53, 0x6a, 0x93, 0x5e, 0x51, 0x27, 0x68, 0x0b, 0x09, 0xa0, 0x00, 0x10, + 0x4e, 0xa0, 0x01, 0x19, 0xa0, 0x00, 0x10, 0x2e, 0x04, 0x01, 0x00, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, + 0x78, 0xd1, 0x75, 0x22, 0x00, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0xe5, 0x26, 0x60, 0x36, 0x7e, 0x20, + 0x00, 0x7e, 0x30, 0x01, 0xe5, 0x26, 0xa5, 0x5b, 0x68, 0x21, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, + 0x32, 0x01, 0x79, 0xbe, 0x34, 0x00, 0x00, 0x68, 0x12, 0x7e, 0xb1, 0x21, 0xa5, 0x4b, 0x7a, 0xb1, + 0x21, 0xca, 0x19, 0x49, 0x22, 0x45, 0x17, 0x99, 0x24, 0xda, 0x19, 0x3e, 0x30, 0xa5, 0x0a, 0xbe, + 0x21, 0x2e, 0x78, 0xd0, 0xd2, 0xaf, 0x22, 0x4a, 0x98, 0x4d, 0xcd, 0x51, 0x02, 0x54, 0x37, 0x57, + 0x6c, 0x5a, 0xa1, 0x5d, 0xd6, 0x61, 0x0b, 0xc2, 0xaf, 0xe5, 0x24, 0x60, 0x14, 0x7e, 0x20, 0x00, + 0x13, 0x50, 0x07, 0xca, 0xb8, 0x12, 0x45, 0x44, 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, 0x78, + 0xef, 0xd2, 0xaf, 0x22, 0xca, 0x28, 0x12, 0x6a, 0xac, 0xda, 0x28, 0x40, 0x09, 0x0a, 0x22, 0x09, + 0xb2, 0x6a, 0x93, 0xf4, 0x52, 0x24, 0x22, 0xc2, 0xaf, 0xe5, 0x23, 0x60, 0x14, 0x7e, 0x20, 0x00, + 0x13, 0x50, 0x07, 0xca, 0xb8, 0x12, 0x45, 0x74, 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, 0x78, + 0xef, 0xd2, 0xaf, 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x45, 0x7f, 0x89, 0x24, 0x45, + 0x8f, 0x45, 0xff, 0x46, 0x6f, 0x46, 0xdf, 0x47, 0x4f, 0x47, 0xbf, 0x48, 0x2f, 0x48, 0x9f, 0x7e, + 0x27, 0x01, 0x79, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x80, 0x00, 0x09, 0xb2, 0x00, + 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x4d, + 0x96, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, + 0x89, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x89, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xb9, 0x80, 0x2e, + 0x7e, 0x63, 0x01, 0xb9, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, + 0xc8, 0x12, 0x65, 0xbf, 0x40, 0x18, 0x75, 0x2f, 0xb3, 0x12, 0x7e, 0x30, 0xc2, 0x18, 0x6c, 0x00, + 0x7a, 0x03, 0x01, 0xb9, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0x22, 0x7e, + 0x27, 0x01, 0x7b, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x81, 0x00, 0x09, 0xb2, 0x00, + 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x50, + 0xcb, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, + 0x8b, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x8b, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xba, 0x80, 0x2e, + 0x7e, 0x63, 0x01, 0xba, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, + 0xc8, 0x12, 0x65, 0xbf, 0x40, 0x18, 0x75, 0x2f, 0xb3, 0x12, 0x7e, 0x30, 0xc2, 0x19, 0x6c, 0x00, + 0x7a, 0x03, 0x01, 0xba, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0x22, 0x7e, + 0x27, 0x01, 0x7d, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x82, 0x00, 0x09, 0xb2, 0x00, + 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x54, + 0x00, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, + 0x8d, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x8d, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xbb, 0x80, 0x2e, + 0x7e, 0x63, 0x01, 0xbb, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, + 0xc8, 0x12, 0x65, 0xbf, 0x40, 0x18, 0x75, 0x2f, 0xb3, 0x12, 0x7e, 0x30, 0xc2, 0x1a, 0x6c, 0x00, + 0x7a, 0x03, 0x01, 0xbb, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0x22, 0x7e, + 0x27, 0x01, 0x7f, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x83, 0x00, 0x09, 0xb2, 0x00, + 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x57, + 0x35, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, + 0x8f, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x8f, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xbc, 0x80, 0x2e, + 0x7e, 0x63, 0x01, 0xbc, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, + 0xc8, 0x12, 0x65, 0xbf, 0x40, 0x18, 0x75, 0x2f, 0xb3, 0x12, 0x7e, 0x30, 0xc2, 0x1b, 0x6c, 0x00, + 0x7a, 0x03, 0x01, 0xbc, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0x22, 0x7e, + 0x27, 0x01, 0x81, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x84, 0x00, 0x09, 0xb2, 0x00, + 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x5a, + 0x6a, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, + 0x91, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x91, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xbd, 0x80, 0x2e, + 0x7e, 0x63, 0x01, 0xbd, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, + 0xc8, 0x12, 0x65, 0xbf, 0x40, 0x18, 0x75, 0x2f, 0xb3, 0x12, 0x7e, 0x30, 0xc2, 0x1c, 0x6c, 0x00, + 0x7a, 0x03, 0x01, 0xbd, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0x22, 0x7e, + 0x27, 0x01, 0x83, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x85, 0x00, 0x09, 0xb2, 0x00, + 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x5d, + 0x9f, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, + 0x93, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x93, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xbe, 0x80, 0x2e, + 0x7e, 0x63, 0x01, 0xbe, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, + 0xc8, 0x12, 0x65, 0xbf, 0x40, 0x18, 0x75, 0x2f, 0xb3, 0x12, 0x7e, 0x30, 0xc2, 0x1d, 0x6c, 0x00, + 0x7a, 0x03, 0x01, 0xbe, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0x22, 0x7e, + 0x27, 0x01, 0x85, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x86, 0x00, 0x09, 0xb2, 0x00, + 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x60, + 0xd4, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, + 0x95, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x95, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xbf, 0x80, 0x2e, + 0x7e, 0x63, 0x01, 0xbf, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, + 0xc8, 0x12, 0x65, 0xbf, 0x40, 0x18, 0x75, 0x2f, 0xb3, 0x12, 0x7e, 0x30, 0xc2, 0x1e, 0x6c, 0x00, + 0x7a, 0x03, 0x01, 0xbf, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0x22, 0x7e, + 0x27, 0x01, 0x87, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x87, 0x00, 0x09, 0xb2, 0x00, + 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x64, + 0x09, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, + 0x97, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x97, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xc0, 0x80, 0x2e, + 0x7e, 0x63, 0x01, 0xc0, 0xa5, 0xbe, 0x00, 0x26, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, + 0xc8, 0x12, 0x65, 0xbf, 0x40, 0x18, 0x75, 0x2f, 0xb3, 0x12, 0x7e, 0x30, 0xc2, 0x1f, 0x6c, 0x00, + 0x7a, 0x03, 0x01, 0xc0, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0x22, 0xc2, + 0xaf, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0xa9, 0x32, 0xf2, 0x1a, 0x7e, 0x07, 0x01, 0xcb, 0xbe, 0x04, + 0x00, 0x00, 0x78, 0x10, 0xe5, 0xf5, 0x33, 0x82, 0xe7, 0x40, 0x09, 0x85, 0x31, 0x2f, 0x12, 0x7e, + 0x30, 0x75, 0xf6, 0x00, 0xd0, 0xf1, 0xd2, 0xaf, 0x22, 0xc0, 0xd0, 0xc0, 0xd1, 0xc0, 0xe0, 0xc0, + 0xf0, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0xd2, 0x01, 0x75, 0x2f, 0x89, 0x12, 0x7e, 0x30, 0x7e, + 0x14, 0x80, 0x00, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x49, 0xd8, 0x20, 0x70, 0x5a, + 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x49, 0xf0, 0x20, 0x71, 0x4b, 0xa5, + 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x4a, 0x08, 0xa5, 0x0a, 0x09, 0xb1, 0x00, + 0x08, 0x20, 0xe0, 0x03, 0x02, 0x4a, 0x20, 0x20, 0x72, 0x30, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, + 0x20, 0xe0, 0x03, 0x02, 0x4a, 0x38, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, + 0x4a, 0x50, 0xa5, 0x0a, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x4a, 0x68, 0xa5, 0x0a, + 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x03, 0x02, 0x4a, 0x80, 0x30, 0x04, 0x0c, 0xc2, 0x04, 0xc0, + 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0xd0, + 0xf0, 0xd0, 0xe0, 0xd0, 0xd1, 0xd0, 0xd0, 0x32, 0x75, 0x2f, 0x80, 0x12, 0x7e, 0x30, 0x54, 0x3e, + 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x66, 0x34, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, + 0x75, 0x2f, 0x81, 0x12, 0x7e, 0x30, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, + 0x66, 0x74, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, 0x75, 0x2f, 0x82, 0x12, 0x7e, 0x30, 0x54, 0x3e, + 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x66, 0xb4, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, + 0x75, 0x2f, 0x83, 0x12, 0x7e, 0x30, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, + 0x66, 0xf4, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, 0x75, 0x2f, 0x84, 0x12, 0x7e, 0x30, 0x54, 0x3e, + 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x67, 0x34, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, + 0x75, 0x2f, 0x85, 0x12, 0x7e, 0x30, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, + 0x67, 0x74, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, 0x75, 0x2f, 0x86, 0x12, 0x7e, 0x30, 0x54, 0x3e, + 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x67, 0xb4, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, + 0x75, 0x2f, 0x87, 0x12, 0x7e, 0x30, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, + 0x67, 0xf4, 0xca, 0x06, 0x4f, 0x49, 0x89, 0x54, 0x10, 0x08, 0x01, 0x22, 0x20, 0x28, 0x03, 0xd2, + 0x08, 0x22, 0x75, 0x2f, 0xa0, 0x12, 0x7e, 0x30, 0x7e, 0x14, 0x80, 0x00, 0x80, 0x06, 0x20, 0x28, + 0x03, 0xd2, 0x08, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, + 0x03, 0x12, 0x4d, 0x96, 0x30, 0x30, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x08, 0x22, 0x30, 0xe6, 0x02, + 0xd2, 0x60, 0x7e, 0x37, 0x01, 0x79, 0x7e, 0x27, 0x01, 0x99, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, + 0x2e, 0x05, 0x32, 0x7a, 0x05, 0x32, 0x7a, 0x37, 0x01, 0x79, 0x7e, 0x37, 0x01, 0x59, 0x7d, 0x43, + 0x2d, 0x42, 0xbe, 0x44, 0x0d, 0xcc, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x59, 0x75, 0x2f, 0x94, 0x12, + 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x68, 0x34, 0x10, 0x60, 0xc4, 0x22, 0xc2, + 0x60, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x79, 0xbe, 0x24, 0x00, + 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0x99, 0x28, 0x04, 0x7e, 0x27, 0x01, 0x99, 0x7e, 0x37, 0x01, + 0x79, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x32, 0x7a, 0x05, 0x32, 0x7a, 0x37, 0x01, 0x79, 0x7e, + 0x37, 0x01, 0x59, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x0d, 0xcc, 0x38, 0x13, 0x7a, 0x47, 0x01, + 0x59, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x02, 0x68, 0x34, + 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x0d, 0xcd, + 0x9d, 0x24, 0x12, 0x68, 0x34, 0x7e, 0x34, 0x09, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, + 0x59, 0x12, 0x68, 0x34, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x4b, 0x0b, 0x22, 0xd2, 0x08, 0x7e, + 0x04, 0x09, 0xcd, 0x7a, 0x07, 0x01, 0x59, 0x7a, 0x07, 0x01, 0x69, 0x75, 0x2f, 0x94, 0x12, 0x7e, + 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x7e, 0x30, 0xd2, 0x04, + 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xcb, + 0x7e, 0x27, 0x01, 0xa9, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, + 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, + 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, + 0x00, 0x00, 0x2e, 0x27, 0x01, 0xa9, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x7e, + 0x30, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x69, 0x1f, 0x02, 0x69, 0x04, 0x75, 0x2f, 0x99, 0x12, + 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x38, 0x0a, 0x09, + 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x10, 0x22, 0x80, 0x7f, 0x7a, 0x51, + 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x05, 0xcd, 0x9d, 0x24, 0x7e, 0x64, 0x00, 0x00, 0x2e, 0x67, + 0x01, 0xa9, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x69, 0x04, + 0x7e, 0x34, 0x01, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x69, 0x04, 0x7a, + 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xcd, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, + 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x00, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, + 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0xbd, 0x04, + 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, + 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, + 0x22, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x28, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x2a, 0x7e, 0x04, 0x01, + 0xcd, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, + 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x05, 0xcd, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, + 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, + 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, + 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x4c, 0x6f, 0x75, + 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, + 0x38, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x10, 0x22, 0xda, + 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x4c, 0x6f, 0xda, 0xb8, 0x02, + 0x4d, 0x96, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x7e, 0x30, 0xf5, + 0x2f, 0x12, 0x7e, 0x30, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, + 0x68, 0x04, 0xd2, 0x58, 0x80, 0x02, 0xc2, 0x58, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, + 0x50, 0x80, 0x02, 0xc2, 0x50, 0x12, 0x42, 0xac, 0x02, 0x65, 0x9c, 0x75, 0x2f, 0x91, 0x12, 0x7e, + 0x30, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x7e, 0x30, 0x20, 0xe0, 0x08, 0xd2, 0x04, + 0x7e, 0xa0, 0x80, 0x02, 0x65, 0x9c, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x65, + 0x9c, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, + 0x00, 0x12, 0x65, 0xbf, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x4c, 0xc3, 0x75, + 0x2f, 0x95, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x7e, 0x30, 0x22, 0x10, 0x09, 0x01, + 0x22, 0x20, 0x29, 0x03, 0xd2, 0x09, 0x22, 0x75, 0x2f, 0xa1, 0x12, 0x7e, 0x30, 0x7e, 0x14, 0x81, + 0x00, 0x80, 0x06, 0x20, 0x29, 0x03, 0xd2, 0x09, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, + 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x50, 0xcb, 0x30, 0x31, 0x06, 0x20, 0xe6, 0x4f, 0xd2, + 0x09, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x61, 0x7e, 0x37, 0x01, 0x7b, 0x7e, 0x27, 0x01, 0x9b, 0x9d, + 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x34, 0x7a, 0x05, 0x34, 0x7a, 0x37, 0x01, 0x7b, 0x7e, + 0x37, 0x01, 0x5b, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x11, 0xcc, 0x38, 0x68, 0x7a, 0x47, 0x01, + 0x5b, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x68, 0x34, + 0x10, 0x61, 0xc4, 0x22, 0xc2, 0x61, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, + 0x01, 0x7b, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0x9b, 0x28, 0x04, 0x7e, 0x27, + 0x01, 0x9b, 0x7e, 0x37, 0x01, 0x7b, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x34, 0x7a, 0x05, 0x34, + 0x7a, 0x37, 0x01, 0x7b, 0x7e, 0x37, 0x01, 0x5b, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x11, 0xcc, + 0x38, 0x13, 0x7a, 0x47, 0x01, 0x5b, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, + 0x7e, 0x30, 0x02, 0x68, 0x34, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, + 0x30, 0x9e, 0x44, 0x11, 0xcd, 0x9d, 0x24, 0x12, 0x68, 0x34, 0x7e, 0x34, 0x0d, 0xcd, 0x7d, 0x24, + 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x5b, 0x12, 0x68, 0x34, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x4e, + 0x40, 0x22, 0xd2, 0x09, 0x7e, 0x04, 0x0d, 0xcd, 0x7a, 0x07, 0x01, 0x5b, 0x7a, 0x07, 0x01, 0x6b, + 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x92, + 0x12, 0x7e, 0x30, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, + 0x70, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xab, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, + 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, + 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x44, 0x7a, + 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x01, 0x00, 0x2e, 0x27, 0x01, 0xab, 0x1b, 0x38, 0x20, 0x0b, 0x35, + 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x69, 0x1f, 0x02, 0x69, + 0x04, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, + 0x04, 0x30, 0x39, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x11, + 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x05, 0xcd, 0x9d, 0x24, 0x7e, + 0x64, 0x01, 0x00, 0x2e, 0x67, 0x01, 0xab, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, + 0x0b, 0x35, 0x12, 0x69, 0x04, 0x7e, 0x34, 0x01, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, + 0xc9, 0x02, 0x69, 0x04, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xcd, 0x7a, 0x39, 0xd0, 0x0b, 0x34, + 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x01, 0x7a, + 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, + 0x12, 0x7e, 0x30, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, + 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, + 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x28, 0x7e, 0x04, 0x01, 0xcd, + 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, + 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x05, 0xcd, 0x7d, 0x60, 0x0b, 0x04, + 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, + 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, + 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, + 0xe7, 0x02, 0x4f, 0xa4, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, + 0x19, 0xb1, 0x00, 0x04, 0x30, 0x39, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, + 0x10, 0xd2, 0x11, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, + 0x4f, 0xa4, 0xda, 0xb8, 0x02, 0x50, 0xcb, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, + 0x90, 0x12, 0x7e, 0x30, 0xf5, 0x2f, 0x12, 0x7e, 0x30, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, + 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x59, 0x80, 0x02, 0xc2, 0x59, 0xa5, 0xfd, 0x5e, + 0x50, 0x80, 0x68, 0x04, 0xd2, 0x51, 0x80, 0x02, 0xc2, 0x51, 0x12, 0x42, 0xc3, 0x02, 0x65, 0x9c, + 0x75, 0x2f, 0x91, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x7e, 0x30, + 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x65, 0x9c, 0xd2, 0x04, 0x30, 0xe1, 0x06, + 0x7e, 0xa0, 0x80, 0x12, 0x65, 0x9c, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, + 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x65, 0xbf, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, + 0x22, 0x02, 0x4f, 0xf8, 0x75, 0x2f, 0x95, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x7e, + 0x30, 0x22, 0x10, 0x0a, 0x01, 0x22, 0x20, 0x2a, 0x03, 0xd2, 0x0a, 0x22, 0x75, 0x2f, 0xa2, 0x12, + 0x7e, 0x30, 0x7e, 0x14, 0x82, 0x00, 0x80, 0x06, 0x20, 0x2a, 0x03, 0xd2, 0x0a, 0x22, 0x09, 0xb1, + 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x54, 0x00, 0x30, 0x32, + 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0a, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x62, 0x7e, 0x37, 0x01, 0x7d, + 0x7e, 0x27, 0x01, 0x9d, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x36, 0x7a, 0x05, 0x36, + 0x7a, 0x37, 0x01, 0x7d, 0x7e, 0x37, 0x01, 0x5d, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x15, 0xcc, + 0x38, 0x68, 0x7a, 0x47, 0x01, 0x5d, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, + 0x7e, 0x30, 0x12, 0x68, 0x34, 0x10, 0x62, 0xc4, 0x22, 0xc2, 0x62, 0x2d, 0x23, 0x68, 0x78, 0x6d, + 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x7d, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, + 0x9d, 0x28, 0x04, 0x7e, 0x27, 0x01, 0x9d, 0x7e, 0x37, 0x01, 0x7d, 0x9d, 0x32, 0x7d, 0x02, 0x2e, + 0x05, 0x36, 0x7a, 0x05, 0x36, 0x7a, 0x37, 0x01, 0x7d, 0x7e, 0x37, 0x01, 0x5d, 0x7d, 0x43, 0x2d, + 0x42, 0xbe, 0x44, 0x15, 0xcc, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x5d, 0x75, 0x2f, 0x94, 0x12, 0x7e, + 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x02, 0x68, 0x34, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, + 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x15, 0xcd, 0x9d, 0x24, 0x12, 0x68, 0x34, 0x7e, + 0x34, 0x11, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x5d, 0x12, 0x68, 0x34, 0xbe, 0x25, + 0x20, 0x78, 0x03, 0x02, 0x51, 0x75, 0x22, 0xd2, 0x0a, 0x7e, 0x04, 0x11, 0xcd, 0x7a, 0x07, 0x01, + 0x5d, 0x7a, 0x07, 0x01, 0x6d, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e, + 0x30, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x7e, 0x30, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, + 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xad, 0x2e, 0x24, + 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, + 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, + 0x05, 0xcc, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x02, 0x00, 0x2e, 0x27, 0x01, 0xad, + 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0xbe, 0x50, 0x38, 0x78, 0x03, + 0x02, 0x69, 0x1f, 0x02, 0x69, 0x04, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, + 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3a, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, + 0xb1, 0x00, 0x10, 0xd2, 0x12, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, + 0x05, 0xcd, 0x9d, 0x24, 0x7e, 0x64, 0x02, 0x00, 0x2e, 0x67, 0x01, 0xad, 0x9e, 0x24, 0x00, 0x02, + 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x69, 0x04, 0x7e, 0x34, 0x01, 0xcd, 0x7d, 0x24, + 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x69, 0x04, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xcd, + 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, + 0x23, 0x23, 0x44, 0x02, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, + 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, + 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, + 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xcd, 0x80, + 0x28, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0xcf, 0x7e, 0x07, 0x01, + 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x05, + 0xcd, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, + 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, + 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, + 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x52, 0xd9, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, + 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3a, 0x0a, 0x09, 0xb1, 0x00, 0x10, + 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x12, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, + 0x68, 0x07, 0xca, 0xb8, 0x12, 0x52, 0xd9, 0xda, 0xb8, 0x02, 0x54, 0x00, 0x09, 0xb1, 0x00, 0x18, + 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x7e, 0x30, 0xf5, 0x2f, 0x12, 0x7e, 0x30, 0xa5, 0xfd, + 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5a, 0x80, 0x02, + 0xc2, 0x5a, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x52, 0x80, 0x02, 0xc2, 0x52, 0x12, + 0x42, 0xda, 0x02, 0x65, 0x9c, 0x75, 0x2f, 0x91, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x14, 0x7a, + 0xb1, 0x2f, 0x12, 0x7e, 0x30, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x65, 0x9c, + 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x65, 0x9c, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, + 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x65, 0xbf, 0x09, 0xb1, + 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x53, 0x2d, 0x75, 0x2f, 0x95, 0x12, 0x7e, 0x30, 0x22, + 0x75, 0x2f, 0x96, 0x12, 0x7e, 0x30, 0x22, 0x10, 0x0b, 0x01, 0x22, 0x20, 0x2b, 0x03, 0xd2, 0x0b, + 0x22, 0x75, 0x2f, 0xa3, 0x12, 0x7e, 0x30, 0x7e, 0x14, 0x83, 0x00, 0x80, 0x06, 0x20, 0x2b, 0x03, + 0xd2, 0x0b, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, + 0x12, 0x57, 0x35, 0x30, 0x33, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0b, 0x22, 0x30, 0xe6, 0x02, 0xd2, + 0x63, 0x7e, 0x37, 0x01, 0x7f, 0x7e, 0x27, 0x01, 0x9f, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, + 0x05, 0x38, 0x7a, 0x05, 0x38, 0x7a, 0x37, 0x01, 0x7f, 0x7e, 0x37, 0x01, 0x5f, 0x7d, 0x43, 0x2d, + 0x42, 0xbe, 0x44, 0x19, 0xcc, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x5f, 0x75, 0x2f, 0x94, 0x12, 0x7e, + 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x68, 0x34, 0x10, 0x63, 0xc4, 0x22, 0xc2, 0x63, + 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x7f, 0xbe, 0x24, 0x00, 0x00, + 0x68, 0x6a, 0xbe, 0x27, 0x01, 0x9f, 0x28, 0x04, 0x7e, 0x27, 0x01, 0x9f, 0x7e, 0x37, 0x01, 0x7f, + 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x38, 0x7a, 0x05, 0x38, 0x7a, 0x37, 0x01, 0x7f, 0x7e, 0x37, + 0x01, 0x5f, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x19, 0xcc, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x5f, + 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x02, 0x68, 0x34, 0x75, + 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x19, 0xcd, 0x9d, + 0x24, 0x12, 0x68, 0x34, 0x7e, 0x34, 0x15, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x5f, + 0x12, 0x68, 0x34, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x54, 0xaa, 0x22, 0xd2, 0x0b, 0x7e, 0x04, + 0x15, 0xcd, 0x7a, 0x07, 0x01, 0x5f, 0x7a, 0x07, 0x01, 0x6f, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, + 0x75, 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x7e, 0x30, 0xd2, 0x04, 0x09, + 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xcb, 0x7e, + 0x27, 0x01, 0xaf, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, + 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, + 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x03, + 0x00, 0x2e, 0x27, 0x01, 0xaf, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, + 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x69, 0x1f, 0x02, 0x69, 0x04, 0x75, 0x2f, 0x99, 0x12, 0x7e, + 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3b, 0x0a, 0x09, 0xb1, + 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x13, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, + 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x05, 0xcd, 0x9d, 0x24, 0x7e, 0x64, 0x03, 0x00, 0x2e, 0x67, 0x01, + 0xaf, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x69, 0x04, 0x7e, + 0x34, 0x01, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x69, 0x04, 0x7a, 0x39, + 0xc0, 0x7e, 0x34, 0x01, 0xcd, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, + 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x03, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, + 0x35, 0x75, 0x2f, 0x93, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0xbd, 0x04, 0x68, + 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, + 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, + 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x28, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xcd, + 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, + 0x01, 0xc9, 0x7e, 0x44, 0x05, 0xcd, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, + 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, + 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, + 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x56, 0x0e, 0x75, 0x2f, + 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3b, + 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x13, 0x22, 0xda, 0xb8, + 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x56, 0x0e, 0xda, 0xb8, 0x02, 0x57, + 0x35, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x7e, 0x30, 0xf5, 0x2f, + 0x12, 0x7e, 0x30, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, + 0x04, 0xd2, 0x5b, 0x80, 0x02, 0xc2, 0x5b, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x53, + 0x80, 0x02, 0xc2, 0x53, 0x12, 0x42, 0xf1, 0x02, 0x65, 0x9c, 0x75, 0x2f, 0x91, 0x12, 0x7e, 0x30, + 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x7e, 0x30, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, + 0xa0, 0x80, 0x02, 0x65, 0x9c, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x65, 0x9c, + 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, + 0x12, 0x65, 0xbf, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x56, 0x62, 0x75, 0x2f, + 0x95, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x7e, 0x30, 0x22, 0x10, 0x0c, 0x01, 0x22, + 0x20, 0x2c, 0x03, 0xd2, 0x0c, 0x22, 0x75, 0x2f, 0xa4, 0x12, 0x7e, 0x30, 0x7e, 0x14, 0x84, 0x00, + 0x80, 0x06, 0x20, 0x2c, 0x03, 0xd2, 0x0c, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, + 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x5a, 0x6a, 0x30, 0x34, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0c, + 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x64, 0x7e, 0x37, 0x01, 0x81, 0x7e, 0x27, 0x01, 0xa1, 0x9d, 0x32, + 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x3a, 0x7a, 0x05, 0x3a, 0x7a, 0x37, 0x01, 0x81, 0x7e, 0x37, + 0x01, 0x61, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x1d, 0xcc, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x61, + 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x68, 0x34, 0x10, + 0x64, 0xc4, 0x22, 0xc2, 0x64, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, + 0x81, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa1, 0x28, 0x04, 0x7e, 0x27, 0x01, + 0xa1, 0x7e, 0x37, 0x01, 0x81, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x3a, 0x7a, 0x05, 0x3a, 0x7a, + 0x37, 0x01, 0x81, 0x7e, 0x37, 0x01, 0x61, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x1d, 0xcc, 0x38, + 0x13, 0x7a, 0x47, 0x01, 0x61, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, + 0x30, 0x02, 0x68, 0x34, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, + 0x9e, 0x44, 0x1d, 0xcd, 0x9d, 0x24, 0x12, 0x68, 0x34, 0x7e, 0x34, 0x19, 0xcd, 0x7d, 0x24, 0x2d, + 0x43, 0x7a, 0x47, 0x01, 0x61, 0x12, 0x68, 0x34, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x57, 0xdf, + 0x22, 0xd2, 0x0c, 0x7e, 0x04, 0x19, 0xcd, 0x7a, 0x07, 0x01, 0x61, 0x7a, 0x07, 0x01, 0x71, 0x75, + 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x92, 0x12, + 0x7e, 0x30, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, + 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb1, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, + 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, + 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x44, 0x7a, 0x47, + 0x01, 0xc9, 0x7e, 0x24, 0x04, 0x00, 0x2e, 0x27, 0x01, 0xb1, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, + 0x51, 0x2f, 0x12, 0x7e, 0x30, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x69, 0x1f, 0x02, 0x69, 0x04, + 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, + 0x30, 0x3c, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x14, 0x22, + 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x05, 0xcd, 0x9d, 0x24, 0x7e, 0x64, + 0x04, 0x00, 0x2e, 0x67, 0x01, 0xb1, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, + 0x35, 0x12, 0x69, 0x04, 0x7e, 0x34, 0x01, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, + 0x02, 0x69, 0x04, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xcd, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, + 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x04, 0x7a, 0x69, + 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, + 0x7e, 0x30, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, + 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, + 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x28, 0x7e, 0x04, 0x01, 0xcd, 0x80, + 0x2a, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, + 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x05, 0xcd, 0x7d, 0x60, 0x0b, 0x04, 0xbd, + 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, + 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, + 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, + 0x02, 0x59, 0x43, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, + 0xb1, 0x00, 0x04, 0x30, 0x3c, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, + 0xd2, 0x14, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x59, + 0x43, 0xda, 0xb8, 0x02, 0x5a, 0x6a, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, + 0x12, 0x7e, 0x30, 0xf5, 0x2f, 0x12, 0x7e, 0x30, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, + 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5c, 0x80, 0x02, 0xc2, 0x5c, 0xa5, 0xfd, 0x5e, 0x50, + 0x80, 0x68, 0x04, 0xd2, 0x54, 0x80, 0x02, 0xc2, 0x54, 0x12, 0x43, 0x08, 0x02, 0x65, 0x9c, 0x75, + 0x2f, 0x91, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x7e, 0x30, 0x20, + 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x65, 0x9c, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, + 0xa0, 0x80, 0x12, 0x65, 0x9c, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, + 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x65, 0xbf, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, + 0x02, 0x59, 0x97, 0x75, 0x2f, 0x95, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x7e, 0x30, + 0x22, 0x10, 0x0d, 0x01, 0x22, 0x20, 0x2d, 0x03, 0xd2, 0x0d, 0x22, 0x75, 0x2f, 0xa5, 0x12, 0x7e, + 0x30, 0x7e, 0x14, 0x85, 0x00, 0x80, 0x06, 0x20, 0x2d, 0x03, 0xd2, 0x0d, 0x22, 0x09, 0xb1, 0x00, + 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x5d, 0x9f, 0x30, 0x35, 0x06, + 0x20, 0xe6, 0x4f, 0xd2, 0x0d, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x65, 0x7e, 0x37, 0x01, 0x83, 0x7e, + 0x27, 0x01, 0xa3, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x3c, 0x7a, 0x05, 0x3c, 0x7a, + 0x37, 0x01, 0x83, 0x7e, 0x37, 0x01, 0x63, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x21, 0xcc, 0x38, + 0x68, 0x7a, 0x47, 0x01, 0x63, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, + 0x30, 0x12, 0x68, 0x34, 0x10, 0x65, 0xc4, 0x22, 0xc2, 0x65, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, + 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x83, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa3, + 0x28, 0x04, 0x7e, 0x27, 0x01, 0xa3, 0x7e, 0x37, 0x01, 0x83, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, + 0x3c, 0x7a, 0x05, 0x3c, 0x7a, 0x37, 0x01, 0x83, 0x7e, 0x37, 0x01, 0x63, 0x7d, 0x43, 0x2d, 0x42, + 0xbe, 0x44, 0x21, 0xcc, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x63, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, + 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x02, 0x68, 0x34, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, + 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x21, 0xcd, 0x9d, 0x24, 0x12, 0x68, 0x34, 0x7e, 0x34, + 0x1d, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x63, 0x12, 0x68, 0x34, 0xbe, 0x25, 0x20, + 0x78, 0x03, 0x02, 0x5b, 0x14, 0x22, 0xd2, 0x0d, 0x7e, 0x04, 0x1d, 0xcd, 0x7a, 0x07, 0x01, 0x63, + 0x7a, 0x07, 0x01, 0x73, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e, 0x30, + 0x22, 0x75, 0x2f, 0x92, 0x12, 0x7e, 0x30, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, + 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb3, 0x2e, 0x24, 0x00, + 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, + 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, + 0xcc, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x05, 0x00, 0x2e, 0x27, 0x01, 0xb3, 0x1b, + 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, + 0x69, 0x1f, 0x02, 0x69, 0x04, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, + 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3d, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, + 0x00, 0x10, 0xd2, 0x15, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x05, + 0xcd, 0x9d, 0x24, 0x7e, 0x64, 0x05, 0x00, 0x2e, 0x67, 0x01, 0xb3, 0x9e, 0x24, 0x00, 0x02, 0x40, + 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x69, 0x04, 0x7e, 0x34, 0x01, 0xcd, 0x7d, 0x24, 0x2d, + 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x69, 0x04, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xcd, 0x7a, + 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, + 0x23, 0x44, 0x05, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x7e, + 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, + 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, + 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x28, + 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, + 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x05, 0xcd, + 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, + 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, + 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, + 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x5c, 0x78, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, + 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3d, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, + 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x15, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, + 0x07, 0xca, 0xb8, 0x12, 0x5c, 0x78, 0xda, 0xb8, 0x02, 0x5d, 0x9f, 0x09, 0xb1, 0x00, 0x18, 0x7e, + 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x7e, 0x30, 0xf5, 0x2f, 0x12, 0x7e, 0x30, 0xa5, 0xfd, 0x5e, + 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5d, 0x80, 0x02, 0xc2, + 0x5d, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x55, 0x80, 0x02, 0xc2, 0x55, 0x12, 0x43, + 0x1f, 0x02, 0x65, 0x9c, 0x75, 0x2f, 0x91, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, + 0x2f, 0x12, 0x7e, 0x30, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x65, 0x9c, 0xd2, + 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x65, 0x9c, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, + 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x65, 0xbf, 0x09, 0xb1, 0x00, + 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x5c, 0xcc, 0x75, 0x2f, 0x95, 0x12, 0x7e, 0x30, 0x22, 0x75, + 0x2f, 0x96, 0x12, 0x7e, 0x30, 0x22, 0x10, 0x0e, 0x01, 0x22, 0x20, 0x2e, 0x03, 0xd2, 0x0e, 0x22, + 0x75, 0x2f, 0xa6, 0x12, 0x7e, 0x30, 0x7e, 0x14, 0x86, 0x00, 0x80, 0x06, 0x20, 0x2e, 0x03, 0xd2, + 0x0e, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, + 0x60, 0xd4, 0x30, 0x36, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0e, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x66, + 0x7e, 0x37, 0x01, 0x85, 0x7e, 0x27, 0x01, 0xa5, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, + 0x3e, 0x7a, 0x05, 0x3e, 0x7a, 0x37, 0x01, 0x85, 0x7e, 0x37, 0x01, 0x65, 0x7d, 0x43, 0x2d, 0x42, + 0xbe, 0x44, 0x25, 0xcc, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x65, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, + 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x68, 0x34, 0x10, 0x66, 0xc4, 0x22, 0xc2, 0x66, 0x2d, + 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x85, 0xbe, 0x24, 0x00, 0x00, 0x68, + 0x6a, 0xbe, 0x27, 0x01, 0xa5, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xa5, 0x7e, 0x37, 0x01, 0x85, 0x9d, + 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x3e, 0x7a, 0x05, 0x3e, 0x7a, 0x37, 0x01, 0x85, 0x7e, 0x37, 0x01, + 0x65, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x25, 0xcc, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x65, 0x75, + 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x02, 0x68, 0x34, 0x75, 0x2f, + 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x25, 0xcd, 0x9d, 0x24, + 0x12, 0x68, 0x34, 0x7e, 0x34, 0x21, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x65, 0x12, + 0x68, 0x34, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x5e, 0x49, 0x22, 0xd2, 0x0e, 0x7e, 0x04, 0x21, + 0xcd, 0x7a, 0x07, 0x01, 0x65, 0x7a, 0x07, 0x01, 0x75, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x75, + 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x7e, 0x30, 0xd2, 0x04, 0x09, 0xb1, + 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, + 0x01, 0xb5, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x3c, 0x7d, 0x02, + 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, + 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x44, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x06, 0x00, + 0x2e, 0x27, 0x01, 0xb5, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0xbe, + 0x50, 0x38, 0x78, 0x03, 0x02, 0x69, 0x1f, 0x02, 0x69, 0x04, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, + 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3e, 0x0a, 0x09, 0xb1, 0x00, + 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x16, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, + 0x7e, 0x30, 0x9e, 0x44, 0x05, 0xcd, 0x9d, 0x24, 0x7e, 0x64, 0x06, 0x00, 0x2e, 0x67, 0x01, 0xb5, + 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x69, 0x04, 0x7e, 0x34, + 0x01, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x69, 0x04, 0x7a, 0x39, 0xc0, + 0x7e, 0x34, 0x01, 0xcd, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, + 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x06, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, + 0x75, 0x2f, 0x93, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0xbd, 0x04, 0x68, 0x2b, + 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, + 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, + 0x04, 0x01, 0xcd, 0x80, 0x28, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x2a, 0x7e, 0x04, 0x01, 0xcd, 0x80, + 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, + 0xc9, 0x7e, 0x44, 0x05, 0xcd, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, + 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, + 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, + 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x5f, 0xad, 0x75, 0x2f, 0x99, + 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3e, 0x0a, + 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x16, 0x22, 0xda, 0xb8, 0x30, + 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x5f, 0xad, 0xda, 0xb8, 0x02, 0x60, 0xd4, + 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x7e, 0x30, 0xf5, 0x2f, 0x12, + 0x7e, 0x30, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, + 0xd2, 0x5e, 0x80, 0x02, 0xc2, 0x5e, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x56, 0x80, + 0x02, 0xc2, 0x56, 0x12, 0x43, 0x36, 0x02, 0x65, 0x9c, 0x75, 0x2f, 0x91, 0x12, 0x7e, 0x30, 0x09, + 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x7e, 0x30, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, + 0x80, 0x02, 0x65, 0x9c, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x65, 0x9c, 0xca, + 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, + 0x65, 0xbf, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x60, 0x01, 0x75, 0x2f, 0x95, + 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x7e, 0x30, 0x22, 0x10, 0x0f, 0x01, 0x22, 0x20, + 0x2f, 0x03, 0xd2, 0x0f, 0x22, 0x75, 0x2f, 0xa7, 0x12, 0x7e, 0x30, 0x7e, 0x14, 0x87, 0x00, 0x80, + 0x06, 0x20, 0x2f, 0x03, 0xd2, 0x0f, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, + 0xda, 0xb8, 0x68, 0x03, 0x12, 0x64, 0x09, 0x30, 0x37, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0f, 0x22, + 0x30, 0xe6, 0x02, 0xd2, 0x67, 0x7e, 0x37, 0x01, 0x87, 0x7e, 0x27, 0x01, 0xa7, 0x9d, 0x32, 0x40, + 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x40, 0x7a, 0x05, 0x40, 0x7a, 0x37, 0x01, 0x87, 0x7e, 0x37, 0x01, + 0x67, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x29, 0xcc, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x67, 0x75, + 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x68, 0x34, 0x10, 0x67, + 0xc4, 0x22, 0xc2, 0x67, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x87, + 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa7, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xa7, + 0x7e, 0x37, 0x01, 0x87, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x40, 0x7a, 0x05, 0x40, 0x7a, 0x37, + 0x01, 0x87, 0x7e, 0x37, 0x01, 0x67, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x29, 0xcc, 0x38, 0x13, + 0x7a, 0x47, 0x01, 0x67, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, + 0x02, 0x68, 0x34, 0x75, 0x2f, 0x94, 0x12, 0x7e, 0x30, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, + 0x44, 0x29, 0xcd, 0x9d, 0x24, 0x12, 0x68, 0x34, 0x7e, 0x34, 0x25, 0xcd, 0x7d, 0x24, 0x2d, 0x43, + 0x7a, 0x47, 0x01, 0x67, 0x12, 0x68, 0x34, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x61, 0x7e, 0x22, + 0xd2, 0x0f, 0x7e, 0x04, 0x25, 0xcd, 0x7a, 0x07, 0x01, 0x67, 0x7a, 0x07, 0x01, 0x77, 0x75, 0x2f, + 0x94, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x7e, + 0x30, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x70, 0x7e, + 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb7, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, + 0x00, 0x38, 0x3c, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, + 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x44, 0x7a, 0x47, 0x01, + 0xc9, 0x7e, 0x24, 0x07, 0x00, 0x2e, 0x27, 0x01, 0xb7, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, + 0x2f, 0x12, 0x7e, 0x30, 0xbe, 0x50, 0x38, 0x78, 0x03, 0x02, 0x69, 0x1f, 0x02, 0x69, 0x04, 0x75, + 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, + 0x3f, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x17, 0x22, 0x80, + 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x05, 0xcd, 0x9d, 0x24, 0x7e, 0x64, 0x07, + 0x00, 0x2e, 0x67, 0x01, 0xb7, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, + 0x12, 0x69, 0x04, 0x7e, 0x34, 0x01, 0xcd, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, + 0x69, 0x04, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x01, 0xcd, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, + 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x07, 0x7a, 0x69, 0xb0, + 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, + 0x30, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, + 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, + 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x28, 0x7e, 0x04, 0x01, 0xcd, 0x80, 0x2a, + 0x7e, 0x04, 0x01, 0xcd, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, + 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x05, 0xcd, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, + 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, + 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, + 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, + 0x62, 0xe2, 0x75, 0x2f, 0x99, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, + 0x00, 0x04, 0x30, 0x3f, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, + 0x17, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x62, 0xe2, + 0xda, 0xb8, 0x02, 0x64, 0x09, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, + 0x7e, 0x30, 0xf5, 0x2f, 0x12, 0x7e, 0x30, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, + 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5f, 0x80, 0x02, 0xc2, 0x5f, 0xa5, 0xfd, 0x5e, 0x50, 0x80, + 0x68, 0x04, 0xd2, 0x57, 0x80, 0x02, 0xc2, 0x57, 0x12, 0x43, 0x4d, 0x02, 0x65, 0x9c, 0x75, 0x2f, + 0x91, 0x12, 0x7e, 0x30, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x7e, 0x30, 0x20, 0xe0, + 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x65, 0x9c, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, + 0x80, 0x12, 0x65, 0x9c, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, + 0x09, 0x61, 0x00, 0x00, 0x12, 0x65, 0xbf, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, + 0x63, 0x36, 0x75, 0x2f, 0x95, 0x12, 0x7e, 0x30, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x7e, 0x30, 0x22, + 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, + 0x20, 0x68, 0x04, 0xd2, 0x58, 0x80, 0x02, 0xc2, 0x58, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, + 0xd2, 0x50, 0x80, 0x02, 0xc2, 0x50, 0x02, 0x65, 0x88, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, + 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x59, 0x80, 0x02, + 0xc2, 0x59, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x51, 0x80, 0x02, 0xc2, 0x51, 0x02, + 0x65, 0x88, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, + 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5a, 0x80, 0x02, 0xc2, 0x5a, 0xa5, 0xfd, 0x5e, 0x50, 0x80, + 0x68, 0x04, 0xd2, 0x52, 0x80, 0x02, 0xc2, 0x52, 0x02, 0x65, 0x88, 0x7c, 0x02, 0x7e, 0x14, 0x80, + 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5b, + 0x80, 0x02, 0xc2, 0x5b, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x53, 0x80, 0x02, 0xc2, + 0x53, 0x02, 0x65, 0x88, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, + 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5c, 0x80, 0x02, 0xc2, 0x5c, 0xa5, 0xfd, 0x5e, + 0x50, 0x80, 0x68, 0x04, 0xd2, 0x54, 0x80, 0x02, 0xc2, 0x54, 0x02, 0x65, 0x88, 0x7c, 0x02, 0x7e, + 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, + 0xd2, 0x5d, 0x80, 0x02, 0xc2, 0x5d, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x55, 0x80, + 0x02, 0xc2, 0x55, 0x02, 0x65, 0x88, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, + 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5e, 0x80, 0x02, 0xc2, 0x5e, 0xa5, + 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x56, 0x80, 0x02, 0xc2, 0x56, 0x02, 0x65, 0x88, 0x7c, + 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, + 0x68, 0x04, 0xd2, 0x5f, 0x80, 0x02, 0xc2, 0x5f, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, + 0x57, 0x80, 0x02, 0xc2, 0x57, 0x02, 0x65, 0x88, 0x54, 0xf0, 0xc4, 0xa5, 0xff, 0xc4, 0xa5, 0x4f, + 0x75, 0x2f, 0x90, 0x12, 0x7e, 0x30, 0xf5, 0x2f, 0x12, 0x7e, 0x30, 0x22, 0xca, 0x19, 0x5e, 0x20, + 0x07, 0x4c, 0xa2, 0x7e, 0x74, 0x29, 0xcd, 0xca, 0x79, 0x7a, 0x79, 0xa0, 0x0b, 0x74, 0x7a, 0x79, + 0xb0, 0x0b, 0x74, 0xda, 0x79, 0x7e, 0x30, 0x02, 0x7e, 0x64, 0x00, 0x02, 0x02, 0x65, 0xe7, 0xca, + 0x19, 0x5e, 0x20, 0x07, 0x4c, 0xa2, 0x7e, 0x74, 0x29, 0xcd, 0xca, 0x79, 0x7a, 0x79, 0xa0, 0x0b, + 0x74, 0x7a, 0x79, 0xb0, 0x0b, 0x74, 0x7a, 0x79, 0x60, 0x0b, 0x74, 0xda, 0x79, 0x7e, 0x30, 0x03, + 0x7e, 0x64, 0x00, 0x03, 0x02, 0x65, 0xe7, 0xd2, 0x04, 0x7e, 0x27, 0x01, 0xcb, 0x2d, 0x26, 0xbe, + 0x24, 0x04, 0x00, 0x38, 0x2e, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x05, 0xcd, 0x7e, 0x79, 0xa0, + 0x7a, 0x09, 0xa0, 0x0b, 0x04, 0x0b, 0x74, 0xbd, 0x04, 0x68, 0x23, 0xa5, 0xdb, 0xef, 0x7a, 0x27, + 0x01, 0xcb, 0x7e, 0x25, 0x30, 0x2d, 0x26, 0x7a, 0x25, 0x30, 0x7a, 0x07, 0x01, 0xc9, 0xda, 0x19, + 0xc2, 0xd7, 0x22, 0x75, 0x2f, 0x9a, 0x12, 0x7e, 0x30, 0xda, 0x19, 0xd2, 0xd7, 0x22, 0x7e, 0x04, + 0x01, 0xcd, 0x80, 0xd7, 0x4d, 0x42, 0x4a, 0xae, 0x4b, 0xa8, 0x4d, 0x7b, 0x49, 0x4f, 0x49, 0x4f, + 0x4c, 0xa7, 0x49, 0x4f, 0x4d, 0xbf, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x4d, 0xc6, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x50, 0x77, 0x4d, 0xe3, 0x4e, 0xdd, 0x50, 0xb0, 0x49, 0x4f, 0x49, 0x4f, + 0x4f, 0xdc, 0x49, 0x4f, 0x50, 0xf4, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x50, 0xfb, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x53, 0xac, 0x51, 0x18, 0x52, 0x12, 0x53, 0xe5, 0x49, 0x4f, 0x49, 0x4f, + 0x53, 0x11, 0x49, 0x4f, 0x54, 0x29, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x54, 0x30, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x56, 0xe1, 0x54, 0x4d, 0x55, 0x47, 0x57, 0x1a, 0x49, 0x4f, 0x49, 0x4f, + 0x56, 0x46, 0x49, 0x4f, 0x57, 0x5e, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x57, 0x65, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x5a, 0x16, 0x57, 0x82, 0x58, 0x7c, 0x5a, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x59, 0x7b, 0x49, 0x4f, 0x5a, 0x93, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x5a, 0x9a, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x5d, 0x4b, 0x5a, 0xb7, 0x5b, 0xb1, 0x5d, 0x84, 0x49, 0x4f, 0x49, 0x4f, + 0x5c, 0xb0, 0x49, 0x4f, 0x5d, 0xc8, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x5d, 0xcf, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x60, 0x80, 0x5d, 0xec, 0x5e, 0xe6, 0x60, 0xb9, 0x49, 0x4f, 0x49, 0x4f, + 0x5f, 0xe5, 0x49, 0x4f, 0x60, 0xfd, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x61, 0x04, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x63, 0xb5, 0x61, 0x21, 0x62, 0x1b, 0x63, 0xee, 0x49, 0x4f, 0x49, 0x4f, + 0x63, 0x1a, 0x49, 0x4f, 0x64, 0x32, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x64, 0x39, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, 0x49, 0x4f, + 0x49, 0x4f, 0x49, 0x4f, 0xca, 0x29, 0x1e, 0x50, 0x40, 0x0d, 0x7e, 0x54, 0x0b, 0x10, 0x9c, 0xb5, + 0xa4, 0x2e, 0x54, 0x68, 0x51, 0x89, 0x54, 0x7e, 0x39, 0x00, 0x7a, 0x19, 0x00, 0x0b, 0x34, 0x80, + 0xe9, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, + 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, + 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, + 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, + 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, + 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, + 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, + 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, + 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, + 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, + 0x00, 0x7a, 0x19, 0x10, 0x0b, 0x35, 0x0b, 0x38, 0x00, 0x7a, 0x19, 0x00, 0x7a, 0x19, 0x10, 0x0b, + 0x35, 0xda, 0x29, 0x22, 0x1e, 0x50, 0x40, 0x0d, 0x7e, 0x54, 0x0b, 0x1c, 0x9c, 0xb5, 0xa4, 0x2e, + 0x54, 0x69, 0x1f, 0x89, 0x54, 0x7e, 0x19, 0x00, 0x7a, 0x39, 0x00, 0x0b, 0x34, 0x80, 0xe9, 0x7e, + 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, + 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, + 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, + 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, + 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, + 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, + 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, + 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, + 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, + 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, + 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, + 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, + 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, + 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, + 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, + 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, + 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, + 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, + 0x7e, 0x19, 0x10, 0x1b, 0x38, 0x00, 0x0b, 0x35, 0x7e, 0x19, 0x00, 0x7e, 0x19, 0x10, 0x1b, 0x38, + 0x00, 0x0b, 0x35, 0x22, 0x6a, 0x9b, 0x6c, 0x4f, 0x6c, 0x67, 0x6c, 0x82, 0x6d, 0x1d, 0x6d, 0xb5, + 0x6d, 0xd0, 0x6e, 0x62, 0x6d, 0xeb, 0x6e, 0x2c, 0x7c, 0xb3, 0xbe, 0xb0, 0x09, 0x28, 0x14, 0x75, + 0x2f, 0x09, 0x12, 0x7e, 0x30, 0x75, 0x57, 0x10, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x43, 0xe1, 0xc0, + 0xd0, 0xf1, 0x22, 0xc0, 0xa8, 0xc2, 0xaf, 0x23, 0x6c, 0xaa, 0x2e, 0x54, 0x6a, 0x54, 0x0b, 0x58, + 0x50, 0x89, 0x54, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x75, 0x2f, 0xb0, 0x12, 0x7e, + 0x30, 0x0a, 0x22, 0x09, 0xb2, 0x6a, 0x93, 0x42, 0x24, 0xd0, 0xa8, 0x22, 0x7c, 0xb2, 0x23, 0x0a, + 0x3b, 0x49, 0x33, 0x6a, 0xb7, 0x89, 0x34, 0x6a, 0xc7, 0x6a, 0xf5, 0x6b, 0x23, 0x6b, 0x51, 0x6b, + 0x7f, 0x6b, 0xad, 0x6b, 0xdb, 0x6c, 0x09, 0x12, 0x41, 0xa9, 0xd2, 0x28, 0xd2, 0x08, 0xc2, 0x40, + 0xc2, 0x48, 0xc2, 0x38, 0xc2, 0x30, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xb9, 0x7e, 0x04, 0x00, 0x20, + 0x7a, 0x07, 0x01, 0x99, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xa9, 0x12, 0x41, 0x16, 0x12, + 0x64, 0x40, 0x02, 0x6c, 0x37, 0x12, 0x41, 0xc6, 0xd2, 0x29, 0xd2, 0x09, 0xc2, 0x41, 0xc2, 0x49, + 0xc2, 0x39, 0xc2, 0x31, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xba, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, + 0x01, 0x9b, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xab, 0x12, 0x41, 0x16, 0x12, 0x64, 0x69, + 0x02, 0x6c, 0x37, 0x12, 0x41, 0xe3, 0xd2, 0x2a, 0xd2, 0x0a, 0xc2, 0x42, 0xc2, 0x4a, 0xc2, 0x3a, + 0xc2, 0x32, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xbb, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0x9d, + 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xad, 0x12, 0x41, 0x16, 0x12, 0x64, 0x92, 0x02, 0x6c, + 0x37, 0x12, 0x42, 0x00, 0xd2, 0x2b, 0xd2, 0x0b, 0xc2, 0x43, 0xc2, 0x4b, 0xc2, 0x3b, 0xc2, 0x33, + 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xbc, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0x9f, 0x7e, 0x04, + 0x00, 0x38, 0x7a, 0x07, 0x01, 0xaf, 0x12, 0x41, 0x16, 0x12, 0x64, 0xbb, 0x02, 0x6c, 0x37, 0x12, + 0x42, 0x1d, 0xd2, 0x2c, 0xd2, 0x0c, 0xc2, 0x44, 0xc2, 0x4c, 0xc2, 0x3c, 0xc2, 0x34, 0x6d, 0x00, + 0x7a, 0x03, 0x01, 0xbd, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xa1, 0x7e, 0x04, 0x00, 0x38, + 0x7a, 0x07, 0x01, 0xb1, 0x12, 0x41, 0x16, 0x12, 0x64, 0xe4, 0x02, 0x6c, 0x37, 0x12, 0x42, 0x3a, + 0xd2, 0x2d, 0xd2, 0x0d, 0xc2, 0x45, 0xc2, 0x4d, 0xc2, 0x3d, 0xc2, 0x35, 0x6d, 0x00, 0x7a, 0x03, + 0x01, 0xbe, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xa3, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, + 0x01, 0xb3, 0x12, 0x41, 0x16, 0x12, 0x65, 0x0d, 0x02, 0x6c, 0x37, 0x12, 0x42, 0x57, 0xd2, 0x2e, + 0xd2, 0x0e, 0xc2, 0x46, 0xc2, 0x4e, 0xc2, 0x3e, 0xc2, 0x36, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xbf, + 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xa5, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xb5, + 0x12, 0x41, 0x16, 0x12, 0x65, 0x36, 0x02, 0x6c, 0x37, 0x12, 0x42, 0x74, 0xd2, 0x2f, 0xd2, 0x0f, + 0xc2, 0x47, 0xc2, 0x4f, 0xc2, 0x3f, 0xc2, 0x37, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xc0, 0x7e, 0x04, + 0x00, 0x20, 0x7a, 0x07, 0x01, 0xa7, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xb7, 0x12, 0x41, + 0x16, 0x12, 0x65, 0x5f, 0x02, 0x6c, 0x37, 0x7e, 0xa0, 0xd0, 0x7e, 0x60, 0x0f, 0x12, 0x65, 0xbf, + 0x40, 0x0c, 0xc0, 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0xc2, 0xd7, 0x22, 0x75, + 0x2f, 0xb1, 0x12, 0x7e, 0x30, 0x0a, 0x52, 0x23, 0x6d, 0x00, 0x59, 0x05, 0x00, 0x32, 0x12, 0x41, + 0x72, 0x12, 0x41, 0x8e, 0xd0, 0xa8, 0x22, 0x75, 0x2f, 0xb2, 0x12, 0x7e, 0x30, 0x0a, 0x22, 0x09, + 0xb2, 0x6a, 0x93, 0x42, 0x23, 0x7e, 0xb0, 0x9c, 0x19, 0xb2, 0x01, 0xb9, 0x12, 0x45, 0x74, 0xd0, + 0xa8, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, + 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00, 0x0c, 0x7c, 0x74, 0x5e, 0x70, 0x01, 0x68, + 0x12, 0x44, 0x40, 0xca, 0xb8, 0x09, 0xb0, 0x00, 0x10, 0x44, 0x02, 0x19, 0xb0, 0x00, 0x10, 0xda, + 0xb8, 0x80, 0x02, 0x54, 0xbf, 0x7c, 0x74, 0x5e, 0x70, 0x08, 0x68, 0x04, 0x44, 0x08, 0x80, 0x02, + 0x54, 0xf7, 0x09, 0x30, 0x00, 0x0c, 0xca, 0xb8, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0xda, 0xb8, + 0x19, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00, 0x0c, 0x0a, 0x62, 0x09, 0xb6, 0x6a, 0x93, 0x3e, 0x20, + 0x0a, 0x62, 0x7c, 0x74, 0x5e, 0x70, 0x02, 0x68, 0x20, 0x42, 0x27, 0xca, 0xb8, 0x74, 0x61, 0x19, + 0xb0, 0x00, 0x08, 0x7e, 0x44, 0x00, 0x10, 0x59, 0x46, 0x01, 0xa9, 0x09, 0xb0, 0x00, 0x10, 0x44, + 0x01, 0x19, 0xb0, 0x00, 0x10, 0xda, 0xb8, 0x80, 0x11, 0xf4, 0x52, 0x27, 0x74, 0xa1, 0x19, 0xb0, + 0x00, 0x08, 0x7e, 0x44, 0x00, 0x38, 0x59, 0x46, 0x01, 0xa9, 0xd0, 0xa8, 0x22, 0x7c, 0x74, 0x7e, + 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x09, + 0xb0, 0x00, 0x08, 0x7c, 0x74, 0x5e, 0x70, 0x01, 0x68, 0x04, 0x44, 0x80, 0x80, 0x02, 0x54, 0x7f, + 0x7c, 0x74, 0x5e, 0x70, 0x08, 0x68, 0x04, 0x44, 0x02, 0x80, 0x02, 0x54, 0xfd, 0x19, 0xb0, 0x00, + 0x08, 0x19, 0x30, 0x00, 0x0c, 0x0a, 0x62, 0x09, 0xb6, 0x6a, 0x93, 0xa5, 0xfd, 0xf4, 0xa5, 0xfe, + 0xca, 0x28, 0x3e, 0x20, 0x0a, 0x62, 0xda, 0x28, 0x7c, 0x74, 0x5e, 0x70, 0x02, 0x68, 0x10, 0xa5, + 0xed, 0x42, 0x28, 0x42, 0x26, 0x7e, 0x44, 0x00, 0x08, 0x59, 0x46, 0x01, 0x99, 0x80, 0x04, 0xa5, + 0xee, 0x52, 0x28, 0x7c, 0x74, 0x5e, 0x70, 0x04, 0x68, 0x10, 0xa5, 0xed, 0x42, 0x29, 0x42, 0x26, + 0x7e, 0x44, 0x00, 0x08, 0x59, 0x46, 0x01, 0x99, 0x80, 0x15, 0xa5, 0xee, 0x52, 0x29, 0x7c, 0x74, + 0x5e, 0x70, 0x02, 0x78, 0x0a, 0x52, 0x26, 0x7e, 0x44, 0x00, 0x20, 0x59, 0x46, 0x01, 0x99, 0x12, + 0x42, 0x91, 0xd0, 0xa8, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, + 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x19, 0x40, 0x00, 0x10, 0x19, 0x30, 0x00, 0x0c, 0xd0, 0xa8, 0x22, + 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, + 0x19, 0x40, 0x00, 0x18, 0x19, 0x30, 0x00, 0x0c, 0xd0, 0xa8, 0x22, 0x75, 0x2f, 0xb5, 0x12, 0x7e, + 0x30, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0xb0, 0x00, 0x0c, 0x44, 0x40, 0x19, 0xb0, 0x00, + 0x0c, 0xe5, 0x58, 0xb4, 0x07, 0x23, 0x09, 0xb0, 0x00, 0x10, 0x4e, 0xb0, 0x02, 0x19, 0xb0, 0x00, + 0x10, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x04, 0x54, + 0xf7, 0x19, 0xb0, 0x00, 0x04, 0x19, 0x30, 0x00, 0x0c, 0xd0, 0xa8, 0x22, 0x75, 0x2f, 0xb6, 0x12, + 0x7e, 0x30, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0xe5, 0x58, 0xb4, 0x07, 0x18, 0x09, 0x30, 0x00, + 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x04, 0x44, 0x08, 0x19, 0xb0, 0x00, + 0x04, 0x19, 0x30, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x0c, 0x54, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0xd0, + 0xa8, 0x22, 0x75, 0x2f, 0xb4, 0x12, 0x7e, 0x30, 0x7a, 0x21, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x41, + 0x2f, 0x12, 0x7e, 0x30, 0x7e, 0xb0, 0x01, 0x7e, 0xa0, 0xc8, 0x7c, 0x64, 0x12, 0x65, 0xbf, 0xc0, + 0xf1, 0x75, 0xf1, 0x01, 0x12, 0x71, 0xe9, 0xd0, 0xf1, 0xd0, 0xa8, 0x22, 0x6e, 0x9c, 0x6e, 0xe3, + 0x6f, 0x2a, 0x6f, 0x71, 0x6f, 0xb8, 0x6f, 0xff, 0x70, 0x46, 0x70, 0x8d, 0x75, 0x2f, 0x55, 0x12, + 0x7e, 0x30, 0x75, 0x2f, 0x00, 0x12, 0x7e, 0x30, 0x7a, 0x61, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x71, + 0x2f, 0x12, 0x7e, 0x30, 0x7e, 0x17, 0x01, 0x69, 0x7e, 0x27, 0x01, 0x79, 0x2d, 0x23, 0x7e, 0x09, + 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x0d, 0xcc, 0x38, 0x0f, 0x1b, 0x34, + 0x78, 0xec, 0x7a, 0x17, 0x01, 0x69, 0x7a, 0x27, 0x01, 0x79, 0x02, 0x4a, 0x98, 0x7e, 0x14, 0x09, + 0xcd, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x01, 0x12, 0x7e, 0x30, 0x7a, + 0x61, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0x7e, 0x17, 0x01, 0x6b, 0x7e, + 0x27, 0x01, 0x7b, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, + 0x14, 0x11, 0xcc, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x6b, 0x7a, 0x27, 0x01, + 0x7b, 0x02, 0x4d, 0xcd, 0x7e, 0x14, 0x0d, 0xcd, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x7e, 0x30, + 0x75, 0x2f, 0x02, 0x12, 0x7e, 0x30, 0x7a, 0x61, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, + 0x7e, 0x30, 0x7e, 0x17, 0x01, 0x6d, 0x7e, 0x27, 0x01, 0x7d, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, + 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x15, 0xcc, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, + 0x7a, 0x17, 0x01, 0x6d, 0x7a, 0x27, 0x01, 0x7d, 0x02, 0x51, 0x02, 0x7e, 0x14, 0x11, 0xcd, 0x80, + 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x03, 0x12, 0x7e, 0x30, 0x7a, 0x61, 0x2f, + 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0x7e, 0x17, 0x01, 0x6f, 0x7e, 0x27, 0x01, + 0x7f, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x19, + 0xcc, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x6f, 0x7a, 0x27, 0x01, 0x7f, 0x02, + 0x54, 0x37, 0x7e, 0x14, 0x15, 0xcd, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x7e, 0x30, 0x75, 0x2f, + 0x04, 0x12, 0x7e, 0x30, 0x7a, 0x61, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, + 0x7e, 0x17, 0x01, 0x71, 0x7e, 0x27, 0x01, 0x81, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, + 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x1d, 0xcc, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, + 0x01, 0x71, 0x7a, 0x27, 0x01, 0x81, 0x02, 0x57, 0x6c, 0x7e, 0x14, 0x19, 0xcd, 0x80, 0xeb, 0x75, + 0x2f, 0x55, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x05, 0x12, 0x7e, 0x30, 0x7a, 0x61, 0x2f, 0x12, 0x7e, + 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0x7e, 0x17, 0x01, 0x73, 0x7e, 0x27, 0x01, 0x83, 0x2d, + 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x21, 0xcc, 0x38, + 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x73, 0x7a, 0x27, 0x01, 0x83, 0x02, 0x5a, 0xa1, + 0x7e, 0x14, 0x1d, 0xcd, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x06, 0x12, + 0x7e, 0x30, 0x7a, 0x61, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, 0x7e, 0x30, 0x7e, 0x17, + 0x01, 0x75, 0x7e, 0x27, 0x01, 0x85, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, + 0x0b, 0x14, 0xbe, 0x14, 0x25, 0xcc, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x75, + 0x7a, 0x27, 0x01, 0x85, 0x02, 0x5d, 0xd6, 0x7e, 0x14, 0x21, 0xcd, 0x80, 0xeb, 0x75, 0x2f, 0x55, + 0x12, 0x7e, 0x30, 0x75, 0x2f, 0x07, 0x12, 0x7e, 0x30, 0x7a, 0x61, 0x2f, 0x12, 0x7e, 0x30, 0x7a, + 0x71, 0x2f, 0x12, 0x7e, 0x30, 0x7e, 0x17, 0x01, 0x77, 0x7e, 0x27, 0x01, 0x87, 0x2d, 0x23, 0x7e, + 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x29, 0xcc, 0x38, 0x0f, 0x1b, + 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x77, 0x7a, 0x27, 0x01, 0x87, 0x02, 0x61, 0x0b, 0x7e, 0x14, + 0x25, 0xcd, 0x80, 0xeb, 0xca, 0xb8, 0xc0, 0xf1, 0x75, 0x2f, 0x02, 0x12, 0x7e, 0x30, 0xe5, 0xc0, + 0x54, 0x03, 0x68, 0x05, 0x12, 0x77, 0xdd, 0x80, 0xf5, 0x30, 0xc2, 0x08, 0x75, 0xf1, 0x01, 0x12, + 0x71, 0xe9, 0x80, 0x14, 0x30, 0xc3, 0x08, 0x75, 0xf1, 0x01, 0x12, 0x71, 0x0d, 0x80, 0x09, 0x30, + 0xc4, 0x06, 0x75, 0xf1, 0x02, 0x12, 0x72, 0xf9, 0xd0, 0xf1, 0xda, 0xb8, 0x32, 0x75, 0x2f, 0x10, + 0x12, 0x7e, 0x30, 0xca, 0x0b, 0xca, 0x39, 0xca, 0x59, 0xc2, 0xc3, 0xa9, 0x21, 0xe2, 0x5c, 0xe5, + 0xe5, 0x54, 0xc0, 0x68, 0x4f, 0xe5, 0xe6, 0x6c, 0xaa, 0x7e, 0x37, 0x01, 0xc5, 0x2d, 0x35, 0xbe, + 0x34, 0x04, 0x00, 0x38, 0x4a, 0x7a, 0x37, 0x01, 0xc5, 0x7e, 0x37, 0x01, 0xc3, 0x7d, 0x43, 0x2d, + 0x45, 0xbe, 0x44, 0x09, 0xcc, 0x38, 0x40, 0x7a, 0x47, 0x01, 0xc3, 0x75, 0x2f, 0x11, 0x12, 0x7e, + 0x30, 0x7a, 0xb1, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x73, 0xc8, 0xa9, 0x21, 0xe5, 0x1f, 0xa9, 0xd4, + 0xe4, 0xa9, 0x24, 0xe4, 0xfc, 0xc2, 0xc3, 0xa9, 0x21, 0xe2, 0x3b, 0xe5, 0xe5, 0x54, 0xc0, 0x78, + 0xb4, 0x12, 0x76, 0x6a, 0xda, 0x59, 0xda, 0x39, 0xda, 0x0b, 0x22, 0x80, 0x29, 0x80, 0x58, 0x75, + 0x2f, 0x16, 0x12, 0x7e, 0x30, 0x80, 0xed, 0x75, 0x2f, 0x12, 0x12, 0x7e, 0x30, 0x7a, 0xb1, 0x2f, + 0x12, 0x7e, 0x30, 0x9e, 0x44, 0x09, 0xcd, 0x9d, 0x54, 0x12, 0x73, 0xc8, 0x7e, 0x34, 0x05, 0xcd, + 0x7d, 0x54, 0x2d, 0x43, 0x80, 0xa1, 0xe5, 0xe5, 0x54, 0x03, 0x78, 0x12, 0x75, 0x2f, 0x13, 0x12, + 0x7e, 0x30, 0x7e, 0x0f, 0x29, 0xe9, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xe9, 0x80, 0xa7, 0x75, 0x2f, + 0x14, 0x12, 0x7e, 0x30, 0x7e, 0x0f, 0x29, 0xed, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xed, 0xa9, 0xd7, + 0xe4, 0xa9, 0x27, 0xe4, 0xfc, 0x80, 0x9d, 0x75, 0x2f, 0x15, 0x12, 0x7e, 0x30, 0x7e, 0x0f, 0x29, + 0xf1, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xf1, 0x80, 0xe5, 0x75, 0x2f, 0x18, 0x12, 0x7e, 0x30, 0xca, + 0x09, 0xca, 0x39, 0xca, 0x2b, 0xc2, 0xc2, 0xa9, 0x21, 0xf2, 0x52, 0xe5, 0xf5, 0x33, 0x82, 0xe7, + 0x40, 0x44, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x54, 0x00, 0x40, 0x9d, 0x35, 0x40, 0x43, 0x7a, 0x37, + 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc7, 0x7d, 0x43, 0x2d, 0x45, 0xbe, 0x44, 0x05, 0xcc, 0x38, 0x52, + 0x7a, 0x47, 0x01, 0xc7, 0x7d, 0x45, 0x12, 0x75, 0x26, 0xa9, 0x20, 0xf5, 0x22, 0x75, 0x2f, 0x19, + 0x12, 0x7e, 0x30, 0x7a, 0x91, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x81, 0xf7, 0x7a, 0x91, 0xf6, 0xe5, + 0xf5, 0x33, 0x82, 0xe7, 0x50, 0xbc, 0xda, 0x2b, 0xda, 0x39, 0xda, 0x09, 0x22, 0x80, 0x41, 0x80, + 0x64, 0x2d, 0x53, 0x6d, 0x33, 0x70, 0xb7, 0x7e, 0x04, 0x01, 0xcd, 0x7a, 0x07, 0x01, 0xc9, 0x7a, + 0x07, 0x01, 0xc7, 0xa9, 0x32, 0xf2, 0xdf, 0x85, 0x30, 0x2f, 0x12, 0x7e, 0x30, 0x75, 0xf6, 0x00, + 0x80, 0xd4, 0xca, 0x59, 0x9e, 0x44, 0x05, 0xcd, 0x9d, 0x54, 0x12, 0x75, 0x26, 0x7e, 0x34, 0x01, + 0xcd, 0x7d, 0x54, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc7, 0x12, 0x75, 0x26, 0xda, 0x49, 0x80, 0x99, + 0xe5, 0xf5, 0x54, 0x03, 0x78, 0x1f, 0x7e, 0x0f, 0x29, 0xd9, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xd9, + 0x80, 0x9d, 0x7e, 0x0f, 0x29, 0xe1, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xe1, 0xa9, 0xd7, 0xf4, 0xa9, + 0x27, 0xf4, 0xfc, 0x80, 0x8a, 0x7e, 0x0f, 0x29, 0xdd, 0x0b, 0x0c, 0x7a, 0x0f, 0x29, 0xdd, 0x80, + 0xeb, 0xe5, 0xf5, 0x54, 0x03, 0x78, 0x1f, 0x7e, 0x2f, 0x29, 0xf9, 0x0b, 0x2c, 0x7a, 0x2f, 0x29, + 0xf9, 0x80, 0x34, 0x7e, 0x2f, 0x2a, 0x01, 0x0b, 0x2c, 0x7a, 0x2f, 0x2a, 0x01, 0xa9, 0xd7, 0xf4, + 0xa9, 0x27, 0xf4, 0xfc, 0x80, 0x21, 0x7e, 0x2f, 0x29, 0xfd, 0x0b, 0x2c, 0x7a, 0x2f, 0x29, 0xfd, + 0x80, 0xeb, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0x75, 0x2f, 0x28, 0x12, 0x7e, 0x30, 0xca, + 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0xc2, 0xc4, 0xa9, 0x21, 0xf2, 0xb6, 0xe5, 0xf5, 0x33, 0x72, 0xe7, + 0x40, 0xe0, 0x7e, 0x0d, 0x30, 0x7e, 0x1d, 0x34, 0x7e, 0x2d, 0x38, 0x7e, 0x3d, 0x3c, 0x7e, 0x85, + 0x40, 0x7d, 0x90, 0x4d, 0x91, 0x4d, 0x92, 0x4d, 0x93, 0x4d, 0x94, 0x4d, 0x95, 0x4d, 0x96, 0x4d, + 0x97, 0x4d, 0x98, 0x68, 0x72, 0x7a, 0x11, 0xf3, 0x7a, 0x01, 0xf3, 0x7a, 0x31, 0xf3, 0x7a, 0x21, + 0xf3, 0x7a, 0x51, 0xf3, 0x7a, 0x41, 0xf3, 0x7a, 0x71, 0xf3, 0x7a, 0x61, 0xf3, 0x7a, 0x91, 0xf3, + 0x7a, 0x81, 0xf3, 0x30, 0x73, 0x1a, 0x7a, 0xb1, 0xf3, 0x7a, 0xa1, 0xf3, 0x7a, 0xd1, 0xf3, 0x7a, + 0xc1, 0xf3, 0x7a, 0xf1, 0xf3, 0x7a, 0xe1, 0xf3, 0x7d, 0x78, 0x7a, 0xf1, 0xf3, 0x7a, 0xe1, 0xf3, + 0xa9, 0x30, 0xf5, 0x03, 0x02, 0x72, 0xe6, 0x75, 0x2f, 0x29, 0x12, 0x7e, 0x30, 0x20, 0x73, 0x0b, + 0x75, 0x2f, 0x0a, 0x12, 0x7e, 0x30, 0x75, 0xf6, 0x0a, 0x80, 0x09, 0x75, 0x2f, 0x12, 0x12, 0x7e, + 0x30, 0x75, 0xf6, 0x12, 0x6d, 0x00, 0x7d, 0x10, 0x7a, 0x0d, 0x30, 0x7a, 0x0d, 0x34, 0x7a, 0x0d, + 0x38, 0x7a, 0x0d, 0x3c, 0x7a, 0x05, 0x40, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0x1e, 0xb0, + 0x40, 0x0c, 0x7e, 0xa0, 0x0a, 0xa4, 0x7e, 0x04, 0x75, 0x0b, 0x9d, 0x05, 0x89, 0x04, 0x7e, 0xa1, + 0xe3, 0x7a, 0x39, 0xa0, 0x0b, 0x34, 0x80, 0xea, 0xb4, 0x40, 0xe3, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, + 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, + 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, + 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, + 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, + 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, + 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, + 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, + 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, + 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, + 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, + 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, + 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, + 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, + 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, + 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, + 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, + 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, + 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, + 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, + 0x35, 0x7e, 0xa1, 0xe3, 0xe5, 0xe3, 0x1b, 0x38, 0x50, 0x0b, 0x35, 0x22, 0x1e, 0xb0, 0x40, 0x0c, + 0x7e, 0xa0, 0x0a, 0xa4, 0x7e, 0x04, 0x76, 0x69, 0x9d, 0x05, 0x89, 0x04, 0x7e, 0x39, 0xa0, 0x7a, + 0xa1, 0xf3, 0x0b, 0x34, 0x80, 0xea, 0xb4, 0x40, 0xe3, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, + 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, + 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, + 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, + 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, + 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, + 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, + 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, + 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, + 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, + 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, + 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, + 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, + 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, + 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, + 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, + 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, + 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, + 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, + 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x0b, + 0x38, 0x50, 0x7a, 0xa1, 0xf3, 0xf5, 0xf3, 0x0b, 0x35, 0x22, 0xc2, 0xaf, 0x7e, 0x37, 0x01, 0xc5, + 0x4d, 0x33, 0x68, 0x3b, 0x7e, 0x07, 0x01, 0xc1, 0x7e, 0x54, 0x09, 0xcd, 0x9d, 0x50, 0xbd, 0x35, + 0x40, 0x02, 0x7d, 0x35, 0xca, 0x39, 0x7e, 0x65, 0x4b, 0x99, 0x64, 0xda, 0x39, 0x7e, 0x07, 0x01, + 0xc5, 0x9d, 0x03, 0x7a, 0x07, 0x01, 0xc5, 0x2e, 0x37, 0x01, 0xc1, 0x7a, 0x37, 0x01, 0xc1, 0xbe, + 0x34, 0x09, 0xcc, 0x28, 0xc7, 0x7e, 0x34, 0x05, 0xcd, 0x7a, 0x37, 0x01, 0xc1, 0x80, 0xbd, 0xd2, + 0xaf, 0x22, 0x75, 0x2f, 0x53, 0x12, 0x7e, 0x30, 0x7e, 0x15, 0x4d, 0x80, 0x11, 0x75, 0x2f, 0x51, + 0x12, 0x7e, 0x30, 0x0b, 0x08, 0x10, 0x0b, 0x05, 0x9e, 0x34, 0x00, 0x02, 0x28, 0x4d, 0x7c, 0xb2, + 0x20, 0xe7, 0x27, 0x54, 0x07, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x6e, 0x8c, 0x7c, 0xb2, 0x54, 0x78, + 0x03, 0x03, 0x03, 0x7c, 0x2b, 0x9d, 0x13, 0x40, 0x1a, 0x68, 0x12, 0x7a, 0x15, 0x4d, 0x7a, 0x25, + 0x4f, 0x7e, 0x64, 0x77, 0x47, 0x7a, 0x65, 0x4b, 0x89, 0x24, 0x02, 0x77, 0x55, 0x7e, 0x64, 0x76, + 0xbd, 0x80, 0xf2, 0x2d, 0x13, 0x9d, 0x31, 0xca, 0x39, 0x7d, 0x31, 0x2d, 0x10, 0xca, 0x19, 0xca, + 0x29, 0x99, 0x24, 0xda, 0x29, 0xda, 0x09, 0xda, 0x39, 0x80, 0xa2, 0x7a, 0x15, 0x4d, 0x7e, 0x64, + 0x77, 0x33, 0x4d, 0x33, 0x78, 0x09, 0x7c, 0xb2, 0x20, 0xe7, 0x2a, 0x7e, 0x64, 0x76, 0xb2, 0x7a, + 0x65, 0x4b, 0x22, 0x75, 0x2f, 0x52, 0x12, 0x7e, 0x30, 0x7e, 0x21, 0x4d, 0x7e, 0x09, 0x30, 0x0b, + 0x04, 0x1b, 0x34, 0x78, 0x89, 0x80, 0xd4, 0x75, 0x2f, 0x54, 0x12, 0x7e, 0x30, 0x7e, 0x15, 0x4d, + 0x7e, 0x25, 0x4f, 0x80, 0x90, 0x5e, 0x20, 0x07, 0x54, 0x78, 0x7e, 0x44, 0x77, 0xd1, 0x30, 0xe6, + 0x16, 0x4d, 0x33, 0x68, 0x26, 0x1b, 0x34, 0x7e, 0x09, 0x40, 0x0b, 0x04, 0x7e, 0x44, 0x6a, 0x68, + 0x20, 0xe3, 0x04, 0x7e, 0x44, 0x77, 0xd9, 0xca, 0x09, 0xca, 0x39, 0x99, 0x44, 0xda, 0x39, 0xda, + 0x09, 0x7e, 0x64, 0x76, 0xbd, 0x4d, 0x33, 0x68, 0xa6, 0x89, 0x64, 0x7a, 0x15, 0x4d, 0xf5, 0x4f, + 0x7e, 0x64, 0x77, 0x96, 0x80, 0x99, 0x7e, 0x15, 0x4d, 0xe5, 0x4f, 0x80, 0xc4, 0xc0, 0xd0, 0xc0, + 0xd1, 0xc0, 0xe0, 0xca, 0x19, 0xa9, 0x20, 0xdf, 0x12, 0xa9, 0x21, 0xdf, 0x1b, 0x75, 0x2f, 0x01, + 0x12, 0x7e, 0x30, 0x53, 0xdf, 0xf7, 0x12, 0x40, 0xdc, 0x80, 0x0d, 0x75, 0x2f, 0xfe, 0x12, 0x7e, + 0x30, 0x7e, 0x14, 0x00, 0x53, 0x02, 0x40, 0x51, 0xda, 0x19, 0xd0, 0xe0, 0xd0, 0xd1, 0xd0, 0xd0, + 0x32, 0x03, 0xa5, 0xcb, 0x19, 0xb1, 0x80, 0x00, 0x22, 0x22, 0x02, 0x78, 0x52, 0xca, 0x0b, 0xca, + 0x1b, 0xca, 0x2b, 0xca, 0x3b, 0xca, 0x4b, 0xca, 0x5b, 0xca, 0x6b, 0xca, 0x7b, 0xca, 0xeb, 0xc0, + 0xf1, 0x7e, 0xb3, 0x2a, 0x1d, 0xb4, 0x00, 0x02, 0x80, 0x19, 0xb4, 0x01, 0x16, 0x30, 0xc0, 0x08, + 0x75, 0xf1, 0x00, 0x12, 0x78, 0x3c, 0x80, 0x1f, 0x30, 0xc1, 0x1c, 0x75, 0xf1, 0x00, 0x12, 0x78, + 0xcd, 0x80, 0x14, 0x30, 0xc1, 0x08, 0x75, 0xf1, 0x00, 0x12, 0x78, 0xcd, 0x80, 0x09, 0x30, 0xc0, + 0x06, 0x75, 0xf1, 0x00, 0x12, 0x78, 0x3c, 0xd0, 0xf1, 0xda, 0xeb, 0xda, 0x7b, 0xda, 0x6b, 0xda, + 0x5b, 0xda, 0x4b, 0xda, 0x3b, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0xc2, 0xc0, 0x7e, 0xb3, + 0x2a, 0x1d, 0xb4, 0x02, 0x07, 0x12, 0x78, 0x5e, 0x02, 0x78, 0x52, 0x22, 0xb4, 0x01, 0xfc, 0x02, + 0x78, 0x98, 0x7e, 0x00, 0x00, 0x7a, 0x03, 0x2a, 0x1d, 0x7a, 0x03, 0x2a, 0x1e, 0x22, 0x7e, 0xb3, + 0x2a, 0x15, 0x54, 0x60, 0x60, 0x05, 0xb4, 0x40, 0x15, 0x80, 0x13, 0x7e, 0xb3, 0x2a, 0x16, 0xb4, + 0x05, 0x0c, 0x75, 0x2f, 0x71, 0x12, 0x7e, 0x30, 0x7e, 0xb3, 0x2a, 0x18, 0xf5, 0x8f, 0x22, 0x75, + 0xf6, 0x00, 0x22, 0xbe, 0x57, 0x2a, 0x1b, 0x28, 0x04, 0x7e, 0x57, 0x2a, 0x1b, 0x7a, 0x0f, 0x2a, + 0x20, 0x7a, 0x57, 0x2a, 0x24, 0x02, 0x78, 0x98, 0x7e, 0xef, 0x2a, 0x20, 0x7e, 0xf7, 0x2a, 0x24, + 0x7e, 0x07, 0x2a, 0x24, 0x4d, 0x00, 0x68, 0x21, 0x7e, 0x00, 0x00, 0x7e, 0xeb, 0xb0, 0xf5, 0xf3, + 0xa3, 0xa5, 0x08, 0x1b, 0xf4, 0x68, 0x04, 0xa5, 0xb8, 0x08, 0xf0, 0x7a, 0xef, 0x2a, 0x20, 0x7a, + 0xf7, 0x2a, 0x24, 0x75, 0x2f, 0x06, 0x12, 0x7e, 0x30, 0x7a, 0x01, 0xf6, 0x22, 0xc2, 0xc1, 0x75, + 0x2f, 0x03, 0x12, 0x7e, 0x30, 0xa9, 0x36, 0xe2, 0x16, 0xe5, 0xf5, 0x54, 0xc0, 0x68, 0x07, 0xa9, + 0xd7, 0xf4, 0xa9, 0x27, 0xf4, 0xfc, 0x53, 0xe1, 0x3f, 0x43, 0xf2, 0x88, 0x02, 0x79, 0x44, 0x7e, + 0xb3, 0x2a, 0x1e, 0xb4, 0x02, 0x0f, 0xa9, 0xd4, 0xe4, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x2a, 0x1e, + 0x7a, 0xb3, 0x2a, 0x1d, 0x22, 0xb4, 0x01, 0x39, 0x7e, 0x21, 0xe6, 0x7c, 0x32, 0x7e, 0x13, 0x2a, + 0x1f, 0x2c, 0x21, 0x7a, 0x23, 0x2a, 0x1f, 0x7e, 0x00, 0x00, 0x2e, 0x04, 0x2a, 0x26, 0xe5, 0xe3, + 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0xa5, 0xdb, 0xf6, 0xa9, 0xd4, 0xe4, 0x75, 0x2f, 0x70, 0x12, 0x7e, + 0x30, 0x7e, 0xb3, 0x2a, 0x1f, 0x7e, 0xa3, 0x2a, 0x1c, 0xbc, 0xab, 0x78, 0x03, 0x12, 0x79, 0xdb, + 0x22, 0x02, 0x7d, 0x44, 0xe5, 0xe6, 0xb4, 0x08, 0x65, 0xa9, 0xc4, 0xe2, 0x7e, 0x01, 0xe3, 0x7e, + 0x11, 0xe3, 0x7e, 0x31, 0xe3, 0x7e, 0x21, 0xe3, 0x7e, 0x51, 0xe3, 0x7e, 0x41, 0xe3, 0x7e, 0x71, + 0xe3, 0x7e, 0x61, 0xe3, 0x7a, 0x0f, 0x2a, 0x15, 0x7a, 0x1f, 0x2a, 0x19, 0x75, 0x2f, 0x04, 0x12, + 0x7e, 0x30, 0x7a, 0x01, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x11, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x21, + 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x31, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x41, 0x2f, 0x12, 0x7e, 0x30, + 0x7a, 0x51, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x61, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x71, 0x2f, 0x12, + 0x7e, 0x30, 0xa9, 0xd4, 0xe4, 0xa9, 0xd7, 0xf4, 0xa9, 0xc6, 0xe2, 0x12, 0x79, 0xaf, 0x22, 0x6d, + 0x00, 0x7e, 0x14, 0x01, 0x02, 0x7a, 0x07, 0x2a, 0x24, 0x7a, 0x03, 0x2a, 0x1f, 0x7e, 0xb3, 0x2a, + 0x15, 0x20, 0xe7, 0x0f, 0x7a, 0x23, 0x2a, 0x1e, 0x7a, 0x33, 0x2a, 0x1d, 0xbe, 0x07, 0x2a, 0x1b, + 0x68, 0x09, 0x22, 0x7a, 0x33, 0x2a, 0x1e, 0x7a, 0x23, 0x2a, 0x1d, 0x7e, 0xb3, 0x2a, 0x15, 0x54, + 0xe3, 0x23, 0x23, 0x30, 0xe0, 0x02, 0xd2, 0xe5, 0x30, 0xe7, 0x02, 0xd2, 0xe4, 0x30, 0xe5, 0x06, + 0x30, 0xe4, 0x03, 0x02, 0x7d, 0x44, 0x54, 0x3e, 0xf5, 0xf0, 0x03, 0x54, 0x1f, 0xc3, 0x25, 0xf0, + 0x90, 0x7a, 0x07, 0x75, 0x84, 0xff, 0x73, 0x02, 0x7b, 0x5b, 0x02, 0x7a, 0x4f, 0x02, 0x7b, 0xf8, + 0x02, 0x7c, 0x13, 0x02, 0x7a, 0xf4, 0x02, 0x7a, 0xb5, 0x02, 0x7c, 0x2c, 0x02, 0x7c, 0x2c, 0x02, + 0x7c, 0x2f, 0x02, 0x7c, 0x2f, 0x02, 0x7c, 0x2f, 0x02, 0x7c, 0x2f, 0x02, 0x7c, 0x2f, 0x02, 0x7c, + 0x2f, 0x02, 0x7c, 0x2f, 0x02, 0x7c, 0x2f, 0x02, 0x7c, 0x35, 0x02, 0x7c, 0xe9, 0x02, 0x7c, 0x32, + 0x02, 0x7c, 0x32, 0x02, 0x7c, 0x32, 0x02, 0x7c, 0x32, 0x02, 0x7c, 0x32, 0x02, 0x7c, 0x32, 0x7e, + 0xb3, 0x2a, 0x16, 0xb4, 0x06, 0x2a, 0x7e, 0xb3, 0x2a, 0x17, 0x60, 0x56, 0x7c, 0x0b, 0x7e, 0x13, + 0x2a, 0x18, 0x7e, 0x17, 0x2a, 0x19, 0x75, 0x2f, 0x72, 0x12, 0x7e, 0x30, 0x7a, 0x01, 0x2f, 0x12, + 0x7e, 0x30, 0x7a, 0x11, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x7d, 0x4e, 0x40, 0x35, 0x02, 0x78, 0x83, + 0xb4, 0x08, 0x10, 0x75, 0x2f, 0x74, 0x12, 0x7e, 0x30, 0x7e, 0xb3, 0x3f, 0xf1, 0xf5, 0xf3, 0x75, + 0xf6, 0x01, 0x22, 0xb4, 0x00, 0x1c, 0x75, 0x2f, 0x75, 0x12, 0x7e, 0x30, 0x7e, 0xb3, 0x3f, 0xf2, + 0x30, 0xe0, 0x05, 0x75, 0xf3, 0x02, 0x80, 0x03, 0x75, 0xf3, 0x00, 0x75, 0xf3, 0x00, 0x75, 0xf6, + 0x02, 0x22, 0x02, 0x7d, 0x44, 0x7e, 0xb3, 0x2a, 0x16, 0xb4, 0x00, 0x35, 0x75, 0x2f, 0x76, 0x12, + 0x7e, 0x30, 0x7e, 0xb3, 0x2a, 0x1a, 0x54, 0x0f, 0xf5, 0xf1, 0x7e, 0xb3, 0x2a, 0x1a, 0x20, 0xe7, + 0x09, 0xe5, 0xe1, 0x30, 0xe7, 0x0d, 0x74, 0x01, 0x80, 0x0b, 0xe5, 0xe1, 0x30, 0xe6, 0x04, 0x74, + 0x01, 0x80, 0x02, 0x74, 0x00, 0x53, 0xf1, 0x80, 0xf5, 0xf3, 0x75, 0xf3, 0x00, 0x75, 0xf6, 0x02, + 0x22, 0x02, 0x7d, 0x44, 0xc0, 0xf1, 0x7e, 0xb3, 0x2a, 0x1a, 0x54, 0x0f, 0x42, 0xf1, 0x7e, 0xb3, + 0x2a, 0x18, 0xb4, 0x00, 0x45, 0x7e, 0xb3, 0x2a, 0x16, 0xb4, 0x01, 0x24, 0x75, 0x2f, 0x77, 0x12, + 0x7e, 0x30, 0x7e, 0xb3, 0x2a, 0x1a, 0x54, 0x0f, 0x78, 0x05, 0x53, 0xe1, 0x3f, 0x80, 0x37, 0x7e, + 0xb3, 0x2a, 0x1a, 0x20, 0xe7, 0x05, 0x53, 0xe1, 0x7f, 0x80, 0x2b, 0x53, 0xe1, 0xbf, 0x80, 0x26, + 0xb4, 0x03, 0x17, 0x75, 0x2f, 0x78, 0x12, 0x7e, 0x30, 0x7e, 0xb3, 0x2a, 0x1a, 0x20, 0xe7, 0x05, + 0x43, 0xe1, 0x80, 0x80, 0x11, 0x43, 0xe1, 0x40, 0x80, 0x0c, 0x43, 0xe1, 0xc0, 0xd0, 0xf1, 0x75, + 0x2f, 0x07, 0x12, 0x7e, 0x30, 0x22, 0xd0, 0xf1, 0x02, 0x78, 0x7f, 0x7e, 0xb3, 0x2a, 0x16, 0xb4, + 0x09, 0x23, 0x75, 0x2f, 0x79, 0x12, 0x7e, 0x30, 0x7e, 0xb3, 0x2a, 0x18, 0xbe, 0xb3, 0x3f, 0xf1, + 0x68, 0x11, 0xca, 0xb8, 0xc0, 0xf1, 0x12, 0x43, 0x68, 0xd0, 0xf1, 0xda, 0xb8, 0x50, 0x76, 0x7a, + 0xb3, 0x3f, 0xf1, 0x80, 0x6d, 0xb4, 0x05, 0x08, 0x75, 0x2f, 0x7a, 0x12, 0x7e, 0x30, 0x80, 0x62, + 0xb4, 0x03, 0x19, 0x75, 0x2f, 0x7b, 0x12, 0x7e, 0x30, 0x7e, 0xb3, 0x2a, 0x18, 0xb4, 0x01, 0x55, + 0x7e, 0xb3, 0x3f, 0xf2, 0x44, 0x01, 0x7a, 0xb3, 0x3f, 0xf2, 0x80, 0x46, 0xb4, 0x01, 0x19, 0x75, + 0x2f, 0x7c, 0x12, 0x7e, 0x30, 0x7e, 0xb3, 0x2a, 0x18, 0xb4, 0x01, 0x39, 0x7e, 0xb3, 0x3f, 0xf2, + 0x54, 0xfe, 0x7a, 0xb3, 0x3f, 0xf2, 0x80, 0x2a, 0xb4, 0x07, 0x2a, 0x7e, 0xb3, 0x2a, 0x17, 0x60, + 0x24, 0x7c, 0x0b, 0x7e, 0x13, 0x2a, 0x18, 0x7e, 0x17, 0x2a, 0x19, 0x75, 0x2f, 0x73, 0x12, 0x7e, + 0x30, 0x7a, 0x01, 0x2f, 0x12, 0x7e, 0x30, 0x7a, 0x11, 0x2f, 0x12, 0x7e, 0x30, 0x12, 0x7d, 0x7a, + 0x40, 0x03, 0x02, 0x78, 0x7f, 0x02, 0x7d, 0x44, 0x7e, 0xb3, 0x2a, 0x16, 0xb4, 0x0b, 0xf6, 0x75, + 0x2f, 0x7d, 0x12, 0x7e, 0x30, 0x7e, 0xb3, 0x2a, 0x18, 0x7e, 0xa3, 0x2a, 0x1a, 0x4c, 0xab, 0x78, + 0xe4, 0x80, 0xdf, 0x7e, 0xb3, 0x2a, 0x16, 0xb4, 0x0a, 0xdb, 0x75, 0x2f, 0x7e, 0x12, 0x7e, 0x30, + 0x7e, 0xb3, 0x2a, 0x18, 0x70, 0xcf, 0xf5, 0xf3, 0x75, 0xf6, 0x01, 0x22, 0x02, 0x7d, 0x44, 0x02, + 0x7d, 0x44, 0x02, 0x7d, 0x44, 0x7e, 0xb3, 0x2a, 0x16, 0xb4, 0x04, 0x20, 0x75, 0x2f, 0xc3, 0x12, + 0x7e, 0x30, 0x7e, 0x04, 0x00, 0x01, 0x7e, 0x17, 0x2a, 0x17, 0x7e, 0x18, 0x2a, 0x26, 0x7a, 0x1c, + 0x00, 0x00, 0x7e, 0x47, 0x2a, 0x1b, 0x12, 0x7e, 0x3c, 0x02, 0x7c, 0xe3, 0xb4, 0x06, 0x3a, 0x75, + 0x2f, 0xc1, 0x12, 0x7e, 0x30, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0xfe, 0x7d, 0xca, 0x7e, + 0xd7, 0x2a, 0x17, 0x7e, 0x78, 0x2a, 0x26, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x77, 0x2a, 0x1b, 0x75, + 0x2f, 0xc1, 0x12, 0x7e, 0x30, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x12, 0x7e, + 0x75, 0xd0, 0x87, 0xd0, 0xa8, 0x40, 0x4f, 0x80, 0x4a, 0xb4, 0x00, 0x1c, 0xc2, 0xaf, 0xa9, 0xd5, + 0x87, 0x12, 0x78, 0x7f, 0xe4, 0x8d, 0xef, 0x8d, 0xef, 0x8d, 0xef, 0xd5, 0xe0, 0xf7, 0xc0, 0xd1, + 0xca, 0x02, 0xff, 0xca, 0x06, 0x00, 0x00, 0x32, 0xb4, 0x09, 0x12, 0x7e, 0x57, 0x2a, 0x17, 0x4d, + 0x55, 0x68, 0x05, 0xa9, 0xd2, 0xb1, 0x80, 0x03, 0xa9, 0xc2, 0xb1, 0x80, 0x16, 0xb4, 0x07, 0x16, + 0xc2, 0xaf, 0x7e, 0x07, 0x2a, 0x19, 0x7e, 0x17, 0x2a, 0x17, 0xc0, 0xd1, 0xca, 0x18, 0xca, 0x38, + 0xca, 0x28, 0x32, 0x02, 0x78, 0x7f, 0x02, 0x7d, 0x44, 0x7e, 0xb3, 0x2a, 0x16, 0xb4, 0x03, 0x15, + 0x75, 0x2f, 0xc2, 0x12, 0x7e, 0x30, 0x7e, 0x04, 0x00, 0x01, 0x7e, 0x17, 0x2a, 0x17, 0x7e, 0x57, + 0x2a, 0x1b, 0x02, 0x78, 0x83, 0xb4, 0x05, 0x39, 0x75, 0x2f, 0xc0, 0x12, 0x7e, 0x30, 0xc0, 0xa8, + 0xc0, 0x87, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x7e, 0x08, 0x2a, 0x26, 0x7a, 0x0c, 0x00, 0x00, 0x7e, + 0x24, 0x00, 0xfe, 0x7e, 0x37, 0x2a, 0x17, 0x7e, 0x47, 0x2a, 0x1b, 0x12, 0x7e, 0x3c, 0xd0, 0x87, + 0xd0, 0xa8, 0x7e, 0x08, 0x2a, 0x26, 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x57, 0x2a, 0x1b, 0x02, 0x78, + 0x83, 0x02, 0x7d, 0x44, 0x75, 0x2f, 0x07, 0x12, 0x7e, 0x30, 0x43, 0xe1, 0xc0, 0x22, 0xc0, 0xa8, + 0xc0, 0x87, 0xc2, 0xaf, 0xa9, 0xd5, 0x87, 0x12, 0x7d, 0xb9, 0x40, 0x19, 0x7e, 0x08, 0x2a, 0x26, + 0x7a, 0x0c, 0x00, 0x00, 0xca, 0x0b, 0xca, 0x49, 0x12, 0x7e, 0x3c, 0xda, 0x59, 0xda, 0x0b, 0xd0, + 0x87, 0xd0, 0xa8, 0xc3, 0x22, 0xd0, 0x87, 0xd0, 0xa8, 0x22, 0xc0, 0xa8, 0xc0, 0x87, 0xc2, 0xaf, + 0xa9, 0xd5, 0x87, 0x12, 0x7d, 0xb9, 0x40, 0x2b, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0xfe, + 0x7f, 0x61, 0x7e, 0x78, 0x2a, 0x26, 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x77, 0x2a, 0x1b, 0xbd, 0x74, + 0x78, 0x11, 0x75, 0x2f, 0xc1, 0x12, 0x7e, 0x30, 0x12, 0x7e, 0x75, 0x40, 0x06, 0xd0, 0x87, 0xd0, + 0xa8, 0xc3, 0x22, 0xd0, 0x87, 0xd0, 0xa8, 0xd3, 0x22, 0x7e, 0x24, 0x00, 0xfe, 0x7e, 0x34, 0x7f, + 0xca, 0x0b, 0x1a, 0x50, 0xc5, 0xf0, 0x7d, 0x62, 0x7d, 0x75, 0x7d, 0x87, 0x7e, 0x34, 0x7f, 0xc2, + 0x7e, 0x1b, 0xb0, 0x7e, 0x34, 0x7f, 0x03, 0xb4, 0x01, 0x04, 0x7e, 0x34, 0x7f, 0xcc, 0x7e, 0x1b, + 0xb0, 0xbc, 0x0b, 0x50, 0x49, 0x3e, 0x00, 0x3e, 0x00, 0x0a, 0x50, 0x2d, 0x75, 0x0b, 0x3a, 0x30, + 0x69, 0x53, 0x00, 0x02, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbc, 0x1b, 0x50, 0x30, 0x3e, 0x10, + 0x3e, 0x10, 0x0a, 0x51, 0x2d, 0x35, 0x69, 0x41, 0x00, 0x02, 0x0b, 0x1a, 0x30, 0xbd, 0x38, 0x50, + 0x02, 0x2d, 0x38, 0xbe, 0x44, 0xff, 0xff, 0x78, 0x05, 0x7e, 0x1b, 0x90, 0x0a, 0x49, 0x4d, 0x44, + 0x68, 0x0c, 0xbe, 0x44, 0x00, 0xff, 0x28, 0x04, 0x7e, 0x44, 0x00, 0xff, 0xc3, 0x22, 0xd3, 0x22, + +// Segment #15, Start Address 00ff7fc6, Length 4 +0xff,0x00,0xc6,0x7f,0x04,0x00, + 0x01, 0x0c, 0x03, 0x00, + +// Segment #16, Start Address 00ff7e30, Length 315 +0xff,0x00,0x30,0x7e,0x3b,0x01, + 0xca, 0x08, 0x7e, 0x01, 0x2f, 0x7a, 0x03, 0x3f, 0xf0, 0xda, 0x08, 0x22, 0x7e, 0x1b, 0xc0, 0x7a, + 0x0b, 0xc0, 0x0b, 0x14, 0x0b, 0x34, 0x1b, 0x44, 0x78, 0xf2, 0x22, 0x7f, 0x6f, 0x7f, 0xf0, 0x1b, + 0xfc, 0x7c, 0x54, 0x7d, 0x32, 0x80, 0x08, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0x9e, + 0x44, 0x00, 0x10, 0x50, 0xf2, 0x2e, 0x44, 0x00, 0x10, 0x68, 0x06, 0xca, 0x48, 0x1b, 0x44, 0x78, + 0xfa, 0x7f, 0xf6, 0x89, 0xe4, 0xca, 0x6b, 0x5e, 0xd4, 0x00, 0x3f, 0x68, 0x20, 0x7e, 0x84, 0x00, + 0x40, 0x9d, 0x8d, 0xda, 0x6b, 0xbd, 0x87, 0x38, 0x16, 0xca, 0x79, 0x7d, 0x78, 0x12, 0x7e, 0x9f, + 0xda, 0x79, 0x40, 0x08, 0x9d, 0x78, 0x68, 0x02, 0x80, 0x05, 0xc2, 0xd7, 0x22, 0xda, 0x6b, 0x43, + 0x90, 0x30, 0x74, 0xaa, 0x39, 0xb5, 0x55, 0x55, 0x74, 0x55, 0x39, 0xb5, 0x2a, 0xaa, 0x74, 0xa0, + 0x39, 0xb5, 0x55, 0x55, 0x7e, 0x04, 0x00, 0x40, 0x9d, 0x70, 0x50, 0x06, 0x2d, 0x70, 0x7d, 0x07, + 0x6d, 0x77, 0x7c, 0x31, 0x7e, 0x7b, 0x00, 0x7a, 0x6b, 0x00, 0x0b, 0x7c, 0x0b, 0x6c, 0xa5, 0xd9, + 0xf3, 0x7f, 0x16, 0x1b, 0x1c, 0x7e, 0x54, 0x27, 0x10, 0x7e, 0x1b, 0x10, 0xbc, 0x10, 0x68, 0x06, + 0x1b, 0x54, 0x78, 0xf5, 0x80, 0x2c, 0x6d, 0x00, 0x7c, 0x20, 0x7f, 0x16, 0x9f, 0x10, 0x7f, 0x27, + 0x9f, 0x20, 0x7e, 0x2b, 0x00, 0x7e, 0x1b, 0x10, 0xbc, 0x01, 0x78, 0x16, 0x0b, 0x2c, 0x0b, 0x1c, + 0xa5, 0xdb, 0xef, 0x7c, 0xb6, 0x20, 0xe0, 0x03, 0x63, 0x90, 0x30, 0x4d, 0x77, 0x78, 0x93, 0xc2, + 0xd7, 0x22, 0xd2, 0xd7, 0x22, 0x00, 0x04, 0x00, 0x04, 0x00, 0x00, 0x06, 0x04, 0x02, 0x04, 0x00, + 0x02, 0x01, 0x04, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, + 0x02, 0x02, 0x04, 0x00, 0x08, 0x10, 0x02, 0x10, 0x04, 0x02, 0x08, 0x00, 0x01, 0x01, 0x08, 0x7e, + 0x18, 0x7f, 0xbd, 0x7a, 0x1c, 0x00, 0xfe, 0x0b, 0x1a, 0x00, 0xbe, 0x10, 0x14, 0x38, 0x1a, 0x0a, + 0x51, 0x23, 0x7e, 0x18, 0x7f, 0x15, 0x7a, 0x1c, 0x00, 0xff, 0x2d, 0x35, 0x0b, 0x1a, 0x50, 0x60, + 0x08, 0xa5, 0xb8, 0x02, 0x03, 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe, +}; + +static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = { + 1, 12, 3 }; // Major, Minor, Build + +#undef IMAGE_VERSION_NAME + +#undef IMAGE_ARRAY_NAME + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/io_fw_down2.h linux.20p6/drivers/usb/serial/io_fw_down2.h --- linux.vanilla/drivers/usb/serial/io_fw_down2.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/usb/serial/io_fw_down2.h Mon Jun 18 08:11:10 2001 @@ -0,0 +1,1135 @@ +//************************************************************** +//* Edgeport/4 Binary Image +//* Generated by HEX2C v1.06 +//* Copyright(c) 1998 Inside Out Networks, 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. +//************************************************************** + + +//Image structure definition +#if !defined(DEFINED_EDGE_FIRMWARE_IMAGE_RECORD) + #define DEFINED_EDGE_FIRMWARE_IMAGE_RECORD + typedef struct _EDGE_FIRMWARE_IMAGE_RECORD + { + unsigned short ExtAddr; + unsigned short Addr; + unsigned short Len; + unsigned char Data[0]; + } EDGE_FIRMWARE_IMAGE_RECORD, *PEDGE_FIRMWARE_IMAGE_RECORD; + + typedef struct _EDGE_FIRMWARE_VERSION_INFO + { + unsigned char MajorVersion; + unsigned char MinorVersion; + unsigned short BuildNumber; + } EDGE_FIRMWARE_VERSION_INFO, *PEDGE_FIRMWARE_VERSION_INFO; + +#endif + +#if !defined(IMAGE_ARRAY_NAME) + #define IMAGE_ARRAY_NAME FirmwareImage + #define IMAGE_VERSION_NAME FirmwareImageVersion +#endif + +static unsigned char IMAGE_ARRAY_NAME[] = { + +// Segment #1, Start Address 00ff0000, Length 6 +0xff,0x00,0x00,0x00,0x06,0x00, + 0x02, 0x00, 0x80, 0x02, 0x45, 0x14, + +// Segment #2, Start Address 00ff000b, Length 3 +0xff,0x00,0x0b,0x00,0x03,0x00, + 0x02, 0x44, 0xa5, + +// Segment #3, Start Address 00ff0013, Length 3 +0xff,0x00,0x13,0x00,0x03,0x00, + 0x02, 0x63, 0xab, + +// Segment #4, Start Address 00ff001b, Length 3 +0xff,0x00,0x1b,0x00,0x03,0x00, + 0x02, 0x00, 0x1b, + +// Segment #5, Start Address 00ff0023, Length 3 +0xff,0x00,0x23,0x00,0x03,0x00, + 0x02, 0x00, 0x23, + +// Segment #6, Start Address 00ff002b, Length 3 +0xff,0x00,0x2b,0x00,0x03,0x00, + 0x02, 0x00, 0x2b, + +// Segment #7, Start Address 00ff0033, Length 3 +0xff,0x00,0x33,0x00,0x03,0x00, + 0x02, 0x00, 0x33, + +// Segment #8, Start Address 00ff003b, Length 3 +0xff,0x00,0x3b,0x00,0x03,0x00, + 0x02, 0x00, 0x3b, + +// Segment #9, Start Address 00ff0043, Length 3 +0xff,0x00,0x43,0x00,0x03,0x00, + 0x02, 0x00, 0x43, + +// Segment #10, Start Address 00ff004b, Length 3 +0xff,0x00,0x4b,0x00,0x03,0x00, + 0x02, 0x00, 0x4b, + +// Segment #11, Start Address 00ff0053, Length 3 +0xff,0x00,0x53,0x00,0x03,0x00, + 0x02, 0x67, 0x5f, + +// Segment #12, Start Address 00ff007b, Length 3 +0xff,0x00,0x7b,0x00,0x03,0x00, + 0x02, 0x00, 0x7b, + +// Segment #13, Start Address 00ff0080, Length 7 +0xff,0x00,0x80,0x00,0x07,0x00, + 0x7e, 0x14, 0x00, 0x00, 0x02, 0x40, 0x52, + +// Segment #14, Start Address 00ff3000, Length 2918 +0xff,0x00,0x00,0x30,0x66,0x0b, + 0x12, 0x30, 0x64, 0x12, 0x30, 0xff, 0x12, 0x31, 0x2f, 0x12, 0x30, 0xb0, 0x80, 0xf2, 0xe5, 0x23, + 0x60, 0x19, 0x7e, 0x14, 0x00, 0x00, 0x09, 0xb1, 0x01, 0xb9, 0xb4, 0x00, 0x02, 0x80, 0x05, 0x14, + 0x19, 0xb1, 0x01, 0xb9, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, 0x78, 0xeb, 0x22, 0xc2, 0xaf, 0x7e, 0xb3, + 0x3f, 0xf1, 0xb4, 0x01, 0x03, 0x12, 0x65, 0x67, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0x7e, 0xb3, 0x3f, + 0xf1, 0xb4, 0x01, 0x1d, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0xb3, 0x91, 0x1a, 0x6c, 0xaa, + 0x60, 0x0f, 0xca, 0x0b, 0xca, 0x39, 0xca, 0x59, 0x12, 0x64, 0x24, 0xda, 0x59, 0xda, 0x39, 0xda, + 0x0b, 0xd2, 0xaf, 0x22, 0xc2, 0xaf, 0xe5, 0x22, 0x60, 0x43, 0x7e, 0x07, 0x01, 0xcb, 0xbe, 0x04, + 0x03, 0x80, 0x38, 0x39, 0x7e, 0x04, 0x80, 0x00, 0x7e, 0x20, 0x00, 0x13, 0x50, 0x21, 0x09, 0xa0, + 0x00, 0x04, 0x4e, 0xa0, 0x05, 0x19, 0xa0, 0x00, 0x04, 0x0a, 0x32, 0x09, 0x53, 0x35, 0x33, 0x5e, + 0x51, 0x27, 0x68, 0x0b, 0x09, 0xa0, 0x00, 0x10, 0x4e, 0xa0, 0x01, 0x19, 0xa0, 0x00, 0x10, 0x2e, + 0x04, 0x01, 0x00, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, 0x78, 0xd1, 0x75, 0x22, 0x00, 0xd2, 0xaf, 0x22, + 0xc2, 0xaf, 0xe5, 0x26, 0x60, 0x36, 0x7e, 0x20, 0x00, 0x7e, 0x30, 0x01, 0xe5, 0x26, 0xa5, 0x5b, + 0x68, 0x21, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x32, 0x01, 0x79, 0xbe, 0x34, 0x00, 0x00, 0x68, + 0x12, 0x7e, 0xb1, 0x21, 0xa5, 0x4b, 0x7a, 0xb1, 0x21, 0xca, 0x19, 0x49, 0x22, 0x30, 0xef, 0x99, + 0x24, 0xda, 0x19, 0x3e, 0x30, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, 0x78, 0xd0, 0xd2, 0xaf, 0x22, 0x46, + 0x4f, 0x49, 0x7c, 0x4c, 0xa9, 0x4f, 0xd6, 0x53, 0x03, 0x56, 0x30, 0x59, 0x5d, 0x5c, 0x8a, 0xc2, + 0xaf, 0xe5, 0x24, 0x60, 0x14, 0x7e, 0x20, 0x00, 0x13, 0x50, 0x07, 0xca, 0xb8, 0x12, 0x31, 0x1c, + 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, 0x78, 0xef, 0xd2, 0xaf, 0x22, 0xca, 0x28, 0x12, 0x35, + 0x4c, 0xda, 0x28, 0x40, 0x09, 0x0a, 0x22, 0x09, 0xb2, 0x35, 0x33, 0xf4, 0x52, 0x24, 0x22, 0xc2, + 0xaf, 0xe5, 0x23, 0x60, 0x14, 0x7e, 0x20, 0x00, 0x13, 0x50, 0x07, 0xca, 0xb8, 0x12, 0x31, 0x4c, + 0xda, 0xb8, 0xa5, 0x0a, 0xbe, 0x21, 0x2e, 0x78, 0xef, 0xd2, 0xaf, 0x22, 0x7c, 0xb2, 0x23, 0x0a, + 0x2b, 0x49, 0x22, 0x31, 0x57, 0x89, 0x24, 0x31, 0x67, 0x31, 0xd0, 0x32, 0x39, 0x32, 0xa2, 0x33, + 0x0b, 0x33, 0x74, 0x33, 0xdd, 0x34, 0x46, 0x7e, 0x27, 0x01, 0x79, 0xbe, 0x24, 0x00, 0x00, 0x78, + 0x24, 0x7e, 0x24, 0x80, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, + 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x49, 0x45, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, + 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, 0x89, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x89, 0x7e, + 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xb9, 0x80, 0x27, 0x7e, 0x63, 0x01, 0xb9, 0xa5, 0xbe, 0x00, 0x1f, + 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, 0xc8, 0x12, 0x61, 0x36, 0x40, 0x11, 0x75, 0x2f, + 0xb3, 0x12, 0x73, 0x35, 0xc2, 0x18, 0x6c, 0x00, 0x7a, 0x03, 0x01, 0xb9, 0x12, 0x64, 0x86, 0x22, + 0x7e, 0x27, 0x01, 0x7b, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x81, 0x00, 0x09, 0xb2, + 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, + 0x4c, 0x72, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, + 0x01, 0x8b, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x8b, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xba, 0x80, + 0x27, 0x7e, 0x63, 0x01, 0xba, 0xa5, 0xbe, 0x00, 0x1f, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, + 0xa0, 0xc8, 0x12, 0x61, 0x36, 0x40, 0x11, 0x75, 0x2f, 0xb3, 0x12, 0x73, 0x35, 0xc2, 0x19, 0x6c, + 0x00, 0x7a, 0x03, 0x01, 0xba, 0x12, 0x64, 0x86, 0x22, 0x7e, 0x27, 0x01, 0x7d, 0xbe, 0x24, 0x00, + 0x00, 0x78, 0x24, 0x7e, 0x24, 0x82, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, + 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x4f, 0x9f, 0x7d, 0x21, 0xda, 0x19, 0x30, + 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, 0x8d, 0x68, 0x0d, 0x7a, 0x27, 0x01, + 0x8d, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xbb, 0x80, 0x27, 0x7e, 0x63, 0x01, 0xbb, 0xa5, 0xbe, + 0x00, 0x1f, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, 0xc8, 0x12, 0x61, 0x36, 0x40, 0x11, + 0x75, 0x2f, 0xb3, 0x12, 0x73, 0x35, 0xc2, 0x1a, 0x6c, 0x00, 0x7a, 0x03, 0x01, 0xbb, 0x12, 0x64, + 0x86, 0x22, 0x7e, 0x27, 0x01, 0x7f, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x83, 0x00, + 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, + 0x12, 0x12, 0x52, 0xcc, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, + 0xbe, 0x27, 0x01, 0x8f, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x8f, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, + 0xbc, 0x80, 0x27, 0x7e, 0x63, 0x01, 0xbc, 0xa5, 0xbe, 0x00, 0x1f, 0x7e, 0x60, 0x01, 0x7e, 0xb0, + 0x00, 0x7e, 0xa0, 0xc8, 0x12, 0x61, 0x36, 0x40, 0x11, 0x75, 0x2f, 0xb3, 0x12, 0x73, 0x35, 0xc2, + 0x1b, 0x6c, 0x00, 0x7a, 0x03, 0x01, 0xbc, 0x12, 0x64, 0x86, 0x22, 0x7e, 0x27, 0x01, 0x81, 0xbe, + 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x84, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, + 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x55, 0xf9, 0x7d, 0x21, 0xda, + 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, 0x91, 0x68, 0x0d, 0x7a, + 0x27, 0x01, 0x91, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xbd, 0x80, 0x27, 0x7e, 0x63, 0x01, 0xbd, + 0xa5, 0xbe, 0x00, 0x1f, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, 0xc8, 0x12, 0x61, 0x36, + 0x40, 0x11, 0x75, 0x2f, 0xb3, 0x12, 0x73, 0x35, 0xc2, 0x1c, 0x6c, 0x00, 0x7a, 0x03, 0x01, 0xbd, + 0x12, 0x64, 0x86, 0x22, 0x7e, 0x27, 0x01, 0x83, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, + 0x85, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, + 0x19, 0x7d, 0x12, 0x12, 0x59, 0x26, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, + 0x80, 0x1e, 0xbe, 0x27, 0x01, 0x93, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x93, 0x7e, 0x60, 0x9c, 0x7a, + 0x63, 0x01, 0xbe, 0x80, 0x27, 0x7e, 0x63, 0x01, 0xbe, 0xa5, 0xbe, 0x00, 0x1f, 0x7e, 0x60, 0x01, + 0x7e, 0xb0, 0x00, 0x7e, 0xa0, 0xc8, 0x12, 0x61, 0x36, 0x40, 0x11, 0x75, 0x2f, 0xb3, 0x12, 0x73, + 0x35, 0xc2, 0x1d, 0x6c, 0x00, 0x7a, 0x03, 0x01, 0xbe, 0x12, 0x64, 0x86, 0x22, 0x7e, 0x27, 0x01, + 0x85, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, 0x7e, 0x24, 0x86, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, + 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x5c, 0x53, 0x7d, + 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, 0x95, 0x68, + 0x0d, 0x7a, 0x27, 0x01, 0x95, 0x7e, 0x60, 0x9c, 0x7a, 0x63, 0x01, 0xbf, 0x80, 0x27, 0x7e, 0x63, + 0x01, 0xbf, 0xa5, 0xbe, 0x00, 0x1f, 0x7e, 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, 0xc8, 0x12, + 0x61, 0x36, 0x40, 0x11, 0x75, 0x2f, 0xb3, 0x12, 0x73, 0x35, 0xc2, 0x1e, 0x6c, 0x00, 0x7a, 0x03, + 0x01, 0xbf, 0x12, 0x64, 0x86, 0x22, 0x7e, 0x27, 0x01, 0x87, 0xbe, 0x24, 0x00, 0x00, 0x78, 0x24, + 0x7e, 0x24, 0x87, 0x00, 0x09, 0xb2, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, + 0x0b, 0xca, 0x19, 0x7d, 0x12, 0x12, 0x5f, 0x80, 0x7d, 0x21, 0xda, 0x19, 0x30, 0xe6, 0x18, 0x7e, + 0x60, 0x00, 0x80, 0x1e, 0xbe, 0x27, 0x01, 0x97, 0x68, 0x0d, 0x7a, 0x27, 0x01, 0x97, 0x7e, 0x60, + 0x9c, 0x7a, 0x63, 0x01, 0xc0, 0x80, 0x27, 0x7e, 0x63, 0x01, 0xc0, 0xa5, 0xbe, 0x00, 0x1f, 0x7e, + 0x60, 0x01, 0x7e, 0xb0, 0x00, 0x7e, 0xa0, 0xc8, 0x12, 0x61, 0x36, 0x40, 0x11, 0x75, 0x2f, 0xb3, + 0x12, 0x73, 0x35, 0xc2, 0x1f, 0x6c, 0x00, 0x7a, 0x03, 0x01, 0xc0, 0x12, 0x64, 0x86, 0x22, 0xc2, + 0xaf, 0x7e, 0x07, 0x01, 0xcb, 0xbe, 0x04, 0x00, 0x00, 0x78, 0x28, 0x74, 0x20, 0x7a, 0xb3, 0x91, + 0x00, 0x7e, 0xb3, 0x91, 0x15, 0x30, 0xe5, 0x1b, 0x7e, 0xb3, 0x91, 0x1a, 0xbe, 0xb0, 0x3f, 0x38, + 0x0c, 0x85, 0x31, 0x2f, 0x12, 0x73, 0x35, 0x74, 0x80, 0x7a, 0xb3, 0x91, 0x1e, 0x74, 0x20, 0x7a, + 0xb3, 0x91, 0x15, 0xd2, 0xaf, 0x22, 0x35, 0x3b, 0x36, 0xe8, 0x37, 0x00, 0x37, 0x1b, 0x37, 0xb6, + 0x38, 0x4e, 0x38, 0x69, 0x38, 0xfb, 0x38, 0x84, 0x38, 0xc5, 0x7c, 0xb3, 0xbe, 0xb0, 0x09, 0x28, + 0x22, 0x75, 0x2f, 0x09, 0x12, 0x73, 0x35, 0x75, 0x57, 0x02, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x00, + 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x11, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x01, 0x7a, 0xb3, + 0x91, 0x11, 0x22, 0xc0, 0xa8, 0xc2, 0xaf, 0x23, 0x6c, 0xaa, 0x2e, 0x54, 0x34, 0xe6, 0x0b, 0x58, + 0x50, 0x89, 0x54, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x75, 0x2f, 0xb0, 0x12, 0x73, + 0x35, 0x0a, 0x22, 0x09, 0xb2, 0x35, 0x33, 0x42, 0x24, 0xd0, 0xa8, 0x22, 0x7c, 0xb2, 0x23, 0x0a, + 0x3b, 0x49, 0x33, 0x35, 0x57, 0x89, 0x34, 0x35, 0x67, 0x35, 0x95, 0x35, 0xc3, 0x35, 0xf1, 0x36, + 0x1f, 0x36, 0x4d, 0x36, 0x7b, 0x36, 0xa9, 0x12, 0x41, 0xba, 0xd2, 0x28, 0xd2, 0x08, 0xc2, 0x40, + 0xc2, 0x48, 0xc2, 0x38, 0xc2, 0x30, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xb9, 0x7e, 0x04, 0x00, 0x20, + 0x7a, 0x07, 0x01, 0x99, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xa9, 0x12, 0x41, 0x27, 0x12, + 0x5f, 0xb7, 0x02, 0x36, 0xd7, 0x12, 0x41, 0xd7, 0xd2, 0x29, 0xd2, 0x09, 0xc2, 0x41, 0xc2, 0x49, + 0xc2, 0x39, 0xc2, 0x31, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xba, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, + 0x01, 0x9b, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xab, 0x12, 0x41, 0x27, 0x12, 0x5f, 0xe0, + 0x02, 0x36, 0xd7, 0x12, 0x41, 0xf4, 0xd2, 0x2a, 0xd2, 0x0a, 0xc2, 0x42, 0xc2, 0x4a, 0xc2, 0x3a, + 0xc2, 0x32, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xbb, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0x9d, + 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xad, 0x12, 0x41, 0x27, 0x12, 0x60, 0x09, 0x02, 0x36, + 0xd7, 0x12, 0x42, 0x11, 0xd2, 0x2b, 0xd2, 0x0b, 0xc2, 0x43, 0xc2, 0x4b, 0xc2, 0x3b, 0xc2, 0x33, + 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xbc, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0x9f, 0x7e, 0x04, + 0x00, 0x38, 0x7a, 0x07, 0x01, 0xaf, 0x12, 0x41, 0x27, 0x12, 0x60, 0x32, 0x02, 0x36, 0xd7, 0x12, + 0x42, 0x2e, 0xd2, 0x2c, 0xd2, 0x0c, 0xc2, 0x44, 0xc2, 0x4c, 0xc2, 0x3c, 0xc2, 0x34, 0x6d, 0x00, + 0x7a, 0x03, 0x01, 0xbd, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xa1, 0x7e, 0x04, 0x00, 0x38, + 0x7a, 0x07, 0x01, 0xb1, 0x12, 0x41, 0x27, 0x12, 0x60, 0x5b, 0x02, 0x36, 0xd7, 0x12, 0x42, 0x4b, + 0xd2, 0x2d, 0xd2, 0x0d, 0xc2, 0x45, 0xc2, 0x4d, 0xc2, 0x3d, 0xc2, 0x35, 0x6d, 0x00, 0x7a, 0x03, + 0x01, 0xbe, 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xa3, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, + 0x01, 0xb3, 0x12, 0x41, 0x27, 0x12, 0x60, 0x84, 0x02, 0x36, 0xd7, 0x12, 0x42, 0x68, 0xd2, 0x2e, + 0xd2, 0x0e, 0xc2, 0x46, 0xc2, 0x4e, 0xc2, 0x3e, 0xc2, 0x36, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xbf, + 0x7e, 0x04, 0x00, 0x20, 0x7a, 0x07, 0x01, 0xa5, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xb5, + 0x12, 0x41, 0x27, 0x12, 0x60, 0xad, 0x02, 0x36, 0xd7, 0x12, 0x42, 0x85, 0xd2, 0x2f, 0xd2, 0x0f, + 0xc2, 0x47, 0xc2, 0x4f, 0xc2, 0x3f, 0xc2, 0x37, 0x6d, 0x00, 0x7a, 0x03, 0x01, 0xc0, 0x7e, 0x04, + 0x00, 0x20, 0x7a, 0x07, 0x01, 0xa7, 0x7e, 0x04, 0x00, 0x38, 0x7a, 0x07, 0x01, 0xb7, 0x12, 0x41, + 0x27, 0x12, 0x60, 0xd6, 0x02, 0x36, 0xd7, 0x7e, 0xa0, 0xd0, 0x7e, 0x60, 0x0f, 0x12, 0x61, 0x36, + 0x40, 0x05, 0x12, 0x64, 0x86, 0xc2, 0xd7, 0x22, 0x75, 0x2f, 0xb1, 0x12, 0x73, 0x35, 0x0a, 0x52, + 0x23, 0x6d, 0x00, 0x59, 0x05, 0x00, 0x32, 0x12, 0x41, 0x83, 0x12, 0x41, 0x9f, 0xd0, 0xa8, 0x22, + 0x75, 0x2f, 0xb2, 0x12, 0x73, 0x35, 0x0a, 0x22, 0x09, 0xb2, 0x35, 0x33, 0x42, 0x23, 0x7e, 0xb0, + 0x9c, 0x19, 0xb2, 0x01, 0xb9, 0x12, 0x31, 0x4c, 0xd0, 0xa8, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, + 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x08, 0x19, + 0x30, 0x00, 0x0c, 0x7c, 0x74, 0x5e, 0x70, 0x01, 0x68, 0x12, 0x44, 0x40, 0xca, 0xb8, 0x09, 0xb0, + 0x00, 0x10, 0x44, 0x02, 0x19, 0xb0, 0x00, 0x10, 0xda, 0xb8, 0x80, 0x02, 0x54, 0xbf, 0x7c, 0x74, + 0x5e, 0x70, 0x08, 0x68, 0x04, 0x44, 0x08, 0x80, 0x02, 0x54, 0xf7, 0x09, 0x30, 0x00, 0x0c, 0xca, + 0xb8, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0xda, 0xb8, 0x19, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00, + 0x0c, 0x0a, 0x62, 0x09, 0xb6, 0x35, 0x33, 0x3e, 0x20, 0x0a, 0x62, 0x7c, 0x74, 0x5e, 0x70, 0x02, + 0x68, 0x20, 0x42, 0x27, 0xca, 0xb8, 0x74, 0x61, 0x19, 0xb0, 0x00, 0x08, 0x7e, 0x44, 0x00, 0x10, + 0x59, 0x46, 0x01, 0xa9, 0x09, 0xb0, 0x00, 0x10, 0x44, 0x01, 0x19, 0xb0, 0x00, 0x10, 0xda, 0xb8, + 0x80, 0x11, 0xf4, 0x52, 0x27, 0x74, 0xa1, 0x19, 0xb0, 0x00, 0x08, 0x7e, 0x44, 0x00, 0x38, 0x59, + 0x46, 0x01, 0xa9, 0xd0, 0xa8, 0x22, 0x7c, 0x74, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30, + 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x08, 0x7c, 0x74, 0x5e, 0x70, + 0x01, 0x68, 0x04, 0x44, 0x80, 0x80, 0x02, 0x54, 0x7f, 0x7c, 0x74, 0x5e, 0x70, 0x08, 0x68, 0x04, + 0x44, 0x02, 0x80, 0x02, 0x54, 0xfd, 0x19, 0xb0, 0x00, 0x08, 0x19, 0x30, 0x00, 0x0c, 0x0a, 0x62, + 0x09, 0xb6, 0x35, 0x33, 0xa5, 0xfd, 0xf4, 0xa5, 0xfe, 0xca, 0x28, 0x3e, 0x20, 0x0a, 0x62, 0xda, + 0x28, 0x7c, 0x74, 0x5e, 0x70, 0x02, 0x68, 0x10, 0xa5, 0xed, 0x42, 0x28, 0x42, 0x26, 0x7e, 0x44, + 0x00, 0x08, 0x59, 0x46, 0x01, 0x99, 0x80, 0x04, 0xa5, 0xee, 0x52, 0x28, 0x7c, 0x74, 0x5e, 0x70, + 0x04, 0x68, 0x10, 0xa5, 0xed, 0x42, 0x29, 0x42, 0x26, 0x7e, 0x44, 0x00, 0x08, 0x59, 0x46, 0x01, + 0x99, 0x80, 0x15, 0xa5, 0xee, 0x52, 0x29, 0x7c, 0x74, 0x5e, 0x70, 0x02, 0x78, 0x0a, 0x52, 0x26, + 0x7e, 0x44, 0x00, 0x20, 0x59, 0x46, 0x01, 0x99, 0x12, 0x42, 0xa2, 0xd0, 0xa8, 0x22, 0x7e, 0x04, + 0x80, 0x00, 0x4c, 0x02, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x19, 0x40, + 0x00, 0x10, 0x19, 0x30, 0x00, 0x0c, 0xd0, 0xa8, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x09, + 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x19, 0x40, 0x00, 0x18, 0x19, 0x30, 0x00, + 0x0c, 0xd0, 0xa8, 0x22, 0x75, 0x2f, 0xb5, 0x12, 0x73, 0x35, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, + 0x09, 0xb0, 0x00, 0x0c, 0x44, 0x40, 0x19, 0xb0, 0x00, 0x0c, 0xe5, 0x58, 0xb4, 0x07, 0x23, 0x09, + 0xb0, 0x00, 0x10, 0x4e, 0xb0, 0x02, 0x19, 0xb0, 0x00, 0x10, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, + 0x19, 0xb0, 0x00, 0x0c, 0x09, 0xb0, 0x00, 0x04, 0x54, 0xf7, 0x19, 0xb0, 0x00, 0x04, 0x19, 0x30, + 0x00, 0x0c, 0xd0, 0xa8, 0x22, 0x75, 0x2f, 0xb6, 0x12, 0x73, 0x35, 0x7e, 0x04, 0x80, 0x00, 0x4c, + 0x02, 0xe5, 0x58, 0xb4, 0x07, 0x18, 0x09, 0x30, 0x00, 0x0c, 0x74, 0xbf, 0x19, 0xb0, 0x00, 0x0c, + 0x09, 0xb0, 0x00, 0x04, 0x44, 0x08, 0x19, 0xb0, 0x00, 0x04, 0x19, 0x30, 0x00, 0x0c, 0x09, 0xb0, + 0x00, 0x0c, 0x54, 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0xd0, 0xa8, 0x22, 0x75, 0x2f, 0xb4, 0x12, 0x73, + 0x35, 0x7a, 0x21, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x41, 0x2f, 0x12, 0x73, 0x35, 0x7e, 0xb0, 0x01, + 0x7e, 0xa0, 0xc8, 0x7c, 0x64, 0x12, 0x61, 0x36, 0x12, 0x64, 0x86, 0xd0, 0xa8, 0x22, 0x39, 0x2e, + 0x39, 0x75, 0x39, 0xbc, 0x3a, 0x03, 0x3a, 0x4a, 0x3a, 0x91, 0x3a, 0xd8, 0x3b, 0x1f, 0x75, 0x2f, + 0x55, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x7a, 0x61, 0x2f, 0x12, 0x73, 0x35, + 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0x7e, 0x17, 0x01, 0x69, 0x7e, 0x27, 0x01, 0x79, 0x2d, 0x23, + 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x08, 0x2c, 0x38, 0x0f, + 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x69, 0x7a, 0x27, 0x01, 0x79, 0x02, 0x46, 0x4f, 0x7e, + 0x14, 0x04, 0x2d, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x01, 0x12, 0x73, + 0x35, 0x7a, 0x61, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0x7e, 0x17, 0x01, + 0x6b, 0x7e, 0x27, 0x01, 0x7b, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, + 0x14, 0xbe, 0x14, 0x0c, 0x2c, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x6b, 0x7a, + 0x27, 0x01, 0x7b, 0x02, 0x49, 0x7c, 0x7e, 0x14, 0x08, 0x2d, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, + 0x73, 0x35, 0x75, 0x2f, 0x02, 0x12, 0x73, 0x35, 0x7a, 0x61, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x71, + 0x2f, 0x12, 0x73, 0x35, 0x7e, 0x17, 0x01, 0x6d, 0x7e, 0x27, 0x01, 0x7d, 0x2d, 0x23, 0x7e, 0x09, + 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x10, 0x2c, 0x38, 0x0f, 0x1b, 0x34, + 0x78, 0xec, 0x7a, 0x17, 0x01, 0x6d, 0x7a, 0x27, 0x01, 0x7d, 0x02, 0x4c, 0xa9, 0x7e, 0x14, 0x0c, + 0x2d, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x03, 0x12, 0x73, 0x35, 0x7a, + 0x61, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0x7e, 0x17, 0x01, 0x6f, 0x7e, + 0x27, 0x01, 0x7f, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, + 0x14, 0x14, 0x2c, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x6f, 0x7a, 0x27, 0x01, + 0x7f, 0x02, 0x4f, 0xd6, 0x7e, 0x14, 0x10, 0x2d, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x73, 0x35, + 0x75, 0x2f, 0x04, 0x12, 0x73, 0x35, 0x7a, 0x61, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, + 0x73, 0x35, 0x7e, 0x17, 0x01, 0x71, 0x7e, 0x27, 0x01, 0x81, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, + 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x18, 0x2c, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, + 0x7a, 0x17, 0x01, 0x71, 0x7a, 0x27, 0x01, 0x81, 0x02, 0x53, 0x03, 0x7e, 0x14, 0x14, 0x2d, 0x80, + 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x05, 0x12, 0x73, 0x35, 0x7a, 0x61, 0x2f, + 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0x7e, 0x17, 0x01, 0x73, 0x7e, 0x27, 0x01, + 0x83, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x1c, + 0x2c, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x73, 0x7a, 0x27, 0x01, 0x83, 0x02, + 0x56, 0x30, 0x7e, 0x14, 0x18, 0x2d, 0x80, 0xeb, 0x75, 0x2f, 0x55, 0x12, 0x73, 0x35, 0x75, 0x2f, + 0x06, 0x12, 0x73, 0x35, 0x7a, 0x61, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, + 0x7e, 0x17, 0x01, 0x75, 0x7e, 0x27, 0x01, 0x85, 0x2d, 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, + 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x20, 0x2c, 0x38, 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, + 0x01, 0x75, 0x7a, 0x27, 0x01, 0x85, 0x02, 0x59, 0x5d, 0x7e, 0x14, 0x1c, 0x2d, 0x80, 0xeb, 0x75, + 0x2f, 0x55, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x07, 0x12, 0x73, 0x35, 0x7a, 0x61, 0x2f, 0x12, 0x73, + 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0x7e, 0x17, 0x01, 0x77, 0x7e, 0x27, 0x01, 0x87, 0x2d, + 0x23, 0x7e, 0x09, 0xb0, 0x0b, 0x04, 0x7a, 0x19, 0xb0, 0x0b, 0x14, 0xbe, 0x14, 0x24, 0x2c, 0x38, + 0x0f, 0x1b, 0x34, 0x78, 0xec, 0x7a, 0x17, 0x01, 0x77, 0x7a, 0x27, 0x01, 0x87, 0x02, 0x5c, 0x8a, + 0x7e, 0x14, 0x20, 0x2d, 0x80, 0xeb, + +// Segment #15, Start Address 00ff4000, Length 13109 +0xff,0x00,0x00,0x40,0x35,0x33, + 0x7e, 0x04, 0x00, 0x01, 0x7e, 0x14, 0x7f, 0xf8, 0x7e, 0x24, 0x00, 0xfe, 0x7d, 0x31, 0x0b, 0x1a, + 0x50, 0x1b, 0x0a, 0x50, 0x7e, 0x14, 0x40, 0x1b, 0x02, 0x40, 0x74, 0x7e, 0xf8, 0x00, 0x59, 0x75, + 0xb0, 0xdf, 0x7e, 0xb0, 0x01, 0x7a, 0xb3, 0x90, 0x00, 0x7e, 0xf4, 0x40, 0x30, 0x02, 0x40, 0x8b, + 0x12, 0x74, 0x4e, 0xf5, 0x2e, 0x7a, 0xa1, 0x2d, 0x7a, 0x11, 0x58, 0x12, 0x6b, 0x02, 0x12, 0x40, + 0xeb, 0x7e, 0xb3, 0x3f, 0xf1, 0x60, 0x03, 0x12, 0x43, 0x79, 0x12, 0x6b, 0xde, 0xd2, 0xaf, 0x02, + 0x30, 0x00, 0x7e, 0x04, 0x00, 0xff, 0x7e, 0x18, 0x40, 0x60, 0x7a, 0x1c, 0x00, 0x01, 0x89, 0x18, + 0x7e, 0xb0, 0x01, 0x7a, 0xb3, 0x94, 0x00, 0x7a, 0xb3, 0x2c, 0x35, 0x7e, 0xb0, 0x01, 0x7a, 0xb3, + 0x93, 0x00, 0x89, 0x08, 0x7e, 0x04, 0x00, 0xff, 0x7e, 0x18, 0x40, 0x82, 0x7a, 0x1c, 0x00, 0x01, + 0x89, 0x18, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x93, 0x00, 0x89, 0x08, 0x7e, 0x08, 0x00, 0x20, 0x7e, + 0x44, 0x04, 0x00, 0x7e, 0x40, 0x00, 0x7e, 0xe4, 0x40, 0x9d, 0x02, 0x73, 0x50, 0x7e, 0x08, 0x01, + 0x59, 0x7e, 0x44, 0x2a, 0xdd, 0x7e, 0x40, 0x00, 0x7e, 0xe4, 0x40, 0xaf, 0x02, 0x73, 0x50, 0x7e, + 0x08, 0x00, 0x59, 0x7e, 0x44, 0x01, 0x00, 0x7e, 0x40, 0x53, 0x7e, 0xe4, 0x40, 0xc1, 0x02, 0x73, + 0x50, 0x75, 0x57, 0x01, 0x75, 0x56, 0x00, 0x7e, 0x04, 0x00, 0x08, 0x75, 0x54, 0x58, 0x75, 0x55, + 0x08, 0x75, 0x51, 0x08, 0x75, 0x53, 0x01, 0x75, 0x89, 0x01, 0x75, 0x8a, 0x01, 0x75, 0x8c, 0x00, + 0xd2, 0x8c, 0x7e, 0x04, 0x00, 0x02, 0x7a, 0x05, 0x42, 0x89, 0xf4, 0x75, 0xb7, 0x7f, 0x75, 0xb8, + 0x7f, 0x75, 0xb3, 0x01, 0x75, 0xb2, 0x01, 0xd2, 0xa9, 0x22, 0x75, 0xb0, 0xdf, 0xe4, 0xd5, 0xe0, + 0xfd, 0x75, 0xb0, 0xef, 0x7e, 0x24, 0x80, 0x00, 0x7e, 0x11, 0x2e, 0x7e, 0xa0, 0x08, 0x19, 0xa2, + 0x00, 0x10, 0x2e, 0x24, 0x01, 0x00, 0xa5, 0xd9, 0xf2, 0x7e, 0x20, 0x00, 0x12, 0x41, 0x83, 0x0b, + 0x20, 0xbe, 0x21, 0x2e, 0x78, 0xf6, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0x74, 0xbf, 0x19, + 0xb0, 0x00, 0x0c, 0x74, 0x10, 0x19, 0xb0, 0x00, 0x08, 0x74, 0x80, 0x19, 0xb0, 0x00, 0x0c, 0x7e, + 0x54, 0x00, 0x02, 0x19, 0xa0, 0x00, 0x04, 0x19, 0xb0, 0x00, 0x00, 0x74, 0x03, 0x19, 0xb0, 0x00, + 0x0c, 0x74, 0x07, 0x20, 0x68, 0x02, 0x74, 0x0f, 0x19, 0xb0, 0x00, 0x04, 0x30, 0x6b, 0x17, 0x74, + 0xbf, 0x19, 0xb0, 0x00, 0x0c, 0x74, 0x28, 0x20, 0x68, 0x02, 0x74, 0x20, 0x19, 0xb0, 0x00, 0x04, + 0x74, 0x03, 0x19, 0xb0, 0x00, 0x0c, 0x74, 0xa7, 0x19, 0xb0, 0x00, 0x08, 0x74, 0x0c, 0x19, 0xb0, + 0x00, 0x10, 0x22, 0x7e, 0x04, 0x80, 0x00, 0x4c, 0x02, 0xe4, 0x19, 0xb0, 0x00, 0x04, 0x09, 0xb0, + 0x00, 0x10, 0x54, 0x08, 0x19, 0xb0, 0x00, 0x10, 0x74, 0xa7, 0x19, 0xb0, 0x00, 0x08, 0x22, 0x7c, + 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x41, 0xaa, 0x89, 0x24, 0x41, 0xba, 0x41, 0xd7, 0x41, 0xf4, + 0x42, 0x11, 0x42, 0x2e, 0x42, 0x4b, 0x42, 0x68, 0x42, 0x85, 0xc2, 0x10, 0xc2, 0x18, 0xc2, 0x08, + 0x7e, 0x04, 0x04, 0x2d, 0x7a, 0x07, 0x01, 0x59, 0x7a, 0x07, 0x01, 0x69, 0x6d, 0x00, 0x7a, 0x07, + 0x01, 0x79, 0x7a, 0x07, 0x01, 0x89, 0x22, 0xc2, 0x11, 0xc2, 0x19, 0xc2, 0x09, 0x7e, 0x04, 0x08, + 0x2d, 0x7a, 0x07, 0x01, 0x5b, 0x7a, 0x07, 0x01, 0x6b, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x7b, 0x7a, + 0x07, 0x01, 0x8b, 0x22, 0xc2, 0x12, 0xc2, 0x1a, 0xc2, 0x0a, 0x7e, 0x04, 0x0c, 0x2d, 0x7a, 0x07, + 0x01, 0x5d, 0x7a, 0x07, 0x01, 0x6d, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x7d, 0x7a, 0x07, 0x01, 0x8d, + 0x22, 0xc2, 0x13, 0xc2, 0x1b, 0xc2, 0x0b, 0x7e, 0x04, 0x10, 0x2d, 0x7a, 0x07, 0x01, 0x5f, 0x7a, + 0x07, 0x01, 0x6f, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x7f, 0x7a, 0x07, 0x01, 0x8f, 0x22, 0xc2, 0x14, + 0xc2, 0x1c, 0xc2, 0x0c, 0x7e, 0x04, 0x14, 0x2d, 0x7a, 0x07, 0x01, 0x61, 0x7a, 0x07, 0x01, 0x71, + 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x81, 0x7a, 0x07, 0x01, 0x91, 0x22, 0xc2, 0x15, 0xc2, 0x1d, 0xc2, + 0x0d, 0x7e, 0x04, 0x18, 0x2d, 0x7a, 0x07, 0x01, 0x63, 0x7a, 0x07, 0x01, 0x73, 0x6d, 0x00, 0x7a, + 0x07, 0x01, 0x83, 0x7a, 0x07, 0x01, 0x93, 0x22, 0xc2, 0x16, 0xc2, 0x1e, 0xc2, 0x0e, 0x7e, 0x04, + 0x1c, 0x2d, 0x7a, 0x07, 0x01, 0x65, 0x7a, 0x07, 0x01, 0x75, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x85, + 0x7a, 0x07, 0x01, 0x95, 0x22, 0xc2, 0x17, 0xc2, 0x1f, 0xc2, 0x0f, 0x7e, 0x04, 0x20, 0x2d, 0x7a, + 0x07, 0x01, 0x67, 0x7a, 0x07, 0x01, 0x77, 0x6d, 0x00, 0x7a, 0x07, 0x01, 0x87, 0x7a, 0x07, 0x01, + 0x97, 0x22, 0x7c, 0xb2, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x42, 0xad, 0x89, 0x24, 0x42, 0xbd, 0x42, + 0xd4, 0x42, 0xeb, 0x43, 0x02, 0x43, 0x19, 0x43, 0x30, 0x43, 0x47, 0x43, 0x5e, 0x30, 0x40, 0x07, + 0x20, 0x58, 0x04, 0xc2, 0x28, 0x80, 0x0c, 0x30, 0x48, 0x07, 0x20, 0x50, 0x04, 0xc2, 0x28, 0x80, + 0x02, 0xd2, 0x28, 0x22, 0x30, 0x41, 0x07, 0x20, 0x59, 0x04, 0xc2, 0x29, 0x80, 0x0c, 0x30, 0x49, + 0x07, 0x20, 0x51, 0x04, 0xc2, 0x29, 0x80, 0x02, 0xd2, 0x29, 0x22, 0x30, 0x42, 0x07, 0x20, 0x5a, + 0x04, 0xc2, 0x2a, 0x80, 0x0c, 0x30, 0x4a, 0x07, 0x20, 0x52, 0x04, 0xc2, 0x2a, 0x80, 0x02, 0xd2, + 0x2a, 0x22, 0x30, 0x43, 0x07, 0x20, 0x5b, 0x04, 0xc2, 0x2b, 0x80, 0x0c, 0x30, 0x4b, 0x07, 0x20, + 0x53, 0x04, 0xc2, 0x2b, 0x80, 0x02, 0xd2, 0x2b, 0x22, 0x30, 0x44, 0x07, 0x20, 0x5c, 0x04, 0xc2, + 0x2c, 0x80, 0x0c, 0x30, 0x4c, 0x07, 0x20, 0x54, 0x04, 0xc2, 0x2c, 0x80, 0x02, 0xd2, 0x2c, 0x22, + 0x30, 0x45, 0x07, 0x20, 0x5d, 0x04, 0xc2, 0x2d, 0x80, 0x0c, 0x30, 0x4d, 0x07, 0x20, 0x55, 0x04, + 0xc2, 0x2d, 0x80, 0x02, 0xd2, 0x2d, 0x22, 0x30, 0x46, 0x07, 0x20, 0x5e, 0x04, 0xc2, 0x2e, 0x80, + 0x0c, 0x30, 0x4e, 0x07, 0x20, 0x56, 0x04, 0xc2, 0x2e, 0x80, 0x02, 0xd2, 0x2e, 0x22, 0x30, 0x47, + 0x07, 0x20, 0x5f, 0x04, 0xc2, 0x2f, 0x80, 0x0c, 0x30, 0x4f, 0x07, 0x20, 0x57, 0x04, 0xc2, 0x2f, + 0x80, 0x02, 0xd2, 0x2f, 0x22, 0x44, 0x66, 0x43, 0x8a, 0xbe, 0xb0, 0x02, 0x40, 0x01, 0x22, 0x23, + 0x0a, 0x5b, 0x49, 0x55, 0x43, 0x75, 0x99, 0x54, 0xd3, 0x22, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x94, + 0x00, 0x7a, 0xb3, 0x2c, 0x35, 0x12, 0x44, 0x7a, 0x7e, 0x04, 0x28, 0x2d, 0x7a, 0x07, 0x01, 0xc1, + 0x7a, 0x07, 0x01, 0xc3, 0x7e, 0x04, 0x24, 0x2d, 0x7a, 0x07, 0x01, 0xc7, 0x7a, 0x07, 0x01, 0xc9, + 0x7e, 0x04, 0x66, 0x7f, 0x7a, 0x05, 0x4b, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, + 0xb3, 0x91, 0x1c, 0x74, 0x12, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x07, 0x74, + 0x1e, 0x7a, 0xb3, 0x91, 0x10, 0x74, 0x48, 0x7a, 0xb3, 0x91, 0x12, 0x74, 0x10, 0x7a, 0xb3, 0x91, + 0x13, 0x74, 0x3f, 0x7a, 0xb3, 0x91, 0x14, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, + 0xb3, 0x91, 0x1c, 0x74, 0x14, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x07, 0x74, + 0x16, 0x7a, 0xb3, 0x91, 0x10, 0x74, 0x08, 0x7a, 0xb3, 0x91, 0x11, 0x74, 0x20, 0x7a, 0xb3, 0x91, + 0x13, 0x74, 0x3f, 0x7a, 0xb3, 0x91, 0x14, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, + 0xb3, 0x91, 0x1c, 0x74, 0x16, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x07, 0x74, + 0x2f, 0x7a, 0xb3, 0x91, 0x10, 0x74, 0x48, 0x7a, 0xb3, 0x91, 0x12, 0x74, 0x10, 0x7a, 0xb3, 0x91, + 0x13, 0x74, 0x3f, 0x7a, 0xb3, 0x91, 0x14, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x06, 0x74, 0x0f, 0x7a, + 0xb3, 0x91, 0x07, 0x12, 0x40, 0xfa, 0x7e, 0x20, 0x00, 0x12, 0x41, 0x9f, 0x0b, 0x20, 0xbe, 0x21, + 0x2e, 0x78, 0xf6, 0xd2, 0xa8, 0x22, 0x7e, 0xb0, 0x01, 0x7a, 0xb3, 0x94, 0x00, 0x7a, 0xb3, 0x2c, + 0x35, 0x12, 0x44, 0x7a, 0x75, 0xb0, 0xdf, 0xc2, 0xa8, 0x22, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x06, + 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x07, 0x7e, 0x20, 0x04, 0x7c, 0xb2, 0xc2, 0xd7, 0x13, 0x13, 0x13, + 0x13, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, 0x74, 0x02, 0x7a, 0xb3, 0x91, + 0x12, 0xa5, 0xda, 0xe5, 0x22, 0xca, 0x09, 0x12, 0x30, 0x0e, 0x10, 0x01, 0x34, 0xd5, 0x51, 0x40, + 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x06, 0x7e, 0xb3, 0x91, 0x07, + 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x7e, 0xb3, 0x91, 0x07, 0x7e, 0xb3, 0x91, 0x14, 0x7e, 0xb3, + 0x91, 0x04, 0x63, 0x53, 0x01, 0x7e, 0x00, 0x54, 0x2e, 0x01, 0x53, 0xa5, 0xe6, 0xf5, 0x51, 0x80, + 0x12, 0x20, 0x02, 0x1d, 0x75, 0x53, 0x00, 0x85, 0x54, 0x51, 0xd2, 0x02, 0x74, 0x03, 0x80, 0x0d, + 0x30, 0x02, 0x0e, 0xc2, 0x02, 0x7e, 0x00, 0x56, 0x2e, 0x01, 0x53, 0xa5, 0xe6, 0x7a, 0xb3, 0x90, + 0x00, 0xda, 0x09, 0x32, 0x45, 0x6f, 0x45, 0x8b, 0x45, 0xa7, 0x45, 0xc3, 0x45, 0xdf, 0x45, 0xfb, + 0x46, 0x17, 0x46, 0x33, 0xc0, 0xd0, 0xc0, 0xd1, 0xc0, 0xe0, 0xc0, 0xf0, 0xca, 0x0b, 0xca, 0x1b, + 0xca, 0x2b, 0xd2, 0x01, 0x75, 0x2f, 0x89, 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x90, 0x00, 0x60, 0x28, + 0x7e, 0x14, 0x80, 0x00, 0x7e, 0x00, 0x00, 0x13, 0x50, 0x13, 0xca, 0x0b, 0xca, 0x59, 0x7c, 0xb0, + 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x45, 0x04, 0x99, 0x24, 0xda, 0x59, 0xda, 0x0b, 0xa5, 0x0a, 0xa5, + 0x08, 0xbe, 0x01, 0x2e, 0x78, 0xe1, 0x80, 0xd2, 0x30, 0x04, 0x05, 0xc2, 0x04, 0x12, 0x64, 0x86, + 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0xd0, 0xf0, 0xd0, 0xe0, 0xd0, 0xd1, 0xd0, 0xd0, 0x32, 0x09, + 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f, 0x80, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b, + 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x61, 0xab, 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20, + 0xe0, 0x14, 0x75, 0x2f, 0x81, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, + 0x69, 0x52, 0x61, 0xeb, 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f, + 0x82, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x62, 0x2b, + 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f, 0x83, 0x12, 0x73, 0x35, + 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x62, 0x6b, 0x89, 0x54, 0x22, 0x09, + 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f, 0x84, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b, + 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x62, 0xab, 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20, + 0xe0, 0x14, 0x75, 0x2f, 0x85, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, + 0x69, 0x52, 0x62, 0xeb, 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f, + 0x86, 0x12, 0x73, 0x35, 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x63, 0x2b, + 0x89, 0x54, 0x22, 0x09, 0xb1, 0x00, 0x08, 0x20, 0xe0, 0x14, 0x75, 0x2f, 0x87, 0x12, 0x73, 0x35, + 0x54, 0x3e, 0x0a, 0x5b, 0x7e, 0x44, 0x00, 0xff, 0x69, 0x52, 0x63, 0x6b, 0x89, 0x54, 0x22, 0x10, + 0x08, 0x01, 0x22, 0x20, 0x28, 0x03, 0xd2, 0x08, 0x22, 0x75, 0x2f, 0xa0, 0x12, 0x73, 0x35, 0x7e, + 0x14, 0x80, 0x00, 0x80, 0x06, 0x20, 0x28, 0x03, 0xd2, 0x08, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, + 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x49, 0x45, 0x30, 0x30, 0x06, 0x20, 0xe6, + 0x4f, 0xd2, 0x08, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x60, 0x7e, 0x37, 0x01, 0x79, 0x7e, 0x27, 0x01, + 0x99, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x32, 0x7a, 0x05, 0x32, 0x7a, 0x37, 0x01, + 0x79, 0x7e, 0x37, 0x01, 0x59, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x08, 0x2c, 0x38, 0x68, 0x7a, + 0x47, 0x01, 0x59, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x12, + 0x69, 0xf0, 0x10, 0x60, 0xc4, 0x22, 0xc2, 0x60, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, + 0x7e, 0x27, 0x01, 0x79, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0x99, 0x28, 0x04, + 0x7e, 0x27, 0x01, 0x99, 0x7e, 0x37, 0x01, 0x79, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x32, 0x7a, + 0x05, 0x32, 0x7a, 0x37, 0x01, 0x79, 0x7e, 0x37, 0x01, 0x59, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, + 0x08, 0x2c, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x59, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, + 0x2f, 0x12, 0x73, 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, + 0x12, 0x73, 0x35, 0x9e, 0x44, 0x08, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x04, 0x2d, + 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x59, 0x12, 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, 0x03, + 0x02, 0x46, 0xc2, 0x22, 0xd2, 0x08, 0x7e, 0x04, 0x04, 0x2d, 0x7a, 0x07, 0x01, 0x59, 0x7a, 0x07, + 0x01, 0x69, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75, + 0x2f, 0x92, 0x12, 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, + 0xb8, 0x78, 0x68, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xa9, 0x2e, 0x24, 0x00, 0x02, 0x2d, + 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, + 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, 0x38, + 0x3c, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x00, 0x00, 0x2e, 0x27, 0x01, 0xa9, 0x1b, 0x38, 0x20, + 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x6a, 0x63, 0x75, 0x2f, 0x99, 0x12, 0x73, + 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x38, 0x0a, 0x09, 0xb1, + 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x10, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, + 0x12, 0x73, 0x35, 0x9e, 0x44, 0x28, 0x2d, 0x9d, 0x24, 0x7e, 0x64, 0x00, 0x00, 0x2e, 0x67, 0x01, + 0xa9, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x6a, 0x63, 0x7e, + 0x34, 0x24, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x6a, 0x63, 0x7a, 0x39, + 0xc0, 0x7e, 0x34, 0x24, 0x2d, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, + 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x00, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, + 0x35, 0x75, 0x2f, 0x93, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0xbd, 0x04, 0x68, + 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, + 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, + 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x28, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x2a, 0x7e, 0x04, 0x24, 0x2d, + 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, + 0x01, 0xc9, 0x7e, 0x44, 0x28, 0x2d, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, + 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, + 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, + 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x48, 0x1e, 0x75, 0x2f, + 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x38, + 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x10, 0x22, 0xda, 0xb8, + 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x48, 0x1e, 0xda, 0xb8, 0x02, 0x49, + 0x45, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5, 0x2f, + 0x12, 0x73, 0x35, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, + 0x04, 0xd2, 0x58, 0x80, 0x02, 0xc2, 0x58, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x50, + 0x80, 0x02, 0xc2, 0x50, 0x12, 0x42, 0xbd, 0x02, 0x61, 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73, 0x35, + 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, + 0xa0, 0x80, 0x02, 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, 0x13, + 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, + 0x12, 0x61, 0x36, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x48, 0x72, 0x75, 0x2f, + 0x95, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, 0x10, 0x09, 0x01, 0x22, + 0x20, 0x29, 0x03, 0xd2, 0x09, 0x22, 0x75, 0x2f, 0xa1, 0x12, 0x73, 0x35, 0x7e, 0x14, 0x81, 0x00, + 0x80, 0x06, 0x20, 0x29, 0x03, 0xd2, 0x09, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, + 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x4c, 0x72, 0x30, 0x31, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x09, + 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x61, 0x7e, 0x37, 0x01, 0x7b, 0x7e, 0x27, 0x01, 0x9b, 0x9d, 0x32, + 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x34, 0x7a, 0x05, 0x34, 0x7a, 0x37, 0x01, 0x7b, 0x7e, 0x37, + 0x01, 0x5b, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x0c, 0x2c, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x5b, + 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x12, 0x69, 0xf0, 0x10, + 0x61, 0xc4, 0x22, 0xc2, 0x61, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, + 0x7b, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0x9b, 0x28, 0x04, 0x7e, 0x27, 0x01, + 0x9b, 0x7e, 0x37, 0x01, 0x7b, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x34, 0x7a, 0x05, 0x34, 0x7a, + 0x37, 0x01, 0x7b, 0x7e, 0x37, 0x01, 0x5b, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x0c, 0x2c, 0x38, + 0x13, 0x7a, 0x47, 0x01, 0x5b, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, + 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, + 0x9e, 0x44, 0x0c, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x08, 0x2d, 0x7d, 0x24, 0x2d, + 0x43, 0x7a, 0x47, 0x01, 0x5b, 0x12, 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x49, 0xef, + 0x22, 0xd2, 0x09, 0x7e, 0x04, 0x08, 0x2d, 0x7a, 0x07, 0x01, 0x5b, 0x7a, 0x07, 0x01, 0x6b, 0x75, + 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92, 0x12, + 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x68, + 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xab, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, + 0x04, 0x00, 0x38, 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, + 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, 0x38, 0x3c, 0x7a, 0x47, + 0x01, 0xc9, 0x7e, 0x24, 0x01, 0x00, 0x2e, 0x27, 0x01, 0xab, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, + 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x6a, 0x63, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, + 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x39, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, + 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x11, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, + 0x9e, 0x44, 0x28, 0x2d, 0x9d, 0x24, 0x7e, 0x64, 0x01, 0x00, 0x2e, 0x67, 0x01, 0xab, 0x9e, 0x24, + 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x6a, 0x63, 0x7e, 0x34, 0x24, 0x2d, + 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x6a, 0x63, 0x7a, 0x39, 0xc0, 0x7e, 0x34, + 0x24, 0x2d, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, + 0x0f, 0x23, 0x23, 0x23, 0x44, 0x01, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, + 0x93, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, + 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, + 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x24, + 0x2d, 0x80, 0x28, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x2a, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0xcf, 0x7e, + 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, + 0x44, 0x28, 0x2d, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, + 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, + 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, + 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x4b, 0x4b, 0x75, 0x2f, 0x99, 0x12, 0x73, + 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x39, 0x0a, 0x09, 0xb1, + 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x11, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, + 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x4b, 0x4b, 0xda, 0xb8, 0x02, 0x4c, 0x72, 0x09, 0xb1, + 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5, 0x2f, 0x12, 0x73, 0x35, + 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x59, + 0x80, 0x02, 0xc2, 0x59, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x51, 0x80, 0x02, 0xc2, + 0x51, 0x12, 0x42, 0xd4, 0x02, 0x61, 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, + 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, + 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, 0x13, 0xca, 0xb8, 0x5e, + 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x61, 0x36, + 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x4b, 0x9f, 0x75, 0x2f, 0x95, 0x12, 0x73, + 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, 0x10, 0x0a, 0x01, 0x22, 0x20, 0x2a, 0x03, + 0xd2, 0x0a, 0x22, 0x75, 0x2f, 0xa2, 0x12, 0x73, 0x35, 0x7e, 0x14, 0x82, 0x00, 0x80, 0x06, 0x20, + 0x2a, 0x03, 0xd2, 0x0a, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, + 0x68, 0x03, 0x12, 0x4f, 0x9f, 0x30, 0x32, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0a, 0x22, 0x30, 0xe6, + 0x02, 0xd2, 0x62, 0x7e, 0x37, 0x01, 0x7d, 0x7e, 0x27, 0x01, 0x9d, 0x9d, 0x32, 0x40, 0x31, 0x7d, + 0x02, 0x2e, 0x05, 0x36, 0x7a, 0x05, 0x36, 0x7a, 0x37, 0x01, 0x7d, 0x7e, 0x37, 0x01, 0x5d, 0x7d, + 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x10, 0x2c, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x5d, 0x75, 0x2f, 0x94, + 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x12, 0x69, 0xf0, 0x10, 0x62, 0xc4, 0x22, + 0xc2, 0x62, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x7d, 0xbe, 0x24, + 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0x9d, 0x28, 0x04, 0x7e, 0x27, 0x01, 0x9d, 0x7e, 0x37, + 0x01, 0x7d, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x36, 0x7a, 0x05, 0x36, 0x7a, 0x37, 0x01, 0x7d, + 0x7e, 0x37, 0x01, 0x5d, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x10, 0x2c, 0x38, 0x13, 0x7a, 0x47, + 0x01, 0x5d, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x69, + 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x10, + 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x0c, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, + 0x01, 0x5d, 0x12, 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x4d, 0x1c, 0x22, 0xd2, 0x0a, + 0x7e, 0x04, 0x0c, 0x2d, 0x7a, 0x07, 0x01, 0x5d, 0x7a, 0x07, 0x01, 0x6d, 0x75, 0x2f, 0x94, 0x12, + 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x73, 0x35, 0xd2, + 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x68, 0x7e, 0x37, 0x01, + 0xcb, 0x7e, 0x27, 0x01, 0xad, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, + 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, + 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, 0x38, 0x3c, 0x7a, 0x47, 0x01, 0xc9, 0x7e, + 0x24, 0x02, 0x00, 0x2e, 0x27, 0x01, 0xad, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, + 0x73, 0x35, 0x02, 0x6a, 0x63, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, + 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3a, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, + 0x00, 0x10, 0xd2, 0x12, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x28, + 0x2d, 0x9d, 0x24, 0x7e, 0x64, 0x02, 0x00, 0x2e, 0x67, 0x01, 0xad, 0x9e, 0x24, 0x00, 0x02, 0x40, + 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x6a, 0x63, 0x7e, 0x34, 0x24, 0x2d, 0x7d, 0x24, 0x2d, + 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x6a, 0x63, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x24, 0x2d, 0x7a, + 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, + 0x23, 0x44, 0x02, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x73, + 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, + 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, + 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x28, + 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x2a, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, + 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x28, 0x2d, + 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, + 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, + 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, + 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x4e, 0x78, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, + 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3a, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, + 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x12, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, + 0x07, 0xca, 0xb8, 0x12, 0x4e, 0x78, 0xda, 0xb8, 0x02, 0x4f, 0x9f, 0x09, 0xb1, 0x00, 0x18, 0x7e, + 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5, 0x2f, 0x12, 0x73, 0x35, 0xa5, 0xfd, 0x5e, + 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5a, 0x80, 0x02, 0xc2, + 0x5a, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x52, 0x80, 0x02, 0xc2, 0x52, 0x12, 0x42, + 0xeb, 0x02, 0x61, 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, + 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x61, 0x13, 0xd2, + 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, 0x13, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, + 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x61, 0x36, 0x09, 0xb1, 0x00, + 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x4e, 0xcc, 0x75, 0x2f, 0x95, 0x12, 0x73, 0x35, 0x22, 0x75, + 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, 0x10, 0x0b, 0x01, 0x22, 0x20, 0x2b, 0x03, 0xd2, 0x0b, 0x22, + 0x75, 0x2f, 0xa3, 0x12, 0x73, 0x35, 0x7e, 0x14, 0x83, 0x00, 0x80, 0x06, 0x20, 0x2b, 0x03, 0xd2, + 0x0b, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, + 0x52, 0xcc, 0x30, 0x33, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0b, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x63, + 0x7e, 0x37, 0x01, 0x7f, 0x7e, 0x27, 0x01, 0x9f, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, + 0x38, 0x7a, 0x05, 0x38, 0x7a, 0x37, 0x01, 0x7f, 0x7e, 0x37, 0x01, 0x5f, 0x7d, 0x43, 0x2d, 0x42, + 0xbe, 0x44, 0x14, 0x2c, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x5f, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, + 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x12, 0x69, 0xf0, 0x10, 0x63, 0xc4, 0x22, 0xc2, 0x63, 0x2d, + 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x7f, 0xbe, 0x24, 0x00, 0x00, 0x68, + 0x6a, 0xbe, 0x27, 0x01, 0x9f, 0x28, 0x04, 0x7e, 0x27, 0x01, 0x9f, 0x7e, 0x37, 0x01, 0x7f, 0x9d, + 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x38, 0x7a, 0x05, 0x38, 0x7a, 0x37, 0x01, 0x7f, 0x7e, 0x37, 0x01, + 0x5f, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x14, 0x2c, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x5f, 0x75, + 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f, + 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x14, 0x2d, 0x9d, 0x24, + 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x10, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x5f, 0x12, + 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x50, 0x49, 0x22, 0xd2, 0x0b, 0x7e, 0x04, 0x10, + 0x2d, 0x7a, 0x07, 0x01, 0x5f, 0x7a, 0x07, 0x01, 0x6f, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75, + 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1, + 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x68, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, + 0x01, 0xaf, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x34, 0x7d, 0x02, + 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, + 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, 0x38, 0x3c, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x03, 0x00, + 0x2e, 0x27, 0x01, 0xaf, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, + 0x6a, 0x63, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, + 0x00, 0x04, 0x30, 0x3b, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, + 0x13, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x28, 0x2d, 0x9d, 0x24, + 0x7e, 0x64, 0x03, 0x00, 0x2e, 0x67, 0x01, 0xaf, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, + 0x60, 0x0b, 0x35, 0x12, 0x6a, 0x63, 0x7e, 0x34, 0x24, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, + 0x01, 0xc9, 0x02, 0x6a, 0x63, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x24, 0x2d, 0x7a, 0x39, 0xd0, 0x0b, + 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x03, + 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x73, 0x35, 0x7a, 0x71, + 0x2f, 0x12, 0x73, 0x35, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, + 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, + 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x28, 0x7e, 0x04, 0x24, + 0x2d, 0x80, 0x2a, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, + 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x28, 0x2d, 0x7d, 0x60, 0x0b, + 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, + 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, + 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, + 0x78, 0xe7, 0x02, 0x51, 0xa5, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, + 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3b, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, + 0x00, 0x10, 0xd2, 0x13, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, + 0x12, 0x51, 0xa5, 0xda, 0xb8, 0x02, 0x52, 0xcc, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, + 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5, 0x2f, 0x12, 0x73, 0x35, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, + 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5b, 0x80, 0x02, 0xc2, 0x5b, 0xa5, 0xfd, + 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x53, 0x80, 0x02, 0xc2, 0x53, 0x12, 0x43, 0x02, 0x02, 0x61, + 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73, + 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1, + 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, 0x13, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, + 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x61, 0x36, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, + 0xdb, 0x22, 0x02, 0x51, 0xf9, 0x75, 0x2f, 0x95, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12, + 0x73, 0x35, 0x22, 0x10, 0x0c, 0x01, 0x22, 0x20, 0x2c, 0x03, 0xd2, 0x0c, 0x22, 0x75, 0x2f, 0xa4, + 0x12, 0x73, 0x35, 0x7e, 0x14, 0x84, 0x00, 0x80, 0x06, 0x20, 0x2c, 0x03, 0xd2, 0x0c, 0x22, 0x09, + 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x55, 0xf9, 0x30, + 0x34, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0c, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x64, 0x7e, 0x37, 0x01, + 0x81, 0x7e, 0x27, 0x01, 0xa1, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x3a, 0x7a, 0x05, + 0x3a, 0x7a, 0x37, 0x01, 0x81, 0x7e, 0x37, 0x01, 0x61, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x18, + 0x2c, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x61, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, + 0x12, 0x73, 0x35, 0x12, 0x69, 0xf0, 0x10, 0x64, 0xc4, 0x22, 0xc2, 0x64, 0x2d, 0x23, 0x68, 0x78, + 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x81, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, + 0x01, 0xa1, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xa1, 0x7e, 0x37, 0x01, 0x81, 0x9d, 0x32, 0x7d, 0x02, + 0x2e, 0x05, 0x3a, 0x7a, 0x05, 0x3a, 0x7a, 0x37, 0x01, 0x81, 0x7e, 0x37, 0x01, 0x61, 0x7d, 0x43, + 0x2d, 0x42, 0xbe, 0x44, 0x18, 0x2c, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x61, 0x75, 0x2f, 0x94, 0x12, + 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, + 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x18, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, + 0x7e, 0x34, 0x14, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x61, 0x12, 0x69, 0xf0, 0xbe, + 0x25, 0x20, 0x78, 0x03, 0x02, 0x53, 0x76, 0x22, 0xd2, 0x0c, 0x7e, 0x04, 0x14, 0x2d, 0x7a, 0x07, + 0x01, 0x61, 0x7a, 0x07, 0x01, 0x71, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, + 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, + 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x68, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb1, 0x2e, + 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, + 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, + 0x44, 0x28, 0x2c, 0x38, 0x3c, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x04, 0x00, 0x2e, 0x27, 0x01, + 0xb1, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x6a, 0x63, 0x75, + 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, + 0x3c, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x14, 0x22, 0x80, + 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x28, 0x2d, 0x9d, 0x24, 0x7e, 0x64, 0x04, + 0x00, 0x2e, 0x67, 0x01, 0xb1, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, + 0x12, 0x6a, 0x63, 0x7e, 0x34, 0x24, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, + 0x6a, 0x63, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x24, 0x2d, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, + 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x04, 0x7a, 0x69, 0xb0, + 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, + 0x35, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, + 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, + 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x28, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x2a, + 0x7e, 0x04, 0x24, 0x2d, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, + 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x28, 0x2d, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, + 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, + 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, + 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, + 0x54, 0xd2, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, + 0x00, 0x04, 0x30, 0x3c, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, + 0x14, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x54, 0xd2, + 0xda, 0xb8, 0x02, 0x55, 0xf9, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, + 0x73, 0x35, 0xf5, 0x2f, 0x12, 0x73, 0x35, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, + 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5c, 0x80, 0x02, 0xc2, 0x5c, 0xa5, 0xfd, 0x5e, 0x50, 0x80, + 0x68, 0x04, 0xd2, 0x54, 0x80, 0x02, 0xc2, 0x54, 0x12, 0x43, 0x19, 0x02, 0x61, 0x13, 0x75, 0x2f, + 0x91, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, + 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, + 0x80, 0x12, 0x61, 0x13, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, + 0x09, 0x61, 0x00, 0x00, 0x12, 0x61, 0x36, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, + 0x55, 0x26, 0x75, 0x2f, 0x95, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, + 0x10, 0x0d, 0x01, 0x22, 0x20, 0x2d, 0x03, 0xd2, 0x0d, 0x22, 0x75, 0x2f, 0xa5, 0x12, 0x73, 0x35, + 0x7e, 0x14, 0x85, 0x00, 0x80, 0x06, 0x20, 0x2d, 0x03, 0xd2, 0x0d, 0x22, 0x09, 0xb1, 0x00, 0x14, + 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x59, 0x26, 0x30, 0x35, 0x06, 0x20, + 0xe6, 0x4f, 0xd2, 0x0d, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x65, 0x7e, 0x37, 0x01, 0x83, 0x7e, 0x27, + 0x01, 0xa3, 0x9d, 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x3c, 0x7a, 0x05, 0x3c, 0x7a, 0x37, + 0x01, 0x83, 0x7e, 0x37, 0x01, 0x63, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x1c, 0x2c, 0x38, 0x68, + 0x7a, 0x47, 0x01, 0x63, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, + 0x12, 0x69, 0xf0, 0x10, 0x65, 0xc4, 0x22, 0xc2, 0x65, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, + 0x1a, 0x7e, 0x27, 0x01, 0x83, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa3, 0x28, + 0x04, 0x7e, 0x27, 0x01, 0xa3, 0x7e, 0x37, 0x01, 0x83, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x3c, + 0x7a, 0x05, 0x3c, 0x7a, 0x37, 0x01, 0x83, 0x7e, 0x37, 0x01, 0x63, 0x7d, 0x43, 0x2d, 0x42, 0xbe, + 0x44, 0x1c, 0x2c, 0x38, 0x13, 0x7a, 0x47, 0x01, 0x63, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, + 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, + 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x1c, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x18, + 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x63, 0x12, 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, + 0x03, 0x02, 0x56, 0xa3, 0x22, 0xd2, 0x0d, 0x7e, 0x04, 0x18, 0x2d, 0x7a, 0x07, 0x01, 0x63, 0x7a, + 0x07, 0x01, 0x73, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, + 0x75, 0x2f, 0x92, 0x12, 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, + 0xda, 0xb8, 0x78, 0x68, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb3, 0x2e, 0x24, 0x00, 0x02, + 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, + 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, + 0x38, 0x3c, 0x7a, 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x05, 0x00, 0x2e, 0x27, 0x01, 0xb3, 0x1b, 0x38, + 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x6a, 0x63, 0x75, 0x2f, 0x99, 0x12, + 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3d, 0x0a, 0x09, + 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x15, 0x22, 0x80, 0x7f, 0x7a, 0x51, + 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, 0x28, 0x2d, 0x9d, 0x24, 0x7e, 0x64, 0x05, 0x00, 0x2e, 0x67, + 0x01, 0xb3, 0x9e, 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x6a, 0x63, + 0x7e, 0x34, 0x24, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x6a, 0x63, 0x7a, + 0x39, 0xc0, 0x7e, 0x34, 0x24, 0x2d, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, + 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x05, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, + 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0xbd, 0x04, + 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, + 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, + 0x22, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x28, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x2a, 0x7e, 0x04, 0x24, + 0x2d, 0x80, 0xcf, 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, + 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x28, 0x2d, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, + 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, + 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, + 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x57, 0xff, 0x75, + 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, + 0x3d, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x15, 0x22, 0xda, + 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x57, 0xff, 0xda, 0xb8, 0x02, + 0x59, 0x26, 0x09, 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5, + 0x2f, 0x12, 0x73, 0x35, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, + 0x68, 0x04, 0xd2, 0x5d, 0x80, 0x02, 0xc2, 0x5d, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, + 0x55, 0x80, 0x02, 0xc2, 0x55, 0x12, 0x43, 0x30, 0x02, 0x61, 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73, + 0x35, 0x09, 0xb1, 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, + 0x7e, 0xa0, 0x80, 0x02, 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, + 0x13, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, + 0x00, 0x12, 0x61, 0x36, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x58, 0x53, 0x75, + 0x2f, 0x95, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, 0x10, 0x0e, 0x01, + 0x22, 0x20, 0x2e, 0x03, 0xd2, 0x0e, 0x22, 0x75, 0x2f, 0xa6, 0x12, 0x73, 0x35, 0x7e, 0x14, 0x86, + 0x00, 0x80, 0x06, 0x20, 0x2e, 0x03, 0xd2, 0x0e, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, + 0xb0, 0x1e, 0xda, 0xb8, 0x68, 0x03, 0x12, 0x5c, 0x53, 0x30, 0x36, 0x06, 0x20, 0xe6, 0x4f, 0xd2, + 0x0e, 0x22, 0x30, 0xe6, 0x02, 0xd2, 0x66, 0x7e, 0x37, 0x01, 0x85, 0x7e, 0x27, 0x01, 0xa5, 0x9d, + 0x32, 0x40, 0x31, 0x7d, 0x02, 0x2e, 0x05, 0x3e, 0x7a, 0x05, 0x3e, 0x7a, 0x37, 0x01, 0x85, 0x7e, + 0x37, 0x01, 0x65, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x20, 0x2c, 0x38, 0x68, 0x7a, 0x47, 0x01, + 0x65, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x12, 0x69, 0xf0, + 0x10, 0x66, 0xc4, 0x22, 0xc2, 0x66, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, + 0x01, 0x85, 0xbe, 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa5, 0x28, 0x04, 0x7e, 0x27, + 0x01, 0xa5, 0x7e, 0x37, 0x01, 0x85, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x3e, 0x7a, 0x05, 0x3e, + 0x7a, 0x37, 0x01, 0x85, 0x7e, 0x37, 0x01, 0x65, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x20, 0x2c, + 0x38, 0x13, 0x7a, 0x47, 0x01, 0x65, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, + 0x73, 0x35, 0x02, 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, + 0x35, 0x9e, 0x44, 0x20, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x1c, 0x2d, 0x7d, 0x24, + 0x2d, 0x43, 0x7a, 0x47, 0x01, 0x65, 0x12, 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x59, + 0xd0, 0x22, 0xd2, 0x0e, 0x7e, 0x04, 0x1c, 0x2d, 0x7a, 0x07, 0x01, 0x65, 0x7a, 0x07, 0x01, 0x75, + 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92, + 0x12, 0x73, 0x35, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, + 0x68, 0x7e, 0x37, 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb5, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, + 0x34, 0x04, 0x00, 0x38, 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, + 0xcb, 0x7e, 0x37, 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, 0x38, 0x3c, 0x7a, + 0x47, 0x01, 0xc9, 0x7e, 0x24, 0x06, 0x00, 0x2e, 0x27, 0x01, 0xb5, 0x1b, 0x38, 0x20, 0x0b, 0x35, + 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, 0x6a, 0x63, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, + 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3e, 0x0a, 0x09, 0xb1, 0x00, 0x10, + 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x16, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x73, + 0x35, 0x9e, 0x44, 0x28, 0x2d, 0x9d, 0x24, 0x7e, 0x64, 0x06, 0x00, 0x2e, 0x67, 0x01, 0xb5, 0x9e, + 0x24, 0x00, 0x02, 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x6a, 0x63, 0x7e, 0x34, 0x24, + 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x6a, 0x63, 0x7a, 0x39, 0xc0, 0x7e, + 0x34, 0x24, 0x2d, 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, + 0x54, 0x0f, 0x23, 0x23, 0x23, 0x44, 0x06, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, + 0x2f, 0x93, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0xbd, 0x04, 0x68, 0x2b, 0x7a, + 0x07, 0x01, 0xc9, 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, + 0x7a, 0x35, 0x30, 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, + 0x24, 0x2d, 0x80, 0x28, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x2a, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0xcf, + 0x7e, 0x07, 0x01, 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, + 0x7e, 0x44, 0x28, 0x2d, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, + 0xbd, 0x04, 0x68, 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, + 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, + 0x7a, 0x09, 0xb0, 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x5b, 0x2c, 0x75, 0x2f, 0x99, 0x12, + 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3e, 0x0a, 0x09, + 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x16, 0x22, 0xda, 0xb8, 0x30, 0xe0, + 0xd8, 0xbd, 0x32, 0x68, 0x07, 0xca, 0xb8, 0x12, 0x5b, 0x2c, 0xda, 0xb8, 0x02, 0x5c, 0x53, 0x09, + 0xb1, 0x00, 0x18, 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5, 0x2f, 0x12, 0x73, + 0x35, 0xa5, 0xfd, 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, + 0x5e, 0x80, 0x02, 0xc2, 0x5e, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x56, 0x80, 0x02, + 0xc2, 0x56, 0x12, 0x43, 0x47, 0x02, 0x61, 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73, 0x35, 0x09, 0xb1, + 0x00, 0x14, 0x7a, 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, + 0x02, 0x61, 0x13, 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, 0x13, 0xca, 0xb8, + 0x5e, 0xb0, 0x1c, 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x61, + 0x36, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x5b, 0x80, 0x75, 0x2f, 0x95, 0x12, + 0x73, 0x35, 0x22, 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, 0x10, 0x0f, 0x01, 0x22, 0x20, 0x2f, + 0x03, 0xd2, 0x0f, 0x22, 0x75, 0x2f, 0xa7, 0x12, 0x73, 0x35, 0x7e, 0x14, 0x87, 0x00, 0x80, 0x06, + 0x20, 0x2f, 0x03, 0xd2, 0x0f, 0x22, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x5e, 0xb0, 0x1e, 0xda, + 0xb8, 0x68, 0x03, 0x12, 0x5f, 0x80, 0x30, 0x37, 0x06, 0x20, 0xe6, 0x4f, 0xd2, 0x0f, 0x22, 0x30, + 0xe6, 0x02, 0xd2, 0x67, 0x7e, 0x37, 0x01, 0x87, 0x7e, 0x27, 0x01, 0xa7, 0x9d, 0x32, 0x40, 0x31, + 0x7d, 0x02, 0x2e, 0x05, 0x40, 0x7a, 0x05, 0x40, 0x7a, 0x37, 0x01, 0x87, 0x7e, 0x37, 0x01, 0x67, + 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x24, 0x2c, 0x38, 0x68, 0x7a, 0x47, 0x01, 0x67, 0x75, 0x2f, + 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x12, 0x69, 0xf0, 0x10, 0x67, 0xc4, + 0x22, 0xc2, 0x67, 0x2d, 0x23, 0x68, 0x78, 0x6d, 0x33, 0x80, 0x1a, 0x7e, 0x27, 0x01, 0x87, 0xbe, + 0x24, 0x00, 0x00, 0x68, 0x6a, 0xbe, 0x27, 0x01, 0xa7, 0x28, 0x04, 0x7e, 0x27, 0x01, 0xa7, 0x7e, + 0x37, 0x01, 0x87, 0x9d, 0x32, 0x7d, 0x02, 0x2e, 0x05, 0x40, 0x7a, 0x05, 0x40, 0x7a, 0x37, 0x01, + 0x87, 0x7e, 0x37, 0x01, 0x67, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x24, 0x2c, 0x38, 0x13, 0x7a, + 0x47, 0x01, 0x67, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x02, + 0x69, 0xf0, 0x75, 0x2f, 0x94, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, + 0x24, 0x2d, 0x9d, 0x24, 0x12, 0x69, 0xf0, 0x7e, 0x34, 0x20, 0x2d, 0x7d, 0x24, 0x2d, 0x43, 0x7a, + 0x47, 0x01, 0x67, 0x12, 0x69, 0xf0, 0xbe, 0x25, 0x20, 0x78, 0x03, 0x02, 0x5c, 0xfd, 0x22, 0xd2, + 0x0f, 0x7e, 0x04, 0x20, 0x2d, 0x7a, 0x07, 0x01, 0x67, 0x7a, 0x07, 0x01, 0x77, 0x75, 0x2f, 0x94, + 0x12, 0x73, 0x35, 0x75, 0x2f, 0x00, 0x12, 0x73, 0x35, 0x22, 0x75, 0x2f, 0x92, 0x12, 0x73, 0x35, + 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0xca, 0xb8, 0x54, 0x82, 0xda, 0xb8, 0x78, 0x68, 0x7e, 0x37, + 0x01, 0xcb, 0x7e, 0x27, 0x01, 0xb7, 0x2e, 0x24, 0x00, 0x02, 0x2d, 0x32, 0xbe, 0x34, 0x04, 0x00, + 0x38, 0x34, 0x7d, 0x02, 0x2e, 0x05, 0x30, 0x7a, 0x05, 0x30, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, + 0x01, 0xc9, 0x7d, 0x43, 0x2d, 0x42, 0xbe, 0x44, 0x28, 0x2c, 0x38, 0x3c, 0x7a, 0x47, 0x01, 0xc9, + 0x7e, 0x24, 0x07, 0x00, 0x2e, 0x27, 0x01, 0xb7, 0x1b, 0x38, 0x20, 0x0b, 0x35, 0x7a, 0x51, 0x2f, + 0x12, 0x73, 0x35, 0x02, 0x6a, 0x63, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x04, + 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3f, 0x0a, 0x09, 0xb1, 0x00, 0x10, 0x54, 0xfe, 0x19, + 0xb1, 0x00, 0x10, 0xd2, 0x17, 0x22, 0x80, 0x7f, 0x7a, 0x51, 0x2f, 0x12, 0x73, 0x35, 0x9e, 0x44, + 0x28, 0x2d, 0x9d, 0x24, 0x7e, 0x64, 0x07, 0x00, 0x2e, 0x67, 0x01, 0xb7, 0x9e, 0x24, 0x00, 0x02, + 0x40, 0x17, 0x1b, 0x38, 0x60, 0x0b, 0x35, 0x12, 0x6a, 0x63, 0x7e, 0x34, 0x24, 0x2d, 0x7d, 0x24, + 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc9, 0x02, 0x6a, 0x63, 0x7a, 0x39, 0xc0, 0x7e, 0x34, 0x24, 0x2d, + 0x7a, 0x39, 0xd0, 0x0b, 0x34, 0x1b, 0x44, 0x80, 0xe5, 0x9d, 0x32, 0x7c, 0xb6, 0x54, 0x0f, 0x23, + 0x23, 0x23, 0x44, 0x07, 0x7a, 0x69, 0xb0, 0x7a, 0x79, 0x70, 0x0b, 0x35, 0x75, 0x2f, 0x93, 0x12, + 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0xbd, 0x04, 0x68, 0x2b, 0x7a, 0x07, 0x01, 0xc9, + 0x7e, 0x47, 0x01, 0xcb, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xcb, 0x2e, 0x35, 0x30, 0x7a, 0x35, 0x30, + 0x22, 0xd2, 0x04, 0x09, 0xb1, 0x00, 0x14, 0x20, 0xe0, 0x13, 0x22, 0x7e, 0x04, 0x24, 0x2d, 0x80, + 0x28, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0x2a, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0xcf, 0x7e, 0x07, 0x01, + 0xcb, 0x7e, 0x24, 0x03, 0xfe, 0x9d, 0x20, 0x28, 0x40, 0x7e, 0x07, 0x01, 0xc9, 0x7e, 0x44, 0x28, + 0x2d, 0x7d, 0x60, 0x0b, 0x04, 0xbd, 0x04, 0x68, 0xd2, 0x7d, 0x70, 0x0b, 0x04, 0xbd, 0x04, 0x68, + 0xd0, 0x7d, 0x54, 0x9d, 0x50, 0xbd, 0x25, 0x40, 0x02, 0x7d, 0x25, 0x7d, 0x32, 0x09, 0xb1, 0x00, + 0x14, 0xca, 0xb8, 0x54, 0x1f, 0xb4, 0x01, 0x31, 0xda, 0xb8, 0x7e, 0x19, 0xb0, 0x7a, 0x09, 0xb0, + 0x0b, 0x04, 0x1b, 0x24, 0x78, 0xe7, 0x02, 0x5e, 0x59, 0x75, 0x2f, 0x99, 0x12, 0x73, 0x35, 0x09, + 0xb1, 0x00, 0x04, 0x54, 0xfa, 0x19, 0xb1, 0x00, 0x04, 0x30, 0x3f, 0x0a, 0x09, 0xb1, 0x00, 0x10, + 0x54, 0xfe, 0x19, 0xb1, 0x00, 0x10, 0xd2, 0x17, 0x22, 0xda, 0xb8, 0x30, 0xe0, 0xd8, 0xbd, 0x32, + 0x68, 0x07, 0xca, 0xb8, 0x12, 0x5e, 0x59, 0xda, 0xb8, 0x02, 0x5f, 0x80, 0x09, 0xb1, 0x00, 0x18, + 0x7e, 0xa0, 0x88, 0x75, 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5, 0x2f, 0x12, 0x73, 0x35, 0xa5, 0xfd, + 0x5e, 0x50, 0x0a, 0x68, 0x1d, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5f, 0x80, 0x02, + 0xc2, 0x5f, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x57, 0x80, 0x02, 0xc2, 0x57, 0x12, + 0x43, 0x5e, 0x02, 0x61, 0x13, 0x75, 0x2f, 0x91, 0x12, 0x73, 0x35, 0x09, 0xb1, 0x00, 0x14, 0x7a, + 0xb1, 0x2f, 0x12, 0x73, 0x35, 0x20, 0xe0, 0x08, 0xd2, 0x04, 0x7e, 0xa0, 0x80, 0x02, 0x61, 0x13, + 0xd2, 0x04, 0x30, 0xe1, 0x06, 0x7e, 0xa0, 0x80, 0x12, 0x61, 0x13, 0xca, 0xb8, 0x5e, 0xb0, 0x1c, + 0xda, 0xb8, 0x68, 0x12, 0x7e, 0xa0, 0xc0, 0x09, 0x61, 0x00, 0x00, 0x12, 0x61, 0x36, 0x09, 0xb1, + 0x00, 0x14, 0x20, 0xe0, 0xdb, 0x22, 0x02, 0x5e, 0xad, 0x75, 0x2f, 0x95, 0x12, 0x73, 0x35, 0x22, + 0x75, 0x2f, 0x96, 0x12, 0x73, 0x35, 0x22, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, + 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x58, 0x80, 0x02, 0xc2, 0x58, + 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x50, 0x80, 0x02, 0xc2, 0x50, 0x02, 0x60, 0xff, + 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, + 0x20, 0x68, 0x04, 0xd2, 0x59, 0x80, 0x02, 0xc2, 0x59, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, + 0xd2, 0x51, 0x80, 0x02, 0xc2, 0x51, 0x02, 0x60, 0xff, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, + 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5a, 0x80, 0x02, + 0xc2, 0x5a, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x52, 0x80, 0x02, 0xc2, 0x52, 0x02, + 0x60, 0xff, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, + 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5b, 0x80, 0x02, 0xc2, 0x5b, 0xa5, 0xfd, 0x5e, 0x50, 0x80, + 0x68, 0x04, 0xd2, 0x53, 0x80, 0x02, 0xc2, 0x53, 0x02, 0x60, 0xff, 0x7c, 0x02, 0x7e, 0x14, 0x80, + 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5c, + 0x80, 0x02, 0xc2, 0x5c, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x54, 0x80, 0x02, 0xc2, + 0x54, 0x02, 0x60, 0xff, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, + 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5d, 0x80, 0x02, 0xc2, 0x5d, 0xa5, 0xfd, 0x5e, + 0x50, 0x80, 0x68, 0x04, 0xd2, 0x55, 0x80, 0x02, 0xc2, 0x55, 0x02, 0x60, 0xff, 0x7c, 0x02, 0x7e, + 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, + 0xd2, 0x5e, 0x80, 0x02, 0xc2, 0x5e, 0xa5, 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x56, 0x80, + 0x02, 0xc2, 0x56, 0x02, 0x60, 0xff, 0x7c, 0x02, 0x7e, 0x14, 0x80, 0x00, 0x4c, 0x20, 0x09, 0xb1, + 0x00, 0x18, 0xa5, 0xfd, 0x5e, 0x50, 0x20, 0x68, 0x04, 0xd2, 0x5f, 0x80, 0x02, 0xc2, 0x5f, 0xa5, + 0xfd, 0x5e, 0x50, 0x80, 0x68, 0x04, 0xd2, 0x57, 0x80, 0x02, 0xc2, 0x57, 0x02, 0x60, 0xff, 0x54, + 0xf0, 0xc4, 0xa5, 0xff, 0xc4, 0xa5, 0x4f, 0x75, 0x2f, 0x90, 0x12, 0x73, 0x35, 0xf5, 0x2f, 0x12, + 0x73, 0x35, 0x22, 0xca, 0x19, 0x5e, 0x20, 0x07, 0x4c, 0xa2, 0x7e, 0x74, 0x2c, 0x2d, 0xca, 0x79, + 0x7a, 0x79, 0xa0, 0x0b, 0x74, 0x7a, 0x79, 0xb0, 0x0b, 0x74, 0xda, 0x79, 0x7e, 0x30, 0x02, 0x7e, + 0x64, 0x00, 0x02, 0x02, 0x61, 0x5e, 0xca, 0x19, 0x5e, 0x20, 0x07, 0x4c, 0xa2, 0x7e, 0x74, 0x2c, + 0x2d, 0xca, 0x79, 0x7a, 0x79, 0xa0, 0x0b, 0x74, 0x7a, 0x79, 0xb0, 0x0b, 0x74, 0x7a, 0x79, 0x60, + 0x0b, 0x74, 0xda, 0x79, 0x7e, 0x30, 0x03, 0x7e, 0x64, 0x00, 0x03, 0x02, 0x61, 0x5e, 0xd2, 0x04, + 0x7e, 0x27, 0x01, 0xcb, 0x2d, 0x26, 0xbe, 0x24, 0x04, 0x00, 0x38, 0x2e, 0x7e, 0x07, 0x01, 0xc9, + 0x7e, 0x44, 0x28, 0x2d, 0x7e, 0x79, 0xa0, 0x7a, 0x09, 0xa0, 0x0b, 0x04, 0x0b, 0x74, 0xbd, 0x04, + 0x68, 0x23, 0xa5, 0xdb, 0xef, 0x7a, 0x27, 0x01, 0xcb, 0x7e, 0x25, 0x30, 0x2d, 0x26, 0x7a, 0x25, + 0x30, 0x7a, 0x07, 0x01, 0xc9, 0xda, 0x19, 0xc2, 0xd7, 0x22, 0x75, 0x2f, 0x9a, 0x12, 0x73, 0x35, + 0xda, 0x19, 0xd2, 0xd7, 0x22, 0x7e, 0x04, 0x24, 0x2d, 0x80, 0xd7, 0x48, 0xf1, 0x46, 0x65, 0x47, + 0x5f, 0x49, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x48, 0x56, 0x45, 0x2a, 0x49, 0x6e, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x49, 0x75, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x4c, 0x1e, 0x49, 0x92, 0x4a, + 0x8c, 0x4c, 0x57, 0x45, 0x2a, 0x45, 0x2a, 0x4b, 0x83, 0x45, 0x2a, 0x4c, 0x9b, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x4c, 0xa2, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x4f, 0x4b, 0x4c, 0xbf, 0x4d, + 0xb9, 0x4f, 0x84, 0x45, 0x2a, 0x45, 0x2a, 0x4e, 0xb0, 0x45, 0x2a, 0x4f, 0xc8, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x4f, 0xcf, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x52, 0x78, 0x4f, 0xec, 0x50, + 0xe6, 0x52, 0xb1, 0x45, 0x2a, 0x45, 0x2a, 0x51, 0xdd, 0x45, 0x2a, 0x52, 0xf5, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x52, 0xfc, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x55, 0xa5, 0x53, 0x19, 0x54, + 0x13, 0x55, 0xde, 0x45, 0x2a, 0x45, 0x2a, 0x55, 0x0a, 0x45, 0x2a, 0x56, 0x22, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x56, 0x29, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x58, 0xd2, 0x56, 0x46, 0x57, + 0x40, 0x59, 0x0b, 0x45, 0x2a, 0x45, 0x2a, 0x58, 0x37, 0x45, 0x2a, 0x59, 0x4f, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x59, 0x56, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x5b, 0xff, 0x59, 0x73, 0x5a, + 0x6d, 0x5c, 0x38, 0x45, 0x2a, 0x45, 0x2a, 0x5b, 0x64, 0x45, 0x2a, 0x5c, 0x7c, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x5c, 0x83, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x5f, 0x2c, 0x5c, 0xa0, 0x5d, + 0x9a, 0x5f, 0x65, 0x45, 0x2a, 0x45, 0x2a, 0x5e, 0x91, 0x45, 0x2a, 0x5f, 0xa9, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x5f, 0xb0, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, + 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0x45, 0x2a, 0xca, 0xb8, 0x75, 0x2f, 0x02, + 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x91, 0x03, 0x20, 0xe5, 0x20, 0x30, 0xe0, 0x05, 0x12, 0x6b, 0x05, + 0x80, 0x30, 0x30, 0xe1, 0x05, 0x12, 0x64, 0x86, 0x80, 0x28, 0x30, 0xe2, 0x05, 0x12, 0x63, 0xf5, + 0x80, 0x20, 0x30, 0xe3, 0x1d, 0x12, 0x65, 0x61, 0x80, 0x18, 0x7e, 0xb3, 0x91, 0x04, 0x30, 0xe1, + 0x03, 0x02, 0x67, 0x5f, 0x30, 0xe6, 0x05, 0x12, 0x6c, 0x6a, 0x80, 0x06, 0x20, 0xe2, 0x03, 0x02, + 0x00, 0x80, 0xda, 0xb8, 0x32, 0x75, 0x2f, 0x10, 0x12, 0x73, 0x35, 0xca, 0x0b, 0xca, 0x39, 0xca, + 0x59, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0xb3, 0x91, 0x1a, 0x6c, 0xaa, 0xbe, 0xb0, 0x40, + 0x28, 0x0a, 0x12, 0x64, 0x24, 0xda, 0x59, 0xda, 0x39, 0xda, 0x0b, 0x22, 0x74, 0x20, 0x7a, 0xb3, + 0x91, 0x14, 0x80, 0xf1, 0x7e, 0x37, 0x01, 0xc5, 0x2d, 0x35, 0xbe, 0x34, 0x04, 0x00, 0x38, 0x2f, + 0x7a, 0x37, 0x01, 0xc5, 0x7e, 0x37, 0x01, 0xc3, 0x7d, 0x43, 0x2d, 0x45, 0xbe, 0x44, 0x2c, 0x2c, + 0x38, 0x25, 0x7a, 0x47, 0x01, 0xc3, 0x75, 0x2f, 0x11, 0x12, 0x73, 0x35, 0x7a, 0xb1, 0x2f, 0x12, + 0x73, 0x35, 0x12, 0x67, 0x9f, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x14, 0x12, 0x66, 0x30, 0x22, 0x75, + 0x2f, 0x16, 0x12, 0x73, 0x35, 0x80, 0xf4, 0x75, 0x2f, 0x12, 0x12, 0x73, 0x35, 0x7a, 0xb1, 0x2f, + 0x12, 0x73, 0x35, 0x9e, 0x44, 0x2c, 0x2d, 0x9d, 0x54, 0x12, 0x67, 0x9f, 0x7e, 0x34, 0x28, 0x2d, + 0x7d, 0x54, 0x2d, 0x43, 0x80, 0xbc, 0x75, 0x2f, 0x18, 0x12, 0x73, 0x35, 0xca, 0x09, 0xca, 0x39, + 0xca, 0x2b, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0x63, 0x91, 0x1a, 0x74, 0x10, 0x7a, 0xb3, + 0x91, 0x14, 0x7e, 0xb0, 0x80, 0x9c, 0xb6, 0x60, 0x38, 0x6c, 0xaa, 0x7e, 0x37, 0x01, 0xcb, 0x9d, + 0x35, 0x40, 0x37, 0x7a, 0x37, 0x01, 0xcb, 0x7e, 0x37, 0x01, 0xc7, 0x7d, 0x43, 0x2d, 0x45, 0xbe, + 0x44, 0x28, 0x2c, 0x38, 0x3b, 0x7a, 0x47, 0x01, 0xc7, 0x7d, 0x45, 0x12, 0x68, 0xd4, 0x7e, 0xb3, + 0x91, 0x1e, 0x20, 0xe5, 0x13, 0x75, 0x2f, 0x19, 0x12, 0x73, 0x35, 0x7a, 0x91, 0x2f, 0x12, 0x73, + 0x35, 0xda, 0x2b, 0xda, 0x39, 0xda, 0x09, 0x22, 0x80, 0x34, 0x2d, 0x53, 0x6d, 0x33, 0x60, 0x02, + 0x80, 0xc1, 0x7e, 0x04, 0x24, 0x2d, 0x7a, 0x07, 0x01, 0xc9, 0x7a, 0x07, 0x01, 0xc7, 0x80, 0xe1, + 0xca, 0x59, 0x9e, 0x44, 0x28, 0x2d, 0x9d, 0x54, 0x12, 0x68, 0xd4, 0x7e, 0x34, 0x24, 0x2d, 0x7d, + 0x54, 0x2d, 0x43, 0x7a, 0x47, 0x01, 0xc7, 0x12, 0x68, 0xd4, 0xda, 0x49, 0x80, 0xb0, 0x7e, 0x0f, + 0x2c, 0x3e, 0x0b, 0x0c, 0x7a, 0x0f, 0x2c, 0x3e, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x1e, 0x74, 0x60, + 0x7a, 0xb3, 0x91, 0x1c, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x12, 0x80, 0xa5, 0x7e, 0x2f, 0x2c, 0x5e, + 0x0b, 0x2c, 0x7a, 0x2f, 0x2c, 0x5e, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x1e, 0x74, 0x60, 0x7a, 0xb3, + 0x91, 0x1c, 0x74, 0x02, 0x7a, 0xb3, 0x91, 0x12, 0x80, 0x1f, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, + 0x22, 0x75, 0x2f, 0x28, 0x12, 0x73, 0x35, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0x74, 0x60, 0x7a, + 0xb3, 0x91, 0x00, 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x14, 0x7e, 0xb3, 0x91, 0x1a, 0x70, 0xdb, 0x7e, + 0x0d, 0x30, 0x7e, 0x1d, 0x34, 0x7e, 0x2d, 0x38, 0x7e, 0x3d, 0x3c, 0x7e, 0x85, 0x40, 0x7d, 0x90, + 0x4d, 0x91, 0x4d, 0x92, 0x4d, 0x93, 0x4d, 0x94, 0x4d, 0x95, 0x4d, 0x96, 0x4d, 0x97, 0x4d, 0x98, + 0x68, 0xb8, 0x7a, 0x13, 0x91, 0x17, 0x7a, 0x03, 0x91, 0x17, 0x7a, 0x33, 0x91, 0x17, 0x7a, 0x23, + 0x91, 0x17, 0x7a, 0x53, 0x91, 0x17, 0x7a, 0x43, 0x91, 0x17, 0x7a, 0x73, 0x91, 0x17, 0x7a, 0x63, + 0x91, 0x17, 0x7a, 0x93, 0x91, 0x17, 0x7a, 0x83, 0x91, 0x17, 0x30, 0x73, 0x22, 0x7a, 0xb3, 0x91, + 0x17, 0x7a, 0xa3, 0x91, 0x17, 0x7a, 0xd3, 0x91, 0x17, 0x7a, 0xc3, 0x91, 0x17, 0x7a, 0xf3, 0x91, + 0x17, 0x7a, 0xe3, 0x91, 0x17, 0x7d, 0x78, 0x7a, 0xf3, 0x91, 0x17, 0x7a, 0xe3, 0x91, 0x17, 0x7e, + 0xb3, 0x91, 0x1e, 0x30, 0xe5, 0x03, 0x02, 0x65, 0x3c, 0x75, 0x2f, 0x29, 0x12, 0x73, 0x35, 0x20, + 0x73, 0x08, 0x75, 0x2f, 0x0a, 0x12, 0x73, 0x35, 0x80, 0x06, 0x75, 0x2f, 0x12, 0x12, 0x73, 0x35, + 0x74, 0x80, 0x7a, 0xb3, 0x91, 0x1e, 0x6d, 0x00, 0x7d, 0x10, 0x7a, 0x0d, 0x30, 0x7a, 0x0d, 0x34, + 0x7a, 0x0d, 0x38, 0x7a, 0x0d, 0x3c, 0x7a, 0x05, 0x40, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, + 0x7e, 0x37, 0x01, 0xc5, 0x4d, 0x33, 0x68, 0x3b, 0x7e, 0x07, 0x01, 0xc1, 0x7e, 0x54, 0x2c, 0x2d, + 0x9d, 0x50, 0xbd, 0x35, 0x40, 0x02, 0x7d, 0x35, 0xca, 0x39, 0x7e, 0x65, 0x4b, 0x99, 0x64, 0xda, + 0x39, 0x7e, 0x07, 0x01, 0xc5, 0x9d, 0x03, 0x7a, 0x07, 0x01, 0xc5, 0x2e, 0x37, 0x01, 0xc1, 0x7a, + 0x37, 0x01, 0xc1, 0xbe, 0x34, 0x2c, 0x2c, 0x28, 0xc7, 0x7e, 0x34, 0x28, 0x2d, 0x7a, 0x37, 0x01, + 0xc1, 0x80, 0xbd, 0x22, 0x75, 0x2f, 0x53, 0x12, 0x73, 0x35, 0x7e, 0x15, 0x4d, 0x80, 0x11, 0x75, + 0x2f, 0x51, 0x12, 0x73, 0x35, 0x0b, 0x08, 0x10, 0x0b, 0x05, 0x9e, 0x34, 0x00, 0x02, 0x28, 0x4d, + 0x7c, 0xb2, 0x20, 0xe7, 0x27, 0x54, 0x07, 0x23, 0x0a, 0x2b, 0x49, 0x22, 0x39, 0x1e, 0x7c, 0xb2, + 0x54, 0x78, 0x03, 0x03, 0x03, 0x7c, 0x2b, 0x9d, 0x13, 0x40, 0x1a, 0x68, 0x12, 0x7a, 0x15, 0x4d, + 0x7a, 0x25, 0x4f, 0x7e, 0x64, 0x67, 0x09, 0x7a, 0x65, 0x4b, 0x89, 0x24, 0x02, 0x67, 0x17, 0x7e, + 0x64, 0x66, 0x7f, 0x80, 0xf2, 0x2d, 0x13, 0x9d, 0x31, 0xca, 0x39, 0x7d, 0x31, 0x2d, 0x10, 0xca, + 0x19, 0xca, 0x29, 0x99, 0x24, 0xda, 0x29, 0xda, 0x09, 0xda, 0x39, 0x80, 0xa2, 0x7a, 0x15, 0x4d, + 0x7e, 0x64, 0x66, 0xf5, 0x4d, 0x33, 0x78, 0x09, 0x7c, 0xb2, 0x20, 0xe7, 0x2a, 0x7e, 0x64, 0x66, + 0x74, 0x7a, 0x65, 0x4b, 0x22, 0x75, 0x2f, 0x52, 0x12, 0x73, 0x35, 0x7e, 0x21, 0x4d, 0x7e, 0x09, + 0x30, 0x0b, 0x04, 0x1b, 0x34, 0x78, 0x89, 0x80, 0xd4, 0x75, 0x2f, 0x54, 0x12, 0x73, 0x35, 0x7e, + 0x15, 0x4d, 0x7e, 0x25, 0x4f, 0x80, 0x90, 0x5e, 0x20, 0x07, 0x54, 0x78, 0x7e, 0x44, 0x67, 0x7d, + 0x30, 0xe6, 0x16, 0x4d, 0x33, 0x68, 0x26, 0x1b, 0x34, 0x7e, 0x09, 0x40, 0x0b, 0x04, 0x7e, 0x44, + 0x34, 0xfa, 0x20, 0xe3, 0x04, 0x7e, 0x44, 0x67, 0x85, 0xca, 0x09, 0xca, 0x39, 0x99, 0x44, 0xda, + 0x39, 0xda, 0x09, 0x7e, 0x64, 0x66, 0x7f, 0x4d, 0x33, 0x68, 0xa6, 0x89, 0x64, 0x7a, 0x15, 0x4d, + 0xf5, 0x4f, 0x7e, 0x64, 0x67, 0x58, 0x80, 0x99, 0x7e, 0x15, 0x4d, 0xe5, 0x4f, 0x80, 0xc4, 0xc0, + 0xd0, 0xc0, 0xd1, 0xc0, 0xe0, 0xca, 0x19, 0x75, 0x2f, 0xfe, 0x12, 0x73, 0x35, 0x7e, 0x14, 0x00, + 0x53, 0x02, 0x40, 0x52, 0xda, 0x19, 0xd0, 0xe0, 0xd0, 0xd1, 0xd0, 0xd0, 0x32, 0x03, 0xa5, 0xcb, + 0x19, 0xb1, 0x80, 0x00, 0x22, 0x22, 0x7e, 0x24, 0x00, 0x00, 0x7f, 0xe1, 0x7e, 0xa0, 0x02, 0xa4, + 0x7e, 0x04, 0x68, 0xb1, 0x9d, 0x05, 0x7e, 0xb0, 0x28, 0x7a, 0xb3, 0x95, 0x00, 0x89, 0x04, 0xca, + 0x29, 0xb4, 0x80, 0xe2, 0x7e, 0x24, 0x00, 0x00, 0x7f, 0xe1, 0x7e, 0x00, 0x28, 0x7a, 0x03, 0x95, + 0x00, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0x7e, 0x00, 0x00, 0x7a, 0x03, 0x95, 0x00, 0xda, 0x29, 0x22, 0x7e, 0x24, 0x00, 0x00, 0x7f, + 0xe1, 0x7e, 0xa0, 0x02, 0xa4, 0x7e, 0x04, 0x69, 0xe6, 0x9d, 0x05, 0x7e, 0xb0, 0x38, 0x7a, 0xb3, + 0x95, 0x00, 0x89, 0x04, 0xca, 0x29, 0xb4, 0x80, 0xe2, 0x7e, 0x24, 0x00, 0x00, 0x7f, 0xe1, 0x7e, + 0x00, 0x38, 0x7a, 0x03, 0x95, 0x00, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0x7e, 0x00, 0x00, 0x7a, 0x03, 0x95, 0x00, 0xda, 0x29, 0x22, + 0xca, 0x29, 0xca, 0x19, 0xca, 0x58, 0x7e, 0x24, 0x00, 0x00, 0x7f, 0xe1, 0xda, 0x58, 0x7e, 0x54, + 0x02, 0x20, 0x9c, 0xb5, 0xa4, 0x7e, 0x50, 0x30, 0x5e, 0x20, 0x07, 0x2c, 0x52, 0x7a, 0x53, 0x95, + 0x00, 0x2e, 0x54, 0x6a, 0x17, 0x89, 0x54, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, + 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0x7e, 0x00, 0x00, 0x7a, 0x03, 0x95, 0x00, 0xda, 0x19, + 0xda, 0x29, 0x22, 0xca, 0x19, 0xca, 0x58, 0x7e, 0x24, 0x00, 0x00, 0x7f, 0xe1, 0xda, 0x58, 0x7e, + 0x54, 0x02, 0x38, 0x9c, 0xb5, 0xa4, 0x7e, 0x50, 0x20, 0x5e, 0x20, 0x07, 0x2c, 0x52, 0x7a, 0x53, + 0x95, 0x00, 0x2e, 0x54, 0x6a, 0x88, 0x89, 0x54, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, + 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0xe0, 0xa3, 0x7e, 0x00, 0x00, 0x7a, 0x03, 0x95, 0x00, 0xda, + 0x19, 0x22, 0x02, 0x6b, 0xa8, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b, 0xca, 0x3b, 0xca, 0x4b, 0xca, + 0x5b, 0xca, 0x6b, 0xca, 0x7b, 0xca, 0xeb, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0xb3, 0x2c, + 0x7f, 0xb4, 0x00, 0x02, 0x80, 0x1c, 0xb4, 0x01, 0x19, 0x7e, 0xb3, 0x91, 0x14, 0x54, 0x14, 0x68, + 0x05, 0x12, 0x6b, 0x6c, 0x80, 0x23, 0x7e, 0xb3, 0x91, 0x14, 0x30, 0xe5, 0x1c, 0x12, 0x6c, 0xaa, + 0x80, 0x17, 0x7e, 0xb3, 0x91, 0x14, 0x30, 0xe5, 0x05, 0x12, 0x6c, 0xaa, 0x80, 0x0b, 0x7e, 0xb3, + 0x91, 0x14, 0x54, 0x14, 0x68, 0x03, 0x12, 0x6b, 0x6c, 0xda, 0xeb, 0xda, 0x7b, 0xda, 0x6b, 0xda, + 0x5b, 0xda, 0x4b, 0xda, 0x3b, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0x20, 0xe4, 0x19, 0x75, + 0x2f, 0x0a, 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x2c, 0x7e, 0x70, 0x0a, 0x7e, 0xb3, 0x2c, 0x7f, 0xb4, + 0x01, 0x1f, 0x02, 0x6c, 0x04, 0x02, 0x71, 0xf2, 0x75, 0x2f, 0x0b, 0x12, 0x73, 0x35, 0x74, 0x14, + 0x7a, 0xb3, 0x91, 0x14, 0x7e, 0xb3, 0x2c, 0x7f, 0xb4, 0x02, 0x0c, 0x12, 0x6b, 0xb4, 0x02, 0x6b, + 0xa8, 0x74, 0x04, 0x7a, 0xb3, 0x91, 0x14, 0x22, 0x7e, 0x00, 0x00, 0x7a, 0x03, 0x2c, 0x7f, 0x7a, + 0x03, 0x2c, 0x80, 0x22, 0x7e, 0xb3, 0x2c, 0x76, 0x54, 0x60, 0x60, 0x05, 0xb4, 0x40, 0x1e, 0x80, + 0x1c, 0x7e, 0xb3, 0x2c, 0x77, 0xb4, 0x05, 0x15, 0x75, 0x2f, 0x71, 0x12, 0x73, 0x35, 0x7e, 0xb3, + 0x2c, 0x79, 0x7e, 0xa0, 0x01, 0x7a, 0xa3, 0x91, 0x06, 0x7a, 0xb3, 0x91, 0x07, 0x22, 0x74, 0x00, + 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x10, 0x7a, 0xb3, 0x91, 0x12, 0x22, 0xbe, 0x57, 0x2c, 0x7c, 0x28, + 0x04, 0x7e, 0x57, 0x2c, 0x7c, 0x7a, 0x0f, 0x2c, 0x82, 0x7a, 0x57, 0x2c, 0x86, 0x74, 0x10, 0x7a, + 0xb3, 0x91, 0x12, 0x22, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0xb3, 0x91, 0x1a, 0x70, 0x53, + 0x7e, 0xb3, 0x91, 0x14, 0x20, 0xe4, 0x4c, 0x7e, 0xef, 0x2c, 0x82, 0x7e, 0xf7, 0x2c, 0x86, 0x7e, + 0x07, 0x2c, 0x86, 0x4d, 0x00, 0x68, 0x21, 0x7e, 0x00, 0x00, 0xe0, 0x7a, 0xb3, 0x91, 0x17, 0xa3, + 0xa5, 0x08, 0x1b, 0xf4, 0x68, 0x06, 0xa5, 0xb8, 0x10, 0xf0, 0x80, 0x19, 0x7e, 0xb0, 0x00, 0x7a, + 0xb3, 0x2c, 0x7f, 0xbe, 0x00, 0x10, 0x68, 0x0d, 0x7e, 0xb0, 0x00, 0x7a, 0xb3, 0x2c, 0x7f, 0x74, + 0x80, 0x7a, 0xb3, 0x91, 0x1e, 0x7a, 0xef, 0x2c, 0x82, 0x7a, 0xf7, 0x2c, 0x86, 0x75, 0x2f, 0x06, + 0x12, 0x73, 0x35, 0x74, 0x04, 0x7a, 0xb3, 0x91, 0x14, 0x22, 0xca, 0x0b, 0xca, 0x1b, 0xca, 0x2b, + 0xca, 0x3b, 0xca, 0x4b, 0xca, 0x5b, 0xca, 0x6b, 0xca, 0x7b, 0xca, 0xeb, 0x75, 0x2f, 0x03, 0x12, + 0x73, 0x35, 0x74, 0x00, 0x7a, 0xb3, 0x2c, 0x7e, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x01, + 0x7a, 0xb3, 0x91, 0x12, 0x12, 0x6d, 0x19, 0xda, 0xeb, 0xda, 0x7b, 0xda, 0x6b, 0xda, 0x5b, 0xda, + 0x4b, 0xda, 0x3b, 0xda, 0x2b, 0xda, 0x1b, 0xda, 0x0b, 0x22, 0x75, 0x2f, 0x03, 0x12, 0x73, 0x35, + 0x7e, 0xb3, 0x2c, 0x80, 0xb4, 0x02, 0x11, 0x74, 0x00, 0x7a, 0xb3, 0x2c, 0x80, 0x7a, 0xb3, 0x2c, + 0x7f, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x14, 0x22, 0xb4, 0x01, 0x46, 0x7e, 0xb3, 0x91, 0x04, 0x20, + 0xe6, 0x42, 0x7e, 0x23, 0x91, 0x1a, 0x7c, 0x32, 0x7e, 0x13, 0x2c, 0x81, 0x2c, 0x21, 0x7a, 0x23, + 0x2c, 0x81, 0x7e, 0x00, 0x00, 0x2e, 0x04, 0x2c, 0x88, 0x7e, 0xb3, 0x91, 0x16, 0x7a, 0x09, 0xb0, + 0x0b, 0x04, 0xa5, 0xdb, 0xf4, 0x74, 0x20, 0x7a, 0xb3, 0x91, 0x14, 0x75, 0x2f, 0x70, 0x12, 0x73, + 0x35, 0x7e, 0xb3, 0x2c, 0x81, 0x7e, 0xa3, 0x2c, 0x7d, 0xbc, 0xab, 0x78, 0x03, 0x12, 0x6d, 0xb9, + 0x22, 0x02, 0x71, 0xf2, 0xda, 0x59, 0x02, 0x6c, 0x7c, 0x74, 0xe0, 0x7a, 0xb3, 0x91, 0x00, 0x7e, + 0x03, 0x91, 0x10, 0x7e, 0x13, 0x91, 0x11, 0x7e, 0x33, 0x91, 0x12, 0x7e, 0x23, 0x91, 0x13, 0x7e, + 0x53, 0x91, 0x14, 0x7e, 0x43, 0x91, 0x15, 0x7e, 0x73, 0x91, 0x16, 0x7e, 0x63, 0x91, 0x17, 0x7a, + 0x0f, 0x2c, 0x76, 0x7a, 0x1f, 0x2c, 0x7a, 0x75, 0x2f, 0x04, 0x12, 0x73, 0x35, 0x7a, 0x01, 0x2f, + 0x12, 0x73, 0x35, 0x7a, 0x11, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x21, 0x2f, 0x12, 0x73, 0x35, 0x7a, + 0x31, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x41, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x51, 0x2f, 0x12, 0x73, + 0x35, 0x7a, 0x61, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x71, 0x2f, 0x12, 0x73, 0x35, 0x74, 0x00, 0x7a, + 0xb3, 0x91, 0x00, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x04, 0x12, 0x6d, 0x8d, 0x22, 0x6d, 0x00, 0x7e, + 0x14, 0x01, 0x02, 0x7a, 0x07, 0x2c, 0x86, 0x7a, 0x03, 0x2c, 0x81, 0x7e, 0xb3, 0x2c, 0x76, 0x20, + 0xe7, 0x0f, 0x7a, 0x23, 0x2c, 0x80, 0x7a, 0x33, 0x2c, 0x7f, 0xbe, 0x07, 0x2c, 0x7c, 0x68, 0x09, + 0x22, 0x7a, 0x33, 0x2c, 0x80, 0x7a, 0x23, 0x2c, 0x7f, 0x7e, 0xb3, 0x2c, 0x76, 0x54, 0xe3, 0x23, + 0x23, 0x30, 0xe0, 0x02, 0xd2, 0xe5, 0x30, 0xe7, 0x02, 0xd2, 0xe4, 0x30, 0xe5, 0x06, 0x30, 0xe4, + 0x03, 0x02, 0x71, 0xf2, 0x54, 0x3e, 0xf5, 0xf0, 0x03, 0x54, 0x1f, 0xc3, 0x25, 0xf0, 0x90, 0x6d, + 0xe5, 0x75, 0x84, 0xff, 0x73, 0x02, 0x6f, 0xa0, 0x02, 0x6e, 0x2d, 0x02, 0x70, 0x39, 0x02, 0x70, + 0x54, 0x02, 0x6f, 0x37, 0x02, 0x6e, 0xc2, 0x02, 0x70, 0x85, 0x02, 0x70, 0x85, 0x02, 0x70, 0x88, + 0x02, 0x70, 0x88, 0x02, 0x70, 0x88, 0x02, 0x70, 0x88, 0x02, 0x70, 0x88, 0x02, 0x70, 0x88, 0x02, + 0x70, 0x88, 0x02, 0x70, 0x88, 0x02, 0x70, 0x8e, 0x02, 0x71, 0x60, 0x02, 0x70, 0x8b, 0x02, 0x70, + 0x8b, 0x02, 0x70, 0x8b, 0x02, 0x70, 0x8b, 0x02, 0x70, 0x8b, 0x02, 0x70, 0x8b, 0x74, 0x00, 0x7a, + 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, 0x7e, 0xb3, 0x2c, 0x77, 0xb4, 0x06, 0x2a, + 0x7e, 0xb3, 0x2c, 0x78, 0x60, 0x79, 0x7c, 0x0b, 0x7e, 0x13, 0x2c, 0x79, 0x7e, 0x17, 0x2c, 0x7a, + 0x75, 0x2f, 0x72, 0x12, 0x73, 0x35, 0x7a, 0x01, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x11, 0x2f, 0x12, + 0x73, 0x35, 0x12, 0x72, 0x37, 0x40, 0x58, 0x02, 0x6b, 0xeb, 0xb4, 0x08, 0x1c, 0x75, 0x2f, 0x74, + 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x3f, 0xf1, 0x7e, 0x08, 0x2c, 0x88, 0x7a, 0x0c, 0x00, 0x00, 0x7a, + 0x0b, 0xb0, 0x7e, 0x54, 0x00, 0x01, 0x02, 0x6b, 0xeb, 0xb4, 0x00, 0x33, 0x75, 0x2f, 0x75, 0x12, + 0x73, 0x35, 0x7e, 0x08, 0x2c, 0x88, 0x7a, 0x0c, 0x00, 0x00, 0xca, 0x0b, 0x7e, 0xb3, 0x3f, 0xf2, + 0x30, 0xe0, 0x07, 0x74, 0x02, 0x7a, 0x0b, 0xb0, 0x80, 0x05, 0x74, 0x00, 0x7a, 0x0b, 0xb0, 0x0b, + 0x14, 0x74, 0x00, 0x7a, 0x0b, 0xb0, 0x7e, 0x54, 0x00, 0x02, 0xda, 0x0b, 0x02, 0x6b, 0xeb, 0x02, + 0x71, 0xf2, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, 0x7e, 0xb3, + 0x2c, 0x77, 0xb4, 0x00, 0x5f, 0x75, 0x2f, 0x76, 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x2c, 0x7b, 0x54, + 0x0f, 0xb4, 0x02, 0x05, 0x7e, 0xb0, 0x60, 0x80, 0x17, 0xb4, 0x00, 0x05, 0x7e, 0xb0, 0x00, 0x80, + 0x0f, 0x7e, 0xb3, 0x2c, 0x7b, 0x20, 0xe7, 0x05, 0x7e, 0xb0, 0x40, 0x80, 0x03, 0x7e, 0xb0, 0x20, + 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0xb3, 0x91, 0x11, 0x30, 0xe0, 0x04, 0x74, 0x01, 0x80, 0x02, 0x74, + 0x00, 0x7e, 0x08, 0x2c, 0x88, 0x7a, 0x0c, 0x00, 0x00, 0xca, 0x0b, 0x7a, 0x0b, 0xb0, 0x0b, 0x14, + 0x74, 0x00, 0x7a, 0x0b, 0xb0, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x7e, 0x54, 0x00, 0x02, 0xda, + 0x0b, 0x02, 0x6b, 0xeb, 0x02, 0x71, 0xf2, 0x7e, 0xb3, 0x2c, 0x7b, 0x54, 0x0f, 0xb4, 0x02, 0x05, + 0x7e, 0xb0, 0x60, 0x80, 0x17, 0xb4, 0x00, 0x05, 0x7e, 0xb0, 0x00, 0x80, 0x0f, 0x7e, 0xb3, 0x2c, + 0x7b, 0x20, 0xe7, 0x05, 0x7e, 0xb0, 0x40, 0x80, 0x03, 0x7e, 0xb0, 0x20, 0x7a, 0xb3, 0x91, 0x00, + 0x7e, 0xb3, 0x2c, 0x79, 0xb4, 0x00, 0x26, 0x7e, 0xb3, 0x2c, 0x77, 0xb4, 0x01, 0x0e, 0x75, 0x2f, + 0x77, 0x12, 0x73, 0x35, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x12, 0x80, 0x1b, 0xb4, 0x03, 0x0e, 0x75, + 0x2f, 0x78, 0x12, 0x73, 0x35, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x11, 0x80, 0x0a, 0x74, 0x00, 0x7a, + 0xb3, 0x91, 0x00, 0x12, 0x71, 0xf2, 0x22, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x02, 0x6b, 0xde, + 0x7e, 0xb3, 0x2c, 0x77, 0xb4, 0x09, 0x1f, 0x75, 0x2f, 0x79, 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x2c, + 0x79, 0xbe, 0xb3, 0x3f, 0xf1, 0x68, 0x0d, 0xca, 0xb8, 0x12, 0x43, 0x79, 0xda, 0xb8, 0x50, 0x76, + 0x7a, 0xb3, 0x3f, 0xf1, 0x80, 0x6d, 0xb4, 0x05, 0x08, 0x75, 0x2f, 0x7a, 0x12, 0x73, 0x35, 0x80, + 0x62, 0xb4, 0x03, 0x19, 0x75, 0x2f, 0x7b, 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x2c, 0x79, 0xb4, 0x01, + 0x55, 0x7e, 0xb3, 0x3f, 0xf2, 0x44, 0x01, 0x7a, 0xb3, 0x3f, 0xf2, 0x80, 0x46, 0xb4, 0x01, 0x19, + 0x75, 0x2f, 0x7c, 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x2c, 0x79, 0xb4, 0x01, 0x39, 0x7e, 0xb3, 0x3f, + 0xf2, 0x54, 0xfe, 0x7a, 0xb3, 0x3f, 0xf2, 0x80, 0x2a, 0xb4, 0x07, 0x2a, 0x7e, 0xb3, 0x2c, 0x78, + 0x60, 0x24, 0x7c, 0x0b, 0x7e, 0x13, 0x2c, 0x79, 0x7e, 0x17, 0x2c, 0x7a, 0x75, 0x2f, 0x73, 0x12, + 0x73, 0x35, 0x7a, 0x01, 0x2f, 0x12, 0x73, 0x35, 0x7a, 0x11, 0x2f, 0x12, 0x73, 0x35, 0x12, 0x72, + 0x71, 0x40, 0x03, 0x02, 0x6b, 0xde, 0x02, 0x71, 0xf2, 0x7e, 0xb3, 0x2c, 0x77, 0xb4, 0x0b, 0xf6, + 0x75, 0x2f, 0x7d, 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x2c, 0x79, 0x7e, 0xa3, 0x2c, 0x7b, 0x4c, 0xab, + 0x78, 0xe4, 0x80, 0xdf, 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, + 0x7e, 0xb3, 0x2c, 0x77, 0xb4, 0x0a, 0xcf, 0x75, 0x2f, 0x7e, 0x12, 0x73, 0x35, 0x7e, 0xb3, 0x2c, + 0x79, 0x70, 0xc3, 0x7e, 0x08, 0x2c, 0x88, 0x7a, 0x0c, 0x00, 0x00, 0x7a, 0x0b, 0xb0, 0x7e, 0x54, + 0x00, 0x01, 0x02, 0x6b, 0xeb, 0x02, 0x71, 0xf2, 0x02, 0x71, 0xf2, 0x02, 0x71, 0xf2, 0x7e, 0xb3, + 0x2c, 0x77, 0xb4, 0x04, 0x20, 0x75, 0x2f, 0xc3, 0x12, 0x73, 0x35, 0x7e, 0x04, 0x00, 0x01, 0x7e, + 0x17, 0x2c, 0x78, 0x7e, 0x18, 0x2c, 0x88, 0x7a, 0x1c, 0x00, 0x00, 0x7e, 0x47, 0x2c, 0x7c, 0x12, + 0x73, 0x41, 0x02, 0x71, 0x5a, 0xb4, 0x06, 0x42, 0x75, 0x2f, 0xc1, 0x12, 0x73, 0x35, 0x7e, 0x58, + 0x00, 0x00, 0x7a, 0x5c, 0x00, 0xfe, 0x7d, 0xca, 0x7e, 0xd7, 0x2c, 0x78, 0x7e, 0x78, 0x2c, 0x88, + 0x7a, 0x7c, 0x00, 0x00, 0x7e, 0x77, 0x2c, 0x7c, 0x75, 0x2f, 0xc1, 0x12, 0x73, 0x35, 0xc0, 0xa8, + 0xc2, 0xaf, 0x7e, 0x40, 0x01, 0x7a, 0x43, 0x94, 0x00, 0x12, 0x73, 0x7a, 0x7e, 0x43, 0x2c, 0x35, + 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8, 0x40, 0x65, 0x80, 0x60, 0xb4, 0x00, 0x24, 0xc2, 0xaf, 0x7e, + 0xb0, 0x01, 0x7a, 0xb3, 0x94, 0x00, 0x7a, 0xb3, 0x2c, 0x35, 0x12, 0x6b, 0xde, 0xe4, 0x8d, 0xef, + 0x8d, 0xef, 0x8d, 0xef, 0xd5, 0xe0, 0xf7, 0xc0, 0xd1, 0xca, 0x02, 0xff, 0xca, 0x06, 0x00, 0x00, + 0x32, 0xb4, 0x09, 0x20, 0x74, 0x03, 0x7a, 0xb3, 0x91, 0x06, 0x7e, 0x23, 0x91, 0x07, 0x7e, 0x57, + 0x2c, 0x78, 0x4d, 0x55, 0x68, 0x05, 0x4e, 0x20, 0x02, 0x80, 0x03, 0x5e, 0x20, 0xfd, 0x7a, 0x23, + 0x91, 0x07, 0x80, 0x16, 0xb4, 0x07, 0x16, 0xc2, 0xaf, 0x7e, 0x07, 0x2c, 0x7a, 0x7e, 0x17, 0x2c, + 0x78, 0xc0, 0xd1, 0xca, 0x18, 0xca, 0x38, 0xca, 0x28, 0x32, 0x02, 0x6b, 0xde, 0x02, 0x71, 0xf2, + 0x74, 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x60, 0x7a, 0xb3, 0x91, 0x1c, 0x7e, 0xb3, 0x2c, 0x77, + 0xb4, 0x03, 0x15, 0x75, 0x2f, 0xc2, 0x12, 0x73, 0x35, 0x7e, 0x04, 0x00, 0x01, 0x7e, 0x17, 0x2c, + 0x78, 0x7e, 0x57, 0x2c, 0x7c, 0x02, 0x6b, 0xeb, 0xb4, 0x05, 0x41, 0x75, 0x2f, 0xc0, 0x12, 0x73, + 0x35, 0xc0, 0xa8, 0xc2, 0xaf, 0x7e, 0x40, 0x01, 0x7a, 0x43, 0x94, 0x00, 0x7e, 0x08, 0x2c, 0x88, + 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x24, 0x00, 0xfe, 0x7e, 0x37, 0x2c, 0x78, 0x7e, 0x47, 0x2c, 0x7c, + 0x12, 0x73, 0x41, 0x7e, 0x43, 0x2c, 0x35, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8, 0x7e, 0x08, 0x2c, + 0x88, 0x7a, 0x0c, 0x00, 0x00, 0x7e, 0x57, 0x2c, 0x7c, 0x02, 0x6b, 0xeb, 0xb4, 0x01, 0x20, 0x7e, + 0x00, 0x00, 0x7e, 0x10, 0x01, 0x75, 0x2f, 0x72, 0x12, 0x73, 0x35, 0x7a, 0x01, 0x2f, 0x12, 0x73, + 0x35, 0x7a, 0x11, 0x2f, 0x12, 0x73, 0x35, 0x12, 0x72, 0x37, 0x40, 0x03, 0x02, 0x6b, 0xeb, 0x02, + 0x71, 0xf2, 0x75, 0x2f, 0x07, 0x12, 0x73, 0x35, 0x7e, 0xb0, 0x02, 0x7a, 0xb3, 0x90, 0x00, 0x74, + 0x00, 0x7a, 0xb3, 0x91, 0x00, 0x74, 0x40, 0x7a, 0xb3, 0x91, 0x15, 0x74, 0x01, 0x7a, 0xb3, 0x91, + 0x11, 0x7e, 0xb3, 0x91, 0x15, 0x54, 0x60, 0xbe, 0xb0, 0x40, 0x68, 0x08, 0x74, 0x20, 0x7a, 0xb3, + 0x91, 0x15, 0x80, 0xed, 0x74, 0x01, 0x7a, 0xb3, 0x91, 0x12, 0x74, 0x04, 0x7a, 0xb3, 0x91, 0x14, + 0x74, 0xff, 0x7a, 0xb3, 0x2c, 0x7e, 0x22, 0xc0, 0xa8, 0xc2, 0xaf, 0x7e, 0x40, 0x01, 0x7a, 0x43, + 0x94, 0x00, 0x12, 0x72, 0xbe, 0x40, 0x1f, 0x7e, 0x08, 0x2c, 0x88, 0x7a, 0x0c, 0x00, 0x00, 0xca, + 0x0b, 0xca, 0x49, 0x12, 0x73, 0x41, 0xda, 0x59, 0xda, 0x0b, 0x7e, 0x43, 0x2c, 0x35, 0x7a, 0x43, + 0x94, 0x00, 0xd0, 0xa8, 0xc3, 0x22, 0x7e, 0x43, 0x2c, 0x35, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8, + 0x22, 0xc0, 0xa8, 0xc2, 0xaf, 0x7e, 0x40, 0x01, 0x7a, 0x43, 0x94, 0x00, 0x12, 0x72, 0xbe, 0x40, + 0x31, 0x7e, 0x58, 0x00, 0x00, 0x7a, 0x5c, 0x00, 0xfe, 0x7f, 0x61, 0x7e, 0x78, 0x2c, 0x88, 0x7a, + 0x7c, 0x00, 0x00, 0x7e, 0x77, 0x2c, 0x7c, 0xbd, 0x74, 0x78, 0x17, 0x75, 0x2f, 0xc1, 0x12, 0x73, + 0x35, 0x12, 0x73, 0x7a, 0x40, 0x0c, 0x7e, 0x43, 0x2c, 0x35, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8, + 0xc3, 0x22, 0x7e, 0x43, 0x2c, 0x35, 0x7a, 0x43, 0x94, 0x00, 0xd0, 0xa8, 0xd3, 0x22, 0x7e, 0x24, + 0x00, 0xfe, 0x7e, 0x34, 0x7f, 0xca, 0x0b, 0x1a, 0x50, 0xc5, 0xf0, 0x7d, 0x62, 0x7d, 0x75, 0x7d, + 0x87, 0x7e, 0x34, 0x7f, 0xc2, 0x7e, 0x1b, 0xb0, 0x7e, 0x34, 0x7f, 0x03, 0xb4, 0x01, 0x04, 0x7e, + 0x34, 0x7f, 0xcc, 0x7e, 0x1b, 0xb0, 0xbc, 0x0b, 0x50, 0x49, 0x3e, 0x00, 0x3e, 0x00, 0x0a, 0x50, + 0x2d, 0x75, 0x0b, 0x3a, 0x30, 0x69, 0x53, 0x00, 0x02, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbc, + 0x1b, 0x50, 0x30, 0x3e, 0x10, 0x3e, 0x10, 0x0a, 0x51, 0x2d, 0x35, 0x69, 0x41, 0x00, 0x02, 0x0b, + 0x1a, 0x30, 0xbd, 0x38, 0x50, 0x02, 0x2d, 0x38, 0xbe, 0x44, 0xff, 0xff, 0x78, 0x05, 0x7e, 0x1b, + 0x90, 0x0a, 0x49, 0x4d, 0x44, 0x68, 0x0c, 0xbe, 0x44, 0x00, 0xff, 0x28, 0x04, 0x7e, 0x44, 0x00, + 0xff, 0xc3, 0x22, 0xd3, 0x22, + +// Segment #16, Start Address 00ff7fc6, Length 4 +0xff,0x00,0xc6,0x7f,0x04,0x00, + 0x02, 0x00, 0x03, 0x00, + +// Segment #17, Start Address 00ff7335, Length 328 +0xff,0x00,0x35,0x73,0x48,0x01, + 0xca, 0x08, 0x7e, 0x01, 0x2f, 0x7a, 0x03, 0x3f, 0xf0, 0xda, 0x08, 0x22, 0x7e, 0x1b, 0xc0, 0x7a, + 0x0b, 0xc0, 0x0b, 0x14, 0x0b, 0x34, 0x1b, 0x44, 0x78, 0xf2, 0x22, 0x7f, 0x6f, 0x7f, 0xf0, 0x1b, + 0xfc, 0x7c, 0x54, 0x7d, 0x32, 0x80, 0x08, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0xca, 0x1b, 0x9e, + 0x44, 0x00, 0x10, 0x50, 0xf2, 0x2e, 0x44, 0x00, 0x10, 0x68, 0x06, 0xca, 0x48, 0x1b, 0x44, 0x78, + 0xfa, 0x7f, 0xf6, 0x89, 0xe4, 0xca, 0x6b, 0x5e, 0xd4, 0x00, 0x3f, 0x68, 0x20, 0x7e, 0x84, 0x00, + 0x40, 0x9d, 0x8d, 0xda, 0x6b, 0xbd, 0x87, 0x38, 0x16, 0xca, 0x79, 0x7d, 0x78, 0x12, 0x73, 0xa4, + 0xda, 0x79, 0x40, 0x08, 0x9d, 0x78, 0x68, 0x02, 0x80, 0x05, 0xc2, 0xd7, 0x22, 0xda, 0x6b, 0x7e, + 0xc0, 0x03, 0x7e, 0xd0, 0x00, 0x7a, 0xd3, 0x90, 0x00, 0x74, 0xaa, 0x39, 0xb5, 0x55, 0x55, 0x74, + 0x55, 0x39, 0xb5, 0x2a, 0xaa, 0x74, 0xa0, 0x39, 0xb5, 0x55, 0x55, 0x7e, 0x04, 0x00, 0x40, 0x9d, + 0x70, 0x50, 0x06, 0x2d, 0x70, 0x7d, 0x07, 0x6d, 0x77, 0x7c, 0x31, 0x7e, 0x7b, 0x00, 0x7a, 0x6b, + 0x00, 0x0b, 0x7c, 0x0b, 0x6c, 0xa5, 0xd9, 0xf3, 0x7f, 0x16, 0x1b, 0x1c, 0x7e, 0x54, 0x27, 0x10, + 0x7e, 0x1b, 0x10, 0xbc, 0x10, 0x68, 0x06, 0x1b, 0x54, 0x78, 0xf5, 0x80, 0x2f, 0x6d, 0x00, 0x7c, + 0x20, 0x7f, 0x16, 0x9f, 0x10, 0x7f, 0x27, 0x9f, 0x20, 0x7e, 0x2b, 0x00, 0x7e, 0x1b, 0x10, 0xbc, + 0x01, 0x78, 0x19, 0x0b, 0x2c, 0x0b, 0x1c, 0xa5, 0xdb, 0xef, 0x7c, 0xb6, 0x20, 0xe0, 0x06, 0x6c, + 0xdc, 0x7a, 0xd3, 0x90, 0x00, 0x4d, 0x77, 0x78, 0x90, 0xc2, 0xd7, 0x22, 0xd2, 0xd7, 0x22, 0x00, + 0x04, 0x00, 0x04, 0x00, 0x00, 0x06, 0x04, 0x02, 0x04, 0x00, 0x02, 0x01, 0x04, 0x01, 0x02, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x02, 0x02, 0x02, 0x02, 0x04, 0x00, 0x08, 0x10, + 0x02, 0x10, 0x04, 0x02, 0x08, 0x00, 0x01, 0x01, 0x08, 0x7e, 0x18, 0x7f, 0xbd, 0x7a, 0x1c, 0x00, + 0xfe, 0x0b, 0x1a, 0x00, 0x5e, 0x10, 0x1f, 0xbe, 0x10, 0x14, 0x38, 0x1a, 0x0a, 0x51, 0x23, 0x7e, + 0x18, 0x74, 0x24, 0x7a, 0x1c, 0x00, 0xff, 0x2d, 0x35, 0x0b, 0x1a, 0x50, 0x60, 0x08, 0xa5, 0xb8, + 0x02, 0x03, 0x4e, 0xa0, 0x08, 0x22, 0x80, 0xfe, +}; + +static EDGE_FIRMWARE_VERSION_INFO IMAGE_VERSION_NAME = { + 2, 0, 3 }; // Major, Minor, Build + +#undef IMAGE_VERSION_NAME + +#undef IMAGE_ARRAY_NAME + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/io_ionsp.h linux.20p6/drivers/usb/serial/io_ionsp.h --- linux.vanilla/drivers/usb/serial/io_ionsp.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/usb/serial/io_ionsp.h Mon Jun 18 08:11:10 2001 @@ -0,0 +1,454 @@ +/************************************************************************ + * + * IONSP.H Definitions for I/O Networks Serial Protocol + * + * Copyright (c) 1997-1998 Inside Out Networks, Inc. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * These definitions are used by both kernel-mode driver and the + * peripheral firmware and MUST be kept in sync. + * + ************************************************************************/ + +/************************************************************************ + +The data to and from all ports on the peripheral is multiplexed +through a single endpoint pair (EP1 since it supports 64-byte +MaxPacketSize). Therefore, the data, commands, and status for +each port must be preceeded by a short header identifying the +destination port. The header also identifies the bytes that follow +as data or as command/status info. + +Header format, first byte: + + CLLLLPPP + -------- + | | |------ Port Number: 0-7 + | |--------- Length: MSB bits of length + |----------- Data/Command: 0 = Data header + 1 = Cmd / Status (Cmd if OUT, Status if IN) + +This gives 2 possible formats: + + + Data header: 0LLLLPPP LLLLLLLL + ============ + + Where (LLLL,LLLLLLL) is 12-bit length of data that follows for + port number (PPP). The length is 0-based (0-FFF means 0-4095 + bytes). The ~4K limit allows the host driver (which deals in + transfer requests instead of individual packets) to write a + large chunk of data in a single request. Note, however, that + the length must always be <= the current TxCredits for a given + port due to buffering limitations on the peripheral. + + + Cmd/Status header: 1ccccPPP [ CCCCCCCC, Params ]... + ================== + + Where (cccc) or (cccc,CCCCCCCC) is the cmd or status identifier. + Frequently-used values are encoded as (cccc), longer ones using + (cccc,CCCCCCCC). Subsequent bytes are optional parameters and are + specific to the cmd or status code. This may include a length + for command and status codes that need variable-length parameters. + + +In addition, we use another interrupt pipe (endpoint) which the host polls +periodically for flow control information. The peripheral, when there has +been a change, sends the following 10-byte packet: + + RRRRRRRRRRRRRRRR + T0T0T0T0T0T0T0T0 + T1T1T1T1T1T1T1T1 + T2T2T2T2T2T2T2T2 + T3T3T3T3T3T3T3T3 + +The first field is the 16-bit RxBytesAvail field, which indicates the +number of bytes which may be read by the host from EP1. This is necessary: +(a) because OSR2.1 has a bug which causes data loss if the peripheral returns +fewer bytes than the host expects to read, and (b) because, on Microsoft +platforms at least, an outstanding read posted on EP1 consumes about 35% of +the CPU just polling the device for data. + +The next 4 fields are the 16-bit TxCredits for each port, which indicate how +many bytes the host is allowed to send on EP1 for transmit to a given port. +After an OPEN_PORT command, the Edgeport sends the initial TxCredits for that +port. + +All 16-bit fields are sent in little-endian (Intel) format. + +************************************************************************/ + +// +// Define format of InterruptStatus packet returned from the +// Interrupt pipe +// + +typedef struct _INT_STATUS_PKT { + __u16 RxBytesAvail; // Additional bytes available to + // be read from Bulk IN pipe + __u16 TxCredits[ MAX_RS232_PORTS ]; // Additional space available in + // given port's TxBuffer +} INT_STATUS_PKT, *PINT_STATUS_PKT; + + +#define GET_INT_STATUS_SIZE(NumPorts) (sizeof(__u16) + (sizeof(__u16) * (NumPorts))) + + + +// +// Define cmd/status header values and macros to extract them. +// +// Data: 0LLLLPPP LLLLLLLL +// Cmd/Stat: 1ccccPPP CCCCCCCC + +#define IOSP_DATA_HDR_SIZE 2 +#define IOSP_CMD_HDR_SIZE 2 + +#define IOSP_MAX_DATA_LENGTH 0x0FFF // 12 bits -> 4K + +#define IOSP_PORT_MASK 0x07 // Mask to isolate port number +#define IOSP_CMD_STAT_BIT 0x80 // If set, this is command/status header + +#define IS_CMD_STAT_HDR(Byte1) ((Byte1) & IOSP_CMD_STAT_BIT) +#define IS_DATA_HDR(Byte1) (! IS_CMD_STAT_HDR(Byte1)) + +#define IOSP_GET_HDR_PORT(Byte1) ((__u8) ((Byte1) & IOSP_PORT_MASK)) +#define IOSP_GET_HDR_DATA_LEN(Byte1, Byte2) ((__u16) ( ((__u16)((Byte1) & 0x78)) << 5) | (Byte2)) +#define IOSP_GET_STATUS_CODE(Byte1) ((__u8) (((Byte1) & 0x78) >> 3)) + + +// +// These macros build the 1st and 2nd bytes for a data header +// +#define IOSP_BUILD_DATA_HDR1(Port, Len) ((__u8) (((Port) | ((__u8) (((__u16) (Len)) >> 5) & 0x78 )))) +#define IOSP_BUILD_DATA_HDR2(Port, Len) ((__u8) (Len)) + + +// +// These macros build the 1st and 2nd bytes for a command header +// +#define IOSP_BUILD_CMD_HDR1(Port, Cmd) ((__u8) ( IOSP_CMD_STAT_BIT | (Port) | ((__u8) ((Cmd) << 3)) )) + + +//-------------------------------------------------------------- +// +// Define values for commands and command parameters +// (sent from Host to Edgeport) +// +// 1ccccPPP P1P1P1P1 [ P2P2P2P2P2 ]... +// +// cccc: 00-07 2-byte commands. Write UART register 0-7 with +// value in P1. See 16650.H for definitions of +// UART register numbers and contents. +// +// 08-0B 3-byte commands: ==== P1 ==== ==== P2 ==== +// 08 available for expansion +// 09 1-param commands Command Code Param +// 0A available for expansion +// 0B available for expansion +// +// 0C-0D 4-byte commands. P1 = extended cmd and P2,P3 = params +// Currently unimplemented. +// +// 0E-0F N-byte commands: P1 = num bytes after P1 (ie, TotalLen - 2) +// P2 = extended cmd, P3..Pn = parameters. +// Currently unimplemented. +// + +#define IOSP_WRITE_UART_REG(n) ((n) & 0x07) // UartReg[ n ] := P1 + +// Register numbers and contents +// defined in 16554.H. + +// 0x08 // Available for expansion. +#define IOSP_EXT_CMD 0x09 // P1 = Command code (defined below) + +// P2 = Parameter + +// +// Extended Command values, used with IOSP_EXT_CMD, may +// or may not use parameter P2. +// + +#define IOSP_CMD_OPEN_PORT 0x00 // Enable ints, init UART. (NO PARAM) +#define IOSP_CMD_CLOSE_PORT 0x01 // Disable ints, flush buffers. (NO PARAM) +#define IOSP_CMD_CHASE_PORT 0x02 // Wait for Edgeport TX buffers to empty. (NO PARAM) +#define IOSP_CMD_SET_RX_FLOW 0x03 // Set Rx Flow Control in Edgeport +#define IOSP_CMD_SET_TX_FLOW 0x04 // Set Tx Flow Control in Edgeport +#define IOSP_CMD_SET_XON_CHAR 0x05 // Set XON Character in Edgeport +#define IOSP_CMD_SET_XOFF_CHAR 0x06 // Set XOFF Character in Edgeport +#define IOSP_CMD_RX_CHECK_REQ 0x07 // Request Edgeport to insert a Checkpoint into + +// the receive data stream (Parameter = 1 byte sequence number) + +#define IOSP_CMD_SET_BREAK 0x08 // Turn on the BREAK (LCR bit 6) +#define IOSP_CMD_CLEAR_BREAK 0x09 // Turn off the BREAK (LCR bit 6) + + +// +// Define macros to simplify building of IOSP cmds +// + +#define MAKE_CMD_WRITE_REG(ppBuf, pLen, Port, Reg, Val) \ + do { \ + (*(ppBuf))[0] = IOSP_BUILD_CMD_HDR1( (Port), IOSP_WRITE_UART_REG(Reg) ); \ + (*(ppBuf))[1] = (Val); \ + \ + *ppBuf += 2; \ + *pLen += 2; \ + } while (0) + +#define MAKE_CMD_EXT_CMD(ppBuf, pLen, Port, ExtCmd, Param) \ + do { \ + (*(ppBuf))[0] = IOSP_BUILD_CMD_HDR1( (Port), IOSP_EXT_CMD ); \ + (*(ppBuf))[1] = (ExtCmd); \ + (*(ppBuf))[2] = (Param); \ + \ + *ppBuf += 3; \ + *pLen += 3; \ + } while (0) + + + +//-------------------------------------------------------------- +// +// Define format of flow control commands +// (sent from Host to Edgeport) +// +// 11001PPP FlowCmd FlowTypes +// +// Note that the 'FlowTypes' parameter is a bit mask; that is, +// more than one flow control type can be active at the same time. +// FlowTypes = 0 means 'no flow control'. +// + +// +// IOSP_CMD_SET_RX_FLOW +// +// Tells Edgeport how it can stop incoming UART data +// +// Example for Port 0 +// P0 = 11001000 +// P1 = IOSP_CMD_SET_RX_FLOW +// P2 = Bit mask as follows: + +#define IOSP_RX_FLOW_RTS 0x01 // Edgeport drops RTS to stop incoming data +#define IOSP_RX_FLOW_DTR 0x02 // Edgeport drops DTR to stop incoming data +#define IOSP_RX_FLOW_DSR_SENSITIVITY 0x04 // Ignores Rx data unless DSR high + +// Not currently implemented by firmware. +#define IOSP_RX_FLOW_XON_XOFF 0x08 // Edgeport sends XOFF char to stop incoming data. + +// Host must have previously programmed the +// XON/XOFF values with SET_XON/SET_XOFF +// before enabling this bit. + +// +// IOSP_CMD_SET_TX_FLOW +// +// Tells Edgeport what signal(s) will stop it from transmitting UART data +// +// Example for Port 0 +// P0 = 11001000 +// P1 = IOSP_CMD_SET_TX_FLOW +// P2 = Bit mask as follows: + +#define IOSP_TX_FLOW_CTS 0x01 // Edgeport stops Tx if CTS low +#define IOSP_TX_FLOW_DSR 0x02 // Edgeport stops Tx if DSR low +#define IOSP_TX_FLOW_DCD 0x04 // Edgeport stops Tx if DCD low +#define IOSP_TX_FLOW_XON_XOFF 0x08 // Edgeport stops Tx upon receiving XOFF char. + +// Host must have previously programmed the +// XON/XOFF values with SET_XON/SET_XOFF +// before enabling this bit. +#define IOSP_TX_FLOW_XOFF_CONTINUE 0x10 // If not set, Edgeport stops Tx when + +// sending XOFF in order to fix broken +// systems that interpret the next +// received char as XON. +// If set, Edgeport continues Tx +// normally after transmitting XOFF. +// Not currently implemented by firmware. +#define IOSP_TX_TOGGLE_RTS 0x20 // Edgeport drives RTS as a true half-duplex + +// Request-to-Send signal: it is raised before +// beginning transmission and lowered after +// the last Tx char leaves the UART. +// Not currently implemented by firmware. + +// +// IOSP_CMD_SET_XON_CHAR +// +// Sets the character which Edgeport transmits/interprets as XON. +// Note: This command MUST be sent before sending a SET_RX_FLOW or +// SET_TX_FLOW with the XON_XOFF bit set. +// +// Example for Port 0 +// P0 = 11001000 +// P1 = IOSP_CMD_SET_XON_CHAR +// P2 = 0x11 + + +// +// IOSP_CMD_SET_XOFF_CHAR +// +// Sets the character which Edgeport transmits/interprets as XOFF. +// Note: This command must be sent before sending a SET_RX_FLOW or +// SET_TX_FLOW with the XON_XOFF bit set. +// +// Example for Port 0 +// P0 = 11001000 +// P1 = IOSP_CMD_SET_XOFF_CHAR +// P2 = 0x13 + + +// +// IOSP_CMD_RX_CHECK_REQ +// +// This command is used to assist in the implementation of the +// IOCTL_SERIAL_PURGE Windows IOCTL. +// This IOSP command tries to place a marker at the end of the RX +// queue in the Edgeport. If the Edgeport RX queue is full then +// the Check will be discarded. +// It is up to the device driver to timeout waiting for the +// RX_CHECK_RSP. If a RX_CHECK_RSP is received, the driver is +// sure that all data has been received from the edgeport and +// may now purge any internal RX buffers. +// Note tat the sequence numbers may be used to detect lost +// CHECK_REQs. + +// Example for Port 0 +// P0 = 11001000 +// P1 = IOSP_CMD_RX_CHECK_REQ +// P2 = Sequence number + + +// Response will be: +// P1 = IOSP_EXT_RX_CHECK_RSP +// P2 = Request Sequence number + + + +//-------------------------------------------------------------- +// +// Define values for status and status parameters +// (received by Host from Edgeport) +// +// 1ssssPPP P1P1P1P1 [ P2P2P2P2P2 ]... +// +// ssss: 00-07 2-byte status. ssss identifies which UART register +// has changed value, and the new value is in P1. +// Note that the ssss values do not correspond to the +// 16554 register numbers given in 16554.H. Instead, +// see below for definitions of the ssss numbers +// used in this status message. +// +// 08-0B 3-byte status: ==== P1 ==== ==== P2 ==== +// 08 LSR_DATA: New LSR Errored byte +// 09 1-param responses Response Code Param +// 0A OPEN_RSP: InitialMsr TxBufferSize +// 0B available for expansion +// +// 0C-0D 4-byte status. P1 = extended status code and P2,P3 = params +// Not currently implemented. +// +// 0E-0F N-byte status: P1 = num bytes after P1 (ie, TotalLen - 2) +// P2 = extended status, P3..Pn = parameters. +// Not currently implemented. +// + +/**************************************************** + * SSSS values for 2-byte status messages (0-8) + ****************************************************/ + +#define IOSP_STATUS_LSR 0x00 // P1 is new value of LSR register. + +// Bits defined in 16554.H. Edgeport +// returns this in order to report +// line status errors (overrun, +// parity, framing, break). This form +// is used when a errored receive data +// character was NOT present in the +// UART when the LSR error occurred +// (ie, when LSR bit 0 = 0). + +#define IOSP_STATUS_MSR 0x01 // P1 is new value of MSR register. + +// Bits defined in 16554.H. Edgeport +// returns this in order to report +// changes in modem status lines +// (CTS, DSR, RI, CD) +// + +// 0x02 // Available for future expansion +// 0x03 // +// 0x04 // +// 0x05 // +// 0x06 // +// 0x07 // + + +/**************************************************** + * SSSS values for 3-byte status messages (8-A) + ****************************************************/ + +#define IOSP_STATUS_LSR_DATA 0x08 // P1 is new value of LSR register (same as STATUS_LSR) + +// P2 is errored character read from +// RxFIFO after LSR reported an error. + +#define IOSP_EXT_STATUS 0x09 // P1 is status/response code, param in P2. + + +// Response Codes (P1 values) for 3-byte status messages + +#define IOSP_EXT_STATUS_CHASE_RSP 0 // Reply to CHASE_PORT cmd. P2 is outcome: +#define IOSP_EXT_STATUS_CHASE_PASS 0 // P2 = 0: All Tx data drained successfully +#define IOSP_EXT_STATUS_CHASE_FAIL 1 // P2 = 1: Timed out (stuck due to flow + +// control from remote device). + +#define IOSP_EXT_STATUS_RX_CHECK_RSP 1 // Reply to RX_CHECK cmd. P2 is sequence number + + +#define IOSP_STATUS_OPEN_RSP 0x0A // Reply to OPEN_PORT cmd. + +// P1 is Initial MSR value +// P2 is encoded TxBuffer Size: +// TxBufferSize = (P2 + 1) * 64 + +// 0x0B // Available for future expansion + +#define GET_TX_BUFFER_SIZE(P2) (((P2) + 1) * 64) + + + + +/**************************************************** + * SSSS values for 4-byte status messages + ****************************************************/ + +#define IOSP_EXT4_STATUS 0x0C // Extended status code in P1, + +// Params in P2, P3 +// Currently unimplemented. + +// 0x0D // Currently unused, available. + + + +// +// Macros to parse status messages +// + +#define IOSP_GET_STATUS_LEN(code) ( (code) < 8 ? 2 : ((code) < 0x0A ? 3 : 4) ) + +#define IOSP_STATUS_IS_2BYTE(code) ( (code) < 0x08 ) +#define IOSP_STATUS_IS_3BYTE(code) ( ((code) >= 0x08) && ((code) <= 0x0B) ) +#define IOSP_STATUS_IS_4BYTE(code) ( ((code) >= 0x0C) && ((code) <= 0x0D) ) + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/io_tables.h linux.20p6/drivers/usb/serial/io_tables.h --- linux.vanilla/drivers/usb/serial/io_tables.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/usb/serial/io_tables.h Mon Jun 18 08:11:10 2001 @@ -0,0 +1,437 @@ +/* + * IO Edgeport Driver tables + * + * Copyright (C) 2001 + * Greg Kroah-Hartman (greg@kroah.com) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + */ + +/* Devices that this driver supports */ +static __u16 ionetworks_vendor_id = USB_VENDOR_ID_ION; +static __u16 edgeport_4_id = ION_DEVICE_ID_EDGEPORT_4; +static __u16 rapidport_4_id = ION_DEVICE_ID_RAPIDPORT_4; +static __u16 edgeport_4t_id = ION_DEVICE_ID_EDGEPORT_4T; +static __u16 edgeport_2_id = ION_DEVICE_ID_EDGEPORT_2; +static __u16 edgeport_4i_id = ION_DEVICE_ID_EDGEPORT_4I; +static __u16 edgeport_2i_id = ION_DEVICE_ID_EDGEPORT_2I; +static __u16 edgeport_prl_id = ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT; +static __u16 edgeport_421_id = ION_DEVICE_ID_EDGEPORT_421; +static __u16 edgeport_21_id = ION_DEVICE_ID_EDGEPORT_21; +static __u16 edgeport_8dual_id = ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU; +static __u16 edgeport_8_id = ION_DEVICE_ID_EDGEPORT_8; +static __u16 edgeport_2din_id = ION_DEVICE_ID_EDGEPORT_2_DIN; +static __u16 edgeport_4din_id = ION_DEVICE_ID_EDGEPORT_4_DIN; +static __u16 edgeport_16dual_id = ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU; +static __u16 edgeport_compat_id = ION_DEVICE_ID_EDGEPORT_COMPATIBLE; +static __u16 edgeport_8i_id = ION_DEVICE_ID_EDGEPORT_8I; + + +/* build up the list of devices that this driver supports */ +struct usb_serial_device_type edgeport_4_device = { + name: "Edgeport 4", + idVendor: &ionetworks_vendor_id, + idProduct: &edgeport_4_id, + needs_interrupt_in: MUST_HAVE, + needs_bulk_in: MUST_HAVE, + needs_bulk_out: MUST_HAVE, + num_interrupt_in: 1, + num_bulk_in: 1, + num_bulk_out: 1, + num_ports: 4, + open: edge_open, + close: edge_close, + throttle: edge_throttle, + unthrottle: edge_unthrottle, + startup: edge_startup, + shutdown: edge_shutdown, + ioctl: edge_ioctl, + set_termios: edge_set_termios, + write: edge_write, + write_room: edge_write_room, + chars_in_buffer: edge_chars_in_buffer, + break_ctl: edge_break, +}; + +struct usb_serial_device_type rapidport_4_device = { + name: "Rapidport 4", + idVendor: &ionetworks_vendor_id, + idProduct: &rapidport_4_id, + needs_interrupt_in: MUST_HAVE, + needs_bulk_in: MUST_HAVE, + needs_bulk_out: MUST_HAVE, + num_interrupt_in: 1, + num_bulk_in: 1, + num_bulk_out: 1, + num_ports: 4, + open: edge_open, + close: edge_close, + throttle: edge_throttle, + unthrottle: edge_unthrottle, + startup: edge_startup, + shutdown: edge_shutdown, + ioctl: edge_ioctl, + set_termios: edge_set_termios, + write: edge_write, + write_room: edge_write_room, + chars_in_buffer: edge_chars_in_buffer, + break_ctl: edge_break, +}; + +struct usb_serial_device_type edgeport_4t_device = { + name: "Edgeport 4t", + idVendor: &ionetworks_vendor_id, + idProduct: &edgeport_4t_id, + needs_interrupt_in: MUST_HAVE, + needs_bulk_in: MUST_HAVE, + needs_bulk_out: MUST_HAVE, + num_interrupt_in: 1, + num_bulk_in: 1, + num_bulk_out: 1, + num_ports: 4, + open: edge_open, + close: edge_close, + throttle: edge_throttle, + unthrottle: edge_unthrottle, + startup: edge_startup, + shutdown: edge_shutdown, + ioctl: edge_ioctl, + set_termios: edge_set_termios, + write: edge_write, + write_room: edge_write_room, + chars_in_buffer: edge_chars_in_buffer, + break_ctl: edge_break, +}; + +struct usb_serial_device_type edgeport_2_device = { + name: "Edgeport 2", + idVendor: &ionetworks_vendor_id, + idProduct: &edgeport_2_id, + needs_interrupt_in: MUST_HAVE, + needs_bulk_in: MUST_HAVE, + needs_bulk_out: MUST_HAVE, + num_interrupt_in: 1, + num_bulk_in: 1, + num_bulk_out: 1, + num_ports: 2, + open: edge_open, + close: edge_close, + throttle: edge_throttle, + unthrottle: edge_unthrottle, + startup: edge_startup, + shutdown: edge_shutdown, + ioctl: edge_ioctl, + set_termios: edge_set_termios, + write: edge_write, + write_room: edge_write_room, + chars_in_buffer: edge_chars_in_buffer, + break_ctl: edge_break, +}; + +struct usb_serial_device_type edgeport_4i_device = { + name: "Edgeport 4i", + idVendor: &ionetworks_vendor_id, + idProduct: &edgeport_4i_id, + needs_interrupt_in: MUST_HAVE, + needs_bulk_in: MUST_HAVE, + needs_bulk_out: MUST_HAVE, + num_interrupt_in: 1, + num_bulk_in: 1, + num_bulk_out: 1, + num_ports: 4, + open: edge_open, + close: edge_close, + throttle: edge_throttle, + unthrottle: edge_unthrottle, + startup: edge_startup, + shutdown: edge_shutdown, + ioctl: edge_ioctl, + set_termios: edge_set_termios, + write: edge_write, + write_room: edge_write_room, + chars_in_buffer: edge_chars_in_buffer, + break_ctl: edge_break, +}; + +struct usb_serial_device_type edgeport_2i_device = { + name: "Edgeport 2i", + idVendor: &ionetworks_vendor_id, + idProduct: &edgeport_2i_id, + needs_interrupt_in: MUST_HAVE, + needs_bulk_in: MUST_HAVE, + needs_bulk_out: MUST_HAVE, + num_interrupt_in: 1, + num_bulk_in: 1, + num_bulk_out: 1, + num_ports: 2, + open: edge_open, + close: edge_close, + throttle: edge_throttle, + unthrottle: edge_unthrottle, + startup: edge_startup, + shutdown: edge_shutdown, + ioctl: edge_ioctl, + set_termios: edge_set_termios, + write: edge_write, + write_room: edge_write_room, + chars_in_buffer: edge_chars_in_buffer, + break_ctl: edge_break, +}; + +struct usb_serial_device_type edgeport_prl_device = { + name: "Edgeport Parallel", + idVendor: &ionetworks_vendor_id, + idProduct: &edgeport_prl_id, + needs_interrupt_in: MUST_HAVE, + needs_bulk_in: MUST_HAVE, + needs_bulk_out: MUST_HAVE, + num_interrupt_in: 1, + num_bulk_in: 1, + num_bulk_out: 1, + num_ports: 1, + open: edge_open, + close: edge_close, + throttle: edge_throttle, + unthrottle: edge_unthrottle, + startup: edge_startup, + shutdown: edge_shutdown, + ioctl: edge_ioctl, + set_termios: edge_set_termios, + write: edge_write, + write_room: edge_write_room, + chars_in_buffer: edge_chars_in_buffer, + break_ctl: edge_break, +}; + +struct usb_serial_device_type edgeport_421_device = { + name: "Edgeport 421", + idVendor: &ionetworks_vendor_id, + idProduct: &edgeport_421_id, + needs_interrupt_in: MUST_HAVE, + needs_bulk_in: MUST_HAVE, + needs_bulk_out: MUST_HAVE, + num_interrupt_in: 1, + num_bulk_in: 1, + num_bulk_out: 1, + num_ports: 2, + open: edge_open, + close: edge_close, + throttle: edge_throttle, + unthrottle: edge_unthrottle, + startup: edge_startup, + shutdown: edge_shutdown, + ioctl: edge_ioctl, + set_termios: edge_set_termios, + write: edge_write, + write_room: edge_write_room, + chars_in_buffer: edge_chars_in_buffer, + break_ctl: edge_break, +}; + +struct usb_serial_device_type edgeport_21_device = { + name: "Edgeport 21", + idVendor: &ionetworks_vendor_id, + idProduct: &edgeport_21_id, + needs_interrupt_in: MUST_HAVE, + needs_bulk_in: MUST_HAVE, + needs_bulk_out: MUST_HAVE, + num_interrupt_in: 1, + num_bulk_in: 1, + num_bulk_out: 1, + num_ports: 2, + open: edge_open, + close: edge_close, + throttle: edge_throttle, + unthrottle: edge_unthrottle, + startup: edge_startup, + shutdown: edge_shutdown, + ioctl: edge_ioctl, + set_termios: edge_set_termios, + write: edge_write, + write_room: edge_write_room, + chars_in_buffer: edge_chars_in_buffer, + break_ctl: edge_break, +}; + +struct usb_serial_device_type edgeport_8dual_device = { + name: "Edgeport 8 dual cpu", + idVendor: &ionetworks_vendor_id, + idProduct: &edgeport_8dual_id, + needs_interrupt_in: MUST_HAVE, + needs_bulk_in: MUST_HAVE, + needs_bulk_out: MUST_HAVE, + num_interrupt_in: 1, + num_bulk_in: 1, + num_bulk_out: 1, + num_ports: 4, + open: edge_open, + close: edge_close, + throttle: edge_throttle, + unthrottle: edge_unthrottle, + startup: edge_startup, + shutdown: edge_shutdown, + ioctl: edge_ioctl, + set_termios: edge_set_termios, + write: edge_write, + write_room: edge_write_room, + chars_in_buffer: edge_chars_in_buffer, + break_ctl: edge_break, +}; + +struct usb_serial_device_type edgeport_8_device = { + name: "Edgeport 8", + idVendor: &ionetworks_vendor_id, + idProduct: &edgeport_8_id, + needs_interrupt_in: MUST_HAVE, + needs_bulk_in: MUST_HAVE, + needs_bulk_out: MUST_HAVE, + num_interrupt_in: 1, + num_bulk_in: 1, + num_bulk_out: 1, + num_ports: 8, + open: edge_open, + close: edge_close, + throttle: edge_throttle, + unthrottle: edge_unthrottle, + startup: edge_startup, + shutdown: edge_shutdown, + ioctl: edge_ioctl, + set_termios: edge_set_termios, + write: edge_write, + write_room: edge_write_room, + chars_in_buffer: edge_chars_in_buffer, + break_ctl: edge_break, +}; + +struct usb_serial_device_type edgeport_2din_device = { + name: "Edgeport 2din", + idVendor: &ionetworks_vendor_id, + idProduct: &edgeport_2din_id, + needs_interrupt_in: MUST_HAVE, + needs_bulk_in: MUST_HAVE, + needs_bulk_out: MUST_HAVE, + num_interrupt_in: 1, + num_bulk_in: 1, + num_bulk_out: 1, + num_ports: 2, + open: edge_open, + close: edge_close, + throttle: edge_throttle, + unthrottle: edge_unthrottle, + startup: edge_startup, + shutdown: edge_shutdown, + ioctl: edge_ioctl, + set_termios: edge_set_termios, + write: edge_write, + write_room: edge_write_room, + chars_in_buffer: edge_chars_in_buffer, + break_ctl: edge_break, +}; + +struct usb_serial_device_type edgeport_4din_device = { + name: "Edgeport 4din", + idVendor: &ionetworks_vendor_id, + idProduct: &edgeport_4din_id, + needs_interrupt_in: MUST_HAVE, + needs_bulk_in: MUST_HAVE, + needs_bulk_out: MUST_HAVE, + num_interrupt_in: 1, + num_bulk_in: 1, + num_bulk_out: 1, + num_ports: 4, + open: edge_open, + close: edge_close, + throttle: edge_throttle, + unthrottle: edge_unthrottle, + startup: edge_startup, + shutdown: edge_shutdown, + ioctl: edge_ioctl, + set_termios: edge_set_termios, + write: edge_write, + write_room: edge_write_room, + chars_in_buffer: edge_chars_in_buffer, + break_ctl: edge_break, +}; + +struct usb_serial_device_type edgeport_16dual_device = { + name: "Edgeport 16 dual cpu", + idVendor: &ionetworks_vendor_id, + idProduct: &edgeport_16dual_id, + needs_interrupt_in: MUST_HAVE, + needs_bulk_in: MUST_HAVE, + needs_bulk_out: MUST_HAVE, + num_interrupt_in: 1, + num_bulk_in: 1, + num_bulk_out: 1, + num_ports: 8, + open: edge_open, + close: edge_close, + throttle: edge_throttle, + unthrottle: edge_unthrottle, + startup: edge_startup, + shutdown: edge_shutdown, + ioctl: edge_ioctl, + set_termios: edge_set_termios, + write: edge_write, + write_room: edge_write_room, + chars_in_buffer: edge_chars_in_buffer, + break_ctl: edge_break, +}; + +struct usb_serial_device_type edgeport_compat_id_device = { + name: "Edgeport Compatible", + idVendor: &ionetworks_vendor_id, + idProduct: &edgeport_compat_id, + needs_interrupt_in: MUST_HAVE, + needs_bulk_in: MUST_HAVE, + needs_bulk_out: MUST_HAVE, + num_interrupt_in: 1, + num_bulk_in: 1, + num_bulk_out: 1, + num_ports: 4, + open: edge_open, + close: edge_close, + throttle: edge_throttle, + unthrottle: edge_unthrottle, + startup: edge_startup, + shutdown: edge_shutdown, + ioctl: edge_ioctl, + set_termios: edge_set_termios, + write: edge_write, + write_room: edge_write_room, + chars_in_buffer: edge_chars_in_buffer, + break_ctl: edge_break, +}; + +struct usb_serial_device_type edgeport_8i_device = { + name: "Edgeport 8i", + idVendor: &ionetworks_vendor_id, + idProduct: &edgeport_8i_id, + needs_interrupt_in: MUST_HAVE, + needs_bulk_in: MUST_HAVE, + needs_bulk_out: MUST_HAVE, + num_interrupt_in: 1, + num_bulk_in: 1, + num_bulk_out: 1, + num_ports: 8, + open: edge_open, + close: edge_close, + throttle: edge_throttle, + unthrottle: edge_unthrottle, + startup: edge_startup, + shutdown: edge_shutdown, + ioctl: edge_ioctl, + set_termios: edge_set_termios, + write: edge_write, + write_room: edge_write_room, + chars_in_buffer: edge_chars_in_buffer, + break_ctl: edge_break, +}; + + + + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/io_usbvend.h linux.20p6/drivers/usb/serial/io_usbvend.h --- linux.vanilla/drivers/usb/serial/io_usbvend.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/usb/serial/io_usbvend.h Mon Jun 18 08:11:10 2001 @@ -0,0 +1,374 @@ +/************************************************************************ + * + * USBVEND.H Vendor-specific USB definitions + * + * NOTE: This must be kept in sync with the Edgeport firmware and + * must be kept backward-compatible with older firmware. + * + ************************************************************************ + * + * Copyright (c) 1998 Inside Out Networks, Inc. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + ************************************************************************/ + +#if !defined(_USBVEND_H) +#define _USBVEND_H + +#ifndef __KERNEL__ +#include "ionprag.h" /* Extra I/O Networks pragmas */ + +#include + +#include "iondef.h" /* Standard I/O Networks definitions */ +#endif + +/************************************************************************ + * + * D e f i n e s / T y p e d e f s + * + ************************************************************************/ + +// +// Definitions of USB product IDs +// + +#define USB_VENDOR_ID_ION 0x1608 // Our VID + +// +// Definitions of USB product IDs (PID) +// We break the USB-defined PID into an OEM Id field (upper 6 bits) +// and a Device Id (bottom 10 bits). The Device Id defines what +// device this actually is regardless of what the OEM wants to +// call it. +// + +// ION-device OEM IDs +#define ION_OEM_ID_ION 0 // 00h Inside Out Networks +#define ION_OEM_ID_NLYNX 1 // 01h NLynx Systems +#define ION_OEM_ID_GENERIC 2 // 02h Generic OEM +#define ION_OEM_ID_MAC 3 // 03h Mac Version +#define ION_OEM_ID_MEGAWOLF 4 // 04h Lupusb OEM Mac version (MegaWolf) +#define ION_OEM_ID_MULTITECH 5 // 05h Multitech Rapidports + + +// ION-device Device IDs +// Product IDs - assigned to match middle digit of serial number + + +// The ION_DEVICE_ID_GENERATION_2 bit (0x20) will be ORed into the existing edgeport +// PIDs to identify 80251+Netchip hardware. This will guarantee that if a second +// generation edgeport device is plugged into a PC with an older (pre 2.0) driver, +// it will not enumerate. + +#define ION_DEVICE_ID_GENERATION_2 0x020 // This bit is set in the PID if this edgeport hardware + // is based on the 80251+Netchip. + +#define EDGEPORT_DEVICE_ID_MASK 0x3df // Not including GEN_2 bit + +#define ION_DEVICE_ID_UNCONFIGURED_EDGE_DEVICE 0x000 // In manufacturing only +#define ION_DEVICE_ID_EDGEPORT_4 0x001 // Edgeport/4 RS232 +// ION_DEVICE_ID_HUBPORT_7 0x002 // Hubport/7 (Placeholder, not used by software) +#define ION_DEVICE_ID_RAPIDPORT_4 0x003 // Rapidport/4 +#define ION_DEVICE_ID_EDGEPORT_4T 0x004 // Edgeport/4 RS232 for Telxon (aka "Fleetport") +#define ION_DEVICE_ID_EDGEPORT_2 0x005 // Edgeport/2 RS232 +#define ION_DEVICE_ID_EDGEPORT_4I 0x006 // Edgeport/4 RS422 +#define ION_DEVICE_ID_EDGEPORT_2I 0x007 // Edgeport/2 RS422/RS485 +// ION_DEVICE_ID_HUBPORT_4 0x008 // Hubport/4 (Placeholder, not used by software) +// ION_DEVICE_ID_EDGEPORT_8_HANDBUILT 0x009 // Hand-built Edgeport/8 (Placeholder, used in middle digit of serial number only!) +// ION_DEVICE_ID_MULTIMODEM_4X56 0x00A // MultiTech version of RP/4 (Placeholder, used in middle digit of serial number only!) +#define ION_DEVICE_ID_EDGEPORT_PARALLEL_PORT 0x00B // Edgeport/(4)21 Parallel port (USS720) +#define ION_DEVICE_ID_EDGEPORT_421 0x00C // Edgeport/421 Hub+RS232+Parallel +#define ION_DEVICE_ID_EDGEPORT_21 0x00D // Edgeport/21 RS232+Parallel +#define ION_DEVICE_ID_EDGEPORT_8_DUAL_CPU 0x00E // Half of an Edgeport/8 (the kind with 2 EP/4s on 1 PCB) +#define ION_DEVICE_ID_EDGEPORT_8 0x00F // Edgeport/8 (single-CPU) +#define ION_DEVICE_ID_EDGEPORT_2_DIN 0x010 // Edgeport/2 RS232 with Apple DIN connector +#define ION_DEVICE_ID_EDGEPORT_4_DIN 0x011 // Edgeport/4 RS232 with Apple DIN connector +#define ION_DEVICE_ID_EDGEPORT_16_DUAL_CPU 0x012 // Half of an Edgeport/16 (the kind with 2 EP/8s) +#define ION_DEVICE_ID_EDGEPORT_COMPATIBLE 0x013 // Edgeport Compatible, for NCR, Axiohm etc. testing +#define ION_DEVICE_ID_EDGEPORT_8I 0x014 // Edgeport/8 RS422 (single-CPU) + +// These IDs are used by the Edgeport.exe program for uninstalling. +// +#define EDGEPORT_DEVICE_IDS {0x001, 0x003, 0x004, 0x005, 0x006, 0x007, 0x00B, \ + 0x00C, 0x00D, 0x00E, 0x00F, 0x010, 0x011, 0x012, \ + 0x013, 0x014 } + + +#define MAKE_USB_PRODUCT_ID( OemId, DeviceId ) \ + ( (__u16) (((OemId) << 10) || (DeviceId)) ) + +#define DEVICE_ID_FROM_USB_PRODUCT_ID( ProductId ) \ + ( (__u16) ((ProductId) & (EDGEPORT_DEVICE_ID_MASK)) ) + +#define OEM_ID_FROM_USB_PRODUCT_ID( ProductId ) \ + ( (__u16) (((ProductId) >> 10) & 0x3F) ) + +// +// Definitions of parameters for download code. Note that these are +// specific to a given version of download code and must change if the +// corresponding download code changes. +// + +// TxCredits value below which driver won't bother sending (to prevent too many small writes). +// Send only if above 25% +#define EDGE_FW_GET_TX_CREDITS_SEND_THRESHOLD(InitialCredit) (max( ((InitialCredit) / 4), EDGE_FW_BULK_MAX_PACKET_SIZE )) + +#define EDGE_FW_BULK_MAX_PACKET_SIZE 64 // Max Packet Size for Bulk In Endpoint (EP1) +#define EDGE_FW_BULK_READ_BUFFER_SIZE 1024 // Size to use for Bulk reads + +#define EDGE_FW_INT_MAX_PACKET_SIZE 32 // Max Packet Size for Interrupt In Endpoint + // Note that many units were shipped with MPS=16, we + // force an upgrade to this value). +#define EDGE_FW_INT_INTERVAL 2 // 2ms polling on IntPipe + + +// +// Definitions of I/O Networks vendor-specific requests +// for default endpoint +// +// bmRequestType = 00100000 Set vendor-specific, to device +// bmRequestType = 10100000 Get vendor-specific, to device +// +// These are the definitions for the bRequest field for the +// above bmRequestTypes. +// +// For the read/write Edgeport memory commands, the parameters +// are as follows: +// wValue = 16-bit address +// wIndex = unused (though we could put segment 00: or FF: here) +// wLength = # bytes to read/write (max 64) +// + +#define USB_REQUEST_ION_RESET_DEVICE 0 // Warm reboot Edgeport, retaining USB address +#define USB_REQUEST_ION_GET_EPIC_DESC 1 // Get Edgeport Compatibility Descriptor +// unused 2 // Unused, available +#define USB_REQUEST_ION_READ_RAM 3 // Read EdgePort RAM at specified addr +#define USB_REQUEST_ION_WRITE_RAM 4 // Write EdgePort RAM at specified addr +#define USB_REQUEST_ION_READ_ROM 5 // Read EdgePort ROM at specified addr +#define USB_REQUEST_ION_WRITE_ROM 6 // Write EdgePort ROM at specified addr +#define USB_REQUEST_ION_EXEC_DL_CODE 7 // Begin execution of RAM-based download + // code by jumping to address in wIndex:wValue +// 8 // Unused, available +#define USB_REQUEST_ION_ENABLE_SUSPEND 9 // Enable/Disable suspend feature + // (wValue != 0: Enable; wValue = 0: Disable) + + +// +// Define parameter values for our vendor-specific commands +// + + +// Values for iDownloadFile +#define EDGE_DOWNLOAD_FILE_NONE 0 // No download requested +#define EDGE_DOWNLOAD_FILE_INTERNAL 0xFF // Download the file compiled into driver (930 version) +#define EDGE_DOWNLOAD_FILE_I930 0xFF // Download the file compiled into driver (930 version) +#define EDGE_DOWNLOAD_FILE_80251 0xFE // Download the file compiled into driver (80251 version) + + + +/* + * Special addresses for READ/WRITE_RAM/ROM + */ + +// Version 1 (original) format of DeviceParams +#define EDGE_MANUF_DESC_ADDR_V1 0x00FF7F00 +#define EDGE_MANUF_DESC_LEN_V1 sizeof(EDGE_MANUF_DESCRIPTOR_V1) + +// Version 2 format of DeviceParams. This format is longer (3C0h) +// and starts lower in memory, at the uppermost 1K in ROM. +#define EDGE_MANUF_DESC_ADDR 0x00FF7C00 +#define EDGE_MANUF_DESC_LEN sizeof(EDGE_MANUF_DESCRIPTOR) + +// Boot params descriptor +#define EDGE_BOOT_DESC_ADDR 0x00FF7FC0 +#define EDGE_BOOT_DESC_LEN sizeof(EDGE_BOOT_DESCRIPTOR) + +// Define the max block size that may be read or written +// in a read/write RAM/ROM command. +#define MAX_SIZE_REQ_ION_READ_MEM ( (__u16) 64 ) +#define MAX_SIZE_REQ_ION_WRITE_MEM ( (__u16) 64 ) + + +// +// Notes for the following two ION vendor-specific param descriptors: +// +// 1. These have a standard USB descriptor header so they look like a +// normal descriptor. +// 2. Any strings in the structures are in USB-defined string +// descriptor format, so that they may be separately retrieved, +// if necessary, with a minimum of work on the 930. This also +// requires them to be in UNICODE format, which, for English at +// least, simply means extending each UCHAR into a USHORT. +// 3. For all fields, 00 means 'uninitialized'. +// 4. All unused areas should be set to 00 for future expansion. +// + +// This structure is ver 2 format. It contains ALL USB descriptors as +// well as the configuration parameters that were in the original V1 +// structure. It is NOT modified when new boot code is downloaded; rather, +// these values are set or modified by manufacturing. It is located at +// xC00-xFBF (length 3C0h) in the ROM. +// This structure is a superset of the v1 structure and is arranged so +// that all of the v1 fields remain at the same address. We are just +// adding more room to the front of the structure to hold the descriptors. +// +// The actual contents of this structure are defined in a 930 assembly +// file, converted to a binary image, and then written by the serialization +// program. The C definition of this structure just defines a dummy +// area for general USB descriptors and the descriptor tables (the root +// descriptor starts at xC00). At the bottom of the structure are the +// fields inherited from the v1 structure. + +#define MAX_SERIALNUMBER_LEN 12 +#define MAX_ASSEMBLYNUMBER_LEN 14 + +typedef struct _EDGE_MANUF_DESCRIPTOR { + + __u16 RootDescTable[0x10]; // C00 Root of descriptor tables (just a placeholder) + __u8 DescriptorArea[0x2E0]; // C20 Descriptors go here, up to 2E0h (just a placeholder) + + // Start of v1-compatible section + __u8 Length; // F00 Desc length for what follows, per USB (= C0h ) + __u8 DescType; // F01 Desc type, per USB (=DEVICE type) + __u8 DescVer; // F02 Desc version/format (currently 2) + __u8 NumRootDescEntries; // F03 # entries in RootDescTable + + __u8 RomSize; // F04 Size of ROM/E2PROM in K + __u8 RamSize; // F05 Size of external RAM in K + __u8 CpuRev; // F06 CPU revision level (chg only if s/w visible) + __u8 BoardRev; // F07 PCB revision level (chg only if s/w visible) + + __u8 NumPorts; // F08 Number of ports + __u8 DescDate[3]; // F09 MM/DD/YY when descriptor template was compiler, + // so host can track changes to USB-only descriptors. + + __u8 SerNumLength; // F0C USB string descriptor len + __u8 SerNumDescType; // F0D USB descriptor type (=STRING type) + __u16 SerialNumber[MAX_SERIALNUMBER_LEN]; // F0E "01-01-000100" Unicode Serial Number + + __u8 AssemblyNumLength; // F26 USB string descriptor len + __u8 AssemblyNumDescType; // F27 USB descriptor type (=STRING type) + __u16 AssemblyNumber[MAX_ASSEMBLYNUMBER_LEN]; // F28 "350-1000-01-A " assembly number + + __u8 OemAssyNumLength; // F44 USB string descriptor len + __u8 OemAssyNumDescType; // F45 USB descriptor type (=STRING type) + __u16 OemAssyNumber[MAX_ASSEMBLYNUMBER_LEN]; // F46 "xxxxxxxxxxxxxx" OEM assembly number + + __u8 ManufDateLength; // F62 USB string descriptor len + __u8 ManufDateDescType; // F63 USB descriptor type (=STRING type) + __u16 ManufDate[6]; // F64 "MMDDYY" manufacturing date + + __u8 Reserved3[0x4D]; // F70 -- unused, set to 0 -- + + __u8 UartType; // FBD Uart Type + __u8 IonPid; // FBE Product ID, == LSB of USB DevDesc.PID + // (Note: Edgeport/4s before 11/98 will have + // 00 here instead of 01) + __u8 IonConfig; // FBF Config byte for ION manufacturing use + // FBF end of structure, total len = 3C0h + +} EDGE_MANUF_DESCRIPTOR, *PEDGE_MANUF_DESCRIPTOR; + + +#define MANUF_DESC_VER_1 1 // Original definition of MANUF_DESC +#define MANUF_DESC_VER_2 2 // Ver 2, starts at xC00h len 3C0h + + +// Uart Types +// Note: Since this field was added only recently, all Edgeport/4 units +// shipped before 11/98 will have 00 in this field. Therefore, +// both 00 and 01 values mean '654. +#define MANUF_UART_EXAR_654_EARLY 0 // Exar 16C654 in Edgeport/4s before 11/98 +#define MANUF_UART_EXAR_654 1 // Exar 16C654 +#define MANUF_UART_EXAR_2852 2 // Exar 16C2852 + +// +// Note: The CpuRev and BoardRev values do not conform to manufacturing +// revisions; they are to be incremented only when the CPU or hardware +// changes in a software-visible way, such that the 930 software or +// the host driver needs to handle the hardware differently. +// + +// Values of bottom 5 bits of CpuRev & BoardRev for +// Implementation 0 (ie, 930-based) +#define MANUF_CPU_REV_AD4 1 // 930 AD4, with EP1 Rx bug (needs RXSPM) +#define MANUF_CPU_REV_AD5 2 // 930 AD5, with above bug (supposedly) fixed +#define MANUF_CPU_80251 0x20 // Intel 80251 + + +#define MANUF_BOARD_REV_A 1 // Original version, == Manuf Rev A +#define MANUF_BOARD_REV_B 2 // Manuf Rev B, wakeup interrupt works +#define MANUF_BOARD_REV_C 3 // Manuf Rev C, 2/4 ports, rs232/rs422 +#define MANUF_BOARD_REV_GENERATION_2 0x20 // Second generaiton edgeport + + + + +// Values of bottom 5 bits of CpuRev & BoardRev for +// Implementation 1 (ie, 251+Netchip-based) +#define MANUF_CPU_REV_1 1 // C251TB Rev 1 (Need actual Intel rev here) + +#define MANUF_BOARD_REV_A 1 // First rev of 251+Netchip design + + + +#define MANUF_SERNUM_LENGTH sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->SerialNumber) +#define MANUF_ASSYNUM_LENGTH sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->AssemblyNumber) +#define MANUF_OEMASSYNUM_LENGTH sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->OemAssyNumber) +#define MANUF_MANUFDATE_LENGTH sizeof(((PEDGE_MANUF_DESCRIPTOR)0)->ManufDate) + +#define MANUF_ION_CONFIG_MASTER 0x80 // 1=Master mode, 0=Normal +#define MANUF_ION_CONFIG_DIAG 0x40 // 1=Run h/w diags, 0=norm +#define MANUF_ION_CONFIG_DIAG_NO_LOOP 0x20 // As above but no ext loopback test + + +// +// This structure describes parameters for the boot code, and +// is programmed along with new boot code. These are values +// which are specific to a given build of the boot code. It +// is exactly 64 bytes long and is fixed at address FF:xFC0 +// - FF:xFFF. Note that the 930-mandated UCONFIG bytes are +// included in this structure. +// +typedef struct _EDGE_BOOT_DESCRIPTOR { + __u8 Length; // C0 Desc length, per USB (= 40h) + __u8 DescType; // C1 Desc type, per USB (= DEVICE type) + __u8 DescVer; // C2 Desc version/format + __u8 Reserved1; // C3 -- unused, set to 0 -- + + __u16 BootCodeLength; // C4 Boot code goes from FF:0000 to FF:(len-1) + // (LE format) + + __u8 MajorVersion; // C6 Firmware version: xx. + __u8 MinorVersion; // C7 yy. + __u16 BuildNumber; // C8 zzzz (LE format) + + __u16 EnumRootDescTable; // CA Root of ROM-based descriptor table + __u8 NumDescTypes; // CC Number of supported descriptor types + + __u8 Reserved4; // CD Fix Compiler Packing + + __u16 Capabilities; // CE-CF Capabilities flags (LE format) + __u8 Reserved2[0x28]; // D0 -- unused, set to 0 -- + __u8 UConfig0; // F8 930-defined CPU configuration byte 0 + __u8 UConfig1; // F9 930-defined CPU configuration byte 1 + __u8 Reserved3[6]; // FA -- unused, set to 0 -- + // FF end of structure, total len = 80 + +} EDGE_BOOT_DESCRIPTOR, *PEDGE_BOOT_DESCRIPTOR; + + +#define BOOT_DESC_VER_1 1 // Original definition of BOOT_PARAMS +#define BOOT_DESC_VER_2 2 // 2nd definition, descriptors not included in boot + + + // Capabilities flags + +#define BOOT_CAP_RESET_CMD 0x0001 // If set, boot correctly supports ION_RESET_DEVICE + +#endif // if !defined() + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/keyspan.c linux.20p6/drivers/usb/serial/keyspan.c --- linux.vanilla/drivers/usb/serial/keyspan.c Sun Mar 25 17:37:37 2001 +++ linux.20p6/drivers/usb/serial/keyspan.c Mon Jun 18 08:08:44 2001 @@ -28,6 +28,9 @@ open source projects. Change History + (04/08/2001) gb + Identify version on module load. + Tue Oct 10 23:15:33 EST 2000 Hugh Merged Paul's changes with my USA-49W mods. Work in progress still... @@ -46,6 +49,7 @@ */ +#include #include #include #include @@ -59,16 +63,24 @@ #include #include #include - -#define DEBUG -/* #ifdef CONFIG_USB_SERIAL_DEBUG */ - #define DEBUG -/* #endif */ #include +#ifdef CONFIG_USB_SERIAL_DEBUG + static int debug = 1; +#else + static int debug; +#endif + #include "usb-serial.h" #include "keyspan.h" +/* + * Version Information + */ +#define DRIVER_VERSION "v1.0.0" +#define DRIVER_AUTHOR "Hugh Blemings " +#define DRIVER_DESC "Keyspan USB to Serial Converter Driver" + #define INSTAT_BUFLEN 32 #define GLOCONT_BUFLEN 64 @@ -161,6 +173,10 @@ usb_serial_register (&keyspan_usa28_device); usb_serial_register (&keyspan_usa28x_device); usb_serial_register (&keyspan_usa49w_device); + + info(DRIVER_VERSION " " DRIVER_AUTHOR); + info(DRIVER_DESC); + return 0; } @@ -1282,7 +1298,21 @@ msg.setPrescaler = 0xff; } - msg.lcr = USA_DATABITS_8 | STOPBITS_5678_1; + msg.lcr = (p_priv->cflag & CSTOPB)? STOPBITS_678_2: STOPBITS_5678_1; + switch (p_priv->cflag & CSIZE) { + case CS5: + msg.lcr |= USA_DATABITS_5; + break; + case CS6: + msg.lcr |= USA_DATABITS_6; + break; + case CS7: + msg.lcr |= USA_DATABITS_7; + break; + case CS8: + msg.lcr |= USA_DATABITS_8; + break; + } if (p_priv->cflag & PARENB) { /* note USA_PARITY_NONE == 0 */ msg.lcr |= (p_priv->cflag & PARODD)? @@ -1475,7 +1505,21 @@ //msg.setPrescaler = 0xff; } - msg.lcr = USA_DATABITS_8 | STOPBITS_5678_1; + msg.lcr = (p_priv->cflag & CSTOPB)? STOPBITS_678_2: STOPBITS_5678_1; + switch (p_priv->cflag & CSIZE) { + case CS5: + msg.lcr |= USA_DATABITS_5; + break; + case CS6: + msg.lcr |= USA_DATABITS_6; + break; + case CS7: + msg.lcr |= USA_DATABITS_7; + break; + case CS8: + msg.lcr |= USA_DATABITS_8; + break; + } if (p_priv->cflag & PARENB) { /* note USA_PARITY_NONE == 0 */ msg.lcr |= (p_priv->cflag & PARODD)? @@ -1668,3 +1712,10 @@ kfree(port->private); } } + +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); + +MODULE_PARM(debug, "i"); +MODULE_PARM_DESC(debug, "Debug enabled or not"); + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/keyspan_pda.c linux.20p6/drivers/usb/serial/keyspan_pda.c --- linux.vanilla/drivers/usb/serial/keyspan_pda.c Sun Mar 25 17:31:43 2001 +++ linux.20p6/drivers/usb/serial/keyspan_pda.c Mon Jun 18 08:09:10 2001 @@ -12,6 +12,13 @@ * * See Documentation/usb/usb-serial.txt for more information on using this driver * + * (04/08/2001) gb + * Identify version on module load. + * + * (10/05/2000) gkh + * Fixed bug with urb->dev not being set properly, now that the usb + * core needs it. + * * (08/28/2000) gkh * Added locks for SMP safeness. * Fixed MOD_INC and MOD_DEC logic and the ability to open a port more @@ -54,19 +61,20 @@ #include #include #include +#include #include #include -#include #include #include #include +#include #ifdef CONFIG_USB_SERIAL_DEBUG - #define DEBUG + static int debug = 1; #else - #undef DEBUG + static int debug; #endif -#include + struct ezusb_hex_record { __u16 address; @@ -75,9 +83,15 @@ }; #include "keyspan_pda_fw.h" - #include "usb-serial.h" +/* + * Version Information + */ +#define DRIVER_VERSION "v1.0.0" +#define DRIVER_AUTHOR "Brian Warner " +#define DRIVER_DESC "USB Keyspan PDA Converter driver" + struct keyspan_pda_private { int tx_room; int tx_throttled; @@ -112,7 +126,7 @@ /* wake up other tty processes */ wake_up_interruptible( &tty->write_wait ); /* For 2.2.16 backport -- wake_up_interruptible( &tty->poll_wait ); */ - + MOD_DEC_USE_COUNT; } static void keyspan_pda_request_unthrottle( struct usb_serial *serial ) @@ -131,7 +145,7 @@ NULL, 0, 2*HZ); - + MOD_DEC_USE_COUNT; } @@ -180,7 +194,9 @@ tty = serial->port[0].tty; priv->tx_throttled = 0; /* queue up a wakeup at scheduler time */ - queue_task( &priv->wakeup_task, &tq_scheduler ); + MOD_INC_USE_COUNT; + if (schedule_task(&priv->wakeup_task) == 0) + MOD_DEC_USE_COUNT; break; default: break; @@ -212,6 +228,7 @@ { /* just restart the receive interrupt URB */ dbg("keyspan_pda_rx_unthrottle port %d", port->number); + port->interrupt_in_urb->dev = port->serial->dev; if (usb_submit_urb(port->interrupt_in_urb)) dbg(" usb_submit_urb(read urb) failed"); return; @@ -506,6 +523,7 @@ priv->tx_room -= count; + port->write_urb->dev = port->serial->dev; if (usb_submit_urb(port->write_urb)) { dbg(" usb_submit_urb(write bulk) failed"); spin_unlock_irqrestore (&port->port_lock, flags); @@ -520,7 +538,9 @@ if (request_unthrottle) { priv->tx_throttled = 1; /* block writers */ - queue_task( &priv->unthrottle_task, &tq_scheduler ); + MOD_INC_USE_COUNT; + if (schedule_task(&priv->unthrottle_task) == 0) + MOD_DEC_USE_COUNT; } spin_unlock_irqrestore (&port->port_lock, flags); @@ -546,8 +566,9 @@ } /* queue up a wakeup at scheduler time */ - queue_task( &priv->wakeup_task, &tq_scheduler ); - + MOD_INC_USE_COUNT; + if (schedule_task(&priv->wakeup_task) == 0) + MOD_DEC_USE_COUNT; } @@ -627,6 +648,7 @@ keyspan_pda_set_modem_info(serial, 0); /*Start reading from the device*/ + port->interrupt_in_urb->dev = serial->dev; if (usb_submit_urb(port->interrupt_in_urb)) dbg(__FUNCTION__" - usb_submit_urb(read int) failed"); } else { @@ -783,6 +805,8 @@ { usb_serial_register (&keyspan_pda_fake_device); usb_serial_register (&keyspan_pda_device); + info(DRIVER_VERSION " " DRIVER_AUTHOR); + info(DRIVER_DESC); return 0; } @@ -797,5 +821,9 @@ module_init(keyspan_pda_init); module_exit(keyspan_pda_exit); -MODULE_AUTHOR("Brian Warner "); -MODULE_DESCRIPTION("USB Keyspan PDA Converter driver"); +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); + +MODULE_PARM(debug, "i"); +MODULE_PARM_DESC(debug, "Debug enabled or not"); + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/keyspan_pda_fw.h linux.20p6/drivers/usb/serial/keyspan_pda_fw.h --- linux.vanilla/drivers/usb/serial/keyspan_pda_fw.h Sun Mar 25 17:31:43 2001 +++ linux.20p6/drivers/usb/serial/keyspan_pda_fw.h Mon Jun 18 08:09:10 2001 @@ -1,9 +1,15 @@ /* - * keyspan_pda_fw.h + * USB Keyspan PDA Firmware + * + * Copyright (c) 1999, 2000 Brian Warner + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * * Generated from keyspan_pda.s by ezusb_convert.pl - * This file is presumed to be under the same copyright as the source file - * from which it was derived. + * */ static const struct ezusb_hex_record keyspan_pda_firmware[] = { diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/mct_u232.c linux.20p6/drivers/usb/serial/mct_u232.c --- linux.vanilla/drivers/usb/serial/mct_u232.c Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/usb/serial/mct_u232.c Mon Jun 18 08:11:53 2001 @@ -0,0 +1,884 @@ +/* + * MCT (Magic Control Technology Corp.) USB RS232 Converter Driver + * + * Copyright (C) 2000 Wolfgang Grandegger (wolfgang@ces.ch) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the 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 largely derived from the Belkin USB Serial Adapter Driver + * (see belkin_sa.[ch]). All of the information about the device was acquired + * by using SniffUSB on Windows98. For technical details see mct_u232.h. + * + * William G. Greathouse and Greg Kroah-Hartman provided great help on how to + * do the reverse engineering and how to write a USB serial device driver. + * + * TO BE DONE, TO BE CHECKED: + * DTR/RTS signal handling may be incomplete or incorrect. I have mainly + * implemented what I have seen with SniffUSB or found in belkin_sa.c. + * For further TODOs check also belkin_sa.c. + * + * TEST STATUS: + * Basic tests have been performed with minicom/zmodem transfers and + * modem dialing under Linux 2.4.0-test10 (for me it works fine). + * + * 04-May-2001 Stelian Pop + * - Set the maximum bulk output size for Sitecom U232-P25 model to 16 bytes + * instead of the device reported 32 (using 32 bytes causes many data + * loss, Windows driver uses 16 too). + * + * 02-May-2001 Stelian Pop + * - Fixed the baud calculation for Sitecom U232-P25 model + * + * 08-Apr-2001 gb + * - Identify version on module load. + * + * 06-Jan-2001 Cornel Ciocirlan + * - Added support for Sitecom U232-P25 model (Product Id 0x0230) + * - Added support for D-Link DU-H3SP USB BAY (Product Id 0x0200) + * + * 29-Nov-2000 Greg Kroah-Hartman + * - Added device id table to fit with 2.4.0-test11 structure. + * - took out DEAL_WITH_TWO_INT_IN_ENDPOINTS #define as it's not needed + * (lots of things will change if/when the usb-serial core changes to + * handle these issues. + * + * 27-Nov-2000 Wolfgang Grandegger + * A version for kernel 2.4.0-test10 released to the Linux community + * (via linux-usb-devel). + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef CONFIG_USB_SERIAL_DEBUG + static int debug = 1; +#else + static int debug; +#endif + +#include "usb-serial.h" +#include "mct_u232.h" + + +/* + * Version Information + */ +#define DRIVER_VERSION "v1.0.0" +#define DRIVER_AUTHOR "Wolfgang Grandegger " +#define DRIVER_DESC "Magic Control Technology USB-RS232 converter driver" + +/* + * Some not properly written applications do not handle the return code of + * write() correctly. This can result in character losses. A work-a-round + * can be compiled in with the following definition. This work-a-round + * should _NOT_ be part of an 'official' kernel release, of course! + */ +#undef FIX_WRITE_RETURN_CODE_PROBLEM +#ifdef FIX_WRITE_RETURN_CODE_PROBLEM +static int write_blocking = 0; /* disabled by default */ +#endif + +/* + * Function prototypes + */ +static int mct_u232_startup (struct usb_serial *serial); +static void mct_u232_shutdown (struct usb_serial *serial); +static int mct_u232_open (struct usb_serial_port *port, + struct file *filp); +static void mct_u232_close (struct usb_serial_port *port, + struct file *filp); +#ifdef FIX_WRITE_RETURN_CODE_PROBLEM +static int mct_u232_write (struct usb_serial_port *port, + int from_user, + const unsigned char *buf, + int count); +static void mct_u232_write_bulk_callback (struct urb *urb); +#endif +static void mct_u232_read_int_callback (struct urb *urb); +static void mct_u232_set_termios (struct usb_serial_port *port, + struct termios * old); +static int mct_u232_ioctl (struct usb_serial_port *port, + struct file * file, + unsigned int cmd, + unsigned long arg); +static void mct_u232_break_ctl (struct usb_serial_port *port, + int break_state ); + +/* + * All of the device info needed for the MCT USB-RS232 converter. + */ +static __u16 mct_u232_vendor_id = MCT_U232_VID; +static __u16 mct_u232_product_id = MCT_U232_PID; +static __u16 mct_u232_sitecom_id = MCT_U232_SITECOM_PID; +static __u16 mct_u232_du_h3sp_id = MCT_U232_DU_H3SP_PID; + +struct usb_serial_device_type mct_u232_device = { + name: "Magic Control Technology USB-RS232", + idVendor: &mct_u232_vendor_id, + idProduct: &mct_u232_product_id, + needs_interrupt_in: MUST_HAVE, /* 2 interrupt-in endpoints */ + needs_bulk_in: MUST_HAVE_NOT, /* no bulk-in endpoint */ + needs_bulk_out: MUST_HAVE, /* 1 bulk-out endpoint */ + num_interrupt_in: 2, + num_bulk_in: 0, + num_bulk_out: 1, + num_ports: 1, + open: mct_u232_open, + close: mct_u232_close, +#ifdef FIX_WRITE_RETURN_CODE_PROBLEM + write: mct_u232_write, + write_bulk_callback: mct_u232_write_bulk_callback, +#endif + read_int_callback: mct_u232_read_int_callback, + ioctl: mct_u232_ioctl, + set_termios: mct_u232_set_termios, + break_ctl: mct_u232_break_ctl, + startup: mct_u232_startup, + shutdown: mct_u232_shutdown, +}; + +struct usb_serial_device_type mct_u232_sitecom_device = { + name: "MCT/Sitecom USB-RS232", + idVendor: &mct_u232_vendor_id, + idProduct: &mct_u232_sitecom_id, + needs_interrupt_in: MUST_HAVE, /* 2 interrupt-in endpoints */ + needs_bulk_in: MUST_HAVE_NOT, /* no bulk-in endpoint */ + needs_bulk_out: MUST_HAVE, /* 1 bulk-out endpoint */ + num_interrupt_in: 2, + num_bulk_in: 0, + num_bulk_out: 1, + num_ports: 1, + open: mct_u232_open, + close: mct_u232_close, +#ifdef FIX_WRITE_RETURN_CODE_PROBLEM + write: mct_u232_write, + write_bulk_callback: mct_u232_write_bulk_callback, +#endif + read_int_callback: mct_u232_read_int_callback, + ioctl: mct_u232_ioctl, + set_termios: mct_u232_set_termios, + break_ctl: mct_u232_break_ctl, + startup: mct_u232_startup, + shutdown: mct_u232_shutdown, +}; + +struct usb_serial_device_type mct_u232_du_h3sp_device = { + name: "MCT/D-Link DU-H3SP USB BAY", + idVendor: &mct_u232_vendor_id, + idProduct: &mct_u232_du_h3sp_id, + needs_interrupt_in: MUST_HAVE, /* 2 interrupt-in endpoints */ + needs_bulk_in: MUST_HAVE_NOT, /* no bulk-in endpoint */ + needs_bulk_out: MUST_HAVE, /* 1 bulk-out endpoint */ + num_interrupt_in: 2, + num_bulk_in: 0, + num_bulk_out: 1, + num_ports: 1, + open: mct_u232_open, + close: mct_u232_close, +#ifdef FIX_WRITE_RETURN_CODE_PROBLEM + write: mct_u232_write, + write_bulk_callback: mct_u232_write_bulk_callback, +#endif + read_int_callback: mct_u232_read_int_callback, + ioctl: mct_u232_ioctl, + set_termios: mct_u232_set_termios, + break_ctl: mct_u232_break_ctl, + startup: mct_u232_startup, + shutdown: mct_u232_shutdown, +}; + + + + +struct mct_u232_private { + unsigned long control_state; /* Modem Line Setting (TIOCM) */ + unsigned char last_lcr; /* Line Control Register */ + unsigned char last_lsr; /* Line Status Register */ + unsigned char last_msr; /* Modem Status Register */ +}; + +/* + * Handle vendor specific USB requests + */ + +#define WDR_TIMEOUT (HZ * 5 ) /* default urb timeout */ + +static int mct_u232_calculate_baud_rate(struct usb_serial *serial, int value) { + if (serial->dev->descriptor.idProduct == MCT_U232_SITECOM_PID) { + switch (value) { + case 300: return 0x01; + case 600: return 0x02; /* this one not tested */ + case 1200: return 0x03; + case 2400: return 0x04; + case 4800: return 0x06; + case 9600: return 0x08; + case 19200: return 0x09; + case 38400: return 0x0a; + case 57600: return 0x0b; + case 115200: return 0x0c; + default: return -1; /* normally not reached */ + } + } + else + return MCT_U232_BAUD_RATE(value); +} + +static int mct_u232_set_baud_rate(struct usb_serial *serial, int value) +{ + unsigned int divisor; + int rc; + divisor = mct_u232_calculate_baud_rate(serial, value); + rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), + MCT_U232_SET_BAUD_RATE_REQUEST, + MCT_U232_SET_REQUEST_TYPE, + 0, 0, &divisor, MCT_U232_SET_BAUD_RATE_SIZE, + WDR_TIMEOUT); + if (rc < 0) + err("Set BAUD RATE %d failed (error = %d)", value, rc); + dbg("set_baud_rate: value: %d, divisor: 0x%x", value, divisor); + return rc; +} /* mct_u232_set_baud_rate */ + +static int mct_u232_set_line_ctrl(struct usb_serial *serial, unsigned char lcr) +{ + int rc; + rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), + MCT_U232_SET_LINE_CTRL_REQUEST, + MCT_U232_SET_REQUEST_TYPE, + 0, 0, &lcr, MCT_U232_SET_LINE_CTRL_SIZE, + WDR_TIMEOUT); + if (rc < 0) + err("Set LINE CTRL 0x%x failed (error = %d)", lcr, rc); + dbg("set_line_ctrl: 0x%x", lcr); + return rc; +} /* mct_u232_set_line_ctrl */ + +static int mct_u232_set_modem_ctrl(struct usb_serial *serial, + unsigned long control_state) +{ + int rc; + unsigned char mcr = MCT_U232_MCR_NONE; + + if (control_state & TIOCM_DTR) + mcr |= MCT_U232_MCR_DTR; + if (control_state & TIOCM_RTS) + mcr |= MCT_U232_MCR_RTS; + + rc = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), + MCT_U232_SET_MODEM_CTRL_REQUEST, + MCT_U232_SET_REQUEST_TYPE, + 0, 0, &mcr, MCT_U232_SET_MODEM_CTRL_SIZE, + WDR_TIMEOUT); + if (rc < 0) + err("Set MODEM CTRL 0x%x failed (error = %d)", mcr, rc); + dbg("set_modem_ctrl: state=0x%lx ==> mcr=0x%x", control_state, mcr); + + return rc; +} /* mct_u232_set_modem_ctrl */ + +static int mct_u232_get_modem_stat(struct usb_serial *serial, unsigned char *msr) +{ + int rc; + rc = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0), + MCT_U232_GET_MODEM_STAT_REQUEST, + MCT_U232_GET_REQUEST_TYPE, + 0, 0, msr, MCT_U232_GET_MODEM_STAT_SIZE, + WDR_TIMEOUT); + if (rc < 0) { + err("Get MODEM STATus failed (error = %d)", rc); + *msr = 0; + } + dbg("get_modem_stat: 0x%x", *msr); + return rc; +} /* mct_u232_get_modem_stat */ + +static void mct_u232_msr_to_state(unsigned long *control_state, unsigned char msr) +{ + /* Translate Control Line states */ + if (msr & MCT_U232_MSR_DSR) + *control_state |= TIOCM_DSR; + else + *control_state &= ~TIOCM_DSR; + if (msr & MCT_U232_MSR_CTS) + *control_state |= TIOCM_CTS; + else + *control_state &= ~TIOCM_CTS; + if (msr & MCT_U232_MSR_RI) + *control_state |= TIOCM_RI; + else + *control_state &= ~TIOCM_RI; + if (msr & MCT_U232_MSR_CD) + *control_state |= TIOCM_CD; + else + *control_state &= ~TIOCM_CD; + dbg("msr_to_state: msr=0x%x ==> state=0x%lx", msr, *control_state); +} /* mct_u232_msr_to_state */ + +/* + * Driver's tty interface functions + */ + +static int mct_u232_startup (struct usb_serial *serial) +{ + struct mct_u232_private *priv; + + /* allocate the private data structure */ + serial->port->private = kmalloc(sizeof(struct mct_u232_private), + GFP_KERNEL); + if (!serial->port->private) + return (-1); /* error */ + priv = (struct mct_u232_private *)serial->port->private; + /* set initial values for control structures */ + priv->control_state = 0; + priv->last_lsr = 0; + priv->last_msr = 0; + + init_waitqueue_head(&serial->port->write_wait); + + return (0); +} /* mct_u232_startup */ + + +static void mct_u232_shutdown (struct usb_serial *serial) +{ + int i; + + dbg (__FUNCTION__); + + /* stop reads and writes on all ports */ + for (i=0; i < serial->num_ports; ++i) { + while (serial->port[i].open_count > 0) { + mct_u232_close (&serial->port[i], NULL); + } + /* My special items, the standard routines free my urbs */ + if (serial->port[i].private) + kfree(serial->port[i].private); + } +} /* mct_u232_shutdown */ + +static int mct_u232_open (struct usb_serial_port *port, struct file *filp) +{ + unsigned long flags; + struct usb_serial *serial = port->serial; + struct mct_u232_private *priv = (struct mct_u232_private *)port->private; + + dbg(__FUNCTION__" port %d", port->number); + + spin_lock_irqsave (&port->port_lock, flags); + + ++port->open_count; + MOD_INC_USE_COUNT; + + if (!port->active) { + port->active = 1; + + /* Compensate for a hardware bug: although the Sitecom U232-P25 + * device reports a maximum output packet size of 32 bytes, + * it seems to be able to accept only 16 bytes (and that's what + * SniffUSB says too...) + */ + if (serial->dev->descriptor.idProduct == MCT_U232_SITECOM_PID) + port->bulk_out_size = 16; + + /* Do a defined restart: the normal serial device seems to + * always turn on DTR and RTS here, so do the same. I'm not + * sure if this is really necessary. But it should not harm + * either. + */ + if (port->tty->termios->c_cflag & CBAUD) + priv->control_state = TIOCM_DTR | TIOCM_RTS; + else + priv->control_state = 0; + mct_u232_set_modem_ctrl(serial, priv->control_state); + + priv->last_lcr = (MCT_U232_DATA_BITS_8 | + MCT_U232_PARITY_NONE | + MCT_U232_STOP_BITS_1); + mct_u232_set_line_ctrl(serial, priv->last_lcr); + + /* Read modem status and update control state */ + mct_u232_get_modem_stat(serial, &priv->last_msr); + mct_u232_msr_to_state(&priv->control_state, priv->last_msr); + + { + /* Puh, that's dirty */ + struct usb_serial_port *rport; + rport = &serial->port[1]; + rport->tty = port->tty; + rport->private = port->private; + port->read_urb = rport->interrupt_in_urb; + } + + port->read_urb->dev = port->serial->dev; + if (usb_submit_urb(port->read_urb)) + err("usb_submit_urb(read bulk) failed"); + + port->interrupt_in_urb->dev = port->serial->dev; + if (usb_submit_urb(port->interrupt_in_urb)) + err(" usb_submit_urb(read int) failed"); + + } + + spin_unlock_irqrestore (&port->port_lock, flags); + + return 0; +} /* mct_u232_open */ + + +static void mct_u232_close (struct usb_serial_port *port, struct file *filp) +{ + unsigned long flags; + + dbg(__FUNCTION__" port %d", port->number); + + spin_lock_irqsave (&port->port_lock, flags); + + --port->open_count; + MOD_DEC_USE_COUNT; + + if (port->open_count <= 0) { + /* shutdown our bulk reads and writes */ + usb_unlink_urb (port->write_urb); + usb_unlink_urb (port->read_urb); + /* wgg - do I need this? I think so. */ + usb_unlink_urb (port->interrupt_in_urb); + port->active = 0; + } + + spin_unlock_irqrestore (&port->port_lock, flags); + +} /* mct_u232_close */ + + +#ifdef FIX_WRITE_RETURN_CODE_PROBLEM +/* The generic routines work fine otherwise */ + +static int mct_u232_write (struct usb_serial_port *port, int from_user, + const unsigned char *buf, int count) +{ + struct usb_serial *serial = port->serial; + unsigned long flags; + int result, bytes_sent, size; + + dbg(__FUNCTION__ " - port %d", port->number); + + if (count == 0) { + dbg(__FUNCTION__ " - write request of 0 bytes"); + return (0); + } + + /* only do something if we have a bulk out endpoint */ + if (!serial->num_bulk_out) + return(0);; + + /* another write is still pending? */ + if (port->write_urb->status == -EINPROGRESS) { + dbg (__FUNCTION__ " - already writing"); + return (0); + } + + bytes_sent = 0; + while (count > 0) { + + spin_lock_irqsave (&port->port_lock, flags); + + size = (count > port->bulk_out_size) ? port->bulk_out_size : count; + + usb_serial_debug_data (__FILE__, __FUNCTION__, size, buf); + + if (from_user) { + copy_from_user(port->write_urb->transfer_buffer, buf, size); + } + else { + memcpy (port->write_urb->transfer_buffer, buf, size); + } + + /* set up our urb */ + FILL_BULK_URB(port->write_urb, serial->dev, + usb_sndbulkpipe(serial->dev, + port->bulk_out_endpointAddress), + port->write_urb->transfer_buffer, size, + ((serial->type->write_bulk_callback) ? + serial->type->write_bulk_callback : + mct_u232_write_bulk_callback), + port); + + /* send the data out the bulk port */ + result = usb_submit_urb(port->write_urb); + if (result) { + err(__FUNCTION__ + " - failed submitting write urb, error %d", result); + spin_unlock_irqrestore (&port->port_lock, flags); + return bytes_sent; + } + + spin_unlock_irqrestore (&port->port_lock, flags); + + bytes_sent += size; + if (write_blocking) + interruptible_sleep_on(&port->write_wait); + else + break; + + buf += size; + count -= size; + } + + return bytes_sent; +} /* mct_u232_write */ + +static void mct_u232_write_bulk_callback (struct urb *urb) +{ + struct usb_serial_port *port = (struct usb_serial_port *)urb->context; + struct usb_serial *serial = port->serial; + struct tty_struct *tty = port->tty; + + dbg(__FUNCTION__ " - port %d", port->number); + + if (!serial) { + dbg(__FUNCTION__ " - bad serial pointer, exiting"); + return; + } + + if (urb->status) { + dbg(__FUNCTION__ " - nonzero write bulk status received: %d", + urb->status); + return; + } + + if (write_blocking) { + wake_up_interruptible(&port->write_wait); + if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && + tty->ldisc.write_wakeup) + (tty->ldisc.write_wakeup)(tty); + wake_up_interruptible(&tty->write_wait); + + } else { + /* from generic_write_bulk_callback */ + queue_task(&port->tqueue, &tq_immediate); + mark_bh(IMMEDIATE_BH); + } + + return; +} /* mct_u232_write_bulk_callback */ +#endif + +static void mct_u232_read_int_callback (struct urb *urb) +{ + struct usb_serial_port *port = (struct usb_serial_port *)urb->context; + struct mct_u232_private *priv = (struct mct_u232_private *)port->private; + struct usb_serial *serial = port->serial; + struct tty_struct *tty; + unsigned char *data = urb->transfer_buffer; + + dbg(__FUNCTION__ " - port %d", port->number); + + /* The urb might have been killed. */ + if (urb->status) { + dbg(__FUNCTION__ " - nonzero read bulk status received: %d", + urb->status); + return; + } + if (!serial) { + dbg(__FUNCTION__ " - bad serial pointer, exiting"); + return; + } + + usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data); + + /* + * Work-a-round: handle the 'usual' bulk-in pipe here + */ + if (urb->transfer_buffer_length > 2) { + int i; + tty = port->tty; + if (urb->actual_length) { + for (i = 0; i < urb->actual_length ; ++i) { + tty_insert_flip_char(tty, data[i], 0); + } + tty_flip_buffer_push(tty); + } + /* INT urbs are automatically re-submitted */ + return; + } + + /* + * The interrupt-in pipe signals exceptional conditions (modem line + * signal changes and errors). data[0] holds MSR, data[1] holds LSR. + */ + priv->last_msr = data[MCT_U232_MSR_INDEX]; + + /* Record Control Line states */ + mct_u232_msr_to_state(&priv->control_state, priv->last_msr); + +#if 0 + /* Not yet handled. See belin_sa.c for further information */ + /* Now to report any errors */ + priv->last_lsr = data[MCT_U232_LSR_INDEX]; + /* + * fill in the flip buffer here, but I do not know the relation + * to the current/next receive buffer or characters. I need + * to look in to this before committing any code. + */ + if (priv->last_lsr & MCT_U232_LSR_ERR) { + tty = port->tty; + /* Overrun Error */ + if (priv->last_lsr & MCT_U232_LSR_OE) { + } + /* Parity Error */ + if (priv->last_lsr & MCT_U232_LSR_PE) { + } + /* Framing Error */ + if (priv->last_lsr & MCT_U232_LSR_FE) { + } + /* Break Indicator */ + if (priv->last_lsr & MCT_U232_LSR_BI) { + } + } +#endif + + /* INT urbs are automatically re-submitted */ +} /* mct_u232_read_int_callback */ + + +static void mct_u232_set_termios (struct usb_serial_port *port, + struct termios *old_termios) +{ + struct usb_serial *serial = port->serial; + struct mct_u232_private *priv = (struct mct_u232_private *)port->private; + unsigned int iflag = port->tty->termios->c_iflag; + unsigned int old_iflag = old_termios->c_iflag; + unsigned int cflag = port->tty->termios->c_cflag; + unsigned int old_cflag = old_termios->c_cflag; + + /* + * Update baud rate + */ + if( (cflag & CBAUD) != (old_cflag & CBAUD) ) { + /* reassert DTR and (maybe) RTS on transition from B0 */ + if( (old_cflag & CBAUD) == B0 ) { + dbg(__FUNCTION__ ": baud was B0"); + priv->control_state |= TIOCM_DTR; + /* don't set RTS if using hardware flow control */ + if (!(old_cflag & CRTSCTS)) { + priv->control_state |= TIOCM_RTS; + } + mct_u232_set_modem_ctrl(serial, priv->control_state); + } + + switch(cflag & CBAUD) { + case B0: /* handled below */ + break; + case B300: mct_u232_set_baud_rate(serial, 300); + break; + case B600: mct_u232_set_baud_rate(serial, 600); + break; + case B1200: mct_u232_set_baud_rate(serial, 1200); + break; + case B2400: mct_u232_set_baud_rate(serial, 2400); + break; + case B4800: mct_u232_set_baud_rate(serial, 4800); + break; + case B9600: mct_u232_set_baud_rate(serial, 9600); + break; + case B19200: mct_u232_set_baud_rate(serial, 19200); + break; + case B38400: mct_u232_set_baud_rate(serial, 38400); + break; + case B57600: mct_u232_set_baud_rate(serial, 57600); + break; + case B115200: mct_u232_set_baud_rate(serial, 115200); + break; + default: err("MCT USB-RS232 converter: unsupported baudrate request, using default of 9600"); + mct_u232_set_baud_rate(serial, 9600); break; + } + if ((cflag & CBAUD) == B0 ) { + dbg(__FUNCTION__ ": baud is B0"); + /* Drop RTS and DTR */ + priv->control_state &= ~(TIOCM_DTR | TIOCM_RTS); + mct_u232_set_modem_ctrl(serial, priv->control_state); + } + } + + /* + * Update line control register (LCR) + */ + if ((cflag & (PARENB|PARODD)) != (old_cflag & (PARENB|PARODD)) + || (cflag & CSIZE) != (old_cflag & CSIZE) + || (cflag & CSTOPB) != (old_cflag & CSTOPB) ) { + + + priv->last_lcr = 0; + + /* set the parity */ + if (cflag & PARENB) + priv->last_lcr |= (cflag & PARODD) ? + MCT_U232_PARITY_ODD : MCT_U232_PARITY_EVEN; + else + priv->last_lcr |= MCT_U232_PARITY_NONE; + + /* set the number of data bits */ + switch (cflag & CSIZE) { + case CS5: + priv->last_lcr |= MCT_U232_DATA_BITS_5; break; + case CS6: + priv->last_lcr |= MCT_U232_DATA_BITS_6; break; + case CS7: + priv->last_lcr |= MCT_U232_DATA_BITS_7; break; + case CS8: + priv->last_lcr |= MCT_U232_DATA_BITS_8; break; + default: + err("CSIZE was not CS5-CS8, using default of 8"); + priv->last_lcr |= MCT_U232_DATA_BITS_8; + break; + } + + /* set the number of stop bits */ + priv->last_lcr |= (cflag & CSTOPB) ? + MCT_U232_STOP_BITS_2 : MCT_U232_STOP_BITS_1; + + mct_u232_set_line_ctrl(serial, priv->last_lcr); + } + + /* + * Set flow control: well, I do not really now how to handle DTR/RTS. + * Just do what we have seen with SniffUSB on Win98. + */ + if( (iflag & IXOFF) != (old_iflag & IXOFF) + || (iflag & IXON) != (old_iflag & IXON) + || (cflag & CRTSCTS) != (old_cflag & CRTSCTS) ) { + + /* Drop DTR/RTS if no flow control otherwise assert */ + if ((iflag & IXOFF) || (iflag & IXON) || (cflag & CRTSCTS) ) + priv->control_state |= TIOCM_DTR | TIOCM_RTS; + else + priv->control_state &= ~(TIOCM_DTR | TIOCM_RTS); + mct_u232_set_modem_ctrl(serial, priv->control_state); + } +} /* mct_u232_set_termios */ + + +static void mct_u232_break_ctl( struct usb_serial_port *port, int break_state ) +{ + struct usb_serial *serial = port->serial; + struct mct_u232_private *priv = (struct mct_u232_private *)port->private; + unsigned char lcr = priv->last_lcr; + + dbg (__FUNCTION__ "state=%d", break_state); + + if (break_state) + lcr |= MCT_U232_SET_BREAK; + + mct_u232_set_line_ctrl(serial, lcr); +} /* mct_u232_break_ctl */ + + +static int mct_u232_ioctl (struct usb_serial_port *port, struct file * file, + unsigned int cmd, unsigned long arg) +{ + struct usb_serial *serial = port->serial; + struct mct_u232_private *priv = (struct mct_u232_private *)port->private; + int ret, mask; + + dbg (__FUNCTION__ "cmd=0x%x", cmd); + + /* Based on code from acm.c and others */ + switch (cmd) { + case TIOCMGET: + return put_user(priv->control_state, (unsigned long *) arg); + break; + + case TIOCMSET: /* Turns on and off the lines as specified by the mask */ + case TIOCMBIS: /* turns on (Sets) the lines as specified by the mask */ + case TIOCMBIC: /* turns off (Clears) the lines as specified by the mask */ + if ((ret = get_user(mask, (unsigned long *) arg))) return ret; + + if ((cmd == TIOCMSET) || (mask & TIOCM_RTS)) { + /* RTS needs set */ + if( ((cmd == TIOCMSET) && (mask & TIOCM_RTS)) || + (cmd == TIOCMBIS) ) + priv->control_state |= TIOCM_RTS; + else + priv->control_state &= ~TIOCM_RTS; + } + + if ((cmd == TIOCMSET) || (mask & TIOCM_DTR)) { + /* DTR needs set */ + if( ((cmd == TIOCMSET) && (mask & TIOCM_DTR)) || + (cmd == TIOCMBIS) ) + priv->control_state |= TIOCM_DTR; + else + priv->control_state &= ~TIOCM_DTR; + } + mct_u232_set_modem_ctrl(serial, priv->control_state); + break; + + case TIOCMIWAIT: + /* wait for any of the 4 modem inputs (DCD,RI,DSR,CTS)*/ + /* TODO */ + return( 0 ); + + case TIOCGICOUNT: + /* return count of modemline transitions */ + /* TODO */ + return 0; + + default: + dbg(__FUNCTION__ ": arg not supported - 0x%04x",cmd); + return(-ENOIOCTLCMD); + break; + } + return 0; +} /* mct_u232_ioctl */ + + +static int __init mct_u232_init (void) +{ + usb_serial_register (&mct_u232_device); + usb_serial_register (&mct_u232_sitecom_device); + usb_serial_register (&mct_u232_du_h3sp_device); + info(DRIVER_VERSION " " DRIVER_AUTHOR); + info(DRIVER_DESC); + return 0; +} + + +static void __exit mct_u232_exit (void) +{ + usb_serial_deregister (&mct_u232_device); + usb_serial_deregister (&mct_u232_sitecom_device); + usb_serial_deregister (&mct_u232_du_h3sp_device); +} + + +module_init (mct_u232_init); +module_exit(mct_u232_exit); + +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); + +#ifdef FIX_WRITE_RETURN_CODE_PROBLEM +MODULE_PARM(write_blocking, "i"); +MODULE_PARM_DESC(write_blocking, + "The write function will block to write out all data"); +#endif + +MODULE_PARM(debug, "i"); +MODULE_PARM_DESC(debug, "Debug enabled or not"); + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/mct_u232.h linux.20p6/drivers/usb/serial/mct_u232.h --- linux.vanilla/drivers/usb/serial/mct_u232.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/drivers/usb/serial/mct_u232.h Mon Jun 18 08:11:53 2001 @@ -0,0 +1,369 @@ +/* + * Definitions for MCT (Magic Control Technology) USB-RS232 Converter Driver + * + * Copyright (C) 2000 Wolfgang Grandegger (wolfgang@ces.ch) + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This driver is for the device MCT USB-RS232 Converter (25 pin, Model No. + * U232-P25) from Magic Control Technology Corp. (there is also a 9 pin + * Model No. U232-P9). See http://www.mct.com.tw/p_u232.html for further + * information. The properties of this device are listed at the end of this + * file. This device is available from various distributors. I know Hana, + * http://www.hana.de and D-Link, http://www.dlink.com/products/usb/dsbs25. + * + * All of the information about the device was acquired by using SniffUSB + * on Windows98. The technical details of the reverse engineering are + * summarized at the end of this file. + */ + +#ifndef __LINUX_USB_SERIAL_MCT_U232_H +#define __LINUX_USB_SERIAL_MCT_U232_H + +#define MCT_U232_VID 0x0711 /* Vendor Id */ +#define MCT_U232_PID 0x0210 /* Original MCT Product Id */ + +/* U232-P25, Sitecom */ +#define MCT_U232_SITECOM_PID 0x0230 /* Sitecom Product Id */ + +/* DU-H3SP USB BAY hub */ + +#define MCT_U232_DU_H3SP_PID 0x0200 /* D-Link DU-H3SP USB BAY */ + +/* + * Vendor Request Interface + */ +#define MCT_U232_SET_REQUEST_TYPE 0x40 +#define MCT_U232_GET_REQUEST_TYPE 0xc0 + +#define MCT_U232_GET_MODEM_STAT_REQUEST 2 /* Get Modem Status Register (MSR) */ +#define MCT_U232_GET_MODEM_STAT_SIZE 1 + +#define MCT_U232_GET_LINE_CTRL_REQUEST 6 /* Get Line Control Register (LCR) */ +#define MCT_U232_GET_LINE_CTRL_SIZE 1 /* ... not used by this driver */ + +#define MCT_U232_SET_BAUD_RATE_REQUEST 5 /* Set Baud Rate Divisor */ +#define MCT_U232_SET_BAUD_RATE_SIZE 4 + +#define MCT_U232_SET_LINE_CTRL_REQUEST 7 /* Set Line Control Register (LCR) */ +#define MCT_U232_SET_LINE_CTRL_SIZE 1 + +#define MCT_U232_SET_MODEM_CTRL_REQUEST 10 /* Set Modem Control Register (MCR) */ +#define MCT_U232_SET_MODEM_CTRL_SIZE 1 + +/* + * Baud rate (divisor) + */ +#define MCT_U232_BAUD_RATE(b) (115200/b) + +/* + * Line Control Register (LCR) + */ +#define MCT_U232_SET_BREAK 0x40 + +#define MCT_U232_PARITY_SPACE 0x38 +#define MCT_U232_PARITY_MARK 0x28 +#define MCT_U232_PARITY_EVEN 0x18 +#define MCT_U232_PARITY_ODD 0x08 +#define MCT_U232_PARITY_NONE 0x00 + +#define MCT_U232_DATA_BITS_5 0x00 +#define MCT_U232_DATA_BITS_6 0x01 +#define MCT_U232_DATA_BITS_7 0x02 +#define MCT_U232_DATA_BITS_8 0x03 + +#define MCT_U232_STOP_BITS_2 0x04 +#define MCT_U232_STOP_BITS_1 0x00 + +/* + * Modem Control Register (MCR) + */ +#define MCT_U232_MCR_NONE 0x8 /* Deactivate DTR and RTS */ +#define MCT_U232_MCR_RTS 0xa /* Activate RTS */ +#define MCT_U232_MCR_DTR 0x9 /* Activate DTR */ + +/* + * Modem Status Register (MSR) + */ +#define MCT_U232_MSR_INDEX 0x0 /* data[index] */ +#define MCT_U232_MSR_CD 0x80 /* Current CD */ +#define MCT_U232_MSR_RI 0x40 /* Current RI */ +#define MCT_U232_MSR_DSR 0x20 /* Current DSR */ +#define MCT_U232_MSR_CTS 0x10 /* Current CTS */ +#define MCT_U232_MSR_DCD 0x08 /* Delta CD */ +#define MCT_U232_MSR_DRI 0x04 /* Delta RI */ +#define MCT_U232_MSR_DDSR 0x02 /* Delta DSR */ +#define MCT_U232_MSR_DCTS 0x01 /* Delta CTS */ + +/* + * Line Status Register (LSR) + */ +#define MCT_U232_LSR_INDEX 1 /* data[index] */ +#define MCT_U232_LSR_ERR 0x80 /* OE | PE | FE | BI */ +#define MCT_U232_LSR_TEMT 0x40 /* transmit register empty */ +#define MCT_U232_LSR_THRE 0x20 /* transmit holding register empty */ +#define MCT_U232_LSR_BI 0x10 /* break indicator */ +#define MCT_U232_LSR_FE 0x08 /* framing error */ +#define MCT_U232_LSR_OE 0x02 /* overrun error */ +#define MCT_U232_LSR_PE 0x04 /* parity error */ +#define MCT_U232_LSR_OE 0x02 /* overrun error */ +#define MCT_U232_LSR_DR 0x01 /* receive data ready */ + + +/* ----------------------------------------------------------------------------- + * Technical Specification reverse engineered with SniffUSB on Windows98 + * ===================================================================== + * + * The technical details of the device have been acquired be using "SniffUSB" + * and the vendor-supplied device driver (version 2.3A) under Windows98. To + * identify the USB vendor-specific requests and to assign them to terminal + * settings (flow control, baud rate, etc.) the program "SerialSettings" from + * William G. Greathouse has been proven to be very useful. I also used the + * Win98 "HyperTerminal" and "usb-robot" on Linux for testing. The results and + * observations are summarized below: + * + * The USB requests seem to be directly mapped to the registers of a 8250, + * 16450 or 16550 UART. The FreeBSD handbook (appendix F.4 "Input/Output + * devices") contains a comprehensive description of UARTs and its registers. + * The bit descriptions are actually taken from there. + * + * + * Baud rate (divisor) + * ------------------- + * + * BmRequestType: 0x4 (0100 0000B) + * bRequest: 0x5 + * wValue: 0x0 + * wIndex: 0x0 + * wLength: 0x4 + * Data: divisor = 115200 / baud_rate + * + * + * Line Control Register (LCR) + * --------------------------- + * + * BmRequestType: 0x4 (0100 0000B) 0xc (1100 0000B) + * bRequest: 0x7 0x6 + * wValue: 0x0 + * wIndex: 0x0 + * wLength: 0x1 + * Data: LCR (see below) + * + * Bit 7: Divisor Latch Access Bit (DLAB). When set, access to the data + * transmit/receive register (THR/RBR) and the Interrupt Enable Register + * (IER) is disabled. Any access to these ports is now redirected to the + * Divisor Latch Registers. Setting this bit, loading the Divisor + * Registers, and clearing DLAB should be done with interrupts disabled. + * Bit 6: Set Break. When set to "1", the transmitter begins to transmit + * continuous Spacing until this bit is set to "0". This overrides any + * bits of characters that are being transmitted. + * Bit 5: Stick Parity. When parity is enabled, setting this bit causes parity + * to always be "1" or "0", based on the value of Bit 4. + * Bit 4: Even Parity Select (EPS). When parity is enabled and Bit 5 is "0", + * setting this bit causes even parity to be transmitted and expected. + * Otherwise, odd parity is used. + * Bit 3: Parity Enable (PEN). When set to "1", a parity bit is inserted + * between the last bit of the data and the Stop Bit. The UART will also + * expect parity to be present in the received data. + * Bit 2: Number of Stop Bits (STB). If set to "1" and using 5-bit data words, + * 1.5 Stop Bits are transmitted and expected in each data word. For + * 6, 7 and 8-bit data words, 2 Stop Bits are transmitted and expected. + * When this bit is set to "0", one Stop Bit is used on each data word. + * Bit 1: Word Length Select Bit #1 (WLSB1) + * Bit 0: Word Length Select Bit #0 (WLSB0) + * Together these bits specify the number of bits in each data word. + * 1 0 Word Length + * 0 0 5 Data Bits + * 0 1 6 Data Bits + * 1 0 7 Data Bits + * 1 1 8 Data Bits + * + * SniffUSB observations: Bit 7 seems not to be used. There seem to be two bugs + * in the Win98 driver: the break does not work (bit 6 is not asserted) and the + * sticky parity bit is not cleared when set once. The LCR can also be read + * back with USB request 6 but this has never been observed with SniffUSB. + * + * + * Modem Control Register (MCR) + * ---------------------------- + * + * BmRequestType: 0x4 (0100 0000B) + * bRequest: 0xa + * wValue: 0x0 + * wIndex: 0x0 + * wLength: 0x1 + * Data: MCR (Bit 4..7, see below) + * + * Bit 7: Reserved, always 0. + * Bit 6: Reserved, always 0. + * Bit 5: Reserved, always 0. + * Bit 4: Loop-Back Enable. When set to "1", the UART transmitter and receiver + * are internally connected together to allow diagnostic operations. In + * addition, the UART modem control outputs are connected to the UART + * modem control inputs. CTS is connected to RTS, DTR is connected to + * DSR, OUT1 is connected to RI, and OUT 2 is connected to DCD. + * Bit 3: OUT 2. An auxiliary output that the host processor may set high or + * low. In the IBM PC serial adapter (and most clones), OUT 2 is used + * to tri-state (disable) the interrupt signal from the + * 8250/16450/16550 UART. + * Bit 2: OUT 1. An auxiliary output that the host processor may set high or + * low. This output is not used on the IBM PC serial adapter. + * Bit 1: Request to Send (RTS). When set to "1", the output of the UART -RTS + * line is Low (Active). + * Bit 0: Data Terminal Ready (DTR). When set to "1", the output of the UART + * -DTR line is Low (Active). + * + * SniffUSB observations: Bit 2 and 4 seem not to be used but bit 3 has been + * seen _always_ set. + * + * + * Modem Status Register (MSR) + * --------------------------- + * + * BmRequestType: 0xc (1100 0000B) + * bRequest: 0x2 + * wValue: 0x0 + * wIndex: 0x0 + * wLength: 0x1 + * Data: MSR (see below) + * + * Bit 7: Data Carrier Detect (CD). Reflects the state of the DCD line on the + * UART. + * Bit 6: Ring Indicator (RI). Reflects the state of the RI line on the UART. + * Bit 5: Data Set Ready (DSR). Reflects the state of the DSR line on the UART. + * Bit 4: Clear To Send (CTS). Reflects the state of the CTS line on the UART. + * Bit 3: Delta Data Carrier Detect (DDCD). Set to "1" if the -DCD line has + * changed state one more more times since the last time the MSR was + * read by the host. + * Bit 2: Trailing Edge Ring Indicator (TERI). Set to "1" if the -RI line has + * had a low to high transition since the last time the MSR was read by + * the host. + * Bit 1: Delta Data Set Ready (DDSR). Set to "1" if the -DSR line has changed + * state one more more times since the last time the MSR was read by the + * host. + * Bit 0: Delta Clear To Send (DCTS). Set to "1" if the -CTS line has changed + * state one more times since the last time the MSR was read by the + * host. + * + * SniffUSB observations: the MSR is also returned as first byte on the + * interrupt-in endpoint 0x83 to signal changes of modem status lines. The USB + * request to read MSR cannot be applied during normal device operation. + * + * + * Line Status Register (LSR) + * -------------------------- + * + * Bit 7 Error in Receiver FIFO. On the 8250/16450 UART, this bit is zero. + * This bit is set to "1" when any of the bytes in the FIFO have one or + * more of the following error conditions: PE, FE, or BI. + * Bit 6 Transmitter Empty (TEMT). When set to "1", there are no words + * remaining in the transmit FIFO or the transmit shift register. The + * transmitter is completely idle. + * Bit 5 Transmitter Holding Register Empty (THRE). When set to "1", the FIFO + * (or holding register) now has room for at least one additional word + * to transmit. The transmitter may still be transmitting when this bit + * is set to "1". + * Bit 4 Break Interrupt (BI). The receiver has detected a Break signal. + * Bit 3 Framing Error (FE). A Start Bit was detected but the Stop Bit did not + * appear at the expected time. The received word is probably garbled. + * Bit 2 Parity Error (PE). The parity bit was incorrect for the word received. + * Bit 1 Overrun Error (OE). A new word was received and there was no room in + * the receive buffer. The newly-arrived word in the shift register is + * discarded. On 8250/16450 UARTs, the word in the holding register is + * discarded and the newly- arrived word is put in the holding register. + * Bit 0 Data Ready (DR). One or more words are in the receive FIFO that the + * host may read. A word must be completely received and moved from the + * shift register into the FIFO (or holding register for 8250/16450 + * designs) before this bit is set. + * + * SniffUSB observations: the LSR is returned as second byte on the interrupt-in + * endpoint 0x83 to signal error conditions. Such errors have been seen with + * minicom/zmodem transfers (CRC errors). + * + * + * Flow control + * ------------ + * + * SniffUSB observations: no flow control specific requests have been realized + * apart from DTR/RTS settings. Both signals are dropped for no flow control + * but asserted for hardware or software flow control. + * + * + * Endpoint usage + * -------------- + * + * SniffUSB observations: the bulk-out endpoint 0x1 and interrupt-in endpoint + * 0x81 is used to transmit and receive characters. The second interrupt-in + * endpoint 0x83 signals exceptional conditions like modem line changes and + * errors. The first byte returned is the MSR and the second byte the LSR. + * + * + * Other observations + * ------------------ + * + * Queued bulk transfers like used in visor.c did not work. + * + * + * Properties of the USB device used (as found in /var/log/messages) + * ----------------------------------------------------------------- + * + * Manufacturer: MCT Corporation. + * Product: USB-232 Interfact Controller + * SerialNumber: U2S22050 + * + * Length = 18 + * DescriptorType = 01 + * USB version = 1.00 + * Vendor:Product = 0711:0210 + * MaxPacketSize0 = 8 + * NumConfigurations = 1 + * Device version = 1.02 + * Device Class:SubClass:Protocol = 00:00:00 + * Per-interface classes + * Configuration: + * bLength = 9 + * bDescriptorType = 02 + * wTotalLength = 0027 + * bNumInterfaces = 01 + * bConfigurationValue = 01 + * iConfiguration = 00 + * bmAttributes = c0 + * MaxPower = 100mA + * + * Interface: 0 + * Alternate Setting: 0 + * bLength = 9 + * bDescriptorType = 04 + * bInterfaceNumber = 00 + * bAlternateSetting = 00 + * bNumEndpoints = 03 + * bInterface Class:SubClass:Protocol = 00:00:00 + * iInterface = 00 + * Endpoint: + * bLength = 7 + * bDescriptorType = 05 + * bEndpointAddress = 81 (in) + * bmAttributes = 03 (Interrupt) + * wMaxPacketSize = 0040 + * bInterval = 02 + * Endpoint: + * bLength = 7 + * bDescriptorType = 05 + * bEndpointAddress = 01 (out) + * bmAttributes = 02 (Bulk) + * wMaxPacketSize = 0040 + * bInterval = 00 + * Endpoint: + * bLength = 7 + * bDescriptorType = 05 + * bEndpointAddress = 83 (in) + * bmAttributes = 03 (Interrupt) + * wMaxPacketSize = 0002 + * bInterval = 02 + */ + +#endif /* __LINUX_USB_SERIAL_MCT_U232_H */ + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/omninet.c linux.20p6/drivers/usb/serial/omninet.c --- linux.vanilla/drivers/usb/serial/omninet.c Sun Mar 25 17:31:43 2001 +++ linux.20p6/drivers/usb/serial/omninet.c Mon Jun 18 08:09:37 2001 @@ -9,7 +9,14 @@ * See Documentation/usb/usb-serial.txt for more information on using this driver * * Please report both successes and troubles to the author at omninet@kroah.com + * + * (04/08/2001) gb + * Identify version on module load. * + * (10/05/2000) gkh + * Fixed bug with urb->dev not being set properly, now that the usb + * core needs it. + * * (08/28/2000) gkh * Added locks for SMP safeness. * Fixed MOD_INC and MOD_DEC logic and the ability to open a port more @@ -31,25 +38,29 @@ #include #include #include +#include #include #include -#include #include #include - +#include #ifdef CONFIG_USB_SERIAL_DEBUG - #define isalpha(x) ( ( x > 96 && x < 123) || ( x > 64 && x < 91) || (x > 47 && x < 58) ) - #define DEBUG + static int debug = 1; #else - #undef DEBUG + static int debug; #endif -#include - #include "usb-serial.h" +/* + * Version Information + */ +#define DRIVER_VERSION "v1.0.0" +#define DRIVER_AUTHOR "Anonymous" +#define DRIVER_DESC "USB ZyXEL omni.net LCD PLUS Driver" + #define ZYXEL_VENDOR_ID 0x0586 #define ZYXEL_OMNINET_ID 0x1000 @@ -129,6 +140,7 @@ struct usb_serial_port *wport; struct omninet_data *od; unsigned long flags; + int result; if (port_paranoia_check (port, __FUNCTION__)) return -ENODEV; @@ -149,7 +161,7 @@ od = kmalloc( sizeof(struct omninet_data), GFP_KERNEL ); if( !od ) { - err(__FUNCTION__"- kmalloc(%d) failed.", sizeof(struct omninet_data)); + err(__FUNCTION__"- kmalloc(%Zd) failed.", sizeof(struct omninet_data)); --port->open_count; port->active = 0; spin_unlock_irqrestore (&port->port_lock, flags); @@ -162,8 +174,13 @@ wport->tty = port->tty; /* Start reading from the device */ - if (usb_submit_urb(port->read_urb)) - dbg(__FUNCTION__" - read bulk (%p) failed", port->read_urb); + FILL_BULK_URB(port->read_urb, serial->dev, + usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress), + port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length, + omninet_read_bulk_callback, port); + result = usb_submit_urb(port->read_urb); + if (result) + err(__FUNCTION__ " - failed submitting read urb, error %d", result); } spin_unlock_irqrestore (&port->port_lock, flags); @@ -222,6 +239,7 @@ struct omninet_header *header = (struct omninet_header *) &data[0]; int i; + int result; // dbg("omninet_read_bulk_callback"); @@ -235,8 +253,7 @@ return; } -#ifdef DEBUG - if(header->oh_xxx != 0x30) { + if ((debug) && (header->oh_xxx != 0x30)) { if (urb->actual_length) { printk (KERN_DEBUG __FILE__ ": omninet_read %d: ", header->oh_len); for (i = 0; i < (header->oh_len + OMNINET_HEADERLEN); i++) { @@ -245,7 +262,6 @@ printk ("\n"); } } -#endif if (urb->actual_length && header->oh_len) { for (i = 0; i < header->oh_len; i++) { @@ -255,8 +271,13 @@ } /* Continue trying to always read */ - if (usb_submit_urb(urb)) - dbg(__FUNCTION__" - failed resubmitting read urb"); + FILL_BULK_URB(urb, serial->dev, + usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress), + urb->transfer_buffer, urb->transfer_buffer_length, + omninet_read_bulk_callback, port); + result = usb_submit_urb(urb); + if (result) + err(__FUNCTION__ " - failed resubmitting read urb, error %d", result); return; } @@ -270,11 +291,7 @@ struct omninet_header *header = (struct omninet_header *) wport->write_urb->transfer_buffer; unsigned long flags; -/* -#ifdef DEBUG - int i; -#endif -*/ + int result; // dbg("omninet_write port %d", port->number); @@ -282,18 +299,6 @@ dbg(__FUNCTION__" - write request of 0 bytes"); return (0); } -/* -#ifdef DEBUG - printk (KERN_DEBUG __FILE__ ": omninet_write %d: ", count); - for (i = 0; i < count; i++) { - if( isalpha(buf[i]) ) - printk ("%c ", buf[i]); - else - printk ("%.2x ", buf[i]); - } - printk ("\n"); -#endif -*/ if (wport->write_urb->status == -EINPROGRESS) { dbg (__FUNCTION__" - already writing"); return (0); @@ -310,6 +315,7 @@ memcpy (wport->write_urb->transfer_buffer + OMNINET_DATAOFFSET, buf, count); } + usb_serial_debug_data (__FILE__, __FUNCTION__, count, wport->write_urb->transfer_buffer); header->oh_seq = od->od_outseq++; header->oh_len = count; @@ -319,8 +325,10 @@ /* send the data out the bulk port, always 64 bytes */ wport->write_urb->transfer_buffer_length = 64; - if (usb_submit_urb(wport->write_urb)) { - dbg(__FUNCTION__" - usb_submit_urb(write bulk) failed"); + wport->write_urb->dev = serial->dev; + result = usb_submit_urb(wport->write_urb); + if (result) { + err(__FUNCTION__ " - failed submitting write urb, error %d", result); spin_unlock_irqrestore (&port->port_lock, flags); return 0; } @@ -392,6 +400,8 @@ static int __init omninet_init (void) { usb_serial_register (&zyxel_omninet_device); + info(DRIVER_VERSION " " DRIVER_AUTHOR); + info(DRIVER_DESC); return 0; } @@ -404,4 +414,10 @@ module_init(omninet_init); module_exit(omninet_exit); + +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); + +MODULE_PARM(debug, "i"); +MODULE_PARM_DESC(debug, "Debug enabled or not"); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/usb-serial.h linux.20p6/drivers/usb/serial/usb-serial.h --- linux.vanilla/drivers/usb/serial/usb-serial.h Sun Mar 25 17:37:37 2001 +++ linux.20p6/drivers/usb/serial/usb-serial.h Mon Jun 18 08:10:03 2001 @@ -220,15 +220,24 @@ static inline void usb_serial_debug_data (const char *file, const char *function, int size, const unsigned char *data) { -#ifdef CONFIG_USB_SERIAL_DEBUG int i; + + if (!debug) + return; + printk (KERN_DEBUG "%s: %s - length = %d, data = ", file, function, size); for (i = 0; i < size; ++i) { printk ("%.2x ", data[i]); } printk ("\n"); -#endif } + + +/* Use our own dbg macro */ +#undef dbg +#define dbg(format, arg...) do { if (debug) printk(KERN_DEBUG __FILE__ ": " format "\n" , ## arg); } while (0) + + #endif /* ifdef __LINUX_USB_SERIAL_H */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/usbserial.c linux.20p6/drivers/usb/serial/usbserial.c --- linux.vanilla/drivers/usb/serial/usbserial.c Sun Mar 25 17:37:37 2001 +++ linux.20p6/drivers/usb/serial/usbserial.c Mon Jun 18 08:10:03 2001 @@ -14,6 +14,9 @@ * based on a driver by Brad Keryan) * * See Documentation/usb/usb-serial.txt for more information on using this driver + * + * (04/08/2001) gb + * Identify version on module load. * * 2001_02_05 gkh * Fixed buffer overflows bug with the generic serial driver. Thanks to @@ -264,20 +267,23 @@ #include #include #include +#include #ifdef CONFIG_USB_SERIAL_DEBUG - #define DEBUG + static int debug = 1; #else - #undef DEBUG + static int debug; #endif -#include - -/* Module information */ -MODULE_AUTHOR("Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux-usb/"); -MODULE_DESCRIPTION("USB Serial Driver"); #include "usb-serial.h" +/* + * Version Information + */ +#define DRIVER_VERSION "v1.0.0" +#define DRIVER_AUTHOR "Greg Kroah-Hartman, greg@kroah.com, http://www.kroah.com/linux-usb/" +#define DRIVER_DESC "USB Serial Driver core" + #define MAX(a,b) (((a)>(b))?(a):(b)) /* function prototypes for a "generic" type serial converter (no flow control, not all endpoints needed) */ @@ -296,11 +302,6 @@ #ifdef CONFIG_USB_SERIAL_GENERIC static __u16 vendor = 0x05f9; static __u16 product = 0xffff; -MODULE_PARM(vendor, "i"); -MODULE_PARM_DESC(vendor, "User specified USB idVendor"); - -MODULE_PARM(product, "i"); -MODULE_PARM_DESC(product, "User specified USB idProduct"); /* All of the device info needed for the Generic Serial Converter */ static struct usb_serial_device_type generic_device = { @@ -346,6 +347,7 @@ static struct termios * serial_termios_locked[SERIAL_TTY_MINORS]; static struct usb_serial *serial_table[SERIAL_TTY_MINORS]; /* initially all NULL */ + LIST_HEAD(usb_serial_driver_list); @@ -808,8 +810,6 @@ spin_lock_irqsave (&port->port_lock, flags); count = (count > port->bulk_out_size) ? port->bulk_out_size : count; - usb_serial_debug_data (__FILE__, __FUNCTION__, count, buf); - if (from_user) { copy_from_user(port->write_urb->transfer_buffer, buf, count); } @@ -817,6 +817,8 @@ memcpy (port->write_urb->transfer_buffer, buf, count); } + usb_serial_debug_data (__FILE__, __FUNCTION__, count, port->write_urb->transfer_buffer); + /* set up our urb */ FILL_BULK_URB(port->write_urb, serial->dev, usb_sndbulkpipe(serial->dev, port->bulk_out_endpointAddress), @@ -1194,6 +1196,7 @@ /* we don't use num_ports here cauz some devices have more endpoint pairs than ports */ max_endpoints = MAX(num_bulk_in, num_bulk_out); max_endpoints = MAX(max_endpoints, num_interrupt_in); + max_endpoints = MAX(max_endpoints, serial->num_ports); dbg (__FUNCTION__ " - setting up %d port structures for this device", max_endpoints); for (i = 0; i < max_endpoints; ++i) { port = &serial->port[i]; @@ -1371,8 +1374,10 @@ err("usb_register failed for the usb-serial driver. Error number %d", result); return -1; } - - + + info(DRIVER_VERSION " " DRIVER_AUTHOR); + info(DRIVER_DESC); + return 0; } @@ -1436,4 +1441,18 @@ EXPORT_SYMBOL(ezusb_writememory); EXPORT_SYMBOL(ezusb_set_reset); #endif + + +/* Module information */ +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); + +MODULE_PARM(debug, "i"); +MODULE_PARM_DESC(debug, "Debug enabled or not"); + +MODULE_PARM(vendor, "i"); +MODULE_PARM_DESC(vendor, "User specified USB idVendor"); + +MODULE_PARM(product, "i"); +MODULE_PARM_DESC(product, "User specified USB idProduct"); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/visor.c linux.20p6/drivers/usb/serial/visor.c --- linux.vanilla/drivers/usb/serial/visor.c Sun Mar 25 17:37:37 2001 +++ linux.20p6/drivers/usb/serial/visor.c Mon Jun 18 08:10:32 2001 @@ -10,6 +10,9 @@ * (at your option) any later version. * * See Documentation/usb/usb-serial.txt for more information on using this driver + * + * (04/08/2001) gb + * Identify version on module load. * * (01/21/2000) gkh * Added write_room and chars_in_buffer, as they were previously using the @@ -89,18 +92,24 @@ #include #include #include +#include #ifdef CONFIG_USB_SERIAL_DEBUG - #define DEBUG + static int debug = 1; #else - #undef DEBUG + static int debug; #endif -#include #include "usb-serial.h" - #include "visor.h" +/* + * Version Information + */ +#define DRIVER_VERSION "v1.0.0" +#define DRIVER_AUTHOR "Greg Kroah-Hartman " +#define DRIVER_DESC "USB HandSpring Visor driver" + #define MIN(a,b) (((a)<(b))?(a):(b)) /* function prototypes for a handspring visor */ @@ -149,7 +158,7 @@ #define NUM_URBS 24 -#define URB_TRANSFER_BUFFER_SIZE 64 +#define URB_TRANSFER_BUFFER_SIZE 768 static struct urb *write_urb_pool[NUM_URBS]; static spinlock_t write_urb_pool_lock; static int bytes_in; @@ -644,7 +653,10 @@ continue; } } - + + info(DRIVER_VERSION " " DRIVER_AUTHOR); + info(DRIVER_DESC); + return 0; } @@ -677,5 +689,9 @@ module_init(visor_init); module_exit(visor_exit); -MODULE_AUTHOR("Greg Kroah-Hartman "); -MODULE_DESCRIPTION("USB HandSpring Visor driver"); +MODULE_AUTHOR( DRIVER_AUTHOR ); +MODULE_DESCRIPTION( DRIVER_DESC ); + +MODULE_PARM(debug, "i"); +MODULE_PARM_DESC(debug, "Debug enabled or not"); + diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/whiteheat.c linux.20p6/drivers/usb/serial/whiteheat.c --- linux.vanilla/drivers/usb/serial/whiteheat.c Sun Mar 25 17:31:43 2001 +++ linux.20p6/drivers/usb/serial/whiteheat.c Mon Jun 18 09:31:21 2001 @@ -11,6 +11,18 @@ * * See Documentation/usb/usb-serial.txt for more information on using this driver * + * (10/05/2000) gkh + * Fixed bug with urb->dev not being set properly, now that the usb + * core needs it. + * + * (10/03/2000) smd + * firmware is improved to guard against crap sent to device + * firmware now replies CMD_FAILURE on bad things + * read_callback fix you provided for private info struct + * command_finished now indicates success or fail + * setup_port struct now packed to avoid gcc padding + * firmware uses 1 based port numbering, driver now handles that + * * (09/11/2000) gkh * Removed DEBUG #ifdefs with call to usb_serial_debug_data * @@ -42,9 +54,9 @@ #include #include #include +#include #include #include -#include #include #include @@ -55,6 +67,8 @@ #endif #include +static int debug; + #include "usb-serial.h" #include "whiteheat_fw.h" /* firmware for the ConnectTech WhiteHEAT device */ @@ -148,8 +162,11 @@ static void command_port_read_callback (struct urb *urb) { - struct whiteheat_private *info = (struct whiteheat_private *)urb->context; + struct usb_serial_port *port = (struct usb_serial_port *)urb->context; + struct usb_serial *serial = get_usb_serial (port, __FUNCTION__); + struct whiteheat_private *info; unsigned char *data = urb->transfer_buffer; + int result; dbg (__FUNCTION__); @@ -158,15 +175,39 @@ return; } + if (!serial) { + dbg(__FUNCTION__ " - bad serial pointer, exiting"); + return; + } + usb_serial_debug_data (__FILE__, __FUNCTION__, urb->actual_length, data); + info = (struct whiteheat_private *)port->private; + if (!info) { + dbg (__FUNCTION__ " - info is NULL, exiting."); + return; + } + /* right now, if the command is COMMAND_COMPLETE, just flip the bit saying the command finished */ /* in the future we're going to have to pay attention to the actual command that completed */ if (data[0] == WHITEHEAT_CMD_COMPLETE) { - info->command_finished = TRUE; + info->command_finished = WHITEHEAT_CMD_COMPLETE; + wake_up_interruptible(&info->wait_command); } - return; + if (data[0] == WHITEHEAT_CMD_FAILURE) { + info->command_finished = WHITEHEAT_CMD_FAILURE; + wake_up_interruptible(&info->wait_command); + } + + /* Continue trying to always read */ + FILL_BULK_URB(port->read_urb, serial->dev, + usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress), + port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length, + command_port_read_callback, port); + result = usb_submit_urb(port->read_urb); + if (result) + dbg(__FUNCTION__ " - failed resubmitting read urb, error %d", result); } @@ -187,6 +228,7 @@ transfer_buffer[0] = command; memcpy (&transfer_buffer[1], data, datasize); port->write_urb->transfer_buffer_length = datasize + 1; + port->write_urb->dev = serial->dev; if (usb_submit_urb (port->write_urb)) { dbg (__FUNCTION__" - submit urb failed"); return -1; @@ -203,6 +245,16 @@ return -1; } + if (info->command_finished == WHITEHEAT_CMD_FAILURE) { + dbg (__FUNCTION__ " - command failed."); + return -1; + } + + if (info->command_finished == WHITEHEAT_CMD_COMPLETE) { + dbg (__FUNCTION__ " - command completed."); + return 0; + } + return 0; } @@ -212,6 +264,7 @@ struct whiteheat_min_set open_command; struct usb_serial_port *command_port; struct whiteheat_private *info; + int result; dbg(__FUNCTION__" - port %d", port->number); @@ -234,15 +287,20 @@ command_port->private = info; command_port->write_urb->complete = command_port_write_callback; command_port->read_urb->complete = command_port_read_callback; - usb_submit_urb (command_port->read_urb); + command_port->read_urb->dev = port->serial->dev; + command_port->tty = port->tty; /* need this to "fake" our our sanity check macros */ + usb_submit_urb (command_port->read_urb); } /* Start reading from the device */ - if (usb_submit_urb(port->read_urb)) - dbg(__FUNCTION__ " - usb_submit_urb(read bulk) failed"); + port->read_urb->dev = port->serial->dev; + result = usb_submit_urb(port->read_urb); + if (result) + err(__FUNCTION__ " - failed submitting read urb, error %d", result); /* send an open port command */ - open_command.port = port->number - port->serial->minor; + /* firmware uses 1 based port numbering */ + open_command.port = port->number - port->serial->minor + 1; whiteheat_send_cmd (port->serial, WHITEHEAT_OPEN, (__u8 *)&open_command, sizeof(open_command)); /* Need to do device specific setup here (control lines, baud rate, etc.) */ @@ -261,7 +319,8 @@ dbg(__FUNCTION__ " - port %d", port->number); /* send a close command to the port */ - close_command.port = port->number - port->serial->minor; + /* firmware uses 1 based port numbering */ + close_command.port = port->number - port->serial->minor + 1; whiteheat_send_cmd (port->serial, WHITEHEAT_CLOSE, (__u8 *)&close_command, sizeof(close_command)); /* Need to change the control lines here */ @@ -303,6 +362,10 @@ return; } + /* set the port number */ + /* firmware uses 1 based port numbering */ + port_settings.port = port->number + 1; + /* get the byte size */ switch (cflag & CSIZE) { case CS5: port_settings.bits = 5; break; @@ -337,10 +400,10 @@ else port_settings.hflow = 0; dbg(__FUNCTION__ " - hardware flow control = %s %s %s %s", - (port_settings.hflow | WHITEHEAT_CTS_FLOW) ? "CTS" : "", - (port_settings.hflow | WHITEHEAT_RTS_FLOW) ? "RTS" : "", - (port_settings.hflow | WHITEHEAT_DSR_FLOW) ? "DSR" : "", - (port_settings.hflow | WHITEHEAT_DTR_FLOW) ? "DTR" : ""); + (port_settings.hflow & WHITEHEAT_CTS_FLOW) ? "CTS" : "", + (port_settings.hflow & WHITEHEAT_RTS_FLOW) ? "RTS" : "", + (port_settings.hflow & WHITEHEAT_DSR_FLOW) ? "DSR" : "", + (port_settings.hflow & WHITEHEAT_DTR_FLOW) ? "DTR" : ""); /* determine software flow control */ if (I_IXOFF(port->tty)) @@ -485,7 +548,8 @@ struct whiteheat_rdb_set rdb_command; /* send a set rts command to the port */ - rdb_command.port = port->number - port->serial->minor; + /* firmware uses 1 based port numbering */ + rdb_command.port = port->number - port->serial->minor + 1; rdb_command.state = state; whiteheat_send_cmd (port->serial, command, (__u8 *)&rdb_command, sizeof(rdb_command)); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/whiteheat.h linux.20p6/drivers/usb/serial/whiteheat.h --- linux.vanilla/drivers/usb/serial/whiteheat.h Sun Mar 25 17:31:43 2001 +++ linux.20p6/drivers/usb/serial/whiteheat.h Fri May 4 23:25:38 2001 @@ -37,6 +37,7 @@ #define WHITEHEAT_ECHO 14 /* send data to the indicated IN endpoint */ #define WHITEHEAT_DO_TEST 15 /* perform the specified test */ #define WHITEHEAT_CMD_COMPLETE 16 /* reply for certain commands */ +#define WHITEHEAT_CMD_FAILURE 17 /* reply for failed commands */ /* Data for the WHITEHEAT_SETUP_PORT command */ #define WHITEHEAT_CTS_FLOW 0x08 @@ -64,7 +65,7 @@ * RTS (0x80) (RTS off/on when receiver fills/empties) * DTR (0x02) (DTR off/on when receiver fills/empties) */ __u8 lloop; /* local loopback 0 or 1, default 0 */ -}; +} __attribute__ ((packed)); /* data for WHITEHEAT_SET_RTS, WHITEHEAT_SET_DTR, and WHITEHEAT_SET_BREAK commands */ struct whiteheat_rdb_set { diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/serial/whiteheat_fw.h linux.20p6/drivers/usb/serial/whiteheat_fw.h --- linux.vanilla/drivers/usb/serial/whiteheat_fw.h Sun Mar 25 17:31:43 2001 +++ linux.20p6/drivers/usb/serial/whiteheat_fw.h Fri May 4 23:25:38 2001 @@ -47,159 +47,154 @@ }; static const struct whiteheat_hex_record whiteheat_firmware[] = { -{ 0x0000, 3, {0x02, 0x93, 0xa9} }, +{ 0x0000, 3, {0x02, 0x95, 0x09} }, { 0x0003, 3, {0x02, 0x13, 0x12} }, -{ 0x000b, 3, {0x02, 0x0a, 0x80} }, -{ 0x0033, 3, {0x02, 0x08, 0x15} }, +{ 0x000b, 3, {0x02, 0x0a, 0x91} }, +{ 0x0033, 3, {0x02, 0x08, 0x1b} }, { 0x0043, 3, {0x02, 0x0a, 0x00} }, -{ 0x005b, 3, {0x02, 0x82, 0x31} }, +{ 0x005b, 3, {0x02, 0x1a, 0xd2} }, { 0x0370, 16, {0x90, 0x7f, 0xe9, 0xe0, 0x70, 0x03, 0x02, 0x04, 0x73, 0x14, 0x70, 0x03, 0x02, 0x04, 0xe7, 0x24} }, -{ 0x0380, 16, {0xfe, 0x70, 0x03, 0x02, 0x05, 0x45, 0x24, 0xfb, 0x70, 0x03, 0x02, 0x04, 0x64, 0x14, 0x70, 0x03} }, +{ 0x0380, 16, {0xfe, 0x70, 0x03, 0x02, 0x05, 0x4f, 0x24, 0xfb, 0x70, 0x03, 0x02, 0x04, 0x64, 0x14, 0x70, 0x03} }, { 0x0390, 16, {0x02, 0x04, 0x52, 0x14, 0x70, 0x03, 0x02, 0x04, 0x3a, 0x14, 0x70, 0x03, 0x02, 0x04, 0x49, 0x24} }, -{ 0x03a0, 16, {0x05, 0x60, 0x03, 0x02, 0x05, 0x94, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60} }, +{ 0x03a0, 16, {0x05, 0x60, 0x03, 0x02, 0x05, 0x9e, 0x90, 0x7f, 0xeb, 0xe0, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60} }, { 0x03b0, 16, {0x36, 0x24, 0x02, 0x70, 0x7b, 0x74, 0x12, 0x90, 0x7f, 0xd4, 0xf0, 0x74, 0x00, 0x90, 0x7f, 0xd5} }, -{ 0x03c0, 16, {0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x09, 0x7b, 0xea, 0x49, 0x60, 0x0d} }, -{ 0x03d0, 16, {0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xb4} }, -{ 0x03e0, 16, {0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x09, 0x3a, 0xea} }, -{ 0x03f0, 16, {0x49, 0x60, 0x33, 0x12, 0x9b, 0x72, 0xf5, 0x4b, 0x90, 0x7f, 0xee, 0xe0, 0xff, 0xe5, 0x4b, 0xd3} }, +{ 0x03c0, 16, {0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x09, 0x81, 0xea, 0x49, 0x60, 0x0d} }, +{ 0x03d0, 16, {0xea, 0x90, 0x7f, 0xd4, 0xf0, 0xe9, 0x90, 0x7f, 0xd5, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xb4} }, +{ 0x03e0, 16, {0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xff, 0x12, 0x09, 0x40, 0xea} }, +{ 0x03f0, 16, {0x49, 0x60, 0x33, 0x12, 0x9f, 0x48, 0xf5, 0x4b, 0x90, 0x7f, 0xee, 0xe0, 0xff, 0xe5, 0x4b, 0xd3} }, { 0x0400, 16, {0x9f, 0x40, 0x03, 0xe0, 0xf5, 0x4b, 0xe5, 0x4b, 0xd3, 0x94, 0x40, 0x40, 0x03, 0x75, 0x4b, 0x40} }, -{ 0x0410, 16, {0xae, 0x02, 0xaf, 0x01, 0x7c, 0x7f, 0x7d, 0x00, 0xab, 0x4b, 0x12, 0x8d, 0xd9, 0x90, 0x7f, 0xb5} }, -{ 0x0420, 16, {0xe5, 0x4b, 0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x9b} }, -{ 0x0430, 16, {0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0x00, 0xe5, 0x21, 0xf0} }, -{ 0x0440, 16, {0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x21, 0x02} }, -{ 0x0450, 16, {0x05, 0x9b, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x31, 0xd2, 0x02, 0x43, 0x88, 0x10, 0xd2, 0xeb, 0xd2} }, -{ 0x0460, 16, {0xa8, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0x00, 0xe5, 0x31, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0} }, -{ 0x0470, 16, {0x02, 0x05, 0x9b, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02} }, +{ 0x0410, 16, {0xae, 0x02, 0xaf, 0x01, 0x7c, 0x7f, 0x7d, 0x00, 0xab, 0x4b, 0x12, 0x8e, 0x81, 0x90, 0x7f, 0xb5} }, +{ 0x0420, 16, {0xe5, 0x4b, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5} }, +{ 0x0430, 16, {0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0x00, 0xe5, 0x21, 0xf0} }, +{ 0x0440, 16, {0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x21, 0x02} }, +{ 0x0450, 16, {0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xf5, 0x31, 0xd2, 0x02, 0x43, 0x88, 0x10, 0xd2, 0xeb, 0xd2} }, +{ 0x0460, 16, {0xa8, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0x00, 0xe5, 0x31, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x01, 0xf0} }, +{ 0x0470, 16, {0x02, 0x05, 0xa5, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0x7f, 0x60, 0x24, 0x14, 0x60, 0x31, 0x24, 0x02} }, { 0x0480, 16, {0x70, 0x5b, 0xa2, 0x00, 0xe4, 0x33, 0xff, 0x25, 0xe0, 0xff, 0xa2, 0x05, 0xe4, 0x33, 0x4f, 0x90} }, -{ 0x0490, 16, {0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0x9b, 0xe4} }, -{ 0x04a0, 16, {0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0x9b, 0x90} }, +{ 0x0490, 16, {0x7f, 0x00, 0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa5, 0xe4} }, +{ 0x04a0, 16, {0x90, 0x7f, 0x00, 0xf0, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa5, 0x90} }, { 0x04b0, 16, {0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25} }, { 0x04c0, 16, {0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x54, 0x01, 0x90, 0x7f, 0x00} }, -{ 0x04d0, 16, {0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xb4} }, -{ 0x04e0, 16, {0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24} }, -{ 0x04f0, 16, {0x02, 0x60, 0x03, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x00, 0x02} }, -{ 0x0500, 16, {0x05, 0x9b, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0x9b, 0x90, 0x7f, 0xea, 0xe0} }, -{ 0x0510, 16, {0x70, 0x2a, 0x90, 0x7f, 0xec, 0xe0, 0xff, 0xf4, 0x54, 0x80, 0xfe, 0xc4, 0x54, 0x0f, 0xfe, 0xef} }, -{ 0x0520, 16, {0x54, 0x07, 0xfd, 0x2e, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4} }, -{ 0x0530, 16, {0xf0, 0x90, 0x7f, 0xd7, 0xed, 0xf0, 0xef, 0x44, 0x20, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0} }, -{ 0x0540, 16, {0x44, 0x01, 0xf0, 0x80, 0x56, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70} }, -{ 0x0550, 16, {0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x04, 0xd2, 0x00, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0} }, -{ 0x0560, 16, {0x44, 0x01, 0xf0, 0x80, 0x36, 0x90, 0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4} }, -{ 0x0570, 16, {0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f, 0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5} }, -{ 0x0580, 16, {0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44} }, -{ 0x0590, 16, {0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44} }, -{ 0x05a0, 2, {0x02, 0xf0} }, -{ 0x05a2, 1, {0x22} }, -{ 0x05a3, 16, {0x75, 0x47, 0xff, 0x75, 0x46, 0xff, 0x75, 0x45, 0x0f, 0x75, 0x44, 0x00, 0xd2, 0x03, 0xc2, 0x06} }, -{ 0x05b3, 16, {0xc2, 0x02, 0xc2, 0x00, 0xc2, 0x05, 0xc2, 0x01, 0x90, 0x03, 0x00, 0x74, 0x19, 0xf0, 0xe4, 0x90} }, -{ 0x05c3, 16, {0x01, 0xbc, 0xf0, 0xc2, 0x04, 0x90, 0x01, 0xc0, 0xf0, 0xa3, 0xf0, 0xc2, 0xaf, 0xc2, 0xa8, 0x12} }, -{ 0x05d3, 16, {0x0b, 0x8d, 0xe4, 0x90, 0x02, 0xaf, 0xf0, 0x90, 0x01, 0x00, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3} }, -{ 0x05e3, 16, {0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x08, 0xf0, 0x7e} }, -{ 0x05f3, 16, {0x01, 0x7f, 0x00, 0x12, 0x19, 0xc1, 0x75, 0x49, 0x12, 0x75, 0x4a, 0x0a, 0x90, 0x01, 0x0b, 0xe0} }, -{ 0x0603, 16, {0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83} }, -{ 0x0613, 16, {0xef, 0xf0, 0x90, 0x01, 0x0c, 0xe0, 0x44, 0x80, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70} }, -{ 0x0623, 16, {0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0d, 0xe0, 0xff, 0x05} }, -{ 0x0633, 16, {0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} }, -{ 0x0643, 16, {0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14} }, -{ 0x0653, 16, {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x12, 0x0a, 0xe4, 0x93, 0xff, 0x74, 0x01, 0x93, 0x90} }, -{ 0x0663, 16, {0x01, 0x1c, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0xff, 0xa3, 0xe0, 0xfe, 0xef} }, -{ 0x0673, 16, {0x6e, 0xff, 0x90, 0x01, 0x1c, 0xf0, 0xa3, 0xe0, 0x6f, 0xff, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0x6f} }, -{ 0x0683, 16, {0xf0, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xe4, 0xfc, 0xfd, 0x75, 0x4f, 0x10, 0x75, 0x50, 0x02, 0x75} }, -{ 0x0693, 16, {0x51, 0x12, 0x75, 0x52, 0xac, 0x12, 0x90, 0x15, 0x75, 0x49, 0x12, 0x75, 0x4a, 0xb2, 0x90, 0x01} }, -{ 0x06a3, 16, {0x0d, 0xe0, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14, 0xf5, 0x82} }, -{ 0x06b3, 16, {0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70} }, -{ 0x06c3, 16, {0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4} }, -{ 0x06d3, 16, {0x54, 0x0f, 0x24, 0x41, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14} }, -{ 0x06e3, 16, {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x05, 0x4a, 0xe5, 0x4a, 0xae, 0x49, 0x70, 0x02, 0x05, 0x49} }, -{ 0x06f3, 16, {0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x75, 0x82, 0x10, 0x75, 0x83, 0x01, 0xe0, 0xfc, 0xa3} }, -{ 0x0703, 16, {0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x90, 0x01, 0x18, 0x12, 0x9d, 0x25, 0x7e, 0x01} }, -{ 0x0713, 16, {0x7f, 0x18, 0x12, 0x85, 0x08, 0x90, 0x01, 0x18, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} }, -{ 0x0723, 16, {0xa3, 0xe0, 0xff, 0x75, 0x4f, 0x0a, 0x75, 0x50, 0x06, 0x75, 0x51, 0x12, 0x75, 0x52, 0xb8, 0x12} }, -{ 0x0733, 16, {0x90, 0x15, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x53, 0x91, 0xef} }, -{ 0x0743, 16, {0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x1f, 0xf0, 0xd2, 0xaf} }, -{ 0x0753, 16, {0x20, 0x01, 0x2e, 0x20, 0x01, 0x2b, 0xa2, 0x03, 0x92, 0x07, 0x12, 0x09, 0xca, 0x75, 0x43, 0x50} }, -{ 0x0763, 16, {0x75, 0x42, 0x6d, 0x75, 0x41, 0x33, 0x75, 0x40, 0x00, 0x20, 0x01, 0xe4, 0x7f, 0xff, 0x7e, 0xff} }, -{ 0x0773, 16, {0x7d, 0xff, 0x7c, 0xff, 0x78, 0x40, 0x12, 0x9d, 0x0e, 0xec, 0x4d, 0x4e, 0x4f, 0x60, 0xd1, 0x80} }, -{ 0x0783, 16, {0xe8, 0x30, 0x01, 0x05, 0x12, 0x03, 0x70, 0xc2, 0x01, 0x30, 0x06, 0x0d, 0x12, 0x0a, 0xed, 0x50} }, -{ 0x0793, 16, {0x06, 0x12, 0x0b, 0x00, 0x12, 0x0a, 0xf2, 0xc2, 0x06, 0x12, 0x92, 0x38, 0x90, 0x01, 0xbd, 0xe0} }, -{ 0x07a3, 16, {0x60, 0x10, 0x7e, 0x7b, 0x7f, 0x40, 0x12, 0x8e, 0xc1, 0xe4, 0x90, 0x01, 0xbd, 0xf0, 0x90, 0x7f} }, -{ 0x07b3, 16, {0xd3, 0xf0, 0x90, 0x02, 0xaf, 0xe0, 0xb4, 0x0f, 0x03, 0x12, 0x95, 0x30, 0x12, 0x99, 0xcc, 0xe4} }, -{ 0x07c3, 16, {0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x90, 0x01, 0xbc} }, -{ 0x07d3, 16, {0xe0, 0x5e, 0x60, 0x14, 0x74, 0x27, 0x2f, 0xf8, 0xe6, 0xd3, 0x94, 0x0a, 0x40, 0x04, 0x7e, 0x01} }, -{ 0x07e3, 16, {0x80, 0x02, 0x7e, 0x00, 0x8e, 0x48, 0x80, 0x03, 0x75, 0x48, 0x01, 0x74, 0x68, 0x2f, 0xf5, 0x82} }, -{ 0x07f3, 16, {0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe5, 0x48, 0xf0, 0x0f, 0xbf, 0x04, 0xc5, 0xe5, 0x2b, 0xd3, 0x94} }, -{ 0x0803, 16, {0x0a, 0x40, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x90, 0x20, 0x6c, 0xef, 0xf0, 0x02, 0x07} }, -{ 0x0813, 1, {0x84} }, -{ 0x0814, 1, {0x22} }, -{ 0x0815, 4, {0x53, 0xd8, 0xef, 0x32} }, -{ 0x0819, 16, {0xe4, 0x90, 0x7f, 0x9c, 0xf0, 0x7f, 0x0a, 0xfe, 0x12, 0x09, 0x23, 0x90, 0x7f, 0x96, 0x74, 0x89} }, -{ 0x0829, 16, {0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xcf, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x09, 0x23, 0x90, 0x7f} }, -{ 0x0839, 16, {0x96, 0xe0, 0x54, 0xfe, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x7f, 0x02, 0x7d, 0xff} }, -{ 0x0849, 16, {0x12, 0x81, 0xe0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x02} }, -{ 0x0859, 16, {0xf0, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x90, 0x7f, 0x96, 0xe0} }, -{ 0x0869, 16, {0x44, 0x40, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf} }, -{ 0x0879, 16, {0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f} }, -{ 0x0889, 7, {0x32, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x22} }, -{ 0x0890, 16, {0x90, 0x7f, 0x96, 0xe0, 0x54, 0xfd, 0xf0, 0xe0, 0x44, 0x80, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12} }, -{ 0x08a0, 16, {0x09, 0x23, 0x7f, 0x02, 0xe4, 0xfd, 0x12, 0x81, 0xe0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23} }, -{ 0x08b0, 16, {0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x90, 0x7f} }, -{ 0x08c0, 16, {0x96, 0xe0, 0x44, 0x04, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x90, 0x7f, 0x96, 0xe0} }, -{ 0x08d0, 16, {0x54, 0xf7, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x01} }, -{ 0x08e0, 12, {0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x12, 0x0b, 0x00, 0x22} }, -{ 0x08ec, 16, {0x90, 0x11, 0xfc, 0xe4, 0x93, 0x70, 0x2f, 0x90, 0x7f, 0x93, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x94} }, -{ 0x08fc, 16, {0x74, 0x3c, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc6, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90, 0x7f} }, -{ 0x090c, 16, {0x9d, 0x74, 0x02, 0xf0, 0x90, 0x7f, 0xe2, 0x74, 0x12, 0xf0, 0x12, 0x08, 0x19, 0x75, 0x82, 0xfc} }, -{ 0x091c, 7, {0x75, 0x83, 0x11, 0x74, 0xff, 0xf0, 0x22} }, -{ 0x0923, 16, {0x8e, 0x58, 0x8f, 0x59, 0xe5, 0x59, 0x15, 0x59, 0xae, 0x58, 0x70, 0x02, 0x15, 0x58, 0x4e, 0x60} }, -{ 0x0933, 7, {0x05, 0x12, 0x09, 0xef, 0x80, 0xee, 0x22} }, -{ 0x093a, 2, {0x8f, 0x4c} }, -{ 0x093c, 16, {0xe4, 0xf5, 0x4d, 0x75, 0x4e, 0xff, 0x75, 0x4f, 0x12, 0x75, 0x50, 0x6a, 0xab, 0x4e, 0xaa, 0x4f} }, -{ 0x094c, 16, {0xa9, 0x50, 0x90, 0x00, 0x01, 0x12, 0x9b, 0x8b, 0xb4, 0x03, 0x1d, 0xaf, 0x4d, 0x05, 0x4d, 0xef} }, -{ 0x095c, 16, {0xb5, 0x4c, 0x01, 0x22, 0x12, 0x9b, 0x72, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75} }, -{ 0x096c, 14, {0x4e, 0xff, 0xf5, 0x4f, 0x89, 0x50, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} }, -{ 0x097a, 1, {0x22} }, -{ 0x097b, 16, {0xe4, 0xfe, 0x75, 0x4e, 0xff, 0x75, 0x4f, 0x12, 0x75, 0x50, 0x12, 0xab, 0x4e, 0xaa, 0x4f, 0xa9} }, -{ 0x098b, 16, {0x50, 0x90, 0x00, 0x01, 0x12, 0x9b, 0x8b, 0x64, 0x02, 0x70, 0x2d, 0xad, 0x06, 0x0e, 0xed, 0xb5} }, -{ 0x099b, 16, {0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x9b, 0xe4, 0x85, 0xf0, 0x4c, 0xf5, 0x4d, 0x62, 0x4c} }, -{ 0x09ab, 16, {0xe5, 0x4c, 0x62, 0x4d, 0xe5, 0x4d, 0x62, 0x4c, 0x29, 0xfd, 0xe5, 0x4c, 0x3a, 0xa9, 0x05, 0x75} }, -{ 0x09bb, 14, {0x4e, 0xff, 0xf5, 0x4f, 0x89, 0x50, 0x80, 0xc3, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} }, -{ 0x09c9, 1, {0x22} }, -{ 0x09ca, 16, {0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x07, 0x04, 0xe0, 0x44} }, -{ 0x09da, 16, {0x02, 0xf0, 0x7f, 0xd0, 0x7e, 0x07, 0x12, 0x09, 0x23, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0} }, -{ 0x09ea, 5, {0xe0, 0x44, 0x04, 0xf0, 0x22} }, -{ 0x09ef, 16, {0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9} }, -{ 0x09ff, 1, {0x22} }, +{ 0x04d0, 16, {0xf0, 0xe4, 0xa3, 0xf0, 0x90, 0x7f, 0xb5, 0x74, 0x02, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xb4} }, +{ 0x04e0, 16, {0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x1d, 0x24} }, +{ 0x04f0, 16, {0x02, 0x60, 0x03, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0, 0xb4, 0x01, 0x05, 0xc2, 0x00, 0x02} }, +{ 0x0500, 16, {0x05, 0xa5, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x02, 0x05, 0xa5, 0x90, 0x7f, 0xea, 0xe0} }, +{ 0x0510, 16, {0x70, 0x34, 0x90, 0x7f, 0xec, 0xe0, 0xff, 0x54, 0x07, 0xfe, 0xf5, 0x4b, 0xef, 0x30, 0xe7, 0x03} }, +{ 0x0520, 16, {0x43, 0x4b, 0x10, 0x90, 0x7f, 0xd7, 0xe5, 0x4b, 0xf0, 0xe5, 0x4b, 0x44, 0x20, 0xf0, 0xef, 0xf4} }, +{ 0x0530, 16, {0x54, 0x80, 0xfd, 0xc4, 0x54, 0x0f, 0x2e, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f} }, +{ 0x0540, 16, {0xf5, 0x83, 0xe4, 0xf0, 0x80, 0x5f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x56, 0x90} }, +{ 0x0550, 16, {0x7f, 0xe8, 0xe0, 0x24, 0xfe, 0x60, 0x18, 0x24, 0x02, 0x70, 0x4a, 0x90, 0x7f, 0xea, 0xe0, 0xb4} }, +{ 0x0560, 16, {0x01, 0x04, 0xd2, 0x00, 0x80, 0x3f, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x36, 0x90} }, +{ 0x0570, 16, {0x7f, 0xea, 0xe0, 0x70, 0x20, 0x90, 0x7f, 0xec, 0xe0, 0xf4, 0x54, 0x80, 0xff, 0xc4, 0x54, 0x0f} }, +{ 0x0580, 16, {0xff, 0xe0, 0x54, 0x07, 0x2f, 0x25, 0xe0, 0x24, 0xb4, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83} }, +{ 0x0590, 16, {0x74, 0x01, 0xf0, 0x80, 0x10, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x07, 0x90, 0x7f} }, +{ 0x05a0, 12, {0xb4, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xb4, 0xe0, 0x44, 0x02, 0xf0} }, +{ 0x05ac, 1, {0x22} }, +{ 0x05ad, 16, {0x75, 0x47, 0xff, 0x75, 0x46, 0xff, 0x75, 0x45, 0x0f, 0x75, 0x44, 0x00, 0xd2, 0x03, 0xc2, 0x06} }, +{ 0x05bd, 16, {0xc2, 0x02, 0xc2, 0x00, 0xc2, 0x05, 0xc2, 0x01, 0x90, 0x03, 0x00, 0x74, 0x19, 0xf0, 0xe4, 0x90} }, +{ 0x05cd, 16, {0x01, 0xbc, 0xf0, 0xc2, 0x04, 0x90, 0x01, 0xc0, 0xf0, 0xa3, 0xf0, 0xc2, 0xaf, 0xc2, 0xa8, 0x12} }, +{ 0x05dd, 16, {0x0b, 0x8d, 0xe4, 0x90, 0x02, 0xaf, 0xf0, 0x90, 0x01, 0x00, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3} }, +{ 0x05ed, 16, {0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x08, 0xf0, 0x7e} }, +{ 0x05fd, 16, {0x01, 0x7f, 0x00, 0x12, 0x10, 0x2c, 0x75, 0x49, 0x12, 0x75, 0x4a, 0x0a, 0x90, 0x01, 0x0b, 0xe0} }, +{ 0x060d, 16, {0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83} }, +{ 0x061d, 16, {0xef, 0xf0, 0x90, 0x01, 0x0c, 0xe0, 0x44, 0x80, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70} }, +{ 0x062d, 16, {0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0d, 0xe0, 0xff, 0x05} }, +{ 0x063d, 16, {0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} }, +{ 0x064d, 16, {0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14} }, +{ 0x065d, 16, {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x12, 0x0a, 0xe4, 0x93, 0xff, 0x74, 0x01, 0x93, 0x90} }, +{ 0x066d, 16, {0x01, 0x1c, 0xcf, 0xf0, 0xa3, 0xef, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0xff, 0xa3, 0xe0, 0xfe, 0xef} }, +{ 0x067d, 16, {0x6e, 0xff, 0x90, 0x01, 0x1c, 0xf0, 0xa3, 0xe0, 0x6f, 0xff, 0xf0, 0x90, 0x01, 0x1c, 0xe0, 0x6f} }, +{ 0x068d, 16, {0xf0, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xe4, 0xfc, 0xfd, 0x75, 0x4f, 0x10, 0x75, 0x50, 0x02, 0x75} }, +{ 0x069d, 16, {0x51, 0x12, 0x75, 0x52, 0xac, 0x12, 0x91, 0x7a, 0x75, 0x49, 0x12, 0x75, 0x4a, 0xb2, 0x90, 0x01} }, +{ 0x06ad, 16, {0x0d, 0xe0, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14, 0xf5, 0x82} }, +{ 0x06bd, 16, {0x8c, 0x83, 0xef, 0xf0, 0x90, 0x01, 0x0e, 0xe0, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70} }, +{ 0x06cd, 16, {0x02, 0x05, 0x49, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0x92, 0xe0, 0xff, 0xc4} }, +{ 0x06dd, 16, {0x54, 0x0f, 0x24, 0x41, 0xff, 0x05, 0x4a, 0xe5, 0x4a, 0xac, 0x49, 0x70, 0x02, 0x05, 0x49, 0x14} }, +{ 0x06ed, 16, {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x05, 0x4a, 0xe5, 0x4a, 0xae, 0x49, 0x70, 0x02, 0x05, 0x49} }, +{ 0x06fd, 16, {0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x75, 0x82, 0x10, 0x75, 0x83, 0x01, 0xe0, 0xfc, 0xa3} }, +{ 0x070d, 16, {0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x90, 0x01, 0x18, 0x12, 0xa0, 0xfb, 0x7e, 0x01} }, +{ 0x071d, 16, {0x7f, 0x18, 0x12, 0x85, 0x2f, 0x90, 0x01, 0x18, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} }, +{ 0x072d, 16, {0xa3, 0xe0, 0xff, 0x75, 0x4f, 0x0a, 0x75, 0x50, 0x06, 0x75, 0x51, 0x12, 0x75, 0x52, 0xb8, 0x12} }, +{ 0x073d, 16, {0x91, 0x7a, 0xd2, 0xe8, 0x43, 0xd8, 0x20, 0x90, 0x7f, 0xab, 0x74, 0xff, 0xf0, 0x53, 0x91, 0xef} }, +{ 0x074d, 16, {0x90, 0x7f, 0xaf, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x7f, 0xae, 0xe0, 0x44, 0x1f, 0xf0, 0xd2, 0xaf} }, +{ 0x075d, 16, {0x20, 0x01, 0x2e, 0x20, 0x01, 0x2b, 0xa2, 0x03, 0x92, 0x07, 0x12, 0x09, 0xd0, 0x75, 0x43, 0x50} }, +{ 0x076d, 16, {0x75, 0x42, 0x6d, 0x75, 0x41, 0x33, 0x75, 0x40, 0x00, 0x20, 0x01, 0xe4, 0x7f, 0xff, 0x7e, 0xff} }, +{ 0x077d, 16, {0x7d, 0xff, 0x7c, 0xff, 0x78, 0x40, 0x12, 0xa0, 0xe4, 0xec, 0x4d, 0x4e, 0x4f, 0x60, 0xd1, 0x80} }, +{ 0x078d, 16, {0xe8, 0x30, 0x01, 0x05, 0x12, 0x03, 0x70, 0xc2, 0x01, 0x30, 0x06, 0x0d, 0x12, 0x09, 0xf5, 0x50} }, +{ 0x079d, 16, {0x06, 0x12, 0x0b, 0x00, 0x12, 0x09, 0xfa, 0xc2, 0x06, 0x12, 0x93, 0x98, 0x90, 0x01, 0xbd, 0xe0} }, +{ 0x07ad, 16, {0x60, 0x0c, 0x12, 0x8f, 0x55, 0xe4, 0x90, 0x01, 0xbd, 0xf0, 0x90, 0x7f, 0xd3, 0xf0, 0x90, 0x02} }, +{ 0x07bd, 16, {0xaf, 0xe0, 0xb4, 0x0f, 0x03, 0x12, 0x96, 0xe2, 0x12, 0x9d, 0xa2, 0xe4, 0xff, 0x74, 0x01, 0xa8} }, +{ 0x07cd, 16, {0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x90, 0x01, 0xbc, 0xe0, 0x5e, 0x60, 0x14} }, +{ 0x07dd, 16, {0x74, 0x27, 0x2f, 0xf8, 0xe6, 0xd3, 0x94, 0x0a, 0x40, 0x04, 0x7e, 0x01, 0x80, 0x02, 0x7e, 0x00} }, +{ 0x07ed, 16, {0x8e, 0x48, 0x80, 0x03, 0x75, 0x48, 0x01, 0x74, 0x68, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5} }, +{ 0x07fd, 16, {0x83, 0xe5, 0x48, 0xf0, 0x0f, 0xbf, 0x04, 0xc5, 0xe5, 0x2b, 0xd3, 0x94, 0x0a, 0x40, 0x04, 0x7f} }, +{ 0x080d, 13, {0x01, 0x80, 0x02, 0x7f, 0x00, 0x90, 0x20, 0x6c, 0xef, 0xf0, 0x02, 0x07, 0x8e} }, +{ 0x081a, 1, {0x22} }, +{ 0x081b, 4, {0x53, 0xd8, 0xef, 0x32} }, +{ 0x081f, 16, {0xe4, 0x90, 0x7f, 0x9c, 0xf0, 0x7f, 0x0a, 0xfe, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0x74, 0x89} }, +{ 0x082f, 16, {0xf0, 0x90, 0x7f, 0x9c, 0x74, 0xcf, 0xf0, 0x7f, 0xf4, 0x7e, 0x01, 0x12, 0x09, 0x29, 0x90, 0x7f} }, +{ 0x083f, 16, {0x96, 0xe0, 0x54, 0xfe, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x7f, 0x02, 0x7d, 0xff} }, +{ 0x084f, 16, {0x12, 0x11, 0x77, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x02} }, +{ 0x085f, 16, {0xf0, 0xe0, 0x54, 0x7f, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0} }, +{ 0x086f, 16, {0x44, 0x40, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf} }, +{ 0x087f, 16, {0xf0, 0x7f, 0x32, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x40, 0xf0, 0x7f} }, +{ 0x088f, 7, {0x32, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x22} }, +{ 0x0896, 16, {0x90, 0x7f, 0x96, 0xe0, 0x54, 0xfd, 0xf0, 0xe0, 0x44, 0x80, 0xf0, 0x7f, 0x0a, 0x7e, 0x00, 0x12} }, +{ 0x08a6, 16, {0x09, 0x29, 0x7f, 0x02, 0xe4, 0xfd, 0x12, 0x11, 0x77, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29} }, +{ 0x08b6, 16, {0x90, 0x7f, 0x96, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f} }, +{ 0x08c6, 16, {0x96, 0xe0, 0x44, 0x04, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0} }, +{ 0x08d6, 16, {0x54, 0xf7, 0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0x96, 0xe0, 0x44, 0x01} }, +{ 0x08e6, 12, {0xf0, 0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x12, 0x0b, 0x00, 0x22} }, +{ 0x08f2, 16, {0x90, 0x95, 0xbe, 0xe4, 0x93, 0x70, 0x2f, 0x90, 0x7f, 0x93, 0x74, 0x30, 0xf0, 0x90, 0x7f, 0x94} }, +{ 0x0902, 16, {0x74, 0x3c, 0xf0, 0x90, 0x7f, 0x95, 0x74, 0xc6, 0xf0, 0xe4, 0x90, 0x7f, 0x97, 0xf0, 0x90, 0x7f} }, +{ 0x0912, 16, {0x9d, 0x74, 0x02, 0xf0, 0x90, 0x7f, 0xe2, 0x74, 0x12, 0xf0, 0x12, 0x08, 0x1f, 0x75, 0x82, 0xbe} }, +{ 0x0922, 7, {0x75, 0x83, 0x95, 0x74, 0xff, 0xf0, 0x22} }, +{ 0x0929, 16, {0x8e, 0x58, 0x8f, 0x59, 0xe5, 0x59, 0x15, 0x59, 0xae, 0x58, 0x70, 0x02, 0x15, 0x58, 0x4e, 0x60} }, +{ 0x0939, 7, {0x05, 0x12, 0x0a, 0x58, 0x80, 0xee, 0x22} }, +{ 0x0940, 2, {0x8f, 0x4c} }, +{ 0x0942, 16, {0xe4, 0xf5, 0x4d, 0x75, 0x4e, 0xff, 0x75, 0x4f, 0x12, 0x75, 0x50, 0x6a, 0xab, 0x4e, 0xaa, 0x4f} }, +{ 0x0952, 16, {0xa9, 0x50, 0x90, 0x00, 0x01, 0x12, 0x9f, 0x61, 0xb4, 0x03, 0x1d, 0xaf, 0x4d, 0x05, 0x4d, 0xef} }, +{ 0x0962, 16, {0xb5, 0x4c, 0x01, 0x22, 0x12, 0x9f, 0x48, 0x7e, 0x00, 0x29, 0xff, 0xee, 0x3a, 0xa9, 0x07, 0x75} }, +{ 0x0972, 14, {0x4e, 0xff, 0xf5, 0x4f, 0x89, 0x50, 0x80, 0xd4, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} }, +{ 0x0980, 1, {0x22} }, +{ 0x0981, 16, {0xe4, 0xfe, 0x75, 0x4e, 0xff, 0x75, 0x4f, 0x12, 0x75, 0x50, 0x12, 0xab, 0x4e, 0xaa, 0x4f, 0xa9} }, +{ 0x0991, 16, {0x50, 0x90, 0x00, 0x01, 0x12, 0x9f, 0x61, 0x64, 0x02, 0x70, 0x2d, 0xad, 0x06, 0x0e, 0xed, 0xb5} }, +{ 0x09a1, 16, {0x07, 0x01, 0x22, 0x90, 0x00, 0x02, 0x12, 0x9f, 0xba, 0x85, 0xf0, 0x4c, 0xf5, 0x4d, 0x62, 0x4c} }, +{ 0x09b1, 16, {0xe5, 0x4c, 0x62, 0x4d, 0xe5, 0x4d, 0x62, 0x4c, 0x29, 0xfd, 0xe5, 0x4c, 0x3a, 0xa9, 0x05, 0x75} }, +{ 0x09c1, 14, {0x4e, 0xff, 0xf5, 0x4f, 0x89, 0x50, 0x80, 0xc3, 0x7b, 0x00, 0x7a, 0x00, 0x79, 0x00} }, +{ 0x09cf, 1, {0x22} }, +{ 0x09d0, 16, {0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xfb, 0xf0, 0xe0, 0x44, 0x08, 0xf0, 0x30, 0x07, 0x04, 0xe0, 0x44} }, +{ 0x09e0, 16, {0x02, 0xf0, 0x7f, 0xd0, 0x7e, 0x07, 0x12, 0x09, 0x29, 0x90, 0x7f, 0xd6, 0xe0, 0x54, 0xf7, 0xf0} }, +{ 0x09f0, 5, {0xe0, 0x44, 0x04, 0xf0, 0x22} }, +{ 0x09f5, 5, {0x12, 0x08, 0x96, 0xd3, 0x22} }, +{ 0x09fa, 5, {0x12, 0x08, 0x1f, 0xd3, 0x22} }, +{ 0x09ff, 1, {0x32} }, { 0x0a00, 16, {0x02, 0x0b, 0xaa, 0x00, 0x02, 0x0b, 0xdd, 0x00, 0x02, 0x0b, 0xc2, 0x00, 0x02, 0x0c, 0x1c, 0x00} }, -{ 0x0a10, 16, {0x02, 0x0c, 0x06, 0x00, 0x02, 0x0a, 0xf7, 0x00, 0x02, 0x0a, 0xf8, 0x00, 0x02, 0x0a, 0xf9, 0x00} }, -{ 0x0a20, 16, {0x02, 0x0c, 0x37, 0x00, 0x02, 0x0d, 0x27, 0x00, 0x02, 0x0c, 0x73, 0x00, 0x02, 0x0d, 0x7b, 0x00} }, -{ 0x0a30, 16, {0x02, 0x0c, 0xaf, 0x00, 0x02, 0x0d, 0xcf, 0x00, 0x02, 0x0c, 0xeb, 0x00, 0x02, 0x0e, 0x23, 0x00} }, -{ 0x0a40, 16, {0x02, 0x0a, 0xfa, 0x00, 0x02, 0x0a, 0xfc, 0x00, 0x02, 0x0a, 0xfb, 0x00, 0x02, 0x0a, 0xfd, 0x00} }, -{ 0x0a50, 8, {0x02, 0x0e, 0x77, 0x00, 0x02, 0x0e, 0x8d, 0x00} }, -{ 0x0a58, 16, {0x53, 0x8e, 0xf7, 0xe5, 0x89, 0x54, 0xf1, 0x44, 0x01, 0xf5, 0x89, 0x75, 0x8c, 0xb1, 0xd2, 0xa9} }, -{ 0x0a68, 16, {0x75, 0x98, 0x40, 0x75, 0xcb, 0xff, 0x75, 0xca, 0xf3, 0x75, 0xc8, 0x34, 0xe4, 0xff, 0x7f, 0x05} }, -{ 0x0a78, 7, {0x78, 0x27, 0xe4, 0xf6, 0x08, 0xdf, 0xfc} }, -{ 0x0a7f, 1, {0x22} }, -{ 0x0a80, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x00, 0xc0, 0x00, 0xc0, 0x06, 0xc0} }, -{ 0x0a90, 1, {0x07} }, -{ 0x0a91, 16, {0x30, 0x04, 0x16, 0x75, 0x8c, 0xf8, 0x75, 0x8a, 0x30, 0x7f, 0x2f, 0xae, 0x07, 0x1f, 0xee, 0x60} }, -{ 0x0aa1, 16, {0x3c, 0x90, 0x20, 0x00, 0x74, 0x55, 0xf0, 0x80, 0xf2, 0x75, 0x8c, 0xb1, 0x7f, 0x27, 0xef, 0xd3} }, -{ 0x0ab1, 16, {0x94, 0x2b, 0x50, 0x09, 0xa8, 0x07, 0xe6, 0x60, 0x01, 0x16, 0x0f, 0x80, 0xf1, 0x90, 0x03, 0x00} }, -{ 0x0ac1, 16, {0xe0, 0x60, 0x02, 0x14, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x0e, 0x90} }, -{ 0x0ad1, 13, {0x01, 0xc1, 0xe0, 0x24, 0xff, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x34, 0xff, 0xf0} }, -{ 0x0ade, 15, {0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x00, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} }, -{ 0x0aed, 5, {0x12, 0x08, 0x90, 0xd3, 0x22} }, -{ 0x0af2, 5, {0x12, 0x08, 0x19, 0xd3, 0x22} }, -{ 0x0af7, 1, {0x32} }, -{ 0x0af8, 1, {0x32} }, -{ 0x0af9, 1, {0x32} }, -{ 0x0afa, 1, {0x32} }, -{ 0x0afb, 1, {0x32} }, -{ 0x0afc, 1, {0x32} }, -{ 0x0afd, 1, {0x32} }, +{ 0x0a10, 16, {0x02, 0x0c, 0x06, 0x00, 0x02, 0x09, 0xff, 0x00, 0x02, 0x0a, 0xfe, 0x00, 0x02, 0x0a, 0xff, 0x00} }, +{ 0x0a20, 16, {0x02, 0x0c, 0x37, 0x00, 0x02, 0x0d, 0x29, 0x00, 0x02, 0x0c, 0x73, 0x00, 0x02, 0x0d, 0x7d, 0x00} }, +{ 0x0a30, 16, {0x02, 0x0c, 0xaf, 0x00, 0x02, 0x0d, 0xd1, 0x00, 0x02, 0x0c, 0xeb, 0x00, 0x02, 0x0e, 0x25, 0x00} }, +{ 0x0a40, 16, {0x02, 0x0d, 0x27, 0x00, 0x02, 0x0e, 0x79, 0x00, 0x02, 0x0d, 0x28, 0x00, 0x02, 0x0e, 0x7a, 0x00} }, +{ 0x0a50, 8, {0x02, 0x0e, 0x7b, 0x00, 0x02, 0x0e, 0x91, 0x00} }, +{ 0x0a58, 16, {0x74, 0x00, 0xf5, 0x86, 0x90, 0xfd, 0xa5, 0x7c, 0x05, 0xa3, 0xe5, 0x82, 0x45, 0x83, 0x70, 0xf9} }, +{ 0x0a68, 1, {0x22} }, +{ 0x0a69, 16, {0x53, 0x8e, 0xf7, 0xe5, 0x89, 0x54, 0xf1, 0x44, 0x01, 0xf5, 0x89, 0x75, 0x8c, 0xb1, 0xd2, 0xa9} }, +{ 0x0a79, 16, {0x75, 0x98, 0x40, 0x75, 0xcb, 0xff, 0x75, 0xca, 0xf3, 0x75, 0xc8, 0x34, 0xe4, 0xff, 0x7f, 0x05} }, +{ 0x0a89, 7, {0x78, 0x27, 0xe4, 0xf6, 0x08, 0xdf, 0xfc} }, +{ 0x0a90, 1, {0x22} }, +{ 0x0a91, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x00, 0xc0, 0x00, 0xc0, 0x06, 0xc0} }, +{ 0x0aa1, 1, {0x07} }, +{ 0x0aa2, 16, {0x30, 0x04, 0x16, 0x75, 0x8c, 0xf8, 0x75, 0x8a, 0x30, 0x7f, 0x2f, 0xae, 0x07, 0x1f, 0xee, 0x60} }, +{ 0x0ab2, 16, {0x3c, 0x90, 0x20, 0x00, 0x74, 0x55, 0xf0, 0x80, 0xf2, 0x75, 0x8c, 0xb1, 0x7f, 0x27, 0xef, 0xd3} }, +{ 0x0ac2, 16, {0x94, 0x2b, 0x50, 0x09, 0xa8, 0x07, 0xe6, 0x60, 0x01, 0x16, 0x0f, 0x80, 0xf1, 0x90, 0x03, 0x00} }, +{ 0x0ad2, 16, {0xe0, 0x60, 0x02, 0x14, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x60, 0x0e, 0x90} }, +{ 0x0ae2, 13, {0x01, 0xc1, 0xe0, 0x24, 0xff, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x34, 0xff, 0xf0} }, +{ 0x0aef, 15, {0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x00, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} }, +{ 0x0afe, 1, {0x32} }, +{ 0x0aff, 1, {0x32} }, { 0x0b00, 9, {0x90, 0x7f, 0xd6, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x74} }, { 0x0b7d, 16, {0x43, 0x87, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x22} }, -{ 0x0b8d, 16, {0xd2, 0x00, 0x75, 0x8e, 0x10, 0xe4, 0x90, 0x7f, 0x92, 0xf0, 0x12, 0x10, 0x0c, 0x12, 0x08, 0xec} }, -{ 0x0b9d, 13, {0x12, 0x0e, 0xa9, 0x12, 0x90, 0xe6, 0x12, 0x1b, 0x0c, 0x12, 0x0a, 0x58, 0x22} }, +{ 0x0b8d, 16, {0xd2, 0x00, 0x75, 0x8e, 0x10, 0xe4, 0x90, 0x7f, 0x92, 0xf0, 0x12, 0x80, 0x00, 0x12, 0x08, 0xf2} }, +{ 0x0b9d, 13, {0x12, 0x0e, 0xad, 0x12, 0x11, 0xe5, 0x12, 0x11, 0xc8, 0x12, 0x0a, 0x69, 0x22} }, { 0x0baa, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xd2, 0x01, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xab, 0x74, 0x01} }, { 0x0bba, 8, {0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} }, { 0x0bc2, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x90, 0x7f, 0xc4, 0xe4, 0xf0, 0x53, 0x91, 0xef, 0x90, 0x7f} }, @@ -227,91 +222,97 @@ { 0x0cfb, 16, {0xa9, 0x74, 0x10, 0xf0, 0xe5, 0x30, 0x30, 0xe3, 0x13, 0xe5, 0x3b, 0x30, 0xe3, 0x07, 0x90, 0x20} }, { 0x0d0b, 16, {0x1c, 0xe0, 0x44, 0x01, 0xf0, 0x90, 0x20, 0x19, 0xe0, 0x44, 0x01, 0xf0, 0xe5, 0x2b, 0x70, 0x03} }, { 0x0d1b, 12, {0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} }, -{ 0x0d27, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} }, -{ 0x0d37, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x02, 0xf0, 0xe5, 0x30, 0x20} }, -{ 0x0d47, 16, {0xe0, 0x06, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe0, 0x0a, 0x90, 0x7f, 0xc7} }, -{ 0x0d57, 16, {0xe0, 0x90, 0x02, 0xf8, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x01, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} }, -{ 0x0d67, 16, {0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} }, -{ 0x0d77, 4, {0x83, 0xd0, 0xe0, 0x32} }, -{ 0x0d7b, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} }, -{ 0x0d8b, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x04, 0xf0, 0xe5, 0x30, 0x20} }, -{ 0x0d9b, 16, {0xe1, 0x06, 0x90, 0x7f, 0xc9, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe1, 0x0a, 0x90, 0x7f, 0xc9} }, -{ 0x0dab, 16, {0xe0, 0x90, 0x02, 0xf9, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x09, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} }, -{ 0x0dbb, 16, {0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} }, -{ 0x0dcb, 4, {0x83, 0xd0, 0xe0, 0x32} }, -{ 0x0dcf, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} }, -{ 0x0ddf, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x08, 0xf0, 0xe5, 0x30, 0x20} }, -{ 0x0def, 16, {0xe2, 0x06, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe2, 0x0a, 0x90, 0x7f, 0xcb} }, -{ 0x0dff, 16, {0xe0, 0x90, 0x02, 0xfa, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x11, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} }, -{ 0x0e0f, 16, {0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} }, -{ 0x0e1f, 4, {0x83, 0xd0, 0xe0, 0x32} }, -{ 0x0e23, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} }, -{ 0x0e33, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x10, 0xf0, 0xe5, 0x30, 0x20} }, -{ 0x0e43, 16, {0xe3, 0x06, 0x90, 0x7f, 0xcd, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe3, 0x0a, 0x90, 0x7f, 0xcd} }, -{ 0x0e53, 16, {0xe0, 0x90, 0x02, 0xfb, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x19, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} }, -{ 0x0e63, 16, {0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} }, -{ 0x0e73, 4, {0x83, 0xd0, 0xe0, 0x32} }, -{ 0x0e77, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x80, 0xf0, 0xd0} }, -{ 0x0e87, 6, {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} }, -{ 0x0e8d, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x80, 0xf0, 0x90} }, -{ 0x0e9d, 12, {0x01, 0xbd, 0x74, 0xff, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} }, -{ 0x0ea9, 16, {0x90, 0x01, 0x20, 0x12, 0x9d, 0x31, 0x00, 0x00, 0x25, 0x80, 0x90, 0x01, 0x24, 0x74, 0x08, 0xf0} }, -{ 0x0eb9, 16, {0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x6e, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x13, 0xf0, 0xa3, 0x74} }, -{ 0x0ec9, 16, {0x11, 0xf0, 0xe4, 0xa3, 0xf0, 0xa3, 0xf0, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff} }, -{ 0x0ed9, 16, {0xc3, 0x94, 0x04, 0x50, 0x13, 0xef, 0x04, 0xa3, 0xf0, 0x7e, 0x01, 0x7f, 0x1f, 0x12, 0x85, 0xe1} }, -{ 0x0ee9, 16, {0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xe3, 0xe4, 0xf5, 0x26, 0x90, 0x01, 0x1e, 0xf0, 0x90} }, -{ 0x0ef9, 16, {0x01, 0x1e, 0xe0, 0xff, 0xc3, 0x94, 0x04, 0x50, 0x1a, 0x74, 0xf8, 0x2f, 0xf5, 0x82, 0xe4, 0x34} }, -{ 0x0f09, 16, {0x02, 0xf5, 0x83, 0xe4, 0xf0, 0x74, 0x22, 0x2f, 0xf8, 0xe4, 0xf6, 0x90, 0x01, 0x1e, 0xe0, 0x04} }, -{ 0x0f19, 16, {0xf0, 0x80, 0xdc, 0xe4, 0xf5, 0x30, 0xe5, 0xc0, 0x60, 0x2f, 0x90, 0x01, 0x1e, 0x74, 0x01, 0xf0} }, -{ 0x0f29, 16, {0x90, 0x01, 0x1e, 0xe0, 0xff, 0xd3, 0x94, 0x04, 0x50, 0x1f, 0xef, 0x14, 0xff, 0x74, 0x01, 0xa8} }, -{ 0x0f39, 16, {0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x30, 0x7e, 0x01, 0x7f, 0x1e, 0x12, 0x83} }, -{ 0x0f49, 16, {0x5f, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xd7, 0xe4, 0xf5, 0x3a, 0x90, 0x01, 0x1e, 0xf0} }, -{ 0x0f59, 16, {0x90, 0x01, 0x1e, 0xe0, 0xff, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x34, 0x20} }, -{ 0x0f69, 16, {0xf5, 0x83, 0xe0, 0x54, 0xf0, 0xfe, 0x74, 0xc5, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83} }, -{ 0x0f79, 16, {0xee, 0xf0, 0x74, 0x36, 0x2f, 0xf8, 0xa6, 0x06, 0x74, 0x32, 0x2f, 0xf8, 0xe4, 0xf6, 0x74, 0x2c} }, -{ 0x0f89, 16, {0x2f, 0xf8, 0xe4, 0xf6, 0x74, 0xfc, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0xf0} }, -{ 0x0f99, 16, {0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0xe0, 0xb4, 0x04, 0xb6, 0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f} }, -{ 0x0fa9, 16, {0xf5, 0x4b, 0x60, 0x5e, 0xe4, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0xc3, 0x94} }, -{ 0x0fb9, 16, {0x04, 0x50, 0xe7, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x55, 0x4b} }, -{ 0x0fc9, 16, {0x60, 0x38, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4} }, -{ 0x0fd9, 16, {0x34, 0x20, 0xf5, 0x83, 0xe0, 0xfe, 0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4} }, -{ 0x0fe9, 16, {0x34, 0x20, 0xf5, 0x83, 0xe0, 0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x34} }, -{ 0x0ff9, 16, {0x20, 0xf5, 0x83, 0xe0, 0xfe, 0x7d, 0x06, 0x12, 0x82, 0xd5, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0} }, -{ 0x1009, 3, {0x80, 0xa7, 0x22} }, -{ 0x100c, 16, {0x7b, 0xff, 0x7a, 0x12, 0x79, 0x1b, 0x90, 0x00, 0x04, 0x12, 0x9b, 0x8b, 0xfd, 0x8b, 0x4d, 0x75} }, -{ 0x101c, 16, {0x4e, 0x12, 0x75, 0x4f, 0x24, 0xe4, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x7f, 0xe0, 0xf0, 0xf5, 0x4b} }, -{ 0x102c, 16, {0xf5, 0x4c, 0x90, 0x02, 0xae, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f} }, -{ 0x103c, 16, {0xa9, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0xe4, 0xfc, 0xec, 0x25, 0xe0, 0x24, 0xb4, 0xf5} }, -{ 0x104c, 16, {0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x0c, 0xbc, 0x10, 0xee, 0xe4, 0x90, 0x7f, 0xdd} }, -{ 0x105c, 16, {0xf0, 0xaf, 0x05, 0x1d, 0xef, 0x70, 0x03, 0x02, 0x11, 0xd2, 0xab, 0x4d, 0xaa, 0x4e, 0xa9, 0x4f} }, -{ 0x106c, 16, {0x90, 0x00, 0x01, 0x12, 0x9b, 0x8b, 0x64, 0x05, 0x60, 0x03, 0x02, 0x11, 0xc1, 0x90, 0x00, 0x03} }, -{ 0x107c, 16, {0x12, 0x9b, 0x8b, 0x64, 0x01, 0x60, 0x03, 0x02, 0x11, 0x48, 0x90, 0x00, 0x02, 0x12, 0x9b, 0x8b} }, -{ 0x108c, 16, {0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50, 0x03, 0x02, 0x11, 0x22, 0xec, 0xc3, 0x94, 0x10} }, -{ 0x109c, 16, {0x40, 0x03, 0x02, 0x11, 0x22, 0xef, 0x30, 0xe7, 0x42, 0xe5, 0x4c, 0xae, 0x4b, 0x78, 0x02, 0xce} }, -{ 0x10ac, 16, {0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xf0, 0x2c, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5} }, -{ 0x10bc, 16, {0x83, 0xef, 0xf0, 0x90, 0x7f, 0xe0, 0xe0, 0xff, 0xec, 0x24, 0xf8, 0xfe, 0x74, 0x01, 0xa8, 0x06} }, -{ 0x10cc, 16, {0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x4f, 0x90, 0x7f, 0xe0, 0xf0, 0x90, 0x02, 0xae, 0xe0} }, -{ 0x10dc, 16, {0x04, 0xf0, 0x90, 0x7f, 0xdd, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x3e, 0xe5, 0x4c, 0xae, 0x4b, 0x78} }, -{ 0x10ec, 16, {0x02, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xe8, 0x2c, 0xf5, 0x82, 0xe4, 0x34} }, -{ 0x10fc, 16, {0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0xe1, 0xe0, 0xff, 0xec, 0x24, 0xf8, 0xfe, 0x74, 0x01} }, -{ 0x110c, 16, {0xa8, 0x06, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x4f, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x02} }, -{ 0x111c, 16, {0xae, 0xe0, 0x04, 0xf0, 0x80, 0x03, 0x7f, 0xff, 0x22, 0x90, 0x00, 0x04, 0x12, 0x9b, 0x8b, 0x25} }, -{ 0x112c, 16, {0x4c, 0xf5, 0x4c, 0xe4, 0x35, 0x4b, 0xf5, 0x4b, 0x90, 0x00, 0x05, 0x12, 0x9b, 0x8b, 0xfe, 0xe4} }, -{ 0x113c, 16, {0x25, 0x4c, 0xf5, 0x4c, 0xee, 0x35, 0x4b, 0xf5, 0x4b, 0x02, 0x11, 0xc4, 0xab, 0x4d, 0xaa, 0x4e} }, -{ 0x114c, 16, {0xa9, 0x4f, 0x90, 0x00, 0x03, 0x12, 0x9b, 0x8b, 0xff, 0x64, 0x02, 0x60, 0x05, 0xef, 0x64, 0x03} }, -{ 0x115c, 16, {0x70, 0x60, 0x90, 0x00, 0x02, 0x12, 0x9b, 0x8b, 0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50} }, -{ 0x116c, 16, {0x4e, 0xef, 0x30, 0xe7, 0x1e, 0x90, 0x7f, 0xde, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80} }, -{ 0x117c, 16, {0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x4f, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f, 0xac, 0xe0, 0x4e} }, -{ 0x118c, 16, {0xf0, 0x80, 0x35, 0x90, 0x7f, 0xdf, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80, 0x02, 0xc3} }, -{ 0x119c, 16, {0x33, 0xd8, 0xfc, 0xfe, 0x4f, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xad, 0xe0, 0x4e, 0xf0, 0xec} }, -{ 0x11ac, 16, {0x25, 0xe0, 0x24, 0xc5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xec, 0xf0, 0x80, 0x09, 0x7f} }, -{ 0x11bc, 16, {0xff, 0x22, 0x7f, 0xff, 0x22, 0x7f, 0xff, 0x22, 0x74, 0x07, 0x25, 0x4f, 0xf5, 0x4f, 0xe4, 0x35} }, -{ 0x11cc, 16, {0x4e, 0xf5, 0x4e, 0x02, 0x10, 0x5d, 0x20, 0x03, 0x0d, 0x90, 0x02, 0xae, 0xe0, 0x60, 0x07, 0x90} }, -{ 0x11dc, 8, {0x7f, 0xae, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0x00} }, -{ 0x11e4, 1, {0x22} }, -{ 0x11e5, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33} }, -{ 0x11f5, 7, {0xd8, 0xfc, 0x42, 0x3a, 0x7f, 0x00, 0x22} }, -{ 0x11fc, 3, {0x00, 0x03, 0x15} }, +{ 0x0d27, 1, {0x32} }, +{ 0x0d28, 1, {0x32} }, +{ 0x0d29, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} }, +{ 0x0d39, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x02, 0xf0, 0xe5, 0x30, 0x20} }, +{ 0x0d49, 16, {0xe0, 0x06, 0x90, 0x7f, 0xc7, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe0, 0x0a, 0x90, 0x7f, 0xc7} }, +{ 0x0d59, 16, {0xe0, 0x90, 0x02, 0xf8, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x01, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} }, +{ 0x0d69, 16, {0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} }, +{ 0x0d79, 4, {0x83, 0xd0, 0xe0, 0x32} }, +{ 0x0d7d, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} }, +{ 0x0d8d, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x04, 0xf0, 0xe5, 0x30, 0x20} }, +{ 0x0d9d, 16, {0xe1, 0x06, 0x90, 0x7f, 0xc9, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe1, 0x0a, 0x90, 0x7f, 0xc9} }, +{ 0x0dad, 16, {0xe0, 0x90, 0x02, 0xf9, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x09, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} }, +{ 0x0dbd, 16, {0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} }, +{ 0x0dcd, 4, {0x83, 0xd0, 0xe0, 0x32} }, +{ 0x0dd1, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} }, +{ 0x0de1, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x08, 0xf0, 0xe5, 0x30, 0x20} }, +{ 0x0df1, 16, {0xe2, 0x06, 0x90, 0x7f, 0xcb, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe2, 0x0a, 0x90, 0x7f, 0xcb} }, +{ 0x0e01, 16, {0xe0, 0x90, 0x02, 0xfa, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x11, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} }, +{ 0x0e11, 16, {0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} }, +{ 0x0e21, 4, {0x83, 0xd0, 0xe0, 0x32} }, +{ 0x0e25, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0x85, 0xc0, 0x84, 0xc0, 0x86, 0x75, 0x86, 0x00, 0xc0} }, +{ 0x0e35, 16, {0xd0, 0x75, 0xd0, 0x10, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x10, 0xf0, 0xe5, 0x30, 0x20} }, +{ 0x0e45, 16, {0xe3, 0x06, 0x90, 0x7f, 0xcd, 0xf0, 0x80, 0x16, 0xe5, 0x3b, 0x30, 0xe3, 0x0a, 0x90, 0x7f, 0xcd} }, +{ 0x0e55, 16, {0xe0, 0x90, 0x02, 0xfb, 0xf0, 0x80, 0x07, 0x90, 0x20, 0x19, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x2b} }, +{ 0x0e65, 16, {0x70, 0x03, 0x75, 0x2b, 0x14, 0xd0, 0xd0, 0xd0, 0x86, 0xd0, 0x84, 0xd0, 0x85, 0xd0, 0x82, 0xd0} }, +{ 0x0e75, 4, {0x83, 0xd0, 0xe0, 0x32} }, +{ 0x0e79, 1, {0x32} }, +{ 0x0e7a, 1, {0x32} }, +{ 0x0e7b, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xa9, 0x74, 0x80, 0xf0, 0xd0} }, +{ 0x0e8b, 6, {0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} }, +{ 0x0e91, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0x53, 0x91, 0xef, 0x90, 0x7f, 0xaa, 0x74, 0x80, 0xf0, 0x90} }, +{ 0x0ea1, 12, {0x01, 0xbd, 0x74, 0xff, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} }, +{ 0x0ead, 16, {0x90, 0x01, 0x20, 0x12, 0xa1, 0x07, 0x00, 0x00, 0x25, 0x80, 0x90, 0x01, 0x24, 0x74, 0x08, 0xf0} }, +{ 0x0ebd, 16, {0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x6e, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x13, 0xf0, 0xa3, 0x74} }, +{ 0x0ecd, 16, {0x11, 0xf0, 0xe4, 0xa3, 0xf0, 0xa3, 0xf0, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff} }, +{ 0x0edd, 16, {0x04, 0xa3, 0xf0, 0xef, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf9, 0x74, 0x03, 0x35, 0xf0, 0xa8} }, +{ 0x0eed, 16, {0x01, 0xfc, 0x7d, 0x01, 0x7b, 0x01, 0x7a, 0x01, 0x79, 0x1f, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0x9f} }, +{ 0x0efd, 16, {0x1f, 0x7e, 0x01, 0x7f, 0x1f, 0x12, 0x86, 0x17, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0xe0, 0xc3} }, +{ 0x0f0d, 16, {0x94, 0x04, 0x40, 0xc7, 0xe4, 0xf5, 0x26, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff} }, +{ 0x0f1d, 16, {0xc3, 0x94, 0x04, 0x50, 0x1a, 0x74, 0xf8, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4} }, +{ 0x0f2d, 16, {0xf0, 0x74, 0x22, 0x2f, 0xf8, 0xe4, 0xf6, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xdc, 0xe4} }, +{ 0x0f3d, 16, {0xf5, 0x30, 0xe5, 0xc0, 0x60, 0x2f, 0x90, 0x01, 0x1e, 0x74, 0x01, 0xf0, 0x90, 0x01, 0x1e, 0xe0} }, +{ 0x0f4d, 16, {0xff, 0xd3, 0x94, 0x04, 0x50, 0x1f, 0xef, 0x14, 0xff, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02} }, +{ 0x0f5d, 16, {0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x30, 0x7e, 0x01, 0x7f, 0x1e, 0x12, 0x83, 0xb7, 0x90, 0x01, 0x1e} }, +{ 0x0f6d, 16, {0xe0, 0x04, 0xf0, 0x80, 0xd7, 0xe4, 0xf5, 0x3a, 0x90, 0x01, 0x1e, 0xf0, 0x90, 0x01, 0x1e, 0xe0} }, +{ 0x0f7d, 16, {0xff, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x54} }, +{ 0x0f8d, 16, {0xf0, 0xfe, 0x74, 0xc5, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83, 0xee, 0xf0, 0x74, 0x36} }, +{ 0x0f9d, 16, {0x2f, 0xf8, 0xa6, 0x06, 0x74, 0x32, 0x2f, 0xf8, 0xe4, 0xf6, 0x74, 0x2c, 0x2f, 0xf8, 0xe4, 0xf6} }, +{ 0x0fad, 16, {0x74, 0xfc, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0xf0, 0x90, 0x01, 0x1e, 0xe0} }, +{ 0x0fbd, 16, {0x04, 0xf0, 0xe0, 0xb4, 0x04, 0xb6, 0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xf5, 0x4b, 0x60, 0x5e} }, +{ 0x0fcd, 4, {0xe4, 0x90, 0x01, 0x1e} }, +{ 0x0fd1, 16, {0xf0, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0xc3, 0x94, 0x04, 0x50, 0xe7, 0x74, 0x01, 0xa8, 0x07, 0x08} }, +{ 0x0fe1, 16, {0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x55, 0x4b, 0x60, 0x38, 0x90, 0x01, 0x1e, 0xe0, 0xff, 0x75} }, +{ 0x0ff1, 16, {0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0xfe, 0xef, 0x75} }, +{ 0x1001, 16, {0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0xef, 0x75, 0xf0} }, +{ 0x1011, 16, {0x08, 0xa4, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0xfe, 0x7d, 0x06, 0x12} }, +{ 0x1021, 11, {0x83, 0x2d, 0x90, 0x01, 0x1e, 0xe0, 0x04, 0xf0, 0x80, 0xa7, 0x22} }, +{ 0x102c, 4, {0xad, 0x07, 0xac, 0x06} }, +{ 0x1030, 16, {0x79, 0x06, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb} }, +{ 0x1040, 16, {0x4a, 0x70, 0x03, 0x02, 0x11, 0x74, 0xe9, 0xb4, 0x07, 0x00, 0x40, 0x03, 0x02, 0x11, 0x46, 0x90} }, +{ 0x1050, 16, {0x10, 0x56, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x11, 0x24, 0x02, 0x10, 0xdc, 0x02, 0x10, 0xc5, 0x02} }, +{ 0x1060, 16, {0x10, 0xab, 0x02, 0x10, 0x9a, 0x02, 0x10, 0x85, 0x02, 0x10, 0x6b, 0x90, 0x7f, 0xa5, 0xe0, 0x44} }, +{ 0x1070, 16, {0x80, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90, 0x7f, 0xa6} }, +{ 0x1080, 16, {0xf0, 0x19, 0x02, 0x11, 0x46, 0x19, 0x8d, 0x82, 0x8c, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x0a} }, +{ 0x1090, 16, {0xa3, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x02, 0x11, 0x46, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} }, +{ 0x10a0, 16, {0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x19, 0x02, 0x11, 0x46, 0x90, 0x7f, 0xa5, 0xe0, 0x44} }, +{ 0x10b0, 16, {0x80, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa1, 0x90, 0x7f, 0xa6} }, +{ 0x10c0, 16, {0xf0, 0x19, 0x02, 0x11, 0x46, 0xeb, 0x64, 0x01, 0x4a, 0x70, 0x08, 0x90, 0x7f, 0xa5, 0xe0, 0x44} }, +{ 0x10d0, 16, {0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xf5, 0x54, 0x19, 0x80, 0x6a, 0xed, 0x24, 0x04, 0xf5} }, +{ 0x10e0, 16, {0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfe, 0xa3, 0xe0, 0x64, 0x02, 0x4e, 0x70, 0x08, 0x90, 0x7f} }, +{ 0x10f0, 16, {0xa5, 0xe0, 0x44, 0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xff, 0xed, 0x24, 0x06, 0xf5, 0x82} }, +{ 0x1100, 16, {0xe4, 0x3c, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83} }, +{ 0x1110, 16, {0xef, 0xf0, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12} }, +{ 0x1120, 16, {0x9f, 0x8e, 0x80, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xff} }, +{ 0x1130, 16, {0xed, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xf5, 0x82, 0x8a} }, +{ 0x1140, 16, {0x83, 0xef, 0xf0, 0x7f, 0x08, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x54, 0x30, 0xe0, 0xf7, 0x30} }, +{ 0x1150, 16, {0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xe9, 0xd3, 0x94, 0x02, 0x50, 0x03, 0x02} }, +{ 0x1160, 16, {0x10, 0x32, 0xe5, 0x54, 0x30, 0xe1, 0x03, 0x02, 0x10, 0x32, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40} }, +{ 0x1170, 6, {0xf0, 0x7f, 0x07, 0x22, 0x7f, 0x08} }, +{ 0x1176, 1, {0x22} }, +{ 0x1177, 2, {0xae, 0x07} }, +{ 0x1179, 16, {0x7c, 0x02, 0xec, 0x14, 0x60, 0x15, 0x14, 0x70, 0x1e, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0} }, +{ 0x1189, 16, {0xee, 0x25, 0xe0, 0x44, 0x40, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xa6, 0xed, 0xf0} }, +{ 0x1199, 16, {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xfb, 0x30, 0xe0, 0xf8, 0xbc} }, +{ 0x11a9, 16, {0x02, 0x0a, 0x20, 0xe1, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22, 0xeb, 0x30, 0xe2, 0x0a} }, +{ 0x11b9, 14, {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xdc, 0xb6, 0x7f, 0x08} }, +{ 0x11c7, 1, {0x22} }, +{ 0x11c8, 16, {0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x7f, 0x02, 0x7d, 0xff, 0x12, 0x11, 0x77, 0x7f, 0x05} }, +{ 0x11d8, 13, {0x7e, 0x00, 0x12, 0x09, 0x29, 0x7f, 0x03, 0x7d, 0xff, 0x12, 0x11, 0x77, 0x22} }, +{ 0x11e5, 16, {0xe4, 0x90, 0x01, 0xc9, 0xf0, 0x7e, 0x01, 0x7f, 0xca, 0x90, 0x01, 0xbe, 0xee, 0xf0, 0xa3, 0xef} }, +{ 0x11f5, 10, {0xf0, 0x90, 0x01, 0xc2, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} }, { 0x1200, 16, {0x12, 0x01, 0x00, 0x01, 0xff, 0xff, 0xff, 0x40, 0x10, 0x07, 0x01, 0x80, 0x42, 0x00, 0x01, 0x02} }, { 0x1210, 16, {0x03, 0x01, 0x09, 0x02, 0x58, 0x00, 0x01, 0x01, 0x04, 0x80, 0x3c, 0x09, 0x04, 0x00, 0x00, 0x0a} }, { 0x1220, 16, {0xff, 0xff, 0xff, 0x05, 0x07, 0x05, 0x81, 0x02, 0x40, 0x00, 0x00, 0x07, 0x05, 0x01, 0x02, 0x40} }, @@ -438,557 +439,623 @@ { 0x19a0, 16, {0x80, 0x1b, 0xe0, 0xde, 0xfd, 0x90, 0x7f, 0xe2, 0xe0, 0x54, 0xbf, 0xf0, 0x90, 0x20, 0x58, 0x74} }, { 0x19b0, 16, {0x00, 0xf0, 0x90, 0x20, 0x19, 0xe0, 0x54, 0xfd, 0xf0, 0x90, 0x7f, 0xcd, 0xf0, 0x02, 0x13, 0x43} }, { 0x19c0, 1, {0x32} }, -{ 0x19c1, 4, {0xad, 0x07, 0xac, 0x06} }, -{ 0x19c5, 16, {0x79, 0x06, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb} }, -{ 0x19d5, 16, {0x4a, 0x70, 0x03, 0x02, 0x1b, 0x09, 0xe9, 0xb4, 0x07, 0x00, 0x40, 0x03, 0x02, 0x1a, 0xdb, 0x90} }, -{ 0x19e5, 16, {0x19, 0xeb, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x1a, 0xb9, 0x02, 0x1a, 0x71, 0x02, 0x1a, 0x5a, 0x02} }, -{ 0x19f5, 16, {0x1a, 0x40, 0x02, 0x1a, 0x2f, 0x02, 0x1a, 0x1a, 0x02, 0x1a, 0x00, 0x90, 0x7f, 0xa5, 0xe0, 0x44} }, -{ 0x1a05, 16, {0x80, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90, 0x7f, 0xa6} }, -{ 0x1a15, 16, {0xf0, 0x19, 0x02, 0x1a, 0xdb, 0x19, 0x8d, 0x82, 0x8c, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x0a} }, -{ 0x1a25, 16, {0xa3, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x02, 0x1a, 0xdb, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} }, -{ 0x1a35, 16, {0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x19, 0x02, 0x1a, 0xdb, 0x90, 0x7f, 0xa5, 0xe0, 0x44} }, -{ 0x1a45, 16, {0x80, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa1, 0x90, 0x7f, 0xa6} }, -{ 0x1a55, 16, {0xf0, 0x19, 0x02, 0x1a, 0xdb, 0xeb, 0x64, 0x01, 0x4a, 0x70, 0x08, 0x90, 0x7f, 0xa5, 0xe0, 0x44} }, -{ 0x1a65, 16, {0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xf5, 0x54, 0x19, 0x80, 0x6a, 0xed, 0x24, 0x04, 0xf5} }, -{ 0x1a75, 16, {0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfe, 0xa3, 0xe0, 0x64, 0x02, 0x4e, 0x70, 0x08, 0x90, 0x7f} }, -{ 0x1a85, 16, {0xa5, 0xe0, 0x44, 0x20, 0xf0, 0x19, 0x90, 0x7f, 0xa6, 0xe0, 0xff, 0xed, 0x24, 0x06, 0xf5, 0x82} }, -{ 0x1a95, 16, {0xe4, 0x3c, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9b, 0xce, 0x85, 0xf0, 0x82, 0xf5, 0x83} }, -{ 0x1aa5, 16, {0xef, 0xf0, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12} }, -{ 0x1ab5, 16, {0x9b, 0xb8, 0x80, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xff} }, -{ 0x1ac5, 16, {0xed, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3c, 0xf5, 0x83, 0xe0, 0xfa, 0xa3, 0xe0, 0xf5, 0x82, 0x8a} }, -{ 0x1ad5, 16, {0x83, 0xef, 0xf0, 0x7f, 0x08, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x54, 0x30, 0xe0, 0xf7, 0x30} }, -{ 0x1ae5, 16, {0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xe9, 0xd3, 0x94, 0x02, 0x50, 0x03, 0x02} }, -{ 0x1af5, 16, {0x19, 0xc7, 0xe5, 0x54, 0x30, 0xe1, 0x03, 0x02, 0x19, 0xc7, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40} }, -{ 0x1b05, 6, {0xf0, 0x7f, 0x07, 0x22, 0x7f, 0x08} }, -{ 0x1b0b, 1, {0x22} }, -{ 0x1b0c, 16, {0x7f, 0x05, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x7f, 0x02, 0x7d, 0xff, 0x12, 0x81, 0xe0, 0x7f, 0x05} }, -{ 0x1b1c, 13, {0x7e, 0x00, 0x12, 0x09, 0x23, 0x7f, 0x03, 0x7d, 0xff, 0x12, 0x81, 0xe0, 0x22} }, -{ 0x1b29, 16, {0xff, 0xfe, 0xfd, 0xfc, 0xfb, 0xfa, 0xf9, 0xf8, 0xf7, 0xf6, 0xf5, 0xf4, 0xf3, 0xf2, 0xf1, 0xf0} }, -{ 0x8000, 4, {0x8e, 0x54, 0x8f, 0x55} }, -{ 0x8004, 16, {0x75, 0x56, 0x03, 0xe5, 0x55, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xfe} }, -{ 0x8014, 16, {0xa3, 0xe0, 0x4e, 0x70, 0x03, 0x02, 0x81, 0x0e, 0xe5, 0x56, 0x60, 0x4e, 0x14, 0x60, 0x38, 0x14} }, -{ 0x8024, 16, {0x60, 0x20, 0x14, 0x60, 0x03, 0x02, 0x80, 0xb2, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0x85} }, -{ 0x8034, 16, {0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90, 0x7f, 0xa6, 0xf0} }, -{ 0x8044, 16, {0x80, 0x6c, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x09, 0xa3, 0xa3} }, -{ 0x8054, 16, {0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x57, 0x15, 0x56, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3} }, -{ 0x8064, 16, {0xa3, 0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x44, 0xe5, 0x55, 0x24, 0x06, 0xf5, 0x82} }, -{ 0x8074, 16, {0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9b, 0xce, 0x85, 0xf0, 0x82, 0xf5} }, -{ 0x8084, 16, {0x83, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe5, 0x55, 0x24} }, -{ 0x8094, 16, {0x04, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12, 0x9b, 0xb8, 0x85} }, -{ 0x80a4, 16, {0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xa3, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9b, 0xb8, 0x90, 0x7f} }, -{ 0x80b4, 16, {0xa5, 0xe0, 0xf5, 0x57, 0x30, 0xe0, 0xf7, 0x30, 0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06} }, -{ 0x80c4, 16, {0x22, 0xe5, 0x57, 0x20, 0xe1, 0x0a, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22} }, -{ 0x80d4, 16, {0xe5, 0x56, 0x70, 0x31, 0x7f, 0x01, 0x7e, 0x00, 0x12, 0x09, 0x23, 0x90, 0x7f, 0xa5, 0xe0, 0x44} }, -{ 0x80e4, 16, {0x80, 0xf0, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90} }, -{ 0x80f4, 16, {0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x57, 0x30, 0xe0, 0xf7, 0x30, 0xe1, 0xd5, 0x75} }, -{ 0x8104, 12, {0x56, 0x03, 0x02, 0x80, 0x07, 0x15, 0x56, 0x02, 0x80, 0x07, 0x7f, 0x08} }, -{ 0x8110, 1, {0x22} }, -{ 0x8111, 2, {0xac, 0x07} }, -{ 0x8113, 16, {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xec, 0x25, 0xe0, 0x44, 0x41, 0x90, 0x7f, 0xa6, 0xf0} }, -{ 0x8123, 16, {0x7b, 0x3c, 0xaf, 0x03, 0x1b, 0xef, 0x70, 0x16, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90} }, -{ 0x8133, 16, {0x7f, 0xa6, 0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x60, 0xd4, 0x80, 0xf8, 0x90, 0x7f} }, -{ 0x8143, 16, {0xa5, 0xe0, 0xfd, 0x30, 0xe0, 0xdc, 0x20, 0xe1, 0x09, 0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f} }, -{ 0x8153, 16, {0xf9, 0x22, 0xed, 0x30, 0xe2, 0x0c, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f} }, -{ 0x8163, 16, {0xfa, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0x7b, 0x1e} }, -{ 0x8173, 16, {0xaf, 0x03, 0x1b, 0xef, 0x70, 0x16, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6} }, -{ 0x8183, 16, {0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x60, 0x86, 0x80, 0xf8, 0x90, 0x7f, 0xa5, 0xe0} }, -{ 0x8193, 16, {0xfd, 0x20, 0xe0, 0xdc, 0x7b, 0x3c, 0xaf, 0x03, 0x1b, 0xef, 0x70, 0x19, 0x90, 0x7f, 0xa5, 0xe0} }, -{ 0x81a3, 16, {0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x70, 0x03} }, -{ 0x81b3, 16, {0x02, 0x81, 0x13, 0x80, 0xf5, 0x90, 0x7f, 0xa5, 0xe0, 0xfd, 0x30, 0xe0, 0xd9, 0x30, 0xe2, 0x09} }, -{ 0x81c3, 16, {0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f, 0xfa, 0x22, 0xc2, 0xaf, 0x90, 0x7f, 0xa5, 0xe0, 0x44} }, -{ 0x81d3, 12, {0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0xd2, 0xaf, 0xff, 0x7e, 0x00} }, -{ 0x81df, 1, {0x22} }, -{ 0x81e0, 2, {0xae, 0x07} }, -{ 0x81e2, 16, {0x7c, 0x02, 0xec, 0x14, 0x60, 0x15, 0x14, 0x70, 0x1e, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0} }, -{ 0x81f2, 16, {0xee, 0x25, 0xe0, 0x44, 0x40, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x0c, 0x90, 0x7f, 0xa6, 0xed, 0xf0} }, -{ 0x8202, 16, {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xfb, 0x30, 0xe0, 0xf8, 0xbc} }, -{ 0x8212, 16, {0x02, 0x0a, 0x20, 0xe1, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22, 0xeb, 0x30, 0xe2, 0x0a} }, -{ 0x8222, 14, {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06, 0x22, 0xdc, 0xb6, 0x7f, 0x08} }, -{ 0x8230, 1, {0x22} }, -{ 0x8231, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc2, 0xa9, 0x90, 0x03, 0x00, 0x74, 0x19, 0xf0, 0xd2, 0xa9} }, -{ 0x8241, 15, {0x53, 0x91, 0x7f, 0x90, 0x01, 0xc4, 0xe4, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} }, -{ 0x8250, 16, {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xf5} }, -{ 0x8260, 16, {0x83, 0xa3, 0xe4, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xf5, 0x5e, 0x74, 0xbf} }, -{ 0x8270, 16, {0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0, 0x44, 0x10, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3} }, -{ 0x8280, 16, {0xa3, 0xa3, 0xe4, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xf0, 0xf9, 0xed, 0x60, 0x1d, 0x74, 0x01} }, -{ 0x8290, 16, {0x7e, 0x00, 0xa8, 0x07, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4} }, -{ 0x82a0, 16, {0xef, 0x55, 0x3b, 0x60, 0x04, 0x79, 0x09, 0x80, 0x02, 0x79, 0x0d, 0x8b, 0x82, 0x8a, 0x83, 0xa3} }, -{ 0x82b0, 16, {0xa3, 0xa3, 0x74, 0xbf, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0, 0x54, 0xef, 0xf0, 0x8b} }, -{ 0x82c0, 16, {0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0xe5, 0x5e, 0xf0, 0xae, 0x02, 0xaf, 0x03, 0x8f, 0x82, 0x8e} }, -{ 0x82d0, 4, {0x83, 0xa3, 0xe9, 0xf0} }, -{ 0x82d4, 1, {0x22} }, -{ 0x82d5, 4, {0x8f, 0x5e, 0x8d, 0x5f} }, -{ 0x82d9, 16, {0xe4, 0xf5, 0x60, 0x74, 0x3c, 0x2f, 0xf8, 0x76, 0x08, 0xe5, 0x5e, 0x75, 0xf0, 0x0d, 0xa4, 0x24} }, -{ 0x82e9, 16, {0x02, 0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} }, -{ 0x82f9, 16, {0xa3, 0xe0, 0xff, 0x7b, 0x80, 0x7a, 0x25, 0x79, 0x00, 0x78, 0x00, 0xc3, 0x12, 0x9c, 0xea, 0x50} }, -{ 0x8309, 16, {0x3c, 0xe5, 0x5e, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83} }, -{ 0x8319, 16, {0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x00, 0x7a, 0x96, 0x78} }, -{ 0x8329, 16, {0x00, 0xc3, 0x12, 0x9c, 0xea, 0x40, 0x0c, 0x75, 0x60, 0x40, 0x74, 0x3c, 0x25, 0x5e, 0xf8, 0x76} }, -{ 0x8339, 16, {0x10, 0x80, 0x0a, 0x75, 0x60, 0x80, 0x74, 0x3c, 0x25, 0x5e, 0xf8, 0x76, 0x38, 0xe5, 0x60, 0x45} }, -{ 0x8349, 16, {0x5f, 0x44, 0x01, 0xff, 0xe5, 0x5e, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34} }, -{ 0x8359, 5, {0x20, 0xf5, 0x83, 0xef, 0xf0} }, -{ 0x835e, 1, {0x22} }, -{ 0x835f, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x54, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82} }, -{ 0x836f, 16, {0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x55, 0x8f, 0x56, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xc6, 0xf5} }, -{ 0x837f, 16, {0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x20, 0xe1, 0x0f, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xc7} }, -{ 0x838f, 16, {0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x74, 0x22, 0x25, 0x54, 0xf8, 0xe4, 0xf6} }, -{ 0x839f, 16, {0xe5, 0x56, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0, 0x44, 0x03, 0xf0, 0xaf} }, -{ 0x83af, 16, {0x54, 0x7d, 0x06, 0x12, 0x82, 0xd5, 0xaf, 0x54, 0x7d, 0x01, 0x12, 0x82, 0x50, 0x85, 0x56, 0x82} }, -{ 0x83bf, 16, {0x85, 0x55, 0x83, 0xa3, 0xa3, 0xe0, 0x20, 0xe0, 0x22, 0xe0, 0xff, 0xe5, 0x56, 0x24, 0x05, 0xf5} }, -{ 0x83cf, 16, {0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0, 0xe5, 0x56, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x55} }, -{ 0x83df, 16, {0xf5, 0x83, 0xe0, 0xff, 0xaf, 0x54, 0x7d, 0x06, 0x12, 0x82, 0xd5, 0x74, 0xf8, 0x25, 0x54, 0xf5} }, -{ 0x83ef, 16, {0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x54, 0x25, 0xe0, 0xff, 0xc3, 0x74, 0x0c} }, -{ 0x83ff, 16, {0x9f, 0x75, 0xf0, 0x40, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xaf, 0x82, 0xfe} }, -{ 0x840f, 16, {0xe5, 0x54, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xee, 0xf0, 0xa3} }, -{ 0x841f, 16, {0xef, 0xf0, 0xaf, 0x54, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42} }, -{ 0x842f, 3, {0x30, 0x7f, 0x00} }, -{ 0x8432, 1, {0x22} }, -{ 0x8433, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x54, 0xff, 0xe4, 0xfd, 0x12, 0x82, 0x50, 0x74, 0xf8} }, -{ 0x8443, 16, {0x25, 0x54, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x54, 0x75, 0xf0, 0x08} }, -{ 0x8453, 16, {0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x56, 0x8f, 0x57, 0xf5, 0x83} }, -{ 0x8463, 16, {0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xaf} }, -{ 0x8473, 16, {0x54, 0x7d, 0x06, 0x12, 0x82, 0xd5, 0xe5, 0x57, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x56, 0xf5} }, -{ 0x8483, 16, {0x83, 0xe0, 0x30, 0xe0, 0x09, 0x85, 0x57, 0x82, 0x85, 0x56, 0x83, 0xe0, 0xf5, 0x55, 0xaf, 0x54} }, -{ 0x8493, 16, {0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x30, 0xe5, 0x54} }, -{ 0x84a3, 16, {0x25, 0xe0, 0x24, 0xc6, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x20, 0xe1, 0x0f, 0xe5} }, -{ 0x84b3, 16, {0x54, 0x25, 0xe0, 0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x7f, 0x00} }, -{ 0x84c3, 1, {0x22} }, -{ 0x84c4, 4, {0x8e, 0x54, 0x8f, 0x55} }, -{ 0x84c8, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x56, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82} }, -{ 0x84d8, 16, {0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x54, 0x03, 0x70, 0x23, 0x85, 0x55, 0x82, 0x8e, 0x83, 0xa3} }, -{ 0x84e8, 16, {0xe0, 0x30, 0xe0, 0x07, 0xaf, 0x56, 0x7d, 0x02, 0x12, 0x82, 0xd5, 0x85, 0x55, 0x82, 0x85, 0x54} }, -{ 0x84f8, 15, {0x83, 0xa3, 0xe0, 0x30, 0xe1, 0x07, 0xaf, 0x56, 0x7d, 0x04, 0x12, 0x82, 0xd5, 0x7f, 0x00} }, -{ 0x8507, 1, {0x22} }, -{ 0x8508, 16, {0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0xa3, 0xa3, 0xa3, 0xe0, 0xfc, 0xed} }, -{ 0x8518, 16, {0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xc0, 0x83, 0xc0} }, -{ 0x8528, 16, {0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0} }, -{ 0x8538, 16, {0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0xe0, 0xfd, 0xec, 0x6d, 0xd0} }, -{ 0x8548, 16, {0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f} }, -{ 0x8558, 16, {0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82} }, -{ 0x8568, 16, {0x8e, 0x83, 0xa3, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0} }, -{ 0x8578, 16, {0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0} }, -{ 0x8588, 16, {0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xff, 0xed, 0x6f, 0xd0, 0x82, 0xd0} }, -{ 0x8598, 3, {0x83, 0xf0, 0x22} }, -{ 0x859b, 16, {0x79, 0x0d, 0x8e, 0x54, 0x8f, 0x55, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x0d, 0xa4, 0x24} }, -{ 0x85ab, 16, {0xf4, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xaf, 0x82, 0xfe, 0xad, 0x01, 0x19, 0xed, 0x60, 0x24, 0x0f} }, -{ 0x85bb, 16, {0xef, 0xac, 0x06, 0x70, 0x01, 0x0e, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe0, 0xfd, 0x05, 0x55, 0xe5} }, -{ 0x85cb, 16, {0x55, 0xaa, 0x54, 0x70, 0x02, 0x05, 0x54, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xe0, 0x6d, 0x60, 0xd9} }, -{ 0x85db, 5, {0x7f, 0x01, 0x22, 0x7f, 0x00} }, -{ 0x85e0, 1, {0x22} }, -{ 0x85e1, 4, {0x8e, 0x54, 0x8f, 0x55} }, -{ 0x85e5, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x5b, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82} }, -{ 0x85f5, 16, {0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x5c, 0x8f, 0x5d, 0xaa, 0x06, 0xa9, 0x55, 0x7b, 0x01, 0xc0} }, -{ 0x8605, 16, {0x03, 0xc0, 0x01, 0xe5, 0x5b, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf9, 0x74, 0x03, 0x35, 0xf0} }, -{ 0x8615, 16, {0xa8, 0x01, 0xfc, 0xad, 0x03, 0xd0, 0x01, 0xd0, 0x03, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0x9b, 0x49} }, -{ 0x8625, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3} }, -{ 0x8635, 16, {0xe0, 0xff, 0x7b, 0x08, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0xd3, 0x12, 0x9c, 0xea, 0x40, 0x10} }, -{ 0x8645, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0x12, 0x9d, 0x31, 0x00, 0x00, 0x00, 0x08, 0x80, 0x2e} }, -{ 0x8655, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3} }, -{ 0x8665, 16, {0xe0, 0xff, 0x7b, 0x00, 0x7a, 0x08, 0x79, 0x07, 0x78, 0x00, 0xc3, 0x12, 0x9c, 0xea, 0x50, 0x0e} }, -{ 0x8675, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0x12, 0x9d, 0x31, 0x00, 0x07, 0x08, 0x00, 0x85, 0x55} }, -{ 0x8685, 16, {0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa, 0xa3, 0xe0, 0xfb} }, -{ 0x8695, 16, {0x7f, 0x00, 0x7e, 0x50, 0x7d, 0x46, 0x7c, 0x00, 0x12, 0x9c, 0x58, 0x8f, 0x59, 0x8e, 0x58, 0x8d} }, -{ 0x86a5, 16, {0x57, 0x8c, 0x56, 0x7b, 0x0a, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0x12, 0x9c, 0x58, 0xaf, 0x03} }, -{ 0x86b5, 16, {0x8f, 0x5a, 0xaf, 0x59, 0xae, 0x58, 0xad, 0x57, 0xac, 0x56, 0x7b, 0x0a, 0x7a, 0x00, 0x79, 0x00} }, -{ 0x86c5, 16, {0x78, 0x00, 0x12, 0x9c, 0x58, 0x8f, 0x59, 0x8e, 0x58, 0x8d, 0x57, 0x8c, 0x56, 0xe5, 0x5a, 0xc3} }, -{ 0x86d5, 16, {0x94, 0x05, 0x40, 0x15, 0xe5, 0x59, 0x24, 0x01, 0xf5, 0x59, 0xe4, 0x35, 0x58, 0xf5, 0x58, 0xe4} }, -{ 0x86e5, 16, {0x35, 0x57, 0xf5, 0x57, 0xe4, 0x35, 0x56, 0xf5, 0x56, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3} }, -{ 0x86f5, 16, {0xe4, 0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x80, 0xf0, 0x85} }, -{ 0x8705, 16, {0x5d, 0x82, 0x85, 0x5c, 0x83, 0xe5, 0x59, 0xf0, 0xaf, 0x59, 0xae, 0x58, 0xad, 0x57, 0xac, 0x56} }, -{ 0x8715, 16, {0x78, 0x08, 0x12, 0x9c, 0xfb, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xef, 0xf0, 0x85, 0x5d} }, -{ 0x8725, 16, {0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0xe4, 0xf5, 0x5a, 0xe5, 0x55} }, -{ 0x8735, 16, {0x24, 0x08, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0xb4, 0x62, 0x05, 0x43, 0x5a} }, -{ 0x8745, 16, {0x0a, 0x80, 0x10, 0xef, 0xb4, 0x72, 0x05, 0x43, 0x5a, 0x08, 0x80, 0x07, 0xef, 0xb4, 0x74, 0x03} }, -{ 0x8755, 16, {0x43, 0x5a, 0x02, 0xe5, 0x55, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff} }, -{ 0x8765, 16, {0x30, 0xe3, 0x03, 0x43, 0x5a, 0x80, 0xef, 0x30, 0xe7, 0x12, 0x43, 0x5a, 0x40, 0xe5, 0x5d, 0x24} }, -{ 0x8775, 16, {0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x55, 0x24, 0x0b} }, -{ 0x8785, 16, {0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0x20, 0xe1, 0x03, 0x30, 0xe4, 0x23, 0xaf} }, -{ 0x8795, 16, {0x5b, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x3b, 0xe5, 0x5d} }, -{ 0x87a5, 16, {0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xe0, 0x44, 0x01, 0xf0, 0xe4, 0xf5, 0x5a} }, -{ 0x87b5, 16, {0x80, 0x10, 0xaf, 0x5b, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4} }, -{ 0x87c5, 16, {0x52, 0x3b, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0x74, 0xbf, 0xf0, 0x85, 0x5d} }, -{ 0x87d5, 16, {0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0xe5, 0x5a, 0xf0, 0xe5, 0x55, 0x24, 0x0a, 0xf5} }, -{ 0x87e5, 16, {0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x5d, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35} }, -{ 0x87f5, 16, {0x5c, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x55, 0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83} }, -{ 0x8805, 16, {0xe0, 0xff, 0xe5, 0x5d, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xef, 0xf0, 0xe5} }, -{ 0x8815, 16, {0x55, 0x24, 0x09, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x5d, 0x24, 0x06} }, -{ 0x8825, 16, {0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x55, 0x24, 0x09, 0xf5, 0x82, 0xe4} }, -{ 0x8835, 16, {0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x5d, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5} }, -{ 0x8845, 16, {0x83, 0xef, 0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0xe4, 0xf0, 0x85, 0x5d} }, -{ 0x8855, 16, {0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xf0, 0xaf, 0x5b, 0x7d, 0x06, 0x12, 0x82, 0xd5, 0x75, 0x5a} }, -{ 0x8865, 16, {0x08, 0xe5, 0x55, 0x24, 0x0c, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0x60, 0x03, 0x43} }, -{ 0x8875, 16, {0x5a, 0x10, 0xe5, 0x5d, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xe0, 0x54, 0x03} }, -{ 0x8885, 16, {0x45, 0x5a, 0xf0, 0xe5, 0x55, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0x14} }, -{ 0x8895, 16, {0xff, 0x25, 0xe0, 0x25, 0xe0, 0xff, 0xe5, 0x55, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5} }, -{ 0x88a5, 16, {0x83, 0xe0, 0x24, 0xfb, 0x4f, 0xf5, 0x5a, 0xe5, 0x55, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x54} }, -{ 0x88b5, 16, {0xf5, 0x83, 0xe0, 0x24, 0xd0, 0x60, 0x15, 0x14, 0x60, 0x17, 0x24, 0xc2, 0x60, 0x09, 0x24, 0x0a} }, -{ 0x88c5, 16, {0x70, 0x12, 0x43, 0x5a, 0x18, 0x80, 0x0d, 0x43, 0x5a, 0x08, 0x80, 0x08, 0x43, 0x5a, 0x38, 0x80} }, -{ 0x88d5, 16, {0x03, 0x43, 0x5a, 0x28, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0xe5, 0x5a, 0xf0} }, -{ 0x88e5, 9, {0xaf, 0x5b, 0x7d, 0x01, 0x12, 0x82, 0x50, 0x7f, 0x00} }, -{ 0x88ee, 1, {0x22} }, -{ 0x88ef, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xff, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4} }, -{ 0x88ff, 16, {0x34, 0x20, 0xad, 0x82, 0xfc, 0x90, 0x01, 0x2c, 0x74, 0x08, 0xf0, 0xef, 0x04, 0xa3, 0xf0, 0xe4} }, -{ 0x890f, 16, {0xa3, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5} }, -{ 0x891f, 16, {0x83, 0xe0, 0x90, 0x01, 0x2f, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x05, 0xf5, 0x82} }, -{ 0x892f, 16, {0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0x1e, 0x90, 0x01, 0x30, 0xf0, 0x74, 0x2c, 0x2f, 0xf8} }, -{ 0x893f, 16, {0xe6, 0xa3, 0xf0, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x54} }, -{ 0x894f, 16, {0x7f, 0x02, 0x12, 0x81, 0x11, 0xc3, 0xee, 0x64, 0x80, 0x94, 0x80, 0x40, 0xf3, 0xe5, 0x54, 0x5f} }, -{ 0x895f, 16, {0x90, 0x01, 0x32, 0xf0, 0x7e, 0x01, 0x7f, 0x2c, 0x75, 0x60, 0x00, 0x75, 0x5f, 0x00, 0x75, 0x5e} }, -{ 0x896f, 11, {0x00, 0x75, 0x5d, 0x00, 0x7d, 0x07, 0x12, 0x8e, 0x0c, 0x7f, 0x00} }, -{ 0x897a, 1, {0x22} }, -{ 0x897b, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34, 0x1f} }, -{ 0x898b, 16, {0xaf, 0x82, 0xfe, 0x90, 0x01, 0x33, 0x74, 0x0a, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xe5, 0x82, 0x24} }, -{ 0x899b, 16, {0x04, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x90, 0x01, 0x34, 0xf0, 0x7e, 0x01, 0x7f} }, -{ 0x89ab, 16, {0x33, 0x75, 0x60, 0x00, 0x75, 0x5f, 0x00, 0x75, 0x5e, 0x00, 0x75, 0x5d, 0x00, 0x7d, 0x02, 0x12} }, -{ 0x89bb, 4, {0x8e, 0x0c, 0x7f, 0x00} }, -{ 0x89bf, 1, {0x22} }, -{ 0x89c0, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34, 0x1f} }, -{ 0x89d0, 16, {0xad, 0x82, 0xfc, 0x8f, 0x82, 0xa3, 0xe0, 0x60, 0x0f, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c} }, -{ 0x89e0, 16, {0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0x80, 0x11, 0xae, 0x04, 0xaf, 0x05, 0xef, 0x24, 0x04, 0xf5} }, -{ 0x89f0, 11, {0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54, 0xfd, 0xf0, 0x7f, 0x00} }, -{ 0x89fb, 1, {0x22} }, -{ 0x89fc, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34, 0x1f} }, -{ 0x8a0c, 16, {0xad, 0x82, 0xfc, 0x8f, 0x82, 0xa3, 0xe0, 0x60, 0x0f, 0xed, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3c} }, -{ 0x8a1c, 16, {0xf5, 0x83, 0xe0, 0x44, 0x01, 0xf0, 0x80, 0x11, 0xae, 0x04, 0xaf, 0x05, 0xef, 0x24, 0x04, 0xf5} }, -{ 0x8a2c, 11, {0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54, 0xfe, 0xf0, 0x7f, 0x00} }, -{ 0x8a37, 1, {0x22} }, -{ 0x8a38, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0xf8, 0xf5, 0x82, 0xe4, 0x34, 0x1f} }, -{ 0x8a48, 16, {0xad, 0x82, 0xfc, 0x8f, 0x82, 0xa3, 0xe0, 0x60, 0x0d, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3, 0xa3} }, -{ 0x8a58, 16, {0xe0, 0x44, 0x40, 0xf0, 0x80, 0x0f, 0xae, 0x04, 0xaf, 0x05, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3} }, -{ 0x8a68, 7, {0xa3, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x00} }, -{ 0x8a6f, 1, {0x22} }, -{ 0x8a70, 4, {0x8e, 0x54, 0x8f, 0x55} }, -{ 0x8a74, 16, {0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0, 0xf5, 0x58, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x24, 0xfe, 0x60} }, -{ 0x8a84, 16, {0x16, 0x14, 0x60, 0x1f, 0x14, 0x60, 0x28, 0x24, 0x03, 0x70, 0x2e, 0x7e, 0x7e, 0x7f, 0x80, 0x75} }, -{ 0x8a94, 16, {0x56, 0x7e, 0x75, 0x57, 0x80, 0x80, 0x22, 0x7e, 0x7e, 0x7f, 0x00, 0x75, 0x56, 0x7e, 0x75, 0x57} }, -{ 0x8aa4, 16, {0x00, 0x80, 0x16, 0x7e, 0x7d, 0x7f, 0x80, 0x75, 0x56, 0x7d, 0x75, 0x57, 0x80, 0x80, 0x0a, 0x7e} }, -{ 0x8ab4, 16, {0x7d, 0x7f, 0x00, 0x75, 0x56, 0x7d, 0x75, 0x57, 0x00, 0xe5, 0x58, 0x70, 0x20, 0x85, 0x57, 0x82} }, -{ 0x8ac4, 16, {0x85, 0x56, 0x83, 0x74, 0xff, 0xf0, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xe0, 0x25, 0xe0, 0x24} }, -{ 0x8ad4, 16, {0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74, 0x01, 0xf0, 0x80, 0x4d, 0xe5, 0x55, 0x24} }, -{ 0x8ae4, 16, {0x02, 0xff, 0xe4, 0x35, 0x54, 0xfe, 0xe5, 0x58, 0x60, 0x23, 0x0f, 0xef, 0xac, 0x06, 0x70, 0x01} }, -{ 0x8af4, 16, {0x0e, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe0, 0xfd, 0x05, 0x57, 0xe5, 0x57, 0xaa, 0x56, 0x70, 0x02} }, -{ 0x8b04, 16, {0x05, 0x56, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0, 0x15, 0x58, 0x80, 0xd9, 0x85, 0x55, 0x82} }, -{ 0x8b14, 16, {0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xe0, 0x25, 0xe0, 0x24} }, -{ 0x8b24, 12, {0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x7f, 0x00} }, -{ 0x8b30, 1, {0x22} }, -{ 0x8b31, 16, {0xef, 0x24, 0x05, 0xf5, 0x55, 0xe4, 0x3e, 0xf5, 0x54, 0x90, 0x01, 0x35, 0x74, 0x07, 0xf0, 0x90} }, -{ 0x8b41, 16, {0x01, 0x7a, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x36, 0xf0, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3} }, -{ 0x8b51, 16, {0xa3, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0x8e, 0x56, 0xf5, 0x57, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83} }, -{ 0x8b61, 16, {0xe0, 0x24, 0x9e, 0x60, 0x61, 0x24, 0xf9, 0x60, 0x0e, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8c, 0x12} }, -{ 0x8b71, 16, {0x24, 0x14, 0x60, 0x03, 0x02, 0x8c, 0x5e, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe} }, -{ 0x8b81, 16, {0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f, 0xf5, 0x59, 0x74, 0x01, 0x9e, 0xf5, 0x58, 0xd3, 0xe5, 0x59} }, -{ 0x8b91, 16, {0x94, 0x40, 0xe5, 0x58, 0x94, 0x00, 0x40, 0x06, 0x75, 0x58, 0x00, 0x75, 0x59, 0x40, 0xd3, 0xe5} }, -{ 0x8ba1, 16, {0x57, 0x95, 0x59, 0xe5, 0x56, 0x95, 0x58, 0x50, 0x03, 0x02, 0x8c, 0x61, 0xae, 0x58, 0xaf, 0x59} }, -{ 0x8bb1, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e} }, -{ 0x8bc1, 16, {0x56, 0xf5, 0x57, 0x02, 0x8c, 0x61, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3} }, -{ 0x8bd1, 16, {0xe0, 0xff, 0xc3, 0x74, 0x30, 0x9f, 0xf5, 0x59, 0xe4, 0x9e, 0xf5, 0x58, 0xd3, 0xe5, 0x59, 0x94} }, -{ 0x8be1, 16, {0x10, 0xe5, 0x58, 0x94, 0x00, 0x40, 0x06, 0x75, 0x58, 0x00, 0x75, 0x59, 0x10, 0xd3, 0xe5, 0x57} }, -{ 0x8bf1, 16, {0x95, 0x59, 0xe5, 0x56, 0x95, 0x58, 0x40, 0x68, 0xae, 0x58, 0xaf, 0x59, 0x85, 0x55, 0x82, 0x85} }, -{ 0x8c01, 16, {0x54, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x56, 0xf5, 0x57, 0x80} }, -{ 0x8c11, 16, {0x4f, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f} }, -{ 0x8c21, 16, {0xf5, 0x59, 0xe4, 0x9e, 0xf5, 0x58, 0x45, 0x59, 0x60, 0x0b, 0xd3, 0xe5, 0x59, 0x94, 0x40, 0xe5} }, -{ 0x8c31, 16, {0x58, 0x94, 0x00, 0x40, 0x06, 0x75, 0x58, 0x00, 0x75, 0x59, 0x40, 0xd3, 0xe5, 0x57, 0x95, 0x59} }, -{ 0x8c41, 16, {0xe5, 0x56, 0x95, 0x58, 0x40, 0x17, 0xae, 0x58, 0xaf, 0x59, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83} }, -{ 0x8c51, 16, {0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x56, 0xf5, 0x57, 0x7f, 0x01, 0x22} }, -{ 0x8c61, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xe0, 0x24, 0x9e, 0x70, 0x03, 0x02, 0x8d, 0x21, 0x24, 0xf9} }, -{ 0x8c71, 16, {0x60, 0x58, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8d, 0x71, 0x24, 0x14, 0x60, 0x03, 0x02, 0x8d, 0xb5} }, -{ 0x8c81, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xd3, 0x94, 0xff, 0xee} }, -{ 0x8c91, 16, {0x94, 0x00, 0x40, 0x03, 0x02, 0x8d, 0xb5, 0x90, 0x01, 0x75, 0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57} }, -{ 0x8ca1, 16, {0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e, 0x70, 0x03, 0x02, 0x8d, 0xb5, 0x90, 0x01, 0x75, 0xe0} }, -{ 0x8cb1, 16, {0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9b} }, -{ 0x8cc1, 16, {0xce, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83} }, -{ 0x8cd1, 16, {0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x80, 0xee, 0x94, 0x00, 0x50, 0x03, 0x02, 0x8d} }, -{ 0x8ce1, 16, {0xb5, 0xd3, 0xef, 0x94, 0xff, 0xee, 0x94, 0x00, 0x40, 0x03, 0x02, 0x8d, 0xb5, 0x90, 0x01, 0x76} }, -{ 0x8cf1, 16, {0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57, 0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e, 0x70, 0x03, 0x02} }, -{ 0x8d01, 16, {0x8d, 0xb5, 0x90, 0x01, 0x76, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a} }, -{ 0x8d11, 16, {0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9b, 0xce, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2} }, -{ 0x8d21, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x20, 0xee} }, -{ 0x8d31, 16, {0x94, 0x00, 0x50, 0x03, 0x02, 0x8d, 0xb5, 0xd3, 0xef, 0x94, 0x2f, 0xee, 0x94, 0x00, 0x50, 0x74} }, -{ 0x8d41, 16, {0x90, 0x01, 0x77, 0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57, 0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e} }, -{ 0x8d51, 16, {0x60, 0x62, 0x90, 0x01, 0x77, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a} }, -{ 0x8d61, 16, {0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9b, 0xce, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd5} }, -{ 0x8d71, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0xa3, 0xe0, 0x90, 0x01, 0x78, 0xcf, 0xf0} }, -{ 0x8d81, 16, {0xa3, 0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57, 0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e, 0x60, 0x24} }, -{ 0x8d91, 16, {0x90, 0x01, 0x78, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9b, 0xce, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0} }, -{ 0x8da1, 16, {0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9b, 0xce, 0x85, 0xf0, 0x82, 0xf5, 0x83} }, -{ 0x8db1, 16, {0xef, 0xf0, 0x80, 0xcf, 0x7e, 0x01, 0x7f, 0x35, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xa3} }, -{ 0x8dc1, 16, {0xa3, 0xe0, 0xa3, 0xe0, 0x04, 0xfd, 0x75, 0x60, 0x00, 0x75, 0x5f, 0x00, 0x75, 0x5e, 0x00, 0x75} }, -{ 0x8dd1, 7, {0x5d, 0x00, 0x12, 0x8e, 0x0c, 0x7f, 0x00} }, -{ 0x8dd8, 1, {0x22} }, -{ 0x8dd9, 16, {0x8e, 0x61, 0x8f, 0x62, 0x8c, 0x63, 0x8d, 0x64, 0xaf, 0x03, 0x1b, 0xef, 0x60, 0x24, 0x05, 0x62} }, -{ 0x8de9, 16, {0xe5, 0x62, 0xae, 0x61, 0x70, 0x02, 0x05, 0x61, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05} }, -{ 0x8df9, 16, {0x64, 0xe5, 0x64, 0xac, 0x63, 0x70, 0x02, 0x05, 0x63, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} }, -{ 0x8e09, 3, {0x80, 0xd6, 0x22} }, -{ 0x8e0c, 16, {0x8d, 0x5c, 0xab, 0x07, 0xaa, 0x06, 0xaf, 0x60, 0xae, 0x5f, 0xad, 0x5e, 0xac, 0x5d, 0xec, 0x4d} }, -{ 0x8e1c, 16, {0x4e, 0x4f, 0x60, 0x1c, 0x90, 0x7f, 0xc2, 0xe0, 0x30, 0xe1, 0x1c, 0x7f, 0xff, 0x7e, 0xff, 0x7d} }, -{ 0x8e2c, 16, {0xff, 0x7c, 0xff, 0x78, 0x5d, 0x12, 0x9d, 0x0e, 0xec, 0x4d, 0x4e, 0x4f, 0x60, 0x09, 0x80, 0xe4} }, -{ 0x8e3c, 16, {0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0xf9, 0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x16, 0xaf, 0x03} }, -{ 0x8e4c, 16, {0xae, 0x02, 0x7c, 0x7b, 0x7d, 0x80, 0xab, 0x5c, 0x12, 0x8d, 0xd9, 0x90, 0x7f, 0xc3, 0xe5, 0x5c} }, -{ 0x8e5c, 7, {0xf0, 0x7f, 0x01, 0x22, 0x7f, 0x00, 0x22} }, -{ 0x8e63, 16, {0x90, 0x01, 0x84, 0x74, 0x0b, 0xf0, 0x90, 0x20, 0x70, 0xe0, 0x54, 0xf0, 0xff, 0xc4, 0x54, 0x0f} }, -{ 0x8e73, 16, {0x90, 0x01, 0x85, 0xf0, 0x90, 0x11, 0xfd, 0xe4, 0x93, 0x90, 0x01, 0x86, 0xf0, 0x90, 0x11, 0xfe} }, -{ 0x8e83, 16, {0xe4, 0x93, 0x90, 0x01, 0x87, 0xf0, 0xe4, 0x90, 0x01, 0x7c, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3} }, -{ 0x8e93, 16, {0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x88, 0xf0, 0x7e} }, -{ 0x8ea3, 16, {0x01, 0x7f, 0x7c, 0x12, 0x19, 0xc1, 0x7e, 0x01, 0x7f, 0x84, 0x75, 0x60, 0x00, 0x75, 0x5f, 0x00} }, -{ 0x8eb3, 13, {0x75, 0x5e, 0x00, 0x75, 0x5d, 0x00, 0x7d, 0x14, 0x12, 0x8e, 0x0c, 0x7f, 0x00} }, -{ 0x8ec0, 1, {0x22} }, -{ 0x8ec1, 4, {0x8e, 0x4b, 0x8f, 0x4c} }, -{ 0x8ec5, 16, {0x85, 0x4b, 0x4e, 0x85, 0x4c, 0x4f, 0xe5, 0x4f, 0x24, 0x01, 0xf5, 0x53, 0xe4, 0x35, 0x4e, 0xf5} }, -{ 0x8ed5, 16, {0x52, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xe0, 0x14, 0xb4, 0x0f, 0x00, 0x40, 0x03, 0x02, 0x8f} }, -{ 0x8ee5, 16, {0xd6, 0x90, 0x8e, 0xed, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x8f, 0x1a, 0x02, 0x8f, 0x26, 0x02, 0x8f} }, -{ 0x8ef5, 16, {0x32, 0x02, 0x8f, 0x5c, 0x02, 0x8f, 0x67, 0x02, 0x8f, 0x72, 0x02, 0x8f, 0x7d, 0x02, 0x8f, 0x88} }, -{ 0x8f05, 16, {0x02, 0x8f, 0x93, 0x02, 0x8f, 0x9e, 0x02, 0x8f, 0xa9, 0x02, 0x8f, 0xb0, 0x02, 0x8f, 0xd6, 0x02} }, -{ 0x8f15, 16, {0x8f, 0xbb, 0x02, 0x8f, 0xc6, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x83, 0x5f, 0x8f, 0x4d, 0x02, 0x8f} }, -{ 0x8f25, 16, {0xd6, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x84, 0x33, 0x8f, 0x4d, 0x02, 0x8f, 0xd6, 0x85, 0x52, 0x50} }, -{ 0x8f35, 16, {0x85, 0x53, 0x51, 0xe5, 0x51, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x50, 0xfe, 0x12, 0x85, 0x08, 0xaf} }, -{ 0x8f45, 16, {0x51, 0xae, 0x50, 0x12, 0x85, 0x9b, 0xef, 0x70, 0x03, 0x02, 0x8f, 0xd6, 0xaf, 0x51, 0xae, 0x50} }, -{ 0x8f55, 16, {0x12, 0x85, 0xe1, 0x8f, 0x4d, 0x80, 0x7a, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x89, 0xc0, 0x8f, 0x4d} }, -{ 0x8f65, 16, {0x80, 0x6f, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x89, 0xfc, 0x8f, 0x4d, 0x80, 0x64, 0xaf, 0x53, 0xae} }, -{ 0x8f75, 16, {0x52, 0x12, 0x8a, 0x38, 0x8f, 0x4d, 0x80, 0x59, 0xaf, 0x4c, 0xae, 0x4b, 0x12, 0x8b, 0x31, 0x8f} }, -{ 0x8f85, 16, {0x4d, 0x80, 0x4e, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x88, 0xef, 0x8f, 0x4d, 0x80, 0x43, 0xaf, 0x53} }, -{ 0x8f95, 16, {0xae, 0x52, 0x12, 0x84, 0xc4, 0x8f, 0x4d, 0x80, 0x38, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x89, 0x7b} }, -{ 0x8fa5, 16, {0x8f, 0x4d, 0x80, 0x2d, 0x12, 0x8e, 0x63, 0x8f, 0x4d, 0x80, 0x26, 0xaf, 0x53, 0xae, 0x52, 0x12} }, -{ 0x8fb5, 16, {0x11, 0xe5, 0x8f, 0x4d, 0x80, 0x1b, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x8a, 0x70, 0x8f, 0x4d, 0x80} }, -{ 0x8fc5, 16, {0x10, 0xaf, 0x4c, 0xae, 0x4b, 0x7c, 0x02, 0x7d, 0xaf, 0x7b, 0x40, 0x12, 0x8d, 0xd9, 0xe4, 0xf5} }, -{ 0x8fd5, 16, {0x4d, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xe0, 0xff, 0x14, 0x24, 0xfa, 0x50, 0x04, 0x24, 0xfe} }, -{ 0x8fe5, 16, {0x70, 0x2b, 0x90, 0x01, 0x98, 0x74, 0x10, 0xf0, 0xa3, 0xef, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52} }, -{ 0x8ff5, 16, {0x83, 0xe0, 0x90, 0x01, 0x9a, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x75, 0x60, 0x00, 0x75, 0x5f, 0x00} }, -{ 0x9005, 15, {0x75, 0x5e, 0x00, 0x75, 0x5d, 0x00, 0x7d, 0x03, 0x12, 0x8e, 0x0c, 0x8f, 0x4d, 0xaf, 0x4d} }, -{ 0x9014, 1, {0x22} }, -{ 0x9015, 8, {0x8f, 0x4e, 0x8e, 0x4d, 0x8d, 0x4c, 0x8c, 0x4b} }, -{ 0x901d, 16, {0x75, 0x55, 0x01, 0x75, 0x56, 0x9c, 0xe4, 0xf5, 0x54, 0xaf, 0x50, 0x15, 0x50, 0xef, 0x70, 0x03} }, -{ 0x902d, 16, {0x02, 0x90, 0xb3, 0xaf, 0x4f, 0xe4, 0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xaf, 0x4e} }, -{ 0x903d, 16, {0xae, 0x4d, 0xad, 0x4c, 0xac, 0x4b, 0x12, 0x9c, 0x58, 0xaf, 0x03, 0x8f, 0x53, 0xaf, 0x4e, 0xae} }, -{ 0x904d, 16, {0x4d, 0xad, 0x4c, 0xac, 0x4b, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0xaf, 0x4f, 0xe4} }, -{ 0x905d, 16, {0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04} }, -{ 0x906d, 16, {0x12, 0x9c, 0x58, 0x8f, 0x4e, 0x8e, 0x4d, 0x8d, 0x4c, 0x8c, 0x4b, 0xe5, 0x53, 0x24, 0x30, 0xf5} }, -{ 0x907d, 16, {0x53, 0xd3, 0x94, 0x39, 0x40, 0x06, 0x74, 0x07, 0x25, 0x53, 0xf5, 0x53, 0x05, 0x56, 0xe5, 0x56} }, -{ 0x908d, 16, {0xae, 0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x05, 0x56, 0xe5} }, -{ 0x909d, 16, {0x56, 0xae, 0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x53, 0xf0, 0x05} }, -{ 0x90ad, 16, {0x54, 0x05, 0x54, 0x02, 0x90, 0x26, 0xe5, 0x56, 0x15, 0x56, 0x70, 0x02, 0x15, 0x55, 0xaf, 0x54} }, -{ 0x90bd, 16, {0x15, 0x54, 0xef, 0x60, 0x23, 0xe5, 0x56, 0x15, 0x56, 0xae, 0x55, 0x70, 0x02, 0x15, 0x55, 0xf5} }, -{ 0x90cd, 16, {0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05, 0x52, 0xe5, 0x52, 0xac, 0x51, 0x70, 0x02, 0x05, 0x51, 0x14} }, -{ 0x90dd, 8, {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x80, 0xd6} }, -{ 0x90e5, 1, {0x22} }, -{ 0x90e6, 16, {0xe4, 0x90, 0x01, 0xc9, 0xf0, 0x7e, 0x01, 0x7f, 0xca, 0x90, 0x01, 0xbe, 0xee, 0xf0, 0xa3, 0xef} }, -{ 0x90f6, 10, {0xf0, 0x90, 0x01, 0xc2, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} }, -{ 0x9100, 16, {0xaa, 0x07, 0xa9, 0x05, 0x90, 0x01, 0xc9, 0xe0, 0xc3, 0x94, 0x40, 0x50, 0x61, 0xac, 0x02, 0x74} }, -{ 0x9110, 16, {0x01, 0x7e, 0x00, 0xa8, 0x04, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff} }, -{ 0x9120, 16, {0xe4, 0xef, 0x55, 0x30, 0x60, 0x45, 0xea, 0x04, 0xff, 0x90, 0x01, 0xc2, 0xe0, 0xfc, 0xa3, 0xe0} }, -{ 0x9130, 16, {0xfd, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0xa3, 0xe9, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} }, -{ 0x9140, 16, {0xeb, 0xf0, 0x90, 0x01, 0xc2, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x9b, 0xb8, 0xfc, 0xd3, 0xe5, 0xf0} }, -{ 0x9150, 16, {0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xc2, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} }, -{ 0x9160, 16, {0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x04, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} }, -{ 0x9170, 1, {0x22} }, -{ 0x9171, 16, {0x90, 0x01, 0xc9, 0xe0, 0xd3, 0x94, 0x00, 0x40, 0x55, 0x90, 0x01, 0xbe, 0xe0, 0xfc, 0xa3, 0xe0} }, -{ 0x9181, 16, {0xaa, 0x04, 0xf9, 0x7b, 0x01, 0xc0, 0x03, 0xc0, 0x02, 0xc0, 0x01, 0xaa, 0x06, 0xa9, 0x07, 0xa8} }, -{ 0x9191, 16, {0x01, 0xac, 0x02, 0xad, 0x03, 0xd0, 0x01, 0xd0, 0x02, 0xd0, 0x03, 0x7e, 0x00, 0x7f, 0x03, 0x12} }, -{ 0x91a1, 16, {0x9b, 0x49, 0x90, 0x01, 0xbe, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x9b, 0xb8, 0xfc, 0xd3, 0xe5, 0xf0} }, -{ 0x91b1, 16, {0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xbe, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} }, -{ 0x91c1, 16, {0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x14, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} }, -{ 0x91d1, 1, {0x22} }, -{ 0x91d2, 16, {0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x5e, 0x7e, 0x7b, 0x7f, 0x80, 0x75, 0x50, 0x7b, 0x75, 0x51} }, -{ 0x91e2, 16, {0x80, 0xe5, 0x51, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x50, 0xa9, 0x07, 0x7b, 0x01, 0x8b, 0x52, 0xf5} }, -{ 0x91f2, 16, {0x53, 0x89, 0x54, 0xfe, 0x12, 0x91, 0x71, 0xef, 0x60, 0x3b, 0xab, 0x52, 0xaa, 0x53, 0xa9, 0x54} }, -{ 0x9202, 16, {0x12, 0x9b, 0x72, 0x14, 0xff, 0x90, 0x00, 0x01, 0x12, 0x9b, 0x8b, 0xb4, 0x02, 0x16, 0xc2, 0xaf} }, -{ 0x9212, 16, {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x44} }, -{ 0x9222, 16, {0x04, 0xf0, 0xd2, 0xaf, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0x74, 0x0d, 0xf0, 0x90, 0x7f, 0xc3} }, -{ 0x9232, 5, {0x74, 0x04, 0xf0, 0xd2, 0xaf} }, -{ 0x9237, 1, {0x22} }, -{ 0x9238, 16, {0x12, 0x91, 0xd2, 0xe4, 0xf5, 0x4b, 0x74, 0x36, 0x25, 0x4b, 0xf8, 0xe6, 0x54, 0xf0, 0xf5, 0x4c} }, -{ 0x9248, 16, {0x74, 0xc5, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83, 0xe0, 0x65, 0x4c, 0xff, 0xc4} }, -{ 0x9258, 16, {0x54, 0x0f, 0xf5, 0x4d, 0x60, 0x22, 0x74, 0xc5, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5} }, -{ 0x9268, 16, {0x83, 0xe5, 0x4c, 0xf0, 0xaf, 0x4b, 0x7d, 0x01, 0xe5, 0x4c, 0x45, 0x4d, 0xfb, 0x12, 0x91, 0x00} }, -{ 0x9278, 16, {0xef, 0x70, 0x05, 0x12, 0x91, 0xd2, 0x80, 0xec, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40} }, -{ 0x9288, 16, {0xb5, 0x12, 0x91, 0xd2, 0xe5, 0x3a, 0x60, 0x48, 0xe4, 0xf5, 0x4b, 0xaf, 0x4b, 0x74, 0x01, 0xa8} }, -{ 0x9298, 16, {0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4c, 0x55, 0x3a, 0x60, 0x29, 0xe5, 0x4b} }, -{ 0x92a8, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x30, 0xe6} }, -{ 0x92b8, 16, {0x16, 0xaf, 0x4b, 0x7d, 0x04, 0x7b, 0x80, 0x12, 0x91, 0x00, 0xef, 0x70, 0x05, 0x12, 0x91, 0xd2} }, -{ 0x92c8, 16, {0x80, 0xef, 0xe5, 0x4c, 0xf4, 0x52, 0x3a, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40, 0xbb} }, -{ 0x92d8, 16, {0x90, 0x03, 0x00, 0xe0, 0x60, 0x03, 0x02, 0x93, 0xa5, 0x74, 0x19, 0xf0, 0x7f, 0x02, 0x12, 0x81} }, -{ 0x92e8, 16, {0x11, 0x8e, 0x4e, 0x8f, 0x4f, 0xc3, 0xe5, 0x4e, 0x64, 0x80, 0x94, 0x80, 0x40, 0xee, 0x90, 0x01} }, -{ 0x92f8, 16, {0xbc, 0xe0, 0x65, 0x4f, 0xf0, 0x60, 0x37, 0xe4, 0xf5, 0x4b, 0xaf, 0x4b, 0x74, 0x01, 0xa8, 0x07} }, -{ 0x9308, 16, {0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4c, 0x90, 0x01, 0xbc, 0xe0, 0x55, 0x4c, 0x60} }, -{ 0x9318, 16, {0x14, 0xaf, 0x4b, 0x7d, 0x08, 0xe5, 0x4c, 0x55, 0x4f, 0xfb, 0x12, 0x91, 0x00, 0xef, 0x70, 0x05} }, -{ 0x9328, 16, {0x12, 0x91, 0xd2, 0x80, 0xec, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40, 0xcc, 0x90, 0x01} }, -{ 0x9338, 16, {0xbc, 0xe5, 0x4f, 0xf0, 0xe4, 0xf5, 0x4b, 0xc2, 0xaf, 0x74, 0x32, 0x25, 0x4b, 0xf8, 0xe6, 0xf5} }, -{ 0x9348, 16, {0x4c, 0xe4, 0xf6, 0xd2, 0xaf, 0x53, 0x4c, 0x1e, 0xe5, 0x4c, 0x60, 0x11, 0xaf, 0x4b, 0x7d, 0x02} }, -{ 0x9358, 16, {0xab, 0x4c, 0x12, 0x91, 0x00, 0xef, 0x70, 0x05, 0x12, 0x91, 0xd2, 0x80, 0xef, 0x74, 0x2c, 0x25} }, -{ 0x9368, 16, {0x4b, 0xf8, 0xe6, 0xf5, 0x4c, 0x74, 0xfc, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83} }, -{ 0x9378, 16, {0xe0, 0x65, 0x4c, 0x60, 0x11, 0xaf, 0x4b, 0x7d, 0x04, 0xab, 0x4c, 0x12, 0x91, 0x00, 0xef, 0x70} }, -{ 0x9388, 16, {0x05, 0x12, 0x91, 0xd2, 0x80, 0xef, 0x74, 0xfc, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5} }, -{ 0x9398, 16, {0x83, 0xe5, 0x4c, 0xf0, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40, 0x9a, 0x12, 0x91, 0xd2} }, -{ 0x93a8, 1, {0x22} }, -{ 0x93a9, 12, {0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x64, 0x02, 0x93, 0xf0} }, -{ 0x93b5, 16, {0x02, 0x05, 0xa3, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2} }, -{ 0x93c5, 16, {0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33} }, -{ 0x93d5, 16, {0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf} }, -{ 0x93e5, 16, {0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x94, 0x35, 0xe4, 0x7e} }, -{ 0x93f5, 16, {0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93} }, -{ 0x9405, 16, {0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3} }, -{ 0x9415, 16, {0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca} }, -{ 0x9425, 16, {0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe} }, -{ 0x9435, 16, {0x60, 0x24, 0x02, 0x8a, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x81, 0x82, 0x84, 0x88} }, -{ 0x9445, 16, {0x90, 0xa0, 0xc0, 0xc1, 0xc2, 0xc4, 0xc8, 0xd0, 0xe0, 0xe1, 0xe2, 0xe4, 0xe8, 0xf0, 0xf1, 0xf2} }, -{ 0x9455, 8, {0xf4, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xfe, 0xff} }, -{ 0x945d, 1, {0x00} }, -{ 0x945e, 11, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x18} }, -{ 0x9469, 16, {0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xfe, 0x30, 0xe0, 0x05, 0x90, 0x20, 0x02, 0xe0, 0xff, 0xee} }, -{ 0x9479, 16, {0x30, 0xe1, 0x05, 0x90, 0x20, 0x0a, 0xe0, 0xff, 0xee, 0x30, 0xe2, 0x05, 0x90, 0x20, 0x12, 0xe0} }, -{ 0x9489, 16, {0xff, 0xee, 0x30, 0xe3, 0x05, 0x90, 0x20, 0x1a, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x1e} }, -{ 0x9499, 10, {0x04, 0xe4, 0xf0, 0x80, 0x05, 0x90, 0x01, 0xc4, 0xee, 0xf0} }, -{ 0x94a3, 9, {0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} }, -{ 0x94ac, 2, {0xa9, 0x03} }, -{ 0x94ae, 16, {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xe5} }, -{ 0x94be, 16, {0x57, 0x45, 0x58, 0xf5, 0x59, 0xe9, 0x60, 0x14, 0x8a, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82} }, -{ 0x94ce, 16, {0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x4d, 0xf0, 0xe4, 0xfe, 0x80, 0x13, 0xeb, 0x24, 0x04, 0xf5} }, -{ 0x94de, 16, {0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0xff, 0xed, 0xf4, 0xfc, 0xef, 0x5c, 0xf0, 0xae, 0x59, 0xeb} }, -{ 0x94ee, 16, {0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0x55, 0x59, 0xfc, 0xb5, 0x06, 0x03, 0xaf} }, -{ 0x94fe, 16, {0x05, 0x22, 0xe5, 0x57, 0x5c, 0xfe, 0xe5, 0x58, 0x5c, 0xfd, 0xe9, 0x60, 0x16, 0xee, 0x70, 0x04} }, -{ 0x950e, 16, {0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xae, 0x07, 0xed, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f} }, -{ 0x951e, 16, {0x00, 0xad, 0x07, 0xee, 0x60, 0x03, 0xaf, 0x57, 0x22, 0xed, 0x60, 0x03, 0xaf, 0x58, 0x22, 0x7f} }, -{ 0x952e, 1, {0x00} }, -{ 0x952f, 1, {0x22} }, -{ 0x9530, 16, {0x75, 0x50, 0x02, 0x75, 0x51, 0xb0, 0x90, 0x03, 0x35, 0x74, 0x0f, 0xf0, 0x85, 0x51, 0x82, 0x85} }, -{ 0x9540, 16, {0x50, 0x83, 0xe0, 0xff, 0x90, 0x03, 0x36, 0xf0, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xa3, 0xe0} }, -{ 0x9550, 16, {0x90, 0x03, 0x37, 0xf0, 0xa3, 0x74, 0xff, 0xf0, 0x75, 0x52, 0x03, 0x75, 0x53, 0x39, 0xef, 0x14} }, -{ 0x9560, 16, {0xb4, 0x0b, 0x00, 0x40, 0x03, 0x02, 0x99, 0x98, 0x90, 0x95, 0x6f, 0xf8, 0x28, 0x28, 0x73, 0x02} }, -{ 0x9570, 16, {0x95, 0x90, 0x02, 0x96, 0x2f, 0x02, 0x97, 0x34, 0x02, 0x97, 0x54, 0x02, 0x97, 0x54, 0x02, 0x97} }, -{ 0x9580, 16, {0xef, 0x02, 0x98, 0x2a, 0x02, 0x98, 0x4f, 0x02, 0x99, 0x0d, 0x02, 0x99, 0x39, 0x02, 0x99, 0x65} }, -{ 0x9590, 16, {0xe4, 0xf5, 0x4b, 0xe5, 0x4b, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20} }, -{ 0x95a0, 16, {0xaf, 0x82, 0xf5, 0x4e, 0x8f, 0x4f, 0xe4, 0xff, 0xe4, 0xfe, 0xef, 0x60, 0x10, 0x74, 0x8a, 0x2e} }, -{ 0x95b0, 16, {0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf4, 0xf5, 0x4c, 0x80, 0x0d, 0x74, 0x8a, 0x2e} }, -{ 0x95c0, 16, {0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf5, 0x4c, 0xe5, 0x4f, 0x24, 0x07, 0xf5, 0x82} }, -{ 0x95d0, 16, {0xe4, 0x35, 0x4e, 0xf5, 0x83, 0xe5, 0x4c, 0xf0, 0xe0, 0xf5, 0x4d, 0x65, 0x4c, 0x60, 0x38, 0xe4} }, -{ 0x95e0, 16, {0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04, 0xfd, 0x05, 0x53, 0xe5, 0x53, 0xaa, 0x52, 0x70, 0x02} }, -{ 0x95f0, 16, {0x05, 0x52, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0, 0x05, 0x53, 0xe5, 0x53, 0xac, 0x52, 0x70} }, -{ 0x9600, 16, {0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe5, 0x4c, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52} }, -{ 0x9610, 16, {0x83, 0xe5, 0x4d, 0xf0, 0x02, 0x99, 0x9e, 0x0e, 0xbe, 0x24, 0x8f, 0x0f, 0xef, 0x64, 0x02, 0x70} }, -{ 0x9620, 16, {0x87, 0x05, 0x4b, 0xe5, 0x4b, 0x64, 0x04, 0x60, 0x03, 0x02, 0x95, 0x93, 0x02, 0x99, 0x9e, 0xe4} }, -{ 0x9630, 16, {0xf5, 0x4b, 0xaf, 0x4b, 0xe4, 0xfd, 0x12, 0x82, 0x50, 0x05, 0x4b, 0xe5, 0x4b, 0xd3, 0x94, 0x03} }, -{ 0x9640, 16, {0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x94, 0xf0, 0xa3, 0x74, 0x5e, 0xf0, 0xe4, 0xf5, 0x4d, 0x7e} }, -{ 0x9650, 16, {0x20, 0x7f, 0x00, 0x75, 0x4e, 0x20, 0x75, 0x4f, 0x00, 0xf5, 0x4b, 0xaf, 0x4b, 0x74, 0x01, 0xa8} }, -{ 0x9660, 16, {0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4c, 0x90, 0x01, 0xc4, 0xf0, 0x90, 0x01} }, -{ 0x9670, 16, {0xc0, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xa3, 0x74, 0x02} }, -{ 0x9680, 16, {0xf0, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x4c, 0x34, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0} }, -{ 0x9690, 16, {0x70, 0xef, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04, 0xff, 0x05, 0x53, 0xe5, 0x53, 0xac, 0x52} }, -{ 0x96a0, 16, {0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52} }, -{ 0x96b0, 16, {0x83, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x01, 0xc4, 0xf0, 0x75, 0x4d, 0xff, 0x90, 0x01, 0xc4, 0xe0} }, -{ 0x96c0, 16, {0xff, 0x60, 0x37, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04, 0xfe, 0x05, 0x53, 0xe5, 0x53} }, -{ 0x96d0, 16, {0xac, 0x52, 0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xee, 0xf0, 0x05, 0x53, 0xe5} }, -{ 0x96e0, 16, {0x53, 0xac, 0x52, 0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x53} }, -{ 0x96f0, 16, {0x82, 0x85, 0x52, 0x83, 0xe5, 0x4c, 0xf0, 0x75, 0x4d, 0xff, 0xe5, 0x4d, 0x70, 0x16, 0x74, 0x08} }, -{ 0x9700, 16, {0x25, 0x4f, 0xf5, 0x4f, 0xe4, 0x35, 0x4e, 0xf5, 0x4e, 0x05, 0x4b, 0xe5, 0x4b, 0x64, 0x04, 0x60} }, -{ 0x9710, 16, {0x03, 0x02, 0x96, 0x5b, 0xe4, 0xf5, 0x4b, 0xaf, 0x4b, 0x7d, 0x01, 0x12, 0x82, 0x50, 0x05, 0x4b} }, -{ 0x9720, 16, {0xe5, 0x4b, 0xd3, 0x94, 0x03, 0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x13, 0xf0, 0xa3, 0x74, 0x12} }, -{ 0x9730, 16, {0xf0, 0x02, 0x99, 0x9e, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xa3, 0xe0, 0x14, 0xff, 0x74, 0x01} }, -{ 0x9740, 16, {0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x90, 0x02, 0xf7, 0xf0, 0x90, 0x01, 0xc4} }, -{ 0x9750, 16, {0xf0, 0x02, 0x99, 0x9e, 0x90, 0x01, 0xc0, 0x74, 0x03, 0xf0, 0xa3, 0x74, 0xe8, 0xf0, 0xe4, 0xf5} }, -{ 0x9760, 16, {0x4d, 0x90, 0x02, 0xf7, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x07, 0x19, 0x90, 0x01, 0xc0} }, -{ 0x9770, 16, {0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xea, 0x90, 0x03, 0x38, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52} }, -{ 0x9780, 16, {0x83, 0x74, 0xff, 0xf0, 0xf5, 0x4d, 0xe5, 0x4d, 0x60, 0x03, 0x02, 0x99, 0x9e, 0x90, 0x01, 0xc0} }, -{ 0x9790, 16, {0xf0, 0xa3, 0x74, 0x96, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xf6, 0x7f} }, -{ 0x97a0, 16, {0x02, 0x12, 0x81, 0x11, 0xc3, 0xee, 0x64, 0x80, 0x94, 0x80, 0x40, 0xf3, 0xef, 0x54, 0x0f, 0xf5} }, -{ 0x97b0, 16, {0x4d, 0x90, 0x02, 0xf7, 0xe0, 0x55, 0x4d, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x8f} }, -{ 0x97c0, 16, {0x4c, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xe0, 0xb4, 0x05, 0x0c, 0xe5, 0x4c, 0x70, 0x04, 0x7f} }, -{ 0x97d0, 16, {0x01, 0x80, 0x02, 0x7f, 0x00, 0x8f, 0x4c, 0xe5, 0x4c, 0x70, 0x03, 0x02, 0x99, 0x9e, 0xe4, 0x90} }, -{ 0x97e0, 16, {0x03, 0x38, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52, 0x83, 0xe5, 0x4d, 0xf0, 0x02, 0x99, 0x9e, 0xe4} }, -{ 0x97f0, 16, {0xff, 0xfd, 0x12, 0x82, 0x50, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x4e, 0x20, 0x75, 0x4f, 0x00, 0x85} }, -{ 0x9800, 16, {0x4f, 0x82, 0x85, 0x4e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x80, 0xf0, 0x85, 0x4f, 0x82, 0x85} }, -{ 0x9810, 16, {0x4e, 0x83, 0x74, 0x01, 0xf0, 0xa3, 0xe4, 0xf0, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xa3, 0xa3} }, -{ 0x9820, 16, {0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0xd2, 0x04, 0x02, 0x99, 0x9e, 0xc2, 0x04, 0x7e, 0x20, 0x7f, 0x00} }, -{ 0x9830, 16, {0x75, 0x4e, 0x20, 0x75, 0x4f, 0x00, 0xe5, 0x4f, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x4e, 0xf5} }, -{ 0x9840, 16, {0x83, 0xe0, 0x30, 0xe6, 0xf1, 0xe4, 0xff, 0x7d, 0x01, 0x12, 0x82, 0x50, 0x02, 0x99, 0x9e, 0xe4} }, -{ 0x9850, 16, {0xf5, 0x4d, 0xf5, 0x4b, 0xaf, 0x4b, 0xe4, 0xfd, 0x12, 0x82, 0x50, 0xe5, 0x4b, 0x75, 0xf0, 0x08} }, -{ 0x9860, 16, {0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x4e, 0x8f, 0x4f, 0xf5, 0x83} }, -{ 0x9870, 16, {0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xaf} }, -{ 0x9880, 16, {0x4b, 0x7d, 0x01, 0x7b, 0x01, 0x75, 0x57, 0x80, 0x75, 0x58, 0x40, 0x12, 0x94, 0xac, 0x8f, 0x4d} }, -{ 0x9890, 16, {0xe5, 0x4d, 0x70, 0x11, 0xaf, 0x4b, 0x7d, 0x02, 0x7b, 0x01, 0x75, 0x57, 0x10, 0x75, 0x58, 0x20} }, -{ 0x98a0, 16, {0x12, 0x94, 0xac, 0x8f, 0x4d, 0xe5, 0x4d, 0x70, 0x10, 0xaf, 0x4b, 0x7d, 0x01, 0xfb, 0x75, 0x57} }, -{ 0x98b0, 16, {0x80, 0x75, 0x58, 0x40, 0x12, 0x94, 0xac, 0x8f, 0x4d, 0xe5, 0x4d, 0x70, 0x10, 0xaf, 0x4b, 0x7d} }, -{ 0x98c0, 16, {0x02, 0xfb, 0x75, 0x57, 0x10, 0x75, 0x58, 0x20, 0x12, 0x94, 0xac, 0x8f, 0x4d, 0xaf, 0x4b, 0x7d} }, -{ 0x98d0, 16, {0x01, 0x12, 0x82, 0x50, 0xe5, 0x4d, 0x60, 0x26, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04} }, -{ 0x98e0, 16, {0xff, 0x05, 0x53, 0xe5, 0x53, 0xac, 0x52, 0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83} }, -{ 0x98f0, 16, {0xef, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52, 0x83, 0xe5, 0x4d, 0xf0, 0x02, 0x99, 0x9e, 0x05, 0x4b} }, -{ 0x9900, 16, {0xe5, 0x4b, 0xd3, 0x94, 0x03, 0x50, 0x03, 0x02, 0x98, 0x54, 0x02, 0x99, 0x9e, 0xe4, 0x90, 0x03} }, -{ 0x9910, 16, {0x59, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74} }, -{ 0x9920, 16, {0x1b, 0xf0, 0xa3, 0x74, 0x29, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x80, 0x00, 0xef, 0x64, 0x08} }, -{ 0x9930, 16, {0x60, 0x6c, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x80, 0x65, 0xe4, 0x90, 0x03, 0x59, 0xf0, 0xa3, 0xf0} }, -{ 0x9940, 16, {0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0xe5, 0x52, 0xf0, 0xa3, 0xe5} }, -{ 0x9950, 16, {0x53, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x19, 0xc1, 0xef, 0x64, 0x08, 0x60, 0x40, 0xe4, 0x90} }, -{ 0x9960, 16, {0x03, 0x38, 0xf0, 0x80, 0x39, 0xe4, 0x90, 0x03, 0x59, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0} }, -{ 0x9970, 16, {0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xe5, 0x51, 0x24, 0x02, 0x90, 0x03, 0x60, 0xf0, 0xe4, 0x35} }, -{ 0x9980, 16, {0x50, 0x90, 0x03, 0x5f, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x80, 0x00, 0xef, 0x64, 0x08, 0x60} }, -{ 0x9990, 16, {0x0d, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x80, 0x06, 0x90, 0x03, 0x38, 0x74, 0x01, 0xf0, 0x90, 0x01} }, -{ 0x99a0, 16, {0xc0, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70} }, -{ 0x99b0, 16, {0xf6, 0x7e, 0x03, 0x7f, 0x35, 0x75, 0x60, 0x00, 0x75, 0x5f, 0x00, 0x75, 0x5e, 0x00, 0x75, 0x5d} }, -{ 0x99c0, 11, {0x00, 0x7d, 0x24, 0x12, 0x8e, 0x0c, 0xe4, 0x90, 0x02, 0xaf, 0xf0} }, -{ 0x99cb, 1, {0x22} }, -{ 0x99cc, 16, {0xe4, 0xff, 0x74, 0xf8, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x70, 0x03, 0x02} }, -{ 0x99dc, 16, {0x9a, 0x6f, 0x74, 0x36, 0x2f, 0xf8, 0xe6, 0x20, 0xe5, 0x03, 0x02, 0x9a, 0x6f, 0xef, 0x75, 0xf0} }, -{ 0x99ec, 16, {0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0xf5, 0x83, 0xe5, 0x82} }, -{ 0x99fc, 16, {0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0x60, 0x64, 0x60, 0x70, 0x63} }, -{ 0x9a0c, 16, {0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01} }, -{ 0x9a1c, 16, {0x12, 0x9b, 0xce, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0, 0x8d, 0x82, 0x8c, 0x83, 0xf0, 0x74, 0xf8} }, -{ 0x9a2c, 16, {0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x14, 0xf0, 0x70, 0x36, 0xef, 0x25, 0xe0} }, -{ 0x9a3c, 16, {0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0xef, 0x25, 0xe0, 0xfe, 0xc3} }, -{ 0x9a4c, 16, {0x74, 0x0c, 0x9e, 0x75, 0xf0, 0x40, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xad} }, -{ 0x9a5c, 16, {0x82, 0xfc, 0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xec, 0xf0} }, -{ 0x9a6c, 12, {0xa3, 0xed, 0xf0, 0x0f, 0xef, 0x64, 0x04, 0x60, 0x03, 0x02, 0x99, 0xce} }, -{ 0x9a78, 1, {0x22} }, -{ 0x9a79, 16, {0xe7, 0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e} }, -{ 0x9a89, 16, {0x88, 0x82, 0x8c, 0x83, 0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08} }, -{ 0x9a99, 16, {0xdf, 0xfa, 0x80, 0x78, 0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83} }, -{ 0x9aa9, 16, {0xe3, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08} }, -{ 0x9ab9, 16, {0xdf, 0xfa, 0x80, 0x58, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x4c} }, -{ 0x9ac9, 16, {0x80, 0xd2, 0x80, 0xfa, 0x80, 0xc6, 0x80, 0xd4, 0x80, 0x69, 0x80, 0xf2, 0x80, 0x33, 0x80, 0x10} }, -{ 0x9ad9, 16, {0x80, 0xa6, 0x80, 0xea, 0x80, 0x9a, 0x80, 0xa8, 0x80, 0xda, 0x80, 0xe2, 0x80, 0xca, 0x80, 0x33} }, -{ 0x9ae9, 16, {0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83} }, -{ 0x9af9, 16, {0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xe9, 0xde, 0xe7, 0x80} }, -{ 0x9b09, 16, {0x0d, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf6, 0x08, 0xdf, 0xf9, 0xec, 0xfa, 0xa9, 0xf0} }, -{ 0x9b19, 16, {0xed, 0xfb, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc} }, -{ 0x9b29, 16, {0xc5, 0x83, 0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xea, 0xde} }, -{ 0x9b39, 16, {0xe8, 0x80, 0xdb, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf2, 0x08, 0xdf, 0xf9, 0x80, 0xcc} }, -{ 0x9b49, 16, {0x88, 0xf0, 0xed, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xc2, 0xf5, 0x82, 0xeb, 0x24, 0x02, 0xb4} }, -{ 0x9b59, 16, {0x04, 0x00, 0x50, 0xb8, 0x23, 0x23, 0x45, 0x82, 0xf5, 0x82, 0xef, 0x4e, 0x60, 0xae, 0xef, 0x60} }, -{ 0x9b69, 9, {0x01, 0x0e, 0xe5, 0x82, 0x23, 0x90, 0x9a, 0xc9, 0x73} }, -{ 0x9b72, 16, {0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02} }, -{ 0x9b82, 9, {0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22} }, -{ 0x9b8b, 16, {0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50} }, -{ 0x9b9b, 16, {0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22} }, -{ 0x9bab, 13, {0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22} }, -{ 0x9bb8, 16, {0xc5, 0xf0, 0xf8, 0xa3, 0xe0, 0x28, 0xf0, 0xc5, 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02} }, -{ 0x9bc8, 6, {0x15, 0x83, 0xe0, 0x38, 0xf0, 0x22} }, -{ 0x9bce, 16, {0xa3, 0xf8, 0xe0, 0xc5, 0xf0, 0x25, 0xf0, 0xf0, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, 0x15, 0x83} }, -{ 0x9bde, 6, {0xe0, 0xc8, 0x38, 0xf0, 0xe8, 0x22} }, -{ 0x9be4, 16, {0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0} }, -{ 0x9bf4, 16, {0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe} }, -{ 0x9c04, 16, {0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83} }, -{ 0x9c14, 8, {0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22} }, -{ 0x9c1c, 16, {0x75, 0xf0, 0x08, 0x75, 0x82, 0x00, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xcd, 0x33, 0xcd, 0xcc} }, -{ 0x9c2c, 16, {0x33, 0xcc, 0xc5, 0x82, 0x33, 0xc5, 0x82, 0x9b, 0xed, 0x9a, 0xec, 0x99, 0xe5, 0x82, 0x98, 0x40} }, -{ 0x9c3c, 16, {0x0c, 0xf5, 0x82, 0xee, 0x9b, 0xfe, 0xed, 0x9a, 0xfd, 0xec, 0x99, 0xfc, 0x0f, 0xd5, 0xf0, 0xd6} }, -{ 0x9c4c, 16, {0xe4, 0xce, 0xfb, 0xe4, 0xcd, 0xfa, 0xe4, 0xcc, 0xf9, 0xa8, 0x82, 0x22, 0xb8, 0x00, 0xc1, 0xb9} }, -{ 0x9c5c, 16, {0x00, 0x59, 0xba, 0x00, 0x2d, 0xec, 0x8b, 0xf0, 0x84, 0xcf, 0xce, 0xcd, 0xfc, 0xe5, 0xf0, 0xcb} }, -{ 0x9c6c, 16, {0xf9, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc, 0xeb} }, -{ 0x9c7c, 16, {0x33, 0xfb, 0x10, 0xd7, 0x03, 0x99, 0x40, 0x04, 0xeb, 0x99, 0xfb, 0x0f, 0xd8, 0xe5, 0xe4, 0xf9} }, -{ 0x9c8c, 16, {0xfa, 0x22, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc} }, -{ 0x9c9c, 16, {0xc9, 0x33, 0xc9, 0x10, 0xd7, 0x05, 0x9b, 0xe9, 0x9a, 0x40, 0x07, 0xec, 0x9b, 0xfc, 0xe9, 0x9a} }, -{ 0x9cac, 16, {0xf9, 0x0f, 0xd8, 0xe0, 0xe4, 0xc9, 0xfa, 0xe4, 0xcc, 0xfb, 0x22, 0x75, 0xf0, 0x10, 0xef, 0x2f} }, -{ 0x9cbc, 16, {0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xcc, 0x33, 0xcc, 0xc8, 0x33, 0xc8, 0x10, 0xd7, 0x07} }, -{ 0x9ccc, 16, {0x9b, 0xec, 0x9a, 0xe8, 0x99, 0x40, 0x0a, 0xed, 0x9b, 0xfd, 0xec, 0x9a, 0xfc, 0xe8, 0x99, 0xf8} }, -{ 0x9cdc, 14, {0x0f, 0xd5, 0xf0, 0xda, 0xe4, 0xcd, 0xfb, 0xe4, 0xcc, 0xfa, 0xe4, 0xc8, 0xf9, 0x22} }, -{ 0x9cea, 16, {0xeb, 0x9f, 0xf5, 0xf0, 0xea, 0x9e, 0x42, 0xf0, 0xe9, 0x9d, 0x42, 0xf0, 0xe8, 0x9c, 0x45, 0xf0} }, -{ 0x9cfa, 1, {0x22} }, -{ 0x9cfb, 16, {0xe8, 0x60, 0x0f, 0xec, 0xc3, 0x13, 0xfc, 0xed, 0x13, 0xfd, 0xee, 0x13, 0xfe, 0xef, 0x13, 0xff} }, -{ 0x9d0b, 3, {0xd8, 0xf1, 0x22} }, -{ 0x9d0e, 16, {0x08, 0x08, 0x08, 0xe6, 0xcf, 0x2f, 0xf6, 0x18, 0xe6, 0xce, 0x3e, 0xf6, 0x18, 0xe6, 0xcd, 0x3d} }, -{ 0x9d1e, 7, {0xf6, 0x18, 0xe6, 0xcc, 0x3c, 0xf6, 0x22} }, -{ 0x9d25, 12, {0xec, 0xf0, 0xa3, 0xed, 0xf0, 0xa3, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} }, -{ 0x9d31, 16, {0xa8, 0x82, 0x85, 0x83, 0xf0, 0xd0, 0x83, 0xd0, 0x82, 0x12, 0x9d, 0x48, 0x12, 0x9d, 0x48, 0x12} }, -{ 0x9d41, 16, {0x9d, 0x48, 0x12, 0x9d, 0x48, 0xe4, 0x73, 0xe4, 0x93, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83} }, -{ 0x9d51, 16, {0xc8, 0xc5, 0x82, 0xc8, 0xf0, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83, 0xc8, 0xc5, 0x82, 0xc8} }, -{ 0x9d61, 1, {0x22} }, +{ 0x19c1, 4, {0x8e, 0x54, 0x8f, 0x55} }, +{ 0x19c5, 16, {0x75, 0x56, 0x03, 0xe5, 0x55, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xfe} }, +{ 0x19d5, 16, {0xa3, 0xe0, 0x4e, 0x70, 0x03, 0x02, 0x1a, 0xcf, 0xe5, 0x56, 0x60, 0x4e, 0x14, 0x60, 0x38, 0x14} }, +{ 0x19e5, 16, {0x60, 0x20, 0x14, 0x60, 0x03, 0x02, 0x1a, 0x73, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0x85} }, +{ 0x19f5, 16, {0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90, 0x7f, 0xa6, 0xf0} }, +{ 0x1a05, 16, {0x80, 0x6c, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xe0, 0xc3, 0x94, 0x20, 0x40, 0x09, 0xa3, 0xa3} }, +{ 0x1a15, 16, {0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x57, 0x15, 0x56, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3} }, +{ 0x1a25, 16, {0xa3, 0xe0, 0xa3, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x80, 0x44, 0xe5, 0x55, 0x24, 0x06, 0xf5, 0x82} }, +{ 0x1a35, 16, {0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5} }, +{ 0x1a45, 16, {0x83, 0xe0, 0x90, 0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0xe5, 0x55, 0x24} }, +{ 0x1a55, 16, {0x04, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0x74, 0xff, 0xf5, 0xf0, 0x12, 0x9f, 0x8e, 0x85} }, +{ 0x1a65, 16, {0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xa3, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0x8e, 0x90, 0x7f} }, +{ 0x1a75, 16, {0xa5, 0xe0, 0xf5, 0x57, 0x30, 0xe0, 0xf7, 0x30, 0xe2, 0x07, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x06} }, +{ 0x1a85, 16, {0x22, 0xe5, 0x57, 0x20, 0xe1, 0x0a, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7f, 0x07, 0x22} }, +{ 0x1a95, 16, {0xe5, 0x56, 0x70, 0x31, 0x7f, 0x01, 0x7e, 0x00, 0x12, 0x09, 0x29, 0x90, 0x7f, 0xa5, 0xe0, 0x44} }, +{ 0x1aa5, 16, {0x80, 0xf0, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0x25, 0xe0, 0x44, 0xa0, 0x90} }, +{ 0x1ab5, 16, {0x7f, 0xa6, 0xf0, 0x90, 0x7f, 0xa5, 0xe0, 0xf5, 0x57, 0x30, 0xe0, 0xf7, 0x30, 0xe1, 0xd5, 0x75} }, +{ 0x1ac5, 12, {0x56, 0x03, 0x02, 0x19, 0xc8, 0x15, 0x56, 0x02, 0x19, 0xc8, 0x7f, 0x08} }, +{ 0x1ad1, 1, {0x22} }, +{ 0x1ad2, 16, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc2, 0xa9, 0x90, 0x03, 0x00, 0x74, 0x19, 0xf0, 0xd2, 0xa9} }, +{ 0x1ae2, 15, {0x53, 0x91, 0x7f, 0x90, 0x01, 0xc4, 0xe4, 0xf0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} }, +{ 0x1af1, 4, {0x8e, 0x54, 0x8f, 0x55} }, +{ 0x1af5, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x56, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} }, +{ 0x1b05, 16, {0xe5, 0x56, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0} }, +{ 0x1b15, 16, {0x54, 0x03, 0x70, 0x24, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0x30, 0xe0, 0x07, 0xaf} }, +{ 0x1b25, 16, {0x56, 0x7d, 0x02, 0x12, 0x83, 0x2d, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0x30, 0xe1} }, +{ 0x1b35, 10, {0x07, 0xaf, 0x56, 0x7d, 0x04, 0x12, 0x83, 0x2d, 0x7f, 0x00} }, +{ 0x1b3f, 1, {0x22} }, +{ 0x8000, 16, {0x7b, 0xff, 0x7a, 0x12, 0x79, 0x1b, 0x90, 0x00, 0x04, 0x12, 0x9f, 0x61, 0xfd, 0x8b, 0x4d, 0x75} }, +{ 0x8010, 16, {0x4e, 0x12, 0x75, 0x4f, 0x24, 0xe4, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x7f, 0xe0, 0xf0, 0xf5, 0x4b} }, +{ 0x8020, 16, {0xf5, 0x4c, 0x90, 0x02, 0xae, 0xf0, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f} }, +{ 0x8030, 16, {0xa9, 0x74, 0xff, 0xf0, 0x90, 0x7f, 0xaa, 0xf0, 0xe4, 0xfc, 0xec, 0x25, 0xe0, 0x24, 0xb4, 0xf5} }, +{ 0x8040, 16, {0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x0c, 0xbc, 0x10, 0xee, 0xe4, 0x90, 0x7f, 0xdd} }, +{ 0x8050, 16, {0xf0, 0xaf, 0x05, 0x1d, 0xef, 0x70, 0x03, 0x02, 0x81, 0xc6, 0xab, 0x4d, 0xaa, 0x4e, 0xa9, 0x4f} }, +{ 0x8060, 16, {0x90, 0x00, 0x01, 0x12, 0x9f, 0x61, 0x64, 0x05, 0x60, 0x03, 0x02, 0x81, 0xb5, 0x90, 0x00, 0x03} }, +{ 0x8070, 16, {0x12, 0x9f, 0x61, 0x64, 0x01, 0x60, 0x03, 0x02, 0x81, 0x3c, 0x90, 0x00, 0x02, 0x12, 0x9f, 0x61} }, +{ 0x8080, 16, {0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50, 0x03, 0x02, 0x81, 0x16, 0xec, 0xc3, 0x94, 0x10} }, +{ 0x8090, 16, {0x40, 0x03, 0x02, 0x81, 0x16, 0xef, 0x30, 0xe7, 0x42, 0xe5, 0x4c, 0xae, 0x4b, 0x78, 0x02, 0xce} }, +{ 0x80a0, 16, {0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xf0, 0x2c, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5} }, +{ 0x80b0, 16, {0x83, 0xef, 0xf0, 0x90, 0x7f, 0xe0, 0xe0, 0xff, 0xec, 0x24, 0xf8, 0xfe, 0x74, 0x01, 0xa8, 0x06} }, +{ 0x80c0, 16, {0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x4f, 0x90, 0x7f, 0xe0, 0xf0, 0x90, 0x02, 0xae, 0xe0} }, +{ 0x80d0, 16, {0x04, 0xf0, 0x90, 0x7f, 0xdd, 0xe0, 0x44, 0x80, 0xf0, 0x80, 0x3e, 0xe5, 0x4c, 0xae, 0x4b, 0x78} }, +{ 0x80e0, 16, {0x02, 0xce, 0xc3, 0x13, 0xce, 0x13, 0xd8, 0xf9, 0xff, 0x74, 0xe8, 0x2c, 0xf5, 0x82, 0xe4, 0x34} }, +{ 0x80f0, 16, {0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x90, 0x7f, 0xe1, 0xe0, 0xff, 0xec, 0x24, 0xf8, 0xfe, 0x74, 0x01} }, +{ 0x8100, 16, {0xa8, 0x06, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x4f, 0x90, 0x7f, 0xe1, 0xf0, 0x90, 0x02} }, +{ 0x8110, 16, {0xae, 0xe0, 0x04, 0xf0, 0x80, 0x03, 0x7f, 0xff, 0x22, 0x90, 0x00, 0x04, 0x12, 0x9f, 0x61, 0x25} }, +{ 0x8120, 16, {0x4c, 0xf5, 0x4c, 0xe4, 0x35, 0x4b, 0xf5, 0x4b, 0x90, 0x00, 0x05, 0x12, 0x9f, 0x61, 0xfe, 0xe4} }, +{ 0x8130, 16, {0x25, 0x4c, 0xf5, 0x4c, 0xee, 0x35, 0x4b, 0xf5, 0x4b, 0x02, 0x81, 0xb8, 0xab, 0x4d, 0xaa, 0x4e} }, +{ 0x8140, 16, {0xa9, 0x4f, 0x90, 0x00, 0x03, 0x12, 0x9f, 0x61, 0xff, 0x64, 0x02, 0x60, 0x05, 0xef, 0x64, 0x03} }, +{ 0x8150, 16, {0x70, 0x60, 0x90, 0x00, 0x02, 0x12, 0x9f, 0x61, 0xff, 0x54, 0x7f, 0xfc, 0xd3, 0x94, 0x07, 0x50} }, +{ 0x8160, 16, {0x4e, 0xef, 0x30, 0xe7, 0x1e, 0x90, 0x7f, 0xde, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80} }, +{ 0x8170, 16, {0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xfe, 0x4f, 0x90, 0x7f, 0xde, 0xf0, 0x90, 0x7f, 0xac, 0xe0, 0x4e} }, +{ 0x8180, 16, {0xf0, 0x80, 0x35, 0x90, 0x7f, 0xdf, 0xe0, 0xff, 0x74, 0x01, 0xa8, 0x04, 0x08, 0x80, 0x02, 0xc3} }, +{ 0x8190, 16, {0x33, 0xd8, 0xfc, 0xfe, 0x4f, 0x90, 0x7f, 0xdf, 0xf0, 0x90, 0x7f, 0xad, 0xe0, 0x4e, 0xf0, 0xec} }, +{ 0x81a0, 16, {0x25, 0xe0, 0x24, 0xc5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xec, 0xf0, 0x80, 0x09, 0x7f} }, +{ 0x81b0, 16, {0xff, 0x22, 0x7f, 0xff, 0x22, 0x7f, 0xff, 0x22, 0x74, 0x07, 0x25, 0x4f, 0xf5, 0x4f, 0xe4, 0x35} }, +{ 0x81c0, 16, {0x4e, 0xf5, 0x4e, 0x02, 0x80, 0x51, 0x20, 0x03, 0x0d, 0x90, 0x02, 0xae, 0xe0, 0x60, 0x07, 0x90} }, +{ 0x81d0, 8, {0x7f, 0xae, 0xe0, 0x44, 0x02, 0xf0, 0x7f, 0x00} }, +{ 0x81d8, 1, {0x22} }, +{ 0x81d9, 2, {0xac, 0x07} }, +{ 0x81db, 16, {0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x80, 0xf0, 0xec, 0x25, 0xe0, 0x44, 0x41, 0x90, 0x7f, 0xa6, 0xf0} }, +{ 0x81eb, 16, {0x7b, 0x3c, 0xaf, 0x03, 0x1b, 0xef, 0x70, 0x16, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90} }, +{ 0x81fb, 16, {0x7f, 0xa6, 0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x60, 0xd4, 0x80, 0xf8, 0x90, 0x7f} }, +{ 0x820b, 16, {0xa5, 0xe0, 0xfd, 0x30, 0xe0, 0xdc, 0x20, 0xe1, 0x09, 0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f} }, +{ 0x821b, 16, {0xf9, 0x22, 0xed, 0x30, 0xe2, 0x0c, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f} }, +{ 0x822b, 16, {0xfa, 0x22, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x20, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0x7b, 0x1e} }, +{ 0x823b, 16, {0xaf, 0x03, 0x1b, 0xef, 0x70, 0x16, 0x90, 0x7f, 0xa5, 0xe0, 0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6} }, +{ 0x824b, 16, {0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x60, 0x86, 0x80, 0xf8, 0x90, 0x7f, 0xa5, 0xe0} }, +{ 0x825b, 16, {0xfd, 0x20, 0xe0, 0xdc, 0x7b, 0x3c, 0xaf, 0x03, 0x1b, 0xef, 0x70, 0x19, 0x90, 0x7f, 0xa5, 0xe0} }, +{ 0x826b, 16, {0x44, 0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0x7d, 0x32, 0xaf, 0x05, 0x1d, 0xef, 0x70, 0x03} }, +{ 0x827b, 16, {0x02, 0x81, 0xdb, 0x80, 0xf5, 0x90, 0x7f, 0xa5, 0xe0, 0xfd, 0x30, 0xe0, 0xd9, 0x30, 0xe2, 0x09} }, +{ 0x828b, 16, {0xe0, 0x44, 0x40, 0xf0, 0x7e, 0xff, 0x7f, 0xfa, 0x22, 0xc2, 0xaf, 0x90, 0x7f, 0xa5, 0xe0, 0x44} }, +{ 0x829b, 12, {0x40, 0xf0, 0x90, 0x7f, 0xa6, 0xe0, 0xfd, 0xd2, 0xaf, 0xff, 0x7e, 0x00} }, +{ 0x82a7, 1, {0x22} }, +{ 0x82a8, 16, {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xf5} }, +{ 0x82b8, 16, {0x83, 0xa3, 0xe4, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0xf5, 0x5e, 0x74, 0xbf} }, +{ 0x82c8, 16, {0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0, 0x44, 0x10, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3} }, +{ 0x82d8, 16, {0xa3, 0xa3, 0xe4, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xf0, 0xf9, 0xed, 0x60, 0x1d, 0x74, 0x01} }, +{ 0x82e8, 16, {0x7e, 0x00, 0xa8, 0x07, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4} }, +{ 0x82f8, 16, {0xef, 0x55, 0x3b, 0x60, 0x04, 0x79, 0x09, 0x80, 0x02, 0x79, 0x0d, 0x8b, 0x82, 0x8a, 0x83, 0xa3} }, +{ 0x8308, 16, {0xa3, 0xa3, 0x74, 0xbf, 0xf0, 0x8b, 0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xe0, 0x54, 0xef, 0xf0, 0x8b} }, +{ 0x8318, 16, {0x82, 0x8a, 0x83, 0xa3, 0xa3, 0xa3, 0xe5, 0x5e, 0xf0, 0xae, 0x02, 0xaf, 0x03, 0x8f, 0x82, 0x8e} }, +{ 0x8328, 4, {0x83, 0xa3, 0xe9, 0xf0} }, +{ 0x832c, 1, {0x22} }, +{ 0x832d, 4, {0x8f, 0x5e, 0x8d, 0x5f} }, +{ 0x8331, 16, {0xe4, 0xf5, 0x60, 0x74, 0x3c, 0x2f, 0xf8, 0x76, 0x08, 0xe5, 0x5e, 0x75, 0xf0, 0x0d, 0xa4, 0x24} }, +{ 0x8341, 16, {0x02, 0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe} }, +{ 0x8351, 16, {0xa3, 0xe0, 0xff, 0x7b, 0x80, 0x7a, 0x25, 0x79, 0x00, 0x78, 0x00, 0xc3, 0x12, 0xa0, 0xc0, 0x50} }, +{ 0x8361, 16, {0x3c, 0xe5, 0x5e, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34, 0x03, 0xf5, 0x83} }, +{ 0x8371, 16, {0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x00, 0x7a, 0x96, 0x78} }, +{ 0x8381, 16, {0x00, 0xc3, 0x12, 0xa0, 0xc0, 0x40, 0x0c, 0x75, 0x60, 0x40, 0x74, 0x3c, 0x25, 0x5e, 0xf8, 0x76} }, +{ 0x8391, 16, {0x10, 0x80, 0x0a, 0x75, 0x60, 0x80, 0x74, 0x3c, 0x25, 0x5e, 0xf8, 0x76, 0x38, 0xe5, 0x60, 0x45} }, +{ 0x83a1, 16, {0x5f, 0x44, 0x01, 0xff, 0xe5, 0x5e, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x02, 0xf5, 0x82, 0xe4, 0x34} }, +{ 0x83b1, 5, {0x20, 0xf5, 0x83, 0xef, 0xf0} }, +{ 0x83b6, 1, {0x22} }, +{ 0x83b7, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x54, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} }, +{ 0x83c7, 16, {0xe5, 0x54, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5} }, +{ 0x83d7, 16, {0x55, 0x8f, 0x56, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xc6, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83} }, +{ 0x83e7, 16, {0xe0, 0x20, 0xe1, 0x0f, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5} }, +{ 0x83f7, 16, {0x83, 0xe4, 0xf0, 0x74, 0x22, 0x25, 0x54, 0xf8, 0xe4, 0xf6, 0xe5, 0x56, 0x24, 0x04, 0xf5, 0x82} }, +{ 0x8407, 16, {0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0, 0x44, 0x03, 0xf0, 0xaf, 0x54, 0x7d, 0x06, 0x12, 0x83, 0x2d} }, +{ 0x8417, 16, {0xaf, 0x54, 0x7d, 0x01, 0x12, 0x82, 0xa8, 0x85, 0x56, 0x82, 0x85, 0x55, 0x83, 0xa3, 0xa3, 0xe0} }, +{ 0x8427, 16, {0x20, 0xe0, 0x22, 0xe0, 0xff, 0xe5, 0x56, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83} }, +{ 0x8437, 16, {0xe0, 0xe5, 0x56, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x55, 0xf5, 0x83, 0xe0, 0xff, 0xaf, 0x54} }, +{ 0x8447, 16, {0x7d, 0x06, 0x12, 0x83, 0x2d, 0x74, 0xf8, 0x25, 0x54, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83} }, +{ 0x8457, 16, {0xe4, 0xf0, 0xe5, 0x54, 0x25, 0xe0, 0xff, 0xc3, 0x74, 0x0c, 0x9f, 0x75, 0xf0, 0x40, 0xa4, 0x24} }, +{ 0x8467, 16, {0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xaf, 0x82, 0xfe, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xef} }, +{ 0x8477, 16, {0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0xaf, 0x54, 0x74, 0x01} }, +{ 0x8487, 13, {0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x30, 0x7f, 0x00} }, +{ 0x8494, 1, {0x22} }, +{ 0x8495, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x54, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} }, +{ 0x84a5, 16, {0xaf, 0x54, 0xe4, 0xfd, 0x12, 0x82, 0xa8, 0x74, 0xf8, 0x25, 0x54, 0xf5, 0x82, 0xe4, 0x34, 0x02} }, +{ 0x84b5, 16, {0xf5, 0x83, 0xe4, 0xf0, 0xe5, 0x54, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34} }, +{ 0x84c5, 16, {0x20, 0xaf, 0x82, 0xf5, 0x56, 0x8f, 0x57, 0xf5, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4} }, +{ 0x84d5, 16, {0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xaf, 0x54, 0x7d, 0x06, 0x12, 0x83, 0x2d, 0xe5} }, +{ 0x84e5, 16, {0x57, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x56, 0xf5, 0x83, 0xe0, 0x30, 0xe0, 0x09, 0x85, 0x57} }, +{ 0x84f5, 16, {0x82, 0x85, 0x56, 0x83, 0xe0, 0xf5, 0x55, 0xaf, 0x54, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02} }, +{ 0x8505, 16, {0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x30, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xc6, 0xf5, 0x82, 0xe4} }, +{ 0x8515, 16, {0x34, 0x7f, 0xf5, 0x83, 0xe0, 0x20, 0xe1, 0x0f, 0xe5, 0x54, 0x25, 0xe0, 0x24, 0xc7, 0xf5, 0x82} }, +{ 0x8525, 9, {0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0x7f, 0x00} }, +{ 0x852e, 1, {0x22} }, +{ 0x852f, 16, {0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0xa3, 0xa3, 0xa3, 0xe0, 0xfc, 0xed} }, +{ 0x853f, 16, {0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xc0, 0x83, 0xc0} }, +{ 0x854f, 16, {0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0} }, +{ 0x855f, 16, {0x8f, 0x82, 0x8e, 0x83, 0xc0, 0x83, 0xc0, 0x82, 0xa3, 0xa3, 0xa3, 0xe0, 0xfd, 0xec, 0x6d, 0xd0} }, +{ 0x856f, 16, {0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f} }, +{ 0x857f, 16, {0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82} }, +{ 0x858f, 16, {0x8e, 0x83, 0xa3, 0xa3, 0xc0, 0x83, 0xc0, 0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0} }, +{ 0x859f, 16, {0xfc, 0xed, 0x6c, 0xd0, 0x82, 0xd0, 0x83, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xc0, 0x83, 0xc0} }, +{ 0x85af, 16, {0x82, 0xe0, 0xfd, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xe0, 0xff, 0xed, 0x6f, 0xd0, 0x82, 0xd0} }, +{ 0x85bf, 3, {0x83, 0xf0, 0x22} }, +{ 0x85c2, 4, {0xad, 0x07, 0xac, 0x06} }, +{ 0x85c6, 16, {0x79, 0x0d, 0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff} }, +{ 0x85d6, 16, {0x22, 0x8c, 0x54, 0x8d, 0x55, 0xee, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34} }, +{ 0x85e6, 16, {0x03, 0xaf, 0x82, 0xfe, 0xad, 0x01, 0x19, 0xed, 0x60, 0x24, 0x0f, 0xef, 0xac, 0x06, 0x70, 0x01} }, +{ 0x85f6, 16, {0x0e, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe0, 0xfd, 0x05, 0x55, 0xe5, 0x55, 0xaa, 0x54, 0x70, 0x02} }, +{ 0x8606, 16, {0x05, 0x54, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xe0, 0x6d, 0x60, 0xd9, 0x7f, 0x01, 0x22, 0x7f, 0x00} }, +{ 0x8616, 1, {0x22} }, +{ 0x8617, 4, {0x8e, 0x54, 0x8f, 0x55} }, +{ 0x861b, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xf5, 0x5b, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22} }, +{ 0x862b, 16, {0xe5, 0x5b, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5} }, +{ 0x863b, 16, {0x5c, 0x8f, 0x5d, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3} }, +{ 0x864b, 16, {0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x08, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0xd3, 0x12, 0xa0} }, +{ 0x865b, 16, {0xc0, 0x40, 0x10, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0x12, 0xa1, 0x07, 0x00, 0x00, 0x00} }, +{ 0x866b, 16, {0x08, 0x80, 0x2e, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfc, 0xa3, 0xe0, 0xfd, 0xa3} }, +{ 0x867b, 16, {0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0x7b, 0x00, 0x7a, 0x08, 0x79, 0x07, 0x78, 0x00, 0xc3, 0x12, 0xa0} }, +{ 0x868b, 16, {0xc0, 0x50, 0x0e, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0x12, 0xa1, 0x07, 0x00, 0x07, 0x08} }, +{ 0x869b, 16, {0x00, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xf8, 0xa3, 0xe0, 0xf9, 0xa3, 0xe0, 0xfa} }, +{ 0x86ab, 16, {0xa3, 0xe0, 0xfb, 0x7f, 0x00, 0x7e, 0x50, 0x7d, 0x46, 0x7c, 0x00, 0x12, 0xa0, 0x2e, 0x8f, 0x59} }, +{ 0x86bb, 16, {0x8e, 0x58, 0x8d, 0x57, 0x8c, 0x56, 0x7b, 0x0a, 0x7a, 0x00, 0x79, 0x00, 0x78, 0x00, 0x12, 0xa0} }, +{ 0x86cb, 16, {0x2e, 0xaf, 0x03, 0x8f, 0x5a, 0xaf, 0x59, 0xae, 0x58, 0xad, 0x57, 0xac, 0x56, 0x7b, 0x0a, 0x7a} }, +{ 0x86db, 16, {0x00, 0x79, 0x00, 0x78, 0x00, 0x12, 0xa0, 0x2e, 0x8f, 0x59, 0x8e, 0x58, 0x8d, 0x57, 0x8c, 0x56} }, +{ 0x86eb, 16, {0xe5, 0x5a, 0xc3, 0x94, 0x05, 0x40, 0x15, 0xe5, 0x59, 0x24, 0x01, 0xf5, 0x59, 0xe4, 0x35, 0x58} }, +{ 0x86fb, 16, {0xf5, 0x58, 0xe4, 0x35, 0x57, 0xf5, 0x57, 0xe4, 0x35, 0x56, 0xf5, 0x56, 0x85, 0x5d, 0x82, 0x85} }, +{ 0x870b, 16, {0x5c, 0x83, 0xa3, 0xe4, 0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44} }, +{ 0x871b, 16, {0x80, 0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xe5, 0x59, 0xf0, 0xaf, 0x59, 0xae, 0x58, 0xad} }, +{ 0x872b, 16, {0x57, 0xac, 0x56, 0x78, 0x08, 0x12, 0xa0, 0xd1, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xef} }, +{ 0x873b, 16, {0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0xe4, 0xf5} }, +{ 0x874b, 16, {0x5a, 0xe5, 0x55, 0x24, 0x08, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0xb4, 0x62} }, +{ 0x875b, 16, {0x05, 0x43, 0x5a, 0x0a, 0x80, 0x1a, 0xef, 0xb4, 0x72, 0x05, 0x43, 0x5a, 0x08, 0x80, 0x11, 0xef} }, +{ 0x876b, 16, {0xb4, 0x74, 0x05, 0x43, 0x5a, 0x02, 0x80, 0x08, 0xef, 0x64, 0x6e, 0x60, 0x03, 0x7f, 0xff, 0x22} }, +{ 0x877b, 16, {0xe5, 0x55, 0x24, 0x0b, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0x30, 0xe3, 0x03} }, +{ 0x878b, 16, {0x43, 0x5a, 0x80, 0xef, 0x30, 0xe7, 0x12, 0x43, 0x5a, 0x40, 0xe5, 0x5d, 0x24, 0x04, 0xf5, 0x82} }, +{ 0x879b, 16, {0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xe0, 0x44, 0x02, 0xf0, 0xe5, 0x55, 0x24, 0x0b, 0xf5, 0x82, 0xe4} }, +{ 0x87ab, 16, {0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0x20, 0xe1, 0x03, 0x30, 0xe4, 0x23, 0xaf, 0x5b, 0x74, 0x01} }, +{ 0x87bb, 16, {0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x3b, 0xe5, 0x5d, 0x24, 0x04, 0xf5} }, +{ 0x87cb, 16, {0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xe0, 0x44, 0x01, 0xf0, 0xe4, 0xf5, 0x5a, 0x80, 0x10, 0xaf} }, +{ 0x87db, 16, {0x5b, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf4, 0x52, 0x3b, 0x85} }, +{ 0x87eb, 16, {0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0x74, 0xbf, 0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c} }, +{ 0x87fb, 16, {0x83, 0xa3, 0xa3, 0xe4, 0xf0, 0xe5, 0x5a, 0xf0, 0xe5, 0x55, 0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35} }, +{ 0x880b, 16, {0x54, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x5d, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83} }, +{ 0x881b, 16, {0xef, 0xf0, 0xe5, 0x55, 0x24, 0x0a, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0xe5} }, +{ 0x882b, 16, {0x5d, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x55, 0x24, 0x09} }, +{ 0x883b, 16, {0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xff, 0xe5, 0x5d, 0x24, 0x06, 0xf5, 0x82, 0xe4} }, +{ 0x884b, 16, {0x35, 0x5c, 0xf5, 0x83, 0xef, 0xf0, 0xe5, 0x55, 0x24, 0x09, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5} }, +{ 0x885b, 16, {0x83, 0xe0, 0xff, 0xe5, 0x5d, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xef, 0xf0} }, +{ 0x886b, 16, {0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3, 0xa3, 0xa3, 0xe4, 0xf0, 0x85, 0x5d, 0x82, 0x85, 0x5c} }, +{ 0x887b, 16, {0x83, 0xa3, 0xa3, 0xf0, 0xaf, 0x5b, 0x7d, 0x06, 0x12, 0x83, 0x2d, 0x75, 0x5a, 0x08, 0xe5, 0x55} }, +{ 0x888b, 16, {0x24, 0x0c, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0x60, 0x03, 0x43, 0x5a, 0x10, 0xe5} }, +{ 0x889b, 16, {0x5d, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x5c, 0xf5, 0x83, 0xe0, 0x54, 0x03, 0x45, 0x5a, 0xf0} }, +{ 0x88ab, 16, {0xe5, 0x55, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xfe, 0xc3, 0x94, 0x05} }, +{ 0x88bb, 16, {0x40, 0x06, 0xee, 0xd3, 0x94, 0x08, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xe5, 0x55, 0x24, 0x06, 0xf5} }, +{ 0x88cb, 16, {0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0, 0xfd, 0xc3, 0x94, 0x01, 0x40, 0x06, 0xed, 0xd3, 0x94} }, +{ 0x88db, 16, {0x02, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xed, 0x14, 0xff, 0x25, 0xe0, 0x25, 0xe0, 0xff, 0xee, 0x24} }, +{ 0x88eb, 16, {0xfb, 0x4f, 0xf5, 0x5a, 0xe5, 0x55, 0x24, 0x07, 0xf5, 0x82, 0xe4, 0x35, 0x54, 0xf5, 0x83, 0xe0} }, +{ 0x88fb, 16, {0x24, 0xd0, 0x60, 0x18, 0x14, 0x60, 0x1a, 0x24, 0xc3, 0x60, 0x1e, 0x14, 0x60, 0x09, 0x24, 0x0a} }, +{ 0x890b, 16, {0x70, 0x14, 0x43, 0x5a, 0x18, 0x80, 0x12, 0x43, 0x5a, 0x08, 0x80, 0x0d, 0x43, 0x5a, 0x38, 0x80} }, +{ 0x891b, 16, {0x08, 0x43, 0x5a, 0x28, 0x80, 0x03, 0x7f, 0xff, 0x22, 0x85, 0x5d, 0x82, 0x85, 0x5c, 0x83, 0xa3} }, +{ 0x892b, 16, {0xa3, 0xa3, 0xe5, 0x5a, 0xf0, 0xaf, 0x5b, 0x7d, 0x01, 0x12, 0x82, 0xa8, 0xaa, 0x54, 0xa9, 0x55} }, +{ 0x893b, 16, {0x7b, 0x01, 0xc0, 0x01, 0xe5, 0x5b, 0x75, 0xf0, 0x0d, 0xa4, 0x24, 0x01, 0xf9, 0x74, 0x03, 0x35} }, +{ 0x894b, 15, {0xf0, 0xa8, 0x01, 0xfc, 0xd0, 0x01, 0x7e, 0x00, 0x7f, 0x0d, 0x12, 0x9f, 0x1f, 0x7f, 0x00} }, +{ 0x895a, 1, {0x22} }, +{ 0x895b, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} }, +{ 0x896b, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0x90, 0x01} }, +{ 0x897b, 16, {0x2c, 0x74, 0x08, 0xf0, 0xee, 0x04, 0xa3, 0xf0, 0xe4, 0xa3, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xe5} }, +{ 0x898b, 16, {0x82, 0x24, 0x06, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x90, 0x01, 0x2f, 0xf0, 0x8d} }, +{ 0x899b, 16, {0x82, 0x8c, 0x83, 0xe5, 0x82, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54} }, +{ 0x89ab, 16, {0x1e, 0x90, 0x01, 0x30, 0xf0, 0x74, 0x2c, 0x2e, 0xf8, 0xe6, 0xa3, 0xf0, 0xaf, 0x06, 0x74, 0x01} }, +{ 0x89bb, 16, {0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x54, 0x7f, 0x02, 0x12, 0x81, 0xd9} }, +{ 0x89cb, 16, {0xc3, 0xee, 0x64, 0x80, 0x94, 0x80, 0x40, 0xf3, 0xe5, 0x54, 0x5f, 0x90, 0x01, 0x32, 0xf0, 0x7e} }, +{ 0x89db, 10, {0x01, 0x7f, 0x2c, 0x7d, 0x07, 0x12, 0x8e, 0xb4, 0x7f, 0x00} }, +{ 0x89e5, 1, {0x22} }, +{ 0x89e6, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} }, +{ 0x89f6, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x90, 0x01} }, +{ 0x8a06, 16, {0x33, 0x74, 0x0a, 0xf0, 0x8f, 0x82, 0x8e, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35} }, +{ 0x8a16, 16, {0x83, 0xf5, 0x83, 0xe0, 0x90, 0x01, 0x34, 0xf0, 0x7e, 0x01, 0x7f, 0x33, 0x7d, 0x02, 0x12, 0x8e} }, +{ 0x8a26, 3, {0xb4, 0x7f, 0x00} }, +{ 0x8a29, 1, {0x22} }, +{ 0x8a2a, 4, {0xad, 0x07, 0xac, 0x06} }, +{ 0x8a2e, 16, {0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} }, +{ 0x8a3e, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} }, +{ 0x8a4e, 16, {0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0f, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0} }, +{ 0x8a5e, 16, {0x44, 0x02, 0xf0, 0x80, 0x0d, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54} }, +{ 0x8a6e, 4, {0xfd, 0xf0, 0x7f, 0x00} }, +{ 0x8a72, 1, {0x22} }, +{ 0x8a73, 4, {0xad, 0x07, 0xac, 0x06} }, +{ 0x8a77, 16, {0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} }, +{ 0x8a87, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} }, +{ 0x8a97, 16, {0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0f, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0} }, +{ 0x8aa7, 16, {0x44, 0x01, 0xf0, 0x80, 0x0d, 0xef, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x3e, 0xf5, 0x83, 0xe0, 0x54} }, +{ 0x8ab7, 4, {0xfe, 0xf0, 0x7f, 0x00} }, +{ 0x8abb, 1, {0x22} }, +{ 0x8abc, 4, {0xad, 0x07, 0xac, 0x06} }, +{ 0x8ac0, 16, {0x8d, 0x82, 0x8c, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xee} }, +{ 0x8ad0, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xfe, 0x8d, 0x82} }, +{ 0x8ae0, 16, {0x8c, 0x83, 0xa3, 0xe0, 0x60, 0x0d, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x40} }, +{ 0x8af0, 16, {0xf0, 0x80, 0x0b, 0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x54, 0xbf, 0xf0, 0x7f, 0x00} }, +{ 0x8b00, 1, {0x22} }, +{ 0x8b01, 16, {0x8f, 0x82, 0x8e, 0x83, 0xe0, 0x14, 0xfe, 0xc3, 0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xaf} }, +{ 0x8b11, 16, {0x06, 0x74, 0x01, 0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x42, 0x3a, 0x7f, 0x00} }, +{ 0x8b21, 1, {0x22} }, +{ 0x8b22, 4, {0x8e, 0x54, 0x8f, 0x55} }, +{ 0x8b26, 16, {0x8f, 0x82, 0x8e, 0x83, 0xa3, 0xe0, 0xf5, 0x59, 0x8f, 0x82, 0x8e, 0x83, 0xe0, 0xf5, 0x56, 0xc3} }, +{ 0x8b36, 16, {0x94, 0x04, 0x40, 0x03, 0x7f, 0xff, 0x22, 0xe5, 0x56, 0x24, 0xfe, 0x60, 0x16, 0x14, 0x60, 0x1f} }, +{ 0x8b46, 16, {0x14, 0x60, 0x28, 0x24, 0x03, 0x70, 0x2e, 0x7e, 0x7e, 0x7f, 0x80, 0x75, 0x57, 0x7e, 0x75, 0x58} }, +{ 0x8b56, 16, {0x80, 0x80, 0x22, 0x7e, 0x7e, 0x7f, 0x00, 0x75, 0x57, 0x7e, 0x75, 0x58, 0x00, 0x80, 0x16, 0x7e} }, +{ 0x8b66, 16, {0x7d, 0x7f, 0x80, 0x75, 0x57, 0x7d, 0x75, 0x58, 0x80, 0x80, 0x0a, 0x7e, 0x7d, 0x7f, 0x00, 0x75} }, +{ 0x8b76, 16, {0x57, 0x7d, 0x75, 0x58, 0x00, 0xe5, 0x59, 0x70, 0x1b, 0x85, 0x58, 0x82, 0x85, 0x57, 0x83, 0x74} }, +{ 0x8b86, 16, {0xff, 0xf0, 0xe5, 0x56, 0x25, 0xe0, 0x24, 0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0x74} }, +{ 0x8b96, 16, {0x01, 0xf0, 0x80, 0x48, 0xe5, 0x55, 0x24, 0x02, 0xff, 0xe4, 0x35, 0x54, 0xfe, 0xe5, 0x59, 0x60} }, +{ 0x8ba6, 16, {0x23, 0x0f, 0xef, 0xac, 0x06, 0x70, 0x01, 0x0e, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe0, 0xfd, 0x05} }, +{ 0x8bb6, 16, {0x58, 0xe5, 0x58, 0xaa, 0x57, 0x70, 0x02, 0x05, 0x57, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0} }, +{ 0x8bc6, 16, {0x15, 0x59, 0x80, 0xd9, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0xe5, 0x56, 0x25} }, +{ 0x8bd6, 14, {0xe0, 0x24, 0xb5, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xef, 0xf0, 0x7f, 0x00} }, +{ 0x8be4, 1, {0x22} }, +{ 0x8be5, 16, {0xef, 0x24, 0x05, 0xf5, 0x55, 0xe4, 0x3e, 0xf5, 0x54, 0x90, 0x01, 0x35, 0x74, 0x07, 0xf0, 0x90} }, +{ 0x8bf5, 16, {0x01, 0x7a, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x36, 0xf0, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3} }, +{ 0x8c05, 16, {0xa3, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0x8e, 0x56, 0xf5, 0x57, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83} }, +{ 0x8c15, 16, {0xe0, 0x24, 0x9e, 0x60, 0x61, 0x24, 0xf9, 0x60, 0x0e, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8c, 0xc6} }, +{ 0x8c25, 16, {0x24, 0x14, 0x60, 0x03, 0x02, 0x8d, 0x12, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe} }, +{ 0x8c35, 16, {0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f, 0xf5, 0x59, 0x74, 0x01, 0x9e, 0xf5, 0x58, 0xd3, 0xe5, 0x59} }, +{ 0x8c45, 16, {0x94, 0x40, 0xe5, 0x58, 0x94, 0x00, 0x40, 0x06, 0x75, 0x58, 0x00, 0x75, 0x59, 0x40, 0xd3, 0xe5} }, +{ 0x8c55, 16, {0x57, 0x95, 0x59, 0xe5, 0x56, 0x95, 0x58, 0x50, 0x03, 0x02, 0x8d, 0x15, 0xae, 0x58, 0xaf, 0x59} }, +{ 0x8c65, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e} }, +{ 0x8c75, 16, {0x56, 0xf5, 0x57, 0x02, 0x8d, 0x15, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3} }, +{ 0x8c85, 16, {0xe0, 0xff, 0xc3, 0x74, 0x30, 0x9f, 0xf5, 0x59, 0xe4, 0x9e, 0xf5, 0x58, 0xd3, 0xe5, 0x59, 0x94} }, +{ 0x8c95, 16, {0x10, 0xe5, 0x58, 0x94, 0x00, 0x40, 0x06, 0x75, 0x58, 0x00, 0x75, 0x59, 0x10, 0xd3, 0xe5, 0x57} }, +{ 0x8ca5, 16, {0x95, 0x59, 0xe5, 0x56, 0x95, 0x58, 0x40, 0x68, 0xae, 0x58, 0xaf, 0x59, 0x85, 0x55, 0x82, 0x85} }, +{ 0x8cb5, 16, {0x54, 0x83, 0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x56, 0xf5, 0x57, 0x80} }, +{ 0x8cc5, 16, {0x4f, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0xe4, 0x9f} }, +{ 0x8cd5, 16, {0xf5, 0x59, 0xe4, 0x9e, 0xf5, 0x58, 0x45, 0x59, 0x60, 0x0b, 0xd3, 0xe5, 0x59, 0x94, 0x40, 0xe5} }, +{ 0x8ce5, 16, {0x58, 0x94, 0x00, 0x40, 0x06, 0x75, 0x58, 0x00, 0x75, 0x59, 0x40, 0xd3, 0xe5, 0x57, 0x95, 0x59} }, +{ 0x8cf5, 16, {0xe5, 0x56, 0x95, 0x58, 0x40, 0x17, 0xae, 0x58, 0xaf, 0x59, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83} }, +{ 0x8d05, 16, {0xa3, 0xa3, 0xa3, 0xee, 0xf0, 0xfe, 0xa3, 0xef, 0xf0, 0x8e, 0x56, 0xf5, 0x57, 0x7f, 0x01, 0x22} }, +{ 0x8d15, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xe0, 0x24, 0x9e, 0x70, 0x03, 0x02, 0x8d, 0xd5, 0x24, 0xf9} }, +{ 0x8d25, 16, {0x60, 0x58, 0x24, 0xf1, 0x70, 0x03, 0x02, 0x8e, 0x25, 0x24, 0x14, 0x60, 0x03, 0x02, 0x8e, 0x69} }, +{ 0x8d35, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xd3, 0x94, 0xff, 0xee} }, +{ 0x8d45, 16, {0x94, 0x00, 0x40, 0x03, 0x02, 0x8e, 0x69, 0x90, 0x01, 0x75, 0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57} }, +{ 0x8d55, 16, {0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e, 0x70, 0x03, 0x02, 0x8e, 0x69, 0x90, 0x01, 0x75, 0xe0} }, +{ 0x8d65, 16, {0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f} }, +{ 0x8d75, 16, {0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83} }, +{ 0x8d85, 16, {0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x80, 0xee, 0x94, 0x00, 0x50, 0x03, 0x02, 0x8e} }, +{ 0x8d95, 16, {0x69, 0xd3, 0xef, 0x94, 0xff, 0xee, 0x94, 0x00, 0x40, 0x03, 0x02, 0x8e, 0x69, 0x90, 0x01, 0x76} }, +{ 0x8da5, 16, {0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57, 0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e, 0x70, 0x03, 0x02} }, +{ 0x8db5, 16, {0x8e, 0x69, 0x90, 0x01, 0x76, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a} }, +{ 0x8dc5, 16, {0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd2} }, +{ 0x8dd5, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xfe, 0xa3, 0xe0, 0xff, 0xc3, 0x94, 0x20, 0xee} }, +{ 0x8de5, 16, {0x94, 0x00, 0x50, 0x03, 0x02, 0x8e, 0x69, 0xd3, 0xef, 0x94, 0x2f, 0xee, 0x94, 0x00, 0x50, 0x74} }, +{ 0x8df5, 16, {0x90, 0x01, 0x77, 0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57, 0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e} }, +{ 0x8e05, 16, {0x60, 0x62, 0x90, 0x01, 0x77, 0xe0, 0xff, 0x04, 0xf0, 0xa8, 0x07, 0xe6, 0xff, 0x90, 0x01, 0x7a} }, +{ 0x8e15, 16, {0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xef, 0xf0, 0x80, 0xd5} }, +{ 0x8e25, 16, {0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xe0, 0xff, 0xa3, 0xe0, 0x90, 0x01, 0x78, 0xcf, 0xf0} }, +{ 0x8e35, 16, {0xa3, 0xef, 0xf0, 0xe5, 0x57, 0x15, 0x57, 0xae, 0x56, 0x70, 0x02, 0x15, 0x56, 0x4e, 0x60, 0x24} }, +{ 0x8e45, 16, {0x90, 0x01, 0x78, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0} }, +{ 0x8e55, 16, {0xff, 0x90, 0x01, 0x7a, 0xe4, 0x75, 0xf0, 0x01, 0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83} }, +{ 0x8e65, 16, {0xef, 0xf0, 0x80, 0xcf, 0x7e, 0x01, 0x7f, 0x35, 0x85, 0x55, 0x82, 0x85, 0x54, 0x83, 0xa3, 0xa3} }, +{ 0x8e75, 11, {0xa3, 0xe0, 0xa3, 0xe0, 0x04, 0xfd, 0x12, 0x8e, 0xb4, 0x7f, 0x00} }, +{ 0x8e80, 1, {0x22} }, +{ 0x8e81, 16, {0x8e, 0x5f, 0x8f, 0x60, 0x8c, 0x61, 0x8d, 0x62, 0xaf, 0x03, 0x1b, 0xef, 0x60, 0x24, 0x05, 0x60} }, +{ 0x8e91, 16, {0xe5, 0x60, 0xae, 0x5f, 0x70, 0x02, 0x05, 0x5f, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05} }, +{ 0x8ea1, 16, {0x62, 0xe5, 0x62, 0xac, 0x61, 0x70, 0x02, 0x05, 0x61, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0} }, +{ 0x8eb1, 3, {0x80, 0xd6, 0x22} }, +{ 0x8eb4, 6, {0x8d, 0x5a, 0xab, 0x07, 0xaa, 0x06} }, +{ 0x8eba, 16, {0x75, 0x5e, 0x40, 0x75, 0x5d, 0x0d, 0x75, 0x5c, 0x03, 0x75, 0x5b, 0x00, 0x90, 0x7f, 0xc2, 0xe0} }, +{ 0x8eca, 16, {0x20, 0xe1, 0xf9, 0xaf, 0x5e, 0xae, 0x5d, 0xad, 0x5c, 0xac, 0x5b, 0xec, 0x4d, 0x4e, 0x4f, 0x70} }, +{ 0x8eda, 16, {0x08, 0x90, 0x7f, 0xc2, 0x74, 0x02, 0xf0, 0x80, 0xd7, 0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x16} }, +{ 0x8eea, 16, {0xaf, 0x03, 0xae, 0x02, 0x7c, 0x7b, 0x7d, 0x80, 0xab, 0x5a, 0x12, 0x8e, 0x81, 0x90, 0x7f, 0xc3} }, +{ 0x8efa, 8, {0xe5, 0x5a, 0xf0, 0x7f, 0x01, 0x22, 0x7f, 0x00} }, +{ 0x8f02, 1, {0x22} }, +{ 0x8f03, 16, {0x90, 0x01, 0x84, 0x74, 0x0b, 0xf0, 0x90, 0x20, 0x70, 0xe0, 0x54, 0xf0, 0xff, 0xc4, 0x54, 0x0f} }, +{ 0x8f13, 16, {0x90, 0x01, 0x85, 0xf0, 0x90, 0x95, 0xbf, 0xe4, 0x93, 0x90, 0x01, 0x86, 0xf0, 0x90, 0x95, 0xc0} }, +{ 0x8f23, 16, {0xe4, 0x93, 0x90, 0x01, 0x87, 0xf0, 0xe4, 0x90, 0x01, 0x7c, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3} }, +{ 0x8f33, 16, {0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0x88, 0xf0, 0x7e} }, +{ 0x8f43, 16, {0x01, 0x7f, 0x7c, 0x12, 0x10, 0x2c, 0x7e, 0x01, 0x7f, 0x84, 0x7d, 0x14, 0x12, 0x8e, 0xb4, 0x7f} }, +{ 0x8f53, 1, {0x00} }, +{ 0x8f54, 1, {0x22} }, +{ 0x8f55, 16, {0x7e, 0x7b, 0x7f, 0x40, 0x75, 0x4b, 0x7b, 0x75, 0x4c, 0x40, 0x90, 0x7f, 0xd3, 0xe0, 0xff, 0x85} }, +{ 0x8f65, 16, {0x4b, 0x4e, 0x85, 0x4c, 0x4f, 0xe5, 0x4f, 0x24, 0x01, 0xf5, 0x53, 0xe4, 0x35, 0x4e, 0xf5, 0x52} }, +{ 0x8f75, 16, {0xe4, 0xf5, 0x4d, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xe0, 0xfe, 0x14, 0xb4, 0x0c, 0x00, 0x50} }, +{ 0x8f85, 16, {0x5b, 0x90, 0x8f, 0x8d, 0xf8, 0x28, 0x28, 0x73, 0x02, 0x8f, 0xb1, 0x02, 0x8f, 0xb1, 0x02, 0x8f} }, +{ 0x8f95, 16, {0xbb, 0x02, 0x8f, 0xc5, 0x02, 0x8f, 0xc5, 0x02, 0x8f, 0xc5, 0x02, 0x8f, 0xd9, 0x02, 0x8f, 0xb1} }, +{ 0x8fa5, 16, {0x02, 0x8f, 0xcf, 0x02, 0x8f, 0xb1, 0x02, 0x8f, 0xe1, 0x02, 0x8f, 0xb1, 0xef, 0x64, 0x02, 0x60} }, +{ 0x8fb5, 16, {0x2b, 0x75, 0x4d, 0xff, 0x80, 0x26, 0xef, 0x64, 0x0e, 0x60, 0x21, 0x75, 0x4d, 0xff, 0x80, 0x1c} }, +{ 0x8fc5, 16, {0xef, 0x64, 0x03, 0x60, 0x17, 0x75, 0x4d, 0xff, 0x80, 0x12, 0xef, 0x64, 0x03, 0x60, 0x0d, 0x75} }, +{ 0x8fd5, 16, {0x4d, 0xff, 0x80, 0x08, 0xef, 0x64, 0x06, 0x60, 0x03, 0x75, 0x4d, 0xff, 0xe5, 0x4d, 0x60, 0x15} }, +{ 0x8fe5, 16, {0x90, 0x01, 0x98, 0x74, 0x11, 0xf0, 0xa3, 0xee, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x02, 0x12} }, +{ 0x8ff5, 16, {0x8e, 0xb4, 0xaf, 0x4d, 0x22, 0xe4, 0xf5, 0x4d, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xe0, 0x14} }, +{ 0x9005, 16, {0xb4, 0x0f, 0x00, 0x40, 0x03, 0x02, 0x91, 0x23, 0x90, 0x90, 0x14, 0xf8, 0x28, 0x28, 0x73, 0x02} }, +{ 0x9015, 16, {0x90, 0x41, 0x02, 0x90, 0x4d, 0x02, 0x90, 0x59, 0x02, 0x90, 0xa7, 0x02, 0x90, 0xb2, 0x02, 0x90} }, +{ 0x9025, 16, {0xbd, 0x02, 0x90, 0xc8, 0x02, 0x90, 0xd3, 0x02, 0x90, 0xde, 0x02, 0x90, 0xe9, 0x02, 0x90, 0xf4} }, +{ 0x9035, 16, {0x02, 0x90, 0xfb, 0x02, 0x91, 0x23, 0x02, 0x91, 0x06, 0x02, 0x91, 0x11, 0xaf, 0x53, 0xae, 0x52} }, +{ 0x9045, 16, {0x12, 0x83, 0xb7, 0x8f, 0x4d, 0x02, 0x91, 0x26, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x84, 0x95, 0x8f} }, +{ 0x9055, 16, {0x4d, 0x02, 0x91, 0x26, 0x85, 0x52, 0x50, 0x85, 0x53, 0x51, 0xe5, 0x51, 0x24, 0x01, 0xff, 0xe4} }, +{ 0x9065, 16, {0x35, 0x50, 0xfe, 0x12, 0x85, 0x2f, 0xaf, 0x51, 0xae, 0x50, 0x12, 0x85, 0xc2, 0x8f, 0x4d, 0xef} }, +{ 0x9075, 16, {0x64, 0x01, 0x60, 0x03, 0x02, 0x91, 0x26, 0xaf, 0x51, 0xae, 0x50, 0x12, 0x86, 0x17, 0x8f, 0x4d} }, +{ 0x9085, 16, {0xe5, 0x4d, 0x70, 0x03, 0x02, 0x91, 0x26, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xe0, 0x75, 0xf0} }, +{ 0x9095, 16, {0x0d, 0xa4, 0x24, 0xf4, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xaf, 0x82, 0xfe, 0x12, 0x86, 0x17, 0x02} }, +{ 0x90a5, 16, {0x91, 0x26, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x8a, 0x2a, 0x8f, 0x4d, 0x80, 0x74, 0xaf, 0x53, 0xae} }, +{ 0x90b5, 16, {0x52, 0x12, 0x8a, 0x73, 0x8f, 0x4d, 0x80, 0x69, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x8a, 0xbc, 0x8f} }, +{ 0x90c5, 16, {0x4d, 0x80, 0x5e, 0xaf, 0x4c, 0xae, 0x4b, 0x12, 0x8b, 0xe5, 0x8f, 0x4d, 0x80, 0x53, 0xaf, 0x53} }, +{ 0x90d5, 16, {0xae, 0x52, 0x12, 0x89, 0x5b, 0x8f, 0x4d, 0x80, 0x48, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x1a, 0xf1} }, +{ 0x90e5, 16, {0x8f, 0x4d, 0x80, 0x3d, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x89, 0xe6, 0x8f, 0x4d, 0x80, 0x32, 0x12} }, +{ 0x90f5, 16, {0x8f, 0x03, 0x8f, 0x4d, 0x80, 0x2b, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x8b, 0x01, 0x8f, 0x4d, 0x80} }, +{ 0x9105, 16, {0x20, 0xaf, 0x53, 0xae, 0x52, 0x12, 0x8b, 0x22, 0x8f, 0x4d, 0x80, 0x15, 0xaf, 0x4c, 0xae, 0x4b} }, +{ 0x9115, 16, {0x7c, 0x02, 0x7d, 0xaf, 0x7b, 0x40, 0x12, 0x8e, 0x81, 0xe4, 0xf5, 0x4d, 0x80, 0x03, 0x75, 0x4d} }, +{ 0x9125, 16, {0xff, 0xe5, 0x4d, 0x60, 0x1d, 0x90, 0x01, 0x98, 0x74, 0x11, 0xf0, 0x85, 0x4f, 0x82, 0x85, 0x4e} }, +{ 0x9135, 16, {0x83, 0xe0, 0x90, 0x01, 0x99, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x02, 0x12, 0x8e, 0xb4, 0xaf} }, +{ 0x9145, 16, {0x4d, 0x22, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xe0, 0xff, 0x14, 0x24, 0xfa, 0x50, 0x04, 0x24} }, +{ 0x9155, 16, {0xfe, 0x70, 0x1f, 0x90, 0x01, 0x98, 0x74, 0x10, 0xf0, 0xa3, 0xef, 0xf0, 0x85, 0x53, 0x82, 0x85} }, +{ 0x9165, 16, {0x52, 0x83, 0xe0, 0x90, 0x01, 0x9a, 0xf0, 0x7e, 0x01, 0x7f, 0x98, 0x7d, 0x03, 0x12, 0x8e, 0xb4} }, +{ 0x9175, 4, {0x8f, 0x4d, 0xaf, 0x4d} }, +{ 0x9179, 1, {0x22} }, +{ 0x917a, 8, {0x8f, 0x4e, 0x8e, 0x4d, 0x8d, 0x4c, 0x8c, 0x4b} }, +{ 0x9182, 16, {0x75, 0x55, 0x01, 0x75, 0x56, 0x9c, 0xe4, 0xf5, 0x54, 0xaf, 0x50, 0x15, 0x50, 0xef, 0x70, 0x03} }, +{ 0x9192, 16, {0x02, 0x92, 0x18, 0xaf, 0x4f, 0xe4, 0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xaf, 0x4e} }, +{ 0x91a2, 16, {0xae, 0x4d, 0xad, 0x4c, 0xac, 0x4b, 0x12, 0xa0, 0x2e, 0xaf, 0x03, 0x8f, 0x53, 0xaf, 0x4e, 0xae} }, +{ 0x91b2, 16, {0x4d, 0xad, 0x4c, 0xac, 0x4b, 0xc0, 0x04, 0xc0, 0x05, 0xc0, 0x06, 0xc0, 0x07, 0xaf, 0x4f, 0xe4} }, +{ 0x91c2, 16, {0xfc, 0xfd, 0xfe, 0xf8, 0xf9, 0xfa, 0xab, 0x07, 0xd0, 0x07, 0xd0, 0x06, 0xd0, 0x05, 0xd0, 0x04} }, +{ 0x91d2, 16, {0x12, 0xa0, 0x2e, 0x8f, 0x4e, 0x8e, 0x4d, 0x8d, 0x4c, 0x8c, 0x4b, 0xe5, 0x53, 0x24, 0x30, 0xf5} }, +{ 0x91e2, 16, {0x53, 0xd3, 0x94, 0x39, 0x40, 0x06, 0x74, 0x07, 0x25, 0x53, 0xf5, 0x53, 0x05, 0x56, 0xe5, 0x56} }, +{ 0x91f2, 16, {0xae, 0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe4, 0xf0, 0x05, 0x56, 0xe5} }, +{ 0x9202, 16, {0x56, 0xae, 0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf5, 0x82, 0x8e, 0x83, 0xe5, 0x53, 0xf0, 0x05} }, +{ 0x9212, 16, {0x54, 0x05, 0x54, 0x02, 0x91, 0x8b, 0xe5, 0x56, 0x15, 0x56, 0x70, 0x02, 0x15, 0x55, 0xaf, 0x54} }, +{ 0x9222, 16, {0x15, 0x54, 0xef, 0x60, 0x23, 0xe5, 0x56, 0x15, 0x56, 0xae, 0x55, 0x70, 0x02, 0x15, 0x55, 0xf5} }, +{ 0x9232, 16, {0x82, 0x8e, 0x83, 0xe0, 0xff, 0x05, 0x52, 0xe5, 0x52, 0xac, 0x51, 0x70, 0x02, 0x05, 0x51, 0x14} }, +{ 0x9242, 8, {0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x80, 0xd6} }, +{ 0x924a, 1, {0x22} }, +{ 0x924b, 16, {0xaa, 0x07, 0xa9, 0x05, 0x90, 0x01, 0xc9, 0xe0, 0xc3, 0x94, 0x40, 0x50, 0x61, 0xac, 0x02, 0x74} }, +{ 0x925b, 16, {0x01, 0x7e, 0x00, 0xa8, 0x04, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce, 0x33, 0xce, 0xd8, 0xf9, 0xff} }, +{ 0x926b, 16, {0xe4, 0xef, 0x55, 0x30, 0x60, 0x45, 0xea, 0x04, 0xff, 0x90, 0x01, 0xc2, 0xe0, 0xfc, 0xa3, 0xe0} }, +{ 0x927b, 16, {0xfd, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0xa3, 0xe9, 0xf0, 0x8d, 0x82, 0x8c, 0x83, 0xa3, 0xa3} }, +{ 0x928b, 16, {0xeb, 0xf0, 0x90, 0x01, 0xc2, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x9f, 0x8e, 0xfc, 0xd3, 0xe5, 0xf0} }, +{ 0x929b, 16, {0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xc2, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} }, +{ 0x92ab, 16, {0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x04, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} }, +{ 0x92bb, 1, {0x22} }, +{ 0x92bc, 16, {0x90, 0x01, 0xc9, 0xe0, 0xd3, 0x94, 0x00, 0x40, 0x55, 0x90, 0x01, 0xbe, 0xe0, 0xfc, 0xa3, 0xe0} }, +{ 0x92cc, 16, {0xaa, 0x04, 0xf9, 0x7b, 0x01, 0xc0, 0x03, 0xc0, 0x02, 0xc0, 0x01, 0xaa, 0x06, 0xa9, 0x07, 0xa8} }, +{ 0x92dc, 16, {0x01, 0xac, 0x02, 0xad, 0x03, 0xd0, 0x01, 0xd0, 0x02, 0xd0, 0x03, 0x7e, 0x00, 0x7f, 0x03, 0x12} }, +{ 0x92ec, 16, {0x9f, 0x1f, 0x90, 0x01, 0xbe, 0xe4, 0x75, 0xf0, 0x03, 0x12, 0x9f, 0x8e, 0xfc, 0xd3, 0xe5, 0xf0} }, +{ 0x92fc, 16, {0x94, 0x87, 0xec, 0x94, 0x02, 0x40, 0x0a, 0x90, 0x01, 0xbe, 0x74, 0x01, 0xf0, 0xa3, 0x74, 0xca} }, +{ 0x930c, 16, {0xf0, 0xc2, 0xaf, 0x90, 0x01, 0xc9, 0xe0, 0x14, 0xf0, 0xd2, 0xaf, 0x7f, 0x01, 0x22, 0x7f, 0x00} }, +{ 0x931c, 1, {0x22} }, +{ 0x931d, 16, {0x90, 0x7f, 0xc2, 0xe0, 0x20, 0xe1, 0x73, 0x7e, 0x7b, 0x7f, 0x80, 0x75, 0x50, 0x7b, 0x75, 0x51} }, +{ 0x932d, 16, {0x80, 0xe5, 0x51, 0x24, 0x01, 0xff, 0xe4, 0x35, 0x50, 0xa9, 0x07, 0x7b, 0x01, 0x8b, 0x52, 0xf5} }, +{ 0x933d, 16, {0x53, 0x89, 0x54, 0xfe, 0x12, 0x92, 0xbc, 0xef, 0x60, 0x50, 0xab, 0x52, 0xaa, 0x53, 0xa9, 0x54} }, +{ 0x934d, 16, {0x12, 0x9f, 0x48, 0x14, 0xff, 0x90, 0x00, 0x01, 0x12, 0x9f, 0x61, 0xb4, 0x02, 0x16, 0xc2, 0xaf} }, +{ 0x935d, 16, {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x01, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x44} }, +{ 0x936d, 16, {0x04, 0xf0, 0xd2, 0xaf, 0x74, 0x01, 0x7e, 0x00, 0xa8, 0x07, 0x08, 0x80, 0x05, 0xc3, 0x33, 0xce} }, +{ 0x937d, 16, {0x33, 0xce, 0xd8, 0xf9, 0xff, 0xe4, 0xef, 0x55, 0x30, 0x60, 0x0f, 0x85, 0x51, 0x82, 0x85, 0x50} }, +{ 0x938d, 10, {0x83, 0x74, 0x0d, 0xf0, 0x90, 0x7f, 0xc3, 0x74, 0x04, 0xf0} }, +{ 0x9397, 1, {0x22} }, +{ 0x9398, 16, {0x12, 0x93, 0x1d, 0xe4, 0xf5, 0x4b, 0x74, 0x36, 0x25, 0x4b, 0xf8, 0xe6, 0x54, 0xf0, 0xf5, 0x4c} }, +{ 0x93a8, 16, {0x74, 0xc5, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5, 0x83, 0xe0, 0x65, 0x4c, 0xff, 0xc4} }, +{ 0x93b8, 16, {0x54, 0x0f, 0xf5, 0x4d, 0x60, 0x22, 0x74, 0xc5, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x01, 0xf5} }, +{ 0x93c8, 16, {0x83, 0xe5, 0x4c, 0xf0, 0xaf, 0x4b, 0x7d, 0x01, 0xe5, 0x4c, 0x45, 0x4d, 0xfb, 0x12, 0x92, 0x4b} }, +{ 0x93d8, 16, {0xef, 0x70, 0x05, 0x12, 0x93, 0x1d, 0x80, 0xec, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40} }, +{ 0x93e8, 16, {0xb5, 0x12, 0x93, 0x1d, 0xe5, 0x3a, 0x60, 0x48, 0xe4, 0xf5, 0x4b, 0xaf, 0x4b, 0x74, 0x01, 0xa8} }, +{ 0x93f8, 16, {0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4c, 0x55, 0x3a, 0x60, 0x29, 0xe5, 0x4b} }, +{ 0x9408, 16, {0x75, 0xf0, 0x08, 0xa4, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xf5, 0x83, 0xe0, 0x30, 0xe6} }, +{ 0x9418, 16, {0x16, 0xaf, 0x4b, 0x7d, 0x04, 0x7b, 0x80, 0x12, 0x92, 0x4b, 0xef, 0x70, 0x05, 0x12, 0x93, 0x1d} }, +{ 0x9428, 16, {0x80, 0xef, 0xe5, 0x4c, 0xf4, 0x52, 0x3a, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40, 0xbb} }, +{ 0x9438, 16, {0x90, 0x03, 0x00, 0xe0, 0x60, 0x03, 0x02, 0x95, 0x05, 0x74, 0x19, 0xf0, 0x7f, 0x02, 0x12, 0x81} }, +{ 0x9448, 16, {0xd9, 0x8e, 0x4e, 0x8f, 0x4f, 0xc3, 0xe5, 0x4e, 0x64, 0x80, 0x94, 0x80, 0x40, 0xee, 0x90, 0x01} }, +{ 0x9458, 16, {0xbc, 0xe0, 0x65, 0x4f, 0xf0, 0x60, 0x37, 0xe4, 0xf5, 0x4b, 0xaf, 0x4b, 0x74, 0x01, 0xa8, 0x07} }, +{ 0x9468, 16, {0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4c, 0x90, 0x01, 0xbc, 0xe0, 0x55, 0x4c, 0x60} }, +{ 0x9478, 16, {0x14, 0xaf, 0x4b, 0x7d, 0x08, 0xe5, 0x4c, 0x55, 0x4f, 0xfb, 0x12, 0x92, 0x4b, 0xef, 0x70, 0x05} }, +{ 0x9488, 16, {0x12, 0x93, 0x1d, 0x80, 0xec, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40, 0xcc, 0x90, 0x01} }, +{ 0x9498, 16, {0xbc, 0xe5, 0x4f, 0xf0, 0xe4, 0xf5, 0x4b, 0xc2, 0xaf, 0x74, 0x32, 0x25, 0x4b, 0xf8, 0xe6, 0xf5} }, +{ 0x94a8, 16, {0x4c, 0xe4, 0xf6, 0xd2, 0xaf, 0x53, 0x4c, 0x1e, 0xe5, 0x4c, 0x60, 0x11, 0xaf, 0x4b, 0x7d, 0x02} }, +{ 0x94b8, 16, {0xab, 0x4c, 0x12, 0x92, 0x4b, 0xef, 0x70, 0x05, 0x12, 0x93, 0x1d, 0x80, 0xef, 0x74, 0x2c, 0x25} }, +{ 0x94c8, 16, {0x4b, 0xf8, 0xe6, 0xf5, 0x4c, 0x74, 0xfc, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83} }, +{ 0x94d8, 16, {0xe0, 0x65, 0x4c, 0x60, 0x11, 0xaf, 0x4b, 0x7d, 0x04, 0xab, 0x4c, 0x12, 0x92, 0x4b, 0xef, 0x70} }, +{ 0x94e8, 16, {0x05, 0x12, 0x93, 0x1d, 0x80, 0xef, 0x74, 0xfc, 0x25, 0x4b, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5} }, +{ 0x94f8, 16, {0x83, 0xe5, 0x4c, 0xf0, 0x05, 0x4b, 0xe5, 0x4b, 0xc3, 0x94, 0x04, 0x40, 0x9a, 0x12, 0x93, 0x1d} }, +{ 0x9508, 1, {0x22} }, +{ 0x9509, 12, {0x78, 0x7f, 0xe4, 0xf6, 0xd8, 0xfd, 0x75, 0x81, 0x62, 0x02, 0x95, 0x50} }, +{ 0x9515, 16, {0x02, 0x05, 0xad, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0x40, 0x03, 0xf6, 0x80, 0x01, 0xf2} }, +{ 0x9525, 16, {0x08, 0xdf, 0xf4, 0x80, 0x29, 0xe4, 0x93, 0xa3, 0xf8, 0x54, 0x07, 0x24, 0x0c, 0xc8, 0xc3, 0x33} }, +{ 0x9535, 16, {0xc4, 0x54, 0x0f, 0x44, 0x20, 0xc8, 0x83, 0x40, 0x04, 0xf4, 0x56, 0x80, 0x01, 0x46, 0xf6, 0xdf} }, +{ 0x9545, 16, {0xe4, 0x80, 0x0b, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x90, 0x95, 0x95, 0xe4, 0x7e} }, +{ 0x9555, 16, {0x01, 0x93, 0x60, 0xbc, 0xa3, 0xff, 0x54, 0x3f, 0x30, 0xe5, 0x09, 0x54, 0x1f, 0xfe, 0xe4, 0x93} }, +{ 0x9565, 16, {0xa3, 0x60, 0x01, 0x0e, 0xcf, 0x54, 0xc0, 0x25, 0xe0, 0x60, 0xa8, 0x40, 0xb8, 0xe4, 0x93, 0xa3} }, +{ 0x9575, 16, {0xfa, 0xe4, 0x93, 0xa3, 0xf8, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca} }, +{ 0x9585, 16, {0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xca, 0xc5, 0x83, 0xca, 0xdf, 0xe9, 0xde, 0xe7, 0x80, 0xbe} }, +{ 0x9595, 16, {0x60, 0x24, 0x02, 0x8a, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x81, 0x82, 0x84, 0x88} }, +{ 0x95a5, 16, {0x90, 0xa0, 0xc0, 0xc1, 0xc2, 0xc4, 0xc8, 0xd0, 0xe0, 0xe1, 0xe2, 0xe4, 0xe8, 0xf0, 0xf1, 0xf2} }, +{ 0x95b5, 8, {0xf4, 0xf8, 0xf9, 0xfa, 0xfc, 0xfd, 0xfe, 0xff} }, +{ 0x95bd, 1, {0x00} }, +{ 0x95be, 3, {0x00, 0x03, 0x1d} }, +{ 0x95c1, 8, {0x8b, 0x54, 0x8a, 0x55, 0x89, 0x56, 0x8d, 0x57} }, +{ 0x95c9, 16, {0xe4, 0xf5, 0x58, 0xf5, 0x59, 0xaf, 0x57, 0x15, 0x57, 0xef, 0x60, 0x36, 0xab, 0x54, 0x05, 0x56} }, +{ 0x95d9, 16, {0xe5, 0x56, 0xaa, 0x55, 0x70, 0x02, 0x05, 0x55, 0x14, 0xf9, 0x12, 0x9f, 0x48, 0xff, 0xe5, 0x58} }, +{ 0x95e9, 16, {0xe5, 0x59, 0x6f, 0x25, 0xe0, 0xff, 0xe4, 0x33, 0xfe, 0x74, 0xa2, 0x2f, 0xf5, 0x82, 0xee, 0x34} }, +{ 0x95f9, 16, {0x9b, 0xf5, 0x83, 0xe5, 0x58, 0xff, 0xe4, 0x93, 0xf5, 0x58, 0x74, 0x01, 0x93, 0x6f, 0xf5, 0x59} }, +{ 0x9609, 6, {0x80, 0xc3, 0xae, 0x58, 0xaf, 0x59} }, +{ 0x960f, 1, {0x22} }, +{ 0x9610, 11, {0xc0, 0xe0, 0xc0, 0x83, 0xc0, 0x82, 0xc0, 0xd0, 0x75, 0xd0, 0x18} }, +{ 0x961b, 16, {0x90, 0x20, 0x60, 0xe0, 0x54, 0x0f, 0xfe, 0x30, 0xe0, 0x05, 0x90, 0x20, 0x02, 0xe0, 0xff, 0xee} }, +{ 0x962b, 16, {0x30, 0xe1, 0x05, 0x90, 0x20, 0x0a, 0xe0, 0xff, 0xee, 0x30, 0xe2, 0x05, 0x90, 0x20, 0x12, 0xe0} }, +{ 0x963b, 16, {0xff, 0xee, 0x30, 0xe3, 0x05, 0x90, 0x20, 0x1a, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x1e} }, +{ 0x964b, 10, {0x04, 0xe4, 0xf0, 0x80, 0x05, 0x90, 0x01, 0xc4, 0xee, 0xf0} }, +{ 0x9655, 9, {0xd0, 0xd0, 0xd0, 0x82, 0xd0, 0x83, 0xd0, 0xe0, 0x32} }, +{ 0x965e, 2, {0xa9, 0x03} }, +{ 0x9660, 16, {0xef, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xab, 0x82, 0xfa, 0xe5} }, +{ 0x9670, 16, {0x57, 0x45, 0x58, 0xf5, 0x59, 0xe9, 0x60, 0x14, 0x8a, 0x83, 0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82} }, +{ 0x9680, 16, {0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x4d, 0xf0, 0xe4, 0xfe, 0x80, 0x13, 0xeb, 0x24, 0x04, 0xf5} }, +{ 0x9690, 16, {0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0xff, 0xed, 0xf4, 0xfc, 0xef, 0x5c, 0xf0, 0xae, 0x59, 0xeb} }, +{ 0x96a0, 16, {0x24, 0x06, 0xf5, 0x82, 0xe4, 0x3a, 0xf5, 0x83, 0xe0, 0x55, 0x59, 0xfc, 0xb5, 0x06, 0x03, 0xaf} }, +{ 0x96b0, 16, {0x05, 0x22, 0xe5, 0x57, 0x5c, 0xfe, 0xe5, 0x58, 0x5c, 0xfd, 0xe9, 0x60, 0x16, 0xee, 0x70, 0x04} }, +{ 0x96c0, 16, {0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0xae, 0x07, 0xed, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f} }, +{ 0x96d0, 16, {0x00, 0xad, 0x07, 0xee, 0x60, 0x03, 0xaf, 0x57, 0x22, 0xed, 0x60, 0x03, 0xaf, 0x58, 0x22, 0x7f} }, +{ 0x96e0, 1, {0x00} }, +{ 0x96e1, 1, {0x22} }, +{ 0x96e2, 16, {0x75, 0x50, 0x02, 0x75, 0x51, 0xb0, 0x90, 0x03, 0x35, 0x74, 0x0f, 0xf0, 0x85, 0x51, 0x82, 0x85} }, +{ 0x96f2, 16, {0x50, 0x83, 0xe0, 0xff, 0x90, 0x03, 0x36, 0xf0, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xa3, 0xe0} }, +{ 0x9702, 16, {0x90, 0x03, 0x37, 0xf0, 0xa3, 0x74, 0xff, 0xf0, 0x75, 0x52, 0x03, 0x75, 0x53, 0x39, 0xef, 0x14} }, +{ 0x9712, 16, {0xb4, 0x0b, 0x00, 0x40, 0x03, 0x02, 0x9b, 0x6a, 0x90, 0x97, 0x21, 0xf8, 0x28, 0x28, 0x73, 0x02} }, +{ 0x9722, 16, {0x97, 0x42, 0x02, 0x97, 0xe1, 0x02, 0x98, 0xe6, 0x02, 0x99, 0x06, 0x02, 0x99, 0x06, 0x02, 0x99} }, +{ 0x9732, 16, {0xa1, 0x02, 0x99, 0xdc, 0x02, 0x9a, 0x01, 0x02, 0x9a, 0xbf, 0x02, 0x9a, 0xef, 0x02, 0x9b, 0x1b} }, +{ 0x9742, 16, {0xe4, 0xf5, 0x4b, 0xe5, 0x4b, 0x75, 0xf0, 0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20} }, +{ 0x9752, 16, {0xaf, 0x82, 0xf5, 0x4e, 0x8f, 0x4f, 0xe4, 0xff, 0xe4, 0xfe, 0xef, 0x60, 0x10, 0x74, 0x8a, 0x2e} }, +{ 0x9762, 16, {0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf4, 0xf5, 0x4c, 0x80, 0x0d, 0x74, 0x8a, 0x2e} }, +{ 0x9772, 16, {0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0xf5, 0x4c, 0xe5, 0x4f, 0x24, 0x07, 0xf5, 0x82} }, +{ 0x9782, 16, {0xe4, 0x35, 0x4e, 0xf5, 0x83, 0xe5, 0x4c, 0xf0, 0xe0, 0xf5, 0x4d, 0x65, 0x4c, 0x60, 0x38, 0xe4} }, +{ 0x9792, 16, {0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04, 0xfd, 0x05, 0x53, 0xe5, 0x53, 0xaa, 0x52, 0x70, 0x02} }, +{ 0x97a2, 16, {0x05, 0x52, 0x14, 0xf5, 0x82, 0x8a, 0x83, 0xed, 0xf0, 0x05, 0x53, 0xe5, 0x53, 0xac, 0x52, 0x70} }, +{ 0x97b2, 16, {0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xe5, 0x4c, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52} }, +{ 0x97c2, 16, {0x83, 0xe5, 0x4d, 0xf0, 0x02, 0x9b, 0x70, 0x0e, 0xbe, 0x24, 0x8f, 0x0f, 0xef, 0x64, 0x02, 0x70} }, +{ 0x97d2, 16, {0x87, 0x05, 0x4b, 0xe5, 0x4b, 0x64, 0x04, 0x60, 0x03, 0x02, 0x97, 0x45, 0x02, 0x9b, 0x70, 0xe4} }, +{ 0x97e2, 16, {0xf5, 0x4b, 0xaf, 0x4b, 0xe4, 0xfd, 0x12, 0x82, 0xa8, 0x05, 0x4b, 0xe5, 0x4b, 0xd3, 0x94, 0x03} }, +{ 0x97f2, 16, {0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x96, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xe4, 0xf5, 0x4d, 0x7e} }, +{ 0x9802, 16, {0x20, 0x7f, 0x00, 0x75, 0x4e, 0x20, 0x75, 0x4f, 0x00, 0xf5, 0x4b, 0xaf, 0x4b, 0x74, 0x01, 0xa8} }, +{ 0x9812, 16, {0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0xf5, 0x4c, 0x90, 0x01, 0xc4, 0xf0, 0x90, 0x01} }, +{ 0x9822, 16, {0xc0, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xa3, 0x74, 0x02} }, +{ 0x9832, 16, {0xf0, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x4c, 0x34, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0} }, +{ 0x9842, 16, {0x70, 0xef, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04, 0xff, 0x05, 0x53, 0xe5, 0x53, 0xac, 0x52} }, +{ 0x9852, 16, {0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52} }, +{ 0x9862, 16, {0x83, 0x74, 0xff, 0xf0, 0xe4, 0x90, 0x01, 0xc4, 0xf0, 0x75, 0x4d, 0xff, 0x90, 0x01, 0xc4, 0xe0} }, +{ 0x9872, 16, {0xff, 0x60, 0x37, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04, 0xfe, 0x05, 0x53, 0xe5, 0x53} }, +{ 0x9882, 16, {0xac, 0x52, 0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xee, 0xf0, 0x05, 0x53, 0xe5} }, +{ 0x9892, 16, {0x53, 0xac, 0x52, 0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83, 0xef, 0xf0, 0x85, 0x53} }, +{ 0x98a2, 16, {0x82, 0x85, 0x52, 0x83, 0xe5, 0x4c, 0xf0, 0x75, 0x4d, 0xff, 0xe5, 0x4d, 0x70, 0x16, 0x74, 0x08} }, +{ 0x98b2, 16, {0x25, 0x4f, 0xf5, 0x4f, 0xe4, 0x35, 0x4e, 0xf5, 0x4e, 0x05, 0x4b, 0xe5, 0x4b, 0x64, 0x04, 0x60} }, +{ 0x98c2, 16, {0x03, 0x02, 0x98, 0x0d, 0xe4, 0xf5, 0x4b, 0xaf, 0x4b, 0x7d, 0x01, 0x12, 0x82, 0xa8, 0x05, 0x4b} }, +{ 0x98d2, 16, {0xe5, 0x4b, 0xd3, 0x94, 0x03, 0x40, 0xf0, 0x90, 0x00, 0x04, 0x74, 0x13, 0xf0, 0xa3, 0x74, 0x12} }, +{ 0x98e2, 16, {0xf0, 0x02, 0x9b, 0x70, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xa3, 0xe0, 0x14, 0xff, 0x74, 0x01} }, +{ 0x98f2, 16, {0xa8, 0x07, 0x08, 0x80, 0x02, 0xc3, 0x33, 0xd8, 0xfc, 0x90, 0x02, 0xf7, 0xf0, 0x90, 0x01, 0xc4} }, +{ 0x9902, 16, {0xf0, 0x02, 0x9b, 0x70, 0x90, 0x01, 0xc0, 0x74, 0x03, 0xf0, 0xa3, 0x74, 0xe8, 0xf0, 0xe4, 0xf5} }, +{ 0x9912, 16, {0x4d, 0x90, 0x02, 0xf7, 0xe0, 0xff, 0x90, 0x01, 0xc4, 0xe0, 0xb5, 0x07, 0x19, 0x90, 0x01, 0xc0} }, +{ 0x9922, 16, {0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xea, 0x90, 0x03, 0x38, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52} }, +{ 0x9932, 16, {0x83, 0x74, 0xff, 0xf0, 0xf5, 0x4d, 0xe5, 0x4d, 0x60, 0x03, 0x02, 0x9b, 0x70, 0x90, 0x01, 0xc0} }, +{ 0x9942, 16, {0xf0, 0xa3, 0x74, 0x96, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70, 0xf6, 0x7f} }, +{ 0x9952, 16, {0x02, 0x12, 0x81, 0xd9, 0xc3, 0xee, 0x64, 0x80, 0x94, 0x80, 0x40, 0xf3, 0xef, 0x54, 0x0f, 0xf5} }, +{ 0x9962, 16, {0x4d, 0x90, 0x02, 0xf7, 0xe0, 0x55, 0x4d, 0x70, 0x04, 0x7f, 0x01, 0x80, 0x02, 0x7f, 0x00, 0x8f} }, +{ 0x9972, 16, {0x4c, 0x85, 0x51, 0x82, 0x85, 0x50, 0x83, 0xe0, 0xb4, 0x05, 0x0c, 0xe5, 0x4c, 0x70, 0x04, 0x7f} }, +{ 0x9982, 16, {0x01, 0x80, 0x02, 0x7f, 0x00, 0x8f, 0x4c, 0xe5, 0x4c, 0x70, 0x03, 0x02, 0x9b, 0x70, 0xe4, 0x90} }, +{ 0x9992, 16, {0x03, 0x38, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52, 0x83, 0xe5, 0x4d, 0xf0, 0x02, 0x9b, 0x70, 0xe4} }, +{ 0x99a2, 16, {0xff, 0xfd, 0x12, 0x82, 0xa8, 0x7e, 0x20, 0x7f, 0x00, 0x75, 0x4e, 0x20, 0x75, 0x4f, 0x00, 0x85} }, +{ 0x99b2, 16, {0x4f, 0x82, 0x85, 0x4e, 0x83, 0xa3, 0xa3, 0xa3, 0xe0, 0x44, 0x80, 0xf0, 0x85, 0x4f, 0x82, 0x85} }, +{ 0x99c2, 16, {0x4e, 0x83, 0x74, 0x01, 0xf0, 0xa3, 0xe4, 0xf0, 0x85, 0x4f, 0x82, 0x85, 0x4e, 0x83, 0xa3, 0xa3} }, +{ 0x99d2, 16, {0xa3, 0xe0, 0x54, 0x7f, 0xf0, 0xd2, 0x04, 0x02, 0x9b, 0x70, 0xc2, 0x04, 0x7e, 0x20, 0x7f, 0x00} }, +{ 0x99e2, 16, {0x75, 0x4e, 0x20, 0x75, 0x4f, 0x00, 0xe5, 0x4f, 0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x4e, 0xf5} }, +{ 0x99f2, 16, {0x83, 0xe0, 0x30, 0xe6, 0xf1, 0xe4, 0xff, 0x7d, 0x01, 0x12, 0x82, 0xa8, 0x02, 0x9b, 0x70, 0xe4} }, +{ 0x9a02, 16, {0xf5, 0x4d, 0xf5, 0x4b, 0xaf, 0x4b, 0xe4, 0xfd, 0x12, 0x82, 0xa8, 0xe5, 0x4b, 0x75, 0xf0, 0x08} }, +{ 0x9a12, 16, {0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xaf, 0x82, 0xf5, 0x4e, 0x8f, 0x4f, 0xf5, 0x83} }, +{ 0x9a22, 16, {0xe5, 0x82, 0x24, 0x04, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0xfc, 0xf0, 0xaf} }, +{ 0x9a32, 16, {0x4b, 0x7d, 0x01, 0x7b, 0x01, 0x75, 0x57, 0x80, 0x75, 0x58, 0x40, 0x12, 0x96, 0x5e, 0x8f, 0x4d} }, +{ 0x9a42, 16, {0xe5, 0x4d, 0x70, 0x11, 0xaf, 0x4b, 0x7d, 0x02, 0x7b, 0x01, 0x75, 0x57, 0x10, 0x75, 0x58, 0x20} }, +{ 0x9a52, 16, {0x12, 0x96, 0x5e, 0x8f, 0x4d, 0xe5, 0x4d, 0x70, 0x10, 0xaf, 0x4b, 0x7d, 0x01, 0xfb, 0x75, 0x57} }, +{ 0x9a62, 16, {0x80, 0x75, 0x58, 0x40, 0x12, 0x96, 0x5e, 0x8f, 0x4d, 0xe5, 0x4d, 0x70, 0x10, 0xaf, 0x4b, 0x7d} }, +{ 0x9a72, 16, {0x02, 0xfb, 0x75, 0x57, 0x10, 0x75, 0x58, 0x20, 0x12, 0x96, 0x5e, 0x8f, 0x4d, 0xaf, 0x4b, 0x7d} }, +{ 0x9a82, 16, {0x01, 0x12, 0x82, 0xa8, 0xe5, 0x4d, 0x60, 0x26, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0xe5, 0x4b, 0x04} }, +{ 0x9a92, 16, {0xff, 0x05, 0x53, 0xe5, 0x53, 0xac, 0x52, 0x70, 0x02, 0x05, 0x52, 0x14, 0xf5, 0x82, 0x8c, 0x83} }, +{ 0x9aa2, 16, {0xef, 0xf0, 0x85, 0x53, 0x82, 0x85, 0x52, 0x83, 0xe5, 0x4d, 0xf0, 0x02, 0x9b, 0x70, 0x05, 0x4b} }, +{ 0x9ab2, 16, {0xe5, 0x4b, 0xd3, 0x94, 0x03, 0x50, 0x03, 0x02, 0x9a, 0x06, 0x02, 0x9b, 0x70, 0xe4, 0x90, 0x03} }, +{ 0x9ac2, 16, {0x59, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0x74} }, +{ 0x9ad2, 16, {0x9b, 0xf0, 0xa3, 0x74, 0x92, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x19, 0xc1, 0xef, 0x64, 0x08} }, +{ 0x9ae2, 16, {0x70, 0x03, 0x02, 0x9b, 0x70, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x02, 0x9b, 0x70, 0xe4, 0x90, 0x03} }, +{ 0x9af2, 16, {0x59, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xa3, 0xe5} }, +{ 0x9b02, 16, {0x52, 0xf0, 0xa3, 0xe5, 0x53, 0xf0, 0x7e, 0x03, 0x7f, 0x59, 0x12, 0x10, 0x2c, 0xef, 0x64, 0x08} }, +{ 0x9b12, 16, {0x60, 0x5c, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x80, 0x55, 0xe5, 0x51, 0x24, 0x02, 0xff, 0xe4, 0x35} }, +{ 0x9b22, 16, {0x50, 0xfa, 0xa9, 0x07, 0x7b, 0x01, 0x7d, 0x10, 0x12, 0x95, 0xc1, 0xef, 0x4e, 0x70, 0x32, 0x90} }, +{ 0x9b32, 16, {0x03, 0x59, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0xf0, 0xa3, 0x74, 0x10, 0xf0, 0xe5} }, +{ 0x9b42, 16, {0x51, 0x24, 0x02, 0x90, 0x03, 0x60, 0xf0, 0xe4, 0x35, 0x50, 0x90, 0x03, 0x5f, 0xf0, 0x7e, 0x03} }, +{ 0x9b52, 16, {0x7f, 0x59, 0x12, 0x19, 0xc1, 0xef, 0x64, 0x08, 0x60, 0x14, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x80} }, +{ 0x9b62, 16, {0x0d, 0xe4, 0x90, 0x03, 0x38, 0xf0, 0x80, 0x06, 0x90, 0x03, 0x38, 0x74, 0x01, 0xf0, 0x90, 0x01} }, +{ 0x9b72, 16, {0xc0, 0xe4, 0xf0, 0xa3, 0x74, 0x0a, 0xf0, 0x90, 0x01, 0xc0, 0xe0, 0x70, 0x02, 0xa3, 0xe0, 0x70} }, +{ 0x9b82, 15, {0xf6, 0x7e, 0x03, 0x7f, 0x35, 0x7d, 0x24, 0x12, 0x8e, 0xb4, 0xe4, 0x90, 0x02, 0xaf, 0xf0} }, +{ 0x9b91, 1, {0x22} }, +{ 0x9b92, 16, {0xff, 0xfe, 0xfc, 0xf8, 0xf0, 0xe0, 0xc0, 0x80, 0x00, 0x01, 0x03, 0x07, 0x0f, 0x1f, 0x3f, 0x7f} }, +{ 0x9ba2, 16, {0x00, 0x00, 0xc0, 0xc1, 0xc1, 0x81, 0x01, 0x40, 0xc3, 0x01, 0x03, 0xc0, 0x02, 0x80, 0xc2, 0x41} }, +{ 0x9bb2, 16, {0xc6, 0x01, 0x06, 0xc0, 0x07, 0x80, 0xc7, 0x41, 0x05, 0x00, 0xc5, 0xc1, 0xc4, 0x81, 0x04, 0x40} }, +{ 0x9bc2, 16, {0xcc, 0x01, 0x0c, 0xc0, 0x0d, 0x80, 0xcd, 0x41, 0x0f, 0x00, 0xcf, 0xc1, 0xce, 0x81, 0x0e, 0x40} }, +{ 0x9bd2, 16, {0x0a, 0x00, 0xca, 0xc1, 0xcb, 0x81, 0x0b, 0x40, 0xc9, 0x01, 0x09, 0xc0, 0x08, 0x80, 0xc8, 0x41} }, +{ 0x9be2, 16, {0xd8, 0x01, 0x18, 0xc0, 0x19, 0x80, 0xd9, 0x41, 0x1b, 0x00, 0xdb, 0xc1, 0xda, 0x81, 0x1a, 0x40} }, +{ 0x9bf2, 16, {0x1e, 0x00, 0xde, 0xc1, 0xdf, 0x81, 0x1f, 0x40, 0xdd, 0x01, 0x1d, 0xc0, 0x1c, 0x80, 0xdc, 0x41} }, +{ 0x9c02, 16, {0x14, 0x00, 0xd4, 0xc1, 0xd5, 0x81, 0x15, 0x40, 0xd7, 0x01, 0x17, 0xc0, 0x16, 0x80, 0xd6, 0x41} }, +{ 0x9c12, 16, {0xd2, 0x01, 0x12, 0xc0, 0x13, 0x80, 0xd3, 0x41, 0x11, 0x00, 0xd1, 0xc1, 0xd0, 0x81, 0x10, 0x40} }, +{ 0x9c22, 16, {0xf0, 0x01, 0x30, 0xc0, 0x31, 0x80, 0xf1, 0x41, 0x33, 0x00, 0xf3, 0xc1, 0xf2, 0x81, 0x32, 0x40} }, +{ 0x9c32, 16, {0x36, 0x00, 0xf6, 0xc1, 0xf7, 0x81, 0x37, 0x40, 0xf5, 0x01, 0x35, 0xc0, 0x34, 0x80, 0xf4, 0x41} }, +{ 0x9c42, 16, {0x3c, 0x00, 0xfc, 0xc1, 0xfd, 0x81, 0x3d, 0x40, 0xff, 0x01, 0x3f, 0xc0, 0x3e, 0x80, 0xfe, 0x41} }, +{ 0x9c52, 16, {0xfa, 0x01, 0x3a, 0xc0, 0x3b, 0x80, 0xfb, 0x41, 0x39, 0x00, 0xf9, 0xc1, 0xf8, 0x81, 0x38, 0x40} }, +{ 0x9c62, 16, {0x28, 0x00, 0xe8, 0xc1, 0xe9, 0x81, 0x29, 0x40, 0xeb, 0x01, 0x2b, 0xc0, 0x2a, 0x80, 0xea, 0x41} }, +{ 0x9c72, 16, {0xee, 0x01, 0x2e, 0xc0, 0x2f, 0x80, 0xef, 0x41, 0x2d, 0x00, 0xed, 0xc1, 0xec, 0x81, 0x2c, 0x40} }, +{ 0x9c82, 16, {0xe4, 0x01, 0x24, 0xc0, 0x25, 0x80, 0xe5, 0x41, 0x27, 0x00, 0xe7, 0xc1, 0xe6, 0x81, 0x26, 0x40} }, +{ 0x9c92, 16, {0x22, 0x00, 0xe2, 0xc1, 0xe3, 0x81, 0x23, 0x40, 0xe1, 0x01, 0x21, 0xc0, 0x20, 0x80, 0xe0, 0x41} }, +{ 0x9ca2, 16, {0xa0, 0x01, 0x60, 0xc0, 0x61, 0x80, 0xa1, 0x41, 0x63, 0x00, 0xa3, 0xc1, 0xa2, 0x81, 0x62, 0x40} }, +{ 0x9cb2, 16, {0x66, 0x00, 0xa6, 0xc1, 0xa7, 0x81, 0x67, 0x40, 0xa5, 0x01, 0x65, 0xc0, 0x64, 0x80, 0xa4, 0x41} }, +{ 0x9cc2, 16, {0x6c, 0x00, 0xac, 0xc1, 0xad, 0x81, 0x6d, 0x40, 0xaf, 0x01, 0x6f, 0xc0, 0x6e, 0x80, 0xae, 0x41} }, +{ 0x9cd2, 16, {0xaa, 0x01, 0x6a, 0xc0, 0x6b, 0x80, 0xab, 0x41, 0x69, 0x00, 0xa9, 0xc1, 0xa8, 0x81, 0x68, 0x40} }, +{ 0x9ce2, 16, {0x78, 0x00, 0xb8, 0xc1, 0xb9, 0x81, 0x79, 0x40, 0xbb, 0x01, 0x7b, 0xc0, 0x7a, 0x80, 0xba, 0x41} }, +{ 0x9cf2, 16, {0xbe, 0x01, 0x7e, 0xc0, 0x7f, 0x80, 0xbf, 0x41, 0x7d, 0x00, 0xbd, 0xc1, 0xbc, 0x81, 0x7c, 0x40} }, +{ 0x9d02, 16, {0xb4, 0x01, 0x74, 0xc0, 0x75, 0x80, 0xb5, 0x41, 0x77, 0x00, 0xb7, 0xc1, 0xb6, 0x81, 0x76, 0x40} }, +{ 0x9d12, 16, {0x72, 0x00, 0xb2, 0xc1, 0xb3, 0x81, 0x73, 0x40, 0xb1, 0x01, 0x71, 0xc0, 0x70, 0x80, 0xb0, 0x41} }, +{ 0x9d22, 16, {0x50, 0x00, 0x90, 0xc1, 0x91, 0x81, 0x51, 0x40, 0x93, 0x01, 0x53, 0xc0, 0x52, 0x80, 0x92, 0x41} }, +{ 0x9d32, 16, {0x96, 0x01, 0x56, 0xc0, 0x57, 0x80, 0x97, 0x41, 0x55, 0x00, 0x95, 0xc1, 0x94, 0x81, 0x54, 0x40} }, +{ 0x9d42, 16, {0x9c, 0x01, 0x5c, 0xc0, 0x5d, 0x80, 0x9d, 0x41, 0x5f, 0x00, 0x9f, 0xc1, 0x9e, 0x81, 0x5e, 0x40} }, +{ 0x9d52, 16, {0x5a, 0x00, 0x9a, 0xc1, 0x9b, 0x81, 0x5b, 0x40, 0x99, 0x01, 0x59, 0xc0, 0x58, 0x80, 0x98, 0x41} }, +{ 0x9d62, 16, {0x88, 0x01, 0x48, 0xc0, 0x49, 0x80, 0x89, 0x41, 0x4b, 0x00, 0x8b, 0xc1, 0x8a, 0x81, 0x4a, 0x40} }, +{ 0x9d72, 16, {0x4e, 0x00, 0x8e, 0xc1, 0x8f, 0x81, 0x4f, 0x40, 0x8d, 0x01, 0x4d, 0xc0, 0x4c, 0x80, 0x8c, 0x41} }, +{ 0x9d82, 16, {0x44, 0x00, 0x84, 0xc1, 0x85, 0x81, 0x45, 0x40, 0x87, 0x01, 0x47, 0xc0, 0x46, 0x80, 0x86, 0x41} }, +{ 0x9d92, 16, {0x82, 0x01, 0x42, 0xc0, 0x43, 0x80, 0x83, 0x41, 0x41, 0x00, 0x81, 0xc1, 0x80, 0x81, 0x40, 0x40} }, +{ 0x9da2, 16, {0xe4, 0xff, 0x74, 0xf8, 0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x70, 0x03, 0x02} }, +{ 0x9db2, 16, {0x9e, 0x45, 0x74, 0x36, 0x2f, 0xf8, 0xe6, 0x20, 0xe5, 0x03, 0x02, 0x9e, 0x45, 0xef, 0x75, 0xf0} }, +{ 0x9dc2, 16, {0x08, 0xa4, 0x24, 0x00, 0xf5, 0x82, 0xe4, 0x34, 0x20, 0xad, 0x82, 0xfc, 0xf5, 0x83, 0xe5, 0x82} }, +{ 0x9dd2, 16, {0x24, 0x05, 0xf5, 0x82, 0xe4, 0x35, 0x83, 0xf5, 0x83, 0xe0, 0x54, 0x60, 0x64, 0x60, 0x70, 0x63} }, +{ 0x9de2, 16, {0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe4, 0x75, 0xf0, 0x01} }, +{ 0x9df2, 16, {0x12, 0x9f, 0xa4, 0x85, 0xf0, 0x82, 0xf5, 0x83, 0xe0, 0x8d, 0x82, 0x8c, 0x83, 0xf0, 0x74, 0xf8} }, +{ 0x9e02, 16, {0x2f, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xe0, 0x14, 0xf0, 0x70, 0x36, 0xef, 0x25, 0xe0} }, +{ 0x9e12, 16, {0x24, 0xc7, 0xf5, 0x82, 0xe4, 0x34, 0x7f, 0xf5, 0x83, 0xe4, 0xf0, 0xef, 0x25, 0xe0, 0xfe, 0xc3} }, +{ 0x9e22, 16, {0x74, 0x0c, 0x9e, 0x75, 0xf0, 0x40, 0xa4, 0x24, 0x40, 0xf5, 0x82, 0xe5, 0xf0, 0x34, 0x7b, 0xad} }, +{ 0x9e32, 16, {0x82, 0xfc, 0xef, 0x25, 0xe0, 0x24, 0xef, 0xf5, 0x82, 0xe4, 0x34, 0x02, 0xf5, 0x83, 0xec, 0xf0} }, +{ 0x9e42, 12, {0xa3, 0xed, 0xf0, 0x0f, 0xef, 0x64, 0x04, 0x60, 0x03, 0x02, 0x9d, 0xa4} }, +{ 0x9e4e, 1, {0x22} }, +{ 0x9e4f, 16, {0xe7, 0x09, 0xf6, 0x08, 0xdf, 0xfa, 0x80, 0x46, 0xe7, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x3e} }, +{ 0x9e5f, 16, {0x88, 0x82, 0x8c, 0x83, 0xe7, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x32, 0xe3, 0x09, 0xf6, 0x08} }, +{ 0x9e6f, 16, {0xdf, 0xfa, 0x80, 0x78, 0xe3, 0x09, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x70, 0x88, 0x82, 0x8c, 0x83} }, +{ 0x9e7f, 16, {0xe3, 0x09, 0xf0, 0xa3, 0xdf, 0xfa, 0x80, 0x64, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf6, 0x08} }, +{ 0x9e8f, 16, {0xdf, 0xfa, 0x80, 0x58, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0xa3, 0xf2, 0x08, 0xdf, 0xfa, 0x80, 0x4c} }, +{ 0x9e9f, 16, {0x80, 0xd2, 0x80, 0xfa, 0x80, 0xc6, 0x80, 0xd4, 0x80, 0x69, 0x80, 0xf2, 0x80, 0x33, 0x80, 0x10} }, +{ 0x9eaf, 16, {0x80, 0xa6, 0x80, 0xea, 0x80, 0x9a, 0x80, 0xa8, 0x80, 0xda, 0x80, 0xe2, 0x80, 0xca, 0x80, 0x33} }, +{ 0x9ebf, 16, {0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe4, 0x93, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83} }, +{ 0x9ecf, 16, {0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xe9, 0xde, 0xe7, 0x80} }, +{ 0x9edf, 16, {0x0d, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf6, 0x08, 0xdf, 0xf9, 0xec, 0xfa, 0xa9, 0xf0} }, +{ 0x9eef, 16, {0xed, 0xfb, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xec, 0xfa, 0xe0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc} }, +{ 0x9eff, 16, {0xc5, 0x83, 0xcc, 0xf0, 0xa3, 0xc8, 0xc5, 0x82, 0xc8, 0xcc, 0xc5, 0x83, 0xcc, 0xdf, 0xea, 0xde} }, +{ 0x9f0f, 16, {0xe8, 0x80, 0xdb, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0xa3, 0xf2, 0x08, 0xdf, 0xf9, 0x80, 0xcc} }, +{ 0x9f1f, 16, {0x88, 0xf0, 0xed, 0x24, 0x02, 0xb4, 0x04, 0x00, 0x50, 0xc2, 0xf5, 0x82, 0xeb, 0x24, 0x02, 0xb4} }, +{ 0x9f2f, 16, {0x04, 0x00, 0x50, 0xb8, 0x23, 0x23, 0x45, 0x82, 0xf5, 0x82, 0xef, 0x4e, 0x60, 0xae, 0xef, 0x60} }, +{ 0x9f3f, 9, {0x01, 0x0e, 0xe5, 0x82, 0x23, 0x90, 0x9e, 0x9f, 0x73} }, +{ 0x9f48, 16, {0xbb, 0x01, 0x06, 0x89, 0x82, 0x8a, 0x83, 0xe0, 0x22, 0x50, 0x02, 0xe7, 0x22, 0xbb, 0xfe, 0x02} }, +{ 0x9f58, 9, {0xe3, 0x22, 0x89, 0x82, 0x8a, 0x83, 0xe4, 0x93, 0x22} }, +{ 0x9f61, 16, {0xbb, 0x01, 0x0c, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0x22, 0x50} }, +{ 0x9f71, 16, {0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe6, 0x22, 0xbb, 0xfe, 0x06, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0x22} }, +{ 0x9f81, 13, {0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe4, 0x93, 0x22} }, +{ 0x9f8e, 16, {0xc5, 0xf0, 0xf8, 0xa3, 0xe0, 0x28, 0xf0, 0xc5, 0xf0, 0xf8, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02} }, +{ 0x9f9e, 6, {0x15, 0x83, 0xe0, 0x38, 0xf0, 0x22} }, +{ 0x9fa4, 16, {0xa3, 0xf8, 0xe0, 0xc5, 0xf0, 0x25, 0xf0, 0xf0, 0xe5, 0x82, 0x15, 0x82, 0x70, 0x02, 0x15, 0x83} }, +{ 0x9fb4, 6, {0xe0, 0xc8, 0x38, 0xf0, 0xe8, 0x22} }, +{ 0x9fba, 16, {0xbb, 0x01, 0x10, 0xe5, 0x82, 0x29, 0xf5, 0x82, 0xe5, 0x83, 0x3a, 0xf5, 0x83, 0xe0, 0xf5, 0xf0} }, +{ 0x9fca, 16, {0xa3, 0xe0, 0x22, 0x50, 0x09, 0xe9, 0x25, 0x82, 0xf8, 0x86, 0xf0, 0x08, 0xe6, 0x22, 0xbb, 0xfe} }, +{ 0x9fda, 16, {0x0a, 0xe9, 0x25, 0x82, 0xf8, 0xe2, 0xf5, 0xf0, 0x08, 0xe2, 0x22, 0xe5, 0x83, 0x2a, 0xf5, 0x83} }, +{ 0x9fea, 8, {0xe9, 0x93, 0xf5, 0xf0, 0xa3, 0xe9, 0x93, 0x22} }, +{ 0x9ff2, 16, {0x75, 0xf0, 0x08, 0x75, 0x82, 0x00, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xcd, 0x33, 0xcd, 0xcc} }, +{ 0xa002, 16, {0x33, 0xcc, 0xc5, 0x82, 0x33, 0xc5, 0x82, 0x9b, 0xed, 0x9a, 0xec, 0x99, 0xe5, 0x82, 0x98, 0x40} }, +{ 0xa012, 16, {0x0c, 0xf5, 0x82, 0xee, 0x9b, 0xfe, 0xed, 0x9a, 0xfd, 0xec, 0x99, 0xfc, 0x0f, 0xd5, 0xf0, 0xd6} }, +{ 0xa022, 16, {0xe4, 0xce, 0xfb, 0xe4, 0xcd, 0xfa, 0xe4, 0xcc, 0xf9, 0xa8, 0x82, 0x22, 0xb8, 0x00, 0xc1, 0xb9} }, +{ 0xa032, 16, {0x00, 0x59, 0xba, 0x00, 0x2d, 0xec, 0x8b, 0xf0, 0x84, 0xcf, 0xce, 0xcd, 0xfc, 0xe5, 0xf0, 0xcb} }, +{ 0xa042, 16, {0xf9, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc, 0xeb} }, +{ 0xa052, 16, {0x33, 0xfb, 0x10, 0xd7, 0x03, 0x99, 0x40, 0x04, 0xeb, 0x99, 0xfb, 0x0f, 0xd8, 0xe5, 0xe4, 0xf9} }, +{ 0xa062, 16, {0xfa, 0x22, 0x78, 0x18, 0xef, 0x2f, 0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xec, 0x33, 0xfc} }, +{ 0xa072, 16, {0xc9, 0x33, 0xc9, 0x10, 0xd7, 0x05, 0x9b, 0xe9, 0x9a, 0x40, 0x07, 0xec, 0x9b, 0xfc, 0xe9, 0x9a} }, +{ 0xa082, 16, {0xf9, 0x0f, 0xd8, 0xe0, 0xe4, 0xc9, 0xfa, 0xe4, 0xcc, 0xfb, 0x22, 0x75, 0xf0, 0x10, 0xef, 0x2f} }, +{ 0xa092, 16, {0xff, 0xee, 0x33, 0xfe, 0xed, 0x33, 0xfd, 0xcc, 0x33, 0xcc, 0xc8, 0x33, 0xc8, 0x10, 0xd7, 0x07} }, +{ 0xa0a2, 16, {0x9b, 0xec, 0x9a, 0xe8, 0x99, 0x40, 0x0a, 0xed, 0x9b, 0xfd, 0xec, 0x9a, 0xfc, 0xe8, 0x99, 0xf8} }, +{ 0xa0b2, 14, {0x0f, 0xd5, 0xf0, 0xda, 0xe4, 0xcd, 0xfb, 0xe4, 0xcc, 0xfa, 0xe4, 0xc8, 0xf9, 0x22} }, +{ 0xa0c0, 16, {0xeb, 0x9f, 0xf5, 0xf0, 0xea, 0x9e, 0x42, 0xf0, 0xe9, 0x9d, 0x42, 0xf0, 0xe8, 0x9c, 0x45, 0xf0} }, +{ 0xa0d0, 1, {0x22} }, +{ 0xa0d1, 16, {0xe8, 0x60, 0x0f, 0xec, 0xc3, 0x13, 0xfc, 0xed, 0x13, 0xfd, 0xee, 0x13, 0xfe, 0xef, 0x13, 0xff} }, +{ 0xa0e1, 3, {0xd8, 0xf1, 0x22} }, +{ 0xa0e4, 16, {0x08, 0x08, 0x08, 0xe6, 0xcf, 0x2f, 0xf6, 0x18, 0xe6, 0xce, 0x3e, 0xf6, 0x18, 0xe6, 0xcd, 0x3d} }, +{ 0xa0f4, 7, {0xf6, 0x18, 0xe6, 0xcc, 0x3c, 0xf6, 0x22} }, +{ 0xa0fb, 12, {0xec, 0xf0, 0xa3, 0xed, 0xf0, 0xa3, 0xee, 0xf0, 0xa3, 0xef, 0xf0, 0x22} }, +{ 0xa107, 16, {0xa8, 0x82, 0x85, 0x83, 0xf0, 0xd0, 0x83, 0xd0, 0x82, 0x12, 0xa1, 0x1e, 0x12, 0xa1, 0x1e, 0x12} }, +{ 0xa117, 16, {0xa1, 0x1e, 0x12, 0xa1, 0x1e, 0xe4, 0x73, 0xe4, 0x93, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83} }, +{ 0xa127, 16, {0xc8, 0xc5, 0x82, 0xc8, 0xf0, 0xa3, 0xc5, 0x83, 0xc5, 0xf0, 0xc5, 0x83, 0xc8, 0xc5, 0x82, 0xc8} }, +{ 0xa137, 1, {0x22} }, { 0xffff, 0, {0x00} } }; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/usb-storage.c linux.20p6/drivers/usb/usb-storage.c --- linux.vanilla/drivers/usb/usb-storage.c Sun Mar 25 17:31:43 2001 +++ linux.20p6/drivers/usb/usb-storage.c Mon Jun 18 08:13:31 2001 @@ -1636,10 +1636,23 @@ "Shuttle eUSCSI Bridge", US_SC_SCSI, US_PR_BULK, US_FL_ALT_LENGTH}, { 0x04e6, 0x0006, 0x0100, "Shuttle eUSB MMC Adapter", US_SC_SCSI, US_PR_CB, US_FL_SINGLE_LUN}, + { 0x054c, 0x0010, 0x0210, "Sony DSC", US_SC_SCSI, US_PR_CB, + US_FL_SINGLE_LUN | US_FL_START_STOP | US_FL_MODE_XLATE | US_FL_ALT_LENGTH}, + { 0x054c, 0x0010, 0x0322, + "Sony DSC-S75", US_SC_SCSI, US_PR_CB, + US_FL_SINGLE_LUN | US_FL_START_STOP | US_FL_MODE_XLATE | US_FL_ALT_LENGTH}, { 0x057b, 0x0000, 0x0114, "Y-E Data Flashbuster-U", US_SC_UFI, US_PR_CB, US_FL_SINGLE_LUN}, { 0x059b, 0x0030, 0x0100, "Iomega Zip 250", US_SC_SCSI, US_PR_BULK, US_FL_SINGLE_LUN}, + { 0x059b, 0x0031, 0x0100, + "Iomega USB Zip 100", US_SC_SCSI, US_PR_BULK, US_FL_SINGLE_LUN}, + { 0x059b, 0x0032, 0x0100, + "Iomega USB Zip 250", US_SC_SCSI, US_PR_BULK, US_FL_SINGLE_LUN}, + { 0x059b, 0x0034, 0x0100, + "Iomega Zip 100", US_SC_SCSI, US_PR_BULK, US_FL_SINGLE_LUN}, + { 0x0644, 0x1000, 0x0133, + "TEAC CD-210PU", US_SC_8020, US_PR_BULK, US_FL_ALT_LENGTH}, { 0x0693, 0x0002, 0x0100, "Hagiwara FlashGate SmartMedia", US_SC_SCSI, US_PR_BULK, US_FL_ALT_LENGTH}, diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/usb/usb-uhci.c linux.20p6/drivers/usb/usb-uhci.c --- linux.vanilla/drivers/usb/usb-uhci.c Sun Mar 25 17:31:43 2001 +++ linux.20p6/drivers/usb/usb-uhci.c Tue Jun 19 09:59:54 2001 @@ -2297,7 +2297,7 @@ usb_endpoint_halt (urb->dev, usb_pipeendpoint (urb->pipe), usb_pipeout (urb->pipe)); } - // if any error occured: ignore this td, and continue + // if any error occurred: ignore this td, and continue if (status != 0) { //uhci_show_td (desc); urb->error_count++; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/video/atyfb.c linux.20p6/drivers/video/atyfb.c --- linux.vanilla/drivers/video/atyfb.c Sun Mar 25 17:31:39 2001 +++ linux.20p6/drivers/video/atyfb.c Tue Jun 19 09:59:54 2001 @@ -3268,7 +3268,7 @@ addr = dp->addrs[1].address; break; default: - printk("Warning: got %d adresses for ATY:\n", dp->n_addrs); + printk("Warning: got %d addresses for ATY:\n", dp->n_addrs); for (i = 0; i < dp->n_addrs; i++) printk(" %08x-%08x", dp->addrs[i].address, dp->addrs[i].address+dp->addrs[i].size-1); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/video/fbmem.c linux.20p6/drivers/video/fbmem.c --- linux.vanilla/drivers/video/fbmem.c Sun Mar 25 17:31:40 2001 +++ linux.20p6/drivers/video/fbmem.c Mon Jun 18 08:21:04 2001 @@ -251,14 +251,16 @@ { struct fb_info **fi; - len = 0; + int buflen = 0; for (fi = registered_fb; fi < ®istered_fb[FB_MAX] && len < 4000; fi++) if (*fi) - len += sprintf(buf + len, "%d %s\n", + buflen += sprintf(buf + buflen, "%d %s\n", GET_FB_IDX((*fi)->node), (*fi)->modename); *start = buf + offset; - return len > offset ? len - offset : 0; + + buflen = buflen > offset ? buflen - offset : 0; + return len < buflen ? len : buflen; } static ssize_t @@ -498,6 +500,8 @@ (*info->blank)(arg, info); return 0; default: + if (fb->fb_ioctl == NULL) + return -EINVAL; return fb->fb_ioctl(inode, file, cmd, arg, PROC_CONSOLE(info), info); } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/drivers/video/offb.c linux.20p6/drivers/video/offb.c --- linux.vanilla/drivers/video/offb.c Sun Mar 25 17:31:40 2001 +++ linux.20p6/drivers/video/offb.c Tue May 8 15:54:02 2001 @@ -733,7 +733,7 @@ disp->scrollmode = SCROLL_YREDRAW; strcpy(info->info.modename, "OFfb "); - strncat(info->info.modename, full_name, sizeof(info->info.modename)); + strncat(info->info.modename, full_name, sizeof(info->info.modename)-6); info->info.node = -1; info->info.fbops = &offb_ops; info->info.disp = disp; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/binfmt_aout.c linux.20p6/fs/binfmt_aout.c --- linux.vanilla/fs/binfmt_aout.c Sun Mar 25 17:37:38 2001 +++ linux.20p6/fs/binfmt_aout.c Mon Jun 25 14:33:13 2001 @@ -31,16 +31,16 @@ static int load_aout_binary(struct linux_binprm *, struct pt_regs * regs); static int load_aout_library(int fd); -static int aout_core_dump(long signr, struct pt_regs * regs); +static int aout_core_dump(long signr, struct pt_regs * regs, struct file *); extern void dump_thread(struct pt_regs *, struct user *); static struct linux_binfmt aout_format = { -#ifndef MODULE - NULL, NULL, load_aout_binary, load_aout_library, aout_core_dump -#else - NULL, &__this_module, load_aout_binary, load_aout_library, aout_core_dump -#endif + module: THIS_MODULE, + load_binary: load_aout_binary, + load_shlib: load_aout_library, + core_dump: aout_core_dump, + min_coredump: PAGE_SIZE, }; static void set_brk(unsigned long start, unsigned long end) @@ -88,15 +88,11 @@ * dumping of the process results in another error.. */ -static inline int -do_aout_core_dump(long signr, struct pt_regs * regs) +static int +aout_core_dump(long signr, struct pt_regs * regs, struct file * file) { - struct dentry * dentry = NULL; - struct inode * inode = NULL; - struct file * file; mm_segment_t fs; int has_dumped = 0; - char corefile[6+sizeof(current->comm)]; unsigned long dump_start, dump_size; struct user dump; #if defined(__alpha__) @@ -112,32 +108,8 @@ # define START_STACK(u) (u.start_stack) #endif - if (!current->dumpable || atomic_read(¤t->mm->count) != 1) - return 0; - current->dumpable = 0; - -/* See if we have enough room to write the upage. */ - if (current->rlim[RLIMIT_CORE].rlim_cur < PAGE_SIZE) - return 0; fs = get_fs(); set_fs(KERNEL_DS); - memcpy(corefile,"core.",5); -#if 0 - memcpy(corefile+5,current->comm,sizeof(current->comm)); -#else - corefile[4] = '\0'; -#endif - file = filp_open(corefile,O_CREAT | 2 | O_TRUNC | O_NOFOLLOW, 0600); - if (IS_ERR(file)) - goto end_coredump; - dentry = file->f_dentry; - inode = dentry->d_inode; - if (!S_ISREG(inode->i_mode)) - goto close_coredump; - if (!inode->i_op || !inode->i_op->default_file_ops) - goto close_coredump; - if (!file->f_op->write) - goto close_coredump; has_dumped = 1; current->flags |= PF_DUMPCORE; strncpy(dump.u_comm, current->comm, sizeof(current->comm)); @@ -217,23 +189,10 @@ set_fs(KERNEL_DS); DUMP_WRITE(current,sizeof(*current)); close_coredump: - filp_close(file, NULL); -end_coredump: set_fs(fs); return has_dumped; } -static int -aout_core_dump(long signr, struct pt_regs * regs) -{ - int retval; - - MOD_INC_USE_COUNT; - retval = do_aout_core_dump(signr, regs); - MOD_DEC_USE_COUNT; - return retval; -} - /* * create_aout_tables() parses the env- and arg-strings in new user * memory and creates the pointer tables from them, and puts their @@ -473,7 +432,7 @@ regs->gp = ex.a_gpvalue; #endif start_thread(regs, ex.a_entry, p); - if (current->flags & PF_PTRACED) + if (current->ptrace & PT_PTRACED) send_sig(SIGTRAP, current, 0); return 0; } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/binfmt_elf.c linux.20p6/fs/binfmt_elf.c --- linux.vanilla/fs/binfmt_elf.c Sun Mar 25 17:37:38 2001 +++ linux.20p6/fs/binfmt_elf.c Mon Jun 25 14:33:13 2001 @@ -54,7 +54,7 @@ * don't even try. */ #ifdef USE_ELF_CORE_DUMP -static int elf_core_dump(long signr, struct pt_regs * regs); +static int elf_core_dump(long signr, struct pt_regs * regs, struct file *); #else #define elf_core_dump NULL #endif @@ -64,11 +64,11 @@ #define ELF_PAGEALIGN(_v) (((_v) + ELF_EXEC_PAGESIZE - 1) & ~(ELF_EXEC_PAGESIZE - 1)) static struct linux_binfmt elf_format = { -#ifndef MODULE - NULL, NULL, load_elf_binary, load_elf_library, elf_core_dump -#else - NULL, &__this_module, load_elf_binary, load_elf_library, elf_core_dump -#endif + module: THIS_MODULE, + load_binary: load_elf_binary, + load_shlib: load_elf_library, + core_dump: elf_core_dump, + min_coredump: ELF_EXEC_PAGESIZE, }; static void set_brk(unsigned long start, unsigned long end) @@ -799,7 +799,7 @@ #endif start_thread(regs, elf_entry, bprm->p); - if (current->flags & PF_PTRACED) + if (current->ptrace & PT_PTRACED) send_sig(SIGTRAP, current, 0); retval = 0; out: @@ -1078,14 +1078,10 @@ * and then they are actually written out. If we run out of core limit * we just truncate. */ -static int elf_core_dump(long signr, struct pt_regs * regs) +static int elf_core_dump(long signr, struct pt_regs * regs, struct file * file) { int has_dumped = 0; - struct file *file; - struct dentry *dentry; - struct inode *inode; mm_segment_t fs; - char corefile[6+sizeof(current->comm)]; int segs; int i; size_t size = 0; @@ -1099,16 +1095,6 @@ elf_fpregset_t fpu; /* NT_PRFPREG */ struct elf_prpsinfo psinfo; /* NT_PRPSINFO */ - if (!current->dumpable || - limit < ELF_EXEC_PAGESIZE || - atomic_read(¤t->mm->count) != 1) - return 0; - current->dumpable = 0; - -#ifndef CONFIG_BINFMT_ELF - MOD_INC_USE_COUNT; -#endif - segs = current->mm->map_count; #ifdef DEBUG @@ -1139,27 +1125,6 @@ fs = get_fs(); set_fs(KERNEL_DS); - memcpy(corefile,"core.",5); -#if 0 - memcpy(corefile+5,current->comm,sizeof(current->comm)); -#else - corefile[4] = '\0'; -#endif - file = filp_open(corefile, O_CREAT | 2 | O_TRUNC | O_NOFOLLOW, 0600); - if (IS_ERR(file)) - goto end_coredump; - dentry = file->f_dentry; - inode = dentry->d_inode; - if (inode->i_nlink > 1) - goto close_coredump; /* multiple links - don't dump */ - - if (!S_ISREG(inode->i_mode)) - goto close_coredump; - if (!inode->i_op || !inode->i_op->default_file_ops) - goto close_coredump; - if (!file->f_op->write) - goto close_coredump; - has_dumped = 1; current->flags |= PF_DUMPCORE; @@ -1358,13 +1323,8 @@ } close_coredump: - filp_close(file, NULL); - end_coredump: set_fs(fs); -#ifndef CONFIG_BINFMT_ELF - MOD_DEC_USE_COUNT; -#endif return has_dumped; } #endif /* USE_ELF_CORE_DUMP */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/binfmt_em86.c linux.20p6/fs/binfmt_em86.c --- linux.vanilla/fs/binfmt_em86.c Sun Mar 25 17:30:59 2001 +++ linux.20p6/fs/binfmt_em86.c Tue Jun 19 09:37:49 2001 @@ -103,11 +103,8 @@ } struct linux_binfmt em86_format = { -#ifndef MODULE - NULL, 0, load_em86, NULL, NULL -#else - NULL, &__this_module, load_em86, NULL, NULL -#endif + module: THIS_MODULE, + load_binary: load_em86, }; int __init init_em86_binfmt(void) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/binfmt_java.c linux.20p6/fs/binfmt_java.c --- linux.vanilla/fs/binfmt_java.c Sun Mar 25 17:30:59 2001 +++ linux.20p6/fs/binfmt_java.c Tue Jun 19 09:37:49 2001 @@ -150,11 +150,8 @@ } static struct linux_binfmt java_format = { -#ifndef MODULE - NULL, 0, load_java, NULL, NULL -#else - NULL, &__this_module, load_java, NULL, NULL -#endif + module: THIS_MODULE, + load_binary: load_java, }; static int load_applet(struct linux_binprm *bprm,struct pt_regs *regs) @@ -167,11 +164,8 @@ } static struct linux_binfmt applet_format = { -#ifndef MODULE - NULL, 0, load_applet, NULL, NULL -#else - NULL, &__this_module, load_applet, NULL, NULL -#endif + module: THIS_MODULE, + load_binary: load_applet, }; int __init init_java_binfmt(void) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/binfmt_misc.c linux.20p6/fs/binfmt_misc.c --- linux.vanilla/fs/binfmt_misc.c Sun Mar 25 17:37:38 2001 +++ linux.20p6/fs/binfmt_misc.c Tue Jun 19 09:37:49 2001 @@ -48,7 +48,7 @@ typedef struct binfmt_entry { struct binfmt_entry *next; long id; - int flags; /* type, status, etc. */ + long flags; /* type, status, etc. */ int offset; /* offset of magic */ int size; /* size of magic/mask */ char *magic; /* magic or filename extension */ @@ -65,11 +65,8 @@ static int entry_proc_setup(Node *e); static struct linux_binfmt misc_format = { -#ifndef MODULE - NULL, 0, load_misc_binary, NULL, NULL -#else - NULL, &__this_module, load_misc_binary, NULL, NULL -#endif + module: THIS_MODULE, + load_binary: load_misc_binary, }; static struct proc_dir_entry *bm_dir = NULL; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/binfmt_script.c linux.20p6/fs/binfmt_script.c --- linux.vanilla/fs/binfmt_script.c Sun Mar 25 17:30:59 2001 +++ linux.20p6/fs/binfmt_script.c Tue Jun 19 09:37:49 2001 @@ -100,11 +100,8 @@ } struct linux_binfmt script_format = { -#ifndef MODULE - NULL, 0, load_script, NULL, NULL -#else - NULL, &__this_module, load_script, NULL, NULL -#endif + module: THIS_MODULE, + load_binary: load_script, }; int __init init_script_binfmt(void) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/dcache.c linux.20p6/fs/dcache.c --- linux.vanilla/fs/dcache.c Sun Mar 25 17:37:38 2001 +++ linux.20p6/fs/dcache.c Tue Jun 19 09:59:54 2001 @@ -702,7 +702,7 @@ * Note that we have to be a lot more careful about getting the hash * switched - we have to switch the hash value properly even if it * then no longer matches the actual (corrupted) string of the target. - * The has value has to match the hash queue that the dentry is on.. + * The hash value has to match the hash queue that the dentry is on.. */ static inline void switch_names(struct dentry * dentry, struct dentry * target) { @@ -829,7 +829,7 @@ struct dentry *pwd = current->fs->pwd; error = -ENOENT; - /* Has the current directory has been unlinked? */ + /* Has the current directory been unlinked? */ if (pwd->d_parent == pwd || !list_empty(&pwd->d_hash)) { char *page = (char *) __get_free_page(GFP_USER); error = -ENOMEM; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/dquot.c linux.20p6/fs/dquot.c --- linux.vanilla/fs/dquot.c Sun Mar 25 17:37:38 2001 +++ linux.20p6/fs/dquot.c Mon Jun 25 14:26:39 2001 @@ -667,8 +667,6 @@ { int cnt; - if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode) || S_ISLNK(inode->i_mode))) - return 0; if (is_quotafile(inode)) return 0; if (type != -1) @@ -1082,38 +1080,34 @@ unsigned int id = 0; short cnt; - if (S_ISREG(inode->i_mode) || - S_ISDIR(inode->i_mode) || - S_ISLNK(inode->i_mode)) { - /* We don't want to have quotas on quota files - nasty deadlocks possible */ - if (is_quotafile(inode)) - return; - for (cnt = 0; cnt < MAXQUOTAS; cnt++) { - if (type != -1 && cnt != type) + /* We don't want to have quotas on quota files - nasty deadlocks possible */ + if (is_quotafile(inode)) + return; + for (cnt = 0; cnt < MAXQUOTAS; cnt++) { + if (type != -1 && cnt != type) + continue; + + if (!sb_has_quota_enabled(inode->i_sb, cnt)) + continue; + + if (inode->i_dquot[cnt] == NODQUOT) { + switch (cnt) { + case USRQUOTA: + id = inode->i_uid; + break; + case GRPQUOTA: + id = inode->i_gid; + break; + } + dquot = dqget(inode->i_dev, id, cnt); + if (dquot == NODQUOT) continue; - - if (!sb_has_quota_enabled(inode->i_sb, cnt)) + if (inode->i_dquot[cnt] != NODQUOT) { + dqput(dquot); continue; - - if (inode->i_dquot[cnt] == NODQUOT) { - switch (cnt) { - case USRQUOTA: - id = inode->i_uid; - break; - case GRPQUOTA: - id = inode->i_gid; - break; - } - dquot = dqget(inode->i_dev, id, cnt); - if (dquot == NODQUOT) - continue; - if (inode->i_dquot[cnt] != NODQUOT) { - dqput(dquot); - continue; - } - inode->i_dquot[cnt] = dquot; - inode->i_flags |= S_QUOTA; - } + } + inode->i_dquot[cnt] = dquot; + inode->i_flags |= S_QUOTA; } } } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/exec.c linux.20p6/fs/exec.c --- linux.vanilla/fs/exec.c Sun Mar 25 17:37:38 2001 +++ linux.20p6/fs/exec.c Tue Jun 19 09:37:49 2001 @@ -557,7 +557,7 @@ */ static inline int must_not_trace_exec(struct task_struct * p) { - return (p->flags & PF_PTRACED) && !cap_raised(p->p_pptr->cap_effective, CAP_SYS_PTRACE); + return (p->ptrace & PT_PTRACED) && !cap_raised(p->p_pptr->cap_effective, CAP_SYS_PTRACE); } /* @@ -887,4 +887,57 @@ current->dumpable = was_dumpable; return retval; +} + +int do_coredump(long signr, struct pt_regs * regs) +{ + struct linux_binfmt *binfmt; + char corename[6+sizeof(current->comm)]; + struct file * file; + struct inode * inode; + + lock_kernel(); + binfmt = current->binfmt; + if (!binfmt || !binfmt->core_dump) + goto fail; + if (!current->dumpable || atomic_read(¤t->mm->count) != 1) + goto fail; + if (current->rlim[RLIMIT_CORE].rlim_cur < binfmt->min_coredump) + goto fail; + current->dumpable = 0; + + memcpy(corename,"core.", 5); +#if 0 + memcpy(corename+5,current->comm,sizeof(current->comm)); +#else + corename[4] = '\0'; +#endif + file = filp_open(corename, O_CREAT | 2 | O_NOFOLLOW, 0600); + if (IS_ERR(file)) + goto fail; + inode = file->f_dentry->d_inode; + if (inode->i_nlink > 1) + goto close_fail; /* multiple links - don't dump */ + if (list_empty(&file->f_dentry->d_hash)) + goto close_fail; + + if (!S_ISREG(inode->i_mode)) + goto close_fail; + if (!file->f_op) + goto close_fail; + if (!file->f_op->write) + goto close_fail; + if (do_truncate(file->f_dentry, 0) != 0) + goto close_fail; + if (!binfmt->core_dump(signr, regs, file)) + goto close_fail; + filp_close(file, NULL); + unlock_kernel(); + return 1; + +close_fail: + filp_close(file, NULL); +fail: + unlock_kernel(); + return 0; } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/locks.c linux.20p6/fs/locks.c --- linux.vanilla/fs/locks.c Sun Mar 25 17:37:38 2001 +++ linux.20p6/fs/locks.c Fri May 4 23:04:19 2001 @@ -734,6 +734,7 @@ fl->fl_end = OFFSET_MAX; fl->fl_file = filp; fl->fl_owner = NULL; + fl->fl_pid = current->pid; return (1); } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/nfsd/nfssvc.c linux.20p6/fs/nfsd/nfssvc.c --- linux.vanilla/fs/nfsd/nfssvc.c Sun Mar 25 17:30:59 2001 +++ linux.20p6/fs/nfsd/nfssvc.c Tue Jun 19 09:54:08 2001 @@ -6,6 +6,11 @@ * Authors: Olaf Kirch (okir@monad.swb.de) * * Copyright (C) 1995-1999 Olaf Kirch + * + * Apr 24, 2001: Added semaphores around nfsd_cache calls + * to protect it since it can yeild the processor + * in its kmalloc call. + * Craig I. Hagan */ #define __NO_VERSION__ @@ -44,6 +49,8 @@ struct timeval nfssvc_boot = { 0, 0 }; static atomic_t nfsd_active = ATOMIC_INIT(0); +static struct semaphore nfsd_cache_sem = MUTEX; + /* * Maximum number of nfsd processes */ @@ -81,8 +88,9 @@ if (error < 0) goto failure; #endif - + down(&nfsd_cache_sem); nfsd_racache_init(); /* Readahead param cache */ + up(&nfsd_cache_sem); while (nrservs--) { error = svc_create_thread(nfsd, serv); @@ -146,7 +154,6 @@ if (err < 0) break; - /* Lock the export hash tables for reading. */ exp_readlock(); @@ -160,6 +167,7 @@ recalc_sigpending(current); spin_unlock_irq(¤t->sigmask_lock); + svc_process(serv, rqstp); /* Unlock export hash tables */ @@ -180,8 +188,10 @@ /* Count active threads */ if (atomic_dec_and_test(&nfsd_active)) { + down(&nfsd_cache_sem); nfsd_export_shutdown(); /* revoke all exports */ nfsd_racache_shutdown(); /* release read-ahead cache */ + up(&nfsd_cache_sem); } /* Release lockd */ @@ -200,13 +210,19 @@ struct svc_procedure *proc; kxdrproc_t xdr; u32 nfserr; + int res_lookup; dprintk("nfsd_dispatch: vers %d proc %d\n", rqstp->rq_vers, rqstp->rq_proc); proc = rqstp->rq_procinfo; /* Check whether we have this call in the cache. */ - switch (nfsd_cache_lookup(rqstp, proc->pc_cachetype)) { + + down(&nfsd_cache_sem); + res_lookup = nfsd_cache_lookup(rqstp, proc->pc_cachetype); + up(&nfsd_cache_sem); + + switch (res_lookup) { case RC_INTR: case RC_DROPIT: return 0; @@ -220,7 +236,9 @@ xdr = proc->pc_decode; if (xdr && !xdr(rqstp, rqstp->rq_argbuf.buf, rqstp->rq_argp)) { dprintk("nfsd: failed to decode arguments!\n"); + down(&nfsd_cache_sem); nfsd_cache_update(rqstp, RC_NOCACHE, NULL); + up(&nfsd_cache_sem); *statp = rpc_garbage_args; return 1; } @@ -239,7 +257,9 @@ if (xdr && !xdr(rqstp, rqstp->rq_resbuf.buf, rqstp->rq_resp)) { /* Failed to encode result. Release cache entry */ dprintk("nfsd: failed to encode result!\n"); + down(&nfsd_cache_sem); nfsd_cache_update(rqstp, RC_NOCACHE, NULL); + up(&nfsd_cache_sem); *statp = rpc_system_err; return 1; } @@ -250,14 +270,18 @@ && !xdr(rqstp, rqstp->rq_resbuf.buf, rqstp->rq_resp)) { /* Failed to encode result. Release cache entry */ dprintk("nfsd: failed to encode result!\n"); + down(&nfsd_cache_sem); nfsd_cache_update(rqstp, RC_NOCACHE, NULL); + up(&nfsd_cache_sem); *statp = rpc_system_err; return 1; } #endif /* CONFIG_NFSD_V3 */ /* Store reply in cache. */ + down(&nfsd_cache_sem); nfsd_cache_update(rqstp, proc->pc_cachetype, statp + 1); + up(&nfsd_cache_sem); return 1; } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/nls/nls_koi8-r.c linux.20p6/fs/nls/nls_koi8-r.c --- linux.vanilla/fs/nls/nls_koi8-r.c Sun Mar 25 17:31:00 2001 +++ linux.20p6/fs/nls/nls_koi8-r.c Tue Jun 19 09:57:43 2001 @@ -5,6 +5,7 @@ * Generated automatically from the Unicode and charset * tables from the Unicode Organization (www.unicode.org). * The Unicode to charset table has only exact mappings. + * Patched to include KOI8-U and KOI8-RU support */ #include @@ -66,14 +67,14 @@ {0xb0, 0x00}, {0xb2, 0x00}, {0xb7, 0x00}, {0xf7, 0x00}, /* 0xa0*/ {0x50, 0x25}, {0x51, 0x25}, {0x52, 0x25}, {0x51, 0x04}, - {0x53, 0x25}, {0x54, 0x25}, {0x55, 0x25}, {0x56, 0x25}, + {0x54, 0x04}, {0x54, 0x25}, {0x56, 0x04}, {0x57, 0x04}, {0x57, 0x25}, {0x58, 0x25}, {0x59, 0x25}, {0x5a, 0x25}, - {0x5b, 0x25}, {0x5c, 0x25}, {0x5d, 0x25}, {0x5e, 0x25}, + {0x5b, 0x25}, {0x91, 0x04}, {0x5e, 0x04}, {0x5e, 0x25}, /* 0xb0*/ {0x5f, 0x25}, {0x60, 0x25}, {0x61, 0x25}, {0x01, 0x04}, - {0x62, 0x25}, {0x63, 0x25}, {0x64, 0x25}, {0x65, 0x25}, + {0x04, 0x04}, {0x63, 0x25}, {0x06, 0x04}, {0x07, 0x04}, {0x66, 0x25}, {0x67, 0x25}, {0x68, 0x25}, {0x69, 0x25}, - {0x6a, 0x25}, {0x6b, 0x25}, {0x6c, 0x25}, {0xa9, 0x00}, + {0x6a, 0x25}, {0x90, 0x04}, {0x0e, 0x04}, {0xa9, 0x00}, /* 0xc0*/ {0x4e, 0x04}, {0x30, 0x04}, {0x31, 0x04}, {0x46, 0x04}, {0x34, 0x04}, {0x35, 0x04}, {0x44, 0x04}, {0x33, 0x04}, @@ -133,8 +134,8 @@ }; static unsigned char page04[256] = { - 0x00, 0xb3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00-0x07 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08-0x0f */ + 0x00, 0xb3, 0x00, 0x00, 0xb4, 0x00, 0xb6, 0xb7, /* 0x00-0x07 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xbe, 0x00, /* 0x08-0x0f */ 0xe1, 0xe2, 0xf7, 0xe7, 0xe4, 0xe5, 0xf6, 0xfa, /* 0x10-0x17 */ 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, 0xf0, /* 0x18-0x1f */ 0xf2, 0xf3, 0xf4, 0xf5, 0xe6, 0xe8, 0xe3, 0xfe, /* 0x20-0x27 */ @@ -143,8 +144,8 @@ 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, 0xd0, /* 0x38-0x3f */ 0xd2, 0xd3, 0xd4, 0xd5, 0xc6, 0xc8, 0xc3, 0xde, /* 0x40-0x47 */ 0xdb, 0xdd, 0xdf, 0xd9, 0xd8, 0xdc, 0xc0, 0xd1, /* 0x48-0x4f */ - 0x00, 0xa3, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x50-0x57 */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x58-0x5f */ + 0x00, 0xa3, 0x00, 0x00, 0xa4, 0x00, 0xa6, 0xa7, /* 0x50-0x57 */ + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xae, 0x00, /* 0x58-0x5f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x60-0x67 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x68-0x6f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x70-0x77 */ @@ -152,7 +153,7 @@ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x80-0x87 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x88-0x8f */ - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */ + 0xbd, 0xad, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x90-0x97 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x98-0x9f */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa0-0xa7 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8-0xaf */ @@ -306,8 +307,8 @@ 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, /* 0x88-0x8f */ 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, /* 0x90-0x97 */ 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, /* 0x98-0x9f */ - 0xa0, 0xa1, 0xa2, 0x00, 0xa4, 0xa5, 0xa6, 0xa7, /* 0xa0-0xa7 */ - 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, /* 0xa8-0xaf */ + 0xa0, 0xa1, 0xa2, 0x00, 0xb4, 0xa5, 0xb6, 0xb7, /* 0xa0-0xa7 */ + 0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xbd, 0xbe, 0xaf, /* 0xa8-0xaf */ 0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, /* 0xb0-0xb7 */ 0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, /* 0xb8-0xbf */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xc0-0xc7 */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/ntfs/support.c linux.20p6/fs/ntfs/support.c --- linux.vanilla/fs/ntfs/support.c Sun Mar 25 17:31:02 2001 +++ linux.20p6/fs/ntfs/support.c Tue Jun 19 09:59:54 2001 @@ -102,7 +102,7 @@ memmove(dest, src, n); } -/* Warn that an error occured. */ +/* Warn that an error occurred. */ void ntfs_error(const char *fmt,...) { va_list ap; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/open.c linux.20p6/fs/open.c --- linux.vanilla/fs/open.c Sun Mar 25 17:37:38 2001 +++ linux.20p6/fs/open.c Mon Jun 25 14:32:50 2001 @@ -305,9 +305,15 @@ res = PTR_ERR(dentry); if (!IS_ERR(dentry)) { res = permission(dentry->d_inode, mode); - /* SuS v2 requires we report a read only fs too */ - if(!res && (mode & S_IWOTH) && IS_RDONLY(dentry->d_inode)) - res = -EROFS; + + /* SUSv2 says to return EROFS for open() and access() + for files on a read-only filesystem, when writing + is requested. Clearly, we want to be able to run + a system from read-only media, so should not + interpret this to mean that open("/dev/tty") should + fail when the device node lives on a CDROM. + In other words, no additional check is needed here. */ + dput(dentry); } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/proc/mem.c linux.20p6/fs/proc/mem.c --- linux.vanilla/fs/proc/mem.c Sun Mar 25 17:30:58 2001 +++ linux.20p6/fs/proc/mem.c Mon Jun 18 08:35:00 2001 @@ -62,7 +62,7 @@ * that we would allow ptrace to work. */ if (tsk) { - if (!(tsk->flags & PF_PTRACED) + if (!(tsk->ptrace & PT_PTRACED) || tsk->state != TASK_STOPPED || tsk->p_pptr != current) tsk = NULL; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/smbfs/ChangeLog linux.20p6/fs/smbfs/ChangeLog --- linux.vanilla/fs/smbfs/ChangeLog Sun Mar 25 17:37:38 2001 +++ linux.20p6/fs/smbfs/ChangeLog Mon Jun 18 08:25:39 2001 @@ -1,5 +1,16 @@ ChangeLog for smbfs. +2001-05-24 Urban Widmark + + * proc.c: fix smb_proc_open to allow open being called more than once + with different modes (O_RDONLY -> O_WRONLY) without closing. + (bugfix from 2.4.3, fix by Michael Kockelkorn) + * inode.c: tail -f fix for non-readonly opened files + (related to the smb_proc_open change). + (bugfix from 2.4.3) + * inode.c: tail -f fix for fast size changes with the same mtime. + (bugfix from 2.4.3) + 2000-11-22 Igor Zhbanov * proc.c: fixed date_unix2dos for dates earlier than 01/01/1980 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/smbfs/inode.c linux.20p6/fs/smbfs/inode.c --- linux.vanilla/fs/smbfs/inode.c Sun Mar 25 17:30:59 2001 +++ linux.20p6/fs/smbfs/inode.c Mon Jun 18 08:25:39 2001 @@ -242,21 +242,12 @@ { struct inode *inode = dentry->d_inode; time_t last_time; + off_t last_sz; int error = 0; DEBUG1("\n"); /* - * If this is a file opened with write permissions, - * the inode will be up-to-date. - */ - if (S_ISREG(inode->i_mode) && smb_is_open(inode)) - { - if (inode->u.smbfs_i.access != SMB_O_RDONLY) - goto out; - } - - /* * Check whether we've recently refreshed the inode. */ if (time_before(jiffies, inode->u.smbfs_i.oldmtime + HZ/10)) @@ -271,8 +262,9 @@ * (Note: a size change should have a different mtime.) */ last_time = inode->i_mtime; + last_sz = inode->i_size; error = smb_refresh_inode(dentry); - if (error || inode->i_mtime != last_time) + if (error || inode->i_mtime != last_time || inode->i_size != last_sz) { VERBOSE("%s/%s changed, old=%ld, new=%ld\n", DENTRY_PATH(dentry), diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/smbfs/proc.c linux.20p6/fs/smbfs/proc.c --- linux.vanilla/fs/smbfs/proc.c Sun Mar 25 17:37:39 2001 +++ linux.20p6/fs/smbfs/proc.c Tue Jun 19 09:59:54 2001 @@ -609,7 +609,7 @@ * Check for a valid connection. */ if (server->state == CONN_VALID) { - PARANOIA("sucessful, new pid=%d, generation=%d\n", + PARANOIA("successful, new pid=%d, generation=%d\n", server->conn_pid, server->generation); result = 1; } @@ -890,8 +890,6 @@ /* smb_vwv2 has mtime */ /* smb_vwv4 has size */ ino->u.smbfs_i.access = (WVAL(server->packet, smb_vwv6) & SMB_ACCMASK); - if (!(wish & (O_WRONLY | O_RDWR))) - ino->u.smbfs_i.access = SMB_O_RDONLY; ino->u.smbfs_i.open = server->generation; out: diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/fs/super.c linux.20p6/fs/super.c --- linux.vanilla/fs/super.c Sun Mar 25 17:30:58 2001 +++ linux.20p6/fs/super.c Mon Jun 18 08:27:15 2001 @@ -589,7 +589,7 @@ * filesystems which don't use real block-devices. -- jrs */ -static unsigned int unnamed_dev_in_use[256/(8*sizeof(unsigned int))] = { 0, }; +static unsigned long unnamed_dev_in_use[256/(8*sizeof(unsigned long))] = { 0, }; kdev_t get_unnamed_dev(void) { diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-alpha/pci.h linux.20p6/include/asm-alpha/pci.h --- linux.vanilla/include/asm-alpha/pci.h Sun Mar 25 17:31:06 2001 +++ linux.20p6/include/asm-alpha/pci.h Mon Jun 18 08:19:05 2001 @@ -53,4 +53,13 @@ #define IOBASE_SPARSE_IO 3 #define IOBASE_DENSE_IO 4 +/* Return the index of the PCI controller for device PDEV. */ +static __inline__ int pci_controller_num(struct pci_dev *pdev) +{ + if (bus2hose[pdev->bus->number] == NULL) + return -ENXIO; + + return bus2hose[pdev->bus->number]->pci_host_index; +} + #endif /* __ALPHA_PCI_H */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-alpha/resource.h linux.20p6/include/asm-alpha/resource.h --- linux.vanilla/include/asm-alpha/resource.h Sun Mar 25 17:31:06 2001 +++ linux.20p6/include/asm-alpha/resource.h Fri May 4 23:36:09 2001 @@ -25,7 +25,7 @@ {LONG_MAX, LONG_MAX}, /* RLIMIT_CPU */ \ {LONG_MAX, LONG_MAX}, /* RLIMIT_FSIZE */ \ {LONG_MAX, LONG_MAX}, /* RLIMIT_DATA */ \ - {_STK_LIM, _STK_LIM}, /* RLIMIT_STACK */ \ + {_STK_LIM, LONG_MAX}, /* RLIMIT_STACK */ \ { 0, LONG_MAX}, /* RLIMIT_CORE */ \ {LONG_MAX, LONG_MAX}, /* RLIMIT_RSS */ \ {INR_OPEN, INR_OPEN}, /* RLIMIT_NOFILE */ \ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-arm/pci.h linux.20p6/include/asm-arm/pci.h --- linux.vanilla/include/asm-arm/pci.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/include/asm-arm/pci.h Mon Jun 18 08:19:06 2001 @@ -0,0 +1,7 @@ +#ifndef _ARM_PCI_H +#define _ARM_PCI_H + +/* Return the index of the PCI controller for device PDEV. */ +#define pci_controller_num(PDEV) (0) + +#endif /* !(_ARM_PCI_H) */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-i386/pci.h linux.20p6/include/asm-i386/pci.h --- linux.vanilla/include/asm-i386/pci.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/include/asm-i386/pci.h Mon Jun 18 08:19:06 2001 @@ -0,0 +1,7 @@ +#ifndef _I386_PCI_H +#define _I386_PCI_H + +/* Return the index of the PCI controller for device PDEV. */ +#define pci_controller_num(PDEV) (0) + +#endif /* !(_I386_PCI_H) */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-m68k/entry.h linux.20p6/include/asm-m68k/entry.h --- linux.vanilla/include/asm-m68k/entry.h Sun Mar 25 17:31:07 2001 +++ linux.20p6/include/asm-m68k/entry.h Mon Jun 18 08:35:00 2001 @@ -52,12 +52,12 @@ LSIGTRAP = 5 /* process bits for task_struct.flags */ -PF_TRACESYS_OFF = 3 -PF_TRACESYS_BIT = 5 -PF_PTRACED_OFF = 3 -PF_PTRACED_BIT = 4 -PF_DTRACE_OFF = 1 -PF_DTRACE_BIT = 5 +PT_TRACESYS_OFF = 3 +PT_TRACESYS_BIT = 5 +PT_PTRACED_OFF = 3 +PT_PTRACED_BIT = 4 +PT_DTRACE_OFF = 1 +PT_DTRACE_BIT = 5 #define SAVE_ALL_INT save_all_int #define SAVE_ALL_SYS save_all_sys diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-mips/offset.h linux.20p6/include/asm-mips/offset.h --- linux.vanilla/include/asm-mips/offset.h Sun Mar 25 17:31:06 2001 +++ linux.20p6/include/asm-mips/offset.h Mon Jun 18 08:35:00 2001 @@ -49,9 +49,10 @@ #define TASK_FLAGS 4 #define TASK_SIGPENDING 8 #define TASK_NEED_RESCHED 20 -#define TASK_COUNTER 24 -#define TASK_PRIORITY 28 -#define TASK_MM 920 +#define TASK_PTRACE 24 +#define TASK_COUNTER 28 +#define TASK_PRIORITY 32 +#define TASK_MM 924 /* MIPS specific thread_struct offsets. */ #define THREAD_REG16 560 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-mips/pci.h linux.20p6/include/asm-mips/pci.h --- linux.vanilla/include/asm-mips/pci.h Sun Mar 25 17:31:06 2001 +++ linux.20p6/include/asm-mips/pci.h Mon Jun 18 08:19:06 2001 @@ -39,4 +39,7 @@ extern struct pci_ops *pci_ops; +/* Return the index of the PCI controller for device PDEV. */ +#define pci_controller_num(PDEV) (0) + #endif /* __ASM_MIPS_PCI_H */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-ppc/pci.h linux.20p6/include/asm-ppc/pci.h --- linux.vanilla/include/asm-ppc/pci.h Sun Mar 25 17:31:09 2001 +++ linux.20p6/include/asm-ppc/pci.h Mon Jun 18 08:19:06 2001 @@ -9,5 +9,7 @@ #define IOBASE_MEMORY 1 #define IOBASE_IO 2 +/* Return the index of the PCI controller for device PDEV. */ +#define pci_controller_num(PDEV) (0) #endif diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-s390/ccwcache.h linux.20p6/include/asm-s390/ccwcache.h --- linux.vanilla/include/asm-s390/ccwcache.h Sun Mar 25 17:37:39 2001 +++ linux.20p6/include/asm-s390/ccwcache.h Tue Jun 19 09:59:54 2001 @@ -62,7 +62,7 @@ #define CQR_STATUS_FILLED 0x01 /* request is ready to be preocessed */ #define CQR_STATUS_QUEUED 0x02 /* request is queued to be processed */ #define CQR_STATUS_IN_IO 0x04 /* request is currently in IO */ -#define CQR_STATUS_DONE 0x08 /* request is completed sucessfully */ +#define CQR_STATUS_DONE 0x08 /* request is completed successfully */ #define CQR_STATUS_ERROR 0x10 /* request is completed with error */ #define CQR_STATUS_FAILED 0x20 /* request is finally failed */ #define CQR_STATUS_PENDING 0x07 /* request is waiting for interrupt - ERP only */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-s390/irq.h linux.20p6/include/asm-s390/irq.h --- linux.vanilla/include/asm-s390/irq.h Sun Mar 25 17:37:39 2001 +++ linux.20p6/include/asm-s390/irq.h Tue Jun 19 09:59:54 2001 @@ -147,7 +147,7 @@ typedef struct { __u8 cmd_code;/* command code */ - __u8 flags; /* flags, like IDA adressing, etc. */ + __u8 flags; /* flags, like IDA addressing, etc. */ __u16 count; /* byte count */ __u32 cda; /* data address */ } __attribute__ ((packed,aligned(8))) ccw1_t; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-s390/pgtable.h linux.20p6/include/asm-s390/pgtable.h --- linux.vanilla/include/asm-s390/pgtable.h Sun Mar 25 17:37:39 2001 +++ linux.20p6/include/asm-s390/pgtable.h Tue Jun 19 09:59:54 2001 @@ -711,10 +711,10 @@ } /* - * a page-table entry has only 19 bit for offset and 7 bit for type - * if bits 0, 20 or 23 are set, a translation specification exceptions occures, and it's - * hard to find out the failing address - * therefor, we zero out this bits + * a page-table entry has only 19 bits for offset and 7 bits for type + * if bits 0, 20 or 23 are set, a translation specification exception occurs, + * and it's hard to find out the failing address + * therefore, we zero out these bits */ #define SWP_TYPE(entry) (((entry) >> 1) & 0x3f) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-sparc/asm_offsets.h linux.20p6/include/asm-sparc/asm_offsets.h --- linux.vanilla/include/asm-sparc/asm_offsets.h Sun Mar 25 17:37:39 2001 +++ linux.20p6/include/asm-sparc/asm_offsets.h Tue Jun 19 09:34:59 2001 @@ -18,147 +18,149 @@ #define ASIZ_task_exec_domain 0x00000004 #define AOFF_task_need_resched 0x00000014 #define ASIZ_task_need_resched 0x00000004 -#define AOFF_task_counter 0x00000018 +#define AOFF_task_ptrace 0x00000018 +#define ASIZ_task_ptrace 0x00000004 +#define AOFF_task_counter 0x0000001c #define ASIZ_task_counter 0x00000004 -#define AOFF_task_priority 0x0000001c +#define AOFF_task_priority 0x00000020 #define ASIZ_task_priority 0x00000004 -#define AOFF_task_avg_slice 0x00000020 +#define AOFF_task_avg_slice 0x00000024 #define ASIZ_task_avg_slice 0x00000004 -#define AOFF_task_has_cpu 0x00000024 +#define AOFF_task_has_cpu 0x00000028 #define ASIZ_task_has_cpu 0x00000004 -#define AOFF_task_processor 0x00000028 +#define AOFF_task_processor 0x0000002c #define ASIZ_task_processor 0x00000004 -#define AOFF_task_last_processor 0x0000002c +#define AOFF_task_last_processor 0x00000030 #define ASIZ_task_last_processor 0x00000004 -#define AOFF_task_lock_depth 0x00000030 +#define AOFF_task_lock_depth 0x00000034 #define ASIZ_task_lock_depth 0x00000004 -#define AOFF_task_next_task 0x00000034 +#define AOFF_task_next_task 0x00000038 #define ASIZ_task_next_task 0x00000004 -#define AOFF_task_prev_task 0x00000038 +#define AOFF_task_prev_task 0x0000003c #define ASIZ_task_prev_task 0x00000004 -#define AOFF_task_next_run 0x0000003c +#define AOFF_task_next_run 0x00000040 #define ASIZ_task_next_run 0x00000004 -#define AOFF_task_prev_run 0x00000040 +#define AOFF_task_prev_run 0x00000044 #define ASIZ_task_prev_run 0x00000004 -#define AOFF_task_task_exclusive 0x00000044 +#define AOFF_task_task_exclusive 0x00000048 #define ASIZ_task_task_exclusive 0x00000004 -#define AOFF_task_binfmt 0x00000048 +#define AOFF_task_binfmt 0x0000004c #define ASIZ_task_binfmt 0x00000004 -#define AOFF_task_exit_code 0x0000004c +#define AOFF_task_exit_code 0x00000050 #define ASIZ_task_exit_code 0x00000004 -#define AOFF_task_exit_signal 0x00000050 +#define AOFF_task_exit_signal 0x00000054 #define ASIZ_task_exit_signal 0x00000004 -#define AOFF_task_pdeath_signal 0x00000054 +#define AOFF_task_pdeath_signal 0x00000058 #define ASIZ_task_pdeath_signal 0x00000004 -#define AOFF_task_personality 0x00000058 +#define AOFF_task_personality 0x0000005c #define ASIZ_task_personality 0x00000004 -#define AOFF_task_pid 0x00000060 +#define AOFF_task_pid 0x00000064 #define ASIZ_task_pid 0x00000004 -#define AOFF_task_pgrp 0x00000064 +#define AOFF_task_pgrp 0x00000068 #define ASIZ_task_pgrp 0x00000004 -#define AOFF_task_tty_old_pgrp 0x00000068 +#define AOFF_task_tty_old_pgrp 0x0000006c #define ASIZ_task_tty_old_pgrp 0x00000004 -#define AOFF_task_session 0x0000006c +#define AOFF_task_session 0x00000070 #define ASIZ_task_session 0x00000004 -#define AOFF_task_leader 0x00000070 +#define AOFF_task_leader 0x00000074 #define ASIZ_task_leader 0x00000004 -#define AOFF_task_p_opptr 0x00000074 +#define AOFF_task_p_opptr 0x00000078 #define ASIZ_task_p_opptr 0x00000004 -#define AOFF_task_p_pptr 0x00000078 +#define AOFF_task_p_pptr 0x0000007c #define ASIZ_task_p_pptr 0x00000004 -#define AOFF_task_p_cptr 0x0000007c +#define AOFF_task_p_cptr 0x00000080 #define ASIZ_task_p_cptr 0x00000004 -#define AOFF_task_p_ysptr 0x00000080 +#define AOFF_task_p_ysptr 0x00000084 #define ASIZ_task_p_ysptr 0x00000004 -#define AOFF_task_p_osptr 0x00000084 +#define AOFF_task_p_osptr 0x00000088 #define ASIZ_task_p_osptr 0x00000004 -#define AOFF_task_pidhash_next 0x00000088 +#define AOFF_task_pidhash_next 0x0000008c #define ASIZ_task_pidhash_next 0x00000004 -#define AOFF_task_pidhash_pprev 0x0000008c +#define AOFF_task_pidhash_pprev 0x00000090 #define ASIZ_task_pidhash_pprev 0x00000004 -#define AOFF_task_tarray_ptr 0x00000090 +#define AOFF_task_tarray_ptr 0x00000094 #define ASIZ_task_tarray_ptr 0x00000004 -#define AOFF_task_wait_chldexit 0x00000094 +#define AOFF_task_wait_chldexit 0x00000098 #define ASIZ_task_wait_chldexit 0x00000004 -#define AOFF_task_vfork_sem 0x00000098 +#define AOFF_task_vfork_sem 0x0000009c #define ASIZ_task_vfork_sem 0x00000004 -#define AOFF_task_policy 0x0000009c +#define AOFF_task_policy 0x000000a0 #define ASIZ_task_policy 0x00000004 -#define AOFF_task_rt_priority 0x000000a0 +#define AOFF_task_rt_priority 0x000000a4 #define ASIZ_task_rt_priority 0x00000004 -#define AOFF_task_it_real_value 0x000000a4 +#define AOFF_task_it_real_value 0x000000a8 #define ASIZ_task_it_real_value 0x00000004 -#define AOFF_task_it_prof_value 0x000000a8 +#define AOFF_task_it_prof_value 0x000000ac #define ASIZ_task_it_prof_value 0x00000004 -#define AOFF_task_it_virt_value 0x000000ac +#define AOFF_task_it_virt_value 0x000000b0 #define ASIZ_task_it_virt_value 0x00000004 -#define AOFF_task_it_real_incr 0x000000b0 +#define AOFF_task_it_real_incr 0x000000b4 #define ASIZ_task_it_real_incr 0x00000004 -#define AOFF_task_it_prof_incr 0x000000b4 +#define AOFF_task_it_prof_incr 0x000000b8 #define ASIZ_task_it_prof_incr 0x00000004 -#define AOFF_task_it_virt_incr 0x000000b8 +#define AOFF_task_it_virt_incr 0x000000bc #define ASIZ_task_it_virt_incr 0x00000004 -#define AOFF_task_real_timer 0x000000bc +#define AOFF_task_real_timer 0x000000c0 #define ASIZ_task_real_timer 0x00000014 -#define AOFF_task_times 0x000000d0 +#define AOFF_task_times 0x000000d4 #define ASIZ_task_times 0x00000010 -#define AOFF_task_start_time 0x000000e0 +#define AOFF_task_start_time 0x000000e4 #define ASIZ_task_start_time 0x00000004 -#define AOFF_task_per_cpu_utime 0x000000e4 +#define AOFF_task_per_cpu_utime 0x000000e8 #define ASIZ_task_per_cpu_utime 0x00000004 -#define AOFF_task_min_flt 0x000000ec +#define AOFF_task_min_flt 0x000000f0 #define ASIZ_task_min_flt 0x00000004 -#define AOFF_task_maj_flt 0x000000f0 +#define AOFF_task_maj_flt 0x000000f4 #define ASIZ_task_maj_flt 0x00000004 -#define AOFF_task_nswap 0x000000f4 +#define AOFF_task_nswap 0x000000f8 #define ASIZ_task_nswap 0x00000004 -#define AOFF_task_cmin_flt 0x000000f8 +#define AOFF_task_cmin_flt 0x000000fc #define ASIZ_task_cmin_flt 0x00000004 -#define AOFF_task_cmaj_flt 0x000000fc +#define AOFF_task_cmaj_flt 0x00000100 #define ASIZ_task_cmaj_flt 0x00000004 -#define AOFF_task_cnswap 0x00000100 +#define AOFF_task_cnswap 0x00000104 #define ASIZ_task_cnswap 0x00000004 -#define AOFF_task_uid 0x00000106 +#define AOFF_task_uid 0x0000010a #define ASIZ_task_uid 0x00000002 -#define AOFF_task_euid 0x00000108 +#define AOFF_task_euid 0x0000010c #define ASIZ_task_euid 0x00000002 -#define AOFF_task_suid 0x0000010a +#define AOFF_task_suid 0x0000010e #define ASIZ_task_suid 0x00000002 -#define AOFF_task_fsuid 0x0000010c +#define AOFF_task_fsuid 0x00000110 #define ASIZ_task_fsuid 0x00000002 -#define AOFF_task_gid 0x0000010e +#define AOFF_task_gid 0x00000112 #define ASIZ_task_gid 0x00000002 -#define AOFF_task_egid 0x00000110 +#define AOFF_task_egid 0x00000114 #define ASIZ_task_egid 0x00000002 -#define AOFF_task_sgid 0x00000112 +#define AOFF_task_sgid 0x00000116 #define ASIZ_task_sgid 0x00000002 -#define AOFF_task_fsgid 0x00000114 +#define AOFF_task_fsgid 0x00000118 #define ASIZ_task_fsgid 0x00000002 -#define AOFF_task_ngroups 0x00000118 +#define AOFF_task_ngroups 0x0000011c #define ASIZ_task_ngroups 0x00000004 -#define AOFF_task_groups 0x0000011c +#define AOFF_task_groups 0x00000120 #define ASIZ_task_groups 0x00000040 -#define AOFF_task_cap_effective 0x0000015c +#define AOFF_task_cap_effective 0x00000160 #define ASIZ_task_cap_effective 0x00000004 -#define AOFF_task_cap_inheritable 0x00000160 +#define AOFF_task_cap_inheritable 0x00000164 #define ASIZ_task_cap_inheritable 0x00000004 -#define AOFF_task_cap_permitted 0x00000164 +#define AOFF_task_cap_permitted 0x00000168 #define ASIZ_task_cap_permitted 0x00000004 -#define AOFF_task_user 0x0000016c +#define AOFF_task_user 0x00000170 #define ASIZ_task_user 0x00000004 -#define AOFF_task_rlim 0x00000170 +#define AOFF_task_rlim 0x00000174 #define ASIZ_task_rlim 0x00000050 -#define AOFF_task_used_math 0x000001c0 +#define AOFF_task_used_math 0x000001c4 #define ASIZ_task_used_math 0x00000002 -#define AOFF_task_comm 0x000001c2 +#define AOFF_task_comm 0x000001c6 #define ASIZ_task_comm 0x00000010 -#define AOFF_task_link_count 0x000001d4 +#define AOFF_task_link_count 0x000001d8 #define ASIZ_task_link_count 0x00000004 -#define AOFF_task_tty 0x000001d8 +#define AOFF_task_tty 0x000001dc #define ASIZ_task_tty 0x00000004 -#define AOFF_task_semundo 0x000001dc +#define AOFF_task_semundo 0x000001e0 #define ASIZ_task_semundo 0x00000004 -#define AOFF_task_semsleeping 0x000001e0 +#define AOFF_task_semsleeping 0x000001e4 #define ASIZ_task_semsleeping 0x00000004 #define AOFF_task_tss 0x000001e8 #define ASIZ_task_tss 0x00000388 @@ -309,147 +311,149 @@ #define ASIZ_task_exec_domain 0x00000004 #define AOFF_task_need_resched 0x00000014 #define ASIZ_task_need_resched 0x00000004 -#define AOFF_task_counter 0x00000018 +#define AOFF_task_ptrace 0x00000018 +#define ASIZ_task_ptrace 0x00000004 +#define AOFF_task_counter 0x0000001c #define ASIZ_task_counter 0x00000004 -#define AOFF_task_priority 0x0000001c +#define AOFF_task_priority 0x00000020 #define ASIZ_task_priority 0x00000004 -#define AOFF_task_avg_slice 0x00000020 +#define AOFF_task_avg_slice 0x00000024 #define ASIZ_task_avg_slice 0x00000004 -#define AOFF_task_has_cpu 0x00000024 +#define AOFF_task_has_cpu 0x00000028 #define ASIZ_task_has_cpu 0x00000004 -#define AOFF_task_processor 0x00000028 +#define AOFF_task_processor 0x0000002c #define ASIZ_task_processor 0x00000004 -#define AOFF_task_last_processor 0x0000002c +#define AOFF_task_last_processor 0x00000030 #define ASIZ_task_last_processor 0x00000004 -#define AOFF_task_lock_depth 0x00000030 +#define AOFF_task_lock_depth 0x00000034 #define ASIZ_task_lock_depth 0x00000004 -#define AOFF_task_next_task 0x00000034 +#define AOFF_task_next_task 0x00000038 #define ASIZ_task_next_task 0x00000004 -#define AOFF_task_prev_task 0x00000038 +#define AOFF_task_prev_task 0x0000003c #define ASIZ_task_prev_task 0x00000004 -#define AOFF_task_next_run 0x0000003c +#define AOFF_task_next_run 0x00000040 #define ASIZ_task_next_run 0x00000004 -#define AOFF_task_prev_run 0x00000040 +#define AOFF_task_prev_run 0x00000044 #define ASIZ_task_prev_run 0x00000004 -#define AOFF_task_task_exclusive 0x00000044 +#define AOFF_task_task_exclusive 0x00000048 #define ASIZ_task_task_exclusive 0x00000004 -#define AOFF_task_binfmt 0x00000048 +#define AOFF_task_binfmt 0x0000004c #define ASIZ_task_binfmt 0x00000004 -#define AOFF_task_exit_code 0x0000004c +#define AOFF_task_exit_code 0x00000050 #define ASIZ_task_exit_code 0x00000004 -#define AOFF_task_exit_signal 0x00000050 +#define AOFF_task_exit_signal 0x00000054 #define ASIZ_task_exit_signal 0x00000004 -#define AOFF_task_pdeath_signal 0x00000054 +#define AOFF_task_pdeath_signal 0x00000058 #define ASIZ_task_pdeath_signal 0x00000004 -#define AOFF_task_personality 0x00000058 +#define AOFF_task_personality 0x0000005c #define ASIZ_task_personality 0x00000004 -#define AOFF_task_pid 0x00000060 +#define AOFF_task_pid 0x00000064 #define ASIZ_task_pid 0x00000004 -#define AOFF_task_pgrp 0x00000064 +#define AOFF_task_pgrp 0x00000068 #define ASIZ_task_pgrp 0x00000004 -#define AOFF_task_tty_old_pgrp 0x00000068 +#define AOFF_task_tty_old_pgrp 0x0000006c #define ASIZ_task_tty_old_pgrp 0x00000004 -#define AOFF_task_session 0x0000006c +#define AOFF_task_session 0x00000070 #define ASIZ_task_session 0x00000004 -#define AOFF_task_leader 0x00000070 +#define AOFF_task_leader 0x00000074 #define ASIZ_task_leader 0x00000004 -#define AOFF_task_p_opptr 0x00000074 +#define AOFF_task_p_opptr 0x00000078 #define ASIZ_task_p_opptr 0x00000004 -#define AOFF_task_p_pptr 0x00000078 +#define AOFF_task_p_pptr 0x0000007c #define ASIZ_task_p_pptr 0x00000004 -#define AOFF_task_p_cptr 0x0000007c +#define AOFF_task_p_cptr 0x00000080 #define ASIZ_task_p_cptr 0x00000004 -#define AOFF_task_p_ysptr 0x00000080 +#define AOFF_task_p_ysptr 0x00000084 #define ASIZ_task_p_ysptr 0x00000004 -#define AOFF_task_p_osptr 0x00000084 +#define AOFF_task_p_osptr 0x00000088 #define ASIZ_task_p_osptr 0x00000004 -#define AOFF_task_pidhash_next 0x00000088 +#define AOFF_task_pidhash_next 0x0000008c #define ASIZ_task_pidhash_next 0x00000004 -#define AOFF_task_pidhash_pprev 0x0000008c +#define AOFF_task_pidhash_pprev 0x00000090 #define ASIZ_task_pidhash_pprev 0x00000004 -#define AOFF_task_tarray_ptr 0x00000090 +#define AOFF_task_tarray_ptr 0x00000094 #define ASIZ_task_tarray_ptr 0x00000004 -#define AOFF_task_wait_chldexit 0x00000094 +#define AOFF_task_wait_chldexit 0x00000098 #define ASIZ_task_wait_chldexit 0x00000004 -#define AOFF_task_vfork_sem 0x00000098 +#define AOFF_task_vfork_sem 0x0000009c #define ASIZ_task_vfork_sem 0x00000004 -#define AOFF_task_policy 0x0000009c +#define AOFF_task_policy 0x000000a0 #define ASIZ_task_policy 0x00000004 -#define AOFF_task_rt_priority 0x000000a0 +#define AOFF_task_rt_priority 0x000000a4 #define ASIZ_task_rt_priority 0x00000004 -#define AOFF_task_it_real_value 0x000000a4 +#define AOFF_task_it_real_value 0x000000a8 #define ASIZ_task_it_real_value 0x00000004 -#define AOFF_task_it_prof_value 0x000000a8 +#define AOFF_task_it_prof_value 0x000000ac #define ASIZ_task_it_prof_value 0x00000004 -#define AOFF_task_it_virt_value 0x000000ac +#define AOFF_task_it_virt_value 0x000000b0 #define ASIZ_task_it_virt_value 0x00000004 -#define AOFF_task_it_real_incr 0x000000b0 +#define AOFF_task_it_real_incr 0x000000b4 #define ASIZ_task_it_real_incr 0x00000004 -#define AOFF_task_it_prof_incr 0x000000b4 +#define AOFF_task_it_prof_incr 0x000000b8 #define ASIZ_task_it_prof_incr 0x00000004 -#define AOFF_task_it_virt_incr 0x000000b8 +#define AOFF_task_it_virt_incr 0x000000bc #define ASIZ_task_it_virt_incr 0x00000004 -#define AOFF_task_real_timer 0x000000bc +#define AOFF_task_real_timer 0x000000c0 #define ASIZ_task_real_timer 0x00000014 -#define AOFF_task_times 0x000000d0 +#define AOFF_task_times 0x000000d4 #define ASIZ_task_times 0x00000010 -#define AOFF_task_start_time 0x000000e0 +#define AOFF_task_start_time 0x000000e4 #define ASIZ_task_start_time 0x00000004 -#define AOFF_task_per_cpu_utime 0x000000e4 +#define AOFF_task_per_cpu_utime 0x000000e8 #define ASIZ_task_per_cpu_utime 0x00000080 -#define AOFF_task_min_flt 0x000001e4 +#define AOFF_task_min_flt 0x000001e8 #define ASIZ_task_min_flt 0x00000004 -#define AOFF_task_maj_flt 0x000001e8 +#define AOFF_task_maj_flt 0x000001ec #define ASIZ_task_maj_flt 0x00000004 -#define AOFF_task_nswap 0x000001ec +#define AOFF_task_nswap 0x000001f0 #define ASIZ_task_nswap 0x00000004 -#define AOFF_task_cmin_flt 0x000001f0 +#define AOFF_task_cmin_flt 0x000001f4 #define ASIZ_task_cmin_flt 0x00000004 -#define AOFF_task_cmaj_flt 0x000001f4 +#define AOFF_task_cmaj_flt 0x000001f8 #define ASIZ_task_cmaj_flt 0x00000004 -#define AOFF_task_cnswap 0x000001f8 +#define AOFF_task_cnswap 0x000001fc #define ASIZ_task_cnswap 0x00000004 -#define AOFF_task_uid 0x000001fe +#define AOFF_task_uid 0x00000202 #define ASIZ_task_uid 0x00000002 -#define AOFF_task_euid 0x00000200 +#define AOFF_task_euid 0x00000204 #define ASIZ_task_euid 0x00000002 -#define AOFF_task_suid 0x00000202 +#define AOFF_task_suid 0x00000206 #define ASIZ_task_suid 0x00000002 -#define AOFF_task_fsuid 0x00000204 +#define AOFF_task_fsuid 0x00000208 #define ASIZ_task_fsuid 0x00000002 -#define AOFF_task_gid 0x00000206 +#define AOFF_task_gid 0x0000020a #define ASIZ_task_gid 0x00000002 -#define AOFF_task_egid 0x00000208 +#define AOFF_task_egid 0x0000020c #define ASIZ_task_egid 0x00000002 -#define AOFF_task_sgid 0x0000020a +#define AOFF_task_sgid 0x0000020e #define ASIZ_task_sgid 0x00000002 -#define AOFF_task_fsgid 0x0000020c +#define AOFF_task_fsgid 0x00000210 #define ASIZ_task_fsgid 0x00000002 -#define AOFF_task_ngroups 0x00000210 +#define AOFF_task_ngroups 0x00000214 #define ASIZ_task_ngroups 0x00000004 -#define AOFF_task_groups 0x00000214 +#define AOFF_task_groups 0x00000218 #define ASIZ_task_groups 0x00000040 -#define AOFF_task_cap_effective 0x00000254 +#define AOFF_task_cap_effective 0x00000258 #define ASIZ_task_cap_effective 0x00000004 -#define AOFF_task_cap_inheritable 0x00000258 +#define AOFF_task_cap_inheritable 0x0000025c #define ASIZ_task_cap_inheritable 0x00000004 -#define AOFF_task_cap_permitted 0x0000025c +#define AOFF_task_cap_permitted 0x00000260 #define ASIZ_task_cap_permitted 0x00000004 -#define AOFF_task_user 0x00000264 +#define AOFF_task_user 0x00000268 #define ASIZ_task_user 0x00000004 -#define AOFF_task_rlim 0x00000268 +#define AOFF_task_rlim 0x0000026c #define ASIZ_task_rlim 0x00000050 -#define AOFF_task_used_math 0x000002b8 +#define AOFF_task_used_math 0x000002bc #define ASIZ_task_used_math 0x00000002 -#define AOFF_task_comm 0x000002ba +#define AOFF_task_comm 0x000002be #define ASIZ_task_comm 0x00000010 -#define AOFF_task_link_count 0x000002cc +#define AOFF_task_link_count 0x000002d0 #define ASIZ_task_link_count 0x00000004 -#define AOFF_task_tty 0x000002d0 +#define AOFF_task_tty 0x000002d4 #define ASIZ_task_tty 0x00000004 -#define AOFF_task_semundo 0x000002d4 +#define AOFF_task_semundo 0x000002d8 #define ASIZ_task_semundo 0x00000004 -#define AOFF_task_semsleeping 0x000002d8 +#define AOFF_task_semsleeping 0x000002dc #define ASIZ_task_semsleeping 0x00000004 #define AOFF_task_tss 0x000002e0 #define ASIZ_task_tss 0x00000388 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-sparc/pci.h linux.20p6/include/asm-sparc/pci.h --- linux.vanilla/include/asm-sparc/pci.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/include/asm-sparc/pci.h Mon Jun 18 08:19:06 2001 @@ -0,0 +1,7 @@ +#ifndef _SPARC_PCI_H +#define _SPARC_PCI_H + +/* Return the index of the PCI controller for device PDEV. */ +#define pci_controller_num(PDEV) (0) + +#endif /* !(_SPARC_PCI_H) */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-sparc/siginfo.h linux.20p6/include/asm-sparc/siginfo.h --- linux.vanilla/include/asm-sparc/siginfo.h Sun Mar 25 17:37:39 2001 +++ linux.20p6/include/asm-sparc/siginfo.h Mon Jun 18 08:19:48 2001 @@ -1,4 +1,4 @@ -/* $Id: siginfo.h,v 1.4 1999/04/28 19:45:20 davem Exp $ +/* $Id: siginfo.h,v 1.4.2.1 2001/03/01 00:49:02 davem Exp $ * siginfo.c: */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-sparc/uaccess.h linux.20p6/include/asm-sparc/uaccess.h --- linux.vanilla/include/asm-sparc/uaccess.h Sun Mar 25 17:37:39 2001 +++ linux.20p6/include/asm-sparc/uaccess.h Mon Jun 18 08:19:48 2001 @@ -1,4 +1,4 @@ -/* $Id: uaccess.h,v 1.18.2.1 1999/09/10 09:54:34 davem Exp $ +/* $Id: uaccess.h,v 1.18.2.2 2001/03/01 00:49:02 davem Exp $ * uaccess.h: User space memore access functions. * * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-sparc64/asm_offsets.h linux.20p6/include/asm-sparc64/asm_offsets.h --- linux.vanilla/include/asm-sparc64/asm_offsets.h Sun Mar 25 17:37:39 2001 +++ linux.20p6/include/asm-sparc64/asm_offsets.h Tue Jun 19 09:34:59 2001 @@ -18,147 +18,149 @@ #define ASIZ_task_exec_domain 0x00000008 #define AOFF_task_need_resched 0x00000028 #define ASIZ_task_need_resched 0x00000008 -#define AOFF_task_counter 0x00000030 +#define AOFF_task_ptrace 0x00000030 +#define ASIZ_task_ptrace 0x00000008 +#define AOFF_task_counter 0x00000038 #define ASIZ_task_counter 0x00000008 -#define AOFF_task_priority 0x00000038 +#define AOFF_task_priority 0x00000040 #define ASIZ_task_priority 0x00000008 -#define AOFF_task_avg_slice 0x00000040 +#define AOFF_task_avg_slice 0x00000048 #define ASIZ_task_avg_slice 0x00000008 -#define AOFF_task_has_cpu 0x00000048 +#define AOFF_task_has_cpu 0x00000050 #define ASIZ_task_has_cpu 0x00000004 -#define AOFF_task_processor 0x0000004c +#define AOFF_task_processor 0x00000054 #define ASIZ_task_processor 0x00000004 -#define AOFF_task_last_processor 0x00000050 +#define AOFF_task_last_processor 0x00000058 #define ASIZ_task_last_processor 0x00000004 -#define AOFF_task_lock_depth 0x00000054 +#define AOFF_task_lock_depth 0x0000005c #define ASIZ_task_lock_depth 0x00000004 -#define AOFF_task_next_task 0x00000058 +#define AOFF_task_next_task 0x00000060 #define ASIZ_task_next_task 0x00000008 -#define AOFF_task_prev_task 0x00000060 +#define AOFF_task_prev_task 0x00000068 #define ASIZ_task_prev_task 0x00000008 -#define AOFF_task_next_run 0x00000068 +#define AOFF_task_next_run 0x00000070 #define ASIZ_task_next_run 0x00000008 -#define AOFF_task_prev_run 0x00000070 +#define AOFF_task_prev_run 0x00000078 #define ASIZ_task_prev_run 0x00000008 -#define AOFF_task_task_exclusive 0x00000078 +#define AOFF_task_task_exclusive 0x00000080 #define ASIZ_task_task_exclusive 0x00000004 -#define AOFF_task_binfmt 0x00000080 +#define AOFF_task_binfmt 0x00000088 #define ASIZ_task_binfmt 0x00000008 -#define AOFF_task_exit_code 0x00000088 +#define AOFF_task_exit_code 0x00000090 #define ASIZ_task_exit_code 0x00000004 -#define AOFF_task_exit_signal 0x0000008c +#define AOFF_task_exit_signal 0x00000094 #define ASIZ_task_exit_signal 0x00000004 -#define AOFF_task_pdeath_signal 0x00000090 +#define AOFF_task_pdeath_signal 0x00000098 #define ASIZ_task_pdeath_signal 0x00000004 -#define AOFF_task_personality 0x00000098 +#define AOFF_task_personality 0x000000a0 #define ASIZ_task_personality 0x00000008 -#define AOFF_task_pid 0x000000a4 +#define AOFF_task_pid 0x000000ac #define ASIZ_task_pid 0x00000004 -#define AOFF_task_pgrp 0x000000a8 +#define AOFF_task_pgrp 0x000000b0 #define ASIZ_task_pgrp 0x00000004 -#define AOFF_task_tty_old_pgrp 0x000000ac +#define AOFF_task_tty_old_pgrp 0x000000b4 #define ASIZ_task_tty_old_pgrp 0x00000004 -#define AOFF_task_session 0x000000b0 +#define AOFF_task_session 0x000000b8 #define ASIZ_task_session 0x00000004 -#define AOFF_task_leader 0x000000b4 +#define AOFF_task_leader 0x000000bc #define ASIZ_task_leader 0x00000004 -#define AOFF_task_p_opptr 0x000000b8 +#define AOFF_task_p_opptr 0x000000c0 #define ASIZ_task_p_opptr 0x00000008 -#define AOFF_task_p_pptr 0x000000c0 +#define AOFF_task_p_pptr 0x000000c8 #define ASIZ_task_p_pptr 0x00000008 -#define AOFF_task_p_cptr 0x000000c8 +#define AOFF_task_p_cptr 0x000000d0 #define ASIZ_task_p_cptr 0x00000008 -#define AOFF_task_p_ysptr 0x000000d0 +#define AOFF_task_p_ysptr 0x000000d8 #define ASIZ_task_p_ysptr 0x00000008 -#define AOFF_task_p_osptr 0x000000d8 +#define AOFF_task_p_osptr 0x000000e0 #define ASIZ_task_p_osptr 0x00000008 -#define AOFF_task_pidhash_next 0x000000e0 +#define AOFF_task_pidhash_next 0x000000e8 #define ASIZ_task_pidhash_next 0x00000008 -#define AOFF_task_pidhash_pprev 0x000000e8 +#define AOFF_task_pidhash_pprev 0x000000f0 #define ASIZ_task_pidhash_pprev 0x00000008 -#define AOFF_task_tarray_ptr 0x000000f0 +#define AOFF_task_tarray_ptr 0x000000f8 #define ASIZ_task_tarray_ptr 0x00000008 -#define AOFF_task_wait_chldexit 0x000000f8 +#define AOFF_task_wait_chldexit 0x00000100 #define ASIZ_task_wait_chldexit 0x00000008 -#define AOFF_task_vfork_sem 0x00000100 +#define AOFF_task_vfork_sem 0x00000108 #define ASIZ_task_vfork_sem 0x00000008 -#define AOFF_task_policy 0x00000108 +#define AOFF_task_policy 0x00000110 #define ASIZ_task_policy 0x00000008 -#define AOFF_task_rt_priority 0x00000110 +#define AOFF_task_rt_priority 0x00000118 #define ASIZ_task_rt_priority 0x00000008 -#define AOFF_task_it_real_value 0x00000118 +#define AOFF_task_it_real_value 0x00000120 #define ASIZ_task_it_real_value 0x00000008 -#define AOFF_task_it_prof_value 0x00000120 +#define AOFF_task_it_prof_value 0x00000128 #define ASIZ_task_it_prof_value 0x00000008 -#define AOFF_task_it_virt_value 0x00000128 +#define AOFF_task_it_virt_value 0x00000130 #define ASIZ_task_it_virt_value 0x00000008 -#define AOFF_task_it_real_incr 0x00000130 +#define AOFF_task_it_real_incr 0x00000138 #define ASIZ_task_it_real_incr 0x00000008 -#define AOFF_task_it_prof_incr 0x00000138 +#define AOFF_task_it_prof_incr 0x00000140 #define ASIZ_task_it_prof_incr 0x00000008 -#define AOFF_task_it_virt_incr 0x00000140 +#define AOFF_task_it_virt_incr 0x00000148 #define ASIZ_task_it_virt_incr 0x00000008 -#define AOFF_task_real_timer 0x00000148 +#define AOFF_task_real_timer 0x00000150 #define ASIZ_task_real_timer 0x00000028 -#define AOFF_task_times 0x00000170 +#define AOFF_task_times 0x00000178 #define ASIZ_task_times 0x00000020 -#define AOFF_task_start_time 0x00000190 +#define AOFF_task_start_time 0x00000198 #define ASIZ_task_start_time 0x00000008 -#define AOFF_task_per_cpu_utime 0x00000198 +#define AOFF_task_per_cpu_utime 0x000001a0 #define ASIZ_task_per_cpu_utime 0x00000008 -#define AOFF_task_min_flt 0x000001a8 +#define AOFF_task_min_flt 0x000001b0 #define ASIZ_task_min_flt 0x00000008 -#define AOFF_task_maj_flt 0x000001b0 +#define AOFF_task_maj_flt 0x000001b8 #define ASIZ_task_maj_flt 0x00000008 -#define AOFF_task_nswap 0x000001b8 +#define AOFF_task_nswap 0x000001c0 #define ASIZ_task_nswap 0x00000008 -#define AOFF_task_cmin_flt 0x000001c0 +#define AOFF_task_cmin_flt 0x000001c8 #define ASIZ_task_cmin_flt 0x00000008 -#define AOFF_task_cmaj_flt 0x000001c8 +#define AOFF_task_cmaj_flt 0x000001d0 #define ASIZ_task_cmaj_flt 0x00000008 -#define AOFF_task_cnswap 0x000001d0 +#define AOFF_task_cnswap 0x000001d8 #define ASIZ_task_cnswap 0x00000008 -#define AOFF_task_uid 0x000001dc +#define AOFF_task_uid 0x000001e4 #define ASIZ_task_uid 0x00000004 -#define AOFF_task_euid 0x000001e0 +#define AOFF_task_euid 0x000001e8 #define ASIZ_task_euid 0x00000004 -#define AOFF_task_suid 0x000001e4 +#define AOFF_task_suid 0x000001ec #define ASIZ_task_suid 0x00000004 -#define AOFF_task_fsuid 0x000001e8 +#define AOFF_task_fsuid 0x000001f0 #define ASIZ_task_fsuid 0x00000004 -#define AOFF_task_gid 0x000001ec +#define AOFF_task_gid 0x000001f4 #define ASIZ_task_gid 0x00000004 -#define AOFF_task_egid 0x000001f0 +#define AOFF_task_egid 0x000001f8 #define ASIZ_task_egid 0x00000004 -#define AOFF_task_sgid 0x000001f4 +#define AOFF_task_sgid 0x000001fc #define ASIZ_task_sgid 0x00000004 -#define AOFF_task_fsgid 0x000001f8 +#define AOFF_task_fsgid 0x00000200 #define ASIZ_task_fsgid 0x00000004 -#define AOFF_task_ngroups 0x000001fc +#define AOFF_task_ngroups 0x00000204 #define ASIZ_task_ngroups 0x00000004 -#define AOFF_task_groups 0x00000200 +#define AOFF_task_groups 0x00000208 #define ASIZ_task_groups 0x00000080 -#define AOFF_task_cap_effective 0x00000280 +#define AOFF_task_cap_effective 0x00000288 #define ASIZ_task_cap_effective 0x00000004 -#define AOFF_task_cap_inheritable 0x00000284 +#define AOFF_task_cap_inheritable 0x0000028c #define ASIZ_task_cap_inheritable 0x00000004 -#define AOFF_task_cap_permitted 0x00000288 +#define AOFF_task_cap_permitted 0x00000290 #define ASIZ_task_cap_permitted 0x00000004 -#define AOFF_task_user 0x00000290 +#define AOFF_task_user 0x00000298 #define ASIZ_task_user 0x00000008 -#define AOFF_task_rlim 0x00000298 +#define AOFF_task_rlim 0x000002a0 #define ASIZ_task_rlim 0x000000a0 -#define AOFF_task_used_math 0x00000338 +#define AOFF_task_used_math 0x00000340 #define ASIZ_task_used_math 0x00000002 -#define AOFF_task_comm 0x0000033a +#define AOFF_task_comm 0x00000342 #define ASIZ_task_comm 0x00000010 -#define AOFF_task_link_count 0x0000034c +#define AOFF_task_link_count 0x00000354 #define ASIZ_task_link_count 0x00000004 -#define AOFF_task_tty 0x00000350 +#define AOFF_task_tty 0x00000358 #define ASIZ_task_tty 0x00000008 -#define AOFF_task_semundo 0x00000358 +#define AOFF_task_semundo 0x00000360 #define ASIZ_task_semundo 0x00000008 -#define AOFF_task_semsleeping 0x00000360 +#define AOFF_task_semsleeping 0x00000368 #define ASIZ_task_semsleeping 0x00000008 #define AOFF_task_tss 0x00000370 #define ASIZ_task_tss 0x00000470 @@ -320,147 +322,149 @@ #define ASIZ_task_exec_domain 0x00000008 #define AOFF_task_need_resched 0x00000028 #define ASIZ_task_need_resched 0x00000008 -#define AOFF_task_counter 0x00000030 +#define AOFF_task_ptrace 0x00000030 +#define ASIZ_task_ptrace 0x00000008 +#define AOFF_task_counter 0x00000038 #define ASIZ_task_counter 0x00000008 -#define AOFF_task_priority 0x00000038 +#define AOFF_task_priority 0x00000040 #define ASIZ_task_priority 0x00000008 -#define AOFF_task_avg_slice 0x00000040 +#define AOFF_task_avg_slice 0x00000048 #define ASIZ_task_avg_slice 0x00000008 -#define AOFF_task_has_cpu 0x00000048 +#define AOFF_task_has_cpu 0x00000050 #define ASIZ_task_has_cpu 0x00000004 -#define AOFF_task_processor 0x0000004c +#define AOFF_task_processor 0x00000054 #define ASIZ_task_processor 0x00000004 -#define AOFF_task_last_processor 0x00000050 +#define AOFF_task_last_processor 0x00000058 #define ASIZ_task_last_processor 0x00000004 -#define AOFF_task_lock_depth 0x00000054 +#define AOFF_task_lock_depth 0x0000005c #define ASIZ_task_lock_depth 0x00000004 -#define AOFF_task_next_task 0x00000058 +#define AOFF_task_next_task 0x00000060 #define ASIZ_task_next_task 0x00000008 -#define AOFF_task_prev_task 0x00000060 +#define AOFF_task_prev_task 0x00000068 #define ASIZ_task_prev_task 0x00000008 -#define AOFF_task_next_run 0x00000068 +#define AOFF_task_next_run 0x00000070 #define ASIZ_task_next_run 0x00000008 -#define AOFF_task_prev_run 0x00000070 +#define AOFF_task_prev_run 0x00000078 #define ASIZ_task_prev_run 0x00000008 -#define AOFF_task_task_exclusive 0x00000078 +#define AOFF_task_task_exclusive 0x00000080 #define ASIZ_task_task_exclusive 0x00000004 -#define AOFF_task_binfmt 0x00000080 +#define AOFF_task_binfmt 0x00000088 #define ASIZ_task_binfmt 0x00000008 -#define AOFF_task_exit_code 0x00000088 +#define AOFF_task_exit_code 0x00000090 #define ASIZ_task_exit_code 0x00000004 -#define AOFF_task_exit_signal 0x0000008c +#define AOFF_task_exit_signal 0x00000094 #define ASIZ_task_exit_signal 0x00000004 -#define AOFF_task_pdeath_signal 0x00000090 +#define AOFF_task_pdeath_signal 0x00000098 #define ASIZ_task_pdeath_signal 0x00000004 -#define AOFF_task_personality 0x00000098 +#define AOFF_task_personality 0x000000a0 #define ASIZ_task_personality 0x00000008 -#define AOFF_task_pid 0x000000a4 +#define AOFF_task_pid 0x000000ac #define ASIZ_task_pid 0x00000004 -#define AOFF_task_pgrp 0x000000a8 +#define AOFF_task_pgrp 0x000000b0 #define ASIZ_task_pgrp 0x00000004 -#define AOFF_task_tty_old_pgrp 0x000000ac +#define AOFF_task_tty_old_pgrp 0x000000b4 #define ASIZ_task_tty_old_pgrp 0x00000004 -#define AOFF_task_session 0x000000b0 +#define AOFF_task_session 0x000000b8 #define ASIZ_task_session 0x00000004 -#define AOFF_task_leader 0x000000b4 +#define AOFF_task_leader 0x000000bc #define ASIZ_task_leader 0x00000004 -#define AOFF_task_p_opptr 0x000000b8 +#define AOFF_task_p_opptr 0x000000c0 #define ASIZ_task_p_opptr 0x00000008 -#define AOFF_task_p_pptr 0x000000c0 +#define AOFF_task_p_pptr 0x000000c8 #define ASIZ_task_p_pptr 0x00000008 -#define AOFF_task_p_cptr 0x000000c8 +#define AOFF_task_p_cptr 0x000000d0 #define ASIZ_task_p_cptr 0x00000008 -#define AOFF_task_p_ysptr 0x000000d0 +#define AOFF_task_p_ysptr 0x000000d8 #define ASIZ_task_p_ysptr 0x00000008 -#define AOFF_task_p_osptr 0x000000d8 +#define AOFF_task_p_osptr 0x000000e0 #define ASIZ_task_p_osptr 0x00000008 -#define AOFF_task_pidhash_next 0x000000e0 +#define AOFF_task_pidhash_next 0x000000e8 #define ASIZ_task_pidhash_next 0x00000008 -#define AOFF_task_pidhash_pprev 0x000000e8 +#define AOFF_task_pidhash_pprev 0x000000f0 #define ASIZ_task_pidhash_pprev 0x00000008 -#define AOFF_task_tarray_ptr 0x000000f0 +#define AOFF_task_tarray_ptr 0x000000f8 #define ASIZ_task_tarray_ptr 0x00000008 -#define AOFF_task_wait_chldexit 0x000000f8 +#define AOFF_task_wait_chldexit 0x00000100 #define ASIZ_task_wait_chldexit 0x00000008 -#define AOFF_task_vfork_sem 0x00000100 +#define AOFF_task_vfork_sem 0x00000108 #define ASIZ_task_vfork_sem 0x00000008 -#define AOFF_task_policy 0x00000108 +#define AOFF_task_policy 0x00000110 #define ASIZ_task_policy 0x00000008 -#define AOFF_task_rt_priority 0x00000110 +#define AOFF_task_rt_priority 0x00000118 #define ASIZ_task_rt_priority 0x00000008 -#define AOFF_task_it_real_value 0x00000118 +#define AOFF_task_it_real_value 0x00000120 #define ASIZ_task_it_real_value 0x00000008 -#define AOFF_task_it_prof_value 0x00000120 +#define AOFF_task_it_prof_value 0x00000128 #define ASIZ_task_it_prof_value 0x00000008 -#define AOFF_task_it_virt_value 0x00000128 +#define AOFF_task_it_virt_value 0x00000130 #define ASIZ_task_it_virt_value 0x00000008 -#define AOFF_task_it_real_incr 0x00000130 +#define AOFF_task_it_real_incr 0x00000138 #define ASIZ_task_it_real_incr 0x00000008 -#define AOFF_task_it_prof_incr 0x00000138 +#define AOFF_task_it_prof_incr 0x00000140 #define ASIZ_task_it_prof_incr 0x00000008 -#define AOFF_task_it_virt_incr 0x00000140 +#define AOFF_task_it_virt_incr 0x00000148 #define ASIZ_task_it_virt_incr 0x00000008 -#define AOFF_task_real_timer 0x00000148 +#define AOFF_task_real_timer 0x00000150 #define ASIZ_task_real_timer 0x00000028 -#define AOFF_task_times 0x00000170 +#define AOFF_task_times 0x00000178 #define ASIZ_task_times 0x00000020 -#define AOFF_task_start_time 0x00000190 +#define AOFF_task_start_time 0x00000198 #define ASIZ_task_start_time 0x00000008 -#define AOFF_task_per_cpu_utime 0x00000198 +#define AOFF_task_per_cpu_utime 0x000001a0 #define ASIZ_task_per_cpu_utime 0x00000100 -#define AOFF_task_min_flt 0x00000398 +#define AOFF_task_min_flt 0x000003a0 #define ASIZ_task_min_flt 0x00000008 -#define AOFF_task_maj_flt 0x000003a0 +#define AOFF_task_maj_flt 0x000003a8 #define ASIZ_task_maj_flt 0x00000008 -#define AOFF_task_nswap 0x000003a8 +#define AOFF_task_nswap 0x000003b0 #define ASIZ_task_nswap 0x00000008 -#define AOFF_task_cmin_flt 0x000003b0 +#define AOFF_task_cmin_flt 0x000003b8 #define ASIZ_task_cmin_flt 0x00000008 -#define AOFF_task_cmaj_flt 0x000003b8 +#define AOFF_task_cmaj_flt 0x000003c0 #define ASIZ_task_cmaj_flt 0x00000008 -#define AOFF_task_cnswap 0x000003c0 +#define AOFF_task_cnswap 0x000003c8 #define ASIZ_task_cnswap 0x00000008 -#define AOFF_task_uid 0x000003cc +#define AOFF_task_uid 0x000003d4 #define ASIZ_task_uid 0x00000004 -#define AOFF_task_euid 0x000003d0 +#define AOFF_task_euid 0x000003d8 #define ASIZ_task_euid 0x00000004 -#define AOFF_task_suid 0x000003d4 +#define AOFF_task_suid 0x000003dc #define ASIZ_task_suid 0x00000004 -#define AOFF_task_fsuid 0x000003d8 +#define AOFF_task_fsuid 0x000003e0 #define ASIZ_task_fsuid 0x00000004 -#define AOFF_task_gid 0x000003dc +#define AOFF_task_gid 0x000003e4 #define ASIZ_task_gid 0x00000004 -#define AOFF_task_egid 0x000003e0 +#define AOFF_task_egid 0x000003e8 #define ASIZ_task_egid 0x00000004 -#define AOFF_task_sgid 0x000003e4 +#define AOFF_task_sgid 0x000003ec #define ASIZ_task_sgid 0x00000004 -#define AOFF_task_fsgid 0x000003e8 +#define AOFF_task_fsgid 0x000003f0 #define ASIZ_task_fsgid 0x00000004 -#define AOFF_task_ngroups 0x000003ec +#define AOFF_task_ngroups 0x000003f4 #define ASIZ_task_ngroups 0x00000004 -#define AOFF_task_groups 0x000003f0 +#define AOFF_task_groups 0x000003f8 #define ASIZ_task_groups 0x00000080 -#define AOFF_task_cap_effective 0x00000470 +#define AOFF_task_cap_effective 0x00000478 #define ASIZ_task_cap_effective 0x00000004 -#define AOFF_task_cap_inheritable 0x00000474 +#define AOFF_task_cap_inheritable 0x0000047c #define ASIZ_task_cap_inheritable 0x00000004 -#define AOFF_task_cap_permitted 0x00000478 +#define AOFF_task_cap_permitted 0x00000480 #define ASIZ_task_cap_permitted 0x00000004 -#define AOFF_task_user 0x00000480 +#define AOFF_task_user 0x00000488 #define ASIZ_task_user 0x00000008 -#define AOFF_task_rlim 0x00000488 +#define AOFF_task_rlim 0x00000490 #define ASIZ_task_rlim 0x000000a0 -#define AOFF_task_used_math 0x00000528 +#define AOFF_task_used_math 0x00000530 #define ASIZ_task_used_math 0x00000002 -#define AOFF_task_comm 0x0000052a +#define AOFF_task_comm 0x00000532 #define ASIZ_task_comm 0x00000010 -#define AOFF_task_link_count 0x0000053c +#define AOFF_task_link_count 0x00000544 #define ASIZ_task_link_count 0x00000004 -#define AOFF_task_tty 0x00000540 +#define AOFF_task_tty 0x00000548 #define ASIZ_task_tty 0x00000008 -#define AOFF_task_semundo 0x00000548 +#define AOFF_task_semundo 0x00000550 #define ASIZ_task_semundo 0x00000008 -#define AOFF_task_semsleeping 0x00000550 +#define AOFF_task_semsleeping 0x00000558 #define ASIZ_task_semsleeping 0x00000008 #define AOFF_task_tss 0x00000560 #define ASIZ_task_tss 0x00000470 @@ -620,147 +624,149 @@ #define ASIZ_task_exec_domain 0x00000008 #define AOFF_task_need_resched 0x00000028 #define ASIZ_task_need_resched 0x00000008 -#define AOFF_task_counter 0x00000030 +#define AOFF_task_ptrace 0x00000030 +#define ASIZ_task_ptrace 0x00000008 +#define AOFF_task_counter 0x00000038 #define ASIZ_task_counter 0x00000008 -#define AOFF_task_priority 0x00000038 +#define AOFF_task_priority 0x00000040 #define ASIZ_task_priority 0x00000008 -#define AOFF_task_avg_slice 0x00000040 +#define AOFF_task_avg_slice 0x00000048 #define ASIZ_task_avg_slice 0x00000008 -#define AOFF_task_has_cpu 0x00000048 +#define AOFF_task_has_cpu 0x00000050 #define ASIZ_task_has_cpu 0x00000004 -#define AOFF_task_processor 0x0000004c +#define AOFF_task_processor 0x00000054 #define ASIZ_task_processor 0x00000004 -#define AOFF_task_last_processor 0x00000050 +#define AOFF_task_last_processor 0x00000058 #define ASIZ_task_last_processor 0x00000004 -#define AOFF_task_lock_depth 0x00000054 +#define AOFF_task_lock_depth 0x0000005c #define ASIZ_task_lock_depth 0x00000004 -#define AOFF_task_next_task 0x00000058 +#define AOFF_task_next_task 0x00000060 #define ASIZ_task_next_task 0x00000008 -#define AOFF_task_prev_task 0x00000060 +#define AOFF_task_prev_task 0x00000068 #define ASIZ_task_prev_task 0x00000008 -#define AOFF_task_next_run 0x00000068 +#define AOFF_task_next_run 0x00000070 #define ASIZ_task_next_run 0x00000008 -#define AOFF_task_prev_run 0x00000070 +#define AOFF_task_prev_run 0x00000078 #define ASIZ_task_prev_run 0x00000008 -#define AOFF_task_task_exclusive 0x00000078 +#define AOFF_task_task_exclusive 0x00000080 #define ASIZ_task_task_exclusive 0x00000004 -#define AOFF_task_binfmt 0x00000080 +#define AOFF_task_binfmt 0x00000088 #define ASIZ_task_binfmt 0x00000008 -#define AOFF_task_exit_code 0x00000088 +#define AOFF_task_exit_code 0x00000090 #define ASIZ_task_exit_code 0x00000004 -#define AOFF_task_exit_signal 0x0000008c +#define AOFF_task_exit_signal 0x00000094 #define ASIZ_task_exit_signal 0x00000004 -#define AOFF_task_pdeath_signal 0x00000090 +#define AOFF_task_pdeath_signal 0x00000098 #define ASIZ_task_pdeath_signal 0x00000004 -#define AOFF_task_personality 0x00000098 +#define AOFF_task_personality 0x000000a0 #define ASIZ_task_personality 0x00000008 -#define AOFF_task_pid 0x000000a4 +#define AOFF_task_pid 0x000000ac #define ASIZ_task_pid 0x00000004 -#define AOFF_task_pgrp 0x000000a8 +#define AOFF_task_pgrp 0x000000b0 #define ASIZ_task_pgrp 0x00000004 -#define AOFF_task_tty_old_pgrp 0x000000ac +#define AOFF_task_tty_old_pgrp 0x000000b4 #define ASIZ_task_tty_old_pgrp 0x00000004 -#define AOFF_task_session 0x000000b0 +#define AOFF_task_session 0x000000b8 #define ASIZ_task_session 0x00000004 -#define AOFF_task_leader 0x000000b4 +#define AOFF_task_leader 0x000000bc #define ASIZ_task_leader 0x00000004 -#define AOFF_task_p_opptr 0x000000b8 +#define AOFF_task_p_opptr 0x000000c0 #define ASIZ_task_p_opptr 0x00000008 -#define AOFF_task_p_pptr 0x000000c0 +#define AOFF_task_p_pptr 0x000000c8 #define ASIZ_task_p_pptr 0x00000008 -#define AOFF_task_p_cptr 0x000000c8 +#define AOFF_task_p_cptr 0x000000d0 #define ASIZ_task_p_cptr 0x00000008 -#define AOFF_task_p_ysptr 0x000000d0 +#define AOFF_task_p_ysptr 0x000000d8 #define ASIZ_task_p_ysptr 0x00000008 -#define AOFF_task_p_osptr 0x000000d8 +#define AOFF_task_p_osptr 0x000000e0 #define ASIZ_task_p_osptr 0x00000008 -#define AOFF_task_pidhash_next 0x000000e0 +#define AOFF_task_pidhash_next 0x000000e8 #define ASIZ_task_pidhash_next 0x00000008 -#define AOFF_task_pidhash_pprev 0x000000e8 +#define AOFF_task_pidhash_pprev 0x000000f0 #define ASIZ_task_pidhash_pprev 0x00000008 -#define AOFF_task_tarray_ptr 0x000000f0 +#define AOFF_task_tarray_ptr 0x000000f8 #define ASIZ_task_tarray_ptr 0x00000008 -#define AOFF_task_wait_chldexit 0x000000f8 +#define AOFF_task_wait_chldexit 0x00000100 #define ASIZ_task_wait_chldexit 0x00000008 -#define AOFF_task_vfork_sem 0x00000100 +#define AOFF_task_vfork_sem 0x00000108 #define ASIZ_task_vfork_sem 0x00000008 -#define AOFF_task_policy 0x00000108 +#define AOFF_task_policy 0x00000110 #define ASIZ_task_policy 0x00000008 -#define AOFF_task_rt_priority 0x00000110 +#define AOFF_task_rt_priority 0x00000118 #define ASIZ_task_rt_priority 0x00000008 -#define AOFF_task_it_real_value 0x00000118 +#define AOFF_task_it_real_value 0x00000120 #define ASIZ_task_it_real_value 0x00000008 -#define AOFF_task_it_prof_value 0x00000120 +#define AOFF_task_it_prof_value 0x00000128 #define ASIZ_task_it_prof_value 0x00000008 -#define AOFF_task_it_virt_value 0x00000128 +#define AOFF_task_it_virt_value 0x00000130 #define ASIZ_task_it_virt_value 0x00000008 -#define AOFF_task_it_real_incr 0x00000130 +#define AOFF_task_it_real_incr 0x00000138 #define ASIZ_task_it_real_incr 0x00000008 -#define AOFF_task_it_prof_incr 0x00000138 +#define AOFF_task_it_prof_incr 0x00000140 #define ASIZ_task_it_prof_incr 0x00000008 -#define AOFF_task_it_virt_incr 0x00000140 +#define AOFF_task_it_virt_incr 0x00000148 #define ASIZ_task_it_virt_incr 0x00000008 -#define AOFF_task_real_timer 0x00000148 +#define AOFF_task_real_timer 0x00000150 #define ASIZ_task_real_timer 0x00000028 -#define AOFF_task_times 0x00000170 +#define AOFF_task_times 0x00000178 #define ASIZ_task_times 0x00000020 -#define AOFF_task_start_time 0x00000190 +#define AOFF_task_start_time 0x00000198 #define ASIZ_task_start_time 0x00000008 -#define AOFF_task_per_cpu_utime 0x00000198 +#define AOFF_task_per_cpu_utime 0x000001a0 #define ASIZ_task_per_cpu_utime 0x00000100 -#define AOFF_task_min_flt 0x00000398 +#define AOFF_task_min_flt 0x000003a0 #define ASIZ_task_min_flt 0x00000008 -#define AOFF_task_maj_flt 0x000003a0 +#define AOFF_task_maj_flt 0x000003a8 #define ASIZ_task_maj_flt 0x00000008 -#define AOFF_task_nswap 0x000003a8 +#define AOFF_task_nswap 0x000003b0 #define ASIZ_task_nswap 0x00000008 -#define AOFF_task_cmin_flt 0x000003b0 +#define AOFF_task_cmin_flt 0x000003b8 #define ASIZ_task_cmin_flt 0x00000008 -#define AOFF_task_cmaj_flt 0x000003b8 +#define AOFF_task_cmaj_flt 0x000003c0 #define ASIZ_task_cmaj_flt 0x00000008 -#define AOFF_task_cnswap 0x000003c0 +#define AOFF_task_cnswap 0x000003c8 #define ASIZ_task_cnswap 0x00000008 -#define AOFF_task_uid 0x000003cc +#define AOFF_task_uid 0x000003d4 #define ASIZ_task_uid 0x00000004 -#define AOFF_task_euid 0x000003d0 +#define AOFF_task_euid 0x000003d8 #define ASIZ_task_euid 0x00000004 -#define AOFF_task_suid 0x000003d4 +#define AOFF_task_suid 0x000003dc #define ASIZ_task_suid 0x00000004 -#define AOFF_task_fsuid 0x000003d8 +#define AOFF_task_fsuid 0x000003e0 #define ASIZ_task_fsuid 0x00000004 -#define AOFF_task_gid 0x000003dc +#define AOFF_task_gid 0x000003e4 #define ASIZ_task_gid 0x00000004 -#define AOFF_task_egid 0x000003e0 +#define AOFF_task_egid 0x000003e8 #define ASIZ_task_egid 0x00000004 -#define AOFF_task_sgid 0x000003e4 +#define AOFF_task_sgid 0x000003ec #define ASIZ_task_sgid 0x00000004 -#define AOFF_task_fsgid 0x000003e8 +#define AOFF_task_fsgid 0x000003f0 #define ASIZ_task_fsgid 0x00000004 -#define AOFF_task_ngroups 0x000003ec +#define AOFF_task_ngroups 0x000003f4 #define ASIZ_task_ngroups 0x00000004 -#define AOFF_task_groups 0x000003f0 +#define AOFF_task_groups 0x000003f8 #define ASIZ_task_groups 0x00000080 -#define AOFF_task_cap_effective 0x00000470 +#define AOFF_task_cap_effective 0x00000478 #define ASIZ_task_cap_effective 0x00000004 -#define AOFF_task_cap_inheritable 0x00000474 +#define AOFF_task_cap_inheritable 0x0000047c #define ASIZ_task_cap_inheritable 0x00000004 -#define AOFF_task_cap_permitted 0x00000478 +#define AOFF_task_cap_permitted 0x00000480 #define ASIZ_task_cap_permitted 0x00000004 -#define AOFF_task_user 0x00000480 +#define AOFF_task_user 0x00000488 #define ASIZ_task_user 0x00000008 -#define AOFF_task_rlim 0x00000488 +#define AOFF_task_rlim 0x00000490 #define ASIZ_task_rlim 0x000000a0 -#define AOFF_task_used_math 0x00000528 +#define AOFF_task_used_math 0x00000530 #define ASIZ_task_used_math 0x00000002 -#define AOFF_task_comm 0x0000052a +#define AOFF_task_comm 0x00000532 #define ASIZ_task_comm 0x00000010 -#define AOFF_task_link_count 0x0000053c +#define AOFF_task_link_count 0x00000544 #define ASIZ_task_link_count 0x00000004 -#define AOFF_task_tty 0x00000540 +#define AOFF_task_tty 0x00000548 #define ASIZ_task_tty 0x00000008 -#define AOFF_task_semundo 0x00000548 +#define AOFF_task_semundo 0x00000550 #define ASIZ_task_semundo 0x00000008 -#define AOFF_task_semsleeping 0x00000550 +#define AOFF_task_semsleeping 0x00000558 #define ASIZ_task_semsleeping 0x00000008 #define AOFF_task_tss 0x00000560 #define ASIZ_task_tss 0x00000470 diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-sparc64/bitops.h linux.20p6/include/asm-sparc64/bitops.h --- linux.vanilla/include/asm-sparc64/bitops.h Sun Mar 25 17:31:09 2001 +++ linux.20p6/include/asm-sparc64/bitops.h Mon Jun 18 08:19:48 2001 @@ -1,4 +1,4 @@ -/* $Id: bitops.h,v 1.26.2.1 2000/08/10 23:50:04 davem Exp $ +/* $Id: bitops.h,v 1.26.2.2 2001/06/07 06:19:33 davem Exp $ * bitops.h: Bit string operations on the V9. * * Copyright 1996, 1997 David S. Miller (davem@caip.rutgers.edu) @@ -20,7 +20,7 @@ * all bit-ops return 0 if bit was previously clear and != 0 otherwise. */ -extern __inline__ unsigned long test_and_set_bit(unsigned long nr, void *addr) +extern __inline__ unsigned long test_and_set_bit(unsigned long nr, volatile void *addr) { unsigned long * m = ((unsigned long *) addr) + (nr >> 6); unsigned long oldbit; @@ -41,7 +41,7 @@ return oldbit != 0; } -extern __inline__ void set_bit(unsigned long nr, void *addr) +extern __inline__ void set_bit(unsigned long nr, volatile void *addr) { unsigned long * m = ((unsigned long *) addr) + (nr >> 6); @@ -60,7 +60,7 @@ : "g5", "g7", "cc", "memory"); } -extern __inline__ unsigned long test_and_clear_bit(unsigned long nr, void *addr) +extern __inline__ unsigned long test_and_clear_bit(unsigned long nr, volatile void *addr) { unsigned long * m = ((unsigned long *) addr) + (nr >> 6); unsigned long oldbit; @@ -81,7 +81,7 @@ return oldbit != 0; } -extern __inline__ void clear_bit(unsigned long nr, void *addr) +extern __inline__ void clear_bit(unsigned long nr, volatile void *addr) { unsigned long * m = ((unsigned long *) addr) + (nr >> 6); @@ -100,7 +100,7 @@ : "g5", "g7", "cc", "memory"); } -extern __inline__ unsigned long test_and_change_bit(unsigned long nr, void *addr) +extern __inline__ unsigned long test_and_change_bit(unsigned long nr, volatile void *addr) { unsigned long * m = ((unsigned long *) addr) + (nr >> 6); unsigned long oldbit; @@ -119,7 +119,7 @@ return oldbit != 0; } -extern __inline__ void change_bit(unsigned long nr, void *addr) +extern __inline__ void change_bit(unsigned long nr, volatile void *addr) { unsigned long * m = ((unsigned long *) addr) + (nr >> 6); @@ -135,7 +135,7 @@ : "g5", "g7", "cc", "memory"); } -extern __inline__ unsigned long test_bit(int nr, __const__ void *addr) +extern __inline__ unsigned long test_bit(int nr, __const__ volatile void *addr) { return 1UL & (((__const__ long *) addr)[nr >> 6] >> (nr & 63)); } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-sparc64/pbm.h linux.20p6/include/asm-sparc64/pbm.h --- linux.vanilla/include/asm-sparc64/pbm.h Sun Mar 25 17:31:09 2001 +++ linux.20p6/include/asm-sparc64/pbm.h Mon Jun 18 08:19:06 2001 @@ -1,4 +1,4 @@ -/* $Id: pbm.h,v 1.16.2.1 2000/06/14 07:41:19 davem Exp $ +/* $Id: pbm.h,v 1.16.2.2 2001/05/16 07:28:43 davem Exp $ * pbm.h: U2P PCI bus module pseudo driver software state. * * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu) @@ -64,6 +64,7 @@ unsigned long *pci_mem_space; u32 upa_portid; int index; + int pbms_same_domain; struct linux_pbm_info pbm_A; struct linux_pbm_info pbm_B; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-sparc64/pci.h linux.20p6/include/asm-sparc64/pci.h --- linux.vanilla/include/asm-sparc64/pci.h Thu Jan 1 01:00:00 1970 +++ linux.20p6/include/asm-sparc64/pci.h Mon Jun 18 08:19:06 2001 @@ -0,0 +1,19 @@ +#ifndef _SPARC64_PCI_H +#define _SPARC64_PCI_H + +#include +#include + +/* Return the index of the PCI controller for device PDEV. */ + +extern int pci_controller_num(struct pci_dev *pdev); + +/* Platform support for /proc/bus/pci/X/Y mmap()s. */ + +#define HAVE_PCI_MMAP + +extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma, + enum pci_mmap_state mmap_state, + int write_combine); + +#endif /* !(_SPARC64_PCI_H) */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-sparc64/sab82532.h linux.20p6/include/asm-sparc64/sab82532.h --- linux.vanilla/include/asm-sparc64/sab82532.h Sun Mar 25 17:31:09 2001 +++ linux.20p6/include/asm-sparc64/sab82532.h Mon Jun 18 08:19:48 2001 @@ -1,4 +1,4 @@ -/* $Id: sab82532.h,v 1.4 1998/10/25 23:04:29 ecd Exp $ +/* $Id: sab82532.h,v 1.4.2.1 2001/05/28 23:13:36 ecd Exp $ * sab82532.h: Register Definitions for the Siemens SAB82532 DUSCC * * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) @@ -148,7 +148,7 @@ int close_delay; unsigned short closing_wait; unsigned short closing_wait2; - int all_sent; + unsigned long irqflags; int is_console; unsigned char interrupt_mask0; unsigned char interrupt_mask1; @@ -179,6 +179,10 @@ struct sab82532 *next; struct sab82532 *prev; }; + +/* irqflags bits */ +#define SAB82532_ALLS 0x00000001 +#define SAB82532_XPR 0x00000002 /* RFIFO Status Byte */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-sparc64/smp.h linux.20p6/include/asm-sparc64/smp.h --- linux.vanilla/include/asm-sparc64/smp.h Sun Mar 25 17:31:09 2001 +++ linux.20p6/include/asm-sparc64/smp.h Tue May 8 15:49:13 2001 @@ -38,7 +38,7 @@ unsigned int multiplier; unsigned int counter; unsigned int idle_volume; - unsigned int __pad; + unsigned int clock_tick; /* %tick's per second */ unsigned long udelay_val; /* Dcache line 2 */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-sparc64/ttable.h linux.20p6/include/asm-sparc64/ttable.h --- linux.vanilla/include/asm-sparc64/ttable.h Sun Mar 25 17:31:09 2001 +++ linux.20p6/include/asm-sparc64/ttable.h Tue May 8 15:49:13 2001 @@ -1,4 +1,4 @@ -/* $Id: ttable.h,v 1.11.2.3 1999/10/07 20:48:25 davem Exp $ */ +/* $Id: ttable.h,v 1.11.2.5 2001/03/28 11:24:15 davem Exp $ */ #ifndef _SPARC64_TTABLE_H #define _SPARC64_TTABLE_H @@ -54,12 +54,22 @@ clr %l6; \ nop; + /* The grotty trick to save %g1 into current->thread.kernel_cntd0 + * is because when we take this trap we could be interrupting trap + * code already using the trap alternate global registers. It is + * better to corrupt a performance counter than corrupt trap register + * state. We cross our fingers and pray that this store/load does + * not cause yet another CEE trap. + */ #define TRAPTL1_CEE \ + membar #Sync; \ + stx %g1, [%g6 + AOFF_task_tss + AOFF_thread_kernel_cntd0]; \ ldxa [%g0] ASI_AFSR, %g1; \ membar #Sync; \ stxa %g1, [%g0] ASI_AFSR; \ membar #Sync; \ - retry; nop; nop; nop; + ldx [%g6 + AOFF_task_tss + AOFF_thread_kernel_cntd0], %g1; \ + retry; #define TRAP_ARG(routine, arg) \ sethi %hi(109f), %g7; \ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/asm-sparc64/uaccess.h linux.20p6/include/asm-sparc64/uaccess.h --- linux.vanilla/include/asm-sparc64/uaccess.h Sun Mar 25 17:37:40 2001 +++ linux.20p6/include/asm-sparc64/uaccess.h Mon Jun 18 08:19:48 2001 @@ -1,4 +1,4 @@ -/* $Id: uaccess.h,v 1.29.2.1 1999/09/10 09:54:38 davem Exp $ */ +/* $Id: uaccess.h,v 1.29.2.2 2001/03/01 00:49:03 davem Exp $ */ #ifndef _ASM_UACCESS_H #define _ASM_UACCESS_H diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/b1lli.h linux.20p6/include/linux/b1lli.h --- linux.vanilla/include/linux/b1lli.h Sun Mar 25 17:31:04 2001 +++ linux.20p6/include/linux/b1lli.h Mon Jun 25 14:24:29 2001 @@ -1,75 +1,10 @@ /* - * $Id: b1lli.h,v 1.8 1999/07/01 15:26:54 calle Exp $ + * $Id: b1lli.h,v 1.8.8.2 2001/05/17 20:41:52 kai Exp $ * * ISDN lowlevel-module for AVM B1-card. * * Copyright 1996 by Carsten Paeth (calle@calle.in-berlin.de) * - * $Log: b1lli.h,v $ - * Revision 1.8 1999/07/01 15:26:54 calle - * complete new version (I love it): - * + new hardware independed "capi_driver" interface that will make it easy to: - * - support other controllers with CAPI-2.0 (i.e. USB Controller) - * - write a CAPI-2.0 for the passive cards - * - support serial link CAPI-2.0 boxes. - * + wrote "capi_driver" for all supported cards. - * + "capi_driver" (supported cards) now have to be configured with - * make menuconfig, in the past all supported cards where included - * at once. - * + new and better informations in /proc/capi/ - * + new ioctl to switch trace of capi messages per controller - * using "avmcapictrl trace [contr] on|off|...." - * + complete testcircle with all supported cards and also the - * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done. - * - * Revision 1.7 1999/06/21 15:24:25 calle - * extend information in /proc. - * - * Revision 1.6 1999/04/15 19:49:36 calle - * fix fuer die B1-PCI. Jetzt geht z.B. auch IRQ 17 ... - * - * Revision 1.5 1998/10/25 14:50:28 fritz - * Backported from MIPS (Cobalt). - * - * Revision 1.4 1998/03/29 16:05:02 calle - * changes from 2.0 tree merged. - * - * Revision 1.1.2.9 1998/03/20 14:30:02 calle - * added cardnr to detect if you try to add same T1 to different io address. - * change number of nccis depending on number of channels. - * - * Revision 1.1.2.8 1998/03/04 17:32:33 calle - * Changes for T1. - * - * Revision 1.1.2.7 1998/02/27 15:38:29 calle - * T1 running with slow link. - * - * Revision 1.1.2.6 1998/02/24 17:57:36 calle - * changes for T1. - * - * Revision 1.3 1998/01/31 10:54:37 calle - * include changes for PCMCIA cards from 2.0 version - * - * Revision 1.2 1997/12/10 19:38:42 calle - * get changes from 2.0 tree - * - * Revision 1.1.2.2 1997/11/26 16:57:26 calle - * more changes for B1/M1/T1. - * - * Revision 1.1.2.1 1997/11/26 10:47:01 calle - * prepared for M1 (Mobile) and T1 (PMX) cards. - * prepared to set configuration after load to support other D-channel - * protocols, point-to-point and leased lines. - * - * Revision 1.1 1997/03/04 21:27:32 calle - * First version in isdn4linux - * - * Revision 2.2 1997/02/12 09:31:39 calle - * new version - * - * Revision 1.1 1997/01/31 10:32:20 calle - * Initial revision - * */ #ifndef _B1LLI_H_ @@ -129,7 +64,7 @@ #define AVMB1_LOAD_AND_CONFIG 3 /* load image and config to card */ #define AVMB1_ADDCARD_WITH_TYPE 4 /* add a new card, with cardtype */ #define AVMB1_GET_CARDINFO 5 /* get cardtype */ -#define AVMB1_REMOVECARD 6 /* remove a card (usefull for T1) */ +#define AVMB1_REMOVECARD 6 /* remove a card (useful for T1) */ #define AVMB1_REGISTERCARD_IS_OBSOLETE diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/b1pcmcia.h linux.20p6/include/linux/b1pcmcia.h --- linux.vanilla/include/linux/b1pcmcia.h Sun Mar 25 17:31:05 2001 +++ linux.20p6/include/linux/b1pcmcia.h Mon Jun 25 14:24:29 2001 @@ -1,27 +1,10 @@ /* - * $Id: b1pcmcia.h,v 1.1 1999/07/01 15:26:56 calle Exp $ + * $Id: b1pcmcia.h,v 1.1.8.1 2001/05/17 20:41:52 kai Exp $ * * Exported functions of module b1pcmcia to be called by * avm_cs card services module. * * Copyright 1999 by Carsten Paeth (calle@calle.in-berlin.de) - * - * $Log: b1pcmcia.h,v $ - * Revision 1.1 1999/07/01 15:26:56 calle - * complete new version (I love it): - * + new hardware independed "capi_driver" interface that will make it easy to: - * - support other controllers with CAPI-2.0 (i.e. USB Controller) - * - write a CAPI-2.0 for the passive cards - * - support serial link CAPI-2.0 boxes. - * + wrote "capi_driver" for all supported cards. - * + "capi_driver" (supported cards) now have to be configured with - * make menuconfig, in the past all supported cards where included - * at once. - * + new and better informations in /proc/capi/ - * + new ioctl to switch trace of capi messages per controller - * using "avmcapictrl trace [contr] on|off|...." - * + complete testcircle with all supported cards and also the - * PCMCIA cards (now patch for pcmcia-cs-3.0.13 needed) done. * */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/binfmts.h linux.20p6/include/linux/binfmts.h --- linux.vanilla/include/linux/binfmts.h Sun Mar 25 17:37:40 2001 +++ linux.20p6/include/linux/binfmts.h Tue Jun 19 09:37:49 2001 @@ -32,6 +32,8 @@ int priv_change; }; +struct file; + /* * This structure defines the functions that are used to load the binary formats that * linux accepts. @@ -41,9 +43,11 @@ struct module *module; int (*load_binary)(struct linux_binprm *, struct pt_regs * regs); int (*load_shlib)(int fd); - int (*core_dump)(long signr, struct pt_regs * regs); + int (*core_dump)(long signr, struct pt_regs * regs, struct file *file); + unsigned long min_coredump; }; +extern int do_coredump(long, struct pt_regs *); extern int register_binfmt(struct linux_binfmt *); extern int unregister_binfmt(struct linux_binfmt *); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/cciss_ioctl.h linux.20p6/include/linux/cciss_ioctl.h --- linux.vanilla/include/linux/cciss_ioctl.h Sun Mar 25 17:31:05 2001 +++ linux.20p6/include/linux/cciss_ioctl.h Fri May 4 23:14:43 2001 @@ -80,25 +80,28 @@ #define CISS_MAX_LUN 16 +#define LEVEL2LUN 1 // index into Target(x) structure, due to byte swapping +#define LEVEL3LUN 0 + #pragma pack(1) //Command List Structure typedef union _SCSI3Addr_struct { struct { + BYTE Dev; BYTE Bus:6; BYTE Mode:2; // b00 - BYTE Dev; } PeripDev; struct { + BYTE DevLSB; BYTE DevMSB:6; BYTE Mode:2; // b01 - BYTE DevLSB; } LogDev; struct { - BYTE Targ:6; - BYTE Mode:2; // b10 BYTE Dev:5; BYTE Bus:3; + BYTE Targ:6; + BYTE Mode:2; // b10 } LogUnit; } SCSI3Addr_struct; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/concap.h linux.20p6/include/linux/concap.h --- linux.vanilla/include/linux/concap.h Sun Mar 25 17:31:05 2001 +++ linux.20p6/include/linux/concap.h Mon Jun 25 14:55:29 2001 @@ -5,6 +5,7 @@ #ifdef __KERNEL__ #include #include +#include /* Stuff to support encapsulation protocols genericly. The encapsulation protocol is processed at the uppermost layer of the network interface. diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/falc-lh.h linux.20p6/include/linux/falc-lh.h --- linux.vanilla/include/linux/falc-lh.h Sun Mar 25 17:31:05 2001 +++ linux.20p6/include/linux/falc-lh.h Thu Jan 1 01:00:00 1970 @@ -1,1231 +0,0 @@ -/* - * falc.h Description of the Siemens FALC T1/E1 framer. - * - * Author: Ivan Passos - * - * Copyright: (c) 2000 Cyclades Corp. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - * $Log: falc.h,v $ - * Revision 1.1 2000/05/15 ivan - * Included DJA bits for the LIM2 register. - * - * Revision 1.0 2000/02/22 ivan - * Initial version. - * - */ - -#ifndef _FALC_LH_H -#define _FALC_LH_H - -#define NUM_OF_T1_CHANNELS 24 -#define NUM_OF_E1_CHANNELS 32 - -/*>>>>>>>>>>>>>>>>> FALC Register Bits (Transmit Mode) <<<<<<<<<<<<<<<<<<< */ - -/* CMDR (Command Register) - ---------------- E1 & T1 ------------------------------ */ -#define CMDR_RMC 0x80 -#define CMDR_RRES 0x40 -#define CMDR_XREP 0x20 -#define CMDR_XRES 0x10 -#define CMDR_XHF 0x08 -#define CMDR_XTF 0x04 -#define CMDR_XME 0x02 -#define CMDR_SRES 0x01 - -/* MODE (Mode Register) - ----------------- E1 & T1 ----------------------------- */ -#define MODE_MDS2 0x80 -#define MODE_MDS1 0x40 -#define MODE_MDS0 0x20 -#define MODE_BRAC 0x10 -#define MODE_HRAC 0x08 - -/* IPC (Interrupt Port Configuration) - ----------------- E1 & T1 ----------------------------- */ -#define IPC_VIS 0x80 -#define IPC_SCI 0x04 -#define IPC_IC1 0x02 -#define IPC_IC0 0x01 - -/* CCR1 (Common Configuration Register 1) - ----------------- E1 & T1 ----------------------------- */ -#define CCR1_SFLG 0x80 -#define CCR1_XTS16RA 0x40 -#define CCR1_BRM 0x40 -#define CCR1_CASSYM 0x20 -#define CCR1_EDLX 0x20 -#define CCR1_EITS 0x10 -#define CCR1_ITF 0x08 -#define CCR1_RFT1 0x02 -#define CCR1_RFT0 0x01 - -/* CCR3 (Common Configuration Register 3) - ---------------- E1 & T1 ------------------------------ */ - -#define CCR3_PRE1 0x80 -#define CCR3_PRE0 0x40 -#define CCR3_EPT 0x20 -#define CCR3_RADD 0x10 -#define CCR3_RCRC 0x04 -#define CCR3_XCRC 0x02 - - -/* RTR1-4 (Receive Timeslot Register 1-4) - ---------------- E1 & T1 ------------------------------ */ - -#define RTR1_TS0 0x80 -#define RTR1_TS1 0x40 -#define RTR1_TS2 0x20 -#define RTR1_TS3 0x10 -#define RTR1_TS4 0x08 -#define RTR1_TS5 0x04 -#define RTR1_TS6 0x02 -#define RTR1_TS7 0x01 - -#define RTR2_TS8 0x80 -#define RTR2_TS9 0x40 -#define RTR2_TS10 0x20 -#define RTR2_TS11 0x10 -#define RTR2_TS12 0x08 -#define RTR2_TS13 0x04 -#define RTR2_TS14 0x02 -#define RTR2_TS15 0x01 - -#define RTR3_TS16 0x80 -#define RTR3_TS17 0x40 -#define RTR3_TS18 0x20 -#define RTR3_TS19 0x10 -#define RTR3_TS20 0x08 -#define RTR3_TS21 0x04 -#define RTR3_TS22 0x02 -#define RTR3_TS23 0x01 - -#define RTR4_TS24 0x80 -#define RTR4_TS25 0x40 -#define RTR4_TS26 0x20 -#define RTR4_TS27 0x10 -#define RTR4_TS28 0x08 -#define RTR4_TS29 0x04 -#define RTR4_TS30 0x02 -#define RTR4_TS31 0x01 - - -/* TTR1-4 (Transmit Timeslot Register 1-4) - ---------------- E1 & T1 ------------------------------ */ - -#define TTR1_TS0 0x80 -#define TTR1_TS1 0x40 -#define TTR1_TS2 0x20 -#define TTR1_TS3 0x10 -#define TTR1_TS4 0x08 -#define TTR1_TS5 0x04 -#define TTR1_TS6 0x02 -#define TTR1_TS7 0x01 - -#define TTR2_TS8 0x80 -#define TTR2_TS9 0x40 -#define TTR2_TS10 0x20 -#define TTR2_TS11 0x10 -#define TTR2_TS12 0x08 -#define TTR2_TS13 0x04 -#define TTR2_TS14 0x02 -#define TTR2_TS15 0x01 - -#define TTR3_TS16 0x80 -#define TTR3_TS17 0x40 -#define TTR3_TS18 0x20 -#define TTR3_TS19 0x10 -#define TTR3_TS20 0x08 -#define TTR3_TS21 0x04 -#define TTR3_TS22 0x02 -#define TTR3_TS23 0x01 - -#define TTR4_TS24 0x80 -#define TTR4_TS25 0x40 -#define TTR4_TS26 0x20 -#define TTR4_TS27 0x10 -#define TTR4_TS28 0x08 -#define TTR4_TS29 0x04 -#define TTR4_TS30 0x02 -#define TTR4_TS31 0x01 - - - -/* IMR0-4 (Interrupt Mask Register 0-4) - - ----------------- E1 & T1 ----------------------------- */ - -#define IMR0_RME 0x80 -#define IMR0_RFS 0x40 -#define IMR0_T8MS 0x20 -#define IMR0_ISF 0x20 -#define IMR0_RMB 0x10 -#define IMR0_CASC 0x08 -#define IMR0_RSC 0x08 -#define IMR0_CRC6 0x04 -#define IMR0_CRC4 0x04 -#define IMR0_PDEN 0x02 -#define IMR0_RPF 0x01 - -#define IMR1_CASE 0x80 -#define IMR1_RDO 0x40 -#define IMR1_ALLS 0x20 -#define IMR1_XDU 0x10 -#define IMR1_XMB 0x08 -#define IMR1_XLSC 0x02 -#define IMR1_XPR 0x01 -#define IMR1_LLBSC 0x80 - -#define IMR2_FAR 0x80 -#define IMR2_LFA 0x40 -#define IMR2_MFAR 0x20 -#define IMR2_T400MS 0x10 -#define IMR2_LMFA 0x10 -#define IMR2_AIS 0x08 -#define IMR2_LOS 0x04 -#define IMR2_RAR 0x02 -#define IMR2_RA 0x01 - -#define IMR3_ES 0x80 -#define IMR3_SEC 0x40 -#define IMR3_LMFA16 0x20 -#define IMR3_AIS16 0x10 -#define IMR3_RA16 0x08 -#define IMR3_API 0x04 -#define IMR3_XSLP 0x20 -#define IMR3_XSLN 0x10 -#define IMR3_LLBSC 0x08 -#define IMR3_XRS 0x04 -#define IMR3_SLN 0x02 -#define IMR3_SLP 0x01 - -#define IMR4_LFA 0x80 -#define IMR4_FER 0x40 -#define IMR4_CER 0x20 -#define IMR4_AIS 0x10 -#define IMR4_LOS 0x08 -#define IMR4_CVE 0x04 -#define IMR4_SLIP 0x02 -#define IMR4_EBE 0x01 - -/* FMR0-5 for E1 and T1 (Framer Mode Register ) */ - -#define FMR0_XC1 0x80 -#define FMR0_XC0 0x40 -#define FMR0_RC1 0x20 -#define FMR0_RC0 0x10 -#define FMR0_EXTD 0x08 -#define FMR0_ALM 0x04 -#define E1_FMR0_FRS 0x02 -#define T1_FMR0_FRS 0x08 -#define FMR0_SRAF 0x04 -#define FMR0_EXLS 0x02 -#define FMR0_SIM 0x01 - -#define FMR1_MFCS 0x80 -#define FMR1_AFR 0x40 -#define FMR1_ENSA 0x20 -#define FMR1_CTM 0x80 -#define FMR1_SIGM 0x40 -#define FMR1_EDL 0x20 -#define FMR1_PMOD 0x10 -#define FMR1_XFS 0x08 -#define FMR1_CRC 0x08 -#define FMR1_ECM 0x04 -#define FMR1_IMOD 0x02 -#define FMR1_XAIS 0x01 - -#define FMR2_RFS1 0x80 -#define FMR2_RFS0 0x40 -#define FMR2_MCSP 0x40 -#define FMR2_RTM 0x20 -#define FMR2_SSP 0x20 -#define FMR2_DAIS 0x10 -#define FMR2_SAIS 0x08 -#define FMR2_PLB 0x04 -#define FMR2_AXRA 0x02 -#define FMR2_ALMF 0x01 -#define FMR2_EXZE 0x01 - -#define LOOP_RTM 0x40 -#define LOOP_SFM 0x40 -#define LOOP_ECLB 0x20 -#define LOOP_CLA 0x1f - -/*--------------------- E1 ----------------------------*/ -#define FMR3_XLD 0x20 -#define FMR3_XLU 0x10 - -/*--------------------- T1 ----------------------------*/ -#define FMR4_AIS3 0x80 -#define FMR4_TM 0x40 -#define FMR4_XRA 0x20 -#define FMR4_SSC1 0x10 -#define FMR4_SSC0 0x08 -#define FMR4_AUTO 0x04 -#define FMR4_FM1 0x02 -#define FMR4_FM0 0x01 - -#define FMR5_SRS 0x80 -#define FMR5_EIBR 0x40 -#define FMR5_XLD 0x20 -#define FMR5_XLU 0x10 - - -/* LOOP (Channel Loop Back) - - ------------------ E1 & T1 ---------------------------- */ - -#define LOOP_SFM 0x40 -#define LOOP_ECLB 0x20 -#define LOOP_CLA4 0x10 -#define LOOP_CLA3 0x08 -#define LOOP_CLA2 0x04 -#define LOOP_CLA1 0x02 -#define LOOP_CLA0 0x01 - - - -/* XSW (Transmit Service Word Pulseframe) - - ------------------- E1 --------------------------- */ - -#define XSW_XSIS 0x80 -#define XSW_XRA 0x20 -#define XSW_XY0 0x10 -#define XSW_XY1 0x08 -#define XSW_XY2 0x04 -#define XSW_XY3 0x02 -#define XSW_XY4 0x01 - - -/* XSP (Transmit Spare Bits) - - ------------------- E1 --------------------------- */ - -#define XSP_XAP 0x80 -#define XSP_CASEN 0x40 -#define XSP_TT0 0x20 -#define XSP_EBP 0x10 -#define XSP_AXS 0x08 -#define XSP_XSIF 0x04 -#define XSP_XS13 0x02 -#define XSP_XS15 0x01 - - -/* XC0/1 (Transmit Control 0/1) - ------------------ E1 & T1 ---------------------------- */ - -#define XC0_SA8E 0x80 -#define XC0_SA7E 0x40 -#define XC0_SA6E 0x20 -#define XC0_SA5E 0x10 -#define XC0_SA4E 0x08 -#define XC0_BRM 0x80 -#define XC0_MFBS 0x40 -#define XC0_SFRZ 0x10 -#define XC0_XCO2 0x04 -#define XC0_XCO1 0x02 -#define XC0_XCO0 0x01 - -#define XC1_XTO5 0x20 -#define XC1_XTO4 0x10 -#define XC1_XTO3 0x08 -#define XC1_XTO2 0x04 -#define XC1_XTO1 0x02 -#define XC1_XTO0 0x01 - - -/* RC0/1 (Receive Control 0/1) - ------------------ E1 & T1 ---------------------------- */ - -#define RC0_SICS 0x40 -#define RC0_CRCI 0x20 -#define RC0_XCRCI 0x10 -#define RC0_RDIS 0x08 -#define RC0_RCO2 0x04 -#define RC0_RCO1 0x02 -#define RC0_RCO0 0x01 - -#define RC1_SWD 0x80 -#define RC1_ASY4 0x40 -#define RC1_RRAM 0x40 -#define RC1_RTO5 0x20 -#define RC1_RTO4 0x10 -#define RC1_RTO3 0x08 -#define RC1_RTO2 0x04 -#define RC1_RTO1 0x02 -#define RC1_RTO0 0x01 - - - -/* XPM0-2 (Transmit Pulse Mask 0-2) - --------------------- E1 & T1 ------------------------- */ - -#define XPM0_XP12 0x80 -#define XPM0_XP11 0x40 -#define XPM0_XP10 0x20 -#define XPM0_XP04 0x10 -#define XPM0_XP03 0x08 -#define XPM0_XP02 0x04 -#define XPM0_XP01 0x02 -#define XPM0_XP00 0x01 - -#define XPM1_XP30 0x80 -#define XPM1_XP24 0x40 -#define XPM1_XP23 0x20 -#define XPM1_XP22 0x10 -#define XPM1_XP21 0x08 -#define XPM1_XP20 0x04 -#define XPM1_XP14 0x02 -#define XPM1_XP13 0x01 - -#define XPM2_XLHP 0x80 -#define XPM2_XLT 0x40 -#define XPM2_DAXLT 0x20 -#define XPM2_XP34 0x08 -#define XPM2_XP33 0x04 -#define XPM2_XP32 0x02 -#define XPM2_XP31 0x01 - - -/* TSWM (Transparent Service Word Mask) - ------------------ E1 ---------------------------- */ - -#define TSWM_TSIS 0x80 -#define TSWM_TSIF 0x40 -#define TSWM_TRA 0x20 -#define TSWM_TSA4 0x10 -#define TSWM_TSA5 0x08 -#define TSWM_TSA6 0x04 -#define TSWM_TSA7 0x02 -#define TSWM_TSA8 0x01 - -/* IDLE - - ------------------ E1 & T1 ----------------------- */ - -#define IDLE_IDL7 0x80 -#define IDLE_IDL6 0x40 -#define IDLE_IDL5 0x20 -#define IDLE_IDL4 0x10 -#define IDLE_IDL3 0x08 -#define IDLE_IDL2 0x04 -#define IDLE_IDL1 0x02 -#define IDLE_IDL0 0x01 - - -/* XSA4-8 - -------------------E1 ----------------------------- */ - -#define XSA4_XS47 0x80 -#define XSA4_XS46 0x40 -#define XSA4_XS45 0x20 -#define XSA4_XS44 0x10 -#define XSA4_XS43 0x08 -#define XSA4_XS42 0x04 -#define XSA4_XS41 0x02 -#define XSA4_XS40 0x01 - -#define XSA5_XS57 0x80 -#define XSA5_XS56 0x40 -#define XSA5_XS55 0x20 -#define XSA5_XS54 0x10 -#define XSA5_XS53 0x08 -#define XSA5_XS52 0x04 -#define XSA5_XS51 0x02 -#define XSA5_XS50 0x01 - -#define XSA6_XS67 0x80 -#define XSA6_XS66 0x40 -#define XSA6_XS65 0x20 -#define XSA6_XS64 0x10 -#define XSA6_XS63 0x08 -#define XSA6_XS62 0x04 -#define XSA6_XS61 0x02 -#define XSA6_XS60 0x01 - -#define XSA7_XS77 0x80 -#define XSA7_XS76 0x40 -#define XSA7_XS75 0x20 -#define XSA7_XS74 0x10 -#define XSA7_XS73 0x08 -#define XSA7_XS72 0x04 -#define XSA7_XS71 0x02 -#define XSA7_XS70 0x01 - -#define XSA8_XS87 0x80 -#define XSA8_XS86 0x40 -#define XSA8_XS85 0x20 -#define XSA8_XS84 0x10 -#define XSA8_XS83 0x08 -#define XSA8_XS82 0x04 -#define XSA8_XS81 0x02 -#define XSA8_XS80 0x01 - - -/* XDL1-3 (Transmit DL-Bit Register1-3 (read/write)) - ----------------------- T1 --------------------- */ - -#define XDL1_XDL17 0x80 -#define XDL1_XDL16 0x40 -#define XDL1_XDL15 0x20 -#define XDL1_XDL14 0x10 -#define XDL1_XDL13 0x08 -#define XDL1_XDL12 0x04 -#define XDL1_XDL11 0x02 -#define XDL1_XDL10 0x01 - -#define XDL2_XDL27 0x80 -#define XDL2_XDL26 0x40 -#define XDL2_XDL25 0x20 -#define XDL2_XDL24 0x10 -#define XDL2_XDL23 0x08 -#define XDL2_XDL22 0x04 -#define XDL2_XDL21 0x02 -#define XDL2_XDL20 0x01 - -#define XDL3_XDL37 0x80 -#define XDL3_XDL36 0x40 -#define XDL3_XDL35 0x20 -#define XDL3_XDL34 0x10 -#define XDL3_XDL33 0x08 -#define XDL3_XDL32 0x04 -#define XDL3_XDL31 0x02 -#define XDL3_XDL30 0x01 - - -/* ICB1-4 (Idle Channel Register 1-4) - ------------------ E1 ---------------------------- */ - -#define E1_ICB1_IC0 0x80 -#define E1_ICB1_IC1 0x40 -#define E1_ICB1_IC2 0x20 -#define E1_ICB1_IC3 0x10 -#define E1_ICB1_IC4 0x08 -#define E1_ICB1_IC5 0x04 -#define E1_ICB1_IC6 0x02 -#define E1_ICB1_IC7 0x01 - -#define E1_ICB2_IC8 0x80 -#define E1_ICB2_IC9 0x40 -#define E1_ICB2_IC10 0x20 -#define E1_ICB2_IC11 0x10 -#define E1_ICB2_IC12 0x08 -#define E1_ICB2_IC13 0x04 -#define E1_ICB2_IC14 0x02 -#define E1_ICB2_IC15 0x01 - -#define E1_ICB3_IC16 0x80 -#define E1_ICB3_IC17 0x40 -#define E1_ICB3_IC18 0x20 -#define E1_ICB3_IC19 0x10 -#define E1_ICB3_IC20 0x08 -#define E1_ICB3_IC21 0x04 -#define E1_ICB3_IC22 0x02 -#define E1_ICB3_IC23 0x01 - -#define E1_ICB4_IC24 0x80 -#define E1_ICB4_IC25 0x40 -#define E1_ICB4_IC26 0x20 -#define E1_ICB4_IC27 0x10 -#define E1_ICB4_IC28 0x08 -#define E1_ICB4_IC29 0x04 -#define E1_ICB4_IC30 0x02 -#define E1_ICB4_IC31 0x01 - -/* ICB1-4 (Idle Channel Register 1-4) - ------------------ T1 ---------------------------- */ - -#define T1_ICB1_IC1 0x80 -#define T1_ICB1_IC2 0x40 -#define T1_ICB1_IC3 0x20 -#define T1_ICB1_IC4 0x10 -#define T1_ICB1_IC5 0x08 -#define T1_ICB1_IC6 0x04 -#define T1_ICB1_IC7 0x02 -#define T1_ICB1_IC8 0x01 - -#define T1_ICB2_IC9 0x80 -#define T1_ICB2_IC10 0x40 -#define T1_ICB2_IC11 0x20 -#define T1_ICB2_IC12 0x10 -#define T1_ICB2_IC13 0x08 -#define T1_ICB2_IC14 0x04 -#define T1_ICB2_IC15 0x02 -#define T1_ICB2_IC16 0x01 - -#define T1_ICB3_IC17 0x80 -#define T1_ICB3_IC18 0x40 -#define T1_ICB3_IC19 0x20 -#define T1_ICB3_IC20 0x10 -#define T1_ICB3_IC21 0x08 -#define T1_ICB3_IC22 0x04 -#define T1_ICB3_IC23 0x02 -#define T1_ICB3_IC24 0x01 - -/* FMR3 (Framer Mode Register 3) - --------------------E1------------------------ */ - -#define FMR3_CMI 0x08 -#define FMR3_SYNSA 0x04 -#define FMR3_CFRZ 0x02 -#define FMR3_EXTIW 0x01 - - - -/* CCB1-3 (Clear Channel Register) - ------------------- T1 ----------------------- */ - -#define CCB1_CH1 0x80 -#define CCB1_CH2 0x40 -#define CCB1_CH3 0x20 -#define CCB1_CH4 0x10 -#define CCB1_CH5 0x08 -#define CCB1_CH6 0x04 -#define CCB1_CH7 0x02 -#define CCB1_CH8 0x01 - -#define CCB2_CH9 0x80 -#define CCB2_CH10 0x40 -#define CCB2_CH11 0x20 -#define CCB2_CH12 0x10 -#define CCB2_CH13 0x08 -#define CCB2_CH14 0x04 -#define CCB2_CH15 0x02 -#define CCB2_CH16 0x01 - -#define CCB3_CH17 0x80 -#define CCB3_CH18 0x40 -#define CCB3_CH19 0x20 -#define CCB3_CH20 0x10 -#define CCB3_CH21 0x08 -#define CCB3_CH22 0x04 -#define CCB3_CH23 0x02 -#define CCB3_CH24 0x01 - - -/* LIM0/1 (Line Interface Mode 0/1) - ------------------- E1 & T1 --------------------------- */ - -#define LIM0_XFB 0x80 -#define LIM0_XDOS 0x40 -#define LIM0_SCL1 0x20 -#define LIM0_SCL0 0x10 -#define LIM0_EQON 0x08 -#define LIM0_ELOS 0x04 -#define LIM0_LL 0x02 -#define LIM0_MAS 0x01 - -#define LIM1_EFSC 0x80 -#define LIM1_RIL2 0x40 -#define LIM1_RIL1 0x20 -#define LIM1_RIL0 0x10 -#define LIM1_DCOC 0x08 -#define LIM1_JATT 0x04 -#define LIM1_RL 0x02 -#define LIM1_DRS 0x01 - - -/* PCDR (Pulse Count Detection Register(Read/Write)) - ------------------ E1 & T1 ------------------------- */ - -#define PCDR_PCD7 0x80 -#define PCDR_PCD6 0x40 -#define PCDR_PCD5 0x20 -#define PCDR_PCD4 0x10 -#define PCDR_PCD3 0x08 -#define PCDR_PCD2 0x04 -#define PCDR_PCD1 0x02 -#define PCDR_PCD0 0x01 - -#define PCRR_PCR7 0x80 -#define PCRR_PCR6 0x40 -#define PCRR_PCR5 0x20 -#define PCRR_PCR4 0x10 -#define PCRR_PCR3 0x08 -#define PCRR_PCR2 0x04 -#define PCRR_PCR1 0x02 -#define PCRR_PCR0 0x01 - - -/* LIM2 (Line Interface Mode 2) - - ------------------ E1 & T1 ---------------------------- */ - -#define LIM2_DJA2 0x20 -#define LIM2_DJA1 0x10 -#define LIM2_LOS2 0x02 -#define LIM2_LOS1 0x01 - -/* LCR1 (Loop Code Register 1) */ - -#define LCR1_EPRM 0x80 -#define LCR1_XPRBS 0x40 - -/* SIC1 (System Interface Control 1) */ -#define SIC1_SRSC 0x80 -#define SIC1_RBS1 0x20 -#define SIC1_RBS0 0x10 -#define SIC1_SXSC 0x08 -#define SIC1_XBS1 0x02 -#define SIC1_XBS0 0x01 - -/* DEC (Disable Error Counter) - ------------------ E1 & T1 ---------------------------- */ - -#define DEC_DCEC3 0x20 -#define DEC_DBEC 0x10 -#define DEC_DCEC1 0x08 -#define DEC_DCEC 0x08 -#define DEC_DEBC 0x04 -#define DEC_DCVC 0x02 -#define DEC_DFEC 0x01 - - -/* FALC Register Bits (Receive Mode) - ---------------------------------------------------------------------------- */ - - -/* FRS0/1 (Framer Receive Status Register 0/1) - ----------------- E1 & T1 ---------------------------------- */ - -#define FRS0_LOS 0x80 -#define FRS0_AIS 0x40 -#define FRS0_LFA 0x20 -#define FRS0_RRA 0x10 -#define FRS0_API 0x08 -#define FRS0_NMF 0x04 -#define FRS0_LMFA 0x02 -#define FRS0_FSRF 0x01 - -#define FRS1_TS16RA 0x40 -#define FRS1_TS16LOS 0x20 -#define FRS1_TS16AIS 0x10 -#define FRS1_TS16LFA 0x08 -#define FRS1_EXZD 0x80 -#define FRS1_LLBDD 0x10 -#define FRS1_LLBAD 0x08 -#define FRS1_XLS 0x02 -#define FRS1_XLO 0x01 -#define FRS1_PDEN 0x40 - -/* FRS2/3 (Framer Receive Status Register 2/3) - ----------------- T1 ---------------------------------- */ - -#define FRS2_ESC2 0x80 -#define FRS2_ESC1 0x40 -#define FRS2_ESC0 0x20 - -#define FRS3_FEH5 0x20 -#define FRS3_FEH4 0x10 -#define FRS3_FEH3 0x08 -#define FRS3_FEH2 0x04 -#define FRS3_FEH1 0x02 -#define FRS3_FEH0 0x01 - - -/* RSW (Receive Service Word Pulseframe) - ----------------- E1 ------------------------------ */ - -#define RSW_RSI 0x80 -#define RSW_RRA 0x20 -#define RSW_RYO 0x10 -#define RSW_RY1 0x08 -#define RSW_RY2 0x04 -#define RSW_RY3 0x02 -#define RSW_RY4 0x01 - - -/* RSP (Receive Spare Bits / Additional Status) - ---------------- E1 ------------------------------- */ - -#define RSP_SI1 0x80 -#define RSP_SI2 0x40 -#define RSP_LLBDD 0x10 -#define RSP_LLBAD 0x08 -#define RSP_RSIF 0x04 -#define RSP_RS13 0x02 -#define RSP_RS15 0x01 - - -/* FECL (Framing Error Counter) - ---------------- E1 & T1 -------------------------- */ - -#define FECL_FE7 0x80 -#define FECL_FE6 0x40 -#define FECL_FE5 0x20 -#define FECL_FE4 0x10 -#define FECL_FE3 0x08 -#define FECL_FE2 0x04 -#define FECL_FE1 0x02 -#define FECL_FE0 0x01 - -#define FECH_FE15 0x80 -#define FECH_FE14 0x40 -#define FECH_FE13 0x20 -#define FECH_FE12 0x10 -#define FECH_FE11 0x08 -#define FECH_FE10 0x04 -#define FECH_FE9 0x02 -#define FECH_FE8 0x01 - - -/* CVCl (Code Violation Counter) - ----------------- E1 ------------------------- */ - -#define CVCL_CV7 0x80 -#define CVCL_CV6 0x40 -#define CVCL_CV5 0x20 -#define CVCL_CV4 0x10 -#define CVCL_CV3 0x08 -#define CVCL_CV2 0x04 -#define CVCL_CV1 0x02 -#define CVCL_CV0 0x01 - -#define CVCH_CV15 0x80 -#define CVCH_CV14 0x40 -#define CVCH_CV13 0x20 -#define CVCH_CV12 0x10 -#define CVCH_CV11 0x08 -#define CVCH_CV10 0x04 -#define CVCH_CV9 0x02 -#define CVCH_CV8 0x01 - - -/* CEC1-3L (CRC Error Counter) - ------------------ E1 ----------------------------- */ - -#define CEC1L_CR7 0x80 -#define CEC1L_CR6 0x40 -#define CEC1L_CR5 0x20 -#define CEC1L_CR4 0x10 -#define CEC1L_CR3 0x08 -#define CEC1L_CR2 0x04 -#define CEC1L_CR1 0x02 -#define CEC1L_CR0 0x01 - -#define CEC1H_CR15 0x80 -#define CEC1H_CR14 0x40 -#define CEC1H_CR13 0x20 -#define CEC1H_CR12 0x10 -#define CEC1H_CR11 0x08 -#define CEC1H_CR10 0x04 -#define CEC1H_CR9 0x02 -#define CEC1H_CR8 0x01 - -#define CEC2L_CR7 0x80 -#define CEC2L_CR6 0x40 -#define CEC2L_CR5 0x20 -#define CEC2L_CR4 0x10 -#define CEC2L_CR3 0x08 -#define CEC2L_CR2 0x04 -#define CEC2L_CR1 0x02 -#define CEC2L_CR0 0x01 - -#define CEC2H_CR15 0x80 -#define CEC2H_CR14 0x40 -#define CEC2H_CR13 0x20 -#define CEC2H_CR12 0x10 -#define CEC2H_CR11 0x08 -#define CEC2H_CR10 0x04 -#define CEC2H_CR9 0x02 -#define CEC2H_CR8 0x01 - -#define CEC3L_CR7 0x80 -#define CEC3L_CR6 0x40 -#define CEC3L_CR5 0x20 -#define CEC3L_CR4 0x10 -#define CEC3L_CR3 0x08 -#define CEC3L_CR2 0x04 -#define CEC3L_CR1 0x02 -#define CEC3L_CR0 0x01 - -#define CEC3H_CR15 0x80 -#define CEC3H_CR14 0x40 -#define CEC3H_CR13 0x20 -#define CEC3H_CR12 0x10 -#define CEC3H_CR11 0x08 -#define CEC3H_CR10 0x04 -#define CEC3H_CR9 0x02 -#define CEC3H_CR8 0x01 - - -/* CECL (CRC Error Counter) - - ------------------ T1 ----------------------------- */ - -#define CECL_CR7 0x80 -#define CECL_CR6 0x40 -#define CECL_CR5 0x20 -#define CECL_CR4 0x10 -#define CECL_CR3 0x08 -#define CECL_CR2 0x04 -#define CECL_CR1 0x02 -#define CECL_CR0 0x01 - -#define CECH_CR15 0x80 -#define CECH_CR14 0x40 -#define CECH_CR13 0x20 -#define CECH_CR12 0x10 -#define CECH_CR11 0x08 -#define CECH_CR10 0x04 -#define CECH_CR9 0x02 -#define CECH_CR8 0x01 - -/* EBCL (E Bit Error Counter) - ------------------- E1 & T1 ------------------------- */ - -#define EBCL_EB7 0x80 -#define EBCL_EB6 0x40 -#define EBCL_EB5 0x20 -#define EBCL_EB4 0x10 -#define EBCL_EB3 0x08 -#define EBCL_EB2 0x04 -#define EBCL_EB1 0x02 -#define EBCL_EB0 0x01 - -#define EBCH_EB15 0x80 -#define EBCH_EB14 0x40 -#define EBCH_EB13 0x20 -#define EBCH_EB12 0x10 -#define EBCH_EB11 0x08 -#define EBCH_EB10 0x04 -#define EBCH_EB9 0x02 -#define EBCH_EB8 0x01 - - -/* RSA4-8 (Receive Sa4-8-Bit Register) - -------------------- E1 --------------------------- */ - -#define RSA4_RS47 0x80 -#define RSA4_RS46 0x40 -#define RSA4_RS45 0x20 -#define RSA4_RS44 0x10 -#define RSA4_RS43 0x08 -#define RSA4_RS42 0x04 -#define RSA4_RS41 0x02 -#define RSA4_RS40 0x01 - -#define RSA5_RS57 0x80 -#define RSA5_RS56 0x40 -#define RSA5_RS55 0x20 -#define RSA5_RS54 0x10 -#define RSA5_RS53 0x08 -#define RSA5_RS52 0x04 -#define RSA5_RS51 0x02 -#define RSA5_RS50 0x01 - -#define RSA6_RS67 0x80 -#define RSA6_RS66 0x40 -#define RSA6_RS65 0x20 -#define RSA6_RS64 0x10 -#define RSA6_RS63 0x08 -#define RSA6_RS62 0x04 -#define RSA6_RS61 0x02 -#define RSA6_RS60 0x01 - -#define RSA7_RS77 0x80 -#define RSA7_RS76 0x40 -#define RSA7_RS75 0x20 -#define RSA7_RS74 0x10 -#define RSA7_RS73 0x08 -#define RSA7_RS72 0x04 -#define RSA7_RS71 0x02 -#define RSA7_RS70 0x01 - -#define RSA8_RS87 0x80 -#define RSA8_RS86 0x40 -#define RSA8_RS85 0x20 -#define RSA8_RS84 0x10 -#define RSA8_RS83 0x08 -#define RSA8_RS82 0x04 -#define RSA8_RS81 0x02 -#define RSA8_RS80 0x01 - -/* RSA6S (Receive Sa6 Bit Status Register) - ------------------------ T1 ------------------------- */ - -#define RSA6S_SX 0x20 -#define RSA6S_SF 0x10 -#define RSA6S_SE 0x08 -#define RSA6S_SC 0x04 -#define RSA6S_SA 0x02 -#define RSA6S_S8 0x01 - - -/* RDL1-3 Receive DL-Bit Register1-3) - ------------------------ T1 ------------------------- */ - -#define RDL1_RDL17 0x80 -#define RDL1_RDL16 0x40 -#define RDL1_RDL15 0x20 -#define RDL1_RDL14 0x10 -#define RDL1_RDL13 0x08 -#define RDL1_RDL12 0x04 -#define RDL1_RDL11 0x02 -#define RDL1_RDL10 0x01 - -#define RDL2_RDL27 0x80 -#define RDL2_RDL26 0x40 -#define RDL2_RDL25 0x20 -#define RDL2_RDL24 0x10 -#define RDL2_RDL23 0x08 -#define RDL2_RDL22 0x04 -#define RDL2_RDL21 0x02 -#define RDL2_RDL20 0x01 - -#define RDL3_RDL37 0x80 -#define RDL3_RDL36 0x40 -#define RDL3_RDL35 0x20 -#define RDL3_RDL34 0x10 -#define RDL3_RDL33 0x08 -#define RDL3_RDL32 0x04 -#define RDL3_RDL31 0x02 -#define RDL3_RDL30 0x01 - - -/* SIS (Signaling Status Register) - - -------------------- E1 & T1 -------------------------- */ - -#define SIS_XDOV 0x80 -#define SIS_XFW 0x40 -#define SIS_XREP 0x20 -#define SIS_RLI 0x08 -#define SIS_CEC 0x04 -#define SIS_BOM 0x01 - - -/* RSIS (Receive Signaling Status Register) - - -------------------- E1 & T1 --------------------------- */ - -#define RSIS_VFR 0x80 -#define RSIS_RDO 0x40 -#define RSIS_CRC16 0x20 -#define RSIS_RAB 0x10 -#define RSIS_HA1 0x08 -#define RSIS_HA0 0x04 -#define RSIS_HFR 0x02 -#define RSIS_LA 0x01 - - -/* RBCL/H (Receive Byte Count Low/High) - - ------------------- E1 & T1 ----------------------- */ - -#define RBCL_RBC7 0x80 -#define RBCL_RBC6 0x40 -#define RBCL_RBC5 0x20 -#define RBCL_RBC4 0x10 -#define RBCL_RBC3 0x08 -#define RBCL_RBC2 0x04 -#define RBCL_RBC1 0x02 -#define RBCL_RBC0 0x01 - -#define RBCH_OV 0x10 -#define RBCH_RBC11 0x08 -#define RBCH_RBC10 0x04 -#define RBCH_RBC9 0x02 -#define RBCH_RBC8 0x01 - - -/* ISR1-3 (Interrupt Status Register 1-3) - - ------------------ E1 & T1 ------------------------------ */ - -#define FISR0_RME 0x80 -#define FISR0_RFS 0x40 -#define FISR0_T8MS 0x20 -#define FISR0_ISF 0x20 -#define FISR0_RMB 0x10 -#define FISR0_CASC 0x08 -#define FISR0_RSC 0x08 -#define FISR0_CRC6 0x04 -#define FISR0_CRC4 0x04 -#define FISR0_PDEN 0x02 -#define FISR0_RPF 0x01 - -#define FISR1_CASE 0x80 -#define FISR1_LLBSC 0x80 -#define FISR1_RDO 0x40 -#define FISR1_ALLS 0x20 -#define FISR1_XDU 0x10 -#define FISR1_XMB 0x08 -#define FISR1_XLSC 0x02 -#define FISR1_XPR 0x01 - -#define FISR2_FAR 0x80 -#define FISR2_LFA 0x40 -#define FISR2_MFAR 0x20 -#define FISR2_T400MS 0x10 -#define FISR2_LMFA 0x10 -#define FISR2_AIS 0x08 -#define FISR2_LOS 0x04 -#define FISR2_RAR 0x02 -#define FISR2_RA 0x01 - -#define FISR3_ES 0x80 -#define FISR3_SEC 0x40 -#define FISR3_LMFA16 0x20 -#define FISR3_AIS16 0x10 -#define FISR3_RA16 0x08 -#define FISR3_API 0x04 -#define FISR3_XSLP 0x20 -#define FISR3_XSLN 0x10 -#define FISR3_LLBSC 0x08 -#define FISR3_XRS 0x04 -#define FISR3_SLN 0x02 -#define FISR3_SLP 0x01 - - -/* GIS (Global Interrupt Status Register) - - --------------------- E1 & T1 --------------------- */ - -#define GIS_ISR3 0x08 -#define GIS_ISR2 0x04 -#define GIS_ISR1 0x02 -#define GIS_ISR0 0x01 - - -/* VSTR (Version Status Register) - - --------------------- E1 & T1 --------------------- */ - -#define VSTR_VN3 0x08 -#define VSTR_VN2 0x04 -#define VSTR_VN1 0x02 -#define VSTR_VN0 0x01 - - -/*>>>>>>>>>>>>>>>>>>>>> Local Control Structures <<<<<<<<<<<<<<<<<<<<<<<<< */ - -/* Write-only Registers (E1/T1 control mode write registers) */ -#define XFIFOH 0x00 /* Tx FIFO High Byte */ -#define XFIFOL 0x01 /* Tx FIFO Low Byte */ -#define CMDR 0x02 /* Command Reg */ -#define DEC 0x60 /* Disable Error Counter */ -#define TEST2 0x62 /* Manuf. Test Reg 2 */ -#define XS(nbr) (0x70 + (nbr)) /* Tx CAS Reg (0 to 15) */ - -/* Read-write Registers (E1/T1 status mode read registers) */ -#define MODE 0x03 /* Mode Reg */ -#define RAH1 0x04 /* Receive Address High 1 */ -#define RAH2 0x05 /* Receive Address High 2 */ -#define RAL1 0x06 /* Receive Address Low 1 */ -#define RAL2 0x07 /* Receive Address Low 2 */ -#define IPC 0x08 /* Interrupt Port Configuration */ -#define CCR1 0x09 /* Common Configuration Reg 1 */ -#define CCR3 0x0A /* Common Configuration Reg 3 */ -#define PRE 0x0B /* Preamble Reg */ -#define RTR1 0x0C /* Receive Timeslot Reg 1 */ -#define RTR2 0x0D /* Receive Timeslot Reg 2 */ -#define RTR3 0x0E /* Receive Timeslot Reg 3 */ -#define RTR4 0x0F /* Receive Timeslot Reg 4 */ -#define TTR1 0x10 /* Transmit Timeslot Reg 1 */ -#define TTR2 0x11 /* Transmit Timeslot Reg 2 */ -#define TTR3 0x12 /* Transmit Timeslot Reg 3 */ -#define TTR4 0x13 /* Transmit Timeslot Reg 4 */ -#define IMR0 0x14 /* Interrupt Mask Reg 0 */ -#define IMR1 0x15 /* Interrupt Mask Reg 1 */ -#define IMR2 0x16 /* Interrupt Mask Reg 2 */ -#define IMR3 0x17 /* Interrupt Mask Reg 3 */ -#define IMR4 0x18 /* Interrupt Mask Reg 4 */ -#define IMR5 0x19 /* Interrupt Mask Reg 5 */ -#define FMR0 0x1A /* Framer Mode Reigster 0 */ -#define FMR1 0x1B /* Framer Mode Reigster 1 */ -#define FMR2 0x1C /* Framer Mode Reigster 2 */ -#define LOOP 0x1D /* Channel Loop Back */ -#define XSW 0x1E /* Transmit Service Word */ -#define FMR4 0x1E /* Framer Mode Reg 4 */ -#define XSP 0x1F /* Transmit Spare Bits */ -#define FMR5 0x1F /* Framer Mode Reg 5 */ -#define XC0 0x20 /* Transmit Control 0 */ -#define XC1 0x21 /* Transmit Control 1 */ -#define RC0 0x22 /* Receive Control 0 */ -#define RC1 0x23 /* Receive Control 1 */ -#define XPM0 0x24 /* Transmit Pulse Mask 0 */ -#define XPM1 0x25 /* Transmit Pulse Mask 1 */ -#define XPM2 0x26 /* Transmit Pulse Mask 2 */ -#define TSWM 0x27 /* Transparent Service Word Mask */ -#define TEST1 0x28 /* Manuf. Test Reg 1 */ -#define IDLE 0x29 /* Idle Channel Code */ -#define XSA4 0x2A /* Transmit SA4 Bit Reg */ -#define XDL1 0x2A /* Transmit DL-Bit Reg 2 */ -#define XSA5 0x2B /* Transmit SA4 Bit Reg */ -#define XDL2 0x2B /* Transmit DL-Bit Reg 2 */ -#define XSA6 0x2C /* Transmit SA4 Bit Reg */ -#define XDL3 0x2C /* Transmit DL-Bit Reg 2 */ -#define XSA7 0x2D /* Transmit SA4 Bit Reg */ -#define CCB1 0x2D /* Clear Channel Reg 1 */ -#define XSA8 0x2E /* Transmit SA4 Bit Reg */ -#define CCB2 0x2E /* Clear Channel Reg 2 */ -#define FMR3 0x2F /* Framer Mode Reg. 3 */ -#define CCB3 0x2F /* Clear Channel Reg 3 */ -#define ICB1 0x30 /* Idle Channel Reg 1 */ -#define ICB2 0x31 /* Idle Channel Reg 2 */ -#define ICB3 0x32 /* Idle Channel Reg 3 */ -#define ICB4 0x33 /* Idle Channel Reg 4 */ -#define LIM0 0x34 /* Line Interface Mode 0 */ -#define LIM1 0x35 /* Line Interface Mode 1 */ -#define PCDR 0x36 /* Pulse Count Detection */ -#define PCRR 0x37 /* Pulse Count Recovery */ -#define LIM2 0x38 /* Line Interface Mode Reg 2 */ -#define LCR1 0x39 /* Loop Code Reg 1 */ -#define LCR2 0x3A /* Loop Code Reg 2 */ -#define LCR3 0x3B /* Loop Code Reg 3 */ -#define SIC1 0x3C /* System Interface Control 1 */ - -/* Read-only Registers (E1/T1 control mode read registers) */ -#define RFIFOH 0x00 /* Receive FIFO */ -#define RFIFOL 0x01 /* Receive FIFO */ -#define FRS0 0x4C /* Framer Receive Status 0 */ -#define FRS1 0x4D /* Framer Receive Status 1 */ -#define RSW 0x4E /* Receive Service Word */ -#define FRS2 0x4E /* Framer Receive Status 2 */ -#define RSP 0x4F /* Receive Spare Bits */ -#define FRS3 0x4F /* Framer Receive Status 3 */ -#define FECL 0x50 /* Framing Error Counter */ -#define FECH 0x51 /* Framing Error Counter */ -#define CVCL 0x52 /* Code Violation Counter */ -#define CVCH 0x53 /* Code Violation Counter */ -#define CECL 0x54 /* CRC Error Counter 1 */ -#define CECH 0x55 /* CRC Error Counter 1 */ -#define EBCL 0x56 /* E-Bit Error Counter */ -#define EBCH 0x57 /* E-Bit Error Counter */ -#define BECL 0x58 /* Bit Error Counter Low */ -#define BECH 0x59 /* Bit Error Counter Low */ -#define CEC3 0x5A /* CRC Error Counter 3 (16-bit) */ -#define RSA4 0x5C /* Receive SA4 Bit Reg */ -#define RDL1 0x5C /* Receive DL-Bit Reg 1 */ -#define RSA5 0x5D /* Receive SA5 Bit Reg */ -#define RDL2 0x5D /* Receive DL-Bit Reg 2 */ -#define RSA6 0x5E /* Receive SA6 Bit Reg */ -#define RDL3 0x5E /* Receive DL-Bit Reg 3 */ -#define RSA7 0x5F /* Receive SA7 Bit Reg */ -#define RSA8 0x60 /* Receive SA8 Bit Reg */ -#define RSA6S 0x61 /* Receive SA6 Bit Status Reg */ -#define TSR0 0x62 /* Manuf. Test Reg 0 */ -#define TSR1 0x63 /* Manuf. Test Reg 1 */ -#define SIS 0x64 /* Signaling Status Reg */ -#define RSIS 0x65 /* Receive Signaling Status Reg */ -#define RBCL 0x66 /* Receive Byte Control */ -#define RBCH 0x67 /* Receive Byte Control */ -#define FISR0 0x68 /* Interrupt Status Reg 0 */ -#define FISR1 0x69 /* Interrupt Status Reg 1 */ -#define FISR2 0x6A /* Interrupt Status Reg 2 */ -#define FISR3 0x6B /* Interrupt Status Reg 3 */ -#define GIS 0x6E /* Global Interrupt Status */ -#define VSTR 0x6F /* Version Status */ -#define RS(nbr) (0x70 + (nbr)) /* Rx CAS Reg (0 to 15) */ - -#endif /* _FALC_LH_H */ - diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/fd.h linux.20p6/include/linux/fd.h --- linux.vanilla/include/linux/fd.h Sun Mar 25 17:31:03 2001 +++ linux.20p6/include/linux/fd.h Tue Jun 19 09:59:54 2001 @@ -216,8 +216,8 @@ /* Prevent "aliased" accesses. */ int fd_ref; int fd_device; - unsigned long last_checked; /* when was the drive last checked for a disk - * change? */ + unsigned long last_checked; /* when was the drive last checked + * for a disk change? */ char *dmabuf; int bufblocks; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/hd64572.h linux.20p6/include/linux/hd64572.h --- linux.vanilla/include/linux/hd64572.h Sun Mar 25 17:31:05 2001 +++ linux.20p6/include/linux/hd64572.h Thu Jan 1 01:00:00 1970 @@ -1,437 +0,0 @@ -/* - * hd64572.h Description of the Hitachi HD64572 (SCA-II), valid for - * CPU modes 0 & 2. - * - * Author: Ivan Passos - * - * Copyright: (c) 2000 Cyclades Corp. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - * $Log: hd64572.h,v $ - * Revision 1.0 2000/01/25 ivan - * Initial version. - * - */ - -#ifndef _HD64572_H -#define _HD64572_H - -/* Illegal Access Register */ -#define ILAR 0x00 - -/* Wait Controller Registers */ -#define PABR0L 0x20 /* Physical Addr Boundary Register 0 L */ -#define PABR0H 0x21 /* Physical Addr Boundary Register 0 H */ -#define PABR1L 0x22 /* Physical Addr Boundary Register 1 L */ -#define PABR1H 0x23 /* Physical Addr Boundary Register 1 H */ -#define WCRL 0x24 /* Wait Control Register L */ -#define WCRM 0x25 /* Wait Control Register M */ -#define WCRH 0x26 /* Wait Control Register H */ - -/* Interrupt Registers */ -#define IVR 0x60 /* Interrupt Vector Register */ -#define IMVR 0x64 /* Interrupt Modified Vector Register */ -#define ITCR 0x68 /* Interrupt Control Register */ -#define ISR0 0x6c /* Interrupt Status Register 0 */ -#define ISR1 0x70 /* Interrupt Status Register 1 */ -#define IER0 0x74 /* Interrupt Enable Register 0 */ -#define IER1 0x78 /* Interrupt Enable Register 1 */ - -/* Register Access Macros (chan is 0 or 1 in _any_ case) */ -#define M_REG(reg, chan) (reg + 0x80*chan) /* MSCI */ -#define DRX_REG(reg, chan) (reg + 0x40*chan) /* DMA Rx */ -#define DTX_REG(reg, chan) (reg + 0x20*(2*chan + 1)) /* DMA Tx */ -#define TRX_REG(reg, chan) (reg + 0x20*chan) /* Timer Rx */ -#define TTX_REG(reg, chan) (reg + 0x10*(2*chan + 1)) /* Timer Tx */ -#define ST_REG(reg, chan) (reg + 0x80*chan) /* Status Cnt */ -#define IR0_DRX(val, chan) ((val)<<(8*(chan))) /* Int DMA Rx */ -#define IR0_DTX(val, chan) ((val)<<(4*(2*chan + 1))) /* Int DMA Tx */ -#define IR0_M(val, chan) ((val)<<(8*(chan))) /* Int MSCI */ - -/* MSCI Channel Registers */ -#define MD0 0x138 /* Mode reg 0 */ -#define MD1 0x139 /* Mode reg 1 */ -#define MD2 0x13a /* Mode reg 2 */ -#define MD3 0x13b /* Mode reg 3 */ -#define CTL 0x130 /* Control reg */ -#define RXS 0x13c /* RX clock source */ -#define TXS 0x13d /* TX clock source */ -#define EXS 0x13e /* External clock input selection */ -#define TMCT 0x144 /* Time constant (Tx) */ -#define TMCR 0x145 /* Time constant (Rx) */ -#define CMD 0x128 /* Command reg */ -#define ST0 0x118 /* Status reg 0 */ -#define ST1 0x119 /* Status reg 1 */ -#define ST2 0x11a /* Status reg 2 */ -#define ST3 0x11b /* Status reg 3 */ -#define ST4 0x11c /* Status reg 4 */ -#define FST 0x11d /* frame Status reg */ -#define IE0 0x120 /* Interrupt enable reg 0 */ -#define IE1 0x121 /* Interrupt enable reg 1 */ -#define IE2 0x122 /* Interrupt enable reg 2 */ -#define IE4 0x124 /* Interrupt enable reg 4 */ -#define FIE 0x125 /* Frame Interrupt enable reg */ -#define SA0 0x140 /* Syn Address reg 0 */ -#define SA1 0x141 /* Syn Address reg 1 */ -#define IDL 0x142 /* Idle register */ -#define TRBL 0x100 /* TX/RX buffer reg L */ -#define TRBK 0x101 /* TX/RX buffer reg K */ -#define TRBJ 0x102 /* TX/RX buffer reg J */ -#define TRBH 0x103 /* TX/RX buffer reg H */ -#define TRC0 0x148 /* TX Ready control reg 0 */ -#define TRC1 0x149 /* TX Ready control reg 1 */ -#define RRC 0x14a /* RX Ready control reg */ -#define CST0 0x108 /* Current Status Register 0 */ -#define CST1 0x109 /* Current Status Register 1 */ -#define CST2 0x10a /* Current Status Register 2 */ -#define CST3 0x10b /* Current Status Register 3 */ -#define GPO 0x131 /* General Purpose Output Pin Ctl Reg */ -#define TFS 0x14b /* Tx Start Threshold Ctl Reg */ -#define TFN 0x143 /* Inter-transmit-frame Time Fill Ctl Reg */ -#define TBN 0x110 /* Tx Buffer Number Reg */ -#define RBN 0x111 /* Rx Buffer Number Reg */ -#define TNR0 0x150 /* Tx DMA Request Ctl Reg 0 */ -#define TNR1 0x151 /* Tx DMA Request Ctl Reg 1 */ -#define TCR 0x152 /* Tx DMA Critical Request Reg */ -#define RNR 0x154 /* Rx DMA Request Ctl Reg */ -#define RCR 0x156 /* Rx DMA Critical Request Reg */ - -/* Timer Registers */ -#define TCNTL 0x200 /* Timer Upcounter L */ -#define TCNTH 0x201 /* Timer Upcounter H */ -#define TCONRL 0x204 /* Timer Constant Register L */ -#define TCONRH 0x205 /* Timer Constant Register H */ -#define TCSR 0x206 /* Timer Control/Status Register */ -#define TEPR 0x207 /* Timer Expand Prescale Register */ - -/* DMA registers */ -#define PCR 0x40 /* DMA priority control reg */ -#define DRR 0x44 /* DMA reset reg */ -#define DMER 0x07 /* DMA Master Enable reg */ -#define BTCR 0x08 /* Burst Tx Ctl Reg */ -#define BOLR 0x0c /* Back-off Length Reg */ -#define DSR_RX(chan) (0x48 + 2*chan) /* DMA Status Reg (Rx) */ -#define DSR_TX(chan) (0x49 + 2*chan) /* DMA Status Reg (Tx) */ -#define DIR_RX(chan) (0x4c + 2*chan) /* DMA Interrupt Enable Reg (Rx) */ -#define DIR_TX(chan) (0x4d + 2*chan) /* DMA Interrupt Enable Reg (Tx) */ -#define FCT_RX(chan) (0x50 + 2*chan) /* Frame End Interrupt Counter (Rx) */ -#define FCT_TX(chan) (0x51 + 2*chan) /* Frame End Interrupt Counter (Tx) */ -#define DMR_RX(chan) (0x54 + 2*chan) /* DMA Mode Reg (Rx) */ -#define DMR_TX(chan) (0x55 + 2*chan) /* DMA Mode Reg (Tx) */ -#define DCR_RX(chan) (0x58 + 2*chan) /* DMA Command Reg (Rx) */ -#define DCR_TX(chan) (0x59 + 2*chan) /* DMA Command Reg (Tx) */ - -/* DMA Channel Registers */ -#define DARL 0x80 /* Dest Addr Register L (single-block, RX only) */ -#define DARH 0x81 /* Dest Addr Register H (single-block, RX only) */ -#define DARB 0x82 /* Dest Addr Register B (single-block, RX only) */ -#define DARBH 0x83 /* Dest Addr Register BH (single-block, RX only) */ -#define SARL 0x80 /* Source Addr Register L (single-block, TX only) */ -#define SARH 0x81 /* Source Addr Register H (single-block, TX only) */ -#define SARB 0x82 /* Source Addr Register B (single-block, TX only) */ -#define DARBH 0x83 /* Source Addr Register BH (single-block, TX only) */ -#define BARL 0x80 /* Buffer Addr Register L (chained-block) */ -#define BARH 0x81 /* Buffer Addr Register H (chained-block) */ -#define BARB 0x82 /* Buffer Addr Register B (chained-block) */ -#define BARBH 0x83 /* Buffer Addr Register BH (chained-block) */ -#define CDAL 0x84 /* Current Descriptor Addr Register L */ -#define CDAH 0x85 /* Current Descriptor Addr Register H */ -#define CDAB 0x86 /* Current Descriptor Addr Register B */ -#define CDABH 0x87 /* Current Descriptor Addr Register BH */ -#define EDAL 0x88 /* Error Descriptor Addr Register L */ -#define EDAH 0x89 /* Error Descriptor Addr Register H */ -#define EDAB 0x8a /* Error Descriptor Addr Register B */ -#define EDABH 0x8b /* Error Descriptor Addr Register BH */ -#define BFLL 0x90 /* RX Buffer Length L (only RX) */ -#define BFLH 0x91 /* RX Buffer Length H (only RX) */ -#define BCRL 0x8c /* Byte Count Register L */ -#define BCRH 0x8d /* Byte Count Register H */ - -/* Block Descriptor Structure */ -typedef struct { - unsigned long next; /* pointer to next block descriptor */ - unsigned long ptbuf; /* buffer pointer */ - unsigned short len; /* data length */ - unsigned char status; /* status */ - unsigned char filler[5]; /* alignment filler (16 bytes) */ -} pcsca_bd_t; - -/* - Descriptor Status definitions: - - Bit Transmission Reception - - 7 EOM EOM - 6 - Short Frame - 5 - Abort - 4 - Residual bit - 3 Underrun Overrun - 2 - CRC - 1 Ownership Ownership - 0 EOT - -*/ -#define DST_EOT 0x01 /* End of transmit command */ -#define DST_OSB 0x02 /* Ownership bit */ -#define DST_CRC 0x04 /* CRC Error */ -#define DST_OVR 0x08 /* Overrun */ -#define DST_UDR 0x08 /* Underrun */ -#define DST_RBIT 0x10 /* Residual bit */ -#define DST_ABT 0x20 /* Abort */ -#define DST_SHRT 0x40 /* Short Frame */ -#define DST_EOM 0x80 /* End of Message */ - -/* Status Counter Registers */ -#define CMCR 0x158 /* Counter Master Ctl Reg */ -#define TECNTL 0x160 /* Tx EOM Counter L */ -#define TECNTM 0x161 /* Tx EOM Counter M */ -#define TECNTH 0x162 /* Tx EOM Counter H */ -#define TECCR 0x163 /* Tx EOM Counter Ctl Reg */ -#define URCNTL 0x164 /* Underrun Counter L */ -#define URCNTH 0x165 /* Underrun Counter H */ -#define URCCR 0x167 /* Underrun Counter Ctl Reg */ -#define RECNTL 0x168 /* Rx EOM Counter L */ -#define RECNTM 0x169 /* Rx EOM Counter M */ -#define RECNTH 0x16a /* Rx EOM Counter H */ -#define RECCR 0x16b /* Rx EOM Counter Ctl Reg */ -#define ORCNTL 0x16c /* Overrun Counter L */ -#define ORCNTH 0x16d /* Overrun Counter H */ -#define ORCCR 0x16f /* Overrun Counter Ctl Reg */ -#define CECNTL 0x170 /* CRC Counter L */ -#define CECNTH 0x171 /* CRC Counter H */ -#define CECCR 0x173 /* CRC Counter Ctl Reg */ -#define ABCNTL 0x174 /* Abort frame Counter L */ -#define ABCNTH 0x175 /* Abort frame Counter H */ -#define ABCCR 0x177 /* Abort frame Counter Ctl Reg */ -#define SHCNTL 0x178 /* Short frame Counter L */ -#define SHCNTH 0x179 /* Short frame Counter H */ -#define SHCCR 0x17b /* Short frame Counter Ctl Reg */ -#define RSCNTL 0x17c /* Residual bit Counter L */ -#define RSCNTH 0x17d /* Residual bit Counter H */ -#define RSCCR 0x17f /* Residual bit Counter Ctl Reg */ - -/* Register Programming Constants */ - -#define IR0_DMIC 0x00000001 -#define IR0_DMIB 0x00000002 -#define IR0_DMIA 0x00000004 -#define IR0_EFT 0x00000008 -#define IR0_DMAREQ 0x00010000 -#define IR0_TXINT 0x00020000 -#define IR0_RXINTB 0x00040000 -#define IR0_RXINTA 0x00080000 -#define IR0_TXRDY 0x00100000 -#define IR0_RXRDY 0x00200000 - -#define MD0_CRC16_0 0x00 -#define MD0_CRC16_1 0x01 -#define MD0_CRC32 0x02 -#define MD0_CRC_CCITT 0x03 -#define MD0_CRCC0 0x04 -#define MD0_CRCC1 0x08 -#define MD0_AUTO_ENA 0x10 -#define MD0_ASYNC 0x00 -#define MD0_BY_MSYNC 0x20 -#define MD0_BY_BISYNC 0x40 -#define MD0_BY_EXT 0x60 -#define MD0_BIT_SYNC 0x80 -#define MD0_TRANSP 0xc0 - -#define MD1_NOADDR 0x00 -#define MD1_SADDR1 0x40 -#define MD1_SADDR2 0x80 -#define MD1_DADDR 0xc0 - -#define MD2_F_DUPLEX 0x00 -#define MD2_AUTO_ECHO 0x01 -#define MD2_LOOP_HI_Z 0x02 -#define MD2_LOOP_MIR 0x03 -#define MD2_ADPLL_X8 0x00 -#define MD2_ADPLL_X16 0x08 -#define MD2_ADPLL_X32 0x10 -#define MD2_NRZ 0x00 -#define MD2_NRZI 0x20 -#define MD2_NRZ_IEEE 0x40 -#define MD2_MANCH 0x00 -#define MD2_FM1 0x20 -#define MD2_FM0 0x40 -#define MD2_FM 0x80 - -#define CTL_RTS 0x01 -#define CTL_DTR 0x02 -#define CTL_SYN 0x04 -#define CTL_IDLC 0x10 -#define CTL_UDRNC 0x20 -#define CTL_URSKP 0x40 -#define CTL_URCT 0x80 - -#define RXS_BR0 0x01 -#define RXS_BR1 0x02 -#define RXS_BR2 0x04 -#define RXS_BR3 0x08 -#define RXS_ECLK 0x00 -#define RXS_ECLK_NS 0x20 -#define RXS_IBRG 0x40 -#define RXS_PLL1 0x50 -#define RXS_PLL2 0x60 -#define RXS_PLL3 0x70 -#define RXS_DRTXC 0x80 - -#define TXS_BR0 0x01 -#define TXS_BR1 0x02 -#define TXS_BR2 0x04 -#define TXS_BR3 0x08 -#define TXS_ECLK 0x00 -#define TXS_IBRG 0x40 -#define TXS_RCLK 0x60 -#define TXS_DTRXC 0x80 - -#define EXS_RES0 0x01 -#define EXS_RES1 0x02 -#define EXS_RES2 0x04 -#define EXS_TES0 0x10 -#define EXS_TES1 0x20 -#define EXS_TES2 0x40 - -#define CMD_RX_RST 0x11 -#define CMD_RX_ENA 0x12 -#define CMD_RX_DIS 0x13 -#define CMD_RX_CRC_INIT 0x14 -#define CMD_RX_MSG_REJ 0x15 -#define CMD_RX_MP_SRCH 0x16 -#define CMD_RX_CRC_EXC 0x17 -#define CMD_RX_CRC_FRC 0x18 -#define CMD_TX_RST 0x01 -#define CMD_TX_ENA 0x02 -#define CMD_TX_DISA 0x03 -#define CMD_TX_CRC_INIT 0x04 -#define CMD_TX_CRC_EXC 0x05 -#define CMD_TX_EOM 0x06 -#define CMD_TX_ABORT 0x07 -#define CMD_TX_MP_ON 0x08 -#define CMD_TX_BUF_CLR 0x09 -#define CMD_TX_DISB 0x0b -#define CMD_CH_RST 0x21 -#define CMD_SRCH_MODE 0x31 -#define CMD_NOP 0x00 - -#define ST0_RXRDY 0x01 -#define ST0_TXRDY 0x02 -#define ST0_RXINTB 0x20 -#define ST0_RXINTA 0x40 -#define ST0_TXINT 0x80 - -#define ST1_IDLE 0x01 -#define ST1_ABORT 0x02 -#define ST1_CDCD 0x04 -#define ST1_CCTS 0x08 -#define ST1_SYN_FLAG 0x10 -#define ST1_CLMD 0x20 -#define ST1_TXIDLE 0x40 -#define ST1_UDRN 0x80 - -#define ST2_CRCE 0x04 -#define ST2_ONRN 0x08 -#define ST2_RBIT 0x10 -#define ST2_ABORT 0x20 -#define ST2_SHORT 0x40 -#define ST2_EOM 0x80 - -#define ST3_RX_ENA 0x01 -#define ST3_TX_ENA 0x02 -#define ST3_DCD 0x04 -#define ST3_CTS 0x08 -#define ST3_SRCH_MODE 0x10 -#define ST3_SLOOP 0x20 -#define ST3_GPI 0x80 - -#define ST4_RDNR 0x01 -#define ST4_RDCR 0x02 -#define ST4_TDNR 0x04 -#define ST4_TDCR 0x08 -#define ST4_OCLM 0x20 -#define ST4_CFT 0x40 -#define ST4_CGPI 0x80 - -#define FST_CRCEF 0x04 -#define FST_OVRNF 0x08 -#define FST_RBIF 0x10 -#define FST_ABTF 0x20 -#define FST_SHRTF 0x40 -#define FST_EOMF 0x80 - -#define IE0_RXRDY 0x01 -#define IE0_TXRDY 0x02 -#define IE0_RXINTB 0x20 -#define IE0_RXINTA 0x40 -#define IE0_TXINT 0x80 - -#define IE1_IDLD 0x01 -#define IE1_ABTD 0x02 -#define IE1_CDCD 0x04 -#define IE1_CCTS 0x08 -#define IE1_SYNCD 0x10 -#define IE1_CLMD 0x20 -#define IE1_IDL 0x40 -#define IE1_UDRN 0x80 - -#define IE2_CRCE 0x04 -#define IE2_OVRN 0x08 -#define IE2_RBIT 0x10 -#define IE2_ABT 0x20 -#define IE2_SHRT 0x40 -#define IE2_EOM 0x80 - -#define IE4_RDNR 0x01 -#define IE4_RDCR 0x02 -#define IE4_TDNR 0x04 -#define IE4_TDCR 0x08 -#define IE4_OCLM 0x20 -#define IE4_CFT 0x40 -#define IE4_CGPI 0x80 - -#define FIE_CRCEF 0x04 -#define FIE_OVRNF 0x08 -#define FIE_RBIF 0x10 -#define FIE_ABTF 0x20 -#define FIE_SHRTF 0x40 -#define FIE_EOMF 0x80 - -#define DSR_DWE 0x01 -#define DSR_DE 0x02 -#define DSR_REF 0x04 -#define DSR_UDRF 0x04 -#define DSR_COA 0x08 -#define DSR_COF 0x10 -#define DSR_BOF 0x20 -#define DSR_EOM 0x40 -#define DSR_EOT 0x80 - -#define DIR_REF 0x04 -#define DIR_UDRF 0x04 -#define DIR_COA 0x08 -#define DIR_COF 0x10 -#define DIR_BOF 0x20 -#define DIR_EOM 0x40 -#define DIR_EOT 0x80 - -#define DMR_CNTE 0x02 -#define DMR_NF 0x04 -#define DMR_SEOME 0x08 -#define DMR_TMOD 0x10 - -#define DCR_SW_ABT 0x01 -#define DCR_FCT_CLR 0x02 - -#define PCR_PR0 0x01 -#define PCR_PR1 0x02 -#define PCR_PR2 0x04 -#define PCR_CCC 0x08 -#define PCR_BRC 0x10 -#define PCR_OSB 0x40 -#define PCR_BURST 0x80 - -#endif /* (_HD64572_H) */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/hysdn_if.h linux.20p6/include/linux/hysdn_if.h --- linux.vanilla/include/linux/hysdn_if.h Sun Mar 25 17:37:40 2001 +++ linux.20p6/include/linux/hysdn_if.h Mon Jun 25 14:24:29 2001 @@ -1,4 +1,4 @@ -/* $Id: hysdn_if.h,v 1.1 2000/02/10 19:47:50 werner Exp $ +/* $Id: hysdn_if.h,v 1.1.8.2 2001/05/17 20:41:52 kai Exp $ * Linux driver for HYSDN cards, ioctl definitions shared by hynetmgr and driver. * written by Werner Cornelius (werner@titro.de) for Hypercope GmbH @@ -19,18 +19,12 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * $Log: hysdn_if.h,v $ - * Revision 1.1 2000/02/10 19:47:50 werner - * - * Initial release - * - * */ /****************/ /* error values */ /****************/ -#define ERR_NONE 0 /* no error occured */ +#define ERR_NONE 0 /* no error occurred */ #define ERR_ALREADY_BOOT 1000 /* we are already booting */ #define EPOF_BAD_MAGIC 1001 /* bad magic in POF header */ #define ERR_BOARD_DPRAM 1002 /* board DPRAM failed */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/ioport.h linux.20p6/include/linux/ioport.h --- linux.vanilla/include/linux/ioport.h Sun Mar 25 17:31:03 2001 +++ linux.20p6/include/linux/ioport.h Mon Jun 25 14:24:41 2001 @@ -32,4 +32,21 @@ extern void autoirq_setup(int waittime); extern int autoirq_report(int waittime); +/* + * for compatibility with 2.4 + */ + +extern inline int check_mem_region(unsigned long from, unsigned long extent) +{ + return 0; +} + +extern inline void request_mem_region(unsigned long from, unsigned long extent,const char *name) +{ +} + +extern inline void release_mem_region(unsigned long from, unsigned long extent) +{ +} + #endif /* _LINUX_PORTIO_H */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/isdn_ppp.h linux.20p6/include/linux/isdn_ppp.h --- linux.vanilla/include/linux/isdn_ppp.h Sun Mar 25 17:37:40 2001 +++ linux.20p6/include/linux/isdn_ppp.h Fri May 4 23:24:35 2001 @@ -79,7 +79,7 @@ * * We use this same struct for the reset entry of the compressor to commu- * nicate to its caller how to deal with sending of a Reset Ack. In this - * case, expra is not used, but other options still apply (supressing + * case, expra is not used, but other options still apply (suppressing * sending with rsend, appending arbitrary data, etc). */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/kcomp.h linux.20p6/include/linux/kcomp.h --- linux.vanilla/include/linux/kcomp.h Sun Mar 25 17:31:05 2001 +++ linux.20p6/include/linux/kcomp.h Mon Jun 25 14:45:08 2001 @@ -17,7 +17,7 @@ #define net_device device #define dev_kfree_skb_irq(a) dev_kfree_skb(a) -#define netif_wake_queue(dev) clear_bit(0, &dev->tbusy) +#define netif_wake_queue(dev) do { clear_bit(0, &dev->tbusy); mark_bh(NET_BH); } while(0) #define netif_stop_queue(dev) set_bit(0, &dev->tbusy) #define netif_start_queue(dev) do { dev->tbusy = 0; dev->interrupt = 0; dev->start = 1; } while (0) #define netif_queue_stopped(dev) dev->tbusy diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/parport.h linux.20p6/include/linux/parport.h --- linux.vanilla/include/linux/parport.h Sun Mar 25 17:31:04 2001 +++ linux.20p6/include/linux/parport.h Mon Jun 25 14:41:09 2001 @@ -166,7 +166,7 @@ struct wait_queue *wait_q; unsigned long int time; unsigned long int timeslice; - unsigned int waiting; + unsigned long waiting; struct pardevice *waitprev; struct pardevice *waitnext; }; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/pc300.h linux.20p6/include/linux/pc300.h --- linux.vanilla/include/linux/pc300.h Sun Mar 25 17:31:05 2001 +++ linux.20p6/include/linux/pc300.h Thu Jan 1 01:00:00 1970 @@ -1,382 +0,0 @@ -/* - * pc300.h Cyclades-PC300(tm) Kernel API Definitions. - * - * Author: Ivan Passos - * - * Copyright: (c) 1999-2000 Cyclades Corp. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version - * 2 of the License, or (at your option) any later version. - * - * $Log: pc300.h,v $ - * Revision 2.2 2000/06/23 ivan - * Inclusion of 'loopback' field on structure 'pc300chconf', to allow - * loopback mode operation. - * - * Revision 2.1 2000/06/09 ivan - * Changes to use the new generic HDLC layer in the driver. - * - * Revision 2.0 2000/03/27 ivan - * Added support for the PC300/TE cards. - * - * Revision 1.1 2000/01/31 ivan - * Replaced 'pc300[drv|sca].h' former PC300 driver include files. - * - * Revision 1.0 1999/12/16 ivan - * First official release. - * Inclusion of 'nchan' field on structure 'pc300hw', to allow variable - * number of ports per card. - * Inclusion of 'if_ptr' field on structure 'pc300dev'. - * - * Revision 0.6 1999/11/17 ivan - * Changed X.25-specific function names to comply with adopted convention. - * - * Revision 0.5 1999/11/16 Daniela Squassoni - * X.25 support. - * - * Revision 0.4 1999/11/15 ivan - * Inclusion of 'clock' field on structure 'pc300hw'. - * - * Revision 0.3 1999/11/10 ivan - * IOCTL name changing. - * Inclusion of driver function prototypes. - * - * Revision 0.2 1999/11/03 ivan - * Inclusion of 'tx_skb' and union 'ifu' on structure 'pc300dev'. - * - * Revision 0.1 1999/01/15 ivan - * Initial version. - * - */ - -#ifndef _PC300_H -#define _PC300_H - -#ifndef __HDLC_H -#include -#endif -#ifndef _HD64572_H -#include -#endif -#ifndef _FALC_LH_H -#include -#endif - -#ifndef CY_TYPES -#define CY_TYPES -#if defined(__alpha__) -typedef unsigned long ucdouble; /* 64 bits, unsigned */ -typedef unsigned int uclong; /* 32 bits, unsigned */ -#else -typedef unsigned long uclong; /* 32 bits, unsigned */ -#endif -typedef unsigned short ucshort; /* 16 bits, unsigned */ -typedef unsigned char ucchar; /* 8 bits, unsigned */ -#endif /* CY_TYPES */ - -#define PC300_DEVNAME "hdlc" /* Dev. name base (for hdlc0, hdlc1, etc.) */ -#define PC300_MAXINDEX 100 /* Max dev. name index (the '0' in hdlc0) */ - -#define PC300_MAXCARDS 4 /* Max number of cards per system */ -#define PC300_MAXCHAN 2 /* Number of channels per card */ - -#define PC300_PLX_WIN 0x80 /* PLX control window size (128b) */ -#define PC300_RAMSIZE 0x80000 /* RAM window size (512Kb) */ -#define PC300_SCASIZE 0x400 /* SCA window size (1Kb) */ -#define PC300_FALCSIZE 0x400 /* FALC window size (1Kb) */ - -#define PC300_OSC_CLOCK 24576000 -#define PC300_PCI_CLOCK 33000000 - -#define BD_DEF_LEN 0x0800 /* DMA buffer length (2KB) */ -#define DMA_TX_MEMSZ 0x8000 /* Total DMA Tx memory size (32KB/ch) */ -#define DMA_RX_MEMSZ 0x10000 /* Total DMA Rx memory size (64KB/ch) */ - -#define N_DMA_TX_BUF (DMA_TX_MEMSZ / BD_DEF_LEN) /* DMA Tx buffers */ -#define N_DMA_RX_BUF (DMA_RX_MEMSZ / BD_DEF_LEN) /* DMA Rx buffers */ - -/* DMA Buffer Offsets */ -#define DMA_TX_BASE ((N_DMA_TX_BUF + N_DMA_RX_BUF) * \ - PC300_MAXCHAN * sizeof(pcsca_bd_t)) -#define DMA_RX_BASE (DMA_TX_BASE + PC300_MAXCHAN*DMA_TX_MEMSZ) - -/* DMA Descriptor Offsets */ -#define DMA_TX_BD_BASE 0x0000 -#define DMA_RX_BD_BASE (DMA_TX_BD_BASE + ((PC300_MAXCHAN*DMA_TX_MEMSZ / \ - BD_DEF_LEN) * sizeof(pcsca_bd_t))) - -/* DMA Descriptor Macros */ -#define TX_BD_ADDR(chan, n) (DMA_TX_BD_BASE + \ - ((N_DMA_TX_BUF*chan) + n) * sizeof(pcsca_bd_t)) -#define RX_BD_ADDR(chan, n) (DMA_RX_BD_BASE + \ - ((N_DMA_RX_BUF*chan) + n) * sizeof(pcsca_bd_t)) - -/* Macro to access the FALC registers (TE only) */ -#define F_REG(reg, chan) (0x200*(chan) + ((reg)<<2)) - -/*************************************** - * Memory access functions/macros * - * (required to support Alpha systems) * - ***************************************/ -#ifdef __KERNEL__ -#define cpc_writeb(port,val) {writeb((ucchar)(val),(ulong)(port)); mb();} -#define cpc_writew(port,val) {writew((ushort)(val),(ulong)(port)); mb();} -#define cpc_writel(port,val) {writel((uclong)(val),(ulong)(port)); mb();} - -#define cpc_readb(port) readb(port) -#define cpc_readw(port) readw(port) -#define cpc_readl(port) readl(port) - -#else /* __KERNEL__ */ -#define cpc_writeb(port,val) (*(volatile ucchar *)(port) = (ucchar)(val)) -#define cpc_writew(port,val) (*(volatile ucshort *)(port) = (ucshort)(val)) -#define cpc_writel(port,val) (*(volatile uclong *)(port) = (uclong)(val)) - -#define cpc_readb(port) (*(volatile ucchar *)(port)) -#define cpc_readw(port) (*(volatile ucshort *)(port)) -#define cpc_readl(port) (*(volatile uclong *)(port)) - -#endif /* __KERNEL__ */ - -/****** Data Structures *****************************************************/ - -/* - * RUNTIME_9050 - PLX PCI9050-1 local configuration and shared runtime - * registers. This structure can be used to access the 9050 registers - * (memory mapped). - */ -struct RUNTIME_9050 { - uclong loc_addr_range[4]; /* 00-0Ch : Local Address Ranges */ - uclong loc_rom_range; /* 10h : Local ROM Range */ - uclong loc_addr_base[4]; /* 14-20h : Local Address Base Addrs */ - uclong loc_rom_base; /* 24h : Local ROM Base */ - uclong loc_bus_descr[4]; /* 28-34h : Local Bus Descriptors */ - uclong rom_bus_descr; /* 38h : ROM Bus Descriptor */ - uclong cs_base[4]; /* 3C-48h : Chip Select Base Addrs */ - uclong intr_ctrl_stat; /* 4Ch : Interrupt Control/Status */ - uclong init_ctrl; /* 50h : EEPROM ctrl, Init Ctrl, etc */ -}; - -#define PLX_9050_LINT1_ENABLE 0x01 -#define PLX_9050_LINT1_POL 0x02 -#define PLX_9050_LINT1_STATUS 0x04 -#define PLX_9050_LINT2_ENABLE 0x08 -#define PLX_9050_LINT2_POL 0x10 -#define PLX_9050_LINT2_STATUS 0x20 -#define PLX_9050_INTR_ENABLE 0x40 -#define PLX_9050_SW_INTR 0x80 - -/* Masks to access the init_ctrl PLX register */ -#define PC300_CLKSEL_MASK (0x00000004UL) -#define PC300_CHMEDIA_MASK(chan) (0x00000020UL<<(chan*3)) -#define PC300_CTYPE_MASK (0x00000800UL) - -/* CPLD Registers (base addr = falcbase, TE only) */ -#define CPLD_REG1 0x140 /* Chip resets, DCD/CTS status */ -#define CPLD_REG2 0x144 /* Clock enable , LED control */ - -/* CPLD Register bit description: for the FALC bits, they should always be - set based on the channel (use (bit<<(2*ch)) to access the correct bit for - that channel) */ -#define CPLD_REG1_FALC_RESET 0x01 -#define CPLD_REG1_SCA_RESET 0x02 -#define CPLD_REG1_GLOBAL_CLK 0x08 -#define CPLD_REG1_FALC_DCD 0x10 -#define CPLD_REG1_FALC_CTS 0x20 - -#define CPLD_REG2_FALC_TX_CLK 0x01 -#define CPLD_REG2_FALC_RX_CLK 0x02 -#define CPLD_REG2_FALC_LED1 0x10 -#define CPLD_REG2_FALC_LED2 0x20 - -/* Structure with FALC-related fields (TE only) */ -#define PC300_FALC_MAXLOOP 0x0000ffff /* for falc_issue_cmd() */ - -typedef struct falc { - ucchar sync; /* If true FALC is synchronized */ - ucchar active; /* if TRUE then already active */ - ucchar loop_active; /* if TRUE a line loopback UP was received */ - ucchar loop_gen; /* if TRUE a line loopback UP was issued */ - - ucchar num_channels; - ucchar offset; /* 1 for T1, 0 for E1 */ - ucchar full_bandwidth; - - ucchar xmb_cause; - ucchar multiframe_mode; - - /* Statistics */ - ucshort pden; /* Pulse Density violation count */ - ucshort los; /* Loss of Signal count */ - ucshort losr; /* Loss of Signal recovery count */ - ucshort lfa; /* Loss of frame alignment count */ - ucshort farec; /* Frame Alignment Recovery count */ - ucshort lmfa; /* Loss of multiframe alignment count */ - ucshort ais; /* Remote Alarm indication Signal count */ - ucshort sec; /* One-second timer */ - ucshort es; /* Errored second */ - ucshort rai; /* remote alarm received */ - ucshort bec; - ucshort fec; - ucshort cvc; - ucshort cec; - ucshort ebc; - - /* Status */ - ucchar red_alarm; - ucchar blue_alarm; - ucchar loss_fa; - ucchar yellow_alarm; - ucchar loss_mfa; - ucchar prbs; -} falc_t; - -typedef struct pc300dev { - void *if_ptr; /* General purpose pointer */ - struct pc300ch *chan; -#ifdef __KERNEL__ - char name[16]; - void *private; - hdlc_device *hdlc; - struct net_device_stats stats; - struct sk_buff *tx_skb; -#endif /* __KERNEL__ */ -}pc300dev_t; - -typedef struct pc300hw { - int type; /* RSV, X21, etc. */ - int nchan; /* number of channels */ - int irq; /* interrupt request level */ - uclong clock; /* Board clock */ - uclong plxphys; /* PLX registers MMIO base (physical) */ - uclong plxbase; /* PLX registers MMIO base (virtual) */ - uclong plxsize; /* PLX registers MMIO size */ - uclong scaphys; /* SCA registers MMIO base (physical) */ - uclong scabase; /* SCA registers MMIO base (virtual) */ - uclong scasize; /* SCA registers MMIO size */ - uclong ramphys; /* On-board RAM MMIO base (physical) */ - uclong rambase; /* On-board RAM MMIO base (virtual) */ - uclong ramsize; /* On-board RAM MMIO size */ - uclong falcphys; /* FALC registers MMIO base (physical) */ - uclong falcbase; /* FALC registers MMIO base (virtual) */ - uclong falcsize; /* FALC registers MMIO size */ -} pc300hw_t; - -typedef struct pc300chconf { - ucchar media; /* HW media (RS232, V.35, etc.) */ - uclong proto; /* Protocol (PPP, X.25, etc.) */ - uclong clkrate; /* Clock rate (in bps, 0 = ext. clock) */ - ucchar loopback; /* Loopback mode */ - - /* TE-specific parameters */ - ucchar lcode; /* Line Code (AMI, B8ZS, etc.) */ - ucchar fr_mode; /* Frame Mode (ESF, D4, etc.) */ - ucchar lbo; /* Line Build Out */ - ucchar rx_sens; /* Rx Sensitivity (long- or short-haul) */ - uclong tslot_bitmap; /* bit[i]=1 => timeslot _i_ is active */ -} pc300chconf_t; - -typedef struct pc300ch { - struct pc300 *card; - int channel; - pc300dev_t d; - pc300chconf_t conf; - ucchar tx_first_bd; /* First TX DMA block descr. w/ data */ - ucchar tx_next_bd; /* Next free TX DMA block descriptor */ - ucchar rx_first_bd; /* First free RX DMA block descriptor */ - ucchar rx_last_bd; /* Last free RX DMA block descriptor */ - falc_t falc; /* FALC structure (TE only) */ -} pc300ch_t; - -typedef struct pc300 { - pc300hw_t hw; /* hardware config. */ - pc300ch_t chan[PC300_MAXCHAN]; -#ifdef __KERNEL__ - spinlock_t card_lock; -#endif /* __KERNEL__ */ -} pc300_t; - -/* DEV ioctl() commands */ -#define N_SPPP_IOCTLS 2 - -enum pc300_ioctl_cmds { - SIOCCPCRESERVED = (SIOCDEVPRIVATE + N_SPPP_IOCTLS), - SIOCGPC300CONF, - SIOCSPC300CONF, - SIOCGPC300STATUS, - SIOCGPC300FALCSTATUS, -}; - -/* Control Constant Definitions */ -#define PC300_RSV 0x01 -#define PC300_X21 0x02 -#define PC300_TE 0x03 - -#define PC300_LC_AMI 0x01 -#define PC300_LC_B8ZS 0x02 -#define PC300_LC_NRZ 0x03 -#define PC300_LC_HDB3 0x04 - -/* Framing (T1) */ -#define PC300_FR_ESF 0x01 -#define PC300_FR_D4 0x02 -#define PC300_FR_ESF_JAPAN 0x03 - -/* Framing (E1) */ -#define PC300_FR_MF_CRC4 0x04 -#define PC300_FR_MF_NON_CRC4 0x05 - -#define PC300_LBO_0_DB 0x00 -#define PC300_LBO_7_5_DB 0x01 -#define PC300_LBO_15_DB 0x02 -#define PC300_LBO_22_5_DB 0x03 - -#define PC300_RX_SENS_SH 0x01 -#define PC300_RX_SENS_LH 0x02 - -#define PC300_TX_TIMEOUT (2*HZ) -#define PC300_TX_QUEUE_LEN 10 -#define PC300_DEF_MTU 1500 - -#ifdef __KERNEL__ -/* Function Prototypes */ -static void tx_dma_buf_pt_init(pc300_t *, int); -static void tx_dma_buf_init(pc300_t *, int); -static void rx_dma_buf_pt_init(pc300_t *, int); -static void rx_dma_buf_init(pc300_t *, int); -static void tx_dma_buf_check(pc300_t *, int); -static void rx_dma_buf_check(pc300_t *, int); -int dma_buf_write(pc300_t *, int, ucchar *, int); -int dma_buf_read(pc300_t *, int, struct sk_buff *); -void tx_dma_start(pc300_t *, int); -void rx_dma_start(pc300_t *, int); -void tx_dma_stop(pc300_t *, int); -void rx_dma_stop(pc300_t *, int); -int cpc_queue_xmit(struct sk_buff *, struct device *); -void cpc_net_rx(hdlc_device *); -#ifdef CONFIG_PC300_X25 -int cpc_x25_packetlayer_xmit(struct sk_buff *, struct device *); -void cpc_lapb_connected(void *, int); -void cpc_lapb_disconnected(void *, int); -void cpc_lapb_data_indication(void *, struct sk_buff *); -void cpc_lapb_data_transmit(void *, struct sk_buff *); -#endif /* CONFIG_PC300_X25 */ -static void cpc_intr(int, void *, struct pt_regs *); -void cpc_sca_status(pc300_t *, int); -int cpc_ioctl(hdlc_device *, struct ifreq *, int); -static int clock_rate_calc(uclong, uclong, int *); -int ch_config(pc300dev_t *); -int rx_config(pc300dev_t *); -int tx_config(pc300dev_t *); -int cpc_opench(pc300dev_t *); -void cpc_closech(pc300dev_t *); -int cpc_open(hdlc_device *); -void cpc_close(hdlc_device *); -static uclong detect_ram(pc300_t *); -static void plx_init(pc300_t *); -static int cpc_detect(void); -#endif /* __KERNEL__ */ - -#endif /* _PC300_H */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/pci.h linux.20p6/include/linux/pci.h --- linux.vanilla/include/linux/pci.h Sun Mar 25 17:37:40 2001 +++ linux.20p6/include/linux/pci.h Mon Jun 18 08:19:06 2001 @@ -329,6 +329,7 @@ #define PCI_DEVICE_ID_COMPAQ_NETEL100PI 0xae43 #define PCI_DEVICE_ID_COMPAQ_NETEL100I 0xb011 #define PCI_DEVICE_ID_COMPAQ_CISS 0xb060 +#define PCI_DEVICE_ID_COMPAQ_CISSB 0xb178 #define PCI_DEVICE_ID_COMPAQ_THUNDER 0xf130 #define PCI_DEVICE_ID_COMPAQ_NETFLEX3B 0xf150 @@ -1350,11 +1351,24 @@ #define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) #define PCI_FUNC(devfn) ((devfn) & 0x07) +/* Ioctls for /proc/bus/pci/X/Y nodes. */ +#define PCIIOC_BASE ('P' << 24 | 'C' << 16 | 'I' << 8) +#define PCIIOC_CONTROLLER (PCIIOC_BASE | 0x00) /* Get controller for PCI device. */ +#define PCIIOC_MMAP_IS_IO (PCIIOC_BASE | 0x01) /* Set mmap state to I/O space. */ +#define PCIIOC_MMAP_IS_MEM (PCIIOC_BASE | 0x02) /* Set mmap state to MEM space. */ +#define PCIIOC_WRITE_COMBINE (PCIIOC_BASE | 0x03) /* Enable/disable write-combining. */ + #ifdef __KERNEL__ #include #include +/* File state for mmap()s on /proc/bus/pci/X/Y */ +enum pci_mmap_state { + pci_mmap_io, + pci_mmap_mem +}; + /* * There is one pci_dev structure for each slot-number/function-number * combination: @@ -1423,6 +1437,10 @@ #define PCIBIOS_BAD_REGISTER_NUMBER 0x87 #define PCIBIOS_SET_FAILED 0x88 #define PCIBIOS_BUFFER_TOO_SMALL 0x89 + +/* Include architecture-dependent settings and functions */ + +#include /* Low-level architecture-dependent routines */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/sched.h linux.20p6/include/linux/sched.h --- linux.vanilla/include/linux/sched.h Sun Mar 25 17:37:40 2001 +++ linux.20p6/include/linux/sched.h Mon Jun 25 14:29:55 2001 @@ -254,6 +254,7 @@ */ struct exec_domain *exec_domain; long need_resched; + unsigned long ptrace; /* various fields */ long counter; @@ -361,8 +362,6 @@ /* Not implemented yet, only for 486*/ #define PF_STARTING 0x00000002 /* being created */ #define PF_EXITING 0x00000004 /* getting shut down */ -#define PF_PTRACED 0x00000010 /* set if ptrace (0) has been called */ -#define PF_TRACESYS 0x00000020 /* tracing system calls */ #define PF_FORKNOEXEC 0x00000040 /* forked but didn't exec */ #define PF_SUPERPRIV 0x00000100 /* used super-user privileges */ #define PF_DUMPCORE 0x00000200 /* dumped core */ @@ -372,7 +371,14 @@ #define PF_FREE_PAGES 0x00002000 /* The current-> */ #define PF_USEDFPU 0x00100000 /* task used FPU this quantum (SMP) */ -#define PF_DTRACE 0x00200000 /* delayed trace (used on m68k, i386) */ + +/* + * Ptrace flags + */ +#define PT_PTRACED 0x00000001 /* set if ptrace (0) has been called */ +#define PT_TRACESYS 0x00000002 /* tracing system calls */ +#define PT_DTRACE 0x00000004 /* delayed trace (used on m68k, i386) */ + /* * Limit the stack by to some sane default: root can always @@ -387,7 +393,7 @@ * your own risk!. Base=0, limit=0x1fffff (=2MB) */ #define INIT_TASK \ -/* state etc */ { 0,0,0,KERNEL_DS,&default_exec_domain,0, \ +/* state etc */ { 0,0,0,KERNEL_DS,&default_exec_domain,0,0, \ /* counter */ DEF_PRIORITY,DEF_PRIORITY,0, \ /* SMP */ 0,0,0,-1, \ /* schedlink */ &init_task,&init_task, &init_task, &init_task, \ @@ -500,7 +506,7 @@ extern unsigned long volatile jiffies; extern unsigned long itimer_ticks; extern unsigned long itimer_next; -extern struct timeval xtime; +extern volatile struct timeval xtime; extern void do_timer(struct pt_regs *); extern unsigned int * prof_buffer; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/sunrpc/sched.h linux.20p6/include/linux/sunrpc/sched.h --- linux.vanilla/include/linux/sunrpc/sched.h Sun Mar 25 17:37:40 2001 +++ linux.20p6/include/linux/sunrpc/sched.h Fri May 4 23:45:33 2001 @@ -81,7 +81,7 @@ unsigned int tk_lock; /* Task lock counter */ unsigned char tk_active : 1,/* Task has been activated */ tk_wakeup : 1;/* Task waiting to wake up */ - unsigned int tk_runstate; /* Task run status */ + unsigned long tk_runstate; /* Task run status */ #ifdef RPC_DEBUG unsigned int tk_pid; /* debugging aid */ #endif diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/sunrpc/xprt.h linux.20p6/include/linux/sunrpc/xprt.h --- linux.vanilla/include/linux/sunrpc/xprt.h Sun Mar 25 17:37:40 2001 +++ linux.20p6/include/linux/sunrpc/xprt.h Mon Jun 18 08:27:15 2001 @@ -143,7 +143,7 @@ struct rpc_wait_queue pingwait; /* waiting on ping() */ struct rpc_rqst * free; /* free slots */ struct rpc_rqst slot[RPC_MAXREQS]; - unsigned int sockstate; /* Socket state */ + unsigned long sockstate; /* Socket state */ unsigned char nocong : 1,/* no congestion control */ stream : 1,/* TCP */ shutdown : 1,/* being shut down */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/synclink.h linux.20p6/include/linux/synclink.h --- linux.vanilla/include/linux/synclink.h Sun Mar 25 17:37:40 2001 +++ linux.20p6/include/linux/synclink.h Fri May 4 23:18:49 2001 @@ -1,7 +1,7 @@ /* * SyncLink Multiprotocol Serial Adapter Driver * - * $Id: synclink.h,v 2.2 2000/11/08 17:08:30 paul Exp $ + * $Id: synclink.h,v 2.5 2001/03/26 17:04:35 ez Exp $ * * Copyright (C) 1998-2000 by Microgate Corporation * @@ -11,7 +11,7 @@ #ifndef _SYNCLINK_H_ #define _SYNCLINK_H_ -#define SYNCLINK_H_VERSION 2.2 +#define SYNCLINK_H_VERSION 2.5 #define BOOLEAN int #define TRUE 1 @@ -84,6 +84,11 @@ #define HDLC_CRC_NONE 0 #define HDLC_CRC_16_CCITT 1 #define HDLC_CRC_32_CCITT 2 +#define HDLC_CRC_MASK 0x00ff +#define HDLC_CRC_RETURN_EX 0x8000 + +#define RX_OK 0 +#define RX_CRC_ERROR 1 #define HDLC_TXIDLE_FLAGS 0 #define HDLC_TXIDLE_ALT_ZEROS_ONES 1 @@ -117,6 +122,7 @@ #define MGSL_MODE_ASYNC 1 #define MGSL_MODE_HDLC 2 +#define MGSL_MODE_RAW 6 #define MGSL_BUS_TYPE_ISA 1 #define MGSL_BUS_TYPE_EISA 2 @@ -150,6 +156,8 @@ #define MICROGATE_VENDOR_ID 0x13c0 #define SYNCLINK_DEVICE_ID 0x0010 +#define MGSCC_DEVICE_ID 0x0020 +#define SYNCLINK_SCA_DEVICE_ID 0x0030 #define MGSL_MAX_SERIAL_NUMBER 30 /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/linux/tty.h linux.20p6/include/linux/tty.h --- linux.vanilla/include/linux/tty.h Sun Mar 25 17:31:03 2001 +++ linux.20p6/include/linux/tty.h Tue Jun 19 09:39:08 2001 @@ -364,6 +364,8 @@ extern int specialix_init(void); extern int espserial_init(void); extern int macserial_init(void); +extern int mgsl_init(void); +extern int n_hdlc_init(void); extern int tty_paranoia_check(struct tty_struct *tty, kdev_t device, const char *routine); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/net/ip.h linux.20p6/include/net/ip.h --- linux.vanilla/include/net/ip.h Sun Mar 25 17:37:40 2001 +++ linux.20p6/include/net/ip.h Mon Jun 25 14:42:04 2001 @@ -170,7 +170,7 @@ extern __inline__ int ip_decrease_ttl(struct iphdr *iph) { - u16 check = iph->check; + u32 check = iph->check; check += __constant_htons(0x0100); iph->check = check + ((check>=0xFFFF) ? 1 : 0); return --iph->ttl; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/include/scsi/sg.h linux.20p6/include/scsi/sg.h --- linux.vanilla/include/scsi/sg.h Sun Mar 25 17:31:09 2001 +++ linux.20p6/include/scsi/sg.h Mon Jun 25 14:26:02 2001 @@ -9,12 +9,14 @@ Original driver (sg.h): * Copyright (C) 1992 Lawrence Foard 2.x extensions to driver: -* Copyright (C) 1998 - 2000 Douglas Gilbert +* Copyright (C) 1998 - 2001 Douglas Gilbert - Version: 2.1.39 (20000626) + Version: 2.1.40 (20010620) This version for 2.2.x series kernels D. P. Gilbert (dgilbert@interlog.com, dougg@triode.net.au) + Changes since 2.1.38 (20000626) + - fix bug that caused long wait when large buffer requested Changes since 2.1.38 (20000527) - more scatter gather fine tuning for sym53c416 Changes since 2.1.37 (20000504) diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/init/main.c linux.20p6/init/main.c --- linux.vanilla/init/main.c Sun Mar 25 17:37:40 2001 +++ linux.20p6/init/main.c Tue May 8 15:54:50 2001 @@ -462,13 +462,8 @@ const char *name; const int num; } root_dev_names[] __initdata = { -#ifdef CONFIG_ROOT_NFS { "nfs", 0x00ff }, -#endif -#ifdef CONFIG_BLK_DEV_LOOP { "loop", 0x0700 }, -#endif -#ifdef CONFIG_BLK_DEV_IDE { "hda", 0x0300 }, { "hdb", 0x0340 }, { "hdc", 0x1600 }, @@ -481,8 +476,6 @@ { "hdj", 0x3840 }, { "hdk", 0x3900 }, { "hdl", 0x3940 }, -#endif -#ifdef CONFIG_BLK_DEV_SD { "sda", 0x0800 }, { "sdb", 0x0810 }, { "sdc", 0x0820 }, @@ -499,8 +492,6 @@ { "sdn", 0x08d0 }, { "sdo", 0x08e0 }, { "sdp", 0x08f0 }, -#endif -#ifdef CONFIG_BLK_DEV_DAC960 { "rd/c0d0p",0x3000 }, { "rd/c0d1p",0x3008 }, { "rd/c0d2p",0x3010 }, @@ -517,8 +508,6 @@ { "rd/c0d13p",0x3068 }, { "rd/c0d14p",0x3070 }, { "rd/c0d15p",0x3078 }, -#endif -#if defined(CONFIG_BLK_CPQ_DA) || defined(CONFIG_BLK_CPQ_DA_MODULE) { "ida/c0d0p",0x4800 }, { "ida/c0d1p",0x4810 }, { "ida/c0d2p",0x4820 }, @@ -535,71 +524,34 @@ { "ida/c0d13p",0x48D0 }, { "ida/c0d14p",0x48E0 }, { "ida/c0d15p",0x48F0 }, -#endif -#ifdef CONFIG_ATARI_ACSI { "ada", 0x1c00 }, { "adb", 0x1c10 }, { "adc", 0x1c20 }, { "add", 0x1c30 }, { "ade", 0x1c40 }, -#endif -#ifdef CONFIG_BLK_DEV_FD { "fd", 0x0200 }, -#endif -#ifdef CONFIG_MD_BOOT { "md", 0x0900 }, -#endif -#ifdef CONFIG_BLK_DEV_XD { "xda", 0x0d00 }, { "xdb", 0x0d40 }, -#endif -#ifdef CONFIG_BLK_DEV_RAM { "ram", 0x0100 }, -#endif -#ifdef CONFIG_BLK_DEV_SR { "scd", 0x0b00 }, -#endif -#ifdef CONFIG_MCD { "mcd", 0x1700 }, -#endif -#ifdef CONFIG_CDU535 { "cdu535", 0x1800 }, { "sonycd", 0x1800 }, -#endif -#ifdef CONFIG_AZTCD { "aztcd", 0x1d00 }, -#endif -#ifdef CONFIG_CM206 { "cm206cd", 0x2000 }, -#endif -#ifdef CONFIG_GSCD { "gscd", 0x1000 }, -#endif -#ifdef CONFIG_SBPCD { "sbpcd", 0x1900 }, -#endif -#ifdef CONFIG_BLK_DEV_PS2 { "eda", 0x2400 }, { "edb", 0x2440 }, -#endif -#ifdef CONFIG_PARIDE_PD { "pda", 0x2d00 }, { "pdb", 0x2d10 }, { "pdc", 0x2d20 }, { "pdd", 0x2d30 }, -#endif -#ifdef CONFIG_PARIDE_PCD { "pcd", 0x2e00 }, -#endif -#ifdef CONFIG_PARIDE_PF { "pf", 0x2f00 }, -#endif -#if CONFIG_APBLOCK { "apblock", APBLOCK_MAJOR << 8}, -#endif -#if CONFIG_DDV { "ddv", DDV_MAJOR << 8}, -#endif #ifdef CONFIG_MDISK { "mnda", (MDISK_MAJOR << MINORBITS)}, { "mndb", (MDISK_MAJOR << MINORBITS) + 1}, diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/kernel/exit.c linux.20p6/kernel/exit.c --- linux.vanilla/kernel/exit.c Sun Mar 25 17:37:40 2001 +++ linux.20p6/kernel/exit.c Mon Jun 18 08:35:00 2001 @@ -339,7 +339,7 @@ p = current->p_cptr; current->p_cptr = p->p_osptr; p->p_ysptr = NULL; - p->flags &= ~(PF_PTRACED|PF_TRACESYS); + p->ptrace &= ~(PT_PTRACED|PT_TRACESYS); p->p_pptr = p->p_opptr; p->p_osptr = p->p_pptr->p_cptr; @@ -475,7 +475,7 @@ case TASK_STOPPED: if (!p->exit_code) continue; - if (!(options & WUNTRACED) && !(p->flags & PF_PTRACED)) + if (!(options & WUNTRACED) && !(p->ptrace & PT_PTRACED)) continue; read_unlock(&tasklist_lock); retval = ru ? getrusage(p, RUSAGE_BOTH, ru) : 0; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/kernel/fork.c linux.20p6/kernel/fork.c --- linux.vanilla/kernel/fork.c Sun Mar 25 17:37:40 2001 +++ linux.20p6/kernel/fork.c Mon Jun 18 08:35:00 2001 @@ -557,7 +557,7 @@ new_flags &= ~(PF_SUPERPRIV | PF_USEDFPU | PF_VFORK); new_flags |= PF_FORKNOEXEC; if (!(clone_flags & CLONE_PTRACE)) - new_flags &= ~(PF_PTRACED|PF_TRACESYS); + p->ptrace = 0; if (clone_flags & CLONE_VFORK) new_flags |= PF_VFORK; p->flags = new_flags; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/kernel/signal.c linux.20p6/kernel/signal.c --- linux.vanilla/kernel/signal.c Sun Mar 25 17:37:40 2001 +++ linux.20p6/kernel/signal.c Mon Jun 18 08:35:00 2001 @@ -222,7 +222,7 @@ struct k_sigaction *ka; /* Don't ignore traced or blocked signals */ - if ((t->flags & PF_PTRACED) || sigismember(&t->blocked, sig)) + if ((t->ptrace & PT_PTRACED) || sigismember(&t->blocked, sig)) return 0; signals = t->sig; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/mm/swapfile.c linux.20p6/mm/swapfile.c --- linux.vanilla/mm/swapfile.c Sun Mar 25 17:31:03 2001 +++ linux.20p6/mm/swapfile.c Tue Jun 19 09:31:06 2001 @@ -448,7 +448,7 @@ len += sprintf(buf, "Filename\t\t\tType\t\tSize\tUsed\tPriority\n"); for (i = 0 ; i < nr_swapfiles ; i++, ptr++) { - if (ptr->flags & SWP_USED) { + if ((ptr->flags & SWP_USED) && ptr->swap_map) { char * path = d_path(ptr->swap_file, page, PAGE_SIZE); len += sprintf(buf + len, "%-31s ", path); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/core/dev.c linux.20p6/net/core/dev.c --- linux.vanilla/net/core/dev.c Sun Mar 25 17:37:41 2001 +++ linux.20p6/net/core/dev.c Tue Jun 19 09:39:08 2001 @@ -2105,7 +2105,7 @@ #ifdef CONFIG_PC300 cpc_init(); #endif -#ifdef CONFIG_HDLC +#ifdef CONFIG_SYNCPPP sync_ppp_init(); #endif diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/core/sock.c linux.20p6/net/core/sock.c --- linux.vanilla/net/core/sock.c Sun Mar 25 17:37:41 2001 +++ linux.20p6/net/core/sock.c Tue Jun 19 09:33:26 2001 @@ -7,7 +7,7 @@ * handler for protocols to use and generic option handler. * * - * Version: $Id: sock.c,v 1.80.2.3 2000/08/10 00:37:05 davem Exp $ + * Version: $Id: sock.c,v 1.80.2.5 2001/05/11 02:07:23 davem Exp $ * * Authors: Ross Biro, * Fred N. van Kempen, @@ -752,9 +752,11 @@ break; try_size = fallback; } - skb = sock_wmalloc(sk, try_size, 0, sk->allocation); + skb = sock_wmalloc_err(sk, try_size, 0, sk->allocation, &err); if (skb) break; + if (err) + goto failure; /* * This means we have too many buffers for this socket already. diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/ipv4/af_inet.c linux.20p6/net/ipv4/af_inet.c --- linux.vanilla/net/ipv4/af_inet.c Sun Mar 25 17:31:12 2001 +++ linux.20p6/net/ipv4/af_inet.c Tue Jun 19 09:59:54 2001 @@ -877,7 +877,8 @@ case SIOCGSTAMP: if(sk->stamp.tv_sec==0) return -ENOENT; - err = copy_to_user((void *)arg,&sk->stamp,sizeof(struct timeval)); + err = copy_to_user((void *)arg, &sk->stamp, + sizeof(struct timeval)); if (err) err = -EFAULT; return err; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/ipv4/ip_input.c linux.20p6/net/ipv4/ip_input.c --- linux.vanilla/net/ipv4/ip_input.c Sun Mar 25 17:37:41 2001 +++ linux.20p6/net/ipv4/ip_input.c Mon Jun 18 08:27:15 2001 @@ -5,7 +5,7 @@ * * The Internet Protocol (IP) module. * - * Version: $Id: ip_input.c,v 1.37.2.4 2001/01/04 04:20:16 davem Exp $ + * Version: $Id: ip_input.c,v 1.37.2.5 2001/06/07 06:47:54 davem Exp $ * * Authors: Ross Biro, * Fred N. van Kempen, @@ -181,8 +181,11 @@ int type; type = skb->h.icmph->type; - if (type < 32) - return test_bit(type, &sk->tp_pinfo.tp_raw4.filter); + if (type < 32) { + __u32 data = sk->tp_pinfo.tp_raw4.filter.data; + + return ((1 << type) & data) != 0; + } /* Do not block unknown ICMP types */ return 0; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/ipv4/ip_masq_vdolive.c linux.20p6/net/ipv4/ip_masq_vdolive.c --- linux.vanilla/net/ipv4/ip_masq_vdolive.c Sun Mar 25 17:31:12 2001 +++ linux.20p6/net/ipv4/ip_masq_vdolive.c Tue Jun 19 09:35:51 2001 @@ -242,7 +242,7 @@ ports[i]))) { return j; } - IP_MASQ_DEBUG(1-debug, "RealAudio: loaded support on port[%d] = %d\n", i, ports[i]); + IP_MASQ_DEBUG(1-debug, "VDOlive: loaded support on port[%d] = %d\n", i, ports[i]); } else { /* To be safe, force the incarnation table entry to NULL */ masq_incarnations[i] = NULL; diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/ipv4/ip_sockglue.c linux.20p6/net/ipv4/ip_sockglue.c --- linux.vanilla/net/ipv4/ip_sockglue.c Sun Mar 25 17:37:41 2001 +++ linux.20p6/net/ipv4/ip_sockglue.c Tue May 8 15:48:55 2001 @@ -5,7 +5,7 @@ * * The IP to API glue. * - * Version: $Id: ip_sockglue.c,v 1.42 1999/04/22 10:07:34 davem Exp $ + * Version: $Id: ip_sockglue.c,v 1.42.2.1 2001/02/20 04:21:46 davem Exp $ * * Authors: see ip.c * diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/ipv4/ipmr.c linux.20p6/net/ipv4/ipmr.c --- linux.vanilla/net/ipv4/ipmr.c Sun Mar 25 17:37:41 2001 +++ linux.20p6/net/ipv4/ipmr.c Tue May 8 15:48:55 2001 @@ -9,7 +9,7 @@ * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * - * Version: $Id: ipmr.c,v 1.40.2.2 1999/06/20 21:27:44 davem Exp $ + * Version: $Id: ipmr.c,v 1.40.2.3 2001/02/20 04:21:46 davem Exp $ * * Fixes: * Michael Chastain : Incorrect size of copying. diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/ipv4/raw.c linux.20p6/net/ipv4/raw.c --- linux.vanilla/net/ipv4/raw.c Sun Mar 25 17:37:41 2001 +++ linux.20p6/net/ipv4/raw.c Tue May 8 15:48:55 2001 @@ -5,7 +5,7 @@ * * RAW - implementation of IP "raw" sockets. * - * Version: $Id: raw.c,v 1.39.2.1 1999/06/20 20:14:50 davem Exp $ + * Version: $Id: raw.c,v 1.39.2.2 2001/02/20 04:21:46 davem Exp $ * * Authors: Ross Biro, * Fred N. van Kempen, diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/ipv4/route.c linux.20p6/net/ipv4/route.c --- linux.vanilla/net/ipv4/route.c Sun Mar 25 17:37:41 2001 +++ linux.20p6/net/ipv4/route.c Tue May 8 15:48:55 2001 @@ -5,7 +5,7 @@ * * ROUTE - implementation of the IP router. * - * Version: $Id: route.c,v 1.67.2.5 2000/09/01 23:19:46 davem Exp $ + * Version: $Id: route.c,v 1.67.2.6 2001/02/09 08:43:58 davem Exp $ * * Authors: Ross Biro, * Fred N. van Kempen, diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/ipv4/sysctl_net_ipv4.c linux.20p6/net/ipv4/sysctl_net_ipv4.c --- linux.vanilla/net/ipv4/sysctl_net_ipv4.c Sun Mar 25 17:37:41 2001 +++ linux.20p6/net/ipv4/sysctl_net_ipv4.c Tue May 8 15:48:55 2001 @@ -1,7 +1,7 @@ /* * sysctl_net_ipv4.c: sysctl interface to net IPV4 subsystem. * - * $Id: sysctl_net_ipv4.c,v 1.38.2.4 2000/09/16 09:40:00 davem Exp $ + * $Id: sysctl_net_ipv4.c,v 1.38.2.5 2001/02/09 08:43:58 davem Exp $ * * Begun April 1, 1996, Mike Shaver. * Added /proc/sys/net/ipv4 directory entry (empty =) ). [MS] diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/ipv4/tcp.c linux.20p6/net/ipv4/tcp.c --- linux.vanilla/net/ipv4/tcp.c Sun Mar 25 17:37:41 2001 +++ linux.20p6/net/ipv4/tcp.c Tue May 8 15:48:55 2001 @@ -5,7 +5,7 @@ * * Implementation of the Transmission Control Protocol(TCP). * - * Version: $Id: tcp.c,v 1.140.2.16 2001/01/04 05:28:46 davem Exp $ + * Version: $Id: tcp.c,v 1.140.2.17 2001/02/20 04:21:46 davem Exp $ * * Authors: Ross Biro, * Fred N. van Kempen, diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/ipv4/tcp_input.c linux.20p6/net/ipv4/tcp_input.c --- linux.vanilla/net/ipv4/tcp_input.c Sun Mar 25 17:37:41 2001 +++ linux.20p6/net/ipv4/tcp_input.c Tue Jun 19 09:59:54 2001 @@ -5,7 +5,7 @@ * * Implementation of the Transmission Control Protocol(TCP). * - * Version: $Id: tcp_input.c,v 1.164.2.21 2001/03/06 05:39:39 davem Exp $ + * Version: $Id: tcp_input.c,v 1.164.2.25 2001/05/24 22:33:21 davem Exp $ * * Authors: Ross Biro, * Fred N. van Kempen, @@ -734,8 +734,6 @@ if (tp->retransmits) { if (tp->packets_out == 0) { tp->retransmits = 0; - tp->fackets_out = 0; - tp->retrans_out = 0; tp->backoff = 0; tcp_set_rto(tp); } else { @@ -782,8 +780,10 @@ if(sk->zapped) return(1); /* Dead, can't ack any more so why bother */ - if (tp->pending == TIME_KEEPOPEN) + if (tp->pending == TIME_KEEPOPEN) { tp->probes_out = 0; + tp->pending = 0; + } tp->rcv_tstamp = tcp_time_stamp; @@ -851,8 +851,6 @@ if (tp->retransmits) { if (tp->packets_out == 0) { tp->retransmits = 0; - tp->fackets_out = 0; - tp->retrans_out = 0; } } else { /* We don't have a timestamp. Can only use @@ -879,6 +877,8 @@ tcp_ack_packets_out(sk, tp); } else { tcp_clear_xmit_timer(sk, TIME_RETRANS); + tp->fackets_out = 0; + tp->retrans_out = 0; } flag &= (FLAG_DATA | FLAG_WIN_UPDATE); @@ -1441,8 +1441,8 @@ if (!after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt)) { /* A retransmit, 2nd most common case. Force an imediate ack. */ SOCK_DEBUG(sk, "retransmit received: seq %X\n", TCP_SKB_CB(skb)->seq); - tcp_enter_quickack_mode(tp); out_of_window: + tcp_enter_quickack_mode(tp); tp->delayed_acks++; kfree_skb(skb); return; @@ -1538,7 +1538,7 @@ skb_pull(skb, th->doff*4); skb_trim(skb, len - (th->doff*4)); - if (skb->len == 0 && !th->fin) + if (TCP_SKB_CB(skb)->seq == TCP_SKB_CB(skb)->end_seq) return(0); /* @@ -1961,7 +1961,7 @@ * Dave!!! Phrase above (and all about rcv_mss) has * nothing to do with reality. rcv_mss must measure TOTAL * size, including sacks, IP options etc. Hence, measure_rcv_mss - * must occure before pulling etc, otherwise it will flap + * must occur before pulling etc, otherwise it will flap * like hell. Even putting it before tcp_data is wrong, * it should use skb->tail - skb->nh.raw instead. * --ANK (980805) @@ -2280,10 +2280,8 @@ tcp_sync_mss(sk, tp->pmtu_cookie); tp->rcv_mss = tp->mss_cache; - if (sk->state == TCP_SYN_RECV) - goto discard; - - goto step6; + /* Discard data/urg received with SYN. Safety is the first. */ + goto discard; } /* Parse the tcp_options present on this header. @@ -2418,7 +2416,6 @@ } else goto discard; -step6: /* step 6: check the URG bit */ tcp_urg(sk, th, len); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/ipv4/tcp_output.c linux.20p6/net/ipv4/tcp_output.c --- linux.vanilla/net/ipv4/tcp_output.c Sun Mar 25 17:31:12 2001 +++ linux.20p6/net/ipv4/tcp_output.c Tue May 8 15:48:55 2001 @@ -5,7 +5,7 @@ * * Implementation of the Transmission Control Protocol(TCP). * - * Version: $Id: tcp_output.c,v 1.108.2.11 2000/11/10 12:43:29 davem Exp $ + * Version: $Id: tcp_output.c,v 1.108.2.12 2001/04/10 19:58:44 davem Exp $ * * Authors: Ross Biro, * Fred N. van Kempen, @@ -547,6 +547,8 @@ */ kfree_skb(next_skb); sk->tp_pinfo.af_tcp.packets_out--; + if (sk->tp_pinfo.af_tcp.fackets_out) + sk->tp_pinfo.af_tcp.fackets_out--; } } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/ipv6/ip6_fib.c linux.20p6/net/ipv6/ip6_fib.c --- linux.vanilla/net/ipv6/ip6_fib.c Sun Mar 25 17:31:13 2001 +++ linux.20p6/net/ipv6/ip6_fib.c Mon Jun 18 08:27:15 2001 @@ -5,7 +5,7 @@ * Authors: * Pedro Roque * - * $Id: ip6_fib.c,v 1.17 1999/04/22 10:07:41 davem Exp $ + * $Id: ip6_fib.c,v 1.17.2.1 2001/06/07 06:47:54 davem Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -179,7 +179,7 @@ xb = ntohl(xb); - while (test_bit(j, &xb) == 0) + while ((xb & (1 << j)) == 0) j--; return (i * 32 + 31 - j); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/ipv6/ip6_input.c linux.20p6/net/ipv6/ip6_input.c --- linux.vanilla/net/ipv6/ip6_input.c Sun Mar 25 17:31:13 2001 +++ linux.20p6/net/ipv6/ip6_input.c Mon Jun 18 08:27:15 2001 @@ -6,7 +6,7 @@ * Pedro Roque * Ian P. Morris * - * $Id: ip6_input.c,v 1.11.2.2 2000/09/13 01:27:53 davem Exp $ + * $Id: ip6_input.c,v 1.11.2.3 2001/06/07 06:47:54 davem Exp $ * * Based in linux/net/ipv4/ip_input.c * @@ -97,10 +97,14 @@ { struct icmp6hdr *icmph; struct raw6_opt *opt; + int bit_nr; opt = &sk->tp_pinfo.tp_raw; icmph = (struct icmp6hdr *) skb->h.raw; - return test_bit(icmph->icmp6_type, &opt->filter); + bit_nr = icmph->icmp6_type; + if (bit_nr >= (8 * 32)) + return 0; + return ((opt->filter.data[bit_nr >> 5] & (1 << bit_nr)) != 0); } /* diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/ipv6/ipv6_sockglue.c linux.20p6/net/ipv6/ipv6_sockglue.c --- linux.vanilla/net/ipv6/ipv6_sockglue.c Sun Mar 25 17:37:41 2001 +++ linux.20p6/net/ipv6/ipv6_sockglue.c Tue May 8 15:48:55 2001 @@ -7,7 +7,7 @@ * * Based on linux/net/ipv4/ip_sockglue.c * - * $Id: ipv6_sockglue.c,v 1.27 1999/04/22 10:07:43 davem Exp $ + * $Id: ipv6_sockglue.c,v 1.27.2.2 2001/02/21 01:08:55 davem Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/ipv6/ndisc.c linux.20p6/net/ipv6/ndisc.c --- linux.vanilla/net/ipv6/ndisc.c Sun Mar 25 17:31:13 2001 +++ linux.20p6/net/ipv6/ndisc.c Tue Jun 19 09:33:26 2001 @@ -364,9 +364,23 @@ struct nd_msg *msg; int len; int err; + int send_llinfo; + + if (saddr == NULL) { + struct inet6_ifaddr *ifa; + + /* use link local address */ + ifa = ipv6_get_lladdr(dev); + + if (ifa) + saddr = &ifa->addr; + else + return; + } len = sizeof(struct icmp6hdr) + sizeof(struct in6_addr); - if (dev->addr_len) + send_llinfo = dev->addr_len && ipv6_addr_type(saddr) != IPV6_ADDR_ANY; + if (send_llinfo) len += NDISC_OPT_SPACE(dev->addr_len); skb = sock_alloc_send_skb(sk, MAX_HEADER + len + dev->hard_header_len + 15, @@ -376,15 +390,6 @@ return; } - if (saddr == NULL) { - struct inet6_ifaddr *ifa; - - /* use link local address */ - ifa = ipv6_get_lladdr(dev); - - if (ifa) - saddr = &ifa->addr; - } if (ndisc_build_ll_hdr(skb, dev, daddr, neigh, len) == 0) { kfree_skb(skb); @@ -402,7 +407,7 @@ /* Set the target address. */ ipv6_addr_copy(&msg->target, solicit); - if (dev->addr_len) + if (send_llinfo) ndisc_fill_option((void*)&msg->opt, ND_OPT_SOURCE_LL_ADDR, dev->dev_addr, dev->addr_len); /* checksum */ diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/ipv6/raw.c linux.20p6/net/ipv6/raw.c --- linux.vanilla/net/ipv6/raw.c Sun Mar 25 17:37:41 2001 +++ linux.20p6/net/ipv6/raw.c Tue May 8 15:48:55 2001 @@ -7,7 +7,7 @@ * * Adapted from linux/net/ipv4/raw.c * - * $Id: raw.c,v 1.24.2.1 1999/06/20 20:14:58 davem Exp $ + * $Id: raw.c,v 1.24.2.2 2001/02/20 04:21:47 davem Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/sunrpc/sched.c linux.20p6/net/sunrpc/sched.c --- linux.vanilla/net/sunrpc/sched.c Sun Mar 25 17:37:42 2001 +++ linux.20p6/net/sunrpc/sched.c Mon Jun 18 08:27:15 2001 @@ -77,7 +77,7 @@ * This is the last-ditch buffer for NFS swap requests */ static u32 swap_buffer[PAGE_SIZE >> 2]; -static int swap_buffer_used = 0; +static long swap_buffer_used = 0; /* * Make allocation of the swap_buffer SMP-safe diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/net/sunrpc/xprt.c linux.20p6/net/sunrpc/xprt.c --- linux.vanilla/net/sunrpc/xprt.c Sun Mar 25 17:37:42 2001 +++ linux.20p6/net/sunrpc/xprt.c Fri May 4 23:02:16 2001 @@ -1145,9 +1145,11 @@ unsigned long oldflags; spin_lock_irqsave(&xprt_sock_lock, oldflags); xprt->snd_task = NULL; - if (!rpc_wake_up_next(&xprt->sending) && xprt->stream) + if (!rpc_wake_up_next(&xprt->sending) && xprt->stream) { + spin_unlock_irqrestore(&xprt_sock_lock, oldflags); xprt_add_tcp_timer(xprt, RPCXPRT_TIMEOUT); - spin_unlock_irqrestore(&xprt_sock_lock, oldflags); + } else + spin_unlock_irqrestore(&xprt_sock_lock, oldflags); } } diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/scripts/lxdialog/checklist.c linux.20p6/scripts/lxdialog/checklist.c --- linux.vanilla/scripts/lxdialog/checklist.c Sun Mar 25 17:37:42 2001 +++ linux.20p6/scripts/lxdialog/checklist.c Fri May 4 23:18:06 2001 @@ -211,13 +211,15 @@ status[i+scroll], i, i == choice); } - wnoutrefresh (list); - print_arrows(dialog, choice, item_no, scroll, box_y, box_x + check_x + 5, list_height); print_buttons(dialog, height, width, 0); + wnoutrefresh (list); + wnoutrefresh (dialog); + doupdate (); + while (key != ESC) { key = wgetch (list); @@ -355,7 +357,11 @@ case ESC: break; } + + /* Now, update everything... */ + doupdate (); } + delwin (dialog); free (status); diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla/scripts/ver_linux linux.20p6/scripts/ver_linux --- linux.vanilla/scripts/ver_linux Sun Mar 25 17:37:42 2001 +++ linux.20p6/scripts/ver_linux Fri May 4 23:24:12 2001 @@ -20,7 +20,9 @@ ld -v 2>&1 | awk -F\) '{print $1}' | awk \ '/BFD/{print "binutils ",$NF}' -mount --version | awk -F\- '{print "util-linux ", $NF}' +fdformat --version | awk -F\- '{print "util-linux ", $NF}' + +mount --version | awk -F\- '{print "mount ", $NF}' insmod -V 2>&1 | awk 'NR==1 {print "modutils ",$NF}'